am 28fe43be: Merge "Add the hook which can set the device to connect to wifi and in airplane mode after reboot. This is for the power test." into froyo

Merge commit '28fe43be5c364a8f7f248a5ac05cf832a83737c2' into gingerbread

* commit '28fe43be5c364a8f7f248a5ac05cf832a83737c2':
  Add the hook which can set the device to connect to wifi and in airplane mode after reboot. This is for the power test.
diff --git a/Android.mk b/Android.mk
index 6e1bdc5..69a40c1 100644
--- a/Android.mk
+++ b/Android.mk
@@ -24,7 +24,7 @@
 # Instead, it depends on the R.stamp file, which lists the corresponding
 # R.java file as a prerequisite.
 # TODO: find a more appropriate way to do this.
-framework-res-source-path := APPS/framework-res_intermediates/src
+framework_res_source_path := APPS/framework-res_intermediates/src
 
 # the library
 # ============================================================
@@ -86,7 +86,6 @@
 	core/java/android/app/ISearchManager.aidl \
 	core/java/android/app/ISearchManagerCallback.aidl \
 	core/java/android/app/IServiceConnection.aidl \
-	core/java/android/app/IStatusBar.aidl \
 	core/java/android/app/IThumbnailReceiver.aidl \
 	core/java/android/app/ITransientNotification.aidl \
 	core/java/android/app/IUiModeManager.aidl \
@@ -155,6 +154,8 @@
 	core/java/com/android/internal/backup/IBackupTransport.aidl \
 	core/java/com/android/internal/os/IDropBoxManagerService.aidl \
 	core/java/com/android/internal/os/IResultReceiver.aidl \
+	core/java/com/android/internal/statusbar/IStatusBar.aidl \
+	core/java/com/android/internal/statusbar/IStatusBarService.aidl \
 	core/java/com/android/internal/view/IInputContext.aidl \
 	core/java/com/android/internal/view/IInputContextCallback.aidl \
 	core/java/com/android/internal/view/IInputMethod.aidl \
@@ -188,9 +189,9 @@
 LOCAL_AIDL_INCLUDES += $(FRAMEWORKS_BASE_JAVA_SRC_DIRS)
 
 LOCAL_INTERMEDIATE_SOURCES := \
-			$(framework-res-source-path)/android/R.java \
-			$(framework-res-source-path)/android/Manifest.java \
-			$(framework-res-source-path)/com/android/internal/R.java
+			$(framework_res_source_path)/android/R.java \
+			$(framework_res_source_path)/android/Manifest.java \
+			$(framework_res_source_path)/com/android/internal/R.java
 
 LOCAL_NO_STANDARD_LIBRARIES := true
 LOCAL_JAVA_LIBRARIES := core ext
@@ -198,6 +199,9 @@
 LOCAL_MODULE := framework
 LOCAL_MODULE_CLASS := JAVA_LIBRARIES
 
+LOCAL_NO_EMMA_INSTRUMENT := true
+LOCAL_NO_EMMA_COMPILE := true
+
 # List of classes and interfaces which should be loaded by the Zygote.
 LOCAL_JAVA_RESOURCE_FILES += $(LOCAL_PATH)/preloaded-classes
 
@@ -294,7 +298,7 @@
 # as "final" in the official SDK APIs.
 fwbase_dirs_to_document += core/config/sdk
 
-# These are relative to dalvik/libcore
+# These are relative to libcore
 # Intentionally not included from libcore:
 #     icu openssl suncompat support
 libcore_to_document := \
@@ -334,7 +338,7 @@
 dirs_to_document := \
 	$(fwbase_dirs_to_document) \
 	$(non_base_dirs) \
-	$(addprefix ../../dalvik/libcore/, $(libcore_to_document))
+	$(addprefix ../../libcore/, $(libcore_to_document))
 
 html_dirs := \
 	$(FRAMEWORKS_BASE_SUBDIRS) \
@@ -345,13 +349,17 @@
 	$(call find-other-java-files, $(dirs_to_document)) \
 	$(call find-other-html-files, $(html_dirs))
 
+# This is used by ide.mk as the list of source files that are
+# always included.
+INTERNAL_SDK_SOURCE_DIRS := $(addprefix $(LOCAL_PATH)/,$(dirs_to_document))
+
 framework_docs_LOCAL_DROIDDOC_SOURCE_PATH := \
 	$(FRAMEWORKS_BASE_JAVA_SRC_DIRS)
 
 framework_docs_LOCAL_INTERMEDIATE_SOURCES := \
-			$(framework-res-source-path)/android/R.java \
-			$(framework-res-source-path)/android/Manifest.java \
-			$(framework-res-source-path)/com/android/internal/R.java
+			$(framework_res_source_path)/android/R.java \
+			$(framework_res_source_path)/android/Manifest.java \
+			$(framework_res_source_path)/com/android/internal/R.java
 
 framework_docs_LOCAL_JAVA_LIBRARIES := \
 			core \
@@ -396,6 +404,8 @@
                             resources/samples/CubeLiveWallpaper "Live Wallpaper" \
 		-samplecode $(sample_dir)/Home \
 		            resources/samples/Home "Home" \
+		-samplecode $(sample_dir)/HeavyWeight \
+		            resources/samples/HeavyWeight "Heavy Weight App" \
 		-samplecode $(sample_dir)/JetBoy \
 		            resources/samples/JetBoy "JetBoy" \
 		-samplecode $(sample_dir)/LunarLander \
@@ -404,8 +414,8 @@
 		            resources/samples/MultiResolution "Multiple Resolutions" \
 		-samplecode $(sample_dir)/NotePad \
 		            resources/samples/NotePad "Note Pad" \
-                -samplecode $(sample_dir)/SampleSyncAdapter \
-                            resources/samples/SampleSyncAdapter "Sample Sync Adapter" \
+		-samplecode $(sample_dir)/SampleSyncAdapter \
+		            resources/samples/SampleSyncAdapter "Sample Sync Adapter" \
 		-samplecode $(sample_dir)/SearchableDictionary \
 		            resources/samples/SearchableDictionary "Searchable Dictionary v2" \
 		-samplecode $(sample_dir)/Snake \
@@ -592,6 +602,9 @@
 
 LOCAL_MODULE := ext
 
+LOCAL_NO_EMMA_INSTRUMENT := true
+LOCAL_NO_EMMA_COMPILE := true
+
 include $(BUILD_JAVA_LIBRARY)
 
 
diff --git a/CleanSpec.mk b/CleanSpec.mk
index 707404b..26d8a1b 100644
--- a/CleanSpec.mk
+++ b/CleanSpec.mk
@@ -51,6 +51,9 @@
 $(call add-clean-step, rm -rf $(OUT_DIR)/target/common/obj/JAVA_LIBRARIES/framework_intermediates/src/core/java/android/app)
 $(call add-clean-step, rm -rf $(OUT_DIR)/target/common/obj/JAVA_LIBRARIES/framework_intermediates/src/core/java/android/content)
 $(call add-clean-step, rm -rf $(OUT_DIR)/target/common/obj/APPS/FrameworkTest_intermediates/)
+$(call add-clean-step, rm -rf $(OUT_DIR)/target/common/obj/JAVA_LIBRARIES/android.policy*)
+$(call add-clean-step, rm -rf $(TARGET_OUT_JAVA_LIBRARIES)/android.policy.jar)
+$(call add-clean-step, rm -rf $(OUT_DIR)/target/common/obj/JAVA_LIBRARIES/framework_intermediates)
 
 
 # ************************************************
diff --git a/api/9.xml b/api/9.xml
new file mode 100644
index 0000000..076bed7
--- /dev/null
+++ b/api/9.xml
@@ -0,0 +1,395746 @@
+<api>
+<package name="android"
+>
+<class name="Manifest"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="Manifest"
+ type="android.Manifest"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+</class>
+<class name="Manifest.permission"
+ extends="java.lang.Object"
+ abstract="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="Manifest.permission"
+ type="android.Manifest.permission"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<field name="ACCESS_CHECKIN_PROPERTIES"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.permission.ACCESS_CHECKIN_PROPERTIES&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ACCESS_COARSE_LOCATION"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.permission.ACCESS_COARSE_LOCATION&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ACCESS_FINE_LOCATION"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.permission.ACCESS_FINE_LOCATION&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ACCESS_LOCATION_EXTRA_COMMANDS"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.permission.ACCESS_LOCATION_EXTRA_COMMANDS&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ACCESS_MOCK_LOCATION"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.permission.ACCESS_MOCK_LOCATION&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ACCESS_NETWORK_STATE"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.permission.ACCESS_NETWORK_STATE&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ACCESS_SURFACE_FLINGER"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.permission.ACCESS_SURFACE_FLINGER&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ACCESS_WIFI_STATE"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.permission.ACCESS_WIFI_STATE&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ACCOUNT_MANAGER"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.permission.ACCOUNT_MANAGER&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="AUTHENTICATE_ACCOUNTS"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.permission.AUTHENTICATE_ACCOUNTS&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="BATTERY_STATS"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.permission.BATTERY_STATS&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="BIND_APPWIDGET"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.permission.BIND_APPWIDGET&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="BIND_DEVICE_ADMIN"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.permission.BIND_DEVICE_ADMIN&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="BIND_INPUT_METHOD"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.permission.BIND_INPUT_METHOD&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="BIND_WALLPAPER"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.permission.BIND_WALLPAPER&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="BLUETOOTH"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.permission.BLUETOOTH&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="BLUETOOTH_ADMIN"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.permission.BLUETOOTH_ADMIN&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="BRICK"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.permission.BRICK&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="BROADCAST_PACKAGE_REMOVED"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.permission.BROADCAST_PACKAGE_REMOVED&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="BROADCAST_SMS"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.permission.BROADCAST_SMS&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="BROADCAST_STICKY"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.permission.BROADCAST_STICKY&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="BROADCAST_WAP_PUSH"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.permission.BROADCAST_WAP_PUSH&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="CALL_PHONE"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.permission.CALL_PHONE&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="CALL_PRIVILEGED"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.permission.CALL_PRIVILEGED&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="CAMERA"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.permission.CAMERA&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="CHANGE_COMPONENT_ENABLED_STATE"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.permission.CHANGE_COMPONENT_ENABLED_STATE&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="CHANGE_CONFIGURATION"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.permission.CHANGE_CONFIGURATION&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="CHANGE_NETWORK_STATE"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.permission.CHANGE_NETWORK_STATE&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="CHANGE_WIFI_MULTICAST_STATE"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.permission.CHANGE_WIFI_MULTICAST_STATE&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="CHANGE_WIFI_STATE"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.permission.CHANGE_WIFI_STATE&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="CLEAR_APP_CACHE"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.permission.CLEAR_APP_CACHE&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="CLEAR_APP_USER_DATA"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.permission.CLEAR_APP_USER_DATA&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="CONTROL_LOCATION_UPDATES"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.permission.CONTROL_LOCATION_UPDATES&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="DELETE_CACHE_FILES"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.permission.DELETE_CACHE_FILES&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="DELETE_PACKAGES"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.permission.DELETE_PACKAGES&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="DEVICE_POWER"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.permission.DEVICE_POWER&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="DIAGNOSTIC"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.permission.DIAGNOSTIC&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="DISABLE_KEYGUARD"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.permission.DISABLE_KEYGUARD&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="DUMP"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.permission.DUMP&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="EXPAND_STATUS_BAR"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.permission.EXPAND_STATUS_BAR&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="FACTORY_TEST"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.permission.FACTORY_TEST&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="FLASHLIGHT"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.permission.FLASHLIGHT&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="FORCE_BACK"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.permission.FORCE_BACK&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GET_ACCOUNTS"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.permission.GET_ACCOUNTS&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GET_PACKAGE_SIZE"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.permission.GET_PACKAGE_SIZE&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GET_TASKS"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.permission.GET_TASKS&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GLOBAL_SEARCH"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.permission.GLOBAL_SEARCH&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="HARDWARE_TEST"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.permission.HARDWARE_TEST&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="INJECT_EVENTS"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.permission.INJECT_EVENTS&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="INSTALL_LOCATION_PROVIDER"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.permission.INSTALL_LOCATION_PROVIDER&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="INSTALL_PACKAGES"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.permission.INSTALL_PACKAGES&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="INTERNAL_SYSTEM_WINDOW"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.permission.INTERNAL_SYSTEM_WINDOW&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="INTERNET"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.permission.INTERNET&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="KILL_BACKGROUND_PROCESSES"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.permission.KILL_BACKGROUND_PROCESSES&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="MANAGE_ACCOUNTS"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.permission.MANAGE_ACCOUNTS&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="MANAGE_APP_TOKENS"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.permission.MANAGE_APP_TOKENS&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="MASTER_CLEAR"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.permission.MASTER_CLEAR&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="MODIFY_AUDIO_SETTINGS"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.permission.MODIFY_AUDIO_SETTINGS&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="MODIFY_PHONE_STATE"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.permission.MODIFY_PHONE_STATE&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="MOUNT_FORMAT_FILESYSTEMS"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.permission.MOUNT_FORMAT_FILESYSTEMS&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="MOUNT_UNMOUNT_FILESYSTEMS"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.permission.MOUNT_UNMOUNT_FILESYSTEMS&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="PERSISTENT_ACTIVITY"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.permission.PERSISTENT_ACTIVITY&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="PROCESS_OUTGOING_CALLS"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.permission.PROCESS_OUTGOING_CALLS&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="READ_CALENDAR"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.permission.READ_CALENDAR&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="READ_CONTACTS"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.permission.READ_CONTACTS&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="READ_FRAME_BUFFER"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.permission.READ_FRAME_BUFFER&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="READ_HISTORY_BOOKMARKS"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;com.android.browser.permission.READ_HISTORY_BOOKMARKS&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="READ_INPUT_STATE"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.permission.READ_INPUT_STATE&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="READ_LOGS"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.permission.READ_LOGS&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="READ_OWNER_DATA"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.permission.READ_OWNER_DATA&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="READ_PHONE_STATE"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.permission.READ_PHONE_STATE&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="READ_SMS"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.permission.READ_SMS&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="READ_SYNC_SETTINGS"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.permission.READ_SYNC_SETTINGS&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="READ_SYNC_STATS"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.permission.READ_SYNC_STATS&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="REBOOT"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.permission.REBOOT&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="RECEIVE_BOOT_COMPLETED"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.permission.RECEIVE_BOOT_COMPLETED&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="RECEIVE_MMS"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.permission.RECEIVE_MMS&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="RECEIVE_SMS"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.permission.RECEIVE_SMS&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="RECEIVE_WAP_PUSH"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.permission.RECEIVE_WAP_PUSH&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="RECORD_AUDIO"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.permission.RECORD_AUDIO&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="REORDER_TASKS"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.permission.REORDER_TASKS&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="RESTART_PACKAGES"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.permission.RESTART_PACKAGES&quot;"
+ static="true"
+ final="true"
+ deprecated="deprecated"
+ visibility="public"
+>
+</field>
+<field name="SEND_SMS"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.permission.SEND_SMS&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="SET_ACTIVITY_WATCHER"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.permission.SET_ACTIVITY_WATCHER&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="SET_ALWAYS_FINISH"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.permission.SET_ALWAYS_FINISH&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="SET_ANIMATION_SCALE"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.permission.SET_ANIMATION_SCALE&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="SET_DEBUG_APP"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.permission.SET_DEBUG_APP&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="SET_ORIENTATION"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.permission.SET_ORIENTATION&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="SET_PREFERRED_APPLICATIONS"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.permission.SET_PREFERRED_APPLICATIONS&quot;"
+ static="true"
+ final="true"
+ deprecated="deprecated"
+ visibility="public"
+>
+</field>
+<field name="SET_PROCESS_LIMIT"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.permission.SET_PROCESS_LIMIT&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="SET_TIME"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.permission.SET_TIME&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="SET_TIME_ZONE"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.permission.SET_TIME_ZONE&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="SET_WALLPAPER"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.permission.SET_WALLPAPER&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="SET_WALLPAPER_HINTS"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.permission.SET_WALLPAPER_HINTS&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="SIGNAL_PERSISTENT_PROCESSES"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.permission.SIGNAL_PERSISTENT_PROCESSES&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="STATUS_BAR"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.permission.STATUS_BAR&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="SUBSCRIBED_FEEDS_READ"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.permission.SUBSCRIBED_FEEDS_READ&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="SUBSCRIBED_FEEDS_WRITE"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.permission.SUBSCRIBED_FEEDS_WRITE&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="SYSTEM_ALERT_WINDOW"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.permission.SYSTEM_ALERT_WINDOW&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="UPDATE_DEVICE_STATS"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.permission.UPDATE_DEVICE_STATS&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="USE_CREDENTIALS"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.permission.USE_CREDENTIALS&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="VIBRATE"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.permission.VIBRATE&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="WAKE_LOCK"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.permission.WAKE_LOCK&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="WRITE_APN_SETTINGS"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.permission.WRITE_APN_SETTINGS&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="WRITE_CALENDAR"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.permission.WRITE_CALENDAR&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="WRITE_CONTACTS"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.permission.WRITE_CONTACTS&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="WRITE_EXTERNAL_STORAGE"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.permission.WRITE_EXTERNAL_STORAGE&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="WRITE_GSERVICES"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.permission.WRITE_GSERVICES&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="WRITE_HISTORY_BOOKMARKS"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;com.android.browser.permission.WRITE_HISTORY_BOOKMARKS&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="WRITE_OWNER_DATA"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.permission.WRITE_OWNER_DATA&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="WRITE_SECURE_SETTINGS"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.permission.WRITE_SECURE_SETTINGS&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="WRITE_SETTINGS"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.permission.WRITE_SETTINGS&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="WRITE_SMS"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.permission.WRITE_SMS&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="WRITE_SYNC_SETTINGS"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.permission.WRITE_SYNC_SETTINGS&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<class name="Manifest.permission_group"
+ extends="java.lang.Object"
+ abstract="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="Manifest.permission_group"
+ type="android.Manifest.permission_group"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<field name="ACCOUNTS"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.permission-group.ACCOUNTS&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="COST_MONEY"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.permission-group.COST_MONEY&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="DEVELOPMENT_TOOLS"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.permission-group.DEVELOPMENT_TOOLS&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="HARDWARE_CONTROLS"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.permission-group.HARDWARE_CONTROLS&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="LOCATION"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.permission-group.LOCATION&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="MESSAGES"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.permission-group.MESSAGES&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="NETWORK"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.permission-group.NETWORK&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="PERSONAL_INFO"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.permission-group.PERSONAL_INFO&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="PHONE_CALLS"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.permission-group.PHONE_CALLS&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="STORAGE"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.permission-group.STORAGE&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="SYSTEM_TOOLS"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.permission-group.SYSTEM_TOOLS&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<class name="R"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="R"
+ type="android.R"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+</class>
+<class name="R.anim"
+ extends="java.lang.Object"
+ abstract="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="R.anim"
+ type="android.R.anim"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<field name="accelerate_decelerate_interpolator"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="17432580"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="accelerate_interpolator"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="17432581"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="anticipate_interpolator"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="17432583"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="anticipate_overshoot_interpolator"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="17432585"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="bounce_interpolator"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="17432586"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="cycle_interpolator"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="17432588"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="decelerate_interpolator"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="17432582"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="fade_in"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="17432576"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="fade_out"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="17432577"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="linear_interpolator"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="17432587"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="overshoot_interpolator"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="17432584"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="slide_in_left"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="17432578"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="slide_out_right"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="17432579"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<class name="R.array"
+ extends="java.lang.Object"
+ abstract="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="R.array"
+ type="android.R.array"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<field name="emailAddressTypes"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="17235968"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="imProtocols"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="17235969"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="organizationTypes"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="17235970"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="phoneTypes"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="17235971"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="postalAddressTypes"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="17235972"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<class name="R.attr"
+ extends="java.lang.Object"
+ abstract="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="R.attr"
+ type="android.R.attr"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<field name="absListViewStyle"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16842858"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="accountPreferences"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843423"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="accountType"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843407"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="action"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16842797"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="activityCloseEnterAnimation"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16842938"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="activityCloseExitAnimation"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16842939"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="activityOpenEnterAnimation"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16842936"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="activityOpenExitAnimation"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16842937"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="addStatesFromChildren"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16842992"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="adjustViewBounds"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843038"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="alertDialogStyle"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16842845"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="allowBackup"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843392"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="allowClearUserData"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16842757"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="allowSingleTap"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843353"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="allowTaskReparenting"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843268"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="alphabeticShortcut"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843235"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="alwaysDrawnWithCache"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16842991"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="alwaysRetainTaskState"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843267"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="angle"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843168"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="animateOnClick"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843356"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="animation"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843213"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="animationCache"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16842989"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="animationDuration"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843026"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="animationOrder"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843214"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="antialias"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843034"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="anyDensity"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843372"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="apiKey"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843281"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="author"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843444"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="authorities"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16842776"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="autoCompleteTextViewStyle"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16842859"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="autoLink"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16842928"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="autoStart"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843445"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="autoText"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843114"
+ static="true"
+ final="true"
+ deprecated="deprecated"
+ visibility="public"
+>
+</field>
+<field name="autoUrlDetect"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843404"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="background"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16842964"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="backgroundDimAmount"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16842802"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="backgroundDimEnabled"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843295"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="backupAgent"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843391"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="baselineAlignBottom"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843042"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="baselineAligned"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843046"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="baselineAlignedChildIndex"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843047"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="bottom"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843184"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="bottomBright"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16842957"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="bottomDark"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16842953"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="bottomLeftRadius"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843179"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="bottomMedium"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16842958"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="bottomOffset"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843351"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="bottomRightRadius"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843180"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="bufferType"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843086"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="button"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843015"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="buttonStyle"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16842824"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="buttonStyleInset"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16842826"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="buttonStyleSmall"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16842825"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="buttonStyleToggle"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16842827"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="cacheColorHint"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843009"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="candidatesTextStyleSpans"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843312"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="capitalize"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843113"
+ static="true"
+ final="true"
+ deprecated="deprecated"
+ visibility="public"
+>
+</field>
+<field name="centerBright"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16842956"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="centerColor"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843275"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="centerDark"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16842952"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="centerMedium"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16842959"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="centerX"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843170"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="centerY"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843171"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="checkBoxPreferenceStyle"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16842895"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="checkMark"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843016"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="checkable"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843237"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="checkableBehavior"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843232"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="checkboxStyle"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16842860"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="checked"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843014"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="checkedButton"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843080"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="childDivider"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843025"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="childIndicator"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843020"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="childIndicatorLeft"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843023"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="childIndicatorRight"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843024"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="choiceMode"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843051"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="clearTaskOnLaunch"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16842773"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="clickable"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16842981"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="clipChildren"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16842986"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="clipOrientation"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843274"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="clipToPadding"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16842987"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="codes"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843330"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="collapseColumns"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843083"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="color"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843173"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="colorBackground"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16842801"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="colorBackgroundCacheHint"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843435"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="colorForeground"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16842800"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="colorForegroundInverse"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843270"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="columnDelay"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843215"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="columnWidth"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843031"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="completionHint"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843122"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="completionHintView"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843123"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="completionThreshold"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843124"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="configChanges"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16842783"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="configure"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843357"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="constantSize"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843158"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="content"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843355"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="contentAuthority"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843408"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="contentDescription"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843379"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="cropToPadding"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843043"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="cursorVisible"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843090"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="cycles"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843220"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="dashGap"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843175"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="dashWidth"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843174"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="data"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16842798"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="debuggable"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16842767"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="defaultValue"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843245"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="delay"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843212"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="dependency"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843244"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="descendantFocusability"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16842993"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="description"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16842784"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="detachWallpaper"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843430"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="detailColumn"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843427"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="detailSocialSummary"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843428"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="dial"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843010"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="dialogIcon"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843252"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="dialogLayout"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843255"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="dialogMessage"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843251"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="dialogPreferenceStyle"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16842897"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="dialogTitle"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843250"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="digits"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843110"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="direction"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843217"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="directionPriority"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843218"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="disableDependentsState"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843249"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="disabledAlpha"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16842803"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="dither"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843036"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="divider"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843049"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="dividerHeight"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843050"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="drawSelectorOnTop"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843004"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="drawable"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843161"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="drawableBottom"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843118"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="drawableLeft"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843119"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="drawablePadding"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843121"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="drawableRight"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843120"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="drawableTop"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843117"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="drawingCacheQuality"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16842984"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="dropDownAnchor"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843363"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="dropDownHeight"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843395"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="dropDownHintAppearance"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16842888"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="dropDownHorizontalOffset"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843436"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="dropDownItemStyle"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16842886"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="dropDownListViewStyle"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16842861"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="dropDownSelector"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843125"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="dropDownVerticalOffset"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843437"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="dropDownWidth"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843362"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="duplicateParentState"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16842985"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="duration"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843160"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="editTextPreferenceStyle"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16842898"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="editTextStyle"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16842862"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="editable"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843115"
+ static="true"
+ final="true"
+ deprecated="deprecated"
+ visibility="public"
+>
+</field>
+<field name="editorExtras"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843300"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ellipsize"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16842923"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ems"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843096"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="enabled"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16842766"
+ static="true"
+ final="true"
+ deprecated="deprecated"
+ visibility="public"
+>
+</field>
+<field name="endColor"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843166"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="endYear"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843133"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="entries"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16842930"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="entryValues"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843256"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="eventsInterceptionEnabled"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843389"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="excludeFromRecents"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16842775"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="expandableListPreferredChildIndicatorLeft"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16842834"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="expandableListPreferredChildIndicatorRight"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16842835"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="expandableListPreferredChildPaddingLeft"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16842831"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="expandableListPreferredItemIndicatorLeft"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16842832"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="expandableListPreferredItemIndicatorRight"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16842833"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="expandableListPreferredItemPaddingLeft"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16842830"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="expandableListViewStyle"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16842863"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="expandableListViewWhiteStyle"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843446"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="exported"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16842768"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="extraTension"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843371"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="factor"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843219"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="fadeDuration"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843384"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="fadeEnabled"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843390"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="fadeOffset"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843383"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="fadeScrollbars"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843434"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="fadingEdge"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16842975"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="fadingEdgeLength"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16842976"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="fastScrollEnabled"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843302"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="fillAfter"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843197"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="fillBefore"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843196"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="fillEnabled"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843343"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="fillViewport"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843130"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="filter"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843035"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="finishOnCloseSystemDialogs"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843431"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="finishOnTaskLaunch"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16842772"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="fitsSystemWindows"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16842973"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="flipInterval"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843129"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="focusable"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16842970"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="focusableInTouchMode"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16842971"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="footerDividersEnabled"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843311"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="foreground"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843017"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="foregroundGravity"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843264"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="format"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843013"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="freezesText"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843116"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="fromAlpha"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843210"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="fromDegrees"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843187"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="fromXDelta"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843206"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="fromXScale"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843202"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="fromYDelta"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843208"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="fromYScale"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843204"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="fullBright"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16842954"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="fullDark"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16842950"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="functionalTest"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16842787"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="galleryItemBackground"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16842828"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="galleryStyle"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16842864"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="gestureColor"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843381"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="gestureStrokeAngleThreshold"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843388"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="gestureStrokeLengthThreshold"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843386"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="gestureStrokeSquarenessThreshold"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843387"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="gestureStrokeType"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843385"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="gestureStrokeWidth"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843380"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="glEsVersion"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843393"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="gradientRadius"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843172"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="grantUriPermissions"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16842779"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="gravity"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16842927"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="gridViewStyle"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16842865"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="groupIndicator"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843019"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="hand_hour"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843011"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="hand_minute"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843012"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="handle"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843354"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="handleProfiling"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16842786"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="hapticFeedbackEnabled"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843358"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="hasCode"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16842764"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="headerBackground"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843055"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="headerDividersEnabled"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843310"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="height"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843093"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="hint"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843088"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="horizontalDivider"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843053"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="horizontalGap"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843327"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="horizontalSpacing"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843028"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="host"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16842792"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="icon"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16842754"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="iconPreview"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843337"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="id"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16842960"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ignoreGravity"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843263"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="imageButtonStyle"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16842866"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="imageWellStyle"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16842867"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="imeActionId"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843366"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="imeActionLabel"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843365"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="imeExtractEnterAnimation"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843368"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="imeExtractExitAnimation"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843369"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="imeFullscreenBackground"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843308"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="imeOptions"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843364"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="inAnimation"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843127"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="includeFontPadding"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843103"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="includeInGlobalSearch"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843374"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="indeterminate"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843065"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="indeterminateBehavior"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843070"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="indeterminateDrawable"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843067"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="indeterminateDuration"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843069"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="indeterminateOnly"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843066"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="indicatorLeft"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843021"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="indicatorRight"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843022"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="inflatedId"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16842995"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="initOrder"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16842778"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="initialLayout"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843345"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="innerRadius"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843359"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="innerRadiusRatio"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843163"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="inputMethod"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843112"
+ static="true"
+ final="true"
+ deprecated="deprecated"
+ visibility="public"
+>
+</field>
+<field name="inputType"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843296"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="insetBottom"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843194"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="insetLeft"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843191"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="insetRight"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843192"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="insetTop"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843193"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="installLocation"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843447"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="interpolator"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843073"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="isDefault"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843297"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="isIndicator"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843079"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="isModifier"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843334"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="isRepeatable"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843336"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="isScrollContainer"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843342"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="isSticky"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843335"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="itemBackground"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843056"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="itemIconDisabledAlpha"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843057"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="itemTextAppearance"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843052"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="keepScreenOn"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843286"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="key"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843240"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="keyBackground"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843315"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="keyEdgeFlags"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843333"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="keyHeight"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843326"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="keyIcon"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843340"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="keyLabel"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843339"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="keyOutputText"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843338"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="keyPreviewHeight"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843321"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="keyPreviewLayout"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843319"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="keyPreviewOffset"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843320"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="keyTextColor"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843318"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="keyTextSize"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843316"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="keyWidth"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843325"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="keyboardMode"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843341"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="keycode"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16842949"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="killAfterRestore"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843420"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="label"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16842753"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="labelTextSize"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843317"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="largeScreens"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843398"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="launchMode"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16842781"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="layout"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16842994"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="layoutAnimation"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16842988"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="layout_above"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843140"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="layout_alignBaseline"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843142"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="layout_alignBottom"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843146"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="layout_alignLeft"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843143"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="layout_alignParentBottom"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843150"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="layout_alignParentLeft"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843147"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="layout_alignParentRight"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843149"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="layout_alignParentTop"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843148"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="layout_alignRight"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843145"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="layout_alignTop"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843144"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="layout_alignWithParentIfMissing"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843154"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="layout_below"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843141"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="layout_centerHorizontal"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843152"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="layout_centerInParent"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843151"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="layout_centerVertical"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843153"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="layout_column"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843084"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="layout_gravity"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16842931"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="layout_height"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16842997"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="layout_margin"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16842998"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="layout_marginBottom"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843002"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="layout_marginLeft"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16842999"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="layout_marginRight"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843001"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="layout_marginTop"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843000"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="layout_scale"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843155"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="layout_span"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843085"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="layout_toLeftOf"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843138"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="layout_toRightOf"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843139"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="layout_weight"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843137"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="layout_width"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16842996"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="layout_x"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843135"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="layout_y"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843136"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="left"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843181"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="lineSpacingExtra"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843287"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="lineSpacingMultiplier"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843288"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="lines"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843092"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="linksClickable"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16842929"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="listChoiceIndicatorMultiple"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843290"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="listChoiceIndicatorSingle"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843289"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="listDivider"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843284"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="listPreferredItemHeight"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16842829"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="listSelector"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843003"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="listSeparatorTextViewStyle"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843272"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="listViewStyle"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16842868"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="listViewWhiteStyle"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16842869"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="longClickable"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16842982"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="manageSpaceActivity"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16842756"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="mapViewStyle"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16842890"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="marqueeRepeatLimit"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843293"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="max"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843062"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="maxEms"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843095"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="maxHeight"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843040"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="maxItemsPerRow"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843060"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="maxLength"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843104"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="maxLevel"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843186"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="maxLines"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843091"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="maxRows"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843059"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="maxSdkVersion"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843377"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="maxWidth"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843039"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="measureAllChildren"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843018"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="menuCategory"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843230"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="mimeType"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16842790"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="minEms"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843098"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="minHeight"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843072"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="minLevel"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843185"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="minLines"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843094"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="minSdkVersion"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843276"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="minWidth"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843071"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="mode"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843134"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="moreIcon"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843061"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="multiprocess"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16842771"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="name"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16842755"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="negativeButtonText"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843254"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="nextFocusDown"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16842980"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="nextFocusLeft"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16842977"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="nextFocusRight"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16842978"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="nextFocusUp"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16842979"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="noHistory"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843309"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="normalScreens"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843397"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="numColumns"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843032"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="numStars"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843076"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="numeric"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843109"
+ static="true"
+ final="true"
+ deprecated="deprecated"
+ visibility="public"
+>
+</field>
+<field name="numericShortcut"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843236"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="onClick"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843375"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="oneshot"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843159"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="order"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843242"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="orderInCategory"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843231"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="orderingFromXml"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843239"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="orientation"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16842948"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="outAnimation"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843128"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="padding"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16842965"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="paddingBottom"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16842969"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="paddingLeft"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16842966"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="paddingRight"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16842968"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="paddingTop"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16842967"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="panelBackground"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16842846"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="panelColorBackground"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16842849"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="panelColorForeground"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16842848"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="panelFullBackground"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16842847"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="panelTextAppearance"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16842850"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="password"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843100"
+ static="true"
+ final="true"
+ deprecated="deprecated"
+ visibility="public"
+>
+</field>
+<field name="path"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16842794"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="pathPattern"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16842796"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="pathPrefix"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16842795"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="permission"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16842758"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="permissionGroup"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16842762"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="persistent"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16842765"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="persistentDrawingCache"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16842990"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="phoneNumber"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843111"
+ static="true"
+ final="true"
+ deprecated="deprecated"
+ visibility="public"
+>
+</field>
+<field name="pivotX"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843189"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="pivotY"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843190"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="popupBackground"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843126"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="popupCharacters"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843332"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="popupKeyboard"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843331"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="popupLayout"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843323"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="popupWindowStyle"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16842870"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="port"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16842793"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="positiveButtonText"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843253"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="preferenceCategoryStyle"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16842892"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="preferenceInformationStyle"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16842893"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="preferenceLayoutChild"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16842900"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="preferenceScreenStyle"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16842891"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="preferenceStyle"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16842894"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="priority"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16842780"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="privateImeOptions"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843299"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="process"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16842769"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="progress"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843063"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="progressBarStyle"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16842871"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="progressBarStyleHorizontal"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16842872"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="progressBarStyleInverse"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843399"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="progressBarStyleLarge"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16842874"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="progressBarStyleLargeInverse"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843401"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="progressBarStyleSmall"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16842873"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="progressBarStyleSmallInverse"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843400"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="progressBarStyleSmallTitle"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843279"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="progressDrawable"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843068"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="prompt"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843131"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="protectionLevel"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16842761"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="queryActionMsg"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843227"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="queryAfterZeroResults"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843394"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="quickContactBadgeStyleSmallWindowLarge"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843443"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="quickContactBadgeStyleSmallWindowMedium"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843442"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="quickContactBadgeStyleSmallWindowSmall"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843441"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="quickContactBadgeStyleWindowLarge"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843440"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="quickContactBadgeStyleWindowMedium"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843439"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="quickContactBadgeStyleWindowSmall"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843438"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="radioButtonStyle"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16842878"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="radius"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843176"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="rating"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843077"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ratingBarStyle"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16842876"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ratingBarStyleIndicator"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843280"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ratingBarStyleSmall"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16842877"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="readPermission"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16842759"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="repeatCount"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843199"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="repeatMode"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843200"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="reqFiveWayNav"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843314"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="reqHardKeyboard"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843305"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="reqKeyboardType"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843304"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="reqNavigation"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843306"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="reqTouchScreen"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843303"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="required"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843406"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="resizeable"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843405"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="resource"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16842789"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="restoreAnyVersion"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843450"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="restoreNeedsApplication"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843421"
+ static="true"
+ final="true"
+ deprecated="deprecated"
+ visibility="public"
+>
+</field>
+<field name="right"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843183"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ringtonePreferenceStyle"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16842899"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ringtoneType"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843257"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="rowDelay"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843216"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="rowEdgeFlags"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843329"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="rowHeight"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843058"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="saveEnabled"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16842983"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="scaleGravity"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843262"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="scaleHeight"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843261"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="scaleType"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843037"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="scaleWidth"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843260"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="scheme"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16842791"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="screenOrientation"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16842782"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="scrollHorizontally"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843099"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="scrollViewStyle"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16842880"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="scrollX"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16842962"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="scrollY"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16842963"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="scrollbarAlwaysDrawHorizontalTrack"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16842856"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="scrollbarAlwaysDrawVerticalTrack"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16842857"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="scrollbarDefaultDelayBeforeFade"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843433"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="scrollbarFadeDuration"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843432"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="scrollbarSize"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16842851"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="scrollbarStyle"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16842879"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="scrollbarThumbHorizontal"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16842852"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="scrollbarThumbVertical"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16842853"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="scrollbarTrackHorizontal"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16842854"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="scrollbarTrackVertical"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16842855"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="scrollbars"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16842974"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="scrollingCache"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843006"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="searchButtonText"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843269"
+ static="true"
+ final="true"
+ deprecated="deprecated"
+ visibility="public"
+>
+</field>
+<field name="searchMode"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843221"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="searchSettingsDescription"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843402"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="searchSuggestAuthority"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843222"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="searchSuggestIntentAction"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843225"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="searchSuggestIntentData"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843226"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="searchSuggestPath"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843223"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="searchSuggestSelection"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843224"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="searchSuggestThreshold"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843373"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="secondaryProgress"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843064"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="seekBarStyle"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16842875"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="selectAllOnFocus"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843102"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="selectable"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843238"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="settingsActivity"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843301"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="shadowColor"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843105"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="shadowDx"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843106"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="shadowDy"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843107"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="shadowRadius"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843108"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="shape"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843162"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="shareInterpolator"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843195"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="sharedUserId"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16842763"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="sharedUserLabel"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843361"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="shouldDisableView"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843246"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="showDefault"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843258"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="showSilent"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843259"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="shrinkColumns"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843082"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="singleLine"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843101"
+ static="true"
+ final="true"
+ deprecated="deprecated"
+ visibility="public"
+>
+</field>
+<field name="smallIcon"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843422"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="smallScreens"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843396"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="smoothScrollbar"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843313"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="soundEffectsEnabled"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843285"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="spacing"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843027"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="spinnerDropDownItemStyle"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16842887"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="spinnerItemStyle"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16842889"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="spinnerStyle"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16842881"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="src"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843033"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="stackFromBottom"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843005"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="starStyle"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16842882"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="startColor"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843165"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="startOffset"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843198"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="startYear"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843132"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="stateNotNeeded"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16842774"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="state_above_anchor"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16842922"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="state_active"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16842914"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="state_checkable"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16842911"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="state_checked"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16842912"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="state_empty"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16842921"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="state_enabled"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16842910"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="state_expanded"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16842920"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="state_first"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16842916"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="state_focused"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16842908"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="state_last"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16842918"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="state_long_pressable"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843324"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="state_middle"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16842917"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="state_pressed"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16842919"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="state_selected"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16842913"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="state_single"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16842915"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="state_window_focused"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16842909"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="stepSize"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843078"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="streamType"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843273"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="stretchColumns"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843081"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="stretchMode"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843030"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="suggestActionMsg"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843228"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="suggestActionMsgColumn"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843229"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="summary"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843241"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="summaryColumn"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843426"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="summaryOff"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843248"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="summaryOn"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843247"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="supportsUploading"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843419"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="syncable"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16842777"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="tabStripEnabled"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843453"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="tabStripLeft"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843451"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="tabStripRight"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843452"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="tabWidgetStyle"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16842883"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="tag"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16842961"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="targetActivity"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843266"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="targetClass"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16842799"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="targetPackage"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16842785"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="targetSdkVersion"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843376"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="taskAffinity"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16842770"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="taskCloseEnterAnimation"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16842942"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="taskCloseExitAnimation"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16842943"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="taskOpenEnterAnimation"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16842940"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="taskOpenExitAnimation"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16842941"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="taskToBackEnterAnimation"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16842946"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="taskToBackExitAnimation"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16842947"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="taskToFrontEnterAnimation"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16842944"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="taskToFrontExitAnimation"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16842945"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="tension"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843370"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="testOnly"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843378"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="text"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843087"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="textAppearance"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16842804"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="textAppearanceButton"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843271"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="textAppearanceInverse"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16842805"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="textAppearanceLarge"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16842816"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="textAppearanceLargeInverse"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16842819"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="textAppearanceMedium"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16842817"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="textAppearanceMediumInverse"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16842820"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="textAppearanceSearchResultSubtitle"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843424"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="textAppearanceSearchResultTitle"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843425"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="textAppearanceSmall"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16842818"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="textAppearanceSmallInverse"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16842821"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="textCheckMark"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16842822"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="textCheckMarkInverse"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16842823"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="textColor"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16842904"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="textColorHighlight"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16842905"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="textColorHint"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16842906"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="textColorHintInverse"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16842815"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="textColorLink"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16842907"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="textColorPrimary"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16842806"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="textColorPrimaryDisableOnly"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16842807"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="textColorPrimaryInverse"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16842809"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="textColorPrimaryInverseDisableOnly"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843403"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="textColorPrimaryInverseNoDisable"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16842813"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="textColorPrimaryNoDisable"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16842811"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="textColorSecondary"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16842808"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="textColorSecondaryInverse"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16842810"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="textColorSecondaryInverseNoDisable"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16842814"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="textColorSecondaryNoDisable"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16842812"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="textColorTertiary"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843282"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="textColorTertiaryInverse"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843283"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="textFilterEnabled"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843007"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="textOff"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843045"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="textOn"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843044"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="textScaleX"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843089"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="textSize"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16842901"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="textStyle"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16842903"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="textViewStyle"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16842884"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="theme"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16842752"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="thickness"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843360"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="thicknessRatio"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843164"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="thumb"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843074"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="thumbOffset"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843075"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="thumbnail"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843429"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="tileMode"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843265"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="tint"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843041"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="title"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843233"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="titleCondensed"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843234"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="toAlpha"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843211"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="toDegrees"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843188"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="toXDelta"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843207"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="toXScale"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843203"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="toYDelta"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843209"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="toYScale"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843205"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="top"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843182"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="topBright"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16842955"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="topDark"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16842951"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="topLeftRadius"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843177"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="topOffset"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843352"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="topRightRadius"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843178"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="transcriptMode"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843008"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="type"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843169"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="typeface"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16842902"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="uncertainGestureColor"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843382"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="unselectedAlpha"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843278"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="updatePeriodMillis"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843344"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="useLevel"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843167"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="userVisible"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843409"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="value"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16842788"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="variablePadding"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843157"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="versionCode"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843291"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="versionName"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843292"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="verticalCorrection"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843322"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="verticalDivider"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843054"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="verticalGap"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843328"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="verticalSpacing"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843029"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="visibility"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16842972"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="visible"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843156"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="vmSafeMode"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843448"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="voiceLanguage"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843349"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="voiceLanguageModel"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843347"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="voiceMaxResults"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843350"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="voicePromptText"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843348"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="voiceSearchMode"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843346"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="wallpaperCloseEnterAnimation"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843413"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="wallpaperCloseExitAnimation"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843414"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="wallpaperIntraCloseEnterAnimation"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843417"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="wallpaperIntraCloseExitAnimation"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843418"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="wallpaperIntraOpenEnterAnimation"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843415"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="wallpaperIntraOpenExitAnimation"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843416"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="wallpaperOpenEnterAnimation"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843411"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="wallpaperOpenExitAnimation"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843412"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="webTextViewStyle"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843449"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="webViewStyle"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16842885"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="weightSum"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843048"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="widgetLayout"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843243"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="width"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843097"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="windowAnimationStyle"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16842926"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="windowBackground"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16842836"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="windowContentOverlay"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16842841"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="windowDisablePreview"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843298"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="windowEnterAnimation"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16842932"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="windowExitAnimation"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16842933"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="windowFrame"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16842837"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="windowFullscreen"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843277"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="windowHideAnimation"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16842935"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="windowIsFloating"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16842839"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="windowIsTranslucent"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16842840"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="windowNoDisplay"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843294"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="windowNoTitle"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16842838"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="windowShowAnimation"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16842934"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="windowShowWallpaper"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843410"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="windowSoftInputMode"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843307"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="windowTitleBackgroundStyle"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16842844"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="windowTitleSize"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16842842"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="windowTitleStyle"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16842843"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="writePermission"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16842760"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="x"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16842924"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="y"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16842925"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="yesNoPreferenceStyle"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16842896"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="zAdjustment"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843201"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<class name="R.bool"
+ extends="java.lang.Object"
+ abstract="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="R.bool"
+ type="android.R.bool"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+</class>
+<class name="R.color"
+ extends="java.lang.Object"
+ abstract="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="R.color"
+ type="android.R.color"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<field name="background_dark"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="17170446"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="background_light"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="17170447"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="black"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="17170444"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="darker_gray"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="17170432"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="primary_text_dark"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="17170433"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="primary_text_dark_nodisable"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="17170434"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="primary_text_light"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="17170435"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="primary_text_light_nodisable"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="17170436"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="secondary_text_dark"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="17170437"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="secondary_text_dark_nodisable"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="17170438"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="secondary_text_light"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="17170439"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="secondary_text_light_nodisable"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="17170440"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="tab_indicator_text"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="17170441"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="tertiary_text_dark"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="17170448"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="tertiary_text_light"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="17170449"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="transparent"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="17170445"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="white"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="17170443"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="widget_edittext_dark"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="17170442"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<class name="R.dimen"
+ extends="java.lang.Object"
+ abstract="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="R.dimen"
+ type="android.R.dimen"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<field name="app_icon_size"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="17104896"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="thumbnail_height"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="17104897"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="thumbnail_width"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="17104898"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<class name="R.drawable"
+ extends="java.lang.Object"
+ abstract="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="R.drawable"
+ type="android.R.drawable"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<field name="alert_dark_frame"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="17301504"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="alert_light_frame"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="17301505"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="arrow_down_float"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="17301506"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="arrow_up_float"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="17301507"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="bottom_bar"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="17301658"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="btn_default"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="17301508"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="btn_default_small"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="17301509"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="btn_dialog"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="17301527"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="btn_dropdown"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="17301510"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="btn_minus"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="17301511"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="btn_plus"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="17301512"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="btn_radio"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="17301513"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="btn_star"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="17301514"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="btn_star_big_off"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="17301515"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="btn_star_big_on"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="17301516"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="button_onoff_indicator_off"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="17301518"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="button_onoff_indicator_on"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="17301517"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="checkbox_off_background"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="17301519"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="checkbox_on_background"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="17301520"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="dark_header"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="17301669"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="dialog_frame"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="17301521"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="divider_horizontal_bright"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="17301522"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="divider_horizontal_dark"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="17301524"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="divider_horizontal_dim_dark"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="17301525"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="divider_horizontal_textfield"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="17301523"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="edit_text"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="17301526"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="editbox_background"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="17301528"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="editbox_background_normal"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="17301529"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="editbox_dropdown_dark_frame"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="17301530"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="editbox_dropdown_light_frame"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="17301531"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="gallery_thumb"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="17301532"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ic_btn_speak_now"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="17301668"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ic_delete"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="17301533"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ic_dialog_alert"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="17301543"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ic_dialog_dialer"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="17301544"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ic_dialog_email"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="17301545"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ic_dialog_info"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="17301659"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ic_dialog_map"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="17301546"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ic_input_add"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="17301547"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ic_input_delete"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="17301548"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ic_input_get"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="17301549"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ic_lock_idle_alarm"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="17301550"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ic_lock_idle_charging"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="17301534"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ic_lock_idle_lock"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="17301535"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ic_lock_idle_low_battery"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="17301536"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ic_lock_lock"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="17301551"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ic_lock_power_off"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="17301552"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ic_lock_silent_mode"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="17301553"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ic_lock_silent_mode_off"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="17301554"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ic_media_ff"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="17301537"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ic_media_next"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="17301538"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ic_media_pause"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="17301539"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ic_media_play"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="17301540"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ic_media_previous"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="17301541"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ic_media_rew"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="17301542"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ic_menu_add"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="17301555"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ic_menu_agenda"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="17301556"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ic_menu_always_landscape_portrait"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="17301557"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ic_menu_call"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="17301558"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ic_menu_camera"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="17301559"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ic_menu_close_clear_cancel"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="17301560"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ic_menu_compass"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="17301561"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ic_menu_crop"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="17301562"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ic_menu_day"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="17301563"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ic_menu_delete"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="17301564"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ic_menu_directions"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="17301565"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ic_menu_edit"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="17301566"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ic_menu_gallery"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="17301567"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ic_menu_help"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="17301568"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ic_menu_info_details"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="17301569"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ic_menu_manage"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="17301570"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ic_menu_mapmode"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="17301571"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ic_menu_month"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="17301572"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ic_menu_more"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="17301573"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ic_menu_my_calendar"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="17301574"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ic_menu_mylocation"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="17301575"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ic_menu_myplaces"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="17301576"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ic_menu_preferences"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="17301577"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ic_menu_recent_history"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="17301578"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ic_menu_report_image"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="17301579"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ic_menu_revert"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="17301580"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ic_menu_rotate"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="17301581"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ic_menu_save"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="17301582"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ic_menu_search"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="17301583"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ic_menu_send"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="17301584"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ic_menu_set_as"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="17301585"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ic_menu_share"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="17301586"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ic_menu_slideshow"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="17301587"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ic_menu_sort_alphabetically"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="17301660"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ic_menu_sort_by_size"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="17301661"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ic_menu_today"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="17301588"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ic_menu_upload"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="17301589"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ic_menu_upload_you_tube"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="17301590"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ic_menu_view"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="17301591"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ic_menu_week"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="17301592"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ic_menu_zoom"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="17301593"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ic_notification_clear_all"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="17301594"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ic_notification_overlay"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="17301595"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ic_partial_secure"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="17301596"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ic_popup_disk_full"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="17301597"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ic_popup_reminder"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="17301598"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ic_popup_sync"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="17301599"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ic_search_category_default"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="17301600"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ic_secure"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="17301601"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="list_selector_background"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="17301602"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="menu_frame"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="17301603"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="menu_full_frame"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="17301604"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="menuitem_background"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="17301605"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="picture_frame"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="17301606"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="presence_away"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="17301607"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="presence_busy"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="17301608"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="presence_invisible"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="17301609"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="presence_offline"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="17301610"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="presence_online"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="17301611"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="progress_horizontal"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="17301612"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="progress_indeterminate_horizontal"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="17301613"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="radiobutton_off_background"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="17301614"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="radiobutton_on_background"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="17301615"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="screen_background_dark"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="17301656"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="screen_background_dark_transparent"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="17301673"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="screen_background_light"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="17301657"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="screen_background_light_transparent"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="17301674"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="spinner_background"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="17301616"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="spinner_dropdown_background"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="17301617"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="star_big_off"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="17301619"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="star_big_on"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="17301618"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="star_off"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="17301621"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="star_on"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="17301620"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="stat_notify_call_mute"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="17301622"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="stat_notify_chat"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="17301623"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="stat_notify_error"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="17301624"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="stat_notify_missed_call"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="17301631"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="stat_notify_more"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="17301625"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="stat_notify_sdcard"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="17301626"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="stat_notify_sdcard_prepare"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="17301675"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="stat_notify_sdcard_usb"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="17301627"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="stat_notify_sync"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="17301628"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="stat_notify_sync_noanim"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="17301629"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="stat_notify_voicemail"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="17301630"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="stat_sys_data_bluetooth"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="17301632"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="stat_sys_download"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="17301633"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="stat_sys_download_done"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="17301634"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="stat_sys_headset"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="17301635"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="stat_sys_phone_call"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="17301636"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="stat_sys_phone_call_forward"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="17301637"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="stat_sys_phone_call_on_hold"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="17301638"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="stat_sys_speakerphone"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="17301639"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="stat_sys_upload"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="17301640"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="stat_sys_upload_done"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="17301641"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="stat_sys_vp_phone_call"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="17301671"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="stat_sys_vp_phone_call_on_hold"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="17301672"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="stat_sys_warning"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="17301642"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="status_bar_item_app_background"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="17301643"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="status_bar_item_background"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="17301644"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="sym_action_call"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="17301645"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="sym_action_chat"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="17301646"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="sym_action_email"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="17301647"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="sym_call_incoming"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="17301648"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="sym_call_missed"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="17301649"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="sym_call_outgoing"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="17301650"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="sym_contact_card"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="17301652"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="sym_def_app_icon"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="17301651"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="title_bar"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="17301653"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="title_bar_tall"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="17301670"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="toast_frame"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="17301654"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="zoom_plate"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="17301655"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<class name="R.id"
+ extends="java.lang.Object"
+ abstract="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="R.id"
+ type="android.R.id"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<field name="addToDictionary"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16908330"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="background"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16908288"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="button1"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16908313"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="button2"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16908314"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="button3"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16908315"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="candidatesArea"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16908317"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="checkbox"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16908289"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="closeButton"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16908327"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="content"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16908290"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="copy"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16908321"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="copyUrl"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16908323"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="custom"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16908331"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="cut"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16908320"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="edit"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16908291"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="empty"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16908292"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="extractArea"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16908316"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="hint"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16908293"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="icon"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16908294"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="icon1"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16908295"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="icon2"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16908296"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="input"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16908297"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="inputArea"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16908318"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="inputExtractEditText"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16908325"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="keyboardView"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16908326"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="list"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16908298"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="message"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16908299"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="paste"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16908322"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="primary"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16908300"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="progress"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16908301"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="secondaryProgress"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16908303"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="selectAll"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16908319"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="selectedIcon"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16908302"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="startSelectingText"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16908328"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="stopSelectingText"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16908329"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="summary"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16908304"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="switchInputMethod"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16908324"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="tabcontent"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16908305"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="tabhost"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16908306"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="tabs"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16908307"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="text1"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16908308"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="text2"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16908309"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="title"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16908310"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="toggle"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16908311"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="widget_frame"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16908312"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<class name="R.integer"
+ extends="java.lang.Object"
+ abstract="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="R.integer"
+ type="android.R.integer"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<field name="config_longAnimTime"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="17694722"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="config_mediumAnimTime"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="17694721"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="config_shortAnimTime"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="17694720"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<class name="R.layout"
+ extends="java.lang.Object"
+ abstract="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="R.layout"
+ type="android.R.layout"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<field name="activity_list_item"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="17367040"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="browser_link_context_header"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="17367054"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="expandable_list_content"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="17367041"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="preference_category"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="17367042"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="select_dialog_item"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="17367057"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="select_dialog_multichoice"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="17367059"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="select_dialog_singlechoice"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="17367058"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="simple_dropdown_item_1line"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="17367050"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="simple_expandable_list_item_1"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="17367046"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="simple_expandable_list_item_2"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="17367047"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="simple_gallery_item"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="17367051"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="simple_list_item_1"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="17367043"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="simple_list_item_2"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="17367044"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="simple_list_item_checked"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="17367045"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="simple_list_item_multiple_choice"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="17367056"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="simple_list_item_single_choice"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="17367055"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="simple_spinner_dropdown_item"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="17367049"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="simple_spinner_item"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="17367048"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="test_list_item"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="17367052"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="two_line_list_item"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="17367053"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<class name="R.plurals"
+ extends="java.lang.Object"
+ abstract="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="R.plurals"
+ type="android.R.plurals"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+</class>
+<class name="R.raw"
+ extends="java.lang.Object"
+ abstract="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="R.raw"
+ type="android.R.raw"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+</class>
+<class name="R.string"
+ extends="java.lang.Object"
+ abstract="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="R.string"
+ type="android.R.string"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<field name="VideoView_error_button"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="17039376"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="VideoView_error_text_invalid_progressive_playback"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="17039381"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="VideoView_error_text_unknown"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="17039377"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="VideoView_error_title"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="17039378"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="cancel"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="17039360"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="copy"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="17039361"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="copyUrl"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="17039362"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="cut"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="17039363"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="defaultMsisdnAlphaTag"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="17039365"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="defaultVoiceMailAlphaTag"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="17039364"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="dialog_alert_title"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="17039380"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="emptyPhoneNumber"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="17039366"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="httpErrorBadUrl"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="17039367"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="httpErrorUnsupportedScheme"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="17039368"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="no"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="17039369"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ok"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="17039370"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="paste"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="17039371"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="search_go"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="17039372"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="selectAll"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="17039373"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="unknownName"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="17039374"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="untitled"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="17039375"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="yes"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="17039379"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<class name="R.style"
+ extends="java.lang.Object"
+ abstract="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="R.style"
+ type="android.R.style"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<field name="Animation"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16973824"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="Animation_Activity"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16973825"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="Animation_Dialog"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16973826"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="Animation_InputMethod"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16973910"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="Animation_Toast"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16973828"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="Animation_Translucent"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16973827"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="MediaButton"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16973879"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="MediaButton_Ffwd"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16973883"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="MediaButton_Next"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16973881"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="MediaButton_Pause"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16973885"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="MediaButton_Play"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16973882"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="MediaButton_Previous"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16973880"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="MediaButton_Rew"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16973884"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TextAppearance"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16973886"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TextAppearance_DialogWindowTitle"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16973889"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TextAppearance_Inverse"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16973887"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TextAppearance_Large"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16973890"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TextAppearance_Large_Inverse"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16973891"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TextAppearance_Medium"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16973892"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TextAppearance_Medium_Inverse"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16973893"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TextAppearance_Small"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16973894"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TextAppearance_Small_Inverse"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16973895"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TextAppearance_Theme"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16973888"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TextAppearance_Theme_Dialog"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16973896"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TextAppearance_Widget"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16973897"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TextAppearance_Widget_Button"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16973898"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TextAppearance_Widget_DropDownHint"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16973904"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TextAppearance_Widget_DropDownItem"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16973905"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TextAppearance_Widget_EditText"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16973900"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TextAppearance_Widget_IconMenu_Item"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16973899"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TextAppearance_Widget_TabWidget"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16973901"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TextAppearance_Widget_TextView"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16973902"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TextAppearance_Widget_TextView_PopupMenu"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16973903"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TextAppearance_Widget_TextView_SpinnerItem"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16973906"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TextAppearance_WindowTitle"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16973907"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="Theme"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16973829"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="Theme_Black"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16973832"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="Theme_Black_NoTitleBar"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16973833"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="Theme_Black_NoTitleBar_Fullscreen"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16973834"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="Theme_Dialog"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16973835"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="Theme_InputMethod"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16973908"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="Theme_Light"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16973836"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="Theme_Light_NoTitleBar"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16973837"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="Theme_Light_NoTitleBar_Fullscreen"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16973838"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="Theme_Light_Panel"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16973914"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="Theme_Light_WallpaperSettings"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16973922"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="Theme_NoDisplay"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16973909"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="Theme_NoTitleBar"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16973830"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="Theme_NoTitleBar_Fullscreen"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16973831"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="Theme_Panel"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16973913"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="Theme_Translucent"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16973839"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="Theme_Translucent_NoTitleBar"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16973840"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="Theme_Translucent_NoTitleBar_Fullscreen"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16973841"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="Theme_Wallpaper"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16973918"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="Theme_WallpaperSettings"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16973921"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="Theme_Wallpaper_NoTitleBar"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16973919"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="Theme_Wallpaper_NoTitleBar_Fullscreen"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16973920"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="Widget"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16973842"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="Widget_AbsListView"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16973843"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="Widget_AutoCompleteTextView"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16973863"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="Widget_Button"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16973844"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="Widget_Button_Inset"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16973845"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="Widget_Button_Small"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16973846"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="Widget_Button_Toggle"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16973847"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="Widget_CompoundButton"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16973848"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="Widget_CompoundButton_CheckBox"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16973849"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="Widget_CompoundButton_RadioButton"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16973850"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="Widget_CompoundButton_Star"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16973851"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="Widget_DropDownItem"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16973867"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="Widget_DropDownItem_Spinner"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16973868"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="Widget_EditText"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16973859"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="Widget_ExpandableListView"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16973860"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="Widget_Gallery"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16973877"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="Widget_GridView"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16973874"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="Widget_ImageButton"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16973862"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="Widget_ImageWell"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16973861"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="Widget_KeyboardView"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16973911"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="Widget_ListView"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16973870"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="Widget_ListView_DropDown"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16973872"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="Widget_ListView_Menu"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16973873"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="Widget_ListView_White"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16973871"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="Widget_PopupWindow"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16973878"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="Widget_ProgressBar"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16973852"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="Widget_ProgressBar_Horizontal"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16973855"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="Widget_ProgressBar_Inverse"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16973915"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="Widget_ProgressBar_Large"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16973853"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="Widget_ProgressBar_Large_Inverse"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16973916"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="Widget_ProgressBar_Small"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16973854"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="Widget_ProgressBar_Small_Inverse"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16973917"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="Widget_RatingBar"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16973857"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="Widget_ScrollView"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16973869"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="Widget_SeekBar"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16973856"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="Widget_Spinner"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16973864"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="Widget_TabWidget"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16973876"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="Widget_TextView"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16973858"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="Widget_TextView_PopupMenu"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16973865"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="Widget_TextView_SpinnerItem"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16973866"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="Widget_WebView"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16973875"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<class name="R.xml"
+ extends="java.lang.Object"
+ abstract="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="R.xml"
+ type="android.R.xml"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+</class>
+</package>
+<package name="android.accessibilityservice"
+>
+<class name="AccessibilityService"
+ extends="android.app.Service"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="AccessibilityService"
+ type="android.accessibilityservice.AccessibilityService"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<method name="onAccessibilityEvent"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="event" type="android.view.accessibility.AccessibilityEvent">
+</parameter>
+</method>
+<method name="onBind"
+ return="android.os.IBinder"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="intent" type="android.content.Intent">
+</parameter>
+</method>
+<method name="onInterrupt"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="onServiceConnected"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</method>
+<method name="setServiceInfo"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="info" type="android.accessibilityservice.AccessibilityServiceInfo">
+</parameter>
+</method>
+<field name="SERVICE_INTERFACE"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.accessibilityservice.AccessibilityService&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<class name="AccessibilityServiceInfo"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="android.os.Parcelable">
+</implements>
+<constructor name="AccessibilityServiceInfo"
+ type="android.accessibilityservice.AccessibilityServiceInfo"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<method name="describeContents"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="writeToParcel"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="parcel" type="android.os.Parcel">
+</parameter>
+<parameter name="flagz" type="int">
+</parameter>
+</method>
+<field name="CREATOR"
+ type="android.os.Parcelable.Creator"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="DEFAULT"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="FEEDBACK_AUDIBLE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="4"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="FEEDBACK_GENERIC"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="FEEDBACK_HAPTIC"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="FEEDBACK_SPOKEN"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="FEEDBACK_VISUAL"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="8"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="eventTypes"
+ type="int"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="feedbackType"
+ type="int"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="flags"
+ type="int"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="notificationTimeout"
+ type="long"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="packageNames"
+ type="java.lang.String[]"
+ transient="false"
+ volatile="false"
+ value="null"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+</package>
+<package name="android.accounts"
+>
+<class name="AbstractAccountAuthenticator"
+ extends="java.lang.Object"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="AbstractAccountAuthenticator"
+ type="android.accounts.AbstractAccountAuthenticator"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="context" type="android.content.Context">
+</parameter>
+</constructor>
+<method name="addAccount"
+ return="android.os.Bundle"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="response" type="android.accounts.AccountAuthenticatorResponse">
+</parameter>
+<parameter name="accountType" type="java.lang.String">
+</parameter>
+<parameter name="authTokenType" type="java.lang.String">
+</parameter>
+<parameter name="requiredFeatures" type="java.lang.String[]">
+</parameter>
+<parameter name="options" type="android.os.Bundle">
+</parameter>
+<exception name="NetworkErrorException" type="android.accounts.NetworkErrorException">
+</exception>
+</method>
+<method name="confirmCredentials"
+ return="android.os.Bundle"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="response" type="android.accounts.AccountAuthenticatorResponse">
+</parameter>
+<parameter name="account" type="android.accounts.Account">
+</parameter>
+<parameter name="options" type="android.os.Bundle">
+</parameter>
+<exception name="NetworkErrorException" type="android.accounts.NetworkErrorException">
+</exception>
+</method>
+<method name="editProperties"
+ return="android.os.Bundle"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="response" type="android.accounts.AccountAuthenticatorResponse">
+</parameter>
+<parameter name="accountType" type="java.lang.String">
+</parameter>
+</method>
+<method name="getAccountRemovalAllowed"
+ return="android.os.Bundle"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="response" type="android.accounts.AccountAuthenticatorResponse">
+</parameter>
+<parameter name="account" type="android.accounts.Account">
+</parameter>
+<exception name="NetworkErrorException" type="android.accounts.NetworkErrorException">
+</exception>
+</method>
+<method name="getAuthToken"
+ return="android.os.Bundle"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="response" type="android.accounts.AccountAuthenticatorResponse">
+</parameter>
+<parameter name="account" type="android.accounts.Account">
+</parameter>
+<parameter name="authTokenType" type="java.lang.String">
+</parameter>
+<parameter name="options" type="android.os.Bundle">
+</parameter>
+<exception name="NetworkErrorException" type="android.accounts.NetworkErrorException">
+</exception>
+</method>
+<method name="getAuthTokenLabel"
+ return="java.lang.String"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="authTokenType" type="java.lang.String">
+</parameter>
+</method>
+<method name="getIBinder"
+ return="android.os.IBinder"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="hasFeatures"
+ return="android.os.Bundle"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="response" type="android.accounts.AccountAuthenticatorResponse">
+</parameter>
+<parameter name="account" type="android.accounts.Account">
+</parameter>
+<parameter name="features" type="java.lang.String[]">
+</parameter>
+<exception name="NetworkErrorException" type="android.accounts.NetworkErrorException">
+</exception>
+</method>
+<method name="updateCredentials"
+ return="android.os.Bundle"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="response" type="android.accounts.AccountAuthenticatorResponse">
+</parameter>
+<parameter name="account" type="android.accounts.Account">
+</parameter>
+<parameter name="authTokenType" type="java.lang.String">
+</parameter>
+<parameter name="options" type="android.os.Bundle">
+</parameter>
+<exception name="NetworkErrorException" type="android.accounts.NetworkErrorException">
+</exception>
+</method>
+</class>
+<class name="Account"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="android.os.Parcelable">
+</implements>
+<constructor name="Account"
+ type="android.accounts.Account"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+<parameter name="type" type="java.lang.String">
+</parameter>
+</constructor>
+<constructor name="Account"
+ type="android.accounts.Account"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="in" type="android.os.Parcel">
+</parameter>
+</constructor>
+<method name="describeContents"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="writeToParcel"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="dest" type="android.os.Parcel">
+</parameter>
+<parameter name="flags" type="int">
+</parameter>
+</method>
+<field name="CREATOR"
+ type="android.os.Parcelable.Creator"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="name"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="type"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<class name="AccountAuthenticatorActivity"
+ extends="android.app.Activity"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="AccountAuthenticatorActivity"
+ type="android.accounts.AccountAuthenticatorActivity"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<method name="setAccountAuthenticatorResult"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="result" type="android.os.Bundle">
+</parameter>
+</method>
+</class>
+<class name="AccountAuthenticatorResponse"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="android.os.Parcelable">
+</implements>
+<constructor name="AccountAuthenticatorResponse"
+ type="android.accounts.AccountAuthenticatorResponse"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="parcel" type="android.os.Parcel">
+</parameter>
+</constructor>
+<method name="describeContents"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="onError"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="errorCode" type="int">
+</parameter>
+<parameter name="errorMessage" type="java.lang.String">
+</parameter>
+</method>
+<method name="onRequestContinued"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="onResult"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="result" type="android.os.Bundle">
+</parameter>
+</method>
+<method name="writeToParcel"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="dest" type="android.os.Parcel">
+</parameter>
+<parameter name="flags" type="int">
+</parameter>
+</method>
+<field name="CREATOR"
+ type="android.os.Parcelable.Creator"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<class name="AccountManager"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="addAccount"
+ return="android.accounts.AccountManagerFuture&lt;android.os.Bundle&gt;"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="accountType" type="java.lang.String">
+</parameter>
+<parameter name="authTokenType" type="java.lang.String">
+</parameter>
+<parameter name="requiredFeatures" type="java.lang.String[]">
+</parameter>
+<parameter name="addAccountOptions" type="android.os.Bundle">
+</parameter>
+<parameter name="activity" type="android.app.Activity">
+</parameter>
+<parameter name="callback" type="android.accounts.AccountManagerCallback&lt;android.os.Bundle&gt;">
+</parameter>
+<parameter name="handler" type="android.os.Handler">
+</parameter>
+</method>
+<method name="addAccountExplicitly"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="account" type="android.accounts.Account">
+</parameter>
+<parameter name="password" type="java.lang.String">
+</parameter>
+<parameter name="userdata" type="android.os.Bundle">
+</parameter>
+</method>
+<method name="addOnAccountsUpdatedListener"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="listener" type="android.accounts.OnAccountsUpdateListener">
+</parameter>
+<parameter name="handler" type="android.os.Handler">
+</parameter>
+<parameter name="updateImmediately" type="boolean">
+</parameter>
+</method>
+<method name="blockingGetAuthToken"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="account" type="android.accounts.Account">
+</parameter>
+<parameter name="authTokenType" type="java.lang.String">
+</parameter>
+<parameter name="notifyAuthFailure" type="boolean">
+</parameter>
+<exception name="AuthenticatorException" type="android.accounts.AuthenticatorException">
+</exception>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+<exception name="OperationCanceledException" type="android.accounts.OperationCanceledException">
+</exception>
+</method>
+<method name="clearPassword"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="account" type="android.accounts.Account">
+</parameter>
+</method>
+<method name="confirmCredentials"
+ return="android.accounts.AccountManagerFuture&lt;android.os.Bundle&gt;"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="account" type="android.accounts.Account">
+</parameter>
+<parameter name="options" type="android.os.Bundle">
+</parameter>
+<parameter name="activity" type="android.app.Activity">
+</parameter>
+<parameter name="callback" type="android.accounts.AccountManagerCallback&lt;android.os.Bundle&gt;">
+</parameter>
+<parameter name="handler" type="android.os.Handler">
+</parameter>
+</method>
+<method name="editProperties"
+ return="android.accounts.AccountManagerFuture&lt;android.os.Bundle&gt;"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="accountType" type="java.lang.String">
+</parameter>
+<parameter name="activity" type="android.app.Activity">
+</parameter>
+<parameter name="callback" type="android.accounts.AccountManagerCallback&lt;android.os.Bundle&gt;">
+</parameter>
+<parameter name="handler" type="android.os.Handler">
+</parameter>
+</method>
+<method name="get"
+ return="android.accounts.AccountManager"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="context" type="android.content.Context">
+</parameter>
+</method>
+<method name="getAccounts"
+ return="android.accounts.Account[]"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getAccountsByType"
+ return="android.accounts.Account[]"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="type" type="java.lang.String">
+</parameter>
+</method>
+<method name="getAccountsByTypeAndFeatures"
+ return="android.accounts.AccountManagerFuture&lt;android.accounts.Account[]&gt;"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="type" type="java.lang.String">
+</parameter>
+<parameter name="features" type="java.lang.String[]">
+</parameter>
+<parameter name="callback" type="android.accounts.AccountManagerCallback&lt;android.accounts.Account[]&gt;">
+</parameter>
+<parameter name="handler" type="android.os.Handler">
+</parameter>
+</method>
+<method name="getAuthToken"
+ return="android.accounts.AccountManagerFuture&lt;android.os.Bundle&gt;"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="account" type="android.accounts.Account">
+</parameter>
+<parameter name="authTokenType" type="java.lang.String">
+</parameter>
+<parameter name="options" type="android.os.Bundle">
+</parameter>
+<parameter name="activity" type="android.app.Activity">
+</parameter>
+<parameter name="callback" type="android.accounts.AccountManagerCallback&lt;android.os.Bundle&gt;">
+</parameter>
+<parameter name="handler" type="android.os.Handler">
+</parameter>
+</method>
+<method name="getAuthToken"
+ return="android.accounts.AccountManagerFuture&lt;android.os.Bundle&gt;"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="account" type="android.accounts.Account">
+</parameter>
+<parameter name="authTokenType" type="java.lang.String">
+</parameter>
+<parameter name="notifyAuthFailure" type="boolean">
+</parameter>
+<parameter name="callback" type="android.accounts.AccountManagerCallback&lt;android.os.Bundle&gt;">
+</parameter>
+<parameter name="handler" type="android.os.Handler">
+</parameter>
+</method>
+<method name="getAuthTokenByFeatures"
+ return="android.accounts.AccountManagerFuture&lt;android.os.Bundle&gt;"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="accountType" type="java.lang.String">
+</parameter>
+<parameter name="authTokenType" type="java.lang.String">
+</parameter>
+<parameter name="features" type="java.lang.String[]">
+</parameter>
+<parameter name="activity" type="android.app.Activity">
+</parameter>
+<parameter name="addAccountOptions" type="android.os.Bundle">
+</parameter>
+<parameter name="getAuthTokenOptions" type="android.os.Bundle">
+</parameter>
+<parameter name="callback" type="android.accounts.AccountManagerCallback&lt;android.os.Bundle&gt;">
+</parameter>
+<parameter name="handler" type="android.os.Handler">
+</parameter>
+</method>
+<method name="getAuthenticatorTypes"
+ return="android.accounts.AuthenticatorDescription[]"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getPassword"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="account" type="android.accounts.Account">
+</parameter>
+</method>
+<method name="getUserData"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="account" type="android.accounts.Account">
+</parameter>
+<parameter name="key" type="java.lang.String">
+</parameter>
+</method>
+<method name="hasFeatures"
+ return="android.accounts.AccountManagerFuture&lt;java.lang.Boolean&gt;"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="account" type="android.accounts.Account">
+</parameter>
+<parameter name="features" type="java.lang.String[]">
+</parameter>
+<parameter name="callback" type="android.accounts.AccountManagerCallback&lt;java.lang.Boolean&gt;">
+</parameter>
+<parameter name="handler" type="android.os.Handler">
+</parameter>
+</method>
+<method name="invalidateAuthToken"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="accountType" type="java.lang.String">
+</parameter>
+<parameter name="authToken" type="java.lang.String">
+</parameter>
+</method>
+<method name="peekAuthToken"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="account" type="android.accounts.Account">
+</parameter>
+<parameter name="authTokenType" type="java.lang.String">
+</parameter>
+</method>
+<method name="removeAccount"
+ return="android.accounts.AccountManagerFuture&lt;java.lang.Boolean&gt;"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="account" type="android.accounts.Account">
+</parameter>
+<parameter name="callback" type="android.accounts.AccountManagerCallback&lt;java.lang.Boolean&gt;">
+</parameter>
+<parameter name="handler" type="android.os.Handler">
+</parameter>
+</method>
+<method name="removeOnAccountsUpdatedListener"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="listener" type="android.accounts.OnAccountsUpdateListener">
+</parameter>
+</method>
+<method name="setAuthToken"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="account" type="android.accounts.Account">
+</parameter>
+<parameter name="authTokenType" type="java.lang.String">
+</parameter>
+<parameter name="authToken" type="java.lang.String">
+</parameter>
+</method>
+<method name="setPassword"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="account" type="android.accounts.Account">
+</parameter>
+<parameter name="password" type="java.lang.String">
+</parameter>
+</method>
+<method name="setUserData"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="account" type="android.accounts.Account">
+</parameter>
+<parameter name="key" type="java.lang.String">
+</parameter>
+<parameter name="value" type="java.lang.String">
+</parameter>
+</method>
+<method name="updateCredentials"
+ return="android.accounts.AccountManagerFuture&lt;android.os.Bundle&gt;"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="account" type="android.accounts.Account">
+</parameter>
+<parameter name="authTokenType" type="java.lang.String">
+</parameter>
+<parameter name="options" type="android.os.Bundle">
+</parameter>
+<parameter name="activity" type="android.app.Activity">
+</parameter>
+<parameter name="callback" type="android.accounts.AccountManagerCallback&lt;android.os.Bundle&gt;">
+</parameter>
+<parameter name="handler" type="android.os.Handler">
+</parameter>
+</method>
+<field name="ACTION_AUTHENTICATOR_INTENT"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.accounts.AccountAuthenticator&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="AUTHENTICATOR_ATTRIBUTES_NAME"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;account-authenticator&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="AUTHENTICATOR_META_DATA_NAME"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.accounts.AccountAuthenticator&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ERROR_CODE_BAD_ARGUMENTS"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="7"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ERROR_CODE_BAD_REQUEST"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="8"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ERROR_CODE_CANCELED"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="4"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ERROR_CODE_INVALID_RESPONSE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="5"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ERROR_CODE_NETWORK_ERROR"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="3"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ERROR_CODE_REMOTE_EXCEPTION"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ERROR_CODE_UNSUPPORTED_OPERATION"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="6"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="KEY_ACCOUNTS"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;accounts&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="KEY_ACCOUNT_AUTHENTICATOR_RESPONSE"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;accountAuthenticatorResponse&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="KEY_ACCOUNT_MANAGER_RESPONSE"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;accountManagerResponse&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="KEY_ACCOUNT_NAME"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;authAccount&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="KEY_ACCOUNT_TYPE"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;accountType&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="KEY_AUTHENTICATOR_TYPES"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;authenticator_types&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="KEY_AUTHTOKEN"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;authtoken&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="KEY_AUTH_FAILED_MESSAGE"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;authFailedMessage&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="KEY_AUTH_TOKEN_LABEL"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;authTokenLabelKey&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="KEY_BOOLEAN_RESULT"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;booleanResult&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="KEY_ERROR_CODE"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;errorCode&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="KEY_ERROR_MESSAGE"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;errorMessage&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="KEY_INTENT"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;intent&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="KEY_PASSWORD"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;password&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="KEY_USERDATA"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;userdata&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="LOGIN_ACCOUNTS_CHANGED_ACTION"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.accounts.LOGIN_ACCOUNTS_CHANGED&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<interface name="AccountManagerCallback"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="run"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="future" type="android.accounts.AccountManagerFuture&lt;V&gt;">
+</parameter>
+</method>
+</interface>
+<interface name="AccountManagerFuture"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="cancel"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="mayInterruptIfRunning" type="boolean">
+</parameter>
+</method>
+<method name="getResult"
+ return="V"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="AuthenticatorException" type="android.accounts.AuthenticatorException">
+</exception>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+<exception name="OperationCanceledException" type="android.accounts.OperationCanceledException">
+</exception>
+</method>
+<method name="getResult"
+ return="V"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="timeout" type="long">
+</parameter>
+<parameter name="unit" type="java.util.concurrent.TimeUnit">
+</parameter>
+<exception name="AuthenticatorException" type="android.accounts.AuthenticatorException">
+</exception>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+<exception name="OperationCanceledException" type="android.accounts.OperationCanceledException">
+</exception>
+</method>
+<method name="isCancelled"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isDone"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+</interface>
+<class name="AccountsException"
+ extends="java.lang.Exception"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="AccountsException"
+ type="android.accounts.AccountsException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<constructor name="AccountsException"
+ type="android.accounts.AccountsException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="message" type="java.lang.String">
+</parameter>
+</constructor>
+<constructor name="AccountsException"
+ type="android.accounts.AccountsException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="message" type="java.lang.String">
+</parameter>
+<parameter name="cause" type="java.lang.Throwable">
+</parameter>
+</constructor>
+<constructor name="AccountsException"
+ type="android.accounts.AccountsException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="cause" type="java.lang.Throwable">
+</parameter>
+</constructor>
+</class>
+<class name="AuthenticatorDescription"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="android.os.Parcelable">
+</implements>
+<constructor name="AuthenticatorDescription"
+ type="android.accounts.AuthenticatorDescription"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="type" type="java.lang.String">
+</parameter>
+<parameter name="packageName" type="java.lang.String">
+</parameter>
+<parameter name="labelId" type="int">
+</parameter>
+<parameter name="iconId" type="int">
+</parameter>
+<parameter name="smallIconId" type="int">
+</parameter>
+<parameter name="prefId" type="int">
+</parameter>
+</constructor>
+<method name="describeContents"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="newKey"
+ return="android.accounts.AuthenticatorDescription"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="type" type="java.lang.String">
+</parameter>
+</method>
+<method name="writeToParcel"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="dest" type="android.os.Parcel">
+</parameter>
+<parameter name="flags" type="int">
+</parameter>
+</method>
+<field name="CREATOR"
+ type="android.os.Parcelable.Creator"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="accountPreferencesId"
+ type="int"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="iconId"
+ type="int"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="labelId"
+ type="int"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="packageName"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="smallIconId"
+ type="int"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="type"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<class name="AuthenticatorException"
+ extends="android.accounts.AccountsException"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="AuthenticatorException"
+ type="android.accounts.AuthenticatorException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<constructor name="AuthenticatorException"
+ type="android.accounts.AuthenticatorException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="message" type="java.lang.String">
+</parameter>
+</constructor>
+<constructor name="AuthenticatorException"
+ type="android.accounts.AuthenticatorException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="message" type="java.lang.String">
+</parameter>
+<parameter name="cause" type="java.lang.Throwable">
+</parameter>
+</constructor>
+<constructor name="AuthenticatorException"
+ type="android.accounts.AuthenticatorException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="cause" type="java.lang.Throwable">
+</parameter>
+</constructor>
+</class>
+<class name="NetworkErrorException"
+ extends="android.accounts.AccountsException"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="NetworkErrorException"
+ type="android.accounts.NetworkErrorException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<constructor name="NetworkErrorException"
+ type="android.accounts.NetworkErrorException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="message" type="java.lang.String">
+</parameter>
+</constructor>
+<constructor name="NetworkErrorException"
+ type="android.accounts.NetworkErrorException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="message" type="java.lang.String">
+</parameter>
+<parameter name="cause" type="java.lang.Throwable">
+</parameter>
+</constructor>
+<constructor name="NetworkErrorException"
+ type="android.accounts.NetworkErrorException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="cause" type="java.lang.Throwable">
+</parameter>
+</constructor>
+</class>
+<interface name="OnAccountsUpdateListener"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="onAccountsUpdated"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="accounts" type="android.accounts.Account[]">
+</parameter>
+</method>
+</interface>
+<class name="OperationCanceledException"
+ extends="android.accounts.AccountsException"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="OperationCanceledException"
+ type="android.accounts.OperationCanceledException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<constructor name="OperationCanceledException"
+ type="android.accounts.OperationCanceledException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="message" type="java.lang.String">
+</parameter>
+</constructor>
+<constructor name="OperationCanceledException"
+ type="android.accounts.OperationCanceledException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="message" type="java.lang.String">
+</parameter>
+<parameter name="cause" type="java.lang.Throwable">
+</parameter>
+</constructor>
+<constructor name="OperationCanceledException"
+ type="android.accounts.OperationCanceledException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="cause" type="java.lang.Throwable">
+</parameter>
+</constructor>
+</class>
+</package>
+<package name="android.app"
+>
+<class name="Activity"
+ extends="android.view.ContextThemeWrapper"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="android.content.ComponentCallbacks">
+</implements>
+<implements name="android.view.KeyEvent.Callback">
+</implements>
+<implements name="android.view.LayoutInflater.Factory">
+</implements>
+<implements name="android.view.View.OnCreateContextMenuListener">
+</implements>
+<implements name="android.view.Window.Callback">
+</implements>
+<constructor name="Activity"
+ type="android.app.Activity"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<method name="addContentView"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="view" type="android.view.View">
+</parameter>
+<parameter name="params" type="android.view.ViewGroup.LayoutParams">
+</parameter>
+</method>
+<method name="closeContextMenu"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="closeOptionsMenu"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="createPendingResult"
+ return="android.app.PendingIntent"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="requestCode" type="int">
+</parameter>
+<parameter name="data" type="android.content.Intent">
+</parameter>
+<parameter name="flags" type="int">
+</parameter>
+</method>
+<method name="dismissDialog"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="id" type="int">
+</parameter>
+</method>
+<method name="dispatchKeyEvent"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="event" type="android.view.KeyEvent">
+</parameter>
+</method>
+<method name="dispatchPopulateAccessibilityEvent"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="event" type="android.view.accessibility.AccessibilityEvent">
+</parameter>
+</method>
+<method name="dispatchTouchEvent"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="ev" type="android.view.MotionEvent">
+</parameter>
+</method>
+<method name="dispatchTrackballEvent"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="ev" type="android.view.MotionEvent">
+</parameter>
+</method>
+<method name="findViewById"
+ return="android.view.View"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="id" type="int">
+</parameter>
+</method>
+<method name="finish"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="finishActivity"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="requestCode" type="int">
+</parameter>
+</method>
+<method name="finishActivityFromChild"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="child" type="android.app.Activity">
+</parameter>
+<parameter name="requestCode" type="int">
+</parameter>
+</method>
+<method name="finishFromChild"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="child" type="android.app.Activity">
+</parameter>
+</method>
+<method name="getApplication"
+ return="android.app.Application"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getCallingActivity"
+ return="android.content.ComponentName"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getCallingPackage"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getChangingConfigurations"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getComponentName"
+ return="android.content.ComponentName"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getCurrentFocus"
+ return="android.view.View"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getInstanceCount"
+ return="long"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getIntent"
+ return="android.content.Intent"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getLastNonConfigurationInstance"
+ return="java.lang.Object"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getLayoutInflater"
+ return="android.view.LayoutInflater"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getLocalClassName"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getMenuInflater"
+ return="android.view.MenuInflater"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getParent"
+ return="android.app.Activity"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getPreferences"
+ return="android.content.SharedPreferences"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="mode" type="int">
+</parameter>
+</method>
+<method name="getRequestedOrientation"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getTaskId"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getTitle"
+ return="java.lang.CharSequence"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getTitleColor"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getVolumeControlStream"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getWindow"
+ return="android.view.Window"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getWindowManager"
+ return="android.view.WindowManager"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="hasWindowFocus"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isChild"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isFinishing"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isTaskRoot"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="managedQuery"
+ return="android.database.Cursor"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="uri" type="android.net.Uri">
+</parameter>
+<parameter name="projection" type="java.lang.String[]">
+</parameter>
+<parameter name="selection" type="java.lang.String">
+</parameter>
+<parameter name="selectionArgs" type="java.lang.String[]">
+</parameter>
+<parameter name="sortOrder" type="java.lang.String">
+</parameter>
+</method>
+<method name="moveTaskToBack"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="nonRoot" type="boolean">
+</parameter>
+</method>
+<method name="onActivityResult"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="requestCode" type="int">
+</parameter>
+<parameter name="resultCode" type="int">
+</parameter>
+<parameter name="data" type="android.content.Intent">
+</parameter>
+</method>
+<method name="onAttachedToWindow"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="onBackPressed"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="onChildTitleChanged"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="childActivity" type="android.app.Activity">
+</parameter>
+<parameter name="title" type="java.lang.CharSequence">
+</parameter>
+</method>
+<method name="onConfigurationChanged"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="newConfig" type="android.content.res.Configuration">
+</parameter>
+</method>
+<method name="onContentChanged"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="onContextItemSelected"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="item" type="android.view.MenuItem">
+</parameter>
+</method>
+<method name="onContextMenuClosed"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="menu" type="android.view.Menu">
+</parameter>
+</method>
+<method name="onCreate"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="savedInstanceState" type="android.os.Bundle">
+</parameter>
+</method>
+<method name="onCreateContextMenu"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="menu" type="android.view.ContextMenu">
+</parameter>
+<parameter name="v" type="android.view.View">
+</parameter>
+<parameter name="menuInfo" type="android.view.ContextMenu.ContextMenuInfo">
+</parameter>
+</method>
+<method name="onCreateDescription"
+ return="java.lang.CharSequence"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="onCreateDialog"
+ return="android.app.Dialog"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="deprecated"
+ visibility="protected"
+>
+<parameter name="id" type="int">
+</parameter>
+</method>
+<method name="onCreateDialog"
+ return="android.app.Dialog"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="id" type="int">
+</parameter>
+<parameter name="args" type="android.os.Bundle">
+</parameter>
+</method>
+<method name="onCreateOptionsMenu"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="menu" type="android.view.Menu">
+</parameter>
+</method>
+<method name="onCreatePanelMenu"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="featureId" type="int">
+</parameter>
+<parameter name="menu" type="android.view.Menu">
+</parameter>
+</method>
+<method name="onCreatePanelView"
+ return="android.view.View"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="featureId" type="int">
+</parameter>
+</method>
+<method name="onCreateThumbnail"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="outBitmap" type="android.graphics.Bitmap">
+</parameter>
+<parameter name="canvas" type="android.graphics.Canvas">
+</parameter>
+</method>
+<method name="onCreateView"
+ return="android.view.View"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+<parameter name="context" type="android.content.Context">
+</parameter>
+<parameter name="attrs" type="android.util.AttributeSet">
+</parameter>
+</method>
+<method name="onDestroy"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</method>
+<method name="onDetachedFromWindow"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="onKeyDown"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="keyCode" type="int">
+</parameter>
+<parameter name="event" type="android.view.KeyEvent">
+</parameter>
+</method>
+<method name="onKeyLongPress"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="keyCode" type="int">
+</parameter>
+<parameter name="event" type="android.view.KeyEvent">
+</parameter>
+</method>
+<method name="onKeyMultiple"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="keyCode" type="int">
+</parameter>
+<parameter name="repeatCount" type="int">
+</parameter>
+<parameter name="event" type="android.view.KeyEvent">
+</parameter>
+</method>
+<method name="onKeyUp"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="keyCode" type="int">
+</parameter>
+<parameter name="event" type="android.view.KeyEvent">
+</parameter>
+</method>
+<method name="onLowMemory"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="onMenuItemSelected"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="featureId" type="int">
+</parameter>
+<parameter name="item" type="android.view.MenuItem">
+</parameter>
+</method>
+<method name="onMenuOpened"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="featureId" type="int">
+</parameter>
+<parameter name="menu" type="android.view.Menu">
+</parameter>
+</method>
+<method name="onNewIntent"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="intent" type="android.content.Intent">
+</parameter>
+</method>
+<method name="onOptionsItemSelected"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="item" type="android.view.MenuItem">
+</parameter>
+</method>
+<method name="onOptionsMenuClosed"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="menu" type="android.view.Menu">
+</parameter>
+</method>
+<method name="onPanelClosed"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="featureId" type="int">
+</parameter>
+<parameter name="menu" type="android.view.Menu">
+</parameter>
+</method>
+<method name="onPause"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</method>
+<method name="onPostCreate"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="savedInstanceState" type="android.os.Bundle">
+</parameter>
+</method>
+<method name="onPostResume"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</method>
+<method name="onPrepareDialog"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="deprecated"
+ visibility="protected"
+>
+<parameter name="id" type="int">
+</parameter>
+<parameter name="dialog" type="android.app.Dialog">
+</parameter>
+</method>
+<method name="onPrepareDialog"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="id" type="int">
+</parameter>
+<parameter name="dialog" type="android.app.Dialog">
+</parameter>
+<parameter name="args" type="android.os.Bundle">
+</parameter>
+</method>
+<method name="onPrepareOptionsMenu"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="menu" type="android.view.Menu">
+</parameter>
+</method>
+<method name="onPreparePanel"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="featureId" type="int">
+</parameter>
+<parameter name="view" type="android.view.View">
+</parameter>
+<parameter name="menu" type="android.view.Menu">
+</parameter>
+</method>
+<method name="onRestart"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</method>
+<method name="onRestoreInstanceState"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="savedInstanceState" type="android.os.Bundle">
+</parameter>
+</method>
+<method name="onResume"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</method>
+<method name="onRetainNonConfigurationInstance"
+ return="java.lang.Object"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="onSaveInstanceState"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="outState" type="android.os.Bundle">
+</parameter>
+</method>
+<method name="onSearchRequested"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="onStart"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</method>
+<method name="onStop"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</method>
+<method name="onTitleChanged"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="title" type="java.lang.CharSequence">
+</parameter>
+<parameter name="color" type="int">
+</parameter>
+</method>
+<method name="onTouchEvent"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="event" type="android.view.MotionEvent">
+</parameter>
+</method>
+<method name="onTrackballEvent"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="event" type="android.view.MotionEvent">
+</parameter>
+</method>
+<method name="onUserInteraction"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="onUserLeaveHint"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</method>
+<method name="onWindowAttributesChanged"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="params" type="android.view.WindowManager.LayoutParams">
+</parameter>
+</method>
+<method name="onWindowFocusChanged"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="hasFocus" type="boolean">
+</parameter>
+</method>
+<method name="openContextMenu"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="view" type="android.view.View">
+</parameter>
+</method>
+<method name="openOptionsMenu"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="overridePendingTransition"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="enterAnim" type="int">
+</parameter>
+<parameter name="exitAnim" type="int">
+</parameter>
+</method>
+<method name="registerForContextMenu"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="view" type="android.view.View">
+</parameter>
+</method>
+<method name="removeDialog"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="id" type="int">
+</parameter>
+</method>
+<method name="requestWindowFeature"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="featureId" type="int">
+</parameter>
+</method>
+<method name="runOnUiThread"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="action" type="java.lang.Runnable">
+</parameter>
+</method>
+<method name="setContentView"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="layoutResID" type="int">
+</parameter>
+</method>
+<method name="setContentView"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="view" type="android.view.View">
+</parameter>
+</method>
+<method name="setContentView"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="view" type="android.view.View">
+</parameter>
+<parameter name="params" type="android.view.ViewGroup.LayoutParams">
+</parameter>
+</method>
+<method name="setDefaultKeyMode"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="mode" type="int">
+</parameter>
+</method>
+<method name="setFeatureDrawable"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="featureId" type="int">
+</parameter>
+<parameter name="drawable" type="android.graphics.drawable.Drawable">
+</parameter>
+</method>
+<method name="setFeatureDrawableAlpha"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="featureId" type="int">
+</parameter>
+<parameter name="alpha" type="int">
+</parameter>
+</method>
+<method name="setFeatureDrawableResource"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="featureId" type="int">
+</parameter>
+<parameter name="resId" type="int">
+</parameter>
+</method>
+<method name="setFeatureDrawableUri"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="featureId" type="int">
+</parameter>
+<parameter name="uri" type="android.net.Uri">
+</parameter>
+</method>
+<method name="setIntent"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="newIntent" type="android.content.Intent">
+</parameter>
+</method>
+<method name="setPersistent"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="isPersistent" type="boolean">
+</parameter>
+</method>
+<method name="setProgress"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="progress" type="int">
+</parameter>
+</method>
+<method name="setProgressBarIndeterminate"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="indeterminate" type="boolean">
+</parameter>
+</method>
+<method name="setProgressBarIndeterminateVisibility"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="visible" type="boolean">
+</parameter>
+</method>
+<method name="setProgressBarVisibility"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="visible" type="boolean">
+</parameter>
+</method>
+<method name="setRequestedOrientation"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="requestedOrientation" type="int">
+</parameter>
+</method>
+<method name="setResult"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="resultCode" type="int">
+</parameter>
+</method>
+<method name="setResult"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="resultCode" type="int">
+</parameter>
+<parameter name="data" type="android.content.Intent">
+</parameter>
+</method>
+<method name="setSecondaryProgress"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="secondaryProgress" type="int">
+</parameter>
+</method>
+<method name="setTitle"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="title" type="java.lang.CharSequence">
+</parameter>
+</method>
+<method name="setTitle"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="titleId" type="int">
+</parameter>
+</method>
+<method name="setTitleColor"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="textColor" type="int">
+</parameter>
+</method>
+<method name="setVisible"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="visible" type="boolean">
+</parameter>
+</method>
+<method name="setVolumeControlStream"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="streamType" type="int">
+</parameter>
+</method>
+<method name="showDialog"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="id" type="int">
+</parameter>
+</method>
+<method name="showDialog"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="id" type="int">
+</parameter>
+<parameter name="args" type="android.os.Bundle">
+</parameter>
+</method>
+<method name="startActivityForResult"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="intent" type="android.content.Intent">
+</parameter>
+<parameter name="requestCode" type="int">
+</parameter>
+</method>
+<method name="startActivityFromChild"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="child" type="android.app.Activity">
+</parameter>
+<parameter name="intent" type="android.content.Intent">
+</parameter>
+<parameter name="requestCode" type="int">
+</parameter>
+</method>
+<method name="startActivityIfNeeded"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="intent" type="android.content.Intent">
+</parameter>
+<parameter name="requestCode" type="int">
+</parameter>
+</method>
+<method name="startIntentSenderForResult"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="intent" type="android.content.IntentSender">
+</parameter>
+<parameter name="requestCode" type="int">
+</parameter>
+<parameter name="fillInIntent" type="android.content.Intent">
+</parameter>
+<parameter name="flagsMask" type="int">
+</parameter>
+<parameter name="flagsValues" type="int">
+</parameter>
+<parameter name="extraFlags" type="int">
+</parameter>
+<exception name="IntentSender.SendIntentException" type="android.content.IntentSender.SendIntentException">
+</exception>
+</method>
+<method name="startIntentSenderFromChild"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="child" type="android.app.Activity">
+</parameter>
+<parameter name="intent" type="android.content.IntentSender">
+</parameter>
+<parameter name="requestCode" type="int">
+</parameter>
+<parameter name="fillInIntent" type="android.content.Intent">
+</parameter>
+<parameter name="flagsMask" type="int">
+</parameter>
+<parameter name="flagsValues" type="int">
+</parameter>
+<parameter name="extraFlags" type="int">
+</parameter>
+<exception name="IntentSender.SendIntentException" type="android.content.IntentSender.SendIntentException">
+</exception>
+</method>
+<method name="startManagingCursor"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="c" type="android.database.Cursor">
+</parameter>
+</method>
+<method name="startNextMatchingActivity"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="intent" type="android.content.Intent">
+</parameter>
+</method>
+<method name="startSearch"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="initialQuery" type="java.lang.String">
+</parameter>
+<parameter name="selectInitialQuery" type="boolean">
+</parameter>
+<parameter name="appSearchData" type="android.os.Bundle">
+</parameter>
+<parameter name="globalSearch" type="boolean">
+</parameter>
+</method>
+<method name="stopManagingCursor"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="c" type="android.database.Cursor">
+</parameter>
+</method>
+<method name="takeKeyEvents"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="get" type="boolean">
+</parameter>
+</method>
+<method name="triggerSearch"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="query" type="java.lang.String">
+</parameter>
+<parameter name="appSearchData" type="android.os.Bundle">
+</parameter>
+</method>
+<method name="unregisterForContextMenu"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="view" type="android.view.View">
+</parameter>
+</method>
+<field name="DEFAULT_KEYS_DIALER"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="DEFAULT_KEYS_DISABLE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="0"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="DEFAULT_KEYS_SEARCH_GLOBAL"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="4"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="DEFAULT_KEYS_SEARCH_LOCAL"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="3"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="DEFAULT_KEYS_SHORTCUT"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="FOCUSED_STATE_SET"
+ type="int[]"
+ transient="false"
+ volatile="false"
+ value="null"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</field>
+<field name="RESULT_CANCELED"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="0"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="RESULT_FIRST_USER"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="RESULT_OK"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="-1"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<class name="ActivityGroup"
+ extends="android.app.Activity"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="ActivityGroup"
+ type="android.app.ActivityGroup"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<constructor name="ActivityGroup"
+ type="android.app.ActivityGroup"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="singleActivityMode" type="boolean">
+</parameter>
+</constructor>
+<method name="getCurrentActivity"
+ return="android.app.Activity"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getLocalActivityManager"
+ return="android.app.LocalActivityManager"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+</class>
+<class name="ActivityManager"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="getDeviceConfigurationInfo"
+ return="android.content.pm.ConfigurationInfo"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getMemoryClass"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getMemoryInfo"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="outInfo" type="android.app.ActivityManager.MemoryInfo">
+</parameter>
+</method>
+<method name="getProcessMemoryInfo"
+ return="android.os.Debug.MemoryInfo[]"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="pids" type="int[]">
+</parameter>
+</method>
+<method name="getProcessesInErrorState"
+ return="java.util.List&lt;android.app.ActivityManager.ProcessErrorStateInfo&gt;"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getRecentTasks"
+ return="java.util.List&lt;android.app.ActivityManager.RecentTaskInfo&gt;"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="maxNum" type="int">
+</parameter>
+<parameter name="flags" type="int">
+</parameter>
+<exception name="SecurityException" type="java.lang.SecurityException">
+</exception>
+</method>
+<method name="getRunningAppProcesses"
+ return="java.util.List&lt;android.app.ActivityManager.RunningAppProcessInfo&gt;"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getRunningServiceControlPanel"
+ return="android.app.PendingIntent"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="service" type="android.content.ComponentName">
+</parameter>
+<exception name="SecurityException" type="java.lang.SecurityException">
+</exception>
+</method>
+<method name="getRunningServices"
+ return="java.util.List&lt;android.app.ActivityManager.RunningServiceInfo&gt;"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="maxNum" type="int">
+</parameter>
+<exception name="SecurityException" type="java.lang.SecurityException">
+</exception>
+</method>
+<method name="getRunningTasks"
+ return="java.util.List&lt;android.app.ActivityManager.RunningTaskInfo&gt;"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="maxNum" type="int">
+</parameter>
+<exception name="SecurityException" type="java.lang.SecurityException">
+</exception>
+</method>
+<method name="isUserAMonkey"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="killBackgroundProcesses"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="packageName" type="java.lang.String">
+</parameter>
+</method>
+<method name="restartPackage"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="deprecated"
+ visibility="public"
+>
+<parameter name="packageName" type="java.lang.String">
+</parameter>
+</method>
+<field name="RECENT_WITH_EXCLUDED"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<class name="ActivityManager.MemoryInfo"
+ extends="java.lang.Object"
+ abstract="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="android.os.Parcelable">
+</implements>
+<constructor name="ActivityManager.MemoryInfo"
+ type="android.app.ActivityManager.MemoryInfo"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<method name="describeContents"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="readFromParcel"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="source" type="android.os.Parcel">
+</parameter>
+</method>
+<method name="writeToParcel"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="dest" type="android.os.Parcel">
+</parameter>
+<parameter name="flags" type="int">
+</parameter>
+</method>
+<field name="CREATOR"
+ type="android.os.Parcelable.Creator"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="availMem"
+ type="long"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="lowMemory"
+ type="boolean"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="threshold"
+ type="long"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<class name="ActivityManager.ProcessErrorStateInfo"
+ extends="java.lang.Object"
+ abstract="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="android.os.Parcelable">
+</implements>
+<constructor name="ActivityManager.ProcessErrorStateInfo"
+ type="android.app.ActivityManager.ProcessErrorStateInfo"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<method name="describeContents"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="readFromParcel"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="source" type="android.os.Parcel">
+</parameter>
+</method>
+<method name="writeToParcel"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="dest" type="android.os.Parcel">
+</parameter>
+<parameter name="flags" type="int">
+</parameter>
+</method>
+<field name="CRASHED"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="CREATOR"
+ type="android.os.Parcelable.Creator"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="NOT_RESPONDING"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="NO_ERROR"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="0"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="condition"
+ type="int"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="crashData"
+ type="byte[]"
+ transient="false"
+ volatile="false"
+ value="null"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="longMsg"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="pid"
+ type="int"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="processName"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="shortMsg"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="stackTrace"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="tag"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="uid"
+ type="int"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<class name="ActivityManager.RecentTaskInfo"
+ extends="java.lang.Object"
+ abstract="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="android.os.Parcelable">
+</implements>
+<constructor name="ActivityManager.RecentTaskInfo"
+ type="android.app.ActivityManager.RecentTaskInfo"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<method name="describeContents"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="readFromParcel"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="source" type="android.os.Parcel">
+</parameter>
+</method>
+<method name="writeToParcel"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="dest" type="android.os.Parcel">
+</parameter>
+<parameter name="flags" type="int">
+</parameter>
+</method>
+<field name="CREATOR"
+ type="android.os.Parcelable.Creator"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="baseIntent"
+ type="android.content.Intent"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="id"
+ type="int"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="origActivity"
+ type="android.content.ComponentName"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<class name="ActivityManager.RunningAppProcessInfo"
+ extends="java.lang.Object"
+ abstract="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="android.os.Parcelable">
+</implements>
+<constructor name="ActivityManager.RunningAppProcessInfo"
+ type="android.app.ActivityManager.RunningAppProcessInfo"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<constructor name="ActivityManager.RunningAppProcessInfo"
+ type="android.app.ActivityManager.RunningAppProcessInfo"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="pProcessName" type="java.lang.String">
+</parameter>
+<parameter name="pPid" type="int">
+</parameter>
+<parameter name="pArr" type="java.lang.String[]">
+</parameter>
+</constructor>
+<method name="describeContents"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="readFromParcel"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="source" type="android.os.Parcel">
+</parameter>
+</method>
+<method name="writeToParcel"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="dest" type="android.os.Parcel">
+</parameter>
+<parameter name="flags" type="int">
+</parameter>
+</method>
+<field name="CREATOR"
+ type="android.os.Parcelable.Creator"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="IMPORTANCE_BACKGROUND"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="400"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="IMPORTANCE_EMPTY"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="500"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="IMPORTANCE_FOREGROUND"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="100"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="IMPORTANCE_SERVICE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="300"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="IMPORTANCE_VISIBLE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="200"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="REASON_PROVIDER_IN_USE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="REASON_SERVICE_IN_USE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="REASON_UNKNOWN"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="0"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="importance"
+ type="int"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="importanceReasonCode"
+ type="int"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="importanceReasonComponent"
+ type="android.content.ComponentName"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="importanceReasonPid"
+ type="int"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="lru"
+ type="int"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="pid"
+ type="int"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="pkgList"
+ type="java.lang.String[]"
+ transient="false"
+ volatile="false"
+ value="null"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="processName"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="uid"
+ type="int"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<class name="ActivityManager.RunningServiceInfo"
+ extends="java.lang.Object"
+ abstract="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="android.os.Parcelable">
+</implements>
+<constructor name="ActivityManager.RunningServiceInfo"
+ type="android.app.ActivityManager.RunningServiceInfo"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<method name="describeContents"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="readFromParcel"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="source" type="android.os.Parcel">
+</parameter>
+</method>
+<method name="writeToParcel"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="dest" type="android.os.Parcel">
+</parameter>
+<parameter name="flags" type="int">
+</parameter>
+</method>
+<field name="CREATOR"
+ type="android.os.Parcelable.Creator"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="FLAG_FOREGROUND"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="FLAG_PERSISTENT_PROCESS"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="8"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="FLAG_STARTED"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="FLAG_SYSTEM_PROCESS"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="4"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="activeSince"
+ type="long"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="clientCount"
+ type="int"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="clientLabel"
+ type="int"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="clientPackage"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="crashCount"
+ type="int"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="flags"
+ type="int"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="foreground"
+ type="boolean"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="lastActivityTime"
+ type="long"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="pid"
+ type="int"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="process"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="restarting"
+ type="long"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="service"
+ type="android.content.ComponentName"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="started"
+ type="boolean"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="uid"
+ type="int"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<class name="ActivityManager.RunningTaskInfo"
+ extends="java.lang.Object"
+ abstract="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="android.os.Parcelable">
+</implements>
+<constructor name="ActivityManager.RunningTaskInfo"
+ type="android.app.ActivityManager.RunningTaskInfo"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<method name="describeContents"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="readFromParcel"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="source" type="android.os.Parcel">
+</parameter>
+</method>
+<method name="writeToParcel"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="dest" type="android.os.Parcel">
+</parameter>
+<parameter name="flags" type="int">
+</parameter>
+</method>
+<field name="CREATOR"
+ type="android.os.Parcelable.Creator"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="baseActivity"
+ type="android.content.ComponentName"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="description"
+ type="java.lang.CharSequence"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="id"
+ type="int"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="numActivities"
+ type="int"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="numRunning"
+ type="int"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="thumbnail"
+ type="android.graphics.Bitmap"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="topActivity"
+ type="android.content.ComponentName"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<class name="AlarmManager"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="cancel"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="operation" type="android.app.PendingIntent">
+</parameter>
+</method>
+<method name="set"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="type" type="int">
+</parameter>
+<parameter name="triggerAtTime" type="long">
+</parameter>
+<parameter name="operation" type="android.app.PendingIntent">
+</parameter>
+</method>
+<method name="setInexactRepeating"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="type" type="int">
+</parameter>
+<parameter name="triggerAtTime" type="long">
+</parameter>
+<parameter name="interval" type="long">
+</parameter>
+<parameter name="operation" type="android.app.PendingIntent">
+</parameter>
+</method>
+<method name="setRepeating"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="type" type="int">
+</parameter>
+<parameter name="triggerAtTime" type="long">
+</parameter>
+<parameter name="interval" type="long">
+</parameter>
+<parameter name="operation" type="android.app.PendingIntent">
+</parameter>
+</method>
+<method name="setTime"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="millis" type="long">
+</parameter>
+</method>
+<method name="setTimeZone"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="timeZone" type="java.lang.String">
+</parameter>
+</method>
+<field name="ELAPSED_REALTIME"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="3"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ELAPSED_REALTIME_WAKEUP"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="INTERVAL_DAY"
+ type="long"
+ transient="false"
+ volatile="false"
+ value="86400000L"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="INTERVAL_FIFTEEN_MINUTES"
+ type="long"
+ transient="false"
+ volatile="false"
+ value="900000L"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="INTERVAL_HALF_DAY"
+ type="long"
+ transient="false"
+ volatile="false"
+ value="43200000L"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="INTERVAL_HALF_HOUR"
+ type="long"
+ transient="false"
+ volatile="false"
+ value="1800000L"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="INTERVAL_HOUR"
+ type="long"
+ transient="false"
+ volatile="false"
+ value="3600000L"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="RTC"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="RTC_WAKEUP"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="0"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<class name="AlertDialog"
+ extends="android.app.Dialog"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="android.content.DialogInterface">
+</implements>
+<constructor name="AlertDialog"
+ type="android.app.AlertDialog"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="context" type="android.content.Context">
+</parameter>
+</constructor>
+<constructor name="AlertDialog"
+ type="android.app.AlertDialog"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="context" type="android.content.Context">
+</parameter>
+<parameter name="theme" type="int">
+</parameter>
+</constructor>
+<constructor name="AlertDialog"
+ type="android.app.AlertDialog"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="context" type="android.content.Context">
+</parameter>
+<parameter name="cancelable" type="boolean">
+</parameter>
+<parameter name="cancelListener" type="android.content.DialogInterface.OnCancelListener">
+</parameter>
+</constructor>
+<method name="getButton"
+ return="android.widget.Button"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="whichButton" type="int">
+</parameter>
+</method>
+<method name="getListView"
+ return="android.widget.ListView"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="setButton"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="whichButton" type="int">
+</parameter>
+<parameter name="text" type="java.lang.CharSequence">
+</parameter>
+<parameter name="msg" type="android.os.Message">
+</parameter>
+</method>
+<method name="setButton"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="whichButton" type="int">
+</parameter>
+<parameter name="text" type="java.lang.CharSequence">
+</parameter>
+<parameter name="listener" type="android.content.DialogInterface.OnClickListener">
+</parameter>
+</method>
+<method name="setButton"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="deprecated"
+ visibility="public"
+>
+<parameter name="text" type="java.lang.CharSequence">
+</parameter>
+<parameter name="msg" type="android.os.Message">
+</parameter>
+</method>
+<method name="setButton"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="deprecated"
+ visibility="public"
+>
+<parameter name="text" type="java.lang.CharSequence">
+</parameter>
+<parameter name="listener" type="android.content.DialogInterface.OnClickListener">
+</parameter>
+</method>
+<method name="setButton2"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="deprecated"
+ visibility="public"
+>
+<parameter name="text" type="java.lang.CharSequence">
+</parameter>
+<parameter name="msg" type="android.os.Message">
+</parameter>
+</method>
+<method name="setButton2"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="deprecated"
+ visibility="public"
+>
+<parameter name="text" type="java.lang.CharSequence">
+</parameter>
+<parameter name="listener" type="android.content.DialogInterface.OnClickListener">
+</parameter>
+</method>
+<method name="setButton3"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="deprecated"
+ visibility="public"
+>
+<parameter name="text" type="java.lang.CharSequence">
+</parameter>
+<parameter name="msg" type="android.os.Message">
+</parameter>
+</method>
+<method name="setButton3"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="deprecated"
+ visibility="public"
+>
+<parameter name="text" type="java.lang.CharSequence">
+</parameter>
+<parameter name="listener" type="android.content.DialogInterface.OnClickListener">
+</parameter>
+</method>
+<method name="setCustomTitle"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="customTitleView" type="android.view.View">
+</parameter>
+</method>
+<method name="setIcon"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="resId" type="int">
+</parameter>
+</method>
+<method name="setIcon"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="icon" type="android.graphics.drawable.Drawable">
+</parameter>
+</method>
+<method name="setInverseBackgroundForced"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="forceInverseBackground" type="boolean">
+</parameter>
+</method>
+<method name="setMessage"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="message" type="java.lang.CharSequence">
+</parameter>
+</method>
+<method name="setView"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="view" type="android.view.View">
+</parameter>
+</method>
+<method name="setView"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="view" type="android.view.View">
+</parameter>
+<parameter name="viewSpacingLeft" type="int">
+</parameter>
+<parameter name="viewSpacingTop" type="int">
+</parameter>
+<parameter name="viewSpacingRight" type="int">
+</parameter>
+<parameter name="viewSpacingBottom" type="int">
+</parameter>
+</method>
+</class>
+<class name="AlertDialog.Builder"
+ extends="java.lang.Object"
+ abstract="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="AlertDialog.Builder"
+ type="android.app.AlertDialog.Builder"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="context" type="android.content.Context">
+</parameter>
+</constructor>
+<method name="create"
+ return="android.app.AlertDialog"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="setAdapter"
+ return="android.app.AlertDialog.Builder"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="adapter" type="android.widget.ListAdapter">
+</parameter>
+<parameter name="listener" type="android.content.DialogInterface.OnClickListener">
+</parameter>
+</method>
+<method name="setCancelable"
+ return="android.app.AlertDialog.Builder"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="cancelable" type="boolean">
+</parameter>
+</method>
+<method name="setCursor"
+ return="android.app.AlertDialog.Builder"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="cursor" type="android.database.Cursor">
+</parameter>
+<parameter name="listener" type="android.content.DialogInterface.OnClickListener">
+</parameter>
+<parameter name="labelColumn" type="java.lang.String">
+</parameter>
+</method>
+<method name="setCustomTitle"
+ return="android.app.AlertDialog.Builder"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="customTitleView" type="android.view.View">
+</parameter>
+</method>
+<method name="setIcon"
+ return="android.app.AlertDialog.Builder"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="iconId" type="int">
+</parameter>
+</method>
+<method name="setIcon"
+ return="android.app.AlertDialog.Builder"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="icon" type="android.graphics.drawable.Drawable">
+</parameter>
+</method>
+<method name="setInverseBackgroundForced"
+ return="android.app.AlertDialog.Builder"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="useInverseBackground" type="boolean">
+</parameter>
+</method>
+<method name="setItems"
+ return="android.app.AlertDialog.Builder"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="itemsId" type="int">
+</parameter>
+<parameter name="listener" type="android.content.DialogInterface.OnClickListener">
+</parameter>
+</method>
+<method name="setItems"
+ return="android.app.AlertDialog.Builder"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="items" type="java.lang.CharSequence[]">
+</parameter>
+<parameter name="listener" type="android.content.DialogInterface.OnClickListener">
+</parameter>
+</method>
+<method name="setMessage"
+ return="android.app.AlertDialog.Builder"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="messageId" type="int">
+</parameter>
+</method>
+<method name="setMessage"
+ return="android.app.AlertDialog.Builder"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="message" type="java.lang.CharSequence">
+</parameter>
+</method>
+<method name="setMultiChoiceItems"
+ return="android.app.AlertDialog.Builder"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="itemsId" type="int">
+</parameter>
+<parameter name="checkedItems" type="boolean[]">
+</parameter>
+<parameter name="listener" type="android.content.DialogInterface.OnMultiChoiceClickListener">
+</parameter>
+</method>
+<method name="setMultiChoiceItems"
+ return="android.app.AlertDialog.Builder"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="items" type="java.lang.CharSequence[]">
+</parameter>
+<parameter name="checkedItems" type="boolean[]">
+</parameter>
+<parameter name="listener" type="android.content.DialogInterface.OnMultiChoiceClickListener">
+</parameter>
+</method>
+<method name="setMultiChoiceItems"
+ return="android.app.AlertDialog.Builder"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="cursor" type="android.database.Cursor">
+</parameter>
+<parameter name="isCheckedColumn" type="java.lang.String">
+</parameter>
+<parameter name="labelColumn" type="java.lang.String">
+</parameter>
+<parameter name="listener" type="android.content.DialogInterface.OnMultiChoiceClickListener">
+</parameter>
+</method>
+<method name="setNegativeButton"
+ return="android.app.AlertDialog.Builder"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="textId" type="int">
+</parameter>
+<parameter name="listener" type="android.content.DialogInterface.OnClickListener">
+</parameter>
+</method>
+<method name="setNegativeButton"
+ return="android.app.AlertDialog.Builder"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="text" type="java.lang.CharSequence">
+</parameter>
+<parameter name="listener" type="android.content.DialogInterface.OnClickListener">
+</parameter>
+</method>
+<method name="setNeutralButton"
+ return="android.app.AlertDialog.Builder"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="textId" type="int">
+</parameter>
+<parameter name="listener" type="android.content.DialogInterface.OnClickListener">
+</parameter>
+</method>
+<method name="setNeutralButton"
+ return="android.app.AlertDialog.Builder"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="text" type="java.lang.CharSequence">
+</parameter>
+<parameter name="listener" type="android.content.DialogInterface.OnClickListener">
+</parameter>
+</method>
+<method name="setOnCancelListener"
+ return="android.app.AlertDialog.Builder"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="onCancelListener" type="android.content.DialogInterface.OnCancelListener">
+</parameter>
+</method>
+<method name="setOnItemSelectedListener"
+ return="android.app.AlertDialog.Builder"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="listener" type="android.widget.AdapterView.OnItemSelectedListener">
+</parameter>
+</method>
+<method name="setOnKeyListener"
+ return="android.app.AlertDialog.Builder"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="onKeyListener" type="android.content.DialogInterface.OnKeyListener">
+</parameter>
+</method>
+<method name="setPositiveButton"
+ return="android.app.AlertDialog.Builder"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="textId" type="int">
+</parameter>
+<parameter name="listener" type="android.content.DialogInterface.OnClickListener">
+</parameter>
+</method>
+<method name="setPositiveButton"
+ return="android.app.AlertDialog.Builder"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="text" type="java.lang.CharSequence">
+</parameter>
+<parameter name="listener" type="android.content.DialogInterface.OnClickListener">
+</parameter>
+</method>
+<method name="setSingleChoiceItems"
+ return="android.app.AlertDialog.Builder"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="itemsId" type="int">
+</parameter>
+<parameter name="checkedItem" type="int">
+</parameter>
+<parameter name="listener" type="android.content.DialogInterface.OnClickListener">
+</parameter>
+</method>
+<method name="setSingleChoiceItems"
+ return="android.app.AlertDialog.Builder"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="cursor" type="android.database.Cursor">
+</parameter>
+<parameter name="checkedItem" type="int">
+</parameter>
+<parameter name="labelColumn" type="java.lang.String">
+</parameter>
+<parameter name="listener" type="android.content.DialogInterface.OnClickListener">
+</parameter>
+</method>
+<method name="setSingleChoiceItems"
+ return="android.app.AlertDialog.Builder"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="items" type="java.lang.CharSequence[]">
+</parameter>
+<parameter name="checkedItem" type="int">
+</parameter>
+<parameter name="listener" type="android.content.DialogInterface.OnClickListener">
+</parameter>
+</method>
+<method name="setSingleChoiceItems"
+ return="android.app.AlertDialog.Builder"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="adapter" type="android.widget.ListAdapter">
+</parameter>
+<parameter name="checkedItem" type="int">
+</parameter>
+<parameter name="listener" type="android.content.DialogInterface.OnClickListener">
+</parameter>
+</method>
+<method name="setTitle"
+ return="android.app.AlertDialog.Builder"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="titleId" type="int">
+</parameter>
+</method>
+<method name="setTitle"
+ return="android.app.AlertDialog.Builder"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="title" type="java.lang.CharSequence">
+</parameter>
+</method>
+<method name="setView"
+ return="android.app.AlertDialog.Builder"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="view" type="android.view.View">
+</parameter>
+</method>
+<method name="show"
+ return="android.app.AlertDialog"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+</class>
+<class name="AliasActivity"
+ extends="android.app.Activity"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="AliasActivity"
+ type="android.app.AliasActivity"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+</class>
+<class name="Application"
+ extends="android.content.ContextWrapper"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="android.content.ComponentCallbacks">
+</implements>
+<constructor name="Application"
+ type="android.app.Application"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<method name="onConfigurationChanged"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="newConfig" type="android.content.res.Configuration">
+</parameter>
+</method>
+<method name="onCreate"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="onLowMemory"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="onTerminate"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+</class>
+<class name="DatePickerDialog"
+ extends="android.app.AlertDialog"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="android.widget.DatePicker.OnDateChangedListener">
+</implements>
+<implements name="android.content.DialogInterface.OnClickListener">
+</implements>
+<constructor name="DatePickerDialog"
+ type="android.app.DatePickerDialog"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="context" type="android.content.Context">
+</parameter>
+<parameter name="callBack" type="android.app.DatePickerDialog.OnDateSetListener">
+</parameter>
+<parameter name="year" type="int">
+</parameter>
+<parameter name="monthOfYear" type="int">
+</parameter>
+<parameter name="dayOfMonth" type="int">
+</parameter>
+</constructor>
+<constructor name="DatePickerDialog"
+ type="android.app.DatePickerDialog"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="context" type="android.content.Context">
+</parameter>
+<parameter name="theme" type="int">
+</parameter>
+<parameter name="callBack" type="android.app.DatePickerDialog.OnDateSetListener">
+</parameter>
+<parameter name="year" type="int">
+</parameter>
+<parameter name="monthOfYear" type="int">
+</parameter>
+<parameter name="dayOfMonth" type="int">
+</parameter>
+</constructor>
+<method name="onClick"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="dialog" type="android.content.DialogInterface">
+</parameter>
+<parameter name="which" type="int">
+</parameter>
+</method>
+<method name="onDateChanged"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="view" type="android.widget.DatePicker">
+</parameter>
+<parameter name="year" type="int">
+</parameter>
+<parameter name="month" type="int">
+</parameter>
+<parameter name="day" type="int">
+</parameter>
+</method>
+<method name="updateDate"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="year" type="int">
+</parameter>
+<parameter name="monthOfYear" type="int">
+</parameter>
+<parameter name="dayOfMonth" type="int">
+</parameter>
+</method>
+</class>
+<interface name="DatePickerDialog.OnDateSetListener"
+ abstract="true"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="onDateSet"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="view" type="android.widget.DatePicker">
+</parameter>
+<parameter name="year" type="int">
+</parameter>
+<parameter name="monthOfYear" type="int">
+</parameter>
+<parameter name="dayOfMonth" type="int">
+</parameter>
+</method>
+</interface>
+<class name="Dialog"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="android.content.DialogInterface">
+</implements>
+<implements name="android.view.KeyEvent.Callback">
+</implements>
+<implements name="android.view.View.OnCreateContextMenuListener">
+</implements>
+<implements name="android.view.Window.Callback">
+</implements>
+<constructor name="Dialog"
+ type="android.app.Dialog"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="context" type="android.content.Context">
+</parameter>
+</constructor>
+<constructor name="Dialog"
+ type="android.app.Dialog"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="context" type="android.content.Context">
+</parameter>
+<parameter name="theme" type="int">
+</parameter>
+</constructor>
+<constructor name="Dialog"
+ type="android.app.Dialog"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="context" type="android.content.Context">
+</parameter>
+<parameter name="cancelable" type="boolean">
+</parameter>
+<parameter name="cancelListener" type="android.content.DialogInterface.OnCancelListener">
+</parameter>
+</constructor>
+<method name="addContentView"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="view" type="android.view.View">
+</parameter>
+<parameter name="params" type="android.view.ViewGroup.LayoutParams">
+</parameter>
+</method>
+<method name="cancel"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="closeOptionsMenu"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="dismiss"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="dispatchKeyEvent"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="event" type="android.view.KeyEvent">
+</parameter>
+</method>
+<method name="dispatchPopulateAccessibilityEvent"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="event" type="android.view.accessibility.AccessibilityEvent">
+</parameter>
+</method>
+<method name="dispatchTouchEvent"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="ev" type="android.view.MotionEvent">
+</parameter>
+</method>
+<method name="dispatchTrackballEvent"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="ev" type="android.view.MotionEvent">
+</parameter>
+</method>
+<method name="findViewById"
+ return="android.view.View"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="id" type="int">
+</parameter>
+</method>
+<method name="getContext"
+ return="android.content.Context"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getCurrentFocus"
+ return="android.view.View"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getLayoutInflater"
+ return="android.view.LayoutInflater"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getOwnerActivity"
+ return="android.app.Activity"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getVolumeControlStream"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getWindow"
+ return="android.view.Window"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="hide"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isShowing"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="onAttachedToWindow"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="onBackPressed"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="onContentChanged"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="onContextItemSelected"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="item" type="android.view.MenuItem">
+</parameter>
+</method>
+<method name="onContextMenuClosed"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="menu" type="android.view.Menu">
+</parameter>
+</method>
+<method name="onCreate"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="savedInstanceState" type="android.os.Bundle">
+</parameter>
+</method>
+<method name="onCreateContextMenu"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="menu" type="android.view.ContextMenu">
+</parameter>
+<parameter name="v" type="android.view.View">
+</parameter>
+<parameter name="menuInfo" type="android.view.ContextMenu.ContextMenuInfo">
+</parameter>
+</method>
+<method name="onCreateOptionsMenu"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="menu" type="android.view.Menu">
+</parameter>
+</method>
+<method name="onCreatePanelMenu"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="featureId" type="int">
+</parameter>
+<parameter name="menu" type="android.view.Menu">
+</parameter>
+</method>
+<method name="onCreatePanelView"
+ return="android.view.View"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="featureId" type="int">
+</parameter>
+</method>
+<method name="onDetachedFromWindow"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="onKeyDown"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="keyCode" type="int">
+</parameter>
+<parameter name="event" type="android.view.KeyEvent">
+</parameter>
+</method>
+<method name="onKeyLongPress"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="keyCode" type="int">
+</parameter>
+<parameter name="event" type="android.view.KeyEvent">
+</parameter>
+</method>
+<method name="onKeyMultiple"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="keyCode" type="int">
+</parameter>
+<parameter name="repeatCount" type="int">
+</parameter>
+<parameter name="event" type="android.view.KeyEvent">
+</parameter>
+</method>
+<method name="onKeyUp"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="keyCode" type="int">
+</parameter>
+<parameter name="event" type="android.view.KeyEvent">
+</parameter>
+</method>
+<method name="onMenuItemSelected"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="featureId" type="int">
+</parameter>
+<parameter name="item" type="android.view.MenuItem">
+</parameter>
+</method>
+<method name="onMenuOpened"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="featureId" type="int">
+</parameter>
+<parameter name="menu" type="android.view.Menu">
+</parameter>
+</method>
+<method name="onOptionsItemSelected"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="item" type="android.view.MenuItem">
+</parameter>
+</method>
+<method name="onOptionsMenuClosed"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="menu" type="android.view.Menu">
+</parameter>
+</method>
+<method name="onPanelClosed"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="featureId" type="int">
+</parameter>
+<parameter name="menu" type="android.view.Menu">
+</parameter>
+</method>
+<method name="onPrepareOptionsMenu"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="menu" type="android.view.Menu">
+</parameter>
+</method>
+<method name="onPreparePanel"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="featureId" type="int">
+</parameter>
+<parameter name="view" type="android.view.View">
+</parameter>
+<parameter name="menu" type="android.view.Menu">
+</parameter>
+</method>
+<method name="onRestoreInstanceState"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="savedInstanceState" type="android.os.Bundle">
+</parameter>
+</method>
+<method name="onSaveInstanceState"
+ return="android.os.Bundle"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="onSearchRequested"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="onStart"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</method>
+<method name="onStop"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</method>
+<method name="onTouchEvent"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="event" type="android.view.MotionEvent">
+</parameter>
+</method>
+<method name="onTrackballEvent"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="event" type="android.view.MotionEvent">
+</parameter>
+</method>
+<method name="onWindowAttributesChanged"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="params" type="android.view.WindowManager.LayoutParams">
+</parameter>
+</method>
+<method name="onWindowFocusChanged"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="hasFocus" type="boolean">
+</parameter>
+</method>
+<method name="openContextMenu"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="view" type="android.view.View">
+</parameter>
+</method>
+<method name="openOptionsMenu"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="registerForContextMenu"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="view" type="android.view.View">
+</parameter>
+</method>
+<method name="requestWindowFeature"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="featureId" type="int">
+</parameter>
+</method>
+<method name="setCancelMessage"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="msg" type="android.os.Message">
+</parameter>
+</method>
+<method name="setCancelable"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="flag" type="boolean">
+</parameter>
+</method>
+<method name="setCanceledOnTouchOutside"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="cancel" type="boolean">
+</parameter>
+</method>
+<method name="setContentView"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="layoutResID" type="int">
+</parameter>
+</method>
+<method name="setContentView"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="view" type="android.view.View">
+</parameter>
+</method>
+<method name="setContentView"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="view" type="android.view.View">
+</parameter>
+<parameter name="params" type="android.view.ViewGroup.LayoutParams">
+</parameter>
+</method>
+<method name="setDismissMessage"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="msg" type="android.os.Message">
+</parameter>
+</method>
+<method name="setFeatureDrawable"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="featureId" type="int">
+</parameter>
+<parameter name="drawable" type="android.graphics.drawable.Drawable">
+</parameter>
+</method>
+<method name="setFeatureDrawableAlpha"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="featureId" type="int">
+</parameter>
+<parameter name="alpha" type="int">
+</parameter>
+</method>
+<method name="setFeatureDrawableResource"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="featureId" type="int">
+</parameter>
+<parameter name="resId" type="int">
+</parameter>
+</method>
+<method name="setFeatureDrawableUri"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="featureId" type="int">
+</parameter>
+<parameter name="uri" type="android.net.Uri">
+</parameter>
+</method>
+<method name="setOnCancelListener"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="listener" type="android.content.DialogInterface.OnCancelListener">
+</parameter>
+</method>
+<method name="setOnDismissListener"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="listener" type="android.content.DialogInterface.OnDismissListener">
+</parameter>
+</method>
+<method name="setOnKeyListener"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="onKeyListener" type="android.content.DialogInterface.OnKeyListener">
+</parameter>
+</method>
+<method name="setOnShowListener"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="listener" type="android.content.DialogInterface.OnShowListener">
+</parameter>
+</method>
+<method name="setOwnerActivity"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="activity" type="android.app.Activity">
+</parameter>
+</method>
+<method name="setTitle"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="title" type="java.lang.CharSequence">
+</parameter>
+</method>
+<method name="setTitle"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="titleId" type="int">
+</parameter>
+</method>
+<method name="setVolumeControlStream"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="streamType" type="int">
+</parameter>
+</method>
+<method name="show"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="takeKeyEvents"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="get" type="boolean">
+</parameter>
+</method>
+<method name="unregisterForContextMenu"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="view" type="android.view.View">
+</parameter>
+</method>
+</class>
+<class name="ExpandableListActivity"
+ extends="android.app.Activity"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="android.widget.ExpandableListView.OnChildClickListener">
+</implements>
+<implements name="android.widget.ExpandableListView.OnGroupCollapseListener">
+</implements>
+<implements name="android.widget.ExpandableListView.OnGroupExpandListener">
+</implements>
+<implements name="android.view.View.OnCreateContextMenuListener">
+</implements>
+<constructor name="ExpandableListActivity"
+ type="android.app.ExpandableListActivity"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<method name="getExpandableListAdapter"
+ return="android.widget.ExpandableListAdapter"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getExpandableListView"
+ return="android.widget.ExpandableListView"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getSelectedId"
+ return="long"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getSelectedPosition"
+ return="long"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="onChildClick"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="parent" type="android.widget.ExpandableListView">
+</parameter>
+<parameter name="v" type="android.view.View">
+</parameter>
+<parameter name="groupPosition" type="int">
+</parameter>
+<parameter name="childPosition" type="int">
+</parameter>
+<parameter name="id" type="long">
+</parameter>
+</method>
+<method name="onGroupCollapse"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="groupPosition" type="int">
+</parameter>
+</method>
+<method name="onGroupExpand"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="groupPosition" type="int">
+</parameter>
+</method>
+<method name="setListAdapter"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="adapter" type="android.widget.ExpandableListAdapter">
+</parameter>
+</method>
+<method name="setSelectedChild"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="groupPosition" type="int">
+</parameter>
+<parameter name="childPosition" type="int">
+</parameter>
+<parameter name="shouldExpandGroup" type="boolean">
+</parameter>
+</method>
+<method name="setSelectedGroup"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="groupPosition" type="int">
+</parameter>
+</method>
+</class>
+<class name="Instrumentation"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="Instrumentation"
+ type="android.app.Instrumentation"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<method name="addMonitor"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="monitor" type="android.app.Instrumentation.ActivityMonitor">
+</parameter>
+</method>
+<method name="addMonitor"
+ return="android.app.Instrumentation.ActivityMonitor"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="filter" type="android.content.IntentFilter">
+</parameter>
+<parameter name="result" type="android.app.Instrumentation.ActivityResult">
+</parameter>
+<parameter name="block" type="boolean">
+</parameter>
+</method>
+<method name="addMonitor"
+ return="android.app.Instrumentation.ActivityMonitor"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="cls" type="java.lang.String">
+</parameter>
+<parameter name="result" type="android.app.Instrumentation.ActivityResult">
+</parameter>
+<parameter name="block" type="boolean">
+</parameter>
+</method>
+<method name="callActivityOnCreate"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="activity" type="android.app.Activity">
+</parameter>
+<parameter name="icicle" type="android.os.Bundle">
+</parameter>
+</method>
+<method name="callActivityOnDestroy"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="activity" type="android.app.Activity">
+</parameter>
+</method>
+<method name="callActivityOnNewIntent"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="activity" type="android.app.Activity">
+</parameter>
+<parameter name="intent" type="android.content.Intent">
+</parameter>
+</method>
+<method name="callActivityOnPause"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="activity" type="android.app.Activity">
+</parameter>
+</method>
+<method name="callActivityOnPostCreate"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="activity" type="android.app.Activity">
+</parameter>
+<parameter name="icicle" type="android.os.Bundle">
+</parameter>
+</method>
+<method name="callActivityOnRestart"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="activity" type="android.app.Activity">
+</parameter>
+</method>
+<method name="callActivityOnRestoreInstanceState"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="activity" type="android.app.Activity">
+</parameter>
+<parameter name="savedInstanceState" type="android.os.Bundle">
+</parameter>
+</method>
+<method name="callActivityOnResume"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="activity" type="android.app.Activity">
+</parameter>
+</method>
+<method name="callActivityOnSaveInstanceState"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="activity" type="android.app.Activity">
+</parameter>
+<parameter name="outState" type="android.os.Bundle">
+</parameter>
+</method>
+<method name="callActivityOnStart"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="activity" type="android.app.Activity">
+</parameter>
+</method>
+<method name="callActivityOnStop"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="activity" type="android.app.Activity">
+</parameter>
+</method>
+<method name="callActivityOnUserLeaving"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="activity" type="android.app.Activity">
+</parameter>
+</method>
+<method name="callApplicationOnCreate"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="app" type="android.app.Application">
+</parameter>
+</method>
+<method name="checkMonitorHit"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="monitor" type="android.app.Instrumentation.ActivityMonitor">
+</parameter>
+<parameter name="minHits" type="int">
+</parameter>
+</method>
+<method name="endPerformanceSnapshot"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="finish"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="resultCode" type="int">
+</parameter>
+<parameter name="results" type="android.os.Bundle">
+</parameter>
+</method>
+<method name="getAllocCounts"
+ return="android.os.Bundle"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getBinderCounts"
+ return="android.os.Bundle"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getComponentName"
+ return="android.content.ComponentName"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getContext"
+ return="android.content.Context"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getTargetContext"
+ return="android.content.Context"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="invokeContextMenuAction"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="targetActivity" type="android.app.Activity">
+</parameter>
+<parameter name="id" type="int">
+</parameter>
+<parameter name="flag" type="int">
+</parameter>
+</method>
+<method name="invokeMenuActionSync"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="targetActivity" type="android.app.Activity">
+</parameter>
+<parameter name="id" type="int">
+</parameter>
+<parameter name="flag" type="int">
+</parameter>
+</method>
+<method name="isProfiling"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="newActivity"
+ return="android.app.Activity"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="clazz" type="java.lang.Class&lt;?&gt;">
+</parameter>
+<parameter name="context" type="android.content.Context">
+</parameter>
+<parameter name="token" type="android.os.IBinder">
+</parameter>
+<parameter name="application" type="android.app.Application">
+</parameter>
+<parameter name="intent" type="android.content.Intent">
+</parameter>
+<parameter name="info" type="android.content.pm.ActivityInfo">
+</parameter>
+<parameter name="title" type="java.lang.CharSequence">
+</parameter>
+<parameter name="parent" type="android.app.Activity">
+</parameter>
+<parameter name="id" type="java.lang.String">
+</parameter>
+<parameter name="lastNonConfigurationInstance" type="java.lang.Object">
+</parameter>
+<exception name="IllegalAccessException" type="java.lang.IllegalAccessException">
+</exception>
+<exception name="InstantiationException" type="java.lang.InstantiationException">
+</exception>
+</method>
+<method name="newActivity"
+ return="android.app.Activity"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="cl" type="java.lang.ClassLoader">
+</parameter>
+<parameter name="className" type="java.lang.String">
+</parameter>
+<parameter name="intent" type="android.content.Intent">
+</parameter>
+<exception name="ClassNotFoundException" type="java.lang.ClassNotFoundException">
+</exception>
+<exception name="IllegalAccessException" type="java.lang.IllegalAccessException">
+</exception>
+<exception name="InstantiationException" type="java.lang.InstantiationException">
+</exception>
+</method>
+<method name="newApplication"
+ return="android.app.Application"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="cl" type="java.lang.ClassLoader">
+</parameter>
+<parameter name="className" type="java.lang.String">
+</parameter>
+<parameter name="context" type="android.content.Context">
+</parameter>
+<exception name="ClassNotFoundException" type="java.lang.ClassNotFoundException">
+</exception>
+<exception name="IllegalAccessException" type="java.lang.IllegalAccessException">
+</exception>
+<exception name="InstantiationException" type="java.lang.InstantiationException">
+</exception>
+</method>
+<method name="newApplication"
+ return="android.app.Application"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="clazz" type="java.lang.Class&lt;?&gt;">
+</parameter>
+<parameter name="context" type="android.content.Context">
+</parameter>
+<exception name="ClassNotFoundException" type="java.lang.ClassNotFoundException">
+</exception>
+<exception name="IllegalAccessException" type="java.lang.IllegalAccessException">
+</exception>
+<exception name="InstantiationException" type="java.lang.InstantiationException">
+</exception>
+</method>
+<method name="onCreate"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="arguments" type="android.os.Bundle">
+</parameter>
+</method>
+<method name="onDestroy"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="onException"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="obj" type="java.lang.Object">
+</parameter>
+<parameter name="e" type="java.lang.Throwable">
+</parameter>
+</method>
+<method name="onStart"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="removeMonitor"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="monitor" type="android.app.Instrumentation.ActivityMonitor">
+</parameter>
+</method>
+<method name="runOnMainSync"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="runner" type="java.lang.Runnable">
+</parameter>
+</method>
+<method name="sendCharacterSync"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="keyCode" type="int">
+</parameter>
+</method>
+<method name="sendKeyDownUpSync"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="key" type="int">
+</parameter>
+</method>
+<method name="sendKeySync"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="event" type="android.view.KeyEvent">
+</parameter>
+</method>
+<method name="sendPointerSync"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="event" type="android.view.MotionEvent">
+</parameter>
+</method>
+<method name="sendStatus"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="resultCode" type="int">
+</parameter>
+<parameter name="results" type="android.os.Bundle">
+</parameter>
+</method>
+<method name="sendStringSync"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="text" type="java.lang.String">
+</parameter>
+</method>
+<method name="sendTrackballEventSync"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="event" type="android.view.MotionEvent">
+</parameter>
+</method>
+<method name="setAutomaticPerformanceSnapshots"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="setInTouchMode"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="inTouch" type="boolean">
+</parameter>
+</method>
+<method name="start"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="startActivitySync"
+ return="android.app.Activity"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="intent" type="android.content.Intent">
+</parameter>
+</method>
+<method name="startAllocCounting"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="startPerformanceSnapshot"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="startProfiling"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="stopAllocCounting"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="stopProfiling"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="waitForIdle"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="recipient" type="java.lang.Runnable">
+</parameter>
+</method>
+<method name="waitForIdleSync"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="waitForMonitor"
+ return="android.app.Activity"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="monitor" type="android.app.Instrumentation.ActivityMonitor">
+</parameter>
+</method>
+<method name="waitForMonitorWithTimeout"
+ return="android.app.Activity"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="monitor" type="android.app.Instrumentation.ActivityMonitor">
+</parameter>
+<parameter name="timeOut" type="long">
+</parameter>
+</method>
+<field name="REPORT_KEY_IDENTIFIER"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;id&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="REPORT_KEY_STREAMRESULT"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;stream&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<class name="Instrumentation.ActivityMonitor"
+ extends="java.lang.Object"
+ abstract="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="Instrumentation.ActivityMonitor"
+ type="android.app.Instrumentation.ActivityMonitor"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="which" type="android.content.IntentFilter">
+</parameter>
+<parameter name="result" type="android.app.Instrumentation.ActivityResult">
+</parameter>
+<parameter name="block" type="boolean">
+</parameter>
+</constructor>
+<constructor name="Instrumentation.ActivityMonitor"
+ type="android.app.Instrumentation.ActivityMonitor"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="cls" type="java.lang.String">
+</parameter>
+<parameter name="result" type="android.app.Instrumentation.ActivityResult">
+</parameter>
+<parameter name="block" type="boolean">
+</parameter>
+</constructor>
+<method name="getFilter"
+ return="android.content.IntentFilter"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getHits"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getLastActivity"
+ return="android.app.Activity"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getResult"
+ return="android.app.Instrumentation.ActivityResult"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isBlocking"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="waitForActivity"
+ return="android.app.Activity"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="waitForActivityWithTimeout"
+ return="android.app.Activity"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="timeOut" type="long">
+</parameter>
+</method>
+</class>
+<class name="Instrumentation.ActivityResult"
+ extends="java.lang.Object"
+ abstract="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="Instrumentation.ActivityResult"
+ type="android.app.Instrumentation.ActivityResult"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="resultCode" type="int">
+</parameter>
+<parameter name="resultData" type="android.content.Intent">
+</parameter>
+</constructor>
+<method name="getResultCode"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getResultData"
+ return="android.content.Intent"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+</class>
+<class name="IntentService"
+ extends="android.app.Service"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="IntentService"
+ type="android.app.IntentService"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+</constructor>
+<method name="onBind"
+ return="android.os.IBinder"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="intent" type="android.content.Intent">
+</parameter>
+</method>
+<method name="onHandleIntent"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="intent" type="android.content.Intent">
+</parameter>
+</method>
+<method name="setIntentRedelivery"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="enabled" type="boolean">
+</parameter>
+</method>
+</class>
+<class name="KeyguardManager"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="exitKeyguardSecurely"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="callback" type="android.app.KeyguardManager.OnKeyguardExitResult">
+</parameter>
+</method>
+<method name="inKeyguardRestrictedInputMode"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="newKeyguardLock"
+ return="android.app.KeyguardManager.KeyguardLock"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="tag" type="java.lang.String">
+</parameter>
+</method>
+</class>
+<class name="KeyguardManager.KeyguardLock"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="disableKeyguard"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="reenableKeyguard"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+</class>
+<interface name="KeyguardManager.OnKeyguardExitResult"
+ abstract="true"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="onKeyguardExitResult"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="success" type="boolean">
+</parameter>
+</method>
+</interface>
+<class name="LauncherActivity"
+ extends="android.app.ListActivity"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="LauncherActivity"
+ type="android.app.LauncherActivity"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<method name="getTargetIntent"
+ return="android.content.Intent"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</method>
+<method name="intentForPosition"
+ return="android.content.Intent"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="position" type="int">
+</parameter>
+</method>
+<method name="itemForPosition"
+ return="android.app.LauncherActivity.ListItem"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="position" type="int">
+</parameter>
+</method>
+<method name="makeListItems"
+ return="java.util.List&lt;android.app.LauncherActivity.ListItem&gt;"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="onQueryPackageManager"
+ return="java.util.List&lt;android.content.pm.ResolveInfo&gt;"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="queryIntent" type="android.content.Intent">
+</parameter>
+</method>
+<method name="onSetContentView"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</method>
+</class>
+<class name="LauncherActivity.IconResizer"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="LauncherActivity.IconResizer"
+ type="android.app.LauncherActivity.IconResizer"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<method name="createIconThumbnail"
+ return="android.graphics.drawable.Drawable"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="icon" type="android.graphics.drawable.Drawable">
+</parameter>
+</method>
+</class>
+<class name="LauncherActivity.ListItem"
+ extends="java.lang.Object"
+ abstract="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="LauncherActivity.ListItem"
+ type="android.app.LauncherActivity.ListItem"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<field name="className"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="extras"
+ type="android.os.Bundle"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="icon"
+ type="android.graphics.drawable.Drawable"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="label"
+ type="java.lang.CharSequence"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="packageName"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="resolveInfo"
+ type="android.content.pm.ResolveInfo"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<class name="ListActivity"
+ extends="android.app.Activity"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="ListActivity"
+ type="android.app.ListActivity"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<method name="getListAdapter"
+ return="android.widget.ListAdapter"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getListView"
+ return="android.widget.ListView"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getSelectedItemId"
+ return="long"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getSelectedItemPosition"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="onListItemClick"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="l" type="android.widget.ListView">
+</parameter>
+<parameter name="v" type="android.view.View">
+</parameter>
+<parameter name="position" type="int">
+</parameter>
+<parameter name="id" type="long">
+</parameter>
+</method>
+<method name="setListAdapter"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="adapter" type="android.widget.ListAdapter">
+</parameter>
+</method>
+<method name="setSelection"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="position" type="int">
+</parameter>
+</method>
+</class>
+<class name="LocalActivityManager"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="LocalActivityManager"
+ type="android.app.LocalActivityManager"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="parent" type="android.app.Activity">
+</parameter>
+<parameter name="singleMode" type="boolean">
+</parameter>
+</constructor>
+<method name="destroyActivity"
+ return="android.view.Window"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="id" type="java.lang.String">
+</parameter>
+<parameter name="finish" type="boolean">
+</parameter>
+</method>
+<method name="dispatchCreate"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="state" type="android.os.Bundle">
+</parameter>
+</method>
+<method name="dispatchDestroy"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="finishing" type="boolean">
+</parameter>
+</method>
+<method name="dispatchPause"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="finishing" type="boolean">
+</parameter>
+</method>
+<method name="dispatchResume"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="dispatchStop"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getActivity"
+ return="android.app.Activity"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="id" type="java.lang.String">
+</parameter>
+</method>
+<method name="getCurrentActivity"
+ return="android.app.Activity"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getCurrentId"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="removeAllActivities"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="saveInstanceState"
+ return="android.os.Bundle"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="startActivity"
+ return="android.view.Window"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="id" type="java.lang.String">
+</parameter>
+<parameter name="intent" type="android.content.Intent">
+</parameter>
+</method>
+</class>
+<class name="Notification"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="android.os.Parcelable">
+</implements>
+<constructor name="Notification"
+ type="android.app.Notification"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<constructor name="Notification"
+ type="android.app.Notification"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="icon" type="int">
+</parameter>
+<parameter name="tickerText" type="java.lang.CharSequence">
+</parameter>
+<parameter name="when" type="long">
+</parameter>
+</constructor>
+<constructor name="Notification"
+ type="android.app.Notification"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="parcel" type="android.os.Parcel">
+</parameter>
+</constructor>
+<method name="describeContents"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="setLatestEventInfo"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="context" type="android.content.Context">
+</parameter>
+<parameter name="contentTitle" type="java.lang.CharSequence">
+</parameter>
+<parameter name="contentText" type="java.lang.CharSequence">
+</parameter>
+<parameter name="contentIntent" type="android.app.PendingIntent">
+</parameter>
+</method>
+<method name="writeToParcel"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="parcel" type="android.os.Parcel">
+</parameter>
+<parameter name="flags" type="int">
+</parameter>
+</method>
+<field name="CREATOR"
+ type="android.os.Parcelable.Creator"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="DEFAULT_ALL"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="-1"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="DEFAULT_LIGHTS"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="4"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="DEFAULT_SOUND"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="DEFAULT_VIBRATE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="FLAG_AUTO_CANCEL"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="FLAG_FOREGROUND_SERVICE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="64"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="FLAG_INSISTENT"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="4"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="FLAG_NO_CLEAR"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="32"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="FLAG_ONGOING_EVENT"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="FLAG_ONLY_ALERT_ONCE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="8"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="FLAG_SHOW_LIGHTS"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="STREAM_DEFAULT"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="-1"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="audioStreamType"
+ type="int"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="contentIntent"
+ type="android.app.PendingIntent"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="contentView"
+ type="android.widget.RemoteViews"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="defaults"
+ type="int"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="deleteIntent"
+ type="android.app.PendingIntent"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="flags"
+ type="int"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="icon"
+ type="int"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="iconLevel"
+ type="int"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ledARGB"
+ type="int"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ledOffMS"
+ type="int"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ledOnMS"
+ type="int"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="number"
+ type="int"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="sound"
+ type="android.net.Uri"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="tickerText"
+ type="java.lang.CharSequence"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="vibrate"
+ type="long[]"
+ transient="false"
+ volatile="false"
+ value="null"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="when"
+ type="long"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<class name="NotificationManager"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="cancel"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="id" type="int">
+</parameter>
+</method>
+<method name="cancel"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="tag" type="java.lang.String">
+</parameter>
+<parameter name="id" type="int">
+</parameter>
+</method>
+<method name="cancelAll"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="notify"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="id" type="int">
+</parameter>
+<parameter name="notification" type="android.app.Notification">
+</parameter>
+</method>
+<method name="notify"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="tag" type="java.lang.String">
+</parameter>
+<parameter name="id" type="int">
+</parameter>
+<parameter name="notification" type="android.app.Notification">
+</parameter>
+</method>
+</class>
+<class name="PendingIntent"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="android.os.Parcelable">
+</implements>
+<method name="cancel"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="describeContents"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getActivity"
+ return="android.app.PendingIntent"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="context" type="android.content.Context">
+</parameter>
+<parameter name="requestCode" type="int">
+</parameter>
+<parameter name="intent" type="android.content.Intent">
+</parameter>
+<parameter name="flags" type="int">
+</parameter>
+</method>
+<method name="getBroadcast"
+ return="android.app.PendingIntent"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="context" type="android.content.Context">
+</parameter>
+<parameter name="requestCode" type="int">
+</parameter>
+<parameter name="intent" type="android.content.Intent">
+</parameter>
+<parameter name="flags" type="int">
+</parameter>
+</method>
+<method name="getIntentSender"
+ return="android.content.IntentSender"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getService"
+ return="android.app.PendingIntent"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="context" type="android.content.Context">
+</parameter>
+<parameter name="requestCode" type="int">
+</parameter>
+<parameter name="intent" type="android.content.Intent">
+</parameter>
+<parameter name="flags" type="int">
+</parameter>
+</method>
+<method name="getTargetPackage"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="readPendingIntentOrNullFromParcel"
+ return="android.app.PendingIntent"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="in" type="android.os.Parcel">
+</parameter>
+</method>
+<method name="send"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="PendingIntent.CanceledException" type="android.app.PendingIntent.CanceledException">
+</exception>
+</method>
+<method name="send"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="code" type="int">
+</parameter>
+<exception name="PendingIntent.CanceledException" type="android.app.PendingIntent.CanceledException">
+</exception>
+</method>
+<method name="send"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="context" type="android.content.Context">
+</parameter>
+<parameter name="code" type="int">
+</parameter>
+<parameter name="intent" type="android.content.Intent">
+</parameter>
+<exception name="PendingIntent.CanceledException" type="android.app.PendingIntent.CanceledException">
+</exception>
+</method>
+<method name="send"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="code" type="int">
+</parameter>
+<parameter name="onFinished" type="android.app.PendingIntent.OnFinished">
+</parameter>
+<parameter name="handler" type="android.os.Handler">
+</parameter>
+<exception name="PendingIntent.CanceledException" type="android.app.PendingIntent.CanceledException">
+</exception>
+</method>
+<method name="send"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="context" type="android.content.Context">
+</parameter>
+<parameter name="code" type="int">
+</parameter>
+<parameter name="intent" type="android.content.Intent">
+</parameter>
+<parameter name="onFinished" type="android.app.PendingIntent.OnFinished">
+</parameter>
+<parameter name="handler" type="android.os.Handler">
+</parameter>
+<exception name="PendingIntent.CanceledException" type="android.app.PendingIntent.CanceledException">
+</exception>
+</method>
+<method name="writePendingIntentOrNullToParcel"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="sender" type="android.app.PendingIntent">
+</parameter>
+<parameter name="out" type="android.os.Parcel">
+</parameter>
+</method>
+<method name="writeToParcel"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="out" type="android.os.Parcel">
+</parameter>
+<parameter name="flags" type="int">
+</parameter>
+</method>
+<field name="CREATOR"
+ type="android.os.Parcelable.Creator"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="FLAG_CANCEL_CURRENT"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="268435456"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="FLAG_NO_CREATE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="536870912"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="FLAG_ONE_SHOT"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1073741824"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="FLAG_UPDATE_CURRENT"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="134217728"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<class name="PendingIntent.CanceledException"
+ extends="android.util.AndroidException"
+ abstract="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="PendingIntent.CanceledException"
+ type="android.app.PendingIntent.CanceledException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<constructor name="PendingIntent.CanceledException"
+ type="android.app.PendingIntent.CanceledException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+</constructor>
+<constructor name="PendingIntent.CanceledException"
+ type="android.app.PendingIntent.CanceledException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="cause" type="java.lang.Exception">
+</parameter>
+</constructor>
+</class>
+<interface name="PendingIntent.OnFinished"
+ abstract="true"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="onSendFinished"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="pendingIntent" type="android.app.PendingIntent">
+</parameter>
+<parameter name="intent" type="android.content.Intent">
+</parameter>
+<parameter name="resultCode" type="int">
+</parameter>
+<parameter name="resultData" type="java.lang.String">
+</parameter>
+<parameter name="resultExtras" type="android.os.Bundle">
+</parameter>
+</method>
+</interface>
+<class name="ProgressDialog"
+ extends="android.app.AlertDialog"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="ProgressDialog"
+ type="android.app.ProgressDialog"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="context" type="android.content.Context">
+</parameter>
+</constructor>
+<constructor name="ProgressDialog"
+ type="android.app.ProgressDialog"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="context" type="android.content.Context">
+</parameter>
+<parameter name="theme" type="int">
+</parameter>
+</constructor>
+<method name="getMax"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getProgress"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getSecondaryProgress"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="incrementProgressBy"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="diff" type="int">
+</parameter>
+</method>
+<method name="incrementSecondaryProgressBy"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="diff" type="int">
+</parameter>
+</method>
+<method name="isIndeterminate"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="onStart"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="setIndeterminate"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="indeterminate" type="boolean">
+</parameter>
+</method>
+<method name="setIndeterminateDrawable"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="d" type="android.graphics.drawable.Drawable">
+</parameter>
+</method>
+<method name="setMax"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="max" type="int">
+</parameter>
+</method>
+<method name="setProgress"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="value" type="int">
+</parameter>
+</method>
+<method name="setProgressDrawable"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="d" type="android.graphics.drawable.Drawable">
+</parameter>
+</method>
+<method name="setProgressStyle"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="style" type="int">
+</parameter>
+</method>
+<method name="setSecondaryProgress"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="secondaryProgress" type="int">
+</parameter>
+</method>
+<method name="show"
+ return="android.app.ProgressDialog"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="context" type="android.content.Context">
+</parameter>
+<parameter name="title" type="java.lang.CharSequence">
+</parameter>
+<parameter name="message" type="java.lang.CharSequence">
+</parameter>
+</method>
+<method name="show"
+ return="android.app.ProgressDialog"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="context" type="android.content.Context">
+</parameter>
+<parameter name="title" type="java.lang.CharSequence">
+</parameter>
+<parameter name="message" type="java.lang.CharSequence">
+</parameter>
+<parameter name="indeterminate" type="boolean">
+</parameter>
+</method>
+<method name="show"
+ return="android.app.ProgressDialog"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="context" type="android.content.Context">
+</parameter>
+<parameter name="title" type="java.lang.CharSequence">
+</parameter>
+<parameter name="message" type="java.lang.CharSequence">
+</parameter>
+<parameter name="indeterminate" type="boolean">
+</parameter>
+<parameter name="cancelable" type="boolean">
+</parameter>
+</method>
+<method name="show"
+ return="android.app.ProgressDialog"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="context" type="android.content.Context">
+</parameter>
+<parameter name="title" type="java.lang.CharSequence">
+</parameter>
+<parameter name="message" type="java.lang.CharSequence">
+</parameter>
+<parameter name="indeterminate" type="boolean">
+</parameter>
+<parameter name="cancelable" type="boolean">
+</parameter>
+<parameter name="cancelListener" type="android.content.DialogInterface.OnCancelListener">
+</parameter>
+</method>
+<field name="STYLE_HORIZONTAL"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="STYLE_SPINNER"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="0"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<class name="SearchManager"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="android.content.DialogInterface.OnCancelListener">
+</implements>
+<implements name="android.content.DialogInterface.OnDismissListener">
+</implements>
+<method name="getSearchableInfo"
+ return="android.app.SearchableInfo"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="componentName" type="android.content.ComponentName">
+</parameter>
+</method>
+<method name="getSearchablesInGlobalSearch"
+ return="java.util.List&lt;android.app.SearchableInfo&gt;"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="onCancel"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="deprecated"
+ visibility="public"
+>
+<parameter name="dialog" type="android.content.DialogInterface">
+</parameter>
+</method>
+<method name="onDismiss"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="deprecated"
+ visibility="public"
+>
+<parameter name="dialog" type="android.content.DialogInterface">
+</parameter>
+</method>
+<method name="setOnCancelListener"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="listener" type="android.app.SearchManager.OnCancelListener">
+</parameter>
+</method>
+<method name="setOnDismissListener"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="listener" type="android.app.SearchManager.OnDismissListener">
+</parameter>
+</method>
+<method name="startSearch"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="initialQuery" type="java.lang.String">
+</parameter>
+<parameter name="selectInitialQuery" type="boolean">
+</parameter>
+<parameter name="launchActivity" type="android.content.ComponentName">
+</parameter>
+<parameter name="appSearchData" type="android.os.Bundle">
+</parameter>
+<parameter name="globalSearch" type="boolean">
+</parameter>
+</method>
+<method name="stopSearch"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="triggerSearch"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="query" type="java.lang.String">
+</parameter>
+<parameter name="launchActivity" type="android.content.ComponentName">
+</parameter>
+<parameter name="appSearchData" type="android.os.Bundle">
+</parameter>
+</method>
+<field name="ACTION_KEY"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;action_key&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ACTION_MSG"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;action_msg&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="APP_DATA"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;app_data&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="CURSOR_EXTRA_KEY_IN_PROGRESS"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;in_progress&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="EXTRA_DATA_KEY"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;intent_extra_data_key&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="EXTRA_SELECT_QUERY"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;select_query&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="INTENT_ACTION_GLOBAL_SEARCH"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.search.action.GLOBAL_SEARCH&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="INTENT_ACTION_SEARCHABLES_CHANGED"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.search.action.SEARCHABLES_CHANGED&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="INTENT_ACTION_SEARCH_SETTINGS"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.search.action.SEARCH_SETTINGS&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="INTENT_ACTION_SEARCH_SETTINGS_CHANGED"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.search.action.SETTINGS_CHANGED&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="INTENT_ACTION_WEB_SEARCH_SETTINGS"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.search.action.WEB_SEARCH_SETTINGS&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="MENU_KEY"
+ type="char"
+ transient="false"
+ volatile="false"
+ value="115"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="MENU_KEYCODE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="47"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="QUERY"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;query&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="SHORTCUT_MIME_TYPE"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;vnd.android.cursor.item/vnd.android.search.suggest&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="SUGGEST_COLUMN_FORMAT"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;suggest_format&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="SUGGEST_COLUMN_ICON_1"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;suggest_icon_1&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="SUGGEST_COLUMN_ICON_2"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;suggest_icon_2&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="SUGGEST_COLUMN_INTENT_ACTION"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;suggest_intent_action&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="SUGGEST_COLUMN_INTENT_DATA"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;suggest_intent_data&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="SUGGEST_COLUMN_INTENT_DATA_ID"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;suggest_intent_data_id&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="SUGGEST_COLUMN_INTENT_EXTRA_DATA"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;suggest_intent_extra_data&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="SUGGEST_COLUMN_QUERY"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;suggest_intent_query&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="SUGGEST_COLUMN_SHORTCUT_ID"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;suggest_shortcut_id&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="SUGGEST_COLUMN_SPINNER_WHILE_REFRESHING"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;suggest_spinner_while_refreshing&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="SUGGEST_COLUMN_TEXT_1"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;suggest_text_1&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="SUGGEST_COLUMN_TEXT_2"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;suggest_text_2&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="SUGGEST_COLUMN_TEXT_2_URL"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;suggest_text_2_url&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="SUGGEST_MIME_TYPE"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;vnd.android.cursor.dir/vnd.android.search.suggest&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="SUGGEST_NEVER_MAKE_SHORTCUT"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;_-1&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="SUGGEST_PARAMETER_LIMIT"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;limit&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="SUGGEST_URI_PATH_QUERY"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;search_suggest_query&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="SUGGEST_URI_PATH_SHORTCUT"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;search_suggest_shortcut&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="USER_QUERY"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;user_query&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<interface name="SearchManager.OnCancelListener"
+ abstract="true"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="onCancel"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+</interface>
+<interface name="SearchManager.OnDismissListener"
+ abstract="true"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="onDismiss"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+</interface>
+<class name="SearchableInfo"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="android.os.Parcelable">
+</implements>
+<method name="autoUrlDetect"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="describeContents"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getHintId"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getImeOptions"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getInputType"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getSearchActivity"
+ return="android.content.ComponentName"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getSettingsDescriptionId"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getSuggestAuthority"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getSuggestIntentAction"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getSuggestIntentData"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getSuggestPackage"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getSuggestPath"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getSuggestSelection"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getSuggestThreshold"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getVoiceLanguageId"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getVoiceLanguageModeId"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getVoiceMaxResults"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getVoicePromptTextId"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getVoiceSearchEnabled"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getVoiceSearchLaunchRecognizer"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getVoiceSearchLaunchWebSearch"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="queryAfterZeroResults"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="shouldIncludeInGlobalSearch"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="shouldRewriteQueryFromData"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="shouldRewriteQueryFromText"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="writeToParcel"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="dest" type="android.os.Parcel">
+</parameter>
+<parameter name="flags" type="int">
+</parameter>
+</method>
+<field name="CREATOR"
+ type="android.os.Parcelable.Creator"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<class name="Service"
+ extends="android.content.ContextWrapper"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="android.content.ComponentCallbacks">
+</implements>
+<constructor name="Service"
+ type="android.app.Service"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<method name="dump"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="fd" type="java.io.FileDescriptor">
+</parameter>
+<parameter name="writer" type="java.io.PrintWriter">
+</parameter>
+<parameter name="args" type="java.lang.String[]">
+</parameter>
+</method>
+<method name="getApplication"
+ return="android.app.Application"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="onBind"
+ return="android.os.IBinder"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="intent" type="android.content.Intent">
+</parameter>
+</method>
+<method name="onConfigurationChanged"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="newConfig" type="android.content.res.Configuration">
+</parameter>
+</method>
+<method name="onCreate"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="onDestroy"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="onLowMemory"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="onRebind"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="intent" type="android.content.Intent">
+</parameter>
+</method>
+<method name="onStart"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="deprecated"
+ visibility="public"
+>
+<parameter name="intent" type="android.content.Intent">
+</parameter>
+<parameter name="startId" type="int">
+</parameter>
+</method>
+<method name="onStartCommand"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="intent" type="android.content.Intent">
+</parameter>
+<parameter name="flags" type="int">
+</parameter>
+<parameter name="startId" type="int">
+</parameter>
+</method>
+<method name="onUnbind"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="intent" type="android.content.Intent">
+</parameter>
+</method>
+<method name="setForeground"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="deprecated"
+ visibility="public"
+>
+<parameter name="isForeground" type="boolean">
+</parameter>
+</method>
+<method name="startForeground"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="id" type="int">
+</parameter>
+<parameter name="notification" type="android.app.Notification">
+</parameter>
+</method>
+<method name="stopForeground"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="removeNotification" type="boolean">
+</parameter>
+</method>
+<method name="stopSelf"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="stopSelf"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="startId" type="int">
+</parameter>
+</method>
+<method name="stopSelfResult"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="startId" type="int">
+</parameter>
+</method>
+<field name="START_CONTINUATION_MASK"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="15"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="START_FLAG_REDELIVERY"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="START_FLAG_RETRY"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="START_NOT_STICKY"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="START_REDELIVER_INTENT"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="3"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="START_STICKY"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="START_STICKY_COMPATIBILITY"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="0"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<class name="TabActivity"
+ extends="android.app.ActivityGroup"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="TabActivity"
+ type="android.app.TabActivity"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<method name="getTabHost"
+ return="android.widget.TabHost"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getTabWidget"
+ return="android.widget.TabWidget"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="setDefaultTab"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="tag" type="java.lang.String">
+</parameter>
+</method>
+<method name="setDefaultTab"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="index" type="int">
+</parameter>
+</method>
+</class>
+<class name="TimePickerDialog"
+ extends="android.app.AlertDialog"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="android.content.DialogInterface.OnClickListener">
+</implements>
+<implements name="android.widget.TimePicker.OnTimeChangedListener">
+</implements>
+<constructor name="TimePickerDialog"
+ type="android.app.TimePickerDialog"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="context" type="android.content.Context">
+</parameter>
+<parameter name="callBack" type="android.app.TimePickerDialog.OnTimeSetListener">
+</parameter>
+<parameter name="hourOfDay" type="int">
+</parameter>
+<parameter name="minute" type="int">
+</parameter>
+<parameter name="is24HourView" type="boolean">
+</parameter>
+</constructor>
+<constructor name="TimePickerDialog"
+ type="android.app.TimePickerDialog"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="context" type="android.content.Context">
+</parameter>
+<parameter name="theme" type="int">
+</parameter>
+<parameter name="callBack" type="android.app.TimePickerDialog.OnTimeSetListener">
+</parameter>
+<parameter name="hourOfDay" type="int">
+</parameter>
+<parameter name="minute" type="int">
+</parameter>
+<parameter name="is24HourView" type="boolean">
+</parameter>
+</constructor>
+<method name="onClick"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="dialog" type="android.content.DialogInterface">
+</parameter>
+<parameter name="which" type="int">
+</parameter>
+</method>
+<method name="onTimeChanged"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="view" type="android.widget.TimePicker">
+</parameter>
+<parameter name="hourOfDay" type="int">
+</parameter>
+<parameter name="minute" type="int">
+</parameter>
+</method>
+<method name="updateTime"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="hourOfDay" type="int">
+</parameter>
+<parameter name="minutOfHour" type="int">
+</parameter>
+</method>
+</class>
+<interface name="TimePickerDialog.OnTimeSetListener"
+ abstract="true"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="onTimeSet"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="view" type="android.widget.TimePicker">
+</parameter>
+<parameter name="hourOfDay" type="int">
+</parameter>
+<parameter name="minute" type="int">
+</parameter>
+</method>
+</interface>
+<class name="UiModeManager"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="disableCarMode"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="flags" type="int">
+</parameter>
+</method>
+<method name="enableCarMode"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="flags" type="int">
+</parameter>
+</method>
+<method name="getCurrentModeType"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getNightMode"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="setNightMode"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="mode" type="int">
+</parameter>
+</method>
+<field name="ACTION_ENTER_CAR_MODE"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ACTION_ENTER_DESK_MODE"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ACTION_EXIT_CAR_MODE"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ACTION_EXIT_DESK_MODE"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="DISABLE_CAR_MODE_GO_HOME"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ENABLE_CAR_MODE_GO_CAR_HOME"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="MODE_NIGHT_AUTO"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="0"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="MODE_NIGHT_NO"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="MODE_NIGHT_YES"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<class name="WallpaperInfo"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="android.os.Parcelable">
+</implements>
+<constructor name="WallpaperInfo"
+ type="android.app.WallpaperInfo"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="context" type="android.content.Context">
+</parameter>
+<parameter name="service" type="android.content.pm.ResolveInfo">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+<exception name="XmlPullParserException" type="org.xmlpull.v1.XmlPullParserException">
+</exception>
+</constructor>
+<method name="describeContents"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="dump"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="pw" type="android.util.Printer">
+</parameter>
+<parameter name="prefix" type="java.lang.String">
+</parameter>
+</method>
+<method name="getComponent"
+ return="android.content.ComponentName"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getPackageName"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getServiceInfo"
+ return="android.content.pm.ServiceInfo"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getServiceName"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getSettingsActivity"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="loadAuthor"
+ return="java.lang.CharSequence"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="pm" type="android.content.pm.PackageManager">
+</parameter>
+<exception name="Resources.NotFoundException" type="android.content.res.Resources.NotFoundException">
+</exception>
+</method>
+<method name="loadDescription"
+ return="java.lang.CharSequence"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="pm" type="android.content.pm.PackageManager">
+</parameter>
+<exception name="Resources.NotFoundException" type="android.content.res.Resources.NotFoundException">
+</exception>
+</method>
+<method name="loadIcon"
+ return="android.graphics.drawable.Drawable"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="pm" type="android.content.pm.PackageManager">
+</parameter>
+</method>
+<method name="loadLabel"
+ return="java.lang.CharSequence"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="pm" type="android.content.pm.PackageManager">
+</parameter>
+</method>
+<method name="loadThumbnail"
+ return="android.graphics.drawable.Drawable"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="pm" type="android.content.pm.PackageManager">
+</parameter>
+</method>
+<method name="writeToParcel"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="dest" type="android.os.Parcel">
+</parameter>
+<parameter name="flags" type="int">
+</parameter>
+</method>
+<field name="CREATOR"
+ type="android.os.Parcelable.Creator"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<class name="WallpaperManager"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="clear"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="clearWallpaperOffsets"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="windowToken" type="android.os.IBinder">
+</parameter>
+</method>
+<method name="getDesiredMinimumHeight"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getDesiredMinimumWidth"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getDrawable"
+ return="android.graphics.drawable.Drawable"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getFastDrawable"
+ return="android.graphics.drawable.Drawable"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getInstance"
+ return="android.app.WallpaperManager"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="context" type="android.content.Context">
+</parameter>
+</method>
+<method name="getWallpaperInfo"
+ return="android.app.WallpaperInfo"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="peekDrawable"
+ return="android.graphics.drawable.Drawable"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="peekFastDrawable"
+ return="android.graphics.drawable.Drawable"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="sendWallpaperCommand"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="windowToken" type="android.os.IBinder">
+</parameter>
+<parameter name="action" type="java.lang.String">
+</parameter>
+<parameter name="x" type="int">
+</parameter>
+<parameter name="y" type="int">
+</parameter>
+<parameter name="z" type="int">
+</parameter>
+<parameter name="extras" type="android.os.Bundle">
+</parameter>
+</method>
+<method name="setBitmap"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="bitmap" type="android.graphics.Bitmap">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="setResource"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="resid" type="int">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="setStream"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="data" type="java.io.InputStream">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="setWallpaperOffsetSteps"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="xStep" type="float">
+</parameter>
+<parameter name="yStep" type="float">
+</parameter>
+</method>
+<method name="setWallpaperOffsets"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="windowToken" type="android.os.IBinder">
+</parameter>
+<parameter name="xOffset" type="float">
+</parameter>
+<parameter name="yOffset" type="float">
+</parameter>
+</method>
+<method name="suggestDesiredDimensions"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="minimumWidth" type="int">
+</parameter>
+<parameter name="minimumHeight" type="int">
+</parameter>
+</method>
+<field name="ACTION_LIVE_WALLPAPER_CHOOSER"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.service.wallpaper.LIVE_WALLPAPER_CHOOSER&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="COMMAND_DROP"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.home.drop&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="COMMAND_TAP"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.wallpaper.tap&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+</package>
+<package name="android.app.admin"
+>
+<class name="DeviceAdminInfo"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="android.os.Parcelable">
+</implements>
+<constructor name="DeviceAdminInfo"
+ type="android.app.admin.DeviceAdminInfo"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="context" type="android.content.Context">
+</parameter>
+<parameter name="receiver" type="android.content.pm.ResolveInfo">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+<exception name="XmlPullParserException" type="org.xmlpull.v1.XmlPullParserException">
+</exception>
+</constructor>
+<method name="describeContents"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="dump"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="pw" type="android.util.Printer">
+</parameter>
+<parameter name="prefix" type="java.lang.String">
+</parameter>
+</method>
+<method name="getActivityInfo"
+ return="android.content.pm.ActivityInfo"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getComponent"
+ return="android.content.ComponentName"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getPackageName"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getReceiverName"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getTagForPolicy"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="policyIdent" type="int">
+</parameter>
+</method>
+<method name="isVisible"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="loadDescription"
+ return="java.lang.CharSequence"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="pm" type="android.content.pm.PackageManager">
+</parameter>
+<exception name="Resources.NotFoundException" type="android.content.res.Resources.NotFoundException">
+</exception>
+</method>
+<method name="loadIcon"
+ return="android.graphics.drawable.Drawable"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="pm" type="android.content.pm.PackageManager">
+</parameter>
+</method>
+<method name="loadLabel"
+ return="java.lang.CharSequence"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="pm" type="android.content.pm.PackageManager">
+</parameter>
+</method>
+<method name="usesPolicy"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="policyIdent" type="int">
+</parameter>
+</method>
+<method name="writeToParcel"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="dest" type="android.os.Parcel">
+</parameter>
+<parameter name="flags" type="int">
+</parameter>
+</method>
+<field name="CREATOR"
+ type="android.os.Parcelable.Creator"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="USES_POLICY_FORCE_LOCK"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="3"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="USES_POLICY_LIMIT_PASSWORD"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="0"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="USES_POLICY_RESET_PASSWORD"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="USES_POLICY_WATCH_LOGIN"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="USES_POLICY_WIPE_DATA"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="4"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<class name="DeviceAdminReceiver"
+ extends="android.content.BroadcastReceiver"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="DeviceAdminReceiver"
+ type="android.app.admin.DeviceAdminReceiver"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<method name="getManager"
+ return="android.app.admin.DevicePolicyManager"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="context" type="android.content.Context">
+</parameter>
+</method>
+<method name="getWho"
+ return="android.content.ComponentName"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="context" type="android.content.Context">
+</parameter>
+</method>
+<method name="onDisableRequested"
+ return="java.lang.CharSequence"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="context" type="android.content.Context">
+</parameter>
+<parameter name="intent" type="android.content.Intent">
+</parameter>
+</method>
+<method name="onDisabled"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="context" type="android.content.Context">
+</parameter>
+<parameter name="intent" type="android.content.Intent">
+</parameter>
+</method>
+<method name="onEnabled"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="context" type="android.content.Context">
+</parameter>
+<parameter name="intent" type="android.content.Intent">
+</parameter>
+</method>
+<method name="onPasswordChanged"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="context" type="android.content.Context">
+</parameter>
+<parameter name="intent" type="android.content.Intent">
+</parameter>
+</method>
+<method name="onPasswordFailed"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="context" type="android.content.Context">
+</parameter>
+<parameter name="intent" type="android.content.Intent">
+</parameter>
+</method>
+<method name="onPasswordSucceeded"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="context" type="android.content.Context">
+</parameter>
+<parameter name="intent" type="android.content.Intent">
+</parameter>
+</method>
+<method name="onReceive"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="context" type="android.content.Context">
+</parameter>
+<parameter name="intent" type="android.content.Intent">
+</parameter>
+</method>
+<field name="ACTION_DEVICE_ADMIN_DISABLED"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.app.action.DEVICE_ADMIN_DISABLED&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ACTION_DEVICE_ADMIN_DISABLE_REQUESTED"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.app.action.DEVICE_ADMIN_DISABLE_REQUESTED&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ACTION_DEVICE_ADMIN_ENABLED"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.app.action.DEVICE_ADMIN_ENABLED&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ACTION_PASSWORD_CHANGED"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.app.action.ACTION_PASSWORD_CHANGED&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ACTION_PASSWORD_FAILED"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.app.action.ACTION_PASSWORD_FAILED&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ACTION_PASSWORD_SUCCEEDED"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.app.action.ACTION_PASSWORD_SUCCEEDED&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="DEVICE_ADMIN_META_DATA"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.app.device_admin&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="EXTRA_DISABLE_WARNING"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.app.extra.DISABLE_WARNING&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<class name="DevicePolicyManager"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="getActiveAdmins"
+ return="java.util.List&lt;android.content.ComponentName&gt;"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getCurrentFailedPasswordAttempts"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getMaximumFailedPasswordsForWipe"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="admin" type="android.content.ComponentName">
+</parameter>
+</method>
+<method name="getMaximumTimeToLock"
+ return="long"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="admin" type="android.content.ComponentName">
+</parameter>
+</method>
+<method name="getPasswordMaximumLength"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="quality" type="int">
+</parameter>
+</method>
+<method name="getPasswordMinimumLength"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="admin" type="android.content.ComponentName">
+</parameter>
+</method>
+<method name="getPasswordQuality"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="admin" type="android.content.ComponentName">
+</parameter>
+</method>
+<method name="isActivePasswordSufficient"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isAdminActive"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="who" type="android.content.ComponentName">
+</parameter>
+</method>
+<method name="lockNow"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="removeActiveAdmin"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="who" type="android.content.ComponentName">
+</parameter>
+</method>
+<method name="resetPassword"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="password" type="java.lang.String">
+</parameter>
+<parameter name="flags" type="int">
+</parameter>
+</method>
+<method name="setMaximumFailedPasswordsForWipe"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="admin" type="android.content.ComponentName">
+</parameter>
+<parameter name="num" type="int">
+</parameter>
+</method>
+<method name="setMaximumTimeToLock"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="admin" type="android.content.ComponentName">
+</parameter>
+<parameter name="timeMs" type="long">
+</parameter>
+</method>
+<method name="setPasswordMinimumLength"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="admin" type="android.content.ComponentName">
+</parameter>
+<parameter name="length" type="int">
+</parameter>
+</method>
+<method name="setPasswordQuality"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="admin" type="android.content.ComponentName">
+</parameter>
+<parameter name="quality" type="int">
+</parameter>
+</method>
+<method name="wipeData"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="flags" type="int">
+</parameter>
+</method>
+<field name="ACTION_ADD_DEVICE_ADMIN"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.app.action.ADD_DEVICE_ADMIN&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ACTION_SET_NEW_PASSWORD"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.app.action.SET_NEW_PASSWORD&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="EXTRA_ADD_EXPLANATION"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.app.extra.ADD_EXPLANATION&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="EXTRA_DEVICE_ADMIN"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.app.extra.DEVICE_ADMIN&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="PASSWORD_QUALITY_ALPHABETIC"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="262144"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="PASSWORD_QUALITY_ALPHANUMERIC"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="327680"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="PASSWORD_QUALITY_NUMERIC"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="131072"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="PASSWORD_QUALITY_SOMETHING"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="65536"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="PASSWORD_QUALITY_UNSPECIFIED"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="0"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="RESET_PASSWORD_REQUIRE_ENTRY"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+</package>
+<package name="android.app.backup"
+>
+<class name="BackupAgent"
+ extends="android.content.ContextWrapper"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="BackupAgent"
+ type="android.app.backup.BackupAgent"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<method name="onBackup"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="oldState" type="android.os.ParcelFileDescriptor">
+</parameter>
+<parameter name="data" type="android.app.backup.BackupDataOutput">
+</parameter>
+<parameter name="newState" type="android.os.ParcelFileDescriptor">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="onCreate"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="onDestroy"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="onRestore"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="data" type="android.app.backup.BackupDataInput">
+</parameter>
+<parameter name="appVersionCode" type="int">
+</parameter>
+<parameter name="newState" type="android.os.ParcelFileDescriptor">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+</class>
+<class name="BackupAgentHelper"
+ extends="android.app.backup.BackupAgent"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="BackupAgentHelper"
+ type="android.app.backup.BackupAgentHelper"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<method name="addHelper"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="keyPrefix" type="java.lang.String">
+</parameter>
+<parameter name="helper" type="android.app.backup.BackupHelper">
+</parameter>
+</method>
+<method name="onBackup"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="oldState" type="android.os.ParcelFileDescriptor">
+</parameter>
+<parameter name="data" type="android.app.backup.BackupDataOutput">
+</parameter>
+<parameter name="newState" type="android.os.ParcelFileDescriptor">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="onRestore"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="data" type="android.app.backup.BackupDataInput">
+</parameter>
+<parameter name="appVersionCode" type="int">
+</parameter>
+<parameter name="newState" type="android.os.ParcelFileDescriptor">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+</class>
+<class name="BackupDataInput"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="getDataSize"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getKey"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="readEntityData"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="data" type="byte[]">
+</parameter>
+<parameter name="offset" type="int">
+</parameter>
+<parameter name="size" type="int">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="readNextHeader"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="skipEntityData"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+</class>
+<class name="BackupDataInputStream"
+ extends="java.io.InputStream"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="getKey"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="read"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="size"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+</class>
+<class name="BackupDataOutput"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="writeEntityData"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="data" type="byte[]">
+</parameter>
+<parameter name="size" type="int">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="writeEntityHeader"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="key" type="java.lang.String">
+</parameter>
+<parameter name="dataSize" type="int">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+</class>
+<interface name="BackupHelper"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="performBackup"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="oldState" type="android.os.ParcelFileDescriptor">
+</parameter>
+<parameter name="data" type="android.app.backup.BackupDataOutput">
+</parameter>
+<parameter name="newState" type="android.os.ParcelFileDescriptor">
+</parameter>
+</method>
+<method name="restoreEntity"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="data" type="android.app.backup.BackupDataInputStream">
+</parameter>
+</method>
+<method name="writeNewStateDescription"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="fd" type="android.os.ParcelFileDescriptor">
+</parameter>
+</method>
+</interface>
+<class name="BackupManager"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="BackupManager"
+ type="android.app.backup.BackupManager"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="context" type="android.content.Context">
+</parameter>
+</constructor>
+<method name="dataChanged"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="dataChanged"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="packageName" type="java.lang.String">
+</parameter>
+</method>
+<method name="requestRestore"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="observer" type="android.app.backup.RestoreObserver">
+</parameter>
+</method>
+</class>
+<class name="FileBackupHelper"
+ extends="android.app.backup.FileBackupHelperBase"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="android.app.backup.BackupHelper">
+</implements>
+<constructor name="FileBackupHelper"
+ type="android.app.backup.FileBackupHelper"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="context" type="android.content.Context">
+</parameter>
+<parameter name="files" type="java.lang.String...">
+</parameter>
+</constructor>
+<method name="performBackup"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="oldState" type="android.os.ParcelFileDescriptor">
+</parameter>
+<parameter name="data" type="android.app.backup.BackupDataOutput">
+</parameter>
+<parameter name="newState" type="android.os.ParcelFileDescriptor">
+</parameter>
+</method>
+<method name="restoreEntity"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="data" type="android.app.backup.BackupDataInputStream">
+</parameter>
+</method>
+</class>
+<class name="FileBackupHelperBase"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility=""
+>
+<method name="writeNewStateDescription"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="fd" type="android.os.ParcelFileDescriptor">
+</parameter>
+</method>
+</class>
+<class name="RestoreObserver"
+ extends="java.lang.Object"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="RestoreObserver"
+ type="android.app.backup.RestoreObserver"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<method name="onUpdate"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="nowBeingRestored" type="int">
+</parameter>
+<parameter name="currentPackage" type="java.lang.String">
+</parameter>
+</method>
+<method name="restoreFinished"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="error" type="int">
+</parameter>
+</method>
+<method name="restoreStarting"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="numPackages" type="int">
+</parameter>
+</method>
+</class>
+<class name="SharedPreferencesBackupHelper"
+ extends="android.app.backup.FileBackupHelperBase"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="android.app.backup.BackupHelper">
+</implements>
+<constructor name="SharedPreferencesBackupHelper"
+ type="android.app.backup.SharedPreferencesBackupHelper"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="context" type="android.content.Context">
+</parameter>
+<parameter name="prefGroups" type="java.lang.String...">
+</parameter>
+</constructor>
+<method name="performBackup"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="oldState" type="android.os.ParcelFileDescriptor">
+</parameter>
+<parameter name="data" type="android.app.backup.BackupDataOutput">
+</parameter>
+<parameter name="newState" type="android.os.ParcelFileDescriptor">
+</parameter>
+</method>
+<method name="restoreEntity"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="data" type="android.app.backup.BackupDataInputStream">
+</parameter>
+</method>
+</class>
+</package>
+<package name="android.appwidget"
+>
+<class name="AppWidgetHost"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="AppWidgetHost"
+ type="android.appwidget.AppWidgetHost"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="context" type="android.content.Context">
+</parameter>
+<parameter name="hostId" type="int">
+</parameter>
+</constructor>
+<method name="allocateAppWidgetId"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="createView"
+ return="android.appwidget.AppWidgetHostView"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="context" type="android.content.Context">
+</parameter>
+<parameter name="appWidgetId" type="int">
+</parameter>
+<parameter name="appWidget" type="android.appwidget.AppWidgetProviderInfo">
+</parameter>
+</method>
+<method name="deleteAllHosts"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="deleteAppWidgetId"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="appWidgetId" type="int">
+</parameter>
+</method>
+<method name="deleteHost"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="onCreateView"
+ return="android.appwidget.AppWidgetHostView"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="context" type="android.content.Context">
+</parameter>
+<parameter name="appWidgetId" type="int">
+</parameter>
+<parameter name="appWidget" type="android.appwidget.AppWidgetProviderInfo">
+</parameter>
+</method>
+<method name="onProviderChanged"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="appWidgetId" type="int">
+</parameter>
+<parameter name="appWidget" type="android.appwidget.AppWidgetProviderInfo">
+</parameter>
+</method>
+<method name="startListening"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="stopListening"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+</class>
+<class name="AppWidgetHostView"
+ extends="android.widget.FrameLayout"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="AppWidgetHostView"
+ type="android.appwidget.AppWidgetHostView"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="context" type="android.content.Context">
+</parameter>
+</constructor>
+<constructor name="AppWidgetHostView"
+ type="android.appwidget.AppWidgetHostView"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="context" type="android.content.Context">
+</parameter>
+<parameter name="animationIn" type="int">
+</parameter>
+<parameter name="animationOut" type="int">
+</parameter>
+</constructor>
+<method name="getAppWidgetId"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getAppWidgetInfo"
+ return="android.appwidget.AppWidgetProviderInfo"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getDefaultView"
+ return="android.view.View"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</method>
+<method name="getErrorView"
+ return="android.view.View"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</method>
+<method name="prepareView"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="view" type="android.view.View">
+</parameter>
+</method>
+<method name="setAppWidget"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="appWidgetId" type="int">
+</parameter>
+<parameter name="info" type="android.appwidget.AppWidgetProviderInfo">
+</parameter>
+</method>
+<method name="updateAppWidget"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="remoteViews" type="android.widget.RemoteViews">
+</parameter>
+</method>
+</class>
+<class name="AppWidgetManager"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="bindAppWidgetId"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="appWidgetId" type="int">
+</parameter>
+<parameter name="provider" type="android.content.ComponentName">
+</parameter>
+</method>
+<method name="getAppWidgetIds"
+ return="int[]"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="provider" type="android.content.ComponentName">
+</parameter>
+</method>
+<method name="getAppWidgetInfo"
+ return="android.appwidget.AppWidgetProviderInfo"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="appWidgetId" type="int">
+</parameter>
+</method>
+<method name="getInstalledProviders"
+ return="java.util.List&lt;android.appwidget.AppWidgetProviderInfo&gt;"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getInstance"
+ return="android.appwidget.AppWidgetManager"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="context" type="android.content.Context">
+</parameter>
+</method>
+<method name="updateAppWidget"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="appWidgetIds" type="int[]">
+</parameter>
+<parameter name="views" type="android.widget.RemoteViews">
+</parameter>
+</method>
+<method name="updateAppWidget"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="appWidgetId" type="int">
+</parameter>
+<parameter name="views" type="android.widget.RemoteViews">
+</parameter>
+</method>
+<method name="updateAppWidget"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="provider" type="android.content.ComponentName">
+</parameter>
+<parameter name="views" type="android.widget.RemoteViews">
+</parameter>
+</method>
+<field name="ACTION_APPWIDGET_CONFIGURE"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.appwidget.action.APPWIDGET_CONFIGURE&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ACTION_APPWIDGET_DELETED"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.appwidget.action.APPWIDGET_DELETED&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ACTION_APPWIDGET_DISABLED"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.appwidget.action.APPWIDGET_DISABLED&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ACTION_APPWIDGET_ENABLED"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.appwidget.action.APPWIDGET_ENABLED&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ACTION_APPWIDGET_PICK"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.appwidget.action.APPWIDGET_PICK&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ACTION_APPWIDGET_UPDATE"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.appwidget.action.APPWIDGET_UPDATE&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="EXTRA_APPWIDGET_ID"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;appWidgetId&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="EXTRA_APPWIDGET_IDS"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;appWidgetIds&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="EXTRA_CUSTOM_EXTRAS"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;customExtras&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="EXTRA_CUSTOM_INFO"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;customInfo&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="INVALID_APPWIDGET_ID"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="0"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="META_DATA_APPWIDGET_PROVIDER"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.appwidget.provider&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<class name="AppWidgetProvider"
+ extends="android.content.BroadcastReceiver"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="AppWidgetProvider"
+ type="android.appwidget.AppWidgetProvider"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<method name="onDeleted"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="context" type="android.content.Context">
+</parameter>
+<parameter name="appWidgetIds" type="int[]">
+</parameter>
+</method>
+<method name="onDisabled"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="context" type="android.content.Context">
+</parameter>
+</method>
+<method name="onEnabled"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="context" type="android.content.Context">
+</parameter>
+</method>
+<method name="onReceive"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="context" type="android.content.Context">
+</parameter>
+<parameter name="intent" type="android.content.Intent">
+</parameter>
+</method>
+<method name="onUpdate"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="context" type="android.content.Context">
+</parameter>
+<parameter name="appWidgetManager" type="android.appwidget.AppWidgetManager">
+</parameter>
+<parameter name="appWidgetIds" type="int[]">
+</parameter>
+</method>
+</class>
+<class name="AppWidgetProviderInfo"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="android.os.Parcelable">
+</implements>
+<constructor name="AppWidgetProviderInfo"
+ type="android.appwidget.AppWidgetProviderInfo"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<constructor name="AppWidgetProviderInfo"
+ type="android.appwidget.AppWidgetProviderInfo"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="in" type="android.os.Parcel">
+</parameter>
+</constructor>
+<method name="describeContents"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="writeToParcel"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="out" type="android.os.Parcel">
+</parameter>
+<parameter name="flags" type="int">
+</parameter>
+</method>
+<field name="CREATOR"
+ type="android.os.Parcelable.Creator"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="configure"
+ type="android.content.ComponentName"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="icon"
+ type="int"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="initialLayout"
+ type="int"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="label"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="minHeight"
+ type="int"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="minWidth"
+ type="int"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="provider"
+ type="android.content.ComponentName"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="updatePeriodMillis"
+ type="int"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+</package>
+<package name="android.bluetooth"
+>
+<class name="BluetoothAdapter"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="cancelDiscovery"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="checkBluetoothAddress"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="address" type="java.lang.String">
+</parameter>
+</method>
+<method name="disable"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="enable"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getAddress"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getBondedDevices"
+ return="java.util.Set&lt;android.bluetooth.BluetoothDevice&gt;"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getDefaultAdapter"
+ return="android.bluetooth.BluetoothAdapter"
+ abstract="false"
+ native="false"
+ synchronized="true"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getName"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getRemoteDevice"
+ return="android.bluetooth.BluetoothDevice"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="address" type="java.lang.String">
+</parameter>
+</method>
+<method name="getScanMode"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getState"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isDiscovering"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isEnabled"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="listenUsingRfcommWithServiceRecord"
+ return="android.bluetooth.BluetoothServerSocket"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+<parameter name="uuid" type="java.util.UUID">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="setName"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+</method>
+<method name="startDiscovery"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<field name="ACTION_DISCOVERY_FINISHED"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.bluetooth.adapter.action.DISCOVERY_FINISHED&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ACTION_DISCOVERY_STARTED"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.bluetooth.adapter.action.DISCOVERY_STARTED&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ACTION_LOCAL_NAME_CHANGED"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.bluetooth.adapter.action.LOCAL_NAME_CHANGED&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ACTION_REQUEST_DISCOVERABLE"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.bluetooth.adapter.action.REQUEST_DISCOVERABLE&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ACTION_REQUEST_ENABLE"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.bluetooth.adapter.action.REQUEST_ENABLE&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ACTION_SCAN_MODE_CHANGED"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.bluetooth.adapter.action.SCAN_MODE_CHANGED&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ACTION_STATE_CHANGED"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.bluetooth.adapter.action.STATE_CHANGED&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ERROR"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="-2147483648"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="EXTRA_DISCOVERABLE_DURATION"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.bluetooth.adapter.extra.DISCOVERABLE_DURATION&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="EXTRA_LOCAL_NAME"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.bluetooth.adapter.extra.LOCAL_NAME&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="EXTRA_PREVIOUS_SCAN_MODE"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.bluetooth.adapter.extra.PREVIOUS_SCAN_MODE&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="EXTRA_PREVIOUS_STATE"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.bluetooth.adapter.extra.PREVIOUS_STATE&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="EXTRA_SCAN_MODE"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.bluetooth.adapter.extra.SCAN_MODE&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="EXTRA_STATE"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.bluetooth.adapter.extra.STATE&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="SCAN_MODE_CONNECTABLE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="21"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="SCAN_MODE_CONNECTABLE_DISCOVERABLE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="23"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="SCAN_MODE_NONE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="20"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="STATE_OFF"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="10"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="STATE_ON"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="12"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="STATE_TURNING_OFF"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="13"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="STATE_TURNING_ON"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="11"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<class name="BluetoothClass"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="android.os.Parcelable">
+</implements>
+<method name="describeContents"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getDeviceClass"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getMajorDeviceClass"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="hasService"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="service" type="int">
+</parameter>
+</method>
+<method name="writeToParcel"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="out" type="android.os.Parcel">
+</parameter>
+<parameter name="flags" type="int">
+</parameter>
+</method>
+<field name="CREATOR"
+ type="android.os.Parcelable.Creator"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<class name="BluetoothClass.Device"
+ extends="java.lang.Object"
+ abstract="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="BluetoothClass.Device"
+ type="android.bluetooth.BluetoothClass.Device"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<field name="AUDIO_VIDEO_CAMCORDER"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1076"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="AUDIO_VIDEO_CAR_AUDIO"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1056"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="AUDIO_VIDEO_HANDSFREE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1032"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="AUDIO_VIDEO_HEADPHONES"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1048"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="AUDIO_VIDEO_HIFI_AUDIO"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1064"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="AUDIO_VIDEO_LOUDSPEAKER"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1044"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="AUDIO_VIDEO_MICROPHONE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1040"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="AUDIO_VIDEO_PORTABLE_AUDIO"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1052"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="AUDIO_VIDEO_SET_TOP_BOX"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1060"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="AUDIO_VIDEO_UNCATEGORIZED"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1024"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="AUDIO_VIDEO_VCR"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1068"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="AUDIO_VIDEO_VIDEO_CAMERA"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1072"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="AUDIO_VIDEO_VIDEO_CONFERENCING"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1088"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="AUDIO_VIDEO_VIDEO_DISPLAY_AND_LOUDSPEAKER"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1084"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="AUDIO_VIDEO_VIDEO_GAMING_TOY"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1096"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="AUDIO_VIDEO_VIDEO_MONITOR"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1080"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="AUDIO_VIDEO_WEARABLE_HEADSET"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1028"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="COMPUTER_DESKTOP"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="260"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="COMPUTER_HANDHELD_PC_PDA"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="272"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="COMPUTER_LAPTOP"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="268"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="COMPUTER_PALM_SIZE_PC_PDA"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="276"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="COMPUTER_SERVER"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="264"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="COMPUTER_UNCATEGORIZED"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="256"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="COMPUTER_WEARABLE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="280"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="HEALTH_BLOOD_PRESSURE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2308"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="HEALTH_DATA_DISPLAY"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2332"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="HEALTH_GLUCOSE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2320"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="HEALTH_PULSE_OXIMETER"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2324"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="HEALTH_PULSE_RATE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2328"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="HEALTH_THERMOMETER"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2312"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="HEALTH_UNCATEGORIZED"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2304"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="HEALTH_WEIGHING"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2316"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="PHONE_CELLULAR"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="516"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="PHONE_CORDLESS"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="520"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="PHONE_ISDN"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="532"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="PHONE_MODEM_OR_GATEWAY"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="528"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="PHONE_SMART"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="524"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="PHONE_UNCATEGORIZED"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="512"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TOY_CONTROLLER"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2064"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TOY_DOLL_ACTION_FIGURE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2060"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TOY_GAME"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2068"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TOY_ROBOT"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2052"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TOY_UNCATEGORIZED"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2048"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TOY_VEHICLE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2056"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="WEARABLE_GLASSES"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1812"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="WEARABLE_HELMET"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1808"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="WEARABLE_JACKET"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1804"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="WEARABLE_PAGER"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1800"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="WEARABLE_UNCATEGORIZED"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1792"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="WEARABLE_WRIST_WATCH"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1796"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<class name="BluetoothClass.Device.Major"
+ extends="java.lang.Object"
+ abstract="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="BluetoothClass.Device.Major"
+ type="android.bluetooth.BluetoothClass.Device.Major"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<field name="AUDIO_VIDEO"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1024"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="COMPUTER"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="256"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="HEALTH"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2304"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="IMAGING"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1536"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="MISC"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="0"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="NETWORKING"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="768"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="PERIPHERAL"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1280"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="PHONE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="512"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TOY"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2048"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="UNCATEGORIZED"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="7936"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="WEARABLE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1792"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<class name="BluetoothClass.Service"
+ extends="java.lang.Object"
+ abstract="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="BluetoothClass.Service"
+ type="android.bluetooth.BluetoothClass.Service"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<field name="AUDIO"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2097152"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="CAPTURE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="524288"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="INFORMATION"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="8388608"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="LIMITED_DISCOVERABILITY"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="8192"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="NETWORKING"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="131072"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="OBJECT_TRANSFER"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1048576"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="POSITIONING"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="65536"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="RENDER"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="262144"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TELEPHONY"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="4194304"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<class name="BluetoothDevice"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="android.os.Parcelable">
+</implements>
+<method name="createRfcommSocketToServiceRecord"
+ return="android.bluetooth.BluetoothSocket"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="uuid" type="java.util.UUID">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="describeContents"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getAddress"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getBluetoothClass"
+ return="android.bluetooth.BluetoothClass"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getBondState"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getName"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="writeToParcel"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="out" type="android.os.Parcel">
+</parameter>
+<parameter name="flags" type="int">
+</parameter>
+</method>
+<field name="ACTION_ACL_CONNECTED"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.bluetooth.device.action.ACL_CONNECTED&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ACTION_ACL_DISCONNECTED"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.bluetooth.device.action.ACL_DISCONNECTED&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ACTION_ACL_DISCONNECT_REQUESTED"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.bluetooth.device.action.ACL_DISCONNECT_REQUESTED&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ACTION_BOND_STATE_CHANGED"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.bluetooth.device.action.BOND_STATE_CHANGED&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ACTION_CLASS_CHANGED"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.bluetooth.device.action.CLASS_CHANGED&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ACTION_FOUND"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.bluetooth.device.action.FOUND&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ACTION_NAME_CHANGED"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.bluetooth.device.action.NAME_CHANGED&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="BOND_BONDED"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="12"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="BOND_BONDING"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="11"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="BOND_NONE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="10"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="CREATOR"
+ type="android.os.Parcelable.Creator"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ERROR"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="-2147483648"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="EXTRA_BOND_STATE"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.bluetooth.device.extra.BOND_STATE&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="EXTRA_CLASS"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.bluetooth.device.extra.CLASS&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="EXTRA_DEVICE"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.bluetooth.device.extra.DEVICE&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="EXTRA_NAME"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.bluetooth.device.extra.NAME&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="EXTRA_PREVIOUS_BOND_STATE"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.bluetooth.device.extra.PREVIOUS_BOND_STATE&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="EXTRA_RSSI"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.bluetooth.device.extra.RSSI&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<class name="BluetoothServerSocket"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="java.io.Closeable">
+</implements>
+<method name="accept"
+ return="android.bluetooth.BluetoothSocket"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="accept"
+ return="android.bluetooth.BluetoothSocket"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="timeout" type="int">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="close"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+</class>
+<class name="BluetoothSocket"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="java.io.Closeable">
+</implements>
+<method name="close"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="connect"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="getInputStream"
+ return="java.io.InputStream"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="getOutputStream"
+ return="java.io.OutputStream"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="getRemoteDevice"
+ return="android.bluetooth.BluetoothDevice"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+</class>
+</package>
+<package name="android.content"
+>
+<class name="AbstractThreadedSyncAdapter"
+ extends="java.lang.Object"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="AbstractThreadedSyncAdapter"
+ type="android.content.AbstractThreadedSyncAdapter"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="context" type="android.content.Context">
+</parameter>
+<parameter name="autoInitialize" type="boolean">
+</parameter>
+</constructor>
+<method name="getContext"
+ return="android.content.Context"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getSyncAdapterBinder"
+ return="android.os.IBinder"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="onPerformSync"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="account" type="android.accounts.Account">
+</parameter>
+<parameter name="extras" type="android.os.Bundle">
+</parameter>
+<parameter name="authority" type="java.lang.String">
+</parameter>
+<parameter name="provider" type="android.content.ContentProviderClient">
+</parameter>
+<parameter name="syncResult" type="android.content.SyncResult">
+</parameter>
+</method>
+<method name="onSyncCanceled"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<field name="LOG_SYNC_DETAILS"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2743"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<class name="ActivityNotFoundException"
+ extends="java.lang.RuntimeException"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="ActivityNotFoundException"
+ type="android.content.ActivityNotFoundException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<constructor name="ActivityNotFoundException"
+ type="android.content.ActivityNotFoundException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+</constructor>
+</class>
+<class name="AsyncQueryHandler"
+ extends="android.os.Handler"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="AsyncQueryHandler"
+ type="android.content.AsyncQueryHandler"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="cr" type="android.content.ContentResolver">
+</parameter>
+</constructor>
+<method name="cancelOperation"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="token" type="int">
+</parameter>
+</method>
+<method name="createHandler"
+ return="android.os.Handler"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="looper" type="android.os.Looper">
+</parameter>
+</method>
+<method name="onDeleteComplete"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="token" type="int">
+</parameter>
+<parameter name="cookie" type="java.lang.Object">
+</parameter>
+<parameter name="result" type="int">
+</parameter>
+</method>
+<method name="onInsertComplete"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="token" type="int">
+</parameter>
+<parameter name="cookie" type="java.lang.Object">
+</parameter>
+<parameter name="uri" type="android.net.Uri">
+</parameter>
+</method>
+<method name="onQueryComplete"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="token" type="int">
+</parameter>
+<parameter name="cookie" type="java.lang.Object">
+</parameter>
+<parameter name="cursor" type="android.database.Cursor">
+</parameter>
+</method>
+<method name="onUpdateComplete"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="token" type="int">
+</parameter>
+<parameter name="cookie" type="java.lang.Object">
+</parameter>
+<parameter name="result" type="int">
+</parameter>
+</method>
+<method name="startDelete"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="token" type="int">
+</parameter>
+<parameter name="cookie" type="java.lang.Object">
+</parameter>
+<parameter name="uri" type="android.net.Uri">
+</parameter>
+<parameter name="selection" type="java.lang.String">
+</parameter>
+<parameter name="selectionArgs" type="java.lang.String[]">
+</parameter>
+</method>
+<method name="startInsert"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="token" type="int">
+</parameter>
+<parameter name="cookie" type="java.lang.Object">
+</parameter>
+<parameter name="uri" type="android.net.Uri">
+</parameter>
+<parameter name="initialValues" type="android.content.ContentValues">
+</parameter>
+</method>
+<method name="startQuery"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="token" type="int">
+</parameter>
+<parameter name="cookie" type="java.lang.Object">
+</parameter>
+<parameter name="uri" type="android.net.Uri">
+</parameter>
+<parameter name="projection" type="java.lang.String[]">
+</parameter>
+<parameter name="selection" type="java.lang.String">
+</parameter>
+<parameter name="selectionArgs" type="java.lang.String[]">
+</parameter>
+<parameter name="orderBy" type="java.lang.String">
+</parameter>
+</method>
+<method name="startUpdate"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="token" type="int">
+</parameter>
+<parameter name="cookie" type="java.lang.Object">
+</parameter>
+<parameter name="uri" type="android.net.Uri">
+</parameter>
+<parameter name="values" type="android.content.ContentValues">
+</parameter>
+<parameter name="selection" type="java.lang.String">
+</parameter>
+<parameter name="selectionArgs" type="java.lang.String[]">
+</parameter>
+</method>
+</class>
+<class name="AsyncQueryHandler.WorkerArgs"
+ extends="java.lang.Object"
+ abstract="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<constructor name="AsyncQueryHandler.WorkerArgs"
+ type="android.content.AsyncQueryHandler.WorkerArgs"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</constructor>
+<field name="cookie"
+ type="java.lang.Object"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="handler"
+ type="android.os.Handler"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="orderBy"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="projection"
+ type="java.lang.String[]"
+ transient="false"
+ volatile="false"
+ value="null"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="result"
+ type="java.lang.Object"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="selection"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="selectionArgs"
+ type="java.lang.String[]"
+ transient="false"
+ volatile="false"
+ value="null"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="uri"
+ type="android.net.Uri"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="values"
+ type="android.content.ContentValues"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<class name="AsyncQueryHandler.WorkerHandler"
+ extends="android.os.Handler"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<constructor name="AsyncQueryHandler.WorkerHandler"
+ type="android.content.AsyncQueryHandler.WorkerHandler"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="looper" type="android.os.Looper">
+</parameter>
+</constructor>
+</class>
+<class name="BroadcastReceiver"
+ extends="java.lang.Object"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="BroadcastReceiver"
+ type="android.content.BroadcastReceiver"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<method name="abortBroadcast"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="clearAbortBroadcast"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getAbortBroadcast"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getDebugUnregister"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getResultCode"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getResultData"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getResultExtras"
+ return="android.os.Bundle"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="makeMap" type="boolean">
+</parameter>
+</method>
+<method name="isInitialStickyBroadcast"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isOrderedBroadcast"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="onReceive"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="context" type="android.content.Context">
+</parameter>
+<parameter name="intent" type="android.content.Intent">
+</parameter>
+</method>
+<method name="peekService"
+ return="android.os.IBinder"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="myContext" type="android.content.Context">
+</parameter>
+<parameter name="service" type="android.content.Intent">
+</parameter>
+</method>
+<method name="setDebugUnregister"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="debug" type="boolean">
+</parameter>
+</method>
+<method name="setOrderedHint"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="isOrdered" type="boolean">
+</parameter>
+</method>
+<method name="setResult"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="code" type="int">
+</parameter>
+<parameter name="data" type="java.lang.String">
+</parameter>
+<parameter name="extras" type="android.os.Bundle">
+</parameter>
+</method>
+<method name="setResultCode"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="code" type="int">
+</parameter>
+</method>
+<method name="setResultData"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="data" type="java.lang.String">
+</parameter>
+</method>
+<method name="setResultExtras"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="extras" type="android.os.Bundle">
+</parameter>
+</method>
+</class>
+<interface name="ComponentCallbacks"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="onConfigurationChanged"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="newConfig" type="android.content.res.Configuration">
+</parameter>
+</method>
+<method name="onLowMemory"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+</interface>
+<class name="ComponentName"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="java.lang.Cloneable">
+</implements>
+<implements name="java.lang.Comparable">
+</implements>
+<implements name="android.os.Parcelable">
+</implements>
+<constructor name="ComponentName"
+ type="android.content.ComponentName"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="pkg" type="java.lang.String">
+</parameter>
+<parameter name="cls" type="java.lang.String">
+</parameter>
+</constructor>
+<constructor name="ComponentName"
+ type="android.content.ComponentName"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="pkg" type="android.content.Context">
+</parameter>
+<parameter name="cls" type="java.lang.String">
+</parameter>
+</constructor>
+<constructor name="ComponentName"
+ type="android.content.ComponentName"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="pkg" type="android.content.Context">
+</parameter>
+<parameter name="cls" type="java.lang.Class&lt;?&gt;">
+</parameter>
+</constructor>
+<constructor name="ComponentName"
+ type="android.content.ComponentName"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="in" type="android.os.Parcel">
+</parameter>
+</constructor>
+<method name="clone"
+ return="android.content.ComponentName"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="compareTo"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="that" type="android.content.ComponentName">
+</parameter>
+</method>
+<method name="describeContents"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="flattenToShortString"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="flattenToString"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getClassName"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getPackageName"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getShortClassName"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="readFromParcel"
+ return="android.content.ComponentName"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="in" type="android.os.Parcel">
+</parameter>
+</method>
+<method name="toShortString"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="unflattenFromString"
+ return="android.content.ComponentName"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="str" type="java.lang.String">
+</parameter>
+</method>
+<method name="writeToParcel"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="out" type="android.os.Parcel">
+</parameter>
+<parameter name="flags" type="int">
+</parameter>
+</method>
+<method name="writeToParcel"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="c" type="android.content.ComponentName">
+</parameter>
+<parameter name="out" type="android.os.Parcel">
+</parameter>
+</method>
+<field name="CREATOR"
+ type="android.os.Parcelable.Creator"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<class name="ContentProvider"
+ extends="java.lang.Object"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="android.content.ComponentCallbacks">
+</implements>
+<constructor name="ContentProvider"
+ type="android.content.ContentProvider"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<method name="applyBatch"
+ return="android.content.ContentProviderResult[]"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="operations" type="java.util.ArrayList&lt;android.content.ContentProviderOperation&gt;">
+</parameter>
+<exception name="OperationApplicationException" type="android.content.OperationApplicationException">
+</exception>
+</method>
+<method name="attachInfo"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="context" type="android.content.Context">
+</parameter>
+<parameter name="info" type="android.content.pm.ProviderInfo">
+</parameter>
+</method>
+<method name="bulkInsert"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="uri" type="android.net.Uri">
+</parameter>
+<parameter name="values" type="android.content.ContentValues[]">
+</parameter>
+</method>
+<method name="delete"
+ return="int"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="uri" type="android.net.Uri">
+</parameter>
+<parameter name="selection" type="java.lang.String">
+</parameter>
+<parameter name="selectionArgs" type="java.lang.String[]">
+</parameter>
+</method>
+<method name="getContext"
+ return="android.content.Context"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getPathPermissions"
+ return="android.content.pm.PathPermission[]"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getReadPermission"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getType"
+ return="java.lang.String"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="uri" type="android.net.Uri">
+</parameter>
+</method>
+<method name="getWritePermission"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="insert"
+ return="android.net.Uri"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="uri" type="android.net.Uri">
+</parameter>
+<parameter name="values" type="android.content.ContentValues">
+</parameter>
+</method>
+<method name="isTemporary"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</method>
+<method name="onConfigurationChanged"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="newConfig" type="android.content.res.Configuration">
+</parameter>
+</method>
+<method name="onCreate"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="onLowMemory"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="openAssetFile"
+ return="android.content.res.AssetFileDescriptor"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="uri" type="android.net.Uri">
+</parameter>
+<parameter name="mode" type="java.lang.String">
+</parameter>
+<exception name="FileNotFoundException" type="java.io.FileNotFoundException">
+</exception>
+</method>
+<method name="openFile"
+ return="android.os.ParcelFileDescriptor"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="uri" type="android.net.Uri">
+</parameter>
+<parameter name="mode" type="java.lang.String">
+</parameter>
+<exception name="FileNotFoundException" type="java.io.FileNotFoundException">
+</exception>
+</method>
+<method name="openFileHelper"
+ return="android.os.ParcelFileDescriptor"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="uri" type="android.net.Uri">
+</parameter>
+<parameter name="mode" type="java.lang.String">
+</parameter>
+<exception name="FileNotFoundException" type="java.io.FileNotFoundException">
+</exception>
+</method>
+<method name="query"
+ return="android.database.Cursor"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="uri" type="android.net.Uri">
+</parameter>
+<parameter name="projection" type="java.lang.String[]">
+</parameter>
+<parameter name="selection" type="java.lang.String">
+</parameter>
+<parameter name="selectionArgs" type="java.lang.String[]">
+</parameter>
+<parameter name="sortOrder" type="java.lang.String">
+</parameter>
+</method>
+<method name="setPathPermissions"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="permissions" type="android.content.pm.PathPermission[]">
+</parameter>
+</method>
+<method name="setReadPermission"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="permission" type="java.lang.String">
+</parameter>
+</method>
+<method name="setWritePermission"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="permission" type="java.lang.String">
+</parameter>
+</method>
+<method name="update"
+ return="int"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="uri" type="android.net.Uri">
+</parameter>
+<parameter name="values" type="android.content.ContentValues">
+</parameter>
+<parameter name="selection" type="java.lang.String">
+</parameter>
+<parameter name="selectionArgs" type="java.lang.String[]">
+</parameter>
+</method>
+</class>
+<class name="ContentProviderClient"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="applyBatch"
+ return="android.content.ContentProviderResult[]"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="operations" type="java.util.ArrayList&lt;android.content.ContentProviderOperation&gt;">
+</parameter>
+<exception name="OperationApplicationException" type="android.content.OperationApplicationException">
+</exception>
+<exception name="RemoteException" type="android.os.RemoteException">
+</exception>
+</method>
+<method name="bulkInsert"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="url" type="android.net.Uri">
+</parameter>
+<parameter name="initialValues" type="android.content.ContentValues[]">
+</parameter>
+<exception name="RemoteException" type="android.os.RemoteException">
+</exception>
+</method>
+<method name="delete"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="url" type="android.net.Uri">
+</parameter>
+<parameter name="selection" type="java.lang.String">
+</parameter>
+<parameter name="selectionArgs" type="java.lang.String[]">
+</parameter>
+<exception name="RemoteException" type="android.os.RemoteException">
+</exception>
+</method>
+<method name="getLocalContentProvider"
+ return="android.content.ContentProvider"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getType"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="url" type="android.net.Uri">
+</parameter>
+<exception name="RemoteException" type="android.os.RemoteException">
+</exception>
+</method>
+<method name="insert"
+ return="android.net.Uri"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="url" type="android.net.Uri">
+</parameter>
+<parameter name="initialValues" type="android.content.ContentValues">
+</parameter>
+<exception name="RemoteException" type="android.os.RemoteException">
+</exception>
+</method>
+<method name="openAssetFile"
+ return="android.content.res.AssetFileDescriptor"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="url" type="android.net.Uri">
+</parameter>
+<parameter name="mode" type="java.lang.String">
+</parameter>
+<exception name="FileNotFoundException" type="java.io.FileNotFoundException">
+</exception>
+<exception name="RemoteException" type="android.os.RemoteException">
+</exception>
+</method>
+<method name="openFile"
+ return="android.os.ParcelFileDescriptor"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="url" type="android.net.Uri">
+</parameter>
+<parameter name="mode" type="java.lang.String">
+</parameter>
+<exception name="FileNotFoundException" type="java.io.FileNotFoundException">
+</exception>
+<exception name="RemoteException" type="android.os.RemoteException">
+</exception>
+</method>
+<method name="query"
+ return="android.database.Cursor"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="url" type="android.net.Uri">
+</parameter>
+<parameter name="projection" type="java.lang.String[]">
+</parameter>
+<parameter name="selection" type="java.lang.String">
+</parameter>
+<parameter name="selectionArgs" type="java.lang.String[]">
+</parameter>
+<parameter name="sortOrder" type="java.lang.String">
+</parameter>
+<exception name="RemoteException" type="android.os.RemoteException">
+</exception>
+</method>
+<method name="release"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="update"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="url" type="android.net.Uri">
+</parameter>
+<parameter name="values" type="android.content.ContentValues">
+</parameter>
+<parameter name="selection" type="java.lang.String">
+</parameter>
+<parameter name="selectionArgs" type="java.lang.String[]">
+</parameter>
+<exception name="RemoteException" type="android.os.RemoteException">
+</exception>
+</method>
+</class>
+<class name="ContentProviderOperation"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="android.os.Parcelable">
+</implements>
+<method name="apply"
+ return="android.content.ContentProviderResult"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="provider" type="android.content.ContentProvider">
+</parameter>
+<parameter name="backRefs" type="android.content.ContentProviderResult[]">
+</parameter>
+<parameter name="numBackRefs" type="int">
+</parameter>
+<exception name="OperationApplicationException" type="android.content.OperationApplicationException">
+</exception>
+</method>
+<method name="describeContents"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getUri"
+ return="android.net.Uri"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isReadOperation"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isWriteOperation"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isYieldAllowed"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="newAssertQuery"
+ return="android.content.ContentProviderOperation.Builder"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="uri" type="android.net.Uri">
+</parameter>
+</method>
+<method name="newDelete"
+ return="android.content.ContentProviderOperation.Builder"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="uri" type="android.net.Uri">
+</parameter>
+</method>
+<method name="newInsert"
+ return="android.content.ContentProviderOperation.Builder"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="uri" type="android.net.Uri">
+</parameter>
+</method>
+<method name="newUpdate"
+ return="android.content.ContentProviderOperation.Builder"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="uri" type="android.net.Uri">
+</parameter>
+</method>
+<method name="resolveSelectionArgsBackReferences"
+ return="java.lang.String[]"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="backRefs" type="android.content.ContentProviderResult[]">
+</parameter>
+<parameter name="numBackRefs" type="int">
+</parameter>
+</method>
+<method name="resolveValueBackReferences"
+ return="android.content.ContentValues"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="backRefs" type="android.content.ContentProviderResult[]">
+</parameter>
+<parameter name="numBackRefs" type="int">
+</parameter>
+</method>
+<method name="writeToParcel"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="dest" type="android.os.Parcel">
+</parameter>
+<parameter name="flags" type="int">
+</parameter>
+</method>
+<field name="CREATOR"
+ type="android.os.Parcelable.Creator"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<class name="ContentProviderOperation.Builder"
+ extends="java.lang.Object"
+ abstract="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="build"
+ return="android.content.ContentProviderOperation"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="withExpectedCount"
+ return="android.content.ContentProviderOperation.Builder"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="count" type="int">
+</parameter>
+</method>
+<method name="withSelection"
+ return="android.content.ContentProviderOperation.Builder"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="selection" type="java.lang.String">
+</parameter>
+<parameter name="selectionArgs" type="java.lang.String[]">
+</parameter>
+</method>
+<method name="withSelectionBackReference"
+ return="android.content.ContentProviderOperation.Builder"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="selectionArgIndex" type="int">
+</parameter>
+<parameter name="previousResult" type="int">
+</parameter>
+</method>
+<method name="withValue"
+ return="android.content.ContentProviderOperation.Builder"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="key" type="java.lang.String">
+</parameter>
+<parameter name="value" type="java.lang.Object">
+</parameter>
+</method>
+<method name="withValueBackReference"
+ return="android.content.ContentProviderOperation.Builder"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="key" type="java.lang.String">
+</parameter>
+<parameter name="previousResult" type="int">
+</parameter>
+</method>
+<method name="withValueBackReferences"
+ return="android.content.ContentProviderOperation.Builder"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="backReferences" type="android.content.ContentValues">
+</parameter>
+</method>
+<method name="withValues"
+ return="android.content.ContentProviderOperation.Builder"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="values" type="android.content.ContentValues">
+</parameter>
+</method>
+<method name="withYieldAllowed"
+ return="android.content.ContentProviderOperation.Builder"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="yieldAllowed" type="boolean">
+</parameter>
+</method>
+</class>
+<class name="ContentProviderResult"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="android.os.Parcelable">
+</implements>
+<constructor name="ContentProviderResult"
+ type="android.content.ContentProviderResult"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="uri" type="android.net.Uri">
+</parameter>
+</constructor>
+<constructor name="ContentProviderResult"
+ type="android.content.ContentProviderResult"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="count" type="int">
+</parameter>
+</constructor>
+<constructor name="ContentProviderResult"
+ type="android.content.ContentProviderResult"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="source" type="android.os.Parcel">
+</parameter>
+</constructor>
+<method name="describeContents"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="writeToParcel"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="dest" type="android.os.Parcel">
+</parameter>
+<parameter name="flags" type="int">
+</parameter>
+</method>
+<field name="CREATOR"
+ type="android.os.Parcelable.Creator"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="count"
+ type="java.lang.Integer"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="uri"
+ type="android.net.Uri"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<class name="ContentQueryMap"
+ extends="java.util.Observable"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="ContentQueryMap"
+ type="android.content.ContentQueryMap"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="cursor" type="android.database.Cursor">
+</parameter>
+<parameter name="columnNameOfKey" type="java.lang.String">
+</parameter>
+<parameter name="keepUpdated" type="boolean">
+</parameter>
+<parameter name="handlerForUpdateNotifications" type="android.os.Handler">
+</parameter>
+</constructor>
+<method name="close"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getRows"
+ return="java.util.Map&lt;java.lang.String, android.content.ContentValues&gt;"
+ abstract="false"
+ native="false"
+ synchronized="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getValues"
+ return="android.content.ContentValues"
+ abstract="false"
+ native="false"
+ synchronized="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="rowName" type="java.lang.String">
+</parameter>
+</method>
+<method name="requery"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="setKeepUpdated"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="keepUpdated" type="boolean">
+</parameter>
+</method>
+</class>
+<class name="ContentResolver"
+ extends="java.lang.Object"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="ContentResolver"
+ type="android.content.ContentResolver"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="context" type="android.content.Context">
+</parameter>
+</constructor>
+<method name="acquireContentProviderClient"
+ return="android.content.ContentProviderClient"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="uri" type="android.net.Uri">
+</parameter>
+</method>
+<method name="acquireContentProviderClient"
+ return="android.content.ContentProviderClient"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+</method>
+<method name="addPeriodicSync"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="account" type="android.accounts.Account">
+</parameter>
+<parameter name="authority" type="java.lang.String">
+</parameter>
+<parameter name="extras" type="android.os.Bundle">
+</parameter>
+<parameter name="pollFrequency" type="long">
+</parameter>
+</method>
+<method name="addStatusChangeListener"
+ return="java.lang.Object"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="mask" type="int">
+</parameter>
+<parameter name="callback" type="android.content.SyncStatusObserver">
+</parameter>
+</method>
+<method name="applyBatch"
+ return="android.content.ContentProviderResult[]"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="authority" type="java.lang.String">
+</parameter>
+<parameter name="operations" type="java.util.ArrayList&lt;android.content.ContentProviderOperation&gt;">
+</parameter>
+<exception name="OperationApplicationException" type="android.content.OperationApplicationException">
+</exception>
+<exception name="RemoteException" type="android.os.RemoteException">
+</exception>
+</method>
+<method name="bulkInsert"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="url" type="android.net.Uri">
+</parameter>
+<parameter name="values" type="android.content.ContentValues[]">
+</parameter>
+</method>
+<method name="cancelSync"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="deprecated"
+ visibility="public"
+>
+<parameter name="uri" type="android.net.Uri">
+</parameter>
+</method>
+<method name="cancelSync"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="account" type="android.accounts.Account">
+</parameter>
+<parameter name="authority" type="java.lang.String">
+</parameter>
+</method>
+<method name="delete"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="url" type="android.net.Uri">
+</parameter>
+<parameter name="where" type="java.lang.String">
+</parameter>
+<parameter name="selectionArgs" type="java.lang.String[]">
+</parameter>
+</method>
+<method name="getCurrentSync"
+ return="android.content.SyncInfo"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getIsSyncable"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="account" type="android.accounts.Account">
+</parameter>
+<parameter name="authority" type="java.lang.String">
+</parameter>
+</method>
+<method name="getMasterSyncAutomatically"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getPeriodicSyncs"
+ return="java.util.List&lt;android.content.PeriodicSync&gt;"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="account" type="android.accounts.Account">
+</parameter>
+<parameter name="authority" type="java.lang.String">
+</parameter>
+</method>
+<method name="getSyncAdapterTypes"
+ return="android.content.SyncAdapterType[]"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getSyncAutomatically"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="account" type="android.accounts.Account">
+</parameter>
+<parameter name="authority" type="java.lang.String">
+</parameter>
+</method>
+<method name="getType"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="url" type="android.net.Uri">
+</parameter>
+</method>
+<method name="insert"
+ return="android.net.Uri"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="url" type="android.net.Uri">
+</parameter>
+<parameter name="values" type="android.content.ContentValues">
+</parameter>
+</method>
+<method name="isSyncActive"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="account" type="android.accounts.Account">
+</parameter>
+<parameter name="authority" type="java.lang.String">
+</parameter>
+</method>
+<method name="isSyncPending"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="account" type="android.accounts.Account">
+</parameter>
+<parameter name="authority" type="java.lang.String">
+</parameter>
+</method>
+<method name="notifyChange"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="uri" type="android.net.Uri">
+</parameter>
+<parameter name="observer" type="android.database.ContentObserver">
+</parameter>
+</method>
+<method name="notifyChange"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="uri" type="android.net.Uri">
+</parameter>
+<parameter name="observer" type="android.database.ContentObserver">
+</parameter>
+<parameter name="syncToNetwork" type="boolean">
+</parameter>
+</method>
+<method name="openAssetFileDescriptor"
+ return="android.content.res.AssetFileDescriptor"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="uri" type="android.net.Uri">
+</parameter>
+<parameter name="mode" type="java.lang.String">
+</parameter>
+<exception name="FileNotFoundException" type="java.io.FileNotFoundException">
+</exception>
+</method>
+<method name="openFileDescriptor"
+ return="android.os.ParcelFileDescriptor"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="uri" type="android.net.Uri">
+</parameter>
+<parameter name="mode" type="java.lang.String">
+</parameter>
+<exception name="FileNotFoundException" type="java.io.FileNotFoundException">
+</exception>
+</method>
+<method name="openInputStream"
+ return="java.io.InputStream"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="uri" type="android.net.Uri">
+</parameter>
+<exception name="FileNotFoundException" type="java.io.FileNotFoundException">
+</exception>
+</method>
+<method name="openOutputStream"
+ return="java.io.OutputStream"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="uri" type="android.net.Uri">
+</parameter>
+<exception name="FileNotFoundException" type="java.io.FileNotFoundException">
+</exception>
+</method>
+<method name="openOutputStream"
+ return="java.io.OutputStream"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="uri" type="android.net.Uri">
+</parameter>
+<parameter name="mode" type="java.lang.String">
+</parameter>
+<exception name="FileNotFoundException" type="java.io.FileNotFoundException">
+</exception>
+</method>
+<method name="query"
+ return="android.database.Cursor"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="uri" type="android.net.Uri">
+</parameter>
+<parameter name="projection" type="java.lang.String[]">
+</parameter>
+<parameter name="selection" type="java.lang.String">
+</parameter>
+<parameter name="selectionArgs" type="java.lang.String[]">
+</parameter>
+<parameter name="sortOrder" type="java.lang.String">
+</parameter>
+</method>
+<method name="registerContentObserver"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="uri" type="android.net.Uri">
+</parameter>
+<parameter name="notifyForDescendents" type="boolean">
+</parameter>
+<parameter name="observer" type="android.database.ContentObserver">
+</parameter>
+</method>
+<method name="removePeriodicSync"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="account" type="android.accounts.Account">
+</parameter>
+<parameter name="authority" type="java.lang.String">
+</parameter>
+<parameter name="extras" type="android.os.Bundle">
+</parameter>
+</method>
+<method name="removeStatusChangeListener"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="handle" type="java.lang.Object">
+</parameter>
+</method>
+<method name="requestSync"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="account" type="android.accounts.Account">
+</parameter>
+<parameter name="authority" type="java.lang.String">
+</parameter>
+<parameter name="extras" type="android.os.Bundle">
+</parameter>
+</method>
+<method name="setIsSyncable"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="account" type="android.accounts.Account">
+</parameter>
+<parameter name="authority" type="java.lang.String">
+</parameter>
+<parameter name="syncable" type="int">
+</parameter>
+</method>
+<method name="setMasterSyncAutomatically"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="sync" type="boolean">
+</parameter>
+</method>
+<method name="setSyncAutomatically"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="account" type="android.accounts.Account">
+</parameter>
+<parameter name="authority" type="java.lang.String">
+</parameter>
+<parameter name="sync" type="boolean">
+</parameter>
+</method>
+<method name="startSync"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="deprecated"
+ visibility="public"
+>
+<parameter name="uri" type="android.net.Uri">
+</parameter>
+<parameter name="extras" type="android.os.Bundle">
+</parameter>
+</method>
+<method name="unregisterContentObserver"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="observer" type="android.database.ContentObserver">
+</parameter>
+</method>
+<method name="update"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="uri" type="android.net.Uri">
+</parameter>
+<parameter name="values" type="android.content.ContentValues">
+</parameter>
+<parameter name="where" type="java.lang.String">
+</parameter>
+<parameter name="selectionArgs" type="java.lang.String[]">
+</parameter>
+</method>
+<method name="validateSyncExtrasBundle"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="extras" type="android.os.Bundle">
+</parameter>
+</method>
+<field name="CURSOR_DIR_BASE_TYPE"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;vnd.android.cursor.dir&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="CURSOR_ITEM_BASE_TYPE"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;vnd.android.cursor.item&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="SCHEME_ANDROID_RESOURCE"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.resource&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="SCHEME_CONTENT"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;content&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="SCHEME_FILE"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;file&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="SYNC_EXTRAS_ACCOUNT"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;account&quot;"
+ static="true"
+ final="true"
+ deprecated="deprecated"
+ visibility="public"
+>
+</field>
+<field name="SYNC_EXTRAS_DISCARD_LOCAL_DELETIONS"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;discard_deletions&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="SYNC_EXTRAS_DO_NOT_RETRY"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;do_not_retry&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="SYNC_EXTRAS_EXPEDITED"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;expedited&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="SYNC_EXTRAS_FORCE"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;force&quot;"
+ static="true"
+ final="true"
+ deprecated="deprecated"
+ visibility="public"
+>
+</field>
+<field name="SYNC_EXTRAS_IGNORE_BACKOFF"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;ignore_backoff&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="SYNC_EXTRAS_IGNORE_SETTINGS"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;ignore_settings&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="SYNC_EXTRAS_INITIALIZE"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;initialize&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="SYNC_EXTRAS_MANUAL"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;force&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="SYNC_EXTRAS_OVERRIDE_TOO_MANY_DELETIONS"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;deletions_override&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="SYNC_EXTRAS_UPLOAD"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;upload&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="SYNC_OBSERVER_TYPE_ACTIVE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="4"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="SYNC_OBSERVER_TYPE_PENDING"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="SYNC_OBSERVER_TYPE_SETTINGS"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<class name="ContentUris"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="ContentUris"
+ type="android.content.ContentUris"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<method name="appendId"
+ return="android.net.Uri.Builder"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="builder" type="android.net.Uri.Builder">
+</parameter>
+<parameter name="id" type="long">
+</parameter>
+</method>
+<method name="parseId"
+ return="long"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="contentUri" type="android.net.Uri">
+</parameter>
+</method>
+<method name="withAppendedId"
+ return="android.net.Uri"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="contentUri" type="android.net.Uri">
+</parameter>
+<parameter name="id" type="long">
+</parameter>
+</method>
+</class>
+<class name="ContentValues"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="android.os.Parcelable">
+</implements>
+<constructor name="ContentValues"
+ type="android.content.ContentValues"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<constructor name="ContentValues"
+ type="android.content.ContentValues"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="size" type="int">
+</parameter>
+</constructor>
+<constructor name="ContentValues"
+ type="android.content.ContentValues"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="from" type="android.content.ContentValues">
+</parameter>
+</constructor>
+<method name="clear"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="containsKey"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="key" type="java.lang.String">
+</parameter>
+</method>
+<method name="describeContents"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="get"
+ return="java.lang.Object"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="key" type="java.lang.String">
+</parameter>
+</method>
+<method name="getAsBoolean"
+ return="java.lang.Boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="key" type="java.lang.String">
+</parameter>
+</method>
+<method name="getAsByte"
+ return="java.lang.Byte"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="key" type="java.lang.String">
+</parameter>
+</method>
+<method name="getAsByteArray"
+ return="byte[]"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="key" type="java.lang.String">
+</parameter>
+</method>
+<method name="getAsDouble"
+ return="java.lang.Double"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="key" type="java.lang.String">
+</parameter>
+</method>
+<method name="getAsFloat"
+ return="java.lang.Float"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="key" type="java.lang.String">
+</parameter>
+</method>
+<method name="getAsInteger"
+ return="java.lang.Integer"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="key" type="java.lang.String">
+</parameter>
+</method>
+<method name="getAsLong"
+ return="java.lang.Long"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="key" type="java.lang.String">
+</parameter>
+</method>
+<method name="getAsShort"
+ return="java.lang.Short"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="key" type="java.lang.String">
+</parameter>
+</method>
+<method name="getAsString"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="key" type="java.lang.String">
+</parameter>
+</method>
+<method name="put"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="key" type="java.lang.String">
+</parameter>
+<parameter name="value" type="java.lang.String">
+</parameter>
+</method>
+<method name="put"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="key" type="java.lang.String">
+</parameter>
+<parameter name="value" type="java.lang.Byte">
+</parameter>
+</method>
+<method name="put"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="key" type="java.lang.String">
+</parameter>
+<parameter name="value" type="java.lang.Short">
+</parameter>
+</method>
+<method name="put"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="key" type="java.lang.String">
+</parameter>
+<parameter name="value" type="java.lang.Integer">
+</parameter>
+</method>
+<method name="put"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="key" type="java.lang.String">
+</parameter>
+<parameter name="value" type="java.lang.Long">
+</parameter>
+</method>
+<method name="put"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="key" type="java.lang.String">
+</parameter>
+<parameter name="value" type="java.lang.Float">
+</parameter>
+</method>
+<method name="put"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="key" type="java.lang.String">
+</parameter>
+<parameter name="value" type="java.lang.Double">
+</parameter>
+</method>
+<method name="put"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="key" type="java.lang.String">
+</parameter>
+<parameter name="value" type="java.lang.Boolean">
+</parameter>
+</method>
+<method name="put"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="key" type="java.lang.String">
+</parameter>
+<parameter name="value" type="byte[]">
+</parameter>
+</method>
+<method name="putAll"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="other" type="android.content.ContentValues">
+</parameter>
+</method>
+<method name="putNull"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="key" type="java.lang.String">
+</parameter>
+</method>
+<method name="remove"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="key" type="java.lang.String">
+</parameter>
+</method>
+<method name="size"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="valueSet"
+ return="java.util.Set&lt;java.util.Map.Entry&lt;java.lang.String, java.lang.Object&gt;&gt;"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="writeToParcel"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="parcel" type="android.os.Parcel">
+</parameter>
+<parameter name="flags" type="int">
+</parameter>
+</method>
+<field name="CREATOR"
+ type="android.os.Parcelable.Creator"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TAG"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;ContentValues&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<class name="Context"
+ extends="java.lang.Object"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="Context"
+ type="android.content.Context"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<method name="bindService"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="service" type="android.content.Intent">
+</parameter>
+<parameter name="conn" type="android.content.ServiceConnection">
+</parameter>
+<parameter name="flags" type="int">
+</parameter>
+</method>
+<method name="checkCallingOrSelfPermission"
+ return="int"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="permission" type="java.lang.String">
+</parameter>
+</method>
+<method name="checkCallingOrSelfUriPermission"
+ return="int"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="uri" type="android.net.Uri">
+</parameter>
+<parameter name="modeFlags" type="int">
+</parameter>
+</method>
+<method name="checkCallingPermission"
+ return="int"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="permission" type="java.lang.String">
+</parameter>
+</method>
+<method name="checkCallingUriPermission"
+ return="int"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="uri" type="android.net.Uri">
+</parameter>
+<parameter name="modeFlags" type="int">
+</parameter>
+</method>
+<method name="checkPermission"
+ return="int"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="permission" type="java.lang.String">
+</parameter>
+<parameter name="pid" type="int">
+</parameter>
+<parameter name="uid" type="int">
+</parameter>
+</method>
+<method name="checkUriPermission"
+ return="int"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="uri" type="android.net.Uri">
+</parameter>
+<parameter name="pid" type="int">
+</parameter>
+<parameter name="uid" type="int">
+</parameter>
+<parameter name="modeFlags" type="int">
+</parameter>
+</method>
+<method name="checkUriPermission"
+ return="int"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="uri" type="android.net.Uri">
+</parameter>
+<parameter name="readPermission" type="java.lang.String">
+</parameter>
+<parameter name="writePermission" type="java.lang.String">
+</parameter>
+<parameter name="pid" type="int">
+</parameter>
+<parameter name="uid" type="int">
+</parameter>
+<parameter name="modeFlags" type="int">
+</parameter>
+</method>
+<method name="clearWallpaper"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="deprecated"
+ visibility="public"
+>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="createPackageContext"
+ return="android.content.Context"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="packageName" type="java.lang.String">
+</parameter>
+<parameter name="flags" type="int">
+</parameter>
+<exception name="PackageManager.NameNotFoundException" type="android.content.pm.PackageManager.NameNotFoundException">
+</exception>
+</method>
+<method name="databaseList"
+ return="java.lang.String[]"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="deleteDatabase"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+</method>
+<method name="deleteFile"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+</method>
+<method name="enforceCallingOrSelfPermission"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="permission" type="java.lang.String">
+</parameter>
+<parameter name="message" type="java.lang.String">
+</parameter>
+</method>
+<method name="enforceCallingOrSelfUriPermission"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="uri" type="android.net.Uri">
+</parameter>
+<parameter name="modeFlags" type="int">
+</parameter>
+<parameter name="message" type="java.lang.String">
+</parameter>
+</method>
+<method name="enforceCallingPermission"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="permission" type="java.lang.String">
+</parameter>
+<parameter name="message" type="java.lang.String">
+</parameter>
+</method>
+<method name="enforceCallingUriPermission"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="uri" type="android.net.Uri">
+</parameter>
+<parameter name="modeFlags" type="int">
+</parameter>
+<parameter name="message" type="java.lang.String">
+</parameter>
+</method>
+<method name="enforcePermission"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="permission" type="java.lang.String">
+</parameter>
+<parameter name="pid" type="int">
+</parameter>
+<parameter name="uid" type="int">
+</parameter>
+<parameter name="message" type="java.lang.String">
+</parameter>
+</method>
+<method name="enforceUriPermission"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="uri" type="android.net.Uri">
+</parameter>
+<parameter name="pid" type="int">
+</parameter>
+<parameter name="uid" type="int">
+</parameter>
+<parameter name="modeFlags" type="int">
+</parameter>
+<parameter name="message" type="java.lang.String">
+</parameter>
+</method>
+<method name="enforceUriPermission"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="uri" type="android.net.Uri">
+</parameter>
+<parameter name="readPermission" type="java.lang.String">
+</parameter>
+<parameter name="writePermission" type="java.lang.String">
+</parameter>
+<parameter name="pid" type="int">
+</parameter>
+<parameter name="uid" type="int">
+</parameter>
+<parameter name="modeFlags" type="int">
+</parameter>
+<parameter name="message" type="java.lang.String">
+</parameter>
+</method>
+<method name="fileList"
+ return="java.lang.String[]"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getApplicationContext"
+ return="android.content.Context"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getApplicationInfo"
+ return="android.content.pm.ApplicationInfo"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getAssets"
+ return="android.content.res.AssetManager"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getCacheDir"
+ return="java.io.File"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getClassLoader"
+ return="java.lang.ClassLoader"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getContentResolver"
+ return="android.content.ContentResolver"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getDatabasePath"
+ return="java.io.File"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+</method>
+<method name="getDir"
+ return="java.io.File"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+<parameter name="mode" type="int">
+</parameter>
+</method>
+<method name="getExternalCacheDir"
+ return="java.io.File"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getExternalFilesDir"
+ return="java.io.File"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="type" type="java.lang.String">
+</parameter>
+</method>
+<method name="getFileStreamPath"
+ return="java.io.File"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+</method>
+<method name="getFilesDir"
+ return="java.io.File"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getMainLooper"
+ return="android.os.Looper"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getPackageCodePath"
+ return="java.lang.String"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getPackageManager"
+ return="android.content.pm.PackageManager"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getPackageName"
+ return="java.lang.String"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getPackageResourcePath"
+ return="java.lang.String"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getResources"
+ return="android.content.res.Resources"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getSharedPreferences"
+ return="android.content.SharedPreferences"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+<parameter name="mode" type="int">
+</parameter>
+</method>
+<method name="getString"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="resId" type="int">
+</parameter>
+</method>
+<method name="getString"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="resId" type="int">
+</parameter>
+<parameter name="formatArgs" type="java.lang.Object...">
+</parameter>
+</method>
+<method name="getSystemService"
+ return="java.lang.Object"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+</method>
+<method name="getText"
+ return="java.lang.CharSequence"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="resId" type="int">
+</parameter>
+</method>
+<method name="getTheme"
+ return="android.content.res.Resources.Theme"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getWallpaper"
+ return="android.graphics.drawable.Drawable"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="deprecated"
+ visibility="public"
+>
+</method>
+<method name="getWallpaperDesiredMinimumHeight"
+ return="int"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="deprecated"
+ visibility="public"
+>
+</method>
+<method name="getWallpaperDesiredMinimumWidth"
+ return="int"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="deprecated"
+ visibility="public"
+>
+</method>
+<method name="grantUriPermission"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="toPackage" type="java.lang.String">
+</parameter>
+<parameter name="uri" type="android.net.Uri">
+</parameter>
+<parameter name="modeFlags" type="int">
+</parameter>
+</method>
+<method name="isRestricted"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="obtainStyledAttributes"
+ return="android.content.res.TypedArray"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="attrs" type="int[]">
+</parameter>
+</method>
+<method name="obtainStyledAttributes"
+ return="android.content.res.TypedArray"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="resid" type="int">
+</parameter>
+<parameter name="attrs" type="int[]">
+</parameter>
+<exception name="Resources.NotFoundException" type="android.content.res.Resources.NotFoundException">
+</exception>
+</method>
+<method name="obtainStyledAttributes"
+ return="android.content.res.TypedArray"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="set" type="android.util.AttributeSet">
+</parameter>
+<parameter name="attrs" type="int[]">
+</parameter>
+</method>
+<method name="obtainStyledAttributes"
+ return="android.content.res.TypedArray"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="set" type="android.util.AttributeSet">
+</parameter>
+<parameter name="attrs" type="int[]">
+</parameter>
+<parameter name="defStyleAttr" type="int">
+</parameter>
+<parameter name="defStyleRes" type="int">
+</parameter>
+</method>
+<method name="openFileInput"
+ return="java.io.FileInputStream"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+<exception name="FileNotFoundException" type="java.io.FileNotFoundException">
+</exception>
+</method>
+<method name="openFileOutput"
+ return="java.io.FileOutputStream"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+<parameter name="mode" type="int">
+</parameter>
+<exception name="FileNotFoundException" type="java.io.FileNotFoundException">
+</exception>
+</method>
+<method name="openOrCreateDatabase"
+ return="android.database.sqlite.SQLiteDatabase"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+<parameter name="mode" type="int">
+</parameter>
+<parameter name="factory" type="android.database.sqlite.SQLiteDatabase.CursorFactory">
+</parameter>
+</method>
+<method name="peekWallpaper"
+ return="android.graphics.drawable.Drawable"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="deprecated"
+ visibility="public"
+>
+</method>
+<method name="registerReceiver"
+ return="android.content.Intent"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="receiver" type="android.content.BroadcastReceiver">
+</parameter>
+<parameter name="filter" type="android.content.IntentFilter">
+</parameter>
+</method>
+<method name="registerReceiver"
+ return="android.content.Intent"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="receiver" type="android.content.BroadcastReceiver">
+</parameter>
+<parameter name="filter" type="android.content.IntentFilter">
+</parameter>
+<parameter name="broadcastPermission" type="java.lang.String">
+</parameter>
+<parameter name="scheduler" type="android.os.Handler">
+</parameter>
+</method>
+<method name="removeStickyBroadcast"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="intent" type="android.content.Intent">
+</parameter>
+</method>
+<method name="revokeUriPermission"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="uri" type="android.net.Uri">
+</parameter>
+<parameter name="modeFlags" type="int">
+</parameter>
+</method>
+<method name="sendBroadcast"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="intent" type="android.content.Intent">
+</parameter>
+</method>
+<method name="sendBroadcast"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="intent" type="android.content.Intent">
+</parameter>
+<parameter name="receiverPermission" type="java.lang.String">
+</parameter>
+</method>
+<method name="sendOrderedBroadcast"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="intent" type="android.content.Intent">
+</parameter>
+<parameter name="receiverPermission" type="java.lang.String">
+</parameter>
+</method>
+<method name="sendOrderedBroadcast"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="intent" type="android.content.Intent">
+</parameter>
+<parameter name="receiverPermission" type="java.lang.String">
+</parameter>
+<parameter name="resultReceiver" type="android.content.BroadcastReceiver">
+</parameter>
+<parameter name="scheduler" type="android.os.Handler">
+</parameter>
+<parameter name="initialCode" type="int">
+</parameter>
+<parameter name="initialData" type="java.lang.String">
+</parameter>
+<parameter name="initialExtras" type="android.os.Bundle">
+</parameter>
+</method>
+<method name="sendStickyBroadcast"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="intent" type="android.content.Intent">
+</parameter>
+</method>
+<method name="sendStickyOrderedBroadcast"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="intent" type="android.content.Intent">
+</parameter>
+<parameter name="resultReceiver" type="android.content.BroadcastReceiver">
+</parameter>
+<parameter name="scheduler" type="android.os.Handler">
+</parameter>
+<parameter name="initialCode" type="int">
+</parameter>
+<parameter name="initialData" type="java.lang.String">
+</parameter>
+<parameter name="initialExtras" type="android.os.Bundle">
+</parameter>
+</method>
+<method name="setTheme"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="resid" type="int">
+</parameter>
+</method>
+<method name="setWallpaper"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="deprecated"
+ visibility="public"
+>
+<parameter name="bitmap" type="android.graphics.Bitmap">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="setWallpaper"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="deprecated"
+ visibility="public"
+>
+<parameter name="data" type="java.io.InputStream">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="startActivity"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="intent" type="android.content.Intent">
+</parameter>
+</method>
+<method name="startInstrumentation"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="className" type="android.content.ComponentName">
+</parameter>
+<parameter name="profileFile" type="java.lang.String">
+</parameter>
+<parameter name="arguments" type="android.os.Bundle">
+</parameter>
+</method>
+<method name="startIntentSender"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="intent" type="android.content.IntentSender">
+</parameter>
+<parameter name="fillInIntent" type="android.content.Intent">
+</parameter>
+<parameter name="flagsMask" type="int">
+</parameter>
+<parameter name="flagsValues" type="int">
+</parameter>
+<parameter name="extraFlags" type="int">
+</parameter>
+<exception name="IntentSender.SendIntentException" type="android.content.IntentSender.SendIntentException">
+</exception>
+</method>
+<method name="startService"
+ return="android.content.ComponentName"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="service" type="android.content.Intent">
+</parameter>
+</method>
+<method name="stopService"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="service" type="android.content.Intent">
+</parameter>
+</method>
+<method name="unbindService"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="conn" type="android.content.ServiceConnection">
+</parameter>
+</method>
+<method name="unregisterReceiver"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="receiver" type="android.content.BroadcastReceiver">
+</parameter>
+</method>
+<field name="ACCESSIBILITY_SERVICE"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;accessibility&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ACCOUNT_SERVICE"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;account&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ACTIVITY_SERVICE"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;activity&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ALARM_SERVICE"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;alarm&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="AUDIO_SERVICE"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;audio&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="BIND_AUTO_CREATE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="BIND_DEBUG_UNBIND"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="BIND_NOT_FOREGROUND"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="4"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="CLIPBOARD_SERVICE"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;clipboard&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="CONNECTIVITY_SERVICE"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;connectivity&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="CONTEXT_IGNORE_SECURITY"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="CONTEXT_INCLUDE_CODE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="CONTEXT_RESTRICTED"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="4"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="DEVICE_POLICY_SERVICE"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;device_policy&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="DROPBOX_SERVICE"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;dropbox&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="INPUT_METHOD_SERVICE"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;input_method&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="KEYGUARD_SERVICE"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;keyguard&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="LAYOUT_INFLATER_SERVICE"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;layout_inflater&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="LOCATION_SERVICE"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;location&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="MODE_APPEND"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="32768"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="MODE_PRIVATE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="0"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="MODE_WORLD_READABLE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="MODE_WORLD_WRITEABLE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="NOTIFICATION_SERVICE"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;notification&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="POWER_SERVICE"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;power&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="SEARCH_SERVICE"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;search&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="SENSOR_SERVICE"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;sensor&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TELEPHONY_SERVICE"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;phone&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="UI_MODE_SERVICE"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;uimode&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="VIBRATOR_SERVICE"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;vibrator&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="WALLPAPER_SERVICE"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;wallpaper&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="WIFI_SERVICE"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;wifi&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="WINDOW_SERVICE"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;window&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<class name="ContextWrapper"
+ extends="android.content.Context"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="ContextWrapper"
+ type="android.content.ContextWrapper"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="base" type="android.content.Context">
+</parameter>
+</constructor>
+<method name="attachBaseContext"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="base" type="android.content.Context">
+</parameter>
+</method>
+<method name="bindService"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="service" type="android.content.Intent">
+</parameter>
+<parameter name="conn" type="android.content.ServiceConnection">
+</parameter>
+<parameter name="flags" type="int">
+</parameter>
+</method>
+<method name="checkCallingOrSelfPermission"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="permission" type="java.lang.String">
+</parameter>
+</method>
+<method name="checkCallingOrSelfUriPermission"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="uri" type="android.net.Uri">
+</parameter>
+<parameter name="modeFlags" type="int">
+</parameter>
+</method>
+<method name="checkCallingPermission"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="permission" type="java.lang.String">
+</parameter>
+</method>
+<method name="checkCallingUriPermission"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="uri" type="android.net.Uri">
+</parameter>
+<parameter name="modeFlags" type="int">
+</parameter>
+</method>
+<method name="checkPermission"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="permission" type="java.lang.String">
+</parameter>
+<parameter name="pid" type="int">
+</parameter>
+<parameter name="uid" type="int">
+</parameter>
+</method>
+<method name="checkUriPermission"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="uri" type="android.net.Uri">
+</parameter>
+<parameter name="pid" type="int">
+</parameter>
+<parameter name="uid" type="int">
+</parameter>
+<parameter name="modeFlags" type="int">
+</parameter>
+</method>
+<method name="checkUriPermission"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="uri" type="android.net.Uri">
+</parameter>
+<parameter name="readPermission" type="java.lang.String">
+</parameter>
+<parameter name="writePermission" type="java.lang.String">
+</parameter>
+<parameter name="pid" type="int">
+</parameter>
+<parameter name="uid" type="int">
+</parameter>
+<parameter name="modeFlags" type="int">
+</parameter>
+</method>
+<method name="clearWallpaper"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="createPackageContext"
+ return="android.content.Context"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="packageName" type="java.lang.String">
+</parameter>
+<parameter name="flags" type="int">
+</parameter>
+<exception name="PackageManager.NameNotFoundException" type="android.content.pm.PackageManager.NameNotFoundException">
+</exception>
+</method>
+<method name="databaseList"
+ return="java.lang.String[]"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="deleteDatabase"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+</method>
+<method name="deleteFile"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+</method>
+<method name="enforceCallingOrSelfPermission"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="permission" type="java.lang.String">
+</parameter>
+<parameter name="message" type="java.lang.String">
+</parameter>
+</method>
+<method name="enforceCallingOrSelfUriPermission"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="uri" type="android.net.Uri">
+</parameter>
+<parameter name="modeFlags" type="int">
+</parameter>
+<parameter name="message" type="java.lang.String">
+</parameter>
+</method>
+<method name="enforceCallingPermission"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="permission" type="java.lang.String">
+</parameter>
+<parameter name="message" type="java.lang.String">
+</parameter>
+</method>
+<method name="enforceCallingUriPermission"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="uri" type="android.net.Uri">
+</parameter>
+<parameter name="modeFlags" type="int">
+</parameter>
+<parameter name="message" type="java.lang.String">
+</parameter>
+</method>
+<method name="enforcePermission"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="permission" type="java.lang.String">
+</parameter>
+<parameter name="pid" type="int">
+</parameter>
+<parameter name="uid" type="int">
+</parameter>
+<parameter name="message" type="java.lang.String">
+</parameter>
+</method>
+<method name="enforceUriPermission"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="uri" type="android.net.Uri">
+</parameter>
+<parameter name="pid" type="int">
+</parameter>
+<parameter name="uid" type="int">
+</parameter>
+<parameter name="modeFlags" type="int">
+</parameter>
+<parameter name="message" type="java.lang.String">
+</parameter>
+</method>
+<method name="enforceUriPermission"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="uri" type="android.net.Uri">
+</parameter>
+<parameter name="readPermission" type="java.lang.String">
+</parameter>
+<parameter name="writePermission" type="java.lang.String">
+</parameter>
+<parameter name="pid" type="int">
+</parameter>
+<parameter name="uid" type="int">
+</parameter>
+<parameter name="modeFlags" type="int">
+</parameter>
+<parameter name="message" type="java.lang.String">
+</parameter>
+</method>
+<method name="fileList"
+ return="java.lang.String[]"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getApplicationContext"
+ return="android.content.Context"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getApplicationInfo"
+ return="android.content.pm.ApplicationInfo"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getAssets"
+ return="android.content.res.AssetManager"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getBaseContext"
+ return="android.content.Context"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getCacheDir"
+ return="java.io.File"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getClassLoader"
+ return="java.lang.ClassLoader"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getContentResolver"
+ return="android.content.ContentResolver"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getDatabasePath"
+ return="java.io.File"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+</method>
+<method name="getDir"
+ return="java.io.File"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+<parameter name="mode" type="int">
+</parameter>
+</method>
+<method name="getExternalCacheDir"
+ return="java.io.File"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getExternalFilesDir"
+ return="java.io.File"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="type" type="java.lang.String">
+</parameter>
+</method>
+<method name="getFileStreamPath"
+ return="java.io.File"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+</method>
+<method name="getFilesDir"
+ return="java.io.File"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getMainLooper"
+ return="android.os.Looper"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getPackageCodePath"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getPackageManager"
+ return="android.content.pm.PackageManager"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getPackageName"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getPackageResourcePath"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getResources"
+ return="android.content.res.Resources"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getSharedPreferences"
+ return="android.content.SharedPreferences"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+<parameter name="mode" type="int">
+</parameter>
+</method>
+<method name="getSystemService"
+ return="java.lang.Object"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+</method>
+<method name="getTheme"
+ return="android.content.res.Resources.Theme"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getWallpaper"
+ return="android.graphics.drawable.Drawable"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getWallpaperDesiredMinimumHeight"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getWallpaperDesiredMinimumWidth"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="grantUriPermission"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="toPackage" type="java.lang.String">
+</parameter>
+<parameter name="uri" type="android.net.Uri">
+</parameter>
+<parameter name="modeFlags" type="int">
+</parameter>
+</method>
+<method name="openFileInput"
+ return="java.io.FileInputStream"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+<exception name="FileNotFoundException" type="java.io.FileNotFoundException">
+</exception>
+</method>
+<method name="openFileOutput"
+ return="java.io.FileOutputStream"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+<parameter name="mode" type="int">
+</parameter>
+<exception name="FileNotFoundException" type="java.io.FileNotFoundException">
+</exception>
+</method>
+<method name="openOrCreateDatabase"
+ return="android.database.sqlite.SQLiteDatabase"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+<parameter name="mode" type="int">
+</parameter>
+<parameter name="factory" type="android.database.sqlite.SQLiteDatabase.CursorFactory">
+</parameter>
+</method>
+<method name="peekWallpaper"
+ return="android.graphics.drawable.Drawable"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="registerReceiver"
+ return="android.content.Intent"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="receiver" type="android.content.BroadcastReceiver">
+</parameter>
+<parameter name="filter" type="android.content.IntentFilter">
+</parameter>
+</method>
+<method name="registerReceiver"
+ return="android.content.Intent"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="receiver" type="android.content.BroadcastReceiver">
+</parameter>
+<parameter name="filter" type="android.content.IntentFilter">
+</parameter>
+<parameter name="broadcastPermission" type="java.lang.String">
+</parameter>
+<parameter name="scheduler" type="android.os.Handler">
+</parameter>
+</method>
+<method name="removeStickyBroadcast"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="intent" type="android.content.Intent">
+</parameter>
+</method>
+<method name="revokeUriPermission"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="uri" type="android.net.Uri">
+</parameter>
+<parameter name="modeFlags" type="int">
+</parameter>
+</method>
+<method name="sendBroadcast"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="intent" type="android.content.Intent">
+</parameter>
+</method>
+<method name="sendBroadcast"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="intent" type="android.content.Intent">
+</parameter>
+<parameter name="receiverPermission" type="java.lang.String">
+</parameter>
+</method>
+<method name="sendOrderedBroadcast"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="intent" type="android.content.Intent">
+</parameter>
+<parameter name="receiverPermission" type="java.lang.String">
+</parameter>
+</method>
+<method name="sendOrderedBroadcast"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="intent" type="android.content.Intent">
+</parameter>
+<parameter name="receiverPermission" type="java.lang.String">
+</parameter>
+<parameter name="resultReceiver" type="android.content.BroadcastReceiver">
+</parameter>
+<parameter name="scheduler" type="android.os.Handler">
+</parameter>
+<parameter name="initialCode" type="int">
+</parameter>
+<parameter name="initialData" type="java.lang.String">
+</parameter>
+<parameter name="initialExtras" type="android.os.Bundle">
+</parameter>
+</method>
+<method name="sendStickyBroadcast"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="intent" type="android.content.Intent">
+</parameter>
+</method>
+<method name="sendStickyOrderedBroadcast"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="intent" type="android.content.Intent">
+</parameter>
+<parameter name="resultReceiver" type="android.content.BroadcastReceiver">
+</parameter>
+<parameter name="scheduler" type="android.os.Handler">
+</parameter>
+<parameter name="initialCode" type="int">
+</parameter>
+<parameter name="initialData" type="java.lang.String">
+</parameter>
+<parameter name="initialExtras" type="android.os.Bundle">
+</parameter>
+</method>
+<method name="setTheme"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="resid" type="int">
+</parameter>
+</method>
+<method name="setWallpaper"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="bitmap" type="android.graphics.Bitmap">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="setWallpaper"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="data" type="java.io.InputStream">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="startActivity"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="intent" type="android.content.Intent">
+</parameter>
+</method>
+<method name="startInstrumentation"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="className" type="android.content.ComponentName">
+</parameter>
+<parameter name="profileFile" type="java.lang.String">
+</parameter>
+<parameter name="arguments" type="android.os.Bundle">
+</parameter>
+</method>
+<method name="startIntentSender"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="intent" type="android.content.IntentSender">
+</parameter>
+<parameter name="fillInIntent" type="android.content.Intent">
+</parameter>
+<parameter name="flagsMask" type="int">
+</parameter>
+<parameter name="flagsValues" type="int">
+</parameter>
+<parameter name="extraFlags" type="int">
+</parameter>
+<exception name="IntentSender.SendIntentException" type="android.content.IntentSender.SendIntentException">
+</exception>
+</method>
+<method name="startService"
+ return="android.content.ComponentName"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="service" type="android.content.Intent">
+</parameter>
+</method>
+<method name="stopService"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="android.content.Intent">
+</parameter>
+</method>
+<method name="unbindService"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="conn" type="android.content.ServiceConnection">
+</parameter>
+</method>
+<method name="unregisterReceiver"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="receiver" type="android.content.BroadcastReceiver">
+</parameter>
+</method>
+</class>
+<interface name="DialogInterface"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="cancel"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="dismiss"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<field name="BUTTON1"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="-1"
+ static="true"
+ final="true"
+ deprecated="deprecated"
+ visibility="public"
+>
+</field>
+<field name="BUTTON2"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="-2"
+ static="true"
+ final="true"
+ deprecated="deprecated"
+ visibility="public"
+>
+</field>
+<field name="BUTTON3"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="-3"
+ static="true"
+ final="true"
+ deprecated="deprecated"
+ visibility="public"
+>
+</field>
+<field name="BUTTON_NEGATIVE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="-2"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="BUTTON_NEUTRAL"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="-3"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="BUTTON_POSITIVE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="-1"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</interface>
+<interface name="DialogInterface.OnCancelListener"
+ abstract="true"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="onCancel"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="dialog" type="android.content.DialogInterface">
+</parameter>
+</method>
+</interface>
+<interface name="DialogInterface.OnClickListener"
+ abstract="true"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="onClick"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="dialog" type="android.content.DialogInterface">
+</parameter>
+<parameter name="which" type="int">
+</parameter>
+</method>
+</interface>
+<interface name="DialogInterface.OnDismissListener"
+ abstract="true"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="onDismiss"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="dialog" type="android.content.DialogInterface">
+</parameter>
+</method>
+</interface>
+<interface name="DialogInterface.OnKeyListener"
+ abstract="true"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="onKey"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="dialog" type="android.content.DialogInterface">
+</parameter>
+<parameter name="keyCode" type="int">
+</parameter>
+<parameter name="event" type="android.view.KeyEvent">
+</parameter>
+</method>
+</interface>
+<interface name="DialogInterface.OnMultiChoiceClickListener"
+ abstract="true"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="onClick"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="dialog" type="android.content.DialogInterface">
+</parameter>
+<parameter name="which" type="int">
+</parameter>
+<parameter name="isChecked" type="boolean">
+</parameter>
+</method>
+</interface>
+<interface name="DialogInterface.OnShowListener"
+ abstract="true"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="onShow"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="dialog" type="android.content.DialogInterface">
+</parameter>
+</method>
+</interface>
+<class name="Entity"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="Entity"
+ type="android.content.Entity"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="values" type="android.content.ContentValues">
+</parameter>
+</constructor>
+<method name="addSubValue"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="uri" type="android.net.Uri">
+</parameter>
+<parameter name="values" type="android.content.ContentValues">
+</parameter>
+</method>
+<method name="getEntityValues"
+ return="android.content.ContentValues"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getSubValues"
+ return="java.util.ArrayList&lt;android.content.Entity.NamedContentValues&gt;"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+</class>
+<class name="Entity.NamedContentValues"
+ extends="java.lang.Object"
+ abstract="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="Entity.NamedContentValues"
+ type="android.content.Entity.NamedContentValues"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="uri" type="android.net.Uri">
+</parameter>
+<parameter name="values" type="android.content.ContentValues">
+</parameter>
+</constructor>
+<field name="uri"
+ type="android.net.Uri"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="values"
+ type="android.content.ContentValues"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<interface name="EntityIterator"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="java.util.Iterator">
+</implements>
+<method name="close"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="reset"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+</interface>
+<class name="Intent"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="java.lang.Cloneable">
+</implements>
+<implements name="android.os.Parcelable">
+</implements>
+<constructor name="Intent"
+ type="android.content.Intent"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<constructor name="Intent"
+ type="android.content.Intent"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="o" type="android.content.Intent">
+</parameter>
+</constructor>
+<constructor name="Intent"
+ type="android.content.Intent"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="action" type="java.lang.String">
+</parameter>
+</constructor>
+<constructor name="Intent"
+ type="android.content.Intent"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="action" type="java.lang.String">
+</parameter>
+<parameter name="uri" type="android.net.Uri">
+</parameter>
+</constructor>
+<constructor name="Intent"
+ type="android.content.Intent"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="packageContext" type="android.content.Context">
+</parameter>
+<parameter name="cls" type="java.lang.Class&lt;?&gt;">
+</parameter>
+</constructor>
+<constructor name="Intent"
+ type="android.content.Intent"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="action" type="java.lang.String">
+</parameter>
+<parameter name="uri" type="android.net.Uri">
+</parameter>
+<parameter name="packageContext" type="android.content.Context">
+</parameter>
+<parameter name="cls" type="java.lang.Class&lt;?&gt;">
+</parameter>
+</constructor>
+<method name="addCategory"
+ return="android.content.Intent"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="category" type="java.lang.String">
+</parameter>
+</method>
+<method name="addFlags"
+ return="android.content.Intent"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="flags" type="int">
+</parameter>
+</method>
+<method name="clone"
+ return="java.lang.Object"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="cloneFilter"
+ return="android.content.Intent"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="createChooser"
+ return="android.content.Intent"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="target" type="android.content.Intent">
+</parameter>
+<parameter name="title" type="java.lang.CharSequence">
+</parameter>
+</method>
+<method name="describeContents"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="fillIn"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="other" type="android.content.Intent">
+</parameter>
+<parameter name="flags" type="int">
+</parameter>
+</method>
+<method name="filterEquals"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="other" type="android.content.Intent">
+</parameter>
+</method>
+<method name="filterHashCode"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getAction"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getBooleanArrayExtra"
+ return="boolean[]"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+</method>
+<method name="getBooleanExtra"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+<parameter name="defaultValue" type="boolean">
+</parameter>
+</method>
+<method name="getBundleExtra"
+ return="android.os.Bundle"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+</method>
+<method name="getByteArrayExtra"
+ return="byte[]"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+</method>
+<method name="getByteExtra"
+ return="byte"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+<parameter name="defaultValue" type="byte">
+</parameter>
+</method>
+<method name="getCategories"
+ return="java.util.Set&lt;java.lang.String&gt;"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getCharArrayExtra"
+ return="char[]"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+</method>
+<method name="getCharExtra"
+ return="char"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+<parameter name="defaultValue" type="char">
+</parameter>
+</method>
+<method name="getCharSequenceArrayExtra"
+ return="java.lang.CharSequence[]"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+</method>
+<method name="getCharSequenceArrayListExtra"
+ return="java.util.ArrayList&lt;java.lang.CharSequence&gt;"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+</method>
+<method name="getCharSequenceExtra"
+ return="java.lang.CharSequence"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+</method>
+<method name="getComponent"
+ return="android.content.ComponentName"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getData"
+ return="android.net.Uri"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getDataString"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getDoubleArrayExtra"
+ return="double[]"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+</method>
+<method name="getDoubleExtra"
+ return="double"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+<parameter name="defaultValue" type="double">
+</parameter>
+</method>
+<method name="getExtras"
+ return="android.os.Bundle"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getFlags"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getFloatArrayExtra"
+ return="float[]"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+</method>
+<method name="getFloatExtra"
+ return="float"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+<parameter name="defaultValue" type="float">
+</parameter>
+</method>
+<method name="getIntArrayExtra"
+ return="int[]"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+</method>
+<method name="getIntExtra"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+<parameter name="defaultValue" type="int">
+</parameter>
+</method>
+<method name="getIntegerArrayListExtra"
+ return="java.util.ArrayList&lt;java.lang.Integer&gt;"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+</method>
+<method name="getIntent"
+ return="android.content.Intent"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="deprecated"
+ visibility="public"
+>
+<parameter name="uri" type="java.lang.String">
+</parameter>
+<exception name="URISyntaxException" type="java.net.URISyntaxException">
+</exception>
+</method>
+<method name="getIntentOld"
+ return="android.content.Intent"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="uri" type="java.lang.String">
+</parameter>
+<exception name="URISyntaxException" type="java.net.URISyntaxException">
+</exception>
+</method>
+<method name="getLongArrayExtra"
+ return="long[]"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+</method>
+<method name="getLongExtra"
+ return="long"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+<parameter name="defaultValue" type="long">
+</parameter>
+</method>
+<method name="getPackage"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getParcelableArrayExtra"
+ return="android.os.Parcelable[]"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+</method>
+<method name="getParcelableArrayListExtra"
+ return="java.util.ArrayList&lt;T&gt;"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+</method>
+<method name="getParcelableExtra"
+ return="T"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+</method>
+<method name="getScheme"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getSerializableExtra"
+ return="java.io.Serializable"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+</method>
+<method name="getShortArrayExtra"
+ return="short[]"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+</method>
+<method name="getShortExtra"
+ return="short"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+<parameter name="defaultValue" type="short">
+</parameter>
+</method>
+<method name="getSourceBounds"
+ return="android.graphics.Rect"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getStringArrayExtra"
+ return="java.lang.String[]"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+</method>
+<method name="getStringArrayListExtra"
+ return="java.util.ArrayList&lt;java.lang.String&gt;"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+</method>
+<method name="getStringExtra"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+</method>
+<method name="getType"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="hasCategory"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="category" type="java.lang.String">
+</parameter>
+</method>
+<method name="hasExtra"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+</method>
+<method name="hasFileDescriptors"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="parseIntent"
+ return="android.content.Intent"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="resources" type="android.content.res.Resources">
+</parameter>
+<parameter name="parser" type="org.xmlpull.v1.XmlPullParser">
+</parameter>
+<parameter name="attrs" type="android.util.AttributeSet">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+<exception name="XmlPullParserException" type="org.xmlpull.v1.XmlPullParserException">
+</exception>
+</method>
+<method name="parseUri"
+ return="android.content.Intent"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="uri" type="java.lang.String">
+</parameter>
+<parameter name="flags" type="int">
+</parameter>
+<exception name="URISyntaxException" type="java.net.URISyntaxException">
+</exception>
+</method>
+<method name="putCharSequenceArrayListExtra"
+ return="android.content.Intent"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+<parameter name="value" type="java.util.ArrayList&lt;java.lang.CharSequence&gt;">
+</parameter>
+</method>
+<method name="putExtra"
+ return="android.content.Intent"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+<parameter name="value" type="boolean">
+</parameter>
+</method>
+<method name="putExtra"
+ return="android.content.Intent"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+<parameter name="value" type="byte">
+</parameter>
+</method>
+<method name="putExtra"
+ return="android.content.Intent"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+<parameter name="value" type="char">
+</parameter>
+</method>
+<method name="putExtra"
+ return="android.content.Intent"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+<parameter name="value" type="short">
+</parameter>
+</method>
+<method name="putExtra"
+ return="android.content.Intent"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+<parameter name="value" type="int">
+</parameter>
+</method>
+<method name="putExtra"
+ return="android.content.Intent"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+<parameter name="value" type="long">
+</parameter>
+</method>
+<method name="putExtra"
+ return="android.content.Intent"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+<parameter name="value" type="float">
+</parameter>
+</method>
+<method name="putExtra"
+ return="android.content.Intent"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+<parameter name="value" type="double">
+</parameter>
+</method>
+<method name="putExtra"
+ return="android.content.Intent"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+<parameter name="value" type="java.lang.String">
+</parameter>
+</method>
+<method name="putExtra"
+ return="android.content.Intent"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+<parameter name="value" type="java.lang.CharSequence">
+</parameter>
+</method>
+<method name="putExtra"
+ return="android.content.Intent"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+<parameter name="value" type="android.os.Parcelable">
+</parameter>
+</method>
+<method name="putExtra"
+ return="android.content.Intent"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+<parameter name="value" type="android.os.Parcelable[]">
+</parameter>
+</method>
+<method name="putExtra"
+ return="android.content.Intent"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+<parameter name="value" type="java.io.Serializable">
+</parameter>
+</method>
+<method name="putExtra"
+ return="android.content.Intent"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+<parameter name="value" type="boolean[]">
+</parameter>
+</method>
+<method name="putExtra"
+ return="android.content.Intent"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+<parameter name="value" type="byte[]">
+</parameter>
+</method>
+<method name="putExtra"
+ return="android.content.Intent"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+<parameter name="value" type="short[]">
+</parameter>
+</method>
+<method name="putExtra"
+ return="android.content.Intent"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+<parameter name="value" type="char[]">
+</parameter>
+</method>
+<method name="putExtra"
+ return="android.content.Intent"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+<parameter name="value" type="int[]">
+</parameter>
+</method>
+<method name="putExtra"
+ return="android.content.Intent"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+<parameter name="value" type="long[]">
+</parameter>
+</method>
+<method name="putExtra"
+ return="android.content.Intent"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+<parameter name="value" type="float[]">
+</parameter>
+</method>
+<method name="putExtra"
+ return="android.content.Intent"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+<parameter name="value" type="double[]">
+</parameter>
+</method>
+<method name="putExtra"
+ return="android.content.Intent"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+<parameter name="value" type="java.lang.String[]">
+</parameter>
+</method>
+<method name="putExtra"
+ return="android.content.Intent"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+<parameter name="value" type="java.lang.CharSequence[]">
+</parameter>
+</method>
+<method name="putExtra"
+ return="android.content.Intent"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+<parameter name="value" type="android.os.Bundle">
+</parameter>
+</method>
+<method name="putExtras"
+ return="android.content.Intent"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="src" type="android.content.Intent">
+</parameter>
+</method>
+<method name="putExtras"
+ return="android.content.Intent"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="extras" type="android.os.Bundle">
+</parameter>
+</method>
+<method name="putIntegerArrayListExtra"
+ return="android.content.Intent"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+<parameter name="value" type="java.util.ArrayList&lt;java.lang.Integer&gt;">
+</parameter>
+</method>
+<method name="putParcelableArrayListExtra"
+ return="android.content.Intent"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+<parameter name="value" type="java.util.ArrayList&lt;? extends android.os.Parcelable&gt;">
+</parameter>
+</method>
+<method name="putStringArrayListExtra"
+ return="android.content.Intent"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+<parameter name="value" type="java.util.ArrayList&lt;java.lang.String&gt;">
+</parameter>
+</method>
+<method name="readFromParcel"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="in" type="android.os.Parcel">
+</parameter>
+</method>
+<method name="removeCategory"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="category" type="java.lang.String">
+</parameter>
+</method>
+<method name="removeExtra"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+</method>
+<method name="replaceExtras"
+ return="android.content.Intent"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="src" type="android.content.Intent">
+</parameter>
+</method>
+<method name="replaceExtras"
+ return="android.content.Intent"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="extras" type="android.os.Bundle">
+</parameter>
+</method>
+<method name="resolveActivity"
+ return="android.content.ComponentName"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="pm" type="android.content.pm.PackageManager">
+</parameter>
+</method>
+<method name="resolveActivityInfo"
+ return="android.content.pm.ActivityInfo"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="pm" type="android.content.pm.PackageManager">
+</parameter>
+<parameter name="flags" type="int">
+</parameter>
+</method>
+<method name="resolveType"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="context" type="android.content.Context">
+</parameter>
+</method>
+<method name="resolveType"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="resolver" type="android.content.ContentResolver">
+</parameter>
+</method>
+<method name="resolveTypeIfNeeded"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="resolver" type="android.content.ContentResolver">
+</parameter>
+</method>
+<method name="setAction"
+ return="android.content.Intent"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="action" type="java.lang.String">
+</parameter>
+</method>
+<method name="setClass"
+ return="android.content.Intent"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="packageContext" type="android.content.Context">
+</parameter>
+<parameter name="cls" type="java.lang.Class&lt;?&gt;">
+</parameter>
+</method>
+<method name="setClassName"
+ return="android.content.Intent"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="packageContext" type="android.content.Context">
+</parameter>
+<parameter name="className" type="java.lang.String">
+</parameter>
+</method>
+<method name="setClassName"
+ return="android.content.Intent"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="packageName" type="java.lang.String">
+</parameter>
+<parameter name="className" type="java.lang.String">
+</parameter>
+</method>
+<method name="setComponent"
+ return="android.content.Intent"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="component" type="android.content.ComponentName">
+</parameter>
+</method>
+<method name="setData"
+ return="android.content.Intent"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="data" type="android.net.Uri">
+</parameter>
+</method>
+<method name="setDataAndType"
+ return="android.content.Intent"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="data" type="android.net.Uri">
+</parameter>
+<parameter name="type" type="java.lang.String">
+</parameter>
+</method>
+<method name="setExtrasClassLoader"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="loader" type="java.lang.ClassLoader">
+</parameter>
+</method>
+<method name="setFlags"
+ return="android.content.Intent"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="flags" type="int">
+</parameter>
+</method>
+<method name="setPackage"
+ return="android.content.Intent"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="packageName" type="java.lang.String">
+</parameter>
+</method>
+<method name="setSourceBounds"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="r" type="android.graphics.Rect">
+</parameter>
+</method>
+<method name="setType"
+ return="android.content.Intent"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="type" type="java.lang.String">
+</parameter>
+</method>
+<method name="toURI"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="deprecated"
+ visibility="public"
+>
+</method>
+<method name="toUri"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="flags" type="int">
+</parameter>
+</method>
+<method name="writeToParcel"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="out" type="android.os.Parcel">
+</parameter>
+<parameter name="flags" type="int">
+</parameter>
+</method>
+<field name="ACTION_AIRPLANE_MODE_CHANGED"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.intent.action.AIRPLANE_MODE&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ACTION_ALL_APPS"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.intent.action.ALL_APPS&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ACTION_ANSWER"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.intent.action.ANSWER&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ACTION_ATTACH_DATA"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.intent.action.ATTACH_DATA&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ACTION_BATTERY_CHANGED"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.intent.action.BATTERY_CHANGED&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ACTION_BATTERY_LOW"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.intent.action.BATTERY_LOW&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ACTION_BATTERY_OKAY"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.intent.action.BATTERY_OKAY&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ACTION_BOOT_COMPLETED"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.intent.action.BOOT_COMPLETED&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ACTION_BUG_REPORT"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.intent.action.BUG_REPORT&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ACTION_CALL"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.intent.action.CALL&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ACTION_CALL_BUTTON"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.intent.action.CALL_BUTTON&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ACTION_CAMERA_BUTTON"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.intent.action.CAMERA_BUTTON&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ACTION_CHOOSER"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.intent.action.CHOOSER&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ACTION_CLOSE_SYSTEM_DIALOGS"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.intent.action.CLOSE_SYSTEM_DIALOGS&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ACTION_CONFIGURATION_CHANGED"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.intent.action.CONFIGURATION_CHANGED&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ACTION_CREATE_SHORTCUT"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.intent.action.CREATE_SHORTCUT&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ACTION_DATE_CHANGED"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.intent.action.DATE_CHANGED&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ACTION_DEFAULT"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.intent.action.VIEW&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ACTION_DELETE"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.intent.action.DELETE&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ACTION_DEVICE_STORAGE_LOW"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.intent.action.DEVICE_STORAGE_LOW&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ACTION_DEVICE_STORAGE_OK"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.intent.action.DEVICE_STORAGE_OK&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ACTION_DIAL"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.intent.action.DIAL&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ACTION_DOCK_EVENT"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.intent.action.DOCK_EVENT&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ACTION_EDIT"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.intent.action.EDIT&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ACTION_FACTORY_TEST"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.intent.action.FACTORY_TEST&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ACTION_GET_CONTENT"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.intent.action.GET_CONTENT&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ACTION_GTALK_SERVICE_CONNECTED"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.intent.action.GTALK_CONNECTED&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ACTION_GTALK_SERVICE_DISCONNECTED"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.intent.action.GTALK_DISCONNECTED&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ACTION_HEADSET_PLUG"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.intent.action.HEADSET_PLUG&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ACTION_INPUT_METHOD_CHANGED"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.intent.action.INPUT_METHOD_CHANGED&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ACTION_INSERT"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.intent.action.INSERT&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ACTION_INSERT_OR_EDIT"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.intent.action.INSERT_OR_EDIT&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ACTION_LOCALE_CHANGED"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.intent.action.LOCALE_CHANGED&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ACTION_MAIN"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.intent.action.MAIN&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ACTION_MANAGE_PACKAGE_STORAGE"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.intent.action.MANAGE_PACKAGE_STORAGE&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ACTION_MEDIA_BAD_REMOVAL"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.intent.action.MEDIA_BAD_REMOVAL&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ACTION_MEDIA_BUTTON"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.intent.action.MEDIA_BUTTON&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ACTION_MEDIA_CHECKING"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.intent.action.MEDIA_CHECKING&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ACTION_MEDIA_EJECT"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.intent.action.MEDIA_EJECT&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ACTION_MEDIA_MOUNTED"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.intent.action.MEDIA_MOUNTED&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ACTION_MEDIA_NOFS"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.intent.action.MEDIA_NOFS&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ACTION_MEDIA_REMOVED"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.intent.action.MEDIA_REMOVED&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ACTION_MEDIA_SCANNER_FINISHED"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.intent.action.MEDIA_SCANNER_FINISHED&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ACTION_MEDIA_SCANNER_SCAN_FILE"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.intent.action.MEDIA_SCANNER_SCAN_FILE&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ACTION_MEDIA_SCANNER_STARTED"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.intent.action.MEDIA_SCANNER_STARTED&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ACTION_MEDIA_SHARED"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.intent.action.MEDIA_SHARED&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ACTION_MEDIA_UNMOUNTABLE"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.intent.action.MEDIA_UNMOUNTABLE&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ACTION_MEDIA_UNMOUNTED"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.intent.action.MEDIA_UNMOUNTED&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ACTION_NEW_OUTGOING_CALL"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.intent.action.NEW_OUTGOING_CALL&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ACTION_PACKAGE_ADDED"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.intent.action.PACKAGE_ADDED&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ACTION_PACKAGE_CHANGED"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.intent.action.PACKAGE_CHANGED&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ACTION_PACKAGE_DATA_CLEARED"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.intent.action.PACKAGE_DATA_CLEARED&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ACTION_PACKAGE_INSTALL"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.intent.action.PACKAGE_INSTALL&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ACTION_PACKAGE_REMOVED"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.intent.action.PACKAGE_REMOVED&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ACTION_PACKAGE_REPLACED"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.intent.action.PACKAGE_REPLACED&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ACTION_PACKAGE_RESTARTED"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.intent.action.PACKAGE_RESTARTED&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ACTION_PICK"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.intent.action.PICK&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ACTION_PICK_ACTIVITY"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.intent.action.PICK_ACTIVITY&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ACTION_POWER_CONNECTED"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.intent.action.ACTION_POWER_CONNECTED&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ACTION_POWER_DISCONNECTED"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.intent.action.ACTION_POWER_DISCONNECTED&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ACTION_POWER_USAGE_SUMMARY"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.intent.action.POWER_USAGE_SUMMARY&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ACTION_PROVIDER_CHANGED"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.intent.action.PROVIDER_CHANGED&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ACTION_REBOOT"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.intent.action.REBOOT&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ACTION_RUN"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.intent.action.RUN&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ACTION_SCREEN_OFF"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.intent.action.SCREEN_OFF&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ACTION_SCREEN_ON"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.intent.action.SCREEN_ON&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ACTION_SEARCH"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.intent.action.SEARCH&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ACTION_SEARCH_LONG_PRESS"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.intent.action.SEARCH_LONG_PRESS&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ACTION_SEND"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.intent.action.SEND&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ACTION_SENDTO"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.intent.action.SENDTO&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ACTION_SEND_MULTIPLE"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.intent.action.SEND_MULTIPLE&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ACTION_SET_WALLPAPER"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.intent.action.SET_WALLPAPER&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ACTION_SHUTDOWN"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.intent.action.ACTION_SHUTDOWN&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ACTION_SYNC"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.intent.action.SYNC&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ACTION_SYSTEM_TUTORIAL"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.intent.action.SYSTEM_TUTORIAL&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ACTION_TIMEZONE_CHANGED"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.intent.action.TIMEZONE_CHANGED&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ACTION_TIME_CHANGED"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.intent.action.TIME_SET&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ACTION_TIME_TICK"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.intent.action.TIME_TICK&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ACTION_UID_REMOVED"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.intent.action.UID_REMOVED&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ACTION_UMS_CONNECTED"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.intent.action.UMS_CONNECTED&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ACTION_UMS_DISCONNECTED"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.intent.action.UMS_DISCONNECTED&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ACTION_USER_PRESENT"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.intent.action.USER_PRESENT&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ACTION_VIEW"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.intent.action.VIEW&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ACTION_VOICE_COMMAND"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.intent.action.VOICE_COMMAND&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ACTION_WALLPAPER_CHANGED"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.intent.action.WALLPAPER_CHANGED&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ACTION_WEB_SEARCH"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.intent.action.WEB_SEARCH&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="CATEGORY_ALTERNATIVE"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.intent.category.ALTERNATIVE&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="CATEGORY_BROWSABLE"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.intent.category.BROWSABLE&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="CATEGORY_CAR_DOCK"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.intent.category.CAR_DOCK&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="CATEGORY_CAR_MODE"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.intent.category.CAR_MODE&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="CATEGORY_DEFAULT"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.intent.category.DEFAULT&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="CATEGORY_DESK_DOCK"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.intent.category.DESK_DOCK&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="CATEGORY_DEVELOPMENT_PREFERENCE"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.intent.category.DEVELOPMENT_PREFERENCE&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="CATEGORY_EMBED"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.intent.category.EMBED&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="CATEGORY_FRAMEWORK_INSTRUMENTATION_TEST"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.intent.category.FRAMEWORK_INSTRUMENTATION_TEST&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="CATEGORY_HOME"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.intent.category.HOME&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="CATEGORY_INFO"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.intent.category.INFO&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="CATEGORY_LAUNCHER"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.intent.category.LAUNCHER&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="CATEGORY_MONKEY"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.intent.category.MONKEY&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="CATEGORY_OPENABLE"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.intent.category.OPENABLE&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="CATEGORY_PREFERENCE"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.intent.category.PREFERENCE&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="CATEGORY_SAMPLE_CODE"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.intent.category.SAMPLE_CODE&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="CATEGORY_SELECTED_ALTERNATIVE"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.intent.category.SELECTED_ALTERNATIVE&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="CATEGORY_TAB"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.intent.category.TAB&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="CATEGORY_TEST"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.intent.category.TEST&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="CATEGORY_UNIT_TEST"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.intent.category.UNIT_TEST&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="CREATOR"
+ type="android.os.Parcelable.Creator"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="EXTRA_ALARM_COUNT"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.intent.extra.ALARM_COUNT&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="EXTRA_BCC"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.intent.extra.BCC&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="EXTRA_CC"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.intent.extra.CC&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="EXTRA_CHANGED_COMPONENT_NAME"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.intent.extra.changed_component_name&quot;"
+ static="true"
+ final="true"
+ deprecated="deprecated"
+ visibility="public"
+>
+</field>
+<field name="EXTRA_CHANGED_COMPONENT_NAME_LIST"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.intent.extra.changed_component_name_list&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="EXTRA_DATA_REMOVED"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.intent.extra.DATA_REMOVED&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="EXTRA_DOCK_STATE"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.intent.extra.DOCK_STATE&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="EXTRA_DOCK_STATE_CAR"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="EXTRA_DOCK_STATE_DESK"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="EXTRA_DOCK_STATE_UNDOCKED"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="0"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="EXTRA_DONT_KILL_APP"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.intent.extra.DONT_KILL_APP&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="EXTRA_EMAIL"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.intent.extra.EMAIL&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="EXTRA_INITIAL_INTENTS"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.intent.extra.INITIAL_INTENTS&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="EXTRA_INTENT"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.intent.extra.INTENT&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="EXTRA_KEY_EVENT"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.intent.extra.KEY_EVENT&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="EXTRA_PHONE_NUMBER"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.intent.extra.PHONE_NUMBER&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="EXTRA_REMOTE_INTENT_TOKEN"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.intent.extra.remote_intent_token&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="EXTRA_REPLACING"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.intent.extra.REPLACING&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="EXTRA_SHORTCUT_ICON"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.intent.extra.shortcut.ICON&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="EXTRA_SHORTCUT_ICON_RESOURCE"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.intent.extra.shortcut.ICON_RESOURCE&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="EXTRA_SHORTCUT_INTENT"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.intent.extra.shortcut.INTENT&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="EXTRA_SHORTCUT_NAME"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.intent.extra.shortcut.NAME&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="EXTRA_STREAM"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.intent.extra.STREAM&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="EXTRA_SUBJECT"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.intent.extra.SUBJECT&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="EXTRA_TEMPLATE"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.intent.extra.TEMPLATE&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="EXTRA_TEXT"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.intent.extra.TEXT&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="EXTRA_TITLE"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.intent.extra.TITLE&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="EXTRA_UID"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.intent.extra.UID&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="FILL_IN_ACTION"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="FILL_IN_CATEGORIES"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="4"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="FILL_IN_COMPONENT"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="8"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="FILL_IN_DATA"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="FILL_IN_PACKAGE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="FILL_IN_SOURCE_BOUNDS"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="32"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="FLAG_ACTIVITY_BROUGHT_TO_FRONT"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="4194304"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="FLAG_ACTIVITY_CLEAR_TOP"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="67108864"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="FLAG_ACTIVITY_CLEAR_WHEN_TASK_RESET"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="524288"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="FLAG_ACTIVITY_EXCLUDE_FROM_RECENTS"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="8388608"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="FLAG_ACTIVITY_FORWARD_RESULT"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="33554432"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="FLAG_ACTIVITY_LAUNCHED_FROM_HISTORY"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1048576"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="FLAG_ACTIVITY_MULTIPLE_TASK"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="134217728"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="FLAG_ACTIVITY_NEW_TASK"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="268435456"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="FLAG_ACTIVITY_NO_ANIMATION"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="65536"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="FLAG_ACTIVITY_NO_HISTORY"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1073741824"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="FLAG_ACTIVITY_NO_USER_ACTION"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="262144"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="FLAG_ACTIVITY_PREVIOUS_IS_TOP"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16777216"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="FLAG_ACTIVITY_REORDER_TO_FRONT"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="131072"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="FLAG_ACTIVITY_RESET_TASK_IF_NEEDED"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2097152"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="FLAG_ACTIVITY_SINGLE_TOP"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="536870912"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="FLAG_DEBUG_LOG_RESOLUTION"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="8"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="FLAG_FROM_BACKGROUND"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="4"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="FLAG_GRANT_READ_URI_PERMISSION"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="FLAG_GRANT_WRITE_URI_PERMISSION"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="FLAG_RECEIVER_REGISTERED_ONLY"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1073741824"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="FLAG_RECEIVER_REPLACE_PENDING"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="536870912"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="METADATA_DOCK_HOME"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.dock_home&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="URI_INTENT_SCHEME"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<class name="Intent.FilterComparison"
+ extends="java.lang.Object"
+ abstract="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="Intent.FilterComparison"
+ type="android.content.Intent.FilterComparison"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="intent" type="android.content.Intent">
+</parameter>
+</constructor>
+<method name="getIntent"
+ return="android.content.Intent"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+</class>
+<class name="Intent.ShortcutIconResource"
+ extends="java.lang.Object"
+ abstract="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="android.os.Parcelable">
+</implements>
+<constructor name="Intent.ShortcutIconResource"
+ type="android.content.Intent.ShortcutIconResource"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<method name="describeContents"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="fromContext"
+ return="android.content.Intent.ShortcutIconResource"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="context" type="android.content.Context">
+</parameter>
+<parameter name="resourceId" type="int">
+</parameter>
+</method>
+<method name="writeToParcel"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="dest" type="android.os.Parcel">
+</parameter>
+<parameter name="flags" type="int">
+</parameter>
+</method>
+<field name="CREATOR"
+ type="android.os.Parcelable.Creator"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="packageName"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="resourceName"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<class name="IntentFilter"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="android.os.Parcelable">
+</implements>
+<constructor name="IntentFilter"
+ type="android.content.IntentFilter"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<constructor name="IntentFilter"
+ type="android.content.IntentFilter"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="action" type="java.lang.String">
+</parameter>
+</constructor>
+<constructor name="IntentFilter"
+ type="android.content.IntentFilter"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="action" type="java.lang.String">
+</parameter>
+<parameter name="dataType" type="java.lang.String">
+</parameter>
+<exception name="IntentFilter.MalformedMimeTypeException" type="android.content.IntentFilter.MalformedMimeTypeException">
+</exception>
+</constructor>
+<constructor name="IntentFilter"
+ type="android.content.IntentFilter"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="o" type="android.content.IntentFilter">
+</parameter>
+</constructor>
+<method name="actionsIterator"
+ return="java.util.Iterator&lt;java.lang.String&gt;"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="addAction"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="action" type="java.lang.String">
+</parameter>
+</method>
+<method name="addCategory"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="category" type="java.lang.String">
+</parameter>
+</method>
+<method name="addDataAuthority"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="host" type="java.lang.String">
+</parameter>
+<parameter name="port" type="java.lang.String">
+</parameter>
+</method>
+<method name="addDataPath"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="path" type="java.lang.String">
+</parameter>
+<parameter name="type" type="int">
+</parameter>
+</method>
+<method name="addDataScheme"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="scheme" type="java.lang.String">
+</parameter>
+</method>
+<method name="addDataType"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="type" type="java.lang.String">
+</parameter>
+<exception name="IntentFilter.MalformedMimeTypeException" type="android.content.IntentFilter.MalformedMimeTypeException">
+</exception>
+</method>
+<method name="authoritiesIterator"
+ return="java.util.Iterator&lt;android.content.IntentFilter.AuthorityEntry&gt;"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="categoriesIterator"
+ return="java.util.Iterator&lt;java.lang.String&gt;"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="countActions"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="countCategories"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="countDataAuthorities"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="countDataPaths"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="countDataSchemes"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="countDataTypes"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="create"
+ return="android.content.IntentFilter"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="action" type="java.lang.String">
+</parameter>
+<parameter name="dataType" type="java.lang.String">
+</parameter>
+</method>
+<method name="describeContents"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="dump"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="du" type="android.util.Printer">
+</parameter>
+<parameter name="prefix" type="java.lang.String">
+</parameter>
+</method>
+<method name="getAction"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="index" type="int">
+</parameter>
+</method>
+<method name="getCategory"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="index" type="int">
+</parameter>
+</method>
+<method name="getDataAuthority"
+ return="android.content.IntentFilter.AuthorityEntry"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="index" type="int">
+</parameter>
+</method>
+<method name="getDataPath"
+ return="android.os.PatternMatcher"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="index" type="int">
+</parameter>
+</method>
+<method name="getDataScheme"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="index" type="int">
+</parameter>
+</method>
+<method name="getDataType"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="index" type="int">
+</parameter>
+</method>
+<method name="getPriority"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="hasAction"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="action" type="java.lang.String">
+</parameter>
+</method>
+<method name="hasCategory"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="category" type="java.lang.String">
+</parameter>
+</method>
+<method name="hasDataAuthority"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="data" type="android.net.Uri">
+</parameter>
+</method>
+<method name="hasDataPath"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="data" type="java.lang.String">
+</parameter>
+</method>
+<method name="hasDataScheme"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="scheme" type="java.lang.String">
+</parameter>
+</method>
+<method name="hasDataType"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="type" type="java.lang.String">
+</parameter>
+</method>
+<method name="match"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="resolver" type="android.content.ContentResolver">
+</parameter>
+<parameter name="intent" type="android.content.Intent">
+</parameter>
+<parameter name="resolve" type="boolean">
+</parameter>
+<parameter name="logTag" type="java.lang.String">
+</parameter>
+</method>
+<method name="match"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="action" type="java.lang.String">
+</parameter>
+<parameter name="type" type="java.lang.String">
+</parameter>
+<parameter name="scheme" type="java.lang.String">
+</parameter>
+<parameter name="data" type="android.net.Uri">
+</parameter>
+<parameter name="categories" type="java.util.Set&lt;java.lang.String&gt;">
+</parameter>
+<parameter name="logTag" type="java.lang.String">
+</parameter>
+</method>
+<method name="matchAction"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="action" type="java.lang.String">
+</parameter>
+</method>
+<method name="matchCategories"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="categories" type="java.util.Set&lt;java.lang.String&gt;">
+</parameter>
+</method>
+<method name="matchData"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="type" type="java.lang.String">
+</parameter>
+<parameter name="scheme" type="java.lang.String">
+</parameter>
+<parameter name="data" type="android.net.Uri">
+</parameter>
+</method>
+<method name="matchDataAuthority"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="data" type="android.net.Uri">
+</parameter>
+</method>
+<method name="pathsIterator"
+ return="java.util.Iterator&lt;android.os.PatternMatcher&gt;"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="readFromXml"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="parser" type="org.xmlpull.v1.XmlPullParser">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+<exception name="XmlPullParserException" type="org.xmlpull.v1.XmlPullParserException">
+</exception>
+</method>
+<method name="schemesIterator"
+ return="java.util.Iterator&lt;java.lang.String&gt;"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="setPriority"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="priority" type="int">
+</parameter>
+</method>
+<method name="typesIterator"
+ return="java.util.Iterator&lt;java.lang.String&gt;"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="writeToParcel"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="dest" type="android.os.Parcel">
+</parameter>
+<parameter name="flags" type="int">
+</parameter>
+</method>
+<method name="writeToXml"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="serializer" type="org.xmlpull.v1.XmlSerializer">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<field name="CREATOR"
+ type="android.os.Parcelable.Creator"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="MATCH_ADJUSTMENT_MASK"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="65535"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="MATCH_ADJUSTMENT_NORMAL"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="32768"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="MATCH_CATEGORY_EMPTY"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1048576"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="MATCH_CATEGORY_HOST"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="3145728"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="MATCH_CATEGORY_MASK"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="268369920"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="MATCH_CATEGORY_PATH"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="5242880"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="MATCH_CATEGORY_PORT"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="4194304"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="MATCH_CATEGORY_SCHEME"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2097152"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="MATCH_CATEGORY_TYPE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="6291456"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="NO_MATCH_ACTION"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="-3"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="NO_MATCH_CATEGORY"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="-4"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="NO_MATCH_DATA"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="-2"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="NO_MATCH_TYPE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="-1"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="SYSTEM_HIGH_PRIORITY"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1000"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="SYSTEM_LOW_PRIORITY"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="-1000"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<class name="IntentFilter.AuthorityEntry"
+ extends="java.lang.Object"
+ abstract="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="IntentFilter.AuthorityEntry"
+ type="android.content.IntentFilter.AuthorityEntry"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="host" type="java.lang.String">
+</parameter>
+<parameter name="port" type="java.lang.String">
+</parameter>
+</constructor>
+<method name="getHost"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getPort"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="match"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="data" type="android.net.Uri">
+</parameter>
+</method>
+</class>
+<class name="IntentFilter.MalformedMimeTypeException"
+ extends="android.util.AndroidException"
+ abstract="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="IntentFilter.MalformedMimeTypeException"
+ type="android.content.IntentFilter.MalformedMimeTypeException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<constructor name="IntentFilter.MalformedMimeTypeException"
+ type="android.content.IntentFilter.MalformedMimeTypeException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+</constructor>
+</class>
+<class name="IntentSender"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="android.os.Parcelable">
+</implements>
+<method name="describeContents"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="readIntentSenderOrNullFromParcel"
+ return="android.content.IntentSender"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="in" type="android.os.Parcel">
+</parameter>
+</method>
+<method name="sendIntent"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="context" type="android.content.Context">
+</parameter>
+<parameter name="code" type="int">
+</parameter>
+<parameter name="intent" type="android.content.Intent">
+</parameter>
+<parameter name="onFinished" type="android.content.IntentSender.OnFinished">
+</parameter>
+<parameter name="handler" type="android.os.Handler">
+</parameter>
+<exception name="IntentSender.SendIntentException" type="android.content.IntentSender.SendIntentException">
+</exception>
+</method>
+<method name="writeIntentSenderOrNullToParcel"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="sender" type="android.content.IntentSender">
+</parameter>
+<parameter name="out" type="android.os.Parcel">
+</parameter>
+</method>
+<method name="writeToParcel"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="out" type="android.os.Parcel">
+</parameter>
+<parameter name="flags" type="int">
+</parameter>
+</method>
+<field name="CREATOR"
+ type="android.os.Parcelable.Creator"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<interface name="IntentSender.OnFinished"
+ abstract="true"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="onSendFinished"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="IntentSender" type="android.content.IntentSender">
+</parameter>
+<parameter name="intent" type="android.content.Intent">
+</parameter>
+<parameter name="resultCode" type="int">
+</parameter>
+<parameter name="resultData" type="java.lang.String">
+</parameter>
+<parameter name="resultExtras" type="android.os.Bundle">
+</parameter>
+</method>
+</interface>
+<class name="IntentSender.SendIntentException"
+ extends="android.util.AndroidException"
+ abstract="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="IntentSender.SendIntentException"
+ type="android.content.IntentSender.SendIntentException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<constructor name="IntentSender.SendIntentException"
+ type="android.content.IntentSender.SendIntentException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+</constructor>
+<constructor name="IntentSender.SendIntentException"
+ type="android.content.IntentSender.SendIntentException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="cause" type="java.lang.Exception">
+</parameter>
+</constructor>
+</class>
+<class name="MutableContextWrapper"
+ extends="android.content.ContextWrapper"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="MutableContextWrapper"
+ type="android.content.MutableContextWrapper"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="base" type="android.content.Context">
+</parameter>
+</constructor>
+<method name="setBaseContext"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="base" type="android.content.Context">
+</parameter>
+</method>
+</class>
+<class name="OperationApplicationException"
+ extends="java.lang.Exception"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="OperationApplicationException"
+ type="android.content.OperationApplicationException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<constructor name="OperationApplicationException"
+ type="android.content.OperationApplicationException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="message" type="java.lang.String">
+</parameter>
+</constructor>
+<constructor name="OperationApplicationException"
+ type="android.content.OperationApplicationException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="message" type="java.lang.String">
+</parameter>
+<parameter name="cause" type="java.lang.Throwable">
+</parameter>
+</constructor>
+<constructor name="OperationApplicationException"
+ type="android.content.OperationApplicationException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="cause" type="java.lang.Throwable">
+</parameter>
+</constructor>
+<constructor name="OperationApplicationException"
+ type="android.content.OperationApplicationException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="numSuccessfulYieldPoints" type="int">
+</parameter>
+</constructor>
+<constructor name="OperationApplicationException"
+ type="android.content.OperationApplicationException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="message" type="java.lang.String">
+</parameter>
+<parameter name="numSuccessfulYieldPoints" type="int">
+</parameter>
+</constructor>
+<method name="getNumSuccessfulYieldPoints"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+</class>
+<class name="PeriodicSync"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="android.os.Parcelable">
+</implements>
+<constructor name="PeriodicSync"
+ type="android.content.PeriodicSync"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="account" type="android.accounts.Account">
+</parameter>
+<parameter name="authority" type="java.lang.String">
+</parameter>
+<parameter name="extras" type="android.os.Bundle">
+</parameter>
+<parameter name="period" type="long">
+</parameter>
+</constructor>
+<method name="describeContents"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="writeToParcel"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="dest" type="android.os.Parcel">
+</parameter>
+<parameter name="flags" type="int">
+</parameter>
+</method>
+<field name="CREATOR"
+ type="android.os.Parcelable.Creator"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="account"
+ type="android.accounts.Account"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="authority"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="extras"
+ type="android.os.Bundle"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="period"
+ type="long"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<class name="ReceiverCallNotAllowedException"
+ extends="android.util.AndroidRuntimeException"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="ReceiverCallNotAllowedException"
+ type="android.content.ReceiverCallNotAllowedException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="msg" type="java.lang.String">
+</parameter>
+</constructor>
+</class>
+<class name="SearchRecentSuggestionsProvider"
+ extends="android.content.ContentProvider"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="SearchRecentSuggestionsProvider"
+ type="android.content.SearchRecentSuggestionsProvider"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<method name="delete"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="uri" type="android.net.Uri">
+</parameter>
+<parameter name="selection" type="java.lang.String">
+</parameter>
+<parameter name="selectionArgs" type="java.lang.String[]">
+</parameter>
+</method>
+<method name="getType"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="uri" type="android.net.Uri">
+</parameter>
+</method>
+<method name="insert"
+ return="android.net.Uri"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="uri" type="android.net.Uri">
+</parameter>
+<parameter name="values" type="android.content.ContentValues">
+</parameter>
+</method>
+<method name="onCreate"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="query"
+ return="android.database.Cursor"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="uri" type="android.net.Uri">
+</parameter>
+<parameter name="projection" type="java.lang.String[]">
+</parameter>
+<parameter name="selection" type="java.lang.String">
+</parameter>
+<parameter name="selectionArgs" type="java.lang.String[]">
+</parameter>
+<parameter name="sortOrder" type="java.lang.String">
+</parameter>
+</method>
+<method name="setupSuggestions"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="authority" type="java.lang.String">
+</parameter>
+<parameter name="mode" type="int">
+</parameter>
+</method>
+<method name="update"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="uri" type="android.net.Uri">
+</parameter>
+<parameter name="values" type="android.content.ContentValues">
+</parameter>
+<parameter name="selection" type="java.lang.String">
+</parameter>
+<parameter name="selectionArgs" type="java.lang.String[]">
+</parameter>
+</method>
+<field name="DATABASE_MODE_2LINES"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="DATABASE_MODE_QUERIES"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<interface name="ServiceConnection"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="onServiceConnected"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="android.content.ComponentName">
+</parameter>
+<parameter name="service" type="android.os.IBinder">
+</parameter>
+</method>
+<method name="onServiceDisconnected"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="android.content.ComponentName">
+</parameter>
+</method>
+</interface>
+<interface name="SharedPreferences"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="contains"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="key" type="java.lang.String">
+</parameter>
+</method>
+<method name="edit"
+ return="android.content.SharedPreferences.Editor"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getAll"
+ return="java.util.Map&lt;java.lang.String, ?&gt;"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getBoolean"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="key" type="java.lang.String">
+</parameter>
+<parameter name="defValue" type="boolean">
+</parameter>
+</method>
+<method name="getFloat"
+ return="float"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="key" type="java.lang.String">
+</parameter>
+<parameter name="defValue" type="float">
+</parameter>
+</method>
+<method name="getInt"
+ return="int"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="key" type="java.lang.String">
+</parameter>
+<parameter name="defValue" type="int">
+</parameter>
+</method>
+<method name="getLong"
+ return="long"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="key" type="java.lang.String">
+</parameter>
+<parameter name="defValue" type="long">
+</parameter>
+</method>
+<method name="getString"
+ return="java.lang.String"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="key" type="java.lang.String">
+</parameter>
+<parameter name="defValue" type="java.lang.String">
+</parameter>
+</method>
+<method name="registerOnSharedPreferenceChangeListener"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="listener" type="android.content.SharedPreferences.OnSharedPreferenceChangeListener">
+</parameter>
+</method>
+<method name="unregisterOnSharedPreferenceChangeListener"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="listener" type="android.content.SharedPreferences.OnSharedPreferenceChangeListener">
+</parameter>
+</method>
+</interface>
+<interface name="SharedPreferences.Editor"
+ abstract="true"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="clear"
+ return="android.content.SharedPreferences.Editor"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="commit"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="putBoolean"
+ return="android.content.SharedPreferences.Editor"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="key" type="java.lang.String">
+</parameter>
+<parameter name="value" type="boolean">
+</parameter>
+</method>
+<method name="putFloat"
+ return="android.content.SharedPreferences.Editor"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="key" type="java.lang.String">
+</parameter>
+<parameter name="value" type="float">
+</parameter>
+</method>
+<method name="putInt"
+ return="android.content.SharedPreferences.Editor"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="key" type="java.lang.String">
+</parameter>
+<parameter name="value" type="int">
+</parameter>
+</method>
+<method name="putLong"
+ return="android.content.SharedPreferences.Editor"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="key" type="java.lang.String">
+</parameter>
+<parameter name="value" type="long">
+</parameter>
+</method>
+<method name="putString"
+ return="android.content.SharedPreferences.Editor"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="key" type="java.lang.String">
+</parameter>
+<parameter name="value" type="java.lang.String">
+</parameter>
+</method>
+<method name="remove"
+ return="android.content.SharedPreferences.Editor"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="key" type="java.lang.String">
+</parameter>
+</method>
+</interface>
+<interface name="SharedPreferences.OnSharedPreferenceChangeListener"
+ abstract="true"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="onSharedPreferenceChanged"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="sharedPreferences" type="android.content.SharedPreferences">
+</parameter>
+<parameter name="key" type="java.lang.String">
+</parameter>
+</method>
+</interface>
+<class name="SyncAdapterType"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="android.os.Parcelable">
+</implements>
+<constructor name="SyncAdapterType"
+ type="android.content.SyncAdapterType"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="authority" type="java.lang.String">
+</parameter>
+<parameter name="accountType" type="java.lang.String">
+</parameter>
+<parameter name="userVisible" type="boolean">
+</parameter>
+<parameter name="supportsUploading" type="boolean">
+</parameter>
+</constructor>
+<constructor name="SyncAdapterType"
+ type="android.content.SyncAdapterType"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="source" type="android.os.Parcel">
+</parameter>
+</constructor>
+<method name="describeContents"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isUserVisible"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="newKey"
+ return="android.content.SyncAdapterType"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="authority" type="java.lang.String">
+</parameter>
+<parameter name="accountType" type="java.lang.String">
+</parameter>
+</method>
+<method name="supportsUploading"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="writeToParcel"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="dest" type="android.os.Parcel">
+</parameter>
+<parameter name="flags" type="int">
+</parameter>
+</method>
+<field name="CREATOR"
+ type="android.os.Parcelable.Creator"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="accountType"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="authority"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="isKey"
+ type="boolean"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<class name="SyncContext"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="getSyncContextBinder"
+ return="android.os.IBinder"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="onFinished"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="result" type="android.content.SyncResult">
+</parameter>
+</method>
+</class>
+<class name="SyncInfo"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<field name="account"
+ type="android.accounts.Account"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="authority"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="startTime"
+ type="long"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<class name="SyncResult"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="android.os.Parcelable">
+</implements>
+<constructor name="SyncResult"
+ type="android.content.SyncResult"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<method name="clear"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="describeContents"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="hasError"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="hasHardError"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="hasSoftError"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="madeSomeProgress"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="toDebugString"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="writeToParcel"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="parcel" type="android.os.Parcel">
+</parameter>
+<parameter name="flags" type="int">
+</parameter>
+</method>
+<field name="ALREADY_IN_PROGRESS"
+ type="android.content.SyncResult"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="CREATOR"
+ type="android.os.Parcelable.Creator"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="databaseError"
+ type="boolean"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="delayUntil"
+ type="long"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="fullSyncRequested"
+ type="boolean"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="moreRecordsToGet"
+ type="boolean"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="partialSyncUnavailable"
+ type="boolean"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="stats"
+ type="android.content.SyncStats"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="syncAlreadyInProgress"
+ type="boolean"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="tooManyDeletions"
+ type="boolean"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="tooManyRetries"
+ type="boolean"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<class name="SyncStats"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="android.os.Parcelable">
+</implements>
+<constructor name="SyncStats"
+ type="android.content.SyncStats"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<constructor name="SyncStats"
+ type="android.content.SyncStats"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="in" type="android.os.Parcel">
+</parameter>
+</constructor>
+<method name="clear"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="describeContents"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="writeToParcel"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="dest" type="android.os.Parcel">
+</parameter>
+<parameter name="flags" type="int">
+</parameter>
+</method>
+<field name="CREATOR"
+ type="android.os.Parcelable.Creator"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="numAuthExceptions"
+ type="long"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="numConflictDetectedExceptions"
+ type="long"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="numDeletes"
+ type="long"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="numEntries"
+ type="long"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="numInserts"
+ type="long"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="numIoExceptions"
+ type="long"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="numParseExceptions"
+ type="long"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="numSkippedEntries"
+ type="long"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="numUpdates"
+ type="long"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<interface name="SyncStatusObserver"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="onStatusChanged"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="which" type="int">
+</parameter>
+</method>
+</interface>
+<class name="UriMatcher"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="UriMatcher"
+ type="android.content.UriMatcher"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="code" type="int">
+</parameter>
+</constructor>
+<method name="addURI"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="authority" type="java.lang.String">
+</parameter>
+<parameter name="path" type="java.lang.String">
+</parameter>
+<parameter name="code" type="int">
+</parameter>
+</method>
+<method name="match"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="uri" type="android.net.Uri">
+</parameter>
+</method>
+<field name="NO_MATCH"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="-1"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+</package>
+<package name="android.content.pm"
+>
+<class name="ActivityInfo"
+ extends="android.content.pm.ComponentInfo"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="android.os.Parcelable">
+</implements>
+<constructor name="ActivityInfo"
+ type="android.content.pm.ActivityInfo"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<constructor name="ActivityInfo"
+ type="android.content.pm.ActivityInfo"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="orig" type="android.content.pm.ActivityInfo">
+</parameter>
+</constructor>
+<method name="describeContents"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="dump"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="pw" type="android.util.Printer">
+</parameter>
+<parameter name="prefix" type="java.lang.String">
+</parameter>
+</method>
+<method name="getThemeResource"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<field name="CONFIG_FONT_SCALE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1073741824"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="CONFIG_KEYBOARD"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="CONFIG_KEYBOARD_HIDDEN"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="32"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="CONFIG_LOCALE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="4"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="CONFIG_MCC"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="CONFIG_MNC"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="CONFIG_NAVIGATION"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="64"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="CONFIG_ORIENTATION"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="128"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="CONFIG_SCREEN_LAYOUT"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="256"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="CONFIG_TOUCHSCREEN"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="8"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="CONFIG_UI_MODE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="512"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="CREATOR"
+ type="android.os.Parcelable.Creator"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="FLAG_ALLOW_TASK_REPARENTING"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="64"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="FLAG_ALWAYS_RETAIN_TASK_STATE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="8"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="FLAG_CLEAR_TASK_ON_LAUNCH"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="4"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="FLAG_EXCLUDE_FROM_RECENTS"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="32"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="FLAG_FINISH_ON_CLOSE_SYSTEM_DIALOGS"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="256"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="FLAG_FINISH_ON_TASK_LAUNCH"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="FLAG_MULTIPROCESS"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="FLAG_NO_HISTORY"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="128"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="FLAG_STATE_NOT_NEEDED"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="LAUNCH_MULTIPLE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="0"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="LAUNCH_SINGLE_INSTANCE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="3"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="LAUNCH_SINGLE_TASK"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="LAUNCH_SINGLE_TOP"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="SCREEN_ORIENTATION_BEHIND"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="3"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="SCREEN_ORIENTATION_LANDSCAPE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="0"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="SCREEN_ORIENTATION_NOSENSOR"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="5"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="SCREEN_ORIENTATION_PORTRAIT"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="SCREEN_ORIENTATION_SENSOR"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="4"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="SCREEN_ORIENTATION_UNSPECIFIED"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="-1"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="SCREEN_ORIENTATION_USER"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="configChanges"
+ type="int"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="flags"
+ type="int"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="launchMode"
+ type="int"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="permission"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="screenOrientation"
+ type="int"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="softInputMode"
+ type="int"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="targetActivity"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="taskAffinity"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="theme"
+ type="int"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<class name="ApplicationInfo"
+ extends="android.content.pm.PackageItemInfo"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="android.os.Parcelable">
+</implements>
+<constructor name="ApplicationInfo"
+ type="android.content.pm.ApplicationInfo"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<constructor name="ApplicationInfo"
+ type="android.content.pm.ApplicationInfo"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="orig" type="android.content.pm.ApplicationInfo">
+</parameter>
+</constructor>
+<method name="describeContents"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="dump"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="pw" type="android.util.Printer">
+</parameter>
+<parameter name="prefix" type="java.lang.String">
+</parameter>
+</method>
+<method name="loadDescription"
+ return="java.lang.CharSequence"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="pm" type="android.content.pm.PackageManager">
+</parameter>
+</method>
+<field name="CREATOR"
+ type="android.os.Parcelable.Creator"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="FLAG_ALLOW_BACKUP"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="32768"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="FLAG_ALLOW_CLEAR_USER_DATA"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="64"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="FLAG_ALLOW_TASK_REPARENTING"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="32"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="FLAG_DEBUGGABLE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="FLAG_FACTORY_TEST"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="FLAG_HAS_CODE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="4"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="FLAG_KILL_AFTER_RESTORE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="65536"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="FLAG_PERSISTENT"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="8"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="FLAG_RESIZEABLE_FOR_SCREENS"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="4096"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="FLAG_RESTORE_ANY_VERSION"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="131072"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="FLAG_SUPPORTS_LARGE_SCREENS"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2048"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="FLAG_SUPPORTS_NORMAL_SCREENS"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1024"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="FLAG_SUPPORTS_SCREEN_DENSITIES"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="8192"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="FLAG_SUPPORTS_SMALL_SCREENS"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="512"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="FLAG_SYSTEM"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="FLAG_TEST_ONLY"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="256"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="FLAG_UPDATED_SYSTEM_APP"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="128"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="FLAG_VM_SAFE_MODE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16384"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="backupAgentName"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="className"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="dataDir"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="descriptionRes"
+ type="int"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="enabled"
+ type="boolean"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="flags"
+ type="int"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="manageSpaceActivityName"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="permission"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="processName"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="publicSourceDir"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="sharedLibraryFiles"
+ type="java.lang.String[]"
+ transient="false"
+ volatile="false"
+ value="null"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="sourceDir"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="targetSdkVersion"
+ type="int"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="taskAffinity"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="theme"
+ type="int"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="uid"
+ type="int"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<class name="ApplicationInfo.DisplayNameComparator"
+ extends="java.lang.Object"
+ abstract="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="java.util.Comparator">
+</implements>
+<constructor name="ApplicationInfo.DisplayNameComparator"
+ type="android.content.pm.ApplicationInfo.DisplayNameComparator"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="pm" type="android.content.pm.PackageManager">
+</parameter>
+</constructor>
+<method name="compare"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="aa" type="android.content.pm.ApplicationInfo">
+</parameter>
+<parameter name="ab" type="android.content.pm.ApplicationInfo">
+</parameter>
+</method>
+</class>
+<class name="ComponentInfo"
+ extends="android.content.pm.PackageItemInfo"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="ComponentInfo"
+ type="android.content.pm.ComponentInfo"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<constructor name="ComponentInfo"
+ type="android.content.pm.ComponentInfo"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="orig" type="android.content.pm.ComponentInfo">
+</parameter>
+</constructor>
+<constructor name="ComponentInfo"
+ type="android.content.pm.ComponentInfo"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="source" type="android.os.Parcel">
+</parameter>
+</constructor>
+<method name="getIconResource"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<field name="applicationInfo"
+ type="android.content.pm.ApplicationInfo"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="descriptionRes"
+ type="int"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="enabled"
+ type="boolean"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="exported"
+ type="boolean"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="processName"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<class name="ConfigurationInfo"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="android.os.Parcelable">
+</implements>
+<constructor name="ConfigurationInfo"
+ type="android.content.pm.ConfigurationInfo"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<constructor name="ConfigurationInfo"
+ type="android.content.pm.ConfigurationInfo"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="orig" type="android.content.pm.ConfigurationInfo">
+</parameter>
+</constructor>
+<method name="describeContents"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getGlEsVersion"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="writeToParcel"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="dest" type="android.os.Parcel">
+</parameter>
+<parameter name="parcelableFlags" type="int">
+</parameter>
+</method>
+<field name="CREATOR"
+ type="android.os.Parcelable.Creator"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_ES_VERSION_UNDEFINED"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="0"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="INPUT_FEATURE_FIVE_WAY_NAV"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="INPUT_FEATURE_HARD_KEYBOARD"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="reqGlEsVersion"
+ type="int"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="reqInputFeatures"
+ type="int"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="reqKeyboardType"
+ type="int"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="reqNavigation"
+ type="int"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="reqTouchScreen"
+ type="int"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<class name="FeatureInfo"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="android.os.Parcelable">
+</implements>
+<constructor name="FeatureInfo"
+ type="android.content.pm.FeatureInfo"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<constructor name="FeatureInfo"
+ type="android.content.pm.FeatureInfo"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="orig" type="android.content.pm.FeatureInfo">
+</parameter>
+</constructor>
+<method name="describeContents"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getGlEsVersion"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="writeToParcel"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="dest" type="android.os.Parcel">
+</parameter>
+<parameter name="parcelableFlags" type="int">
+</parameter>
+</method>
+<field name="CREATOR"
+ type="android.os.Parcelable.Creator"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="FLAG_REQUIRED"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_ES_VERSION_UNDEFINED"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="0"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="flags"
+ type="int"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="name"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="reqGlEsVersion"
+ type="int"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<class name="InstrumentationInfo"
+ extends="android.content.pm.PackageItemInfo"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="android.os.Parcelable">
+</implements>
+<constructor name="InstrumentationInfo"
+ type="android.content.pm.InstrumentationInfo"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<constructor name="InstrumentationInfo"
+ type="android.content.pm.InstrumentationInfo"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="orig" type="android.content.pm.InstrumentationInfo">
+</parameter>
+</constructor>
+<method name="describeContents"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<field name="CREATOR"
+ type="android.os.Parcelable.Creator"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="dataDir"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="functionalTest"
+ type="boolean"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="handleProfiling"
+ type="boolean"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="publicSourceDir"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="sourceDir"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="targetPackage"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<class name="LabeledIntent"
+ extends="android.content.Intent"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="LabeledIntent"
+ type="android.content.pm.LabeledIntent"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="origIntent" type="android.content.Intent">
+</parameter>
+<parameter name="sourcePackage" type="java.lang.String">
+</parameter>
+<parameter name="labelRes" type="int">
+</parameter>
+<parameter name="icon" type="int">
+</parameter>
+</constructor>
+<constructor name="LabeledIntent"
+ type="android.content.pm.LabeledIntent"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="origIntent" type="android.content.Intent">
+</parameter>
+<parameter name="sourcePackage" type="java.lang.String">
+</parameter>
+<parameter name="nonLocalizedLabel" type="java.lang.CharSequence">
+</parameter>
+<parameter name="icon" type="int">
+</parameter>
+</constructor>
+<constructor name="LabeledIntent"
+ type="android.content.pm.LabeledIntent"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="sourcePackage" type="java.lang.String">
+</parameter>
+<parameter name="labelRes" type="int">
+</parameter>
+<parameter name="icon" type="int">
+</parameter>
+</constructor>
+<constructor name="LabeledIntent"
+ type="android.content.pm.LabeledIntent"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="sourcePackage" type="java.lang.String">
+</parameter>
+<parameter name="nonLocalizedLabel" type="java.lang.CharSequence">
+</parameter>
+<parameter name="icon" type="int">
+</parameter>
+</constructor>
+<method name="getIconResource"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getLabelResource"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getNonLocalizedLabel"
+ return="java.lang.CharSequence"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getSourcePackage"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="loadIcon"
+ return="android.graphics.drawable.Drawable"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="pm" type="android.content.pm.PackageManager">
+</parameter>
+</method>
+<method name="loadLabel"
+ return="java.lang.CharSequence"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="pm" type="android.content.pm.PackageManager">
+</parameter>
+</method>
+<field name="CREATOR"
+ type="android.os.Parcelable.Creator"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<class name="PackageInfo"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="android.os.Parcelable">
+</implements>
+<constructor name="PackageInfo"
+ type="android.content.pm.PackageInfo"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<method name="describeContents"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="writeToParcel"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="dest" type="android.os.Parcel">
+</parameter>
+<parameter name="parcelableFlags" type="int">
+</parameter>
+</method>
+<field name="CREATOR"
+ type="android.os.Parcelable.Creator"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="activities"
+ type="android.content.pm.ActivityInfo[]"
+ transient="false"
+ volatile="false"
+ value="null"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="applicationInfo"
+ type="android.content.pm.ApplicationInfo"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="configPreferences"
+ type="android.content.pm.ConfigurationInfo[]"
+ transient="false"
+ volatile="false"
+ value="null"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="gids"
+ type="int[]"
+ transient="false"
+ volatile="false"
+ value="null"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="instrumentation"
+ type="android.content.pm.InstrumentationInfo[]"
+ transient="false"
+ volatile="false"
+ value="null"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="packageName"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="permissions"
+ type="android.content.pm.PermissionInfo[]"
+ transient="false"
+ volatile="false"
+ value="null"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="providers"
+ type="android.content.pm.ProviderInfo[]"
+ transient="false"
+ volatile="false"
+ value="null"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="receivers"
+ type="android.content.pm.ActivityInfo[]"
+ transient="false"
+ volatile="false"
+ value="null"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="reqFeatures"
+ type="android.content.pm.FeatureInfo[]"
+ transient="false"
+ volatile="false"
+ value="null"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="requestedPermissions"
+ type="java.lang.String[]"
+ transient="false"
+ volatile="false"
+ value="null"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="services"
+ type="android.content.pm.ServiceInfo[]"
+ transient="false"
+ volatile="false"
+ value="null"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="sharedUserId"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="sharedUserLabel"
+ type="int"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="signatures"
+ type="android.content.pm.Signature[]"
+ transient="false"
+ volatile="false"
+ value="null"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="versionCode"
+ type="int"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="versionName"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<class name="PackageItemInfo"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="PackageItemInfo"
+ type="android.content.pm.PackageItemInfo"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<constructor name="PackageItemInfo"
+ type="android.content.pm.PackageItemInfo"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="orig" type="android.content.pm.PackageItemInfo">
+</parameter>
+</constructor>
+<constructor name="PackageItemInfo"
+ type="android.content.pm.PackageItemInfo"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="source" type="android.os.Parcel">
+</parameter>
+</constructor>
+<method name="dumpBack"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="pw" type="android.util.Printer">
+</parameter>
+<parameter name="prefix" type="java.lang.String">
+</parameter>
+</method>
+<method name="dumpFront"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="pw" type="android.util.Printer">
+</parameter>
+<parameter name="prefix" type="java.lang.String">
+</parameter>
+</method>
+<method name="loadIcon"
+ return="android.graphics.drawable.Drawable"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="pm" type="android.content.pm.PackageManager">
+</parameter>
+</method>
+<method name="loadLabel"
+ return="java.lang.CharSequence"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="pm" type="android.content.pm.PackageManager">
+</parameter>
+</method>
+<method name="loadXmlMetaData"
+ return="android.content.res.XmlResourceParser"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="pm" type="android.content.pm.PackageManager">
+</parameter>
+<parameter name="name" type="java.lang.String">
+</parameter>
+</method>
+<method name="writeToParcel"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="dest" type="android.os.Parcel">
+</parameter>
+<parameter name="parcelableFlags" type="int">
+</parameter>
+</method>
+<field name="icon"
+ type="int"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="labelRes"
+ type="int"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="metaData"
+ type="android.os.Bundle"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="name"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="nonLocalizedLabel"
+ type="java.lang.CharSequence"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="packageName"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<class name="PackageItemInfo.DisplayNameComparator"
+ extends="java.lang.Object"
+ abstract="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="java.util.Comparator">
+</implements>
+<constructor name="PackageItemInfo.DisplayNameComparator"
+ type="android.content.pm.PackageItemInfo.DisplayNameComparator"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="pm" type="android.content.pm.PackageManager">
+</parameter>
+</constructor>
+<method name="compare"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="aa" type="android.content.pm.PackageItemInfo">
+</parameter>
+<parameter name="ab" type="android.content.pm.PackageItemInfo">
+</parameter>
+</method>
+</class>
+<class name="PackageManager"
+ extends="java.lang.Object"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="PackageManager"
+ type="android.content.pm.PackageManager"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<method name="addPackageToPreferred"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="deprecated"
+ visibility="public"
+>
+<parameter name="packageName" type="java.lang.String">
+</parameter>
+</method>
+<method name="addPermission"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="info" type="android.content.pm.PermissionInfo">
+</parameter>
+</method>
+<method name="addPermissionAsync"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="info" type="android.content.pm.PermissionInfo">
+</parameter>
+</method>
+<method name="addPreferredActivity"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="deprecated"
+ visibility="public"
+>
+<parameter name="filter" type="android.content.IntentFilter">
+</parameter>
+<parameter name="match" type="int">
+</parameter>
+<parameter name="set" type="android.content.ComponentName[]">
+</parameter>
+<parameter name="activity" type="android.content.ComponentName">
+</parameter>
+</method>
+<method name="canonicalToCurrentPackageNames"
+ return="java.lang.String[]"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="names" type="java.lang.String[]">
+</parameter>
+</method>
+<method name="checkPermission"
+ return="int"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="permName" type="java.lang.String">
+</parameter>
+<parameter name="pkgName" type="java.lang.String">
+</parameter>
+</method>
+<method name="checkSignatures"
+ return="int"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="pkg1" type="java.lang.String">
+</parameter>
+<parameter name="pkg2" type="java.lang.String">
+</parameter>
+</method>
+<method name="checkSignatures"
+ return="int"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="uid1" type="int">
+</parameter>
+<parameter name="uid2" type="int">
+</parameter>
+</method>
+<method name="clearPackagePreferredActivities"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="packageName" type="java.lang.String">
+</parameter>
+</method>
+<method name="currentToCanonicalPackageNames"
+ return="java.lang.String[]"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="names" type="java.lang.String[]">
+</parameter>
+</method>
+<method name="getActivityIcon"
+ return="android.graphics.drawable.Drawable"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="activityName" type="android.content.ComponentName">
+</parameter>
+<exception name="PackageManager.NameNotFoundException" type="android.content.pm.PackageManager.NameNotFoundException">
+</exception>
+</method>
+<method name="getActivityIcon"
+ return="android.graphics.drawable.Drawable"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="intent" type="android.content.Intent">
+</parameter>
+<exception name="PackageManager.NameNotFoundException" type="android.content.pm.PackageManager.NameNotFoundException">
+</exception>
+</method>
+<method name="getActivityInfo"
+ return="android.content.pm.ActivityInfo"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="className" type="android.content.ComponentName">
+</parameter>
+<parameter name="flags" type="int">
+</parameter>
+<exception name="PackageManager.NameNotFoundException" type="android.content.pm.PackageManager.NameNotFoundException">
+</exception>
+</method>
+<method name="getAllPermissionGroups"
+ return="java.util.List&lt;android.content.pm.PermissionGroupInfo&gt;"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="flags" type="int">
+</parameter>
+</method>
+<method name="getApplicationEnabledSetting"
+ return="int"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="packageName" type="java.lang.String">
+</parameter>
+</method>
+<method name="getApplicationIcon"
+ return="android.graphics.drawable.Drawable"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="info" type="android.content.pm.ApplicationInfo">
+</parameter>
+</method>
+<method name="getApplicationIcon"
+ return="android.graphics.drawable.Drawable"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="packageName" type="java.lang.String">
+</parameter>
+<exception name="PackageManager.NameNotFoundException" type="android.content.pm.PackageManager.NameNotFoundException">
+</exception>
+</method>
+<method name="getApplicationInfo"
+ return="android.content.pm.ApplicationInfo"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="packageName" type="java.lang.String">
+</parameter>
+<parameter name="flags" type="int">
+</parameter>
+<exception name="PackageManager.NameNotFoundException" type="android.content.pm.PackageManager.NameNotFoundException">
+</exception>
+</method>
+<method name="getApplicationLabel"
+ return="java.lang.CharSequence"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="info" type="android.content.pm.ApplicationInfo">
+</parameter>
+</method>
+<method name="getComponentEnabledSetting"
+ return="int"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="componentName" type="android.content.ComponentName">
+</parameter>
+</method>
+<method name="getDefaultActivityIcon"
+ return="android.graphics.drawable.Drawable"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getDrawable"
+ return="android.graphics.drawable.Drawable"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="packageName" type="java.lang.String">
+</parameter>
+<parameter name="resid" type="int">
+</parameter>
+<parameter name="appInfo" type="android.content.pm.ApplicationInfo">
+</parameter>
+</method>
+<method name="getInstalledApplications"
+ return="java.util.List&lt;android.content.pm.ApplicationInfo&gt;"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="flags" type="int">
+</parameter>
+</method>
+<method name="getInstalledPackages"
+ return="java.util.List&lt;android.content.pm.PackageInfo&gt;"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="flags" type="int">
+</parameter>
+</method>
+<method name="getInstallerPackageName"
+ return="java.lang.String"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="packageName" type="java.lang.String">
+</parameter>
+</method>
+<method name="getInstrumentationInfo"
+ return="android.content.pm.InstrumentationInfo"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="className" type="android.content.ComponentName">
+</parameter>
+<parameter name="flags" type="int">
+</parameter>
+<exception name="PackageManager.NameNotFoundException" type="android.content.pm.PackageManager.NameNotFoundException">
+</exception>
+</method>
+<method name="getLaunchIntentForPackage"
+ return="android.content.Intent"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="packageName" type="java.lang.String">
+</parameter>
+</method>
+<method name="getNameForUid"
+ return="java.lang.String"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="uid" type="int">
+</parameter>
+</method>
+<method name="getPackageArchiveInfo"
+ return="android.content.pm.PackageInfo"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="archiveFilePath" type="java.lang.String">
+</parameter>
+<parameter name="flags" type="int">
+</parameter>
+</method>
+<method name="getPackageGids"
+ return="int[]"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="packageName" type="java.lang.String">
+</parameter>
+<exception name="PackageManager.NameNotFoundException" type="android.content.pm.PackageManager.NameNotFoundException">
+</exception>
+</method>
+<method name="getPackageInfo"
+ return="android.content.pm.PackageInfo"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="packageName" type="java.lang.String">
+</parameter>
+<parameter name="flags" type="int">
+</parameter>
+<exception name="PackageManager.NameNotFoundException" type="android.content.pm.PackageManager.NameNotFoundException">
+</exception>
+</method>
+<method name="getPackagesForUid"
+ return="java.lang.String[]"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="uid" type="int">
+</parameter>
+</method>
+<method name="getPermissionGroupInfo"
+ return="android.content.pm.PermissionGroupInfo"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+<parameter name="flags" type="int">
+</parameter>
+<exception name="PackageManager.NameNotFoundException" type="android.content.pm.PackageManager.NameNotFoundException">
+</exception>
+</method>
+<method name="getPermissionInfo"
+ return="android.content.pm.PermissionInfo"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+<parameter name="flags" type="int">
+</parameter>
+<exception name="PackageManager.NameNotFoundException" type="android.content.pm.PackageManager.NameNotFoundException">
+</exception>
+</method>
+<method name="getPreferredActivities"
+ return="int"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="outFilters" type="java.util.List&lt;android.content.IntentFilter&gt;">
+</parameter>
+<parameter name="outActivities" type="java.util.List&lt;android.content.ComponentName&gt;">
+</parameter>
+<parameter name="packageName" type="java.lang.String">
+</parameter>
+</method>
+<method name="getPreferredPackages"
+ return="java.util.List&lt;android.content.pm.PackageInfo&gt;"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="flags" type="int">
+</parameter>
+</method>
+<method name="getReceiverInfo"
+ return="android.content.pm.ActivityInfo"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="className" type="android.content.ComponentName">
+</parameter>
+<parameter name="flags" type="int">
+</parameter>
+<exception name="PackageManager.NameNotFoundException" type="android.content.pm.PackageManager.NameNotFoundException">
+</exception>
+</method>
+<method name="getResourcesForActivity"
+ return="android.content.res.Resources"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="activityName" type="android.content.ComponentName">
+</parameter>
+<exception name="PackageManager.NameNotFoundException" type="android.content.pm.PackageManager.NameNotFoundException">
+</exception>
+</method>
+<method name="getResourcesForApplication"
+ return="android.content.res.Resources"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="app" type="android.content.pm.ApplicationInfo">
+</parameter>
+<exception name="PackageManager.NameNotFoundException" type="android.content.pm.PackageManager.NameNotFoundException">
+</exception>
+</method>
+<method name="getResourcesForApplication"
+ return="android.content.res.Resources"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="appPackageName" type="java.lang.String">
+</parameter>
+<exception name="PackageManager.NameNotFoundException" type="android.content.pm.PackageManager.NameNotFoundException">
+</exception>
+</method>
+<method name="getServiceInfo"
+ return="android.content.pm.ServiceInfo"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="className" type="android.content.ComponentName">
+</parameter>
+<parameter name="flags" type="int">
+</parameter>
+<exception name="PackageManager.NameNotFoundException" type="android.content.pm.PackageManager.NameNotFoundException">
+</exception>
+</method>
+<method name="getSystemAvailableFeatures"
+ return="android.content.pm.FeatureInfo[]"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getSystemSharedLibraryNames"
+ return="java.lang.String[]"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getText"
+ return="java.lang.CharSequence"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="packageName" type="java.lang.String">
+</parameter>
+<parameter name="resid" type="int">
+</parameter>
+<parameter name="appInfo" type="android.content.pm.ApplicationInfo">
+</parameter>
+</method>
+<method name="getXml"
+ return="android.content.res.XmlResourceParser"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="packageName" type="java.lang.String">
+</parameter>
+<parameter name="resid" type="int">
+</parameter>
+<parameter name="appInfo" type="android.content.pm.ApplicationInfo">
+</parameter>
+</method>
+<method name="hasSystemFeature"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+</method>
+<method name="isSafeMode"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="queryBroadcastReceivers"
+ return="java.util.List&lt;android.content.pm.ResolveInfo&gt;"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="intent" type="android.content.Intent">
+</parameter>
+<parameter name="flags" type="int">
+</parameter>
+</method>
+<method name="queryContentProviders"
+ return="java.util.List&lt;android.content.pm.ProviderInfo&gt;"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="processName" type="java.lang.String">
+</parameter>
+<parameter name="uid" type="int">
+</parameter>
+<parameter name="flags" type="int">
+</parameter>
+</method>
+<method name="queryInstrumentation"
+ return="java.util.List&lt;android.content.pm.InstrumentationInfo&gt;"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="targetPackage" type="java.lang.String">
+</parameter>
+<parameter name="flags" type="int">
+</parameter>
+</method>
+<method name="queryIntentActivities"
+ return="java.util.List&lt;android.content.pm.ResolveInfo&gt;"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="intent" type="android.content.Intent">
+</parameter>
+<parameter name="flags" type="int">
+</parameter>
+</method>
+<method name="queryIntentActivityOptions"
+ return="java.util.List&lt;android.content.pm.ResolveInfo&gt;"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="caller" type="android.content.ComponentName">
+</parameter>
+<parameter name="specifics" type="android.content.Intent[]">
+</parameter>
+<parameter name="intent" type="android.content.Intent">
+</parameter>
+<parameter name="flags" type="int">
+</parameter>
+</method>
+<method name="queryIntentServices"
+ return="java.util.List&lt;android.content.pm.ResolveInfo&gt;"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="intent" type="android.content.Intent">
+</parameter>
+<parameter name="flags" type="int">
+</parameter>
+</method>
+<method name="queryPermissionsByGroup"
+ return="java.util.List&lt;android.content.pm.PermissionInfo&gt;"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="group" type="java.lang.String">
+</parameter>
+<parameter name="flags" type="int">
+</parameter>
+<exception name="PackageManager.NameNotFoundException" type="android.content.pm.PackageManager.NameNotFoundException">
+</exception>
+</method>
+<method name="removePackageFromPreferred"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="deprecated"
+ visibility="public"
+>
+<parameter name="packageName" type="java.lang.String">
+</parameter>
+</method>
+<method name="removePermission"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+</method>
+<method name="resolveActivity"
+ return="android.content.pm.ResolveInfo"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="intent" type="android.content.Intent">
+</parameter>
+<parameter name="flags" type="int">
+</parameter>
+</method>
+<method name="resolveContentProvider"
+ return="android.content.pm.ProviderInfo"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+<parameter name="flags" type="int">
+</parameter>
+</method>
+<method name="resolveService"
+ return="android.content.pm.ResolveInfo"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="intent" type="android.content.Intent">
+</parameter>
+<parameter name="flags" type="int">
+</parameter>
+</method>
+<method name="setApplicationEnabledSetting"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="packageName" type="java.lang.String">
+</parameter>
+<parameter name="newState" type="int">
+</parameter>
+<parameter name="flags" type="int">
+</parameter>
+</method>
+<method name="setComponentEnabledSetting"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="componentName" type="android.content.ComponentName">
+</parameter>
+<parameter name="newState" type="int">
+</parameter>
+<parameter name="flags" type="int">
+</parameter>
+</method>
+<field name="COMPONENT_ENABLED_STATE_DEFAULT"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="0"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="COMPONENT_ENABLED_STATE_DISABLED"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="COMPONENT_ENABLED_STATE_ENABLED"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="DONT_KILL_APP"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="FEATURE_BLUETOOTH"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.hardware.bluetooth&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="FEATURE_CAMERA"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.hardware.camera&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="FEATURE_CAMERA_AUTOFOCUS"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.hardware.camera.autofocus&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="FEATURE_CAMERA_FLASH"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.hardware.camera.flash&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="FEATURE_LIVE_WALLPAPER"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.software.live_wallpaper&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="FEATURE_LOCATION"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.hardware.location&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="FEATURE_LOCATION_GPS"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.hardware.location.gps&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="FEATURE_LOCATION_NETWORK"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.hardware.location.network&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="FEATURE_MICROPHONE"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.hardware.microphone&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="FEATURE_SENSOR_ACCELEROMETER"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.hardware.sensor.accelerometer&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="FEATURE_SENSOR_COMPASS"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.hardware.sensor.compass&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="FEATURE_SENSOR_LIGHT"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.hardware.sensor.light&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="FEATURE_SENSOR_PROXIMITY"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.hardware.sensor.proximity&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="FEATURE_TELEPHONY"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.hardware.telephony&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="FEATURE_TELEPHONY_CDMA"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.hardware.telephony.cdma&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="FEATURE_TELEPHONY_GSM"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.hardware.telephony.gsm&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="FEATURE_TOUCHSCREEN"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.hardware.touchscreen&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="FEATURE_TOUCHSCREEN_MULTITOUCH"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.hardware.touchscreen.multitouch&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="FEATURE_TOUCHSCREEN_MULTITOUCH_DISTINCT"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.hardware.touchscreen.multitouch.distinct&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="FEATURE_WIFI"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.hardware.wifi&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GET_ACTIVITIES"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GET_CONFIGURATIONS"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16384"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GET_DISABLED_COMPONENTS"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="512"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GET_GIDS"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="256"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GET_INSTRUMENTATION"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GET_INTENT_FILTERS"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="32"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GET_META_DATA"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="128"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GET_PERMISSIONS"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="4096"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GET_PROVIDERS"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="8"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GET_RECEIVERS"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GET_RESOLVED_FILTER"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="64"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GET_SERVICES"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="4"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GET_SHARED_LIBRARY_FILES"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1024"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GET_SIGNATURES"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="64"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GET_UNINSTALLED_PACKAGES"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="8192"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GET_URI_PERMISSION_PATTERNS"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2048"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="MATCH_DEFAULT_ONLY"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="65536"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="PERMISSION_DENIED"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="-1"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="PERMISSION_GRANTED"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="0"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="SIGNATURE_FIRST_NOT_SIGNED"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="-1"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="SIGNATURE_MATCH"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="0"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="SIGNATURE_NEITHER_SIGNED"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="SIGNATURE_NO_MATCH"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="-3"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="SIGNATURE_SECOND_NOT_SIGNED"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="-2"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="SIGNATURE_UNKNOWN_PACKAGE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="-4"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<class name="PackageManager.NameNotFoundException"
+ extends="android.util.AndroidException"
+ abstract="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="PackageManager.NameNotFoundException"
+ type="android.content.pm.PackageManager.NameNotFoundException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<constructor name="PackageManager.NameNotFoundException"
+ type="android.content.pm.PackageManager.NameNotFoundException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+</constructor>
+</class>
+<class name="PackageStats"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="android.os.Parcelable">
+</implements>
+<constructor name="PackageStats"
+ type="android.content.pm.PackageStats"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="pkgName" type="java.lang.String">
+</parameter>
+</constructor>
+<constructor name="PackageStats"
+ type="android.content.pm.PackageStats"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="source" type="android.os.Parcel">
+</parameter>
+</constructor>
+<constructor name="PackageStats"
+ type="android.content.pm.PackageStats"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="pStats" type="android.content.pm.PackageStats">
+</parameter>
+</constructor>
+<method name="describeContents"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="writeToParcel"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="dest" type="android.os.Parcel">
+</parameter>
+<parameter name="parcelableFlags" type="int">
+</parameter>
+</method>
+<field name="CREATOR"
+ type="android.os.Parcelable.Creator"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="cacheSize"
+ type="long"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="codeSize"
+ type="long"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="dataSize"
+ type="long"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="packageName"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<class name="PathPermission"
+ extends="android.os.PatternMatcher"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="PathPermission"
+ type="android.content.pm.PathPermission"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="pattern" type="java.lang.String">
+</parameter>
+<parameter name="type" type="int">
+</parameter>
+<parameter name="readPermission" type="java.lang.String">
+</parameter>
+<parameter name="writePermission" type="java.lang.String">
+</parameter>
+</constructor>
+<constructor name="PathPermission"
+ type="android.content.pm.PathPermission"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="src" type="android.os.Parcel">
+</parameter>
+</constructor>
+<method name="getReadPermission"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getWritePermission"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<field name="CREATOR"
+ type="android.os.Parcelable.Creator"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<class name="PermissionGroupInfo"
+ extends="android.content.pm.PackageItemInfo"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="android.os.Parcelable">
+</implements>
+<constructor name="PermissionGroupInfo"
+ type="android.content.pm.PermissionGroupInfo"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<constructor name="PermissionGroupInfo"
+ type="android.content.pm.PermissionGroupInfo"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="orig" type="android.content.pm.PermissionGroupInfo">
+</parameter>
+</constructor>
+<method name="describeContents"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="loadDescription"
+ return="java.lang.CharSequence"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="pm" type="android.content.pm.PackageManager">
+</parameter>
+</method>
+<field name="CREATOR"
+ type="android.os.Parcelable.Creator"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="descriptionRes"
+ type="int"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="nonLocalizedDescription"
+ type="java.lang.CharSequence"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<class name="PermissionInfo"
+ extends="android.content.pm.PackageItemInfo"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="android.os.Parcelable">
+</implements>
+<constructor name="PermissionInfo"
+ type="android.content.pm.PermissionInfo"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<constructor name="PermissionInfo"
+ type="android.content.pm.PermissionInfo"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="orig" type="android.content.pm.PermissionInfo">
+</parameter>
+</constructor>
+<method name="describeContents"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="loadDescription"
+ return="java.lang.CharSequence"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="pm" type="android.content.pm.PackageManager">
+</parameter>
+</method>
+<field name="CREATOR"
+ type="android.os.Parcelable.Creator"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="PROTECTION_DANGEROUS"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="PROTECTION_NORMAL"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="0"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="PROTECTION_SIGNATURE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="PROTECTION_SIGNATURE_OR_SYSTEM"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="3"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="descriptionRes"
+ type="int"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="group"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="nonLocalizedDescription"
+ type="java.lang.CharSequence"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="protectionLevel"
+ type="int"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<class name="ProviderInfo"
+ extends="android.content.pm.ComponentInfo"
+ abstract="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="android.os.Parcelable">
+</implements>
+<constructor name="ProviderInfo"
+ type="android.content.pm.ProviderInfo"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<constructor name="ProviderInfo"
+ type="android.content.pm.ProviderInfo"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="orig" type="android.content.pm.ProviderInfo">
+</parameter>
+</constructor>
+<method name="describeContents"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<field name="CREATOR"
+ type="android.os.Parcelable.Creator"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="authority"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="grantUriPermissions"
+ type="boolean"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="initOrder"
+ type="int"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="isSyncable"
+ type="boolean"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="deprecated"
+ visibility="public"
+>
+</field>
+<field name="multiprocess"
+ type="boolean"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="pathPermissions"
+ type="android.content.pm.PathPermission[]"
+ transient="false"
+ volatile="false"
+ value="null"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="readPermission"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="uriPermissionPatterns"
+ type="android.os.PatternMatcher[]"
+ transient="false"
+ volatile="false"
+ value="null"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="writePermission"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<class name="ResolveInfo"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="android.os.Parcelable">
+</implements>
+<constructor name="ResolveInfo"
+ type="android.content.pm.ResolveInfo"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<method name="describeContents"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="dump"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="pw" type="android.util.Printer">
+</parameter>
+<parameter name="prefix" type="java.lang.String">
+</parameter>
+</method>
+<method name="getIconResource"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="loadIcon"
+ return="android.graphics.drawable.Drawable"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="pm" type="android.content.pm.PackageManager">
+</parameter>
+</method>
+<method name="loadLabel"
+ return="java.lang.CharSequence"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="pm" type="android.content.pm.PackageManager">
+</parameter>
+</method>
+<method name="writeToParcel"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="dest" type="android.os.Parcel">
+</parameter>
+<parameter name="parcelableFlags" type="int">
+</parameter>
+</method>
+<field name="CREATOR"
+ type="android.os.Parcelable.Creator"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="activityInfo"
+ type="android.content.pm.ActivityInfo"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="filter"
+ type="android.content.IntentFilter"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="icon"
+ type="int"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="isDefault"
+ type="boolean"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="labelRes"
+ type="int"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="match"
+ type="int"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="nonLocalizedLabel"
+ type="java.lang.CharSequence"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="preferredOrder"
+ type="int"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="priority"
+ type="int"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="resolvePackageName"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="serviceInfo"
+ type="android.content.pm.ServiceInfo"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="specificIndex"
+ type="int"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<class name="ResolveInfo.DisplayNameComparator"
+ extends="java.lang.Object"
+ abstract="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="java.util.Comparator">
+</implements>
+<constructor name="ResolveInfo.DisplayNameComparator"
+ type="android.content.pm.ResolveInfo.DisplayNameComparator"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="pm" type="android.content.pm.PackageManager">
+</parameter>
+</constructor>
+<method name="compare"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="a" type="android.content.pm.ResolveInfo">
+</parameter>
+<parameter name="b" type="android.content.pm.ResolveInfo">
+</parameter>
+</method>
+</class>
+<class name="ServiceInfo"
+ extends="android.content.pm.ComponentInfo"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="android.os.Parcelable">
+</implements>
+<constructor name="ServiceInfo"
+ type="android.content.pm.ServiceInfo"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<constructor name="ServiceInfo"
+ type="android.content.pm.ServiceInfo"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="orig" type="android.content.pm.ServiceInfo">
+</parameter>
+</constructor>
+<method name="describeContents"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="dump"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="pw" type="android.util.Printer">
+</parameter>
+<parameter name="prefix" type="java.lang.String">
+</parameter>
+</method>
+<field name="CREATOR"
+ type="android.os.Parcelable.Creator"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="permission"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<class name="Signature"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="android.os.Parcelable">
+</implements>
+<constructor name="Signature"
+ type="android.content.pm.Signature"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="signature" type="byte[]">
+</parameter>
+</constructor>
+<constructor name="Signature"
+ type="android.content.pm.Signature"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="text" type="java.lang.String">
+</parameter>
+</constructor>
+<method name="describeContents"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="toByteArray"
+ return="byte[]"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="toChars"
+ return="char[]"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="toChars"
+ return="char[]"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="existingArray" type="char[]">
+</parameter>
+<parameter name="outLen" type="int[]">
+</parameter>
+</method>
+<method name="toCharsString"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="writeToParcel"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="dest" type="android.os.Parcel">
+</parameter>
+<parameter name="parcelableFlags" type="int">
+</parameter>
+</method>
+<field name="CREATOR"
+ type="android.os.Parcelable.Creator"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+</package>
+<package name="android.content.res"
+>
+<class name="AssetFileDescriptor"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="android.os.Parcelable">
+</implements>
+<constructor name="AssetFileDescriptor"
+ type="android.content.res.AssetFileDescriptor"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="fd" type="android.os.ParcelFileDescriptor">
+</parameter>
+<parameter name="startOffset" type="long">
+</parameter>
+<parameter name="length" type="long">
+</parameter>
+</constructor>
+<method name="close"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="createInputStream"
+ return="java.io.FileInputStream"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="createOutputStream"
+ return="java.io.FileOutputStream"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="describeContents"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getDeclaredLength"
+ return="long"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getFileDescriptor"
+ return="java.io.FileDescriptor"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getLength"
+ return="long"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getParcelFileDescriptor"
+ return="android.os.ParcelFileDescriptor"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getStartOffset"
+ return="long"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="writeToParcel"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="out" type="android.os.Parcel">
+</parameter>
+<parameter name="flags" type="int">
+</parameter>
+</method>
+<field name="CREATOR"
+ type="android.os.Parcelable.Creator"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="UNKNOWN_LENGTH"
+ type="long"
+ transient="false"
+ volatile="false"
+ value="-1L"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<class name="AssetFileDescriptor.AutoCloseInputStream"
+ extends="android.os.ParcelFileDescriptor.AutoCloseInputStream"
+ abstract="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="AssetFileDescriptor.AutoCloseInputStream"
+ type="android.content.res.AssetFileDescriptor.AutoCloseInputStream"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="fd" type="android.content.res.AssetFileDescriptor">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</constructor>
+</class>
+<class name="AssetFileDescriptor.AutoCloseOutputStream"
+ extends="android.os.ParcelFileDescriptor.AutoCloseOutputStream"
+ abstract="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="AssetFileDescriptor.AutoCloseOutputStream"
+ type="android.content.res.AssetFileDescriptor.AutoCloseOutputStream"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="fd" type="android.content.res.AssetFileDescriptor">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</constructor>
+</class>
+<class name="AssetManager"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="close"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getLocales"
+ return="java.lang.String[]"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="list"
+ return="java.lang.String[]"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="path" type="java.lang.String">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="open"
+ return="java.io.InputStream"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="fileName" type="java.lang.String">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="open"
+ return="java.io.InputStream"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="fileName" type="java.lang.String">
+</parameter>
+<parameter name="accessMode" type="int">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="openFd"
+ return="android.content.res.AssetFileDescriptor"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="fileName" type="java.lang.String">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="openNonAssetFd"
+ return="android.content.res.AssetFileDescriptor"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="fileName" type="java.lang.String">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="openNonAssetFd"
+ return="android.content.res.AssetFileDescriptor"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="cookie" type="int">
+</parameter>
+<parameter name="fileName" type="java.lang.String">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="openXmlResourceParser"
+ return="android.content.res.XmlResourceParser"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="fileName" type="java.lang.String">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="openXmlResourceParser"
+ return="android.content.res.XmlResourceParser"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="cookie" type="int">
+</parameter>
+<parameter name="fileName" type="java.lang.String">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<field name="ACCESS_BUFFER"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="3"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ACCESS_RANDOM"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ACCESS_STREAMING"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ACCESS_UNKNOWN"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="0"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<class name="AssetManager.AssetInputStream"
+ extends="java.io.InputStream"
+ abstract="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="available"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="close"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="getAssetInt"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="mark"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="readlimit" type="int">
+</parameter>
+</method>
+<method name="markSupported"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="read"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="read"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="b" type="byte[]">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="read"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="b" type="byte[]">
+</parameter>
+<parameter name="off" type="int">
+</parameter>
+<parameter name="len" type="int">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="reset"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="skip"
+ return="long"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="n" type="long">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+</class>
+<class name="ColorStateList"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="android.os.Parcelable">
+</implements>
+<constructor name="ColorStateList"
+ type="android.content.res.ColorStateList"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="states" type="int[][]">
+</parameter>
+<parameter name="colors" type="int[]">
+</parameter>
+</constructor>
+<method name="createFromXml"
+ return="android.content.res.ColorStateList"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="r" type="android.content.res.Resources">
+</parameter>
+<parameter name="parser" type="org.xmlpull.v1.XmlPullParser">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+<exception name="XmlPullParserException" type="org.xmlpull.v1.XmlPullParserException">
+</exception>
+</method>
+<method name="describeContents"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getColorForState"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="stateSet" type="int[]">
+</parameter>
+<parameter name="defaultColor" type="int">
+</parameter>
+</method>
+<method name="getDefaultColor"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isStateful"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="valueOf"
+ return="android.content.res.ColorStateList"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="color" type="int">
+</parameter>
+</method>
+<method name="withAlpha"
+ return="android.content.res.ColorStateList"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="alpha" type="int">
+</parameter>
+</method>
+<method name="writeToParcel"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="dest" type="android.os.Parcel">
+</parameter>
+<parameter name="flags" type="int">
+</parameter>
+</method>
+<field name="CREATOR"
+ type="android.os.Parcelable.Creator"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<class name="Configuration"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="java.lang.Comparable">
+</implements>
+<implements name="android.os.Parcelable">
+</implements>
+<constructor name="Configuration"
+ type="android.content.res.Configuration"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<constructor name="Configuration"
+ type="android.content.res.Configuration"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="o" type="android.content.res.Configuration">
+</parameter>
+</constructor>
+<method name="compareTo"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="that" type="android.content.res.Configuration">
+</parameter>
+</method>
+<method name="describeContents"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="diff"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="delta" type="android.content.res.Configuration">
+</parameter>
+</method>
+<method name="equals"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="that" type="android.content.res.Configuration">
+</parameter>
+</method>
+<method name="needNewResources"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="configChanges" type="int">
+</parameter>
+<parameter name="interestingChanges" type="int">
+</parameter>
+</method>
+<method name="readFromParcel"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="source" type="android.os.Parcel">
+</parameter>
+</method>
+<method name="setTo"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="o" type="android.content.res.Configuration">
+</parameter>
+</method>
+<method name="setToDefaults"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="updateFrom"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="delta" type="android.content.res.Configuration">
+</parameter>
+</method>
+<method name="writeToParcel"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="dest" type="android.os.Parcel">
+</parameter>
+<parameter name="flags" type="int">
+</parameter>
+</method>
+<field name="CREATOR"
+ type="android.os.Parcelable.Creator"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="HARDKEYBOARDHIDDEN_NO"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="HARDKEYBOARDHIDDEN_UNDEFINED"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="0"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="HARDKEYBOARDHIDDEN_YES"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="KEYBOARDHIDDEN_NO"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="KEYBOARDHIDDEN_UNDEFINED"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="0"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="KEYBOARDHIDDEN_YES"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="KEYBOARD_12KEY"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="3"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="KEYBOARD_NOKEYS"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="KEYBOARD_QWERTY"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="KEYBOARD_UNDEFINED"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="0"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="NAVIGATIONHIDDEN_NO"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="NAVIGATIONHIDDEN_UNDEFINED"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="0"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="NAVIGATIONHIDDEN_YES"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="NAVIGATION_DPAD"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="NAVIGATION_NONAV"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="NAVIGATION_TRACKBALL"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="3"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="NAVIGATION_UNDEFINED"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="0"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="NAVIGATION_WHEEL"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="4"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ORIENTATION_LANDSCAPE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ORIENTATION_PORTRAIT"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ORIENTATION_SQUARE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="3"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ORIENTATION_UNDEFINED"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="0"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="SCREENLAYOUT_LONG_MASK"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="48"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="SCREENLAYOUT_LONG_NO"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="SCREENLAYOUT_LONG_UNDEFINED"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="0"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="SCREENLAYOUT_LONG_YES"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="32"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="SCREENLAYOUT_SIZE_LARGE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="3"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="SCREENLAYOUT_SIZE_MASK"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="15"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="SCREENLAYOUT_SIZE_NORMAL"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="SCREENLAYOUT_SIZE_SMALL"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="SCREENLAYOUT_SIZE_UNDEFINED"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="0"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TOUCHSCREEN_FINGER"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="3"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TOUCHSCREEN_NOTOUCH"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TOUCHSCREEN_STYLUS"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TOUCHSCREEN_UNDEFINED"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="0"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="UI_MODE_NIGHT_MASK"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="48"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="UI_MODE_NIGHT_NO"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="UI_MODE_NIGHT_UNDEFINED"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="0"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="UI_MODE_NIGHT_YES"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="32"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="UI_MODE_TYPE_CAR"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="3"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="UI_MODE_TYPE_DESK"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="UI_MODE_TYPE_MASK"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="15"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="UI_MODE_TYPE_NORMAL"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="UI_MODE_TYPE_UNDEFINED"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="0"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="fontScale"
+ type="float"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="hardKeyboardHidden"
+ type="int"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="keyboard"
+ type="int"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="keyboardHidden"
+ type="int"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="locale"
+ type="java.util.Locale"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="mcc"
+ type="int"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="mnc"
+ type="int"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="navigation"
+ type="int"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="navigationHidden"
+ type="int"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="orientation"
+ type="int"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="screenLayout"
+ type="int"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="touchscreen"
+ type="int"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="uiMode"
+ type="int"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<class name="Resources"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="Resources"
+ type="android.content.res.Resources"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="assets" type="android.content.res.AssetManager">
+</parameter>
+<parameter name="metrics" type="android.util.DisplayMetrics">
+</parameter>
+<parameter name="config" type="android.content.res.Configuration">
+</parameter>
+</constructor>
+<method name="finishPreloading"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="flushLayoutCache"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getAnimation"
+ return="android.content.res.XmlResourceParser"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="id" type="int">
+</parameter>
+<exception name="Resources.NotFoundException" type="android.content.res.Resources.NotFoundException">
+</exception>
+</method>
+<method name="getAssets"
+ return="android.content.res.AssetManager"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getBoolean"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="id" type="int">
+</parameter>
+<exception name="Resources.NotFoundException" type="android.content.res.Resources.NotFoundException">
+</exception>
+</method>
+<method name="getColor"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="id" type="int">
+</parameter>
+<exception name="Resources.NotFoundException" type="android.content.res.Resources.NotFoundException">
+</exception>
+</method>
+<method name="getColorStateList"
+ return="android.content.res.ColorStateList"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="id" type="int">
+</parameter>
+<exception name="Resources.NotFoundException" type="android.content.res.Resources.NotFoundException">
+</exception>
+</method>
+<method name="getConfiguration"
+ return="android.content.res.Configuration"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getDimension"
+ return="float"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="id" type="int">
+</parameter>
+<exception name="Resources.NotFoundException" type="android.content.res.Resources.NotFoundException">
+</exception>
+</method>
+<method name="getDimensionPixelOffset"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="id" type="int">
+</parameter>
+<exception name="Resources.NotFoundException" type="android.content.res.Resources.NotFoundException">
+</exception>
+</method>
+<method name="getDimensionPixelSize"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="id" type="int">
+</parameter>
+<exception name="Resources.NotFoundException" type="android.content.res.Resources.NotFoundException">
+</exception>
+</method>
+<method name="getDisplayMetrics"
+ return="android.util.DisplayMetrics"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getDrawable"
+ return="android.graphics.drawable.Drawable"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="id" type="int">
+</parameter>
+<exception name="Resources.NotFoundException" type="android.content.res.Resources.NotFoundException">
+</exception>
+</method>
+<method name="getFraction"
+ return="float"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="id" type="int">
+</parameter>
+<parameter name="base" type="int">
+</parameter>
+<parameter name="pbase" type="int">
+</parameter>
+</method>
+<method name="getIdentifier"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+<parameter name="defType" type="java.lang.String">
+</parameter>
+<parameter name="defPackage" type="java.lang.String">
+</parameter>
+</method>
+<method name="getIntArray"
+ return="int[]"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="id" type="int">
+</parameter>
+<exception name="Resources.NotFoundException" type="android.content.res.Resources.NotFoundException">
+</exception>
+</method>
+<method name="getInteger"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="id" type="int">
+</parameter>
+<exception name="Resources.NotFoundException" type="android.content.res.Resources.NotFoundException">
+</exception>
+</method>
+<method name="getLayout"
+ return="android.content.res.XmlResourceParser"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="id" type="int">
+</parameter>
+<exception name="Resources.NotFoundException" type="android.content.res.Resources.NotFoundException">
+</exception>
+</method>
+<method name="getMovie"
+ return="android.graphics.Movie"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="id" type="int">
+</parameter>
+<exception name="Resources.NotFoundException" type="android.content.res.Resources.NotFoundException">
+</exception>
+</method>
+<method name="getQuantityString"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="id" type="int">
+</parameter>
+<parameter name="quantity" type="int">
+</parameter>
+<parameter name="formatArgs" type="java.lang.Object...">
+</parameter>
+<exception name="Resources.NotFoundException" type="android.content.res.Resources.NotFoundException">
+</exception>
+</method>
+<method name="getQuantityString"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="id" type="int">
+</parameter>
+<parameter name="quantity" type="int">
+</parameter>
+<exception name="Resources.NotFoundException" type="android.content.res.Resources.NotFoundException">
+</exception>
+</method>
+<method name="getQuantityText"
+ return="java.lang.CharSequence"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="id" type="int">
+</parameter>
+<parameter name="quantity" type="int">
+</parameter>
+<exception name="Resources.NotFoundException" type="android.content.res.Resources.NotFoundException">
+</exception>
+</method>
+<method name="getResourceEntryName"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="resid" type="int">
+</parameter>
+<exception name="Resources.NotFoundException" type="android.content.res.Resources.NotFoundException">
+</exception>
+</method>
+<method name="getResourceName"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="resid" type="int">
+</parameter>
+<exception name="Resources.NotFoundException" type="android.content.res.Resources.NotFoundException">
+</exception>
+</method>
+<method name="getResourcePackageName"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="resid" type="int">
+</parameter>
+<exception name="Resources.NotFoundException" type="android.content.res.Resources.NotFoundException">
+</exception>
+</method>
+<method name="getResourceTypeName"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="resid" type="int">
+</parameter>
+<exception name="Resources.NotFoundException" type="android.content.res.Resources.NotFoundException">
+</exception>
+</method>
+<method name="getString"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="id" type="int">
+</parameter>
+<exception name="Resources.NotFoundException" type="android.content.res.Resources.NotFoundException">
+</exception>
+</method>
+<method name="getString"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="id" type="int">
+</parameter>
+<parameter name="formatArgs" type="java.lang.Object...">
+</parameter>
+<exception name="Resources.NotFoundException" type="android.content.res.Resources.NotFoundException">
+</exception>
+</method>
+<method name="getStringArray"
+ return="java.lang.String[]"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="id" type="int">
+</parameter>
+<exception name="Resources.NotFoundException" type="android.content.res.Resources.NotFoundException">
+</exception>
+</method>
+<method name="getSystem"
+ return="android.content.res.Resources"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getText"
+ return="java.lang.CharSequence"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="id" type="int">
+</parameter>
+<exception name="Resources.NotFoundException" type="android.content.res.Resources.NotFoundException">
+</exception>
+</method>
+<method name="getText"
+ return="java.lang.CharSequence"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="id" type="int">
+</parameter>
+<parameter name="def" type="java.lang.CharSequence">
+</parameter>
+</method>
+<method name="getTextArray"
+ return="java.lang.CharSequence[]"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="id" type="int">
+</parameter>
+<exception name="Resources.NotFoundException" type="android.content.res.Resources.NotFoundException">
+</exception>
+</method>
+<method name="getValue"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="id" type="int">
+</parameter>
+<parameter name="outValue" type="android.util.TypedValue">
+</parameter>
+<parameter name="resolveRefs" type="boolean">
+</parameter>
+<exception name="Resources.NotFoundException" type="android.content.res.Resources.NotFoundException">
+</exception>
+</method>
+<method name="getValue"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+<parameter name="outValue" type="android.util.TypedValue">
+</parameter>
+<parameter name="resolveRefs" type="boolean">
+</parameter>
+<exception name="Resources.NotFoundException" type="android.content.res.Resources.NotFoundException">
+</exception>
+</method>
+<method name="getXml"
+ return="android.content.res.XmlResourceParser"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="id" type="int">
+</parameter>
+<exception name="Resources.NotFoundException" type="android.content.res.Resources.NotFoundException">
+</exception>
+</method>
+<method name="newTheme"
+ return="android.content.res.Resources.Theme"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="obtainAttributes"
+ return="android.content.res.TypedArray"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="set" type="android.util.AttributeSet">
+</parameter>
+<parameter name="attrs" type="int[]">
+</parameter>
+</method>
+<method name="obtainTypedArray"
+ return="android.content.res.TypedArray"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="id" type="int">
+</parameter>
+<exception name="Resources.NotFoundException" type="android.content.res.Resources.NotFoundException">
+</exception>
+</method>
+<method name="openRawResource"
+ return="java.io.InputStream"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="id" type="int">
+</parameter>
+<exception name="Resources.NotFoundException" type="android.content.res.Resources.NotFoundException">
+</exception>
+</method>
+<method name="openRawResource"
+ return="java.io.InputStream"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="id" type="int">
+</parameter>
+<parameter name="value" type="android.util.TypedValue">
+</parameter>
+<exception name="Resources.NotFoundException" type="android.content.res.Resources.NotFoundException">
+</exception>
+</method>
+<method name="openRawResourceFd"
+ return="android.content.res.AssetFileDescriptor"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="id" type="int">
+</parameter>
+<exception name="Resources.NotFoundException" type="android.content.res.Resources.NotFoundException">
+</exception>
+</method>
+<method name="parseBundleExtra"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="tagName" type="java.lang.String">
+</parameter>
+<parameter name="attrs" type="android.util.AttributeSet">
+</parameter>
+<parameter name="outBundle" type="android.os.Bundle">
+</parameter>
+<exception name="XmlPullParserException" type="org.xmlpull.v1.XmlPullParserException">
+</exception>
+</method>
+<method name="parseBundleExtras"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="parser" type="android.content.res.XmlResourceParser">
+</parameter>
+<parameter name="outBundle" type="android.os.Bundle">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+<exception name="XmlPullParserException" type="org.xmlpull.v1.XmlPullParserException">
+</exception>
+</method>
+<method name="updateConfiguration"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="config" type="android.content.res.Configuration">
+</parameter>
+<parameter name="metrics" type="android.util.DisplayMetrics">
+</parameter>
+</method>
+</class>
+<class name="Resources.NotFoundException"
+ extends="java.lang.RuntimeException"
+ abstract="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="Resources.NotFoundException"
+ type="android.content.res.Resources.NotFoundException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<constructor name="Resources.NotFoundException"
+ type="android.content.res.Resources.NotFoundException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+</constructor>
+</class>
+<class name="Resources.Theme"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="applyStyle"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="resid" type="int">
+</parameter>
+<parameter name="force" type="boolean">
+</parameter>
+</method>
+<method name="dump"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="priority" type="int">
+</parameter>
+<parameter name="tag" type="java.lang.String">
+</parameter>
+<parameter name="prefix" type="java.lang.String">
+</parameter>
+</method>
+<method name="obtainStyledAttributes"
+ return="android.content.res.TypedArray"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="attrs" type="int[]">
+</parameter>
+</method>
+<method name="obtainStyledAttributes"
+ return="android.content.res.TypedArray"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="resid" type="int">
+</parameter>
+<parameter name="attrs" type="int[]">
+</parameter>
+<exception name="Resources.NotFoundException" type="android.content.res.Resources.NotFoundException">
+</exception>
+</method>
+<method name="obtainStyledAttributes"
+ return="android.content.res.TypedArray"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="set" type="android.util.AttributeSet">
+</parameter>
+<parameter name="attrs" type="int[]">
+</parameter>
+<parameter name="defStyleAttr" type="int">
+</parameter>
+<parameter name="defStyleRes" type="int">
+</parameter>
+</method>
+<method name="resolveAttribute"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="resid" type="int">
+</parameter>
+<parameter name="outValue" type="android.util.TypedValue">
+</parameter>
+<parameter name="resolveRefs" type="boolean">
+</parameter>
+</method>
+<method name="setTo"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="other" type="android.content.res.Resources.Theme">
+</parameter>
+</method>
+</class>
+<class name="TypedArray"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="getBoolean"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="index" type="int">
+</parameter>
+<parameter name="defValue" type="boolean">
+</parameter>
+</method>
+<method name="getColor"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="index" type="int">
+</parameter>
+<parameter name="defValue" type="int">
+</parameter>
+</method>
+<method name="getColorStateList"
+ return="android.content.res.ColorStateList"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="index" type="int">
+</parameter>
+</method>
+<method name="getDimension"
+ return="float"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="index" type="int">
+</parameter>
+<parameter name="defValue" type="float">
+</parameter>
+</method>
+<method name="getDimensionPixelOffset"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="index" type="int">
+</parameter>
+<parameter name="defValue" type="int">
+</parameter>
+</method>
+<method name="getDimensionPixelSize"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="index" type="int">
+</parameter>
+<parameter name="defValue" type="int">
+</parameter>
+</method>
+<method name="getDrawable"
+ return="android.graphics.drawable.Drawable"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="index" type="int">
+</parameter>
+</method>
+<method name="getFloat"
+ return="float"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="index" type="int">
+</parameter>
+<parameter name="defValue" type="float">
+</parameter>
+</method>
+<method name="getFraction"
+ return="float"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="index" type="int">
+</parameter>
+<parameter name="base" type="int">
+</parameter>
+<parameter name="pbase" type="int">
+</parameter>
+<parameter name="defValue" type="float">
+</parameter>
+</method>
+<method name="getIndex"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="at" type="int">
+</parameter>
+</method>
+<method name="getIndexCount"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getInt"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="index" type="int">
+</parameter>
+<parameter name="defValue" type="int">
+</parameter>
+</method>
+<method name="getInteger"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="index" type="int">
+</parameter>
+<parameter name="defValue" type="int">
+</parameter>
+</method>
+<method name="getLayoutDimension"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="index" type="int">
+</parameter>
+<parameter name="name" type="java.lang.String">
+</parameter>
+</method>
+<method name="getLayoutDimension"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="index" type="int">
+</parameter>
+<parameter name="defValue" type="int">
+</parameter>
+</method>
+<method name="getNonResourceString"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="index" type="int">
+</parameter>
+</method>
+<method name="getPositionDescription"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getResourceId"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="index" type="int">
+</parameter>
+<parameter name="defValue" type="int">
+</parameter>
+</method>
+<method name="getResources"
+ return="android.content.res.Resources"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getString"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="index" type="int">
+</parameter>
+</method>
+<method name="getText"
+ return="java.lang.CharSequence"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="index" type="int">
+</parameter>
+</method>
+<method name="getTextArray"
+ return="java.lang.CharSequence[]"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="index" type="int">
+</parameter>
+</method>
+<method name="getValue"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="index" type="int">
+</parameter>
+<parameter name="outValue" type="android.util.TypedValue">
+</parameter>
+</method>
+<method name="hasValue"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="index" type="int">
+</parameter>
+</method>
+<method name="length"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="peekValue"
+ return="android.util.TypedValue"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="index" type="int">
+</parameter>
+</method>
+<method name="recycle"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+</class>
+<interface name="XmlResourceParser"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="android.util.AttributeSet">
+</implements>
+<implements name="org.xmlpull.v1.XmlPullParser">
+</implements>
+<method name="close"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+</interface>
+</package>
+<package name="android.database"
+>
+<class name="AbstractCursor"
+ extends="java.lang.Object"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="android.database.CrossProcessCursor">
+</implements>
+<constructor name="AbstractCursor"
+ type="android.database.AbstractCursor"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<method name="checkPosition"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</method>
+<method name="close"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="copyStringToBuffer"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="columnIndex" type="int">
+</parameter>
+<parameter name="buffer" type="android.database.CharArrayBuffer">
+</parameter>
+</method>
+<method name="deactivate"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="fillWindow"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="position" type="int">
+</parameter>
+<parameter name="window" type="android.database.CursorWindow">
+</parameter>
+</method>
+<method name="getBlob"
+ return="byte[]"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="column" type="int">
+</parameter>
+</method>
+<method name="getColumnCount"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getColumnIndex"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="columnName" type="java.lang.String">
+</parameter>
+</method>
+<method name="getColumnIndexOrThrow"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="columnName" type="java.lang.String">
+</parameter>
+</method>
+<method name="getColumnName"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="columnIndex" type="int">
+</parameter>
+</method>
+<method name="getColumnNames"
+ return="java.lang.String[]"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getCount"
+ return="int"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getDouble"
+ return="double"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="column" type="int">
+</parameter>
+</method>
+<method name="getExtras"
+ return="android.os.Bundle"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getFloat"
+ return="float"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="column" type="int">
+</parameter>
+</method>
+<method name="getInt"
+ return="int"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="column" type="int">
+</parameter>
+</method>
+<method name="getLong"
+ return="long"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="column" type="int">
+</parameter>
+</method>
+<method name="getPosition"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getShort"
+ return="short"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="column" type="int">
+</parameter>
+</method>
+<method name="getString"
+ return="java.lang.String"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="column" type="int">
+</parameter>
+</method>
+<method name="getUpdatedField"
+ return="java.lang.Object"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="columnIndex" type="int">
+</parameter>
+</method>
+<method name="getWantsAllOnMoveCalls"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getWindow"
+ return="android.database.CursorWindow"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isAfterLast"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isBeforeFirst"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isClosed"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isFieldUpdated"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="columnIndex" type="int">
+</parameter>
+</method>
+<method name="isFirst"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isLast"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isNull"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="column" type="int">
+</parameter>
+</method>
+<method name="move"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="offset" type="int">
+</parameter>
+</method>
+<method name="moveToFirst"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="moveToLast"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="moveToNext"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="moveToPosition"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="position" type="int">
+</parameter>
+</method>
+<method name="moveToPrevious"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="onChange"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="selfChange" type="boolean">
+</parameter>
+</method>
+<method name="onMove"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="oldPosition" type="int">
+</parameter>
+<parameter name="newPosition" type="int">
+</parameter>
+</method>
+<method name="registerContentObserver"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="observer" type="android.database.ContentObserver">
+</parameter>
+</method>
+<method name="registerDataSetObserver"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="observer" type="android.database.DataSetObserver">
+</parameter>
+</method>
+<method name="requery"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="respond"
+ return="android.os.Bundle"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="extras" type="android.os.Bundle">
+</parameter>
+</method>
+<method name="setNotificationUri"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="cr" type="android.content.ContentResolver">
+</parameter>
+<parameter name="notifyUri" type="android.net.Uri">
+</parameter>
+</method>
+<method name="unregisterContentObserver"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="observer" type="android.database.ContentObserver">
+</parameter>
+</method>
+<method name="unregisterDataSetObserver"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="observer" type="android.database.DataSetObserver">
+</parameter>
+</method>
+<field name="mClosed"
+ type="boolean"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</field>
+<field name="mContentResolver"
+ type="android.content.ContentResolver"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</field>
+<field name="mCurrentRowID"
+ type="java.lang.Long"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</field>
+<field name="mPos"
+ type="int"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</field>
+<field name="mRowIdColumnIndex"
+ type="int"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</field>
+<field name="mUpdatedRows"
+ type="java.util.HashMap"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</field>
+</class>
+<class name="AbstractCursor.SelfContentObserver"
+ extends="android.database.ContentObserver"
+ abstract="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<constructor name="AbstractCursor.SelfContentObserver"
+ type="android.database.AbstractCursor.SelfContentObserver"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="cursor" type="android.database.AbstractCursor">
+</parameter>
+</constructor>
+</class>
+<class name="AbstractWindowedCursor"
+ extends="android.database.AbstractCursor"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="AbstractWindowedCursor"
+ type="android.database.AbstractWindowedCursor"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<method name="getDouble"
+ return="double"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="columnIndex" type="int">
+</parameter>
+</method>
+<method name="getFloat"
+ return="float"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="columnIndex" type="int">
+</parameter>
+</method>
+<method name="getInt"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="columnIndex" type="int">
+</parameter>
+</method>
+<method name="getLong"
+ return="long"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="columnIndex" type="int">
+</parameter>
+</method>
+<method name="getShort"
+ return="short"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="columnIndex" type="int">
+</parameter>
+</method>
+<method name="getString"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="columnIndex" type="int">
+</parameter>
+</method>
+<method name="hasWindow"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isBlob"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="columnIndex" type="int">
+</parameter>
+</method>
+<method name="isFloat"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="columnIndex" type="int">
+</parameter>
+</method>
+<method name="isLong"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="columnIndex" type="int">
+</parameter>
+</method>
+<method name="isNull"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="columnIndex" type="int">
+</parameter>
+</method>
+<method name="isString"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="columnIndex" type="int">
+</parameter>
+</method>
+<method name="setWindow"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="window" type="android.database.CursorWindow">
+</parameter>
+</method>
+<field name="mWindow"
+ type="android.database.CursorWindow"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</field>
+</class>
+<class name="CharArrayBuffer"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="CharArrayBuffer"
+ type="android.database.CharArrayBuffer"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="size" type="int">
+</parameter>
+</constructor>
+<constructor name="CharArrayBuffer"
+ type="android.database.CharArrayBuffer"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="buf" type="char[]">
+</parameter>
+</constructor>
+<field name="data"
+ type="char[]"
+ transient="false"
+ volatile="false"
+ value="null"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="sizeCopied"
+ type="int"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<class name="ContentObservable"
+ extends="android.database.Observable"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="ContentObservable"
+ type="android.database.ContentObservable"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<method name="dispatchChange"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="selfChange" type="boolean">
+</parameter>
+</method>
+<method name="notifyChange"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="selfChange" type="boolean">
+</parameter>
+</method>
+<method name="registerObserver"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="observer" type="android.database.ContentObserver">
+</parameter>
+</method>
+</class>
+<class name="ContentObserver"
+ extends="java.lang.Object"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="ContentObserver"
+ type="android.database.ContentObserver"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="handler" type="android.os.Handler">
+</parameter>
+</constructor>
+<method name="deliverSelfNotifications"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="dispatchChange"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="selfChange" type="boolean">
+</parameter>
+</method>
+<method name="onChange"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="selfChange" type="boolean">
+</parameter>
+</method>
+</class>
+<interface name="CrossProcessCursor"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="android.database.Cursor">
+</implements>
+<method name="fillWindow"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="pos" type="int">
+</parameter>
+<parameter name="winow" type="android.database.CursorWindow">
+</parameter>
+</method>
+<method name="getWindow"
+ return="android.database.CursorWindow"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="onMove"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="oldPosition" type="int">
+</parameter>
+<parameter name="newPosition" type="int">
+</parameter>
+</method>
+</interface>
+<interface name="Cursor"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="close"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="copyStringToBuffer"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="columnIndex" type="int">
+</parameter>
+<parameter name="buffer" type="android.database.CharArrayBuffer">
+</parameter>
+</method>
+<method name="deactivate"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getBlob"
+ return="byte[]"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="columnIndex" type="int">
+</parameter>
+</method>
+<method name="getColumnCount"
+ return="int"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getColumnIndex"
+ return="int"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="columnName" type="java.lang.String">
+</parameter>
+</method>
+<method name="getColumnIndexOrThrow"
+ return="int"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="columnName" type="java.lang.String">
+</parameter>
+<exception name="IllegalArgumentException" type="java.lang.IllegalArgumentException">
+</exception>
+</method>
+<method name="getColumnName"
+ return="java.lang.String"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="columnIndex" type="int">
+</parameter>
+</method>
+<method name="getColumnNames"
+ return="java.lang.String[]"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getCount"
+ return="int"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getDouble"
+ return="double"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="columnIndex" type="int">
+</parameter>
+</method>
+<method name="getExtras"
+ return="android.os.Bundle"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getFloat"
+ return="float"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="columnIndex" type="int">
+</parameter>
+</method>
+<method name="getInt"
+ return="int"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="columnIndex" type="int">
+</parameter>
+</method>
+<method name="getLong"
+ return="long"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="columnIndex" type="int">
+</parameter>
+</method>
+<method name="getPosition"
+ return="int"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getShort"
+ return="short"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="columnIndex" type="int">
+</parameter>
+</method>
+<method name="getString"
+ return="java.lang.String"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="columnIndex" type="int">
+</parameter>
+</method>
+<method name="getWantsAllOnMoveCalls"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isAfterLast"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isBeforeFirst"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isClosed"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isFirst"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isLast"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isNull"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="columnIndex" type="int">
+</parameter>
+</method>
+<method name="move"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="offset" type="int">
+</parameter>
+</method>
+<method name="moveToFirst"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="moveToLast"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="moveToNext"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="moveToPosition"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="position" type="int">
+</parameter>
+</method>
+<method name="moveToPrevious"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="registerContentObserver"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="observer" type="android.database.ContentObserver">
+</parameter>
+</method>
+<method name="registerDataSetObserver"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="observer" type="android.database.DataSetObserver">
+</parameter>
+</method>
+<method name="requery"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="respond"
+ return="android.os.Bundle"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="extras" type="android.os.Bundle">
+</parameter>
+</method>
+<method name="setNotificationUri"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="cr" type="android.content.ContentResolver">
+</parameter>
+<parameter name="uri" type="android.net.Uri">
+</parameter>
+</method>
+<method name="unregisterContentObserver"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="observer" type="android.database.ContentObserver">
+</parameter>
+</method>
+<method name="unregisterDataSetObserver"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="observer" type="android.database.DataSetObserver">
+</parameter>
+</method>
+</interface>
+<class name="CursorIndexOutOfBoundsException"
+ extends="java.lang.IndexOutOfBoundsException"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="CursorIndexOutOfBoundsException"
+ type="android.database.CursorIndexOutOfBoundsException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="index" type="int">
+</parameter>
+<parameter name="size" type="int">
+</parameter>
+</constructor>
+<constructor name="CursorIndexOutOfBoundsException"
+ type="android.database.CursorIndexOutOfBoundsException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="message" type="java.lang.String">
+</parameter>
+</constructor>
+</class>
+<class name="CursorJoiner"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="java.lang.Iterable">
+</implements>
+<implements name="java.util.Iterator">
+</implements>
+<constructor name="CursorJoiner"
+ type="android.database.CursorJoiner"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="cursorLeft" type="android.database.Cursor">
+</parameter>
+<parameter name="columnNamesLeft" type="java.lang.String[]">
+</parameter>
+<parameter name="cursorRight" type="android.database.Cursor">
+</parameter>
+<parameter name="columnNamesRight" type="java.lang.String[]">
+</parameter>
+</constructor>
+<method name="hasNext"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="iterator"
+ return="java.util.Iterator&lt;android.database.CursorJoiner.Result&gt;"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="next"
+ return="android.database.CursorJoiner.Result"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="remove"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+</class>
+<class name="CursorJoiner.Result"
+ extends="java.lang.Enum"
+ abstract="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="valueOf"
+ return="android.database.CursorJoiner.Result"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+</method>
+<method name="values"
+ return="android.database.CursorJoiner.Result[]"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+</class>
+<class name="CursorWindow"
+ extends="android.database.sqlite.SQLiteClosable"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="android.os.Parcelable">
+</implements>
+<constructor name="CursorWindow"
+ type="android.database.CursorWindow"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="localWindow" type="boolean">
+</parameter>
+</constructor>
+<method name="allocRow"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="clear"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="close"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="copyStringToBuffer"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="row" type="int">
+</parameter>
+<parameter name="col" type="int">
+</parameter>
+<parameter name="buffer" type="android.database.CharArrayBuffer">
+</parameter>
+</method>
+<method name="describeContents"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="freeLastRow"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getBlob"
+ return="byte[]"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="row" type="int">
+</parameter>
+<parameter name="col" type="int">
+</parameter>
+</method>
+<method name="getDouble"
+ return="double"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="row" type="int">
+</parameter>
+<parameter name="col" type="int">
+</parameter>
+</method>
+<method name="getFloat"
+ return="float"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="row" type="int">
+</parameter>
+<parameter name="col" type="int">
+</parameter>
+</method>
+<method name="getInt"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="row" type="int">
+</parameter>
+<parameter name="col" type="int">
+</parameter>
+</method>
+<method name="getLong"
+ return="long"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="row" type="int">
+</parameter>
+<parameter name="col" type="int">
+</parameter>
+</method>
+<method name="getNumRows"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getShort"
+ return="short"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="row" type="int">
+</parameter>
+<parameter name="col" type="int">
+</parameter>
+</method>
+<method name="getStartPosition"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getString"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="row" type="int">
+</parameter>
+<parameter name="col" type="int">
+</parameter>
+</method>
+<method name="isBlob"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="row" type="int">
+</parameter>
+<parameter name="col" type="int">
+</parameter>
+</method>
+<method name="isFloat"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="row" type="int">
+</parameter>
+<parameter name="col" type="int">
+</parameter>
+</method>
+<method name="isLong"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="row" type="int">
+</parameter>
+<parameter name="col" type="int">
+</parameter>
+</method>
+<method name="isNull"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="row" type="int">
+</parameter>
+<parameter name="col" type="int">
+</parameter>
+</method>
+<method name="isString"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="row" type="int">
+</parameter>
+<parameter name="col" type="int">
+</parameter>
+</method>
+<method name="newFromParcel"
+ return="android.database.CursorWindow"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="p" type="android.os.Parcel">
+</parameter>
+</method>
+<method name="onAllReferencesReleased"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</method>
+<method name="putBlob"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="value" type="byte[]">
+</parameter>
+<parameter name="row" type="int">
+</parameter>
+<parameter name="col" type="int">
+</parameter>
+</method>
+<method name="putDouble"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="value" type="double">
+</parameter>
+<parameter name="row" type="int">
+</parameter>
+<parameter name="col" type="int">
+</parameter>
+</method>
+<method name="putLong"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="value" type="long">
+</parameter>
+<parameter name="row" type="int">
+</parameter>
+<parameter name="col" type="int">
+</parameter>
+</method>
+<method name="putNull"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="row" type="int">
+</parameter>
+<parameter name="col" type="int">
+</parameter>
+</method>
+<method name="putString"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="value" type="java.lang.String">
+</parameter>
+<parameter name="row" type="int">
+</parameter>
+<parameter name="col" type="int">
+</parameter>
+</method>
+<method name="setNumColumns"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="columnNum" type="int">
+</parameter>
+</method>
+<method name="setStartPosition"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="pos" type="int">
+</parameter>
+</method>
+<method name="writeToParcel"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="dest" type="android.os.Parcel">
+</parameter>
+<parameter name="flags" type="int">
+</parameter>
+</method>
+<field name="CREATOR"
+ type="android.os.Parcelable.Creator"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<class name="CursorWrapper"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="android.database.Cursor">
+</implements>
+<constructor name="CursorWrapper"
+ type="android.database.CursorWrapper"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="cursor" type="android.database.Cursor">
+</parameter>
+</constructor>
+<method name="close"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="copyStringToBuffer"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="columnIndex" type="int">
+</parameter>
+<parameter name="buffer" type="android.database.CharArrayBuffer">
+</parameter>
+</method>
+<method name="deactivate"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getBlob"
+ return="byte[]"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="columnIndex" type="int">
+</parameter>
+</method>
+<method name="getColumnCount"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getColumnIndex"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="columnName" type="java.lang.String">
+</parameter>
+</method>
+<method name="getColumnIndexOrThrow"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="columnName" type="java.lang.String">
+</parameter>
+<exception name="IllegalArgumentException" type="java.lang.IllegalArgumentException">
+</exception>
+</method>
+<method name="getColumnName"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="columnIndex" type="int">
+</parameter>
+</method>
+<method name="getColumnNames"
+ return="java.lang.String[]"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getCount"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getDouble"
+ return="double"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="columnIndex" type="int">
+</parameter>
+</method>
+<method name="getExtras"
+ return="android.os.Bundle"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getFloat"
+ return="float"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="columnIndex" type="int">
+</parameter>
+</method>
+<method name="getInt"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="columnIndex" type="int">
+</parameter>
+</method>
+<method name="getLong"
+ return="long"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="columnIndex" type="int">
+</parameter>
+</method>
+<method name="getPosition"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getShort"
+ return="short"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="columnIndex" type="int">
+</parameter>
+</method>
+<method name="getString"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="columnIndex" type="int">
+</parameter>
+</method>
+<method name="getWantsAllOnMoveCalls"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isAfterLast"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isBeforeFirst"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isClosed"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isFirst"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isLast"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isNull"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="columnIndex" type="int">
+</parameter>
+</method>
+<method name="move"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="offset" type="int">
+</parameter>
+</method>
+<method name="moveToFirst"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="moveToLast"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="moveToNext"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="moveToPosition"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="position" type="int">
+</parameter>
+</method>
+<method name="moveToPrevious"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="registerContentObserver"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="observer" type="android.database.ContentObserver">
+</parameter>
+</method>
+<method name="registerDataSetObserver"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="observer" type="android.database.DataSetObserver">
+</parameter>
+</method>
+<method name="requery"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="respond"
+ return="android.os.Bundle"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="extras" type="android.os.Bundle">
+</parameter>
+</method>
+<method name="setNotificationUri"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="cr" type="android.content.ContentResolver">
+</parameter>
+<parameter name="uri" type="android.net.Uri">
+</parameter>
+</method>
+<method name="unregisterContentObserver"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="observer" type="android.database.ContentObserver">
+</parameter>
+</method>
+<method name="unregisterDataSetObserver"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="observer" type="android.database.DataSetObserver">
+</parameter>
+</method>
+</class>
+<class name="DataSetObservable"
+ extends="android.database.Observable"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="DataSetObservable"
+ type="android.database.DataSetObservable"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<method name="notifyChanged"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="notifyInvalidated"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+</class>
+<class name="DataSetObserver"
+ extends="java.lang.Object"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="DataSetObserver"
+ type="android.database.DataSetObserver"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<method name="onChanged"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="onInvalidated"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+</class>
+<class name="DatabaseUtils"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="DatabaseUtils"
+ type="android.database.DatabaseUtils"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<method name="appendEscapedSQLString"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="sb" type="java.lang.StringBuilder">
+</parameter>
+<parameter name="sqlString" type="java.lang.String">
+</parameter>
+</method>
+<method name="appendValueToSql"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="sql" type="java.lang.StringBuilder">
+</parameter>
+<parameter name="value" type="java.lang.Object">
+</parameter>
+</method>
+<method name="bindObjectToProgram"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="prog" type="android.database.sqlite.SQLiteProgram">
+</parameter>
+<parameter name="index" type="int">
+</parameter>
+<parameter name="value" type="java.lang.Object">
+</parameter>
+</method>
+<method name="createDbFromSqlStatements"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="context" type="android.content.Context">
+</parameter>
+<parameter name="dbName" type="java.lang.String">
+</parameter>
+<parameter name="dbVersion" type="int">
+</parameter>
+<parameter name="sqlStatements" type="java.lang.String">
+</parameter>
+</method>
+<method name="cursorDoubleToContentValues"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="cursor" type="android.database.Cursor">
+</parameter>
+<parameter name="field" type="java.lang.String">
+</parameter>
+<parameter name="values" type="android.content.ContentValues">
+</parameter>
+<parameter name="key" type="java.lang.String">
+</parameter>
+</method>
+<method name="cursorDoubleToContentValuesIfPresent"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="cursor" type="android.database.Cursor">
+</parameter>
+<parameter name="values" type="android.content.ContentValues">
+</parameter>
+<parameter name="column" type="java.lang.String">
+</parameter>
+</method>
+<method name="cursorDoubleToCursorValues"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="cursor" type="android.database.Cursor">
+</parameter>
+<parameter name="field" type="java.lang.String">
+</parameter>
+<parameter name="values" type="android.content.ContentValues">
+</parameter>
+</method>
+<method name="cursorFloatToContentValuesIfPresent"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="cursor" type="android.database.Cursor">
+</parameter>
+<parameter name="values" type="android.content.ContentValues">
+</parameter>
+<parameter name="column" type="java.lang.String">
+</parameter>
+</method>
+<method name="cursorIntToContentValues"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="cursor" type="android.database.Cursor">
+</parameter>
+<parameter name="field" type="java.lang.String">
+</parameter>
+<parameter name="values" type="android.content.ContentValues">
+</parameter>
+</method>
+<method name="cursorIntToContentValues"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="cursor" type="android.database.Cursor">
+</parameter>
+<parameter name="field" type="java.lang.String">
+</parameter>
+<parameter name="values" type="android.content.ContentValues">
+</parameter>
+<parameter name="key" type="java.lang.String">
+</parameter>
+</method>
+<method name="cursorIntToContentValuesIfPresent"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="cursor" type="android.database.Cursor">
+</parameter>
+<parameter name="values" type="android.content.ContentValues">
+</parameter>
+<parameter name="column" type="java.lang.String">
+</parameter>
+</method>
+<method name="cursorLongToContentValues"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="cursor" type="android.database.Cursor">
+</parameter>
+<parameter name="field" type="java.lang.String">
+</parameter>
+<parameter name="values" type="android.content.ContentValues">
+</parameter>
+</method>
+<method name="cursorLongToContentValues"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="cursor" type="android.database.Cursor">
+</parameter>
+<parameter name="field" type="java.lang.String">
+</parameter>
+<parameter name="values" type="android.content.ContentValues">
+</parameter>
+<parameter name="key" type="java.lang.String">
+</parameter>
+</method>
+<method name="cursorLongToContentValuesIfPresent"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="cursor" type="android.database.Cursor">
+</parameter>
+<parameter name="values" type="android.content.ContentValues">
+</parameter>
+<parameter name="column" type="java.lang.String">
+</parameter>
+</method>
+<method name="cursorRowToContentValues"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="cursor" type="android.database.Cursor">
+</parameter>
+<parameter name="values" type="android.content.ContentValues">
+</parameter>
+</method>
+<method name="cursorShortToContentValuesIfPresent"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="cursor" type="android.database.Cursor">
+</parameter>
+<parameter name="values" type="android.content.ContentValues">
+</parameter>
+<parameter name="column" type="java.lang.String">
+</parameter>
+</method>
+<method name="cursorStringToContentValues"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="cursor" type="android.database.Cursor">
+</parameter>
+<parameter name="field" type="java.lang.String">
+</parameter>
+<parameter name="values" type="android.content.ContentValues">
+</parameter>
+</method>
+<method name="cursorStringToContentValues"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="cursor" type="android.database.Cursor">
+</parameter>
+<parameter name="field" type="java.lang.String">
+</parameter>
+<parameter name="values" type="android.content.ContentValues">
+</parameter>
+<parameter name="key" type="java.lang.String">
+</parameter>
+</method>
+<method name="cursorStringToContentValuesIfPresent"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="cursor" type="android.database.Cursor">
+</parameter>
+<parameter name="values" type="android.content.ContentValues">
+</parameter>
+<parameter name="column" type="java.lang.String">
+</parameter>
+</method>
+<method name="cursorStringToInsertHelper"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="cursor" type="android.database.Cursor">
+</parameter>
+<parameter name="field" type="java.lang.String">
+</parameter>
+<parameter name="inserter" type="android.database.DatabaseUtils.InsertHelper">
+</parameter>
+<parameter name="index" type="int">
+</parameter>
+</method>
+<method name="dumpCurrentRow"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="cursor" type="android.database.Cursor">
+</parameter>
+</method>
+<method name="dumpCurrentRow"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="cursor" type="android.database.Cursor">
+</parameter>
+<parameter name="stream" type="java.io.PrintStream">
+</parameter>
+</method>
+<method name="dumpCurrentRow"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="cursor" type="android.database.Cursor">
+</parameter>
+<parameter name="sb" type="java.lang.StringBuilder">
+</parameter>
+</method>
+<method name="dumpCurrentRowToString"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="cursor" type="android.database.Cursor">
+</parameter>
+</method>
+<method name="dumpCursor"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="cursor" type="android.database.Cursor">
+</parameter>
+</method>
+<method name="dumpCursor"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="cursor" type="android.database.Cursor">
+</parameter>
+<parameter name="stream" type="java.io.PrintStream">
+</parameter>
+</method>
+<method name="dumpCursor"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="cursor" type="android.database.Cursor">
+</parameter>
+<parameter name="sb" type="java.lang.StringBuilder">
+</parameter>
+</method>
+<method name="dumpCursorToString"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="cursor" type="android.database.Cursor">
+</parameter>
+</method>
+<method name="getCollationKey"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+</method>
+<method name="getHexCollationKey"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+</method>
+<method name="longForQuery"
+ return="long"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="db" type="android.database.sqlite.SQLiteDatabase">
+</parameter>
+<parameter name="query" type="java.lang.String">
+</parameter>
+<parameter name="selectionArgs" type="java.lang.String[]">
+</parameter>
+</method>
+<method name="longForQuery"
+ return="long"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="prog" type="android.database.sqlite.SQLiteStatement">
+</parameter>
+<parameter name="selectionArgs" type="java.lang.String[]">
+</parameter>
+</method>
+<method name="queryNumEntries"
+ return="long"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="db" type="android.database.sqlite.SQLiteDatabase">
+</parameter>
+<parameter name="table" type="java.lang.String">
+</parameter>
+</method>
+<method name="readExceptionFromParcel"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="reply" type="android.os.Parcel">
+</parameter>
+</method>
+<method name="readExceptionWithFileNotFoundExceptionFromParcel"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="reply" type="android.os.Parcel">
+</parameter>
+<exception name="FileNotFoundException" type="java.io.FileNotFoundException">
+</exception>
+</method>
+<method name="readExceptionWithOperationApplicationExceptionFromParcel"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="reply" type="android.os.Parcel">
+</parameter>
+<exception name="OperationApplicationException" type="android.content.OperationApplicationException">
+</exception>
+</method>
+<method name="sqlEscapeString"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="value" type="java.lang.String">
+</parameter>
+</method>
+<method name="stringForQuery"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="db" type="android.database.sqlite.SQLiteDatabase">
+</parameter>
+<parameter name="query" type="java.lang.String">
+</parameter>
+<parameter name="selectionArgs" type="java.lang.String[]">
+</parameter>
+</method>
+<method name="stringForQuery"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="prog" type="android.database.sqlite.SQLiteStatement">
+</parameter>
+<parameter name="selectionArgs" type="java.lang.String[]">
+</parameter>
+</method>
+<method name="writeExceptionToParcel"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="reply" type="android.os.Parcel">
+</parameter>
+<parameter name="e" type="java.lang.Exception">
+</parameter>
+</method>
+</class>
+<class name="DatabaseUtils.InsertHelper"
+ extends="java.lang.Object"
+ abstract="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="DatabaseUtils.InsertHelper"
+ type="android.database.DatabaseUtils.InsertHelper"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="db" type="android.database.sqlite.SQLiteDatabase">
+</parameter>
+<parameter name="tableName" type="java.lang.String">
+</parameter>
+</constructor>
+<method name="bind"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="index" type="int">
+</parameter>
+<parameter name="value" type="double">
+</parameter>
+</method>
+<method name="bind"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="index" type="int">
+</parameter>
+<parameter name="value" type="float">
+</parameter>
+</method>
+<method name="bind"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="index" type="int">
+</parameter>
+<parameter name="value" type="long">
+</parameter>
+</method>
+<method name="bind"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="index" type="int">
+</parameter>
+<parameter name="value" type="int">
+</parameter>
+</method>
+<method name="bind"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="index" type="int">
+</parameter>
+<parameter name="value" type="boolean">
+</parameter>
+</method>
+<method name="bind"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="index" type="int">
+</parameter>
+<parameter name="value" type="byte[]">
+</parameter>
+</method>
+<method name="bind"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="index" type="int">
+</parameter>
+<parameter name="value" type="java.lang.String">
+</parameter>
+</method>
+<method name="bindNull"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="index" type="int">
+</parameter>
+</method>
+<method name="close"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="execute"
+ return="long"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getColumnIndex"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="key" type="java.lang.String">
+</parameter>
+</method>
+<method name="insert"
+ return="long"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="values" type="android.content.ContentValues">
+</parameter>
+</method>
+<method name="prepareForInsert"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="prepareForReplace"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="replace"
+ return="long"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="values" type="android.content.ContentValues">
+</parameter>
+</method>
+<field name="TABLE_INFO_PRAGMA_DEFAULT_INDEX"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="4"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<class name="MatrixCursor"
+ extends="android.database.AbstractCursor"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="MatrixCursor"
+ type="android.database.MatrixCursor"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="columnNames" type="java.lang.String[]">
+</parameter>
+<parameter name="initialCapacity" type="int">
+</parameter>
+</constructor>
+<constructor name="MatrixCursor"
+ type="android.database.MatrixCursor"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="columnNames" type="java.lang.String[]">
+</parameter>
+</constructor>
+<method name="addRow"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="columnValues" type="java.lang.Object[]">
+</parameter>
+</method>
+<method name="addRow"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="columnValues" type="java.lang.Iterable&lt;?&gt;">
+</parameter>
+</method>
+<method name="getColumnNames"
+ return="java.lang.String[]"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getCount"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getDouble"
+ return="double"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="column" type="int">
+</parameter>
+</method>
+<method name="getFloat"
+ return="float"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="column" type="int">
+</parameter>
+</method>
+<method name="getInt"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="column" type="int">
+</parameter>
+</method>
+<method name="getLong"
+ return="long"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="column" type="int">
+</parameter>
+</method>
+<method name="getShort"
+ return="short"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="column" type="int">
+</parameter>
+</method>
+<method name="getString"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="column" type="int">
+</parameter>
+</method>
+<method name="isNull"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="column" type="int">
+</parameter>
+</method>
+<method name="newRow"
+ return="android.database.MatrixCursor.RowBuilder"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+</class>
+<class name="MatrixCursor.RowBuilder"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="add"
+ return="android.database.MatrixCursor.RowBuilder"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="columnValue" type="java.lang.Object">
+</parameter>
+</method>
+</class>
+<class name="MergeCursor"
+ extends="android.database.AbstractCursor"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="MergeCursor"
+ type="android.database.MergeCursor"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="cursors" type="android.database.Cursor[]">
+</parameter>
+</constructor>
+<method name="getColumnNames"
+ return="java.lang.String[]"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getCount"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getDouble"
+ return="double"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="column" type="int">
+</parameter>
+</method>
+<method name="getFloat"
+ return="float"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="column" type="int">
+</parameter>
+</method>
+<method name="getInt"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="column" type="int">
+</parameter>
+</method>
+<method name="getLong"
+ return="long"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="column" type="int">
+</parameter>
+</method>
+<method name="getShort"
+ return="short"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="column" type="int">
+</parameter>
+</method>
+<method name="getString"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="column" type="int">
+</parameter>
+</method>
+<method name="isNull"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="column" type="int">
+</parameter>
+</method>
+</class>
+<class name="Observable"
+ extends="java.lang.Object"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="Observable"
+ type="android.database.Observable"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<method name="registerObserver"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="observer" type="T">
+</parameter>
+</method>
+<method name="unregisterAll"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="unregisterObserver"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="observer" type="T">
+</parameter>
+</method>
+<field name="mObservers"
+ type="java.util.ArrayList"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</field>
+</class>
+<class name="SQLException"
+ extends="java.lang.RuntimeException"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="SQLException"
+ type="android.database.SQLException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<constructor name="SQLException"
+ type="android.database.SQLException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="error" type="java.lang.String">
+</parameter>
+</constructor>
+</class>
+<class name="StaleDataException"
+ extends="java.lang.RuntimeException"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="StaleDataException"
+ type="android.database.StaleDataException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<constructor name="StaleDataException"
+ type="android.database.StaleDataException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="description" type="java.lang.String">
+</parameter>
+</constructor>
+</class>
+</package>
+<package name="android.database.sqlite"
+>
+<class name="SQLiteAbortException"
+ extends="android.database.sqlite.SQLiteException"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="SQLiteAbortException"
+ type="android.database.sqlite.SQLiteAbortException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<constructor name="SQLiteAbortException"
+ type="android.database.sqlite.SQLiteAbortException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="error" type="java.lang.String">
+</parameter>
+</constructor>
+</class>
+<class name="SQLiteClosable"
+ extends="java.lang.Object"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="SQLiteClosable"
+ type="android.database.sqlite.SQLiteClosable"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<method name="acquireReference"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="onAllReferencesReleased"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</method>
+<method name="onAllReferencesReleasedFromContainer"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</method>
+<method name="releaseReference"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="releaseReferenceFromContainer"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+</class>
+<class name="SQLiteConstraintException"
+ extends="android.database.sqlite.SQLiteException"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="SQLiteConstraintException"
+ type="android.database.sqlite.SQLiteConstraintException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<constructor name="SQLiteConstraintException"
+ type="android.database.sqlite.SQLiteConstraintException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="error" type="java.lang.String">
+</parameter>
+</constructor>
+</class>
+<class name="SQLiteCursor"
+ extends="android.database.AbstractWindowedCursor"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="SQLiteCursor"
+ type="android.database.sqlite.SQLiteCursor"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="db" type="android.database.sqlite.SQLiteDatabase">
+</parameter>
+<parameter name="driver" type="android.database.sqlite.SQLiteCursorDriver">
+</parameter>
+<parameter name="editTable" type="java.lang.String">
+</parameter>
+<parameter name="query" type="android.database.sqlite.SQLiteQuery">
+</parameter>
+</constructor>
+<method name="getColumnNames"
+ return="java.lang.String[]"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getCount"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getDatabase"
+ return="android.database.sqlite.SQLiteDatabase"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="setSelectionArguments"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="selectionArgs" type="java.lang.String[]">
+</parameter>
+</method>
+</class>
+<interface name="SQLiteCursorDriver"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="cursorClosed"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="cursorDeactivated"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="cursorRequeried"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="cursor" type="android.database.Cursor">
+</parameter>
+</method>
+<method name="query"
+ return="android.database.Cursor"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="factory" type="android.database.sqlite.SQLiteDatabase.CursorFactory">
+</parameter>
+<parameter name="bindArgs" type="java.lang.String[]">
+</parameter>
+</method>
+<method name="setBindArguments"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="bindArgs" type="java.lang.String[]">
+</parameter>
+</method>
+</interface>
+<class name="SQLiteDatabase"
+ extends="android.database.sqlite.SQLiteClosable"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="beginTransaction"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="beginTransactionWithListener"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="transactionListener" type="android.database.sqlite.SQLiteTransactionListener">
+</parameter>
+</method>
+<method name="close"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="compileStatement"
+ return="android.database.sqlite.SQLiteStatement"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="sql" type="java.lang.String">
+</parameter>
+<exception name="SQLException" type="android.database.SQLException">
+</exception>
+</method>
+<method name="create"
+ return="android.database.sqlite.SQLiteDatabase"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="factory" type="android.database.sqlite.SQLiteDatabase.CursorFactory">
+</parameter>
+</method>
+<method name="delete"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="table" type="java.lang.String">
+</parameter>
+<parameter name="whereClause" type="java.lang.String">
+</parameter>
+<parameter name="whereArgs" type="java.lang.String[]">
+</parameter>
+</method>
+<method name="endTransaction"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="execSQL"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="sql" type="java.lang.String">
+</parameter>
+<exception name="SQLException" type="android.database.SQLException">
+</exception>
+</method>
+<method name="execSQL"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="sql" type="java.lang.String">
+</parameter>
+<parameter name="bindArgs" type="java.lang.Object[]">
+</parameter>
+<exception name="SQLException" type="android.database.SQLException">
+</exception>
+</method>
+<method name="findEditTable"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="tables" type="java.lang.String">
+</parameter>
+</method>
+<method name="getMaximumSize"
+ return="long"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getPageSize"
+ return="long"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getPath"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getSyncedTables"
+ return="java.util.Map&lt;java.lang.String, java.lang.String&gt;"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getVersion"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="inTransaction"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="insert"
+ return="long"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="table" type="java.lang.String">
+</parameter>
+<parameter name="nullColumnHack" type="java.lang.String">
+</parameter>
+<parameter name="values" type="android.content.ContentValues">
+</parameter>
+</method>
+<method name="insertOrThrow"
+ return="long"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="table" type="java.lang.String">
+</parameter>
+<parameter name="nullColumnHack" type="java.lang.String">
+</parameter>
+<parameter name="values" type="android.content.ContentValues">
+</parameter>
+<exception name="SQLException" type="android.database.SQLException">
+</exception>
+</method>
+<method name="insertWithOnConflict"
+ return="long"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="table" type="java.lang.String">
+</parameter>
+<parameter name="nullColumnHack" type="java.lang.String">
+</parameter>
+<parameter name="initialValues" type="android.content.ContentValues">
+</parameter>
+<parameter name="conflictAlgorithm" type="int">
+</parameter>
+</method>
+<method name="isDbLockedByCurrentThread"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isDbLockedByOtherThreads"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isOpen"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isReadOnly"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="markTableSyncable"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="table" type="java.lang.String">
+</parameter>
+<parameter name="deletedTable" type="java.lang.String">
+</parameter>
+</method>
+<method name="markTableSyncable"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="table" type="java.lang.String">
+</parameter>
+<parameter name="foreignKey" type="java.lang.String">
+</parameter>
+<parameter name="updateTable" type="java.lang.String">
+</parameter>
+</method>
+<method name="needUpgrade"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="newVersion" type="int">
+</parameter>
+</method>
+<method name="onAllReferencesReleased"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</method>
+<method name="openDatabase"
+ return="android.database.sqlite.SQLiteDatabase"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="path" type="java.lang.String">
+</parameter>
+<parameter name="factory" type="android.database.sqlite.SQLiteDatabase.CursorFactory">
+</parameter>
+<parameter name="flags" type="int">
+</parameter>
+</method>
+<method name="openOrCreateDatabase"
+ return="android.database.sqlite.SQLiteDatabase"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="file" type="java.io.File">
+</parameter>
+<parameter name="factory" type="android.database.sqlite.SQLiteDatabase.CursorFactory">
+</parameter>
+</method>
+<method name="openOrCreateDatabase"
+ return="android.database.sqlite.SQLiteDatabase"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="path" type="java.lang.String">
+</parameter>
+<parameter name="factory" type="android.database.sqlite.SQLiteDatabase.CursorFactory">
+</parameter>
+</method>
+<method name="query"
+ return="android.database.Cursor"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="distinct" type="boolean">
+</parameter>
+<parameter name="table" type="java.lang.String">
+</parameter>
+<parameter name="columns" type="java.lang.String[]">
+</parameter>
+<parameter name="selection" type="java.lang.String">
+</parameter>
+<parameter name="selectionArgs" type="java.lang.String[]">
+</parameter>
+<parameter name="groupBy" type="java.lang.String">
+</parameter>
+<parameter name="having" type="java.lang.String">
+</parameter>
+<parameter name="orderBy" type="java.lang.String">
+</parameter>
+<parameter name="limit" type="java.lang.String">
+</parameter>
+</method>
+<method name="query"
+ return="android.database.Cursor"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="table" type="java.lang.String">
+</parameter>
+<parameter name="columns" type="java.lang.String[]">
+</parameter>
+<parameter name="selection" type="java.lang.String">
+</parameter>
+<parameter name="selectionArgs" type="java.lang.String[]">
+</parameter>
+<parameter name="groupBy" type="java.lang.String">
+</parameter>
+<parameter name="having" type="java.lang.String">
+</parameter>
+<parameter name="orderBy" type="java.lang.String">
+</parameter>
+</method>
+<method name="query"
+ return="android.database.Cursor"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="table" type="java.lang.String">
+</parameter>
+<parameter name="columns" type="java.lang.String[]">
+</parameter>
+<parameter name="selection" type="java.lang.String">
+</parameter>
+<parameter name="selectionArgs" type="java.lang.String[]">
+</parameter>
+<parameter name="groupBy" type="java.lang.String">
+</parameter>
+<parameter name="having" type="java.lang.String">
+</parameter>
+<parameter name="orderBy" type="java.lang.String">
+</parameter>
+<parameter name="limit" type="java.lang.String">
+</parameter>
+</method>
+<method name="queryWithFactory"
+ return="android.database.Cursor"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="cursorFactory" type="android.database.sqlite.SQLiteDatabase.CursorFactory">
+</parameter>
+<parameter name="distinct" type="boolean">
+</parameter>
+<parameter name="table" type="java.lang.String">
+</parameter>
+<parameter name="columns" type="java.lang.String[]">
+</parameter>
+<parameter name="selection" type="java.lang.String">
+</parameter>
+<parameter name="selectionArgs" type="java.lang.String[]">
+</parameter>
+<parameter name="groupBy" type="java.lang.String">
+</parameter>
+<parameter name="having" type="java.lang.String">
+</parameter>
+<parameter name="orderBy" type="java.lang.String">
+</parameter>
+<parameter name="limit" type="java.lang.String">
+</parameter>
+</method>
+<method name="rawQuery"
+ return="android.database.Cursor"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="sql" type="java.lang.String">
+</parameter>
+<parameter name="selectionArgs" type="java.lang.String[]">
+</parameter>
+</method>
+<method name="rawQueryWithFactory"
+ return="android.database.Cursor"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="cursorFactory" type="android.database.sqlite.SQLiteDatabase.CursorFactory">
+</parameter>
+<parameter name="sql" type="java.lang.String">
+</parameter>
+<parameter name="selectionArgs" type="java.lang.String[]">
+</parameter>
+<parameter name="editTable" type="java.lang.String">
+</parameter>
+</method>
+<method name="releaseMemory"
+ return="int"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="replace"
+ return="long"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="table" type="java.lang.String">
+</parameter>
+<parameter name="nullColumnHack" type="java.lang.String">
+</parameter>
+<parameter name="initialValues" type="android.content.ContentValues">
+</parameter>
+</method>
+<method name="replaceOrThrow"
+ return="long"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="table" type="java.lang.String">
+</parameter>
+<parameter name="nullColumnHack" type="java.lang.String">
+</parameter>
+<parameter name="initialValues" type="android.content.ContentValues">
+</parameter>
+<exception name="SQLException" type="android.database.SQLException">
+</exception>
+</method>
+<method name="setLocale"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="locale" type="java.util.Locale">
+</parameter>
+</method>
+<method name="setLockingEnabled"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="lockingEnabled" type="boolean">
+</parameter>
+</method>
+<method name="setMaximumSize"
+ return="long"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="numBytes" type="long">
+</parameter>
+</method>
+<method name="setPageSize"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="numBytes" type="long">
+</parameter>
+</method>
+<method name="setTransactionSuccessful"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="setVersion"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="version" type="int">
+</parameter>
+</method>
+<method name="update"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="table" type="java.lang.String">
+</parameter>
+<parameter name="values" type="android.content.ContentValues">
+</parameter>
+<parameter name="whereClause" type="java.lang.String">
+</parameter>
+<parameter name="whereArgs" type="java.lang.String[]">
+</parameter>
+</method>
+<method name="updateWithOnConflict"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="table" type="java.lang.String">
+</parameter>
+<parameter name="values" type="android.content.ContentValues">
+</parameter>
+<parameter name="whereClause" type="java.lang.String">
+</parameter>
+<parameter name="whereArgs" type="java.lang.String[]">
+</parameter>
+<parameter name="conflictAlgorithm" type="int">
+</parameter>
+</method>
+<method name="yieldIfContended"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="deprecated"
+ visibility="public"
+>
+</method>
+<method name="yieldIfContendedSafely"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="yieldIfContendedSafely"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="sleepAfterYieldDelay" type="long">
+</parameter>
+</method>
+<field name="CONFLICT_ABORT"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="CONFLICT_FAIL"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="3"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="CONFLICT_IGNORE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="4"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="CONFLICT_NONE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="0"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="CONFLICT_REPLACE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="5"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="CONFLICT_ROLLBACK"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="CREATE_IF_NECESSARY"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="268435456"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="NO_LOCALIZED_COLLATORS"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="OPEN_READONLY"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="OPEN_READWRITE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="0"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="SQLITE_MAX_LIKE_PATTERN_LENGTH"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="50000"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<interface name="SQLiteDatabase.CursorFactory"
+ abstract="true"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="newCursor"
+ return="android.database.Cursor"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="db" type="android.database.sqlite.SQLiteDatabase">
+</parameter>
+<parameter name="masterQuery" type="android.database.sqlite.SQLiteCursorDriver">
+</parameter>
+<parameter name="editTable" type="java.lang.String">
+</parameter>
+<parameter name="query" type="android.database.sqlite.SQLiteQuery">
+</parameter>
+</method>
+</interface>
+<class name="SQLiteDatabaseCorruptException"
+ extends="android.database.sqlite.SQLiteException"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="SQLiteDatabaseCorruptException"
+ type="android.database.sqlite.SQLiteDatabaseCorruptException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<constructor name="SQLiteDatabaseCorruptException"
+ type="android.database.sqlite.SQLiteDatabaseCorruptException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="error" type="java.lang.String">
+</parameter>
+</constructor>
+</class>
+<class name="SQLiteDiskIOException"
+ extends="android.database.sqlite.SQLiteException"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="SQLiteDiskIOException"
+ type="android.database.sqlite.SQLiteDiskIOException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<constructor name="SQLiteDiskIOException"
+ type="android.database.sqlite.SQLiteDiskIOException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="error" type="java.lang.String">
+</parameter>
+</constructor>
+</class>
+<class name="SQLiteDoneException"
+ extends="android.database.sqlite.SQLiteException"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="SQLiteDoneException"
+ type="android.database.sqlite.SQLiteDoneException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<constructor name="SQLiteDoneException"
+ type="android.database.sqlite.SQLiteDoneException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="error" type="java.lang.String">
+</parameter>
+</constructor>
+</class>
+<class name="SQLiteException"
+ extends="android.database.SQLException"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="SQLiteException"
+ type="android.database.sqlite.SQLiteException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<constructor name="SQLiteException"
+ type="android.database.sqlite.SQLiteException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="error" type="java.lang.String">
+</parameter>
+</constructor>
+</class>
+<class name="SQLiteFullException"
+ extends="android.database.sqlite.SQLiteException"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="SQLiteFullException"
+ type="android.database.sqlite.SQLiteFullException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<constructor name="SQLiteFullException"
+ type="android.database.sqlite.SQLiteFullException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="error" type="java.lang.String">
+</parameter>
+</constructor>
+</class>
+<class name="SQLiteMisuseException"
+ extends="android.database.sqlite.SQLiteException"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="SQLiteMisuseException"
+ type="android.database.sqlite.SQLiteMisuseException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<constructor name="SQLiteMisuseException"
+ type="android.database.sqlite.SQLiteMisuseException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="error" type="java.lang.String">
+</parameter>
+</constructor>
+</class>
+<class name="SQLiteOpenHelper"
+ extends="java.lang.Object"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="SQLiteOpenHelper"
+ type="android.database.sqlite.SQLiteOpenHelper"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="context" type="android.content.Context">
+</parameter>
+<parameter name="name" type="java.lang.String">
+</parameter>
+<parameter name="factory" type="android.database.sqlite.SQLiteDatabase.CursorFactory">
+</parameter>
+<parameter name="version" type="int">
+</parameter>
+</constructor>
+<method name="close"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getReadableDatabase"
+ return="android.database.sqlite.SQLiteDatabase"
+ abstract="false"
+ native="false"
+ synchronized="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getWritableDatabase"
+ return="android.database.sqlite.SQLiteDatabase"
+ abstract="false"
+ native="false"
+ synchronized="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="onCreate"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="db" type="android.database.sqlite.SQLiteDatabase">
+</parameter>
+</method>
+<method name="onOpen"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="db" type="android.database.sqlite.SQLiteDatabase">
+</parameter>
+</method>
+<method name="onUpgrade"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="db" type="android.database.sqlite.SQLiteDatabase">
+</parameter>
+<parameter name="oldVersion" type="int">
+</parameter>
+<parameter name="newVersion" type="int">
+</parameter>
+</method>
+</class>
+<class name="SQLiteProgram"
+ extends="android.database.sqlite.SQLiteClosable"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="bindBlob"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="index" type="int">
+</parameter>
+<parameter name="value" type="byte[]">
+</parameter>
+</method>
+<method name="bindDouble"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="index" type="int">
+</parameter>
+<parameter name="value" type="double">
+</parameter>
+</method>
+<method name="bindLong"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="index" type="int">
+</parameter>
+<parameter name="value" type="long">
+</parameter>
+</method>
+<method name="bindNull"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="index" type="int">
+</parameter>
+</method>
+<method name="bindString"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="index" type="int">
+</parameter>
+<parameter name="value" type="java.lang.String">
+</parameter>
+</method>
+<method name="clearBindings"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="close"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="compile"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="deprecated"
+ visibility="protected"
+>
+<parameter name="sql" type="java.lang.String">
+</parameter>
+<parameter name="forceCompilation" type="boolean">
+</parameter>
+</method>
+<method name="getUniqueId"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="native_bind_blob"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="index" type="int">
+</parameter>
+<parameter name="value" type="byte[]">
+</parameter>
+</method>
+<method name="native_bind_double"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="index" type="int">
+</parameter>
+<parameter name="value" type="double">
+</parameter>
+</method>
+<method name="native_bind_long"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="index" type="int">
+</parameter>
+<parameter name="value" type="long">
+</parameter>
+</method>
+<method name="native_bind_null"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="index" type="int">
+</parameter>
+</method>
+<method name="native_bind_string"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="index" type="int">
+</parameter>
+<parameter name="value" type="java.lang.String">
+</parameter>
+</method>
+<method name="native_compile"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="deprecated"
+ visibility="protected"
+>
+<parameter name="sql" type="java.lang.String">
+</parameter>
+</method>
+<method name="native_finalize"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="deprecated"
+ visibility="protected"
+>
+</method>
+<method name="onAllReferencesReleased"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</method>
+<field name="mDatabase"
+ type="android.database.sqlite.SQLiteDatabase"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="deprecated"
+ visibility="protected"
+>
+</field>
+<field name="nHandle"
+ type="int"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="deprecated"
+ visibility="protected"
+>
+</field>
+<field name="nStatement"
+ type="int"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="deprecated"
+ visibility="protected"
+>
+</field>
+</class>
+<class name="SQLiteQuery"
+ extends="android.database.sqlite.SQLiteProgram"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</class>
+<class name="SQLiteQueryBuilder"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="SQLiteQueryBuilder"
+ type="android.database.sqlite.SQLiteQueryBuilder"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<method name="appendColumns"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="s" type="java.lang.StringBuilder">
+</parameter>
+<parameter name="columns" type="java.lang.String[]">
+</parameter>
+</method>
+<method name="appendWhere"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="inWhere" type="java.lang.CharSequence">
+</parameter>
+</method>
+<method name="appendWhereEscapeString"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="inWhere" type="java.lang.String">
+</parameter>
+</method>
+<method name="buildQuery"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="projectionIn" type="java.lang.String[]">
+</parameter>
+<parameter name="selection" type="java.lang.String">
+</parameter>
+<parameter name="selectionArgs" type="java.lang.String[]">
+</parameter>
+<parameter name="groupBy" type="java.lang.String">
+</parameter>
+<parameter name="having" type="java.lang.String">
+</parameter>
+<parameter name="sortOrder" type="java.lang.String">
+</parameter>
+<parameter name="limit" type="java.lang.String">
+</parameter>
+</method>
+<method name="buildQueryString"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="distinct" type="boolean">
+</parameter>
+<parameter name="tables" type="java.lang.String">
+</parameter>
+<parameter name="columns" type="java.lang.String[]">
+</parameter>
+<parameter name="where" type="java.lang.String">
+</parameter>
+<parameter name="groupBy" type="java.lang.String">
+</parameter>
+<parameter name="having" type="java.lang.String">
+</parameter>
+<parameter name="orderBy" type="java.lang.String">
+</parameter>
+<parameter name="limit" type="java.lang.String">
+</parameter>
+</method>
+<method name="buildUnionQuery"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="subQueries" type="java.lang.String[]">
+</parameter>
+<parameter name="sortOrder" type="java.lang.String">
+</parameter>
+<parameter name="limit" type="java.lang.String">
+</parameter>
+</method>
+<method name="buildUnionSubQuery"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="typeDiscriminatorColumn" type="java.lang.String">
+</parameter>
+<parameter name="unionColumns" type="java.lang.String[]">
+</parameter>
+<parameter name="columnsPresentInTable" type="java.util.Set&lt;java.lang.String&gt;">
+</parameter>
+<parameter name="computedColumnsOffset" type="int">
+</parameter>
+<parameter name="typeDiscriminatorValue" type="java.lang.String">
+</parameter>
+<parameter name="selection" type="java.lang.String">
+</parameter>
+<parameter name="selectionArgs" type="java.lang.String[]">
+</parameter>
+<parameter name="groupBy" type="java.lang.String">
+</parameter>
+<parameter name="having" type="java.lang.String">
+</parameter>
+</method>
+<method name="getTables"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="query"
+ return="android.database.Cursor"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="db" type="android.database.sqlite.SQLiteDatabase">
+</parameter>
+<parameter name="projectionIn" type="java.lang.String[]">
+</parameter>
+<parameter name="selection" type="java.lang.String">
+</parameter>
+<parameter name="selectionArgs" type="java.lang.String[]">
+</parameter>
+<parameter name="groupBy" type="java.lang.String">
+</parameter>
+<parameter name="having" type="java.lang.String">
+</parameter>
+<parameter name="sortOrder" type="java.lang.String">
+</parameter>
+</method>
+<method name="query"
+ return="android.database.Cursor"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="db" type="android.database.sqlite.SQLiteDatabase">
+</parameter>
+<parameter name="projectionIn" type="java.lang.String[]">
+</parameter>
+<parameter name="selection" type="java.lang.String">
+</parameter>
+<parameter name="selectionArgs" type="java.lang.String[]">
+</parameter>
+<parameter name="groupBy" type="java.lang.String">
+</parameter>
+<parameter name="having" type="java.lang.String">
+</parameter>
+<parameter name="sortOrder" type="java.lang.String">
+</parameter>
+<parameter name="limit" type="java.lang.String">
+</parameter>
+</method>
+<method name="setCursorFactory"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="factory" type="android.database.sqlite.SQLiteDatabase.CursorFactory">
+</parameter>
+</method>
+<method name="setDistinct"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="distinct" type="boolean">
+</parameter>
+</method>
+<method name="setProjectionMap"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="columnMap" type="java.util.Map&lt;java.lang.String, java.lang.String&gt;">
+</parameter>
+</method>
+<method name="setTables"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="inTables" type="java.lang.String">
+</parameter>
+</method>
+</class>
+<class name="SQLiteStatement"
+ extends="android.database.sqlite.SQLiteProgram"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="execute"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="executeInsert"
+ return="long"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="simpleQueryForLong"
+ return="long"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="simpleQueryForString"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+</class>
+<interface name="SQLiteTransactionListener"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="onBegin"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="onCommit"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="onRollback"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+</interface>
+</package>
+<package name="android.gesture"
+>
+<class name="Gesture"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="android.os.Parcelable">
+</implements>
+<constructor name="Gesture"
+ type="android.gesture.Gesture"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<method name="addStroke"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="stroke" type="android.gesture.GestureStroke">
+</parameter>
+</method>
+<method name="clone"
+ return="java.lang.Object"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="describeContents"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getBoundingBox"
+ return="android.graphics.RectF"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getID"
+ return="long"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getLength"
+ return="float"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getStrokes"
+ return="java.util.ArrayList&lt;android.gesture.GestureStroke&gt;"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getStrokesCount"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="toBitmap"
+ return="android.graphics.Bitmap"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="width" type="int">
+</parameter>
+<parameter name="height" type="int">
+</parameter>
+<parameter name="edge" type="int">
+</parameter>
+<parameter name="numSample" type="int">
+</parameter>
+<parameter name="color" type="int">
+</parameter>
+</method>
+<method name="toBitmap"
+ return="android.graphics.Bitmap"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="width" type="int">
+</parameter>
+<parameter name="height" type="int">
+</parameter>
+<parameter name="inset" type="int">
+</parameter>
+<parameter name="color" type="int">
+</parameter>
+</method>
+<method name="toPath"
+ return="android.graphics.Path"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="toPath"
+ return="android.graphics.Path"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="path" type="android.graphics.Path">
+</parameter>
+</method>
+<method name="toPath"
+ return="android.graphics.Path"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="width" type="int">
+</parameter>
+<parameter name="height" type="int">
+</parameter>
+<parameter name="edge" type="int">
+</parameter>
+<parameter name="numSample" type="int">
+</parameter>
+</method>
+<method name="toPath"
+ return="android.graphics.Path"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="path" type="android.graphics.Path">
+</parameter>
+<parameter name="width" type="int">
+</parameter>
+<parameter name="height" type="int">
+</parameter>
+<parameter name="edge" type="int">
+</parameter>
+<parameter name="numSample" type="int">
+</parameter>
+</method>
+<method name="writeToParcel"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="out" type="android.os.Parcel">
+</parameter>
+<parameter name="flags" type="int">
+</parameter>
+</method>
+<field name="CREATOR"
+ type="android.os.Parcelable.Creator"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<class name="GestureLibraries"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="fromFile"
+ return="android.gesture.GestureLibrary"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="path" type="java.lang.String">
+</parameter>
+</method>
+<method name="fromFile"
+ return="android.gesture.GestureLibrary"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="path" type="java.io.File">
+</parameter>
+</method>
+<method name="fromPrivateFile"
+ return="android.gesture.GestureLibrary"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="context" type="android.content.Context">
+</parameter>
+<parameter name="name" type="java.lang.String">
+</parameter>
+</method>
+<method name="fromRawResource"
+ return="android.gesture.GestureLibrary"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="context" type="android.content.Context">
+</parameter>
+<parameter name="resourceId" type="int">
+</parameter>
+</method>
+</class>
+<class name="GestureLibrary"
+ extends="java.lang.Object"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="GestureLibrary"
+ type="android.gesture.GestureLibrary"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</constructor>
+<method name="addGesture"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="entryName" type="java.lang.String">
+</parameter>
+<parameter name="gesture" type="android.gesture.Gesture">
+</parameter>
+</method>
+<method name="getGestureEntries"
+ return="java.util.Set&lt;java.lang.String&gt;"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getGestures"
+ return="java.util.ArrayList&lt;android.gesture.Gesture&gt;"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="entryName" type="java.lang.String">
+</parameter>
+</method>
+<method name="getOrientationStyle"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getSequenceType"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isReadOnly"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="load"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="recognize"
+ return="java.util.ArrayList&lt;android.gesture.Prediction&gt;"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="gesture" type="android.gesture.Gesture">
+</parameter>
+</method>
+<method name="removeEntry"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="entryName" type="java.lang.String">
+</parameter>
+</method>
+<method name="removeGesture"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="entryName" type="java.lang.String">
+</parameter>
+<parameter name="gesture" type="android.gesture.Gesture">
+</parameter>
+</method>
+<method name="save"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="setOrientationStyle"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="style" type="int">
+</parameter>
+</method>
+<method name="setSequenceType"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="type" type="int">
+</parameter>
+</method>
+<field name="mStore"
+ type="android.gesture.GestureStore"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</field>
+</class>
+<class name="GestureOverlayView"
+ extends="android.widget.FrameLayout"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="GestureOverlayView"
+ type="android.gesture.GestureOverlayView"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="context" type="android.content.Context">
+</parameter>
+</constructor>
+<constructor name="GestureOverlayView"
+ type="android.gesture.GestureOverlayView"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="context" type="android.content.Context">
+</parameter>
+<parameter name="attrs" type="android.util.AttributeSet">
+</parameter>
+</constructor>
+<constructor name="GestureOverlayView"
+ type="android.gesture.GestureOverlayView"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="context" type="android.content.Context">
+</parameter>
+<parameter name="attrs" type="android.util.AttributeSet">
+</parameter>
+<parameter name="defStyle" type="int">
+</parameter>
+</constructor>
+<method name="addOnGestureListener"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="listener" type="android.gesture.GestureOverlayView.OnGestureListener">
+</parameter>
+</method>
+<method name="addOnGesturePerformedListener"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="listener" type="android.gesture.GestureOverlayView.OnGesturePerformedListener">
+</parameter>
+</method>
+<method name="addOnGesturingListener"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="listener" type="android.gesture.GestureOverlayView.OnGesturingListener">
+</parameter>
+</method>
+<method name="cancelClearAnimation"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="cancelGesture"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="clear"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="animated" type="boolean">
+</parameter>
+</method>
+<method name="getCurrentStroke"
+ return="java.util.ArrayList&lt;android.gesture.GesturePoint&gt;"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getFadeOffset"
+ return="long"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getGesture"
+ return="android.gesture.Gesture"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getGestureColor"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getGesturePath"
+ return="android.graphics.Path"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getGesturePath"
+ return="android.graphics.Path"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="path" type="android.graphics.Path">
+</parameter>
+</method>
+<method name="getGestureStrokeAngleThreshold"
+ return="float"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getGestureStrokeLengthThreshold"
+ return="float"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getGestureStrokeSquarenessTreshold"
+ return="float"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getGestureStrokeType"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getGestureStrokeWidth"
+ return="float"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getOrientation"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getUncertainGestureColor"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isEventsInterceptionEnabled"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isFadeEnabled"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isGestureVisible"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isGesturing"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="removeAllOnGestureListeners"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="removeAllOnGesturePerformedListeners"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="removeAllOnGesturingListeners"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="removeOnGestureListener"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="listener" type="android.gesture.GestureOverlayView.OnGestureListener">
+</parameter>
+</method>
+<method name="removeOnGesturePerformedListener"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="listener" type="android.gesture.GestureOverlayView.OnGesturePerformedListener">
+</parameter>
+</method>
+<method name="removeOnGesturingListener"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="listener" type="android.gesture.GestureOverlayView.OnGesturingListener">
+</parameter>
+</method>
+<method name="setEventsInterceptionEnabled"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="enabled" type="boolean">
+</parameter>
+</method>
+<method name="setFadeEnabled"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="fadeEnabled" type="boolean">
+</parameter>
+</method>
+<method name="setFadeOffset"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="fadeOffset" type="long">
+</parameter>
+</method>
+<method name="setGesture"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="gesture" type="android.gesture.Gesture">
+</parameter>
+</method>
+<method name="setGestureColor"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="color" type="int">
+</parameter>
+</method>
+<method name="setGestureStrokeAngleThreshold"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="gestureStrokeAngleThreshold" type="float">
+</parameter>
+</method>
+<method name="setGestureStrokeLengthThreshold"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="gestureStrokeLengthThreshold" type="float">
+</parameter>
+</method>
+<method name="setGestureStrokeSquarenessTreshold"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="gestureStrokeSquarenessTreshold" type="float">
+</parameter>
+</method>
+<method name="setGestureStrokeType"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="gestureStrokeType" type="int">
+</parameter>
+</method>
+<method name="setGestureStrokeWidth"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="gestureStrokeWidth" type="float">
+</parameter>
+</method>
+<method name="setGestureVisible"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="visible" type="boolean">
+</parameter>
+</method>
+<method name="setOrientation"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="orientation" type="int">
+</parameter>
+</method>
+<method name="setUncertainGestureColor"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="color" type="int">
+</parameter>
+</method>
+<field name="GESTURE_STROKE_TYPE_MULTIPLE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GESTURE_STROKE_TYPE_SINGLE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="0"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ORIENTATION_HORIZONTAL"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="0"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ORIENTATION_VERTICAL"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<interface name="GestureOverlayView.OnGestureListener"
+ abstract="true"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="onGesture"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="overlay" type="android.gesture.GestureOverlayView">
+</parameter>
+<parameter name="event" type="android.view.MotionEvent">
+</parameter>
+</method>
+<method name="onGestureCancelled"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="overlay" type="android.gesture.GestureOverlayView">
+</parameter>
+<parameter name="event" type="android.view.MotionEvent">
+</parameter>
+</method>
+<method name="onGestureEnded"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="overlay" type="android.gesture.GestureOverlayView">
+</parameter>
+<parameter name="event" type="android.view.MotionEvent">
+</parameter>
+</method>
+<method name="onGestureStarted"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="overlay" type="android.gesture.GestureOverlayView">
+</parameter>
+<parameter name="event" type="android.view.MotionEvent">
+</parameter>
+</method>
+</interface>
+<interface name="GestureOverlayView.OnGesturePerformedListener"
+ abstract="true"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="onGesturePerformed"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="overlay" type="android.gesture.GestureOverlayView">
+</parameter>
+<parameter name="gesture" type="android.gesture.Gesture">
+</parameter>
+</method>
+</interface>
+<interface name="GestureOverlayView.OnGesturingListener"
+ abstract="true"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="onGesturingEnded"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="overlay" type="android.gesture.GestureOverlayView">
+</parameter>
+</method>
+<method name="onGesturingStarted"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="overlay" type="android.gesture.GestureOverlayView">
+</parameter>
+</method>
+</interface>
+<class name="GesturePoint"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="GesturePoint"
+ type="android.gesture.GesturePoint"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="x" type="float">
+</parameter>
+<parameter name="y" type="float">
+</parameter>
+<parameter name="t" type="long">
+</parameter>
+</constructor>
+<method name="clone"
+ return="java.lang.Object"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<field name="timestamp"
+ type="long"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="x"
+ type="float"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="y"
+ type="float"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<class name="GestureStore"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="GestureStore"
+ type="android.gesture.GestureStore"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<method name="addGesture"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="entryName" type="java.lang.String">
+</parameter>
+<parameter name="gesture" type="android.gesture.Gesture">
+</parameter>
+</method>
+<method name="getGestureEntries"
+ return="java.util.Set&lt;java.lang.String&gt;"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getGestures"
+ return="java.util.ArrayList&lt;android.gesture.Gesture&gt;"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="entryName" type="java.lang.String">
+</parameter>
+</method>
+<method name="getOrientationStyle"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getSequenceType"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="hasChanged"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="load"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="stream" type="java.io.InputStream">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="load"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="stream" type="java.io.InputStream">
+</parameter>
+<parameter name="closeStream" type="boolean">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="recognize"
+ return="java.util.ArrayList&lt;android.gesture.Prediction&gt;"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="gesture" type="android.gesture.Gesture">
+</parameter>
+</method>
+<method name="removeEntry"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="entryName" type="java.lang.String">
+</parameter>
+</method>
+<method name="removeGesture"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="entryName" type="java.lang.String">
+</parameter>
+<parameter name="gesture" type="android.gesture.Gesture">
+</parameter>
+</method>
+<method name="save"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="stream" type="java.io.OutputStream">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="save"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="stream" type="java.io.OutputStream">
+</parameter>
+<parameter name="closeStream" type="boolean">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="setOrientationStyle"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="style" type="int">
+</parameter>
+</method>
+<method name="setSequenceType"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="type" type="int">
+</parameter>
+</method>
+<field name="ORIENTATION_INVARIANT"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ORIENTATION_SENSITIVE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="SEQUENCE_INVARIANT"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="SEQUENCE_SENSITIVE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<class name="GestureStroke"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="GestureStroke"
+ type="android.gesture.GestureStroke"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="points" type="java.util.ArrayList&lt;android.gesture.GesturePoint&gt;">
+</parameter>
+</constructor>
+<method name="clearPath"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="clone"
+ return="java.lang.Object"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="computeOrientedBoundingBox"
+ return="android.gesture.OrientedBoundingBox"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getPath"
+ return="android.graphics.Path"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="toPath"
+ return="android.graphics.Path"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="width" type="float">
+</parameter>
+<parameter name="height" type="float">
+</parameter>
+<parameter name="numSample" type="int">
+</parameter>
+</method>
+<field name="boundingBox"
+ type="android.graphics.RectF"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="length"
+ type="float"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="points"
+ type="float[]"
+ transient="false"
+ volatile="false"
+ value="null"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<class name="GestureUtils"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="computeOrientedBoundingBox"
+ return="android.gesture.OrientedBoundingBox"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="originalPoints" type="java.util.ArrayList&lt;android.gesture.GesturePoint&gt;">
+</parameter>
+</method>
+<method name="computeOrientedBoundingBox"
+ return="android.gesture.OrientedBoundingBox"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="originalPoints" type="float[]">
+</parameter>
+</method>
+<method name="spatialSampling"
+ return="float[]"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="gesture" type="android.gesture.Gesture">
+</parameter>
+<parameter name="bitmapSize" type="int">
+</parameter>
+</method>
+<method name="spatialSampling"
+ return="float[]"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="gesture" type="android.gesture.Gesture">
+</parameter>
+<parameter name="bitmapSize" type="int">
+</parameter>
+<parameter name="keepAspectRatio" type="boolean">
+</parameter>
+</method>
+<method name="temporalSampling"
+ return="float[]"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="stroke" type="android.gesture.GestureStroke">
+</parameter>
+<parameter name="numPoints" type="int">
+</parameter>
+</method>
+</class>
+<class name="OrientedBoundingBox"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<field name="centerX"
+ type="float"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="centerY"
+ type="float"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="height"
+ type="float"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="orientation"
+ type="float"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="squareness"
+ type="float"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="width"
+ type="float"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<class name="Prediction"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<field name="name"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="score"
+ type="double"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+</package>
+<package name="android.graphics"
+>
+<class name="AvoidXfermode"
+ extends="android.graphics.Xfermode"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="AvoidXfermode"
+ type="android.graphics.AvoidXfermode"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="opColor" type="int">
+</parameter>
+<parameter name="tolerance" type="int">
+</parameter>
+<parameter name="mode" type="android.graphics.AvoidXfermode.Mode">
+</parameter>
+</constructor>
+</class>
+<class name="AvoidXfermode.Mode"
+ extends="java.lang.Enum"
+ abstract="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="valueOf"
+ return="android.graphics.AvoidXfermode.Mode"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+</method>
+<method name="values"
+ return="android.graphics.AvoidXfermode.Mode[]"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+</class>
+<class name="Bitmap"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="android.os.Parcelable">
+</implements>
+<method name="compress"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="format" type="android.graphics.Bitmap.CompressFormat">
+</parameter>
+<parameter name="quality" type="int">
+</parameter>
+<parameter name="stream" type="java.io.OutputStream">
+</parameter>
+</method>
+<method name="copy"
+ return="android.graphics.Bitmap"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="config" type="android.graphics.Bitmap.Config">
+</parameter>
+<parameter name="isMutable" type="boolean">
+</parameter>
+</method>
+<method name="copyPixelsFromBuffer"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="src" type="java.nio.Buffer">
+</parameter>
+</method>
+<method name="copyPixelsToBuffer"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="dst" type="java.nio.Buffer">
+</parameter>
+</method>
+<method name="createBitmap"
+ return="android.graphics.Bitmap"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="src" type="android.graphics.Bitmap">
+</parameter>
+</method>
+<method name="createBitmap"
+ return="android.graphics.Bitmap"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="source" type="android.graphics.Bitmap">
+</parameter>
+<parameter name="x" type="int">
+</parameter>
+<parameter name="y" type="int">
+</parameter>
+<parameter name="width" type="int">
+</parameter>
+<parameter name="height" type="int">
+</parameter>
+</method>
+<method name="createBitmap"
+ return="android.graphics.Bitmap"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="source" type="android.graphics.Bitmap">
+</parameter>
+<parameter name="x" type="int">
+</parameter>
+<parameter name="y" type="int">
+</parameter>
+<parameter name="width" type="int">
+</parameter>
+<parameter name="height" type="int">
+</parameter>
+<parameter name="m" type="android.graphics.Matrix">
+</parameter>
+<parameter name="filter" type="boolean">
+</parameter>
+</method>
+<method name="createBitmap"
+ return="android.graphics.Bitmap"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="width" type="int">
+</parameter>
+<parameter name="height" type="int">
+</parameter>
+<parameter name="config" type="android.graphics.Bitmap.Config">
+</parameter>
+</method>
+<method name="createBitmap"
+ return="android.graphics.Bitmap"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="colors" type="int[]">
+</parameter>
+<parameter name="offset" type="int">
+</parameter>
+<parameter name="stride" type="int">
+</parameter>
+<parameter name="width" type="int">
+</parameter>
+<parameter name="height" type="int">
+</parameter>
+<parameter name="config" type="android.graphics.Bitmap.Config">
+</parameter>
+</method>
+<method name="createBitmap"
+ return="android.graphics.Bitmap"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="colors" type="int[]">
+</parameter>
+<parameter name="width" type="int">
+</parameter>
+<parameter name="height" type="int">
+</parameter>
+<parameter name="config" type="android.graphics.Bitmap.Config">
+</parameter>
+</method>
+<method name="createScaledBitmap"
+ return="android.graphics.Bitmap"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="src" type="android.graphics.Bitmap">
+</parameter>
+<parameter name="dstWidth" type="int">
+</parameter>
+<parameter name="dstHeight" type="int">
+</parameter>
+<parameter name="filter" type="boolean">
+</parameter>
+</method>
+<method name="describeContents"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="eraseColor"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="c" type="int">
+</parameter>
+</method>
+<method name="extractAlpha"
+ return="android.graphics.Bitmap"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="extractAlpha"
+ return="android.graphics.Bitmap"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="paint" type="android.graphics.Paint">
+</parameter>
+<parameter name="offsetXY" type="int[]">
+</parameter>
+</method>
+<method name="getConfig"
+ return="android.graphics.Bitmap.Config"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getDensity"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getHeight"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getNinePatchChunk"
+ return="byte[]"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getPixel"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="x" type="int">
+</parameter>
+<parameter name="y" type="int">
+</parameter>
+</method>
+<method name="getPixels"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="pixels" type="int[]">
+</parameter>
+<parameter name="offset" type="int">
+</parameter>
+<parameter name="stride" type="int">
+</parameter>
+<parameter name="x" type="int">
+</parameter>
+<parameter name="y" type="int">
+</parameter>
+<parameter name="width" type="int">
+</parameter>
+<parameter name="height" type="int">
+</parameter>
+</method>
+<method name="getRowBytes"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getScaledHeight"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="canvas" type="android.graphics.Canvas">
+</parameter>
+</method>
+<method name="getScaledHeight"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="metrics" type="android.util.DisplayMetrics">
+</parameter>
+</method>
+<method name="getScaledHeight"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="targetDensity" type="int">
+</parameter>
+</method>
+<method name="getScaledWidth"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="canvas" type="android.graphics.Canvas">
+</parameter>
+</method>
+<method name="getScaledWidth"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="metrics" type="android.util.DisplayMetrics">
+</parameter>
+</method>
+<method name="getScaledWidth"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="targetDensity" type="int">
+</parameter>
+</method>
+<method name="getWidth"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="hasAlpha"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isMutable"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isRecycled"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="prepareToDraw"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="recycle"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="setDensity"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="density" type="int">
+</parameter>
+</method>
+<method name="setPixel"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="x" type="int">
+</parameter>
+<parameter name="y" type="int">
+</parameter>
+<parameter name="color" type="int">
+</parameter>
+</method>
+<method name="setPixels"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="pixels" type="int[]">
+</parameter>
+<parameter name="offset" type="int">
+</parameter>
+<parameter name="stride" type="int">
+</parameter>
+<parameter name="x" type="int">
+</parameter>
+<parameter name="y" type="int">
+</parameter>
+<parameter name="width" type="int">
+</parameter>
+<parameter name="height" type="int">
+</parameter>
+</method>
+<method name="writeToParcel"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="p" type="android.os.Parcel">
+</parameter>
+<parameter name="flags" type="int">
+</parameter>
+</method>
+<field name="CREATOR"
+ type="android.os.Parcelable.Creator"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="DENSITY_NONE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="0"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<class name="Bitmap.CompressFormat"
+ extends="java.lang.Enum"
+ abstract="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="valueOf"
+ return="android.graphics.Bitmap.CompressFormat"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+</method>
+<method name="values"
+ return="android.graphics.Bitmap.CompressFormat[]"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+</class>
+<class name="Bitmap.Config"
+ extends="java.lang.Enum"
+ abstract="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="valueOf"
+ return="android.graphics.Bitmap.Config"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+</method>
+<method name="values"
+ return="android.graphics.Bitmap.Config[]"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+</class>
+<class name="BitmapFactory"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="BitmapFactory"
+ type="android.graphics.BitmapFactory"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<method name="decodeByteArray"
+ return="android.graphics.Bitmap"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="data" type="byte[]">
+</parameter>
+<parameter name="offset" type="int">
+</parameter>
+<parameter name="length" type="int">
+</parameter>
+<parameter name="opts" type="android.graphics.BitmapFactory.Options">
+</parameter>
+</method>
+<method name="decodeByteArray"
+ return="android.graphics.Bitmap"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="data" type="byte[]">
+</parameter>
+<parameter name="offset" type="int">
+</parameter>
+<parameter name="length" type="int">
+</parameter>
+</method>
+<method name="decodeFile"
+ return="android.graphics.Bitmap"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="pathName" type="java.lang.String">
+</parameter>
+<parameter name="opts" type="android.graphics.BitmapFactory.Options">
+</parameter>
+</method>
+<method name="decodeFile"
+ return="android.graphics.Bitmap"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="pathName" type="java.lang.String">
+</parameter>
+</method>
+<method name="decodeFileDescriptor"
+ return="android.graphics.Bitmap"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="fd" type="java.io.FileDescriptor">
+</parameter>
+<parameter name="outPadding" type="android.graphics.Rect">
+</parameter>
+<parameter name="opts" type="android.graphics.BitmapFactory.Options">
+</parameter>
+</method>
+<method name="decodeFileDescriptor"
+ return="android.graphics.Bitmap"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="fd" type="java.io.FileDescriptor">
+</parameter>
+</method>
+<method name="decodeResource"
+ return="android.graphics.Bitmap"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="res" type="android.content.res.Resources">
+</parameter>
+<parameter name="id" type="int">
+</parameter>
+<parameter name="opts" type="android.graphics.BitmapFactory.Options">
+</parameter>
+</method>
+<method name="decodeResource"
+ return="android.graphics.Bitmap"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="res" type="android.content.res.Resources">
+</parameter>
+<parameter name="id" type="int">
+</parameter>
+</method>
+<method name="decodeResourceStream"
+ return="android.graphics.Bitmap"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="res" type="android.content.res.Resources">
+</parameter>
+<parameter name="value" type="android.util.TypedValue">
+</parameter>
+<parameter name="is" type="java.io.InputStream">
+</parameter>
+<parameter name="pad" type="android.graphics.Rect">
+</parameter>
+<parameter name="opts" type="android.graphics.BitmapFactory.Options">
+</parameter>
+</method>
+<method name="decodeStream"
+ return="android.graphics.Bitmap"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="is" type="java.io.InputStream">
+</parameter>
+<parameter name="outPadding" type="android.graphics.Rect">
+</parameter>
+<parameter name="opts" type="android.graphics.BitmapFactory.Options">
+</parameter>
+</method>
+<method name="decodeStream"
+ return="android.graphics.Bitmap"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="is" type="java.io.InputStream">
+</parameter>
+</method>
+</class>
+<class name="BitmapFactory.Options"
+ extends="java.lang.Object"
+ abstract="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="BitmapFactory.Options"
+ type="android.graphics.BitmapFactory.Options"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<method name="requestCancelDecode"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<field name="inDensity"
+ type="int"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="inDither"
+ type="boolean"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="inInputShareable"
+ type="boolean"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="inJustDecodeBounds"
+ type="boolean"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="inPreferredConfig"
+ type="android.graphics.Bitmap.Config"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="inPurgeable"
+ type="boolean"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="inSampleSize"
+ type="int"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="inScaled"
+ type="boolean"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="inScreenDensity"
+ type="int"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="inTargetDensity"
+ type="int"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="inTempStorage"
+ type="byte[]"
+ transient="false"
+ volatile="false"
+ value="null"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="mCancel"
+ type="boolean"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="outHeight"
+ type="int"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="outMimeType"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="outWidth"
+ type="int"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<class name="BitmapShader"
+ extends="android.graphics.Shader"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="BitmapShader"
+ type="android.graphics.BitmapShader"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="bitmap" type="android.graphics.Bitmap">
+</parameter>
+<parameter name="tileX" type="android.graphics.Shader.TileMode">
+</parameter>
+<parameter name="tileY" type="android.graphics.Shader.TileMode">
+</parameter>
+</constructor>
+</class>
+<class name="BlurMaskFilter"
+ extends="android.graphics.MaskFilter"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="BlurMaskFilter"
+ type="android.graphics.BlurMaskFilter"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="radius" type="float">
+</parameter>
+<parameter name="style" type="android.graphics.BlurMaskFilter.Blur">
+</parameter>
+</constructor>
+</class>
+<class name="BlurMaskFilter.Blur"
+ extends="java.lang.Enum"
+ abstract="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="valueOf"
+ return="android.graphics.BlurMaskFilter.Blur"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+</method>
+<method name="values"
+ return="android.graphics.BlurMaskFilter.Blur[]"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+</class>
+<class name="Camera"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="Camera"
+ type="android.graphics.Camera"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<method name="applyToCanvas"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="canvas" type="android.graphics.Canvas">
+</parameter>
+</method>
+<method name="dotWithNormal"
+ return="float"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="dx" type="float">
+</parameter>
+<parameter name="dy" type="float">
+</parameter>
+<parameter name="dz" type="float">
+</parameter>
+</method>
+<method name="getMatrix"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="matrix" type="android.graphics.Matrix">
+</parameter>
+</method>
+<method name="restore"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="rotateX"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="deg" type="float">
+</parameter>
+</method>
+<method name="rotateY"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="deg" type="float">
+</parameter>
+</method>
+<method name="rotateZ"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="deg" type="float">
+</parameter>
+</method>
+<method name="save"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="translate"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="x" type="float">
+</parameter>
+<parameter name="y" type="float">
+</parameter>
+<parameter name="z" type="float">
+</parameter>
+</method>
+</class>
+<class name="Canvas"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="Canvas"
+ type="android.graphics.Canvas"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<constructor name="Canvas"
+ type="android.graphics.Canvas"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="bitmap" type="android.graphics.Bitmap">
+</parameter>
+</constructor>
+<constructor name="Canvas"
+ type="android.graphics.Canvas"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="gl" type="javax.microedition.khronos.opengles.GL">
+</parameter>
+</constructor>
+<method name="clipPath"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="path" type="android.graphics.Path">
+</parameter>
+<parameter name="op" type="android.graphics.Region.Op">
+</parameter>
+</method>
+<method name="clipPath"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="path" type="android.graphics.Path">
+</parameter>
+</method>
+<method name="clipRect"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="rect" type="android.graphics.RectF">
+</parameter>
+<parameter name="op" type="android.graphics.Region.Op">
+</parameter>
+</method>
+<method name="clipRect"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="rect" type="android.graphics.Rect">
+</parameter>
+<parameter name="op" type="android.graphics.Region.Op">
+</parameter>
+</method>
+<method name="clipRect"
+ return="boolean"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="rect" type="android.graphics.RectF">
+</parameter>
+</method>
+<method name="clipRect"
+ return="boolean"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="rect" type="android.graphics.Rect">
+</parameter>
+</method>
+<method name="clipRect"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="left" type="float">
+</parameter>
+<parameter name="top" type="float">
+</parameter>
+<parameter name="right" type="float">
+</parameter>
+<parameter name="bottom" type="float">
+</parameter>
+<parameter name="op" type="android.graphics.Region.Op">
+</parameter>
+</method>
+<method name="clipRect"
+ return="boolean"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="left" type="float">
+</parameter>
+<parameter name="top" type="float">
+</parameter>
+<parameter name="right" type="float">
+</parameter>
+<parameter name="bottom" type="float">
+</parameter>
+</method>
+<method name="clipRect"
+ return="boolean"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="left" type="int">
+</parameter>
+<parameter name="top" type="int">
+</parameter>
+<parameter name="right" type="int">
+</parameter>
+<parameter name="bottom" type="int">
+</parameter>
+</method>
+<method name="clipRegion"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="region" type="android.graphics.Region">
+</parameter>
+<parameter name="op" type="android.graphics.Region.Op">
+</parameter>
+</method>
+<method name="clipRegion"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="region" type="android.graphics.Region">
+</parameter>
+</method>
+<method name="concat"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="matrix" type="android.graphics.Matrix">
+</parameter>
+</method>
+<method name="drawARGB"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="a" type="int">
+</parameter>
+<parameter name="r" type="int">
+</parameter>
+<parameter name="g" type="int">
+</parameter>
+<parameter name="b" type="int">
+</parameter>
+</method>
+<method name="drawArc"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="oval" type="android.graphics.RectF">
+</parameter>
+<parameter name="startAngle" type="float">
+</parameter>
+<parameter name="sweepAngle" type="float">
+</parameter>
+<parameter name="useCenter" type="boolean">
+</parameter>
+<parameter name="paint" type="android.graphics.Paint">
+</parameter>
+</method>
+<method name="drawBitmap"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="bitmap" type="android.graphics.Bitmap">
+</parameter>
+<parameter name="left" type="float">
+</parameter>
+<parameter name="top" type="float">
+</parameter>
+<parameter name="paint" type="android.graphics.Paint">
+</parameter>
+</method>
+<method name="drawBitmap"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="bitmap" type="android.graphics.Bitmap">
+</parameter>
+<parameter name="src" type="android.graphics.Rect">
+</parameter>
+<parameter name="dst" type="android.graphics.RectF">
+</parameter>
+<parameter name="paint" type="android.graphics.Paint">
+</parameter>
+</method>
+<method name="drawBitmap"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="bitmap" type="android.graphics.Bitmap">
+</parameter>
+<parameter name="src" type="android.graphics.Rect">
+</parameter>
+<parameter name="dst" type="android.graphics.Rect">
+</parameter>
+<parameter name="paint" type="android.graphics.Paint">
+</parameter>
+</method>
+<method name="drawBitmap"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="colors" type="int[]">
+</parameter>
+<parameter name="offset" type="int">
+</parameter>
+<parameter name="stride" type="int">
+</parameter>
+<parameter name="x" type="float">
+</parameter>
+<parameter name="y" type="float">
+</parameter>
+<parameter name="width" type="int">
+</parameter>
+<parameter name="height" type="int">
+</parameter>
+<parameter name="hasAlpha" type="boolean">
+</parameter>
+<parameter name="paint" type="android.graphics.Paint">
+</parameter>
+</method>
+<method name="drawBitmap"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="colors" type="int[]">
+</parameter>
+<parameter name="offset" type="int">
+</parameter>
+<parameter name="stride" type="int">
+</parameter>
+<parameter name="x" type="int">
+</parameter>
+<parameter name="y" type="int">
+</parameter>
+<parameter name="width" type="int">
+</parameter>
+<parameter name="height" type="int">
+</parameter>
+<parameter name="hasAlpha" type="boolean">
+</parameter>
+<parameter name="paint" type="android.graphics.Paint">
+</parameter>
+</method>
+<method name="drawBitmap"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="bitmap" type="android.graphics.Bitmap">
+</parameter>
+<parameter name="matrix" type="android.graphics.Matrix">
+</parameter>
+<parameter name="paint" type="android.graphics.Paint">
+</parameter>
+</method>
+<method name="drawBitmapMesh"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="bitmap" type="android.graphics.Bitmap">
+</parameter>
+<parameter name="meshWidth" type="int">
+</parameter>
+<parameter name="meshHeight" type="int">
+</parameter>
+<parameter name="verts" type="float[]">
+</parameter>
+<parameter name="vertOffset" type="int">
+</parameter>
+<parameter name="colors" type="int[]">
+</parameter>
+<parameter name="colorOffset" type="int">
+</parameter>
+<parameter name="paint" type="android.graphics.Paint">
+</parameter>
+</method>
+<method name="drawCircle"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="cx" type="float">
+</parameter>
+<parameter name="cy" type="float">
+</parameter>
+<parameter name="radius" type="float">
+</parameter>
+<parameter name="paint" type="android.graphics.Paint">
+</parameter>
+</method>
+<method name="drawColor"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="color" type="int">
+</parameter>
+</method>
+<method name="drawColor"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="color" type="int">
+</parameter>
+<parameter name="mode" type="android.graphics.PorterDuff.Mode">
+</parameter>
+</method>
+<method name="drawLine"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="startX" type="float">
+</parameter>
+<parameter name="startY" type="float">
+</parameter>
+<parameter name="stopX" type="float">
+</parameter>
+<parameter name="stopY" type="float">
+</parameter>
+<parameter name="paint" type="android.graphics.Paint">
+</parameter>
+</method>
+<method name="drawLines"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="pts" type="float[]">
+</parameter>
+<parameter name="offset" type="int">
+</parameter>
+<parameter name="count" type="int">
+</parameter>
+<parameter name="paint" type="android.graphics.Paint">
+</parameter>
+</method>
+<method name="drawLines"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="pts" type="float[]">
+</parameter>
+<parameter name="paint" type="android.graphics.Paint">
+</parameter>
+</method>
+<method name="drawOval"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="oval" type="android.graphics.RectF">
+</parameter>
+<parameter name="paint" type="android.graphics.Paint">
+</parameter>
+</method>
+<method name="drawPaint"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="paint" type="android.graphics.Paint">
+</parameter>
+</method>
+<method name="drawPath"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="path" type="android.graphics.Path">
+</parameter>
+<parameter name="paint" type="android.graphics.Paint">
+</parameter>
+</method>
+<method name="drawPicture"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="picture" type="android.graphics.Picture">
+</parameter>
+</method>
+<method name="drawPicture"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="picture" type="android.graphics.Picture">
+</parameter>
+<parameter name="dst" type="android.graphics.RectF">
+</parameter>
+</method>
+<method name="drawPicture"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="picture" type="android.graphics.Picture">
+</parameter>
+<parameter name="dst" type="android.graphics.Rect">
+</parameter>
+</method>
+<method name="drawPoint"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="x" type="float">
+</parameter>
+<parameter name="y" type="float">
+</parameter>
+<parameter name="paint" type="android.graphics.Paint">
+</parameter>
+</method>
+<method name="drawPoints"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="pts" type="float[]">
+</parameter>
+<parameter name="offset" type="int">
+</parameter>
+<parameter name="count" type="int">
+</parameter>
+<parameter name="paint" type="android.graphics.Paint">
+</parameter>
+</method>
+<method name="drawPoints"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="pts" type="float[]">
+</parameter>
+<parameter name="paint" type="android.graphics.Paint">
+</parameter>
+</method>
+<method name="drawPosText"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="text" type="char[]">
+</parameter>
+<parameter name="index" type="int">
+</parameter>
+<parameter name="count" type="int">
+</parameter>
+<parameter name="pos" type="float[]">
+</parameter>
+<parameter name="paint" type="android.graphics.Paint">
+</parameter>
+</method>
+<method name="drawPosText"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="text" type="java.lang.String">
+</parameter>
+<parameter name="pos" type="float[]">
+</parameter>
+<parameter name="paint" type="android.graphics.Paint">
+</parameter>
+</method>
+<method name="drawRGB"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="r" type="int">
+</parameter>
+<parameter name="g" type="int">
+</parameter>
+<parameter name="b" type="int">
+</parameter>
+</method>
+<method name="drawRect"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="rect" type="android.graphics.RectF">
+</parameter>
+<parameter name="paint" type="android.graphics.Paint">
+</parameter>
+</method>
+<method name="drawRect"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="r" type="android.graphics.Rect">
+</parameter>
+<parameter name="paint" type="android.graphics.Paint">
+</parameter>
+</method>
+<method name="drawRect"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="left" type="float">
+</parameter>
+<parameter name="top" type="float">
+</parameter>
+<parameter name="right" type="float">
+</parameter>
+<parameter name="bottom" type="float">
+</parameter>
+<parameter name="paint" type="android.graphics.Paint">
+</parameter>
+</method>
+<method name="drawRoundRect"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="rect" type="android.graphics.RectF">
+</parameter>
+<parameter name="rx" type="float">
+</parameter>
+<parameter name="ry" type="float">
+</parameter>
+<parameter name="paint" type="android.graphics.Paint">
+</parameter>
+</method>
+<method name="drawText"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="text" type="char[]">
+</parameter>
+<parameter name="index" type="int">
+</parameter>
+<parameter name="count" type="int">
+</parameter>
+<parameter name="x" type="float">
+</parameter>
+<parameter name="y" type="float">
+</parameter>
+<parameter name="paint" type="android.graphics.Paint">
+</parameter>
+</method>
+<method name="drawText"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="text" type="java.lang.String">
+</parameter>
+<parameter name="x" type="float">
+</parameter>
+<parameter name="y" type="float">
+</parameter>
+<parameter name="paint" type="android.graphics.Paint">
+</parameter>
+</method>
+<method name="drawText"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="text" type="java.lang.String">
+</parameter>
+<parameter name="start" type="int">
+</parameter>
+<parameter name="end" type="int">
+</parameter>
+<parameter name="x" type="float">
+</parameter>
+<parameter name="y" type="float">
+</parameter>
+<parameter name="paint" type="android.graphics.Paint">
+</parameter>
+</method>
+<method name="drawText"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="text" type="java.lang.CharSequence">
+</parameter>
+<parameter name="start" type="int">
+</parameter>
+<parameter name="end" type="int">
+</parameter>
+<parameter name="x" type="float">
+</parameter>
+<parameter name="y" type="float">
+</parameter>
+<parameter name="paint" type="android.graphics.Paint">
+</parameter>
+</method>
+<method name="drawTextOnPath"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="text" type="char[]">
+</parameter>
+<parameter name="index" type="int">
+</parameter>
+<parameter name="count" type="int">
+</parameter>
+<parameter name="path" type="android.graphics.Path">
+</parameter>
+<parameter name="hOffset" type="float">
+</parameter>
+<parameter name="vOffset" type="float">
+</parameter>
+<parameter name="paint" type="android.graphics.Paint">
+</parameter>
+</method>
+<method name="drawTextOnPath"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="text" type="java.lang.String">
+</parameter>
+<parameter name="path" type="android.graphics.Path">
+</parameter>
+<parameter name="hOffset" type="float">
+</parameter>
+<parameter name="vOffset" type="float">
+</parameter>
+<parameter name="paint" type="android.graphics.Paint">
+</parameter>
+</method>
+<method name="drawVertices"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="mode" type="android.graphics.Canvas.VertexMode">
+</parameter>
+<parameter name="vertexCount" type="int">
+</parameter>
+<parameter name="verts" type="float[]">
+</parameter>
+<parameter name="vertOffset" type="int">
+</parameter>
+<parameter name="texs" type="float[]">
+</parameter>
+<parameter name="texOffset" type="int">
+</parameter>
+<parameter name="colors" type="int[]">
+</parameter>
+<parameter name="colorOffset" type="int">
+</parameter>
+<parameter name="indices" type="short[]">
+</parameter>
+<parameter name="indexOffset" type="int">
+</parameter>
+<parameter name="indexCount" type="int">
+</parameter>
+<parameter name="paint" type="android.graphics.Paint">
+</parameter>
+</method>
+<method name="freeGlCaches"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getClipBounds"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="bounds" type="android.graphics.Rect">
+</parameter>
+</method>
+<method name="getClipBounds"
+ return="android.graphics.Rect"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getDensity"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getDrawFilter"
+ return="android.graphics.DrawFilter"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getGL"
+ return="javax.microedition.khronos.opengles.GL"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getHeight"
+ return="int"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getMatrix"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="ctm" type="android.graphics.Matrix">
+</parameter>
+</method>
+<method name="getMatrix"
+ return="android.graphics.Matrix"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getSaveCount"
+ return="int"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getWidth"
+ return="int"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isOpaque"
+ return="boolean"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="quickReject"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="rect" type="android.graphics.RectF">
+</parameter>
+<parameter name="type" type="android.graphics.Canvas.EdgeType">
+</parameter>
+</method>
+<method name="quickReject"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="path" type="android.graphics.Path">
+</parameter>
+<parameter name="type" type="android.graphics.Canvas.EdgeType">
+</parameter>
+</method>
+<method name="quickReject"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="left" type="float">
+</parameter>
+<parameter name="top" type="float">
+</parameter>
+<parameter name="right" type="float">
+</parameter>
+<parameter name="bottom" type="float">
+</parameter>
+<parameter name="type" type="android.graphics.Canvas.EdgeType">
+</parameter>
+</method>
+<method name="restore"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="restoreToCount"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="saveCount" type="int">
+</parameter>
+</method>
+<method name="rotate"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="degrees" type="float">
+</parameter>
+</method>
+<method name="rotate"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="degrees" type="float">
+</parameter>
+<parameter name="px" type="float">
+</parameter>
+<parameter name="py" type="float">
+</parameter>
+</method>
+<method name="save"
+ return="int"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="save"
+ return="int"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="saveFlags" type="int">
+</parameter>
+</method>
+<method name="saveLayer"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="bounds" type="android.graphics.RectF">
+</parameter>
+<parameter name="paint" type="android.graphics.Paint">
+</parameter>
+<parameter name="saveFlags" type="int">
+</parameter>
+</method>
+<method name="saveLayer"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="left" type="float">
+</parameter>
+<parameter name="top" type="float">
+</parameter>
+<parameter name="right" type="float">
+</parameter>
+<parameter name="bottom" type="float">
+</parameter>
+<parameter name="paint" type="android.graphics.Paint">
+</parameter>
+<parameter name="saveFlags" type="int">
+</parameter>
+</method>
+<method name="saveLayerAlpha"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="bounds" type="android.graphics.RectF">
+</parameter>
+<parameter name="alpha" type="int">
+</parameter>
+<parameter name="saveFlags" type="int">
+</parameter>
+</method>
+<method name="saveLayerAlpha"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="left" type="float">
+</parameter>
+<parameter name="top" type="float">
+</parameter>
+<parameter name="right" type="float">
+</parameter>
+<parameter name="bottom" type="float">
+</parameter>
+<parameter name="alpha" type="int">
+</parameter>
+<parameter name="saveFlags" type="int">
+</parameter>
+</method>
+<method name="scale"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="sx" type="float">
+</parameter>
+<parameter name="sy" type="float">
+</parameter>
+</method>
+<method name="scale"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="sx" type="float">
+</parameter>
+<parameter name="sy" type="float">
+</parameter>
+<parameter name="px" type="float">
+</parameter>
+<parameter name="py" type="float">
+</parameter>
+</method>
+<method name="setBitmap"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="bitmap" type="android.graphics.Bitmap">
+</parameter>
+</method>
+<method name="setDensity"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="density" type="int">
+</parameter>
+</method>
+<method name="setDrawFilter"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="filter" type="android.graphics.DrawFilter">
+</parameter>
+</method>
+<method name="setMatrix"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="matrix" type="android.graphics.Matrix">
+</parameter>
+</method>
+<method name="setViewport"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="width" type="int">
+</parameter>
+<parameter name="height" type="int">
+</parameter>
+</method>
+<method name="skew"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="sx" type="float">
+</parameter>
+<parameter name="sy" type="float">
+</parameter>
+</method>
+<method name="translate"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="dx" type="float">
+</parameter>
+<parameter name="dy" type="float">
+</parameter>
+</method>
+<field name="ALL_SAVE_FLAG"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="31"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="CLIP_SAVE_FLAG"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="CLIP_TO_LAYER_SAVE_FLAG"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="FULL_COLOR_LAYER_SAVE_FLAG"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="8"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="HAS_ALPHA_LAYER_SAVE_FLAG"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="4"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="MATRIX_SAVE_FLAG"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<class name="Canvas.EdgeType"
+ extends="java.lang.Enum"
+ abstract="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="valueOf"
+ return="android.graphics.Canvas.EdgeType"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+</method>
+<method name="values"
+ return="android.graphics.Canvas.EdgeType[]"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+</class>
+<class name="Canvas.VertexMode"
+ extends="java.lang.Enum"
+ abstract="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="valueOf"
+ return="android.graphics.Canvas.VertexMode"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+</method>
+<method name="values"
+ return="android.graphics.Canvas.VertexMode[]"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+</class>
+<class name="Color"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="Color"
+ type="android.graphics.Color"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<method name="HSVToColor"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="hsv" type="float[]">
+</parameter>
+</method>
+<method name="HSVToColor"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="alpha" type="int">
+</parameter>
+<parameter name="hsv" type="float[]">
+</parameter>
+</method>
+<method name="RGBToHSV"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="red" type="int">
+</parameter>
+<parameter name="green" type="int">
+</parameter>
+<parameter name="blue" type="int">
+</parameter>
+<parameter name="hsv" type="float[]">
+</parameter>
+</method>
+<method name="alpha"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="color" type="int">
+</parameter>
+</method>
+<method name="argb"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="alpha" type="int">
+</parameter>
+<parameter name="red" type="int">
+</parameter>
+<parameter name="green" type="int">
+</parameter>
+<parameter name="blue" type="int">
+</parameter>
+</method>
+<method name="blue"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="color" type="int">
+</parameter>
+</method>
+<method name="colorToHSV"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="color" type="int">
+</parameter>
+<parameter name="hsv" type="float[]">
+</parameter>
+</method>
+<method name="green"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="color" type="int">
+</parameter>
+</method>
+<method name="parseColor"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="colorString" type="java.lang.String">
+</parameter>
+</method>
+<method name="red"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="color" type="int">
+</parameter>
+</method>
+<method name="rgb"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="red" type="int">
+</parameter>
+<parameter name="green" type="int">
+</parameter>
+<parameter name="blue" type="int">
+</parameter>
+</method>
+<field name="BLACK"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="-16777216"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="BLUE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="-16776961"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="CYAN"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="-16711681"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="DKGRAY"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="-12303292"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GRAY"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="-7829368"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GREEN"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="-16711936"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="LTGRAY"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="-3355444"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="MAGENTA"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="-65281"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="RED"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="-65536"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TRANSPARENT"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="0"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="WHITE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="-1"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="YELLOW"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="-256"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<class name="ColorFilter"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="ColorFilter"
+ type="android.graphics.ColorFilter"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+</class>
+<class name="ColorMatrix"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="ColorMatrix"
+ type="android.graphics.ColorMatrix"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<constructor name="ColorMatrix"
+ type="android.graphics.ColorMatrix"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="src" type="float[]">
+</parameter>
+</constructor>
+<constructor name="ColorMatrix"
+ type="android.graphics.ColorMatrix"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="src" type="android.graphics.ColorMatrix">
+</parameter>
+</constructor>
+<method name="getArray"
+ return="float[]"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="postConcat"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="postmatrix" type="android.graphics.ColorMatrix">
+</parameter>
+</method>
+<method name="preConcat"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="prematrix" type="android.graphics.ColorMatrix">
+</parameter>
+</method>
+<method name="reset"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="set"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="src" type="android.graphics.ColorMatrix">
+</parameter>
+</method>
+<method name="set"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="src" type="float[]">
+</parameter>
+</method>
+<method name="setConcat"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="matA" type="android.graphics.ColorMatrix">
+</parameter>
+<parameter name="matB" type="android.graphics.ColorMatrix">
+</parameter>
+</method>
+<method name="setRGB2YUV"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="setRotate"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="axis" type="int">
+</parameter>
+<parameter name="degrees" type="float">
+</parameter>
+</method>
+<method name="setSaturation"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="sat" type="float">
+</parameter>
+</method>
+<method name="setScale"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="rScale" type="float">
+</parameter>
+<parameter name="gScale" type="float">
+</parameter>
+<parameter name="bScale" type="float">
+</parameter>
+<parameter name="aScale" type="float">
+</parameter>
+</method>
+<method name="setYUV2RGB"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+</class>
+<class name="ColorMatrixColorFilter"
+ extends="android.graphics.ColorFilter"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="ColorMatrixColorFilter"
+ type="android.graphics.ColorMatrixColorFilter"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="matrix" type="android.graphics.ColorMatrix">
+</parameter>
+</constructor>
+<constructor name="ColorMatrixColorFilter"
+ type="android.graphics.ColorMatrixColorFilter"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="array" type="float[]">
+</parameter>
+</constructor>
+</class>
+<class name="ComposePathEffect"
+ extends="android.graphics.PathEffect"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="ComposePathEffect"
+ type="android.graphics.ComposePathEffect"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="outerpe" type="android.graphics.PathEffect">
+</parameter>
+<parameter name="innerpe" type="android.graphics.PathEffect">
+</parameter>
+</constructor>
+</class>
+<class name="ComposeShader"
+ extends="android.graphics.Shader"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="ComposeShader"
+ type="android.graphics.ComposeShader"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="shaderA" type="android.graphics.Shader">
+</parameter>
+<parameter name="shaderB" type="android.graphics.Shader">
+</parameter>
+<parameter name="mode" type="android.graphics.Xfermode">
+</parameter>
+</constructor>
+<constructor name="ComposeShader"
+ type="android.graphics.ComposeShader"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="shaderA" type="android.graphics.Shader">
+</parameter>
+<parameter name="shaderB" type="android.graphics.Shader">
+</parameter>
+<parameter name="mode" type="android.graphics.PorterDuff.Mode">
+</parameter>
+</constructor>
+</class>
+<class name="CornerPathEffect"
+ extends="android.graphics.PathEffect"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="CornerPathEffect"
+ type="android.graphics.CornerPathEffect"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="radius" type="float">
+</parameter>
+</constructor>
+</class>
+<class name="DashPathEffect"
+ extends="android.graphics.PathEffect"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="DashPathEffect"
+ type="android.graphics.DashPathEffect"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="intervals" type="float[]">
+</parameter>
+<parameter name="phase" type="float">
+</parameter>
+</constructor>
+</class>
+<class name="DiscretePathEffect"
+ extends="android.graphics.PathEffect"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="DiscretePathEffect"
+ type="android.graphics.DiscretePathEffect"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="segmentLength" type="float">
+</parameter>
+<parameter name="deviation" type="float">
+</parameter>
+</constructor>
+</class>
+<class name="DrawFilter"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="DrawFilter"
+ type="android.graphics.DrawFilter"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+</class>
+<class name="EmbossMaskFilter"
+ extends="android.graphics.MaskFilter"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="EmbossMaskFilter"
+ type="android.graphics.EmbossMaskFilter"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="direction" type="float[]">
+</parameter>
+<parameter name="ambient" type="float">
+</parameter>
+<parameter name="specular" type="float">
+</parameter>
+<parameter name="blurRadius" type="float">
+</parameter>
+</constructor>
+</class>
+<class name="ImageFormat"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="ImageFormat"
+ type="android.graphics.ImageFormat"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<method name="getBitsPerPixel"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="format" type="int">
+</parameter>
+</method>
+<field name="JPEG"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="256"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="NV16"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="NV21"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="17"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="RGB_565"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="4"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="UNKNOWN"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="0"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="YUY2"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="20"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<class name="Interpolator"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="Interpolator"
+ type="android.graphics.Interpolator"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="valueCount" type="int">
+</parameter>
+</constructor>
+<constructor name="Interpolator"
+ type="android.graphics.Interpolator"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="valueCount" type="int">
+</parameter>
+<parameter name="frameCount" type="int">
+</parameter>
+</constructor>
+<method name="getKeyFrameCount"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getValueCount"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="reset"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="valueCount" type="int">
+</parameter>
+</method>
+<method name="reset"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="valueCount" type="int">
+</parameter>
+<parameter name="frameCount" type="int">
+</parameter>
+</method>
+<method name="setKeyFrame"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="index" type="int">
+</parameter>
+<parameter name="msec" type="int">
+</parameter>
+<parameter name="values" type="float[]">
+</parameter>
+</method>
+<method name="setKeyFrame"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="index" type="int">
+</parameter>
+<parameter name="msec" type="int">
+</parameter>
+<parameter name="values" type="float[]">
+</parameter>
+<parameter name="blend" type="float[]">
+</parameter>
+</method>
+<method name="setRepeatMirror"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="repeatCount" type="float">
+</parameter>
+<parameter name="mirror" type="boolean">
+</parameter>
+</method>
+<method name="timeToValues"
+ return="android.graphics.Interpolator.Result"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="values" type="float[]">
+</parameter>
+</method>
+<method name="timeToValues"
+ return="android.graphics.Interpolator.Result"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="msec" type="int">
+</parameter>
+<parameter name="values" type="float[]">
+</parameter>
+</method>
+</class>
+<class name="Interpolator.Result"
+ extends="java.lang.Enum"
+ abstract="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="valueOf"
+ return="android.graphics.Interpolator.Result"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+</method>
+<method name="values"
+ return="android.graphics.Interpolator.Result[]"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+</class>
+<class name="LayerRasterizer"
+ extends="android.graphics.Rasterizer"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="LayerRasterizer"
+ type="android.graphics.LayerRasterizer"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<method name="addLayer"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="paint" type="android.graphics.Paint">
+</parameter>
+<parameter name="dx" type="float">
+</parameter>
+<parameter name="dy" type="float">
+</parameter>
+</method>
+<method name="addLayer"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="paint" type="android.graphics.Paint">
+</parameter>
+</method>
+</class>
+<class name="LightingColorFilter"
+ extends="android.graphics.ColorFilter"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="LightingColorFilter"
+ type="android.graphics.LightingColorFilter"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="mul" type="int">
+</parameter>
+<parameter name="add" type="int">
+</parameter>
+</constructor>
+</class>
+<class name="LinearGradient"
+ extends="android.graphics.Shader"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="LinearGradient"
+ type="android.graphics.LinearGradient"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="x0" type="float">
+</parameter>
+<parameter name="y0" type="float">
+</parameter>
+<parameter name="x1" type="float">
+</parameter>
+<parameter name="y1" type="float">
+</parameter>
+<parameter name="colors" type="int[]">
+</parameter>
+<parameter name="positions" type="float[]">
+</parameter>
+<parameter name="tile" type="android.graphics.Shader.TileMode">
+</parameter>
+</constructor>
+<constructor name="LinearGradient"
+ type="android.graphics.LinearGradient"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="x0" type="float">
+</parameter>
+<parameter name="y0" type="float">
+</parameter>
+<parameter name="x1" type="float">
+</parameter>
+<parameter name="y1" type="float">
+</parameter>
+<parameter name="color0" type="int">
+</parameter>
+<parameter name="color1" type="int">
+</parameter>
+<parameter name="tile" type="android.graphics.Shader.TileMode">
+</parameter>
+</constructor>
+</class>
+<class name="MaskFilter"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="MaskFilter"
+ type="android.graphics.MaskFilter"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+</class>
+<class name="Matrix"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="Matrix"
+ type="android.graphics.Matrix"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<constructor name="Matrix"
+ type="android.graphics.Matrix"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="src" type="android.graphics.Matrix">
+</parameter>
+</constructor>
+<method name="getValues"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="values" type="float[]">
+</parameter>
+</method>
+<method name="invert"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="inverse" type="android.graphics.Matrix">
+</parameter>
+</method>
+<method name="isIdentity"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="mapPoints"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="dst" type="float[]">
+</parameter>
+<parameter name="dstIndex" type="int">
+</parameter>
+<parameter name="src" type="float[]">
+</parameter>
+<parameter name="srcIndex" type="int">
+</parameter>
+<parameter name="pointCount" type="int">
+</parameter>
+</method>
+<method name="mapPoints"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="dst" type="float[]">
+</parameter>
+<parameter name="src" type="float[]">
+</parameter>
+</method>
+<method name="mapPoints"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="pts" type="float[]">
+</parameter>
+</method>
+<method name="mapRadius"
+ return="float"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="radius" type="float">
+</parameter>
+</method>
+<method name="mapRect"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="dst" type="android.graphics.RectF">
+</parameter>
+<parameter name="src" type="android.graphics.RectF">
+</parameter>
+</method>
+<method name="mapRect"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="rect" type="android.graphics.RectF">
+</parameter>
+</method>
+<method name="mapVectors"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="dst" type="float[]">
+</parameter>
+<parameter name="dstIndex" type="int">
+</parameter>
+<parameter name="src" type="float[]">
+</parameter>
+<parameter name="srcIndex" type="int">
+</parameter>
+<parameter name="vectorCount" type="int">
+</parameter>
+</method>
+<method name="mapVectors"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="dst" type="float[]">
+</parameter>
+<parameter name="src" type="float[]">
+</parameter>
+</method>
+<method name="mapVectors"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="vecs" type="float[]">
+</parameter>
+</method>
+<method name="postConcat"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="other" type="android.graphics.Matrix">
+</parameter>
+</method>
+<method name="postRotate"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="degrees" type="float">
+</parameter>
+<parameter name="px" type="float">
+</parameter>
+<parameter name="py" type="float">
+</parameter>
+</method>
+<method name="postRotate"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="degrees" type="float">
+</parameter>
+</method>
+<method name="postScale"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="sx" type="float">
+</parameter>
+<parameter name="sy" type="float">
+</parameter>
+<parameter name="px" type="float">
+</parameter>
+<parameter name="py" type="float">
+</parameter>
+</method>
+<method name="postScale"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="sx" type="float">
+</parameter>
+<parameter name="sy" type="float">
+</parameter>
+</method>
+<method name="postSkew"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="kx" type="float">
+</parameter>
+<parameter name="ky" type="float">
+</parameter>
+<parameter name="px" type="float">
+</parameter>
+<parameter name="py" type="float">
+</parameter>
+</method>
+<method name="postSkew"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="kx" type="float">
+</parameter>
+<parameter name="ky" type="float">
+</parameter>
+</method>
+<method name="postTranslate"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="dx" type="float">
+</parameter>
+<parameter name="dy" type="float">
+</parameter>
+</method>
+<method name="preConcat"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="other" type="android.graphics.Matrix">
+</parameter>
+</method>
+<method name="preRotate"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="degrees" type="float">
+</parameter>
+<parameter name="px" type="float">
+</parameter>
+<parameter name="py" type="float">
+</parameter>
+</method>
+<method name="preRotate"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="degrees" type="float">
+</parameter>
+</method>
+<method name="preScale"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="sx" type="float">
+</parameter>
+<parameter name="sy" type="float">
+</parameter>
+<parameter name="px" type="float">
+</parameter>
+<parameter name="py" type="float">
+</parameter>
+</method>
+<method name="preScale"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="sx" type="float">
+</parameter>
+<parameter name="sy" type="float">
+</parameter>
+</method>
+<method name="preSkew"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="kx" type="float">
+</parameter>
+<parameter name="ky" type="float">
+</parameter>
+<parameter name="px" type="float">
+</parameter>
+<parameter name="py" type="float">
+</parameter>
+</method>
+<method name="preSkew"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="kx" type="float">
+</parameter>
+<parameter name="ky" type="float">
+</parameter>
+</method>
+<method name="preTranslate"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="dx" type="float">
+</parameter>
+<parameter name="dy" type="float">
+</parameter>
+</method>
+<method name="rectStaysRect"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="reset"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="set"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="src" type="android.graphics.Matrix">
+</parameter>
+</method>
+<method name="setConcat"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="a" type="android.graphics.Matrix">
+</parameter>
+<parameter name="b" type="android.graphics.Matrix">
+</parameter>
+</method>
+<method name="setPolyToPoly"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="src" type="float[]">
+</parameter>
+<parameter name="srcIndex" type="int">
+</parameter>
+<parameter name="dst" type="float[]">
+</parameter>
+<parameter name="dstIndex" type="int">
+</parameter>
+<parameter name="pointCount" type="int">
+</parameter>
+</method>
+<method name="setRectToRect"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="src" type="android.graphics.RectF">
+</parameter>
+<parameter name="dst" type="android.graphics.RectF">
+</parameter>
+<parameter name="stf" type="android.graphics.Matrix.ScaleToFit">
+</parameter>
+</method>
+<method name="setRotate"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="degrees" type="float">
+</parameter>
+<parameter name="px" type="float">
+</parameter>
+<parameter name="py" type="float">
+</parameter>
+</method>
+<method name="setRotate"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="degrees" type="float">
+</parameter>
+</method>
+<method name="setScale"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="sx" type="float">
+</parameter>
+<parameter name="sy" type="float">
+</parameter>
+<parameter name="px" type="float">
+</parameter>
+<parameter name="py" type="float">
+</parameter>
+</method>
+<method name="setScale"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="sx" type="float">
+</parameter>
+<parameter name="sy" type="float">
+</parameter>
+</method>
+<method name="setSinCos"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="sinValue" type="float">
+</parameter>
+<parameter name="cosValue" type="float">
+</parameter>
+<parameter name="px" type="float">
+</parameter>
+<parameter name="py" type="float">
+</parameter>
+</method>
+<method name="setSinCos"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="sinValue" type="float">
+</parameter>
+<parameter name="cosValue" type="float">
+</parameter>
+</method>
+<method name="setSkew"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="kx" type="float">
+</parameter>
+<parameter name="ky" type="float">
+</parameter>
+<parameter name="px" type="float">
+</parameter>
+<parameter name="py" type="float">
+</parameter>
+</method>
+<method name="setSkew"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="kx" type="float">
+</parameter>
+<parameter name="ky" type="float">
+</parameter>
+</method>
+<method name="setTranslate"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="dx" type="float">
+</parameter>
+<parameter name="dy" type="float">
+</parameter>
+</method>
+<method name="setValues"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="values" type="float[]">
+</parameter>
+</method>
+<method name="toShortString"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<field name="MPERSP_0"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="6"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="MPERSP_1"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="7"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="MPERSP_2"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="8"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="MSCALE_X"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="0"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="MSCALE_Y"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="4"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="MSKEW_X"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="MSKEW_Y"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="3"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="MTRANS_X"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="MTRANS_Y"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="5"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<class name="Matrix.ScaleToFit"
+ extends="java.lang.Enum"
+ abstract="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="valueOf"
+ return="android.graphics.Matrix.ScaleToFit"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+</method>
+<method name="values"
+ return="android.graphics.Matrix.ScaleToFit[]"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+</class>
+<class name="Movie"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="decodeByteArray"
+ return="android.graphics.Movie"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="data" type="byte[]">
+</parameter>
+<parameter name="offset" type="int">
+</parameter>
+<parameter name="length" type="int">
+</parameter>
+</method>
+<method name="decodeFile"
+ return="android.graphics.Movie"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="pathName" type="java.lang.String">
+</parameter>
+</method>
+<method name="decodeStream"
+ return="android.graphics.Movie"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="is" type="java.io.InputStream">
+</parameter>
+</method>
+<method name="draw"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="canvas" type="android.graphics.Canvas">
+</parameter>
+<parameter name="x" type="float">
+</parameter>
+<parameter name="y" type="float">
+</parameter>
+<parameter name="paint" type="android.graphics.Paint">
+</parameter>
+</method>
+<method name="draw"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="canvas" type="android.graphics.Canvas">
+</parameter>
+<parameter name="x" type="float">
+</parameter>
+<parameter name="y" type="float">
+</parameter>
+</method>
+<method name="duration"
+ return="int"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="height"
+ return="int"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isOpaque"
+ return="boolean"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="setTime"
+ return="boolean"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="relativeMilliseconds" type="int">
+</parameter>
+</method>
+<method name="width"
+ return="int"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+</class>
+<class name="NinePatch"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="NinePatch"
+ type="android.graphics.NinePatch"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="bitmap" type="android.graphics.Bitmap">
+</parameter>
+<parameter name="chunk" type="byte[]">
+</parameter>
+<parameter name="srcName" type="java.lang.String">
+</parameter>
+</constructor>
+<method name="draw"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="canvas" type="android.graphics.Canvas">
+</parameter>
+<parameter name="location" type="android.graphics.RectF">
+</parameter>
+</method>
+<method name="draw"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="canvas" type="android.graphics.Canvas">
+</parameter>
+<parameter name="location" type="android.graphics.Rect">
+</parameter>
+</method>
+<method name="draw"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="canvas" type="android.graphics.Canvas">
+</parameter>
+<parameter name="location" type="android.graphics.Rect">
+</parameter>
+<parameter name="paint" type="android.graphics.Paint">
+</parameter>
+</method>
+<method name="getDensity"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getHeight"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getTransparentRegion"
+ return="android.graphics.Region"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="location" type="android.graphics.Rect">
+</parameter>
+</method>
+<method name="getWidth"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="hasAlpha"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isNinePatchChunk"
+ return="boolean"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="chunk" type="byte[]">
+</parameter>
+</method>
+<method name="setPaint"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="p" type="android.graphics.Paint">
+</parameter>
+</method>
+</class>
+<class name="Paint"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="Paint"
+ type="android.graphics.Paint"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<constructor name="Paint"
+ type="android.graphics.Paint"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="flags" type="int">
+</parameter>
+</constructor>
+<constructor name="Paint"
+ type="android.graphics.Paint"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="paint" type="android.graphics.Paint">
+</parameter>
+</constructor>
+<method name="ascent"
+ return="float"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="breakText"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="text" type="char[]">
+</parameter>
+<parameter name="index" type="int">
+</parameter>
+<parameter name="count" type="int">
+</parameter>
+<parameter name="maxWidth" type="float">
+</parameter>
+<parameter name="measuredWidth" type="float[]">
+</parameter>
+</method>
+<method name="breakText"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="text" type="java.lang.CharSequence">
+</parameter>
+<parameter name="start" type="int">
+</parameter>
+<parameter name="end" type="int">
+</parameter>
+<parameter name="measureForwards" type="boolean">
+</parameter>
+<parameter name="maxWidth" type="float">
+</parameter>
+<parameter name="measuredWidth" type="float[]">
+</parameter>
+</method>
+<method name="breakText"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="text" type="java.lang.String">
+</parameter>
+<parameter name="measureForwards" type="boolean">
+</parameter>
+<parameter name="maxWidth" type="float">
+</parameter>
+<parameter name="measuredWidth" type="float[]">
+</parameter>
+</method>
+<method name="clearShadowLayer"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="descent"
+ return="float"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getAlpha"
+ return="int"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getColor"
+ return="int"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getColorFilter"
+ return="android.graphics.ColorFilter"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getFillPath"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="src" type="android.graphics.Path">
+</parameter>
+<parameter name="dst" type="android.graphics.Path">
+</parameter>
+</method>
+<method name="getFlags"
+ return="int"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getFontMetrics"
+ return="float"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="metrics" type="android.graphics.Paint.FontMetrics">
+</parameter>
+</method>
+<method name="getFontMetrics"
+ return="android.graphics.Paint.FontMetrics"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getFontMetricsInt"
+ return="int"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="fmi" type="android.graphics.Paint.FontMetricsInt">
+</parameter>
+</method>
+<method name="getFontMetricsInt"
+ return="android.graphics.Paint.FontMetricsInt"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getFontSpacing"
+ return="float"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getMaskFilter"
+ return="android.graphics.MaskFilter"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getPathEffect"
+ return="android.graphics.PathEffect"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getRasterizer"
+ return="android.graphics.Rasterizer"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getShader"
+ return="android.graphics.Shader"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getStrokeCap"
+ return="android.graphics.Paint.Cap"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getStrokeJoin"
+ return="android.graphics.Paint.Join"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getStrokeMiter"
+ return="float"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getStrokeWidth"
+ return="float"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getStyle"
+ return="android.graphics.Paint.Style"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getTextAlign"
+ return="android.graphics.Paint.Align"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getTextBounds"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="text" type="java.lang.String">
+</parameter>
+<parameter name="start" type="int">
+</parameter>
+<parameter name="end" type="int">
+</parameter>
+<parameter name="bounds" type="android.graphics.Rect">
+</parameter>
+</method>
+<method name="getTextBounds"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="text" type="char[]">
+</parameter>
+<parameter name="index" type="int">
+</parameter>
+<parameter name="count" type="int">
+</parameter>
+<parameter name="bounds" type="android.graphics.Rect">
+</parameter>
+</method>
+<method name="getTextPath"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="text" type="char[]">
+</parameter>
+<parameter name="index" type="int">
+</parameter>
+<parameter name="count" type="int">
+</parameter>
+<parameter name="x" type="float">
+</parameter>
+<parameter name="y" type="float">
+</parameter>
+<parameter name="path" type="android.graphics.Path">
+</parameter>
+</method>
+<method name="getTextPath"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="text" type="java.lang.String">
+</parameter>
+<parameter name="start" type="int">
+</parameter>
+<parameter name="end" type="int">
+</parameter>
+<parameter name="x" type="float">
+</parameter>
+<parameter name="y" type="float">
+</parameter>
+<parameter name="path" type="android.graphics.Path">
+</parameter>
+</method>
+<method name="getTextScaleX"
+ return="float"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getTextSize"
+ return="float"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getTextSkewX"
+ return="float"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getTextWidths"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="text" type="char[]">
+</parameter>
+<parameter name="index" type="int">
+</parameter>
+<parameter name="count" type="int">
+</parameter>
+<parameter name="widths" type="float[]">
+</parameter>
+</method>
+<method name="getTextWidths"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="text" type="java.lang.CharSequence">
+</parameter>
+<parameter name="start" type="int">
+</parameter>
+<parameter name="end" type="int">
+</parameter>
+<parameter name="widths" type="float[]">
+</parameter>
+</method>
+<method name="getTextWidths"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="text" type="java.lang.String">
+</parameter>
+<parameter name="start" type="int">
+</parameter>
+<parameter name="end" type="int">
+</parameter>
+<parameter name="widths" type="float[]">
+</parameter>
+</method>
+<method name="getTextWidths"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="text" type="java.lang.String">
+</parameter>
+<parameter name="widths" type="float[]">
+</parameter>
+</method>
+<method name="getTypeface"
+ return="android.graphics.Typeface"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getXfermode"
+ return="android.graphics.Xfermode"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isAntiAlias"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isDither"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isFakeBoldText"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isFilterBitmap"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isLinearText"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isStrikeThruText"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isSubpixelText"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isUnderlineText"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="measureText"
+ return="float"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="text" type="char[]">
+</parameter>
+<parameter name="index" type="int">
+</parameter>
+<parameter name="count" type="int">
+</parameter>
+</method>
+<method name="measureText"
+ return="float"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="text" type="java.lang.String">
+</parameter>
+<parameter name="start" type="int">
+</parameter>
+<parameter name="end" type="int">
+</parameter>
+</method>
+<method name="measureText"
+ return="float"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="text" type="java.lang.String">
+</parameter>
+</method>
+<method name="measureText"
+ return="float"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="text" type="java.lang.CharSequence">
+</parameter>
+<parameter name="start" type="int">
+</parameter>
+<parameter name="end" type="int">
+</parameter>
+</method>
+<method name="reset"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="set"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="src" type="android.graphics.Paint">
+</parameter>
+</method>
+<method name="setARGB"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="a" type="int">
+</parameter>
+<parameter name="r" type="int">
+</parameter>
+<parameter name="g" type="int">
+</parameter>
+<parameter name="b" type="int">
+</parameter>
+</method>
+<method name="setAlpha"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="a" type="int">
+</parameter>
+</method>
+<method name="setAntiAlias"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="aa" type="boolean">
+</parameter>
+</method>
+<method name="setColor"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="color" type="int">
+</parameter>
+</method>
+<method name="setColorFilter"
+ return="android.graphics.ColorFilter"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="filter" type="android.graphics.ColorFilter">
+</parameter>
+</method>
+<method name="setDither"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="dither" type="boolean">
+</parameter>
+</method>
+<method name="setFakeBoldText"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="fakeBoldText" type="boolean">
+</parameter>
+</method>
+<method name="setFilterBitmap"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="filter" type="boolean">
+</parameter>
+</method>
+<method name="setFlags"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="flags" type="int">
+</parameter>
+</method>
+<method name="setLinearText"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="linearText" type="boolean">
+</parameter>
+</method>
+<method name="setMaskFilter"
+ return="android.graphics.MaskFilter"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="maskfilter" type="android.graphics.MaskFilter">
+</parameter>
+</method>
+<method name="setPathEffect"
+ return="android.graphics.PathEffect"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="effect" type="android.graphics.PathEffect">
+</parameter>
+</method>
+<method name="setRasterizer"
+ return="android.graphics.Rasterizer"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="rasterizer" type="android.graphics.Rasterizer">
+</parameter>
+</method>
+<method name="setShader"
+ return="android.graphics.Shader"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="shader" type="android.graphics.Shader">
+</parameter>
+</method>
+<method name="setShadowLayer"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="radius" type="float">
+</parameter>
+<parameter name="dx" type="float">
+</parameter>
+<parameter name="dy" type="float">
+</parameter>
+<parameter name="color" type="int">
+</parameter>
+</method>
+<method name="setStrikeThruText"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="strikeThruText" type="boolean">
+</parameter>
+</method>
+<method name="setStrokeCap"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="cap" type="android.graphics.Paint.Cap">
+</parameter>
+</method>
+<method name="setStrokeJoin"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="join" type="android.graphics.Paint.Join">
+</parameter>
+</method>
+<method name="setStrokeMiter"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="miter" type="float">
+</parameter>
+</method>
+<method name="setStrokeWidth"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="width" type="float">
+</parameter>
+</method>
+<method name="setStyle"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="style" type="android.graphics.Paint.Style">
+</parameter>
+</method>
+<method name="setSubpixelText"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="subpixelText" type="boolean">
+</parameter>
+</method>
+<method name="setTextAlign"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="align" type="android.graphics.Paint.Align">
+</parameter>
+</method>
+<method name="setTextScaleX"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="scaleX" type="float">
+</parameter>
+</method>
+<method name="setTextSize"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="textSize" type="float">
+</parameter>
+</method>
+<method name="setTextSkewX"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="skewX" type="float">
+</parameter>
+</method>
+<method name="setTypeface"
+ return="android.graphics.Typeface"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="typeface" type="android.graphics.Typeface">
+</parameter>
+</method>
+<method name="setUnderlineText"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="underlineText" type="boolean">
+</parameter>
+</method>
+<method name="setXfermode"
+ return="android.graphics.Xfermode"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="xfermode" type="android.graphics.Xfermode">
+</parameter>
+</method>
+<field name="ANTI_ALIAS_FLAG"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="DEV_KERN_TEXT_FLAG"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="256"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="DITHER_FLAG"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="4"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="FAKE_BOLD_TEXT_FLAG"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="32"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="FILTER_BITMAP_FLAG"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="LINEAR_TEXT_FLAG"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="64"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="STRIKE_THRU_TEXT_FLAG"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="SUBPIXEL_TEXT_FLAG"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="128"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="UNDERLINE_TEXT_FLAG"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="8"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<class name="Paint.Align"
+ extends="java.lang.Enum"
+ abstract="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="valueOf"
+ return="android.graphics.Paint.Align"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+</method>
+<method name="values"
+ return="android.graphics.Paint.Align[]"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+</class>
+<class name="Paint.Cap"
+ extends="java.lang.Enum"
+ abstract="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="valueOf"
+ return="android.graphics.Paint.Cap"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+</method>
+<method name="values"
+ return="android.graphics.Paint.Cap[]"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+</class>
+<class name="Paint.FontMetrics"
+ extends="java.lang.Object"
+ abstract="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="Paint.FontMetrics"
+ type="android.graphics.Paint.FontMetrics"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<field name="ascent"
+ type="float"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="bottom"
+ type="float"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="descent"
+ type="float"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="leading"
+ type="float"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="top"
+ type="float"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<class name="Paint.FontMetricsInt"
+ extends="java.lang.Object"
+ abstract="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="Paint.FontMetricsInt"
+ type="android.graphics.Paint.FontMetricsInt"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<field name="ascent"
+ type="int"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="bottom"
+ type="int"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="descent"
+ type="int"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="leading"
+ type="int"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="top"
+ type="int"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<class name="Paint.Join"
+ extends="java.lang.Enum"
+ abstract="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="valueOf"
+ return="android.graphics.Paint.Join"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+</method>
+<method name="values"
+ return="android.graphics.Paint.Join[]"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+</class>
+<class name="Paint.Style"
+ extends="java.lang.Enum"
+ abstract="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="valueOf"
+ return="android.graphics.Paint.Style"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+</method>
+<method name="values"
+ return="android.graphics.Paint.Style[]"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+</class>
+<class name="PaintFlagsDrawFilter"
+ extends="android.graphics.DrawFilter"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="PaintFlagsDrawFilter"
+ type="android.graphics.PaintFlagsDrawFilter"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="clearBits" type="int">
+</parameter>
+<parameter name="setBits" type="int">
+</parameter>
+</constructor>
+</class>
+<class name="Path"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="Path"
+ type="android.graphics.Path"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<constructor name="Path"
+ type="android.graphics.Path"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="src" type="android.graphics.Path">
+</parameter>
+</constructor>
+<method name="addArc"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="oval" type="android.graphics.RectF">
+</parameter>
+<parameter name="startAngle" type="float">
+</parameter>
+<parameter name="sweepAngle" type="float">
+</parameter>
+</method>
+<method name="addCircle"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="x" type="float">
+</parameter>
+<parameter name="y" type="float">
+</parameter>
+<parameter name="radius" type="float">
+</parameter>
+<parameter name="dir" type="android.graphics.Path.Direction">
+</parameter>
+</method>
+<method name="addOval"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="oval" type="android.graphics.RectF">
+</parameter>
+<parameter name="dir" type="android.graphics.Path.Direction">
+</parameter>
+</method>
+<method name="addPath"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="src" type="android.graphics.Path">
+</parameter>
+<parameter name="dx" type="float">
+</parameter>
+<parameter name="dy" type="float">
+</parameter>
+</method>
+<method name="addPath"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="src" type="android.graphics.Path">
+</parameter>
+</method>
+<method name="addPath"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="src" type="android.graphics.Path">
+</parameter>
+<parameter name="matrix" type="android.graphics.Matrix">
+</parameter>
+</method>
+<method name="addRect"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="rect" type="android.graphics.RectF">
+</parameter>
+<parameter name="dir" type="android.graphics.Path.Direction">
+</parameter>
+</method>
+<method name="addRect"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="left" type="float">
+</parameter>
+<parameter name="top" type="float">
+</parameter>
+<parameter name="right" type="float">
+</parameter>
+<parameter name="bottom" type="float">
+</parameter>
+<parameter name="dir" type="android.graphics.Path.Direction">
+</parameter>
+</method>
+<method name="addRoundRect"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="rect" type="android.graphics.RectF">
+</parameter>
+<parameter name="rx" type="float">
+</parameter>
+<parameter name="ry" type="float">
+</parameter>
+<parameter name="dir" type="android.graphics.Path.Direction">
+</parameter>
+</method>
+<method name="addRoundRect"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="rect" type="android.graphics.RectF">
+</parameter>
+<parameter name="radii" type="float[]">
+</parameter>
+<parameter name="dir" type="android.graphics.Path.Direction">
+</parameter>
+</method>
+<method name="arcTo"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="oval" type="android.graphics.RectF">
+</parameter>
+<parameter name="startAngle" type="float">
+</parameter>
+<parameter name="sweepAngle" type="float">
+</parameter>
+<parameter name="forceMoveTo" type="boolean">
+</parameter>
+</method>
+<method name="arcTo"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="oval" type="android.graphics.RectF">
+</parameter>
+<parameter name="startAngle" type="float">
+</parameter>
+<parameter name="sweepAngle" type="float">
+</parameter>
+</method>
+<method name="close"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="computeBounds"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="bounds" type="android.graphics.RectF">
+</parameter>
+<parameter name="exact" type="boolean">
+</parameter>
+</method>
+<method name="cubicTo"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="x1" type="float">
+</parameter>
+<parameter name="y1" type="float">
+</parameter>
+<parameter name="x2" type="float">
+</parameter>
+<parameter name="y2" type="float">
+</parameter>
+<parameter name="x3" type="float">
+</parameter>
+<parameter name="y3" type="float">
+</parameter>
+</method>
+<method name="getFillType"
+ return="android.graphics.Path.FillType"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="incReserve"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="extraPtCount" type="int">
+</parameter>
+</method>
+<method name="isEmpty"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isInverseFillType"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isRect"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="rect" type="android.graphics.RectF">
+</parameter>
+</method>
+<method name="lineTo"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="x" type="float">
+</parameter>
+<parameter name="y" type="float">
+</parameter>
+</method>
+<method name="moveTo"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="x" type="float">
+</parameter>
+<parameter name="y" type="float">
+</parameter>
+</method>
+<method name="offset"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="dx" type="float">
+</parameter>
+<parameter name="dy" type="float">
+</parameter>
+<parameter name="dst" type="android.graphics.Path">
+</parameter>
+</method>
+<method name="offset"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="dx" type="float">
+</parameter>
+<parameter name="dy" type="float">
+</parameter>
+</method>
+<method name="quadTo"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="x1" type="float">
+</parameter>
+<parameter name="y1" type="float">
+</parameter>
+<parameter name="x2" type="float">
+</parameter>
+<parameter name="y2" type="float">
+</parameter>
+</method>
+<method name="rCubicTo"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="x1" type="float">
+</parameter>
+<parameter name="y1" type="float">
+</parameter>
+<parameter name="x2" type="float">
+</parameter>
+<parameter name="y2" type="float">
+</parameter>
+<parameter name="x3" type="float">
+</parameter>
+<parameter name="y3" type="float">
+</parameter>
+</method>
+<method name="rLineTo"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="dx" type="float">
+</parameter>
+<parameter name="dy" type="float">
+</parameter>
+</method>
+<method name="rMoveTo"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="dx" type="float">
+</parameter>
+<parameter name="dy" type="float">
+</parameter>
+</method>
+<method name="rQuadTo"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="dx1" type="float">
+</parameter>
+<parameter name="dy1" type="float">
+</parameter>
+<parameter name="dx2" type="float">
+</parameter>
+<parameter name="dy2" type="float">
+</parameter>
+</method>
+<method name="reset"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="rewind"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="set"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="src" type="android.graphics.Path">
+</parameter>
+</method>
+<method name="setFillType"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="ft" type="android.graphics.Path.FillType">
+</parameter>
+</method>
+<method name="setLastPoint"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="dx" type="float">
+</parameter>
+<parameter name="dy" type="float">
+</parameter>
+</method>
+<method name="toggleInverseFillType"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="transform"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="matrix" type="android.graphics.Matrix">
+</parameter>
+<parameter name="dst" type="android.graphics.Path">
+</parameter>
+</method>
+<method name="transform"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="matrix" type="android.graphics.Matrix">
+</parameter>
+</method>
+</class>
+<class name="Path.Direction"
+ extends="java.lang.Enum"
+ abstract="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="valueOf"
+ return="android.graphics.Path.Direction"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+</method>
+<method name="values"
+ return="android.graphics.Path.Direction[]"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+</class>
+<class name="Path.FillType"
+ extends="java.lang.Enum"
+ abstract="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="valueOf"
+ return="android.graphics.Path.FillType"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+</method>
+<method name="values"
+ return="android.graphics.Path.FillType[]"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+</class>
+<class name="PathDashPathEffect"
+ extends="android.graphics.PathEffect"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="PathDashPathEffect"
+ type="android.graphics.PathDashPathEffect"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="shape" type="android.graphics.Path">
+</parameter>
+<parameter name="advance" type="float">
+</parameter>
+<parameter name="phase" type="float">
+</parameter>
+<parameter name="style" type="android.graphics.PathDashPathEffect.Style">
+</parameter>
+</constructor>
+</class>
+<class name="PathDashPathEffect.Style"
+ extends="java.lang.Enum"
+ abstract="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="valueOf"
+ return="android.graphics.PathDashPathEffect.Style"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+</method>
+<method name="values"
+ return="android.graphics.PathDashPathEffect.Style[]"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+</class>
+<class name="PathEffect"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="PathEffect"
+ type="android.graphics.PathEffect"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+</class>
+<class name="PathMeasure"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="PathMeasure"
+ type="android.graphics.PathMeasure"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<constructor name="PathMeasure"
+ type="android.graphics.PathMeasure"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="path" type="android.graphics.Path">
+</parameter>
+<parameter name="forceClosed" type="boolean">
+</parameter>
+</constructor>
+<method name="getLength"
+ return="float"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getMatrix"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="distance" type="float">
+</parameter>
+<parameter name="matrix" type="android.graphics.Matrix">
+</parameter>
+<parameter name="flags" type="int">
+</parameter>
+</method>
+<method name="getPosTan"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="distance" type="float">
+</parameter>
+<parameter name="pos" type="float[]">
+</parameter>
+<parameter name="tan" type="float[]">
+</parameter>
+</method>
+<method name="getSegment"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="startD" type="float">
+</parameter>
+<parameter name="stopD" type="float">
+</parameter>
+<parameter name="dst" type="android.graphics.Path">
+</parameter>
+<parameter name="startWithMoveTo" type="boolean">
+</parameter>
+</method>
+<method name="isClosed"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="nextContour"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="setPath"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="path" type="android.graphics.Path">
+</parameter>
+<parameter name="forceClosed" type="boolean">
+</parameter>
+</method>
+<field name="POSITION_MATRIX_FLAG"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TANGENT_MATRIX_FLAG"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<class name="Picture"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="Picture"
+ type="android.graphics.Picture"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<constructor name="Picture"
+ type="android.graphics.Picture"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="src" type="android.graphics.Picture">
+</parameter>
+</constructor>
+<method name="beginRecording"
+ return="android.graphics.Canvas"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="width" type="int">
+</parameter>
+<parameter name="height" type="int">
+</parameter>
+</method>
+<method name="createFromStream"
+ return="android.graphics.Picture"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="stream" type="java.io.InputStream">
+</parameter>
+</method>
+<method name="draw"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="canvas" type="android.graphics.Canvas">
+</parameter>
+</method>
+<method name="endRecording"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getHeight"
+ return="int"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getWidth"
+ return="int"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="writeToStream"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="stream" type="java.io.OutputStream">
+</parameter>
+</method>
+</class>
+<class name="PixelFormat"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="PixelFormat"
+ type="android.graphics.PixelFormat"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<method name="formatHasAlpha"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="format" type="int">
+</parameter>
+</method>
+<method name="getPixelFormatInfo"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="format" type="int">
+</parameter>
+<parameter name="info" type="android.graphics.PixelFormat">
+</parameter>
+</method>
+<field name="A_8"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="8"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="JPEG"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="256"
+ static="true"
+ final="true"
+ deprecated="deprecated"
+ visibility="public"
+>
+</field>
+<field name="LA_88"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="10"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="L_8"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="9"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="OPAQUE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="-1"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="RGBA_4444"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="7"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="RGBA_5551"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="6"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="RGBA_8888"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="RGBX_8888"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="RGB_332"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="11"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="RGB_565"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="4"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="RGB_888"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="3"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TRANSLUCENT"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="-3"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TRANSPARENT"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="-2"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="UNKNOWN"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="0"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="YCbCr_420_SP"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="17"
+ static="true"
+ final="true"
+ deprecated="deprecated"
+ visibility="public"
+>
+</field>
+<field name="YCbCr_422_I"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="20"
+ static="true"
+ final="true"
+ deprecated="deprecated"
+ visibility="public"
+>
+</field>
+<field name="YCbCr_422_SP"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16"
+ static="true"
+ final="true"
+ deprecated="deprecated"
+ visibility="public"
+>
+</field>
+<field name="bitsPerPixel"
+ type="int"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="bytesPerPixel"
+ type="int"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<class name="PixelXorXfermode"
+ extends="android.graphics.Xfermode"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="PixelXorXfermode"
+ type="android.graphics.PixelXorXfermode"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="opColor" type="int">
+</parameter>
+</constructor>
+</class>
+<class name="Point"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="Point"
+ type="android.graphics.Point"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<constructor name="Point"
+ type="android.graphics.Point"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="x" type="int">
+</parameter>
+<parameter name="y" type="int">
+</parameter>
+</constructor>
+<constructor name="Point"
+ type="android.graphics.Point"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="src" type="android.graphics.Point">
+</parameter>
+</constructor>
+<method name="equals"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="x" type="int">
+</parameter>
+<parameter name="y" type="int">
+</parameter>
+</method>
+<method name="negate"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="offset"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="dx" type="int">
+</parameter>
+<parameter name="dy" type="int">
+</parameter>
+</method>
+<method name="set"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="x" type="int">
+</parameter>
+<parameter name="y" type="int">
+</parameter>
+</method>
+<field name="x"
+ type="int"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="y"
+ type="int"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<class name="PointF"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="PointF"
+ type="android.graphics.PointF"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<constructor name="PointF"
+ type="android.graphics.PointF"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="x" type="float">
+</parameter>
+<parameter name="y" type="float">
+</parameter>
+</constructor>
+<constructor name="PointF"
+ type="android.graphics.PointF"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="p" type="android.graphics.Point">
+</parameter>
+</constructor>
+<method name="equals"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="x" type="float">
+</parameter>
+<parameter name="y" type="float">
+</parameter>
+</method>
+<method name="length"
+ return="float"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="length"
+ return="float"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="x" type="float">
+</parameter>
+<parameter name="y" type="float">
+</parameter>
+</method>
+<method name="negate"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="offset"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="dx" type="float">
+</parameter>
+<parameter name="dy" type="float">
+</parameter>
+</method>
+<method name="set"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="x" type="float">
+</parameter>
+<parameter name="y" type="float">
+</parameter>
+</method>
+<method name="set"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="p" type="android.graphics.PointF">
+</parameter>
+</method>
+<field name="x"
+ type="float"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="y"
+ type="float"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<class name="PorterDuff"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="PorterDuff"
+ type="android.graphics.PorterDuff"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+</class>
+<class name="PorterDuff.Mode"
+ extends="java.lang.Enum"
+ abstract="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="valueOf"
+ return="android.graphics.PorterDuff.Mode"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+</method>
+<method name="values"
+ return="android.graphics.PorterDuff.Mode[]"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+</class>
+<class name="PorterDuffColorFilter"
+ extends="android.graphics.ColorFilter"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="PorterDuffColorFilter"
+ type="android.graphics.PorterDuffColorFilter"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="srcColor" type="int">
+</parameter>
+<parameter name="mode" type="android.graphics.PorterDuff.Mode">
+</parameter>
+</constructor>
+</class>
+<class name="PorterDuffXfermode"
+ extends="android.graphics.Xfermode"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="PorterDuffXfermode"
+ type="android.graphics.PorterDuffXfermode"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="mode" type="android.graphics.PorterDuff.Mode">
+</parameter>
+</constructor>
+</class>
+<class name="RadialGradient"
+ extends="android.graphics.Shader"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="RadialGradient"
+ type="android.graphics.RadialGradient"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="x" type="float">
+</parameter>
+<parameter name="y" type="float">
+</parameter>
+<parameter name="radius" type="float">
+</parameter>
+<parameter name="colors" type="int[]">
+</parameter>
+<parameter name="positions" type="float[]">
+</parameter>
+<parameter name="tile" type="android.graphics.Shader.TileMode">
+</parameter>
+</constructor>
+<constructor name="RadialGradient"
+ type="android.graphics.RadialGradient"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="x" type="float">
+</parameter>
+<parameter name="y" type="float">
+</parameter>
+<parameter name="radius" type="float">
+</parameter>
+<parameter name="color0" type="int">
+</parameter>
+<parameter name="color1" type="int">
+</parameter>
+<parameter name="tile" type="android.graphics.Shader.TileMode">
+</parameter>
+</constructor>
+</class>
+<class name="Rasterizer"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="Rasterizer"
+ type="android.graphics.Rasterizer"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+</class>
+<class name="Rect"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="android.os.Parcelable">
+</implements>
+<constructor name="Rect"
+ type="android.graphics.Rect"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<constructor name="Rect"
+ type="android.graphics.Rect"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="left" type="int">
+</parameter>
+<parameter name="top" type="int">
+</parameter>
+<parameter name="right" type="int">
+</parameter>
+<parameter name="bottom" type="int">
+</parameter>
+</constructor>
+<constructor name="Rect"
+ type="android.graphics.Rect"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="r" type="android.graphics.Rect">
+</parameter>
+</constructor>
+<method name="centerX"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="centerY"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="contains"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="x" type="int">
+</parameter>
+<parameter name="y" type="int">
+</parameter>
+</method>
+<method name="contains"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="left" type="int">
+</parameter>
+<parameter name="top" type="int">
+</parameter>
+<parameter name="right" type="int">
+</parameter>
+<parameter name="bottom" type="int">
+</parameter>
+</method>
+<method name="contains"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="r" type="android.graphics.Rect">
+</parameter>
+</method>
+<method name="describeContents"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="exactCenterX"
+ return="float"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="exactCenterY"
+ return="float"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="flattenToString"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="height"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="inset"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="dx" type="int">
+</parameter>
+<parameter name="dy" type="int">
+</parameter>
+</method>
+<method name="intersect"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="left" type="int">
+</parameter>
+<parameter name="top" type="int">
+</parameter>
+<parameter name="right" type="int">
+</parameter>
+<parameter name="bottom" type="int">
+</parameter>
+</method>
+<method name="intersect"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="r" type="android.graphics.Rect">
+</parameter>
+</method>
+<method name="intersects"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="left" type="int">
+</parameter>
+<parameter name="top" type="int">
+</parameter>
+<parameter name="right" type="int">
+</parameter>
+<parameter name="bottom" type="int">
+</parameter>
+</method>
+<method name="intersects"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="a" type="android.graphics.Rect">
+</parameter>
+<parameter name="b" type="android.graphics.Rect">
+</parameter>
+</method>
+<method name="isEmpty"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="offset"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="dx" type="int">
+</parameter>
+<parameter name="dy" type="int">
+</parameter>
+</method>
+<method name="offsetTo"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="newLeft" type="int">
+</parameter>
+<parameter name="newTop" type="int">
+</parameter>
+</method>
+<method name="readFromParcel"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="in" type="android.os.Parcel">
+</parameter>
+</method>
+<method name="set"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="left" type="int">
+</parameter>
+<parameter name="top" type="int">
+</parameter>
+<parameter name="right" type="int">
+</parameter>
+<parameter name="bottom" type="int">
+</parameter>
+</method>
+<method name="set"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="src" type="android.graphics.Rect">
+</parameter>
+</method>
+<method name="setEmpty"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="setIntersect"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="a" type="android.graphics.Rect">
+</parameter>
+<parameter name="b" type="android.graphics.Rect">
+</parameter>
+</method>
+<method name="sort"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="toShortString"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="unflattenFromString"
+ return="android.graphics.Rect"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="str" type="java.lang.String">
+</parameter>
+</method>
+<method name="union"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="left" type="int">
+</parameter>
+<parameter name="top" type="int">
+</parameter>
+<parameter name="right" type="int">
+</parameter>
+<parameter name="bottom" type="int">
+</parameter>
+</method>
+<method name="union"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="r" type="android.graphics.Rect">
+</parameter>
+</method>
+<method name="union"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="x" type="int">
+</parameter>
+<parameter name="y" type="int">
+</parameter>
+</method>
+<method name="width"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="writeToParcel"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="out" type="android.os.Parcel">
+</parameter>
+<parameter name="flags" type="int">
+</parameter>
+</method>
+<field name="CREATOR"
+ type="android.os.Parcelable.Creator"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="bottom"
+ type="int"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="left"
+ type="int"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="right"
+ type="int"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="top"
+ type="int"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<class name="RectF"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="android.os.Parcelable">
+</implements>
+<constructor name="RectF"
+ type="android.graphics.RectF"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<constructor name="RectF"
+ type="android.graphics.RectF"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="left" type="float">
+</parameter>
+<parameter name="top" type="float">
+</parameter>
+<parameter name="right" type="float">
+</parameter>
+<parameter name="bottom" type="float">
+</parameter>
+</constructor>
+<constructor name="RectF"
+ type="android.graphics.RectF"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="r" type="android.graphics.RectF">
+</parameter>
+</constructor>
+<constructor name="RectF"
+ type="android.graphics.RectF"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="r" type="android.graphics.Rect">
+</parameter>
+</constructor>
+<method name="centerX"
+ return="float"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="centerY"
+ return="float"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="contains"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="x" type="float">
+</parameter>
+<parameter name="y" type="float">
+</parameter>
+</method>
+<method name="contains"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="left" type="float">
+</parameter>
+<parameter name="top" type="float">
+</parameter>
+<parameter name="right" type="float">
+</parameter>
+<parameter name="bottom" type="float">
+</parameter>
+</method>
+<method name="contains"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="r" type="android.graphics.RectF">
+</parameter>
+</method>
+<method name="describeContents"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="height"
+ return="float"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="inset"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="dx" type="float">
+</parameter>
+<parameter name="dy" type="float">
+</parameter>
+</method>
+<method name="intersect"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="left" type="float">
+</parameter>
+<parameter name="top" type="float">
+</parameter>
+<parameter name="right" type="float">
+</parameter>
+<parameter name="bottom" type="float">
+</parameter>
+</method>
+<method name="intersect"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="r" type="android.graphics.RectF">
+</parameter>
+</method>
+<method name="intersects"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="left" type="float">
+</parameter>
+<parameter name="top" type="float">
+</parameter>
+<parameter name="right" type="float">
+</parameter>
+<parameter name="bottom" type="float">
+</parameter>
+</method>
+<method name="intersects"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="a" type="android.graphics.RectF">
+</parameter>
+<parameter name="b" type="android.graphics.RectF">
+</parameter>
+</method>
+<method name="isEmpty"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="offset"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="dx" type="float">
+</parameter>
+<parameter name="dy" type="float">
+</parameter>
+</method>
+<method name="offsetTo"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="newLeft" type="float">
+</parameter>
+<parameter name="newTop" type="float">
+</parameter>
+</method>
+<method name="readFromParcel"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="in" type="android.os.Parcel">
+</parameter>
+</method>
+<method name="round"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="dst" type="android.graphics.Rect">
+</parameter>
+</method>
+<method name="roundOut"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="dst" type="android.graphics.Rect">
+</parameter>
+</method>
+<method name="set"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="left" type="float">
+</parameter>
+<parameter name="top" type="float">
+</parameter>
+<parameter name="right" type="float">
+</parameter>
+<parameter name="bottom" type="float">
+</parameter>
+</method>
+<method name="set"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="src" type="android.graphics.RectF">
+</parameter>
+</method>
+<method name="set"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="src" type="android.graphics.Rect">
+</parameter>
+</method>
+<method name="setEmpty"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="setIntersect"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="a" type="android.graphics.RectF">
+</parameter>
+<parameter name="b" type="android.graphics.RectF">
+</parameter>
+</method>
+<method name="sort"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="union"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="left" type="float">
+</parameter>
+<parameter name="top" type="float">
+</parameter>
+<parameter name="right" type="float">
+</parameter>
+<parameter name="bottom" type="float">
+</parameter>
+</method>
+<method name="union"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="r" type="android.graphics.RectF">
+</parameter>
+</method>
+<method name="union"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="x" type="float">
+</parameter>
+<parameter name="y" type="float">
+</parameter>
+</method>
+<method name="width"
+ return="float"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="writeToParcel"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="out" type="android.os.Parcel">
+</parameter>
+<parameter name="flags" type="int">
+</parameter>
+</method>
+<field name="CREATOR"
+ type="android.os.Parcelable.Creator"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="bottom"
+ type="float"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="left"
+ type="float"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="right"
+ type="float"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="top"
+ type="float"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<class name="Region"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="android.os.Parcelable">
+</implements>
+<constructor name="Region"
+ type="android.graphics.Region"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<constructor name="Region"
+ type="android.graphics.Region"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="region" type="android.graphics.Region">
+</parameter>
+</constructor>
+<constructor name="Region"
+ type="android.graphics.Region"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="r" type="android.graphics.Rect">
+</parameter>
+</constructor>
+<constructor name="Region"
+ type="android.graphics.Region"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="left" type="int">
+</parameter>
+<parameter name="top" type="int">
+</parameter>
+<parameter name="right" type="int">
+</parameter>
+<parameter name="bottom" type="int">
+</parameter>
+</constructor>
+<method name="contains"
+ return="boolean"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="x" type="int">
+</parameter>
+<parameter name="y" type="int">
+</parameter>
+</method>
+<method name="describeContents"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getBoundaryPath"
+ return="android.graphics.Path"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getBoundaryPath"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="path" type="android.graphics.Path">
+</parameter>
+</method>
+<method name="getBounds"
+ return="android.graphics.Rect"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getBounds"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="r" type="android.graphics.Rect">
+</parameter>
+</method>
+<method name="isComplex"
+ return="boolean"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isEmpty"
+ return="boolean"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isRect"
+ return="boolean"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="op"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="r" type="android.graphics.Rect">
+</parameter>
+<parameter name="op" type="android.graphics.Region.Op">
+</parameter>
+</method>
+<method name="op"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="left" type="int">
+</parameter>
+<parameter name="top" type="int">
+</parameter>
+<parameter name="right" type="int">
+</parameter>
+<parameter name="bottom" type="int">
+</parameter>
+<parameter name="op" type="android.graphics.Region.Op">
+</parameter>
+</method>
+<method name="op"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="region" type="android.graphics.Region">
+</parameter>
+<parameter name="op" type="android.graphics.Region.Op">
+</parameter>
+</method>
+<method name="op"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="rect" type="android.graphics.Rect">
+</parameter>
+<parameter name="region" type="android.graphics.Region">
+</parameter>
+<parameter name="op" type="android.graphics.Region.Op">
+</parameter>
+</method>
+<method name="op"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="region1" type="android.graphics.Region">
+</parameter>
+<parameter name="region2" type="android.graphics.Region">
+</parameter>
+<parameter name="op" type="android.graphics.Region.Op">
+</parameter>
+</method>
+<method name="quickContains"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="r" type="android.graphics.Rect">
+</parameter>
+</method>
+<method name="quickContains"
+ return="boolean"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="left" type="int">
+</parameter>
+<parameter name="top" type="int">
+</parameter>
+<parameter name="right" type="int">
+</parameter>
+<parameter name="bottom" type="int">
+</parameter>
+</method>
+<method name="quickReject"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="r" type="android.graphics.Rect">
+</parameter>
+</method>
+<method name="quickReject"
+ return="boolean"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="left" type="int">
+</parameter>
+<parameter name="top" type="int">
+</parameter>
+<parameter name="right" type="int">
+</parameter>
+<parameter name="bottom" type="int">
+</parameter>
+</method>
+<method name="quickReject"
+ return="boolean"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="rgn" type="android.graphics.Region">
+</parameter>
+</method>
+<method name="set"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="region" type="android.graphics.Region">
+</parameter>
+</method>
+<method name="set"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="r" type="android.graphics.Rect">
+</parameter>
+</method>
+<method name="set"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="left" type="int">
+</parameter>
+<parameter name="top" type="int">
+</parameter>
+<parameter name="right" type="int">
+</parameter>
+<parameter name="bottom" type="int">
+</parameter>
+</method>
+<method name="setEmpty"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="setPath"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="path" type="android.graphics.Path">
+</parameter>
+<parameter name="clip" type="android.graphics.Region">
+</parameter>
+</method>
+<method name="translate"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="dx" type="int">
+</parameter>
+<parameter name="dy" type="int">
+</parameter>
+</method>
+<method name="translate"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="dx" type="int">
+</parameter>
+<parameter name="dy" type="int">
+</parameter>
+<parameter name="dst" type="android.graphics.Region">
+</parameter>
+</method>
+<method name="union"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="r" type="android.graphics.Rect">
+</parameter>
+</method>
+<method name="writeToParcel"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="p" type="android.os.Parcel">
+</parameter>
+<parameter name="flags" type="int">
+</parameter>
+</method>
+<field name="CREATOR"
+ type="android.os.Parcelable.Creator"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<class name="Region.Op"
+ extends="java.lang.Enum"
+ abstract="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="valueOf"
+ return="android.graphics.Region.Op"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+</method>
+<method name="values"
+ return="android.graphics.Region.Op[]"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+</class>
+<class name="RegionIterator"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="RegionIterator"
+ type="android.graphics.RegionIterator"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="region" type="android.graphics.Region">
+</parameter>
+</constructor>
+<method name="next"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="r" type="android.graphics.Rect">
+</parameter>
+</method>
+</class>
+<class name="Shader"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="Shader"
+ type="android.graphics.Shader"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<method name="getLocalMatrix"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="localM" type="android.graphics.Matrix">
+</parameter>
+</method>
+<method name="setLocalMatrix"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="localM" type="android.graphics.Matrix">
+</parameter>
+</method>
+</class>
+<class name="Shader.TileMode"
+ extends="java.lang.Enum"
+ abstract="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="valueOf"
+ return="android.graphics.Shader.TileMode"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+</method>
+<method name="values"
+ return="android.graphics.Shader.TileMode[]"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+</class>
+<class name="SumPathEffect"
+ extends="android.graphics.PathEffect"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="SumPathEffect"
+ type="android.graphics.SumPathEffect"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="first" type="android.graphics.PathEffect">
+</parameter>
+<parameter name="second" type="android.graphics.PathEffect">
+</parameter>
+</constructor>
+</class>
+<class name="SweepGradient"
+ extends="android.graphics.Shader"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="SweepGradient"
+ type="android.graphics.SweepGradient"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="cx" type="float">
+</parameter>
+<parameter name="cy" type="float">
+</parameter>
+<parameter name="colors" type="int[]">
+</parameter>
+<parameter name="positions" type="float[]">
+</parameter>
+</constructor>
+<constructor name="SweepGradient"
+ type="android.graphics.SweepGradient"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="cx" type="float">
+</parameter>
+<parameter name="cy" type="float">
+</parameter>
+<parameter name="color0" type="int">
+</parameter>
+<parameter name="color1" type="int">
+</parameter>
+</constructor>
+</class>
+<class name="Typeface"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="create"
+ return="android.graphics.Typeface"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="familyName" type="java.lang.String">
+</parameter>
+<parameter name="style" type="int">
+</parameter>
+</method>
+<method name="create"
+ return="android.graphics.Typeface"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="family" type="android.graphics.Typeface">
+</parameter>
+<parameter name="style" type="int">
+</parameter>
+</method>
+<method name="createFromAsset"
+ return="android.graphics.Typeface"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="mgr" type="android.content.res.AssetManager">
+</parameter>
+<parameter name="path" type="java.lang.String">
+</parameter>
+</method>
+<method name="createFromFile"
+ return="android.graphics.Typeface"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="path" type="java.io.File">
+</parameter>
+</method>
+<method name="createFromFile"
+ return="android.graphics.Typeface"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="path" type="java.lang.String">
+</parameter>
+</method>
+<method name="defaultFromStyle"
+ return="android.graphics.Typeface"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="style" type="int">
+</parameter>
+</method>
+<method name="getStyle"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isBold"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isItalic"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<field name="BOLD"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="BOLD_ITALIC"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="3"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="DEFAULT"
+ type="android.graphics.Typeface"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="DEFAULT_BOLD"
+ type="android.graphics.Typeface"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ITALIC"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="MONOSPACE"
+ type="android.graphics.Typeface"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="NORMAL"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="0"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="SANS_SERIF"
+ type="android.graphics.Typeface"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="SERIF"
+ type="android.graphics.Typeface"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<class name="Xfermode"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="Xfermode"
+ type="android.graphics.Xfermode"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+</class>
+<class name="YuvImage"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="YuvImage"
+ type="android.graphics.YuvImage"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="yuv" type="byte[]">
+</parameter>
+<parameter name="format" type="int">
+</parameter>
+<parameter name="width" type="int">
+</parameter>
+<parameter name="height" type="int">
+</parameter>
+<parameter name="strides" type="int[]">
+</parameter>
+</constructor>
+<method name="compressToJpeg"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="rectangle" type="android.graphics.Rect">
+</parameter>
+<parameter name="quality" type="int">
+</parameter>
+<parameter name="stream" type="java.io.OutputStream">
+</parameter>
+</method>
+<method name="getHeight"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getStrides"
+ return="int[]"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getWidth"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getYuvData"
+ return="byte[]"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getYuvFormat"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+</class>
+</package>
+<package name="android.graphics.drawable"
+>
+<interface name="Animatable"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="isRunning"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="start"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="stop"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+</interface>
+<class name="AnimationDrawable"
+ extends="android.graphics.drawable.DrawableContainer"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="android.graphics.drawable.Animatable">
+</implements>
+<implements name="java.lang.Runnable">
+</implements>
+<constructor name="AnimationDrawable"
+ type="android.graphics.drawable.AnimationDrawable"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<method name="addFrame"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="frame" type="android.graphics.drawable.Drawable">
+</parameter>
+<parameter name="duration" type="int">
+</parameter>
+</method>
+<method name="getDuration"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="i" type="int">
+</parameter>
+</method>
+<method name="getFrame"
+ return="android.graphics.drawable.Drawable"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="index" type="int">
+</parameter>
+</method>
+<method name="getNumberOfFrames"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isOneShot"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isRunning"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="run"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="setOneShot"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="oneShot" type="boolean">
+</parameter>
+</method>
+<method name="start"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="stop"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+</class>
+<class name="BitmapDrawable"
+ extends="android.graphics.drawable.Drawable"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="BitmapDrawable"
+ type="android.graphics.drawable.BitmapDrawable"
+ static="false"
+ final="false"
+ deprecated="deprecated"
+ visibility="public"
+>
+</constructor>
+<constructor name="BitmapDrawable"
+ type="android.graphics.drawable.BitmapDrawable"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="res" type="android.content.res.Resources">
+</parameter>
+</constructor>
+<constructor name="BitmapDrawable"
+ type="android.graphics.drawable.BitmapDrawable"
+ static="false"
+ final="false"
+ deprecated="deprecated"
+ visibility="public"
+>
+<parameter name="bitmap" type="android.graphics.Bitmap">
+</parameter>
+</constructor>
+<constructor name="BitmapDrawable"
+ type="android.graphics.drawable.BitmapDrawable"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="res" type="android.content.res.Resources">
+</parameter>
+<parameter name="bitmap" type="android.graphics.Bitmap">
+</parameter>
+</constructor>
+<constructor name="BitmapDrawable"
+ type="android.graphics.drawable.BitmapDrawable"
+ static="false"
+ final="false"
+ deprecated="deprecated"
+ visibility="public"
+>
+<parameter name="filepath" type="java.lang.String">
+</parameter>
+</constructor>
+<constructor name="BitmapDrawable"
+ type="android.graphics.drawable.BitmapDrawable"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="res" type="android.content.res.Resources">
+</parameter>
+<parameter name="filepath" type="java.lang.String">
+</parameter>
+</constructor>
+<constructor name="BitmapDrawable"
+ type="android.graphics.drawable.BitmapDrawable"
+ static="false"
+ final="false"
+ deprecated="deprecated"
+ visibility="public"
+>
+<parameter name="is" type="java.io.InputStream">
+</parameter>
+</constructor>
+<constructor name="BitmapDrawable"
+ type="android.graphics.drawable.BitmapDrawable"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="res" type="android.content.res.Resources">
+</parameter>
+<parameter name="is" type="java.io.InputStream">
+</parameter>
+</constructor>
+<method name="draw"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="canvas" type="android.graphics.Canvas">
+</parameter>
+</method>
+<method name="getBitmap"
+ return="android.graphics.Bitmap"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getConstantState"
+ return="android.graphics.drawable.Drawable.ConstantState"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getGravity"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getOpacity"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getPaint"
+ return="android.graphics.Paint"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getTileModeX"
+ return="android.graphics.Shader.TileMode"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getTileModeY"
+ return="android.graphics.Shader.TileMode"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="setAlpha"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="alpha" type="int">
+</parameter>
+</method>
+<method name="setAntiAlias"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="aa" type="boolean">
+</parameter>
+</method>
+<method name="setColorFilter"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="cf" type="android.graphics.ColorFilter">
+</parameter>
+</method>
+<method name="setGravity"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="gravity" type="int">
+</parameter>
+</method>
+<method name="setTargetDensity"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="canvas" type="android.graphics.Canvas">
+</parameter>
+</method>
+<method name="setTargetDensity"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="metrics" type="android.util.DisplayMetrics">
+</parameter>
+</method>
+<method name="setTargetDensity"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="density" type="int">
+</parameter>
+</method>
+<method name="setTileModeX"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="mode" type="android.graphics.Shader.TileMode">
+</parameter>
+</method>
+<method name="setTileModeXY"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="xmode" type="android.graphics.Shader.TileMode">
+</parameter>
+<parameter name="ymode" type="android.graphics.Shader.TileMode">
+</parameter>
+</method>
+<method name="setTileModeY"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="mode" type="android.graphics.Shader.TileMode">
+</parameter>
+</method>
+</class>
+<class name="ClipDrawable"
+ extends="android.graphics.drawable.Drawable"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="android.graphics.drawable.Drawable.Callback">
+</implements>
+<constructor name="ClipDrawable"
+ type="android.graphics.drawable.ClipDrawable"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="drawable" type="android.graphics.drawable.Drawable">
+</parameter>
+<parameter name="gravity" type="int">
+</parameter>
+<parameter name="orientation" type="int">
+</parameter>
+</constructor>
+<method name="draw"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="canvas" type="android.graphics.Canvas">
+</parameter>
+</method>
+<method name="getOpacity"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="invalidateDrawable"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="who" type="android.graphics.drawable.Drawable">
+</parameter>
+</method>
+<method name="scheduleDrawable"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="who" type="android.graphics.drawable.Drawable">
+</parameter>
+<parameter name="what" type="java.lang.Runnable">
+</parameter>
+<parameter name="when" type="long">
+</parameter>
+</method>
+<method name="setAlpha"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="alpha" type="int">
+</parameter>
+</method>
+<method name="setColorFilter"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="cf" type="android.graphics.ColorFilter">
+</parameter>
+</method>
+<method name="unscheduleDrawable"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="who" type="android.graphics.drawable.Drawable">
+</parameter>
+<parameter name="what" type="java.lang.Runnable">
+</parameter>
+</method>
+<field name="HORIZONTAL"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="VERTICAL"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<class name="ColorDrawable"
+ extends="android.graphics.drawable.Drawable"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="ColorDrawable"
+ type="android.graphics.drawable.ColorDrawable"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<constructor name="ColorDrawable"
+ type="android.graphics.drawable.ColorDrawable"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="color" type="int">
+</parameter>
+</constructor>
+<method name="draw"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="canvas" type="android.graphics.Canvas">
+</parameter>
+</method>
+<method name="getAlpha"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getOpacity"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="setAlpha"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="alpha" type="int">
+</parameter>
+</method>
+<method name="setColorFilter"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="colorFilter" type="android.graphics.ColorFilter">
+</parameter>
+</method>
+</class>
+<class name="Drawable"
+ extends="java.lang.Object"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="Drawable"
+ type="android.graphics.drawable.Drawable"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<method name="clearColorFilter"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="copyBounds"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="bounds" type="android.graphics.Rect">
+</parameter>
+</method>
+<method name="copyBounds"
+ return="android.graphics.Rect"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="createFromPath"
+ return="android.graphics.drawable.Drawable"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="pathName" type="java.lang.String">
+</parameter>
+</method>
+<method name="createFromResourceStream"
+ return="android.graphics.drawable.Drawable"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="res" type="android.content.res.Resources">
+</parameter>
+<parameter name="value" type="android.util.TypedValue">
+</parameter>
+<parameter name="is" type="java.io.InputStream">
+</parameter>
+<parameter name="srcName" type="java.lang.String">
+</parameter>
+</method>
+<method name="createFromResourceStream"
+ return="android.graphics.drawable.Drawable"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="res" type="android.content.res.Resources">
+</parameter>
+<parameter name="value" type="android.util.TypedValue">
+</parameter>
+<parameter name="is" type="java.io.InputStream">
+</parameter>
+<parameter name="srcName" type="java.lang.String">
+</parameter>
+<parameter name="opts" type="android.graphics.BitmapFactory.Options">
+</parameter>
+</method>
+<method name="createFromStream"
+ return="android.graphics.drawable.Drawable"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="is" type="java.io.InputStream">
+</parameter>
+<parameter name="srcName" type="java.lang.String">
+</parameter>
+</method>
+<method name="createFromXml"
+ return="android.graphics.drawable.Drawable"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="r" type="android.content.res.Resources">
+</parameter>
+<parameter name="parser" type="org.xmlpull.v1.XmlPullParser">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+<exception name="XmlPullParserException" type="org.xmlpull.v1.XmlPullParserException">
+</exception>
+</method>
+<method name="createFromXmlInner"
+ return="android.graphics.drawable.Drawable"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="r" type="android.content.res.Resources">
+</parameter>
+<parameter name="parser" type="org.xmlpull.v1.XmlPullParser">
+</parameter>
+<parameter name="attrs" type="android.util.AttributeSet">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+<exception name="XmlPullParserException" type="org.xmlpull.v1.XmlPullParserException">
+</exception>
+</method>
+<method name="draw"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="canvas" type="android.graphics.Canvas">
+</parameter>
+</method>
+<method name="getBounds"
+ return="android.graphics.Rect"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getChangingConfigurations"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getConstantState"
+ return="android.graphics.drawable.Drawable.ConstantState"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getCurrent"
+ return="android.graphics.drawable.Drawable"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getIntrinsicHeight"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getIntrinsicWidth"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getLevel"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getMinimumHeight"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getMinimumWidth"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getOpacity"
+ return="int"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getPadding"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="padding" type="android.graphics.Rect">
+</parameter>
+</method>
+<method name="getState"
+ return="int[]"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getTransparentRegion"
+ return="android.graphics.Region"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="inflate"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="r" type="android.content.res.Resources">
+</parameter>
+<parameter name="parser" type="org.xmlpull.v1.XmlPullParser">
+</parameter>
+<parameter name="attrs" type="android.util.AttributeSet">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+<exception name="XmlPullParserException" type="org.xmlpull.v1.XmlPullParserException">
+</exception>
+</method>
+<method name="invalidateSelf"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isStateful"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isVisible"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="mutate"
+ return="android.graphics.drawable.Drawable"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="onBoundsChange"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="bounds" type="android.graphics.Rect">
+</parameter>
+</method>
+<method name="onLevelChange"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="level" type="int">
+</parameter>
+</method>
+<method name="onStateChange"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="state" type="int[]">
+</parameter>
+</method>
+<method name="resolveOpacity"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="op1" type="int">
+</parameter>
+<parameter name="op2" type="int">
+</parameter>
+</method>
+<method name="scheduleSelf"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="what" type="java.lang.Runnable">
+</parameter>
+<parameter name="when" type="long">
+</parameter>
+</method>
+<method name="setAlpha"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="alpha" type="int">
+</parameter>
+</method>
+<method name="setBounds"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="left" type="int">
+</parameter>
+<parameter name="top" type="int">
+</parameter>
+<parameter name="right" type="int">
+</parameter>
+<parameter name="bottom" type="int">
+</parameter>
+</method>
+<method name="setBounds"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="bounds" type="android.graphics.Rect">
+</parameter>
+</method>
+<method name="setCallback"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="cb" type="android.graphics.drawable.Drawable.Callback">
+</parameter>
+</method>
+<method name="setChangingConfigurations"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="configs" type="int">
+</parameter>
+</method>
+<method name="setColorFilter"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="cf" type="android.graphics.ColorFilter">
+</parameter>
+</method>
+<method name="setColorFilter"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="color" type="int">
+</parameter>
+<parameter name="mode" type="android.graphics.PorterDuff.Mode">
+</parameter>
+</method>
+<method name="setDither"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="dither" type="boolean">
+</parameter>
+</method>
+<method name="setFilterBitmap"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="filter" type="boolean">
+</parameter>
+</method>
+<method name="setLevel"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="level" type="int">
+</parameter>
+</method>
+<method name="setState"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="stateSet" type="int[]">
+</parameter>
+</method>
+<method name="setVisible"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="visible" type="boolean">
+</parameter>
+<parameter name="restart" type="boolean">
+</parameter>
+</method>
+<method name="unscheduleSelf"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="what" type="java.lang.Runnable">
+</parameter>
+</method>
+</class>
+<interface name="Drawable.Callback"
+ abstract="true"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="invalidateDrawable"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="who" type="android.graphics.drawable.Drawable">
+</parameter>
+</method>
+<method name="scheduleDrawable"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="who" type="android.graphics.drawable.Drawable">
+</parameter>
+<parameter name="what" type="java.lang.Runnable">
+</parameter>
+<parameter name="when" type="long">
+</parameter>
+</method>
+<method name="unscheduleDrawable"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="who" type="android.graphics.drawable.Drawable">
+</parameter>
+<parameter name="what" type="java.lang.Runnable">
+</parameter>
+</method>
+</interface>
+<class name="Drawable.ConstantState"
+ extends="java.lang.Object"
+ abstract="true"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="Drawable.ConstantState"
+ type="android.graphics.drawable.Drawable.ConstantState"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<method name="getChangingConfigurations"
+ return="int"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="newDrawable"
+ return="android.graphics.drawable.Drawable"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="newDrawable"
+ return="android.graphics.drawable.Drawable"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="res" type="android.content.res.Resources">
+</parameter>
+</method>
+</class>
+<class name="DrawableContainer"
+ extends="android.graphics.drawable.Drawable"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="android.graphics.drawable.Drawable.Callback">
+</implements>
+<constructor name="DrawableContainer"
+ type="android.graphics.drawable.DrawableContainer"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<method name="draw"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="canvas" type="android.graphics.Canvas">
+</parameter>
+</method>
+<method name="getOpacity"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="invalidateDrawable"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="who" type="android.graphics.drawable.Drawable">
+</parameter>
+</method>
+<method name="scheduleDrawable"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="who" type="android.graphics.drawable.Drawable">
+</parameter>
+<parameter name="what" type="java.lang.Runnable">
+</parameter>
+<parameter name="when" type="long">
+</parameter>
+</method>
+<method name="selectDrawable"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="idx" type="int">
+</parameter>
+</method>
+<method name="setAlpha"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="alpha" type="int">
+</parameter>
+</method>
+<method name="setColorFilter"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="cf" type="android.graphics.ColorFilter">
+</parameter>
+</method>
+<method name="setConstantState"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="state" type="android.graphics.drawable.DrawableContainer.DrawableContainerState">
+</parameter>
+</method>
+<method name="unscheduleDrawable"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="who" type="android.graphics.drawable.Drawable">
+</parameter>
+<parameter name="what" type="java.lang.Runnable">
+</parameter>
+</method>
+</class>
+<class name="DrawableContainer.DrawableContainerState"
+ extends="android.graphics.drawable.Drawable.ConstantState"
+ abstract="true"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="addChild"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="dr" type="android.graphics.drawable.Drawable">
+</parameter>
+</method>
+<method name="canConstantState"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getChangingConfigurations"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getChildCount"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getChildren"
+ return="android.graphics.drawable.Drawable[]"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getConstantHeight"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getConstantMinimumHeight"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getConstantMinimumWidth"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getConstantPadding"
+ return="android.graphics.Rect"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getConstantWidth"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getOpacity"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="growArray"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="oldSize" type="int">
+</parameter>
+<parameter name="newSize" type="int">
+</parameter>
+</method>
+<method name="isConstantSize"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isStateful"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="setConstantSize"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="constant" type="boolean">
+</parameter>
+</method>
+<method name="setVariablePadding"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="variable" type="boolean">
+</parameter>
+</method>
+</class>
+<class name="GradientDrawable"
+ extends="android.graphics.drawable.Drawable"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="GradientDrawable"
+ type="android.graphics.drawable.GradientDrawable"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<constructor name="GradientDrawable"
+ type="android.graphics.drawable.GradientDrawable"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="orientation" type="android.graphics.drawable.GradientDrawable.Orientation">
+</parameter>
+<parameter name="colors" type="int[]">
+</parameter>
+</constructor>
+<method name="draw"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="canvas" type="android.graphics.Canvas">
+</parameter>
+</method>
+<method name="getOpacity"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="setAlpha"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="alpha" type="int">
+</parameter>
+</method>
+<method name="setColor"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="argb" type="int">
+</parameter>
+</method>
+<method name="setColorFilter"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="cf" type="android.graphics.ColorFilter">
+</parameter>
+</method>
+<method name="setCornerRadii"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="radii" type="float[]">
+</parameter>
+</method>
+<method name="setCornerRadius"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="radius" type="float">
+</parameter>
+</method>
+<method name="setGradientCenter"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="x" type="float">
+</parameter>
+<parameter name="y" type="float">
+</parameter>
+</method>
+<method name="setGradientRadius"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="gradientRadius" type="float">
+</parameter>
+</method>
+<method name="setGradientType"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="gradient" type="int">
+</parameter>
+</method>
+<method name="setShape"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="shape" type="int">
+</parameter>
+</method>
+<method name="setSize"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="width" type="int">
+</parameter>
+<parameter name="height" type="int">
+</parameter>
+</method>
+<method name="setStroke"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="width" type="int">
+</parameter>
+<parameter name="color" type="int">
+</parameter>
+</method>
+<method name="setStroke"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="width" type="int">
+</parameter>
+<parameter name="color" type="int">
+</parameter>
+<parameter name="dashWidth" type="float">
+</parameter>
+<parameter name="dashGap" type="float">
+</parameter>
+</method>
+<method name="setUseLevel"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="useLevel" type="boolean">
+</parameter>
+</method>
+<field name="LINE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="LINEAR_GRADIENT"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="0"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="OVAL"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="RADIAL_GRADIENT"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="RECTANGLE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="0"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="RING"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="3"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="SWEEP_GRADIENT"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<class name="GradientDrawable.Orientation"
+ extends="java.lang.Enum"
+ abstract="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="valueOf"
+ return="android.graphics.drawable.GradientDrawable.Orientation"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+</method>
+<method name="values"
+ return="android.graphics.drawable.GradientDrawable.Orientation[]"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+</class>
+<class name="InsetDrawable"
+ extends="android.graphics.drawable.Drawable"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="android.graphics.drawable.Drawable.Callback">
+</implements>
+<constructor name="InsetDrawable"
+ type="android.graphics.drawable.InsetDrawable"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="drawable" type="android.graphics.drawable.Drawable">
+</parameter>
+<parameter name="inset" type="int">
+</parameter>
+</constructor>
+<constructor name="InsetDrawable"
+ type="android.graphics.drawable.InsetDrawable"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="drawable" type="android.graphics.drawable.Drawable">
+</parameter>
+<parameter name="insetLeft" type="int">
+</parameter>
+<parameter name="insetTop" type="int">
+</parameter>
+<parameter name="insetRight" type="int">
+</parameter>
+<parameter name="insetBottom" type="int">
+</parameter>
+</constructor>
+<method name="draw"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="canvas" type="android.graphics.Canvas">
+</parameter>
+</method>
+<method name="getOpacity"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="invalidateDrawable"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="who" type="android.graphics.drawable.Drawable">
+</parameter>
+</method>
+<method name="scheduleDrawable"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="who" type="android.graphics.drawable.Drawable">
+</parameter>
+<parameter name="what" type="java.lang.Runnable">
+</parameter>
+<parameter name="when" type="long">
+</parameter>
+</method>
+<method name="setAlpha"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="alpha" type="int">
+</parameter>
+</method>
+<method name="setColorFilter"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="cf" type="android.graphics.ColorFilter">
+</parameter>
+</method>
+<method name="unscheduleDrawable"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="who" type="android.graphics.drawable.Drawable">
+</parameter>
+<parameter name="what" type="java.lang.Runnable">
+</parameter>
+</method>
+</class>
+<class name="LayerDrawable"
+ extends="android.graphics.drawable.Drawable"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="android.graphics.drawable.Drawable.Callback">
+</implements>
+<constructor name="LayerDrawable"
+ type="android.graphics.drawable.LayerDrawable"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="layers" type="android.graphics.drawable.Drawable[]">
+</parameter>
+</constructor>
+<method name="draw"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="canvas" type="android.graphics.Canvas">
+</parameter>
+</method>
+<method name="findDrawableByLayerId"
+ return="android.graphics.drawable.Drawable"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="id" type="int">
+</parameter>
+</method>
+<method name="getDrawable"
+ return="android.graphics.drawable.Drawable"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="index" type="int">
+</parameter>
+</method>
+<method name="getId"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="index" type="int">
+</parameter>
+</method>
+<method name="getNumberOfLayers"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getOpacity"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="invalidateDrawable"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="who" type="android.graphics.drawable.Drawable">
+</parameter>
+</method>
+<method name="scheduleDrawable"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="who" type="android.graphics.drawable.Drawable">
+</parameter>
+<parameter name="what" type="java.lang.Runnable">
+</parameter>
+<parameter name="when" type="long">
+</parameter>
+</method>
+<method name="setAlpha"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="alpha" type="int">
+</parameter>
+</method>
+<method name="setColorFilter"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="cf" type="android.graphics.ColorFilter">
+</parameter>
+</method>
+<method name="setDrawableByLayerId"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="id" type="int">
+</parameter>
+<parameter name="drawable" type="android.graphics.drawable.Drawable">
+</parameter>
+</method>
+<method name="setId"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="index" type="int">
+</parameter>
+<parameter name="id" type="int">
+</parameter>
+</method>
+<method name="setLayerInset"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="index" type="int">
+</parameter>
+<parameter name="l" type="int">
+</parameter>
+<parameter name="t" type="int">
+</parameter>
+<parameter name="r" type="int">
+</parameter>
+<parameter name="b" type="int">
+</parameter>
+</method>
+<method name="unscheduleDrawable"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="who" type="android.graphics.drawable.Drawable">
+</parameter>
+<parameter name="what" type="java.lang.Runnable">
+</parameter>
+</method>
+</class>
+<class name="LevelListDrawable"
+ extends="android.graphics.drawable.DrawableContainer"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="LevelListDrawable"
+ type="android.graphics.drawable.LevelListDrawable"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<method name="addLevel"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="low" type="int">
+</parameter>
+<parameter name="high" type="int">
+</parameter>
+<parameter name="drawable" type="android.graphics.drawable.Drawable">
+</parameter>
+</method>
+</class>
+<class name="NinePatchDrawable"
+ extends="android.graphics.drawable.Drawable"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="NinePatchDrawable"
+ type="android.graphics.drawable.NinePatchDrawable"
+ static="false"
+ final="false"
+ deprecated="deprecated"
+ visibility="public"
+>
+<parameter name="bitmap" type="android.graphics.Bitmap">
+</parameter>
+<parameter name="chunk" type="byte[]">
+</parameter>
+<parameter name="padding" type="android.graphics.Rect">
+</parameter>
+<parameter name="srcName" type="java.lang.String">
+</parameter>
+</constructor>
+<constructor name="NinePatchDrawable"
+ type="android.graphics.drawable.NinePatchDrawable"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="res" type="android.content.res.Resources">
+</parameter>
+<parameter name="bitmap" type="android.graphics.Bitmap">
+</parameter>
+<parameter name="chunk" type="byte[]">
+</parameter>
+<parameter name="padding" type="android.graphics.Rect">
+</parameter>
+<parameter name="srcName" type="java.lang.String">
+</parameter>
+</constructor>
+<constructor name="NinePatchDrawable"
+ type="android.graphics.drawable.NinePatchDrawable"
+ static="false"
+ final="false"
+ deprecated="deprecated"
+ visibility="public"
+>
+<parameter name="patch" type="android.graphics.NinePatch">
+</parameter>
+</constructor>
+<constructor name="NinePatchDrawable"
+ type="android.graphics.drawable.NinePatchDrawable"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="res" type="android.content.res.Resources">
+</parameter>
+<parameter name="patch" type="android.graphics.NinePatch">
+</parameter>
+</constructor>
+<method name="draw"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="canvas" type="android.graphics.Canvas">
+</parameter>
+</method>
+<method name="getOpacity"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getPaint"
+ return="android.graphics.Paint"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="setAlpha"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="alpha" type="int">
+</parameter>
+</method>
+<method name="setColorFilter"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="cf" type="android.graphics.ColorFilter">
+</parameter>
+</method>
+<method name="setTargetDensity"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="canvas" type="android.graphics.Canvas">
+</parameter>
+</method>
+<method name="setTargetDensity"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="metrics" type="android.util.DisplayMetrics">
+</parameter>
+</method>
+<method name="setTargetDensity"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="density" type="int">
+</parameter>
+</method>
+</class>
+<class name="PaintDrawable"
+ extends="android.graphics.drawable.ShapeDrawable"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="PaintDrawable"
+ type="android.graphics.drawable.PaintDrawable"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<constructor name="PaintDrawable"
+ type="android.graphics.drawable.PaintDrawable"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="color" type="int">
+</parameter>
+</constructor>
+<method name="setCornerRadii"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="radii" type="float[]">
+</parameter>
+</method>
+<method name="setCornerRadius"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="radius" type="float">
+</parameter>
+</method>
+</class>
+<class name="PictureDrawable"
+ extends="android.graphics.drawable.Drawable"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="PictureDrawable"
+ type="android.graphics.drawable.PictureDrawable"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="picture" type="android.graphics.Picture">
+</parameter>
+</constructor>
+<method name="draw"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="canvas" type="android.graphics.Canvas">
+</parameter>
+</method>
+<method name="getOpacity"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getPicture"
+ return="android.graphics.Picture"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="setAlpha"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="alpha" type="int">
+</parameter>
+</method>
+<method name="setColorFilter"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="colorFilter" type="android.graphics.ColorFilter">
+</parameter>
+</method>
+<method name="setPicture"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="picture" type="android.graphics.Picture">
+</parameter>
+</method>
+</class>
+<class name="RotateDrawable"
+ extends="android.graphics.drawable.Drawable"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="android.graphics.drawable.Drawable.Callback">
+</implements>
+<constructor name="RotateDrawable"
+ type="android.graphics.drawable.RotateDrawable"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<method name="draw"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="canvas" type="android.graphics.Canvas">
+</parameter>
+</method>
+<method name="getDrawable"
+ return="android.graphics.drawable.Drawable"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getOpacity"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="invalidateDrawable"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="who" type="android.graphics.drawable.Drawable">
+</parameter>
+</method>
+<method name="scheduleDrawable"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="who" type="android.graphics.drawable.Drawable">
+</parameter>
+<parameter name="what" type="java.lang.Runnable">
+</parameter>
+<parameter name="when" type="long">
+</parameter>
+</method>
+<method name="setAlpha"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="alpha" type="int">
+</parameter>
+</method>
+<method name="setColorFilter"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="cf" type="android.graphics.ColorFilter">
+</parameter>
+</method>
+<method name="unscheduleDrawable"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="who" type="android.graphics.drawable.Drawable">
+</parameter>
+<parameter name="what" type="java.lang.Runnable">
+</parameter>
+</method>
+</class>
+<class name="ScaleDrawable"
+ extends="android.graphics.drawable.Drawable"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="android.graphics.drawable.Drawable.Callback">
+</implements>
+<constructor name="ScaleDrawable"
+ type="android.graphics.drawable.ScaleDrawable"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="drawable" type="android.graphics.drawable.Drawable">
+</parameter>
+<parameter name="gravity" type="int">
+</parameter>
+<parameter name="scaleWidth" type="float">
+</parameter>
+<parameter name="scaleHeight" type="float">
+</parameter>
+</constructor>
+<method name="draw"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="canvas" type="android.graphics.Canvas">
+</parameter>
+</method>
+<method name="getDrawable"
+ return="android.graphics.drawable.Drawable"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getOpacity"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="invalidateDrawable"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="who" type="android.graphics.drawable.Drawable">
+</parameter>
+</method>
+<method name="scheduleDrawable"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="who" type="android.graphics.drawable.Drawable">
+</parameter>
+<parameter name="what" type="java.lang.Runnable">
+</parameter>
+<parameter name="when" type="long">
+</parameter>
+</method>
+<method name="setAlpha"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="alpha" type="int">
+</parameter>
+</method>
+<method name="setColorFilter"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="cf" type="android.graphics.ColorFilter">
+</parameter>
+</method>
+<method name="unscheduleDrawable"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="who" type="android.graphics.drawable.Drawable">
+</parameter>
+<parameter name="what" type="java.lang.Runnable">
+</parameter>
+</method>
+</class>
+<class name="ShapeDrawable"
+ extends="android.graphics.drawable.Drawable"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="ShapeDrawable"
+ type="android.graphics.drawable.ShapeDrawable"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<constructor name="ShapeDrawable"
+ type="android.graphics.drawable.ShapeDrawable"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="s" type="android.graphics.drawable.shapes.Shape">
+</parameter>
+</constructor>
+<method name="draw"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="canvas" type="android.graphics.Canvas">
+</parameter>
+</method>
+<method name="getOpacity"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getPaint"
+ return="android.graphics.Paint"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getShaderFactory"
+ return="android.graphics.drawable.ShapeDrawable.ShaderFactory"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getShape"
+ return="android.graphics.drawable.shapes.Shape"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="inflateTag"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+<parameter name="r" type="android.content.res.Resources">
+</parameter>
+<parameter name="parser" type="org.xmlpull.v1.XmlPullParser">
+</parameter>
+<parameter name="attrs" type="android.util.AttributeSet">
+</parameter>
+</method>
+<method name="onDraw"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="shape" type="android.graphics.drawable.shapes.Shape">
+</parameter>
+<parameter name="canvas" type="android.graphics.Canvas">
+</parameter>
+<parameter name="paint" type="android.graphics.Paint">
+</parameter>
+</method>
+<method name="setAlpha"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="alpha" type="int">
+</parameter>
+</method>
+<method name="setColorFilter"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="cf" type="android.graphics.ColorFilter">
+</parameter>
+</method>
+<method name="setIntrinsicHeight"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="height" type="int">
+</parameter>
+</method>
+<method name="setIntrinsicWidth"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="width" type="int">
+</parameter>
+</method>
+<method name="setPadding"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="left" type="int">
+</parameter>
+<parameter name="top" type="int">
+</parameter>
+<parameter name="right" type="int">
+</parameter>
+<parameter name="bottom" type="int">
+</parameter>
+</method>
+<method name="setPadding"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="padding" type="android.graphics.Rect">
+</parameter>
+</method>
+<method name="setShaderFactory"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="fact" type="android.graphics.drawable.ShapeDrawable.ShaderFactory">
+</parameter>
+</method>
+<method name="setShape"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="s" type="android.graphics.drawable.shapes.Shape">
+</parameter>
+</method>
+</class>
+<class name="ShapeDrawable.ShaderFactory"
+ extends="java.lang.Object"
+ abstract="true"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="ShapeDrawable.ShaderFactory"
+ type="android.graphics.drawable.ShapeDrawable.ShaderFactory"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<method name="resize"
+ return="android.graphics.Shader"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="width" type="int">
+</parameter>
+<parameter name="height" type="int">
+</parameter>
+</method>
+</class>
+<class name="StateListDrawable"
+ extends="android.graphics.drawable.DrawableContainer"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="StateListDrawable"
+ type="android.graphics.drawable.StateListDrawable"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<method name="addState"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="stateSet" type="int[]">
+</parameter>
+<parameter name="drawable" type="android.graphics.drawable.Drawable">
+</parameter>
+</method>
+</class>
+<class name="TransitionDrawable"
+ extends="android.graphics.drawable.LayerDrawable"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="android.graphics.drawable.Drawable.Callback">
+</implements>
+<constructor name="TransitionDrawable"
+ type="android.graphics.drawable.TransitionDrawable"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="layers" type="android.graphics.drawable.Drawable[]">
+</parameter>
+</constructor>
+<method name="isCrossFadeEnabled"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="resetTransition"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="reverseTransition"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="duration" type="int">
+</parameter>
+</method>
+<method name="setCrossFadeEnabled"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="enabled" type="boolean">
+</parameter>
+</method>
+<method name="startTransition"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="durationMillis" type="int">
+</parameter>
+</method>
+</class>
+</package>
+<package name="android.graphics.drawable.shapes"
+>
+<class name="ArcShape"
+ extends="android.graphics.drawable.shapes.RectShape"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="ArcShape"
+ type="android.graphics.drawable.shapes.ArcShape"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="startAngle" type="float">
+</parameter>
+<parameter name="sweepAngle" type="float">
+</parameter>
+</constructor>
+</class>
+<class name="OvalShape"
+ extends="android.graphics.drawable.shapes.RectShape"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="OvalShape"
+ type="android.graphics.drawable.shapes.OvalShape"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+</class>
+<class name="PathShape"
+ extends="android.graphics.drawable.shapes.Shape"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="PathShape"
+ type="android.graphics.drawable.shapes.PathShape"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="path" type="android.graphics.Path">
+</parameter>
+<parameter name="stdWidth" type="float">
+</parameter>
+<parameter name="stdHeight" type="float">
+</parameter>
+</constructor>
+<method name="draw"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="canvas" type="android.graphics.Canvas">
+</parameter>
+<parameter name="paint" type="android.graphics.Paint">
+</parameter>
+</method>
+</class>
+<class name="RectShape"
+ extends="android.graphics.drawable.shapes.Shape"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="RectShape"
+ type="android.graphics.drawable.shapes.RectShape"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<method name="draw"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="canvas" type="android.graphics.Canvas">
+</parameter>
+<parameter name="paint" type="android.graphics.Paint">
+</parameter>
+</method>
+<method name="rect"
+ return="android.graphics.RectF"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</method>
+</class>
+<class name="RoundRectShape"
+ extends="android.graphics.drawable.shapes.RectShape"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="RoundRectShape"
+ type="android.graphics.drawable.shapes.RoundRectShape"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="outerRadii" type="float[]">
+</parameter>
+<parameter name="inset" type="android.graphics.RectF">
+</parameter>
+<parameter name="innerRadii" type="float[]">
+</parameter>
+</constructor>
+</class>
+<class name="Shape"
+ extends="java.lang.Object"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="java.lang.Cloneable">
+</implements>
+<constructor name="Shape"
+ type="android.graphics.drawable.shapes.Shape"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<method name="clone"
+ return="android.graphics.drawable.shapes.Shape"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="CloneNotSupportedException" type="java.lang.CloneNotSupportedException">
+</exception>
+</method>
+<method name="draw"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="canvas" type="android.graphics.Canvas">
+</parameter>
+<parameter name="paint" type="android.graphics.Paint">
+</parameter>
+</method>
+<method name="getHeight"
+ return="float"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getWidth"
+ return="float"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="hasAlpha"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="onResize"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="width" type="float">
+</parameter>
+<parameter name="height" type="float">
+</parameter>
+</method>
+<method name="resize"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="width" type="float">
+</parameter>
+<parameter name="height" type="float">
+</parameter>
+</method>
+</class>
+</package>
+<package name="android.hardware"
+>
+<class name="Camera"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="addCallbackBuffer"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="callbackBuffer" type="byte[]">
+</parameter>
+</method>
+<method name="autoFocus"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="cb" type="android.hardware.Camera.AutoFocusCallback">
+</parameter>
+</method>
+<method name="cancelAutoFocus"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getParameters"
+ return="android.hardware.Camera.Parameters"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="lock"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="open"
+ return="android.hardware.Camera"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="reconnect"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="release"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="setDisplayOrientation"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="degrees" type="int">
+</parameter>
+</method>
+<method name="setErrorCallback"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="cb" type="android.hardware.Camera.ErrorCallback">
+</parameter>
+</method>
+<method name="setOneShotPreviewCallback"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="cb" type="android.hardware.Camera.PreviewCallback">
+</parameter>
+</method>
+<method name="setParameters"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="params" type="android.hardware.Camera.Parameters">
+</parameter>
+</method>
+<method name="setPreviewCallback"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="cb" type="android.hardware.Camera.PreviewCallback">
+</parameter>
+</method>
+<method name="setPreviewCallbackWithBuffer"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="cb" type="android.hardware.Camera.PreviewCallback">
+</parameter>
+</method>
+<method name="setPreviewDisplay"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="holder" type="android.view.SurfaceHolder">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="setZoomChangeListener"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="listener" type="android.hardware.Camera.OnZoomChangeListener">
+</parameter>
+</method>
+<method name="startPreview"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="startSmoothZoom"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="value" type="int">
+</parameter>
+</method>
+<method name="stopPreview"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="stopSmoothZoom"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="takePicture"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="shutter" type="android.hardware.Camera.ShutterCallback">
+</parameter>
+<parameter name="raw" type="android.hardware.Camera.PictureCallback">
+</parameter>
+<parameter name="jpeg" type="android.hardware.Camera.PictureCallback">
+</parameter>
+</method>
+<method name="takePicture"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="shutter" type="android.hardware.Camera.ShutterCallback">
+</parameter>
+<parameter name="raw" type="android.hardware.Camera.PictureCallback">
+</parameter>
+<parameter name="postview" type="android.hardware.Camera.PictureCallback">
+</parameter>
+<parameter name="jpeg" type="android.hardware.Camera.PictureCallback">
+</parameter>
+</method>
+<method name="unlock"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<field name="CAMERA_ERROR_SERVER_DIED"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="100"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="CAMERA_ERROR_UNKNOWN"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<interface name="Camera.AutoFocusCallback"
+ abstract="true"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="onAutoFocus"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="success" type="boolean">
+</parameter>
+<parameter name="camera" type="android.hardware.Camera">
+</parameter>
+</method>
+</interface>
+<interface name="Camera.ErrorCallback"
+ abstract="true"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="onError"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="error" type="int">
+</parameter>
+<parameter name="camera" type="android.hardware.Camera">
+</parameter>
+</method>
+</interface>
+<interface name="Camera.OnZoomChangeListener"
+ abstract="true"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="onZoomChange"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="zoomValue" type="int">
+</parameter>
+<parameter name="stopped" type="boolean">
+</parameter>
+<parameter name="camera" type="android.hardware.Camera">
+</parameter>
+</method>
+</interface>
+<class name="Camera.Parameters"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="flatten"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="get"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="key" type="java.lang.String">
+</parameter>
+</method>
+<method name="getAntibanding"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getColorEffect"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getExposureCompensation"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getExposureCompensationStep"
+ return="float"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getFlashMode"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getFocalLength"
+ return="float"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getFocusMode"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getHorizontalViewAngle"
+ return="float"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getInt"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="key" type="java.lang.String">
+</parameter>
+</method>
+<method name="getJpegQuality"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getJpegThumbnailQuality"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getJpegThumbnailSize"
+ return="android.hardware.Camera.Size"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getMaxExposureCompensation"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getMaxZoom"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getMinExposureCompensation"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getPictureFormat"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getPictureSize"
+ return="android.hardware.Camera.Size"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getPreviewFormat"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getPreviewFrameRate"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getPreviewSize"
+ return="android.hardware.Camera.Size"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getSceneMode"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getSupportedAntibanding"
+ return="java.util.List&lt;java.lang.String&gt;"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getSupportedColorEffects"
+ return="java.util.List&lt;java.lang.String&gt;"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getSupportedFlashModes"
+ return="java.util.List&lt;java.lang.String&gt;"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getSupportedFocusModes"
+ return="java.util.List&lt;java.lang.String&gt;"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getSupportedJpegThumbnailSizes"
+ return="java.util.List&lt;android.hardware.Camera.Size&gt;"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getSupportedPictureFormats"
+ return="java.util.List&lt;java.lang.Integer&gt;"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getSupportedPictureSizes"
+ return="java.util.List&lt;android.hardware.Camera.Size&gt;"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getSupportedPreviewFormats"
+ return="java.util.List&lt;java.lang.Integer&gt;"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getSupportedPreviewFrameRates"
+ return="java.util.List&lt;java.lang.Integer&gt;"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getSupportedPreviewSizes"
+ return="java.util.List&lt;android.hardware.Camera.Size&gt;"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getSupportedSceneModes"
+ return="java.util.List&lt;java.lang.String&gt;"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getSupportedWhiteBalance"
+ return="java.util.List&lt;java.lang.String&gt;"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getVerticalViewAngle"
+ return="float"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getWhiteBalance"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getZoom"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getZoomRatios"
+ return="java.util.List&lt;java.lang.Integer&gt;"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isSmoothZoomSupported"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isZoomSupported"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="remove"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="key" type="java.lang.String">
+</parameter>
+</method>
+<method name="removeGpsData"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="set"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="key" type="java.lang.String">
+</parameter>
+<parameter name="value" type="java.lang.String">
+</parameter>
+</method>
+<method name="set"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="key" type="java.lang.String">
+</parameter>
+<parameter name="value" type="int">
+</parameter>
+</method>
+<method name="setAntibanding"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="antibanding" type="java.lang.String">
+</parameter>
+</method>
+<method name="setColorEffect"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="value" type="java.lang.String">
+</parameter>
+</method>
+<method name="setExposureCompensation"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="value" type="int">
+</parameter>
+</method>
+<method name="setFlashMode"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="value" type="java.lang.String">
+</parameter>
+</method>
+<method name="setFocusMode"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="value" type="java.lang.String">
+</parameter>
+</method>
+<method name="setGpsAltitude"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="altitude" type="double">
+</parameter>
+</method>
+<method name="setGpsLatitude"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="latitude" type="double">
+</parameter>
+</method>
+<method name="setGpsLongitude"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="longitude" type="double">
+</parameter>
+</method>
+<method name="setGpsProcessingMethod"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="processing_method" type="java.lang.String">
+</parameter>
+</method>
+<method name="setGpsTimestamp"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="timestamp" type="long">
+</parameter>
+</method>
+<method name="setJpegQuality"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="quality" type="int">
+</parameter>
+</method>
+<method name="setJpegThumbnailQuality"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="quality" type="int">
+</parameter>
+</method>
+<method name="setJpegThumbnailSize"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="width" type="int">
+</parameter>
+<parameter name="height" type="int">
+</parameter>
+</method>
+<method name="setPictureFormat"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="pixel_format" type="int">
+</parameter>
+</method>
+<method name="setPictureSize"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="width" type="int">
+</parameter>
+<parameter name="height" type="int">
+</parameter>
+</method>
+<method name="setPreviewFormat"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="pixel_format" type="int">
+</parameter>
+</method>
+<method name="setPreviewFrameRate"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="fps" type="int">
+</parameter>
+</method>
+<method name="setPreviewSize"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="width" type="int">
+</parameter>
+<parameter name="height" type="int">
+</parameter>
+</method>
+<method name="setRotation"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="rotation" type="int">
+</parameter>
+</method>
+<method name="setSceneMode"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="value" type="java.lang.String">
+</parameter>
+</method>
+<method name="setWhiteBalance"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="value" type="java.lang.String">
+</parameter>
+</method>
+<method name="setZoom"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="value" type="int">
+</parameter>
+</method>
+<method name="unflatten"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="flattened" type="java.lang.String">
+</parameter>
+</method>
+<field name="ANTIBANDING_50HZ"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;50hz&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ANTIBANDING_60HZ"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;60hz&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ANTIBANDING_AUTO"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;auto&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ANTIBANDING_OFF"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;off&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="EFFECT_AQUA"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;aqua&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="EFFECT_BLACKBOARD"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;blackboard&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="EFFECT_MONO"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;mono&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="EFFECT_NEGATIVE"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;negative&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="EFFECT_NONE"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;none&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="EFFECT_POSTERIZE"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;posterize&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="EFFECT_SEPIA"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;sepia&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="EFFECT_SOLARIZE"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;solarize&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="EFFECT_WHITEBOARD"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;whiteboard&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="FLASH_MODE_AUTO"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;auto&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="FLASH_MODE_OFF"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;off&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="FLASH_MODE_ON"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;on&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="FLASH_MODE_RED_EYE"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;red-eye&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="FLASH_MODE_TORCH"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;torch&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="FOCUS_MODE_AUTO"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;auto&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="FOCUS_MODE_EDOF"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;edof&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="FOCUS_MODE_FIXED"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;fixed&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="FOCUS_MODE_INFINITY"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;infinity&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="FOCUS_MODE_MACRO"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;macro&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="SCENE_MODE_ACTION"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;action&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="SCENE_MODE_AUTO"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;auto&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="SCENE_MODE_BARCODE"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;barcode&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="SCENE_MODE_BEACH"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;beach&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="SCENE_MODE_CANDLELIGHT"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;candlelight&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="SCENE_MODE_FIREWORKS"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;fireworks&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="SCENE_MODE_LANDSCAPE"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;landscape&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="SCENE_MODE_NIGHT"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;night&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="SCENE_MODE_NIGHT_PORTRAIT"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;night-portrait&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="SCENE_MODE_PARTY"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;party&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="SCENE_MODE_PORTRAIT"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;portrait&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="SCENE_MODE_SNOW"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;snow&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="SCENE_MODE_SPORTS"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;sports&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="SCENE_MODE_STEADYPHOTO"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;steadyphoto&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="SCENE_MODE_SUNSET"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;sunset&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="SCENE_MODE_THEATRE"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;theatre&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="WHITE_BALANCE_AUTO"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;auto&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="WHITE_BALANCE_CLOUDY_DAYLIGHT"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;cloudy-daylight&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="WHITE_BALANCE_DAYLIGHT"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;daylight&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="WHITE_BALANCE_FLUORESCENT"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;fluorescent&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="WHITE_BALANCE_INCANDESCENT"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;incandescent&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="WHITE_BALANCE_SHADE"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;shade&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="WHITE_BALANCE_TWILIGHT"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;twilight&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="WHITE_BALANCE_WARM_FLUORESCENT"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;warm-fluorescent&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<interface name="Camera.PictureCallback"
+ abstract="true"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="onPictureTaken"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="data" type="byte[]">
+</parameter>
+<parameter name="camera" type="android.hardware.Camera">
+</parameter>
+</method>
+</interface>
+<interface name="Camera.PreviewCallback"
+ abstract="true"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="onPreviewFrame"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="data" type="byte[]">
+</parameter>
+<parameter name="camera" type="android.hardware.Camera">
+</parameter>
+</method>
+</interface>
+<interface name="Camera.ShutterCallback"
+ abstract="true"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="onShutter"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+</interface>
+<class name="Camera.Size"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="Camera.Size"
+ type="android.hardware.Camera.Size"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="w" type="int">
+</parameter>
+<parameter name="h" type="int">
+</parameter>
+</constructor>
+<field name="height"
+ type="int"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="width"
+ type="int"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<class name="GeomagneticField"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="GeomagneticField"
+ type="android.hardware.GeomagneticField"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="gdLatitudeDeg" type="float">
+</parameter>
+<parameter name="gdLongitudeDeg" type="float">
+</parameter>
+<parameter name="altitudeMeters" type="float">
+</parameter>
+<parameter name="timeMillis" type="long">
+</parameter>
+</constructor>
+<method name="getDeclination"
+ return="float"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getFieldStrength"
+ return="float"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getHorizontalStrength"
+ return="float"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getInclination"
+ return="float"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getX"
+ return="float"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getY"
+ return="float"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getZ"
+ return="float"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+</class>
+<class name="Sensor"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="getMaximumRange"
+ return="float"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getName"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getPower"
+ return="float"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getResolution"
+ return="float"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getType"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getVendor"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getVersion"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<field name="TYPE_ACCELEROMETER"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TYPE_ALL"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="-1"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TYPE_GYROSCOPE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="4"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TYPE_LIGHT"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="5"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TYPE_MAGNETIC_FIELD"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TYPE_ORIENTATION"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="3"
+ static="true"
+ final="true"
+ deprecated="deprecated"
+ visibility="public"
+>
+</field>
+<field name="TYPE_PRESSURE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="6"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TYPE_PROXIMITY"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="8"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TYPE_TEMPERATURE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="7"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<class name="SensorEvent"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<field name="accuracy"
+ type="int"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="sensor"
+ type="android.hardware.Sensor"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="timestamp"
+ type="long"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="values"
+ type="float[]"
+ transient="false"
+ volatile="false"
+ value="null"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<interface name="SensorEventListener"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="onAccuracyChanged"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="sensor" type="android.hardware.Sensor">
+</parameter>
+<parameter name="accuracy" type="int">
+</parameter>
+</method>
+<method name="onSensorChanged"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="event" type="android.hardware.SensorEvent">
+</parameter>
+</method>
+</interface>
+<interface name="SensorListener"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="deprecated"
+ visibility="public"
+>
+<method name="onAccuracyChanged"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="sensor" type="int">
+</parameter>
+<parameter name="accuracy" type="int">
+</parameter>
+</method>
+<method name="onSensorChanged"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="sensor" type="int">
+</parameter>
+<parameter name="values" type="float[]">
+</parameter>
+</method>
+</interface>
+<class name="SensorManager"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="getDefaultSensor"
+ return="android.hardware.Sensor"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="type" type="int">
+</parameter>
+</method>
+<method name="getInclination"
+ return="float"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="I" type="float[]">
+</parameter>
+</method>
+<method name="getOrientation"
+ return="float[]"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="R" type="float[]">
+</parameter>
+<parameter name="values" type="float[]">
+</parameter>
+</method>
+<method name="getRotationMatrix"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="R" type="float[]">
+</parameter>
+<parameter name="I" type="float[]">
+</parameter>
+<parameter name="gravity" type="float[]">
+</parameter>
+<parameter name="geomagnetic" type="float[]">
+</parameter>
+</method>
+<method name="getSensorList"
+ return="java.util.List&lt;android.hardware.Sensor&gt;"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="type" type="int">
+</parameter>
+</method>
+<method name="getSensors"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="deprecated"
+ visibility="public"
+>
+</method>
+<method name="registerListener"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="deprecated"
+ visibility="public"
+>
+<parameter name="listener" type="android.hardware.SensorListener">
+</parameter>
+<parameter name="sensors" type="int">
+</parameter>
+</method>
+<method name="registerListener"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="deprecated"
+ visibility="public"
+>
+<parameter name="listener" type="android.hardware.SensorListener">
+</parameter>
+<parameter name="sensors" type="int">
+</parameter>
+<parameter name="rate" type="int">
+</parameter>
+</method>
+<method name="registerListener"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="listener" type="android.hardware.SensorEventListener">
+</parameter>
+<parameter name="sensor" type="android.hardware.Sensor">
+</parameter>
+<parameter name="rate" type="int">
+</parameter>
+</method>
+<method name="registerListener"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="listener" type="android.hardware.SensorEventListener">
+</parameter>
+<parameter name="sensor" type="android.hardware.Sensor">
+</parameter>
+<parameter name="rate" type="int">
+</parameter>
+<parameter name="handler" type="android.os.Handler">
+</parameter>
+</method>
+<method name="remapCoordinateSystem"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="inR" type="float[]">
+</parameter>
+<parameter name="X" type="int">
+</parameter>
+<parameter name="Y" type="int">
+</parameter>
+<parameter name="outR" type="float[]">
+</parameter>
+</method>
+<method name="unregisterListener"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="deprecated"
+ visibility="public"
+>
+<parameter name="listener" type="android.hardware.SensorListener">
+</parameter>
+<parameter name="sensors" type="int">
+</parameter>
+</method>
+<method name="unregisterListener"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="deprecated"
+ visibility="public"
+>
+<parameter name="listener" type="android.hardware.SensorListener">
+</parameter>
+</method>
+<method name="unregisterListener"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="listener" type="android.hardware.SensorEventListener">
+</parameter>
+<parameter name="sensor" type="android.hardware.Sensor">
+</parameter>
+</method>
+<method name="unregisterListener"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="listener" type="android.hardware.SensorEventListener">
+</parameter>
+</method>
+<field name="AXIS_MINUS_X"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="129"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="AXIS_MINUS_Y"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="130"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="AXIS_MINUS_Z"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="131"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="AXIS_X"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="AXIS_Y"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="AXIS_Z"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="3"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="DATA_X"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="0"
+ static="true"
+ final="true"
+ deprecated="deprecated"
+ visibility="public"
+>
+</field>
+<field name="DATA_Y"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1"
+ static="true"
+ final="true"
+ deprecated="deprecated"
+ visibility="public"
+>
+</field>
+<field name="DATA_Z"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2"
+ static="true"
+ final="true"
+ deprecated="deprecated"
+ visibility="public"
+>
+</field>
+<field name="GRAVITY_DEATH_STAR_I"
+ type="float"
+ transient="false"
+ volatile="false"
+ value="3.5303614E-7f"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GRAVITY_EARTH"
+ type="float"
+ transient="false"
+ volatile="false"
+ value="9.80665f"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GRAVITY_JUPITER"
+ type="float"
+ transient="false"
+ volatile="false"
+ value="23.12f"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GRAVITY_MARS"
+ type="float"
+ transient="false"
+ volatile="false"
+ value="3.71f"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GRAVITY_MERCURY"
+ type="float"
+ transient="false"
+ volatile="false"
+ value="3.7f"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GRAVITY_MOON"
+ type="float"
+ transient="false"
+ volatile="false"
+ value="1.6f"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GRAVITY_NEPTUNE"
+ type="float"
+ transient="false"
+ volatile="false"
+ value="11.0f"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GRAVITY_PLUTO"
+ type="float"
+ transient="false"
+ volatile="false"
+ value="0.6f"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GRAVITY_SATURN"
+ type="float"
+ transient="false"
+ volatile="false"
+ value="8.96f"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GRAVITY_SUN"
+ type="float"
+ transient="false"
+ volatile="false"
+ value="275.0f"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GRAVITY_THE_ISLAND"
+ type="float"
+ transient="false"
+ volatile="false"
+ value="4.815162f"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GRAVITY_URANUS"
+ type="float"
+ transient="false"
+ volatile="false"
+ value="8.69f"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GRAVITY_VENUS"
+ type="float"
+ transient="false"
+ volatile="false"
+ value="8.87f"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="LIGHT_CLOUDY"
+ type="float"
+ transient="false"
+ volatile="false"
+ value="100.0f"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="LIGHT_FULLMOON"
+ type="float"
+ transient="false"
+ volatile="false"
+ value="0.25f"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="LIGHT_NO_MOON"
+ type="float"
+ transient="false"
+ volatile="false"
+ value="0.0010f"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="LIGHT_OVERCAST"
+ type="float"
+ transient="false"
+ volatile="false"
+ value="10000.0f"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="LIGHT_SHADE"
+ type="float"
+ transient="false"
+ volatile="false"
+ value="20000.0f"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="LIGHT_SUNLIGHT"
+ type="float"
+ transient="false"
+ volatile="false"
+ value="110000.0f"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="LIGHT_SUNLIGHT_MAX"
+ type="float"
+ transient="false"
+ volatile="false"
+ value="120000.0f"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="LIGHT_SUNRISE"
+ type="float"
+ transient="false"
+ volatile="false"
+ value="400.0f"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="MAGNETIC_FIELD_EARTH_MAX"
+ type="float"
+ transient="false"
+ volatile="false"
+ value="60.0f"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="MAGNETIC_FIELD_EARTH_MIN"
+ type="float"
+ transient="false"
+ volatile="false"
+ value="30.0f"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="RAW_DATA_INDEX"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="3"
+ static="true"
+ final="true"
+ deprecated="deprecated"
+ visibility="public"
+>
+</field>
+<field name="RAW_DATA_X"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="3"
+ static="true"
+ final="true"
+ deprecated="deprecated"
+ visibility="public"
+>
+</field>
+<field name="RAW_DATA_Y"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="4"
+ static="true"
+ final="true"
+ deprecated="deprecated"
+ visibility="public"
+>
+</field>
+<field name="RAW_DATA_Z"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="5"
+ static="true"
+ final="true"
+ deprecated="deprecated"
+ visibility="public"
+>
+</field>
+<field name="SENSOR_ACCELEROMETER"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2"
+ static="true"
+ final="true"
+ deprecated="deprecated"
+ visibility="public"
+>
+</field>
+<field name="SENSOR_ALL"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="127"
+ static="true"
+ final="true"
+ deprecated="deprecated"
+ visibility="public"
+>
+</field>
+<field name="SENSOR_DELAY_FASTEST"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="0"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="SENSOR_DELAY_GAME"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="SENSOR_DELAY_NORMAL"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="3"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="SENSOR_DELAY_UI"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="SENSOR_LIGHT"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16"
+ static="true"
+ final="true"
+ deprecated="deprecated"
+ visibility="public"
+>
+</field>
+<field name="SENSOR_MAGNETIC_FIELD"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="8"
+ static="true"
+ final="true"
+ deprecated="deprecated"
+ visibility="public"
+>
+</field>
+<field name="SENSOR_MAX"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="64"
+ static="true"
+ final="true"
+ deprecated="deprecated"
+ visibility="public"
+>
+</field>
+<field name="SENSOR_MIN"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1"
+ static="true"
+ final="true"
+ deprecated="deprecated"
+ visibility="public"
+>
+</field>
+<field name="SENSOR_ORIENTATION"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1"
+ static="true"
+ final="true"
+ deprecated="deprecated"
+ visibility="public"
+>
+</field>
+<field name="SENSOR_ORIENTATION_RAW"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="128"
+ static="true"
+ final="true"
+ deprecated="deprecated"
+ visibility="public"
+>
+</field>
+<field name="SENSOR_PROXIMITY"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="32"
+ static="true"
+ final="true"
+ deprecated="deprecated"
+ visibility="public"
+>
+</field>
+<field name="SENSOR_STATUS_ACCURACY_HIGH"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="3"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="SENSOR_STATUS_ACCURACY_LOW"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="SENSOR_STATUS_ACCURACY_MEDIUM"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="SENSOR_STATUS_UNRELIABLE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="0"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="SENSOR_TEMPERATURE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="4"
+ static="true"
+ final="true"
+ deprecated="deprecated"
+ visibility="public"
+>
+</field>
+<field name="SENSOR_TRICORDER"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="64"
+ static="true"
+ final="true"
+ deprecated="deprecated"
+ visibility="public"
+>
+</field>
+<field name="STANDARD_GRAVITY"
+ type="float"
+ transient="false"
+ volatile="false"
+ value="9.80665f"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+</package>
+<package name="android.inputmethodservice"
+>
+<class name="AbstractInputMethodService"
+ extends="android.app.Service"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="android.view.KeyEvent.Callback">
+</implements>
+<constructor name="AbstractInputMethodService"
+ type="android.inputmethodservice.AbstractInputMethodService"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<method name="getKeyDispatcherState"
+ return="android.view.KeyEvent.DispatcherState"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="onBind"
+ return="android.os.IBinder"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="intent" type="android.content.Intent">
+</parameter>
+</method>
+<method name="onCreateInputMethodInterface"
+ return="android.inputmethodservice.AbstractInputMethodService.AbstractInputMethodImpl"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="onCreateInputMethodSessionInterface"
+ return="android.inputmethodservice.AbstractInputMethodService.AbstractInputMethodSessionImpl"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="onTrackballEvent"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="event" type="android.view.MotionEvent">
+</parameter>
+</method>
+</class>
+<class name="AbstractInputMethodService.AbstractInputMethodImpl"
+ extends="java.lang.Object"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="android.view.inputmethod.InputMethod">
+</implements>
+<constructor name="AbstractInputMethodService.AbstractInputMethodImpl"
+ type="android.inputmethodservice.AbstractInputMethodService.AbstractInputMethodImpl"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<method name="createSession"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="callback" type="android.view.inputmethod.InputMethod.SessionCallback">
+</parameter>
+</method>
+<method name="revokeSession"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="session" type="android.view.inputmethod.InputMethodSession">
+</parameter>
+</method>
+<method name="setSessionEnabled"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="session" type="android.view.inputmethod.InputMethodSession">
+</parameter>
+<parameter name="enabled" type="boolean">
+</parameter>
+</method>
+</class>
+<class name="AbstractInputMethodService.AbstractInputMethodSessionImpl"
+ extends="java.lang.Object"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="android.view.inputmethod.InputMethodSession">
+</implements>
+<constructor name="AbstractInputMethodService.AbstractInputMethodSessionImpl"
+ type="android.inputmethodservice.AbstractInputMethodService.AbstractInputMethodSessionImpl"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<method name="dispatchKeyEvent"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="seq" type="int">
+</parameter>
+<parameter name="event" type="android.view.KeyEvent">
+</parameter>
+<parameter name="callback" type="android.view.inputmethod.InputMethodSession.EventCallback">
+</parameter>
+</method>
+<method name="dispatchTrackballEvent"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="seq" type="int">
+</parameter>
+<parameter name="event" type="android.view.MotionEvent">
+</parameter>
+<parameter name="callback" type="android.view.inputmethod.InputMethodSession.EventCallback">
+</parameter>
+</method>
+<method name="isEnabled"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isRevoked"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="revokeSelf"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="setEnabled"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="enabled" type="boolean">
+</parameter>
+</method>
+</class>
+<class name="ExtractEditText"
+ extends="android.widget.EditText"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="ExtractEditText"
+ type="android.inputmethodservice.ExtractEditText"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="context" type="android.content.Context">
+</parameter>
+</constructor>
+<constructor name="ExtractEditText"
+ type="android.inputmethodservice.ExtractEditText"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="context" type="android.content.Context">
+</parameter>
+<parameter name="attrs" type="android.util.AttributeSet">
+</parameter>
+</constructor>
+<constructor name="ExtractEditText"
+ type="android.inputmethodservice.ExtractEditText"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="context" type="android.content.Context">
+</parameter>
+<parameter name="attrs" type="android.util.AttributeSet">
+</parameter>
+<parameter name="defStyle" type="int">
+</parameter>
+</constructor>
+<method name="finishInternalChanges"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="hasVerticalScrollBar"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="startInternalChanges"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+</class>
+<class name="InputMethodService"
+ extends="android.inputmethodservice.AbstractInputMethodService"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="InputMethodService"
+ type="android.inputmethodservice.InputMethodService"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<method name="getCandidatesHiddenVisibility"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getCurrentInputBinding"
+ return="android.view.inputmethod.InputBinding"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getCurrentInputConnection"
+ return="android.view.inputmethod.InputConnection"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getCurrentInputEditorInfo"
+ return="android.view.inputmethod.EditorInfo"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getCurrentInputStarted"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getLayoutInflater"
+ return="android.view.LayoutInflater"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getMaxWidth"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getTextForImeAction"
+ return="java.lang.CharSequence"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="imeOptions" type="int">
+</parameter>
+</method>
+<method name="getWindow"
+ return="android.app.Dialog"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="hideStatusIcon"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="hideWindow"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isExtractViewShown"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isFullscreenMode"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isInputViewShown"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isShowInputRequested"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="onAppPrivateCommand"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="action" type="java.lang.String">
+</parameter>
+<parameter name="data" type="android.os.Bundle">
+</parameter>
+</method>
+<method name="onBindInput"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="onComputeInsets"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="outInsets" type="android.inputmethodservice.InputMethodService.Insets">
+</parameter>
+</method>
+<method name="onConfigureWindow"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="win" type="android.view.Window">
+</parameter>
+<parameter name="isFullscreen" type="boolean">
+</parameter>
+<parameter name="isCandidatesOnly" type="boolean">
+</parameter>
+</method>
+<method name="onCreateCandidatesView"
+ return="android.view.View"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="onCreateExtractTextView"
+ return="android.view.View"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="onCreateInputMethodInterface"
+ return="android.inputmethodservice.AbstractInputMethodService.AbstractInputMethodImpl"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="onCreateInputMethodSessionInterface"
+ return="android.inputmethodservice.AbstractInputMethodService.AbstractInputMethodSessionImpl"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="onCreateInputView"
+ return="android.view.View"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="onDisplayCompletions"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="completions" type="android.view.inputmethod.CompletionInfo[]">
+</parameter>
+</method>
+<method name="onEvaluateFullscreenMode"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="onEvaluateInputViewShown"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="onExtractTextContextMenuItem"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="id" type="int">
+</parameter>
+</method>
+<method name="onExtractedCursorMovement"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="dx" type="int">
+</parameter>
+<parameter name="dy" type="int">
+</parameter>
+</method>
+<method name="onExtractedSelectionChanged"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="start" type="int">
+</parameter>
+<parameter name="end" type="int">
+</parameter>
+</method>
+<method name="onExtractedTextClicked"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="onExtractingInputChanged"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="ei" type="android.view.inputmethod.EditorInfo">
+</parameter>
+</method>
+<method name="onFinishCandidatesView"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="finishingInput" type="boolean">
+</parameter>
+</method>
+<method name="onFinishInput"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="onFinishInputView"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="finishingInput" type="boolean">
+</parameter>
+</method>
+<method name="onInitializeInterface"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="onKeyDown"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="keyCode" type="int">
+</parameter>
+<parameter name="event" type="android.view.KeyEvent">
+</parameter>
+</method>
+<method name="onKeyLongPress"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="keyCode" type="int">
+</parameter>
+<parameter name="event" type="android.view.KeyEvent">
+</parameter>
+</method>
+<method name="onKeyMultiple"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="keyCode" type="int">
+</parameter>
+<parameter name="count" type="int">
+</parameter>
+<parameter name="event" type="android.view.KeyEvent">
+</parameter>
+</method>
+<method name="onKeyUp"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="keyCode" type="int">
+</parameter>
+<parameter name="event" type="android.view.KeyEvent">
+</parameter>
+</method>
+<method name="onShowInputRequested"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="flags" type="int">
+</parameter>
+<parameter name="configChange" type="boolean">
+</parameter>
+</method>
+<method name="onStartCandidatesView"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="info" type="android.view.inputmethod.EditorInfo">
+</parameter>
+<parameter name="restarting" type="boolean">
+</parameter>
+</method>
+<method name="onStartInput"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="attribute" type="android.view.inputmethod.EditorInfo">
+</parameter>
+<parameter name="restarting" type="boolean">
+</parameter>
+</method>
+<method name="onStartInputView"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="info" type="android.view.inputmethod.EditorInfo">
+</parameter>
+<parameter name="restarting" type="boolean">
+</parameter>
+</method>
+<method name="onUnbindInput"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="onUpdateCursor"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="newCursor" type="android.graphics.Rect">
+</parameter>
+</method>
+<method name="onUpdateExtractedText"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="token" type="int">
+</parameter>
+<parameter name="text" type="android.view.inputmethod.ExtractedText">
+</parameter>
+</method>
+<method name="onUpdateExtractingViews"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="ei" type="android.view.inputmethod.EditorInfo">
+</parameter>
+</method>
+<method name="onUpdateExtractingVisibility"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="ei" type="android.view.inputmethod.EditorInfo">
+</parameter>
+</method>
+<method name="onUpdateSelection"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="oldSelStart" type="int">
+</parameter>
+<parameter name="oldSelEnd" type="int">
+</parameter>
+<parameter name="newSelStart" type="int">
+</parameter>
+<parameter name="newSelEnd" type="int">
+</parameter>
+<parameter name="candidatesStart" type="int">
+</parameter>
+<parameter name="candidatesEnd" type="int">
+</parameter>
+</method>
+<method name="onWindowHidden"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="onWindowShown"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="requestHideSelf"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="flags" type="int">
+</parameter>
+</method>
+<method name="sendDefaultEditorAction"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="fromEnterKey" type="boolean">
+</parameter>
+</method>
+<method name="sendDownUpKeyEvents"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="keyEventCode" type="int">
+</parameter>
+</method>
+<method name="sendKeyChar"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="charCode" type="char">
+</parameter>
+</method>
+<method name="setCandidatesView"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="view" type="android.view.View">
+</parameter>
+</method>
+<method name="setCandidatesViewShown"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="shown" type="boolean">
+</parameter>
+</method>
+<method name="setExtractView"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="view" type="android.view.View">
+</parameter>
+</method>
+<method name="setExtractViewShown"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="shown" type="boolean">
+</parameter>
+</method>
+<method name="setInputView"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="view" type="android.view.View">
+</parameter>
+</method>
+<method name="showStatusIcon"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="iconResId" type="int">
+</parameter>
+</method>
+<method name="showWindow"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="showInput" type="boolean">
+</parameter>
+</method>
+<method name="switchInputMethod"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="id" type="java.lang.String">
+</parameter>
+</method>
+<method name="updateFullscreenMode"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="updateInputViewShown"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+</class>
+<class name="InputMethodService.InputMethodImpl"
+ extends="android.inputmethodservice.AbstractInputMethodService.AbstractInputMethodImpl"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="InputMethodService.InputMethodImpl"
+ type="android.inputmethodservice.InputMethodService.InputMethodImpl"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<method name="attachToken"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="token" type="android.os.IBinder">
+</parameter>
+</method>
+<method name="bindInput"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="binding" type="android.view.inputmethod.InputBinding">
+</parameter>
+</method>
+<method name="hideSoftInput"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="flags" type="int">
+</parameter>
+<parameter name="resultReceiver" type="android.os.ResultReceiver">
+</parameter>
+</method>
+<method name="restartInput"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="ic" type="android.view.inputmethod.InputConnection">
+</parameter>
+<parameter name="attribute" type="android.view.inputmethod.EditorInfo">
+</parameter>
+</method>
+<method name="showSoftInput"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="flags" type="int">
+</parameter>
+<parameter name="resultReceiver" type="android.os.ResultReceiver">
+</parameter>
+</method>
+<method name="startInput"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="ic" type="android.view.inputmethod.InputConnection">
+</parameter>
+<parameter name="attribute" type="android.view.inputmethod.EditorInfo">
+</parameter>
+</method>
+<method name="unbindInput"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+</class>
+<class name="InputMethodService.InputMethodSessionImpl"
+ extends="android.inputmethodservice.AbstractInputMethodService.AbstractInputMethodSessionImpl"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="InputMethodService.InputMethodSessionImpl"
+ type="android.inputmethodservice.InputMethodService.InputMethodSessionImpl"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<method name="appPrivateCommand"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="action" type="java.lang.String">
+</parameter>
+<parameter name="data" type="android.os.Bundle">
+</parameter>
+</method>
+<method name="displayCompletions"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="completions" type="android.view.inputmethod.CompletionInfo[]">
+</parameter>
+</method>
+<method name="finishInput"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="toggleSoftInput"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="showFlags" type="int">
+</parameter>
+<parameter name="hideFlags" type="int">
+</parameter>
+</method>
+<method name="updateCursor"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="newCursor" type="android.graphics.Rect">
+</parameter>
+</method>
+<method name="updateExtractedText"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="token" type="int">
+</parameter>
+<parameter name="text" type="android.view.inputmethod.ExtractedText">
+</parameter>
+</method>
+<method name="updateSelection"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="oldSelStart" type="int">
+</parameter>
+<parameter name="oldSelEnd" type="int">
+</parameter>
+<parameter name="newSelStart" type="int">
+</parameter>
+<parameter name="newSelEnd" type="int">
+</parameter>
+<parameter name="candidatesStart" type="int">
+</parameter>
+<parameter name="candidatesEnd" type="int">
+</parameter>
+</method>
+</class>
+<class name="InputMethodService.Insets"
+ extends="java.lang.Object"
+ abstract="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="InputMethodService.Insets"
+ type="android.inputmethodservice.InputMethodService.Insets"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<field name="TOUCHABLE_INSETS_CONTENT"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TOUCHABLE_INSETS_FRAME"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="0"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TOUCHABLE_INSETS_VISIBLE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="contentTopInsets"
+ type="int"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="touchableInsets"
+ type="int"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="visibleTopInsets"
+ type="int"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<class name="Keyboard"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="Keyboard"
+ type="android.inputmethodservice.Keyboard"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="context" type="android.content.Context">
+</parameter>
+<parameter name="xmlLayoutResId" type="int">
+</parameter>
+</constructor>
+<constructor name="Keyboard"
+ type="android.inputmethodservice.Keyboard"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="context" type="android.content.Context">
+</parameter>
+<parameter name="xmlLayoutResId" type="int">
+</parameter>
+<parameter name="modeId" type="int">
+</parameter>
+</constructor>
+<constructor name="Keyboard"
+ type="android.inputmethodservice.Keyboard"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="context" type="android.content.Context">
+</parameter>
+<parameter name="layoutTemplateResId" type="int">
+</parameter>
+<parameter name="characters" type="java.lang.CharSequence">
+</parameter>
+<parameter name="columns" type="int">
+</parameter>
+<parameter name="horizontalPadding" type="int">
+</parameter>
+</constructor>
+<method name="createKeyFromXml"
+ return="android.inputmethodservice.Keyboard.Key"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="res" type="android.content.res.Resources">
+</parameter>
+<parameter name="parent" type="android.inputmethodservice.Keyboard.Row">
+</parameter>
+<parameter name="x" type="int">
+</parameter>
+<parameter name="y" type="int">
+</parameter>
+<parameter name="parser" type="android.content.res.XmlResourceParser">
+</parameter>
+</method>
+<method name="createRowFromXml"
+ return="android.inputmethodservice.Keyboard.Row"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="res" type="android.content.res.Resources">
+</parameter>
+<parameter name="parser" type="android.content.res.XmlResourceParser">
+</parameter>
+</method>
+<method name="getHeight"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getHorizontalGap"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</method>
+<method name="getKeyHeight"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</method>
+<method name="getKeyWidth"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</method>
+<method name="getKeys"
+ return="java.util.List&lt;android.inputmethodservice.Keyboard.Key&gt;"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getMinWidth"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getModifierKeys"
+ return="java.util.List&lt;android.inputmethodservice.Keyboard.Key&gt;"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getNearestKeys"
+ return="int[]"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="x" type="int">
+</parameter>
+<parameter name="y" type="int">
+</parameter>
+</method>
+<method name="getShiftKeyIndex"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getVerticalGap"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</method>
+<method name="isShifted"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="setHorizontalGap"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="gap" type="int">
+</parameter>
+</method>
+<method name="setKeyHeight"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="height" type="int">
+</parameter>
+</method>
+<method name="setKeyWidth"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="width" type="int">
+</parameter>
+</method>
+<method name="setShifted"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="shiftState" type="boolean">
+</parameter>
+</method>
+<method name="setVerticalGap"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="gap" type="int">
+</parameter>
+</method>
+<field name="EDGE_BOTTOM"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="8"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="EDGE_LEFT"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="EDGE_RIGHT"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="EDGE_TOP"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="4"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="KEYCODE_ALT"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="-6"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="KEYCODE_CANCEL"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="-3"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="KEYCODE_DELETE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="-5"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="KEYCODE_DONE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="-4"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="KEYCODE_MODE_CHANGE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="-2"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="KEYCODE_SHIFT"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="-1"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<class name="Keyboard.Key"
+ extends="java.lang.Object"
+ abstract="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="Keyboard.Key"
+ type="android.inputmethodservice.Keyboard.Key"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="parent" type="android.inputmethodservice.Keyboard.Row">
+</parameter>
+</constructor>
+<constructor name="Keyboard.Key"
+ type="android.inputmethodservice.Keyboard.Key"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="res" type="android.content.res.Resources">
+</parameter>
+<parameter name="parent" type="android.inputmethodservice.Keyboard.Row">
+</parameter>
+<parameter name="x" type="int">
+</parameter>
+<parameter name="y" type="int">
+</parameter>
+<parameter name="parser" type="android.content.res.XmlResourceParser">
+</parameter>
+</constructor>
+<method name="getCurrentDrawableState"
+ return="int[]"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isInside"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="x" type="int">
+</parameter>
+<parameter name="y" type="int">
+</parameter>
+</method>
+<method name="onPressed"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="onReleased"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="inside" type="boolean">
+</parameter>
+</method>
+<method name="squaredDistanceFrom"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="x" type="int">
+</parameter>
+<parameter name="y" type="int">
+</parameter>
+</method>
+<field name="codes"
+ type="int[]"
+ transient="false"
+ volatile="false"
+ value="null"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="edgeFlags"
+ type="int"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="gap"
+ type="int"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="height"
+ type="int"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="icon"
+ type="android.graphics.drawable.Drawable"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="iconPreview"
+ type="android.graphics.drawable.Drawable"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="label"
+ type="java.lang.CharSequence"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="modifier"
+ type="boolean"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="on"
+ type="boolean"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="popupCharacters"
+ type="java.lang.CharSequence"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="popupResId"
+ type="int"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="pressed"
+ type="boolean"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="repeatable"
+ type="boolean"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="sticky"
+ type="boolean"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="text"
+ type="java.lang.CharSequence"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="width"
+ type="int"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="x"
+ type="int"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="y"
+ type="int"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<class name="Keyboard.Row"
+ extends="java.lang.Object"
+ abstract="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="Keyboard.Row"
+ type="android.inputmethodservice.Keyboard.Row"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="parent" type="android.inputmethodservice.Keyboard">
+</parameter>
+</constructor>
+<constructor name="Keyboard.Row"
+ type="android.inputmethodservice.Keyboard.Row"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="res" type="android.content.res.Resources">
+</parameter>
+<parameter name="parent" type="android.inputmethodservice.Keyboard">
+</parameter>
+<parameter name="parser" type="android.content.res.XmlResourceParser">
+</parameter>
+</constructor>
+<field name="defaultHeight"
+ type="int"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="defaultHorizontalGap"
+ type="int"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="defaultWidth"
+ type="int"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="mode"
+ type="int"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="rowEdgeFlags"
+ type="int"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="verticalGap"
+ type="int"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<class name="KeyboardView"
+ extends="android.view.View"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="android.view.View.OnClickListener">
+</implements>
+<constructor name="KeyboardView"
+ type="android.inputmethodservice.KeyboardView"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="context" type="android.content.Context">
+</parameter>
+<parameter name="attrs" type="android.util.AttributeSet">
+</parameter>
+</constructor>
+<constructor name="KeyboardView"
+ type="android.inputmethodservice.KeyboardView"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="context" type="android.content.Context">
+</parameter>
+<parameter name="attrs" type="android.util.AttributeSet">
+</parameter>
+<parameter name="defStyle" type="int">
+</parameter>
+</constructor>
+<method name="closing"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getKeyboard"
+ return="android.inputmethodservice.Keyboard"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getOnKeyboardActionListener"
+ return="android.inputmethodservice.KeyboardView.OnKeyboardActionListener"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</method>
+<method name="handleBack"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="invalidateAllKeys"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="invalidateKey"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="keyIndex" type="int">
+</parameter>
+</method>
+<method name="isPreviewEnabled"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isProximityCorrectionEnabled"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isShifted"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="onClick"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="v" type="android.view.View">
+</parameter>
+</method>
+<method name="onDetachedFromWindow"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="onDraw"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="canvas" type="android.graphics.Canvas">
+</parameter>
+</method>
+<method name="onLongPress"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="popupKey" type="android.inputmethodservice.Keyboard.Key">
+</parameter>
+</method>
+<method name="onMeasure"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="widthMeasureSpec" type="int">
+</parameter>
+<parameter name="heightMeasureSpec" type="int">
+</parameter>
+</method>
+<method name="onSizeChanged"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="w" type="int">
+</parameter>
+<parameter name="h" type="int">
+</parameter>
+<parameter name="oldw" type="int">
+</parameter>
+<parameter name="oldh" type="int">
+</parameter>
+</method>
+<method name="setKeyboard"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="keyboard" type="android.inputmethodservice.Keyboard">
+</parameter>
+</method>
+<method name="setOnKeyboardActionListener"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="listener" type="android.inputmethodservice.KeyboardView.OnKeyboardActionListener">
+</parameter>
+</method>
+<method name="setPopupOffset"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="x" type="int">
+</parameter>
+<parameter name="y" type="int">
+</parameter>
+</method>
+<method name="setPopupParent"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="v" type="android.view.View">
+</parameter>
+</method>
+<method name="setPreviewEnabled"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="previewEnabled" type="boolean">
+</parameter>
+</method>
+<method name="setProximityCorrectionEnabled"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="enabled" type="boolean">
+</parameter>
+</method>
+<method name="setShifted"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="shifted" type="boolean">
+</parameter>
+</method>
+<method name="setVerticalCorrection"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="verticalOffset" type="int">
+</parameter>
+</method>
+<method name="swipeDown"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</method>
+<method name="swipeLeft"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</method>
+<method name="swipeRight"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</method>
+<method name="swipeUp"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</method>
+</class>
+<interface name="KeyboardView.OnKeyboardActionListener"
+ abstract="true"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="onKey"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="primaryCode" type="int">
+</parameter>
+<parameter name="keyCodes" type="int[]">
+</parameter>
+</method>
+<method name="onPress"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="primaryCode" type="int">
+</parameter>
+</method>
+<method name="onRelease"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="primaryCode" type="int">
+</parameter>
+</method>
+<method name="onText"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="text" type="java.lang.CharSequence">
+</parameter>
+</method>
+<method name="swipeDown"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="swipeLeft"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="swipeRight"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="swipeUp"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+</interface>
+</package>
+<package name="android.location"
+>
+<class name="Address"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="android.os.Parcelable">
+</implements>
+<constructor name="Address"
+ type="android.location.Address"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="locale" type="java.util.Locale">
+</parameter>
+</constructor>
+<method name="clearLatitude"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="clearLongitude"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="describeContents"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getAddressLine"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="index" type="int">
+</parameter>
+</method>
+<method name="getAdminArea"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getCountryCode"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getCountryName"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getExtras"
+ return="android.os.Bundle"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getFeatureName"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getLatitude"
+ return="double"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getLocale"
+ return="java.util.Locale"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getLocality"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getLongitude"
+ return="double"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getMaxAddressLineIndex"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getPhone"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getPostalCode"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getPremises"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getSubAdminArea"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getSubLocality"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getSubThoroughfare"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getThoroughfare"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getUrl"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="hasLatitude"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="hasLongitude"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="setAddressLine"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="index" type="int">
+</parameter>
+<parameter name="line" type="java.lang.String">
+</parameter>
+</method>
+<method name="setAdminArea"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="adminArea" type="java.lang.String">
+</parameter>
+</method>
+<method name="setCountryCode"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="countryCode" type="java.lang.String">
+</parameter>
+</method>
+<method name="setCountryName"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="countryName" type="java.lang.String">
+</parameter>
+</method>
+<method name="setExtras"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="extras" type="android.os.Bundle">
+</parameter>
+</method>
+<method name="setFeatureName"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="featureName" type="java.lang.String">
+</parameter>
+</method>
+<method name="setLatitude"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="latitude" type="double">
+</parameter>
+</method>
+<method name="setLocality"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="locality" type="java.lang.String">
+</parameter>
+</method>
+<method name="setLongitude"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="longitude" type="double">
+</parameter>
+</method>
+<method name="setPhone"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="phone" type="java.lang.String">
+</parameter>
+</method>
+<method name="setPostalCode"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="postalCode" type="java.lang.String">
+</parameter>
+</method>
+<method name="setPremises"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="premises" type="java.lang.String">
+</parameter>
+</method>
+<method name="setSubAdminArea"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="subAdminArea" type="java.lang.String">
+</parameter>
+</method>
+<method name="setSubLocality"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="sublocality" type="java.lang.String">
+</parameter>
+</method>
+<method name="setSubThoroughfare"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="subthoroughfare" type="java.lang.String">
+</parameter>
+</method>
+<method name="setThoroughfare"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="thoroughfare" type="java.lang.String">
+</parameter>
+</method>
+<method name="setUrl"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="Url" type="java.lang.String">
+</parameter>
+</method>
+<method name="writeToParcel"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="parcel" type="android.os.Parcel">
+</parameter>
+<parameter name="flags" type="int">
+</parameter>
+</method>
+<field name="CREATOR"
+ type="android.os.Parcelable.Creator"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<class name="Criteria"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="android.os.Parcelable">
+</implements>
+<constructor name="Criteria"
+ type="android.location.Criteria"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<constructor name="Criteria"
+ type="android.location.Criteria"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="criteria" type="android.location.Criteria">
+</parameter>
+</constructor>
+<method name="describeContents"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getAccuracy"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getPowerRequirement"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isAltitudeRequired"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isBearingRequired"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isCostAllowed"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isSpeedRequired"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="setAccuracy"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="accuracy" type="int">
+</parameter>
+</method>
+<method name="setAltitudeRequired"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="altitudeRequired" type="boolean">
+</parameter>
+</method>
+<method name="setBearingRequired"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="bearingRequired" type="boolean">
+</parameter>
+</method>
+<method name="setCostAllowed"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="costAllowed" type="boolean">
+</parameter>
+</method>
+<method name="setPowerRequirement"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="level" type="int">
+</parameter>
+</method>
+<method name="setSpeedRequired"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="speedRequired" type="boolean">
+</parameter>
+</method>
+<method name="writeToParcel"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="parcel" type="android.os.Parcel">
+</parameter>
+<parameter name="flags" type="int">
+</parameter>
+</method>
+<field name="ACCURACY_COARSE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ACCURACY_FINE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="CREATOR"
+ type="android.os.Parcelable.Creator"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="NO_REQUIREMENT"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="0"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="POWER_HIGH"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="3"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="POWER_LOW"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="POWER_MEDIUM"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<class name="Geocoder"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="Geocoder"
+ type="android.location.Geocoder"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="context" type="android.content.Context">
+</parameter>
+<parameter name="locale" type="java.util.Locale">
+</parameter>
+</constructor>
+<constructor name="Geocoder"
+ type="android.location.Geocoder"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="context" type="android.content.Context">
+</parameter>
+</constructor>
+<method name="getFromLocation"
+ return="java.util.List&lt;android.location.Address&gt;"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="latitude" type="double">
+</parameter>
+<parameter name="longitude" type="double">
+</parameter>
+<parameter name="maxResults" type="int">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="getFromLocationName"
+ return="java.util.List&lt;android.location.Address&gt;"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="locationName" type="java.lang.String">
+</parameter>
+<parameter name="maxResults" type="int">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="getFromLocationName"
+ return="java.util.List&lt;android.location.Address&gt;"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="locationName" type="java.lang.String">
+</parameter>
+<parameter name="maxResults" type="int">
+</parameter>
+<parameter name="lowerLeftLatitude" type="double">
+</parameter>
+<parameter name="lowerLeftLongitude" type="double">
+</parameter>
+<parameter name="upperRightLatitude" type="double">
+</parameter>
+<parameter name="upperRightLongitude" type="double">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+</class>
+<class name="GpsSatellite"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="getAzimuth"
+ return="float"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getElevation"
+ return="float"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getPrn"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getSnr"
+ return="float"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="hasAlmanac"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="hasEphemeris"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="usedInFix"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+</class>
+<class name="GpsStatus"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="getMaxSatellites"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getSatellites"
+ return="java.lang.Iterable&lt;android.location.GpsSatellite&gt;"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getTimeToFirstFix"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<field name="GPS_EVENT_FIRST_FIX"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="3"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GPS_EVENT_SATELLITE_STATUS"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="4"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GPS_EVENT_STARTED"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GPS_EVENT_STOPPED"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<interface name="GpsStatus.Listener"
+ abstract="true"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="onGpsStatusChanged"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="event" type="int">
+</parameter>
+</method>
+</interface>
+<interface name="GpsStatus.NmeaListener"
+ abstract="true"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="onNmeaReceived"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="timestamp" type="long">
+</parameter>
+<parameter name="nmea" type="java.lang.String">
+</parameter>
+</method>
+</interface>
+<class name="Location"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="android.os.Parcelable">
+</implements>
+<constructor name="Location"
+ type="android.location.Location"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="provider" type="java.lang.String">
+</parameter>
+</constructor>
+<constructor name="Location"
+ type="android.location.Location"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="l" type="android.location.Location">
+</parameter>
+</constructor>
+<method name="bearingTo"
+ return="float"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="dest" type="android.location.Location">
+</parameter>
+</method>
+<method name="convert"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="coordinate" type="double">
+</parameter>
+<parameter name="outputType" type="int">
+</parameter>
+</method>
+<method name="convert"
+ return="double"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="coordinate" type="java.lang.String">
+</parameter>
+</method>
+<method name="describeContents"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="distanceBetween"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="startLatitude" type="double">
+</parameter>
+<parameter name="startLongitude" type="double">
+</parameter>
+<parameter name="endLatitude" type="double">
+</parameter>
+<parameter name="endLongitude" type="double">
+</parameter>
+<parameter name="results" type="float[]">
+</parameter>
+</method>
+<method name="distanceTo"
+ return="float"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="dest" type="android.location.Location">
+</parameter>
+</method>
+<method name="dump"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="pw" type="android.util.Printer">
+</parameter>
+<parameter name="prefix" type="java.lang.String">
+</parameter>
+</method>
+<method name="getAccuracy"
+ return="float"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getAltitude"
+ return="double"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getBearing"
+ return="float"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getExtras"
+ return="android.os.Bundle"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getLatitude"
+ return="double"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getLongitude"
+ return="double"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getProvider"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getSpeed"
+ return="float"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getTime"
+ return="long"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="hasAccuracy"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="hasAltitude"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="hasBearing"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="hasSpeed"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="removeAccuracy"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="removeAltitude"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="removeBearing"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="removeSpeed"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="reset"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="set"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="l" type="android.location.Location">
+</parameter>
+</method>
+<method name="setAccuracy"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="accuracy" type="float">
+</parameter>
+</method>
+<method name="setAltitude"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="altitude" type="double">
+</parameter>
+</method>
+<method name="setBearing"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="bearing" type="float">
+</parameter>
+</method>
+<method name="setExtras"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="extras" type="android.os.Bundle">
+</parameter>
+</method>
+<method name="setLatitude"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="latitude" type="double">
+</parameter>
+</method>
+<method name="setLongitude"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="longitude" type="double">
+</parameter>
+</method>
+<method name="setProvider"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="provider" type="java.lang.String">
+</parameter>
+</method>
+<method name="setSpeed"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="speed" type="float">
+</parameter>
+</method>
+<method name="setTime"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="time" type="long">
+</parameter>
+</method>
+<method name="writeToParcel"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="parcel" type="android.os.Parcel">
+</parameter>
+<parameter name="flags" type="int">
+</parameter>
+</method>
+<field name="CREATOR"
+ type="android.os.Parcelable.Creator"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="FORMAT_DEGREES"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="0"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="FORMAT_MINUTES"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="FORMAT_SECONDS"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<interface name="LocationListener"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="onLocationChanged"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="location" type="android.location.Location">
+</parameter>
+</method>
+<method name="onProviderDisabled"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="provider" type="java.lang.String">
+</parameter>
+</method>
+<method name="onProviderEnabled"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="provider" type="java.lang.String">
+</parameter>
+</method>
+<method name="onStatusChanged"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="provider" type="java.lang.String">
+</parameter>
+<parameter name="status" type="int">
+</parameter>
+<parameter name="extras" type="android.os.Bundle">
+</parameter>
+</method>
+</interface>
+<class name="LocationManager"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="addGpsStatusListener"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="listener" type="android.location.GpsStatus.Listener">
+</parameter>
+</method>
+<method name="addNmeaListener"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="listener" type="android.location.GpsStatus.NmeaListener">
+</parameter>
+</method>
+<method name="addProximityAlert"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="latitude" type="double">
+</parameter>
+<parameter name="longitude" type="double">
+</parameter>
+<parameter name="radius" type="float">
+</parameter>
+<parameter name="expiration" type="long">
+</parameter>
+<parameter name="intent" type="android.app.PendingIntent">
+</parameter>
+</method>
+<method name="addTestProvider"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+<parameter name="requiresNetwork" type="boolean">
+</parameter>
+<parameter name="requiresSatellite" type="boolean">
+</parameter>
+<parameter name="requiresCell" type="boolean">
+</parameter>
+<parameter name="hasMonetaryCost" type="boolean">
+</parameter>
+<parameter name="supportsAltitude" type="boolean">
+</parameter>
+<parameter name="supportsSpeed" type="boolean">
+</parameter>
+<parameter name="supportsBearing" type="boolean">
+</parameter>
+<parameter name="powerRequirement" type="int">
+</parameter>
+<parameter name="accuracy" type="int">
+</parameter>
+</method>
+<method name="clearTestProviderEnabled"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="provider" type="java.lang.String">
+</parameter>
+</method>
+<method name="clearTestProviderLocation"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="provider" type="java.lang.String">
+</parameter>
+</method>
+<method name="clearTestProviderStatus"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="provider" type="java.lang.String">
+</parameter>
+</method>
+<method name="getAllProviders"
+ return="java.util.List&lt;java.lang.String&gt;"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getBestProvider"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="criteria" type="android.location.Criteria">
+</parameter>
+<parameter name="enabledOnly" type="boolean">
+</parameter>
+</method>
+<method name="getGpsStatus"
+ return="android.location.GpsStatus"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="status" type="android.location.GpsStatus">
+</parameter>
+</method>
+<method name="getLastKnownLocation"
+ return="android.location.Location"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="provider" type="java.lang.String">
+</parameter>
+</method>
+<method name="getProvider"
+ return="android.location.LocationProvider"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+</method>
+<method name="getProviders"
+ return="java.util.List&lt;java.lang.String&gt;"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="enabledOnly" type="boolean">
+</parameter>
+</method>
+<method name="getProviders"
+ return="java.util.List&lt;java.lang.String&gt;"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="criteria" type="android.location.Criteria">
+</parameter>
+<parameter name="enabledOnly" type="boolean">
+</parameter>
+</method>
+<method name="isProviderEnabled"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="provider" type="java.lang.String">
+</parameter>
+</method>
+<method name="removeGpsStatusListener"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="listener" type="android.location.GpsStatus.Listener">
+</parameter>
+</method>
+<method name="removeNmeaListener"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="listener" type="android.location.GpsStatus.NmeaListener">
+</parameter>
+</method>
+<method name="removeProximityAlert"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="intent" type="android.app.PendingIntent">
+</parameter>
+</method>
+<method name="removeTestProvider"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="provider" type="java.lang.String">
+</parameter>
+</method>
+<method name="removeUpdates"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="listener" type="android.location.LocationListener">
+</parameter>
+</method>
+<method name="removeUpdates"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="intent" type="android.app.PendingIntent">
+</parameter>
+</method>
+<method name="requestLocationUpdates"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="provider" type="java.lang.String">
+</parameter>
+<parameter name="minTime" type="long">
+</parameter>
+<parameter name="minDistance" type="float">
+</parameter>
+<parameter name="listener" type="android.location.LocationListener">
+</parameter>
+</method>
+<method name="requestLocationUpdates"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="provider" type="java.lang.String">
+</parameter>
+<parameter name="minTime" type="long">
+</parameter>
+<parameter name="minDistance" type="float">
+</parameter>
+<parameter name="listener" type="android.location.LocationListener">
+</parameter>
+<parameter name="looper" type="android.os.Looper">
+</parameter>
+</method>
+<method name="requestLocationUpdates"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="provider" type="java.lang.String">
+</parameter>
+<parameter name="minTime" type="long">
+</parameter>
+<parameter name="minDistance" type="float">
+</parameter>
+<parameter name="intent" type="android.app.PendingIntent">
+</parameter>
+</method>
+<method name="sendExtraCommand"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="provider" type="java.lang.String">
+</parameter>
+<parameter name="command" type="java.lang.String">
+</parameter>
+<parameter name="extras" type="android.os.Bundle">
+</parameter>
+</method>
+<method name="setTestProviderEnabled"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="provider" type="java.lang.String">
+</parameter>
+<parameter name="enabled" type="boolean">
+</parameter>
+</method>
+<method name="setTestProviderLocation"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="provider" type="java.lang.String">
+</parameter>
+<parameter name="loc" type="android.location.Location">
+</parameter>
+</method>
+<method name="setTestProviderStatus"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="provider" type="java.lang.String">
+</parameter>
+<parameter name="status" type="int">
+</parameter>
+<parameter name="extras" type="android.os.Bundle">
+</parameter>
+<parameter name="updateTime" type="long">
+</parameter>
+</method>
+<field name="GPS_PROVIDER"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;gps&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="KEY_LOCATION_CHANGED"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;location&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="KEY_PROVIDER_ENABLED"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;providerEnabled&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="KEY_PROXIMITY_ENTERING"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;entering&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="KEY_STATUS_CHANGED"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;status&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="NETWORK_PROVIDER"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;network&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="PASSIVE_PROVIDER"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;passive&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<class name="LocationProvider"
+ extends="java.lang.Object"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="getAccuracy"
+ return="int"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getName"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getPowerRequirement"
+ return="int"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="hasMonetaryCost"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="meetsCriteria"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="criteria" type="android.location.Criteria">
+</parameter>
+</method>
+<method name="requiresCell"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="requiresNetwork"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="requiresSatellite"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="supportsAltitude"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="supportsBearing"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="supportsSpeed"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<field name="AVAILABLE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="OUT_OF_SERVICE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="0"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TEMPORARILY_UNAVAILABLE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+</package>
+<package name="android.media"
+>
+<class name="AsyncPlayer"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="AsyncPlayer"
+ type="android.media.AsyncPlayer"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="tag" type="java.lang.String">
+</parameter>
+</constructor>
+<method name="play"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="context" type="android.content.Context">
+</parameter>
+<parameter name="uri" type="android.net.Uri">
+</parameter>
+<parameter name="looping" type="boolean">
+</parameter>
+<parameter name="stream" type="int">
+</parameter>
+</method>
+<method name="stop"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+</class>
+<class name="AudioFormat"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="AudioFormat"
+ type="android.media.AudioFormat"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<field name="CHANNEL_CONFIGURATION_DEFAULT"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1"
+ static="true"
+ final="true"
+ deprecated="deprecated"
+ visibility="public"
+>
+</field>
+<field name="CHANNEL_CONFIGURATION_INVALID"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="0"
+ static="true"
+ final="true"
+ deprecated="deprecated"
+ visibility="public"
+>
+</field>
+<field name="CHANNEL_CONFIGURATION_MONO"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2"
+ static="true"
+ final="true"
+ deprecated="deprecated"
+ visibility="public"
+>
+</field>
+<field name="CHANNEL_CONFIGURATION_STEREO"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="3"
+ static="true"
+ final="true"
+ deprecated="deprecated"
+ visibility="public"
+>
+</field>
+<field name="CHANNEL_INVALID"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="0"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="CHANNEL_IN_BACK"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="32"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="CHANNEL_IN_BACK_PROCESSED"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="512"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="CHANNEL_IN_DEFAULT"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="CHANNEL_IN_FRONT"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="CHANNEL_IN_FRONT_PROCESSED"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="256"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="CHANNEL_IN_LEFT"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="4"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="CHANNEL_IN_LEFT_PROCESSED"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="64"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="CHANNEL_IN_MONO"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="CHANNEL_IN_PRESSURE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1024"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="CHANNEL_IN_RIGHT"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="8"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="CHANNEL_IN_RIGHT_PROCESSED"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="128"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="CHANNEL_IN_STEREO"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="12"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="CHANNEL_IN_VOICE_DNLINK"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="32768"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="CHANNEL_IN_VOICE_UPLINK"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16384"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="CHANNEL_IN_X_AXIS"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2048"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="CHANNEL_IN_Y_AXIS"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="4096"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="CHANNEL_IN_Z_AXIS"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="8192"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="CHANNEL_OUT_5POINT1"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="252"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="CHANNEL_OUT_7POINT1"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1020"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="CHANNEL_OUT_BACK_CENTER"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1024"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="CHANNEL_OUT_BACK_LEFT"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="64"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="CHANNEL_OUT_BACK_RIGHT"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="128"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="CHANNEL_OUT_DEFAULT"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="CHANNEL_OUT_FRONT_CENTER"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="CHANNEL_OUT_FRONT_LEFT"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="4"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="CHANNEL_OUT_FRONT_LEFT_OF_CENTER"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="256"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="CHANNEL_OUT_FRONT_RIGHT"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="8"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="CHANNEL_OUT_FRONT_RIGHT_OF_CENTER"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="512"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="CHANNEL_OUT_LOW_FREQUENCY"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="32"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="CHANNEL_OUT_MONO"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="4"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="CHANNEL_OUT_QUAD"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="204"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="CHANNEL_OUT_STEREO"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="12"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="CHANNEL_OUT_SURROUND"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1052"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ENCODING_DEFAULT"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ENCODING_INVALID"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="0"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ENCODING_PCM_16BIT"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ENCODING_PCM_8BIT"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="3"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<class name="AudioManager"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="abandonAudioFocus"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="l" type="android.media.AudioManager.OnAudioFocusChangeListener">
+</parameter>
+</method>
+<method name="adjustStreamVolume"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="streamType" type="int">
+</parameter>
+<parameter name="direction" type="int">
+</parameter>
+<parameter name="flags" type="int">
+</parameter>
+</method>
+<method name="adjustSuggestedStreamVolume"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="direction" type="int">
+</parameter>
+<parameter name="suggestedStreamType" type="int">
+</parameter>
+<parameter name="flags" type="int">
+</parameter>
+</method>
+<method name="adjustVolume"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="direction" type="int">
+</parameter>
+<parameter name="flags" type="int">
+</parameter>
+</method>
+<method name="getMode"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getParameters"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="keys" type="java.lang.String">
+</parameter>
+</method>
+<method name="getRingerMode"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getRouting"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="deprecated"
+ visibility="public"
+>
+<parameter name="mode" type="int">
+</parameter>
+</method>
+<method name="getStreamMaxVolume"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="streamType" type="int">
+</parameter>
+</method>
+<method name="getStreamVolume"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="streamType" type="int">
+</parameter>
+</method>
+<method name="getVibrateSetting"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="vibrateType" type="int">
+</parameter>
+</method>
+<method name="isBluetoothA2dpOn"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isBluetoothScoAvailableOffCall"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isBluetoothScoOn"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isMicrophoneMute"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isMusicActive"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isSpeakerphoneOn"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isWiredHeadsetOn"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="loadSoundEffects"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="playSoundEffect"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="effectType" type="int">
+</parameter>
+</method>
+<method name="playSoundEffect"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="effectType" type="int">
+</parameter>
+<parameter name="volume" type="float">
+</parameter>
+</method>
+<method name="registerMediaButtonEventReceiver"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="eventReceiver" type="android.content.ComponentName">
+</parameter>
+</method>
+<method name="requestAudioFocus"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="l" type="android.media.AudioManager.OnAudioFocusChangeListener">
+</parameter>
+<parameter name="streamType" type="int">
+</parameter>
+<parameter name="durationHint" type="int">
+</parameter>
+</method>
+<method name="setBluetoothA2dpOn"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="deprecated"
+ visibility="public"
+>
+<parameter name="on" type="boolean">
+</parameter>
+</method>
+<method name="setBluetoothScoOn"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="on" type="boolean">
+</parameter>
+</method>
+<method name="setMicrophoneMute"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="on" type="boolean">
+</parameter>
+</method>
+<method name="setMode"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="mode" type="int">
+</parameter>
+</method>
+<method name="setParameters"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="keyValuePairs" type="java.lang.String">
+</parameter>
+</method>
+<method name="setRingerMode"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="ringerMode" type="int">
+</parameter>
+</method>
+<method name="setRouting"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="deprecated"
+ visibility="public"
+>
+<parameter name="mode" type="int">
+</parameter>
+<parameter name="routes" type="int">
+</parameter>
+<parameter name="mask" type="int">
+</parameter>
+</method>
+<method name="setSpeakerphoneOn"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="on" type="boolean">
+</parameter>
+</method>
+<method name="setStreamMute"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="streamType" type="int">
+</parameter>
+<parameter name="state" type="boolean">
+</parameter>
+</method>
+<method name="setStreamSolo"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="streamType" type="int">
+</parameter>
+<parameter name="state" type="boolean">
+</parameter>
+</method>
+<method name="setStreamVolume"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="streamType" type="int">
+</parameter>
+<parameter name="index" type="int">
+</parameter>
+<parameter name="flags" type="int">
+</parameter>
+</method>
+<method name="setVibrateSetting"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="vibrateType" type="int">
+</parameter>
+<parameter name="vibrateSetting" type="int">
+</parameter>
+</method>
+<method name="setWiredHeadsetOn"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="deprecated"
+ visibility="public"
+>
+<parameter name="on" type="boolean">
+</parameter>
+</method>
+<method name="shouldVibrate"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="vibrateType" type="int">
+</parameter>
+</method>
+<method name="startBluetoothSco"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="stopBluetoothSco"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="unloadSoundEffects"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="unregisterMediaButtonEventReceiver"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="eventReceiver" type="android.content.ComponentName">
+</parameter>
+</method>
+<field name="ACTION_AUDIO_BECOMING_NOISY"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.media.AUDIO_BECOMING_NOISY&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ACTION_SCO_AUDIO_STATE_CHANGED"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.media.SCO_AUDIO_STATE_CHANGED&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ADJUST_LOWER"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="-1"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ADJUST_RAISE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ADJUST_SAME"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="0"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="AUDIOFOCUS_GAIN"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="AUDIOFOCUS_GAIN_TRANSIENT"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="AUDIOFOCUS_GAIN_TRANSIENT_MAY_DUCK"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="3"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="AUDIOFOCUS_LOSS"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="-1"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="AUDIOFOCUS_LOSS_TRANSIENT"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="-2"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="AUDIOFOCUS_LOSS_TRANSIENT_CAN_DUCK"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="-3"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="AUDIOFOCUS_REQUEST_FAILED"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="0"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="AUDIOFOCUS_REQUEST_GRANTED"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="EXTRA_RINGER_MODE"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.media.EXTRA_RINGER_MODE&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="EXTRA_SCO_AUDIO_STATE"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.media.extra.SCO_AUDIO_STATE&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="EXTRA_VIBRATE_SETTING"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.media.EXTRA_VIBRATE_SETTING&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="EXTRA_VIBRATE_TYPE"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.media.EXTRA_VIBRATE_TYPE&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="FLAG_ALLOW_RINGER_MODES"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="FLAG_PLAY_SOUND"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="4"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="FLAG_REMOVE_SOUND_AND_VIBRATE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="8"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="FLAG_SHOW_UI"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="FLAG_VIBRATE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="FX_FOCUS_NAVIGATION_DOWN"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="FX_FOCUS_NAVIGATION_LEFT"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="3"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="FX_FOCUS_NAVIGATION_RIGHT"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="4"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="FX_FOCUS_NAVIGATION_UP"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="FX_KEYPRESS_DELETE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="7"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="FX_KEYPRESS_RETURN"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="8"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="FX_KEYPRESS_SPACEBAR"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="6"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="FX_KEYPRESS_STANDARD"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="5"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="FX_KEY_CLICK"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="0"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="MODE_CURRENT"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="-1"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="MODE_INVALID"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="-2"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="MODE_IN_CALL"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="MODE_NORMAL"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="0"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="MODE_RINGTONE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="NUM_STREAMS"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="5"
+ static="true"
+ final="true"
+ deprecated="deprecated"
+ visibility="public"
+>
+</field>
+<field name="RINGER_MODE_CHANGED_ACTION"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.media.RINGER_MODE_CHANGED&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="RINGER_MODE_NORMAL"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="RINGER_MODE_SILENT"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="0"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="RINGER_MODE_VIBRATE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ROUTE_ALL"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="-1"
+ static="true"
+ final="true"
+ deprecated="deprecated"
+ visibility="public"
+>
+</field>
+<field name="ROUTE_BLUETOOTH"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="4"
+ static="true"
+ final="true"
+ deprecated="deprecated"
+ visibility="public"
+>
+</field>
+<field name="ROUTE_BLUETOOTH_A2DP"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16"
+ static="true"
+ final="true"
+ deprecated="deprecated"
+ visibility="public"
+>
+</field>
+<field name="ROUTE_BLUETOOTH_SCO"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="4"
+ static="true"
+ final="true"
+ deprecated="deprecated"
+ visibility="public"
+>
+</field>
+<field name="ROUTE_EARPIECE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1"
+ static="true"
+ final="true"
+ deprecated="deprecated"
+ visibility="public"
+>
+</field>
+<field name="ROUTE_HEADSET"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="8"
+ static="true"
+ final="true"
+ deprecated="deprecated"
+ visibility="public"
+>
+</field>
+<field name="ROUTE_SPEAKER"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2"
+ static="true"
+ final="true"
+ deprecated="deprecated"
+ visibility="public"
+>
+</field>
+<field name="SCO_AUDIO_STATE_CONNECTED"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="SCO_AUDIO_STATE_DISCONNECTED"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="0"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="SCO_AUDIO_STATE_ERROR"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="-1"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="STREAM_ALARM"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="4"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="STREAM_DTMF"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="8"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="STREAM_MUSIC"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="3"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="STREAM_NOTIFICATION"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="5"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="STREAM_RING"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="STREAM_SYSTEM"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="STREAM_VOICE_CALL"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="0"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="USE_DEFAULT_STREAM_TYPE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="-2147483648"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="VIBRATE_SETTING_CHANGED_ACTION"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.media.VIBRATE_SETTING_CHANGED&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="VIBRATE_SETTING_OFF"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="0"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="VIBRATE_SETTING_ON"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="VIBRATE_SETTING_ONLY_SILENT"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="VIBRATE_TYPE_NOTIFICATION"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="VIBRATE_TYPE_RINGER"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="0"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<interface name="AudioManager.OnAudioFocusChangeListener"
+ abstract="true"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="onAudioFocusChange"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="focusChange" type="int">
+</parameter>
+</method>
+</interface>
+<class name="AudioRecord"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="AudioRecord"
+ type="android.media.AudioRecord"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="audioSource" type="int">
+</parameter>
+<parameter name="sampleRateInHz" type="int">
+</parameter>
+<parameter name="channelConfig" type="int">
+</parameter>
+<parameter name="audioFormat" type="int">
+</parameter>
+<parameter name="bufferSizeInBytes" type="int">
+</parameter>
+<exception name="IllegalArgumentException" type="java.lang.IllegalArgumentException">
+</exception>
+</constructor>
+<method name="getAudioFormat"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getAudioSource"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getChannelConfiguration"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getChannelCount"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getMinBufferSize"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="sampleRateInHz" type="int">
+</parameter>
+<parameter name="channelConfig" type="int">
+</parameter>
+<parameter name="audioFormat" type="int">
+</parameter>
+</method>
+<method name="getNotificationMarkerPosition"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getPositionNotificationPeriod"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getRecordingState"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getSampleRate"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getState"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="read"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="audioData" type="byte[]">
+</parameter>
+<parameter name="offsetInBytes" type="int">
+</parameter>
+<parameter name="sizeInBytes" type="int">
+</parameter>
+</method>
+<method name="read"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="audioData" type="short[]">
+</parameter>
+<parameter name="offsetInShorts" type="int">
+</parameter>
+<parameter name="sizeInShorts" type="int">
+</parameter>
+</method>
+<method name="read"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="audioBuffer" type="java.nio.ByteBuffer">
+</parameter>
+<parameter name="sizeInBytes" type="int">
+</parameter>
+</method>
+<method name="release"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="setNotificationMarkerPosition"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="markerInFrames" type="int">
+</parameter>
+</method>
+<method name="setPositionNotificationPeriod"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="periodInFrames" type="int">
+</parameter>
+</method>
+<method name="setRecordPositionUpdateListener"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="listener" type="android.media.AudioRecord.OnRecordPositionUpdateListener">
+</parameter>
+</method>
+<method name="setRecordPositionUpdateListener"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="listener" type="android.media.AudioRecord.OnRecordPositionUpdateListener">
+</parameter>
+<parameter name="handler" type="android.os.Handler">
+</parameter>
+</method>
+<method name="startRecording"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="IllegalStateException" type="java.lang.IllegalStateException">
+</exception>
+</method>
+<method name="stop"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="IllegalStateException" type="java.lang.IllegalStateException">
+</exception>
+</method>
+<field name="ERROR"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="-1"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ERROR_BAD_VALUE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="-2"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ERROR_INVALID_OPERATION"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="-3"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="RECORDSTATE_RECORDING"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="3"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="RECORDSTATE_STOPPED"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="STATE_INITIALIZED"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="STATE_UNINITIALIZED"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="0"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="SUCCESS"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="0"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<interface name="AudioRecord.OnRecordPositionUpdateListener"
+ abstract="true"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="onMarkerReached"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="recorder" type="android.media.AudioRecord">
+</parameter>
+</method>
+<method name="onPeriodicNotification"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="recorder" type="android.media.AudioRecord">
+</parameter>
+</method>
+</interface>
+<class name="AudioTrack"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="AudioTrack"
+ type="android.media.AudioTrack"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="streamType" type="int">
+</parameter>
+<parameter name="sampleRateInHz" type="int">
+</parameter>
+<parameter name="channelConfig" type="int">
+</parameter>
+<parameter name="audioFormat" type="int">
+</parameter>
+<parameter name="bufferSizeInBytes" type="int">
+</parameter>
+<parameter name="mode" type="int">
+</parameter>
+<exception name="IllegalArgumentException" type="java.lang.IllegalArgumentException">
+</exception>
+</constructor>
+<method name="flush"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getAudioFormat"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getChannelConfiguration"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getChannelCount"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getMaxVolume"
+ return="float"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getMinBufferSize"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="sampleRateInHz" type="int">
+</parameter>
+<parameter name="channelConfig" type="int">
+</parameter>
+<parameter name="audioFormat" type="int">
+</parameter>
+</method>
+<method name="getMinVolume"
+ return="float"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getNativeFrameCount"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</method>
+<method name="getNativeOutputSampleRate"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="streamType" type="int">
+</parameter>
+</method>
+<method name="getNotificationMarkerPosition"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getPlayState"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getPlaybackHeadPosition"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getPlaybackRate"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getPositionNotificationPeriod"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getSampleRate"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getState"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getStreamType"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="pause"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="IllegalStateException" type="java.lang.IllegalStateException">
+</exception>
+</method>
+<method name="play"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="IllegalStateException" type="java.lang.IllegalStateException">
+</exception>
+</method>
+<method name="release"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="reloadStaticData"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="setLoopPoints"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="startInFrames" type="int">
+</parameter>
+<parameter name="endInFrames" type="int">
+</parameter>
+<parameter name="loopCount" type="int">
+</parameter>
+</method>
+<method name="setNotificationMarkerPosition"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="markerInFrames" type="int">
+</parameter>
+</method>
+<method name="setPlaybackHeadPosition"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="positionInFrames" type="int">
+</parameter>
+</method>
+<method name="setPlaybackPositionUpdateListener"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="listener" type="android.media.AudioTrack.OnPlaybackPositionUpdateListener">
+</parameter>
+</method>
+<method name="setPlaybackPositionUpdateListener"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="listener" type="android.media.AudioTrack.OnPlaybackPositionUpdateListener">
+</parameter>
+<parameter name="handler" type="android.os.Handler">
+</parameter>
+</method>
+<method name="setPlaybackRate"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="sampleRateInHz" type="int">
+</parameter>
+</method>
+<method name="setPositionNotificationPeriod"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="periodInFrames" type="int">
+</parameter>
+</method>
+<method name="setState"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="state" type="int">
+</parameter>
+</method>
+<method name="setStereoVolume"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="leftVolume" type="float">
+</parameter>
+<parameter name="rightVolume" type="float">
+</parameter>
+</method>
+<method name="stop"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="IllegalStateException" type="java.lang.IllegalStateException">
+</exception>
+</method>
+<method name="write"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="audioData" type="byte[]">
+</parameter>
+<parameter name="offsetInBytes" type="int">
+</parameter>
+<parameter name="sizeInBytes" type="int">
+</parameter>
+</method>
+<method name="write"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="audioData" type="short[]">
+</parameter>
+<parameter name="offsetInShorts" type="int">
+</parameter>
+<parameter name="sizeInShorts" type="int">
+</parameter>
+</method>
+<field name="ERROR"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="-1"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ERROR_BAD_VALUE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="-2"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ERROR_INVALID_OPERATION"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="-3"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="MODE_STATIC"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="0"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="MODE_STREAM"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="PLAYSTATE_PAUSED"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="PLAYSTATE_PLAYING"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="3"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="PLAYSTATE_STOPPED"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="STATE_INITIALIZED"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="STATE_NO_STATIC_DATA"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="STATE_UNINITIALIZED"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="0"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="SUCCESS"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="0"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<interface name="AudioTrack.OnPlaybackPositionUpdateListener"
+ abstract="true"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="onMarkerReached"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="track" type="android.media.AudioTrack">
+</parameter>
+</method>
+<method name="onPeriodicNotification"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="track" type="android.media.AudioTrack">
+</parameter>
+</method>
+</interface>
+<class name="CamcorderProfile"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="get"
+ return="android.media.CamcorderProfile"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="quality" type="int">
+</parameter>
+</method>
+<field name="QUALITY_HIGH"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="QUALITY_LOW"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="0"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="audioBitRate"
+ type="int"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="audioChannels"
+ type="int"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="audioCodec"
+ type="int"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="audioSampleRate"
+ type="int"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="duration"
+ type="int"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="fileFormat"
+ type="int"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="quality"
+ type="int"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="videoBitRate"
+ type="int"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="videoCodec"
+ type="int"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="videoFrameHeight"
+ type="int"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="videoFrameRate"
+ type="int"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="videoFrameWidth"
+ type="int"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<class name="CameraProfile"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="CameraProfile"
+ type="android.media.CameraProfile"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<method name="getJpegEncodingQualityParameter"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="quality" type="int">
+</parameter>
+</method>
+<field name="QUALITY_HIGH"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="QUALITY_LOW"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="0"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="QUALITY_MEDIUM"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<class name="ExifInterface"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="ExifInterface"
+ type="android.media.ExifInterface"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="filename" type="java.lang.String">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</constructor>
+<method name="getAttribute"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="tag" type="java.lang.String">
+</parameter>
+</method>
+<method name="getAttributeDouble"
+ return="double"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="tag" type="java.lang.String">
+</parameter>
+<parameter name="defaultValue" type="double">
+</parameter>
+</method>
+<method name="getAttributeInt"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="tag" type="java.lang.String">
+</parameter>
+<parameter name="defaultValue" type="int">
+</parameter>
+</method>
+<method name="getLatLong"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="output" type="float[]">
+</parameter>
+</method>
+<method name="getThumbnail"
+ return="byte[]"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="hasThumbnail"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="saveAttributes"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="setAttribute"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="tag" type="java.lang.String">
+</parameter>
+<parameter name="value" type="java.lang.String">
+</parameter>
+</method>
+<field name="ORIENTATION_FLIP_HORIZONTAL"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ORIENTATION_FLIP_VERTICAL"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="4"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ORIENTATION_NORMAL"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ORIENTATION_ROTATE_180"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="3"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ORIENTATION_ROTATE_270"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="8"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ORIENTATION_ROTATE_90"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="6"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ORIENTATION_TRANSPOSE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="5"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ORIENTATION_TRANSVERSE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="7"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ORIENTATION_UNDEFINED"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="0"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TAG_DATETIME"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;DateTime&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TAG_FLASH"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;Flash&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TAG_FOCAL_LENGTH"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;FocalLength&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TAG_GPS_DATESTAMP"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;GPSDateStamp&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TAG_GPS_LATITUDE"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;GPSLatitude&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TAG_GPS_LATITUDE_REF"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;GPSLatitudeRef&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TAG_GPS_LONGITUDE"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;GPSLongitude&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TAG_GPS_LONGITUDE_REF"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;GPSLongitudeRef&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TAG_GPS_PROCESSING_METHOD"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;GPSProcessingMethod&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TAG_GPS_TIMESTAMP"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;GPSTimeStamp&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TAG_IMAGE_LENGTH"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;ImageLength&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TAG_IMAGE_WIDTH"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;ImageWidth&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TAG_MAKE"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;Make&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TAG_MODEL"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;Model&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TAG_ORIENTATION"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;Orientation&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TAG_WHITE_BALANCE"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;WhiteBalance&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="WHITEBALANCE_AUTO"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="0"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="WHITEBALANCE_MANUAL"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<class name="FaceDetector"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="FaceDetector"
+ type="android.media.FaceDetector"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="width" type="int">
+</parameter>
+<parameter name="height" type="int">
+</parameter>
+<parameter name="maxFaces" type="int">
+</parameter>
+</constructor>
+<method name="findFaces"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="bitmap" type="android.graphics.Bitmap">
+</parameter>
+<parameter name="faces" type="android.media.FaceDetector.Face[]">
+</parameter>
+</method>
+</class>
+<class name="FaceDetector.Face"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="confidence"
+ return="float"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="eyesDistance"
+ return="float"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getMidPoint"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="point" type="android.graphics.PointF">
+</parameter>
+</method>
+<method name="pose"
+ return="float"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="euler" type="int">
+</parameter>
+</method>
+<field name="CONFIDENCE_THRESHOLD"
+ type="float"
+ transient="false"
+ volatile="false"
+ value="0.4f"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="EULER_X"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="0"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="EULER_Y"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="EULER_Z"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<class name="JetPlayer"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="clearQueue"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="clone"
+ return="java.lang.Object"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="CloneNotSupportedException" type="java.lang.CloneNotSupportedException">
+</exception>
+</method>
+<method name="closeJetFile"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getJetPlayer"
+ return="android.media.JetPlayer"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getMaxTracks"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="loadJetFile"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="path" type="java.lang.String">
+</parameter>
+</method>
+<method name="loadJetFile"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="afd" type="android.content.res.AssetFileDescriptor">
+</parameter>
+</method>
+<method name="pause"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="play"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="queueJetSegment"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="segmentNum" type="int">
+</parameter>
+<parameter name="libNum" type="int">
+</parameter>
+<parameter name="repeatCount" type="int">
+</parameter>
+<parameter name="transpose" type="int">
+</parameter>
+<parameter name="muteFlags" type="int">
+</parameter>
+<parameter name="userID" type="byte">
+</parameter>
+</method>
+<method name="queueJetSegmentMuteArray"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="segmentNum" type="int">
+</parameter>
+<parameter name="libNum" type="int">
+</parameter>
+<parameter name="repeatCount" type="int">
+</parameter>
+<parameter name="transpose" type="int">
+</parameter>
+<parameter name="muteArray" type="boolean[]">
+</parameter>
+<parameter name="userID" type="byte">
+</parameter>
+</method>
+<method name="release"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="setEventListener"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="listener" type="android.media.JetPlayer.OnJetEventListener">
+</parameter>
+</method>
+<method name="setEventListener"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="listener" type="android.media.JetPlayer.OnJetEventListener">
+</parameter>
+<parameter name="handler" type="android.os.Handler">
+</parameter>
+</method>
+<method name="setMuteArray"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="muteArray" type="boolean[]">
+</parameter>
+<parameter name="sync" type="boolean">
+</parameter>
+</method>
+<method name="setMuteFlag"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="trackId" type="int">
+</parameter>
+<parameter name="muteFlag" type="boolean">
+</parameter>
+<parameter name="sync" type="boolean">
+</parameter>
+</method>
+<method name="setMuteFlags"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="muteFlags" type="int">
+</parameter>
+<parameter name="sync" type="boolean">
+</parameter>
+</method>
+<method name="triggerClip"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="clipId" type="int">
+</parameter>
+</method>
+</class>
+<interface name="JetPlayer.OnJetEventListener"
+ abstract="true"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="onJetEvent"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="player" type="android.media.JetPlayer">
+</parameter>
+<parameter name="segment" type="short">
+</parameter>
+<parameter name="track" type="byte">
+</parameter>
+<parameter name="channel" type="byte">
+</parameter>
+<parameter name="controller" type="byte">
+</parameter>
+<parameter name="value" type="byte">
+</parameter>
+</method>
+<method name="onJetNumQueuedSegmentUpdate"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="player" type="android.media.JetPlayer">
+</parameter>
+<parameter name="nbSegments" type="int">
+</parameter>
+</method>
+<method name="onJetPauseUpdate"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="player" type="android.media.JetPlayer">
+</parameter>
+<parameter name="paused" type="int">
+</parameter>
+</method>
+<method name="onJetUserIdUpdate"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="player" type="android.media.JetPlayer">
+</parameter>
+<parameter name="userId" type="int">
+</parameter>
+<parameter name="repeatCount" type="int">
+</parameter>
+</method>
+</interface>
+<class name="MediaPlayer"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="MediaPlayer"
+ type="android.media.MediaPlayer"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<method name="create"
+ return="android.media.MediaPlayer"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="context" type="android.content.Context">
+</parameter>
+<parameter name="uri" type="android.net.Uri">
+</parameter>
+</method>
+<method name="create"
+ return="android.media.MediaPlayer"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="context" type="android.content.Context">
+</parameter>
+<parameter name="uri" type="android.net.Uri">
+</parameter>
+<parameter name="holder" type="android.view.SurfaceHolder">
+</parameter>
+</method>
+<method name="create"
+ return="android.media.MediaPlayer"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="context" type="android.content.Context">
+</parameter>
+<parameter name="resid" type="int">
+</parameter>
+</method>
+<method name="getCurrentPosition"
+ return="int"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getDuration"
+ return="int"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getVideoHeight"
+ return="int"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getVideoWidth"
+ return="int"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isLooping"
+ return="boolean"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isPlaying"
+ return="boolean"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="pause"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="IllegalStateException" type="java.lang.IllegalStateException">
+</exception>
+</method>
+<method name="prepare"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+<exception name="IllegalStateException" type="java.lang.IllegalStateException">
+</exception>
+</method>
+<method name="prepareAsync"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="IllegalStateException" type="java.lang.IllegalStateException">
+</exception>
+</method>
+<method name="release"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="reset"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="seekTo"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="msec" type="int">
+</parameter>
+<exception name="IllegalStateException" type="java.lang.IllegalStateException">
+</exception>
+</method>
+<method name="setAudioStreamType"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="streamtype" type="int">
+</parameter>
+</method>
+<method name="setDataSource"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="context" type="android.content.Context">
+</parameter>
+<parameter name="uri" type="android.net.Uri">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+<exception name="IllegalArgumentException" type="java.lang.IllegalArgumentException">
+</exception>
+<exception name="IllegalStateException" type="java.lang.IllegalStateException">
+</exception>
+<exception name="SecurityException" type="java.lang.SecurityException">
+</exception>
+</method>
+<method name="setDataSource"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="path" type="java.lang.String">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+<exception name="IllegalArgumentException" type="java.lang.IllegalArgumentException">
+</exception>
+<exception name="IllegalStateException" type="java.lang.IllegalStateException">
+</exception>
+</method>
+<method name="setDataSource"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="fd" type="java.io.FileDescriptor">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+<exception name="IllegalArgumentException" type="java.lang.IllegalArgumentException">
+</exception>
+<exception name="IllegalStateException" type="java.lang.IllegalStateException">
+</exception>
+</method>
+<method name="setDataSource"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="fd" type="java.io.FileDescriptor">
+</parameter>
+<parameter name="offset" type="long">
+</parameter>
+<parameter name="length" type="long">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+<exception name="IllegalArgumentException" type="java.lang.IllegalArgumentException">
+</exception>
+<exception name="IllegalStateException" type="java.lang.IllegalStateException">
+</exception>
+</method>
+<method name="setDisplay"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="sh" type="android.view.SurfaceHolder">
+</parameter>
+</method>
+<method name="setLooping"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="looping" type="boolean">
+</parameter>
+</method>
+<method name="setOnBufferingUpdateListener"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="listener" type="android.media.MediaPlayer.OnBufferingUpdateListener">
+</parameter>
+</method>
+<method name="setOnCompletionListener"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="listener" type="android.media.MediaPlayer.OnCompletionListener">
+</parameter>
+</method>
+<method name="setOnErrorListener"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="listener" type="android.media.MediaPlayer.OnErrorListener">
+</parameter>
+</method>
+<method name="setOnInfoListener"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="listener" type="android.media.MediaPlayer.OnInfoListener">
+</parameter>
+</method>
+<method name="setOnPreparedListener"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="listener" type="android.media.MediaPlayer.OnPreparedListener">
+</parameter>
+</method>
+<method name="setOnSeekCompleteListener"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="listener" type="android.media.MediaPlayer.OnSeekCompleteListener">
+</parameter>
+</method>
+<method name="setOnVideoSizeChangedListener"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="listener" type="android.media.MediaPlayer.OnVideoSizeChangedListener">
+</parameter>
+</method>
+<method name="setScreenOnWhilePlaying"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="screenOn" type="boolean">
+</parameter>
+</method>
+<method name="setVolume"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="leftVolume" type="float">
+</parameter>
+<parameter name="rightVolume" type="float">
+</parameter>
+</method>
+<method name="setWakeMode"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="context" type="android.content.Context">
+</parameter>
+<parameter name="mode" type="int">
+</parameter>
+</method>
+<method name="start"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="IllegalStateException" type="java.lang.IllegalStateException">
+</exception>
+</method>
+<method name="stop"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="IllegalStateException" type="java.lang.IllegalStateException">
+</exception>
+</method>
+<field name="MEDIA_ERROR_NOT_VALID_FOR_PROGRESSIVE_PLAYBACK"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="200"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="MEDIA_ERROR_SERVER_DIED"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="100"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="MEDIA_ERROR_UNKNOWN"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="MEDIA_INFO_BAD_INTERLEAVING"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="800"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="MEDIA_INFO_METADATA_UPDATE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="802"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="MEDIA_INFO_NOT_SEEKABLE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="801"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="MEDIA_INFO_UNKNOWN"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="MEDIA_INFO_VIDEO_TRACK_LAGGING"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="700"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<interface name="MediaPlayer.OnBufferingUpdateListener"
+ abstract="true"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="onBufferingUpdate"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="mp" type="android.media.MediaPlayer">
+</parameter>
+<parameter name="percent" type="int">
+</parameter>
+</method>
+</interface>
+<interface name="MediaPlayer.OnCompletionListener"
+ abstract="true"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="onCompletion"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="mp" type="android.media.MediaPlayer">
+</parameter>
+</method>
+</interface>
+<interface name="MediaPlayer.OnErrorListener"
+ abstract="true"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="onError"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="mp" type="android.media.MediaPlayer">
+</parameter>
+<parameter name="what" type="int">
+</parameter>
+<parameter name="extra" type="int">
+</parameter>
+</method>
+</interface>
+<interface name="MediaPlayer.OnInfoListener"
+ abstract="true"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="onInfo"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="mp" type="android.media.MediaPlayer">
+</parameter>
+<parameter name="what" type="int">
+</parameter>
+<parameter name="extra" type="int">
+</parameter>
+</method>
+</interface>
+<interface name="MediaPlayer.OnPreparedListener"
+ abstract="true"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="onPrepared"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="mp" type="android.media.MediaPlayer">
+</parameter>
+</method>
+</interface>
+<interface name="MediaPlayer.OnSeekCompleteListener"
+ abstract="true"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="onSeekComplete"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="mp" type="android.media.MediaPlayer">
+</parameter>
+</method>
+</interface>
+<interface name="MediaPlayer.OnVideoSizeChangedListener"
+ abstract="true"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="onVideoSizeChanged"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="mp" type="android.media.MediaPlayer">
+</parameter>
+<parameter name="width" type="int">
+</parameter>
+<parameter name="height" type="int">
+</parameter>
+</method>
+</interface>
+<class name="MediaRecorder"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="MediaRecorder"
+ type="android.media.MediaRecorder"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<method name="getAudioSourceMax"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getMaxAmplitude"
+ return="int"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="IllegalStateException" type="java.lang.IllegalStateException">
+</exception>
+</method>
+<method name="prepare"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+<exception name="IllegalStateException" type="java.lang.IllegalStateException">
+</exception>
+</method>
+<method name="release"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="reset"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="setAudioChannels"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="numChannels" type="int">
+</parameter>
+</method>
+<method name="setAudioEncoder"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="audio_encoder" type="int">
+</parameter>
+<exception name="IllegalStateException" type="java.lang.IllegalStateException">
+</exception>
+</method>
+<method name="setAudioEncodingBitRate"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="bitRate" type="int">
+</parameter>
+</method>
+<method name="setAudioSamplingRate"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="samplingRate" type="int">
+</parameter>
+</method>
+<method name="setAudioSource"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="audio_source" type="int">
+</parameter>
+<exception name="IllegalStateException" type="java.lang.IllegalStateException">
+</exception>
+</method>
+<method name="setCamera"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="c" type="android.hardware.Camera">
+</parameter>
+</method>
+<method name="setMaxDuration"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="max_duration_ms" type="int">
+</parameter>
+<exception name="IllegalArgumentException" type="java.lang.IllegalArgumentException">
+</exception>
+</method>
+<method name="setMaxFileSize"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="max_filesize_bytes" type="long">
+</parameter>
+<exception name="IllegalArgumentException" type="java.lang.IllegalArgumentException">
+</exception>
+</method>
+<method name="setOnErrorListener"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="l" type="android.media.MediaRecorder.OnErrorListener">
+</parameter>
+</method>
+<method name="setOnInfoListener"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="listener" type="android.media.MediaRecorder.OnInfoListener">
+</parameter>
+</method>
+<method name="setOutputFile"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="fd" type="java.io.FileDescriptor">
+</parameter>
+<exception name="IllegalStateException" type="java.lang.IllegalStateException">
+</exception>
+</method>
+<method name="setOutputFile"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="path" type="java.lang.String">
+</parameter>
+<exception name="IllegalStateException" type="java.lang.IllegalStateException">
+</exception>
+</method>
+<method name="setOutputFormat"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="output_format" type="int">
+</parameter>
+<exception name="IllegalStateException" type="java.lang.IllegalStateException">
+</exception>
+</method>
+<method name="setPreviewDisplay"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="sv" type="android.view.Surface">
+</parameter>
+</method>
+<method name="setProfile"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="profile" type="android.media.CamcorderProfile">
+</parameter>
+</method>
+<method name="setVideoEncoder"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="video_encoder" type="int">
+</parameter>
+<exception name="IllegalStateException" type="java.lang.IllegalStateException">
+</exception>
+</method>
+<method name="setVideoEncodingBitRate"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="bitRate" type="int">
+</parameter>
+</method>
+<method name="setVideoFrameRate"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="rate" type="int">
+</parameter>
+<exception name="IllegalStateException" type="java.lang.IllegalStateException">
+</exception>
+</method>
+<method name="setVideoSize"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="width" type="int">
+</parameter>
+<parameter name="height" type="int">
+</parameter>
+<exception name="IllegalStateException" type="java.lang.IllegalStateException">
+</exception>
+</method>
+<method name="setVideoSource"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="video_source" type="int">
+</parameter>
+<exception name="IllegalStateException" type="java.lang.IllegalStateException">
+</exception>
+</method>
+<method name="start"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="IllegalStateException" type="java.lang.IllegalStateException">
+</exception>
+</method>
+<method name="stop"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="IllegalStateException" type="java.lang.IllegalStateException">
+</exception>
+</method>
+<field name="MEDIA_RECORDER_ERROR_UNKNOWN"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="MEDIA_RECORDER_INFO_MAX_DURATION_REACHED"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="800"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="MEDIA_RECORDER_INFO_MAX_FILESIZE_REACHED"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="801"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="MEDIA_RECORDER_INFO_UNKNOWN"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<class name="MediaRecorder.AudioEncoder"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<field name="AMR_NB"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="DEFAULT"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="0"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<class name="MediaRecorder.AudioSource"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<field name="CAMCORDER"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="5"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="DEFAULT"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="0"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="MIC"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="VOICE_CALL"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="4"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="VOICE_DOWNLINK"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="3"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="VOICE_RECOGNITION"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="6"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="VOICE_UPLINK"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<interface name="MediaRecorder.OnErrorListener"
+ abstract="true"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="onError"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="mr" type="android.media.MediaRecorder">
+</parameter>
+<parameter name="what" type="int">
+</parameter>
+<parameter name="extra" type="int">
+</parameter>
+</method>
+</interface>
+<interface name="MediaRecorder.OnInfoListener"
+ abstract="true"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="onInfo"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="mr" type="android.media.MediaRecorder">
+</parameter>
+<parameter name="what" type="int">
+</parameter>
+<parameter name="extra" type="int">
+</parameter>
+</method>
+</interface>
+<class name="MediaRecorder.OutputFormat"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<field name="DEFAULT"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="0"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="MPEG_4"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="RAW_AMR"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="3"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="THREE_GPP"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<class name="MediaRecorder.VideoEncoder"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<field name="DEFAULT"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="0"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="H263"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="H264"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="MPEG_4_SP"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="3"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<class name="MediaRecorder.VideoSource"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<field name="CAMERA"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="DEFAULT"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="0"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<class name="MediaScannerConnection"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="android.content.ServiceConnection">
+</implements>
+<constructor name="MediaScannerConnection"
+ type="android.media.MediaScannerConnection"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="context" type="android.content.Context">
+</parameter>
+<parameter name="client" type="android.media.MediaScannerConnection.MediaScannerConnectionClient">
+</parameter>
+</constructor>
+<method name="connect"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="disconnect"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isConnected"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="onServiceConnected"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="className" type="android.content.ComponentName">
+</parameter>
+<parameter name="service" type="android.os.IBinder">
+</parameter>
+</method>
+<method name="onServiceDisconnected"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="className" type="android.content.ComponentName">
+</parameter>
+</method>
+<method name="scanFile"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="path" type="java.lang.String">
+</parameter>
+<parameter name="mimeType" type="java.lang.String">
+</parameter>
+</method>
+<method name="scanFile"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="context" type="android.content.Context">
+</parameter>
+<parameter name="paths" type="java.lang.String[]">
+</parameter>
+<parameter name="mimeTypes" type="java.lang.String[]">
+</parameter>
+<parameter name="callback" type="android.media.MediaScannerConnection.OnScanCompletedListener">
+</parameter>
+</method>
+</class>
+<interface name="MediaScannerConnection.MediaScannerConnectionClient"
+ abstract="true"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="android.media.MediaScannerConnection.OnScanCompletedListener">
+</implements>
+<method name="onMediaScannerConnected"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="onScanCompleted"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="path" type="java.lang.String">
+</parameter>
+<parameter name="uri" type="android.net.Uri">
+</parameter>
+</method>
+</interface>
+<interface name="MediaScannerConnection.OnScanCompletedListener"
+ abstract="true"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="onScanCompleted"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="path" type="java.lang.String">
+</parameter>
+<parameter name="uri" type="android.net.Uri">
+</parameter>
+</method>
+</interface>
+<class name="Ringtone"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="getStreamType"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getTitle"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="context" type="android.content.Context">
+</parameter>
+</method>
+<method name="isPlaying"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="play"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="setStreamType"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="streamType" type="int">
+</parameter>
+</method>
+<method name="stop"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+</class>
+<class name="RingtoneManager"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="RingtoneManager"
+ type="android.media.RingtoneManager"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="activity" type="android.app.Activity">
+</parameter>
+</constructor>
+<constructor name="RingtoneManager"
+ type="android.media.RingtoneManager"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="context" type="android.content.Context">
+</parameter>
+</constructor>
+<method name="getActualDefaultRingtoneUri"
+ return="android.net.Uri"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="context" type="android.content.Context">
+</parameter>
+<parameter name="type" type="int">
+</parameter>
+</method>
+<method name="getCursor"
+ return="android.database.Cursor"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getDefaultType"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="defaultRingtoneUri" type="android.net.Uri">
+</parameter>
+</method>
+<method name="getDefaultUri"
+ return="android.net.Uri"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="type" type="int">
+</parameter>
+</method>
+<method name="getIncludeDrm"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getRingtone"
+ return="android.media.Ringtone"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="position" type="int">
+</parameter>
+</method>
+<method name="getRingtone"
+ return="android.media.Ringtone"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="context" type="android.content.Context">
+</parameter>
+<parameter name="ringtoneUri" type="android.net.Uri">
+</parameter>
+</method>
+<method name="getRingtonePosition"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="ringtoneUri" type="android.net.Uri">
+</parameter>
+</method>
+<method name="getRingtoneUri"
+ return="android.net.Uri"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="position" type="int">
+</parameter>
+</method>
+<method name="getStopPreviousRingtone"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getValidRingtoneUri"
+ return="android.net.Uri"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="context" type="android.content.Context">
+</parameter>
+</method>
+<method name="inferStreamType"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isDefault"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="ringtoneUri" type="android.net.Uri">
+</parameter>
+</method>
+<method name="setActualDefaultRingtoneUri"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="context" type="android.content.Context">
+</parameter>
+<parameter name="type" type="int">
+</parameter>
+<parameter name="ringtoneUri" type="android.net.Uri">
+</parameter>
+</method>
+<method name="setIncludeDrm"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="includeDrm" type="boolean">
+</parameter>
+</method>
+<method name="setStopPreviousRingtone"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="stopPreviousRingtone" type="boolean">
+</parameter>
+</method>
+<method name="setType"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="type" type="int">
+</parameter>
+</method>
+<method name="stopPreviousRingtone"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<field name="ACTION_RINGTONE_PICKER"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.intent.action.RINGTONE_PICKER&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="EXTRA_RINGTONE_DEFAULT_URI"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.intent.extra.ringtone.DEFAULT_URI&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="EXTRA_RINGTONE_EXISTING_URI"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.intent.extra.ringtone.EXISTING_URI&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="EXTRA_RINGTONE_INCLUDE_DRM"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.intent.extra.ringtone.INCLUDE_DRM&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="EXTRA_RINGTONE_PICKED_URI"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.intent.extra.ringtone.PICKED_URI&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="EXTRA_RINGTONE_SHOW_DEFAULT"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.intent.extra.ringtone.SHOW_DEFAULT&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="EXTRA_RINGTONE_SHOW_SILENT"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.intent.extra.ringtone.SHOW_SILENT&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="EXTRA_RINGTONE_TITLE"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.intent.extra.ringtone.TITLE&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="EXTRA_RINGTONE_TYPE"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.intent.extra.ringtone.TYPE&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ID_COLUMN_INDEX"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="0"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TITLE_COLUMN_INDEX"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TYPE_ALARM"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="4"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TYPE_ALL"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="7"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TYPE_NOTIFICATION"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TYPE_RINGTONE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="URI_COLUMN_INDEX"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<class name="SoundPool"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="SoundPool"
+ type="android.media.SoundPool"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="maxStreams" type="int">
+</parameter>
+<parameter name="streamType" type="int">
+</parameter>
+<parameter name="srcQuality" type="int">
+</parameter>
+</constructor>
+<method name="autoPause"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="autoResume"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="load"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="path" type="java.lang.String">
+</parameter>
+<parameter name="priority" type="int">
+</parameter>
+</method>
+<method name="load"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="context" type="android.content.Context">
+</parameter>
+<parameter name="resId" type="int">
+</parameter>
+<parameter name="priority" type="int">
+</parameter>
+</method>
+<method name="load"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="afd" type="android.content.res.AssetFileDescriptor">
+</parameter>
+<parameter name="priority" type="int">
+</parameter>
+</method>
+<method name="load"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="fd" type="java.io.FileDescriptor">
+</parameter>
+<parameter name="offset" type="long">
+</parameter>
+<parameter name="length" type="long">
+</parameter>
+<parameter name="priority" type="int">
+</parameter>
+</method>
+<method name="pause"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="streamID" type="int">
+</parameter>
+</method>
+<method name="play"
+ return="int"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="soundID" type="int">
+</parameter>
+<parameter name="leftVolume" type="float">
+</parameter>
+<parameter name="rightVolume" type="float">
+</parameter>
+<parameter name="priority" type="int">
+</parameter>
+<parameter name="loop" type="int">
+</parameter>
+<parameter name="rate" type="float">
+</parameter>
+</method>
+<method name="release"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="resume"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="streamID" type="int">
+</parameter>
+</method>
+<method name="setLoop"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="streamID" type="int">
+</parameter>
+<parameter name="loop" type="int">
+</parameter>
+</method>
+<method name="setOnLoadCompleteListener"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="listener" type="android.media.SoundPool.OnLoadCompleteListener">
+</parameter>
+</method>
+<method name="setPriority"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="streamID" type="int">
+</parameter>
+<parameter name="priority" type="int">
+</parameter>
+</method>
+<method name="setRate"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="streamID" type="int">
+</parameter>
+<parameter name="rate" type="float">
+</parameter>
+</method>
+<method name="setVolume"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="streamID" type="int">
+</parameter>
+<parameter name="leftVolume" type="float">
+</parameter>
+<parameter name="rightVolume" type="float">
+</parameter>
+</method>
+<method name="stop"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="streamID" type="int">
+</parameter>
+</method>
+<method name="unload"
+ return="boolean"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="soundID" type="int">
+</parameter>
+</method>
+</class>
+<interface name="SoundPool.OnLoadCompleteListener"
+ abstract="true"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="onLoadComplete"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="soundPool" type="android.media.SoundPool">
+</parameter>
+<parameter name="sampleId" type="int">
+</parameter>
+<parameter name="status" type="int">
+</parameter>
+</method>
+</interface>
+<class name="ThumbnailUtils"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="ThumbnailUtils"
+ type="android.media.ThumbnailUtils"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<method name="createVideoThumbnail"
+ return="android.graphics.Bitmap"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="filePath" type="java.lang.String">
+</parameter>
+<parameter name="kind" type="int">
+</parameter>
+</method>
+<method name="extractThumbnail"
+ return="android.graphics.Bitmap"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="source" type="android.graphics.Bitmap">
+</parameter>
+<parameter name="width" type="int">
+</parameter>
+<parameter name="height" type="int">
+</parameter>
+</method>
+<method name="extractThumbnail"
+ return="android.graphics.Bitmap"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="source" type="android.graphics.Bitmap">
+</parameter>
+<parameter name="width" type="int">
+</parameter>
+<parameter name="height" type="int">
+</parameter>
+<parameter name="options" type="int">
+</parameter>
+</method>
+<field name="OPTIONS_RECYCLE_INPUT"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<class name="ToneGenerator"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="ToneGenerator"
+ type="android.media.ToneGenerator"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="streamType" type="int">
+</parameter>
+<parameter name="volume" type="int">
+</parameter>
+</constructor>
+<method name="release"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="startTone"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="toneType" type="int">
+</parameter>
+</method>
+<method name="startTone"
+ return="boolean"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="toneType" type="int">
+</parameter>
+<parameter name="durationMs" type="int">
+</parameter>
+</method>
+<method name="stopTone"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<field name="MAX_VOLUME"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="100"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="MIN_VOLUME"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="0"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TONE_CDMA_ABBR_ALERT"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="97"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TONE_CDMA_ABBR_INTERCEPT"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="37"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TONE_CDMA_ABBR_REORDER"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="39"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TONE_CDMA_ALERT_AUTOREDIAL_LITE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="87"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TONE_CDMA_ALERT_CALL_GUARD"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="93"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TONE_CDMA_ALERT_INCALL_LITE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="91"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TONE_CDMA_ALERT_NETWORK_LITE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="86"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TONE_CDMA_ANSWER"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="42"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TONE_CDMA_CALLDROP_LITE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="95"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TONE_CDMA_CALL_SIGNAL_ISDN_INTERGROUP"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="46"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TONE_CDMA_CALL_SIGNAL_ISDN_NORMAL"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="45"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TONE_CDMA_CALL_SIGNAL_ISDN_PAT3"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="48"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TONE_CDMA_CALL_SIGNAL_ISDN_PAT5"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="50"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TONE_CDMA_CALL_SIGNAL_ISDN_PAT6"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="51"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TONE_CDMA_CALL_SIGNAL_ISDN_PAT7"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="52"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TONE_CDMA_CALL_SIGNAL_ISDN_PING_RING"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="49"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TONE_CDMA_CALL_SIGNAL_ISDN_SP_PRI"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="47"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TONE_CDMA_CONFIRM"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="41"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TONE_CDMA_DIAL_TONE_LITE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="34"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TONE_CDMA_EMERGENCY_RINGBACK"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="92"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TONE_CDMA_HIGH_L"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="53"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TONE_CDMA_HIGH_PBX_L"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="71"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TONE_CDMA_HIGH_PBX_SLS"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="80"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TONE_CDMA_HIGH_PBX_SS"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="74"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TONE_CDMA_HIGH_PBX_SSL"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="77"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TONE_CDMA_HIGH_PBX_S_X4"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="83"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TONE_CDMA_HIGH_SLS"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="65"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TONE_CDMA_HIGH_SS"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="56"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TONE_CDMA_HIGH_SSL"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="59"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TONE_CDMA_HIGH_SS_2"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="62"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TONE_CDMA_HIGH_S_X4"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="68"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TONE_CDMA_INTERCEPT"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="36"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TONE_CDMA_KEYPAD_VOLUME_KEY_LITE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="89"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TONE_CDMA_LOW_L"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="55"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TONE_CDMA_LOW_PBX_L"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="73"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TONE_CDMA_LOW_PBX_SLS"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="82"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TONE_CDMA_LOW_PBX_SS"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="76"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TONE_CDMA_LOW_PBX_SSL"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="79"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TONE_CDMA_LOW_PBX_S_X4"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="85"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TONE_CDMA_LOW_SLS"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="67"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TONE_CDMA_LOW_SS"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="58"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TONE_CDMA_LOW_SSL"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="61"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TONE_CDMA_LOW_SS_2"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="64"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TONE_CDMA_LOW_S_X4"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="70"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TONE_CDMA_MED_L"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="54"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TONE_CDMA_MED_PBX_L"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="72"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TONE_CDMA_MED_PBX_SLS"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="81"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TONE_CDMA_MED_PBX_SS"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="75"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TONE_CDMA_MED_PBX_SSL"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="78"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TONE_CDMA_MED_PBX_S_X4"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="84"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TONE_CDMA_MED_SLS"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="66"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TONE_CDMA_MED_SS"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="57"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TONE_CDMA_MED_SSL"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="60"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TONE_CDMA_MED_SS_2"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="63"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TONE_CDMA_MED_S_X4"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="69"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TONE_CDMA_NETWORK_BUSY"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="40"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TONE_CDMA_NETWORK_BUSY_ONE_SHOT"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="96"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TONE_CDMA_NETWORK_CALLWAITING"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="43"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TONE_CDMA_NETWORK_USA_RINGBACK"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="35"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TONE_CDMA_ONE_MIN_BEEP"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="88"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TONE_CDMA_PIP"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="44"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TONE_CDMA_PRESSHOLDKEY_LITE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="90"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TONE_CDMA_REORDER"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="38"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TONE_CDMA_SIGNAL_OFF"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="98"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TONE_CDMA_SOFT_ERROR_LITE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="94"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TONE_DTMF_0"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="0"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TONE_DTMF_1"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TONE_DTMF_2"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TONE_DTMF_3"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="3"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TONE_DTMF_4"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="4"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TONE_DTMF_5"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="5"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TONE_DTMF_6"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="6"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TONE_DTMF_7"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="7"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TONE_DTMF_8"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="8"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TONE_DTMF_9"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="9"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TONE_DTMF_A"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="12"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TONE_DTMF_B"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="13"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TONE_DTMF_C"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="14"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TONE_DTMF_D"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="15"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TONE_DTMF_P"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="11"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TONE_DTMF_S"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="10"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TONE_PROP_ACK"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="25"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TONE_PROP_BEEP"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="24"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TONE_PROP_BEEP2"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="28"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TONE_PROP_NACK"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="26"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TONE_PROP_PROMPT"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="27"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TONE_SUP_BUSY"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="17"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TONE_SUP_CALL_WAITING"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="22"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TONE_SUP_CONFIRM"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="32"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TONE_SUP_CONGESTION"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="18"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TONE_SUP_CONGESTION_ABBREV"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="31"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TONE_SUP_DIAL"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TONE_SUP_ERROR"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="21"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TONE_SUP_INTERCEPT"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="29"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TONE_SUP_INTERCEPT_ABBREV"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="30"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TONE_SUP_PIP"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="33"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TONE_SUP_RADIO_ACK"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="19"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TONE_SUP_RADIO_NOTAVAIL"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="20"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TONE_SUP_RINGTONE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="23"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+</package>
+<package name="android.net"
+>
+<class name="ConnectivityManager"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="getActiveNetworkInfo"
+ return="android.net.NetworkInfo"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getAllNetworkInfo"
+ return="android.net.NetworkInfo[]"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getBackgroundDataSetting"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getNetworkInfo"
+ return="android.net.NetworkInfo"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="networkType" type="int">
+</parameter>
+</method>
+<method name="getNetworkPreference"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isNetworkTypeValid"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="networkType" type="int">
+</parameter>
+</method>
+<method name="requestRouteToHost"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="networkType" type="int">
+</parameter>
+<parameter name="hostAddress" type="int">
+</parameter>
+</method>
+<method name="setNetworkPreference"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="preference" type="int">
+</parameter>
+</method>
+<method name="startUsingNetworkFeature"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="networkType" type="int">
+</parameter>
+<parameter name="feature" type="java.lang.String">
+</parameter>
+</method>
+<method name="stopUsingNetworkFeature"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="networkType" type="int">
+</parameter>
+<parameter name="feature" type="java.lang.String">
+</parameter>
+</method>
+<field name="ACTION_BACKGROUND_DATA_SETTING_CHANGED"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.net.conn.BACKGROUND_DATA_SETTING_CHANGED&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="CONNECTIVITY_ACTION"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.net.conn.CONNECTIVITY_CHANGE&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="DEFAULT_NETWORK_PREFERENCE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="EXTRA_EXTRA_INFO"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;extraInfo&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="EXTRA_IS_FAILOVER"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;isFailover&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="EXTRA_NETWORK_INFO"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;networkInfo&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="EXTRA_NO_CONNECTIVITY"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;noConnectivity&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="EXTRA_OTHER_NETWORK_INFO"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;otherNetwork&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="EXTRA_REASON"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;reason&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TYPE_MOBILE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="0"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TYPE_MOBILE_DUN"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="4"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TYPE_MOBILE_HIPRI"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="5"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TYPE_MOBILE_MMS"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TYPE_MOBILE_SUPL"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="3"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TYPE_WIFI"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TYPE_WIMAX"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="6"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<class name="Credentials"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="Credentials"
+ type="android.net.Credentials"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="pid" type="int">
+</parameter>
+<parameter name="uid" type="int">
+</parameter>
+<parameter name="gid" type="int">
+</parameter>
+</constructor>
+<method name="getGid"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getPid"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getUid"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+</class>
+<class name="DhcpInfo"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="android.os.Parcelable">
+</implements>
+<constructor name="DhcpInfo"
+ type="android.net.DhcpInfo"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<method name="describeContents"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="writeToParcel"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="dest" type="android.os.Parcel">
+</parameter>
+<parameter name="flags" type="int">
+</parameter>
+</method>
+<field name="dns1"
+ type="int"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="dns2"
+ type="int"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="gateway"
+ type="int"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ipAddress"
+ type="int"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="leaseDuration"
+ type="int"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="netmask"
+ type="int"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="serverAddress"
+ type="int"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<class name="LocalServerSocket"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="LocalServerSocket"
+ type="android.net.LocalServerSocket"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</constructor>
+<constructor name="LocalServerSocket"
+ type="android.net.LocalServerSocket"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="fd" type="java.io.FileDescriptor">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</constructor>
+<method name="accept"
+ return="android.net.LocalSocket"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="close"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="getFileDescriptor"
+ return="java.io.FileDescriptor"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getLocalSocketAddress"
+ return="android.net.LocalSocketAddress"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+</class>
+<class name="LocalSocket"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="LocalSocket"
+ type="android.net.LocalSocket"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<method name="bind"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="bindpoint" type="android.net.LocalSocketAddress">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="close"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="connect"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="endpoint" type="android.net.LocalSocketAddress">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="connect"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="endpoint" type="android.net.LocalSocketAddress">
+</parameter>
+<parameter name="timeout" type="int">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="getAncillaryFileDescriptors"
+ return="java.io.FileDescriptor[]"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="getFileDescriptor"
+ return="java.io.FileDescriptor"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getInputStream"
+ return="java.io.InputStream"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="getLocalSocketAddress"
+ return="android.net.LocalSocketAddress"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getOutputStream"
+ return="java.io.OutputStream"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="getPeerCredentials"
+ return="android.net.Credentials"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="getReceiveBufferSize"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="getRemoteSocketAddress"
+ return="android.net.LocalSocketAddress"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getSendBufferSize"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="getSoTimeout"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="isBound"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isClosed"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isConnected"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isInputShutdown"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isOutputShutdown"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="setFileDescriptorsForSend"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="fds" type="java.io.FileDescriptor[]">
+</parameter>
+</method>
+<method name="setReceiveBufferSize"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="size" type="int">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="setSendBufferSize"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="n" type="int">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="setSoTimeout"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="n" type="int">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="shutdownInput"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="shutdownOutput"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+</class>
+<class name="LocalSocketAddress"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="LocalSocketAddress"
+ type="android.net.LocalSocketAddress"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+<parameter name="namespace" type="android.net.LocalSocketAddress.Namespace">
+</parameter>
+</constructor>
+<constructor name="LocalSocketAddress"
+ type="android.net.LocalSocketAddress"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+</constructor>
+<method name="getName"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getNamespace"
+ return="android.net.LocalSocketAddress.Namespace"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+</class>
+<class name="LocalSocketAddress.Namespace"
+ extends="java.lang.Enum"
+ abstract="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="valueOf"
+ return="android.net.LocalSocketAddress.Namespace"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+</method>
+<method name="values"
+ return="android.net.LocalSocketAddress.Namespace[]"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+</class>
+<class name="MailTo"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="getBody"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getCc"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getHeaders"
+ return="java.util.Map&lt;java.lang.String, java.lang.String&gt;"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getSubject"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getTo"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isMailTo"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="url" type="java.lang.String">
+</parameter>
+</method>
+<method name="parse"
+ return="android.net.MailTo"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="url" type="java.lang.String">
+</parameter>
+<exception name="ParseException" type="android.net.ParseException">
+</exception>
+</method>
+<field name="MAILTO_SCHEME"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;mailto:&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<class name="NetworkInfo"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="android.os.Parcelable">
+</implements>
+<method name="describeContents"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getDetailedState"
+ return="android.net.NetworkInfo.DetailedState"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getExtraInfo"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getReason"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getState"
+ return="android.net.NetworkInfo.State"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getSubtype"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getSubtypeName"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getType"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getTypeName"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isAvailable"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isConnected"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isConnectedOrConnecting"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isFailover"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isRoaming"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="writeToParcel"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="dest" type="android.os.Parcel">
+</parameter>
+<parameter name="flags" type="int">
+</parameter>
+</method>
+</class>
+<class name="NetworkInfo.DetailedState"
+ extends="java.lang.Enum"
+ abstract="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="valueOf"
+ return="android.net.NetworkInfo.DetailedState"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+</method>
+<method name="values"
+ return="android.net.NetworkInfo.DetailedState[]"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+</class>
+<class name="NetworkInfo.State"
+ extends="java.lang.Enum"
+ abstract="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="valueOf"
+ return="android.net.NetworkInfo.State"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+</method>
+<method name="values"
+ return="android.net.NetworkInfo.State[]"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+</class>
+<class name="ParseException"
+ extends="java.lang.RuntimeException"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<field name="response"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<class name="Proxy"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="Proxy"
+ type="android.net.Proxy"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<method name="getDefaultHost"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getDefaultPort"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getHost"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="ctx" type="android.content.Context">
+</parameter>
+</method>
+<method name="getPort"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="ctx" type="android.content.Context">
+</parameter>
+</method>
+<field name="PROXY_CHANGE_ACTION"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.intent.action.PROXY_CHANGE&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<class name="SSLCertificateSocketFactory"
+ extends="javax.net.ssl.SSLSocketFactory"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="SSLCertificateSocketFactory"
+ type="android.net.SSLCertificateSocketFactory"
+ static="false"
+ final="false"
+ deprecated="deprecated"
+ visibility="public"
+>
+<parameter name="handshakeTimeoutMillis" type="int">
+</parameter>
+</constructor>
+<method name="createSocket"
+ return="java.net.Socket"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="k" type="java.net.Socket">
+</parameter>
+<parameter name="host" type="java.lang.String">
+</parameter>
+<parameter name="port" type="int">
+</parameter>
+<parameter name="close" type="boolean">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="createSocket"
+ return="java.net.Socket"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="addr" type="java.net.InetAddress">
+</parameter>
+<parameter name="port" type="int">
+</parameter>
+<parameter name="localAddr" type="java.net.InetAddress">
+</parameter>
+<parameter name="localPort" type="int">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="createSocket"
+ return="java.net.Socket"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="addr" type="java.net.InetAddress">
+</parameter>
+<parameter name="port" type="int">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="createSocket"
+ return="java.net.Socket"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="host" type="java.lang.String">
+</parameter>
+<parameter name="port" type="int">
+</parameter>
+<parameter name="localAddr" type="java.net.InetAddress">
+</parameter>
+<parameter name="localPort" type="int">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="createSocket"
+ return="java.net.Socket"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="host" type="java.lang.String">
+</parameter>
+<parameter name="port" type="int">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="getDefault"
+ return="javax.net.SocketFactory"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="handshakeTimeoutMillis" type="int">
+</parameter>
+</method>
+<method name="getDefault"
+ return="javax.net.ssl.SSLSocketFactory"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="handshakeTimeoutMillis" type="int">
+</parameter>
+<parameter name="cache" type="android.net.SSLSessionCache">
+</parameter>
+</method>
+<method name="getDefaultCipherSuites"
+ return="java.lang.String[]"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getHttpSocketFactory"
+ return="org.apache.http.conn.ssl.SSLSocketFactory"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="handshakeTimeoutMillis" type="int">
+</parameter>
+<parameter name="cache" type="android.net.SSLSessionCache">
+</parameter>
+</method>
+<method name="getInsecure"
+ return="javax.net.ssl.SSLSocketFactory"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="handshakeTimeoutMillis" type="int">
+</parameter>
+<parameter name="cache" type="android.net.SSLSessionCache">
+</parameter>
+</method>
+<method name="getSupportedCipherSuites"
+ return="java.lang.String[]"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+</class>
+<class name="SSLSessionCache"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="SSLSessionCache"
+ type="android.net.SSLSessionCache"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="dir" type="java.io.File">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</constructor>
+<constructor name="SSLSessionCache"
+ type="android.net.SSLSessionCache"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="context" type="android.content.Context">
+</parameter>
+</constructor>
+</class>
+<class name="TrafficStats"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="TrafficStats"
+ type="android.net.TrafficStats"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<method name="getMobileRxBytes"
+ return="long"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getMobileRxPackets"
+ return="long"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getMobileTxBytes"
+ return="long"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getMobileTxPackets"
+ return="long"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getTotalRxBytes"
+ return="long"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getTotalRxPackets"
+ return="long"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getTotalTxBytes"
+ return="long"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getTotalTxPackets"
+ return="long"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getUidRxBytes"
+ return="long"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="uid" type="int">
+</parameter>
+</method>
+<method name="getUidTxBytes"
+ return="long"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="uid" type="int">
+</parameter>
+</method>
+<field name="UNSUPPORTED"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="-1"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<class name="Uri"
+ extends="java.lang.Object"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="java.lang.Comparable">
+</implements>
+<implements name="android.os.Parcelable">
+</implements>
+<method name="buildUpon"
+ return="android.net.Uri.Builder"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="compareTo"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="other" type="android.net.Uri">
+</parameter>
+</method>
+<method name="decode"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="s" type="java.lang.String">
+</parameter>
+</method>
+<method name="encode"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="s" type="java.lang.String">
+</parameter>
+</method>
+<method name="encode"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="s" type="java.lang.String">
+</parameter>
+<parameter name="allow" type="java.lang.String">
+</parameter>
+</method>
+<method name="fromFile"
+ return="android.net.Uri"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="file" type="java.io.File">
+</parameter>
+</method>
+<method name="fromParts"
+ return="android.net.Uri"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="scheme" type="java.lang.String">
+</parameter>
+<parameter name="ssp" type="java.lang.String">
+</parameter>
+<parameter name="fragment" type="java.lang.String">
+</parameter>
+</method>
+<method name="getAuthority"
+ return="java.lang.String"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getEncodedAuthority"
+ return="java.lang.String"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getEncodedFragment"
+ return="java.lang.String"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getEncodedPath"
+ return="java.lang.String"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getEncodedQuery"
+ return="java.lang.String"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getEncodedSchemeSpecificPart"
+ return="java.lang.String"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getEncodedUserInfo"
+ return="java.lang.String"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getFragment"
+ return="java.lang.String"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getHost"
+ return="java.lang.String"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getLastPathSegment"
+ return="java.lang.String"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getPath"
+ return="java.lang.String"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getPathSegments"
+ return="java.util.List&lt;java.lang.String&gt;"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getPort"
+ return="int"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getQuery"
+ return="java.lang.String"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getQueryParameter"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="key" type="java.lang.String">
+</parameter>
+</method>
+<method name="getQueryParameters"
+ return="java.util.List&lt;java.lang.String&gt;"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="key" type="java.lang.String">
+</parameter>
+</method>
+<method name="getScheme"
+ return="java.lang.String"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getSchemeSpecificPart"
+ return="java.lang.String"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getUserInfo"
+ return="java.lang.String"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isAbsolute"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isHierarchical"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isOpaque"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isRelative"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="parse"
+ return="android.net.Uri"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="uriString" type="java.lang.String">
+</parameter>
+</method>
+<method name="toString"
+ return="java.lang.String"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="withAppendedPath"
+ return="android.net.Uri"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="baseUri" type="android.net.Uri">
+</parameter>
+<parameter name="pathSegment" type="java.lang.String">
+</parameter>
+</method>
+<method name="writeToParcel"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="out" type="android.os.Parcel">
+</parameter>
+<parameter name="uri" type="android.net.Uri">
+</parameter>
+</method>
+<field name="CREATOR"
+ type="android.os.Parcelable.Creator"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="EMPTY"
+ type="android.net.Uri"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<class name="Uri.Builder"
+ extends="java.lang.Object"
+ abstract="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="Uri.Builder"
+ type="android.net.Uri.Builder"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<method name="appendEncodedPath"
+ return="android.net.Uri.Builder"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="newSegment" type="java.lang.String">
+</parameter>
+</method>
+<method name="appendPath"
+ return="android.net.Uri.Builder"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="newSegment" type="java.lang.String">
+</parameter>
+</method>
+<method name="appendQueryParameter"
+ return="android.net.Uri.Builder"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="key" type="java.lang.String">
+</parameter>
+<parameter name="value" type="java.lang.String">
+</parameter>
+</method>
+<method name="authority"
+ return="android.net.Uri.Builder"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="authority" type="java.lang.String">
+</parameter>
+</method>
+<method name="build"
+ return="android.net.Uri"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="encodedAuthority"
+ return="android.net.Uri.Builder"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="authority" type="java.lang.String">
+</parameter>
+</method>
+<method name="encodedFragment"
+ return="android.net.Uri.Builder"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="fragment" type="java.lang.String">
+</parameter>
+</method>
+<method name="encodedOpaquePart"
+ return="android.net.Uri.Builder"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="opaquePart" type="java.lang.String">
+</parameter>
+</method>
+<method name="encodedPath"
+ return="android.net.Uri.Builder"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="path" type="java.lang.String">
+</parameter>
+</method>
+<method name="encodedQuery"
+ return="android.net.Uri.Builder"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="query" type="java.lang.String">
+</parameter>
+</method>
+<method name="fragment"
+ return="android.net.Uri.Builder"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="fragment" type="java.lang.String">
+</parameter>
+</method>
+<method name="opaquePart"
+ return="android.net.Uri.Builder"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="opaquePart" type="java.lang.String">
+</parameter>
+</method>
+<method name="path"
+ return="android.net.Uri.Builder"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="path" type="java.lang.String">
+</parameter>
+</method>
+<method name="query"
+ return="android.net.Uri.Builder"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="query" type="java.lang.String">
+</parameter>
+</method>
+<method name="scheme"
+ return="android.net.Uri.Builder"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="scheme" type="java.lang.String">
+</parameter>
+</method>
+</class>
+<class name="UrlQuerySanitizer"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="UrlQuerySanitizer"
+ type="android.net.UrlQuerySanitizer"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<constructor name="UrlQuerySanitizer"
+ type="android.net.UrlQuerySanitizer"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="url" type="java.lang.String">
+</parameter>
+</constructor>
+<method name="addSanitizedEntry"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="parameter" type="java.lang.String">
+</parameter>
+<parameter name="value" type="java.lang.String">
+</parameter>
+</method>
+<method name="clear"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</method>
+<method name="decodeHexDigit"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="c" type="char">
+</parameter>
+</method>
+<method name="getAllButNulAndAngleBracketsLegal"
+ return="android.net.UrlQuerySanitizer.ValueSanitizer"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getAllButNulLegal"
+ return="android.net.UrlQuerySanitizer.ValueSanitizer"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getAllButWhitespaceLegal"
+ return="android.net.UrlQuerySanitizer.ValueSanitizer"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getAllIllegal"
+ return="android.net.UrlQuerySanitizer.ValueSanitizer"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getAllowUnregisteredParamaters"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getAmpAndSpaceLegal"
+ return="android.net.UrlQuerySanitizer.ValueSanitizer"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getAmpLegal"
+ return="android.net.UrlQuerySanitizer.ValueSanitizer"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getEffectiveValueSanitizer"
+ return="android.net.UrlQuerySanitizer.ValueSanitizer"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="parameter" type="java.lang.String">
+</parameter>
+</method>
+<method name="getParameterList"
+ return="java.util.List&lt;android.net.UrlQuerySanitizer.ParameterValuePair&gt;"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getParameterSet"
+ return="java.util.Set&lt;java.lang.String&gt;"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getPreferFirstRepeatedParameter"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getSpaceLegal"
+ return="android.net.UrlQuerySanitizer.ValueSanitizer"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getUnregisteredParameterValueSanitizer"
+ return="android.net.UrlQuerySanitizer.ValueSanitizer"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getUrlAndSpaceLegal"
+ return="android.net.UrlQuerySanitizer.ValueSanitizer"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getUrlLegal"
+ return="android.net.UrlQuerySanitizer.ValueSanitizer"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getValue"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="parameter" type="java.lang.String">
+</parameter>
+</method>
+<method name="getValueSanitizer"
+ return="android.net.UrlQuerySanitizer.ValueSanitizer"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="parameter" type="java.lang.String">
+</parameter>
+</method>
+<method name="hasParameter"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="parameter" type="java.lang.String">
+</parameter>
+</method>
+<method name="isHexDigit"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="c" type="char">
+</parameter>
+</method>
+<method name="parseEntry"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="parameter" type="java.lang.String">
+</parameter>
+<parameter name="value" type="java.lang.String">
+</parameter>
+</method>
+<method name="parseQuery"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="query" type="java.lang.String">
+</parameter>
+</method>
+<method name="parseUrl"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="url" type="java.lang.String">
+</parameter>
+</method>
+<method name="registerParameter"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="parameter" type="java.lang.String">
+</parameter>
+<parameter name="valueSanitizer" type="android.net.UrlQuerySanitizer.ValueSanitizer">
+</parameter>
+</method>
+<method name="registerParameters"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="parameters" type="java.lang.String[]">
+</parameter>
+<parameter name="valueSanitizer" type="android.net.UrlQuerySanitizer.ValueSanitizer">
+</parameter>
+</method>
+<method name="setAllowUnregisteredParamaters"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="allowUnregisteredParamaters" type="boolean">
+</parameter>
+</method>
+<method name="setPreferFirstRepeatedParameter"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="preferFirstRepeatedParameter" type="boolean">
+</parameter>
+</method>
+<method name="setUnregisteredParameterValueSanitizer"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="sanitizer" type="android.net.UrlQuerySanitizer.ValueSanitizer">
+</parameter>
+</method>
+<method name="unescape"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="string" type="java.lang.String">
+</parameter>
+</method>
+</class>
+<class name="UrlQuerySanitizer.IllegalCharacterValueSanitizer"
+ extends="java.lang.Object"
+ abstract="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="android.net.UrlQuerySanitizer.ValueSanitizer">
+</implements>
+<constructor name="UrlQuerySanitizer.IllegalCharacterValueSanitizer"
+ type="android.net.UrlQuerySanitizer.IllegalCharacterValueSanitizer"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="flags" type="int">
+</parameter>
+</constructor>
+<method name="sanitize"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="value" type="java.lang.String">
+</parameter>
+</method>
+<field name="ALL_BUT_NUL_AND_ANGLE_BRACKETS_LEGAL"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1439"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ALL_BUT_NUL_LEGAL"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1535"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ALL_BUT_WHITESPACE_LEGAL"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1532"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ALL_ILLEGAL"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="0"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ALL_OK"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2047"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ALL_WHITESPACE_OK"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="3"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="AMP_AND_SPACE_LEGAL"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="129"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="AMP_LEGAL"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="128"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="AMP_OK"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="128"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="DQUOTE_OK"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="8"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GT_OK"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="64"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="LT_OK"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="32"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="NON_7_BIT_ASCII_OK"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="4"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="NUL_OK"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="512"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="OTHER_WHITESPACE_OK"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="PCT_OK"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="256"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="SCRIPT_URL_OK"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1024"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="SPACE_LEGAL"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="SPACE_OK"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="SQUOTE_OK"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="URL_AND_SPACE_LEGAL"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="405"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="URL_LEGAL"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="404"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<class name="UrlQuerySanitizer.ParameterValuePair"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="UrlQuerySanitizer.ParameterValuePair"
+ type="android.net.UrlQuerySanitizer.ParameterValuePair"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="parameter" type="java.lang.String">
+</parameter>
+<parameter name="value" type="java.lang.String">
+</parameter>
+</constructor>
+<field name="mParameter"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="mValue"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<interface name="UrlQuerySanitizer.ValueSanitizer"
+ abstract="true"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="sanitize"
+ return="java.lang.String"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="value" type="java.lang.String">
+</parameter>
+</method>
+</interface>
+</package>
+<package name="android.net.http"
+>
+<class name="AndroidHttpClient"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="org.apache.http.client.HttpClient">
+</implements>
+<method name="close"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="disableCurlLogging"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="enableCurlLogging"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+<parameter name="level" type="int">
+</parameter>
+</method>
+<method name="execute"
+ return="org.apache.http.HttpResponse"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="request" type="org.apache.http.client.methods.HttpUriRequest">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="execute"
+ return="org.apache.http.HttpResponse"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="request" type="org.apache.http.client.methods.HttpUriRequest">
+</parameter>
+<parameter name="context" type="org.apache.http.protocol.HttpContext">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="execute"
+ return="org.apache.http.HttpResponse"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="target" type="org.apache.http.HttpHost">
+</parameter>
+<parameter name="request" type="org.apache.http.HttpRequest">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="execute"
+ return="org.apache.http.HttpResponse"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="target" type="org.apache.http.HttpHost">
+</parameter>
+<parameter name="request" type="org.apache.http.HttpRequest">
+</parameter>
+<parameter name="context" type="org.apache.http.protocol.HttpContext">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="execute"
+ return="T"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="request" type="org.apache.http.client.methods.HttpUriRequest">
+</parameter>
+<parameter name="responseHandler" type="org.apache.http.client.ResponseHandler&lt;? extends T&gt;">
+</parameter>
+<exception name="ClientProtocolException" type="org.apache.http.client.ClientProtocolException">
+</exception>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="execute"
+ return="T"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="request" type="org.apache.http.client.methods.HttpUriRequest">
+</parameter>
+<parameter name="responseHandler" type="org.apache.http.client.ResponseHandler&lt;? extends T&gt;">
+</parameter>
+<parameter name="context" type="org.apache.http.protocol.HttpContext">
+</parameter>
+<exception name="ClientProtocolException" type="org.apache.http.client.ClientProtocolException">
+</exception>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="execute"
+ return="T"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="target" type="org.apache.http.HttpHost">
+</parameter>
+<parameter name="request" type="org.apache.http.HttpRequest">
+</parameter>
+<parameter name="responseHandler" type="org.apache.http.client.ResponseHandler&lt;? extends T&gt;">
+</parameter>
+<exception name="ClientProtocolException" type="org.apache.http.client.ClientProtocolException">
+</exception>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="execute"
+ return="T"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="target" type="org.apache.http.HttpHost">
+</parameter>
+<parameter name="request" type="org.apache.http.HttpRequest">
+</parameter>
+<parameter name="responseHandler" type="org.apache.http.client.ResponseHandler&lt;? extends T&gt;">
+</parameter>
+<parameter name="context" type="org.apache.http.protocol.HttpContext">
+</parameter>
+<exception name="ClientProtocolException" type="org.apache.http.client.ClientProtocolException">
+</exception>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="getCompressedEntity"
+ return="org.apache.http.entity.AbstractHttpEntity"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="data" type="byte[]">
+</parameter>
+<parameter name="resolver" type="android.content.ContentResolver">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="getConnectionManager"
+ return="org.apache.http.conn.ClientConnectionManager"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getMinGzipSize"
+ return="long"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="resolver" type="android.content.ContentResolver">
+</parameter>
+</method>
+<method name="getParams"
+ return="org.apache.http.params.HttpParams"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getUngzippedContent"
+ return="java.io.InputStream"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="entity" type="org.apache.http.HttpEntity">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="modifyRequestToAcceptGzipResponse"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="request" type="org.apache.http.HttpRequest">
+</parameter>
+</method>
+<method name="newInstance"
+ return="android.net.http.AndroidHttpClient"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="userAgent" type="java.lang.String">
+</parameter>
+<parameter name="context" type="android.content.Context">
+</parameter>
+</method>
+<method name="newInstance"
+ return="android.net.http.AndroidHttpClient"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="userAgent" type="java.lang.String">
+</parameter>
+</method>
+<method name="parseDate"
+ return="long"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="dateString" type="java.lang.String">
+</parameter>
+</method>
+<field name="DEFAULT_SYNC_MIN_GZIP_BYTES"
+ type="long"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<class name="SslCertificate"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="SslCertificate"
+ type="android.net.http.SslCertificate"
+ static="false"
+ final="false"
+ deprecated="deprecated"
+ visibility="public"
+>
+<parameter name="issuedTo" type="java.lang.String">
+</parameter>
+<parameter name="issuedBy" type="java.lang.String">
+</parameter>
+<parameter name="validNotBefore" type="java.lang.String">
+</parameter>
+<parameter name="validNotAfter" type="java.lang.String">
+</parameter>
+</constructor>
+<constructor name="SslCertificate"
+ type="android.net.http.SslCertificate"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="issuedTo" type="java.lang.String">
+</parameter>
+<parameter name="issuedBy" type="java.lang.String">
+</parameter>
+<parameter name="validNotBefore" type="java.util.Date">
+</parameter>
+<parameter name="validNotAfter" type="java.util.Date">
+</parameter>
+</constructor>
+<constructor name="SslCertificate"
+ type="android.net.http.SslCertificate"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="certificate" type="java.security.cert.X509Certificate">
+</parameter>
+</constructor>
+<method name="getIssuedBy"
+ return="android.net.http.SslCertificate.DName"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getIssuedTo"
+ return="android.net.http.SslCertificate.DName"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getValidNotAfter"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="deprecated"
+ visibility="public"
+>
+</method>
+<method name="getValidNotAfterDate"
+ return="java.util.Date"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getValidNotBefore"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="deprecated"
+ visibility="public"
+>
+</method>
+<method name="getValidNotBeforeDate"
+ return="java.util.Date"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="restoreState"
+ return="android.net.http.SslCertificate"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="bundle" type="android.os.Bundle">
+</parameter>
+</method>
+<method name="saveState"
+ return="android.os.Bundle"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="certificate" type="android.net.http.SslCertificate">
+</parameter>
+</method>
+</class>
+<class name="SslCertificate.DName"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="SslCertificate.DName"
+ type="android.net.http.SslCertificate.DName"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="dName" type="java.lang.String">
+</parameter>
+</constructor>
+<method name="getCName"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getDName"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getOName"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getUName"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+</class>
+<class name="SslError"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="SslError"
+ type="android.net.http.SslError"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="error" type="int">
+</parameter>
+<parameter name="certificate" type="android.net.http.SslCertificate">
+</parameter>
+</constructor>
+<constructor name="SslError"
+ type="android.net.http.SslError"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="error" type="int">
+</parameter>
+<parameter name="certificate" type="java.security.cert.X509Certificate">
+</parameter>
+</constructor>
+<method name="addError"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="error" type="int">
+</parameter>
+</method>
+<method name="getCertificate"
+ return="android.net.http.SslCertificate"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getPrimaryError"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="hasError"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="error" type="int">
+</parameter>
+</method>
+<field name="SSL_EXPIRED"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="SSL_IDMISMATCH"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="SSL_MAX_ERROR"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="4"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="SSL_NOTYETVALID"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="0"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="SSL_UNTRUSTED"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="3"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+</package>
+<package name="android.net.wifi"
+>
+<class name="ScanResult"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="android.os.Parcelable">
+</implements>
+<method name="describeContents"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="writeToParcel"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="dest" type="android.os.Parcel">
+</parameter>
+<parameter name="flags" type="int">
+</parameter>
+</method>
+<field name="BSSID"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="SSID"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="capabilities"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="frequency"
+ type="int"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="level"
+ type="int"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<class name="SupplicantState"
+ extends="java.lang.Enum"
+ abstract="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="android.os.Parcelable">
+</implements>
+<method name="describeContents"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isValidState"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="state" type="android.net.wifi.SupplicantState">
+</parameter>
+</method>
+<method name="valueOf"
+ return="android.net.wifi.SupplicantState"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+</method>
+<method name="values"
+ return="android.net.wifi.SupplicantState[]"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="writeToParcel"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="dest" type="android.os.Parcel">
+</parameter>
+<parameter name="flags" type="int">
+</parameter>
+</method>
+</class>
+<class name="WifiConfiguration"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="android.os.Parcelable">
+</implements>
+<constructor name="WifiConfiguration"
+ type="android.net.wifi.WifiConfiguration"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<method name="describeContents"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="writeToParcel"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="dest" type="android.os.Parcel">
+</parameter>
+<parameter name="flags" type="int">
+</parameter>
+</method>
+<field name="BSSID"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="SSID"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="allowedAuthAlgorithms"
+ type="java.util.BitSet"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="allowedGroupCiphers"
+ type="java.util.BitSet"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="allowedKeyManagement"
+ type="java.util.BitSet"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="allowedPairwiseCiphers"
+ type="java.util.BitSet"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="allowedProtocols"
+ type="java.util.BitSet"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="hiddenSSID"
+ type="boolean"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="networkId"
+ type="int"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="preSharedKey"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="priority"
+ type="int"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="status"
+ type="int"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="wepKeys"
+ type="java.lang.String[]"
+ transient="false"
+ volatile="false"
+ value="null"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="wepTxKeyIndex"
+ type="int"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<class name="WifiConfiguration.AuthAlgorithm"
+ extends="java.lang.Object"
+ abstract="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<field name="LEAP"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="OPEN"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="0"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="SHARED"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="strings"
+ type="java.lang.String[]"
+ transient="false"
+ volatile="false"
+ value="null"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="varName"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;auth_alg&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<class name="WifiConfiguration.GroupCipher"
+ extends="java.lang.Object"
+ abstract="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<field name="CCMP"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="3"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TKIP"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="WEP104"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="WEP40"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="0"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="strings"
+ type="java.lang.String[]"
+ transient="false"
+ volatile="false"
+ value="null"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="varName"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;group&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<class name="WifiConfiguration.KeyMgmt"
+ extends="java.lang.Object"
+ abstract="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<field name="IEEE8021X"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="3"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="NONE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="0"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="WPA_EAP"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="WPA_PSK"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="strings"
+ type="java.lang.String[]"
+ transient="false"
+ volatile="false"
+ value="null"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="varName"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;key_mgmt&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<class name="WifiConfiguration.PairwiseCipher"
+ extends="java.lang.Object"
+ abstract="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<field name="CCMP"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="NONE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="0"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TKIP"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="strings"
+ type="java.lang.String[]"
+ transient="false"
+ volatile="false"
+ value="null"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="varName"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;pairwise&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<class name="WifiConfiguration.Protocol"
+ extends="java.lang.Object"
+ abstract="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<field name="RSN"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="WPA"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="0"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="strings"
+ type="java.lang.String[]"
+ transient="false"
+ volatile="false"
+ value="null"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="varName"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;proto&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<class name="WifiConfiguration.Status"
+ extends="java.lang.Object"
+ abstract="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<field name="CURRENT"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="0"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="DISABLED"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ENABLED"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="strings"
+ type="java.lang.String[]"
+ transient="false"
+ volatile="false"
+ value="null"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<class name="WifiInfo"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="android.os.Parcelable">
+</implements>
+<method name="describeContents"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getBSSID"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getDetailedStateOf"
+ return="android.net.NetworkInfo.DetailedState"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="suppState" type="android.net.wifi.SupplicantState">
+</parameter>
+</method>
+<method name="getHiddenSSID"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getIpAddress"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getLinkSpeed"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getMacAddress"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getNetworkId"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getRssi"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getSSID"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getSupplicantState"
+ return="android.net.wifi.SupplicantState"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="writeToParcel"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="dest" type="android.os.Parcel">
+</parameter>
+<parameter name="flags" type="int">
+</parameter>
+</method>
+<field name="LINK_SPEED_UNITS"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;Mbps&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<class name="WifiManager"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="addNetwork"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="config" type="android.net.wifi.WifiConfiguration">
+</parameter>
+</method>
+<method name="calculateSignalLevel"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="rssi" type="int">
+</parameter>
+<parameter name="numLevels" type="int">
+</parameter>
+</method>
+<method name="compareSignalLevel"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="rssiA" type="int">
+</parameter>
+<parameter name="rssiB" type="int">
+</parameter>
+</method>
+<method name="createMulticastLock"
+ return="android.net.wifi.WifiManager.MulticastLock"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="tag" type="java.lang.String">
+</parameter>
+</method>
+<method name="createWifiLock"
+ return="android.net.wifi.WifiManager.WifiLock"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="lockType" type="int">
+</parameter>
+<parameter name="tag" type="java.lang.String">
+</parameter>
+</method>
+<method name="createWifiLock"
+ return="android.net.wifi.WifiManager.WifiLock"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="tag" type="java.lang.String">
+</parameter>
+</method>
+<method name="disableNetwork"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="netId" type="int">
+</parameter>
+</method>
+<method name="disconnect"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="enableNetwork"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="netId" type="int">
+</parameter>
+<parameter name="disableOthers" type="boolean">
+</parameter>
+</method>
+<method name="getConfiguredNetworks"
+ return="java.util.List&lt;android.net.wifi.WifiConfiguration&gt;"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getConnectionInfo"
+ return="android.net.wifi.WifiInfo"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getDhcpInfo"
+ return="android.net.DhcpInfo"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getScanResults"
+ return="java.util.List&lt;android.net.wifi.ScanResult&gt;"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getWifiState"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isWifiEnabled"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="pingSupplicant"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="reassociate"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="reconnect"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="removeNetwork"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="netId" type="int">
+</parameter>
+</method>
+<method name="saveConfiguration"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="setWifiEnabled"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="enabled" type="boolean">
+</parameter>
+</method>
+<method name="startScan"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="updateNetwork"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="config" type="android.net.wifi.WifiConfiguration">
+</parameter>
+</method>
+<field name="ACTION_PICK_WIFI_NETWORK"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.net.wifi.PICK_WIFI_NETWORK&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ERROR_AUTHENTICATING"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="EXTRA_BSSID"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;bssid&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="EXTRA_NETWORK_INFO"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;networkInfo&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="EXTRA_NEW_RSSI"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;newRssi&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="EXTRA_NEW_STATE"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;newState&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="EXTRA_PREVIOUS_WIFI_STATE"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;previous_wifi_state&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="EXTRA_SUPPLICANT_CONNECTED"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;connected&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="EXTRA_SUPPLICANT_ERROR"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;supplicantError&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="EXTRA_WIFI_STATE"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;wifi_state&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="NETWORK_IDS_CHANGED_ACTION"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.net.wifi.NETWORK_IDS_CHANGED&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="NETWORK_STATE_CHANGED_ACTION"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.net.wifi.STATE_CHANGE&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="RSSI_CHANGED_ACTION"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.net.wifi.RSSI_CHANGED&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="SCAN_RESULTS_AVAILABLE_ACTION"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.net.wifi.SCAN_RESULTS&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="SUPPLICANT_CONNECTION_CHANGE_ACTION"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.net.wifi.supplicant.CONNECTION_CHANGE&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="SUPPLICANT_STATE_CHANGED_ACTION"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.net.wifi.supplicant.STATE_CHANGE&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="WIFI_MODE_FULL"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="WIFI_MODE_SCAN_ONLY"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="WIFI_STATE_CHANGED_ACTION"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.net.wifi.WIFI_STATE_CHANGED&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="WIFI_STATE_DISABLED"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="WIFI_STATE_DISABLING"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="0"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="WIFI_STATE_ENABLED"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="3"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="WIFI_STATE_ENABLING"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="WIFI_STATE_UNKNOWN"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="4"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<class name="WifiManager.MulticastLock"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="acquire"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isHeld"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="release"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="setReferenceCounted"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="refCounted" type="boolean">
+</parameter>
+</method>
+</class>
+<class name="WifiManager.WifiLock"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="acquire"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isHeld"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="release"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="setReferenceCounted"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="refCounted" type="boolean">
+</parameter>
+</method>
+</class>
+</package>
+<package name="android.opengl"
+>
+<class name="ETC1"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="ETC1"
+ type="android.opengl.ETC1"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<method name="decodeBlock"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="in" type="java.nio.Buffer">
+</parameter>
+<parameter name="out" type="java.nio.Buffer">
+</parameter>
+</method>
+<method name="decodeImage"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="in" type="java.nio.Buffer">
+</parameter>
+<parameter name="out" type="java.nio.Buffer">
+</parameter>
+<parameter name="width" type="int">
+</parameter>
+<parameter name="height" type="int">
+</parameter>
+<parameter name="pixelSize" type="int">
+</parameter>
+<parameter name="stride" type="int">
+</parameter>
+</method>
+<method name="encodeBlock"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="in" type="java.nio.Buffer">
+</parameter>
+<parameter name="validPixelMask" type="int">
+</parameter>
+<parameter name="out" type="java.nio.Buffer">
+</parameter>
+</method>
+<method name="encodeImage"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="in" type="java.nio.Buffer">
+</parameter>
+<parameter name="width" type="int">
+</parameter>
+<parameter name="height" type="int">
+</parameter>
+<parameter name="pixelSize" type="int">
+</parameter>
+<parameter name="stride" type="int">
+</parameter>
+<parameter name="out" type="java.nio.Buffer">
+</parameter>
+</method>
+<method name="formatHeader"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="header" type="java.nio.Buffer">
+</parameter>
+<parameter name="width" type="int">
+</parameter>
+<parameter name="height" type="int">
+</parameter>
+</method>
+<method name="getEncodedDataSize"
+ return="int"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="width" type="int">
+</parameter>
+<parameter name="height" type="int">
+</parameter>
+</method>
+<method name="getHeight"
+ return="int"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="header" type="java.nio.Buffer">
+</parameter>
+</method>
+<method name="getWidth"
+ return="int"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="header" type="java.nio.Buffer">
+</parameter>
+</method>
+<method name="isValid"
+ return="boolean"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="header" type="java.nio.Buffer">
+</parameter>
+</method>
+<field name="DECODED_BLOCK_SIZE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="48"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ENCODED_BLOCK_SIZE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="8"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ETC1_RGB8_OES"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="36196"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ETC_PKM_HEADER_SIZE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<class name="ETC1Util"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="ETC1Util"
+ type="android.opengl.ETC1Util"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<method name="compressTexture"
+ return="android.opengl.ETC1Util.ETC1Texture"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="input" type="java.nio.Buffer">
+</parameter>
+<parameter name="width" type="int">
+</parameter>
+<parameter name="height" type="int">
+</parameter>
+<parameter name="pixelSize" type="int">
+</parameter>
+<parameter name="stride" type="int">
+</parameter>
+</method>
+<method name="createTexture"
+ return="android.opengl.ETC1Util.ETC1Texture"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="input" type="java.io.InputStream">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="isETC1Supported"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="loadTexture"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="target" type="int">
+</parameter>
+<parameter name="level" type="int">
+</parameter>
+<parameter name="border" type="int">
+</parameter>
+<parameter name="fallbackFormat" type="int">
+</parameter>
+<parameter name="fallbackType" type="int">
+</parameter>
+<parameter name="input" type="java.io.InputStream">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="loadTexture"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="target" type="int">
+</parameter>
+<parameter name="level" type="int">
+</parameter>
+<parameter name="border" type="int">
+</parameter>
+<parameter name="fallbackFormat" type="int">
+</parameter>
+<parameter name="fallbackType" type="int">
+</parameter>
+<parameter name="texture" type="android.opengl.ETC1Util.ETC1Texture">
+</parameter>
+</method>
+<method name="writeTexture"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="texture" type="android.opengl.ETC1Util.ETC1Texture">
+</parameter>
+<parameter name="output" type="java.io.OutputStream">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+</class>
+<class name="ETC1Util.ETC1Texture"
+ extends="java.lang.Object"
+ abstract="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="ETC1Util.ETC1Texture"
+ type="android.opengl.ETC1Util.ETC1Texture"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="width" type="int">
+</parameter>
+<parameter name="height" type="int">
+</parameter>
+<parameter name="data" type="java.nio.ByteBuffer">
+</parameter>
+</constructor>
+<method name="getData"
+ return="java.nio.ByteBuffer"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getHeight"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getWidth"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+</class>
+<class name="GLDebugHelper"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="GLDebugHelper"
+ type="android.opengl.GLDebugHelper"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<method name="wrap"
+ return="javax.microedition.khronos.opengles.GL"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="gl" type="javax.microedition.khronos.opengles.GL">
+</parameter>
+<parameter name="configFlags" type="int">
+</parameter>
+<parameter name="log" type="java.io.Writer">
+</parameter>
+</method>
+<method name="wrap"
+ return="javax.microedition.khronos.egl.EGL"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="egl" type="javax.microedition.khronos.egl.EGL">
+</parameter>
+<parameter name="configFlags" type="int">
+</parameter>
+<parameter name="log" type="java.io.Writer">
+</parameter>
+</method>
+<field name="CONFIG_CHECK_GL_ERROR"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="CONFIG_CHECK_THREAD"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="CONFIG_LOG_ARGUMENT_NAMES"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="4"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ERROR_WRONG_THREAD"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="28672"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<class name="GLES10"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="GLES10"
+ type="android.opengl.GLES10"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<method name="glActiveTexture"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="texture" type="int">
+</parameter>
+</method>
+<method name="glAlphaFunc"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="func" type="int">
+</parameter>
+<parameter name="ref" type="float">
+</parameter>
+</method>
+<method name="glAlphaFuncx"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="func" type="int">
+</parameter>
+<parameter name="ref" type="int">
+</parameter>
+</method>
+<method name="glBindTexture"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="target" type="int">
+</parameter>
+<parameter name="texture" type="int">
+</parameter>
+</method>
+<method name="glBlendFunc"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="sfactor" type="int">
+</parameter>
+<parameter name="dfactor" type="int">
+</parameter>
+</method>
+<method name="glClear"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="mask" type="int">
+</parameter>
+</method>
+<method name="glClearColor"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="red" type="float">
+</parameter>
+<parameter name="green" type="float">
+</parameter>
+<parameter name="blue" type="float">
+</parameter>
+<parameter name="alpha" type="float">
+</parameter>
+</method>
+<method name="glClearColorx"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="red" type="int">
+</parameter>
+<parameter name="green" type="int">
+</parameter>
+<parameter name="blue" type="int">
+</parameter>
+<parameter name="alpha" type="int">
+</parameter>
+</method>
+<method name="glClearDepthf"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="depth" type="float">
+</parameter>
+</method>
+<method name="glClearDepthx"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="depth" type="int">
+</parameter>
+</method>
+<method name="glClearStencil"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="s" type="int">
+</parameter>
+</method>
+<method name="glClientActiveTexture"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="texture" type="int">
+</parameter>
+</method>
+<method name="glColor4f"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="red" type="float">
+</parameter>
+<parameter name="green" type="float">
+</parameter>
+<parameter name="blue" type="float">
+</parameter>
+<parameter name="alpha" type="float">
+</parameter>
+</method>
+<method name="glColor4x"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="red" type="int">
+</parameter>
+<parameter name="green" type="int">
+</parameter>
+<parameter name="blue" type="int">
+</parameter>
+<parameter name="alpha" type="int">
+</parameter>
+</method>
+<method name="glColorMask"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="red" type="boolean">
+</parameter>
+<parameter name="green" type="boolean">
+</parameter>
+<parameter name="blue" type="boolean">
+</parameter>
+<parameter name="alpha" type="boolean">
+</parameter>
+</method>
+<method name="glColorPointer"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="size" type="int">
+</parameter>
+<parameter name="type" type="int">
+</parameter>
+<parameter name="stride" type="int">
+</parameter>
+<parameter name="pointer" type="java.nio.Buffer">
+</parameter>
+</method>
+<method name="glCompressedTexImage2D"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="target" type="int">
+</parameter>
+<parameter name="level" type="int">
+</parameter>
+<parameter name="internalformat" type="int">
+</parameter>
+<parameter name="width" type="int">
+</parameter>
+<parameter name="height" type="int">
+</parameter>
+<parameter name="border" type="int">
+</parameter>
+<parameter name="imageSize" type="int">
+</parameter>
+<parameter name="data" type="java.nio.Buffer">
+</parameter>
+</method>
+<method name="glCompressedTexSubImage2D"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="target" type="int">
+</parameter>
+<parameter name="level" type="int">
+</parameter>
+<parameter name="xoffset" type="int">
+</parameter>
+<parameter name="yoffset" type="int">
+</parameter>
+<parameter name="width" type="int">
+</parameter>
+<parameter name="height" type="int">
+</parameter>
+<parameter name="format" type="int">
+</parameter>
+<parameter name="imageSize" type="int">
+</parameter>
+<parameter name="data" type="java.nio.Buffer">
+</parameter>
+</method>
+<method name="glCopyTexImage2D"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="target" type="int">
+</parameter>
+<parameter name="level" type="int">
+</parameter>
+<parameter name="internalformat" type="int">
+</parameter>
+<parameter name="x" type="int">
+</parameter>
+<parameter name="y" type="int">
+</parameter>
+<parameter name="width" type="int">
+</parameter>
+<parameter name="height" type="int">
+</parameter>
+<parameter name="border" type="int">
+</parameter>
+</method>
+<method name="glCopyTexSubImage2D"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="target" type="int">
+</parameter>
+<parameter name="level" type="int">
+</parameter>
+<parameter name="xoffset" type="int">
+</parameter>
+<parameter name="yoffset" type="int">
+</parameter>
+<parameter name="x" type="int">
+</parameter>
+<parameter name="y" type="int">
+</parameter>
+<parameter name="width" type="int">
+</parameter>
+<parameter name="height" type="int">
+</parameter>
+</method>
+<method name="glCullFace"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="mode" type="int">
+</parameter>
+</method>
+<method name="glDeleteTextures"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="n" type="int">
+</parameter>
+<parameter name="textures" type="int[]">
+</parameter>
+<parameter name="offset" type="int">
+</parameter>
+</method>
+<method name="glDeleteTextures"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="n" type="int">
+</parameter>
+<parameter name="textures" type="java.nio.IntBuffer">
+</parameter>
+</method>
+<method name="glDepthFunc"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="func" type="int">
+</parameter>
+</method>
+<method name="glDepthMask"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="flag" type="boolean">
+</parameter>
+</method>
+<method name="glDepthRangef"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="zNear" type="float">
+</parameter>
+<parameter name="zFar" type="float">
+</parameter>
+</method>
+<method name="glDepthRangex"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="zNear" type="int">
+</parameter>
+<parameter name="zFar" type="int">
+</parameter>
+</method>
+<method name="glDisable"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="cap" type="int">
+</parameter>
+</method>
+<method name="glDisableClientState"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="array" type="int">
+</parameter>
+</method>
+<method name="glDrawArrays"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="mode" type="int">
+</parameter>
+<parameter name="first" type="int">
+</parameter>
+<parameter name="count" type="int">
+</parameter>
+</method>
+<method name="glDrawElements"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="mode" type="int">
+</parameter>
+<parameter name="count" type="int">
+</parameter>
+<parameter name="type" type="int">
+</parameter>
+<parameter name="indices" type="java.nio.Buffer">
+</parameter>
+</method>
+<method name="glEnable"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="cap" type="int">
+</parameter>
+</method>
+<method name="glEnableClientState"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="array" type="int">
+</parameter>
+</method>
+<method name="glFinish"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="glFlush"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="glFogf"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="pname" type="int">
+</parameter>
+<parameter name="param" type="float">
+</parameter>
+</method>
+<method name="glFogfv"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="pname" type="int">
+</parameter>
+<parameter name="params" type="float[]">
+</parameter>
+<parameter name="offset" type="int">
+</parameter>
+</method>
+<method name="glFogfv"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="pname" type="int">
+</parameter>
+<parameter name="params" type="java.nio.FloatBuffer">
+</parameter>
+</method>
+<method name="glFogx"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="pname" type="int">
+</parameter>
+<parameter name="param" type="int">
+</parameter>
+</method>
+<method name="glFogxv"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="pname" type="int">
+</parameter>
+<parameter name="params" type="int[]">
+</parameter>
+<parameter name="offset" type="int">
+</parameter>
+</method>
+<method name="glFogxv"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="pname" type="int">
+</parameter>
+<parameter name="params" type="java.nio.IntBuffer">
+</parameter>
+</method>
+<method name="glFrontFace"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="mode" type="int">
+</parameter>
+</method>
+<method name="glFrustumf"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="left" type="float">
+</parameter>
+<parameter name="right" type="float">
+</parameter>
+<parameter name="bottom" type="float">
+</parameter>
+<parameter name="top" type="float">
+</parameter>
+<parameter name="zNear" type="float">
+</parameter>
+<parameter name="zFar" type="float">
+</parameter>
+</method>
+<method name="glFrustumx"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="left" type="int">
+</parameter>
+<parameter name="right" type="int">
+</parameter>
+<parameter name="bottom" type="int">
+</parameter>
+<parameter name="top" type="int">
+</parameter>
+<parameter name="zNear" type="int">
+</parameter>
+<parameter name="zFar" type="int">
+</parameter>
+</method>
+<method name="glGenTextures"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="n" type="int">
+</parameter>
+<parameter name="textures" type="int[]">
+</parameter>
+<parameter name="offset" type="int">
+</parameter>
+</method>
+<method name="glGenTextures"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="n" type="int">
+</parameter>
+<parameter name="textures" type="java.nio.IntBuffer">
+</parameter>
+</method>
+<method name="glGetError"
+ return="int"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="glGetIntegerv"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="pname" type="int">
+</parameter>
+<parameter name="params" type="int[]">
+</parameter>
+<parameter name="offset" type="int">
+</parameter>
+</method>
+<method name="glGetIntegerv"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="pname" type="int">
+</parameter>
+<parameter name="params" type="java.nio.IntBuffer">
+</parameter>
+</method>
+<method name="glGetString"
+ return="java.lang.String"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="int">
+</parameter>
+</method>
+<method name="glHint"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="target" type="int">
+</parameter>
+<parameter name="mode" type="int">
+</parameter>
+</method>
+<method name="glLightModelf"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="pname" type="int">
+</parameter>
+<parameter name="param" type="float">
+</parameter>
+</method>
+<method name="glLightModelfv"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="pname" type="int">
+</parameter>
+<parameter name="params" type="float[]">
+</parameter>
+<parameter name="offset" type="int">
+</parameter>
+</method>
+<method name="glLightModelfv"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="pname" type="int">
+</parameter>
+<parameter name="params" type="java.nio.FloatBuffer">
+</parameter>
+</method>
+<method name="glLightModelx"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="pname" type="int">
+</parameter>
+<parameter name="param" type="int">
+</parameter>
+</method>
+<method name="glLightModelxv"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="pname" type="int">
+</parameter>
+<parameter name="params" type="int[]">
+</parameter>
+<parameter name="offset" type="int">
+</parameter>
+</method>
+<method name="glLightModelxv"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="pname" type="int">
+</parameter>
+<parameter name="params" type="java.nio.IntBuffer">
+</parameter>
+</method>
+<method name="glLightf"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="light" type="int">
+</parameter>
+<parameter name="pname" type="int">
+</parameter>
+<parameter name="param" type="float">
+</parameter>
+</method>
+<method name="glLightfv"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="light" type="int">
+</parameter>
+<parameter name="pname" type="int">
+</parameter>
+<parameter name="params" type="float[]">
+</parameter>
+<parameter name="offset" type="int">
+</parameter>
+</method>
+<method name="glLightfv"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="light" type="int">
+</parameter>
+<parameter name="pname" type="int">
+</parameter>
+<parameter name="params" type="java.nio.FloatBuffer">
+</parameter>
+</method>
+<method name="glLightx"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="light" type="int">
+</parameter>
+<parameter name="pname" type="int">
+</parameter>
+<parameter name="param" type="int">
+</parameter>
+</method>
+<method name="glLightxv"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="light" type="int">
+</parameter>
+<parameter name="pname" type="int">
+</parameter>
+<parameter name="params" type="int[]">
+</parameter>
+<parameter name="offset" type="int">
+</parameter>
+</method>
+<method name="glLightxv"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="light" type="int">
+</parameter>
+<parameter name="pname" type="int">
+</parameter>
+<parameter name="params" type="java.nio.IntBuffer">
+</parameter>
+</method>
+<method name="glLineWidth"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="width" type="float">
+</parameter>
+</method>
+<method name="glLineWidthx"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="width" type="int">
+</parameter>
+</method>
+<method name="glLoadIdentity"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="glLoadMatrixf"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="m" type="float[]">
+</parameter>
+<parameter name="offset" type="int">
+</parameter>
+</method>
+<method name="glLoadMatrixf"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="m" type="java.nio.FloatBuffer">
+</parameter>
+</method>
+<method name="glLoadMatrixx"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="m" type="int[]">
+</parameter>
+<parameter name="offset" type="int">
+</parameter>
+</method>
+<method name="glLoadMatrixx"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="m" type="java.nio.IntBuffer">
+</parameter>
+</method>
+<method name="glLogicOp"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="opcode" type="int">
+</parameter>
+</method>
+<method name="glMaterialf"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="face" type="int">
+</parameter>
+<parameter name="pname" type="int">
+</parameter>
+<parameter name="param" type="float">
+</parameter>
+</method>
+<method name="glMaterialfv"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="face" type="int">
+</parameter>
+<parameter name="pname" type="int">
+</parameter>
+<parameter name="params" type="float[]">
+</parameter>
+<parameter name="offset" type="int">
+</parameter>
+</method>
+<method name="glMaterialfv"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="face" type="int">
+</parameter>
+<parameter name="pname" type="int">
+</parameter>
+<parameter name="params" type="java.nio.FloatBuffer">
+</parameter>
+</method>
+<method name="glMaterialx"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="face" type="int">
+</parameter>
+<parameter name="pname" type="int">
+</parameter>
+<parameter name="param" type="int">
+</parameter>
+</method>
+<method name="glMaterialxv"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="face" type="int">
+</parameter>
+<parameter name="pname" type="int">
+</parameter>
+<parameter name="params" type="int[]">
+</parameter>
+<parameter name="offset" type="int">
+</parameter>
+</method>
+<method name="glMaterialxv"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="face" type="int">
+</parameter>
+<parameter name="pname" type="int">
+</parameter>
+<parameter name="params" type="java.nio.IntBuffer">
+</parameter>
+</method>
+<method name="glMatrixMode"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="mode" type="int">
+</parameter>
+</method>
+<method name="glMultMatrixf"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="m" type="float[]">
+</parameter>
+<parameter name="offset" type="int">
+</parameter>
+</method>
+<method name="glMultMatrixf"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="m" type="java.nio.FloatBuffer">
+</parameter>
+</method>
+<method name="glMultMatrixx"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="m" type="int[]">
+</parameter>
+<parameter name="offset" type="int">
+</parameter>
+</method>
+<method name="glMultMatrixx"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="m" type="java.nio.IntBuffer">
+</parameter>
+</method>
+<method name="glMultiTexCoord4f"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="target" type="int">
+</parameter>
+<parameter name="s" type="float">
+</parameter>
+<parameter name="t" type="float">
+</parameter>
+<parameter name="r" type="float">
+</parameter>
+<parameter name="q" type="float">
+</parameter>
+</method>
+<method name="glMultiTexCoord4x"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="target" type="int">
+</parameter>
+<parameter name="s" type="int">
+</parameter>
+<parameter name="t" type="int">
+</parameter>
+<parameter name="r" type="int">
+</parameter>
+<parameter name="q" type="int">
+</parameter>
+</method>
+<method name="glNormal3f"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="nx" type="float">
+</parameter>
+<parameter name="ny" type="float">
+</parameter>
+<parameter name="nz" type="float">
+</parameter>
+</method>
+<method name="glNormal3x"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="nx" type="int">
+</parameter>
+<parameter name="ny" type="int">
+</parameter>
+<parameter name="nz" type="int">
+</parameter>
+</method>
+<method name="glNormalPointer"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="type" type="int">
+</parameter>
+<parameter name="stride" type="int">
+</parameter>
+<parameter name="pointer" type="java.nio.Buffer">
+</parameter>
+</method>
+<method name="glOrthof"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="left" type="float">
+</parameter>
+<parameter name="right" type="float">
+</parameter>
+<parameter name="bottom" type="float">
+</parameter>
+<parameter name="top" type="float">
+</parameter>
+<parameter name="zNear" type="float">
+</parameter>
+<parameter name="zFar" type="float">
+</parameter>
+</method>
+<method name="glOrthox"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="left" type="int">
+</parameter>
+<parameter name="right" type="int">
+</parameter>
+<parameter name="bottom" type="int">
+</parameter>
+<parameter name="top" type="int">
+</parameter>
+<parameter name="zNear" type="int">
+</parameter>
+<parameter name="zFar" type="int">
+</parameter>
+</method>
+<method name="glPixelStorei"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="pname" type="int">
+</parameter>
+<parameter name="param" type="int">
+</parameter>
+</method>
+<method name="glPointSize"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="size" type="float">
+</parameter>
+</method>
+<method name="glPointSizex"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="size" type="int">
+</parameter>
+</method>
+<method name="glPolygonOffset"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="factor" type="float">
+</parameter>
+<parameter name="units" type="float">
+</parameter>
+</method>
+<method name="glPolygonOffsetx"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="factor" type="int">
+</parameter>
+<parameter name="units" type="int">
+</parameter>
+</method>
+<method name="glPopMatrix"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="glPushMatrix"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="glReadPixels"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="x" type="int">
+</parameter>
+<parameter name="y" type="int">
+</parameter>
+<parameter name="width" type="int">
+</parameter>
+<parameter name="height" type="int">
+</parameter>
+<parameter name="format" type="int">
+</parameter>
+<parameter name="type" type="int">
+</parameter>
+<parameter name="pixels" type="java.nio.Buffer">
+</parameter>
+</method>
+<method name="glRotatef"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="angle" type="float">
+</parameter>
+<parameter name="x" type="float">
+</parameter>
+<parameter name="y" type="float">
+</parameter>
+<parameter name="z" type="float">
+</parameter>
+</method>
+<method name="glRotatex"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="angle" type="int">
+</parameter>
+<parameter name="x" type="int">
+</parameter>
+<parameter name="y" type="int">
+</parameter>
+<parameter name="z" type="int">
+</parameter>
+</method>
+<method name="glSampleCoverage"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="value" type="float">
+</parameter>
+<parameter name="invert" type="boolean">
+</parameter>
+</method>
+<method name="glSampleCoveragex"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="value" type="int">
+</parameter>
+<parameter name="invert" type="boolean">
+</parameter>
+</method>
+<method name="glScalef"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="x" type="float">
+</parameter>
+<parameter name="y" type="float">
+</parameter>
+<parameter name="z" type="float">
+</parameter>
+</method>
+<method name="glScalex"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="x" type="int">
+</parameter>
+<parameter name="y" type="int">
+</parameter>
+<parameter name="z" type="int">
+</parameter>
+</method>
+<method name="glScissor"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="x" type="int">
+</parameter>
+<parameter name="y" type="int">
+</parameter>
+<parameter name="width" type="int">
+</parameter>
+<parameter name="height" type="int">
+</parameter>
+</method>
+<method name="glShadeModel"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="mode" type="int">
+</parameter>
+</method>
+<method name="glStencilFunc"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="func" type="int">
+</parameter>
+<parameter name="ref" type="int">
+</parameter>
+<parameter name="mask" type="int">
+</parameter>
+</method>
+<method name="glStencilMask"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="mask" type="int">
+</parameter>
+</method>
+<method name="glStencilOp"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="fail" type="int">
+</parameter>
+<parameter name="zfail" type="int">
+</parameter>
+<parameter name="zpass" type="int">
+</parameter>
+</method>
+<method name="glTexCoordPointer"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="size" type="int">
+</parameter>
+<parameter name="type" type="int">
+</parameter>
+<parameter name="stride" type="int">
+</parameter>
+<parameter name="pointer" type="java.nio.Buffer">
+</parameter>
+</method>
+<method name="glTexEnvf"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="target" type="int">
+</parameter>
+<parameter name="pname" type="int">
+</parameter>
+<parameter name="param" type="float">
+</parameter>
+</method>
+<method name="glTexEnvfv"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="target" type="int">
+</parameter>
+<parameter name="pname" type="int">
+</parameter>
+<parameter name="params" type="float[]">
+</parameter>
+<parameter name="offset" type="int">
+</parameter>
+</method>
+<method name="glTexEnvfv"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="target" type="int">
+</parameter>
+<parameter name="pname" type="int">
+</parameter>
+<parameter name="params" type="java.nio.FloatBuffer">
+</parameter>
+</method>
+<method name="glTexEnvx"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="target" type="int">
+</parameter>
+<parameter name="pname" type="int">
+</parameter>
+<parameter name="param" type="int">
+</parameter>
+</method>
+<method name="glTexEnvxv"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="target" type="int">
+</parameter>
+<parameter name="pname" type="int">
+</parameter>
+<parameter name="params" type="int[]">
+</parameter>
+<parameter name="offset" type="int">
+</parameter>
+</method>
+<method name="glTexEnvxv"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="target" type="int">
+</parameter>
+<parameter name="pname" type="int">
+</parameter>
+<parameter name="params" type="java.nio.IntBuffer">
+</parameter>
+</method>
+<method name="glTexImage2D"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="target" type="int">
+</parameter>
+<parameter name="level" type="int">
+</parameter>
+<parameter name="internalformat" type="int">
+</parameter>
+<parameter name="width" type="int">
+</parameter>
+<parameter name="height" type="int">
+</parameter>
+<parameter name="border" type="int">
+</parameter>
+<parameter name="format" type="int">
+</parameter>
+<parameter name="type" type="int">
+</parameter>
+<parameter name="pixels" type="java.nio.Buffer">
+</parameter>
+</method>
+<method name="glTexParameterf"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="target" type="int">
+</parameter>
+<parameter name="pname" type="int">
+</parameter>
+<parameter name="param" type="float">
+</parameter>
+</method>
+<method name="glTexParameterx"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="target" type="int">
+</parameter>
+<parameter name="pname" type="int">
+</parameter>
+<parameter name="param" type="int">
+</parameter>
+</method>
+<method name="glTexSubImage2D"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="target" type="int">
+</parameter>
+<parameter name="level" type="int">
+</parameter>
+<parameter name="xoffset" type="int">
+</parameter>
+<parameter name="yoffset" type="int">
+</parameter>
+<parameter name="width" type="int">
+</parameter>
+<parameter name="height" type="int">
+</parameter>
+<parameter name="format" type="int">
+</parameter>
+<parameter name="type" type="int">
+</parameter>
+<parameter name="pixels" type="java.nio.Buffer">
+</parameter>
+</method>
+<method name="glTranslatef"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="x" type="float">
+</parameter>
+<parameter name="y" type="float">
+</parameter>
+<parameter name="z" type="float">
+</parameter>
+</method>
+<method name="glTranslatex"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="x" type="int">
+</parameter>
+<parameter name="y" type="int">
+</parameter>
+<parameter name="z" type="int">
+</parameter>
+</method>
+<method name="glVertexPointer"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="size" type="int">
+</parameter>
+<parameter name="type" type="int">
+</parameter>
+<parameter name="stride" type="int">
+</parameter>
+<parameter name="pointer" type="java.nio.Buffer">
+</parameter>
+</method>
+<method name="glViewport"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="x" type="int">
+</parameter>
+<parameter name="y" type="int">
+</parameter>
+<parameter name="width" type="int">
+</parameter>
+<parameter name="height" type="int">
+</parameter>
+</method>
+<field name="GL_ADD"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="260"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_ALIASED_LINE_WIDTH_RANGE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="33902"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_ALIASED_POINT_SIZE_RANGE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="33901"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_ALPHA"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="6406"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_ALPHA_BITS"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="3413"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_ALPHA_TEST"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="3008"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_ALWAYS"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="519"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_AMBIENT"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="4608"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_AMBIENT_AND_DIFFUSE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="5634"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_AND"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="5377"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_AND_INVERTED"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="5380"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_AND_REVERSE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="5378"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_BACK"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1029"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_BLEND"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="3042"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_BLUE_BITS"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="3412"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_BYTE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="5120"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_CCW"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2305"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_CLAMP_TO_EDGE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="33071"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_CLEAR"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="5376"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_COLOR_ARRAY"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="32886"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_COLOR_BUFFER_BIT"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16384"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_COLOR_LOGIC_OP"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="3058"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_COLOR_MATERIAL"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2903"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_COMPRESSED_TEXTURE_FORMATS"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="34467"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_CONSTANT_ATTENUATION"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="4615"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_COPY"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="5379"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_COPY_INVERTED"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="5388"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_CULL_FACE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2884"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_CW"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2304"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_DECAL"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="8449"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_DECR"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="7683"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_DEPTH_BITS"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="3414"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_DEPTH_BUFFER_BIT"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="256"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_DEPTH_TEST"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2929"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_DIFFUSE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="4609"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_DITHER"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="3024"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_DONT_CARE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="4352"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_DST_ALPHA"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="772"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_DST_COLOR"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="774"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_EMISSION"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="5632"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_EQUAL"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="514"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_EQUIV"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="5385"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_EXP"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2048"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_EXP2"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2049"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_EXTENSIONS"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="7939"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_FALSE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="0"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_FASTEST"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="4353"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_FIXED"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="5132"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_FLAT"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="7424"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_FLOAT"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="5126"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_FOG"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2912"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_FOG_COLOR"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2918"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_FOG_DENSITY"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2914"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_FOG_END"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2916"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_FOG_HINT"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="3156"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_FOG_MODE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2917"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_FOG_START"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2915"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_FRONT"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1028"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_FRONT_AND_BACK"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1032"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_GEQUAL"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="518"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_GREATER"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="516"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_GREEN_BITS"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="3411"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_IMPLEMENTATION_COLOR_READ_FORMAT_OES"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="35739"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_IMPLEMENTATION_COLOR_READ_TYPE_OES"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="35738"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_INCR"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="7682"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_INVALID_ENUM"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1280"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_INVALID_OPERATION"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1282"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_INVALID_VALUE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1281"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_INVERT"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="5386"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_KEEP"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="7680"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_LEQUAL"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="515"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_LESS"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="513"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_LIGHT0"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16384"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_LIGHT1"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16385"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_LIGHT2"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16386"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_LIGHT3"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16387"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_LIGHT4"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16388"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_LIGHT5"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16389"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_LIGHT6"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16390"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_LIGHT7"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16391"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_LIGHTING"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2896"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_LIGHT_MODEL_AMBIENT"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2899"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_LIGHT_MODEL_TWO_SIDE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2898"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_LINEAR"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="9729"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_LINEAR_ATTENUATION"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="4616"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_LINEAR_MIPMAP_LINEAR"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="9987"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_LINEAR_MIPMAP_NEAREST"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="9985"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_LINES"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_LINE_LOOP"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_LINE_SMOOTH"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2848"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_LINE_SMOOTH_HINT"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="3154"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_LINE_STRIP"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="3"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_LUMINANCE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="6409"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_LUMINANCE_ALPHA"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="6410"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_MAX_ELEMENTS_INDICES"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="33001"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_MAX_ELEMENTS_VERTICES"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="33000"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_MAX_LIGHTS"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="3377"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_MAX_MODELVIEW_STACK_DEPTH"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="3382"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_MAX_PROJECTION_STACK_DEPTH"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="3384"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_MAX_TEXTURE_SIZE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="3379"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_MAX_TEXTURE_STACK_DEPTH"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="3385"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_MAX_TEXTURE_UNITS"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="34018"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_MAX_VIEWPORT_DIMS"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="3386"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_MODELVIEW"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="5888"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_MODULATE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="8448"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_MULTISAMPLE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="32925"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_NAND"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="5390"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_NEAREST"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="9728"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_NEAREST_MIPMAP_LINEAR"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="9986"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_NEAREST_MIPMAP_NEAREST"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="9984"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_NEVER"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="512"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_NICEST"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="4354"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_NOOP"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="5381"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_NOR"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="5384"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_NORMALIZE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2977"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_NORMAL_ARRAY"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="32885"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_NOTEQUAL"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="517"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_NO_ERROR"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="0"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_NUM_COMPRESSED_TEXTURE_FORMATS"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="34466"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_ONE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_ONE_MINUS_DST_ALPHA"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="773"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_ONE_MINUS_DST_COLOR"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="775"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_ONE_MINUS_SRC_ALPHA"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="771"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_ONE_MINUS_SRC_COLOR"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="769"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_OR"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="5383"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_OR_INVERTED"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="5389"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_OR_REVERSE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="5387"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_OUT_OF_MEMORY"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1285"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_PACK_ALIGNMENT"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="3333"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_PALETTE4_R5_G6_B5_OES"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="35730"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_PALETTE4_RGB5_A1_OES"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="35732"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_PALETTE4_RGB8_OES"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="35728"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_PALETTE4_RGBA4_OES"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="35731"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_PALETTE4_RGBA8_OES"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="35729"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_PALETTE8_R5_G6_B5_OES"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="35735"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_PALETTE8_RGB5_A1_OES"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="35737"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_PALETTE8_RGB8_OES"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="35733"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_PALETTE8_RGBA4_OES"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="35736"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_PALETTE8_RGBA8_OES"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="35734"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_PERSPECTIVE_CORRECTION_HINT"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="3152"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_POINTS"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="0"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_POINT_FADE_THRESHOLD_SIZE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="33064"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_POINT_SIZE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2833"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_POINT_SMOOTH"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2832"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_POINT_SMOOTH_HINT"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="3153"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_POLYGON_OFFSET_FILL"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="32823"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_POLYGON_SMOOTH_HINT"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="3155"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_POSITION"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="4611"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_PROJECTION"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="5889"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_QUADRATIC_ATTENUATION"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="4617"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_RED_BITS"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="3410"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_RENDERER"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="7937"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_REPEAT"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="10497"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_REPLACE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="7681"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_RESCALE_NORMAL"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="32826"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_RGB"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="6407"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_RGBA"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="6408"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_SAMPLE_ALPHA_TO_COVERAGE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="32926"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_SAMPLE_ALPHA_TO_ONE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="32927"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_SAMPLE_COVERAGE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="32928"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_SCISSOR_TEST"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="3089"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_SET"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="5391"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_SHININESS"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="5633"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_SHORT"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="5122"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_SMOOTH"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="7425"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_SMOOTH_LINE_WIDTH_RANGE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2850"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_SMOOTH_POINT_SIZE_RANGE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2834"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_SPECULAR"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="4610"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_SPOT_CUTOFF"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="4614"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_SPOT_DIRECTION"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="4612"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_SPOT_EXPONENT"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="4613"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_SRC_ALPHA"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="770"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_SRC_ALPHA_SATURATE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="776"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_SRC_COLOR"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="768"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_STACK_OVERFLOW"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1283"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_STACK_UNDERFLOW"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1284"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_STENCIL_BITS"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="3415"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_STENCIL_BUFFER_BIT"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1024"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_STENCIL_TEST"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2960"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_SUBPIXEL_BITS"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="3408"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_TEXTURE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="5890"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_TEXTURE0"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="33984"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_TEXTURE1"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="33985"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_TEXTURE10"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="33994"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_TEXTURE11"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="33995"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_TEXTURE12"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="33996"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_TEXTURE13"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="33997"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_TEXTURE14"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="33998"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_TEXTURE15"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="33999"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_TEXTURE16"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="34000"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_TEXTURE17"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="34001"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_TEXTURE18"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="34002"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_TEXTURE19"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="34003"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_TEXTURE2"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="33986"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_TEXTURE20"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="34004"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_TEXTURE21"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="34005"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_TEXTURE22"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="34006"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_TEXTURE23"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="34007"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_TEXTURE24"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="34008"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_TEXTURE25"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="34009"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_TEXTURE26"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="34010"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_TEXTURE27"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="34011"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_TEXTURE28"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="34012"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_TEXTURE29"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="34013"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_TEXTURE3"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="33987"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_TEXTURE30"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="34014"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_TEXTURE31"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="34015"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_TEXTURE4"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="33988"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_TEXTURE5"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="33989"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_TEXTURE6"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="33990"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_TEXTURE7"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="33991"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_TEXTURE8"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="33992"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_TEXTURE9"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="33993"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_TEXTURE_2D"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="3553"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_TEXTURE_COORD_ARRAY"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="32888"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_TEXTURE_ENV"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="8960"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_TEXTURE_ENV_COLOR"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="8705"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_TEXTURE_ENV_MODE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="8704"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_TEXTURE_MAG_FILTER"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="10240"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_TEXTURE_MIN_FILTER"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="10241"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_TEXTURE_WRAP_S"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="10242"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_TEXTURE_WRAP_T"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="10243"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_TRIANGLES"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="4"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_TRIANGLE_FAN"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="6"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_TRIANGLE_STRIP"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="5"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_TRUE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_UNPACK_ALIGNMENT"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="3317"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_UNSIGNED_BYTE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="5121"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_UNSIGNED_SHORT"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="5123"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_UNSIGNED_SHORT_4_4_4_4"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="32819"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_UNSIGNED_SHORT_5_5_5_1"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="32820"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_UNSIGNED_SHORT_5_6_5"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="33635"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_VENDOR"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="7936"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_VERSION"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="7938"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_VERTEX_ARRAY"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="32884"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_XOR"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="5382"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_ZERO"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="0"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<class name="GLES10Ext"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="GLES10Ext"
+ type="android.opengl.GLES10Ext"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<method name="glQueryMatrixxOES"
+ return="int"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="mantissa" type="int[]">
+</parameter>
+<parameter name="mantissaOffset" type="int">
+</parameter>
+<parameter name="exponent" type="int[]">
+</parameter>
+<parameter name="exponentOffset" type="int">
+</parameter>
+</method>
+<method name="glQueryMatrixxOES"
+ return="int"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="mantissa" type="java.nio.IntBuffer">
+</parameter>
+<parameter name="exponent" type="java.nio.IntBuffer">
+</parameter>
+</method>
+</class>
+<class name="GLES11"
+ extends="android.opengl.GLES10"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="GLES11"
+ type="android.opengl.GLES11"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<method name="glBindBuffer"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="target" type="int">
+</parameter>
+<parameter name="buffer" type="int">
+</parameter>
+</method>
+<method name="glBufferData"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="target" type="int">
+</parameter>
+<parameter name="size" type="int">
+</parameter>
+<parameter name="data" type="java.nio.Buffer">
+</parameter>
+<parameter name="usage" type="int">
+</parameter>
+</method>
+<method name="glBufferSubData"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="target" type="int">
+</parameter>
+<parameter name="offset" type="int">
+</parameter>
+<parameter name="size" type="int">
+</parameter>
+<parameter name="data" type="java.nio.Buffer">
+</parameter>
+</method>
+<method name="glClipPlanef"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="plane" type="int">
+</parameter>
+<parameter name="equation" type="float[]">
+</parameter>
+<parameter name="offset" type="int">
+</parameter>
+</method>
+<method name="glClipPlanef"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="plane" type="int">
+</parameter>
+<parameter name="equation" type="java.nio.FloatBuffer">
+</parameter>
+</method>
+<method name="glClipPlanex"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="plane" type="int">
+</parameter>
+<parameter name="equation" type="int[]">
+</parameter>
+<parameter name="offset" type="int">
+</parameter>
+</method>
+<method name="glClipPlanex"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="plane" type="int">
+</parameter>
+<parameter name="equation" type="java.nio.IntBuffer">
+</parameter>
+</method>
+<method name="glColor4ub"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="red" type="byte">
+</parameter>
+<parameter name="green" type="byte">
+</parameter>
+<parameter name="blue" type="byte">
+</parameter>
+<parameter name="alpha" type="byte">
+</parameter>
+</method>
+<method name="glColorPointer"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="size" type="int">
+</parameter>
+<parameter name="type" type="int">
+</parameter>
+<parameter name="stride" type="int">
+</parameter>
+<parameter name="offset" type="int">
+</parameter>
+</method>
+<method name="glDeleteBuffers"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="n" type="int">
+</parameter>
+<parameter name="buffers" type="int[]">
+</parameter>
+<parameter name="offset" type="int">
+</parameter>
+</method>
+<method name="glDeleteBuffers"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="n" type="int">
+</parameter>
+<parameter name="buffers" type="java.nio.IntBuffer">
+</parameter>
+</method>
+<method name="glDrawElements"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="mode" type="int">
+</parameter>
+<parameter name="count" type="int">
+</parameter>
+<parameter name="type" type="int">
+</parameter>
+<parameter name="offset" type="int">
+</parameter>
+</method>
+<method name="glGenBuffers"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="n" type="int">
+</parameter>
+<parameter name="buffers" type="int[]">
+</parameter>
+<parameter name="offset" type="int">
+</parameter>
+</method>
+<method name="glGenBuffers"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="n" type="int">
+</parameter>
+<parameter name="buffers" type="java.nio.IntBuffer">
+</parameter>
+</method>
+<method name="glGetBooleanv"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="pname" type="int">
+</parameter>
+<parameter name="params" type="boolean[]">
+</parameter>
+<parameter name="offset" type="int">
+</parameter>
+</method>
+<method name="glGetBooleanv"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="pname" type="int">
+</parameter>
+<parameter name="params" type="java.nio.IntBuffer">
+</parameter>
+</method>
+<method name="glGetBufferParameteriv"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="target" type="int">
+</parameter>
+<parameter name="pname" type="int">
+</parameter>
+<parameter name="params" type="int[]">
+</parameter>
+<parameter name="offset" type="int">
+</parameter>
+</method>
+<method name="glGetBufferParameteriv"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="target" type="int">
+</parameter>
+<parameter name="pname" type="int">
+</parameter>
+<parameter name="params" type="java.nio.IntBuffer">
+</parameter>
+</method>
+<method name="glGetClipPlanef"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="pname" type="int">
+</parameter>
+<parameter name="eqn" type="float[]">
+</parameter>
+<parameter name="offset" type="int">
+</parameter>
+</method>
+<method name="glGetClipPlanef"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="pname" type="int">
+</parameter>
+<parameter name="eqn" type="java.nio.FloatBuffer">
+</parameter>
+</method>
+<method name="glGetClipPlanex"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="pname" type="int">
+</parameter>
+<parameter name="eqn" type="int[]">
+</parameter>
+<parameter name="offset" type="int">
+</parameter>
+</method>
+<method name="glGetClipPlanex"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="pname" type="int">
+</parameter>
+<parameter name="eqn" type="java.nio.IntBuffer">
+</parameter>
+</method>
+<method name="glGetFixedv"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="pname" type="int">
+</parameter>
+<parameter name="params" type="int[]">
+</parameter>
+<parameter name="offset" type="int">
+</parameter>
+</method>
+<method name="glGetFixedv"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="pname" type="int">
+</parameter>
+<parameter name="params" type="java.nio.IntBuffer">
+</parameter>
+</method>
+<method name="glGetFloatv"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="pname" type="int">
+</parameter>
+<parameter name="params" type="float[]">
+</parameter>
+<parameter name="offset" type="int">
+</parameter>
+</method>
+<method name="glGetFloatv"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="pname" type="int">
+</parameter>
+<parameter name="params" type="java.nio.FloatBuffer">
+</parameter>
+</method>
+<method name="glGetLightfv"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="light" type="int">
+</parameter>
+<parameter name="pname" type="int">
+</parameter>
+<parameter name="params" type="float[]">
+</parameter>
+<parameter name="offset" type="int">
+</parameter>
+</method>
+<method name="glGetLightfv"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="light" type="int">
+</parameter>
+<parameter name="pname" type="int">
+</parameter>
+<parameter name="params" type="java.nio.FloatBuffer">
+</parameter>
+</method>
+<method name="glGetLightxv"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="light" type="int">
+</parameter>
+<parameter name="pname" type="int">
+</parameter>
+<parameter name="params" type="int[]">
+</parameter>
+<parameter name="offset" type="int">
+</parameter>
+</method>
+<method name="glGetLightxv"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="light" type="int">
+</parameter>
+<parameter name="pname" type="int">
+</parameter>
+<parameter name="params" type="java.nio.IntBuffer">
+</parameter>
+</method>
+<method name="glGetMaterialfv"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="face" type="int">
+</parameter>
+<parameter name="pname" type="int">
+</parameter>
+<parameter name="params" type="float[]">
+</parameter>
+<parameter name="offset" type="int">
+</parameter>
+</method>
+<method name="glGetMaterialfv"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="face" type="int">
+</parameter>
+<parameter name="pname" type="int">
+</parameter>
+<parameter name="params" type="java.nio.FloatBuffer">
+</parameter>
+</method>
+<method name="glGetMaterialxv"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="face" type="int">
+</parameter>
+<parameter name="pname" type="int">
+</parameter>
+<parameter name="params" type="int[]">
+</parameter>
+<parameter name="offset" type="int">
+</parameter>
+</method>
+<method name="glGetMaterialxv"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="face" type="int">
+</parameter>
+<parameter name="pname" type="int">
+</parameter>
+<parameter name="params" type="java.nio.IntBuffer">
+</parameter>
+</method>
+<method name="glGetTexEnvfv"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="env" type="int">
+</parameter>
+<parameter name="pname" type="int">
+</parameter>
+<parameter name="params" type="float[]">
+</parameter>
+<parameter name="offset" type="int">
+</parameter>
+</method>
+<method name="glGetTexEnvfv"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="env" type="int">
+</parameter>
+<parameter name="pname" type="int">
+</parameter>
+<parameter name="params" type="java.nio.FloatBuffer">
+</parameter>
+</method>
+<method name="glGetTexEnviv"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="env" type="int">
+</parameter>
+<parameter name="pname" type="int">
+</parameter>
+<parameter name="params" type="int[]">
+</parameter>
+<parameter name="offset" type="int">
+</parameter>
+</method>
+<method name="glGetTexEnviv"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="env" type="int">
+</parameter>
+<parameter name="pname" type="int">
+</parameter>
+<parameter name="params" type="java.nio.IntBuffer">
+</parameter>
+</method>
+<method name="glGetTexEnvxv"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="env" type="int">
+</parameter>
+<parameter name="pname" type="int">
+</parameter>
+<parameter name="params" type="int[]">
+</parameter>
+<parameter name="offset" type="int">
+</parameter>
+</method>
+<method name="glGetTexEnvxv"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="env" type="int">
+</parameter>
+<parameter name="pname" type="int">
+</parameter>
+<parameter name="params" type="java.nio.IntBuffer">
+</parameter>
+</method>
+<method name="glGetTexParameterfv"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="target" type="int">
+</parameter>
+<parameter name="pname" type="int">
+</parameter>
+<parameter name="params" type="float[]">
+</parameter>
+<parameter name="offset" type="int">
+</parameter>
+</method>
+<method name="glGetTexParameterfv"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="target" type="int">
+</parameter>
+<parameter name="pname" type="int">
+</parameter>
+<parameter name="params" type="java.nio.FloatBuffer">
+</parameter>
+</method>
+<method name="glGetTexParameteriv"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="target" type="int">
+</parameter>
+<parameter name="pname" type="int">
+</parameter>
+<parameter name="params" type="int[]">
+</parameter>
+<parameter name="offset" type="int">
+</parameter>
+</method>
+<method name="glGetTexParameteriv"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="target" type="int">
+</parameter>
+<parameter name="pname" type="int">
+</parameter>
+<parameter name="params" type="java.nio.IntBuffer">
+</parameter>
+</method>
+<method name="glGetTexParameterxv"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="target" type="int">
+</parameter>
+<parameter name="pname" type="int">
+</parameter>
+<parameter name="params" type="int[]">
+</parameter>
+<parameter name="offset" type="int">
+</parameter>
+</method>
+<method name="glGetTexParameterxv"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="target" type="int">
+</parameter>
+<parameter name="pname" type="int">
+</parameter>
+<parameter name="params" type="java.nio.IntBuffer">
+</parameter>
+</method>
+<method name="glIsBuffer"
+ return="boolean"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="buffer" type="int">
+</parameter>
+</method>
+<method name="glIsEnabled"
+ return="boolean"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="cap" type="int">
+</parameter>
+</method>
+<method name="glIsTexture"
+ return="boolean"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="texture" type="int">
+</parameter>
+</method>
+<method name="glNormalPointer"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="type" type="int">
+</parameter>
+<parameter name="stride" type="int">
+</parameter>
+<parameter name="offset" type="int">
+</parameter>
+</method>
+<method name="glPointParameterf"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="pname" type="int">
+</parameter>
+<parameter name="param" type="float">
+</parameter>
+</method>
+<method name="glPointParameterfv"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="pname" type="int">
+</parameter>
+<parameter name="params" type="float[]">
+</parameter>
+<parameter name="offset" type="int">
+</parameter>
+</method>
+<method name="glPointParameterfv"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="pname" type="int">
+</parameter>
+<parameter name="params" type="java.nio.FloatBuffer">
+</parameter>
+</method>
+<method name="glPointParameterx"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="pname" type="int">
+</parameter>
+<parameter name="param" type="int">
+</parameter>
+</method>
+<method name="glPointParameterxv"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="pname" type="int">
+</parameter>
+<parameter name="params" type="int[]">
+</parameter>
+<parameter name="offset" type="int">
+</parameter>
+</method>
+<method name="glPointParameterxv"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="pname" type="int">
+</parameter>
+<parameter name="params" type="java.nio.IntBuffer">
+</parameter>
+</method>
+<method name="glPointSizePointerOES"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="type" type="int">
+</parameter>
+<parameter name="stride" type="int">
+</parameter>
+<parameter name="pointer" type="java.nio.Buffer">
+</parameter>
+</method>
+<method name="glTexCoordPointer"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="size" type="int">
+</parameter>
+<parameter name="type" type="int">
+</parameter>
+<parameter name="stride" type="int">
+</parameter>
+<parameter name="offset" type="int">
+</parameter>
+</method>
+<method name="glTexEnvi"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="target" type="int">
+</parameter>
+<parameter name="pname" type="int">
+</parameter>
+<parameter name="param" type="int">
+</parameter>
+</method>
+<method name="glTexEnviv"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="target" type="int">
+</parameter>
+<parameter name="pname" type="int">
+</parameter>
+<parameter name="params" type="int[]">
+</parameter>
+<parameter name="offset" type="int">
+</parameter>
+</method>
+<method name="glTexEnviv"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="target" type="int">
+</parameter>
+<parameter name="pname" type="int">
+</parameter>
+<parameter name="params" type="java.nio.IntBuffer">
+</parameter>
+</method>
+<method name="glTexParameterfv"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="target" type="int">
+</parameter>
+<parameter name="pname" type="int">
+</parameter>
+<parameter name="params" type="float[]">
+</parameter>
+<parameter name="offset" type="int">
+</parameter>
+</method>
+<method name="glTexParameterfv"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="target" type="int">
+</parameter>
+<parameter name="pname" type="int">
+</parameter>
+<parameter name="params" type="java.nio.FloatBuffer">
+</parameter>
+</method>
+<method name="glTexParameteri"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="target" type="int">
+</parameter>
+<parameter name="pname" type="int">
+</parameter>
+<parameter name="param" type="int">
+</parameter>
+</method>
+<method name="glTexParameteriv"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="target" type="int">
+</parameter>
+<parameter name="pname" type="int">
+</parameter>
+<parameter name="params" type="int[]">
+</parameter>
+<parameter name="offset" type="int">
+</parameter>
+</method>
+<method name="glTexParameteriv"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="target" type="int">
+</parameter>
+<parameter name="pname" type="int">
+</parameter>
+<parameter name="params" type="java.nio.IntBuffer">
+</parameter>
+</method>
+<method name="glTexParameterxv"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="target" type="int">
+</parameter>
+<parameter name="pname" type="int">
+</parameter>
+<parameter name="params" type="int[]">
+</parameter>
+<parameter name="offset" type="int">
+</parameter>
+</method>
+<method name="glTexParameterxv"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="target" type="int">
+</parameter>
+<parameter name="pname" type="int">
+</parameter>
+<parameter name="params" type="java.nio.IntBuffer">
+</parameter>
+</method>
+<method name="glVertexPointer"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="size" type="int">
+</parameter>
+<parameter name="type" type="int">
+</parameter>
+<parameter name="stride" type="int">
+</parameter>
+<parameter name="offset" type="int">
+</parameter>
+</method>
+<field name="GL_ACTIVE_TEXTURE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="34016"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_ADD_SIGNED"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="34164"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_ALPHA_SCALE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="3356"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_ALPHA_TEST_FUNC"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="3009"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_ALPHA_TEST_REF"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="3010"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_ARRAY_BUFFER"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="34962"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_ARRAY_BUFFER_BINDING"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="34964"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_BLEND_DST"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="3040"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_BLEND_SRC"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="3041"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_BUFFER_ACCESS"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="35003"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_BUFFER_SIZE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="34660"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_BUFFER_USAGE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="34661"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_CLIENT_ACTIVE_TEXTURE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="34017"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_CLIP_PLANE0"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="12288"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_CLIP_PLANE1"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="12289"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_CLIP_PLANE2"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="12290"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_CLIP_PLANE3"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="12291"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_CLIP_PLANE4"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="12292"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_CLIP_PLANE5"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="12293"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_COLOR_ARRAY_BUFFER_BINDING"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="34968"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_COLOR_ARRAY_POINTER"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="32912"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_COLOR_ARRAY_SIZE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="32897"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_COLOR_ARRAY_STRIDE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="32899"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_COLOR_ARRAY_TYPE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="32898"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_COLOR_CLEAR_VALUE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="3106"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_COLOR_WRITEMASK"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="3107"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_COMBINE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="34160"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_COMBINE_ALPHA"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="34162"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_COMBINE_RGB"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="34161"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_CONSTANT"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="34166"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_COORD_REPLACE_OES"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="34914"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_CULL_FACE_MODE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2885"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_CURRENT_COLOR"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2816"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_CURRENT_NORMAL"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2818"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_CURRENT_TEXTURE_COORDS"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2819"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_DEPTH_CLEAR_VALUE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2931"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_DEPTH_FUNC"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2932"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_DEPTH_RANGE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2928"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_DEPTH_WRITEMASK"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2930"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_DOT3_RGB"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="34478"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_DOT3_RGBA"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="34479"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_DYNAMIC_DRAW"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="35048"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_ELEMENT_ARRAY_BUFFER"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="34963"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_ELEMENT_ARRAY_BUFFER_BINDING"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="34965"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_FRONT_FACE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2886"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_GENERATE_MIPMAP"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="33169"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_GENERATE_MIPMAP_HINT"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="33170"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_INTERPOLATE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="34165"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_LINE_WIDTH"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2849"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_LOGIC_OP_MODE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="3056"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_MATRIX_MODE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2976"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_MAX_CLIP_PLANES"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="3378"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_MODELVIEW_MATRIX"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2982"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_MODELVIEW_MATRIX_FLOAT_AS_INT_BITS_OES"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="35213"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_MODELVIEW_STACK_DEPTH"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2979"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_NORMAL_ARRAY_BUFFER_BINDING"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="34967"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_NORMAL_ARRAY_POINTER"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="32911"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_NORMAL_ARRAY_STRIDE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="32895"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_NORMAL_ARRAY_TYPE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="32894"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_OPERAND0_ALPHA"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="34200"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_OPERAND0_RGB"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="34192"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_OPERAND1_ALPHA"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="34201"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_OPERAND1_RGB"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="34193"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_OPERAND2_ALPHA"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="34202"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_OPERAND2_RGB"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="34194"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_POINT_DISTANCE_ATTENUATION"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="33065"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_POINT_FADE_THRESHOLD_SIZE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="33064"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_POINT_SIZE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2833"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_POINT_SIZE_ARRAY_BUFFER_BINDING_OES"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="35743"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_POINT_SIZE_ARRAY_OES"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="35740"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_POINT_SIZE_ARRAY_POINTER_OES"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="35212"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_POINT_SIZE_ARRAY_STRIDE_OES"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="35211"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_POINT_SIZE_ARRAY_TYPE_OES"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="35210"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_POINT_SIZE_MAX"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="33063"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_POINT_SIZE_MIN"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="33062"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_POINT_SPRITE_OES"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="34913"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_POLYGON_OFFSET_FACTOR"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="32824"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_POLYGON_OFFSET_UNITS"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="10752"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_PREVIOUS"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="34168"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_PRIMARY_COLOR"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="34167"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_PROJECTION_MATRIX"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2983"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_PROJECTION_MATRIX_FLOAT_AS_INT_BITS_OES"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="35214"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_PROJECTION_STACK_DEPTH"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2980"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_RGB_SCALE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="34163"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_SAMPLES"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="32937"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_SAMPLE_BUFFERS"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="32936"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_SAMPLE_COVERAGE_INVERT"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="32939"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_SAMPLE_COVERAGE_VALUE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="32938"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_SCISSOR_BOX"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="3088"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_SHADE_MODEL"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2900"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_SRC0_ALPHA"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="34184"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_SRC0_RGB"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="34176"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_SRC1_ALPHA"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="34185"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_SRC1_RGB"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="34177"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_SRC2_ALPHA"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="34186"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_SRC2_RGB"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="34178"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_STATIC_DRAW"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="35044"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_STENCIL_CLEAR_VALUE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2961"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_STENCIL_FAIL"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2964"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_STENCIL_FUNC"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2962"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_STENCIL_PASS_DEPTH_FAIL"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2965"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_STENCIL_PASS_DEPTH_PASS"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2966"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_STENCIL_REF"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2967"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_STENCIL_VALUE_MASK"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2963"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_STENCIL_WRITEMASK"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2968"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_SUBTRACT"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="34023"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_TEXTURE_BINDING_2D"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="32873"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_TEXTURE_COORD_ARRAY_BUFFER_BINDING"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="34970"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_TEXTURE_COORD_ARRAY_POINTER"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="32914"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_TEXTURE_COORD_ARRAY_SIZE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="32904"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_TEXTURE_COORD_ARRAY_STRIDE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="32906"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_TEXTURE_COORD_ARRAY_TYPE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="32905"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_TEXTURE_MATRIX"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2984"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_TEXTURE_MATRIX_FLOAT_AS_INT_BITS_OES"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="35215"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_TEXTURE_STACK_DEPTH"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2981"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_VERTEX_ARRAY_BUFFER_BINDING"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="34966"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_VERTEX_ARRAY_POINTER"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="32910"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_VERTEX_ARRAY_SIZE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="32890"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_VERTEX_ARRAY_STRIDE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="32892"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_VERTEX_ARRAY_TYPE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="32891"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_VIEWPORT"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2978"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_WRITE_ONLY"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="35001"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<class name="GLES11Ext"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="GLES11Ext"
+ type="android.opengl.GLES11Ext"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<method name="glAlphaFuncxOES"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="func" type="int">
+</parameter>
+<parameter name="ref" type="int">
+</parameter>
+</method>
+<method name="glBindFramebufferOES"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="target" type="int">
+</parameter>
+<parameter name="framebuffer" type="int">
+</parameter>
+</method>
+<method name="glBindRenderbufferOES"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="target" type="int">
+</parameter>
+<parameter name="renderbuffer" type="int">
+</parameter>
+</method>
+<method name="glBlendEquationOES"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="mode" type="int">
+</parameter>
+</method>
+<method name="glBlendEquationSeparateOES"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="modeRGB" type="int">
+</parameter>
+<parameter name="modeAlpha" type="int">
+</parameter>
+</method>
+<method name="glBlendFuncSeparateOES"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="srcRGB" type="int">
+</parameter>
+<parameter name="dstRGB" type="int">
+</parameter>
+<parameter name="srcAlpha" type="int">
+</parameter>
+<parameter name="dstAlpha" type="int">
+</parameter>
+</method>
+<method name="glCheckFramebufferStatusOES"
+ return="int"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="target" type="int">
+</parameter>
+</method>
+<method name="glClearColorxOES"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="red" type="int">
+</parameter>
+<parameter name="green" type="int">
+</parameter>
+<parameter name="blue" type="int">
+</parameter>
+<parameter name="alpha" type="int">
+</parameter>
+</method>
+<method name="glClearDepthfOES"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="depth" type="float">
+</parameter>
+</method>
+<method name="glClearDepthxOES"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="depth" type="int">
+</parameter>
+</method>
+<method name="glClipPlanefOES"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="plane" type="int">
+</parameter>
+<parameter name="equation" type="float[]">
+</parameter>
+<parameter name="offset" type="int">
+</parameter>
+</method>
+<method name="glClipPlanefOES"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="plane" type="int">
+</parameter>
+<parameter name="equation" type="java.nio.FloatBuffer">
+</parameter>
+</method>
+<method name="glClipPlanexOES"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="plane" type="int">
+</parameter>
+<parameter name="equation" type="int[]">
+</parameter>
+<parameter name="offset" type="int">
+</parameter>
+</method>
+<method name="glClipPlanexOES"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="plane" type="int">
+</parameter>
+<parameter name="equation" type="java.nio.IntBuffer">
+</parameter>
+</method>
+<method name="glColor4xOES"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="red" type="int">
+</parameter>
+<parameter name="green" type="int">
+</parameter>
+<parameter name="blue" type="int">
+</parameter>
+<parameter name="alpha" type="int">
+</parameter>
+</method>
+<method name="glCurrentPaletteMatrixOES"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="matrixpaletteindex" type="int">
+</parameter>
+</method>
+<method name="glDeleteFramebuffersOES"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="n" type="int">
+</parameter>
+<parameter name="framebuffers" type="int[]">
+</parameter>
+<parameter name="offset" type="int">
+</parameter>
+</method>
+<method name="glDeleteFramebuffersOES"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="n" type="int">
+</parameter>
+<parameter name="framebuffers" type="java.nio.IntBuffer">
+</parameter>
+</method>
+<method name="glDeleteRenderbuffersOES"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="n" type="int">
+</parameter>
+<parameter name="renderbuffers" type="int[]">
+</parameter>
+<parameter name="offset" type="int">
+</parameter>
+</method>
+<method name="glDeleteRenderbuffersOES"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="n" type="int">
+</parameter>
+<parameter name="renderbuffers" type="java.nio.IntBuffer">
+</parameter>
+</method>
+<method name="glDepthRangefOES"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="zNear" type="float">
+</parameter>
+<parameter name="zFar" type="float">
+</parameter>
+</method>
+<method name="glDepthRangexOES"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="zNear" type="int">
+</parameter>
+<parameter name="zFar" type="int">
+</parameter>
+</method>
+<method name="glDrawTexfOES"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="x" type="float">
+</parameter>
+<parameter name="y" type="float">
+</parameter>
+<parameter name="z" type="float">
+</parameter>
+<parameter name="width" type="float">
+</parameter>
+<parameter name="height" type="float">
+</parameter>
+</method>
+<method name="glDrawTexfvOES"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="coords" type="float[]">
+</parameter>
+<parameter name="offset" type="int">
+</parameter>
+</method>
+<method name="glDrawTexfvOES"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="coords" type="java.nio.FloatBuffer">
+</parameter>
+</method>
+<method name="glDrawTexiOES"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="x" type="int">
+</parameter>
+<parameter name="y" type="int">
+</parameter>
+<parameter name="z" type="int">
+</parameter>
+<parameter name="width" type="int">
+</parameter>
+<parameter name="height" type="int">
+</parameter>
+</method>
+<method name="glDrawTexivOES"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="coords" type="int[]">
+</parameter>
+<parameter name="offset" type="int">
+</parameter>
+</method>
+<method name="glDrawTexivOES"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="coords" type="java.nio.IntBuffer">
+</parameter>
+</method>
+<method name="glDrawTexsOES"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="x" type="short">
+</parameter>
+<parameter name="y" type="short">
+</parameter>
+<parameter name="z" type="short">
+</parameter>
+<parameter name="width" type="short">
+</parameter>
+<parameter name="height" type="short">
+</parameter>
+</method>
+<method name="glDrawTexsvOES"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="coords" type="short[]">
+</parameter>
+<parameter name="offset" type="int">
+</parameter>
+</method>
+<method name="glDrawTexsvOES"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="coords" type="java.nio.ShortBuffer">
+</parameter>
+</method>
+<method name="glDrawTexxOES"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="x" type="int">
+</parameter>
+<parameter name="y" type="int">
+</parameter>
+<parameter name="z" type="int">
+</parameter>
+<parameter name="width" type="int">
+</parameter>
+<parameter name="height" type="int">
+</parameter>
+</method>
+<method name="glDrawTexxvOES"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="coords" type="int[]">
+</parameter>
+<parameter name="offset" type="int">
+</parameter>
+</method>
+<method name="glDrawTexxvOES"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="coords" type="java.nio.IntBuffer">
+</parameter>
+</method>
+<method name="glEGLImageTargetRenderbufferStorageOES"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="target" type="int">
+</parameter>
+<parameter name="image" type="java.nio.Buffer">
+</parameter>
+</method>
+<method name="glEGLImageTargetTexture2DOES"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="target" type="int">
+</parameter>
+<parameter name="image" type="java.nio.Buffer">
+</parameter>
+</method>
+<method name="glFogxOES"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="pname" type="int">
+</parameter>
+<parameter name="param" type="int">
+</parameter>
+</method>
+<method name="glFogxvOES"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="pname" type="int">
+</parameter>
+<parameter name="params" type="int[]">
+</parameter>
+<parameter name="offset" type="int">
+</parameter>
+</method>
+<method name="glFogxvOES"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="pname" type="int">
+</parameter>
+<parameter name="params" type="java.nio.IntBuffer">
+</parameter>
+</method>
+<method name="glFramebufferRenderbufferOES"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="target" type="int">
+</parameter>
+<parameter name="attachment" type="int">
+</parameter>
+<parameter name="renderbuffertarget" type="int">
+</parameter>
+<parameter name="renderbuffer" type="int">
+</parameter>
+</method>
+<method name="glFramebufferTexture2DOES"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="target" type="int">
+</parameter>
+<parameter name="attachment" type="int">
+</parameter>
+<parameter name="textarget" type="int">
+</parameter>
+<parameter name="texture" type="int">
+</parameter>
+<parameter name="level" type="int">
+</parameter>
+</method>
+<method name="glFrustumfOES"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="left" type="float">
+</parameter>
+<parameter name="right" type="float">
+</parameter>
+<parameter name="bottom" type="float">
+</parameter>
+<parameter name="top" type="float">
+</parameter>
+<parameter name="zNear" type="float">
+</parameter>
+<parameter name="zFar" type="float">
+</parameter>
+</method>
+<method name="glFrustumxOES"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="left" type="int">
+</parameter>
+<parameter name="right" type="int">
+</parameter>
+<parameter name="bottom" type="int">
+</parameter>
+<parameter name="top" type="int">
+</parameter>
+<parameter name="zNear" type="int">
+</parameter>
+<parameter name="zFar" type="int">
+</parameter>
+</method>
+<method name="glGenFramebuffersOES"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="n" type="int">
+</parameter>
+<parameter name="framebuffers" type="int[]">
+</parameter>
+<parameter name="offset" type="int">
+</parameter>
+</method>
+<method name="glGenFramebuffersOES"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="n" type="int">
+</parameter>
+<parameter name="framebuffers" type="java.nio.IntBuffer">
+</parameter>
+</method>
+<method name="glGenRenderbuffersOES"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="n" type="int">
+</parameter>
+<parameter name="renderbuffers" type="int[]">
+</parameter>
+<parameter name="offset" type="int">
+</parameter>
+</method>
+<method name="glGenRenderbuffersOES"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="n" type="int">
+</parameter>
+<parameter name="renderbuffers" type="java.nio.IntBuffer">
+</parameter>
+</method>
+<method name="glGenerateMipmapOES"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="target" type="int">
+</parameter>
+</method>
+<method name="glGetClipPlanefOES"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="pname" type="int">
+</parameter>
+<parameter name="eqn" type="float[]">
+</parameter>
+<parameter name="offset" type="int">
+</parameter>
+</method>
+<method name="glGetClipPlanefOES"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="pname" type="int">
+</parameter>
+<parameter name="eqn" type="java.nio.FloatBuffer">
+</parameter>
+</method>
+<method name="glGetClipPlanexOES"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="pname" type="int">
+</parameter>
+<parameter name="eqn" type="int[]">
+</parameter>
+<parameter name="offset" type="int">
+</parameter>
+</method>
+<method name="glGetClipPlanexOES"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="pname" type="int">
+</parameter>
+<parameter name="eqn" type="java.nio.IntBuffer">
+</parameter>
+</method>
+<method name="glGetFixedvOES"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="pname" type="int">
+</parameter>
+<parameter name="params" type="int[]">
+</parameter>
+<parameter name="offset" type="int">
+</parameter>
+</method>
+<method name="glGetFixedvOES"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="pname" type="int">
+</parameter>
+<parameter name="params" type="java.nio.IntBuffer">
+</parameter>
+</method>
+<method name="glGetFramebufferAttachmentParameterivOES"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="target" type="int">
+</parameter>
+<parameter name="attachment" type="int">
+</parameter>
+<parameter name="pname" type="int">
+</parameter>
+<parameter name="params" type="int[]">
+</parameter>
+<parameter name="offset" type="int">
+</parameter>
+</method>
+<method name="glGetFramebufferAttachmentParameterivOES"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="target" type="int">
+</parameter>
+<parameter name="attachment" type="int">
+</parameter>
+<parameter name="pname" type="int">
+</parameter>
+<parameter name="params" type="java.nio.IntBuffer">
+</parameter>
+</method>
+<method name="glGetLightxvOES"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="light" type="int">
+</parameter>
+<parameter name="pname" type="int">
+</parameter>
+<parameter name="params" type="int[]">
+</parameter>
+<parameter name="offset" type="int">
+</parameter>
+</method>
+<method name="glGetLightxvOES"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="light" type="int">
+</parameter>
+<parameter name="pname" type="int">
+</parameter>
+<parameter name="params" type="java.nio.IntBuffer">
+</parameter>
+</method>
+<method name="glGetMaterialxvOES"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="face" type="int">
+</parameter>
+<parameter name="pname" type="int">
+</parameter>
+<parameter name="params" type="int[]">
+</parameter>
+<parameter name="offset" type="int">
+</parameter>
+</method>
+<method name="glGetMaterialxvOES"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="face" type="int">
+</parameter>
+<parameter name="pname" type="int">
+</parameter>
+<parameter name="params" type="java.nio.IntBuffer">
+</parameter>
+</method>
+<method name="glGetRenderbufferParameterivOES"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="target" type="int">
+</parameter>
+<parameter name="pname" type="int">
+</parameter>
+<parameter name="params" type="int[]">
+</parameter>
+<parameter name="offset" type="int">
+</parameter>
+</method>
+<method name="glGetRenderbufferParameterivOES"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="target" type="int">
+</parameter>
+<parameter name="pname" type="int">
+</parameter>
+<parameter name="params" type="java.nio.IntBuffer">
+</parameter>
+</method>
+<method name="glGetTexEnvxvOES"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="env" type="int">
+</parameter>
+<parameter name="pname" type="int">
+</parameter>
+<parameter name="params" type="int[]">
+</parameter>
+<parameter name="offset" type="int">
+</parameter>
+</method>
+<method name="glGetTexEnvxvOES"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="env" type="int">
+</parameter>
+<parameter name="pname" type="int">
+</parameter>
+<parameter name="params" type="java.nio.IntBuffer">
+</parameter>
+</method>
+<method name="glGetTexGenfvOES"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="coord" type="int">
+</parameter>
+<parameter name="pname" type="int">
+</parameter>
+<parameter name="params" type="float[]">
+</parameter>
+<parameter name="offset" type="int">
+</parameter>
+</method>
+<method name="glGetTexGenfvOES"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="coord" type="int">
+</parameter>
+<parameter name="pname" type="int">
+</parameter>
+<parameter name="params" type="java.nio.FloatBuffer">
+</parameter>
+</method>
+<method name="glGetTexGenivOES"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="coord" type="int">
+</parameter>
+<parameter name="pname" type="int">
+</parameter>
+<parameter name="params" type="int[]">
+</parameter>
+<parameter name="offset" type="int">
+</parameter>
+</method>
+<method name="glGetTexGenivOES"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="coord" type="int">
+</parameter>
+<parameter name="pname" type="int">
+</parameter>
+<parameter name="params" type="java.nio.IntBuffer">
+</parameter>
+</method>
+<method name="glGetTexGenxvOES"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="coord" type="int">
+</parameter>
+<parameter name="pname" type="int">
+</parameter>
+<parameter name="params" type="int[]">
+</parameter>
+<parameter name="offset" type="int">
+</parameter>
+</method>
+<method name="glGetTexGenxvOES"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="coord" type="int">
+</parameter>
+<parameter name="pname" type="int">
+</parameter>
+<parameter name="params" type="java.nio.IntBuffer">
+</parameter>
+</method>
+<method name="glGetTexParameterxvOES"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="target" type="int">
+</parameter>
+<parameter name="pname" type="int">
+</parameter>
+<parameter name="params" type="int[]">
+</parameter>
+<parameter name="offset" type="int">
+</parameter>
+</method>
+<method name="glGetTexParameterxvOES"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="target" type="int">
+</parameter>
+<parameter name="pname" type="int">
+</parameter>
+<parameter name="params" type="java.nio.IntBuffer">
+</parameter>
+</method>
+<method name="glIsFramebufferOES"
+ return="boolean"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="framebuffer" type="int">
+</parameter>
+</method>
+<method name="glIsRenderbufferOES"
+ return="boolean"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="renderbuffer" type="int">
+</parameter>
+</method>
+<method name="glLightModelxOES"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="pname" type="int">
+</parameter>
+<parameter name="param" type="int">
+</parameter>
+</method>
+<method name="glLightModelxvOES"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="pname" type="int">
+</parameter>
+<parameter name="params" type="int[]">
+</parameter>
+<parameter name="offset" type="int">
+</parameter>
+</method>
+<method name="glLightModelxvOES"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="pname" type="int">
+</parameter>
+<parameter name="params" type="java.nio.IntBuffer">
+</parameter>
+</method>
+<method name="glLightxOES"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="light" type="int">
+</parameter>
+<parameter name="pname" type="int">
+</parameter>
+<parameter name="param" type="int">
+</parameter>
+</method>
+<method name="glLightxvOES"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="light" type="int">
+</parameter>
+<parameter name="pname" type="int">
+</parameter>
+<parameter name="params" type="int[]">
+</parameter>
+<parameter name="offset" type="int">
+</parameter>
+</method>
+<method name="glLightxvOES"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="light" type="int">
+</parameter>
+<parameter name="pname" type="int">
+</parameter>
+<parameter name="params" type="java.nio.IntBuffer">
+</parameter>
+</method>
+<method name="glLineWidthxOES"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="width" type="int">
+</parameter>
+</method>
+<method name="glLoadMatrixxOES"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="m" type="int[]">
+</parameter>
+<parameter name="offset" type="int">
+</parameter>
+</method>
+<method name="glLoadMatrixxOES"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="m" type="java.nio.IntBuffer">
+</parameter>
+</method>
+<method name="glLoadPaletteFromModelViewMatrixOES"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="glMaterialxOES"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="face" type="int">
+</parameter>
+<parameter name="pname" type="int">
+</parameter>
+<parameter name="param" type="int">
+</parameter>
+</method>
+<method name="glMaterialxvOES"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="face" type="int">
+</parameter>
+<parameter name="pname" type="int">
+</parameter>
+<parameter name="params" type="int[]">
+</parameter>
+<parameter name="offset" type="int">
+</parameter>
+</method>
+<method name="glMaterialxvOES"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="face" type="int">
+</parameter>
+<parameter name="pname" type="int">
+</parameter>
+<parameter name="params" type="java.nio.IntBuffer">
+</parameter>
+</method>
+<method name="glMatrixIndexPointerOES"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="size" type="int">
+</parameter>
+<parameter name="type" type="int">
+</parameter>
+<parameter name="stride" type="int">
+</parameter>
+<parameter name="pointer" type="java.nio.Buffer">
+</parameter>
+</method>
+<method name="glMultMatrixxOES"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="m" type="int[]">
+</parameter>
+<parameter name="offset" type="int">
+</parameter>
+</method>
+<method name="glMultMatrixxOES"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="m" type="java.nio.IntBuffer">
+</parameter>
+</method>
+<method name="glMultiTexCoord4xOES"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="target" type="int">
+</parameter>
+<parameter name="s" type="int">
+</parameter>
+<parameter name="t" type="int">
+</parameter>
+<parameter name="r" type="int">
+</parameter>
+<parameter name="q" type="int">
+</parameter>
+</method>
+<method name="glNormal3xOES"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="nx" type="int">
+</parameter>
+<parameter name="ny" type="int">
+</parameter>
+<parameter name="nz" type="int">
+</parameter>
+</method>
+<method name="glOrthofOES"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="left" type="float">
+</parameter>
+<parameter name="right" type="float">
+</parameter>
+<parameter name="bottom" type="float">
+</parameter>
+<parameter name="top" type="float">
+</parameter>
+<parameter name="zNear" type="float">
+</parameter>
+<parameter name="zFar" type="float">
+</parameter>
+</method>
+<method name="glOrthoxOES"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="left" type="int">
+</parameter>
+<parameter name="right" type="int">
+</parameter>
+<parameter name="bottom" type="int">
+</parameter>
+<parameter name="top" type="int">
+</parameter>
+<parameter name="zNear" type="int">
+</parameter>
+<parameter name="zFar" type="int">
+</parameter>
+</method>
+<method name="glPointParameterxOES"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="pname" type="int">
+</parameter>
+<parameter name="param" type="int">
+</parameter>
+</method>
+<method name="glPointParameterxvOES"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="pname" type="int">
+</parameter>
+<parameter name="params" type="int[]">
+</parameter>
+<parameter name="offset" type="int">
+</parameter>
+</method>
+<method name="glPointParameterxvOES"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="pname" type="int">
+</parameter>
+<parameter name="params" type="java.nio.IntBuffer">
+</parameter>
+</method>
+<method name="glPointSizexOES"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="size" type="int">
+</parameter>
+</method>
+<method name="glPolygonOffsetxOES"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="factor" type="int">
+</parameter>
+<parameter name="units" type="int">
+</parameter>
+</method>
+<method name="glRenderbufferStorageOES"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="target" type="int">
+</parameter>
+<parameter name="internalformat" type="int">
+</parameter>
+<parameter name="width" type="int">
+</parameter>
+<parameter name="height" type="int">
+</parameter>
+</method>
+<method name="glRotatexOES"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="angle" type="int">
+</parameter>
+<parameter name="x" type="int">
+</parameter>
+<parameter name="y" type="int">
+</parameter>
+<parameter name="z" type="int">
+</parameter>
+</method>
+<method name="glSampleCoveragexOES"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="value" type="int">
+</parameter>
+<parameter name="invert" type="boolean">
+</parameter>
+</method>
+<method name="glScalexOES"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="x" type="int">
+</parameter>
+<parameter name="y" type="int">
+</parameter>
+<parameter name="z" type="int">
+</parameter>
+</method>
+<method name="glTexEnvxOES"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="target" type="int">
+</parameter>
+<parameter name="pname" type="int">
+</parameter>
+<parameter name="param" type="int">
+</parameter>
+</method>
+<method name="glTexEnvxvOES"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="target" type="int">
+</parameter>
+<parameter name="pname" type="int">
+</parameter>
+<parameter name="params" type="int[]">
+</parameter>
+<parameter name="offset" type="int">
+</parameter>
+</method>
+<method name="glTexEnvxvOES"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="target" type="int">
+</parameter>
+<parameter name="pname" type="int">
+</parameter>
+<parameter name="params" type="java.nio.IntBuffer">
+</parameter>
+</method>
+<method name="glTexGenfOES"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="coord" type="int">
+</parameter>
+<parameter name="pname" type="int">
+</parameter>
+<parameter name="param" type="float">
+</parameter>
+</method>
+<method name="glTexGenfvOES"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="coord" type="int">
+</parameter>
+<parameter name="pname" type="int">
+</parameter>
+<parameter name="params" type="float[]">
+</parameter>
+<parameter name="offset" type="int">
+</parameter>
+</method>
+<method name="glTexGenfvOES"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="coord" type="int">
+</parameter>
+<parameter name="pname" type="int">
+</parameter>
+<parameter name="params" type="java.nio.FloatBuffer">
+</parameter>
+</method>
+<method name="glTexGeniOES"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="coord" type="int">
+</parameter>
+<parameter name="pname" type="int">
+</parameter>
+<parameter name="param" type="int">
+</parameter>
+</method>
+<method name="glTexGenivOES"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="coord" type="int">
+</parameter>
+<parameter name="pname" type="int">
+</parameter>
+<parameter name="params" type="int[]">
+</parameter>
+<parameter name="offset" type="int">
+</parameter>
+</method>
+<method name="glTexGenivOES"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="coord" type="int">
+</parameter>
+<parameter name="pname" type="int">
+</parameter>
+<parameter name="params" type="java.nio.IntBuffer">
+</parameter>
+</method>
+<method name="glTexGenxOES"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="coord" type="int">
+</parameter>
+<parameter name="pname" type="int">
+</parameter>
+<parameter name="param" type="int">
+</parameter>
+</method>
+<method name="glTexGenxvOES"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="coord" type="int">
+</parameter>
+<parameter name="pname" type="int">
+</parameter>
+<parameter name="params" type="int[]">
+</parameter>
+<parameter name="offset" type="int">
+</parameter>
+</method>
+<method name="glTexGenxvOES"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="coord" type="int">
+</parameter>
+<parameter name="pname" type="int">
+</parameter>
+<parameter name="params" type="java.nio.IntBuffer">
+</parameter>
+</method>
+<method name="glTexParameterxOES"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="target" type="int">
+</parameter>
+<parameter name="pname" type="int">
+</parameter>
+<parameter name="param" type="int">
+</parameter>
+</method>
+<method name="glTexParameterxvOES"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="target" type="int">
+</parameter>
+<parameter name="pname" type="int">
+</parameter>
+<parameter name="params" type="int[]">
+</parameter>
+<parameter name="offset" type="int">
+</parameter>
+</method>
+<method name="glTexParameterxvOES"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="target" type="int">
+</parameter>
+<parameter name="pname" type="int">
+</parameter>
+<parameter name="params" type="java.nio.IntBuffer">
+</parameter>
+</method>
+<method name="glTranslatexOES"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="x" type="int">
+</parameter>
+<parameter name="y" type="int">
+</parameter>
+<parameter name="z" type="int">
+</parameter>
+</method>
+<method name="glWeightPointerOES"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="size" type="int">
+</parameter>
+<parameter name="type" type="int">
+</parameter>
+<parameter name="stride" type="int">
+</parameter>
+<parameter name="pointer" type="java.nio.Buffer">
+</parameter>
+</method>
+<field name="GL_3DC_XY_AMD"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="34810"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_3DC_X_AMD"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="34809"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_ATC_RGBA_EXPLICIT_ALPHA_AMD"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="35987"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_ATC_RGBA_INTERPOLATED_ALPHA_AMD"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="34798"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_ATC_RGB_AMD"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="35986"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_BGRA"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="32993"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_BLEND_DST_ALPHA_OES"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="32970"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_BLEND_DST_RGB_OES"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="32968"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_BLEND_EQUATION_ALPHA_OES"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="34877"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_BLEND_EQUATION_OES"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="32777"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_BLEND_EQUATION_RGB_OES"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="32777"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_BLEND_SRC_ALPHA_OES"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="32971"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_BLEND_SRC_RGB_OES"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="32969"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_BUFFER_ACCESS_OES"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="35003"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_BUFFER_MAPPED_OES"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="35004"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_BUFFER_MAP_POINTER_OES"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="35005"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_COLOR_ATTACHMENT0_OES"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="36064"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_CURRENT_PALETTE_MATRIX_OES"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="34883"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_DECR_WRAP_OES"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="34056"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_DEPTH24_STENCIL8_OES"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="35056"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_DEPTH_ATTACHMENT_OES"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="36096"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_DEPTH_COMPONENT16_OES"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="33189"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_DEPTH_COMPONENT24_OES"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="33190"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_DEPTH_COMPONENT32_OES"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="33191"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_DEPTH_STENCIL_OES"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="34041"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_ETC1_RGB8_OES"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="36196"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_FIXED_OES"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="5132"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME_OES"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="36049"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE_OES"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="36048"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE_OES"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="36051"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL_OES"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="36050"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_FRAMEBUFFER_BINDING_OES"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="36006"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_FRAMEBUFFER_COMPLETE_OES"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="36053"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT_OES"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="36054"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS_OES"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="36057"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_FRAMEBUFFER_INCOMPLETE_FORMATS_OES"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="36058"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT_OES"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="36055"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_FRAMEBUFFER_OES"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="36160"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_FRAMEBUFFER_UNSUPPORTED_OES"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="36061"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_FUNC_ADD_OES"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="32774"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_FUNC_REVERSE_SUBTRACT_OES"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="32779"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_FUNC_SUBTRACT_OES"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="32778"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_INCR_WRAP_OES"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="34055"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_INVALID_FRAMEBUFFER_OPERATION_OES"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1286"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_MATRIX_INDEX_ARRAY_BUFFER_BINDING_OES"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="35742"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_MATRIX_INDEX_ARRAY_OES"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="34884"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_MATRIX_INDEX_ARRAY_POINTER_OES"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="34889"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_MATRIX_INDEX_ARRAY_SIZE_OES"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="34886"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_MATRIX_INDEX_ARRAY_STRIDE_OES"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="34888"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_MATRIX_INDEX_ARRAY_TYPE_OES"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="34887"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_MATRIX_PALETTE_OES"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="34880"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_MAX_CUBE_MAP_TEXTURE_SIZE_OES"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="34076"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_MAX_PALETTE_MATRICES_OES"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="34882"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_MAX_RENDERBUFFER_SIZE_OES"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="34024"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="34047"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_MAX_VERTEX_UNITS_OES"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="34468"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_MIRRORED_REPEAT_OES"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="33648"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_MODELVIEW_MATRIX_FLOAT_AS_INT_BITS_OES"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="35213"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_NONE_OES"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="0"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_NORMAL_MAP_OES"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="34065"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_PROJECTION_MATRIX_FLOAT_AS_INT_BITS_OES"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="35214"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_REFLECTION_MAP_OES"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="34066"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_RENDERBUFFER_ALPHA_SIZE_OES"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="36179"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_RENDERBUFFER_BINDING_OES"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="36007"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_RENDERBUFFER_BLUE_SIZE_OES"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="36178"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_RENDERBUFFER_DEPTH_SIZE_OES"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="36180"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_RENDERBUFFER_GREEN_SIZE_OES"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="36177"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_RENDERBUFFER_HEIGHT_OES"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="36163"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_RENDERBUFFER_INTERNAL_FORMAT_OES"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="36164"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_RENDERBUFFER_OES"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="36161"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_RENDERBUFFER_RED_SIZE_OES"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="36176"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_RENDERBUFFER_STENCIL_SIZE_OES"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="36181"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_RENDERBUFFER_WIDTH_OES"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="36162"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_RGB565_OES"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="36194"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_RGB5_A1_OES"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="32855"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_RGB8_OES"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="32849"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_RGBA4_OES"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="32854"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_RGBA8_OES"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="32856"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_STENCIL_ATTACHMENT_OES"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="36128"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_STENCIL_INDEX1_OES"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="36166"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_STENCIL_INDEX4_OES"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="36167"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_STENCIL_INDEX8_OES"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="36168"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_TEXTURE_BINDING_CUBE_MAP_OES"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="34068"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_TEXTURE_CROP_RECT_OES"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="35741"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_TEXTURE_CUBE_MAP_NEGATIVE_X_OES"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="34070"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_TEXTURE_CUBE_MAP_NEGATIVE_Y_OES"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="34072"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_TEXTURE_CUBE_MAP_NEGATIVE_Z_OES"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="34074"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_TEXTURE_CUBE_MAP_OES"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="34067"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_TEXTURE_CUBE_MAP_POSITIVE_X_OES"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="34069"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_TEXTURE_CUBE_MAP_POSITIVE_Y_OES"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="34071"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_TEXTURE_CUBE_MAP_POSITIVE_Z_OES"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="34073"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_TEXTURE_GEN_MODE_OES"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="9472"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_TEXTURE_GEN_STR_OES"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="36192"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_TEXTURE_MATRIX_FLOAT_AS_INT_BITS_OES"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="35215"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_TEXTURE_MAX_ANISOTROPY_EXT"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="34046"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_UNSIGNED_INT_24_8_OES"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="34042"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_WEIGHT_ARRAY_BUFFER_BINDING_OES"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="34974"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_WEIGHT_ARRAY_OES"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="34477"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_WEIGHT_ARRAY_POINTER_OES"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="34476"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_WEIGHT_ARRAY_SIZE_OES"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="34475"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_WEIGHT_ARRAY_STRIDE_OES"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="34474"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_WEIGHT_ARRAY_TYPE_OES"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="34473"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_WRITE_ONLY_OES"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="35001"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<class name="GLES20"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="GLES20"
+ type="android.opengl.GLES20"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<method name="glActiveTexture"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="texture" type="int">
+</parameter>
+</method>
+<method name="glAttachShader"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="program" type="int">
+</parameter>
+<parameter name="shader" type="int">
+</parameter>
+</method>
+<method name="glBindAttribLocation"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="program" type="int">
+</parameter>
+<parameter name="index" type="int">
+</parameter>
+<parameter name="name" type="java.lang.String">
+</parameter>
+</method>
+<method name="glBindBuffer"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="target" type="int">
+</parameter>
+<parameter name="buffer" type="int">
+</parameter>
+</method>
+<method name="glBindFramebuffer"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="target" type="int">
+</parameter>
+<parameter name="framebuffer" type="int">
+</parameter>
+</method>
+<method name="glBindRenderbuffer"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="target" type="int">
+</parameter>
+<parameter name="renderbuffer" type="int">
+</parameter>
+</method>
+<method name="glBindTexture"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="target" type="int">
+</parameter>
+<parameter name="texture" type="int">
+</parameter>
+</method>
+<method name="glBlendColor"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="red" type="float">
+</parameter>
+<parameter name="green" type="float">
+</parameter>
+<parameter name="blue" type="float">
+</parameter>
+<parameter name="alpha" type="float">
+</parameter>
+</method>
+<method name="glBlendEquation"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="mode" type="int">
+</parameter>
+</method>
+<method name="glBlendEquationSeparate"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="modeRGB" type="int">
+</parameter>
+<parameter name="modeAlpha" type="int">
+</parameter>
+</method>
+<method name="glBlendFunc"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="sfactor" type="int">
+</parameter>
+<parameter name="dfactor" type="int">
+</parameter>
+</method>
+<method name="glBlendFuncSeparate"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="srcRGB" type="int">
+</parameter>
+<parameter name="dstRGB" type="int">
+</parameter>
+<parameter name="srcAlpha" type="int">
+</parameter>
+<parameter name="dstAlpha" type="int">
+</parameter>
+</method>
+<method name="glBufferData"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="target" type="int">
+</parameter>
+<parameter name="size" type="int">
+</parameter>
+<parameter name="data" type="java.nio.Buffer">
+</parameter>
+<parameter name="usage" type="int">
+</parameter>
+</method>
+<method name="glBufferSubData"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="target" type="int">
+</parameter>
+<parameter name="offset" type="int">
+</parameter>
+<parameter name="size" type="int">
+</parameter>
+<parameter name="data" type="java.nio.Buffer">
+</parameter>
+</method>
+<method name="glCheckFramebufferStatus"
+ return="int"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="target" type="int">
+</parameter>
+</method>
+<method name="glClear"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="mask" type="int">
+</parameter>
+</method>
+<method name="glClearColor"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="red" type="float">
+</parameter>
+<parameter name="green" type="float">
+</parameter>
+<parameter name="blue" type="float">
+</parameter>
+<parameter name="alpha" type="float">
+</parameter>
+</method>
+<method name="glClearDepthf"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="depth" type="float">
+</parameter>
+</method>
+<method name="glClearStencil"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="s" type="int">
+</parameter>
+</method>
+<method name="glColorMask"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="red" type="boolean">
+</parameter>
+<parameter name="green" type="boolean">
+</parameter>
+<parameter name="blue" type="boolean">
+</parameter>
+<parameter name="alpha" type="boolean">
+</parameter>
+</method>
+<method name="glCompileShader"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="shader" type="int">
+</parameter>
+</method>
+<method name="glCompressedTexImage2D"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="target" type="int">
+</parameter>
+<parameter name="level" type="int">
+</parameter>
+<parameter name="internalformat" type="int">
+</parameter>
+<parameter name="width" type="int">
+</parameter>
+<parameter name="height" type="int">
+</parameter>
+<parameter name="border" type="int">
+</parameter>
+<parameter name="imageSize" type="int">
+</parameter>
+<parameter name="data" type="java.nio.Buffer">
+</parameter>
+</method>
+<method name="glCompressedTexSubImage2D"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="target" type="int">
+</parameter>
+<parameter name="level" type="int">
+</parameter>
+<parameter name="xoffset" type="int">
+</parameter>
+<parameter name="yoffset" type="int">
+</parameter>
+<parameter name="width" type="int">
+</parameter>
+<parameter name="height" type="int">
+</parameter>
+<parameter name="format" type="int">
+</parameter>
+<parameter name="imageSize" type="int">
+</parameter>
+<parameter name="data" type="java.nio.Buffer">
+</parameter>
+</method>
+<method name="glCopyTexImage2D"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="target" type="int">
+</parameter>
+<parameter name="level" type="int">
+</parameter>
+<parameter name="internalformat" type="int">
+</parameter>
+<parameter name="x" type="int">
+</parameter>
+<parameter name="y" type="int">
+</parameter>
+<parameter name="width" type="int">
+</parameter>
+<parameter name="height" type="int">
+</parameter>
+<parameter name="border" type="int">
+</parameter>
+</method>
+<method name="glCopyTexSubImage2D"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="target" type="int">
+</parameter>
+<parameter name="level" type="int">
+</parameter>
+<parameter name="xoffset" type="int">
+</parameter>
+<parameter name="yoffset" type="int">
+</parameter>
+<parameter name="x" type="int">
+</parameter>
+<parameter name="y" type="int">
+</parameter>
+<parameter name="width" type="int">
+</parameter>
+<parameter name="height" type="int">
+</parameter>
+</method>
+<method name="glCreateProgram"
+ return="int"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="glCreateShader"
+ return="int"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="type" type="int">
+</parameter>
+</method>
+<method name="glCullFace"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="mode" type="int">
+</parameter>
+</method>
+<method name="glDeleteBuffers"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="n" type="int">
+</parameter>
+<parameter name="buffers" type="int[]">
+</parameter>
+<parameter name="offset" type="int">
+</parameter>
+</method>
+<method name="glDeleteBuffers"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="n" type="int">
+</parameter>
+<parameter name="buffers" type="java.nio.IntBuffer">
+</parameter>
+</method>
+<method name="glDeleteFramebuffers"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="n" type="int">
+</parameter>
+<parameter name="framebuffers" type="int[]">
+</parameter>
+<parameter name="offset" type="int">
+</parameter>
+</method>
+<method name="glDeleteFramebuffers"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="n" type="int">
+</parameter>
+<parameter name="framebuffers" type="java.nio.IntBuffer">
+</parameter>
+</method>
+<method name="glDeleteProgram"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="program" type="int">
+</parameter>
+</method>
+<method name="glDeleteRenderbuffers"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="n" type="int">
+</parameter>
+<parameter name="renderbuffers" type="int[]">
+</parameter>
+<parameter name="offset" type="int">
+</parameter>
+</method>
+<method name="glDeleteRenderbuffers"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="n" type="int">
+</parameter>
+<parameter name="renderbuffers" type="java.nio.IntBuffer">
+</parameter>
+</method>
+<method name="glDeleteShader"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="shader" type="int">
+</parameter>
+</method>
+<method name="glDeleteTextures"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="n" type="int">
+</parameter>
+<parameter name="textures" type="int[]">
+</parameter>
+<parameter name="offset" type="int">
+</parameter>
+</method>
+<method name="glDeleteTextures"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="n" type="int">
+</parameter>
+<parameter name="textures" type="java.nio.IntBuffer">
+</parameter>
+</method>
+<method name="glDepthFunc"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="func" type="int">
+</parameter>
+</method>
+<method name="glDepthMask"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="flag" type="boolean">
+</parameter>
+</method>
+<method name="glDepthRangef"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="zNear" type="float">
+</parameter>
+<parameter name="zFar" type="float">
+</parameter>
+</method>
+<method name="glDetachShader"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="program" type="int">
+</parameter>
+<parameter name="shader" type="int">
+</parameter>
+</method>
+<method name="glDisable"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="cap" type="int">
+</parameter>
+</method>
+<method name="glDisableVertexAttribArray"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="index" type="int">
+</parameter>
+</method>
+<method name="glDrawArrays"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="mode" type="int">
+</parameter>
+<parameter name="first" type="int">
+</parameter>
+<parameter name="count" type="int">
+</parameter>
+</method>
+<method name="glDrawElements"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="mode" type="int">
+</parameter>
+<parameter name="count" type="int">
+</parameter>
+<parameter name="type" type="int">
+</parameter>
+<parameter name="indices" type="java.nio.Buffer">
+</parameter>
+</method>
+<method name="glEnable"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="cap" type="int">
+</parameter>
+</method>
+<method name="glEnableVertexAttribArray"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="index" type="int">
+</parameter>
+</method>
+<method name="glFinish"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="glFlush"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="glFramebufferRenderbuffer"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="target" type="int">
+</parameter>
+<parameter name="attachment" type="int">
+</parameter>
+<parameter name="renderbuffertarget" type="int">
+</parameter>
+<parameter name="renderbuffer" type="int">
+</parameter>
+</method>
+<method name="glFramebufferTexture2D"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="target" type="int">
+</parameter>
+<parameter name="attachment" type="int">
+</parameter>
+<parameter name="textarget" type="int">
+</parameter>
+<parameter name="texture" type="int">
+</parameter>
+<parameter name="level" type="int">
+</parameter>
+</method>
+<method name="glFrontFace"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="mode" type="int">
+</parameter>
+</method>
+<method name="glGenBuffers"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="n" type="int">
+</parameter>
+<parameter name="buffers" type="int[]">
+</parameter>
+<parameter name="offset" type="int">
+</parameter>
+</method>
+<method name="glGenBuffers"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="n" type="int">
+</parameter>
+<parameter name="buffers" type="java.nio.IntBuffer">
+</parameter>
+</method>
+<method name="glGenFramebuffers"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="n" type="int">
+</parameter>
+<parameter name="framebuffers" type="int[]">
+</parameter>
+<parameter name="offset" type="int">
+</parameter>
+</method>
+<method name="glGenFramebuffers"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="n" type="int">
+</parameter>
+<parameter name="framebuffers" type="java.nio.IntBuffer">
+</parameter>
+</method>
+<method name="glGenRenderbuffers"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="n" type="int">
+</parameter>
+<parameter name="renderbuffers" type="int[]">
+</parameter>
+<parameter name="offset" type="int">
+</parameter>
+</method>
+<method name="glGenRenderbuffers"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="n" type="int">
+</parameter>
+<parameter name="renderbuffers" type="java.nio.IntBuffer">
+</parameter>
+</method>
+<method name="glGenTextures"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="n" type="int">
+</parameter>
+<parameter name="textures" type="int[]">
+</parameter>
+<parameter name="offset" type="int">
+</parameter>
+</method>
+<method name="glGenTextures"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="n" type="int">
+</parameter>
+<parameter name="textures" type="java.nio.IntBuffer">
+</parameter>
+</method>
+<method name="glGenerateMipmap"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="target" type="int">
+</parameter>
+</method>
+<method name="glGetActiveAttrib"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="program" type="int">
+</parameter>
+<parameter name="index" type="int">
+</parameter>
+<parameter name="bufsize" type="int">
+</parameter>
+<parameter name="length" type="int[]">
+</parameter>
+<parameter name="lengthOffset" type="int">
+</parameter>
+<parameter name="size" type="int[]">
+</parameter>
+<parameter name="sizeOffset" type="int">
+</parameter>
+<parameter name="type" type="int[]">
+</parameter>
+<parameter name="typeOffset" type="int">
+</parameter>
+<parameter name="name" type="byte[]">
+</parameter>
+<parameter name="nameOffset" type="int">
+</parameter>
+</method>
+<method name="glGetActiveAttrib"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="program" type="int">
+</parameter>
+<parameter name="index" type="int">
+</parameter>
+<parameter name="bufsize" type="int">
+</parameter>
+<parameter name="length" type="java.nio.IntBuffer">
+</parameter>
+<parameter name="size" type="java.nio.IntBuffer">
+</parameter>
+<parameter name="type" type="java.nio.IntBuffer">
+</parameter>
+<parameter name="name" type="byte">
+</parameter>
+</method>
+<method name="glGetActiveUniform"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="program" type="int">
+</parameter>
+<parameter name="index" type="int">
+</parameter>
+<parameter name="bufsize" type="int">
+</parameter>
+<parameter name="length" type="int[]">
+</parameter>
+<parameter name="lengthOffset" type="int">
+</parameter>
+<parameter name="size" type="int[]">
+</parameter>
+<parameter name="sizeOffset" type="int">
+</parameter>
+<parameter name="type" type="int[]">
+</parameter>
+<parameter name="typeOffset" type="int">
+</parameter>
+<parameter name="name" type="byte[]">
+</parameter>
+<parameter name="nameOffset" type="int">
+</parameter>
+</method>
+<method name="glGetActiveUniform"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="program" type="int">
+</parameter>
+<parameter name="index" type="int">
+</parameter>
+<parameter name="bufsize" type="int">
+</parameter>
+<parameter name="length" type="java.nio.IntBuffer">
+</parameter>
+<parameter name="size" type="java.nio.IntBuffer">
+</parameter>
+<parameter name="type" type="java.nio.IntBuffer">
+</parameter>
+<parameter name="name" type="byte">
+</parameter>
+</method>
+<method name="glGetAttachedShaders"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="program" type="int">
+</parameter>
+<parameter name="maxcount" type="int">
+</parameter>
+<parameter name="count" type="int[]">
+</parameter>
+<parameter name="countOffset" type="int">
+</parameter>
+<parameter name="shaders" type="int[]">
+</parameter>
+<parameter name="shadersOffset" type="int">
+</parameter>
+</method>
+<method name="glGetAttachedShaders"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="program" type="int">
+</parameter>
+<parameter name="maxcount" type="int">
+</parameter>
+<parameter name="count" type="java.nio.IntBuffer">
+</parameter>
+<parameter name="shaders" type="java.nio.IntBuffer">
+</parameter>
+</method>
+<method name="glGetAttribLocation"
+ return="int"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="program" type="int">
+</parameter>
+<parameter name="name" type="java.lang.String">
+</parameter>
+</method>
+<method name="glGetBooleanv"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="pname" type="int">
+</parameter>
+<parameter name="params" type="boolean[]">
+</parameter>
+<parameter name="offset" type="int">
+</parameter>
+</method>
+<method name="glGetBooleanv"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="pname" type="int">
+</parameter>
+<parameter name="params" type="java.nio.IntBuffer">
+</parameter>
+</method>
+<method name="glGetBufferParameteriv"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="target" type="int">
+</parameter>
+<parameter name="pname" type="int">
+</parameter>
+<parameter name="params" type="int[]">
+</parameter>
+<parameter name="offset" type="int">
+</parameter>
+</method>
+<method name="glGetBufferParameteriv"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="target" type="int">
+</parameter>
+<parameter name="pname" type="int">
+</parameter>
+<parameter name="params" type="java.nio.IntBuffer">
+</parameter>
+</method>
+<method name="glGetError"
+ return="int"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="glGetFloatv"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="pname" type="int">
+</parameter>
+<parameter name="params" type="float[]">
+</parameter>
+<parameter name="offset" type="int">
+</parameter>
+</method>
+<method name="glGetFloatv"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="pname" type="int">
+</parameter>
+<parameter name="params" type="java.nio.FloatBuffer">
+</parameter>
+</method>
+<method name="glGetFramebufferAttachmentParameteriv"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="target" type="int">
+</parameter>
+<parameter name="attachment" type="int">
+</parameter>
+<parameter name="pname" type="int">
+</parameter>
+<parameter name="params" type="int[]">
+</parameter>
+<parameter name="offset" type="int">
+</parameter>
+</method>
+<method name="glGetFramebufferAttachmentParameteriv"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="target" type="int">
+</parameter>
+<parameter name="attachment" type="int">
+</parameter>
+<parameter name="pname" type="int">
+</parameter>
+<parameter name="params" type="java.nio.IntBuffer">
+</parameter>
+</method>
+<method name="glGetIntegerv"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="pname" type="int">
+</parameter>
+<parameter name="params" type="int[]">
+</parameter>
+<parameter name="offset" type="int">
+</parameter>
+</method>
+<method name="glGetIntegerv"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="pname" type="int">
+</parameter>
+<parameter name="params" type="java.nio.IntBuffer">
+</parameter>
+</method>
+<method name="glGetProgramInfoLog"
+ return="java.lang.String"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="program" type="int">
+</parameter>
+</method>
+<method name="glGetProgramiv"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="program" type="int">
+</parameter>
+<parameter name="pname" type="int">
+</parameter>
+<parameter name="params" type="int[]">
+</parameter>
+<parameter name="offset" type="int">
+</parameter>
+</method>
+<method name="glGetProgramiv"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="program" type="int">
+</parameter>
+<parameter name="pname" type="int">
+</parameter>
+<parameter name="params" type="java.nio.IntBuffer">
+</parameter>
+</method>
+<method name="glGetRenderbufferParameteriv"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="target" type="int">
+</parameter>
+<parameter name="pname" type="int">
+</parameter>
+<parameter name="params" type="int[]">
+</parameter>
+<parameter name="offset" type="int">
+</parameter>
+</method>
+<method name="glGetRenderbufferParameteriv"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="target" type="int">
+</parameter>
+<parameter name="pname" type="int">
+</parameter>
+<parameter name="params" type="java.nio.IntBuffer">
+</parameter>
+</method>
+<method name="glGetShaderInfoLog"
+ return="java.lang.String"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="shader" type="int">
+</parameter>
+</method>
+<method name="glGetShaderPrecisionFormat"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="shadertype" type="int">
+</parameter>
+<parameter name="precisiontype" type="int">
+</parameter>
+<parameter name="range" type="int[]">
+</parameter>
+<parameter name="rangeOffset" type="int">
+</parameter>
+<parameter name="precision" type="int[]">
+</parameter>
+<parameter name="precisionOffset" type="int">
+</parameter>
+</method>
+<method name="glGetShaderPrecisionFormat"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="shadertype" type="int">
+</parameter>
+<parameter name="precisiontype" type="int">
+</parameter>
+<parameter name="range" type="java.nio.IntBuffer">
+</parameter>
+<parameter name="precision" type="java.nio.IntBuffer">
+</parameter>
+</method>
+<method name="glGetShaderSource"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="shader" type="int">
+</parameter>
+<parameter name="bufsize" type="int">
+</parameter>
+<parameter name="length" type="int[]">
+</parameter>
+<parameter name="lengthOffset" type="int">
+</parameter>
+<parameter name="source" type="byte[]">
+</parameter>
+<parameter name="sourceOffset" type="int">
+</parameter>
+</method>
+<method name="glGetShaderSource"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="shader" type="int">
+</parameter>
+<parameter name="bufsize" type="int">
+</parameter>
+<parameter name="length" type="java.nio.IntBuffer">
+</parameter>
+<parameter name="source" type="byte">
+</parameter>
+</method>
+<method name="glGetShaderiv"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="shader" type="int">
+</parameter>
+<parameter name="pname" type="int">
+</parameter>
+<parameter name="params" type="int[]">
+</parameter>
+<parameter name="offset" type="int">
+</parameter>
+</method>
+<method name="glGetShaderiv"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="shader" type="int">
+</parameter>
+<parameter name="pname" type="int">
+</parameter>
+<parameter name="params" type="java.nio.IntBuffer">
+</parameter>
+</method>
+<method name="glGetString"
+ return="java.lang.String"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="int">
+</parameter>
+</method>
+<method name="glGetTexParameterfv"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="target" type="int">
+</parameter>
+<parameter name="pname" type="int">
+</parameter>
+<parameter name="params" type="float[]">
+</parameter>
+<parameter name="offset" type="int">
+</parameter>
+</method>
+<method name="glGetTexParameterfv"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="target" type="int">
+</parameter>
+<parameter name="pname" type="int">
+</parameter>
+<parameter name="params" type="java.nio.FloatBuffer">
+</parameter>
+</method>
+<method name="glGetTexParameteriv"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="target" type="int">
+</parameter>
+<parameter name="pname" type="int">
+</parameter>
+<parameter name="params" type="int[]">
+</parameter>
+<parameter name="offset" type="int">
+</parameter>
+</method>
+<method name="glGetTexParameteriv"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="target" type="int">
+</parameter>
+<parameter name="pname" type="int">
+</parameter>
+<parameter name="params" type="java.nio.IntBuffer">
+</parameter>
+</method>
+<method name="glGetUniformLocation"
+ return="int"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="program" type="int">
+</parameter>
+<parameter name="name" type="java.lang.String">
+</parameter>
+</method>
+<method name="glGetUniformfv"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="program" type="int">
+</parameter>
+<parameter name="location" type="int">
+</parameter>
+<parameter name="params" type="float[]">
+</parameter>
+<parameter name="offset" type="int">
+</parameter>
+</method>
+<method name="glGetUniformfv"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="program" type="int">
+</parameter>
+<parameter name="location" type="int">
+</parameter>
+<parameter name="params" type="java.nio.FloatBuffer">
+</parameter>
+</method>
+<method name="glGetUniformiv"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="program" type="int">
+</parameter>
+<parameter name="location" type="int">
+</parameter>
+<parameter name="params" type="int[]">
+</parameter>
+<parameter name="offset" type="int">
+</parameter>
+</method>
+<method name="glGetUniformiv"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="program" type="int">
+</parameter>
+<parameter name="location" type="int">
+</parameter>
+<parameter name="params" type="java.nio.IntBuffer">
+</parameter>
+</method>
+<method name="glGetVertexAttribfv"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="index" type="int">
+</parameter>
+<parameter name="pname" type="int">
+</parameter>
+<parameter name="params" type="float[]">
+</parameter>
+<parameter name="offset" type="int">
+</parameter>
+</method>
+<method name="glGetVertexAttribfv"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="index" type="int">
+</parameter>
+<parameter name="pname" type="int">
+</parameter>
+<parameter name="params" type="java.nio.FloatBuffer">
+</parameter>
+</method>
+<method name="glGetVertexAttribiv"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="index" type="int">
+</parameter>
+<parameter name="pname" type="int">
+</parameter>
+<parameter name="params" type="int[]">
+</parameter>
+<parameter name="offset" type="int">
+</parameter>
+</method>
+<method name="glGetVertexAttribiv"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="index" type="int">
+</parameter>
+<parameter name="pname" type="int">
+</parameter>
+<parameter name="params" type="java.nio.IntBuffer">
+</parameter>
+</method>
+<method name="glHint"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="target" type="int">
+</parameter>
+<parameter name="mode" type="int">
+</parameter>
+</method>
+<method name="glIsBuffer"
+ return="boolean"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="buffer" type="int">
+</parameter>
+</method>
+<method name="glIsEnabled"
+ return="boolean"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="cap" type="int">
+</parameter>
+</method>
+<method name="glIsFramebuffer"
+ return="boolean"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="framebuffer" type="int">
+</parameter>
+</method>
+<method name="glIsProgram"
+ return="boolean"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="program" type="int">
+</parameter>
+</method>
+<method name="glIsRenderbuffer"
+ return="boolean"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="renderbuffer" type="int">
+</parameter>
+</method>
+<method name="glIsShader"
+ return="boolean"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="shader" type="int">
+</parameter>
+</method>
+<method name="glIsTexture"
+ return="boolean"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="texture" type="int">
+</parameter>
+</method>
+<method name="glLineWidth"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="width" type="float">
+</parameter>
+</method>
+<method name="glLinkProgram"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="program" type="int">
+</parameter>
+</method>
+<method name="glPixelStorei"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="pname" type="int">
+</parameter>
+<parameter name="param" type="int">
+</parameter>
+</method>
+<method name="glPolygonOffset"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="factor" type="float">
+</parameter>
+<parameter name="units" type="float">
+</parameter>
+</method>
+<method name="glReadPixels"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="x" type="int">
+</parameter>
+<parameter name="y" type="int">
+</parameter>
+<parameter name="width" type="int">
+</parameter>
+<parameter name="height" type="int">
+</parameter>
+<parameter name="format" type="int">
+</parameter>
+<parameter name="type" type="int">
+</parameter>
+<parameter name="pixels" type="java.nio.Buffer">
+</parameter>
+</method>
+<method name="glReleaseShaderCompiler"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="glRenderbufferStorage"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="target" type="int">
+</parameter>
+<parameter name="internalformat" type="int">
+</parameter>
+<parameter name="width" type="int">
+</parameter>
+<parameter name="height" type="int">
+</parameter>
+</method>
+<method name="glSampleCoverage"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="value" type="float">
+</parameter>
+<parameter name="invert" type="boolean">
+</parameter>
+</method>
+<method name="glScissor"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="x" type="int">
+</parameter>
+<parameter name="y" type="int">
+</parameter>
+<parameter name="width" type="int">
+</parameter>
+<parameter name="height" type="int">
+</parameter>
+</method>
+<method name="glShaderBinary"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="n" type="int">
+</parameter>
+<parameter name="shaders" type="int[]">
+</parameter>
+<parameter name="offset" type="int">
+</parameter>
+<parameter name="binaryformat" type="int">
+</parameter>
+<parameter name="binary" type="java.nio.Buffer">
+</parameter>
+<parameter name="length" type="int">
+</parameter>
+</method>
+<method name="glShaderBinary"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="n" type="int">
+</parameter>
+<parameter name="shaders" type="java.nio.IntBuffer">
+</parameter>
+<parameter name="binaryformat" type="int">
+</parameter>
+<parameter name="binary" type="java.nio.Buffer">
+</parameter>
+<parameter name="length" type="int">
+</parameter>
+</method>
+<method name="glShaderSource"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="shader" type="int">
+</parameter>
+<parameter name="string" type="java.lang.String">
+</parameter>
+</method>
+<method name="glStencilFunc"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="func" type="int">
+</parameter>
+<parameter name="ref" type="int">
+</parameter>
+<parameter name="mask" type="int">
+</parameter>
+</method>
+<method name="glStencilFuncSeparate"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="face" type="int">
+</parameter>
+<parameter name="func" type="int">
+</parameter>
+<parameter name="ref" type="int">
+</parameter>
+<parameter name="mask" type="int">
+</parameter>
+</method>
+<method name="glStencilMask"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="mask" type="int">
+</parameter>
+</method>
+<method name="glStencilMaskSeparate"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="face" type="int">
+</parameter>
+<parameter name="mask" type="int">
+</parameter>
+</method>
+<method name="glStencilOp"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="fail" type="int">
+</parameter>
+<parameter name="zfail" type="int">
+</parameter>
+<parameter name="zpass" type="int">
+</parameter>
+</method>
+<method name="glStencilOpSeparate"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="face" type="int">
+</parameter>
+<parameter name="fail" type="int">
+</parameter>
+<parameter name="zfail" type="int">
+</parameter>
+<parameter name="zpass" type="int">
+</parameter>
+</method>
+<method name="glTexImage2D"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="target" type="int">
+</parameter>
+<parameter name="level" type="int">
+</parameter>
+<parameter name="internalformat" type="int">
+</parameter>
+<parameter name="width" type="int">
+</parameter>
+<parameter name="height" type="int">
+</parameter>
+<parameter name="border" type="int">
+</parameter>
+<parameter name="format" type="int">
+</parameter>
+<parameter name="type" type="int">
+</parameter>
+<parameter name="pixels" type="java.nio.Buffer">
+</parameter>
+</method>
+<method name="glTexParameterf"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="target" type="int">
+</parameter>
+<parameter name="pname" type="int">
+</parameter>
+<parameter name="param" type="float">
+</parameter>
+</method>
+<method name="glTexParameterfv"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="target" type="int">
+</parameter>
+<parameter name="pname" type="int">
+</parameter>
+<parameter name="params" type="float[]">
+</parameter>
+<parameter name="offset" type="int">
+</parameter>
+</method>
+<method name="glTexParameterfv"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="target" type="int">
+</parameter>
+<parameter name="pname" type="int">
+</parameter>
+<parameter name="params" type="java.nio.FloatBuffer">
+</parameter>
+</method>
+<method name="glTexParameteri"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="target" type="int">
+</parameter>
+<parameter name="pname" type="int">
+</parameter>
+<parameter name="param" type="int">
+</parameter>
+</method>
+<method name="glTexParameteriv"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="target" type="int">
+</parameter>
+<parameter name="pname" type="int">
+</parameter>
+<parameter name="params" type="int[]">
+</parameter>
+<parameter name="offset" type="int">
+</parameter>
+</method>
+<method name="glTexParameteriv"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="target" type="int">
+</parameter>
+<parameter name="pname" type="int">
+</parameter>
+<parameter name="params" type="java.nio.IntBuffer">
+</parameter>
+</method>
+<method name="glTexSubImage2D"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="target" type="int">
+</parameter>
+<parameter name="level" type="int">
+</parameter>
+<parameter name="xoffset" type="int">
+</parameter>
+<parameter name="yoffset" type="int">
+</parameter>
+<parameter name="width" type="int">
+</parameter>
+<parameter name="height" type="int">
+</parameter>
+<parameter name="format" type="int">
+</parameter>
+<parameter name="type" type="int">
+</parameter>
+<parameter name="pixels" type="java.nio.Buffer">
+</parameter>
+</method>
+<method name="glUniform1f"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="location" type="int">
+</parameter>
+<parameter name="x" type="float">
+</parameter>
+</method>
+<method name="glUniform1fv"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="location" type="int">
+</parameter>
+<parameter name="count" type="int">
+</parameter>
+<parameter name="v" type="float[]">
+</parameter>
+<parameter name="offset" type="int">
+</parameter>
+</method>
+<method name="glUniform1fv"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="location" type="int">
+</parameter>
+<parameter name="count" type="int">
+</parameter>
+<parameter name="v" type="java.nio.FloatBuffer">
+</parameter>
+</method>
+<method name="glUniform1i"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="location" type="int">
+</parameter>
+<parameter name="x" type="int">
+</parameter>
+</method>
+<method name="glUniform1iv"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="location" type="int">
+</parameter>
+<parameter name="count" type="int">
+</parameter>
+<parameter name="v" type="int[]">
+</parameter>
+<parameter name="offset" type="int">
+</parameter>
+</method>
+<method name="glUniform1iv"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="location" type="int">
+</parameter>
+<parameter name="count" type="int">
+</parameter>
+<parameter name="v" type="java.nio.IntBuffer">
+</parameter>
+</method>
+<method name="glUniform2f"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="location" type="int">
+</parameter>
+<parameter name="x" type="float">
+</parameter>
+<parameter name="y" type="float">
+</parameter>
+</method>
+<method name="glUniform2fv"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="location" type="int">
+</parameter>
+<parameter name="count" type="int">
+</parameter>
+<parameter name="v" type="float[]">
+</parameter>
+<parameter name="offset" type="int">
+</parameter>
+</method>
+<method name="glUniform2fv"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="location" type="int">
+</parameter>
+<parameter name="count" type="int">
+</parameter>
+<parameter name="v" type="java.nio.FloatBuffer">
+</parameter>
+</method>
+<method name="glUniform2i"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="location" type="int">
+</parameter>
+<parameter name="x" type="int">
+</parameter>
+<parameter name="y" type="int">
+</parameter>
+</method>
+<method name="glUniform2iv"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="location" type="int">
+</parameter>
+<parameter name="count" type="int">
+</parameter>
+<parameter name="v" type="int[]">
+</parameter>
+<parameter name="offset" type="int">
+</parameter>
+</method>
+<method name="glUniform2iv"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="location" type="int">
+</parameter>
+<parameter name="count" type="int">
+</parameter>
+<parameter name="v" type="java.nio.IntBuffer">
+</parameter>
+</method>
+<method name="glUniform3f"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="location" type="int">
+</parameter>
+<parameter name="x" type="float">
+</parameter>
+<parameter name="y" type="float">
+</parameter>
+<parameter name="z" type="float">
+</parameter>
+</method>
+<method name="glUniform3fv"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="location" type="int">
+</parameter>
+<parameter name="count" type="int">
+</parameter>
+<parameter name="v" type="float[]">
+</parameter>
+<parameter name="offset" type="int">
+</parameter>
+</method>
+<method name="glUniform3fv"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="location" type="int">
+</parameter>
+<parameter name="count" type="int">
+</parameter>
+<parameter name="v" type="java.nio.FloatBuffer">
+</parameter>
+</method>
+<method name="glUniform3i"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="location" type="int">
+</parameter>
+<parameter name="x" type="int">
+</parameter>
+<parameter name="y" type="int">
+</parameter>
+<parameter name="z" type="int">
+</parameter>
+</method>
+<method name="glUniform3iv"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="location" type="int">
+</parameter>
+<parameter name="count" type="int">
+</parameter>
+<parameter name="v" type="int[]">
+</parameter>
+<parameter name="offset" type="int">
+</parameter>
+</method>
+<method name="glUniform3iv"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="location" type="int">
+</parameter>
+<parameter name="count" type="int">
+</parameter>
+<parameter name="v" type="java.nio.IntBuffer">
+</parameter>
+</method>
+<method name="glUniform4f"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="location" type="int">
+</parameter>
+<parameter name="x" type="float">
+</parameter>
+<parameter name="y" type="float">
+</parameter>
+<parameter name="z" type="float">
+</parameter>
+<parameter name="w" type="float">
+</parameter>
+</method>
+<method name="glUniform4fv"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="location" type="int">
+</parameter>
+<parameter name="count" type="int">
+</parameter>
+<parameter name="v" type="float[]">
+</parameter>
+<parameter name="offset" type="int">
+</parameter>
+</method>
+<method name="glUniform4fv"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="location" type="int">
+</parameter>
+<parameter name="count" type="int">
+</parameter>
+<parameter name="v" type="java.nio.FloatBuffer">
+</parameter>
+</method>
+<method name="glUniform4i"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="location" type="int">
+</parameter>
+<parameter name="x" type="int">
+</parameter>
+<parameter name="y" type="int">
+</parameter>
+<parameter name="z" type="int">
+</parameter>
+<parameter name="w" type="int">
+</parameter>
+</method>
+<method name="glUniform4iv"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="location" type="int">
+</parameter>
+<parameter name="count" type="int">
+</parameter>
+<parameter name="v" type="int[]">
+</parameter>
+<parameter name="offset" type="int">
+</parameter>
+</method>
+<method name="glUniform4iv"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="location" type="int">
+</parameter>
+<parameter name="count" type="int">
+</parameter>
+<parameter name="v" type="java.nio.IntBuffer">
+</parameter>
+</method>
+<method name="glUniformMatrix2fv"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="location" type="int">
+</parameter>
+<parameter name="count" type="int">
+</parameter>
+<parameter name="transpose" type="boolean">
+</parameter>
+<parameter name="value" type="float[]">
+</parameter>
+<parameter name="offset" type="int">
+</parameter>
+</method>
+<method name="glUniformMatrix2fv"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="location" type="int">
+</parameter>
+<parameter name="count" type="int">
+</parameter>
+<parameter name="transpose" type="boolean">
+</parameter>
+<parameter name="value" type="java.nio.FloatBuffer">
+</parameter>
+</method>
+<method name="glUniformMatrix3fv"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="location" type="int">
+</parameter>
+<parameter name="count" type="int">
+</parameter>
+<parameter name="transpose" type="boolean">
+</parameter>
+<parameter name="value" type="float[]">
+</parameter>
+<parameter name="offset" type="int">
+</parameter>
+</method>
+<method name="glUniformMatrix3fv"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="location" type="int">
+</parameter>
+<parameter name="count" type="int">
+</parameter>
+<parameter name="transpose" type="boolean">
+</parameter>
+<parameter name="value" type="java.nio.FloatBuffer">
+</parameter>
+</method>
+<method name="glUniformMatrix4fv"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="location" type="int">
+</parameter>
+<parameter name="count" type="int">
+</parameter>
+<parameter name="transpose" type="boolean">
+</parameter>
+<parameter name="value" type="float[]">
+</parameter>
+<parameter name="offset" type="int">
+</parameter>
+</method>
+<method name="glUniformMatrix4fv"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="location" type="int">
+</parameter>
+<parameter name="count" type="int">
+</parameter>
+<parameter name="transpose" type="boolean">
+</parameter>
+<parameter name="value" type="java.nio.FloatBuffer">
+</parameter>
+</method>
+<method name="glUseProgram"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="program" type="int">
+</parameter>
+</method>
+<method name="glValidateProgram"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="program" type="int">
+</parameter>
+</method>
+<method name="glVertexAttrib1f"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="indx" type="int">
+</parameter>
+<parameter name="x" type="float">
+</parameter>
+</method>
+<method name="glVertexAttrib1fv"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="indx" type="int">
+</parameter>
+<parameter name="values" type="float[]">
+</parameter>
+<parameter name="offset" type="int">
+</parameter>
+</method>
+<method name="glVertexAttrib1fv"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="indx" type="int">
+</parameter>
+<parameter name="values" type="java.nio.FloatBuffer">
+</parameter>
+</method>
+<method name="glVertexAttrib2f"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="indx" type="int">
+</parameter>
+<parameter name="x" type="float">
+</parameter>
+<parameter name="y" type="float">
+</parameter>
+</method>
+<method name="glVertexAttrib2fv"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="indx" type="int">
+</parameter>
+<parameter name="values" type="float[]">
+</parameter>
+<parameter name="offset" type="int">
+</parameter>
+</method>
+<method name="glVertexAttrib2fv"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="indx" type="int">
+</parameter>
+<parameter name="values" type="java.nio.FloatBuffer">
+</parameter>
+</method>
+<method name="glVertexAttrib3f"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="indx" type="int">
+</parameter>
+<parameter name="x" type="float">
+</parameter>
+<parameter name="y" type="float">
+</parameter>
+<parameter name="z" type="float">
+</parameter>
+</method>
+<method name="glVertexAttrib3fv"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="indx" type="int">
+</parameter>
+<parameter name="values" type="float[]">
+</parameter>
+<parameter name="offset" type="int">
+</parameter>
+</method>
+<method name="glVertexAttrib3fv"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="indx" type="int">
+</parameter>
+<parameter name="values" type="java.nio.FloatBuffer">
+</parameter>
+</method>
+<method name="glVertexAttrib4f"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="indx" type="int">
+</parameter>
+<parameter name="x" type="float">
+</parameter>
+<parameter name="y" type="float">
+</parameter>
+<parameter name="z" type="float">
+</parameter>
+<parameter name="w" type="float">
+</parameter>
+</method>
+<method name="glVertexAttrib4fv"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="indx" type="int">
+</parameter>
+<parameter name="values" type="float[]">
+</parameter>
+<parameter name="offset" type="int">
+</parameter>
+</method>
+<method name="glVertexAttrib4fv"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="indx" type="int">
+</parameter>
+<parameter name="values" type="java.nio.FloatBuffer">
+</parameter>
+</method>
+<method name="glVertexAttribPointer"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="indx" type="int">
+</parameter>
+<parameter name="size" type="int">
+</parameter>
+<parameter name="type" type="int">
+</parameter>
+<parameter name="normalized" type="boolean">
+</parameter>
+<parameter name="stride" type="int">
+</parameter>
+<parameter name="ptr" type="java.nio.Buffer">
+</parameter>
+</method>
+<method name="glViewport"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="x" type="int">
+</parameter>
+<parameter name="y" type="int">
+</parameter>
+<parameter name="width" type="int">
+</parameter>
+<parameter name="height" type="int">
+</parameter>
+</method>
+<field name="GL_ACTIVE_ATTRIBUTES"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="35721"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_ACTIVE_ATTRIBUTE_MAX_LENGTH"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="35722"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_ACTIVE_TEXTURE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="34016"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_ACTIVE_UNIFORMS"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="35718"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_ACTIVE_UNIFORM_MAX_LENGTH"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="35719"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_ALIASED_LINE_WIDTH_RANGE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="33902"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_ALIASED_POINT_SIZE_RANGE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="33901"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_ALPHA"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="6406"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_ALPHA_BITS"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="3413"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_ALWAYS"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="519"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_ARRAY_BUFFER"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="34962"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_ARRAY_BUFFER_BINDING"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="34964"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_ATTACHED_SHADERS"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="35717"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_BACK"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1029"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_BLEND"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="3042"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_BLEND_COLOR"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="32773"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_BLEND_DST_ALPHA"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="32970"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_BLEND_DST_RGB"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="32968"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_BLEND_EQUATION"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="32777"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_BLEND_EQUATION_ALPHA"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="34877"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_BLEND_EQUATION_RGB"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="32777"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_BLEND_SRC_ALPHA"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="32971"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_BLEND_SRC_RGB"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="32969"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_BLUE_BITS"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="3412"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_BOOL"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="35670"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_BOOL_VEC2"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="35671"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_BOOL_VEC3"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="35672"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_BOOL_VEC4"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="35673"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_BUFFER_SIZE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="34660"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_BUFFER_USAGE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="34661"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_BYTE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="5120"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_CCW"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2305"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_CLAMP_TO_EDGE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="33071"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_COLOR_ATTACHMENT0"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="36064"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_COLOR_BUFFER_BIT"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16384"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_COLOR_CLEAR_VALUE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="3106"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_COLOR_WRITEMASK"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="3107"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_COMPILE_STATUS"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="35713"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_COMPRESSED_TEXTURE_FORMATS"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="34467"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_CONSTANT_ALPHA"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="32771"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_CONSTANT_COLOR"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="32769"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_CULL_FACE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2884"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_CULL_FACE_MODE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2885"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_CURRENT_PROGRAM"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="35725"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_CURRENT_VERTEX_ATTRIB"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="34342"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_CW"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2304"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_DECR"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="7683"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_DECR_WRAP"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="34056"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_DELETE_STATUS"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="35712"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_DEPTH_ATTACHMENT"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="36096"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_DEPTH_BITS"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="3414"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_DEPTH_BUFFER_BIT"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="256"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_DEPTH_CLEAR_VALUE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2931"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_DEPTH_COMPONENT"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="6402"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_DEPTH_COMPONENT16"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="33189"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_DEPTH_FUNC"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2932"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_DEPTH_RANGE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2928"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_DEPTH_TEST"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2929"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_DEPTH_WRITEMASK"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2930"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_DITHER"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="3024"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_DONT_CARE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="4352"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_DST_ALPHA"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="772"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_DST_COLOR"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="774"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_DYNAMIC_DRAW"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="35048"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_ELEMENT_ARRAY_BUFFER"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="34963"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_ELEMENT_ARRAY_BUFFER_BINDING"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="34965"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_EQUAL"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="514"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_EXTENSIONS"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="7939"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_FALSE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="0"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_FASTEST"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="4353"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_FIXED"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="5132"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_FLOAT"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="5126"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_FLOAT_MAT2"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="35674"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_FLOAT_MAT3"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="35675"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_FLOAT_MAT4"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="35676"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_FLOAT_VEC2"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="35664"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_FLOAT_VEC3"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="35665"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_FLOAT_VEC4"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="35666"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_FRAGMENT_SHADER"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="35632"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_FRAMEBUFFER"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="36160"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="36049"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="36048"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="36051"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="36050"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_FRAMEBUFFER_BINDING"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="36006"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_FRAMEBUFFER_COMPLETE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="36053"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="36054"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="36057"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="36055"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_FRAMEBUFFER_UNSUPPORTED"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="36061"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_FRONT"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1028"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_FRONT_AND_BACK"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1032"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_FRONT_FACE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2886"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_FUNC_ADD"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="32774"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_FUNC_REVERSE_SUBTRACT"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="32779"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_FUNC_SUBTRACT"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="32778"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_GENERATE_MIPMAP_HINT"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="33170"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_GEQUAL"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="518"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_GREATER"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="516"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_GREEN_BITS"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="3411"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_HIGH_FLOAT"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="36338"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_HIGH_INT"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="36341"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_IMPLEMENTATION_COLOR_READ_FORMAT"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="35739"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_IMPLEMENTATION_COLOR_READ_TYPE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="35738"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_INCR"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="7682"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_INCR_WRAP"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="34055"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_INFO_LOG_LENGTH"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="35716"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_INT"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="5124"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_INT_VEC2"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="35667"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_INT_VEC3"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="35668"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_INT_VEC4"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="35669"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_INVALID_ENUM"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1280"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_INVALID_FRAMEBUFFER_OPERATION"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1286"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_INVALID_OPERATION"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1282"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_INVALID_VALUE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1281"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_INVERT"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="5386"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_KEEP"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="7680"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_LEQUAL"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="515"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_LESS"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="513"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_LINEAR"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="9729"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_LINEAR_MIPMAP_LINEAR"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="9987"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_LINEAR_MIPMAP_NEAREST"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="9985"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_LINES"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_LINE_LOOP"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_LINE_STRIP"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="3"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_LINE_WIDTH"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2849"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_LINK_STATUS"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="35714"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_LOW_FLOAT"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="36336"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_LOW_INT"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="36339"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_LUMINANCE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="6409"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_LUMINANCE_ALPHA"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="6410"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="35661"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_MAX_CUBE_MAP_TEXTURE_SIZE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="34076"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_MAX_FRAGMENT_UNIFORM_VECTORS"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="36349"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_MAX_RENDERBUFFER_SIZE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="34024"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_MAX_TEXTURE_IMAGE_UNITS"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="34930"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_MAX_TEXTURE_SIZE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="3379"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_MAX_VARYING_VECTORS"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="36348"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_MAX_VERTEX_ATTRIBS"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="34921"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="35660"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_MAX_VERTEX_UNIFORM_VECTORS"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="36347"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_MAX_VIEWPORT_DIMS"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="3386"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_MEDIUM_FLOAT"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="36337"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_MEDIUM_INT"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="36340"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_MIRRORED_REPEAT"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="33648"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_NEAREST"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="9728"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_NEAREST_MIPMAP_LINEAR"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="9986"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_NEAREST_MIPMAP_NEAREST"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="9984"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_NEVER"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="512"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_NICEST"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="4354"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_NONE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="0"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_NOTEQUAL"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="517"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_NO_ERROR"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="0"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_NUM_COMPRESSED_TEXTURE_FORMATS"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="34466"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_NUM_SHADER_BINARY_FORMATS"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="36345"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_ONE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_ONE_MINUS_CONSTANT_ALPHA"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="32772"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_ONE_MINUS_CONSTANT_COLOR"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="32770"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_ONE_MINUS_DST_ALPHA"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="773"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_ONE_MINUS_DST_COLOR"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="775"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_ONE_MINUS_SRC_ALPHA"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="771"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_ONE_MINUS_SRC_COLOR"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="769"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_OUT_OF_MEMORY"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1285"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_PACK_ALIGNMENT"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="3333"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_POINTS"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="0"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_POLYGON_OFFSET_FACTOR"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="32824"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_POLYGON_OFFSET_FILL"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="32823"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_POLYGON_OFFSET_UNITS"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="10752"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_RED_BITS"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="3410"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_RENDERBUFFER"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="36161"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_RENDERBUFFER_ALPHA_SIZE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="36179"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_RENDERBUFFER_BINDING"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="36007"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_RENDERBUFFER_BLUE_SIZE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="36178"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_RENDERBUFFER_DEPTH_SIZE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="36180"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_RENDERBUFFER_GREEN_SIZE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="36177"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_RENDERBUFFER_HEIGHT"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="36163"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_RENDERBUFFER_INTERNAL_FORMAT"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="36164"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_RENDERBUFFER_RED_SIZE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="36176"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_RENDERBUFFER_STENCIL_SIZE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="36181"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_RENDERBUFFER_WIDTH"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="36162"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_RENDERER"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="7937"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_REPEAT"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="10497"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_REPLACE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="7681"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_RGB"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="6407"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_RGB565"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="36194"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_RGB5_A1"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="32855"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_RGBA"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="6408"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_RGBA4"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="32854"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_SAMPLER_2D"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="35678"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_SAMPLER_CUBE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="35680"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_SAMPLES"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="32937"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_SAMPLE_ALPHA_TO_COVERAGE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="32926"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_SAMPLE_BUFFERS"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="32936"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_SAMPLE_COVERAGE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="32928"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_SAMPLE_COVERAGE_INVERT"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="32939"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_SAMPLE_COVERAGE_VALUE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="32938"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_SCISSOR_BOX"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="3088"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_SCISSOR_TEST"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="3089"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_SHADER_BINARY_FORMATS"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="36344"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_SHADER_COMPILER"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="36346"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_SHADER_SOURCE_LENGTH"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="35720"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_SHADER_TYPE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="35663"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_SHADING_LANGUAGE_VERSION"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="35724"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_SHORT"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="5122"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_SRC_ALPHA"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="770"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_SRC_ALPHA_SATURATE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="776"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_SRC_COLOR"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="768"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_STATIC_DRAW"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="35044"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_STENCIL_ATTACHMENT"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="36128"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_STENCIL_BACK_FAIL"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="34817"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_STENCIL_BACK_FUNC"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="34816"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_STENCIL_BACK_PASS_DEPTH_FAIL"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="34818"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_STENCIL_BACK_PASS_DEPTH_PASS"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="34819"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_STENCIL_BACK_REF"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="36003"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_STENCIL_BACK_VALUE_MASK"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="36004"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_STENCIL_BACK_WRITEMASK"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="36005"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_STENCIL_BITS"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="3415"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_STENCIL_BUFFER_BIT"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1024"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_STENCIL_CLEAR_VALUE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2961"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_STENCIL_FAIL"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2964"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_STENCIL_FUNC"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2962"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_STENCIL_INDEX"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="6401"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_STENCIL_INDEX8"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="36168"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_STENCIL_PASS_DEPTH_FAIL"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2965"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_STENCIL_PASS_DEPTH_PASS"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2966"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_STENCIL_REF"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2967"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_STENCIL_TEST"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2960"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_STENCIL_VALUE_MASK"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2963"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_STENCIL_WRITEMASK"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2968"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_STREAM_DRAW"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="35040"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_SUBPIXEL_BITS"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="3408"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_TEXTURE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="5890"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_TEXTURE0"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="33984"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_TEXTURE1"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="33985"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_TEXTURE10"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="33994"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_TEXTURE11"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="33995"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_TEXTURE12"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="33996"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_TEXTURE13"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="33997"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_TEXTURE14"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="33998"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_TEXTURE15"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="33999"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_TEXTURE16"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="34000"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_TEXTURE17"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="34001"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_TEXTURE18"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="34002"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_TEXTURE19"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="34003"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_TEXTURE2"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="33986"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_TEXTURE20"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="34004"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_TEXTURE21"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="34005"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_TEXTURE22"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="34006"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_TEXTURE23"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="34007"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_TEXTURE24"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="34008"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_TEXTURE25"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="34009"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_TEXTURE26"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="34010"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_TEXTURE27"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="34011"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_TEXTURE28"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="34012"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_TEXTURE29"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="34013"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_TEXTURE3"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="33987"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_TEXTURE30"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="34014"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_TEXTURE31"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="34015"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_TEXTURE4"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="33988"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_TEXTURE5"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="33989"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_TEXTURE6"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="33990"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_TEXTURE7"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="33991"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_TEXTURE8"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="33992"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_TEXTURE9"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="33993"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_TEXTURE_2D"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="3553"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_TEXTURE_BINDING_2D"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="32873"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_TEXTURE_BINDING_CUBE_MAP"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="34068"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_TEXTURE_CUBE_MAP"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="34067"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_TEXTURE_CUBE_MAP_NEGATIVE_X"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="34070"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_TEXTURE_CUBE_MAP_NEGATIVE_Y"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="34072"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_TEXTURE_CUBE_MAP_NEGATIVE_Z"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="34074"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_TEXTURE_CUBE_MAP_POSITIVE_X"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="34069"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_TEXTURE_CUBE_MAP_POSITIVE_Y"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="34071"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_TEXTURE_CUBE_MAP_POSITIVE_Z"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="34073"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_TEXTURE_MAG_FILTER"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="10240"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_TEXTURE_MIN_FILTER"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="10241"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_TEXTURE_WRAP_S"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="10242"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_TEXTURE_WRAP_T"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="10243"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_TRIANGLES"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="4"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_TRIANGLE_FAN"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="6"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_TRIANGLE_STRIP"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="5"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_TRUE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_UNPACK_ALIGNMENT"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="3317"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_UNSIGNED_BYTE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="5121"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_UNSIGNED_INT"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="5125"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_UNSIGNED_SHORT"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="5123"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_UNSIGNED_SHORT_4_4_4_4"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="32819"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_UNSIGNED_SHORT_5_5_5_1"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="32820"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_UNSIGNED_SHORT_5_6_5"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="33635"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_VALIDATE_STATUS"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="35715"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_VENDOR"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="7936"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_VERSION"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="7938"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="34975"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_VERTEX_ATTRIB_ARRAY_ENABLED"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="34338"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_VERTEX_ATTRIB_ARRAY_NORMALIZED"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="34922"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_VERTEX_ATTRIB_ARRAY_POINTER"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="34373"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_VERTEX_ATTRIB_ARRAY_SIZE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="34339"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_VERTEX_ATTRIB_ARRAY_STRIDE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="34340"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_VERTEX_ATTRIB_ARRAY_TYPE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="34341"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_VERTEX_SHADER"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="35633"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_VIEWPORT"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2978"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_ZERO"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="0"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<class name="GLException"
+ extends="java.lang.RuntimeException"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="GLException"
+ type="android.opengl.GLException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="error" type="int">
+</parameter>
+</constructor>
+<constructor name="GLException"
+ type="android.opengl.GLException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="error" type="int">
+</parameter>
+<parameter name="string" type="java.lang.String">
+</parameter>
+</constructor>
+</class>
+<class name="GLSurfaceView"
+ extends="android.view.SurfaceView"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="android.view.SurfaceHolder.Callback">
+</implements>
+<constructor name="GLSurfaceView"
+ type="android.opengl.GLSurfaceView"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="context" type="android.content.Context">
+</parameter>
+</constructor>
+<constructor name="GLSurfaceView"
+ type="android.opengl.GLSurfaceView"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="context" type="android.content.Context">
+</parameter>
+<parameter name="attrs" type="android.util.AttributeSet">
+</parameter>
+</constructor>
+<method name="getDebugFlags"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getRenderMode"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="onPause"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="onResume"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="queueEvent"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="r" type="java.lang.Runnable">
+</parameter>
+</method>
+<method name="requestRender"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="setDebugFlags"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="debugFlags" type="int">
+</parameter>
+</method>
+<method name="setEGLConfigChooser"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="configChooser" type="android.opengl.GLSurfaceView.EGLConfigChooser">
+</parameter>
+</method>
+<method name="setEGLConfigChooser"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="needDepth" type="boolean">
+</parameter>
+</method>
+<method name="setEGLConfigChooser"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="redSize" type="int">
+</parameter>
+<parameter name="greenSize" type="int">
+</parameter>
+<parameter name="blueSize" type="int">
+</parameter>
+<parameter name="alphaSize" type="int">
+</parameter>
+<parameter name="depthSize" type="int">
+</parameter>
+<parameter name="stencilSize" type="int">
+</parameter>
+</method>
+<method name="setEGLContextClientVersion"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="version" type="int">
+</parameter>
+</method>
+<method name="setEGLContextFactory"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="factory" type="android.opengl.GLSurfaceView.EGLContextFactory">
+</parameter>
+</method>
+<method name="setEGLWindowSurfaceFactory"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="factory" type="android.opengl.GLSurfaceView.EGLWindowSurfaceFactory">
+</parameter>
+</method>
+<method name="setGLWrapper"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="glWrapper" type="android.opengl.GLSurfaceView.GLWrapper">
+</parameter>
+</method>
+<method name="setRenderMode"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="renderMode" type="int">
+</parameter>
+</method>
+<method name="setRenderer"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="renderer" type="android.opengl.GLSurfaceView.Renderer">
+</parameter>
+</method>
+<method name="surfaceChanged"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="holder" type="android.view.SurfaceHolder">
+</parameter>
+<parameter name="format" type="int">
+</parameter>
+<parameter name="w" type="int">
+</parameter>
+<parameter name="h" type="int">
+</parameter>
+</method>
+<method name="surfaceCreated"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="holder" type="android.view.SurfaceHolder">
+</parameter>
+</method>
+<method name="surfaceDestroyed"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="holder" type="android.view.SurfaceHolder">
+</parameter>
+</method>
+<field name="DEBUG_CHECK_GL_ERROR"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="DEBUG_LOG_GL_CALLS"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="RENDERMODE_CONTINUOUSLY"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="RENDERMODE_WHEN_DIRTY"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="0"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<interface name="GLSurfaceView.EGLConfigChooser"
+ abstract="true"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="chooseConfig"
+ return="javax.microedition.khronos.egl.EGLConfig"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="egl" type="javax.microedition.khronos.egl.EGL10">
+</parameter>
+<parameter name="display" type="javax.microedition.khronos.egl.EGLDisplay">
+</parameter>
+</method>
+</interface>
+<interface name="GLSurfaceView.EGLContextFactory"
+ abstract="true"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="createContext"
+ return="javax.microedition.khronos.egl.EGLContext"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="egl" type="javax.microedition.khronos.egl.EGL10">
+</parameter>
+<parameter name="display" type="javax.microedition.khronos.egl.EGLDisplay">
+</parameter>
+<parameter name="eglConfig" type="javax.microedition.khronos.egl.EGLConfig">
+</parameter>
+</method>
+<method name="destroyContext"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="egl" type="javax.microedition.khronos.egl.EGL10">
+</parameter>
+<parameter name="display" type="javax.microedition.khronos.egl.EGLDisplay">
+</parameter>
+<parameter name="context" type="javax.microedition.khronos.egl.EGLContext">
+</parameter>
+</method>
+</interface>
+<interface name="GLSurfaceView.EGLWindowSurfaceFactory"
+ abstract="true"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="createWindowSurface"
+ return="javax.microedition.khronos.egl.EGLSurface"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="egl" type="javax.microedition.khronos.egl.EGL10">
+</parameter>
+<parameter name="display" type="javax.microedition.khronos.egl.EGLDisplay">
+</parameter>
+<parameter name="config" type="javax.microedition.khronos.egl.EGLConfig">
+</parameter>
+<parameter name="nativeWindow" type="java.lang.Object">
+</parameter>
+</method>
+<method name="destroySurface"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="egl" type="javax.microedition.khronos.egl.EGL10">
+</parameter>
+<parameter name="display" type="javax.microedition.khronos.egl.EGLDisplay">
+</parameter>
+<parameter name="surface" type="javax.microedition.khronos.egl.EGLSurface">
+</parameter>
+</method>
+</interface>
+<interface name="GLSurfaceView.GLWrapper"
+ abstract="true"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="wrap"
+ return="javax.microedition.khronos.opengles.GL"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="gl" type="javax.microedition.khronos.opengles.GL">
+</parameter>
+</method>
+</interface>
+<interface name="GLSurfaceView.Renderer"
+ abstract="true"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="onDrawFrame"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="gl" type="javax.microedition.khronos.opengles.GL10">
+</parameter>
+</method>
+<method name="onSurfaceChanged"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="gl" type="javax.microedition.khronos.opengles.GL10">
+</parameter>
+<parameter name="width" type="int">
+</parameter>
+<parameter name="height" type="int">
+</parameter>
+</method>
+<method name="onSurfaceCreated"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="gl" type="javax.microedition.khronos.opengles.GL10">
+</parameter>
+<parameter name="config" type="javax.microedition.khronos.egl.EGLConfig">
+</parameter>
+</method>
+</interface>
+<class name="GLU"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="GLU"
+ type="android.opengl.GLU"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<method name="gluErrorString"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="error" type="int">
+</parameter>
+</method>
+<method name="gluLookAt"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="gl" type="javax.microedition.khronos.opengles.GL10">
+</parameter>
+<parameter name="eyeX" type="float">
+</parameter>
+<parameter name="eyeY" type="float">
+</parameter>
+<parameter name="eyeZ" type="float">
+</parameter>
+<parameter name="centerX" type="float">
+</parameter>
+<parameter name="centerY" type="float">
+</parameter>
+<parameter name="centerZ" type="float">
+</parameter>
+<parameter name="upX" type="float">
+</parameter>
+<parameter name="upY" type="float">
+</parameter>
+<parameter name="upZ" type="float">
+</parameter>
+</method>
+<method name="gluOrtho2D"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="gl" type="javax.microedition.khronos.opengles.GL10">
+</parameter>
+<parameter name="left" type="float">
+</parameter>
+<parameter name="right" type="float">
+</parameter>
+<parameter name="bottom" type="float">
+</parameter>
+<parameter name="top" type="float">
+</parameter>
+</method>
+<method name="gluPerspective"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="gl" type="javax.microedition.khronos.opengles.GL10">
+</parameter>
+<parameter name="fovy" type="float">
+</parameter>
+<parameter name="aspect" type="float">
+</parameter>
+<parameter name="zNear" type="float">
+</parameter>
+<parameter name="zFar" type="float">
+</parameter>
+</method>
+<method name="gluProject"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="objX" type="float">
+</parameter>
+<parameter name="objY" type="float">
+</parameter>
+<parameter name="objZ" type="float">
+</parameter>
+<parameter name="model" type="float[]">
+</parameter>
+<parameter name="modelOffset" type="int">
+</parameter>
+<parameter name="project" type="float[]">
+</parameter>
+<parameter name="projectOffset" type="int">
+</parameter>
+<parameter name="view" type="int[]">
+</parameter>
+<parameter name="viewOffset" type="int">
+</parameter>
+<parameter name="win" type="float[]">
+</parameter>
+<parameter name="winOffset" type="int">
+</parameter>
+</method>
+<method name="gluUnProject"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="winX" type="float">
+</parameter>
+<parameter name="winY" type="float">
+</parameter>
+<parameter name="winZ" type="float">
+</parameter>
+<parameter name="model" type="float[]">
+</parameter>
+<parameter name="modelOffset" type="int">
+</parameter>
+<parameter name="project" type="float[]">
+</parameter>
+<parameter name="projectOffset" type="int">
+</parameter>
+<parameter name="view" type="int[]">
+</parameter>
+<parameter name="viewOffset" type="int">
+</parameter>
+<parameter name="obj" type="float[]">
+</parameter>
+<parameter name="objOffset" type="int">
+</parameter>
+</method>
+</class>
+<class name="GLUtils"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="getInternalFormat"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="bitmap" type="android.graphics.Bitmap">
+</parameter>
+</method>
+<method name="getType"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="bitmap" type="android.graphics.Bitmap">
+</parameter>
+</method>
+<method name="texImage2D"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="target" type="int">
+</parameter>
+<parameter name="level" type="int">
+</parameter>
+<parameter name="internalformat" type="int">
+</parameter>
+<parameter name="bitmap" type="android.graphics.Bitmap">
+</parameter>
+<parameter name="border" type="int">
+</parameter>
+</method>
+<method name="texImage2D"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="target" type="int">
+</parameter>
+<parameter name="level" type="int">
+</parameter>
+<parameter name="internalformat" type="int">
+</parameter>
+<parameter name="bitmap" type="android.graphics.Bitmap">
+</parameter>
+<parameter name="type" type="int">
+</parameter>
+<parameter name="border" type="int">
+</parameter>
+</method>
+<method name="texImage2D"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="target" type="int">
+</parameter>
+<parameter name="level" type="int">
+</parameter>
+<parameter name="bitmap" type="android.graphics.Bitmap">
+</parameter>
+<parameter name="border" type="int">
+</parameter>
+</method>
+<method name="texSubImage2D"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="target" type="int">
+</parameter>
+<parameter name="level" type="int">
+</parameter>
+<parameter name="xoffset" type="int">
+</parameter>
+<parameter name="yoffset" type="int">
+</parameter>
+<parameter name="bitmap" type="android.graphics.Bitmap">
+</parameter>
+</method>
+<method name="texSubImage2D"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="target" type="int">
+</parameter>
+<parameter name="level" type="int">
+</parameter>
+<parameter name="xoffset" type="int">
+</parameter>
+<parameter name="yoffset" type="int">
+</parameter>
+<parameter name="bitmap" type="android.graphics.Bitmap">
+</parameter>
+<parameter name="format" type="int">
+</parameter>
+<parameter name="type" type="int">
+</parameter>
+</method>
+</class>
+<class name="Matrix"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="Matrix"
+ type="android.opengl.Matrix"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<method name="frustumM"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="m" type="float[]">
+</parameter>
+<parameter name="offset" type="int">
+</parameter>
+<parameter name="left" type="float">
+</parameter>
+<parameter name="right" type="float">
+</parameter>
+<parameter name="bottom" type="float">
+</parameter>
+<parameter name="top" type="float">
+</parameter>
+<parameter name="near" type="float">
+</parameter>
+<parameter name="far" type="float">
+</parameter>
+</method>
+<method name="invertM"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="mInv" type="float[]">
+</parameter>
+<parameter name="mInvOffset" type="int">
+</parameter>
+<parameter name="m" type="float[]">
+</parameter>
+<parameter name="mOffset" type="int">
+</parameter>
+</method>
+<method name="length"
+ return="float"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="x" type="float">
+</parameter>
+<parameter name="y" type="float">
+</parameter>
+<parameter name="z" type="float">
+</parameter>
+</method>
+<method name="multiplyMM"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="result" type="float[]">
+</parameter>
+<parameter name="resultOffset" type="int">
+</parameter>
+<parameter name="lhs" type="float[]">
+</parameter>
+<parameter name="lhsOffset" type="int">
+</parameter>
+<parameter name="rhs" type="float[]">
+</parameter>
+<parameter name="rhsOffset" type="int">
+</parameter>
+</method>
+<method name="multiplyMV"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="resultVec" type="float[]">
+</parameter>
+<parameter name="resultVecOffset" type="int">
+</parameter>
+<parameter name="lhsMat" type="float[]">
+</parameter>
+<parameter name="lhsMatOffset" type="int">
+</parameter>
+<parameter name="rhsVec" type="float[]">
+</parameter>
+<parameter name="rhsVecOffset" type="int">
+</parameter>
+</method>
+<method name="orthoM"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="m" type="float[]">
+</parameter>
+<parameter name="mOffset" type="int">
+</parameter>
+<parameter name="left" type="float">
+</parameter>
+<parameter name="right" type="float">
+</parameter>
+<parameter name="bottom" type="float">
+</parameter>
+<parameter name="top" type="float">
+</parameter>
+<parameter name="near" type="float">
+</parameter>
+<parameter name="far" type="float">
+</parameter>
+</method>
+<method name="rotateM"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="rm" type="float[]">
+</parameter>
+<parameter name="rmOffset" type="int">
+</parameter>
+<parameter name="m" type="float[]">
+</parameter>
+<parameter name="mOffset" type="int">
+</parameter>
+<parameter name="a" type="float">
+</parameter>
+<parameter name="x" type="float">
+</parameter>
+<parameter name="y" type="float">
+</parameter>
+<parameter name="z" type="float">
+</parameter>
+</method>
+<method name="rotateM"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="m" type="float[]">
+</parameter>
+<parameter name="mOffset" type="int">
+</parameter>
+<parameter name="a" type="float">
+</parameter>
+<parameter name="x" type="float">
+</parameter>
+<parameter name="y" type="float">
+</parameter>
+<parameter name="z" type="float">
+</parameter>
+</method>
+<method name="scaleM"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="sm" type="float[]">
+</parameter>
+<parameter name="smOffset" type="int">
+</parameter>
+<parameter name="m" type="float[]">
+</parameter>
+<parameter name="mOffset" type="int">
+</parameter>
+<parameter name="x" type="float">
+</parameter>
+<parameter name="y" type="float">
+</parameter>
+<parameter name="z" type="float">
+</parameter>
+</method>
+<method name="scaleM"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="m" type="float[]">
+</parameter>
+<parameter name="mOffset" type="int">
+</parameter>
+<parameter name="x" type="float">
+</parameter>
+<parameter name="y" type="float">
+</parameter>
+<parameter name="z" type="float">
+</parameter>
+</method>
+<method name="setIdentityM"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="sm" type="float[]">
+</parameter>
+<parameter name="smOffset" type="int">
+</parameter>
+</method>
+<method name="setLookAtM"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="rm" type="float[]">
+</parameter>
+<parameter name="rmOffset" type="int">
+</parameter>
+<parameter name="eyeX" type="float">
+</parameter>
+<parameter name="eyeY" type="float">
+</parameter>
+<parameter name="eyeZ" type="float">
+</parameter>
+<parameter name="centerX" type="float">
+</parameter>
+<parameter name="centerY" type="float">
+</parameter>
+<parameter name="centerZ" type="float">
+</parameter>
+<parameter name="upX" type="float">
+</parameter>
+<parameter name="upY" type="float">
+</parameter>
+<parameter name="upZ" type="float">
+</parameter>
+</method>
+<method name="setRotateEulerM"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="rm" type="float[]">
+</parameter>
+<parameter name="rmOffset" type="int">
+</parameter>
+<parameter name="x" type="float">
+</parameter>
+<parameter name="y" type="float">
+</parameter>
+<parameter name="z" type="float">
+</parameter>
+</method>
+<method name="setRotateM"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="rm" type="float[]">
+</parameter>
+<parameter name="rmOffset" type="int">
+</parameter>
+<parameter name="a" type="float">
+</parameter>
+<parameter name="x" type="float">
+</parameter>
+<parameter name="y" type="float">
+</parameter>
+<parameter name="z" type="float">
+</parameter>
+</method>
+<method name="translateM"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="tm" type="float[]">
+</parameter>
+<parameter name="tmOffset" type="int">
+</parameter>
+<parameter name="m" type="float[]">
+</parameter>
+<parameter name="mOffset" type="int">
+</parameter>
+<parameter name="x" type="float">
+</parameter>
+<parameter name="y" type="float">
+</parameter>
+<parameter name="z" type="float">
+</parameter>
+</method>
+<method name="translateM"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="m" type="float[]">
+</parameter>
+<parameter name="mOffset" type="int">
+</parameter>
+<parameter name="x" type="float">
+</parameter>
+<parameter name="y" type="float">
+</parameter>
+<parameter name="z" type="float">
+</parameter>
+</method>
+<method name="transposeM"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="mTrans" type="float[]">
+</parameter>
+<parameter name="mTransOffset" type="int">
+</parameter>
+<parameter name="m" type="float[]">
+</parameter>
+<parameter name="mOffset" type="int">
+</parameter>
+</method>
+</class>
+<class name="Visibility"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="Visibility"
+ type="android.opengl.Visibility"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<method name="computeBoundingSphere"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="positions" type="float[]">
+</parameter>
+<parameter name="positionsOffset" type="int">
+</parameter>
+<parameter name="positionsCount" type="int">
+</parameter>
+<parameter name="sphere" type="float[]">
+</parameter>
+<parameter name="sphereOffset" type="int">
+</parameter>
+</method>
+<method name="frustumCullSpheres"
+ return="int"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="mvp" type="float[]">
+</parameter>
+<parameter name="mvpOffset" type="int">
+</parameter>
+<parameter name="spheres" type="float[]">
+</parameter>
+<parameter name="spheresOffset" type="int">
+</parameter>
+<parameter name="spheresCount" type="int">
+</parameter>
+<parameter name="results" type="int[]">
+</parameter>
+<parameter name="resultsOffset" type="int">
+</parameter>
+<parameter name="resultsCapacity" type="int">
+</parameter>
+</method>
+<method name="visibilityTest"
+ return="int"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="ws" type="float[]">
+</parameter>
+<parameter name="wsOffset" type="int">
+</parameter>
+<parameter name="positions" type="float[]">
+</parameter>
+<parameter name="positionsOffset" type="int">
+</parameter>
+<parameter name="indices" type="char[]">
+</parameter>
+<parameter name="indicesOffset" type="int">
+</parameter>
+<parameter name="indexCount" type="int">
+</parameter>
+</method>
+</class>
+</package>
+<package name="android.os"
+>
+<class name="AsyncTask"
+ extends="java.lang.Object"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="AsyncTask"
+ type="android.os.AsyncTask"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<method name="cancel"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="mayInterruptIfRunning" type="boolean">
+</parameter>
+</method>
+<method name="doInBackground"
+ return="Result"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="params" type="Params...">
+</parameter>
+</method>
+<method name="execute"
+ return="android.os.AsyncTask&lt;Params, Progress, Result&gt;"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="params" type="Params...">
+</parameter>
+</method>
+<method name="get"
+ return="Result"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="ExecutionException" type="java.util.concurrent.ExecutionException">
+</exception>
+<exception name="InterruptedException" type="java.lang.InterruptedException">
+</exception>
+</method>
+<method name="get"
+ return="Result"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="timeout" type="long">
+</parameter>
+<parameter name="unit" type="java.util.concurrent.TimeUnit">
+</parameter>
+<exception name="ExecutionException" type="java.util.concurrent.ExecutionException">
+</exception>
+<exception name="InterruptedException" type="java.lang.InterruptedException">
+</exception>
+<exception name="TimeoutException" type="java.util.concurrent.TimeoutException">
+</exception>
+</method>
+<method name="getStatus"
+ return="android.os.AsyncTask.Status"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isCancelled"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="onCancelled"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</method>
+<method name="onPostExecute"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="result" type="Result">
+</parameter>
+</method>
+<method name="onPreExecute"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</method>
+<method name="onProgressUpdate"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="values" type="Progress...">
+</parameter>
+</method>
+<method name="publishProgress"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="values" type="Progress...">
+</parameter>
+</method>
+</class>
+<class name="AsyncTask.Status"
+ extends="java.lang.Enum"
+ abstract="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="valueOf"
+ return="android.os.AsyncTask.Status"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+</method>
+<method name="values"
+ return="android.os.AsyncTask.Status[]"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+</class>
+<class name="BadParcelableException"
+ extends="android.util.AndroidRuntimeException"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="BadParcelableException"
+ type="android.os.BadParcelableException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="msg" type="java.lang.String">
+</parameter>
+</constructor>
+<constructor name="BadParcelableException"
+ type="android.os.BadParcelableException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="cause" type="java.lang.Exception">
+</parameter>
+</constructor>
+</class>
+<class name="BatteryManager"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="BatteryManager"
+ type="android.os.BatteryManager"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<field name="BATTERY_HEALTH_DEAD"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="4"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="BATTERY_HEALTH_GOOD"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="BATTERY_HEALTH_OVERHEAT"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="3"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="BATTERY_HEALTH_OVER_VOLTAGE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="5"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="BATTERY_HEALTH_UNKNOWN"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="BATTERY_HEALTH_UNSPECIFIED_FAILURE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="6"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="BATTERY_PLUGGED_AC"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="BATTERY_PLUGGED_USB"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="BATTERY_STATUS_CHARGING"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="BATTERY_STATUS_DISCHARGING"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="3"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="BATTERY_STATUS_FULL"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="5"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="BATTERY_STATUS_NOT_CHARGING"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="4"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="BATTERY_STATUS_UNKNOWN"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="EXTRA_HEALTH"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;health&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="EXTRA_ICON_SMALL"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;icon-small&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="EXTRA_LEVEL"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;level&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="EXTRA_PLUGGED"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;plugged&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="EXTRA_PRESENT"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;present&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="EXTRA_SCALE"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;scale&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="EXTRA_STATUS"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;status&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="EXTRA_TECHNOLOGY"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;technology&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="EXTRA_TEMPERATURE"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;temperature&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="EXTRA_VOLTAGE"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;voltage&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<class name="Binder"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="android.os.IBinder">
+</implements>
+<constructor name="Binder"
+ type="android.os.Binder"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<method name="attachInterface"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="owner" type="android.os.IInterface">
+</parameter>
+<parameter name="descriptor" type="java.lang.String">
+</parameter>
+</method>
+<method name="clearCallingIdentity"
+ return="long"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="dump"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="fd" type="java.io.FileDescriptor">
+</parameter>
+<parameter name="args" type="java.lang.String[]">
+</parameter>
+</method>
+<method name="dump"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="fd" type="java.io.FileDescriptor">
+</parameter>
+<parameter name="fout" type="java.io.PrintWriter">
+</parameter>
+<parameter name="args" type="java.lang.String[]">
+</parameter>
+</method>
+<method name="flushPendingCommands"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getCallingPid"
+ return="int"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getCallingUid"
+ return="int"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getInterfaceDescriptor"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isBinderAlive"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="joinThreadPool"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="linkToDeath"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="recipient" type="android.os.IBinder.DeathRecipient">
+</parameter>
+<parameter name="flags" type="int">
+</parameter>
+</method>
+<method name="onTransact"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="code" type="int">
+</parameter>
+<parameter name="data" type="android.os.Parcel">
+</parameter>
+<parameter name="reply" type="android.os.Parcel">
+</parameter>
+<parameter name="flags" type="int">
+</parameter>
+<exception name="RemoteException" type="android.os.RemoteException">
+</exception>
+</method>
+<method name="pingBinder"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="queryLocalInterface"
+ return="android.os.IInterface"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="descriptor" type="java.lang.String">
+</parameter>
+</method>
+<method name="restoreCallingIdentity"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="token" type="long">
+</parameter>
+</method>
+<method name="transact"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="code" type="int">
+</parameter>
+<parameter name="data" type="android.os.Parcel">
+</parameter>
+<parameter name="reply" type="android.os.Parcel">
+</parameter>
+<parameter name="flags" type="int">
+</parameter>
+<exception name="RemoteException" type="android.os.RemoteException">
+</exception>
+</method>
+<method name="unlinkToDeath"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="recipient" type="android.os.IBinder.DeathRecipient">
+</parameter>
+<parameter name="flags" type="int">
+</parameter>
+</method>
+</class>
+<class name="Build"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="Build"
+ type="android.os.Build"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<field name="BOARD"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="BOOTLOADER"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="BRAND"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="CPU_ABI"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="CPU_ABI2"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="DEVICE"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="DISPLAY"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="FINGERPRINT"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="HARDWARE"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="HOST"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ID"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="MANUFACTURER"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="MODEL"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="PRODUCT"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="RADIO"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TAGS"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TIME"
+ type="long"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TYPE"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="UNKNOWN"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;unknown&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="USER"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<class name="Build.VERSION"
+ extends="java.lang.Object"
+ abstract="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="Build.VERSION"
+ type="android.os.Build.VERSION"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<field name="CODENAME"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="INCREMENTAL"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="RELEASE"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="SDK"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="deprecated"
+ visibility="public"
+>
+</field>
+<field name="SDK_INT"
+ type="int"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<class name="Build.VERSION_CODES"
+ extends="java.lang.Object"
+ abstract="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="Build.VERSION_CODES"
+ type="android.os.Build.VERSION_CODES"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<field name="BASE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="BASE_1_1"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="CUPCAKE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="3"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="CUR_DEVELOPMENT"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="10000"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="DONUT"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="4"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ECLAIR"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="5"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ECLAIR_0_1"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="6"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ECLAIR_MR1"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="7"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="FROYO"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="8"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<class name="Bundle"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="java.lang.Cloneable">
+</implements>
+<implements name="android.os.Parcelable">
+</implements>
+<constructor name="Bundle"
+ type="android.os.Bundle"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<constructor name="Bundle"
+ type="android.os.Bundle"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="loader" type="java.lang.ClassLoader">
+</parameter>
+</constructor>
+<constructor name="Bundle"
+ type="android.os.Bundle"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="capacity" type="int">
+</parameter>
+</constructor>
+<constructor name="Bundle"
+ type="android.os.Bundle"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="b" type="android.os.Bundle">
+</parameter>
+</constructor>
+<method name="clear"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="clone"
+ return="java.lang.Object"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="containsKey"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="key" type="java.lang.String">
+</parameter>
+</method>
+<method name="describeContents"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="get"
+ return="java.lang.Object"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="key" type="java.lang.String">
+</parameter>
+</method>
+<method name="getBoolean"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="key" type="java.lang.String">
+</parameter>
+</method>
+<method name="getBoolean"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="key" type="java.lang.String">
+</parameter>
+<parameter name="defaultValue" type="boolean">
+</parameter>
+</method>
+<method name="getBooleanArray"
+ return="boolean[]"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="key" type="java.lang.String">
+</parameter>
+</method>
+<method name="getBundle"
+ return="android.os.Bundle"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="key" type="java.lang.String">
+</parameter>
+</method>
+<method name="getByte"
+ return="byte"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="key" type="java.lang.String">
+</parameter>
+</method>
+<method name="getByte"
+ return="java.lang.Byte"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="key" type="java.lang.String">
+</parameter>
+<parameter name="defaultValue" type="byte">
+</parameter>
+</method>
+<method name="getByteArray"
+ return="byte[]"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="key" type="java.lang.String">
+</parameter>
+</method>
+<method name="getChar"
+ return="char"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="key" type="java.lang.String">
+</parameter>
+</method>
+<method name="getChar"
+ return="char"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="key" type="java.lang.String">
+</parameter>
+<parameter name="defaultValue" type="char">
+</parameter>
+</method>
+<method name="getCharArray"
+ return="char[]"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="key" type="java.lang.String">
+</parameter>
+</method>
+<method name="getCharSequence"
+ return="java.lang.CharSequence"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="key" type="java.lang.String">
+</parameter>
+</method>
+<method name="getCharSequenceArray"
+ return="java.lang.CharSequence[]"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="key" type="java.lang.String">
+</parameter>
+</method>
+<method name="getCharSequenceArrayList"
+ return="java.util.ArrayList&lt;java.lang.CharSequence&gt;"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="key" type="java.lang.String">
+</parameter>
+</method>
+<method name="getDouble"
+ return="double"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="key" type="java.lang.String">
+</parameter>
+</method>
+<method name="getDouble"
+ return="double"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="key" type="java.lang.String">
+</parameter>
+<parameter name="defaultValue" type="double">
+</parameter>
+</method>
+<method name="getDoubleArray"
+ return="double[]"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="key" type="java.lang.String">
+</parameter>
+</method>
+<method name="getFloat"
+ return="float"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="key" type="java.lang.String">
+</parameter>
+</method>
+<method name="getFloat"
+ return="float"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="key" type="java.lang.String">
+</parameter>
+<parameter name="defaultValue" type="float">
+</parameter>
+</method>
+<method name="getFloatArray"
+ return="float[]"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="key" type="java.lang.String">
+</parameter>
+</method>
+<method name="getInt"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="key" type="java.lang.String">
+</parameter>
+</method>
+<method name="getInt"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="key" type="java.lang.String">
+</parameter>
+<parameter name="defaultValue" type="int">
+</parameter>
+</method>
+<method name="getIntArray"
+ return="int[]"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="key" type="java.lang.String">
+</parameter>
+</method>
+<method name="getIntegerArrayList"
+ return="java.util.ArrayList&lt;java.lang.Integer&gt;"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="key" type="java.lang.String">
+</parameter>
+</method>
+<method name="getLong"
+ return="long"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="key" type="java.lang.String">
+</parameter>
+</method>
+<method name="getLong"
+ return="long"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="key" type="java.lang.String">
+</parameter>
+<parameter name="defaultValue" type="long">
+</parameter>
+</method>
+<method name="getLongArray"
+ return="long[]"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="key" type="java.lang.String">
+</parameter>
+</method>
+<method name="getParcelable"
+ return="T"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="key" type="java.lang.String">
+</parameter>
+</method>
+<method name="getParcelableArray"
+ return="android.os.Parcelable[]"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="key" type="java.lang.String">
+</parameter>
+</method>
+<method name="getParcelableArrayList"
+ return="java.util.ArrayList&lt;T&gt;"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="key" type="java.lang.String">
+</parameter>
+</method>
+<method name="getSerializable"
+ return="java.io.Serializable"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="key" type="java.lang.String">
+</parameter>
+</method>
+<method name="getShort"
+ return="short"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="key" type="java.lang.String">
+</parameter>
+</method>
+<method name="getShort"
+ return="short"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="key" type="java.lang.String">
+</parameter>
+<parameter name="defaultValue" type="short">
+</parameter>
+</method>
+<method name="getShortArray"
+ return="short[]"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="key" type="java.lang.String">
+</parameter>
+</method>
+<method name="getSparseParcelableArray"
+ return="android.util.SparseArray&lt;T&gt;"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="key" type="java.lang.String">
+</parameter>
+</method>
+<method name="getString"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="key" type="java.lang.String">
+</parameter>
+</method>
+<method name="getStringArray"
+ return="java.lang.String[]"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="key" type="java.lang.String">
+</parameter>
+</method>
+<method name="getStringArrayList"
+ return="java.util.ArrayList&lt;java.lang.String&gt;"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="key" type="java.lang.String">
+</parameter>
+</method>
+<method name="hasFileDescriptors"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isEmpty"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="keySet"
+ return="java.util.Set&lt;java.lang.String&gt;"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="putAll"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="map" type="android.os.Bundle">
+</parameter>
+</method>
+<method name="putBoolean"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="key" type="java.lang.String">
+</parameter>
+<parameter name="value" type="boolean">
+</parameter>
+</method>
+<method name="putBooleanArray"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="key" type="java.lang.String">
+</parameter>
+<parameter name="value" type="boolean[]">
+</parameter>
+</method>
+<method name="putBundle"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="key" type="java.lang.String">
+</parameter>
+<parameter name="value" type="android.os.Bundle">
+</parameter>
+</method>
+<method name="putByte"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="key" type="java.lang.String">
+</parameter>
+<parameter name="value" type="byte">
+</parameter>
+</method>
+<method name="putByteArray"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="key" type="java.lang.String">
+</parameter>
+<parameter name="value" type="byte[]">
+</parameter>
+</method>
+<method name="putChar"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="key" type="java.lang.String">
+</parameter>
+<parameter name="value" type="char">
+</parameter>
+</method>
+<method name="putCharArray"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="key" type="java.lang.String">
+</parameter>
+<parameter name="value" type="char[]">
+</parameter>
+</method>
+<method name="putCharSequence"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="key" type="java.lang.String">
+</parameter>
+<parameter name="value" type="java.lang.CharSequence">
+</parameter>
+</method>
+<method name="putCharSequenceArray"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="key" type="java.lang.String">
+</parameter>
+<parameter name="value" type="java.lang.CharSequence[]">
+</parameter>
+</method>
+<method name="putCharSequenceArrayList"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="key" type="java.lang.String">
+</parameter>
+<parameter name="value" type="java.util.ArrayList&lt;java.lang.CharSequence&gt;">
+</parameter>
+</method>
+<method name="putDouble"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="key" type="java.lang.String">
+</parameter>
+<parameter name="value" type="double">
+</parameter>
+</method>
+<method name="putDoubleArray"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="key" type="java.lang.String">
+</parameter>
+<parameter name="value" type="double[]">
+</parameter>
+</method>
+<method name="putFloat"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="key" type="java.lang.String">
+</parameter>
+<parameter name="value" type="float">
+</parameter>
+</method>
+<method name="putFloatArray"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="key" type="java.lang.String">
+</parameter>
+<parameter name="value" type="float[]">
+</parameter>
+</method>
+<method name="putInt"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="key" type="java.lang.String">
+</parameter>
+<parameter name="value" type="int">
+</parameter>
+</method>
+<method name="putIntArray"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="key" type="java.lang.String">
+</parameter>
+<parameter name="value" type="int[]">
+</parameter>
+</method>
+<method name="putIntegerArrayList"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="key" type="java.lang.String">
+</parameter>
+<parameter name="value" type="java.util.ArrayList&lt;java.lang.Integer&gt;">
+</parameter>
+</method>
+<method name="putLong"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="key" type="java.lang.String">
+</parameter>
+<parameter name="value" type="long">
+</parameter>
+</method>
+<method name="putLongArray"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="key" type="java.lang.String">
+</parameter>
+<parameter name="value" type="long[]">
+</parameter>
+</method>
+<method name="putParcelable"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="key" type="java.lang.String">
+</parameter>
+<parameter name="value" type="android.os.Parcelable">
+</parameter>
+</method>
+<method name="putParcelableArray"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="key" type="java.lang.String">
+</parameter>
+<parameter name="value" type="android.os.Parcelable[]">
+</parameter>
+</method>
+<method name="putParcelableArrayList"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="key" type="java.lang.String">
+</parameter>
+<parameter name="value" type="java.util.ArrayList&lt;? extends android.os.Parcelable&gt;">
+</parameter>
+</method>
+<method name="putSerializable"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="key" type="java.lang.String">
+</parameter>
+<parameter name="value" type="java.io.Serializable">
+</parameter>
+</method>
+<method name="putShort"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="key" type="java.lang.String">
+</parameter>
+<parameter name="value" type="short">
+</parameter>
+</method>
+<method name="putShortArray"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="key" type="java.lang.String">
+</parameter>
+<parameter name="value" type="short[]">
+</parameter>
+</method>
+<method name="putSparseParcelableArray"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="key" type="java.lang.String">
+</parameter>
+<parameter name="value" type="android.util.SparseArray&lt;? extends android.os.Parcelable&gt;">
+</parameter>
+</method>
+<method name="putString"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="key" type="java.lang.String">
+</parameter>
+<parameter name="value" type="java.lang.String">
+</parameter>
+</method>
+<method name="putStringArray"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="key" type="java.lang.String">
+</parameter>
+<parameter name="value" type="java.lang.String[]">
+</parameter>
+</method>
+<method name="putStringArrayList"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="key" type="java.lang.String">
+</parameter>
+<parameter name="value" type="java.util.ArrayList&lt;java.lang.String&gt;">
+</parameter>
+</method>
+<method name="readFromParcel"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="parcel" type="android.os.Parcel">
+</parameter>
+</method>
+<method name="remove"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="key" type="java.lang.String">
+</parameter>
+</method>
+<method name="setClassLoader"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="loader" type="java.lang.ClassLoader">
+</parameter>
+</method>
+<method name="size"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="writeToParcel"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="parcel" type="android.os.Parcel">
+</parameter>
+<parameter name="flags" type="int">
+</parameter>
+</method>
+<field name="CREATOR"
+ type="android.os.Parcelable.Creator"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="EMPTY"
+ type="android.os.Bundle"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<class name="ConditionVariable"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="ConditionVariable"
+ type="android.os.ConditionVariable"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<constructor name="ConditionVariable"
+ type="android.os.ConditionVariable"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="state" type="boolean">
+</parameter>
+</constructor>
+<method name="block"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="block"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="timeout" type="long">
+</parameter>
+</method>
+<method name="close"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="open"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+</class>
+<class name="CountDownTimer"
+ extends="java.lang.Object"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="CountDownTimer"
+ type="android.os.CountDownTimer"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="millisInFuture" type="long">
+</parameter>
+<parameter name="countDownInterval" type="long">
+</parameter>
+</constructor>
+<method name="cancel"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="onFinish"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="onTick"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="millisUntilFinished" type="long">
+</parameter>
+</method>
+<method name="start"
+ return="android.os.CountDownTimer"
+ abstract="false"
+ native="false"
+ synchronized="true"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+</class>
+<class name="DeadObjectException"
+ extends="android.os.RemoteException"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="DeadObjectException"
+ type="android.os.DeadObjectException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+</class>
+<class name="Debug"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="changeDebugPort"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="deprecated"
+ visibility="public"
+>
+<parameter name="port" type="int">
+</parameter>
+</method>
+<method name="dumpHprofData"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="fileName" type="java.lang.String">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="dumpService"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+<parameter name="fd" type="java.io.FileDescriptor">
+</parameter>
+<parameter name="args" type="java.lang.String[]">
+</parameter>
+</method>
+<method name="enableEmulatorTraceOutput"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getBinderDeathObjectCount"
+ return="int"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getBinderLocalObjectCount"
+ return="int"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getBinderProxyObjectCount"
+ return="int"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getBinderReceivedTransactions"
+ return="int"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getBinderSentTransactions"
+ return="int"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getGlobalAllocCount"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getGlobalAllocSize"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getGlobalClassInitCount"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getGlobalClassInitTime"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getGlobalExternalAllocCount"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getGlobalExternalAllocSize"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getGlobalExternalFreedCount"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getGlobalExternalFreedSize"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getGlobalFreedCount"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getGlobalFreedSize"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getGlobalGcInvocationCount"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getLoadedClassCount"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getMemoryInfo"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="memoryInfo" type="android.os.Debug.MemoryInfo">
+</parameter>
+</method>
+<method name="getNativeHeapAllocatedSize"
+ return="long"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getNativeHeapFreeSize"
+ return="long"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getNativeHeapSize"
+ return="long"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getThreadAllocCount"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getThreadAllocSize"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getThreadExternalAllocCount"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getThreadExternalAllocSize"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getThreadGcInvocationCount"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isDebuggerConnected"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="printLoadedClasses"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="flags" type="int">
+</parameter>
+</method>
+<method name="resetAllCounts"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="resetGlobalAllocCount"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="resetGlobalAllocSize"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="resetGlobalClassInitCount"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="resetGlobalClassInitTime"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="resetGlobalExternalAllocCount"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="resetGlobalExternalAllocSize"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="resetGlobalExternalFreedCount"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="resetGlobalExternalFreedSize"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="resetGlobalFreedCount"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="resetGlobalFreedSize"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="resetGlobalGcInvocationCount"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="resetThreadAllocCount"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="resetThreadAllocSize"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="resetThreadExternalAllocCount"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="resetThreadExternalAllocSize"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="resetThreadGcInvocationCount"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="setAllocationLimit"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="limit" type="int">
+</parameter>
+</method>
+<method name="setGlobalAllocationLimit"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="limit" type="int">
+</parameter>
+</method>
+<method name="startAllocCounting"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="startMethodTracing"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="startMethodTracing"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="traceName" type="java.lang.String">
+</parameter>
+</method>
+<method name="startMethodTracing"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="traceName" type="java.lang.String">
+</parameter>
+<parameter name="bufferSize" type="int">
+</parameter>
+</method>
+<method name="startMethodTracing"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="traceName" type="java.lang.String">
+</parameter>
+<parameter name="bufferSize" type="int">
+</parameter>
+<parameter name="flags" type="int">
+</parameter>
+</method>
+<method name="startNativeTracing"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="stopAllocCounting"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="stopMethodTracing"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="stopNativeTracing"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="threadCpuTimeNanos"
+ return="long"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="waitForDebugger"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="waitingForDebugger"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<field name="SHOW_CLASSLOADER"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="SHOW_FULL_DETAIL"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="SHOW_INITIALIZED"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="4"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TRACE_COUNT_ALLOCS"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<class name="Debug.InstructionCount"
+ extends="java.lang.Object"
+ abstract="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="Debug.InstructionCount"
+ type="android.os.Debug.InstructionCount"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<method name="collect"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="globalMethodInvocations"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="globalTotal"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="resetAndStart"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+</class>
+<class name="Debug.MemoryInfo"
+ extends="java.lang.Object"
+ abstract="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="android.os.Parcelable">
+</implements>
+<constructor name="Debug.MemoryInfo"
+ type="android.os.Debug.MemoryInfo"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<method name="describeContents"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getTotalPrivateDirty"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getTotalPss"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getTotalSharedDirty"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="readFromParcel"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="source" type="android.os.Parcel">
+</parameter>
+</method>
+<method name="writeToParcel"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="dest" type="android.os.Parcel">
+</parameter>
+<parameter name="flags" type="int">
+</parameter>
+</method>
+<field name="CREATOR"
+ type="android.os.Parcelable.Creator"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="dalvikPrivateDirty"
+ type="int"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="dalvikPss"
+ type="int"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="dalvikSharedDirty"
+ type="int"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="nativePrivateDirty"
+ type="int"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="nativePss"
+ type="int"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="nativeSharedDirty"
+ type="int"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="otherPrivateDirty"
+ type="int"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="otherPss"
+ type="int"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="otherSharedDirty"
+ type="int"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<class name="DropBoxManager"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="DropBoxManager"
+ type="android.os.DropBoxManager"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</constructor>
+<method name="addData"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="tag" type="java.lang.String">
+</parameter>
+<parameter name="data" type="byte[]">
+</parameter>
+<parameter name="flags" type="int">
+</parameter>
+</method>
+<method name="addFile"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="tag" type="java.lang.String">
+</parameter>
+<parameter name="file" type="java.io.File">
+</parameter>
+<parameter name="flags" type="int">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="addText"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="tag" type="java.lang.String">
+</parameter>
+<parameter name="data" type="java.lang.String">
+</parameter>
+</method>
+<method name="getNextEntry"
+ return="android.os.DropBoxManager.Entry"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="tag" type="java.lang.String">
+</parameter>
+<parameter name="msec" type="long">
+</parameter>
+</method>
+<method name="isTagEnabled"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="tag" type="java.lang.String">
+</parameter>
+</method>
+<field name="IS_EMPTY"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="IS_GZIPPED"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="4"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="IS_TEXT"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<class name="DropBoxManager.Entry"
+ extends="java.lang.Object"
+ abstract="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="android.os.Parcelable">
+</implements>
+<constructor name="DropBoxManager.Entry"
+ type="android.os.DropBoxManager.Entry"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="tag" type="java.lang.String">
+</parameter>
+<parameter name="millis" type="long">
+</parameter>
+</constructor>
+<constructor name="DropBoxManager.Entry"
+ type="android.os.DropBoxManager.Entry"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="tag" type="java.lang.String">
+</parameter>
+<parameter name="millis" type="long">
+</parameter>
+<parameter name="text" type="java.lang.String">
+</parameter>
+</constructor>
+<constructor name="DropBoxManager.Entry"
+ type="android.os.DropBoxManager.Entry"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="tag" type="java.lang.String">
+</parameter>
+<parameter name="millis" type="long">
+</parameter>
+<parameter name="data" type="byte[]">
+</parameter>
+<parameter name="flags" type="int">
+</parameter>
+</constructor>
+<constructor name="DropBoxManager.Entry"
+ type="android.os.DropBoxManager.Entry"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="tag" type="java.lang.String">
+</parameter>
+<parameter name="millis" type="long">
+</parameter>
+<parameter name="data" type="android.os.ParcelFileDescriptor">
+</parameter>
+<parameter name="flags" type="int">
+</parameter>
+</constructor>
+<constructor name="DropBoxManager.Entry"
+ type="android.os.DropBoxManager.Entry"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="tag" type="java.lang.String">
+</parameter>
+<parameter name="millis" type="long">
+</parameter>
+<parameter name="data" type="java.io.File">
+</parameter>
+<parameter name="flags" type="int">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</constructor>
+<method name="close"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="describeContents"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getFlags"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getInputStream"
+ return="java.io.InputStream"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="getTag"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getText"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="maxBytes" type="int">
+</parameter>
+</method>
+<method name="getTimeMillis"
+ return="long"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="writeToParcel"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="out" type="android.os.Parcel">
+</parameter>
+<parameter name="flags" type="int">
+</parameter>
+</method>
+<field name="CREATOR"
+ type="android.os.Parcelable.Creator"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<class name="Environment"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="Environment"
+ type="android.os.Environment"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<method name="getDataDirectory"
+ return="java.io.File"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getDownloadCacheDirectory"
+ return="java.io.File"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getExternalStorageDirectory"
+ return="java.io.File"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getExternalStoragePublicDirectory"
+ return="java.io.File"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="type" type="java.lang.String">
+</parameter>
+</method>
+<method name="getExternalStorageState"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getRootDirectory"
+ return="java.io.File"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<field name="DIRECTORY_ALARMS"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="DIRECTORY_DCIM"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="DIRECTORY_DOWNLOADS"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="DIRECTORY_MOVIES"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="DIRECTORY_MUSIC"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="DIRECTORY_NOTIFICATIONS"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="DIRECTORY_PICTURES"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="DIRECTORY_PODCASTS"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="DIRECTORY_RINGTONES"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="MEDIA_BAD_REMOVAL"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;bad_removal&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="MEDIA_CHECKING"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;checking&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="MEDIA_MOUNTED"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;mounted&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="MEDIA_MOUNTED_READ_ONLY"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;mounted_ro&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="MEDIA_NOFS"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;nofs&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="MEDIA_REMOVED"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;removed&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="MEDIA_SHARED"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;shared&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="MEDIA_UNMOUNTABLE"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;unmountable&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="MEDIA_UNMOUNTED"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;unmounted&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<class name="FileObserver"
+ extends="java.lang.Object"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="FileObserver"
+ type="android.os.FileObserver"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="path" type="java.lang.String">
+</parameter>
+</constructor>
+<constructor name="FileObserver"
+ type="android.os.FileObserver"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="path" type="java.lang.String">
+</parameter>
+<parameter name="mask" type="int">
+</parameter>
+</constructor>
+<method name="onEvent"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="event" type="int">
+</parameter>
+<parameter name="path" type="java.lang.String">
+</parameter>
+</method>
+<method name="startWatching"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="stopWatching"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<field name="ACCESS"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ALL_EVENTS"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="4095"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ATTRIB"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="4"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="CLOSE_NOWRITE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="CLOSE_WRITE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="8"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="CREATE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="256"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="DELETE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="512"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="DELETE_SELF"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1024"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="MODIFY"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="MOVED_FROM"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="64"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="MOVED_TO"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="128"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="MOVE_SELF"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2048"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="OPEN"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="32"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<class name="Handler"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="Handler"
+ type="android.os.Handler"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<constructor name="Handler"
+ type="android.os.Handler"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="callback" type="android.os.Handler.Callback">
+</parameter>
+</constructor>
+<constructor name="Handler"
+ type="android.os.Handler"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="looper" type="android.os.Looper">
+</parameter>
+</constructor>
+<constructor name="Handler"
+ type="android.os.Handler"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="looper" type="android.os.Looper">
+</parameter>
+<parameter name="callback" type="android.os.Handler.Callback">
+</parameter>
+</constructor>
+<method name="dispatchMessage"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="msg" type="android.os.Message">
+</parameter>
+</method>
+<method name="dump"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="pw" type="android.util.Printer">
+</parameter>
+<parameter name="prefix" type="java.lang.String">
+</parameter>
+</method>
+<method name="getLooper"
+ return="android.os.Looper"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="handleMessage"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="msg" type="android.os.Message">
+</parameter>
+</method>
+<method name="hasMessages"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="what" type="int">
+</parameter>
+</method>
+<method name="hasMessages"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="what" type="int">
+</parameter>
+<parameter name="object" type="java.lang.Object">
+</parameter>
+</method>
+<method name="obtainMessage"
+ return="android.os.Message"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="obtainMessage"
+ return="android.os.Message"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="what" type="int">
+</parameter>
+</method>
+<method name="obtainMessage"
+ return="android.os.Message"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="what" type="int">
+</parameter>
+<parameter name="obj" type="java.lang.Object">
+</parameter>
+</method>
+<method name="obtainMessage"
+ return="android.os.Message"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="what" type="int">
+</parameter>
+<parameter name="arg1" type="int">
+</parameter>
+<parameter name="arg2" type="int">
+</parameter>
+</method>
+<method name="obtainMessage"
+ return="android.os.Message"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="what" type="int">
+</parameter>
+<parameter name="arg1" type="int">
+</parameter>
+<parameter name="arg2" type="int">
+</parameter>
+<parameter name="obj" type="java.lang.Object">
+</parameter>
+</method>
+<method name="post"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="r" type="java.lang.Runnable">
+</parameter>
+</method>
+<method name="postAtFrontOfQueue"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="r" type="java.lang.Runnable">
+</parameter>
+</method>
+<method name="postAtTime"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="r" type="java.lang.Runnable">
+</parameter>
+<parameter name="uptimeMillis" type="long">
+</parameter>
+</method>
+<method name="postAtTime"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="r" type="java.lang.Runnable">
+</parameter>
+<parameter name="token" type="java.lang.Object">
+</parameter>
+<parameter name="uptimeMillis" type="long">
+</parameter>
+</method>
+<method name="postDelayed"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="r" type="java.lang.Runnable">
+</parameter>
+<parameter name="delayMillis" type="long">
+</parameter>
+</method>
+<method name="removeCallbacks"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="r" type="java.lang.Runnable">
+</parameter>
+</method>
+<method name="removeCallbacks"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="r" type="java.lang.Runnable">
+</parameter>
+<parameter name="token" type="java.lang.Object">
+</parameter>
+</method>
+<method name="removeCallbacksAndMessages"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="token" type="java.lang.Object">
+</parameter>
+</method>
+<method name="removeMessages"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="what" type="int">
+</parameter>
+</method>
+<method name="removeMessages"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="what" type="int">
+</parameter>
+<parameter name="object" type="java.lang.Object">
+</parameter>
+</method>
+<method name="sendEmptyMessage"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="what" type="int">
+</parameter>
+</method>
+<method name="sendEmptyMessageAtTime"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="what" type="int">
+</parameter>
+<parameter name="uptimeMillis" type="long">
+</parameter>
+</method>
+<method name="sendEmptyMessageDelayed"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="what" type="int">
+</parameter>
+<parameter name="delayMillis" type="long">
+</parameter>
+</method>
+<method name="sendMessage"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="msg" type="android.os.Message">
+</parameter>
+</method>
+<method name="sendMessageAtFrontOfQueue"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="msg" type="android.os.Message">
+</parameter>
+</method>
+<method name="sendMessageAtTime"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="msg" type="android.os.Message">
+</parameter>
+<parameter name="uptimeMillis" type="long">
+</parameter>
+</method>
+<method name="sendMessageDelayed"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="msg" type="android.os.Message">
+</parameter>
+<parameter name="delayMillis" type="long">
+</parameter>
+</method>
+</class>
+<interface name="Handler.Callback"
+ abstract="true"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="handleMessage"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="msg" type="android.os.Message">
+</parameter>
+</method>
+</interface>
+<class name="HandlerThread"
+ extends="java.lang.Thread"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="HandlerThread"
+ type="android.os.HandlerThread"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+</constructor>
+<constructor name="HandlerThread"
+ type="android.os.HandlerThread"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+<parameter name="priority" type="int">
+</parameter>
+</constructor>
+<method name="getLooper"
+ return="android.os.Looper"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getThreadId"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="onLooperPrepared"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</method>
+<method name="quit"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+</class>
+<interface name="IBinder"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="dump"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="fd" type="java.io.FileDescriptor">
+</parameter>
+<parameter name="args" type="java.lang.String[]">
+</parameter>
+<exception name="RemoteException" type="android.os.RemoteException">
+</exception>
+</method>
+<method name="getInterfaceDescriptor"
+ return="java.lang.String"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="RemoteException" type="android.os.RemoteException">
+</exception>
+</method>
+<method name="isBinderAlive"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="linkToDeath"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="recipient" type="android.os.IBinder.DeathRecipient">
+</parameter>
+<parameter name="flags" type="int">
+</parameter>
+<exception name="RemoteException" type="android.os.RemoteException">
+</exception>
+</method>
+<method name="pingBinder"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="queryLocalInterface"
+ return="android.os.IInterface"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="descriptor" type="java.lang.String">
+</parameter>
+</method>
+<method name="transact"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="code" type="int">
+</parameter>
+<parameter name="data" type="android.os.Parcel">
+</parameter>
+<parameter name="reply" type="android.os.Parcel">
+</parameter>
+<parameter name="flags" type="int">
+</parameter>
+<exception name="RemoteException" type="android.os.RemoteException">
+</exception>
+</method>
+<method name="unlinkToDeath"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="recipient" type="android.os.IBinder.DeathRecipient">
+</parameter>
+<parameter name="flags" type="int">
+</parameter>
+</method>
+<field name="DUMP_TRANSACTION"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1598311760"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="FIRST_CALL_TRANSACTION"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="FLAG_ONEWAY"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="INTERFACE_TRANSACTION"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1598968902"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="LAST_CALL_TRANSACTION"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16777215"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="PING_TRANSACTION"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1599098439"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</interface>
+<interface name="IBinder.DeathRecipient"
+ abstract="true"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="binderDied"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+</interface>
+<interface name="IInterface"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="asBinder"
+ return="android.os.IBinder"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+</interface>
+<class name="Looper"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="dump"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="pw" type="android.util.Printer">
+</parameter>
+<parameter name="prefix" type="java.lang.String">
+</parameter>
+</method>
+<method name="getMainLooper"
+ return="android.os.Looper"
+ abstract="false"
+ native="false"
+ synchronized="true"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getThread"
+ return="java.lang.Thread"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="loop"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="myLooper"
+ return="android.os.Looper"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="myQueue"
+ return="android.os.MessageQueue"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="prepare"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="prepareMainLooper"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="quit"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="setMessageLogging"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="printer" type="android.util.Printer">
+</parameter>
+</method>
+</class>
+<class name="MemoryFile"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="MemoryFile"
+ type="android.os.MemoryFile"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+<parameter name="length" type="int">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</constructor>
+<method name="allowPurging"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="allowPurging" type="boolean">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="close"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getInputStream"
+ return="java.io.InputStream"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getOutputStream"
+ return="java.io.OutputStream"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isPurgingAllowed"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="length"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="readBytes"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="buffer" type="byte[]">
+</parameter>
+<parameter name="srcOffset" type="int">
+</parameter>
+<parameter name="destOffset" type="int">
+</parameter>
+<parameter name="count" type="int">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="writeBytes"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="buffer" type="byte[]">
+</parameter>
+<parameter name="srcOffset" type="int">
+</parameter>
+<parameter name="destOffset" type="int">
+</parameter>
+<parameter name="count" type="int">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+</class>
+<class name="Message"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="android.os.Parcelable">
+</implements>
+<constructor name="Message"
+ type="android.os.Message"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<method name="copyFrom"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="o" type="android.os.Message">
+</parameter>
+</method>
+<method name="describeContents"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getCallback"
+ return="java.lang.Runnable"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getData"
+ return="android.os.Bundle"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getTarget"
+ return="android.os.Handler"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getWhen"
+ return="long"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="obtain"
+ return="android.os.Message"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="obtain"
+ return="android.os.Message"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="orig" type="android.os.Message">
+</parameter>
+</method>
+<method name="obtain"
+ return="android.os.Message"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="h" type="android.os.Handler">
+</parameter>
+</method>
+<method name="obtain"
+ return="android.os.Message"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="h" type="android.os.Handler">
+</parameter>
+<parameter name="callback" type="java.lang.Runnable">
+</parameter>
+</method>
+<method name="obtain"
+ return="android.os.Message"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="h" type="android.os.Handler">
+</parameter>
+<parameter name="what" type="int">
+</parameter>
+</method>
+<method name="obtain"
+ return="android.os.Message"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="h" type="android.os.Handler">
+</parameter>
+<parameter name="what" type="int">
+</parameter>
+<parameter name="obj" type="java.lang.Object">
+</parameter>
+</method>
+<method name="obtain"
+ return="android.os.Message"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="h" type="android.os.Handler">
+</parameter>
+<parameter name="what" type="int">
+</parameter>
+<parameter name="arg1" type="int">
+</parameter>
+<parameter name="arg2" type="int">
+</parameter>
+</method>
+<method name="obtain"
+ return="android.os.Message"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="h" type="android.os.Handler">
+</parameter>
+<parameter name="what" type="int">
+</parameter>
+<parameter name="arg1" type="int">
+</parameter>
+<parameter name="arg2" type="int">
+</parameter>
+<parameter name="obj" type="java.lang.Object">
+</parameter>
+</method>
+<method name="peekData"
+ return="android.os.Bundle"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="recycle"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="sendToTarget"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="setData"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="data" type="android.os.Bundle">
+</parameter>
+</method>
+<method name="setTarget"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="target" type="android.os.Handler">
+</parameter>
+</method>
+<method name="writeToParcel"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="dest" type="android.os.Parcel">
+</parameter>
+<parameter name="flags" type="int">
+</parameter>
+</method>
+<field name="CREATOR"
+ type="android.os.Parcelable.Creator"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="arg1"
+ type="int"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="arg2"
+ type="int"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="obj"
+ type="java.lang.Object"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="replyTo"
+ type="android.os.Messenger"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="what"
+ type="int"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<class name="MessageQueue"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="addIdleHandler"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="handler" type="android.os.MessageQueue.IdleHandler">
+</parameter>
+</method>
+<method name="removeIdleHandler"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="handler" type="android.os.MessageQueue.IdleHandler">
+</parameter>
+</method>
+</class>
+<interface name="MessageQueue.IdleHandler"
+ abstract="true"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="queueIdle"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+</interface>
+<class name="Messenger"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="android.os.Parcelable">
+</implements>
+<constructor name="Messenger"
+ type="android.os.Messenger"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="target" type="android.os.Handler">
+</parameter>
+</constructor>
+<constructor name="Messenger"
+ type="android.os.Messenger"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="target" type="android.os.IBinder">
+</parameter>
+</constructor>
+<method name="describeContents"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getBinder"
+ return="android.os.IBinder"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="readMessengerOrNullFromParcel"
+ return="android.os.Messenger"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="in" type="android.os.Parcel">
+</parameter>
+</method>
+<method name="send"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="message" type="android.os.Message">
+</parameter>
+<exception name="RemoteException" type="android.os.RemoteException">
+</exception>
+</method>
+<method name="writeMessengerOrNullToParcel"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="messenger" type="android.os.Messenger">
+</parameter>
+<parameter name="out" type="android.os.Parcel">
+</parameter>
+</method>
+<method name="writeToParcel"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="out" type="android.os.Parcel">
+</parameter>
+<parameter name="flags" type="int">
+</parameter>
+</method>
+<field name="CREATOR"
+ type="android.os.Parcelable.Creator"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<class name="Parcel"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="appendFrom"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="parcel" type="android.os.Parcel">
+</parameter>
+<parameter name="offset" type="int">
+</parameter>
+<parameter name="length" type="int">
+</parameter>
+</method>
+<method name="createBinderArray"
+ return="android.os.IBinder[]"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="createBinderArrayList"
+ return="java.util.ArrayList&lt;android.os.IBinder&gt;"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="createBooleanArray"
+ return="boolean[]"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="createByteArray"
+ return="byte[]"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="createCharArray"
+ return="char[]"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="createDoubleArray"
+ return="double[]"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="createFloatArray"
+ return="float[]"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="createIntArray"
+ return="int[]"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="createLongArray"
+ return="long[]"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="createStringArray"
+ return="java.lang.String[]"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="createStringArrayList"
+ return="java.util.ArrayList&lt;java.lang.String&gt;"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="createTypedArray"
+ return="T[]"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="c" type="android.os.Parcelable.Creator&lt;T&gt;">
+</parameter>
+</method>
+<method name="createTypedArrayList"
+ return="java.util.ArrayList&lt;T&gt;"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="c" type="android.os.Parcelable.Creator&lt;T&gt;">
+</parameter>
+</method>
+<method name="dataAvail"
+ return="int"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="dataCapacity"
+ return="int"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="dataPosition"
+ return="int"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="dataSize"
+ return="int"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="enforceInterface"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="interfaceName" type="java.lang.String">
+</parameter>
+</method>
+<method name="hasFileDescriptors"
+ return="boolean"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="marshall"
+ return="byte[]"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="obtain"
+ return="android.os.Parcel"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="obtain"
+ return="android.os.Parcel"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="obj" type="int">
+</parameter>
+</method>
+<method name="readArray"
+ return="java.lang.Object[]"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="loader" type="java.lang.ClassLoader">
+</parameter>
+</method>
+<method name="readArrayList"
+ return="java.util.ArrayList"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="loader" type="java.lang.ClassLoader">
+</parameter>
+</method>
+<method name="readBinderArray"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="val" type="android.os.IBinder[]">
+</parameter>
+</method>
+<method name="readBinderList"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="list" type="java.util.List&lt;android.os.IBinder&gt;">
+</parameter>
+</method>
+<method name="readBooleanArray"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="val" type="boolean[]">
+</parameter>
+</method>
+<method name="readBundle"
+ return="android.os.Bundle"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="readBundle"
+ return="android.os.Bundle"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="loader" type="java.lang.ClassLoader">
+</parameter>
+</method>
+<method name="readByte"
+ return="byte"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="readByteArray"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="val" type="byte[]">
+</parameter>
+</method>
+<method name="readCharArray"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="val" type="char[]">
+</parameter>
+</method>
+<method name="readDouble"
+ return="double"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="readDoubleArray"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="val" type="double[]">
+</parameter>
+</method>
+<method name="readException"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="readException"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="code" type="int">
+</parameter>
+<parameter name="msg" type="java.lang.String">
+</parameter>
+</method>
+<method name="readFileDescriptor"
+ return="android.os.ParcelFileDescriptor"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="readFloat"
+ return="float"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="readFloatArray"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="val" type="float[]">
+</parameter>
+</method>
+<method name="readHashMap"
+ return="java.util.HashMap"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="loader" type="java.lang.ClassLoader">
+</parameter>
+</method>
+<method name="readInt"
+ return="int"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="readIntArray"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="val" type="int[]">
+</parameter>
+</method>
+<method name="readList"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="outVal" type="java.util.List">
+</parameter>
+<parameter name="loader" type="java.lang.ClassLoader">
+</parameter>
+</method>
+<method name="readLong"
+ return="long"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="readLongArray"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="val" type="long[]">
+</parameter>
+</method>
+<method name="readMap"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="outVal" type="java.util.Map">
+</parameter>
+<parameter name="loader" type="java.lang.ClassLoader">
+</parameter>
+</method>
+<method name="readParcelable"
+ return="T"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="loader" type="java.lang.ClassLoader">
+</parameter>
+</method>
+<method name="readParcelableArray"
+ return="android.os.Parcelable[]"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="loader" type="java.lang.ClassLoader">
+</parameter>
+</method>
+<method name="readSerializable"
+ return="java.io.Serializable"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="readSparseArray"
+ return="android.util.SparseArray"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="loader" type="java.lang.ClassLoader">
+</parameter>
+</method>
+<method name="readSparseBooleanArray"
+ return="android.util.SparseBooleanArray"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="readString"
+ return="java.lang.String"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="readStringArray"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="val" type="java.lang.String[]">
+</parameter>
+</method>
+<method name="readStringList"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="list" type="java.util.List&lt;java.lang.String&gt;">
+</parameter>
+</method>
+<method name="readStrongBinder"
+ return="android.os.IBinder"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="readTypedArray"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="val" type="T[]">
+</parameter>
+<parameter name="c" type="android.os.Parcelable.Creator&lt;T&gt;">
+</parameter>
+</method>
+<method name="readTypedList"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="list" type="java.util.List&lt;T&gt;">
+</parameter>
+<parameter name="c" type="android.os.Parcelable.Creator&lt;T&gt;">
+</parameter>
+</method>
+<method name="readValue"
+ return="java.lang.Object"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="loader" type="java.lang.ClassLoader">
+</parameter>
+</method>
+<method name="recycle"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="setDataCapacity"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="size" type="int">
+</parameter>
+</method>
+<method name="setDataPosition"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="pos" type="int">
+</parameter>
+</method>
+<method name="setDataSize"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="size" type="int">
+</parameter>
+</method>
+<method name="unmarshall"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="data" type="byte[]">
+</parameter>
+<parameter name="offest" type="int">
+</parameter>
+<parameter name="length" type="int">
+</parameter>
+</method>
+<method name="writeArray"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="val" type="java.lang.Object[]">
+</parameter>
+</method>
+<method name="writeBinderArray"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="val" type="android.os.IBinder[]">
+</parameter>
+</method>
+<method name="writeBinderList"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="val" type="java.util.List&lt;android.os.IBinder&gt;">
+</parameter>
+</method>
+<method name="writeBooleanArray"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="val" type="boolean[]">
+</parameter>
+</method>
+<method name="writeBundle"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="val" type="android.os.Bundle">
+</parameter>
+</method>
+<method name="writeByte"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="val" type="byte">
+</parameter>
+</method>
+<method name="writeByteArray"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="b" type="byte[]">
+</parameter>
+</method>
+<method name="writeByteArray"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="b" type="byte[]">
+</parameter>
+<parameter name="offset" type="int">
+</parameter>
+<parameter name="len" type="int">
+</parameter>
+</method>
+<method name="writeCharArray"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="val" type="char[]">
+</parameter>
+</method>
+<method name="writeDouble"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="val" type="double">
+</parameter>
+</method>
+<method name="writeDoubleArray"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="val" type="double[]">
+</parameter>
+</method>
+<method name="writeException"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="e" type="java.lang.Exception">
+</parameter>
+</method>
+<method name="writeFileDescriptor"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="val" type="java.io.FileDescriptor">
+</parameter>
+</method>
+<method name="writeFloat"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="val" type="float">
+</parameter>
+</method>
+<method name="writeFloatArray"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="val" type="float[]">
+</parameter>
+</method>
+<method name="writeInt"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="val" type="int">
+</parameter>
+</method>
+<method name="writeIntArray"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="val" type="int[]">
+</parameter>
+</method>
+<method name="writeInterfaceToken"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="interfaceName" type="java.lang.String">
+</parameter>
+</method>
+<method name="writeList"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="val" type="java.util.List">
+</parameter>
+</method>
+<method name="writeLong"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="val" type="long">
+</parameter>
+</method>
+<method name="writeLongArray"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="val" type="long[]">
+</parameter>
+</method>
+<method name="writeMap"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="val" type="java.util.Map">
+</parameter>
+</method>
+<method name="writeNoException"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="writeParcelable"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="p" type="android.os.Parcelable">
+</parameter>
+<parameter name="parcelableFlags" type="int">
+</parameter>
+</method>
+<method name="writeParcelableArray"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="value" type="T[]">
+</parameter>
+<parameter name="parcelableFlags" type="int">
+</parameter>
+</method>
+<method name="writeSerializable"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="s" type="java.io.Serializable">
+</parameter>
+</method>
+<method name="writeSparseArray"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="val" type="android.util.SparseArray&lt;java.lang.Object&gt;">
+</parameter>
+</method>
+<method name="writeSparseBooleanArray"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="val" type="android.util.SparseBooleanArray">
+</parameter>
+</method>
+<method name="writeString"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="val" type="java.lang.String">
+</parameter>
+</method>
+<method name="writeStringArray"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="val" type="java.lang.String[]">
+</parameter>
+</method>
+<method name="writeStringList"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="val" type="java.util.List&lt;java.lang.String&gt;">
+</parameter>
+</method>
+<method name="writeStrongBinder"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="val" type="android.os.IBinder">
+</parameter>
+</method>
+<method name="writeStrongInterface"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="val" type="android.os.IInterface">
+</parameter>
+</method>
+<method name="writeTypedArray"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="val" type="T[]">
+</parameter>
+<parameter name="parcelableFlags" type="int">
+</parameter>
+</method>
+<method name="writeTypedList"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="val" type="java.util.List&lt;T&gt;">
+</parameter>
+</method>
+<method name="writeValue"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="v" type="java.lang.Object">
+</parameter>
+</method>
+<field name="STRING_CREATOR"
+ type="android.os.Parcelable.Creator"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<class name="ParcelFileDescriptor"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="android.os.Parcelable">
+</implements>
+<constructor name="ParcelFileDescriptor"
+ type="android.os.ParcelFileDescriptor"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="descriptor" type="android.os.ParcelFileDescriptor">
+</parameter>
+</constructor>
+<method name="close"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="describeContents"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="fromSocket"
+ return="android.os.ParcelFileDescriptor"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="socket" type="java.net.Socket">
+</parameter>
+</method>
+<method name="getFileDescriptor"
+ return="java.io.FileDescriptor"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getStatSize"
+ return="long"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="open"
+ return="android.os.ParcelFileDescriptor"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="file" type="java.io.File">
+</parameter>
+<parameter name="mode" type="int">
+</parameter>
+<exception name="FileNotFoundException" type="java.io.FileNotFoundException">
+</exception>
+</method>
+<method name="writeToParcel"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="out" type="android.os.Parcel">
+</parameter>
+<parameter name="flags" type="int">
+</parameter>
+</method>
+<field name="CREATOR"
+ type="android.os.Parcelable.Creator"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="MODE_APPEND"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="33554432"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="MODE_CREATE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="134217728"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="MODE_READ_ONLY"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="268435456"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="MODE_READ_WRITE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="805306368"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="MODE_TRUNCATE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="67108864"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="MODE_WORLD_READABLE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="MODE_WORLD_WRITEABLE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="MODE_WRITE_ONLY"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="536870912"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<class name="ParcelFileDescriptor.AutoCloseInputStream"
+ extends="java.io.FileInputStream"
+ abstract="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="ParcelFileDescriptor.AutoCloseInputStream"
+ type="android.os.ParcelFileDescriptor.AutoCloseInputStream"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="fd" type="android.os.ParcelFileDescriptor">
+</parameter>
+</constructor>
+</class>
+<class name="ParcelFileDescriptor.AutoCloseOutputStream"
+ extends="java.io.FileOutputStream"
+ abstract="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="ParcelFileDescriptor.AutoCloseOutputStream"
+ type="android.os.ParcelFileDescriptor.AutoCloseOutputStream"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="fd" type="android.os.ParcelFileDescriptor">
+</parameter>
+</constructor>
+</class>
+<class name="ParcelFormatException"
+ extends="java.lang.RuntimeException"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="ParcelFormatException"
+ type="android.os.ParcelFormatException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<constructor name="ParcelFormatException"
+ type="android.os.ParcelFormatException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="reason" type="java.lang.String">
+</parameter>
+</constructor>
+</class>
+<class name="ParcelUuid"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="android.os.Parcelable">
+</implements>
+<constructor name="ParcelUuid"
+ type="android.os.ParcelUuid"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="uuid" type="java.util.UUID">
+</parameter>
+</constructor>
+<method name="describeContents"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="fromString"
+ return="android.os.ParcelUuid"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="uuid" type="java.lang.String">
+</parameter>
+</method>
+<method name="getUuid"
+ return="java.util.UUID"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="writeToParcel"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="dest" type="android.os.Parcel">
+</parameter>
+<parameter name="flags" type="int">
+</parameter>
+</method>
+<field name="CREATOR"
+ type="android.os.Parcelable.Creator"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<interface name="Parcelable"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="describeContents"
+ return="int"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="writeToParcel"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="dest" type="android.os.Parcel">
+</parameter>
+<parameter name="flags" type="int">
+</parameter>
+</method>
+<field name="CONTENTS_FILE_DESCRIPTOR"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="PARCELABLE_WRITE_RETURN_VALUE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</interface>
+<interface name="Parcelable.Creator"
+ abstract="true"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="createFromParcel"
+ return="T"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="source" type="android.os.Parcel">
+</parameter>
+</method>
+<method name="newArray"
+ return="T[]"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="size" type="int">
+</parameter>
+</method>
+</interface>
+<class name="PatternMatcher"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="android.os.Parcelable">
+</implements>
+<constructor name="PatternMatcher"
+ type="android.os.PatternMatcher"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="pattern" type="java.lang.String">
+</parameter>
+<parameter name="type" type="int">
+</parameter>
+</constructor>
+<constructor name="PatternMatcher"
+ type="android.os.PatternMatcher"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="src" type="android.os.Parcel">
+</parameter>
+</constructor>
+<method name="describeContents"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getPath"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getType"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="match"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="str" type="java.lang.String">
+</parameter>
+</method>
+<method name="writeToParcel"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="dest" type="android.os.Parcel">
+</parameter>
+<parameter name="flags" type="int">
+</parameter>
+</method>
+<field name="CREATOR"
+ type="android.os.Parcelable.Creator"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="PATTERN_LITERAL"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="0"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="PATTERN_PREFIX"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="PATTERN_SIMPLE_GLOB"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<class name="PowerManager"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="goToSleep"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="time" type="long">
+</parameter>
+</method>
+<method name="isScreenOn"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="newWakeLock"
+ return="android.os.PowerManager.WakeLock"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="flags" type="int">
+</parameter>
+<parameter name="tag" type="java.lang.String">
+</parameter>
+</method>
+<method name="reboot"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="reason" type="java.lang.String">
+</parameter>
+</method>
+<method name="userActivity"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="when" type="long">
+</parameter>
+<parameter name="noChangeLights" type="boolean">
+</parameter>
+</method>
+<field name="ACQUIRE_CAUSES_WAKEUP"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="268435456"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="FULL_WAKE_LOCK"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="26"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ON_AFTER_RELEASE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="536870912"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="PARTIAL_WAKE_LOCK"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="SCREEN_BRIGHT_WAKE_LOCK"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="10"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="SCREEN_DIM_WAKE_LOCK"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="6"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<class name="PowerManager.WakeLock"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="acquire"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="acquire"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="timeout" type="long">
+</parameter>
+</method>
+<method name="isHeld"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="release"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="setReferenceCounted"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="value" type="boolean">
+</parameter>
+</method>
+</class>
+<class name="Process"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="Process"
+ type="android.os.Process"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<method name="getElapsedCpuTime"
+ return="long"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getGidForName"
+ return="int"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+</method>
+<method name="getThreadPriority"
+ return="int"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="tid" type="int">
+</parameter>
+<exception name="IllegalArgumentException" type="java.lang.IllegalArgumentException">
+</exception>
+</method>
+<method name="getUidForName"
+ return="int"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+</method>
+<method name="killProcess"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="pid" type="int">
+</parameter>
+</method>
+<method name="myPid"
+ return="int"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="myTid"
+ return="int"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="myUid"
+ return="int"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="sendSignal"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="pid" type="int">
+</parameter>
+<parameter name="signal" type="int">
+</parameter>
+</method>
+<method name="setThreadPriority"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="tid" type="int">
+</parameter>
+<parameter name="priority" type="int">
+</parameter>
+<exception name="IllegalArgumentException" type="java.lang.IllegalArgumentException">
+</exception>
+<exception name="SecurityException" type="java.lang.SecurityException">
+</exception>
+</method>
+<method name="setThreadPriority"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="priority" type="int">
+</parameter>
+<exception name="IllegalArgumentException" type="java.lang.IllegalArgumentException">
+</exception>
+<exception name="SecurityException" type="java.lang.SecurityException">
+</exception>
+</method>
+<method name="supportsProcesses"
+ return="boolean"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<field name="BLUETOOTH_GID"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2000"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="FIRST_APPLICATION_UID"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="10000"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="LAST_APPLICATION_UID"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="99999"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="PHONE_UID"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1001"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="SIGNAL_KILL"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="9"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="SIGNAL_QUIT"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="3"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="SIGNAL_USR1"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="10"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="SYSTEM_UID"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1000"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="THREAD_PRIORITY_AUDIO"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="-16"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="THREAD_PRIORITY_BACKGROUND"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="10"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="THREAD_PRIORITY_DEFAULT"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="0"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="THREAD_PRIORITY_DISPLAY"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="-4"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="THREAD_PRIORITY_FOREGROUND"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="-2"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="THREAD_PRIORITY_LESS_FAVORABLE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="THREAD_PRIORITY_LOWEST"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="19"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="THREAD_PRIORITY_MORE_FAVORABLE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="-1"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="THREAD_PRIORITY_URGENT_AUDIO"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="-19"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="THREAD_PRIORITY_URGENT_DISPLAY"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="-8"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<class name="RecoverySystem"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="RecoverySystem"
+ type="android.os.RecoverySystem"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<method name="installPackage"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="context" type="android.content.Context">
+</parameter>
+<parameter name="packageFile" type="java.io.File">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="rebootWipeUserData"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="context" type="android.content.Context">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="verifyPackage"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="packageFile" type="java.io.File">
+</parameter>
+<parameter name="listener" type="android.os.RecoverySystem.ProgressListener">
+</parameter>
+<parameter name="deviceCertsZipFile" type="java.io.File">
+</parameter>
+<exception name="GeneralSecurityException" type="java.security.GeneralSecurityException">
+</exception>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+</class>
+<interface name="RecoverySystem.ProgressListener"
+ abstract="true"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="onProgress"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="progress" type="int">
+</parameter>
+</method>
+</interface>
+<class name="RemoteCallbackList"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="RemoteCallbackList"
+ type="android.os.RemoteCallbackList"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<method name="beginBroadcast"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="finishBroadcast"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getBroadcastCookie"
+ return="java.lang.Object"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="index" type="int">
+</parameter>
+</method>
+<method name="getBroadcastItem"
+ return="E"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="index" type="int">
+</parameter>
+</method>
+<method name="kill"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="onCallbackDied"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="callback" type="E">
+</parameter>
+</method>
+<method name="onCallbackDied"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="callback" type="E">
+</parameter>
+<parameter name="cookie" type="java.lang.Object">
+</parameter>
+</method>
+<method name="register"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="callback" type="E">
+</parameter>
+</method>
+<method name="register"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="callback" type="E">
+</parameter>
+<parameter name="cookie" type="java.lang.Object">
+</parameter>
+</method>
+<method name="unregister"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="callback" type="E">
+</parameter>
+</method>
+</class>
+<class name="RemoteException"
+ extends="android.util.AndroidException"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="RemoteException"
+ type="android.os.RemoteException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+</class>
+<class name="ResultReceiver"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="android.os.Parcelable">
+</implements>
+<constructor name="ResultReceiver"
+ type="android.os.ResultReceiver"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="handler" type="android.os.Handler">
+</parameter>
+</constructor>
+<method name="describeContents"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="onReceiveResult"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="resultCode" type="int">
+</parameter>
+<parameter name="resultData" type="android.os.Bundle">
+</parameter>
+</method>
+<method name="send"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="resultCode" type="int">
+</parameter>
+<parameter name="resultData" type="android.os.Bundle">
+</parameter>
+</method>
+<method name="writeToParcel"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="out" type="android.os.Parcel">
+</parameter>
+<parameter name="flags" type="int">
+</parameter>
+</method>
+<field name="CREATOR"
+ type="android.os.Parcelable.Creator"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<class name="StatFs"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="StatFs"
+ type="android.os.StatFs"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="path" type="java.lang.String">
+</parameter>
+</constructor>
+<method name="getAvailableBlocks"
+ return="int"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getBlockCount"
+ return="int"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getBlockSize"
+ return="int"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getFreeBlocks"
+ return="int"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="restat"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="path" type="java.lang.String">
+</parameter>
+</method>
+</class>
+<class name="SystemClock"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="currentThreadTimeMillis"
+ return="long"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="elapsedRealtime"
+ return="long"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="setCurrentTimeMillis"
+ return="boolean"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="millis" type="long">
+</parameter>
+</method>
+<method name="sleep"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="ms" type="long">
+</parameter>
+</method>
+<method name="uptimeMillis"
+ return="long"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+</class>
+<class name="TokenWatcher"
+ extends="java.lang.Object"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="TokenWatcher"
+ type="android.os.TokenWatcher"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="h" type="android.os.Handler">
+</parameter>
+<parameter name="tag" type="java.lang.String">
+</parameter>
+</constructor>
+<method name="acquire"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="token" type="android.os.IBinder">
+</parameter>
+<parameter name="tag" type="java.lang.String">
+</parameter>
+</method>
+<method name="acquired"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="cleanup"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="token" type="android.os.IBinder">
+</parameter>
+<parameter name="unlink" type="boolean">
+</parameter>
+</method>
+<method name="dump"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isAcquired"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="release"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="token" type="android.os.IBinder">
+</parameter>
+</method>
+<method name="released"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+</class>
+<class name="Vibrator"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="cancel"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="vibrate"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="milliseconds" type="long">
+</parameter>
+</method>
+<method name="vibrate"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="pattern" type="long[]">
+</parameter>
+<parameter name="repeat" type="int">
+</parameter>
+</method>
+</class>
+</package>
+<package name="android.preference"
+>
+<class name="CheckBoxPreference"
+ extends="android.preference.Preference"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="CheckBoxPreference"
+ type="android.preference.CheckBoxPreference"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="context" type="android.content.Context">
+</parameter>
+<parameter name="attrs" type="android.util.AttributeSet">
+</parameter>
+<parameter name="defStyle" type="int">
+</parameter>
+</constructor>
+<constructor name="CheckBoxPreference"
+ type="android.preference.CheckBoxPreference"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="context" type="android.content.Context">
+</parameter>
+<parameter name="attrs" type="android.util.AttributeSet">
+</parameter>
+</constructor>
+<constructor name="CheckBoxPreference"
+ type="android.preference.CheckBoxPreference"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="context" type="android.content.Context">
+</parameter>
+</constructor>
+<method name="getDisableDependentsState"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getSummaryOff"
+ return="java.lang.CharSequence"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getSummaryOn"
+ return="java.lang.CharSequence"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isChecked"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="setChecked"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="checked" type="boolean">
+</parameter>
+</method>
+<method name="setDisableDependentsState"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="disableDependentsState" type="boolean">
+</parameter>
+</method>
+<method name="setSummaryOff"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="summary" type="java.lang.CharSequence">
+</parameter>
+</method>
+<method name="setSummaryOff"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="summaryResId" type="int">
+</parameter>
+</method>
+<method name="setSummaryOn"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="summary" type="java.lang.CharSequence">
+</parameter>
+</method>
+<method name="setSummaryOn"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="summaryResId" type="int">
+</parameter>
+</method>
+</class>
+<class name="DialogPreference"
+ extends="android.preference.Preference"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="android.content.DialogInterface.OnClickListener">
+</implements>
+<implements name="android.content.DialogInterface.OnDismissListener">
+</implements>
+<implements name="android.preference.PreferenceManager.OnActivityDestroyListener">
+</implements>
+<constructor name="DialogPreference"
+ type="android.preference.DialogPreference"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="context" type="android.content.Context">
+</parameter>
+<parameter name="attrs" type="android.util.AttributeSet">
+</parameter>
+<parameter name="defStyle" type="int">
+</parameter>
+</constructor>
+<constructor name="DialogPreference"
+ type="android.preference.DialogPreference"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="context" type="android.content.Context">
+</parameter>
+<parameter name="attrs" type="android.util.AttributeSet">
+</parameter>
+</constructor>
+<method name="getDialog"
+ return="android.app.Dialog"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getDialogIcon"
+ return="android.graphics.drawable.Drawable"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getDialogLayoutResource"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getDialogMessage"
+ return="java.lang.CharSequence"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getDialogTitle"
+ return="java.lang.CharSequence"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getNegativeButtonText"
+ return="java.lang.CharSequence"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getPositiveButtonText"
+ return="java.lang.CharSequence"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="onActivityDestroy"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="onBindDialogView"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="view" type="android.view.View">
+</parameter>
+</method>
+<method name="onClick"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="dialog" type="android.content.DialogInterface">
+</parameter>
+<parameter name="which" type="int">
+</parameter>
+</method>
+<method name="onCreateDialogView"
+ return="android.view.View"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</method>
+<method name="onDialogClosed"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="positiveResult" type="boolean">
+</parameter>
+</method>
+<method name="onDismiss"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="dialog" type="android.content.DialogInterface">
+</parameter>
+</method>
+<method name="onPrepareDialogBuilder"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="builder" type="android.app.AlertDialog.Builder">
+</parameter>
+</method>
+<method name="setDialogIcon"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="dialogIcon" type="android.graphics.drawable.Drawable">
+</parameter>
+</method>
+<method name="setDialogIcon"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="dialogIconRes" type="int">
+</parameter>
+</method>
+<method name="setDialogLayoutResource"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="dialogLayoutResId" type="int">
+</parameter>
+</method>
+<method name="setDialogMessage"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="dialogMessage" type="java.lang.CharSequence">
+</parameter>
+</method>
+<method name="setDialogMessage"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="dialogMessageResId" type="int">
+</parameter>
+</method>
+<method name="setDialogTitle"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="dialogTitle" type="java.lang.CharSequence">
+</parameter>
+</method>
+<method name="setDialogTitle"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="dialogTitleResId" type="int">
+</parameter>
+</method>
+<method name="setNegativeButtonText"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="negativeButtonText" type="java.lang.CharSequence">
+</parameter>
+</method>
+<method name="setNegativeButtonText"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="negativeButtonTextResId" type="int">
+</parameter>
+</method>
+<method name="setPositiveButtonText"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="positiveButtonText" type="java.lang.CharSequence">
+</parameter>
+</method>
+<method name="setPositiveButtonText"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="positiveButtonTextResId" type="int">
+</parameter>
+</method>
+<method name="showDialog"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="state" type="android.os.Bundle">
+</parameter>
+</method>
+</class>
+<class name="EditTextPreference"
+ extends="android.preference.DialogPreference"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="EditTextPreference"
+ type="android.preference.EditTextPreference"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="context" type="android.content.Context">
+</parameter>
+<parameter name="attrs" type="android.util.AttributeSet">
+</parameter>
+<parameter name="defStyle" type="int">
+</parameter>
+</constructor>
+<constructor name="EditTextPreference"
+ type="android.preference.EditTextPreference"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="context" type="android.content.Context">
+</parameter>
+<parameter name="attrs" type="android.util.AttributeSet">
+</parameter>
+</constructor>
+<constructor name="EditTextPreference"
+ type="android.preference.EditTextPreference"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="context" type="android.content.Context">
+</parameter>
+</constructor>
+<method name="getEditText"
+ return="android.widget.EditText"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getText"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="onAddEditTextToDialogView"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="dialogView" type="android.view.View">
+</parameter>
+<parameter name="editText" type="android.widget.EditText">
+</parameter>
+</method>
+<method name="setText"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="text" type="java.lang.String">
+</parameter>
+</method>
+</class>
+<class name="ListPreference"
+ extends="android.preference.DialogPreference"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="ListPreference"
+ type="android.preference.ListPreference"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="context" type="android.content.Context">
+</parameter>
+<parameter name="attrs" type="android.util.AttributeSet">
+</parameter>
+</constructor>
+<constructor name="ListPreference"
+ type="android.preference.ListPreference"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="context" type="android.content.Context">
+</parameter>
+</constructor>
+<method name="findIndexOfValue"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="value" type="java.lang.String">
+</parameter>
+</method>
+<method name="getEntries"
+ return="java.lang.CharSequence[]"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getEntry"
+ return="java.lang.CharSequence"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getEntryValues"
+ return="java.lang.CharSequence[]"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getValue"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="setEntries"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="entries" type="java.lang.CharSequence[]">
+</parameter>
+</method>
+<method name="setEntries"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="entriesResId" type="int">
+</parameter>
+</method>
+<method name="setEntryValues"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="entryValues" type="java.lang.CharSequence[]">
+</parameter>
+</method>
+<method name="setEntryValues"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="entryValuesResId" type="int">
+</parameter>
+</method>
+<method name="setValue"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="value" type="java.lang.String">
+</parameter>
+</method>
+<method name="setValueIndex"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="index" type="int">
+</parameter>
+</method>
+</class>
+<class name="Preference"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="java.lang.Comparable">
+</implements>
+<constructor name="Preference"
+ type="android.preference.Preference"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="context" type="android.content.Context">
+</parameter>
+<parameter name="attrs" type="android.util.AttributeSet">
+</parameter>
+<parameter name="defStyle" type="int">
+</parameter>
+</constructor>
+<constructor name="Preference"
+ type="android.preference.Preference"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="context" type="android.content.Context">
+</parameter>
+<parameter name="attrs" type="android.util.AttributeSet">
+</parameter>
+</constructor>
+<constructor name="Preference"
+ type="android.preference.Preference"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="context" type="android.content.Context">
+</parameter>
+</constructor>
+<method name="callChangeListener"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="newValue" type="java.lang.Object">
+</parameter>
+</method>
+<method name="compareTo"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="another" type="android.preference.Preference">
+</parameter>
+</method>
+<method name="findPreferenceInHierarchy"
+ return="android.preference.Preference"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="key" type="java.lang.String">
+</parameter>
+</method>
+<method name="getContext"
+ return="android.content.Context"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getDependency"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getEditor"
+ return="android.content.SharedPreferences.Editor"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getIntent"
+ return="android.content.Intent"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getKey"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getLayoutResource"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getOnPreferenceChangeListener"
+ return="android.preference.Preference.OnPreferenceChangeListener"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getOnPreferenceClickListener"
+ return="android.preference.Preference.OnPreferenceClickListener"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getOrder"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getPersistedBoolean"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="defaultReturnValue" type="boolean">
+</parameter>
+</method>
+<method name="getPersistedFloat"
+ return="float"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="defaultReturnValue" type="float">
+</parameter>
+</method>
+<method name="getPersistedInt"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="defaultReturnValue" type="int">
+</parameter>
+</method>
+<method name="getPersistedLong"
+ return="long"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="defaultReturnValue" type="long">
+</parameter>
+</method>
+<method name="getPersistedString"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="defaultReturnValue" type="java.lang.String">
+</parameter>
+</method>
+<method name="getPreferenceManager"
+ return="android.preference.PreferenceManager"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getSharedPreferences"
+ return="android.content.SharedPreferences"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getShouldDisableView"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getSummary"
+ return="java.lang.CharSequence"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getTitle"
+ return="java.lang.CharSequence"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getView"
+ return="android.view.View"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="convertView" type="android.view.View">
+</parameter>
+<parameter name="parent" type="android.view.ViewGroup">
+</parameter>
+</method>
+<method name="getWidgetLayoutResource"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="hasKey"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isEnabled"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isPersistent"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isSelectable"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="notifyChanged"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</method>
+<method name="notifyDependencyChange"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="disableDependents" type="boolean">
+</parameter>
+</method>
+<method name="notifyHierarchyChanged"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</method>
+<method name="onAttachedToActivity"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</method>
+<method name="onAttachedToHierarchy"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="preferenceManager" type="android.preference.PreferenceManager">
+</parameter>
+</method>
+<method name="onBindView"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="view" type="android.view.View">
+</parameter>
+</method>
+<method name="onClick"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</method>
+<method name="onCreateView"
+ return="android.view.View"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="parent" type="android.view.ViewGroup">
+</parameter>
+</method>
+<method name="onDependencyChanged"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="dependency" type="android.preference.Preference">
+</parameter>
+<parameter name="disableDependent" type="boolean">
+</parameter>
+</method>
+<method name="onGetDefaultValue"
+ return="java.lang.Object"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="a" type="android.content.res.TypedArray">
+</parameter>
+<parameter name="index" type="int">
+</parameter>
+</method>
+<method name="onPrepareForRemoval"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</method>
+<method name="onRestoreInstanceState"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="state" type="android.os.Parcelable">
+</parameter>
+</method>
+<method name="onSaveInstanceState"
+ return="android.os.Parcelable"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</method>
+<method name="onSetInitialValue"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="restorePersistedValue" type="boolean">
+</parameter>
+<parameter name="defaultValue" type="java.lang.Object">
+</parameter>
+</method>
+<method name="persistBoolean"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="value" type="boolean">
+</parameter>
+</method>
+<method name="persistFloat"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="value" type="float">
+</parameter>
+</method>
+<method name="persistInt"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="value" type="int">
+</parameter>
+</method>
+<method name="persistLong"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="value" type="long">
+</parameter>
+</method>
+<method name="persistString"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="value" type="java.lang.String">
+</parameter>
+</method>
+<method name="restoreHierarchyState"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="container" type="android.os.Bundle">
+</parameter>
+</method>
+<method name="saveHierarchyState"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="container" type="android.os.Bundle">
+</parameter>
+</method>
+<method name="setDefaultValue"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="defaultValue" type="java.lang.Object">
+</parameter>
+</method>
+<method name="setDependency"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="dependencyKey" type="java.lang.String">
+</parameter>
+</method>
+<method name="setEnabled"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="enabled" type="boolean">
+</parameter>
+</method>
+<method name="setIntent"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="intent" type="android.content.Intent">
+</parameter>
+</method>
+<method name="setKey"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="key" type="java.lang.String">
+</parameter>
+</method>
+<method name="setLayoutResource"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="layoutResId" type="int">
+</parameter>
+</method>
+<method name="setOnPreferenceChangeListener"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="onPreferenceChangeListener" type="android.preference.Preference.OnPreferenceChangeListener">
+</parameter>
+</method>
+<method name="setOnPreferenceClickListener"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="onPreferenceClickListener" type="android.preference.Preference.OnPreferenceClickListener">
+</parameter>
+</method>
+<method name="setOrder"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="order" type="int">
+</parameter>
+</method>
+<method name="setPersistent"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="persistent" type="boolean">
+</parameter>
+</method>
+<method name="setSelectable"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="selectable" type="boolean">
+</parameter>
+</method>
+<method name="setShouldDisableView"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="shouldDisableView" type="boolean">
+</parameter>
+</method>
+<method name="setSummary"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="summary" type="java.lang.CharSequence">
+</parameter>
+</method>
+<method name="setSummary"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="summaryResId" type="int">
+</parameter>
+</method>
+<method name="setTitle"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="title" type="java.lang.CharSequence">
+</parameter>
+</method>
+<method name="setTitle"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="titleResId" type="int">
+</parameter>
+</method>
+<method name="setWidgetLayoutResource"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="widgetLayoutResId" type="int">
+</parameter>
+</method>
+<method name="shouldCommit"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="shouldDisableDependents"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="shouldPersist"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</method>
+<field name="DEFAULT_ORDER"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2147483647"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<class name="Preference.BaseSavedState"
+ extends="android.view.AbsSavedState"
+ abstract="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="Preference.BaseSavedState"
+ type="android.preference.Preference.BaseSavedState"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="source" type="android.os.Parcel">
+</parameter>
+</constructor>
+<constructor name="Preference.BaseSavedState"
+ type="android.preference.Preference.BaseSavedState"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="superState" type="android.os.Parcelable">
+</parameter>
+</constructor>
+<field name="CREATOR"
+ type="android.os.Parcelable.Creator"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<interface name="Preference.OnPreferenceChangeListener"
+ abstract="true"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="onPreferenceChange"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="preference" type="android.preference.Preference">
+</parameter>
+<parameter name="newValue" type="java.lang.Object">
+</parameter>
+</method>
+</interface>
+<interface name="Preference.OnPreferenceClickListener"
+ abstract="true"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="onPreferenceClick"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="preference" type="android.preference.Preference">
+</parameter>
+</method>
+</interface>
+<class name="PreferenceActivity"
+ extends="android.app.ListActivity"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="PreferenceActivity"
+ type="android.preference.PreferenceActivity"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<method name="addPreferencesFromIntent"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="intent" type="android.content.Intent">
+</parameter>
+</method>
+<method name="addPreferencesFromResource"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="preferencesResId" type="int">
+</parameter>
+</method>
+<method name="findPreference"
+ return="android.preference.Preference"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="key" type="java.lang.CharSequence">
+</parameter>
+</method>
+<method name="getPreferenceManager"
+ return="android.preference.PreferenceManager"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getPreferenceScreen"
+ return="android.preference.PreferenceScreen"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="onPreferenceTreeClick"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="preferenceScreen" type="android.preference.PreferenceScreen">
+</parameter>
+<parameter name="preference" type="android.preference.Preference">
+</parameter>
+</method>
+<method name="setPreferenceScreen"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="preferenceScreen" type="android.preference.PreferenceScreen">
+</parameter>
+</method>
+</class>
+<class name="PreferenceCategory"
+ extends="android.preference.PreferenceGroup"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="PreferenceCategory"
+ type="android.preference.PreferenceCategory"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="context" type="android.content.Context">
+</parameter>
+<parameter name="attrs" type="android.util.AttributeSet">
+</parameter>
+<parameter name="defStyle" type="int">
+</parameter>
+</constructor>
+<constructor name="PreferenceCategory"
+ type="android.preference.PreferenceCategory"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="context" type="android.content.Context">
+</parameter>
+<parameter name="attrs" type="android.util.AttributeSet">
+</parameter>
+</constructor>
+<constructor name="PreferenceCategory"
+ type="android.preference.PreferenceCategory"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="context" type="android.content.Context">
+</parameter>
+</constructor>
+</class>
+<class name="PreferenceGroup"
+ extends="android.preference.Preference"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="PreferenceGroup"
+ type="android.preference.PreferenceGroup"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="context" type="android.content.Context">
+</parameter>
+<parameter name="attrs" type="android.util.AttributeSet">
+</parameter>
+<parameter name="defStyle" type="int">
+</parameter>
+</constructor>
+<constructor name="PreferenceGroup"
+ type="android.preference.PreferenceGroup"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="context" type="android.content.Context">
+</parameter>
+<parameter name="attrs" type="android.util.AttributeSet">
+</parameter>
+</constructor>
+<method name="addItemFromInflater"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="preference" type="android.preference.Preference">
+</parameter>
+</method>
+<method name="addPreference"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="preference" type="android.preference.Preference">
+</parameter>
+</method>
+<method name="dispatchRestoreInstanceState"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="container" type="android.os.Bundle">
+</parameter>
+</method>
+<method name="dispatchSaveInstanceState"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="container" type="android.os.Bundle">
+</parameter>
+</method>
+<method name="findPreference"
+ return="android.preference.Preference"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="key" type="java.lang.CharSequence">
+</parameter>
+</method>
+<method name="getPreference"
+ return="android.preference.Preference"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="index" type="int">
+</parameter>
+</method>
+<method name="getPreferenceCount"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isOnSameScreenAsChildren"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</method>
+<method name="isOrderingAsAdded"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="onPrepareAddPreference"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="preference" type="android.preference.Preference">
+</parameter>
+</method>
+<method name="removeAll"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="removePreference"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="preference" type="android.preference.Preference">
+</parameter>
+</method>
+<method name="setOrderingAsAdded"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="orderingAsAdded" type="boolean">
+</parameter>
+</method>
+</class>
+<class name="PreferenceManager"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="createPreferenceScreen"
+ return="android.preference.PreferenceScreen"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="context" type="android.content.Context">
+</parameter>
+</method>
+<method name="findPreference"
+ return="android.preference.Preference"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="key" type="java.lang.CharSequence">
+</parameter>
+</method>
+<method name="getDefaultSharedPreferences"
+ return="android.content.SharedPreferences"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="context" type="android.content.Context">
+</parameter>
+</method>
+<method name="getSharedPreferences"
+ return="android.content.SharedPreferences"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getSharedPreferencesMode"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getSharedPreferencesName"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="setDefaultValues"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="context" type="android.content.Context">
+</parameter>
+<parameter name="resId" type="int">
+</parameter>
+<parameter name="readAgain" type="boolean">
+</parameter>
+</method>
+<method name="setDefaultValues"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="context" type="android.content.Context">
+</parameter>
+<parameter name="sharedPreferencesName" type="java.lang.String">
+</parameter>
+<parameter name="sharedPreferencesMode" type="int">
+</parameter>
+<parameter name="resId" type="int">
+</parameter>
+<parameter name="readAgain" type="boolean">
+</parameter>
+</method>
+<method name="setSharedPreferencesMode"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="sharedPreferencesMode" type="int">
+</parameter>
+</method>
+<method name="setSharedPreferencesName"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="sharedPreferencesName" type="java.lang.String">
+</parameter>
+</method>
+<field name="KEY_HAS_SET_DEFAULT_VALUES"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;_has_set_default_values&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="METADATA_KEY_PREFERENCES"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.preference&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<interface name="PreferenceManager.OnActivityDestroyListener"
+ abstract="true"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="onActivityDestroy"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+</interface>
+<interface name="PreferenceManager.OnActivityResultListener"
+ abstract="true"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="onActivityResult"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="requestCode" type="int">
+</parameter>
+<parameter name="resultCode" type="int">
+</parameter>
+<parameter name="data" type="android.content.Intent">
+</parameter>
+</method>
+</interface>
+<interface name="PreferenceManager.OnActivityStopListener"
+ abstract="true"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="onActivityStop"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+</interface>
+<class name="PreferenceScreen"
+ extends="android.preference.PreferenceGroup"
+ abstract="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="android.widget.AdapterView.OnItemClickListener">
+</implements>
+<implements name="android.content.DialogInterface.OnDismissListener">
+</implements>
+<method name="bind"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="listView" type="android.widget.ListView">
+</parameter>
+</method>
+<method name="getDialog"
+ return="android.app.Dialog"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getRootAdapter"
+ return="android.widget.ListAdapter"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="onCreateRootAdapter"
+ return="android.widget.ListAdapter"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</method>
+<method name="onDismiss"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="dialog" type="android.content.DialogInterface">
+</parameter>
+</method>
+<method name="onItemClick"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="parent" type="android.widget.AdapterView">
+</parameter>
+<parameter name="view" type="android.view.View">
+</parameter>
+<parameter name="position" type="int">
+</parameter>
+<parameter name="id" type="long">
+</parameter>
+</method>
+</class>
+<class name="RingtonePreference"
+ extends="android.preference.Preference"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="android.preference.PreferenceManager.OnActivityResultListener">
+</implements>
+<constructor name="RingtonePreference"
+ type="android.preference.RingtonePreference"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="context" type="android.content.Context">
+</parameter>
+<parameter name="attrs" type="android.util.AttributeSet">
+</parameter>
+<parameter name="defStyle" type="int">
+</parameter>
+</constructor>
+<constructor name="RingtonePreference"
+ type="android.preference.RingtonePreference"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="context" type="android.content.Context">
+</parameter>
+<parameter name="attrs" type="android.util.AttributeSet">
+</parameter>
+</constructor>
+<constructor name="RingtonePreference"
+ type="android.preference.RingtonePreference"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="context" type="android.content.Context">
+</parameter>
+</constructor>
+<method name="getRingtoneType"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getShowDefault"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getShowSilent"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="onActivityResult"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="requestCode" type="int">
+</parameter>
+<parameter name="resultCode" type="int">
+</parameter>
+<parameter name="data" type="android.content.Intent">
+</parameter>
+</method>
+<method name="onPrepareRingtonePickerIntent"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="ringtonePickerIntent" type="android.content.Intent">
+</parameter>
+</method>
+<method name="onRestoreRingtone"
+ return="android.net.Uri"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</method>
+<method name="onSaveRingtone"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="ringtoneUri" type="android.net.Uri">
+</parameter>
+</method>
+<method name="setRingtoneType"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="type" type="int">
+</parameter>
+</method>
+<method name="setShowDefault"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="showDefault" type="boolean">
+</parameter>
+</method>
+<method name="setShowSilent"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="showSilent" type="boolean">
+</parameter>
+</method>
+</class>
+</package>
+<package name="android.provider"
+>
+<interface name="BaseColumns"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<field name="_COUNT"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;_count&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="_ID"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;_id&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</interface>
+<class name="Browser"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="Browser"
+ type="android.provider.Browser"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<method name="addSearchUrl"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="cr" type="android.content.ContentResolver">
+</parameter>
+<parameter name="search" type="java.lang.String">
+</parameter>
+</method>
+<method name="canClearHistory"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="cr" type="android.content.ContentResolver">
+</parameter>
+</method>
+<method name="clearHistory"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="cr" type="android.content.ContentResolver">
+</parameter>
+</method>
+<method name="clearSearches"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="cr" type="android.content.ContentResolver">
+</parameter>
+</method>
+<method name="deleteFromHistory"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="cr" type="android.content.ContentResolver">
+</parameter>
+<parameter name="url" type="java.lang.String">
+</parameter>
+</method>
+<method name="deleteHistoryTimeFrame"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="cr" type="android.content.ContentResolver">
+</parameter>
+<parameter name="begin" type="long">
+</parameter>
+<parameter name="end" type="long">
+</parameter>
+</method>
+<method name="getAllBookmarks"
+ return="android.database.Cursor"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="cr" type="android.content.ContentResolver">
+</parameter>
+<exception name="IllegalStateException" type="java.lang.IllegalStateException">
+</exception>
+</method>
+<method name="getAllVisitedUrls"
+ return="android.database.Cursor"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="cr" type="android.content.ContentResolver">
+</parameter>
+<exception name="IllegalStateException" type="java.lang.IllegalStateException">
+</exception>
+</method>
+<method name="requestAllIcons"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="cr" type="android.content.ContentResolver">
+</parameter>
+<parameter name="where" type="java.lang.String">
+</parameter>
+<parameter name="listener" type="android.webkit.WebIconDatabase.IconListener">
+</parameter>
+</method>
+<method name="saveBookmark"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="c" type="android.content.Context">
+</parameter>
+<parameter name="title" type="java.lang.String">
+</parameter>
+<parameter name="url" type="java.lang.String">
+</parameter>
+</method>
+<method name="sendString"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="c" type="android.content.Context">
+</parameter>
+<parameter name="s" type="java.lang.String">
+</parameter>
+</method>
+<method name="truncateHistory"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="cr" type="android.content.ContentResolver">
+</parameter>
+</method>
+<method name="updateVisitedHistory"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="cr" type="android.content.ContentResolver">
+</parameter>
+<parameter name="url" type="java.lang.String">
+</parameter>
+<parameter name="real" type="boolean">
+</parameter>
+</method>
+<field name="BOOKMARKS_URI"
+ type="android.net.Uri"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="EXTRA_APPLICATION_ID"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;com.android.browser.application_id&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="EXTRA_HEADERS"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;com.android.browser.headers&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="HISTORY_PROJECTION"
+ type="java.lang.String[]"
+ transient="false"
+ volatile="false"
+ value="null"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="HISTORY_PROJECTION_BOOKMARK_INDEX"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="4"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="HISTORY_PROJECTION_DATE_INDEX"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="3"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="HISTORY_PROJECTION_FAVICON_INDEX"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="6"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="HISTORY_PROJECTION_ID_INDEX"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="0"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="HISTORY_PROJECTION_TITLE_INDEX"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="5"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="HISTORY_PROJECTION_URL_INDEX"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="HISTORY_PROJECTION_VISITS_INDEX"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="INITIAL_ZOOM_LEVEL"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;browser.initialZoomLevel&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="SEARCHES_PROJECTION"
+ type="java.lang.String[]"
+ transient="false"
+ volatile="false"
+ value="null"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="SEARCHES_PROJECTION_DATE_INDEX"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="SEARCHES_PROJECTION_SEARCH_INDEX"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="SEARCHES_URI"
+ type="android.net.Uri"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TRUNCATE_HISTORY_PROJECTION"
+ type="java.lang.String[]"
+ transient="false"
+ volatile="false"
+ value="null"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TRUNCATE_HISTORY_PROJECTION_ID_INDEX"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="0"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TRUNCATE_N_OLDEST"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="5"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<class name="Browser.BookmarkColumns"
+ extends="java.lang.Object"
+ abstract="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="android.provider.BaseColumns">
+</implements>
+<constructor name="Browser.BookmarkColumns"
+ type="android.provider.Browser.BookmarkColumns"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<field name="BOOKMARK"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;bookmark&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="CREATED"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;created&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="DATE"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;date&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="FAVICON"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;favicon&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TITLE"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;title&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="URL"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;url&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="VISITS"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;visits&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<class name="Browser.SearchColumns"
+ extends="java.lang.Object"
+ abstract="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="android.provider.BaseColumns">
+</implements>
+<constructor name="Browser.SearchColumns"
+ type="android.provider.Browser.SearchColumns"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<field name="DATE"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;date&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="SEARCH"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;search&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="URL"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;url&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<class name="CallLog"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="CallLog"
+ type="android.provider.CallLog"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<field name="AUTHORITY"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;call_log&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="CONTENT_URI"
+ type="android.net.Uri"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<class name="CallLog.Calls"
+ extends="java.lang.Object"
+ abstract="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="android.provider.BaseColumns">
+</implements>
+<constructor name="CallLog.Calls"
+ type="android.provider.CallLog.Calls"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<method name="getLastOutgoingCall"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="context" type="android.content.Context">
+</parameter>
+</method>
+<field name="CACHED_NAME"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;name&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="CACHED_NUMBER_LABEL"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;numberlabel&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="CACHED_NUMBER_TYPE"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;numbertype&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="CONTENT_FILTER_URI"
+ type="android.net.Uri"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="CONTENT_ITEM_TYPE"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;vnd.android.cursor.item/calls&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="CONTENT_TYPE"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;vnd.android.cursor.dir/calls&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="CONTENT_URI"
+ type="android.net.Uri"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="DATE"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;date&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="DEFAULT_SORT_ORDER"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;date DESC&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="DURATION"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;duration&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="INCOMING_TYPE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="MISSED_TYPE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="3"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="NEW"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;new&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="NUMBER"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;number&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="OUTGOING_TYPE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TYPE"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;type&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<class name="Contacts"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="deprecated"
+ visibility="public"
+>
+<field name="AUTHORITY"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;contacts&quot;"
+ static="true"
+ final="true"
+ deprecated="deprecated"
+ visibility="public"
+>
+</field>
+<field name="CONTENT_URI"
+ type="android.net.Uri"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="deprecated"
+ visibility="public"
+>
+</field>
+<field name="KIND_EMAIL"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1"
+ static="true"
+ final="true"
+ deprecated="deprecated"
+ visibility="public"
+>
+</field>
+<field name="KIND_IM"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="3"
+ static="true"
+ final="true"
+ deprecated="deprecated"
+ visibility="public"
+>
+</field>
+<field name="KIND_ORGANIZATION"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="4"
+ static="true"
+ final="true"
+ deprecated="deprecated"
+ visibility="public"
+>
+</field>
+<field name="KIND_PHONE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="5"
+ static="true"
+ final="true"
+ deprecated="deprecated"
+ visibility="public"
+>
+</field>
+<field name="KIND_POSTAL"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2"
+ static="true"
+ final="true"
+ deprecated="deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<class name="Contacts.ContactMethods"
+ extends="java.lang.Object"
+ abstract="false"
+ static="true"
+ final="true"
+ deprecated="deprecated"
+ visibility="public"
+>
+<implements name="android.provider.BaseColumns">
+</implements>
+<implements name="android.provider.Contacts.ContactMethodsColumns">
+</implements>
+<implements name="android.provider.Contacts.PeopleColumns">
+</implements>
+<method name="addPostalLocation"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="deprecated"
+ visibility="public"
+>
+<parameter name="context" type="android.content.Context">
+</parameter>
+<parameter name="postalId" type="long">
+</parameter>
+<parameter name="latitude" type="double">
+</parameter>
+<parameter name="longitude" type="double">
+</parameter>
+</method>
+<method name="decodeImProtocol"
+ return="java.lang.Object"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="deprecated"
+ visibility="public"
+>
+<parameter name="encodedString" type="java.lang.String">
+</parameter>
+</method>
+<method name="encodeCustomImProtocol"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="deprecated"
+ visibility="public"
+>
+<parameter name="protocolString" type="java.lang.String">
+</parameter>
+</method>
+<method name="encodePredefinedImProtocol"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="deprecated"
+ visibility="public"
+>
+<parameter name="protocol" type="int">
+</parameter>
+</method>
+<method name="getDisplayLabel"
+ return="java.lang.CharSequence"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="true"
+ deprecated="deprecated"
+ visibility="public"
+>
+<parameter name="context" type="android.content.Context">
+</parameter>
+<parameter name="kind" type="int">
+</parameter>
+<parameter name="type" type="int">
+</parameter>
+<parameter name="label" type="java.lang.CharSequence">
+</parameter>
+</method>
+<field name="CONTENT_EMAIL_ITEM_TYPE"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;vnd.android.cursor.item/email&quot;"
+ static="true"
+ final="true"
+ deprecated="deprecated"
+ visibility="public"
+>
+</field>
+<field name="CONTENT_EMAIL_TYPE"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;vnd.android.cursor.dir/email&quot;"
+ static="true"
+ final="true"
+ deprecated="deprecated"
+ visibility="public"
+>
+</field>
+<field name="CONTENT_EMAIL_URI"
+ type="android.net.Uri"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="deprecated"
+ visibility="public"
+>
+</field>
+<field name="CONTENT_IM_ITEM_TYPE"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;vnd.android.cursor.item/jabber-im&quot;"
+ static="true"
+ final="true"
+ deprecated="deprecated"
+ visibility="public"
+>
+</field>
+<field name="CONTENT_POSTAL_ITEM_TYPE"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;vnd.android.cursor.item/postal-address&quot;"
+ static="true"
+ final="true"
+ deprecated="deprecated"
+ visibility="public"
+>
+</field>
+<field name="CONTENT_POSTAL_TYPE"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;vnd.android.cursor.dir/postal-address&quot;"
+ static="true"
+ final="true"
+ deprecated="deprecated"
+ visibility="public"
+>
+</field>
+<field name="CONTENT_TYPE"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;vnd.android.cursor.dir/contact-methods&quot;"
+ static="true"
+ final="true"
+ deprecated="deprecated"
+ visibility="public"
+>
+</field>
+<field name="CONTENT_URI"
+ type="android.net.Uri"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="deprecated"
+ visibility="public"
+>
+</field>
+<field name="DEFAULT_SORT_ORDER"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;name ASC&quot;"
+ static="true"
+ final="true"
+ deprecated="deprecated"
+ visibility="public"
+>
+</field>
+<field name="PERSON_ID"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;person&quot;"
+ static="true"
+ final="true"
+ deprecated="deprecated"
+ visibility="public"
+>
+</field>
+<field name="POSTAL_LOCATION_LATITUDE"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;data&quot;"
+ static="true"
+ final="true"
+ deprecated="deprecated"
+ visibility="public"
+>
+</field>
+<field name="POSTAL_LOCATION_LONGITUDE"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;aux_data&quot;"
+ static="true"
+ final="true"
+ deprecated="deprecated"
+ visibility="public"
+>
+</field>
+<field name="PROTOCOL_AIM"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="0"
+ static="true"
+ final="true"
+ deprecated="deprecated"
+ visibility="public"
+>
+</field>
+<field name="PROTOCOL_GOOGLE_TALK"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="5"
+ static="true"
+ final="true"
+ deprecated="deprecated"
+ visibility="public"
+>
+</field>
+<field name="PROTOCOL_ICQ"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="6"
+ static="true"
+ final="true"
+ deprecated="deprecated"
+ visibility="public"
+>
+</field>
+<field name="PROTOCOL_JABBER"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="7"
+ static="true"
+ final="true"
+ deprecated="deprecated"
+ visibility="public"
+>
+</field>
+<field name="PROTOCOL_MSN"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1"
+ static="true"
+ final="true"
+ deprecated="deprecated"
+ visibility="public"
+>
+</field>
+<field name="PROTOCOL_QQ"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="4"
+ static="true"
+ final="true"
+ deprecated="deprecated"
+ visibility="public"
+>
+</field>
+<field name="PROTOCOL_SKYPE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="3"
+ static="true"
+ final="true"
+ deprecated="deprecated"
+ visibility="public"
+>
+</field>
+<field name="PROTOCOL_YAHOO"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2"
+ static="true"
+ final="true"
+ deprecated="deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<interface name="Contacts.ContactMethodsColumns"
+ abstract="true"
+ static="true"
+ final="false"
+ deprecated="deprecated"
+ visibility="public"
+>
+<field name="AUX_DATA"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;aux_data&quot;"
+ static="true"
+ final="true"
+ deprecated="deprecated"
+ visibility="public"
+>
+</field>
+<field name="DATA"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;data&quot;"
+ static="true"
+ final="true"
+ deprecated="deprecated"
+ visibility="public"
+>
+</field>
+<field name="ISPRIMARY"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;isprimary&quot;"
+ static="true"
+ final="true"
+ deprecated="deprecated"
+ visibility="public"
+>
+</field>
+<field name="KIND"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;kind&quot;"
+ static="true"
+ final="true"
+ deprecated="deprecated"
+ visibility="public"
+>
+</field>
+<field name="LABEL"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;label&quot;"
+ static="true"
+ final="true"
+ deprecated="deprecated"
+ visibility="public"
+>
+</field>
+<field name="TYPE"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;type&quot;"
+ static="true"
+ final="true"
+ deprecated="deprecated"
+ visibility="public"
+>
+</field>
+<field name="TYPE_CUSTOM"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="0"
+ static="true"
+ final="true"
+ deprecated="deprecated"
+ visibility="public"
+>
+</field>
+<field name="TYPE_HOME"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1"
+ static="true"
+ final="true"
+ deprecated="deprecated"
+ visibility="public"
+>
+</field>
+<field name="TYPE_OTHER"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="3"
+ static="true"
+ final="true"
+ deprecated="deprecated"
+ visibility="public"
+>
+</field>
+<field name="TYPE_WORK"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2"
+ static="true"
+ final="true"
+ deprecated="deprecated"
+ visibility="public"
+>
+</field>
+</interface>
+<class name="Contacts.Extensions"
+ extends="java.lang.Object"
+ abstract="false"
+ static="true"
+ final="true"
+ deprecated="deprecated"
+ visibility="public"
+>
+<implements name="android.provider.BaseColumns">
+</implements>
+<implements name="android.provider.Contacts.ExtensionsColumns">
+</implements>
+<field name="CONTENT_ITEM_TYPE"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;vnd.android.cursor.item/contact_extensions&quot;"
+ static="true"
+ final="true"
+ deprecated="deprecated"
+ visibility="public"
+>
+</field>
+<field name="CONTENT_TYPE"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;vnd.android.cursor.dir/contact_extensions&quot;"
+ static="true"
+ final="true"
+ deprecated="deprecated"
+ visibility="public"
+>
+</field>
+<field name="CONTENT_URI"
+ type="android.net.Uri"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="deprecated"
+ visibility="public"
+>
+</field>
+<field name="DEFAULT_SORT_ORDER"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;person, name ASC&quot;"
+ static="true"
+ final="true"
+ deprecated="deprecated"
+ visibility="public"
+>
+</field>
+<field name="PERSON_ID"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;person&quot;"
+ static="true"
+ final="true"
+ deprecated="deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<interface name="Contacts.ExtensionsColumns"
+ abstract="true"
+ static="true"
+ final="false"
+ deprecated="deprecated"
+ visibility="public"
+>
+<field name="NAME"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;name&quot;"
+ static="true"
+ final="true"
+ deprecated="deprecated"
+ visibility="public"
+>
+</field>
+<field name="VALUE"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;value&quot;"
+ static="true"
+ final="true"
+ deprecated="deprecated"
+ visibility="public"
+>
+</field>
+</interface>
+<class name="Contacts.GroupMembership"
+ extends="java.lang.Object"
+ abstract="false"
+ static="true"
+ final="true"
+ deprecated="deprecated"
+ visibility="public"
+>
+<implements name="android.provider.BaseColumns">
+</implements>
+<implements name="android.provider.Contacts.GroupsColumns">
+</implements>
+<field name="CONTENT_DIRECTORY"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;groupmembership&quot;"
+ static="true"
+ final="true"
+ deprecated="deprecated"
+ visibility="public"
+>
+</field>
+<field name="CONTENT_ITEM_TYPE"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;vnd.android.cursor.item/contactsgroupmembership&quot;"
+ static="true"
+ final="true"
+ deprecated="deprecated"
+ visibility="public"
+>
+</field>
+<field name="CONTENT_TYPE"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;vnd.android.cursor.dir/contactsgroupmembership&quot;"
+ static="true"
+ final="true"
+ deprecated="deprecated"
+ visibility="public"
+>
+</field>
+<field name="CONTENT_URI"
+ type="android.net.Uri"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="deprecated"
+ visibility="public"
+>
+</field>
+<field name="DEFAULT_SORT_ORDER"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;group_id ASC&quot;"
+ static="true"
+ final="true"
+ deprecated="deprecated"
+ visibility="public"
+>
+</field>
+<field name="GROUP_ID"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;group_id&quot;"
+ static="true"
+ final="true"
+ deprecated="deprecated"
+ visibility="public"
+>
+</field>
+<field name="GROUP_SYNC_ACCOUNT"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;group_sync_account&quot;"
+ static="true"
+ final="true"
+ deprecated="deprecated"
+ visibility="public"
+>
+</field>
+<field name="GROUP_SYNC_ACCOUNT_TYPE"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;group_sync_account_type&quot;"
+ static="true"
+ final="true"
+ deprecated="deprecated"
+ visibility="public"
+>
+</field>
+<field name="GROUP_SYNC_ID"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;group_sync_id&quot;"
+ static="true"
+ final="true"
+ deprecated="deprecated"
+ visibility="public"
+>
+</field>
+<field name="PERSON_ID"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;person&quot;"
+ static="true"
+ final="true"
+ deprecated="deprecated"
+ visibility="public"
+>
+</field>
+<field name="RAW_CONTENT_URI"
+ type="android.net.Uri"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<class name="Contacts.Groups"
+ extends="java.lang.Object"
+ abstract="false"
+ static="true"
+ final="true"
+ deprecated="deprecated"
+ visibility="public"
+>
+<implements name="android.provider.BaseColumns">
+</implements>
+<implements name="android.provider.Contacts.GroupsColumns">
+</implements>
+<field name="CONTENT_ITEM_TYPE"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;vnd.android.cursor.item/contactsgroup&quot;"
+ static="true"
+ final="true"
+ deprecated="deprecated"
+ visibility="public"
+>
+</field>
+<field name="CONTENT_TYPE"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;vnd.android.cursor.dir/contactsgroup&quot;"
+ static="true"
+ final="true"
+ deprecated="deprecated"
+ visibility="public"
+>
+</field>
+<field name="CONTENT_URI"
+ type="android.net.Uri"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="deprecated"
+ visibility="public"
+>
+</field>
+<field name="DEFAULT_SORT_ORDER"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;name ASC&quot;"
+ static="true"
+ final="true"
+ deprecated="deprecated"
+ visibility="public"
+>
+</field>
+<field name="DELETED_CONTENT_URI"
+ type="android.net.Uri"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="deprecated"
+ visibility="public"
+>
+</field>
+<field name="GROUP_ANDROID_STARRED"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;Starred in Android&quot;"
+ static="true"
+ final="true"
+ deprecated="deprecated"
+ visibility="public"
+>
+</field>
+<field name="GROUP_MY_CONTACTS"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;Contacts&quot;"
+ static="true"
+ final="true"
+ deprecated="deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<interface name="Contacts.GroupsColumns"
+ abstract="true"
+ static="true"
+ final="false"
+ deprecated="deprecated"
+ visibility="public"
+>
+<field name="NAME"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;name&quot;"
+ static="true"
+ final="true"
+ deprecated="deprecated"
+ visibility="public"
+>
+</field>
+<field name="NOTES"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;notes&quot;"
+ static="true"
+ final="true"
+ deprecated="deprecated"
+ visibility="public"
+>
+</field>
+<field name="SHOULD_SYNC"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;should_sync&quot;"
+ static="true"
+ final="true"
+ deprecated="deprecated"
+ visibility="public"
+>
+</field>
+<field name="SYSTEM_ID"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;system_id&quot;"
+ static="true"
+ final="true"
+ deprecated="deprecated"
+ visibility="public"
+>
+</field>
+</interface>
+<class name="Contacts.Intents"
+ extends="java.lang.Object"
+ abstract="false"
+ static="true"
+ final="true"
+ deprecated="deprecated"
+ visibility="public"
+>
+<constructor name="Contacts.Intents"
+ type="android.provider.Contacts.Intents"
+ static="false"
+ final="false"
+ deprecated="deprecated"
+ visibility="public"
+>
+</constructor>
+<field name="ATTACH_IMAGE"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;com.android.contacts.action.ATTACH_IMAGE&quot;"
+ static="true"
+ final="true"
+ deprecated="deprecated"
+ visibility="public"
+>
+</field>
+<field name="EXTRA_CREATE_DESCRIPTION"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;com.android.contacts.action.CREATE_DESCRIPTION&quot;"
+ static="true"
+ final="true"
+ deprecated="deprecated"
+ visibility="public"
+>
+</field>
+<field name="EXTRA_FORCE_CREATE"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;com.android.contacts.action.FORCE_CREATE&quot;"
+ static="true"
+ final="true"
+ deprecated="deprecated"
+ visibility="public"
+>
+</field>
+<field name="SEARCH_SUGGESTION_CLICKED"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.provider.Contacts.SEARCH_SUGGESTION_CLICKED&quot;"
+ static="true"
+ final="true"
+ deprecated="deprecated"
+ visibility="public"
+>
+</field>
+<field name="SEARCH_SUGGESTION_CREATE_CONTACT_CLICKED"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.provider.Contacts.SEARCH_SUGGESTION_CREATE_CONTACT_CLICKED&quot;"
+ static="true"
+ final="true"
+ deprecated="deprecated"
+ visibility="public"
+>
+</field>
+<field name="SEARCH_SUGGESTION_DIAL_NUMBER_CLICKED"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.provider.Contacts.SEARCH_SUGGESTION_DIAL_NUMBER_CLICKED&quot;"
+ static="true"
+ final="true"
+ deprecated="deprecated"
+ visibility="public"
+>
+</field>
+<field name="SHOW_OR_CREATE_CONTACT"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;com.android.contacts.action.SHOW_OR_CREATE_CONTACT&quot;"
+ static="true"
+ final="true"
+ deprecated="deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<class name="Contacts.Intents.Insert"
+ extends="java.lang.Object"
+ abstract="false"
+ static="true"
+ final="true"
+ deprecated="deprecated"
+ visibility="public"
+>
+<constructor name="Contacts.Intents.Insert"
+ type="android.provider.Contacts.Intents.Insert"
+ static="false"
+ final="false"
+ deprecated="deprecated"
+ visibility="public"
+>
+</constructor>
+<field name="ACTION"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.intent.action.INSERT&quot;"
+ static="true"
+ final="true"
+ deprecated="deprecated"
+ visibility="public"
+>
+</field>
+<field name="COMPANY"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;company&quot;"
+ static="true"
+ final="true"
+ deprecated="deprecated"
+ visibility="public"
+>
+</field>
+<field name="EMAIL"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;email&quot;"
+ static="true"
+ final="true"
+ deprecated="deprecated"
+ visibility="public"
+>
+</field>
+<field name="EMAIL_ISPRIMARY"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;email_isprimary&quot;"
+ static="true"
+ final="true"
+ deprecated="deprecated"
+ visibility="public"
+>
+</field>
+<field name="EMAIL_TYPE"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;email_type&quot;"
+ static="true"
+ final="true"
+ deprecated="deprecated"
+ visibility="public"
+>
+</field>
+<field name="FULL_MODE"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;full_mode&quot;"
+ static="true"
+ final="true"
+ deprecated="deprecated"
+ visibility="public"
+>
+</field>
+<field name="IM_HANDLE"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;im_handle&quot;"
+ static="true"
+ final="true"
+ deprecated="deprecated"
+ visibility="public"
+>
+</field>
+<field name="IM_ISPRIMARY"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;im_isprimary&quot;"
+ static="true"
+ final="true"
+ deprecated="deprecated"
+ visibility="public"
+>
+</field>
+<field name="IM_PROTOCOL"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;im_protocol&quot;"
+ static="true"
+ final="true"
+ deprecated="deprecated"
+ visibility="public"
+>
+</field>
+<field name="JOB_TITLE"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;job_title&quot;"
+ static="true"
+ final="true"
+ deprecated="deprecated"
+ visibility="public"
+>
+</field>
+<field name="NAME"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;name&quot;"
+ static="true"
+ final="true"
+ deprecated="deprecated"
+ visibility="public"
+>
+</field>
+<field name="NOTES"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;notes&quot;"
+ static="true"
+ final="true"
+ deprecated="deprecated"
+ visibility="public"
+>
+</field>
+<field name="PHONE"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;phone&quot;"
+ static="true"
+ final="true"
+ deprecated="deprecated"
+ visibility="public"
+>
+</field>
+<field name="PHONETIC_NAME"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;phonetic_name&quot;"
+ static="true"
+ final="true"
+ deprecated="deprecated"
+ visibility="public"
+>
+</field>
+<field name="PHONE_ISPRIMARY"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;phone_isprimary&quot;"
+ static="true"
+ final="true"
+ deprecated="deprecated"
+ visibility="public"
+>
+</field>
+<field name="PHONE_TYPE"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;phone_type&quot;"
+ static="true"
+ final="true"
+ deprecated="deprecated"
+ visibility="public"
+>
+</field>
+<field name="POSTAL"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;postal&quot;"
+ static="true"
+ final="true"
+ deprecated="deprecated"
+ visibility="public"
+>
+</field>
+<field name="POSTAL_ISPRIMARY"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;postal_isprimary&quot;"
+ static="true"
+ final="true"
+ deprecated="deprecated"
+ visibility="public"
+>
+</field>
+<field name="POSTAL_TYPE"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;postal_type&quot;"
+ static="true"
+ final="true"
+ deprecated="deprecated"
+ visibility="public"
+>
+</field>
+<field name="SECONDARY_EMAIL"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;secondary_email&quot;"
+ static="true"
+ final="true"
+ deprecated="deprecated"
+ visibility="public"
+>
+</field>
+<field name="SECONDARY_EMAIL_TYPE"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;secondary_email_type&quot;"
+ static="true"
+ final="true"
+ deprecated="deprecated"
+ visibility="public"
+>
+</field>
+<field name="SECONDARY_PHONE"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;secondary_phone&quot;"
+ static="true"
+ final="true"
+ deprecated="deprecated"
+ visibility="public"
+>
+</field>
+<field name="SECONDARY_PHONE_TYPE"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;secondary_phone_type&quot;"
+ static="true"
+ final="true"
+ deprecated="deprecated"
+ visibility="public"
+>
+</field>
+<field name="TERTIARY_EMAIL"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;tertiary_email&quot;"
+ static="true"
+ final="true"
+ deprecated="deprecated"
+ visibility="public"
+>
+</field>
+<field name="TERTIARY_EMAIL_TYPE"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;tertiary_email_type&quot;"
+ static="true"
+ final="true"
+ deprecated="deprecated"
+ visibility="public"
+>
+</field>
+<field name="TERTIARY_PHONE"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;tertiary_phone&quot;"
+ static="true"
+ final="true"
+ deprecated="deprecated"
+ visibility="public"
+>
+</field>
+<field name="TERTIARY_PHONE_TYPE"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;tertiary_phone_type&quot;"
+ static="true"
+ final="true"
+ deprecated="deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<class name="Contacts.Intents.UI"
+ extends="java.lang.Object"
+ abstract="false"
+ static="true"
+ final="true"
+ deprecated="deprecated"
+ visibility="public"
+>
+<constructor name="Contacts.Intents.UI"
+ type="android.provider.Contacts.Intents.UI"
+ static="false"
+ final="false"
+ deprecated="deprecated"
+ visibility="public"
+>
+</constructor>
+<field name="FILTER_CONTACTS_ACTION"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;com.android.contacts.action.FILTER_CONTACTS&quot;"
+ static="true"
+ final="true"
+ deprecated="deprecated"
+ visibility="public"
+>
+</field>
+<field name="FILTER_TEXT_EXTRA_KEY"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;com.android.contacts.extra.FILTER_TEXT&quot;"
+ static="true"
+ final="true"
+ deprecated="deprecated"
+ visibility="public"
+>
+</field>
+<field name="GROUP_NAME_EXTRA_KEY"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;com.android.contacts.extra.GROUP&quot;"
+ static="true"
+ final="true"
+ deprecated="deprecated"
+ visibility="public"
+>
+</field>
+<field name="LIST_ALL_CONTACTS_ACTION"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;com.android.contacts.action.LIST_ALL_CONTACTS&quot;"
+ static="true"
+ final="true"
+ deprecated="deprecated"
+ visibility="public"
+>
+</field>
+<field name="LIST_CONTACTS_WITH_PHONES_ACTION"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;com.android.contacts.action.LIST_CONTACTS_WITH_PHONES&quot;"
+ static="true"
+ final="true"
+ deprecated="deprecated"
+ visibility="public"
+>
+</field>
+<field name="LIST_DEFAULT"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;com.android.contacts.action.LIST_DEFAULT&quot;"
+ static="true"
+ final="true"
+ deprecated="deprecated"
+ visibility="public"
+>
+</field>
+<field name="LIST_FREQUENT_ACTION"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;com.android.contacts.action.LIST_FREQUENT&quot;"
+ static="true"
+ final="true"
+ deprecated="deprecated"
+ visibility="public"
+>
+</field>
+<field name="LIST_GROUP_ACTION"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;com.android.contacts.action.LIST_GROUP&quot;"
+ static="true"
+ final="true"
+ deprecated="deprecated"
+ visibility="public"
+>
+</field>
+<field name="LIST_STARRED_ACTION"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;com.android.contacts.action.LIST_STARRED&quot;"
+ static="true"
+ final="true"
+ deprecated="deprecated"
+ visibility="public"
+>
+</field>
+<field name="LIST_STREQUENT_ACTION"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;com.android.contacts.action.LIST_STREQUENT&quot;"
+ static="true"
+ final="true"
+ deprecated="deprecated"
+ visibility="public"
+>
+</field>
+<field name="TITLE_EXTRA_KEY"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;com.android.contacts.extra.TITLE_EXTRA&quot;"
+ static="true"
+ final="true"
+ deprecated="deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<interface name="Contacts.OrganizationColumns"
+ abstract="true"
+ static="true"
+ final="false"
+ deprecated="deprecated"
+ visibility="public"
+>
+<field name="COMPANY"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;company&quot;"
+ static="true"
+ final="true"
+ deprecated="deprecated"
+ visibility="public"
+>
+</field>
+<field name="ISPRIMARY"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;isprimary&quot;"
+ static="true"
+ final="true"
+ deprecated="deprecated"
+ visibility="public"
+>
+</field>
+<field name="LABEL"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;label&quot;"
+ static="true"
+ final="true"
+ deprecated="deprecated"
+ visibility="public"
+>
+</field>
+<field name="PERSON_ID"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;person&quot;"
+ static="true"
+ final="true"
+ deprecated="deprecated"
+ visibility="public"
+>
+</field>
+<field name="TITLE"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;title&quot;"
+ static="true"
+ final="true"
+ deprecated="deprecated"
+ visibility="public"
+>
+</field>
+<field name="TYPE"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;type&quot;"
+ static="true"
+ final="true"
+ deprecated="deprecated"
+ visibility="public"
+>
+</field>
+<field name="TYPE_CUSTOM"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="0"
+ static="true"
+ final="true"
+ deprecated="deprecated"
+ visibility="public"
+>
+</field>
+<field name="TYPE_OTHER"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2"
+ static="true"
+ final="true"
+ deprecated="deprecated"
+ visibility="public"
+>
+</field>
+<field name="TYPE_WORK"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1"
+ static="true"
+ final="true"
+ deprecated="deprecated"
+ visibility="public"
+>
+</field>
+</interface>
+<class name="Contacts.Organizations"
+ extends="java.lang.Object"
+ abstract="false"
+ static="true"
+ final="true"
+ deprecated="deprecated"
+ visibility="public"
+>
+<implements name="android.provider.BaseColumns">
+</implements>
+<implements name="android.provider.Contacts.OrganizationColumns">
+</implements>
+<method name="getDisplayLabel"
+ return="java.lang.CharSequence"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="true"
+ deprecated="deprecated"
+ visibility="public"
+>
+<parameter name="context" type="android.content.Context">
+</parameter>
+<parameter name="type" type="int">
+</parameter>
+<parameter name="label" type="java.lang.CharSequence">
+</parameter>
+</method>
+<field name="CONTENT_DIRECTORY"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;organizations&quot;"
+ static="true"
+ final="true"
+ deprecated="deprecated"
+ visibility="public"
+>
+</field>
+<field name="CONTENT_URI"
+ type="android.net.Uri"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="deprecated"
+ visibility="public"
+>
+</field>
+<field name="DEFAULT_SORT_ORDER"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;company, title, isprimary ASC&quot;"
+ static="true"
+ final="true"
+ deprecated="deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<class name="Contacts.People"
+ extends="java.lang.Object"
+ abstract="false"
+ static="true"
+ final="true"
+ deprecated="deprecated"
+ visibility="public"
+>
+<implements name="android.provider.BaseColumns">
+</implements>
+<implements name="android.provider.Contacts.PeopleColumns">
+</implements>
+<implements name="android.provider.Contacts.PhonesColumns">
+</implements>
+<implements name="android.provider.Contacts.PresenceColumns">
+</implements>
+<method name="addToGroup"
+ return="android.net.Uri"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="deprecated"
+ visibility="public"
+>
+<parameter name="resolver" type="android.content.ContentResolver">
+</parameter>
+<parameter name="personId" type="long">
+</parameter>
+<parameter name="groupName" type="java.lang.String">
+</parameter>
+</method>
+<method name="addToGroup"
+ return="android.net.Uri"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="deprecated"
+ visibility="public"
+>
+<parameter name="resolver" type="android.content.ContentResolver">
+</parameter>
+<parameter name="personId" type="long">
+</parameter>
+<parameter name="groupId" type="long">
+</parameter>
+</method>
+<method name="addToMyContactsGroup"
+ return="android.net.Uri"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="deprecated"
+ visibility="public"
+>
+<parameter name="resolver" type="android.content.ContentResolver">
+</parameter>
+<parameter name="personId" type="long">
+</parameter>
+</method>
+<method name="createPersonInMyContactsGroup"
+ return="android.net.Uri"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="deprecated"
+ visibility="public"
+>
+<parameter name="resolver" type="android.content.ContentResolver">
+</parameter>
+<parameter name="values" type="android.content.ContentValues">
+</parameter>
+</method>
+<method name="loadContactPhoto"
+ return="android.graphics.Bitmap"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="deprecated"
+ visibility="public"
+>
+<parameter name="context" type="android.content.Context">
+</parameter>
+<parameter name="person" type="android.net.Uri">
+</parameter>
+<parameter name="placeholderImageResource" type="int">
+</parameter>
+<parameter name="options" type="android.graphics.BitmapFactory.Options">
+</parameter>
+</method>
+<method name="markAsContacted"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="deprecated"
+ visibility="public"
+>
+<parameter name="resolver" type="android.content.ContentResolver">
+</parameter>
+<parameter name="personId" type="long">
+</parameter>
+</method>
+<method name="openContactPhotoInputStream"
+ return="java.io.InputStream"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="deprecated"
+ visibility="public"
+>
+<parameter name="cr" type="android.content.ContentResolver">
+</parameter>
+<parameter name="person" type="android.net.Uri">
+</parameter>
+</method>
+<method name="queryGroups"
+ return="android.database.Cursor"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="deprecated"
+ visibility="public"
+>
+<parameter name="resolver" type="android.content.ContentResolver">
+</parameter>
+<parameter name="person" type="long">
+</parameter>
+</method>
+<method name="setPhotoData"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="deprecated"
+ visibility="public"
+>
+<parameter name="cr" type="android.content.ContentResolver">
+</parameter>
+<parameter name="person" type="android.net.Uri">
+</parameter>
+<parameter name="data" type="byte[]">
+</parameter>
+</method>
+<field name="CONTENT_FILTER_URI"
+ type="android.net.Uri"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="deprecated"
+ visibility="public"
+>
+</field>
+<field name="CONTENT_ITEM_TYPE"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;vnd.android.cursor.item/person&quot;"
+ static="true"
+ final="true"
+ deprecated="deprecated"
+ visibility="public"
+>
+</field>
+<field name="CONTENT_TYPE"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;vnd.android.cursor.dir/person&quot;"
+ static="true"
+ final="true"
+ deprecated="deprecated"
+ visibility="public"
+>
+</field>
+<field name="CONTENT_URI"
+ type="android.net.Uri"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="deprecated"
+ visibility="public"
+>
+</field>
+<field name="DEFAULT_SORT_ORDER"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;name ASC&quot;"
+ static="true"
+ final="true"
+ deprecated="deprecated"
+ visibility="public"
+>
+</field>
+<field name="DELETED_CONTENT_URI"
+ type="android.net.Uri"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="deprecated"
+ visibility="public"
+>
+</field>
+<field name="PRIMARY_EMAIL_ID"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;primary_email&quot;"
+ static="true"
+ final="true"
+ deprecated="deprecated"
+ visibility="public"
+>
+</field>
+<field name="PRIMARY_ORGANIZATION_ID"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;primary_organization&quot;"
+ static="true"
+ final="true"
+ deprecated="deprecated"
+ visibility="public"
+>
+</field>
+<field name="PRIMARY_PHONE_ID"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;primary_phone&quot;"
+ static="true"
+ final="true"
+ deprecated="deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<class name="Contacts.People.ContactMethods"
+ extends="java.lang.Object"
+ abstract="false"
+ static="true"
+ final="true"
+ deprecated="deprecated"
+ visibility="public"
+>
+<implements name="android.provider.BaseColumns">
+</implements>
+<implements name="android.provider.Contacts.ContactMethodsColumns">
+</implements>
+<implements name="android.provider.Contacts.PeopleColumns">
+</implements>
+<field name="CONTENT_DIRECTORY"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;contact_methods&quot;"
+ static="true"
+ final="true"
+ deprecated="deprecated"
+ visibility="public"
+>
+</field>
+<field name="DEFAULT_SORT_ORDER"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;data ASC&quot;"
+ static="true"
+ final="true"
+ deprecated="deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<class name="Contacts.People.Extensions"
+ extends="java.lang.Object"
+ abstract="false"
+ static="true"
+ final="false"
+ deprecated="deprecated"
+ visibility="public"
+>
+<implements name="android.provider.BaseColumns">
+</implements>
+<implements name="android.provider.Contacts.ExtensionsColumns">
+</implements>
+<field name="CONTENT_DIRECTORY"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;extensions&quot;"
+ static="true"
+ final="true"
+ deprecated="deprecated"
+ visibility="public"
+>
+</field>
+<field name="DEFAULT_SORT_ORDER"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;name ASC&quot;"
+ static="true"
+ final="true"
+ deprecated="deprecated"
+ visibility="public"
+>
+</field>
+<field name="PERSON_ID"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;person&quot;"
+ static="true"
+ final="true"
+ deprecated="deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<class name="Contacts.People.Phones"
+ extends="java.lang.Object"
+ abstract="false"
+ static="true"
+ final="true"
+ deprecated="deprecated"
+ visibility="public"
+>
+<implements name="android.provider.BaseColumns">
+</implements>
+<implements name="android.provider.Contacts.PeopleColumns">
+</implements>
+<implements name="android.provider.Contacts.PhonesColumns">
+</implements>
+<field name="CONTENT_DIRECTORY"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;phones&quot;"
+ static="true"
+ final="true"
+ deprecated="deprecated"
+ visibility="public"
+>
+</field>
+<field name="DEFAULT_SORT_ORDER"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;number ASC&quot;"
+ static="true"
+ final="true"
+ deprecated="deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<interface name="Contacts.PeopleColumns"
+ abstract="true"
+ static="true"
+ final="false"
+ deprecated="deprecated"
+ visibility="public"
+>
+<field name="CUSTOM_RINGTONE"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;custom_ringtone&quot;"
+ static="true"
+ final="true"
+ deprecated="deprecated"
+ visibility="public"
+>
+</field>
+<field name="DISPLAY_NAME"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;display_name&quot;"
+ static="true"
+ final="true"
+ deprecated="deprecated"
+ visibility="public"
+>
+</field>
+<field name="LAST_TIME_CONTACTED"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;last_time_contacted&quot;"
+ static="true"
+ final="true"
+ deprecated="deprecated"
+ visibility="public"
+>
+</field>
+<field name="NAME"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;name&quot;"
+ static="true"
+ final="true"
+ deprecated="deprecated"
+ visibility="public"
+>
+</field>
+<field name="NOTES"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;notes&quot;"
+ static="true"
+ final="true"
+ deprecated="deprecated"
+ visibility="public"
+>
+</field>
+<field name="PHONETIC_NAME"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;phonetic_name&quot;"
+ static="true"
+ final="true"
+ deprecated="deprecated"
+ visibility="public"
+>
+</field>
+<field name="PHOTO_VERSION"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;photo_version&quot;"
+ static="true"
+ final="true"
+ deprecated="deprecated"
+ visibility="public"
+>
+</field>
+<field name="SEND_TO_VOICEMAIL"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;send_to_voicemail&quot;"
+ static="true"
+ final="true"
+ deprecated="deprecated"
+ visibility="public"
+>
+</field>
+<field name="STARRED"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;starred&quot;"
+ static="true"
+ final="true"
+ deprecated="deprecated"
+ visibility="public"
+>
+</field>
+<field name="TIMES_CONTACTED"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;times_contacted&quot;"
+ static="true"
+ final="true"
+ deprecated="deprecated"
+ visibility="public"
+>
+</field>
+</interface>
+<class name="Contacts.Phones"
+ extends="java.lang.Object"
+ abstract="false"
+ static="true"
+ final="true"
+ deprecated="deprecated"
+ visibility="public"
+>
+<implements name="android.provider.BaseColumns">
+</implements>
+<implements name="android.provider.Contacts.PeopleColumns">
+</implements>
+<implements name="android.provider.Contacts.PhonesColumns">
+</implements>
+<method name="getDisplayLabel"
+ return="java.lang.CharSequence"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="true"
+ deprecated="deprecated"
+ visibility="public"
+>
+<parameter name="context" type="android.content.Context">
+</parameter>
+<parameter name="type" type="int">
+</parameter>
+<parameter name="label" type="java.lang.CharSequence">
+</parameter>
+<parameter name="labelArray" type="java.lang.CharSequence[]">
+</parameter>
+</method>
+<method name="getDisplayLabel"
+ return="java.lang.CharSequence"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="true"
+ deprecated="deprecated"
+ visibility="public"
+>
+<parameter name="context" type="android.content.Context">
+</parameter>
+<parameter name="type" type="int">
+</parameter>
+<parameter name="label" type="java.lang.CharSequence">
+</parameter>
+</method>
+<field name="CONTENT_FILTER_URL"
+ type="android.net.Uri"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="deprecated"
+ visibility="public"
+>
+</field>
+<field name="CONTENT_ITEM_TYPE"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;vnd.android.cursor.item/phone&quot;"
+ static="true"
+ final="true"
+ deprecated="deprecated"
+ visibility="public"
+>
+</field>
+<field name="CONTENT_TYPE"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;vnd.android.cursor.dir/phone&quot;"
+ static="true"
+ final="true"
+ deprecated="deprecated"
+ visibility="public"
+>
+</field>
+<field name="CONTENT_URI"
+ type="android.net.Uri"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="deprecated"
+ visibility="public"
+>
+</field>
+<field name="DEFAULT_SORT_ORDER"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;name ASC&quot;"
+ static="true"
+ final="true"
+ deprecated="deprecated"
+ visibility="public"
+>
+</field>
+<field name="PERSON_ID"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;person&quot;"
+ static="true"
+ final="true"
+ deprecated="deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<interface name="Contacts.PhonesColumns"
+ abstract="true"
+ static="true"
+ final="false"
+ deprecated="deprecated"
+ visibility="public"
+>
+<field name="ISPRIMARY"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;isprimary&quot;"
+ static="true"
+ final="true"
+ deprecated="deprecated"
+ visibility="public"
+>
+</field>
+<field name="LABEL"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;label&quot;"
+ static="true"
+ final="true"
+ deprecated="deprecated"
+ visibility="public"
+>
+</field>
+<field name="NUMBER"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;number&quot;"
+ static="true"
+ final="true"
+ deprecated="deprecated"
+ visibility="public"
+>
+</field>
+<field name="NUMBER_KEY"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;number_key&quot;"
+ static="true"
+ final="true"
+ deprecated="deprecated"
+ visibility="public"
+>
+</field>
+<field name="TYPE"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;type&quot;"
+ static="true"
+ final="true"
+ deprecated="deprecated"
+ visibility="public"
+>
+</field>
+<field name="TYPE_CUSTOM"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="0"
+ static="true"
+ final="true"
+ deprecated="deprecated"
+ visibility="public"
+>
+</field>
+<field name="TYPE_FAX_HOME"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="5"
+ static="true"
+ final="true"
+ deprecated="deprecated"
+ visibility="public"
+>
+</field>
+<field name="TYPE_FAX_WORK"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="4"
+ static="true"
+ final="true"
+ deprecated="deprecated"
+ visibility="public"
+>
+</field>
+<field name="TYPE_HOME"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1"
+ static="true"
+ final="true"
+ deprecated="deprecated"
+ visibility="public"
+>
+</field>
+<field name="TYPE_MOBILE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2"
+ static="true"
+ final="true"
+ deprecated="deprecated"
+ visibility="public"
+>
+</field>
+<field name="TYPE_OTHER"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="7"
+ static="true"
+ final="true"
+ deprecated="deprecated"
+ visibility="public"
+>
+</field>
+<field name="TYPE_PAGER"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="6"
+ static="true"
+ final="true"
+ deprecated="deprecated"
+ visibility="public"
+>
+</field>
+<field name="TYPE_WORK"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="3"
+ static="true"
+ final="true"
+ deprecated="deprecated"
+ visibility="public"
+>
+</field>
+</interface>
+<class name="Contacts.Photos"
+ extends="java.lang.Object"
+ abstract="false"
+ static="true"
+ final="true"
+ deprecated="deprecated"
+ visibility="public"
+>
+<implements name="android.provider.BaseColumns">
+</implements>
+<implements name="android.provider.Contacts.PhotosColumns">
+</implements>
+<field name="CONTENT_DIRECTORY"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;photo&quot;"
+ static="true"
+ final="true"
+ deprecated="deprecated"
+ visibility="public"
+>
+</field>
+<field name="CONTENT_URI"
+ type="android.net.Uri"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="deprecated"
+ visibility="public"
+>
+</field>
+<field name="DEFAULT_SORT_ORDER"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;person ASC&quot;"
+ static="true"
+ final="true"
+ deprecated="deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<interface name="Contacts.PhotosColumns"
+ abstract="true"
+ static="true"
+ final="false"
+ deprecated="deprecated"
+ visibility="public"
+>
+<field name="DATA"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;data&quot;"
+ static="true"
+ final="true"
+ deprecated="deprecated"
+ visibility="public"
+>
+</field>
+<field name="DOWNLOAD_REQUIRED"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;download_required&quot;"
+ static="true"
+ final="true"
+ deprecated="deprecated"
+ visibility="public"
+>
+</field>
+<field name="EXISTS_ON_SERVER"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;exists_on_server&quot;"
+ static="true"
+ final="true"
+ deprecated="deprecated"
+ visibility="public"
+>
+</field>
+<field name="LOCAL_VERSION"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;local_version&quot;"
+ static="true"
+ final="true"
+ deprecated="deprecated"
+ visibility="public"
+>
+</field>
+<field name="PERSON_ID"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;person&quot;"
+ static="true"
+ final="true"
+ deprecated="deprecated"
+ visibility="public"
+>
+</field>
+<field name="SYNC_ERROR"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;sync_error&quot;"
+ static="true"
+ final="true"
+ deprecated="deprecated"
+ visibility="public"
+>
+</field>
+</interface>
+<interface name="Contacts.PresenceColumns"
+ abstract="true"
+ static="true"
+ final="false"
+ deprecated="deprecated"
+ visibility="public"
+>
+<field name="AVAILABLE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="5"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="AWAY"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="DO_NOT_DISTURB"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="4"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="IDLE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="3"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="IM_ACCOUNT"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;im_account&quot;"
+ static="true"
+ final="true"
+ deprecated="deprecated"
+ visibility="public"
+>
+</field>
+<field name="IM_HANDLE"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;im_handle&quot;"
+ static="true"
+ final="true"
+ deprecated="deprecated"
+ visibility="public"
+>
+</field>
+<field name="IM_PROTOCOL"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;im_protocol&quot;"
+ static="true"
+ final="true"
+ deprecated="deprecated"
+ visibility="public"
+>
+</field>
+<field name="INVISIBLE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="OFFLINE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="0"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="PRESENCE_CUSTOM_STATUS"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;status&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="PRESENCE_STATUS"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;mode&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="PRIORITY"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;priority&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</interface>
+<class name="Contacts.Settings"
+ extends="java.lang.Object"
+ abstract="false"
+ static="true"
+ final="true"
+ deprecated="deprecated"
+ visibility="public"
+>
+<implements name="android.provider.BaseColumns">
+</implements>
+<implements name="android.provider.Contacts.SettingsColumns">
+</implements>
+<method name="getSetting"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="deprecated"
+ visibility="public"
+>
+<parameter name="cr" type="android.content.ContentResolver">
+</parameter>
+<parameter name="account" type="java.lang.String">
+</parameter>
+<parameter name="key" type="java.lang.String">
+</parameter>
+</method>
+<method name="setSetting"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="deprecated"
+ visibility="public"
+>
+<parameter name="cr" type="android.content.ContentResolver">
+</parameter>
+<parameter name="account" type="java.lang.String">
+</parameter>
+<parameter name="key" type="java.lang.String">
+</parameter>
+<parameter name="value" type="java.lang.String">
+</parameter>
+</method>
+<field name="CONTENT_DIRECTORY"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;settings&quot;"
+ static="true"
+ final="true"
+ deprecated="deprecated"
+ visibility="public"
+>
+</field>
+<field name="CONTENT_URI"
+ type="android.net.Uri"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="deprecated"
+ visibility="public"
+>
+</field>
+<field name="DEFAULT_SORT_ORDER"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;key ASC&quot;"
+ static="true"
+ final="true"
+ deprecated="deprecated"
+ visibility="public"
+>
+</field>
+<field name="SYNC_EVERYTHING"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;syncEverything&quot;"
+ static="true"
+ final="true"
+ deprecated="deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<interface name="Contacts.SettingsColumns"
+ abstract="true"
+ static="true"
+ final="false"
+ deprecated="deprecated"
+ visibility="public"
+>
+<field name="KEY"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;key&quot;"
+ static="true"
+ final="true"
+ deprecated="deprecated"
+ visibility="public"
+>
+</field>
+<field name="VALUE"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;value&quot;"
+ static="true"
+ final="true"
+ deprecated="deprecated"
+ visibility="public"
+>
+</field>
+<field name="_SYNC_ACCOUNT"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;_sync_account&quot;"
+ static="true"
+ final="true"
+ deprecated="deprecated"
+ visibility="public"
+>
+</field>
+<field name="_SYNC_ACCOUNT_TYPE"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;_sync_account_type&quot;"
+ static="true"
+ final="true"
+ deprecated="deprecated"
+ visibility="public"
+>
+</field>
+</interface>
+<class name="ContactsContract"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="ContactsContract"
+ type="android.provider.ContactsContract"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<field name="AUTHORITY"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;com.android.contacts&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="AUTHORITY_URI"
+ type="android.net.Uri"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="CALLER_IS_SYNCADAPTER"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;caller_is_syncadapter&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<class name="ContactsContract.AggregationExceptions"
+ extends="java.lang.Object"
+ abstract="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="android.provider.BaseColumns">
+</implements>
+<field name="CONTENT_ITEM_TYPE"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;vnd.android.cursor.item/aggregation_exception&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="CONTENT_TYPE"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;vnd.android.cursor.dir/aggregation_exception&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="CONTENT_URI"
+ type="android.net.Uri"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="RAW_CONTACT_ID1"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;raw_contact_id1&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="RAW_CONTACT_ID2"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;raw_contact_id2&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TYPE"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;type&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TYPE_AUTOMATIC"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="0"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TYPE_KEEP_SEPARATE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TYPE_KEEP_TOGETHER"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<interface name="ContactsContract.BaseSyncColumns"
+ abstract="true"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<field name="SYNC1"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;sync1&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="SYNC2"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;sync2&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="SYNC3"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;sync3&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="SYNC4"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;sync4&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</interface>
+<class name="ContactsContract.CommonDataKinds"
+ extends="java.lang.Object"
+ abstract="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</class>
+<interface name="ContactsContract.CommonDataKinds.BaseTypes"
+ abstract="true"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<field name="TYPE_CUSTOM"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="0"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</interface>
+<interface name="ContactsContract.CommonDataKinds.CommonColumns"
+ abstract="true"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<implements name="android.provider.ContactsContract.CommonDataKinds.BaseTypes">
+</implements>
+<field name="DATA"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;data1&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="LABEL"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;data3&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TYPE"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;data2&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</interface>
+<class name="ContactsContract.CommonDataKinds.Email"
+ extends="java.lang.Object"
+ abstract="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="android.provider.ContactsContract.CommonDataKinds.CommonColumns">
+</implements>
+<implements name="android.provider.ContactsContract.DataColumnsWithJoins">
+</implements>
+<method name="getTypeLabel"
+ return="java.lang.CharSequence"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="res" type="android.content.res.Resources">
+</parameter>
+<parameter name="type" type="int">
+</parameter>
+<parameter name="label" type="java.lang.CharSequence">
+</parameter>
+</method>
+<method name="getTypeLabelResource"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="type" type="int">
+</parameter>
+</method>
+<field name="CONTENT_FILTER_URI"
+ type="android.net.Uri"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="CONTENT_ITEM_TYPE"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;vnd.android.cursor.item/email_v2&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="CONTENT_LOOKUP_URI"
+ type="android.net.Uri"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="CONTENT_TYPE"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;vnd.android.cursor.dir/email_v2&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="CONTENT_URI"
+ type="android.net.Uri"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="DISPLAY_NAME"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;data4&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TYPE_HOME"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TYPE_MOBILE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="4"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TYPE_OTHER"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="3"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TYPE_WORK"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<class name="ContactsContract.CommonDataKinds.Event"
+ extends="java.lang.Object"
+ abstract="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="android.provider.ContactsContract.CommonDataKinds.CommonColumns">
+</implements>
+<implements name="android.provider.ContactsContract.DataColumnsWithJoins">
+</implements>
+<method name="getTypeResource"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="type" type="java.lang.Integer">
+</parameter>
+</method>
+<field name="CONTENT_ITEM_TYPE"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;vnd.android.cursor.item/contact_event&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="START_DATE"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;data1&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TYPE_ANNIVERSARY"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TYPE_BIRTHDAY"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="3"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TYPE_OTHER"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<class name="ContactsContract.CommonDataKinds.GroupMembership"
+ extends="java.lang.Object"
+ abstract="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="android.provider.ContactsContract.DataColumnsWithJoins">
+</implements>
+<field name="CONTENT_ITEM_TYPE"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;vnd.android.cursor.item/group_membership&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GROUP_ROW_ID"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;data1&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GROUP_SOURCE_ID"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;group_sourceid&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<class name="ContactsContract.CommonDataKinds.Im"
+ extends="java.lang.Object"
+ abstract="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="android.provider.ContactsContract.CommonDataKinds.CommonColumns">
+</implements>
+<implements name="android.provider.ContactsContract.DataColumnsWithJoins">
+</implements>
+<method name="getProtocolLabel"
+ return="java.lang.CharSequence"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="res" type="android.content.res.Resources">
+</parameter>
+<parameter name="type" type="int">
+</parameter>
+<parameter name="label" type="java.lang.CharSequence">
+</parameter>
+</method>
+<method name="getProtocolLabelResource"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="type" type="int">
+</parameter>
+</method>
+<method name="getTypeLabel"
+ return="java.lang.CharSequence"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="res" type="android.content.res.Resources">
+</parameter>
+<parameter name="type" type="int">
+</parameter>
+<parameter name="label" type="java.lang.CharSequence">
+</parameter>
+</method>
+<method name="getTypeLabelResource"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="type" type="int">
+</parameter>
+</method>
+<field name="CONTENT_ITEM_TYPE"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;vnd.android.cursor.item/im&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="CUSTOM_PROTOCOL"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;data6&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="PROTOCOL"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;data5&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="PROTOCOL_AIM"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="0"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="PROTOCOL_CUSTOM"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="-1"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="PROTOCOL_GOOGLE_TALK"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="5"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="PROTOCOL_ICQ"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="6"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="PROTOCOL_JABBER"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="7"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="PROTOCOL_MSN"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="PROTOCOL_NETMEETING"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="8"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="PROTOCOL_QQ"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="4"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="PROTOCOL_SKYPE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="3"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="PROTOCOL_YAHOO"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TYPE_HOME"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TYPE_OTHER"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="3"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TYPE_WORK"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<class name="ContactsContract.CommonDataKinds.Nickname"
+ extends="java.lang.Object"
+ abstract="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="android.provider.ContactsContract.CommonDataKinds.CommonColumns">
+</implements>
+<implements name="android.provider.ContactsContract.DataColumnsWithJoins">
+</implements>
+<field name="CONTENT_ITEM_TYPE"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;vnd.android.cursor.item/nickname&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="NAME"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;data1&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TYPE_DEFAULT"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TYPE_INITIALS"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="5"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TYPE_MAINDEN_NAME"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="3"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TYPE_OTHER_NAME"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TYPE_SHORT_NAME"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="4"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<class name="ContactsContract.CommonDataKinds.Note"
+ extends="java.lang.Object"
+ abstract="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="android.provider.ContactsContract.DataColumnsWithJoins">
+</implements>
+<field name="CONTENT_ITEM_TYPE"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;vnd.android.cursor.item/note&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="NOTE"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;data1&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<class name="ContactsContract.CommonDataKinds.Organization"
+ extends="java.lang.Object"
+ abstract="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="android.provider.ContactsContract.CommonDataKinds.CommonColumns">
+</implements>
+<implements name="android.provider.ContactsContract.DataColumnsWithJoins">
+</implements>
+<method name="getTypeLabel"
+ return="java.lang.CharSequence"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="res" type="android.content.res.Resources">
+</parameter>
+<parameter name="type" type="int">
+</parameter>
+<parameter name="label" type="java.lang.CharSequence">
+</parameter>
+</method>
+<method name="getTypeLabelResource"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="type" type="int">
+</parameter>
+</method>
+<field name="COMPANY"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;data1&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="CONTENT_ITEM_TYPE"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;vnd.android.cursor.item/organization&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="DEPARTMENT"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;data5&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="JOB_DESCRIPTION"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;data6&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="OFFICE_LOCATION"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;data9&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="PHONETIC_NAME"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;data8&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="SYMBOL"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;data7&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TITLE"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;data4&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TYPE_OTHER"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TYPE_WORK"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<class name="ContactsContract.CommonDataKinds.Phone"
+ extends="java.lang.Object"
+ abstract="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="android.provider.ContactsContract.CommonDataKinds.CommonColumns">
+</implements>
+<implements name="android.provider.ContactsContract.DataColumnsWithJoins">
+</implements>
+<method name="getTypeLabel"
+ return="java.lang.CharSequence"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="res" type="android.content.res.Resources">
+</parameter>
+<parameter name="type" type="int">
+</parameter>
+<parameter name="label" type="java.lang.CharSequence">
+</parameter>
+</method>
+<method name="getTypeLabelResource"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="type" type="int">
+</parameter>
+</method>
+<field name="CONTENT_FILTER_URI"
+ type="android.net.Uri"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="CONTENT_ITEM_TYPE"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;vnd.android.cursor.item/phone_v2&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="CONTENT_TYPE"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;vnd.android.cursor.dir/phone_v2&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="CONTENT_URI"
+ type="android.net.Uri"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="NUMBER"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;data1&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TYPE_ASSISTANT"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="19"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TYPE_CALLBACK"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="8"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TYPE_CAR"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="9"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TYPE_COMPANY_MAIN"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="10"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TYPE_FAX_HOME"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="5"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TYPE_FAX_WORK"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="4"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TYPE_HOME"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TYPE_ISDN"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="11"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TYPE_MAIN"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="12"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TYPE_MMS"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="20"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TYPE_MOBILE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TYPE_OTHER"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="7"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TYPE_OTHER_FAX"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="13"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TYPE_PAGER"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="6"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TYPE_RADIO"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="14"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TYPE_TELEX"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="15"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TYPE_TTY_TDD"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TYPE_WORK"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="3"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TYPE_WORK_MOBILE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="17"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TYPE_WORK_PAGER"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="18"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<class name="ContactsContract.CommonDataKinds.Photo"
+ extends="java.lang.Object"
+ abstract="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="android.provider.ContactsContract.DataColumnsWithJoins">
+</implements>
+<field name="CONTENT_ITEM_TYPE"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;vnd.android.cursor.item/photo&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="PHOTO"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;data15&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<class name="ContactsContract.CommonDataKinds.Relation"
+ extends="java.lang.Object"
+ abstract="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="android.provider.ContactsContract.CommonDataKinds.CommonColumns">
+</implements>
+<implements name="android.provider.ContactsContract.DataColumnsWithJoins">
+</implements>
+<field name="CONTENT_ITEM_TYPE"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;vnd.android.cursor.item/relation&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="NAME"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;data1&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TYPE_ASSISTANT"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TYPE_BROTHER"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TYPE_CHILD"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="3"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TYPE_DOMESTIC_PARTNER"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="4"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TYPE_FATHER"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="5"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TYPE_FRIEND"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="6"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TYPE_MANAGER"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="7"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TYPE_MOTHER"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="8"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TYPE_PARENT"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="9"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TYPE_PARTNER"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="10"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TYPE_REFERRED_BY"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="11"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TYPE_RELATIVE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="12"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TYPE_SISTER"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="13"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TYPE_SPOUSE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="14"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<class name="ContactsContract.CommonDataKinds.StructuredName"
+ extends="java.lang.Object"
+ abstract="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="android.provider.ContactsContract.DataColumnsWithJoins">
+</implements>
+<field name="CONTENT_ITEM_TYPE"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;vnd.android.cursor.item/name&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="DISPLAY_NAME"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;data1&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="FAMILY_NAME"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;data3&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GIVEN_NAME"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;data2&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="MIDDLE_NAME"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;data5&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="PHONETIC_FAMILY_NAME"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;data9&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="PHONETIC_GIVEN_NAME"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;data7&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="PHONETIC_MIDDLE_NAME"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;data8&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="PREFIX"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;data4&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="SUFFIX"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;data6&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<class name="ContactsContract.CommonDataKinds.StructuredPostal"
+ extends="java.lang.Object"
+ abstract="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="android.provider.ContactsContract.CommonDataKinds.CommonColumns">
+</implements>
+<implements name="android.provider.ContactsContract.DataColumnsWithJoins">
+</implements>
+<method name="getTypeLabel"
+ return="java.lang.CharSequence"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="res" type="android.content.res.Resources">
+</parameter>
+<parameter name="type" type="int">
+</parameter>
+<parameter name="label" type="java.lang.CharSequence">
+</parameter>
+</method>
+<method name="getTypeLabelResource"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="type" type="int">
+</parameter>
+</method>
+<field name="CITY"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;data7&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="CONTENT_ITEM_TYPE"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;vnd.android.cursor.item/postal-address_v2&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="CONTENT_TYPE"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;vnd.android.cursor.dir/postal-address_v2&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="CONTENT_URI"
+ type="android.net.Uri"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="COUNTRY"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;data10&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="FORMATTED_ADDRESS"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;data1&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="NEIGHBORHOOD"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;data6&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="POBOX"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;data5&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="POSTCODE"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;data9&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="REGION"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;data8&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="STREET"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;data4&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TYPE_HOME"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TYPE_OTHER"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="3"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TYPE_WORK"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<class name="ContactsContract.CommonDataKinds.Website"
+ extends="java.lang.Object"
+ abstract="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="android.provider.ContactsContract.CommonDataKinds.CommonColumns">
+</implements>
+<implements name="android.provider.ContactsContract.DataColumnsWithJoins">
+</implements>
+<field name="CONTENT_ITEM_TYPE"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;vnd.android.cursor.item/website&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TYPE_BLOG"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TYPE_FTP"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="6"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TYPE_HOME"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="4"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TYPE_HOMEPAGE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TYPE_OTHER"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="7"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TYPE_PROFILE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="3"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TYPE_WORK"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="5"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="URL"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;data1&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<interface name="ContactsContract.ContactOptionsColumns"
+ abstract="true"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<field name="CUSTOM_RINGTONE"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;custom_ringtone&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="LAST_TIME_CONTACTED"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;last_time_contacted&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="SEND_TO_VOICEMAIL"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;send_to_voicemail&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="STARRED"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;starred&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TIMES_CONTACTED"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;times_contacted&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</interface>
+<interface name="ContactsContract.ContactStatusColumns"
+ abstract="true"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<field name="CONTACT_PRESENCE"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;contact_presence&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="CONTACT_STATUS"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;contact_status&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="CONTACT_STATUS_ICON"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;contact_status_icon&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="CONTACT_STATUS_LABEL"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;contact_status_label&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="CONTACT_STATUS_RES_PACKAGE"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;contact_status_res_package&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="CONTACT_STATUS_TIMESTAMP"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;contact_status_ts&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</interface>
+<class name="ContactsContract.Contacts"
+ extends="java.lang.Object"
+ abstract="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="android.provider.BaseColumns">
+</implements>
+<implements name="android.provider.ContactsContract.ContactOptionsColumns">
+</implements>
+<implements name="android.provider.ContactsContract.ContactStatusColumns">
+</implements>
+<implements name="android.provider.ContactsContract.ContactsColumns">
+</implements>
+<method name="getLookupUri"
+ return="android.net.Uri"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="resolver" type="android.content.ContentResolver">
+</parameter>
+<parameter name="contactUri" type="android.net.Uri">
+</parameter>
+</method>
+<method name="getLookupUri"
+ return="android.net.Uri"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="contactId" type="long">
+</parameter>
+<parameter name="lookupKey" type="java.lang.String">
+</parameter>
+</method>
+<method name="lookupContact"
+ return="android.net.Uri"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="resolver" type="android.content.ContentResolver">
+</parameter>
+<parameter name="lookupUri" type="android.net.Uri">
+</parameter>
+</method>
+<method name="markAsContacted"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="resolver" type="android.content.ContentResolver">
+</parameter>
+<parameter name="contactId" type="long">
+</parameter>
+</method>
+<method name="openContactPhotoInputStream"
+ return="java.io.InputStream"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="cr" type="android.content.ContentResolver">
+</parameter>
+<parameter name="contactUri" type="android.net.Uri">
+</parameter>
+</method>
+<field name="CONTENT_FILTER_URI"
+ type="android.net.Uri"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="CONTENT_GROUP_URI"
+ type="android.net.Uri"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="CONTENT_ITEM_TYPE"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;vnd.android.cursor.item/contact&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="CONTENT_LOOKUP_URI"
+ type="android.net.Uri"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="CONTENT_STREQUENT_FILTER_URI"
+ type="android.net.Uri"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="CONTENT_STREQUENT_URI"
+ type="android.net.Uri"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="CONTENT_TYPE"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;vnd.android.cursor.dir/contact&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="CONTENT_URI"
+ type="android.net.Uri"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="CONTENT_VCARD_TYPE"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;text/x-vcard&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="CONTENT_VCARD_URI"
+ type="android.net.Uri"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<class name="ContactsContract.Contacts.AggregationSuggestions"
+ extends="java.lang.Object"
+ abstract="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="android.provider.BaseColumns">
+</implements>
+<implements name="android.provider.ContactsContract.ContactsColumns">
+</implements>
+<field name="CONTENT_DIRECTORY"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;suggestions&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<class name="ContactsContract.Contacts.Data"
+ extends="java.lang.Object"
+ abstract="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="android.provider.BaseColumns">
+</implements>
+<implements name="android.provider.ContactsContract.DataColumns">
+</implements>
+<field name="CONTENT_DIRECTORY"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;data&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<class name="ContactsContract.Contacts.Photo"
+ extends="java.lang.Object"
+ abstract="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="android.provider.BaseColumns">
+</implements>
+<implements name="android.provider.ContactsContract.DataColumns">
+</implements>
+<field name="CONTENT_DIRECTORY"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;photo&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<interface name="ContactsContract.ContactsColumns"
+ abstract="true"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<field name="DISPLAY_NAME"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;display_name&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="HAS_PHONE_NUMBER"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;has_phone_number&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="IN_VISIBLE_GROUP"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;in_visible_group&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="LOOKUP_KEY"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;lookup&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="PHOTO_ID"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;photo_id&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</interface>
+<class name="ContactsContract.Data"
+ extends="java.lang.Object"
+ abstract="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="android.provider.ContactsContract.DataColumnsWithJoins">
+</implements>
+<method name="getContactLookupUri"
+ return="android.net.Uri"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="resolver" type="android.content.ContentResolver">
+</parameter>
+<parameter name="dataUri" type="android.net.Uri">
+</parameter>
+</method>
+<field name="CONTENT_TYPE"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;vnd.android.cursor.dir/data&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="CONTENT_URI"
+ type="android.net.Uri"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<interface name="ContactsContract.DataColumns"
+ abstract="true"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<field name="DATA1"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;data1&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="DATA10"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;data10&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="DATA11"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;data11&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="DATA12"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;data12&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="DATA13"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;data13&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="DATA14"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;data14&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="DATA15"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;data15&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="DATA2"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;data2&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="DATA3"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;data3&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="DATA4"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;data4&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="DATA5"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;data5&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="DATA6"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;data6&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="DATA7"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;data7&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="DATA8"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;data8&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="DATA9"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;data9&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="DATA_VERSION"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;data_version&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="IS_PRIMARY"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;is_primary&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="IS_SUPER_PRIMARY"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;is_super_primary&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="MIMETYPE"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;mimetype&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="RAW_CONTACT_ID"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;raw_contact_id&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="SYNC1"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;data_sync1&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="SYNC2"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;data_sync2&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="SYNC3"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;data_sync3&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="SYNC4"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;data_sync4&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</interface>
+<interface name="ContactsContract.DataColumnsWithJoins"
+ abstract="true"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<implements name="android.provider.BaseColumns">
+</implements>
+<implements name="android.provider.ContactsContract.ContactOptionsColumns">
+</implements>
+<implements name="android.provider.ContactsContract.ContactStatusColumns">
+</implements>
+<implements name="android.provider.ContactsContract.ContactsColumns">
+</implements>
+<implements name="android.provider.ContactsContract.DataColumns">
+</implements>
+<implements name="android.provider.ContactsContract.RawContactsColumns">
+</implements>
+<implements name="android.provider.ContactsContract.StatusColumns">
+</implements>
+</interface>
+<class name="ContactsContract.Groups"
+ extends="java.lang.Object"
+ abstract="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="android.provider.BaseColumns">
+</implements>
+<implements name="android.provider.ContactsContract.GroupsColumns">
+</implements>
+<implements name="android.provider.ContactsContract.SyncColumns">
+</implements>
+<method name="newEntityIterator"
+ return="android.content.EntityIterator"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="cursor" type="android.database.Cursor">
+</parameter>
+</method>
+<field name="CONTENT_ITEM_TYPE"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;vnd.android.cursor.item/group&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="CONTENT_SUMMARY_URI"
+ type="android.net.Uri"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="CONTENT_TYPE"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;vnd.android.cursor.dir/group&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="CONTENT_URI"
+ type="android.net.Uri"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<interface name="ContactsContract.GroupsColumns"
+ abstract="true"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<field name="DELETED"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;deleted&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GROUP_VISIBLE"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;group_visible&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="NOTES"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;notes&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="SHOULD_SYNC"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;should_sync&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="SUMMARY_COUNT"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;summ_count&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="SUMMARY_WITH_PHONES"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;summ_phones&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="SYSTEM_ID"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;system_id&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TITLE"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;title&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</interface>
+<class name="ContactsContract.Intents"
+ extends="java.lang.Object"
+ abstract="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="ContactsContract.Intents"
+ type="android.provider.ContactsContract.Intents"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<field name="ATTACH_IMAGE"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;com.android.contacts.action.ATTACH_IMAGE&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="EXTRA_CREATE_DESCRIPTION"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;com.android.contacts.action.CREATE_DESCRIPTION&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="EXTRA_FORCE_CREATE"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;com.android.contacts.action.FORCE_CREATE&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="SEARCH_SUGGESTION_CLICKED"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.provider.Contacts.SEARCH_SUGGESTION_CLICKED&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="SEARCH_SUGGESTION_CREATE_CONTACT_CLICKED"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.provider.Contacts.SEARCH_SUGGESTION_CREATE_CONTACT_CLICKED&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="SEARCH_SUGGESTION_DIAL_NUMBER_CLICKED"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.provider.Contacts.SEARCH_SUGGESTION_DIAL_NUMBER_CLICKED&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="SHOW_OR_CREATE_CONTACT"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;com.android.contacts.action.SHOW_OR_CREATE_CONTACT&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<class name="ContactsContract.Intents.Insert"
+ extends="java.lang.Object"
+ abstract="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="ContactsContract.Intents.Insert"
+ type="android.provider.ContactsContract.Intents.Insert"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<field name="ACTION"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.intent.action.INSERT&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="COMPANY"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;company&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="EMAIL"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;email&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="EMAIL_ISPRIMARY"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;email_isprimary&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="EMAIL_TYPE"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;email_type&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="FULL_MODE"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;full_mode&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="IM_HANDLE"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;im_handle&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="IM_ISPRIMARY"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;im_isprimary&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="IM_PROTOCOL"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;im_protocol&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="JOB_TITLE"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;job_title&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="NAME"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;name&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="NOTES"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;notes&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="PHONE"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;phone&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="PHONETIC_NAME"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;phonetic_name&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="PHONE_ISPRIMARY"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;phone_isprimary&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="PHONE_TYPE"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;phone_type&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="POSTAL"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;postal&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="POSTAL_ISPRIMARY"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;postal_isprimary&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="POSTAL_TYPE"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;postal_type&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="SECONDARY_EMAIL"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;secondary_email&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="SECONDARY_EMAIL_TYPE"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;secondary_email_type&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="SECONDARY_PHONE"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;secondary_phone&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="SECONDARY_PHONE_TYPE"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;secondary_phone_type&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TERTIARY_EMAIL"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;tertiary_email&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TERTIARY_EMAIL_TYPE"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;tertiary_email_type&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TERTIARY_PHONE"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;tertiary_phone&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TERTIARY_PHONE_TYPE"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;tertiary_phone_type&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<class name="ContactsContract.PhoneLookup"
+ extends="java.lang.Object"
+ abstract="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="android.provider.BaseColumns">
+</implements>
+<implements name="android.provider.ContactsContract.ContactOptionsColumns">
+</implements>
+<implements name="android.provider.ContactsContract.ContactsColumns">
+</implements>
+<implements name="android.provider.ContactsContract.PhoneLookupColumns">
+</implements>
+<field name="CONTENT_FILTER_URI"
+ type="android.net.Uri"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<interface name="ContactsContract.PhoneLookupColumns"
+ abstract="true"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<field name="LABEL"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;label&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="NUMBER"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;number&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TYPE"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;type&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</interface>
+<class name="ContactsContract.Presence"
+ extends="android.provider.ContactsContract.StatusUpdates"
+ abstract="false"
+ static="true"
+ final="true"
+ deprecated="deprecated"
+ visibility="public"
+>
+<constructor name="ContactsContract.Presence"
+ type="android.provider.ContactsContract.Presence"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+</class>
+<interface name="ContactsContract.PresenceColumns"
+ abstract="true"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<field name="CUSTOM_PROTOCOL"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;custom_protocol&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="DATA_ID"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;presence_data_id&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="IM_ACCOUNT"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;im_account&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="IM_HANDLE"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;im_handle&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="PROTOCOL"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;protocol&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</interface>
+<class name="ContactsContract.QuickContact"
+ extends="java.lang.Object"
+ abstract="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="ContactsContract.QuickContact"
+ type="android.provider.ContactsContract.QuickContact"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<method name="showQuickContact"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="context" type="android.content.Context">
+</parameter>
+<parameter name="target" type="android.view.View">
+</parameter>
+<parameter name="lookupUri" type="android.net.Uri">
+</parameter>
+<parameter name="mode" type="int">
+</parameter>
+<parameter name="excludeMimes" type="java.lang.String[]">
+</parameter>
+</method>
+<method name="showQuickContact"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="context" type="android.content.Context">
+</parameter>
+<parameter name="target" type="android.graphics.Rect">
+</parameter>
+<parameter name="lookupUri" type="android.net.Uri">
+</parameter>
+<parameter name="mode" type="int">
+</parameter>
+<parameter name="excludeMimes" type="java.lang.String[]">
+</parameter>
+</method>
+<field name="MODE_LARGE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="3"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="MODE_MEDIUM"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="MODE_SMALL"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<class name="ContactsContract.RawContacts"
+ extends="java.lang.Object"
+ abstract="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="android.provider.BaseColumns">
+</implements>
+<implements name="android.provider.ContactsContract.ContactOptionsColumns">
+</implements>
+<implements name="android.provider.ContactsContract.RawContactsColumns">
+</implements>
+<implements name="android.provider.ContactsContract.SyncColumns">
+</implements>
+<method name="getContactLookupUri"
+ return="android.net.Uri"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="resolver" type="android.content.ContentResolver">
+</parameter>
+<parameter name="rawContactUri" type="android.net.Uri">
+</parameter>
+</method>
+<method name="newEntityIterator"
+ return="android.content.EntityIterator"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="cursor" type="android.database.Cursor">
+</parameter>
+</method>
+<field name="AGGREGATION_MODE_DEFAULT"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="0"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="AGGREGATION_MODE_DISABLED"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="3"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="AGGREGATION_MODE_IMMEDIATE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="AGGREGATION_MODE_SUSPENDED"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="CONTENT_ITEM_TYPE"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;vnd.android.cursor.item/raw_contact&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="CONTENT_TYPE"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;vnd.android.cursor.dir/raw_contact&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="CONTENT_URI"
+ type="android.net.Uri"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<class name="ContactsContract.RawContacts.Data"
+ extends="java.lang.Object"
+ abstract="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="android.provider.BaseColumns">
+</implements>
+<implements name="android.provider.ContactsContract.DataColumns">
+</implements>
+<field name="CONTENT_DIRECTORY"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;data&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<class name="ContactsContract.RawContacts.Entity"
+ extends="java.lang.Object"
+ abstract="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="android.provider.BaseColumns">
+</implements>
+<implements name="android.provider.ContactsContract.DataColumns">
+</implements>
+<field name="CONTENT_DIRECTORY"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;entity&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="DATA_ID"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;data_id&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<interface name="ContactsContract.RawContactsColumns"
+ abstract="true"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<field name="AGGREGATION_MODE"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;aggregation_mode&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="CONTACT_ID"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;contact_id&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="DELETED"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;deleted&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</interface>
+<class name="ContactsContract.RawContactsEntity"
+ extends="java.lang.Object"
+ abstract="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="android.provider.BaseColumns">
+</implements>
+<implements name="android.provider.ContactsContract.DataColumns">
+</implements>
+<implements name="android.provider.ContactsContract.RawContactsColumns">
+</implements>
+<field name="CONTENT_TYPE"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;vnd.android.cursor.dir/raw_contact_entity&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="CONTENT_URI"
+ type="android.net.Uri"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="DATA_ID"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;data_id&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<class name="ContactsContract.Settings"
+ extends="java.lang.Object"
+ abstract="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="android.provider.ContactsContract.SettingsColumns">
+</implements>
+<field name="CONTENT_ITEM_TYPE"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;vnd.android.cursor.item/setting&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="CONTENT_TYPE"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;vnd.android.cursor.dir/setting&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="CONTENT_URI"
+ type="android.net.Uri"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<interface name="ContactsContract.SettingsColumns"
+ abstract="true"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<field name="ACCOUNT_NAME"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;account_name&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ACCOUNT_TYPE"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;account_type&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ANY_UNSYNCED"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;any_unsynced&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="SHOULD_SYNC"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;should_sync&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="UNGROUPED_COUNT"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;summ_count&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="UNGROUPED_VISIBLE"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;ungrouped_visible&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="UNGROUPED_WITH_PHONES"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;summ_phones&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</interface>
+<interface name="ContactsContract.StatusColumns"
+ abstract="true"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<field name="AVAILABLE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="5"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="AWAY"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="DO_NOT_DISTURB"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="4"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="IDLE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="3"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="INVISIBLE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="OFFLINE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="0"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="PRESENCE"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;mode&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="PRESENCE_CUSTOM_STATUS"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;status&quot;"
+ static="true"
+ final="true"
+ deprecated="deprecated"
+ visibility="public"
+>
+</field>
+<field name="PRESENCE_STATUS"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;mode&quot;"
+ static="true"
+ final="true"
+ deprecated="deprecated"
+ visibility="public"
+>
+</field>
+<field name="STATUS"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;status&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="STATUS_ICON"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;status_icon&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="STATUS_LABEL"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;status_label&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="STATUS_RES_PACKAGE"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;status_res_package&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="STATUS_TIMESTAMP"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;status_ts&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</interface>
+<class name="ContactsContract.StatusUpdates"
+ extends="java.lang.Object"
+ abstract="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="android.provider.ContactsContract.PresenceColumns">
+</implements>
+<implements name="android.provider.ContactsContract.StatusColumns">
+</implements>
+<method name="getPresenceIconResourceId"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="status" type="int">
+</parameter>
+</method>
+<method name="getPresencePrecedence"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="status" type="int">
+</parameter>
+</method>
+<field name="CONTENT_ITEM_TYPE"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;vnd.android.cursor.item/status-update&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="CONTENT_TYPE"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;vnd.android.cursor.dir/status-update&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="CONTENT_URI"
+ type="android.net.Uri"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<interface name="ContactsContract.SyncColumns"
+ abstract="true"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<implements name="android.provider.ContactsContract.BaseSyncColumns">
+</implements>
+<field name="ACCOUNT_NAME"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;account_name&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ACCOUNT_TYPE"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;account_type&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="DIRTY"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;dirty&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="SOURCE_ID"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;sourceid&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="VERSION"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;version&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</interface>
+<class name="ContactsContract.SyncState"
+ extends="java.lang.Object"
+ abstract="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="android.provider.SyncStateContract.Columns">
+</implements>
+<method name="get"
+ return="byte[]"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="provider" type="android.content.ContentProviderClient">
+</parameter>
+<parameter name="account" type="android.accounts.Account">
+</parameter>
+<exception name="RemoteException" type="android.os.RemoteException">
+</exception>
+</method>
+<method name="getWithUri"
+ return="android.util.Pair&lt;android.net.Uri, byte[]&gt;"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="provider" type="android.content.ContentProviderClient">
+</parameter>
+<parameter name="account" type="android.accounts.Account">
+</parameter>
+<exception name="RemoteException" type="android.os.RemoteException">
+</exception>
+</method>
+<method name="newSetOperation"
+ return="android.content.ContentProviderOperation"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="account" type="android.accounts.Account">
+</parameter>
+<parameter name="data" type="byte[]">
+</parameter>
+</method>
+<method name="set"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="provider" type="android.content.ContentProviderClient">
+</parameter>
+<parameter name="account" type="android.accounts.Account">
+</parameter>
+<parameter name="data" type="byte[]">
+</parameter>
+<exception name="RemoteException" type="android.os.RemoteException">
+</exception>
+</method>
+<field name="CONTENT_DIRECTORY"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;syncstate&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="CONTENT_URI"
+ type="android.net.Uri"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<class name="LiveFolders"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="android.provider.BaseColumns">
+</implements>
+<field name="ACTION_CREATE_LIVE_FOLDER"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.intent.action.CREATE_LIVE_FOLDER&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="DESCRIPTION"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;description&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="DISPLAY_MODE_GRID"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="DISPLAY_MODE_LIST"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="EXTRA_LIVE_FOLDER_BASE_INTENT"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.intent.extra.livefolder.BASE_INTENT&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="EXTRA_LIVE_FOLDER_DISPLAY_MODE"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.intent.extra.livefolder.DISPLAY_MODE&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="EXTRA_LIVE_FOLDER_ICON"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.intent.extra.livefolder.ICON&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="EXTRA_LIVE_FOLDER_NAME"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.intent.extra.livefolder.NAME&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ICON_BITMAP"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;icon_bitmap&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ICON_PACKAGE"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;icon_package&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ICON_RESOURCE"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;icon_resource&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="INTENT"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;intent&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="NAME"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;name&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<class name="MediaStore"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="MediaStore"
+ type="android.provider.MediaStore"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<method name="getMediaScannerUri"
+ return="android.net.Uri"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<field name="ACTION_IMAGE_CAPTURE"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.media.action.IMAGE_CAPTURE&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ACTION_VIDEO_CAPTURE"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.media.action.VIDEO_CAPTURE&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="AUTHORITY"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;media&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="EXTRA_DURATION_LIMIT"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.intent.extra.durationLimit&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="EXTRA_FINISH_ON_COMPLETION"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.intent.extra.finishOnCompletion&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="EXTRA_FULL_SCREEN"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.intent.extra.fullScreen&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="EXTRA_MEDIA_ALBUM"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.intent.extra.album&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="EXTRA_MEDIA_ARTIST"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.intent.extra.artist&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="EXTRA_MEDIA_FOCUS"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.intent.extra.focus&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="EXTRA_MEDIA_TITLE"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.intent.extra.title&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="EXTRA_OUTPUT"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;output&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="EXTRA_SCREEN_ORIENTATION"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.intent.extra.screenOrientation&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="EXTRA_SHOW_ACTION_ICONS"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.intent.extra.showActionIcons&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="EXTRA_SIZE_LIMIT"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.intent.extra.sizeLimit&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="EXTRA_VIDEO_QUALITY"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.intent.extra.videoQuality&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="INTENT_ACTION_MEDIA_SEARCH"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.intent.action.MEDIA_SEARCH&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="INTENT_ACTION_MUSIC_PLAYER"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.intent.action.MUSIC_PLAYER&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="INTENT_ACTION_STILL_IMAGE_CAMERA"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.media.action.STILL_IMAGE_CAMERA&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="INTENT_ACTION_VIDEO_CAMERA"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.media.action.VIDEO_CAMERA&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="MEDIA_SCANNER_VOLUME"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;volume&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="UNKNOWN_STRING"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;&lt;unknown&gt;&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<class name="MediaStore.Audio"
+ extends="java.lang.Object"
+ abstract="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="MediaStore.Audio"
+ type="android.provider.MediaStore.Audio"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<method name="keyFor"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+</method>
+</class>
+<interface name="MediaStore.Audio.AlbumColumns"
+ abstract="true"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<field name="ALBUM"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;album&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ALBUM_ART"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;album_art&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ALBUM_ID"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;album_id&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ALBUM_KEY"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;album_key&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ARTIST"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;artist&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="FIRST_YEAR"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;minyear&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="LAST_YEAR"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;maxyear&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="NUMBER_OF_SONGS"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;numsongs&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="NUMBER_OF_SONGS_FOR_ARTIST"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;numsongs_by_artist&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</interface>
+<class name="MediaStore.Audio.Albums"
+ extends="java.lang.Object"
+ abstract="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="android.provider.BaseColumns">
+</implements>
+<implements name="android.provider.MediaStore.Audio.AlbumColumns">
+</implements>
+<constructor name="MediaStore.Audio.Albums"
+ type="android.provider.MediaStore.Audio.Albums"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<method name="getContentUri"
+ return="android.net.Uri"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="volumeName" type="java.lang.String">
+</parameter>
+</method>
+<field name="CONTENT_TYPE"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;vnd.android.cursor.dir/albums&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="DEFAULT_SORT_ORDER"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;album_key&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ENTRY_CONTENT_TYPE"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;vnd.android.cursor.item/album&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="EXTERNAL_CONTENT_URI"
+ type="android.net.Uri"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="INTERNAL_CONTENT_URI"
+ type="android.net.Uri"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<interface name="MediaStore.Audio.ArtistColumns"
+ abstract="true"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<field name="ARTIST"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;artist&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ARTIST_KEY"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;artist_key&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="NUMBER_OF_ALBUMS"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;number_of_albums&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="NUMBER_OF_TRACKS"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;number_of_tracks&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</interface>
+<class name="MediaStore.Audio.Artists"
+ extends="java.lang.Object"
+ abstract="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="android.provider.BaseColumns">
+</implements>
+<implements name="android.provider.MediaStore.Audio.ArtistColumns">
+</implements>
+<constructor name="MediaStore.Audio.Artists"
+ type="android.provider.MediaStore.Audio.Artists"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<method name="getContentUri"
+ return="android.net.Uri"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="volumeName" type="java.lang.String">
+</parameter>
+</method>
+<field name="CONTENT_TYPE"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;vnd.android.cursor.dir/artists&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="DEFAULT_SORT_ORDER"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;artist_key&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ENTRY_CONTENT_TYPE"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;vnd.android.cursor.item/artist&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="EXTERNAL_CONTENT_URI"
+ type="android.net.Uri"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="INTERNAL_CONTENT_URI"
+ type="android.net.Uri"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<class name="MediaStore.Audio.Artists.Albums"
+ extends="java.lang.Object"
+ abstract="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="android.provider.MediaStore.Audio.AlbumColumns">
+</implements>
+<constructor name="MediaStore.Audio.Artists.Albums"
+ type="android.provider.MediaStore.Audio.Artists.Albums"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<method name="getContentUri"
+ return="android.net.Uri"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="volumeName" type="java.lang.String">
+</parameter>
+<parameter name="artistId" type="long">
+</parameter>
+</method>
+</class>
+<interface name="MediaStore.Audio.AudioColumns"
+ abstract="true"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="android.provider.MediaStore.MediaColumns">
+</implements>
+<field name="ALBUM"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;album&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ALBUM_ART"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;album_art&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ALBUM_ID"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;album_id&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ALBUM_KEY"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;album_key&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ARTIST"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;artist&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ARTIST_ID"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;artist_id&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ARTIST_KEY"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;artist_key&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="BOOKMARK"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;bookmark&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="COMPOSER"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;composer&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="DURATION"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;duration&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="IS_ALARM"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;is_alarm&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="IS_MUSIC"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;is_music&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="IS_NOTIFICATION"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;is_notification&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="IS_PODCAST"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;is_podcast&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="IS_RINGTONE"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;is_ringtone&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TITLE_KEY"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;title_key&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TRACK"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;track&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="YEAR"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;year&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</interface>
+<class name="MediaStore.Audio.Genres"
+ extends="java.lang.Object"
+ abstract="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="android.provider.BaseColumns">
+</implements>
+<implements name="android.provider.MediaStore.Audio.GenresColumns">
+</implements>
+<constructor name="MediaStore.Audio.Genres"
+ type="android.provider.MediaStore.Audio.Genres"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<method name="getContentUri"
+ return="android.net.Uri"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="volumeName" type="java.lang.String">
+</parameter>
+</method>
+<field name="CONTENT_TYPE"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;vnd.android.cursor.dir/genre&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="DEFAULT_SORT_ORDER"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;name&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ENTRY_CONTENT_TYPE"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;vnd.android.cursor.item/genre&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="EXTERNAL_CONTENT_URI"
+ type="android.net.Uri"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="INTERNAL_CONTENT_URI"
+ type="android.net.Uri"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<class name="MediaStore.Audio.Genres.Members"
+ extends="java.lang.Object"
+ abstract="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="android.provider.MediaStore.Audio.AudioColumns">
+</implements>
+<constructor name="MediaStore.Audio.Genres.Members"
+ type="android.provider.MediaStore.Audio.Genres.Members"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<method name="getContentUri"
+ return="android.net.Uri"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="volumeName" type="java.lang.String">
+</parameter>
+<parameter name="genreId" type="long">
+</parameter>
+</method>
+<field name="AUDIO_ID"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;audio_id&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="CONTENT_DIRECTORY"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;members&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="DEFAULT_SORT_ORDER"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;title_key&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GENRE_ID"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;genre_id&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<interface name="MediaStore.Audio.GenresColumns"
+ abstract="true"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<field name="NAME"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;name&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</interface>
+<class name="MediaStore.Audio.Media"
+ extends="java.lang.Object"
+ abstract="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="android.provider.MediaStore.Audio.AudioColumns">
+</implements>
+<constructor name="MediaStore.Audio.Media"
+ type="android.provider.MediaStore.Audio.Media"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<method name="getContentUri"
+ return="android.net.Uri"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="volumeName" type="java.lang.String">
+</parameter>
+</method>
+<method name="getContentUriForPath"
+ return="android.net.Uri"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="path" type="java.lang.String">
+</parameter>
+</method>
+<field name="CONTENT_TYPE"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;vnd.android.cursor.dir/audio&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="DEFAULT_SORT_ORDER"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;title_key&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="EXTERNAL_CONTENT_URI"
+ type="android.net.Uri"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="EXTRA_MAX_BYTES"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.provider.MediaStore.extra.MAX_BYTES&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="INTERNAL_CONTENT_URI"
+ type="android.net.Uri"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="RECORD_SOUND_ACTION"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.provider.MediaStore.RECORD_SOUND&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<class name="MediaStore.Audio.Playlists"
+ extends="java.lang.Object"
+ abstract="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="android.provider.BaseColumns">
+</implements>
+<implements name="android.provider.MediaStore.Audio.PlaylistsColumns">
+</implements>
+<constructor name="MediaStore.Audio.Playlists"
+ type="android.provider.MediaStore.Audio.Playlists"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<method name="getContentUri"
+ return="android.net.Uri"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="volumeName" type="java.lang.String">
+</parameter>
+</method>
+<field name="CONTENT_TYPE"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;vnd.android.cursor.dir/playlist&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="DEFAULT_SORT_ORDER"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;name&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ENTRY_CONTENT_TYPE"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;vnd.android.cursor.item/playlist&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="EXTERNAL_CONTENT_URI"
+ type="android.net.Uri"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="INTERNAL_CONTENT_URI"
+ type="android.net.Uri"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<class name="MediaStore.Audio.Playlists.Members"
+ extends="java.lang.Object"
+ abstract="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="android.provider.MediaStore.Audio.AudioColumns">
+</implements>
+<constructor name="MediaStore.Audio.Playlists.Members"
+ type="android.provider.MediaStore.Audio.Playlists.Members"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<method name="getContentUri"
+ return="android.net.Uri"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="volumeName" type="java.lang.String">
+</parameter>
+<parameter name="playlistId" type="long">
+</parameter>
+</method>
+<method name="moveItem"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="res" type="android.content.ContentResolver">
+</parameter>
+<parameter name="playlistId" type="long">
+</parameter>
+<parameter name="from" type="int">
+</parameter>
+<parameter name="to" type="int">
+</parameter>
+</method>
+<field name="AUDIO_ID"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;audio_id&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="CONTENT_DIRECTORY"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;members&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="DEFAULT_SORT_ORDER"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;play_order&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="PLAYLIST_ID"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;playlist_id&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="PLAY_ORDER"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;play_order&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="_ID"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;_id&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<interface name="MediaStore.Audio.PlaylistsColumns"
+ abstract="true"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<field name="DATA"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;_data&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="DATE_ADDED"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;date_added&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="DATE_MODIFIED"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;date_modified&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="NAME"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;name&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</interface>
+<class name="MediaStore.Images"
+ extends="java.lang.Object"
+ abstract="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="MediaStore.Images"
+ type="android.provider.MediaStore.Images"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+</class>
+<interface name="MediaStore.Images.ImageColumns"
+ abstract="true"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="android.provider.MediaStore.MediaColumns">
+</implements>
+<field name="BUCKET_DISPLAY_NAME"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;bucket_display_name&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="BUCKET_ID"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;bucket_id&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="DATE_TAKEN"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;datetaken&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="DESCRIPTION"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;description&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="IS_PRIVATE"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;isprivate&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="LATITUDE"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;latitude&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="LONGITUDE"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;longitude&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="MINI_THUMB_MAGIC"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;mini_thumb_magic&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ORIENTATION"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;orientation&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="PICASA_ID"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;picasa_id&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</interface>
+<class name="MediaStore.Images.Media"
+ extends="java.lang.Object"
+ abstract="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="android.provider.MediaStore.Images.ImageColumns">
+</implements>
+<constructor name="MediaStore.Images.Media"
+ type="android.provider.MediaStore.Images.Media"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<method name="getBitmap"
+ return="android.graphics.Bitmap"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="cr" type="android.content.ContentResolver">
+</parameter>
+<parameter name="url" type="android.net.Uri">
+</parameter>
+<exception name="FileNotFoundException" type="java.io.FileNotFoundException">
+</exception>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="getContentUri"
+ return="android.net.Uri"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="volumeName" type="java.lang.String">
+</parameter>
+</method>
+<method name="insertImage"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="cr" type="android.content.ContentResolver">
+</parameter>
+<parameter name="imagePath" type="java.lang.String">
+</parameter>
+<parameter name="name" type="java.lang.String">
+</parameter>
+<parameter name="description" type="java.lang.String">
+</parameter>
+<exception name="FileNotFoundException" type="java.io.FileNotFoundException">
+</exception>
+</method>
+<method name="insertImage"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="cr" type="android.content.ContentResolver">
+</parameter>
+<parameter name="source" type="android.graphics.Bitmap">
+</parameter>
+<parameter name="title" type="java.lang.String">
+</parameter>
+<parameter name="description" type="java.lang.String">
+</parameter>
+</method>
+<method name="query"
+ return="android.database.Cursor"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="cr" type="android.content.ContentResolver">
+</parameter>
+<parameter name="uri" type="android.net.Uri">
+</parameter>
+<parameter name="projection" type="java.lang.String[]">
+</parameter>
+</method>
+<method name="query"
+ return="android.database.Cursor"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="cr" type="android.content.ContentResolver">
+</parameter>
+<parameter name="uri" type="android.net.Uri">
+</parameter>
+<parameter name="projection" type="java.lang.String[]">
+</parameter>
+<parameter name="where" type="java.lang.String">
+</parameter>
+<parameter name="orderBy" type="java.lang.String">
+</parameter>
+</method>
+<method name="query"
+ return="android.database.Cursor"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="cr" type="android.content.ContentResolver">
+</parameter>
+<parameter name="uri" type="android.net.Uri">
+</parameter>
+<parameter name="projection" type="java.lang.String[]">
+</parameter>
+<parameter name="selection" type="java.lang.String">
+</parameter>
+<parameter name="selectionArgs" type="java.lang.String[]">
+</parameter>
+<parameter name="orderBy" type="java.lang.String">
+</parameter>
+</method>
+<field name="CONTENT_TYPE"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;vnd.android.cursor.dir/image&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="DEFAULT_SORT_ORDER"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;bucket_display_name&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="EXTERNAL_CONTENT_URI"
+ type="android.net.Uri"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="INTERNAL_CONTENT_URI"
+ type="android.net.Uri"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<class name="MediaStore.Images.Thumbnails"
+ extends="java.lang.Object"
+ abstract="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="android.provider.BaseColumns">
+</implements>
+<constructor name="MediaStore.Images.Thumbnails"
+ type="android.provider.MediaStore.Images.Thumbnails"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<method name="cancelThumbnailRequest"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="cr" type="android.content.ContentResolver">
+</parameter>
+<parameter name="origId" type="long">
+</parameter>
+</method>
+<method name="cancelThumbnailRequest"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="cr" type="android.content.ContentResolver">
+</parameter>
+<parameter name="origId" type="long">
+</parameter>
+<parameter name="groupId" type="long">
+</parameter>
+</method>
+<method name="getContentUri"
+ return="android.net.Uri"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="volumeName" type="java.lang.String">
+</parameter>
+</method>
+<method name="getThumbnail"
+ return="android.graphics.Bitmap"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="cr" type="android.content.ContentResolver">
+</parameter>
+<parameter name="origId" type="long">
+</parameter>
+<parameter name="kind" type="int">
+</parameter>
+<parameter name="options" type="android.graphics.BitmapFactory.Options">
+</parameter>
+</method>
+<method name="getThumbnail"
+ return="android.graphics.Bitmap"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="cr" type="android.content.ContentResolver">
+</parameter>
+<parameter name="origId" type="long">
+</parameter>
+<parameter name="groupId" type="long">
+</parameter>
+<parameter name="kind" type="int">
+</parameter>
+<parameter name="options" type="android.graphics.BitmapFactory.Options">
+</parameter>
+</method>
+<method name="query"
+ return="android.database.Cursor"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="cr" type="android.content.ContentResolver">
+</parameter>
+<parameter name="uri" type="android.net.Uri">
+</parameter>
+<parameter name="projection" type="java.lang.String[]">
+</parameter>
+</method>
+<method name="queryMiniThumbnail"
+ return="android.database.Cursor"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="cr" type="android.content.ContentResolver">
+</parameter>
+<parameter name="origId" type="long">
+</parameter>
+<parameter name="kind" type="int">
+</parameter>
+<parameter name="projection" type="java.lang.String[]">
+</parameter>
+</method>
+<method name="queryMiniThumbnails"
+ return="android.database.Cursor"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="cr" type="android.content.ContentResolver">
+</parameter>
+<parameter name="uri" type="android.net.Uri">
+</parameter>
+<parameter name="kind" type="int">
+</parameter>
+<parameter name="projection" type="java.lang.String[]">
+</parameter>
+</method>
+<field name="DATA"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;_data&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="DEFAULT_SORT_ORDER"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;image_id ASC&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="EXTERNAL_CONTENT_URI"
+ type="android.net.Uri"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="FULL_SCREEN_KIND"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="HEIGHT"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;height&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="IMAGE_ID"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;image_id&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="INTERNAL_CONTENT_URI"
+ type="android.net.Uri"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="KIND"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;kind&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="MICRO_KIND"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="3"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="MINI_KIND"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="THUMB_DATA"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;thumb_data&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="WIDTH"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;width&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<interface name="MediaStore.MediaColumns"
+ abstract="true"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="android.provider.BaseColumns">
+</implements>
+<field name="DATA"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;_data&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="DATE_ADDED"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;date_added&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="DATE_MODIFIED"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;date_modified&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="DISPLAY_NAME"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;_display_name&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="MIME_TYPE"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;mime_type&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="SIZE"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;_size&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TITLE"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;title&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</interface>
+<class name="MediaStore.Video"
+ extends="java.lang.Object"
+ abstract="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="MediaStore.Video"
+ type="android.provider.MediaStore.Video"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<method name="query"
+ return="android.database.Cursor"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="cr" type="android.content.ContentResolver">
+</parameter>
+<parameter name="uri" type="android.net.Uri">
+</parameter>
+<parameter name="projection" type="java.lang.String[]">
+</parameter>
+</method>
+<field name="DEFAULT_SORT_ORDER"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;_display_name&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<class name="MediaStore.Video.Media"
+ extends="java.lang.Object"
+ abstract="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="android.provider.MediaStore.Video.VideoColumns">
+</implements>
+<constructor name="MediaStore.Video.Media"
+ type="android.provider.MediaStore.Video.Media"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<method name="getContentUri"
+ return="android.net.Uri"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="volumeName" type="java.lang.String">
+</parameter>
+</method>
+<field name="CONTENT_TYPE"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;vnd.android.cursor.dir/video&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="DEFAULT_SORT_ORDER"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;title&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="EXTERNAL_CONTENT_URI"
+ type="android.net.Uri"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="INTERNAL_CONTENT_URI"
+ type="android.net.Uri"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<class name="MediaStore.Video.Thumbnails"
+ extends="java.lang.Object"
+ abstract="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="android.provider.BaseColumns">
+</implements>
+<constructor name="MediaStore.Video.Thumbnails"
+ type="android.provider.MediaStore.Video.Thumbnails"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<method name="cancelThumbnailRequest"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="cr" type="android.content.ContentResolver">
+</parameter>
+<parameter name="origId" type="long">
+</parameter>
+</method>
+<method name="cancelThumbnailRequest"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="cr" type="android.content.ContentResolver">
+</parameter>
+<parameter name="origId" type="long">
+</parameter>
+<parameter name="groupId" type="long">
+</parameter>
+</method>
+<method name="getContentUri"
+ return="android.net.Uri"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="volumeName" type="java.lang.String">
+</parameter>
+</method>
+<method name="getThumbnail"
+ return="android.graphics.Bitmap"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="cr" type="android.content.ContentResolver">
+</parameter>
+<parameter name="origId" type="long">
+</parameter>
+<parameter name="kind" type="int">
+</parameter>
+<parameter name="options" type="android.graphics.BitmapFactory.Options">
+</parameter>
+</method>
+<method name="getThumbnail"
+ return="android.graphics.Bitmap"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="cr" type="android.content.ContentResolver">
+</parameter>
+<parameter name="origId" type="long">
+</parameter>
+<parameter name="groupId" type="long">
+</parameter>
+<parameter name="kind" type="int">
+</parameter>
+<parameter name="options" type="android.graphics.BitmapFactory.Options">
+</parameter>
+</method>
+<field name="DATA"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;_data&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="DEFAULT_SORT_ORDER"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;video_id ASC&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="EXTERNAL_CONTENT_URI"
+ type="android.net.Uri"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="FULL_SCREEN_KIND"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="HEIGHT"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;height&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="INTERNAL_CONTENT_URI"
+ type="android.net.Uri"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="KIND"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;kind&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="MICRO_KIND"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="3"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="MINI_KIND"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="VIDEO_ID"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;video_id&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="WIDTH"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;width&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<interface name="MediaStore.Video.VideoColumns"
+ abstract="true"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="android.provider.MediaStore.MediaColumns">
+</implements>
+<field name="ALBUM"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;album&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ARTIST"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;artist&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="BOOKMARK"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;bookmark&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="BUCKET_DISPLAY_NAME"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;bucket_display_name&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="BUCKET_ID"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;bucket_id&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="CATEGORY"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;category&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="DATE_TAKEN"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;datetaken&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="DESCRIPTION"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;description&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="DURATION"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;duration&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="IS_PRIVATE"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;isprivate&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="LANGUAGE"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;language&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="LATITUDE"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;latitude&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="LONGITUDE"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;longitude&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="MINI_THUMB_MAGIC"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;mini_thumb_magic&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="RESOLUTION"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;resolution&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TAGS"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;tags&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</interface>
+<interface name="OpenableColumns"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<field name="DISPLAY_NAME"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;_display_name&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="SIZE"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;_size&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</interface>
+<class name="SearchRecentSuggestions"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="SearchRecentSuggestions"
+ type="android.provider.SearchRecentSuggestions"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="context" type="android.content.Context">
+</parameter>
+<parameter name="authority" type="java.lang.String">
+</parameter>
+<parameter name="mode" type="int">
+</parameter>
+</constructor>
+<method name="clearHistory"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="saveRecentQuery"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="queryString" type="java.lang.String">
+</parameter>
+<parameter name="line2" type="java.lang.String">
+</parameter>
+</method>
+<method name="truncateHistory"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="cr" type="android.content.ContentResolver">
+</parameter>
+<parameter name="maxEntries" type="int">
+</parameter>
+</method>
+<field name="QUERIES_PROJECTION_1LINE"
+ type="java.lang.String[]"
+ transient="false"
+ volatile="false"
+ value="null"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="QUERIES_PROJECTION_2LINE"
+ type="java.lang.String[]"
+ transient="false"
+ volatile="false"
+ value="null"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="QUERIES_PROJECTION_DATE_INDEX"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="QUERIES_PROJECTION_DISPLAY1_INDEX"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="3"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="QUERIES_PROJECTION_DISPLAY2_INDEX"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="4"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="QUERIES_PROJECTION_QUERY_INDEX"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<class name="Settings"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="Settings"
+ type="android.provider.Settings"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<field name="ACTION_ACCESSIBILITY_SETTINGS"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.settings.ACCESSIBILITY_SETTINGS&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ACTION_ADD_ACCOUNT"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.settings.ADD_ACCOUNT_SETTINGS&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ACTION_AIRPLANE_MODE_SETTINGS"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.settings.AIRPLANE_MODE_SETTINGS&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ACTION_APN_SETTINGS"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.settings.APN_SETTINGS&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ACTION_APPLICATION_DEVELOPMENT_SETTINGS"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.settings.APPLICATION_DEVELOPMENT_SETTINGS&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ACTION_APPLICATION_SETTINGS"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.settings.APPLICATION_SETTINGS&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ACTION_BLUETOOTH_SETTINGS"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.settings.BLUETOOTH_SETTINGS&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ACTION_DATA_ROAMING_SETTINGS"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.settings.DATA_ROAMING_SETTINGS&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ACTION_DATE_SETTINGS"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.settings.DATE_SETTINGS&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ACTION_DEVICE_INFO_SETTINGS"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.settings.DEVICE_INFO_SETTINGS&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ACTION_DISPLAY_SETTINGS"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.settings.DISPLAY_SETTINGS&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ACTION_INPUT_METHOD_SETTINGS"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.settings.INPUT_METHOD_SETTINGS&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ACTION_INTERNAL_STORAGE_SETTINGS"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.settings.INTERNAL_STORAGE_SETTINGS&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ACTION_LOCALE_SETTINGS"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.settings.LOCALE_SETTINGS&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ACTION_LOCATION_SOURCE_SETTINGS"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.settings.LOCATION_SOURCE_SETTINGS&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ACTION_MANAGE_APPLICATIONS_SETTINGS"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.settings.MANAGE_APPLICATIONS_SETTINGS&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ACTION_MEMORY_CARD_SETTINGS"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.settings.MEMORY_CARD_SETTINGS&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ACTION_NETWORK_OPERATOR_SETTINGS"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.settings.NETWORK_OPERATOR_SETTINGS&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ACTION_PRIVACY_SETTINGS"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.settings.PRIVACY_SETTINGS&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ACTION_QUICK_LAUNCH_SETTINGS"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.settings.QUICK_LAUNCH_SETTINGS&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ACTION_SEARCH_SETTINGS"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.search.action.SEARCH_SETTINGS&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ACTION_SECURITY_SETTINGS"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.settings.SECURITY_SETTINGS&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ACTION_SETTINGS"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.settings.SETTINGS&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ACTION_SOUND_SETTINGS"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.settings.SOUND_SETTINGS&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ACTION_SYNC_SETTINGS"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.settings.SYNC_SETTINGS&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ACTION_USER_DICTIONARY_SETTINGS"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.settings.USER_DICTIONARY_SETTINGS&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ACTION_WIFI_IP_SETTINGS"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.settings.WIFI_IP_SETTINGS&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ACTION_WIFI_SETTINGS"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.settings.WIFI_SETTINGS&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ACTION_WIRELESS_SETTINGS"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.settings.WIRELESS_SETTINGS&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="AUTHORITY"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;settings&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="EXTRA_AUTHORITIES"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;authorities&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<class name="Settings.NameValueTable"
+ extends="java.lang.Object"
+ abstract="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="android.provider.BaseColumns">
+</implements>
+<constructor name="Settings.NameValueTable"
+ type="android.provider.Settings.NameValueTable"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<method name="getUriFor"
+ return="android.net.Uri"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="uri" type="android.net.Uri">
+</parameter>
+<parameter name="name" type="java.lang.String">
+</parameter>
+</method>
+<method name="putString"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="resolver" type="android.content.ContentResolver">
+</parameter>
+<parameter name="uri" type="android.net.Uri">
+</parameter>
+<parameter name="name" type="java.lang.String">
+</parameter>
+<parameter name="value" type="java.lang.String">
+</parameter>
+</method>
+<field name="NAME"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;name&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="VALUE"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;value&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<class name="Settings.Secure"
+ extends="android.provider.Settings.NameValueTable"
+ abstract="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="Settings.Secure"
+ type="android.provider.Settings.Secure"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<method name="getFloat"
+ return="float"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="cr" type="android.content.ContentResolver">
+</parameter>
+<parameter name="name" type="java.lang.String">
+</parameter>
+<parameter name="def" type="float">
+</parameter>
+</method>
+<method name="getFloat"
+ return="float"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="cr" type="android.content.ContentResolver">
+</parameter>
+<parameter name="name" type="java.lang.String">
+</parameter>
+<exception name="Settings.SettingNotFoundException" type="android.provider.Settings.SettingNotFoundException">
+</exception>
+</method>
+<method name="getInt"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="cr" type="android.content.ContentResolver">
+</parameter>
+<parameter name="name" type="java.lang.String">
+</parameter>
+<parameter name="def" type="int">
+</parameter>
+</method>
+<method name="getInt"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="cr" type="android.content.ContentResolver">
+</parameter>
+<parameter name="name" type="java.lang.String">
+</parameter>
+<exception name="Settings.SettingNotFoundException" type="android.provider.Settings.SettingNotFoundException">
+</exception>
+</method>
+<method name="getLong"
+ return="long"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="cr" type="android.content.ContentResolver">
+</parameter>
+<parameter name="name" type="java.lang.String">
+</parameter>
+<parameter name="def" type="long">
+</parameter>
+</method>
+<method name="getLong"
+ return="long"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="cr" type="android.content.ContentResolver">
+</parameter>
+<parameter name="name" type="java.lang.String">
+</parameter>
+<exception name="Settings.SettingNotFoundException" type="android.provider.Settings.SettingNotFoundException">
+</exception>
+</method>
+<method name="getString"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="true"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="resolver" type="android.content.ContentResolver">
+</parameter>
+<parameter name="name" type="java.lang.String">
+</parameter>
+</method>
+<method name="getUriFor"
+ return="android.net.Uri"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+</method>
+<method name="isLocationProviderEnabled"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="cr" type="android.content.ContentResolver">
+</parameter>
+<parameter name="provider" type="java.lang.String">
+</parameter>
+</method>
+<method name="putFloat"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="cr" type="android.content.ContentResolver">
+</parameter>
+<parameter name="name" type="java.lang.String">
+</parameter>
+<parameter name="value" type="float">
+</parameter>
+</method>
+<method name="putInt"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="cr" type="android.content.ContentResolver">
+</parameter>
+<parameter name="name" type="java.lang.String">
+</parameter>
+<parameter name="value" type="int">
+</parameter>
+</method>
+<method name="putLong"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="cr" type="android.content.ContentResolver">
+</parameter>
+<parameter name="name" type="java.lang.String">
+</parameter>
+<parameter name="value" type="long">
+</parameter>
+</method>
+<method name="putString"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="resolver" type="android.content.ContentResolver">
+</parameter>
+<parameter name="name" type="java.lang.String">
+</parameter>
+<parameter name="value" type="java.lang.String">
+</parameter>
+</method>
+<method name="setLocationProviderEnabled"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="cr" type="android.content.ContentResolver">
+</parameter>
+<parameter name="provider" type="java.lang.String">
+</parameter>
+<parameter name="enabled" type="boolean">
+</parameter>
+</method>
+<field name="ACCESSIBILITY_ENABLED"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;accessibility_enabled&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ADB_ENABLED"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;adb_enabled&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ALLOWED_GEOLOCATION_ORIGINS"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;allowed_geolocation_origins&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ALLOW_MOCK_LOCATION"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;mock_location&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ANDROID_ID"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android_id&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="BACKGROUND_DATA"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;background_data&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="BLUETOOTH_ON"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;bluetooth_on&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="CONTENT_URI"
+ type="android.net.Uri"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="DATA_ROAMING"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;data_roaming&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="DEFAULT_INPUT_METHOD"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;default_input_method&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="DEVICE_PROVISIONED"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;device_provisioned&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ENABLED_ACCESSIBILITY_SERVICES"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;enabled_accessibility_services&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ENABLED_INPUT_METHODS"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;enabled_input_methods&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="HTTP_PROXY"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;http_proxy&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="INSTALL_NON_MARKET_APPS"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;install_non_market_apps&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="LOCATION_PROVIDERS_ALLOWED"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;location_providers_allowed&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="LOCK_PATTERN_ENABLED"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;lock_pattern_autolock&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="LOCK_PATTERN_TACTILE_FEEDBACK_ENABLED"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;lock_pattern_tactile_feedback_enabled&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="LOCK_PATTERN_VISIBLE"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;lock_pattern_visible_pattern&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="LOGGING_ID"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;logging_id&quot;"
+ static="true"
+ final="true"
+ deprecated="deprecated"
+ visibility="public"
+>
+</field>
+<field name="NETWORK_PREFERENCE"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;network_preference&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="PARENTAL_CONTROL_ENABLED"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;parental_control_enabled&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="PARENTAL_CONTROL_LAST_UPDATE"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;parental_control_last_update&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="PARENTAL_CONTROL_REDIRECT_URL"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;parental_control_redirect_url&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="SETTINGS_CLASSNAME"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;settings_classname&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="SYS_PROP_SETTING_VERSION"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;sys.settings_secure_version&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TTS_DEFAULT_COUNTRY"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;tts_default_country&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TTS_DEFAULT_LANG"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;tts_default_lang&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TTS_DEFAULT_PITCH"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;tts_default_pitch&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TTS_DEFAULT_RATE"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;tts_default_rate&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TTS_DEFAULT_SYNTH"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;tts_default_synth&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TTS_DEFAULT_VARIANT"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;tts_default_variant&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TTS_ENABLED_PLUGINS"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;tts_enabled_plugins&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TTS_USE_DEFAULTS"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;tts_use_defaults&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="USB_MASS_STORAGE_ENABLED"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;usb_mass_storage_enabled&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="USE_GOOGLE_MAIL"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;use_google_mail&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="WIFI_MAX_DHCP_RETRY_COUNT"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;wifi_max_dhcp_retry_count&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="WIFI_MOBILE_DATA_TRANSITION_WAKELOCK_TIMEOUT_MS"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;wifi_mobile_data_transition_wakelock_timeout_ms&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="WIFI_NETWORKS_AVAILABLE_NOTIFICATION_ON"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;wifi_networks_available_notification_on&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="WIFI_NETWORKS_AVAILABLE_REPEAT_DELAY"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;wifi_networks_available_repeat_delay&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="WIFI_NUM_OPEN_NETWORKS_KEPT"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;wifi_num_open_networks_kept&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="WIFI_ON"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;wifi_on&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="WIFI_WATCHDOG_ACCEPTABLE_PACKET_LOSS_PERCENTAGE"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;wifi_watchdog_acceptable_packet_loss_percentage&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="WIFI_WATCHDOG_AP_COUNT"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;wifi_watchdog_ap_count&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="WIFI_WATCHDOG_BACKGROUND_CHECK_DELAY_MS"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;wifi_watchdog_background_check_delay_ms&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="WIFI_WATCHDOG_BACKGROUND_CHECK_ENABLED"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;wifi_watchdog_background_check_enabled&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="WIFI_WATCHDOG_BACKGROUND_CHECK_TIMEOUT_MS"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;wifi_watchdog_background_check_timeout_ms&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="WIFI_WATCHDOG_INITIAL_IGNORED_PING_COUNT"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;wifi_watchdog_initial_ignored_ping_count&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="WIFI_WATCHDOG_MAX_AP_CHECKS"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;wifi_watchdog_max_ap_checks&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="WIFI_WATCHDOG_ON"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;wifi_watchdog_on&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="WIFI_WATCHDOG_PING_COUNT"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;wifi_watchdog_ping_count&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="WIFI_WATCHDOG_PING_DELAY_MS"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;wifi_watchdog_ping_delay_ms&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="WIFI_WATCHDOG_PING_TIMEOUT_MS"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;wifi_watchdog_ping_timeout_ms&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="WIFI_WATCHDOG_WATCH_LIST"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;wifi_watchdog_watch_list&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<class name="Settings.SettingNotFoundException"
+ extends="android.util.AndroidException"
+ abstract="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="Settings.SettingNotFoundException"
+ type="android.provider.Settings.SettingNotFoundException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="msg" type="java.lang.String">
+</parameter>
+</constructor>
+</class>
+<class name="Settings.System"
+ extends="android.provider.Settings.NameValueTable"
+ abstract="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="Settings.System"
+ type="android.provider.Settings.System"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<method name="getConfiguration"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="cr" type="android.content.ContentResolver">
+</parameter>
+<parameter name="outConfig" type="android.content.res.Configuration">
+</parameter>
+</method>
+<method name="getFloat"
+ return="float"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="cr" type="android.content.ContentResolver">
+</parameter>
+<parameter name="name" type="java.lang.String">
+</parameter>
+<parameter name="def" type="float">
+</parameter>
+</method>
+<method name="getFloat"
+ return="float"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="cr" type="android.content.ContentResolver">
+</parameter>
+<parameter name="name" type="java.lang.String">
+</parameter>
+<exception name="Settings.SettingNotFoundException" type="android.provider.Settings.SettingNotFoundException">
+</exception>
+</method>
+<method name="getInt"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="cr" type="android.content.ContentResolver">
+</parameter>
+<parameter name="name" type="java.lang.String">
+</parameter>
+<parameter name="def" type="int">
+</parameter>
+</method>
+<method name="getInt"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="cr" type="android.content.ContentResolver">
+</parameter>
+<parameter name="name" type="java.lang.String">
+</parameter>
+<exception name="Settings.SettingNotFoundException" type="android.provider.Settings.SettingNotFoundException">
+</exception>
+</method>
+<method name="getLong"
+ return="long"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="cr" type="android.content.ContentResolver">
+</parameter>
+<parameter name="name" type="java.lang.String">
+</parameter>
+<parameter name="def" type="long">
+</parameter>
+</method>
+<method name="getLong"
+ return="long"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="cr" type="android.content.ContentResolver">
+</parameter>
+<parameter name="name" type="java.lang.String">
+</parameter>
+<exception name="Settings.SettingNotFoundException" type="android.provider.Settings.SettingNotFoundException">
+</exception>
+</method>
+<method name="getShowGTalkServiceStatus"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="cr" type="android.content.ContentResolver">
+</parameter>
+</method>
+<method name="getString"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="true"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="resolver" type="android.content.ContentResolver">
+</parameter>
+<parameter name="name" type="java.lang.String">
+</parameter>
+</method>
+<method name="getUriFor"
+ return="android.net.Uri"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+</method>
+<method name="putConfiguration"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="cr" type="android.content.ContentResolver">
+</parameter>
+<parameter name="config" type="android.content.res.Configuration">
+</parameter>
+</method>
+<method name="putFloat"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="cr" type="android.content.ContentResolver">
+</parameter>
+<parameter name="name" type="java.lang.String">
+</parameter>
+<parameter name="value" type="float">
+</parameter>
+</method>
+<method name="putInt"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="cr" type="android.content.ContentResolver">
+</parameter>
+<parameter name="name" type="java.lang.String">
+</parameter>
+<parameter name="value" type="int">
+</parameter>
+</method>
+<method name="putLong"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="cr" type="android.content.ContentResolver">
+</parameter>
+<parameter name="name" type="java.lang.String">
+</parameter>
+<parameter name="value" type="long">
+</parameter>
+</method>
+<method name="putString"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="resolver" type="android.content.ContentResolver">
+</parameter>
+<parameter name="name" type="java.lang.String">
+</parameter>
+<parameter name="value" type="java.lang.String">
+</parameter>
+</method>
+<method name="setShowGTalkServiceStatus"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="cr" type="android.content.ContentResolver">
+</parameter>
+<parameter name="flag" type="boolean">
+</parameter>
+</method>
+<field name="ACCELEROMETER_ROTATION"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;accelerometer_rotation&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ADB_ENABLED"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;adb_enabled&quot;"
+ static="true"
+ final="true"
+ deprecated="deprecated"
+ visibility="public"
+>
+</field>
+<field name="AIRPLANE_MODE_ON"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;airplane_mode_on&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="AIRPLANE_MODE_RADIOS"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;airplane_mode_radios&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ALARM_ALERT"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;alarm_alert&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ALWAYS_FINISH_ACTIVITIES"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;always_finish_activities&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ANDROID_ID"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android_id&quot;"
+ static="true"
+ final="true"
+ deprecated="deprecated"
+ visibility="public"
+>
+</field>
+<field name="APPEND_FOR_LAST_AUDIBLE"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;_last_audible&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="AUTO_TIME"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;auto_time&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="BLUETOOTH_DISCOVERABILITY"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;bluetooth_discoverability&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="BLUETOOTH_DISCOVERABILITY_TIMEOUT"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;bluetooth_discoverability_timeout&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="BLUETOOTH_ON"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;bluetooth_on&quot;"
+ static="true"
+ final="true"
+ deprecated="deprecated"
+ visibility="public"
+>
+</field>
+<field name="CONTENT_URI"
+ type="android.net.Uri"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="DATA_ROAMING"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;data_roaming&quot;"
+ static="true"
+ final="true"
+ deprecated="deprecated"
+ visibility="public"
+>
+</field>
+<field name="DATE_FORMAT"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;date_format&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="DEBUG_APP"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;debug_app&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="DEFAULT_ALARM_ALERT_URI"
+ type="android.net.Uri"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="DEFAULT_NOTIFICATION_URI"
+ type="android.net.Uri"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="DEFAULT_RINGTONE_URI"
+ type="android.net.Uri"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="DEVICE_PROVISIONED"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;device_provisioned&quot;"
+ static="true"
+ final="true"
+ deprecated="deprecated"
+ visibility="public"
+>
+</field>
+<field name="DIM_SCREEN"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;dim_screen&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="DTMF_TONE_WHEN_DIALING"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;dtmf_tone&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="END_BUTTON_BEHAVIOR"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;end_button_behavior&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="FONT_SCALE"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;font_scale&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="HAPTIC_FEEDBACK_ENABLED"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;haptic_feedback_enabled&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="HTTP_PROXY"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;http_proxy&quot;"
+ static="true"
+ final="true"
+ deprecated="deprecated"
+ visibility="public"
+>
+</field>
+<field name="INSTALL_NON_MARKET_APPS"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;install_non_market_apps&quot;"
+ static="true"
+ final="true"
+ deprecated="deprecated"
+ visibility="public"
+>
+</field>
+<field name="LOCATION_PROVIDERS_ALLOWED"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;location_providers_allowed&quot;"
+ static="true"
+ final="true"
+ deprecated="deprecated"
+ visibility="public"
+>
+</field>
+<field name="LOCK_PATTERN_ENABLED"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;lock_pattern_autolock&quot;"
+ static="true"
+ final="true"
+ deprecated="deprecated"
+ visibility="public"
+>
+</field>
+<field name="LOCK_PATTERN_TACTILE_FEEDBACK_ENABLED"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;lock_pattern_tactile_feedback_enabled&quot;"
+ static="true"
+ final="true"
+ deprecated="deprecated"
+ visibility="public"
+>
+</field>
+<field name="LOCK_PATTERN_VISIBLE"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;lock_pattern_visible_pattern&quot;"
+ static="true"
+ final="true"
+ deprecated="deprecated"
+ visibility="public"
+>
+</field>
+<field name="LOGGING_ID"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;logging_id&quot;"
+ static="true"
+ final="true"
+ deprecated="deprecated"
+ visibility="public"
+>
+</field>
+<field name="MODE_RINGER"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;mode_ringer&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="MODE_RINGER_STREAMS_AFFECTED"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;mode_ringer_streams_affected&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="MUTE_STREAMS_AFFECTED"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;mute_streams_affected&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="NETWORK_PREFERENCE"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;network_preference&quot;"
+ static="true"
+ final="true"
+ deprecated="deprecated"
+ visibility="public"
+>
+</field>
+<field name="NEXT_ALARM_FORMATTED"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;next_alarm_formatted&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="NOTIFICATION_SOUND"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;notification_sound&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="PARENTAL_CONTROL_ENABLED"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;parental_control_enabled&quot;"
+ static="true"
+ final="true"
+ deprecated="deprecated"
+ visibility="public"
+>
+</field>
+<field name="PARENTAL_CONTROL_LAST_UPDATE"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;parental_control_last_update&quot;"
+ static="true"
+ final="true"
+ deprecated="deprecated"
+ visibility="public"
+>
+</field>
+<field name="PARENTAL_CONTROL_REDIRECT_URL"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;parental_control_redirect_url&quot;"
+ static="true"
+ final="true"
+ deprecated="deprecated"
+ visibility="public"
+>
+</field>
+<field name="RADIO_BLUETOOTH"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;bluetooth&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="RADIO_CELL"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;cell&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="RADIO_WIFI"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;wifi&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="RINGTONE"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;ringtone&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="SCREEN_BRIGHTNESS"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;screen_brightness&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="SCREEN_BRIGHTNESS_MODE"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;screen_brightness_mode&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="SCREEN_BRIGHTNESS_MODE_AUTOMATIC"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="SCREEN_BRIGHTNESS_MODE_MANUAL"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="0"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="SCREEN_OFF_TIMEOUT"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;screen_off_timeout&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="SETTINGS_CLASSNAME"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;settings_classname&quot;"
+ static="true"
+ final="true"
+ deprecated="deprecated"
+ visibility="public"
+>
+</field>
+<field name="SETUP_WIZARD_HAS_RUN"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;setup_wizard_has_run&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="SHOW_GTALK_SERVICE_STATUS"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;SHOW_GTALK_SERVICE_STATUS&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="SHOW_PROCESSES"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;show_processes&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="SHOW_WEB_SUGGESTIONS"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;show_web_suggestions&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="SOUND_EFFECTS_ENABLED"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;sound_effects_enabled&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="STAY_ON_WHILE_PLUGGED_IN"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;stay_on_while_plugged_in&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="SYS_PROP_SETTING_VERSION"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;sys.settings_system_version&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TEXT_AUTO_CAPS"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;auto_caps&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TEXT_AUTO_PUNCTUATE"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;auto_punctuate&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TEXT_AUTO_REPLACE"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;auto_replace&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TEXT_SHOW_PASSWORD"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;show_password&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TIME_12_24"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;time_12_24&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TRANSITION_ANIMATION_SCALE"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;transition_animation_scale&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="USB_MASS_STORAGE_ENABLED"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;usb_mass_storage_enabled&quot;"
+ static="true"
+ final="true"
+ deprecated="deprecated"
+ visibility="public"
+>
+</field>
+<field name="USE_GOOGLE_MAIL"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;use_google_mail&quot;"
+ static="true"
+ final="true"
+ deprecated="deprecated"
+ visibility="public"
+>
+</field>
+<field name="VIBRATE_ON"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;vibrate_on&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="VOLUME_ALARM"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;volume_alarm&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="VOLUME_BLUETOOTH_SCO"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;volume_bluetooth_sco&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="VOLUME_MUSIC"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;volume_music&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="VOLUME_NOTIFICATION"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;volume_notification&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="VOLUME_RING"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;volume_ring&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="VOLUME_SETTINGS"
+ type="java.lang.String[]"
+ transient="false"
+ volatile="false"
+ value="null"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="VOLUME_SYSTEM"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;volume_system&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="VOLUME_VOICE"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;volume_voice&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="WAIT_FOR_DEBUGGER"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;wait_for_debugger&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="WALLPAPER_ACTIVITY"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;wallpaper_activity&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="WIFI_MAX_DHCP_RETRY_COUNT"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;wifi_max_dhcp_retry_count&quot;"
+ static="true"
+ final="true"
+ deprecated="deprecated"
+ visibility="public"
+>
+</field>
+<field name="WIFI_MOBILE_DATA_TRANSITION_WAKELOCK_TIMEOUT_MS"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;wifi_mobile_data_transition_wakelock_timeout_ms&quot;"
+ static="true"
+ final="true"
+ deprecated="deprecated"
+ visibility="public"
+>
+</field>
+<field name="WIFI_NETWORKS_AVAILABLE_NOTIFICATION_ON"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;wifi_networks_available_notification_on&quot;"
+ static="true"
+ final="true"
+ deprecated="deprecated"
+ visibility="public"
+>
+</field>
+<field name="WIFI_NETWORKS_AVAILABLE_REPEAT_DELAY"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;wifi_networks_available_repeat_delay&quot;"
+ static="true"
+ final="true"
+ deprecated="deprecated"
+ visibility="public"
+>
+</field>
+<field name="WIFI_NUM_OPEN_NETWORKS_KEPT"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;wifi_num_open_networks_kept&quot;"
+ static="true"
+ final="true"
+ deprecated="deprecated"
+ visibility="public"
+>
+</field>
+<field name="WIFI_ON"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;wifi_on&quot;"
+ static="true"
+ final="true"
+ deprecated="deprecated"
+ visibility="public"
+>
+</field>
+<field name="WIFI_SLEEP_POLICY"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;wifi_sleep_policy&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="WIFI_SLEEP_POLICY_DEFAULT"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="0"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="WIFI_SLEEP_POLICY_NEVER"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="WIFI_SLEEP_POLICY_NEVER_WHILE_PLUGGED"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="WIFI_STATIC_DNS1"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;wifi_static_dns1&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="WIFI_STATIC_DNS2"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;wifi_static_dns2&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="WIFI_STATIC_GATEWAY"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;wifi_static_gateway&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="WIFI_STATIC_IP"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;wifi_static_ip&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="WIFI_STATIC_NETMASK"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;wifi_static_netmask&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="WIFI_USE_STATIC_IP"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;wifi_use_static_ip&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="WIFI_WATCHDOG_ACCEPTABLE_PACKET_LOSS_PERCENTAGE"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;wifi_watchdog_acceptable_packet_loss_percentage&quot;"
+ static="true"
+ final="true"
+ deprecated="deprecated"
+ visibility="public"
+>
+</field>
+<field name="WIFI_WATCHDOG_AP_COUNT"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;wifi_watchdog_ap_count&quot;"
+ static="true"
+ final="true"
+ deprecated="deprecated"
+ visibility="public"
+>
+</field>
+<field name="WIFI_WATCHDOG_BACKGROUND_CHECK_DELAY_MS"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;wifi_watchdog_background_check_delay_ms&quot;"
+ static="true"
+ final="true"
+ deprecated="deprecated"
+ visibility="public"
+>
+</field>
+<field name="WIFI_WATCHDOG_BACKGROUND_CHECK_ENABLED"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;wifi_watchdog_background_check_enabled&quot;"
+ static="true"
+ final="true"
+ deprecated="deprecated"
+ visibility="public"
+>
+</field>
+<field name="WIFI_WATCHDOG_BACKGROUND_CHECK_TIMEOUT_MS"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;wifi_watchdog_background_check_timeout_ms&quot;"
+ static="true"
+ final="true"
+ deprecated="deprecated"
+ visibility="public"
+>
+</field>
+<field name="WIFI_WATCHDOG_INITIAL_IGNORED_PING_COUNT"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;wifi_watchdog_initial_ignored_ping_count&quot;"
+ static="true"
+ final="true"
+ deprecated="deprecated"
+ visibility="public"
+>
+</field>
+<field name="WIFI_WATCHDOG_MAX_AP_CHECKS"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;wifi_watchdog_max_ap_checks&quot;"
+ static="true"
+ final="true"
+ deprecated="deprecated"
+ visibility="public"
+>
+</field>
+<field name="WIFI_WATCHDOG_ON"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;wifi_watchdog_on&quot;"
+ static="true"
+ final="true"
+ deprecated="deprecated"
+ visibility="public"
+>
+</field>
+<field name="WIFI_WATCHDOG_PING_COUNT"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;wifi_watchdog_ping_count&quot;"
+ static="true"
+ final="true"
+ deprecated="deprecated"
+ visibility="public"
+>
+</field>
+<field name="WIFI_WATCHDOG_PING_DELAY_MS"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;wifi_watchdog_ping_delay_ms&quot;"
+ static="true"
+ final="true"
+ deprecated="deprecated"
+ visibility="public"
+>
+</field>
+<field name="WIFI_WATCHDOG_PING_TIMEOUT_MS"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;wifi_watchdog_ping_timeout_ms&quot;"
+ static="true"
+ final="true"
+ deprecated="deprecated"
+ visibility="public"
+>
+</field>
+<field name="WINDOW_ANIMATION_SCALE"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;window_animation_scale&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<class name="SyncStateContract"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="SyncStateContract"
+ type="android.provider.SyncStateContract"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+</class>
+<interface name="SyncStateContract.Columns"
+ abstract="true"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="android.provider.BaseColumns">
+</implements>
+<field name="ACCOUNT_NAME"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;account_name&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ACCOUNT_TYPE"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;account_type&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="DATA"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;data&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</interface>
+<class name="SyncStateContract.Constants"
+ extends="java.lang.Object"
+ abstract="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="android.provider.SyncStateContract.Columns">
+</implements>
+<constructor name="SyncStateContract.Constants"
+ type="android.provider.SyncStateContract.Constants"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<field name="CONTENT_DIRECTORY"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;syncstate&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<class name="SyncStateContract.Helpers"
+ extends="java.lang.Object"
+ abstract="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="SyncStateContract.Helpers"
+ type="android.provider.SyncStateContract.Helpers"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<method name="get"
+ return="byte[]"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="provider" type="android.content.ContentProviderClient">
+</parameter>
+<parameter name="uri" type="android.net.Uri">
+</parameter>
+<parameter name="account" type="android.accounts.Account">
+</parameter>
+<exception name="RemoteException" type="android.os.RemoteException">
+</exception>
+</method>
+<method name="getWithUri"
+ return="android.util.Pair&lt;android.net.Uri, byte[]&gt;"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="provider" type="android.content.ContentProviderClient">
+</parameter>
+<parameter name="uri" type="android.net.Uri">
+</parameter>
+<parameter name="account" type="android.accounts.Account">
+</parameter>
+<exception name="RemoteException" type="android.os.RemoteException">
+</exception>
+</method>
+<method name="insert"
+ return="android.net.Uri"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="provider" type="android.content.ContentProviderClient">
+</parameter>
+<parameter name="uri" type="android.net.Uri">
+</parameter>
+<parameter name="account" type="android.accounts.Account">
+</parameter>
+<parameter name="data" type="byte[]">
+</parameter>
+<exception name="RemoteException" type="android.os.RemoteException">
+</exception>
+</method>
+<method name="newSetOperation"
+ return="android.content.ContentProviderOperation"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="uri" type="android.net.Uri">
+</parameter>
+<parameter name="account" type="android.accounts.Account">
+</parameter>
+<parameter name="data" type="byte[]">
+</parameter>
+</method>
+<method name="newUpdateOperation"
+ return="android.content.ContentProviderOperation"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="uri" type="android.net.Uri">
+</parameter>
+<parameter name="data" type="byte[]">
+</parameter>
+</method>
+<method name="set"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="provider" type="android.content.ContentProviderClient">
+</parameter>
+<parameter name="uri" type="android.net.Uri">
+</parameter>
+<parameter name="account" type="android.accounts.Account">
+</parameter>
+<parameter name="data" type="byte[]">
+</parameter>
+<exception name="RemoteException" type="android.os.RemoteException">
+</exception>
+</method>
+<method name="update"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="provider" type="android.content.ContentProviderClient">
+</parameter>
+<parameter name="uri" type="android.net.Uri">
+</parameter>
+<parameter name="data" type="byte[]">
+</parameter>
+<exception name="RemoteException" type="android.os.RemoteException">
+</exception>
+</method>
+</class>
+<class name="UserDictionary"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="UserDictionary"
+ type="android.provider.UserDictionary"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<field name="AUTHORITY"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;user_dictionary&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="CONTENT_URI"
+ type="android.net.Uri"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<class name="UserDictionary.Words"
+ extends="java.lang.Object"
+ abstract="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="android.provider.BaseColumns">
+</implements>
+<constructor name="UserDictionary.Words"
+ type="android.provider.UserDictionary.Words"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<method name="addWord"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="context" type="android.content.Context">
+</parameter>
+<parameter name="word" type="java.lang.String">
+</parameter>
+<parameter name="frequency" type="int">
+</parameter>
+<parameter name="localeType" type="int">
+</parameter>
+</method>
+<field name="APP_ID"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;appid&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="CONTENT_ITEM_TYPE"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;vnd.android.cursor.item/vnd.google.userword&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="CONTENT_TYPE"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;vnd.android.cursor.dir/vnd.google.userword&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="CONTENT_URI"
+ type="android.net.Uri"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="DEFAULT_SORT_ORDER"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;frequency DESC&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="FREQUENCY"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;frequency&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="LOCALE"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;locale&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="LOCALE_TYPE_ALL"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="0"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="LOCALE_TYPE_CURRENT"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="WORD"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;word&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="_ID"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;_id&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+</package>
+<package name="android.sax"
+>
+<class name="Element"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="getChild"
+ return="android.sax.Element"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="localName" type="java.lang.String">
+</parameter>
+</method>
+<method name="getChild"
+ return="android.sax.Element"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="uri" type="java.lang.String">
+</parameter>
+<parameter name="localName" type="java.lang.String">
+</parameter>
+</method>
+<method name="requireChild"
+ return="android.sax.Element"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="localName" type="java.lang.String">
+</parameter>
+</method>
+<method name="requireChild"
+ return="android.sax.Element"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="uri" type="java.lang.String">
+</parameter>
+<parameter name="localName" type="java.lang.String">
+</parameter>
+</method>
+<method name="setElementListener"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="elementListener" type="android.sax.ElementListener">
+</parameter>
+</method>
+<method name="setEndElementListener"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="endElementListener" type="android.sax.EndElementListener">
+</parameter>
+</method>
+<method name="setEndTextElementListener"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="endTextElementListener" type="android.sax.EndTextElementListener">
+</parameter>
+</method>
+<method name="setStartElementListener"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="startElementListener" type="android.sax.StartElementListener">
+</parameter>
+</method>
+<method name="setTextElementListener"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="elementListener" type="android.sax.TextElementListener">
+</parameter>
+</method>
+</class>
+<interface name="ElementListener"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="android.sax.EndElementListener">
+</implements>
+<implements name="android.sax.StartElementListener">
+</implements>
+</interface>
+<interface name="EndElementListener"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="end"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+</interface>
+<interface name="EndTextElementListener"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="end"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="body" type="java.lang.String">
+</parameter>
+</method>
+</interface>
+<class name="RootElement"
+ extends="android.sax.Element"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="RootElement"
+ type="android.sax.RootElement"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="uri" type="java.lang.String">
+</parameter>
+<parameter name="localName" type="java.lang.String">
+</parameter>
+</constructor>
+<constructor name="RootElement"
+ type="android.sax.RootElement"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="localName" type="java.lang.String">
+</parameter>
+</constructor>
+<method name="getContentHandler"
+ return="org.xml.sax.ContentHandler"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+</class>
+<interface name="StartElementListener"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="start"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="attributes" type="org.xml.sax.Attributes">
+</parameter>
+</method>
+</interface>
+<interface name="TextElementListener"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="android.sax.EndTextElementListener">
+</implements>
+<implements name="android.sax.StartElementListener">
+</implements>
+</interface>
+</package>
+<package name="android.service.wallpaper"
+>
+<class name="WallpaperService"
+ extends="android.app.Service"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="WallpaperService"
+ type="android.service.wallpaper.WallpaperService"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<method name="onBind"
+ return="android.os.IBinder"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="intent" type="android.content.Intent">
+</parameter>
+</method>
+<method name="onCreateEngine"
+ return="android.service.wallpaper.WallpaperService.Engine"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<field name="SERVICE_INTERFACE"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.service.wallpaper.WallpaperService&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="SERVICE_META_DATA"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.service.wallpaper&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<class name="WallpaperService.Engine"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="WallpaperService.Engine"
+ type="android.service.wallpaper.WallpaperService.Engine"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<method name="getDesiredMinimumHeight"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getDesiredMinimumWidth"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getSurfaceHolder"
+ return="android.view.SurfaceHolder"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isPreview"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isVisible"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="onCommand"
+ return="android.os.Bundle"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="action" type="java.lang.String">
+</parameter>
+<parameter name="x" type="int">
+</parameter>
+<parameter name="y" type="int">
+</parameter>
+<parameter name="z" type="int">
+</parameter>
+<parameter name="extras" type="android.os.Bundle">
+</parameter>
+<parameter name="resultRequested" type="boolean">
+</parameter>
+</method>
+<method name="onCreate"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="surfaceHolder" type="android.view.SurfaceHolder">
+</parameter>
+</method>
+<method name="onDesiredSizeChanged"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="desiredWidth" type="int">
+</parameter>
+<parameter name="desiredHeight" type="int">
+</parameter>
+</method>
+<method name="onDestroy"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="onOffsetsChanged"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="xOffset" type="float">
+</parameter>
+<parameter name="yOffset" type="float">
+</parameter>
+<parameter name="xOffsetStep" type="float">
+</parameter>
+<parameter name="yOffsetStep" type="float">
+</parameter>
+<parameter name="xPixelOffset" type="int">
+</parameter>
+<parameter name="yPixelOffset" type="int">
+</parameter>
+</method>
+<method name="onSurfaceChanged"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="holder" type="android.view.SurfaceHolder">
+</parameter>
+<parameter name="format" type="int">
+</parameter>
+<parameter name="width" type="int">
+</parameter>
+<parameter name="height" type="int">
+</parameter>
+</method>
+<method name="onSurfaceCreated"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="holder" type="android.view.SurfaceHolder">
+</parameter>
+</method>
+<method name="onSurfaceDestroyed"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="holder" type="android.view.SurfaceHolder">
+</parameter>
+</method>
+<method name="onTouchEvent"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="event" type="android.view.MotionEvent">
+</parameter>
+</method>
+<method name="onVisibilityChanged"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="visible" type="boolean">
+</parameter>
+</method>
+<method name="setTouchEventsEnabled"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="enabled" type="boolean">
+</parameter>
+</method>
+</class>
+</package>
+<package name="android.speech"
+>
+<interface name="RecognitionListener"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="onBeginningOfSpeech"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="onBufferReceived"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="buffer" type="byte[]">
+</parameter>
+</method>
+<method name="onEndOfSpeech"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="onError"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="error" type="int">
+</parameter>
+</method>
+<method name="onEvent"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="eventType" type="int">
+</parameter>
+<parameter name="params" type="android.os.Bundle">
+</parameter>
+</method>
+<method name="onPartialResults"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="partialResults" type="android.os.Bundle">
+</parameter>
+</method>
+<method name="onReadyForSpeech"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="params" type="android.os.Bundle">
+</parameter>
+</method>
+<method name="onResults"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="results" type="android.os.Bundle">
+</parameter>
+</method>
+<method name="onRmsChanged"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="rmsdB" type="float">
+</parameter>
+</method>
+</interface>
+<class name="RecognitionService"
+ extends="android.app.Service"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="RecognitionService"
+ type="android.speech.RecognitionService"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<method name="onBind"
+ return="android.os.IBinder"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="intent" type="android.content.Intent">
+</parameter>
+</method>
+<method name="onCancel"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="listener" type="android.speech.RecognitionService.Callback">
+</parameter>
+</method>
+<method name="onStartListening"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="recognizerIntent" type="android.content.Intent">
+</parameter>
+<parameter name="listener" type="android.speech.RecognitionService.Callback">
+</parameter>
+</method>
+<method name="onStopListening"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="listener" type="android.speech.RecognitionService.Callback">
+</parameter>
+</method>
+<field name="SERVICE_INTERFACE"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.speech.RecognitionService&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="SERVICE_META_DATA"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.speech&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<class name="RecognitionService.Callback"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="beginningOfSpeech"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="RemoteException" type="android.os.RemoteException">
+</exception>
+</method>
+<method name="bufferReceived"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="buffer" type="byte[]">
+</parameter>
+<exception name="RemoteException" type="android.os.RemoteException">
+</exception>
+</method>
+<method name="endOfSpeech"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="RemoteException" type="android.os.RemoteException">
+</exception>
+</method>
+<method name="error"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="error" type="int">
+</parameter>
+<exception name="RemoteException" type="android.os.RemoteException">
+</exception>
+</method>
+<method name="partialResults"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="partialResults" type="android.os.Bundle">
+</parameter>
+<exception name="RemoteException" type="android.os.RemoteException">
+</exception>
+</method>
+<method name="readyForSpeech"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="params" type="android.os.Bundle">
+</parameter>
+<exception name="RemoteException" type="android.os.RemoteException">
+</exception>
+</method>
+<method name="results"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="results" type="android.os.Bundle">
+</parameter>
+<exception name="RemoteException" type="android.os.RemoteException">
+</exception>
+</method>
+<method name="rmsChanged"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="rmsdB" type="float">
+</parameter>
+<exception name="RemoteException" type="android.os.RemoteException">
+</exception>
+</method>
+</class>
+<class name="RecognizerIntent"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="getVoiceDetailsIntent"
+ return="android.content.Intent"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="context" type="android.content.Context">
+</parameter>
+</method>
+<field name="ACTION_GET_LANGUAGE_DETAILS"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.speech.action.GET_LANGUAGE_DETAILS&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ACTION_RECOGNIZE_SPEECH"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.speech.action.RECOGNIZE_SPEECH&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ACTION_WEB_SEARCH"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.speech.action.WEB_SEARCH&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="DETAILS_META_DATA"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.speech.DETAILS&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="EXTRA_CALLING_PACKAGE"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;calling_package&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="EXTRA_LANGUAGE"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.speech.extra.LANGUAGE&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="EXTRA_LANGUAGE_MODEL"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.speech.extra.LANGUAGE_MODEL&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="EXTRA_LANGUAGE_PREFERENCE"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.speech.extra.LANGUAGE_PREFERENCE&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="EXTRA_MAX_RESULTS"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.speech.extra.MAX_RESULTS&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="EXTRA_ONLY_RETURN_LANGUAGE_PREFERENCE"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.speech.extra.ONLY_RETURN_LANGUAGE_PREFERENCE&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="EXTRA_PARTIAL_RESULTS"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.speech.extra.PARTIAL_RESULTS&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="EXTRA_PROMPT"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.speech.extra.PROMPT&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="EXTRA_RESULTS"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.speech.extra.RESULTS&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="EXTRA_RESULTS_PENDINGINTENT"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.speech.extra.RESULTS_PENDINGINTENT&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="EXTRA_RESULTS_PENDINGINTENT_BUNDLE"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.speech.extra.RESULTS_PENDINGINTENT_BUNDLE&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="EXTRA_SPEECH_INPUT_COMPLETE_SILENCE_LENGTH_MILLIS"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.speech.extras.SPEECH_INPUT_COMPLETE_SILENCE_LENGTH_MILLIS&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="EXTRA_SPEECH_INPUT_MINIMUM_LENGTH_MILLIS"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.speech.extras.SPEECH_INPUT_MINIMUM_LENGTH_MILLIS&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="EXTRA_SPEECH_INPUT_POSSIBLY_COMPLETE_SILENCE_LENGTH_MILLIS"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.speech.extras.SPEECH_INPUT_POSSIBLY_COMPLETE_SILENCE_LENGTH_MILLIS&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="EXTRA_SUPPORTED_LANGUAGES"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.speech.extra.SUPPORTED_LANGUAGES&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="LANGUAGE_MODEL_FREE_FORM"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;free_form&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="LANGUAGE_MODEL_WEB_SEARCH"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;web_search&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="RESULT_AUDIO_ERROR"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="5"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="RESULT_CLIENT_ERROR"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="RESULT_NETWORK_ERROR"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="4"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="RESULT_NO_MATCH"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="RESULT_SERVER_ERROR"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="3"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<class name="SpeechRecognizer"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="cancel"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="createSpeechRecognizer"
+ return="android.speech.SpeechRecognizer"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="context" type="android.content.Context">
+</parameter>
+</method>
+<method name="createSpeechRecognizer"
+ return="android.speech.SpeechRecognizer"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="context" type="android.content.Context">
+</parameter>
+<parameter name="serviceComponent" type="android.content.ComponentName">
+</parameter>
+</method>
+<method name="destroy"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isRecognitionAvailable"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="context" type="android.content.Context">
+</parameter>
+</method>
+<method name="setRecognitionListener"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="listener" type="android.speech.RecognitionListener">
+</parameter>
+</method>
+<method name="startListening"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="recognizerIntent" type="android.content.Intent">
+</parameter>
+</method>
+<method name="stopListening"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<field name="ERROR_AUDIO"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="3"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ERROR_CLIENT"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="5"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ERROR_INSUFFICIENT_PERMISSIONS"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="9"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ERROR_NETWORK"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ERROR_NETWORK_TIMEOUT"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ERROR_NO_MATCH"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="7"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ERROR_RECOGNIZER_BUSY"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="8"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ERROR_SERVER"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="4"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ERROR_SPEECH_TIMEOUT"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="6"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="RESULTS_RECOGNITION"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;results_recognition&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+</package>
+<package name="android.speech.tts"
+>
+<class name="TextToSpeech"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="TextToSpeech"
+ type="android.speech.tts.TextToSpeech"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="context" type="android.content.Context">
+</parameter>
+<parameter name="listener" type="android.speech.tts.TextToSpeech.OnInitListener">
+</parameter>
+</constructor>
+<method name="addEarcon"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="earcon" type="java.lang.String">
+</parameter>
+<parameter name="packagename" type="java.lang.String">
+</parameter>
+<parameter name="resourceId" type="int">
+</parameter>
+</method>
+<method name="addEarcon"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="earcon" type="java.lang.String">
+</parameter>
+<parameter name="filename" type="java.lang.String">
+</parameter>
+</method>
+<method name="addSpeech"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="text" type="java.lang.String">
+</parameter>
+<parameter name="packagename" type="java.lang.String">
+</parameter>
+<parameter name="resourceId" type="int">
+</parameter>
+</method>
+<method name="addSpeech"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="text" type="java.lang.String">
+</parameter>
+<parameter name="filename" type="java.lang.String">
+</parameter>
+</method>
+<method name="areDefaultsEnforced"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getDefaultEngine"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getLanguage"
+ return="java.util.Locale"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isLanguageAvailable"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="loc" type="java.util.Locale">
+</parameter>
+</method>
+<method name="isSpeaking"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="playEarcon"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="earcon" type="java.lang.String">
+</parameter>
+<parameter name="queueMode" type="int">
+</parameter>
+<parameter name="params" type="java.util.HashMap&lt;java.lang.String, java.lang.String&gt;">
+</parameter>
+</method>
+<method name="playSilence"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="durationInMs" type="long">
+</parameter>
+<parameter name="queueMode" type="int">
+</parameter>
+<parameter name="params" type="java.util.HashMap&lt;java.lang.String, java.lang.String&gt;">
+</parameter>
+</method>
+<method name="setEngineByPackageName"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="enginePackageName" type="java.lang.String">
+</parameter>
+</method>
+<method name="setLanguage"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="loc" type="java.util.Locale">
+</parameter>
+</method>
+<method name="setOnUtteranceCompletedListener"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="listener" type="android.speech.tts.TextToSpeech.OnUtteranceCompletedListener">
+</parameter>
+</method>
+<method name="setPitch"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="pitch" type="float">
+</parameter>
+</method>
+<method name="setSpeechRate"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="speechRate" type="float">
+</parameter>
+</method>
+<method name="shutdown"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="speak"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="text" type="java.lang.String">
+</parameter>
+<parameter name="queueMode" type="int">
+</parameter>
+<parameter name="params" type="java.util.HashMap&lt;java.lang.String, java.lang.String&gt;">
+</parameter>
+</method>
+<method name="stop"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="synthesizeToFile"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="text" type="java.lang.String">
+</parameter>
+<parameter name="params" type="java.util.HashMap&lt;java.lang.String, java.lang.String&gt;">
+</parameter>
+<parameter name="filename" type="java.lang.String">
+</parameter>
+</method>
+<field name="ACTION_TTS_QUEUE_PROCESSING_COMPLETED"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.speech.tts.TTS_QUEUE_PROCESSING_COMPLETED&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ERROR"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="-1"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="LANG_AVAILABLE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="0"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="LANG_COUNTRY_AVAILABLE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="LANG_COUNTRY_VAR_AVAILABLE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="LANG_MISSING_DATA"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="-1"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="LANG_NOT_SUPPORTED"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="-2"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="QUEUE_ADD"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="QUEUE_FLUSH"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="0"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="SUCCESS"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="0"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<class name="TextToSpeech.Engine"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="TextToSpeech.Engine"
+ type="android.speech.tts.TextToSpeech.Engine"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<field name="ACTION_CHECK_TTS_DATA"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.speech.tts.engine.CHECK_TTS_DATA&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ACTION_INSTALL_TTS_DATA"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.speech.tts.engine.INSTALL_TTS_DATA&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ACTION_TTS_DATA_INSTALLED"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.speech.tts.engine.TTS_DATA_INSTALLED&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="CHECK_VOICE_DATA_BAD_DATA"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="-1"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="CHECK_VOICE_DATA_FAIL"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="0"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="CHECK_VOICE_DATA_MISSING_DATA"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="-2"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="CHECK_VOICE_DATA_MISSING_VOLUME"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="-3"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="CHECK_VOICE_DATA_PASS"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="DEFAULT_STREAM"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="3"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="EXTRA_AVAILABLE_VOICES"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;availableVoices&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="EXTRA_CHECK_VOICE_DATA_FOR"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;checkVoiceDataFor&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="EXTRA_TTS_DATA_INSTALLED"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;dataInstalled&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="EXTRA_UNAVAILABLE_VOICES"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;unavailableVoices&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="EXTRA_VOICE_DATA_FILES"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;dataFiles&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="EXTRA_VOICE_DATA_FILES_INFO"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;dataFilesInfo&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="EXTRA_VOICE_DATA_ROOT_DIRECTORY"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;dataRoot&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="KEY_PARAM_STREAM"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;streamType&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="KEY_PARAM_UTTERANCE_ID"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;utteranceId&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<interface name="TextToSpeech.OnInitListener"
+ abstract="true"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="onInit"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="status" type="int">
+</parameter>
+</method>
+</interface>
+<interface name="TextToSpeech.OnUtteranceCompletedListener"
+ abstract="true"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="onUtteranceCompleted"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="utteranceId" type="java.lang.String">
+</parameter>
+</method>
+</interface>
+</package>
+<package name="android.telephony"
+>
+<class name="CellLocation"
+ extends="java.lang.Object"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="CellLocation"
+ type="android.telephony.CellLocation"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<method name="getEmpty"
+ return="android.telephony.CellLocation"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="requestLocationUpdate"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+</class>
+<class name="NeighboringCellInfo"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="android.os.Parcelable">
+</implements>
+<constructor name="NeighboringCellInfo"
+ type="android.telephony.NeighboringCellInfo"
+ static="false"
+ final="false"
+ deprecated="deprecated"
+ visibility="public"
+>
+</constructor>
+<constructor name="NeighboringCellInfo"
+ type="android.telephony.NeighboringCellInfo"
+ static="false"
+ final="false"
+ deprecated="deprecated"
+ visibility="public"
+>
+<parameter name="rssi" type="int">
+</parameter>
+<parameter name="cid" type="int">
+</parameter>
+</constructor>
+<constructor name="NeighboringCellInfo"
+ type="android.telephony.NeighboringCellInfo"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="rssi" type="int">
+</parameter>
+<parameter name="location" type="java.lang.String">
+</parameter>
+<parameter name="radioType" type="int">
+</parameter>
+</constructor>
+<constructor name="NeighboringCellInfo"
+ type="android.telephony.NeighboringCellInfo"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="in" type="android.os.Parcel">
+</parameter>
+</constructor>
+<method name="describeContents"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getCid"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getLac"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getNetworkType"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getPsc"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getRssi"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="setCid"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="deprecated"
+ visibility="public"
+>
+<parameter name="cid" type="int">
+</parameter>
+</method>
+<method name="setRssi"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="deprecated"
+ visibility="public"
+>
+<parameter name="rssi" type="int">
+</parameter>
+</method>
+<method name="writeToParcel"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="dest" type="android.os.Parcel">
+</parameter>
+<parameter name="flags" type="int">
+</parameter>
+</method>
+<field name="CREATOR"
+ type="android.os.Parcelable.Creator"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="UNKNOWN_CID"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="-1"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="UNKNOWN_RSSI"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="99"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<class name="PhoneNumberFormattingTextWatcher"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="android.text.TextWatcher">
+</implements>
+<constructor name="PhoneNumberFormattingTextWatcher"
+ type="android.telephony.PhoneNumberFormattingTextWatcher"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<method name="afterTextChanged"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="text" type="android.text.Editable">
+</parameter>
+</method>
+<method name="beforeTextChanged"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="s" type="java.lang.CharSequence">
+</parameter>
+<parameter name="start" type="int">
+</parameter>
+<parameter name="count" type="int">
+</parameter>
+<parameter name="after" type="int">
+</parameter>
+</method>
+<method name="onTextChanged"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="s" type="java.lang.CharSequence">
+</parameter>
+<parameter name="start" type="int">
+</parameter>
+<parameter name="before" type="int">
+</parameter>
+<parameter name="count" type="int">
+</parameter>
+</method>
+</class>
+<class name="PhoneNumberUtils"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="PhoneNumberUtils"
+ type="android.telephony.PhoneNumberUtils"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<method name="calledPartyBCDFragmentToString"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="bytes" type="byte[]">
+</parameter>
+<parameter name="offset" type="int">
+</parameter>
+<parameter name="length" type="int">
+</parameter>
+</method>
+<method name="calledPartyBCDToString"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="bytes" type="byte[]">
+</parameter>
+<parameter name="offset" type="int">
+</parameter>
+<parameter name="length" type="int">
+</parameter>
+</method>
+<method name="compare"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="a" type="java.lang.String">
+</parameter>
+<parameter name="b" type="java.lang.String">
+</parameter>
+</method>
+<method name="compare"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="context" type="android.content.Context">
+</parameter>
+<parameter name="a" type="java.lang.String">
+</parameter>
+<parameter name="b" type="java.lang.String">
+</parameter>
+</method>
+<method name="convertKeypadLettersToDigits"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="input" type="java.lang.String">
+</parameter>
+</method>
+<method name="extractNetworkPortion"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="phoneNumber" type="java.lang.String">
+</parameter>
+</method>
+<method name="extractPostDialPortion"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="phoneNumber" type="java.lang.String">
+</parameter>
+</method>
+<method name="formatJapaneseNumber"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="text" type="android.text.Editable">
+</parameter>
+</method>
+<method name="formatNanpNumber"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="text" type="android.text.Editable">
+</parameter>
+</method>
+<method name="formatNumber"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="source" type="java.lang.String">
+</parameter>
+</method>
+<method name="formatNumber"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="text" type="android.text.Editable">
+</parameter>
+<parameter name="defaultFormattingType" type="int">
+</parameter>
+</method>
+<method name="getFormatTypeForLocale"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="locale" type="java.util.Locale">
+</parameter>
+</method>
+<method name="getNumberFromIntent"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="intent" type="android.content.Intent">
+</parameter>
+<parameter name="context" type="android.content.Context">
+</parameter>
+</method>
+<method name="getStrippedReversed"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="phoneNumber" type="java.lang.String">
+</parameter>
+</method>
+<method name="is12Key"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="c" type="char">
+</parameter>
+</method>
+<method name="isDialable"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="c" type="char">
+</parameter>
+</method>
+<method name="isEmergencyNumber"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="number" type="java.lang.String">
+</parameter>
+</method>
+<method name="isGlobalPhoneNumber"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="phoneNumber" type="java.lang.String">
+</parameter>
+</method>
+<method name="isISODigit"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="c" type="char">
+</parameter>
+</method>
+<method name="isNonSeparator"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="c" type="char">
+</parameter>
+</method>
+<method name="isReallyDialable"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="c" type="char">
+</parameter>
+</method>
+<method name="isStartsPostDial"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="c" type="char">
+</parameter>
+</method>
+<method name="isWellFormedSmsAddress"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="address" type="java.lang.String">
+</parameter>
+</method>
+<method name="networkPortionToCalledPartyBCD"
+ return="byte[]"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="s" type="java.lang.String">
+</parameter>
+</method>
+<method name="networkPortionToCalledPartyBCDWithLength"
+ return="byte[]"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="s" type="java.lang.String">
+</parameter>
+</method>
+<method name="numberToCalledPartyBCD"
+ return="byte[]"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="number" type="java.lang.String">
+</parameter>
+</method>
+<method name="stringFromStringAndTOA"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="s" type="java.lang.String">
+</parameter>
+<parameter name="TOA" type="int">
+</parameter>
+</method>
+<method name="stripSeparators"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="phoneNumber" type="java.lang.String">
+</parameter>
+</method>
+<method name="toCallerIDMinMatch"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="phoneNumber" type="java.lang.String">
+</parameter>
+</method>
+<method name="toaFromString"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="s" type="java.lang.String">
+</parameter>
+</method>
+<field name="FORMAT_JAPAN"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="FORMAT_NANP"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="FORMAT_UNKNOWN"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="0"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="PAUSE"
+ type="char"
+ transient="false"
+ volatile="false"
+ value="44"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TOA_International"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="145"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TOA_Unknown"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="129"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="WAIT"
+ type="char"
+ transient="false"
+ volatile="false"
+ value="59"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="WILD"
+ type="char"
+ transient="false"
+ volatile="false"
+ value="78"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<class name="PhoneStateListener"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="PhoneStateListener"
+ type="android.telephony.PhoneStateListener"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<method name="onCallForwardingIndicatorChanged"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="cfi" type="boolean">
+</parameter>
+</method>
+<method name="onCallStateChanged"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="state" type="int">
+</parameter>
+<parameter name="incomingNumber" type="java.lang.String">
+</parameter>
+</method>
+<method name="onCellLocationChanged"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="location" type="android.telephony.CellLocation">
+</parameter>
+</method>
+<method name="onDataActivity"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="direction" type="int">
+</parameter>
+</method>
+<method name="onDataConnectionStateChanged"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="state" type="int">
+</parameter>
+</method>
+<method name="onDataConnectionStateChanged"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="state" type="int">
+</parameter>
+<parameter name="networkType" type="int">
+</parameter>
+</method>
+<method name="onMessageWaitingIndicatorChanged"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="mwi" type="boolean">
+</parameter>
+</method>
+<method name="onServiceStateChanged"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="serviceState" type="android.telephony.ServiceState">
+</parameter>
+</method>
+<method name="onSignalStrengthChanged"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="deprecated"
+ visibility="public"
+>
+<parameter name="asu" type="int">
+</parameter>
+</method>
+<method name="onSignalStrengthsChanged"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="signalStrength" type="android.telephony.SignalStrength">
+</parameter>
+</method>
+<field name="LISTEN_CALL_FORWARDING_INDICATOR"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="8"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="LISTEN_CALL_STATE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="32"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="LISTEN_CELL_LOCATION"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="LISTEN_DATA_ACTIVITY"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="128"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="LISTEN_DATA_CONNECTION_STATE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="64"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="LISTEN_MESSAGE_WAITING_INDICATOR"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="4"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="LISTEN_NONE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="0"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="LISTEN_SERVICE_STATE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="LISTEN_SIGNAL_STRENGTH"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2"
+ static="true"
+ final="true"
+ deprecated="deprecated"
+ visibility="public"
+>
+</field>
+<field name="LISTEN_SIGNAL_STRENGTHS"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="256"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<class name="ServiceState"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="android.os.Parcelable">
+</implements>
+<constructor name="ServiceState"
+ type="android.telephony.ServiceState"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<constructor name="ServiceState"
+ type="android.telephony.ServiceState"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="s" type="android.telephony.ServiceState">
+</parameter>
+</constructor>
+<constructor name="ServiceState"
+ type="android.telephony.ServiceState"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="in" type="android.os.Parcel">
+</parameter>
+</constructor>
+<method name="copyFrom"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="s" type="android.telephony.ServiceState">
+</parameter>
+</method>
+<method name="describeContents"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getIsManualSelection"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getOperatorAlphaLong"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getOperatorAlphaShort"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getOperatorNumeric"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getRoaming"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getState"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="setIsManualSelection"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="isManual" type="boolean">
+</parameter>
+</method>
+<method name="setOperatorName"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="longName" type="java.lang.String">
+</parameter>
+<parameter name="shortName" type="java.lang.String">
+</parameter>
+<parameter name="numeric" type="java.lang.String">
+</parameter>
+</method>
+<method name="setRoaming"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="roaming" type="boolean">
+</parameter>
+</method>
+<method name="setState"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="state" type="int">
+</parameter>
+</method>
+<method name="setStateOff"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="setStateOutOfService"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="writeToParcel"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="out" type="android.os.Parcel">
+</parameter>
+<parameter name="flags" type="int">
+</parameter>
+</method>
+<field name="CREATOR"
+ type="android.os.Parcelable.Creator"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="STATE_EMERGENCY_ONLY"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="STATE_IN_SERVICE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="0"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="STATE_OUT_OF_SERVICE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="STATE_POWER_OFF"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="3"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<class name="SignalStrength"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="android.os.Parcelable">
+</implements>
+<method name="describeContents"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getCdmaDbm"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getCdmaEcio"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getEvdoDbm"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getEvdoEcio"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getEvdoSnr"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getGsmBitErrorRate"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getGsmSignalStrength"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isGsm"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="writeToParcel"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="out" type="android.os.Parcel">
+</parameter>
+<parameter name="flags" type="int">
+</parameter>
+</method>
+</class>
+<class name="SmsManager"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="divideMessage"
+ return="java.util.ArrayList&lt;java.lang.String&gt;"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="text" type="java.lang.String">
+</parameter>
+</method>
+<method name="getDefault"
+ return="android.telephony.SmsManager"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="sendDataMessage"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="destinationAddress" type="java.lang.String">
+</parameter>
+<parameter name="scAddress" type="java.lang.String">
+</parameter>
+<parameter name="destinationPort" type="short">
+</parameter>
+<parameter name="data" type="byte[]">
+</parameter>
+<parameter name="sentIntent" type="android.app.PendingIntent">
+</parameter>
+<parameter name="deliveryIntent" type="android.app.PendingIntent">
+</parameter>
+</method>
+<method name="sendMultipartTextMessage"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="destinationAddress" type="java.lang.String">
+</parameter>
+<parameter name="scAddress" type="java.lang.String">
+</parameter>
+<parameter name="parts" type="java.util.ArrayList&lt;java.lang.String&gt;">
+</parameter>
+<parameter name="sentIntents" type="java.util.ArrayList&lt;android.app.PendingIntent&gt;">
+</parameter>
+<parameter name="deliveryIntents" type="java.util.ArrayList&lt;android.app.PendingIntent&gt;">
+</parameter>
+</method>
+<method name="sendTextMessage"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="destinationAddress" type="java.lang.String">
+</parameter>
+<parameter name="scAddress" type="java.lang.String">
+</parameter>
+<parameter name="text" type="java.lang.String">
+</parameter>
+<parameter name="sentIntent" type="android.app.PendingIntent">
+</parameter>
+<parameter name="deliveryIntent" type="android.app.PendingIntent">
+</parameter>
+</method>
+<field name="RESULT_ERROR_GENERIC_FAILURE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="RESULT_ERROR_NO_SERVICE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="4"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="RESULT_ERROR_NULL_PDU"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="3"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="RESULT_ERROR_RADIO_OFF"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="STATUS_ON_ICC_FREE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="0"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="STATUS_ON_ICC_READ"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="STATUS_ON_ICC_SENT"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="5"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="STATUS_ON_ICC_UNREAD"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="3"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="STATUS_ON_ICC_UNSENT"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="7"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<class name="SmsMessage"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="calculateLength"
+ return="int[]"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="msgBody" type="java.lang.CharSequence">
+</parameter>
+<parameter name="use7bitOnly" type="boolean">
+</parameter>
+</method>
+<method name="calculateLength"
+ return="int[]"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="messageBody" type="java.lang.String">
+</parameter>
+<parameter name="use7bitOnly" type="boolean">
+</parameter>
+</method>
+<method name="createFromPdu"
+ return="android.telephony.SmsMessage"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="pdu" type="byte[]">
+</parameter>
+</method>
+<method name="getDisplayMessageBody"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getDisplayOriginatingAddress"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getEmailBody"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getEmailFrom"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getIndexOnIcc"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getIndexOnSim"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="deprecated"
+ visibility="public"
+>
+</method>
+<method name="getMessageBody"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getMessageClass"
+ return="android.telephony.SmsMessage.MessageClass"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getOriginatingAddress"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getPdu"
+ return="byte[]"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getProtocolIdentifier"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getPseudoSubject"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getServiceCenterAddress"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getStatus"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getStatusOnIcc"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getStatusOnSim"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="deprecated"
+ visibility="public"
+>
+</method>
+<method name="getSubmitPdu"
+ return="android.telephony.SmsMessage.SubmitPdu"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="scAddress" type="java.lang.String">
+</parameter>
+<parameter name="destinationAddress" type="java.lang.String">
+</parameter>
+<parameter name="message" type="java.lang.String">
+</parameter>
+<parameter name="statusReportRequested" type="boolean">
+</parameter>
+</method>
+<method name="getSubmitPdu"
+ return="android.telephony.SmsMessage.SubmitPdu"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="scAddress" type="java.lang.String">
+</parameter>
+<parameter name="destinationAddress" type="java.lang.String">
+</parameter>
+<parameter name="destinationPort" type="short">
+</parameter>
+<parameter name="data" type="byte[]">
+</parameter>
+<parameter name="statusReportRequested" type="boolean">
+</parameter>
+</method>
+<method name="getTPLayerLengthForPDU"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="pdu" type="java.lang.String">
+</parameter>
+</method>
+<method name="getTimestampMillis"
+ return="long"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getUserData"
+ return="byte[]"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isCphsMwiMessage"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isEmail"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isMWIClearMessage"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isMWISetMessage"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isMwiDontStore"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isReplace"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isReplyPathPresent"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isStatusReportMessage"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<field name="ENCODING_16BIT"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="3"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ENCODING_7BIT"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ENCODING_8BIT"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ENCODING_UNKNOWN"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="0"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="MAX_USER_DATA_BYTES"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="140"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="MAX_USER_DATA_BYTES_WITH_HEADER"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="134"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="MAX_USER_DATA_SEPTETS"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="160"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="MAX_USER_DATA_SEPTETS_WITH_HEADER"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="153"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<class name="SmsMessage.MessageClass"
+ extends="java.lang.Enum"
+ abstract="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="valueOf"
+ return="android.telephony.SmsMessage.MessageClass"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+</method>
+<method name="values"
+ return="android.telephony.SmsMessage.MessageClass[]"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+</class>
+<class name="SmsMessage.SubmitPdu"
+ extends="java.lang.Object"
+ abstract="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<field name="encodedMessage"
+ type="byte[]"
+ transient="false"
+ volatile="false"
+ value="null"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="encodedScAddress"
+ type="byte[]"
+ transient="false"
+ volatile="false"
+ value="null"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<class name="TelephonyManager"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="getCallState"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getCellLocation"
+ return="android.telephony.CellLocation"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getDataActivity"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getDataState"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getDeviceId"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getDeviceSoftwareVersion"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getLine1Number"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getNeighboringCellInfo"
+ return="java.util.List&lt;android.telephony.NeighboringCellInfo&gt;"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getNetworkCountryIso"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getNetworkOperator"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getNetworkOperatorName"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getNetworkType"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getPhoneType"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getSimCountryIso"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getSimOperator"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getSimOperatorName"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getSimSerialNumber"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getSimState"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getSubscriberId"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getVoiceMailAlphaTag"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getVoiceMailNumber"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="hasIccCard"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isNetworkRoaming"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="listen"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="listener" type="android.telephony.PhoneStateListener">
+</parameter>
+<parameter name="events" type="int">
+</parameter>
+</method>
+<field name="ACTION_PHONE_STATE_CHANGED"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.intent.action.PHONE_STATE&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="CALL_STATE_IDLE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="0"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="CALL_STATE_OFFHOOK"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="CALL_STATE_RINGING"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="DATA_ACTIVITY_DORMANT"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="4"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="DATA_ACTIVITY_IN"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="DATA_ACTIVITY_INOUT"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="3"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="DATA_ACTIVITY_NONE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="0"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="DATA_ACTIVITY_OUT"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="DATA_CONNECTED"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="DATA_CONNECTING"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="DATA_DISCONNECTED"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="0"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="DATA_SUSPENDED"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="3"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="EXTRA_INCOMING_NUMBER"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;incoming_number&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="EXTRA_STATE"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;state&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="EXTRA_STATE_IDLE"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="EXTRA_STATE_OFFHOOK"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="EXTRA_STATE_RINGING"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="NETWORK_TYPE_1xRTT"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="7"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="NETWORK_TYPE_CDMA"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="4"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="NETWORK_TYPE_EDGE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="NETWORK_TYPE_EVDO_0"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="5"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="NETWORK_TYPE_EVDO_A"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="6"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="NETWORK_TYPE_GPRS"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="NETWORK_TYPE_HSDPA"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="8"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="NETWORK_TYPE_HSPA"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="10"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="NETWORK_TYPE_HSUPA"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="9"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="NETWORK_TYPE_IDEN"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="11"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="NETWORK_TYPE_UMTS"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="3"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="NETWORK_TYPE_UNKNOWN"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="0"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="PHONE_TYPE_CDMA"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="PHONE_TYPE_GSM"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="PHONE_TYPE_NONE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="0"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="SIM_STATE_ABSENT"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="SIM_STATE_NETWORK_LOCKED"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="4"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="SIM_STATE_PIN_REQUIRED"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="SIM_STATE_PUK_REQUIRED"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="3"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="SIM_STATE_READY"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="5"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="SIM_STATE_UNKNOWN"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="0"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+</package>
+<package name="android.telephony.cdma"
+>
+<class name="CdmaCellLocation"
+ extends="android.telephony.CellLocation"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="CdmaCellLocation"
+ type="android.telephony.cdma.CdmaCellLocation"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<constructor name="CdmaCellLocation"
+ type="android.telephony.cdma.CdmaCellLocation"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="bundle" type="android.os.Bundle">
+</parameter>
+</constructor>
+<method name="fillInNotifierBundle"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="bundleToFill" type="android.os.Bundle">
+</parameter>
+</method>
+<method name="getBaseStationId"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getBaseStationLatitude"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getBaseStationLongitude"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getNetworkId"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getSystemId"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="setCellLocationData"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="baseStationId" type="int">
+</parameter>
+<parameter name="baseStationLatitude" type="int">
+</parameter>
+<parameter name="baseStationLongitude" type="int">
+</parameter>
+</method>
+<method name="setCellLocationData"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="baseStationId" type="int">
+</parameter>
+<parameter name="baseStationLatitude" type="int">
+</parameter>
+<parameter name="baseStationLongitude" type="int">
+</parameter>
+<parameter name="systemId" type="int">
+</parameter>
+<parameter name="networkId" type="int">
+</parameter>
+</method>
+<method name="setStateInvalid"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+</class>
+</package>
+<package name="android.telephony.gsm"
+>
+<class name="GsmCellLocation"
+ extends="android.telephony.CellLocation"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="GsmCellLocation"
+ type="android.telephony.gsm.GsmCellLocation"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<constructor name="GsmCellLocation"
+ type="android.telephony.gsm.GsmCellLocation"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="bundle" type="android.os.Bundle">
+</parameter>
+</constructor>
+<method name="fillInNotifierBundle"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="m" type="android.os.Bundle">
+</parameter>
+</method>
+<method name="getCid"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getLac"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="setLacAndCid"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="lac" type="int">
+</parameter>
+<parameter name="cid" type="int">
+</parameter>
+</method>
+<method name="setStateInvalid"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+</class>
+<class name="SmsManager"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="true"
+ deprecated="deprecated"
+ visibility="public"
+>
+<method name="divideMessage"
+ return="java.util.ArrayList&lt;java.lang.String&gt;"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="deprecated"
+ visibility="public"
+>
+<parameter name="text" type="java.lang.String">
+</parameter>
+</method>
+<method name="getDefault"
+ return="android.telephony.gsm.SmsManager"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="true"
+ deprecated="deprecated"
+ visibility="public"
+>
+</method>
+<method name="sendDataMessage"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="deprecated"
+ visibility="public"
+>
+<parameter name="destinationAddress" type="java.lang.String">
+</parameter>
+<parameter name="scAddress" type="java.lang.String">
+</parameter>
+<parameter name="destinationPort" type="short">
+</parameter>
+<parameter name="data" type="byte[]">
+</parameter>
+<parameter name="sentIntent" type="android.app.PendingIntent">
+</parameter>
+<parameter name="deliveryIntent" type="android.app.PendingIntent">
+</parameter>
+</method>
+<method name="sendMultipartTextMessage"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="deprecated"
+ visibility="public"
+>
+<parameter name="destinationAddress" type="java.lang.String">
+</parameter>
+<parameter name="scAddress" type="java.lang.String">
+</parameter>
+<parameter name="parts" type="java.util.ArrayList&lt;java.lang.String&gt;">
+</parameter>
+<parameter name="sentIntents" type="java.util.ArrayList&lt;android.app.PendingIntent&gt;">
+</parameter>
+<parameter name="deliveryIntents" type="java.util.ArrayList&lt;android.app.PendingIntent&gt;">
+</parameter>
+</method>
+<method name="sendTextMessage"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="deprecated"
+ visibility="public"
+>
+<parameter name="destinationAddress" type="java.lang.String">
+</parameter>
+<parameter name="scAddress" type="java.lang.String">
+</parameter>
+<parameter name="text" type="java.lang.String">
+</parameter>
+<parameter name="sentIntent" type="android.app.PendingIntent">
+</parameter>
+<parameter name="deliveryIntent" type="android.app.PendingIntent">
+</parameter>
+</method>
+<field name="RESULT_ERROR_GENERIC_FAILURE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1"
+ static="true"
+ final="true"
+ deprecated="deprecated"
+ visibility="public"
+>
+</field>
+<field name="RESULT_ERROR_NO_SERVICE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="4"
+ static="true"
+ final="true"
+ deprecated="deprecated"
+ visibility="public"
+>
+</field>
+<field name="RESULT_ERROR_NULL_PDU"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="3"
+ static="true"
+ final="true"
+ deprecated="deprecated"
+ visibility="public"
+>
+</field>
+<field name="RESULT_ERROR_RADIO_OFF"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2"
+ static="true"
+ final="true"
+ deprecated="deprecated"
+ visibility="public"
+>
+</field>
+<field name="STATUS_ON_SIM_FREE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="0"
+ static="true"
+ final="true"
+ deprecated="deprecated"
+ visibility="public"
+>
+</field>
+<field name="STATUS_ON_SIM_READ"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1"
+ static="true"
+ final="true"
+ deprecated="deprecated"
+ visibility="public"
+>
+</field>
+<field name="STATUS_ON_SIM_SENT"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="5"
+ static="true"
+ final="true"
+ deprecated="deprecated"
+ visibility="public"
+>
+</field>
+<field name="STATUS_ON_SIM_UNREAD"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="3"
+ static="true"
+ final="true"
+ deprecated="deprecated"
+ visibility="public"
+>
+</field>
+<field name="STATUS_ON_SIM_UNSENT"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="7"
+ static="true"
+ final="true"
+ deprecated="deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<class name="SmsMessage"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="deprecated"
+ visibility="public"
+>
+<constructor name="SmsMessage"
+ type="android.telephony.gsm.SmsMessage"
+ static="false"
+ final="false"
+ deprecated="deprecated"
+ visibility="public"
+>
+</constructor>
+<method name="calculateLength"
+ return="int[]"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="deprecated"
+ visibility="public"
+>
+<parameter name="messageBody" type="java.lang.CharSequence">
+</parameter>
+<parameter name="use7bitOnly" type="boolean">
+</parameter>
+</method>
+<method name="calculateLength"
+ return="int[]"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="deprecated"
+ visibility="public"
+>
+<parameter name="messageBody" type="java.lang.String">
+</parameter>
+<parameter name="use7bitOnly" type="boolean">
+</parameter>
+</method>
+<method name="createFromPdu"
+ return="android.telephony.gsm.SmsMessage"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="deprecated"
+ visibility="public"
+>
+<parameter name="pdu" type="byte[]">
+</parameter>
+</method>
+<method name="getDisplayMessageBody"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="deprecated"
+ visibility="public"
+>
+</method>
+<method name="getDisplayOriginatingAddress"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="deprecated"
+ visibility="public"
+>
+</method>
+<method name="getEmailBody"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="deprecated"
+ visibility="public"
+>
+</method>
+<method name="getEmailFrom"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="deprecated"
+ visibility="public"
+>
+</method>
+<method name="getIndexOnSim"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="deprecated"
+ visibility="public"
+>
+</method>
+<method name="getMessageBody"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="deprecated"
+ visibility="public"
+>
+</method>
+<method name="getMessageClass"
+ return="android.telephony.gsm.SmsMessage.MessageClass"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="deprecated"
+ visibility="public"
+>
+</method>
+<method name="getOriginatingAddress"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="deprecated"
+ visibility="public"
+>
+</method>
+<method name="getPdu"
+ return="byte[]"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="deprecated"
+ visibility="public"
+>
+</method>
+<method name="getProtocolIdentifier"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="deprecated"
+ visibility="public"
+>
+</method>
+<method name="getPseudoSubject"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="deprecated"
+ visibility="public"
+>
+</method>
+<method name="getServiceCenterAddress"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="deprecated"
+ visibility="public"
+>
+</method>
+<method name="getStatus"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="deprecated"
+ visibility="public"
+>
+</method>
+<method name="getStatusOnSim"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="deprecated"
+ visibility="public"
+>
+</method>
+<method name="getSubmitPdu"
+ return="android.telephony.gsm.SmsMessage.SubmitPdu"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="deprecated"
+ visibility="public"
+>
+<parameter name="scAddress" type="java.lang.String">
+</parameter>
+<parameter name="destinationAddress" type="java.lang.String">
+</parameter>
+<parameter name="message" type="java.lang.String">
+</parameter>
+<parameter name="statusReportRequested" type="boolean">
+</parameter>
+</method>
+<method name="getSubmitPdu"
+ return="android.telephony.gsm.SmsMessage.SubmitPdu"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="deprecated"
+ visibility="public"
+>
+<parameter name="scAddress" type="java.lang.String">
+</parameter>
+<parameter name="destinationAddress" type="java.lang.String">
+</parameter>
+<parameter name="destinationPort" type="short">
+</parameter>
+<parameter name="data" type="byte[]">
+</parameter>
+<parameter name="statusReportRequested" type="boolean">
+</parameter>
+</method>
+<method name="getTPLayerLengthForPDU"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="deprecated"
+ visibility="public"
+>
+<parameter name="pdu" type="java.lang.String">
+</parameter>
+</method>
+<method name="getTimestampMillis"
+ return="long"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="deprecated"
+ visibility="public"
+>
+</method>
+<method name="getUserData"
+ return="byte[]"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="deprecated"
+ visibility="public"
+>
+</method>
+<method name="isCphsMwiMessage"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="deprecated"
+ visibility="public"
+>
+</method>
+<method name="isEmail"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="deprecated"
+ visibility="public"
+>
+</method>
+<method name="isMWIClearMessage"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="deprecated"
+ visibility="public"
+>
+</method>
+<method name="isMWISetMessage"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="deprecated"
+ visibility="public"
+>
+</method>
+<method name="isMwiDontStore"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="deprecated"
+ visibility="public"
+>
+</method>
+<method name="isReplace"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="deprecated"
+ visibility="public"
+>
+</method>
+<method name="isReplyPathPresent"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="deprecated"
+ visibility="public"
+>
+</method>
+<method name="isStatusReportMessage"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="deprecated"
+ visibility="public"
+>
+</method>
+<field name="ENCODING_16BIT"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="3"
+ static="true"
+ final="true"
+ deprecated="deprecated"
+ visibility="public"
+>
+</field>
+<field name="ENCODING_7BIT"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1"
+ static="true"
+ final="true"
+ deprecated="deprecated"
+ visibility="public"
+>
+</field>
+<field name="ENCODING_8BIT"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2"
+ static="true"
+ final="true"
+ deprecated="deprecated"
+ visibility="public"
+>
+</field>
+<field name="ENCODING_UNKNOWN"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="0"
+ static="true"
+ final="true"
+ deprecated="deprecated"
+ visibility="public"
+>
+</field>
+<field name="MAX_USER_DATA_BYTES"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="140"
+ static="true"
+ final="true"
+ deprecated="deprecated"
+ visibility="public"
+>
+</field>
+<field name="MAX_USER_DATA_SEPTETS"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="160"
+ static="true"
+ final="true"
+ deprecated="deprecated"
+ visibility="public"
+>
+</field>
+<field name="MAX_USER_DATA_SEPTETS_WITH_HEADER"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="153"
+ static="true"
+ final="true"
+ deprecated="deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<class name="SmsMessage.MessageClass"
+ extends="java.lang.Enum"
+ abstract="false"
+ static="true"
+ final="true"
+ deprecated="deprecated"
+ visibility="public"
+>
+<method name="valueOf"
+ return="android.telephony.gsm.SmsMessage.MessageClass"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+</method>
+<method name="values"
+ return="android.telephony.gsm.SmsMessage.MessageClass[]"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+</class>
+<class name="SmsMessage.SubmitPdu"
+ extends="java.lang.Object"
+ abstract="false"
+ static="true"
+ final="false"
+ deprecated="deprecated"
+ visibility="public"
+>
+<constructor name="SmsMessage.SubmitPdu"
+ type="android.telephony.gsm.SmsMessage.SubmitPdu"
+ static="false"
+ final="false"
+ deprecated="deprecated"
+ visibility="public"
+>
+</constructor>
+<field name="encodedMessage"
+ type="byte[]"
+ transient="false"
+ volatile="false"
+ value="null"
+ static="false"
+ final="false"
+ deprecated="deprecated"
+ visibility="public"
+>
+</field>
+<field name="encodedScAddress"
+ type="byte[]"
+ transient="false"
+ volatile="false"
+ value="null"
+ static="false"
+ final="false"
+ deprecated="deprecated"
+ visibility="public"
+>
+</field>
+</class>
+</package>
+<package name="android.test"
+>
+<class name="ActivityInstrumentationTestCase"
+ extends="android.test.ActivityTestCase"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="deprecated"
+ visibility="public"
+>
+<constructor name="ActivityInstrumentationTestCase"
+ type="android.test.ActivityInstrumentationTestCase"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="pkg" type="java.lang.String">
+</parameter>
+<parameter name="activityClass" type="java.lang.Class&lt;T&gt;">
+</parameter>
+</constructor>
+<constructor name="ActivityInstrumentationTestCase"
+ type="android.test.ActivityInstrumentationTestCase"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="pkg" type="java.lang.String">
+</parameter>
+<parameter name="activityClass" type="java.lang.Class&lt;T&gt;">
+</parameter>
+<parameter name="initialTouchMode" type="boolean">
+</parameter>
+</constructor>
+<method name="getActivity"
+ return="T"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="testActivityTestCaseSetUpProperly"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="Exception" type="java.lang.Exception">
+</exception>
+</method>
+</class>
+<class name="ActivityInstrumentationTestCase2"
+ extends="android.test.ActivityTestCase"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="ActivityInstrumentationTestCase2"
+ type="android.test.ActivityInstrumentationTestCase2"
+ static="false"
+ final="false"
+ deprecated="deprecated"
+ visibility="public"
+>
+<parameter name="pkg" type="java.lang.String">
+</parameter>
+<parameter name="activityClass" type="java.lang.Class&lt;T&gt;">
+</parameter>
+</constructor>
+<constructor name="ActivityInstrumentationTestCase2"
+ type="android.test.ActivityInstrumentationTestCase2"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="activityClass" type="java.lang.Class&lt;T&gt;">
+</parameter>
+</constructor>
+<method name="getActivity"
+ return="T"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="setActivityInitialTouchMode"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="initialTouchMode" type="boolean">
+</parameter>
+</method>
+<method name="setActivityIntent"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="i" type="android.content.Intent">
+</parameter>
+</method>
+</class>
+<class name="ActivityTestCase"
+ extends="android.test.InstrumentationTestCase"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="ActivityTestCase"
+ type="android.test.ActivityTestCase"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<method name="getActivity"
+ return="android.app.Activity"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</method>
+<method name="scrubClass"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="testCaseClass" type="java.lang.Class&lt;?&gt;">
+</parameter>
+<exception name="IllegalAccessException" type="java.lang.IllegalAccessException">
+</exception>
+</method>
+<method name="setActivity"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="testActivity" type="android.app.Activity">
+</parameter>
+</method>
+</class>
+<class name="ActivityUnitTestCase"
+ extends="android.test.ActivityTestCase"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="ActivityUnitTestCase"
+ type="android.test.ActivityUnitTestCase"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="activityClass" type="java.lang.Class&lt;T&gt;">
+</parameter>
+</constructor>
+<method name="getActivity"
+ return="T"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getFinishedActivityRequest"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getRequestedOrientation"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getStartedActivityIntent"
+ return="android.content.Intent"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getStartedActivityRequest"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isFinishCalled"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="setActivityContext"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="activityContext" type="android.content.Context">
+</parameter>
+</method>
+<method name="setApplication"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="application" type="android.app.Application">
+</parameter>
+</method>
+<method name="startActivity"
+ return="T"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="intent" type="android.content.Intent">
+</parameter>
+<parameter name="savedInstanceState" type="android.os.Bundle">
+</parameter>
+<parameter name="lastNonConfigurationInstance" type="java.lang.Object">
+</parameter>
+</method>
+</class>
+<class name="AndroidTestCase"
+ extends="junit.framework.TestCase"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="AndroidTestCase"
+ type="android.test.AndroidTestCase"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<method name="assertActivityRequiresPermission"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="packageName" type="java.lang.String">
+</parameter>
+<parameter name="className" type="java.lang.String">
+</parameter>
+<parameter name="permission" type="java.lang.String">
+</parameter>
+</method>
+<method name="assertReadingContentUriRequiresPermission"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="uri" type="android.net.Uri">
+</parameter>
+<parameter name="permission" type="java.lang.String">
+</parameter>
+</method>
+<method name="assertWritingContentUriRequiresPermission"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="uri" type="android.net.Uri">
+</parameter>
+<parameter name="permission" type="java.lang.String">
+</parameter>
+</method>
+<method name="getContext"
+ return="android.content.Context"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="scrubClass"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="testCaseClass" type="java.lang.Class&lt;?&gt;">
+</parameter>
+<exception name="IllegalAccessException" type="java.lang.IllegalAccessException">
+</exception>
+</method>
+<method name="setContext"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="context" type="android.content.Context">
+</parameter>
+</method>
+<method name="testAndroidTestCaseSetupProperly"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<field name="mContext"
+ type="android.content.Context"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</field>
+</class>
+<class name="AndroidTestRunner"
+ extends="junit.runner.BaseTestRunner"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="AndroidTestRunner"
+ type="android.test.AndroidTestRunner"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<method name="addTestListener"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="testListener" type="junit.framework.TestListener">
+</parameter>
+</method>
+<method name="clearTestListeners"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="createTestResult"
+ return="junit.framework.TestResult"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</method>
+<method name="getTestCases"
+ return="java.util.List&lt;junit.framework.TestCase&gt;"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getTestClassName"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getTestResult"
+ return="junit.framework.TestResult"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="runFailed"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="message" type="java.lang.String">
+</parameter>
+</method>
+<method name="runTest"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="runTest"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="testResult" type="junit.framework.TestResult">
+</parameter>
+</method>
+<method name="setContext"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="context" type="android.content.Context">
+</parameter>
+</method>
+<method name="setInstrumentaiton"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="deprecated"
+ visibility="public"
+>
+<parameter name="instrumentation" type="android.app.Instrumentation">
+</parameter>
+</method>
+<method name="setInstrumentation"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="instrumentation" type="android.app.Instrumentation">
+</parameter>
+</method>
+<method name="setTest"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="test" type="junit.framework.Test">
+</parameter>
+</method>
+<method name="setTestClassName"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="testClassName" type="java.lang.String">
+</parameter>
+<parameter name="testMethodName" type="java.lang.String">
+</parameter>
+</method>
+<method name="testEnded"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="testName" type="java.lang.String">
+</parameter>
+</method>
+<method name="testFailed"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="status" type="int">
+</parameter>
+<parameter name="test" type="junit.framework.Test">
+</parameter>
+<parameter name="t" type="java.lang.Throwable">
+</parameter>
+</method>
+<method name="testStarted"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="testName" type="java.lang.String">
+</parameter>
+</method>
+</class>
+<class name="ApplicationTestCase"
+ extends="android.test.AndroidTestCase"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="ApplicationTestCase"
+ type="android.test.ApplicationTestCase"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="applicationClass" type="java.lang.Class&lt;T&gt;">
+</parameter>
+</constructor>
+<method name="createApplication"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</method>
+<method name="getApplication"
+ return="T"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getSystemContext"
+ return="android.content.Context"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="terminateApplication"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</method>
+<method name="testApplicationTestCaseSetUpProperly"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="Exception" type="java.lang.Exception">
+</exception>
+</method>
+</class>
+<class name="AssertionFailedError"
+ extends="java.lang.Error"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="AssertionFailedError"
+ type="android.test.AssertionFailedError"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<constructor name="AssertionFailedError"
+ type="android.test.AssertionFailedError"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="errorMessage" type="java.lang.String">
+</parameter>
+</constructor>
+</class>
+<class name="ComparisonFailure"
+ extends="android.test.AssertionFailedError"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="ComparisonFailure"
+ type="android.test.ComparisonFailure"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="message" type="java.lang.String">
+</parameter>
+<parameter name="expected" type="java.lang.String">
+</parameter>
+<parameter name="actual" type="java.lang.String">
+</parameter>
+</constructor>
+</class>
+<class name="FlakyTest"
+ extends="java.lang.Object"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="java.lang.annotation.Annotation">
+</implements>
+</class>
+<class name="InstrumentationTestCase"
+ extends="junit.framework.TestCase"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="InstrumentationTestCase"
+ type="android.test.InstrumentationTestCase"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<method name="getInstrumentation"
+ return="android.app.Instrumentation"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="injectInsrumentation"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="deprecated"
+ visibility="public"
+>
+<parameter name="instrumentation" type="android.app.Instrumentation">
+</parameter>
+</method>
+<method name="injectInstrumentation"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="instrumentation" type="android.app.Instrumentation">
+</parameter>
+</method>
+<method name="launchActivity"
+ return="T"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="pkg" type="java.lang.String">
+</parameter>
+<parameter name="activityCls" type="java.lang.Class&lt;T&gt;">
+</parameter>
+<parameter name="extras" type="android.os.Bundle">
+</parameter>
+</method>
+<method name="launchActivityWithIntent"
+ return="T"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="pkg" type="java.lang.String">
+</parameter>
+<parameter name="activityCls" type="java.lang.Class&lt;T&gt;">
+</parameter>
+<parameter name="intent" type="android.content.Intent">
+</parameter>
+</method>
+<method name="runTestOnUiThread"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="r" type="java.lang.Runnable">
+</parameter>
+<exception name="Throwable" type="java.lang.Throwable">
+</exception>
+</method>
+<method name="sendKeys"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="keysSequence" type="java.lang.String">
+</parameter>
+</method>
+<method name="sendKeys"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="keys" type="int...">
+</parameter>
+</method>
+<method name="sendRepeatedKeys"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="keys" type="int...">
+</parameter>
+</method>
+</class>
+<class name="InstrumentationTestRunner"
+ extends="android.app.Instrumentation"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="android.test.TestSuiteProvider">
+</implements>
+<constructor name="InstrumentationTestRunner"
+ type="android.test.InstrumentationTestRunner"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<method name="getAllTests"
+ return="junit.framework.TestSuite"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getAndroidTestRunner"
+ return="android.test.AndroidTestRunner"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</method>
+<method name="getLoader"
+ return="java.lang.ClassLoader"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getTestSuite"
+ return="junit.framework.TestSuite"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<field name="REPORT_KEY_NAME_CLASS"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;class&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="REPORT_KEY_NAME_TEST"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;test&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="REPORT_KEY_NUM_CURRENT"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;current&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="REPORT_KEY_NUM_TOTAL"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;numtests&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="REPORT_KEY_STACK"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;stack&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="REPORT_VALUE_ID"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;InstrumentationTestRunner&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="REPORT_VALUE_RESULT_ERROR"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="-1"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="REPORT_VALUE_RESULT_FAILURE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="-2"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="REPORT_VALUE_RESULT_OK"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="0"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="REPORT_VALUE_RESULT_START"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<class name="InstrumentationTestSuite"
+ extends="junit.framework.TestSuite"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="InstrumentationTestSuite"
+ type="android.test.InstrumentationTestSuite"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="instr" type="android.app.Instrumentation">
+</parameter>
+</constructor>
+<constructor name="InstrumentationTestSuite"
+ type="android.test.InstrumentationTestSuite"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+<parameter name="instr" type="android.app.Instrumentation">
+</parameter>
+</constructor>
+<constructor name="InstrumentationTestSuite"
+ type="android.test.InstrumentationTestSuite"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="theClass" type="java.lang.Class">
+</parameter>
+<parameter name="instr" type="android.app.Instrumentation">
+</parameter>
+</constructor>
+</class>
+<class name="IsolatedContext"
+ extends="android.content.ContextWrapper"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="IsolatedContext"
+ type="android.test.IsolatedContext"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="resolver" type="android.content.ContentResolver">
+</parameter>
+<parameter name="targetContext" type="android.content.Context">
+</parameter>
+</constructor>
+<method name="getAndClearBroadcastIntents"
+ return="java.util.List&lt;android.content.Intent&gt;"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+</class>
+<class name="MoreAsserts"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="assertAssignableFrom"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="expected" type="java.lang.Class&lt;?&gt;">
+</parameter>
+<parameter name="actual" type="java.lang.Object">
+</parameter>
+</method>
+<method name="assertAssignableFrom"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="expected" type="java.lang.Class&lt;?&gt;">
+</parameter>
+<parameter name="actual" type="java.lang.Class&lt;?&gt;">
+</parameter>
+</method>
+<method name="assertContainsRegex"
+ return="java.util.regex.MatchResult"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="message" type="java.lang.String">
+</parameter>
+<parameter name="expectedRegex" type="java.lang.String">
+</parameter>
+<parameter name="actual" type="java.lang.String">
+</parameter>
+</method>
+<method name="assertContainsRegex"
+ return="java.util.regex.MatchResult"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="expectedRegex" type="java.lang.String">
+</parameter>
+<parameter name="actual" type="java.lang.String">
+</parameter>
+</method>
+<method name="assertContentsInAnyOrder"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="message" type="java.lang.String">
+</parameter>
+<parameter name="actual" type="java.lang.Iterable&lt;?&gt;">
+</parameter>
+<parameter name="expected" type="java.lang.Object...">
+</parameter>
+</method>
+<method name="assertContentsInAnyOrder"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="actual" type="java.lang.Iterable&lt;?&gt;">
+</parameter>
+<parameter name="expected" type="java.lang.Object...">
+</parameter>
+</method>
+<method name="assertContentsInOrder"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="message" type="java.lang.String">
+</parameter>
+<parameter name="actual" type="java.lang.Iterable&lt;?&gt;">
+</parameter>
+<parameter name="expected" type="java.lang.Object...">
+</parameter>
+</method>
+<method name="assertContentsInOrder"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="actual" type="java.lang.Iterable&lt;?&gt;">
+</parameter>
+<parameter name="expected" type="java.lang.Object...">
+</parameter>
+</method>
+<method name="assertEmpty"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="message" type="java.lang.String">
+</parameter>
+<parameter name="iterable" type="java.lang.Iterable&lt;?&gt;">
+</parameter>
+</method>
+<method name="assertEmpty"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="iterable" type="java.lang.Iterable&lt;?&gt;">
+</parameter>
+</method>
+<method name="assertEmpty"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="message" type="java.lang.String">
+</parameter>
+<parameter name="map" type="java.util.Map&lt;?, ?&gt;">
+</parameter>
+</method>
+<method name="assertEmpty"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="map" type="java.util.Map&lt;?, ?&gt;">
+</parameter>
+</method>
+<method name="assertEquals"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="message" type="java.lang.String">
+</parameter>
+<parameter name="expected" type="byte[]">
+</parameter>
+<parameter name="actual" type="byte[]">
+</parameter>
+</method>
+<method name="assertEquals"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="expected" type="byte[]">
+</parameter>
+<parameter name="actual" type="byte[]">
+</parameter>
+</method>
+<method name="assertEquals"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="message" type="java.lang.String">
+</parameter>
+<parameter name="expected" type="int[]">
+</parameter>
+<parameter name="actual" type="int[]">
+</parameter>
+</method>
+<method name="assertEquals"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="expected" type="int[]">
+</parameter>
+<parameter name="actual" type="int[]">
+</parameter>
+</method>
+<method name="assertEquals"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="message" type="java.lang.String">
+</parameter>
+<parameter name="expected" type="double[]">
+</parameter>
+<parameter name="actual" type="double[]">
+</parameter>
+</method>
+<method name="assertEquals"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="expected" type="double[]">
+</parameter>
+<parameter name="actual" type="double[]">
+</parameter>
+</method>
+<method name="assertEquals"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="message" type="java.lang.String">
+</parameter>
+<parameter name="expected" type="java.lang.Object[]">
+</parameter>
+<parameter name="actual" type="java.lang.Object[]">
+</parameter>
+</method>
+<method name="assertEquals"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="expected" type="java.lang.Object[]">
+</parameter>
+<parameter name="actual" type="java.lang.Object[]">
+</parameter>
+</method>
+<method name="assertEquals"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="message" type="java.lang.String">
+</parameter>
+<parameter name="expected" type="java.util.Set&lt;? extends java.lang.Object&gt;">
+</parameter>
+<parameter name="actual" type="java.util.Set&lt;? extends java.lang.Object&gt;">
+</parameter>
+</method>
+<method name="assertEquals"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="expected" type="java.util.Set&lt;? extends java.lang.Object&gt;">
+</parameter>
+<parameter name="actual" type="java.util.Set&lt;? extends java.lang.Object&gt;">
+</parameter>
+</method>
+<method name="assertMatchesRegex"
+ return="java.util.regex.MatchResult"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="message" type="java.lang.String">
+</parameter>
+<parameter name="expectedRegex" type="java.lang.String">
+</parameter>
+<parameter name="actual" type="java.lang.String">
+</parameter>
+</method>
+<method name="assertMatchesRegex"
+ return="java.util.regex.MatchResult"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="expectedRegex" type="java.lang.String">
+</parameter>
+<parameter name="actual" type="java.lang.String">
+</parameter>
+</method>
+<method name="assertNotContainsRegex"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="message" type="java.lang.String">
+</parameter>
+<parameter name="expectedRegex" type="java.lang.String">
+</parameter>
+<parameter name="actual" type="java.lang.String">
+</parameter>
+</method>
+<method name="assertNotContainsRegex"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="expectedRegex" type="java.lang.String">
+</parameter>
+<parameter name="actual" type="java.lang.String">
+</parameter>
+</method>
+<method name="assertNotEmpty"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="message" type="java.lang.String">
+</parameter>
+<parameter name="iterable" type="java.lang.Iterable&lt;?&gt;">
+</parameter>
+</method>
+<method name="assertNotEmpty"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="iterable" type="java.lang.Iterable&lt;?&gt;">
+</parameter>
+</method>
+<method name="assertNotEmpty"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="message" type="java.lang.String">
+</parameter>
+<parameter name="map" type="java.util.Map&lt;?, ?&gt;">
+</parameter>
+</method>
+<method name="assertNotEmpty"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="map" type="java.util.Map&lt;?, ?&gt;">
+</parameter>
+</method>
+<method name="assertNotEqual"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="message" type="java.lang.String">
+</parameter>
+<parameter name="unexpected" type="java.lang.Object">
+</parameter>
+<parameter name="actual" type="java.lang.Object">
+</parameter>
+</method>
+<method name="assertNotEqual"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="unexpected" type="java.lang.Object">
+</parameter>
+<parameter name="actual" type="java.lang.Object">
+</parameter>
+</method>
+<method name="assertNotMatchesRegex"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="message" type="java.lang.String">
+</parameter>
+<parameter name="expectedRegex" type="java.lang.String">
+</parameter>
+<parameter name="actual" type="java.lang.String">
+</parameter>
+</method>
+<method name="assertNotMatchesRegex"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="expectedRegex" type="java.lang.String">
+</parameter>
+<parameter name="actual" type="java.lang.String">
+</parameter>
+</method>
+<method name="checkEqualsAndHashCodeMethods"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="message" type="java.lang.String">
+</parameter>
+<parameter name="lhs" type="java.lang.Object">
+</parameter>
+<parameter name="rhs" type="java.lang.Object">
+</parameter>
+<parameter name="expectedResult" type="boolean">
+</parameter>
+</method>
+<method name="checkEqualsAndHashCodeMethods"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="lhs" type="java.lang.Object">
+</parameter>
+<parameter name="rhs" type="java.lang.Object">
+</parameter>
+<parameter name="expectedResult" type="boolean">
+</parameter>
+</method>
+</class>
+<interface name="PerformanceTestCase"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="isPerformanceOnly"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="startPerformance"
+ return="int"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="intermediates" type="android.test.PerformanceTestCase.Intermediates">
+</parameter>
+</method>
+</interface>
+<interface name="PerformanceTestCase.Intermediates"
+ abstract="true"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="addIntermediate"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+</method>
+<method name="addIntermediate"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+<parameter name="timeInNS" type="long">
+</parameter>
+</method>
+<method name="finishTiming"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="realTime" type="boolean">
+</parameter>
+</method>
+<method name="setInternalIterations"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="count" type="int">
+</parameter>
+</method>
+<method name="startTiming"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="realTime" type="boolean">
+</parameter>
+</method>
+</interface>
+<class name="ProviderTestCase"
+ extends="android.test.InstrumentationTestCase"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="deprecated"
+ visibility="public"
+>
+<constructor name="ProviderTestCase"
+ type="android.test.ProviderTestCase"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="providerClass" type="java.lang.Class&lt;T&gt;">
+</parameter>
+<parameter name="providerAuthority" type="java.lang.String">
+</parameter>
+</constructor>
+<method name="getMockContentResolver"
+ return="android.test.mock.MockContentResolver"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getMockContext"
+ return="android.test.IsolatedContext"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getProvider"
+ return="T"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="newResolverWithContentProviderFromSql"
+ return="android.content.ContentResolver"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="targetContext" type="android.content.Context">
+</parameter>
+<parameter name="providerClass" type="java.lang.Class&lt;T&gt;">
+</parameter>
+<parameter name="authority" type="java.lang.String">
+</parameter>
+<parameter name="databaseName" type="java.lang.String">
+</parameter>
+<parameter name="databaseVersion" type="int">
+</parameter>
+<parameter name="sql" type="java.lang.String">
+</parameter>
+<exception name="IllegalAccessException" type="java.lang.IllegalAccessException">
+</exception>
+<exception name="InstantiationException" type="java.lang.InstantiationException">
+</exception>
+</method>
+</class>
+<class name="ProviderTestCase2"
+ extends="android.test.AndroidTestCase"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="ProviderTestCase2"
+ type="android.test.ProviderTestCase2"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="providerClass" type="java.lang.Class&lt;T&gt;">
+</parameter>
+<parameter name="providerAuthority" type="java.lang.String">
+</parameter>
+</constructor>
+<method name="getMockContentResolver"
+ return="android.test.mock.MockContentResolver"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getMockContext"
+ return="android.test.IsolatedContext"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getProvider"
+ return="T"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="newResolverWithContentProviderFromSql"
+ return="android.content.ContentResolver"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="targetContext" type="android.content.Context">
+</parameter>
+<parameter name="filenamePrefix" type="java.lang.String">
+</parameter>
+<parameter name="providerClass" type="java.lang.Class&lt;T&gt;">
+</parameter>
+<parameter name="authority" type="java.lang.String">
+</parameter>
+<parameter name="databaseName" type="java.lang.String">
+</parameter>
+<parameter name="databaseVersion" type="int">
+</parameter>
+<parameter name="sql" type="java.lang.String">
+</parameter>
+<exception name="IllegalAccessException" type="java.lang.IllegalAccessException">
+</exception>
+<exception name="InstantiationException" type="java.lang.InstantiationException">
+</exception>
+</method>
+</class>
+<class name="RenamingDelegatingContext"
+ extends="android.content.ContextWrapper"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="RenamingDelegatingContext"
+ type="android.test.RenamingDelegatingContext"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="context" type="android.content.Context">
+</parameter>
+<parameter name="filePrefix" type="java.lang.String">
+</parameter>
+</constructor>
+<constructor name="RenamingDelegatingContext"
+ type="android.test.RenamingDelegatingContext"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="context" type="android.content.Context">
+</parameter>
+<parameter name="fileContext" type="android.content.Context">
+</parameter>
+<parameter name="filePrefix" type="java.lang.String">
+</parameter>
+</constructor>
+<method name="getDatabasePrefix"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="makeExistingFilesAndDbsAccessible"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="providerWithRenamedContext"
+ return="T"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="contentProvider" type="java.lang.Class&lt;T&gt;">
+</parameter>
+<parameter name="c" type="android.content.Context">
+</parameter>
+<parameter name="filePrefix" type="java.lang.String">
+</parameter>
+<exception name="IllegalAccessException" type="java.lang.IllegalAccessException">
+</exception>
+<exception name="InstantiationException" type="java.lang.InstantiationException">
+</exception>
+</method>
+<method name="providerWithRenamedContext"
+ return="T"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="contentProvider" type="java.lang.Class&lt;T&gt;">
+</parameter>
+<parameter name="c" type="android.content.Context">
+</parameter>
+<parameter name="filePrefix" type="java.lang.String">
+</parameter>
+<parameter name="allowAccessToExistingFilesAndDbs" type="boolean">
+</parameter>
+<exception name="IllegalAccessException" type="java.lang.IllegalAccessException">
+</exception>
+<exception name="InstantiationException" type="java.lang.InstantiationException">
+</exception>
+</method>
+</class>
+<class name="ServiceTestCase"
+ extends="android.test.AndroidTestCase"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="ServiceTestCase"
+ type="android.test.ServiceTestCase"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="serviceClass" type="java.lang.Class&lt;T&gt;">
+</parameter>
+</constructor>
+<method name="bindService"
+ return="android.os.IBinder"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="intent" type="android.content.Intent">
+</parameter>
+</method>
+<method name="getApplication"
+ return="android.app.Application"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getService"
+ return="T"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getSystemContext"
+ return="android.content.Context"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="setApplication"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="application" type="android.app.Application">
+</parameter>
+</method>
+<method name="setupService"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</method>
+<method name="shutdownService"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</method>
+<method name="startService"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="intent" type="android.content.Intent">
+</parameter>
+</method>
+<method name="testServiceTestCaseSetUpProperly"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="Exception" type="java.lang.Exception">
+</exception>
+</method>
+</class>
+<class name="SingleLaunchActivityTestCase"
+ extends="android.test.InstrumentationTestCase"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="SingleLaunchActivityTestCase"
+ type="android.test.SingleLaunchActivityTestCase"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="pkg" type="java.lang.String">
+</parameter>
+<parameter name="activityClass" type="java.lang.Class&lt;T&gt;">
+</parameter>
+</constructor>
+<method name="getActivity"
+ return="T"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="testActivityTestCaseSetUpProperly"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="Exception" type="java.lang.Exception">
+</exception>
+</method>
+</class>
+<class name="SyncBaseInstrumentation"
+ extends="android.test.InstrumentationTestCase"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="SyncBaseInstrumentation"
+ type="android.test.SyncBaseInstrumentation"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<method name="cancelSyncsandDisableAutoSync"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</method>
+<method name="syncProvider"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="uri" type="android.net.Uri">
+</parameter>
+<parameter name="accountName" type="java.lang.String">
+</parameter>
+<parameter name="authority" type="java.lang.String">
+</parameter>
+<exception name="Exception" type="java.lang.Exception">
+</exception>
+</method>
+</class>
+<interface name="TestSuiteProvider"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="getTestSuite"
+ return="junit.framework.TestSuite"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+</interface>
+<class name="TouchUtils"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="TouchUtils"
+ type="android.test.TouchUtils"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<method name="clickView"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="test" type="android.test.InstrumentationTestCase">
+</parameter>
+<parameter name="v" type="android.view.View">
+</parameter>
+</method>
+<method name="drag"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="deprecated"
+ visibility="public"
+>
+<parameter name="test" type="android.test.ActivityInstrumentationTestCase">
+</parameter>
+<parameter name="fromX" type="float">
+</parameter>
+<parameter name="toX" type="float">
+</parameter>
+<parameter name="fromY" type="float">
+</parameter>
+<parameter name="toY" type="float">
+</parameter>
+<parameter name="stepCount" type="int">
+</parameter>
+</method>
+<method name="drag"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="test" type="android.test.InstrumentationTestCase">
+</parameter>
+<parameter name="fromX" type="float">
+</parameter>
+<parameter name="toX" type="float">
+</parameter>
+<parameter name="fromY" type="float">
+</parameter>
+<parameter name="toY" type="float">
+</parameter>
+<parameter name="stepCount" type="int">
+</parameter>
+</method>
+<method name="dragQuarterScreenDown"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="deprecated"
+ visibility="public"
+>
+<parameter name="test" type="android.test.ActivityInstrumentationTestCase">
+</parameter>
+</method>
+<method name="dragQuarterScreenDown"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="test" type="android.test.InstrumentationTestCase">
+</parameter>
+<parameter name="activity" type="android.app.Activity">
+</parameter>
+</method>
+<method name="dragQuarterScreenUp"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="deprecated"
+ visibility="public"
+>
+<parameter name="test" type="android.test.ActivityInstrumentationTestCase">
+</parameter>
+</method>
+<method name="dragQuarterScreenUp"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="test" type="android.test.InstrumentationTestCase">
+</parameter>
+<parameter name="activity" type="android.app.Activity">
+</parameter>
+</method>
+<method name="dragViewBy"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="deprecated"
+ visibility="public"
+>
+<parameter name="test" type="android.test.ActivityInstrumentationTestCase">
+</parameter>
+<parameter name="v" type="android.view.View">
+</parameter>
+<parameter name="gravity" type="int">
+</parameter>
+<parameter name="deltaX" type="int">
+</parameter>
+<parameter name="deltaY" type="int">
+</parameter>
+</method>
+<method name="dragViewBy"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="deprecated"
+ visibility="public"
+>
+<parameter name="test" type="android.test.InstrumentationTestCase">
+</parameter>
+<parameter name="v" type="android.view.View">
+</parameter>
+<parameter name="gravity" type="int">
+</parameter>
+<parameter name="deltaX" type="int">
+</parameter>
+<parameter name="deltaY" type="int">
+</parameter>
+</method>
+<method name="dragViewTo"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="deprecated"
+ visibility="public"
+>
+<parameter name="test" type="android.test.ActivityInstrumentationTestCase">
+</parameter>
+<parameter name="v" type="android.view.View">
+</parameter>
+<parameter name="gravity" type="int">
+</parameter>
+<parameter name="toX" type="int">
+</parameter>
+<parameter name="toY" type="int">
+</parameter>
+</method>
+<method name="dragViewTo"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="test" type="android.test.InstrumentationTestCase">
+</parameter>
+<parameter name="v" type="android.view.View">
+</parameter>
+<parameter name="gravity" type="int">
+</parameter>
+<parameter name="toX" type="int">
+</parameter>
+<parameter name="toY" type="int">
+</parameter>
+</method>
+<method name="dragViewToBottom"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="deprecated"
+ visibility="public"
+>
+<parameter name="test" type="android.test.ActivityInstrumentationTestCase">
+</parameter>
+<parameter name="v" type="android.view.View">
+</parameter>
+</method>
+<method name="dragViewToBottom"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="test" type="android.test.InstrumentationTestCase">
+</parameter>
+<parameter name="activity" type="android.app.Activity">
+</parameter>
+<parameter name="v" type="android.view.View">
+</parameter>
+</method>
+<method name="dragViewToBottom"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="deprecated"
+ visibility="public"
+>
+<parameter name="test" type="android.test.ActivityInstrumentationTestCase">
+</parameter>
+<parameter name="v" type="android.view.View">
+</parameter>
+<parameter name="stepCount" type="int">
+</parameter>
+</method>
+<method name="dragViewToBottom"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="test" type="android.test.InstrumentationTestCase">
+</parameter>
+<parameter name="activity" type="android.app.Activity">
+</parameter>
+<parameter name="v" type="android.view.View">
+</parameter>
+<parameter name="stepCount" type="int">
+</parameter>
+</method>
+<method name="dragViewToTop"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="deprecated"
+ visibility="public"
+>
+<parameter name="test" type="android.test.ActivityInstrumentationTestCase">
+</parameter>
+<parameter name="v" type="android.view.View">
+</parameter>
+</method>
+<method name="dragViewToTop"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="deprecated"
+ visibility="public"
+>
+<parameter name="test" type="android.test.ActivityInstrumentationTestCase">
+</parameter>
+<parameter name="v" type="android.view.View">
+</parameter>
+<parameter name="stepCount" type="int">
+</parameter>
+</method>
+<method name="dragViewToTop"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="test" type="android.test.InstrumentationTestCase">
+</parameter>
+<parameter name="v" type="android.view.View">
+</parameter>
+</method>
+<method name="dragViewToTop"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="test" type="android.test.InstrumentationTestCase">
+</parameter>
+<parameter name="v" type="android.view.View">
+</parameter>
+<parameter name="stepCount" type="int">
+</parameter>
+</method>
+<method name="dragViewToX"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="deprecated"
+ visibility="public"
+>
+<parameter name="test" type="android.test.ActivityInstrumentationTestCase">
+</parameter>
+<parameter name="v" type="android.view.View">
+</parameter>
+<parameter name="gravity" type="int">
+</parameter>
+<parameter name="toX" type="int">
+</parameter>
+</method>
+<method name="dragViewToX"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="test" type="android.test.InstrumentationTestCase">
+</parameter>
+<parameter name="v" type="android.view.View">
+</parameter>
+<parameter name="gravity" type="int">
+</parameter>
+<parameter name="toX" type="int">
+</parameter>
+</method>
+<method name="dragViewToY"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="deprecated"
+ visibility="public"
+>
+<parameter name="test" type="android.test.ActivityInstrumentationTestCase">
+</parameter>
+<parameter name="v" type="android.view.View">
+</parameter>
+<parameter name="gravity" type="int">
+</parameter>
+<parameter name="toY" type="int">
+</parameter>
+</method>
+<method name="dragViewToY"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="test" type="android.test.InstrumentationTestCase">
+</parameter>
+<parameter name="v" type="android.view.View">
+</parameter>
+<parameter name="gravity" type="int">
+</parameter>
+<parameter name="toY" type="int">
+</parameter>
+</method>
+<method name="longClickView"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="deprecated"
+ visibility="public"
+>
+<parameter name="test" type="android.test.ActivityInstrumentationTestCase">
+</parameter>
+<parameter name="v" type="android.view.View">
+</parameter>
+</method>
+<method name="longClickView"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="test" type="android.test.InstrumentationTestCase">
+</parameter>
+<parameter name="v" type="android.view.View">
+</parameter>
+</method>
+<method name="scrollToBottom"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="deprecated"
+ visibility="public"
+>
+<parameter name="test" type="android.test.ActivityInstrumentationTestCase">
+</parameter>
+<parameter name="v" type="android.view.ViewGroup">
+</parameter>
+</method>
+<method name="scrollToBottom"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="test" type="android.test.InstrumentationTestCase">
+</parameter>
+<parameter name="activity" type="android.app.Activity">
+</parameter>
+<parameter name="v" type="android.view.ViewGroup">
+</parameter>
+</method>
+<method name="scrollToTop"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="deprecated"
+ visibility="public"
+>
+<parameter name="test" type="android.test.ActivityInstrumentationTestCase">
+</parameter>
+<parameter name="v" type="android.view.ViewGroup">
+</parameter>
+</method>
+<method name="scrollToTop"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="test" type="android.test.InstrumentationTestCase">
+</parameter>
+<parameter name="activity" type="android.app.Activity">
+</parameter>
+<parameter name="v" type="android.view.ViewGroup">
+</parameter>
+</method>
+<method name="tapView"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="test" type="android.test.InstrumentationTestCase">
+</parameter>
+<parameter name="v" type="android.view.View">
+</parameter>
+</method>
+<method name="touchAndCancelView"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="test" type="android.test.InstrumentationTestCase">
+</parameter>
+<parameter name="v" type="android.view.View">
+</parameter>
+</method>
+</class>
+<class name="UiThreadTest"
+ extends="java.lang.Object"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="java.lang.annotation.Annotation">
+</implements>
+</class>
+<class name="ViewAsserts"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="assertBaselineAligned"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="first" type="android.view.View">
+</parameter>
+<parameter name="second" type="android.view.View">
+</parameter>
+</method>
+<method name="assertBottomAligned"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="first" type="android.view.View">
+</parameter>
+<parameter name="second" type="android.view.View">
+</parameter>
+</method>
+<method name="assertBottomAligned"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="first" type="android.view.View">
+</parameter>
+<parameter name="second" type="android.view.View">
+</parameter>
+<parameter name="margin" type="int">
+</parameter>
+</method>
+<method name="assertGroupContains"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="parent" type="android.view.ViewGroup">
+</parameter>
+<parameter name="child" type="android.view.View">
+</parameter>
+</method>
+<method name="assertGroupIntegrity"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="parent" type="android.view.ViewGroup">
+</parameter>
+</method>
+<method name="assertGroupNotContains"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="parent" type="android.view.ViewGroup">
+</parameter>
+<parameter name="child" type="android.view.View">
+</parameter>
+</method>
+<method name="assertHasScreenCoordinates"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="origin" type="android.view.View">
+</parameter>
+<parameter name="view" type="android.view.View">
+</parameter>
+<parameter name="x" type="int">
+</parameter>
+<parameter name="y" type="int">
+</parameter>
+</method>
+<method name="assertHorizontalCenterAligned"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="reference" type="android.view.View">
+</parameter>
+<parameter name="test" type="android.view.View">
+</parameter>
+</method>
+<method name="assertLeftAligned"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="first" type="android.view.View">
+</parameter>
+<parameter name="second" type="android.view.View">
+</parameter>
+</method>
+<method name="assertLeftAligned"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="first" type="android.view.View">
+</parameter>
+<parameter name="second" type="android.view.View">
+</parameter>
+<parameter name="margin" type="int">
+</parameter>
+</method>
+<method name="assertOffScreenAbove"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="origin" type="android.view.View">
+</parameter>
+<parameter name="view" type="android.view.View">
+</parameter>
+</method>
+<method name="assertOffScreenBelow"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="origin" type="android.view.View">
+</parameter>
+<parameter name="view" type="android.view.View">
+</parameter>
+</method>
+<method name="assertOnScreen"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="origin" type="android.view.View">
+</parameter>
+<parameter name="view" type="android.view.View">
+</parameter>
+</method>
+<method name="assertRightAligned"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="first" type="android.view.View">
+</parameter>
+<parameter name="second" type="android.view.View">
+</parameter>
+</method>
+<method name="assertRightAligned"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="first" type="android.view.View">
+</parameter>
+<parameter name="second" type="android.view.View">
+</parameter>
+<parameter name="margin" type="int">
+</parameter>
+</method>
+<method name="assertTopAligned"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="first" type="android.view.View">
+</parameter>
+<parameter name="second" type="android.view.View">
+</parameter>
+</method>
+<method name="assertTopAligned"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="first" type="android.view.View">
+</parameter>
+<parameter name="second" type="android.view.View">
+</parameter>
+<parameter name="margin" type="int">
+</parameter>
+</method>
+<method name="assertVerticalCenterAligned"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="reference" type="android.view.View">
+</parameter>
+<parameter name="test" type="android.view.View">
+</parameter>
+</method>
+</class>
+</package>
+<package name="android.test.mock"
+>
+<class name="MockApplication"
+ extends="android.app.Application"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="MockApplication"
+ type="android.test.mock.MockApplication"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+</class>
+<class name="MockContentProvider"
+ extends="android.content.ContentProvider"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="MockContentProvider"
+ type="android.test.mock.MockContentProvider"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</constructor>
+<constructor name="MockContentProvider"
+ type="android.test.mock.MockContentProvider"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="context" type="android.content.Context">
+</parameter>
+</constructor>
+<constructor name="MockContentProvider"
+ type="android.test.mock.MockContentProvider"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="context" type="android.content.Context">
+</parameter>
+<parameter name="readPermission" type="java.lang.String">
+</parameter>
+<parameter name="writePermission" type="java.lang.String">
+</parameter>
+<parameter name="pathPermissions" type="android.content.pm.PathPermission[]">
+</parameter>
+</constructor>
+<method name="delete"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="uri" type="android.net.Uri">
+</parameter>
+<parameter name="selection" type="java.lang.String">
+</parameter>
+<parameter name="selectionArgs" type="java.lang.String[]">
+</parameter>
+</method>
+<method name="getType"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="uri" type="android.net.Uri">
+</parameter>
+</method>
+<method name="insert"
+ return="android.net.Uri"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="uri" type="android.net.Uri">
+</parameter>
+<parameter name="values" type="android.content.ContentValues">
+</parameter>
+</method>
+<method name="onCreate"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="query"
+ return="android.database.Cursor"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="uri" type="android.net.Uri">
+</parameter>
+<parameter name="projection" type="java.lang.String[]">
+</parameter>
+<parameter name="selection" type="java.lang.String">
+</parameter>
+<parameter name="selectionArgs" type="java.lang.String[]">
+</parameter>
+<parameter name="sortOrder" type="java.lang.String">
+</parameter>
+</method>
+<method name="update"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="uri" type="android.net.Uri">
+</parameter>
+<parameter name="values" type="android.content.ContentValues">
+</parameter>
+<parameter name="selection" type="java.lang.String">
+</parameter>
+<parameter name="selectionArgs" type="java.lang.String[]">
+</parameter>
+</method>
+</class>
+<class name="MockContentResolver"
+ extends="android.content.ContentResolver"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="MockContentResolver"
+ type="android.test.mock.MockContentResolver"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<method name="addProvider"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+<parameter name="provider" type="android.content.ContentProvider">
+</parameter>
+</method>
+</class>
+<class name="MockContext"
+ extends="android.content.Context"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="MockContext"
+ type="android.test.mock.MockContext"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<method name="bindService"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="service" type="android.content.Intent">
+</parameter>
+<parameter name="conn" type="android.content.ServiceConnection">
+</parameter>
+<parameter name="flags" type="int">
+</parameter>
+</method>
+<method name="checkCallingOrSelfPermission"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="permission" type="java.lang.String">
+</parameter>
+</method>
+<method name="checkCallingOrSelfUriPermission"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="uri" type="android.net.Uri">
+</parameter>
+<parameter name="modeFlags" type="int">
+</parameter>
+</method>
+<method name="checkCallingPermission"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="permission" type="java.lang.String">
+</parameter>
+</method>
+<method name="checkCallingUriPermission"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="uri" type="android.net.Uri">
+</parameter>
+<parameter name="modeFlags" type="int">
+</parameter>
+</method>
+<method name="checkPermission"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="permission" type="java.lang.String">
+</parameter>
+<parameter name="pid" type="int">
+</parameter>
+<parameter name="uid" type="int">
+</parameter>
+</method>
+<method name="checkUriPermission"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="uri" type="android.net.Uri">
+</parameter>
+<parameter name="pid" type="int">
+</parameter>
+<parameter name="uid" type="int">
+</parameter>
+<parameter name="modeFlags" type="int">
+</parameter>
+</method>
+<method name="checkUriPermission"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="uri" type="android.net.Uri">
+</parameter>
+<parameter name="readPermission" type="java.lang.String">
+</parameter>
+<parameter name="writePermission" type="java.lang.String">
+</parameter>
+<parameter name="pid" type="int">
+</parameter>
+<parameter name="uid" type="int">
+</parameter>
+<parameter name="modeFlags" type="int">
+</parameter>
+</method>
+<method name="clearWallpaper"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="createPackageContext"
+ return="android.content.Context"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="packageName" type="java.lang.String">
+</parameter>
+<parameter name="flags" type="int">
+</parameter>
+<exception name="PackageManager.NameNotFoundException" type="android.content.pm.PackageManager.NameNotFoundException">
+</exception>
+</method>
+<method name="databaseList"
+ return="java.lang.String[]"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="deleteDatabase"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+</method>
+<method name="deleteFile"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+</method>
+<method name="enforceCallingOrSelfPermission"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="permission" type="java.lang.String">
+</parameter>
+<parameter name="message" type="java.lang.String">
+</parameter>
+</method>
+<method name="enforceCallingOrSelfUriPermission"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="uri" type="android.net.Uri">
+</parameter>
+<parameter name="modeFlags" type="int">
+</parameter>
+<parameter name="message" type="java.lang.String">
+</parameter>
+</method>
+<method name="enforceCallingPermission"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="permission" type="java.lang.String">
+</parameter>
+<parameter name="message" type="java.lang.String">
+</parameter>
+</method>
+<method name="enforceCallingUriPermission"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="uri" type="android.net.Uri">
+</parameter>
+<parameter name="modeFlags" type="int">
+</parameter>
+<parameter name="message" type="java.lang.String">
+</parameter>
+</method>
+<method name="enforcePermission"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="permission" type="java.lang.String">
+</parameter>
+<parameter name="pid" type="int">
+</parameter>
+<parameter name="uid" type="int">
+</parameter>
+<parameter name="message" type="java.lang.String">
+</parameter>
+</method>
+<method name="enforceUriPermission"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="uri" type="android.net.Uri">
+</parameter>
+<parameter name="pid" type="int">
+</parameter>
+<parameter name="uid" type="int">
+</parameter>
+<parameter name="modeFlags" type="int">
+</parameter>
+<parameter name="message" type="java.lang.String">
+</parameter>
+</method>
+<method name="enforceUriPermission"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="uri" type="android.net.Uri">
+</parameter>
+<parameter name="readPermission" type="java.lang.String">
+</parameter>
+<parameter name="writePermission" type="java.lang.String">
+</parameter>
+<parameter name="pid" type="int">
+</parameter>
+<parameter name="uid" type="int">
+</parameter>
+<parameter name="modeFlags" type="int">
+</parameter>
+<parameter name="message" type="java.lang.String">
+</parameter>
+</method>
+<method name="fileList"
+ return="java.lang.String[]"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getApplicationContext"
+ return="android.content.Context"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getApplicationInfo"
+ return="android.content.pm.ApplicationInfo"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getAssets"
+ return="android.content.res.AssetManager"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getCacheDir"
+ return="java.io.File"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getClassLoader"
+ return="java.lang.ClassLoader"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getContentResolver"
+ return="android.content.ContentResolver"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getDatabasePath"
+ return="java.io.File"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+</method>
+<method name="getDir"
+ return="java.io.File"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+<parameter name="mode" type="int">
+</parameter>
+</method>
+<method name="getExternalCacheDir"
+ return="java.io.File"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getExternalFilesDir"
+ return="java.io.File"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="type" type="java.lang.String">
+</parameter>
+</method>
+<method name="getFileStreamPath"
+ return="java.io.File"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+</method>
+<method name="getFilesDir"
+ return="java.io.File"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getMainLooper"
+ return="android.os.Looper"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getPackageCodePath"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getPackageManager"
+ return="android.content.pm.PackageManager"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getPackageName"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getPackageResourcePath"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getResources"
+ return="android.content.res.Resources"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getSharedPreferences"
+ return="android.content.SharedPreferences"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+<parameter name="mode" type="int">
+</parameter>
+</method>
+<method name="getSystemService"
+ return="java.lang.Object"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+</method>
+<method name="getTheme"
+ return="android.content.res.Resources.Theme"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getWallpaper"
+ return="android.graphics.drawable.Drawable"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getWallpaperDesiredMinimumHeight"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getWallpaperDesiredMinimumWidth"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="grantUriPermission"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="toPackage" type="java.lang.String">
+</parameter>
+<parameter name="uri" type="android.net.Uri">
+</parameter>
+<parameter name="modeFlags" type="int">
+</parameter>
+</method>
+<method name="openFileInput"
+ return="java.io.FileInputStream"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+<exception name="FileNotFoundException" type="java.io.FileNotFoundException">
+</exception>
+</method>
+<method name="openFileOutput"
+ return="java.io.FileOutputStream"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+<parameter name="mode" type="int">
+</parameter>
+<exception name="FileNotFoundException" type="java.io.FileNotFoundException">
+</exception>
+</method>
+<method name="openOrCreateDatabase"
+ return="android.database.sqlite.SQLiteDatabase"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="file" type="java.lang.String">
+</parameter>
+<parameter name="mode" type="int">
+</parameter>
+<parameter name="factory" type="android.database.sqlite.SQLiteDatabase.CursorFactory">
+</parameter>
+</method>
+<method name="peekWallpaper"
+ return="android.graphics.drawable.Drawable"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="registerReceiver"
+ return="android.content.Intent"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="receiver" type="android.content.BroadcastReceiver">
+</parameter>
+<parameter name="filter" type="android.content.IntentFilter">
+</parameter>
+</method>
+<method name="registerReceiver"
+ return="android.content.Intent"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="receiver" type="android.content.BroadcastReceiver">
+</parameter>
+<parameter name="filter" type="android.content.IntentFilter">
+</parameter>
+<parameter name="broadcastPermission" type="java.lang.String">
+</parameter>
+<parameter name="scheduler" type="android.os.Handler">
+</parameter>
+</method>
+<method name="removeStickyBroadcast"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="intent" type="android.content.Intent">
+</parameter>
+</method>
+<method name="revokeUriPermission"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="uri" type="android.net.Uri">
+</parameter>
+<parameter name="modeFlags" type="int">
+</parameter>
+</method>
+<method name="sendBroadcast"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="intent" type="android.content.Intent">
+</parameter>
+</method>
+<method name="sendBroadcast"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="intent" type="android.content.Intent">
+</parameter>
+<parameter name="receiverPermission" type="java.lang.String">
+</parameter>
+</method>
+<method name="sendOrderedBroadcast"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="intent" type="android.content.Intent">
+</parameter>
+<parameter name="receiverPermission" type="java.lang.String">
+</parameter>
+</method>
+<method name="sendOrderedBroadcast"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="intent" type="android.content.Intent">
+</parameter>
+<parameter name="receiverPermission" type="java.lang.String">
+</parameter>
+<parameter name="resultReceiver" type="android.content.BroadcastReceiver">
+</parameter>
+<parameter name="scheduler" type="android.os.Handler">
+</parameter>
+<parameter name="initialCode" type="int">
+</parameter>
+<parameter name="initialData" type="java.lang.String">
+</parameter>
+<parameter name="initialExtras" type="android.os.Bundle">
+</parameter>
+</method>
+<method name="sendStickyBroadcast"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="intent" type="android.content.Intent">
+</parameter>
+</method>
+<method name="sendStickyOrderedBroadcast"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="intent" type="android.content.Intent">
+</parameter>
+<parameter name="resultReceiver" type="android.content.BroadcastReceiver">
+</parameter>
+<parameter name="scheduler" type="android.os.Handler">
+</parameter>
+<parameter name="initialCode" type="int">
+</parameter>
+<parameter name="initialData" type="java.lang.String">
+</parameter>
+<parameter name="initialExtras" type="android.os.Bundle">
+</parameter>
+</method>
+<method name="setTheme"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="resid" type="int">
+</parameter>
+</method>
+<method name="setWallpaper"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="bitmap" type="android.graphics.Bitmap">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="setWallpaper"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="data" type="java.io.InputStream">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="startActivity"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="intent" type="android.content.Intent">
+</parameter>
+</method>
+<method name="startInstrumentation"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="className" type="android.content.ComponentName">
+</parameter>
+<parameter name="profileFile" type="java.lang.String">
+</parameter>
+<parameter name="arguments" type="android.os.Bundle">
+</parameter>
+</method>
+<method name="startIntentSender"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="intent" type="android.content.IntentSender">
+</parameter>
+<parameter name="fillInIntent" type="android.content.Intent">
+</parameter>
+<parameter name="flagsMask" type="int">
+</parameter>
+<parameter name="flagsValues" type="int">
+</parameter>
+<parameter name="extraFlags" type="int">
+</parameter>
+<exception name="IntentSender.SendIntentException" type="android.content.IntentSender.SendIntentException">
+</exception>
+</method>
+<method name="startService"
+ return="android.content.ComponentName"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="service" type="android.content.Intent">
+</parameter>
+</method>
+<method name="stopService"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="service" type="android.content.Intent">
+</parameter>
+</method>
+<method name="unbindService"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="conn" type="android.content.ServiceConnection">
+</parameter>
+</method>
+<method name="unregisterReceiver"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="receiver" type="android.content.BroadcastReceiver">
+</parameter>
+</method>
+</class>
+<class name="MockCursor"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="android.database.Cursor">
+</implements>
+<constructor name="MockCursor"
+ type="android.test.mock.MockCursor"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<method name="abortUpdates"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="close"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="commitUpdates"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="commitUpdates"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="values" type="java.util.Map&lt;? extends java.lang.Long, ? extends java.util.Map&lt;java.lang.String, java.lang.Object&gt;&gt;">
+</parameter>
+</method>
+<method name="copyStringToBuffer"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="columnIndex" type="int">
+</parameter>
+<parameter name="buffer" type="android.database.CharArrayBuffer">
+</parameter>
+</method>
+<method name="deactivate"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="deleteRow"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getBlob"
+ return="byte[]"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="columnIndex" type="int">
+</parameter>
+</method>
+<method name="getColumnCount"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getColumnIndex"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="columnName" type="java.lang.String">
+</parameter>
+</method>
+<method name="getColumnIndexOrThrow"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="columnName" type="java.lang.String">
+</parameter>
+</method>
+<method name="getColumnName"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="columnIndex" type="int">
+</parameter>
+</method>
+<method name="getColumnNames"
+ return="java.lang.String[]"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getCount"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getDouble"
+ return="double"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="columnIndex" type="int">
+</parameter>
+</method>
+<method name="getExtras"
+ return="android.os.Bundle"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getFloat"
+ return="float"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="columnIndex" type="int">
+</parameter>
+</method>
+<method name="getInt"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="columnIndex" type="int">
+</parameter>
+</method>
+<method name="getLong"
+ return="long"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="columnIndex" type="int">
+</parameter>
+</method>
+<method name="getPosition"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getShort"
+ return="short"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="columnIndex" type="int">
+</parameter>
+</method>
+<method name="getString"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="columnIndex" type="int">
+</parameter>
+</method>
+<method name="getWantsAllOnMoveCalls"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="hasUpdates"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isAfterLast"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isBeforeFirst"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isClosed"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isFirst"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isLast"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isNull"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="columnIndex" type="int">
+</parameter>
+</method>
+<method name="move"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="offset" type="int">
+</parameter>
+</method>
+<method name="moveToFirst"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="moveToLast"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="moveToNext"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="moveToPosition"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="position" type="int">
+</parameter>
+</method>
+<method name="moveToPrevious"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="registerContentObserver"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="observer" type="android.database.ContentObserver">
+</parameter>
+</method>
+<method name="registerDataSetObserver"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="observer" type="android.database.DataSetObserver">
+</parameter>
+</method>
+<method name="requery"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="respond"
+ return="android.os.Bundle"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="extras" type="android.os.Bundle">
+</parameter>
+</method>
+<method name="setNotificationUri"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="cr" type="android.content.ContentResolver">
+</parameter>
+<parameter name="uri" type="android.net.Uri">
+</parameter>
+</method>
+<method name="supportsUpdates"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="unregisterContentObserver"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="observer" type="android.database.ContentObserver">
+</parameter>
+</method>
+<method name="unregisterDataSetObserver"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="observer" type="android.database.DataSetObserver">
+</parameter>
+</method>
+<method name="updateBlob"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="columnIndex" type="int">
+</parameter>
+<parameter name="value" type="byte[]">
+</parameter>
+</method>
+<method name="updateDouble"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="columnIndex" type="int">
+</parameter>
+<parameter name="value" type="double">
+</parameter>
+</method>
+<method name="updateFloat"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="columnIndex" type="int">
+</parameter>
+<parameter name="value" type="float">
+</parameter>
+</method>
+<method name="updateInt"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="columnIndex" type="int">
+</parameter>
+<parameter name="value" type="int">
+</parameter>
+</method>
+<method name="updateLong"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="columnIndex" type="int">
+</parameter>
+<parameter name="value" type="long">
+</parameter>
+</method>
+<method name="updateShort"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="columnIndex" type="int">
+</parameter>
+<parameter name="value" type="short">
+</parameter>
+</method>
+<method name="updateString"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="columnIndex" type="int">
+</parameter>
+<parameter name="value" type="java.lang.String">
+</parameter>
+</method>
+<method name="updateToNull"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="columnIndex" type="int">
+</parameter>
+</method>
+</class>
+<class name="MockDialogInterface"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="android.content.DialogInterface">
+</implements>
+<constructor name="MockDialogInterface"
+ type="android.test.mock.MockDialogInterface"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<method name="cancel"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="dismiss"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+</class>
+<class name="MockPackageManager"
+ extends="android.content.pm.PackageManager"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="MockPackageManager"
+ type="android.test.mock.MockPackageManager"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<method name="addPackageToPreferred"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="packageName" type="java.lang.String">
+</parameter>
+</method>
+<method name="addPermission"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="info" type="android.content.pm.PermissionInfo">
+</parameter>
+</method>
+<method name="addPermissionAsync"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="info" type="android.content.pm.PermissionInfo">
+</parameter>
+</method>
+<method name="addPreferredActivity"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="filter" type="android.content.IntentFilter">
+</parameter>
+<parameter name="match" type="int">
+</parameter>
+<parameter name="set" type="android.content.ComponentName[]">
+</parameter>
+<parameter name="activity" type="android.content.ComponentName">
+</parameter>
+</method>
+<method name="canonicalToCurrentPackageNames"
+ return="java.lang.String[]"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="names" type="java.lang.String[]">
+</parameter>
+</method>
+<method name="checkPermission"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="permName" type="java.lang.String">
+</parameter>
+<parameter name="pkgName" type="java.lang.String">
+</parameter>
+</method>
+<method name="checkSignatures"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="pkg1" type="java.lang.String">
+</parameter>
+<parameter name="pkg2" type="java.lang.String">
+</parameter>
+</method>
+<method name="checkSignatures"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="uid1" type="int">
+</parameter>
+<parameter name="uid2" type="int">
+</parameter>
+</method>
+<method name="clearPackagePreferredActivities"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="packageName" type="java.lang.String">
+</parameter>
+</method>
+<method name="currentToCanonicalPackageNames"
+ return="java.lang.String[]"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="names" type="java.lang.String[]">
+</parameter>
+</method>
+<method name="getActivityIcon"
+ return="android.graphics.drawable.Drawable"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="activityName" type="android.content.ComponentName">
+</parameter>
+<exception name="PackageManager.NameNotFoundException" type="android.content.pm.PackageManager.NameNotFoundException">
+</exception>
+</method>
+<method name="getActivityIcon"
+ return="android.graphics.drawable.Drawable"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="intent" type="android.content.Intent">
+</parameter>
+<exception name="PackageManager.NameNotFoundException" type="android.content.pm.PackageManager.NameNotFoundException">
+</exception>
+</method>
+<method name="getActivityInfo"
+ return="android.content.pm.ActivityInfo"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="className" type="android.content.ComponentName">
+</parameter>
+<parameter name="flags" type="int">
+</parameter>
+<exception name="PackageManager.NameNotFoundException" type="android.content.pm.PackageManager.NameNotFoundException">
+</exception>
+</method>
+<method name="getAllPermissionGroups"
+ return="java.util.List&lt;android.content.pm.PermissionGroupInfo&gt;"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="flags" type="int">
+</parameter>
+</method>
+<method name="getApplicationEnabledSetting"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="packageName" type="java.lang.String">
+</parameter>
+</method>
+<method name="getApplicationIcon"
+ return="android.graphics.drawable.Drawable"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="info" type="android.content.pm.ApplicationInfo">
+</parameter>
+</method>
+<method name="getApplicationIcon"
+ return="android.graphics.drawable.Drawable"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="packageName" type="java.lang.String">
+</parameter>
+<exception name="PackageManager.NameNotFoundException" type="android.content.pm.PackageManager.NameNotFoundException">
+</exception>
+</method>
+<method name="getApplicationInfo"
+ return="android.content.pm.ApplicationInfo"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="packageName" type="java.lang.String">
+</parameter>
+<parameter name="flags" type="int">
+</parameter>
+<exception name="PackageManager.NameNotFoundException" type="android.content.pm.PackageManager.NameNotFoundException">
+</exception>
+</method>
+<method name="getApplicationLabel"
+ return="java.lang.CharSequence"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="info" type="android.content.pm.ApplicationInfo">
+</parameter>
+</method>
+<method name="getComponentEnabledSetting"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="componentName" type="android.content.ComponentName">
+</parameter>
+</method>
+<method name="getDefaultActivityIcon"
+ return="android.graphics.drawable.Drawable"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getDrawable"
+ return="android.graphics.drawable.Drawable"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="packageName" type="java.lang.String">
+</parameter>
+<parameter name="resid" type="int">
+</parameter>
+<parameter name="appInfo" type="android.content.pm.ApplicationInfo">
+</parameter>
+</method>
+<method name="getInstalledApplications"
+ return="java.util.List&lt;android.content.pm.ApplicationInfo&gt;"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="flags" type="int">
+</parameter>
+</method>
+<method name="getInstalledPackages"
+ return="java.util.List&lt;android.content.pm.PackageInfo&gt;"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="flags" type="int">
+</parameter>
+</method>
+<method name="getInstallerPackageName"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="packageName" type="java.lang.String">
+</parameter>
+</method>
+<method name="getInstrumentationInfo"
+ return="android.content.pm.InstrumentationInfo"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="className" type="android.content.ComponentName">
+</parameter>
+<parameter name="flags" type="int">
+</parameter>
+<exception name="PackageManager.NameNotFoundException" type="android.content.pm.PackageManager.NameNotFoundException">
+</exception>
+</method>
+<method name="getLaunchIntentForPackage"
+ return="android.content.Intent"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="packageName" type="java.lang.String">
+</parameter>
+</method>
+<method name="getNameForUid"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="uid" type="int">
+</parameter>
+</method>
+<method name="getPackageGids"
+ return="int[]"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="packageName" type="java.lang.String">
+</parameter>
+<exception name="PackageManager.NameNotFoundException" type="android.content.pm.PackageManager.NameNotFoundException">
+</exception>
+</method>
+<method name="getPackageInfo"
+ return="android.content.pm.PackageInfo"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="packageName" type="java.lang.String">
+</parameter>
+<parameter name="flags" type="int">
+</parameter>
+<exception name="PackageManager.NameNotFoundException" type="android.content.pm.PackageManager.NameNotFoundException">
+</exception>
+</method>
+<method name="getPackagesForUid"
+ return="java.lang.String[]"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="uid" type="int">
+</parameter>
+</method>
+<method name="getPermissionGroupInfo"
+ return="android.content.pm.PermissionGroupInfo"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+<parameter name="flags" type="int">
+</parameter>
+<exception name="PackageManager.NameNotFoundException" type="android.content.pm.PackageManager.NameNotFoundException">
+</exception>
+</method>
+<method name="getPermissionInfo"
+ return="android.content.pm.PermissionInfo"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+<parameter name="flags" type="int">
+</parameter>
+<exception name="PackageManager.NameNotFoundException" type="android.content.pm.PackageManager.NameNotFoundException">
+</exception>
+</method>
+<method name="getPreferredActivities"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="outFilters" type="java.util.List&lt;android.content.IntentFilter&gt;">
+</parameter>
+<parameter name="outActivities" type="java.util.List&lt;android.content.ComponentName&gt;">
+</parameter>
+<parameter name="packageName" type="java.lang.String">
+</parameter>
+</method>
+<method name="getPreferredPackages"
+ return="java.util.List&lt;android.content.pm.PackageInfo&gt;"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="flags" type="int">
+</parameter>
+</method>
+<method name="getReceiverInfo"
+ return="android.content.pm.ActivityInfo"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="className" type="android.content.ComponentName">
+</parameter>
+<parameter name="flags" type="int">
+</parameter>
+<exception name="PackageManager.NameNotFoundException" type="android.content.pm.PackageManager.NameNotFoundException">
+</exception>
+</method>
+<method name="getResourcesForActivity"
+ return="android.content.res.Resources"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="activityName" type="android.content.ComponentName">
+</parameter>
+<exception name="PackageManager.NameNotFoundException" type="android.content.pm.PackageManager.NameNotFoundException">
+</exception>
+</method>
+<method name="getResourcesForApplication"
+ return="android.content.res.Resources"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="app" type="android.content.pm.ApplicationInfo">
+</parameter>
+</method>
+<method name="getResourcesForApplication"
+ return="android.content.res.Resources"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="appPackageName" type="java.lang.String">
+</parameter>
+<exception name="PackageManager.NameNotFoundException" type="android.content.pm.PackageManager.NameNotFoundException">
+</exception>
+</method>
+<method name="getServiceInfo"
+ return="android.content.pm.ServiceInfo"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="className" type="android.content.ComponentName">
+</parameter>
+<parameter name="flags" type="int">
+</parameter>
+<exception name="PackageManager.NameNotFoundException" type="android.content.pm.PackageManager.NameNotFoundException">
+</exception>
+</method>
+<method name="getSystemAvailableFeatures"
+ return="android.content.pm.FeatureInfo[]"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getSystemSharedLibraryNames"
+ return="java.lang.String[]"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getText"
+ return="java.lang.CharSequence"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="packageName" type="java.lang.String">
+</parameter>
+<parameter name="resid" type="int">
+</parameter>
+<parameter name="appInfo" type="android.content.pm.ApplicationInfo">
+</parameter>
+</method>
+<method name="getXml"
+ return="android.content.res.XmlResourceParser"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="packageName" type="java.lang.String">
+</parameter>
+<parameter name="resid" type="int">
+</parameter>
+<parameter name="appInfo" type="android.content.pm.ApplicationInfo">
+</parameter>
+</method>
+<method name="hasSystemFeature"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+</method>
+<method name="isSafeMode"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="queryBroadcastReceivers"
+ return="java.util.List&lt;android.content.pm.ResolveInfo&gt;"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="intent" type="android.content.Intent">
+</parameter>
+<parameter name="flags" type="int">
+</parameter>
+</method>
+<method name="queryContentProviders"
+ return="java.util.List&lt;android.content.pm.ProviderInfo&gt;"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="processName" type="java.lang.String">
+</parameter>
+<parameter name="uid" type="int">
+</parameter>
+<parameter name="flags" type="int">
+</parameter>
+</method>
+<method name="queryInstrumentation"
+ return="java.util.List&lt;android.content.pm.InstrumentationInfo&gt;"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="targetPackage" type="java.lang.String">
+</parameter>
+<parameter name="flags" type="int">
+</parameter>
+</method>
+<method name="queryIntentActivities"
+ return="java.util.List&lt;android.content.pm.ResolveInfo&gt;"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="intent" type="android.content.Intent">
+</parameter>
+<parameter name="flags" type="int">
+</parameter>
+</method>
+<method name="queryIntentActivityOptions"
+ return="java.util.List&lt;android.content.pm.ResolveInfo&gt;"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="caller" type="android.content.ComponentName">
+</parameter>
+<parameter name="specifics" type="android.content.Intent[]">
+</parameter>
+<parameter name="intent" type="android.content.Intent">
+</parameter>
+<parameter name="flags" type="int">
+</parameter>
+</method>
+<method name="queryIntentServices"
+ return="java.util.List&lt;android.content.pm.ResolveInfo&gt;"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="intent" type="android.content.Intent">
+</parameter>
+<parameter name="flags" type="int">
+</parameter>
+</method>
+<method name="queryPermissionsByGroup"
+ return="java.util.List&lt;android.content.pm.PermissionInfo&gt;"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="group" type="java.lang.String">
+</parameter>
+<parameter name="flags" type="int">
+</parameter>
+<exception name="PackageManager.NameNotFoundException" type="android.content.pm.PackageManager.NameNotFoundException">
+</exception>
+</method>
+<method name="removePackageFromPreferred"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="packageName" type="java.lang.String">
+</parameter>
+</method>
+<method name="removePermission"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+</method>
+<method name="resolveActivity"
+ return="android.content.pm.ResolveInfo"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="intent" type="android.content.Intent">
+</parameter>
+<parameter name="flags" type="int">
+</parameter>
+</method>
+<method name="resolveContentProvider"
+ return="android.content.pm.ProviderInfo"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+<parameter name="flags" type="int">
+</parameter>
+</method>
+<method name="resolveService"
+ return="android.content.pm.ResolveInfo"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="intent" type="android.content.Intent">
+</parameter>
+<parameter name="flags" type="int">
+</parameter>
+</method>
+<method name="setApplicationEnabledSetting"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="packageName" type="java.lang.String">
+</parameter>
+<parameter name="newState" type="int">
+</parameter>
+<parameter name="flags" type="int">
+</parameter>
+</method>
+<method name="setComponentEnabledSetting"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="componentName" type="android.content.ComponentName">
+</parameter>
+<parameter name="newState" type="int">
+</parameter>
+<parameter name="flags" type="int">
+</parameter>
+</method>
+</class>
+<class name="MockResources"
+ extends="android.content.res.Resources"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="MockResources"
+ type="android.test.mock.MockResources"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+</class>
+</package>
+<package name="android.test.suitebuilder"
+>
+<class name="TestMethod"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="TestMethod"
+ type="android.test.suitebuilder.TestMethod"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="method" type="java.lang.reflect.Method">
+</parameter>
+<parameter name="enclosingClass" type="java.lang.Class&lt;? extends junit.framework.TestCase&gt;">
+</parameter>
+</constructor>
+<constructor name="TestMethod"
+ type="android.test.suitebuilder.TestMethod"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="methodName" type="java.lang.String">
+</parameter>
+<parameter name="enclosingClass" type="java.lang.Class&lt;? extends junit.framework.TestCase&gt;">
+</parameter>
+</constructor>
+<constructor name="TestMethod"
+ type="android.test.suitebuilder.TestMethod"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="testCase" type="junit.framework.TestCase">
+</parameter>
+</constructor>
+<method name="createTest"
+ return="junit.framework.TestCase"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="IllegalAccessException" type="java.lang.IllegalAccessException">
+</exception>
+<exception name="InstantiationException" type="java.lang.InstantiationException">
+</exception>
+<exception name="InvocationTargetException" type="java.lang.reflect.InvocationTargetException">
+</exception>
+</method>
+<method name="getAnnotation"
+ return="T"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="annotationClass" type="java.lang.Class&lt;T&gt;">
+</parameter>
+</method>
+<method name="getEnclosingClass"
+ return="java.lang.Class&lt;? extends junit.framework.TestCase&gt;"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getEnclosingClassname"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getName"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+</class>
+<class name="TestSuiteBuilder"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="TestSuiteBuilder"
+ type="android.test.suitebuilder.TestSuiteBuilder"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="clazz" type="java.lang.Class">
+</parameter>
+</constructor>
+<constructor name="TestSuiteBuilder"
+ type="android.test.suitebuilder.TestSuiteBuilder"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+<parameter name="classLoader" type="java.lang.ClassLoader">
+</parameter>
+</constructor>
+<method name="addRequirements"
+ return="android.test.suitebuilder.TestSuiteBuilder"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="predicates" type="java.util.List&lt;com.android.internal.util.Predicate&lt;android.test.suitebuilder.TestMethod&gt;&gt;">
+</parameter>
+</method>
+<method name="addRequirements"
+ return="android.test.suitebuilder.TestSuiteBuilder"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="predicates" type="com.android.internal.util.Predicate&lt;android.test.suitebuilder.TestMethod&gt;...">
+</parameter>
+</method>
+<method name="build"
+ return="junit.framework.TestSuite"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="excludePackages"
+ return="android.test.suitebuilder.TestSuiteBuilder"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="packageNames" type="java.lang.String...">
+</parameter>
+</method>
+<method name="getSuiteName"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</method>
+<method name="includeAllPackagesUnderHere"
+ return="android.test.suitebuilder.TestSuiteBuilder"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="includePackages"
+ return="android.test.suitebuilder.TestSuiteBuilder"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="packageNames" type="java.lang.String...">
+</parameter>
+</method>
+<method name="named"
+ return="android.test.suitebuilder.TestSuiteBuilder"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="newSuiteName" type="java.lang.String">
+</parameter>
+</method>
+</class>
+<class name="TestSuiteBuilder.FailedToCreateTests"
+ extends="junit.framework.TestCase"
+ abstract="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="TestSuiteBuilder.FailedToCreateTests"
+ type="android.test.suitebuilder.TestSuiteBuilder.FailedToCreateTests"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="exception" type="java.lang.Exception">
+</parameter>
+</constructor>
+<method name="testSuiteConstructionFailed"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+</class>
+</package>
+<package name="android.test.suitebuilder.annotation"
+>
+<class name="LargeTest"
+ extends="java.lang.Object"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="java.lang.annotation.Annotation">
+</implements>
+</class>
+<class name="MediumTest"
+ extends="java.lang.Object"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="java.lang.annotation.Annotation">
+</implements>
+</class>
+<class name="SmallTest"
+ extends="java.lang.Object"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="java.lang.annotation.Annotation">
+</implements>
+</class>
+<class name="Smoke"
+ extends="java.lang.Object"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="java.lang.annotation.Annotation">
+</implements>
+</class>
+<class name="Suppress"
+ extends="java.lang.Object"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="java.lang.annotation.Annotation">
+</implements>
+</class>
+</package>
+<package name="android.text"
+>
+<class name="AlteredCharSequence"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="java.lang.CharSequence">
+</implements>
+<implements name="android.text.GetChars">
+</implements>
+<method name="charAt"
+ return="char"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="off" type="int">
+</parameter>
+</method>
+<method name="getChars"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="start" type="int">
+</parameter>
+<parameter name="end" type="int">
+</parameter>
+<parameter name="dest" type="char[]">
+</parameter>
+<parameter name="off" type="int">
+</parameter>
+</method>
+<method name="length"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="make"
+ return="android.text.AlteredCharSequence"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="source" type="java.lang.CharSequence">
+</parameter>
+<parameter name="sub" type="char[]">
+</parameter>
+<parameter name="substart" type="int">
+</parameter>
+<parameter name="subend" type="int">
+</parameter>
+</method>
+<method name="subSequence"
+ return="java.lang.CharSequence"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="start" type="int">
+</parameter>
+<parameter name="end" type="int">
+</parameter>
+</method>
+</class>
+<class name="AndroidCharacter"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="AndroidCharacter"
+ type="android.text.AndroidCharacter"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<method name="getDirectionalities"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="src" type="char[]">
+</parameter>
+<parameter name="dest" type="byte[]">
+</parameter>
+<parameter name="count" type="int">
+</parameter>
+</method>
+<method name="getEastAsianWidth"
+ return="int"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="input" type="char">
+</parameter>
+</method>
+<method name="getEastAsianWidths"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="src" type="char[]">
+</parameter>
+<parameter name="start" type="int">
+</parameter>
+<parameter name="count" type="int">
+</parameter>
+<parameter name="dest" type="byte[]">
+</parameter>
+</method>
+<method name="getMirror"
+ return="char"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="ch" type="char">
+</parameter>
+</method>
+<method name="mirror"
+ return="boolean"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="text" type="char[]">
+</parameter>
+<parameter name="start" type="int">
+</parameter>
+<parameter name="count" type="int">
+</parameter>
+</method>
+<field name="EAST_ASIAN_WIDTH_AMBIGUOUS"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="EAST_ASIAN_WIDTH_FULL_WIDTH"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="3"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="EAST_ASIAN_WIDTH_HALF_WIDTH"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="EAST_ASIAN_WIDTH_NARROW"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="4"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="EAST_ASIAN_WIDTH_NEUTRAL"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="0"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="EAST_ASIAN_WIDTH_WIDE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="5"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<class name="Annotation"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="android.text.ParcelableSpan">
+</implements>
+<constructor name="Annotation"
+ type="android.text.Annotation"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="key" type="java.lang.String">
+</parameter>
+<parameter name="value" type="java.lang.String">
+</parameter>
+</constructor>
+<constructor name="Annotation"
+ type="android.text.Annotation"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="src" type="android.os.Parcel">
+</parameter>
+</constructor>
+<method name="describeContents"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getKey"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getSpanTypeId"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getValue"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="writeToParcel"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="dest" type="android.os.Parcel">
+</parameter>
+<parameter name="flags" type="int">
+</parameter>
+</method>
+</class>
+<class name="AutoText"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="get"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="src" type="java.lang.CharSequence">
+</parameter>
+<parameter name="start" type="int">
+</parameter>
+<parameter name="end" type="int">
+</parameter>
+<parameter name="view" type="android.view.View">
+</parameter>
+</method>
+<method name="getSize"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="view" type="android.view.View">
+</parameter>
+</method>
+</class>
+<class name="BoringLayout"
+ extends="android.text.Layout"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="android.text.TextUtils.EllipsizeCallback">
+</implements>
+<constructor name="BoringLayout"
+ type="android.text.BoringLayout"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="source" type="java.lang.CharSequence">
+</parameter>
+<parameter name="paint" type="android.text.TextPaint">
+</parameter>
+<parameter name="outerwidth" type="int">
+</parameter>
+<parameter name="align" type="android.text.Layout.Alignment">
+</parameter>
+<parameter name="spacingmult" type="float">
+</parameter>
+<parameter name="spacingadd" type="float">
+</parameter>
+<parameter name="metrics" type="android.text.BoringLayout.Metrics">
+</parameter>
+<parameter name="includepad" type="boolean">
+</parameter>
+</constructor>
+<constructor name="BoringLayout"
+ type="android.text.BoringLayout"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="source" type="java.lang.CharSequence">
+</parameter>
+<parameter name="paint" type="android.text.TextPaint">
+</parameter>
+<parameter name="outerwidth" type="int">
+</parameter>
+<parameter name="align" type="android.text.Layout.Alignment">
+</parameter>
+<parameter name="spacingmult" type="float">
+</parameter>
+<parameter name="spacingadd" type="float">
+</parameter>
+<parameter name="metrics" type="android.text.BoringLayout.Metrics">
+</parameter>
+<parameter name="includepad" type="boolean">
+</parameter>
+<parameter name="ellipsize" type="android.text.TextUtils.TruncateAt">
+</parameter>
+<parameter name="ellipsizedWidth" type="int">
+</parameter>
+</constructor>
+<method name="ellipsized"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="start" type="int">
+</parameter>
+<parameter name="end" type="int">
+</parameter>
+</method>
+<method name="getBottomPadding"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getEllipsisCount"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="line" type="int">
+</parameter>
+</method>
+<method name="getEllipsisStart"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="line" type="int">
+</parameter>
+</method>
+<method name="getLineContainsTab"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="line" type="int">
+</parameter>
+</method>
+<method name="getLineCount"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getLineDescent"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="line" type="int">
+</parameter>
+</method>
+<method name="getLineDirections"
+ return="android.text.Layout.Directions"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="line" type="int">
+</parameter>
+</method>
+<method name="getLineStart"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="line" type="int">
+</parameter>
+</method>
+<method name="getLineTop"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="line" type="int">
+</parameter>
+</method>
+<method name="getParagraphDirection"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="line" type="int">
+</parameter>
+</method>
+<method name="getTopPadding"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isBoring"
+ return="android.text.BoringLayout.Metrics"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="text" type="java.lang.CharSequence">
+</parameter>
+<parameter name="paint" type="android.text.TextPaint">
+</parameter>
+</method>
+<method name="isBoring"
+ return="android.text.BoringLayout.Metrics"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="text" type="java.lang.CharSequence">
+</parameter>
+<parameter name="paint" type="android.text.TextPaint">
+</parameter>
+<parameter name="metrics" type="android.text.BoringLayout.Metrics">
+</parameter>
+</method>
+<method name="make"
+ return="android.text.BoringLayout"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="source" type="java.lang.CharSequence">
+</parameter>
+<parameter name="paint" type="android.text.TextPaint">
+</parameter>
+<parameter name="outerwidth" type="int">
+</parameter>
+<parameter name="align" type="android.text.Layout.Alignment">
+</parameter>
+<parameter name="spacingmult" type="float">
+</parameter>
+<parameter name="spacingadd" type="float">
+</parameter>
+<parameter name="metrics" type="android.text.BoringLayout.Metrics">
+</parameter>
+<parameter name="includepad" type="boolean">
+</parameter>
+</method>
+<method name="make"
+ return="android.text.BoringLayout"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="source" type="java.lang.CharSequence">
+</parameter>
+<parameter name="paint" type="android.text.TextPaint">
+</parameter>
+<parameter name="outerwidth" type="int">
+</parameter>
+<parameter name="align" type="android.text.Layout.Alignment">
+</parameter>
+<parameter name="spacingmult" type="float">
+</parameter>
+<parameter name="spacingadd" type="float">
+</parameter>
+<parameter name="metrics" type="android.text.BoringLayout.Metrics">
+</parameter>
+<parameter name="includepad" type="boolean">
+</parameter>
+<parameter name="ellipsize" type="android.text.TextUtils.TruncateAt">
+</parameter>
+<parameter name="ellipsizedWidth" type="int">
+</parameter>
+</method>
+<method name="replaceOrMake"
+ return="android.text.BoringLayout"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="source" type="java.lang.CharSequence">
+</parameter>
+<parameter name="paint" type="android.text.TextPaint">
+</parameter>
+<parameter name="outerwidth" type="int">
+</parameter>
+<parameter name="align" type="android.text.Layout.Alignment">
+</parameter>
+<parameter name="spacingmult" type="float">
+</parameter>
+<parameter name="spacingadd" type="float">
+</parameter>
+<parameter name="metrics" type="android.text.BoringLayout.Metrics">
+</parameter>
+<parameter name="includepad" type="boolean">
+</parameter>
+</method>
+<method name="replaceOrMake"
+ return="android.text.BoringLayout"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="source" type="java.lang.CharSequence">
+</parameter>
+<parameter name="paint" type="android.text.TextPaint">
+</parameter>
+<parameter name="outerwidth" type="int">
+</parameter>
+<parameter name="align" type="android.text.Layout.Alignment">
+</parameter>
+<parameter name="spacingmult" type="float">
+</parameter>
+<parameter name="spacingadd" type="float">
+</parameter>
+<parameter name="metrics" type="android.text.BoringLayout.Metrics">
+</parameter>
+<parameter name="includepad" type="boolean">
+</parameter>
+<parameter name="ellipsize" type="android.text.TextUtils.TruncateAt">
+</parameter>
+<parameter name="ellipsizedWidth" type="int">
+</parameter>
+</method>
+</class>
+<class name="BoringLayout.Metrics"
+ extends="android.graphics.Paint.FontMetricsInt"
+ abstract="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="BoringLayout.Metrics"
+ type="android.text.BoringLayout.Metrics"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<field name="width"
+ type="int"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<class name="ClipboardManager"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="getText"
+ return="java.lang.CharSequence"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="hasText"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="setText"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="text" type="java.lang.CharSequence">
+</parameter>
+</method>
+</class>
+<class name="DynamicLayout"
+ extends="android.text.Layout"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="DynamicLayout"
+ type="android.text.DynamicLayout"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="base" type="java.lang.CharSequence">
+</parameter>
+<parameter name="paint" type="android.text.TextPaint">
+</parameter>
+<parameter name="width" type="int">
+</parameter>
+<parameter name="align" type="android.text.Layout.Alignment">
+</parameter>
+<parameter name="spacingmult" type="float">
+</parameter>
+<parameter name="spacingadd" type="float">
+</parameter>
+<parameter name="includepad" type="boolean">
+</parameter>
+</constructor>
+<constructor name="DynamicLayout"
+ type="android.text.DynamicLayout"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="base" type="java.lang.CharSequence">
+</parameter>
+<parameter name="display" type="java.lang.CharSequence">
+</parameter>
+<parameter name="paint" type="android.text.TextPaint">
+</parameter>
+<parameter name="width" type="int">
+</parameter>
+<parameter name="align" type="android.text.Layout.Alignment">
+</parameter>
+<parameter name="spacingmult" type="float">
+</parameter>
+<parameter name="spacingadd" type="float">
+</parameter>
+<parameter name="includepad" type="boolean">
+</parameter>
+</constructor>
+<constructor name="DynamicLayout"
+ type="android.text.DynamicLayout"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="base" type="java.lang.CharSequence">
+</parameter>
+<parameter name="display" type="java.lang.CharSequence">
+</parameter>
+<parameter name="paint" type="android.text.TextPaint">
+</parameter>
+<parameter name="width" type="int">
+</parameter>
+<parameter name="align" type="android.text.Layout.Alignment">
+</parameter>
+<parameter name="spacingmult" type="float">
+</parameter>
+<parameter name="spacingadd" type="float">
+</parameter>
+<parameter name="includepad" type="boolean">
+</parameter>
+<parameter name="ellipsize" type="android.text.TextUtils.TruncateAt">
+</parameter>
+<parameter name="ellipsizedWidth" type="int">
+</parameter>
+</constructor>
+<method name="getBottomPadding"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getEllipsisCount"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="line" type="int">
+</parameter>
+</method>
+<method name="getEllipsisStart"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="line" type="int">
+</parameter>
+</method>
+<method name="getLineContainsTab"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="line" type="int">
+</parameter>
+</method>
+<method name="getLineCount"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getLineDescent"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="line" type="int">
+</parameter>
+</method>
+<method name="getLineDirections"
+ return="android.text.Layout.Directions"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="line" type="int">
+</parameter>
+</method>
+<method name="getLineStart"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="line" type="int">
+</parameter>
+</method>
+<method name="getLineTop"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="line" type="int">
+</parameter>
+</method>
+<method name="getParagraphDirection"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="line" type="int">
+</parameter>
+</method>
+<method name="getTopPadding"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+</class>
+<interface name="Editable"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="java.lang.Appendable">
+</implements>
+<implements name="java.lang.CharSequence">
+</implements>
+<implements name="android.text.GetChars">
+</implements>
+<implements name="android.text.Spannable">
+</implements>
+<method name="append"
+ return="android.text.Editable"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="text" type="java.lang.CharSequence">
+</parameter>
+</method>
+<method name="append"
+ return="android.text.Editable"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="text" type="java.lang.CharSequence">
+</parameter>
+<parameter name="start" type="int">
+</parameter>
+<parameter name="end" type="int">
+</parameter>
+</method>
+<method name="append"
+ return="android.text.Editable"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="text" type="char">
+</parameter>
+</method>
+<method name="clear"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="clearSpans"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="delete"
+ return="android.text.Editable"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="st" type="int">
+</parameter>
+<parameter name="en" type="int">
+</parameter>
+</method>
+<method name="getFilters"
+ return="android.text.InputFilter[]"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="insert"
+ return="android.text.Editable"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="where" type="int">
+</parameter>
+<parameter name="text" type="java.lang.CharSequence">
+</parameter>
+<parameter name="start" type="int">
+</parameter>
+<parameter name="end" type="int">
+</parameter>
+</method>
+<method name="insert"
+ return="android.text.Editable"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="where" type="int">
+</parameter>
+<parameter name="text" type="java.lang.CharSequence">
+</parameter>
+</method>
+<method name="replace"
+ return="android.text.Editable"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="st" type="int">
+</parameter>
+<parameter name="en" type="int">
+</parameter>
+<parameter name="source" type="java.lang.CharSequence">
+</parameter>
+<parameter name="start" type="int">
+</parameter>
+<parameter name="end" type="int">
+</parameter>
+</method>
+<method name="replace"
+ return="android.text.Editable"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="st" type="int">
+</parameter>
+<parameter name="en" type="int">
+</parameter>
+<parameter name="text" type="java.lang.CharSequence">
+</parameter>
+</method>
+<method name="setFilters"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="filters" type="android.text.InputFilter[]">
+</parameter>
+</method>
+</interface>
+<class name="Editable.Factory"
+ extends="java.lang.Object"
+ abstract="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="Editable.Factory"
+ type="android.text.Editable.Factory"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<method name="getInstance"
+ return="android.text.Editable.Factory"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="newEditable"
+ return="android.text.Editable"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="source" type="java.lang.CharSequence">
+</parameter>
+</method>
+</class>
+<interface name="GetChars"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="java.lang.CharSequence">
+</implements>
+<method name="getChars"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="start" type="int">
+</parameter>
+<parameter name="end" type="int">
+</parameter>
+<parameter name="dest" type="char[]">
+</parameter>
+<parameter name="destoff" type="int">
+</parameter>
+</method>
+</interface>
+<class name="Html"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="fromHtml"
+ return="android.text.Spanned"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="source" type="java.lang.String">
+</parameter>
+</method>
+<method name="fromHtml"
+ return="android.text.Spanned"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="source" type="java.lang.String">
+</parameter>
+<parameter name="imageGetter" type="android.text.Html.ImageGetter">
+</parameter>
+<parameter name="tagHandler" type="android.text.Html.TagHandler">
+</parameter>
+</method>
+<method name="toHtml"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="text" type="android.text.Spanned">
+</parameter>
+</method>
+</class>
+<interface name="Html.ImageGetter"
+ abstract="true"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="getDrawable"
+ return="android.graphics.drawable.Drawable"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="source" type="java.lang.String">
+</parameter>
+</method>
+</interface>
+<interface name="Html.TagHandler"
+ abstract="true"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="handleTag"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="opening" type="boolean">
+</parameter>
+<parameter name="tag" type="java.lang.String">
+</parameter>
+<parameter name="output" type="android.text.Editable">
+</parameter>
+<parameter name="xmlReader" type="org.xml.sax.XMLReader">
+</parameter>
+</method>
+</interface>
+<interface name="InputFilter"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="filter"
+ return="java.lang.CharSequence"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="source" type="java.lang.CharSequence">
+</parameter>
+<parameter name="start" type="int">
+</parameter>
+<parameter name="end" type="int">
+</parameter>
+<parameter name="dest" type="android.text.Spanned">
+</parameter>
+<parameter name="dstart" type="int">
+</parameter>
+<parameter name="dend" type="int">
+</parameter>
+</method>
+</interface>
+<class name="InputFilter.AllCaps"
+ extends="java.lang.Object"
+ abstract="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="android.text.InputFilter">
+</implements>
+<constructor name="InputFilter.AllCaps"
+ type="android.text.InputFilter.AllCaps"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<method name="filter"
+ return="java.lang.CharSequence"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="source" type="java.lang.CharSequence">
+</parameter>
+<parameter name="start" type="int">
+</parameter>
+<parameter name="end" type="int">
+</parameter>
+<parameter name="dest" type="android.text.Spanned">
+</parameter>
+<parameter name="dstart" type="int">
+</parameter>
+<parameter name="dend" type="int">
+</parameter>
+</method>
+</class>
+<class name="InputFilter.LengthFilter"
+ extends="java.lang.Object"
+ abstract="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="android.text.InputFilter">
+</implements>
+<constructor name="InputFilter.LengthFilter"
+ type="android.text.InputFilter.LengthFilter"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="max" type="int">
+</parameter>
+</constructor>
+<method name="filter"
+ return="java.lang.CharSequence"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="source" type="java.lang.CharSequence">
+</parameter>
+<parameter name="start" type="int">
+</parameter>
+<parameter name="end" type="int">
+</parameter>
+<parameter name="dest" type="android.text.Spanned">
+</parameter>
+<parameter name="dstart" type="int">
+</parameter>
+<parameter name="dend" type="int">
+</parameter>
+</method>
+</class>
+<interface name="InputType"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<field name="TYPE_CLASS_DATETIME"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="4"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TYPE_CLASS_NUMBER"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TYPE_CLASS_PHONE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="3"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TYPE_CLASS_TEXT"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TYPE_DATETIME_VARIATION_DATE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TYPE_DATETIME_VARIATION_NORMAL"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="0"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TYPE_DATETIME_VARIATION_TIME"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="32"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TYPE_MASK_CLASS"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="15"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TYPE_MASK_FLAGS"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16773120"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TYPE_MASK_VARIATION"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="4080"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TYPE_NULL"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="0"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TYPE_NUMBER_FLAG_DECIMAL"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="8192"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TYPE_NUMBER_FLAG_SIGNED"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="4096"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TYPE_TEXT_FLAG_AUTO_COMPLETE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="65536"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TYPE_TEXT_FLAG_AUTO_CORRECT"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="32768"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TYPE_TEXT_FLAG_CAP_CHARACTERS"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="4096"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TYPE_TEXT_FLAG_CAP_SENTENCES"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16384"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TYPE_TEXT_FLAG_CAP_WORDS"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="8192"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TYPE_TEXT_FLAG_IME_MULTI_LINE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="262144"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TYPE_TEXT_FLAG_MULTI_LINE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="131072"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TYPE_TEXT_FLAG_NO_SUGGESTIONS"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="524288"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TYPE_TEXT_VARIATION_EMAIL_ADDRESS"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="32"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TYPE_TEXT_VARIATION_EMAIL_SUBJECT"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="48"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TYPE_TEXT_VARIATION_FILTER"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="176"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TYPE_TEXT_VARIATION_LONG_MESSAGE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="80"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TYPE_TEXT_VARIATION_NORMAL"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="0"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TYPE_TEXT_VARIATION_PASSWORD"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="128"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TYPE_TEXT_VARIATION_PERSON_NAME"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="96"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TYPE_TEXT_VARIATION_PHONETIC"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="192"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TYPE_TEXT_VARIATION_POSTAL_ADDRESS"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="112"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TYPE_TEXT_VARIATION_SHORT_MESSAGE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="64"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TYPE_TEXT_VARIATION_URI"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TYPE_TEXT_VARIATION_VISIBLE_PASSWORD"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="144"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TYPE_TEXT_VARIATION_WEB_EDIT_TEXT"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="160"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</interface>
+<class name="Layout"
+ extends="java.lang.Object"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="Layout"
+ type="android.text.Layout"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="text" type="java.lang.CharSequence">
+</parameter>
+<parameter name="paint" type="android.text.TextPaint">
+</parameter>
+<parameter name="width" type="int">
+</parameter>
+<parameter name="align" type="android.text.Layout.Alignment">
+</parameter>
+<parameter name="spacingMult" type="float">
+</parameter>
+<parameter name="spacingAdd" type="float">
+</parameter>
+</constructor>
+<method name="draw"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="c" type="android.graphics.Canvas">
+</parameter>
+</method>
+<method name="draw"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="c" type="android.graphics.Canvas">
+</parameter>
+<parameter name="highlight" type="android.graphics.Path">
+</parameter>
+<parameter name="highlightPaint" type="android.graphics.Paint">
+</parameter>
+<parameter name="cursorOffsetVertical" type="int">
+</parameter>
+</method>
+<method name="getAlignment"
+ return="android.text.Layout.Alignment"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getBottomPadding"
+ return="int"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getCursorPath"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="point" type="int">
+</parameter>
+<parameter name="dest" type="android.graphics.Path">
+</parameter>
+<parameter name="editingBuffer" type="java.lang.CharSequence">
+</parameter>
+</method>
+<method name="getDesiredWidth"
+ return="float"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="source" type="java.lang.CharSequence">
+</parameter>
+<parameter name="paint" type="android.text.TextPaint">
+</parameter>
+</method>
+<method name="getDesiredWidth"
+ return="float"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="source" type="java.lang.CharSequence">
+</parameter>
+<parameter name="start" type="int">
+</parameter>
+<parameter name="end" type="int">
+</parameter>
+<parameter name="paint" type="android.text.TextPaint">
+</parameter>
+</method>
+<method name="getEllipsisCount"
+ return="int"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="line" type="int">
+</parameter>
+</method>
+<method name="getEllipsisStart"
+ return="int"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="line" type="int">
+</parameter>
+</method>
+<method name="getEllipsizedWidth"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getHeight"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getLineAscent"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="line" type="int">
+</parameter>
+</method>
+<method name="getLineBaseline"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="line" type="int">
+</parameter>
+</method>
+<method name="getLineBottom"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="line" type="int">
+</parameter>
+</method>
+<method name="getLineBounds"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="line" type="int">
+</parameter>
+<parameter name="bounds" type="android.graphics.Rect">
+</parameter>
+</method>
+<method name="getLineContainsTab"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="line" type="int">
+</parameter>
+</method>
+<method name="getLineCount"
+ return="int"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getLineDescent"
+ return="int"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="line" type="int">
+</parameter>
+</method>
+<method name="getLineDirections"
+ return="android.text.Layout.Directions"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="line" type="int">
+</parameter>
+</method>
+<method name="getLineEnd"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="line" type="int">
+</parameter>
+</method>
+<method name="getLineForOffset"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="offset" type="int">
+</parameter>
+</method>
+<method name="getLineForVertical"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="vertical" type="int">
+</parameter>
+</method>
+<method name="getLineLeft"
+ return="float"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="line" type="int">
+</parameter>
+</method>
+<method name="getLineMax"
+ return="float"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="line" type="int">
+</parameter>
+</method>
+<method name="getLineRight"
+ return="float"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="line" type="int">
+</parameter>
+</method>
+<method name="getLineStart"
+ return="int"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="line" type="int">
+</parameter>
+</method>
+<method name="getLineTop"
+ return="int"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="line" type="int">
+</parameter>
+</method>
+<method name="getLineVisibleEnd"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="line" type="int">
+</parameter>
+</method>
+<method name="getLineWidth"
+ return="float"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="line" type="int">
+</parameter>
+</method>
+<method name="getOffsetForHorizontal"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="line" type="int">
+</parameter>
+<parameter name="horiz" type="float">
+</parameter>
+</method>
+<method name="getOffsetToLeftOf"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="offset" type="int">
+</parameter>
+</method>
+<method name="getOffsetToRightOf"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="offset" type="int">
+</parameter>
+</method>
+<method name="getPaint"
+ return="android.text.TextPaint"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getParagraphAlignment"
+ return="android.text.Layout.Alignment"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="line" type="int">
+</parameter>
+</method>
+<method name="getParagraphDirection"
+ return="int"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="line" type="int">
+</parameter>
+</method>
+<method name="getParagraphLeft"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="line" type="int">
+</parameter>
+</method>
+<method name="getParagraphRight"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="line" type="int">
+</parameter>
+</method>
+<method name="getPrimaryHorizontal"
+ return="float"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="offset" type="int">
+</parameter>
+</method>
+<method name="getSecondaryHorizontal"
+ return="float"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="offset" type="int">
+</parameter>
+</method>
+<method name="getSelectionPath"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="start" type="int">
+</parameter>
+<parameter name="end" type="int">
+</parameter>
+<parameter name="dest" type="android.graphics.Path">
+</parameter>
+</method>
+<method name="getSpacingAdd"
+ return="float"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getSpacingMultiplier"
+ return="float"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getText"
+ return="java.lang.CharSequence"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getTopPadding"
+ return="int"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getWidth"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="increaseWidthTo"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="wid" type="int">
+</parameter>
+</method>
+<method name="isSpanned"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</method>
+<field name="DIR_LEFT_TO_RIGHT"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="DIR_RIGHT_TO_LEFT"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="-1"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<class name="Layout.Alignment"
+ extends="java.lang.Enum"
+ abstract="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="valueOf"
+ return="android.text.Layout.Alignment"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+</method>
+<method name="values"
+ return="android.text.Layout.Alignment[]"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+</class>
+<class name="Layout.Directions"
+ extends="java.lang.Object"
+ abstract="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</class>
+<class name="LoginFilter"
+ extends="java.lang.Object"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="android.text.InputFilter">
+</implements>
+<method name="filter"
+ return="java.lang.CharSequence"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="source" type="java.lang.CharSequence">
+</parameter>
+<parameter name="start" type="int">
+</parameter>
+<parameter name="end" type="int">
+</parameter>
+<parameter name="dest" type="android.text.Spanned">
+</parameter>
+<parameter name="dstart" type="int">
+</parameter>
+<parameter name="dend" type="int">
+</parameter>
+</method>
+<method name="isAllowed"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="c" type="char">
+</parameter>
+</method>
+<method name="onInvalidCharacter"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="c" type="char">
+</parameter>
+</method>
+<method name="onStart"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="onStop"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+</class>
+<class name="LoginFilter.PasswordFilterGMail"
+ extends="android.text.LoginFilter"
+ abstract="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="LoginFilter.PasswordFilterGMail"
+ type="android.text.LoginFilter.PasswordFilterGMail"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<constructor name="LoginFilter.PasswordFilterGMail"
+ type="android.text.LoginFilter.PasswordFilterGMail"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="appendInvalid" type="boolean">
+</parameter>
+</constructor>
+<method name="isAllowed"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="c" type="char">
+</parameter>
+</method>
+</class>
+<class name="LoginFilter.UsernameFilterGMail"
+ extends="android.text.LoginFilter"
+ abstract="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="LoginFilter.UsernameFilterGMail"
+ type="android.text.LoginFilter.UsernameFilterGMail"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<constructor name="LoginFilter.UsernameFilterGMail"
+ type="android.text.LoginFilter.UsernameFilterGMail"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="appendInvalid" type="boolean">
+</parameter>
+</constructor>
+<method name="isAllowed"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="c" type="char">
+</parameter>
+</method>
+</class>
+<class name="LoginFilter.UsernameFilterGeneric"
+ extends="android.text.LoginFilter"
+ abstract="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="LoginFilter.UsernameFilterGeneric"
+ type="android.text.LoginFilter.UsernameFilterGeneric"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<constructor name="LoginFilter.UsernameFilterGeneric"
+ type="android.text.LoginFilter.UsernameFilterGeneric"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="appendInvalid" type="boolean">
+</parameter>
+</constructor>
+<method name="isAllowed"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="c" type="char">
+</parameter>
+</method>
+</class>
+<interface name="NoCopySpan"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</interface>
+<class name="NoCopySpan.Concrete"
+ extends="java.lang.Object"
+ abstract="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="android.text.NoCopySpan">
+</implements>
+<constructor name="NoCopySpan.Concrete"
+ type="android.text.NoCopySpan.Concrete"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+</class>
+<interface name="ParcelableSpan"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="android.os.Parcelable">
+</implements>
+<method name="getSpanTypeId"
+ return="int"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+</interface>
+<class name="Selection"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="extendDown"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="text" type="android.text.Spannable">
+</parameter>
+<parameter name="layout" type="android.text.Layout">
+</parameter>
+</method>
+<method name="extendLeft"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="text" type="android.text.Spannable">
+</parameter>
+<parameter name="layout" type="android.text.Layout">
+</parameter>
+</method>
+<method name="extendRight"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="text" type="android.text.Spannable">
+</parameter>
+<parameter name="layout" type="android.text.Layout">
+</parameter>
+</method>
+<method name="extendSelection"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="text" type="android.text.Spannable">
+</parameter>
+<parameter name="index" type="int">
+</parameter>
+</method>
+<method name="extendToLeftEdge"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="text" type="android.text.Spannable">
+</parameter>
+<parameter name="layout" type="android.text.Layout">
+</parameter>
+</method>
+<method name="extendToRightEdge"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="text" type="android.text.Spannable">
+</parameter>
+<parameter name="layout" type="android.text.Layout">
+</parameter>
+</method>
+<method name="extendUp"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="text" type="android.text.Spannable">
+</parameter>
+<parameter name="layout" type="android.text.Layout">
+</parameter>
+</method>
+<method name="getSelectionEnd"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="text" type="java.lang.CharSequence">
+</parameter>
+</method>
+<method name="getSelectionStart"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="text" type="java.lang.CharSequence">
+</parameter>
+</method>
+<method name="moveDown"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="text" type="android.text.Spannable">
+</parameter>
+<parameter name="layout" type="android.text.Layout">
+</parameter>
+</method>
+<method name="moveLeft"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="text" type="android.text.Spannable">
+</parameter>
+<parameter name="layout" type="android.text.Layout">
+</parameter>
+</method>
+<method name="moveRight"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="text" type="android.text.Spannable">
+</parameter>
+<parameter name="layout" type="android.text.Layout">
+</parameter>
+</method>
+<method name="moveToLeftEdge"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="text" type="android.text.Spannable">
+</parameter>
+<parameter name="layout" type="android.text.Layout">
+</parameter>
+</method>
+<method name="moveToRightEdge"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="text" type="android.text.Spannable">
+</parameter>
+<parameter name="layout" type="android.text.Layout">
+</parameter>
+</method>
+<method name="moveUp"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="text" type="android.text.Spannable">
+</parameter>
+<parameter name="layout" type="android.text.Layout">
+</parameter>
+</method>
+<method name="removeSelection"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="text" type="android.text.Spannable">
+</parameter>
+</method>
+<method name="selectAll"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="text" type="android.text.Spannable">
+</parameter>
+</method>
+<method name="setSelection"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="text" type="android.text.Spannable">
+</parameter>
+<parameter name="start" type="int">
+</parameter>
+<parameter name="stop" type="int">
+</parameter>
+</method>
+<method name="setSelection"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="text" type="android.text.Spannable">
+</parameter>
+<parameter name="index" type="int">
+</parameter>
+</method>
+<field name="SELECTION_END"
+ type="java.lang.Object"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="SELECTION_START"
+ type="java.lang.Object"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<interface name="SpanWatcher"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="android.text.NoCopySpan">
+</implements>
+<method name="onSpanAdded"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="text" type="android.text.Spannable">
+</parameter>
+<parameter name="what" type="java.lang.Object">
+</parameter>
+<parameter name="start" type="int">
+</parameter>
+<parameter name="end" type="int">
+</parameter>
+</method>
+<method name="onSpanChanged"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="text" type="android.text.Spannable">
+</parameter>
+<parameter name="what" type="java.lang.Object">
+</parameter>
+<parameter name="ostart" type="int">
+</parameter>
+<parameter name="oend" type="int">
+</parameter>
+<parameter name="nstart" type="int">
+</parameter>
+<parameter name="nend" type="int">
+</parameter>
+</method>
+<method name="onSpanRemoved"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="text" type="android.text.Spannable">
+</parameter>
+<parameter name="what" type="java.lang.Object">
+</parameter>
+<parameter name="start" type="int">
+</parameter>
+<parameter name="end" type="int">
+</parameter>
+</method>
+</interface>
+<interface name="Spannable"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="android.text.Spanned">
+</implements>
+<method name="removeSpan"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="what" type="java.lang.Object">
+</parameter>
+</method>
+<method name="setSpan"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="what" type="java.lang.Object">
+</parameter>
+<parameter name="start" type="int">
+</parameter>
+<parameter name="end" type="int">
+</parameter>
+<parameter name="flags" type="int">
+</parameter>
+</method>
+</interface>
+<class name="Spannable.Factory"
+ extends="java.lang.Object"
+ abstract="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="Spannable.Factory"
+ type="android.text.Spannable.Factory"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<method name="getInstance"
+ return="android.text.Spannable.Factory"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="newSpannable"
+ return="android.text.Spannable"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="source" type="java.lang.CharSequence">
+</parameter>
+</method>
+</class>
+<class name="SpannableString"
+ extends="android.text.SpannableStringInternal"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="java.lang.CharSequence">
+</implements>
+<implements name="android.text.GetChars">
+</implements>
+<implements name="android.text.Spannable">
+</implements>
+<constructor name="SpannableString"
+ type="android.text.SpannableString"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="source" type="java.lang.CharSequence">
+</parameter>
+</constructor>
+<method name="removeSpan"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="what" type="java.lang.Object">
+</parameter>
+</method>
+<method name="setSpan"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="what" type="java.lang.Object">
+</parameter>
+<parameter name="start" type="int">
+</parameter>
+<parameter name="end" type="int">
+</parameter>
+<parameter name="flags" type="int">
+</parameter>
+</method>
+<method name="subSequence"
+ return="java.lang.CharSequence"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="start" type="int">
+</parameter>
+<parameter name="end" type="int">
+</parameter>
+</method>
+<method name="valueOf"
+ return="android.text.SpannableString"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="source" type="java.lang.CharSequence">
+</parameter>
+</method>
+</class>
+<class name="SpannableStringBuilder"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="java.lang.Appendable">
+</implements>
+<implements name="java.lang.CharSequence">
+</implements>
+<implements name="android.text.Editable">
+</implements>
+<implements name="android.text.GetChars">
+</implements>
+<implements name="android.text.Spannable">
+</implements>
+<constructor name="SpannableStringBuilder"
+ type="android.text.SpannableStringBuilder"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<constructor name="SpannableStringBuilder"
+ type="android.text.SpannableStringBuilder"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="text" type="java.lang.CharSequence">
+</parameter>
+</constructor>
+<constructor name="SpannableStringBuilder"
+ type="android.text.SpannableStringBuilder"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="text" type="java.lang.CharSequence">
+</parameter>
+<parameter name="start" type="int">
+</parameter>
+<parameter name="end" type="int">
+</parameter>
+</constructor>
+<method name="append"
+ return="android.text.SpannableStringBuilder"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="text" type="java.lang.CharSequence">
+</parameter>
+</method>
+<method name="append"
+ return="android.text.SpannableStringBuilder"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="text" type="java.lang.CharSequence">
+</parameter>
+<parameter name="start" type="int">
+</parameter>
+<parameter name="end" type="int">
+</parameter>
+</method>
+<method name="append"
+ return="android.text.SpannableStringBuilder"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="text" type="char">
+</parameter>
+</method>
+<method name="charAt"
+ return="char"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="where" type="int">
+</parameter>
+</method>
+<method name="clear"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="clearSpans"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="delete"
+ return="android.text.SpannableStringBuilder"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="start" type="int">
+</parameter>
+<parameter name="end" type="int">
+</parameter>
+</method>
+<method name="getChars"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="start" type="int">
+</parameter>
+<parameter name="end" type="int">
+</parameter>
+<parameter name="dest" type="char[]">
+</parameter>
+<parameter name="destoff" type="int">
+</parameter>
+</method>
+<method name="getFilters"
+ return="android.text.InputFilter[]"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getSpanEnd"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="what" type="java.lang.Object">
+</parameter>
+</method>
+<method name="getSpanFlags"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="what" type="java.lang.Object">
+</parameter>
+</method>
+<method name="getSpanStart"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="what" type="java.lang.Object">
+</parameter>
+</method>
+<method name="getSpans"
+ return="T[]"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="queryStart" type="int">
+</parameter>
+<parameter name="queryEnd" type="int">
+</parameter>
+<parameter name="kind" type="java.lang.Class&lt;T&gt;">
+</parameter>
+</method>
+<method name="insert"
+ return="android.text.SpannableStringBuilder"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="where" type="int">
+</parameter>
+<parameter name="tb" type="java.lang.CharSequence">
+</parameter>
+<parameter name="start" type="int">
+</parameter>
+<parameter name="end" type="int">
+</parameter>
+</method>
+<method name="insert"
+ return="android.text.SpannableStringBuilder"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="where" type="int">
+</parameter>
+<parameter name="tb" type="java.lang.CharSequence">
+</parameter>
+</method>
+<method name="length"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="nextSpanTransition"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="start" type="int">
+</parameter>
+<parameter name="limit" type="int">
+</parameter>
+<parameter name="kind" type="java.lang.Class">
+</parameter>
+</method>
+<method name="removeSpan"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="what" type="java.lang.Object">
+</parameter>
+</method>
+<method name="replace"
+ return="android.text.SpannableStringBuilder"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="start" type="int">
+</parameter>
+<parameter name="end" type="int">
+</parameter>
+<parameter name="tb" type="java.lang.CharSequence">
+</parameter>
+</method>
+<method name="replace"
+ return="android.text.SpannableStringBuilder"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="start" type="int">
+</parameter>
+<parameter name="end" type="int">
+</parameter>
+<parameter name="tb" type="java.lang.CharSequence">
+</parameter>
+<parameter name="tbstart" type="int">
+</parameter>
+<parameter name="tbend" type="int">
+</parameter>
+</method>
+<method name="setFilters"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="filters" type="android.text.InputFilter[]">
+</parameter>
+</method>
+<method name="setSpan"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="what" type="java.lang.Object">
+</parameter>
+<parameter name="start" type="int">
+</parameter>
+<parameter name="end" type="int">
+</parameter>
+<parameter name="flags" type="int">
+</parameter>
+</method>
+<method name="subSequence"
+ return="java.lang.CharSequence"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="start" type="int">
+</parameter>
+<parameter name="end" type="int">
+</parameter>
+</method>
+<method name="valueOf"
+ return="android.text.SpannableStringBuilder"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="source" type="java.lang.CharSequence">
+</parameter>
+</method>
+</class>
+<class name="SpannableStringInternal"
+ extends="java.lang.Object"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility=""
+>
+<method name="charAt"
+ return="char"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="i" type="int">
+</parameter>
+</method>
+<method name="getChars"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="start" type="int">
+</parameter>
+<parameter name="end" type="int">
+</parameter>
+<parameter name="dest" type="char[]">
+</parameter>
+<parameter name="off" type="int">
+</parameter>
+</method>
+<method name="getSpanEnd"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="what" type="java.lang.Object">
+</parameter>
+</method>
+<method name="getSpanFlags"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="what" type="java.lang.Object">
+</parameter>
+</method>
+<method name="getSpanStart"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="what" type="java.lang.Object">
+</parameter>
+</method>
+<method name="getSpans"
+ return="T[]"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="queryStart" type="int">
+</parameter>
+<parameter name="queryEnd" type="int">
+</parameter>
+<parameter name="kind" type="java.lang.Class&lt;T&gt;">
+</parameter>
+</method>
+<method name="length"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="nextSpanTransition"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="start" type="int">
+</parameter>
+<parameter name="limit" type="int">
+</parameter>
+<parameter name="kind" type="java.lang.Class">
+</parameter>
+</method>
+<method name="toString"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+</class>
+<interface name="Spanned"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="java.lang.CharSequence">
+</implements>
+<method name="getSpanEnd"
+ return="int"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="tag" type="java.lang.Object">
+</parameter>
+</method>
+<method name="getSpanFlags"
+ return="int"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="tag" type="java.lang.Object">
+</parameter>
+</method>
+<method name="getSpanStart"
+ return="int"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="tag" type="java.lang.Object">
+</parameter>
+</method>
+<method name="getSpans"
+ return="T[]"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="start" type="int">
+</parameter>
+<parameter name="end" type="int">
+</parameter>
+<parameter name="type" type="java.lang.Class&lt;T&gt;">
+</parameter>
+</method>
+<method name="nextSpanTransition"
+ return="int"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="start" type="int">
+</parameter>
+<parameter name="limit" type="int">
+</parameter>
+<parameter name="type" type="java.lang.Class">
+</parameter>
+</method>
+<field name="SPAN_COMPOSING"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="256"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="SPAN_EXCLUSIVE_EXCLUSIVE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="33"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="SPAN_EXCLUSIVE_INCLUSIVE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="34"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="SPAN_INCLUSIVE_EXCLUSIVE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="17"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="SPAN_INCLUSIVE_INCLUSIVE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="18"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="SPAN_INTERMEDIATE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="512"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="SPAN_MARK_MARK"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="17"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="SPAN_MARK_POINT"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="18"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="SPAN_PARAGRAPH"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="51"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="SPAN_POINT_MARK"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="33"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="SPAN_POINT_MARK_MASK"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="51"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="SPAN_POINT_POINT"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="34"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="SPAN_PRIORITY"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16711680"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="SPAN_PRIORITY_SHIFT"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="SPAN_USER"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="-16777216"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="SPAN_USER_SHIFT"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="24"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</interface>
+<class name="SpannedString"
+ extends="android.text.SpannableStringInternal"
+ abstract="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="java.lang.CharSequence">
+</implements>
+<implements name="android.text.GetChars">
+</implements>
+<implements name="android.text.Spanned">
+</implements>
+<constructor name="SpannedString"
+ type="android.text.SpannedString"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="source" type="java.lang.CharSequence">
+</parameter>
+</constructor>
+<method name="subSequence"
+ return="java.lang.CharSequence"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="start" type="int">
+</parameter>
+<parameter name="end" type="int">
+</parameter>
+</method>
+<method name="valueOf"
+ return="android.text.SpannedString"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="source" type="java.lang.CharSequence">
+</parameter>
+</method>
+</class>
+<class name="StaticLayout"
+ extends="android.text.Layout"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="StaticLayout"
+ type="android.text.StaticLayout"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="source" type="java.lang.CharSequence">
+</parameter>
+<parameter name="paint" type="android.text.TextPaint">
+</parameter>
+<parameter name="width" type="int">
+</parameter>
+<parameter name="align" type="android.text.Layout.Alignment">
+</parameter>
+<parameter name="spacingmult" type="float">
+</parameter>
+<parameter name="spacingadd" type="float">
+</parameter>
+<parameter name="includepad" type="boolean">
+</parameter>
+</constructor>
+<constructor name="StaticLayout"
+ type="android.text.StaticLayout"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="source" type="java.lang.CharSequence">
+</parameter>
+<parameter name="bufstart" type="int">
+</parameter>
+<parameter name="bufend" type="int">
+</parameter>
+<parameter name="paint" type="android.text.TextPaint">
+</parameter>
+<parameter name="outerwidth" type="int">
+</parameter>
+<parameter name="align" type="android.text.Layout.Alignment">
+</parameter>
+<parameter name="spacingmult" type="float">
+</parameter>
+<parameter name="spacingadd" type="float">
+</parameter>
+<parameter name="includepad" type="boolean">
+</parameter>
+</constructor>
+<constructor name="StaticLayout"
+ type="android.text.StaticLayout"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="source" type="java.lang.CharSequence">
+</parameter>
+<parameter name="bufstart" type="int">
+</parameter>
+<parameter name="bufend" type="int">
+</parameter>
+<parameter name="paint" type="android.text.TextPaint">
+</parameter>
+<parameter name="outerwidth" type="int">
+</parameter>
+<parameter name="align" type="android.text.Layout.Alignment">
+</parameter>
+<parameter name="spacingmult" type="float">
+</parameter>
+<parameter name="spacingadd" type="float">
+</parameter>
+<parameter name="includepad" type="boolean">
+</parameter>
+<parameter name="ellipsize" type="android.text.TextUtils.TruncateAt">
+</parameter>
+<parameter name="ellipsizedWidth" type="int">
+</parameter>
+</constructor>
+<method name="getBottomPadding"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getEllipsisCount"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="line" type="int">
+</parameter>
+</method>
+<method name="getEllipsisStart"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="line" type="int">
+</parameter>
+</method>
+<method name="getLineContainsTab"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="line" type="int">
+</parameter>
+</method>
+<method name="getLineCount"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getLineDescent"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="line" type="int">
+</parameter>
+</method>
+<method name="getLineDirections"
+ return="android.text.Layout.Directions"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="line" type="int">
+</parameter>
+</method>
+<method name="getLineStart"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="line" type="int">
+</parameter>
+</method>
+<method name="getLineTop"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="line" type="int">
+</parameter>
+</method>
+<method name="getParagraphDirection"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="line" type="int">
+</parameter>
+</method>
+<method name="getTopPadding"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+</class>
+<class name="TextPaint"
+ extends="android.graphics.Paint"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="TextPaint"
+ type="android.text.TextPaint"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<constructor name="TextPaint"
+ type="android.text.TextPaint"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="flags" type="int">
+</parameter>
+</constructor>
+<constructor name="TextPaint"
+ type="android.text.TextPaint"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="p" type="android.graphics.Paint">
+</parameter>
+</constructor>
+<method name="set"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="tp" type="android.text.TextPaint">
+</parameter>
+</method>
+<field name="baselineShift"
+ type="int"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="bgColor"
+ type="int"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="density"
+ type="float"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="drawableState"
+ type="int[]"
+ transient="false"
+ volatile="false"
+ value="null"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="linkColor"
+ type="int"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<class name="TextUtils"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="commaEllipsize"
+ return="java.lang.CharSequence"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="text" type="java.lang.CharSequence">
+</parameter>
+<parameter name="p" type="android.text.TextPaint">
+</parameter>
+<parameter name="avail" type="float">
+</parameter>
+<parameter name="oneMore" type="java.lang.String">
+</parameter>
+<parameter name="more" type="java.lang.String">
+</parameter>
+</method>
+<method name="concat"
+ return="java.lang.CharSequence"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="text" type="java.lang.CharSequence...">
+</parameter>
+</method>
+<method name="copySpansFrom"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="source" type="android.text.Spanned">
+</parameter>
+<parameter name="start" type="int">
+</parameter>
+<parameter name="end" type="int">
+</parameter>
+<parameter name="kind" type="java.lang.Class">
+</parameter>
+<parameter name="dest" type="android.text.Spannable">
+</parameter>
+<parameter name="destoff" type="int">
+</parameter>
+</method>
+<method name="dumpSpans"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="cs" type="java.lang.CharSequence">
+</parameter>
+<parameter name="printer" type="android.util.Printer">
+</parameter>
+<parameter name="prefix" type="java.lang.String">
+</parameter>
+</method>
+<method name="ellipsize"
+ return="java.lang.CharSequence"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="text" type="java.lang.CharSequence">
+</parameter>
+<parameter name="p" type="android.text.TextPaint">
+</parameter>
+<parameter name="avail" type="float">
+</parameter>
+<parameter name="where" type="android.text.TextUtils.TruncateAt">
+</parameter>
+</method>
+<method name="ellipsize"
+ return="java.lang.CharSequence"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="text" type="java.lang.CharSequence">
+</parameter>
+<parameter name="p" type="android.text.TextPaint">
+</parameter>
+<parameter name="avail" type="float">
+</parameter>
+<parameter name="where" type="android.text.TextUtils.TruncateAt">
+</parameter>
+<parameter name="preserveLength" type="boolean">
+</parameter>
+<parameter name="callback" type="android.text.TextUtils.EllipsizeCallback">
+</parameter>
+</method>
+<method name="equals"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="a" type="java.lang.CharSequence">
+</parameter>
+<parameter name="b" type="java.lang.CharSequence">
+</parameter>
+</method>
+<method name="expandTemplate"
+ return="java.lang.CharSequence"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="template" type="java.lang.CharSequence">
+</parameter>
+<parameter name="values" type="java.lang.CharSequence...">
+</parameter>
+</method>
+<method name="getCapsMode"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="cs" type="java.lang.CharSequence">
+</parameter>
+<parameter name="off" type="int">
+</parameter>
+<parameter name="reqModes" type="int">
+</parameter>
+</method>
+<method name="getChars"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="s" type="java.lang.CharSequence">
+</parameter>
+<parameter name="start" type="int">
+</parameter>
+<parameter name="end" type="int">
+</parameter>
+<parameter name="dest" type="char[]">
+</parameter>
+<parameter name="destoff" type="int">
+</parameter>
+</method>
+<method name="getOffsetAfter"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="text" type="java.lang.CharSequence">
+</parameter>
+<parameter name="offset" type="int">
+</parameter>
+</method>
+<method name="getOffsetBefore"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="text" type="java.lang.CharSequence">
+</parameter>
+<parameter name="offset" type="int">
+</parameter>
+</method>
+<method name="getReverse"
+ return="java.lang.CharSequence"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="source" type="java.lang.CharSequence">
+</parameter>
+<parameter name="start" type="int">
+</parameter>
+<parameter name="end" type="int">
+</parameter>
+</method>
+<method name="getTrimmedLength"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="s" type="java.lang.CharSequence">
+</parameter>
+</method>
+<method name="htmlEncode"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="s" type="java.lang.String">
+</parameter>
+</method>
+<method name="indexOf"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="s" type="java.lang.CharSequence">
+</parameter>
+<parameter name="ch" type="char">
+</parameter>
+</method>
+<method name="indexOf"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="s" type="java.lang.CharSequence">
+</parameter>
+<parameter name="ch" type="char">
+</parameter>
+<parameter name="start" type="int">
+</parameter>
+</method>
+<method name="indexOf"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="s" type="java.lang.CharSequence">
+</parameter>
+<parameter name="ch" type="char">
+</parameter>
+<parameter name="start" type="int">
+</parameter>
+<parameter name="end" type="int">
+</parameter>
+</method>
+<method name="indexOf"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="s" type="java.lang.CharSequence">
+</parameter>
+<parameter name="needle" type="java.lang.CharSequence">
+</parameter>
+</method>
+<method name="indexOf"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="s" type="java.lang.CharSequence">
+</parameter>
+<parameter name="needle" type="java.lang.CharSequence">
+</parameter>
+<parameter name="start" type="int">
+</parameter>
+</method>
+<method name="indexOf"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="s" type="java.lang.CharSequence">
+</parameter>
+<parameter name="needle" type="java.lang.CharSequence">
+</parameter>
+<parameter name="start" type="int">
+</parameter>
+<parameter name="end" type="int">
+</parameter>
+</method>
+<method name="isDigitsOnly"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="str" type="java.lang.CharSequence">
+</parameter>
+</method>
+<method name="isEmpty"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="str" type="java.lang.CharSequence">
+</parameter>
+</method>
+<method name="isGraphic"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="str" type="java.lang.CharSequence">
+</parameter>
+</method>
+<method name="isGraphic"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="c" type="char">
+</parameter>
+</method>
+<method name="join"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="delimiter" type="java.lang.CharSequence">
+</parameter>
+<parameter name="tokens" type="java.lang.Object[]">
+</parameter>
+</method>
+<method name="join"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="delimiter" type="java.lang.CharSequence">
+</parameter>
+<parameter name="tokens" type="java.lang.Iterable">
+</parameter>
+</method>
+<method name="lastIndexOf"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="s" type="java.lang.CharSequence">
+</parameter>
+<parameter name="ch" type="char">
+</parameter>
+</method>
+<method name="lastIndexOf"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="s" type="java.lang.CharSequence">
+</parameter>
+<parameter name="ch" type="char">
+</parameter>
+<parameter name="last" type="int">
+</parameter>
+</method>
+<method name="lastIndexOf"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="s" type="java.lang.CharSequence">
+</parameter>
+<parameter name="ch" type="char">
+</parameter>
+<parameter name="start" type="int">
+</parameter>
+<parameter name="last" type="int">
+</parameter>
+</method>
+<method name="regionMatches"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="one" type="java.lang.CharSequence">
+</parameter>
+<parameter name="toffset" type="int">
+</parameter>
+<parameter name="two" type="java.lang.CharSequence">
+</parameter>
+<parameter name="ooffset" type="int">
+</parameter>
+<parameter name="len" type="int">
+</parameter>
+</method>
+<method name="replace"
+ return="java.lang.CharSequence"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="template" type="java.lang.CharSequence">
+</parameter>
+<parameter name="sources" type="java.lang.String[]">
+</parameter>
+<parameter name="destinations" type="java.lang.CharSequence[]">
+</parameter>
+</method>
+<method name="split"
+ return="java.lang.String[]"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="text" type="java.lang.String">
+</parameter>
+<parameter name="expression" type="java.lang.String">
+</parameter>
+</method>
+<method name="split"
+ return="java.lang.String[]"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="text" type="java.lang.String">
+</parameter>
+<parameter name="pattern" type="java.util.regex.Pattern">
+</parameter>
+</method>
+<method name="stringOrSpannedString"
+ return="java.lang.CharSequence"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="source" type="java.lang.CharSequence">
+</parameter>
+</method>
+<method name="substring"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="source" type="java.lang.CharSequence">
+</parameter>
+<parameter name="start" type="int">
+</parameter>
+<parameter name="end" type="int">
+</parameter>
+</method>
+<method name="writeToParcel"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="cs" type="java.lang.CharSequence">
+</parameter>
+<parameter name="p" type="android.os.Parcel">
+</parameter>
+<parameter name="parcelableFlags" type="int">
+</parameter>
+</method>
+<field name="CAP_MODE_CHARACTERS"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="4096"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="CAP_MODE_SENTENCES"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16384"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="CAP_MODE_WORDS"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="8192"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="CHAR_SEQUENCE_CREATOR"
+ type="android.os.Parcelable.Creator"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<interface name="TextUtils.EllipsizeCallback"
+ abstract="true"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="ellipsized"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="start" type="int">
+</parameter>
+<parameter name="end" type="int">
+</parameter>
+</method>
+</interface>
+<class name="TextUtils.SimpleStringSplitter"
+ extends="java.lang.Object"
+ abstract="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="java.util.Iterator">
+</implements>
+<implements name="android.text.TextUtils.StringSplitter">
+</implements>
+<constructor name="TextUtils.SimpleStringSplitter"
+ type="android.text.TextUtils.SimpleStringSplitter"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="delimiter" type="char">
+</parameter>
+</constructor>
+<method name="hasNext"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="iterator"
+ return="java.util.Iterator&lt;java.lang.String&gt;"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="next"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="remove"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="setString"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="string" type="java.lang.String">
+</parameter>
+</method>
+</class>
+<interface name="TextUtils.StringSplitter"
+ abstract="true"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="java.lang.Iterable">
+</implements>
+<method name="setString"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="string" type="java.lang.String">
+</parameter>
+</method>
+</interface>
+<class name="TextUtils.TruncateAt"
+ extends="java.lang.Enum"
+ abstract="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="valueOf"
+ return="android.text.TextUtils.TruncateAt"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+</method>
+<method name="values"
+ return="android.text.TextUtils.TruncateAt[]"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+</class>
+<interface name="TextWatcher"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="android.text.NoCopySpan">
+</implements>
+<method name="afterTextChanged"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="s" type="android.text.Editable">
+</parameter>
+</method>
+<method name="beforeTextChanged"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="s" type="java.lang.CharSequence">
+</parameter>
+<parameter name="start" type="int">
+</parameter>
+<parameter name="count" type="int">
+</parameter>
+<parameter name="after" type="int">
+</parameter>
+</method>
+<method name="onTextChanged"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="s" type="java.lang.CharSequence">
+</parameter>
+<parameter name="start" type="int">
+</parameter>
+<parameter name="before" type="int">
+</parameter>
+<parameter name="count" type="int">
+</parameter>
+</method>
+</interface>
+</package>
+<package name="android.text.format"
+>
+<class name="DateFormat"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="DateFormat"
+ type="android.text.format.DateFormat"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<method name="format"
+ return="java.lang.CharSequence"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="inFormat" type="java.lang.CharSequence">
+</parameter>
+<parameter name="inTimeInMillis" type="long">
+</parameter>
+</method>
+<method name="format"
+ return="java.lang.CharSequence"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="inFormat" type="java.lang.CharSequence">
+</parameter>
+<parameter name="inDate" type="java.util.Date">
+</parameter>
+</method>
+<method name="format"
+ return="java.lang.CharSequence"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="inFormat" type="java.lang.CharSequence">
+</parameter>
+<parameter name="inDate" type="java.util.Calendar">
+</parameter>
+</method>
+<method name="getDateFormat"
+ return="java.text.DateFormat"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="context" type="android.content.Context">
+</parameter>
+</method>
+<method name="getDateFormatOrder"
+ return="char[]"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="context" type="android.content.Context">
+</parameter>
+</method>
+<method name="getLongDateFormat"
+ return="java.text.DateFormat"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="context" type="android.content.Context">
+</parameter>
+</method>
+<method name="getMediumDateFormat"
+ return="java.text.DateFormat"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="context" type="android.content.Context">
+</parameter>
+</method>
+<method name="getTimeFormat"
+ return="java.text.DateFormat"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="context" type="android.content.Context">
+</parameter>
+</method>
+<method name="is24HourFormat"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="context" type="android.content.Context">
+</parameter>
+</method>
+<field name="AM_PM"
+ type="char"
+ transient="false"
+ volatile="false"
+ value="97"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="CAPITAL_AM_PM"
+ type="char"
+ transient="false"
+ volatile="false"
+ value="65"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="DATE"
+ type="char"
+ transient="false"
+ volatile="false"
+ value="100"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="DAY"
+ type="char"
+ transient="false"
+ volatile="false"
+ value="69"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="HOUR"
+ type="char"
+ transient="false"
+ volatile="false"
+ value="104"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="HOUR_OF_DAY"
+ type="char"
+ transient="false"
+ volatile="false"
+ value="107"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="MINUTE"
+ type="char"
+ transient="false"
+ volatile="false"
+ value="109"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="MONTH"
+ type="char"
+ transient="false"
+ volatile="false"
+ value="77"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="QUOTE"
+ type="char"
+ transient="false"
+ volatile="false"
+ value="39"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="SECONDS"
+ type="char"
+ transient="false"
+ volatile="false"
+ value="115"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TIME_ZONE"
+ type="char"
+ transient="false"
+ volatile="false"
+ value="122"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="YEAR"
+ type="char"
+ transient="false"
+ volatile="false"
+ value="121"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<class name="DateUtils"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="DateUtils"
+ type="android.text.format.DateUtils"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<method name="formatDateRange"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="context" type="android.content.Context">
+</parameter>
+<parameter name="startMillis" type="long">
+</parameter>
+<parameter name="endMillis" type="long">
+</parameter>
+<parameter name="flags" type="int">
+</parameter>
+</method>
+<method name="formatDateRange"
+ return="java.util.Formatter"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="context" type="android.content.Context">
+</parameter>
+<parameter name="formatter" type="java.util.Formatter">
+</parameter>
+<parameter name="startMillis" type="long">
+</parameter>
+<parameter name="endMillis" type="long">
+</parameter>
+<parameter name="flags" type="int">
+</parameter>
+</method>
+<method name="formatDateTime"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="context" type="android.content.Context">
+</parameter>
+<parameter name="millis" type="long">
+</parameter>
+<parameter name="flags" type="int">
+</parameter>
+</method>
+<method name="formatElapsedTime"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="elapsedSeconds" type="long">
+</parameter>
+</method>
+<method name="formatElapsedTime"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="recycle" type="java.lang.StringBuilder">
+</parameter>
+<parameter name="elapsedSeconds" type="long">
+</parameter>
+</method>
+<method name="formatSameDayTime"
+ return="java.lang.CharSequence"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="then" type="long">
+</parameter>
+<parameter name="now" type="long">
+</parameter>
+<parameter name="dateStyle" type="int">
+</parameter>
+<parameter name="timeStyle" type="int">
+</parameter>
+</method>
+<method name="getAMPMString"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="ampm" type="int">
+</parameter>
+</method>
+<method name="getDayOfWeekString"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="dayOfWeek" type="int">
+</parameter>
+<parameter name="abbrev" type="int">
+</parameter>
+</method>
+<method name="getMonthString"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="month" type="int">
+</parameter>
+<parameter name="abbrev" type="int">
+</parameter>
+</method>
+<method name="getRelativeDateTimeString"
+ return="java.lang.CharSequence"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="c" type="android.content.Context">
+</parameter>
+<parameter name="time" type="long">
+</parameter>
+<parameter name="minResolution" type="long">
+</parameter>
+<parameter name="transitionResolution" type="long">
+</parameter>
+<parameter name="flags" type="int">
+</parameter>
+</method>
+<method name="getRelativeTimeSpanString"
+ return="java.lang.CharSequence"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="startTime" type="long">
+</parameter>
+</method>
+<method name="getRelativeTimeSpanString"
+ return="java.lang.CharSequence"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="time" type="long">
+</parameter>
+<parameter name="now" type="long">
+</parameter>
+<parameter name="minResolution" type="long">
+</parameter>
+</method>
+<method name="getRelativeTimeSpanString"
+ return="java.lang.CharSequence"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="time" type="long">
+</parameter>
+<parameter name="now" type="long">
+</parameter>
+<parameter name="minResolution" type="long">
+</parameter>
+<parameter name="flags" type="int">
+</parameter>
+</method>
+<method name="getRelativeTimeSpanString"
+ return="java.lang.CharSequence"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="c" type="android.content.Context">
+</parameter>
+<parameter name="millis" type="long">
+</parameter>
+<parameter name="withPreposition" type="boolean">
+</parameter>
+</method>
+<method name="getRelativeTimeSpanString"
+ return="java.lang.CharSequence"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="c" type="android.content.Context">
+</parameter>
+<parameter name="millis" type="long">
+</parameter>
+</method>
+<method name="isToday"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="when" type="long">
+</parameter>
+</method>
+<field name="ABBREV_MONTH_FORMAT"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;%b&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ABBREV_WEEKDAY_FORMAT"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;%a&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="DAY_IN_MILLIS"
+ type="long"
+ transient="false"
+ volatile="false"
+ value="86400000L"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="FORMAT_12HOUR"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="64"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="FORMAT_24HOUR"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="128"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="FORMAT_ABBREV_ALL"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="524288"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="FORMAT_ABBREV_MONTH"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="65536"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="FORMAT_ABBREV_RELATIVE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="262144"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="FORMAT_ABBREV_TIME"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16384"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="FORMAT_ABBREV_WEEKDAY"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="32768"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="FORMAT_CAP_AMPM"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="256"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="FORMAT_CAP_MIDNIGHT"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="4096"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="FORMAT_CAP_NOON"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1024"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="FORMAT_CAP_NOON_MIDNIGHT"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="5120"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="FORMAT_NO_MIDNIGHT"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2048"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="FORMAT_NO_MONTH_DAY"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="32"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="FORMAT_NO_NOON"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="512"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="FORMAT_NO_NOON_MIDNIGHT"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2560"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="FORMAT_NO_YEAR"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="8"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="FORMAT_NUMERIC_DATE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="131072"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="FORMAT_SHOW_DATE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="FORMAT_SHOW_TIME"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="FORMAT_SHOW_WEEKDAY"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="FORMAT_SHOW_YEAR"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="4"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="FORMAT_UTC"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="8192"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="HOUR_IN_MILLIS"
+ type="long"
+ transient="false"
+ volatile="false"
+ value="3600000L"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="HOUR_MINUTE_24"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;%H:%M&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="LENGTH_LONG"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="10"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="LENGTH_MEDIUM"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="20"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="LENGTH_SHORT"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="30"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="LENGTH_SHORTER"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="40"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="LENGTH_SHORTEST"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="50"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="MINUTE_IN_MILLIS"
+ type="long"
+ transient="false"
+ volatile="false"
+ value="60000L"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="MONTH_DAY_FORMAT"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;%-d&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="MONTH_FORMAT"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;%B&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="NUMERIC_MONTH_FORMAT"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;%m&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="SECOND_IN_MILLIS"
+ type="long"
+ transient="false"
+ volatile="false"
+ value="1000L"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="WEEKDAY_FORMAT"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;%A&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="WEEK_IN_MILLIS"
+ type="long"
+ transient="false"
+ volatile="false"
+ value="604800000L"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="YEAR_FORMAT"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;%Y&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="YEAR_FORMAT_TWO_DIGITS"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;%g&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="YEAR_IN_MILLIS"
+ type="long"
+ transient="false"
+ volatile="false"
+ value="31449600000L"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="sameMonthTable"
+ type="int[]"
+ transient="false"
+ volatile="false"
+ value="null"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="sameYearTable"
+ type="int[]"
+ transient="false"
+ volatile="false"
+ value="null"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<class name="Formatter"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="Formatter"
+ type="android.text.format.Formatter"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<method name="formatFileSize"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="context" type="android.content.Context">
+</parameter>
+<parameter name="number" type="long">
+</parameter>
+</method>
+<method name="formatIpAddress"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="addr" type="int">
+</parameter>
+</method>
+<method name="formatShortFileSize"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="context" type="android.content.Context">
+</parameter>
+<parameter name="number" type="long">
+</parameter>
+</method>
+</class>
+<class name="Time"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="Time"
+ type="android.text.format.Time"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="timezone" type="java.lang.String">
+</parameter>
+</constructor>
+<constructor name="Time"
+ type="android.text.format.Time"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<constructor name="Time"
+ type="android.text.format.Time"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="other" type="android.text.format.Time">
+</parameter>
+</constructor>
+<method name="after"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="that" type="android.text.format.Time">
+</parameter>
+</method>
+<method name="before"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="that" type="android.text.format.Time">
+</parameter>
+</method>
+<method name="clear"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="timezone" type="java.lang.String">
+</parameter>
+</method>
+<method name="compare"
+ return="int"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="a" type="android.text.format.Time">
+</parameter>
+<parameter name="b" type="android.text.format.Time">
+</parameter>
+</method>
+<method name="format"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="format" type="java.lang.String">
+</parameter>
+</method>
+<method name="format2445"
+ return="java.lang.String"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="format3339"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="allDay" type="boolean">
+</parameter>
+</method>
+<method name="getActualMaximum"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="field" type="int">
+</parameter>
+</method>
+<method name="getCurrentTimezone"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getJulianDay"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="millis" type="long">
+</parameter>
+<parameter name="gmtoff" type="long">
+</parameter>
+</method>
+<method name="getWeekNumber"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isEpoch"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="time" type="android.text.format.Time">
+</parameter>
+</method>
+<method name="normalize"
+ return="long"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="ignoreDst" type="boolean">
+</parameter>
+</method>
+<method name="parse"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="s" type="java.lang.String">
+</parameter>
+</method>
+<method name="parse3339"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="s" type="java.lang.String">
+</parameter>
+</method>
+<method name="set"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="millis" type="long">
+</parameter>
+</method>
+<method name="set"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="that" type="android.text.format.Time">
+</parameter>
+</method>
+<method name="set"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="second" type="int">
+</parameter>
+<parameter name="minute" type="int">
+</parameter>
+<parameter name="hour" type="int">
+</parameter>
+<parameter name="monthDay" type="int">
+</parameter>
+<parameter name="month" type="int">
+</parameter>
+<parameter name="year" type="int">
+</parameter>
+</method>
+<method name="set"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="monthDay" type="int">
+</parameter>
+<parameter name="month" type="int">
+</parameter>
+<parameter name="year" type="int">
+</parameter>
+</method>
+<method name="setJulianDay"
+ return="long"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="julianDay" type="int">
+</parameter>
+</method>
+<method name="setToNow"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="switchTimezone"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="timezone" type="java.lang.String">
+</parameter>
+</method>
+<method name="toMillis"
+ return="long"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="ignoreDst" type="boolean">
+</parameter>
+</method>
+<field name="EPOCH_JULIAN_DAY"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2440588"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="FRIDAY"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="5"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="HOUR"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="3"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="MINUTE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="MONDAY"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="MONTH"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="5"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="MONTH_DAY"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="4"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="SATURDAY"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="6"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="SECOND"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="SUNDAY"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="0"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="THURSDAY"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="4"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TIMEZONE_UTC"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;UTC&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TUESDAY"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="WEDNESDAY"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="3"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="WEEK_DAY"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="7"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="WEEK_NUM"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="9"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="YEAR"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="6"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="YEAR_DAY"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="8"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="allDay"
+ type="boolean"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="gmtoff"
+ type="long"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="hour"
+ type="int"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="isDst"
+ type="int"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="minute"
+ type="int"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="month"
+ type="int"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="monthDay"
+ type="int"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="second"
+ type="int"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="timezone"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="weekDay"
+ type="int"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="year"
+ type="int"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="yearDay"
+ type="int"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+</package>
+<package name="android.text.method"
+>
+<class name="ArrowKeyMovementMethod"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="android.text.method.MovementMethod">
+</implements>
+<constructor name="ArrowKeyMovementMethod"
+ type="android.text.method.ArrowKeyMovementMethod"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<method name="canSelectArbitrarily"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getInstance"
+ return="android.text.method.MovementMethod"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="initialize"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="widget" type="android.widget.TextView">
+</parameter>
+<parameter name="text" type="android.text.Spannable">
+</parameter>
+</method>
+<method name="onKeyDown"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="widget" type="android.widget.TextView">
+</parameter>
+<parameter name="buffer" type="android.text.Spannable">
+</parameter>
+<parameter name="keyCode" type="int">
+</parameter>
+<parameter name="event" type="android.view.KeyEvent">
+</parameter>
+</method>
+<method name="onKeyOther"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="view" type="android.widget.TextView">
+</parameter>
+<parameter name="text" type="android.text.Spannable">
+</parameter>
+<parameter name="event" type="android.view.KeyEvent">
+</parameter>
+</method>
+<method name="onKeyUp"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="widget" type="android.widget.TextView">
+</parameter>
+<parameter name="buffer" type="android.text.Spannable">
+</parameter>
+<parameter name="keyCode" type="int">
+</parameter>
+<parameter name="event" type="android.view.KeyEvent">
+</parameter>
+</method>
+<method name="onTakeFocus"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="view" type="android.widget.TextView">
+</parameter>
+<parameter name="text" type="android.text.Spannable">
+</parameter>
+<parameter name="dir" type="int">
+</parameter>
+</method>
+<method name="onTouchEvent"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="widget" type="android.widget.TextView">
+</parameter>
+<parameter name="buffer" type="android.text.Spannable">
+</parameter>
+<parameter name="event" type="android.view.MotionEvent">
+</parameter>
+</method>
+<method name="onTrackballEvent"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="widget" type="android.widget.TextView">
+</parameter>
+<parameter name="text" type="android.text.Spannable">
+</parameter>
+<parameter name="event" type="android.view.MotionEvent">
+</parameter>
+</method>
+</class>
+<class name="BaseKeyListener"
+ extends="android.text.method.MetaKeyKeyListener"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="android.text.method.KeyListener">
+</implements>
+<constructor name="BaseKeyListener"
+ type="android.text.method.BaseKeyListener"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<method name="backspace"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="view" type="android.view.View">
+</parameter>
+<parameter name="content" type="android.text.Editable">
+</parameter>
+<parameter name="keyCode" type="int">
+</parameter>
+<parameter name="event" type="android.view.KeyEvent">
+</parameter>
+</method>
+<method name="onKeyOther"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="view" type="android.view.View">
+</parameter>
+<parameter name="content" type="android.text.Editable">
+</parameter>
+<parameter name="event" type="android.view.KeyEvent">
+</parameter>
+</method>
+</class>
+<class name="CharacterPickerDialog"
+ extends="android.app.Dialog"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="android.widget.AdapterView.OnItemClickListener">
+</implements>
+<implements name="android.view.View.OnClickListener">
+</implements>
+<constructor name="CharacterPickerDialog"
+ type="android.text.method.CharacterPickerDialog"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="context" type="android.content.Context">
+</parameter>
+<parameter name="view" type="android.view.View">
+</parameter>
+<parameter name="text" type="android.text.Editable">
+</parameter>
+<parameter name="options" type="java.lang.String">
+</parameter>
+<parameter name="insert" type="boolean">
+</parameter>
+</constructor>
+<method name="onClick"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="v" type="android.view.View">
+</parameter>
+</method>
+<method name="onItemClick"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="parent" type="android.widget.AdapterView">
+</parameter>
+<parameter name="view" type="android.view.View">
+</parameter>
+<parameter name="position" type="int">
+</parameter>
+<parameter name="id" type="long">
+</parameter>
+</method>
+</class>
+<class name="DateKeyListener"
+ extends="android.text.method.NumberKeyListener"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="DateKeyListener"
+ type="android.text.method.DateKeyListener"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<method name="getAcceptedChars"
+ return="char[]"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</method>
+<method name="getInputType"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getInstance"
+ return="android.text.method.DateKeyListener"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<field name="CHARACTERS"
+ type="char[]"
+ transient="false"
+ volatile="false"
+ value="null"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<class name="DateTimeKeyListener"
+ extends="android.text.method.NumberKeyListener"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="DateTimeKeyListener"
+ type="android.text.method.DateTimeKeyListener"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<method name="getAcceptedChars"
+ return="char[]"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</method>
+<method name="getInputType"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getInstance"
+ return="android.text.method.DateTimeKeyListener"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<field name="CHARACTERS"
+ type="char[]"
+ transient="false"
+ volatile="false"
+ value="null"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<class name="DialerKeyListener"
+ extends="android.text.method.NumberKeyListener"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="DialerKeyListener"
+ type="android.text.method.DialerKeyListener"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<method name="getAcceptedChars"
+ return="char[]"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</method>
+<method name="getInputType"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getInstance"
+ return="android.text.method.DialerKeyListener"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<field name="CHARACTERS"
+ type="char[]"
+ transient="false"
+ volatile="false"
+ value="null"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<class name="DigitsKeyListener"
+ extends="android.text.method.NumberKeyListener"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="DigitsKeyListener"
+ type="android.text.method.DigitsKeyListener"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<constructor name="DigitsKeyListener"
+ type="android.text.method.DigitsKeyListener"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="sign" type="boolean">
+</parameter>
+<parameter name="decimal" type="boolean">
+</parameter>
+</constructor>
+<method name="getAcceptedChars"
+ return="char[]"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</method>
+<method name="getInputType"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getInstance"
+ return="android.text.method.DigitsKeyListener"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getInstance"
+ return="android.text.method.DigitsKeyListener"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="sign" type="boolean">
+</parameter>
+<parameter name="decimal" type="boolean">
+</parameter>
+</method>
+<method name="getInstance"
+ return="android.text.method.DigitsKeyListener"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="accepted" type="java.lang.String">
+</parameter>
+</method>
+</class>
+<class name="HideReturnsTransformationMethod"
+ extends="android.text.method.ReplacementTransformationMethod"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="HideReturnsTransformationMethod"
+ type="android.text.method.HideReturnsTransformationMethod"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<method name="getInstance"
+ return="android.text.method.HideReturnsTransformationMethod"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getOriginal"
+ return="char[]"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</method>
+<method name="getReplacement"
+ return="char[]"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</method>
+</class>
+<interface name="KeyListener"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="clearMetaKeyState"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="view" type="android.view.View">
+</parameter>
+<parameter name="content" type="android.text.Editable">
+</parameter>
+<parameter name="states" type="int">
+</parameter>
+</method>
+<method name="getInputType"
+ return="int"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="onKeyDown"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="view" type="android.view.View">
+</parameter>
+<parameter name="text" type="android.text.Editable">
+</parameter>
+<parameter name="keyCode" type="int">
+</parameter>
+<parameter name="event" type="android.view.KeyEvent">
+</parameter>
+</method>
+<method name="onKeyOther"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="view" type="android.view.View">
+</parameter>
+<parameter name="text" type="android.text.Editable">
+</parameter>
+<parameter name="event" type="android.view.KeyEvent">
+</parameter>
+</method>
+<method name="onKeyUp"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="view" type="android.view.View">
+</parameter>
+<parameter name="text" type="android.text.Editable">
+</parameter>
+<parameter name="keyCode" type="int">
+</parameter>
+<parameter name="event" type="android.view.KeyEvent">
+</parameter>
+</method>
+</interface>
+<class name="LinkMovementMethod"
+ extends="android.text.method.ScrollingMovementMethod"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="LinkMovementMethod"
+ type="android.text.method.LinkMovementMethod"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<method name="getInstance"
+ return="android.text.method.MovementMethod"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+</class>
+<class name="MetaKeyKeyListener"
+ extends="java.lang.Object"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="MetaKeyKeyListener"
+ type="android.text.method.MetaKeyKeyListener"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<method name="adjustMetaAfterKeypress"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="content" type="android.text.Spannable">
+</parameter>
+</method>
+<method name="adjustMetaAfterKeypress"
+ return="long"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="state" type="long">
+</parameter>
+</method>
+<method name="clearMetaKeyState"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="view" type="android.view.View">
+</parameter>
+<parameter name="content" type="android.text.Editable">
+</parameter>
+<parameter name="states" type="int">
+</parameter>
+</method>
+<method name="clearMetaKeyState"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="content" type="android.text.Editable">
+</parameter>
+<parameter name="states" type="int">
+</parameter>
+</method>
+<method name="clearMetaKeyState"
+ return="long"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="state" type="long">
+</parameter>
+<parameter name="which" type="int">
+</parameter>
+</method>
+<method name="getMetaState"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="text" type="java.lang.CharSequence">
+</parameter>
+</method>
+<method name="getMetaState"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="text" type="java.lang.CharSequence">
+</parameter>
+<parameter name="meta" type="int">
+</parameter>
+</method>
+<method name="getMetaState"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="state" type="long">
+</parameter>
+</method>
+<method name="getMetaState"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="state" type="long">
+</parameter>
+<parameter name="meta" type="int">
+</parameter>
+</method>
+<method name="handleKeyDown"
+ return="long"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="state" type="long">
+</parameter>
+<parameter name="keyCode" type="int">
+</parameter>
+<parameter name="event" type="android.view.KeyEvent">
+</parameter>
+</method>
+<method name="handleKeyUp"
+ return="long"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="state" type="long">
+</parameter>
+<parameter name="keyCode" type="int">
+</parameter>
+<parameter name="event" type="android.view.KeyEvent">
+</parameter>
+</method>
+<method name="isMetaTracker"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="text" type="java.lang.CharSequence">
+</parameter>
+<parameter name="what" type="java.lang.Object">
+</parameter>
+</method>
+<method name="isSelectingMetaTracker"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="text" type="java.lang.CharSequence">
+</parameter>
+<parameter name="what" type="java.lang.Object">
+</parameter>
+</method>
+<method name="onKeyDown"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="view" type="android.view.View">
+</parameter>
+<parameter name="content" type="android.text.Editable">
+</parameter>
+<parameter name="keyCode" type="int">
+</parameter>
+<parameter name="event" type="android.view.KeyEvent">
+</parameter>
+</method>
+<method name="onKeyUp"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="view" type="android.view.View">
+</parameter>
+<parameter name="content" type="android.text.Editable">
+</parameter>
+<parameter name="keyCode" type="int">
+</parameter>
+<parameter name="event" type="android.view.KeyEvent">
+</parameter>
+</method>
+<method name="resetLockedMeta"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="content" type="android.text.Spannable">
+</parameter>
+</method>
+<method name="resetLockedMeta"
+ return="long"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="state" type="long">
+</parameter>
+</method>
+<method name="resetMetaState"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="text" type="android.text.Spannable">
+</parameter>
+</method>
+<field name="META_ALT_LOCKED"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="512"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="META_ALT_ON"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="META_CAP_LOCKED"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="256"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="META_SHIFT_ON"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="META_SYM_LOCKED"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1024"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="META_SYM_ON"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="4"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<interface name="MovementMethod"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="canSelectArbitrarily"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="initialize"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="widget" type="android.widget.TextView">
+</parameter>
+<parameter name="text" type="android.text.Spannable">
+</parameter>
+</method>
+<method name="onKeyDown"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="widget" type="android.widget.TextView">
+</parameter>
+<parameter name="text" type="android.text.Spannable">
+</parameter>
+<parameter name="keyCode" type="int">
+</parameter>
+<parameter name="event" type="android.view.KeyEvent">
+</parameter>
+</method>
+<method name="onKeyOther"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="view" type="android.widget.TextView">
+</parameter>
+<parameter name="text" type="android.text.Spannable">
+</parameter>
+<parameter name="event" type="android.view.KeyEvent">
+</parameter>
+</method>
+<method name="onKeyUp"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="widget" type="android.widget.TextView">
+</parameter>
+<parameter name="text" type="android.text.Spannable">
+</parameter>
+<parameter name="keyCode" type="int">
+</parameter>
+<parameter name="event" type="android.view.KeyEvent">
+</parameter>
+</method>
+<method name="onTakeFocus"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="widget" type="android.widget.TextView">
+</parameter>
+<parameter name="text" type="android.text.Spannable">
+</parameter>
+<parameter name="direction" type="int">
+</parameter>
+</method>
+<method name="onTouchEvent"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="widget" type="android.widget.TextView">
+</parameter>
+<parameter name="text" type="android.text.Spannable">
+</parameter>
+<parameter name="event" type="android.view.MotionEvent">
+</parameter>
+</method>
+<method name="onTrackballEvent"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="widget" type="android.widget.TextView">
+</parameter>
+<parameter name="text" type="android.text.Spannable">
+</parameter>
+<parameter name="event" type="android.view.MotionEvent">
+</parameter>
+</method>
+</interface>
+<class name="MultiTapKeyListener"
+ extends="android.text.method.BaseKeyListener"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="android.text.SpanWatcher">
+</implements>
+<constructor name="MultiTapKeyListener"
+ type="android.text.method.MultiTapKeyListener"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="cap" type="android.text.method.TextKeyListener.Capitalize">
+</parameter>
+<parameter name="autotext" type="boolean">
+</parameter>
+</constructor>
+<method name="getInputType"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getInstance"
+ return="android.text.method.MultiTapKeyListener"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="autotext" type="boolean">
+</parameter>
+<parameter name="cap" type="android.text.method.TextKeyListener.Capitalize">
+</parameter>
+</method>
+<method name="onSpanAdded"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="s" type="android.text.Spannable">
+</parameter>
+<parameter name="what" type="java.lang.Object">
+</parameter>
+<parameter name="start" type="int">
+</parameter>
+<parameter name="end" type="int">
+</parameter>
+</method>
+<method name="onSpanChanged"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="buf" type="android.text.Spannable">
+</parameter>
+<parameter name="what" type="java.lang.Object">
+</parameter>
+<parameter name="s" type="int">
+</parameter>
+<parameter name="e" type="int">
+</parameter>
+<parameter name="start" type="int">
+</parameter>
+<parameter name="stop" type="int">
+</parameter>
+</method>
+<method name="onSpanRemoved"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="s" type="android.text.Spannable">
+</parameter>
+<parameter name="what" type="java.lang.Object">
+</parameter>
+<parameter name="start" type="int">
+</parameter>
+<parameter name="end" type="int">
+</parameter>
+</method>
+</class>
+<class name="NumberKeyListener"
+ extends="android.text.method.BaseKeyListener"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="android.text.InputFilter">
+</implements>
+<constructor name="NumberKeyListener"
+ type="android.text.method.NumberKeyListener"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<method name="filter"
+ return="java.lang.CharSequence"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="source" type="java.lang.CharSequence">
+</parameter>
+<parameter name="start" type="int">
+</parameter>
+<parameter name="end" type="int">
+</parameter>
+<parameter name="dest" type="android.text.Spanned">
+</parameter>
+<parameter name="dstart" type="int">
+</parameter>
+<parameter name="dend" type="int">
+</parameter>
+</method>
+<method name="getAcceptedChars"
+ return="char[]"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</method>
+<method name="lookup"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="event" type="android.view.KeyEvent">
+</parameter>
+<parameter name="content" type="android.text.Spannable">
+</parameter>
+</method>
+<method name="ok"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="accept" type="char[]">
+</parameter>
+<parameter name="c" type="char">
+</parameter>
+</method>
+</class>
+<class name="PasswordTransformationMethod"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="android.text.TextWatcher">
+</implements>
+<implements name="android.text.method.TransformationMethod">
+</implements>
+<constructor name="PasswordTransformationMethod"
+ type="android.text.method.PasswordTransformationMethod"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<method name="afterTextChanged"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="s" type="android.text.Editable">
+</parameter>
+</method>
+<method name="beforeTextChanged"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="s" type="java.lang.CharSequence">
+</parameter>
+<parameter name="start" type="int">
+</parameter>
+<parameter name="count" type="int">
+</parameter>
+<parameter name="after" type="int">
+</parameter>
+</method>
+<method name="getInstance"
+ return="android.text.method.PasswordTransformationMethod"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getTransformation"
+ return="java.lang.CharSequence"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="source" type="java.lang.CharSequence">
+</parameter>
+<parameter name="view" type="android.view.View">
+</parameter>
+</method>
+<method name="onFocusChanged"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="view" type="android.view.View">
+</parameter>
+<parameter name="sourceText" type="java.lang.CharSequence">
+</parameter>
+<parameter name="focused" type="boolean">
+</parameter>
+<parameter name="direction" type="int">
+</parameter>
+<parameter name="previouslyFocusedRect" type="android.graphics.Rect">
+</parameter>
+</method>
+<method name="onTextChanged"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="s" type="java.lang.CharSequence">
+</parameter>
+<parameter name="start" type="int">
+</parameter>
+<parameter name="before" type="int">
+</parameter>
+<parameter name="count" type="int">
+</parameter>
+</method>
+</class>
+<class name="QwertyKeyListener"
+ extends="android.text.method.BaseKeyListener"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="QwertyKeyListener"
+ type="android.text.method.QwertyKeyListener"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="cap" type="android.text.method.TextKeyListener.Capitalize">
+</parameter>
+<parameter name="autotext" type="boolean">
+</parameter>
+</constructor>
+<method name="getInputType"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getInstance"
+ return="android.text.method.QwertyKeyListener"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="autotext" type="boolean">
+</parameter>
+<parameter name="cap" type="android.text.method.TextKeyListener.Capitalize">
+</parameter>
+</method>
+<method name="markAsReplaced"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="content" type="android.text.Spannable">
+</parameter>
+<parameter name="start" type="int">
+</parameter>
+<parameter name="end" type="int">
+</parameter>
+<parameter name="original" type="java.lang.String">
+</parameter>
+</method>
+</class>
+<class name="ReplacementTransformationMethod"
+ extends="java.lang.Object"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="android.text.method.TransformationMethod">
+</implements>
+<constructor name="ReplacementTransformationMethod"
+ type="android.text.method.ReplacementTransformationMethod"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<method name="getOriginal"
+ return="char[]"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</method>
+<method name="getReplacement"
+ return="char[]"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</method>
+<method name="getTransformation"
+ return="java.lang.CharSequence"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="source" type="java.lang.CharSequence">
+</parameter>
+<parameter name="v" type="android.view.View">
+</parameter>
+</method>
+<method name="onFocusChanged"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="view" type="android.view.View">
+</parameter>
+<parameter name="sourceText" type="java.lang.CharSequence">
+</parameter>
+<parameter name="focused" type="boolean">
+</parameter>
+<parameter name="direction" type="int">
+</parameter>
+<parameter name="previouslyFocusedRect" type="android.graphics.Rect">
+</parameter>
+</method>
+</class>
+<class name="ScrollingMovementMethod"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="android.text.method.MovementMethod">
+</implements>
+<constructor name="ScrollingMovementMethod"
+ type="android.text.method.ScrollingMovementMethod"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<method name="canSelectArbitrarily"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="down"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="widget" type="android.widget.TextView">
+</parameter>
+<parameter name="buffer" type="android.text.Spannable">
+</parameter>
+</method>
+<method name="getInstance"
+ return="android.text.method.MovementMethod"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="initialize"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="widget" type="android.widget.TextView">
+</parameter>
+<parameter name="text" type="android.text.Spannable">
+</parameter>
+</method>
+<method name="left"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="widget" type="android.widget.TextView">
+</parameter>
+<parameter name="buffer" type="android.text.Spannable">
+</parameter>
+</method>
+<method name="onKeyDown"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="widget" type="android.widget.TextView">
+</parameter>
+<parameter name="buffer" type="android.text.Spannable">
+</parameter>
+<parameter name="keyCode" type="int">
+</parameter>
+<parameter name="event" type="android.view.KeyEvent">
+</parameter>
+</method>
+<method name="onKeyOther"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="view" type="android.widget.TextView">
+</parameter>
+<parameter name="text" type="android.text.Spannable">
+</parameter>
+<parameter name="event" type="android.view.KeyEvent">
+</parameter>
+</method>
+<method name="onKeyUp"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="widget" type="android.widget.TextView">
+</parameter>
+<parameter name="buffer" type="android.text.Spannable">
+</parameter>
+<parameter name="keyCode" type="int">
+</parameter>
+<parameter name="event" type="android.view.KeyEvent">
+</parameter>
+</method>
+<method name="onTakeFocus"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="widget" type="android.widget.TextView">
+</parameter>
+<parameter name="text" type="android.text.Spannable">
+</parameter>
+<parameter name="dir" type="int">
+</parameter>
+</method>
+<method name="onTouchEvent"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="widget" type="android.widget.TextView">
+</parameter>
+<parameter name="buffer" type="android.text.Spannable">
+</parameter>
+<parameter name="event" type="android.view.MotionEvent">
+</parameter>
+</method>
+<method name="onTrackballEvent"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="widget" type="android.widget.TextView">
+</parameter>
+<parameter name="text" type="android.text.Spannable">
+</parameter>
+<parameter name="event" type="android.view.MotionEvent">
+</parameter>
+</method>
+<method name="right"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="widget" type="android.widget.TextView">
+</parameter>
+<parameter name="buffer" type="android.text.Spannable">
+</parameter>
+</method>
+<method name="up"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="widget" type="android.widget.TextView">
+</parameter>
+<parameter name="buffer" type="android.text.Spannable">
+</parameter>
+</method>
+</class>
+<class name="SingleLineTransformationMethod"
+ extends="android.text.method.ReplacementTransformationMethod"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="SingleLineTransformationMethod"
+ type="android.text.method.SingleLineTransformationMethod"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<method name="getInstance"
+ return="android.text.method.SingleLineTransformationMethod"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getOriginal"
+ return="char[]"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</method>
+<method name="getReplacement"
+ return="char[]"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</method>
+</class>
+<class name="TextKeyListener"
+ extends="android.text.method.BaseKeyListener"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="android.text.SpanWatcher">
+</implements>
+<constructor name="TextKeyListener"
+ type="android.text.method.TextKeyListener"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="cap" type="android.text.method.TextKeyListener.Capitalize">
+</parameter>
+<parameter name="autotext" type="boolean">
+</parameter>
+</constructor>
+<method name="clear"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="e" type="android.text.Editable">
+</parameter>
+</method>
+<method name="getInputType"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getInstance"
+ return="android.text.method.TextKeyListener"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="autotext" type="boolean">
+</parameter>
+<parameter name="cap" type="android.text.method.TextKeyListener.Capitalize">
+</parameter>
+</method>
+<method name="getInstance"
+ return="android.text.method.TextKeyListener"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="onSpanAdded"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="s" type="android.text.Spannable">
+</parameter>
+<parameter name="what" type="java.lang.Object">
+</parameter>
+<parameter name="start" type="int">
+</parameter>
+<parameter name="end" type="int">
+</parameter>
+</method>
+<method name="onSpanChanged"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="s" type="android.text.Spannable">
+</parameter>
+<parameter name="what" type="java.lang.Object">
+</parameter>
+<parameter name="start" type="int">
+</parameter>
+<parameter name="end" type="int">
+</parameter>
+<parameter name="st" type="int">
+</parameter>
+<parameter name="en" type="int">
+</parameter>
+</method>
+<method name="onSpanRemoved"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="s" type="android.text.Spannable">
+</parameter>
+<parameter name="what" type="java.lang.Object">
+</parameter>
+<parameter name="start" type="int">
+</parameter>
+<parameter name="end" type="int">
+</parameter>
+</method>
+<method name="release"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="shouldCap"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="cap" type="android.text.method.TextKeyListener.Capitalize">
+</parameter>
+<parameter name="cs" type="java.lang.CharSequence">
+</parameter>
+<parameter name="off" type="int">
+</parameter>
+</method>
+</class>
+<class name="TextKeyListener.Capitalize"
+ extends="java.lang.Enum"
+ abstract="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="valueOf"
+ return="android.text.method.TextKeyListener.Capitalize"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+</method>
+<method name="values"
+ return="android.text.method.TextKeyListener.Capitalize[]"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+</class>
+<class name="TimeKeyListener"
+ extends="android.text.method.NumberKeyListener"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="TimeKeyListener"
+ type="android.text.method.TimeKeyListener"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<method name="getAcceptedChars"
+ return="char[]"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</method>
+<method name="getInputType"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getInstance"
+ return="android.text.method.TimeKeyListener"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<field name="CHARACTERS"
+ type="char[]"
+ transient="false"
+ volatile="false"
+ value="null"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<class name="Touch"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="getInitialScrollX"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="widget" type="android.widget.TextView">
+</parameter>
+<parameter name="buffer" type="android.text.Spannable">
+</parameter>
+</method>
+<method name="getInitialScrollY"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="widget" type="android.widget.TextView">
+</parameter>
+<parameter name="buffer" type="android.text.Spannable">
+</parameter>
+</method>
+<method name="onTouchEvent"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="widget" type="android.widget.TextView">
+</parameter>
+<parameter name="buffer" type="android.text.Spannable">
+</parameter>
+<parameter name="event" type="android.view.MotionEvent">
+</parameter>
+</method>
+<method name="scrollTo"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="widget" type="android.widget.TextView">
+</parameter>
+<parameter name="layout" type="android.text.Layout">
+</parameter>
+<parameter name="x" type="int">
+</parameter>
+<parameter name="y" type="int">
+</parameter>
+</method>
+</class>
+<interface name="TransformationMethod"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="getTransformation"
+ return="java.lang.CharSequence"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="source" type="java.lang.CharSequence">
+</parameter>
+<parameter name="view" type="android.view.View">
+</parameter>
+</method>
+<method name="onFocusChanged"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="view" type="android.view.View">
+</parameter>
+<parameter name="sourceText" type="java.lang.CharSequence">
+</parameter>
+<parameter name="focused" type="boolean">
+</parameter>
+<parameter name="direction" type="int">
+</parameter>
+<parameter name="previouslyFocusedRect" type="android.graphics.Rect">
+</parameter>
+</method>
+</interface>
+</package>
+<package name="android.text.style"
+>
+<class name="AbsoluteSizeSpan"
+ extends="android.text.style.MetricAffectingSpan"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="android.text.ParcelableSpan">
+</implements>
+<constructor name="AbsoluteSizeSpan"
+ type="android.text.style.AbsoluteSizeSpan"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="size" type="int">
+</parameter>
+</constructor>
+<constructor name="AbsoluteSizeSpan"
+ type="android.text.style.AbsoluteSizeSpan"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="size" type="int">
+</parameter>
+<parameter name="dip" type="boolean">
+</parameter>
+</constructor>
+<constructor name="AbsoluteSizeSpan"
+ type="android.text.style.AbsoluteSizeSpan"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="src" type="android.os.Parcel">
+</parameter>
+</constructor>
+<method name="describeContents"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getDip"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getSize"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getSpanTypeId"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="updateDrawState"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="ds" type="android.text.TextPaint">
+</parameter>
+</method>
+<method name="updateMeasureState"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="ds" type="android.text.TextPaint">
+</parameter>
+</method>
+<method name="writeToParcel"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="dest" type="android.os.Parcel">
+</parameter>
+<parameter name="flags" type="int">
+</parameter>
+</method>
+</class>
+<interface name="AlignmentSpan"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="android.text.style.ParagraphStyle">
+</implements>
+<method name="getAlignment"
+ return="android.text.Layout.Alignment"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+</interface>
+<class name="AlignmentSpan.Standard"
+ extends="java.lang.Object"
+ abstract="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="android.text.style.AlignmentSpan">
+</implements>
+<implements name="android.text.ParcelableSpan">
+</implements>
+<constructor name="AlignmentSpan.Standard"
+ type="android.text.style.AlignmentSpan.Standard"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="align" type="android.text.Layout.Alignment">
+</parameter>
+</constructor>
+<constructor name="AlignmentSpan.Standard"
+ type="android.text.style.AlignmentSpan.Standard"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="src" type="android.os.Parcel">
+</parameter>
+</constructor>
+<method name="describeContents"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getAlignment"
+ return="android.text.Layout.Alignment"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getSpanTypeId"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="writeToParcel"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="dest" type="android.os.Parcel">
+</parameter>
+<parameter name="flags" type="int">
+</parameter>
+</method>
+</class>
+<class name="BackgroundColorSpan"
+ extends="android.text.style.CharacterStyle"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="android.text.ParcelableSpan">
+</implements>
+<implements name="android.text.style.UpdateAppearance">
+</implements>
+<constructor name="BackgroundColorSpan"
+ type="android.text.style.BackgroundColorSpan"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="color" type="int">
+</parameter>
+</constructor>
+<constructor name="BackgroundColorSpan"
+ type="android.text.style.BackgroundColorSpan"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="src" type="android.os.Parcel">
+</parameter>
+</constructor>
+<method name="describeContents"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getBackgroundColor"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getSpanTypeId"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="updateDrawState"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="ds" type="android.text.TextPaint">
+</parameter>
+</method>
+<method name="writeToParcel"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="dest" type="android.os.Parcel">
+</parameter>
+<parameter name="flags" type="int">
+</parameter>
+</method>
+</class>
+<class name="BulletSpan"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="android.text.style.LeadingMarginSpan">
+</implements>
+<implements name="android.text.ParcelableSpan">
+</implements>
+<constructor name="BulletSpan"
+ type="android.text.style.BulletSpan"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<constructor name="BulletSpan"
+ type="android.text.style.BulletSpan"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="gapWidth" type="int">
+</parameter>
+</constructor>
+<constructor name="BulletSpan"
+ type="android.text.style.BulletSpan"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="gapWidth" type="int">
+</parameter>
+<parameter name="color" type="int">
+</parameter>
+</constructor>
+<constructor name="BulletSpan"
+ type="android.text.style.BulletSpan"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="src" type="android.os.Parcel">
+</parameter>
+</constructor>
+<method name="describeContents"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="drawLeadingMargin"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="c" type="android.graphics.Canvas">
+</parameter>
+<parameter name="p" type="android.graphics.Paint">
+</parameter>
+<parameter name="x" type="int">
+</parameter>
+<parameter name="dir" type="int">
+</parameter>
+<parameter name="top" type="int">
+</parameter>
+<parameter name="baseline" type="int">
+</parameter>
+<parameter name="bottom" type="int">
+</parameter>
+<parameter name="text" type="java.lang.CharSequence">
+</parameter>
+<parameter name="start" type="int">
+</parameter>
+<parameter name="end" type="int">
+</parameter>
+<parameter name="first" type="boolean">
+</parameter>
+<parameter name="l" type="android.text.Layout">
+</parameter>
+</method>
+<method name="getLeadingMargin"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="first" type="boolean">
+</parameter>
+</method>
+<method name="getSpanTypeId"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="writeToParcel"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="dest" type="android.os.Parcel">
+</parameter>
+<parameter name="flags" type="int">
+</parameter>
+</method>
+<field name="STANDARD_GAP_WIDTH"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<class name="CharacterStyle"
+ extends="java.lang.Object"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="CharacterStyle"
+ type="android.text.style.CharacterStyle"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<method name="getUnderlying"
+ return="android.text.style.CharacterStyle"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="updateDrawState"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="tp" type="android.text.TextPaint">
+</parameter>
+</method>
+<method name="wrap"
+ return="android.text.style.CharacterStyle"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="cs" type="android.text.style.CharacterStyle">
+</parameter>
+</method>
+</class>
+<class name="ClickableSpan"
+ extends="android.text.style.CharacterStyle"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="android.text.style.UpdateAppearance">
+</implements>
+<constructor name="ClickableSpan"
+ type="android.text.style.ClickableSpan"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<method name="onClick"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="widget" type="android.view.View">
+</parameter>
+</method>
+<method name="updateDrawState"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="ds" type="android.text.TextPaint">
+</parameter>
+</method>
+</class>
+<class name="DrawableMarginSpan"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="android.text.style.LeadingMarginSpan">
+</implements>
+<implements name="android.text.style.LineHeightSpan">
+</implements>
+<constructor name="DrawableMarginSpan"
+ type="android.text.style.DrawableMarginSpan"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="b" type="android.graphics.drawable.Drawable">
+</parameter>
+</constructor>
+<constructor name="DrawableMarginSpan"
+ type="android.text.style.DrawableMarginSpan"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="b" type="android.graphics.drawable.Drawable">
+</parameter>
+<parameter name="pad" type="int">
+</parameter>
+</constructor>
+<method name="chooseHeight"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="text" type="java.lang.CharSequence">
+</parameter>
+<parameter name="start" type="int">
+</parameter>
+<parameter name="end" type="int">
+</parameter>
+<parameter name="istartv" type="int">
+</parameter>
+<parameter name="v" type="int">
+</parameter>
+<parameter name="fm" type="android.graphics.Paint.FontMetricsInt">
+</parameter>
+</method>
+<method name="drawLeadingMargin"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="c" type="android.graphics.Canvas">
+</parameter>
+<parameter name="p" type="android.graphics.Paint">
+</parameter>
+<parameter name="x" type="int">
+</parameter>
+<parameter name="dir" type="int">
+</parameter>
+<parameter name="top" type="int">
+</parameter>
+<parameter name="baseline" type="int">
+</parameter>
+<parameter name="bottom" type="int">
+</parameter>
+<parameter name="text" type="java.lang.CharSequence">
+</parameter>
+<parameter name="start" type="int">
+</parameter>
+<parameter name="end" type="int">
+</parameter>
+<parameter name="first" type="boolean">
+</parameter>
+<parameter name="layout" type="android.text.Layout">
+</parameter>
+</method>
+<method name="getLeadingMargin"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="first" type="boolean">
+</parameter>
+</method>
+</class>
+<class name="DynamicDrawableSpan"
+ extends="android.text.style.ReplacementSpan"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="DynamicDrawableSpan"
+ type="android.text.style.DynamicDrawableSpan"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<constructor name="DynamicDrawableSpan"
+ type="android.text.style.DynamicDrawableSpan"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="verticalAlignment" type="int">
+</parameter>
+</constructor>
+<method name="draw"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="canvas" type="android.graphics.Canvas">
+</parameter>
+<parameter name="text" type="java.lang.CharSequence">
+</parameter>
+<parameter name="start" type="int">
+</parameter>
+<parameter name="end" type="int">
+</parameter>
+<parameter name="x" type="float">
+</parameter>
+<parameter name="top" type="int">
+</parameter>
+<parameter name="y" type="int">
+</parameter>
+<parameter name="bottom" type="int">
+</parameter>
+<parameter name="paint" type="android.graphics.Paint">
+</parameter>
+</method>
+<method name="getDrawable"
+ return="android.graphics.drawable.Drawable"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getSize"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="paint" type="android.graphics.Paint">
+</parameter>
+<parameter name="text" type="java.lang.CharSequence">
+</parameter>
+<parameter name="start" type="int">
+</parameter>
+<parameter name="end" type="int">
+</parameter>
+<parameter name="fm" type="android.graphics.Paint.FontMetricsInt">
+</parameter>
+</method>
+<method name="getVerticalAlignment"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<field name="ALIGN_BASELINE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ALIGN_BOTTOM"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="0"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="mVerticalAlignment"
+ type="int"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</field>
+</class>
+<class name="ForegroundColorSpan"
+ extends="android.text.style.CharacterStyle"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="android.text.ParcelableSpan">
+</implements>
+<implements name="android.text.style.UpdateAppearance">
+</implements>
+<constructor name="ForegroundColorSpan"
+ type="android.text.style.ForegroundColorSpan"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="color" type="int">
+</parameter>
+</constructor>
+<constructor name="ForegroundColorSpan"
+ type="android.text.style.ForegroundColorSpan"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="src" type="android.os.Parcel">
+</parameter>
+</constructor>
+<method name="describeContents"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getForegroundColor"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getSpanTypeId"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="updateDrawState"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="ds" type="android.text.TextPaint">
+</parameter>
+</method>
+<method name="writeToParcel"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="dest" type="android.os.Parcel">
+</parameter>
+<parameter name="flags" type="int">
+</parameter>
+</method>
+</class>
+<class name="IconMarginSpan"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="android.text.style.LeadingMarginSpan">
+</implements>
+<implements name="android.text.style.LineHeightSpan">
+</implements>
+<constructor name="IconMarginSpan"
+ type="android.text.style.IconMarginSpan"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="b" type="android.graphics.Bitmap">
+</parameter>
+</constructor>
+<constructor name="IconMarginSpan"
+ type="android.text.style.IconMarginSpan"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="b" type="android.graphics.Bitmap">
+</parameter>
+<parameter name="pad" type="int">
+</parameter>
+</constructor>
+<method name="chooseHeight"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="text" type="java.lang.CharSequence">
+</parameter>
+<parameter name="start" type="int">
+</parameter>
+<parameter name="end" type="int">
+</parameter>
+<parameter name="istartv" type="int">
+</parameter>
+<parameter name="v" type="int">
+</parameter>
+<parameter name="fm" type="android.graphics.Paint.FontMetricsInt">
+</parameter>
+</method>
+<method name="drawLeadingMargin"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="c" type="android.graphics.Canvas">
+</parameter>
+<parameter name="p" type="android.graphics.Paint">
+</parameter>
+<parameter name="x" type="int">
+</parameter>
+<parameter name="dir" type="int">
+</parameter>
+<parameter name="top" type="int">
+</parameter>
+<parameter name="baseline" type="int">
+</parameter>
+<parameter name="bottom" type="int">
+</parameter>
+<parameter name="text" type="java.lang.CharSequence">
+</parameter>
+<parameter name="start" type="int">
+</parameter>
+<parameter name="end" type="int">
+</parameter>
+<parameter name="first" type="boolean">
+</parameter>
+<parameter name="layout" type="android.text.Layout">
+</parameter>
+</method>
+<method name="getLeadingMargin"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="first" type="boolean">
+</parameter>
+</method>
+</class>
+<class name="ImageSpan"
+ extends="android.text.style.DynamicDrawableSpan"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="ImageSpan"
+ type="android.text.style.ImageSpan"
+ static="false"
+ final="false"
+ deprecated="deprecated"
+ visibility="public"
+>
+<parameter name="b" type="android.graphics.Bitmap">
+</parameter>
+</constructor>
+<constructor name="ImageSpan"
+ type="android.text.style.ImageSpan"
+ static="false"
+ final="false"
+ deprecated="deprecated"
+ visibility="public"
+>
+<parameter name="b" type="android.graphics.Bitmap">
+</parameter>
+<parameter name="verticalAlignment" type="int">
+</parameter>
+</constructor>
+<constructor name="ImageSpan"
+ type="android.text.style.ImageSpan"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="context" type="android.content.Context">
+</parameter>
+<parameter name="b" type="android.graphics.Bitmap">
+</parameter>
+</constructor>
+<constructor name="ImageSpan"
+ type="android.text.style.ImageSpan"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="context" type="android.content.Context">
+</parameter>
+<parameter name="b" type="android.graphics.Bitmap">
+</parameter>
+<parameter name="verticalAlignment" type="int">
+</parameter>
+</constructor>
+<constructor name="ImageSpan"
+ type="android.text.style.ImageSpan"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="d" type="android.graphics.drawable.Drawable">
+</parameter>
+</constructor>
+<constructor name="ImageSpan"
+ type="android.text.style.ImageSpan"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="d" type="android.graphics.drawable.Drawable">
+</parameter>
+<parameter name="verticalAlignment" type="int">
+</parameter>
+</constructor>
+<constructor name="ImageSpan"
+ type="android.text.style.ImageSpan"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="d" type="android.graphics.drawable.Drawable">
+</parameter>
+<parameter name="source" type="java.lang.String">
+</parameter>
+</constructor>
+<constructor name="ImageSpan"
+ type="android.text.style.ImageSpan"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="d" type="android.graphics.drawable.Drawable">
+</parameter>
+<parameter name="source" type="java.lang.String">
+</parameter>
+<parameter name="verticalAlignment" type="int">
+</parameter>
+</constructor>
+<constructor name="ImageSpan"
+ type="android.text.style.ImageSpan"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="context" type="android.content.Context">
+</parameter>
+<parameter name="uri" type="android.net.Uri">
+</parameter>
+</constructor>
+<constructor name="ImageSpan"
+ type="android.text.style.ImageSpan"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="context" type="android.content.Context">
+</parameter>
+<parameter name="uri" type="android.net.Uri">
+</parameter>
+<parameter name="verticalAlignment" type="int">
+</parameter>
+</constructor>
+<constructor name="ImageSpan"
+ type="android.text.style.ImageSpan"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="context" type="android.content.Context">
+</parameter>
+<parameter name="resourceId" type="int">
+</parameter>
+</constructor>
+<constructor name="ImageSpan"
+ type="android.text.style.ImageSpan"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="context" type="android.content.Context">
+</parameter>
+<parameter name="resourceId" type="int">
+</parameter>
+<parameter name="verticalAlignment" type="int">
+</parameter>
+</constructor>
+<method name="getDrawable"
+ return="android.graphics.drawable.Drawable"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getSource"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+</class>
+<interface name="LeadingMarginSpan"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="android.text.style.ParagraphStyle">
+</implements>
+<method name="drawLeadingMargin"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="c" type="android.graphics.Canvas">
+</parameter>
+<parameter name="p" type="android.graphics.Paint">
+</parameter>
+<parameter name="x" type="int">
+</parameter>
+<parameter name="dir" type="int">
+</parameter>
+<parameter name="top" type="int">
+</parameter>
+<parameter name="baseline" type="int">
+</parameter>
+<parameter name="bottom" type="int">
+</parameter>
+<parameter name="text" type="java.lang.CharSequence">
+</parameter>
+<parameter name="start" type="int">
+</parameter>
+<parameter name="end" type="int">
+</parameter>
+<parameter name="first" type="boolean">
+</parameter>
+<parameter name="layout" type="android.text.Layout">
+</parameter>
+</method>
+<method name="getLeadingMargin"
+ return="int"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="first" type="boolean">
+</parameter>
+</method>
+</interface>
+<interface name="LeadingMarginSpan.LeadingMarginSpan2"
+ abstract="true"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="android.text.style.LeadingMarginSpan">
+</implements>
+<implements name="android.text.style.WrapTogetherSpan">
+</implements>
+<method name="getLeadingMarginLineCount"
+ return="int"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+</interface>
+<class name="LeadingMarginSpan.Standard"
+ extends="java.lang.Object"
+ abstract="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="android.text.style.LeadingMarginSpan">
+</implements>
+<implements name="android.text.ParcelableSpan">
+</implements>
+<constructor name="LeadingMarginSpan.Standard"
+ type="android.text.style.LeadingMarginSpan.Standard"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="first" type="int">
+</parameter>
+<parameter name="rest" type="int">
+</parameter>
+</constructor>
+<constructor name="LeadingMarginSpan.Standard"
+ type="android.text.style.LeadingMarginSpan.Standard"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="every" type="int">
+</parameter>
+</constructor>
+<constructor name="LeadingMarginSpan.Standard"
+ type="android.text.style.LeadingMarginSpan.Standard"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="src" type="android.os.Parcel">
+</parameter>
+</constructor>
+<method name="describeContents"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="drawLeadingMargin"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="c" type="android.graphics.Canvas">
+</parameter>
+<parameter name="p" type="android.graphics.Paint">
+</parameter>
+<parameter name="x" type="int">
+</parameter>
+<parameter name="dir" type="int">
+</parameter>
+<parameter name="top" type="int">
+</parameter>
+<parameter name="baseline" type="int">
+</parameter>
+<parameter name="bottom" type="int">
+</parameter>
+<parameter name="text" type="java.lang.CharSequence">
+</parameter>
+<parameter name="start" type="int">
+</parameter>
+<parameter name="end" type="int">
+</parameter>
+<parameter name="first" type="boolean">
+</parameter>
+<parameter name="layout" type="android.text.Layout">
+</parameter>
+</method>
+<method name="getLeadingMargin"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="first" type="boolean">
+</parameter>
+</method>
+<method name="getSpanTypeId"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="writeToParcel"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="dest" type="android.os.Parcel">
+</parameter>
+<parameter name="flags" type="int">
+</parameter>
+</method>
+</class>
+<interface name="LineBackgroundSpan"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="android.text.style.ParagraphStyle">
+</implements>
+<method name="drawBackground"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="c" type="android.graphics.Canvas">
+</parameter>
+<parameter name="p" type="android.graphics.Paint">
+</parameter>
+<parameter name="left" type="int">
+</parameter>
+<parameter name="right" type="int">
+</parameter>
+<parameter name="top" type="int">
+</parameter>
+<parameter name="baseline" type="int">
+</parameter>
+<parameter name="bottom" type="int">
+</parameter>
+<parameter name="text" type="java.lang.CharSequence">
+</parameter>
+<parameter name="start" type="int">
+</parameter>
+<parameter name="end" type="int">
+</parameter>
+<parameter name="lnum" type="int">
+</parameter>
+</method>
+</interface>
+<interface name="LineHeightSpan"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="android.text.style.ParagraphStyle">
+</implements>
+<implements name="android.text.style.WrapTogetherSpan">
+</implements>
+<method name="chooseHeight"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="text" type="java.lang.CharSequence">
+</parameter>
+<parameter name="start" type="int">
+</parameter>
+<parameter name="end" type="int">
+</parameter>
+<parameter name="spanstartv" type="int">
+</parameter>
+<parameter name="v" type="int">
+</parameter>
+<parameter name="fm" type="android.graphics.Paint.FontMetricsInt">
+</parameter>
+</method>
+</interface>
+<interface name="LineHeightSpan.WithDensity"
+ abstract="true"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="android.text.style.LineHeightSpan">
+</implements>
+<method name="chooseHeight"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="text" type="java.lang.CharSequence">
+</parameter>
+<parameter name="start" type="int">
+</parameter>
+<parameter name="end" type="int">
+</parameter>
+<parameter name="spanstartv" type="int">
+</parameter>
+<parameter name="v" type="int">
+</parameter>
+<parameter name="fm" type="android.graphics.Paint.FontMetricsInt">
+</parameter>
+<parameter name="paint" type="android.text.TextPaint">
+</parameter>
+</method>
+</interface>
+<class name="MaskFilterSpan"
+ extends="android.text.style.CharacterStyle"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="android.text.style.UpdateAppearance">
+</implements>
+<constructor name="MaskFilterSpan"
+ type="android.text.style.MaskFilterSpan"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="filter" type="android.graphics.MaskFilter">
+</parameter>
+</constructor>
+<method name="getMaskFilter"
+ return="android.graphics.MaskFilter"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="updateDrawState"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="ds" type="android.text.TextPaint">
+</parameter>
+</method>
+</class>
+<class name="MetricAffectingSpan"
+ extends="android.text.style.CharacterStyle"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="android.text.style.UpdateLayout">
+</implements>
+<constructor name="MetricAffectingSpan"
+ type="android.text.style.MetricAffectingSpan"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<method name="updateMeasureState"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="p" type="android.text.TextPaint">
+</parameter>
+</method>
+</class>
+<interface name="ParagraphStyle"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</interface>
+<class name="QuoteSpan"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="android.text.style.LeadingMarginSpan">
+</implements>
+<implements name="android.text.ParcelableSpan">
+</implements>
+<constructor name="QuoteSpan"
+ type="android.text.style.QuoteSpan"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<constructor name="QuoteSpan"
+ type="android.text.style.QuoteSpan"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="color" type="int">
+</parameter>
+</constructor>
+<constructor name="QuoteSpan"
+ type="android.text.style.QuoteSpan"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="src" type="android.os.Parcel">
+</parameter>
+</constructor>
+<method name="describeContents"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="drawLeadingMargin"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="c" type="android.graphics.Canvas">
+</parameter>
+<parameter name="p" type="android.graphics.Paint">
+</parameter>
+<parameter name="x" type="int">
+</parameter>
+<parameter name="dir" type="int">
+</parameter>
+<parameter name="top" type="int">
+</parameter>
+<parameter name="baseline" type="int">
+</parameter>
+<parameter name="bottom" type="int">
+</parameter>
+<parameter name="text" type="java.lang.CharSequence">
+</parameter>
+<parameter name="start" type="int">
+</parameter>
+<parameter name="end" type="int">
+</parameter>
+<parameter name="first" type="boolean">
+</parameter>
+<parameter name="layout" type="android.text.Layout">
+</parameter>
+</method>
+<method name="getColor"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getLeadingMargin"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="first" type="boolean">
+</parameter>
+</method>
+<method name="getSpanTypeId"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="writeToParcel"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="dest" type="android.os.Parcel">
+</parameter>
+<parameter name="flags" type="int">
+</parameter>
+</method>
+</class>
+<class name="RasterizerSpan"
+ extends="android.text.style.CharacterStyle"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="android.text.style.UpdateAppearance">
+</implements>
+<constructor name="RasterizerSpan"
+ type="android.text.style.RasterizerSpan"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="r" type="android.graphics.Rasterizer">
+</parameter>
+</constructor>
+<method name="getRasterizer"
+ return="android.graphics.Rasterizer"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="updateDrawState"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="ds" type="android.text.TextPaint">
+</parameter>
+</method>
+</class>
+<class name="RelativeSizeSpan"
+ extends="android.text.style.MetricAffectingSpan"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="android.text.ParcelableSpan">
+</implements>
+<constructor name="RelativeSizeSpan"
+ type="android.text.style.RelativeSizeSpan"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="proportion" type="float">
+</parameter>
+</constructor>
+<constructor name="RelativeSizeSpan"
+ type="android.text.style.RelativeSizeSpan"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="src" type="android.os.Parcel">
+</parameter>
+</constructor>
+<method name="describeContents"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getSizeChange"
+ return="float"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getSpanTypeId"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="updateDrawState"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="ds" type="android.text.TextPaint">
+</parameter>
+</method>
+<method name="updateMeasureState"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="ds" type="android.text.TextPaint">
+</parameter>
+</method>
+<method name="writeToParcel"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="dest" type="android.os.Parcel">
+</parameter>
+<parameter name="flags" type="int">
+</parameter>
+</method>
+</class>
+<class name="ReplacementSpan"
+ extends="android.text.style.MetricAffectingSpan"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="ReplacementSpan"
+ type="android.text.style.ReplacementSpan"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<method name="draw"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="canvas" type="android.graphics.Canvas">
+</parameter>
+<parameter name="text" type="java.lang.CharSequence">
+</parameter>
+<parameter name="start" type="int">
+</parameter>
+<parameter name="end" type="int">
+</parameter>
+<parameter name="x" type="float">
+</parameter>
+<parameter name="top" type="int">
+</parameter>
+<parameter name="y" type="int">
+</parameter>
+<parameter name="bottom" type="int">
+</parameter>
+<parameter name="paint" type="android.graphics.Paint">
+</parameter>
+</method>
+<method name="getSize"
+ return="int"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="paint" type="android.graphics.Paint">
+</parameter>
+<parameter name="text" type="java.lang.CharSequence">
+</parameter>
+<parameter name="start" type="int">
+</parameter>
+<parameter name="end" type="int">
+</parameter>
+<parameter name="fm" type="android.graphics.Paint.FontMetricsInt">
+</parameter>
+</method>
+<method name="updateDrawState"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="ds" type="android.text.TextPaint">
+</parameter>
+</method>
+<method name="updateMeasureState"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="p" type="android.text.TextPaint">
+</parameter>
+</method>
+</class>
+<class name="ScaleXSpan"
+ extends="android.text.style.MetricAffectingSpan"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="android.text.ParcelableSpan">
+</implements>
+<constructor name="ScaleXSpan"
+ type="android.text.style.ScaleXSpan"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="proportion" type="float">
+</parameter>
+</constructor>
+<constructor name="ScaleXSpan"
+ type="android.text.style.ScaleXSpan"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="src" type="android.os.Parcel">
+</parameter>
+</constructor>
+<method name="describeContents"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getScaleX"
+ return="float"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getSpanTypeId"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="updateDrawState"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="ds" type="android.text.TextPaint">
+</parameter>
+</method>
+<method name="updateMeasureState"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="ds" type="android.text.TextPaint">
+</parameter>
+</method>
+<method name="writeToParcel"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="dest" type="android.os.Parcel">
+</parameter>
+<parameter name="flags" type="int">
+</parameter>
+</method>
+</class>
+<class name="StrikethroughSpan"
+ extends="android.text.style.CharacterStyle"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="android.text.ParcelableSpan">
+</implements>
+<implements name="android.text.style.UpdateAppearance">
+</implements>
+<constructor name="StrikethroughSpan"
+ type="android.text.style.StrikethroughSpan"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<constructor name="StrikethroughSpan"
+ type="android.text.style.StrikethroughSpan"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="src" type="android.os.Parcel">
+</parameter>
+</constructor>
+<method name="describeContents"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getSpanTypeId"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="updateDrawState"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="ds" type="android.text.TextPaint">
+</parameter>
+</method>
+<method name="writeToParcel"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="dest" type="android.os.Parcel">
+</parameter>
+<parameter name="flags" type="int">
+</parameter>
+</method>
+</class>
+<class name="StyleSpan"
+ extends="android.text.style.MetricAffectingSpan"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="android.text.ParcelableSpan">
+</implements>
+<constructor name="StyleSpan"
+ type="android.text.style.StyleSpan"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="style" type="int">
+</parameter>
+</constructor>
+<constructor name="StyleSpan"
+ type="android.text.style.StyleSpan"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="src" type="android.os.Parcel">
+</parameter>
+</constructor>
+<method name="describeContents"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getSpanTypeId"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getStyle"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="updateDrawState"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="ds" type="android.text.TextPaint">
+</parameter>
+</method>
+<method name="updateMeasureState"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="paint" type="android.text.TextPaint">
+</parameter>
+</method>
+<method name="writeToParcel"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="dest" type="android.os.Parcel">
+</parameter>
+<parameter name="flags" type="int">
+</parameter>
+</method>
+</class>
+<class name="SubscriptSpan"
+ extends="android.text.style.MetricAffectingSpan"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="android.text.ParcelableSpan">
+</implements>
+<constructor name="SubscriptSpan"
+ type="android.text.style.SubscriptSpan"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<constructor name="SubscriptSpan"
+ type="android.text.style.SubscriptSpan"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="src" type="android.os.Parcel">
+</parameter>
+</constructor>
+<method name="describeContents"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getSpanTypeId"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="updateDrawState"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="tp" type="android.text.TextPaint">
+</parameter>
+</method>
+<method name="updateMeasureState"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="tp" type="android.text.TextPaint">
+</parameter>
+</method>
+<method name="writeToParcel"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="dest" type="android.os.Parcel">
+</parameter>
+<parameter name="flags" type="int">
+</parameter>
+</method>
+</class>
+<class name="SuperscriptSpan"
+ extends="android.text.style.MetricAffectingSpan"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="android.text.ParcelableSpan">
+</implements>
+<constructor name="SuperscriptSpan"
+ type="android.text.style.SuperscriptSpan"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<constructor name="SuperscriptSpan"
+ type="android.text.style.SuperscriptSpan"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="src" type="android.os.Parcel">
+</parameter>
+</constructor>
+<method name="describeContents"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getSpanTypeId"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="updateDrawState"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="tp" type="android.text.TextPaint">
+</parameter>
+</method>
+<method name="updateMeasureState"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="tp" type="android.text.TextPaint">
+</parameter>
+</method>
+<method name="writeToParcel"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="dest" type="android.os.Parcel">
+</parameter>
+<parameter name="flags" type="int">
+</parameter>
+</method>
+</class>
+<interface name="TabStopSpan"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="android.text.style.ParagraphStyle">
+</implements>
+<method name="getTabStop"
+ return="int"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+</interface>
+<class name="TabStopSpan.Standard"
+ extends="java.lang.Object"
+ abstract="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="android.text.style.TabStopSpan">
+</implements>
+<constructor name="TabStopSpan.Standard"
+ type="android.text.style.TabStopSpan.Standard"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="where" type="int">
+</parameter>
+</constructor>
+<method name="getTabStop"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+</class>
+<class name="TextAppearanceSpan"
+ extends="android.text.style.MetricAffectingSpan"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="android.text.ParcelableSpan">
+</implements>
+<constructor name="TextAppearanceSpan"
+ type="android.text.style.TextAppearanceSpan"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="context" type="android.content.Context">
+</parameter>
+<parameter name="appearance" type="int">
+</parameter>
+</constructor>
+<constructor name="TextAppearanceSpan"
+ type="android.text.style.TextAppearanceSpan"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="context" type="android.content.Context">
+</parameter>
+<parameter name="appearance" type="int">
+</parameter>
+<parameter name="colorList" type="int">
+</parameter>
+</constructor>
+<constructor name="TextAppearanceSpan"
+ type="android.text.style.TextAppearanceSpan"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="family" type="java.lang.String">
+</parameter>
+<parameter name="style" type="int">
+</parameter>
+<parameter name="size" type="int">
+</parameter>
+<parameter name="color" type="android.content.res.ColorStateList">
+</parameter>
+<parameter name="linkColor" type="android.content.res.ColorStateList">
+</parameter>
+</constructor>
+<constructor name="TextAppearanceSpan"
+ type="android.text.style.TextAppearanceSpan"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="src" type="android.os.Parcel">
+</parameter>
+</constructor>
+<method name="describeContents"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getFamily"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getLinkTextColor"
+ return="android.content.res.ColorStateList"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getSpanTypeId"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getTextColor"
+ return="android.content.res.ColorStateList"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getTextSize"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getTextStyle"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="updateDrawState"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="ds" type="android.text.TextPaint">
+</parameter>
+</method>
+<method name="updateMeasureState"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="ds" type="android.text.TextPaint">
+</parameter>
+</method>
+<method name="writeToParcel"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="dest" type="android.os.Parcel">
+</parameter>
+<parameter name="flags" type="int">
+</parameter>
+</method>
+</class>
+<class name="TypefaceSpan"
+ extends="android.text.style.MetricAffectingSpan"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="android.text.ParcelableSpan">
+</implements>
+<constructor name="TypefaceSpan"
+ type="android.text.style.TypefaceSpan"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="family" type="java.lang.String">
+</parameter>
+</constructor>
+<constructor name="TypefaceSpan"
+ type="android.text.style.TypefaceSpan"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="src" type="android.os.Parcel">
+</parameter>
+</constructor>
+<method name="describeContents"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getFamily"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getSpanTypeId"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="updateDrawState"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="ds" type="android.text.TextPaint">
+</parameter>
+</method>
+<method name="updateMeasureState"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="paint" type="android.text.TextPaint">
+</parameter>
+</method>
+<method name="writeToParcel"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="dest" type="android.os.Parcel">
+</parameter>
+<parameter name="flags" type="int">
+</parameter>
+</method>
+</class>
+<class name="URLSpan"
+ extends="android.text.style.ClickableSpan"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="android.text.ParcelableSpan">
+</implements>
+<constructor name="URLSpan"
+ type="android.text.style.URLSpan"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="url" type="java.lang.String">
+</parameter>
+</constructor>
+<constructor name="URLSpan"
+ type="android.text.style.URLSpan"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="src" type="android.os.Parcel">
+</parameter>
+</constructor>
+<method name="describeContents"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getSpanTypeId"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getURL"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="onClick"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="widget" type="android.view.View">
+</parameter>
+</method>
+<method name="writeToParcel"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="dest" type="android.os.Parcel">
+</parameter>
+<parameter name="flags" type="int">
+</parameter>
+</method>
+</class>
+<class name="UnderlineSpan"
+ extends="android.text.style.CharacterStyle"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="android.text.ParcelableSpan">
+</implements>
+<implements name="android.text.style.UpdateAppearance">
+</implements>
+<constructor name="UnderlineSpan"
+ type="android.text.style.UnderlineSpan"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<constructor name="UnderlineSpan"
+ type="android.text.style.UnderlineSpan"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="src" type="android.os.Parcel">
+</parameter>
+</constructor>
+<method name="describeContents"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getSpanTypeId"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="updateDrawState"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="ds" type="android.text.TextPaint">
+</parameter>
+</method>
+<method name="writeToParcel"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="dest" type="android.os.Parcel">
+</parameter>
+<parameter name="flags" type="int">
+</parameter>
+</method>
+</class>
+<interface name="UpdateAppearance"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</interface>
+<interface name="UpdateLayout"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="android.text.style.UpdateAppearance">
+</implements>
+</interface>
+<interface name="WrapTogetherSpan"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="android.text.style.ParagraphStyle">
+</implements>
+</interface>
+</package>
+<package name="android.text.util"
+>
+<class name="Linkify"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="Linkify"
+ type="android.text.util.Linkify"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<method name="addLinks"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="text" type="android.text.Spannable">
+</parameter>
+<parameter name="mask" type="int">
+</parameter>
+</method>
+<method name="addLinks"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="text" type="android.widget.TextView">
+</parameter>
+<parameter name="mask" type="int">
+</parameter>
+</method>
+<method name="addLinks"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="text" type="android.widget.TextView">
+</parameter>
+<parameter name="pattern" type="java.util.regex.Pattern">
+</parameter>
+<parameter name="scheme" type="java.lang.String">
+</parameter>
+</method>
+<method name="addLinks"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="text" type="android.widget.TextView">
+</parameter>
+<parameter name="p" type="java.util.regex.Pattern">
+</parameter>
+<parameter name="scheme" type="java.lang.String">
+</parameter>
+<parameter name="matchFilter" type="android.text.util.Linkify.MatchFilter">
+</parameter>
+<parameter name="transformFilter" type="android.text.util.Linkify.TransformFilter">
+</parameter>
+</method>
+<method name="addLinks"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="text" type="android.text.Spannable">
+</parameter>
+<parameter name="pattern" type="java.util.regex.Pattern">
+</parameter>
+<parameter name="scheme" type="java.lang.String">
+</parameter>
+</method>
+<method name="addLinks"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="s" type="android.text.Spannable">
+</parameter>
+<parameter name="p" type="java.util.regex.Pattern">
+</parameter>
+<parameter name="scheme" type="java.lang.String">
+</parameter>
+<parameter name="matchFilter" type="android.text.util.Linkify.MatchFilter">
+</parameter>
+<parameter name="transformFilter" type="android.text.util.Linkify.TransformFilter">
+</parameter>
+</method>
+<field name="ALL"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="15"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="EMAIL_ADDRESSES"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="MAP_ADDRESSES"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="8"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="PHONE_NUMBERS"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="4"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="WEB_URLS"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="sPhoneNumberMatchFilter"
+ type="android.text.util.Linkify.MatchFilter"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="sPhoneNumberTransformFilter"
+ type="android.text.util.Linkify.TransformFilter"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="sUrlMatchFilter"
+ type="android.text.util.Linkify.MatchFilter"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<interface name="Linkify.MatchFilter"
+ abstract="true"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="acceptMatch"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="s" type="java.lang.CharSequence">
+</parameter>
+<parameter name="start" type="int">
+</parameter>
+<parameter name="end" type="int">
+</parameter>
+</method>
+</interface>
+<interface name="Linkify.TransformFilter"
+ abstract="true"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="transformUrl"
+ return="java.lang.String"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="match" type="java.util.regex.Matcher">
+</parameter>
+<parameter name="url" type="java.lang.String">
+</parameter>
+</method>
+</interface>
+<class name="Rfc822Token"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="Rfc822Token"
+ type="android.text.util.Rfc822Token"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+<parameter name="address" type="java.lang.String">
+</parameter>
+<parameter name="comment" type="java.lang.String">
+</parameter>
+</constructor>
+<method name="getAddress"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getComment"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getName"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="quoteComment"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="comment" type="java.lang.String">
+</parameter>
+</method>
+<method name="quoteName"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+</method>
+<method name="quoteNameIfNecessary"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+</method>
+<method name="setAddress"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="address" type="java.lang.String">
+</parameter>
+</method>
+<method name="setComment"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="comment" type="java.lang.String">
+</parameter>
+</method>
+<method name="setName"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+</method>
+</class>
+<class name="Rfc822Tokenizer"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="android.widget.MultiAutoCompleteTextView.Tokenizer">
+</implements>
+<constructor name="Rfc822Tokenizer"
+ type="android.text.util.Rfc822Tokenizer"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<method name="findTokenEnd"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="text" type="java.lang.CharSequence">
+</parameter>
+<parameter name="cursor" type="int">
+</parameter>
+</method>
+<method name="findTokenStart"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="text" type="java.lang.CharSequence">
+</parameter>
+<parameter name="cursor" type="int">
+</parameter>
+</method>
+<method name="terminateToken"
+ return="java.lang.CharSequence"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="text" type="java.lang.CharSequence">
+</parameter>
+</method>
+<method name="tokenize"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="text" type="java.lang.CharSequence">
+</parameter>
+<parameter name="out" type="java.util.Collection&lt;android.text.util.Rfc822Token&gt;">
+</parameter>
+</method>
+<method name="tokenize"
+ return="android.text.util.Rfc822Token[]"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="text" type="java.lang.CharSequence">
+</parameter>
+</method>
+</class>
+</package>
+<package name="android.util"
+>
+<class name="AndroidException"
+ extends="java.lang.Exception"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="AndroidException"
+ type="android.util.AndroidException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<constructor name="AndroidException"
+ type="android.util.AndroidException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+</constructor>
+<constructor name="AndroidException"
+ type="android.util.AndroidException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="cause" type="java.lang.Exception">
+</parameter>
+</constructor>
+</class>
+<class name="AndroidRuntimeException"
+ extends="java.lang.RuntimeException"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="AndroidRuntimeException"
+ type="android.util.AndroidRuntimeException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<constructor name="AndroidRuntimeException"
+ type="android.util.AndroidRuntimeException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+</constructor>
+<constructor name="AndroidRuntimeException"
+ type="android.util.AndroidRuntimeException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="cause" type="java.lang.Exception">
+</parameter>
+</constructor>
+</class>
+<interface name="AttributeSet"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="getAttributeBooleanValue"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="namespace" type="java.lang.String">
+</parameter>
+<parameter name="attribute" type="java.lang.String">
+</parameter>
+<parameter name="defaultValue" type="boolean">
+</parameter>
+</method>
+<method name="getAttributeBooleanValue"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="index" type="int">
+</parameter>
+<parameter name="defaultValue" type="boolean">
+</parameter>
+</method>
+<method name="getAttributeCount"
+ return="int"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getAttributeFloatValue"
+ return="float"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="namespace" type="java.lang.String">
+</parameter>
+<parameter name="attribute" type="java.lang.String">
+</parameter>
+<parameter name="defaultValue" type="float">
+</parameter>
+</method>
+<method name="getAttributeFloatValue"
+ return="float"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="index" type="int">
+</parameter>
+<parameter name="defaultValue" type="float">
+</parameter>
+</method>
+<method name="getAttributeIntValue"
+ return="int"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="namespace" type="java.lang.String">
+</parameter>
+<parameter name="attribute" type="java.lang.String">
+</parameter>
+<parameter name="defaultValue" type="int">
+</parameter>
+</method>
+<method name="getAttributeIntValue"
+ return="int"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="index" type="int">
+</parameter>
+<parameter name="defaultValue" type="int">
+</parameter>
+</method>
+<method name="getAttributeListValue"
+ return="int"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="namespace" type="java.lang.String">
+</parameter>
+<parameter name="attribute" type="java.lang.String">
+</parameter>
+<parameter name="options" type="java.lang.String[]">
+</parameter>
+<parameter name="defaultValue" type="int">
+</parameter>
+</method>
+<method name="getAttributeListValue"
+ return="int"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="index" type="int">
+</parameter>
+<parameter name="options" type="java.lang.String[]">
+</parameter>
+<parameter name="defaultValue" type="int">
+</parameter>
+</method>
+<method name="getAttributeName"
+ return="java.lang.String"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="index" type="int">
+</parameter>
+</method>
+<method name="getAttributeNameResource"
+ return="int"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="index" type="int">
+</parameter>
+</method>
+<method name="getAttributeResourceValue"
+ return="int"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="namespace" type="java.lang.String">
+</parameter>
+<parameter name="attribute" type="java.lang.String">
+</parameter>
+<parameter name="defaultValue" type="int">
+</parameter>
+</method>
+<method name="getAttributeResourceValue"
+ return="int"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="index" type="int">
+</parameter>
+<parameter name="defaultValue" type="int">
+</parameter>
+</method>
+<method name="getAttributeUnsignedIntValue"
+ return="int"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="namespace" type="java.lang.String">
+</parameter>
+<parameter name="attribute" type="java.lang.String">
+</parameter>
+<parameter name="defaultValue" type="int">
+</parameter>
+</method>
+<method name="getAttributeUnsignedIntValue"
+ return="int"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="index" type="int">
+</parameter>
+<parameter name="defaultValue" type="int">
+</parameter>
+</method>
+<method name="getAttributeValue"
+ return="java.lang.String"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="index" type="int">
+</parameter>
+</method>
+<method name="getAttributeValue"
+ return="java.lang.String"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="namespace" type="java.lang.String">
+</parameter>
+<parameter name="name" type="java.lang.String">
+</parameter>
+</method>
+<method name="getClassAttribute"
+ return="java.lang.String"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getIdAttribute"
+ return="java.lang.String"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getIdAttributeResourceValue"
+ return="int"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="defaultValue" type="int">
+</parameter>
+</method>
+<method name="getPositionDescription"
+ return="java.lang.String"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getStyleAttribute"
+ return="int"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+</interface>
+<class name="Base64"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="decode"
+ return="byte[]"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="str" type="java.lang.String">
+</parameter>
+<parameter name="flags" type="int">
+</parameter>
+</method>
+<method name="decode"
+ return="byte[]"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="input" type="byte[]">
+</parameter>
+<parameter name="flags" type="int">
+</parameter>
+</method>
+<method name="decode"
+ return="byte[]"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="input" type="byte[]">
+</parameter>
+<parameter name="offset" type="int">
+</parameter>
+<parameter name="len" type="int">
+</parameter>
+<parameter name="flags" type="int">
+</parameter>
+</method>
+<method name="encode"
+ return="byte[]"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="input" type="byte[]">
+</parameter>
+<parameter name="flags" type="int">
+</parameter>
+</method>
+<method name="encode"
+ return="byte[]"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="input" type="byte[]">
+</parameter>
+<parameter name="offset" type="int">
+</parameter>
+<parameter name="len" type="int">
+</parameter>
+<parameter name="flags" type="int">
+</parameter>
+</method>
+<method name="encodeToString"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="input" type="byte[]">
+</parameter>
+<parameter name="flags" type="int">
+</parameter>
+</method>
+<method name="encodeToString"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="input" type="byte[]">
+</parameter>
+<parameter name="offset" type="int">
+</parameter>
+<parameter name="len" type="int">
+</parameter>
+<parameter name="flags" type="int">
+</parameter>
+</method>
+<field name="CRLF"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="4"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="DEFAULT"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="0"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="NO_CLOSE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="NO_PADDING"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="NO_WRAP"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="URL_SAFE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="8"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<class name="Base64InputStream"
+ extends="java.io.FilterInputStream"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="Base64InputStream"
+ type="android.util.Base64InputStream"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="in" type="java.io.InputStream">
+</parameter>
+<parameter name="flags" type="int">
+</parameter>
+</constructor>
+</class>
+<class name="Base64OutputStream"
+ extends="java.io.FilterOutputStream"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="Base64OutputStream"
+ type="android.util.Base64OutputStream"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="out" type="java.io.OutputStream">
+</parameter>
+<parameter name="flags" type="int">
+</parameter>
+</constructor>
+</class>
+<class name="Config"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="Config"
+ type="android.util.Config"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<field name="DEBUG"
+ type="boolean"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="LOGD"
+ type="boolean"
+ transient="false"
+ volatile="false"
+ value="true"
+ static="true"
+ final="true"
+ deprecated="deprecated"
+ visibility="public"
+>
+</field>
+<field name="LOGV"
+ type="boolean"
+ transient="false"
+ volatile="false"
+ value="false"
+ static="true"
+ final="true"
+ deprecated="deprecated"
+ visibility="public"
+>
+</field>
+<field name="PROFILE"
+ type="boolean"
+ transient="false"
+ volatile="false"
+ value="false"
+ static="true"
+ final="true"
+ deprecated="deprecated"
+ visibility="public"
+>
+</field>
+<field name="RELEASE"
+ type="boolean"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<class name="DebugUtils"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="DebugUtils"
+ type="android.util.DebugUtils"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<method name="isObjectSelected"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="object" type="java.lang.Object">
+</parameter>
+</method>
+</class>
+<class name="DisplayMetrics"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="DisplayMetrics"
+ type="android.util.DisplayMetrics"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<method name="setTo"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="o" type="android.util.DisplayMetrics">
+</parameter>
+</method>
+<method name="setToDefaults"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<field name="DENSITY_DEFAULT"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="160"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="DENSITY_HIGH"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="240"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="DENSITY_LOW"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="120"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="DENSITY_MEDIUM"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="160"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="density"
+ type="float"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="densityDpi"
+ type="int"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="heightPixels"
+ type="int"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="scaledDensity"
+ type="float"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="widthPixels"
+ type="int"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="xdpi"
+ type="float"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ydpi"
+ type="float"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<class name="EventLog"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="EventLog"
+ type="android.util.EventLog"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<method name="getTagCode"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+</method>
+<method name="getTagName"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="tag" type="int">
+</parameter>
+</method>
+<method name="readEvents"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="tags" type="int[]">
+</parameter>
+<parameter name="output" type="java.util.Collection&lt;android.util.EventLog.Event&gt;">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="writeEvent"
+ return="int"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="tag" type="int">
+</parameter>
+<parameter name="value" type="int">
+</parameter>
+</method>
+<method name="writeEvent"
+ return="int"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="tag" type="int">
+</parameter>
+<parameter name="value" type="long">
+</parameter>
+</method>
+<method name="writeEvent"
+ return="int"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="tag" type="int">
+</parameter>
+<parameter name="str" type="java.lang.String">
+</parameter>
+</method>
+<method name="writeEvent"
+ return="int"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="tag" type="int">
+</parameter>
+<parameter name="list" type="java.lang.Object...">
+</parameter>
+</method>
+</class>
+<class name="EventLog.Event"
+ extends="java.lang.Object"
+ abstract="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="getData"
+ return="java.lang.Object"
+ abstract="false"
+ native="false"
+ synchronized="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getProcessId"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getTag"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getThreadId"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getTimeNanos"
+ return="long"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+</class>
+<class name="EventLogTags"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="deprecated"
+ visibility="public"
+>
+<constructor name="EventLogTags"
+ type="android.util.EventLogTags"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</constructor>
+<constructor name="EventLogTags"
+ type="android.util.EventLogTags"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="input" type="java.io.BufferedReader">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</constructor>
+<method name="get"
+ return="android.util.EventLogTags.Description"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+</method>
+<method name="get"
+ return="android.util.EventLogTags.Description"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="tag" type="int">
+</parameter>
+</method>
+</class>
+<class name="EventLogTags.Description"
+ extends="java.lang.Object"
+ abstract="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<field name="mName"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="mTag"
+ type="int"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<class name="FloatMath"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="ceil"
+ return="float"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="value" type="float">
+</parameter>
+</method>
+<method name="cos"
+ return="float"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="angle" type="float">
+</parameter>
+</method>
+<method name="floor"
+ return="float"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="value" type="float">
+</parameter>
+</method>
+<method name="sin"
+ return="float"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="angle" type="float">
+</parameter>
+</method>
+<method name="sqrt"
+ return="float"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="value" type="float">
+</parameter>
+</method>
+</class>
+<class name="Log"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="d"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="tag" type="java.lang.String">
+</parameter>
+<parameter name="msg" type="java.lang.String">
+</parameter>
+</method>
+<method name="d"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="tag" type="java.lang.String">
+</parameter>
+<parameter name="msg" type="java.lang.String">
+</parameter>
+<parameter name="tr" type="java.lang.Throwable">
+</parameter>
+</method>
+<method name="e"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="tag" type="java.lang.String">
+</parameter>
+<parameter name="msg" type="java.lang.String">
+</parameter>
+</method>
+<method name="e"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="tag" type="java.lang.String">
+</parameter>
+<parameter name="msg" type="java.lang.String">
+</parameter>
+<parameter name="tr" type="java.lang.Throwable">
+</parameter>
+</method>
+<method name="getStackTraceString"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="tr" type="java.lang.Throwable">
+</parameter>
+</method>
+<method name="i"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="tag" type="java.lang.String">
+</parameter>
+<parameter name="msg" type="java.lang.String">
+</parameter>
+</method>
+<method name="i"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="tag" type="java.lang.String">
+</parameter>
+<parameter name="msg" type="java.lang.String">
+</parameter>
+<parameter name="tr" type="java.lang.Throwable">
+</parameter>
+</method>
+<method name="isLoggable"
+ return="boolean"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="tag" type="java.lang.String">
+</parameter>
+<parameter name="level" type="int">
+</parameter>
+</method>
+<method name="println"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="priority" type="int">
+</parameter>
+<parameter name="tag" type="java.lang.String">
+</parameter>
+<parameter name="msg" type="java.lang.String">
+</parameter>
+</method>
+<method name="v"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="tag" type="java.lang.String">
+</parameter>
+<parameter name="msg" type="java.lang.String">
+</parameter>
+</method>
+<method name="v"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="tag" type="java.lang.String">
+</parameter>
+<parameter name="msg" type="java.lang.String">
+</parameter>
+<parameter name="tr" type="java.lang.Throwable">
+</parameter>
+</method>
+<method name="w"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="tag" type="java.lang.String">
+</parameter>
+<parameter name="msg" type="java.lang.String">
+</parameter>
+</method>
+<method name="w"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="tag" type="java.lang.String">
+</parameter>
+<parameter name="msg" type="java.lang.String">
+</parameter>
+<parameter name="tr" type="java.lang.Throwable">
+</parameter>
+</method>
+<method name="w"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="tag" type="java.lang.String">
+</parameter>
+<parameter name="tr" type="java.lang.Throwable">
+</parameter>
+</method>
+<method name="wtf"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="tag" type="java.lang.String">
+</parameter>
+<parameter name="msg" type="java.lang.String">
+</parameter>
+</method>
+<method name="wtf"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="tag" type="java.lang.String">
+</parameter>
+<parameter name="tr" type="java.lang.Throwable">
+</parameter>
+</method>
+<method name="wtf"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="tag" type="java.lang.String">
+</parameter>
+<parameter name="msg" type="java.lang.String">
+</parameter>
+<parameter name="tr" type="java.lang.Throwable">
+</parameter>
+</method>
+<field name="ASSERT"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="7"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="DEBUG"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="3"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ERROR"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="6"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="INFO"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="4"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="VERBOSE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="WARN"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="5"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<class name="LogPrinter"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="android.util.Printer">
+</implements>
+<constructor name="LogPrinter"
+ type="android.util.LogPrinter"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="priority" type="int">
+</parameter>
+<parameter name="tag" type="java.lang.String">
+</parameter>
+</constructor>
+<method name="println"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="x" type="java.lang.String">
+</parameter>
+</method>
+</class>
+<class name="MonthDisplayHelper"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="MonthDisplayHelper"
+ type="android.util.MonthDisplayHelper"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="year" type="int">
+</parameter>
+<parameter name="month" type="int">
+</parameter>
+<parameter name="weekStartDay" type="int">
+</parameter>
+</constructor>
+<constructor name="MonthDisplayHelper"
+ type="android.util.MonthDisplayHelper"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="year" type="int">
+</parameter>
+<parameter name="month" type="int">
+</parameter>
+</constructor>
+<method name="getColumnOf"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="day" type="int">
+</parameter>
+</method>
+<method name="getDayAt"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="row" type="int">
+</parameter>
+<parameter name="column" type="int">
+</parameter>
+</method>
+<method name="getDigitsForRow"
+ return="int[]"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="row" type="int">
+</parameter>
+</method>
+<method name="getFirstDayOfMonth"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getMonth"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getNumberOfDaysInMonth"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getOffset"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getRowOf"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="day" type="int">
+</parameter>
+</method>
+<method name="getWeekStartDay"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getYear"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isWithinCurrentMonth"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="row" type="int">
+</parameter>
+<parameter name="column" type="int">
+</parameter>
+</method>
+<method name="nextMonth"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="previousMonth"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+</class>
+<class name="Pair"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="Pair"
+ type="android.util.Pair"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="first" type="F">
+</parameter>
+<parameter name="second" type="S">
+</parameter>
+</constructor>
+<method name="create"
+ return="android.util.Pair&lt;A, B&gt;"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="a" type="A">
+</parameter>
+<parameter name="b" type="B">
+</parameter>
+</method>
+<field name="first"
+ type="F"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="second"
+ type="S"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<class name="Patterns"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="concatGroups"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="matcher" type="java.util.regex.Matcher">
+</parameter>
+</method>
+<method name="digitsAndPlusOnly"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="matcher" type="java.util.regex.Matcher">
+</parameter>
+</method>
+<field name="DOMAIN_NAME"
+ type="java.util.regex.Pattern"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="EMAIL_ADDRESS"
+ type="java.util.regex.Pattern"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GOOD_IRI_CHAR"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;a-zA-Z0-9\u00a0-\ud7ff\uf900-\ufdcf\ufdf0-\uffef&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="IP_ADDRESS"
+ type="java.util.regex.Pattern"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="PHONE"
+ type="java.util.regex.Pattern"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TOP_LEVEL_DOMAIN"
+ type="java.util.regex.Pattern"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TOP_LEVEL_DOMAIN_STR"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;((aero|arpa|asia|a[cdefgilmnoqrstuwxz])|(biz|b[abdefghijmnorstvwyz])|(cat|com|coop|c[acdfghiklmnoruvxyz])|d[ejkmoz]|(edu|e[cegrstu])|f[ijkmor]|(gov|g[abdefghilmnpqrstuwy])|h[kmnrtu]|(info|int|i[delmnoqrst])|(jobs|j[emop])|k[eghimnprwyz]|l[abcikrstuvy]|(mil|mobi|museum|m[acdeghklmnopqrstuvwxyz])|(name|net|n[acefgilopruz])|(org|om)|(pro|p[aefghklmnrstwy])|qa|r[eosuw]|s[abcdeghijklmnortuvyz]|(tel|travel|t[cdfghjklmnoprtvwz])|u[agksyz]|v[aceginu]|w[fs]|(xn\\-\\-0zwm56d|xn\\-\\-11b5bs3a9aj6g|xn\\-\\-80akhbyknj4f|xn\\-\\-9t4b11yi5a|xn\\-\\-deba0ad|xn\\-\\-g6w251d|xn\\-\\-hgbk6aj7f53bba|xn\\-\\-hlcj6aya9esc7a|xn\\-\\-jxalpdlp|xn\\-\\-kgbechtv|xn\\-\\-zckzah)|y[etu]|z[amw])&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TOP_LEVEL_DOMAIN_STR_FOR_WEB_URL"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;(?:(?:aero|arpa|asia|a[cdefgilmnoqrstuwxz])|(?:biz|b[abdefghijmnorstvwyz])|(?:cat|com|coop|c[acdfghiklmnoruvxyz])|d[ejkmoz]|(?:edu|e[cegrstu])|f[ijkmor]|(?:gov|g[abdefghilmnpqrstuwy])|h[kmnrtu]|(?:info|int|i[delmnoqrst])|(?:jobs|j[emop])|k[eghimnprwyz]|l[abcikrstuvy]|(?:mil|mobi|museum|m[acdeghklmnopqrstuvwxyz])|(?:name|net|n[acefgilopruz])|(?:org|om)|(?:pro|p[aefghklmnrstwy])|qa|r[eosuw]|s[abcdeghijklmnortuvyz]|(?:tel|travel|t[cdfghjklmnoprtvwz])|u[agksyz]|v[aceginu]|w[fs]|(?:xn\\-\\-0zwm56d|xn\\-\\-11b5bs3a9aj6g|xn\\-\\-80akhbyknj4f|xn\\-\\-9t4b11yi5a|xn\\-\\-deba0ad|xn\\-\\-g6w251d|xn\\-\\-hgbk6aj7f53bba|xn\\-\\-hlcj6aya9esc7a|xn\\-\\-jxalpdlp|xn\\-\\-kgbechtv|xn\\-\\-zckzah)|y[etu]|z[amw]))&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="WEB_URL"
+ type="java.util.regex.Pattern"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<class name="PrintStreamPrinter"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="android.util.Printer">
+</implements>
+<constructor name="PrintStreamPrinter"
+ type="android.util.PrintStreamPrinter"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="pw" type="java.io.PrintStream">
+</parameter>
+</constructor>
+<method name="println"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="x" type="java.lang.String">
+</parameter>
+</method>
+</class>
+<class name="PrintWriterPrinter"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="android.util.Printer">
+</implements>
+<constructor name="PrintWriterPrinter"
+ type="android.util.PrintWriterPrinter"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="pw" type="java.io.PrintWriter">
+</parameter>
+</constructor>
+<method name="println"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="x" type="java.lang.String">
+</parameter>
+</method>
+</class>
+<interface name="Printer"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="println"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="x" type="java.lang.String">
+</parameter>
+</method>
+</interface>
+<class name="SparseArray"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="SparseArray"
+ type="android.util.SparseArray"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<constructor name="SparseArray"
+ type="android.util.SparseArray"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="initialCapacity" type="int">
+</parameter>
+</constructor>
+<method name="append"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="key" type="int">
+</parameter>
+<parameter name="value" type="E">
+</parameter>
+</method>
+<method name="clear"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="delete"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="key" type="int">
+</parameter>
+</method>
+<method name="get"
+ return="E"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="key" type="int">
+</parameter>
+</method>
+<method name="get"
+ return="E"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="key" type="int">
+</parameter>
+<parameter name="valueIfKeyNotFound" type="E">
+</parameter>
+</method>
+<method name="indexOfKey"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="key" type="int">
+</parameter>
+</method>
+<method name="indexOfValue"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="value" type="E">
+</parameter>
+</method>
+<method name="keyAt"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="index" type="int">
+</parameter>
+</method>
+<method name="put"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="key" type="int">
+</parameter>
+<parameter name="value" type="E">
+</parameter>
+</method>
+<method name="remove"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="key" type="int">
+</parameter>
+</method>
+<method name="setValueAt"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="index" type="int">
+</parameter>
+<parameter name="value" type="E">
+</parameter>
+</method>
+<method name="size"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="valueAt"
+ return="E"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="index" type="int">
+</parameter>
+</method>
+</class>
+<class name="SparseBooleanArray"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="SparseBooleanArray"
+ type="android.util.SparseBooleanArray"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<constructor name="SparseBooleanArray"
+ type="android.util.SparseBooleanArray"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="initialCapacity" type="int">
+</parameter>
+</constructor>
+<method name="append"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="key" type="int">
+</parameter>
+<parameter name="value" type="boolean">
+</parameter>
+</method>
+<method name="clear"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="delete"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="key" type="int">
+</parameter>
+</method>
+<method name="get"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="key" type="int">
+</parameter>
+</method>
+<method name="get"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="key" type="int">
+</parameter>
+<parameter name="valueIfKeyNotFound" type="boolean">
+</parameter>
+</method>
+<method name="indexOfKey"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="key" type="int">
+</parameter>
+</method>
+<method name="indexOfValue"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="value" type="boolean">
+</parameter>
+</method>
+<method name="keyAt"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="index" type="int">
+</parameter>
+</method>
+<method name="put"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="key" type="int">
+</parameter>
+<parameter name="value" type="boolean">
+</parameter>
+</method>
+<method name="size"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="valueAt"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="index" type="int">
+</parameter>
+</method>
+</class>
+<class name="SparseIntArray"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="SparseIntArray"
+ type="android.util.SparseIntArray"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<constructor name="SparseIntArray"
+ type="android.util.SparseIntArray"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="initialCapacity" type="int">
+</parameter>
+</constructor>
+<method name="append"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="key" type="int">
+</parameter>
+<parameter name="value" type="int">
+</parameter>
+</method>
+<method name="clear"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="delete"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="key" type="int">
+</parameter>
+</method>
+<method name="get"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="key" type="int">
+</parameter>
+</method>
+<method name="get"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="key" type="int">
+</parameter>
+<parameter name="valueIfKeyNotFound" type="int">
+</parameter>
+</method>
+<method name="indexOfKey"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="key" type="int">
+</parameter>
+</method>
+<method name="indexOfValue"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="value" type="int">
+</parameter>
+</method>
+<method name="keyAt"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="index" type="int">
+</parameter>
+</method>
+<method name="put"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="key" type="int">
+</parameter>
+<parameter name="value" type="int">
+</parameter>
+</method>
+<method name="removeAt"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="index" type="int">
+</parameter>
+</method>
+<method name="size"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="valueAt"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="index" type="int">
+</parameter>
+</method>
+</class>
+<class name="StateSet"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="StateSet"
+ type="android.util.StateSet"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<method name="dump"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="states" type="int[]">
+</parameter>
+</method>
+<method name="isWildCard"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="stateSetOrSpec" type="int[]">
+</parameter>
+</method>
+<method name="stateSetMatches"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="stateSpec" type="int[]">
+</parameter>
+<parameter name="stateSet" type="int[]">
+</parameter>
+</method>
+<method name="stateSetMatches"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="stateSpec" type="int[]">
+</parameter>
+<parameter name="state" type="int">
+</parameter>
+</method>
+<method name="trimStateSet"
+ return="int[]"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="states" type="int[]">
+</parameter>
+<parameter name="newSize" type="int">
+</parameter>
+</method>
+<field name="WILD_CARD"
+ type="int[]"
+ transient="false"
+ volatile="false"
+ value="null"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<class name="StringBuilderPrinter"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="android.util.Printer">
+</implements>
+<constructor name="StringBuilderPrinter"
+ type="android.util.StringBuilderPrinter"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="builder" type="java.lang.StringBuilder">
+</parameter>
+</constructor>
+<method name="println"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="x" type="java.lang.String">
+</parameter>
+</method>
+</class>
+<class name="TimeFormatException"
+ extends="java.lang.RuntimeException"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</class>
+<class name="TimeUtils"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="TimeUtils"
+ type="android.util.TimeUtils"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<method name="getTimeZone"
+ return="java.util.TimeZone"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="offset" type="int">
+</parameter>
+<parameter name="dst" type="boolean">
+</parameter>
+<parameter name="when" type="long">
+</parameter>
+<parameter name="country" type="java.lang.String">
+</parameter>
+</method>
+<method name="getTimeZoneDatabaseVersion"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+</class>
+<class name="TimingLogger"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="TimingLogger"
+ type="android.util.TimingLogger"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="tag" type="java.lang.String">
+</parameter>
+<parameter name="label" type="java.lang.String">
+</parameter>
+</constructor>
+<method name="addSplit"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="splitLabel" type="java.lang.String">
+</parameter>
+</method>
+<method name="dumpToLog"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="reset"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="tag" type="java.lang.String">
+</parameter>
+<parameter name="label" type="java.lang.String">
+</parameter>
+</method>
+<method name="reset"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+</class>
+<class name="TypedValue"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="TypedValue"
+ type="android.util.TypedValue"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<method name="applyDimension"
+ return="float"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="unit" type="int">
+</parameter>
+<parameter name="value" type="float">
+</parameter>
+<parameter name="metrics" type="android.util.DisplayMetrics">
+</parameter>
+</method>
+<method name="coerceToString"
+ return="java.lang.CharSequence"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="coerceToString"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="type" type="int">
+</parameter>
+<parameter name="data" type="int">
+</parameter>
+</method>
+<method name="complexToDimension"
+ return="float"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="data" type="int">
+</parameter>
+<parameter name="metrics" type="android.util.DisplayMetrics">
+</parameter>
+</method>
+<method name="complexToDimensionNoisy"
+ return="float"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="data" type="int">
+</parameter>
+<parameter name="metrics" type="android.util.DisplayMetrics">
+</parameter>
+</method>
+<method name="complexToDimensionPixelOffset"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="data" type="int">
+</parameter>
+<parameter name="metrics" type="android.util.DisplayMetrics">
+</parameter>
+</method>
+<method name="complexToDimensionPixelSize"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="data" type="int">
+</parameter>
+<parameter name="metrics" type="android.util.DisplayMetrics">
+</parameter>
+</method>
+<method name="complexToFloat"
+ return="float"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="complex" type="int">
+</parameter>
+</method>
+<method name="complexToFraction"
+ return="float"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="data" type="int">
+</parameter>
+<parameter name="base" type="float">
+</parameter>
+<parameter name="pbase" type="float">
+</parameter>
+</method>
+<method name="getDimension"
+ return="float"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="metrics" type="android.util.DisplayMetrics">
+</parameter>
+</method>
+<method name="getFloat"
+ return="float"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getFraction"
+ return="float"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="base" type="float">
+</parameter>
+<parameter name="pbase" type="float">
+</parameter>
+</method>
+<method name="setTo"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="other" type="android.util.TypedValue">
+</parameter>
+</method>
+<field name="COMPLEX_MANTISSA_MASK"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16777215"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="COMPLEX_MANTISSA_SHIFT"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="8"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="COMPLEX_RADIX_0p23"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="3"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="COMPLEX_RADIX_16p7"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="COMPLEX_RADIX_23p0"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="0"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="COMPLEX_RADIX_8p15"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="COMPLEX_RADIX_MASK"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="3"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="COMPLEX_RADIX_SHIFT"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="4"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="COMPLEX_UNIT_DIP"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="COMPLEX_UNIT_FRACTION"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="0"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="COMPLEX_UNIT_FRACTION_PARENT"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="COMPLEX_UNIT_IN"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="4"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="COMPLEX_UNIT_MASK"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="15"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="COMPLEX_UNIT_MM"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="5"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="COMPLEX_UNIT_PT"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="3"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="COMPLEX_UNIT_PX"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="0"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="COMPLEX_UNIT_SHIFT"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="0"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="COMPLEX_UNIT_SP"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="DENSITY_DEFAULT"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="0"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="DENSITY_NONE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="65535"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TYPE_ATTRIBUTE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TYPE_DIMENSION"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="5"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TYPE_FIRST_COLOR_INT"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="28"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TYPE_FIRST_INT"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TYPE_FLOAT"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="4"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TYPE_FRACTION"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="6"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TYPE_INT_BOOLEAN"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="18"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TYPE_INT_COLOR_ARGB4"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="30"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TYPE_INT_COLOR_ARGB8"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="28"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TYPE_INT_COLOR_RGB4"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="31"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TYPE_INT_COLOR_RGB8"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="29"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TYPE_INT_DEC"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TYPE_INT_HEX"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="17"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TYPE_LAST_COLOR_INT"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="31"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TYPE_LAST_INT"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="31"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TYPE_NULL"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="0"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TYPE_REFERENCE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TYPE_STRING"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="3"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="assetCookie"
+ type="int"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="changingConfigurations"
+ type="int"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="data"
+ type="int"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="density"
+ type="int"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="resourceId"
+ type="int"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="string"
+ type="java.lang.CharSequence"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="type"
+ type="int"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<class name="Xml"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="Xml"
+ type="android.util.Xml"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<method name="asAttributeSet"
+ return="android.util.AttributeSet"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="parser" type="org.xmlpull.v1.XmlPullParser">
+</parameter>
+</method>
+<method name="findEncodingByName"
+ return="android.util.Xml.Encoding"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="encodingName" type="java.lang.String">
+</parameter>
+<exception name="UnsupportedEncodingException" type="java.io.UnsupportedEncodingException">
+</exception>
+</method>
+<method name="newPullParser"
+ return="org.xmlpull.v1.XmlPullParser"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="newSerializer"
+ return="org.xmlpull.v1.XmlSerializer"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="parse"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="xml" type="java.lang.String">
+</parameter>
+<parameter name="contentHandler" type="org.xml.sax.ContentHandler">
+</parameter>
+<exception name="SAXException" type="org.xml.sax.SAXException">
+</exception>
+</method>
+<method name="parse"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="in" type="java.io.Reader">
+</parameter>
+<parameter name="contentHandler" type="org.xml.sax.ContentHandler">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+<exception name="SAXException" type="org.xml.sax.SAXException">
+</exception>
+</method>
+<method name="parse"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="in" type="java.io.InputStream">
+</parameter>
+<parameter name="encoding" type="android.util.Xml.Encoding">
+</parameter>
+<parameter name="contentHandler" type="org.xml.sax.ContentHandler">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+<exception name="SAXException" type="org.xml.sax.SAXException">
+</exception>
+</method>
+<field name="FEATURE_RELAXED"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<class name="Xml.Encoding"
+ extends="java.lang.Enum"
+ abstract="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="valueOf"
+ return="android.util.Xml.Encoding"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+</method>
+<method name="values"
+ return="android.util.Xml.Encoding[]"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+</class>
+</package>
+<package name="android.view"
+>
+<class name="AbsSavedState"
+ extends="java.lang.Object"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="android.os.Parcelable">
+</implements>
+<constructor name="AbsSavedState"
+ type="android.view.AbsSavedState"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="superState" type="android.os.Parcelable">
+</parameter>
+</constructor>
+<constructor name="AbsSavedState"
+ type="android.view.AbsSavedState"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="source" type="android.os.Parcel">
+</parameter>
+</constructor>
+<method name="describeContents"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getSuperState"
+ return="android.os.Parcelable"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="writeToParcel"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="dest" type="android.os.Parcel">
+</parameter>
+<parameter name="flags" type="int">
+</parameter>
+</method>
+<field name="CREATOR"
+ type="android.os.Parcelable.Creator"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="EMPTY_STATE"
+ type="android.view.AbsSavedState"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<interface name="ContextMenu"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="android.view.Menu">
+</implements>
+<method name="clearHeader"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="setHeaderIcon"
+ return="android.view.ContextMenu"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="iconRes" type="int">
+</parameter>
+</method>
+<method name="setHeaderIcon"
+ return="android.view.ContextMenu"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="icon" type="android.graphics.drawable.Drawable">
+</parameter>
+</method>
+<method name="setHeaderTitle"
+ return="android.view.ContextMenu"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="titleRes" type="int">
+</parameter>
+</method>
+<method name="setHeaderTitle"
+ return="android.view.ContextMenu"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="title" type="java.lang.CharSequence">
+</parameter>
+</method>
+<method name="setHeaderView"
+ return="android.view.ContextMenu"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="view" type="android.view.View">
+</parameter>
+</method>
+</interface>
+<interface name="ContextMenu.ContextMenuInfo"
+ abstract="true"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</interface>
+<class name="ContextThemeWrapper"
+ extends="android.content.ContextWrapper"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="ContextThemeWrapper"
+ type="android.view.ContextThemeWrapper"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<constructor name="ContextThemeWrapper"
+ type="android.view.ContextThemeWrapper"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="base" type="android.content.Context">
+</parameter>
+<parameter name="themeres" type="int">
+</parameter>
+</constructor>
+<method name="onApplyThemeResource"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="theme" type="android.content.res.Resources.Theme">
+</parameter>
+<parameter name="resid" type="int">
+</parameter>
+<parameter name="first" type="boolean">
+</parameter>
+</method>
+</class>
+<class name="Display"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="getDisplayId"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getHeight"
+ return="int"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getMetrics"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="outMetrics" type="android.util.DisplayMetrics">
+</parameter>
+</method>
+<method name="getOrientation"
+ return="int"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="deprecated"
+ visibility="public"
+>
+</method>
+<method name="getPixelFormat"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getRefreshRate"
+ return="float"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getRotation"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getWidth"
+ return="int"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<field name="DEFAULT_DISPLAY"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="0"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<class name="FocusFinder"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="findNearestTouchable"
+ return="android.view.View"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="root" type="android.view.ViewGroup">
+</parameter>
+<parameter name="x" type="int">
+</parameter>
+<parameter name="y" type="int">
+</parameter>
+<parameter name="direction" type="int">
+</parameter>
+<parameter name="deltas" type="int[]">
+</parameter>
+</method>
+<method name="findNextFocus"
+ return="android.view.View"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="root" type="android.view.ViewGroup">
+</parameter>
+<parameter name="focused" type="android.view.View">
+</parameter>
+<parameter name="direction" type="int">
+</parameter>
+</method>
+<method name="findNextFocusFromRect"
+ return="android.view.View"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="root" type="android.view.ViewGroup">
+</parameter>
+<parameter name="focusedRect" type="android.graphics.Rect">
+</parameter>
+<parameter name="direction" type="int">
+</parameter>
+</method>
+<method name="getInstance"
+ return="android.view.FocusFinder"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+</class>
+<class name="GestureDetector"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="GestureDetector"
+ type="android.view.GestureDetector"
+ static="false"
+ final="false"
+ deprecated="deprecated"
+ visibility="public"
+>
+<parameter name="listener" type="android.view.GestureDetector.OnGestureListener">
+</parameter>
+<parameter name="handler" type="android.os.Handler">
+</parameter>
+</constructor>
+<constructor name="GestureDetector"
+ type="android.view.GestureDetector"
+ static="false"
+ final="false"
+ deprecated="deprecated"
+ visibility="public"
+>
+<parameter name="listener" type="android.view.GestureDetector.OnGestureListener">
+</parameter>
+</constructor>
+<constructor name="GestureDetector"
+ type="android.view.GestureDetector"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="context" type="android.content.Context">
+</parameter>
+<parameter name="listener" type="android.view.GestureDetector.OnGestureListener">
+</parameter>
+</constructor>
+<constructor name="GestureDetector"
+ type="android.view.GestureDetector"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="context" type="android.content.Context">
+</parameter>
+<parameter name="listener" type="android.view.GestureDetector.OnGestureListener">
+</parameter>
+<parameter name="handler" type="android.os.Handler">
+</parameter>
+</constructor>
+<constructor name="GestureDetector"
+ type="android.view.GestureDetector"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="context" type="android.content.Context">
+</parameter>
+<parameter name="listener" type="android.view.GestureDetector.OnGestureListener">
+</parameter>
+<parameter name="handler" type="android.os.Handler">
+</parameter>
+<parameter name="ignoreMultitouch" type="boolean">
+</parameter>
+</constructor>
+<method name="isLongpressEnabled"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="onTouchEvent"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="ev" type="android.view.MotionEvent">
+</parameter>
+</method>
+<method name="setIsLongpressEnabled"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="isLongpressEnabled" type="boolean">
+</parameter>
+</method>
+<method name="setOnDoubleTapListener"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="onDoubleTapListener" type="android.view.GestureDetector.OnDoubleTapListener">
+</parameter>
+</method>
+</class>
+<interface name="GestureDetector.OnDoubleTapListener"
+ abstract="true"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="onDoubleTap"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="e" type="android.view.MotionEvent">
+</parameter>
+</method>
+<method name="onDoubleTapEvent"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="e" type="android.view.MotionEvent">
+</parameter>
+</method>
+<method name="onSingleTapConfirmed"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="e" type="android.view.MotionEvent">
+</parameter>
+</method>
+</interface>
+<interface name="GestureDetector.OnGestureListener"
+ abstract="true"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="onDown"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="e" type="android.view.MotionEvent">
+</parameter>
+</method>
+<method name="onFling"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="e1" type="android.view.MotionEvent">
+</parameter>
+<parameter name="e2" type="android.view.MotionEvent">
+</parameter>
+<parameter name="velocityX" type="float">
+</parameter>
+<parameter name="velocityY" type="float">
+</parameter>
+</method>
+<method name="onLongPress"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="e" type="android.view.MotionEvent">
+</parameter>
+</method>
+<method name="onScroll"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="e1" type="android.view.MotionEvent">
+</parameter>
+<parameter name="e2" type="android.view.MotionEvent">
+</parameter>
+<parameter name="distanceX" type="float">
+</parameter>
+<parameter name="distanceY" type="float">
+</parameter>
+</method>
+<method name="onShowPress"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="e" type="android.view.MotionEvent">
+</parameter>
+</method>
+<method name="onSingleTapUp"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="e" type="android.view.MotionEvent">
+</parameter>
+</method>
+</interface>
+<class name="GestureDetector.SimpleOnGestureListener"
+ extends="java.lang.Object"
+ abstract="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="android.view.GestureDetector.OnDoubleTapListener">
+</implements>
+<implements name="android.view.GestureDetector.OnGestureListener">
+</implements>
+<constructor name="GestureDetector.SimpleOnGestureListener"
+ type="android.view.GestureDetector.SimpleOnGestureListener"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<method name="onDoubleTap"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="e" type="android.view.MotionEvent">
+</parameter>
+</method>
+<method name="onDoubleTapEvent"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="e" type="android.view.MotionEvent">
+</parameter>
+</method>
+<method name="onDown"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="e" type="android.view.MotionEvent">
+</parameter>
+</method>
+<method name="onFling"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="e1" type="android.view.MotionEvent">
+</parameter>
+<parameter name="e2" type="android.view.MotionEvent">
+</parameter>
+<parameter name="velocityX" type="float">
+</parameter>
+<parameter name="velocityY" type="float">
+</parameter>
+</method>
+<method name="onLongPress"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="e" type="android.view.MotionEvent">
+</parameter>
+</method>
+<method name="onScroll"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="e1" type="android.view.MotionEvent">
+</parameter>
+<parameter name="e2" type="android.view.MotionEvent">
+</parameter>
+<parameter name="distanceX" type="float">
+</parameter>
+<parameter name="distanceY" type="float">
+</parameter>
+</method>
+<method name="onShowPress"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="e" type="android.view.MotionEvent">
+</parameter>
+</method>
+<method name="onSingleTapConfirmed"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="e" type="android.view.MotionEvent">
+</parameter>
+</method>
+<method name="onSingleTapUp"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="e" type="android.view.MotionEvent">
+</parameter>
+</method>
+</class>
+<class name="Gravity"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="Gravity"
+ type="android.view.Gravity"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<method name="apply"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="gravity" type="int">
+</parameter>
+<parameter name="w" type="int">
+</parameter>
+<parameter name="h" type="int">
+</parameter>
+<parameter name="container" type="android.graphics.Rect">
+</parameter>
+<parameter name="outRect" type="android.graphics.Rect">
+</parameter>
+</method>
+<method name="apply"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="gravity" type="int">
+</parameter>
+<parameter name="w" type="int">
+</parameter>
+<parameter name="h" type="int">
+</parameter>
+<parameter name="container" type="android.graphics.Rect">
+</parameter>
+<parameter name="xAdj" type="int">
+</parameter>
+<parameter name="yAdj" type="int">
+</parameter>
+<parameter name="outRect" type="android.graphics.Rect">
+</parameter>
+</method>
+<method name="applyDisplay"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="gravity" type="int">
+</parameter>
+<parameter name="display" type="android.graphics.Rect">
+</parameter>
+<parameter name="inoutObj" type="android.graphics.Rect">
+</parameter>
+</method>
+<method name="isHorizontal"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="gravity" type="int">
+</parameter>
+</method>
+<method name="isVertical"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="gravity" type="int">
+</parameter>
+</method>
+<field name="AXIS_CLIP"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="8"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="AXIS_PULL_AFTER"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="4"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="AXIS_PULL_BEFORE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="AXIS_SPECIFIED"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="AXIS_X_SHIFT"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="0"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="AXIS_Y_SHIFT"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="4"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="BOTTOM"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="80"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="CENTER"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="17"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="CENTER_HORIZONTAL"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="CENTER_VERTICAL"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="CLIP_HORIZONTAL"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="8"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="CLIP_VERTICAL"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="128"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="DISPLAY_CLIP_HORIZONTAL"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16777216"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="DISPLAY_CLIP_VERTICAL"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="268435456"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="FILL"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="119"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="FILL_HORIZONTAL"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="7"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="FILL_VERTICAL"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="112"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="HORIZONTAL_GRAVITY_MASK"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="7"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="LEFT"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="3"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="NO_GRAVITY"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="0"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="RIGHT"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="5"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TOP"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="48"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="VERTICAL_GRAVITY_MASK"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="112"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<class name="HapticFeedbackConstants"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<field name="FLAG_IGNORE_GLOBAL_SETTING"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="FLAG_IGNORE_VIEW_SETTING"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="KEYBOARD_TAP"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="3"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="LONG_PRESS"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="0"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="VIRTUAL_KEY"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<class name="InflateException"
+ extends="java.lang.RuntimeException"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="InflateException"
+ type="android.view.InflateException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<constructor name="InflateException"
+ type="android.view.InflateException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="detailMessage" type="java.lang.String">
+</parameter>
+<parameter name="throwable" type="java.lang.Throwable">
+</parameter>
+</constructor>
+<constructor name="InflateException"
+ type="android.view.InflateException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="detailMessage" type="java.lang.String">
+</parameter>
+</constructor>
+<constructor name="InflateException"
+ type="android.view.InflateException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="throwable" type="java.lang.Throwable">
+</parameter>
+</constructor>
+</class>
+<class name="InputEvent"
+ extends="java.lang.Object"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="android.os.Parcelable">
+</implements>
+<method name="getDeviceId"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<field name="mDeviceId"
+ type="int"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</field>
+</class>
+<class name="KeyCharacterMap"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="deviceHasKey"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="keyCode" type="int">
+</parameter>
+</method>
+<method name="deviceHasKeys"
+ return="boolean[]"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="keyCodes" type="int[]">
+</parameter>
+</method>
+<method name="get"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="keyCode" type="int">
+</parameter>
+<parameter name="meta" type="int">
+</parameter>
+</method>
+<method name="getDeadChar"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="accent" type="int">
+</parameter>
+<parameter name="c" type="int">
+</parameter>
+</method>
+<method name="getDisplayLabel"
+ return="char"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="keyCode" type="int">
+</parameter>
+</method>
+<method name="getEvents"
+ return="android.view.KeyEvent[]"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="chars" type="char[]">
+</parameter>
+</method>
+<method name="getKeyData"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="keyCode" type="int">
+</parameter>
+<parameter name="results" type="android.view.KeyCharacterMap.KeyData">
+</parameter>
+</method>
+<method name="getKeyboardType"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getMatch"
+ return="char"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="keyCode" type="int">
+</parameter>
+<parameter name="chars" type="char[]">
+</parameter>
+</method>
+<method name="getMatch"
+ return="char"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="keyCode" type="int">
+</parameter>
+<parameter name="chars" type="char[]">
+</parameter>
+<parameter name="modifiers" type="int">
+</parameter>
+</method>
+<method name="getNumber"
+ return="char"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="keyCode" type="int">
+</parameter>
+</method>
+<method name="isPrintingKey"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="keyCode" type="int">
+</parameter>
+</method>
+<method name="load"
+ return="android.view.KeyCharacterMap"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="keyboard" type="int">
+</parameter>
+</method>
+<field name="ALPHA"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="3"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="BUILT_IN_KEYBOARD"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="0"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="COMBINING_ACCENT"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="-2147483648"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="COMBINING_ACCENT_MASK"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2147483647"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="HEX_INPUT"
+ type="char"
+ transient="false"
+ volatile="false"
+ value="61184"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="NUMERIC"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="PICKER_DIALOG_INPUT"
+ type="char"
+ transient="false"
+ volatile="false"
+ value="61185"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="PREDICTIVE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<class name="KeyCharacterMap.KeyData"
+ extends="java.lang.Object"
+ abstract="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="KeyCharacterMap.KeyData"
+ type="android.view.KeyCharacterMap.KeyData"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<field name="META_LENGTH"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="4"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="displayLabel"
+ type="char"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="meta"
+ type="char[]"
+ transient="false"
+ volatile="false"
+ value="null"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="number"
+ type="char"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<class name="KeyEvent"
+ extends="android.view.InputEvent"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="android.os.Parcelable">
+</implements>
+<constructor name="KeyEvent"
+ type="android.view.KeyEvent"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="action" type="int">
+</parameter>
+<parameter name="code" type="int">
+</parameter>
+</constructor>
+<constructor name="KeyEvent"
+ type="android.view.KeyEvent"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="downTime" type="long">
+</parameter>
+<parameter name="eventTime" type="long">
+</parameter>
+<parameter name="action" type="int">
+</parameter>
+<parameter name="code" type="int">
+</parameter>
+<parameter name="repeat" type="int">
+</parameter>
+</constructor>
+<constructor name="KeyEvent"
+ type="android.view.KeyEvent"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="downTime" type="long">
+</parameter>
+<parameter name="eventTime" type="long">
+</parameter>
+<parameter name="action" type="int">
+</parameter>
+<parameter name="code" type="int">
+</parameter>
+<parameter name="repeat" type="int">
+</parameter>
+<parameter name="metaState" type="int">
+</parameter>
+</constructor>
+<constructor name="KeyEvent"
+ type="android.view.KeyEvent"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="downTime" type="long">
+</parameter>
+<parameter name="eventTime" type="long">
+</parameter>
+<parameter name="action" type="int">
+</parameter>
+<parameter name="code" type="int">
+</parameter>
+<parameter name="repeat" type="int">
+</parameter>
+<parameter name="metaState" type="int">
+</parameter>
+<parameter name="device" type="int">
+</parameter>
+<parameter name="scancode" type="int">
+</parameter>
+</constructor>
+<constructor name="KeyEvent"
+ type="android.view.KeyEvent"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="downTime" type="long">
+</parameter>
+<parameter name="eventTime" type="long">
+</parameter>
+<parameter name="action" type="int">
+</parameter>
+<parameter name="code" type="int">
+</parameter>
+<parameter name="repeat" type="int">
+</parameter>
+<parameter name="metaState" type="int">
+</parameter>
+<parameter name="device" type="int">
+</parameter>
+<parameter name="scancode" type="int">
+</parameter>
+<parameter name="flags" type="int">
+</parameter>
+</constructor>
+<constructor name="KeyEvent"
+ type="android.view.KeyEvent"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="time" type="long">
+</parameter>
+<parameter name="characters" type="java.lang.String">
+</parameter>
+<parameter name="device" type="int">
+</parameter>
+<parameter name="flags" type="int">
+</parameter>
+</constructor>
+<constructor name="KeyEvent"
+ type="android.view.KeyEvent"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="origEvent" type="android.view.KeyEvent">
+</parameter>
+</constructor>
+<constructor name="KeyEvent"
+ type="android.view.KeyEvent"
+ static="false"
+ final="false"
+ deprecated="deprecated"
+ visibility="public"
+>
+<parameter name="origEvent" type="android.view.KeyEvent">
+</parameter>
+<parameter name="eventTime" type="long">
+</parameter>
+<parameter name="newRepeat" type="int">
+</parameter>
+</constructor>
+<method name="changeAction"
+ return="android.view.KeyEvent"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="event" type="android.view.KeyEvent">
+</parameter>
+<parameter name="action" type="int">
+</parameter>
+</method>
+<method name="changeFlags"
+ return="android.view.KeyEvent"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="event" type="android.view.KeyEvent">
+</parameter>
+<parameter name="flags" type="int">
+</parameter>
+</method>
+<method name="changeTimeRepeat"
+ return="android.view.KeyEvent"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="event" type="android.view.KeyEvent">
+</parameter>
+<parameter name="eventTime" type="long">
+</parameter>
+<parameter name="newRepeat" type="int">
+</parameter>
+</method>
+<method name="changeTimeRepeat"
+ return="android.view.KeyEvent"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="event" type="android.view.KeyEvent">
+</parameter>
+<parameter name="eventTime" type="long">
+</parameter>
+<parameter name="newRepeat" type="int">
+</parameter>
+<parameter name="newFlags" type="int">
+</parameter>
+</method>
+<method name="describeContents"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="dispatch"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="deprecated"
+ visibility="public"
+>
+<parameter name="receiver" type="android.view.KeyEvent.Callback">
+</parameter>
+</method>
+<method name="dispatch"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="receiver" type="android.view.KeyEvent.Callback">
+</parameter>
+<parameter name="state" type="android.view.KeyEvent.DispatcherState">
+</parameter>
+<parameter name="target" type="java.lang.Object">
+</parameter>
+</method>
+<method name="getAction"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getCharacters"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getDeadChar"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="accent" type="int">
+</parameter>
+<parameter name="c" type="int">
+</parameter>
+</method>
+<method name="getDisplayLabel"
+ return="char"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getDownTime"
+ return="long"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getEventTime"
+ return="long"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getFlags"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getKeyCode"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getKeyData"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="results" type="android.view.KeyCharacterMap.KeyData">
+</parameter>
+</method>
+<method name="getMatch"
+ return="char"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="chars" type="char[]">
+</parameter>
+</method>
+<method name="getMatch"
+ return="char"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="chars" type="char[]">
+</parameter>
+<parameter name="modifiers" type="int">
+</parameter>
+</method>
+<method name="getMaxKeyCode"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getMetaState"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getNumber"
+ return="char"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getRepeatCount"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getScanCode"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getUnicodeChar"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getUnicodeChar"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="meta" type="int">
+</parameter>
+</method>
+<method name="isAltPressed"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isCanceled"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isLongPress"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isModifierKey"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="keyCode" type="int">
+</parameter>
+</method>
+<method name="isPrintingKey"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isShiftPressed"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isSymPressed"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isSystem"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isTracking"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="startTracking"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="writeToParcel"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="out" type="android.os.Parcel">
+</parameter>
+<parameter name="flags" type="int">
+</parameter>
+</method>
+<field name="ACTION_DOWN"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="0"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ACTION_MULTIPLE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ACTION_UP"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="CREATOR"
+ type="android.os.Parcelable.Creator"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="FLAG_CANCELED"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="32"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="FLAG_CANCELED_LONG_PRESS"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="256"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="FLAG_EDITOR_ACTION"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="FLAG_FROM_SYSTEM"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="8"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="FLAG_KEEP_TOUCH_MODE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="4"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="FLAG_LONG_PRESS"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="128"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="FLAG_SOFT_KEYBOARD"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="FLAG_TRACKING"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="512"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="FLAG_VIRTUAL_HARD_KEY"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="64"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="FLAG_WOKE_HERE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="KEYCODE_0"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="7"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="KEYCODE_1"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="8"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="KEYCODE_2"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="9"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="KEYCODE_3"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="10"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="KEYCODE_4"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="11"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="KEYCODE_5"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="12"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="KEYCODE_6"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="13"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="KEYCODE_7"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="14"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="KEYCODE_8"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="15"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="KEYCODE_9"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="KEYCODE_A"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="29"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="KEYCODE_ALT_LEFT"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="57"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="KEYCODE_ALT_RIGHT"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="58"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="KEYCODE_APOSTROPHE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="75"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="KEYCODE_AT"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="77"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="KEYCODE_B"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="30"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="KEYCODE_BACK"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="4"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="KEYCODE_BACKSLASH"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="73"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="KEYCODE_C"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="31"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="KEYCODE_CALL"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="5"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="KEYCODE_CAMERA"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="27"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="KEYCODE_CLEAR"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="28"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="KEYCODE_COMMA"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="55"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="KEYCODE_D"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="32"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="KEYCODE_DEL"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="67"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="KEYCODE_DPAD_CENTER"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="23"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="KEYCODE_DPAD_DOWN"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="20"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="KEYCODE_DPAD_LEFT"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="21"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="KEYCODE_DPAD_RIGHT"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="22"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="KEYCODE_DPAD_UP"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="19"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="KEYCODE_E"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="33"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="KEYCODE_ENDCALL"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="6"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="KEYCODE_ENTER"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="66"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="KEYCODE_ENVELOPE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="65"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="KEYCODE_EQUALS"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="70"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="KEYCODE_EXPLORER"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="64"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="KEYCODE_F"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="34"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="KEYCODE_FOCUS"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="80"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="KEYCODE_G"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="35"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="KEYCODE_GRAVE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="68"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="KEYCODE_H"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="36"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="KEYCODE_HEADSETHOOK"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="79"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="KEYCODE_HOME"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="3"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="KEYCODE_I"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="37"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="KEYCODE_J"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="38"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="KEYCODE_K"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="39"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="KEYCODE_L"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="40"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="KEYCODE_LEFT_BRACKET"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="71"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="KEYCODE_M"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="41"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="KEYCODE_MEDIA_FAST_FORWARD"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="90"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="KEYCODE_MEDIA_NEXT"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="87"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="KEYCODE_MEDIA_PLAY_PAUSE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="85"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="KEYCODE_MEDIA_PREVIOUS"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="88"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="KEYCODE_MEDIA_REWIND"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="89"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="KEYCODE_MEDIA_STOP"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="86"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="KEYCODE_MENU"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="82"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="KEYCODE_MINUS"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="69"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="KEYCODE_MUTE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="91"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="KEYCODE_N"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="42"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="KEYCODE_NOTIFICATION"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="83"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="KEYCODE_NUM"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="78"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="KEYCODE_O"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="43"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="KEYCODE_P"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="44"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="KEYCODE_PERIOD"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="56"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="KEYCODE_PLUS"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="81"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="KEYCODE_POUND"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="18"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="KEYCODE_POWER"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="26"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="KEYCODE_Q"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="45"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="KEYCODE_R"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="46"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="KEYCODE_RIGHT_BRACKET"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="72"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="KEYCODE_S"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="47"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="KEYCODE_SEARCH"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="84"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="KEYCODE_SEMICOLON"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="74"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="KEYCODE_SHIFT_LEFT"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="59"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="KEYCODE_SHIFT_RIGHT"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="60"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="KEYCODE_SLASH"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="76"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="KEYCODE_SOFT_LEFT"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="KEYCODE_SOFT_RIGHT"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="KEYCODE_SPACE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="62"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="KEYCODE_STAR"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="17"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="KEYCODE_SYM"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="63"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="KEYCODE_T"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="48"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="KEYCODE_TAB"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="61"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="KEYCODE_U"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="49"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="KEYCODE_UNKNOWN"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="0"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="KEYCODE_V"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="50"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="KEYCODE_VOLUME_DOWN"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="25"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="KEYCODE_VOLUME_UP"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="24"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="KEYCODE_W"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="51"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="KEYCODE_X"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="52"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="KEYCODE_Y"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="53"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="KEYCODE_Z"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="54"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="MAX_KEYCODE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="84"
+ static="true"
+ final="true"
+ deprecated="deprecated"
+ visibility="public"
+>
+</field>
+<field name="META_ALT_LEFT_ON"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="META_ALT_ON"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="META_ALT_RIGHT_ON"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="32"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="META_SHIFT_LEFT_ON"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="64"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="META_SHIFT_ON"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="META_SHIFT_RIGHT_ON"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="128"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="META_SYM_ON"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="4"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<interface name="KeyEvent.Callback"
+ abstract="true"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="onKeyDown"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="keyCode" type="int">
+</parameter>
+<parameter name="event" type="android.view.KeyEvent">
+</parameter>
+</method>
+<method name="onKeyLongPress"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="keyCode" type="int">
+</parameter>
+<parameter name="event" type="android.view.KeyEvent">
+</parameter>
+</method>
+<method name="onKeyMultiple"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="keyCode" type="int">
+</parameter>
+<parameter name="count" type="int">
+</parameter>
+<parameter name="event" type="android.view.KeyEvent">
+</parameter>
+</method>
+<method name="onKeyUp"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="keyCode" type="int">
+</parameter>
+<parameter name="event" type="android.view.KeyEvent">
+</parameter>
+</method>
+</interface>
+<class name="KeyEvent.DispatcherState"
+ extends="java.lang.Object"
+ abstract="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="KeyEvent.DispatcherState"
+ type="android.view.KeyEvent.DispatcherState"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<method name="handleUpEvent"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="event" type="android.view.KeyEvent">
+</parameter>
+</method>
+<method name="isTracking"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="event" type="android.view.KeyEvent">
+</parameter>
+</method>
+<method name="performedLongPress"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="event" type="android.view.KeyEvent">
+</parameter>
+</method>
+<method name="reset"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="reset"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="target" type="java.lang.Object">
+</parameter>
+</method>
+<method name="startTracking"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="event" type="android.view.KeyEvent">
+</parameter>
+<parameter name="target" type="java.lang.Object">
+</parameter>
+</method>
+</class>
+<class name="LayoutInflater"
+ extends="java.lang.Object"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="LayoutInflater"
+ type="android.view.LayoutInflater"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="context" type="android.content.Context">
+</parameter>
+</constructor>
+<constructor name="LayoutInflater"
+ type="android.view.LayoutInflater"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="original" type="android.view.LayoutInflater">
+</parameter>
+<parameter name="newContext" type="android.content.Context">
+</parameter>
+</constructor>
+<method name="cloneInContext"
+ return="android.view.LayoutInflater"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="newContext" type="android.content.Context">
+</parameter>
+</method>
+<method name="createView"
+ return="android.view.View"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+<parameter name="prefix" type="java.lang.String">
+</parameter>
+<parameter name="attrs" type="android.util.AttributeSet">
+</parameter>
+<exception name="ClassNotFoundException" type="java.lang.ClassNotFoundException">
+</exception>
+<exception name="InflateException" type="android.view.InflateException">
+</exception>
+</method>
+<method name="from"
+ return="android.view.LayoutInflater"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="context" type="android.content.Context">
+</parameter>
+</method>
+<method name="getContext"
+ return="android.content.Context"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getFactory"
+ return="android.view.LayoutInflater.Factory"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getFilter"
+ return="android.view.LayoutInflater.Filter"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="inflate"
+ return="android.view.View"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="resource" type="int">
+</parameter>
+<parameter name="root" type="android.view.ViewGroup">
+</parameter>
+</method>
+<method name="inflate"
+ return="android.view.View"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="parser" type="org.xmlpull.v1.XmlPullParser">
+</parameter>
+<parameter name="root" type="android.view.ViewGroup">
+</parameter>
+</method>
+<method name="inflate"
+ return="android.view.View"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="resource" type="int">
+</parameter>
+<parameter name="root" type="android.view.ViewGroup">
+</parameter>
+<parameter name="attachToRoot" type="boolean">
+</parameter>
+</method>
+<method name="inflate"
+ return="android.view.View"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="parser" type="org.xmlpull.v1.XmlPullParser">
+</parameter>
+<parameter name="root" type="android.view.ViewGroup">
+</parameter>
+<parameter name="attachToRoot" type="boolean">
+</parameter>
+</method>
+<method name="onCreateView"
+ return="android.view.View"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+<parameter name="attrs" type="android.util.AttributeSet">
+</parameter>
+<exception name="ClassNotFoundException" type="java.lang.ClassNotFoundException">
+</exception>
+</method>
+<method name="setFactory"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="factory" type="android.view.LayoutInflater.Factory">
+</parameter>
+</method>
+<method name="setFilter"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="filter" type="android.view.LayoutInflater.Filter">
+</parameter>
+</method>
+</class>
+<interface name="LayoutInflater.Factory"
+ abstract="true"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="onCreateView"
+ return="android.view.View"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+<parameter name="context" type="android.content.Context">
+</parameter>
+<parameter name="attrs" type="android.util.AttributeSet">
+</parameter>
+</method>
+</interface>
+<interface name="LayoutInflater.Filter"
+ abstract="true"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="onLoadClass"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="clazz" type="java.lang.Class">
+</parameter>
+</method>
+</interface>
+<interface name="Menu"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="add"
+ return="android.view.MenuItem"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="title" type="java.lang.CharSequence">
+</parameter>
+</method>
+<method name="add"
+ return="android.view.MenuItem"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="titleRes" type="int">
+</parameter>
+</method>
+<method name="add"
+ return="android.view.MenuItem"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="groupId" type="int">
+</parameter>
+<parameter name="itemId" type="int">
+</parameter>
+<parameter name="order" type="int">
+</parameter>
+<parameter name="title" type="java.lang.CharSequence">
+</parameter>
+</method>
+<method name="add"
+ return="android.view.MenuItem"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="groupId" type="int">
+</parameter>
+<parameter name="itemId" type="int">
+</parameter>
+<parameter name="order" type="int">
+</parameter>
+<parameter name="titleRes" type="int">
+</parameter>
+</method>
+<method name="addIntentOptions"
+ return="int"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="groupId" type="int">
+</parameter>
+<parameter name="itemId" type="int">
+</parameter>
+<parameter name="order" type="int">
+</parameter>
+<parameter name="caller" type="android.content.ComponentName">
+</parameter>
+<parameter name="specifics" type="android.content.Intent[]">
+</parameter>
+<parameter name="intent" type="android.content.Intent">
+</parameter>
+<parameter name="flags" type="int">
+</parameter>
+<parameter name="outSpecificItems" type="android.view.MenuItem[]">
+</parameter>
+</method>
+<method name="addSubMenu"
+ return="android.view.SubMenu"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="title" type="java.lang.CharSequence">
+</parameter>
+</method>
+<method name="addSubMenu"
+ return="android.view.SubMenu"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="titleRes" type="int">
+</parameter>
+</method>
+<method name="addSubMenu"
+ return="android.view.SubMenu"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="groupId" type="int">
+</parameter>
+<parameter name="itemId" type="int">
+</parameter>
+<parameter name="order" type="int">
+</parameter>
+<parameter name="title" type="java.lang.CharSequence">
+</parameter>
+</method>
+<method name="addSubMenu"
+ return="android.view.SubMenu"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="groupId" type="int">
+</parameter>
+<parameter name="itemId" type="int">
+</parameter>
+<parameter name="order" type="int">
+</parameter>
+<parameter name="titleRes" type="int">
+</parameter>
+</method>
+<method name="clear"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="close"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="findItem"
+ return="android.view.MenuItem"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="id" type="int">
+</parameter>
+</method>
+<method name="getItem"
+ return="android.view.MenuItem"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="index" type="int">
+</parameter>
+</method>
+<method name="hasVisibleItems"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isShortcutKey"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="keyCode" type="int">
+</parameter>
+<parameter name="event" type="android.view.KeyEvent">
+</parameter>
+</method>
+<method name="performIdentifierAction"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="id" type="int">
+</parameter>
+<parameter name="flags" type="int">
+</parameter>
+</method>
+<method name="performShortcut"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="keyCode" type="int">
+</parameter>
+<parameter name="event" type="android.view.KeyEvent">
+</parameter>
+<parameter name="flags" type="int">
+</parameter>
+</method>
+<method name="removeGroup"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="groupId" type="int">
+</parameter>
+</method>
+<method name="removeItem"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="id" type="int">
+</parameter>
+</method>
+<method name="setGroupCheckable"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="group" type="int">
+</parameter>
+<parameter name="checkable" type="boolean">
+</parameter>
+<parameter name="exclusive" type="boolean">
+</parameter>
+</method>
+<method name="setGroupEnabled"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="group" type="int">
+</parameter>
+<parameter name="enabled" type="boolean">
+</parameter>
+</method>
+<method name="setGroupVisible"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="group" type="int">
+</parameter>
+<parameter name="visible" type="boolean">
+</parameter>
+</method>
+<method name="setQwertyMode"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="isQwerty" type="boolean">
+</parameter>
+</method>
+<method name="size"
+ return="int"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<field name="CATEGORY_ALTERNATIVE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="262144"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="CATEGORY_CONTAINER"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="65536"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="CATEGORY_SECONDARY"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="196608"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="CATEGORY_SYSTEM"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="131072"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="FIRST"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="FLAG_ALWAYS_PERFORM_CLOSE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="FLAG_APPEND_TO_GROUP"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="FLAG_PERFORM_NO_CLOSE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="NONE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="0"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</interface>
+<class name="MenuInflater"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="MenuInflater"
+ type="android.view.MenuInflater"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="context" type="android.content.Context">
+</parameter>
+</constructor>
+<method name="inflate"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="menuRes" type="int">
+</parameter>
+<parameter name="menu" type="android.view.Menu">
+</parameter>
+</method>
+</class>
+<interface name="MenuItem"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="getAlphabeticShortcut"
+ return="char"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getGroupId"
+ return="int"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getIcon"
+ return="android.graphics.drawable.Drawable"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getIntent"
+ return="android.content.Intent"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getItemId"
+ return="int"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getMenuInfo"
+ return="android.view.ContextMenu.ContextMenuInfo"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getNumericShortcut"
+ return="char"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getOrder"
+ return="int"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getSubMenu"
+ return="android.view.SubMenu"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getTitle"
+ return="java.lang.CharSequence"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getTitleCondensed"
+ return="java.lang.CharSequence"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="hasSubMenu"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isCheckable"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isChecked"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isEnabled"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isVisible"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="setAlphabeticShortcut"
+ return="android.view.MenuItem"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="alphaChar" type="char">
+</parameter>
+</method>
+<method name="setCheckable"
+ return="android.view.MenuItem"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="checkable" type="boolean">
+</parameter>
+</method>
+<method name="setChecked"
+ return="android.view.MenuItem"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="checked" type="boolean">
+</parameter>
+</method>
+<method name="setEnabled"
+ return="android.view.MenuItem"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="enabled" type="boolean">
+</parameter>
+</method>
+<method name="setIcon"
+ return="android.view.MenuItem"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="icon" type="android.graphics.drawable.Drawable">
+</parameter>
+</method>
+<method name="setIcon"
+ return="android.view.MenuItem"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="iconRes" type="int">
+</parameter>
+</method>
+<method name="setIntent"
+ return="android.view.MenuItem"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="intent" type="android.content.Intent">
+</parameter>
+</method>
+<method name="setNumericShortcut"
+ return="android.view.MenuItem"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="numericChar" type="char">
+</parameter>
+</method>
+<method name="setOnMenuItemClickListener"
+ return="android.view.MenuItem"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="menuItemClickListener" type="android.view.MenuItem.OnMenuItemClickListener">
+</parameter>
+</method>
+<method name="setShortcut"
+ return="android.view.MenuItem"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="numericChar" type="char">
+</parameter>
+<parameter name="alphaChar" type="char">
+</parameter>
+</method>
+<method name="setTitle"
+ return="android.view.MenuItem"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="title" type="java.lang.CharSequence">
+</parameter>
+</method>
+<method name="setTitle"
+ return="android.view.MenuItem"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="title" type="int">
+</parameter>
+</method>
+<method name="setTitleCondensed"
+ return="android.view.MenuItem"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="title" type="java.lang.CharSequence">
+</parameter>
+</method>
+<method name="setVisible"
+ return="android.view.MenuItem"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="visible" type="boolean">
+</parameter>
+</method>
+</interface>
+<interface name="MenuItem.OnMenuItemClickListener"
+ abstract="true"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="onMenuItemClick"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="item" type="android.view.MenuItem">
+</parameter>
+</method>
+</interface>
+<class name="MotionEvent"
+ extends="android.view.InputEvent"
+ abstract="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="android.os.Parcelable">
+</implements>
+<method name="addBatch"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="eventTime" type="long">
+</parameter>
+<parameter name="x" type="float">
+</parameter>
+<parameter name="y" type="float">
+</parameter>
+<parameter name="pressure" type="float">
+</parameter>
+<parameter name="size" type="float">
+</parameter>
+<parameter name="metaState" type="int">
+</parameter>
+</method>
+<method name="describeContents"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="findPointerIndex"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="pointerId" type="int">
+</parameter>
+</method>
+<method name="getAction"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getActionIndex"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getActionMasked"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getDownTime"
+ return="long"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getEdgeFlags"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getEventTime"
+ return="long"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getHistoricalEventTime"
+ return="long"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="pos" type="int">
+</parameter>
+</method>
+<method name="getHistoricalPressure"
+ return="float"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="pos" type="int">
+</parameter>
+</method>
+<method name="getHistoricalPressure"
+ return="float"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="pointerIndex" type="int">
+</parameter>
+<parameter name="pos" type="int">
+</parameter>
+</method>
+<method name="getHistoricalSize"
+ return="float"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="pos" type="int">
+</parameter>
+</method>
+<method name="getHistoricalSize"
+ return="float"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="pointerIndex" type="int">
+</parameter>
+<parameter name="pos" type="int">
+</parameter>
+</method>
+<method name="getHistoricalX"
+ return="float"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="pos" type="int">
+</parameter>
+</method>
+<method name="getHistoricalX"
+ return="float"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="pointerIndex" type="int">
+</parameter>
+<parameter name="pos" type="int">
+</parameter>
+</method>
+<method name="getHistoricalY"
+ return="float"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="pos" type="int">
+</parameter>
+</method>
+<method name="getHistoricalY"
+ return="float"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="pointerIndex" type="int">
+</parameter>
+<parameter name="pos" type="int">
+</parameter>
+</method>
+<method name="getHistorySize"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getMetaState"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getPointerCount"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getPointerId"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="pointerIndex" type="int">
+</parameter>
+</method>
+<method name="getPressure"
+ return="float"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getPressure"
+ return="float"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="pointerIndex" type="int">
+</parameter>
+</method>
+<method name="getRawX"
+ return="float"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getRawY"
+ return="float"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getSize"
+ return="float"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getSize"
+ return="float"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="pointerIndex" type="int">
+</parameter>
+</method>
+<method name="getX"
+ return="float"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getX"
+ return="float"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="pointerIndex" type="int">
+</parameter>
+</method>
+<method name="getXPrecision"
+ return="float"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getY"
+ return="float"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getY"
+ return="float"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="pointerIndex" type="int">
+</parameter>
+</method>
+<method name="getYPrecision"
+ return="float"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="obtain"
+ return="android.view.MotionEvent"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="downTime" type="long">
+</parameter>
+<parameter name="eventTime" type="long">
+</parameter>
+<parameter name="action" type="int">
+</parameter>
+<parameter name="x" type="float">
+</parameter>
+<parameter name="y" type="float">
+</parameter>
+<parameter name="pressure" type="float">
+</parameter>
+<parameter name="size" type="float">
+</parameter>
+<parameter name="metaState" type="int">
+</parameter>
+<parameter name="xPrecision" type="float">
+</parameter>
+<parameter name="yPrecision" type="float">
+</parameter>
+<parameter name="deviceId" type="int">
+</parameter>
+<parameter name="edgeFlags" type="int">
+</parameter>
+</method>
+<method name="obtain"
+ return="android.view.MotionEvent"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="downTime" type="long">
+</parameter>
+<parameter name="eventTime" type="long">
+</parameter>
+<parameter name="action" type="int">
+</parameter>
+<parameter name="pointers" type="int">
+</parameter>
+<parameter name="x" type="float">
+</parameter>
+<parameter name="y" type="float">
+</parameter>
+<parameter name="pressure" type="float">
+</parameter>
+<parameter name="size" type="float">
+</parameter>
+<parameter name="metaState" type="int">
+</parameter>
+<parameter name="xPrecision" type="float">
+</parameter>
+<parameter name="yPrecision" type="float">
+</parameter>
+<parameter name="deviceId" type="int">
+</parameter>
+<parameter name="edgeFlags" type="int">
+</parameter>
+</method>
+<method name="obtain"
+ return="android.view.MotionEvent"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="downTime" type="long">
+</parameter>
+<parameter name="eventTime" type="long">
+</parameter>
+<parameter name="action" type="int">
+</parameter>
+<parameter name="x" type="float">
+</parameter>
+<parameter name="y" type="float">
+</parameter>
+<parameter name="metaState" type="int">
+</parameter>
+</method>
+<method name="obtain"
+ return="android.view.MotionEvent"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="o" type="android.view.MotionEvent">
+</parameter>
+</method>
+<method name="obtainNoHistory"
+ return="android.view.MotionEvent"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="o" type="android.view.MotionEvent">
+</parameter>
+</method>
+<method name="offsetLocation"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="deltaX" type="float">
+</parameter>
+<parameter name="deltaY" type="float">
+</parameter>
+</method>
+<method name="recycle"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="setAction"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="action" type="int">
+</parameter>
+</method>
+<method name="setEdgeFlags"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="flags" type="int">
+</parameter>
+</method>
+<method name="setLocation"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="x" type="float">
+</parameter>
+<parameter name="y" type="float">
+</parameter>
+</method>
+<method name="writeToParcel"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="out" type="android.os.Parcel">
+</parameter>
+<parameter name="flags" type="int">
+</parameter>
+</method>
+<field name="ACTION_CANCEL"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="3"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ACTION_DOWN"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="0"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ACTION_MASK"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="255"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ACTION_MOVE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ACTION_OUTSIDE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="4"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ACTION_POINTER_1_DOWN"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="5"
+ static="true"
+ final="true"
+ deprecated="deprecated"
+ visibility="public"
+>
+</field>
+<field name="ACTION_POINTER_1_UP"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="6"
+ static="true"
+ final="true"
+ deprecated="deprecated"
+ visibility="public"
+>
+</field>
+<field name="ACTION_POINTER_2_DOWN"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="261"
+ static="true"
+ final="true"
+ deprecated="deprecated"
+ visibility="public"
+>
+</field>
+<field name="ACTION_POINTER_2_UP"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="262"
+ static="true"
+ final="true"
+ deprecated="deprecated"
+ visibility="public"
+>
+</field>
+<field name="ACTION_POINTER_3_DOWN"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="517"
+ static="true"
+ final="true"
+ deprecated="deprecated"
+ visibility="public"
+>
+</field>
+<field name="ACTION_POINTER_3_UP"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="518"
+ static="true"
+ final="true"
+ deprecated="deprecated"
+ visibility="public"
+>
+</field>
+<field name="ACTION_POINTER_DOWN"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="5"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ACTION_POINTER_ID_MASK"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="65280"
+ static="true"
+ final="true"
+ deprecated="deprecated"
+ visibility="public"
+>
+</field>
+<field name="ACTION_POINTER_ID_SHIFT"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="8"
+ static="true"
+ final="true"
+ deprecated="deprecated"
+ visibility="public"
+>
+</field>
+<field name="ACTION_POINTER_INDEX_MASK"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="65280"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ACTION_POINTER_INDEX_SHIFT"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="8"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ACTION_POINTER_UP"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="6"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ACTION_UP"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="CREATOR"
+ type="android.os.Parcelable.Creator"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="EDGE_BOTTOM"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="EDGE_LEFT"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="4"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="EDGE_RIGHT"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="8"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="EDGE_TOP"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<class name="OrientationEventListener"
+ extends="java.lang.Object"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="OrientationEventListener"
+ type="android.view.OrientationEventListener"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="context" type="android.content.Context">
+</parameter>
+</constructor>
+<constructor name="OrientationEventListener"
+ type="android.view.OrientationEventListener"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="context" type="android.content.Context">
+</parameter>
+<parameter name="rate" type="int">
+</parameter>
+</constructor>
+<method name="canDetectOrientation"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="disable"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="enable"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="onOrientationChanged"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="orientation" type="int">
+</parameter>
+</method>
+<field name="ORIENTATION_UNKNOWN"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="-1"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<class name="OrientationListener"
+ extends="java.lang.Object"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="deprecated"
+ visibility="public"
+>
+<implements name="android.hardware.SensorListener">
+</implements>
+<constructor name="OrientationListener"
+ type="android.view.OrientationListener"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="context" type="android.content.Context">
+</parameter>
+</constructor>
+<constructor name="OrientationListener"
+ type="android.view.OrientationListener"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="context" type="android.content.Context">
+</parameter>
+<parameter name="rate" type="int">
+</parameter>
+</constructor>
+<method name="disable"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="enable"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="onAccuracyChanged"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="sensor" type="int">
+</parameter>
+<parameter name="accuracy" type="int">
+</parameter>
+</method>
+<method name="onOrientationChanged"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="orientation" type="int">
+</parameter>
+</method>
+<method name="onSensorChanged"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="sensor" type="int">
+</parameter>
+<parameter name="values" type="float[]">
+</parameter>
+</method>
+<field name="ORIENTATION_UNKNOWN"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="-1"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<class name="ScaleGestureDetector"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="ScaleGestureDetector"
+ type="android.view.ScaleGestureDetector"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="context" type="android.content.Context">
+</parameter>
+<parameter name="listener" type="android.view.ScaleGestureDetector.OnScaleGestureListener">
+</parameter>
+</constructor>
+<method name="getCurrentSpan"
+ return="float"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getEventTime"
+ return="long"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getFocusX"
+ return="float"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getFocusY"
+ return="float"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getPreviousSpan"
+ return="float"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getScaleFactor"
+ return="float"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getTimeDelta"
+ return="long"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isInProgress"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="onTouchEvent"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="event" type="android.view.MotionEvent">
+</parameter>
+</method>
+</class>
+<interface name="ScaleGestureDetector.OnScaleGestureListener"
+ abstract="true"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="onScale"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="detector" type="android.view.ScaleGestureDetector">
+</parameter>
+</method>
+<method name="onScaleBegin"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="detector" type="android.view.ScaleGestureDetector">
+</parameter>
+</method>
+<method name="onScaleEnd"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="detector" type="android.view.ScaleGestureDetector">
+</parameter>
+</method>
+</interface>
+<class name="ScaleGestureDetector.SimpleOnScaleGestureListener"
+ extends="java.lang.Object"
+ abstract="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="android.view.ScaleGestureDetector.OnScaleGestureListener">
+</implements>
+<constructor name="ScaleGestureDetector.SimpleOnScaleGestureListener"
+ type="android.view.ScaleGestureDetector.SimpleOnScaleGestureListener"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<method name="onScale"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="detector" type="android.view.ScaleGestureDetector">
+</parameter>
+</method>
+<method name="onScaleBegin"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="detector" type="android.view.ScaleGestureDetector">
+</parameter>
+</method>
+<method name="onScaleEnd"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="detector" type="android.view.ScaleGestureDetector">
+</parameter>
+</method>
+</class>
+<class name="SoundEffectConstants"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="getContantForFocusDirection"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="direction" type="int">
+</parameter>
+</method>
+<field name="CLICK"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="0"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="NAVIGATION_DOWN"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="4"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="NAVIGATION_LEFT"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="NAVIGATION_RIGHT"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="3"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="NAVIGATION_UP"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<interface name="SubMenu"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="android.view.Menu">
+</implements>
+<method name="clearHeader"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getItem"
+ return="android.view.MenuItem"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="setHeaderIcon"
+ return="android.view.SubMenu"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="iconRes" type="int">
+</parameter>
+</method>
+<method name="setHeaderIcon"
+ return="android.view.SubMenu"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="icon" type="android.graphics.drawable.Drawable">
+</parameter>
+</method>
+<method name="setHeaderTitle"
+ return="android.view.SubMenu"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="titleRes" type="int">
+</parameter>
+</method>
+<method name="setHeaderTitle"
+ return="android.view.SubMenu"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="title" type="java.lang.CharSequence">
+</parameter>
+</method>
+<method name="setHeaderView"
+ return="android.view.SubMenu"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="view" type="android.view.View">
+</parameter>
+</method>
+<method name="setIcon"
+ return="android.view.SubMenu"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="iconRes" type="int">
+</parameter>
+</method>
+<method name="setIcon"
+ return="android.view.SubMenu"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="icon" type="android.graphics.drawable.Drawable">
+</parameter>
+</method>
+</interface>
+<class name="Surface"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="android.os.Parcelable">
+</implements>
+<method name="describeContents"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="freeze"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="hide"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isValid"
+ return="boolean"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="lockCanvas"
+ return="android.graphics.Canvas"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="dirty" type="android.graphics.Rect">
+</parameter>
+<exception name="IllegalArgumentException" type="java.lang.IllegalArgumentException">
+</exception>
+<exception name="Surface.OutOfResourcesException" type="android.view.Surface.OutOfResourcesException">
+</exception>
+</method>
+<method name="readFromParcel"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="source" type="android.os.Parcel">
+</parameter>
+</method>
+<method name="setAlpha"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="alpha" type="float">
+</parameter>
+</method>
+<method name="setFlags"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="flags" type="int">
+</parameter>
+<parameter name="mask" type="int">
+</parameter>
+</method>
+<method name="setFreezeTint"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="tint" type="int">
+</parameter>
+</method>
+<method name="setLayer"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="zorder" type="int">
+</parameter>
+</method>
+<method name="setMatrix"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="dsdx" type="float">
+</parameter>
+<parameter name="dtdx" type="float">
+</parameter>
+<parameter name="dsdy" type="float">
+</parameter>
+<parameter name="dtdy" type="float">
+</parameter>
+</method>
+<method name="setOrientation"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="display" type="int">
+</parameter>
+<parameter name="orientation" type="int">
+</parameter>
+</method>
+<method name="setPosition"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="x" type="int">
+</parameter>
+<parameter name="y" type="int">
+</parameter>
+</method>
+<method name="setSize"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="w" type="int">
+</parameter>
+<parameter name="h" type="int">
+</parameter>
+</method>
+<method name="setTransparentRegionHint"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="region" type="android.graphics.Region">
+</parameter>
+</method>
+<method name="show"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="unfreeze"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="unlockCanvas"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="canvas" type="android.graphics.Canvas">
+</parameter>
+</method>
+<method name="unlockCanvasAndPost"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="canvas" type="android.graphics.Canvas">
+</parameter>
+</method>
+<method name="writeToParcel"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="dest" type="android.os.Parcel">
+</parameter>
+<parameter name="flags" type="int">
+</parameter>
+</method>
+<field name="CREATOR"
+ type="android.os.Parcelable.Creator"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="FX_SURFACE_BLUR"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="65536"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="FX_SURFACE_DIM"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="131072"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="FX_SURFACE_MASK"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="983040"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="FX_SURFACE_NORMAL"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="0"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GPU"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="40"
+ static="true"
+ final="true"
+ deprecated="deprecated"
+ visibility="public"
+>
+</field>
+<field name="HARDWARE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16"
+ static="true"
+ final="true"
+ deprecated="deprecated"
+ visibility="public"
+>
+</field>
+<field name="HIDDEN"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="4"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="NON_PREMULTIPLIED"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="256"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="PUSH_BUFFERS"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="512"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ROTATION_0"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="0"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ROTATION_180"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ROTATION_270"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="3"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ROTATION_90"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="SECURE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="128"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="SURACE_FROZEN"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2"
+ static="true"
+ final="true"
+ deprecated="deprecated"
+ visibility="public"
+>
+</field>
+<field name="SURFACE_BLUR_FREEZE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="SURFACE_DITHER"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="4"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="SURFACE_FROZEN"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="SURFACE_HIDDEN"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<class name="Surface.OutOfResourcesException"
+ extends="java.lang.Exception"
+ abstract="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="Surface.OutOfResourcesException"
+ type="android.view.Surface.OutOfResourcesException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<constructor name="Surface.OutOfResourcesException"
+ type="android.view.Surface.OutOfResourcesException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+</constructor>
+</class>
+<interface name="SurfaceHolder"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="addCallback"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="callback" type="android.view.SurfaceHolder.Callback">
+</parameter>
+</method>
+<method name="getSurface"
+ return="android.view.Surface"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getSurfaceFrame"
+ return="android.graphics.Rect"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isCreating"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="lockCanvas"
+ return="android.graphics.Canvas"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="lockCanvas"
+ return="android.graphics.Canvas"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="dirty" type="android.graphics.Rect">
+</parameter>
+</method>
+<method name="removeCallback"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="callback" type="android.view.SurfaceHolder.Callback">
+</parameter>
+</method>
+<method name="setFixedSize"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="width" type="int">
+</parameter>
+<parameter name="height" type="int">
+</parameter>
+</method>
+<method name="setFormat"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="format" type="int">
+</parameter>
+</method>
+<method name="setKeepScreenOn"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="screenOn" type="boolean">
+</parameter>
+</method>
+<method name="setSizeFromLayout"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="setType"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="type" type="int">
+</parameter>
+</method>
+<method name="unlockCanvasAndPost"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="canvas" type="android.graphics.Canvas">
+</parameter>
+</method>
+<field name="SURFACE_TYPE_GPU"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2"
+ static="true"
+ final="true"
+ deprecated="deprecated"
+ visibility="public"
+>
+</field>
+<field name="SURFACE_TYPE_HARDWARE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1"
+ static="true"
+ final="true"
+ deprecated="deprecated"
+ visibility="public"
+>
+</field>
+<field name="SURFACE_TYPE_NORMAL"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="0"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="SURFACE_TYPE_PUSH_BUFFERS"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="3"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</interface>
+<class name="SurfaceHolder.BadSurfaceTypeException"
+ extends="java.lang.RuntimeException"
+ abstract="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="SurfaceHolder.BadSurfaceTypeException"
+ type="android.view.SurfaceHolder.BadSurfaceTypeException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<constructor name="SurfaceHolder.BadSurfaceTypeException"
+ type="android.view.SurfaceHolder.BadSurfaceTypeException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+</constructor>
+</class>
+<interface name="SurfaceHolder.Callback"
+ abstract="true"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="surfaceChanged"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="holder" type="android.view.SurfaceHolder">
+</parameter>
+<parameter name="format" type="int">
+</parameter>
+<parameter name="width" type="int">
+</parameter>
+<parameter name="height" type="int">
+</parameter>
+</method>
+<method name="surfaceCreated"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="holder" type="android.view.SurfaceHolder">
+</parameter>
+</method>
+<method name="surfaceDestroyed"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="holder" type="android.view.SurfaceHolder">
+</parameter>
+</method>
+</interface>
+<class name="SurfaceView"
+ extends="android.view.View"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="SurfaceView"
+ type="android.view.SurfaceView"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="context" type="android.content.Context">
+</parameter>
+</constructor>
+<constructor name="SurfaceView"
+ type="android.view.SurfaceView"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="context" type="android.content.Context">
+</parameter>
+<parameter name="attrs" type="android.util.AttributeSet">
+</parameter>
+</constructor>
+<constructor name="SurfaceView"
+ type="android.view.SurfaceView"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="context" type="android.content.Context">
+</parameter>
+<parameter name="attrs" type="android.util.AttributeSet">
+</parameter>
+<parameter name="defStyle" type="int">
+</parameter>
+</constructor>
+<method name="gatherTransparentRegion"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="region" type="android.graphics.Region">
+</parameter>
+</method>
+<method name="getHolder"
+ return="android.view.SurfaceHolder"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="setZOrderMediaOverlay"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="isMediaOverlay" type="boolean">
+</parameter>
+</method>
+<method name="setZOrderOnTop"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="onTop" type="boolean">
+</parameter>
+</method>
+</class>
+<class name="TouchDelegate"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="TouchDelegate"
+ type="android.view.TouchDelegate"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="bounds" type="android.graphics.Rect">
+</parameter>
+<parameter name="delegateView" type="android.view.View">
+</parameter>
+</constructor>
+<method name="onTouchEvent"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="event" type="android.view.MotionEvent">
+</parameter>
+</method>
+<field name="ABOVE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="BELOW"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TO_LEFT"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="4"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TO_RIGHT"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="8"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<class name="VelocityTracker"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="addMovement"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="ev" type="android.view.MotionEvent">
+</parameter>
+</method>
+<method name="clear"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="computeCurrentVelocity"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="units" type="int">
+</parameter>
+</method>
+<method name="computeCurrentVelocity"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="units" type="int">
+</parameter>
+<parameter name="maxVelocity" type="float">
+</parameter>
+</method>
+<method name="getXVelocity"
+ return="float"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getXVelocity"
+ return="float"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="id" type="int">
+</parameter>
+</method>
+<method name="getYVelocity"
+ return="float"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getYVelocity"
+ return="float"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="id" type="int">
+</parameter>
+</method>
+<method name="obtain"
+ return="android.view.VelocityTracker"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="recycle"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+</class>
+<class name="View"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="android.view.accessibility.AccessibilityEventSource">
+</implements>
+<implements name="android.graphics.drawable.Drawable.Callback">
+</implements>
+<implements name="android.view.KeyEvent.Callback">
+</implements>
+<constructor name="View"
+ type="android.view.View"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="context" type="android.content.Context">
+</parameter>
+</constructor>
+<constructor name="View"
+ type="android.view.View"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="context" type="android.content.Context">
+</parameter>
+<parameter name="attrs" type="android.util.AttributeSet">
+</parameter>
+</constructor>
+<constructor name="View"
+ type="android.view.View"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="context" type="android.content.Context">
+</parameter>
+<parameter name="attrs" type="android.util.AttributeSet">
+</parameter>
+<parameter name="defStyle" type="int">
+</parameter>
+</constructor>
+<method name="addFocusables"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="views" type="java.util.ArrayList&lt;android.view.View&gt;">
+</parameter>
+<parameter name="direction" type="int">
+</parameter>
+</method>
+<method name="addFocusables"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="views" type="java.util.ArrayList&lt;android.view.View&gt;">
+</parameter>
+<parameter name="direction" type="int">
+</parameter>
+<parameter name="focusableMode" type="int">
+</parameter>
+</method>
+<method name="addTouchables"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="views" type="java.util.ArrayList&lt;android.view.View&gt;">
+</parameter>
+</method>
+<method name="awakenScrollBars"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</method>
+<method name="awakenScrollBars"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="startDelay" type="int">
+</parameter>
+</method>
+<method name="awakenScrollBars"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="startDelay" type="int">
+</parameter>
+<parameter name="invalidate" type="boolean">
+</parameter>
+</method>
+<method name="bringToFront"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="buildDrawingCache"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="buildDrawingCache"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="autoScale" type="boolean">
+</parameter>
+</method>
+<method name="cancelLongPress"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="checkInputConnectionProxy"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="view" type="android.view.View">
+</parameter>
+</method>
+<method name="clearAnimation"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="clearFocus"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="computeHorizontalScrollExtent"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</method>
+<method name="computeHorizontalScrollOffset"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</method>
+<method name="computeHorizontalScrollRange"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</method>
+<method name="computeScroll"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="computeVerticalScrollExtent"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</method>
+<method name="computeVerticalScrollOffset"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</method>
+<method name="computeVerticalScrollRange"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</method>
+<method name="createContextMenu"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="menu" type="android.view.ContextMenu">
+</parameter>
+</method>
+<method name="destroyDrawingCache"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="dispatchConfigurationChanged"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="newConfig" type="android.content.res.Configuration">
+</parameter>
+</method>
+<method name="dispatchDisplayHint"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="hint" type="int">
+</parameter>
+</method>
+<method name="dispatchDraw"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="canvas" type="android.graphics.Canvas">
+</parameter>
+</method>
+<method name="dispatchKeyEvent"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="event" type="android.view.KeyEvent">
+</parameter>
+</method>
+<method name="dispatchKeyEventPreIme"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="event" type="android.view.KeyEvent">
+</parameter>
+</method>
+<method name="dispatchKeyShortcutEvent"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="event" type="android.view.KeyEvent">
+</parameter>
+</method>
+<method name="dispatchPopulateAccessibilityEvent"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="event" type="android.view.accessibility.AccessibilityEvent">
+</parameter>
+</method>
+<method name="dispatchRestoreInstanceState"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="container" type="android.util.SparseArray&lt;android.os.Parcelable&gt;">
+</parameter>
+</method>
+<method name="dispatchSaveInstanceState"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="container" type="android.util.SparseArray&lt;android.os.Parcelable&gt;">
+</parameter>
+</method>
+<method name="dispatchSetPressed"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="pressed" type="boolean">
+</parameter>
+</method>
+<method name="dispatchSetSelected"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="selected" type="boolean">
+</parameter>
+</method>
+<method name="dispatchTouchEvent"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="event" type="android.view.MotionEvent">
+</parameter>
+</method>
+<method name="dispatchTrackballEvent"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="event" type="android.view.MotionEvent">
+</parameter>
+</method>
+<method name="dispatchUnhandledMove"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="focused" type="android.view.View">
+</parameter>
+<parameter name="direction" type="int">
+</parameter>
+</method>
+<method name="dispatchVisibilityChanged"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="changedView" type="android.view.View">
+</parameter>
+<parameter name="visibility" type="int">
+</parameter>
+</method>
+<method name="dispatchWindowFocusChanged"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="hasFocus" type="boolean">
+</parameter>
+</method>
+<method name="dispatchWindowVisibilityChanged"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="visibility" type="int">
+</parameter>
+</method>
+<method name="draw"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="canvas" type="android.graphics.Canvas">
+</parameter>
+</method>
+<method name="drawableStateChanged"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</method>
+<method name="findFocus"
+ return="android.view.View"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="findViewById"
+ return="android.view.View"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="id" type="int">
+</parameter>
+</method>
+<method name="findViewWithTag"
+ return="android.view.View"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="tag" type="java.lang.Object">
+</parameter>
+</method>
+<method name="fitSystemWindows"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="insets" type="android.graphics.Rect">
+</parameter>
+</method>
+<method name="focusSearch"
+ return="android.view.View"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="direction" type="int">
+</parameter>
+</method>
+<method name="forceLayout"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getAnimation"
+ return="android.view.animation.Animation"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getApplicationWindowToken"
+ return="android.os.IBinder"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getBackground"
+ return="android.graphics.drawable.Drawable"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getBaseline"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getBottom"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getBottomFadingEdgeStrength"
+ return="float"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</method>
+<method name="getBottomPaddingOffset"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</method>
+<method name="getContentDescription"
+ return="java.lang.CharSequence"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getContext"
+ return="android.content.Context"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getContextMenuInfo"
+ return="android.view.ContextMenu.ContextMenuInfo"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</method>
+<method name="getDefaultSize"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="size" type="int">
+</parameter>
+<parameter name="measureSpec" type="int">
+</parameter>
+</method>
+<method name="getDrawableState"
+ return="int[]"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getDrawingCache"
+ return="android.graphics.Bitmap"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getDrawingCache"
+ return="android.graphics.Bitmap"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="autoScale" type="boolean">
+</parameter>
+</method>
+<method name="getDrawingCacheBackgroundColor"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getDrawingCacheQuality"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getDrawingRect"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="outRect" type="android.graphics.Rect">
+</parameter>
+</method>
+<method name="getDrawingTime"
+ return="long"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getFocusables"
+ return="java.util.ArrayList&lt;android.view.View&gt;"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="direction" type="int">
+</parameter>
+</method>
+<method name="getFocusedRect"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="r" type="android.graphics.Rect">
+</parameter>
+</method>
+<method name="getGlobalVisibleRect"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="r" type="android.graphics.Rect">
+</parameter>
+<parameter name="globalOffset" type="android.graphics.Point">
+</parameter>
+</method>
+<method name="getGlobalVisibleRect"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="r" type="android.graphics.Rect">
+</parameter>
+</method>
+<method name="getHandler"
+ return="android.os.Handler"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getHeight"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getHitRect"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="outRect" type="android.graphics.Rect">
+</parameter>
+</method>
+<method name="getHorizontalFadingEdgeLength"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getHorizontalScrollbarHeight"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</method>
+<method name="getId"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getKeepScreenOn"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getKeyDispatcherState"
+ return="android.view.KeyEvent.DispatcherState"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getLayoutParams"
+ return="android.view.ViewGroup.LayoutParams"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getLeft"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getLeftFadingEdgeStrength"
+ return="float"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</method>
+<method name="getLeftPaddingOffset"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</method>
+<method name="getLocalVisibleRect"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="r" type="android.graphics.Rect">
+</parameter>
+</method>
+<method name="getLocationInWindow"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="location" type="int[]">
+</parameter>
+</method>
+<method name="getLocationOnScreen"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="location" type="int[]">
+</parameter>
+</method>
+<method name="getMeasuredHeight"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getMeasuredWidth"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getNextFocusDownId"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getNextFocusLeftId"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getNextFocusRightId"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getNextFocusUpId"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getOnFocusChangeListener"
+ return="android.view.View.OnFocusChangeListener"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getPaddingBottom"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getPaddingLeft"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getPaddingRight"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getPaddingTop"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getParent"
+ return="android.view.ViewParent"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getResources"
+ return="android.content.res.Resources"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getRight"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getRightFadingEdgeStrength"
+ return="float"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</method>
+<method name="getRightPaddingOffset"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</method>
+<method name="getRootView"
+ return="android.view.View"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getScrollBarStyle"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getScrollX"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getScrollY"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getSolidColor"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getSuggestedMinimumHeight"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</method>
+<method name="getSuggestedMinimumWidth"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</method>
+<method name="getTag"
+ return="java.lang.Object"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getTag"
+ return="java.lang.Object"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="key" type="int">
+</parameter>
+</method>
+<method name="getTop"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getTopFadingEdgeStrength"
+ return="float"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</method>
+<method name="getTopPaddingOffset"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</method>
+<method name="getTouchDelegate"
+ return="android.view.TouchDelegate"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getTouchables"
+ return="java.util.ArrayList&lt;android.view.View&gt;"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getVerticalFadingEdgeLength"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getVerticalScrollbarWidth"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getViewTreeObserver"
+ return="android.view.ViewTreeObserver"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getVisibility"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getWidth"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getWindowAttachCount"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</method>
+<method name="getWindowToken"
+ return="android.os.IBinder"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getWindowVisibility"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getWindowVisibleDisplayFrame"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="outRect" type="android.graphics.Rect">
+</parameter>
+</method>
+<method name="hasFocus"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="hasFocusable"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="hasWindowFocus"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="inflate"
+ return="android.view.View"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="context" type="android.content.Context">
+</parameter>
+<parameter name="resource" type="int">
+</parameter>
+<parameter name="root" type="android.view.ViewGroup">
+</parameter>
+</method>
+<method name="initializeFadingEdge"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="a" type="android.content.res.TypedArray">
+</parameter>
+</method>
+<method name="initializeScrollbars"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="a" type="android.content.res.TypedArray">
+</parameter>
+</method>
+<method name="invalidate"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="dirty" type="android.graphics.Rect">
+</parameter>
+</method>
+<method name="invalidate"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="l" type="int">
+</parameter>
+<parameter name="t" type="int">
+</parameter>
+<parameter name="r" type="int">
+</parameter>
+<parameter name="b" type="int">
+</parameter>
+</method>
+<method name="invalidate"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="invalidateDrawable"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="drawable" type="android.graphics.drawable.Drawable">
+</parameter>
+</method>
+<method name="isClickable"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isDrawingCacheEnabled"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isDuplicateParentStateEnabled"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isEnabled"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isFocusable"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isFocusableInTouchMode"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isFocused"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isHapticFeedbackEnabled"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isHorizontalFadingEdgeEnabled"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isHorizontalScrollBarEnabled"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isInEditMode"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isInTouchMode"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isLayoutRequested"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isLongClickable"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isOpaque"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isPaddingOffsetRequired"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</method>
+<method name="isPressed"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isSaveEnabled"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isScrollbarFadingEnabled"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isSelected"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isShown"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isSoundEffectsEnabled"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isVerticalFadingEdgeEnabled"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isVerticalScrollBarEnabled"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="layout"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="l" type="int">
+</parameter>
+<parameter name="t" type="int">
+</parameter>
+<parameter name="r" type="int">
+</parameter>
+<parameter name="b" type="int">
+</parameter>
+</method>
+<method name="measure"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="widthMeasureSpec" type="int">
+</parameter>
+<parameter name="heightMeasureSpec" type="int">
+</parameter>
+</method>
+<method name="mergeDrawableStates"
+ return="int[]"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="baseState" type="int[]">
+</parameter>
+<parameter name="additionalState" type="int[]">
+</parameter>
+</method>
+<method name="offsetLeftAndRight"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="offset" type="int">
+</parameter>
+</method>
+<method name="offsetTopAndBottom"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="offset" type="int">
+</parameter>
+</method>
+<method name="onAnimationEnd"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</method>
+<method name="onAnimationStart"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</method>
+<method name="onAttachedToWindow"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</method>
+<method name="onCheckIsTextEditor"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="onConfigurationChanged"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="newConfig" type="android.content.res.Configuration">
+</parameter>
+</method>
+<method name="onCreateContextMenu"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="menu" type="android.view.ContextMenu">
+</parameter>
+</method>
+<method name="onCreateDrawableState"
+ return="int[]"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="extraSpace" type="int">
+</parameter>
+</method>
+<method name="onCreateInputConnection"
+ return="android.view.inputmethod.InputConnection"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="outAttrs" type="android.view.inputmethod.EditorInfo">
+</parameter>
+</method>
+<method name="onDetachedFromWindow"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</method>
+<method name="onDisplayHint"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="hint" type="int">
+</parameter>
+</method>
+<method name="onDraw"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="canvas" type="android.graphics.Canvas">
+</parameter>
+</method>
+<method name="onDrawScrollBars"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="canvas" type="android.graphics.Canvas">
+</parameter>
+</method>
+<method name="onFinishInflate"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</method>
+<method name="onFinishTemporaryDetach"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="onFocusChanged"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="gainFocus" type="boolean">
+</parameter>
+<parameter name="direction" type="int">
+</parameter>
+<parameter name="previouslyFocusedRect" type="android.graphics.Rect">
+</parameter>
+</method>
+<method name="onKeyDown"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="keyCode" type="int">
+</parameter>
+<parameter name="event" type="android.view.KeyEvent">
+</parameter>
+</method>
+<method name="onKeyLongPress"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="keyCode" type="int">
+</parameter>
+<parameter name="event" type="android.view.KeyEvent">
+</parameter>
+</method>
+<method name="onKeyMultiple"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="keyCode" type="int">
+</parameter>
+<parameter name="repeatCount" type="int">
+</parameter>
+<parameter name="event" type="android.view.KeyEvent">
+</parameter>
+</method>
+<method name="onKeyPreIme"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="keyCode" type="int">
+</parameter>
+<parameter name="event" type="android.view.KeyEvent">
+</parameter>
+</method>
+<method name="onKeyShortcut"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="keyCode" type="int">
+</parameter>
+<parameter name="event" type="android.view.KeyEvent">
+</parameter>
+</method>
+<method name="onKeyUp"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="keyCode" type="int">
+</parameter>
+<parameter name="event" type="android.view.KeyEvent">
+</parameter>
+</method>
+<method name="onLayout"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="changed" type="boolean">
+</parameter>
+<parameter name="left" type="int">
+</parameter>
+<parameter name="top" type="int">
+</parameter>
+<parameter name="right" type="int">
+</parameter>
+<parameter name="bottom" type="int">
+</parameter>
+</method>
+<method name="onMeasure"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="widthMeasureSpec" type="int">
+</parameter>
+<parameter name="heightMeasureSpec" type="int">
+</parameter>
+</method>
+<method name="onRestoreInstanceState"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="state" type="android.os.Parcelable">
+</parameter>
+</method>
+<method name="onSaveInstanceState"
+ return="android.os.Parcelable"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</method>
+<method name="onScrollChanged"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="l" type="int">
+</parameter>
+<parameter name="t" type="int">
+</parameter>
+<parameter name="oldl" type="int">
+</parameter>
+<parameter name="oldt" type="int">
+</parameter>
+</method>
+<method name="onSetAlpha"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="alpha" type="int">
+</parameter>
+</method>
+<method name="onSizeChanged"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="w" type="int">
+</parameter>
+<parameter name="h" type="int">
+</parameter>
+<parameter name="oldw" type="int">
+</parameter>
+<parameter name="oldh" type="int">
+</parameter>
+</method>
+<method name="onStartTemporaryDetach"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="onTouchEvent"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="event" type="android.view.MotionEvent">
+</parameter>
+</method>
+<method name="onTrackballEvent"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="event" type="android.view.MotionEvent">
+</parameter>
+</method>
+<method name="onVisibilityChanged"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="changedView" type="android.view.View">
+</parameter>
+<parameter name="visibility" type="int">
+</parameter>
+</method>
+<method name="onWindowFocusChanged"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="hasWindowFocus" type="boolean">
+</parameter>
+</method>
+<method name="onWindowVisibilityChanged"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="visibility" type="int">
+</parameter>
+</method>
+<method name="performClick"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="performHapticFeedback"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="feedbackConstant" type="int">
+</parameter>
+</method>
+<method name="performHapticFeedback"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="feedbackConstant" type="int">
+</parameter>
+<parameter name="flags" type="int">
+</parameter>
+</method>
+<method name="performLongClick"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="playSoundEffect"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="soundConstant" type="int">
+</parameter>
+</method>
+<method name="post"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="action" type="java.lang.Runnable">
+</parameter>
+</method>
+<method name="postDelayed"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="action" type="java.lang.Runnable">
+</parameter>
+<parameter name="delayMillis" type="long">
+</parameter>
+</method>
+<method name="postInvalidate"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="postInvalidate"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="left" type="int">
+</parameter>
+<parameter name="top" type="int">
+</parameter>
+<parameter name="right" type="int">
+</parameter>
+<parameter name="bottom" type="int">
+</parameter>
+</method>
+<method name="postInvalidateDelayed"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="delayMilliseconds" type="long">
+</parameter>
+</method>
+<method name="postInvalidateDelayed"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="delayMilliseconds" type="long">
+</parameter>
+<parameter name="left" type="int">
+</parameter>
+<parameter name="top" type="int">
+</parameter>
+<parameter name="right" type="int">
+</parameter>
+<parameter name="bottom" type="int">
+</parameter>
+</method>
+<method name="refreshDrawableState"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="removeCallbacks"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="action" type="java.lang.Runnable">
+</parameter>
+</method>
+<method name="requestFocus"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="requestFocus"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="direction" type="int">
+</parameter>
+</method>
+<method name="requestFocus"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="direction" type="int">
+</parameter>
+<parameter name="previouslyFocusedRect" type="android.graphics.Rect">
+</parameter>
+</method>
+<method name="requestFocusFromTouch"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="requestLayout"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="requestRectangleOnScreen"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="rectangle" type="android.graphics.Rect">
+</parameter>
+</method>
+<method name="requestRectangleOnScreen"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="rectangle" type="android.graphics.Rect">
+</parameter>
+<parameter name="immediate" type="boolean">
+</parameter>
+</method>
+<method name="resolveSize"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="size" type="int">
+</parameter>
+<parameter name="measureSpec" type="int">
+</parameter>
+</method>
+<method name="restoreHierarchyState"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="container" type="android.util.SparseArray&lt;android.os.Parcelable&gt;">
+</parameter>
+</method>
+<method name="saveHierarchyState"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="container" type="android.util.SparseArray&lt;android.os.Parcelable&gt;">
+</parameter>
+</method>
+<method name="scheduleDrawable"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="who" type="android.graphics.drawable.Drawable">
+</parameter>
+<parameter name="what" type="java.lang.Runnable">
+</parameter>
+<parameter name="when" type="long">
+</parameter>
+</method>
+<method name="scrollBy"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="x" type="int">
+</parameter>
+<parameter name="y" type="int">
+</parameter>
+</method>
+<method name="scrollTo"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="x" type="int">
+</parameter>
+<parameter name="y" type="int">
+</parameter>
+</method>
+<method name="sendAccessibilityEvent"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="eventType" type="int">
+</parameter>
+</method>
+<method name="sendAccessibilityEventUnchecked"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="event" type="android.view.accessibility.AccessibilityEvent">
+</parameter>
+</method>
+<method name="setAnimation"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="animation" type="android.view.animation.Animation">
+</parameter>
+</method>
+<method name="setBackgroundColor"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="color" type="int">
+</parameter>
+</method>
+<method name="setBackgroundDrawable"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="d" type="android.graphics.drawable.Drawable">
+</parameter>
+</method>
+<method name="setBackgroundResource"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="resid" type="int">
+</parameter>
+</method>
+<method name="setClickable"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="clickable" type="boolean">
+</parameter>
+</method>
+<method name="setContentDescription"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="contentDescription" type="java.lang.CharSequence">
+</parameter>
+</method>
+<method name="setDrawingCacheBackgroundColor"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="color" type="int">
+</parameter>
+</method>
+<method name="setDrawingCacheEnabled"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="enabled" type="boolean">
+</parameter>
+</method>
+<method name="setDrawingCacheQuality"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="quality" type="int">
+</parameter>
+</method>
+<method name="setDuplicateParentStateEnabled"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="enabled" type="boolean">
+</parameter>
+</method>
+<method name="setEnabled"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="enabled" type="boolean">
+</parameter>
+</method>
+<method name="setFadingEdgeLength"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="length" type="int">
+</parameter>
+</method>
+<method name="setFocusable"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="focusable" type="boolean">
+</parameter>
+</method>
+<method name="setFocusableInTouchMode"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="focusableInTouchMode" type="boolean">
+</parameter>
+</method>
+<method name="setHapticFeedbackEnabled"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="hapticFeedbackEnabled" type="boolean">
+</parameter>
+</method>
+<method name="setHorizontalFadingEdgeEnabled"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="horizontalFadingEdgeEnabled" type="boolean">
+</parameter>
+</method>
+<method name="setHorizontalScrollBarEnabled"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="horizontalScrollBarEnabled" type="boolean">
+</parameter>
+</method>
+<method name="setId"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="id" type="int">
+</parameter>
+</method>
+<method name="setKeepScreenOn"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="keepScreenOn" type="boolean">
+</parameter>
+</method>
+<method name="setLayoutParams"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="params" type="android.view.ViewGroup.LayoutParams">
+</parameter>
+</method>
+<method name="setLongClickable"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="longClickable" type="boolean">
+</parameter>
+</method>
+<method name="setMeasuredDimension"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="measuredWidth" type="int">
+</parameter>
+<parameter name="measuredHeight" type="int">
+</parameter>
+</method>
+<method name="setMinimumHeight"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="minHeight" type="int">
+</parameter>
+</method>
+<method name="setMinimumWidth"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="minWidth" type="int">
+</parameter>
+</method>
+<method name="setNextFocusDownId"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="nextFocusDownId" type="int">
+</parameter>
+</method>
+<method name="setNextFocusLeftId"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="nextFocusLeftId" type="int">
+</parameter>
+</method>
+<method name="setNextFocusRightId"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="nextFocusRightId" type="int">
+</parameter>
+</method>
+<method name="setNextFocusUpId"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="nextFocusUpId" type="int">
+</parameter>
+</method>
+<method name="setOnClickListener"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="l" type="android.view.View.OnClickListener">
+</parameter>
+</method>
+<method name="setOnCreateContextMenuListener"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="l" type="android.view.View.OnCreateContextMenuListener">
+</parameter>
+</method>
+<method name="setOnFocusChangeListener"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="l" type="android.view.View.OnFocusChangeListener">
+</parameter>
+</method>
+<method name="setOnKeyListener"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="l" type="android.view.View.OnKeyListener">
+</parameter>
+</method>
+<method name="setOnLongClickListener"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="l" type="android.view.View.OnLongClickListener">
+</parameter>
+</method>
+<method name="setOnTouchListener"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="l" type="android.view.View.OnTouchListener">
+</parameter>
+</method>
+<method name="setPadding"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="left" type="int">
+</parameter>
+<parameter name="top" type="int">
+</parameter>
+<parameter name="right" type="int">
+</parameter>
+<parameter name="bottom" type="int">
+</parameter>
+</method>
+<method name="setPressed"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="pressed" type="boolean">
+</parameter>
+</method>
+<method name="setSaveEnabled"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="enabled" type="boolean">
+</parameter>
+</method>
+<method name="setScrollBarStyle"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="style" type="int">
+</parameter>
+</method>
+<method name="setScrollContainer"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="isScrollContainer" type="boolean">
+</parameter>
+</method>
+<method name="setScrollbarFadingEnabled"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="fadeScrollbars" type="boolean">
+</parameter>
+</method>
+<method name="setSelected"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="selected" type="boolean">
+</parameter>
+</method>
+<method name="setSoundEffectsEnabled"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="soundEffectsEnabled" type="boolean">
+</parameter>
+</method>
+<method name="setTag"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="tag" type="java.lang.Object">
+</parameter>
+</method>
+<method name="setTag"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="key" type="int">
+</parameter>
+<parameter name="tag" type="java.lang.Object">
+</parameter>
+</method>
+<method name="setTouchDelegate"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="delegate" type="android.view.TouchDelegate">
+</parameter>
+</method>
+<method name="setVerticalFadingEdgeEnabled"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="verticalFadingEdgeEnabled" type="boolean">
+</parameter>
+</method>
+<method name="setVerticalScrollBarEnabled"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="verticalScrollBarEnabled" type="boolean">
+</parameter>
+</method>
+<method name="setVisibility"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="visibility" type="int">
+</parameter>
+</method>
+<method name="setWillNotCacheDrawing"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="willNotCacheDrawing" type="boolean">
+</parameter>
+</method>
+<method name="setWillNotDraw"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="willNotDraw" type="boolean">
+</parameter>
+</method>
+<method name="showContextMenu"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="startAnimation"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="animation" type="android.view.animation.Animation">
+</parameter>
+</method>
+<method name="unscheduleDrawable"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="who" type="android.graphics.drawable.Drawable">
+</parameter>
+<parameter name="what" type="java.lang.Runnable">
+</parameter>
+</method>
+<method name="unscheduleDrawable"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="who" type="android.graphics.drawable.Drawable">
+</parameter>
+</method>
+<method name="verifyDrawable"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="who" type="android.graphics.drawable.Drawable">
+</parameter>
+</method>
+<method name="willNotCacheDrawing"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="willNotDraw"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<field name="DRAWING_CACHE_QUALITY_AUTO"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="0"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="DRAWING_CACHE_QUALITY_HIGH"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1048576"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="DRAWING_CACHE_QUALITY_LOW"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="524288"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="EMPTY_STATE_SET"
+ type="int[]"
+ transient="false"
+ volatile="false"
+ value="null"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</field>
+<field name="ENABLED_FOCUSED_SELECTED_STATE_SET"
+ type="int[]"
+ transient="false"
+ volatile="false"
+ value="null"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</field>
+<field name="ENABLED_FOCUSED_SELECTED_WINDOW_FOCUSED_STATE_SET"
+ type="int[]"
+ transient="false"
+ volatile="false"
+ value="null"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</field>
+<field name="ENABLED_FOCUSED_STATE_SET"
+ type="int[]"
+ transient="false"
+ volatile="false"
+ value="null"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</field>
+<field name="ENABLED_FOCUSED_WINDOW_FOCUSED_STATE_SET"
+ type="int[]"
+ transient="false"
+ volatile="false"
+ value="null"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</field>
+<field name="ENABLED_SELECTED_STATE_SET"
+ type="int[]"
+ transient="false"
+ volatile="false"
+ value="null"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</field>
+<field name="ENABLED_SELECTED_WINDOW_FOCUSED_STATE_SET"
+ type="int[]"
+ transient="false"
+ volatile="false"
+ value="null"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</field>
+<field name="ENABLED_STATE_SET"
+ type="int[]"
+ transient="false"
+ volatile="false"
+ value="null"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</field>
+<field name="ENABLED_WINDOW_FOCUSED_STATE_SET"
+ type="int[]"
+ transient="false"
+ volatile="false"
+ value="null"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</field>
+<field name="FOCUSABLES_ALL"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="0"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="FOCUSABLES_TOUCH_MODE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="FOCUSED_SELECTED_STATE_SET"
+ type="int[]"
+ transient="false"
+ volatile="false"
+ value="null"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</field>
+<field name="FOCUSED_SELECTED_WINDOW_FOCUSED_STATE_SET"
+ type="int[]"
+ transient="false"
+ volatile="false"
+ value="null"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</field>
+<field name="FOCUSED_STATE_SET"
+ type="int[]"
+ transient="false"
+ volatile="false"
+ value="null"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</field>
+<field name="FOCUSED_WINDOW_FOCUSED_STATE_SET"
+ type="int[]"
+ transient="false"
+ volatile="false"
+ value="null"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</field>
+<field name="FOCUS_BACKWARD"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="FOCUS_DOWN"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="130"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="FOCUS_FORWARD"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="FOCUS_LEFT"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="17"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="FOCUS_RIGHT"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="66"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="FOCUS_UP"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="33"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GONE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="8"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="HAPTIC_FEEDBACK_ENABLED"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="268435456"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="INVISIBLE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="4"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="KEEP_SCREEN_ON"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="67108864"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="NO_ID"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="-1"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="PRESSED_ENABLED_FOCUSED_SELECTED_STATE_SET"
+ type="int[]"
+ transient="false"
+ volatile="false"
+ value="null"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</field>
+<field name="PRESSED_ENABLED_FOCUSED_SELECTED_WINDOW_FOCUSED_STATE_SET"
+ type="int[]"
+ transient="false"
+ volatile="false"
+ value="null"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</field>
+<field name="PRESSED_ENABLED_FOCUSED_STATE_SET"
+ type="int[]"
+ transient="false"
+ volatile="false"
+ value="null"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</field>
+<field name="PRESSED_ENABLED_FOCUSED_WINDOW_FOCUSED_STATE_SET"
+ type="int[]"
+ transient="false"
+ volatile="false"
+ value="null"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</field>
+<field name="PRESSED_ENABLED_SELECTED_STATE_SET"
+ type="int[]"
+ transient="false"
+ volatile="false"
+ value="null"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</field>
+<field name="PRESSED_ENABLED_SELECTED_WINDOW_FOCUSED_STATE_SET"
+ type="int[]"
+ transient="false"
+ volatile="false"
+ value="null"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</field>
+<field name="PRESSED_ENABLED_STATE_SET"
+ type="int[]"
+ transient="false"
+ volatile="false"
+ value="null"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</field>
+<field name="PRESSED_ENABLED_WINDOW_FOCUSED_STATE_SET"
+ type="int[]"
+ transient="false"
+ volatile="false"
+ value="null"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</field>
+<field name="PRESSED_FOCUSED_SELECTED_STATE_SET"
+ type="int[]"
+ transient="false"
+ volatile="false"
+ value="null"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</field>
+<field name="PRESSED_FOCUSED_SELECTED_WINDOW_FOCUSED_STATE_SET"
+ type="int[]"
+ transient="false"
+ volatile="false"
+ value="null"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</field>
+<field name="PRESSED_FOCUSED_STATE_SET"
+ type="int[]"
+ transient="false"
+ volatile="false"
+ value="null"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</field>
+<field name="PRESSED_FOCUSED_WINDOW_FOCUSED_STATE_SET"
+ type="int[]"
+ transient="false"
+ volatile="false"
+ value="null"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</field>
+<field name="PRESSED_SELECTED_STATE_SET"
+ type="int[]"
+ transient="false"
+ volatile="false"
+ value="null"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</field>
+<field name="PRESSED_SELECTED_WINDOW_FOCUSED_STATE_SET"
+ type="int[]"
+ transient="false"
+ volatile="false"
+ value="null"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</field>
+<field name="PRESSED_WINDOW_FOCUSED_STATE_SET"
+ type="int[]"
+ transient="false"
+ volatile="false"
+ value="null"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</field>
+<field name="SCROLLBARS_INSIDE_INSET"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16777216"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="SCROLLBARS_INSIDE_OVERLAY"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="0"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="SCROLLBARS_OUTSIDE_INSET"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="50331648"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="SCROLLBARS_OUTSIDE_OVERLAY"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="33554432"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="SELECTED_STATE_SET"
+ type="int[]"
+ transient="false"
+ volatile="false"
+ value="null"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</field>
+<field name="SELECTED_WINDOW_FOCUSED_STATE_SET"
+ type="int[]"
+ transient="false"
+ volatile="false"
+ value="null"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</field>
+<field name="SOUND_EFFECTS_ENABLED"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="134217728"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="VIEW_LOG_TAG"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;View&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</field>
+<field name="VISIBLE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="0"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="WINDOW_FOCUSED_STATE_SET"
+ type="int[]"
+ transient="false"
+ volatile="false"
+ value="null"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</field>
+</class>
+<class name="View.BaseSavedState"
+ extends="android.view.AbsSavedState"
+ abstract="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="View.BaseSavedState"
+ type="android.view.View.BaseSavedState"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="source" type="android.os.Parcel">
+</parameter>
+</constructor>
+<constructor name="View.BaseSavedState"
+ type="android.view.View.BaseSavedState"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="superState" type="android.os.Parcelable">
+</parameter>
+</constructor>
+<field name="CREATOR"
+ type="android.os.Parcelable.Creator"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<class name="View.MeasureSpec"
+ extends="java.lang.Object"
+ abstract="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="View.MeasureSpec"
+ type="android.view.View.MeasureSpec"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<method name="getMode"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="measureSpec" type="int">
+</parameter>
+</method>
+<method name="getSize"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="measureSpec" type="int">
+</parameter>
+</method>
+<method name="makeMeasureSpec"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="size" type="int">
+</parameter>
+<parameter name="mode" type="int">
+</parameter>
+</method>
+<method name="toString"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="measureSpec" type="int">
+</parameter>
+</method>
+<field name="AT_MOST"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="-2147483648"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="EXACTLY"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1073741824"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="UNSPECIFIED"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="0"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<interface name="View.OnClickListener"
+ abstract="true"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="onClick"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="v" type="android.view.View">
+</parameter>
+</method>
+</interface>
+<interface name="View.OnCreateContextMenuListener"
+ abstract="true"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="onCreateContextMenu"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="menu" type="android.view.ContextMenu">
+</parameter>
+<parameter name="v" type="android.view.View">
+</parameter>
+<parameter name="menuInfo" type="android.view.ContextMenu.ContextMenuInfo">
+</parameter>
+</method>
+</interface>
+<interface name="View.OnFocusChangeListener"
+ abstract="true"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="onFocusChange"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="v" type="android.view.View">
+</parameter>
+<parameter name="hasFocus" type="boolean">
+</parameter>
+</method>
+</interface>
+<interface name="View.OnKeyListener"
+ abstract="true"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="onKey"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="v" type="android.view.View">
+</parameter>
+<parameter name="keyCode" type="int">
+</parameter>
+<parameter name="event" type="android.view.KeyEvent">
+</parameter>
+</method>
+</interface>
+<interface name="View.OnLongClickListener"
+ abstract="true"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="onLongClick"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="v" type="android.view.View">
+</parameter>
+</method>
+</interface>
+<interface name="View.OnTouchListener"
+ abstract="true"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="onTouch"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="v" type="android.view.View">
+</parameter>
+<parameter name="event" type="android.view.MotionEvent">
+</parameter>
+</method>
+</interface>
+<class name="ViewConfiguration"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="ViewConfiguration"
+ type="android.view.ViewConfiguration"
+ static="false"
+ final="false"
+ deprecated="deprecated"
+ visibility="public"
+>
+</constructor>
+<method name="get"
+ return="android.view.ViewConfiguration"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="context" type="android.content.Context">
+</parameter>
+</method>
+<method name="getDoubleTapTimeout"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getEdgeSlop"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="deprecated"
+ visibility="public"
+>
+</method>
+<method name="getFadingEdgeLength"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="deprecated"
+ visibility="public"
+>
+</method>
+<method name="getGlobalActionKeyTimeout"
+ return="long"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getJumpTapTimeout"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getLongPressTimeout"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getMaximumDrawingCacheSize"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="deprecated"
+ visibility="public"
+>
+</method>
+<method name="getMaximumFlingVelocity"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="deprecated"
+ visibility="public"
+>
+</method>
+<method name="getMinimumFlingVelocity"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="deprecated"
+ visibility="public"
+>
+</method>
+<method name="getPressedStateDuration"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getScaledDoubleTapSlop"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getScaledEdgeSlop"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getScaledFadingEdgeLength"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getScaledMaximumDrawingCacheSize"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getScaledMaximumFlingVelocity"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getScaledMinimumFlingVelocity"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getScaledPagingTouchSlop"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getScaledScrollBarSize"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getScaledTouchSlop"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getScaledWindowTouchSlop"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getScrollBarFadeDuration"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getScrollBarSize"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="deprecated"
+ visibility="public"
+>
+</method>
+<method name="getScrollDefaultDelay"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getScrollFriction"
+ return="float"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getTapTimeout"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getTouchSlop"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="deprecated"
+ visibility="public"
+>
+</method>
+<method name="getWindowTouchSlop"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="deprecated"
+ visibility="public"
+>
+</method>
+<method name="getZoomControlsTimeout"
+ return="long"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+</class>
+<class name="ViewDebug"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="ViewDebug"
+ type="android.view.ViewDebug"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<method name="dumpCapturedView"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="tag" type="java.lang.String">
+</parameter>
+<parameter name="view" type="java.lang.Object">
+</parameter>
+</method>
+<method name="startHierarchyTracing"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="prefix" type="java.lang.String">
+</parameter>
+<parameter name="view" type="android.view.View">
+</parameter>
+</method>
+<method name="startRecyclerTracing"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="prefix" type="java.lang.String">
+</parameter>
+<parameter name="view" type="android.view.View">
+</parameter>
+</method>
+<method name="stopHierarchyTracing"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="stopRecyclerTracing"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="trace"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="view" type="android.view.View">
+</parameter>
+<parameter name="type" type="android.view.ViewDebug.RecyclerTraceType">
+</parameter>
+<parameter name="parameters" type="int...">
+</parameter>
+</method>
+<method name="trace"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="view" type="android.view.View">
+</parameter>
+<parameter name="type" type="android.view.ViewDebug.HierarchyTraceType">
+</parameter>
+</method>
+<field name="TRACE_HIERARCHY"
+ type="boolean"
+ transient="false"
+ volatile="false"
+ value="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TRACE_RECYCLER"
+ type="boolean"
+ transient="false"
+ volatile="false"
+ value="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<class name="ViewDebug.CapturedViewProperty"
+ extends="java.lang.Object"
+ abstract="true"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="java.lang.annotation.Annotation">
+</implements>
+</class>
+<class name="ViewDebug.ExportedProperty"
+ extends="java.lang.Object"
+ abstract="true"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="java.lang.annotation.Annotation">
+</implements>
+</class>
+<class name="ViewDebug.FlagToString"
+ extends="java.lang.Object"
+ abstract="true"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="java.lang.annotation.Annotation">
+</implements>
+</class>
+<class name="ViewDebug.HierarchyTraceType"
+ extends="java.lang.Enum"
+ abstract="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="valueOf"
+ return="android.view.ViewDebug.HierarchyTraceType"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+</method>
+<method name="values"
+ return="android.view.ViewDebug.HierarchyTraceType[]"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+</class>
+<class name="ViewDebug.IntToString"
+ extends="java.lang.Object"
+ abstract="true"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="java.lang.annotation.Annotation">
+</implements>
+</class>
+<class name="ViewDebug.RecyclerTraceType"
+ extends="java.lang.Enum"
+ abstract="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="valueOf"
+ return="android.view.ViewDebug.RecyclerTraceType"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+</method>
+<method name="values"
+ return="android.view.ViewDebug.RecyclerTraceType[]"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+</class>
+<class name="ViewGroup"
+ extends="android.view.View"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="android.view.ViewManager">
+</implements>
+<implements name="android.view.ViewParent">
+</implements>
+<constructor name="ViewGroup"
+ type="android.view.ViewGroup"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="context" type="android.content.Context">
+</parameter>
+</constructor>
+<constructor name="ViewGroup"
+ type="android.view.ViewGroup"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="context" type="android.content.Context">
+</parameter>
+<parameter name="attrs" type="android.util.AttributeSet">
+</parameter>
+</constructor>
+<constructor name="ViewGroup"
+ type="android.view.ViewGroup"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="context" type="android.content.Context">
+</parameter>
+<parameter name="attrs" type="android.util.AttributeSet">
+</parameter>
+<parameter name="defStyle" type="int">
+</parameter>
+</constructor>
+<method name="addStatesFromChildren"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="addView"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="child" type="android.view.View">
+</parameter>
+</method>
+<method name="addView"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="child" type="android.view.View">
+</parameter>
+<parameter name="index" type="int">
+</parameter>
+</method>
+<method name="addView"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="child" type="android.view.View">
+</parameter>
+<parameter name="width" type="int">
+</parameter>
+<parameter name="height" type="int">
+</parameter>
+</method>
+<method name="addView"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="child" type="android.view.View">
+</parameter>
+<parameter name="params" type="android.view.ViewGroup.LayoutParams">
+</parameter>
+</method>
+<method name="addView"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="child" type="android.view.View">
+</parameter>
+<parameter name="index" type="int">
+</parameter>
+<parameter name="params" type="android.view.ViewGroup.LayoutParams">
+</parameter>
+</method>
+<method name="addViewInLayout"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="child" type="android.view.View">
+</parameter>
+<parameter name="index" type="int">
+</parameter>
+<parameter name="params" type="android.view.ViewGroup.LayoutParams">
+</parameter>
+</method>
+<method name="addViewInLayout"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="child" type="android.view.View">
+</parameter>
+<parameter name="index" type="int">
+</parameter>
+<parameter name="params" type="android.view.ViewGroup.LayoutParams">
+</parameter>
+<parameter name="preventRequestLayout" type="boolean">
+</parameter>
+</method>
+<method name="attachLayoutAnimationParameters"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="child" type="android.view.View">
+</parameter>
+<parameter name="params" type="android.view.ViewGroup.LayoutParams">
+</parameter>
+<parameter name="index" type="int">
+</parameter>
+<parameter name="count" type="int">
+</parameter>
+</method>
+<method name="attachViewToParent"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="child" type="android.view.View">
+</parameter>
+<parameter name="index" type="int">
+</parameter>
+<parameter name="params" type="android.view.ViewGroup.LayoutParams">
+</parameter>
+</method>
+<method name="bringChildToFront"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="child" type="android.view.View">
+</parameter>
+</method>
+<method name="canAnimate"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</method>
+<method name="checkLayoutParams"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="p" type="android.view.ViewGroup.LayoutParams">
+</parameter>
+</method>
+<method name="childDrawableStateChanged"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="child" type="android.view.View">
+</parameter>
+</method>
+<method name="cleanupLayoutState"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="child" type="android.view.View">
+</parameter>
+</method>
+<method name="clearChildFocus"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="child" type="android.view.View">
+</parameter>
+</method>
+<method name="clearDisappearingChildren"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="debug"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="depth" type="int">
+</parameter>
+</method>
+<method name="detachAllViewsFromParent"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</method>
+<method name="detachViewFromParent"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="child" type="android.view.View">
+</parameter>
+</method>
+<method name="detachViewFromParent"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="index" type="int">
+</parameter>
+</method>
+<method name="detachViewsFromParent"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="start" type="int">
+</parameter>
+<parameter name="count" type="int">
+</parameter>
+</method>
+<method name="dispatchFreezeSelfOnly"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="container" type="android.util.SparseArray&lt;android.os.Parcelable&gt;">
+</parameter>
+</method>
+<method name="dispatchSetSelected"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="selected" type="boolean">
+</parameter>
+</method>
+<method name="dispatchThawSelfOnly"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="container" type="android.util.SparseArray&lt;android.os.Parcelable&gt;">
+</parameter>
+</method>
+<method name="drawChild"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="canvas" type="android.graphics.Canvas">
+</parameter>
+<parameter name="child" type="android.view.View">
+</parameter>
+<parameter name="drawingTime" type="long">
+</parameter>
+</method>
+<method name="focusSearch"
+ return="android.view.View"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="focused" type="android.view.View">
+</parameter>
+<parameter name="direction" type="int">
+</parameter>
+</method>
+<method name="focusableViewAvailable"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="v" type="android.view.View">
+</parameter>
+</method>
+<method name="gatherTransparentRegion"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="region" type="android.graphics.Region">
+</parameter>
+</method>
+<method name="generateDefaultLayoutParams"
+ return="android.view.ViewGroup.LayoutParams"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</method>
+<method name="generateLayoutParams"
+ return="android.view.ViewGroup.LayoutParams"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="attrs" type="android.util.AttributeSet">
+</parameter>
+</method>
+<method name="generateLayoutParams"
+ return="android.view.ViewGroup.LayoutParams"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="p" type="android.view.ViewGroup.LayoutParams">
+</parameter>
+</method>
+<method name="getChildAt"
+ return="android.view.View"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="index" type="int">
+</parameter>
+</method>
+<method name="getChildCount"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getChildDrawingOrder"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="childCount" type="int">
+</parameter>
+<parameter name="i" type="int">
+</parameter>
+</method>
+<method name="getChildMeasureSpec"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="spec" type="int">
+</parameter>
+<parameter name="padding" type="int">
+</parameter>
+<parameter name="childDimension" type="int">
+</parameter>
+</method>
+<method name="getChildStaticTransformation"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="child" type="android.view.View">
+</parameter>
+<parameter name="t" type="android.view.animation.Transformation">
+</parameter>
+</method>
+<method name="getChildVisibleRect"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="child" type="android.view.View">
+</parameter>
+<parameter name="r" type="android.graphics.Rect">
+</parameter>
+<parameter name="offset" type="android.graphics.Point">
+</parameter>
+</method>
+<method name="getDescendantFocusability"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getFocusedChild"
+ return="android.view.View"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getLayoutAnimation"
+ return="android.view.animation.LayoutAnimationController"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getLayoutAnimationListener"
+ return="android.view.animation.Animation.AnimationListener"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getPersistentDrawingCache"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="indexOfChild"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="child" type="android.view.View">
+</parameter>
+</method>
+<method name="invalidateChild"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="child" type="android.view.View">
+</parameter>
+<parameter name="dirty" type="android.graphics.Rect">
+</parameter>
+</method>
+<method name="invalidateChildInParent"
+ return="android.view.ViewParent"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="location" type="int[]">
+</parameter>
+<parameter name="dirty" type="android.graphics.Rect">
+</parameter>
+</method>
+<method name="isAlwaysDrawnWithCacheEnabled"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isAnimationCacheEnabled"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isChildrenDrawingOrderEnabled"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</method>
+<method name="isChildrenDrawnWithCacheEnabled"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</method>
+<method name="measureChild"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="child" type="android.view.View">
+</parameter>
+<parameter name="parentWidthMeasureSpec" type="int">
+</parameter>
+<parameter name="parentHeightMeasureSpec" type="int">
+</parameter>
+</method>
+<method name="measureChildWithMargins"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="child" type="android.view.View">
+</parameter>
+<parameter name="parentWidthMeasureSpec" type="int">
+</parameter>
+<parameter name="widthUsed" type="int">
+</parameter>
+<parameter name="parentHeightMeasureSpec" type="int">
+</parameter>
+<parameter name="heightUsed" type="int">
+</parameter>
+</method>
+<method name="measureChildren"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="widthMeasureSpec" type="int">
+</parameter>
+<parameter name="heightMeasureSpec" type="int">
+</parameter>
+</method>
+<method name="offsetDescendantRectToMyCoords"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="descendant" type="android.view.View">
+</parameter>
+<parameter name="rect" type="android.graphics.Rect">
+</parameter>
+</method>
+<method name="offsetRectIntoDescendantCoords"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="descendant" type="android.view.View">
+</parameter>
+<parameter name="rect" type="android.graphics.Rect">
+</parameter>
+</method>
+<method name="onInterceptTouchEvent"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="ev" type="android.view.MotionEvent">
+</parameter>
+</method>
+<method name="onLayout"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="changed" type="boolean">
+</parameter>
+<parameter name="l" type="int">
+</parameter>
+<parameter name="t" type="int">
+</parameter>
+<parameter name="r" type="int">
+</parameter>
+<parameter name="b" type="int">
+</parameter>
+</method>
+<method name="onRequestFocusInDescendants"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="direction" type="int">
+</parameter>
+<parameter name="previouslyFocusedRect" type="android.graphics.Rect">
+</parameter>
+</method>
+<method name="recomputeViewAttributes"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="child" type="android.view.View">
+</parameter>
+</method>
+<method name="removeAllViews"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="removeAllViewsInLayout"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="removeDetachedView"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="child" type="android.view.View">
+</parameter>
+<parameter name="animate" type="boolean">
+</parameter>
+</method>
+<method name="removeView"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="view" type="android.view.View">
+</parameter>
+</method>
+<method name="removeViewAt"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="index" type="int">
+</parameter>
+</method>
+<method name="removeViewInLayout"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="view" type="android.view.View">
+</parameter>
+</method>
+<method name="removeViews"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="start" type="int">
+</parameter>
+<parameter name="count" type="int">
+</parameter>
+</method>
+<method name="removeViewsInLayout"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="start" type="int">
+</parameter>
+<parameter name="count" type="int">
+</parameter>
+</method>
+<method name="requestChildFocus"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="child" type="android.view.View">
+</parameter>
+<parameter name="focused" type="android.view.View">
+</parameter>
+</method>
+<method name="requestChildRectangleOnScreen"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="child" type="android.view.View">
+</parameter>
+<parameter name="rectangle" type="android.graphics.Rect">
+</parameter>
+<parameter name="immediate" type="boolean">
+</parameter>
+</method>
+<method name="requestDisallowInterceptTouchEvent"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="disallowIntercept" type="boolean">
+</parameter>
+</method>
+<method name="requestTransparentRegion"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="child" type="android.view.View">
+</parameter>
+</method>
+<method name="scheduleLayoutAnimation"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="setAddStatesFromChildren"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="addsStates" type="boolean">
+</parameter>
+</method>
+<method name="setAlwaysDrawnWithCacheEnabled"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="always" type="boolean">
+</parameter>
+</method>
+<method name="setAnimationCacheEnabled"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="enabled" type="boolean">
+</parameter>
+</method>
+<method name="setChildrenDrawingCacheEnabled"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="enabled" type="boolean">
+</parameter>
+</method>
+<method name="setChildrenDrawingOrderEnabled"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="enabled" type="boolean">
+</parameter>
+</method>
+<method name="setChildrenDrawnWithCacheEnabled"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="enabled" type="boolean">
+</parameter>
+</method>
+<method name="setClipChildren"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="clipChildren" type="boolean">
+</parameter>
+</method>
+<method name="setClipToPadding"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="clipToPadding" type="boolean">
+</parameter>
+</method>
+<method name="setDescendantFocusability"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="focusability" type="int">
+</parameter>
+</method>
+<method name="setLayoutAnimation"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="controller" type="android.view.animation.LayoutAnimationController">
+</parameter>
+</method>
+<method name="setLayoutAnimationListener"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="animationListener" type="android.view.animation.Animation.AnimationListener">
+</parameter>
+</method>
+<method name="setOnHierarchyChangeListener"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="listener" type="android.view.ViewGroup.OnHierarchyChangeListener">
+</parameter>
+</method>
+<method name="setPersistentDrawingCache"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="drawingCacheToKeep" type="int">
+</parameter>
+</method>
+<method name="setStaticTransformationsEnabled"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="enabled" type="boolean">
+</parameter>
+</method>
+<method name="showContextMenuForChild"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="originalView" type="android.view.View">
+</parameter>
+</method>
+<method name="startLayoutAnimation"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="updateViewLayout"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="view" type="android.view.View">
+</parameter>
+<parameter name="params" type="android.view.ViewGroup.LayoutParams">
+</parameter>
+</method>
+<field name="CLIP_TO_PADDING_MASK"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="34"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</field>
+<field name="FOCUS_AFTER_DESCENDANTS"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="262144"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="FOCUS_BEFORE_DESCENDANTS"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="131072"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="FOCUS_BLOCK_DESCENDANTS"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="393216"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="PERSISTENT_ALL_CACHES"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="3"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="PERSISTENT_ANIMATION_CACHE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="PERSISTENT_NO_CACHE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="0"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="PERSISTENT_SCROLLING_CACHE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<class name="ViewGroup.LayoutParams"
+ extends="java.lang.Object"
+ abstract="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="ViewGroup.LayoutParams"
+ type="android.view.ViewGroup.LayoutParams"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="c" type="android.content.Context">
+</parameter>
+<parameter name="attrs" type="android.util.AttributeSet">
+</parameter>
+</constructor>
+<constructor name="ViewGroup.LayoutParams"
+ type="android.view.ViewGroup.LayoutParams"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="width" type="int">
+</parameter>
+<parameter name="height" type="int">
+</parameter>
+</constructor>
+<constructor name="ViewGroup.LayoutParams"
+ type="android.view.ViewGroup.LayoutParams"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="source" type="android.view.ViewGroup.LayoutParams">
+</parameter>
+</constructor>
+<method name="setBaseAttributes"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="a" type="android.content.res.TypedArray">
+</parameter>
+<parameter name="widthAttr" type="int">
+</parameter>
+<parameter name="heightAttr" type="int">
+</parameter>
+</method>
+<field name="FILL_PARENT"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="-1"
+ static="true"
+ final="true"
+ deprecated="deprecated"
+ visibility="public"
+>
+</field>
+<field name="MATCH_PARENT"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="-1"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="WRAP_CONTENT"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="-2"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="height"
+ type="int"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="layoutAnimationParameters"
+ type="android.view.animation.LayoutAnimationController.AnimationParameters"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="width"
+ type="int"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<class name="ViewGroup.MarginLayoutParams"
+ extends="android.view.ViewGroup.LayoutParams"
+ abstract="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="ViewGroup.MarginLayoutParams"
+ type="android.view.ViewGroup.MarginLayoutParams"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="c" type="android.content.Context">
+</parameter>
+<parameter name="attrs" type="android.util.AttributeSet">
+</parameter>
+</constructor>
+<constructor name="ViewGroup.MarginLayoutParams"
+ type="android.view.ViewGroup.MarginLayoutParams"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="width" type="int">
+</parameter>
+<parameter name="height" type="int">
+</parameter>
+</constructor>
+<constructor name="ViewGroup.MarginLayoutParams"
+ type="android.view.ViewGroup.MarginLayoutParams"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="source" type="android.view.ViewGroup.MarginLayoutParams">
+</parameter>
+</constructor>
+<constructor name="ViewGroup.MarginLayoutParams"
+ type="android.view.ViewGroup.MarginLayoutParams"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="source" type="android.view.ViewGroup.LayoutParams">
+</parameter>
+</constructor>
+<method name="setMargins"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="left" type="int">
+</parameter>
+<parameter name="top" type="int">
+</parameter>
+<parameter name="right" type="int">
+</parameter>
+<parameter name="bottom" type="int">
+</parameter>
+</method>
+<field name="bottomMargin"
+ type="int"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="leftMargin"
+ type="int"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="rightMargin"
+ type="int"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="topMargin"
+ type="int"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<interface name="ViewGroup.OnHierarchyChangeListener"
+ abstract="true"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="onChildViewAdded"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="parent" type="android.view.View">
+</parameter>
+<parameter name="child" type="android.view.View">
+</parameter>
+</method>
+<method name="onChildViewRemoved"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="parent" type="android.view.View">
+</parameter>
+<parameter name="child" type="android.view.View">
+</parameter>
+</method>
+</interface>
+<interface name="ViewManager"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="addView"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="view" type="android.view.View">
+</parameter>
+<parameter name="params" type="android.view.ViewGroup.LayoutParams">
+</parameter>
+</method>
+<method name="removeView"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="view" type="android.view.View">
+</parameter>
+</method>
+<method name="updateViewLayout"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="view" type="android.view.View">
+</parameter>
+<parameter name="params" type="android.view.ViewGroup.LayoutParams">
+</parameter>
+</method>
+</interface>
+<interface name="ViewParent"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="bringChildToFront"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="child" type="android.view.View">
+</parameter>
+</method>
+<method name="childDrawableStateChanged"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="child" type="android.view.View">
+</parameter>
+</method>
+<method name="clearChildFocus"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="child" type="android.view.View">
+</parameter>
+</method>
+<method name="createContextMenu"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="menu" type="android.view.ContextMenu">
+</parameter>
+</method>
+<method name="focusSearch"
+ return="android.view.View"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="v" type="android.view.View">
+</parameter>
+<parameter name="direction" type="int">
+</parameter>
+</method>
+<method name="focusableViewAvailable"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="v" type="android.view.View">
+</parameter>
+</method>
+<method name="getChildVisibleRect"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="child" type="android.view.View">
+</parameter>
+<parameter name="r" type="android.graphics.Rect">
+</parameter>
+<parameter name="offset" type="android.graphics.Point">
+</parameter>
+</method>
+<method name="getParent"
+ return="android.view.ViewParent"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="invalidateChild"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="child" type="android.view.View">
+</parameter>
+<parameter name="r" type="android.graphics.Rect">
+</parameter>
+</method>
+<method name="invalidateChildInParent"
+ return="android.view.ViewParent"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="location" type="int[]">
+</parameter>
+<parameter name="r" type="android.graphics.Rect">
+</parameter>
+</method>
+<method name="isLayoutRequested"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="recomputeViewAttributes"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="child" type="android.view.View">
+</parameter>
+</method>
+<method name="requestChildFocus"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="child" type="android.view.View">
+</parameter>
+<parameter name="focused" type="android.view.View">
+</parameter>
+</method>
+<method name="requestChildRectangleOnScreen"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="child" type="android.view.View">
+</parameter>
+<parameter name="rectangle" type="android.graphics.Rect">
+</parameter>
+<parameter name="immediate" type="boolean">
+</parameter>
+</method>
+<method name="requestDisallowInterceptTouchEvent"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="disallowIntercept" type="boolean">
+</parameter>
+</method>
+<method name="requestLayout"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="requestTransparentRegion"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="child" type="android.view.View">
+</parameter>
+</method>
+<method name="showContextMenuForChild"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="originalView" type="android.view.View">
+</parameter>
+</method>
+</interface>
+<class name="ViewStub"
+ extends="android.view.View"
+ abstract="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="ViewStub"
+ type="android.view.ViewStub"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="context" type="android.content.Context">
+</parameter>
+</constructor>
+<constructor name="ViewStub"
+ type="android.view.ViewStub"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="context" type="android.content.Context">
+</parameter>
+<parameter name="layoutResource" type="int">
+</parameter>
+</constructor>
+<constructor name="ViewStub"
+ type="android.view.ViewStub"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="context" type="android.content.Context">
+</parameter>
+<parameter name="attrs" type="android.util.AttributeSet">
+</parameter>
+</constructor>
+<constructor name="ViewStub"
+ type="android.view.ViewStub"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="context" type="android.content.Context">
+</parameter>
+<parameter name="attrs" type="android.util.AttributeSet">
+</parameter>
+<parameter name="defStyle" type="int">
+</parameter>
+</constructor>
+<method name="getInflatedId"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getLayoutResource"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="inflate"
+ return="android.view.View"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="setInflatedId"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="inflatedId" type="int">
+</parameter>
+</method>
+<method name="setLayoutResource"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="layoutResource" type="int">
+</parameter>
+</method>
+<method name="setOnInflateListener"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="inflateListener" type="android.view.ViewStub.OnInflateListener">
+</parameter>
+</method>
+</class>
+<interface name="ViewStub.OnInflateListener"
+ abstract="true"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="onInflate"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="stub" type="android.view.ViewStub">
+</parameter>
+<parameter name="inflated" type="android.view.View">
+</parameter>
+</method>
+</interface>
+<class name="ViewTreeObserver"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="addOnGlobalFocusChangeListener"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="listener" type="android.view.ViewTreeObserver.OnGlobalFocusChangeListener">
+</parameter>
+</method>
+<method name="addOnGlobalLayoutListener"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="listener" type="android.view.ViewTreeObserver.OnGlobalLayoutListener">
+</parameter>
+</method>
+<method name="addOnPreDrawListener"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="listener" type="android.view.ViewTreeObserver.OnPreDrawListener">
+</parameter>
+</method>
+<method name="addOnScrollChangedListener"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="listener" type="android.view.ViewTreeObserver.OnScrollChangedListener">
+</parameter>
+</method>
+<method name="addOnTouchModeChangeListener"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="listener" type="android.view.ViewTreeObserver.OnTouchModeChangeListener">
+</parameter>
+</method>
+<method name="dispatchOnGlobalLayout"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="dispatchOnPreDraw"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isAlive"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="removeGlobalOnLayoutListener"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="victim" type="android.view.ViewTreeObserver.OnGlobalLayoutListener">
+</parameter>
+</method>
+<method name="removeOnGlobalFocusChangeListener"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="victim" type="android.view.ViewTreeObserver.OnGlobalFocusChangeListener">
+</parameter>
+</method>
+<method name="removeOnPreDrawListener"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="victim" type="android.view.ViewTreeObserver.OnPreDrawListener">
+</parameter>
+</method>
+<method name="removeOnScrollChangedListener"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="victim" type="android.view.ViewTreeObserver.OnScrollChangedListener">
+</parameter>
+</method>
+<method name="removeOnTouchModeChangeListener"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="victim" type="android.view.ViewTreeObserver.OnTouchModeChangeListener">
+</parameter>
+</method>
+</class>
+<interface name="ViewTreeObserver.OnGlobalFocusChangeListener"
+ abstract="true"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="onGlobalFocusChanged"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="oldFocus" type="android.view.View">
+</parameter>
+<parameter name="newFocus" type="android.view.View">
+</parameter>
+</method>
+</interface>
+<interface name="ViewTreeObserver.OnGlobalLayoutListener"
+ abstract="true"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="onGlobalLayout"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+</interface>
+<interface name="ViewTreeObserver.OnPreDrawListener"
+ abstract="true"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="onPreDraw"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+</interface>
+<interface name="ViewTreeObserver.OnScrollChangedListener"
+ abstract="true"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="onScrollChanged"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+</interface>
+<interface name="ViewTreeObserver.OnTouchModeChangeListener"
+ abstract="true"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="onTouchModeChanged"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="isInTouchMode" type="boolean">
+</parameter>
+</method>
+</interface>
+<class name="Window"
+ extends="java.lang.Object"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="Window"
+ type="android.view.Window"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="context" type="android.content.Context">
+</parameter>
+</constructor>
+<method name="addContentView"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="view" type="android.view.View">
+</parameter>
+<parameter name="params" type="android.view.ViewGroup.LayoutParams">
+</parameter>
+</method>
+<method name="addFlags"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="flags" type="int">
+</parameter>
+</method>
+<method name="clearFlags"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="flags" type="int">
+</parameter>
+</method>
+<method name="closeAllPanels"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="closePanel"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="featureId" type="int">
+</parameter>
+</method>
+<method name="findViewById"
+ return="android.view.View"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="id" type="int">
+</parameter>
+</method>
+<method name="getAttributes"
+ return="android.view.WindowManager.LayoutParams"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getCallback"
+ return="android.view.Window.Callback"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getContainer"
+ return="android.view.Window"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getContext"
+ return="android.content.Context"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getCurrentFocus"
+ return="android.view.View"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getDecorView"
+ return="android.view.View"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getFeatures"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</method>
+<method name="getForcedWindowFlags"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</method>
+<method name="getLayoutInflater"
+ return="android.view.LayoutInflater"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getLocalFeatures"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</method>
+<method name="getVolumeControlStream"
+ return="int"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getWindowManager"
+ return="android.view.WindowManager"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getWindowStyle"
+ return="android.content.res.TypedArray"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="hasChildren"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="hasSoftInputMode"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</method>
+<method name="isActive"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isFloating"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isShortcutKey"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="keyCode" type="int">
+</parameter>
+<parameter name="event" type="android.view.KeyEvent">
+</parameter>
+</method>
+<method name="makeActive"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="onActive"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</method>
+<method name="onConfigurationChanged"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="newConfig" type="android.content.res.Configuration">
+</parameter>
+</method>
+<method name="openPanel"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="featureId" type="int">
+</parameter>
+<parameter name="event" type="android.view.KeyEvent">
+</parameter>
+</method>
+<method name="peekDecorView"
+ return="android.view.View"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="performContextMenuIdentifierAction"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="id" type="int">
+</parameter>
+<parameter name="flags" type="int">
+</parameter>
+</method>
+<method name="performPanelIdentifierAction"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="featureId" type="int">
+</parameter>
+<parameter name="id" type="int">
+</parameter>
+<parameter name="flags" type="int">
+</parameter>
+</method>
+<method name="performPanelShortcut"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="featureId" type="int">
+</parameter>
+<parameter name="keyCode" type="int">
+</parameter>
+<parameter name="event" type="android.view.KeyEvent">
+</parameter>
+<parameter name="flags" type="int">
+</parameter>
+</method>
+<method name="requestFeature"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="featureId" type="int">
+</parameter>
+</method>
+<method name="restoreHierarchyState"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="savedInstanceState" type="android.os.Bundle">
+</parameter>
+</method>
+<method name="saveHierarchyState"
+ return="android.os.Bundle"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="setAttributes"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="a" type="android.view.WindowManager.LayoutParams">
+</parameter>
+</method>
+<method name="setBackgroundDrawable"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="drawable" type="android.graphics.drawable.Drawable">
+</parameter>
+</method>
+<method name="setBackgroundDrawableResource"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="resid" type="int">
+</parameter>
+</method>
+<method name="setCallback"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="callback" type="android.view.Window.Callback">
+</parameter>
+</method>
+<method name="setChildDrawable"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="featureId" type="int">
+</parameter>
+<parameter name="drawable" type="android.graphics.drawable.Drawable">
+</parameter>
+</method>
+<method name="setChildInt"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="featureId" type="int">
+</parameter>
+<parameter name="value" type="int">
+</parameter>
+</method>
+<method name="setContainer"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="container" type="android.view.Window">
+</parameter>
+</method>
+<method name="setContentView"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="layoutResID" type="int">
+</parameter>
+</method>
+<method name="setContentView"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="view" type="android.view.View">
+</parameter>
+</method>
+<method name="setContentView"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="view" type="android.view.View">
+</parameter>
+<parameter name="params" type="android.view.ViewGroup.LayoutParams">
+</parameter>
+</method>
+<method name="setDefaultWindowFormat"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="format" type="int">
+</parameter>
+</method>
+<method name="setFeatureDrawable"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="featureId" type="int">
+</parameter>
+<parameter name="drawable" type="android.graphics.drawable.Drawable">
+</parameter>
+</method>
+<method name="setFeatureDrawableAlpha"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="featureId" type="int">
+</parameter>
+<parameter name="alpha" type="int">
+</parameter>
+</method>
+<method name="setFeatureDrawableResource"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="featureId" type="int">
+</parameter>
+<parameter name="resId" type="int">
+</parameter>
+</method>
+<method name="setFeatureDrawableUri"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="featureId" type="int">
+</parameter>
+<parameter name="uri" type="android.net.Uri">
+</parameter>
+</method>
+<method name="setFeatureInt"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="featureId" type="int">
+</parameter>
+<parameter name="value" type="int">
+</parameter>
+</method>
+<method name="setFlags"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="flags" type="int">
+</parameter>
+<parameter name="mask" type="int">
+</parameter>
+</method>
+<method name="setFormat"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="format" type="int">
+</parameter>
+</method>
+<method name="setGravity"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="gravity" type="int">
+</parameter>
+</method>
+<method name="setLayout"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="width" type="int">
+</parameter>
+<parameter name="height" type="int">
+</parameter>
+</method>
+<method name="setSoftInputMode"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="mode" type="int">
+</parameter>
+</method>
+<method name="setTitle"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="title" type="java.lang.CharSequence">
+</parameter>
+</method>
+<method name="setTitleColor"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="textColor" type="int">
+</parameter>
+</method>
+<method name="setType"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="type" type="int">
+</parameter>
+</method>
+<method name="setVolumeControlStream"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="streamType" type="int">
+</parameter>
+</method>
+<method name="setWindowAnimations"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="resId" type="int">
+</parameter>
+</method>
+<method name="setWindowManager"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="wm" type="android.view.WindowManager">
+</parameter>
+<parameter name="appToken" type="android.os.IBinder">
+</parameter>
+<parameter name="appName" type="java.lang.String">
+</parameter>
+</method>
+<method name="superDispatchKeyEvent"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="event" type="android.view.KeyEvent">
+</parameter>
+</method>
+<method name="superDispatchTouchEvent"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="event" type="android.view.MotionEvent">
+</parameter>
+</method>
+<method name="superDispatchTrackballEvent"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="event" type="android.view.MotionEvent">
+</parameter>
+</method>
+<method name="takeKeyEvents"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="get" type="boolean">
+</parameter>
+</method>
+<method name="togglePanel"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="featureId" type="int">
+</parameter>
+<parameter name="event" type="android.view.KeyEvent">
+</parameter>
+</method>
+<field name="DEFAULT_FEATURES"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="65"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</field>
+<field name="FEATURE_CONTEXT_MENU"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="6"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="FEATURE_CUSTOM_TITLE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="7"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="FEATURE_INDETERMINATE_PROGRESS"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="5"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="FEATURE_LEFT_ICON"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="3"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="FEATURE_NO_TITLE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="FEATURE_OPTIONS_PANEL"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="0"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="FEATURE_PROGRESS"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="FEATURE_RIGHT_ICON"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="4"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ID_ANDROID_CONTENT"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16908290"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="PROGRESS_END"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="10000"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="PROGRESS_INDETERMINATE_OFF"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="-4"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="PROGRESS_INDETERMINATE_ON"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="-3"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="PROGRESS_SECONDARY_END"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="30000"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="PROGRESS_SECONDARY_START"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="20000"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="PROGRESS_START"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="0"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="PROGRESS_VISIBILITY_OFF"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="-2"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="PROGRESS_VISIBILITY_ON"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="-1"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<interface name="Window.Callback"
+ abstract="true"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="dispatchKeyEvent"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="event" type="android.view.KeyEvent">
+</parameter>
+</method>
+<method name="dispatchPopulateAccessibilityEvent"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="event" type="android.view.accessibility.AccessibilityEvent">
+</parameter>
+</method>
+<method name="dispatchTouchEvent"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="event" type="android.view.MotionEvent">
+</parameter>
+</method>
+<method name="dispatchTrackballEvent"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="event" type="android.view.MotionEvent">
+</parameter>
+</method>
+<method name="onAttachedToWindow"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="onContentChanged"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="onCreatePanelMenu"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="featureId" type="int">
+</parameter>
+<parameter name="menu" type="android.view.Menu">
+</parameter>
+</method>
+<method name="onCreatePanelView"
+ return="android.view.View"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="featureId" type="int">
+</parameter>
+</method>
+<method name="onDetachedFromWindow"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="onMenuItemSelected"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="featureId" type="int">
+</parameter>
+<parameter name="item" type="android.view.MenuItem">
+</parameter>
+</method>
+<method name="onMenuOpened"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="featureId" type="int">
+</parameter>
+<parameter name="menu" type="android.view.Menu">
+</parameter>
+</method>
+<method name="onPanelClosed"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="featureId" type="int">
+</parameter>
+<parameter name="menu" type="android.view.Menu">
+</parameter>
+</method>
+<method name="onPreparePanel"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="featureId" type="int">
+</parameter>
+<parameter name="view" type="android.view.View">
+</parameter>
+<parameter name="menu" type="android.view.Menu">
+</parameter>
+</method>
+<method name="onSearchRequested"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="onWindowAttributesChanged"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="attrs" type="android.view.WindowManager.LayoutParams">
+</parameter>
+</method>
+<method name="onWindowFocusChanged"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="hasFocus" type="boolean">
+</parameter>
+</method>
+</interface>
+<interface name="WindowManager"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="android.view.ViewManager">
+</implements>
+<method name="getDefaultDisplay"
+ return="android.view.Display"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="removeViewImmediate"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="view" type="android.view.View">
+</parameter>
+</method>
+</interface>
+<class name="WindowManager.BadTokenException"
+ extends="java.lang.RuntimeException"
+ abstract="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="WindowManager.BadTokenException"
+ type="android.view.WindowManager.BadTokenException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<constructor name="WindowManager.BadTokenException"
+ type="android.view.WindowManager.BadTokenException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+</constructor>
+</class>
+<class name="WindowManager.LayoutParams"
+ extends="android.view.ViewGroup.LayoutParams"
+ abstract="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="android.os.Parcelable">
+</implements>
+<constructor name="WindowManager.LayoutParams"
+ type="android.view.WindowManager.LayoutParams"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<constructor name="WindowManager.LayoutParams"
+ type="android.view.WindowManager.LayoutParams"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="_type" type="int">
+</parameter>
+</constructor>
+<constructor name="WindowManager.LayoutParams"
+ type="android.view.WindowManager.LayoutParams"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="_type" type="int">
+</parameter>
+<parameter name="_flags" type="int">
+</parameter>
+</constructor>
+<constructor name="WindowManager.LayoutParams"
+ type="android.view.WindowManager.LayoutParams"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="_type" type="int">
+</parameter>
+<parameter name="_flags" type="int">
+</parameter>
+<parameter name="_format" type="int">
+</parameter>
+</constructor>
+<constructor name="WindowManager.LayoutParams"
+ type="android.view.WindowManager.LayoutParams"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="w" type="int">
+</parameter>
+<parameter name="h" type="int">
+</parameter>
+<parameter name="_type" type="int">
+</parameter>
+<parameter name="_flags" type="int">
+</parameter>
+<parameter name="_format" type="int">
+</parameter>
+</constructor>
+<constructor name="WindowManager.LayoutParams"
+ type="android.view.WindowManager.LayoutParams"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="w" type="int">
+</parameter>
+<parameter name="h" type="int">
+</parameter>
+<parameter name="xpos" type="int">
+</parameter>
+<parameter name="ypos" type="int">
+</parameter>
+<parameter name="_type" type="int">
+</parameter>
+<parameter name="_flags" type="int">
+</parameter>
+<parameter name="_format" type="int">
+</parameter>
+</constructor>
+<constructor name="WindowManager.LayoutParams"
+ type="android.view.WindowManager.LayoutParams"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="in" type="android.os.Parcel">
+</parameter>
+</constructor>
+<method name="copyFrom"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="o" type="android.view.WindowManager.LayoutParams">
+</parameter>
+</method>
+<method name="debug"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="output" type="java.lang.String">
+</parameter>
+</method>
+<method name="describeContents"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getTitle"
+ return="java.lang.CharSequence"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="mayUseInputMethod"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="flags" type="int">
+</parameter>
+</method>
+<method name="setTitle"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="title" type="java.lang.CharSequence">
+</parameter>
+</method>
+<method name="writeToParcel"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="out" type="android.os.Parcel">
+</parameter>
+<parameter name="parcelableFlags" type="int">
+</parameter>
+</method>
+<field name="ALPHA_CHANGED"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="128"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ANIMATION_CHANGED"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="BRIGHTNESS_OVERRIDE_FULL"
+ type="float"
+ transient="false"
+ volatile="false"
+ value="1.0f"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="BRIGHTNESS_OVERRIDE_NONE"
+ type="float"
+ transient="false"
+ volatile="false"
+ value="-1.0f"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="BRIGHTNESS_OVERRIDE_OFF"
+ type="float"
+ transient="false"
+ volatile="false"
+ value="0.0f"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="CREATOR"
+ type="android.os.Parcelable.Creator"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="DIM_AMOUNT_CHANGED"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="32"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="FIRST_APPLICATION_WINDOW"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="FIRST_SUB_WINDOW"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1000"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="FIRST_SYSTEM_WINDOW"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2000"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="FLAGS_CHANGED"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="4"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="FLAG_ALLOW_LOCK_WHILE_SCREEN_ON"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="FLAG_ALT_FOCUSABLE_IM"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="131072"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="FLAG_BLUR_BEHIND"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="4"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="FLAG_DIM_BEHIND"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="FLAG_DISMISS_KEYGUARD"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="4194304"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="FLAG_DITHER"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="4096"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="FLAG_FORCE_NOT_FULLSCREEN"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2048"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="FLAG_FULLSCREEN"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1024"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="FLAG_IGNORE_CHEEK_PRESSES"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="32768"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="FLAG_KEEP_SCREEN_ON"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="128"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="FLAG_LAYOUT_INSET_DECOR"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="65536"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="FLAG_LAYOUT_IN_SCREEN"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="256"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="FLAG_LAYOUT_NO_LIMITS"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="512"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="FLAG_NOT_FOCUSABLE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="8"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="FLAG_NOT_TOUCHABLE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="FLAG_NOT_TOUCH_MODAL"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="32"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="FLAG_SCALED"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16384"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="FLAG_SECURE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="8192"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="FLAG_SHOW_WALLPAPER"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1048576"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="FLAG_SHOW_WHEN_LOCKED"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="524288"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="FLAG_TOUCHABLE_WHEN_WAKING"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="64"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="FLAG_TURN_SCREEN_ON"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2097152"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="FLAG_WATCH_OUTSIDE_TOUCH"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="262144"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="FORMAT_CHANGED"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="8"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="LAST_APPLICATION_WINDOW"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="99"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="LAST_SUB_WINDOW"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1999"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="LAST_SYSTEM_WINDOW"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2999"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="LAYOUT_CHANGED"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="MEMORY_TYPE_CHANGED"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="256"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="MEMORY_TYPE_GPU"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2"
+ static="true"
+ final="true"
+ deprecated="deprecated"
+ visibility="public"
+>
+</field>
+<field name="MEMORY_TYPE_HARDWARE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1"
+ static="true"
+ final="true"
+ deprecated="deprecated"
+ visibility="public"
+>
+</field>
+<field name="MEMORY_TYPE_NORMAL"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="0"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="MEMORY_TYPE_PUSH_BUFFERS"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="3"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="SCREEN_BRIGHTNESS_CHANGED"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2048"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="SCREEN_ORIENTATION_CHANGED"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1024"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="SOFT_INPUT_ADJUST_PAN"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="32"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="SOFT_INPUT_ADJUST_RESIZE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="SOFT_INPUT_ADJUST_UNSPECIFIED"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="0"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="SOFT_INPUT_IS_FORWARD_NAVIGATION"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="256"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="SOFT_INPUT_MASK_ADJUST"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="240"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="SOFT_INPUT_MASK_STATE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="15"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="SOFT_INPUT_MODE_CHANGED"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="512"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="SOFT_INPUT_STATE_ALWAYS_HIDDEN"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="3"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="SOFT_INPUT_STATE_ALWAYS_VISIBLE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="5"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="SOFT_INPUT_STATE_HIDDEN"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="SOFT_INPUT_STATE_UNCHANGED"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="SOFT_INPUT_STATE_UNSPECIFIED"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="0"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="SOFT_INPUT_STATE_VISIBLE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="4"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TITLE_CHANGED"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="64"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TYPE_APPLICATION"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TYPE_APPLICATION_ATTACHED_DIALOG"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1003"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TYPE_APPLICATION_MEDIA"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1001"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TYPE_APPLICATION_PANEL"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1000"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TYPE_APPLICATION_STARTING"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="3"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TYPE_APPLICATION_SUB_PANEL"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1002"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TYPE_BASE_APPLICATION"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TYPE_CHANGED"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TYPE_INPUT_METHOD"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2011"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TYPE_INPUT_METHOD_DIALOG"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2012"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TYPE_KEYGUARD"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2004"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TYPE_KEYGUARD_DIALOG"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2009"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TYPE_PHONE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2002"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TYPE_PRIORITY_PHONE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2007"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TYPE_SEARCH_BAR"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2001"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TYPE_STATUS_BAR"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2000"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TYPE_STATUS_BAR_PANEL"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2014"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TYPE_SYSTEM_ALERT"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2003"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TYPE_SYSTEM_DIALOG"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2008"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TYPE_SYSTEM_ERROR"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2010"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TYPE_SYSTEM_OVERLAY"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2006"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TYPE_TOAST"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2005"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TYPE_WALLPAPER"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2013"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="alpha"
+ type="float"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="buttonBrightness"
+ type="float"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="dimAmount"
+ type="float"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="flags"
+ type="int"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="format"
+ type="int"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="gravity"
+ type="int"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="horizontalMargin"
+ type="float"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="horizontalWeight"
+ type="float"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="memoryType"
+ type="int"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="packageName"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="screenBrightness"
+ type="float"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="screenOrientation"
+ type="int"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="softInputMode"
+ type="int"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="token"
+ type="android.os.IBinder"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="type"
+ type="int"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="verticalMargin"
+ type="float"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="verticalWeight"
+ type="float"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="windowAnimations"
+ type="int"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="x"
+ type="int"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="y"
+ type="int"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+</package>
+<package name="android.view.accessibility"
+>
+<class name="AccessibilityEvent"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="android.os.Parcelable">
+</implements>
+<method name="describeContents"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getAddedCount"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getBeforeText"
+ return="java.lang.CharSequence"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getClassName"
+ return="java.lang.CharSequence"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getContentDescription"
+ return="java.lang.CharSequence"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getCurrentItemIndex"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getEventTime"
+ return="long"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getEventType"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getFromIndex"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getItemCount"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getPackageName"
+ return="java.lang.CharSequence"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getParcelableData"
+ return="android.os.Parcelable"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getRemovedCount"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getText"
+ return="java.util.List&lt;java.lang.CharSequence&gt;"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="initFromParcel"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="parcel" type="android.os.Parcel">
+</parameter>
+</method>
+<method name="isChecked"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isEnabled"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isFullScreen"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isPassword"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="obtain"
+ return="android.view.accessibility.AccessibilityEvent"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="eventType" type="int">
+</parameter>
+</method>
+<method name="obtain"
+ return="android.view.accessibility.AccessibilityEvent"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="recycle"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="setAddedCount"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="addedCount" type="int">
+</parameter>
+</method>
+<method name="setBeforeText"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="beforeText" type="java.lang.CharSequence">
+</parameter>
+</method>
+<method name="setChecked"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="isChecked" type="boolean">
+</parameter>
+</method>
+<method name="setClassName"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="className" type="java.lang.CharSequence">
+</parameter>
+</method>
+<method name="setContentDescription"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="contentDescription" type="java.lang.CharSequence">
+</parameter>
+</method>
+<method name="setCurrentItemIndex"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="currentItemIndex" type="int">
+</parameter>
+</method>
+<method name="setEnabled"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="isEnabled" type="boolean">
+</parameter>
+</method>
+<method name="setEventTime"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="eventTime" type="long">
+</parameter>
+</method>
+<method name="setEventType"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="eventType" type="int">
+</parameter>
+</method>
+<method name="setFromIndex"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="fromIndex" type="int">
+</parameter>
+</method>
+<method name="setFullScreen"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="isFullScreen" type="boolean">
+</parameter>
+</method>
+<method name="setItemCount"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="itemCount" type="int">
+</parameter>
+</method>
+<method name="setPackageName"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="packageName" type="java.lang.CharSequence">
+</parameter>
+</method>
+<method name="setParcelableData"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="parcelableData" type="android.os.Parcelable">
+</parameter>
+</method>
+<method name="setPassword"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="isPassword" type="boolean">
+</parameter>
+</method>
+<method name="setRemovedCount"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="removedCount" type="int">
+</parameter>
+</method>
+<method name="writeToParcel"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="parcel" type="android.os.Parcel">
+</parameter>
+<parameter name="flags" type="int">
+</parameter>
+</method>
+<field name="CREATOR"
+ type="android.os.Parcelable.Creator"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="INVALID_POSITION"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="-1"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="MAX_TEXT_LENGTH"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="500"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TYPES_ALL_MASK"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="-1"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TYPE_NOTIFICATION_STATE_CHANGED"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="64"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TYPE_VIEW_CLICKED"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TYPE_VIEW_FOCUSED"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="8"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TYPE_VIEW_LONG_CLICKED"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TYPE_VIEW_SELECTED"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="4"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TYPE_VIEW_TEXT_CHANGED"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TYPE_WINDOW_STATE_CHANGED"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="32"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<interface name="AccessibilityEventSource"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="sendAccessibilityEvent"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="eventType" type="int">
+</parameter>
+</method>
+<method name="sendAccessibilityEventUnchecked"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="event" type="android.view.accessibility.AccessibilityEvent">
+</parameter>
+</method>
+</interface>
+<class name="AccessibilityManager"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="getAccessibilityServiceList"
+ return="java.util.List&lt;android.content.pm.ServiceInfo&gt;"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="interrupt"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isEnabled"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="sendAccessibilityEvent"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="event" type="android.view.accessibility.AccessibilityEvent">
+</parameter>
+</method>
+</class>
+</package>
+<package name="android.view.animation"
+>
+<class name="AccelerateDecelerateInterpolator"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="android.view.animation.Interpolator">
+</implements>
+<constructor name="AccelerateDecelerateInterpolator"
+ type="android.view.animation.AccelerateDecelerateInterpolator"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<constructor name="AccelerateDecelerateInterpolator"
+ type="android.view.animation.AccelerateDecelerateInterpolator"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="context" type="android.content.Context">
+</parameter>
+<parameter name="attrs" type="android.util.AttributeSet">
+</parameter>
+</constructor>
+<method name="getInterpolation"
+ return="float"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="input" type="float">
+</parameter>
+</method>
+</class>
+<class name="AccelerateInterpolator"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="android.view.animation.Interpolator">
+</implements>
+<constructor name="AccelerateInterpolator"
+ type="android.view.animation.AccelerateInterpolator"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<constructor name="AccelerateInterpolator"
+ type="android.view.animation.AccelerateInterpolator"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="factor" type="float">
+</parameter>
+</constructor>
+<constructor name="AccelerateInterpolator"
+ type="android.view.animation.AccelerateInterpolator"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="context" type="android.content.Context">
+</parameter>
+<parameter name="attrs" type="android.util.AttributeSet">
+</parameter>
+</constructor>
+<method name="getInterpolation"
+ return="float"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="input" type="float">
+</parameter>
+</method>
+</class>
+<class name="AlphaAnimation"
+ extends="android.view.animation.Animation"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="AlphaAnimation"
+ type="android.view.animation.AlphaAnimation"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="context" type="android.content.Context">
+</parameter>
+<parameter name="attrs" type="android.util.AttributeSet">
+</parameter>
+</constructor>
+<constructor name="AlphaAnimation"
+ type="android.view.animation.AlphaAnimation"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="fromAlpha" type="float">
+</parameter>
+<parameter name="toAlpha" type="float">
+</parameter>
+</constructor>
+</class>
+<class name="Animation"
+ extends="java.lang.Object"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="java.lang.Cloneable">
+</implements>
+<constructor name="Animation"
+ type="android.view.animation.Animation"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<constructor name="Animation"
+ type="android.view.animation.Animation"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="context" type="android.content.Context">
+</parameter>
+<parameter name="attrs" type="android.util.AttributeSet">
+</parameter>
+</constructor>
+<method name="applyTransformation"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="interpolatedTime" type="float">
+</parameter>
+<parameter name="t" type="android.view.animation.Transformation">
+</parameter>
+</method>
+<method name="cancel"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="computeDurationHint"
+ return="long"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="ensureInterpolator"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</method>
+<method name="getDetachWallpaper"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getDuration"
+ return="long"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getFillAfter"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getFillBefore"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getInterpolator"
+ return="android.view.animation.Interpolator"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getRepeatCount"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getRepeatMode"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getStartOffset"
+ return="long"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getStartTime"
+ return="long"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getTransformation"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="currentTime" type="long">
+</parameter>
+<parameter name="outTransformation" type="android.view.animation.Transformation">
+</parameter>
+</method>
+<method name="getZAdjustment"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="hasEnded"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="hasStarted"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="initialize"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="width" type="int">
+</parameter>
+<parameter name="height" type="int">
+</parameter>
+<parameter name="parentWidth" type="int">
+</parameter>
+<parameter name="parentHeight" type="int">
+</parameter>
+</method>
+<method name="isFillEnabled"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isInitialized"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="reset"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="resolveSize"
+ return="float"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="type" type="int">
+</parameter>
+<parameter name="value" type="float">
+</parameter>
+<parameter name="size" type="int">
+</parameter>
+<parameter name="parentSize" type="int">
+</parameter>
+</method>
+<method name="restrictDuration"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="durationMillis" type="long">
+</parameter>
+</method>
+<method name="scaleCurrentDuration"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="scale" type="float">
+</parameter>
+</method>
+<method name="setAnimationListener"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="listener" type="android.view.animation.Animation.AnimationListener">
+</parameter>
+</method>
+<method name="setDetachWallpaper"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="detachWallpaper" type="boolean">
+</parameter>
+</method>
+<method name="setDuration"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="durationMillis" type="long">
+</parameter>
+</method>
+<method name="setFillAfter"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="fillAfter" type="boolean">
+</parameter>
+</method>
+<method name="setFillBefore"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="fillBefore" type="boolean">
+</parameter>
+</method>
+<method name="setFillEnabled"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="fillEnabled" type="boolean">
+</parameter>
+</method>
+<method name="setInterpolator"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="context" type="android.content.Context">
+</parameter>
+<parameter name="resID" type="int">
+</parameter>
+</method>
+<method name="setInterpolator"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="i" type="android.view.animation.Interpolator">
+</parameter>
+</method>
+<method name="setRepeatCount"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="repeatCount" type="int">
+</parameter>
+</method>
+<method name="setRepeatMode"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="repeatMode" type="int">
+</parameter>
+</method>
+<method name="setStartOffset"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="startOffset" type="long">
+</parameter>
+</method>
+<method name="setStartTime"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="startTimeMillis" type="long">
+</parameter>
+</method>
+<method name="setZAdjustment"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="zAdjustment" type="int">
+</parameter>
+</method>
+<method name="start"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="startNow"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="willChangeBounds"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="willChangeTransformationMatrix"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<field name="ABSOLUTE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="0"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="INFINITE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="-1"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="RELATIVE_TO_PARENT"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="RELATIVE_TO_SELF"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="RESTART"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="REVERSE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="START_ON_FIRST_FRAME"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="-1"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ZORDER_BOTTOM"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="-1"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ZORDER_NORMAL"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="0"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ZORDER_TOP"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<interface name="Animation.AnimationListener"
+ abstract="true"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="onAnimationEnd"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="animation" type="android.view.animation.Animation">
+</parameter>
+</method>
+<method name="onAnimationRepeat"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="animation" type="android.view.animation.Animation">
+</parameter>
+</method>
+<method name="onAnimationStart"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="animation" type="android.view.animation.Animation">
+</parameter>
+</method>
+</interface>
+<class name="Animation.Description"
+ extends="java.lang.Object"
+ abstract="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<constructor name="Animation.Description"
+ type="android.view.animation.Animation.Description"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</constructor>
+<field name="type"
+ type="int"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="value"
+ type="float"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<class name="AnimationSet"
+ extends="android.view.animation.Animation"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="AnimationSet"
+ type="android.view.animation.AnimationSet"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="context" type="android.content.Context">
+</parameter>
+<parameter name="attrs" type="android.util.AttributeSet">
+</parameter>
+</constructor>
+<constructor name="AnimationSet"
+ type="android.view.animation.AnimationSet"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="shareInterpolator" type="boolean">
+</parameter>
+</constructor>
+<method name="addAnimation"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="a" type="android.view.animation.Animation">
+</parameter>
+</method>
+<method name="getAnimations"
+ return="java.util.List&lt;android.view.animation.Animation&gt;"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+</class>
+<class name="AnimationUtils"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="AnimationUtils"
+ type="android.view.animation.AnimationUtils"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<method name="currentAnimationTimeMillis"
+ return="long"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="loadAnimation"
+ return="android.view.animation.Animation"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="context" type="android.content.Context">
+</parameter>
+<parameter name="id" type="int">
+</parameter>
+<exception name="Resources.NotFoundException" type="android.content.res.Resources.NotFoundException">
+</exception>
+</method>
+<method name="loadInterpolator"
+ return="android.view.animation.Interpolator"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="context" type="android.content.Context">
+</parameter>
+<parameter name="id" type="int">
+</parameter>
+<exception name="Resources.NotFoundException" type="android.content.res.Resources.NotFoundException">
+</exception>
+</method>
+<method name="loadLayoutAnimation"
+ return="android.view.animation.LayoutAnimationController"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="context" type="android.content.Context">
+</parameter>
+<parameter name="id" type="int">
+</parameter>
+<exception name="Resources.NotFoundException" type="android.content.res.Resources.NotFoundException">
+</exception>
+</method>
+<method name="makeInAnimation"
+ return="android.view.animation.Animation"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="c" type="android.content.Context">
+</parameter>
+<parameter name="fromLeft" type="boolean">
+</parameter>
+</method>
+<method name="makeInChildBottomAnimation"
+ return="android.view.animation.Animation"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="c" type="android.content.Context">
+</parameter>
+</method>
+<method name="makeOutAnimation"
+ return="android.view.animation.Animation"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="c" type="android.content.Context">
+</parameter>
+<parameter name="toRight" type="boolean">
+</parameter>
+</method>
+</class>
+<class name="AnticipateInterpolator"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="android.view.animation.Interpolator">
+</implements>
+<constructor name="AnticipateInterpolator"
+ type="android.view.animation.AnticipateInterpolator"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<constructor name="AnticipateInterpolator"
+ type="android.view.animation.AnticipateInterpolator"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="tension" type="float">
+</parameter>
+</constructor>
+<constructor name="AnticipateInterpolator"
+ type="android.view.animation.AnticipateInterpolator"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="context" type="android.content.Context">
+</parameter>
+<parameter name="attrs" type="android.util.AttributeSet">
+</parameter>
+</constructor>
+<method name="getInterpolation"
+ return="float"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="t" type="float">
+</parameter>
+</method>
+</class>
+<class name="AnticipateOvershootInterpolator"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="android.view.animation.Interpolator">
+</implements>
+<constructor name="AnticipateOvershootInterpolator"
+ type="android.view.animation.AnticipateOvershootInterpolator"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<constructor name="AnticipateOvershootInterpolator"
+ type="android.view.animation.AnticipateOvershootInterpolator"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="tension" type="float">
+</parameter>
+</constructor>
+<constructor name="AnticipateOvershootInterpolator"
+ type="android.view.animation.AnticipateOvershootInterpolator"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="tension" type="float">
+</parameter>
+<parameter name="extraTension" type="float">
+</parameter>
+</constructor>
+<constructor name="AnticipateOvershootInterpolator"
+ type="android.view.animation.AnticipateOvershootInterpolator"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="context" type="android.content.Context">
+</parameter>
+<parameter name="attrs" type="android.util.AttributeSet">
+</parameter>
+</constructor>
+<method name="getInterpolation"
+ return="float"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="t" type="float">
+</parameter>
+</method>
+</class>
+<class name="BounceInterpolator"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="android.view.animation.Interpolator">
+</implements>
+<constructor name="BounceInterpolator"
+ type="android.view.animation.BounceInterpolator"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<constructor name="BounceInterpolator"
+ type="android.view.animation.BounceInterpolator"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="context" type="android.content.Context">
+</parameter>
+<parameter name="attrs" type="android.util.AttributeSet">
+</parameter>
+</constructor>
+<method name="getInterpolation"
+ return="float"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="t" type="float">
+</parameter>
+</method>
+</class>
+<class name="CycleInterpolator"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="android.view.animation.Interpolator">
+</implements>
+<constructor name="CycleInterpolator"
+ type="android.view.animation.CycleInterpolator"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="cycles" type="float">
+</parameter>
+</constructor>
+<constructor name="CycleInterpolator"
+ type="android.view.animation.CycleInterpolator"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="context" type="android.content.Context">
+</parameter>
+<parameter name="attrs" type="android.util.AttributeSet">
+</parameter>
+</constructor>
+<method name="getInterpolation"
+ return="float"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="input" type="float">
+</parameter>
+</method>
+</class>
+<class name="DecelerateInterpolator"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="android.view.animation.Interpolator">
+</implements>
+<constructor name="DecelerateInterpolator"
+ type="android.view.animation.DecelerateInterpolator"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<constructor name="DecelerateInterpolator"
+ type="android.view.animation.DecelerateInterpolator"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="factor" type="float">
+</parameter>
+</constructor>
+<constructor name="DecelerateInterpolator"
+ type="android.view.animation.DecelerateInterpolator"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="context" type="android.content.Context">
+</parameter>
+<parameter name="attrs" type="android.util.AttributeSet">
+</parameter>
+</constructor>
+<method name="getInterpolation"
+ return="float"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="input" type="float">
+</parameter>
+</method>
+</class>
+<class name="GridLayoutAnimationController"
+ extends="android.view.animation.LayoutAnimationController"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="GridLayoutAnimationController"
+ type="android.view.animation.GridLayoutAnimationController"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="context" type="android.content.Context">
+</parameter>
+<parameter name="attrs" type="android.util.AttributeSet">
+</parameter>
+</constructor>
+<constructor name="GridLayoutAnimationController"
+ type="android.view.animation.GridLayoutAnimationController"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="animation" type="android.view.animation.Animation">
+</parameter>
+</constructor>
+<constructor name="GridLayoutAnimationController"
+ type="android.view.animation.GridLayoutAnimationController"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="animation" type="android.view.animation.Animation">
+</parameter>
+<parameter name="columnDelay" type="float">
+</parameter>
+<parameter name="rowDelay" type="float">
+</parameter>
+</constructor>
+<method name="getColumnDelay"
+ return="float"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getDirection"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getDirectionPriority"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getRowDelay"
+ return="float"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="setColumnDelay"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="columnDelay" type="float">
+</parameter>
+</method>
+<method name="setDirection"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="direction" type="int">
+</parameter>
+</method>
+<method name="setDirectionPriority"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="directionPriority" type="int">
+</parameter>
+</method>
+<method name="setRowDelay"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="rowDelay" type="float">
+</parameter>
+</method>
+<field name="DIRECTION_BOTTOM_TO_TOP"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="DIRECTION_HORIZONTAL_MASK"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="DIRECTION_LEFT_TO_RIGHT"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="0"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="DIRECTION_RIGHT_TO_LEFT"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="DIRECTION_TOP_TO_BOTTOM"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="0"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="DIRECTION_VERTICAL_MASK"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="PRIORITY_COLUMN"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="PRIORITY_NONE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="0"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="PRIORITY_ROW"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<class name="GridLayoutAnimationController.AnimationParameters"
+ extends="android.view.animation.LayoutAnimationController.AnimationParameters"
+ abstract="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="GridLayoutAnimationController.AnimationParameters"
+ type="android.view.animation.GridLayoutAnimationController.AnimationParameters"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<field name="column"
+ type="int"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="columnsCount"
+ type="int"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="row"
+ type="int"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="rowsCount"
+ type="int"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<interface name="Interpolator"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="getInterpolation"
+ return="float"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="input" type="float">
+</parameter>
+</method>
+</interface>
+<class name="LayoutAnimationController"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="LayoutAnimationController"
+ type="android.view.animation.LayoutAnimationController"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="context" type="android.content.Context">
+</parameter>
+<parameter name="attrs" type="android.util.AttributeSet">
+</parameter>
+</constructor>
+<constructor name="LayoutAnimationController"
+ type="android.view.animation.LayoutAnimationController"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="animation" type="android.view.animation.Animation">
+</parameter>
+</constructor>
+<constructor name="LayoutAnimationController"
+ type="android.view.animation.LayoutAnimationController"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="animation" type="android.view.animation.Animation">
+</parameter>
+<parameter name="delay" type="float">
+</parameter>
+</constructor>
+<method name="getAnimation"
+ return="android.view.animation.Animation"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getAnimationForView"
+ return="android.view.animation.Animation"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="view" type="android.view.View">
+</parameter>
+</method>
+<method name="getDelay"
+ return="float"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getDelayForView"
+ return="long"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="view" type="android.view.View">
+</parameter>
+</method>
+<method name="getInterpolator"
+ return="android.view.animation.Interpolator"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getOrder"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getTransformedIndex"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="params" type="android.view.animation.LayoutAnimationController.AnimationParameters">
+</parameter>
+</method>
+<method name="isDone"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="setAnimation"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="context" type="android.content.Context">
+</parameter>
+<parameter name="resourceID" type="int">
+</parameter>
+</method>
+<method name="setAnimation"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="animation" type="android.view.animation.Animation">
+</parameter>
+</method>
+<method name="setDelay"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="delay" type="float">
+</parameter>
+</method>
+<method name="setInterpolator"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="context" type="android.content.Context">
+</parameter>
+<parameter name="resourceID" type="int">
+</parameter>
+</method>
+<method name="setInterpolator"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="interpolator" type="android.view.animation.Interpolator">
+</parameter>
+</method>
+<method name="setOrder"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="order" type="int">
+</parameter>
+</method>
+<method name="start"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="willOverlap"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<field name="ORDER_NORMAL"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="0"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ORDER_RANDOM"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ORDER_REVERSE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="mAnimation"
+ type="android.view.animation.Animation"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</field>
+<field name="mInterpolator"
+ type="android.view.animation.Interpolator"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</field>
+<field name="mRandomizer"
+ type="java.util.Random"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</field>
+</class>
+<class name="LayoutAnimationController.AnimationParameters"
+ extends="java.lang.Object"
+ abstract="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="LayoutAnimationController.AnimationParameters"
+ type="android.view.animation.LayoutAnimationController.AnimationParameters"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<field name="count"
+ type="int"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="index"
+ type="int"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<class name="LinearInterpolator"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="android.view.animation.Interpolator">
+</implements>
+<constructor name="LinearInterpolator"
+ type="android.view.animation.LinearInterpolator"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<constructor name="LinearInterpolator"
+ type="android.view.animation.LinearInterpolator"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="context" type="android.content.Context">
+</parameter>
+<parameter name="attrs" type="android.util.AttributeSet">
+</parameter>
+</constructor>
+<method name="getInterpolation"
+ return="float"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="input" type="float">
+</parameter>
+</method>
+</class>
+<class name="OvershootInterpolator"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="android.view.animation.Interpolator">
+</implements>
+<constructor name="OvershootInterpolator"
+ type="android.view.animation.OvershootInterpolator"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<constructor name="OvershootInterpolator"
+ type="android.view.animation.OvershootInterpolator"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="tension" type="float">
+</parameter>
+</constructor>
+<constructor name="OvershootInterpolator"
+ type="android.view.animation.OvershootInterpolator"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="context" type="android.content.Context">
+</parameter>
+<parameter name="attrs" type="android.util.AttributeSet">
+</parameter>
+</constructor>
+<method name="getInterpolation"
+ return="float"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="t" type="float">
+</parameter>
+</method>
+</class>
+<class name="RotateAnimation"
+ extends="android.view.animation.Animation"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="RotateAnimation"
+ type="android.view.animation.RotateAnimation"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="context" type="android.content.Context">
+</parameter>
+<parameter name="attrs" type="android.util.AttributeSet">
+</parameter>
+</constructor>
+<constructor name="RotateAnimation"
+ type="android.view.animation.RotateAnimation"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="fromDegrees" type="float">
+</parameter>
+<parameter name="toDegrees" type="float">
+</parameter>
+</constructor>
+<constructor name="RotateAnimation"
+ type="android.view.animation.RotateAnimation"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="fromDegrees" type="float">
+</parameter>
+<parameter name="toDegrees" type="float">
+</parameter>
+<parameter name="pivotX" type="float">
+</parameter>
+<parameter name="pivotY" type="float">
+</parameter>
+</constructor>
+<constructor name="RotateAnimation"
+ type="android.view.animation.RotateAnimation"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="fromDegrees" type="float">
+</parameter>
+<parameter name="toDegrees" type="float">
+</parameter>
+<parameter name="pivotXType" type="int">
+</parameter>
+<parameter name="pivotXValue" type="float">
+</parameter>
+<parameter name="pivotYType" type="int">
+</parameter>
+<parameter name="pivotYValue" type="float">
+</parameter>
+</constructor>
+</class>
+<class name="ScaleAnimation"
+ extends="android.view.animation.Animation"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="ScaleAnimation"
+ type="android.view.animation.ScaleAnimation"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="context" type="android.content.Context">
+</parameter>
+<parameter name="attrs" type="android.util.AttributeSet">
+</parameter>
+</constructor>
+<constructor name="ScaleAnimation"
+ type="android.view.animation.ScaleAnimation"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="fromX" type="float">
+</parameter>
+<parameter name="toX" type="float">
+</parameter>
+<parameter name="fromY" type="float">
+</parameter>
+<parameter name="toY" type="float">
+</parameter>
+</constructor>
+<constructor name="ScaleAnimation"
+ type="android.view.animation.ScaleAnimation"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="fromX" type="float">
+</parameter>
+<parameter name="toX" type="float">
+</parameter>
+<parameter name="fromY" type="float">
+</parameter>
+<parameter name="toY" type="float">
+</parameter>
+<parameter name="pivotX" type="float">
+</parameter>
+<parameter name="pivotY" type="float">
+</parameter>
+</constructor>
+<constructor name="ScaleAnimation"
+ type="android.view.animation.ScaleAnimation"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="fromX" type="float">
+</parameter>
+<parameter name="toX" type="float">
+</parameter>
+<parameter name="fromY" type="float">
+</parameter>
+<parameter name="toY" type="float">
+</parameter>
+<parameter name="pivotXType" type="int">
+</parameter>
+<parameter name="pivotXValue" type="float">
+</parameter>
+<parameter name="pivotYType" type="int">
+</parameter>
+<parameter name="pivotYValue" type="float">
+</parameter>
+</constructor>
+</class>
+<class name="Transformation"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="Transformation"
+ type="android.view.animation.Transformation"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<method name="clear"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="compose"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="t" type="android.view.animation.Transformation">
+</parameter>
+</method>
+<method name="getAlpha"
+ return="float"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getMatrix"
+ return="android.graphics.Matrix"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getTransformationType"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="set"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="t" type="android.view.animation.Transformation">
+</parameter>
+</method>
+<method name="setAlpha"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="alpha" type="float">
+</parameter>
+</method>
+<method name="setTransformationType"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="transformationType" type="int">
+</parameter>
+</method>
+<method name="toShortString"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<field name="TYPE_ALPHA"
+ type="int"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TYPE_BOTH"
+ type="int"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TYPE_IDENTITY"
+ type="int"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TYPE_MATRIX"
+ type="int"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="mAlpha"
+ type="float"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</field>
+<field name="mMatrix"
+ type="android.graphics.Matrix"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</field>
+<field name="mTransformationType"
+ type="int"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</field>
+</class>
+<class name="TranslateAnimation"
+ extends="android.view.animation.Animation"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="TranslateAnimation"
+ type="android.view.animation.TranslateAnimation"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="context" type="android.content.Context">
+</parameter>
+<parameter name="attrs" type="android.util.AttributeSet">
+</parameter>
+</constructor>
+<constructor name="TranslateAnimation"
+ type="android.view.animation.TranslateAnimation"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="fromXDelta" type="float">
+</parameter>
+<parameter name="toXDelta" type="float">
+</parameter>
+<parameter name="fromYDelta" type="float">
+</parameter>
+<parameter name="toYDelta" type="float">
+</parameter>
+</constructor>
+<constructor name="TranslateAnimation"
+ type="android.view.animation.TranslateAnimation"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="fromXType" type="int">
+</parameter>
+<parameter name="fromXValue" type="float">
+</parameter>
+<parameter name="toXType" type="int">
+</parameter>
+<parameter name="toXValue" type="float">
+</parameter>
+<parameter name="fromYType" type="int">
+</parameter>
+<parameter name="fromYValue" type="float">
+</parameter>
+<parameter name="toYType" type="int">
+</parameter>
+<parameter name="toYValue" type="float">
+</parameter>
+</constructor>
+</class>
+</package>
+<package name="android.view.inputmethod"
+>
+<class name="BaseInputConnection"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="android.view.inputmethod.InputConnection">
+</implements>
+<constructor name="BaseInputConnection"
+ type="android.view.inputmethod.BaseInputConnection"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="targetView" type="android.view.View">
+</parameter>
+<parameter name="fullEditor" type="boolean">
+</parameter>
+</constructor>
+<method name="beginBatchEdit"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="clearMetaKeyStates"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="states" type="int">
+</parameter>
+</method>
+<method name="commitCompletion"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="text" type="android.view.inputmethod.CompletionInfo">
+</parameter>
+</method>
+<method name="commitText"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="text" type="java.lang.CharSequence">
+</parameter>
+<parameter name="newCursorPosition" type="int">
+</parameter>
+</method>
+<method name="deleteSurroundingText"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="leftLength" type="int">
+</parameter>
+<parameter name="rightLength" type="int">
+</parameter>
+</method>
+<method name="endBatchEdit"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="finishComposingText"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getComposingSpanEnd"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="text" type="android.text.Spannable">
+</parameter>
+</method>
+<method name="getComposingSpanStart"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="text" type="android.text.Spannable">
+</parameter>
+</method>
+<method name="getCursorCapsMode"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="reqModes" type="int">
+</parameter>
+</method>
+<method name="getEditable"
+ return="android.text.Editable"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getExtractedText"
+ return="android.view.inputmethod.ExtractedText"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="request" type="android.view.inputmethod.ExtractedTextRequest">
+</parameter>
+<parameter name="flags" type="int">
+</parameter>
+</method>
+<method name="getTextAfterCursor"
+ return="java.lang.CharSequence"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="length" type="int">
+</parameter>
+<parameter name="flags" type="int">
+</parameter>
+</method>
+<method name="getTextBeforeCursor"
+ return="java.lang.CharSequence"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="length" type="int">
+</parameter>
+<parameter name="flags" type="int">
+</parameter>
+</method>
+<method name="performContextMenuAction"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="id" type="int">
+</parameter>
+</method>
+<method name="performEditorAction"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="actionCode" type="int">
+</parameter>
+</method>
+<method name="performPrivateCommand"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="action" type="java.lang.String">
+</parameter>
+<parameter name="data" type="android.os.Bundle">
+</parameter>
+</method>
+<method name="removeComposingSpans"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="text" type="android.text.Spannable">
+</parameter>
+</method>
+<method name="reportFullscreenMode"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="enabled" type="boolean">
+</parameter>
+</method>
+<method name="sendKeyEvent"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="event" type="android.view.KeyEvent">
+</parameter>
+</method>
+<method name="setComposingSpans"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="text" type="android.text.Spannable">
+</parameter>
+</method>
+<method name="setComposingText"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="text" type="java.lang.CharSequence">
+</parameter>
+<parameter name="newCursorPosition" type="int">
+</parameter>
+</method>
+<method name="setSelection"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="start" type="int">
+</parameter>
+<parameter name="end" type="int">
+</parameter>
+</method>
+</class>
+<class name="CompletionInfo"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="android.os.Parcelable">
+</implements>
+<constructor name="CompletionInfo"
+ type="android.view.inputmethod.CompletionInfo"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="id" type="long">
+</parameter>
+<parameter name="index" type="int">
+</parameter>
+<parameter name="text" type="java.lang.CharSequence">
+</parameter>
+</constructor>
+<constructor name="CompletionInfo"
+ type="android.view.inputmethod.CompletionInfo"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="id" type="long">
+</parameter>
+<parameter name="index" type="int">
+</parameter>
+<parameter name="text" type="java.lang.CharSequence">
+</parameter>
+<parameter name="label" type="java.lang.CharSequence">
+</parameter>
+</constructor>
+<method name="describeContents"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getId"
+ return="long"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getLabel"
+ return="java.lang.CharSequence"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getPosition"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getText"
+ return="java.lang.CharSequence"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="writeToParcel"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="dest" type="android.os.Parcel">
+</parameter>
+<parameter name="flags" type="int">
+</parameter>
+</method>
+<field name="CREATOR"
+ type="android.os.Parcelable.Creator"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<class name="EditorInfo"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="android.text.InputType">
+</implements>
+<implements name="android.os.Parcelable">
+</implements>
+<constructor name="EditorInfo"
+ type="android.view.inputmethod.EditorInfo"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<method name="describeContents"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="dump"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="pw" type="android.util.Printer">
+</parameter>
+<parameter name="prefix" type="java.lang.String">
+</parameter>
+</method>
+<method name="writeToParcel"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="dest" type="android.os.Parcel">
+</parameter>
+<parameter name="flags" type="int">
+</parameter>
+</method>
+<field name="CREATOR"
+ type="android.os.Parcelable.Creator"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="IME_ACTION_DONE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="6"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="IME_ACTION_GO"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="IME_ACTION_NEXT"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="5"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="IME_ACTION_NONE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="IME_ACTION_SEARCH"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="3"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="IME_ACTION_SEND"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="4"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="IME_ACTION_UNSPECIFIED"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="0"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="IME_FLAG_NO_ACCESSORY_ACTION"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="536870912"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="IME_FLAG_NO_ENTER_ACTION"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1073741824"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="IME_FLAG_NO_EXTRACT_UI"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="268435456"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="IME_MASK_ACTION"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="255"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="IME_NULL"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="0"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="actionId"
+ type="int"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="actionLabel"
+ type="java.lang.CharSequence"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="extras"
+ type="android.os.Bundle"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="fieldId"
+ type="int"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="fieldName"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="hintText"
+ type="java.lang.CharSequence"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="imeOptions"
+ type="int"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="initialCapsMode"
+ type="int"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="initialSelEnd"
+ type="int"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="initialSelStart"
+ type="int"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="inputType"
+ type="int"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="label"
+ type="java.lang.CharSequence"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="packageName"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="privateImeOptions"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<class name="ExtractedText"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="android.os.Parcelable">
+</implements>
+<constructor name="ExtractedText"
+ type="android.view.inputmethod.ExtractedText"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<method name="describeContents"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="writeToParcel"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="dest" type="android.os.Parcel">
+</parameter>
+<parameter name="flags" type="int">
+</parameter>
+</method>
+<field name="CREATOR"
+ type="android.os.Parcelable.Creator"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="FLAG_SELECTING"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="FLAG_SINGLE_LINE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="flags"
+ type="int"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="partialEndOffset"
+ type="int"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="partialStartOffset"
+ type="int"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="selectionEnd"
+ type="int"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="selectionStart"
+ type="int"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="startOffset"
+ type="int"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="text"
+ type="java.lang.CharSequence"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<class name="ExtractedTextRequest"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="android.os.Parcelable">
+</implements>
+<constructor name="ExtractedTextRequest"
+ type="android.view.inputmethod.ExtractedTextRequest"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<method name="describeContents"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="writeToParcel"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="dest" type="android.os.Parcel">
+</parameter>
+<parameter name="flags" type="int">
+</parameter>
+</method>
+<field name="CREATOR"
+ type="android.os.Parcelable.Creator"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="flags"
+ type="int"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="hintMaxChars"
+ type="int"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="hintMaxLines"
+ type="int"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="token"
+ type="int"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<class name="InputBinding"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="android.os.Parcelable">
+</implements>
+<constructor name="InputBinding"
+ type="android.view.inputmethod.InputBinding"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="conn" type="android.view.inputmethod.InputConnection">
+</parameter>
+<parameter name="connToken" type="android.os.IBinder">
+</parameter>
+<parameter name="uid" type="int">
+</parameter>
+<parameter name="pid" type="int">
+</parameter>
+</constructor>
+<constructor name="InputBinding"
+ type="android.view.inputmethod.InputBinding"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="conn" type="android.view.inputmethod.InputConnection">
+</parameter>
+<parameter name="binding" type="android.view.inputmethod.InputBinding">
+</parameter>
+</constructor>
+<method name="describeContents"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getConnection"
+ return="android.view.inputmethod.InputConnection"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getConnectionToken"
+ return="android.os.IBinder"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getPid"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getUid"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="writeToParcel"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="dest" type="android.os.Parcel">
+</parameter>
+<parameter name="flags" type="int">
+</parameter>
+</method>
+<field name="CREATOR"
+ type="android.os.Parcelable.Creator"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<interface name="InputConnection"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="beginBatchEdit"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="clearMetaKeyStates"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="states" type="int">
+</parameter>
+</method>
+<method name="commitCompletion"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="text" type="android.view.inputmethod.CompletionInfo">
+</parameter>
+</method>
+<method name="commitText"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="text" type="java.lang.CharSequence">
+</parameter>
+<parameter name="newCursorPosition" type="int">
+</parameter>
+</method>
+<method name="deleteSurroundingText"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="leftLength" type="int">
+</parameter>
+<parameter name="rightLength" type="int">
+</parameter>
+</method>
+<method name="endBatchEdit"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="finishComposingText"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getCursorCapsMode"
+ return="int"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="reqModes" type="int">
+</parameter>
+</method>
+<method name="getExtractedText"
+ return="android.view.inputmethod.ExtractedText"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="request" type="android.view.inputmethod.ExtractedTextRequest">
+</parameter>
+<parameter name="flags" type="int">
+</parameter>
+</method>
+<method name="getTextAfterCursor"
+ return="java.lang.CharSequence"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="n" type="int">
+</parameter>
+<parameter name="flags" type="int">
+</parameter>
+</method>
+<method name="getTextBeforeCursor"
+ return="java.lang.CharSequence"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="n" type="int">
+</parameter>
+<parameter name="flags" type="int">
+</parameter>
+</method>
+<method name="performContextMenuAction"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="id" type="int">
+</parameter>
+</method>
+<method name="performEditorAction"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="editorAction" type="int">
+</parameter>
+</method>
+<method name="performPrivateCommand"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="action" type="java.lang.String">
+</parameter>
+<parameter name="data" type="android.os.Bundle">
+</parameter>
+</method>
+<method name="reportFullscreenMode"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="enabled" type="boolean">
+</parameter>
+</method>
+<method name="sendKeyEvent"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="event" type="android.view.KeyEvent">
+</parameter>
+</method>
+<method name="setComposingText"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="text" type="java.lang.CharSequence">
+</parameter>
+<parameter name="newCursorPosition" type="int">
+</parameter>
+</method>
+<method name="setSelection"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="start" type="int">
+</parameter>
+<parameter name="end" type="int">
+</parameter>
+</method>
+<field name="GET_EXTRACTED_TEXT_MONITOR"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GET_TEXT_WITH_STYLES"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</interface>
+<class name="InputConnectionWrapper"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="android.view.inputmethod.InputConnection">
+</implements>
+<constructor name="InputConnectionWrapper"
+ type="android.view.inputmethod.InputConnectionWrapper"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="target" type="android.view.inputmethod.InputConnection">
+</parameter>
+<parameter name="mutable" type="boolean">
+</parameter>
+</constructor>
+<method name="beginBatchEdit"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="clearMetaKeyStates"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="states" type="int">
+</parameter>
+</method>
+<method name="commitCompletion"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="text" type="android.view.inputmethod.CompletionInfo">
+</parameter>
+</method>
+<method name="commitText"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="text" type="java.lang.CharSequence">
+</parameter>
+<parameter name="newCursorPosition" type="int">
+</parameter>
+</method>
+<method name="deleteSurroundingText"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="leftLength" type="int">
+</parameter>
+<parameter name="rightLength" type="int">
+</parameter>
+</method>
+<method name="endBatchEdit"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="finishComposingText"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getCursorCapsMode"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="reqModes" type="int">
+</parameter>
+</method>
+<method name="getExtractedText"
+ return="android.view.inputmethod.ExtractedText"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="request" type="android.view.inputmethod.ExtractedTextRequest">
+</parameter>
+<parameter name="flags" type="int">
+</parameter>
+</method>
+<method name="getTextAfterCursor"
+ return="java.lang.CharSequence"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="n" type="int">
+</parameter>
+<parameter name="flags" type="int">
+</parameter>
+</method>
+<method name="getTextBeforeCursor"
+ return="java.lang.CharSequence"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="n" type="int">
+</parameter>
+<parameter name="flags" type="int">
+</parameter>
+</method>
+<method name="performContextMenuAction"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="id" type="int">
+</parameter>
+</method>
+<method name="performEditorAction"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="editorAction" type="int">
+</parameter>
+</method>
+<method name="performPrivateCommand"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="action" type="java.lang.String">
+</parameter>
+<parameter name="data" type="android.os.Bundle">
+</parameter>
+</method>
+<method name="reportFullscreenMode"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="enabled" type="boolean">
+</parameter>
+</method>
+<method name="sendKeyEvent"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="event" type="android.view.KeyEvent">
+</parameter>
+</method>
+<method name="setComposingText"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="text" type="java.lang.CharSequence">
+</parameter>
+<parameter name="newCursorPosition" type="int">
+</parameter>
+</method>
+<method name="setSelection"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="start" type="int">
+</parameter>
+<parameter name="end" type="int">
+</parameter>
+</method>
+<method name="setTarget"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="target" type="android.view.inputmethod.InputConnection">
+</parameter>
+</method>
+</class>
+<interface name="InputMethod"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="attachToken"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="token" type="android.os.IBinder">
+</parameter>
+</method>
+<method name="bindInput"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="binding" type="android.view.inputmethod.InputBinding">
+</parameter>
+</method>
+<method name="createSession"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="callback" type="android.view.inputmethod.InputMethod.SessionCallback">
+</parameter>
+</method>
+<method name="hideSoftInput"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="flags" type="int">
+</parameter>
+<parameter name="resultReceiver" type="android.os.ResultReceiver">
+</parameter>
+</method>
+<method name="restartInput"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="inputConnection" type="android.view.inputmethod.InputConnection">
+</parameter>
+<parameter name="attribute" type="android.view.inputmethod.EditorInfo">
+</parameter>
+</method>
+<method name="revokeSession"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="session" type="android.view.inputmethod.InputMethodSession">
+</parameter>
+</method>
+<method name="setSessionEnabled"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="session" type="android.view.inputmethod.InputMethodSession">
+</parameter>
+<parameter name="enabled" type="boolean">
+</parameter>
+</method>
+<method name="showSoftInput"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="flags" type="int">
+</parameter>
+<parameter name="resultReceiver" type="android.os.ResultReceiver">
+</parameter>
+</method>
+<method name="startInput"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="inputConnection" type="android.view.inputmethod.InputConnection">
+</parameter>
+<parameter name="info" type="android.view.inputmethod.EditorInfo">
+</parameter>
+</method>
+<method name="unbindInput"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<field name="SERVICE_INTERFACE"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.view.InputMethod&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="SERVICE_META_DATA"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.view.im&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="SHOW_EXPLICIT"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="SHOW_FORCED"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</interface>
+<interface name="InputMethod.SessionCallback"
+ abstract="true"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="sessionCreated"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="session" type="android.view.inputmethod.InputMethodSession">
+</parameter>
+</method>
+</interface>
+<class name="InputMethodInfo"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="android.os.Parcelable">
+</implements>
+<constructor name="InputMethodInfo"
+ type="android.view.inputmethod.InputMethodInfo"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="context" type="android.content.Context">
+</parameter>
+<parameter name="service" type="android.content.pm.ResolveInfo">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+<exception name="XmlPullParserException" type="org.xmlpull.v1.XmlPullParserException">
+</exception>
+</constructor>
+<constructor name="InputMethodInfo"
+ type="android.view.inputmethod.InputMethodInfo"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="packageName" type="java.lang.String">
+</parameter>
+<parameter name="className" type="java.lang.String">
+</parameter>
+<parameter name="label" type="java.lang.CharSequence">
+</parameter>
+<parameter name="settingsActivity" type="java.lang.String">
+</parameter>
+</constructor>
+<method name="describeContents"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="dump"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="pw" type="android.util.Printer">
+</parameter>
+<parameter name="prefix" type="java.lang.String">
+</parameter>
+</method>
+<method name="getComponent"
+ return="android.content.ComponentName"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getId"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getIsDefaultResourceId"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getPackageName"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getServiceInfo"
+ return="android.content.pm.ServiceInfo"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getServiceName"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getSettingsActivity"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="loadIcon"
+ return="android.graphics.drawable.Drawable"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="pm" type="android.content.pm.PackageManager">
+</parameter>
+</method>
+<method name="loadLabel"
+ return="java.lang.CharSequence"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="pm" type="android.content.pm.PackageManager">
+</parameter>
+</method>
+<method name="writeToParcel"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="dest" type="android.os.Parcel">
+</parameter>
+<parameter name="flags" type="int">
+</parameter>
+</method>
+<field name="CREATOR"
+ type="android.os.Parcelable.Creator"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<class name="InputMethodManager"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="displayCompletions"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="view" type="android.view.View">
+</parameter>
+<parameter name="completions" type="android.view.inputmethod.CompletionInfo[]">
+</parameter>
+</method>
+<method name="getEnabledInputMethodList"
+ return="java.util.List&lt;android.view.inputmethod.InputMethodInfo&gt;"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getInputMethodList"
+ return="java.util.List&lt;android.view.inputmethod.InputMethodInfo&gt;"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="hideSoftInputFromInputMethod"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="token" type="android.os.IBinder">
+</parameter>
+<parameter name="flags" type="int">
+</parameter>
+</method>
+<method name="hideSoftInputFromWindow"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="windowToken" type="android.os.IBinder">
+</parameter>
+<parameter name="flags" type="int">
+</parameter>
+</method>
+<method name="hideSoftInputFromWindow"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="windowToken" type="android.os.IBinder">
+</parameter>
+<parameter name="flags" type="int">
+</parameter>
+<parameter name="resultReceiver" type="android.os.ResultReceiver">
+</parameter>
+</method>
+<method name="hideStatusIcon"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="imeToken" type="android.os.IBinder">
+</parameter>
+</method>
+<method name="isAcceptingText"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isActive"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="view" type="android.view.View">
+</parameter>
+</method>
+<method name="isActive"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isFullscreenMode"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isWatchingCursor"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="view" type="android.view.View">
+</parameter>
+</method>
+<method name="restartInput"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="view" type="android.view.View">
+</parameter>
+</method>
+<method name="sendAppPrivateCommand"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="view" type="android.view.View">
+</parameter>
+<parameter name="action" type="java.lang.String">
+</parameter>
+<parameter name="data" type="android.os.Bundle">
+</parameter>
+</method>
+<method name="setInputMethod"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="token" type="android.os.IBinder">
+</parameter>
+<parameter name="id" type="java.lang.String">
+</parameter>
+</method>
+<method name="showInputMethodPicker"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="showSoftInput"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="view" type="android.view.View">
+</parameter>
+<parameter name="flags" type="int">
+</parameter>
+</method>
+<method name="showSoftInput"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="view" type="android.view.View">
+</parameter>
+<parameter name="flags" type="int">
+</parameter>
+<parameter name="resultReceiver" type="android.os.ResultReceiver">
+</parameter>
+</method>
+<method name="showSoftInputFromInputMethod"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="token" type="android.os.IBinder">
+</parameter>
+<parameter name="flags" type="int">
+</parameter>
+</method>
+<method name="showStatusIcon"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="imeToken" type="android.os.IBinder">
+</parameter>
+<parameter name="packageName" type="java.lang.String">
+</parameter>
+<parameter name="iconId" type="int">
+</parameter>
+</method>
+<method name="toggleSoftInput"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="showFlags" type="int">
+</parameter>
+<parameter name="hideFlags" type="int">
+</parameter>
+</method>
+<method name="toggleSoftInputFromWindow"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="windowToken" type="android.os.IBinder">
+</parameter>
+<parameter name="showFlags" type="int">
+</parameter>
+<parameter name="hideFlags" type="int">
+</parameter>
+</method>
+<method name="updateCursor"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="view" type="android.view.View">
+</parameter>
+<parameter name="left" type="int">
+</parameter>
+<parameter name="top" type="int">
+</parameter>
+<parameter name="right" type="int">
+</parameter>
+<parameter name="bottom" type="int">
+</parameter>
+</method>
+<method name="updateExtractedText"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="view" type="android.view.View">
+</parameter>
+<parameter name="token" type="int">
+</parameter>
+<parameter name="text" type="android.view.inputmethod.ExtractedText">
+</parameter>
+</method>
+<method name="updateSelection"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="view" type="android.view.View">
+</parameter>
+<parameter name="selStart" type="int">
+</parameter>
+<parameter name="selEnd" type="int">
+</parameter>
+<parameter name="candidatesStart" type="int">
+</parameter>
+<parameter name="candidatesEnd" type="int">
+</parameter>
+</method>
+<field name="HIDE_IMPLICIT_ONLY"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="HIDE_NOT_ALWAYS"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="RESULT_HIDDEN"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="3"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="RESULT_SHOWN"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="RESULT_UNCHANGED_HIDDEN"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="RESULT_UNCHANGED_SHOWN"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="0"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="SHOW_FORCED"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="SHOW_IMPLICIT"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<interface name="InputMethodSession"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="appPrivateCommand"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="action" type="java.lang.String">
+</parameter>
+<parameter name="data" type="android.os.Bundle">
+</parameter>
+</method>
+<method name="dispatchKeyEvent"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="seq" type="int">
+</parameter>
+<parameter name="event" type="android.view.KeyEvent">
+</parameter>
+<parameter name="callback" type="android.view.inputmethod.InputMethodSession.EventCallback">
+</parameter>
+</method>
+<method name="dispatchTrackballEvent"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="seq" type="int">
+</parameter>
+<parameter name="event" type="android.view.MotionEvent">
+</parameter>
+<parameter name="callback" type="android.view.inputmethod.InputMethodSession.EventCallback">
+</parameter>
+</method>
+<method name="displayCompletions"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="completions" type="android.view.inputmethod.CompletionInfo[]">
+</parameter>
+</method>
+<method name="finishInput"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="toggleSoftInput"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="showFlags" type="int">
+</parameter>
+<parameter name="hideFlags" type="int">
+</parameter>
+</method>
+<method name="updateCursor"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="newCursor" type="android.graphics.Rect">
+</parameter>
+</method>
+<method name="updateExtractedText"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="token" type="int">
+</parameter>
+<parameter name="text" type="android.view.inputmethod.ExtractedText">
+</parameter>
+</method>
+<method name="updateSelection"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="oldSelStart" type="int">
+</parameter>
+<parameter name="oldSelEnd" type="int">
+</parameter>
+<parameter name="newSelStart" type="int">
+</parameter>
+<parameter name="newSelEnd" type="int">
+</parameter>
+<parameter name="candidatesStart" type="int">
+</parameter>
+<parameter name="candidatesEnd" type="int">
+</parameter>
+</method>
+</interface>
+<interface name="InputMethodSession.EventCallback"
+ abstract="true"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="finishedEvent"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="seq" type="int">
+</parameter>
+<parameter name="handled" type="boolean">
+</parameter>
+</method>
+</interface>
+</package>
+<package name="android.webkit"
+>
+<class name="CacheManager"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="CacheManager"
+ type="android.webkit.CacheManager"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<method name="cacheDisabled"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="endCacheTransaction"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="deprecated"
+ visibility="public"
+>
+</method>
+<method name="getCacheFile"
+ return="android.webkit.CacheManager.CacheResult"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="url" type="java.lang.String">
+</parameter>
+<parameter name="headers" type="java.util.Map&lt;java.lang.String, java.lang.String&gt;">
+</parameter>
+</method>
+<method name="getCacheFileBaseDir"
+ return="java.io.File"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="saveCacheFile"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="url" type="java.lang.String">
+</parameter>
+<parameter name="cacheRet" type="android.webkit.CacheManager.CacheResult">
+</parameter>
+</method>
+<method name="startCacheTransaction"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="deprecated"
+ visibility="public"
+>
+</method>
+</class>
+<class name="CacheManager.CacheResult"
+ extends="java.lang.Object"
+ abstract="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="CacheManager.CacheResult"
+ type="android.webkit.CacheManager.CacheResult"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<method name="getContentDisposition"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getContentLength"
+ return="long"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getETag"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getEncoding"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getExpires"
+ return="long"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getExpiresString"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getHttpStatusCode"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getInputStream"
+ return="java.io.InputStream"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getLastModified"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getLocalPath"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getLocation"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getMimeType"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getOutputStream"
+ return="java.io.OutputStream"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="setEncoding"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="encoding" type="java.lang.String">
+</parameter>
+</method>
+<method name="setInputStream"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="stream" type="java.io.InputStream">
+</parameter>
+</method>
+</class>
+<class name="ConsoleMessage"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="ConsoleMessage"
+ type="android.webkit.ConsoleMessage"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="message" type="java.lang.String">
+</parameter>
+<parameter name="sourceId" type="java.lang.String">
+</parameter>
+<parameter name="lineNumber" type="int">
+</parameter>
+<parameter name="msgLevel" type="android.webkit.ConsoleMessage.MessageLevel">
+</parameter>
+</constructor>
+<method name="lineNumber"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="message"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="messageLevel"
+ return="android.webkit.ConsoleMessage.MessageLevel"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="sourceId"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+</class>
+<class name="ConsoleMessage.MessageLevel"
+ extends="java.lang.Enum"
+ abstract="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="valueOf"
+ return="android.webkit.ConsoleMessage.MessageLevel"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+</method>
+<method name="values"
+ return="android.webkit.ConsoleMessage.MessageLevel[]"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+</class>
+<class name="CookieManager"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="acceptCookie"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getCookie"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="url" type="java.lang.String">
+</parameter>
+</method>
+<method name="getInstance"
+ return="android.webkit.CookieManager"
+ abstract="false"
+ native="false"
+ synchronized="true"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="hasCookies"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="removeAllCookie"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="removeExpiredCookie"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="removeSessionCookie"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="setAcceptCookie"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="accept" type="boolean">
+</parameter>
+</method>
+<method name="setCookie"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="url" type="java.lang.String">
+</parameter>
+<parameter name="value" type="java.lang.String">
+</parameter>
+</method>
+</class>
+<class name="CookieSyncManager"
+ extends="android.webkit.WebSyncManager"
+ abstract="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="createInstance"
+ return="android.webkit.CookieSyncManager"
+ abstract="false"
+ native="false"
+ synchronized="true"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="context" type="android.content.Context">
+</parameter>
+</method>
+<method name="getInstance"
+ return="android.webkit.CookieSyncManager"
+ abstract="false"
+ native="false"
+ synchronized="true"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="syncFromRamToFlash"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</method>
+</class>
+<class name="DateSorter"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="DateSorter"
+ type="android.webkit.DateSorter"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="context" type="android.content.Context">
+</parameter>
+</constructor>
+<method name="getBoundary"
+ return="long"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="index" type="int">
+</parameter>
+</method>
+<method name="getIndex"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="time" type="long">
+</parameter>
+</method>
+<method name="getLabel"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="index" type="int">
+</parameter>
+</method>
+<field name="DAY_COUNT"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="5"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<interface name="DownloadListener"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="onDownloadStart"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="url" type="java.lang.String">
+</parameter>
+<parameter name="userAgent" type="java.lang.String">
+</parameter>
+<parameter name="contentDisposition" type="java.lang.String">
+</parameter>
+<parameter name="mimetype" type="java.lang.String">
+</parameter>
+<parameter name="contentLength" type="long">
+</parameter>
+</method>
+</interface>
+<class name="GeolocationPermissions"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="GeolocationPermissions"
+ type="android.webkit.GeolocationPermissions"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<method name="allow"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="origin" type="java.lang.String">
+</parameter>
+</method>
+<method name="clear"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="origin" type="java.lang.String">
+</parameter>
+</method>
+<method name="clearAll"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getAllowed"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="origin" type="java.lang.String">
+</parameter>
+<parameter name="callback" type="android.webkit.ValueCallback&lt;java.lang.Boolean&gt;">
+</parameter>
+</method>
+<method name="getInstance"
+ return="android.webkit.GeolocationPermissions"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getOrigins"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="callback" type="android.webkit.ValueCallback&lt;java.util.Set&lt;java.lang.String&gt;&gt;">
+</parameter>
+</method>
+</class>
+<interface name="GeolocationPermissions.Callback"
+ abstract="true"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="invoke"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="origin" type="java.lang.String">
+</parameter>
+<parameter name="allow" type="boolean">
+</parameter>
+<parameter name="remember" type="boolean">
+</parameter>
+</method>
+</interface>
+<class name="HttpAuthHandler"
+ extends="android.os.Handler"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="cancel"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="proceed"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="username" type="java.lang.String">
+</parameter>
+<parameter name="password" type="java.lang.String">
+</parameter>
+</method>
+<method name="useHttpAuthUsernamePassword"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+</class>
+<class name="JsPromptResult"
+ extends="android.webkit.JsResult"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="confirm"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="result" type="java.lang.String">
+</parameter>
+</method>
+</class>
+<class name="JsResult"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="cancel"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="confirm"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="wakeUp"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</method>
+<field name="mResult"
+ type="boolean"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</field>
+</class>
+<class name="MimeTypeMap"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="getExtensionFromMimeType"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="mimeType" type="java.lang.String">
+</parameter>
+</method>
+<method name="getFileExtensionFromUrl"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="url" type="java.lang.String">
+</parameter>
+</method>
+<method name="getMimeTypeFromExtension"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="extension" type="java.lang.String">
+</parameter>
+</method>
+<method name="getSingleton"
+ return="android.webkit.MimeTypeMap"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="hasExtension"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="extension" type="java.lang.String">
+</parameter>
+</method>
+<method name="hasMimeType"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="mimeType" type="java.lang.String">
+</parameter>
+</method>
+</class>
+<class name="Plugin"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="deprecated"
+ visibility="public"
+>
+<constructor name="Plugin"
+ type="android.webkit.Plugin"
+ static="false"
+ final="false"
+ deprecated="deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+<parameter name="path" type="java.lang.String">
+</parameter>
+<parameter name="fileName" type="java.lang.String">
+</parameter>
+<parameter name="description" type="java.lang.String">
+</parameter>
+</constructor>
+<method name="dispatchClickEvent"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="deprecated"
+ visibility="public"
+>
+<parameter name="context" type="android.content.Context">
+</parameter>
+</method>
+<method name="getDescription"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="deprecated"
+ visibility="public"
+>
+</method>
+<method name="getFileName"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="deprecated"
+ visibility="public"
+>
+</method>
+<method name="getName"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="deprecated"
+ visibility="public"
+>
+</method>
+<method name="getPath"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="deprecated"
+ visibility="public"
+>
+</method>
+<method name="setClickHandler"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="deprecated"
+ visibility="public"
+>
+<parameter name="handler" type="android.webkit.Plugin.PreferencesClickHandler">
+</parameter>
+</method>
+<method name="setDescription"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="deprecated"
+ visibility="public"
+>
+<parameter name="description" type="java.lang.String">
+</parameter>
+</method>
+<method name="setFileName"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="deprecated"
+ visibility="public"
+>
+<parameter name="fileName" type="java.lang.String">
+</parameter>
+</method>
+<method name="setName"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+</method>
+<method name="setPath"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="deprecated"
+ visibility="public"
+>
+<parameter name="path" type="java.lang.String">
+</parameter>
+</method>
+</class>
+<interface name="Plugin.PreferencesClickHandler"
+ abstract="true"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="handleClickEvent"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="context" type="android.content.Context">
+</parameter>
+</method>
+</interface>
+<class name="PluginData"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="true"
+ deprecated="deprecated"
+ visibility="public"
+>
+<constructor name="PluginData"
+ type="android.webkit.PluginData"
+ static="false"
+ final="false"
+ deprecated="deprecated"
+ visibility="public"
+>
+<parameter name="stream" type="java.io.InputStream">
+</parameter>
+<parameter name="length" type="long">
+</parameter>
+<parameter name="headers" type="java.util.Map&lt;java.lang.String, java.lang.String[]&gt;">
+</parameter>
+<parameter name="code" type="int">
+</parameter>
+</constructor>
+<method name="getContentLength"
+ return="long"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="deprecated"
+ visibility="public"
+>
+</method>
+<method name="getHeaders"
+ return="java.util.Map&lt;java.lang.String, java.lang.String[]&gt;"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="deprecated"
+ visibility="public"
+>
+</method>
+<method name="getInputStream"
+ return="java.io.InputStream"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="deprecated"
+ visibility="public"
+>
+</method>
+<method name="getStatusCode"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="deprecated"
+ visibility="public"
+>
+</method>
+</class>
+<class name="PluginList"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="deprecated"
+ visibility="public"
+>
+<constructor name="PluginList"
+ type="android.webkit.PluginList"
+ static="false"
+ final="false"
+ deprecated="deprecated"
+ visibility="public"
+>
+</constructor>
+<method name="addPlugin"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="true"
+ static="false"
+ final="false"
+ deprecated="deprecated"
+ visibility="public"
+>
+<parameter name="plugin" type="android.webkit.Plugin">
+</parameter>
+</method>
+<method name="clear"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="true"
+ static="false"
+ final="false"
+ deprecated="deprecated"
+ visibility="public"
+>
+</method>
+<method name="getList"
+ return="java.util.List"
+ abstract="false"
+ native="false"
+ synchronized="true"
+ static="false"
+ final="false"
+ deprecated="deprecated"
+ visibility="public"
+>
+</method>
+<method name="pluginClicked"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="true"
+ static="false"
+ final="false"
+ deprecated="deprecated"
+ visibility="public"
+>
+<parameter name="context" type="android.content.Context">
+</parameter>
+<parameter name="position" type="int">
+</parameter>
+</method>
+<method name="removePlugin"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="true"
+ static="false"
+ final="false"
+ deprecated="deprecated"
+ visibility="public"
+>
+<parameter name="plugin" type="android.webkit.Plugin">
+</parameter>
+</method>
+</class>
+<interface name="PluginStub"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="getEmbeddedView"
+ return="android.view.View"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="NPP" type="int">
+</parameter>
+<parameter name="context" type="android.content.Context">
+</parameter>
+</method>
+<method name="getFullScreenView"
+ return="android.view.View"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="NPP" type="int">
+</parameter>
+<parameter name="context" type="android.content.Context">
+</parameter>
+</method>
+</interface>
+<class name="SslErrorHandler"
+ extends="android.os.Handler"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="cancel"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="proceed"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+</class>
+<class name="URLUtil"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="URLUtil"
+ type="android.webkit.URLUtil"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<method name="composeSearchUrl"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="inQuery" type="java.lang.String">
+</parameter>
+<parameter name="template" type="java.lang.String">
+</parameter>
+<parameter name="queryPlaceHolder" type="java.lang.String">
+</parameter>
+</method>
+<method name="decode"
+ return="byte[]"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="url" type="byte[]">
+</parameter>
+<exception name="IllegalArgumentException" type="java.lang.IllegalArgumentException">
+</exception>
+</method>
+<method name="guessFileName"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="url" type="java.lang.String">
+</parameter>
+<parameter name="contentDisposition" type="java.lang.String">
+</parameter>
+<parameter name="mimeType" type="java.lang.String">
+</parameter>
+</method>
+<method name="guessUrl"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="inUrl" type="java.lang.String">
+</parameter>
+</method>
+<method name="isAboutUrl"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="url" type="java.lang.String">
+</parameter>
+</method>
+<method name="isAssetUrl"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="url" type="java.lang.String">
+</parameter>
+</method>
+<method name="isContentUrl"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="url" type="java.lang.String">
+</parameter>
+</method>
+<method name="isCookielessProxyUrl"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="deprecated"
+ visibility="public"
+>
+<parameter name="url" type="java.lang.String">
+</parameter>
+</method>
+<method name="isDataUrl"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="url" type="java.lang.String">
+</parameter>
+</method>
+<method name="isFileUrl"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="url" type="java.lang.String">
+</parameter>
+</method>
+<method name="isHttpUrl"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="url" type="java.lang.String">
+</parameter>
+</method>
+<method name="isHttpsUrl"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="url" type="java.lang.String">
+</parameter>
+</method>
+<method name="isJavaScriptUrl"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="url" type="java.lang.String">
+</parameter>
+</method>
+<method name="isNetworkUrl"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="url" type="java.lang.String">
+</parameter>
+</method>
+<method name="isValidUrl"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="url" type="java.lang.String">
+</parameter>
+</method>
+<method name="stripAnchor"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="url" type="java.lang.String">
+</parameter>
+</method>
+</class>
+<interface name="UrlInterceptHandler"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="deprecated"
+ visibility="public"
+>
+<method name="getPluginData"
+ return="android.webkit.PluginData"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="deprecated"
+ visibility="public"
+>
+<parameter name="url" type="java.lang.String">
+</parameter>
+<parameter name="headers" type="java.util.Map&lt;java.lang.String, java.lang.String&gt;">
+</parameter>
+</method>
+<method name="service"
+ return="android.webkit.CacheManager.CacheResult"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="deprecated"
+ visibility="public"
+>
+<parameter name="url" type="java.lang.String">
+</parameter>
+<parameter name="headers" type="java.util.Map&lt;java.lang.String, java.lang.String&gt;">
+</parameter>
+</method>
+</interface>
+<class name="UrlInterceptRegistry"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="true"
+ deprecated="deprecated"
+ visibility="public"
+>
+<constructor name="UrlInterceptRegistry"
+ type="android.webkit.UrlInterceptRegistry"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<method name="getPluginData"
+ return="android.webkit.PluginData"
+ abstract="false"
+ native="false"
+ synchronized="true"
+ static="true"
+ final="false"
+ deprecated="deprecated"
+ visibility="public"
+>
+<parameter name="url" type="java.lang.String">
+</parameter>
+<parameter name="headers" type="java.util.Map&lt;java.lang.String, java.lang.String&gt;">
+</parameter>
+</method>
+<method name="getSurrogate"
+ return="android.webkit.CacheManager.CacheResult"
+ abstract="false"
+ native="false"
+ synchronized="true"
+ static="true"
+ final="false"
+ deprecated="deprecated"
+ visibility="public"
+>
+<parameter name="url" type="java.lang.String">
+</parameter>
+<parameter name="headers" type="java.util.Map&lt;java.lang.String, java.lang.String&gt;">
+</parameter>
+</method>
+<method name="registerHandler"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="true"
+ static="true"
+ final="false"
+ deprecated="deprecated"
+ visibility="public"
+>
+<parameter name="handler" type="android.webkit.UrlInterceptHandler">
+</parameter>
+</method>
+<method name="setUrlInterceptDisabled"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="true"
+ static="true"
+ final="false"
+ deprecated="deprecated"
+ visibility="public"
+>
+<parameter name="disabled" type="boolean">
+</parameter>
+</method>
+<method name="unregisterHandler"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="true"
+ static="true"
+ final="false"
+ deprecated="deprecated"
+ visibility="public"
+>
+<parameter name="handler" type="android.webkit.UrlInterceptHandler">
+</parameter>
+</method>
+<method name="urlInterceptDisabled"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="true"
+ static="true"
+ final="false"
+ deprecated="deprecated"
+ visibility="public"
+>
+</method>
+</class>
+<interface name="ValueCallback"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="onReceiveValue"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="value" type="T">
+</parameter>
+</method>
+</interface>
+<class name="WebBackForwardList"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="java.lang.Cloneable">
+</implements>
+<implements name="java.io.Serializable">
+</implements>
+<method name="getCurrentIndex"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getCurrentItem"
+ return="android.webkit.WebHistoryItem"
+ abstract="false"
+ native="false"
+ synchronized="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getItemAtIndex"
+ return="android.webkit.WebHistoryItem"
+ abstract="false"
+ native="false"
+ synchronized="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="index" type="int">
+</parameter>
+</method>
+<method name="getSize"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+</class>
+<class name="WebChromeClient"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="WebChromeClient"
+ type="android.webkit.WebChromeClient"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<method name="getDefaultVideoPoster"
+ return="android.graphics.Bitmap"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getVideoLoadingProgressView"
+ return="android.view.View"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getVisitedHistory"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="callback" type="android.webkit.ValueCallback&lt;java.lang.String[]&gt;">
+</parameter>
+</method>
+<method name="onCloseWindow"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="window" type="android.webkit.WebView">
+</parameter>
+</method>
+<method name="onConsoleMessage"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="deprecated"
+ visibility="public"
+>
+<parameter name="message" type="java.lang.String">
+</parameter>
+<parameter name="lineNumber" type="int">
+</parameter>
+<parameter name="sourceID" type="java.lang.String">
+</parameter>
+</method>
+<method name="onConsoleMessage"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="consoleMessage" type="android.webkit.ConsoleMessage">
+</parameter>
+</method>
+<method name="onCreateWindow"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="view" type="android.webkit.WebView">
+</parameter>
+<parameter name="dialog" type="boolean">
+</parameter>
+<parameter name="userGesture" type="boolean">
+</parameter>
+<parameter name="resultMsg" type="android.os.Message">
+</parameter>
+</method>
+<method name="onExceededDatabaseQuota"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="url" type="java.lang.String">
+</parameter>
+<parameter name="databaseIdentifier" type="java.lang.String">
+</parameter>
+<parameter name="currentQuota" type="long">
+</parameter>
+<parameter name="estimatedSize" type="long">
+</parameter>
+<parameter name="totalUsedQuota" type="long">
+</parameter>
+<parameter name="quotaUpdater" type="android.webkit.WebStorage.QuotaUpdater">
+</parameter>
+</method>
+<method name="onGeolocationPermissionsHidePrompt"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="onGeolocationPermissionsShowPrompt"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="origin" type="java.lang.String">
+</parameter>
+<parameter name="callback" type="android.webkit.GeolocationPermissions.Callback">
+</parameter>
+</method>
+<method name="onHideCustomView"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="onJsAlert"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="view" type="android.webkit.WebView">
+</parameter>
+<parameter name="url" type="java.lang.String">
+</parameter>
+<parameter name="message" type="java.lang.String">
+</parameter>
+<parameter name="result" type="android.webkit.JsResult">
+</parameter>
+</method>
+<method name="onJsBeforeUnload"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="view" type="android.webkit.WebView">
+</parameter>
+<parameter name="url" type="java.lang.String">
+</parameter>
+<parameter name="message" type="java.lang.String">
+</parameter>
+<parameter name="result" type="android.webkit.JsResult">
+</parameter>
+</method>
+<method name="onJsConfirm"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="view" type="android.webkit.WebView">
+</parameter>
+<parameter name="url" type="java.lang.String">
+</parameter>
+<parameter name="message" type="java.lang.String">
+</parameter>
+<parameter name="result" type="android.webkit.JsResult">
+</parameter>
+</method>
+<method name="onJsPrompt"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="view" type="android.webkit.WebView">
+</parameter>
+<parameter name="url" type="java.lang.String">
+</parameter>
+<parameter name="message" type="java.lang.String">
+</parameter>
+<parameter name="defaultValue" type="java.lang.String">
+</parameter>
+<parameter name="result" type="android.webkit.JsPromptResult">
+</parameter>
+</method>
+<method name="onJsTimeout"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="onProgressChanged"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="view" type="android.webkit.WebView">
+</parameter>
+<parameter name="newProgress" type="int">
+</parameter>
+</method>
+<method name="onReachedMaxAppCacheSize"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="spaceNeeded" type="long">
+</parameter>
+<parameter name="totalUsedQuota" type="long">
+</parameter>
+<parameter name="quotaUpdater" type="android.webkit.WebStorage.QuotaUpdater">
+</parameter>
+</method>
+<method name="onReceivedIcon"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="view" type="android.webkit.WebView">
+</parameter>
+<parameter name="icon" type="android.graphics.Bitmap">
+</parameter>
+</method>
+<method name="onReceivedTitle"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="view" type="android.webkit.WebView">
+</parameter>
+<parameter name="title" type="java.lang.String">
+</parameter>
+</method>
+<method name="onReceivedTouchIconUrl"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="view" type="android.webkit.WebView">
+</parameter>
+<parameter name="url" type="java.lang.String">
+</parameter>
+<parameter name="precomposed" type="boolean">
+</parameter>
+</method>
+<method name="onRequestFocus"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="view" type="android.webkit.WebView">
+</parameter>
+</method>
+<method name="onShowCustomView"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="view" type="android.view.View">
+</parameter>
+<parameter name="callback" type="android.webkit.WebChromeClient.CustomViewCallback">
+</parameter>
+</method>
+</class>
+<interface name="WebChromeClient.CustomViewCallback"
+ abstract="true"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="onCustomViewHidden"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+</interface>
+<class name="WebHistoryItem"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="java.lang.Cloneable">
+</implements>
+<method name="getFavicon"
+ return="android.graphics.Bitmap"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getId"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getOriginalUrl"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getTitle"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getUrl"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+</class>
+<class name="WebIconDatabase"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="close"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getInstance"
+ return="android.webkit.WebIconDatabase"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="open"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="path" type="java.lang.String">
+</parameter>
+</method>
+<method name="releaseIconForPageUrl"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="url" type="java.lang.String">
+</parameter>
+</method>
+<method name="removeAllIcons"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="requestIconForPageUrl"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="url" type="java.lang.String">
+</parameter>
+<parameter name="listener" type="android.webkit.WebIconDatabase.IconListener">
+</parameter>
+</method>
+<method name="retainIconForPageUrl"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="url" type="java.lang.String">
+</parameter>
+</method>
+</class>
+<interface name="WebIconDatabase.IconListener"
+ abstract="true"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="onReceivedIcon"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="url" type="java.lang.String">
+</parameter>
+<parameter name="icon" type="android.graphics.Bitmap">
+</parameter>
+</method>
+</interface>
+<class name="WebSettings"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="getAllowFileAccess"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getBlockNetworkImage"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getBlockNetworkLoads"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getBuiltInZoomControls"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getCacheMode"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getCursiveFontFamily"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getDatabaseEnabled"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getDatabasePath"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getDefaultFixedFontSize"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getDefaultFontSize"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getDefaultTextEncodingName"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getDefaultZoom"
+ return="android.webkit.WebSettings.ZoomDensity"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getDomStorageEnabled"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getFantasyFontFamily"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getFixedFontFamily"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getJavaScriptCanOpenWindowsAutomatically"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getJavaScriptEnabled"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getLayoutAlgorithm"
+ return="android.webkit.WebSettings.LayoutAlgorithm"
+ abstract="false"
+ native="false"
+ synchronized="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getLightTouchEnabled"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getLoadWithOverviewMode"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getLoadsImagesAutomatically"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getMinimumFontSize"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getMinimumLogicalFontSize"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getNavDump"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getPluginState"
+ return="android.webkit.WebSettings.PluginState"
+ abstract="false"
+ native="false"
+ synchronized="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getPluginsEnabled"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="true"
+ static="false"
+ final="false"
+ deprecated="deprecated"
+ visibility="public"
+>
+</method>
+<method name="getPluginsPath"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getSansSerifFontFamily"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getSaveFormData"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getSavePassword"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getSerifFontFamily"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getStandardFontFamily"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getTextSize"
+ return="android.webkit.WebSettings.TextSize"
+ abstract="false"
+ native="false"
+ synchronized="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getUseDoubleTree"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="true"
+ static="false"
+ final="false"
+ deprecated="deprecated"
+ visibility="public"
+>
+</method>
+<method name="getUseWideViewPort"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getUserAgent"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="true"
+ static="false"
+ final="false"
+ deprecated="deprecated"
+ visibility="public"
+>
+</method>
+<method name="getUserAgentString"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="setAllowFileAccess"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="allow" type="boolean">
+</parameter>
+</method>
+<method name="setAppCacheEnabled"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="flag" type="boolean">
+</parameter>
+</method>
+<method name="setAppCacheMaxSize"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="appCacheMaxSize" type="long">
+</parameter>
+</method>
+<method name="setAppCachePath"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="appCachePath" type="java.lang.String">
+</parameter>
+</method>
+<method name="setBlockNetworkImage"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="flag" type="boolean">
+</parameter>
+</method>
+<method name="setBlockNetworkLoads"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="flag" type="boolean">
+</parameter>
+</method>
+<method name="setBuiltInZoomControls"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="enabled" type="boolean">
+</parameter>
+</method>
+<method name="setCacheMode"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="mode" type="int">
+</parameter>
+</method>
+<method name="setCursiveFontFamily"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="font" type="java.lang.String">
+</parameter>
+</method>
+<method name="setDatabaseEnabled"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="flag" type="boolean">
+</parameter>
+</method>
+<method name="setDatabasePath"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="databasePath" type="java.lang.String">
+</parameter>
+</method>
+<method name="setDefaultFixedFontSize"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="size" type="int">
+</parameter>
+</method>
+<method name="setDefaultFontSize"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="size" type="int">
+</parameter>
+</method>
+<method name="setDefaultTextEncodingName"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="encoding" type="java.lang.String">
+</parameter>
+</method>
+<method name="setDefaultZoom"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="zoom" type="android.webkit.WebSettings.ZoomDensity">
+</parameter>
+</method>
+<method name="setDomStorageEnabled"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="flag" type="boolean">
+</parameter>
+</method>
+<method name="setFantasyFontFamily"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="font" type="java.lang.String">
+</parameter>
+</method>
+<method name="setFixedFontFamily"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="font" type="java.lang.String">
+</parameter>
+</method>
+<method name="setGeolocationDatabasePath"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="databasePath" type="java.lang.String">
+</parameter>
+</method>
+<method name="setGeolocationEnabled"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="flag" type="boolean">
+</parameter>
+</method>
+<method name="setJavaScriptCanOpenWindowsAutomatically"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="flag" type="boolean">
+</parameter>
+</method>
+<method name="setJavaScriptEnabled"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="flag" type="boolean">
+</parameter>
+</method>
+<method name="setLayoutAlgorithm"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="l" type="android.webkit.WebSettings.LayoutAlgorithm">
+</parameter>
+</method>
+<method name="setLightTouchEnabled"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="enabled" type="boolean">
+</parameter>
+</method>
+<method name="setLoadWithOverviewMode"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="overview" type="boolean">
+</parameter>
+</method>
+<method name="setLoadsImagesAutomatically"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="flag" type="boolean">
+</parameter>
+</method>
+<method name="setMinimumFontSize"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="size" type="int">
+</parameter>
+</method>
+<method name="setMinimumLogicalFontSize"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="size" type="int">
+</parameter>
+</method>
+<method name="setNavDump"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="enabled" type="boolean">
+</parameter>
+</method>
+<method name="setNeedInitialFocus"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="flag" type="boolean">
+</parameter>
+</method>
+<method name="setPluginState"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="state" type="android.webkit.WebSettings.PluginState">
+</parameter>
+</method>
+<method name="setPluginsEnabled"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="true"
+ static="false"
+ final="false"
+ deprecated="deprecated"
+ visibility="public"
+>
+<parameter name="flag" type="boolean">
+</parameter>
+</method>
+<method name="setPluginsPath"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="pluginsPath" type="java.lang.String">
+</parameter>
+</method>
+<method name="setRenderPriority"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="priority" type="android.webkit.WebSettings.RenderPriority">
+</parameter>
+</method>
+<method name="setSansSerifFontFamily"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="font" type="java.lang.String">
+</parameter>
+</method>
+<method name="setSaveFormData"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="save" type="boolean">
+</parameter>
+</method>
+<method name="setSavePassword"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="save" type="boolean">
+</parameter>
+</method>
+<method name="setSerifFontFamily"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="font" type="java.lang.String">
+</parameter>
+</method>
+<method name="setStandardFontFamily"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="font" type="java.lang.String">
+</parameter>
+</method>
+<method name="setSupportMultipleWindows"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="support" type="boolean">
+</parameter>
+</method>
+<method name="setSupportZoom"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="support" type="boolean">
+</parameter>
+</method>
+<method name="setTextSize"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="t" type="android.webkit.WebSettings.TextSize">
+</parameter>
+</method>
+<method name="setUseDoubleTree"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="true"
+ static="false"
+ final="false"
+ deprecated="deprecated"
+ visibility="public"
+>
+<parameter name="use" type="boolean">
+</parameter>
+</method>
+<method name="setUseWideViewPort"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="use" type="boolean">
+</parameter>
+</method>
+<method name="setUserAgent"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="true"
+ static="false"
+ final="false"
+ deprecated="deprecated"
+ visibility="public"
+>
+<parameter name="ua" type="int">
+</parameter>
+</method>
+<method name="setUserAgentString"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="ua" type="java.lang.String">
+</parameter>
+</method>
+<method name="supportMultipleWindows"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="supportZoom"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<field name="LOAD_CACHE_ELSE_NETWORK"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="LOAD_CACHE_ONLY"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="3"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="LOAD_DEFAULT"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="-1"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="LOAD_NORMAL"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="0"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="LOAD_NO_CACHE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<class name="WebSettings.LayoutAlgorithm"
+ extends="java.lang.Enum"
+ abstract="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="valueOf"
+ return="android.webkit.WebSettings.LayoutAlgorithm"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+</method>
+<method name="values"
+ return="android.webkit.WebSettings.LayoutAlgorithm[]"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+</class>
+<class name="WebSettings.PluginState"
+ extends="java.lang.Enum"
+ abstract="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="valueOf"
+ return="android.webkit.WebSettings.PluginState"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+</method>
+<method name="values"
+ return="android.webkit.WebSettings.PluginState[]"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+</class>
+<class name="WebSettings.RenderPriority"
+ extends="java.lang.Enum"
+ abstract="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="valueOf"
+ return="android.webkit.WebSettings.RenderPriority"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+</method>
+<method name="values"
+ return="android.webkit.WebSettings.RenderPriority[]"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+</class>
+<class name="WebSettings.TextSize"
+ extends="java.lang.Enum"
+ abstract="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="valueOf"
+ return="android.webkit.WebSettings.TextSize"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+</method>
+<method name="values"
+ return="android.webkit.WebSettings.TextSize[]"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+</class>
+<class name="WebSettings.ZoomDensity"
+ extends="java.lang.Enum"
+ abstract="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="valueOf"
+ return="android.webkit.WebSettings.ZoomDensity"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+</method>
+<method name="values"
+ return="android.webkit.WebSettings.ZoomDensity[]"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+</class>
+<class name="WebStorage"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="WebStorage"
+ type="android.webkit.WebStorage"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<method name="deleteAllData"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="deleteOrigin"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="origin" type="java.lang.String">
+</parameter>
+</method>
+<method name="getInstance"
+ return="android.webkit.WebStorage"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getOrigins"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="callback" type="android.webkit.ValueCallback&lt;java.util.Map&gt;">
+</parameter>
+</method>
+<method name="getQuotaForOrigin"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="origin" type="java.lang.String">
+</parameter>
+<parameter name="callback" type="android.webkit.ValueCallback&lt;java.lang.Long&gt;">
+</parameter>
+</method>
+<method name="getUsageForOrigin"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="origin" type="java.lang.String">
+</parameter>
+<parameter name="callback" type="android.webkit.ValueCallback&lt;java.lang.Long&gt;">
+</parameter>
+</method>
+<method name="setQuotaForOrigin"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="origin" type="java.lang.String">
+</parameter>
+<parameter name="quota" type="long">
+</parameter>
+</method>
+</class>
+<interface name="WebStorage.QuotaUpdater"
+ abstract="true"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="updateQuota"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="newQuota" type="long">
+</parameter>
+</method>
+</interface>
+<class name="WebSyncManager"
+ extends="java.lang.Object"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility=""
+>
+<implements name="java.lang.Runnable">
+</implements>
+<constructor name="WebSyncManager"
+ type="android.webkit.WebSyncManager"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="context" type="android.content.Context">
+</parameter>
+<parameter name="name" type="java.lang.String">
+</parameter>
+</constructor>
+<method name="onSyncInit"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</method>
+<method name="resetSync"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="run"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="startSync"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="stopSync"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="sync"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<field name="LOGTAG"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;websync&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</field>
+<field name="mDataBase"
+ type="android.webkit.WebViewDatabase"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</field>
+<field name="mHandler"
+ type="android.os.Handler"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</field>
+</class>
+<class name="WebView"
+ extends="android.widget.AbsoluteLayout"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="android.view.ViewGroup.OnHierarchyChangeListener">
+</implements>
+<implements name="android.view.ViewTreeObserver.OnGlobalFocusChangeListener">
+</implements>
+<constructor name="WebView"
+ type="android.webkit.WebView"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="context" type="android.content.Context">
+</parameter>
+</constructor>
+<constructor name="WebView"
+ type="android.webkit.WebView"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="context" type="android.content.Context">
+</parameter>
+<parameter name="attrs" type="android.util.AttributeSet">
+</parameter>
+</constructor>
+<constructor name="WebView"
+ type="android.webkit.WebView"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="context" type="android.content.Context">
+</parameter>
+<parameter name="attrs" type="android.util.AttributeSet">
+</parameter>
+<parameter name="defStyle" type="int">
+</parameter>
+</constructor>
+<method name="addJavascriptInterface"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="obj" type="java.lang.Object">
+</parameter>
+<parameter name="interfaceName" type="java.lang.String">
+</parameter>
+</method>
+<method name="canGoBack"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="canGoBackOrForward"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="steps" type="int">
+</parameter>
+</method>
+<method name="canGoForward"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="capturePicture"
+ return="android.graphics.Picture"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="clearCache"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="includeDiskFiles" type="boolean">
+</parameter>
+</method>
+<method name="clearFormData"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="clearHistory"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="clearMatches"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="clearSslPreferences"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="clearView"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="copyBackForwardList"
+ return="android.webkit.WebBackForwardList"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="debugDump"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="destroy"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="disablePlatformNotifications"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="documentHasImages"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="response" type="android.os.Message">
+</parameter>
+</method>
+<method name="emulateShiftHeld"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="enablePlatformNotifications"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="findAddress"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="addr" type="java.lang.String">
+</parameter>
+</method>
+<method name="findAll"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="find" type="java.lang.String">
+</parameter>
+</method>
+<method name="findNext"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="forward" type="boolean">
+</parameter>
+</method>
+<method name="flingScroll"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="vx" type="int">
+</parameter>
+<parameter name="vy" type="int">
+</parameter>
+</method>
+<method name="freeMemory"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getCertificate"
+ return="android.net.http.SslCertificate"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getContentHeight"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getFavicon"
+ return="android.graphics.Bitmap"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getHitTestResult"
+ return="android.webkit.WebView.HitTestResult"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getHttpAuthUsernamePassword"
+ return="java.lang.String[]"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="host" type="java.lang.String">
+</parameter>
+<parameter name="realm" type="java.lang.String">
+</parameter>
+</method>
+<method name="getOriginalUrl"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getPluginList"
+ return="android.webkit.PluginList"
+ abstract="false"
+ native="false"
+ synchronized="true"
+ static="true"
+ final="false"
+ deprecated="deprecated"
+ visibility="public"
+>
+</method>
+<method name="getProgress"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getScale"
+ return="float"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getSettings"
+ return="android.webkit.WebSettings"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getTitle"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getUrl"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getZoomControls"
+ return="android.view.View"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="deprecated"
+ visibility="public"
+>
+</method>
+<method name="goBack"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="goBackOrForward"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="steps" type="int">
+</parameter>
+</method>
+<method name="goForward"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="invokeZoomPicker"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="loadData"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="data" type="java.lang.String">
+</parameter>
+<parameter name="mimeType" type="java.lang.String">
+</parameter>
+<parameter name="encoding" type="java.lang.String">
+</parameter>
+</method>
+<method name="loadDataWithBaseURL"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="baseUrl" type="java.lang.String">
+</parameter>
+<parameter name="data" type="java.lang.String">
+</parameter>
+<parameter name="mimeType" type="java.lang.String">
+</parameter>
+<parameter name="encoding" type="java.lang.String">
+</parameter>
+<parameter name="historyUrl" type="java.lang.String">
+</parameter>
+</method>
+<method name="loadUrl"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="url" type="java.lang.String">
+</parameter>
+<parameter name="extraHeaders" type="java.util.Map&lt;java.lang.String, java.lang.String&gt;">
+</parameter>
+</method>
+<method name="loadUrl"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="url" type="java.lang.String">
+</parameter>
+</method>
+<method name="onChildViewAdded"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="deprecated"
+ visibility="public"
+>
+<parameter name="parent" type="android.view.View">
+</parameter>
+<parameter name="child" type="android.view.View">
+</parameter>
+</method>
+<method name="onChildViewRemoved"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="deprecated"
+ visibility="public"
+>
+<parameter name="p" type="android.view.View">
+</parameter>
+<parameter name="child" type="android.view.View">
+</parameter>
+</method>
+<method name="onGlobalFocusChanged"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="deprecated"
+ visibility="public"
+>
+<parameter name="oldFocus" type="android.view.View">
+</parameter>
+<parameter name="newFocus" type="android.view.View">
+</parameter>
+</method>
+<method name="overlayHorizontalScrollbar"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="overlayVerticalScrollbar"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="pageDown"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="bottom" type="boolean">
+</parameter>
+</method>
+<method name="pageUp"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="top" type="boolean">
+</parameter>
+</method>
+<method name="pauseTimers"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="postUrl"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="url" type="java.lang.String">
+</parameter>
+<parameter name="postData" type="byte[]">
+</parameter>
+</method>
+<method name="refreshPlugins"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="deprecated"
+ visibility="public"
+>
+<parameter name="reloadOpenPages" type="boolean">
+</parameter>
+</method>
+<method name="reload"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="requestFocusNodeHref"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="hrefMsg" type="android.os.Message">
+</parameter>
+</method>
+<method name="requestImageRef"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="msg" type="android.os.Message">
+</parameter>
+</method>
+<method name="restorePicture"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="b" type="android.os.Bundle">
+</parameter>
+<parameter name="src" type="java.io.File">
+</parameter>
+</method>
+<method name="restoreState"
+ return="android.webkit.WebBackForwardList"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="inState" type="android.os.Bundle">
+</parameter>
+</method>
+<method name="resumeTimers"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="savePassword"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="host" type="java.lang.String">
+</parameter>
+<parameter name="username" type="java.lang.String">
+</parameter>
+<parameter name="password" type="java.lang.String">
+</parameter>
+</method>
+<method name="savePicture"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="b" type="android.os.Bundle">
+</parameter>
+<parameter name="dest" type="java.io.File">
+</parameter>
+</method>
+<method name="saveState"
+ return="android.webkit.WebBackForwardList"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="outState" type="android.os.Bundle">
+</parameter>
+</method>
+<method name="setCertificate"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="certificate" type="android.net.http.SslCertificate">
+</parameter>
+</method>
+<method name="setDownloadListener"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="listener" type="android.webkit.DownloadListener">
+</parameter>
+</method>
+<method name="setHorizontalScrollbarOverlay"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="overlay" type="boolean">
+</parameter>
+</method>
+<method name="setHttpAuthUsernamePassword"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="host" type="java.lang.String">
+</parameter>
+<parameter name="realm" type="java.lang.String">
+</parameter>
+<parameter name="username" type="java.lang.String">
+</parameter>
+<parameter name="password" type="java.lang.String">
+</parameter>
+</method>
+<method name="setInitialScale"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="scaleInPercent" type="int">
+</parameter>
+</method>
+<method name="setMapTrackballToArrowKeys"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="setMap" type="boolean">
+</parameter>
+</method>
+<method name="setNetworkAvailable"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="networkUp" type="boolean">
+</parameter>
+</method>
+<method name="setPictureListener"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="listener" type="android.webkit.WebView.PictureListener">
+</parameter>
+</method>
+<method name="setVerticalScrollbarOverlay"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="overlay" type="boolean">
+</parameter>
+</method>
+<method name="setWebChromeClient"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="client" type="android.webkit.WebChromeClient">
+</parameter>
+</method>
+<method name="setWebViewClient"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="client" type="android.webkit.WebViewClient">
+</parameter>
+</method>
+<method name="stopLoading"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="zoomIn"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="zoomOut"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<field name="SCHEME_GEO"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;geo:0,0?q=&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="SCHEME_MAILTO"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;mailto:&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="SCHEME_TEL"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;tel:&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<class name="WebView.HitTestResult"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="getExtra"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getType"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<field name="ANCHOR_TYPE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="EDIT_TEXT_TYPE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="9"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="EMAIL_TYPE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="4"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GEO_TYPE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="3"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="IMAGE_ANCHOR_TYPE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="6"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="IMAGE_TYPE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="5"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="PHONE_TYPE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="SRC_ANCHOR_TYPE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="7"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="SRC_IMAGE_ANCHOR_TYPE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="8"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="UNKNOWN_TYPE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="0"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<interface name="WebView.PictureListener"
+ abstract="true"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="onNewPicture"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="view" type="android.webkit.WebView">
+</parameter>
+<parameter name="picture" type="android.graphics.Picture">
+</parameter>
+</method>
+</interface>
+<class name="WebView.WebViewTransport"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="WebView.WebViewTransport"
+ type="android.webkit.WebView.WebViewTransport"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<method name="getWebView"
+ return="android.webkit.WebView"
+ abstract="false"
+ native="false"
+ synchronized="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="setWebView"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="webview" type="android.webkit.WebView">
+</parameter>
+</method>
+</class>
+<class name="WebViewClient"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="WebViewClient"
+ type="android.webkit.WebViewClient"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<method name="doUpdateVisitedHistory"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="view" type="android.webkit.WebView">
+</parameter>
+<parameter name="url" type="java.lang.String">
+</parameter>
+<parameter name="isReload" type="boolean">
+</parameter>
+</method>
+<method name="onFormResubmission"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="view" type="android.webkit.WebView">
+</parameter>
+<parameter name="dontResend" type="android.os.Message">
+</parameter>
+<parameter name="resend" type="android.os.Message">
+</parameter>
+</method>
+<method name="onLoadResource"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="view" type="android.webkit.WebView">
+</parameter>
+<parameter name="url" type="java.lang.String">
+</parameter>
+</method>
+<method name="onPageFinished"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="view" type="android.webkit.WebView">
+</parameter>
+<parameter name="url" type="java.lang.String">
+</parameter>
+</method>
+<method name="onPageStarted"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="view" type="android.webkit.WebView">
+</parameter>
+<parameter name="url" type="java.lang.String">
+</parameter>
+<parameter name="favicon" type="android.graphics.Bitmap">
+</parameter>
+</method>
+<method name="onReceivedError"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="view" type="android.webkit.WebView">
+</parameter>
+<parameter name="errorCode" type="int">
+</parameter>
+<parameter name="description" type="java.lang.String">
+</parameter>
+<parameter name="failingUrl" type="java.lang.String">
+</parameter>
+</method>
+<method name="onReceivedHttpAuthRequest"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="view" type="android.webkit.WebView">
+</parameter>
+<parameter name="handler" type="android.webkit.HttpAuthHandler">
+</parameter>
+<parameter name="host" type="java.lang.String">
+</parameter>
+<parameter name="realm" type="java.lang.String">
+</parameter>
+</method>
+<method name="onReceivedSslError"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="view" type="android.webkit.WebView">
+</parameter>
+<parameter name="handler" type="android.webkit.SslErrorHandler">
+</parameter>
+<parameter name="error" type="android.net.http.SslError">
+</parameter>
+</method>
+<method name="onScaleChanged"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="view" type="android.webkit.WebView">
+</parameter>
+<parameter name="oldScale" type="float">
+</parameter>
+<parameter name="newScale" type="float">
+</parameter>
+</method>
+<method name="onTooManyRedirects"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="deprecated"
+ visibility="public"
+>
+<parameter name="view" type="android.webkit.WebView">
+</parameter>
+<parameter name="cancelMsg" type="android.os.Message">
+</parameter>
+<parameter name="continueMsg" type="android.os.Message">
+</parameter>
+</method>
+<method name="onUnhandledKeyEvent"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="view" type="android.webkit.WebView">
+</parameter>
+<parameter name="event" type="android.view.KeyEvent">
+</parameter>
+</method>
+<method name="shouldOverrideKeyEvent"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="view" type="android.webkit.WebView">
+</parameter>
+<parameter name="event" type="android.view.KeyEvent">
+</parameter>
+</method>
+<method name="shouldOverrideUrlLoading"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="view" type="android.webkit.WebView">
+</parameter>
+<parameter name="url" type="java.lang.String">
+</parameter>
+</method>
+<field name="ERROR_AUTHENTICATION"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="-4"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ERROR_BAD_URL"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="-12"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ERROR_CONNECT"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="-6"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ERROR_FAILED_SSL_HANDSHAKE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="-11"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ERROR_FILE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="-13"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ERROR_FILE_NOT_FOUND"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="-14"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ERROR_HOST_LOOKUP"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="-2"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ERROR_IO"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="-7"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ERROR_PROXY_AUTHENTICATION"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="-5"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ERROR_REDIRECT_LOOP"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="-9"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ERROR_TIMEOUT"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="-8"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ERROR_TOO_MANY_REQUESTS"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="-15"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ERROR_UNKNOWN"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="-1"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ERROR_UNSUPPORTED_AUTH_SCHEME"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="-3"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ERROR_UNSUPPORTED_SCHEME"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="-10"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<class name="WebViewDatabase"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="clearFormData"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="clearHttpAuthUsernamePassword"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="clearUsernamePassword"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getInstance"
+ return="android.webkit.WebViewDatabase"
+ abstract="false"
+ native="false"
+ synchronized="true"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="context" type="android.content.Context">
+</parameter>
+</method>
+<method name="hasFormData"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="hasHttpAuthUsernamePassword"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="hasUsernamePassword"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<field name="LOGTAG"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;webviewdatabase&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</field>
+</class>
+</package>
+<package name="android.widget"
+>
+<class name="AbsListView"
+ extends="android.widget.AdapterView"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="android.widget.Filter.FilterListener">
+</implements>
+<implements name="android.text.TextWatcher">
+</implements>
+<implements name="android.view.ViewTreeObserver.OnGlobalLayoutListener">
+</implements>
+<implements name="android.view.ViewTreeObserver.OnTouchModeChangeListener">
+</implements>
+<constructor name="AbsListView"
+ type="android.widget.AbsListView"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="context" type="android.content.Context">
+</parameter>
+</constructor>
+<constructor name="AbsListView"
+ type="android.widget.AbsListView"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="context" type="android.content.Context">
+</parameter>
+<parameter name="attrs" type="android.util.AttributeSet">
+</parameter>
+</constructor>
+<constructor name="AbsListView"
+ type="android.widget.AbsListView"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="context" type="android.content.Context">
+</parameter>
+<parameter name="attrs" type="android.util.AttributeSet">
+</parameter>
+<parameter name="defStyle" type="int">
+</parameter>
+</constructor>
+<method name="afterTextChanged"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="s" type="android.text.Editable">
+</parameter>
+</method>
+<method name="beforeTextChanged"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="s" type="java.lang.CharSequence">
+</parameter>
+<parameter name="start" type="int">
+</parameter>
+<parameter name="count" type="int">
+</parameter>
+<parameter name="after" type="int">
+</parameter>
+</method>
+<method name="clearTextFilter"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getCacheColorHint"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getListPaddingBottom"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getListPaddingLeft"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getListPaddingRight"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getListPaddingTop"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getSelectedView"
+ return="android.view.View"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getSelector"
+ return="android.graphics.drawable.Drawable"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getTextFilter"
+ return="java.lang.CharSequence"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getTranscriptMode"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="handleDataChanged"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</method>
+<method name="hasTextFilter"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="invalidateViews"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isFastScrollEnabled"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isInFilterMode"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</method>
+<method name="isScrollingCacheEnabled"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isSmoothScrollbarEnabled"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isStackFromBottom"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isTextFilterEnabled"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="layoutChildren"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</method>
+<method name="onFilterComplete"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="count" type="int">
+</parameter>
+</method>
+<method name="onGlobalLayout"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="onRestoreInstanceState"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="state" type="android.os.Parcelable">
+</parameter>
+</method>
+<method name="onSaveInstanceState"
+ return="android.os.Parcelable"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="onTextChanged"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="s" type="java.lang.CharSequence">
+</parameter>
+<parameter name="start" type="int">
+</parameter>
+<parameter name="before" type="int">
+</parameter>
+<parameter name="count" type="int">
+</parameter>
+</method>
+<method name="onTouchModeChanged"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="isInTouchMode" type="boolean">
+</parameter>
+</method>
+<method name="pointToPosition"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="x" type="int">
+</parameter>
+<parameter name="y" type="int">
+</parameter>
+</method>
+<method name="pointToRowId"
+ return="long"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="x" type="int">
+</parameter>
+<parameter name="y" type="int">
+</parameter>
+</method>
+<method name="reclaimViews"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="views" type="java.util.List&lt;android.view.View&gt;">
+</parameter>
+</method>
+<method name="setCacheColorHint"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="color" type="int">
+</parameter>
+</method>
+<method name="setDrawSelectorOnTop"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="onTop" type="boolean">
+</parameter>
+</method>
+<method name="setFastScrollEnabled"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="enabled" type="boolean">
+</parameter>
+</method>
+<method name="setFilterText"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="filterText" type="java.lang.String">
+</parameter>
+</method>
+<method name="setOnScrollListener"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="l" type="android.widget.AbsListView.OnScrollListener">
+</parameter>
+</method>
+<method name="setRecyclerListener"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="listener" type="android.widget.AbsListView.RecyclerListener">
+</parameter>
+</method>
+<method name="setScrollIndicators"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="up" type="android.view.View">
+</parameter>
+<parameter name="down" type="android.view.View">
+</parameter>
+</method>
+<method name="setScrollingCacheEnabled"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="enabled" type="boolean">
+</parameter>
+</method>
+<method name="setSelector"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="resID" type="int">
+</parameter>
+</method>
+<method name="setSelector"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="sel" type="android.graphics.drawable.Drawable">
+</parameter>
+</method>
+<method name="setSmoothScrollbarEnabled"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="enabled" type="boolean">
+</parameter>
+</method>
+<method name="setStackFromBottom"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="stackFromBottom" type="boolean">
+</parameter>
+</method>
+<method name="setTextFilterEnabled"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="textFilterEnabled" type="boolean">
+</parameter>
+</method>
+<method name="setTranscriptMode"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="mode" type="int">
+</parameter>
+</method>
+<method name="smoothScrollBy"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="distance" type="int">
+</parameter>
+<parameter name="duration" type="int">
+</parameter>
+</method>
+<method name="smoothScrollToPosition"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="position" type="int">
+</parameter>
+</method>
+<method name="smoothScrollToPosition"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="position" type="int">
+</parameter>
+<parameter name="boundPosition" type="int">
+</parameter>
+</method>
+<method name="verifyDrawable"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="dr" type="android.graphics.drawable.Drawable">
+</parameter>
+</method>
+<field name="TRANSCRIPT_MODE_ALWAYS_SCROLL"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TRANSCRIPT_MODE_DISABLED"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="0"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TRANSCRIPT_MODE_NORMAL"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<class name="AbsListView.LayoutParams"
+ extends="android.view.ViewGroup.LayoutParams"
+ abstract="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="AbsListView.LayoutParams"
+ type="android.widget.AbsListView.LayoutParams"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="c" type="android.content.Context">
+</parameter>
+<parameter name="attrs" type="android.util.AttributeSet">
+</parameter>
+</constructor>
+<constructor name="AbsListView.LayoutParams"
+ type="android.widget.AbsListView.LayoutParams"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="w" type="int">
+</parameter>
+<parameter name="h" type="int">
+</parameter>
+</constructor>
+<constructor name="AbsListView.LayoutParams"
+ type="android.widget.AbsListView.LayoutParams"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="w" type="int">
+</parameter>
+<parameter name="h" type="int">
+</parameter>
+<parameter name="viewType" type="int">
+</parameter>
+</constructor>
+<constructor name="AbsListView.LayoutParams"
+ type="android.widget.AbsListView.LayoutParams"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="source" type="android.view.ViewGroup.LayoutParams">
+</parameter>
+</constructor>
+</class>
+<interface name="AbsListView.OnScrollListener"
+ abstract="true"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="onScroll"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="view" type="android.widget.AbsListView">
+</parameter>
+<parameter name="firstVisibleItem" type="int">
+</parameter>
+<parameter name="visibleItemCount" type="int">
+</parameter>
+<parameter name="totalItemCount" type="int">
+</parameter>
+</method>
+<method name="onScrollStateChanged"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="view" type="android.widget.AbsListView">
+</parameter>
+<parameter name="scrollState" type="int">
+</parameter>
+</method>
+<field name="SCROLL_STATE_FLING"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="SCROLL_STATE_IDLE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="0"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="SCROLL_STATE_TOUCH_SCROLL"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</interface>
+<interface name="AbsListView.RecyclerListener"
+ abstract="true"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="onMovedToScrapHeap"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="view" type="android.view.View">
+</parameter>
+</method>
+</interface>
+<class name="AbsSeekBar"
+ extends="android.widget.ProgressBar"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="AbsSeekBar"
+ type="android.widget.AbsSeekBar"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="context" type="android.content.Context">
+</parameter>
+</constructor>
+<constructor name="AbsSeekBar"
+ type="android.widget.AbsSeekBar"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="context" type="android.content.Context">
+</parameter>
+<parameter name="attrs" type="android.util.AttributeSet">
+</parameter>
+</constructor>
+<constructor name="AbsSeekBar"
+ type="android.widget.AbsSeekBar"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="context" type="android.content.Context">
+</parameter>
+<parameter name="attrs" type="android.util.AttributeSet">
+</parameter>
+<parameter name="defStyle" type="int">
+</parameter>
+</constructor>
+<method name="getKeyProgressIncrement"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getThumbOffset"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="setKeyProgressIncrement"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="increment" type="int">
+</parameter>
+</method>
+<method name="setThumb"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="thumb" type="android.graphics.drawable.Drawable">
+</parameter>
+</method>
+<method name="setThumbOffset"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="thumbOffset" type="int">
+</parameter>
+</method>
+</class>
+<class name="AbsSpinner"
+ extends="android.widget.AdapterView"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="AbsSpinner"
+ type="android.widget.AbsSpinner"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="context" type="android.content.Context">
+</parameter>
+</constructor>
+<constructor name="AbsSpinner"
+ type="android.widget.AbsSpinner"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="context" type="android.content.Context">
+</parameter>
+<parameter name="attrs" type="android.util.AttributeSet">
+</parameter>
+</constructor>
+<constructor name="AbsSpinner"
+ type="android.widget.AbsSpinner"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="context" type="android.content.Context">
+</parameter>
+<parameter name="attrs" type="android.util.AttributeSet">
+</parameter>
+<parameter name="defStyle" type="int">
+</parameter>
+</constructor>
+<method name="getAdapter"
+ return="android.widget.SpinnerAdapter"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getSelectedView"
+ return="android.view.View"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="onRestoreInstanceState"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="state" type="android.os.Parcelable">
+</parameter>
+</method>
+<method name="onSaveInstanceState"
+ return="android.os.Parcelable"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="pointToPosition"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="x" type="int">
+</parameter>
+<parameter name="y" type="int">
+</parameter>
+</method>
+<method name="setAdapter"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="adapter" type="android.widget.SpinnerAdapter">
+</parameter>
+</method>
+<method name="setSelection"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="position" type="int">
+</parameter>
+<parameter name="animate" type="boolean">
+</parameter>
+</method>
+<method name="setSelection"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="position" type="int">
+</parameter>
+</method>
+</class>
+<class name="AbsoluteLayout"
+ extends="android.view.ViewGroup"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="deprecated"
+ visibility="public"
+>
+<constructor name="AbsoluteLayout"
+ type="android.widget.AbsoluteLayout"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="context" type="android.content.Context">
+</parameter>
+</constructor>
+<constructor name="AbsoluteLayout"
+ type="android.widget.AbsoluteLayout"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="context" type="android.content.Context">
+</parameter>
+<parameter name="attrs" type="android.util.AttributeSet">
+</parameter>
+</constructor>
+<constructor name="AbsoluteLayout"
+ type="android.widget.AbsoluteLayout"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="context" type="android.content.Context">
+</parameter>
+<parameter name="attrs" type="android.util.AttributeSet">
+</parameter>
+<parameter name="defStyle" type="int">
+</parameter>
+</constructor>
+<method name="onLayout"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="changed" type="boolean">
+</parameter>
+<parameter name="l" type="int">
+</parameter>
+<parameter name="t" type="int">
+</parameter>
+<parameter name="r" type="int">
+</parameter>
+<parameter name="b" type="int">
+</parameter>
+</method>
+</class>
+<class name="AbsoluteLayout.LayoutParams"
+ extends="android.view.ViewGroup.LayoutParams"
+ abstract="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="AbsoluteLayout.LayoutParams"
+ type="android.widget.AbsoluteLayout.LayoutParams"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="width" type="int">
+</parameter>
+<parameter name="height" type="int">
+</parameter>
+<parameter name="x" type="int">
+</parameter>
+<parameter name="y" type="int">
+</parameter>
+</constructor>
+<constructor name="AbsoluteLayout.LayoutParams"
+ type="android.widget.AbsoluteLayout.LayoutParams"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="c" type="android.content.Context">
+</parameter>
+<parameter name="attrs" type="android.util.AttributeSet">
+</parameter>
+</constructor>
+<constructor name="AbsoluteLayout.LayoutParams"
+ type="android.widget.AbsoluteLayout.LayoutParams"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="source" type="android.view.ViewGroup.LayoutParams">
+</parameter>
+</constructor>
+<method name="debug"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="output" type="java.lang.String">
+</parameter>
+</method>
+<field name="x"
+ type="int"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="y"
+ type="int"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<interface name="Adapter"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="getCount"
+ return="int"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getItem"
+ return="java.lang.Object"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="position" type="int">
+</parameter>
+</method>
+<method name="getItemId"
+ return="long"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="position" type="int">
+</parameter>
+</method>
+<method name="getItemViewType"
+ return="int"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="position" type="int">
+</parameter>
+</method>
+<method name="getView"
+ return="android.view.View"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="position" type="int">
+</parameter>
+<parameter name="convertView" type="android.view.View">
+</parameter>
+<parameter name="parent" type="android.view.ViewGroup">
+</parameter>
+</method>
+<method name="getViewTypeCount"
+ return="int"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="hasStableIds"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isEmpty"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="registerDataSetObserver"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="observer" type="android.database.DataSetObserver">
+</parameter>
+</method>
+<method name="unregisterDataSetObserver"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="observer" type="android.database.DataSetObserver">
+</parameter>
+</method>
+<field name="IGNORE_ITEM_VIEW_TYPE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="-1"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="NO_SELECTION"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="-2147483648"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</interface>
+<class name="AdapterView"
+ extends="android.view.ViewGroup"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="AdapterView"
+ type="android.widget.AdapterView"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="context" type="android.content.Context">
+</parameter>
+</constructor>
+<constructor name="AdapterView"
+ type="android.widget.AdapterView"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="context" type="android.content.Context">
+</parameter>
+<parameter name="attrs" type="android.util.AttributeSet">
+</parameter>
+</constructor>
+<constructor name="AdapterView"
+ type="android.widget.AdapterView"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="context" type="android.content.Context">
+</parameter>
+<parameter name="attrs" type="android.util.AttributeSet">
+</parameter>
+<parameter name="defStyle" type="int">
+</parameter>
+</constructor>
+<method name="getAdapter"
+ return="T"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getCount"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getEmptyView"
+ return="android.view.View"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getFirstVisiblePosition"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getItemAtPosition"
+ return="java.lang.Object"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="position" type="int">
+</parameter>
+</method>
+<method name="getItemIdAtPosition"
+ return="long"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="position" type="int">
+</parameter>
+</method>
+<method name="getLastVisiblePosition"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getOnItemClickListener"
+ return="android.widget.AdapterView.OnItemClickListener"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getOnItemLongClickListener"
+ return="android.widget.AdapterView.OnItemLongClickListener"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getOnItemSelectedListener"
+ return="android.widget.AdapterView.OnItemSelectedListener"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getPositionForView"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="view" type="android.view.View">
+</parameter>
+</method>
+<method name="getSelectedItem"
+ return="java.lang.Object"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getSelectedItemId"
+ return="long"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getSelectedItemPosition"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getSelectedView"
+ return="android.view.View"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="onLayout"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="changed" type="boolean">
+</parameter>
+<parameter name="left" type="int">
+</parameter>
+<parameter name="top" type="int">
+</parameter>
+<parameter name="right" type="int">
+</parameter>
+<parameter name="bottom" type="int">
+</parameter>
+</method>
+<method name="performItemClick"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="view" type="android.view.View">
+</parameter>
+<parameter name="position" type="int">
+</parameter>
+<parameter name="id" type="long">
+</parameter>
+</method>
+<method name="setAdapter"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="adapter" type="T">
+</parameter>
+</method>
+<method name="setEmptyView"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="emptyView" type="android.view.View">
+</parameter>
+</method>
+<method name="setOnItemClickListener"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="listener" type="android.widget.AdapterView.OnItemClickListener">
+</parameter>
+</method>
+<method name="setOnItemLongClickListener"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="listener" type="android.widget.AdapterView.OnItemLongClickListener">
+</parameter>
+</method>
+<method name="setOnItemSelectedListener"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="listener" type="android.widget.AdapterView.OnItemSelectedListener">
+</parameter>
+</method>
+<method name="setSelection"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="position" type="int">
+</parameter>
+</method>
+<field name="INVALID_POSITION"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="-1"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="INVALID_ROW_ID"
+ type="long"
+ transient="false"
+ volatile="false"
+ value="-9223372036854775808L"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ITEM_VIEW_TYPE_HEADER_OR_FOOTER"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="-2"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ITEM_VIEW_TYPE_IGNORE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="-1"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<class name="AdapterView.AdapterContextMenuInfo"
+ extends="java.lang.Object"
+ abstract="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="android.view.ContextMenu.ContextMenuInfo">
+</implements>
+<constructor name="AdapterView.AdapterContextMenuInfo"
+ type="android.widget.AdapterView.AdapterContextMenuInfo"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="targetView" type="android.view.View">
+</parameter>
+<parameter name="position" type="int">
+</parameter>
+<parameter name="id" type="long">
+</parameter>
+</constructor>
+<field name="id"
+ type="long"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="position"
+ type="int"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="targetView"
+ type="android.view.View"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<interface name="AdapterView.OnItemClickListener"
+ abstract="true"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="onItemClick"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="parent" type="android.widget.AdapterView&lt;?&gt;">
+</parameter>
+<parameter name="view" type="android.view.View">
+</parameter>
+<parameter name="position" type="int">
+</parameter>
+<parameter name="id" type="long">
+</parameter>
+</method>
+</interface>
+<interface name="AdapterView.OnItemLongClickListener"
+ abstract="true"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="onItemLongClick"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="parent" type="android.widget.AdapterView&lt;?&gt;">
+</parameter>
+<parameter name="view" type="android.view.View">
+</parameter>
+<parameter name="position" type="int">
+</parameter>
+<parameter name="id" type="long">
+</parameter>
+</method>
+</interface>
+<interface name="AdapterView.OnItemSelectedListener"
+ abstract="true"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="onItemSelected"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="parent" type="android.widget.AdapterView&lt;?&gt;">
+</parameter>
+<parameter name="view" type="android.view.View">
+</parameter>
+<parameter name="position" type="int">
+</parameter>
+<parameter name="id" type="long">
+</parameter>
+</method>
+<method name="onNothingSelected"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="parent" type="android.widget.AdapterView&lt;?&gt;">
+</parameter>
+</method>
+</interface>
+<class name="AlphabetIndexer"
+ extends="android.database.DataSetObserver"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="android.widget.SectionIndexer">
+</implements>
+<constructor name="AlphabetIndexer"
+ type="android.widget.AlphabetIndexer"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="cursor" type="android.database.Cursor">
+</parameter>
+<parameter name="sortedColumnIndex" type="int">
+</parameter>
+<parameter name="alphabet" type="java.lang.CharSequence">
+</parameter>
+</constructor>
+<method name="compare"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="word" type="java.lang.String">
+</parameter>
+<parameter name="letter" type="java.lang.String">
+</parameter>
+</method>
+<method name="getPositionForSection"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="sectionIndex" type="int">
+</parameter>
+</method>
+<method name="getSectionForPosition"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="position" type="int">
+</parameter>
+</method>
+<method name="getSections"
+ return="java.lang.Object[]"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="setCursor"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="cursor" type="android.database.Cursor">
+</parameter>
+</method>
+<field name="mAlphabet"
+ type="java.lang.CharSequence"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</field>
+<field name="mColumnIndex"
+ type="int"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</field>
+<field name="mDataCursor"
+ type="android.database.Cursor"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</field>
+</class>
+<class name="AnalogClock"
+ extends="android.view.View"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="AnalogClock"
+ type="android.widget.AnalogClock"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="context" type="android.content.Context">
+</parameter>
+</constructor>
+<constructor name="AnalogClock"
+ type="android.widget.AnalogClock"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="context" type="android.content.Context">
+</parameter>
+<parameter name="attrs" type="android.util.AttributeSet">
+</parameter>
+</constructor>
+<constructor name="AnalogClock"
+ type="android.widget.AnalogClock"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="context" type="android.content.Context">
+</parameter>
+<parameter name="attrs" type="android.util.AttributeSet">
+</parameter>
+<parameter name="defStyle" type="int">
+</parameter>
+</constructor>
+</class>
+<class name="ArrayAdapter"
+ extends="android.widget.BaseAdapter"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="android.widget.Filterable">
+</implements>
+<constructor name="ArrayAdapter"
+ type="android.widget.ArrayAdapter"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="context" type="android.content.Context">
+</parameter>
+<parameter name="textViewResourceId" type="int">
+</parameter>
+</constructor>
+<constructor name="ArrayAdapter"
+ type="android.widget.ArrayAdapter"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="context" type="android.content.Context">
+</parameter>
+<parameter name="resource" type="int">
+</parameter>
+<parameter name="textViewResourceId" type="int">
+</parameter>
+</constructor>
+<constructor name="ArrayAdapter"
+ type="android.widget.ArrayAdapter"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="context" type="android.content.Context">
+</parameter>
+<parameter name="textViewResourceId" type="int">
+</parameter>
+<parameter name="objects" type="T[]">
+</parameter>
+</constructor>
+<constructor name="ArrayAdapter"
+ type="android.widget.ArrayAdapter"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="context" type="android.content.Context">
+</parameter>
+<parameter name="resource" type="int">
+</parameter>
+<parameter name="textViewResourceId" type="int">
+</parameter>
+<parameter name="objects" type="T[]">
+</parameter>
+</constructor>
+<constructor name="ArrayAdapter"
+ type="android.widget.ArrayAdapter"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="context" type="android.content.Context">
+</parameter>
+<parameter name="textViewResourceId" type="int">
+</parameter>
+<parameter name="objects" type="java.util.List&lt;T&gt;">
+</parameter>
+</constructor>
+<constructor name="ArrayAdapter"
+ type="android.widget.ArrayAdapter"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="context" type="android.content.Context">
+</parameter>
+<parameter name="resource" type="int">
+</parameter>
+<parameter name="textViewResourceId" type="int">
+</parameter>
+<parameter name="objects" type="java.util.List&lt;T&gt;">
+</parameter>
+</constructor>
+<method name="add"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="object" type="T">
+</parameter>
+</method>
+<method name="clear"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="createFromResource"
+ return="android.widget.ArrayAdapter&lt;java.lang.CharSequence&gt;"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="context" type="android.content.Context">
+</parameter>
+<parameter name="textArrayResId" type="int">
+</parameter>
+<parameter name="textViewResId" type="int">
+</parameter>
+</method>
+<method name="getContext"
+ return="android.content.Context"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getCount"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getFilter"
+ return="android.widget.Filter"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getItem"
+ return="T"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="position" type="int">
+</parameter>
+</method>
+<method name="getItemId"
+ return="long"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="position" type="int">
+</parameter>
+</method>
+<method name="getPosition"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="item" type="T">
+</parameter>
+</method>
+<method name="getView"
+ return="android.view.View"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="position" type="int">
+</parameter>
+<parameter name="convertView" type="android.view.View">
+</parameter>
+<parameter name="parent" type="android.view.ViewGroup">
+</parameter>
+</method>
+<method name="insert"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="object" type="T">
+</parameter>
+<parameter name="index" type="int">
+</parameter>
+</method>
+<method name="remove"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="object" type="T">
+</parameter>
+</method>
+<method name="setDropDownViewResource"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="resource" type="int">
+</parameter>
+</method>
+<method name="setNotifyOnChange"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="notifyOnChange" type="boolean">
+</parameter>
+</method>
+<method name="sort"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="comparator" type="java.util.Comparator&lt;? super T&gt;">
+</parameter>
+</method>
+</class>
+<class name="AutoCompleteTextView"
+ extends="android.widget.EditText"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="android.widget.Filter.FilterListener">
+</implements>
+<constructor name="AutoCompleteTextView"
+ type="android.widget.AutoCompleteTextView"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="context" type="android.content.Context">
+</parameter>
+</constructor>
+<constructor name="AutoCompleteTextView"
+ type="android.widget.AutoCompleteTextView"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="context" type="android.content.Context">
+</parameter>
+<parameter name="attrs" type="android.util.AttributeSet">
+</parameter>
+</constructor>
+<constructor name="AutoCompleteTextView"
+ type="android.widget.AutoCompleteTextView"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="context" type="android.content.Context">
+</parameter>
+<parameter name="attrs" type="android.util.AttributeSet">
+</parameter>
+<parameter name="defStyle" type="int">
+</parameter>
+</constructor>
+<method name="clearListSelection"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="convertSelectionToString"
+ return="java.lang.CharSequence"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="selectedItem" type="java.lang.Object">
+</parameter>
+</method>
+<method name="dismissDropDown"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="enoughToFilter"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getAdapter"
+ return="android.widget.ListAdapter"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getDropDownAnchor"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getDropDownBackground"
+ return="android.graphics.drawable.Drawable"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getDropDownHeight"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getDropDownHorizontalOffset"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getDropDownVerticalOffset"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getDropDownWidth"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getFilter"
+ return="android.widget.Filter"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</method>
+<method name="getItemClickListener"
+ return="android.widget.AdapterView.OnItemClickListener"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="deprecated"
+ visibility="public"
+>
+</method>
+<method name="getItemSelectedListener"
+ return="android.widget.AdapterView.OnItemSelectedListener"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="deprecated"
+ visibility="public"
+>
+</method>
+<method name="getListSelection"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getOnItemClickListener"
+ return="android.widget.AdapterView.OnItemClickListener"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getOnItemSelectedListener"
+ return="android.widget.AdapterView.OnItemSelectedListener"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getThreshold"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getValidator"
+ return="android.widget.AutoCompleteTextView.Validator"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isPerformingCompletion"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isPopupShowing"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="onFilterComplete"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="count" type="int">
+</parameter>
+</method>
+<method name="performCompletion"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="performFiltering"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="text" type="java.lang.CharSequence">
+</parameter>
+<parameter name="keyCode" type="int">
+</parameter>
+</method>
+<method name="performValidation"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="replaceText"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="text" type="java.lang.CharSequence">
+</parameter>
+</method>
+<method name="setAdapter"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="adapter" type="T">
+</parameter>
+</method>
+<method name="setCompletionHint"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="hint" type="java.lang.CharSequence">
+</parameter>
+</method>
+<method name="setDropDownAnchor"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="id" type="int">
+</parameter>
+</method>
+<method name="setDropDownBackgroundDrawable"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="d" type="android.graphics.drawable.Drawable">
+</parameter>
+</method>
+<method name="setDropDownBackgroundResource"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="id" type="int">
+</parameter>
+</method>
+<method name="setDropDownHeight"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="height" type="int">
+</parameter>
+</method>
+<method name="setDropDownHorizontalOffset"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="offset" type="int">
+</parameter>
+</method>
+<method name="setDropDownVerticalOffset"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="offset" type="int">
+</parameter>
+</method>
+<method name="setDropDownWidth"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="width" type="int">
+</parameter>
+</method>
+<method name="setListSelection"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="position" type="int">
+</parameter>
+</method>
+<method name="setOnItemClickListener"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="l" type="android.widget.AdapterView.OnItemClickListener">
+</parameter>
+</method>
+<method name="setOnItemSelectedListener"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="l" type="android.widget.AdapterView.OnItemSelectedListener">
+</parameter>
+</method>
+<method name="setThreshold"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="threshold" type="int">
+</parameter>
+</method>
+<method name="setValidator"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="validator" type="android.widget.AutoCompleteTextView.Validator">
+</parameter>
+</method>
+<method name="showDropDown"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+</class>
+<interface name="AutoCompleteTextView.Validator"
+ abstract="true"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="fixText"
+ return="java.lang.CharSequence"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="invalidText" type="java.lang.CharSequence">
+</parameter>
+</method>
+<method name="isValid"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="text" type="java.lang.CharSequence">
+</parameter>
+</method>
+</interface>
+<class name="BaseAdapter"
+ extends="java.lang.Object"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="android.widget.ListAdapter">
+</implements>
+<implements name="android.widget.SpinnerAdapter">
+</implements>
+<constructor name="BaseAdapter"
+ type="android.widget.BaseAdapter"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<method name="areAllItemsEnabled"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getDropDownView"
+ return="android.view.View"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="position" type="int">
+</parameter>
+<parameter name="convertView" type="android.view.View">
+</parameter>
+<parameter name="parent" type="android.view.ViewGroup">
+</parameter>
+</method>
+<method name="getItemViewType"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="position" type="int">
+</parameter>
+</method>
+<method name="getViewTypeCount"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="hasStableIds"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isEmpty"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isEnabled"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="position" type="int">
+</parameter>
+</method>
+<method name="notifyDataSetChanged"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="notifyDataSetInvalidated"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="registerDataSetObserver"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="observer" type="android.database.DataSetObserver">
+</parameter>
+</method>
+<method name="unregisterDataSetObserver"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="observer" type="android.database.DataSetObserver">
+</parameter>
+</method>
+</class>
+<class name="BaseExpandableListAdapter"
+ extends="java.lang.Object"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="android.widget.ExpandableListAdapter">
+</implements>
+<implements name="android.widget.HeterogeneousExpandableList">
+</implements>
+<constructor name="BaseExpandableListAdapter"
+ type="android.widget.BaseExpandableListAdapter"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<method name="areAllItemsEnabled"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getChildType"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="groupPosition" type="int">
+</parameter>
+<parameter name="childPosition" type="int">
+</parameter>
+</method>
+<method name="getChildTypeCount"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getCombinedChildId"
+ return="long"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="groupId" type="long">
+</parameter>
+<parameter name="childId" type="long">
+</parameter>
+</method>
+<method name="getCombinedGroupId"
+ return="long"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="groupId" type="long">
+</parameter>
+</method>
+<method name="getGroupType"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="groupPosition" type="int">
+</parameter>
+</method>
+<method name="getGroupTypeCount"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isEmpty"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="notifyDataSetChanged"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="notifyDataSetInvalidated"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="onGroupCollapsed"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="groupPosition" type="int">
+</parameter>
+</method>
+<method name="onGroupExpanded"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="groupPosition" type="int">
+</parameter>
+</method>
+<method name="registerDataSetObserver"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="observer" type="android.database.DataSetObserver">
+</parameter>
+</method>
+<method name="unregisterDataSetObserver"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="observer" type="android.database.DataSetObserver">
+</parameter>
+</method>
+</class>
+<class name="Button"
+ extends="android.widget.TextView"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="Button"
+ type="android.widget.Button"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="context" type="android.content.Context">
+</parameter>
+</constructor>
+<constructor name="Button"
+ type="android.widget.Button"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="context" type="android.content.Context">
+</parameter>
+<parameter name="attrs" type="android.util.AttributeSet">
+</parameter>
+</constructor>
+<constructor name="Button"
+ type="android.widget.Button"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="context" type="android.content.Context">
+</parameter>
+<parameter name="attrs" type="android.util.AttributeSet">
+</parameter>
+<parameter name="defStyle" type="int">
+</parameter>
+</constructor>
+</class>
+<class name="CheckBox"
+ extends="android.widget.CompoundButton"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="CheckBox"
+ type="android.widget.CheckBox"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="context" type="android.content.Context">
+</parameter>
+</constructor>
+<constructor name="CheckBox"
+ type="android.widget.CheckBox"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="context" type="android.content.Context">
+</parameter>
+<parameter name="attrs" type="android.util.AttributeSet">
+</parameter>
+</constructor>
+<constructor name="CheckBox"
+ type="android.widget.CheckBox"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="context" type="android.content.Context">
+</parameter>
+<parameter name="attrs" type="android.util.AttributeSet">
+</parameter>
+<parameter name="defStyle" type="int">
+</parameter>
+</constructor>
+</class>
+<interface name="Checkable"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="isChecked"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="setChecked"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="checked" type="boolean">
+</parameter>
+</method>
+<method name="toggle"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+</interface>
+<class name="CheckedTextView"
+ extends="android.widget.TextView"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="android.widget.Checkable">
+</implements>
+<constructor name="CheckedTextView"
+ type="android.widget.CheckedTextView"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="context" type="android.content.Context">
+</parameter>
+</constructor>
+<constructor name="CheckedTextView"
+ type="android.widget.CheckedTextView"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="context" type="android.content.Context">
+</parameter>
+<parameter name="attrs" type="android.util.AttributeSet">
+</parameter>
+</constructor>
+<constructor name="CheckedTextView"
+ type="android.widget.CheckedTextView"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="context" type="android.content.Context">
+</parameter>
+<parameter name="attrs" type="android.util.AttributeSet">
+</parameter>
+<parameter name="defStyle" type="int">
+</parameter>
+</constructor>
+<method name="isChecked"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="setCheckMarkDrawable"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="resid" type="int">
+</parameter>
+</method>
+<method name="setCheckMarkDrawable"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="d" type="android.graphics.drawable.Drawable">
+</parameter>
+</method>
+<method name="setChecked"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="checked" type="boolean">
+</parameter>
+</method>
+<method name="toggle"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+</class>
+<class name="Chronometer"
+ extends="android.widget.TextView"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="Chronometer"
+ type="android.widget.Chronometer"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="context" type="android.content.Context">
+</parameter>
+</constructor>
+<constructor name="Chronometer"
+ type="android.widget.Chronometer"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="context" type="android.content.Context">
+</parameter>
+<parameter name="attrs" type="android.util.AttributeSet">
+</parameter>
+</constructor>
+<constructor name="Chronometer"
+ type="android.widget.Chronometer"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="context" type="android.content.Context">
+</parameter>
+<parameter name="attrs" type="android.util.AttributeSet">
+</parameter>
+<parameter name="defStyle" type="int">
+</parameter>
+</constructor>
+<method name="getBase"
+ return="long"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getFormat"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getOnChronometerTickListener"
+ return="android.widget.Chronometer.OnChronometerTickListener"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="setBase"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="base" type="long">
+</parameter>
+</method>
+<method name="setFormat"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="format" type="java.lang.String">
+</parameter>
+</method>
+<method name="setOnChronometerTickListener"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="listener" type="android.widget.Chronometer.OnChronometerTickListener">
+</parameter>
+</method>
+<method name="start"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="stop"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+</class>
+<interface name="Chronometer.OnChronometerTickListener"
+ abstract="true"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="onChronometerTick"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="chronometer" type="android.widget.Chronometer">
+</parameter>
+</method>
+</interface>
+<class name="CompoundButton"
+ extends="android.widget.Button"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="android.widget.Checkable">
+</implements>
+<constructor name="CompoundButton"
+ type="android.widget.CompoundButton"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="context" type="android.content.Context">
+</parameter>
+</constructor>
+<constructor name="CompoundButton"
+ type="android.widget.CompoundButton"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="context" type="android.content.Context">
+</parameter>
+<parameter name="attrs" type="android.util.AttributeSet">
+</parameter>
+</constructor>
+<constructor name="CompoundButton"
+ type="android.widget.CompoundButton"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="context" type="android.content.Context">
+</parameter>
+<parameter name="attrs" type="android.util.AttributeSet">
+</parameter>
+<parameter name="defStyle" type="int">
+</parameter>
+</constructor>
+<method name="isChecked"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="setButtonDrawable"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="resid" type="int">
+</parameter>
+</method>
+<method name="setButtonDrawable"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="d" type="android.graphics.drawable.Drawable">
+</parameter>
+</method>
+<method name="setChecked"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="checked" type="boolean">
+</parameter>
+</method>
+<method name="setOnCheckedChangeListener"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="listener" type="android.widget.CompoundButton.OnCheckedChangeListener">
+</parameter>
+</method>
+<method name="toggle"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+</class>
+<interface name="CompoundButton.OnCheckedChangeListener"
+ abstract="true"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="onCheckedChanged"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="buttonView" type="android.widget.CompoundButton">
+</parameter>
+<parameter name="isChecked" type="boolean">
+</parameter>
+</method>
+</interface>
+<class name="CursorAdapter"
+ extends="android.widget.BaseAdapter"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="android.widget.Filterable">
+</implements>
+<constructor name="CursorAdapter"
+ type="android.widget.CursorAdapter"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="context" type="android.content.Context">
+</parameter>
+<parameter name="c" type="android.database.Cursor">
+</parameter>
+</constructor>
+<constructor name="CursorAdapter"
+ type="android.widget.CursorAdapter"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="context" type="android.content.Context">
+</parameter>
+<parameter name="c" type="android.database.Cursor">
+</parameter>
+<parameter name="autoRequery" type="boolean">
+</parameter>
+</constructor>
+<method name="bindView"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="view" type="android.view.View">
+</parameter>
+<parameter name="context" type="android.content.Context">
+</parameter>
+<parameter name="cursor" type="android.database.Cursor">
+</parameter>
+</method>
+<method name="changeCursor"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="cursor" type="android.database.Cursor">
+</parameter>
+</method>
+<method name="convertToString"
+ return="java.lang.CharSequence"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="cursor" type="android.database.Cursor">
+</parameter>
+</method>
+<method name="getCount"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getCursor"
+ return="android.database.Cursor"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getFilter"
+ return="android.widget.Filter"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getFilterQueryProvider"
+ return="android.widget.FilterQueryProvider"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getItem"
+ return="java.lang.Object"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="position" type="int">
+</parameter>
+</method>
+<method name="getItemId"
+ return="long"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="position" type="int">
+</parameter>
+</method>
+<method name="getView"
+ return="android.view.View"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="position" type="int">
+</parameter>
+<parameter name="convertView" type="android.view.View">
+</parameter>
+<parameter name="parent" type="android.view.ViewGroup">
+</parameter>
+</method>
+<method name="init"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="context" type="android.content.Context">
+</parameter>
+<parameter name="c" type="android.database.Cursor">
+</parameter>
+<parameter name="autoRequery" type="boolean">
+</parameter>
+</method>
+<method name="newDropDownView"
+ return="android.view.View"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="context" type="android.content.Context">
+</parameter>
+<parameter name="cursor" type="android.database.Cursor">
+</parameter>
+<parameter name="parent" type="android.view.ViewGroup">
+</parameter>
+</method>
+<method name="newView"
+ return="android.view.View"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="context" type="android.content.Context">
+</parameter>
+<parameter name="cursor" type="android.database.Cursor">
+</parameter>
+<parameter name="parent" type="android.view.ViewGroup">
+</parameter>
+</method>
+<method name="onContentChanged"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</method>
+<method name="runQueryOnBackgroundThread"
+ return="android.database.Cursor"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="constraint" type="java.lang.CharSequence">
+</parameter>
+</method>
+<method name="setFilterQueryProvider"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="filterQueryProvider" type="android.widget.FilterQueryProvider">
+</parameter>
+</method>
+</class>
+<class name="CursorTreeAdapter"
+ extends="android.widget.BaseExpandableListAdapter"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="android.widget.Filterable">
+</implements>
+<constructor name="CursorTreeAdapter"
+ type="android.widget.CursorTreeAdapter"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="cursor" type="android.database.Cursor">
+</parameter>
+<parameter name="context" type="android.content.Context">
+</parameter>
+</constructor>
+<constructor name="CursorTreeAdapter"
+ type="android.widget.CursorTreeAdapter"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="cursor" type="android.database.Cursor">
+</parameter>
+<parameter name="context" type="android.content.Context">
+</parameter>
+<parameter name="autoRequery" type="boolean">
+</parameter>
+</constructor>
+<method name="bindChildView"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="view" type="android.view.View">
+</parameter>
+<parameter name="context" type="android.content.Context">
+</parameter>
+<parameter name="cursor" type="android.database.Cursor">
+</parameter>
+<parameter name="isLastChild" type="boolean">
+</parameter>
+</method>
+<method name="bindGroupView"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="view" type="android.view.View">
+</parameter>
+<parameter name="context" type="android.content.Context">
+</parameter>
+<parameter name="cursor" type="android.database.Cursor">
+</parameter>
+<parameter name="isExpanded" type="boolean">
+</parameter>
+</method>
+<method name="changeCursor"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="cursor" type="android.database.Cursor">
+</parameter>
+</method>
+<method name="convertToString"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="cursor" type="android.database.Cursor">
+</parameter>
+</method>
+<method name="getChild"
+ return="android.database.Cursor"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="groupPosition" type="int">
+</parameter>
+<parameter name="childPosition" type="int">
+</parameter>
+</method>
+<method name="getChildId"
+ return="long"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="groupPosition" type="int">
+</parameter>
+<parameter name="childPosition" type="int">
+</parameter>
+</method>
+<method name="getChildView"
+ return="android.view.View"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="groupPosition" type="int">
+</parameter>
+<parameter name="childPosition" type="int">
+</parameter>
+<parameter name="isLastChild" type="boolean">
+</parameter>
+<parameter name="convertView" type="android.view.View">
+</parameter>
+<parameter name="parent" type="android.view.ViewGroup">
+</parameter>
+</method>
+<method name="getChildrenCount"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="groupPosition" type="int">
+</parameter>
+</method>
+<method name="getChildrenCursor"
+ return="android.database.Cursor"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="groupCursor" type="android.database.Cursor">
+</parameter>
+</method>
+<method name="getCursor"
+ return="android.database.Cursor"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getFilter"
+ return="android.widget.Filter"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getFilterQueryProvider"
+ return="android.widget.FilterQueryProvider"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getGroup"
+ return="android.database.Cursor"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="groupPosition" type="int">
+</parameter>
+</method>
+<method name="getGroupCount"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getGroupId"
+ return="long"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="groupPosition" type="int">
+</parameter>
+</method>
+<method name="getGroupView"
+ return="android.view.View"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="groupPosition" type="int">
+</parameter>
+<parameter name="isExpanded" type="boolean">
+</parameter>
+<parameter name="convertView" type="android.view.View">
+</parameter>
+<parameter name="parent" type="android.view.ViewGroup">
+</parameter>
+</method>
+<method name="hasStableIds"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isChildSelectable"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="groupPosition" type="int">
+</parameter>
+<parameter name="childPosition" type="int">
+</parameter>
+</method>
+<method name="newChildView"
+ return="android.view.View"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="context" type="android.content.Context">
+</parameter>
+<parameter name="cursor" type="android.database.Cursor">
+</parameter>
+<parameter name="isLastChild" type="boolean">
+</parameter>
+<parameter name="parent" type="android.view.ViewGroup">
+</parameter>
+</method>
+<method name="newGroupView"
+ return="android.view.View"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="context" type="android.content.Context">
+</parameter>
+<parameter name="cursor" type="android.database.Cursor">
+</parameter>
+<parameter name="isExpanded" type="boolean">
+</parameter>
+<parameter name="parent" type="android.view.ViewGroup">
+</parameter>
+</method>
+<method name="notifyDataSetChanged"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="releaseCursors" type="boolean">
+</parameter>
+</method>
+<method name="runQueryOnBackgroundThread"
+ return="android.database.Cursor"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="constraint" type="java.lang.CharSequence">
+</parameter>
+</method>
+<method name="setChildrenCursor"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="groupPosition" type="int">
+</parameter>
+<parameter name="childrenCursor" type="android.database.Cursor">
+</parameter>
+</method>
+<method name="setFilterQueryProvider"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="filterQueryProvider" type="android.widget.FilterQueryProvider">
+</parameter>
+</method>
+<method name="setGroupCursor"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="cursor" type="android.database.Cursor">
+</parameter>
+</method>
+</class>
+<class name="DatePicker"
+ extends="android.widget.FrameLayout"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="DatePicker"
+ type="android.widget.DatePicker"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="context" type="android.content.Context">
+</parameter>
+</constructor>
+<constructor name="DatePicker"
+ type="android.widget.DatePicker"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="context" type="android.content.Context">
+</parameter>
+<parameter name="attrs" type="android.util.AttributeSet">
+</parameter>
+</constructor>
+<constructor name="DatePicker"
+ type="android.widget.DatePicker"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="context" type="android.content.Context">
+</parameter>
+<parameter name="attrs" type="android.util.AttributeSet">
+</parameter>
+<parameter name="defStyle" type="int">
+</parameter>
+</constructor>
+<method name="getDayOfMonth"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getMonth"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getYear"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="init"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="year" type="int">
+</parameter>
+<parameter name="monthOfYear" type="int">
+</parameter>
+<parameter name="dayOfMonth" type="int">
+</parameter>
+<parameter name="onDateChangedListener" type="android.widget.DatePicker.OnDateChangedListener">
+</parameter>
+</method>
+<method name="updateDate"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="year" type="int">
+</parameter>
+<parameter name="monthOfYear" type="int">
+</parameter>
+<parameter name="dayOfMonth" type="int">
+</parameter>
+</method>
+</class>
+<interface name="DatePicker.OnDateChangedListener"
+ abstract="true"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="onDateChanged"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="view" type="android.widget.DatePicker">
+</parameter>
+<parameter name="year" type="int">
+</parameter>
+<parameter name="monthOfYear" type="int">
+</parameter>
+<parameter name="dayOfMonth" type="int">
+</parameter>
+</method>
+</interface>
+<class name="DialerFilter"
+ extends="android.widget.RelativeLayout"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="DialerFilter"
+ type="android.widget.DialerFilter"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="context" type="android.content.Context">
+</parameter>
+</constructor>
+<constructor name="DialerFilter"
+ type="android.widget.DialerFilter"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="context" type="android.content.Context">
+</parameter>
+<parameter name="attrs" type="android.util.AttributeSet">
+</parameter>
+</constructor>
+<method name="append"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="text" type="java.lang.String">
+</parameter>
+</method>
+<method name="clearText"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getDigits"
+ return="java.lang.CharSequence"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getFilterText"
+ return="java.lang.CharSequence"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getLetters"
+ return="java.lang.CharSequence"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getMode"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isQwertyKeyboard"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="onModeChange"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="oldMode" type="int">
+</parameter>
+<parameter name="newMode" type="int">
+</parameter>
+</method>
+<method name="removeFilterWatcher"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="watcher" type="android.text.TextWatcher">
+</parameter>
+</method>
+<method name="setDigitsWatcher"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="watcher" type="android.text.TextWatcher">
+</parameter>
+</method>
+<method name="setFilterWatcher"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="watcher" type="android.text.TextWatcher">
+</parameter>
+</method>
+<method name="setLettersWatcher"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="watcher" type="android.text.TextWatcher">
+</parameter>
+</method>
+<method name="setMode"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="newMode" type="int">
+</parameter>
+</method>
+<field name="DIGITS_AND_LETTERS"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="DIGITS_AND_LETTERS_NO_DIGITS"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="DIGITS_AND_LETTERS_NO_LETTERS"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="3"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="DIGITS_ONLY"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="4"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="LETTERS_ONLY"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="5"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<class name="DigitalClock"
+ extends="android.widget.TextView"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="DigitalClock"
+ type="android.widget.DigitalClock"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="context" type="android.content.Context">
+</parameter>
+</constructor>
+<constructor name="DigitalClock"
+ type="android.widget.DigitalClock"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="context" type="android.content.Context">
+</parameter>
+<parameter name="attrs" type="android.util.AttributeSet">
+</parameter>
+</constructor>
+</class>
+<class name="EditText"
+ extends="android.widget.TextView"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="EditText"
+ type="android.widget.EditText"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="context" type="android.content.Context">
+</parameter>
+</constructor>
+<constructor name="EditText"
+ type="android.widget.EditText"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="context" type="android.content.Context">
+</parameter>
+<parameter name="attrs" type="android.util.AttributeSet">
+</parameter>
+</constructor>
+<constructor name="EditText"
+ type="android.widget.EditText"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="context" type="android.content.Context">
+</parameter>
+<parameter name="attrs" type="android.util.AttributeSet">
+</parameter>
+<parameter name="defStyle" type="int">
+</parameter>
+</constructor>
+<method name="extendSelection"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="index" type="int">
+</parameter>
+</method>
+<method name="selectAll"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="setSelection"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="start" type="int">
+</parameter>
+<parameter name="stop" type="int">
+</parameter>
+</method>
+<method name="setSelection"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="index" type="int">
+</parameter>
+</method>
+</class>
+<interface name="ExpandableListAdapter"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="areAllItemsEnabled"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getChild"
+ return="java.lang.Object"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="groupPosition" type="int">
+</parameter>
+<parameter name="childPosition" type="int">
+</parameter>
+</method>
+<method name="getChildId"
+ return="long"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="groupPosition" type="int">
+</parameter>
+<parameter name="childPosition" type="int">
+</parameter>
+</method>
+<method name="getChildView"
+ return="android.view.View"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="groupPosition" type="int">
+</parameter>
+<parameter name="childPosition" type="int">
+</parameter>
+<parameter name="isLastChild" type="boolean">
+</parameter>
+<parameter name="convertView" type="android.view.View">
+</parameter>
+<parameter name="parent" type="android.view.ViewGroup">
+</parameter>
+</method>
+<method name="getChildrenCount"
+ return="int"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="groupPosition" type="int">
+</parameter>
+</method>
+<method name="getCombinedChildId"
+ return="long"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="groupId" type="long">
+</parameter>
+<parameter name="childId" type="long">
+</parameter>
+</method>
+<method name="getCombinedGroupId"
+ return="long"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="groupId" type="long">
+</parameter>
+</method>
+<method name="getGroup"
+ return="java.lang.Object"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="groupPosition" type="int">
+</parameter>
+</method>
+<method name="getGroupCount"
+ return="int"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getGroupId"
+ return="long"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="groupPosition" type="int">
+</parameter>
+</method>
+<method name="getGroupView"
+ return="android.view.View"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="groupPosition" type="int">
+</parameter>
+<parameter name="isExpanded" type="boolean">
+</parameter>
+<parameter name="convertView" type="android.view.View">
+</parameter>
+<parameter name="parent" type="android.view.ViewGroup">
+</parameter>
+</method>
+<method name="hasStableIds"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isChildSelectable"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="groupPosition" type="int">
+</parameter>
+<parameter name="childPosition" type="int">
+</parameter>
+</method>
+<method name="isEmpty"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="onGroupCollapsed"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="groupPosition" type="int">
+</parameter>
+</method>
+<method name="onGroupExpanded"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="groupPosition" type="int">
+</parameter>
+</method>
+<method name="registerDataSetObserver"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="observer" type="android.database.DataSetObserver">
+</parameter>
+</method>
+<method name="unregisterDataSetObserver"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="observer" type="android.database.DataSetObserver">
+</parameter>
+</method>
+</interface>
+<class name="ExpandableListView"
+ extends="android.widget.ListView"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="ExpandableListView"
+ type="android.widget.ExpandableListView"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="context" type="android.content.Context">
+</parameter>
+</constructor>
+<constructor name="ExpandableListView"
+ type="android.widget.ExpandableListView"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="context" type="android.content.Context">
+</parameter>
+<parameter name="attrs" type="android.util.AttributeSet">
+</parameter>
+</constructor>
+<constructor name="ExpandableListView"
+ type="android.widget.ExpandableListView"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="context" type="android.content.Context">
+</parameter>
+<parameter name="attrs" type="android.util.AttributeSet">
+</parameter>
+<parameter name="defStyle" type="int">
+</parameter>
+</constructor>
+<method name="collapseGroup"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="groupPos" type="int">
+</parameter>
+</method>
+<method name="expandGroup"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="groupPos" type="int">
+</parameter>
+</method>
+<method name="getExpandableListAdapter"
+ return="android.widget.ExpandableListAdapter"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getExpandableListPosition"
+ return="long"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="flatListPosition" type="int">
+</parameter>
+</method>
+<method name="getFlatListPosition"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="packedPosition" type="long">
+</parameter>
+</method>
+<method name="getPackedPositionChild"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="packedPosition" type="long">
+</parameter>
+</method>
+<method name="getPackedPositionForChild"
+ return="long"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="groupPosition" type="int">
+</parameter>
+<parameter name="childPosition" type="int">
+</parameter>
+</method>
+<method name="getPackedPositionForGroup"
+ return="long"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="groupPosition" type="int">
+</parameter>
+</method>
+<method name="getPackedPositionGroup"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="packedPosition" type="long">
+</parameter>
+</method>
+<method name="getPackedPositionType"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="packedPosition" type="long">
+</parameter>
+</method>
+<method name="getSelectedId"
+ return="long"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getSelectedPosition"
+ return="long"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isGroupExpanded"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="groupPosition" type="int">
+</parameter>
+</method>
+<method name="setAdapter"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="adapter" type="android.widget.ExpandableListAdapter">
+</parameter>
+</method>
+<method name="setChildDivider"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="childDivider" type="android.graphics.drawable.Drawable">
+</parameter>
+</method>
+<method name="setChildIndicator"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="childIndicator" type="android.graphics.drawable.Drawable">
+</parameter>
+</method>
+<method name="setChildIndicatorBounds"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="left" type="int">
+</parameter>
+<parameter name="right" type="int">
+</parameter>
+</method>
+<method name="setGroupIndicator"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="groupIndicator" type="android.graphics.drawable.Drawable">
+</parameter>
+</method>
+<method name="setIndicatorBounds"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="left" type="int">
+</parameter>
+<parameter name="right" type="int">
+</parameter>
+</method>
+<method name="setOnChildClickListener"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="onChildClickListener" type="android.widget.ExpandableListView.OnChildClickListener">
+</parameter>
+</method>
+<method name="setOnGroupClickListener"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="onGroupClickListener" type="android.widget.ExpandableListView.OnGroupClickListener">
+</parameter>
+</method>
+<method name="setOnGroupCollapseListener"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="onGroupCollapseListener" type="android.widget.ExpandableListView.OnGroupCollapseListener">
+</parameter>
+</method>
+<method name="setOnGroupExpandListener"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="onGroupExpandListener" type="android.widget.ExpandableListView.OnGroupExpandListener">
+</parameter>
+</method>
+<method name="setSelectedChild"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="groupPosition" type="int">
+</parameter>
+<parameter name="childPosition" type="int">
+</parameter>
+<parameter name="shouldExpandGroup" type="boolean">
+</parameter>
+</method>
+<method name="setSelectedGroup"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="groupPosition" type="int">
+</parameter>
+</method>
+<field name="CHILD_INDICATOR_INHERIT"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="-1"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="PACKED_POSITION_TYPE_CHILD"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="PACKED_POSITION_TYPE_GROUP"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="0"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="PACKED_POSITION_TYPE_NULL"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="PACKED_POSITION_VALUE_NULL"
+ type="long"
+ transient="false"
+ volatile="false"
+ value="4294967295L"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<class name="ExpandableListView.ExpandableListContextMenuInfo"
+ extends="java.lang.Object"
+ abstract="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="android.view.ContextMenu.ContextMenuInfo">
+</implements>
+<constructor name="ExpandableListView.ExpandableListContextMenuInfo"
+ type="android.widget.ExpandableListView.ExpandableListContextMenuInfo"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="targetView" type="android.view.View">
+</parameter>
+<parameter name="packedPosition" type="long">
+</parameter>
+<parameter name="id" type="long">
+</parameter>
+</constructor>
+<field name="id"
+ type="long"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="packedPosition"
+ type="long"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="targetView"
+ type="android.view.View"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<interface name="ExpandableListView.OnChildClickListener"
+ abstract="true"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="onChildClick"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="parent" type="android.widget.ExpandableListView">
+</parameter>
+<parameter name="v" type="android.view.View">
+</parameter>
+<parameter name="groupPosition" type="int">
+</parameter>
+<parameter name="childPosition" type="int">
+</parameter>
+<parameter name="id" type="long">
+</parameter>
+</method>
+</interface>
+<interface name="ExpandableListView.OnGroupClickListener"
+ abstract="true"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="onGroupClick"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="parent" type="android.widget.ExpandableListView">
+</parameter>
+<parameter name="v" type="android.view.View">
+</parameter>
+<parameter name="groupPosition" type="int">
+</parameter>
+<parameter name="id" type="long">
+</parameter>
+</method>
+</interface>
+<interface name="ExpandableListView.OnGroupCollapseListener"
+ abstract="true"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="onGroupCollapse"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="groupPosition" type="int">
+</parameter>
+</method>
+</interface>
+<interface name="ExpandableListView.OnGroupExpandListener"
+ abstract="true"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="onGroupExpand"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="groupPosition" type="int">
+</parameter>
+</method>
+</interface>
+<class name="Filter"
+ extends="java.lang.Object"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="Filter"
+ type="android.widget.Filter"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<method name="convertResultToString"
+ return="java.lang.CharSequence"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="resultValue" type="java.lang.Object">
+</parameter>
+</method>
+<method name="filter"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="constraint" type="java.lang.CharSequence">
+</parameter>
+</method>
+<method name="filter"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="constraint" type="java.lang.CharSequence">
+</parameter>
+<parameter name="listener" type="android.widget.Filter.FilterListener">
+</parameter>
+</method>
+<method name="performFiltering"
+ return="android.widget.Filter.FilterResults"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="constraint" type="java.lang.CharSequence">
+</parameter>
+</method>
+<method name="publishResults"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="constraint" type="java.lang.CharSequence">
+</parameter>
+<parameter name="results" type="android.widget.Filter.FilterResults">
+</parameter>
+</method>
+</class>
+<interface name="Filter.FilterListener"
+ abstract="true"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="onFilterComplete"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="count" type="int">
+</parameter>
+</method>
+</interface>
+<class name="Filter.FilterResults"
+ extends="java.lang.Object"
+ abstract="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<constructor name="Filter.FilterResults"
+ type="android.widget.Filter.FilterResults"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<field name="count"
+ type="int"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="values"
+ type="java.lang.Object"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<interface name="FilterQueryProvider"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="runQuery"
+ return="android.database.Cursor"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="constraint" type="java.lang.CharSequence">
+</parameter>
+</method>
+</interface>
+<interface name="Filterable"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="getFilter"
+ return="android.widget.Filter"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+</interface>
+<class name="FrameLayout"
+ extends="android.view.ViewGroup"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="FrameLayout"
+ type="android.widget.FrameLayout"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="context" type="android.content.Context">
+</parameter>
+</constructor>
+<constructor name="FrameLayout"
+ type="android.widget.FrameLayout"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="context" type="android.content.Context">
+</parameter>
+<parameter name="attrs" type="android.util.AttributeSet">
+</parameter>
+</constructor>
+<constructor name="FrameLayout"
+ type="android.widget.FrameLayout"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="context" type="android.content.Context">
+</parameter>
+<parameter name="attrs" type="android.util.AttributeSet">
+</parameter>
+<parameter name="defStyle" type="int">
+</parameter>
+</constructor>
+<method name="getConsiderGoneChildrenWhenMeasuring"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getForeground"
+ return="android.graphics.drawable.Drawable"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="onLayout"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="changed" type="boolean">
+</parameter>
+<parameter name="left" type="int">
+</parameter>
+<parameter name="top" type="int">
+</parameter>
+<parameter name="right" type="int">
+</parameter>
+<parameter name="bottom" type="int">
+</parameter>
+</method>
+<method name="setForeground"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="drawable" type="android.graphics.drawable.Drawable">
+</parameter>
+</method>
+<method name="setForegroundGravity"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="foregroundGravity" type="int">
+</parameter>
+</method>
+<method name="setMeasureAllChildren"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="measureAll" type="boolean">
+</parameter>
+</method>
+</class>
+<class name="FrameLayout.LayoutParams"
+ extends="android.view.ViewGroup.MarginLayoutParams"
+ abstract="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="FrameLayout.LayoutParams"
+ type="android.widget.FrameLayout.LayoutParams"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="c" type="android.content.Context">
+</parameter>
+<parameter name="attrs" type="android.util.AttributeSet">
+</parameter>
+</constructor>
+<constructor name="FrameLayout.LayoutParams"
+ type="android.widget.FrameLayout.LayoutParams"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="width" type="int">
+</parameter>
+<parameter name="height" type="int">
+</parameter>
+</constructor>
+<constructor name="FrameLayout.LayoutParams"
+ type="android.widget.FrameLayout.LayoutParams"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="width" type="int">
+</parameter>
+<parameter name="height" type="int">
+</parameter>
+<parameter name="gravity" type="int">
+</parameter>
+</constructor>
+<constructor name="FrameLayout.LayoutParams"
+ type="android.widget.FrameLayout.LayoutParams"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="source" type="android.view.ViewGroup.LayoutParams">
+</parameter>
+</constructor>
+<constructor name="FrameLayout.LayoutParams"
+ type="android.widget.FrameLayout.LayoutParams"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="source" type="android.view.ViewGroup.MarginLayoutParams">
+</parameter>
+</constructor>
+<field name="gravity"
+ type="int"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<class name="Gallery"
+ extends="android.widget.AbsSpinner"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="android.view.GestureDetector.OnGestureListener">
+</implements>
+<constructor name="Gallery"
+ type="android.widget.Gallery"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="context" type="android.content.Context">
+</parameter>
+</constructor>
+<constructor name="Gallery"
+ type="android.widget.Gallery"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="context" type="android.content.Context">
+</parameter>
+<parameter name="attrs" type="android.util.AttributeSet">
+</parameter>
+</constructor>
+<constructor name="Gallery"
+ type="android.widget.Gallery"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="context" type="android.content.Context">
+</parameter>
+<parameter name="attrs" type="android.util.AttributeSet">
+</parameter>
+<parameter name="defStyle" type="int">
+</parameter>
+</constructor>
+<method name="onDown"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="e" type="android.view.MotionEvent">
+</parameter>
+</method>
+<method name="onFling"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="e1" type="android.view.MotionEvent">
+</parameter>
+<parameter name="e2" type="android.view.MotionEvent">
+</parameter>
+<parameter name="velocityX" type="float">
+</parameter>
+<parameter name="velocityY" type="float">
+</parameter>
+</method>
+<method name="onLongPress"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="e" type="android.view.MotionEvent">
+</parameter>
+</method>
+<method name="onScroll"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="e1" type="android.view.MotionEvent">
+</parameter>
+<parameter name="e2" type="android.view.MotionEvent">
+</parameter>
+<parameter name="distanceX" type="float">
+</parameter>
+<parameter name="distanceY" type="float">
+</parameter>
+</method>
+<method name="onShowPress"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="e" type="android.view.MotionEvent">
+</parameter>
+</method>
+<method name="onSingleTapUp"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="e" type="android.view.MotionEvent">
+</parameter>
+</method>
+<method name="setAnimationDuration"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="animationDurationMillis" type="int">
+</parameter>
+</method>
+<method name="setCallbackDuringFling"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="shouldCallback" type="boolean">
+</parameter>
+</method>
+<method name="setGravity"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="gravity" type="int">
+</parameter>
+</method>
+<method name="setSpacing"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="spacing" type="int">
+</parameter>
+</method>
+<method name="setUnselectedAlpha"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="unselectedAlpha" type="float">
+</parameter>
+</method>
+</class>
+<class name="Gallery.LayoutParams"
+ extends="android.view.ViewGroup.LayoutParams"
+ abstract="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="Gallery.LayoutParams"
+ type="android.widget.Gallery.LayoutParams"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="c" type="android.content.Context">
+</parameter>
+<parameter name="attrs" type="android.util.AttributeSet">
+</parameter>
+</constructor>
+<constructor name="Gallery.LayoutParams"
+ type="android.widget.Gallery.LayoutParams"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="w" type="int">
+</parameter>
+<parameter name="h" type="int">
+</parameter>
+</constructor>
+<constructor name="Gallery.LayoutParams"
+ type="android.widget.Gallery.LayoutParams"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="source" type="android.view.ViewGroup.LayoutParams">
+</parameter>
+</constructor>
+</class>
+<class name="GridView"
+ extends="android.widget.AbsListView"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="GridView"
+ type="android.widget.GridView"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="context" type="android.content.Context">
+</parameter>
+</constructor>
+<constructor name="GridView"
+ type="android.widget.GridView"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="context" type="android.content.Context">
+</parameter>
+<parameter name="attrs" type="android.util.AttributeSet">
+</parameter>
+</constructor>
+<constructor name="GridView"
+ type="android.widget.GridView"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="context" type="android.content.Context">
+</parameter>
+<parameter name="attrs" type="android.util.AttributeSet">
+</parameter>
+<parameter name="defStyle" type="int">
+</parameter>
+</constructor>
+<method name="getAdapter"
+ return="android.widget.ListAdapter"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getStretchMode"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="setAdapter"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="adapter" type="android.widget.ListAdapter">
+</parameter>
+</method>
+<method name="setColumnWidth"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="columnWidth" type="int">
+</parameter>
+</method>
+<method name="setGravity"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="gravity" type="int">
+</parameter>
+</method>
+<method name="setHorizontalSpacing"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="horizontalSpacing" type="int">
+</parameter>
+</method>
+<method name="setNumColumns"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="numColumns" type="int">
+</parameter>
+</method>
+<method name="setSelection"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="position" type="int">
+</parameter>
+</method>
+<method name="setStretchMode"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="stretchMode" type="int">
+</parameter>
+</method>
+<method name="setVerticalSpacing"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="verticalSpacing" type="int">
+</parameter>
+</method>
+<field name="AUTO_FIT"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="-1"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="NO_STRETCH"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="0"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="STRETCH_COLUMN_WIDTH"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="STRETCH_SPACING"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="STRETCH_SPACING_UNIFORM"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="3"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<class name="HeaderViewListAdapter"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="android.widget.Filterable">
+</implements>
+<implements name="android.widget.WrapperListAdapter">
+</implements>
+<constructor name="HeaderViewListAdapter"
+ type="android.widget.HeaderViewListAdapter"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="headerViewInfos" type="java.util.ArrayList&lt;android.widget.ListView.FixedViewInfo&gt;">
+</parameter>
+<parameter name="footerViewInfos" type="java.util.ArrayList&lt;android.widget.ListView.FixedViewInfo&gt;">
+</parameter>
+<parameter name="adapter" type="android.widget.ListAdapter">
+</parameter>
+</constructor>
+<method name="areAllItemsEnabled"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getCount"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getFilter"
+ return="android.widget.Filter"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getFootersCount"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getHeadersCount"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getItem"
+ return="java.lang.Object"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="position" type="int">
+</parameter>
+</method>
+<method name="getItemId"
+ return="long"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="position" type="int">
+</parameter>
+</method>
+<method name="getItemViewType"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="position" type="int">
+</parameter>
+</method>
+<method name="getView"
+ return="android.view.View"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="position" type="int">
+</parameter>
+<parameter name="convertView" type="android.view.View">
+</parameter>
+<parameter name="parent" type="android.view.ViewGroup">
+</parameter>
+</method>
+<method name="getViewTypeCount"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getWrappedAdapter"
+ return="android.widget.ListAdapter"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="hasStableIds"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isEmpty"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isEnabled"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="position" type="int">
+</parameter>
+</method>
+<method name="registerDataSetObserver"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="observer" type="android.database.DataSetObserver">
+</parameter>
+</method>
+<method name="removeFooter"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="v" type="android.view.View">
+</parameter>
+</method>
+<method name="removeHeader"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="v" type="android.view.View">
+</parameter>
+</method>
+<method name="unregisterDataSetObserver"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="observer" type="android.database.DataSetObserver">
+</parameter>
+</method>
+</class>
+<interface name="HeterogeneousExpandableList"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="getChildType"
+ return="int"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="groupPosition" type="int">
+</parameter>
+<parameter name="childPosition" type="int">
+</parameter>
+</method>
+<method name="getChildTypeCount"
+ return="int"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getGroupType"
+ return="int"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="groupPosition" type="int">
+</parameter>
+</method>
+<method name="getGroupTypeCount"
+ return="int"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+</interface>
+<class name="HorizontalScrollView"
+ extends="android.widget.FrameLayout"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="HorizontalScrollView"
+ type="android.widget.HorizontalScrollView"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="context" type="android.content.Context">
+</parameter>
+</constructor>
+<constructor name="HorizontalScrollView"
+ type="android.widget.HorizontalScrollView"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="context" type="android.content.Context">
+</parameter>
+<parameter name="attrs" type="android.util.AttributeSet">
+</parameter>
+</constructor>
+<constructor name="HorizontalScrollView"
+ type="android.widget.HorizontalScrollView"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="context" type="android.content.Context">
+</parameter>
+<parameter name="attrs" type="android.util.AttributeSet">
+</parameter>
+<parameter name="defStyle" type="int">
+</parameter>
+</constructor>
+<method name="arrowScroll"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="direction" type="int">
+</parameter>
+</method>
+<method name="computeScrollDeltaToGetChildRectOnScreen"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="rect" type="android.graphics.Rect">
+</parameter>
+</method>
+<method name="executeKeyEvent"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="event" type="android.view.KeyEvent">
+</parameter>
+</method>
+<method name="fling"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="velocityX" type="int">
+</parameter>
+</method>
+<method name="fullScroll"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="direction" type="int">
+</parameter>
+</method>
+<method name="getMaxScrollAmount"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isFillViewport"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isSmoothScrollingEnabled"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="pageScroll"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="direction" type="int">
+</parameter>
+</method>
+<method name="setFillViewport"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="fillViewport" type="boolean">
+</parameter>
+</method>
+<method name="setSmoothScrollingEnabled"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="smoothScrollingEnabled" type="boolean">
+</parameter>
+</method>
+<method name="smoothScrollBy"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="dx" type="int">
+</parameter>
+<parameter name="dy" type="int">
+</parameter>
+</method>
+<method name="smoothScrollTo"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="x" type="int">
+</parameter>
+<parameter name="y" type="int">
+</parameter>
+</method>
+</class>
+<class name="ImageButton"
+ extends="android.widget.ImageView"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="ImageButton"
+ type="android.widget.ImageButton"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="context" type="android.content.Context">
+</parameter>
+</constructor>
+<constructor name="ImageButton"
+ type="android.widget.ImageButton"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="context" type="android.content.Context">
+</parameter>
+<parameter name="attrs" type="android.util.AttributeSet">
+</parameter>
+</constructor>
+<constructor name="ImageButton"
+ type="android.widget.ImageButton"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="context" type="android.content.Context">
+</parameter>
+<parameter name="attrs" type="android.util.AttributeSet">
+</parameter>
+<parameter name="defStyle" type="int">
+</parameter>
+</constructor>
+</class>
+<class name="ImageSwitcher"
+ extends="android.widget.ViewSwitcher"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="ImageSwitcher"
+ type="android.widget.ImageSwitcher"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="context" type="android.content.Context">
+</parameter>
+</constructor>
+<constructor name="ImageSwitcher"
+ type="android.widget.ImageSwitcher"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="context" type="android.content.Context">
+</parameter>
+<parameter name="attrs" type="android.util.AttributeSet">
+</parameter>
+</constructor>
+<method name="setImageDrawable"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="drawable" type="android.graphics.drawable.Drawable">
+</parameter>
+</method>
+<method name="setImageResource"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="resid" type="int">
+</parameter>
+</method>
+<method name="setImageURI"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="uri" type="android.net.Uri">
+</parameter>
+</method>
+</class>
+<class name="ImageView"
+ extends="android.view.View"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="ImageView"
+ type="android.widget.ImageView"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="context" type="android.content.Context">
+</parameter>
+</constructor>
+<constructor name="ImageView"
+ type="android.widget.ImageView"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="context" type="android.content.Context">
+</parameter>
+<parameter name="attrs" type="android.util.AttributeSet">
+</parameter>
+</constructor>
+<constructor name="ImageView"
+ type="android.widget.ImageView"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="context" type="android.content.Context">
+</parameter>
+<parameter name="attrs" type="android.util.AttributeSet">
+</parameter>
+<parameter name="defStyle" type="int">
+</parameter>
+</constructor>
+<method name="clearColorFilter"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getDrawable"
+ return="android.graphics.drawable.Drawable"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getImageMatrix"
+ return="android.graphics.Matrix"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getScaleType"
+ return="android.widget.ImageView.ScaleType"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="onCreateDrawableState"
+ return="int[]"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="extraSpace" type="int">
+</parameter>
+</method>
+<method name="setAdjustViewBounds"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="adjustViewBounds" type="boolean">
+</parameter>
+</method>
+<method name="setAlpha"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="alpha" type="int">
+</parameter>
+</method>
+<method name="setColorFilter"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="color" type="int">
+</parameter>
+<parameter name="mode" type="android.graphics.PorterDuff.Mode">
+</parameter>
+</method>
+<method name="setColorFilter"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="color" type="int">
+</parameter>
+</method>
+<method name="setColorFilter"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="cf" type="android.graphics.ColorFilter">
+</parameter>
+</method>
+<method name="setFrame"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="l" type="int">
+</parameter>
+<parameter name="t" type="int">
+</parameter>
+<parameter name="r" type="int">
+</parameter>
+<parameter name="b" type="int">
+</parameter>
+</method>
+<method name="setImageBitmap"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="bm" type="android.graphics.Bitmap">
+</parameter>
+</method>
+<method name="setImageDrawable"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="drawable" type="android.graphics.drawable.Drawable">
+</parameter>
+</method>
+<method name="setImageLevel"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="level" type="int">
+</parameter>
+</method>
+<method name="setImageMatrix"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="matrix" type="android.graphics.Matrix">
+</parameter>
+</method>
+<method name="setImageResource"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="resId" type="int">
+</parameter>
+</method>
+<method name="setImageState"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="state" type="int[]">
+</parameter>
+<parameter name="merge" type="boolean">
+</parameter>
+</method>
+<method name="setImageURI"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="uri" type="android.net.Uri">
+</parameter>
+</method>
+<method name="setMaxHeight"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="maxHeight" type="int">
+</parameter>
+</method>
+<method name="setMaxWidth"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="maxWidth" type="int">
+</parameter>
+</method>
+<method name="setScaleType"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="scaleType" type="android.widget.ImageView.ScaleType">
+</parameter>
+</method>
+</class>
+<class name="ImageView.ScaleType"
+ extends="java.lang.Enum"
+ abstract="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="valueOf"
+ return="android.widget.ImageView.ScaleType"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+</method>
+<method name="values"
+ return="android.widget.ImageView.ScaleType[]"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+</class>
+<class name="LinearLayout"
+ extends="android.view.ViewGroup"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="LinearLayout"
+ type="android.widget.LinearLayout"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="context" type="android.content.Context">
+</parameter>
+</constructor>
+<constructor name="LinearLayout"
+ type="android.widget.LinearLayout"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="context" type="android.content.Context">
+</parameter>
+<parameter name="attrs" type="android.util.AttributeSet">
+</parameter>
+</constructor>
+<method name="getBaselineAlignedChildIndex"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getOrientation"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getWeightSum"
+ return="float"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isBaselineAligned"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="onLayout"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="changed" type="boolean">
+</parameter>
+<parameter name="l" type="int">
+</parameter>
+<parameter name="t" type="int">
+</parameter>
+<parameter name="r" type="int">
+</parameter>
+<parameter name="b" type="int">
+</parameter>
+</method>
+<method name="setBaselineAligned"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="baselineAligned" type="boolean">
+</parameter>
+</method>
+<method name="setBaselineAlignedChildIndex"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="i" type="int">
+</parameter>
+</method>
+<method name="setGravity"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="gravity" type="int">
+</parameter>
+</method>
+<method name="setHorizontalGravity"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="horizontalGravity" type="int">
+</parameter>
+</method>
+<method name="setOrientation"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="orientation" type="int">
+</parameter>
+</method>
+<method name="setVerticalGravity"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="verticalGravity" type="int">
+</parameter>
+</method>
+<method name="setWeightSum"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="weightSum" type="float">
+</parameter>
+</method>
+<field name="HORIZONTAL"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="0"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="VERTICAL"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<class name="LinearLayout.LayoutParams"
+ extends="android.view.ViewGroup.MarginLayoutParams"
+ abstract="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="LinearLayout.LayoutParams"
+ type="android.widget.LinearLayout.LayoutParams"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="c" type="android.content.Context">
+</parameter>
+<parameter name="attrs" type="android.util.AttributeSet">
+</parameter>
+</constructor>
+<constructor name="LinearLayout.LayoutParams"
+ type="android.widget.LinearLayout.LayoutParams"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="width" type="int">
+</parameter>
+<parameter name="height" type="int">
+</parameter>
+</constructor>
+<constructor name="LinearLayout.LayoutParams"
+ type="android.widget.LinearLayout.LayoutParams"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="width" type="int">
+</parameter>
+<parameter name="height" type="int">
+</parameter>
+<parameter name="weight" type="float">
+</parameter>
+</constructor>
+<constructor name="LinearLayout.LayoutParams"
+ type="android.widget.LinearLayout.LayoutParams"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="p" type="android.view.ViewGroup.LayoutParams">
+</parameter>
+</constructor>
+<constructor name="LinearLayout.LayoutParams"
+ type="android.widget.LinearLayout.LayoutParams"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="source" type="android.view.ViewGroup.MarginLayoutParams">
+</parameter>
+</constructor>
+<method name="debug"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="output" type="java.lang.String">
+</parameter>
+</method>
+<field name="gravity"
+ type="int"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="weight"
+ type="float"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<interface name="ListAdapter"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="android.widget.Adapter">
+</implements>
+<method name="areAllItemsEnabled"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isEnabled"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="position" type="int">
+</parameter>
+</method>
+</interface>
+<class name="ListView"
+ extends="android.widget.AbsListView"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="ListView"
+ type="android.widget.ListView"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="context" type="android.content.Context">
+</parameter>
+</constructor>
+<constructor name="ListView"
+ type="android.widget.ListView"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="context" type="android.content.Context">
+</parameter>
+<parameter name="attrs" type="android.util.AttributeSet">
+</parameter>
+</constructor>
+<constructor name="ListView"
+ type="android.widget.ListView"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="context" type="android.content.Context">
+</parameter>
+<parameter name="attrs" type="android.util.AttributeSet">
+</parameter>
+<parameter name="defStyle" type="int">
+</parameter>
+</constructor>
+<method name="addFooterView"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="v" type="android.view.View">
+</parameter>
+<parameter name="data" type="java.lang.Object">
+</parameter>
+<parameter name="isSelectable" type="boolean">
+</parameter>
+</method>
+<method name="addFooterView"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="v" type="android.view.View">
+</parameter>
+</method>
+<method name="addHeaderView"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="v" type="android.view.View">
+</parameter>
+<parameter name="data" type="java.lang.Object">
+</parameter>
+<parameter name="isSelectable" type="boolean">
+</parameter>
+</method>
+<method name="addHeaderView"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="v" type="android.view.View">
+</parameter>
+</method>
+<method name="clearChoices"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="findViewTraversal"
+ return="android.view.View"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="id" type="int">
+</parameter>
+</method>
+<method name="findViewWithTagTraversal"
+ return="android.view.View"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="tag" type="java.lang.Object">
+</parameter>
+</method>
+<method name="getAdapter"
+ return="android.widget.ListAdapter"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getCheckItemIds"
+ return="long[]"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="deprecated"
+ visibility="public"
+>
+</method>
+<method name="getCheckedItemIds"
+ return="long[]"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getCheckedItemPosition"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getCheckedItemPositions"
+ return="android.util.SparseBooleanArray"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getChoiceMode"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getDivider"
+ return="android.graphics.drawable.Drawable"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getDividerHeight"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getFooterViewsCount"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getHeaderViewsCount"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getItemsCanFocus"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getMaxScrollAmount"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isItemChecked"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="position" type="int">
+</parameter>
+</method>
+<method name="removeFooterView"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="v" type="android.view.View">
+</parameter>
+</method>
+<method name="removeHeaderView"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="v" type="android.view.View">
+</parameter>
+</method>
+<method name="setAdapter"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="adapter" type="android.widget.ListAdapter">
+</parameter>
+</method>
+<method name="setChoiceMode"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="choiceMode" type="int">
+</parameter>
+</method>
+<method name="setDivider"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="divider" type="android.graphics.drawable.Drawable">
+</parameter>
+</method>
+<method name="setDividerHeight"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="height" type="int">
+</parameter>
+</method>
+<method name="setFooterDividersEnabled"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="footerDividersEnabled" type="boolean">
+</parameter>
+</method>
+<method name="setHeaderDividersEnabled"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="headerDividersEnabled" type="boolean">
+</parameter>
+</method>
+<method name="setItemChecked"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="position" type="int">
+</parameter>
+<parameter name="value" type="boolean">
+</parameter>
+</method>
+<method name="setItemsCanFocus"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="itemsCanFocus" type="boolean">
+</parameter>
+</method>
+<method name="setSelection"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="position" type="int">
+</parameter>
+</method>
+<method name="setSelectionAfterHeaderView"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="setSelectionFromTop"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="position" type="int">
+</parameter>
+<parameter name="y" type="int">
+</parameter>
+</method>
+<field name="CHOICE_MODE_MULTIPLE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="CHOICE_MODE_NONE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="0"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="CHOICE_MODE_SINGLE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<class name="ListView.FixedViewInfo"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="ListView.FixedViewInfo"
+ type="android.widget.ListView.FixedViewInfo"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<field name="data"
+ type="java.lang.Object"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="isSelectable"
+ type="boolean"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="view"
+ type="android.view.View"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<class name="MediaController"
+ extends="android.widget.FrameLayout"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="MediaController"
+ type="android.widget.MediaController"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="context" type="android.content.Context">
+</parameter>
+<parameter name="attrs" type="android.util.AttributeSet">
+</parameter>
+</constructor>
+<constructor name="MediaController"
+ type="android.widget.MediaController"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="context" type="android.content.Context">
+</parameter>
+<parameter name="useFastForward" type="boolean">
+</parameter>
+</constructor>
+<constructor name="MediaController"
+ type="android.widget.MediaController"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="context" type="android.content.Context">
+</parameter>
+</constructor>
+<method name="hide"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isShowing"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="onFinishInflate"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="setAnchorView"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="view" type="android.view.View">
+</parameter>
+</method>
+<method name="setMediaPlayer"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="player" type="android.widget.MediaController.MediaPlayerControl">
+</parameter>
+</method>
+<method name="setPrevNextListeners"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="next" type="android.view.View.OnClickListener">
+</parameter>
+<parameter name="prev" type="android.view.View.OnClickListener">
+</parameter>
+</method>
+<method name="show"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="show"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="timeout" type="int">
+</parameter>
+</method>
+</class>
+<interface name="MediaController.MediaPlayerControl"
+ abstract="true"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="canPause"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="canSeekBackward"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="canSeekForward"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getBufferPercentage"
+ return="int"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getCurrentPosition"
+ return="int"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getDuration"
+ return="int"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isPlaying"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="pause"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="seekTo"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="pos" type="int">
+</parameter>
+</method>
+<method name="start"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+</interface>
+<class name="MultiAutoCompleteTextView"
+ extends="android.widget.AutoCompleteTextView"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="MultiAutoCompleteTextView"
+ type="android.widget.MultiAutoCompleteTextView"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="context" type="android.content.Context">
+</parameter>
+</constructor>
+<constructor name="MultiAutoCompleteTextView"
+ type="android.widget.MultiAutoCompleteTextView"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="context" type="android.content.Context">
+</parameter>
+<parameter name="attrs" type="android.util.AttributeSet">
+</parameter>
+</constructor>
+<constructor name="MultiAutoCompleteTextView"
+ type="android.widget.MultiAutoCompleteTextView"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="context" type="android.content.Context">
+</parameter>
+<parameter name="attrs" type="android.util.AttributeSet">
+</parameter>
+<parameter name="defStyle" type="int">
+</parameter>
+</constructor>
+<method name="performFiltering"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="text" type="java.lang.CharSequence">
+</parameter>
+<parameter name="start" type="int">
+</parameter>
+<parameter name="end" type="int">
+</parameter>
+<parameter name="keyCode" type="int">
+</parameter>
+</method>
+<method name="setTokenizer"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="t" type="android.widget.MultiAutoCompleteTextView.Tokenizer">
+</parameter>
+</method>
+</class>
+<class name="MultiAutoCompleteTextView.CommaTokenizer"
+ extends="java.lang.Object"
+ abstract="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="android.widget.MultiAutoCompleteTextView.Tokenizer">
+</implements>
+<constructor name="MultiAutoCompleteTextView.CommaTokenizer"
+ type="android.widget.MultiAutoCompleteTextView.CommaTokenizer"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<method name="findTokenEnd"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="text" type="java.lang.CharSequence">
+</parameter>
+<parameter name="cursor" type="int">
+</parameter>
+</method>
+<method name="findTokenStart"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="text" type="java.lang.CharSequence">
+</parameter>
+<parameter name="cursor" type="int">
+</parameter>
+</method>
+<method name="terminateToken"
+ return="java.lang.CharSequence"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="text" type="java.lang.CharSequence">
+</parameter>
+</method>
+</class>
+<interface name="MultiAutoCompleteTextView.Tokenizer"
+ abstract="true"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="findTokenEnd"
+ return="int"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="text" type="java.lang.CharSequence">
+</parameter>
+<parameter name="cursor" type="int">
+</parameter>
+</method>
+<method name="findTokenStart"
+ return="int"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="text" type="java.lang.CharSequence">
+</parameter>
+<parameter name="cursor" type="int">
+</parameter>
+</method>
+<method name="terminateToken"
+ return="java.lang.CharSequence"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="text" type="java.lang.CharSequence">
+</parameter>
+</method>
+</interface>
+<class name="PopupWindow"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="PopupWindow"
+ type="android.widget.PopupWindow"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="context" type="android.content.Context">
+</parameter>
+</constructor>
+<constructor name="PopupWindow"
+ type="android.widget.PopupWindow"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="context" type="android.content.Context">
+</parameter>
+<parameter name="attrs" type="android.util.AttributeSet">
+</parameter>
+</constructor>
+<constructor name="PopupWindow"
+ type="android.widget.PopupWindow"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="context" type="android.content.Context">
+</parameter>
+<parameter name="attrs" type="android.util.AttributeSet">
+</parameter>
+<parameter name="defStyle" type="int">
+</parameter>
+</constructor>
+<constructor name="PopupWindow"
+ type="android.widget.PopupWindow"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<constructor name="PopupWindow"
+ type="android.widget.PopupWindow"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="contentView" type="android.view.View">
+</parameter>
+</constructor>
+<constructor name="PopupWindow"
+ type="android.widget.PopupWindow"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="width" type="int">
+</parameter>
+<parameter name="height" type="int">
+</parameter>
+</constructor>
+<constructor name="PopupWindow"
+ type="android.widget.PopupWindow"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="contentView" type="android.view.View">
+</parameter>
+<parameter name="width" type="int">
+</parameter>
+<parameter name="height" type="int">
+</parameter>
+</constructor>
+<constructor name="PopupWindow"
+ type="android.widget.PopupWindow"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="contentView" type="android.view.View">
+</parameter>
+<parameter name="width" type="int">
+</parameter>
+<parameter name="height" type="int">
+</parameter>
+<parameter name="focusable" type="boolean">
+</parameter>
+</constructor>
+<method name="dismiss"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getAnimationStyle"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getBackground"
+ return="android.graphics.drawable.Drawable"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getContentView"
+ return="android.view.View"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getHeight"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getInputMethodMode"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getMaxAvailableHeight"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="anchor" type="android.view.View">
+</parameter>
+</method>
+<method name="getMaxAvailableHeight"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="anchor" type="android.view.View">
+</parameter>
+<parameter name="yOffset" type="int">
+</parameter>
+</method>
+<method name="getSoftInputMode"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getWidth"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isAboveAnchor"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isClippingEnabled"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isFocusable"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isOutsideTouchable"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isShowing"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isTouchable"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="setAnimationStyle"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="animationStyle" type="int">
+</parameter>
+</method>
+<method name="setBackgroundDrawable"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="background" type="android.graphics.drawable.Drawable">
+</parameter>
+</method>
+<method name="setClippingEnabled"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="enabled" type="boolean">
+</parameter>
+</method>
+<method name="setContentView"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="contentView" type="android.view.View">
+</parameter>
+</method>
+<method name="setFocusable"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="focusable" type="boolean">
+</parameter>
+</method>
+<method name="setHeight"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="height" type="int">
+</parameter>
+</method>
+<method name="setIgnoreCheekPress"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="setInputMethodMode"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="mode" type="int">
+</parameter>
+</method>
+<method name="setOnDismissListener"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="onDismissListener" type="android.widget.PopupWindow.OnDismissListener">
+</parameter>
+</method>
+<method name="setOutsideTouchable"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="touchable" type="boolean">
+</parameter>
+</method>
+<method name="setSoftInputMode"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="mode" type="int">
+</parameter>
+</method>
+<method name="setTouchInterceptor"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="l" type="android.view.View.OnTouchListener">
+</parameter>
+</method>
+<method name="setTouchable"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="touchable" type="boolean">
+</parameter>
+</method>
+<method name="setWidth"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="width" type="int">
+</parameter>
+</method>
+<method name="setWindowLayoutMode"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="widthSpec" type="int">
+</parameter>
+<parameter name="heightSpec" type="int">
+</parameter>
+</method>
+<method name="showAsDropDown"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="anchor" type="android.view.View">
+</parameter>
+</method>
+<method name="showAsDropDown"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="anchor" type="android.view.View">
+</parameter>
+<parameter name="xoff" type="int">
+</parameter>
+<parameter name="yoff" type="int">
+</parameter>
+</method>
+<method name="showAtLocation"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="parent" type="android.view.View">
+</parameter>
+<parameter name="gravity" type="int">
+</parameter>
+<parameter name="x" type="int">
+</parameter>
+<parameter name="y" type="int">
+</parameter>
+</method>
+<method name="update"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="update"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="width" type="int">
+</parameter>
+<parameter name="height" type="int">
+</parameter>
+</method>
+<method name="update"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="x" type="int">
+</parameter>
+<parameter name="y" type="int">
+</parameter>
+<parameter name="width" type="int">
+</parameter>
+<parameter name="height" type="int">
+</parameter>
+</method>
+<method name="update"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="x" type="int">
+</parameter>
+<parameter name="y" type="int">
+</parameter>
+<parameter name="width" type="int">
+</parameter>
+<parameter name="height" type="int">
+</parameter>
+<parameter name="force" type="boolean">
+</parameter>
+</method>
+<method name="update"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="anchor" type="android.view.View">
+</parameter>
+<parameter name="width" type="int">
+</parameter>
+<parameter name="height" type="int">
+</parameter>
+</method>
+<method name="update"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="anchor" type="android.view.View">
+</parameter>
+<parameter name="xoff" type="int">
+</parameter>
+<parameter name="yoff" type="int">
+</parameter>
+<parameter name="width" type="int">
+</parameter>
+<parameter name="height" type="int">
+</parameter>
+</method>
+<field name="INPUT_METHOD_FROM_FOCUSABLE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="0"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="INPUT_METHOD_NEEDED"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="INPUT_METHOD_NOT_NEEDED"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<interface name="PopupWindow.OnDismissListener"
+ abstract="true"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="onDismiss"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+</interface>
+<class name="ProgressBar"
+ extends="android.view.View"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="ProgressBar"
+ type="android.widget.ProgressBar"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="context" type="android.content.Context">
+</parameter>
+</constructor>
+<constructor name="ProgressBar"
+ type="android.widget.ProgressBar"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="context" type="android.content.Context">
+</parameter>
+<parameter name="attrs" type="android.util.AttributeSet">
+</parameter>
+</constructor>
+<constructor name="ProgressBar"
+ type="android.widget.ProgressBar"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="context" type="android.content.Context">
+</parameter>
+<parameter name="attrs" type="android.util.AttributeSet">
+</parameter>
+<parameter name="defStyle" type="int">
+</parameter>
+</constructor>
+<method name="getIndeterminateDrawable"
+ return="android.graphics.drawable.Drawable"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getInterpolator"
+ return="android.view.animation.Interpolator"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getMax"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getProgress"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getProgressDrawable"
+ return="android.graphics.drawable.Drawable"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getSecondaryProgress"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="incrementProgressBy"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="true"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="diff" type="int">
+</parameter>
+</method>
+<method name="incrementSecondaryProgressBy"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="true"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="diff" type="int">
+</parameter>
+</method>
+<method name="isIndeterminate"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="onRestoreInstanceState"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="state" type="android.os.Parcelable">
+</parameter>
+</method>
+<method name="onSaveInstanceState"
+ return="android.os.Parcelable"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="setIndeterminate"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="indeterminate" type="boolean">
+</parameter>
+</method>
+<method name="setIndeterminateDrawable"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="d" type="android.graphics.drawable.Drawable">
+</parameter>
+</method>
+<method name="setInterpolator"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="context" type="android.content.Context">
+</parameter>
+<parameter name="resID" type="int">
+</parameter>
+</method>
+<method name="setInterpolator"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="interpolator" type="android.view.animation.Interpolator">
+</parameter>
+</method>
+<method name="setMax"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="max" type="int">
+</parameter>
+</method>
+<method name="setProgress"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="progress" type="int">
+</parameter>
+</method>
+<method name="setProgressDrawable"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="d" type="android.graphics.drawable.Drawable">
+</parameter>
+</method>
+<method name="setSecondaryProgress"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="secondaryProgress" type="int">
+</parameter>
+</method>
+</class>
+<class name="QuickContactBadge"
+ extends="android.widget.ImageView"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="android.view.View.OnClickListener">
+</implements>
+<constructor name="QuickContactBadge"
+ type="android.widget.QuickContactBadge"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="context" type="android.content.Context">
+</parameter>
+</constructor>
+<constructor name="QuickContactBadge"
+ type="android.widget.QuickContactBadge"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="context" type="android.content.Context">
+</parameter>
+<parameter name="attrs" type="android.util.AttributeSet">
+</parameter>
+</constructor>
+<constructor name="QuickContactBadge"
+ type="android.widget.QuickContactBadge"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="context" type="android.content.Context">
+</parameter>
+<parameter name="attrs" type="android.util.AttributeSet">
+</parameter>
+<parameter name="defStyle" type="int">
+</parameter>
+</constructor>
+<method name="assignContactFromEmail"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="emailAddress" type="java.lang.String">
+</parameter>
+<parameter name="lazyLookup" type="boolean">
+</parameter>
+</method>
+<method name="assignContactFromPhone"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="phoneNumber" type="java.lang.String">
+</parameter>
+<parameter name="lazyLookup" type="boolean">
+</parameter>
+</method>
+<method name="assignContactUri"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="contactUri" type="android.net.Uri">
+</parameter>
+</method>
+<method name="onClick"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="v" type="android.view.View">
+</parameter>
+</method>
+<method name="setExcludeMimes"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="excludeMimes" type="java.lang.String[]">
+</parameter>
+</method>
+<method name="setMode"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="size" type="int">
+</parameter>
+</method>
+<field name="mExcludeMimes"
+ type="java.lang.String[]"
+ transient="false"
+ volatile="false"
+ value="null"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</field>
+</class>
+<class name="RadioButton"
+ extends="android.widget.CompoundButton"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="RadioButton"
+ type="android.widget.RadioButton"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="context" type="android.content.Context">
+</parameter>
+</constructor>
+<constructor name="RadioButton"
+ type="android.widget.RadioButton"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="context" type="android.content.Context">
+</parameter>
+<parameter name="attrs" type="android.util.AttributeSet">
+</parameter>
+</constructor>
+<constructor name="RadioButton"
+ type="android.widget.RadioButton"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="context" type="android.content.Context">
+</parameter>
+<parameter name="attrs" type="android.util.AttributeSet">
+</parameter>
+<parameter name="defStyle" type="int">
+</parameter>
+</constructor>
+</class>
+<class name="RadioGroup"
+ extends="android.widget.LinearLayout"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="RadioGroup"
+ type="android.widget.RadioGroup"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="context" type="android.content.Context">
+</parameter>
+</constructor>
+<constructor name="RadioGroup"
+ type="android.widget.RadioGroup"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="context" type="android.content.Context">
+</parameter>
+<parameter name="attrs" type="android.util.AttributeSet">
+</parameter>
+</constructor>
+<method name="check"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="id" type="int">
+</parameter>
+</method>
+<method name="clearCheck"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getCheckedRadioButtonId"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="setOnCheckedChangeListener"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="listener" type="android.widget.RadioGroup.OnCheckedChangeListener">
+</parameter>
+</method>
+</class>
+<class name="RadioGroup.LayoutParams"
+ extends="android.widget.LinearLayout.LayoutParams"
+ abstract="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="RadioGroup.LayoutParams"
+ type="android.widget.RadioGroup.LayoutParams"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="c" type="android.content.Context">
+</parameter>
+<parameter name="attrs" type="android.util.AttributeSet">
+</parameter>
+</constructor>
+<constructor name="RadioGroup.LayoutParams"
+ type="android.widget.RadioGroup.LayoutParams"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="w" type="int">
+</parameter>
+<parameter name="h" type="int">
+</parameter>
+</constructor>
+<constructor name="RadioGroup.LayoutParams"
+ type="android.widget.RadioGroup.LayoutParams"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="w" type="int">
+</parameter>
+<parameter name="h" type="int">
+</parameter>
+<parameter name="initWeight" type="float">
+</parameter>
+</constructor>
+<constructor name="RadioGroup.LayoutParams"
+ type="android.widget.RadioGroup.LayoutParams"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="p" type="android.view.ViewGroup.LayoutParams">
+</parameter>
+</constructor>
+<constructor name="RadioGroup.LayoutParams"
+ type="android.widget.RadioGroup.LayoutParams"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="source" type="android.view.ViewGroup.MarginLayoutParams">
+</parameter>
+</constructor>
+</class>
+<interface name="RadioGroup.OnCheckedChangeListener"
+ abstract="true"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="onCheckedChanged"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="group" type="android.widget.RadioGroup">
+</parameter>
+<parameter name="checkedId" type="int">
+</parameter>
+</method>
+</interface>
+<class name="RatingBar"
+ extends="android.widget.AbsSeekBar"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="RatingBar"
+ type="android.widget.RatingBar"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="context" type="android.content.Context">
+</parameter>
+<parameter name="attrs" type="android.util.AttributeSet">
+</parameter>
+<parameter name="defStyle" type="int">
+</parameter>
+</constructor>
+<constructor name="RatingBar"
+ type="android.widget.RatingBar"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="context" type="android.content.Context">
+</parameter>
+<parameter name="attrs" type="android.util.AttributeSet">
+</parameter>
+</constructor>
+<constructor name="RatingBar"
+ type="android.widget.RatingBar"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="context" type="android.content.Context">
+</parameter>
+</constructor>
+<method name="getNumStars"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getOnRatingBarChangeListener"
+ return="android.widget.RatingBar.OnRatingBarChangeListener"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getRating"
+ return="float"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getStepSize"
+ return="float"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isIndicator"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="setIsIndicator"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="isIndicator" type="boolean">
+</parameter>
+</method>
+<method name="setNumStars"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="numStars" type="int">
+</parameter>
+</method>
+<method name="setOnRatingBarChangeListener"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="listener" type="android.widget.RatingBar.OnRatingBarChangeListener">
+</parameter>
+</method>
+<method name="setRating"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="rating" type="float">
+</parameter>
+</method>
+<method name="setStepSize"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="stepSize" type="float">
+</parameter>
+</method>
+</class>
+<interface name="RatingBar.OnRatingBarChangeListener"
+ abstract="true"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="onRatingChanged"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="ratingBar" type="android.widget.RatingBar">
+</parameter>
+<parameter name="rating" type="float">
+</parameter>
+<parameter name="fromUser" type="boolean">
+</parameter>
+</method>
+</interface>
+<class name="RelativeLayout"
+ extends="android.view.ViewGroup"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="RelativeLayout"
+ type="android.widget.RelativeLayout"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="context" type="android.content.Context">
+</parameter>
+</constructor>
+<constructor name="RelativeLayout"
+ type="android.widget.RelativeLayout"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="context" type="android.content.Context">
+</parameter>
+<parameter name="attrs" type="android.util.AttributeSet">
+</parameter>
+</constructor>
+<constructor name="RelativeLayout"
+ type="android.widget.RelativeLayout"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="context" type="android.content.Context">
+</parameter>
+<parameter name="attrs" type="android.util.AttributeSet">
+</parameter>
+<parameter name="defStyle" type="int">
+</parameter>
+</constructor>
+<method name="onLayout"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="changed" type="boolean">
+</parameter>
+<parameter name="l" type="int">
+</parameter>
+<parameter name="t" type="int">
+</parameter>
+<parameter name="r" type="int">
+</parameter>
+<parameter name="b" type="int">
+</parameter>
+</method>
+<method name="setGravity"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="gravity" type="int">
+</parameter>
+</method>
+<method name="setHorizontalGravity"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="horizontalGravity" type="int">
+</parameter>
+</method>
+<method name="setIgnoreGravity"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="viewId" type="int">
+</parameter>
+</method>
+<method name="setVerticalGravity"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="verticalGravity" type="int">
+</parameter>
+</method>
+<field name="ABOVE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ALIGN_BASELINE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="4"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ALIGN_BOTTOM"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="8"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ALIGN_LEFT"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="5"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ALIGN_PARENT_BOTTOM"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="12"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ALIGN_PARENT_LEFT"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="9"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ALIGN_PARENT_RIGHT"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="11"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ALIGN_PARENT_TOP"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="10"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ALIGN_RIGHT"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="7"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ALIGN_TOP"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="6"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="BELOW"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="3"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="CENTER_HORIZONTAL"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="14"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="CENTER_IN_PARENT"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="13"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="CENTER_VERTICAL"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="15"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="LEFT_OF"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="0"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="RIGHT_OF"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TRUE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="-1"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<class name="RelativeLayout.LayoutParams"
+ extends="android.view.ViewGroup.MarginLayoutParams"
+ abstract="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="RelativeLayout.LayoutParams"
+ type="android.widget.RelativeLayout.LayoutParams"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="c" type="android.content.Context">
+</parameter>
+<parameter name="attrs" type="android.util.AttributeSet">
+</parameter>
+</constructor>
+<constructor name="RelativeLayout.LayoutParams"
+ type="android.widget.RelativeLayout.LayoutParams"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="w" type="int">
+</parameter>
+<parameter name="h" type="int">
+</parameter>
+</constructor>
+<constructor name="RelativeLayout.LayoutParams"
+ type="android.widget.RelativeLayout.LayoutParams"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="source" type="android.view.ViewGroup.LayoutParams">
+</parameter>
+</constructor>
+<constructor name="RelativeLayout.LayoutParams"
+ type="android.widget.RelativeLayout.LayoutParams"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="source" type="android.view.ViewGroup.MarginLayoutParams">
+</parameter>
+</constructor>
+<method name="addRule"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="verb" type="int">
+</parameter>
+</method>
+<method name="addRule"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="verb" type="int">
+</parameter>
+<parameter name="anchor" type="int">
+</parameter>
+</method>
+<method name="debug"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="output" type="java.lang.String">
+</parameter>
+</method>
+<method name="getRules"
+ return="int[]"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<field name="alignWithParent"
+ type="boolean"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<class name="RemoteViews"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="android.view.LayoutInflater.Filter">
+</implements>
+<implements name="android.os.Parcelable">
+</implements>
+<constructor name="RemoteViews"
+ type="android.widget.RemoteViews"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="packageName" type="java.lang.String">
+</parameter>
+<parameter name="layoutId" type="int">
+</parameter>
+</constructor>
+<constructor name="RemoteViews"
+ type="android.widget.RemoteViews"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="parcel" type="android.os.Parcel">
+</parameter>
+</constructor>
+<method name="addView"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="viewId" type="int">
+</parameter>
+<parameter name="nestedView" type="android.widget.RemoteViews">
+</parameter>
+</method>
+<method name="apply"
+ return="android.view.View"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="context" type="android.content.Context">
+</parameter>
+<parameter name="parent" type="android.view.ViewGroup">
+</parameter>
+</method>
+<method name="describeContents"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getLayoutId"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getPackage"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="onLoadClass"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="clazz" type="java.lang.Class">
+</parameter>
+</method>
+<method name="reapply"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="context" type="android.content.Context">
+</parameter>
+<parameter name="v" type="android.view.View">
+</parameter>
+</method>
+<method name="removeAllViews"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="viewId" type="int">
+</parameter>
+</method>
+<method name="setBitmap"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="viewId" type="int">
+</parameter>
+<parameter name="methodName" type="java.lang.String">
+</parameter>
+<parameter name="value" type="android.graphics.Bitmap">
+</parameter>
+</method>
+<method name="setBoolean"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="viewId" type="int">
+</parameter>
+<parameter name="methodName" type="java.lang.String">
+</parameter>
+<parameter name="value" type="boolean">
+</parameter>
+</method>
+<method name="setBundle"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="viewId" type="int">
+</parameter>
+<parameter name="methodName" type="java.lang.String">
+</parameter>
+<parameter name="value" type="android.os.Bundle">
+</parameter>
+</method>
+<method name="setByte"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="viewId" type="int">
+</parameter>
+<parameter name="methodName" type="java.lang.String">
+</parameter>
+<parameter name="value" type="byte">
+</parameter>
+</method>
+<method name="setChar"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="viewId" type="int">
+</parameter>
+<parameter name="methodName" type="java.lang.String">
+</parameter>
+<parameter name="value" type="char">
+</parameter>
+</method>
+<method name="setCharSequence"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="viewId" type="int">
+</parameter>
+<parameter name="methodName" type="java.lang.String">
+</parameter>
+<parameter name="value" type="java.lang.CharSequence">
+</parameter>
+</method>
+<method name="setChronometer"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="viewId" type="int">
+</parameter>
+<parameter name="base" type="long">
+</parameter>
+<parameter name="format" type="java.lang.String">
+</parameter>
+<parameter name="started" type="boolean">
+</parameter>
+</method>
+<method name="setDouble"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="viewId" type="int">
+</parameter>
+<parameter name="methodName" type="java.lang.String">
+</parameter>
+<parameter name="value" type="double">
+</parameter>
+</method>
+<method name="setFloat"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="viewId" type="int">
+</parameter>
+<parameter name="methodName" type="java.lang.String">
+</parameter>
+<parameter name="value" type="float">
+</parameter>
+</method>
+<method name="setImageViewBitmap"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="viewId" type="int">
+</parameter>
+<parameter name="bitmap" type="android.graphics.Bitmap">
+</parameter>
+</method>
+<method name="setImageViewResource"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="viewId" type="int">
+</parameter>
+<parameter name="srcId" type="int">
+</parameter>
+</method>
+<method name="setImageViewUri"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="viewId" type="int">
+</parameter>
+<parameter name="uri" type="android.net.Uri">
+</parameter>
+</method>
+<method name="setInt"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="viewId" type="int">
+</parameter>
+<parameter name="methodName" type="java.lang.String">
+</parameter>
+<parameter name="value" type="int">
+</parameter>
+</method>
+<method name="setLong"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="viewId" type="int">
+</parameter>
+<parameter name="methodName" type="java.lang.String">
+</parameter>
+<parameter name="value" type="long">
+</parameter>
+</method>
+<method name="setOnClickPendingIntent"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="viewId" type="int">
+</parameter>
+<parameter name="pendingIntent" type="android.app.PendingIntent">
+</parameter>
+</method>
+<method name="setProgressBar"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="viewId" type="int">
+</parameter>
+<parameter name="max" type="int">
+</parameter>
+<parameter name="progress" type="int">
+</parameter>
+<parameter name="indeterminate" type="boolean">
+</parameter>
+</method>
+<method name="setShort"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="viewId" type="int">
+</parameter>
+<parameter name="methodName" type="java.lang.String">
+</parameter>
+<parameter name="value" type="short">
+</parameter>
+</method>
+<method name="setString"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="viewId" type="int">
+</parameter>
+<parameter name="methodName" type="java.lang.String">
+</parameter>
+<parameter name="value" type="java.lang.String">
+</parameter>
+</method>
+<method name="setTextColor"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="viewId" type="int">
+</parameter>
+<parameter name="color" type="int">
+</parameter>
+</method>
+<method name="setTextViewText"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="viewId" type="int">
+</parameter>
+<parameter name="text" type="java.lang.CharSequence">
+</parameter>
+</method>
+<method name="setUri"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="viewId" type="int">
+</parameter>
+<parameter name="methodName" type="java.lang.String">
+</parameter>
+<parameter name="value" type="android.net.Uri">
+</parameter>
+</method>
+<method name="setViewVisibility"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="viewId" type="int">
+</parameter>
+<parameter name="visibility" type="int">
+</parameter>
+</method>
+<method name="writeToParcel"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="dest" type="android.os.Parcel">
+</parameter>
+<parameter name="flags" type="int">
+</parameter>
+</method>
+<field name="CREATOR"
+ type="android.os.Parcelable.Creator"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<class name="RemoteViews.ActionException"
+ extends="java.lang.RuntimeException"
+ abstract="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="RemoteViews.ActionException"
+ type="android.widget.RemoteViews.ActionException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="ex" type="java.lang.Exception">
+</parameter>
+</constructor>
+<constructor name="RemoteViews.ActionException"
+ type="android.widget.RemoteViews.ActionException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="message" type="java.lang.String">
+</parameter>
+</constructor>
+</class>
+<class name="RemoteViews.RemoteView"
+ extends="java.lang.Object"
+ abstract="true"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="java.lang.annotation.Annotation">
+</implements>
+</class>
+<class name="ResourceCursorAdapter"
+ extends="android.widget.CursorAdapter"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="ResourceCursorAdapter"
+ type="android.widget.ResourceCursorAdapter"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="context" type="android.content.Context">
+</parameter>
+<parameter name="layout" type="int">
+</parameter>
+<parameter name="c" type="android.database.Cursor">
+</parameter>
+</constructor>
+<constructor name="ResourceCursorAdapter"
+ type="android.widget.ResourceCursorAdapter"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="context" type="android.content.Context">
+</parameter>
+<parameter name="layout" type="int">
+</parameter>
+<parameter name="c" type="android.database.Cursor">
+</parameter>
+<parameter name="autoRequery" type="boolean">
+</parameter>
+</constructor>
+<method name="newView"
+ return="android.view.View"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="context" type="android.content.Context">
+</parameter>
+<parameter name="cursor" type="android.database.Cursor">
+</parameter>
+<parameter name="parent" type="android.view.ViewGroup">
+</parameter>
+</method>
+<method name="setDropDownViewResource"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="dropDownLayout" type="int">
+</parameter>
+</method>
+<method name="setViewResource"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="layout" type="int">
+</parameter>
+</method>
+</class>
+<class name="ResourceCursorTreeAdapter"
+ extends="android.widget.CursorTreeAdapter"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="ResourceCursorTreeAdapter"
+ type="android.widget.ResourceCursorTreeAdapter"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="context" type="android.content.Context">
+</parameter>
+<parameter name="cursor" type="android.database.Cursor">
+</parameter>
+<parameter name="collapsedGroupLayout" type="int">
+</parameter>
+<parameter name="expandedGroupLayout" type="int">
+</parameter>
+<parameter name="childLayout" type="int">
+</parameter>
+<parameter name="lastChildLayout" type="int">
+</parameter>
+</constructor>
+<constructor name="ResourceCursorTreeAdapter"
+ type="android.widget.ResourceCursorTreeAdapter"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="context" type="android.content.Context">
+</parameter>
+<parameter name="cursor" type="android.database.Cursor">
+</parameter>
+<parameter name="collapsedGroupLayout" type="int">
+</parameter>
+<parameter name="expandedGroupLayout" type="int">
+</parameter>
+<parameter name="childLayout" type="int">
+</parameter>
+</constructor>
+<constructor name="ResourceCursorTreeAdapter"
+ type="android.widget.ResourceCursorTreeAdapter"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="context" type="android.content.Context">
+</parameter>
+<parameter name="cursor" type="android.database.Cursor">
+</parameter>
+<parameter name="groupLayout" type="int">
+</parameter>
+<parameter name="childLayout" type="int">
+</parameter>
+</constructor>
+<method name="newChildView"
+ return="android.view.View"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="context" type="android.content.Context">
+</parameter>
+<parameter name="cursor" type="android.database.Cursor">
+</parameter>
+<parameter name="isLastChild" type="boolean">
+</parameter>
+<parameter name="parent" type="android.view.ViewGroup">
+</parameter>
+</method>
+<method name="newGroupView"
+ return="android.view.View"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="context" type="android.content.Context">
+</parameter>
+<parameter name="cursor" type="android.database.Cursor">
+</parameter>
+<parameter name="isExpanded" type="boolean">
+</parameter>
+<parameter name="parent" type="android.view.ViewGroup">
+</parameter>
+</method>
+</class>
+<class name="ScrollView"
+ extends="android.widget.FrameLayout"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="ScrollView"
+ type="android.widget.ScrollView"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="context" type="android.content.Context">
+</parameter>
+</constructor>
+<constructor name="ScrollView"
+ type="android.widget.ScrollView"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="context" type="android.content.Context">
+</parameter>
+<parameter name="attrs" type="android.util.AttributeSet">
+</parameter>
+</constructor>
+<constructor name="ScrollView"
+ type="android.widget.ScrollView"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="context" type="android.content.Context">
+</parameter>
+<parameter name="attrs" type="android.util.AttributeSet">
+</parameter>
+<parameter name="defStyle" type="int">
+</parameter>
+</constructor>
+<method name="arrowScroll"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="direction" type="int">
+</parameter>
+</method>
+<method name="computeScrollDeltaToGetChildRectOnScreen"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="rect" type="android.graphics.Rect">
+</parameter>
+</method>
+<method name="executeKeyEvent"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="event" type="android.view.KeyEvent">
+</parameter>
+</method>
+<method name="fling"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="velocityY" type="int">
+</parameter>
+</method>
+<method name="fullScroll"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="direction" type="int">
+</parameter>
+</method>
+<method name="getMaxScrollAmount"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isFillViewport"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isSmoothScrollingEnabled"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="pageScroll"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="direction" type="int">
+</parameter>
+</method>
+<method name="setFillViewport"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="fillViewport" type="boolean">
+</parameter>
+</method>
+<method name="setSmoothScrollingEnabled"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="smoothScrollingEnabled" type="boolean">
+</parameter>
+</method>
+<method name="smoothScrollBy"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="dx" type="int">
+</parameter>
+<parameter name="dy" type="int">
+</parameter>
+</method>
+<method name="smoothScrollTo"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="x" type="int">
+</parameter>
+<parameter name="y" type="int">
+</parameter>
+</method>
+</class>
+<class name="Scroller"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="Scroller"
+ type="android.widget.Scroller"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="context" type="android.content.Context">
+</parameter>
+</constructor>
+<constructor name="Scroller"
+ type="android.widget.Scroller"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="context" type="android.content.Context">
+</parameter>
+<parameter name="interpolator" type="android.view.animation.Interpolator">
+</parameter>
+</constructor>
+<method name="abortAnimation"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="computeScrollOffset"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="extendDuration"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="extend" type="int">
+</parameter>
+</method>
+<method name="fling"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="startX" type="int">
+</parameter>
+<parameter name="startY" type="int">
+</parameter>
+<parameter name="velocityX" type="int">
+</parameter>
+<parameter name="velocityY" type="int">
+</parameter>
+<parameter name="minX" type="int">
+</parameter>
+<parameter name="maxX" type="int">
+</parameter>
+<parameter name="minY" type="int">
+</parameter>
+<parameter name="maxY" type="int">
+</parameter>
+</method>
+<method name="forceFinished"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="finished" type="boolean">
+</parameter>
+</method>
+<method name="getCurrX"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getCurrY"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getDuration"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getFinalX"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getFinalY"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getStartX"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getStartY"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isFinished"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="setFinalX"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="newX" type="int">
+</parameter>
+</method>
+<method name="setFinalY"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="newY" type="int">
+</parameter>
+</method>
+<method name="startScroll"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="startX" type="int">
+</parameter>
+<parameter name="startY" type="int">
+</parameter>
+<parameter name="dx" type="int">
+</parameter>
+<parameter name="dy" type="int">
+</parameter>
+</method>
+<method name="startScroll"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="startX" type="int">
+</parameter>
+<parameter name="startY" type="int">
+</parameter>
+<parameter name="dx" type="int">
+</parameter>
+<parameter name="dy" type="int">
+</parameter>
+<parameter name="duration" type="int">
+</parameter>
+</method>
+<method name="timePassed"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+</class>
+<interface name="SectionIndexer"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="getPositionForSection"
+ return="int"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="section" type="int">
+</parameter>
+</method>
+<method name="getSectionForPosition"
+ return="int"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="position" type="int">
+</parameter>
+</method>
+<method name="getSections"
+ return="java.lang.Object[]"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+</interface>
+<class name="SeekBar"
+ extends="android.widget.AbsSeekBar"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="SeekBar"
+ type="android.widget.SeekBar"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="context" type="android.content.Context">
+</parameter>
+</constructor>
+<constructor name="SeekBar"
+ type="android.widget.SeekBar"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="context" type="android.content.Context">
+</parameter>
+<parameter name="attrs" type="android.util.AttributeSet">
+</parameter>
+</constructor>
+<constructor name="SeekBar"
+ type="android.widget.SeekBar"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="context" type="android.content.Context">
+</parameter>
+<parameter name="attrs" type="android.util.AttributeSet">
+</parameter>
+<parameter name="defStyle" type="int">
+</parameter>
+</constructor>
+<method name="setOnSeekBarChangeListener"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="l" type="android.widget.SeekBar.OnSeekBarChangeListener">
+</parameter>
+</method>
+</class>
+<interface name="SeekBar.OnSeekBarChangeListener"
+ abstract="true"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="onProgressChanged"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="seekBar" type="android.widget.SeekBar">
+</parameter>
+<parameter name="progress" type="int">
+</parameter>
+<parameter name="fromUser" type="boolean">
+</parameter>
+</method>
+<method name="onStartTrackingTouch"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="seekBar" type="android.widget.SeekBar">
+</parameter>
+</method>
+<method name="onStopTrackingTouch"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="seekBar" type="android.widget.SeekBar">
+</parameter>
+</method>
+</interface>
+<class name="SimpleAdapter"
+ extends="android.widget.BaseAdapter"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="android.widget.Filterable">
+</implements>
+<constructor name="SimpleAdapter"
+ type="android.widget.SimpleAdapter"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="context" type="android.content.Context">
+</parameter>
+<parameter name="data" type="java.util.List&lt;? extends java.util.Map&lt;java.lang.String, ?&gt;&gt;">
+</parameter>
+<parameter name="resource" type="int">
+</parameter>
+<parameter name="from" type="java.lang.String[]">
+</parameter>
+<parameter name="to" type="int[]">
+</parameter>
+</constructor>
+<method name="getCount"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getFilter"
+ return="android.widget.Filter"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getItem"
+ return="java.lang.Object"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="position" type="int">
+</parameter>
+</method>
+<method name="getItemId"
+ return="long"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="position" type="int">
+</parameter>
+</method>
+<method name="getView"
+ return="android.view.View"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="position" type="int">
+</parameter>
+<parameter name="convertView" type="android.view.View">
+</parameter>
+<parameter name="parent" type="android.view.ViewGroup">
+</parameter>
+</method>
+<method name="getViewBinder"
+ return="android.widget.SimpleAdapter.ViewBinder"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="setDropDownViewResource"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="resource" type="int">
+</parameter>
+</method>
+<method name="setViewBinder"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="viewBinder" type="android.widget.SimpleAdapter.ViewBinder">
+</parameter>
+</method>
+<method name="setViewImage"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="v" type="android.widget.ImageView">
+</parameter>
+<parameter name="value" type="int">
+</parameter>
+</method>
+<method name="setViewImage"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="v" type="android.widget.ImageView">
+</parameter>
+<parameter name="value" type="java.lang.String">
+</parameter>
+</method>
+<method name="setViewText"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="v" type="android.widget.TextView">
+</parameter>
+<parameter name="text" type="java.lang.String">
+</parameter>
+</method>
+</class>
+<interface name="SimpleAdapter.ViewBinder"
+ abstract="true"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="setViewValue"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="view" type="android.view.View">
+</parameter>
+<parameter name="data" type="java.lang.Object">
+</parameter>
+<parameter name="textRepresentation" type="java.lang.String">
+</parameter>
+</method>
+</interface>
+<class name="SimpleCursorAdapter"
+ extends="android.widget.ResourceCursorAdapter"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="SimpleCursorAdapter"
+ type="android.widget.SimpleCursorAdapter"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="context" type="android.content.Context">
+</parameter>
+<parameter name="layout" type="int">
+</parameter>
+<parameter name="c" type="android.database.Cursor">
+</parameter>
+<parameter name="from" type="java.lang.String[]">
+</parameter>
+<parameter name="to" type="int[]">
+</parameter>
+</constructor>
+<method name="bindView"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="view" type="android.view.View">
+</parameter>
+<parameter name="context" type="android.content.Context">
+</parameter>
+<parameter name="cursor" type="android.database.Cursor">
+</parameter>
+</method>
+<method name="changeCursorAndColumns"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="c" type="android.database.Cursor">
+</parameter>
+<parameter name="from" type="java.lang.String[]">
+</parameter>
+<parameter name="to" type="int[]">
+</parameter>
+</method>
+<method name="getCursorToStringConverter"
+ return="android.widget.SimpleCursorAdapter.CursorToStringConverter"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getStringConversionColumn"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getViewBinder"
+ return="android.widget.SimpleCursorAdapter.ViewBinder"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="setCursorToStringConverter"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="cursorToStringConverter" type="android.widget.SimpleCursorAdapter.CursorToStringConverter">
+</parameter>
+</method>
+<method name="setStringConversionColumn"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="stringConversionColumn" type="int">
+</parameter>
+</method>
+<method name="setViewBinder"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="viewBinder" type="android.widget.SimpleCursorAdapter.ViewBinder">
+</parameter>
+</method>
+<method name="setViewImage"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="v" type="android.widget.ImageView">
+</parameter>
+<parameter name="value" type="java.lang.String">
+</parameter>
+</method>
+<method name="setViewText"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="v" type="android.widget.TextView">
+</parameter>
+<parameter name="text" type="java.lang.String">
+</parameter>
+</method>
+</class>
+<interface name="SimpleCursorAdapter.CursorToStringConverter"
+ abstract="true"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="convertToString"
+ return="java.lang.CharSequence"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="cursor" type="android.database.Cursor">
+</parameter>
+</method>
+</interface>
+<interface name="SimpleCursorAdapter.ViewBinder"
+ abstract="true"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="setViewValue"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="view" type="android.view.View">
+</parameter>
+<parameter name="cursor" type="android.database.Cursor">
+</parameter>
+<parameter name="columnIndex" type="int">
+</parameter>
+</method>
+</interface>
+<class name="SimpleCursorTreeAdapter"
+ extends="android.widget.ResourceCursorTreeAdapter"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="SimpleCursorTreeAdapter"
+ type="android.widget.SimpleCursorTreeAdapter"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="context" type="android.content.Context">
+</parameter>
+<parameter name="cursor" type="android.database.Cursor">
+</parameter>
+<parameter name="collapsedGroupLayout" type="int">
+</parameter>
+<parameter name="expandedGroupLayout" type="int">
+</parameter>
+<parameter name="groupFrom" type="java.lang.String[]">
+</parameter>
+<parameter name="groupTo" type="int[]">
+</parameter>
+<parameter name="childLayout" type="int">
+</parameter>
+<parameter name="lastChildLayout" type="int">
+</parameter>
+<parameter name="childFrom" type="java.lang.String[]">
+</parameter>
+<parameter name="childTo" type="int[]">
+</parameter>
+</constructor>
+<constructor name="SimpleCursorTreeAdapter"
+ type="android.widget.SimpleCursorTreeAdapter"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="context" type="android.content.Context">
+</parameter>
+<parameter name="cursor" type="android.database.Cursor">
+</parameter>
+<parameter name="collapsedGroupLayout" type="int">
+</parameter>
+<parameter name="expandedGroupLayout" type="int">
+</parameter>
+<parameter name="groupFrom" type="java.lang.String[]">
+</parameter>
+<parameter name="groupTo" type="int[]">
+</parameter>
+<parameter name="childLayout" type="int">
+</parameter>
+<parameter name="childFrom" type="java.lang.String[]">
+</parameter>
+<parameter name="childTo" type="int[]">
+</parameter>
+</constructor>
+<constructor name="SimpleCursorTreeAdapter"
+ type="android.widget.SimpleCursorTreeAdapter"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="context" type="android.content.Context">
+</parameter>
+<parameter name="cursor" type="android.database.Cursor">
+</parameter>
+<parameter name="groupLayout" type="int">
+</parameter>
+<parameter name="groupFrom" type="java.lang.String[]">
+</parameter>
+<parameter name="groupTo" type="int[]">
+</parameter>
+<parameter name="childLayout" type="int">
+</parameter>
+<parameter name="childFrom" type="java.lang.String[]">
+</parameter>
+<parameter name="childTo" type="int[]">
+</parameter>
+</constructor>
+<method name="bindChildView"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="view" type="android.view.View">
+</parameter>
+<parameter name="context" type="android.content.Context">
+</parameter>
+<parameter name="cursor" type="android.database.Cursor">
+</parameter>
+<parameter name="isLastChild" type="boolean">
+</parameter>
+</method>
+<method name="bindGroupView"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="view" type="android.view.View">
+</parameter>
+<parameter name="context" type="android.content.Context">
+</parameter>
+<parameter name="cursor" type="android.database.Cursor">
+</parameter>
+<parameter name="isExpanded" type="boolean">
+</parameter>
+</method>
+<method name="getViewBinder"
+ return="android.widget.SimpleCursorTreeAdapter.ViewBinder"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="setViewBinder"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="viewBinder" type="android.widget.SimpleCursorTreeAdapter.ViewBinder">
+</parameter>
+</method>
+<method name="setViewImage"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="v" type="android.widget.ImageView">
+</parameter>
+<parameter name="value" type="java.lang.String">
+</parameter>
+</method>
+<method name="setViewText"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="v" type="android.widget.TextView">
+</parameter>
+<parameter name="text" type="java.lang.String">
+</parameter>
+</method>
+</class>
+<interface name="SimpleCursorTreeAdapter.ViewBinder"
+ abstract="true"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="setViewValue"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="view" type="android.view.View">
+</parameter>
+<parameter name="cursor" type="android.database.Cursor">
+</parameter>
+<parameter name="columnIndex" type="int">
+</parameter>
+</method>
+</interface>
+<class name="SimpleExpandableListAdapter"
+ extends="android.widget.BaseExpandableListAdapter"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="SimpleExpandableListAdapter"
+ type="android.widget.SimpleExpandableListAdapter"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="context" type="android.content.Context">
+</parameter>
+<parameter name="groupData" type="java.util.List&lt;? extends java.util.Map&lt;java.lang.String, ?&gt;&gt;">
+</parameter>
+<parameter name="groupLayout" type="int">
+</parameter>
+<parameter name="groupFrom" type="java.lang.String[]">
+</parameter>
+<parameter name="groupTo" type="int[]">
+</parameter>
+<parameter name="childData" type="java.util.List&lt;? extends java.util.List&lt;? extends java.util.Map&lt;java.lang.String, ?&gt;&gt;&gt;">
+</parameter>
+<parameter name="childLayout" type="int">
+</parameter>
+<parameter name="childFrom" type="java.lang.String[]">
+</parameter>
+<parameter name="childTo" type="int[]">
+</parameter>
+</constructor>
+<constructor name="SimpleExpandableListAdapter"
+ type="android.widget.SimpleExpandableListAdapter"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="context" type="android.content.Context">
+</parameter>
+<parameter name="groupData" type="java.util.List&lt;? extends java.util.Map&lt;java.lang.String, ?&gt;&gt;">
+</parameter>
+<parameter name="expandedGroupLayout" type="int">
+</parameter>
+<parameter name="collapsedGroupLayout" type="int">
+</parameter>
+<parameter name="groupFrom" type="java.lang.String[]">
+</parameter>
+<parameter name="groupTo" type="int[]">
+</parameter>
+<parameter name="childData" type="java.util.List&lt;? extends java.util.List&lt;? extends java.util.Map&lt;java.lang.String, ?&gt;&gt;&gt;">
+</parameter>
+<parameter name="childLayout" type="int">
+</parameter>
+<parameter name="childFrom" type="java.lang.String[]">
+</parameter>
+<parameter name="childTo" type="int[]">
+</parameter>
+</constructor>
+<constructor name="SimpleExpandableListAdapter"
+ type="android.widget.SimpleExpandableListAdapter"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="context" type="android.content.Context">
+</parameter>
+<parameter name="groupData" type="java.util.List&lt;? extends java.util.Map&lt;java.lang.String, ?&gt;&gt;">
+</parameter>
+<parameter name="expandedGroupLayout" type="int">
+</parameter>
+<parameter name="collapsedGroupLayout" type="int">
+</parameter>
+<parameter name="groupFrom" type="java.lang.String[]">
+</parameter>
+<parameter name="groupTo" type="int[]">
+</parameter>
+<parameter name="childData" type="java.util.List&lt;? extends java.util.List&lt;? extends java.util.Map&lt;java.lang.String, ?&gt;&gt;&gt;">
+</parameter>
+<parameter name="childLayout" type="int">
+</parameter>
+<parameter name="lastChildLayout" type="int">
+</parameter>
+<parameter name="childFrom" type="java.lang.String[]">
+</parameter>
+<parameter name="childTo" type="int[]">
+</parameter>
+</constructor>
+<method name="getChild"
+ return="java.lang.Object"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="groupPosition" type="int">
+</parameter>
+<parameter name="childPosition" type="int">
+</parameter>
+</method>
+<method name="getChildId"
+ return="long"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="groupPosition" type="int">
+</parameter>
+<parameter name="childPosition" type="int">
+</parameter>
+</method>
+<method name="getChildView"
+ return="android.view.View"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="groupPosition" type="int">
+</parameter>
+<parameter name="childPosition" type="int">
+</parameter>
+<parameter name="isLastChild" type="boolean">
+</parameter>
+<parameter name="convertView" type="android.view.View">
+</parameter>
+<parameter name="parent" type="android.view.ViewGroup">
+</parameter>
+</method>
+<method name="getChildrenCount"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="groupPosition" type="int">
+</parameter>
+</method>
+<method name="getGroup"
+ return="java.lang.Object"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="groupPosition" type="int">
+</parameter>
+</method>
+<method name="getGroupCount"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getGroupId"
+ return="long"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="groupPosition" type="int">
+</parameter>
+</method>
+<method name="getGroupView"
+ return="android.view.View"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="groupPosition" type="int">
+</parameter>
+<parameter name="isExpanded" type="boolean">
+</parameter>
+<parameter name="convertView" type="android.view.View">
+</parameter>
+<parameter name="parent" type="android.view.ViewGroup">
+</parameter>
+</method>
+<method name="hasStableIds"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isChildSelectable"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="groupPosition" type="int">
+</parameter>
+<parameter name="childPosition" type="int">
+</parameter>
+</method>
+<method name="newChildView"
+ return="android.view.View"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="isLastChild" type="boolean">
+</parameter>
+<parameter name="parent" type="android.view.ViewGroup">
+</parameter>
+</method>
+<method name="newGroupView"
+ return="android.view.View"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="isExpanded" type="boolean">
+</parameter>
+<parameter name="parent" type="android.view.ViewGroup">
+</parameter>
+</method>
+</class>
+<class name="SlidingDrawer"
+ extends="android.view.ViewGroup"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="SlidingDrawer"
+ type="android.widget.SlidingDrawer"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="context" type="android.content.Context">
+</parameter>
+<parameter name="attrs" type="android.util.AttributeSet">
+</parameter>
+</constructor>
+<constructor name="SlidingDrawer"
+ type="android.widget.SlidingDrawer"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="context" type="android.content.Context">
+</parameter>
+<parameter name="attrs" type="android.util.AttributeSet">
+</parameter>
+<parameter name="defStyle" type="int">
+</parameter>
+</constructor>
+<method name="animateClose"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="animateOpen"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="animateToggle"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="close"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getContent"
+ return="android.view.View"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getHandle"
+ return="android.view.View"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isMoving"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isOpened"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="lock"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="onLayout"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="changed" type="boolean">
+</parameter>
+<parameter name="l" type="int">
+</parameter>
+<parameter name="t" type="int">
+</parameter>
+<parameter name="r" type="int">
+</parameter>
+<parameter name="b" type="int">
+</parameter>
+</method>
+<method name="open"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="setOnDrawerCloseListener"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="onDrawerCloseListener" type="android.widget.SlidingDrawer.OnDrawerCloseListener">
+</parameter>
+</method>
+<method name="setOnDrawerOpenListener"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="onDrawerOpenListener" type="android.widget.SlidingDrawer.OnDrawerOpenListener">
+</parameter>
+</method>
+<method name="setOnDrawerScrollListener"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="onDrawerScrollListener" type="android.widget.SlidingDrawer.OnDrawerScrollListener">
+</parameter>
+</method>
+<method name="toggle"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="unlock"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<field name="ORIENTATION_HORIZONTAL"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="0"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ORIENTATION_VERTICAL"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<interface name="SlidingDrawer.OnDrawerCloseListener"
+ abstract="true"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="onDrawerClosed"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+</interface>
+<interface name="SlidingDrawer.OnDrawerOpenListener"
+ abstract="true"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="onDrawerOpened"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+</interface>
+<interface name="SlidingDrawer.OnDrawerScrollListener"
+ abstract="true"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="onScrollEnded"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="onScrollStarted"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+</interface>
+<class name="Spinner"
+ extends="android.widget.AbsSpinner"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="android.content.DialogInterface.OnClickListener">
+</implements>
+<constructor name="Spinner"
+ type="android.widget.Spinner"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="context" type="android.content.Context">
+</parameter>
+</constructor>
+<constructor name="Spinner"
+ type="android.widget.Spinner"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="context" type="android.content.Context">
+</parameter>
+<parameter name="attrs" type="android.util.AttributeSet">
+</parameter>
+</constructor>
+<constructor name="Spinner"
+ type="android.widget.Spinner"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="context" type="android.content.Context">
+</parameter>
+<parameter name="attrs" type="android.util.AttributeSet">
+</parameter>
+<parameter name="defStyle" type="int">
+</parameter>
+</constructor>
+<method name="getPrompt"
+ return="java.lang.CharSequence"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="onClick"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="dialog" type="android.content.DialogInterface">
+</parameter>
+<parameter name="which" type="int">
+</parameter>
+</method>
+<method name="setPrompt"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="prompt" type="java.lang.CharSequence">
+</parameter>
+</method>
+<method name="setPromptId"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="promptId" type="int">
+</parameter>
+</method>
+</class>
+<interface name="SpinnerAdapter"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="android.widget.Adapter">
+</implements>
+<method name="getDropDownView"
+ return="android.view.View"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="position" type="int">
+</parameter>
+<parameter name="convertView" type="android.view.View">
+</parameter>
+<parameter name="parent" type="android.view.ViewGroup">
+</parameter>
+</method>
+</interface>
+<class name="TabHost"
+ extends="android.widget.FrameLayout"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="android.view.ViewTreeObserver.OnTouchModeChangeListener">
+</implements>
+<constructor name="TabHost"
+ type="android.widget.TabHost"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="context" type="android.content.Context">
+</parameter>
+</constructor>
+<constructor name="TabHost"
+ type="android.widget.TabHost"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="context" type="android.content.Context">
+</parameter>
+<parameter name="attrs" type="android.util.AttributeSet">
+</parameter>
+</constructor>
+<method name="addTab"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="tabSpec" type="android.widget.TabHost.TabSpec">
+</parameter>
+</method>
+<method name="clearAllTabs"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getCurrentTab"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getCurrentTabTag"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getCurrentTabView"
+ return="android.view.View"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getCurrentView"
+ return="android.view.View"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getTabContentView"
+ return="android.widget.FrameLayout"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getTabWidget"
+ return="android.widget.TabWidget"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="newTabSpec"
+ return="android.widget.TabHost.TabSpec"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="tag" type="java.lang.String">
+</parameter>
+</method>
+<method name="onTouchModeChanged"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="isInTouchMode" type="boolean">
+</parameter>
+</method>
+<method name="setCurrentTab"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="index" type="int">
+</parameter>
+</method>
+<method name="setCurrentTabByTag"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="tag" type="java.lang.String">
+</parameter>
+</method>
+<method name="setOnTabChangedListener"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="l" type="android.widget.TabHost.OnTabChangeListener">
+</parameter>
+</method>
+<method name="setup"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="setup"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="activityGroup" type="android.app.LocalActivityManager">
+</parameter>
+</method>
+</class>
+<interface name="TabHost.OnTabChangeListener"
+ abstract="true"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="onTabChanged"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="tabId" type="java.lang.String">
+</parameter>
+</method>
+</interface>
+<interface name="TabHost.TabContentFactory"
+ abstract="true"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="createTabContent"
+ return="android.view.View"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="tag" type="java.lang.String">
+</parameter>
+</method>
+</interface>
+<class name="TabHost.TabSpec"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="getTag"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="setContent"
+ return="android.widget.TabHost.TabSpec"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="viewId" type="int">
+</parameter>
+</method>
+<method name="setContent"
+ return="android.widget.TabHost.TabSpec"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="contentFactory" type="android.widget.TabHost.TabContentFactory">
+</parameter>
+</method>
+<method name="setContent"
+ return="android.widget.TabHost.TabSpec"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="intent" type="android.content.Intent">
+</parameter>
+</method>
+<method name="setIndicator"
+ return="android.widget.TabHost.TabSpec"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="label" type="java.lang.CharSequence">
+</parameter>
+</method>
+<method name="setIndicator"
+ return="android.widget.TabHost.TabSpec"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="label" type="java.lang.CharSequence">
+</parameter>
+<parameter name="icon" type="android.graphics.drawable.Drawable">
+</parameter>
+</method>
+<method name="setIndicator"
+ return="android.widget.TabHost.TabSpec"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="view" type="android.view.View">
+</parameter>
+</method>
+</class>
+<class name="TabWidget"
+ extends="android.widget.LinearLayout"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="android.view.View.OnFocusChangeListener">
+</implements>
+<constructor name="TabWidget"
+ type="android.widget.TabWidget"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="context" type="android.content.Context">
+</parameter>
+</constructor>
+<constructor name="TabWidget"
+ type="android.widget.TabWidget"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="context" type="android.content.Context">
+</parameter>
+<parameter name="attrs" type="android.util.AttributeSet">
+</parameter>
+</constructor>
+<constructor name="TabWidget"
+ type="android.widget.TabWidget"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="context" type="android.content.Context">
+</parameter>
+<parameter name="attrs" type="android.util.AttributeSet">
+</parameter>
+<parameter name="defStyle" type="int">
+</parameter>
+</constructor>
+<method name="dispatchDraw"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="canvas" type="android.graphics.Canvas">
+</parameter>
+</method>
+<method name="focusCurrentTab"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="index" type="int">
+</parameter>
+</method>
+<method name="getChildTabViewAt"
+ return="android.view.View"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="index" type="int">
+</parameter>
+</method>
+<method name="getTabCount"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isStripEnabled"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="onFocusChange"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="v" type="android.view.View">
+</parameter>
+<parameter name="hasFocus" type="boolean">
+</parameter>
+</method>
+<method name="setCurrentTab"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="index" type="int">
+</parameter>
+</method>
+<method name="setDividerDrawable"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="drawable" type="android.graphics.drawable.Drawable">
+</parameter>
+</method>
+<method name="setDividerDrawable"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="resId" type="int">
+</parameter>
+</method>
+<method name="setLeftStripDrawable"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="drawable" type="android.graphics.drawable.Drawable">
+</parameter>
+</method>
+<method name="setLeftStripDrawable"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="resId" type="int">
+</parameter>
+</method>
+<method name="setRightStripDrawable"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="drawable" type="android.graphics.drawable.Drawable">
+</parameter>
+</method>
+<method name="setRightStripDrawable"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="resId" type="int">
+</parameter>
+</method>
+<method name="setStripEnabled"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="stripEnabled" type="boolean">
+</parameter>
+</method>
+</class>
+<class name="TableLayout"
+ extends="android.widget.LinearLayout"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="TableLayout"
+ type="android.widget.TableLayout"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="context" type="android.content.Context">
+</parameter>
+</constructor>
+<constructor name="TableLayout"
+ type="android.widget.TableLayout"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="context" type="android.content.Context">
+</parameter>
+<parameter name="attrs" type="android.util.AttributeSet">
+</parameter>
+</constructor>
+<method name="isColumnCollapsed"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="columnIndex" type="int">
+</parameter>
+</method>
+<method name="isColumnShrinkable"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="columnIndex" type="int">
+</parameter>
+</method>
+<method name="isColumnStretchable"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="columnIndex" type="int">
+</parameter>
+</method>
+<method name="isShrinkAllColumns"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isStretchAllColumns"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="setColumnCollapsed"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="columnIndex" type="int">
+</parameter>
+<parameter name="isCollapsed" type="boolean">
+</parameter>
+</method>
+<method name="setColumnShrinkable"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="columnIndex" type="int">
+</parameter>
+<parameter name="isShrinkable" type="boolean">
+</parameter>
+</method>
+<method name="setColumnStretchable"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="columnIndex" type="int">
+</parameter>
+<parameter name="isStretchable" type="boolean">
+</parameter>
+</method>
+<method name="setShrinkAllColumns"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="shrinkAllColumns" type="boolean">
+</parameter>
+</method>
+<method name="setStretchAllColumns"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="stretchAllColumns" type="boolean">
+</parameter>
+</method>
+</class>
+<class name="TableLayout.LayoutParams"
+ extends="android.widget.LinearLayout.LayoutParams"
+ abstract="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="TableLayout.LayoutParams"
+ type="android.widget.TableLayout.LayoutParams"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="c" type="android.content.Context">
+</parameter>
+<parameter name="attrs" type="android.util.AttributeSet">
+</parameter>
+</constructor>
+<constructor name="TableLayout.LayoutParams"
+ type="android.widget.TableLayout.LayoutParams"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="w" type="int">
+</parameter>
+<parameter name="h" type="int">
+</parameter>
+</constructor>
+<constructor name="TableLayout.LayoutParams"
+ type="android.widget.TableLayout.LayoutParams"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="w" type="int">
+</parameter>
+<parameter name="h" type="int">
+</parameter>
+<parameter name="initWeight" type="float">
+</parameter>
+</constructor>
+<constructor name="TableLayout.LayoutParams"
+ type="android.widget.TableLayout.LayoutParams"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<constructor name="TableLayout.LayoutParams"
+ type="android.widget.TableLayout.LayoutParams"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="p" type="android.view.ViewGroup.LayoutParams">
+</parameter>
+</constructor>
+<constructor name="TableLayout.LayoutParams"
+ type="android.widget.TableLayout.LayoutParams"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="source" type="android.view.ViewGroup.MarginLayoutParams">
+</parameter>
+</constructor>
+</class>
+<class name="TableRow"
+ extends="android.widget.LinearLayout"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="TableRow"
+ type="android.widget.TableRow"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="context" type="android.content.Context">
+</parameter>
+</constructor>
+<constructor name="TableRow"
+ type="android.widget.TableRow"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="context" type="android.content.Context">
+</parameter>
+<parameter name="attrs" type="android.util.AttributeSet">
+</parameter>
+</constructor>
+<method name="getVirtualChildAt"
+ return="android.view.View"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="i" type="int">
+</parameter>
+</method>
+<method name="getVirtualChildCount"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+</class>
+<class name="TableRow.LayoutParams"
+ extends="android.widget.LinearLayout.LayoutParams"
+ abstract="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="TableRow.LayoutParams"
+ type="android.widget.TableRow.LayoutParams"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="c" type="android.content.Context">
+</parameter>
+<parameter name="attrs" type="android.util.AttributeSet">
+</parameter>
+</constructor>
+<constructor name="TableRow.LayoutParams"
+ type="android.widget.TableRow.LayoutParams"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="w" type="int">
+</parameter>
+<parameter name="h" type="int">
+</parameter>
+</constructor>
+<constructor name="TableRow.LayoutParams"
+ type="android.widget.TableRow.LayoutParams"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="w" type="int">
+</parameter>
+<parameter name="h" type="int">
+</parameter>
+<parameter name="initWeight" type="float">
+</parameter>
+</constructor>
+<constructor name="TableRow.LayoutParams"
+ type="android.widget.TableRow.LayoutParams"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<constructor name="TableRow.LayoutParams"
+ type="android.widget.TableRow.LayoutParams"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="column" type="int">
+</parameter>
+</constructor>
+<constructor name="TableRow.LayoutParams"
+ type="android.widget.TableRow.LayoutParams"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="p" type="android.view.ViewGroup.LayoutParams">
+</parameter>
+</constructor>
+<constructor name="TableRow.LayoutParams"
+ type="android.widget.TableRow.LayoutParams"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="source" type="android.view.ViewGroup.MarginLayoutParams">
+</parameter>
+</constructor>
+<field name="column"
+ type="int"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="span"
+ type="int"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<class name="TextSwitcher"
+ extends="android.widget.ViewSwitcher"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="TextSwitcher"
+ type="android.widget.TextSwitcher"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="context" type="android.content.Context">
+</parameter>
+</constructor>
+<constructor name="TextSwitcher"
+ type="android.widget.TextSwitcher"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="context" type="android.content.Context">
+</parameter>
+<parameter name="attrs" type="android.util.AttributeSet">
+</parameter>
+</constructor>
+<method name="setCurrentText"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="text" type="java.lang.CharSequence">
+</parameter>
+</method>
+<method name="setText"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="text" type="java.lang.CharSequence">
+</parameter>
+</method>
+</class>
+<class name="TextView"
+ extends="android.view.View"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="android.view.ViewTreeObserver.OnPreDrawListener">
+</implements>
+<constructor name="TextView"
+ type="android.widget.TextView"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="context" type="android.content.Context">
+</parameter>
+</constructor>
+<constructor name="TextView"
+ type="android.widget.TextView"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="context" type="android.content.Context">
+</parameter>
+<parameter name="attrs" type="android.util.AttributeSet">
+</parameter>
+</constructor>
+<constructor name="TextView"
+ type="android.widget.TextView"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="context" type="android.content.Context">
+</parameter>
+<parameter name="attrs" type="android.util.AttributeSet">
+</parameter>
+<parameter name="defStyle" type="int">
+</parameter>
+</constructor>
+<method name="addTextChangedListener"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="watcher" type="android.text.TextWatcher">
+</parameter>
+</method>
+<method name="append"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="text" type="java.lang.CharSequence">
+</parameter>
+</method>
+<method name="append"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="text" type="java.lang.CharSequence">
+</parameter>
+<parameter name="start" type="int">
+</parameter>
+<parameter name="end" type="int">
+</parameter>
+</method>
+<method name="beginBatchEdit"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="bringPointIntoView"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="offset" type="int">
+</parameter>
+</method>
+<method name="clearComposingText"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="debug"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="depth" type="int">
+</parameter>
+</method>
+<method name="didTouchFocusSelect"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="endBatchEdit"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="extractText"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="request" type="android.view.inputmethod.ExtractedTextRequest">
+</parameter>
+<parameter name="outText" type="android.view.inputmethod.ExtractedText">
+</parameter>
+</method>
+<method name="getAutoLinkMask"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getCompoundDrawablePadding"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getCompoundDrawables"
+ return="android.graphics.drawable.Drawable[]"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getCompoundPaddingBottom"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getCompoundPaddingLeft"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getCompoundPaddingRight"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getCompoundPaddingTop"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getCurrentHintTextColor"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getCurrentTextColor"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getDefaultEditable"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</method>
+<method name="getDefaultMovementMethod"
+ return="android.text.method.MovementMethod"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</method>
+<method name="getEditableText"
+ return="android.text.Editable"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getEllipsize"
+ return="android.text.TextUtils.TruncateAt"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getError"
+ return="java.lang.CharSequence"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getExtendedPaddingBottom"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getExtendedPaddingTop"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getFilters"
+ return="android.text.InputFilter[]"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getFreezesText"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getGravity"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getHint"
+ return="java.lang.CharSequence"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getHintTextColors"
+ return="android.content.res.ColorStateList"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getImeActionId"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getImeActionLabel"
+ return="java.lang.CharSequence"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getImeOptions"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getInputExtras"
+ return="android.os.Bundle"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="create" type="boolean">
+</parameter>
+</method>
+<method name="getInputType"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getKeyListener"
+ return="android.text.method.KeyListener"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getLayout"
+ return="android.text.Layout"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getLineBounds"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="line" type="int">
+</parameter>
+<parameter name="bounds" type="android.graphics.Rect">
+</parameter>
+</method>
+<method name="getLineCount"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getLineHeight"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getLinkTextColors"
+ return="android.content.res.ColorStateList"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getLinksClickable"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getMovementMethod"
+ return="android.text.method.MovementMethod"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getPaint"
+ return="android.text.TextPaint"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getPaintFlags"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getPrivateImeOptions"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getSelectionEnd"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getSelectionStart"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getText"
+ return="java.lang.CharSequence"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getTextColor"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="context" type="android.content.Context">
+</parameter>
+<parameter name="attrs" type="android.content.res.TypedArray">
+</parameter>
+<parameter name="def" type="int">
+</parameter>
+</method>
+<method name="getTextColors"
+ return="android.content.res.ColorStateList"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getTextColors"
+ return="android.content.res.ColorStateList"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="context" type="android.content.Context">
+</parameter>
+<parameter name="attrs" type="android.content.res.TypedArray">
+</parameter>
+</method>
+<method name="getTextScaleX"
+ return="float"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getTextSize"
+ return="float"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getTotalPaddingBottom"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getTotalPaddingLeft"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getTotalPaddingRight"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getTotalPaddingTop"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getTransformationMethod"
+ return="android.text.method.TransformationMethod"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getTypeface"
+ return="android.graphics.Typeface"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getUrls"
+ return="android.text.style.URLSpan[]"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="hasSelection"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isInputMethodTarget"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="length"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="moveCursorToVisibleOffset"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="onBeginBatchEdit"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="onCommitCompletion"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="text" type="android.view.inputmethod.CompletionInfo">
+</parameter>
+</method>
+<method name="onEditorAction"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="actionCode" type="int">
+</parameter>
+</method>
+<method name="onEndBatchEdit"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="onPreDraw"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="onPrivateIMECommand"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="action" type="java.lang.String">
+</parameter>
+<parameter name="data" type="android.os.Bundle">
+</parameter>
+</method>
+<method name="onRestoreInstanceState"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="state" type="android.os.Parcelable">
+</parameter>
+</method>
+<method name="onSaveInstanceState"
+ return="android.os.Parcelable"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="onSelectionChanged"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="selStart" type="int">
+</parameter>
+<parameter name="selEnd" type="int">
+</parameter>
+</method>
+<method name="onTextChanged"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="text" type="java.lang.CharSequence">
+</parameter>
+<parameter name="start" type="int">
+</parameter>
+<parameter name="before" type="int">
+</parameter>
+<parameter name="after" type="int">
+</parameter>
+</method>
+<method name="onTextContextMenuItem"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="id" type="int">
+</parameter>
+</method>
+<method name="removeTextChangedListener"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="watcher" type="android.text.TextWatcher">
+</parameter>
+</method>
+<method name="setAutoLinkMask"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="mask" type="int">
+</parameter>
+</method>
+<method name="setCompoundDrawablePadding"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="pad" type="int">
+</parameter>
+</method>
+<method name="setCompoundDrawables"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="left" type="android.graphics.drawable.Drawable">
+</parameter>
+<parameter name="top" type="android.graphics.drawable.Drawable">
+</parameter>
+<parameter name="right" type="android.graphics.drawable.Drawable">
+</parameter>
+<parameter name="bottom" type="android.graphics.drawable.Drawable">
+</parameter>
+</method>
+<method name="setCompoundDrawablesWithIntrinsicBounds"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="left" type="int">
+</parameter>
+<parameter name="top" type="int">
+</parameter>
+<parameter name="right" type="int">
+</parameter>
+<parameter name="bottom" type="int">
+</parameter>
+</method>
+<method name="setCompoundDrawablesWithIntrinsicBounds"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="left" type="android.graphics.drawable.Drawable">
+</parameter>
+<parameter name="top" type="android.graphics.drawable.Drawable">
+</parameter>
+<parameter name="right" type="android.graphics.drawable.Drawable">
+</parameter>
+<parameter name="bottom" type="android.graphics.drawable.Drawable">
+</parameter>
+</method>
+<method name="setCursorVisible"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="visible" type="boolean">
+</parameter>
+</method>
+<method name="setEditableFactory"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="factory" type="android.text.Editable.Factory">
+</parameter>
+</method>
+<method name="setEllipsize"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="where" type="android.text.TextUtils.TruncateAt">
+</parameter>
+</method>
+<method name="setEms"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="ems" type="int">
+</parameter>
+</method>
+<method name="setError"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="error" type="java.lang.CharSequence">
+</parameter>
+</method>
+<method name="setError"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="error" type="java.lang.CharSequence">
+</parameter>
+<parameter name="icon" type="android.graphics.drawable.Drawable">
+</parameter>
+</method>
+<method name="setExtractedText"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="text" type="android.view.inputmethod.ExtractedText">
+</parameter>
+</method>
+<method name="setFilters"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="filters" type="android.text.InputFilter[]">
+</parameter>
+</method>
+<method name="setFrame"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="l" type="int">
+</parameter>
+<parameter name="t" type="int">
+</parameter>
+<parameter name="r" type="int">
+</parameter>
+<parameter name="b" type="int">
+</parameter>
+</method>
+<method name="setFreezesText"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="freezesText" type="boolean">
+</parameter>
+</method>
+<method name="setGravity"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="gravity" type="int">
+</parameter>
+</method>
+<method name="setHeight"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="pixels" type="int">
+</parameter>
+</method>
+<method name="setHighlightColor"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="color" type="int">
+</parameter>
+</method>
+<method name="setHint"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="hint" type="java.lang.CharSequence">
+</parameter>
+</method>
+<method name="setHint"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="resid" type="int">
+</parameter>
+</method>
+<method name="setHintTextColor"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="color" type="int">
+</parameter>
+</method>
+<method name="setHintTextColor"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="colors" type="android.content.res.ColorStateList">
+</parameter>
+</method>
+<method name="setHorizontallyScrolling"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="whether" type="boolean">
+</parameter>
+</method>
+<method name="setImeActionLabel"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="label" type="java.lang.CharSequence">
+</parameter>
+<parameter name="actionId" type="int">
+</parameter>
+</method>
+<method name="setImeOptions"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="imeOptions" type="int">
+</parameter>
+</method>
+<method name="setIncludeFontPadding"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="includepad" type="boolean">
+</parameter>
+</method>
+<method name="setInputExtras"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="xmlResId" type="int">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+<exception name="XmlPullParserException" type="org.xmlpull.v1.XmlPullParserException">
+</exception>
+</method>
+<method name="setInputType"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="type" type="int">
+</parameter>
+</method>
+<method name="setKeyListener"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="input" type="android.text.method.KeyListener">
+</parameter>
+</method>
+<method name="setLineSpacing"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="add" type="float">
+</parameter>
+<parameter name="mult" type="float">
+</parameter>
+</method>
+<method name="setLines"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="lines" type="int">
+</parameter>
+</method>
+<method name="setLinkTextColor"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="color" type="int">
+</parameter>
+</method>
+<method name="setLinkTextColor"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="colors" type="android.content.res.ColorStateList">
+</parameter>
+</method>
+<method name="setLinksClickable"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="whether" type="boolean">
+</parameter>
+</method>
+<method name="setMarqueeRepeatLimit"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="marqueeLimit" type="int">
+</parameter>
+</method>
+<method name="setMaxEms"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="maxems" type="int">
+</parameter>
+</method>
+<method name="setMaxHeight"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="maxHeight" type="int">
+</parameter>
+</method>
+<method name="setMaxLines"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="maxlines" type="int">
+</parameter>
+</method>
+<method name="setMaxWidth"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="maxpixels" type="int">
+</parameter>
+</method>
+<method name="setMinEms"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="minems" type="int">
+</parameter>
+</method>
+<method name="setMinHeight"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="minHeight" type="int">
+</parameter>
+</method>
+<method name="setMinLines"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="minlines" type="int">
+</parameter>
+</method>
+<method name="setMinWidth"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="minpixels" type="int">
+</parameter>
+</method>
+<method name="setMovementMethod"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="movement" type="android.text.method.MovementMethod">
+</parameter>
+</method>
+<method name="setOnEditorActionListener"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="l" type="android.widget.TextView.OnEditorActionListener">
+</parameter>
+</method>
+<method name="setPaintFlags"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="flags" type="int">
+</parameter>
+</method>
+<method name="setPrivateImeOptions"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="type" type="java.lang.String">
+</parameter>
+</method>
+<method name="setRawInputType"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="type" type="int">
+</parameter>
+</method>
+<method name="setScroller"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="s" type="android.widget.Scroller">
+</parameter>
+</method>
+<method name="setSelectAllOnFocus"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="selectAllOnFocus" type="boolean">
+</parameter>
+</method>
+<method name="setShadowLayer"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="radius" type="float">
+</parameter>
+<parameter name="dx" type="float">
+</parameter>
+<parameter name="dy" type="float">
+</parameter>
+<parameter name="color" type="int">
+</parameter>
+</method>
+<method name="setSingleLine"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="setSingleLine"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="singleLine" type="boolean">
+</parameter>
+</method>
+<method name="setSpannableFactory"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="factory" type="android.text.Spannable.Factory">
+</parameter>
+</method>
+<method name="setText"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="text" type="java.lang.CharSequence">
+</parameter>
+</method>
+<method name="setText"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="text" type="java.lang.CharSequence">
+</parameter>
+<parameter name="type" type="android.widget.TextView.BufferType">
+</parameter>
+</method>
+<method name="setText"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="text" type="char[]">
+</parameter>
+<parameter name="start" type="int">
+</parameter>
+<parameter name="len" type="int">
+</parameter>
+</method>
+<method name="setText"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="resid" type="int">
+</parameter>
+</method>
+<method name="setText"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="resid" type="int">
+</parameter>
+<parameter name="type" type="android.widget.TextView.BufferType">
+</parameter>
+</method>
+<method name="setTextAppearance"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="context" type="android.content.Context">
+</parameter>
+<parameter name="resid" type="int">
+</parameter>
+</method>
+<method name="setTextColor"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="color" type="int">
+</parameter>
+</method>
+<method name="setTextColor"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="colors" type="android.content.res.ColorStateList">
+</parameter>
+</method>
+<method name="setTextKeepState"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="text" type="java.lang.CharSequence">
+</parameter>
+</method>
+<method name="setTextKeepState"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="text" type="java.lang.CharSequence">
+</parameter>
+<parameter name="type" type="android.widget.TextView.BufferType">
+</parameter>
+</method>
+<method name="setTextScaleX"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="size" type="float">
+</parameter>
+</method>
+<method name="setTextSize"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="size" type="float">
+</parameter>
+</method>
+<method name="setTextSize"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="unit" type="int">
+</parameter>
+<parameter name="size" type="float">
+</parameter>
+</method>
+<method name="setTransformationMethod"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="method" type="android.text.method.TransformationMethod">
+</parameter>
+</method>
+<method name="setTypeface"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="tf" type="android.graphics.Typeface">
+</parameter>
+<parameter name="style" type="int">
+</parameter>
+</method>
+<method name="setTypeface"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="tf" type="android.graphics.Typeface">
+</parameter>
+</method>
+<method name="setWidth"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="pixels" type="int">
+</parameter>
+</method>
+</class>
+<class name="TextView.BufferType"
+ extends="java.lang.Enum"
+ abstract="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="valueOf"
+ return="android.widget.TextView.BufferType"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+</method>
+<method name="values"
+ return="android.widget.TextView.BufferType[]"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+</class>
+<interface name="TextView.OnEditorActionListener"
+ abstract="true"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="onEditorAction"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="v" type="android.widget.TextView">
+</parameter>
+<parameter name="actionId" type="int">
+</parameter>
+<parameter name="event" type="android.view.KeyEvent">
+</parameter>
+</method>
+</interface>
+<class name="TextView.SavedState"
+ extends="android.view.View.BaseSavedState"
+ abstract="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<field name="CREATOR"
+ type="android.os.Parcelable.Creator"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<class name="TimePicker"
+ extends="android.widget.FrameLayout"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="TimePicker"
+ type="android.widget.TimePicker"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="context" type="android.content.Context">
+</parameter>
+</constructor>
+<constructor name="TimePicker"
+ type="android.widget.TimePicker"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="context" type="android.content.Context">
+</parameter>
+<parameter name="attrs" type="android.util.AttributeSet">
+</parameter>
+</constructor>
+<constructor name="TimePicker"
+ type="android.widget.TimePicker"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="context" type="android.content.Context">
+</parameter>
+<parameter name="attrs" type="android.util.AttributeSet">
+</parameter>
+<parameter name="defStyle" type="int">
+</parameter>
+</constructor>
+<method name="getCurrentHour"
+ return="java.lang.Integer"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getCurrentMinute"
+ return="java.lang.Integer"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="is24HourView"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="setCurrentHour"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="currentHour" type="java.lang.Integer">
+</parameter>
+</method>
+<method name="setCurrentMinute"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="currentMinute" type="java.lang.Integer">
+</parameter>
+</method>
+<method name="setIs24HourView"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="is24HourView" type="java.lang.Boolean">
+</parameter>
+</method>
+<method name="setOnTimeChangedListener"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="onTimeChangedListener" type="android.widget.TimePicker.OnTimeChangedListener">
+</parameter>
+</method>
+</class>
+<interface name="TimePicker.OnTimeChangedListener"
+ abstract="true"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="onTimeChanged"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="view" type="android.widget.TimePicker">
+</parameter>
+<parameter name="hourOfDay" type="int">
+</parameter>
+<parameter name="minute" type="int">
+</parameter>
+</method>
+</interface>
+<class name="Toast"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="Toast"
+ type="android.widget.Toast"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="context" type="android.content.Context">
+</parameter>
+</constructor>
+<method name="cancel"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getDuration"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getGravity"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getHorizontalMargin"
+ return="float"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getVerticalMargin"
+ return="float"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getView"
+ return="android.view.View"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getXOffset"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getYOffset"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="makeText"
+ return="android.widget.Toast"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="context" type="android.content.Context">
+</parameter>
+<parameter name="text" type="java.lang.CharSequence">
+</parameter>
+<parameter name="duration" type="int">
+</parameter>
+</method>
+<method name="makeText"
+ return="android.widget.Toast"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="context" type="android.content.Context">
+</parameter>
+<parameter name="resId" type="int">
+</parameter>
+<parameter name="duration" type="int">
+</parameter>
+<exception name="Resources.NotFoundException" type="android.content.res.Resources.NotFoundException">
+</exception>
+</method>
+<method name="setDuration"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="duration" type="int">
+</parameter>
+</method>
+<method name="setGravity"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="gravity" type="int">
+</parameter>
+<parameter name="xOffset" type="int">
+</parameter>
+<parameter name="yOffset" type="int">
+</parameter>
+</method>
+<method name="setMargin"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="horizontalMargin" type="float">
+</parameter>
+<parameter name="verticalMargin" type="float">
+</parameter>
+</method>
+<method name="setText"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="resId" type="int">
+</parameter>
+</method>
+<method name="setText"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="s" type="java.lang.CharSequence">
+</parameter>
+</method>
+<method name="setView"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="view" type="android.view.View">
+</parameter>
+</method>
+<method name="show"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<field name="LENGTH_LONG"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="LENGTH_SHORT"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="0"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<class name="ToggleButton"
+ extends="android.widget.CompoundButton"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="ToggleButton"
+ type="android.widget.ToggleButton"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="context" type="android.content.Context">
+</parameter>
+<parameter name="attrs" type="android.util.AttributeSet">
+</parameter>
+<parameter name="defStyle" type="int">
+</parameter>
+</constructor>
+<constructor name="ToggleButton"
+ type="android.widget.ToggleButton"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="context" type="android.content.Context">
+</parameter>
+<parameter name="attrs" type="android.util.AttributeSet">
+</parameter>
+</constructor>
+<constructor name="ToggleButton"
+ type="android.widget.ToggleButton"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="context" type="android.content.Context">
+</parameter>
+</constructor>
+<method name="getTextOff"
+ return="java.lang.CharSequence"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getTextOn"
+ return="java.lang.CharSequence"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="setTextOff"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="textOff" type="java.lang.CharSequence">
+</parameter>
+</method>
+<method name="setTextOn"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="textOn" type="java.lang.CharSequence">
+</parameter>
+</method>
+</class>
+<class name="TwoLineListItem"
+ extends="android.widget.RelativeLayout"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="TwoLineListItem"
+ type="android.widget.TwoLineListItem"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="context" type="android.content.Context">
+</parameter>
+</constructor>
+<constructor name="TwoLineListItem"
+ type="android.widget.TwoLineListItem"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="context" type="android.content.Context">
+</parameter>
+<parameter name="attrs" type="android.util.AttributeSet">
+</parameter>
+</constructor>
+<constructor name="TwoLineListItem"
+ type="android.widget.TwoLineListItem"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="context" type="android.content.Context">
+</parameter>
+<parameter name="attrs" type="android.util.AttributeSet">
+</parameter>
+<parameter name="defStyle" type="int">
+</parameter>
+</constructor>
+<method name="getText1"
+ return="android.widget.TextView"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getText2"
+ return="android.widget.TextView"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+</class>
+<class name="VideoView"
+ extends="android.view.SurfaceView"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="android.widget.MediaController.MediaPlayerControl">
+</implements>
+<constructor name="VideoView"
+ type="android.widget.VideoView"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="context" type="android.content.Context">
+</parameter>
+</constructor>
+<constructor name="VideoView"
+ type="android.widget.VideoView"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="context" type="android.content.Context">
+</parameter>
+<parameter name="attrs" type="android.util.AttributeSet">
+</parameter>
+</constructor>
+<constructor name="VideoView"
+ type="android.widget.VideoView"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="context" type="android.content.Context">
+</parameter>
+<parameter name="attrs" type="android.util.AttributeSet">
+</parameter>
+<parameter name="defStyle" type="int">
+</parameter>
+</constructor>
+<method name="canPause"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="canSeekBackward"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="canSeekForward"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getBufferPercentage"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getCurrentPosition"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getDuration"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isPlaying"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="pause"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="resolveAdjustedSize"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="desiredSize" type="int">
+</parameter>
+<parameter name="measureSpec" type="int">
+</parameter>
+</method>
+<method name="resume"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="seekTo"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="msec" type="int">
+</parameter>
+</method>
+<method name="setMediaController"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="controller" type="android.widget.MediaController">
+</parameter>
+</method>
+<method name="setOnCompletionListener"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="l" type="android.media.MediaPlayer.OnCompletionListener">
+</parameter>
+</method>
+<method name="setOnErrorListener"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="l" type="android.media.MediaPlayer.OnErrorListener">
+</parameter>
+</method>
+<method name="setOnPreparedListener"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="l" type="android.media.MediaPlayer.OnPreparedListener">
+</parameter>
+</method>
+<method name="setVideoPath"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="path" type="java.lang.String">
+</parameter>
+</method>
+<method name="setVideoURI"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="uri" type="android.net.Uri">
+</parameter>
+</method>
+<method name="start"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="stopPlayback"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="suspend"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+</class>
+<class name="ViewAnimator"
+ extends="android.widget.FrameLayout"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="ViewAnimator"
+ type="android.widget.ViewAnimator"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="context" type="android.content.Context">
+</parameter>
+</constructor>
+<constructor name="ViewAnimator"
+ type="android.widget.ViewAnimator"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="context" type="android.content.Context">
+</parameter>
+<parameter name="attrs" type="android.util.AttributeSet">
+</parameter>
+</constructor>
+<method name="getCurrentView"
+ return="android.view.View"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getDisplayedChild"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getInAnimation"
+ return="android.view.animation.Animation"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getOutAnimation"
+ return="android.view.animation.Animation"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="setAnimateFirstView"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="animate" type="boolean">
+</parameter>
+</method>
+<method name="setDisplayedChild"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="whichChild" type="int">
+</parameter>
+</method>
+<method name="setInAnimation"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="inAnimation" type="android.view.animation.Animation">
+</parameter>
+</method>
+<method name="setInAnimation"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="context" type="android.content.Context">
+</parameter>
+<parameter name="resourceID" type="int">
+</parameter>
+</method>
+<method name="setOutAnimation"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="outAnimation" type="android.view.animation.Animation">
+</parameter>
+</method>
+<method name="setOutAnimation"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="context" type="android.content.Context">
+</parameter>
+<parameter name="resourceID" type="int">
+</parameter>
+</method>
+<method name="showNext"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="showPrevious"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+</class>
+<class name="ViewFlipper"
+ extends="android.widget.ViewAnimator"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="ViewFlipper"
+ type="android.widget.ViewFlipper"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="context" type="android.content.Context">
+</parameter>
+</constructor>
+<constructor name="ViewFlipper"
+ type="android.widget.ViewFlipper"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="context" type="android.content.Context">
+</parameter>
+<parameter name="attrs" type="android.util.AttributeSet">
+</parameter>
+</constructor>
+<method name="isAutoStart"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isFlipping"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="setAutoStart"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="autoStart" type="boolean">
+</parameter>
+</method>
+<method name="setFlipInterval"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="milliseconds" type="int">
+</parameter>
+</method>
+<method name="startFlipping"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="stopFlipping"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+</class>
+<class name="ViewSwitcher"
+ extends="android.widget.ViewAnimator"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="ViewSwitcher"
+ type="android.widget.ViewSwitcher"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="context" type="android.content.Context">
+</parameter>
+</constructor>
+<constructor name="ViewSwitcher"
+ type="android.widget.ViewSwitcher"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="context" type="android.content.Context">
+</parameter>
+<parameter name="attrs" type="android.util.AttributeSet">
+</parameter>
+</constructor>
+<method name="getNextView"
+ return="android.view.View"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="reset"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="setFactory"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="factory" type="android.widget.ViewSwitcher.ViewFactory">
+</parameter>
+</method>
+</class>
+<interface name="ViewSwitcher.ViewFactory"
+ abstract="true"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="makeView"
+ return="android.view.View"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+</interface>
+<interface name="WrapperListAdapter"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="android.widget.ListAdapter">
+</implements>
+<method name="getWrappedAdapter"
+ return="android.widget.ListAdapter"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+</interface>
+<class name="ZoomButton"
+ extends="android.widget.ImageButton"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="android.view.View.OnLongClickListener">
+</implements>
+<constructor name="ZoomButton"
+ type="android.widget.ZoomButton"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="context" type="android.content.Context">
+</parameter>
+</constructor>
+<constructor name="ZoomButton"
+ type="android.widget.ZoomButton"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="context" type="android.content.Context">
+</parameter>
+<parameter name="attrs" type="android.util.AttributeSet">
+</parameter>
+</constructor>
+<constructor name="ZoomButton"
+ type="android.widget.ZoomButton"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="context" type="android.content.Context">
+</parameter>
+<parameter name="attrs" type="android.util.AttributeSet">
+</parameter>
+<parameter name="defStyle" type="int">
+</parameter>
+</constructor>
+<method name="onLongClick"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="v" type="android.view.View">
+</parameter>
+</method>
+<method name="setZoomSpeed"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="speed" type="long">
+</parameter>
+</method>
+</class>
+<class name="ZoomButtonsController"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="android.view.View.OnTouchListener">
+</implements>
+<constructor name="ZoomButtonsController"
+ type="android.widget.ZoomButtonsController"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="ownerView" type="android.view.View">
+</parameter>
+</constructor>
+<method name="getContainer"
+ return="android.view.ViewGroup"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getZoomControls"
+ return="android.view.View"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isAutoDismissed"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isVisible"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="onTouch"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="v" type="android.view.View">
+</parameter>
+<parameter name="event" type="android.view.MotionEvent">
+</parameter>
+</method>
+<method name="setAutoDismissed"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="autoDismiss" type="boolean">
+</parameter>
+</method>
+<method name="setFocusable"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="focusable" type="boolean">
+</parameter>
+</method>
+<method name="setOnZoomListener"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="listener" type="android.widget.ZoomButtonsController.OnZoomListener">
+</parameter>
+</method>
+<method name="setVisible"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="visible" type="boolean">
+</parameter>
+</method>
+<method name="setZoomInEnabled"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="enabled" type="boolean">
+</parameter>
+</method>
+<method name="setZoomOutEnabled"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="enabled" type="boolean">
+</parameter>
+</method>
+<method name="setZoomSpeed"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="speed" type="long">
+</parameter>
+</method>
+</class>
+<interface name="ZoomButtonsController.OnZoomListener"
+ abstract="true"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="onVisibilityChanged"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="visible" type="boolean">
+</parameter>
+</method>
+<method name="onZoom"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="zoomIn" type="boolean">
+</parameter>
+</method>
+</interface>
+<class name="ZoomControls"
+ extends="android.widget.LinearLayout"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="ZoomControls"
+ type="android.widget.ZoomControls"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="context" type="android.content.Context">
+</parameter>
+</constructor>
+<constructor name="ZoomControls"
+ type="android.widget.ZoomControls"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="context" type="android.content.Context">
+</parameter>
+<parameter name="attrs" type="android.util.AttributeSet">
+</parameter>
+</constructor>
+<method name="hide"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="setIsZoomInEnabled"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="isEnabled" type="boolean">
+</parameter>
+</method>
+<method name="setIsZoomOutEnabled"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="isEnabled" type="boolean">
+</parameter>
+</method>
+<method name="setOnZoomInClickListener"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="listener" type="android.view.View.OnClickListener">
+</parameter>
+</method>
+<method name="setOnZoomOutClickListener"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="listener" type="android.view.View.OnClickListener">
+</parameter>
+</method>
+<method name="setZoomSpeed"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="speed" type="long">
+</parameter>
+</method>
+<method name="show"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+</class>
+</package>
+<package name="com.android.internal.util"
+>
+<interface name="Predicate"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="apply"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="arg0" type="T">
+</parameter>
+</method>
+</interface>
+</package>
+<package name="dalvik.annotation"
+>
+<class name="TestTarget"
+ extends="java.lang.Object"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="java.lang.annotation.Annotation">
+</implements>
+</class>
+<class name="TestTargetClass"
+ extends="java.lang.Object"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="java.lang.annotation.Annotation">
+</implements>
+</class>
+</package>
+<package name="dalvik.bytecode"
+>
+<interface name="Opcodes"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<field name="OP_ADD_DOUBLE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="171"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="OP_ADD_DOUBLE_2ADDR"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="203"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="OP_ADD_FLOAT"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="166"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="OP_ADD_FLOAT_2ADDR"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="198"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="OP_ADD_INT"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="144"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="OP_ADD_INT_2ADDR"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="176"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="OP_ADD_INT_LIT16"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="208"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="OP_ADD_INT_LIT8"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="216"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="OP_ADD_LONG"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="155"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="OP_ADD_LONG_2ADDR"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="187"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="OP_AGET"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="68"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="OP_AGET_BOOLEAN"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="71"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="OP_AGET_BYTE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="72"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="OP_AGET_CHAR"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="73"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="OP_AGET_OBJECT"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="70"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="OP_AGET_SHORT"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="74"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="OP_AGET_WIDE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="69"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="OP_AND_INT"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="149"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="OP_AND_INT_2ADDR"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="181"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="OP_AND_INT_LIT16"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="213"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="OP_AND_INT_LIT8"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="221"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="OP_AND_LONG"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="160"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="OP_AND_LONG_2ADDR"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="192"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="OP_APUT"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="75"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="OP_APUT_BOOLEAN"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="78"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="OP_APUT_BYTE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="79"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="OP_APUT_CHAR"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="80"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="OP_APUT_OBJECT"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="77"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="OP_APUT_SHORT"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="81"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="OP_APUT_WIDE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="76"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="OP_ARRAY_LENGTH"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="33"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="OP_BREAKPOINT"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="236"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="OP_CHECK_CAST"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="31"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="OP_CMPG_DOUBLE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="48"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="OP_CMPG_FLOAT"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="46"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="OP_CMPL_DOUBLE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="47"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="OP_CMPL_FLOAT"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="45"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="OP_CMP_LONG"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="49"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="OP_CONST"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="20"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="OP_CONST_16"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="19"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="OP_CONST_4"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="18"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="OP_CONST_CLASS"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="28"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="OP_CONST_HIGH16"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="21"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="OP_CONST_STRING"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="26"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="OP_CONST_STRING_JUMBO"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="27"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="OP_CONST_WIDE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="24"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="OP_CONST_WIDE_16"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="22"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="OP_CONST_WIDE_32"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="23"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="OP_CONST_WIDE_HIGH16"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="25"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="OP_DIV_DOUBLE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="174"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="OP_DIV_DOUBLE_2ADDR"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="206"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="OP_DIV_FLOAT"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="169"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="OP_DIV_FLOAT_2ADDR"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="201"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="OP_DIV_INT"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="147"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="OP_DIV_INT_2ADDR"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="179"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="OP_DIV_INT_LIT16"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="211"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="OP_DIV_INT_LIT8"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="219"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="OP_DIV_LONG"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="158"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="OP_DIV_LONG_2ADDR"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="190"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="OP_DOUBLE_TO_FLOAT"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="140"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="OP_DOUBLE_TO_INT"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="138"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="OP_DOUBLE_TO_LONG"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="139"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="OP_EXECUTE_INLINE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="238"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="OP_EXECUTE_INLINE_RANGE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="239"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="OP_FILLED_NEW_ARRAY"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="36"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="OP_FILLED_NEW_ARRAY_RANGE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="37"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="OP_FILL_ARRAY_DATA"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="38"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="OP_FLOAT_TO_DOUBLE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="137"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="OP_FLOAT_TO_INT"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="135"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="OP_FLOAT_TO_LONG"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="136"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="OP_GOTO"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="40"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="OP_GOTO_16"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="41"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="OP_GOTO_32"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="42"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="OP_IF_EQ"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="50"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="OP_IF_EQZ"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="56"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="OP_IF_GE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="53"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="OP_IF_GEZ"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="59"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="OP_IF_GT"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="54"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="OP_IF_GTZ"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="60"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="OP_IF_LE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="55"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="OP_IF_LEZ"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="61"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="OP_IF_LT"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="52"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="OP_IF_LTZ"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="58"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="OP_IF_NE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="51"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="OP_IF_NEZ"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="57"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="OP_IGET"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="82"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="OP_IGET_BOOLEAN"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="85"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="OP_IGET_BYTE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="86"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="OP_IGET_CHAR"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="87"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="OP_IGET_OBJECT"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="84"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="OP_IGET_OBJECT_QUICK"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="244"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="OP_IGET_QUICK"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="242"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="OP_IGET_SHORT"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="88"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="OP_IGET_WIDE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="83"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="OP_IGET_WIDE_QUICK"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="243"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="OP_INSTANCE_OF"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="32"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="OP_INT_TO_BYTE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="141"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="OP_INT_TO_CHAR"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="142"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="OP_INT_TO_DOUBLE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="131"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="OP_INT_TO_FLOAT"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="130"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="OP_INT_TO_LONG"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="129"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="OP_INT_TO_SHORT"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="143"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="OP_INVOKE_DIRECT"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="112"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="OP_INVOKE_DIRECT_EMPTY"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="240"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="OP_INVOKE_DIRECT_RANGE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="118"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="OP_INVOKE_INTERFACE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="114"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="OP_INVOKE_INTERFACE_RANGE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="120"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="OP_INVOKE_STATIC"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="113"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="OP_INVOKE_STATIC_RANGE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="119"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="OP_INVOKE_SUPER"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="111"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="OP_INVOKE_SUPER_QUICK"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="250"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="OP_INVOKE_SUPER_QUICK_RANGE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="251"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="OP_INVOKE_SUPER_RANGE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="117"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="OP_INVOKE_VIRTUAL"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="110"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="OP_INVOKE_VIRTUAL_QUICK"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="248"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="OP_INVOKE_VIRTUAL_QUICK_RANGE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="249"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="OP_INVOKE_VIRTUAL_RANGE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="116"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="OP_IPUT"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="89"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="OP_IPUT_BOOLEAN"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="92"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="OP_IPUT_BYTE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="93"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="OP_IPUT_CHAR"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="94"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="OP_IPUT_OBJECT"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="91"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="OP_IPUT_OBJECT_QUICK"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="247"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="OP_IPUT_QUICK"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="245"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="OP_IPUT_SHORT"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="95"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="OP_IPUT_WIDE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="90"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="OP_IPUT_WIDE_QUICK"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="246"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="OP_LONG_TO_DOUBLE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="134"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="OP_LONG_TO_FLOAT"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="133"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="OP_LONG_TO_INT"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="132"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="OP_MONITOR_ENTER"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="29"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="OP_MONITOR_EXIT"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="30"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="OP_MOVE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="OP_MOVE_16"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="3"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="OP_MOVE_EXCEPTION"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="13"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="OP_MOVE_FROM16"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="OP_MOVE_OBJECT"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="7"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="OP_MOVE_OBJECT_16"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="9"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="OP_MOVE_OBJECT_FROM16"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="8"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="OP_MOVE_RESULT"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="10"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="OP_MOVE_RESULT_OBJECT"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="12"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="OP_MOVE_RESULT_WIDE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="11"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="OP_MOVE_WIDE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="4"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="OP_MOVE_WIDE_16"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="6"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="OP_MOVE_WIDE_FROM16"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="5"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="OP_MUL_DOUBLE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="173"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="OP_MUL_DOUBLE_2ADDR"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="205"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="OP_MUL_FLOAT"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="168"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="OP_MUL_FLOAT_2ADDR"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="200"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="OP_MUL_INT"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="146"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="OP_MUL_INT_2ADDR"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="178"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="OP_MUL_INT_LIT16"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="210"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="OP_MUL_INT_LIT8"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="218"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="OP_MUL_LONG"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="157"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="OP_MUL_LONG_2ADDR"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="189"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="OP_NEG_DOUBLE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="128"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="OP_NEG_FLOAT"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="127"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="OP_NEG_INT"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="123"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="OP_NEG_LONG"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="125"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="OP_NEW_ARRAY"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="35"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="OP_NEW_INSTANCE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="34"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="OP_NOP"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="0"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="OP_NOT_INT"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="124"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="OP_NOT_LONG"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="126"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="OP_OR_INT"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="150"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="OP_OR_INT_2ADDR"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="182"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="OP_OR_INT_LIT16"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="214"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="OP_OR_INT_LIT8"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="222"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="OP_OR_LONG"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="161"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="OP_OR_LONG_2ADDR"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="193"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="OP_PACKED_SWITCH"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="43"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="OP_REM_DOUBLE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="175"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="OP_REM_DOUBLE_2ADDR"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="207"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="OP_REM_FLOAT"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="170"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="OP_REM_FLOAT_2ADDR"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="202"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="OP_REM_INT"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="148"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="OP_REM_INT_2ADDR"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="180"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="OP_REM_INT_LIT16"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="212"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="OP_REM_INT_LIT8"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="220"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="OP_REM_LONG"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="159"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="OP_REM_LONG_2ADDR"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="191"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="OP_RETURN"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="15"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="OP_RETURN_OBJECT"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="17"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="OP_RETURN_VOID"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="14"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="OP_RETURN_WIDE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="OP_RSUB_INT"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="209"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="OP_RSUB_INT_LIT8"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="217"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="OP_SGET"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="96"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="OP_SGET_BOOLEAN"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="99"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="OP_SGET_BYTE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="100"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="OP_SGET_CHAR"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="101"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="OP_SGET_OBJECT"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="98"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="OP_SGET_SHORT"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="102"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="OP_SGET_WIDE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="97"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="OP_SHL_INT"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="152"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="OP_SHL_INT_2ADDR"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="184"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="OP_SHL_INT_LIT8"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="224"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="OP_SHL_LONG"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="163"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="OP_SHL_LONG_2ADDR"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="195"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="OP_SHR_INT"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="153"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="OP_SHR_INT_2ADDR"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="185"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="OP_SHR_INT_LIT8"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="225"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="OP_SHR_LONG"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="164"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="OP_SHR_LONG_2ADDR"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="196"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="OP_SPARSE_SWITCH"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="44"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="OP_SPUT"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="103"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="OP_SPUT_BOOLEAN"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="106"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="OP_SPUT_BYTE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="107"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="OP_SPUT_CHAR"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="108"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="OP_SPUT_OBJECT"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="105"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="OP_SPUT_SHORT"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="109"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="OP_SPUT_WIDE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="104"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="OP_SUB_DOUBLE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="172"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="OP_SUB_DOUBLE_2ADDR"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="204"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="OP_SUB_FLOAT"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="167"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="OP_SUB_FLOAT_2ADDR"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="199"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="OP_SUB_INT"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="145"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="OP_SUB_INT_2ADDR"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="177"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="OP_SUB_LONG"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="156"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="OP_SUB_LONG_2ADDR"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="188"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="OP_THROW"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="39"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="OP_THROW_VERIFICATION_ERROR"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="237"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="OP_USHR_INT"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="154"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="OP_USHR_INT_2ADDR"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="186"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="OP_USHR_INT_LIT8"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="226"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="OP_USHR_LONG"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="165"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="OP_USHR_LONG_2ADDR"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="197"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="OP_XOR_INT"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="151"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="OP_XOR_INT_2ADDR"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="183"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="OP_XOR_INT_LIT16"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="215"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="OP_XOR_INT_LIT8"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="223"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="OP_XOR_LONG"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="162"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="OP_XOR_LONG_2ADDR"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="194"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</interface>
+</package>
+<package name="dalvik.system"
+>
+<class name="AllocationLimitError"
+ extends="java.lang.VirtualMachineError"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="deprecated"
+ visibility="public"
+>
+<constructor name="AllocationLimitError"
+ type="dalvik.system.AllocationLimitError"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<constructor name="AllocationLimitError"
+ type="dalvik.system.AllocationLimitError"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="detailMessage" type="java.lang.String">
+</parameter>
+</constructor>
+</class>
+<class name="DexClassLoader"
+ extends="java.lang.ClassLoader"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="DexClassLoader"
+ type="dalvik.system.DexClassLoader"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="dexPath" type="java.lang.String">
+</parameter>
+<parameter name="dexOutputDir" type="java.lang.String">
+</parameter>
+<parameter name="libPath" type="java.lang.String">
+</parameter>
+<parameter name="parent" type="java.lang.ClassLoader">
+</parameter>
+</constructor>
+</class>
+<class name="DexFile"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="DexFile"
+ type="dalvik.system.DexFile"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="file" type="java.io.File">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</constructor>
+<constructor name="DexFile"
+ type="dalvik.system.DexFile"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="fileName" type="java.lang.String">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</constructor>
+<method name="close"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="entries"
+ return="java.util.Enumeration&lt;java.lang.String&gt;"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getName"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isDexOptNeeded"
+ return="boolean"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="fileName" type="java.lang.String">
+</parameter>
+<exception name="FileNotFoundException" type="java.io.FileNotFoundException">
+</exception>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="loadClass"
+ return="java.lang.Class"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+<parameter name="loader" type="java.lang.ClassLoader">
+</parameter>
+</method>
+<method name="loadDex"
+ return="dalvik.system.DexFile"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="sourcePathName" type="java.lang.String">
+</parameter>
+<parameter name="outputPathName" type="java.lang.String">
+</parameter>
+<parameter name="flags" type="int">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+</class>
+<class name="PathClassLoader"
+ extends="java.lang.ClassLoader"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="PathClassLoader"
+ type="dalvik.system.PathClassLoader"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="path" type="java.lang.String">
+</parameter>
+<parameter name="parent" type="java.lang.ClassLoader">
+</parameter>
+</constructor>
+<constructor name="PathClassLoader"
+ type="dalvik.system.PathClassLoader"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="path" type="java.lang.String">
+</parameter>
+<parameter name="libPath" type="java.lang.String">
+</parameter>
+<parameter name="parent" type="java.lang.ClassLoader">
+</parameter>
+</constructor>
+</class>
+<class name="PotentialDeadlockError"
+ extends="java.lang.VirtualMachineError"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="deprecated"
+ visibility="public"
+>
+<constructor name="PotentialDeadlockError"
+ type="dalvik.system.PotentialDeadlockError"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<constructor name="PotentialDeadlockError"
+ type="dalvik.system.PotentialDeadlockError"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="detailMessage" type="java.lang.String">
+</parameter>
+</constructor>
+</class>
+<class name="StaleDexCacheError"
+ extends="java.lang.VirtualMachineError"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="deprecated"
+ visibility="public"
+>
+<constructor name="StaleDexCacheError"
+ type="dalvik.system.StaleDexCacheError"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<constructor name="StaleDexCacheError"
+ type="dalvik.system.StaleDexCacheError"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="detailMessage" type="java.lang.String">
+</parameter>
+</constructor>
+</class>
+<class name="TemporaryDirectory"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="deprecated"
+ visibility="public"
+>
+<constructor name="TemporaryDirectory"
+ type="dalvik.system.TemporaryDirectory"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<method name="setUpDirectory"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="baseDir" type="java.lang.String">
+</parameter>
+</method>
+<method name="setUpDirectory"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="true"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="baseDir" type="java.io.File">
+</parameter>
+</method>
+</class>
+<class name="TouchDex"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="deprecated"
+ visibility="public"
+>
+<constructor name="TouchDex"
+ type="dalvik.system.TouchDex"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<method name="main"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="args" type="java.lang.String[]">
+</parameter>
+</method>
+<method name="start"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="dexFiles" type="java.lang.String">
+</parameter>
+</method>
+</class>
+<class name="VMDebug"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="true"
+ deprecated="deprecated"
+ visibility="public"
+>
+<method name="dumpHprofData"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="fileName" type="java.lang.String">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="getAllocCount"
+ return="int"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="kind" type="int">
+</parameter>
+</method>
+<method name="getInstructionCount"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="counts" type="int[]">
+</parameter>
+</method>
+<method name="getLoadedClassCount"
+ return="int"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isDebuggerConnected"
+ return="boolean"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isDebuggingEnabled"
+ return="boolean"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="lastDebuggerActivity"
+ return="long"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="printLoadedClasses"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="flags" type="int">
+</parameter>
+</method>
+<method name="resetAllocCount"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="kinds" type="int">
+</parameter>
+</method>
+<method name="resetInstructionCount"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="setAllocationLimit"
+ return="int"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="limit" type="int">
+</parameter>
+</method>
+<method name="setGlobalAllocationLimit"
+ return="int"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="limit" type="int">
+</parameter>
+</method>
+<method name="startAllocCounting"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="startEmulatorTracing"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="startInstructionCounting"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="startMethodTracing"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="deprecated"
+ visibility="public"
+>
+</method>
+<method name="startMethodTracing"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="traceFileName" type="java.lang.String">
+</parameter>
+<parameter name="bufferSize" type="int">
+</parameter>
+<parameter name="flags" type="int">
+</parameter>
+</method>
+<method name="stopAllocCounting"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="stopEmulatorTracing"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="stopInstructionCounting"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="stopMethodTracing"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="threadCpuTimeNanos"
+ return="long"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<field name="DEFAULT_METHOD_TRACE_FILE_NAME"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;/sdcard/dmtrace.trace&quot;"
+ static="true"
+ final="true"
+ deprecated="deprecated"
+ visibility="public"
+>
+</field>
+<field name="KIND_ALL_COUNTS"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="-1"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="KIND_GLOBAL_ALLOCATED_BYTES"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="KIND_GLOBAL_ALLOCATED_OBJECTS"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="KIND_GLOBAL_CLASS_INIT_COUNT"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="32"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="KIND_GLOBAL_CLASS_INIT_TIME"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="64"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="KIND_GLOBAL_EXT_ALLOCATED_BYTES"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="8192"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="KIND_GLOBAL_EXT_ALLOCATED_OBJECTS"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="4096"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="KIND_GLOBAL_EXT_FREED_BYTES"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="32768"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="KIND_GLOBAL_EXT_FREED_OBJECTS"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16384"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="KIND_GLOBAL_FREED_BYTES"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="8"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="KIND_GLOBAL_FREED_OBJECTS"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="4"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="KIND_GLOBAL_GC_INVOCATIONS"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="KIND_THREAD_ALLOCATED_BYTES"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="131072"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="KIND_THREAD_ALLOCATED_OBJECTS"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="65536"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="KIND_THREAD_CLASS_INIT_COUNT"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2097152"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="KIND_THREAD_CLASS_INIT_TIME"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="4194304"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="KIND_THREAD_EXT_ALLOCATED_BYTES"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="536870912"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="KIND_THREAD_EXT_ALLOCATED_OBJECTS"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="268435456"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="KIND_THREAD_EXT_FREED_BYTES"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="-2147483648"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="KIND_THREAD_EXT_FREED_OBJECTS"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1073741824"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="KIND_THREAD_FREED_BYTES"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="524288"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="KIND_THREAD_FREED_OBJECTS"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="262144"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="KIND_THREAD_GC_INVOCATIONS"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1048576"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TRACE_COUNT_ALLOCS"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<class name="VMRuntime"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="true"
+ deprecated="deprecated"
+ visibility="public"
+>
+<method name="gcSoftReferences"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getExternalBytesAllocated"
+ return="long"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getMinimumHeapSize"
+ return="long"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getRuntime"
+ return="dalvik.system.VMRuntime"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getTargetHeapUtilization"
+ return="float"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="runFinalizationSync"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="setMinimumHeapSize"
+ return="long"
+ abstract="false"
+ native="false"
+ synchronized="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="size" type="long">
+</parameter>
+</method>
+<method name="setTargetHeapUtilization"
+ return="float"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="newTarget" type="float">
+</parameter>
+</method>
+</class>
+<class name="VMStack"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="true"
+ deprecated="deprecated"
+ visibility="public"
+>
+<constructor name="VMStack"
+ type="dalvik.system.VMStack"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<method name="getCallingClassLoader"
+ return="java.lang.ClassLoader"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getCallingClassLoader2"
+ return="java.lang.ClassLoader"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getClasses"
+ return="java.lang.Class&lt;?&gt;[]"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="maxDepth" type="int">
+</parameter>
+<parameter name="stopAtPrivileged" type="boolean">
+</parameter>
+</method>
+<method name="getThreadStackTrace"
+ return="java.lang.StackTraceElement[]"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="t" type="java.lang.Thread">
+</parameter>
+</method>
+</class>
+<class name="Zygote"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="deprecated"
+ visibility="public"
+>
+<method name="fork"
+ return="int"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="forkAndSpecialize"
+ return="int"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="uid" type="int">
+</parameter>
+<parameter name="gid" type="int">
+</parameter>
+<parameter name="gids" type="int[]">
+</parameter>
+<parameter name="debugFlags" type="int">
+</parameter>
+<parameter name="rlimits" type="int[][]">
+</parameter>
+</method>
+<method name="forkAndSpecialize"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="deprecated"
+ visibility="public"
+>
+<parameter name="uid" type="int">
+</parameter>
+<parameter name="gid" type="int">
+</parameter>
+<parameter name="gids" type="int[]">
+</parameter>
+<parameter name="enableDebugger" type="boolean">
+</parameter>
+<parameter name="rlimits" type="int[][]">
+</parameter>
+</method>
+<method name="forkSystemServer"
+ return="int"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="uid" type="int">
+</parameter>
+<parameter name="gid" type="int">
+</parameter>
+<parameter name="gids" type="int[]">
+</parameter>
+<parameter name="debugFlags" type="int">
+</parameter>
+<parameter name="rlimits" type="int[][]">
+</parameter>
+</method>
+<method name="forkSystemServer"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="deprecated"
+ visibility="public"
+>
+<parameter name="uid" type="int">
+</parameter>
+<parameter name="gid" type="int">
+</parameter>
+<parameter name="gids" type="int[]">
+</parameter>
+<parameter name="enableDebugger" type="boolean">
+</parameter>
+<parameter name="rlimits" type="int[][]">
+</parameter>
+</method>
+<field name="DEBUG_ENABLE_ASSERT"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="4"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="DEBUG_ENABLE_CHECKJNI"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="DEBUG_ENABLE_DEBUGGER"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="DEBUG_ENABLE_SAFEMODE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="8"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+</package>
+<package name="java.awt.font"
+>
+<class name="NumericShaper"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="java.io.Serializable">
+</implements>
+<method name="getContextualShaper"
+ return="java.awt.font.NumericShaper"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="ranges" type="int">
+</parameter>
+<parameter name="defaultContext" type="int">
+</parameter>
+</method>
+<method name="getContextualShaper"
+ return="java.awt.font.NumericShaper"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="ranges" type="int">
+</parameter>
+</method>
+<method name="getRanges"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getShaper"
+ return="java.awt.font.NumericShaper"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="singleRange" type="int">
+</parameter>
+</method>
+<method name="isContextual"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="shape"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="text" type="char[]">
+</parameter>
+<parameter name="start" type="int">
+</parameter>
+<parameter name="count" type="int">
+</parameter>
+<parameter name="context" type="int">
+</parameter>
+</method>
+<method name="shape"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="text" type="char[]">
+</parameter>
+<parameter name="start" type="int">
+</parameter>
+<parameter name="count" type="int">
+</parameter>
+</method>
+<field name="ALL_RANGES"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="524287"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ARABIC"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="BENGALI"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="DEVANAGARI"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="8"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="EASTERN_ARABIC"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="4"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ETHIOPIC"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="65536"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="EUROPEAN"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GUJARATI"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="64"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GURMUKHI"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="32"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="KANNADA"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1024"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="KHMER"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="131072"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="LAO"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="8192"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="MALAYALAM"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2048"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="MONGOLIAN"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="262144"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="MYANMAR"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="32768"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ORIYA"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="128"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TAMIL"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="256"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TELUGU"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="512"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="THAI"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="4096"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TIBETAN"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16384"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<class name="TextAttribute"
+ extends="java.text.AttributedCharacterIterator.Attribute"
+ abstract="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="TextAttribute"
+ type="java.awt.font.TextAttribute"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+</constructor>
+<field name="BACKGROUND"
+ type="java.awt.font.TextAttribute"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="BIDI_EMBEDDING"
+ type="java.awt.font.TextAttribute"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="CHAR_REPLACEMENT"
+ type="java.awt.font.TextAttribute"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="FAMILY"
+ type="java.awt.font.TextAttribute"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="FONT"
+ type="java.awt.font.TextAttribute"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="FOREGROUND"
+ type="java.awt.font.TextAttribute"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="INPUT_METHOD_HIGHLIGHT"
+ type="java.awt.font.TextAttribute"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="INPUT_METHOD_UNDERLINE"
+ type="java.awt.font.TextAttribute"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="JUSTIFICATION"
+ type="java.awt.font.TextAttribute"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="JUSTIFICATION_FULL"
+ type="java.lang.Float"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="JUSTIFICATION_NONE"
+ type="java.lang.Float"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="NUMERIC_SHAPING"
+ type="java.awt.font.TextAttribute"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="POSTURE"
+ type="java.awt.font.TextAttribute"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="POSTURE_OBLIQUE"
+ type="java.lang.Float"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="POSTURE_REGULAR"
+ type="java.lang.Float"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="RUN_DIRECTION"
+ type="java.awt.font.TextAttribute"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="RUN_DIRECTION_LTR"
+ type="java.lang.Boolean"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="RUN_DIRECTION_RTL"
+ type="java.lang.Boolean"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="SIZE"
+ type="java.awt.font.TextAttribute"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="STRIKETHROUGH"
+ type="java.awt.font.TextAttribute"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="STRIKETHROUGH_ON"
+ type="java.lang.Boolean"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="SUPERSCRIPT"
+ type="java.awt.font.TextAttribute"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="SUPERSCRIPT_SUB"
+ type="java.lang.Integer"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="SUPERSCRIPT_SUPER"
+ type="java.lang.Integer"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="SWAP_COLORS"
+ type="java.awt.font.TextAttribute"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="SWAP_COLORS_ON"
+ type="java.lang.Boolean"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TRANSFORM"
+ type="java.awt.font.TextAttribute"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="UNDERLINE"
+ type="java.awt.font.TextAttribute"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="UNDERLINE_LOW_DASHED"
+ type="java.lang.Integer"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="UNDERLINE_LOW_DOTTED"
+ type="java.lang.Integer"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="UNDERLINE_LOW_GRAY"
+ type="java.lang.Integer"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="UNDERLINE_LOW_ONE_PIXEL"
+ type="java.lang.Integer"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="UNDERLINE_LOW_TWO_PIXEL"
+ type="java.lang.Integer"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="UNDERLINE_ON"
+ type="java.lang.Integer"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="WEIGHT"
+ type="java.awt.font.TextAttribute"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="WEIGHT_BOLD"
+ type="java.lang.Float"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="WEIGHT_DEMIBOLD"
+ type="java.lang.Float"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="WEIGHT_DEMILIGHT"
+ type="java.lang.Float"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="WEIGHT_EXTRABOLD"
+ type="java.lang.Float"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="WEIGHT_EXTRA_LIGHT"
+ type="java.lang.Float"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="WEIGHT_HEAVY"
+ type="java.lang.Float"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="WEIGHT_LIGHT"
+ type="java.lang.Float"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="WEIGHT_MEDIUM"
+ type="java.lang.Float"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="WEIGHT_REGULAR"
+ type="java.lang.Float"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="WEIGHT_SEMIBOLD"
+ type="java.lang.Float"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="WEIGHT_ULTRABOLD"
+ type="java.lang.Float"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="WIDTH"
+ type="java.awt.font.TextAttribute"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="WIDTH_CONDENSED"
+ type="java.lang.Float"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="WIDTH_EXTENDED"
+ type="java.lang.Float"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="WIDTH_REGULAR"
+ type="java.lang.Float"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="WIDTH_SEMI_CONDENSED"
+ type="java.lang.Float"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="WIDTH_SEMI_EXTENDED"
+ type="java.lang.Float"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+</package>
+<package name="java.beans"
+>
+<class name="IndexedPropertyChangeEvent"
+ extends="java.beans.PropertyChangeEvent"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="IndexedPropertyChangeEvent"
+ type="java.beans.IndexedPropertyChangeEvent"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="source" type="java.lang.Object">
+</parameter>
+<parameter name="propertyName" type="java.lang.String">
+</parameter>
+<parameter name="oldValue" type="java.lang.Object">
+</parameter>
+<parameter name="newValue" type="java.lang.Object">
+</parameter>
+<parameter name="index" type="int">
+</parameter>
+</constructor>
+<method name="getIndex"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+</class>
+<class name="PropertyChangeEvent"
+ extends="java.util.EventObject"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="PropertyChangeEvent"
+ type="java.beans.PropertyChangeEvent"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="source" type="java.lang.Object">
+</parameter>
+<parameter name="propertyName" type="java.lang.String">
+</parameter>
+<parameter name="oldValue" type="java.lang.Object">
+</parameter>
+<parameter name="newValue" type="java.lang.Object">
+</parameter>
+</constructor>
+<method name="getNewValue"
+ return="java.lang.Object"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getOldValue"
+ return="java.lang.Object"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getPropagationId"
+ return="java.lang.Object"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getPropertyName"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="setPropagationId"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="propagationId" type="java.lang.Object">
+</parameter>
+</method>
+</class>
+<interface name="PropertyChangeListener"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="java.util.EventListener">
+</implements>
+<method name="propertyChange"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="event" type="java.beans.PropertyChangeEvent">
+</parameter>
+</method>
+</interface>
+<class name="PropertyChangeListenerProxy"
+ extends="java.util.EventListenerProxy"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="java.beans.PropertyChangeListener">
+</implements>
+<constructor name="PropertyChangeListenerProxy"
+ type="java.beans.PropertyChangeListenerProxy"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="propertyName" type="java.lang.String">
+</parameter>
+<parameter name="listener" type="java.beans.PropertyChangeListener">
+</parameter>
+</constructor>
+<method name="getPropertyName"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="propertyChange"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="event" type="java.beans.PropertyChangeEvent">
+</parameter>
+</method>
+</class>
+<class name="PropertyChangeSupport"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="java.io.Serializable">
+</implements>
+<constructor name="PropertyChangeSupport"
+ type="java.beans.PropertyChangeSupport"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="sourceBean" type="java.lang.Object">
+</parameter>
+</constructor>
+<method name="addPropertyChangeListener"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="propertyName" type="java.lang.String">
+</parameter>
+<parameter name="listener" type="java.beans.PropertyChangeListener">
+</parameter>
+</method>
+<method name="addPropertyChangeListener"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="listener" type="java.beans.PropertyChangeListener">
+</parameter>
+</method>
+<method name="fireIndexedPropertyChange"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="propertyName" type="java.lang.String">
+</parameter>
+<parameter name="index" type="int">
+</parameter>
+<parameter name="oldValue" type="java.lang.Object">
+</parameter>
+<parameter name="newValue" type="java.lang.Object">
+</parameter>
+</method>
+<method name="fireIndexedPropertyChange"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="propertyName" type="java.lang.String">
+</parameter>
+<parameter name="index" type="int">
+</parameter>
+<parameter name="oldValue" type="boolean">
+</parameter>
+<parameter name="newValue" type="boolean">
+</parameter>
+</method>
+<method name="fireIndexedPropertyChange"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="propertyName" type="java.lang.String">
+</parameter>
+<parameter name="index" type="int">
+</parameter>
+<parameter name="oldValue" type="int">
+</parameter>
+<parameter name="newValue" type="int">
+</parameter>
+</method>
+<method name="firePropertyChange"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="propertyName" type="java.lang.String">
+</parameter>
+<parameter name="oldValue" type="java.lang.Object">
+</parameter>
+<parameter name="newValue" type="java.lang.Object">
+</parameter>
+</method>
+<method name="firePropertyChange"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="propertyName" type="java.lang.String">
+</parameter>
+<parameter name="oldValue" type="boolean">
+</parameter>
+<parameter name="newValue" type="boolean">
+</parameter>
+</method>
+<method name="firePropertyChange"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="propertyName" type="java.lang.String">
+</parameter>
+<parameter name="oldValue" type="int">
+</parameter>
+<parameter name="newValue" type="int">
+</parameter>
+</method>
+<method name="firePropertyChange"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="event" type="java.beans.PropertyChangeEvent">
+</parameter>
+</method>
+<method name="getPropertyChangeListeners"
+ return="java.beans.PropertyChangeListener[]"
+ abstract="false"
+ native="false"
+ synchronized="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="propertyName" type="java.lang.String">
+</parameter>
+</method>
+<method name="getPropertyChangeListeners"
+ return="java.beans.PropertyChangeListener[]"
+ abstract="false"
+ native="false"
+ synchronized="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="hasListeners"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="propertyName" type="java.lang.String">
+</parameter>
+</method>
+<method name="removePropertyChangeListener"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="propertyName" type="java.lang.String">
+</parameter>
+<parameter name="listener" type="java.beans.PropertyChangeListener">
+</parameter>
+</method>
+<method name="removePropertyChangeListener"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="listener" type="java.beans.PropertyChangeListener">
+</parameter>
+</method>
+</class>
+</package>
+<package name="java.io"
+>
+<class name="BufferedInputStream"
+ extends="java.io.FilterInputStream"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="BufferedInputStream"
+ type="java.io.BufferedInputStream"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="in" type="java.io.InputStream">
+</parameter>
+</constructor>
+<constructor name="BufferedInputStream"
+ type="java.io.BufferedInputStream"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="in" type="java.io.InputStream">
+</parameter>
+<parameter name="size" type="int">
+</parameter>
+</constructor>
+<field name="buf"
+ type="byte[]"
+ transient="false"
+ volatile="true"
+ value="null"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</field>
+<field name="count"
+ type="int"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</field>
+<field name="marklimit"
+ type="int"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</field>
+<field name="markpos"
+ type="int"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</field>
+<field name="pos"
+ type="int"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</field>
+</class>
+<class name="BufferedOutputStream"
+ extends="java.io.FilterOutputStream"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="BufferedOutputStream"
+ type="java.io.BufferedOutputStream"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="out" type="java.io.OutputStream">
+</parameter>
+</constructor>
+<constructor name="BufferedOutputStream"
+ type="java.io.BufferedOutputStream"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="out" type="java.io.OutputStream">
+</parameter>
+<parameter name="size" type="int">
+</parameter>
+</constructor>
+<field name="buf"
+ type="byte[]"
+ transient="false"
+ volatile="false"
+ value="null"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</field>
+<field name="count"
+ type="int"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</field>
+</class>
+<class name="BufferedReader"
+ extends="java.io.Reader"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="BufferedReader"
+ type="java.io.BufferedReader"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="in" type="java.io.Reader">
+</parameter>
+</constructor>
+<constructor name="BufferedReader"
+ type="java.io.BufferedReader"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="in" type="java.io.Reader">
+</parameter>
+<parameter name="size" type="int">
+</parameter>
+</constructor>
+<method name="close"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="read"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="buffer" type="char[]">
+</parameter>
+<parameter name="offset" type="int">
+</parameter>
+<parameter name="length" type="int">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="readLine"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+</class>
+<class name="BufferedWriter"
+ extends="java.io.Writer"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="BufferedWriter"
+ type="java.io.BufferedWriter"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="out" type="java.io.Writer">
+</parameter>
+</constructor>
+<constructor name="BufferedWriter"
+ type="java.io.BufferedWriter"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="out" type="java.io.Writer">
+</parameter>
+<parameter name="size" type="int">
+</parameter>
+</constructor>
+<method name="close"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="flush"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="newLine"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="write"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="cbuf" type="char[]">
+</parameter>
+<parameter name="offset" type="int">
+</parameter>
+<parameter name="count" type="int">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+</class>
+<class name="ByteArrayInputStream"
+ extends="java.io.InputStream"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="ByteArrayInputStream"
+ type="java.io.ByteArrayInputStream"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="buf" type="byte[]">
+</parameter>
+</constructor>
+<constructor name="ByteArrayInputStream"
+ type="java.io.ByteArrayInputStream"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="buf" type="byte[]">
+</parameter>
+<parameter name="offset" type="int">
+</parameter>
+<parameter name="length" type="int">
+</parameter>
+</constructor>
+<method name="read"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<field name="buf"
+ type="byte[]"
+ transient="false"
+ volatile="false"
+ value="null"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</field>
+<field name="count"
+ type="int"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</field>
+<field name="mark"
+ type="int"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</field>
+<field name="pos"
+ type="int"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</field>
+</class>
+<class name="ByteArrayOutputStream"
+ extends="java.io.OutputStream"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="ByteArrayOutputStream"
+ type="java.io.ByteArrayOutputStream"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<constructor name="ByteArrayOutputStream"
+ type="java.io.ByteArrayOutputStream"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="size" type="int">
+</parameter>
+</constructor>
+<method name="reset"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="size"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="toByteArray"
+ return="byte[]"
+ abstract="false"
+ native="false"
+ synchronized="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="toString"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="deprecated"
+ visibility="public"
+>
+<parameter name="hibyte" type="int">
+</parameter>
+</method>
+<method name="toString"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="enc" type="java.lang.String">
+</parameter>
+<exception name="UnsupportedEncodingException" type="java.io.UnsupportedEncodingException">
+</exception>
+</method>
+<method name="write"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="oneByte" type="int">
+</parameter>
+</method>
+<method name="writeTo"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="out" type="java.io.OutputStream">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<field name="buf"
+ type="byte[]"
+ transient="false"
+ volatile="false"
+ value="null"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</field>
+<field name="count"
+ type="int"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</field>
+</class>
+<class name="CharArrayReader"
+ extends="java.io.Reader"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="CharArrayReader"
+ type="java.io.CharArrayReader"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="buf" type="char[]">
+</parameter>
+</constructor>
+<constructor name="CharArrayReader"
+ type="java.io.CharArrayReader"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="buf" type="char[]">
+</parameter>
+<parameter name="offset" type="int">
+</parameter>
+<parameter name="length" type="int">
+</parameter>
+</constructor>
+<method name="close"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="read"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="buffer" type="char[]">
+</parameter>
+<parameter name="offset" type="int">
+</parameter>
+<parameter name="len" type="int">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<field name="buf"
+ type="char[]"
+ transient="false"
+ volatile="false"
+ value="null"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</field>
+<field name="count"
+ type="int"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</field>
+<field name="markedPos"
+ type="int"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</field>
+<field name="pos"
+ type="int"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</field>
+</class>
+<class name="CharArrayWriter"
+ extends="java.io.Writer"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="CharArrayWriter"
+ type="java.io.CharArrayWriter"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<constructor name="CharArrayWriter"
+ type="java.io.CharArrayWriter"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="initialSize" type="int">
+</parameter>
+</constructor>
+<method name="close"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="flush"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="reset"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="size"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="toCharArray"
+ return="char[]"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="write"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="c" type="char[]">
+</parameter>
+<parameter name="offset" type="int">
+</parameter>
+<parameter name="len" type="int">
+</parameter>
+</method>
+<method name="writeTo"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="out" type="java.io.Writer">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<field name="buf"
+ type="char[]"
+ transient="false"
+ volatile="false"
+ value="null"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</field>
+<field name="count"
+ type="int"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</field>
+</class>
+<class name="CharConversionException"
+ extends="java.io.IOException"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="CharConversionException"
+ type="java.io.CharConversionException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<constructor name="CharConversionException"
+ type="java.io.CharConversionException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="detailMessage" type="java.lang.String">
+</parameter>
+</constructor>
+</class>
+<interface name="Closeable"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="close"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+</interface>
+<interface name="DataInput"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="readBoolean"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="readByte"
+ return="byte"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="readChar"
+ return="char"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="readDouble"
+ return="double"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="readFloat"
+ return="float"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="readFully"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="buffer" type="byte[]">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="readFully"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="buffer" type="byte[]">
+</parameter>
+<parameter name="offset" type="int">
+</parameter>
+<parameter name="count" type="int">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="readInt"
+ return="int"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="readLine"
+ return="java.lang.String"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="readLong"
+ return="long"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="readShort"
+ return="short"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="readUTF"
+ return="java.lang.String"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="readUnsignedByte"
+ return="int"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="readUnsignedShort"
+ return="int"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="skipBytes"
+ return="int"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="count" type="int">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+</interface>
+<class name="DataInputStream"
+ extends="java.io.FilterInputStream"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="java.io.DataInput">
+</implements>
+<constructor name="DataInputStream"
+ type="java.io.DataInputStream"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="in" type="java.io.InputStream">
+</parameter>
+</constructor>
+<method name="read"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="buffer" type="byte[]">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="read"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="buffer" type="byte[]">
+</parameter>
+<parameter name="offset" type="int">
+</parameter>
+<parameter name="length" type="int">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="readBoolean"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="readByte"
+ return="byte"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="readChar"
+ return="char"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="readDouble"
+ return="double"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="readFloat"
+ return="float"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="readFully"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="buffer" type="byte[]">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="readFully"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="buffer" type="byte[]">
+</parameter>
+<parameter name="offset" type="int">
+</parameter>
+<parameter name="length" type="int">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="readInt"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="readLine"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="deprecated"
+ visibility="public"
+>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="readLong"
+ return="long"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="readShort"
+ return="short"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="readUTF"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="readUTF"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="in" type="java.io.DataInput">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="readUnsignedByte"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="readUnsignedShort"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="skipBytes"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="count" type="int">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+</class>
+<interface name="DataOutput"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="write"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="buffer" type="byte[]">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="write"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="buffer" type="byte[]">
+</parameter>
+<parameter name="offset" type="int">
+</parameter>
+<parameter name="count" type="int">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="write"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="oneByte" type="int">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="writeBoolean"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="val" type="boolean">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="writeByte"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="val" type="int">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="writeBytes"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="str" type="java.lang.String">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="writeChar"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="val" type="int">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="writeChars"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="str" type="java.lang.String">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="writeDouble"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="val" type="double">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="writeFloat"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="val" type="float">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="writeInt"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="val" type="int">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="writeLong"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="val" type="long">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="writeShort"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="val" type="int">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="writeUTF"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="str" type="java.lang.String">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+</interface>
+<class name="DataOutputStream"
+ extends="java.io.FilterOutputStream"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="java.io.DataOutput">
+</implements>
+<constructor name="DataOutputStream"
+ type="java.io.DataOutputStream"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="out" type="java.io.OutputStream">
+</parameter>
+</constructor>
+<method name="size"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="writeBoolean"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="val" type="boolean">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="writeByte"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="val" type="int">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="writeBytes"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="str" type="java.lang.String">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="writeChar"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="val" type="int">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="writeChars"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="str" type="java.lang.String">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="writeDouble"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="val" type="double">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="writeFloat"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="val" type="float">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="writeInt"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="val" type="int">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="writeLong"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="val" type="long">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="writeShort"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="val" type="int">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="writeUTF"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="str" type="java.lang.String">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<field name="written"
+ type="int"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</field>
+</class>
+<class name="EOFException"
+ extends="java.io.IOException"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="EOFException"
+ type="java.io.EOFException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<constructor name="EOFException"
+ type="java.io.EOFException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="detailMessage" type="java.lang.String">
+</parameter>
+</constructor>
+</class>
+<interface name="Externalizable"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="java.io.Serializable">
+</implements>
+<method name="readExternal"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="input" type="java.io.ObjectInput">
+</parameter>
+<exception name="ClassNotFoundException" type="java.lang.ClassNotFoundException">
+</exception>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="writeExternal"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="output" type="java.io.ObjectOutput">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+</interface>
+<class name="File"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="java.lang.Comparable">
+</implements>
+<implements name="java.io.Serializable">
+</implements>
+<constructor name="File"
+ type="java.io.File"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="dir" type="java.io.File">
+</parameter>
+<parameter name="name" type="java.lang.String">
+</parameter>
+</constructor>
+<constructor name="File"
+ type="java.io.File"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="path" type="java.lang.String">
+</parameter>
+</constructor>
+<constructor name="File"
+ type="java.io.File"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="dirPath" type="java.lang.String">
+</parameter>
+<parameter name="name" type="java.lang.String">
+</parameter>
+</constructor>
+<constructor name="File"
+ type="java.io.File"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="uri" type="java.net.URI">
+</parameter>
+</constructor>
+<method name="canRead"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="canWrite"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="compareTo"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="another" type="java.io.File">
+</parameter>
+</method>
+<method name="createNewFile"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="createTempFile"
+ return="java.io.File"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="prefix" type="java.lang.String">
+</parameter>
+<parameter name="suffix" type="java.lang.String">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="createTempFile"
+ return="java.io.File"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="prefix" type="java.lang.String">
+</parameter>
+<parameter name="suffix" type="java.lang.String">
+</parameter>
+<parameter name="directory" type="java.io.File">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="delete"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="deleteOnExit"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="exists"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getAbsoluteFile"
+ return="java.io.File"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getAbsolutePath"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getCanonicalFile"
+ return="java.io.File"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="getCanonicalPath"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="getName"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getParent"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getParentFile"
+ return="java.io.File"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getPath"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isAbsolute"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isDirectory"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isFile"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isHidden"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="lastModified"
+ return="long"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="length"
+ return="long"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="list"
+ return="java.lang.String[]"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="list"
+ return="java.lang.String[]"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="filter" type="java.io.FilenameFilter">
+</parameter>
+</method>
+<method name="listFiles"
+ return="java.io.File[]"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="listFiles"
+ return="java.io.File[]"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="filter" type="java.io.FilenameFilter">
+</parameter>
+</method>
+<method name="listFiles"
+ return="java.io.File[]"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="filter" type="java.io.FileFilter">
+</parameter>
+</method>
+<method name="listRoots"
+ return="java.io.File[]"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="mkdir"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="mkdirs"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="renameTo"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="dest" type="java.io.File">
+</parameter>
+</method>
+<method name="setLastModified"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="time" type="long">
+</parameter>
+</method>
+<method name="setReadOnly"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="toURI"
+ return="java.net.URI"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="toURL"
+ return="java.net.URL"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="MalformedURLException" type="java.net.MalformedURLException">
+</exception>
+</method>
+<field name="pathSeparator"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="pathSeparatorChar"
+ type="char"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="separator"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="separatorChar"
+ type="char"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<class name="FileDescriptor"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="FileDescriptor"
+ type="java.io.FileDescriptor"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<method name="sync"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="SyncFailedException" type="java.io.SyncFailedException">
+</exception>
+</method>
+<method name="valid"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<field name="err"
+ type="java.io.FileDescriptor"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="in"
+ type="java.io.FileDescriptor"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="out"
+ type="java.io.FileDescriptor"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<interface name="FileFilter"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="accept"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="pathname" type="java.io.File">
+</parameter>
+</method>
+</interface>
+<class name="FileInputStream"
+ extends="java.io.InputStream"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="java.io.Closeable">
+</implements>
+<constructor name="FileInputStream"
+ type="java.io.FileInputStream"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="file" type="java.io.File">
+</parameter>
+<exception name="FileNotFoundException" type="java.io.FileNotFoundException">
+</exception>
+</constructor>
+<constructor name="FileInputStream"
+ type="java.io.FileInputStream"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="fd" type="java.io.FileDescriptor">
+</parameter>
+</constructor>
+<constructor name="FileInputStream"
+ type="java.io.FileInputStream"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="fileName" type="java.lang.String">
+</parameter>
+<exception name="FileNotFoundException" type="java.io.FileNotFoundException">
+</exception>
+</constructor>
+<method name="getChannel"
+ return="java.nio.channels.FileChannel"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getFD"
+ return="java.io.FileDescriptor"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="read"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+</class>
+<class name="FileNotFoundException"
+ extends="java.io.IOException"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="FileNotFoundException"
+ type="java.io.FileNotFoundException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<constructor name="FileNotFoundException"
+ type="java.io.FileNotFoundException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="detailMessage" type="java.lang.String">
+</parameter>
+</constructor>
+</class>
+<class name="FileOutputStream"
+ extends="java.io.OutputStream"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="java.io.Closeable">
+</implements>
+<constructor name="FileOutputStream"
+ type="java.io.FileOutputStream"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="file" type="java.io.File">
+</parameter>
+<exception name="FileNotFoundException" type="java.io.FileNotFoundException">
+</exception>
+</constructor>
+<constructor name="FileOutputStream"
+ type="java.io.FileOutputStream"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="file" type="java.io.File">
+</parameter>
+<parameter name="append" type="boolean">
+</parameter>
+<exception name="FileNotFoundException" type="java.io.FileNotFoundException">
+</exception>
+</constructor>
+<constructor name="FileOutputStream"
+ type="java.io.FileOutputStream"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="fd" type="java.io.FileDescriptor">
+</parameter>
+</constructor>
+<constructor name="FileOutputStream"
+ type="java.io.FileOutputStream"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="filename" type="java.lang.String">
+</parameter>
+<exception name="FileNotFoundException" type="java.io.FileNotFoundException">
+</exception>
+</constructor>
+<constructor name="FileOutputStream"
+ type="java.io.FileOutputStream"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="filename" type="java.lang.String">
+</parameter>
+<parameter name="append" type="boolean">
+</parameter>
+<exception name="FileNotFoundException" type="java.io.FileNotFoundException">
+</exception>
+</constructor>
+<method name="getChannel"
+ return="java.nio.channels.FileChannel"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getFD"
+ return="java.io.FileDescriptor"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="write"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="oneByte" type="int">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+</class>
+<class name="FilePermission"
+ extends="java.security.Permission"
+ abstract="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="java.io.Serializable">
+</implements>
+<constructor name="FilePermission"
+ type="java.io.FilePermission"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="path" type="java.lang.String">
+</parameter>
+<parameter name="actions" type="java.lang.String">
+</parameter>
+</constructor>
+<method name="equals"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="obj" type="java.lang.Object">
+</parameter>
+</method>
+<method name="getActions"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="hashCode"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="implies"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="p" type="java.security.Permission">
+</parameter>
+</method>
+</class>
+<class name="FileReader"
+ extends="java.io.InputStreamReader"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="FileReader"
+ type="java.io.FileReader"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="file" type="java.io.File">
+</parameter>
+<exception name="FileNotFoundException" type="java.io.FileNotFoundException">
+</exception>
+</constructor>
+<constructor name="FileReader"
+ type="java.io.FileReader"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="fd" type="java.io.FileDescriptor">
+</parameter>
+</constructor>
+<constructor name="FileReader"
+ type="java.io.FileReader"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="filename" type="java.lang.String">
+</parameter>
+<exception name="FileNotFoundException" type="java.io.FileNotFoundException">
+</exception>
+</constructor>
+</class>
+<class name="FileWriter"
+ extends="java.io.OutputStreamWriter"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="FileWriter"
+ type="java.io.FileWriter"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="file" type="java.io.File">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</constructor>
+<constructor name="FileWriter"
+ type="java.io.FileWriter"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="file" type="java.io.File">
+</parameter>
+<parameter name="append" type="boolean">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</constructor>
+<constructor name="FileWriter"
+ type="java.io.FileWriter"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="fd" type="java.io.FileDescriptor">
+</parameter>
+</constructor>
+<constructor name="FileWriter"
+ type="java.io.FileWriter"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="filename" type="java.lang.String">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</constructor>
+<constructor name="FileWriter"
+ type="java.io.FileWriter"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="filename" type="java.lang.String">
+</parameter>
+<parameter name="append" type="boolean">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</constructor>
+</class>
+<interface name="FilenameFilter"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="accept"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="dir" type="java.io.File">
+</parameter>
+<parameter name="filename" type="java.lang.String">
+</parameter>
+</method>
+</interface>
+<class name="FilterInputStream"
+ extends="java.io.InputStream"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="FilterInputStream"
+ type="java.io.FilterInputStream"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="in" type="java.io.InputStream">
+</parameter>
+</constructor>
+<method name="read"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<field name="in"
+ type="java.io.InputStream"
+ transient="false"
+ volatile="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</field>
+</class>
+<class name="FilterOutputStream"
+ extends="java.io.OutputStream"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="FilterOutputStream"
+ type="java.io.FilterOutputStream"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="out" type="java.io.OutputStream">
+</parameter>
+</constructor>
+<method name="write"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="oneByte" type="int">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<field name="out"
+ type="java.io.OutputStream"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</field>
+</class>
+<class name="FilterReader"
+ extends="java.io.Reader"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="FilterReader"
+ type="java.io.FilterReader"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="in" type="java.io.Reader">
+</parameter>
+</constructor>
+<method name="close"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="read"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="buffer" type="char[]">
+</parameter>
+<parameter name="offset" type="int">
+</parameter>
+<parameter name="count" type="int">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<field name="in"
+ type="java.io.Reader"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</field>
+</class>
+<class name="FilterWriter"
+ extends="java.io.Writer"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="FilterWriter"
+ type="java.io.FilterWriter"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="out" type="java.io.Writer">
+</parameter>
+</constructor>
+<method name="close"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="flush"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="write"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="buffer" type="char[]">
+</parameter>
+<parameter name="offset" type="int">
+</parameter>
+<parameter name="count" type="int">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<field name="out"
+ type="java.io.Writer"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</field>
+</class>
+<interface name="Flushable"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="flush"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+</interface>
+<class name="IOException"
+ extends="java.lang.Exception"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="IOException"
+ type="java.io.IOException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<constructor name="IOException"
+ type="java.io.IOException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="detailMessage" type="java.lang.String">
+</parameter>
+</constructor>
+</class>
+<class name="InputStream"
+ extends="java.lang.Object"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="java.io.Closeable">
+</implements>
+<constructor name="InputStream"
+ type="java.io.InputStream"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<method name="available"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="close"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="mark"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="readlimit" type="int">
+</parameter>
+</method>
+<method name="markSupported"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="read"
+ return="int"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="read"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="b" type="byte[]">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="read"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="b" type="byte[]">
+</parameter>
+<parameter name="offset" type="int">
+</parameter>
+<parameter name="length" type="int">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="reset"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="skip"
+ return="long"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="n" type="long">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+</class>
+<class name="InputStreamReader"
+ extends="java.io.Reader"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="InputStreamReader"
+ type="java.io.InputStreamReader"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="in" type="java.io.InputStream">
+</parameter>
+</constructor>
+<constructor name="InputStreamReader"
+ type="java.io.InputStreamReader"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="in" type="java.io.InputStream">
+</parameter>
+<parameter name="enc" type="java.lang.String">
+</parameter>
+<exception name="UnsupportedEncodingException" type="java.io.UnsupportedEncodingException">
+</exception>
+</constructor>
+<constructor name="InputStreamReader"
+ type="java.io.InputStreamReader"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="in" type="java.io.InputStream">
+</parameter>
+<parameter name="dec" type="java.nio.charset.CharsetDecoder">
+</parameter>
+</constructor>
+<constructor name="InputStreamReader"
+ type="java.io.InputStreamReader"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="in" type="java.io.InputStream">
+</parameter>
+<parameter name="charset" type="java.nio.charset.Charset">
+</parameter>
+</constructor>
+<method name="close"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="getEncoding"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="read"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="buf" type="char[]">
+</parameter>
+<parameter name="offset" type="int">
+</parameter>
+<parameter name="length" type="int">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+</class>
+<class name="InterruptedIOException"
+ extends="java.io.IOException"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="InterruptedIOException"
+ type="java.io.InterruptedIOException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<constructor name="InterruptedIOException"
+ type="java.io.InterruptedIOException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="detailMessage" type="java.lang.String">
+</parameter>
+</constructor>
+<field name="bytesTransferred"
+ type="int"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<class name="InvalidClassException"
+ extends="java.io.ObjectStreamException"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="InvalidClassException"
+ type="java.io.InvalidClassException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="detailMessage" type="java.lang.String">
+</parameter>
+</constructor>
+<constructor name="InvalidClassException"
+ type="java.io.InvalidClassException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="className" type="java.lang.String">
+</parameter>
+<parameter name="detailMessage" type="java.lang.String">
+</parameter>
+</constructor>
+<field name="classname"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<class name="InvalidObjectException"
+ extends="java.io.ObjectStreamException"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="InvalidObjectException"
+ type="java.io.InvalidObjectException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="detailMessage" type="java.lang.String">
+</parameter>
+</constructor>
+</class>
+<class name="LineNumberInputStream"
+ extends="java.io.FilterInputStream"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="deprecated"
+ visibility="public"
+>
+<constructor name="LineNumberInputStream"
+ type="java.io.LineNumberInputStream"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="in" type="java.io.InputStream">
+</parameter>
+</constructor>
+<method name="getLineNumber"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="setLineNumber"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="lineNumber" type="int">
+</parameter>
+</method>
+</class>
+<class name="LineNumberReader"
+ extends="java.io.BufferedReader"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="LineNumberReader"
+ type="java.io.LineNumberReader"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="in" type="java.io.Reader">
+</parameter>
+</constructor>
+<constructor name="LineNumberReader"
+ type="java.io.LineNumberReader"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="in" type="java.io.Reader">
+</parameter>
+<parameter name="size" type="int">
+</parameter>
+</constructor>
+<method name="getLineNumber"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="setLineNumber"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="lineNumber" type="int">
+</parameter>
+</method>
+</class>
+<class name="NotActiveException"
+ extends="java.io.ObjectStreamException"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="NotActiveException"
+ type="java.io.NotActiveException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<constructor name="NotActiveException"
+ type="java.io.NotActiveException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="detailMessage" type="java.lang.String">
+</parameter>
+</constructor>
+</class>
+<class name="NotSerializableException"
+ extends="java.io.ObjectStreamException"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="NotSerializableException"
+ type="java.io.NotSerializableException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<constructor name="NotSerializableException"
+ type="java.io.NotSerializableException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="detailMessage" type="java.lang.String">
+</parameter>
+</constructor>
+</class>
+<interface name="ObjectInput"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="java.io.DataInput">
+</implements>
+<method name="available"
+ return="int"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="close"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="read"
+ return="int"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="read"
+ return="int"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="buffer" type="byte[]">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="read"
+ return="int"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="buffer" type="byte[]">
+</parameter>
+<parameter name="offset" type="int">
+</parameter>
+<parameter name="count" type="int">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="readObject"
+ return="java.lang.Object"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="ClassNotFoundException" type="java.lang.ClassNotFoundException">
+</exception>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="skip"
+ return="long"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="toSkip" type="long">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+</interface>
+<class name="ObjectInputStream"
+ extends="java.io.InputStream"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="java.io.ObjectInput">
+</implements>
+<implements name="java.io.ObjectStreamConstants">
+</implements>
+<constructor name="ObjectInputStream"
+ type="java.io.ObjectInputStream"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+<exception name="SecurityException" type="java.lang.SecurityException">
+</exception>
+</constructor>
+<constructor name="ObjectInputStream"
+ type="java.io.ObjectInputStream"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="input" type="java.io.InputStream">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+<exception name="StreamCorruptedException" type="java.io.StreamCorruptedException">
+</exception>
+</constructor>
+<method name="defaultReadObject"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="ClassNotFoundException" type="java.lang.ClassNotFoundException">
+</exception>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+<exception name="NotActiveException" type="java.io.NotActiveException">
+</exception>
+</method>
+<method name="enableResolveObject"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="enable" type="boolean">
+</parameter>
+<exception name="SecurityException" type="java.lang.SecurityException">
+</exception>
+</method>
+<method name="read"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="readBoolean"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="readByte"
+ return="byte"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="readChar"
+ return="char"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="readClassDescriptor"
+ return="java.io.ObjectStreamClass"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<exception name="ClassNotFoundException" type="java.lang.ClassNotFoundException">
+</exception>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="readDouble"
+ return="double"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="readFields"
+ return="java.io.ObjectInputStream.GetField"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="ClassNotFoundException" type="java.lang.ClassNotFoundException">
+</exception>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+<exception name="NotActiveException" type="java.io.NotActiveException">
+</exception>
+</method>
+<method name="readFloat"
+ return="float"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="readFully"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="buffer" type="byte[]">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="readFully"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="buffer" type="byte[]">
+</parameter>
+<parameter name="offset" type="int">
+</parameter>
+<parameter name="length" type="int">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="readInt"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="readLine"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="deprecated"
+ visibility="public"
+>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="readLong"
+ return="long"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="readObject"
+ return="java.lang.Object"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="ClassNotFoundException" type="java.lang.ClassNotFoundException">
+</exception>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+<exception name="OptionalDataException" type="java.io.OptionalDataException">
+</exception>
+</method>
+<method name="readObjectOverride"
+ return="java.lang.Object"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<exception name="ClassNotFoundException" type="java.lang.ClassNotFoundException">
+</exception>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+<exception name="OptionalDataException" type="java.io.OptionalDataException">
+</exception>
+</method>
+<method name="readShort"
+ return="short"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="readStreamHeader"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+<exception name="StreamCorruptedException" type="java.io.StreamCorruptedException">
+</exception>
+</method>
+<method name="readUTF"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="readUnshared"
+ return="java.lang.Object"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="ClassNotFoundException" type="java.lang.ClassNotFoundException">
+</exception>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="readUnsignedByte"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="readUnsignedShort"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="registerValidation"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="object" type="java.io.ObjectInputValidation">
+</parameter>
+<parameter name="priority" type="int">
+</parameter>
+<exception name="InvalidObjectException" type="java.io.InvalidObjectException">
+</exception>
+<exception name="NotActiveException" type="java.io.NotActiveException">
+</exception>
+</method>
+<method name="resolveClass"
+ return="java.lang.Class&lt;?&gt;"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="osClass" type="java.io.ObjectStreamClass">
+</parameter>
+<exception name="ClassNotFoundException" type="java.lang.ClassNotFoundException">
+</exception>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="resolveObject"
+ return="java.lang.Object"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="object" type="java.lang.Object">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="resolveProxyClass"
+ return="java.lang.Class&lt;?&gt;"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="interfaceNames" type="java.lang.String[]">
+</parameter>
+<exception name="ClassNotFoundException" type="java.lang.ClassNotFoundException">
+</exception>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="skipBytes"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="length" type="int">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+</class>
+<class name="ObjectInputStream.GetField"
+ extends="java.lang.Object"
+ abstract="true"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="ObjectInputStream.GetField"
+ type="java.io.ObjectInputStream.GetField"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<method name="defaulted"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+<exception name="IllegalArgumentException" type="java.lang.IllegalArgumentException">
+</exception>
+</method>
+<method name="get"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+<parameter name="defaultValue" type="boolean">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+<exception name="IllegalArgumentException" type="java.lang.IllegalArgumentException">
+</exception>
+</method>
+<method name="get"
+ return="char"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+<parameter name="defaultValue" type="char">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+<exception name="IllegalArgumentException" type="java.lang.IllegalArgumentException">
+</exception>
+</method>
+<method name="get"
+ return="byte"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+<parameter name="defaultValue" type="byte">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+<exception name="IllegalArgumentException" type="java.lang.IllegalArgumentException">
+</exception>
+</method>
+<method name="get"
+ return="short"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+<parameter name="defaultValue" type="short">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+<exception name="IllegalArgumentException" type="java.lang.IllegalArgumentException">
+</exception>
+</method>
+<method name="get"
+ return="int"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+<parameter name="defaultValue" type="int">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+<exception name="IllegalArgumentException" type="java.lang.IllegalArgumentException">
+</exception>
+</method>
+<method name="get"
+ return="long"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+<parameter name="defaultValue" type="long">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+<exception name="IllegalArgumentException" type="java.lang.IllegalArgumentException">
+</exception>
+</method>
+<method name="get"
+ return="float"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+<parameter name="defaultValue" type="float">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+<exception name="IllegalArgumentException" type="java.lang.IllegalArgumentException">
+</exception>
+</method>
+<method name="get"
+ return="double"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+<parameter name="defaultValue" type="double">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+<exception name="IllegalArgumentException" type="java.lang.IllegalArgumentException">
+</exception>
+</method>
+<method name="get"
+ return="java.lang.Object"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+<parameter name="defaultValue" type="java.lang.Object">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+<exception name="IllegalArgumentException" type="java.lang.IllegalArgumentException">
+</exception>
+</method>
+<method name="getObjectStreamClass"
+ return="java.io.ObjectStreamClass"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+</class>
+<interface name="ObjectInputValidation"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="validateObject"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="InvalidObjectException" type="java.io.InvalidObjectException">
+</exception>
+</method>
+</interface>
+<interface name="ObjectOutput"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="java.io.DataOutput">
+</implements>
+<method name="close"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="flush"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="write"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="buffer" type="byte[]">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="write"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="buffer" type="byte[]">
+</parameter>
+<parameter name="offset" type="int">
+</parameter>
+<parameter name="count" type="int">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="write"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="value" type="int">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="writeObject"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="obj" type="java.lang.Object">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+</interface>
+<class name="ObjectOutputStream"
+ extends="java.io.OutputStream"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="java.io.ObjectOutput">
+</implements>
+<implements name="java.io.ObjectStreamConstants">
+</implements>
+<constructor name="ObjectOutputStream"
+ type="java.io.ObjectOutputStream"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+<exception name="SecurityException" type="java.lang.SecurityException">
+</exception>
+</constructor>
+<constructor name="ObjectOutputStream"
+ type="java.io.ObjectOutputStream"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="output" type="java.io.OutputStream">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</constructor>
+<method name="annotateClass"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="aClass" type="java.lang.Class&lt;?&gt;">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="annotateProxyClass"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="aClass" type="java.lang.Class&lt;?&gt;">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="defaultWriteObject"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="drain"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="enableReplaceObject"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="enable" type="boolean">
+</parameter>
+<exception name="SecurityException" type="java.lang.SecurityException">
+</exception>
+</method>
+<method name="putFields"
+ return="java.io.ObjectOutputStream.PutField"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="replaceObject"
+ return="java.lang.Object"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="object" type="java.lang.Object">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="reset"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="useProtocolVersion"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="version" type="int">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="write"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="value" type="int">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="writeBoolean"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="value" type="boolean">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="writeByte"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="value" type="int">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="writeBytes"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="value" type="java.lang.String">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="writeChar"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="value" type="int">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="writeChars"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="value" type="java.lang.String">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="writeClassDescriptor"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="classDesc" type="java.io.ObjectStreamClass">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="writeDouble"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="value" type="double">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="writeFields"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="writeFloat"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="value" type="float">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="writeInt"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="value" type="int">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="writeLong"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="value" type="long">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="writeObject"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="object" type="java.lang.Object">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="writeObjectOverride"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="object" type="java.lang.Object">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="writeShort"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="value" type="int">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="writeStreamHeader"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="writeUTF"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="value" type="java.lang.String">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="writeUnshared"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="object" type="java.lang.Object">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+</class>
+<class name="ObjectOutputStream.PutField"
+ extends="java.lang.Object"
+ abstract="true"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="ObjectOutputStream.PutField"
+ type="java.io.ObjectOutputStream.PutField"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<method name="put"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+<parameter name="value" type="boolean">
+</parameter>
+</method>
+<method name="put"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+<parameter name="value" type="char">
+</parameter>
+</method>
+<method name="put"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+<parameter name="value" type="byte">
+</parameter>
+</method>
+<method name="put"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+<parameter name="value" type="short">
+</parameter>
+</method>
+<method name="put"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+<parameter name="value" type="int">
+</parameter>
+</method>
+<method name="put"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+<parameter name="value" type="long">
+</parameter>
+</method>
+<method name="put"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+<parameter name="value" type="float">
+</parameter>
+</method>
+<method name="put"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+<parameter name="value" type="double">
+</parameter>
+</method>
+<method name="put"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+<parameter name="value" type="java.lang.Object">
+</parameter>
+</method>
+<method name="write"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="deprecated"
+ visibility="public"
+>
+<parameter name="out" type="java.io.ObjectOutput">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+</class>
+<class name="ObjectStreamClass"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="java.io.Serializable">
+</implements>
+<method name="forClass"
+ return="java.lang.Class&lt;?&gt;"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getField"
+ return="java.io.ObjectStreamField"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+</method>
+<method name="getFields"
+ return="java.io.ObjectStreamField[]"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getName"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getSerialVersionUID"
+ return="long"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="lookup"
+ return="java.io.ObjectStreamClass"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="cl" type="java.lang.Class&lt;?&gt;">
+</parameter>
+</method>
+<field name="NO_FIELDS"
+ type="java.io.ObjectStreamField[]"
+ transient="false"
+ volatile="false"
+ value="null"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<interface name="ObjectStreamConstants"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<field name="PROTOCOL_VERSION_1"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="PROTOCOL_VERSION_2"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="SC_BLOCK_DATA"
+ type="byte"
+ transient="false"
+ volatile="false"
+ value="8"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="SC_ENUM"
+ type="byte"
+ transient="false"
+ volatile="false"
+ value="16"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="SC_EXTERNALIZABLE"
+ type="byte"
+ transient="false"
+ volatile="false"
+ value="4"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="SC_SERIALIZABLE"
+ type="byte"
+ transient="false"
+ volatile="false"
+ value="2"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="SC_WRITE_METHOD"
+ type="byte"
+ transient="false"
+ volatile="false"
+ value="1"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="STREAM_MAGIC"
+ type="short"
+ transient="false"
+ volatile="false"
+ value="-21267"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="STREAM_VERSION"
+ type="short"
+ transient="false"
+ volatile="false"
+ value="5"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="SUBCLASS_IMPLEMENTATION_PERMISSION"
+ type="java.io.SerializablePermission"
+ transient="false"
+ volatile="false"
+ value="null"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="SUBSTITUTION_PERMISSION"
+ type="java.io.SerializablePermission"
+ transient="false"
+ volatile="false"
+ value="null"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TC_ARRAY"
+ type="byte"
+ transient="false"
+ volatile="false"
+ value="117"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TC_BASE"
+ type="byte"
+ transient="false"
+ volatile="false"
+ value="112"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TC_BLOCKDATA"
+ type="byte"
+ transient="false"
+ volatile="false"
+ value="119"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TC_BLOCKDATALONG"
+ type="byte"
+ transient="false"
+ volatile="false"
+ value="122"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TC_CLASS"
+ type="byte"
+ transient="false"
+ volatile="false"
+ value="118"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TC_CLASSDESC"
+ type="byte"
+ transient="false"
+ volatile="false"
+ value="114"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TC_ENDBLOCKDATA"
+ type="byte"
+ transient="false"
+ volatile="false"
+ value="120"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TC_ENUM"
+ type="byte"
+ transient="false"
+ volatile="false"
+ value="126"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TC_EXCEPTION"
+ type="byte"
+ transient="false"
+ volatile="false"
+ value="123"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TC_LONGSTRING"
+ type="byte"
+ transient="false"
+ volatile="false"
+ value="124"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TC_MAX"
+ type="byte"
+ transient="false"
+ volatile="false"
+ value="126"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TC_NULL"
+ type="byte"
+ transient="false"
+ volatile="false"
+ value="112"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TC_OBJECT"
+ type="byte"
+ transient="false"
+ volatile="false"
+ value="115"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TC_PROXYCLASSDESC"
+ type="byte"
+ transient="false"
+ volatile="false"
+ value="125"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TC_REFERENCE"
+ type="byte"
+ transient="false"
+ volatile="false"
+ value="113"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TC_RESET"
+ type="byte"
+ transient="false"
+ volatile="false"
+ value="121"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TC_STRING"
+ type="byte"
+ transient="false"
+ volatile="false"
+ value="116"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="baseWireHandle"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="8257536"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</interface>
+<class name="ObjectStreamException"
+ extends="java.io.IOException"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="ObjectStreamException"
+ type="java.io.ObjectStreamException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</constructor>
+<constructor name="ObjectStreamException"
+ type="java.io.ObjectStreamException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="detailMessage" type="java.lang.String">
+</parameter>
+</constructor>
+</class>
+<class name="ObjectStreamField"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="java.lang.Comparable">
+</implements>
+<constructor name="ObjectStreamField"
+ type="java.io.ObjectStreamField"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+<parameter name="cl" type="java.lang.Class&lt;?&gt;">
+</parameter>
+</constructor>
+<constructor name="ObjectStreamField"
+ type="java.io.ObjectStreamField"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+<parameter name="cl" type="java.lang.Class&lt;?&gt;">
+</parameter>
+<parameter name="unshared" type="boolean">
+</parameter>
+</constructor>
+<method name="compareTo"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="o" type="java.lang.Object">
+</parameter>
+</method>
+<method name="getName"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getOffset"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getType"
+ return="java.lang.Class&lt;?&gt;"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getTypeCode"
+ return="char"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getTypeString"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isPrimitive"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isUnshared"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="setOffset"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="newValue" type="int">
+</parameter>
+</method>
+</class>
+<class name="OptionalDataException"
+ extends="java.io.ObjectStreamException"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<field name="eof"
+ type="boolean"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="length"
+ type="int"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<class name="OutputStream"
+ extends="java.lang.Object"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="java.io.Closeable">
+</implements>
+<implements name="java.io.Flushable">
+</implements>
+<constructor name="OutputStream"
+ type="java.io.OutputStream"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<method name="close"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="flush"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="write"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="buffer" type="byte[]">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="write"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="buffer" type="byte[]">
+</parameter>
+<parameter name="offset" type="int">
+</parameter>
+<parameter name="count" type="int">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="write"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="oneByte" type="int">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+</class>
+<class name="OutputStreamWriter"
+ extends="java.io.Writer"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="OutputStreamWriter"
+ type="java.io.OutputStreamWriter"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="out" type="java.io.OutputStream">
+</parameter>
+</constructor>
+<constructor name="OutputStreamWriter"
+ type="java.io.OutputStreamWriter"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="out" type="java.io.OutputStream">
+</parameter>
+<parameter name="enc" type="java.lang.String">
+</parameter>
+<exception name="UnsupportedEncodingException" type="java.io.UnsupportedEncodingException">
+</exception>
+</constructor>
+<constructor name="OutputStreamWriter"
+ type="java.io.OutputStreamWriter"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="out" type="java.io.OutputStream">
+</parameter>
+<parameter name="cs" type="java.nio.charset.Charset">
+</parameter>
+</constructor>
+<constructor name="OutputStreamWriter"
+ type="java.io.OutputStreamWriter"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="out" type="java.io.OutputStream">
+</parameter>
+<parameter name="enc" type="java.nio.charset.CharsetEncoder">
+</parameter>
+</constructor>
+<method name="close"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="flush"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="getEncoding"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="write"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="buf" type="char[]">
+</parameter>
+<parameter name="offset" type="int">
+</parameter>
+<parameter name="count" type="int">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+</class>
+<class name="PipedInputStream"
+ extends="java.io.InputStream"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="PipedInputStream"
+ type="java.io.PipedInputStream"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<constructor name="PipedInputStream"
+ type="java.io.PipedInputStream"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="out" type="java.io.PipedOutputStream">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</constructor>
+<method name="connect"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="src" type="java.io.PipedOutputStream">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="read"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="receive"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="oneByte" type="int">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<field name="PIPE_SIZE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1024"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</field>
+<field name="buffer"
+ type="byte[]"
+ transient="false"
+ volatile="false"
+ value="null"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</field>
+<field name="in"
+ type="int"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</field>
+<field name="out"
+ type="int"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</field>
+</class>
+<class name="PipedOutputStream"
+ extends="java.io.OutputStream"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="PipedOutputStream"
+ type="java.io.PipedOutputStream"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<constructor name="PipedOutputStream"
+ type="java.io.PipedOutputStream"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="dest" type="java.io.PipedInputStream">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</constructor>
+<method name="connect"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="stream" type="java.io.PipedInputStream">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="write"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="oneByte" type="int">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+</class>
+<class name="PipedReader"
+ extends="java.io.Reader"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="PipedReader"
+ type="java.io.PipedReader"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<constructor name="PipedReader"
+ type="java.io.PipedReader"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="out" type="java.io.PipedWriter">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</constructor>
+<method name="close"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="connect"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="src" type="java.io.PipedWriter">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="read"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="buffer" type="char[]">
+</parameter>
+<parameter name="offset" type="int">
+</parameter>
+<parameter name="count" type="int">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+</class>
+<class name="PipedWriter"
+ extends="java.io.Writer"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="PipedWriter"
+ type="java.io.PipedWriter"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<constructor name="PipedWriter"
+ type="java.io.PipedWriter"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="dest" type="java.io.PipedReader">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</constructor>
+<method name="close"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="connect"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="reader" type="java.io.PipedReader">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="flush"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="write"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="buffer" type="char[]">
+</parameter>
+<parameter name="offset" type="int">
+</parameter>
+<parameter name="count" type="int">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+</class>
+<class name="PrintStream"
+ extends="java.io.FilterOutputStream"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="java.lang.Appendable">
+</implements>
+<implements name="java.io.Closeable">
+</implements>
+<constructor name="PrintStream"
+ type="java.io.PrintStream"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="out" type="java.io.OutputStream">
+</parameter>
+</constructor>
+<constructor name="PrintStream"
+ type="java.io.PrintStream"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="out" type="java.io.OutputStream">
+</parameter>
+<parameter name="autoflush" type="boolean">
+</parameter>
+</constructor>
+<constructor name="PrintStream"
+ type="java.io.PrintStream"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="out" type="java.io.OutputStream">
+</parameter>
+<parameter name="autoflush" type="boolean">
+</parameter>
+<parameter name="enc" type="java.lang.String">
+</parameter>
+<exception name="UnsupportedEncodingException" type="java.io.UnsupportedEncodingException">
+</exception>
+</constructor>
+<constructor name="PrintStream"
+ type="java.io.PrintStream"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="file" type="java.io.File">
+</parameter>
+<exception name="FileNotFoundException" type="java.io.FileNotFoundException">
+</exception>
+</constructor>
+<constructor name="PrintStream"
+ type="java.io.PrintStream"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="file" type="java.io.File">
+</parameter>
+<parameter name="csn" type="java.lang.String">
+</parameter>
+<exception name="FileNotFoundException" type="java.io.FileNotFoundException">
+</exception>
+<exception name="UnsupportedEncodingException" type="java.io.UnsupportedEncodingException">
+</exception>
+</constructor>
+<constructor name="PrintStream"
+ type="java.io.PrintStream"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="fileName" type="java.lang.String">
+</parameter>
+<exception name="FileNotFoundException" type="java.io.FileNotFoundException">
+</exception>
+</constructor>
+<constructor name="PrintStream"
+ type="java.io.PrintStream"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="fileName" type="java.lang.String">
+</parameter>
+<parameter name="csn" type="java.lang.String">
+</parameter>
+<exception name="FileNotFoundException" type="java.io.FileNotFoundException">
+</exception>
+<exception name="UnsupportedEncodingException" type="java.io.UnsupportedEncodingException">
+</exception>
+</constructor>
+<method name="append"
+ return="java.io.PrintStream"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="c" type="char">
+</parameter>
+</method>
+<method name="append"
+ return="java.io.PrintStream"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="csq" type="java.lang.CharSequence">
+</parameter>
+</method>
+<method name="append"
+ return="java.io.PrintStream"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="csq" type="java.lang.CharSequence">
+</parameter>
+<parameter name="start" type="int">
+</parameter>
+<parameter name="end" type="int">
+</parameter>
+</method>
+<method name="checkError"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="format"
+ return="java.io.PrintStream"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="format" type="java.lang.String">
+</parameter>
+<parameter name="args" type="java.lang.Object...">
+</parameter>
+</method>
+<method name="format"
+ return="java.io.PrintStream"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="l" type="java.util.Locale">
+</parameter>
+<parameter name="format" type="java.lang.String">
+</parameter>
+<parameter name="args" type="java.lang.Object...">
+</parameter>
+</method>
+<method name="print"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="charArray" type="char[]">
+</parameter>
+</method>
+<method name="print"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="ch" type="char">
+</parameter>
+</method>
+<method name="print"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="dnum" type="double">
+</parameter>
+</method>
+<method name="print"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="fnum" type="float">
+</parameter>
+</method>
+<method name="print"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="inum" type="int">
+</parameter>
+</method>
+<method name="print"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="lnum" type="long">
+</parameter>
+</method>
+<method name="print"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="obj" type="java.lang.Object">
+</parameter>
+</method>
+<method name="print"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="str" type="java.lang.String">
+</parameter>
+</method>
+<method name="print"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="bool" type="boolean">
+</parameter>
+</method>
+<method name="printf"
+ return="java.io.PrintStream"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="format" type="java.lang.String">
+</parameter>
+<parameter name="args" type="java.lang.Object...">
+</parameter>
+</method>
+<method name="printf"
+ return="java.io.PrintStream"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="l" type="java.util.Locale">
+</parameter>
+<parameter name="format" type="java.lang.String">
+</parameter>
+<parameter name="args" type="java.lang.Object...">
+</parameter>
+</method>
+<method name="println"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="println"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="charArray" type="char[]">
+</parameter>
+</method>
+<method name="println"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="ch" type="char">
+</parameter>
+</method>
+<method name="println"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="dnum" type="double">
+</parameter>
+</method>
+<method name="println"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="fnum" type="float">
+</parameter>
+</method>
+<method name="println"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="inum" type="int">
+</parameter>
+</method>
+<method name="println"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="lnum" type="long">
+</parameter>
+</method>
+<method name="println"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="obj" type="java.lang.Object">
+</parameter>
+</method>
+<method name="println"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="str" type="java.lang.String">
+</parameter>
+</method>
+<method name="println"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="bool" type="boolean">
+</parameter>
+</method>
+<method name="setError"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</method>
+</class>
+<class name="PrintWriter"
+ extends="java.io.Writer"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="PrintWriter"
+ type="java.io.PrintWriter"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="out" type="java.io.OutputStream">
+</parameter>
+</constructor>
+<constructor name="PrintWriter"
+ type="java.io.PrintWriter"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="out" type="java.io.OutputStream">
+</parameter>
+<parameter name="autoflush" type="boolean">
+</parameter>
+</constructor>
+<constructor name="PrintWriter"
+ type="java.io.PrintWriter"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="wr" type="java.io.Writer">
+</parameter>
+</constructor>
+<constructor name="PrintWriter"
+ type="java.io.PrintWriter"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="wr" type="java.io.Writer">
+</parameter>
+<parameter name="autoflush" type="boolean">
+</parameter>
+</constructor>
+<constructor name="PrintWriter"
+ type="java.io.PrintWriter"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="file" type="java.io.File">
+</parameter>
+<exception name="FileNotFoundException" type="java.io.FileNotFoundException">
+</exception>
+</constructor>
+<constructor name="PrintWriter"
+ type="java.io.PrintWriter"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="file" type="java.io.File">
+</parameter>
+<parameter name="csn" type="java.lang.String">
+</parameter>
+<exception name="FileNotFoundException" type="java.io.FileNotFoundException">
+</exception>
+<exception name="UnsupportedEncodingException" type="java.io.UnsupportedEncodingException">
+</exception>
+</constructor>
+<constructor name="PrintWriter"
+ type="java.io.PrintWriter"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="fileName" type="java.lang.String">
+</parameter>
+<exception name="FileNotFoundException" type="java.io.FileNotFoundException">
+</exception>
+</constructor>
+<constructor name="PrintWriter"
+ type="java.io.PrintWriter"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="fileName" type="java.lang.String">
+</parameter>
+<parameter name="csn" type="java.lang.String">
+</parameter>
+<exception name="FileNotFoundException" type="java.io.FileNotFoundException">
+</exception>
+<exception name="UnsupportedEncodingException" type="java.io.UnsupportedEncodingException">
+</exception>
+</constructor>
+<method name="checkError"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="close"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="flush"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="format"
+ return="java.io.PrintWriter"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="format" type="java.lang.String">
+</parameter>
+<parameter name="args" type="java.lang.Object...">
+</parameter>
+</method>
+<method name="format"
+ return="java.io.PrintWriter"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="l" type="java.util.Locale">
+</parameter>
+<parameter name="format" type="java.lang.String">
+</parameter>
+<parameter name="args" type="java.lang.Object...">
+</parameter>
+</method>
+<method name="print"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="charArray" type="char[]">
+</parameter>
+</method>
+<method name="print"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="ch" type="char">
+</parameter>
+</method>
+<method name="print"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="dnum" type="double">
+</parameter>
+</method>
+<method name="print"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="fnum" type="float">
+</parameter>
+</method>
+<method name="print"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="inum" type="int">
+</parameter>
+</method>
+<method name="print"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="lnum" type="long">
+</parameter>
+</method>
+<method name="print"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="obj" type="java.lang.Object">
+</parameter>
+</method>
+<method name="print"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="str" type="java.lang.String">
+</parameter>
+</method>
+<method name="print"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="bool" type="boolean">
+</parameter>
+</method>
+<method name="printf"
+ return="java.io.PrintWriter"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="format" type="java.lang.String">
+</parameter>
+<parameter name="args" type="java.lang.Object...">
+</parameter>
+</method>
+<method name="printf"
+ return="java.io.PrintWriter"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="l" type="java.util.Locale">
+</parameter>
+<parameter name="format" type="java.lang.String">
+</parameter>
+<parameter name="args" type="java.lang.Object...">
+</parameter>
+</method>
+<method name="println"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="println"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="charArray" type="char[]">
+</parameter>
+</method>
+<method name="println"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="ch" type="char">
+</parameter>
+</method>
+<method name="println"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="dnum" type="double">
+</parameter>
+</method>
+<method name="println"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="fnum" type="float">
+</parameter>
+</method>
+<method name="println"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="inum" type="int">
+</parameter>
+</method>
+<method name="println"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="lnum" type="long">
+</parameter>
+</method>
+<method name="println"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="obj" type="java.lang.Object">
+</parameter>
+</method>
+<method name="println"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="str" type="java.lang.String">
+</parameter>
+</method>
+<method name="println"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="bool" type="boolean">
+</parameter>
+</method>
+<method name="setError"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</method>
+<method name="write"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="buf" type="char[]">
+</parameter>
+<parameter name="offset" type="int">
+</parameter>
+<parameter name="count" type="int">
+</parameter>
+</method>
+<field name="out"
+ type="java.io.Writer"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</field>
+</class>
+<class name="PushbackInputStream"
+ extends="java.io.FilterInputStream"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="PushbackInputStream"
+ type="java.io.PushbackInputStream"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="in" type="java.io.InputStream">
+</parameter>
+</constructor>
+<constructor name="PushbackInputStream"
+ type="java.io.PushbackInputStream"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="in" type="java.io.InputStream">
+</parameter>
+<parameter name="size" type="int">
+</parameter>
+</constructor>
+<method name="unread"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="buffer" type="byte[]">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="unread"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="buffer" type="byte[]">
+</parameter>
+<parameter name="offset" type="int">
+</parameter>
+<parameter name="length" type="int">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="unread"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="oneByte" type="int">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<field name="buf"
+ type="byte[]"
+ transient="false"
+ volatile="false"
+ value="null"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</field>
+<field name="pos"
+ type="int"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</field>
+</class>
+<class name="PushbackReader"
+ extends="java.io.FilterReader"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="PushbackReader"
+ type="java.io.PushbackReader"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="in" type="java.io.Reader">
+</parameter>
+</constructor>
+<constructor name="PushbackReader"
+ type="java.io.PushbackReader"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="in" type="java.io.Reader">
+</parameter>
+<parameter name="size" type="int">
+</parameter>
+</constructor>
+<method name="unread"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="buffer" type="char[]">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="unread"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="buffer" type="char[]">
+</parameter>
+<parameter name="offset" type="int">
+</parameter>
+<parameter name="length" type="int">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="unread"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="oneChar" type="int">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+</class>
+<class name="RandomAccessFile"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="java.io.Closeable">
+</implements>
+<implements name="java.io.DataInput">
+</implements>
+<implements name="java.io.DataOutput">
+</implements>
+<constructor name="RandomAccessFile"
+ type="java.io.RandomAccessFile"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="file" type="java.io.File">
+</parameter>
+<parameter name="mode" type="java.lang.String">
+</parameter>
+<exception name="FileNotFoundException" type="java.io.FileNotFoundException">
+</exception>
+</constructor>
+<constructor name="RandomAccessFile"
+ type="java.io.RandomAccessFile"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="fileName" type="java.lang.String">
+</parameter>
+<parameter name="mode" type="java.lang.String">
+</parameter>
+<exception name="FileNotFoundException" type="java.io.FileNotFoundException">
+</exception>
+</constructor>
+<method name="close"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="getChannel"
+ return="java.nio.channels.FileChannel"
+ abstract="false"
+ native="false"
+ synchronized="true"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getFD"
+ return="java.io.FileDescriptor"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="getFilePointer"
+ return="long"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="length"
+ return="long"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="read"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="read"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="buffer" type="byte[]">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="read"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="buffer" type="byte[]">
+</parameter>
+<parameter name="offset" type="int">
+</parameter>
+<parameter name="count" type="int">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="readBoolean"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="readByte"
+ return="byte"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="readChar"
+ return="char"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="readDouble"
+ return="double"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="readFloat"
+ return="float"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="readFully"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="buffer" type="byte[]">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="readFully"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="buffer" type="byte[]">
+</parameter>
+<parameter name="offset" type="int">
+</parameter>
+<parameter name="count" type="int">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="readInt"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="readLine"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="readLong"
+ return="long"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="readShort"
+ return="short"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="readUTF"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="readUnsignedByte"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="readUnsignedShort"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="seek"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="pos" type="long">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="setLength"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="newLength" type="long">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="skipBytes"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="count" type="int">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="write"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="buffer" type="byte[]">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="write"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="buffer" type="byte[]">
+</parameter>
+<parameter name="offset" type="int">
+</parameter>
+<parameter name="count" type="int">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="write"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="oneByte" type="int">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="writeBoolean"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="val" type="boolean">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="writeByte"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="val" type="int">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="writeBytes"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="str" type="java.lang.String">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="writeChar"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="val" type="int">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="writeChars"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="str" type="java.lang.String">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="writeDouble"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="val" type="double">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="writeFloat"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="val" type="float">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="writeInt"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="val" type="int">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="writeLong"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="val" type="long">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="writeShort"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="val" type="int">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="writeUTF"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="str" type="java.lang.String">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+</class>
+<class name="Reader"
+ extends="java.lang.Object"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="java.io.Closeable">
+</implements>
+<implements name="java.lang.Readable">
+</implements>
+<constructor name="Reader"
+ type="java.io.Reader"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</constructor>
+<constructor name="Reader"
+ type="java.io.Reader"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="lock" type="java.lang.Object">
+</parameter>
+</constructor>
+<method name="close"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="mark"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="readLimit" type="int">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="markSupported"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="read"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="read"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="buf" type="char[]">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="read"
+ return="int"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="buf" type="char[]">
+</parameter>
+<parameter name="offset" type="int">
+</parameter>
+<parameter name="count" type="int">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="read"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="target" type="java.nio.CharBuffer">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="ready"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="reset"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="skip"
+ return="long"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="count" type="long">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<field name="lock"
+ type="java.lang.Object"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</field>
+</class>
+<class name="SequenceInputStream"
+ extends="java.io.InputStream"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="SequenceInputStream"
+ type="java.io.SequenceInputStream"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="s1" type="java.io.InputStream">
+</parameter>
+<parameter name="s2" type="java.io.InputStream">
+</parameter>
+</constructor>
+<constructor name="SequenceInputStream"
+ type="java.io.SequenceInputStream"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="e" type="java.util.Enumeration&lt;? extends java.io.InputStream&gt;">
+</parameter>
+</constructor>
+<method name="read"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+</class>
+<interface name="Serializable"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</interface>
+<class name="SerializablePermission"
+ extends="java.security.BasicPermission"
+ abstract="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="SerializablePermission"
+ type="java.io.SerializablePermission"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="permissionName" type="java.lang.String">
+</parameter>
+</constructor>
+<constructor name="SerializablePermission"
+ type="java.io.SerializablePermission"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+<parameter name="actions" type="java.lang.String">
+</parameter>
+</constructor>
+</class>
+<class name="StreamCorruptedException"
+ extends="java.io.ObjectStreamException"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="StreamCorruptedException"
+ type="java.io.StreamCorruptedException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<constructor name="StreamCorruptedException"
+ type="java.io.StreamCorruptedException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="detailMessage" type="java.lang.String">
+</parameter>
+</constructor>
+</class>
+<class name="StreamTokenizer"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="StreamTokenizer"
+ type="java.io.StreamTokenizer"
+ static="false"
+ final="false"
+ deprecated="deprecated"
+ visibility="public"
+>
+<parameter name="is" type="java.io.InputStream">
+</parameter>
+</constructor>
+<constructor name="StreamTokenizer"
+ type="java.io.StreamTokenizer"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="r" type="java.io.Reader">
+</parameter>
+</constructor>
+<method name="commentChar"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="ch" type="int">
+</parameter>
+</method>
+<method name="eolIsSignificant"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="flag" type="boolean">
+</parameter>
+</method>
+<method name="lineno"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="lowerCaseMode"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="flag" type="boolean">
+</parameter>
+</method>
+<method name="nextToken"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="ordinaryChar"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="ch" type="int">
+</parameter>
+</method>
+<method name="ordinaryChars"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="low" type="int">
+</parameter>
+<parameter name="hi" type="int">
+</parameter>
+</method>
+<method name="parseNumbers"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="pushBack"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="quoteChar"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="ch" type="int">
+</parameter>
+</method>
+<method name="resetSyntax"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="slashSlashComments"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="flag" type="boolean">
+</parameter>
+</method>
+<method name="slashStarComments"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="flag" type="boolean">
+</parameter>
+</method>
+<method name="whitespaceChars"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="low" type="int">
+</parameter>
+<parameter name="hi" type="int">
+</parameter>
+</method>
+<method name="wordChars"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="low" type="int">
+</parameter>
+<parameter name="hi" type="int">
+</parameter>
+</method>
+<field name="TT_EOF"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="-1"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TT_EOL"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="10"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TT_NUMBER"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="-2"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TT_WORD"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="-3"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="nval"
+ type="double"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="sval"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ttype"
+ type="int"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<class name="StringBufferInputStream"
+ extends="java.io.InputStream"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="deprecated"
+ visibility="public"
+>
+<constructor name="StringBufferInputStream"
+ type="java.io.StringBufferInputStream"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="str" type="java.lang.String">
+</parameter>
+</constructor>
+<method name="read"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<field name="buffer"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</field>
+<field name="count"
+ type="int"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</field>
+<field name="pos"
+ type="int"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</field>
+</class>
+<class name="StringReader"
+ extends="java.io.Reader"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="StringReader"
+ type="java.io.StringReader"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="str" type="java.lang.String">
+</parameter>
+</constructor>
+<method name="close"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="read"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="buf" type="char[]">
+</parameter>
+<parameter name="offset" type="int">
+</parameter>
+<parameter name="len" type="int">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+</class>
+<class name="StringWriter"
+ extends="java.io.Writer"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="StringWriter"
+ type="java.io.StringWriter"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<constructor name="StringWriter"
+ type="java.io.StringWriter"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="initialSize" type="int">
+</parameter>
+</constructor>
+<method name="close"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="flush"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getBuffer"
+ return="java.lang.StringBuffer"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="write"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="cbuf" type="char[]">
+</parameter>
+<parameter name="offset" type="int">
+</parameter>
+<parameter name="count" type="int">
+</parameter>
+</method>
+</class>
+<class name="SyncFailedException"
+ extends="java.io.IOException"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="SyncFailedException"
+ type="java.io.SyncFailedException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="detailMessage" type="java.lang.String">
+</parameter>
+</constructor>
+</class>
+<class name="UTFDataFormatException"
+ extends="java.io.IOException"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="UTFDataFormatException"
+ type="java.io.UTFDataFormatException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<constructor name="UTFDataFormatException"
+ type="java.io.UTFDataFormatException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="detailMessage" type="java.lang.String">
+</parameter>
+</constructor>
+</class>
+<class name="UnsupportedEncodingException"
+ extends="java.io.IOException"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="UnsupportedEncodingException"
+ type="java.io.UnsupportedEncodingException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<constructor name="UnsupportedEncodingException"
+ type="java.io.UnsupportedEncodingException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="detailMessage" type="java.lang.String">
+</parameter>
+</constructor>
+</class>
+<class name="WriteAbortedException"
+ extends="java.io.ObjectStreamException"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="WriteAbortedException"
+ type="java.io.WriteAbortedException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="detailMessage" type="java.lang.String">
+</parameter>
+<parameter name="rootCause" type="java.lang.Exception">
+</parameter>
+</constructor>
+<field name="detail"
+ type="java.lang.Exception"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<class name="Writer"
+ extends="java.lang.Object"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="java.lang.Appendable">
+</implements>
+<implements name="java.io.Closeable">
+</implements>
+<implements name="java.io.Flushable">
+</implements>
+<constructor name="Writer"
+ type="java.io.Writer"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</constructor>
+<constructor name="Writer"
+ type="java.io.Writer"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="lock" type="java.lang.Object">
+</parameter>
+</constructor>
+<method name="append"
+ return="java.io.Writer"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="c" type="char">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="append"
+ return="java.io.Writer"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="csq" type="java.lang.CharSequence">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="append"
+ return="java.io.Writer"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="csq" type="java.lang.CharSequence">
+</parameter>
+<parameter name="start" type="int">
+</parameter>
+<parameter name="end" type="int">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="close"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="flush"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="write"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="buf" type="char[]">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="write"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="buf" type="char[]">
+</parameter>
+<parameter name="offset" type="int">
+</parameter>
+<parameter name="count" type="int">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="write"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="oneChar" type="int">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="write"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="str" type="java.lang.String">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="write"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="str" type="java.lang.String">
+</parameter>
+<parameter name="offset" type="int">
+</parameter>
+<parameter name="count" type="int">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<field name="lock"
+ type="java.lang.Object"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</field>
+</class>
+</package>
+<package name="java.lang"
+>
+<class name="AbstractMethodError"
+ extends="java.lang.IncompatibleClassChangeError"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="AbstractMethodError"
+ type="java.lang.AbstractMethodError"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<constructor name="AbstractMethodError"
+ type="java.lang.AbstractMethodError"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="detailMessage" type="java.lang.String">
+</parameter>
+</constructor>
+</class>
+<class name="AbstractStringBuilder"
+ extends="java.lang.Object"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility=""
+>
+<method name="capacity"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="charAt"
+ return="char"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="index" type="int">
+</parameter>
+</method>
+<method name="codePointAt"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="index" type="int">
+</parameter>
+</method>
+<method name="codePointBefore"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="index" type="int">
+</parameter>
+</method>
+<method name="codePointCount"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="beginIndex" type="int">
+</parameter>
+<parameter name="endIndex" type="int">
+</parameter>
+</method>
+<method name="ensureCapacity"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="min" type="int">
+</parameter>
+</method>
+<method name="getChars"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="start" type="int">
+</parameter>
+<parameter name="end" type="int">
+</parameter>
+<parameter name="dest" type="char[]">
+</parameter>
+<parameter name="destStart" type="int">
+</parameter>
+</method>
+<method name="indexOf"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="string" type="java.lang.String">
+</parameter>
+</method>
+<method name="indexOf"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="subString" type="java.lang.String">
+</parameter>
+<parameter name="start" type="int">
+</parameter>
+</method>
+<method name="lastIndexOf"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="string" type="java.lang.String">
+</parameter>
+</method>
+<method name="lastIndexOf"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="subString" type="java.lang.String">
+</parameter>
+<parameter name="start" type="int">
+</parameter>
+</method>
+<method name="length"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="offsetByCodePoints"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="index" type="int">
+</parameter>
+<parameter name="codePointOffset" type="int">
+</parameter>
+</method>
+<method name="setCharAt"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="index" type="int">
+</parameter>
+<parameter name="ch" type="char">
+</parameter>
+</method>
+<method name="setLength"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="length" type="int">
+</parameter>
+</method>
+<method name="subSequence"
+ return="java.lang.CharSequence"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="start" type="int">
+</parameter>
+<parameter name="end" type="int">
+</parameter>
+</method>
+<method name="substring"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="start" type="int">
+</parameter>
+</method>
+<method name="substring"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="start" type="int">
+</parameter>
+<parameter name="end" type="int">
+</parameter>
+</method>
+<method name="trimToSize"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+</class>
+<interface name="Appendable"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="append"
+ return="java.lang.Appendable"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="c" type="char">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="append"
+ return="java.lang.Appendable"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="csq" type="java.lang.CharSequence">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="append"
+ return="java.lang.Appendable"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="csq" type="java.lang.CharSequence">
+</parameter>
+<parameter name="start" type="int">
+</parameter>
+<parameter name="end" type="int">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+</interface>
+<class name="ArithmeticException"
+ extends="java.lang.RuntimeException"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="ArithmeticException"
+ type="java.lang.ArithmeticException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<constructor name="ArithmeticException"
+ type="java.lang.ArithmeticException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="detailMessage" type="java.lang.String">
+</parameter>
+</constructor>
+</class>
+<class name="ArrayIndexOutOfBoundsException"
+ extends="java.lang.IndexOutOfBoundsException"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="ArrayIndexOutOfBoundsException"
+ type="java.lang.ArrayIndexOutOfBoundsException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<constructor name="ArrayIndexOutOfBoundsException"
+ type="java.lang.ArrayIndexOutOfBoundsException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="index" type="int">
+</parameter>
+</constructor>
+<constructor name="ArrayIndexOutOfBoundsException"
+ type="java.lang.ArrayIndexOutOfBoundsException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="detailMessage" type="java.lang.String">
+</parameter>
+</constructor>
+</class>
+<class name="ArrayStoreException"
+ extends="java.lang.RuntimeException"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="ArrayStoreException"
+ type="java.lang.ArrayStoreException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<constructor name="ArrayStoreException"
+ type="java.lang.ArrayStoreException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="detailMessage" type="java.lang.String">
+</parameter>
+</constructor>
+</class>
+<class name="AssertionError"
+ extends="java.lang.Error"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="AssertionError"
+ type="java.lang.AssertionError"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<constructor name="AssertionError"
+ type="java.lang.AssertionError"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="detailMessage" type="java.lang.Object">
+</parameter>
+</constructor>
+<constructor name="AssertionError"
+ type="java.lang.AssertionError"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="detailMessage" type="boolean">
+</parameter>
+</constructor>
+<constructor name="AssertionError"
+ type="java.lang.AssertionError"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="detailMessage" type="char">
+</parameter>
+</constructor>
+<constructor name="AssertionError"
+ type="java.lang.AssertionError"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="detailMessage" type="int">
+</parameter>
+</constructor>
+<constructor name="AssertionError"
+ type="java.lang.AssertionError"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="detailMessage" type="long">
+</parameter>
+</constructor>
+<constructor name="AssertionError"
+ type="java.lang.AssertionError"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="detailMessage" type="float">
+</parameter>
+</constructor>
+<constructor name="AssertionError"
+ type="java.lang.AssertionError"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="detailMessage" type="double">
+</parameter>
+</constructor>
+</class>
+<class name="Boolean"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="java.lang.Comparable">
+</implements>
+<implements name="java.io.Serializable">
+</implements>
+<constructor name="Boolean"
+ type="java.lang.Boolean"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="string" type="java.lang.String">
+</parameter>
+</constructor>
+<constructor name="Boolean"
+ type="java.lang.Boolean"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="value" type="boolean">
+</parameter>
+</constructor>
+<method name="booleanValue"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="compareTo"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="that" type="java.lang.Boolean">
+</parameter>
+</method>
+<method name="getBoolean"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="string" type="java.lang.String">
+</parameter>
+</method>
+<method name="parseBoolean"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="s" type="java.lang.String">
+</parameter>
+</method>
+<method name="toString"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="value" type="boolean">
+</parameter>
+</method>
+<method name="valueOf"
+ return="java.lang.Boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="string" type="java.lang.String">
+</parameter>
+</method>
+<method name="valueOf"
+ return="java.lang.Boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="b" type="boolean">
+</parameter>
+</method>
+<field name="FALSE"
+ type="java.lang.Boolean"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TRUE"
+ type="java.lang.Boolean"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TYPE"
+ type="java.lang.Class"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<class name="Byte"
+ extends="java.lang.Number"
+ abstract="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="java.lang.Comparable">
+</implements>
+<constructor name="Byte"
+ type="java.lang.Byte"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="value" type="byte">
+</parameter>
+</constructor>
+<constructor name="Byte"
+ type="java.lang.Byte"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="string" type="java.lang.String">
+</parameter>
+<exception name="NumberFormatException" type="java.lang.NumberFormatException">
+</exception>
+</constructor>
+<method name="compareTo"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="object" type="java.lang.Byte">
+</parameter>
+</method>
+<method name="decode"
+ return="java.lang.Byte"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="string" type="java.lang.String">
+</parameter>
+<exception name="NumberFormatException" type="java.lang.NumberFormatException">
+</exception>
+</method>
+<method name="doubleValue"
+ return="double"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="floatValue"
+ return="float"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="intValue"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="longValue"
+ return="long"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="parseByte"
+ return="byte"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="string" type="java.lang.String">
+</parameter>
+<exception name="NumberFormatException" type="java.lang.NumberFormatException">
+</exception>
+</method>
+<method name="parseByte"
+ return="byte"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="string" type="java.lang.String">
+</parameter>
+<parameter name="radix" type="int">
+</parameter>
+<exception name="NumberFormatException" type="java.lang.NumberFormatException">
+</exception>
+</method>
+<method name="toString"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="value" type="byte">
+</parameter>
+</method>
+<method name="valueOf"
+ return="java.lang.Byte"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="string" type="java.lang.String">
+</parameter>
+<exception name="NumberFormatException" type="java.lang.NumberFormatException">
+</exception>
+</method>
+<method name="valueOf"
+ return="java.lang.Byte"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="string" type="java.lang.String">
+</parameter>
+<parameter name="radix" type="int">
+</parameter>
+<exception name="NumberFormatException" type="java.lang.NumberFormatException">
+</exception>
+</method>
+<method name="valueOf"
+ return="java.lang.Byte"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="b" type="byte">
+</parameter>
+</method>
+<field name="MAX_VALUE"
+ type="byte"
+ transient="false"
+ volatile="false"
+ value="127"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="MIN_VALUE"
+ type="byte"
+ transient="false"
+ volatile="false"
+ value="-128"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="SIZE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="8"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TYPE"
+ type="java.lang.Class"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<interface name="CharSequence"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="charAt"
+ return="char"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="index" type="int">
+</parameter>
+</method>
+<method name="length"
+ return="int"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="subSequence"
+ return="java.lang.CharSequence"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="start" type="int">
+</parameter>
+<parameter name="end" type="int">
+</parameter>
+</method>
+<method name="toString"
+ return="java.lang.String"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+</interface>
+<class name="Character"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="java.lang.Comparable">
+</implements>
+<implements name="java.io.Serializable">
+</implements>
+<constructor name="Character"
+ type="java.lang.Character"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="value" type="char">
+</parameter>
+</constructor>
+<method name="charCount"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="codePoint" type="int">
+</parameter>
+</method>
+<method name="charValue"
+ return="char"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="codePointAt"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="seq" type="java.lang.CharSequence">
+</parameter>
+<parameter name="index" type="int">
+</parameter>
+</method>
+<method name="codePointAt"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="seq" type="char[]">
+</parameter>
+<parameter name="index" type="int">
+</parameter>
+</method>
+<method name="codePointAt"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="seq" type="char[]">
+</parameter>
+<parameter name="index" type="int">
+</parameter>
+<parameter name="limit" type="int">
+</parameter>
+</method>
+<method name="codePointBefore"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="seq" type="java.lang.CharSequence">
+</parameter>
+<parameter name="index" type="int">
+</parameter>
+</method>
+<method name="codePointBefore"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="seq" type="char[]">
+</parameter>
+<parameter name="index" type="int">
+</parameter>
+</method>
+<method name="codePointBefore"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="seq" type="char[]">
+</parameter>
+<parameter name="index" type="int">
+</parameter>
+<parameter name="start" type="int">
+</parameter>
+</method>
+<method name="codePointCount"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="seq" type="java.lang.CharSequence">
+</parameter>
+<parameter name="beginIndex" type="int">
+</parameter>
+<parameter name="endIndex" type="int">
+</parameter>
+</method>
+<method name="codePointCount"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="seq" type="char[]">
+</parameter>
+<parameter name="offset" type="int">
+</parameter>
+<parameter name="count" type="int">
+</parameter>
+</method>
+<method name="compareTo"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="c" type="java.lang.Character">
+</parameter>
+</method>
+<method name="digit"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="c" type="char">
+</parameter>
+<parameter name="radix" type="int">
+</parameter>
+</method>
+<method name="digit"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="codePoint" type="int">
+</parameter>
+<parameter name="radix" type="int">
+</parameter>
+</method>
+<method name="forDigit"
+ return="char"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="digit" type="int">
+</parameter>
+<parameter name="radix" type="int">
+</parameter>
+</method>
+<method name="getDirectionality"
+ return="byte"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="c" type="char">
+</parameter>
+</method>
+<method name="getDirectionality"
+ return="byte"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="codePoint" type="int">
+</parameter>
+</method>
+<method name="getNumericValue"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="c" type="char">
+</parameter>
+</method>
+<method name="getNumericValue"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="codePoint" type="int">
+</parameter>
+</method>
+<method name="getType"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="c" type="char">
+</parameter>
+</method>
+<method name="getType"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="codePoint" type="int">
+</parameter>
+</method>
+<method name="isDefined"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="c" type="char">
+</parameter>
+</method>
+<method name="isDefined"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="codePoint" type="int">
+</parameter>
+</method>
+<method name="isDigit"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="c" type="char">
+</parameter>
+</method>
+<method name="isDigit"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="codePoint" type="int">
+</parameter>
+</method>
+<method name="isHighSurrogate"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="ch" type="char">
+</parameter>
+</method>
+<method name="isISOControl"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="c" type="char">
+</parameter>
+</method>
+<method name="isISOControl"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="c" type="int">
+</parameter>
+</method>
+<method name="isIdentifierIgnorable"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="c" type="char">
+</parameter>
+</method>
+<method name="isIdentifierIgnorable"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="codePoint" type="int">
+</parameter>
+</method>
+<method name="isJavaIdentifierPart"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="c" type="char">
+</parameter>
+</method>
+<method name="isJavaIdentifierPart"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="codePoint" type="int">
+</parameter>
+</method>
+<method name="isJavaIdentifierStart"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="c" type="char">
+</parameter>
+</method>
+<method name="isJavaIdentifierStart"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="codePoint" type="int">
+</parameter>
+</method>
+<method name="isJavaLetter"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="deprecated"
+ visibility="public"
+>
+<parameter name="c" type="char">
+</parameter>
+</method>
+<method name="isJavaLetterOrDigit"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="deprecated"
+ visibility="public"
+>
+<parameter name="c" type="char">
+</parameter>
+</method>
+<method name="isLetter"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="c" type="char">
+</parameter>
+</method>
+<method name="isLetter"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="codePoint" type="int">
+</parameter>
+</method>
+<method name="isLetterOrDigit"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="c" type="char">
+</parameter>
+</method>
+<method name="isLetterOrDigit"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="codePoint" type="int">
+</parameter>
+</method>
+<method name="isLowSurrogate"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="ch" type="char">
+</parameter>
+</method>
+<method name="isLowerCase"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="c" type="char">
+</parameter>
+</method>
+<method name="isLowerCase"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="codePoint" type="int">
+</parameter>
+</method>
+<method name="isMirrored"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="c" type="char">
+</parameter>
+</method>
+<method name="isMirrored"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="codePoint" type="int">
+</parameter>
+</method>
+<method name="isSpace"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="deprecated"
+ visibility="public"
+>
+<parameter name="c" type="char">
+</parameter>
+</method>
+<method name="isSpaceChar"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="c" type="char">
+</parameter>
+</method>
+<method name="isSpaceChar"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="codePoint" type="int">
+</parameter>
+</method>
+<method name="isSupplementaryCodePoint"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="codePoint" type="int">
+</parameter>
+</method>
+<method name="isSurrogatePair"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="high" type="char">
+</parameter>
+<parameter name="low" type="char">
+</parameter>
+</method>
+<method name="isTitleCase"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="c" type="char">
+</parameter>
+</method>
+<method name="isTitleCase"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="codePoint" type="int">
+</parameter>
+</method>
+<method name="isUnicodeIdentifierPart"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="c" type="char">
+</parameter>
+</method>
+<method name="isUnicodeIdentifierPart"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="codePoint" type="int">
+</parameter>
+</method>
+<method name="isUnicodeIdentifierStart"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="c" type="char">
+</parameter>
+</method>
+<method name="isUnicodeIdentifierStart"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="codePoint" type="int">
+</parameter>
+</method>
+<method name="isUpperCase"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="c" type="char">
+</parameter>
+</method>
+<method name="isUpperCase"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="codePoint" type="int">
+</parameter>
+</method>
+<method name="isValidCodePoint"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="codePoint" type="int">
+</parameter>
+</method>
+<method name="isWhitespace"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="c" type="char">
+</parameter>
+</method>
+<method name="isWhitespace"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="codePoint" type="int">
+</parameter>
+</method>
+<method name="offsetByCodePoints"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="seq" type="java.lang.CharSequence">
+</parameter>
+<parameter name="index" type="int">
+</parameter>
+<parameter name="codePointOffset" type="int">
+</parameter>
+</method>
+<method name="offsetByCodePoints"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="seq" type="char[]">
+</parameter>
+<parameter name="start" type="int">
+</parameter>
+<parameter name="count" type="int">
+</parameter>
+<parameter name="index" type="int">
+</parameter>
+<parameter name="codePointOffset" type="int">
+</parameter>
+</method>
+<method name="reverseBytes"
+ return="char"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="c" type="char">
+</parameter>
+</method>
+<method name="toChars"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="codePoint" type="int">
+</parameter>
+<parameter name="dst" type="char[]">
+</parameter>
+<parameter name="dstIndex" type="int">
+</parameter>
+</method>
+<method name="toChars"
+ return="char[]"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="codePoint" type="int">
+</parameter>
+</method>
+<method name="toCodePoint"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="high" type="char">
+</parameter>
+<parameter name="low" type="char">
+</parameter>
+</method>
+<method name="toLowerCase"
+ return="char"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="c" type="char">
+</parameter>
+</method>
+<method name="toLowerCase"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="codePoint" type="int">
+</parameter>
+</method>
+<method name="toString"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="value" type="char">
+</parameter>
+</method>
+<method name="toTitleCase"
+ return="char"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="c" type="char">
+</parameter>
+</method>
+<method name="toTitleCase"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="codePoint" type="int">
+</parameter>
+</method>
+<method name="toUpperCase"
+ return="char"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="c" type="char">
+</parameter>
+</method>
+<method name="toUpperCase"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="codePoint" type="int">
+</parameter>
+</method>
+<method name="valueOf"
+ return="java.lang.Character"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="c" type="char">
+</parameter>
+</method>
+<field name="COMBINING_SPACING_MARK"
+ type="byte"
+ transient="false"
+ volatile="false"
+ value="8"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="CONNECTOR_PUNCTUATION"
+ type="byte"
+ transient="false"
+ volatile="false"
+ value="23"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="CONTROL"
+ type="byte"
+ transient="false"
+ volatile="false"
+ value="15"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="CURRENCY_SYMBOL"
+ type="byte"
+ transient="false"
+ volatile="false"
+ value="26"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="DASH_PUNCTUATION"
+ type="byte"
+ transient="false"
+ volatile="false"
+ value="20"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="DECIMAL_DIGIT_NUMBER"
+ type="byte"
+ transient="false"
+ volatile="false"
+ value="9"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="DIRECTIONALITY_ARABIC_NUMBER"
+ type="byte"
+ transient="false"
+ volatile="false"
+ value="6"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="DIRECTIONALITY_BOUNDARY_NEUTRAL"
+ type="byte"
+ transient="false"
+ volatile="false"
+ value="9"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="DIRECTIONALITY_COMMON_NUMBER_SEPARATOR"
+ type="byte"
+ transient="false"
+ volatile="false"
+ value="7"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="DIRECTIONALITY_EUROPEAN_NUMBER"
+ type="byte"
+ transient="false"
+ volatile="false"
+ value="3"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="DIRECTIONALITY_EUROPEAN_NUMBER_SEPARATOR"
+ type="byte"
+ transient="false"
+ volatile="false"
+ value="4"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="DIRECTIONALITY_EUROPEAN_NUMBER_TERMINATOR"
+ type="byte"
+ transient="false"
+ volatile="false"
+ value="5"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="DIRECTIONALITY_LEFT_TO_RIGHT"
+ type="byte"
+ transient="false"
+ volatile="false"
+ value="0"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="DIRECTIONALITY_LEFT_TO_RIGHT_EMBEDDING"
+ type="byte"
+ transient="false"
+ volatile="false"
+ value="14"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="DIRECTIONALITY_LEFT_TO_RIGHT_OVERRIDE"
+ type="byte"
+ transient="false"
+ volatile="false"
+ value="15"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="DIRECTIONALITY_NONSPACING_MARK"
+ type="byte"
+ transient="false"
+ volatile="false"
+ value="8"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="DIRECTIONALITY_OTHER_NEUTRALS"
+ type="byte"
+ transient="false"
+ volatile="false"
+ value="13"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="DIRECTIONALITY_PARAGRAPH_SEPARATOR"
+ type="byte"
+ transient="false"
+ volatile="false"
+ value="10"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="DIRECTIONALITY_POP_DIRECTIONAL_FORMAT"
+ type="byte"
+ transient="false"
+ volatile="false"
+ value="18"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="DIRECTIONALITY_RIGHT_TO_LEFT"
+ type="byte"
+ transient="false"
+ volatile="false"
+ value="1"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="DIRECTIONALITY_RIGHT_TO_LEFT_ARABIC"
+ type="byte"
+ transient="false"
+ volatile="false"
+ value="2"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="DIRECTIONALITY_RIGHT_TO_LEFT_EMBEDDING"
+ type="byte"
+ transient="false"
+ volatile="false"
+ value="16"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="DIRECTIONALITY_RIGHT_TO_LEFT_OVERRIDE"
+ type="byte"
+ transient="false"
+ volatile="false"
+ value="17"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="DIRECTIONALITY_SEGMENT_SEPARATOR"
+ type="byte"
+ transient="false"
+ volatile="false"
+ value="11"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="DIRECTIONALITY_UNDEFINED"
+ type="byte"
+ transient="false"
+ volatile="false"
+ value="-1"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="DIRECTIONALITY_WHITESPACE"
+ type="byte"
+ transient="false"
+ volatile="false"
+ value="12"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ENCLOSING_MARK"
+ type="byte"
+ transient="false"
+ volatile="false"
+ value="7"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="END_PUNCTUATION"
+ type="byte"
+ transient="false"
+ volatile="false"
+ value="22"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="FINAL_QUOTE_PUNCTUATION"
+ type="byte"
+ transient="false"
+ volatile="false"
+ value="30"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="FORMAT"
+ type="byte"
+ transient="false"
+ volatile="false"
+ value="16"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="INITIAL_QUOTE_PUNCTUATION"
+ type="byte"
+ transient="false"
+ volatile="false"
+ value="29"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="LETTER_NUMBER"
+ type="byte"
+ transient="false"
+ volatile="false"
+ value="10"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="LINE_SEPARATOR"
+ type="byte"
+ transient="false"
+ volatile="false"
+ value="13"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="LOWERCASE_LETTER"
+ type="byte"
+ transient="false"
+ volatile="false"
+ value="2"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="MATH_SYMBOL"
+ type="byte"
+ transient="false"
+ volatile="false"
+ value="25"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="MAX_CODE_POINT"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1114111"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="MAX_HIGH_SURROGATE"
+ type="char"
+ transient="false"
+ volatile="false"
+ value="56319"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="MAX_LOW_SURROGATE"
+ type="char"
+ transient="false"
+ volatile="false"
+ value="57343"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="MAX_RADIX"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="36"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="MAX_SURROGATE"
+ type="char"
+ transient="false"
+ volatile="false"
+ value="57343"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="MAX_VALUE"
+ type="char"
+ transient="false"
+ volatile="false"
+ value="65535"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="MIN_CODE_POINT"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="0"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="MIN_HIGH_SURROGATE"
+ type="char"
+ transient="false"
+ volatile="false"
+ value="55296"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="MIN_LOW_SURROGATE"
+ type="char"
+ transient="false"
+ volatile="false"
+ value="56320"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="MIN_RADIX"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="MIN_SUPPLEMENTARY_CODE_POINT"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="65536"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="MIN_SURROGATE"
+ type="char"
+ transient="false"
+ volatile="false"
+ value="55296"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="MIN_VALUE"
+ type="char"
+ transient="false"
+ volatile="false"
+ value="0"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="MODIFIER_LETTER"
+ type="byte"
+ transient="false"
+ volatile="false"
+ value="4"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="MODIFIER_SYMBOL"
+ type="byte"
+ transient="false"
+ volatile="false"
+ value="27"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="NON_SPACING_MARK"
+ type="byte"
+ transient="false"
+ volatile="false"
+ value="6"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="OTHER_LETTER"
+ type="byte"
+ transient="false"
+ volatile="false"
+ value="5"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="OTHER_NUMBER"
+ type="byte"
+ transient="false"
+ volatile="false"
+ value="11"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="OTHER_PUNCTUATION"
+ type="byte"
+ transient="false"
+ volatile="false"
+ value="24"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="OTHER_SYMBOL"
+ type="byte"
+ transient="false"
+ volatile="false"
+ value="28"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="PARAGRAPH_SEPARATOR"
+ type="byte"
+ transient="false"
+ volatile="false"
+ value="14"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="PRIVATE_USE"
+ type="byte"
+ transient="false"
+ volatile="false"
+ value="18"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="SIZE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="SPACE_SEPARATOR"
+ type="byte"
+ transient="false"
+ volatile="false"
+ value="12"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="START_PUNCTUATION"
+ type="byte"
+ transient="false"
+ volatile="false"
+ value="21"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="SURROGATE"
+ type="byte"
+ transient="false"
+ volatile="false"
+ value="19"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TITLECASE_LETTER"
+ type="byte"
+ transient="false"
+ volatile="false"
+ value="3"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TYPE"
+ type="java.lang.Class"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="UNASSIGNED"
+ type="byte"
+ transient="false"
+ volatile="false"
+ value="0"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="UPPERCASE_LETTER"
+ type="byte"
+ transient="false"
+ volatile="false"
+ value="1"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<class name="Character.Subset"
+ extends="java.lang.Object"
+ abstract="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="Character.Subset"
+ type="java.lang.Character.Subset"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="string" type="java.lang.String">
+</parameter>
+</constructor>
+<method name="equals"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="object" type="java.lang.Object">
+</parameter>
+</method>
+<method name="hashCode"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="toString"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+</class>
+<class name="Character.UnicodeBlock"
+ extends="java.lang.Character.Subset"
+ abstract="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="forName"
+ return="java.lang.Character.UnicodeBlock"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="blockName" type="java.lang.String">
+</parameter>
+</method>
+<method name="of"
+ return="java.lang.Character.UnicodeBlock"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="c" type="char">
+</parameter>
+</method>
+<method name="of"
+ return="java.lang.Character.UnicodeBlock"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="codePoint" type="int">
+</parameter>
+</method>
+<field name="AEGEAN_NUMBERS"
+ type="java.lang.Character.UnicodeBlock"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ALPHABETIC_PRESENTATION_FORMS"
+ type="java.lang.Character.UnicodeBlock"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ARABIC"
+ type="java.lang.Character.UnicodeBlock"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ARABIC_PRESENTATION_FORMS_A"
+ type="java.lang.Character.UnicodeBlock"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ARABIC_PRESENTATION_FORMS_B"
+ type="java.lang.Character.UnicodeBlock"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ARMENIAN"
+ type="java.lang.Character.UnicodeBlock"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ARROWS"
+ type="java.lang.Character.UnicodeBlock"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="BASIC_LATIN"
+ type="java.lang.Character.UnicodeBlock"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="BENGALI"
+ type="java.lang.Character.UnicodeBlock"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="BLOCK_ELEMENTS"
+ type="java.lang.Character.UnicodeBlock"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="BOPOMOFO"
+ type="java.lang.Character.UnicodeBlock"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="BOPOMOFO_EXTENDED"
+ type="java.lang.Character.UnicodeBlock"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="BOX_DRAWING"
+ type="java.lang.Character.UnicodeBlock"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="BRAILLE_PATTERNS"
+ type="java.lang.Character.UnicodeBlock"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="BUHID"
+ type="java.lang.Character.UnicodeBlock"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="BYZANTINE_MUSICAL_SYMBOLS"
+ type="java.lang.Character.UnicodeBlock"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="CHEROKEE"
+ type="java.lang.Character.UnicodeBlock"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="CJK_COMPATIBILITY"
+ type="java.lang.Character.UnicodeBlock"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="CJK_COMPATIBILITY_FORMS"
+ type="java.lang.Character.UnicodeBlock"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="CJK_COMPATIBILITY_IDEOGRAPHS"
+ type="java.lang.Character.UnicodeBlock"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="CJK_COMPATIBILITY_IDEOGRAPHS_SUPPLEMENT"
+ type="java.lang.Character.UnicodeBlock"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="CJK_RADICALS_SUPPLEMENT"
+ type="java.lang.Character.UnicodeBlock"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="CJK_SYMBOLS_AND_PUNCTUATION"
+ type="java.lang.Character.UnicodeBlock"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="CJK_UNIFIED_IDEOGRAPHS"
+ type="java.lang.Character.UnicodeBlock"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="CJK_UNIFIED_IDEOGRAPHS_EXTENSION_A"
+ type="java.lang.Character.UnicodeBlock"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="CJK_UNIFIED_IDEOGRAPHS_EXTENSION_B"
+ type="java.lang.Character.UnicodeBlock"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="COMBINING_DIACRITICAL_MARKS"
+ type="java.lang.Character.UnicodeBlock"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="COMBINING_HALF_MARKS"
+ type="java.lang.Character.UnicodeBlock"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="COMBINING_MARKS_FOR_SYMBOLS"
+ type="java.lang.Character.UnicodeBlock"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="CONTROL_PICTURES"
+ type="java.lang.Character.UnicodeBlock"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="CURRENCY_SYMBOLS"
+ type="java.lang.Character.UnicodeBlock"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="CYPRIOT_SYLLABARY"
+ type="java.lang.Character.UnicodeBlock"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="CYRILLIC"
+ type="java.lang.Character.UnicodeBlock"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="CYRILLIC_SUPPLEMENTARY"
+ type="java.lang.Character.UnicodeBlock"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="DESERET"
+ type="java.lang.Character.UnicodeBlock"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="DEVANAGARI"
+ type="java.lang.Character.UnicodeBlock"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="DINGBATS"
+ type="java.lang.Character.UnicodeBlock"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ENCLOSED_ALPHANUMERICS"
+ type="java.lang.Character.UnicodeBlock"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ENCLOSED_CJK_LETTERS_AND_MONTHS"
+ type="java.lang.Character.UnicodeBlock"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ETHIOPIC"
+ type="java.lang.Character.UnicodeBlock"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GENERAL_PUNCTUATION"
+ type="java.lang.Character.UnicodeBlock"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GEOMETRIC_SHAPES"
+ type="java.lang.Character.UnicodeBlock"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GEORGIAN"
+ type="java.lang.Character.UnicodeBlock"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GOTHIC"
+ type="java.lang.Character.UnicodeBlock"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GREEK"
+ type="java.lang.Character.UnicodeBlock"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GREEK_EXTENDED"
+ type="java.lang.Character.UnicodeBlock"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GUJARATI"
+ type="java.lang.Character.UnicodeBlock"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GURMUKHI"
+ type="java.lang.Character.UnicodeBlock"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="HALFWIDTH_AND_FULLWIDTH_FORMS"
+ type="java.lang.Character.UnicodeBlock"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="HANGUL_COMPATIBILITY_JAMO"
+ type="java.lang.Character.UnicodeBlock"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="HANGUL_JAMO"
+ type="java.lang.Character.UnicodeBlock"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="HANGUL_SYLLABLES"
+ type="java.lang.Character.UnicodeBlock"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="HANUNOO"
+ type="java.lang.Character.UnicodeBlock"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="HEBREW"
+ type="java.lang.Character.UnicodeBlock"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="HIGH_PRIVATE_USE_SURROGATES"
+ type="java.lang.Character.UnicodeBlock"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="HIGH_SURROGATES"
+ type="java.lang.Character.UnicodeBlock"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="HIRAGANA"
+ type="java.lang.Character.UnicodeBlock"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="IDEOGRAPHIC_DESCRIPTION_CHARACTERS"
+ type="java.lang.Character.UnicodeBlock"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="IPA_EXTENSIONS"
+ type="java.lang.Character.UnicodeBlock"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="KANBUN"
+ type="java.lang.Character.UnicodeBlock"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="KANGXI_RADICALS"
+ type="java.lang.Character.UnicodeBlock"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="KANNADA"
+ type="java.lang.Character.UnicodeBlock"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="KATAKANA"
+ type="java.lang.Character.UnicodeBlock"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="KATAKANA_PHONETIC_EXTENSIONS"
+ type="java.lang.Character.UnicodeBlock"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="KHMER"
+ type="java.lang.Character.UnicodeBlock"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="KHMER_SYMBOLS"
+ type="java.lang.Character.UnicodeBlock"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="LAO"
+ type="java.lang.Character.UnicodeBlock"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="LATIN_1_SUPPLEMENT"
+ type="java.lang.Character.UnicodeBlock"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="LATIN_EXTENDED_A"
+ type="java.lang.Character.UnicodeBlock"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="LATIN_EXTENDED_ADDITIONAL"
+ type="java.lang.Character.UnicodeBlock"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="LATIN_EXTENDED_B"
+ type="java.lang.Character.UnicodeBlock"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="LETTERLIKE_SYMBOLS"
+ type="java.lang.Character.UnicodeBlock"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="LIMBU"
+ type="java.lang.Character.UnicodeBlock"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="LINEAR_B_IDEOGRAMS"
+ type="java.lang.Character.UnicodeBlock"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="LINEAR_B_SYLLABARY"
+ type="java.lang.Character.UnicodeBlock"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="LOW_SURROGATES"
+ type="java.lang.Character.UnicodeBlock"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="MALAYALAM"
+ type="java.lang.Character.UnicodeBlock"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="MATHEMATICAL_ALPHANUMERIC_SYMBOLS"
+ type="java.lang.Character.UnicodeBlock"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="MATHEMATICAL_OPERATORS"
+ type="java.lang.Character.UnicodeBlock"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="MISCELLANEOUS_MATHEMATICAL_SYMBOLS_A"
+ type="java.lang.Character.UnicodeBlock"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="MISCELLANEOUS_MATHEMATICAL_SYMBOLS_B"
+ type="java.lang.Character.UnicodeBlock"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="MISCELLANEOUS_SYMBOLS"
+ type="java.lang.Character.UnicodeBlock"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="MISCELLANEOUS_SYMBOLS_AND_ARROWS"
+ type="java.lang.Character.UnicodeBlock"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="MISCELLANEOUS_TECHNICAL"
+ type="java.lang.Character.UnicodeBlock"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="MONGOLIAN"
+ type="java.lang.Character.UnicodeBlock"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="MUSICAL_SYMBOLS"
+ type="java.lang.Character.UnicodeBlock"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="MYANMAR"
+ type="java.lang.Character.UnicodeBlock"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="NUMBER_FORMS"
+ type="java.lang.Character.UnicodeBlock"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="OGHAM"
+ type="java.lang.Character.UnicodeBlock"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="OLD_ITALIC"
+ type="java.lang.Character.UnicodeBlock"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="OPTICAL_CHARACTER_RECOGNITION"
+ type="java.lang.Character.UnicodeBlock"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ORIYA"
+ type="java.lang.Character.UnicodeBlock"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="OSMANYA"
+ type="java.lang.Character.UnicodeBlock"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="PHONETIC_EXTENSIONS"
+ type="java.lang.Character.UnicodeBlock"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="PRIVATE_USE_AREA"
+ type="java.lang.Character.UnicodeBlock"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="RUNIC"
+ type="java.lang.Character.UnicodeBlock"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="SHAVIAN"
+ type="java.lang.Character.UnicodeBlock"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="SINHALA"
+ type="java.lang.Character.UnicodeBlock"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="SMALL_FORM_VARIANTS"
+ type="java.lang.Character.UnicodeBlock"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="SPACING_MODIFIER_LETTERS"
+ type="java.lang.Character.UnicodeBlock"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="SPECIALS"
+ type="java.lang.Character.UnicodeBlock"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="SUPERSCRIPTS_AND_SUBSCRIPTS"
+ type="java.lang.Character.UnicodeBlock"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="SUPPLEMENTAL_ARROWS_A"
+ type="java.lang.Character.UnicodeBlock"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="SUPPLEMENTAL_ARROWS_B"
+ type="java.lang.Character.UnicodeBlock"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="SUPPLEMENTAL_MATHEMATICAL_OPERATORS"
+ type="java.lang.Character.UnicodeBlock"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="SUPPLEMENTARY_PRIVATE_USE_AREA_A"
+ type="java.lang.Character.UnicodeBlock"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="SUPPLEMENTARY_PRIVATE_USE_AREA_B"
+ type="java.lang.Character.UnicodeBlock"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="SURROGATES_AREA"
+ type="java.lang.Character.UnicodeBlock"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="deprecated"
+ visibility="public"
+>
+</field>
+<field name="SYRIAC"
+ type="java.lang.Character.UnicodeBlock"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TAGALOG"
+ type="java.lang.Character.UnicodeBlock"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TAGBANWA"
+ type="java.lang.Character.UnicodeBlock"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TAGS"
+ type="java.lang.Character.UnicodeBlock"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TAI_LE"
+ type="java.lang.Character.UnicodeBlock"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TAI_XUAN_JING_SYMBOLS"
+ type="java.lang.Character.UnicodeBlock"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TAMIL"
+ type="java.lang.Character.UnicodeBlock"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TELUGU"
+ type="java.lang.Character.UnicodeBlock"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="THAANA"
+ type="java.lang.Character.UnicodeBlock"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="THAI"
+ type="java.lang.Character.UnicodeBlock"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TIBETAN"
+ type="java.lang.Character.UnicodeBlock"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="UGARITIC"
+ type="java.lang.Character.UnicodeBlock"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="UNIFIED_CANADIAN_ABORIGINAL_SYLLABICS"
+ type="java.lang.Character.UnicodeBlock"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="VARIATION_SELECTORS"
+ type="java.lang.Character.UnicodeBlock"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="VARIATION_SELECTORS_SUPPLEMENT"
+ type="java.lang.Character.UnicodeBlock"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="YIJING_HEXAGRAM_SYMBOLS"
+ type="java.lang.Character.UnicodeBlock"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="YI_RADICALS"
+ type="java.lang.Character.UnicodeBlock"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="YI_SYLLABLES"
+ type="java.lang.Character.UnicodeBlock"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<class name="Class"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="java.lang.reflect.AnnotatedElement">
+</implements>
+<implements name="java.lang.reflect.GenericDeclaration">
+</implements>
+<implements name="java.io.Serializable">
+</implements>
+<implements name="java.lang.reflect.Type">
+</implements>
+<method name="asSubclass"
+ return="java.lang.Class&lt;? extends U&gt;"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="clazz" type="java.lang.Class&lt;U&gt;">
+</parameter>
+</method>
+<method name="cast"
+ return="T"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="obj" type="java.lang.Object">
+</parameter>
+</method>
+<method name="desiredAssertionStatus"
+ return="boolean"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="forName"
+ return="java.lang.Class&lt;?&gt;"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="className" type="java.lang.String">
+</parameter>
+<exception name="ClassNotFoundException" type="java.lang.ClassNotFoundException">
+</exception>
+</method>
+<method name="forName"
+ return="java.lang.Class&lt;?&gt;"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="className" type="java.lang.String">
+</parameter>
+<parameter name="initializeBoolean" type="boolean">
+</parameter>
+<parameter name="classLoader" type="java.lang.ClassLoader">
+</parameter>
+<exception name="ClassNotFoundException" type="java.lang.ClassNotFoundException">
+</exception>
+</method>
+<method name="getAnnotation"
+ return="A"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="annotationClass" type="java.lang.Class&lt;A&gt;">
+</parameter>
+</method>
+<method name="getAnnotations"
+ return="java.lang.annotation.Annotation[]"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getCanonicalName"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getClassLoader"
+ return="java.lang.ClassLoader"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getClasses"
+ return="java.lang.Class[]"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getComponentType"
+ return="java.lang.Class&lt;?&gt;"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getConstructor"
+ return="java.lang.reflect.Constructor&lt;T&gt;"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="parameterTypes" type="java.lang.Class...">
+</parameter>
+<exception name="NoSuchMethodException" type="java.lang.NoSuchMethodException">
+</exception>
+<exception name="SecurityException" type="java.lang.SecurityException">
+</exception>
+</method>
+<method name="getConstructors"
+ return="java.lang.reflect.Constructor[]"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="SecurityException" type="java.lang.SecurityException">
+</exception>
+</method>
+<method name="getDeclaredAnnotations"
+ return="java.lang.annotation.Annotation[]"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getDeclaredClasses"
+ return="java.lang.Class[]"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="SecurityException" type="java.lang.SecurityException">
+</exception>
+</method>
+<method name="getDeclaredConstructor"
+ return="java.lang.reflect.Constructor&lt;T&gt;"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="parameterTypes" type="java.lang.Class...">
+</parameter>
+<exception name="NoSuchMethodException" type="java.lang.NoSuchMethodException">
+</exception>
+<exception name="SecurityException" type="java.lang.SecurityException">
+</exception>
+</method>
+<method name="getDeclaredConstructors"
+ return="java.lang.reflect.Constructor[]"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="SecurityException" type="java.lang.SecurityException">
+</exception>
+</method>
+<method name="getDeclaredField"
+ return="java.lang.reflect.Field"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+<exception name="NoSuchFieldException" type="java.lang.NoSuchFieldException">
+</exception>
+<exception name="SecurityException" type="java.lang.SecurityException">
+</exception>
+</method>
+<method name="getDeclaredFields"
+ return="java.lang.reflect.Field[]"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="SecurityException" type="java.lang.SecurityException">
+</exception>
+</method>
+<method name="getDeclaredMethod"
+ return="java.lang.reflect.Method"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+<parameter name="parameterTypes" type="java.lang.Class...">
+</parameter>
+<exception name="NoSuchMethodException" type="java.lang.NoSuchMethodException">
+</exception>
+<exception name="SecurityException" type="java.lang.SecurityException">
+</exception>
+</method>
+<method name="getDeclaredMethods"
+ return="java.lang.reflect.Method[]"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="SecurityException" type="java.lang.SecurityException">
+</exception>
+</method>
+<method name="getDeclaringClass"
+ return="java.lang.Class&lt;?&gt;"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getEnclosingClass"
+ return="java.lang.Class&lt;?&gt;"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getEnclosingConstructor"
+ return="java.lang.reflect.Constructor&lt;?&gt;"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getEnclosingMethod"
+ return="java.lang.reflect.Method"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getEnumConstants"
+ return="T[]"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getField"
+ return="java.lang.reflect.Field"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+<exception name="NoSuchFieldException" type="java.lang.NoSuchFieldException">
+</exception>
+<exception name="SecurityException" type="java.lang.SecurityException">
+</exception>
+</method>
+<method name="getFields"
+ return="java.lang.reflect.Field[]"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="SecurityException" type="java.lang.SecurityException">
+</exception>
+</method>
+<method name="getGenericInterfaces"
+ return="java.lang.reflect.Type[]"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getGenericSuperclass"
+ return="java.lang.reflect.Type"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getInterfaces"
+ return="java.lang.Class[]"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getMethod"
+ return="java.lang.reflect.Method"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+<parameter name="parameterTypes" type="java.lang.Class...">
+</parameter>
+<exception name="NoSuchMethodException" type="java.lang.NoSuchMethodException">
+</exception>
+<exception name="SecurityException" type="java.lang.SecurityException">
+</exception>
+</method>
+<method name="getMethods"
+ return="java.lang.reflect.Method[]"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="SecurityException" type="java.lang.SecurityException">
+</exception>
+</method>
+<method name="getModifiers"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getName"
+ return="java.lang.String"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getPackage"
+ return="java.lang.Package"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getProtectionDomain"
+ return="java.security.ProtectionDomain"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getResource"
+ return="java.net.URL"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="resName" type="java.lang.String">
+</parameter>
+</method>
+<method name="getResourceAsStream"
+ return="java.io.InputStream"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="resName" type="java.lang.String">
+</parameter>
+</method>
+<method name="getSigners"
+ return="java.lang.Object[]"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getSimpleName"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getSuperclass"
+ return="java.lang.Class&lt;? super T&gt;"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getTypeParameters"
+ return="java.lang.reflect.TypeVariable&lt;java.lang.Class&lt;T&gt;&gt;[]"
+ abstract="false"
+ native="false"
+ synchronized="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isAnnotation"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isAnnotationPresent"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="annotationClass" type="java.lang.Class&lt;? extends java.lang.annotation.Annotation&gt;">
+</parameter>
+</method>
+<method name="isAnonymousClass"
+ return="boolean"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isArray"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isAssignableFrom"
+ return="boolean"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="cls" type="java.lang.Class&lt;?&gt;">
+</parameter>
+</method>
+<method name="isEnum"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isInstance"
+ return="boolean"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="object" type="java.lang.Object">
+</parameter>
+</method>
+<method name="isInterface"
+ return="boolean"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isLocalClass"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isMemberClass"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isPrimitive"
+ return="boolean"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isSynthetic"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="newInstance"
+ return="T"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="IllegalAccessException" type="java.lang.IllegalAccessException">
+</exception>
+<exception name="InstantiationException" type="java.lang.InstantiationException">
+</exception>
+</method>
+</class>
+<class name="ClassCastException"
+ extends="java.lang.RuntimeException"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="ClassCastException"
+ type="java.lang.ClassCastException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<constructor name="ClassCastException"
+ type="java.lang.ClassCastException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="detailMessage" type="java.lang.String">
+</parameter>
+</constructor>
+</class>
+<class name="ClassCircularityError"
+ extends="java.lang.LinkageError"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="ClassCircularityError"
+ type="java.lang.ClassCircularityError"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<constructor name="ClassCircularityError"
+ type="java.lang.ClassCircularityError"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="detailMessage" type="java.lang.String">
+</parameter>
+</constructor>
+</class>
+<class name="ClassFormatError"
+ extends="java.lang.LinkageError"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="ClassFormatError"
+ type="java.lang.ClassFormatError"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<constructor name="ClassFormatError"
+ type="java.lang.ClassFormatError"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="detailMessage" type="java.lang.String">
+</parameter>
+</constructor>
+</class>
+<class name="ClassLoader"
+ extends="java.lang.Object"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="ClassLoader"
+ type="java.lang.ClassLoader"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</constructor>
+<constructor name="ClassLoader"
+ type="java.lang.ClassLoader"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="parentLoader" type="java.lang.ClassLoader">
+</parameter>
+</constructor>
+<method name="clearAssertionStatus"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="defineClass"
+ return="java.lang.Class&lt;?&gt;"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="deprecated"
+ visibility="protected"
+>
+<parameter name="classRep" type="byte[]">
+</parameter>
+<parameter name="offset" type="int">
+</parameter>
+<parameter name="length" type="int">
+</parameter>
+<exception name="ClassFormatError" type="java.lang.ClassFormatError">
+</exception>
+</method>
+<method name="defineClass"
+ return="java.lang.Class&lt;?&gt;"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="className" type="java.lang.String">
+</parameter>
+<parameter name="classRep" type="byte[]">
+</parameter>
+<parameter name="offset" type="int">
+</parameter>
+<parameter name="length" type="int">
+</parameter>
+<exception name="ClassFormatError" type="java.lang.ClassFormatError">
+</exception>
+</method>
+<method name="defineClass"
+ return="java.lang.Class&lt;?&gt;"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="className" type="java.lang.String">
+</parameter>
+<parameter name="classRep" type="byte[]">
+</parameter>
+<parameter name="offset" type="int">
+</parameter>
+<parameter name="length" type="int">
+</parameter>
+<parameter name="protectionDomain" type="java.security.ProtectionDomain">
+</parameter>
+<exception name="ClassFormatError" type="java.lang.ClassFormatError">
+</exception>
+</method>
+<method name="defineClass"
+ return="java.lang.Class&lt;?&gt;"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+<parameter name="b" type="java.nio.ByteBuffer">
+</parameter>
+<parameter name="protectionDomain" type="java.security.ProtectionDomain">
+</parameter>
+<exception name="ClassFormatError" type="java.lang.ClassFormatError">
+</exception>
+</method>
+<method name="definePackage"
+ return="java.lang.Package"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+<parameter name="specTitle" type="java.lang.String">
+</parameter>
+<parameter name="specVersion" type="java.lang.String">
+</parameter>
+<parameter name="specVendor" type="java.lang.String">
+</parameter>
+<parameter name="implTitle" type="java.lang.String">
+</parameter>
+<parameter name="implVersion" type="java.lang.String">
+</parameter>
+<parameter name="implVendor" type="java.lang.String">
+</parameter>
+<parameter name="sealBase" type="java.net.URL">
+</parameter>
+<exception name="IllegalArgumentException" type="java.lang.IllegalArgumentException">
+</exception>
+</method>
+<method name="findClass"
+ return="java.lang.Class&lt;?&gt;"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="className" type="java.lang.String">
+</parameter>
+<exception name="ClassNotFoundException" type="java.lang.ClassNotFoundException">
+</exception>
+</method>
+<method name="findLibrary"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="libName" type="java.lang.String">
+</parameter>
+</method>
+<method name="findLoadedClass"
+ return="java.lang.Class&lt;?&gt;"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="className" type="java.lang.String">
+</parameter>
+</method>
+<method name="findResource"
+ return="java.net.URL"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="resName" type="java.lang.String">
+</parameter>
+</method>
+<method name="findResources"
+ return="java.util.Enumeration&lt;java.net.URL&gt;"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="resName" type="java.lang.String">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="findSystemClass"
+ return="java.lang.Class&lt;?&gt;"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="className" type="java.lang.String">
+</parameter>
+<exception name="ClassNotFoundException" type="java.lang.ClassNotFoundException">
+</exception>
+</method>
+<method name="getPackage"
+ return="java.lang.Package"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+</method>
+<method name="getPackages"
+ return="java.lang.Package[]"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</method>
+<method name="getParent"
+ return="java.lang.ClassLoader"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getResource"
+ return="java.net.URL"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="resName" type="java.lang.String">
+</parameter>
+</method>
+<method name="getResourceAsStream"
+ return="java.io.InputStream"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="resName" type="java.lang.String">
+</parameter>
+</method>
+<method name="getResources"
+ return="java.util.Enumeration&lt;java.net.URL&gt;"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="resName" type="java.lang.String">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="getSystemClassLoader"
+ return="java.lang.ClassLoader"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getSystemResource"
+ return="java.net.URL"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="resName" type="java.lang.String">
+</parameter>
+</method>
+<method name="getSystemResourceAsStream"
+ return="java.io.InputStream"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="resName" type="java.lang.String">
+</parameter>
+</method>
+<method name="getSystemResources"
+ return="java.util.Enumeration&lt;java.net.URL&gt;"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="resName" type="java.lang.String">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="loadClass"
+ return="java.lang.Class&lt;?&gt;"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="className" type="java.lang.String">
+</parameter>
+<exception name="ClassNotFoundException" type="java.lang.ClassNotFoundException">
+</exception>
+</method>
+<method name="loadClass"
+ return="java.lang.Class&lt;?&gt;"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="className" type="java.lang.String">
+</parameter>
+<parameter name="resolve" type="boolean">
+</parameter>
+<exception name="ClassNotFoundException" type="java.lang.ClassNotFoundException">
+</exception>
+</method>
+<method name="resolveClass"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="clazz" type="java.lang.Class&lt;?&gt;">
+</parameter>
+</method>
+<method name="setClassAssertionStatus"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="cname" type="java.lang.String">
+</parameter>
+<parameter name="enable" type="boolean">
+</parameter>
+</method>
+<method name="setDefaultAssertionStatus"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="enable" type="boolean">
+</parameter>
+</method>
+<method name="setPackageAssertionStatus"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="pname" type="java.lang.String">
+</parameter>
+<parameter name="enable" type="boolean">
+</parameter>
+</method>
+<method name="setSigners"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="c" type="java.lang.Class&lt;?&gt;">
+</parameter>
+<parameter name="signers" type="java.lang.Object[]">
+</parameter>
+</method>
+</class>
+<class name="ClassNotFoundException"
+ extends="java.lang.Exception"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="ClassNotFoundException"
+ type="java.lang.ClassNotFoundException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<constructor name="ClassNotFoundException"
+ type="java.lang.ClassNotFoundException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="detailMessage" type="java.lang.String">
+</parameter>
+</constructor>
+<constructor name="ClassNotFoundException"
+ type="java.lang.ClassNotFoundException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="detailMessage" type="java.lang.String">
+</parameter>
+<parameter name="exception" type="java.lang.Throwable">
+</parameter>
+</constructor>
+<method name="getException"
+ return="java.lang.Throwable"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+</class>
+<class name="CloneNotSupportedException"
+ extends="java.lang.Exception"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="CloneNotSupportedException"
+ type="java.lang.CloneNotSupportedException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<constructor name="CloneNotSupportedException"
+ type="java.lang.CloneNotSupportedException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="detailMessage" type="java.lang.String">
+</parameter>
+</constructor>
+</class>
+<interface name="Cloneable"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</interface>
+<interface name="Comparable"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="compareTo"
+ return="int"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="another" type="T">
+</parameter>
+</method>
+</interface>
+<class name="Compiler"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="command"
+ return="java.lang.Object"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="cmd" type="java.lang.Object">
+</parameter>
+</method>
+<method name="compileClass"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="classToCompile" type="java.lang.Class&lt;?&gt;">
+</parameter>
+</method>
+<method name="compileClasses"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="nameRoot" type="java.lang.String">
+</parameter>
+</method>
+<method name="disable"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="enable"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+</class>
+<class name="Deprecated"
+ extends="java.lang.Object"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="java.lang.annotation.Annotation">
+</implements>
+</class>
+<class name="Double"
+ extends="java.lang.Number"
+ abstract="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="java.lang.Comparable">
+</implements>
+<constructor name="Double"
+ type="java.lang.Double"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="value" type="double">
+</parameter>
+</constructor>
+<constructor name="Double"
+ type="java.lang.Double"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="string" type="java.lang.String">
+</parameter>
+<exception name="NumberFormatException" type="java.lang.NumberFormatException">
+</exception>
+</constructor>
+<method name="compare"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="double1" type="double">
+</parameter>
+<parameter name="double2" type="double">
+</parameter>
+</method>
+<method name="compareTo"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="object" type="java.lang.Double">
+</parameter>
+</method>
+<method name="doubleToLongBits"
+ return="long"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="value" type="double">
+</parameter>
+</method>
+<method name="doubleToRawLongBits"
+ return="long"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="value" type="double">
+</parameter>
+</method>
+<method name="doubleValue"
+ return="double"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="floatValue"
+ return="float"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="intValue"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isInfinite"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isInfinite"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="d" type="double">
+</parameter>
+</method>
+<method name="isNaN"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isNaN"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="d" type="double">
+</parameter>
+</method>
+<method name="longBitsToDouble"
+ return="double"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="bits" type="long">
+</parameter>
+</method>
+<method name="longValue"
+ return="long"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="parseDouble"
+ return="double"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="string" type="java.lang.String">
+</parameter>
+<exception name="NumberFormatException" type="java.lang.NumberFormatException">
+</exception>
+</method>
+<method name="toHexString"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="d" type="double">
+</parameter>
+</method>
+<method name="toString"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="d" type="double">
+</parameter>
+</method>
+<method name="valueOf"
+ return="java.lang.Double"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="string" type="java.lang.String">
+</parameter>
+<exception name="NumberFormatException" type="java.lang.NumberFormatException">
+</exception>
+</method>
+<method name="valueOf"
+ return="java.lang.Double"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="d" type="double">
+</parameter>
+</method>
+<field name="MAX_VALUE"
+ type="double"
+ transient="false"
+ volatile="false"
+ value="1.7976931348623157E308"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="MIN_VALUE"
+ type="double"
+ transient="false"
+ volatile="false"
+ value="4.9E-324"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="NEGATIVE_INFINITY"
+ type="double"
+ transient="false"
+ volatile="false"
+ value="(-1.0 / 0.0)"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="NaN"
+ type="double"
+ transient="false"
+ volatile="false"
+ value="(0.0 / 0.0)"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="POSITIVE_INFINITY"
+ type="double"
+ transient="false"
+ volatile="false"
+ value="(1.0 / 0.0)"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="SIZE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="64"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TYPE"
+ type="java.lang.Class"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<class name="Enum"
+ extends="java.lang.Object"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="java.lang.Comparable">
+</implements>
+<implements name="java.io.Serializable">
+</implements>
+<constructor name="Enum"
+ type="java.lang.Enum"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+<parameter name="ordinal" type="int">
+</parameter>
+</constructor>
+<method name="clone"
+ return="java.lang.Object"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<exception name="CloneNotSupportedException" type="java.lang.CloneNotSupportedException">
+</exception>
+</method>
+<method name="compareTo"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="o" type="E">
+</parameter>
+</method>
+<method name="equals"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="other" type="java.lang.Object">
+</parameter>
+</method>
+<method name="getDeclaringClass"
+ return="java.lang.Class&lt;E&gt;"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="hashCode"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="name"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="ordinal"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="valueOf"
+ return="T"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="enumType" type="java.lang.Class&lt;T&gt;">
+</parameter>
+<parameter name="name" type="java.lang.String">
+</parameter>
+</method>
+</class>
+<class name="EnumConstantNotPresentException"
+ extends="java.lang.RuntimeException"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="EnumConstantNotPresentException"
+ type="java.lang.EnumConstantNotPresentException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="enumType" type="java.lang.Class&lt;? extends java.lang.Enum&gt;">
+</parameter>
+<parameter name="constantName" type="java.lang.String">
+</parameter>
+</constructor>
+<method name="constantName"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="enumType"
+ return="java.lang.Class&lt;? extends java.lang.Enum&gt;"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+</class>
+<class name="Error"
+ extends="java.lang.Throwable"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="Error"
+ type="java.lang.Error"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<constructor name="Error"
+ type="java.lang.Error"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="detailMessage" type="java.lang.String">
+</parameter>
+</constructor>
+<constructor name="Error"
+ type="java.lang.Error"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="detailMessage" type="java.lang.String">
+</parameter>
+<parameter name="throwable" type="java.lang.Throwable">
+</parameter>
+</constructor>
+<constructor name="Error"
+ type="java.lang.Error"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="throwable" type="java.lang.Throwable">
+</parameter>
+</constructor>
+</class>
+<class name="Exception"
+ extends="java.lang.Throwable"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="Exception"
+ type="java.lang.Exception"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<constructor name="Exception"
+ type="java.lang.Exception"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="detailMessage" type="java.lang.String">
+</parameter>
+</constructor>
+<constructor name="Exception"
+ type="java.lang.Exception"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="detailMessage" type="java.lang.String">
+</parameter>
+<parameter name="throwable" type="java.lang.Throwable">
+</parameter>
+</constructor>
+<constructor name="Exception"
+ type="java.lang.Exception"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="throwable" type="java.lang.Throwable">
+</parameter>
+</constructor>
+</class>
+<class name="ExceptionInInitializerError"
+ extends="java.lang.LinkageError"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="ExceptionInInitializerError"
+ type="java.lang.ExceptionInInitializerError"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<constructor name="ExceptionInInitializerError"
+ type="java.lang.ExceptionInInitializerError"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="detailMessage" type="java.lang.String">
+</parameter>
+</constructor>
+<constructor name="ExceptionInInitializerError"
+ type="java.lang.ExceptionInInitializerError"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="exception" type="java.lang.Throwable">
+</parameter>
+</constructor>
+<method name="getException"
+ return="java.lang.Throwable"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+</class>
+<class name="Float"
+ extends="java.lang.Number"
+ abstract="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="java.lang.Comparable">
+</implements>
+<constructor name="Float"
+ type="java.lang.Float"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="value" type="float">
+</parameter>
+</constructor>
+<constructor name="Float"
+ type="java.lang.Float"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="value" type="double">
+</parameter>
+</constructor>
+<constructor name="Float"
+ type="java.lang.Float"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="string" type="java.lang.String">
+</parameter>
+<exception name="NumberFormatException" type="java.lang.NumberFormatException">
+</exception>
+</constructor>
+<method name="compare"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="float1" type="float">
+</parameter>
+<parameter name="float2" type="float">
+</parameter>
+</method>
+<method name="compareTo"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="object" type="java.lang.Float">
+</parameter>
+</method>
+<method name="doubleValue"
+ return="double"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="floatToIntBits"
+ return="int"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="value" type="float">
+</parameter>
+</method>
+<method name="floatToRawIntBits"
+ return="int"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="value" type="float">
+</parameter>
+</method>
+<method name="floatValue"
+ return="float"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="intBitsToFloat"
+ return="float"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="bits" type="int">
+</parameter>
+</method>
+<method name="intValue"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isInfinite"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isInfinite"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="f" type="float">
+</parameter>
+</method>
+<method name="isNaN"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isNaN"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="f" type="float">
+</parameter>
+</method>
+<method name="longValue"
+ return="long"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="parseFloat"
+ return="float"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="string" type="java.lang.String">
+</parameter>
+<exception name="NumberFormatException" type="java.lang.NumberFormatException">
+</exception>
+</method>
+<method name="toHexString"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="f" type="float">
+</parameter>
+</method>
+<method name="toString"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="f" type="float">
+</parameter>
+</method>
+<method name="valueOf"
+ return="java.lang.Float"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="string" type="java.lang.String">
+</parameter>
+<exception name="NumberFormatException" type="java.lang.NumberFormatException">
+</exception>
+</method>
+<method name="valueOf"
+ return="java.lang.Float"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="f" type="float">
+</parameter>
+</method>
+<field name="MAX_VALUE"
+ type="float"
+ transient="false"
+ volatile="false"
+ value="3.4028235E38f"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="MIN_VALUE"
+ type="float"
+ transient="false"
+ volatile="false"
+ value="1.4E-45f"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="NEGATIVE_INFINITY"
+ type="float"
+ transient="false"
+ volatile="false"
+ value="(-1.0f / 0.0f)"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="NaN"
+ type="float"
+ transient="false"
+ volatile="false"
+ value="(0.0f / 0.0f)"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="POSITIVE_INFINITY"
+ type="float"
+ transient="false"
+ volatile="false"
+ value="(1.0f / 0.0f)"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="SIZE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="32"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TYPE"
+ type="java.lang.Class"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<class name="IllegalAccessError"
+ extends="java.lang.IncompatibleClassChangeError"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="IllegalAccessError"
+ type="java.lang.IllegalAccessError"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<constructor name="IllegalAccessError"
+ type="java.lang.IllegalAccessError"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="detailMessage" type="java.lang.String">
+</parameter>
+</constructor>
+</class>
+<class name="IllegalAccessException"
+ extends="java.lang.Exception"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="IllegalAccessException"
+ type="java.lang.IllegalAccessException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<constructor name="IllegalAccessException"
+ type="java.lang.IllegalAccessException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="detailMessage" type="java.lang.String">
+</parameter>
+</constructor>
+</class>
+<class name="IllegalArgumentException"
+ extends="java.lang.RuntimeException"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="IllegalArgumentException"
+ type="java.lang.IllegalArgumentException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<constructor name="IllegalArgumentException"
+ type="java.lang.IllegalArgumentException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="detailMessage" type="java.lang.String">
+</parameter>
+</constructor>
+<constructor name="IllegalArgumentException"
+ type="java.lang.IllegalArgumentException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="message" type="java.lang.String">
+</parameter>
+<parameter name="cause" type="java.lang.Throwable">
+</parameter>
+</constructor>
+<constructor name="IllegalArgumentException"
+ type="java.lang.IllegalArgumentException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="cause" type="java.lang.Throwable">
+</parameter>
+</constructor>
+</class>
+<class name="IllegalMonitorStateException"
+ extends="java.lang.RuntimeException"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="IllegalMonitorStateException"
+ type="java.lang.IllegalMonitorStateException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<constructor name="IllegalMonitorStateException"
+ type="java.lang.IllegalMonitorStateException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="detailMessage" type="java.lang.String">
+</parameter>
+</constructor>
+</class>
+<class name="IllegalStateException"
+ extends="java.lang.RuntimeException"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="IllegalStateException"
+ type="java.lang.IllegalStateException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<constructor name="IllegalStateException"
+ type="java.lang.IllegalStateException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="detailMessage" type="java.lang.String">
+</parameter>
+</constructor>
+<constructor name="IllegalStateException"
+ type="java.lang.IllegalStateException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="message" type="java.lang.String">
+</parameter>
+<parameter name="cause" type="java.lang.Throwable">
+</parameter>
+</constructor>
+<constructor name="IllegalStateException"
+ type="java.lang.IllegalStateException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="cause" type="java.lang.Throwable">
+</parameter>
+</constructor>
+</class>
+<class name="IllegalThreadStateException"
+ extends="java.lang.IllegalArgumentException"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="IllegalThreadStateException"
+ type="java.lang.IllegalThreadStateException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<constructor name="IllegalThreadStateException"
+ type="java.lang.IllegalThreadStateException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="detailMessage" type="java.lang.String">
+</parameter>
+</constructor>
+</class>
+<class name="IncompatibleClassChangeError"
+ extends="java.lang.LinkageError"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="IncompatibleClassChangeError"
+ type="java.lang.IncompatibleClassChangeError"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<constructor name="IncompatibleClassChangeError"
+ type="java.lang.IncompatibleClassChangeError"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="detailMessage" type="java.lang.String">
+</parameter>
+</constructor>
+</class>
+<class name="IndexOutOfBoundsException"
+ extends="java.lang.RuntimeException"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="IndexOutOfBoundsException"
+ type="java.lang.IndexOutOfBoundsException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<constructor name="IndexOutOfBoundsException"
+ type="java.lang.IndexOutOfBoundsException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="detailMessage" type="java.lang.String">
+</parameter>
+</constructor>
+</class>
+<class name="InheritableThreadLocal"
+ extends="java.lang.ThreadLocal"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="InheritableThreadLocal"
+ type="java.lang.InheritableThreadLocal"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<method name="childValue"
+ return="T"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="parentValue" type="T">
+</parameter>
+</method>
+</class>
+<class name="InstantiationError"
+ extends="java.lang.IncompatibleClassChangeError"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="InstantiationError"
+ type="java.lang.InstantiationError"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<constructor name="InstantiationError"
+ type="java.lang.InstantiationError"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="detailMessage" type="java.lang.String">
+</parameter>
+</constructor>
+</class>
+<class name="InstantiationException"
+ extends="java.lang.Exception"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="InstantiationException"
+ type="java.lang.InstantiationException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<constructor name="InstantiationException"
+ type="java.lang.InstantiationException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="detailMessage" type="java.lang.String">
+</parameter>
+</constructor>
+</class>
+<class name="Integer"
+ extends="java.lang.Number"
+ abstract="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="java.lang.Comparable">
+</implements>
+<constructor name="Integer"
+ type="java.lang.Integer"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="value" type="int">
+</parameter>
+</constructor>
+<constructor name="Integer"
+ type="java.lang.Integer"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="string" type="java.lang.String">
+</parameter>
+<exception name="NumberFormatException" type="java.lang.NumberFormatException">
+</exception>
+</constructor>
+<method name="bitCount"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="i" type="int">
+</parameter>
+</method>
+<method name="compareTo"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="object" type="java.lang.Integer">
+</parameter>
+</method>
+<method name="decode"
+ return="java.lang.Integer"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="string" type="java.lang.String">
+</parameter>
+<exception name="NumberFormatException" type="java.lang.NumberFormatException">
+</exception>
+</method>
+<method name="doubleValue"
+ return="double"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="floatValue"
+ return="float"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getInteger"
+ return="java.lang.Integer"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="string" type="java.lang.String">
+</parameter>
+</method>
+<method name="getInteger"
+ return="java.lang.Integer"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="string" type="java.lang.String">
+</parameter>
+<parameter name="defaultValue" type="int">
+</parameter>
+</method>
+<method name="getInteger"
+ return="java.lang.Integer"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="string" type="java.lang.String">
+</parameter>
+<parameter name="defaultValue" type="java.lang.Integer">
+</parameter>
+</method>
+<method name="highestOneBit"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="i" type="int">
+</parameter>
+</method>
+<method name="intValue"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="longValue"
+ return="long"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="lowestOneBit"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="i" type="int">
+</parameter>
+</method>
+<method name="numberOfLeadingZeros"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="i" type="int">
+</parameter>
+</method>
+<method name="numberOfTrailingZeros"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="i" type="int">
+</parameter>
+</method>
+<method name="parseInt"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="string" type="java.lang.String">
+</parameter>
+<exception name="NumberFormatException" type="java.lang.NumberFormatException">
+</exception>
+</method>
+<method name="parseInt"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="string" type="java.lang.String">
+</parameter>
+<parameter name="radix" type="int">
+</parameter>
+<exception name="NumberFormatException" type="java.lang.NumberFormatException">
+</exception>
+</method>
+<method name="reverse"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="i" type="int">
+</parameter>
+</method>
+<method name="reverseBytes"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="i" type="int">
+</parameter>
+</method>
+<method name="rotateLeft"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="i" type="int">
+</parameter>
+<parameter name="distance" type="int">
+</parameter>
+</method>
+<method name="rotateRight"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="i" type="int">
+</parameter>
+<parameter name="distance" type="int">
+</parameter>
+</method>
+<method name="signum"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="i" type="int">
+</parameter>
+</method>
+<method name="toBinaryString"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="i" type="int">
+</parameter>
+</method>
+<method name="toHexString"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="i" type="int">
+</parameter>
+</method>
+<method name="toOctalString"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="i" type="int">
+</parameter>
+</method>
+<method name="toString"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="i" type="int">
+</parameter>
+</method>
+<method name="toString"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="i" type="int">
+</parameter>
+<parameter name="radix" type="int">
+</parameter>
+</method>
+<method name="valueOf"
+ return="java.lang.Integer"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="string" type="java.lang.String">
+</parameter>
+<exception name="NumberFormatException" type="java.lang.NumberFormatException">
+</exception>
+</method>
+<method name="valueOf"
+ return="java.lang.Integer"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="string" type="java.lang.String">
+</parameter>
+<parameter name="radix" type="int">
+</parameter>
+<exception name="NumberFormatException" type="java.lang.NumberFormatException">
+</exception>
+</method>
+<method name="valueOf"
+ return="java.lang.Integer"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="i" type="int">
+</parameter>
+</method>
+<field name="MAX_VALUE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2147483647"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="MIN_VALUE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="-2147483648"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="SIZE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="32"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TYPE"
+ type="java.lang.Class"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<class name="InternalError"
+ extends="java.lang.VirtualMachineError"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="InternalError"
+ type="java.lang.InternalError"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<constructor name="InternalError"
+ type="java.lang.InternalError"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="detailMessage" type="java.lang.String">
+</parameter>
+</constructor>
+</class>
+<class name="InterruptedException"
+ extends="java.lang.Exception"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="InterruptedException"
+ type="java.lang.InterruptedException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<constructor name="InterruptedException"
+ type="java.lang.InterruptedException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="detailMessage" type="java.lang.String">
+</parameter>
+</constructor>
+</class>
+<interface name="Iterable"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="iterator"
+ return="java.util.Iterator&lt;T&gt;"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+</interface>
+<class name="LinkageError"
+ extends="java.lang.Error"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="LinkageError"
+ type="java.lang.LinkageError"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<constructor name="LinkageError"
+ type="java.lang.LinkageError"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="detailMessage" type="java.lang.String">
+</parameter>
+</constructor>
+</class>
+<class name="Long"
+ extends="java.lang.Number"
+ abstract="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="java.lang.Comparable">
+</implements>
+<constructor name="Long"
+ type="java.lang.Long"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="value" type="long">
+</parameter>
+</constructor>
+<constructor name="Long"
+ type="java.lang.Long"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="string" type="java.lang.String">
+</parameter>
+<exception name="NumberFormatException" type="java.lang.NumberFormatException">
+</exception>
+</constructor>
+<method name="bitCount"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="v" type="long">
+</parameter>
+</method>
+<method name="compareTo"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="object" type="java.lang.Long">
+</parameter>
+</method>
+<method name="decode"
+ return="java.lang.Long"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="string" type="java.lang.String">
+</parameter>
+<exception name="NumberFormatException" type="java.lang.NumberFormatException">
+</exception>
+</method>
+<method name="doubleValue"
+ return="double"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="floatValue"
+ return="float"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getLong"
+ return="java.lang.Long"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="string" type="java.lang.String">
+</parameter>
+</method>
+<method name="getLong"
+ return="java.lang.Long"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="string" type="java.lang.String">
+</parameter>
+<parameter name="defaultValue" type="long">
+</parameter>
+</method>
+<method name="getLong"
+ return="java.lang.Long"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="string" type="java.lang.String">
+</parameter>
+<parameter name="defaultValue" type="java.lang.Long">
+</parameter>
+</method>
+<method name="highestOneBit"
+ return="long"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="v" type="long">
+</parameter>
+</method>
+<method name="intValue"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="longValue"
+ return="long"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="lowestOneBit"
+ return="long"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="v" type="long">
+</parameter>
+</method>
+<method name="numberOfLeadingZeros"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="v" type="long">
+</parameter>
+</method>
+<method name="numberOfTrailingZeros"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="v" type="long">
+</parameter>
+</method>
+<method name="parseLong"
+ return="long"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="string" type="java.lang.String">
+</parameter>
+<exception name="NumberFormatException" type="java.lang.NumberFormatException">
+</exception>
+</method>
+<method name="parseLong"
+ return="long"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="string" type="java.lang.String">
+</parameter>
+<parameter name="radix" type="int">
+</parameter>
+<exception name="NumberFormatException" type="java.lang.NumberFormatException">
+</exception>
+</method>
+<method name="reverse"
+ return="long"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="v" type="long">
+</parameter>
+</method>
+<method name="reverseBytes"
+ return="long"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="v" type="long">
+</parameter>
+</method>
+<method name="rotateLeft"
+ return="long"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="v" type="long">
+</parameter>
+<parameter name="distance" type="int">
+</parameter>
+</method>
+<method name="rotateRight"
+ return="long"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="v" type="long">
+</parameter>
+<parameter name="distance" type="int">
+</parameter>
+</method>
+<method name="signum"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="v" type="long">
+</parameter>
+</method>
+<method name="toBinaryString"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="v" type="long">
+</parameter>
+</method>
+<method name="toHexString"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="v" type="long">
+</parameter>
+</method>
+<method name="toOctalString"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="v" type="long">
+</parameter>
+</method>
+<method name="toString"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="n" type="long">
+</parameter>
+</method>
+<method name="toString"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="v" type="long">
+</parameter>
+<parameter name="radix" type="int">
+</parameter>
+</method>
+<method name="valueOf"
+ return="java.lang.Long"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="string" type="java.lang.String">
+</parameter>
+<exception name="NumberFormatException" type="java.lang.NumberFormatException">
+</exception>
+</method>
+<method name="valueOf"
+ return="java.lang.Long"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="string" type="java.lang.String">
+</parameter>
+<parameter name="radix" type="int">
+</parameter>
+<exception name="NumberFormatException" type="java.lang.NumberFormatException">
+</exception>
+</method>
+<method name="valueOf"
+ return="java.lang.Long"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="v" type="long">
+</parameter>
+</method>
+<field name="MAX_VALUE"
+ type="long"
+ transient="false"
+ volatile="false"
+ value="9223372036854775807L"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="MIN_VALUE"
+ type="long"
+ transient="false"
+ volatile="false"
+ value="-9223372036854775808L"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="SIZE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="64"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TYPE"
+ type="java.lang.Class"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<class name="Math"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="IEEEremainder"
+ return="double"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="x" type="double">
+</parameter>
+<parameter name="y" type="double">
+</parameter>
+</method>
+<method name="abs"
+ return="double"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="d" type="double">
+</parameter>
+</method>
+<method name="abs"
+ return="float"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="f" type="float">
+</parameter>
+</method>
+<method name="abs"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="i" type="int">
+</parameter>
+</method>
+<method name="abs"
+ return="long"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="l" type="long">
+</parameter>
+</method>
+<method name="acos"
+ return="double"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="d" type="double">
+</parameter>
+</method>
+<method name="asin"
+ return="double"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="d" type="double">
+</parameter>
+</method>
+<method name="atan"
+ return="double"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="d" type="double">
+</parameter>
+</method>
+<method name="atan2"
+ return="double"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="x" type="double">
+</parameter>
+<parameter name="y" type="double">
+</parameter>
+</method>
+<method name="cbrt"
+ return="double"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="d" type="double">
+</parameter>
+</method>
+<method name="ceil"
+ return="double"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="d" type="double">
+</parameter>
+</method>
+<method name="cos"
+ return="double"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="d" type="double">
+</parameter>
+</method>
+<method name="cosh"
+ return="double"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="d" type="double">
+</parameter>
+</method>
+<method name="exp"
+ return="double"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="d" type="double">
+</parameter>
+</method>
+<method name="expm1"
+ return="double"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="d" type="double">
+</parameter>
+</method>
+<method name="floor"
+ return="double"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="d" type="double">
+</parameter>
+</method>
+<method name="hypot"
+ return="double"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="x" type="double">
+</parameter>
+<parameter name="y" type="double">
+</parameter>
+</method>
+<method name="log"
+ return="double"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="d" type="double">
+</parameter>
+</method>
+<method name="log10"
+ return="double"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="d" type="double">
+</parameter>
+</method>
+<method name="log1p"
+ return="double"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="d" type="double">
+</parameter>
+</method>
+<method name="max"
+ return="double"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="d1" type="double">
+</parameter>
+<parameter name="d2" type="double">
+</parameter>
+</method>
+<method name="max"
+ return="float"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="f1" type="float">
+</parameter>
+<parameter name="f2" type="float">
+</parameter>
+</method>
+<method name="max"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="i1" type="int">
+</parameter>
+<parameter name="i2" type="int">
+</parameter>
+</method>
+<method name="max"
+ return="long"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="l1" type="long">
+</parameter>
+<parameter name="l2" type="long">
+</parameter>
+</method>
+<method name="min"
+ return="double"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="d1" type="double">
+</parameter>
+<parameter name="d2" type="double">
+</parameter>
+</method>
+<method name="min"
+ return="float"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="f1" type="float">
+</parameter>
+<parameter name="f2" type="float">
+</parameter>
+</method>
+<method name="min"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="i1" type="int">
+</parameter>
+<parameter name="i2" type="int">
+</parameter>
+</method>
+<method name="min"
+ return="long"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="l1" type="long">
+</parameter>
+<parameter name="l2" type="long">
+</parameter>
+</method>
+<method name="pow"
+ return="double"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="x" type="double">
+</parameter>
+<parameter name="y" type="double">
+</parameter>
+</method>
+<method name="random"
+ return="double"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="rint"
+ return="double"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="d" type="double">
+</parameter>
+</method>
+<method name="round"
+ return="long"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="d" type="double">
+</parameter>
+</method>
+<method name="round"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="f" type="float">
+</parameter>
+</method>
+<method name="signum"
+ return="double"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="d" type="double">
+</parameter>
+</method>
+<method name="signum"
+ return="float"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="f" type="float">
+</parameter>
+</method>
+<method name="sin"
+ return="double"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="d" type="double">
+</parameter>
+</method>
+<method name="sinh"
+ return="double"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="d" type="double">
+</parameter>
+</method>
+<method name="sqrt"
+ return="double"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="d" type="double">
+</parameter>
+</method>
+<method name="tan"
+ return="double"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="d" type="double">
+</parameter>
+</method>
+<method name="tanh"
+ return="double"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="d" type="double">
+</parameter>
+</method>
+<method name="toDegrees"
+ return="double"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="angrad" type="double">
+</parameter>
+</method>
+<method name="toRadians"
+ return="double"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="angdeg" type="double">
+</parameter>
+</method>
+<method name="ulp"
+ return="double"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="d" type="double">
+</parameter>
+</method>
+<method name="ulp"
+ return="float"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="f" type="float">
+</parameter>
+</method>
+<field name="E"
+ type="double"
+ transient="false"
+ volatile="false"
+ value="2.718281828459045"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="PI"
+ type="double"
+ transient="false"
+ volatile="false"
+ value="3.141592653589793"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<class name="NegativeArraySizeException"
+ extends="java.lang.RuntimeException"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="NegativeArraySizeException"
+ type="java.lang.NegativeArraySizeException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<constructor name="NegativeArraySizeException"
+ type="java.lang.NegativeArraySizeException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="detailMessage" type="java.lang.String">
+</parameter>
+</constructor>
+</class>
+<class name="NoClassDefFoundError"
+ extends="java.lang.LinkageError"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="NoClassDefFoundError"
+ type="java.lang.NoClassDefFoundError"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<constructor name="NoClassDefFoundError"
+ type="java.lang.NoClassDefFoundError"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="detailMessage" type="java.lang.String">
+</parameter>
+</constructor>
+</class>
+<class name="NoSuchFieldError"
+ extends="java.lang.IncompatibleClassChangeError"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="NoSuchFieldError"
+ type="java.lang.NoSuchFieldError"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<constructor name="NoSuchFieldError"
+ type="java.lang.NoSuchFieldError"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="detailMessage" type="java.lang.String">
+</parameter>
+</constructor>
+</class>
+<class name="NoSuchFieldException"
+ extends="java.lang.Exception"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="NoSuchFieldException"
+ type="java.lang.NoSuchFieldException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<constructor name="NoSuchFieldException"
+ type="java.lang.NoSuchFieldException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="detailMessage" type="java.lang.String">
+</parameter>
+</constructor>
+</class>
+<class name="NoSuchMethodError"
+ extends="java.lang.IncompatibleClassChangeError"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="NoSuchMethodError"
+ type="java.lang.NoSuchMethodError"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<constructor name="NoSuchMethodError"
+ type="java.lang.NoSuchMethodError"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="detailMessage" type="java.lang.String">
+</parameter>
+</constructor>
+</class>
+<class name="NoSuchMethodException"
+ extends="java.lang.Exception"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="NoSuchMethodException"
+ type="java.lang.NoSuchMethodException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<constructor name="NoSuchMethodException"
+ type="java.lang.NoSuchMethodException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="detailMessage" type="java.lang.String">
+</parameter>
+</constructor>
+</class>
+<class name="NullPointerException"
+ extends="java.lang.RuntimeException"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="NullPointerException"
+ type="java.lang.NullPointerException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<constructor name="NullPointerException"
+ type="java.lang.NullPointerException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="detailMessage" type="java.lang.String">
+</parameter>
+</constructor>
+</class>
+<class name="Number"
+ extends="java.lang.Object"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="java.io.Serializable">
+</implements>
+<constructor name="Number"
+ type="java.lang.Number"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<method name="byteValue"
+ return="byte"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="doubleValue"
+ return="double"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="floatValue"
+ return="float"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="intValue"
+ return="int"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="longValue"
+ return="long"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="shortValue"
+ return="short"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+</class>
+<class name="NumberFormatException"
+ extends="java.lang.IllegalArgumentException"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="NumberFormatException"
+ type="java.lang.NumberFormatException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<constructor name="NumberFormatException"
+ type="java.lang.NumberFormatException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="detailMessage" type="java.lang.String">
+</parameter>
+</constructor>
+</class>
+<class name="Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="Object"
+ type="java.lang.Object"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<method name="clone"
+ return="java.lang.Object"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<exception name="CloneNotSupportedException" type="java.lang.CloneNotSupportedException">
+</exception>
+</method>
+<method name="equals"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="o" type="java.lang.Object">
+</parameter>
+</method>
+<method name="finalize"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<exception name="Throwable" type="java.lang.Throwable">
+</exception>
+</method>
+<method name="getClass"
+ return="java.lang.Class&lt;? extends java.lang.Object&gt;"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="hashCode"
+ return="int"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="notify"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="notifyAll"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="toString"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="wait"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="InterruptedException" type="java.lang.InterruptedException">
+</exception>
+</method>
+<method name="wait"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="millis" type="long">
+</parameter>
+<exception name="InterruptedException" type="java.lang.InterruptedException">
+</exception>
+</method>
+<method name="wait"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="millis" type="long">
+</parameter>
+<parameter name="nanos" type="int">
+</parameter>
+<exception name="InterruptedException" type="java.lang.InterruptedException">
+</exception>
+</method>
+</class>
+<class name="OutOfMemoryError"
+ extends="java.lang.VirtualMachineError"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="OutOfMemoryError"
+ type="java.lang.OutOfMemoryError"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<constructor name="OutOfMemoryError"
+ type="java.lang.OutOfMemoryError"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="detailMessage" type="java.lang.String">
+</parameter>
+</constructor>
+</class>
+<class name="Override"
+ extends="java.lang.Object"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="java.lang.annotation.Annotation">
+</implements>
+</class>
+<class name="Package"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="java.lang.reflect.AnnotatedElement">
+</implements>
+<method name="getAnnotation"
+ return="T"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="annotationType" type="java.lang.Class&lt;T&gt;">
+</parameter>
+</method>
+<method name="getAnnotations"
+ return="java.lang.annotation.Annotation[]"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getDeclaredAnnotations"
+ return="java.lang.annotation.Annotation[]"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getImplementationTitle"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getImplementationVendor"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getImplementationVersion"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getName"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getPackage"
+ return="java.lang.Package"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="packageName" type="java.lang.String">
+</parameter>
+</method>
+<method name="getPackages"
+ return="java.lang.Package[]"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getSpecificationTitle"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getSpecificationVendor"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getSpecificationVersion"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isAnnotationPresent"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="annotationType" type="java.lang.Class&lt;? extends java.lang.annotation.Annotation&gt;">
+</parameter>
+</method>
+<method name="isCompatibleWith"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="version" type="java.lang.String">
+</parameter>
+<exception name="NumberFormatException" type="java.lang.NumberFormatException">
+</exception>
+</method>
+<method name="isSealed"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isSealed"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="url" type="java.net.URL">
+</parameter>
+</method>
+</class>
+<class name="Process"
+ extends="java.lang.Object"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="Process"
+ type="java.lang.Process"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<method name="destroy"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="exitValue"
+ return="int"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getErrorStream"
+ return="java.io.InputStream"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getInputStream"
+ return="java.io.InputStream"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getOutputStream"
+ return="java.io.OutputStream"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="waitFor"
+ return="int"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="InterruptedException" type="java.lang.InterruptedException">
+</exception>
+</method>
+</class>
+<class name="ProcessBuilder"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="ProcessBuilder"
+ type="java.lang.ProcessBuilder"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="command" type="java.lang.String...">
+</parameter>
+</constructor>
+<constructor name="ProcessBuilder"
+ type="java.lang.ProcessBuilder"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="command" type="java.util.List&lt;java.lang.String&gt;">
+</parameter>
+</constructor>
+<method name="command"
+ return="java.util.List&lt;java.lang.String&gt;"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="command"
+ return="java.lang.ProcessBuilder"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="command" type="java.lang.String...">
+</parameter>
+</method>
+<method name="command"
+ return="java.lang.ProcessBuilder"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="command" type="java.util.List&lt;java.lang.String&gt;">
+</parameter>
+</method>
+<method name="directory"
+ return="java.io.File"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="directory"
+ return="java.lang.ProcessBuilder"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="directory" type="java.io.File">
+</parameter>
+</method>
+<method name="environment"
+ return="java.util.Map&lt;java.lang.String, java.lang.String&gt;"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="redirectErrorStream"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="redirectErrorStream"
+ return="java.lang.ProcessBuilder"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="redirectErrorStream" type="boolean">
+</parameter>
+</method>
+<method name="start"
+ return="java.lang.Process"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+</class>
+<interface name="Readable"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="read"
+ return="int"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="cb" type="java.nio.CharBuffer">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+</interface>
+<interface name="Runnable"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="run"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+</interface>
+<class name="Runtime"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="addShutdownHook"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="hook" type="java.lang.Thread">
+</parameter>
+</method>
+<method name="availableProcessors"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="exec"
+ return="java.lang.Process"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="progArray" type="java.lang.String[]">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="exec"
+ return="java.lang.Process"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="progArray" type="java.lang.String[]">
+</parameter>
+<parameter name="envp" type="java.lang.String[]">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="exec"
+ return="java.lang.Process"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="progArray" type="java.lang.String[]">
+</parameter>
+<parameter name="envp" type="java.lang.String[]">
+</parameter>
+<parameter name="directory" type="java.io.File">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="exec"
+ return="java.lang.Process"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="prog" type="java.lang.String">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="exec"
+ return="java.lang.Process"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="prog" type="java.lang.String">
+</parameter>
+<parameter name="envp" type="java.lang.String[]">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="exec"
+ return="java.lang.Process"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="prog" type="java.lang.String">
+</parameter>
+<parameter name="envp" type="java.lang.String[]">
+</parameter>
+<parameter name="directory" type="java.io.File">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="exit"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="code" type="int">
+</parameter>
+</method>
+<method name="freeMemory"
+ return="long"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="gc"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getLocalizedInputStream"
+ return="java.io.InputStream"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="deprecated"
+ visibility="public"
+>
+<parameter name="stream" type="java.io.InputStream">
+</parameter>
+</method>
+<method name="getLocalizedOutputStream"
+ return="java.io.OutputStream"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="deprecated"
+ visibility="public"
+>
+<parameter name="stream" type="java.io.OutputStream">
+</parameter>
+</method>
+<method name="getRuntime"
+ return="java.lang.Runtime"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="halt"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="code" type="int">
+</parameter>
+</method>
+<method name="load"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="pathName" type="java.lang.String">
+</parameter>
+</method>
+<method name="loadLibrary"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="libName" type="java.lang.String">
+</parameter>
+</method>
+<method name="maxMemory"
+ return="long"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="removeShutdownHook"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="hook" type="java.lang.Thread">
+</parameter>
+</method>
+<method name="runFinalization"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="runFinalizersOnExit"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="deprecated"
+ visibility="public"
+>
+<parameter name="run" type="boolean">
+</parameter>
+</method>
+<method name="totalMemory"
+ return="long"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="traceInstructions"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="enable" type="boolean">
+</parameter>
+</method>
+<method name="traceMethodCalls"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="enable" type="boolean">
+</parameter>
+</method>
+</class>
+<class name="RuntimeException"
+ extends="java.lang.Exception"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="RuntimeException"
+ type="java.lang.RuntimeException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<constructor name="RuntimeException"
+ type="java.lang.RuntimeException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="detailMessage" type="java.lang.String">
+</parameter>
+</constructor>
+<constructor name="RuntimeException"
+ type="java.lang.RuntimeException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="detailMessage" type="java.lang.String">
+</parameter>
+<parameter name="throwable" type="java.lang.Throwable">
+</parameter>
+</constructor>
+<constructor name="RuntimeException"
+ type="java.lang.RuntimeException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="throwable" type="java.lang.Throwable">
+</parameter>
+</constructor>
+</class>
+<class name="RuntimePermission"
+ extends="java.security.BasicPermission"
+ abstract="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="RuntimePermission"
+ type="java.lang.RuntimePermission"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="permissionName" type="java.lang.String">
+</parameter>
+</constructor>
+<constructor name="RuntimePermission"
+ type="java.lang.RuntimePermission"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+<parameter name="actions" type="java.lang.String">
+</parameter>
+</constructor>
+</class>
+<class name="SecurityException"
+ extends="java.lang.RuntimeException"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="SecurityException"
+ type="java.lang.SecurityException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<constructor name="SecurityException"
+ type="java.lang.SecurityException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="detailMessage" type="java.lang.String">
+</parameter>
+</constructor>
+<constructor name="SecurityException"
+ type="java.lang.SecurityException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="message" type="java.lang.String">
+</parameter>
+<parameter name="cause" type="java.lang.Throwable">
+</parameter>
+</constructor>
+<constructor name="SecurityException"
+ type="java.lang.SecurityException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="cause" type="java.lang.Throwable">
+</parameter>
+</constructor>
+</class>
+<class name="SecurityManager"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="SecurityManager"
+ type="java.lang.SecurityManager"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<method name="checkAccept"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="host" type="java.lang.String">
+</parameter>
+<parameter name="port" type="int">
+</parameter>
+</method>
+<method name="checkAccess"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="thread" type="java.lang.Thread">
+</parameter>
+</method>
+<method name="checkAccess"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="group" type="java.lang.ThreadGroup">
+</parameter>
+</method>
+<method name="checkAwtEventQueueAccess"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="checkConnect"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="host" type="java.lang.String">
+</parameter>
+<parameter name="port" type="int">
+</parameter>
+</method>
+<method name="checkConnect"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="host" type="java.lang.String">
+</parameter>
+<parameter name="port" type="int">
+</parameter>
+<parameter name="context" type="java.lang.Object">
+</parameter>
+</method>
+<method name="checkCreateClassLoader"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="checkDelete"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="file" type="java.lang.String">
+</parameter>
+</method>
+<method name="checkExec"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="cmd" type="java.lang.String">
+</parameter>
+</method>
+<method name="checkExit"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="status" type="int">
+</parameter>
+</method>
+<method name="checkLink"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="libName" type="java.lang.String">
+</parameter>
+</method>
+<method name="checkListen"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="port" type="int">
+</parameter>
+</method>
+<method name="checkMemberAccess"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="cls" type="java.lang.Class&lt;?&gt;">
+</parameter>
+<parameter name="type" type="int">
+</parameter>
+</method>
+<method name="checkMulticast"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="maddr" type="java.net.InetAddress">
+</parameter>
+</method>
+<method name="checkMulticast"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="deprecated"
+ visibility="public"
+>
+<parameter name="maddr" type="java.net.InetAddress">
+</parameter>
+<parameter name="ttl" type="byte">
+</parameter>
+</method>
+<method name="checkPackageAccess"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="packageName" type="java.lang.String">
+</parameter>
+</method>
+<method name="checkPackageDefinition"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="packageName" type="java.lang.String">
+</parameter>
+</method>
+<method name="checkPermission"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="permission" type="java.security.Permission">
+</parameter>
+</method>
+<method name="checkPermission"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="permission" type="java.security.Permission">
+</parameter>
+<parameter name="context" type="java.lang.Object">
+</parameter>
+</method>
+<method name="checkPrintJobAccess"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="checkPropertiesAccess"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="checkPropertyAccess"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="key" type="java.lang.String">
+</parameter>
+</method>
+<method name="checkRead"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="fd" type="java.io.FileDescriptor">
+</parameter>
+</method>
+<method name="checkRead"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="file" type="java.lang.String">
+</parameter>
+</method>
+<method name="checkRead"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="file" type="java.lang.String">
+</parameter>
+<parameter name="context" type="java.lang.Object">
+</parameter>
+</method>
+<method name="checkSecurityAccess"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="target" type="java.lang.String">
+</parameter>
+</method>
+<method name="checkSetFactory"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="checkSystemClipboardAccess"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="checkTopLevelWindow"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="window" type="java.lang.Object">
+</parameter>
+</method>
+<method name="checkWrite"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="fd" type="java.io.FileDescriptor">
+</parameter>
+</method>
+<method name="checkWrite"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="file" type="java.lang.String">
+</parameter>
+</method>
+<method name="classDepth"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="deprecated"
+ visibility="protected"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+</method>
+<method name="classLoaderDepth"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="deprecated"
+ visibility="protected"
+>
+</method>
+<method name="currentClassLoader"
+ return="java.lang.ClassLoader"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="deprecated"
+ visibility="protected"
+>
+</method>
+<method name="currentLoadedClass"
+ return="java.lang.Class&lt;?&gt;"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="deprecated"
+ visibility="protected"
+>
+</method>
+<method name="getClassContext"
+ return="java.lang.Class[]"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</method>
+<method name="getInCheck"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="deprecated"
+ visibility="public"
+>
+</method>
+<method name="getSecurityContext"
+ return="java.lang.Object"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getThreadGroup"
+ return="java.lang.ThreadGroup"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="inClass"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="deprecated"
+ visibility="protected"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+</method>
+<method name="inClassLoader"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="deprecated"
+ visibility="protected"
+>
+</method>
+<field name="inCheck"
+ type="boolean"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="deprecated"
+ visibility="protected"
+>
+</field>
+</class>
+<class name="Short"
+ extends="java.lang.Number"
+ abstract="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="java.lang.Comparable">
+</implements>
+<constructor name="Short"
+ type="java.lang.Short"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="string" type="java.lang.String">
+</parameter>
+<exception name="NumberFormatException" type="java.lang.NumberFormatException">
+</exception>
+</constructor>
+<constructor name="Short"
+ type="java.lang.Short"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="value" type="short">
+</parameter>
+</constructor>
+<method name="compareTo"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="object" type="java.lang.Short">
+</parameter>
+</method>
+<method name="decode"
+ return="java.lang.Short"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="string" type="java.lang.String">
+</parameter>
+<exception name="NumberFormatException" type="java.lang.NumberFormatException">
+</exception>
+</method>
+<method name="doubleValue"
+ return="double"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="floatValue"
+ return="float"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="intValue"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="longValue"
+ return="long"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="parseShort"
+ return="short"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="string" type="java.lang.String">
+</parameter>
+<exception name="NumberFormatException" type="java.lang.NumberFormatException">
+</exception>
+</method>
+<method name="parseShort"
+ return="short"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="string" type="java.lang.String">
+</parameter>
+<parameter name="radix" type="int">
+</parameter>
+<exception name="NumberFormatException" type="java.lang.NumberFormatException">
+</exception>
+</method>
+<method name="reverseBytes"
+ return="short"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="s" type="short">
+</parameter>
+</method>
+<method name="toString"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="value" type="short">
+</parameter>
+</method>
+<method name="valueOf"
+ return="java.lang.Short"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="string" type="java.lang.String">
+</parameter>
+<exception name="NumberFormatException" type="java.lang.NumberFormatException">
+</exception>
+</method>
+<method name="valueOf"
+ return="java.lang.Short"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="string" type="java.lang.String">
+</parameter>
+<parameter name="radix" type="int">
+</parameter>
+<exception name="NumberFormatException" type="java.lang.NumberFormatException">
+</exception>
+</method>
+<method name="valueOf"
+ return="java.lang.Short"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="s" type="short">
+</parameter>
+</method>
+<field name="MAX_VALUE"
+ type="short"
+ transient="false"
+ volatile="false"
+ value="32767"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="MIN_VALUE"
+ type="short"
+ transient="false"
+ volatile="false"
+ value="-32768"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="SIZE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TYPE"
+ type="java.lang.Class"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<class name="StackOverflowError"
+ extends="java.lang.VirtualMachineError"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="StackOverflowError"
+ type="java.lang.StackOverflowError"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<constructor name="StackOverflowError"
+ type="java.lang.StackOverflowError"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="detailMessage" type="java.lang.String">
+</parameter>
+</constructor>
+</class>
+<class name="StackTraceElement"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="java.io.Serializable">
+</implements>
+<constructor name="StackTraceElement"
+ type="java.lang.StackTraceElement"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="cls" type="java.lang.String">
+</parameter>
+<parameter name="method" type="java.lang.String">
+</parameter>
+<parameter name="file" type="java.lang.String">
+</parameter>
+<parameter name="line" type="int">
+</parameter>
+</constructor>
+<method name="getClassName"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getFileName"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getLineNumber"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getMethodName"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isNativeMethod"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+</class>
+<class name="StrictMath"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="IEEEremainder"
+ return="double"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="x" type="double">
+</parameter>
+<parameter name="y" type="double">
+</parameter>
+</method>
+<method name="abs"
+ return="double"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="d" type="double">
+</parameter>
+</method>
+<method name="abs"
+ return="float"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="f" type="float">
+</parameter>
+</method>
+<method name="abs"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="i" type="int">
+</parameter>
+</method>
+<method name="abs"
+ return="long"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="l" type="long">
+</parameter>
+</method>
+<method name="acos"
+ return="double"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="d" type="double">
+</parameter>
+</method>
+<method name="asin"
+ return="double"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="d" type="double">
+</parameter>
+</method>
+<method name="atan"
+ return="double"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="d" type="double">
+</parameter>
+</method>
+<method name="atan2"
+ return="double"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="y" type="double">
+</parameter>
+<parameter name="x" type="double">
+</parameter>
+</method>
+<method name="cbrt"
+ return="double"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="d" type="double">
+</parameter>
+</method>
+<method name="ceil"
+ return="double"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="d" type="double">
+</parameter>
+</method>
+<method name="cos"
+ return="double"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="d" type="double">
+</parameter>
+</method>
+<method name="cosh"
+ return="double"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="d" type="double">
+</parameter>
+</method>
+<method name="exp"
+ return="double"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="d" type="double">
+</parameter>
+</method>
+<method name="expm1"
+ return="double"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="d" type="double">
+</parameter>
+</method>
+<method name="floor"
+ return="double"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="d" type="double">
+</parameter>
+</method>
+<method name="hypot"
+ return="double"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="x" type="double">
+</parameter>
+<parameter name="y" type="double">
+</parameter>
+</method>
+<method name="log"
+ return="double"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="d" type="double">
+</parameter>
+</method>
+<method name="log10"
+ return="double"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="d" type="double">
+</parameter>
+</method>
+<method name="log1p"
+ return="double"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="d" type="double">
+</parameter>
+</method>
+<method name="max"
+ return="double"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="d1" type="double">
+</parameter>
+<parameter name="d2" type="double">
+</parameter>
+</method>
+<method name="max"
+ return="float"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="f1" type="float">
+</parameter>
+<parameter name="f2" type="float">
+</parameter>
+</method>
+<method name="max"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="i1" type="int">
+</parameter>
+<parameter name="i2" type="int">
+</parameter>
+</method>
+<method name="max"
+ return="long"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="l1" type="long">
+</parameter>
+<parameter name="l2" type="long">
+</parameter>
+</method>
+<method name="min"
+ return="double"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="d1" type="double">
+</parameter>
+<parameter name="d2" type="double">
+</parameter>
+</method>
+<method name="min"
+ return="float"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="f1" type="float">
+</parameter>
+<parameter name="f2" type="float">
+</parameter>
+</method>
+<method name="min"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="i1" type="int">
+</parameter>
+<parameter name="i2" type="int">
+</parameter>
+</method>
+<method name="min"
+ return="long"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="l1" type="long">
+</parameter>
+<parameter name="l2" type="long">
+</parameter>
+</method>
+<method name="pow"
+ return="double"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="x" type="double">
+</parameter>
+<parameter name="y" type="double">
+</parameter>
+</method>
+<method name="random"
+ return="double"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="rint"
+ return="double"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="d" type="double">
+</parameter>
+</method>
+<method name="round"
+ return="long"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="d" type="double">
+</parameter>
+</method>
+<method name="round"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="f" type="float">
+</parameter>
+</method>
+<method name="signum"
+ return="double"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="d" type="double">
+</parameter>
+</method>
+<method name="signum"
+ return="float"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="f" type="float">
+</parameter>
+</method>
+<method name="sin"
+ return="double"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="d" type="double">
+</parameter>
+</method>
+<method name="sinh"
+ return="double"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="d" type="double">
+</parameter>
+</method>
+<method name="sqrt"
+ return="double"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="d" type="double">
+</parameter>
+</method>
+<method name="tan"
+ return="double"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="d" type="double">
+</parameter>
+</method>
+<method name="tanh"
+ return="double"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="d" type="double">
+</parameter>
+</method>
+<method name="toDegrees"
+ return="double"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="angrad" type="double">
+</parameter>
+</method>
+<method name="toRadians"
+ return="double"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="angdeg" type="double">
+</parameter>
+</method>
+<method name="ulp"
+ return="double"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="d" type="double">
+</parameter>
+</method>
+<method name="ulp"
+ return="float"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="f" type="float">
+</parameter>
+</method>
+<field name="E"
+ type="double"
+ transient="false"
+ volatile="false"
+ value="2.718281828459045"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="PI"
+ type="double"
+ transient="false"
+ volatile="false"
+ value="3.141592653589793"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<class name="String"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="java.lang.CharSequence">
+</implements>
+<implements name="java.lang.Comparable">
+</implements>
+<implements name="java.io.Serializable">
+</implements>
+<constructor name="String"
+ type="java.lang.String"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<constructor name="String"
+ type="java.lang.String"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="data" type="byte[]">
+</parameter>
+</constructor>
+<constructor name="String"
+ type="java.lang.String"
+ static="false"
+ final="false"
+ deprecated="deprecated"
+ visibility="public"
+>
+<parameter name="data" type="byte[]">
+</parameter>
+<parameter name="high" type="int">
+</parameter>
+</constructor>
+<constructor name="String"
+ type="java.lang.String"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="data" type="byte[]">
+</parameter>
+<parameter name="start" type="int">
+</parameter>
+<parameter name="length" type="int">
+</parameter>
+</constructor>
+<constructor name="String"
+ type="java.lang.String"
+ static="false"
+ final="false"
+ deprecated="deprecated"
+ visibility="public"
+>
+<parameter name="data" type="byte[]">
+</parameter>
+<parameter name="high" type="int">
+</parameter>
+<parameter name="start" type="int">
+</parameter>
+<parameter name="length" type="int">
+</parameter>
+</constructor>
+<constructor name="String"
+ type="java.lang.String"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="data" type="byte[]">
+</parameter>
+<parameter name="start" type="int">
+</parameter>
+<parameter name="length" type="int">
+</parameter>
+<parameter name="encoding" type="java.lang.String">
+</parameter>
+<exception name="UnsupportedEncodingException" type="java.io.UnsupportedEncodingException">
+</exception>
+</constructor>
+<constructor name="String"
+ type="java.lang.String"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="data" type="byte[]">
+</parameter>
+<parameter name="encoding" type="java.lang.String">
+</parameter>
+<exception name="UnsupportedEncodingException" type="java.io.UnsupportedEncodingException">
+</exception>
+</constructor>
+<constructor name="String"
+ type="java.lang.String"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="data" type="char[]">
+</parameter>
+</constructor>
+<constructor name="String"
+ type="java.lang.String"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="data" type="char[]">
+</parameter>
+<parameter name="start" type="int">
+</parameter>
+<parameter name="length" type="int">
+</parameter>
+</constructor>
+<constructor name="String"
+ type="java.lang.String"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="string" type="java.lang.String">
+</parameter>
+</constructor>
+<constructor name="String"
+ type="java.lang.String"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="stringbuffer" type="java.lang.StringBuffer">
+</parameter>
+</constructor>
+<constructor name="String"
+ type="java.lang.String"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="codePoints" type="int[]">
+</parameter>
+<parameter name="offset" type="int">
+</parameter>
+<parameter name="count" type="int">
+</parameter>
+</constructor>
+<constructor name="String"
+ type="java.lang.String"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="sb" type="java.lang.StringBuilder">
+</parameter>
+</constructor>
+<method name="charAt"
+ return="char"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="index" type="int">
+</parameter>
+</method>
+<method name="codePointAt"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="index" type="int">
+</parameter>
+</method>
+<method name="codePointBefore"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="index" type="int">
+</parameter>
+</method>
+<method name="codePointCount"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="beginIndex" type="int">
+</parameter>
+<parameter name="endIndex" type="int">
+</parameter>
+</method>
+<method name="compareTo"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="string" type="java.lang.String">
+</parameter>
+</method>
+<method name="compareToIgnoreCase"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="string" type="java.lang.String">
+</parameter>
+</method>
+<method name="concat"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="string" type="java.lang.String">
+</parameter>
+</method>
+<method name="contains"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="cs" type="java.lang.CharSequence">
+</parameter>
+</method>
+<method name="contentEquals"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="strbuf" type="java.lang.StringBuffer">
+</parameter>
+</method>
+<method name="contentEquals"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="cs" type="java.lang.CharSequence">
+</parameter>
+</method>
+<method name="copyValueOf"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="data" type="char[]">
+</parameter>
+</method>
+<method name="copyValueOf"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="data" type="char[]">
+</parameter>
+<parameter name="start" type="int">
+</parameter>
+<parameter name="length" type="int">
+</parameter>
+</method>
+<method name="endsWith"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="suffix" type="java.lang.String">
+</parameter>
+</method>
+<method name="equalsIgnoreCase"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="string" type="java.lang.String">
+</parameter>
+</method>
+<method name="format"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="format" type="java.lang.String">
+</parameter>
+<parameter name="args" type="java.lang.Object...">
+</parameter>
+</method>
+<method name="format"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="loc" type="java.util.Locale">
+</parameter>
+<parameter name="format" type="java.lang.String">
+</parameter>
+<parameter name="args" type="java.lang.Object...">
+</parameter>
+</method>
+<method name="getBytes"
+ return="byte[]"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getBytes"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="deprecated"
+ visibility="public"
+>
+<parameter name="start" type="int">
+</parameter>
+<parameter name="end" type="int">
+</parameter>
+<parameter name="data" type="byte[]">
+</parameter>
+<parameter name="index" type="int">
+</parameter>
+</method>
+<method name="getBytes"
+ return="byte[]"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="encoding" type="java.lang.String">
+</parameter>
+<exception name="UnsupportedEncodingException" type="java.io.UnsupportedEncodingException">
+</exception>
+</method>
+<method name="getChars"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="start" type="int">
+</parameter>
+<parameter name="end" type="int">
+</parameter>
+<parameter name="buffer" type="char[]">
+</parameter>
+<parameter name="index" type="int">
+</parameter>
+</method>
+<method name="indexOf"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="c" type="int">
+</parameter>
+</method>
+<method name="indexOf"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="c" type="int">
+</parameter>
+<parameter name="start" type="int">
+</parameter>
+</method>
+<method name="indexOf"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="string" type="java.lang.String">
+</parameter>
+</method>
+<method name="indexOf"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="subString" type="java.lang.String">
+</parameter>
+<parameter name="start" type="int">
+</parameter>
+</method>
+<method name="intern"
+ return="java.lang.String"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="lastIndexOf"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="c" type="int">
+</parameter>
+</method>
+<method name="lastIndexOf"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="c" type="int">
+</parameter>
+<parameter name="start" type="int">
+</parameter>
+</method>
+<method name="lastIndexOf"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="string" type="java.lang.String">
+</parameter>
+</method>
+<method name="lastIndexOf"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="subString" type="java.lang.String">
+</parameter>
+<parameter name="start" type="int">
+</parameter>
+</method>
+<method name="length"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="matches"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="expr" type="java.lang.String">
+</parameter>
+</method>
+<method name="offsetByCodePoints"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="index" type="int">
+</parameter>
+<parameter name="codePointOffset" type="int">
+</parameter>
+</method>
+<method name="regionMatches"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="thisStart" type="int">
+</parameter>
+<parameter name="string" type="java.lang.String">
+</parameter>
+<parameter name="start" type="int">
+</parameter>
+<parameter name="length" type="int">
+</parameter>
+</method>
+<method name="regionMatches"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="ignoreCase" type="boolean">
+</parameter>
+<parameter name="thisStart" type="int">
+</parameter>
+<parameter name="string" type="java.lang.String">
+</parameter>
+<parameter name="start" type="int">
+</parameter>
+<parameter name="length" type="int">
+</parameter>
+</method>
+<method name="replace"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="oldChar" type="char">
+</parameter>
+<parameter name="newChar" type="char">
+</parameter>
+</method>
+<method name="replace"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="target" type="java.lang.CharSequence">
+</parameter>
+<parameter name="replacement" type="java.lang.CharSequence">
+</parameter>
+</method>
+<method name="replaceAll"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="expr" type="java.lang.String">
+</parameter>
+<parameter name="substitute" type="java.lang.String">
+</parameter>
+</method>
+<method name="replaceFirst"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="expr" type="java.lang.String">
+</parameter>
+<parameter name="substitute" type="java.lang.String">
+</parameter>
+</method>
+<method name="split"
+ return="java.lang.String[]"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="expr" type="java.lang.String">
+</parameter>
+</method>
+<method name="split"
+ return="java.lang.String[]"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="expr" type="java.lang.String">
+</parameter>
+<parameter name="max" type="int">
+</parameter>
+</method>
+<method name="startsWith"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="prefix" type="java.lang.String">
+</parameter>
+</method>
+<method name="startsWith"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="prefix" type="java.lang.String">
+</parameter>
+<parameter name="start" type="int">
+</parameter>
+</method>
+<method name="subSequence"
+ return="java.lang.CharSequence"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="start" type="int">
+</parameter>
+<parameter name="end" type="int">
+</parameter>
+</method>
+<method name="substring"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="start" type="int">
+</parameter>
+</method>
+<method name="substring"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="start" type="int">
+</parameter>
+<parameter name="end" type="int">
+</parameter>
+</method>
+<method name="toCharArray"
+ return="char[]"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="toLowerCase"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="toLowerCase"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="locale" type="java.util.Locale">
+</parameter>
+</method>
+<method name="toUpperCase"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="toUpperCase"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="locale" type="java.util.Locale">
+</parameter>
+</method>
+<method name="trim"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="valueOf"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="data" type="char[]">
+</parameter>
+</method>
+<method name="valueOf"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="data" type="char[]">
+</parameter>
+<parameter name="start" type="int">
+</parameter>
+<parameter name="length" type="int">
+</parameter>
+</method>
+<method name="valueOf"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="value" type="char">
+</parameter>
+</method>
+<method name="valueOf"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="value" type="double">
+</parameter>
+</method>
+<method name="valueOf"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="value" type="float">
+</parameter>
+</method>
+<method name="valueOf"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="value" type="int">
+</parameter>
+</method>
+<method name="valueOf"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="value" type="long">
+</parameter>
+</method>
+<method name="valueOf"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="value" type="java.lang.Object">
+</parameter>
+</method>
+<method name="valueOf"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="value" type="boolean">
+</parameter>
+</method>
+<field name="CASE_INSENSITIVE_ORDER"
+ type="java.util.Comparator"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<class name="StringBuffer"
+ extends="java.lang.AbstractStringBuilder"
+ abstract="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="java.lang.Appendable">
+</implements>
+<implements name="java.lang.CharSequence">
+</implements>
+<implements name="java.io.Serializable">
+</implements>
+<constructor name="StringBuffer"
+ type="java.lang.StringBuffer"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<constructor name="StringBuffer"
+ type="java.lang.StringBuffer"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="capacity" type="int">
+</parameter>
+</constructor>
+<constructor name="StringBuffer"
+ type="java.lang.StringBuffer"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="string" type="java.lang.String">
+</parameter>
+</constructor>
+<constructor name="StringBuffer"
+ type="java.lang.StringBuffer"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="cs" type="java.lang.CharSequence">
+</parameter>
+</constructor>
+<method name="append"
+ return="java.lang.StringBuffer"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="b" type="boolean">
+</parameter>
+</method>
+<method name="append"
+ return="java.lang.StringBuffer"
+ abstract="false"
+ native="false"
+ synchronized="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="ch" type="char">
+</parameter>
+</method>
+<method name="append"
+ return="java.lang.StringBuffer"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="d" type="double">
+</parameter>
+</method>
+<method name="append"
+ return="java.lang.StringBuffer"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="f" type="float">
+</parameter>
+</method>
+<method name="append"
+ return="java.lang.StringBuffer"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="i" type="int">
+</parameter>
+</method>
+<method name="append"
+ return="java.lang.StringBuffer"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="l" type="long">
+</parameter>
+</method>
+<method name="append"
+ return="java.lang.StringBuffer"
+ abstract="false"
+ native="false"
+ synchronized="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="obj" type="java.lang.Object">
+</parameter>
+</method>
+<method name="append"
+ return="java.lang.StringBuffer"
+ abstract="false"
+ native="false"
+ synchronized="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="string" type="java.lang.String">
+</parameter>
+</method>
+<method name="append"
+ return="java.lang.StringBuffer"
+ abstract="false"
+ native="false"
+ synchronized="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="sb" type="java.lang.StringBuffer">
+</parameter>
+</method>
+<method name="append"
+ return="java.lang.StringBuffer"
+ abstract="false"
+ native="false"
+ synchronized="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="chars" type="char[]">
+</parameter>
+</method>
+<method name="append"
+ return="java.lang.StringBuffer"
+ abstract="false"
+ native="false"
+ synchronized="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="chars" type="char[]">
+</parameter>
+<parameter name="start" type="int">
+</parameter>
+<parameter name="length" type="int">
+</parameter>
+</method>
+<method name="append"
+ return="java.lang.StringBuffer"
+ abstract="false"
+ native="false"
+ synchronized="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="s" type="java.lang.CharSequence">
+</parameter>
+</method>
+<method name="append"
+ return="java.lang.StringBuffer"
+ abstract="false"
+ native="false"
+ synchronized="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="s" type="java.lang.CharSequence">
+</parameter>
+<parameter name="start" type="int">
+</parameter>
+<parameter name="end" type="int">
+</parameter>
+</method>
+<method name="appendCodePoint"
+ return="java.lang.StringBuffer"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="codePoint" type="int">
+</parameter>
+</method>
+<method name="delete"
+ return="java.lang.StringBuffer"
+ abstract="false"
+ native="false"
+ synchronized="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="start" type="int">
+</parameter>
+<parameter name="end" type="int">
+</parameter>
+</method>
+<method name="deleteCharAt"
+ return="java.lang.StringBuffer"
+ abstract="false"
+ native="false"
+ synchronized="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="location" type="int">
+</parameter>
+</method>
+<method name="insert"
+ return="java.lang.StringBuffer"
+ abstract="false"
+ native="false"
+ synchronized="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="index" type="int">
+</parameter>
+<parameter name="ch" type="char">
+</parameter>
+</method>
+<method name="insert"
+ return="java.lang.StringBuffer"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="index" type="int">
+</parameter>
+<parameter name="b" type="boolean">
+</parameter>
+</method>
+<method name="insert"
+ return="java.lang.StringBuffer"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="index" type="int">
+</parameter>
+<parameter name="i" type="int">
+</parameter>
+</method>
+<method name="insert"
+ return="java.lang.StringBuffer"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="index" type="int">
+</parameter>
+<parameter name="l" type="long">
+</parameter>
+</method>
+<method name="insert"
+ return="java.lang.StringBuffer"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="index" type="int">
+</parameter>
+<parameter name="d" type="double">
+</parameter>
+</method>
+<method name="insert"
+ return="java.lang.StringBuffer"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="index" type="int">
+</parameter>
+<parameter name="f" type="float">
+</parameter>
+</method>
+<method name="insert"
+ return="java.lang.StringBuffer"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="index" type="int">
+</parameter>
+<parameter name="obj" type="java.lang.Object">
+</parameter>
+</method>
+<method name="insert"
+ return="java.lang.StringBuffer"
+ abstract="false"
+ native="false"
+ synchronized="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="index" type="int">
+</parameter>
+<parameter name="string" type="java.lang.String">
+</parameter>
+</method>
+<method name="insert"
+ return="java.lang.StringBuffer"
+ abstract="false"
+ native="false"
+ synchronized="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="index" type="int">
+</parameter>
+<parameter name="chars" type="char[]">
+</parameter>
+</method>
+<method name="insert"
+ return="java.lang.StringBuffer"
+ abstract="false"
+ native="false"
+ synchronized="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="index" type="int">
+</parameter>
+<parameter name="chars" type="char[]">
+</parameter>
+<parameter name="start" type="int">
+</parameter>
+<parameter name="length" type="int">
+</parameter>
+</method>
+<method name="insert"
+ return="java.lang.StringBuffer"
+ abstract="false"
+ native="false"
+ synchronized="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="index" type="int">
+</parameter>
+<parameter name="s" type="java.lang.CharSequence">
+</parameter>
+</method>
+<method name="insert"
+ return="java.lang.StringBuffer"
+ abstract="false"
+ native="false"
+ synchronized="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="index" type="int">
+</parameter>
+<parameter name="s" type="java.lang.CharSequence">
+</parameter>
+<parameter name="start" type="int">
+</parameter>
+<parameter name="end" type="int">
+</parameter>
+</method>
+<method name="replace"
+ return="java.lang.StringBuffer"
+ abstract="false"
+ native="false"
+ synchronized="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="start" type="int">
+</parameter>
+<parameter name="end" type="int">
+</parameter>
+<parameter name="string" type="java.lang.String">
+</parameter>
+</method>
+<method name="reverse"
+ return="java.lang.StringBuffer"
+ abstract="false"
+ native="false"
+ synchronized="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+</class>
+<class name="StringBuilder"
+ extends="java.lang.AbstractStringBuilder"
+ abstract="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="java.lang.Appendable">
+</implements>
+<implements name="java.lang.CharSequence">
+</implements>
+<implements name="java.io.Serializable">
+</implements>
+<constructor name="StringBuilder"
+ type="java.lang.StringBuilder"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<constructor name="StringBuilder"
+ type="java.lang.StringBuilder"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="capacity" type="int">
+</parameter>
+</constructor>
+<constructor name="StringBuilder"
+ type="java.lang.StringBuilder"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="seq" type="java.lang.CharSequence">
+</parameter>
+</constructor>
+<constructor name="StringBuilder"
+ type="java.lang.StringBuilder"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="str" type="java.lang.String">
+</parameter>
+</constructor>
+<method name="append"
+ return="java.lang.StringBuilder"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="b" type="boolean">
+</parameter>
+</method>
+<method name="append"
+ return="java.lang.StringBuilder"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="c" type="char">
+</parameter>
+</method>
+<method name="append"
+ return="java.lang.StringBuilder"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="i" type="int">
+</parameter>
+</method>
+<method name="append"
+ return="java.lang.StringBuilder"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="lng" type="long">
+</parameter>
+</method>
+<method name="append"
+ return="java.lang.StringBuilder"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="f" type="float">
+</parameter>
+</method>
+<method name="append"
+ return="java.lang.StringBuilder"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="d" type="double">
+</parameter>
+</method>
+<method name="append"
+ return="java.lang.StringBuilder"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="obj" type="java.lang.Object">
+</parameter>
+</method>
+<method name="append"
+ return="java.lang.StringBuilder"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="str" type="java.lang.String">
+</parameter>
+</method>
+<method name="append"
+ return="java.lang.StringBuilder"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="sb" type="java.lang.StringBuffer">
+</parameter>
+</method>
+<method name="append"
+ return="java.lang.StringBuilder"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="ch" type="char[]">
+</parameter>
+</method>
+<method name="append"
+ return="java.lang.StringBuilder"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="str" type="char[]">
+</parameter>
+<parameter name="offset" type="int">
+</parameter>
+<parameter name="len" type="int">
+</parameter>
+</method>
+<method name="append"
+ return="java.lang.StringBuilder"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="csq" type="java.lang.CharSequence">
+</parameter>
+</method>
+<method name="append"
+ return="java.lang.StringBuilder"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="csq" type="java.lang.CharSequence">
+</parameter>
+<parameter name="start" type="int">
+</parameter>
+<parameter name="end" type="int">
+</parameter>
+</method>
+<method name="appendCodePoint"
+ return="java.lang.StringBuilder"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="codePoint" type="int">
+</parameter>
+</method>
+<method name="delete"
+ return="java.lang.StringBuilder"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="start" type="int">
+</parameter>
+<parameter name="end" type="int">
+</parameter>
+</method>
+<method name="deleteCharAt"
+ return="java.lang.StringBuilder"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="index" type="int">
+</parameter>
+</method>
+<method name="insert"
+ return="java.lang.StringBuilder"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="offset" type="int">
+</parameter>
+<parameter name="b" type="boolean">
+</parameter>
+</method>
+<method name="insert"
+ return="java.lang.StringBuilder"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="offset" type="int">
+</parameter>
+<parameter name="c" type="char">
+</parameter>
+</method>
+<method name="insert"
+ return="java.lang.StringBuilder"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="offset" type="int">
+</parameter>
+<parameter name="i" type="int">
+</parameter>
+</method>
+<method name="insert"
+ return="java.lang.StringBuilder"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="offset" type="int">
+</parameter>
+<parameter name="l" type="long">
+</parameter>
+</method>
+<method name="insert"
+ return="java.lang.StringBuilder"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="offset" type="int">
+</parameter>
+<parameter name="f" type="float">
+</parameter>
+</method>
+<method name="insert"
+ return="java.lang.StringBuilder"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="offset" type="int">
+</parameter>
+<parameter name="d" type="double">
+</parameter>
+</method>
+<method name="insert"
+ return="java.lang.StringBuilder"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="offset" type="int">
+</parameter>
+<parameter name="obj" type="java.lang.Object">
+</parameter>
+</method>
+<method name="insert"
+ return="java.lang.StringBuilder"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="offset" type="int">
+</parameter>
+<parameter name="str" type="java.lang.String">
+</parameter>
+</method>
+<method name="insert"
+ return="java.lang.StringBuilder"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="offset" type="int">
+</parameter>
+<parameter name="ch" type="char[]">
+</parameter>
+</method>
+<method name="insert"
+ return="java.lang.StringBuilder"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="offset" type="int">
+</parameter>
+<parameter name="str" type="char[]">
+</parameter>
+<parameter name="strOffset" type="int">
+</parameter>
+<parameter name="strLen" type="int">
+</parameter>
+</method>
+<method name="insert"
+ return="java.lang.StringBuilder"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="offset" type="int">
+</parameter>
+<parameter name="s" type="java.lang.CharSequence">
+</parameter>
+</method>
+<method name="insert"
+ return="java.lang.StringBuilder"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="offset" type="int">
+</parameter>
+<parameter name="s" type="java.lang.CharSequence">
+</parameter>
+<parameter name="start" type="int">
+</parameter>
+<parameter name="end" type="int">
+</parameter>
+</method>
+<method name="replace"
+ return="java.lang.StringBuilder"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="start" type="int">
+</parameter>
+<parameter name="end" type="int">
+</parameter>
+<parameter name="str" type="java.lang.String">
+</parameter>
+</method>
+<method name="reverse"
+ return="java.lang.StringBuilder"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+</class>
+<class name="StringIndexOutOfBoundsException"
+ extends="java.lang.IndexOutOfBoundsException"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="StringIndexOutOfBoundsException"
+ type="java.lang.StringIndexOutOfBoundsException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<constructor name="StringIndexOutOfBoundsException"
+ type="java.lang.StringIndexOutOfBoundsException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="index" type="int">
+</parameter>
+</constructor>
+<constructor name="StringIndexOutOfBoundsException"
+ type="java.lang.StringIndexOutOfBoundsException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="detailMessage" type="java.lang.String">
+</parameter>
+</constructor>
+</class>
+<class name="SuppressWarnings"
+ extends="java.lang.Object"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="java.lang.annotation.Annotation">
+</implements>
+</class>
+<class name="System"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="arraycopy"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="src" type="java.lang.Object">
+</parameter>
+<parameter name="srcPos" type="int">
+</parameter>
+<parameter name="dest" type="java.lang.Object">
+</parameter>
+<parameter name="destPos" type="int">
+</parameter>
+<parameter name="length" type="int">
+</parameter>
+</method>
+<method name="clearProperty"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="key" type="java.lang.String">
+</parameter>
+</method>
+<method name="currentTimeMillis"
+ return="long"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="exit"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="code" type="int">
+</parameter>
+</method>
+<method name="gc"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getProperties"
+ return="java.util.Properties"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getProperty"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="prop" type="java.lang.String">
+</parameter>
+</method>
+<method name="getProperty"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="prop" type="java.lang.String">
+</parameter>
+<parameter name="defaultValue" type="java.lang.String">
+</parameter>
+</method>
+<method name="getSecurityManager"
+ return="java.lang.SecurityManager"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getenv"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+</method>
+<method name="getenv"
+ return="java.util.Map&lt;java.lang.String, java.lang.String&gt;"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="identityHashCode"
+ return="int"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="anObject" type="java.lang.Object">
+</parameter>
+</method>
+<method name="inheritedChannel"
+ return="java.nio.channels.Channel"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="load"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="pathName" type="java.lang.String">
+</parameter>
+</method>
+<method name="loadLibrary"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="libName" type="java.lang.String">
+</parameter>
+</method>
+<method name="mapLibraryName"
+ return="java.lang.String"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="userLibName" type="java.lang.String">
+</parameter>
+</method>
+<method name="nanoTime"
+ return="long"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="runFinalization"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="runFinalizersOnExit"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="deprecated"
+ visibility="public"
+>
+<parameter name="flag" type="boolean">
+</parameter>
+</method>
+<method name="setErr"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="newErr" type="java.io.PrintStream">
+</parameter>
+</method>
+<method name="setIn"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="newIn" type="java.io.InputStream">
+</parameter>
+</method>
+<method name="setOut"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="newOut" type="java.io.PrintStream">
+</parameter>
+</method>
+<method name="setProperties"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="p" type="java.util.Properties">
+</parameter>
+</method>
+<method name="setProperty"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="prop" type="java.lang.String">
+</parameter>
+<parameter name="value" type="java.lang.String">
+</parameter>
+</method>
+<method name="setSecurityManager"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="sm" type="java.lang.SecurityManager">
+</parameter>
+</method>
+<field name="err"
+ type="java.io.PrintStream"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="in"
+ type="java.io.InputStream"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="out"
+ type="java.io.PrintStream"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<class name="Thread"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="java.lang.Runnable">
+</implements>
+<constructor name="Thread"
+ type="java.lang.Thread"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<constructor name="Thread"
+ type="java.lang.Thread"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="runnable" type="java.lang.Runnable">
+</parameter>
+</constructor>
+<constructor name="Thread"
+ type="java.lang.Thread"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="runnable" type="java.lang.Runnable">
+</parameter>
+<parameter name="threadName" type="java.lang.String">
+</parameter>
+</constructor>
+<constructor name="Thread"
+ type="java.lang.Thread"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="threadName" type="java.lang.String">
+</parameter>
+</constructor>
+<constructor name="Thread"
+ type="java.lang.Thread"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="group" type="java.lang.ThreadGroup">
+</parameter>
+<parameter name="runnable" type="java.lang.Runnable">
+</parameter>
+</constructor>
+<constructor name="Thread"
+ type="java.lang.Thread"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="group" type="java.lang.ThreadGroup">
+</parameter>
+<parameter name="runnable" type="java.lang.Runnable">
+</parameter>
+<parameter name="threadName" type="java.lang.String">
+</parameter>
+</constructor>
+<constructor name="Thread"
+ type="java.lang.Thread"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="group" type="java.lang.ThreadGroup">
+</parameter>
+<parameter name="threadName" type="java.lang.String">
+</parameter>
+</constructor>
+<constructor name="Thread"
+ type="java.lang.Thread"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="group" type="java.lang.ThreadGroup">
+</parameter>
+<parameter name="runnable" type="java.lang.Runnable">
+</parameter>
+<parameter name="threadName" type="java.lang.String">
+</parameter>
+<parameter name="stackSize" type="long">
+</parameter>
+</constructor>
+<method name="activeCount"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="checkAccess"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="countStackFrames"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="deprecated"
+ visibility="public"
+>
+</method>
+<method name="currentThread"
+ return="java.lang.Thread"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="destroy"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="deprecated"
+ visibility="public"
+>
+</method>
+<method name="dumpStack"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="enumerate"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="threads" type="java.lang.Thread[]">
+</parameter>
+</method>
+<method name="getAllStackTraces"
+ return="java.util.Map&lt;java.lang.Thread, java.lang.StackTraceElement[]&gt;"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getContextClassLoader"
+ return="java.lang.ClassLoader"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getDefaultUncaughtExceptionHandler"
+ return="java.lang.Thread.UncaughtExceptionHandler"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getId"
+ return="long"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getName"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getPriority"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getStackTrace"
+ return="java.lang.StackTraceElement[]"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getState"
+ return="java.lang.Thread.State"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getThreadGroup"
+ return="java.lang.ThreadGroup"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getUncaughtExceptionHandler"
+ return="java.lang.Thread.UncaughtExceptionHandler"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="holdsLock"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="object" type="java.lang.Object">
+</parameter>
+</method>
+<method name="interrupt"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="interrupted"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isAlive"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isDaemon"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isInterrupted"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="join"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="InterruptedException" type="java.lang.InterruptedException">
+</exception>
+</method>
+<method name="join"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="millis" type="long">
+</parameter>
+<exception name="InterruptedException" type="java.lang.InterruptedException">
+</exception>
+</method>
+<method name="join"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="millis" type="long">
+</parameter>
+<parameter name="nanos" type="int">
+</parameter>
+<exception name="InterruptedException" type="java.lang.InterruptedException">
+</exception>
+</method>
+<method name="resume"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="deprecated"
+ visibility="public"
+>
+</method>
+<method name="run"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="setContextClassLoader"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="cl" type="java.lang.ClassLoader">
+</parameter>
+</method>
+<method name="setDaemon"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="isDaemon" type="boolean">
+</parameter>
+</method>
+<method name="setDefaultUncaughtExceptionHandler"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="handler" type="java.lang.Thread.UncaughtExceptionHandler">
+</parameter>
+</method>
+<method name="setName"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="threadName" type="java.lang.String">
+</parameter>
+</method>
+<method name="setPriority"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="priority" type="int">
+</parameter>
+</method>
+<method name="setUncaughtExceptionHandler"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="handler" type="java.lang.Thread.UncaughtExceptionHandler">
+</parameter>
+</method>
+<method name="sleep"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="time" type="long">
+</parameter>
+<exception name="InterruptedException" type="java.lang.InterruptedException">
+</exception>
+</method>
+<method name="sleep"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="millis" type="long">
+</parameter>
+<parameter name="nanos" type="int">
+</parameter>
+<exception name="InterruptedException" type="java.lang.InterruptedException">
+</exception>
+</method>
+<method name="start"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="stop"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="deprecated"
+ visibility="public"
+>
+</method>
+<method name="stop"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="true"
+ static="false"
+ final="true"
+ deprecated="deprecated"
+ visibility="public"
+>
+<parameter name="throwable" type="java.lang.Throwable">
+</parameter>
+</method>
+<method name="suspend"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="deprecated"
+ visibility="public"
+>
+</method>
+<method name="yield"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<field name="MAX_PRIORITY"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="10"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="MIN_PRIORITY"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="NORM_PRIORITY"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="5"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<class name="Thread.State"
+ extends="java.lang.Enum"
+ abstract="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="valueOf"
+ return="java.lang.Thread.State"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+</method>
+<method name="values"
+ return="java.lang.Thread.State[]"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+</class>
+<interface name="Thread.UncaughtExceptionHandler"
+ abstract="true"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="uncaughtException"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="thread" type="java.lang.Thread">
+</parameter>
+<parameter name="ex" type="java.lang.Throwable">
+</parameter>
+</method>
+</interface>
+<class name="ThreadDeath"
+ extends="java.lang.Error"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="ThreadDeath"
+ type="java.lang.ThreadDeath"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+</class>
+<class name="ThreadGroup"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="java.lang.Thread.UncaughtExceptionHandler">
+</implements>
+<constructor name="ThreadGroup"
+ type="java.lang.ThreadGroup"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+</constructor>
+<constructor name="ThreadGroup"
+ type="java.lang.ThreadGroup"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="parent" type="java.lang.ThreadGroup">
+</parameter>
+<parameter name="name" type="java.lang.String">
+</parameter>
+</constructor>
+<method name="activeCount"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="activeGroupCount"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="allowThreadSuspension"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="deprecated"
+ visibility="public"
+>
+<parameter name="b" type="boolean">
+</parameter>
+</method>
+<method name="checkAccess"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="destroy"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="enumerate"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="threads" type="java.lang.Thread[]">
+</parameter>
+</method>
+<method name="enumerate"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="threads" type="java.lang.Thread[]">
+</parameter>
+<parameter name="recurse" type="boolean">
+</parameter>
+</method>
+<method name="enumerate"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="groups" type="java.lang.ThreadGroup[]">
+</parameter>
+</method>
+<method name="enumerate"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="groups" type="java.lang.ThreadGroup[]">
+</parameter>
+<parameter name="recurse" type="boolean">
+</parameter>
+</method>
+<method name="getMaxPriority"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getName"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getParent"
+ return="java.lang.ThreadGroup"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="interrupt"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isDaemon"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isDestroyed"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="list"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="parentOf"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="g" type="java.lang.ThreadGroup">
+</parameter>
+</method>
+<method name="resume"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="deprecated"
+ visibility="public"
+>
+</method>
+<method name="setDaemon"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="isDaemon" type="boolean">
+</parameter>
+</method>
+<method name="setMaxPriority"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="newMax" type="int">
+</parameter>
+</method>
+<method name="stop"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="deprecated"
+ visibility="public"
+>
+</method>
+<method name="suspend"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="deprecated"
+ visibility="public"
+>
+</method>
+<method name="uncaughtException"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="t" type="java.lang.Thread">
+</parameter>
+<parameter name="e" type="java.lang.Throwable">
+</parameter>
+</method>
+</class>
+<class name="ThreadLocal"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="ThreadLocal"
+ type="java.lang.ThreadLocal"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<method name="get"
+ return="T"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="initialValue"
+ return="T"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</method>
+<method name="remove"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="set"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="value" type="T">
+</parameter>
+</method>
+</class>
+<class name="Throwable"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="java.io.Serializable">
+</implements>
+<constructor name="Throwable"
+ type="java.lang.Throwable"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<constructor name="Throwable"
+ type="java.lang.Throwable"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="detailMessage" type="java.lang.String">
+</parameter>
+</constructor>
+<constructor name="Throwable"
+ type="java.lang.Throwable"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="detailMessage" type="java.lang.String">
+</parameter>
+<parameter name="throwable" type="java.lang.Throwable">
+</parameter>
+</constructor>
+<constructor name="Throwable"
+ type="java.lang.Throwable"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="throwable" type="java.lang.Throwable">
+</parameter>
+</constructor>
+<method name="fillInStackTrace"
+ return="java.lang.Throwable"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getCause"
+ return="java.lang.Throwable"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getLocalizedMessage"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getMessage"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getStackTrace"
+ return="java.lang.StackTraceElement[]"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="initCause"
+ return="java.lang.Throwable"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="throwable" type="java.lang.Throwable">
+</parameter>
+</method>
+<method name="printStackTrace"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="printStackTrace"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="err" type="java.io.PrintStream">
+</parameter>
+</method>
+<method name="printStackTrace"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="err" type="java.io.PrintWriter">
+</parameter>
+</method>
+<method name="setStackTrace"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="trace" type="java.lang.StackTraceElement[]">
+</parameter>
+</method>
+</class>
+<class name="TypeNotPresentException"
+ extends="java.lang.RuntimeException"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="TypeNotPresentException"
+ type="java.lang.TypeNotPresentException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="typeName" type="java.lang.String">
+</parameter>
+<parameter name="cause" type="java.lang.Throwable">
+</parameter>
+</constructor>
+<method name="typeName"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+</class>
+<class name="UnknownError"
+ extends="java.lang.VirtualMachineError"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="UnknownError"
+ type="java.lang.UnknownError"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<constructor name="UnknownError"
+ type="java.lang.UnknownError"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="detailMessage" type="java.lang.String">
+</parameter>
+</constructor>
+</class>
+<class name="UnsatisfiedLinkError"
+ extends="java.lang.LinkageError"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="UnsatisfiedLinkError"
+ type="java.lang.UnsatisfiedLinkError"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<constructor name="UnsatisfiedLinkError"
+ type="java.lang.UnsatisfiedLinkError"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="detailMessage" type="java.lang.String">
+</parameter>
+</constructor>
+</class>
+<class name="UnsupportedClassVersionError"
+ extends="java.lang.ClassFormatError"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="UnsupportedClassVersionError"
+ type="java.lang.UnsupportedClassVersionError"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<constructor name="UnsupportedClassVersionError"
+ type="java.lang.UnsupportedClassVersionError"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="detailMessage" type="java.lang.String">
+</parameter>
+</constructor>
+</class>
+<class name="UnsupportedOperationException"
+ extends="java.lang.RuntimeException"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="UnsupportedOperationException"
+ type="java.lang.UnsupportedOperationException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<constructor name="UnsupportedOperationException"
+ type="java.lang.UnsupportedOperationException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="detailMessage" type="java.lang.String">
+</parameter>
+</constructor>
+<constructor name="UnsupportedOperationException"
+ type="java.lang.UnsupportedOperationException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="message" type="java.lang.String">
+</parameter>
+<parameter name="cause" type="java.lang.Throwable">
+</parameter>
+</constructor>
+<constructor name="UnsupportedOperationException"
+ type="java.lang.UnsupportedOperationException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="cause" type="java.lang.Throwable">
+</parameter>
+</constructor>
+</class>
+<class name="VerifyError"
+ extends="java.lang.LinkageError"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="VerifyError"
+ type="java.lang.VerifyError"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<constructor name="VerifyError"
+ type="java.lang.VerifyError"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="detailMessage" type="java.lang.String">
+</parameter>
+</constructor>
+</class>
+<class name="VirtualMachineError"
+ extends="java.lang.Error"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="VirtualMachineError"
+ type="java.lang.VirtualMachineError"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<constructor name="VirtualMachineError"
+ type="java.lang.VirtualMachineError"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="detailMessage" type="java.lang.String">
+</parameter>
+</constructor>
+</class>
+<class name="Void"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<field name="TYPE"
+ type="java.lang.Class"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+</package>
+<package name="java.lang.annotation"
+>
+<interface name="Annotation"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="annotationType"
+ return="java.lang.Class&lt;? extends java.lang.annotation.Annotation&gt;"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="equals"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="obj" type="java.lang.Object">
+</parameter>
+</method>
+<method name="hashCode"
+ return="int"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="toString"
+ return="java.lang.String"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+</interface>
+<class name="AnnotationFormatError"
+ extends="java.lang.Error"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="AnnotationFormatError"
+ type="java.lang.annotation.AnnotationFormatError"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="message" type="java.lang.String">
+</parameter>
+</constructor>
+<constructor name="AnnotationFormatError"
+ type="java.lang.annotation.AnnotationFormatError"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="message" type="java.lang.String">
+</parameter>
+<parameter name="cause" type="java.lang.Throwable">
+</parameter>
+</constructor>
+<constructor name="AnnotationFormatError"
+ type="java.lang.annotation.AnnotationFormatError"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="cause" type="java.lang.Throwable">
+</parameter>
+</constructor>
+</class>
+<class name="AnnotationTypeMismatchException"
+ extends="java.lang.RuntimeException"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="AnnotationTypeMismatchException"
+ type="java.lang.annotation.AnnotationTypeMismatchException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="element" type="java.lang.reflect.Method">
+</parameter>
+<parameter name="foundType" type="java.lang.String">
+</parameter>
+</constructor>
+<method name="element"
+ return="java.lang.reflect.Method"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="foundType"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+</class>
+<class name="Documented"
+ extends="java.lang.Object"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="java.lang.annotation.Annotation">
+</implements>
+</class>
+<class name="ElementType"
+ extends="java.lang.Enum"
+ abstract="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="valueOf"
+ return="java.lang.annotation.ElementType"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+</method>
+<method name="values"
+ return="java.lang.annotation.ElementType[]"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+</class>
+<class name="IncompleteAnnotationException"
+ extends="java.lang.RuntimeException"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="IncompleteAnnotationException"
+ type="java.lang.annotation.IncompleteAnnotationException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="annotationType" type="java.lang.Class&lt;? extends java.lang.annotation.Annotation&gt;">
+</parameter>
+<parameter name="elementName" type="java.lang.String">
+</parameter>
+</constructor>
+<method name="annotationType"
+ return="java.lang.Class&lt;? extends java.lang.annotation.Annotation&gt;"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="elementName"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+</class>
+<class name="Inherited"
+ extends="java.lang.Object"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="java.lang.annotation.Annotation">
+</implements>
+</class>
+<class name="Retention"
+ extends="java.lang.Object"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="java.lang.annotation.Annotation">
+</implements>
+</class>
+<class name="RetentionPolicy"
+ extends="java.lang.Enum"
+ abstract="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="valueOf"
+ return="java.lang.annotation.RetentionPolicy"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+</method>
+<method name="values"
+ return="java.lang.annotation.RetentionPolicy[]"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+</class>
+<class name="Target"
+ extends="java.lang.Object"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="java.lang.annotation.Annotation">
+</implements>
+</class>
+</package>
+<package name="java.lang.ref"
+>
+<class name="PhantomReference"
+ extends="java.lang.ref.Reference"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="PhantomReference"
+ type="java.lang.ref.PhantomReference"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="r" type="T">
+</parameter>
+<parameter name="q" type="java.lang.ref.ReferenceQueue&lt;? super T&gt;">
+</parameter>
+</constructor>
+</class>
+<class name="Reference"
+ extends="java.lang.Object"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="clear"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="enqueue"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="get"
+ return="T"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isEnqueued"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+</class>
+<class name="ReferenceQueue"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="ReferenceQueue"
+ type="java.lang.ref.ReferenceQueue"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<method name="poll"
+ return="java.lang.ref.Reference&lt;? extends T&gt;"
+ abstract="false"
+ native="false"
+ synchronized="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="remove"
+ return="java.lang.ref.Reference&lt;? extends T&gt;"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="InterruptedException" type="java.lang.InterruptedException">
+</exception>
+</method>
+<method name="remove"
+ return="java.lang.ref.Reference&lt;? extends T&gt;"
+ abstract="false"
+ native="false"
+ synchronized="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="timeout" type="long">
+</parameter>
+<exception name="IllegalArgumentException" type="java.lang.IllegalArgumentException">
+</exception>
+<exception name="InterruptedException" type="java.lang.InterruptedException">
+</exception>
+</method>
+</class>
+<class name="SoftReference"
+ extends="java.lang.ref.Reference"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="SoftReference"
+ type="java.lang.ref.SoftReference"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="r" type="T">
+</parameter>
+</constructor>
+<constructor name="SoftReference"
+ type="java.lang.ref.SoftReference"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="r" type="T">
+</parameter>
+<parameter name="q" type="java.lang.ref.ReferenceQueue&lt;? super T&gt;">
+</parameter>
+</constructor>
+</class>
+<class name="WeakReference"
+ extends="java.lang.ref.Reference"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="WeakReference"
+ type="java.lang.ref.WeakReference"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="r" type="T">
+</parameter>
+</constructor>
+<constructor name="WeakReference"
+ type="java.lang.ref.WeakReference"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="r" type="T">
+</parameter>
+<parameter name="q" type="java.lang.ref.ReferenceQueue&lt;? super T&gt;">
+</parameter>
+</constructor>
+</class>
+</package>
+<package name="java.lang.reflect"
+>
+<class name="AccessibleObject"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="java.lang.reflect.AnnotatedElement">
+</implements>
+<constructor name="AccessibleObject"
+ type="java.lang.reflect.AccessibleObject"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</constructor>
+<method name="getAnnotation"
+ return="T"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="annotationType" type="java.lang.Class&lt;T&gt;">
+</parameter>
+</method>
+<method name="getAnnotations"
+ return="java.lang.annotation.Annotation[]"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getDeclaredAnnotations"
+ return="java.lang.annotation.Annotation[]"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isAccessible"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isAnnotationPresent"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="annotationType" type="java.lang.Class&lt;? extends java.lang.annotation.Annotation&gt;">
+</parameter>
+</method>
+<method name="setAccessible"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="objects" type="java.lang.reflect.AccessibleObject[]">
+</parameter>
+<parameter name="flag" type="boolean">
+</parameter>
+<exception name="SecurityException" type="java.lang.SecurityException">
+</exception>
+</method>
+<method name="setAccessible"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="flag" type="boolean">
+</parameter>
+<exception name="SecurityException" type="java.lang.SecurityException">
+</exception>
+</method>
+</class>
+<interface name="AnnotatedElement"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="getAnnotation"
+ return="T"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="annotationType" type="java.lang.Class&lt;T&gt;">
+</parameter>
+</method>
+<method name="getAnnotations"
+ return="java.lang.annotation.Annotation[]"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getDeclaredAnnotations"
+ return="java.lang.annotation.Annotation[]"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isAnnotationPresent"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="annotationType" type="java.lang.Class&lt;? extends java.lang.annotation.Annotation&gt;">
+</parameter>
+</method>
+</interface>
+<class name="Array"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="get"
+ return="java.lang.Object"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="array" type="java.lang.Object">
+</parameter>
+<parameter name="index" type="int">
+</parameter>
+<exception name="ArrayIndexOutOfBoundsException" type="java.lang.ArrayIndexOutOfBoundsException">
+</exception>
+<exception name="IllegalArgumentException" type="java.lang.IllegalArgumentException">
+</exception>
+</method>
+<method name="getBoolean"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="array" type="java.lang.Object">
+</parameter>
+<parameter name="index" type="int">
+</parameter>
+<exception name="ArrayIndexOutOfBoundsException" type="java.lang.ArrayIndexOutOfBoundsException">
+</exception>
+<exception name="IllegalArgumentException" type="java.lang.IllegalArgumentException">
+</exception>
+</method>
+<method name="getByte"
+ return="byte"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="array" type="java.lang.Object">
+</parameter>
+<parameter name="index" type="int">
+</parameter>
+<exception name="ArrayIndexOutOfBoundsException" type="java.lang.ArrayIndexOutOfBoundsException">
+</exception>
+<exception name="IllegalArgumentException" type="java.lang.IllegalArgumentException">
+</exception>
+</method>
+<method name="getChar"
+ return="char"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="array" type="java.lang.Object">
+</parameter>
+<parameter name="index" type="int">
+</parameter>
+<exception name="ArrayIndexOutOfBoundsException" type="java.lang.ArrayIndexOutOfBoundsException">
+</exception>
+<exception name="IllegalArgumentException" type="java.lang.IllegalArgumentException">
+</exception>
+</method>
+<method name="getDouble"
+ return="double"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="array" type="java.lang.Object">
+</parameter>
+<parameter name="index" type="int">
+</parameter>
+<exception name="ArrayIndexOutOfBoundsException" type="java.lang.ArrayIndexOutOfBoundsException">
+</exception>
+<exception name="IllegalArgumentException" type="java.lang.IllegalArgumentException">
+</exception>
+</method>
+<method name="getFloat"
+ return="float"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="array" type="java.lang.Object">
+</parameter>
+<parameter name="index" type="int">
+</parameter>
+<exception name="ArrayIndexOutOfBoundsException" type="java.lang.ArrayIndexOutOfBoundsException">
+</exception>
+<exception name="IllegalArgumentException" type="java.lang.IllegalArgumentException">
+</exception>
+</method>
+<method name="getInt"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="array" type="java.lang.Object">
+</parameter>
+<parameter name="index" type="int">
+</parameter>
+<exception name="ArrayIndexOutOfBoundsException" type="java.lang.ArrayIndexOutOfBoundsException">
+</exception>
+<exception name="IllegalArgumentException" type="java.lang.IllegalArgumentException">
+</exception>
+</method>
+<method name="getLength"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="array" type="java.lang.Object">
+</parameter>
+</method>
+<method name="getLong"
+ return="long"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="array" type="java.lang.Object">
+</parameter>
+<parameter name="index" type="int">
+</parameter>
+<exception name="ArrayIndexOutOfBoundsException" type="java.lang.ArrayIndexOutOfBoundsException">
+</exception>
+<exception name="IllegalArgumentException" type="java.lang.IllegalArgumentException">
+</exception>
+</method>
+<method name="getShort"
+ return="short"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="array" type="java.lang.Object">
+</parameter>
+<parameter name="index" type="int">
+</parameter>
+<exception name="ArrayIndexOutOfBoundsException" type="java.lang.ArrayIndexOutOfBoundsException">
+</exception>
+<exception name="IllegalArgumentException" type="java.lang.IllegalArgumentException">
+</exception>
+</method>
+<method name="newInstance"
+ return="java.lang.Object"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="componentType" type="java.lang.Class&lt;?&gt;">
+</parameter>
+<parameter name="dimensions" type="int[]">
+</parameter>
+<exception name="IllegalArgumentException" type="java.lang.IllegalArgumentException">
+</exception>
+<exception name="NegativeArraySizeException" type="java.lang.NegativeArraySizeException">
+</exception>
+</method>
+<method name="newInstance"
+ return="java.lang.Object"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="componentType" type="java.lang.Class&lt;?&gt;">
+</parameter>
+<parameter name="size" type="int">
+</parameter>
+<exception name="NegativeArraySizeException" type="java.lang.NegativeArraySizeException">
+</exception>
+</method>
+<method name="set"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="array" type="java.lang.Object">
+</parameter>
+<parameter name="index" type="int">
+</parameter>
+<parameter name="value" type="java.lang.Object">
+</parameter>
+<exception name="ArrayIndexOutOfBoundsException" type="java.lang.ArrayIndexOutOfBoundsException">
+</exception>
+<exception name="IllegalArgumentException" type="java.lang.IllegalArgumentException">
+</exception>
+</method>
+<method name="setBoolean"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="array" type="java.lang.Object">
+</parameter>
+<parameter name="index" type="int">
+</parameter>
+<parameter name="value" type="boolean">
+</parameter>
+</method>
+<method name="setByte"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="array" type="java.lang.Object">
+</parameter>
+<parameter name="index" type="int">
+</parameter>
+<parameter name="value" type="byte">
+</parameter>
+<exception name="ArrayIndexOutOfBoundsException" type="java.lang.ArrayIndexOutOfBoundsException">
+</exception>
+<exception name="IllegalArgumentException" type="java.lang.IllegalArgumentException">
+</exception>
+</method>
+<method name="setChar"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="array" type="java.lang.Object">
+</parameter>
+<parameter name="index" type="int">
+</parameter>
+<parameter name="value" type="char">
+</parameter>
+<exception name="ArrayIndexOutOfBoundsException" type="java.lang.ArrayIndexOutOfBoundsException">
+</exception>
+<exception name="IllegalArgumentException" type="java.lang.IllegalArgumentException">
+</exception>
+</method>
+<method name="setDouble"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="array" type="java.lang.Object">
+</parameter>
+<parameter name="index" type="int">
+</parameter>
+<parameter name="value" type="double">
+</parameter>
+<exception name="ArrayIndexOutOfBoundsException" type="java.lang.ArrayIndexOutOfBoundsException">
+</exception>
+<exception name="IllegalArgumentException" type="java.lang.IllegalArgumentException">
+</exception>
+</method>
+<method name="setFloat"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="array" type="java.lang.Object">
+</parameter>
+<parameter name="index" type="int">
+</parameter>
+<parameter name="value" type="float">
+</parameter>
+<exception name="ArrayIndexOutOfBoundsException" type="java.lang.ArrayIndexOutOfBoundsException">
+</exception>
+<exception name="IllegalArgumentException" type="java.lang.IllegalArgumentException">
+</exception>
+</method>
+<method name="setInt"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="array" type="java.lang.Object">
+</parameter>
+<parameter name="index" type="int">
+</parameter>
+<parameter name="value" type="int">
+</parameter>
+<exception name="ArrayIndexOutOfBoundsException" type="java.lang.ArrayIndexOutOfBoundsException">
+</exception>
+<exception name="IllegalArgumentException" type="java.lang.IllegalArgumentException">
+</exception>
+</method>
+<method name="setLong"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="array" type="java.lang.Object">
+</parameter>
+<parameter name="index" type="int">
+</parameter>
+<parameter name="value" type="long">
+</parameter>
+<exception name="ArrayIndexOutOfBoundsException" type="java.lang.ArrayIndexOutOfBoundsException">
+</exception>
+<exception name="IllegalArgumentException" type="java.lang.IllegalArgumentException">
+</exception>
+</method>
+<method name="setShort"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="array" type="java.lang.Object">
+</parameter>
+<parameter name="index" type="int">
+</parameter>
+<parameter name="value" type="short">
+</parameter>
+<exception name="ArrayIndexOutOfBoundsException" type="java.lang.ArrayIndexOutOfBoundsException">
+</exception>
+<exception name="IllegalArgumentException" type="java.lang.IllegalArgumentException">
+</exception>
+</method>
+</class>
+<class name="Constructor"
+ extends="java.lang.reflect.AccessibleObject"
+ abstract="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="java.lang.reflect.GenericDeclaration">
+</implements>
+<implements name="java.lang.reflect.Member">
+</implements>
+<method name="getDeclaringClass"
+ return="java.lang.Class&lt;T&gt;"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getExceptionTypes"
+ return="java.lang.Class&lt;?&gt;[]"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getGenericExceptionTypes"
+ return="java.lang.reflect.Type[]"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getGenericParameterTypes"
+ return="java.lang.reflect.Type[]"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getModifiers"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getName"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getParameterAnnotations"
+ return="java.lang.annotation.Annotation[][]"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getParameterTypes"
+ return="java.lang.Class&lt;?&gt;[]"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getTypeParameters"
+ return="java.lang.reflect.TypeVariable&lt;java.lang.reflect.Constructor&lt;T&gt;&gt;[]"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isSynthetic"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isVarArgs"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="newInstance"
+ return="T"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="args" type="java.lang.Object...">
+</parameter>
+<exception name="IllegalAccessException" type="java.lang.IllegalAccessException">
+</exception>
+<exception name="IllegalArgumentException" type="java.lang.IllegalArgumentException">
+</exception>
+<exception name="InstantiationException" type="java.lang.InstantiationException">
+</exception>
+<exception name="InvocationTargetException" type="java.lang.reflect.InvocationTargetException">
+</exception>
+</method>
+<method name="toGenericString"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+</class>
+<class name="Field"
+ extends="java.lang.reflect.AccessibleObject"
+ abstract="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="java.lang.reflect.Member">
+</implements>
+<method name="get"
+ return="java.lang.Object"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="object" type="java.lang.Object">
+</parameter>
+<exception name="IllegalAccessException" type="java.lang.IllegalAccessException">
+</exception>
+<exception name="IllegalArgumentException" type="java.lang.IllegalArgumentException">
+</exception>
+</method>
+<method name="getBoolean"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="object" type="java.lang.Object">
+</parameter>
+<exception name="IllegalAccessException" type="java.lang.IllegalAccessException">
+</exception>
+<exception name="IllegalArgumentException" type="java.lang.IllegalArgumentException">
+</exception>
+</method>
+<method name="getByte"
+ return="byte"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="object" type="java.lang.Object">
+</parameter>
+<exception name="IllegalAccessException" type="java.lang.IllegalAccessException">
+</exception>
+<exception name="IllegalArgumentException" type="java.lang.IllegalArgumentException">
+</exception>
+</method>
+<method name="getChar"
+ return="char"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="object" type="java.lang.Object">
+</parameter>
+<exception name="IllegalAccessException" type="java.lang.IllegalAccessException">
+</exception>
+<exception name="IllegalArgumentException" type="java.lang.IllegalArgumentException">
+</exception>
+</method>
+<method name="getDeclaringClass"
+ return="java.lang.Class&lt;?&gt;"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getDouble"
+ return="double"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="object" type="java.lang.Object">
+</parameter>
+<exception name="IllegalAccessException" type="java.lang.IllegalAccessException">
+</exception>
+<exception name="IllegalArgumentException" type="java.lang.IllegalArgumentException">
+</exception>
+</method>
+<method name="getFloat"
+ return="float"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="object" type="java.lang.Object">
+</parameter>
+<exception name="IllegalAccessException" type="java.lang.IllegalAccessException">
+</exception>
+<exception name="IllegalArgumentException" type="java.lang.IllegalArgumentException">
+</exception>
+</method>
+<method name="getGenericType"
+ return="java.lang.reflect.Type"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getInt"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="object" type="java.lang.Object">
+</parameter>
+<exception name="IllegalAccessException" type="java.lang.IllegalAccessException">
+</exception>
+<exception name="IllegalArgumentException" type="java.lang.IllegalArgumentException">
+</exception>
+</method>
+<method name="getLong"
+ return="long"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="object" type="java.lang.Object">
+</parameter>
+<exception name="IllegalAccessException" type="java.lang.IllegalAccessException">
+</exception>
+<exception name="IllegalArgumentException" type="java.lang.IllegalArgumentException">
+</exception>
+</method>
+<method name="getModifiers"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getName"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getShort"
+ return="short"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="object" type="java.lang.Object">
+</parameter>
+<exception name="IllegalAccessException" type="java.lang.IllegalAccessException">
+</exception>
+<exception name="IllegalArgumentException" type="java.lang.IllegalArgumentException">
+</exception>
+</method>
+<method name="getType"
+ return="java.lang.Class&lt;?&gt;"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isEnumConstant"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isSynthetic"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="set"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="object" type="java.lang.Object">
+</parameter>
+<parameter name="value" type="java.lang.Object">
+</parameter>
+<exception name="IllegalAccessException" type="java.lang.IllegalAccessException">
+</exception>
+<exception name="IllegalArgumentException" type="java.lang.IllegalArgumentException">
+</exception>
+</method>
+<method name="setBoolean"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="object" type="java.lang.Object">
+</parameter>
+<parameter name="value" type="boolean">
+</parameter>
+<exception name="IllegalAccessException" type="java.lang.IllegalAccessException">
+</exception>
+<exception name="IllegalArgumentException" type="java.lang.IllegalArgumentException">
+</exception>
+</method>
+<method name="setByte"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="object" type="java.lang.Object">
+</parameter>
+<parameter name="value" type="byte">
+</parameter>
+<exception name="IllegalAccessException" type="java.lang.IllegalAccessException">
+</exception>
+<exception name="IllegalArgumentException" type="java.lang.IllegalArgumentException">
+</exception>
+</method>
+<method name="setChar"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="object" type="java.lang.Object">
+</parameter>
+<parameter name="value" type="char">
+</parameter>
+<exception name="IllegalAccessException" type="java.lang.IllegalAccessException">
+</exception>
+<exception name="IllegalArgumentException" type="java.lang.IllegalArgumentException">
+</exception>
+</method>
+<method name="setDouble"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="object" type="java.lang.Object">
+</parameter>
+<parameter name="value" type="double">
+</parameter>
+<exception name="IllegalAccessException" type="java.lang.IllegalAccessException">
+</exception>
+<exception name="IllegalArgumentException" type="java.lang.IllegalArgumentException">
+</exception>
+</method>
+<method name="setFloat"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="object" type="java.lang.Object">
+</parameter>
+<parameter name="value" type="float">
+</parameter>
+<exception name="IllegalAccessException" type="java.lang.IllegalAccessException">
+</exception>
+<exception name="IllegalArgumentException" type="java.lang.IllegalArgumentException">
+</exception>
+</method>
+<method name="setInt"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="object" type="java.lang.Object">
+</parameter>
+<parameter name="value" type="int">
+</parameter>
+<exception name="IllegalAccessException" type="java.lang.IllegalAccessException">
+</exception>
+<exception name="IllegalArgumentException" type="java.lang.IllegalArgumentException">
+</exception>
+</method>
+<method name="setLong"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="object" type="java.lang.Object">
+</parameter>
+<parameter name="value" type="long">
+</parameter>
+<exception name="IllegalAccessException" type="java.lang.IllegalAccessException">
+</exception>
+<exception name="IllegalArgumentException" type="java.lang.IllegalArgumentException">
+</exception>
+</method>
+<method name="setShort"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="object" type="java.lang.Object">
+</parameter>
+<parameter name="value" type="short">
+</parameter>
+<exception name="IllegalAccessException" type="java.lang.IllegalAccessException">
+</exception>
+<exception name="IllegalArgumentException" type="java.lang.IllegalArgumentException">
+</exception>
+</method>
+<method name="toGenericString"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+</class>
+<interface name="GenericArrayType"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="java.lang.reflect.Type">
+</implements>
+<method name="getGenericComponentType"
+ return="java.lang.reflect.Type"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+</interface>
+<interface name="GenericDeclaration"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="getTypeParameters"
+ return="java.lang.reflect.TypeVariable&lt;?&gt;[]"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+</interface>
+<class name="GenericSignatureFormatError"
+ extends="java.lang.ClassFormatError"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="GenericSignatureFormatError"
+ type="java.lang.reflect.GenericSignatureFormatError"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+</class>
+<interface name="InvocationHandler"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="invoke"
+ return="java.lang.Object"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="proxy" type="java.lang.Object">
+</parameter>
+<parameter name="method" type="java.lang.reflect.Method">
+</parameter>
+<parameter name="args" type="java.lang.Object[]">
+</parameter>
+<exception name="Throwable" type="java.lang.Throwable">
+</exception>
+</method>
+</interface>
+<class name="InvocationTargetException"
+ extends="java.lang.Exception"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="InvocationTargetException"
+ type="java.lang.reflect.InvocationTargetException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</constructor>
+<constructor name="InvocationTargetException"
+ type="java.lang.reflect.InvocationTargetException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="exception" type="java.lang.Throwable">
+</parameter>
+</constructor>
+<constructor name="InvocationTargetException"
+ type="java.lang.reflect.InvocationTargetException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="exception" type="java.lang.Throwable">
+</parameter>
+<parameter name="detailMessage" type="java.lang.String">
+</parameter>
+</constructor>
+<method name="getTargetException"
+ return="java.lang.Throwable"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+</class>
+<class name="MalformedParameterizedTypeException"
+ extends="java.lang.RuntimeException"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="MalformedParameterizedTypeException"
+ type="java.lang.reflect.MalformedParameterizedTypeException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+</class>
+<interface name="Member"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="getDeclaringClass"
+ return="java.lang.Class"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getModifiers"
+ return="int"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getName"
+ return="java.lang.String"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isSynthetic"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<field name="DECLARED"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="PUBLIC"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="0"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</interface>
+<class name="Method"
+ extends="java.lang.reflect.AccessibleObject"
+ abstract="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="java.lang.reflect.GenericDeclaration">
+</implements>
+<implements name="java.lang.reflect.Member">
+</implements>
+<method name="getDeclaringClass"
+ return="java.lang.Class&lt;?&gt;"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getDefaultValue"
+ return="java.lang.Object"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getExceptionTypes"
+ return="java.lang.Class&lt;?&gt;[]"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getGenericExceptionTypes"
+ return="java.lang.reflect.Type[]"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getGenericParameterTypes"
+ return="java.lang.reflect.Type[]"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getGenericReturnType"
+ return="java.lang.reflect.Type"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getModifiers"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getName"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getParameterAnnotations"
+ return="java.lang.annotation.Annotation[][]"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getParameterTypes"
+ return="java.lang.Class&lt;?&gt;[]"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getReturnType"
+ return="java.lang.Class&lt;?&gt;"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getTypeParameters"
+ return="java.lang.reflect.TypeVariable&lt;java.lang.reflect.Method&gt;[]"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="invoke"
+ return="java.lang.Object"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="receiver" type="java.lang.Object">
+</parameter>
+<parameter name="args" type="java.lang.Object...">
+</parameter>
+<exception name="IllegalAccessException" type="java.lang.IllegalAccessException">
+</exception>
+<exception name="IllegalArgumentException" type="java.lang.IllegalArgumentException">
+</exception>
+<exception name="InvocationTargetException" type="java.lang.reflect.InvocationTargetException">
+</exception>
+</method>
+<method name="isBridge"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isSynthetic"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isVarArgs"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="toGenericString"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+</class>
+<class name="Modifier"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="Modifier"
+ type="java.lang.reflect.Modifier"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<method name="isAbstract"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="modifiers" type="int">
+</parameter>
+</method>
+<method name="isFinal"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="modifiers" type="int">
+</parameter>
+</method>
+<method name="isInterface"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="modifiers" type="int">
+</parameter>
+</method>
+<method name="isNative"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="modifiers" type="int">
+</parameter>
+</method>
+<method name="isPrivate"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="modifiers" type="int">
+</parameter>
+</method>
+<method name="isProtected"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="modifiers" type="int">
+</parameter>
+</method>
+<method name="isPublic"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="modifiers" type="int">
+</parameter>
+</method>
+<method name="isStatic"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="modifiers" type="int">
+</parameter>
+</method>
+<method name="isStrict"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="modifiers" type="int">
+</parameter>
+</method>
+<method name="isSynchronized"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="modifiers" type="int">
+</parameter>
+</method>
+<method name="isTransient"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="modifiers" type="int">
+</parameter>
+</method>
+<method name="isVolatile"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="modifiers" type="int">
+</parameter>
+</method>
+<method name="toString"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="modifiers" type="int">
+</parameter>
+</method>
+<field name="ABSTRACT"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1024"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="FINAL"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="INTERFACE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="512"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="NATIVE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="256"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="PRIVATE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="PROTECTED"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="4"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="PUBLIC"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="STATIC"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="8"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="STRICT"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2048"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="SYNCHRONIZED"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="32"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TRANSIENT"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="128"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="VOLATILE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="64"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<interface name="ParameterizedType"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="java.lang.reflect.Type">
+</implements>
+<method name="getActualTypeArguments"
+ return="java.lang.reflect.Type[]"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getOwnerType"
+ return="java.lang.reflect.Type"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getRawType"
+ return="java.lang.reflect.Type"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+</interface>
+<class name="Proxy"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="java.io.Serializable">
+</implements>
+<constructor name="Proxy"
+ type="java.lang.reflect.Proxy"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="h" type="java.lang.reflect.InvocationHandler">
+</parameter>
+</constructor>
+<method name="getInvocationHandler"
+ return="java.lang.reflect.InvocationHandler"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="proxy" type="java.lang.Object">
+</parameter>
+<exception name="IllegalArgumentException" type="java.lang.IllegalArgumentException">
+</exception>
+</method>
+<method name="getProxyClass"
+ return="java.lang.Class&lt;?&gt;"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="loader" type="java.lang.ClassLoader">
+</parameter>
+<parameter name="interfaces" type="java.lang.Class&lt;?&gt;...">
+</parameter>
+<exception name="IllegalArgumentException" type="java.lang.IllegalArgumentException">
+</exception>
+</method>
+<method name="isProxyClass"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="cl" type="java.lang.Class&lt;?&gt;">
+</parameter>
+</method>
+<method name="newProxyInstance"
+ return="java.lang.Object"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="loader" type="java.lang.ClassLoader">
+</parameter>
+<parameter name="interfaces" type="java.lang.Class&lt;?&gt;[]">
+</parameter>
+<parameter name="h" type="java.lang.reflect.InvocationHandler">
+</parameter>
+<exception name="IllegalArgumentException" type="java.lang.IllegalArgumentException">
+</exception>
+</method>
+<field name="h"
+ type="java.lang.reflect.InvocationHandler"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</field>
+</class>
+<class name="ReflectPermission"
+ extends="java.security.BasicPermission"
+ abstract="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="ReflectPermission"
+ type="java.lang.reflect.ReflectPermission"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="permissionName" type="java.lang.String">
+</parameter>
+</constructor>
+<constructor name="ReflectPermission"
+ type="java.lang.reflect.ReflectPermission"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+<parameter name="actions" type="java.lang.String">
+</parameter>
+</constructor>
+</class>
+<interface name="Type"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</interface>
+<interface name="TypeVariable"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="java.lang.reflect.Type">
+</implements>
+<method name="getBounds"
+ return="java.lang.reflect.Type[]"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getGenericDeclaration"
+ return="D"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getName"
+ return="java.lang.String"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+</interface>
+<class name="UndeclaredThrowableException"
+ extends="java.lang.RuntimeException"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="UndeclaredThrowableException"
+ type="java.lang.reflect.UndeclaredThrowableException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="exception" type="java.lang.Throwable">
+</parameter>
+</constructor>
+<constructor name="UndeclaredThrowableException"
+ type="java.lang.reflect.UndeclaredThrowableException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="exception" type="java.lang.Throwable">
+</parameter>
+<parameter name="detailMessage" type="java.lang.String">
+</parameter>
+</constructor>
+<method name="getUndeclaredThrowable"
+ return="java.lang.Throwable"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+</class>
+<interface name="WildcardType"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="java.lang.reflect.Type">
+</implements>
+<method name="getLowerBounds"
+ return="java.lang.reflect.Type[]"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getUpperBounds"
+ return="java.lang.reflect.Type[]"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+</interface>
+</package>
+<package name="java.math"
+>
+<class name="BigDecimal"
+ extends="java.lang.Number"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="java.lang.Comparable">
+</implements>
+<implements name="java.io.Serializable">
+</implements>
+<constructor name="BigDecimal"
+ type="java.math.BigDecimal"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="in" type="char[]">
+</parameter>
+<parameter name="offset" type="int">
+</parameter>
+<parameter name="len" type="int">
+</parameter>
+</constructor>
+<constructor name="BigDecimal"
+ type="java.math.BigDecimal"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="in" type="char[]">
+</parameter>
+<parameter name="offset" type="int">
+</parameter>
+<parameter name="len" type="int">
+</parameter>
+<parameter name="mc" type="java.math.MathContext">
+</parameter>
+</constructor>
+<constructor name="BigDecimal"
+ type="java.math.BigDecimal"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="in" type="char[]">
+</parameter>
+</constructor>
+<constructor name="BigDecimal"
+ type="java.math.BigDecimal"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="in" type="char[]">
+</parameter>
+<parameter name="mc" type="java.math.MathContext">
+</parameter>
+</constructor>
+<constructor name="BigDecimal"
+ type="java.math.BigDecimal"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="val" type="java.lang.String">
+</parameter>
+</constructor>
+<constructor name="BigDecimal"
+ type="java.math.BigDecimal"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="val" type="java.lang.String">
+</parameter>
+<parameter name="mc" type="java.math.MathContext">
+</parameter>
+</constructor>
+<constructor name="BigDecimal"
+ type="java.math.BigDecimal"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="val" type="double">
+</parameter>
+</constructor>
+<constructor name="BigDecimal"
+ type="java.math.BigDecimal"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="val" type="double">
+</parameter>
+<parameter name="mc" type="java.math.MathContext">
+</parameter>
+</constructor>
+<constructor name="BigDecimal"
+ type="java.math.BigDecimal"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="val" type="java.math.BigInteger">
+</parameter>
+</constructor>
+<constructor name="BigDecimal"
+ type="java.math.BigDecimal"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="val" type="java.math.BigInteger">
+</parameter>
+<parameter name="mc" type="java.math.MathContext">
+</parameter>
+</constructor>
+<constructor name="BigDecimal"
+ type="java.math.BigDecimal"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="unscaledVal" type="java.math.BigInteger">
+</parameter>
+<parameter name="scale" type="int">
+</parameter>
+</constructor>
+<constructor name="BigDecimal"
+ type="java.math.BigDecimal"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="unscaledVal" type="java.math.BigInteger">
+</parameter>
+<parameter name="scale" type="int">
+</parameter>
+<parameter name="mc" type="java.math.MathContext">
+</parameter>
+</constructor>
+<constructor name="BigDecimal"
+ type="java.math.BigDecimal"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="val" type="int">
+</parameter>
+</constructor>
+<constructor name="BigDecimal"
+ type="java.math.BigDecimal"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="val" type="int">
+</parameter>
+<parameter name="mc" type="java.math.MathContext">
+</parameter>
+</constructor>
+<constructor name="BigDecimal"
+ type="java.math.BigDecimal"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="val" type="long">
+</parameter>
+</constructor>
+<constructor name="BigDecimal"
+ type="java.math.BigDecimal"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="val" type="long">
+</parameter>
+<parameter name="mc" type="java.math.MathContext">
+</parameter>
+</constructor>
+<method name="abs"
+ return="java.math.BigDecimal"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="abs"
+ return="java.math.BigDecimal"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="mc" type="java.math.MathContext">
+</parameter>
+</method>
+<method name="add"
+ return="java.math.BigDecimal"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="augend" type="java.math.BigDecimal">
+</parameter>
+</method>
+<method name="add"
+ return="java.math.BigDecimal"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="augend" type="java.math.BigDecimal">
+</parameter>
+<parameter name="mc" type="java.math.MathContext">
+</parameter>
+</method>
+<method name="byteValueExact"
+ return="byte"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="compareTo"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="val" type="java.math.BigDecimal">
+</parameter>
+</method>
+<method name="divide"
+ return="java.math.BigDecimal"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="divisor" type="java.math.BigDecimal">
+</parameter>
+<parameter name="scale" type="int">
+</parameter>
+<parameter name="roundingMode" type="int">
+</parameter>
+</method>
+<method name="divide"
+ return="java.math.BigDecimal"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="divisor" type="java.math.BigDecimal">
+</parameter>
+<parameter name="scale" type="int">
+</parameter>
+<parameter name="roundingMode" type="java.math.RoundingMode">
+</parameter>
+</method>
+<method name="divide"
+ return="java.math.BigDecimal"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="divisor" type="java.math.BigDecimal">
+</parameter>
+<parameter name="roundingMode" type="int">
+</parameter>
+</method>
+<method name="divide"
+ return="java.math.BigDecimal"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="divisor" type="java.math.BigDecimal">
+</parameter>
+<parameter name="roundingMode" type="java.math.RoundingMode">
+</parameter>
+</method>
+<method name="divide"
+ return="java.math.BigDecimal"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="divisor" type="java.math.BigDecimal">
+</parameter>
+</method>
+<method name="divide"
+ return="java.math.BigDecimal"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="divisor" type="java.math.BigDecimal">
+</parameter>
+<parameter name="mc" type="java.math.MathContext">
+</parameter>
+</method>
+<method name="divideAndRemainder"
+ return="java.math.BigDecimal[]"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="divisor" type="java.math.BigDecimal">
+</parameter>
+</method>
+<method name="divideAndRemainder"
+ return="java.math.BigDecimal[]"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="divisor" type="java.math.BigDecimal">
+</parameter>
+<parameter name="mc" type="java.math.MathContext">
+</parameter>
+</method>
+<method name="divideToIntegralValue"
+ return="java.math.BigDecimal"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="divisor" type="java.math.BigDecimal">
+</parameter>
+</method>
+<method name="divideToIntegralValue"
+ return="java.math.BigDecimal"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="divisor" type="java.math.BigDecimal">
+</parameter>
+<parameter name="mc" type="java.math.MathContext">
+</parameter>
+</method>
+<method name="doubleValue"
+ return="double"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="floatValue"
+ return="float"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="intValue"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="intValueExact"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="longValue"
+ return="long"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="longValueExact"
+ return="long"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="max"
+ return="java.math.BigDecimal"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="val" type="java.math.BigDecimal">
+</parameter>
+</method>
+<method name="min"
+ return="java.math.BigDecimal"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="val" type="java.math.BigDecimal">
+</parameter>
+</method>
+<method name="movePointLeft"
+ return="java.math.BigDecimal"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="n" type="int">
+</parameter>
+</method>
+<method name="movePointRight"
+ return="java.math.BigDecimal"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="n" type="int">
+</parameter>
+</method>
+<method name="multiply"
+ return="java.math.BigDecimal"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="multiplicand" type="java.math.BigDecimal">
+</parameter>
+</method>
+<method name="multiply"
+ return="java.math.BigDecimal"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="multiplicand" type="java.math.BigDecimal">
+</parameter>
+<parameter name="mc" type="java.math.MathContext">
+</parameter>
+</method>
+<method name="negate"
+ return="java.math.BigDecimal"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="negate"
+ return="java.math.BigDecimal"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="mc" type="java.math.MathContext">
+</parameter>
+</method>
+<method name="plus"
+ return="java.math.BigDecimal"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="plus"
+ return="java.math.BigDecimal"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="mc" type="java.math.MathContext">
+</parameter>
+</method>
+<method name="pow"
+ return="java.math.BigDecimal"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="n" type="int">
+</parameter>
+</method>
+<method name="pow"
+ return="java.math.BigDecimal"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="n" type="int">
+</parameter>
+<parameter name="mc" type="java.math.MathContext">
+</parameter>
+</method>
+<method name="precision"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="remainder"
+ return="java.math.BigDecimal"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="divisor" type="java.math.BigDecimal">
+</parameter>
+</method>
+<method name="remainder"
+ return="java.math.BigDecimal"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="divisor" type="java.math.BigDecimal">
+</parameter>
+<parameter name="mc" type="java.math.MathContext">
+</parameter>
+</method>
+<method name="round"
+ return="java.math.BigDecimal"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="mc" type="java.math.MathContext">
+</parameter>
+</method>
+<method name="scale"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="scaleByPowerOfTen"
+ return="java.math.BigDecimal"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="n" type="int">
+</parameter>
+</method>
+<method name="setScale"
+ return="java.math.BigDecimal"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="newScale" type="int">
+</parameter>
+<parameter name="roundingMode" type="java.math.RoundingMode">
+</parameter>
+</method>
+<method name="setScale"
+ return="java.math.BigDecimal"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="newScale" type="int">
+</parameter>
+<parameter name="roundingMode" type="int">
+</parameter>
+</method>
+<method name="setScale"
+ return="java.math.BigDecimal"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="newScale" type="int">
+</parameter>
+</method>
+<method name="shortValueExact"
+ return="short"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="signum"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="stripTrailingZeros"
+ return="java.math.BigDecimal"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="subtract"
+ return="java.math.BigDecimal"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="subtrahend" type="java.math.BigDecimal">
+</parameter>
+</method>
+<method name="subtract"
+ return="java.math.BigDecimal"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="subtrahend" type="java.math.BigDecimal">
+</parameter>
+<parameter name="mc" type="java.math.MathContext">
+</parameter>
+</method>
+<method name="toBigInteger"
+ return="java.math.BigInteger"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="toBigIntegerExact"
+ return="java.math.BigInteger"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="toEngineeringString"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="toPlainString"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="ulp"
+ return="java.math.BigDecimal"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="unscaledValue"
+ return="java.math.BigInteger"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="valueOf"
+ return="java.math.BigDecimal"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="unscaledVal" type="long">
+</parameter>
+<parameter name="scale" type="int">
+</parameter>
+</method>
+<method name="valueOf"
+ return="java.math.BigDecimal"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="unscaledVal" type="long">
+</parameter>
+</method>
+<method name="valueOf"
+ return="java.math.BigDecimal"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="val" type="double">
+</parameter>
+</method>
+<field name="ONE"
+ type="java.math.BigDecimal"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ROUND_CEILING"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ROUND_DOWN"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ROUND_FLOOR"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="3"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ROUND_HALF_DOWN"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="5"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ROUND_HALF_EVEN"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="6"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ROUND_HALF_UP"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="4"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ROUND_UNNECESSARY"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="7"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ROUND_UP"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="0"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TEN"
+ type="java.math.BigDecimal"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ZERO"
+ type="java.math.BigDecimal"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<class name="BigInteger"
+ extends="java.lang.Number"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="java.lang.Comparable">
+</implements>
+<implements name="java.io.Serializable">
+</implements>
+<constructor name="BigInteger"
+ type="java.math.BigInteger"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="numBits" type="int">
+</parameter>
+<parameter name="rnd" type="java.util.Random">
+</parameter>
+</constructor>
+<constructor name="BigInteger"
+ type="java.math.BigInteger"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="bitLength" type="int">
+</parameter>
+<parameter name="certainty" type="int">
+</parameter>
+<parameter name="rnd" type="java.util.Random">
+</parameter>
+</constructor>
+<constructor name="BigInteger"
+ type="java.math.BigInteger"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="val" type="java.lang.String">
+</parameter>
+</constructor>
+<constructor name="BigInteger"
+ type="java.math.BigInteger"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="val" type="java.lang.String">
+</parameter>
+<parameter name="radix" type="int">
+</parameter>
+</constructor>
+<constructor name="BigInteger"
+ type="java.math.BigInteger"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="signum" type="int">
+</parameter>
+<parameter name="magnitude" type="byte[]">
+</parameter>
+</constructor>
+<constructor name="BigInteger"
+ type="java.math.BigInteger"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="val" type="byte[]">
+</parameter>
+</constructor>
+<method name="abs"
+ return="java.math.BigInteger"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="add"
+ return="java.math.BigInteger"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="val" type="java.math.BigInteger">
+</parameter>
+</method>
+<method name="and"
+ return="java.math.BigInteger"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="val" type="java.math.BigInteger">
+</parameter>
+</method>
+<method name="andNot"
+ return="java.math.BigInteger"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="val" type="java.math.BigInteger">
+</parameter>
+</method>
+<method name="bitCount"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="bitLength"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="clearBit"
+ return="java.math.BigInteger"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="n" type="int">
+</parameter>
+</method>
+<method name="compareTo"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="val" type="java.math.BigInteger">
+</parameter>
+</method>
+<method name="divide"
+ return="java.math.BigInteger"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="divisor" type="java.math.BigInteger">
+</parameter>
+</method>
+<method name="divideAndRemainder"
+ return="java.math.BigInteger[]"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="divisor" type="java.math.BigInteger">
+</parameter>
+</method>
+<method name="doubleValue"
+ return="double"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="flipBit"
+ return="java.math.BigInteger"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="n" type="int">
+</parameter>
+</method>
+<method name="floatValue"
+ return="float"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="gcd"
+ return="java.math.BigInteger"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="val" type="java.math.BigInteger">
+</parameter>
+</method>
+<method name="getLowestSetBit"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="intValue"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isProbablePrime"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="certainty" type="int">
+</parameter>
+</method>
+<method name="longValue"
+ return="long"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="max"
+ return="java.math.BigInteger"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="val" type="java.math.BigInteger">
+</parameter>
+</method>
+<method name="min"
+ return="java.math.BigInteger"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="val" type="java.math.BigInteger">
+</parameter>
+</method>
+<method name="mod"
+ return="java.math.BigInteger"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="m" type="java.math.BigInteger">
+</parameter>
+</method>
+<method name="modInverse"
+ return="java.math.BigInteger"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="m" type="java.math.BigInteger">
+</parameter>
+</method>
+<method name="modPow"
+ return="java.math.BigInteger"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="exponent" type="java.math.BigInteger">
+</parameter>
+<parameter name="m" type="java.math.BigInteger">
+</parameter>
+</method>
+<method name="multiply"
+ return="java.math.BigInteger"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="val" type="java.math.BigInteger">
+</parameter>
+</method>
+<method name="negate"
+ return="java.math.BigInteger"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="nextProbablePrime"
+ return="java.math.BigInteger"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="not"
+ return="java.math.BigInteger"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="or"
+ return="java.math.BigInteger"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="val" type="java.math.BigInteger">
+</parameter>
+</method>
+<method name="pow"
+ return="java.math.BigInteger"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="exp" type="int">
+</parameter>
+</method>
+<method name="probablePrime"
+ return="java.math.BigInteger"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="bitLength" type="int">
+</parameter>
+<parameter name="rnd" type="java.util.Random">
+</parameter>
+</method>
+<method name="remainder"
+ return="java.math.BigInteger"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="divisor" type="java.math.BigInteger">
+</parameter>
+</method>
+<method name="setBit"
+ return="java.math.BigInteger"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="n" type="int">
+</parameter>
+</method>
+<method name="shiftLeft"
+ return="java.math.BigInteger"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="n" type="int">
+</parameter>
+</method>
+<method name="shiftRight"
+ return="java.math.BigInteger"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="n" type="int">
+</parameter>
+</method>
+<method name="signum"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="subtract"
+ return="java.math.BigInteger"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="val" type="java.math.BigInteger">
+</parameter>
+</method>
+<method name="testBit"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="n" type="int">
+</parameter>
+</method>
+<method name="toByteArray"
+ return="byte[]"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="toString"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="radix" type="int">
+</parameter>
+</method>
+<method name="valueOf"
+ return="java.math.BigInteger"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="val" type="long">
+</parameter>
+</method>
+<method name="xor"
+ return="java.math.BigInteger"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="val" type="java.math.BigInteger">
+</parameter>
+</method>
+<field name="ONE"
+ type="java.math.BigInteger"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TEN"
+ type="java.math.BigInteger"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ZERO"
+ type="java.math.BigInteger"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<class name="MathContext"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="java.io.Serializable">
+</implements>
+<constructor name="MathContext"
+ type="java.math.MathContext"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="precision" type="int">
+</parameter>
+</constructor>
+<constructor name="MathContext"
+ type="java.math.MathContext"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="precision" type="int">
+</parameter>
+<parameter name="roundingMode" type="java.math.RoundingMode">
+</parameter>
+</constructor>
+<constructor name="MathContext"
+ type="java.math.MathContext"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="val" type="java.lang.String">
+</parameter>
+</constructor>
+<method name="getPrecision"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getRoundingMode"
+ return="java.math.RoundingMode"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<field name="DECIMAL128"
+ type="java.math.MathContext"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="DECIMAL32"
+ type="java.math.MathContext"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="DECIMAL64"
+ type="java.math.MathContext"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="UNLIMITED"
+ type="java.math.MathContext"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<class name="RoundingMode"
+ extends="java.lang.Enum"
+ abstract="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="valueOf"
+ return="java.math.RoundingMode"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+</method>
+<method name="valueOf"
+ return="java.math.RoundingMode"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="mode" type="int">
+</parameter>
+</method>
+<method name="values"
+ return="java.math.RoundingMode[]"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+</class>
+</package>
+<package name="java.net"
+>
+<class name="Authenticator"
+ extends="java.lang.Object"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="Authenticator"
+ type="java.net.Authenticator"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<method name="getPasswordAuthentication"
+ return="java.net.PasswordAuthentication"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</method>
+<method name="getRequestingHost"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</method>
+<method name="getRequestingPort"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</method>
+<method name="getRequestingPrompt"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</method>
+<method name="getRequestingProtocol"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</method>
+<method name="getRequestingScheme"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</method>
+<method name="getRequestingSite"
+ return="java.net.InetAddress"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</method>
+<method name="getRequestingURL"
+ return="java.net.URL"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</method>
+<method name="getRequestorType"
+ return="java.net.Authenticator.RequestorType"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</method>
+<method name="requestPasswordAuthentication"
+ return="java.net.PasswordAuthentication"
+ abstract="false"
+ native="false"
+ synchronized="true"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="rAddr" type="java.net.InetAddress">
+</parameter>
+<parameter name="rPort" type="int">
+</parameter>
+<parameter name="rProtocol" type="java.lang.String">
+</parameter>
+<parameter name="rPrompt" type="java.lang.String">
+</parameter>
+<parameter name="rScheme" type="java.lang.String">
+</parameter>
+</method>
+<method name="requestPasswordAuthentication"
+ return="java.net.PasswordAuthentication"
+ abstract="false"
+ native="false"
+ synchronized="true"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="rHost" type="java.lang.String">
+</parameter>
+<parameter name="rAddr" type="java.net.InetAddress">
+</parameter>
+<parameter name="rPort" type="int">
+</parameter>
+<parameter name="rProtocol" type="java.lang.String">
+</parameter>
+<parameter name="rPrompt" type="java.lang.String">
+</parameter>
+<parameter name="rScheme" type="java.lang.String">
+</parameter>
+</method>
+<method name="requestPasswordAuthentication"
+ return="java.net.PasswordAuthentication"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="rHost" type="java.lang.String">
+</parameter>
+<parameter name="rAddr" type="java.net.InetAddress">
+</parameter>
+<parameter name="rPort" type="int">
+</parameter>
+<parameter name="rProtocol" type="java.lang.String">
+</parameter>
+<parameter name="rPrompt" type="java.lang.String">
+</parameter>
+<parameter name="rScheme" type="java.lang.String">
+</parameter>
+<parameter name="rURL" type="java.net.URL">
+</parameter>
+<parameter name="reqType" type="java.net.Authenticator.RequestorType">
+</parameter>
+</method>
+<method name="setDefault"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="a" type="java.net.Authenticator">
+</parameter>
+</method>
+</class>
+<class name="Authenticator.RequestorType"
+ extends="java.lang.Enum"
+ abstract="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="valueOf"
+ return="java.net.Authenticator.RequestorType"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+</method>
+<method name="values"
+ return="java.net.Authenticator.RequestorType[]"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+</class>
+<class name="BindException"
+ extends="java.net.SocketException"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="BindException"
+ type="java.net.BindException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<constructor name="BindException"
+ type="java.net.BindException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="detailMessage" type="java.lang.String">
+</parameter>
+</constructor>
+</class>
+<class name="CacheRequest"
+ extends="java.lang.Object"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="CacheRequest"
+ type="java.net.CacheRequest"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<method name="abort"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getBody"
+ return="java.io.OutputStream"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+</class>
+<class name="CacheResponse"
+ extends="java.lang.Object"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="CacheResponse"
+ type="java.net.CacheResponse"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<method name="getBody"
+ return="java.io.InputStream"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="getHeaders"
+ return="java.util.Map&lt;java.lang.String, java.util.List&lt;java.lang.String&gt;&gt;"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+</class>
+<class name="ConnectException"
+ extends="java.net.SocketException"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="ConnectException"
+ type="java.net.ConnectException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<constructor name="ConnectException"
+ type="java.net.ConnectException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="detailMessage" type="java.lang.String">
+</parameter>
+</constructor>
+</class>
+<class name="ContentHandler"
+ extends="java.lang.Object"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="ContentHandler"
+ type="java.net.ContentHandler"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<method name="getContent"
+ return="java.lang.Object"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="uConn" type="java.net.URLConnection">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="getContent"
+ return="java.lang.Object"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="uConn" type="java.net.URLConnection">
+</parameter>
+<parameter name="types" type="java.lang.Class[]">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+</class>
+<interface name="ContentHandlerFactory"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="createContentHandler"
+ return="java.net.ContentHandler"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="contentType" type="java.lang.String">
+</parameter>
+</method>
+</interface>
+<class name="CookieHandler"
+ extends="java.lang.Object"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="CookieHandler"
+ type="java.net.CookieHandler"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<method name="get"
+ return="java.util.Map&lt;java.lang.String, java.util.List&lt;java.lang.String&gt;&gt;"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="uri" type="java.net.URI">
+</parameter>
+<parameter name="requestHeaders" type="java.util.Map&lt;java.lang.String, java.util.List&lt;java.lang.String&gt;&gt;">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="getDefault"
+ return="java.net.CookieHandler"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="put"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="uri" type="java.net.URI">
+</parameter>
+<parameter name="responseHeaders" type="java.util.Map&lt;java.lang.String, java.util.List&lt;java.lang.String&gt;&gt;">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="setDefault"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="cHandler" type="java.net.CookieHandler">
+</parameter>
+</method>
+</class>
+<class name="DatagramPacket"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="DatagramPacket"
+ type="java.net.DatagramPacket"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="data" type="byte[]">
+</parameter>
+<parameter name="length" type="int">
+</parameter>
+</constructor>
+<constructor name="DatagramPacket"
+ type="java.net.DatagramPacket"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="data" type="byte[]">
+</parameter>
+<parameter name="offset" type="int">
+</parameter>
+<parameter name="length" type="int">
+</parameter>
+</constructor>
+<constructor name="DatagramPacket"
+ type="java.net.DatagramPacket"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="data" type="byte[]">
+</parameter>
+<parameter name="offset" type="int">
+</parameter>
+<parameter name="length" type="int">
+</parameter>
+<parameter name="host" type="java.net.InetAddress">
+</parameter>
+<parameter name="aPort" type="int">
+</parameter>
+</constructor>
+<constructor name="DatagramPacket"
+ type="java.net.DatagramPacket"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="data" type="byte[]">
+</parameter>
+<parameter name="length" type="int">
+</parameter>
+<parameter name="host" type="java.net.InetAddress">
+</parameter>
+<parameter name="port" type="int">
+</parameter>
+</constructor>
+<constructor name="DatagramPacket"
+ type="java.net.DatagramPacket"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="data" type="byte[]">
+</parameter>
+<parameter name="length" type="int">
+</parameter>
+<parameter name="sockAddr" type="java.net.SocketAddress">
+</parameter>
+<exception name="SocketException" type="java.net.SocketException">
+</exception>
+</constructor>
+<constructor name="DatagramPacket"
+ type="java.net.DatagramPacket"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="data" type="byte[]">
+</parameter>
+<parameter name="offset" type="int">
+</parameter>
+<parameter name="length" type="int">
+</parameter>
+<parameter name="sockAddr" type="java.net.SocketAddress">
+</parameter>
+<exception name="SocketException" type="java.net.SocketException">
+</exception>
+</constructor>
+<method name="getAddress"
+ return="java.net.InetAddress"
+ abstract="false"
+ native="false"
+ synchronized="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getData"
+ return="byte[]"
+ abstract="false"
+ native="false"
+ synchronized="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getLength"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getOffset"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getPort"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getSocketAddress"
+ return="java.net.SocketAddress"
+ abstract="false"
+ native="false"
+ synchronized="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="setAddress"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="addr" type="java.net.InetAddress">
+</parameter>
+</method>
+<method name="setData"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="buf" type="byte[]">
+</parameter>
+<parameter name="anOffset" type="int">
+</parameter>
+<parameter name="aLength" type="int">
+</parameter>
+</method>
+<method name="setData"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="buf" type="byte[]">
+</parameter>
+</method>
+<method name="setLength"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="len" type="int">
+</parameter>
+</method>
+<method name="setPort"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="aPort" type="int">
+</parameter>
+</method>
+<method name="setSocketAddress"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="sockAddr" type="java.net.SocketAddress">
+</parameter>
+</method>
+</class>
+<class name="DatagramSocket"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="DatagramSocket"
+ type="java.net.DatagramSocket"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="SocketException" type="java.net.SocketException">
+</exception>
+</constructor>
+<constructor name="DatagramSocket"
+ type="java.net.DatagramSocket"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="aPort" type="int">
+</parameter>
+<exception name="SocketException" type="java.net.SocketException">
+</exception>
+</constructor>
+<constructor name="DatagramSocket"
+ type="java.net.DatagramSocket"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="aPort" type="int">
+</parameter>
+<parameter name="addr" type="java.net.InetAddress">
+</parameter>
+<exception name="SocketException" type="java.net.SocketException">
+</exception>
+</constructor>
+<constructor name="DatagramSocket"
+ type="java.net.DatagramSocket"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="socketImpl" type="java.net.DatagramSocketImpl">
+</parameter>
+</constructor>
+<constructor name="DatagramSocket"
+ type="java.net.DatagramSocket"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="localAddr" type="java.net.SocketAddress">
+</parameter>
+<exception name="SocketException" type="java.net.SocketException">
+</exception>
+</constructor>
+<method name="bind"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="localAddr" type="java.net.SocketAddress">
+</parameter>
+<exception name="SocketException" type="java.net.SocketException">
+</exception>
+</method>
+<method name="close"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="connect"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="anAddress" type="java.net.InetAddress">
+</parameter>
+<parameter name="aPort" type="int">
+</parameter>
+</method>
+<method name="connect"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="remoteAddr" type="java.net.SocketAddress">
+</parameter>
+<exception name="SocketException" type="java.net.SocketException">
+</exception>
+</method>
+<method name="disconnect"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getBroadcast"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="SocketException" type="java.net.SocketException">
+</exception>
+</method>
+<method name="getChannel"
+ return="java.nio.channels.DatagramChannel"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getInetAddress"
+ return="java.net.InetAddress"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getLocalAddress"
+ return="java.net.InetAddress"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getLocalPort"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getLocalSocketAddress"
+ return="java.net.SocketAddress"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getPort"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getReceiveBufferSize"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="SocketException" type="java.net.SocketException">
+</exception>
+</method>
+<method name="getRemoteSocketAddress"
+ return="java.net.SocketAddress"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getReuseAddress"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="SocketException" type="java.net.SocketException">
+</exception>
+</method>
+<method name="getSendBufferSize"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="SocketException" type="java.net.SocketException">
+</exception>
+</method>
+<method name="getSoTimeout"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="SocketException" type="java.net.SocketException">
+</exception>
+</method>
+<method name="getTrafficClass"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="SocketException" type="java.net.SocketException">
+</exception>
+</method>
+<method name="isBound"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isClosed"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isConnected"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="receive"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="pack" type="java.net.DatagramPacket">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="send"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="pack" type="java.net.DatagramPacket">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="setBroadcast"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="broadcast" type="boolean">
+</parameter>
+<exception name="SocketException" type="java.net.SocketException">
+</exception>
+</method>
+<method name="setDatagramSocketImplFactory"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="true"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="fac" type="java.net.DatagramSocketImplFactory">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="setReceiveBufferSize"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="size" type="int">
+</parameter>
+<exception name="SocketException" type="java.net.SocketException">
+</exception>
+</method>
+<method name="setReuseAddress"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="reuse" type="boolean">
+</parameter>
+<exception name="SocketException" type="java.net.SocketException">
+</exception>
+</method>
+<method name="setSendBufferSize"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="size" type="int">
+</parameter>
+<exception name="SocketException" type="java.net.SocketException">
+</exception>
+</method>
+<method name="setSoTimeout"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="timeout" type="int">
+</parameter>
+<exception name="SocketException" type="java.net.SocketException">
+</exception>
+</method>
+<method name="setTrafficClass"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="value" type="int">
+</parameter>
+<exception name="SocketException" type="java.net.SocketException">
+</exception>
+</method>
+</class>
+<class name="DatagramSocketImpl"
+ extends="java.lang.Object"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="java.net.SocketOptions">
+</implements>
+<constructor name="DatagramSocketImpl"
+ type="java.net.DatagramSocketImpl"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<method name="bind"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="port" type="int">
+</parameter>
+<parameter name="addr" type="java.net.InetAddress">
+</parameter>
+<exception name="SocketException" type="java.net.SocketException">
+</exception>
+</method>
+<method name="close"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</method>
+<method name="connect"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="inetAddr" type="java.net.InetAddress">
+</parameter>
+<parameter name="port" type="int">
+</parameter>
+<exception name="SocketException" type="java.net.SocketException">
+</exception>
+</method>
+<method name="create"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<exception name="SocketException" type="java.net.SocketException">
+</exception>
+</method>
+<method name="disconnect"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</method>
+<method name="getFileDescriptor"
+ return="java.io.FileDescriptor"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</method>
+<method name="getLocalPort"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</method>
+<method name="getTTL"
+ return="byte"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="deprecated"
+ visibility="protected"
+>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="getTimeToLive"
+ return="int"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="join"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="addr" type="java.net.InetAddress">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="joinGroup"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="addr" type="java.net.SocketAddress">
+</parameter>
+<parameter name="netInterface" type="java.net.NetworkInterface">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="leave"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="addr" type="java.net.InetAddress">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="leaveGroup"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="addr" type="java.net.SocketAddress">
+</parameter>
+<parameter name="netInterface" type="java.net.NetworkInterface">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="peek"
+ return="int"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="sender" type="java.net.InetAddress">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="peekData"
+ return="int"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="pack" type="java.net.DatagramPacket">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="receive"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="pack" type="java.net.DatagramPacket">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="send"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="pack" type="java.net.DatagramPacket">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="setTTL"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="deprecated"
+ visibility="protected"
+>
+<parameter name="ttl" type="byte">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="setTimeToLive"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="ttl" type="int">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<field name="fd"
+ type="java.io.FileDescriptor"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</field>
+<field name="localPort"
+ type="int"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</field>
+</class>
+<interface name="DatagramSocketImplFactory"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="createDatagramSocketImpl"
+ return="java.net.DatagramSocketImpl"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+</interface>
+<interface name="FileNameMap"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="getContentTypeFor"
+ return="java.lang.String"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="fileName" type="java.lang.String">
+</parameter>
+</method>
+</interface>
+<class name="HttpRetryException"
+ extends="java.io.IOException"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="HttpRetryException"
+ type="java.net.HttpRetryException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="detail" type="java.lang.String">
+</parameter>
+<parameter name="code" type="int">
+</parameter>
+</constructor>
+<constructor name="HttpRetryException"
+ type="java.net.HttpRetryException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="detail" type="java.lang.String">
+</parameter>
+<parameter name="code" type="int">
+</parameter>
+<parameter name="location" type="java.lang.String">
+</parameter>
+</constructor>
+<method name="getLocation"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getReason"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="responseCode"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+</class>
+<class name="HttpURLConnection"
+ extends="java.net.URLConnection"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="HttpURLConnection"
+ type="java.net.HttpURLConnection"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="url" type="java.net.URL">
+</parameter>
+</constructor>
+<method name="disconnect"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getErrorStream"
+ return="java.io.InputStream"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getFollowRedirects"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getInstanceFollowRedirects"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getRequestMethod"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getResponseCode"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="getResponseMessage"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="setChunkedStreamingMode"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="chunklen" type="int">
+</parameter>
+</method>
+<method name="setFixedLengthStreamingMode"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="contentLength" type="int">
+</parameter>
+</method>
+<method name="setFollowRedirects"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="auto" type="boolean">
+</parameter>
+</method>
+<method name="setInstanceFollowRedirects"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="followRedirects" type="boolean">
+</parameter>
+</method>
+<method name="setRequestMethod"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="method" type="java.lang.String">
+</parameter>
+<exception name="ProtocolException" type="java.net.ProtocolException">
+</exception>
+</method>
+<method name="usingProxy"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<field name="HTTP_ACCEPTED"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="202"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="HTTP_BAD_GATEWAY"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="502"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="HTTP_BAD_METHOD"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="405"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="HTTP_BAD_REQUEST"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="400"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="HTTP_CLIENT_TIMEOUT"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="408"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="HTTP_CONFLICT"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="409"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="HTTP_CREATED"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="201"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="HTTP_ENTITY_TOO_LARGE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="413"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="HTTP_FORBIDDEN"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="403"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="HTTP_GATEWAY_TIMEOUT"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="504"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="HTTP_GONE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="410"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="HTTP_INTERNAL_ERROR"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="500"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="HTTP_LENGTH_REQUIRED"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="411"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="HTTP_MOVED_PERM"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="301"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="HTTP_MOVED_TEMP"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="302"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="HTTP_MULT_CHOICE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="300"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="HTTP_NOT_ACCEPTABLE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="406"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="HTTP_NOT_AUTHORITATIVE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="203"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="HTTP_NOT_FOUND"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="404"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="HTTP_NOT_IMPLEMENTED"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="501"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="HTTP_NOT_MODIFIED"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="304"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="HTTP_NO_CONTENT"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="204"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="HTTP_OK"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="200"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="HTTP_PARTIAL"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="206"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="HTTP_PAYMENT_REQUIRED"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="402"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="HTTP_PRECON_FAILED"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="412"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="HTTP_PROXY_AUTH"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="407"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="HTTP_REQ_TOO_LONG"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="414"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="HTTP_RESET"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="205"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="HTTP_SEE_OTHER"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="303"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="HTTP_SERVER_ERROR"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="500"
+ static="true"
+ final="true"
+ deprecated="deprecated"
+ visibility="public"
+>
+</field>
+<field name="HTTP_UNAUTHORIZED"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="401"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="HTTP_UNAVAILABLE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="503"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="HTTP_UNSUPPORTED_TYPE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="415"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="HTTP_USE_PROXY"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="305"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="HTTP_VERSION"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="505"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="chunkLength"
+ type="int"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</field>
+<field name="fixedContentLength"
+ type="int"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</field>
+<field name="instanceFollowRedirects"
+ type="boolean"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</field>
+<field name="method"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</field>
+<field name="responseCode"
+ type="int"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</field>
+<field name="responseMessage"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</field>
+</class>
+<class name="Inet4Address"
+ extends="java.net.InetAddress"
+ abstract="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</class>
+<class name="Inet6Address"
+ extends="java.net.InetAddress"
+ abstract="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="getByAddress"
+ return="java.net.Inet6Address"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="host" type="java.lang.String">
+</parameter>
+<parameter name="addr" type="byte[]">
+</parameter>
+<parameter name="scope_id" type="int">
+</parameter>
+<exception name="UnknownHostException" type="java.net.UnknownHostException">
+</exception>
+</method>
+<method name="getByAddress"
+ return="java.net.Inet6Address"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="host" type="java.lang.String">
+</parameter>
+<parameter name="addr" type="byte[]">
+</parameter>
+<parameter name="nif" type="java.net.NetworkInterface">
+</parameter>
+<exception name="UnknownHostException" type="java.net.UnknownHostException">
+</exception>
+</method>
+<method name="getScopeId"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getScopedInterface"
+ return="java.net.NetworkInterface"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isIPv4CompatibleAddress"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+</class>
+<class name="InetAddress"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="java.io.Serializable">
+</implements>
+<method name="getAddress"
+ return="byte[]"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getAllByName"
+ return="java.net.InetAddress[]"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="host" type="java.lang.String">
+</parameter>
+<exception name="UnknownHostException" type="java.net.UnknownHostException">
+</exception>
+</method>
+<method name="getByAddress"
+ return="java.net.InetAddress"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="ipAddress" type="byte[]">
+</parameter>
+<exception name="UnknownHostException" type="java.net.UnknownHostException">
+</exception>
+</method>
+<method name="getByAddress"
+ return="java.net.InetAddress"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="hostName" type="java.lang.String">
+</parameter>
+<parameter name="ipAddress" type="byte[]">
+</parameter>
+<exception name="UnknownHostException" type="java.net.UnknownHostException">
+</exception>
+</method>
+<method name="getByName"
+ return="java.net.InetAddress"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="host" type="java.lang.String">
+</parameter>
+<exception name="UnknownHostException" type="java.net.UnknownHostException">
+</exception>
+</method>
+<method name="getCanonicalHostName"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getHostAddress"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getHostName"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getLocalHost"
+ return="java.net.InetAddress"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="UnknownHostException" type="java.net.UnknownHostException">
+</exception>
+</method>
+<method name="isAnyLocalAddress"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isLinkLocalAddress"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isLoopbackAddress"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isMCGlobal"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isMCLinkLocal"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isMCNodeLocal"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isMCOrgLocal"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isMCSiteLocal"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isMulticastAddress"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isReachable"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="timeout" type="int">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="isReachable"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="netif" type="java.net.NetworkInterface">
+</parameter>
+<parameter name="ttl" type="int">
+</parameter>
+<parameter name="timeout" type="int">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="isSiteLocalAddress"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+</class>
+<class name="InetSocketAddress"
+ extends="java.net.SocketAddress"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="InetSocketAddress"
+ type="java.net.InetSocketAddress"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="port" type="int">
+</parameter>
+</constructor>
+<constructor name="InetSocketAddress"
+ type="java.net.InetSocketAddress"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="address" type="java.net.InetAddress">
+</parameter>
+<parameter name="port" type="int">
+</parameter>
+</constructor>
+<constructor name="InetSocketAddress"
+ type="java.net.InetSocketAddress"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="host" type="java.lang.String">
+</parameter>
+<parameter name="port" type="int">
+</parameter>
+</constructor>
+<method name="createUnresolved"
+ return="java.net.InetSocketAddress"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="host" type="java.lang.String">
+</parameter>
+<parameter name="port" type="int">
+</parameter>
+</method>
+<method name="equals"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="socketAddr" type="java.lang.Object">
+</parameter>
+</method>
+<method name="getAddress"
+ return="java.net.InetAddress"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getHostName"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getPort"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="hashCode"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isUnresolved"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+</class>
+<class name="JarURLConnection"
+ extends="java.net.URLConnection"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="JarURLConnection"
+ type="java.net.JarURLConnection"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="url" type="java.net.URL">
+</parameter>
+<exception name="MalformedURLException" type="java.net.MalformedURLException">
+</exception>
+</constructor>
+<method name="getAttributes"
+ return="java.util.jar.Attributes"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="getCertificates"
+ return="java.security.cert.Certificate[]"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="getEntryName"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getJarEntry"
+ return="java.util.jar.JarEntry"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="getJarFile"
+ return="java.util.jar.JarFile"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="getJarFileURL"
+ return="java.net.URL"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getMainAttributes"
+ return="java.util.jar.Attributes"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="getManifest"
+ return="java.util.jar.Manifest"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<field name="jarFileURLConnection"
+ type="java.net.URLConnection"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</field>
+</class>
+<class name="MalformedURLException"
+ extends="java.io.IOException"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="MalformedURLException"
+ type="java.net.MalformedURLException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<constructor name="MalformedURLException"
+ type="java.net.MalformedURLException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="detailMessage" type="java.lang.String">
+</parameter>
+</constructor>
+</class>
+<class name="MulticastSocket"
+ extends="java.net.DatagramSocket"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="MulticastSocket"
+ type="java.net.MulticastSocket"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</constructor>
+<constructor name="MulticastSocket"
+ type="java.net.MulticastSocket"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="aPort" type="int">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</constructor>
+<constructor name="MulticastSocket"
+ type="java.net.MulticastSocket"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="localAddr" type="java.net.SocketAddress">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</constructor>
+<method name="getInterface"
+ return="java.net.InetAddress"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="SocketException" type="java.net.SocketException">
+</exception>
+</method>
+<method name="getLoopbackMode"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="SocketException" type="java.net.SocketException">
+</exception>
+</method>
+<method name="getNetworkInterface"
+ return="java.net.NetworkInterface"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="SocketException" type="java.net.SocketException">
+</exception>
+</method>
+<method name="getTTL"
+ return="byte"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="deprecated"
+ visibility="public"
+>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="getTimeToLive"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="joinGroup"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="groupAddr" type="java.net.InetAddress">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="joinGroup"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="groupAddress" type="java.net.SocketAddress">
+</parameter>
+<parameter name="netInterface" type="java.net.NetworkInterface">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="leaveGroup"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="groupAddr" type="java.net.InetAddress">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="leaveGroup"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="groupAddress" type="java.net.SocketAddress">
+</parameter>
+<parameter name="netInterface" type="java.net.NetworkInterface">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="send"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="deprecated"
+ visibility="public"
+>
+<parameter name="pack" type="java.net.DatagramPacket">
+</parameter>
+<parameter name="ttl" type="byte">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="setInterface"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="addr" type="java.net.InetAddress">
+</parameter>
+<exception name="SocketException" type="java.net.SocketException">
+</exception>
+</method>
+<method name="setLoopbackMode"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="loop" type="boolean">
+</parameter>
+<exception name="SocketException" type="java.net.SocketException">
+</exception>
+</method>
+<method name="setNetworkInterface"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="netInterface" type="java.net.NetworkInterface">
+</parameter>
+<exception name="SocketException" type="java.net.SocketException">
+</exception>
+</method>
+<method name="setTTL"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="deprecated"
+ visibility="public"
+>
+<parameter name="ttl" type="byte">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="setTimeToLive"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="ttl" type="int">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+</class>
+<class name="NetPermission"
+ extends="java.security.BasicPermission"
+ abstract="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="NetPermission"
+ type="java.net.NetPermission"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+</constructor>
+<constructor name="NetPermission"
+ type="java.net.NetPermission"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+<parameter name="actions" type="java.lang.String">
+</parameter>
+</constructor>
+</class>
+<class name="NetworkInterface"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="getByInetAddress"
+ return="java.net.NetworkInterface"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="address" type="java.net.InetAddress">
+</parameter>
+<exception name="SocketException" type="java.net.SocketException">
+</exception>
+</method>
+<method name="getByName"
+ return="java.net.NetworkInterface"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="interfaceName" type="java.lang.String">
+</parameter>
+<exception name="SocketException" type="java.net.SocketException">
+</exception>
+</method>
+<method name="getDisplayName"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getInetAddresses"
+ return="java.util.Enumeration&lt;java.net.InetAddress&gt;"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getName"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getNetworkInterfaces"
+ return="java.util.Enumeration&lt;java.net.NetworkInterface&gt;"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="SocketException" type="java.net.SocketException">
+</exception>
+</method>
+</class>
+<class name="NoRouteToHostException"
+ extends="java.net.SocketException"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="NoRouteToHostException"
+ type="java.net.NoRouteToHostException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<constructor name="NoRouteToHostException"
+ type="java.net.NoRouteToHostException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="detailMessage" type="java.lang.String">
+</parameter>
+</constructor>
+</class>
+<class name="PasswordAuthentication"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="PasswordAuthentication"
+ type="java.net.PasswordAuthentication"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="userName" type="java.lang.String">
+</parameter>
+<parameter name="password" type="char[]">
+</parameter>
+</constructor>
+<method name="getPassword"
+ return="char[]"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getUserName"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+</class>
+<class name="PortUnreachableException"
+ extends="java.net.SocketException"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="PortUnreachableException"
+ type="java.net.PortUnreachableException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<constructor name="PortUnreachableException"
+ type="java.net.PortUnreachableException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="detailMessage" type="java.lang.String">
+</parameter>
+</constructor>
+</class>
+<class name="ProtocolException"
+ extends="java.io.IOException"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="ProtocolException"
+ type="java.net.ProtocolException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<constructor name="ProtocolException"
+ type="java.net.ProtocolException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="detailMessage" type="java.lang.String">
+</parameter>
+</constructor>
+</class>
+<class name="Proxy"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="Proxy"
+ type="java.net.Proxy"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="type" type="java.net.Proxy.Type">
+</parameter>
+<parameter name="sa" type="java.net.SocketAddress">
+</parameter>
+</constructor>
+<method name="address"
+ return="java.net.SocketAddress"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="equals"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="obj" type="java.lang.Object">
+</parameter>
+</method>
+<method name="hashCode"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="type"
+ return="java.net.Proxy.Type"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<field name="NO_PROXY"
+ type="java.net.Proxy"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<class name="Proxy.Type"
+ extends="java.lang.Enum"
+ abstract="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="valueOf"
+ return="java.net.Proxy.Type"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+</method>
+<method name="values"
+ return="java.net.Proxy.Type[]"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+</class>
+<class name="ProxySelector"
+ extends="java.lang.Object"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="ProxySelector"
+ type="java.net.ProxySelector"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<method name="connectFailed"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="uri" type="java.net.URI">
+</parameter>
+<parameter name="sa" type="java.net.SocketAddress">
+</parameter>
+<parameter name="ioe" type="java.io.IOException">
+</parameter>
+</method>
+<method name="getDefault"
+ return="java.net.ProxySelector"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="select"
+ return="java.util.List&lt;java.net.Proxy&gt;"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="uri" type="java.net.URI">
+</parameter>
+</method>
+<method name="setDefault"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="selector" type="java.net.ProxySelector">
+</parameter>
+</method>
+</class>
+<class name="ResponseCache"
+ extends="java.lang.Object"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="ResponseCache"
+ type="java.net.ResponseCache"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<method name="get"
+ return="java.net.CacheResponse"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="uri" type="java.net.URI">
+</parameter>
+<parameter name="rqstMethod" type="java.lang.String">
+</parameter>
+<parameter name="rqstHeaders" type="java.util.Map&lt;java.lang.String, java.util.List&lt;java.lang.String&gt;&gt;">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="getDefault"
+ return="java.net.ResponseCache"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="put"
+ return="java.net.CacheRequest"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="uri" type="java.net.URI">
+</parameter>
+<parameter name="conn" type="java.net.URLConnection">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="setDefault"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="responseCache" type="java.net.ResponseCache">
+</parameter>
+</method>
+</class>
+<class name="SecureCacheResponse"
+ extends="java.net.CacheResponse"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="SecureCacheResponse"
+ type="java.net.SecureCacheResponse"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<method name="getCipherSuite"
+ return="java.lang.String"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getLocalCertificateChain"
+ return="java.util.List&lt;java.security.cert.Certificate&gt;"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getLocalPrincipal"
+ return="java.security.Principal"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getPeerPrincipal"
+ return="java.security.Principal"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="SSLPeerUnverifiedException" type="javax.net.ssl.SSLPeerUnverifiedException">
+</exception>
+</method>
+<method name="getServerCertificateChain"
+ return="java.util.List&lt;java.security.cert.Certificate&gt;"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="SSLPeerUnverifiedException" type="javax.net.ssl.SSLPeerUnverifiedException">
+</exception>
+</method>
+</class>
+<class name="ServerSocket"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="ServerSocket"
+ type="java.net.ServerSocket"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</constructor>
+<constructor name="ServerSocket"
+ type="java.net.ServerSocket"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="aport" type="int">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</constructor>
+<constructor name="ServerSocket"
+ type="java.net.ServerSocket"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="aport" type="int">
+</parameter>
+<parameter name="backlog" type="int">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</constructor>
+<constructor name="ServerSocket"
+ type="java.net.ServerSocket"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="aport" type="int">
+</parameter>
+<parameter name="backlog" type="int">
+</parameter>
+<parameter name="localAddr" type="java.net.InetAddress">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</constructor>
+<method name="accept"
+ return="java.net.Socket"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="bind"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="localAddr" type="java.net.SocketAddress">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="bind"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="localAddr" type="java.net.SocketAddress">
+</parameter>
+<parameter name="backlog" type="int">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="close"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="getChannel"
+ return="java.nio.channels.ServerSocketChannel"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getInetAddress"
+ return="java.net.InetAddress"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getLocalPort"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getLocalSocketAddress"
+ return="java.net.SocketAddress"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getReceiveBufferSize"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="SocketException" type="java.net.SocketException">
+</exception>
+</method>
+<method name="getReuseAddress"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="SocketException" type="java.net.SocketException">
+</exception>
+</method>
+<method name="getSoTimeout"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="implAccept"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="aSocket" type="java.net.Socket">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="isBound"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isClosed"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="setPerformancePreferences"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="connectionTime" type="int">
+</parameter>
+<parameter name="latency" type="int">
+</parameter>
+<parameter name="bandwidth" type="int">
+</parameter>
+</method>
+<method name="setReceiveBufferSize"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="size" type="int">
+</parameter>
+<exception name="SocketException" type="java.net.SocketException">
+</exception>
+</method>
+<method name="setReuseAddress"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="reuse" type="boolean">
+</parameter>
+<exception name="SocketException" type="java.net.SocketException">
+</exception>
+</method>
+<method name="setSoTimeout"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="timeout" type="int">
+</parameter>
+<exception name="SocketException" type="java.net.SocketException">
+</exception>
+</method>
+<method name="setSocketFactory"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="true"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="aFactory" type="java.net.SocketImplFactory">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+</class>
+<class name="Socket"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="Socket"
+ type="java.net.Socket"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<constructor name="Socket"
+ type="java.net.Socket"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="proxy" type="java.net.Proxy">
+</parameter>
+</constructor>
+<constructor name="Socket"
+ type="java.net.Socket"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="dstName" type="java.lang.String">
+</parameter>
+<parameter name="dstPort" type="int">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+<exception name="UnknownHostException" type="java.net.UnknownHostException">
+</exception>
+</constructor>
+<constructor name="Socket"
+ type="java.net.Socket"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="dstName" type="java.lang.String">
+</parameter>
+<parameter name="dstPort" type="int">
+</parameter>
+<parameter name="localAddress" type="java.net.InetAddress">
+</parameter>
+<parameter name="localPort" type="int">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</constructor>
+<constructor name="Socket"
+ type="java.net.Socket"
+ static="false"
+ final="false"
+ deprecated="deprecated"
+ visibility="public"
+>
+<parameter name="hostName" type="java.lang.String">
+</parameter>
+<parameter name="port" type="int">
+</parameter>
+<parameter name="streaming" type="boolean">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</constructor>
+<constructor name="Socket"
+ type="java.net.Socket"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="dstAddress" type="java.net.InetAddress">
+</parameter>
+<parameter name="dstPort" type="int">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</constructor>
+<constructor name="Socket"
+ type="java.net.Socket"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="dstAddress" type="java.net.InetAddress">
+</parameter>
+<parameter name="dstPort" type="int">
+</parameter>
+<parameter name="localAddress" type="java.net.InetAddress">
+</parameter>
+<parameter name="localPort" type="int">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</constructor>
+<constructor name="Socket"
+ type="java.net.Socket"
+ static="false"
+ final="false"
+ deprecated="deprecated"
+ visibility="public"
+>
+<parameter name="addr" type="java.net.InetAddress">
+</parameter>
+<parameter name="port" type="int">
+</parameter>
+<parameter name="streaming" type="boolean">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</constructor>
+<constructor name="Socket"
+ type="java.net.Socket"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="anImpl" type="java.net.SocketImpl">
+</parameter>
+<exception name="SocketException" type="java.net.SocketException">
+</exception>
+</constructor>
+<method name="bind"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="localAddr" type="java.net.SocketAddress">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="close"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="connect"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="remoteAddr" type="java.net.SocketAddress">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="connect"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="remoteAddr" type="java.net.SocketAddress">
+</parameter>
+<parameter name="timeout" type="int">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="getChannel"
+ return="java.nio.channels.SocketChannel"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getInetAddress"
+ return="java.net.InetAddress"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getInputStream"
+ return="java.io.InputStream"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="getKeepAlive"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="SocketException" type="java.net.SocketException">
+</exception>
+</method>
+<method name="getLocalAddress"
+ return="java.net.InetAddress"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getLocalPort"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getLocalSocketAddress"
+ return="java.net.SocketAddress"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getOOBInline"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="SocketException" type="java.net.SocketException">
+</exception>
+</method>
+<method name="getOutputStream"
+ return="java.io.OutputStream"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="getPort"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getReceiveBufferSize"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="SocketException" type="java.net.SocketException">
+</exception>
+</method>
+<method name="getRemoteSocketAddress"
+ return="java.net.SocketAddress"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getReuseAddress"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="SocketException" type="java.net.SocketException">
+</exception>
+</method>
+<method name="getSendBufferSize"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="SocketException" type="java.net.SocketException">
+</exception>
+</method>
+<method name="getSoLinger"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="SocketException" type="java.net.SocketException">
+</exception>
+</method>
+<method name="getSoTimeout"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="SocketException" type="java.net.SocketException">
+</exception>
+</method>
+<method name="getTcpNoDelay"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="SocketException" type="java.net.SocketException">
+</exception>
+</method>
+<method name="getTrafficClass"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="SocketException" type="java.net.SocketException">
+</exception>
+</method>
+<method name="isBound"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isClosed"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isConnected"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isInputShutdown"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isOutputShutdown"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="sendUrgentData"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="value" type="int">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="setKeepAlive"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="value" type="boolean">
+</parameter>
+<exception name="SocketException" type="java.net.SocketException">
+</exception>
+</method>
+<method name="setOOBInline"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="oobinline" type="boolean">
+</parameter>
+<exception name="SocketException" type="java.net.SocketException">
+</exception>
+</method>
+<method name="setPerformancePreferences"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="connectionTime" type="int">
+</parameter>
+<parameter name="latency" type="int">
+</parameter>
+<parameter name="bandwidth" type="int">
+</parameter>
+</method>
+<method name="setReceiveBufferSize"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="size" type="int">
+</parameter>
+<exception name="SocketException" type="java.net.SocketException">
+</exception>
+</method>
+<method name="setReuseAddress"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="reuse" type="boolean">
+</parameter>
+<exception name="SocketException" type="java.net.SocketException">
+</exception>
+</method>
+<method name="setSendBufferSize"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="size" type="int">
+</parameter>
+<exception name="SocketException" type="java.net.SocketException">
+</exception>
+</method>
+<method name="setSoLinger"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="on" type="boolean">
+</parameter>
+<parameter name="timeout" type="int">
+</parameter>
+<exception name="SocketException" type="java.net.SocketException">
+</exception>
+</method>
+<method name="setSoTimeout"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="timeout" type="int">
+</parameter>
+<exception name="SocketException" type="java.net.SocketException">
+</exception>
+</method>
+<method name="setSocketImplFactory"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="true"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="fac" type="java.net.SocketImplFactory">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="setTcpNoDelay"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="on" type="boolean">
+</parameter>
+<exception name="SocketException" type="java.net.SocketException">
+</exception>
+</method>
+<method name="setTrafficClass"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="value" type="int">
+</parameter>
+<exception name="SocketException" type="java.net.SocketException">
+</exception>
+</method>
+<method name="shutdownInput"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="shutdownOutput"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+</class>
+<class name="SocketAddress"
+ extends="java.lang.Object"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="java.io.Serializable">
+</implements>
+<constructor name="SocketAddress"
+ type="java.net.SocketAddress"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+</class>
+<class name="SocketException"
+ extends="java.io.IOException"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="SocketException"
+ type="java.net.SocketException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<constructor name="SocketException"
+ type="java.net.SocketException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="detailMessage" type="java.lang.String">
+</parameter>
+</constructor>
+</class>
+<class name="SocketImpl"
+ extends="java.lang.Object"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="java.net.SocketOptions">
+</implements>
+<constructor name="SocketImpl"
+ type="java.net.SocketImpl"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<method name="accept"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="newSocket" type="java.net.SocketImpl">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="available"
+ return="int"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="bind"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="address" type="java.net.InetAddress">
+</parameter>
+<parameter name="port" type="int">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="close"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="connect"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="host" type="java.lang.String">
+</parameter>
+<parameter name="port" type="int">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="connect"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="address" type="java.net.InetAddress">
+</parameter>
+<parameter name="port" type="int">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="connect"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="remoteAddr" type="java.net.SocketAddress">
+</parameter>
+<parameter name="timeout" type="int">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="create"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="isStreaming" type="boolean">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="getFileDescriptor"
+ return="java.io.FileDescriptor"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</method>
+<method name="getInetAddress"
+ return="java.net.InetAddress"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</method>
+<method name="getInputStream"
+ return="java.io.InputStream"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="getLocalPort"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</method>
+<method name="getOption"
+ return="java.lang.Object"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="optID" type="int">
+</parameter>
+<exception name="SocketException" type="java.net.SocketException">
+</exception>
+</method>
+<method name="getOutputStream"
+ return="java.io.OutputStream"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="getPort"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</method>
+<method name="listen"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="backlog" type="int">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="sendUrgentData"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="value" type="int">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="setOption"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="optID" type="int">
+</parameter>
+<parameter name="val" type="java.lang.Object">
+</parameter>
+<exception name="SocketException" type="java.net.SocketException">
+</exception>
+</method>
+<method name="setPerformancePreferences"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="connectionTime" type="int">
+</parameter>
+<parameter name="latency" type="int">
+</parameter>
+<parameter name="bandwidth" type="int">
+</parameter>
+</method>
+<method name="shutdownInput"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="shutdownOutput"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="supportsUrgentData"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</method>
+<field name="address"
+ type="java.net.InetAddress"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</field>
+<field name="fd"
+ type="java.io.FileDescriptor"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</field>
+<field name="localport"
+ type="int"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</field>
+<field name="port"
+ type="int"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</field>
+</class>
+<interface name="SocketImplFactory"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="createSocketImpl"
+ return="java.net.SocketImpl"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+</interface>
+<interface name="SocketOptions"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="getOption"
+ return="java.lang.Object"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="optID" type="int">
+</parameter>
+<exception name="SocketException" type="java.net.SocketException">
+</exception>
+</method>
+<method name="setOption"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="optID" type="int">
+</parameter>
+<parameter name="val" type="java.lang.Object">
+</parameter>
+<exception name="SocketException" type="java.net.SocketException">
+</exception>
+</method>
+<field name="IP_MULTICAST_IF"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="IP_MULTICAST_IF2"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="31"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="IP_MULTICAST_LOOP"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="18"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="IP_TOS"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="3"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="SO_BINDADDR"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="15"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="SO_BROADCAST"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="32"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="SO_KEEPALIVE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="8"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="SO_LINGER"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="128"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="SO_OOBINLINE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="4099"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="SO_RCVBUF"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="4098"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="SO_REUSEADDR"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="4"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="SO_SNDBUF"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="4097"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="SO_TIMEOUT"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="4102"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TCP_NODELAY"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</interface>
+<class name="SocketPermission"
+ extends="java.security.Permission"
+ abstract="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="java.io.Serializable">
+</implements>
+<constructor name="SocketPermission"
+ type="java.net.SocketPermission"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="host" type="java.lang.String">
+</parameter>
+<parameter name="action" type="java.lang.String">
+</parameter>
+</constructor>
+<method name="equals"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="other" type="java.lang.Object">
+</parameter>
+</method>
+<method name="getActions"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="hashCode"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="implies"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="p" type="java.security.Permission">
+</parameter>
+</method>
+</class>
+<class name="SocketTimeoutException"
+ extends="java.io.InterruptedIOException"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="SocketTimeoutException"
+ type="java.net.SocketTimeoutException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<constructor name="SocketTimeoutException"
+ type="java.net.SocketTimeoutException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="detailMessage" type="java.lang.String">
+</parameter>
+</constructor>
+</class>
+<class name="URI"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="java.lang.Comparable">
+</implements>
+<implements name="java.io.Serializable">
+</implements>
+<constructor name="URI"
+ type="java.net.URI"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="uri" type="java.lang.String">
+</parameter>
+<exception name="URISyntaxException" type="java.net.URISyntaxException">
+</exception>
+</constructor>
+<constructor name="URI"
+ type="java.net.URI"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="scheme" type="java.lang.String">
+</parameter>
+<parameter name="ssp" type="java.lang.String">
+</parameter>
+<parameter name="frag" type="java.lang.String">
+</parameter>
+<exception name="URISyntaxException" type="java.net.URISyntaxException">
+</exception>
+</constructor>
+<constructor name="URI"
+ type="java.net.URI"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="scheme" type="java.lang.String">
+</parameter>
+<parameter name="userinfo" type="java.lang.String">
+</parameter>
+<parameter name="host" type="java.lang.String">
+</parameter>
+<parameter name="port" type="int">
+</parameter>
+<parameter name="path" type="java.lang.String">
+</parameter>
+<parameter name="query" type="java.lang.String">
+</parameter>
+<parameter name="fragment" type="java.lang.String">
+</parameter>
+<exception name="URISyntaxException" type="java.net.URISyntaxException">
+</exception>
+</constructor>
+<constructor name="URI"
+ type="java.net.URI"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="scheme" type="java.lang.String">
+</parameter>
+<parameter name="host" type="java.lang.String">
+</parameter>
+<parameter name="path" type="java.lang.String">
+</parameter>
+<parameter name="fragment" type="java.lang.String">
+</parameter>
+<exception name="URISyntaxException" type="java.net.URISyntaxException">
+</exception>
+</constructor>
+<constructor name="URI"
+ type="java.net.URI"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="scheme" type="java.lang.String">
+</parameter>
+<parameter name="authority" type="java.lang.String">
+</parameter>
+<parameter name="path" type="java.lang.String">
+</parameter>
+<parameter name="query" type="java.lang.String">
+</parameter>
+<parameter name="fragment" type="java.lang.String">
+</parameter>
+<exception name="URISyntaxException" type="java.net.URISyntaxException">
+</exception>
+</constructor>
+<method name="compareTo"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="uri" type="java.net.URI">
+</parameter>
+</method>
+<method name="create"
+ return="java.net.URI"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="uri" type="java.lang.String">
+</parameter>
+</method>
+<method name="getAuthority"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getFragment"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getHost"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getPath"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getPort"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getQuery"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getRawAuthority"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getRawFragment"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getRawPath"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getRawQuery"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getRawSchemeSpecificPart"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getRawUserInfo"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getScheme"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getSchemeSpecificPart"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getUserInfo"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isAbsolute"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isOpaque"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="normalize"
+ return="java.net.URI"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="parseServerAuthority"
+ return="java.net.URI"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="URISyntaxException" type="java.net.URISyntaxException">
+</exception>
+</method>
+<method name="relativize"
+ return="java.net.URI"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="relative" type="java.net.URI">
+</parameter>
+</method>
+<method name="resolve"
+ return="java.net.URI"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="relative" type="java.net.URI">
+</parameter>
+</method>
+<method name="resolve"
+ return="java.net.URI"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="relative" type="java.lang.String">
+</parameter>
+</method>
+<method name="toASCIIString"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="toURL"
+ return="java.net.URL"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="MalformedURLException" type="java.net.MalformedURLException">
+</exception>
+</method>
+</class>
+<class name="URISyntaxException"
+ extends="java.lang.Exception"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="URISyntaxException"
+ type="java.net.URISyntaxException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="input" type="java.lang.String">
+</parameter>
+<parameter name="reason" type="java.lang.String">
+</parameter>
+<parameter name="index" type="int">
+</parameter>
+</constructor>
+<constructor name="URISyntaxException"
+ type="java.net.URISyntaxException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="input" type="java.lang.String">
+</parameter>
+<parameter name="reason" type="java.lang.String">
+</parameter>
+</constructor>
+<method name="getIndex"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getInput"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getReason"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+</class>
+<class name="URL"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="java.io.Serializable">
+</implements>
+<constructor name="URL"
+ type="java.net.URL"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="spec" type="java.lang.String">
+</parameter>
+<exception name="MalformedURLException" type="java.net.MalformedURLException">
+</exception>
+</constructor>
+<constructor name="URL"
+ type="java.net.URL"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="context" type="java.net.URL">
+</parameter>
+<parameter name="spec" type="java.lang.String">
+</parameter>
+<exception name="MalformedURLException" type="java.net.MalformedURLException">
+</exception>
+</constructor>
+<constructor name="URL"
+ type="java.net.URL"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="context" type="java.net.URL">
+</parameter>
+<parameter name="spec" type="java.lang.String">
+</parameter>
+<parameter name="handler" type="java.net.URLStreamHandler">
+</parameter>
+<exception name="MalformedURLException" type="java.net.MalformedURLException">
+</exception>
+</constructor>
+<constructor name="URL"
+ type="java.net.URL"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="protocol" type="java.lang.String">
+</parameter>
+<parameter name="host" type="java.lang.String">
+</parameter>
+<parameter name="file" type="java.lang.String">
+</parameter>
+<exception name="MalformedURLException" type="java.net.MalformedURLException">
+</exception>
+</constructor>
+<constructor name="URL"
+ type="java.net.URL"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="protocol" type="java.lang.String">
+</parameter>
+<parameter name="host" type="java.lang.String">
+</parameter>
+<parameter name="port" type="int">
+</parameter>
+<parameter name="file" type="java.lang.String">
+</parameter>
+<exception name="MalformedURLException" type="java.net.MalformedURLException">
+</exception>
+</constructor>
+<constructor name="URL"
+ type="java.net.URL"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="protocol" type="java.lang.String">
+</parameter>
+<parameter name="host" type="java.lang.String">
+</parameter>
+<parameter name="port" type="int">
+</parameter>
+<parameter name="file" type="java.lang.String">
+</parameter>
+<parameter name="handler" type="java.net.URLStreamHandler">
+</parameter>
+<exception name="MalformedURLException" type="java.net.MalformedURLException">
+</exception>
+</constructor>
+<method name="getAuthority"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getContent"
+ return="java.lang.Object"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="getContent"
+ return="java.lang.Object"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="types" type="java.lang.Class[]">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="getDefaultPort"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getFile"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getHost"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getPath"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getPort"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getProtocol"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getQuery"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getRef"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getUserInfo"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="openConnection"
+ return="java.net.URLConnection"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="openConnection"
+ return="java.net.URLConnection"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="proxy" type="java.net.Proxy">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="openStream"
+ return="java.io.InputStream"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="sameFile"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="otherURL" type="java.net.URL">
+</parameter>
+</method>
+<method name="set"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="protocol" type="java.lang.String">
+</parameter>
+<parameter name="host" type="java.lang.String">
+</parameter>
+<parameter name="port" type="int">
+</parameter>
+<parameter name="file" type="java.lang.String">
+</parameter>
+<parameter name="ref" type="java.lang.String">
+</parameter>
+</method>
+<method name="set"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="protocol" type="java.lang.String">
+</parameter>
+<parameter name="host" type="java.lang.String">
+</parameter>
+<parameter name="port" type="int">
+</parameter>
+<parameter name="authority" type="java.lang.String">
+</parameter>
+<parameter name="userInfo" type="java.lang.String">
+</parameter>
+<parameter name="path" type="java.lang.String">
+</parameter>
+<parameter name="query" type="java.lang.String">
+</parameter>
+<parameter name="ref" type="java.lang.String">
+</parameter>
+</method>
+<method name="setURLStreamHandlerFactory"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="true"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="streamFactory" type="java.net.URLStreamHandlerFactory">
+</parameter>
+</method>
+<method name="toExternalForm"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="toURI"
+ return="java.net.URI"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="URISyntaxException" type="java.net.URISyntaxException">
+</exception>
+</method>
+</class>
+<class name="URLClassLoader"
+ extends="java.security.SecureClassLoader"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="URLClassLoader"
+ type="java.net.URLClassLoader"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="urls" type="java.net.URL[]">
+</parameter>
+</constructor>
+<constructor name="URLClassLoader"
+ type="java.net.URLClassLoader"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="urls" type="java.net.URL[]">
+</parameter>
+<parameter name="parent" type="java.lang.ClassLoader">
+</parameter>
+</constructor>
+<constructor name="URLClassLoader"
+ type="java.net.URLClassLoader"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="searchUrls" type="java.net.URL[]">
+</parameter>
+<parameter name="parent" type="java.lang.ClassLoader">
+</parameter>
+<parameter name="factory" type="java.net.URLStreamHandlerFactory">
+</parameter>
+</constructor>
+<method name="addURL"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="url" type="java.net.URL">
+</parameter>
+</method>
+<method name="definePackage"
+ return="java.lang.Package"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="packageName" type="java.lang.String">
+</parameter>
+<parameter name="manifest" type="java.util.jar.Manifest">
+</parameter>
+<parameter name="url" type="java.net.URL">
+</parameter>
+<exception name="IllegalArgumentException" type="java.lang.IllegalArgumentException">
+</exception>
+</method>
+<method name="findResource"
+ return="java.net.URL"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+</method>
+<method name="findResources"
+ return="java.util.Enumeration&lt;java.net.URL&gt;"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="getURLs"
+ return="java.net.URL[]"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="newInstance"
+ return="java.net.URLClassLoader"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="urls" type="java.net.URL[]">
+</parameter>
+</method>
+<method name="newInstance"
+ return="java.net.URLClassLoader"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="urls" type="java.net.URL[]">
+</parameter>
+<parameter name="parentCl" type="java.lang.ClassLoader">
+</parameter>
+</method>
+</class>
+<class name="URLConnection"
+ extends="java.lang.Object"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="URLConnection"
+ type="java.net.URLConnection"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="url" type="java.net.URL">
+</parameter>
+</constructor>
+<method name="addRequestProperty"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="field" type="java.lang.String">
+</parameter>
+<parameter name="newValue" type="java.lang.String">
+</parameter>
+</method>
+<method name="connect"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="getAllowUserInteraction"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getConnectTimeout"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getContent"
+ return="java.lang.Object"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="getContent"
+ return="java.lang.Object"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="types" type="java.lang.Class[]">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="getContentEncoding"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getContentLength"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getContentType"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getDate"
+ return="long"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getDefaultAllowUserInteraction"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getDefaultRequestProperty"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="deprecated"
+ visibility="public"
+>
+<parameter name="field" type="java.lang.String">
+</parameter>
+</method>
+<method name="getDefaultUseCaches"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getDoInput"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getDoOutput"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getExpiration"
+ return="long"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getFileNameMap"
+ return="java.net.FileNameMap"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getHeaderField"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="pos" type="int">
+</parameter>
+</method>
+<method name="getHeaderField"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="key" type="java.lang.String">
+</parameter>
+</method>
+<method name="getHeaderFieldDate"
+ return="long"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="field" type="java.lang.String">
+</parameter>
+<parameter name="defaultValue" type="long">
+</parameter>
+</method>
+<method name="getHeaderFieldInt"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="field" type="java.lang.String">
+</parameter>
+<parameter name="defaultValue" type="int">
+</parameter>
+</method>
+<method name="getHeaderFieldKey"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="posn" type="int">
+</parameter>
+</method>
+<method name="getHeaderFields"
+ return="java.util.Map&lt;java.lang.String, java.util.List&lt;java.lang.String&gt;&gt;"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getIfModifiedSince"
+ return="long"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getInputStream"
+ return="java.io.InputStream"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="getLastModified"
+ return="long"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getOutputStream"
+ return="java.io.OutputStream"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="getPermission"
+ return="java.security.Permission"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="getReadTimeout"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getRequestProperties"
+ return="java.util.Map&lt;java.lang.String, java.util.List&lt;java.lang.String&gt;&gt;"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getRequestProperty"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="field" type="java.lang.String">
+</parameter>
+</method>
+<method name="getURL"
+ return="java.net.URL"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getUseCaches"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="guessContentTypeFromName"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="url" type="java.lang.String">
+</parameter>
+</method>
+<method name="guessContentTypeFromStream"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="is" type="java.io.InputStream">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="setAllowUserInteraction"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="newValue" type="boolean">
+</parameter>
+</method>
+<method name="setConnectTimeout"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="timeout" type="int">
+</parameter>
+</method>
+<method name="setContentHandlerFactory"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="true"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="contentFactory" type="java.net.ContentHandlerFactory">
+</parameter>
+</method>
+<method name="setDefaultAllowUserInteraction"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="allows" type="boolean">
+</parameter>
+</method>
+<method name="setDefaultRequestProperty"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="deprecated"
+ visibility="public"
+>
+<parameter name="field" type="java.lang.String">
+</parameter>
+<parameter name="value" type="java.lang.String">
+</parameter>
+</method>
+<method name="setDefaultUseCaches"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="newValue" type="boolean">
+</parameter>
+</method>
+<method name="setDoInput"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="newValue" type="boolean">
+</parameter>
+</method>
+<method name="setDoOutput"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="newValue" type="boolean">
+</parameter>
+</method>
+<method name="setFileNameMap"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="map" type="java.net.FileNameMap">
+</parameter>
+</method>
+<method name="setIfModifiedSince"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="newValue" type="long">
+</parameter>
+</method>
+<method name="setReadTimeout"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="timeout" type="int">
+</parameter>
+</method>
+<method name="setRequestProperty"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="field" type="java.lang.String">
+</parameter>
+<parameter name="newValue" type="java.lang.String">
+</parameter>
+</method>
+<method name="setUseCaches"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="newValue" type="boolean">
+</parameter>
+</method>
+<field name="allowUserInteraction"
+ type="boolean"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</field>
+<field name="connected"
+ type="boolean"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</field>
+<field name="doInput"
+ type="boolean"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</field>
+<field name="doOutput"
+ type="boolean"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</field>
+<field name="ifModifiedSince"
+ type="long"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</field>
+<field name="url"
+ type="java.net.URL"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</field>
+<field name="useCaches"
+ type="boolean"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</field>
+</class>
+<class name="URLDecoder"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="URLDecoder"
+ type="java.net.URLDecoder"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<method name="decode"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="deprecated"
+ visibility="public"
+>
+<parameter name="s" type="java.lang.String">
+</parameter>
+</method>
+<method name="decode"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="s" type="java.lang.String">
+</parameter>
+<parameter name="enc" type="java.lang.String">
+</parameter>
+<exception name="UnsupportedEncodingException" type="java.io.UnsupportedEncodingException">
+</exception>
+</method>
+</class>
+<class name="URLEncoder"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="encode"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="deprecated"
+ visibility="public"
+>
+<parameter name="s" type="java.lang.String">
+</parameter>
+</method>
+<method name="encode"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="s" type="java.lang.String">
+</parameter>
+<parameter name="enc" type="java.lang.String">
+</parameter>
+<exception name="UnsupportedEncodingException" type="java.io.UnsupportedEncodingException">
+</exception>
+</method>
+</class>
+<class name="URLStreamHandler"
+ extends="java.lang.Object"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="URLStreamHandler"
+ type="java.net.URLStreamHandler"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<method name="equals"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="url1" type="java.net.URL">
+</parameter>
+<parameter name="url2" type="java.net.URL">
+</parameter>
+</method>
+<method name="getDefaultPort"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</method>
+<method name="getHostAddress"
+ return="java.net.InetAddress"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="url" type="java.net.URL">
+</parameter>
+</method>
+<method name="hashCode"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="url" type="java.net.URL">
+</parameter>
+</method>
+<method name="hostsEqual"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="url1" type="java.net.URL">
+</parameter>
+<parameter name="url2" type="java.net.URL">
+</parameter>
+</method>
+<method name="openConnection"
+ return="java.net.URLConnection"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="u" type="java.net.URL">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="openConnection"
+ return="java.net.URLConnection"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="u" type="java.net.URL">
+</parameter>
+<parameter name="proxy" type="java.net.Proxy">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="parseURL"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="u" type="java.net.URL">
+</parameter>
+<parameter name="str" type="java.lang.String">
+</parameter>
+<parameter name="start" type="int">
+</parameter>
+<parameter name="end" type="int">
+</parameter>
+</method>
+<method name="sameFile"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="url1" type="java.net.URL">
+</parameter>
+<parameter name="url2" type="java.net.URL">
+</parameter>
+</method>
+<method name="setURL"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="deprecated"
+ visibility="protected"
+>
+<parameter name="u" type="java.net.URL">
+</parameter>
+<parameter name="protocol" type="java.lang.String">
+</parameter>
+<parameter name="host" type="java.lang.String">
+</parameter>
+<parameter name="port" type="int">
+</parameter>
+<parameter name="file" type="java.lang.String">
+</parameter>
+<parameter name="ref" type="java.lang.String">
+</parameter>
+</method>
+<method name="setURL"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="u" type="java.net.URL">
+</parameter>
+<parameter name="protocol" type="java.lang.String">
+</parameter>
+<parameter name="host" type="java.lang.String">
+</parameter>
+<parameter name="port" type="int">
+</parameter>
+<parameter name="authority" type="java.lang.String">
+</parameter>
+<parameter name="userInfo" type="java.lang.String">
+</parameter>
+<parameter name="file" type="java.lang.String">
+</parameter>
+<parameter name="query" type="java.lang.String">
+</parameter>
+<parameter name="ref" type="java.lang.String">
+</parameter>
+</method>
+<method name="toExternalForm"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="url" type="java.net.URL">
+</parameter>
+</method>
+</class>
+<interface name="URLStreamHandlerFactory"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="createURLStreamHandler"
+ return="java.net.URLStreamHandler"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="protocol" type="java.lang.String">
+</parameter>
+</method>
+</interface>
+<class name="UnknownHostException"
+ extends="java.io.IOException"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="UnknownHostException"
+ type="java.net.UnknownHostException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<constructor name="UnknownHostException"
+ type="java.net.UnknownHostException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="detailMessage" type="java.lang.String">
+</parameter>
+</constructor>
+</class>
+<class name="UnknownServiceException"
+ extends="java.io.IOException"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="UnknownServiceException"
+ type="java.net.UnknownServiceException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<constructor name="UnknownServiceException"
+ type="java.net.UnknownServiceException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="detailMessage" type="java.lang.String">
+</parameter>
+</constructor>
+</class>
+</package>
+<package name="java.nio"
+>
+<class name="Buffer"
+ extends="java.lang.Object"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="capacity"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="clear"
+ return="java.nio.Buffer"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="flip"
+ return="java.nio.Buffer"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="hasRemaining"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isReadOnly"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="limit"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="limit"
+ return="java.nio.Buffer"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="newLimit" type="int">
+</parameter>
+</method>
+<method name="mark"
+ return="java.nio.Buffer"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="position"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="position"
+ return="java.nio.Buffer"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="newPosition" type="int">
+</parameter>
+</method>
+<method name="remaining"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="reset"
+ return="java.nio.Buffer"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="rewind"
+ return="java.nio.Buffer"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+</class>
+<class name="BufferOverflowException"
+ extends="java.lang.RuntimeException"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="BufferOverflowException"
+ type="java.nio.BufferOverflowException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+</class>
+<class name="BufferUnderflowException"
+ extends="java.lang.RuntimeException"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="BufferUnderflowException"
+ type="java.nio.BufferUnderflowException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+</class>
+<class name="ByteBuffer"
+ extends="java.nio.Buffer"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="java.lang.Comparable">
+</implements>
+<method name="allocate"
+ return="java.nio.ByteBuffer"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="capacity" type="int">
+</parameter>
+</method>
+<method name="allocateDirect"
+ return="java.nio.ByteBuffer"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="capacity" type="int">
+</parameter>
+</method>
+<method name="array"
+ return="byte[]"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="arrayOffset"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="asCharBuffer"
+ return="java.nio.CharBuffer"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="asDoubleBuffer"
+ return="java.nio.DoubleBuffer"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="asFloatBuffer"
+ return="java.nio.FloatBuffer"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="asIntBuffer"
+ return="java.nio.IntBuffer"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="asLongBuffer"
+ return="java.nio.LongBuffer"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="asReadOnlyBuffer"
+ return="java.nio.ByteBuffer"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="asShortBuffer"
+ return="java.nio.ShortBuffer"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="compact"
+ return="java.nio.ByteBuffer"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="compareTo"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="otherBuffer" type="java.nio.ByteBuffer">
+</parameter>
+</method>
+<method name="duplicate"
+ return="java.nio.ByteBuffer"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="get"
+ return="byte"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="get"
+ return="java.nio.ByteBuffer"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="dest" type="byte[]">
+</parameter>
+</method>
+<method name="get"
+ return="java.nio.ByteBuffer"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="dest" type="byte[]">
+</parameter>
+<parameter name="off" type="int">
+</parameter>
+<parameter name="len" type="int">
+</parameter>
+</method>
+<method name="get"
+ return="byte"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="index" type="int">
+</parameter>
+</method>
+<method name="getChar"
+ return="char"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getChar"
+ return="char"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="index" type="int">
+</parameter>
+</method>
+<method name="getDouble"
+ return="double"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getDouble"
+ return="double"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="index" type="int">
+</parameter>
+</method>
+<method name="getFloat"
+ return="float"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getFloat"
+ return="float"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="index" type="int">
+</parameter>
+</method>
+<method name="getInt"
+ return="int"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getInt"
+ return="int"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="index" type="int">
+</parameter>
+</method>
+<method name="getLong"
+ return="long"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getLong"
+ return="long"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="index" type="int">
+</parameter>
+</method>
+<method name="getShort"
+ return="short"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getShort"
+ return="short"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="index" type="int">
+</parameter>
+</method>
+<method name="hasArray"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isDirect"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="order"
+ return="java.nio.ByteOrder"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="order"
+ return="java.nio.ByteBuffer"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="byteOrder" type="java.nio.ByteOrder">
+</parameter>
+</method>
+<method name="put"
+ return="java.nio.ByteBuffer"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="b" type="byte">
+</parameter>
+</method>
+<method name="put"
+ return="java.nio.ByteBuffer"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="src" type="byte[]">
+</parameter>
+</method>
+<method name="put"
+ return="java.nio.ByteBuffer"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="src" type="byte[]">
+</parameter>
+<parameter name="off" type="int">
+</parameter>
+<parameter name="len" type="int">
+</parameter>
+</method>
+<method name="put"
+ return="java.nio.ByteBuffer"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="src" type="java.nio.ByteBuffer">
+</parameter>
+</method>
+<method name="put"
+ return="java.nio.ByteBuffer"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="index" type="int">
+</parameter>
+<parameter name="b" type="byte">
+</parameter>
+</method>
+<method name="putChar"
+ return="java.nio.ByteBuffer"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="value" type="char">
+</parameter>
+</method>
+<method name="putChar"
+ return="java.nio.ByteBuffer"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="index" type="int">
+</parameter>
+<parameter name="value" type="char">
+</parameter>
+</method>
+<method name="putDouble"
+ return="java.nio.ByteBuffer"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="value" type="double">
+</parameter>
+</method>
+<method name="putDouble"
+ return="java.nio.ByteBuffer"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="index" type="int">
+</parameter>
+<parameter name="value" type="double">
+</parameter>
+</method>
+<method name="putFloat"
+ return="java.nio.ByteBuffer"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="value" type="float">
+</parameter>
+</method>
+<method name="putFloat"
+ return="java.nio.ByteBuffer"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="index" type="int">
+</parameter>
+<parameter name="value" type="float">
+</parameter>
+</method>
+<method name="putInt"
+ return="java.nio.ByteBuffer"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="value" type="int">
+</parameter>
+</method>
+<method name="putInt"
+ return="java.nio.ByteBuffer"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="index" type="int">
+</parameter>
+<parameter name="value" type="int">
+</parameter>
+</method>
+<method name="putLong"
+ return="java.nio.ByteBuffer"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="value" type="long">
+</parameter>
+</method>
+<method name="putLong"
+ return="java.nio.ByteBuffer"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="index" type="int">
+</parameter>
+<parameter name="value" type="long">
+</parameter>
+</method>
+<method name="putShort"
+ return="java.nio.ByteBuffer"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="value" type="short">
+</parameter>
+</method>
+<method name="putShort"
+ return="java.nio.ByteBuffer"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="index" type="int">
+</parameter>
+<parameter name="value" type="short">
+</parameter>
+</method>
+<method name="slice"
+ return="java.nio.ByteBuffer"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="wrap"
+ return="java.nio.ByteBuffer"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="array" type="byte[]">
+</parameter>
+</method>
+<method name="wrap"
+ return="java.nio.ByteBuffer"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="array" type="byte[]">
+</parameter>
+<parameter name="start" type="int">
+</parameter>
+<parameter name="len" type="int">
+</parameter>
+</method>
+</class>
+<class name="ByteOrder"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="nativeOrder"
+ return="java.nio.ByteOrder"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<field name="BIG_ENDIAN"
+ type="java.nio.ByteOrder"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="LITTLE_ENDIAN"
+ type="java.nio.ByteOrder"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<class name="CharBuffer"
+ extends="java.nio.Buffer"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="java.lang.Appendable">
+</implements>
+<implements name="java.lang.CharSequence">
+</implements>
+<implements name="java.lang.Comparable">
+</implements>
+<implements name="java.lang.Readable">
+</implements>
+<method name="allocate"
+ return="java.nio.CharBuffer"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="capacity" type="int">
+</parameter>
+</method>
+<method name="append"
+ return="java.nio.CharBuffer"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="c" type="char">
+</parameter>
+</method>
+<method name="append"
+ return="java.nio.CharBuffer"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="csq" type="java.lang.CharSequence">
+</parameter>
+</method>
+<method name="append"
+ return="java.nio.CharBuffer"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="csq" type="java.lang.CharSequence">
+</parameter>
+<parameter name="start" type="int">
+</parameter>
+<parameter name="end" type="int">
+</parameter>
+</method>
+<method name="array"
+ return="char[]"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="arrayOffset"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="asReadOnlyBuffer"
+ return="java.nio.CharBuffer"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="charAt"
+ return="char"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="index" type="int">
+</parameter>
+</method>
+<method name="compact"
+ return="java.nio.CharBuffer"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="compareTo"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="otherBuffer" type="java.nio.CharBuffer">
+</parameter>
+</method>
+<method name="duplicate"
+ return="java.nio.CharBuffer"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="get"
+ return="char"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="get"
+ return="java.nio.CharBuffer"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="dest" type="char[]">
+</parameter>
+</method>
+<method name="get"
+ return="java.nio.CharBuffer"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="dest" type="char[]">
+</parameter>
+<parameter name="off" type="int">
+</parameter>
+<parameter name="len" type="int">
+</parameter>
+</method>
+<method name="get"
+ return="char"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="index" type="int">
+</parameter>
+</method>
+<method name="hasArray"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isDirect"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="length"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="order"
+ return="java.nio.ByteOrder"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="put"
+ return="java.nio.CharBuffer"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="c" type="char">
+</parameter>
+</method>
+<method name="put"
+ return="java.nio.CharBuffer"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="src" type="char[]">
+</parameter>
+</method>
+<method name="put"
+ return="java.nio.CharBuffer"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="src" type="char[]">
+</parameter>
+<parameter name="off" type="int">
+</parameter>
+<parameter name="len" type="int">
+</parameter>
+</method>
+<method name="put"
+ return="java.nio.CharBuffer"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="src" type="java.nio.CharBuffer">
+</parameter>
+</method>
+<method name="put"
+ return="java.nio.CharBuffer"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="index" type="int">
+</parameter>
+<parameter name="c" type="char">
+</parameter>
+</method>
+<method name="put"
+ return="java.nio.CharBuffer"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="str" type="java.lang.String">
+</parameter>
+</method>
+<method name="put"
+ return="java.nio.CharBuffer"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="str" type="java.lang.String">
+</parameter>
+<parameter name="start" type="int">
+</parameter>
+<parameter name="end" type="int">
+</parameter>
+</method>
+<method name="read"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="target" type="java.nio.CharBuffer">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="slice"
+ return="java.nio.CharBuffer"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="subSequence"
+ return="java.lang.CharSequence"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="start" type="int">
+</parameter>
+<parameter name="end" type="int">
+</parameter>
+</method>
+<method name="wrap"
+ return="java.nio.CharBuffer"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="array" type="char[]">
+</parameter>
+</method>
+<method name="wrap"
+ return="java.nio.CharBuffer"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="array" type="char[]">
+</parameter>
+<parameter name="start" type="int">
+</parameter>
+<parameter name="len" type="int">
+</parameter>
+</method>
+<method name="wrap"
+ return="java.nio.CharBuffer"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="chseq" type="java.lang.CharSequence">
+</parameter>
+</method>
+<method name="wrap"
+ return="java.nio.CharBuffer"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="chseq" type="java.lang.CharSequence">
+</parameter>
+<parameter name="start" type="int">
+</parameter>
+<parameter name="end" type="int">
+</parameter>
+</method>
+</class>
+<class name="DoubleBuffer"
+ extends="java.nio.Buffer"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="java.lang.Comparable">
+</implements>
+<method name="allocate"
+ return="java.nio.DoubleBuffer"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="capacity" type="int">
+</parameter>
+</method>
+<method name="array"
+ return="double[]"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="arrayOffset"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="asReadOnlyBuffer"
+ return="java.nio.DoubleBuffer"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="compact"
+ return="java.nio.DoubleBuffer"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="compareTo"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="otherBuffer" type="java.nio.DoubleBuffer">
+</parameter>
+</method>
+<method name="duplicate"
+ return="java.nio.DoubleBuffer"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="get"
+ return="double"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="get"
+ return="java.nio.DoubleBuffer"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="dest" type="double[]">
+</parameter>
+</method>
+<method name="get"
+ return="java.nio.DoubleBuffer"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="dest" type="double[]">
+</parameter>
+<parameter name="off" type="int">
+</parameter>
+<parameter name="len" type="int">
+</parameter>
+</method>
+<method name="get"
+ return="double"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="index" type="int">
+</parameter>
+</method>
+<method name="hasArray"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isDirect"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="order"
+ return="java.nio.ByteOrder"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="put"
+ return="java.nio.DoubleBuffer"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="d" type="double">
+</parameter>
+</method>
+<method name="put"
+ return="java.nio.DoubleBuffer"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="src" type="double[]">
+</parameter>
+</method>
+<method name="put"
+ return="java.nio.DoubleBuffer"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="src" type="double[]">
+</parameter>
+<parameter name="off" type="int">
+</parameter>
+<parameter name="len" type="int">
+</parameter>
+</method>
+<method name="put"
+ return="java.nio.DoubleBuffer"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="src" type="java.nio.DoubleBuffer">
+</parameter>
+</method>
+<method name="put"
+ return="java.nio.DoubleBuffer"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="index" type="int">
+</parameter>
+<parameter name="d" type="double">
+</parameter>
+</method>
+<method name="slice"
+ return="java.nio.DoubleBuffer"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="wrap"
+ return="java.nio.DoubleBuffer"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="array" type="double[]">
+</parameter>
+</method>
+<method name="wrap"
+ return="java.nio.DoubleBuffer"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="array" type="double[]">
+</parameter>
+<parameter name="start" type="int">
+</parameter>
+<parameter name="len" type="int">
+</parameter>
+</method>
+</class>
+<class name="FloatBuffer"
+ extends="java.nio.Buffer"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="java.lang.Comparable">
+</implements>
+<method name="allocate"
+ return="java.nio.FloatBuffer"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="capacity" type="int">
+</parameter>
+</method>
+<method name="array"
+ return="float[]"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="arrayOffset"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="asReadOnlyBuffer"
+ return="java.nio.FloatBuffer"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="compact"
+ return="java.nio.FloatBuffer"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="compareTo"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="otherBuffer" type="java.nio.FloatBuffer">
+</parameter>
+</method>
+<method name="duplicate"
+ return="java.nio.FloatBuffer"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="get"
+ return="float"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="get"
+ return="java.nio.FloatBuffer"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="dest" type="float[]">
+</parameter>
+</method>
+<method name="get"
+ return="java.nio.FloatBuffer"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="dest" type="float[]">
+</parameter>
+<parameter name="off" type="int">
+</parameter>
+<parameter name="len" type="int">
+</parameter>
+</method>
+<method name="get"
+ return="float"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="index" type="int">
+</parameter>
+</method>
+<method name="hasArray"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isDirect"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="order"
+ return="java.nio.ByteOrder"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="put"
+ return="java.nio.FloatBuffer"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="f" type="float">
+</parameter>
+</method>
+<method name="put"
+ return="java.nio.FloatBuffer"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="src" type="float[]">
+</parameter>
+</method>
+<method name="put"
+ return="java.nio.FloatBuffer"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="src" type="float[]">
+</parameter>
+<parameter name="off" type="int">
+</parameter>
+<parameter name="len" type="int">
+</parameter>
+</method>
+<method name="put"
+ return="java.nio.FloatBuffer"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="src" type="java.nio.FloatBuffer">
+</parameter>
+</method>
+<method name="put"
+ return="java.nio.FloatBuffer"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="index" type="int">
+</parameter>
+<parameter name="f" type="float">
+</parameter>
+</method>
+<method name="slice"
+ return="java.nio.FloatBuffer"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="wrap"
+ return="java.nio.FloatBuffer"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="array" type="float[]">
+</parameter>
+</method>
+<method name="wrap"
+ return="java.nio.FloatBuffer"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="array" type="float[]">
+</parameter>
+<parameter name="start" type="int">
+</parameter>
+<parameter name="len" type="int">
+</parameter>
+</method>
+</class>
+<class name="IntBuffer"
+ extends="java.nio.Buffer"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="java.lang.Comparable">
+</implements>
+<method name="allocate"
+ return="java.nio.IntBuffer"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="capacity" type="int">
+</parameter>
+</method>
+<method name="array"
+ return="int[]"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="arrayOffset"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="asReadOnlyBuffer"
+ return="java.nio.IntBuffer"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="compact"
+ return="java.nio.IntBuffer"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="compareTo"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="otherBuffer" type="java.nio.IntBuffer">
+</parameter>
+</method>
+<method name="duplicate"
+ return="java.nio.IntBuffer"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="get"
+ return="int"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="get"
+ return="java.nio.IntBuffer"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="dest" type="int[]">
+</parameter>
+</method>
+<method name="get"
+ return="java.nio.IntBuffer"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="dest" type="int[]">
+</parameter>
+<parameter name="off" type="int">
+</parameter>
+<parameter name="len" type="int">
+</parameter>
+</method>
+<method name="get"
+ return="int"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="index" type="int">
+</parameter>
+</method>
+<method name="hasArray"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isDirect"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="order"
+ return="java.nio.ByteOrder"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="put"
+ return="java.nio.IntBuffer"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="i" type="int">
+</parameter>
+</method>
+<method name="put"
+ return="java.nio.IntBuffer"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="src" type="int[]">
+</parameter>
+</method>
+<method name="put"
+ return="java.nio.IntBuffer"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="src" type="int[]">
+</parameter>
+<parameter name="off" type="int">
+</parameter>
+<parameter name="len" type="int">
+</parameter>
+</method>
+<method name="put"
+ return="java.nio.IntBuffer"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="src" type="java.nio.IntBuffer">
+</parameter>
+</method>
+<method name="put"
+ return="java.nio.IntBuffer"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="index" type="int">
+</parameter>
+<parameter name="i" type="int">
+</parameter>
+</method>
+<method name="slice"
+ return="java.nio.IntBuffer"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="wrap"
+ return="java.nio.IntBuffer"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="array" type="int[]">
+</parameter>
+</method>
+<method name="wrap"
+ return="java.nio.IntBuffer"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="array" type="int[]">
+</parameter>
+<parameter name="start" type="int">
+</parameter>
+<parameter name="len" type="int">
+</parameter>
+</method>
+</class>
+<class name="InvalidMarkException"
+ extends="java.lang.IllegalStateException"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="InvalidMarkException"
+ type="java.nio.InvalidMarkException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+</class>
+<class name="LongBuffer"
+ extends="java.nio.Buffer"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="java.lang.Comparable">
+</implements>
+<method name="allocate"
+ return="java.nio.LongBuffer"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="capacity" type="int">
+</parameter>
+</method>
+<method name="array"
+ return="long[]"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="arrayOffset"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="asReadOnlyBuffer"
+ return="java.nio.LongBuffer"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="compact"
+ return="java.nio.LongBuffer"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="compareTo"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="otherBuffer" type="java.nio.LongBuffer">
+</parameter>
+</method>
+<method name="duplicate"
+ return="java.nio.LongBuffer"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="get"
+ return="long"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="get"
+ return="java.nio.LongBuffer"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="dest" type="long[]">
+</parameter>
+</method>
+<method name="get"
+ return="java.nio.LongBuffer"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="dest" type="long[]">
+</parameter>
+<parameter name="off" type="int">
+</parameter>
+<parameter name="len" type="int">
+</parameter>
+</method>
+<method name="get"
+ return="long"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="index" type="int">
+</parameter>
+</method>
+<method name="hasArray"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isDirect"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="order"
+ return="java.nio.ByteOrder"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="put"
+ return="java.nio.LongBuffer"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="l" type="long">
+</parameter>
+</method>
+<method name="put"
+ return="java.nio.LongBuffer"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="src" type="long[]">
+</parameter>
+</method>
+<method name="put"
+ return="java.nio.LongBuffer"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="src" type="long[]">
+</parameter>
+<parameter name="off" type="int">
+</parameter>
+<parameter name="len" type="int">
+</parameter>
+</method>
+<method name="put"
+ return="java.nio.LongBuffer"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="src" type="java.nio.LongBuffer">
+</parameter>
+</method>
+<method name="put"
+ return="java.nio.LongBuffer"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="index" type="int">
+</parameter>
+<parameter name="l" type="long">
+</parameter>
+</method>
+<method name="slice"
+ return="java.nio.LongBuffer"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="wrap"
+ return="java.nio.LongBuffer"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="array" type="long[]">
+</parameter>
+</method>
+<method name="wrap"
+ return="java.nio.LongBuffer"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="array" type="long[]">
+</parameter>
+<parameter name="start" type="int">
+</parameter>
+<parameter name="len" type="int">
+</parameter>
+</method>
+</class>
+<class name="MappedByteBuffer"
+ extends="java.nio.ByteBuffer"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="force"
+ return="java.nio.MappedByteBuffer"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isLoaded"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="load"
+ return="java.nio.MappedByteBuffer"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+</class>
+<class name="ReadOnlyBufferException"
+ extends="java.lang.UnsupportedOperationException"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="ReadOnlyBufferException"
+ type="java.nio.ReadOnlyBufferException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+</class>
+<class name="ShortBuffer"
+ extends="java.nio.Buffer"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="java.lang.Comparable">
+</implements>
+<method name="allocate"
+ return="java.nio.ShortBuffer"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="capacity" type="int">
+</parameter>
+</method>
+<method name="array"
+ return="short[]"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="arrayOffset"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="asReadOnlyBuffer"
+ return="java.nio.ShortBuffer"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="compact"
+ return="java.nio.ShortBuffer"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="compareTo"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="otherBuffer" type="java.nio.ShortBuffer">
+</parameter>
+</method>
+<method name="duplicate"
+ return="java.nio.ShortBuffer"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="get"
+ return="short"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="get"
+ return="java.nio.ShortBuffer"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="dest" type="short[]">
+</parameter>
+</method>
+<method name="get"
+ return="java.nio.ShortBuffer"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="dest" type="short[]">
+</parameter>
+<parameter name="off" type="int">
+</parameter>
+<parameter name="len" type="int">
+</parameter>
+</method>
+<method name="get"
+ return="short"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="index" type="int">
+</parameter>
+</method>
+<method name="hasArray"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isDirect"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="order"
+ return="java.nio.ByteOrder"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="put"
+ return="java.nio.ShortBuffer"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="s" type="short">
+</parameter>
+</method>
+<method name="put"
+ return="java.nio.ShortBuffer"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="src" type="short[]">
+</parameter>
+</method>
+<method name="put"
+ return="java.nio.ShortBuffer"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="src" type="short[]">
+</parameter>
+<parameter name="off" type="int">
+</parameter>
+<parameter name="len" type="int">
+</parameter>
+</method>
+<method name="put"
+ return="java.nio.ShortBuffer"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="src" type="java.nio.ShortBuffer">
+</parameter>
+</method>
+<method name="put"
+ return="java.nio.ShortBuffer"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="index" type="int">
+</parameter>
+<parameter name="s" type="short">
+</parameter>
+</method>
+<method name="slice"
+ return="java.nio.ShortBuffer"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="wrap"
+ return="java.nio.ShortBuffer"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="array" type="short[]">
+</parameter>
+</method>
+<method name="wrap"
+ return="java.nio.ShortBuffer"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="array" type="short[]">
+</parameter>
+<parameter name="start" type="int">
+</parameter>
+<parameter name="len" type="int">
+</parameter>
+</method>
+</class>
+</package>
+<package name="java.nio.channels"
+>
+<class name="AlreadyConnectedException"
+ extends="java.lang.IllegalStateException"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="AlreadyConnectedException"
+ type="java.nio.channels.AlreadyConnectedException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+</class>
+<class name="AsynchronousCloseException"
+ extends="java.nio.channels.ClosedChannelException"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="AsynchronousCloseException"
+ type="java.nio.channels.AsynchronousCloseException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+</class>
+<interface name="ByteChannel"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="java.nio.channels.ReadableByteChannel">
+</implements>
+<implements name="java.nio.channels.WritableByteChannel">
+</implements>
+</interface>
+<class name="CancelledKeyException"
+ extends="java.lang.IllegalStateException"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="CancelledKeyException"
+ type="java.nio.channels.CancelledKeyException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+</class>
+<interface name="Channel"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="java.io.Closeable">
+</implements>
+<method name="close"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="isOpen"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+</interface>
+<class name="Channels"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="newChannel"
+ return="java.nio.channels.ReadableByteChannel"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="inputStream" type="java.io.InputStream">
+</parameter>
+</method>
+<method name="newChannel"
+ return="java.nio.channels.WritableByteChannel"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="outputStream" type="java.io.OutputStream">
+</parameter>
+</method>
+<method name="newInputStream"
+ return="java.io.InputStream"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="channel" type="java.nio.channels.ReadableByteChannel">
+</parameter>
+</method>
+<method name="newOutputStream"
+ return="java.io.OutputStream"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="channel" type="java.nio.channels.WritableByteChannel">
+</parameter>
+</method>
+<method name="newReader"
+ return="java.io.Reader"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="channel" type="java.nio.channels.ReadableByteChannel">
+</parameter>
+<parameter name="decoder" type="java.nio.charset.CharsetDecoder">
+</parameter>
+<parameter name="minBufferCapacity" type="int">
+</parameter>
+</method>
+<method name="newReader"
+ return="java.io.Reader"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="channel" type="java.nio.channels.ReadableByteChannel">
+</parameter>
+<parameter name="charsetName" type="java.lang.String">
+</parameter>
+</method>
+<method name="newWriter"
+ return="java.io.Writer"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="channel" type="java.nio.channels.WritableByteChannel">
+</parameter>
+<parameter name="encoder" type="java.nio.charset.CharsetEncoder">
+</parameter>
+<parameter name="minBufferCapacity" type="int">
+</parameter>
+</method>
+<method name="newWriter"
+ return="java.io.Writer"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="channel" type="java.nio.channels.WritableByteChannel">
+</parameter>
+<parameter name="charsetName" type="java.lang.String">
+</parameter>
+</method>
+</class>
+<class name="ClosedByInterruptException"
+ extends="java.nio.channels.AsynchronousCloseException"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="ClosedByInterruptException"
+ type="java.nio.channels.ClosedByInterruptException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+</class>
+<class name="ClosedChannelException"
+ extends="java.io.IOException"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="ClosedChannelException"
+ type="java.nio.channels.ClosedChannelException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+</class>
+<class name="ClosedSelectorException"
+ extends="java.lang.IllegalStateException"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="ClosedSelectorException"
+ type="java.nio.channels.ClosedSelectorException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+</class>
+<class name="ConnectionPendingException"
+ extends="java.lang.IllegalStateException"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="ConnectionPendingException"
+ type="java.nio.channels.ConnectionPendingException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+</class>
+<class name="DatagramChannel"
+ extends="java.nio.channels.spi.AbstractSelectableChannel"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="java.nio.channels.ByteChannel">
+</implements>
+<implements name="java.nio.channels.GatheringByteChannel">
+</implements>
+<implements name="java.nio.channels.ScatteringByteChannel">
+</implements>
+<constructor name="DatagramChannel"
+ type="java.nio.channels.DatagramChannel"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="selectorProvider" type="java.nio.channels.spi.SelectorProvider">
+</parameter>
+</constructor>
+<method name="connect"
+ return="java.nio.channels.DatagramChannel"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="address" type="java.net.SocketAddress">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="disconnect"
+ return="java.nio.channels.DatagramChannel"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="isConnected"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="open"
+ return="java.nio.channels.DatagramChannel"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="read"
+ return="int"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="target" type="java.nio.ByteBuffer">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="read"
+ return="long"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="targets" type="java.nio.ByteBuffer[]">
+</parameter>
+<parameter name="offset" type="int">
+</parameter>
+<parameter name="length" type="int">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="read"
+ return="long"
+ abstract="false"
+ native="false"
+ synchronized="true"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="targets" type="java.nio.ByteBuffer[]">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="receive"
+ return="java.net.SocketAddress"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="target" type="java.nio.ByteBuffer">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="send"
+ return="int"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="source" type="java.nio.ByteBuffer">
+</parameter>
+<parameter name="address" type="java.net.SocketAddress">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="socket"
+ return="java.net.DatagramSocket"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="validOps"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="write"
+ return="int"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="source" type="java.nio.ByteBuffer">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="write"
+ return="long"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="sources" type="java.nio.ByteBuffer[]">
+</parameter>
+<parameter name="offset" type="int">
+</parameter>
+<parameter name="length" type="int">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="write"
+ return="long"
+ abstract="false"
+ native="false"
+ synchronized="true"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="sources" type="java.nio.ByteBuffer[]">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+</class>
+<class name="FileChannel"
+ extends="java.nio.channels.spi.AbstractInterruptibleChannel"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="java.nio.channels.ByteChannel">
+</implements>
+<implements name="java.nio.channels.GatheringByteChannel">
+</implements>
+<implements name="java.nio.channels.ScatteringByteChannel">
+</implements>
+<constructor name="FileChannel"
+ type="java.nio.channels.FileChannel"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</constructor>
+<method name="force"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="metadata" type="boolean">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="lock"
+ return="java.nio.channels.FileLock"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="lock"
+ return="java.nio.channels.FileLock"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="position" type="long">
+</parameter>
+<parameter name="size" type="long">
+</parameter>
+<parameter name="shared" type="boolean">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="map"
+ return="java.nio.MappedByteBuffer"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="mode" type="java.nio.channels.FileChannel.MapMode">
+</parameter>
+<parameter name="position" type="long">
+</parameter>
+<parameter name="size" type="long">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="position"
+ return="long"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="position"
+ return="java.nio.channels.FileChannel"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="offset" type="long">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="read"
+ return="int"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="buffer" type="java.nio.ByteBuffer">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="read"
+ return="int"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="buffer" type="java.nio.ByteBuffer">
+</parameter>
+<parameter name="position" type="long">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="read"
+ return="long"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="buffers" type="java.nio.ByteBuffer[]">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="read"
+ return="long"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="buffers" type="java.nio.ByteBuffer[]">
+</parameter>
+<parameter name="start" type="int">
+</parameter>
+<parameter name="number" type="int">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="size"
+ return="long"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="transferFrom"
+ return="long"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="src" type="java.nio.channels.ReadableByteChannel">
+</parameter>
+<parameter name="position" type="long">
+</parameter>
+<parameter name="count" type="long">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="transferTo"
+ return="long"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="position" type="long">
+</parameter>
+<parameter name="count" type="long">
+</parameter>
+<parameter name="target" type="java.nio.channels.WritableByteChannel">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="truncate"
+ return="java.nio.channels.FileChannel"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="size" type="long">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="tryLock"
+ return="java.nio.channels.FileLock"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="tryLock"
+ return="java.nio.channels.FileLock"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="position" type="long">
+</parameter>
+<parameter name="size" type="long">
+</parameter>
+<parameter name="shared" type="boolean">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="write"
+ return="int"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="src" type="java.nio.ByteBuffer">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="write"
+ return="int"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="buffer" type="java.nio.ByteBuffer">
+</parameter>
+<parameter name="position" type="long">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="write"
+ return="long"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="buffers" type="java.nio.ByteBuffer[]">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="write"
+ return="long"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="buffers" type="java.nio.ByteBuffer[]">
+</parameter>
+<parameter name="offset" type="int">
+</parameter>
+<parameter name="length" type="int">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+</class>
+<class name="FileChannel.MapMode"
+ extends="java.lang.Object"
+ abstract="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<field name="PRIVATE"
+ type="java.nio.channels.FileChannel.MapMode"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="READ_ONLY"
+ type="java.nio.channels.FileChannel.MapMode"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="READ_WRITE"
+ type="java.nio.channels.FileChannel.MapMode"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<class name="FileLock"
+ extends="java.lang.Object"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="FileLock"
+ type="java.nio.channels.FileLock"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="channel" type="java.nio.channels.FileChannel">
+</parameter>
+<parameter name="position" type="long">
+</parameter>
+<parameter name="size" type="long">
+</parameter>
+<parameter name="shared" type="boolean">
+</parameter>
+</constructor>
+<method name="channel"
+ return="java.nio.channels.FileChannel"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isShared"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isValid"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="overlaps"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="start" type="long">
+</parameter>
+<parameter name="length" type="long">
+</parameter>
+</method>
+<method name="position"
+ return="long"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="release"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="size"
+ return="long"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="toString"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+</class>
+<class name="FileLockInterruptionException"
+ extends="java.io.IOException"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="FileLockInterruptionException"
+ type="java.nio.channels.FileLockInterruptionException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+</class>
+<interface name="GatheringByteChannel"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="java.nio.channels.WritableByteChannel">
+</implements>
+<method name="write"
+ return="long"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="buffers" type="java.nio.ByteBuffer[]">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="write"
+ return="long"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="buffers" type="java.nio.ByteBuffer[]">
+</parameter>
+<parameter name="offset" type="int">
+</parameter>
+<parameter name="length" type="int">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+</interface>
+<class name="IllegalBlockingModeException"
+ extends="java.lang.IllegalStateException"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="IllegalBlockingModeException"
+ type="java.nio.channels.IllegalBlockingModeException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+</class>
+<class name="IllegalSelectorException"
+ extends="java.lang.IllegalArgumentException"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="IllegalSelectorException"
+ type="java.nio.channels.IllegalSelectorException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+</class>
+<interface name="InterruptibleChannel"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="java.nio.channels.Channel">
+</implements>
+<method name="close"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+</interface>
+<class name="NoConnectionPendingException"
+ extends="java.lang.IllegalStateException"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="NoConnectionPendingException"
+ type="java.nio.channels.NoConnectionPendingException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+</class>
+<class name="NonReadableChannelException"
+ extends="java.lang.IllegalStateException"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="NonReadableChannelException"
+ type="java.nio.channels.NonReadableChannelException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+</class>
+<class name="NonWritableChannelException"
+ extends="java.lang.IllegalStateException"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="NonWritableChannelException"
+ type="java.nio.channels.NonWritableChannelException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+</class>
+<class name="NotYetBoundException"
+ extends="java.lang.IllegalStateException"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="NotYetBoundException"
+ type="java.nio.channels.NotYetBoundException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+</class>
+<class name="NotYetConnectedException"
+ extends="java.lang.IllegalStateException"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="NotYetConnectedException"
+ type="java.nio.channels.NotYetConnectedException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+</class>
+<class name="OverlappingFileLockException"
+ extends="java.lang.IllegalStateException"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="OverlappingFileLockException"
+ type="java.nio.channels.OverlappingFileLockException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+</class>
+<class name="Pipe"
+ extends="java.lang.Object"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="Pipe"
+ type="java.nio.channels.Pipe"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</constructor>
+<method name="open"
+ return="java.nio.channels.Pipe"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="sink"
+ return="java.nio.channels.Pipe.SinkChannel"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="source"
+ return="java.nio.channels.Pipe.SourceChannel"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+</class>
+<class name="Pipe.SinkChannel"
+ extends="java.nio.channels.spi.AbstractSelectableChannel"
+ abstract="true"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="java.nio.channels.GatheringByteChannel">
+</implements>
+<implements name="java.nio.channels.WritableByteChannel">
+</implements>
+<constructor name="Pipe.SinkChannel"
+ type="java.nio.channels.Pipe.SinkChannel"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="provider" type="java.nio.channels.spi.SelectorProvider">
+</parameter>
+</constructor>
+<method name="validOps"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+</class>
+<class name="Pipe.SourceChannel"
+ extends="java.nio.channels.spi.AbstractSelectableChannel"
+ abstract="true"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="java.nio.channels.ReadableByteChannel">
+</implements>
+<implements name="java.nio.channels.ScatteringByteChannel">
+</implements>
+<constructor name="Pipe.SourceChannel"
+ type="java.nio.channels.Pipe.SourceChannel"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="provider" type="java.nio.channels.spi.SelectorProvider">
+</parameter>
+</constructor>
+<method name="validOps"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+</class>
+<interface name="ReadableByteChannel"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="java.nio.channels.Channel">
+</implements>
+<method name="read"
+ return="int"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="buffer" type="java.nio.ByteBuffer">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+</interface>
+<interface name="ScatteringByteChannel"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="java.nio.channels.ReadableByteChannel">
+</implements>
+<method name="read"
+ return="long"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="buffers" type="java.nio.ByteBuffer[]">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="read"
+ return="long"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="buffers" type="java.nio.ByteBuffer[]">
+</parameter>
+<parameter name="offset" type="int">
+</parameter>
+<parameter name="length" type="int">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+</interface>
+<class name="SelectableChannel"
+ extends="java.nio.channels.spi.AbstractInterruptibleChannel"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="java.nio.channels.Channel">
+</implements>
+<constructor name="SelectableChannel"
+ type="java.nio.channels.SelectableChannel"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</constructor>
+<method name="blockingLock"
+ return="java.lang.Object"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="configureBlocking"
+ return="java.nio.channels.SelectableChannel"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="block" type="boolean">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="isBlocking"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isRegistered"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="keyFor"
+ return="java.nio.channels.SelectionKey"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="sel" type="java.nio.channels.Selector">
+</parameter>
+</method>
+<method name="provider"
+ return="java.nio.channels.spi.SelectorProvider"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="register"
+ return="java.nio.channels.SelectionKey"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="selector" type="java.nio.channels.Selector">
+</parameter>
+<parameter name="operations" type="int">
+</parameter>
+<exception name="ClosedChannelException" type="java.nio.channels.ClosedChannelException">
+</exception>
+</method>
+<method name="register"
+ return="java.nio.channels.SelectionKey"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="sel" type="java.nio.channels.Selector">
+</parameter>
+<parameter name="ops" type="int">
+</parameter>
+<parameter name="att" type="java.lang.Object">
+</parameter>
+<exception name="ClosedChannelException" type="java.nio.channels.ClosedChannelException">
+</exception>
+</method>
+<method name="validOps"
+ return="int"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+</class>
+<class name="SelectionKey"
+ extends="java.lang.Object"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="SelectionKey"
+ type="java.nio.channels.SelectionKey"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</constructor>
+<method name="attach"
+ return="java.lang.Object"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="anObject" type="java.lang.Object">
+</parameter>
+</method>
+<method name="attachment"
+ return="java.lang.Object"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="cancel"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="channel"
+ return="java.nio.channels.SelectableChannel"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="interestOps"
+ return="int"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="interestOps"
+ return="java.nio.channels.SelectionKey"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="operations" type="int">
+</parameter>
+</method>
+<method name="isAcceptable"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isConnectable"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isReadable"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isValid"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isWritable"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="readyOps"
+ return="int"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="selector"
+ return="java.nio.channels.Selector"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<field name="OP_ACCEPT"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="OP_CONNECT"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="8"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="OP_READ"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="OP_WRITE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="4"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<class name="Selector"
+ extends="java.lang.Object"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="Selector"
+ type="java.nio.channels.Selector"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</constructor>
+<method name="close"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="isOpen"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="keys"
+ return="java.util.Set&lt;java.nio.channels.SelectionKey&gt;"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="open"
+ return="java.nio.channels.Selector"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="provider"
+ return="java.nio.channels.spi.SelectorProvider"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="select"
+ return="int"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="select"
+ return="int"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="timeout" type="long">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="selectNow"
+ return="int"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="selectedKeys"
+ return="java.util.Set&lt;java.nio.channels.SelectionKey&gt;"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="wakeup"
+ return="java.nio.channels.Selector"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+</class>
+<class name="ServerSocketChannel"
+ extends="java.nio.channels.spi.AbstractSelectableChannel"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="ServerSocketChannel"
+ type="java.nio.channels.ServerSocketChannel"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="selectorProvider" type="java.nio.channels.spi.SelectorProvider">
+</parameter>
+</constructor>
+<method name="accept"
+ return="java.nio.channels.SocketChannel"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="open"
+ return="java.nio.channels.ServerSocketChannel"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="socket"
+ return="java.net.ServerSocket"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="validOps"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+</class>
+<class name="SocketChannel"
+ extends="java.nio.channels.spi.AbstractSelectableChannel"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="java.nio.channels.ByteChannel">
+</implements>
+<implements name="java.nio.channels.GatheringByteChannel">
+</implements>
+<implements name="java.nio.channels.ScatteringByteChannel">
+</implements>
+<constructor name="SocketChannel"
+ type="java.nio.channels.SocketChannel"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="selectorProvider" type="java.nio.channels.spi.SelectorProvider">
+</parameter>
+</constructor>
+<method name="connect"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="address" type="java.net.SocketAddress">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="finishConnect"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="isConnected"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isConnectionPending"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="open"
+ return="java.nio.channels.SocketChannel"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="open"
+ return="java.nio.channels.SocketChannel"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="address" type="java.net.SocketAddress">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="read"
+ return="int"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="target" type="java.nio.ByteBuffer">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="read"
+ return="long"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="targets" type="java.nio.ByteBuffer[]">
+</parameter>
+<parameter name="offset" type="int">
+</parameter>
+<parameter name="length" type="int">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="read"
+ return="long"
+ abstract="false"
+ native="false"
+ synchronized="true"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="targets" type="java.nio.ByteBuffer[]">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="socket"
+ return="java.net.Socket"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="validOps"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="write"
+ return="int"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="source" type="java.nio.ByteBuffer">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="write"
+ return="long"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="sources" type="java.nio.ByteBuffer[]">
+</parameter>
+<parameter name="offset" type="int">
+</parameter>
+<parameter name="length" type="int">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="write"
+ return="long"
+ abstract="false"
+ native="false"
+ synchronized="true"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="sources" type="java.nio.ByteBuffer[]">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+</class>
+<class name="UnresolvedAddressException"
+ extends="java.lang.IllegalArgumentException"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="UnresolvedAddressException"
+ type="java.nio.channels.UnresolvedAddressException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+</class>
+<class name="UnsupportedAddressTypeException"
+ extends="java.lang.IllegalArgumentException"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="UnsupportedAddressTypeException"
+ type="java.nio.channels.UnsupportedAddressTypeException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+</class>
+<interface name="WritableByteChannel"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="java.nio.channels.Channel">
+</implements>
+<method name="write"
+ return="int"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="buffer" type="java.nio.ByteBuffer">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+</interface>
+</package>
+<package name="java.nio.channels.spi"
+>
+<class name="AbstractInterruptibleChannel"
+ extends="java.lang.Object"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="java.nio.channels.Channel">
+</implements>
+<implements name="java.nio.channels.InterruptibleChannel">
+</implements>
+<constructor name="AbstractInterruptibleChannel"
+ type="java.nio.channels.spi.AbstractInterruptibleChannel"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</constructor>
+<method name="begin"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</method>
+<method name="close"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="end"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="success" type="boolean">
+</parameter>
+<exception name="AsynchronousCloseException" type="java.nio.channels.AsynchronousCloseException">
+</exception>
+</method>
+<method name="implCloseChannel"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="isOpen"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="true"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+</class>
+<class name="AbstractSelectableChannel"
+ extends="java.nio.channels.SelectableChannel"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="AbstractSelectableChannel"
+ type="java.nio.channels.spi.AbstractSelectableChannel"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="selectorProvider" type="java.nio.channels.spi.SelectorProvider">
+</parameter>
+</constructor>
+<method name="blockingLock"
+ return="java.lang.Object"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="configureBlocking"
+ return="java.nio.channels.SelectableChannel"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="blockingMode" type="boolean">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="implCloseChannel"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="true"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="implCloseSelectableChannel"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="implConfigureBlocking"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="blockingMode" type="boolean">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="isBlocking"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isRegistered"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="true"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="keyFor"
+ return="java.nio.channels.SelectionKey"
+ abstract="false"
+ native="false"
+ synchronized="true"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="selector" type="java.nio.channels.Selector">
+</parameter>
+</method>
+<method name="provider"
+ return="java.nio.channels.spi.SelectorProvider"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="register"
+ return="java.nio.channels.SelectionKey"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="selector" type="java.nio.channels.Selector">
+</parameter>
+<parameter name="interestSet" type="int">
+</parameter>
+<parameter name="attachment" type="java.lang.Object">
+</parameter>
+<exception name="ClosedChannelException" type="java.nio.channels.ClosedChannelException">
+</exception>
+</method>
+</class>
+<class name="AbstractSelectionKey"
+ extends="java.nio.channels.SelectionKey"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="AbstractSelectionKey"
+ type="java.nio.channels.spi.AbstractSelectionKey"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</constructor>
+<method name="cancel"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isValid"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+</class>
+<class name="AbstractSelector"
+ extends="java.nio.channels.Selector"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="AbstractSelector"
+ type="java.nio.channels.spi.AbstractSelector"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="selectorProvider" type="java.nio.channels.spi.SelectorProvider">
+</parameter>
+</constructor>
+<method name="begin"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</method>
+<method name="cancelledKeys"
+ return="java.util.Set&lt;java.nio.channels.SelectionKey&gt;"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</method>
+<method name="close"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="deregister"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="key" type="java.nio.channels.spi.AbstractSelectionKey">
+</parameter>
+</method>
+<method name="end"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</method>
+<method name="implCloseSelector"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="isOpen"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="provider"
+ return="java.nio.channels.spi.SelectorProvider"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="register"
+ return="java.nio.channels.SelectionKey"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="channel" type="java.nio.channels.spi.AbstractSelectableChannel">
+</parameter>
+<parameter name="operations" type="int">
+</parameter>
+<parameter name="attachment" type="java.lang.Object">
+</parameter>
+</method>
+</class>
+<class name="SelectorProvider"
+ extends="java.lang.Object"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="SelectorProvider"
+ type="java.nio.channels.spi.SelectorProvider"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</constructor>
+<method name="inheritedChannel"
+ return="java.nio.channels.Channel"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="openDatagramChannel"
+ return="java.nio.channels.DatagramChannel"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="openPipe"
+ return="java.nio.channels.Pipe"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="openSelector"
+ return="java.nio.channels.spi.AbstractSelector"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="openServerSocketChannel"
+ return="java.nio.channels.ServerSocketChannel"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="openSocketChannel"
+ return="java.nio.channels.SocketChannel"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="provider"
+ return="java.nio.channels.spi.SelectorProvider"
+ abstract="false"
+ native="false"
+ synchronized="true"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+</class>
+</package>
+<package name="java.nio.charset"
+>
+<class name="CharacterCodingException"
+ extends="java.io.IOException"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="CharacterCodingException"
+ type="java.nio.charset.CharacterCodingException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+</class>
+<class name="Charset"
+ extends="java.lang.Object"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="java.lang.Comparable">
+</implements>
+<constructor name="Charset"
+ type="java.nio.charset.Charset"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="canonicalName" type="java.lang.String">
+</parameter>
+<parameter name="aliases" type="java.lang.String[]">
+</parameter>
+</constructor>
+<method name="aliases"
+ return="java.util.Set&lt;java.lang.String&gt;"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="availableCharsets"
+ return="java.util.SortedMap&lt;java.lang.String, java.nio.charset.Charset&gt;"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="canEncode"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="compareTo"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="charset" type="java.nio.charset.Charset">
+</parameter>
+</method>
+<method name="contains"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="charset" type="java.nio.charset.Charset">
+</parameter>
+</method>
+<method name="decode"
+ return="java.nio.CharBuffer"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="buffer" type="java.nio.ByteBuffer">
+</parameter>
+</method>
+<method name="defaultCharset"
+ return="java.nio.charset.Charset"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="displayName"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="displayName"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="l" type="java.util.Locale">
+</parameter>
+</method>
+<method name="encode"
+ return="java.nio.ByteBuffer"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="buffer" type="java.nio.CharBuffer">
+</parameter>
+</method>
+<method name="encode"
+ return="java.nio.ByteBuffer"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="s" type="java.lang.String">
+</parameter>
+</method>
+<method name="equals"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="obj" type="java.lang.Object">
+</parameter>
+</method>
+<method name="forName"
+ return="java.nio.charset.Charset"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="charsetName" type="java.lang.String">
+</parameter>
+</method>
+<method name="hashCode"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isRegistered"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isSupported"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="true"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="charsetName" type="java.lang.String">
+</parameter>
+</method>
+<method name="name"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="newDecoder"
+ return="java.nio.charset.CharsetDecoder"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="newEncoder"
+ return="java.nio.charset.CharsetEncoder"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="toString"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+</class>
+<class name="CharsetDecoder"
+ extends="java.lang.Object"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="CharsetDecoder"
+ type="java.nio.charset.CharsetDecoder"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="charset" type="java.nio.charset.Charset">
+</parameter>
+<parameter name="averageCharsPerByte" type="float">
+</parameter>
+<parameter name="maxCharsPerByte" type="float">
+</parameter>
+</constructor>
+<method name="averageCharsPerByte"
+ return="float"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="charset"
+ return="java.nio.charset.Charset"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="decode"
+ return="java.nio.CharBuffer"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="in" type="java.nio.ByteBuffer">
+</parameter>
+<exception name="CharacterCodingException" type="java.nio.charset.CharacterCodingException">
+</exception>
+</method>
+<method name="decode"
+ return="java.nio.charset.CoderResult"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="in" type="java.nio.ByteBuffer">
+</parameter>
+<parameter name="out" type="java.nio.CharBuffer">
+</parameter>
+<parameter name="endOfInput" type="boolean">
+</parameter>
+</method>
+<method name="decodeLoop"
+ return="java.nio.charset.CoderResult"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="in" type="java.nio.ByteBuffer">
+</parameter>
+<parameter name="out" type="java.nio.CharBuffer">
+</parameter>
+</method>
+<method name="detectedCharset"
+ return="java.nio.charset.Charset"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="flush"
+ return="java.nio.charset.CoderResult"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="out" type="java.nio.CharBuffer">
+</parameter>
+</method>
+<method name="implFlush"
+ return="java.nio.charset.CoderResult"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="out" type="java.nio.CharBuffer">
+</parameter>
+</method>
+<method name="implOnMalformedInput"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="newAction" type="java.nio.charset.CodingErrorAction">
+</parameter>
+</method>
+<method name="implOnUnmappableCharacter"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="newAction" type="java.nio.charset.CodingErrorAction">
+</parameter>
+</method>
+<method name="implReplaceWith"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="newReplacement" type="java.lang.String">
+</parameter>
+</method>
+<method name="implReset"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</method>
+<method name="isAutoDetecting"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isCharsetDetected"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="malformedInputAction"
+ return="java.nio.charset.CodingErrorAction"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="maxCharsPerByte"
+ return="float"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="onMalformedInput"
+ return="java.nio.charset.CharsetDecoder"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="newAction" type="java.nio.charset.CodingErrorAction">
+</parameter>
+</method>
+<method name="onUnmappableCharacter"
+ return="java.nio.charset.CharsetDecoder"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="newAction" type="java.nio.charset.CodingErrorAction">
+</parameter>
+</method>
+<method name="replaceWith"
+ return="java.nio.charset.CharsetDecoder"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="newReplacement" type="java.lang.String">
+</parameter>
+</method>
+<method name="replacement"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="reset"
+ return="java.nio.charset.CharsetDecoder"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="unmappableCharacterAction"
+ return="java.nio.charset.CodingErrorAction"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+</class>
+<class name="CharsetEncoder"
+ extends="java.lang.Object"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="CharsetEncoder"
+ type="java.nio.charset.CharsetEncoder"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="cs" type="java.nio.charset.Charset">
+</parameter>
+<parameter name="averageBytesPerChar" type="float">
+</parameter>
+<parameter name="maxBytesPerChar" type="float">
+</parameter>
+</constructor>
+<constructor name="CharsetEncoder"
+ type="java.nio.charset.CharsetEncoder"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="cs" type="java.nio.charset.Charset">
+</parameter>
+<parameter name="averageBytesPerChar" type="float">
+</parameter>
+<parameter name="maxBytesPerChar" type="float">
+</parameter>
+<parameter name="replacement" type="byte[]">
+</parameter>
+</constructor>
+<method name="averageBytesPerChar"
+ return="float"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="canEncode"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="c" type="char">
+</parameter>
+</method>
+<method name="canEncode"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="sequence" type="java.lang.CharSequence">
+</parameter>
+</method>
+<method name="charset"
+ return="java.nio.charset.Charset"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="encode"
+ return="java.nio.ByteBuffer"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="in" type="java.nio.CharBuffer">
+</parameter>
+<exception name="CharacterCodingException" type="java.nio.charset.CharacterCodingException">
+</exception>
+</method>
+<method name="encode"
+ return="java.nio.charset.CoderResult"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="in" type="java.nio.CharBuffer">
+</parameter>
+<parameter name="out" type="java.nio.ByteBuffer">
+</parameter>
+<parameter name="endOfInput" type="boolean">
+</parameter>
+</method>
+<method name="encodeLoop"
+ return="java.nio.charset.CoderResult"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="in" type="java.nio.CharBuffer">
+</parameter>
+<parameter name="out" type="java.nio.ByteBuffer">
+</parameter>
+</method>
+<method name="flush"
+ return="java.nio.charset.CoderResult"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="out" type="java.nio.ByteBuffer">
+</parameter>
+</method>
+<method name="implFlush"
+ return="java.nio.charset.CoderResult"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="out" type="java.nio.ByteBuffer">
+</parameter>
+</method>
+<method name="implOnMalformedInput"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="newAction" type="java.nio.charset.CodingErrorAction">
+</parameter>
+</method>
+<method name="implOnUnmappableCharacter"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="newAction" type="java.nio.charset.CodingErrorAction">
+</parameter>
+</method>
+<method name="implReplaceWith"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="newReplacement" type="byte[]">
+</parameter>
+</method>
+<method name="implReset"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</method>
+<method name="isLegalReplacement"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="repl" type="byte[]">
+</parameter>
+</method>
+<method name="malformedInputAction"
+ return="java.nio.charset.CodingErrorAction"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="maxBytesPerChar"
+ return="float"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="onMalformedInput"
+ return="java.nio.charset.CharsetEncoder"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="newAction" type="java.nio.charset.CodingErrorAction">
+</parameter>
+</method>
+<method name="onUnmappableCharacter"
+ return="java.nio.charset.CharsetEncoder"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="newAction" type="java.nio.charset.CodingErrorAction">
+</parameter>
+</method>
+<method name="replaceWith"
+ return="java.nio.charset.CharsetEncoder"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="replacement" type="byte[]">
+</parameter>
+</method>
+<method name="replacement"
+ return="byte[]"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="reset"
+ return="java.nio.charset.CharsetEncoder"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="unmappableCharacterAction"
+ return="java.nio.charset.CodingErrorAction"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+</class>
+<class name="CoderMalfunctionError"
+ extends="java.lang.Error"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="CoderMalfunctionError"
+ type="java.nio.charset.CoderMalfunctionError"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="ex" type="java.lang.Exception">
+</parameter>
+</constructor>
+</class>
+<class name="CoderResult"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="isError"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isMalformed"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isOverflow"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isUnderflow"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isUnmappable"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="length"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="UnsupportedOperationException" type="java.lang.UnsupportedOperationException">
+</exception>
+</method>
+<method name="malformedForLength"
+ return="java.nio.charset.CoderResult"
+ abstract="false"
+ native="false"
+ synchronized="true"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="length" type="int">
+</parameter>
+<exception name="IllegalArgumentException" type="java.lang.IllegalArgumentException">
+</exception>
+</method>
+<method name="throwException"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="BufferOverflowException" type="java.nio.BufferOverflowException">
+</exception>
+<exception name="BufferUnderflowException" type="java.nio.BufferUnderflowException">
+</exception>
+<exception name="CharacterCodingException" type="java.nio.charset.CharacterCodingException">
+</exception>
+<exception name="MalformedInputException" type="java.nio.charset.MalformedInputException">
+</exception>
+<exception name="UnmappableCharacterException" type="java.nio.charset.UnmappableCharacterException">
+</exception>
+</method>
+<method name="unmappableForLength"
+ return="java.nio.charset.CoderResult"
+ abstract="false"
+ native="false"
+ synchronized="true"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="length" type="int">
+</parameter>
+<exception name="IllegalArgumentException" type="java.lang.IllegalArgumentException">
+</exception>
+</method>
+<field name="OVERFLOW"
+ type="java.nio.charset.CoderResult"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="UNDERFLOW"
+ type="java.nio.charset.CoderResult"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<class name="CodingErrorAction"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<field name="IGNORE"
+ type="java.nio.charset.CodingErrorAction"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="REPLACE"
+ type="java.nio.charset.CodingErrorAction"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="REPORT"
+ type="java.nio.charset.CodingErrorAction"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<class name="IllegalCharsetNameException"
+ extends="java.lang.IllegalArgumentException"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="IllegalCharsetNameException"
+ type="java.nio.charset.IllegalCharsetNameException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="charset" type="java.lang.String">
+</parameter>
+</constructor>
+<method name="getCharsetName"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+</class>
+<class name="MalformedInputException"
+ extends="java.nio.charset.CharacterCodingException"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="MalformedInputException"
+ type="java.nio.charset.MalformedInputException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="length" type="int">
+</parameter>
+</constructor>
+<method name="getInputLength"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+</class>
+<class name="UnmappableCharacterException"
+ extends="java.nio.charset.CharacterCodingException"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="UnmappableCharacterException"
+ type="java.nio.charset.UnmappableCharacterException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="length" type="int">
+</parameter>
+</constructor>
+<method name="getInputLength"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+</class>
+<class name="UnsupportedCharsetException"
+ extends="java.lang.IllegalArgumentException"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="UnsupportedCharsetException"
+ type="java.nio.charset.UnsupportedCharsetException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="charset" type="java.lang.String">
+</parameter>
+</constructor>
+<method name="getCharsetName"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+</class>
+</package>
+<package name="java.nio.charset.spi"
+>
+<class name="CharsetProvider"
+ extends="java.lang.Object"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="CharsetProvider"
+ type="java.nio.charset.spi.CharsetProvider"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</constructor>
+<method name="charsetForName"
+ return="java.nio.charset.Charset"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="charsetName" type="java.lang.String">
+</parameter>
+</method>
+<method name="charsets"
+ return="java.util.Iterator&lt;java.nio.charset.Charset&gt;"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+</class>
+</package>
+<package name="java.security"
+>
+<class name="AccessControlContext"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="AccessControlContext"
+ type="java.security.AccessControlContext"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="acc" type="java.security.AccessControlContext">
+</parameter>
+<parameter name="combiner" type="java.security.DomainCombiner">
+</parameter>
+</constructor>
+<constructor name="AccessControlContext"
+ type="java.security.AccessControlContext"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="context" type="java.security.ProtectionDomain[]">
+</parameter>
+</constructor>
+<method name="checkPermission"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="perm" type="java.security.Permission">
+</parameter>
+<exception name="AccessControlException" type="java.security.AccessControlException">
+</exception>
+</method>
+<method name="getDomainCombiner"
+ return="java.security.DomainCombiner"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+</class>
+<class name="AccessControlException"
+ extends="java.lang.SecurityException"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="AccessControlException"
+ type="java.security.AccessControlException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="message" type="java.lang.String">
+</parameter>
+</constructor>
+<constructor name="AccessControlException"
+ type="java.security.AccessControlException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="message" type="java.lang.String">
+</parameter>
+<parameter name="perm" type="java.security.Permission">
+</parameter>
+</constructor>
+<method name="getPermission"
+ return="java.security.Permission"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+</class>
+<class name="AccessController"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="checkPermission"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="perm" type="java.security.Permission">
+</parameter>
+<exception name="AccessControlException" type="java.security.AccessControlException">
+</exception>
+</method>
+<method name="doPrivileged"
+ return="T"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="action" type="java.security.PrivilegedAction&lt;T&gt;">
+</parameter>
+</method>
+<method name="doPrivileged"
+ return="T"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="action" type="java.security.PrivilegedAction&lt;T&gt;">
+</parameter>
+<parameter name="context" type="java.security.AccessControlContext">
+</parameter>
+</method>
+<method name="doPrivileged"
+ return="T"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="action" type="java.security.PrivilegedExceptionAction&lt;T&gt;">
+</parameter>
+<exception name="PrivilegedActionException" type="java.security.PrivilegedActionException">
+</exception>
+</method>
+<method name="doPrivileged"
+ return="T"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="action" type="java.security.PrivilegedExceptionAction&lt;T&gt;">
+</parameter>
+<parameter name="context" type="java.security.AccessControlContext">
+</parameter>
+<exception name="PrivilegedActionException" type="java.security.PrivilegedActionException">
+</exception>
+</method>
+<method name="getContext"
+ return="java.security.AccessControlContext"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+</class>
+<class name="AlgorithmParameterGenerator"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="AlgorithmParameterGenerator"
+ type="java.security.AlgorithmParameterGenerator"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="paramGenSpi" type="java.security.AlgorithmParameterGeneratorSpi">
+</parameter>
+<parameter name="provider" type="java.security.Provider">
+</parameter>
+<parameter name="algorithm" type="java.lang.String">
+</parameter>
+</constructor>
+<method name="generateParameters"
+ return="java.security.AlgorithmParameters"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getAlgorithm"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getInstance"
+ return="java.security.AlgorithmParameterGenerator"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="algorithm" type="java.lang.String">
+</parameter>
+<exception name="NoSuchAlgorithmException" type="java.security.NoSuchAlgorithmException">
+</exception>
+</method>
+<method name="getInstance"
+ return="java.security.AlgorithmParameterGenerator"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="algorithm" type="java.lang.String">
+</parameter>
+<parameter name="provider" type="java.lang.String">
+</parameter>
+<exception name="NoSuchAlgorithmException" type="java.security.NoSuchAlgorithmException">
+</exception>
+<exception name="NoSuchProviderException" type="java.security.NoSuchProviderException">
+</exception>
+</method>
+<method name="getInstance"
+ return="java.security.AlgorithmParameterGenerator"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="algorithm" type="java.lang.String">
+</parameter>
+<parameter name="provider" type="java.security.Provider">
+</parameter>
+<exception name="NoSuchAlgorithmException" type="java.security.NoSuchAlgorithmException">
+</exception>
+</method>
+<method name="getProvider"
+ return="java.security.Provider"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="init"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="size" type="int">
+</parameter>
+</method>
+<method name="init"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="size" type="int">
+</parameter>
+<parameter name="random" type="java.security.SecureRandom">
+</parameter>
+</method>
+<method name="init"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="genParamSpec" type="java.security.spec.AlgorithmParameterSpec">
+</parameter>
+<exception name="InvalidAlgorithmParameterException" type="java.security.InvalidAlgorithmParameterException">
+</exception>
+</method>
+<method name="init"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="genParamSpec" type="java.security.spec.AlgorithmParameterSpec">
+</parameter>
+<parameter name="random" type="java.security.SecureRandom">
+</parameter>
+<exception name="InvalidAlgorithmParameterException" type="java.security.InvalidAlgorithmParameterException">
+</exception>
+</method>
+</class>
+<class name="AlgorithmParameterGeneratorSpi"
+ extends="java.lang.Object"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="AlgorithmParameterGeneratorSpi"
+ type="java.security.AlgorithmParameterGeneratorSpi"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<method name="engineGenerateParameters"
+ return="java.security.AlgorithmParameters"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</method>
+<method name="engineInit"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="size" type="int">
+</parameter>
+<parameter name="random" type="java.security.SecureRandom">
+</parameter>
+</method>
+<method name="engineInit"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="genParamSpec" type="java.security.spec.AlgorithmParameterSpec">
+</parameter>
+<parameter name="random" type="java.security.SecureRandom">
+</parameter>
+<exception name="InvalidAlgorithmParameterException" type="java.security.InvalidAlgorithmParameterException">
+</exception>
+</method>
+</class>
+<class name="AlgorithmParameters"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="AlgorithmParameters"
+ type="java.security.AlgorithmParameters"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="algPramSpi" type="java.security.AlgorithmParametersSpi">
+</parameter>
+<parameter name="provider" type="java.security.Provider">
+</parameter>
+<parameter name="algorithm" type="java.lang.String">
+</parameter>
+</constructor>
+<method name="getAlgorithm"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getEncoded"
+ return="byte[]"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="getEncoded"
+ return="byte[]"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="format" type="java.lang.String">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="getInstance"
+ return="java.security.AlgorithmParameters"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="algorithm" type="java.lang.String">
+</parameter>
+<exception name="NoSuchAlgorithmException" type="java.security.NoSuchAlgorithmException">
+</exception>
+</method>
+<method name="getInstance"
+ return="java.security.AlgorithmParameters"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="algorithm" type="java.lang.String">
+</parameter>
+<parameter name="provider" type="java.lang.String">
+</parameter>
+<exception name="NoSuchAlgorithmException" type="java.security.NoSuchAlgorithmException">
+</exception>
+<exception name="NoSuchProviderException" type="java.security.NoSuchProviderException">
+</exception>
+</method>
+<method name="getInstance"
+ return="java.security.AlgorithmParameters"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="algorithm" type="java.lang.String">
+</parameter>
+<parameter name="provider" type="java.security.Provider">
+</parameter>
+<exception name="NoSuchAlgorithmException" type="java.security.NoSuchAlgorithmException">
+</exception>
+</method>
+<method name="getParameterSpec"
+ return="T"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="paramSpec" type="java.lang.Class&lt;T&gt;">
+</parameter>
+<exception name="InvalidParameterSpecException" type="java.security.spec.InvalidParameterSpecException">
+</exception>
+</method>
+<method name="getProvider"
+ return="java.security.Provider"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="init"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="paramSpec" type="java.security.spec.AlgorithmParameterSpec">
+</parameter>
+<exception name="InvalidParameterSpecException" type="java.security.spec.InvalidParameterSpecException">
+</exception>
+</method>
+<method name="init"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="params" type="byte[]">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="init"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="params" type="byte[]">
+</parameter>
+<parameter name="format" type="java.lang.String">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="toString"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+</class>
+<class name="AlgorithmParametersSpi"
+ extends="java.lang.Object"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="AlgorithmParametersSpi"
+ type="java.security.AlgorithmParametersSpi"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<method name="engineGetEncoded"
+ return="byte[]"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="engineGetEncoded"
+ return="byte[]"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="format" type="java.lang.String">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="engineGetParameterSpec"
+ return="T"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="paramSpec" type="java.lang.Class&lt;T&gt;">
+</parameter>
+<exception name="InvalidParameterSpecException" type="java.security.spec.InvalidParameterSpecException">
+</exception>
+</method>
+<method name="engineInit"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="paramSpec" type="java.security.spec.AlgorithmParameterSpec">
+</parameter>
+<exception name="InvalidParameterSpecException" type="java.security.spec.InvalidParameterSpecException">
+</exception>
+</method>
+<method name="engineInit"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="params" type="byte[]">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="engineInit"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="params" type="byte[]">
+</parameter>
+<parameter name="format" type="java.lang.String">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="engineToString"
+ return="java.lang.String"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</method>
+</class>
+<class name="AllPermission"
+ extends="java.security.Permission"
+ abstract="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="AllPermission"
+ type="java.security.AllPermission"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+<parameter name="actions" type="java.lang.String">
+</parameter>
+</constructor>
+<constructor name="AllPermission"
+ type="java.security.AllPermission"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<method name="equals"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="obj" type="java.lang.Object">
+</parameter>
+</method>
+<method name="getActions"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="hashCode"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="implies"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="permission" type="java.security.Permission">
+</parameter>
+</method>
+</class>
+<class name="AuthProvider"
+ extends="java.security.Provider"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="AuthProvider"
+ type="java.security.AuthProvider"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+<parameter name="version" type="double">
+</parameter>
+<parameter name="info" type="java.lang.String">
+</parameter>
+</constructor>
+<method name="login"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="subject" type="javax.security.auth.Subject">
+</parameter>
+<parameter name="handler" type="javax.security.auth.callback.CallbackHandler">
+</parameter>
+<exception name="LoginException" type="javax.security.auth.login.LoginException">
+</exception>
+</method>
+<method name="logout"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="LoginException" type="javax.security.auth.login.LoginException">
+</exception>
+</method>
+<method name="setCallbackHandler"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="handler" type="javax.security.auth.callback.CallbackHandler">
+</parameter>
+</method>
+</class>
+<class name="BasicPermission"
+ extends="java.security.Permission"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="java.io.Serializable">
+</implements>
+<constructor name="BasicPermission"
+ type="java.security.BasicPermission"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+</constructor>
+<constructor name="BasicPermission"
+ type="java.security.BasicPermission"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+<parameter name="action" type="java.lang.String">
+</parameter>
+</constructor>
+<method name="equals"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="obj" type="java.lang.Object">
+</parameter>
+</method>
+<method name="getActions"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="hashCode"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="implies"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="permission" type="java.security.Permission">
+</parameter>
+</method>
+</class>
+<interface name="Certificate"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="deprecated"
+ visibility="public"
+>
+<method name="decode"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="stream" type="java.io.InputStream">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+<exception name="KeyException" type="java.security.KeyException">
+</exception>
+</method>
+<method name="encode"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="stream" type="java.io.OutputStream">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+<exception name="KeyException" type="java.security.KeyException">
+</exception>
+</method>
+<method name="getFormat"
+ return="java.lang.String"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getGuarantor"
+ return="java.security.Principal"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getPrincipal"
+ return="java.security.Principal"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getPublicKey"
+ return="java.security.PublicKey"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="toString"
+ return="java.lang.String"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="detailed" type="boolean">
+</parameter>
+</method>
+</interface>
+<class name="CodeSigner"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="java.io.Serializable">
+</implements>
+<constructor name="CodeSigner"
+ type="java.security.CodeSigner"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="signerCertPath" type="java.security.cert.CertPath">
+</parameter>
+<parameter name="timestamp" type="java.security.Timestamp">
+</parameter>
+</constructor>
+<method name="getSignerCertPath"
+ return="java.security.cert.CertPath"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getTimestamp"
+ return="java.security.Timestamp"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+</class>
+<class name="CodeSource"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="java.io.Serializable">
+</implements>
+<constructor name="CodeSource"
+ type="java.security.CodeSource"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="location" type="java.net.URL">
+</parameter>
+<parameter name="certs" type="java.security.cert.Certificate[]">
+</parameter>
+</constructor>
+<constructor name="CodeSource"
+ type="java.security.CodeSource"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="location" type="java.net.URL">
+</parameter>
+<parameter name="signers" type="java.security.CodeSigner[]">
+</parameter>
+</constructor>
+<method name="getCertificates"
+ return="java.security.cert.Certificate[]"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getCodeSigners"
+ return="java.security.CodeSigner[]"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getLocation"
+ return="java.net.URL"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="implies"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="cs" type="java.security.CodeSource">
+</parameter>
+</method>
+</class>
+<class name="DigestException"
+ extends="java.security.GeneralSecurityException"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="DigestException"
+ type="java.security.DigestException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="msg" type="java.lang.String">
+</parameter>
+</constructor>
+<constructor name="DigestException"
+ type="java.security.DigestException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<constructor name="DigestException"
+ type="java.security.DigestException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="message" type="java.lang.String">
+</parameter>
+<parameter name="cause" type="java.lang.Throwable">
+</parameter>
+</constructor>
+<constructor name="DigestException"
+ type="java.security.DigestException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="cause" type="java.lang.Throwable">
+</parameter>
+</constructor>
+</class>
+<class name="DigestInputStream"
+ extends="java.io.FilterInputStream"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="DigestInputStream"
+ type="java.security.DigestInputStream"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="stream" type="java.io.InputStream">
+</parameter>
+<parameter name="digest" type="java.security.MessageDigest">
+</parameter>
+</constructor>
+<method name="getMessageDigest"
+ return="java.security.MessageDigest"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="on"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="on" type="boolean">
+</parameter>
+</method>
+<method name="setMessageDigest"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="digest" type="java.security.MessageDigest">
+</parameter>
+</method>
+<field name="digest"
+ type="java.security.MessageDigest"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</field>
+</class>
+<class name="DigestOutputStream"
+ extends="java.io.FilterOutputStream"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="DigestOutputStream"
+ type="java.security.DigestOutputStream"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="stream" type="java.io.OutputStream">
+</parameter>
+<parameter name="digest" type="java.security.MessageDigest">
+</parameter>
+</constructor>
+<method name="getMessageDigest"
+ return="java.security.MessageDigest"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="on"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="on" type="boolean">
+</parameter>
+</method>
+<method name="setMessageDigest"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="digest" type="java.security.MessageDigest">
+</parameter>
+</method>
+<field name="digest"
+ type="java.security.MessageDigest"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</field>
+</class>
+<interface name="DomainCombiner"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="combine"
+ return="java.security.ProtectionDomain[]"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="current" type="java.security.ProtectionDomain[]">
+</parameter>
+<parameter name="assigned" type="java.security.ProtectionDomain[]">
+</parameter>
+</method>
+</interface>
+<class name="GeneralSecurityException"
+ extends="java.lang.Exception"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="GeneralSecurityException"
+ type="java.security.GeneralSecurityException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="msg" type="java.lang.String">
+</parameter>
+</constructor>
+<constructor name="GeneralSecurityException"
+ type="java.security.GeneralSecurityException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<constructor name="GeneralSecurityException"
+ type="java.security.GeneralSecurityException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="message" type="java.lang.String">
+</parameter>
+<parameter name="cause" type="java.lang.Throwable">
+</parameter>
+</constructor>
+<constructor name="GeneralSecurityException"
+ type="java.security.GeneralSecurityException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="cause" type="java.lang.Throwable">
+</parameter>
+</constructor>
+</class>
+<interface name="Guard"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="checkGuard"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="object" type="java.lang.Object">
+</parameter>
+<exception name="SecurityException" type="java.lang.SecurityException">
+</exception>
+</method>
+</interface>
+<class name="GuardedObject"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="java.io.Serializable">
+</implements>
+<constructor name="GuardedObject"
+ type="java.security.GuardedObject"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="object" type="java.lang.Object">
+</parameter>
+<parameter name="guard" type="java.security.Guard">
+</parameter>
+</constructor>
+<method name="getObject"
+ return="java.lang.Object"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="SecurityException" type="java.lang.SecurityException">
+</exception>
+</method>
+</class>
+<class name="Identity"
+ extends="java.lang.Object"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="deprecated"
+ visibility="public"
+>
+<implements name="java.security.Principal">
+</implements>
+<implements name="java.io.Serializable">
+</implements>
+<constructor name="Identity"
+ type="java.security.Identity"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</constructor>
+<constructor name="Identity"
+ type="java.security.Identity"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+</constructor>
+<constructor name="Identity"
+ type="java.security.Identity"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+<parameter name="scope" type="java.security.IdentityScope">
+</parameter>
+<exception name="KeyManagementException" type="java.security.KeyManagementException">
+</exception>
+</constructor>
+<method name="addCertificate"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="certificate" type="java.security.Certificate">
+</parameter>
+<exception name="KeyManagementException" type="java.security.KeyManagementException">
+</exception>
+</method>
+<method name="certificates"
+ return="java.security.Certificate[]"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="equals"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="obj" type="java.lang.Object">
+</parameter>
+</method>
+<method name="getInfo"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getName"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getPublicKey"
+ return="java.security.PublicKey"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getScope"
+ return="java.security.IdentityScope"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="identityEquals"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="identity" type="java.security.Identity">
+</parameter>
+</method>
+<method name="removeCertificate"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="certificate" type="java.security.Certificate">
+</parameter>
+<exception name="KeyManagementException" type="java.security.KeyManagementException">
+</exception>
+</method>
+<method name="setInfo"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="info" type="java.lang.String">
+</parameter>
+</method>
+<method name="setPublicKey"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="key" type="java.security.PublicKey">
+</parameter>
+<exception name="KeyManagementException" type="java.security.KeyManagementException">
+</exception>
+</method>
+<method name="toString"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="detailed" type="boolean">
+</parameter>
+</method>
+</class>
+<class name="IdentityScope"
+ extends="java.security.Identity"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="deprecated"
+ visibility="public"
+>
+<constructor name="IdentityScope"
+ type="java.security.IdentityScope"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</constructor>
+<constructor name="IdentityScope"
+ type="java.security.IdentityScope"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+</constructor>
+<constructor name="IdentityScope"
+ type="java.security.IdentityScope"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+<parameter name="scope" type="java.security.IdentityScope">
+</parameter>
+<exception name="KeyManagementException" type="java.security.KeyManagementException">
+</exception>
+</constructor>
+<method name="addIdentity"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="identity" type="java.security.Identity">
+</parameter>
+<exception name="KeyManagementException" type="java.security.KeyManagementException">
+</exception>
+</method>
+<method name="getIdentity"
+ return="java.security.Identity"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+</method>
+<method name="getIdentity"
+ return="java.security.Identity"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="principal" type="java.security.Principal">
+</parameter>
+</method>
+<method name="getIdentity"
+ return="java.security.Identity"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="key" type="java.security.PublicKey">
+</parameter>
+</method>
+<method name="getSystemScope"
+ return="java.security.IdentityScope"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="identities"
+ return="java.util.Enumeration&lt;java.security.Identity&gt;"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="removeIdentity"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="identity" type="java.security.Identity">
+</parameter>
+<exception name="KeyManagementException" type="java.security.KeyManagementException">
+</exception>
+</method>
+<method name="setSystemScope"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="scope" type="java.security.IdentityScope">
+</parameter>
+</method>
+<method name="size"
+ return="int"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+</class>
+<class name="InvalidAlgorithmParameterException"
+ extends="java.security.GeneralSecurityException"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="InvalidAlgorithmParameterException"
+ type="java.security.InvalidAlgorithmParameterException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="msg" type="java.lang.String">
+</parameter>
+</constructor>
+<constructor name="InvalidAlgorithmParameterException"
+ type="java.security.InvalidAlgorithmParameterException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<constructor name="InvalidAlgorithmParameterException"
+ type="java.security.InvalidAlgorithmParameterException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="message" type="java.lang.String">
+</parameter>
+<parameter name="cause" type="java.lang.Throwable">
+</parameter>
+</constructor>
+<constructor name="InvalidAlgorithmParameterException"
+ type="java.security.InvalidAlgorithmParameterException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="cause" type="java.lang.Throwable">
+</parameter>
+</constructor>
+</class>
+<class name="InvalidKeyException"
+ extends="java.security.KeyException"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="InvalidKeyException"
+ type="java.security.InvalidKeyException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="msg" type="java.lang.String">
+</parameter>
+</constructor>
+<constructor name="InvalidKeyException"
+ type="java.security.InvalidKeyException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<constructor name="InvalidKeyException"
+ type="java.security.InvalidKeyException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="message" type="java.lang.String">
+</parameter>
+<parameter name="cause" type="java.lang.Throwable">
+</parameter>
+</constructor>
+<constructor name="InvalidKeyException"
+ type="java.security.InvalidKeyException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="cause" type="java.lang.Throwable">
+</parameter>
+</constructor>
+</class>
+<class name="InvalidParameterException"
+ extends="java.lang.IllegalArgumentException"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="InvalidParameterException"
+ type="java.security.InvalidParameterException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="msg" type="java.lang.String">
+</parameter>
+</constructor>
+<constructor name="InvalidParameterException"
+ type="java.security.InvalidParameterException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+</class>
+<interface name="Key"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="java.io.Serializable">
+</implements>
+<method name="getAlgorithm"
+ return="java.lang.String"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getEncoded"
+ return="byte[]"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getFormat"
+ return="java.lang.String"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<field name="serialVersionUID"
+ type="long"
+ transient="false"
+ volatile="false"
+ value="6603384152749567654L"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</interface>
+<class name="KeyException"
+ extends="java.security.GeneralSecurityException"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="KeyException"
+ type="java.security.KeyException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="msg" type="java.lang.String">
+</parameter>
+</constructor>
+<constructor name="KeyException"
+ type="java.security.KeyException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<constructor name="KeyException"
+ type="java.security.KeyException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="message" type="java.lang.String">
+</parameter>
+<parameter name="cause" type="java.lang.Throwable">
+</parameter>
+</constructor>
+<constructor name="KeyException"
+ type="java.security.KeyException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="cause" type="java.lang.Throwable">
+</parameter>
+</constructor>
+</class>
+<class name="KeyFactory"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="KeyFactory"
+ type="java.security.KeyFactory"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="keyFacSpi" type="java.security.KeyFactorySpi">
+</parameter>
+<parameter name="provider" type="java.security.Provider">
+</parameter>
+<parameter name="algorithm" type="java.lang.String">
+</parameter>
+</constructor>
+<method name="generatePrivate"
+ return="java.security.PrivateKey"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="keySpec" type="java.security.spec.KeySpec">
+</parameter>
+<exception name="InvalidKeySpecException" type="java.security.spec.InvalidKeySpecException">
+</exception>
+</method>
+<method name="generatePublic"
+ return="java.security.PublicKey"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="keySpec" type="java.security.spec.KeySpec">
+</parameter>
+<exception name="InvalidKeySpecException" type="java.security.spec.InvalidKeySpecException">
+</exception>
+</method>
+<method name="getAlgorithm"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getInstance"
+ return="java.security.KeyFactory"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="algorithm" type="java.lang.String">
+</parameter>
+<exception name="NoSuchAlgorithmException" type="java.security.NoSuchAlgorithmException">
+</exception>
+</method>
+<method name="getInstance"
+ return="java.security.KeyFactory"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="algorithm" type="java.lang.String">
+</parameter>
+<parameter name="provider" type="java.lang.String">
+</parameter>
+<exception name="NoSuchAlgorithmException" type="java.security.NoSuchAlgorithmException">
+</exception>
+<exception name="NoSuchProviderException" type="java.security.NoSuchProviderException">
+</exception>
+</method>
+<method name="getInstance"
+ return="java.security.KeyFactory"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="algorithm" type="java.lang.String">
+</parameter>
+<parameter name="provider" type="java.security.Provider">
+</parameter>
+<exception name="NoSuchAlgorithmException" type="java.security.NoSuchAlgorithmException">
+</exception>
+</method>
+<method name="getKeySpec"
+ return="T"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="key" type="java.security.Key">
+</parameter>
+<parameter name="keySpec" type="java.lang.Class&lt;T&gt;">
+</parameter>
+<exception name="InvalidKeySpecException" type="java.security.spec.InvalidKeySpecException">
+</exception>
+</method>
+<method name="getProvider"
+ return="java.security.Provider"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="translateKey"
+ return="java.security.Key"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="key" type="java.security.Key">
+</parameter>
+<exception name="InvalidKeyException" type="java.security.InvalidKeyException">
+</exception>
+</method>
+</class>
+<class name="KeyFactorySpi"
+ extends="java.lang.Object"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="KeyFactorySpi"
+ type="java.security.KeyFactorySpi"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<method name="engineGeneratePrivate"
+ return="java.security.PrivateKey"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="keySpec" type="java.security.spec.KeySpec">
+</parameter>
+<exception name="InvalidKeySpecException" type="java.security.spec.InvalidKeySpecException">
+</exception>
+</method>
+<method name="engineGeneratePublic"
+ return="java.security.PublicKey"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="keySpec" type="java.security.spec.KeySpec">
+</parameter>
+<exception name="InvalidKeySpecException" type="java.security.spec.InvalidKeySpecException">
+</exception>
+</method>
+<method name="engineGetKeySpec"
+ return="T"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="key" type="java.security.Key">
+</parameter>
+<parameter name="keySpec" type="java.lang.Class&lt;T&gt;">
+</parameter>
+<exception name="InvalidKeySpecException" type="java.security.spec.InvalidKeySpecException">
+</exception>
+</method>
+<method name="engineTranslateKey"
+ return="java.security.Key"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="key" type="java.security.Key">
+</parameter>
+<exception name="InvalidKeyException" type="java.security.InvalidKeyException">
+</exception>
+</method>
+</class>
+<class name="KeyManagementException"
+ extends="java.security.KeyException"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="KeyManagementException"
+ type="java.security.KeyManagementException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="msg" type="java.lang.String">
+</parameter>
+</constructor>
+<constructor name="KeyManagementException"
+ type="java.security.KeyManagementException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<constructor name="KeyManagementException"
+ type="java.security.KeyManagementException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="message" type="java.lang.String">
+</parameter>
+<parameter name="cause" type="java.lang.Throwable">
+</parameter>
+</constructor>
+<constructor name="KeyManagementException"
+ type="java.security.KeyManagementException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="cause" type="java.lang.Throwable">
+</parameter>
+</constructor>
+</class>
+<class name="KeyPair"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="java.io.Serializable">
+</implements>
+<constructor name="KeyPair"
+ type="java.security.KeyPair"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="publicKey" type="java.security.PublicKey">
+</parameter>
+<parameter name="privateKey" type="java.security.PrivateKey">
+</parameter>
+</constructor>
+<method name="getPrivate"
+ return="java.security.PrivateKey"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getPublic"
+ return="java.security.PublicKey"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+</class>
+<class name="KeyPairGenerator"
+ extends="java.security.KeyPairGeneratorSpi"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="KeyPairGenerator"
+ type="java.security.KeyPairGenerator"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="algorithm" type="java.lang.String">
+</parameter>
+</constructor>
+<method name="genKeyPair"
+ return="java.security.KeyPair"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="generateKeyPair"
+ return="java.security.KeyPair"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getAlgorithm"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getInstance"
+ return="java.security.KeyPairGenerator"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="algorithm" type="java.lang.String">
+</parameter>
+<exception name="NoSuchAlgorithmException" type="java.security.NoSuchAlgorithmException">
+</exception>
+</method>
+<method name="getInstance"
+ return="java.security.KeyPairGenerator"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="algorithm" type="java.lang.String">
+</parameter>
+<parameter name="provider" type="java.lang.String">
+</parameter>
+<exception name="NoSuchAlgorithmException" type="java.security.NoSuchAlgorithmException">
+</exception>
+<exception name="NoSuchProviderException" type="java.security.NoSuchProviderException">
+</exception>
+</method>
+<method name="getInstance"
+ return="java.security.KeyPairGenerator"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="algorithm" type="java.lang.String">
+</parameter>
+<parameter name="provider" type="java.security.Provider">
+</parameter>
+<exception name="NoSuchAlgorithmException" type="java.security.NoSuchAlgorithmException">
+</exception>
+</method>
+<method name="getProvider"
+ return="java.security.Provider"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="initialize"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="keysize" type="int">
+</parameter>
+</method>
+<method name="initialize"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="param" type="java.security.spec.AlgorithmParameterSpec">
+</parameter>
+<exception name="InvalidAlgorithmParameterException" type="java.security.InvalidAlgorithmParameterException">
+</exception>
+</method>
+<method name="initialize"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="keysize" type="int">
+</parameter>
+<parameter name="random" type="java.security.SecureRandom">
+</parameter>
+</method>
+</class>
+<class name="KeyPairGeneratorSpi"
+ extends="java.lang.Object"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="KeyPairGeneratorSpi"
+ type="java.security.KeyPairGeneratorSpi"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<method name="generateKeyPair"
+ return="java.security.KeyPair"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="initialize"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="keysize" type="int">
+</parameter>
+<parameter name="random" type="java.security.SecureRandom">
+</parameter>
+</method>
+<method name="initialize"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="params" type="java.security.spec.AlgorithmParameterSpec">
+</parameter>
+<parameter name="random" type="java.security.SecureRandom">
+</parameter>
+<exception name="InvalidAlgorithmParameterException" type="java.security.InvalidAlgorithmParameterException">
+</exception>
+</method>
+</class>
+<class name="KeyRep"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="java.io.Serializable">
+</implements>
+<constructor name="KeyRep"
+ type="java.security.KeyRep"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="type" type="java.security.KeyRep.Type">
+</parameter>
+<parameter name="algorithm" type="java.lang.String">
+</parameter>
+<parameter name="format" type="java.lang.String">
+</parameter>
+<parameter name="encoded" type="byte[]">
+</parameter>
+</constructor>
+<method name="readResolve"
+ return="java.lang.Object"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<exception name="ObjectStreamException" type="java.io.ObjectStreamException">
+</exception>
+</method>
+</class>
+<class name="KeyRep.Type"
+ extends="java.lang.Enum"
+ abstract="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="valueOf"
+ return="java.security.KeyRep.Type"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+</method>
+<method name="values"
+ return="java.security.KeyRep.Type[]"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+</class>
+<class name="KeyStore"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="KeyStore"
+ type="java.security.KeyStore"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="keyStoreSpi" type="java.security.KeyStoreSpi">
+</parameter>
+<parameter name="provider" type="java.security.Provider">
+</parameter>
+<parameter name="type" type="java.lang.String">
+</parameter>
+</constructor>
+<method name="aliases"
+ return="java.util.Enumeration&lt;java.lang.String&gt;"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="KeyStoreException" type="java.security.KeyStoreException">
+</exception>
+</method>
+<method name="containsAlias"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="alias" type="java.lang.String">
+</parameter>
+<exception name="KeyStoreException" type="java.security.KeyStoreException">
+</exception>
+</method>
+<method name="deleteEntry"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="alias" type="java.lang.String">
+</parameter>
+<exception name="KeyStoreException" type="java.security.KeyStoreException">
+</exception>
+</method>
+<method name="entryInstanceOf"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="alias" type="java.lang.String">
+</parameter>
+<parameter name="entryClass" type="java.lang.Class&lt;? extends java.security.KeyStore.Entry&gt;">
+</parameter>
+<exception name="KeyStoreException" type="java.security.KeyStoreException">
+</exception>
+</method>
+<method name="getCertificate"
+ return="java.security.cert.Certificate"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="alias" type="java.lang.String">
+</parameter>
+<exception name="KeyStoreException" type="java.security.KeyStoreException">
+</exception>
+</method>
+<method name="getCertificateAlias"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="cert" type="java.security.cert.Certificate">
+</parameter>
+<exception name="KeyStoreException" type="java.security.KeyStoreException">
+</exception>
+</method>
+<method name="getCertificateChain"
+ return="java.security.cert.Certificate[]"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="alias" type="java.lang.String">
+</parameter>
+<exception name="KeyStoreException" type="java.security.KeyStoreException">
+</exception>
+</method>
+<method name="getCreationDate"
+ return="java.util.Date"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="alias" type="java.lang.String">
+</parameter>
+<exception name="KeyStoreException" type="java.security.KeyStoreException">
+</exception>
+</method>
+<method name="getDefaultType"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getEntry"
+ return="java.security.KeyStore.Entry"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="alias" type="java.lang.String">
+</parameter>
+<parameter name="param" type="java.security.KeyStore.ProtectionParameter">
+</parameter>
+<exception name="KeyStoreException" type="java.security.KeyStoreException">
+</exception>
+<exception name="NoSuchAlgorithmException" type="java.security.NoSuchAlgorithmException">
+</exception>
+<exception name="UnrecoverableEntryException" type="java.security.UnrecoverableEntryException">
+</exception>
+</method>
+<method name="getInstance"
+ return="java.security.KeyStore"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="type" type="java.lang.String">
+</parameter>
+<exception name="KeyStoreException" type="java.security.KeyStoreException">
+</exception>
+</method>
+<method name="getInstance"
+ return="java.security.KeyStore"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="type" type="java.lang.String">
+</parameter>
+<parameter name="provider" type="java.lang.String">
+</parameter>
+<exception name="KeyStoreException" type="java.security.KeyStoreException">
+</exception>
+<exception name="NoSuchProviderException" type="java.security.NoSuchProviderException">
+</exception>
+</method>
+<method name="getInstance"
+ return="java.security.KeyStore"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="type" type="java.lang.String">
+</parameter>
+<parameter name="provider" type="java.security.Provider">
+</parameter>
+<exception name="KeyStoreException" type="java.security.KeyStoreException">
+</exception>
+</method>
+<method name="getKey"
+ return="java.security.Key"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="alias" type="java.lang.String">
+</parameter>
+<parameter name="password" type="char[]">
+</parameter>
+<exception name="KeyStoreException" type="java.security.KeyStoreException">
+</exception>
+<exception name="NoSuchAlgorithmException" type="java.security.NoSuchAlgorithmException">
+</exception>
+<exception name="UnrecoverableKeyException" type="java.security.UnrecoverableKeyException">
+</exception>
+</method>
+<method name="getProvider"
+ return="java.security.Provider"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getType"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isCertificateEntry"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="alias" type="java.lang.String">
+</parameter>
+<exception name="KeyStoreException" type="java.security.KeyStoreException">
+</exception>
+</method>
+<method name="isKeyEntry"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="alias" type="java.lang.String">
+</parameter>
+<exception name="KeyStoreException" type="java.security.KeyStoreException">
+</exception>
+</method>
+<method name="load"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="stream" type="java.io.InputStream">
+</parameter>
+<parameter name="password" type="char[]">
+</parameter>
+<exception name="CertificateException" type="java.security.cert.CertificateException">
+</exception>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+<exception name="NoSuchAlgorithmException" type="java.security.NoSuchAlgorithmException">
+</exception>
+</method>
+<method name="load"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="param" type="java.security.KeyStore.LoadStoreParameter">
+</parameter>
+<exception name="CertificateException" type="java.security.cert.CertificateException">
+</exception>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+<exception name="NoSuchAlgorithmException" type="java.security.NoSuchAlgorithmException">
+</exception>
+</method>
+<method name="setCertificateEntry"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="alias" type="java.lang.String">
+</parameter>
+<parameter name="cert" type="java.security.cert.Certificate">
+</parameter>
+<exception name="KeyStoreException" type="java.security.KeyStoreException">
+</exception>
+</method>
+<method name="setEntry"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="alias" type="java.lang.String">
+</parameter>
+<parameter name="entry" type="java.security.KeyStore.Entry">
+</parameter>
+<parameter name="param" type="java.security.KeyStore.ProtectionParameter">
+</parameter>
+<exception name="KeyStoreException" type="java.security.KeyStoreException">
+</exception>
+</method>
+<method name="setKeyEntry"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="alias" type="java.lang.String">
+</parameter>
+<parameter name="key" type="java.security.Key">
+</parameter>
+<parameter name="password" type="char[]">
+</parameter>
+<parameter name="chain" type="java.security.cert.Certificate[]">
+</parameter>
+<exception name="KeyStoreException" type="java.security.KeyStoreException">
+</exception>
+</method>
+<method name="setKeyEntry"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="alias" type="java.lang.String">
+</parameter>
+<parameter name="key" type="byte[]">
+</parameter>
+<parameter name="chain" type="java.security.cert.Certificate[]">
+</parameter>
+<exception name="KeyStoreException" type="java.security.KeyStoreException">
+</exception>
+</method>
+<method name="size"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="KeyStoreException" type="java.security.KeyStoreException">
+</exception>
+</method>
+<method name="store"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="stream" type="java.io.OutputStream">
+</parameter>
+<parameter name="password" type="char[]">
+</parameter>
+<exception name="CertificateException" type="java.security.cert.CertificateException">
+</exception>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+<exception name="KeyStoreException" type="java.security.KeyStoreException">
+</exception>
+<exception name="NoSuchAlgorithmException" type="java.security.NoSuchAlgorithmException">
+</exception>
+</method>
+<method name="store"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="param" type="java.security.KeyStore.LoadStoreParameter">
+</parameter>
+<exception name="CertificateException" type="java.security.cert.CertificateException">
+</exception>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+<exception name="KeyStoreException" type="java.security.KeyStoreException">
+</exception>
+<exception name="NoSuchAlgorithmException" type="java.security.NoSuchAlgorithmException">
+</exception>
+</method>
+</class>
+<class name="KeyStore.Builder"
+ extends="java.lang.Object"
+ abstract="true"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="KeyStore.Builder"
+ type="java.security.KeyStore.Builder"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</constructor>
+<method name="getKeyStore"
+ return="java.security.KeyStore"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="KeyStoreException" type="java.security.KeyStoreException">
+</exception>
+</method>
+<method name="getProtectionParameter"
+ return="java.security.KeyStore.ProtectionParameter"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="alias" type="java.lang.String">
+</parameter>
+<exception name="KeyStoreException" type="java.security.KeyStoreException">
+</exception>
+</method>
+<method name="newInstance"
+ return="java.security.KeyStore.Builder"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="keyStore" type="java.security.KeyStore">
+</parameter>
+<parameter name="protectionParameter" type="java.security.KeyStore.ProtectionParameter">
+</parameter>
+</method>
+<method name="newInstance"
+ return="java.security.KeyStore.Builder"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="type" type="java.lang.String">
+</parameter>
+<parameter name="provider" type="java.security.Provider">
+</parameter>
+<parameter name="file" type="java.io.File">
+</parameter>
+<parameter name="protectionParameter" type="java.security.KeyStore.ProtectionParameter">
+</parameter>
+</method>
+<method name="newInstance"
+ return="java.security.KeyStore.Builder"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="type" type="java.lang.String">
+</parameter>
+<parameter name="provider" type="java.security.Provider">
+</parameter>
+<parameter name="protectionParameter" type="java.security.KeyStore.ProtectionParameter">
+</parameter>
+</method>
+</class>
+<class name="KeyStore.CallbackHandlerProtection"
+ extends="java.lang.Object"
+ abstract="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="java.security.KeyStore.ProtectionParameter">
+</implements>
+<constructor name="KeyStore.CallbackHandlerProtection"
+ type="java.security.KeyStore.CallbackHandlerProtection"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="handler" type="javax.security.auth.callback.CallbackHandler">
+</parameter>
+</constructor>
+<method name="getCallbackHandler"
+ return="javax.security.auth.callback.CallbackHandler"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+</class>
+<interface name="KeyStore.Entry"
+ abstract="true"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</interface>
+<interface name="KeyStore.LoadStoreParameter"
+ abstract="true"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="getProtectionParameter"
+ return="java.security.KeyStore.ProtectionParameter"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+</interface>
+<class name="KeyStore.PasswordProtection"
+ extends="java.lang.Object"
+ abstract="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="javax.security.auth.Destroyable">
+</implements>
+<implements name="java.security.KeyStore.ProtectionParameter">
+</implements>
+<constructor name="KeyStore.PasswordProtection"
+ type="java.security.KeyStore.PasswordProtection"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="password" type="char[]">
+</parameter>
+</constructor>
+<method name="destroy"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="DestroyFailedException" type="javax.security.auth.DestroyFailedException">
+</exception>
+</method>
+<method name="getPassword"
+ return="char[]"
+ abstract="false"
+ native="false"
+ synchronized="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isDestroyed"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+</class>
+<class name="KeyStore.PrivateKeyEntry"
+ extends="java.lang.Object"
+ abstract="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="java.security.KeyStore.Entry">
+</implements>
+<constructor name="KeyStore.PrivateKeyEntry"
+ type="java.security.KeyStore.PrivateKeyEntry"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="privateKey" type="java.security.PrivateKey">
+</parameter>
+<parameter name="chain" type="java.security.cert.Certificate[]">
+</parameter>
+</constructor>
+<method name="getCertificate"
+ return="java.security.cert.Certificate"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getCertificateChain"
+ return="java.security.cert.Certificate[]"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getPrivateKey"
+ return="java.security.PrivateKey"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+</class>
+<interface name="KeyStore.ProtectionParameter"
+ abstract="true"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</interface>
+<class name="KeyStore.SecretKeyEntry"
+ extends="java.lang.Object"
+ abstract="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="java.security.KeyStore.Entry">
+</implements>
+<constructor name="KeyStore.SecretKeyEntry"
+ type="java.security.KeyStore.SecretKeyEntry"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="secretKey" type="javax.crypto.SecretKey">
+</parameter>
+</constructor>
+<method name="getSecretKey"
+ return="javax.crypto.SecretKey"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+</class>
+<class name="KeyStore.TrustedCertificateEntry"
+ extends="java.lang.Object"
+ abstract="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="java.security.KeyStore.Entry">
+</implements>
+<constructor name="KeyStore.TrustedCertificateEntry"
+ type="java.security.KeyStore.TrustedCertificateEntry"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="trustCertificate" type="java.security.cert.Certificate">
+</parameter>
+</constructor>
+<method name="getTrustedCertificate"
+ return="java.security.cert.Certificate"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+</class>
+<class name="KeyStoreException"
+ extends="java.security.GeneralSecurityException"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="KeyStoreException"
+ type="java.security.KeyStoreException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="msg" type="java.lang.String">
+</parameter>
+</constructor>
+<constructor name="KeyStoreException"
+ type="java.security.KeyStoreException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<constructor name="KeyStoreException"
+ type="java.security.KeyStoreException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="message" type="java.lang.String">
+</parameter>
+<parameter name="cause" type="java.lang.Throwable">
+</parameter>
+</constructor>
+<constructor name="KeyStoreException"
+ type="java.security.KeyStoreException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="cause" type="java.lang.Throwable">
+</parameter>
+</constructor>
+</class>
+<class name="KeyStoreSpi"
+ extends="java.lang.Object"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="KeyStoreSpi"
+ type="java.security.KeyStoreSpi"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<method name="engineAliases"
+ return="java.util.Enumeration&lt;java.lang.String&gt;"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="engineContainsAlias"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="alias" type="java.lang.String">
+</parameter>
+</method>
+<method name="engineDeleteEntry"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="alias" type="java.lang.String">
+</parameter>
+<exception name="KeyStoreException" type="java.security.KeyStoreException">
+</exception>
+</method>
+<method name="engineEntryInstanceOf"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="alias" type="java.lang.String">
+</parameter>
+<parameter name="entryClass" type="java.lang.Class&lt;? extends java.security.KeyStore.Entry&gt;">
+</parameter>
+</method>
+<method name="engineGetCertificate"
+ return="java.security.cert.Certificate"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="alias" type="java.lang.String">
+</parameter>
+</method>
+<method name="engineGetCertificateAlias"
+ return="java.lang.String"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="cert" type="java.security.cert.Certificate">
+</parameter>
+</method>
+<method name="engineGetCertificateChain"
+ return="java.security.cert.Certificate[]"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="alias" type="java.lang.String">
+</parameter>
+</method>
+<method name="engineGetCreationDate"
+ return="java.util.Date"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="alias" type="java.lang.String">
+</parameter>
+</method>
+<method name="engineGetEntry"
+ return="java.security.KeyStore.Entry"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="alias" type="java.lang.String">
+</parameter>
+<parameter name="protParam" type="java.security.KeyStore.ProtectionParameter">
+</parameter>
+<exception name="KeyStoreException" type="java.security.KeyStoreException">
+</exception>
+<exception name="NoSuchAlgorithmException" type="java.security.NoSuchAlgorithmException">
+</exception>
+<exception name="UnrecoverableEntryException" type="java.security.UnrecoverableEntryException">
+</exception>
+</method>
+<method name="engineGetKey"
+ return="java.security.Key"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="alias" type="java.lang.String">
+</parameter>
+<parameter name="password" type="char[]">
+</parameter>
+<exception name="NoSuchAlgorithmException" type="java.security.NoSuchAlgorithmException">
+</exception>
+<exception name="UnrecoverableKeyException" type="java.security.UnrecoverableKeyException">
+</exception>
+</method>
+<method name="engineIsCertificateEntry"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="alias" type="java.lang.String">
+</parameter>
+</method>
+<method name="engineIsKeyEntry"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="alias" type="java.lang.String">
+</parameter>
+</method>
+<method name="engineLoad"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="stream" type="java.io.InputStream">
+</parameter>
+<parameter name="password" type="char[]">
+</parameter>
+<exception name="CertificateException" type="java.security.cert.CertificateException">
+</exception>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+<exception name="NoSuchAlgorithmException" type="java.security.NoSuchAlgorithmException">
+</exception>
+</method>
+<method name="engineLoad"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="param" type="java.security.KeyStore.LoadStoreParameter">
+</parameter>
+<exception name="CertificateException" type="java.security.cert.CertificateException">
+</exception>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+<exception name="NoSuchAlgorithmException" type="java.security.NoSuchAlgorithmException">
+</exception>
+</method>
+<method name="engineSetCertificateEntry"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="alias" type="java.lang.String">
+</parameter>
+<parameter name="cert" type="java.security.cert.Certificate">
+</parameter>
+<exception name="KeyStoreException" type="java.security.KeyStoreException">
+</exception>
+</method>
+<method name="engineSetEntry"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="alias" type="java.lang.String">
+</parameter>
+<parameter name="entry" type="java.security.KeyStore.Entry">
+</parameter>
+<parameter name="protParam" type="java.security.KeyStore.ProtectionParameter">
+</parameter>
+<exception name="KeyStoreException" type="java.security.KeyStoreException">
+</exception>
+</method>
+<method name="engineSetKeyEntry"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="alias" type="java.lang.String">
+</parameter>
+<parameter name="key" type="java.security.Key">
+</parameter>
+<parameter name="password" type="char[]">
+</parameter>
+<parameter name="chain" type="java.security.cert.Certificate[]">
+</parameter>
+<exception name="KeyStoreException" type="java.security.KeyStoreException">
+</exception>
+</method>
+<method name="engineSetKeyEntry"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="alias" type="java.lang.String">
+</parameter>
+<parameter name="key" type="byte[]">
+</parameter>
+<parameter name="chain" type="java.security.cert.Certificate[]">
+</parameter>
+<exception name="KeyStoreException" type="java.security.KeyStoreException">
+</exception>
+</method>
+<method name="engineSize"
+ return="int"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="engineStore"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="stream" type="java.io.OutputStream">
+</parameter>
+<parameter name="password" type="char[]">
+</parameter>
+<exception name="CertificateException" type="java.security.cert.CertificateException">
+</exception>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+<exception name="NoSuchAlgorithmException" type="java.security.NoSuchAlgorithmException">
+</exception>
+</method>
+<method name="engineStore"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="param" type="java.security.KeyStore.LoadStoreParameter">
+</parameter>
+<exception name="CertificateException" type="java.security.cert.CertificateException">
+</exception>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+<exception name="NoSuchAlgorithmException" type="java.security.NoSuchAlgorithmException">
+</exception>
+</method>
+</class>
+<class name="MessageDigest"
+ extends="java.security.MessageDigestSpi"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="MessageDigest"
+ type="java.security.MessageDigest"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="algorithm" type="java.lang.String">
+</parameter>
+</constructor>
+<method name="digest"
+ return="byte[]"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="digest"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="buf" type="byte[]">
+</parameter>
+<parameter name="offset" type="int">
+</parameter>
+<parameter name="len" type="int">
+</parameter>
+<exception name="DigestException" type="java.security.DigestException">
+</exception>
+</method>
+<method name="digest"
+ return="byte[]"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="input" type="byte[]">
+</parameter>
+</method>
+<method name="getAlgorithm"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getDigestLength"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getInstance"
+ return="java.security.MessageDigest"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="algorithm" type="java.lang.String">
+</parameter>
+<exception name="NoSuchAlgorithmException" type="java.security.NoSuchAlgorithmException">
+</exception>
+</method>
+<method name="getInstance"
+ return="java.security.MessageDigest"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="algorithm" type="java.lang.String">
+</parameter>
+<parameter name="provider" type="java.lang.String">
+</parameter>
+<exception name="NoSuchAlgorithmException" type="java.security.NoSuchAlgorithmException">
+</exception>
+<exception name="NoSuchProviderException" type="java.security.NoSuchProviderException">
+</exception>
+</method>
+<method name="getInstance"
+ return="java.security.MessageDigest"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="algorithm" type="java.lang.String">
+</parameter>
+<parameter name="provider" type="java.security.Provider">
+</parameter>
+<exception name="NoSuchAlgorithmException" type="java.security.NoSuchAlgorithmException">
+</exception>
+</method>
+<method name="getProvider"
+ return="java.security.Provider"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isEqual"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="digesta" type="byte[]">
+</parameter>
+<parameter name="digestb" type="byte[]">
+</parameter>
+</method>
+<method name="reset"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="update"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="arg0" type="byte">
+</parameter>
+</method>
+<method name="update"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="input" type="byte[]">
+</parameter>
+<parameter name="offset" type="int">
+</parameter>
+<parameter name="len" type="int">
+</parameter>
+</method>
+<method name="update"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="input" type="byte[]">
+</parameter>
+</method>
+<method name="update"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="input" type="java.nio.ByteBuffer">
+</parameter>
+</method>
+</class>
+<class name="MessageDigestSpi"
+ extends="java.lang.Object"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="MessageDigestSpi"
+ type="java.security.MessageDigestSpi"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<method name="clone"
+ return="java.lang.Object"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="CloneNotSupportedException" type="java.lang.CloneNotSupportedException">
+</exception>
+</method>
+<method name="engineDigest"
+ return="byte[]"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</method>
+<method name="engineDigest"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="buf" type="byte[]">
+</parameter>
+<parameter name="offset" type="int">
+</parameter>
+<parameter name="len" type="int">
+</parameter>
+<exception name="DigestException" type="java.security.DigestException">
+</exception>
+</method>
+<method name="engineGetDigestLength"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</method>
+<method name="engineReset"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</method>
+<method name="engineUpdate"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="input" type="byte">
+</parameter>
+</method>
+<method name="engineUpdate"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="input" type="byte[]">
+</parameter>
+<parameter name="offset" type="int">
+</parameter>
+<parameter name="len" type="int">
+</parameter>
+</method>
+<method name="engineUpdate"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="input" type="java.nio.ByteBuffer">
+</parameter>
+</method>
+</class>
+<class name="NoSuchAlgorithmException"
+ extends="java.security.GeneralSecurityException"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="NoSuchAlgorithmException"
+ type="java.security.NoSuchAlgorithmException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="msg" type="java.lang.String">
+</parameter>
+</constructor>
+<constructor name="NoSuchAlgorithmException"
+ type="java.security.NoSuchAlgorithmException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<constructor name="NoSuchAlgorithmException"
+ type="java.security.NoSuchAlgorithmException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="message" type="java.lang.String">
+</parameter>
+<parameter name="cause" type="java.lang.Throwable">
+</parameter>
+</constructor>
+<constructor name="NoSuchAlgorithmException"
+ type="java.security.NoSuchAlgorithmException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="cause" type="java.lang.Throwable">
+</parameter>
+</constructor>
+</class>
+<class name="NoSuchProviderException"
+ extends="java.security.GeneralSecurityException"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="NoSuchProviderException"
+ type="java.security.NoSuchProviderException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="msg" type="java.lang.String">
+</parameter>
+</constructor>
+<constructor name="NoSuchProviderException"
+ type="java.security.NoSuchProviderException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+</class>
+<class name="Permission"
+ extends="java.lang.Object"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="java.security.Guard">
+</implements>
+<implements name="java.io.Serializable">
+</implements>
+<constructor name="Permission"
+ type="java.security.Permission"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+</constructor>
+<method name="checkGuard"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="obj" type="java.lang.Object">
+</parameter>
+<exception name="SecurityException" type="java.lang.SecurityException">
+</exception>
+</method>
+<method name="equals"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="obj" type="java.lang.Object">
+</parameter>
+</method>
+<method name="getActions"
+ return="java.lang.String"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getName"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="hashCode"
+ return="int"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="implies"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="permission" type="java.security.Permission">
+</parameter>
+</method>
+<method name="newPermissionCollection"
+ return="java.security.PermissionCollection"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+</class>
+<class name="PermissionCollection"
+ extends="java.lang.Object"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="java.io.Serializable">
+</implements>
+<constructor name="PermissionCollection"
+ type="java.security.PermissionCollection"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<method name="add"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="permission" type="java.security.Permission">
+</parameter>
+</method>
+<method name="elements"
+ return="java.util.Enumeration&lt;java.security.Permission&gt;"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="implies"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="permission" type="java.security.Permission">
+</parameter>
+</method>
+<method name="isReadOnly"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="setReadOnly"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+</class>
+<class name="Permissions"
+ extends="java.security.PermissionCollection"
+ abstract="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="java.io.Serializable">
+</implements>
+<constructor name="Permissions"
+ type="java.security.Permissions"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<method name="add"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="permission" type="java.security.Permission">
+</parameter>
+</method>
+<method name="elements"
+ return="java.util.Enumeration&lt;java.security.Permission&gt;"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="implies"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="permission" type="java.security.Permission">
+</parameter>
+</method>
+</class>
+<class name="Policy"
+ extends="java.lang.Object"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="Policy"
+ type="java.security.Policy"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<method name="getPermissions"
+ return="java.security.PermissionCollection"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="cs" type="java.security.CodeSource">
+</parameter>
+</method>
+<method name="getPermissions"
+ return="java.security.PermissionCollection"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="domain" type="java.security.ProtectionDomain">
+</parameter>
+</method>
+<method name="getPolicy"
+ return="java.security.Policy"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="implies"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="domain" type="java.security.ProtectionDomain">
+</parameter>
+<parameter name="permission" type="java.security.Permission">
+</parameter>
+</method>
+<method name="refresh"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="setPolicy"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="policy" type="java.security.Policy">
+</parameter>
+</method>
+</class>
+<interface name="Principal"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="equals"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="obj" type="java.lang.Object">
+</parameter>
+</method>
+<method name="getName"
+ return="java.lang.String"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="hashCode"
+ return="int"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="toString"
+ return="java.lang.String"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+</interface>
+<interface name="PrivateKey"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="java.security.Key">
+</implements>
+<field name="serialVersionUID"
+ type="long"
+ transient="false"
+ volatile="false"
+ value="6034044314589513430L"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</interface>
+<interface name="PrivilegedAction"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="run"
+ return="T"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+</interface>
+<class name="PrivilegedActionException"
+ extends="java.lang.Exception"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="PrivilegedActionException"
+ type="java.security.PrivilegedActionException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="ex" type="java.lang.Exception">
+</parameter>
+</constructor>
+<method name="getException"
+ return="java.lang.Exception"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+</class>
+<interface name="PrivilegedExceptionAction"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="run"
+ return="T"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="Exception" type="java.lang.Exception">
+</exception>
+</method>
+</interface>
+<class name="ProtectionDomain"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="ProtectionDomain"
+ type="java.security.ProtectionDomain"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="cs" type="java.security.CodeSource">
+</parameter>
+<parameter name="permissions" type="java.security.PermissionCollection">
+</parameter>
+</constructor>
+<constructor name="ProtectionDomain"
+ type="java.security.ProtectionDomain"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="cs" type="java.security.CodeSource">
+</parameter>
+<parameter name="permissions" type="java.security.PermissionCollection">
+</parameter>
+<parameter name="cl" type="java.lang.ClassLoader">
+</parameter>
+<parameter name="principals" type="java.security.Principal[]">
+</parameter>
+</constructor>
+<method name="getClassLoader"
+ return="java.lang.ClassLoader"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getCodeSource"
+ return="java.security.CodeSource"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getPermissions"
+ return="java.security.PermissionCollection"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getPrincipals"
+ return="java.security.Principal[]"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="implies"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="permission" type="java.security.Permission">
+</parameter>
+</method>
+</class>
+<class name="Provider"
+ extends="java.util.Properties"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="Provider"
+ type="java.security.Provider"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+<parameter name="version" type="double">
+</parameter>
+<parameter name="info" type="java.lang.String">
+</parameter>
+</constructor>
+<method name="getInfo"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getName"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getService"
+ return="java.security.Provider.Service"
+ abstract="false"
+ native="false"
+ synchronized="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="type" type="java.lang.String">
+</parameter>
+<parameter name="algorithm" type="java.lang.String">
+</parameter>
+</method>
+<method name="getServices"
+ return="java.util.Set&lt;java.security.Provider.Service&gt;"
+ abstract="false"
+ native="false"
+ synchronized="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getVersion"
+ return="double"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="put"
+ return="java.lang.Object"
+ abstract="false"
+ native="false"
+ synchronized="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="key" type="java.lang.Object">
+</parameter>
+<parameter name="value" type="java.lang.Object">
+</parameter>
+</method>
+<method name="putAll"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="t" type="java.util.Map&lt;?, ?&gt;">
+</parameter>
+</method>
+<method name="putService"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="s" type="java.security.Provider.Service">
+</parameter>
+</method>
+<method name="removeService"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="s" type="java.security.Provider.Service">
+</parameter>
+</method>
+</class>
+<class name="Provider.Service"
+ extends="java.lang.Object"
+ abstract="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="Provider.Service"
+ type="java.security.Provider.Service"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="provider" type="java.security.Provider">
+</parameter>
+<parameter name="type" type="java.lang.String">
+</parameter>
+<parameter name="algorithm" type="java.lang.String">
+</parameter>
+<parameter name="className" type="java.lang.String">
+</parameter>
+<parameter name="aliases" type="java.util.List&lt;java.lang.String&gt;">
+</parameter>
+<parameter name="attributes" type="java.util.Map&lt;java.lang.String, java.lang.String&gt;">
+</parameter>
+</constructor>
+<method name="getAlgorithm"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getAttribute"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+</method>
+<method name="getClassName"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getProvider"
+ return="java.security.Provider"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getType"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="newInstance"
+ return="java.lang.Object"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="constructorParameter" type="java.lang.Object">
+</parameter>
+<exception name="NoSuchAlgorithmException" type="java.security.NoSuchAlgorithmException">
+</exception>
+</method>
+<method name="supportsParameter"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="parameter" type="java.lang.Object">
+</parameter>
+</method>
+</class>
+<class name="ProviderException"
+ extends="java.lang.RuntimeException"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="ProviderException"
+ type="java.security.ProviderException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="msg" type="java.lang.String">
+</parameter>
+</constructor>
+<constructor name="ProviderException"
+ type="java.security.ProviderException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<constructor name="ProviderException"
+ type="java.security.ProviderException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="message" type="java.lang.String">
+</parameter>
+<parameter name="cause" type="java.lang.Throwable">
+</parameter>
+</constructor>
+<constructor name="ProviderException"
+ type="java.security.ProviderException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="cause" type="java.lang.Throwable">
+</parameter>
+</constructor>
+</class>
+<interface name="PublicKey"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="java.security.Key">
+</implements>
+<field name="serialVersionUID"
+ type="long"
+ transient="false"
+ volatile="false"
+ value="7187392471159151072L"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</interface>
+<class name="SecureClassLoader"
+ extends="java.lang.ClassLoader"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="SecureClassLoader"
+ type="java.security.SecureClassLoader"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</constructor>
+<constructor name="SecureClassLoader"
+ type="java.security.SecureClassLoader"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="parent" type="java.lang.ClassLoader">
+</parameter>
+</constructor>
+<method name="defineClass"
+ return="java.lang.Class&lt;?&gt;"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+<parameter name="b" type="byte[]">
+</parameter>
+<parameter name="off" type="int">
+</parameter>
+<parameter name="len" type="int">
+</parameter>
+<parameter name="cs" type="java.security.CodeSource">
+</parameter>
+</method>
+<method name="defineClass"
+ return="java.lang.Class&lt;?&gt;"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+<parameter name="b" type="java.nio.ByteBuffer">
+</parameter>
+<parameter name="cs" type="java.security.CodeSource">
+</parameter>
+</method>
+<method name="getPermissions"
+ return="java.security.PermissionCollection"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="codesource" type="java.security.CodeSource">
+</parameter>
+</method>
+</class>
+<class name="SecureRandom"
+ extends="java.util.Random"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="SecureRandom"
+ type="java.security.SecureRandom"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<constructor name="SecureRandom"
+ type="java.security.SecureRandom"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="seed" type="byte[]">
+</parameter>
+</constructor>
+<constructor name="SecureRandom"
+ type="java.security.SecureRandom"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="secureRandomSpi" type="java.security.SecureRandomSpi">
+</parameter>
+<parameter name="provider" type="java.security.Provider">
+</parameter>
+</constructor>
+<method name="generateSeed"
+ return="byte[]"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="numBytes" type="int">
+</parameter>
+</method>
+<method name="getAlgorithm"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getInstance"
+ return="java.security.SecureRandom"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="algorithm" type="java.lang.String">
+</parameter>
+<exception name="NoSuchAlgorithmException" type="java.security.NoSuchAlgorithmException">
+</exception>
+</method>
+<method name="getInstance"
+ return="java.security.SecureRandom"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="algorithm" type="java.lang.String">
+</parameter>
+<parameter name="provider" type="java.lang.String">
+</parameter>
+<exception name="NoSuchAlgorithmException" type="java.security.NoSuchAlgorithmException">
+</exception>
+<exception name="NoSuchProviderException" type="java.security.NoSuchProviderException">
+</exception>
+</method>
+<method name="getInstance"
+ return="java.security.SecureRandom"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="algorithm" type="java.lang.String">
+</parameter>
+<parameter name="provider" type="java.security.Provider">
+</parameter>
+<exception name="NoSuchAlgorithmException" type="java.security.NoSuchAlgorithmException">
+</exception>
+</method>
+<method name="getProvider"
+ return="java.security.Provider"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getSeed"
+ return="byte[]"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="numBytes" type="int">
+</parameter>
+</method>
+<method name="next"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="numBits" type="int">
+</parameter>
+</method>
+<method name="setSeed"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="seed" type="byte[]">
+</parameter>
+</method>
+</class>
+<class name="SecureRandomSpi"
+ extends="java.lang.Object"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="java.io.Serializable">
+</implements>
+<constructor name="SecureRandomSpi"
+ type="java.security.SecureRandomSpi"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<method name="engineGenerateSeed"
+ return="byte[]"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="numBytes" type="int">
+</parameter>
+</method>
+<method name="engineNextBytes"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="bytes" type="byte[]">
+</parameter>
+</method>
+<method name="engineSetSeed"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="seed" type="byte[]">
+</parameter>
+</method>
+</class>
+<class name="Security"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="addProvider"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="provider" type="java.security.Provider">
+</parameter>
+</method>
+<method name="getAlgorithmProperty"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="deprecated"
+ visibility="public"
+>
+<parameter name="algName" type="java.lang.String">
+</parameter>
+<parameter name="propName" type="java.lang.String">
+</parameter>
+</method>
+<method name="getAlgorithms"
+ return="java.util.Set&lt;java.lang.String&gt;"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="serviceName" type="java.lang.String">
+</parameter>
+</method>
+<method name="getProperty"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="key" type="java.lang.String">
+</parameter>
+</method>
+<method name="getProvider"
+ return="java.security.Provider"
+ abstract="false"
+ native="false"
+ synchronized="true"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+</method>
+<method name="getProviders"
+ return="java.security.Provider[]"
+ abstract="false"
+ native="false"
+ synchronized="true"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getProviders"
+ return="java.security.Provider[]"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="filter" type="java.lang.String">
+</parameter>
+</method>
+<method name="getProviders"
+ return="java.security.Provider[]"
+ abstract="false"
+ native="false"
+ synchronized="true"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="filter" type="java.util.Map&lt;java.lang.String, java.lang.String&gt;">
+</parameter>
+</method>
+<method name="insertProviderAt"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="true"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="provider" type="java.security.Provider">
+</parameter>
+<parameter name="position" type="int">
+</parameter>
+</method>
+<method name="removeProvider"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="true"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+</method>
+<method name="setProperty"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="key" type="java.lang.String">
+</parameter>
+<parameter name="datnum" type="java.lang.String">
+</parameter>
+</method>
+</class>
+<class name="SecurityPermission"
+ extends="java.security.BasicPermission"
+ abstract="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="SecurityPermission"
+ type="java.security.SecurityPermission"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+</constructor>
+<constructor name="SecurityPermission"
+ type="java.security.SecurityPermission"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+<parameter name="action" type="java.lang.String">
+</parameter>
+</constructor>
+</class>
+<class name="Signature"
+ extends="java.security.SignatureSpi"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="Signature"
+ type="java.security.Signature"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="algorithm" type="java.lang.String">
+</parameter>
+</constructor>
+<method name="getAlgorithm"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getInstance"
+ return="java.security.Signature"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="algorithm" type="java.lang.String">
+</parameter>
+<exception name="NoSuchAlgorithmException" type="java.security.NoSuchAlgorithmException">
+</exception>
+</method>
+<method name="getInstance"
+ return="java.security.Signature"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="algorithm" type="java.lang.String">
+</parameter>
+<parameter name="provider" type="java.lang.String">
+</parameter>
+<exception name="NoSuchAlgorithmException" type="java.security.NoSuchAlgorithmException">
+</exception>
+<exception name="NoSuchProviderException" type="java.security.NoSuchProviderException">
+</exception>
+</method>
+<method name="getInstance"
+ return="java.security.Signature"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="algorithm" type="java.lang.String">
+</parameter>
+<parameter name="provider" type="java.security.Provider">
+</parameter>
+<exception name="NoSuchAlgorithmException" type="java.security.NoSuchAlgorithmException">
+</exception>
+</method>
+<method name="getParameter"
+ return="java.lang.Object"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="deprecated"
+ visibility="public"
+>
+<parameter name="param" type="java.lang.String">
+</parameter>
+<exception name="InvalidParameterException" type="java.security.InvalidParameterException">
+</exception>
+</method>
+<method name="getParameters"
+ return="java.security.AlgorithmParameters"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getProvider"
+ return="java.security.Provider"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="initSign"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="privateKey" type="java.security.PrivateKey">
+</parameter>
+<exception name="InvalidKeyException" type="java.security.InvalidKeyException">
+</exception>
+</method>
+<method name="initSign"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="privateKey" type="java.security.PrivateKey">
+</parameter>
+<parameter name="random" type="java.security.SecureRandom">
+</parameter>
+<exception name="InvalidKeyException" type="java.security.InvalidKeyException">
+</exception>
+</method>
+<method name="initVerify"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="publicKey" type="java.security.PublicKey">
+</parameter>
+<exception name="InvalidKeyException" type="java.security.InvalidKeyException">
+</exception>
+</method>
+<method name="initVerify"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="certificate" type="java.security.cert.Certificate">
+</parameter>
+<exception name="InvalidKeyException" type="java.security.InvalidKeyException">
+</exception>
+</method>
+<method name="setParameter"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="deprecated"
+ visibility="public"
+>
+<parameter name="param" type="java.lang.String">
+</parameter>
+<parameter name="value" type="java.lang.Object">
+</parameter>
+<exception name="InvalidParameterException" type="java.security.InvalidParameterException">
+</exception>
+</method>
+<method name="setParameter"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="params" type="java.security.spec.AlgorithmParameterSpec">
+</parameter>
+<exception name="InvalidAlgorithmParameterException" type="java.security.InvalidAlgorithmParameterException">
+</exception>
+</method>
+<method name="sign"
+ return="byte[]"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="SignatureException" type="java.security.SignatureException">
+</exception>
+</method>
+<method name="sign"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="outbuf" type="byte[]">
+</parameter>
+<parameter name="offset" type="int">
+</parameter>
+<parameter name="len" type="int">
+</parameter>
+<exception name="SignatureException" type="java.security.SignatureException">
+</exception>
+</method>
+<method name="update"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="b" type="byte">
+</parameter>
+<exception name="SignatureException" type="java.security.SignatureException">
+</exception>
+</method>
+<method name="update"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="data" type="byte[]">
+</parameter>
+<exception name="SignatureException" type="java.security.SignatureException">
+</exception>
+</method>
+<method name="update"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="data" type="byte[]">
+</parameter>
+<parameter name="off" type="int">
+</parameter>
+<parameter name="len" type="int">
+</parameter>
+<exception name="SignatureException" type="java.security.SignatureException">
+</exception>
+</method>
+<method name="update"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="data" type="java.nio.ByteBuffer">
+</parameter>
+<exception name="SignatureException" type="java.security.SignatureException">
+</exception>
+</method>
+<method name="verify"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="signature" type="byte[]">
+</parameter>
+<exception name="SignatureException" type="java.security.SignatureException">
+</exception>
+</method>
+<method name="verify"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="signature" type="byte[]">
+</parameter>
+<parameter name="offset" type="int">
+</parameter>
+<parameter name="length" type="int">
+</parameter>
+<exception name="SignatureException" type="java.security.SignatureException">
+</exception>
+</method>
+<field name="SIGN"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</field>
+<field name="UNINITIALIZED"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="0"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</field>
+<field name="VERIFY"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="3"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</field>
+<field name="state"
+ type="int"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</field>
+</class>
+<class name="SignatureException"
+ extends="java.security.GeneralSecurityException"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="SignatureException"
+ type="java.security.SignatureException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="msg" type="java.lang.String">
+</parameter>
+</constructor>
+<constructor name="SignatureException"
+ type="java.security.SignatureException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<constructor name="SignatureException"
+ type="java.security.SignatureException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="message" type="java.lang.String">
+</parameter>
+<parameter name="cause" type="java.lang.Throwable">
+</parameter>
+</constructor>
+<constructor name="SignatureException"
+ type="java.security.SignatureException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="cause" type="java.lang.Throwable">
+</parameter>
+</constructor>
+</class>
+<class name="SignatureSpi"
+ extends="java.lang.Object"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="SignatureSpi"
+ type="java.security.SignatureSpi"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<method name="clone"
+ return="java.lang.Object"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="CloneNotSupportedException" type="java.lang.CloneNotSupportedException">
+</exception>
+</method>
+<method name="engineGetParameter"
+ return="java.lang.Object"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="deprecated"
+ visibility="protected"
+>
+<parameter name="param" type="java.lang.String">
+</parameter>
+<exception name="InvalidParameterException" type="java.security.InvalidParameterException">
+</exception>
+</method>
+<method name="engineGetParameters"
+ return="java.security.AlgorithmParameters"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</method>
+<method name="engineInitSign"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="privateKey" type="java.security.PrivateKey">
+</parameter>
+<exception name="InvalidKeyException" type="java.security.InvalidKeyException">
+</exception>
+</method>
+<method name="engineInitSign"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="privateKey" type="java.security.PrivateKey">
+</parameter>
+<parameter name="random" type="java.security.SecureRandom">
+</parameter>
+<exception name="InvalidKeyException" type="java.security.InvalidKeyException">
+</exception>
+</method>
+<method name="engineInitVerify"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="publicKey" type="java.security.PublicKey">
+</parameter>
+<exception name="InvalidKeyException" type="java.security.InvalidKeyException">
+</exception>
+</method>
+<method name="engineSetParameter"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="deprecated"
+ visibility="protected"
+>
+<parameter name="param" type="java.lang.String">
+</parameter>
+<parameter name="value" type="java.lang.Object">
+</parameter>
+<exception name="InvalidParameterException" type="java.security.InvalidParameterException">
+</exception>
+</method>
+<method name="engineSetParameter"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="params" type="java.security.spec.AlgorithmParameterSpec">
+</parameter>
+<exception name="InvalidAlgorithmParameterException" type="java.security.InvalidAlgorithmParameterException">
+</exception>
+</method>
+<method name="engineSign"
+ return="byte[]"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<exception name="SignatureException" type="java.security.SignatureException">
+</exception>
+</method>
+<method name="engineSign"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="outbuf" type="byte[]">
+</parameter>
+<parameter name="offset" type="int">
+</parameter>
+<parameter name="len" type="int">
+</parameter>
+<exception name="SignatureException" type="java.security.SignatureException">
+</exception>
+</method>
+<method name="engineUpdate"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="b" type="byte">
+</parameter>
+<exception name="SignatureException" type="java.security.SignatureException">
+</exception>
+</method>
+<method name="engineUpdate"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="b" type="byte[]">
+</parameter>
+<parameter name="off" type="int">
+</parameter>
+<parameter name="len" type="int">
+</parameter>
+<exception name="SignatureException" type="java.security.SignatureException">
+</exception>
+</method>
+<method name="engineUpdate"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="input" type="java.nio.ByteBuffer">
+</parameter>
+</method>
+<method name="engineVerify"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="sigBytes" type="byte[]">
+</parameter>
+<exception name="SignatureException" type="java.security.SignatureException">
+</exception>
+</method>
+<method name="engineVerify"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="sigBytes" type="byte[]">
+</parameter>
+<parameter name="offset" type="int">
+</parameter>
+<parameter name="length" type="int">
+</parameter>
+<exception name="SignatureException" type="java.security.SignatureException">
+</exception>
+</method>
+<field name="appRandom"
+ type="java.security.SecureRandom"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</field>
+</class>
+<class name="SignedObject"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="java.io.Serializable">
+</implements>
+<constructor name="SignedObject"
+ type="java.security.SignedObject"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="object" type="java.io.Serializable">
+</parameter>
+<parameter name="signingKey" type="java.security.PrivateKey">
+</parameter>
+<parameter name="signingEngine" type="java.security.Signature">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+<exception name="InvalidKeyException" type="java.security.InvalidKeyException">
+</exception>
+<exception name="SignatureException" type="java.security.SignatureException">
+</exception>
+</constructor>
+<method name="getAlgorithm"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getObject"
+ return="java.lang.Object"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="ClassNotFoundException" type="java.lang.ClassNotFoundException">
+</exception>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="getSignature"
+ return="byte[]"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="verify"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="verificationKey" type="java.security.PublicKey">
+</parameter>
+<parameter name="verificationEngine" type="java.security.Signature">
+</parameter>
+<exception name="InvalidKeyException" type="java.security.InvalidKeyException">
+</exception>
+<exception name="SignatureException" type="java.security.SignatureException">
+</exception>
+</method>
+</class>
+<class name="Signer"
+ extends="java.security.Identity"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="deprecated"
+ visibility="public"
+>
+<constructor name="Signer"
+ type="java.security.Signer"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</constructor>
+<constructor name="Signer"
+ type="java.security.Signer"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+</constructor>
+<constructor name="Signer"
+ type="java.security.Signer"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+<parameter name="scope" type="java.security.IdentityScope">
+</parameter>
+<exception name="KeyManagementException" type="java.security.KeyManagementException">
+</exception>
+</constructor>
+<method name="getPrivateKey"
+ return="java.security.PrivateKey"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="setKeyPair"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="pair" type="java.security.KeyPair">
+</parameter>
+<exception name="InvalidParameterException" type="java.security.InvalidParameterException">
+</exception>
+<exception name="KeyException" type="java.security.KeyException">
+</exception>
+</method>
+</class>
+<class name="Timestamp"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="java.io.Serializable">
+</implements>
+<constructor name="Timestamp"
+ type="java.security.Timestamp"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="timestamp" type="java.util.Date">
+</parameter>
+<parameter name="signerCertPath" type="java.security.cert.CertPath">
+</parameter>
+</constructor>
+<method name="getSignerCertPath"
+ return="java.security.cert.CertPath"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getTimestamp"
+ return="java.util.Date"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+</class>
+<class name="UnrecoverableEntryException"
+ extends="java.security.GeneralSecurityException"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="UnrecoverableEntryException"
+ type="java.security.UnrecoverableEntryException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<constructor name="UnrecoverableEntryException"
+ type="java.security.UnrecoverableEntryException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="msg" type="java.lang.String">
+</parameter>
+</constructor>
+</class>
+<class name="UnrecoverableKeyException"
+ extends="java.security.GeneralSecurityException"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="UnrecoverableKeyException"
+ type="java.security.UnrecoverableKeyException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="msg" type="java.lang.String">
+</parameter>
+</constructor>
+<constructor name="UnrecoverableKeyException"
+ type="java.security.UnrecoverableKeyException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+</class>
+<class name="UnresolvedPermission"
+ extends="java.security.Permission"
+ abstract="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="java.io.Serializable">
+</implements>
+<constructor name="UnresolvedPermission"
+ type="java.security.UnresolvedPermission"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="type" type="java.lang.String">
+</parameter>
+<parameter name="name" type="java.lang.String">
+</parameter>
+<parameter name="actions" type="java.lang.String">
+</parameter>
+<parameter name="certs" type="java.security.cert.Certificate[]">
+</parameter>
+</constructor>
+<method name="equals"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="obj" type="java.lang.Object">
+</parameter>
+</method>
+<method name="getActions"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getUnresolvedActions"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getUnresolvedCerts"
+ return="java.security.cert.Certificate[]"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getUnresolvedName"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getUnresolvedType"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="hashCode"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="implies"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="permission" type="java.security.Permission">
+</parameter>
+</method>
+</class>
+</package>
+<package name="java.security.acl"
+>
+<interface name="Acl"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="java.security.acl.Owner">
+</implements>
+<method name="addEntry"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="caller" type="java.security.Principal">
+</parameter>
+<parameter name="entry" type="java.security.acl.AclEntry">
+</parameter>
+<exception name="NotOwnerException" type="java.security.acl.NotOwnerException">
+</exception>
+</method>
+<method name="checkPermission"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="principal" type="java.security.Principal">
+</parameter>
+<parameter name="permission" type="java.security.acl.Permission">
+</parameter>
+</method>
+<method name="entries"
+ return="java.util.Enumeration&lt;java.security.acl.AclEntry&gt;"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getName"
+ return="java.lang.String"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getPermissions"
+ return="java.util.Enumeration&lt;java.security.acl.Permission&gt;"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="user" type="java.security.Principal">
+</parameter>
+</method>
+<method name="removeEntry"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="caller" type="java.security.Principal">
+</parameter>
+<parameter name="entry" type="java.security.acl.AclEntry">
+</parameter>
+<exception name="NotOwnerException" type="java.security.acl.NotOwnerException">
+</exception>
+</method>
+<method name="setName"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="caller" type="java.security.Principal">
+</parameter>
+<parameter name="name" type="java.lang.String">
+</parameter>
+<exception name="NotOwnerException" type="java.security.acl.NotOwnerException">
+</exception>
+</method>
+<method name="toString"
+ return="java.lang.String"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+</interface>
+<interface name="AclEntry"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="java.lang.Cloneable">
+</implements>
+<method name="addPermission"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="permission" type="java.security.acl.Permission">
+</parameter>
+</method>
+<method name="checkPermission"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="permission" type="java.security.acl.Permission">
+</parameter>
+</method>
+<method name="clone"
+ return="java.lang.Object"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getPrincipal"
+ return="java.security.Principal"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isNegative"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="permissions"
+ return="java.util.Enumeration&lt;java.security.acl.Permission&gt;"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="removePermission"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="permission" type="java.security.acl.Permission">
+</parameter>
+</method>
+<method name="setNegativePermissions"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="setPrincipal"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="user" type="java.security.Principal">
+</parameter>
+</method>
+<method name="toString"
+ return="java.lang.String"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+</interface>
+<class name="AclNotFoundException"
+ extends="java.lang.Exception"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="AclNotFoundException"
+ type="java.security.acl.AclNotFoundException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+</class>
+<interface name="Group"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="java.security.Principal">
+</implements>
+<method name="addMember"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="user" type="java.security.Principal">
+</parameter>
+</method>
+<method name="isMember"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="member" type="java.security.Principal">
+</parameter>
+</method>
+<method name="members"
+ return="java.util.Enumeration&lt;? extends java.security.Principal&gt;"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="removeMember"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="user" type="java.security.Principal">
+</parameter>
+</method>
+</interface>
+<class name="LastOwnerException"
+ extends="java.lang.Exception"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="LastOwnerException"
+ type="java.security.acl.LastOwnerException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+</class>
+<class name="NotOwnerException"
+ extends="java.lang.Exception"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="NotOwnerException"
+ type="java.security.acl.NotOwnerException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+</class>
+<interface name="Owner"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="addOwner"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="caller" type="java.security.Principal">
+</parameter>
+<parameter name="owner" type="java.security.Principal">
+</parameter>
+<exception name="NotOwnerException" type="java.security.acl.NotOwnerException">
+</exception>
+</method>
+<method name="deleteOwner"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="caller" type="java.security.Principal">
+</parameter>
+<parameter name="owner" type="java.security.Principal">
+</parameter>
+<exception name="LastOwnerException" type="java.security.acl.LastOwnerException">
+</exception>
+<exception name="NotOwnerException" type="java.security.acl.NotOwnerException">
+</exception>
+</method>
+<method name="isOwner"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="owner" type="java.security.Principal">
+</parameter>
+</method>
+</interface>
+<interface name="Permission"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="equals"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="another" type="java.lang.Object">
+</parameter>
+</method>
+<method name="toString"
+ return="java.lang.String"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+</interface>
+</package>
+<package name="java.security.cert"
+>
+<class name="CRL"
+ extends="java.lang.Object"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="CRL"
+ type="java.security.cert.CRL"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="type" type="java.lang.String">
+</parameter>
+</constructor>
+<method name="getType"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isRevoked"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="cert" type="java.security.cert.Certificate">
+</parameter>
+</method>
+<method name="toString"
+ return="java.lang.String"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+</class>
+<class name="CRLException"
+ extends="java.security.GeneralSecurityException"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="CRLException"
+ type="java.security.cert.CRLException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="msg" type="java.lang.String">
+</parameter>
+</constructor>
+<constructor name="CRLException"
+ type="java.security.cert.CRLException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<constructor name="CRLException"
+ type="java.security.cert.CRLException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="message" type="java.lang.String">
+</parameter>
+<parameter name="cause" type="java.lang.Throwable">
+</parameter>
+</constructor>
+<constructor name="CRLException"
+ type="java.security.cert.CRLException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="cause" type="java.lang.Throwable">
+</parameter>
+</constructor>
+</class>
+<interface name="CRLSelector"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="java.lang.Cloneable">
+</implements>
+<method name="clone"
+ return="java.lang.Object"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="match"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="crl" type="java.security.cert.CRL">
+</parameter>
+</method>
+</interface>
+<class name="CertPath"
+ extends="java.lang.Object"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="java.io.Serializable">
+</implements>
+<constructor name="CertPath"
+ type="java.security.cert.CertPath"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="type" type="java.lang.String">
+</parameter>
+</constructor>
+<method name="getCertificates"
+ return="java.util.List&lt;? extends java.security.cert.Certificate&gt;"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getEncoded"
+ return="byte[]"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="CertificateEncodingException" type="java.security.cert.CertificateEncodingException">
+</exception>
+</method>
+<method name="getEncoded"
+ return="byte[]"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="encoding" type="java.lang.String">
+</parameter>
+<exception name="CertificateEncodingException" type="java.security.cert.CertificateEncodingException">
+</exception>
+</method>
+<method name="getEncodings"
+ return="java.util.Iterator&lt;java.lang.String&gt;"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getType"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="writeReplace"
+ return="java.lang.Object"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<exception name="ObjectStreamException" type="java.io.ObjectStreamException">
+</exception>
+</method>
+</class>
+<class name="CertPath.CertPathRep"
+ extends="java.lang.Object"
+ abstract="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<implements name="java.io.Serializable">
+</implements>
+<constructor name="CertPath.CertPathRep"
+ type="java.security.cert.CertPath.CertPathRep"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="type" type="java.lang.String">
+</parameter>
+<parameter name="data" type="byte[]">
+</parameter>
+</constructor>
+<method name="readResolve"
+ return="java.lang.Object"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<exception name="ObjectStreamException" type="java.io.ObjectStreamException">
+</exception>
+</method>
+</class>
+<class name="CertPathBuilder"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="CertPathBuilder"
+ type="java.security.cert.CertPathBuilder"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="builderSpi" type="java.security.cert.CertPathBuilderSpi">
+</parameter>
+<parameter name="provider" type="java.security.Provider">
+</parameter>
+<parameter name="algorithm" type="java.lang.String">
+</parameter>
+</constructor>
+<method name="build"
+ return="java.security.cert.CertPathBuilderResult"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="params" type="java.security.cert.CertPathParameters">
+</parameter>
+<exception name="CertPathBuilderException" type="java.security.cert.CertPathBuilderException">
+</exception>
+<exception name="InvalidAlgorithmParameterException" type="java.security.InvalidAlgorithmParameterException">
+</exception>
+</method>
+<method name="getAlgorithm"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getDefaultType"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getInstance"
+ return="java.security.cert.CertPathBuilder"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="algorithm" type="java.lang.String">
+</parameter>
+<exception name="NoSuchAlgorithmException" type="java.security.NoSuchAlgorithmException">
+</exception>
+</method>
+<method name="getInstance"
+ return="java.security.cert.CertPathBuilder"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="algorithm" type="java.lang.String">
+</parameter>
+<parameter name="provider" type="java.lang.String">
+</parameter>
+<exception name="NoSuchAlgorithmException" type="java.security.NoSuchAlgorithmException">
+</exception>
+<exception name="NoSuchProviderException" type="java.security.NoSuchProviderException">
+</exception>
+</method>
+<method name="getInstance"
+ return="java.security.cert.CertPathBuilder"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="algorithm" type="java.lang.String">
+</parameter>
+<parameter name="provider" type="java.security.Provider">
+</parameter>
+<exception name="NoSuchAlgorithmException" type="java.security.NoSuchAlgorithmException">
+</exception>
+</method>
+<method name="getProvider"
+ return="java.security.Provider"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+</class>
+<class name="CertPathBuilderException"
+ extends="java.security.GeneralSecurityException"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="CertPathBuilderException"
+ type="java.security.cert.CertPathBuilderException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="msg" type="java.lang.String">
+</parameter>
+<parameter name="cause" type="java.lang.Throwable">
+</parameter>
+</constructor>
+<constructor name="CertPathBuilderException"
+ type="java.security.cert.CertPathBuilderException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="cause" type="java.lang.Throwable">
+</parameter>
+</constructor>
+<constructor name="CertPathBuilderException"
+ type="java.security.cert.CertPathBuilderException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="msg" type="java.lang.String">
+</parameter>
+</constructor>
+<constructor name="CertPathBuilderException"
+ type="java.security.cert.CertPathBuilderException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+</class>
+<interface name="CertPathBuilderResult"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="java.lang.Cloneable">
+</implements>
+<method name="clone"
+ return="java.lang.Object"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getCertPath"
+ return="java.security.cert.CertPath"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+</interface>
+<class name="CertPathBuilderSpi"
+ extends="java.lang.Object"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="CertPathBuilderSpi"
+ type="java.security.cert.CertPathBuilderSpi"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<method name="engineBuild"
+ return="java.security.cert.CertPathBuilderResult"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="params" type="java.security.cert.CertPathParameters">
+</parameter>
+<exception name="CertPathBuilderException" type="java.security.cert.CertPathBuilderException">
+</exception>
+<exception name="InvalidAlgorithmParameterException" type="java.security.InvalidAlgorithmParameterException">
+</exception>
+</method>
+</class>
+<interface name="CertPathParameters"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="java.lang.Cloneable">
+</implements>
+<method name="clone"
+ return="java.lang.Object"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+</interface>
+<class name="CertPathValidator"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="CertPathValidator"
+ type="java.security.cert.CertPathValidator"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="validatorSpi" type="java.security.cert.CertPathValidatorSpi">
+</parameter>
+<parameter name="provider" type="java.security.Provider">
+</parameter>
+<parameter name="algorithm" type="java.lang.String">
+</parameter>
+</constructor>
+<method name="getAlgorithm"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getDefaultType"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getInstance"
+ return="java.security.cert.CertPathValidator"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="algorithm" type="java.lang.String">
+</parameter>
+<exception name="NoSuchAlgorithmException" type="java.security.NoSuchAlgorithmException">
+</exception>
+</method>
+<method name="getInstance"
+ return="java.security.cert.CertPathValidator"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="algorithm" type="java.lang.String">
+</parameter>
+<parameter name="provider" type="java.lang.String">
+</parameter>
+<exception name="NoSuchAlgorithmException" type="java.security.NoSuchAlgorithmException">
+</exception>
+<exception name="NoSuchProviderException" type="java.security.NoSuchProviderException">
+</exception>
+</method>
+<method name="getInstance"
+ return="java.security.cert.CertPathValidator"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="algorithm" type="java.lang.String">
+</parameter>
+<parameter name="provider" type="java.security.Provider">
+</parameter>
+<exception name="NoSuchAlgorithmException" type="java.security.NoSuchAlgorithmException">
+</exception>
+</method>
+<method name="getProvider"
+ return="java.security.Provider"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="validate"
+ return="java.security.cert.CertPathValidatorResult"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="certPath" type="java.security.cert.CertPath">
+</parameter>
+<parameter name="params" type="java.security.cert.CertPathParameters">
+</parameter>
+<exception name="CertPathValidatorException" type="java.security.cert.CertPathValidatorException">
+</exception>
+<exception name="InvalidAlgorithmParameterException" type="java.security.InvalidAlgorithmParameterException">
+</exception>
+</method>
+</class>
+<class name="CertPathValidatorException"
+ extends="java.security.GeneralSecurityException"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="CertPathValidatorException"
+ type="java.security.cert.CertPathValidatorException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="msg" type="java.lang.String">
+</parameter>
+<parameter name="cause" type="java.lang.Throwable">
+</parameter>
+<parameter name="certPath" type="java.security.cert.CertPath">
+</parameter>
+<parameter name="index" type="int">
+</parameter>
+</constructor>
+<constructor name="CertPathValidatorException"
+ type="java.security.cert.CertPathValidatorException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="msg" type="java.lang.String">
+</parameter>
+<parameter name="cause" type="java.lang.Throwable">
+</parameter>
+</constructor>
+<constructor name="CertPathValidatorException"
+ type="java.security.cert.CertPathValidatorException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="cause" type="java.lang.Throwable">
+</parameter>
+</constructor>
+<constructor name="CertPathValidatorException"
+ type="java.security.cert.CertPathValidatorException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="msg" type="java.lang.String">
+</parameter>
+</constructor>
+<constructor name="CertPathValidatorException"
+ type="java.security.cert.CertPathValidatorException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<method name="getCertPath"
+ return="java.security.cert.CertPath"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getIndex"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+</class>
+<interface name="CertPathValidatorResult"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="java.lang.Cloneable">
+</implements>
+<method name="clone"
+ return="java.lang.Object"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+</interface>
+<class name="CertPathValidatorSpi"
+ extends="java.lang.Object"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="CertPathValidatorSpi"
+ type="java.security.cert.CertPathValidatorSpi"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<method name="engineValidate"
+ return="java.security.cert.CertPathValidatorResult"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="certPath" type="java.security.cert.CertPath">
+</parameter>
+<parameter name="params" type="java.security.cert.CertPathParameters">
+</parameter>
+<exception name="CertPathValidatorException" type="java.security.cert.CertPathValidatorException">
+</exception>
+<exception name="InvalidAlgorithmParameterException" type="java.security.InvalidAlgorithmParameterException">
+</exception>
+</method>
+</class>
+<interface name="CertSelector"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="java.lang.Cloneable">
+</implements>
+<method name="clone"
+ return="java.lang.Object"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="match"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="cert" type="java.security.cert.Certificate">
+</parameter>
+</method>
+</interface>
+<class name="CertStore"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="CertStore"
+ type="java.security.cert.CertStore"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="storeSpi" type="java.security.cert.CertStoreSpi">
+</parameter>
+<parameter name="provider" type="java.security.Provider">
+</parameter>
+<parameter name="type" type="java.lang.String">
+</parameter>
+<parameter name="params" type="java.security.cert.CertStoreParameters">
+</parameter>
+</constructor>
+<method name="getCRLs"
+ return="java.util.Collection&lt;? extends java.security.cert.CRL&gt;"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="selector" type="java.security.cert.CRLSelector">
+</parameter>
+<exception name="CertStoreException" type="java.security.cert.CertStoreException">
+</exception>
+</method>
+<method name="getCertStoreParameters"
+ return="java.security.cert.CertStoreParameters"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getCertificates"
+ return="java.util.Collection&lt;? extends java.security.cert.Certificate&gt;"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="selector" type="java.security.cert.CertSelector">
+</parameter>
+<exception name="CertStoreException" type="java.security.cert.CertStoreException">
+</exception>
+</method>
+<method name="getDefaultType"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getInstance"
+ return="java.security.cert.CertStore"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="type" type="java.lang.String">
+</parameter>
+<parameter name="params" type="java.security.cert.CertStoreParameters">
+</parameter>
+<exception name="InvalidAlgorithmParameterException" type="java.security.InvalidAlgorithmParameterException">
+</exception>
+<exception name="NoSuchAlgorithmException" type="java.security.NoSuchAlgorithmException">
+</exception>
+</method>
+<method name="getInstance"
+ return="java.security.cert.CertStore"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="type" type="java.lang.String">
+</parameter>
+<parameter name="params" type="java.security.cert.CertStoreParameters">
+</parameter>
+<parameter name="provider" type="java.lang.String">
+</parameter>
+<exception name="InvalidAlgorithmParameterException" type="java.security.InvalidAlgorithmParameterException">
+</exception>
+<exception name="NoSuchAlgorithmException" type="java.security.NoSuchAlgorithmException">
+</exception>
+<exception name="NoSuchProviderException" type="java.security.NoSuchProviderException">
+</exception>
+</method>
+<method name="getInstance"
+ return="java.security.cert.CertStore"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="type" type="java.lang.String">
+</parameter>
+<parameter name="params" type="java.security.cert.CertStoreParameters">
+</parameter>
+<parameter name="provider" type="java.security.Provider">
+</parameter>
+<exception name="InvalidAlgorithmParameterException" type="java.security.InvalidAlgorithmParameterException">
+</exception>
+<exception name="NoSuchAlgorithmException" type="java.security.NoSuchAlgorithmException">
+</exception>
+</method>
+<method name="getProvider"
+ return="java.security.Provider"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getType"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+</class>
+<class name="CertStoreException"
+ extends="java.security.GeneralSecurityException"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="CertStoreException"
+ type="java.security.cert.CertStoreException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="msg" type="java.lang.String">
+</parameter>
+<parameter name="cause" type="java.lang.Throwable">
+</parameter>
+</constructor>
+<constructor name="CertStoreException"
+ type="java.security.cert.CertStoreException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="cause" type="java.lang.Throwable">
+</parameter>
+</constructor>
+<constructor name="CertStoreException"
+ type="java.security.cert.CertStoreException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="msg" type="java.lang.String">
+</parameter>
+</constructor>
+<constructor name="CertStoreException"
+ type="java.security.cert.CertStoreException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+</class>
+<interface name="CertStoreParameters"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="java.lang.Cloneable">
+</implements>
+<method name="clone"
+ return="java.lang.Object"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+</interface>
+<class name="CertStoreSpi"
+ extends="java.lang.Object"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="CertStoreSpi"
+ type="java.security.cert.CertStoreSpi"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="params" type="java.security.cert.CertStoreParameters">
+</parameter>
+<exception name="InvalidAlgorithmParameterException" type="java.security.InvalidAlgorithmParameterException">
+</exception>
+</constructor>
+<method name="engineGetCRLs"
+ return="java.util.Collection&lt;? extends java.security.cert.CRL&gt;"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="selector" type="java.security.cert.CRLSelector">
+</parameter>
+<exception name="CertStoreException" type="java.security.cert.CertStoreException">
+</exception>
+</method>
+<method name="engineGetCertificates"
+ return="java.util.Collection&lt;? extends java.security.cert.Certificate&gt;"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="selector" type="java.security.cert.CertSelector">
+</parameter>
+<exception name="CertStoreException" type="java.security.cert.CertStoreException">
+</exception>
+</method>
+</class>
+<class name="Certificate"
+ extends="java.lang.Object"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="java.io.Serializable">
+</implements>
+<constructor name="Certificate"
+ type="java.security.cert.Certificate"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="type" type="java.lang.String">
+</parameter>
+</constructor>
+<method name="getEncoded"
+ return="byte[]"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="CertificateEncodingException" type="java.security.cert.CertificateEncodingException">
+</exception>
+</method>
+<method name="getPublicKey"
+ return="java.security.PublicKey"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getType"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="toString"
+ return="java.lang.String"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="verify"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="key" type="java.security.PublicKey">
+</parameter>
+<exception name="CertificateException" type="java.security.cert.CertificateException">
+</exception>
+<exception name="InvalidKeyException" type="java.security.InvalidKeyException">
+</exception>
+<exception name="NoSuchAlgorithmException" type="java.security.NoSuchAlgorithmException">
+</exception>
+<exception name="NoSuchProviderException" type="java.security.NoSuchProviderException">
+</exception>
+<exception name="SignatureException" type="java.security.SignatureException">
+</exception>
+</method>
+<method name="verify"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="key" type="java.security.PublicKey">
+</parameter>
+<parameter name="sigProvider" type="java.lang.String">
+</parameter>
+<exception name="CertificateException" type="java.security.cert.CertificateException">
+</exception>
+<exception name="InvalidKeyException" type="java.security.InvalidKeyException">
+</exception>
+<exception name="NoSuchAlgorithmException" type="java.security.NoSuchAlgorithmException">
+</exception>
+<exception name="NoSuchProviderException" type="java.security.NoSuchProviderException">
+</exception>
+<exception name="SignatureException" type="java.security.SignatureException">
+</exception>
+</method>
+<method name="writeReplace"
+ return="java.lang.Object"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<exception name="ObjectStreamException" type="java.io.ObjectStreamException">
+</exception>
+</method>
+</class>
+<class name="Certificate.CertificateRep"
+ extends="java.lang.Object"
+ abstract="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<implements name="java.io.Serializable">
+</implements>
+<constructor name="Certificate.CertificateRep"
+ type="java.security.cert.Certificate.CertificateRep"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="type" type="java.lang.String">
+</parameter>
+<parameter name="data" type="byte[]">
+</parameter>
+</constructor>
+<method name="readResolve"
+ return="java.lang.Object"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<exception name="ObjectStreamException" type="java.io.ObjectStreamException">
+</exception>
+</method>
+</class>
+<class name="CertificateEncodingException"
+ extends="java.security.cert.CertificateException"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="CertificateEncodingException"
+ type="java.security.cert.CertificateEncodingException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="msg" type="java.lang.String">
+</parameter>
+</constructor>
+<constructor name="CertificateEncodingException"
+ type="java.security.cert.CertificateEncodingException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<constructor name="CertificateEncodingException"
+ type="java.security.cert.CertificateEncodingException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="message" type="java.lang.String">
+</parameter>
+<parameter name="cause" type="java.lang.Throwable">
+</parameter>
+</constructor>
+<constructor name="CertificateEncodingException"
+ type="java.security.cert.CertificateEncodingException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="cause" type="java.lang.Throwable">
+</parameter>
+</constructor>
+</class>
+<class name="CertificateException"
+ extends="java.security.GeneralSecurityException"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="CertificateException"
+ type="java.security.cert.CertificateException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="msg" type="java.lang.String">
+</parameter>
+</constructor>
+<constructor name="CertificateException"
+ type="java.security.cert.CertificateException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<constructor name="CertificateException"
+ type="java.security.cert.CertificateException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="message" type="java.lang.String">
+</parameter>
+<parameter name="cause" type="java.lang.Throwable">
+</parameter>
+</constructor>
+<constructor name="CertificateException"
+ type="java.security.cert.CertificateException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="cause" type="java.lang.Throwable">
+</parameter>
+</constructor>
+</class>
+<class name="CertificateExpiredException"
+ extends="java.security.cert.CertificateException"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="CertificateExpiredException"
+ type="java.security.cert.CertificateExpiredException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="msg" type="java.lang.String">
+</parameter>
+</constructor>
+<constructor name="CertificateExpiredException"
+ type="java.security.cert.CertificateExpiredException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+</class>
+<class name="CertificateFactory"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="CertificateFactory"
+ type="java.security.cert.CertificateFactory"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="certFacSpi" type="java.security.cert.CertificateFactorySpi">
+</parameter>
+<parameter name="provider" type="java.security.Provider">
+</parameter>
+<parameter name="type" type="java.lang.String">
+</parameter>
+</constructor>
+<method name="generateCRL"
+ return="java.security.cert.CRL"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="inStream" type="java.io.InputStream">
+</parameter>
+<exception name="CRLException" type="java.security.cert.CRLException">
+</exception>
+</method>
+<method name="generateCRLs"
+ return="java.util.Collection&lt;? extends java.security.cert.CRL&gt;"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="inStream" type="java.io.InputStream">
+</parameter>
+<exception name="CRLException" type="java.security.cert.CRLException">
+</exception>
+</method>
+<method name="generateCertPath"
+ return="java.security.cert.CertPath"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="inStream" type="java.io.InputStream">
+</parameter>
+<exception name="CertificateException" type="java.security.cert.CertificateException">
+</exception>
+</method>
+<method name="generateCertPath"
+ return="java.security.cert.CertPath"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="inStream" type="java.io.InputStream">
+</parameter>
+<parameter name="encoding" type="java.lang.String">
+</parameter>
+<exception name="CertificateException" type="java.security.cert.CertificateException">
+</exception>
+</method>
+<method name="generateCertPath"
+ return="java.security.cert.CertPath"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="certificates" type="java.util.List&lt;? extends java.security.cert.Certificate&gt;">
+</parameter>
+<exception name="CertificateException" type="java.security.cert.CertificateException">
+</exception>
+</method>
+<method name="generateCertificate"
+ return="java.security.cert.Certificate"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="inStream" type="java.io.InputStream">
+</parameter>
+<exception name="CertificateException" type="java.security.cert.CertificateException">
+</exception>
+</method>
+<method name="generateCertificates"
+ return="java.util.Collection&lt;? extends java.security.cert.Certificate&gt;"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="inStream" type="java.io.InputStream">
+</parameter>
+<exception name="CertificateException" type="java.security.cert.CertificateException">
+</exception>
+</method>
+<method name="getCertPathEncodings"
+ return="java.util.Iterator&lt;java.lang.String&gt;"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getInstance"
+ return="java.security.cert.CertificateFactory"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="type" type="java.lang.String">
+</parameter>
+<exception name="CertificateException" type="java.security.cert.CertificateException">
+</exception>
+</method>
+<method name="getInstance"
+ return="java.security.cert.CertificateFactory"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="type" type="java.lang.String">
+</parameter>
+<parameter name="provider" type="java.lang.String">
+</parameter>
+<exception name="CertificateException" type="java.security.cert.CertificateException">
+</exception>
+<exception name="NoSuchProviderException" type="java.security.NoSuchProviderException">
+</exception>
+</method>
+<method name="getInstance"
+ return="java.security.cert.CertificateFactory"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="type" type="java.lang.String">
+</parameter>
+<parameter name="provider" type="java.security.Provider">
+</parameter>
+<exception name="CertificateException" type="java.security.cert.CertificateException">
+</exception>
+</method>
+<method name="getProvider"
+ return="java.security.Provider"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getType"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+</class>
+<class name="CertificateFactorySpi"
+ extends="java.lang.Object"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="CertificateFactorySpi"
+ type="java.security.cert.CertificateFactorySpi"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<method name="engineGenerateCRL"
+ return="java.security.cert.CRL"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="inStream" type="java.io.InputStream">
+</parameter>
+<exception name="CRLException" type="java.security.cert.CRLException">
+</exception>
+</method>
+<method name="engineGenerateCRLs"
+ return="java.util.Collection&lt;? extends java.security.cert.CRL&gt;"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="inStream" type="java.io.InputStream">
+</parameter>
+<exception name="CRLException" type="java.security.cert.CRLException">
+</exception>
+</method>
+<method name="engineGenerateCertPath"
+ return="java.security.cert.CertPath"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="inStream" type="java.io.InputStream">
+</parameter>
+<exception name="CertificateException" type="java.security.cert.CertificateException">
+</exception>
+</method>
+<method name="engineGenerateCertPath"
+ return="java.security.cert.CertPath"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="inStream" type="java.io.InputStream">
+</parameter>
+<parameter name="encoding" type="java.lang.String">
+</parameter>
+<exception name="CertificateException" type="java.security.cert.CertificateException">
+</exception>
+</method>
+<method name="engineGenerateCertPath"
+ return="java.security.cert.CertPath"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="certificates" type="java.util.List&lt;? extends java.security.cert.Certificate&gt;">
+</parameter>
+<exception name="CertificateException" type="java.security.cert.CertificateException">
+</exception>
+</method>
+<method name="engineGenerateCertificate"
+ return="java.security.cert.Certificate"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="inStream" type="java.io.InputStream">
+</parameter>
+<exception name="CertificateException" type="java.security.cert.CertificateException">
+</exception>
+</method>
+<method name="engineGenerateCertificates"
+ return="java.util.Collection&lt;? extends java.security.cert.Certificate&gt;"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="inStream" type="java.io.InputStream">
+</parameter>
+<exception name="CertificateException" type="java.security.cert.CertificateException">
+</exception>
+</method>
+<method name="engineGetCertPathEncodings"
+ return="java.util.Iterator&lt;java.lang.String&gt;"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+</class>
+<class name="CertificateNotYetValidException"
+ extends="java.security.cert.CertificateException"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="CertificateNotYetValidException"
+ type="java.security.cert.CertificateNotYetValidException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="msg" type="java.lang.String">
+</parameter>
+</constructor>
+<constructor name="CertificateNotYetValidException"
+ type="java.security.cert.CertificateNotYetValidException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+</class>
+<class name="CertificateParsingException"
+ extends="java.security.cert.CertificateException"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="CertificateParsingException"
+ type="java.security.cert.CertificateParsingException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="msg" type="java.lang.String">
+</parameter>
+</constructor>
+<constructor name="CertificateParsingException"
+ type="java.security.cert.CertificateParsingException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<constructor name="CertificateParsingException"
+ type="java.security.cert.CertificateParsingException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="message" type="java.lang.String">
+</parameter>
+<parameter name="cause" type="java.lang.Throwable">
+</parameter>
+</constructor>
+<constructor name="CertificateParsingException"
+ type="java.security.cert.CertificateParsingException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="cause" type="java.lang.Throwable">
+</parameter>
+</constructor>
+</class>
+<class name="CollectionCertStoreParameters"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="java.security.cert.CertStoreParameters">
+</implements>
+<constructor name="CollectionCertStoreParameters"
+ type="java.security.cert.CollectionCertStoreParameters"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<constructor name="CollectionCertStoreParameters"
+ type="java.security.cert.CollectionCertStoreParameters"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="collection" type="java.util.Collection&lt;?&gt;">
+</parameter>
+</constructor>
+<method name="clone"
+ return="java.lang.Object"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getCollection"
+ return="java.util.Collection&lt;?&gt;"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+</class>
+<class name="LDAPCertStoreParameters"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="java.security.cert.CertStoreParameters">
+</implements>
+<constructor name="LDAPCertStoreParameters"
+ type="java.security.cert.LDAPCertStoreParameters"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="serverName" type="java.lang.String">
+</parameter>
+<parameter name="port" type="int">
+</parameter>
+</constructor>
+<constructor name="LDAPCertStoreParameters"
+ type="java.security.cert.LDAPCertStoreParameters"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<constructor name="LDAPCertStoreParameters"
+ type="java.security.cert.LDAPCertStoreParameters"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="serverName" type="java.lang.String">
+</parameter>
+</constructor>
+<method name="clone"
+ return="java.lang.Object"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getPort"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getServerName"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+</class>
+<class name="PKIXBuilderParameters"
+ extends="java.security.cert.PKIXParameters"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="PKIXBuilderParameters"
+ type="java.security.cert.PKIXBuilderParameters"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="trustAnchors" type="java.util.Set&lt;java.security.cert.TrustAnchor&gt;">
+</parameter>
+<parameter name="targetConstraints" type="java.security.cert.CertSelector">
+</parameter>
+<exception name="InvalidAlgorithmParameterException" type="java.security.InvalidAlgorithmParameterException">
+</exception>
+</constructor>
+<constructor name="PKIXBuilderParameters"
+ type="java.security.cert.PKIXBuilderParameters"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="keyStore" type="java.security.KeyStore">
+</parameter>
+<parameter name="targetConstraints" type="java.security.cert.CertSelector">
+</parameter>
+<exception name="InvalidAlgorithmParameterException" type="java.security.InvalidAlgorithmParameterException">
+</exception>
+<exception name="KeyStoreException" type="java.security.KeyStoreException">
+</exception>
+</constructor>
+<method name="getMaxPathLength"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="setMaxPathLength"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="maxPathLength" type="int">
+</parameter>
+</method>
+</class>
+<class name="PKIXCertPathBuilderResult"
+ extends="java.security.cert.PKIXCertPathValidatorResult"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="java.security.cert.CertPathBuilderResult">
+</implements>
+<constructor name="PKIXCertPathBuilderResult"
+ type="java.security.cert.PKIXCertPathBuilderResult"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="certPath" type="java.security.cert.CertPath">
+</parameter>
+<parameter name="trustAnchor" type="java.security.cert.TrustAnchor">
+</parameter>
+<parameter name="policyTree" type="java.security.cert.PolicyNode">
+</parameter>
+<parameter name="subjectPublicKey" type="java.security.PublicKey">
+</parameter>
+</constructor>
+<method name="getCertPath"
+ return="java.security.cert.CertPath"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+</class>
+<class name="PKIXCertPathChecker"
+ extends="java.lang.Object"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="java.lang.Cloneable">
+</implements>
+<constructor name="PKIXCertPathChecker"
+ type="java.security.cert.PKIXCertPathChecker"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</constructor>
+<method name="check"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="cert" type="java.security.cert.Certificate">
+</parameter>
+<parameter name="unresolvedCritExts" type="java.util.Collection&lt;java.lang.String&gt;">
+</parameter>
+<exception name="CertPathValidatorException" type="java.security.cert.CertPathValidatorException">
+</exception>
+</method>
+<method name="clone"
+ return="java.lang.Object"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getSupportedExtensions"
+ return="java.util.Set&lt;java.lang.String&gt;"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="init"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="forward" type="boolean">
+</parameter>
+<exception name="CertPathValidatorException" type="java.security.cert.CertPathValidatorException">
+</exception>
+</method>
+<method name="isForwardCheckingSupported"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+</class>
+<class name="PKIXCertPathValidatorResult"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="java.security.cert.CertPathValidatorResult">
+</implements>
+<constructor name="PKIXCertPathValidatorResult"
+ type="java.security.cert.PKIXCertPathValidatorResult"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="trustAnchor" type="java.security.cert.TrustAnchor">
+</parameter>
+<parameter name="policyTree" type="java.security.cert.PolicyNode">
+</parameter>
+<parameter name="subjectPublicKey" type="java.security.PublicKey">
+</parameter>
+</constructor>
+<method name="clone"
+ return="java.lang.Object"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getPolicyTree"
+ return="java.security.cert.PolicyNode"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getPublicKey"
+ return="java.security.PublicKey"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getTrustAnchor"
+ return="java.security.cert.TrustAnchor"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+</class>
+<class name="PKIXParameters"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="java.security.cert.CertPathParameters">
+</implements>
+<constructor name="PKIXParameters"
+ type="java.security.cert.PKIXParameters"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="trustAnchors" type="java.util.Set&lt;java.security.cert.TrustAnchor&gt;">
+</parameter>
+<exception name="InvalidAlgorithmParameterException" type="java.security.InvalidAlgorithmParameterException">
+</exception>
+</constructor>
+<constructor name="PKIXParameters"
+ type="java.security.cert.PKIXParameters"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="keyStore" type="java.security.KeyStore">
+</parameter>
+<exception name="InvalidAlgorithmParameterException" type="java.security.InvalidAlgorithmParameterException">
+</exception>
+<exception name="KeyStoreException" type="java.security.KeyStoreException">
+</exception>
+</constructor>
+<method name="addCertPathChecker"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="checker" type="java.security.cert.PKIXCertPathChecker">
+</parameter>
+</method>
+<method name="addCertStore"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="store" type="java.security.cert.CertStore">
+</parameter>
+</method>
+<method name="clone"
+ return="java.lang.Object"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getCertPathCheckers"
+ return="java.util.List&lt;java.security.cert.PKIXCertPathChecker&gt;"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getCertStores"
+ return="java.util.List&lt;java.security.cert.CertStore&gt;"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getDate"
+ return="java.util.Date"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getInitialPolicies"
+ return="java.util.Set&lt;java.lang.String&gt;"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getPolicyQualifiersRejected"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getSigProvider"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getTargetCertConstraints"
+ return="java.security.cert.CertSelector"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getTrustAnchors"
+ return="java.util.Set&lt;java.security.cert.TrustAnchor&gt;"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isAnyPolicyInhibited"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isExplicitPolicyRequired"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isPolicyMappingInhibited"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isRevocationEnabled"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="setAnyPolicyInhibited"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="anyPolicyInhibited" type="boolean">
+</parameter>
+</method>
+<method name="setCertPathCheckers"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="certPathCheckers" type="java.util.List&lt;java.security.cert.PKIXCertPathChecker&gt;">
+</parameter>
+</method>
+<method name="setCertStores"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="certStores" type="java.util.List&lt;java.security.cert.CertStore&gt;">
+</parameter>
+</method>
+<method name="setDate"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="date" type="java.util.Date">
+</parameter>
+</method>
+<method name="setExplicitPolicyRequired"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="explicitPolicyRequired" type="boolean">
+</parameter>
+</method>
+<method name="setInitialPolicies"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="initialPolicies" type="java.util.Set&lt;java.lang.String&gt;">
+</parameter>
+</method>
+<method name="setPolicyMappingInhibited"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="policyMappingInhibited" type="boolean">
+</parameter>
+</method>
+<method name="setPolicyQualifiersRejected"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="policyQualifiersRejected" type="boolean">
+</parameter>
+</method>
+<method name="setRevocationEnabled"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="revocationEnabled" type="boolean">
+</parameter>
+</method>
+<method name="setSigProvider"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="sigProvider" type="java.lang.String">
+</parameter>
+</method>
+<method name="setTargetCertConstraints"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="targetCertConstraints" type="java.security.cert.CertSelector">
+</parameter>
+</method>
+<method name="setTrustAnchors"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="trustAnchors" type="java.util.Set&lt;java.security.cert.TrustAnchor&gt;">
+</parameter>
+<exception name="InvalidAlgorithmParameterException" type="java.security.InvalidAlgorithmParameterException">
+</exception>
+</method>
+</class>
+<interface name="PolicyNode"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="getChildren"
+ return="java.util.Iterator&lt;? extends java.security.cert.PolicyNode&gt;"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getDepth"
+ return="int"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getExpectedPolicies"
+ return="java.util.Set&lt;java.lang.String&gt;"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getParent"
+ return="java.security.cert.PolicyNode"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getPolicyQualifiers"
+ return="java.util.Set&lt;? extends java.security.cert.PolicyQualifierInfo&gt;"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getValidPolicy"
+ return="java.lang.String"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isCritical"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+</interface>
+<class name="PolicyQualifierInfo"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="PolicyQualifierInfo"
+ type="java.security.cert.PolicyQualifierInfo"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="encoded" type="byte[]">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</constructor>
+<method name="getEncoded"
+ return="byte[]"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getPolicyQualifier"
+ return="byte[]"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getPolicyQualifierId"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+</class>
+<class name="TrustAnchor"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="TrustAnchor"
+ type="java.security.cert.TrustAnchor"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="trustedCert" type="java.security.cert.X509Certificate">
+</parameter>
+<parameter name="nameConstraints" type="byte[]">
+</parameter>
+</constructor>
+<constructor name="TrustAnchor"
+ type="java.security.cert.TrustAnchor"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="caName" type="java.lang.String">
+</parameter>
+<parameter name="caPublicKey" type="java.security.PublicKey">
+</parameter>
+<parameter name="nameConstraints" type="byte[]">
+</parameter>
+</constructor>
+<constructor name="TrustAnchor"
+ type="java.security.cert.TrustAnchor"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="caPrincipal" type="javax.security.auth.x500.X500Principal">
+</parameter>
+<parameter name="caPublicKey" type="java.security.PublicKey">
+</parameter>
+<parameter name="nameConstraints" type="byte[]">
+</parameter>
+</constructor>
+<method name="getCA"
+ return="javax.security.auth.x500.X500Principal"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getCAName"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getCAPublicKey"
+ return="java.security.PublicKey"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getNameConstraints"
+ return="byte[]"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getTrustedCert"
+ return="java.security.cert.X509Certificate"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+</class>
+<class name="X509CRL"
+ extends="java.security.cert.CRL"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="java.security.cert.X509Extension">
+</implements>
+<constructor name="X509CRL"
+ type="java.security.cert.X509CRL"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</constructor>
+<method name="getEncoded"
+ return="byte[]"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="CRLException" type="java.security.cert.CRLException">
+</exception>
+</method>
+<method name="getIssuerDN"
+ return="java.security.Principal"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getIssuerX500Principal"
+ return="javax.security.auth.x500.X500Principal"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getNextUpdate"
+ return="java.util.Date"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getRevokedCertificate"
+ return="java.security.cert.X509CRLEntry"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="serialNumber" type="java.math.BigInteger">
+</parameter>
+</method>
+<method name="getRevokedCertificate"
+ return="java.security.cert.X509CRLEntry"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="certificate" type="java.security.cert.X509Certificate">
+</parameter>
+</method>
+<method name="getRevokedCertificates"
+ return="java.util.Set&lt;? extends java.security.cert.X509CRLEntry&gt;"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getSigAlgName"
+ return="java.lang.String"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getSigAlgOID"
+ return="java.lang.String"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getSigAlgParams"
+ return="byte[]"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getSignature"
+ return="byte[]"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getTBSCertList"
+ return="byte[]"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="CRLException" type="java.security.cert.CRLException">
+</exception>
+</method>
+<method name="getThisUpdate"
+ return="java.util.Date"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getVersion"
+ return="int"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="verify"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="key" type="java.security.PublicKey">
+</parameter>
+<exception name="CRLException" type="java.security.cert.CRLException">
+</exception>
+<exception name="InvalidKeyException" type="java.security.InvalidKeyException">
+</exception>
+<exception name="NoSuchAlgorithmException" type="java.security.NoSuchAlgorithmException">
+</exception>
+<exception name="NoSuchProviderException" type="java.security.NoSuchProviderException">
+</exception>
+<exception name="SignatureException" type="java.security.SignatureException">
+</exception>
+</method>
+<method name="verify"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="key" type="java.security.PublicKey">
+</parameter>
+<parameter name="sigProvider" type="java.lang.String">
+</parameter>
+<exception name="CRLException" type="java.security.cert.CRLException">
+</exception>
+<exception name="InvalidKeyException" type="java.security.InvalidKeyException">
+</exception>
+<exception name="NoSuchAlgorithmException" type="java.security.NoSuchAlgorithmException">
+</exception>
+<exception name="NoSuchProviderException" type="java.security.NoSuchProviderException">
+</exception>
+<exception name="SignatureException" type="java.security.SignatureException">
+</exception>
+</method>
+</class>
+<class name="X509CRLEntry"
+ extends="java.lang.Object"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="java.security.cert.X509Extension">
+</implements>
+<constructor name="X509CRLEntry"
+ type="java.security.cert.X509CRLEntry"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<method name="getCertificateIssuer"
+ return="javax.security.auth.x500.X500Principal"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getEncoded"
+ return="byte[]"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="CRLException" type="java.security.cert.CRLException">
+</exception>
+</method>
+<method name="getRevocationDate"
+ return="java.util.Date"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getSerialNumber"
+ return="java.math.BigInteger"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="hasExtensions"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="toString"
+ return="java.lang.String"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+</class>
+<class name="X509CRLSelector"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="java.security.cert.CRLSelector">
+</implements>
+<constructor name="X509CRLSelector"
+ type="java.security.cert.X509CRLSelector"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<method name="addIssuer"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="issuer" type="javax.security.auth.x500.X500Principal">
+</parameter>
+</method>
+<method name="addIssuerName"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="iss_name" type="java.lang.String">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="addIssuerName"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="iss_name" type="byte[]">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="clone"
+ return="java.lang.Object"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getCertificateChecking"
+ return="java.security.cert.X509Certificate"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getDateAndTime"
+ return="java.util.Date"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getIssuerNames"
+ return="java.util.Collection&lt;java.lang.Object&gt;"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getIssuers"
+ return="java.util.Collection&lt;javax.security.auth.x500.X500Principal&gt;"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getMaxCRL"
+ return="java.math.BigInteger"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getMinCRL"
+ return="java.math.BigInteger"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="match"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="crl" type="java.security.cert.CRL">
+</parameter>
+</method>
+<method name="setCertificateChecking"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="cert" type="java.security.cert.X509Certificate">
+</parameter>
+</method>
+<method name="setDateAndTime"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="dateAndTime" type="java.util.Date">
+</parameter>
+</method>
+<method name="setIssuerNames"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="names" type="java.util.Collection&lt;?&gt;">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="setIssuers"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="issuers" type="java.util.Collection&lt;javax.security.auth.x500.X500Principal&gt;">
+</parameter>
+</method>
+<method name="setMaxCRLNumber"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="maxCRL" type="java.math.BigInteger">
+</parameter>
+</method>
+<method name="setMinCRLNumber"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="minCRL" type="java.math.BigInteger">
+</parameter>
+</method>
+</class>
+<class name="X509CertSelector"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="java.security.cert.CertSelector">
+</implements>
+<constructor name="X509CertSelector"
+ type="java.security.cert.X509CertSelector"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<method name="addPathToName"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="type" type="int">
+</parameter>
+<parameter name="name" type="java.lang.String">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="addPathToName"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="type" type="int">
+</parameter>
+<parameter name="name" type="byte[]">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="addSubjectAlternativeName"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="tag" type="int">
+</parameter>
+<parameter name="name" type="java.lang.String">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="addSubjectAlternativeName"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="tag" type="int">
+</parameter>
+<parameter name="name" type="byte[]">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="clone"
+ return="java.lang.Object"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getAuthorityKeyIdentifier"
+ return="byte[]"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getBasicConstraints"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getCertificate"
+ return="java.security.cert.X509Certificate"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getCertificateValid"
+ return="java.util.Date"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getExtendedKeyUsage"
+ return="java.util.Set&lt;java.lang.String&gt;"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getIssuer"
+ return="javax.security.auth.x500.X500Principal"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getIssuerAsBytes"
+ return="byte[]"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="getIssuerAsString"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getKeyUsage"
+ return="boolean[]"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getMatchAllSubjectAltNames"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getNameConstraints"
+ return="byte[]"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getPathToNames"
+ return="java.util.Collection&lt;java.util.List&lt;?&gt;&gt;"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getPolicy"
+ return="java.util.Set&lt;java.lang.String&gt;"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getPrivateKeyValid"
+ return="java.util.Date"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getSerialNumber"
+ return="java.math.BigInteger"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getSubject"
+ return="javax.security.auth.x500.X500Principal"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getSubjectAlternativeNames"
+ return="java.util.Collection&lt;java.util.List&lt;?&gt;&gt;"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getSubjectAsBytes"
+ return="byte[]"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="getSubjectAsString"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getSubjectKeyIdentifier"
+ return="byte[]"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getSubjectPublicKey"
+ return="java.security.PublicKey"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getSubjectPublicKeyAlgID"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="match"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="certificate" type="java.security.cert.Certificate">
+</parameter>
+</method>
+<method name="setAuthorityKeyIdentifier"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="authorityKeyIdentifier" type="byte[]">
+</parameter>
+</method>
+<method name="setBasicConstraints"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="pathLen" type="int">
+</parameter>
+</method>
+<method name="setCertificate"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="certificate" type="java.security.cert.X509Certificate">
+</parameter>
+</method>
+<method name="setCertificateValid"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="certificateValid" type="java.util.Date">
+</parameter>
+</method>
+<method name="setExtendedKeyUsage"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="keyUsage" type="java.util.Set&lt;java.lang.String&gt;">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="setIssuer"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="issuer" type="javax.security.auth.x500.X500Principal">
+</parameter>
+</method>
+<method name="setIssuer"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="issuerName" type="java.lang.String">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="setIssuer"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="issuerDN" type="byte[]">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="setKeyUsage"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="keyUsage" type="boolean[]">
+</parameter>
+</method>
+<method name="setMatchAllSubjectAltNames"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="matchAllNames" type="boolean">
+</parameter>
+</method>
+<method name="setNameConstraints"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="bytes" type="byte[]">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="setPathToNames"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="names" type="java.util.Collection&lt;java.util.List&lt;?&gt;&gt;">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="setPolicy"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="policies" type="java.util.Set&lt;java.lang.String&gt;">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="setPrivateKeyValid"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="privateKeyValid" type="java.util.Date">
+</parameter>
+</method>
+<method name="setSerialNumber"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="serialNumber" type="java.math.BigInteger">
+</parameter>
+</method>
+<method name="setSubject"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="subject" type="javax.security.auth.x500.X500Principal">
+</parameter>
+</method>
+<method name="setSubject"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="subjectDN" type="java.lang.String">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="setSubject"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="subjectDN" type="byte[]">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="setSubjectAlternativeNames"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="names" type="java.util.Collection&lt;java.util.List&lt;?&gt;&gt;">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="setSubjectKeyIdentifier"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="subjectKeyIdentifier" type="byte[]">
+</parameter>
+</method>
+<method name="setSubjectPublicKey"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="key" type="java.security.PublicKey">
+</parameter>
+</method>
+<method name="setSubjectPublicKey"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="key" type="byte[]">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="setSubjectPublicKeyAlgID"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="oid" type="java.lang.String">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+</class>
+<class name="X509Certificate"
+ extends="java.security.cert.Certificate"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="java.security.cert.X509Extension">
+</implements>
+<constructor name="X509Certificate"
+ type="java.security.cert.X509Certificate"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</constructor>
+<method name="checkValidity"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="CertificateExpiredException" type="java.security.cert.CertificateExpiredException">
+</exception>
+<exception name="CertificateNotYetValidException" type="java.security.cert.CertificateNotYetValidException">
+</exception>
+</method>
+<method name="checkValidity"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="date" type="java.util.Date">
+</parameter>
+<exception name="CertificateExpiredException" type="java.security.cert.CertificateExpiredException">
+</exception>
+<exception name="CertificateNotYetValidException" type="java.security.cert.CertificateNotYetValidException">
+</exception>
+</method>
+<method name="getBasicConstraints"
+ return="int"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getExtendedKeyUsage"
+ return="java.util.List&lt;java.lang.String&gt;"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="CertificateParsingException" type="java.security.cert.CertificateParsingException">
+</exception>
+</method>
+<method name="getIssuerAlternativeNames"
+ return="java.util.Collection&lt;java.util.List&lt;?&gt;&gt;"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="CertificateParsingException" type="java.security.cert.CertificateParsingException">
+</exception>
+</method>
+<method name="getIssuerDN"
+ return="java.security.Principal"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getIssuerUniqueID"
+ return="boolean[]"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getIssuerX500Principal"
+ return="javax.security.auth.x500.X500Principal"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getKeyUsage"
+ return="boolean[]"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getNotAfter"
+ return="java.util.Date"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getNotBefore"
+ return="java.util.Date"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getSerialNumber"
+ return="java.math.BigInteger"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getSigAlgName"
+ return="java.lang.String"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getSigAlgOID"
+ return="java.lang.String"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getSigAlgParams"
+ return="byte[]"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getSignature"
+ return="byte[]"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getSubjectAlternativeNames"
+ return="java.util.Collection&lt;java.util.List&lt;?&gt;&gt;"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="CertificateParsingException" type="java.security.cert.CertificateParsingException">
+</exception>
+</method>
+<method name="getSubjectDN"
+ return="java.security.Principal"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getSubjectUniqueID"
+ return="boolean[]"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getSubjectX500Principal"
+ return="javax.security.auth.x500.X500Principal"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getTBSCertificate"
+ return="byte[]"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="CertificateEncodingException" type="java.security.cert.CertificateEncodingException">
+</exception>
+</method>
+<method name="getVersion"
+ return="int"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+</class>
+<interface name="X509Extension"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="getCriticalExtensionOIDs"
+ return="java.util.Set&lt;java.lang.String&gt;"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getExtensionValue"
+ return="byte[]"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="oid" type="java.lang.String">
+</parameter>
+</method>
+<method name="getNonCriticalExtensionOIDs"
+ return="java.util.Set&lt;java.lang.String&gt;"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="hasUnsupportedCriticalExtension"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+</interface>
+</package>
+<package name="java.security.interfaces"
+>
+<interface name="DSAKey"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="getParams"
+ return="java.security.interfaces.DSAParams"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+</interface>
+<interface name="DSAKeyPairGenerator"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="initialize"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="params" type="java.security.interfaces.DSAParams">
+</parameter>
+<parameter name="random" type="java.security.SecureRandom">
+</parameter>
+<exception name="InvalidParameterException" type="java.security.InvalidParameterException">
+</exception>
+</method>
+<method name="initialize"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="modlen" type="int">
+</parameter>
+<parameter name="genParams" type="boolean">
+</parameter>
+<parameter name="random" type="java.security.SecureRandom">
+</parameter>
+<exception name="InvalidParameterException" type="java.security.InvalidParameterException">
+</exception>
+</method>
+</interface>
+<interface name="DSAParams"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="getG"
+ return="java.math.BigInteger"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getP"
+ return="java.math.BigInteger"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getQ"
+ return="java.math.BigInteger"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+</interface>
+<interface name="DSAPrivateKey"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="java.security.interfaces.DSAKey">
+</implements>
+<implements name="java.security.PrivateKey">
+</implements>
+<method name="getX"
+ return="java.math.BigInteger"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<field name="serialVersionUID"
+ type="long"
+ transient="false"
+ volatile="false"
+ value="7776497482533790279L"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</interface>
+<interface name="DSAPublicKey"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="java.security.interfaces.DSAKey">
+</implements>
+<implements name="java.security.PublicKey">
+</implements>
+<method name="getY"
+ return="java.math.BigInteger"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<field name="serialVersionUID"
+ type="long"
+ transient="false"
+ volatile="false"
+ value="1234526332779022332L"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</interface>
+<interface name="ECKey"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="getParams"
+ return="java.security.spec.ECParameterSpec"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+</interface>
+<interface name="ECPrivateKey"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="java.security.interfaces.ECKey">
+</implements>
+<implements name="java.security.PrivateKey">
+</implements>
+<method name="getS"
+ return="java.math.BigInteger"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<field name="serialVersionUID"
+ type="long"
+ transient="false"
+ volatile="false"
+ value="-7896394956925609184L"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</interface>
+<interface name="ECPublicKey"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="java.security.interfaces.ECKey">
+</implements>
+<implements name="java.security.PublicKey">
+</implements>
+<method name="getW"
+ return="java.security.spec.ECPoint"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<field name="serialVersionUID"
+ type="long"
+ transient="false"
+ volatile="false"
+ value="-3314988629879632826L"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</interface>
+<interface name="RSAKey"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="getModulus"
+ return="java.math.BigInteger"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+</interface>
+<interface name="RSAMultiPrimePrivateCrtKey"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="java.security.interfaces.RSAPrivateKey">
+</implements>
+<method name="getCrtCoefficient"
+ return="java.math.BigInteger"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getOtherPrimeInfo"
+ return="java.security.spec.RSAOtherPrimeInfo[]"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getPrimeExponentP"
+ return="java.math.BigInteger"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getPrimeExponentQ"
+ return="java.math.BigInteger"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getPrimeP"
+ return="java.math.BigInteger"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getPrimeQ"
+ return="java.math.BigInteger"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getPublicExponent"
+ return="java.math.BigInteger"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<field name="serialVersionUID"
+ type="long"
+ transient="false"
+ volatile="false"
+ value="618058533534628008L"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</interface>
+<interface name="RSAPrivateCrtKey"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="java.security.interfaces.RSAPrivateKey">
+</implements>
+<method name="getCrtCoefficient"
+ return="java.math.BigInteger"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getPrimeExponentP"
+ return="java.math.BigInteger"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getPrimeExponentQ"
+ return="java.math.BigInteger"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getPrimeP"
+ return="java.math.BigInteger"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getPrimeQ"
+ return="java.math.BigInteger"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getPublicExponent"
+ return="java.math.BigInteger"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<field name="serialVersionUID"
+ type="long"
+ transient="false"
+ volatile="false"
+ value="-5682214253527700368L"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</interface>
+<interface name="RSAPrivateKey"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="java.security.PrivateKey">
+</implements>
+<implements name="java.security.interfaces.RSAKey">
+</implements>
+<method name="getPrivateExponent"
+ return="java.math.BigInteger"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<field name="serialVersionUID"
+ type="long"
+ transient="false"
+ volatile="false"
+ value="5187144804936595022L"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</interface>
+<interface name="RSAPublicKey"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="java.security.PublicKey">
+</implements>
+<implements name="java.security.interfaces.RSAKey">
+</implements>
+<method name="getPublicExponent"
+ return="java.math.BigInteger"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<field name="serialVersionUID"
+ type="long"
+ transient="false"
+ volatile="false"
+ value="-8727434096241101194L"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</interface>
+</package>
+<package name="java.security.spec"
+>
+<interface name="AlgorithmParameterSpec"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</interface>
+<class name="DSAParameterSpec"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="java.security.spec.AlgorithmParameterSpec">
+</implements>
+<implements name="java.security.interfaces.DSAParams">
+</implements>
+<constructor name="DSAParameterSpec"
+ type="java.security.spec.DSAParameterSpec"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="p" type="java.math.BigInteger">
+</parameter>
+<parameter name="q" type="java.math.BigInteger">
+</parameter>
+<parameter name="g" type="java.math.BigInteger">
+</parameter>
+</constructor>
+<method name="getG"
+ return="java.math.BigInteger"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getP"
+ return="java.math.BigInteger"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getQ"
+ return="java.math.BigInteger"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+</class>
+<class name="DSAPrivateKeySpec"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="java.security.spec.KeySpec">
+</implements>
+<constructor name="DSAPrivateKeySpec"
+ type="java.security.spec.DSAPrivateKeySpec"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="x" type="java.math.BigInteger">
+</parameter>
+<parameter name="p" type="java.math.BigInteger">
+</parameter>
+<parameter name="q" type="java.math.BigInteger">
+</parameter>
+<parameter name="g" type="java.math.BigInteger">
+</parameter>
+</constructor>
+<method name="getG"
+ return="java.math.BigInteger"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getP"
+ return="java.math.BigInteger"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getQ"
+ return="java.math.BigInteger"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getX"
+ return="java.math.BigInteger"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+</class>
+<class name="DSAPublicKeySpec"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="java.security.spec.KeySpec">
+</implements>
+<constructor name="DSAPublicKeySpec"
+ type="java.security.spec.DSAPublicKeySpec"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="y" type="java.math.BigInteger">
+</parameter>
+<parameter name="p" type="java.math.BigInteger">
+</parameter>
+<parameter name="q" type="java.math.BigInteger">
+</parameter>
+<parameter name="g" type="java.math.BigInteger">
+</parameter>
+</constructor>
+<method name="getG"
+ return="java.math.BigInteger"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getP"
+ return="java.math.BigInteger"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getQ"
+ return="java.math.BigInteger"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getY"
+ return="java.math.BigInteger"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+</class>
+<interface name="ECField"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="getFieldSize"
+ return="int"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+</interface>
+<class name="ECFieldF2m"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="java.security.spec.ECField">
+</implements>
+<constructor name="ECFieldF2m"
+ type="java.security.spec.ECFieldF2m"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="m" type="int">
+</parameter>
+</constructor>
+<constructor name="ECFieldF2m"
+ type="java.security.spec.ECFieldF2m"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="m" type="int">
+</parameter>
+<parameter name="rp" type="java.math.BigInteger">
+</parameter>
+</constructor>
+<constructor name="ECFieldF2m"
+ type="java.security.spec.ECFieldF2m"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="m" type="int">
+</parameter>
+<parameter name="ks" type="int[]">
+</parameter>
+</constructor>
+<method name="getFieldSize"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getM"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getMidTermsOfReductionPolynomial"
+ return="int[]"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getReductionPolynomial"
+ return="java.math.BigInteger"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+</class>
+<class name="ECFieldFp"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="java.security.spec.ECField">
+</implements>
+<constructor name="ECFieldFp"
+ type="java.security.spec.ECFieldFp"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="p" type="java.math.BigInteger">
+</parameter>
+</constructor>
+<method name="getFieldSize"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getP"
+ return="java.math.BigInteger"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+</class>
+<class name="ECGenParameterSpec"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="java.security.spec.AlgorithmParameterSpec">
+</implements>
+<constructor name="ECGenParameterSpec"
+ type="java.security.spec.ECGenParameterSpec"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+</constructor>
+<method name="getName"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+</class>
+<class name="ECParameterSpec"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="java.security.spec.AlgorithmParameterSpec">
+</implements>
+<constructor name="ECParameterSpec"
+ type="java.security.spec.ECParameterSpec"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="curve" type="java.security.spec.EllipticCurve">
+</parameter>
+<parameter name="generator" type="java.security.spec.ECPoint">
+</parameter>
+<parameter name="order" type="java.math.BigInteger">
+</parameter>
+<parameter name="cofactor" type="int">
+</parameter>
+</constructor>
+<method name="getCofactor"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getCurve"
+ return="java.security.spec.EllipticCurve"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getGenerator"
+ return="java.security.spec.ECPoint"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getOrder"
+ return="java.math.BigInteger"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+</class>
+<class name="ECPoint"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="ECPoint"
+ type="java.security.spec.ECPoint"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="affineX" type="java.math.BigInteger">
+</parameter>
+<parameter name="affineY" type="java.math.BigInteger">
+</parameter>
+</constructor>
+<method name="getAffineX"
+ return="java.math.BigInteger"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getAffineY"
+ return="java.math.BigInteger"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<field name="POINT_INFINITY"
+ type="java.security.spec.ECPoint"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<class name="ECPrivateKeySpec"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="java.security.spec.KeySpec">
+</implements>
+<constructor name="ECPrivateKeySpec"
+ type="java.security.spec.ECPrivateKeySpec"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="s" type="java.math.BigInteger">
+</parameter>
+<parameter name="params" type="java.security.spec.ECParameterSpec">
+</parameter>
+</constructor>
+<method name="getParams"
+ return="java.security.spec.ECParameterSpec"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getS"
+ return="java.math.BigInteger"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+</class>
+<class name="ECPublicKeySpec"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="java.security.spec.KeySpec">
+</implements>
+<constructor name="ECPublicKeySpec"
+ type="java.security.spec.ECPublicKeySpec"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="w" type="java.security.spec.ECPoint">
+</parameter>
+<parameter name="params" type="java.security.spec.ECParameterSpec">
+</parameter>
+</constructor>
+<method name="getParams"
+ return="java.security.spec.ECParameterSpec"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getW"
+ return="java.security.spec.ECPoint"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+</class>
+<class name="EllipticCurve"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="EllipticCurve"
+ type="java.security.spec.EllipticCurve"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="field" type="java.security.spec.ECField">
+</parameter>
+<parameter name="a" type="java.math.BigInteger">
+</parameter>
+<parameter name="b" type="java.math.BigInteger">
+</parameter>
+<parameter name="seed" type="byte[]">
+</parameter>
+</constructor>
+<constructor name="EllipticCurve"
+ type="java.security.spec.EllipticCurve"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="field" type="java.security.spec.ECField">
+</parameter>
+<parameter name="a" type="java.math.BigInteger">
+</parameter>
+<parameter name="b" type="java.math.BigInteger">
+</parameter>
+</constructor>
+<method name="getA"
+ return="java.math.BigInteger"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getB"
+ return="java.math.BigInteger"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getField"
+ return="java.security.spec.ECField"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getSeed"
+ return="byte[]"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+</class>
+<class name="EncodedKeySpec"
+ extends="java.lang.Object"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="java.security.spec.KeySpec">
+</implements>
+<constructor name="EncodedKeySpec"
+ type="java.security.spec.EncodedKeySpec"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="encodedKey" type="byte[]">
+</parameter>
+</constructor>
+<method name="getEncoded"
+ return="byte[]"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getFormat"
+ return="java.lang.String"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+</class>
+<class name="InvalidKeySpecException"
+ extends="java.security.GeneralSecurityException"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="InvalidKeySpecException"
+ type="java.security.spec.InvalidKeySpecException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="msg" type="java.lang.String">
+</parameter>
+</constructor>
+<constructor name="InvalidKeySpecException"
+ type="java.security.spec.InvalidKeySpecException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<constructor name="InvalidKeySpecException"
+ type="java.security.spec.InvalidKeySpecException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="message" type="java.lang.String">
+</parameter>
+<parameter name="cause" type="java.lang.Throwable">
+</parameter>
+</constructor>
+<constructor name="InvalidKeySpecException"
+ type="java.security.spec.InvalidKeySpecException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="cause" type="java.lang.Throwable">
+</parameter>
+</constructor>
+</class>
+<class name="InvalidParameterSpecException"
+ extends="java.security.GeneralSecurityException"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="InvalidParameterSpecException"
+ type="java.security.spec.InvalidParameterSpecException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="msg" type="java.lang.String">
+</parameter>
+</constructor>
+<constructor name="InvalidParameterSpecException"
+ type="java.security.spec.InvalidParameterSpecException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+</class>
+<interface name="KeySpec"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</interface>
+<class name="MGF1ParameterSpec"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="java.security.spec.AlgorithmParameterSpec">
+</implements>
+<constructor name="MGF1ParameterSpec"
+ type="java.security.spec.MGF1ParameterSpec"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="mdName" type="java.lang.String">
+</parameter>
+</constructor>
+<method name="getDigestAlgorithm"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<field name="SHA1"
+ type="java.security.spec.MGF1ParameterSpec"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="SHA256"
+ type="java.security.spec.MGF1ParameterSpec"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="SHA384"
+ type="java.security.spec.MGF1ParameterSpec"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="SHA512"
+ type="java.security.spec.MGF1ParameterSpec"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<class name="PKCS8EncodedKeySpec"
+ extends="java.security.spec.EncodedKeySpec"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="PKCS8EncodedKeySpec"
+ type="java.security.spec.PKCS8EncodedKeySpec"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="encodedKey" type="byte[]">
+</parameter>
+</constructor>
+<method name="getFormat"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+</class>
+<class name="PSSParameterSpec"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="java.security.spec.AlgorithmParameterSpec">
+</implements>
+<constructor name="PSSParameterSpec"
+ type="java.security.spec.PSSParameterSpec"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="saltLen" type="int">
+</parameter>
+</constructor>
+<constructor name="PSSParameterSpec"
+ type="java.security.spec.PSSParameterSpec"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="mdName" type="java.lang.String">
+</parameter>
+<parameter name="mgfName" type="java.lang.String">
+</parameter>
+<parameter name="mgfSpec" type="java.security.spec.AlgorithmParameterSpec">
+</parameter>
+<parameter name="saltLen" type="int">
+</parameter>
+<parameter name="trailerField" type="int">
+</parameter>
+</constructor>
+<method name="getDigestAlgorithm"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getMGFAlgorithm"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getMGFParameters"
+ return="java.security.spec.AlgorithmParameterSpec"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getSaltLength"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getTrailerField"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<field name="DEFAULT"
+ type="java.security.spec.PSSParameterSpec"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<class name="RSAKeyGenParameterSpec"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="java.security.spec.AlgorithmParameterSpec">
+</implements>
+<constructor name="RSAKeyGenParameterSpec"
+ type="java.security.spec.RSAKeyGenParameterSpec"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="keysize" type="int">
+</parameter>
+<parameter name="publicExponent" type="java.math.BigInteger">
+</parameter>
+</constructor>
+<method name="getKeysize"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getPublicExponent"
+ return="java.math.BigInteger"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<field name="F0"
+ type="java.math.BigInteger"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="F4"
+ type="java.math.BigInteger"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<class name="RSAMultiPrimePrivateCrtKeySpec"
+ extends="java.security.spec.RSAPrivateKeySpec"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="RSAMultiPrimePrivateCrtKeySpec"
+ type="java.security.spec.RSAMultiPrimePrivateCrtKeySpec"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="modulus" type="java.math.BigInteger">
+</parameter>
+<parameter name="publicExponent" type="java.math.BigInteger">
+</parameter>
+<parameter name="privateExponent" type="java.math.BigInteger">
+</parameter>
+<parameter name="primeP" type="java.math.BigInteger">
+</parameter>
+<parameter name="primeQ" type="java.math.BigInteger">
+</parameter>
+<parameter name="primeExponentP" type="java.math.BigInteger">
+</parameter>
+<parameter name="primeExponentQ" type="java.math.BigInteger">
+</parameter>
+<parameter name="crtCoefficient" type="java.math.BigInteger">
+</parameter>
+<parameter name="otherPrimeInfo" type="java.security.spec.RSAOtherPrimeInfo[]">
+</parameter>
+</constructor>
+<method name="getCrtCoefficient"
+ return="java.math.BigInteger"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getOtherPrimeInfo"
+ return="java.security.spec.RSAOtherPrimeInfo[]"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getPrimeExponentP"
+ return="java.math.BigInteger"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getPrimeExponentQ"
+ return="java.math.BigInteger"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getPrimeP"
+ return="java.math.BigInteger"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getPrimeQ"
+ return="java.math.BigInteger"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getPublicExponent"
+ return="java.math.BigInteger"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+</class>
+<class name="RSAOtherPrimeInfo"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="RSAOtherPrimeInfo"
+ type="java.security.spec.RSAOtherPrimeInfo"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="prime" type="java.math.BigInteger">
+</parameter>
+<parameter name="primeExponent" type="java.math.BigInteger">
+</parameter>
+<parameter name="crtCoefficient" type="java.math.BigInteger">
+</parameter>
+</constructor>
+<method name="getCrtCoefficient"
+ return="java.math.BigInteger"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getExponent"
+ return="java.math.BigInteger"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getPrime"
+ return="java.math.BigInteger"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+</class>
+<class name="RSAPrivateCrtKeySpec"
+ extends="java.security.spec.RSAPrivateKeySpec"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="RSAPrivateCrtKeySpec"
+ type="java.security.spec.RSAPrivateCrtKeySpec"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="modulus" type="java.math.BigInteger">
+</parameter>
+<parameter name="publicExponent" type="java.math.BigInteger">
+</parameter>
+<parameter name="privateExponent" type="java.math.BigInteger">
+</parameter>
+<parameter name="primeP" type="java.math.BigInteger">
+</parameter>
+<parameter name="primeQ" type="java.math.BigInteger">
+</parameter>
+<parameter name="primeExponentP" type="java.math.BigInteger">
+</parameter>
+<parameter name="primeExponentQ" type="java.math.BigInteger">
+</parameter>
+<parameter name="crtCoefficient" type="java.math.BigInteger">
+</parameter>
+</constructor>
+<method name="getCrtCoefficient"
+ return="java.math.BigInteger"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getPrimeExponentP"
+ return="java.math.BigInteger"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getPrimeExponentQ"
+ return="java.math.BigInteger"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getPrimeP"
+ return="java.math.BigInteger"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getPrimeQ"
+ return="java.math.BigInteger"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getPublicExponent"
+ return="java.math.BigInteger"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+</class>
+<class name="RSAPrivateKeySpec"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="java.security.spec.KeySpec">
+</implements>
+<constructor name="RSAPrivateKeySpec"
+ type="java.security.spec.RSAPrivateKeySpec"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="modulus" type="java.math.BigInteger">
+</parameter>
+<parameter name="privateExponent" type="java.math.BigInteger">
+</parameter>
+</constructor>
+<method name="getModulus"
+ return="java.math.BigInteger"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getPrivateExponent"
+ return="java.math.BigInteger"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+</class>
+<class name="RSAPublicKeySpec"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="java.security.spec.KeySpec">
+</implements>
+<constructor name="RSAPublicKeySpec"
+ type="java.security.spec.RSAPublicKeySpec"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="modulus" type="java.math.BigInteger">
+</parameter>
+<parameter name="publicExponent" type="java.math.BigInteger">
+</parameter>
+</constructor>
+<method name="getModulus"
+ return="java.math.BigInteger"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getPublicExponent"
+ return="java.math.BigInteger"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+</class>
+<class name="X509EncodedKeySpec"
+ extends="java.security.spec.EncodedKeySpec"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="X509EncodedKeySpec"
+ type="java.security.spec.X509EncodedKeySpec"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="encodedKey" type="byte[]">
+</parameter>
+</constructor>
+<method name="getFormat"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+</class>
+</package>
+<package name="java.sql"
+>
+<interface name="Array"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="getArray"
+ return="java.lang.Object"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="getArray"
+ return="java.lang.Object"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="index" type="long">
+</parameter>
+<parameter name="count" type="int">
+</parameter>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="getArray"
+ return="java.lang.Object"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="index" type="long">
+</parameter>
+<parameter name="count" type="int">
+</parameter>
+<parameter name="map" type="java.util.Map&lt;java.lang.String, java.lang.Class&lt;?&gt;&gt;">
+</parameter>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="getArray"
+ return="java.lang.Object"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="map" type="java.util.Map&lt;java.lang.String, java.lang.Class&lt;?&gt;&gt;">
+</parameter>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="getBaseType"
+ return="int"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="getBaseTypeName"
+ return="java.lang.String"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="getResultSet"
+ return="java.sql.ResultSet"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="getResultSet"
+ return="java.sql.ResultSet"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="index" type="long">
+</parameter>
+<parameter name="count" type="int">
+</parameter>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="getResultSet"
+ return="java.sql.ResultSet"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="index" type="long">
+</parameter>
+<parameter name="count" type="int">
+</parameter>
+<parameter name="map" type="java.util.Map&lt;java.lang.String, java.lang.Class&lt;?&gt;&gt;">
+</parameter>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="getResultSet"
+ return="java.sql.ResultSet"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="map" type="java.util.Map&lt;java.lang.String, java.lang.Class&lt;?&gt;&gt;">
+</parameter>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+</interface>
+<class name="BatchUpdateException"
+ extends="java.sql.SQLException"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="java.io.Serializable">
+</implements>
+<constructor name="BatchUpdateException"
+ type="java.sql.BatchUpdateException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<constructor name="BatchUpdateException"
+ type="java.sql.BatchUpdateException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="updateCounts" type="int[]">
+</parameter>
+</constructor>
+<constructor name="BatchUpdateException"
+ type="java.sql.BatchUpdateException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="reason" type="java.lang.String">
+</parameter>
+<parameter name="updateCounts" type="int[]">
+</parameter>
+</constructor>
+<constructor name="BatchUpdateException"
+ type="java.sql.BatchUpdateException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="reason" type="java.lang.String">
+</parameter>
+<parameter name="SQLState" type="java.lang.String">
+</parameter>
+<parameter name="updateCounts" type="int[]">
+</parameter>
+</constructor>
+<constructor name="BatchUpdateException"
+ type="java.sql.BatchUpdateException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="reason" type="java.lang.String">
+</parameter>
+<parameter name="SQLState" type="java.lang.String">
+</parameter>
+<parameter name="vendorCode" type="int">
+</parameter>
+<parameter name="updateCounts" type="int[]">
+</parameter>
+</constructor>
+<method name="getUpdateCounts"
+ return="int[]"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+</class>
+<interface name="Blob"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="getBinaryStream"
+ return="java.io.InputStream"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="getBytes"
+ return="byte[]"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="pos" type="long">
+</parameter>
+<parameter name="length" type="int">
+</parameter>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="length"
+ return="long"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="position"
+ return="long"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="pattern" type="java.sql.Blob">
+</parameter>
+<parameter name="start" type="long">
+</parameter>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="position"
+ return="long"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="pattern" type="byte[]">
+</parameter>
+<parameter name="start" type="long">
+</parameter>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="setBinaryStream"
+ return="java.io.OutputStream"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="pos" type="long">
+</parameter>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="setBytes"
+ return="int"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="pos" type="long">
+</parameter>
+<parameter name="theBytes" type="byte[]">
+</parameter>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="setBytes"
+ return="int"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="pos" type="long">
+</parameter>
+<parameter name="theBytes" type="byte[]">
+</parameter>
+<parameter name="offset" type="int">
+</parameter>
+<parameter name="len" type="int">
+</parameter>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="truncate"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="len" type="long">
+</parameter>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+</interface>
+<interface name="CallableStatement"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="java.sql.PreparedStatement">
+</implements>
+<method name="getArray"
+ return="java.sql.Array"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="parameterIndex" type="int">
+</parameter>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="getArray"
+ return="java.sql.Array"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="parameterName" type="java.lang.String">
+</parameter>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="getBigDecimal"
+ return="java.math.BigDecimal"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="parameterIndex" type="int">
+</parameter>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="getBigDecimal"
+ return="java.math.BigDecimal"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="deprecated"
+ visibility="public"
+>
+<parameter name="parameterIndex" type="int">
+</parameter>
+<parameter name="scale" type="int">
+</parameter>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="getBigDecimal"
+ return="java.math.BigDecimal"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="parameterName" type="java.lang.String">
+</parameter>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="getBlob"
+ return="java.sql.Blob"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="parameterIndex" type="int">
+</parameter>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="getBlob"
+ return="java.sql.Blob"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="parameterName" type="java.lang.String">
+</parameter>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="getBoolean"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="parameterIndex" type="int">
+</parameter>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="getBoolean"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="parameterName" type="java.lang.String">
+</parameter>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="getByte"
+ return="byte"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="parameterIndex" type="int">
+</parameter>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="getByte"
+ return="byte"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="parameterName" type="java.lang.String">
+</parameter>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="getBytes"
+ return="byte[]"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="parameterIndex" type="int">
+</parameter>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="getBytes"
+ return="byte[]"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="parameterName" type="java.lang.String">
+</parameter>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="getClob"
+ return="java.sql.Clob"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="parameterIndex" type="int">
+</parameter>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="getClob"
+ return="java.sql.Clob"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="parameterName" type="java.lang.String">
+</parameter>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="getDate"
+ return="java.sql.Date"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="parameterIndex" type="int">
+</parameter>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="getDate"
+ return="java.sql.Date"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="parameterIndex" type="int">
+</parameter>
+<parameter name="cal" type="java.util.Calendar">
+</parameter>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="getDate"
+ return="java.sql.Date"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="parameterName" type="java.lang.String">
+</parameter>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="getDate"
+ return="java.sql.Date"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="parameterName" type="java.lang.String">
+</parameter>
+<parameter name="cal" type="java.util.Calendar">
+</parameter>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="getDouble"
+ return="double"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="parameterIndex" type="int">
+</parameter>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="getDouble"
+ return="double"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="parameterName" type="java.lang.String">
+</parameter>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="getFloat"
+ return="float"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="parameterIndex" type="int">
+</parameter>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="getFloat"
+ return="float"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="parameterName" type="java.lang.String">
+</parameter>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="getInt"
+ return="int"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="parameterIndex" type="int">
+</parameter>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="getInt"
+ return="int"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="parameterName" type="java.lang.String">
+</parameter>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="getLong"
+ return="long"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="parameterIndex" type="int">
+</parameter>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="getLong"
+ return="long"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="parameterName" type="java.lang.String">
+</parameter>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="getObject"
+ return="java.lang.Object"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="parameterIndex" type="int">
+</parameter>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="getObject"
+ return="java.lang.Object"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="parameterIndex" type="int">
+</parameter>
+<parameter name="map" type="java.util.Map&lt;java.lang.String, java.lang.Class&lt;?&gt;&gt;">
+</parameter>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="getObject"
+ return="java.lang.Object"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="parameterName" type="java.lang.String">
+</parameter>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="getObject"
+ return="java.lang.Object"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="parameterName" type="java.lang.String">
+</parameter>
+<parameter name="map" type="java.util.Map&lt;java.lang.String, java.lang.Class&lt;?&gt;&gt;">
+</parameter>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="getRef"
+ return="java.sql.Ref"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="parameterIndex" type="int">
+</parameter>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="getRef"
+ return="java.sql.Ref"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="parameterName" type="java.lang.String">
+</parameter>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="getShort"
+ return="short"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="parameterIndex" type="int">
+</parameter>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="getShort"
+ return="short"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="parameterName" type="java.lang.String">
+</parameter>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="getString"
+ return="java.lang.String"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="parameterIndex" type="int">
+</parameter>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="getString"
+ return="java.lang.String"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="parameterName" type="java.lang.String">
+</parameter>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="getTime"
+ return="java.sql.Time"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="parameterIndex" type="int">
+</parameter>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="getTime"
+ return="java.sql.Time"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="parameterIndex" type="int">
+</parameter>
+<parameter name="cal" type="java.util.Calendar">
+</parameter>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="getTime"
+ return="java.sql.Time"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="parameterName" type="java.lang.String">
+</parameter>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="getTime"
+ return="java.sql.Time"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="parameterName" type="java.lang.String">
+</parameter>
+<parameter name="cal" type="java.util.Calendar">
+</parameter>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="getTimestamp"
+ return="java.sql.Timestamp"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="parameterIndex" type="int">
+</parameter>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="getTimestamp"
+ return="java.sql.Timestamp"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="parameterIndex" type="int">
+</parameter>
+<parameter name="cal" type="java.util.Calendar">
+</parameter>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="getTimestamp"
+ return="java.sql.Timestamp"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="parameterName" type="java.lang.String">
+</parameter>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="getTimestamp"
+ return="java.sql.Timestamp"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="parameterName" type="java.lang.String">
+</parameter>
+<parameter name="cal" type="java.util.Calendar">
+</parameter>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="getURL"
+ return="java.net.URL"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="parameterIndex" type="int">
+</parameter>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="getURL"
+ return="java.net.URL"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="parameterName" type="java.lang.String">
+</parameter>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="registerOutParameter"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="parameterIndex" type="int">
+</parameter>
+<parameter name="sqlType" type="int">
+</parameter>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="registerOutParameter"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="parameterIndex" type="int">
+</parameter>
+<parameter name="sqlType" type="int">
+</parameter>
+<parameter name="scale" type="int">
+</parameter>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="registerOutParameter"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="paramIndex" type="int">
+</parameter>
+<parameter name="sqlType" type="int">
+</parameter>
+<parameter name="typeName" type="java.lang.String">
+</parameter>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="registerOutParameter"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="parameterName" type="java.lang.String">
+</parameter>
+<parameter name="sqlType" type="int">
+</parameter>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="registerOutParameter"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="parameterName" type="java.lang.String">
+</parameter>
+<parameter name="sqlType" type="int">
+</parameter>
+<parameter name="scale" type="int">
+</parameter>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="registerOutParameter"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="parameterName" type="java.lang.String">
+</parameter>
+<parameter name="sqlType" type="int">
+</parameter>
+<parameter name="typeName" type="java.lang.String">
+</parameter>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="setAsciiStream"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="parameterName" type="java.lang.String">
+</parameter>
+<parameter name="theInputStream" type="java.io.InputStream">
+</parameter>
+<parameter name="length" type="int">
+</parameter>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="setBigDecimal"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="parameterName" type="java.lang.String">
+</parameter>
+<parameter name="theBigDecimal" type="java.math.BigDecimal">
+</parameter>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="setBinaryStream"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="parameterName" type="java.lang.String">
+</parameter>
+<parameter name="theInputStream" type="java.io.InputStream">
+</parameter>
+<parameter name="length" type="int">
+</parameter>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="setBoolean"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="parameterName" type="java.lang.String">
+</parameter>
+<parameter name="theBoolean" type="boolean">
+</parameter>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="setByte"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="parameterName" type="java.lang.String">
+</parameter>
+<parameter name="theByte" type="byte">
+</parameter>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="setBytes"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="parameterName" type="java.lang.String">
+</parameter>
+<parameter name="theBytes" type="byte[]">
+</parameter>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="setCharacterStream"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="parameterName" type="java.lang.String">
+</parameter>
+<parameter name="reader" type="java.io.Reader">
+</parameter>
+<parameter name="length" type="int">
+</parameter>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="setDate"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="parameterName" type="java.lang.String">
+</parameter>
+<parameter name="theDate" type="java.sql.Date">
+</parameter>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="setDate"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="parameterName" type="java.lang.String">
+</parameter>
+<parameter name="theDate" type="java.sql.Date">
+</parameter>
+<parameter name="cal" type="java.util.Calendar">
+</parameter>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="setDouble"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="parameterName" type="java.lang.String">
+</parameter>
+<parameter name="theDouble" type="double">
+</parameter>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="setFloat"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="parameterName" type="java.lang.String">
+</parameter>
+<parameter name="theFloat" type="float">
+</parameter>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="setInt"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="parameterName" type="java.lang.String">
+</parameter>
+<parameter name="theInt" type="int">
+</parameter>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="setLong"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="parameterName" type="java.lang.String">
+</parameter>
+<parameter name="theLong" type="long">
+</parameter>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="setNull"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="parameterName" type="java.lang.String">
+</parameter>
+<parameter name="sqlType" type="int">
+</parameter>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="setNull"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="parameterName" type="java.lang.String">
+</parameter>
+<parameter name="sqlType" type="int">
+</parameter>
+<parameter name="typeName" type="java.lang.String">
+</parameter>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="setObject"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="parameterName" type="java.lang.String">
+</parameter>
+<parameter name="theObject" type="java.lang.Object">
+</parameter>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="setObject"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="parameterName" type="java.lang.String">
+</parameter>
+<parameter name="theObject" type="java.lang.Object">
+</parameter>
+<parameter name="targetSqlType" type="int">
+</parameter>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="setObject"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="parameterName" type="java.lang.String">
+</parameter>
+<parameter name="theObject" type="java.lang.Object">
+</parameter>
+<parameter name="targetSqlType" type="int">
+</parameter>
+<parameter name="scale" type="int">
+</parameter>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="setShort"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="parameterName" type="java.lang.String">
+</parameter>
+<parameter name="theShort" type="short">
+</parameter>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="setString"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="parameterName" type="java.lang.String">
+</parameter>
+<parameter name="theString" type="java.lang.String">
+</parameter>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="setTime"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="parameterName" type="java.lang.String">
+</parameter>
+<parameter name="theTime" type="java.sql.Time">
+</parameter>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="setTime"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="parameterName" type="java.lang.String">
+</parameter>
+<parameter name="theTime" type="java.sql.Time">
+</parameter>
+<parameter name="cal" type="java.util.Calendar">
+</parameter>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="setTimestamp"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="parameterName" type="java.lang.String">
+</parameter>
+<parameter name="theTimestamp" type="java.sql.Timestamp">
+</parameter>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="setTimestamp"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="parameterName" type="java.lang.String">
+</parameter>
+<parameter name="theTimestamp" type="java.sql.Timestamp">
+</parameter>
+<parameter name="cal" type="java.util.Calendar">
+</parameter>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="setURL"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="parameterName" type="java.lang.String">
+</parameter>
+<parameter name="theURL" type="java.net.URL">
+</parameter>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="wasNull"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+</interface>
+<interface name="Clob"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="getAsciiStream"
+ return="java.io.InputStream"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="getCharacterStream"
+ return="java.io.Reader"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="getSubString"
+ return="java.lang.String"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="pos" type="long">
+</parameter>
+<parameter name="length" type="int">
+</parameter>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="length"
+ return="long"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="position"
+ return="long"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="searchstr" type="java.sql.Clob">
+</parameter>
+<parameter name="start" type="long">
+</parameter>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="position"
+ return="long"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="searchstr" type="java.lang.String">
+</parameter>
+<parameter name="start" type="long">
+</parameter>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="setAsciiStream"
+ return="java.io.OutputStream"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="pos" type="long">
+</parameter>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="setCharacterStream"
+ return="java.io.Writer"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="pos" type="long">
+</parameter>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="setString"
+ return="int"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="pos" type="long">
+</parameter>
+<parameter name="str" type="java.lang.String">
+</parameter>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="setString"
+ return="int"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="pos" type="long">
+</parameter>
+<parameter name="str" type="java.lang.String">
+</parameter>
+<parameter name="offset" type="int">
+</parameter>
+<parameter name="len" type="int">
+</parameter>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="truncate"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="len" type="long">
+</parameter>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+</interface>
+<interface name="Connection"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="clearWarnings"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="close"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="commit"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="createStatement"
+ return="java.sql.Statement"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="createStatement"
+ return="java.sql.Statement"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="resultSetType" type="int">
+</parameter>
+<parameter name="resultSetConcurrency" type="int">
+</parameter>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="createStatement"
+ return="java.sql.Statement"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="resultSetType" type="int">
+</parameter>
+<parameter name="resultSetConcurrency" type="int">
+</parameter>
+<parameter name="resultSetHoldability" type="int">
+</parameter>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="getAutoCommit"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="getCatalog"
+ return="java.lang.String"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="getHoldability"
+ return="int"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="getMetaData"
+ return="java.sql.DatabaseMetaData"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="getTransactionIsolation"
+ return="int"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="getTypeMap"
+ return="java.util.Map&lt;java.lang.String, java.lang.Class&lt;?&gt;&gt;"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="getWarnings"
+ return="java.sql.SQLWarning"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="isClosed"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="isReadOnly"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="nativeSQL"
+ return="java.lang.String"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="sql" type="java.lang.String">
+</parameter>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="prepareCall"
+ return="java.sql.CallableStatement"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="sql" type="java.lang.String">
+</parameter>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="prepareCall"
+ return="java.sql.CallableStatement"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="sql" type="java.lang.String">
+</parameter>
+<parameter name="resultSetType" type="int">
+</parameter>
+<parameter name="resultSetConcurrency" type="int">
+</parameter>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="prepareCall"
+ return="java.sql.CallableStatement"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="sql" type="java.lang.String">
+</parameter>
+<parameter name="resultSetType" type="int">
+</parameter>
+<parameter name="resultSetConcurrency" type="int">
+</parameter>
+<parameter name="resultSetHoldability" type="int">
+</parameter>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="prepareStatement"
+ return="java.sql.PreparedStatement"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="sql" type="java.lang.String">
+</parameter>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="prepareStatement"
+ return="java.sql.PreparedStatement"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="sql" type="java.lang.String">
+</parameter>
+<parameter name="autoGeneratedKeys" type="int">
+</parameter>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="prepareStatement"
+ return="java.sql.PreparedStatement"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="sql" type="java.lang.String">
+</parameter>
+<parameter name="columnIndexes" type="int[]">
+</parameter>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="prepareStatement"
+ return="java.sql.PreparedStatement"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="sql" type="java.lang.String">
+</parameter>
+<parameter name="resultSetType" type="int">
+</parameter>
+<parameter name="resultSetConcurrency" type="int">
+</parameter>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="prepareStatement"
+ return="java.sql.PreparedStatement"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="sql" type="java.lang.String">
+</parameter>
+<parameter name="resultSetType" type="int">
+</parameter>
+<parameter name="resultSetConcurrency" type="int">
+</parameter>
+<parameter name="resultSetHoldability" type="int">
+</parameter>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="prepareStatement"
+ return="java.sql.PreparedStatement"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="sql" type="java.lang.String">
+</parameter>
+<parameter name="columnNames" type="java.lang.String[]">
+</parameter>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="releaseSavepoint"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="savepoint" type="java.sql.Savepoint">
+</parameter>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="rollback"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="rollback"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="savepoint" type="java.sql.Savepoint">
+</parameter>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="setAutoCommit"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="autoCommit" type="boolean">
+</parameter>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="setCatalog"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="catalog" type="java.lang.String">
+</parameter>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="setHoldability"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="holdability" type="int">
+</parameter>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="setReadOnly"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="readOnly" type="boolean">
+</parameter>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="setSavepoint"
+ return="java.sql.Savepoint"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="setSavepoint"
+ return="java.sql.Savepoint"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="setTransactionIsolation"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="level" type="int">
+</parameter>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="setTypeMap"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="map" type="java.util.Map&lt;java.lang.String, java.lang.Class&lt;?&gt;&gt;">
+</parameter>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<field name="TRANSACTION_NONE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="0"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TRANSACTION_READ_COMMITTED"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TRANSACTION_READ_UNCOMMITTED"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TRANSACTION_REPEATABLE_READ"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="4"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TRANSACTION_SERIALIZABLE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="8"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</interface>
+<class name="DataTruncation"
+ extends="java.sql.SQLWarning"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="java.io.Serializable">
+</implements>
+<constructor name="DataTruncation"
+ type="java.sql.DataTruncation"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="index" type="int">
+</parameter>
+<parameter name="parameter" type="boolean">
+</parameter>
+<parameter name="read" type="boolean">
+</parameter>
+<parameter name="dataSize" type="int">
+</parameter>
+<parameter name="transferSize" type="int">
+</parameter>
+</constructor>
+<method name="getDataSize"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getIndex"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getParameter"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getRead"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getTransferSize"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+</class>
+<interface name="DatabaseMetaData"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="allProceduresAreCallable"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="allTablesAreSelectable"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="dataDefinitionCausesTransactionCommit"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="dataDefinitionIgnoredInTransactions"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="deletesAreDetected"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="type" type="int">
+</parameter>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="doesMaxRowSizeIncludeBlobs"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="getAttributes"
+ return="java.sql.ResultSet"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="catalog" type="java.lang.String">
+</parameter>
+<parameter name="schemaPattern" type="java.lang.String">
+</parameter>
+<parameter name="typeNamePattern" type="java.lang.String">
+</parameter>
+<parameter name="attributeNamePattern" type="java.lang.String">
+</parameter>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="getBestRowIdentifier"
+ return="java.sql.ResultSet"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="catalog" type="java.lang.String">
+</parameter>
+<parameter name="schema" type="java.lang.String">
+</parameter>
+<parameter name="table" type="java.lang.String">
+</parameter>
+<parameter name="scope" type="int">
+</parameter>
+<parameter name="nullable" type="boolean">
+</parameter>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="getCatalogSeparator"
+ return="java.lang.String"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="getCatalogTerm"
+ return="java.lang.String"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="getCatalogs"
+ return="java.sql.ResultSet"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="getColumnPrivileges"
+ return="java.sql.ResultSet"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="catalog" type="java.lang.String">
+</parameter>
+<parameter name="schema" type="java.lang.String">
+</parameter>
+<parameter name="table" type="java.lang.String">
+</parameter>
+<parameter name="columnNamePattern" type="java.lang.String">
+</parameter>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="getColumns"
+ return="java.sql.ResultSet"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="catalog" type="java.lang.String">
+</parameter>
+<parameter name="schemaPattern" type="java.lang.String">
+</parameter>
+<parameter name="tableNamePattern" type="java.lang.String">
+</parameter>
+<parameter name="columnNamePattern" type="java.lang.String">
+</parameter>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="getConnection"
+ return="java.sql.Connection"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="getCrossReference"
+ return="java.sql.ResultSet"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="primaryCatalog" type="java.lang.String">
+</parameter>
+<parameter name="primarySchema" type="java.lang.String">
+</parameter>
+<parameter name="primaryTable" type="java.lang.String">
+</parameter>
+<parameter name="foreignCatalog" type="java.lang.String">
+</parameter>
+<parameter name="foreignSchema" type="java.lang.String">
+</parameter>
+<parameter name="foreignTable" type="java.lang.String">
+</parameter>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="getDatabaseMajorVersion"
+ return="int"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="getDatabaseMinorVersion"
+ return="int"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="getDatabaseProductName"
+ return="java.lang.String"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="getDatabaseProductVersion"
+ return="java.lang.String"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="getDefaultTransactionIsolation"
+ return="int"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="getDriverMajorVersion"
+ return="int"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getDriverMinorVersion"
+ return="int"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getDriverName"
+ return="java.lang.String"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="getDriverVersion"
+ return="java.lang.String"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="getExportedKeys"
+ return="java.sql.ResultSet"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="catalog" type="java.lang.String">
+</parameter>
+<parameter name="schema" type="java.lang.String">
+</parameter>
+<parameter name="table" type="java.lang.String">
+</parameter>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="getExtraNameCharacters"
+ return="java.lang.String"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="getIdentifierQuoteString"
+ return="java.lang.String"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="getImportedKeys"
+ return="java.sql.ResultSet"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="catalog" type="java.lang.String">
+</parameter>
+<parameter name="schema" type="java.lang.String">
+</parameter>
+<parameter name="table" type="java.lang.String">
+</parameter>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="getIndexInfo"
+ return="java.sql.ResultSet"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="catalog" type="java.lang.String">
+</parameter>
+<parameter name="schema" type="java.lang.String">
+</parameter>
+<parameter name="table" type="java.lang.String">
+</parameter>
+<parameter name="unique" type="boolean">
+</parameter>
+<parameter name="approximate" type="boolean">
+</parameter>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="getJDBCMajorVersion"
+ return="int"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="getJDBCMinorVersion"
+ return="int"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="getMaxBinaryLiteralLength"
+ return="int"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="getMaxCatalogNameLength"
+ return="int"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="getMaxCharLiteralLength"
+ return="int"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="getMaxColumnNameLength"
+ return="int"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="getMaxColumnsInGroupBy"
+ return="int"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="getMaxColumnsInIndex"
+ return="int"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="getMaxColumnsInOrderBy"
+ return="int"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="getMaxColumnsInSelect"
+ return="int"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="getMaxColumnsInTable"
+ return="int"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="getMaxConnections"
+ return="int"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="getMaxCursorNameLength"
+ return="int"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="getMaxIndexLength"
+ return="int"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="getMaxProcedureNameLength"
+ return="int"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="getMaxRowSize"
+ return="int"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="getMaxSchemaNameLength"
+ return="int"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="getMaxStatementLength"
+ return="int"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="getMaxStatements"
+ return="int"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="getMaxTableNameLength"
+ return="int"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="getMaxTablesInSelect"
+ return="int"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="getMaxUserNameLength"
+ return="int"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="getNumericFunctions"
+ return="java.lang.String"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="getPrimaryKeys"
+ return="java.sql.ResultSet"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="catalog" type="java.lang.String">
+</parameter>
+<parameter name="schema" type="java.lang.String">
+</parameter>
+<parameter name="table" type="java.lang.String">
+</parameter>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="getProcedureColumns"
+ return="java.sql.ResultSet"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="catalog" type="java.lang.String">
+</parameter>
+<parameter name="schemaPattern" type="java.lang.String">
+</parameter>
+<parameter name="procedureNamePattern" type="java.lang.String">
+</parameter>
+<parameter name="columnNamePattern" type="java.lang.String">
+</parameter>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="getProcedureTerm"
+ return="java.lang.String"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="getProcedures"
+ return="java.sql.ResultSet"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="catalog" type="java.lang.String">
+</parameter>
+<parameter name="schemaPattern" type="java.lang.String">
+</parameter>
+<parameter name="procedureNamePattern" type="java.lang.String">
+</parameter>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="getResultSetHoldability"
+ return="int"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="getSQLKeywords"
+ return="java.lang.String"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="getSQLStateType"
+ return="int"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="getSchemaTerm"
+ return="java.lang.String"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="getSchemas"
+ return="java.sql.ResultSet"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="getSearchStringEscape"
+ return="java.lang.String"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="getStringFunctions"
+ return="java.lang.String"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="getSuperTables"
+ return="java.sql.ResultSet"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="catalog" type="java.lang.String">
+</parameter>
+<parameter name="schemaPattern" type="java.lang.String">
+</parameter>
+<parameter name="tableNamePattern" type="java.lang.String">
+</parameter>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="getSuperTypes"
+ return="java.sql.ResultSet"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="catalog" type="java.lang.String">
+</parameter>
+<parameter name="schemaPattern" type="java.lang.String">
+</parameter>
+<parameter name="typeNamePattern" type="java.lang.String">
+</parameter>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="getSystemFunctions"
+ return="java.lang.String"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="getTablePrivileges"
+ return="java.sql.ResultSet"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="catalog" type="java.lang.String">
+</parameter>
+<parameter name="schemaPattern" type="java.lang.String">
+</parameter>
+<parameter name="tableNamePattern" type="java.lang.String">
+</parameter>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="getTableTypes"
+ return="java.sql.ResultSet"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="getTables"
+ return="java.sql.ResultSet"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="catalog" type="java.lang.String">
+</parameter>
+<parameter name="schemaPattern" type="java.lang.String">
+</parameter>
+<parameter name="tableNamePattern" type="java.lang.String">
+</parameter>
+<parameter name="types" type="java.lang.String[]">
+</parameter>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="getTimeDateFunctions"
+ return="java.lang.String"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="getTypeInfo"
+ return="java.sql.ResultSet"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="getUDTs"
+ return="java.sql.ResultSet"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="catalog" type="java.lang.String">
+</parameter>
+<parameter name="schemaPattern" type="java.lang.String">
+</parameter>
+<parameter name="typeNamePattern" type="java.lang.String">
+</parameter>
+<parameter name="types" type="int[]">
+</parameter>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="getURL"
+ return="java.lang.String"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="getUserName"
+ return="java.lang.String"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="getVersionColumns"
+ return="java.sql.ResultSet"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="catalog" type="java.lang.String">
+</parameter>
+<parameter name="schema" type="java.lang.String">
+</parameter>
+<parameter name="table" type="java.lang.String">
+</parameter>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="insertsAreDetected"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="type" type="int">
+</parameter>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="isCatalogAtStart"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="isReadOnly"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="locatorsUpdateCopy"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="nullPlusNonNullIsNull"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="nullsAreSortedAtEnd"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="nullsAreSortedAtStart"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="nullsAreSortedHigh"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="nullsAreSortedLow"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="othersDeletesAreVisible"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="type" type="int">
+</parameter>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="othersInsertsAreVisible"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="type" type="int">
+</parameter>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="othersUpdatesAreVisible"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="type" type="int">
+</parameter>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="ownDeletesAreVisible"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="type" type="int">
+</parameter>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="ownInsertsAreVisible"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="type" type="int">
+</parameter>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="ownUpdatesAreVisible"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="type" type="int">
+</parameter>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="storesLowerCaseIdentifiers"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="storesLowerCaseQuotedIdentifiers"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="storesMixedCaseIdentifiers"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="storesMixedCaseQuotedIdentifiers"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="storesUpperCaseIdentifiers"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="storesUpperCaseQuotedIdentifiers"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="supportsANSI92EntryLevelSQL"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="supportsANSI92FullSQL"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="supportsANSI92IntermediateSQL"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="supportsAlterTableWithAddColumn"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="supportsAlterTableWithDropColumn"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="supportsBatchUpdates"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="supportsCatalogsInDataManipulation"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="supportsCatalogsInIndexDefinitions"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="supportsCatalogsInPrivilegeDefinitions"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="supportsCatalogsInProcedureCalls"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="supportsCatalogsInTableDefinitions"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="supportsColumnAliasing"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="supportsConvert"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="supportsConvert"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="fromType" type="int">
+</parameter>
+<parameter name="toType" type="int">
+</parameter>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="supportsCoreSQLGrammar"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="supportsCorrelatedSubqueries"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="supportsDataDefinitionAndDataManipulationTransactions"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="supportsDataManipulationTransactionsOnly"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="supportsDifferentTableCorrelationNames"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="supportsExpressionsInOrderBy"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="supportsExtendedSQLGrammar"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="supportsFullOuterJoins"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="supportsGetGeneratedKeys"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="supportsGroupBy"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="supportsGroupByBeyondSelect"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="supportsGroupByUnrelated"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="supportsIntegrityEnhancementFacility"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="supportsLikeEscapeClause"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="supportsLimitedOuterJoins"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="supportsMinimumSQLGrammar"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="supportsMixedCaseIdentifiers"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="supportsMixedCaseQuotedIdentifiers"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="supportsMultipleOpenResults"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="supportsMultipleResultSets"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="supportsMultipleTransactions"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="supportsNamedParameters"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="supportsNonNullableColumns"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="supportsOpenCursorsAcrossCommit"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="supportsOpenCursorsAcrossRollback"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="supportsOpenStatementsAcrossCommit"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="supportsOpenStatementsAcrossRollback"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="supportsOrderByUnrelated"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="supportsOuterJoins"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="supportsPositionedDelete"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="supportsPositionedUpdate"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="supportsResultSetConcurrency"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="type" type="int">
+</parameter>
+<parameter name="concurrency" type="int">
+</parameter>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="supportsResultSetHoldability"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="holdability" type="int">
+</parameter>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="supportsResultSetType"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="type" type="int">
+</parameter>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="supportsSavepoints"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="supportsSchemasInDataManipulation"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="supportsSchemasInIndexDefinitions"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="supportsSchemasInPrivilegeDefinitions"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="supportsSchemasInProcedureCalls"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="supportsSchemasInTableDefinitions"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="supportsSelectForUpdate"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="supportsStatementPooling"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="supportsStoredProcedures"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="supportsSubqueriesInComparisons"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="supportsSubqueriesInExists"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="supportsSubqueriesInIns"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="supportsSubqueriesInQuantifieds"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="supportsTableCorrelationNames"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="supportsTransactionIsolationLevel"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="level" type="int">
+</parameter>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="supportsTransactions"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="supportsUnion"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="supportsUnionAll"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="updatesAreDetected"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="type" type="int">
+</parameter>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="usesLocalFilePerTable"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="usesLocalFiles"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<field name="attributeNoNulls"
+ type="short"
+ transient="false"
+ volatile="false"
+ value="0"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="attributeNullable"
+ type="short"
+ transient="false"
+ volatile="false"
+ value="1"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="attributeNullableUnknown"
+ type="short"
+ transient="false"
+ volatile="false"
+ value="2"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="bestRowNotPseudo"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="bestRowPseudo"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="bestRowSession"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="bestRowTemporary"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="0"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="bestRowTransaction"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="bestRowUnknown"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="0"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="columnNoNulls"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="0"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="columnNullable"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="columnNullableUnknown"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="importedKeyCascade"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="0"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="importedKeyInitiallyDeferred"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="5"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="importedKeyInitiallyImmediate"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="6"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="importedKeyNoAction"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="3"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="importedKeyNotDeferrable"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="7"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="importedKeyRestrict"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="importedKeySetDefault"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="4"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="importedKeySetNull"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="procedureColumnIn"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="procedureColumnInOut"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="procedureColumnOut"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="4"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="procedureColumnResult"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="3"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="procedureColumnReturn"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="5"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="procedureColumnUnknown"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="0"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="procedureNoNulls"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="0"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="procedureNoResult"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="procedureNullable"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="procedureNullableUnknown"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="procedureResultUnknown"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="0"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="procedureReturnsResult"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="sqlStateSQL99"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="sqlStateXOpen"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="tableIndexClustered"
+ type="short"
+ transient="false"
+ volatile="false"
+ value="1"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="tableIndexHashed"
+ type="short"
+ transient="false"
+ volatile="false"
+ value="2"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="tableIndexOther"
+ type="short"
+ transient="false"
+ volatile="false"
+ value="3"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="tableIndexStatistic"
+ type="short"
+ transient="false"
+ volatile="false"
+ value="0"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="typeNoNulls"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="0"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="typeNullable"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="typeNullableUnknown"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="typePredBasic"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="typePredChar"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="typePredNone"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="0"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="typeSearchable"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="3"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="versionColumnNotPseudo"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="versionColumnPseudo"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="versionColumnUnknown"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="0"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</interface>
+<class name="Date"
+ extends="java.util.Date"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="Date"
+ type="java.sql.Date"
+ static="false"
+ final="false"
+ deprecated="deprecated"
+ visibility="public"
+>
+<parameter name="theYear" type="int">
+</parameter>
+<parameter name="theMonth" type="int">
+</parameter>
+<parameter name="theDay" type="int">
+</parameter>
+</constructor>
+<constructor name="Date"
+ type="java.sql.Date"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="theDate" type="long">
+</parameter>
+</constructor>
+<method name="valueOf"
+ return="java.sql.Date"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="dateString" type="java.lang.String">
+</parameter>
+</method>
+</class>
+<interface name="Driver"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="acceptsURL"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="url" type="java.lang.String">
+</parameter>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="connect"
+ return="java.sql.Connection"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="url" type="java.lang.String">
+</parameter>
+<parameter name="info" type="java.util.Properties">
+</parameter>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="getMajorVersion"
+ return="int"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getMinorVersion"
+ return="int"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getPropertyInfo"
+ return="java.sql.DriverPropertyInfo[]"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="url" type="java.lang.String">
+</parameter>
+<parameter name="info" type="java.util.Properties">
+</parameter>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="jdbcCompliant"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+</interface>
+<class name="DriverManager"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="deregisterDriver"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="driver" type="java.sql.Driver">
+</parameter>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="getConnection"
+ return="java.sql.Connection"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="url" type="java.lang.String">
+</parameter>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="getConnection"
+ return="java.sql.Connection"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="url" type="java.lang.String">
+</parameter>
+<parameter name="info" type="java.util.Properties">
+</parameter>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="getConnection"
+ return="java.sql.Connection"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="url" type="java.lang.String">
+</parameter>
+<parameter name="user" type="java.lang.String">
+</parameter>
+<parameter name="password" type="java.lang.String">
+</parameter>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="getDriver"
+ return="java.sql.Driver"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="url" type="java.lang.String">
+</parameter>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="getDrivers"
+ return="java.util.Enumeration&lt;java.sql.Driver&gt;"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getLogStream"
+ return="java.io.PrintStream"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="deprecated"
+ visibility="public"
+>
+</method>
+<method name="getLogWriter"
+ return="java.io.PrintWriter"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getLoginTimeout"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="println"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="message" type="java.lang.String">
+</parameter>
+</method>
+<method name="registerDriver"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="driver" type="java.sql.Driver">
+</parameter>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="setLogStream"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="deprecated"
+ visibility="public"
+>
+<parameter name="out" type="java.io.PrintStream">
+</parameter>
+</method>
+<method name="setLogWriter"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="out" type="java.io.PrintWriter">
+</parameter>
+</method>
+<method name="setLoginTimeout"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="seconds" type="int">
+</parameter>
+</method>
+</class>
+<class name="DriverPropertyInfo"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="DriverPropertyInfo"
+ type="java.sql.DriverPropertyInfo"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+<parameter name="value" type="java.lang.String">
+</parameter>
+</constructor>
+<field name="choices"
+ type="java.lang.String[]"
+ transient="false"
+ volatile="false"
+ value="null"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="description"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="name"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="required"
+ type="boolean"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="value"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<interface name="ParameterMetaData"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="getParameterClassName"
+ return="java.lang.String"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="paramIndex" type="int">
+</parameter>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="getParameterCount"
+ return="int"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="getParameterMode"
+ return="int"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="paramIndex" type="int">
+</parameter>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="getParameterType"
+ return="int"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="paramIndex" type="int">
+</parameter>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="getParameterTypeName"
+ return="java.lang.String"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="paramIndex" type="int">
+</parameter>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="getPrecision"
+ return="int"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="paramIndex" type="int">
+</parameter>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="getScale"
+ return="int"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="paramIndex" type="int">
+</parameter>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="isNullable"
+ return="int"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="paramIndex" type="int">
+</parameter>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="isSigned"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="paramIndex" type="int">
+</parameter>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<field name="parameterModeIn"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="parameterModeInOut"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="parameterModeOut"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="4"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="parameterModeUnknown"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="0"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="parameterNoNulls"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="0"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="parameterNullable"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="parameterNullableUnknown"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</interface>
+<interface name="PreparedStatement"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="java.sql.Statement">
+</implements>
+<method name="addBatch"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="clearParameters"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="execute"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="executeQuery"
+ return="java.sql.ResultSet"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="executeUpdate"
+ return="int"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="getMetaData"
+ return="java.sql.ResultSetMetaData"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="getParameterMetaData"
+ return="java.sql.ParameterMetaData"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="setArray"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="parameterIndex" type="int">
+</parameter>
+<parameter name="theArray" type="java.sql.Array">
+</parameter>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="setAsciiStream"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="parameterIndex" type="int">
+</parameter>
+<parameter name="theInputStream" type="java.io.InputStream">
+</parameter>
+<parameter name="length" type="int">
+</parameter>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="setBigDecimal"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="parameterIndex" type="int">
+</parameter>
+<parameter name="theBigDecimal" type="java.math.BigDecimal">
+</parameter>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="setBinaryStream"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="parameterIndex" type="int">
+</parameter>
+<parameter name="theInputStream" type="java.io.InputStream">
+</parameter>
+<parameter name="length" type="int">
+</parameter>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="setBlob"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="parameterIndex" type="int">
+</parameter>
+<parameter name="theBlob" type="java.sql.Blob">
+</parameter>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="setBoolean"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="parameterIndex" type="int">
+</parameter>
+<parameter name="theBoolean" type="boolean">
+</parameter>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="setByte"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="parameterIndex" type="int">
+</parameter>
+<parameter name="theByte" type="byte">
+</parameter>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="setBytes"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="parameterIndex" type="int">
+</parameter>
+<parameter name="theBytes" type="byte[]">
+</parameter>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="setCharacterStream"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="parameterIndex" type="int">
+</parameter>
+<parameter name="reader" type="java.io.Reader">
+</parameter>
+<parameter name="length" type="int">
+</parameter>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="setClob"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="parameterIndex" type="int">
+</parameter>
+<parameter name="theClob" type="java.sql.Clob">
+</parameter>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="setDate"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="parameterIndex" type="int">
+</parameter>
+<parameter name="theDate" type="java.sql.Date">
+</parameter>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="setDate"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="parameterIndex" type="int">
+</parameter>
+<parameter name="theDate" type="java.sql.Date">
+</parameter>
+<parameter name="cal" type="java.util.Calendar">
+</parameter>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="setDouble"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="parameterIndex" type="int">
+</parameter>
+<parameter name="theDouble" type="double">
+</parameter>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="setFloat"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="parameterIndex" type="int">
+</parameter>
+<parameter name="theFloat" type="float">
+</parameter>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="setInt"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="parameterIndex" type="int">
+</parameter>
+<parameter name="theInt" type="int">
+</parameter>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="setLong"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="parameterIndex" type="int">
+</parameter>
+<parameter name="theLong" type="long">
+</parameter>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="setNull"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="parameterIndex" type="int">
+</parameter>
+<parameter name="sqlType" type="int">
+</parameter>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="setNull"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="paramIndex" type="int">
+</parameter>
+<parameter name="sqlType" type="int">
+</parameter>
+<parameter name="typeName" type="java.lang.String">
+</parameter>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="setObject"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="parameterIndex" type="int">
+</parameter>
+<parameter name="theObject" type="java.lang.Object">
+</parameter>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="setObject"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="parameterIndex" type="int">
+</parameter>
+<parameter name="theObject" type="java.lang.Object">
+</parameter>
+<parameter name="targetSqlType" type="int">
+</parameter>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="setObject"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="parameterIndex" type="int">
+</parameter>
+<parameter name="theObject" type="java.lang.Object">
+</parameter>
+<parameter name="targetSqlType" type="int">
+</parameter>
+<parameter name="scale" type="int">
+</parameter>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="setRef"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="parameterIndex" type="int">
+</parameter>
+<parameter name="theRef" type="java.sql.Ref">
+</parameter>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="setShort"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="parameterIndex" type="int">
+</parameter>
+<parameter name="theShort" type="short">
+</parameter>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="setString"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="parameterIndex" type="int">
+</parameter>
+<parameter name="theString" type="java.lang.String">
+</parameter>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="setTime"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="parameterIndex" type="int">
+</parameter>
+<parameter name="theTime" type="java.sql.Time">
+</parameter>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="setTime"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="parameterIndex" type="int">
+</parameter>
+<parameter name="theTime" type="java.sql.Time">
+</parameter>
+<parameter name="cal" type="java.util.Calendar">
+</parameter>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="setTimestamp"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="parameterIndex" type="int">
+</parameter>
+<parameter name="theTimestamp" type="java.sql.Timestamp">
+</parameter>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="setTimestamp"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="parameterIndex" type="int">
+</parameter>
+<parameter name="theTimestamp" type="java.sql.Timestamp">
+</parameter>
+<parameter name="cal" type="java.util.Calendar">
+</parameter>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="setURL"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="parameterIndex" type="int">
+</parameter>
+<parameter name="theURL" type="java.net.URL">
+</parameter>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="setUnicodeStream"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="deprecated"
+ visibility="public"
+>
+<parameter name="parameterIndex" type="int">
+</parameter>
+<parameter name="theInputStream" type="java.io.InputStream">
+</parameter>
+<parameter name="length" type="int">
+</parameter>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+</interface>
+<interface name="Ref"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="getBaseTypeName"
+ return="java.lang.String"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="getObject"
+ return="java.lang.Object"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="getObject"
+ return="java.lang.Object"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="map" type="java.util.Map&lt;java.lang.String, java.lang.Class&lt;?&gt;&gt;">
+</parameter>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="setObject"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="value" type="java.lang.Object">
+</parameter>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+</interface>
+<interface name="ResultSet"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="absolute"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="row" type="int">
+</parameter>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="afterLast"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="beforeFirst"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="cancelRowUpdates"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="clearWarnings"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="close"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="deleteRow"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="findColumn"
+ return="int"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="columnName" type="java.lang.String">
+</parameter>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="first"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="getArray"
+ return="java.sql.Array"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="columnIndex" type="int">
+</parameter>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="getArray"
+ return="java.sql.Array"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="colName" type="java.lang.String">
+</parameter>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="getAsciiStream"
+ return="java.io.InputStream"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="columnIndex" type="int">
+</parameter>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="getAsciiStream"
+ return="java.io.InputStream"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="columnName" type="java.lang.String">
+</parameter>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="getBigDecimal"
+ return="java.math.BigDecimal"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="columnIndex" type="int">
+</parameter>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="getBigDecimal"
+ return="java.math.BigDecimal"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="deprecated"
+ visibility="public"
+>
+<parameter name="columnIndex" type="int">
+</parameter>
+<parameter name="scale" type="int">
+</parameter>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="getBigDecimal"
+ return="java.math.BigDecimal"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="columnName" type="java.lang.String">
+</parameter>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="getBigDecimal"
+ return="java.math.BigDecimal"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="deprecated"
+ visibility="public"
+>
+<parameter name="columnName" type="java.lang.String">
+</parameter>
+<parameter name="scale" type="int">
+</parameter>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="getBinaryStream"
+ return="java.io.InputStream"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="columnIndex" type="int">
+</parameter>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="getBinaryStream"
+ return="java.io.InputStream"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="columnName" type="java.lang.String">
+</parameter>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="getBlob"
+ return="java.sql.Blob"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="columnIndex" type="int">
+</parameter>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="getBlob"
+ return="java.sql.Blob"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="columnName" type="java.lang.String">
+</parameter>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="getBoolean"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="columnIndex" type="int">
+</parameter>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="getBoolean"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="columnName" type="java.lang.String">
+</parameter>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="getByte"
+ return="byte"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="columnIndex" type="int">
+</parameter>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="getByte"
+ return="byte"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="columnName" type="java.lang.String">
+</parameter>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="getBytes"
+ return="byte[]"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="columnIndex" type="int">
+</parameter>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="getBytes"
+ return="byte[]"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="columnName" type="java.lang.String">
+</parameter>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="getCharacterStream"
+ return="java.io.Reader"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="columnIndex" type="int">
+</parameter>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="getCharacterStream"
+ return="java.io.Reader"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="columnName" type="java.lang.String">
+</parameter>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="getClob"
+ return="java.sql.Clob"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="columnIndex" type="int">
+</parameter>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="getClob"
+ return="java.sql.Clob"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="colName" type="java.lang.String">
+</parameter>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="getConcurrency"
+ return="int"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="getCursorName"
+ return="java.lang.String"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="getDate"
+ return="java.sql.Date"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="columnIndex" type="int">
+</parameter>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="getDate"
+ return="java.sql.Date"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="columnIndex" type="int">
+</parameter>
+<parameter name="cal" type="java.util.Calendar">
+</parameter>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="getDate"
+ return="java.sql.Date"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="columnName" type="java.lang.String">
+</parameter>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="getDate"
+ return="java.sql.Date"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="columnName" type="java.lang.String">
+</parameter>
+<parameter name="cal" type="java.util.Calendar">
+</parameter>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="getDouble"
+ return="double"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="columnIndex" type="int">
+</parameter>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="getDouble"
+ return="double"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="columnName" type="java.lang.String">
+</parameter>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="getFetchDirection"
+ return="int"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="getFetchSize"
+ return="int"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="getFloat"
+ return="float"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="columnIndex" type="int">
+</parameter>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="getFloat"
+ return="float"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="columnName" type="java.lang.String">
+</parameter>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="getInt"
+ return="int"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="columnIndex" type="int">
+</parameter>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="getInt"
+ return="int"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="columnName" type="java.lang.String">
+</parameter>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="getLong"
+ return="long"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="columnIndex" type="int">
+</parameter>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="getLong"
+ return="long"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="columnName" type="java.lang.String">
+</parameter>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="getMetaData"
+ return="java.sql.ResultSetMetaData"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="getObject"
+ return="java.lang.Object"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="columnIndex" type="int">
+</parameter>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="getObject"
+ return="java.lang.Object"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="columnIndex" type="int">
+</parameter>
+<parameter name="map" type="java.util.Map&lt;java.lang.String, java.lang.Class&lt;?&gt;&gt;">
+</parameter>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="getObject"
+ return="java.lang.Object"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="columnName" type="java.lang.String">
+</parameter>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="getObject"
+ return="java.lang.Object"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="columnName" type="java.lang.String">
+</parameter>
+<parameter name="map" type="java.util.Map&lt;java.lang.String, java.lang.Class&lt;?&gt;&gt;">
+</parameter>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="getRef"
+ return="java.sql.Ref"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="columnIndex" type="int">
+</parameter>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="getRef"
+ return="java.sql.Ref"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="colName" type="java.lang.String">
+</parameter>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="getRow"
+ return="int"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="getShort"
+ return="short"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="columnIndex" type="int">
+</parameter>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="getShort"
+ return="short"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="columnName" type="java.lang.String">
+</parameter>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="getStatement"
+ return="java.sql.Statement"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="getString"
+ return="java.lang.String"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="columnIndex" type="int">
+</parameter>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="getString"
+ return="java.lang.String"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="columnName" type="java.lang.String">
+</parameter>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="getTime"
+ return="java.sql.Time"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="columnIndex" type="int">
+</parameter>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="getTime"
+ return="java.sql.Time"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="columnIndex" type="int">
+</parameter>
+<parameter name="cal" type="java.util.Calendar">
+</parameter>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="getTime"
+ return="java.sql.Time"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="columnName" type="java.lang.String">
+</parameter>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="getTime"
+ return="java.sql.Time"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="columnName" type="java.lang.String">
+</parameter>
+<parameter name="cal" type="java.util.Calendar">
+</parameter>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="getTimestamp"
+ return="java.sql.Timestamp"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="columnIndex" type="int">
+</parameter>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="getTimestamp"
+ return="java.sql.Timestamp"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="columnIndex" type="int">
+</parameter>
+<parameter name="cal" type="java.util.Calendar">
+</parameter>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="getTimestamp"
+ return="java.sql.Timestamp"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="columnName" type="java.lang.String">
+</parameter>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="getTimestamp"
+ return="java.sql.Timestamp"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="columnName" type="java.lang.String">
+</parameter>
+<parameter name="cal" type="java.util.Calendar">
+</parameter>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="getType"
+ return="int"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="getURL"
+ return="java.net.URL"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="columnIndex" type="int">
+</parameter>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="getURL"
+ return="java.net.URL"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="columnName" type="java.lang.String">
+</parameter>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="getUnicodeStream"
+ return="java.io.InputStream"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="deprecated"
+ visibility="public"
+>
+<parameter name="columnIndex" type="int">
+</parameter>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="getUnicodeStream"
+ return="java.io.InputStream"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="deprecated"
+ visibility="public"
+>
+<parameter name="columnName" type="java.lang.String">
+</parameter>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="getWarnings"
+ return="java.sql.SQLWarning"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="insertRow"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="isAfterLast"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="isBeforeFirst"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="isFirst"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="isLast"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="last"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="moveToCurrentRow"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="moveToInsertRow"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="next"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="previous"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="refreshRow"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="relative"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="rows" type="int">
+</parameter>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="rowDeleted"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="rowInserted"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="rowUpdated"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="setFetchDirection"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="direction" type="int">
+</parameter>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="setFetchSize"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="rows" type="int">
+</parameter>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="updateArray"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="columnIndex" type="int">
+</parameter>
+<parameter name="x" type="java.sql.Array">
+</parameter>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="updateArray"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="columnName" type="java.lang.String">
+</parameter>
+<parameter name="x" type="java.sql.Array">
+</parameter>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="updateAsciiStream"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="columnIndex" type="int">
+</parameter>
+<parameter name="x" type="java.io.InputStream">
+</parameter>
+<parameter name="length" type="int">
+</parameter>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="updateAsciiStream"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="columnName" type="java.lang.String">
+</parameter>
+<parameter name="x" type="java.io.InputStream">
+</parameter>
+<parameter name="length" type="int">
+</parameter>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="updateBigDecimal"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="columnIndex" type="int">
+</parameter>
+<parameter name="x" type="java.math.BigDecimal">
+</parameter>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="updateBigDecimal"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="columnName" type="java.lang.String">
+</parameter>
+<parameter name="x" type="java.math.BigDecimal">
+</parameter>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="updateBinaryStream"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="columnIndex" type="int">
+</parameter>
+<parameter name="x" type="java.io.InputStream">
+</parameter>
+<parameter name="length" type="int">
+</parameter>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="updateBinaryStream"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="columnName" type="java.lang.String">
+</parameter>
+<parameter name="x" type="java.io.InputStream">
+</parameter>
+<parameter name="length" type="int">
+</parameter>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="updateBlob"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="columnIndex" type="int">
+</parameter>
+<parameter name="x" type="java.sql.Blob">
+</parameter>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="updateBlob"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="columnName" type="java.lang.String">
+</parameter>
+<parameter name="x" type="java.sql.Blob">
+</parameter>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="updateBoolean"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="columnIndex" type="int">
+</parameter>
+<parameter name="x" type="boolean">
+</parameter>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="updateBoolean"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="columnName" type="java.lang.String">
+</parameter>
+<parameter name="x" type="boolean">
+</parameter>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="updateByte"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="columnIndex" type="int">
+</parameter>
+<parameter name="x" type="byte">
+</parameter>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="updateByte"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="columnName" type="java.lang.String">
+</parameter>
+<parameter name="x" type="byte">
+</parameter>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="updateBytes"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="columnIndex" type="int">
+</parameter>
+<parameter name="x" type="byte[]">
+</parameter>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="updateBytes"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="columnName" type="java.lang.String">
+</parameter>
+<parameter name="x" type="byte[]">
+</parameter>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="updateCharacterStream"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="columnIndex" type="int">
+</parameter>
+<parameter name="x" type="java.io.Reader">
+</parameter>
+<parameter name="length" type="int">
+</parameter>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="updateCharacterStream"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="columnName" type="java.lang.String">
+</parameter>
+<parameter name="reader" type="java.io.Reader">
+</parameter>
+<parameter name="length" type="int">
+</parameter>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="updateClob"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="columnIndex" type="int">
+</parameter>
+<parameter name="x" type="java.sql.Clob">
+</parameter>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="updateClob"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="columnName" type="java.lang.String">
+</parameter>
+<parameter name="x" type="java.sql.Clob">
+</parameter>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="updateDate"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="columnIndex" type="int">
+</parameter>
+<parameter name="x" type="java.sql.Date">
+</parameter>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="updateDate"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="columnName" type="java.lang.String">
+</parameter>
+<parameter name="x" type="java.sql.Date">
+</parameter>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="updateDouble"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="columnIndex" type="int">
+</parameter>
+<parameter name="x" type="double">
+</parameter>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="updateDouble"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="columnName" type="java.lang.String">
+</parameter>
+<parameter name="x" type="double">
+</parameter>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="updateFloat"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="columnIndex" type="int">
+</parameter>
+<parameter name="x" type="float">
+</parameter>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="updateFloat"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="columnName" type="java.lang.String">
+</parameter>
+<parameter name="x" type="float">
+</parameter>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="updateInt"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="columnIndex" type="int">
+</parameter>
+<parameter name="x" type="int">
+</parameter>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="updateInt"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="columnName" type="java.lang.String">
+</parameter>
+<parameter name="x" type="int">
+</parameter>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="updateLong"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="columnIndex" type="int">
+</parameter>
+<parameter name="x" type="long">
+</parameter>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="updateLong"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="columnName" type="java.lang.String">
+</parameter>
+<parameter name="x" type="long">
+</parameter>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="updateNull"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="columnIndex" type="int">
+</parameter>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="updateNull"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="columnName" type="java.lang.String">
+</parameter>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="updateObject"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="columnIndex" type="int">
+</parameter>
+<parameter name="x" type="java.lang.Object">
+</parameter>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="updateObject"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="columnIndex" type="int">
+</parameter>
+<parameter name="x" type="java.lang.Object">
+</parameter>
+<parameter name="scale" type="int">
+</parameter>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="updateObject"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="columnName" type="java.lang.String">
+</parameter>
+<parameter name="x" type="java.lang.Object">
+</parameter>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="updateObject"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="columnName" type="java.lang.String">
+</parameter>
+<parameter name="x" type="java.lang.Object">
+</parameter>
+<parameter name="scale" type="int">
+</parameter>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="updateRef"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="columnIndex" type="int">
+</parameter>
+<parameter name="x" type="java.sql.Ref">
+</parameter>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="updateRef"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="columnName" type="java.lang.String">
+</parameter>
+<parameter name="x" type="java.sql.Ref">
+</parameter>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="updateRow"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="updateShort"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="columnIndex" type="int">
+</parameter>
+<parameter name="x" type="short">
+</parameter>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="updateShort"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="columnName" type="java.lang.String">
+</parameter>
+<parameter name="x" type="short">
+</parameter>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="updateString"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="columnIndex" type="int">
+</parameter>
+<parameter name="x" type="java.lang.String">
+</parameter>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="updateString"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="columnName" type="java.lang.String">
+</parameter>
+<parameter name="x" type="java.lang.String">
+</parameter>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="updateTime"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="columnIndex" type="int">
+</parameter>
+<parameter name="x" type="java.sql.Time">
+</parameter>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="updateTime"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="columnName" type="java.lang.String">
+</parameter>
+<parameter name="x" type="java.sql.Time">
+</parameter>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="updateTimestamp"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="columnIndex" type="int">
+</parameter>
+<parameter name="x" type="java.sql.Timestamp">
+</parameter>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="updateTimestamp"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="columnName" type="java.lang.String">
+</parameter>
+<parameter name="x" type="java.sql.Timestamp">
+</parameter>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="wasNull"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<field name="CLOSE_CURSORS_AT_COMMIT"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="CONCUR_READ_ONLY"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1007"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="CONCUR_UPDATABLE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1008"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="FETCH_FORWARD"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1000"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="FETCH_REVERSE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1001"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="FETCH_UNKNOWN"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1002"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="HOLD_CURSORS_OVER_COMMIT"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TYPE_FORWARD_ONLY"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1003"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TYPE_SCROLL_INSENSITIVE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1004"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TYPE_SCROLL_SENSITIVE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1005"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</interface>
+<interface name="ResultSetMetaData"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="getCatalogName"
+ return="java.lang.String"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="column" type="int">
+</parameter>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="getColumnClassName"
+ return="java.lang.String"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="column" type="int">
+</parameter>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="getColumnCount"
+ return="int"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="getColumnDisplaySize"
+ return="int"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="column" type="int">
+</parameter>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="getColumnLabel"
+ return="java.lang.String"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="column" type="int">
+</parameter>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="getColumnName"
+ return="java.lang.String"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="column" type="int">
+</parameter>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="getColumnType"
+ return="int"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="column" type="int">
+</parameter>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="getColumnTypeName"
+ return="java.lang.String"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="column" type="int">
+</parameter>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="getPrecision"
+ return="int"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="column" type="int">
+</parameter>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="getScale"
+ return="int"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="column" type="int">
+</parameter>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="getSchemaName"
+ return="java.lang.String"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="column" type="int">
+</parameter>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="getTableName"
+ return="java.lang.String"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="column" type="int">
+</parameter>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="isAutoIncrement"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="column" type="int">
+</parameter>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="isCaseSensitive"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="column" type="int">
+</parameter>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="isCurrency"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="column" type="int">
+</parameter>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="isDefinitelyWritable"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="column" type="int">
+</parameter>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="isNullable"
+ return="int"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="column" type="int">
+</parameter>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="isReadOnly"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="column" type="int">
+</parameter>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="isSearchable"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="column" type="int">
+</parameter>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="isSigned"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="column" type="int">
+</parameter>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="isWritable"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="column" type="int">
+</parameter>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<field name="columnNoNulls"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="0"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="columnNullable"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="columnNullableUnknown"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</interface>
+<interface name="SQLData"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="getSQLTypeName"
+ return="java.lang.String"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="readSQL"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="stream" type="java.sql.SQLInput">
+</parameter>
+<parameter name="typeName" type="java.lang.String">
+</parameter>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="writeSQL"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="stream" type="java.sql.SQLOutput">
+</parameter>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+</interface>
+<class name="SQLException"
+ extends="java.lang.Exception"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="java.io.Serializable">
+</implements>
+<constructor name="SQLException"
+ type="java.sql.SQLException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<constructor name="SQLException"
+ type="java.sql.SQLException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="theReason" type="java.lang.String">
+</parameter>
+</constructor>
+<constructor name="SQLException"
+ type="java.sql.SQLException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="theReason" type="java.lang.String">
+</parameter>
+<parameter name="theSQLState" type="java.lang.String">
+</parameter>
+</constructor>
+<constructor name="SQLException"
+ type="java.sql.SQLException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="theReason" type="java.lang.String">
+</parameter>
+<parameter name="theSQLState" type="java.lang.String">
+</parameter>
+<parameter name="theErrorCode" type="int">
+</parameter>
+</constructor>
+<method name="getErrorCode"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getNextException"
+ return="java.sql.SQLException"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getSQLState"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="setNextException"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="ex" type="java.sql.SQLException">
+</parameter>
+</method>
+</class>
+<interface name="SQLInput"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="readArray"
+ return="java.sql.Array"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="readAsciiStream"
+ return="java.io.InputStream"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="readBigDecimal"
+ return="java.math.BigDecimal"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="readBinaryStream"
+ return="java.io.InputStream"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="readBlob"
+ return="java.sql.Blob"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="readBoolean"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="readByte"
+ return="byte"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="readBytes"
+ return="byte[]"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="readCharacterStream"
+ return="java.io.Reader"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="readClob"
+ return="java.sql.Clob"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="readDate"
+ return="java.sql.Date"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="readDouble"
+ return="double"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="readFloat"
+ return="float"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="readInt"
+ return="int"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="readLong"
+ return="long"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="readObject"
+ return="java.lang.Object"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="readRef"
+ return="java.sql.Ref"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="readShort"
+ return="short"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="readString"
+ return="java.lang.String"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="readTime"
+ return="java.sql.Time"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="readTimestamp"
+ return="java.sql.Timestamp"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="readURL"
+ return="java.net.URL"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="wasNull"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+</interface>
+<interface name="SQLOutput"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="writeArray"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="theArray" type="java.sql.Array">
+</parameter>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="writeAsciiStream"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="theStream" type="java.io.InputStream">
+</parameter>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="writeBigDecimal"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="theBigDecimal" type="java.math.BigDecimal">
+</parameter>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="writeBinaryStream"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="theStream" type="java.io.InputStream">
+</parameter>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="writeBlob"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="theBlob" type="java.sql.Blob">
+</parameter>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="writeBoolean"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="theFlag" type="boolean">
+</parameter>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="writeByte"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="theByte" type="byte">
+</parameter>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="writeBytes"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="theBytes" type="byte[]">
+</parameter>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="writeCharacterStream"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="theStream" type="java.io.Reader">
+</parameter>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="writeClob"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="theClob" type="java.sql.Clob">
+</parameter>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="writeDate"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="theDate" type="java.sql.Date">
+</parameter>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="writeDouble"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="theDouble" type="double">
+</parameter>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="writeFloat"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="theFloat" type="float">
+</parameter>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="writeInt"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="theInt" type="int">
+</parameter>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="writeLong"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="theLong" type="long">
+</parameter>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="writeObject"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="theObject" type="java.sql.SQLData">
+</parameter>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="writeRef"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="theRef" type="java.sql.Ref">
+</parameter>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="writeShort"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="theShort" type="short">
+</parameter>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="writeString"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="theString" type="java.lang.String">
+</parameter>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="writeStruct"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="theStruct" type="java.sql.Struct">
+</parameter>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="writeTime"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="theTime" type="java.sql.Time">
+</parameter>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="writeTimestamp"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="theTimestamp" type="java.sql.Timestamp">
+</parameter>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="writeURL"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="theURL" type="java.net.URL">
+</parameter>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+</interface>
+<class name="SQLPermission"
+ extends="java.security.BasicPermission"
+ abstract="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="java.security.Guard">
+</implements>
+<implements name="java.io.Serializable">
+</implements>
+<constructor name="SQLPermission"
+ type="java.sql.SQLPermission"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+</constructor>
+<constructor name="SQLPermission"
+ type="java.sql.SQLPermission"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+<parameter name="actions" type="java.lang.String">
+</parameter>
+</constructor>
+</class>
+<class name="SQLWarning"
+ extends="java.sql.SQLException"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="java.io.Serializable">
+</implements>
+<constructor name="SQLWarning"
+ type="java.sql.SQLWarning"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<constructor name="SQLWarning"
+ type="java.sql.SQLWarning"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="theReason" type="java.lang.String">
+</parameter>
+</constructor>
+<constructor name="SQLWarning"
+ type="java.sql.SQLWarning"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="theReason" type="java.lang.String">
+</parameter>
+<parameter name="theSQLState" type="java.lang.String">
+</parameter>
+</constructor>
+<constructor name="SQLWarning"
+ type="java.sql.SQLWarning"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="theReason" type="java.lang.String">
+</parameter>
+<parameter name="theSQLState" type="java.lang.String">
+</parameter>
+<parameter name="theErrorCode" type="int">
+</parameter>
+</constructor>
+<method name="getNextWarning"
+ return="java.sql.SQLWarning"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="setNextWarning"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="w" type="java.sql.SQLWarning">
+</parameter>
+</method>
+</class>
+<interface name="Savepoint"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="getSavepointId"
+ return="int"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="getSavepointName"
+ return="java.lang.String"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+</interface>
+<interface name="Statement"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="addBatch"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="sql" type="java.lang.String">
+</parameter>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="cancel"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="clearBatch"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="clearWarnings"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="close"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="execute"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="sql" type="java.lang.String">
+</parameter>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="execute"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="sql" type="java.lang.String">
+</parameter>
+<parameter name="autoGeneratedKeys" type="int">
+</parameter>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="execute"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="sql" type="java.lang.String">
+</parameter>
+<parameter name="columnIndexes" type="int[]">
+</parameter>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="execute"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="sql" type="java.lang.String">
+</parameter>
+<parameter name="columnNames" type="java.lang.String[]">
+</parameter>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="executeBatch"
+ return="int[]"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="executeQuery"
+ return="java.sql.ResultSet"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="sql" type="java.lang.String">
+</parameter>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="executeUpdate"
+ return="int"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="sql" type="java.lang.String">
+</parameter>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="executeUpdate"
+ return="int"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="sql" type="java.lang.String">
+</parameter>
+<parameter name="autoGeneratedKeys" type="int">
+</parameter>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="executeUpdate"
+ return="int"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="sql" type="java.lang.String">
+</parameter>
+<parameter name="columnIndexes" type="int[]">
+</parameter>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="executeUpdate"
+ return="int"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="sql" type="java.lang.String">
+</parameter>
+<parameter name="columnNames" type="java.lang.String[]">
+</parameter>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="getConnection"
+ return="java.sql.Connection"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="getFetchDirection"
+ return="int"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="getFetchSize"
+ return="int"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="getGeneratedKeys"
+ return="java.sql.ResultSet"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="getMaxFieldSize"
+ return="int"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="getMaxRows"
+ return="int"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="getMoreResults"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="getMoreResults"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="current" type="int">
+</parameter>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="getQueryTimeout"
+ return="int"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="getResultSet"
+ return="java.sql.ResultSet"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="getResultSetConcurrency"
+ return="int"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="getResultSetHoldability"
+ return="int"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="getResultSetType"
+ return="int"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="getUpdateCount"
+ return="int"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="getWarnings"
+ return="java.sql.SQLWarning"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="setCursorName"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="setEscapeProcessing"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="enable" type="boolean">
+</parameter>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="setFetchDirection"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="direction" type="int">
+</parameter>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="setFetchSize"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="rows" type="int">
+</parameter>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="setMaxFieldSize"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="max" type="int">
+</parameter>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="setMaxRows"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="max" type="int">
+</parameter>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="setQueryTimeout"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="seconds" type="int">
+</parameter>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<field name="CLOSE_ALL_RESULTS"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="3"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="CLOSE_CURRENT_RESULT"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="EXECUTE_FAILED"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="-3"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="KEEP_CURRENT_RESULT"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="NO_GENERATED_KEYS"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="RETURN_GENERATED_KEYS"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="SUCCESS_NO_INFO"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="-2"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</interface>
+<interface name="Struct"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="getAttributes"
+ return="java.lang.Object[]"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="getAttributes"
+ return="java.lang.Object[]"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="theMap" type="java.util.Map&lt;java.lang.String, java.lang.Class&lt;?&gt;&gt;">
+</parameter>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="getSQLTypeName"
+ return="java.lang.String"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+</interface>
+<class name="Time"
+ extends="java.util.Date"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="Time"
+ type="java.sql.Time"
+ static="false"
+ final="false"
+ deprecated="deprecated"
+ visibility="public"
+>
+<parameter name="theHour" type="int">
+</parameter>
+<parameter name="theMinute" type="int">
+</parameter>
+<parameter name="theSecond" type="int">
+</parameter>
+</constructor>
+<constructor name="Time"
+ type="java.sql.Time"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="theTime" type="long">
+</parameter>
+</constructor>
+<method name="valueOf"
+ return="java.sql.Time"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="timeString" type="java.lang.String">
+</parameter>
+</method>
+</class>
+<class name="Timestamp"
+ extends="java.util.Date"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="Timestamp"
+ type="java.sql.Timestamp"
+ static="false"
+ final="false"
+ deprecated="deprecated"
+ visibility="public"
+>
+<parameter name="theYear" type="int">
+</parameter>
+<parameter name="theMonth" type="int">
+</parameter>
+<parameter name="theDate" type="int">
+</parameter>
+<parameter name="theHour" type="int">
+</parameter>
+<parameter name="theMinute" type="int">
+</parameter>
+<parameter name="theSecond" type="int">
+</parameter>
+<parameter name="theNano" type="int">
+</parameter>
+<exception name="IllegalArgumentException" type="java.lang.IllegalArgumentException">
+</exception>
+</constructor>
+<constructor name="Timestamp"
+ type="java.sql.Timestamp"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="theTime" type="long">
+</parameter>
+</constructor>
+<method name="after"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="theTimestamp" type="java.sql.Timestamp">
+</parameter>
+</method>
+<method name="before"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="theTimestamp" type="java.sql.Timestamp">
+</parameter>
+</method>
+<method name="compareTo"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="theTimestamp" type="java.sql.Timestamp">
+</parameter>
+</method>
+<method name="equals"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="theTimestamp" type="java.sql.Timestamp">
+</parameter>
+</method>
+<method name="getNanos"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="setNanos"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="n" type="int">
+</parameter>
+<exception name="IllegalArgumentException" type="java.lang.IllegalArgumentException">
+</exception>
+</method>
+<method name="valueOf"
+ return="java.sql.Timestamp"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="s" type="java.lang.String">
+</parameter>
+<exception name="IllegalArgumentException" type="java.lang.IllegalArgumentException">
+</exception>
+</method>
+</class>
+<class name="Types"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<field name="ARRAY"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2003"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="BIGINT"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="-5"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="BINARY"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="-2"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="BIT"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="-7"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="BLOB"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2004"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="BOOLEAN"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="CHAR"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="CLOB"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2005"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="DATALINK"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="70"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="DATE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="91"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="DECIMAL"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="3"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="DISTINCT"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2001"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="DOUBLE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="8"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="FLOAT"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="6"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="INTEGER"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="4"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="JAVA_OBJECT"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2000"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="LONGVARBINARY"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="-4"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="LONGVARCHAR"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="-1"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="NULL"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="0"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="NUMERIC"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="OTHER"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1111"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="REAL"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="7"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="REF"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2006"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="SMALLINT"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="5"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="STRUCT"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2002"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TIME"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="92"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TIMESTAMP"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="93"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TINYINT"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="-6"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="VARBINARY"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="-3"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="VARCHAR"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="12"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+</package>
+<package name="java.text"
+>
+<class name="Annotation"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="Annotation"
+ type="java.text.Annotation"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="attribute" type="java.lang.Object">
+</parameter>
+</constructor>
+<method name="getValue"
+ return="java.lang.Object"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+</class>
+<interface name="AttributedCharacterIterator"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="java.text.CharacterIterator">
+</implements>
+<method name="getAllAttributeKeys"
+ return="java.util.Set&lt;java.text.AttributedCharacterIterator.Attribute&gt;"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getAttribute"
+ return="java.lang.Object"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="attribute" type="java.text.AttributedCharacterIterator.Attribute">
+</parameter>
+</method>
+<method name="getAttributes"
+ return="java.util.Map&lt;java.text.AttributedCharacterIterator.Attribute, java.lang.Object&gt;"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getRunLimit"
+ return="int"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getRunLimit"
+ return="int"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="attribute" type="java.text.AttributedCharacterIterator.Attribute">
+</parameter>
+</method>
+<method name="getRunLimit"
+ return="int"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="attributes" type="java.util.Set&lt;? extends java.text.AttributedCharacterIterator.Attribute&gt;">
+</parameter>
+</method>
+<method name="getRunStart"
+ return="int"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getRunStart"
+ return="int"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="attribute" type="java.text.AttributedCharacterIterator.Attribute">
+</parameter>
+</method>
+<method name="getRunStart"
+ return="int"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="attributes" type="java.util.Set&lt;? extends java.text.AttributedCharacterIterator.Attribute&gt;">
+</parameter>
+</method>
+</interface>
+<class name="AttributedCharacterIterator.Attribute"
+ extends="java.lang.Object"
+ abstract="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="java.io.Serializable">
+</implements>
+<constructor name="AttributedCharacterIterator.Attribute"
+ type="java.text.AttributedCharacterIterator.Attribute"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+</constructor>
+<method name="equals"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="object" type="java.lang.Object">
+</parameter>
+</method>
+<method name="getName"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</method>
+<method name="hashCode"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="readResolve"
+ return="java.lang.Object"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<exception name="InvalidObjectException" type="java.io.InvalidObjectException">
+</exception>
+</method>
+<field name="INPUT_METHOD_SEGMENT"
+ type="java.text.AttributedCharacterIterator.Attribute"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="LANGUAGE"
+ type="java.text.AttributedCharacterIterator.Attribute"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="READING"
+ type="java.text.AttributedCharacterIterator.Attribute"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<class name="AttributedString"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="AttributedString"
+ type="java.text.AttributedString"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="iterator" type="java.text.AttributedCharacterIterator">
+</parameter>
+</constructor>
+<constructor name="AttributedString"
+ type="java.text.AttributedString"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="iterator" type="java.text.AttributedCharacterIterator">
+</parameter>
+<parameter name="start" type="int">
+</parameter>
+<parameter name="end" type="int">
+</parameter>
+</constructor>
+<constructor name="AttributedString"
+ type="java.text.AttributedString"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="iterator" type="java.text.AttributedCharacterIterator">
+</parameter>
+<parameter name="start" type="int">
+</parameter>
+<parameter name="end" type="int">
+</parameter>
+<parameter name="attributes" type="java.text.AttributedCharacterIterator.Attribute[]">
+</parameter>
+</constructor>
+<constructor name="AttributedString"
+ type="java.text.AttributedString"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="value" type="java.lang.String">
+</parameter>
+</constructor>
+<constructor name="AttributedString"
+ type="java.text.AttributedString"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="value" type="java.lang.String">
+</parameter>
+<parameter name="attributes" type="java.util.Map&lt;? extends java.text.AttributedCharacterIterator.Attribute, ?&gt;">
+</parameter>
+</constructor>
+<method name="addAttribute"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="attribute" type="java.text.AttributedCharacterIterator.Attribute">
+</parameter>
+<parameter name="value" type="java.lang.Object">
+</parameter>
+</method>
+<method name="addAttribute"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="attribute" type="java.text.AttributedCharacterIterator.Attribute">
+</parameter>
+<parameter name="value" type="java.lang.Object">
+</parameter>
+<parameter name="start" type="int">
+</parameter>
+<parameter name="end" type="int">
+</parameter>
+</method>
+<method name="addAttributes"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="attributes" type="java.util.Map&lt;? extends java.text.AttributedCharacterIterator.Attribute, ?&gt;">
+</parameter>
+<parameter name="start" type="int">
+</parameter>
+<parameter name="end" type="int">
+</parameter>
+</method>
+<method name="getIterator"
+ return="java.text.AttributedCharacterIterator"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getIterator"
+ return="java.text.AttributedCharacterIterator"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="attributes" type="java.text.AttributedCharacterIterator.Attribute[]">
+</parameter>
+</method>
+<method name="getIterator"
+ return="java.text.AttributedCharacterIterator"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="attributes" type="java.text.AttributedCharacterIterator.Attribute[]">
+</parameter>
+<parameter name="start" type="int">
+</parameter>
+<parameter name="end" type="int">
+</parameter>
+</method>
+</class>
+<class name="Bidi"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="Bidi"
+ type="java.text.Bidi"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="paragraph" type="java.text.AttributedCharacterIterator">
+</parameter>
+</constructor>
+<constructor name="Bidi"
+ type="java.text.Bidi"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="text" type="char[]">
+</parameter>
+<parameter name="textStart" type="int">
+</parameter>
+<parameter name="embeddings" type="byte[]">
+</parameter>
+<parameter name="embStart" type="int">
+</parameter>
+<parameter name="paragraphLength" type="int">
+</parameter>
+<parameter name="flags" type="int">
+</parameter>
+</constructor>
+<constructor name="Bidi"
+ type="java.text.Bidi"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="paragraph" type="java.lang.String">
+</parameter>
+<parameter name="flags" type="int">
+</parameter>
+</constructor>
+<method name="baseIsLeftToRight"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="createLineBidi"
+ return="java.text.Bidi"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="lineStart" type="int">
+</parameter>
+<parameter name="lineLimit" type="int">
+</parameter>
+</method>
+<method name="getBaseLevel"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getLength"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getLevelAt"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="offset" type="int">
+</parameter>
+</method>
+<method name="getRunCount"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getRunLevel"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="run" type="int">
+</parameter>
+</method>
+<method name="getRunLimit"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="run" type="int">
+</parameter>
+</method>
+<method name="getRunStart"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="run" type="int">
+</parameter>
+</method>
+<method name="isLeftToRight"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isMixed"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isRightToLeft"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="reorderVisually"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="levels" type="byte[]">
+</parameter>
+<parameter name="levelStart" type="int">
+</parameter>
+<parameter name="objects" type="java.lang.Object[]">
+</parameter>
+<parameter name="objectStart" type="int">
+</parameter>
+<parameter name="count" type="int">
+</parameter>
+</method>
+<method name="requiresBidi"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="text" type="char[]">
+</parameter>
+<parameter name="start" type="int">
+</parameter>
+<parameter name="limit" type="int">
+</parameter>
+</method>
+<field name="DIRECTION_DEFAULT_LEFT_TO_RIGHT"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="-2"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="DIRECTION_DEFAULT_RIGHT_TO_LEFT"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="-1"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="DIRECTION_LEFT_TO_RIGHT"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="0"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="DIRECTION_RIGHT_TO_LEFT"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<class name="BreakIterator"
+ extends="java.lang.Object"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="java.lang.Cloneable">
+</implements>
+<constructor name="BreakIterator"
+ type="java.text.BreakIterator"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</constructor>
+<method name="clone"
+ return="java.lang.Object"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="current"
+ return="int"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="first"
+ return="int"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="following"
+ return="int"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="offset" type="int">
+</parameter>
+</method>
+<method name="getAvailableLocales"
+ return="java.util.Locale[]"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getCharacterInstance"
+ return="java.text.BreakIterator"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getCharacterInstance"
+ return="java.text.BreakIterator"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="where" type="java.util.Locale">
+</parameter>
+</method>
+<method name="getInt"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="buf" type="byte[]">
+</parameter>
+<parameter name="offset" type="int">
+</parameter>
+</method>
+<method name="getLineInstance"
+ return="java.text.BreakIterator"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getLineInstance"
+ return="java.text.BreakIterator"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="where" type="java.util.Locale">
+</parameter>
+</method>
+<method name="getLong"
+ return="long"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="buf" type="byte[]">
+</parameter>
+<parameter name="offset" type="int">
+</parameter>
+</method>
+<method name="getSentenceInstance"
+ return="java.text.BreakIterator"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getSentenceInstance"
+ return="java.text.BreakIterator"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="where" type="java.util.Locale">
+</parameter>
+</method>
+<method name="getShort"
+ return="short"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="buf" type="byte[]">
+</parameter>
+<parameter name="offset" type="int">
+</parameter>
+</method>
+<method name="getText"
+ return="java.text.CharacterIterator"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getWordInstance"
+ return="java.text.BreakIterator"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getWordInstance"
+ return="java.text.BreakIterator"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="where" type="java.util.Locale">
+</parameter>
+</method>
+<method name="isBoundary"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="offset" type="int">
+</parameter>
+</method>
+<method name="last"
+ return="int"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="next"
+ return="int"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="next"
+ return="int"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="n" type="int">
+</parameter>
+</method>
+<method name="preceding"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="offset" type="int">
+</parameter>
+</method>
+<method name="previous"
+ return="int"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="setText"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="newText" type="java.lang.String">
+</parameter>
+</method>
+<method name="setText"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="newText" type="java.text.CharacterIterator">
+</parameter>
+</method>
+<field name="DONE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="-1"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<interface name="CharacterIterator"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="java.lang.Cloneable">
+</implements>
+<method name="clone"
+ return="java.lang.Object"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="current"
+ return="char"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="first"
+ return="char"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getBeginIndex"
+ return="int"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getEndIndex"
+ return="int"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getIndex"
+ return="int"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="last"
+ return="char"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="next"
+ return="char"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="previous"
+ return="char"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="setIndex"
+ return="char"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="location" type="int">
+</parameter>
+</method>
+<field name="DONE"
+ type="char"
+ transient="false"
+ volatile="false"
+ value="65535"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</interface>
+<class name="ChoiceFormat"
+ extends="java.text.NumberFormat"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="ChoiceFormat"
+ type="java.text.ChoiceFormat"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="limits" type="double[]">
+</parameter>
+<parameter name="formats" type="java.lang.String[]">
+</parameter>
+</constructor>
+<constructor name="ChoiceFormat"
+ type="java.text.ChoiceFormat"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="template" type="java.lang.String">
+</parameter>
+</constructor>
+<method name="applyPattern"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="template" type="java.lang.String">
+</parameter>
+</method>
+<method name="format"
+ return="java.lang.StringBuffer"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="value" type="double">
+</parameter>
+<parameter name="buffer" type="java.lang.StringBuffer">
+</parameter>
+<parameter name="field" type="java.text.FieldPosition">
+</parameter>
+</method>
+<method name="format"
+ return="java.lang.StringBuffer"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="value" type="long">
+</parameter>
+<parameter name="buffer" type="java.lang.StringBuffer">
+</parameter>
+<parameter name="field" type="java.text.FieldPosition">
+</parameter>
+</method>
+<method name="getFormats"
+ return="java.lang.Object[]"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getLimits"
+ return="double[]"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="nextDouble"
+ return="double"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="value" type="double">
+</parameter>
+</method>
+<method name="nextDouble"
+ return="double"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="value" type="double">
+</parameter>
+<parameter name="increment" type="boolean">
+</parameter>
+</method>
+<method name="parse"
+ return="java.lang.Number"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="string" type="java.lang.String">
+</parameter>
+<parameter name="position" type="java.text.ParsePosition">
+</parameter>
+</method>
+<method name="previousDouble"
+ return="double"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="value" type="double">
+</parameter>
+</method>
+<method name="setChoices"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="limits" type="double[]">
+</parameter>
+<parameter name="formats" type="java.lang.String[]">
+</parameter>
+</method>
+<method name="toPattern"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+</class>
+<class name="CollationElementIterator"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="getMaxExpansion"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="order" type="int">
+</parameter>
+</method>
+<method name="getOffset"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="next"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="previous"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="primaryOrder"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="order" type="int">
+</parameter>
+</method>
+<method name="reset"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="secondaryOrder"
+ return="short"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="order" type="int">
+</parameter>
+</method>
+<method name="setOffset"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="newOffset" type="int">
+</parameter>
+</method>
+<method name="setText"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="source" type="java.text.CharacterIterator">
+</parameter>
+</method>
+<method name="setText"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="source" type="java.lang.String">
+</parameter>
+</method>
+<method name="tertiaryOrder"
+ return="short"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="order" type="int">
+</parameter>
+</method>
+<field name="NULLORDER"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="-1"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<class name="CollationKey"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="java.lang.Comparable">
+</implements>
+<method name="compareTo"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="value" type="java.text.CollationKey">
+</parameter>
+</method>
+<method name="getSourceString"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="toByteArray"
+ return="byte[]"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+</class>
+<class name="Collator"
+ extends="java.lang.Object"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="java.lang.Cloneable">
+</implements>
+<implements name="java.util.Comparator">
+</implements>
+<constructor name="Collator"
+ type="java.text.Collator"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</constructor>
+<method name="clone"
+ return="java.lang.Object"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="compare"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="object1" type="java.lang.Object">
+</parameter>
+<parameter name="object2" type="java.lang.Object">
+</parameter>
+</method>
+<method name="compare"
+ return="int"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="string1" type="java.lang.String">
+</parameter>
+<parameter name="string2" type="java.lang.String">
+</parameter>
+</method>
+<method name="equals"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="string1" type="java.lang.String">
+</parameter>
+<parameter name="string2" type="java.lang.String">
+</parameter>
+</method>
+<method name="getAvailableLocales"
+ return="java.util.Locale[]"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getCollationKey"
+ return="java.text.CollationKey"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="string" type="java.lang.String">
+</parameter>
+</method>
+<method name="getDecomposition"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getInstance"
+ return="java.text.Collator"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getInstance"
+ return="java.text.Collator"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="locale" type="java.util.Locale">
+</parameter>
+</method>
+<method name="getStrength"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="hashCode"
+ return="int"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="setDecomposition"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="value" type="int">
+</parameter>
+</method>
+<method name="setStrength"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="value" type="int">
+</parameter>
+</method>
+<field name="CANONICAL_DECOMPOSITION"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="FULL_DECOMPOSITION"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="IDENTICAL"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="3"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="NO_DECOMPOSITION"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="0"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="PRIMARY"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="0"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="SECONDARY"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TERTIARY"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<class name="DateFormat"
+ extends="java.text.Format"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="DateFormat"
+ type="java.text.DateFormat"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</constructor>
+<method name="format"
+ return="java.lang.StringBuffer"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="object" type="java.lang.Object">
+</parameter>
+<parameter name="buffer" type="java.lang.StringBuffer">
+</parameter>
+<parameter name="field" type="java.text.FieldPosition">
+</parameter>
+</method>
+<method name="format"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="date" type="java.util.Date">
+</parameter>
+</method>
+<method name="format"
+ return="java.lang.StringBuffer"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="date" type="java.util.Date">
+</parameter>
+<parameter name="buffer" type="java.lang.StringBuffer">
+</parameter>
+<parameter name="field" type="java.text.FieldPosition">
+</parameter>
+</method>
+<method name="getAvailableLocales"
+ return="java.util.Locale[]"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getCalendar"
+ return="java.util.Calendar"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getDateInstance"
+ return="java.text.DateFormat"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getDateInstance"
+ return="java.text.DateFormat"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="style" type="int">
+</parameter>
+</method>
+<method name="getDateInstance"
+ return="java.text.DateFormat"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="style" type="int">
+</parameter>
+<parameter name="locale" type="java.util.Locale">
+</parameter>
+</method>
+<method name="getDateTimeInstance"
+ return="java.text.DateFormat"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getDateTimeInstance"
+ return="java.text.DateFormat"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="dateStyle" type="int">
+</parameter>
+<parameter name="timeStyle" type="int">
+</parameter>
+</method>
+<method name="getDateTimeInstance"
+ return="java.text.DateFormat"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="dateStyle" type="int">
+</parameter>
+<parameter name="timeStyle" type="int">
+</parameter>
+<parameter name="locale" type="java.util.Locale">
+</parameter>
+</method>
+<method name="getInstance"
+ return="java.text.DateFormat"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getNumberFormat"
+ return="java.text.NumberFormat"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getTimeInstance"
+ return="java.text.DateFormat"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getTimeInstance"
+ return="java.text.DateFormat"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="style" type="int">
+</parameter>
+</method>
+<method name="getTimeInstance"
+ return="java.text.DateFormat"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="style" type="int">
+</parameter>
+<parameter name="locale" type="java.util.Locale">
+</parameter>
+</method>
+<method name="getTimeZone"
+ return="java.util.TimeZone"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isLenient"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="parse"
+ return="java.util.Date"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="string" type="java.lang.String">
+</parameter>
+<exception name="ParseException" type="java.text.ParseException">
+</exception>
+</method>
+<method name="parse"
+ return="java.util.Date"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="string" type="java.lang.String">
+</parameter>
+<parameter name="position" type="java.text.ParsePosition">
+</parameter>
+</method>
+<method name="parseObject"
+ return="java.lang.Object"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="string" type="java.lang.String">
+</parameter>
+<parameter name="position" type="java.text.ParsePosition">
+</parameter>
+</method>
+<method name="setCalendar"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="cal" type="java.util.Calendar">
+</parameter>
+</method>
+<method name="setLenient"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="value" type="boolean">
+</parameter>
+</method>
+<method name="setNumberFormat"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="format" type="java.text.NumberFormat">
+</parameter>
+</method>
+<method name="setTimeZone"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="timezone" type="java.util.TimeZone">
+</parameter>
+</method>
+<field name="AM_PM_FIELD"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="14"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="DATE_FIELD"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="3"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="DAY_OF_WEEK_FIELD"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="9"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="DAY_OF_WEEK_IN_MONTH_FIELD"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="11"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="DAY_OF_YEAR_FIELD"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="10"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="DEFAULT"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ERA_FIELD"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="0"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="FULL"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="0"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="HOUR0_FIELD"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="HOUR1_FIELD"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="15"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="HOUR_OF_DAY0_FIELD"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="5"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="HOUR_OF_DAY1_FIELD"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="4"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="LONG"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="MEDIUM"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="MILLISECOND_FIELD"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="8"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="MINUTE_FIELD"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="6"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="MONTH_FIELD"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="SECOND_FIELD"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="7"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="SHORT"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="3"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TIMEZONE_FIELD"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="17"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="WEEK_OF_MONTH_FIELD"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="13"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="WEEK_OF_YEAR_FIELD"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="12"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="YEAR_FIELD"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="calendar"
+ type="java.util.Calendar"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</field>
+<field name="numberFormat"
+ type="java.text.NumberFormat"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</field>
+</class>
+<class name="DateFormat.Field"
+ extends="java.text.Format.Field"
+ abstract="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="DateFormat.Field"
+ type="java.text.DateFormat.Field"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="fieldName" type="java.lang.String">
+</parameter>
+<parameter name="calendarField" type="int">
+</parameter>
+</constructor>
+<method name="getCalendarField"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="ofCalendarField"
+ return="java.text.DateFormat.Field"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="calendarField" type="int">
+</parameter>
+</method>
+<field name="AM_PM"
+ type="java.text.DateFormat.Field"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="DAY_OF_MONTH"
+ type="java.text.DateFormat.Field"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="DAY_OF_WEEK"
+ type="java.text.DateFormat.Field"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="DAY_OF_WEEK_IN_MONTH"
+ type="java.text.DateFormat.Field"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="DAY_OF_YEAR"
+ type="java.text.DateFormat.Field"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ERA"
+ type="java.text.DateFormat.Field"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="HOUR0"
+ type="java.text.DateFormat.Field"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="HOUR1"
+ type="java.text.DateFormat.Field"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="HOUR_OF_DAY0"
+ type="java.text.DateFormat.Field"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="HOUR_OF_DAY1"
+ type="java.text.DateFormat.Field"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="MILLISECOND"
+ type="java.text.DateFormat.Field"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="MINUTE"
+ type="java.text.DateFormat.Field"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="MONTH"
+ type="java.text.DateFormat.Field"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="SECOND"
+ type="java.text.DateFormat.Field"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TIME_ZONE"
+ type="java.text.DateFormat.Field"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="WEEK_OF_MONTH"
+ type="java.text.DateFormat.Field"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="WEEK_OF_YEAR"
+ type="java.text.DateFormat.Field"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="YEAR"
+ type="java.text.DateFormat.Field"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<class name="DateFormatSymbols"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="java.lang.Cloneable">
+</implements>
+<implements name="java.io.Serializable">
+</implements>
+<constructor name="DateFormatSymbols"
+ type="java.text.DateFormatSymbols"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<constructor name="DateFormatSymbols"
+ type="java.text.DateFormatSymbols"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="locale" type="java.util.Locale">
+</parameter>
+</constructor>
+<method name="clone"
+ return="java.lang.Object"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getAmPmStrings"
+ return="java.lang.String[]"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getEras"
+ return="java.lang.String[]"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getLocalPatternChars"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getMonths"
+ return="java.lang.String[]"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getShortMonths"
+ return="java.lang.String[]"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getShortWeekdays"
+ return="java.lang.String[]"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getWeekdays"
+ return="java.lang.String[]"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getZoneStrings"
+ return="java.lang.String[][]"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="setAmPmStrings"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="data" type="java.lang.String[]">
+</parameter>
+</method>
+<method name="setEras"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="data" type="java.lang.String[]">
+</parameter>
+</method>
+<method name="setLocalPatternChars"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="data" type="java.lang.String">
+</parameter>
+</method>
+<method name="setMonths"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="data" type="java.lang.String[]">
+</parameter>
+</method>
+<method name="setShortMonths"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="data" type="java.lang.String[]">
+</parameter>
+</method>
+<method name="setShortWeekdays"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="data" type="java.lang.String[]">
+</parameter>
+</method>
+<method name="setWeekdays"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="data" type="java.lang.String[]">
+</parameter>
+</method>
+<method name="setZoneStrings"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="data" type="java.lang.String[][]">
+</parameter>
+</method>
+</class>
+<class name="DecimalFormat"
+ extends="java.text.NumberFormat"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="DecimalFormat"
+ type="java.text.DecimalFormat"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<constructor name="DecimalFormat"
+ type="java.text.DecimalFormat"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="pattern" type="java.lang.String">
+</parameter>
+</constructor>
+<constructor name="DecimalFormat"
+ type="java.text.DecimalFormat"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="pattern" type="java.lang.String">
+</parameter>
+<parameter name="value" type="java.text.DecimalFormatSymbols">
+</parameter>
+</constructor>
+<method name="applyLocalizedPattern"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="pattern" type="java.lang.String">
+</parameter>
+</method>
+<method name="applyPattern"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="pattern" type="java.lang.String">
+</parameter>
+</method>
+<method name="format"
+ return="java.lang.StringBuffer"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="value" type="double">
+</parameter>
+<parameter name="buffer" type="java.lang.StringBuffer">
+</parameter>
+<parameter name="position" type="java.text.FieldPosition">
+</parameter>
+</method>
+<method name="format"
+ return="java.lang.StringBuffer"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="value" type="long">
+</parameter>
+<parameter name="buffer" type="java.lang.StringBuffer">
+</parameter>
+<parameter name="position" type="java.text.FieldPosition">
+</parameter>
+</method>
+<method name="format"
+ return="java.lang.StringBuffer"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="number" type="java.lang.Object">
+</parameter>
+<parameter name="toAppendTo" type="java.lang.StringBuffer">
+</parameter>
+<parameter name="pos" type="java.text.FieldPosition">
+</parameter>
+</method>
+<method name="getDecimalFormatSymbols"
+ return="java.text.DecimalFormatSymbols"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getGroupingSize"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getMultiplier"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getNegativePrefix"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getNegativeSuffix"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getPositivePrefix"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getPositiveSuffix"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isDecimalSeparatorAlwaysShown"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isParseBigDecimal"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="parse"
+ return="java.lang.Number"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="string" type="java.lang.String">
+</parameter>
+<parameter name="position" type="java.text.ParsePosition">
+</parameter>
+</method>
+<method name="setDecimalFormatSymbols"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="value" type="java.text.DecimalFormatSymbols">
+</parameter>
+</method>
+<method name="setDecimalSeparatorAlwaysShown"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="value" type="boolean">
+</parameter>
+</method>
+<method name="setGroupingSize"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="value" type="int">
+</parameter>
+</method>
+<method name="setMultiplier"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="value" type="int">
+</parameter>
+</method>
+<method name="setNegativePrefix"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="value" type="java.lang.String">
+</parameter>
+</method>
+<method name="setNegativeSuffix"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="value" type="java.lang.String">
+</parameter>
+</method>
+<method name="setParseBigDecimal"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="newValue" type="boolean">
+</parameter>
+</method>
+<method name="setPositivePrefix"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="value" type="java.lang.String">
+</parameter>
+</method>
+<method name="setPositiveSuffix"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="value" type="java.lang.String">
+</parameter>
+</method>
+<method name="toLocalizedPattern"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="toPattern"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+</class>
+<class name="DecimalFormatSymbols"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="java.lang.Cloneable">
+</implements>
+<implements name="java.io.Serializable">
+</implements>
+<constructor name="DecimalFormatSymbols"
+ type="java.text.DecimalFormatSymbols"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<constructor name="DecimalFormatSymbols"
+ type="java.text.DecimalFormatSymbols"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="locale" type="java.util.Locale">
+</parameter>
+</constructor>
+<method name="clone"
+ return="java.lang.Object"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getCurrency"
+ return="java.util.Currency"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getCurrencySymbol"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getDecimalSeparator"
+ return="char"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getDigit"
+ return="char"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getGroupingSeparator"
+ return="char"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getInfinity"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getInternationalCurrencySymbol"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getMinusSign"
+ return="char"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getMonetaryDecimalSeparator"
+ return="char"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getNaN"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getPatternSeparator"
+ return="char"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getPerMill"
+ return="char"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getPercent"
+ return="char"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getZeroDigit"
+ return="char"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="setCurrency"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="currency" type="java.util.Currency">
+</parameter>
+</method>
+<method name="setCurrencySymbol"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="value" type="java.lang.String">
+</parameter>
+</method>
+<method name="setDecimalSeparator"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="value" type="char">
+</parameter>
+</method>
+<method name="setDigit"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="value" type="char">
+</parameter>
+</method>
+<method name="setGroupingSeparator"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="value" type="char">
+</parameter>
+</method>
+<method name="setInfinity"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="value" type="java.lang.String">
+</parameter>
+</method>
+<method name="setInternationalCurrencySymbol"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="value" type="java.lang.String">
+</parameter>
+</method>
+<method name="setMinusSign"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="value" type="char">
+</parameter>
+</method>
+<method name="setMonetaryDecimalSeparator"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="value" type="char">
+</parameter>
+</method>
+<method name="setNaN"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="value" type="java.lang.String">
+</parameter>
+</method>
+<method name="setPatternSeparator"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="value" type="char">
+</parameter>
+</method>
+<method name="setPerMill"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="value" type="char">
+</parameter>
+</method>
+<method name="setPercent"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="value" type="char">
+</parameter>
+</method>
+<method name="setZeroDigit"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="value" type="char">
+</parameter>
+</method>
+</class>
+<class name="FieldPosition"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="FieldPosition"
+ type="java.text.FieldPosition"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="field" type="int">
+</parameter>
+</constructor>
+<constructor name="FieldPosition"
+ type="java.text.FieldPosition"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="attribute" type="java.text.Format.Field">
+</parameter>
+</constructor>
+<constructor name="FieldPosition"
+ type="java.text.FieldPosition"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="attribute" type="java.text.Format.Field">
+</parameter>
+<parameter name="field" type="int">
+</parameter>
+</constructor>
+<method name="getBeginIndex"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getEndIndex"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getField"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getFieldAttribute"
+ return="java.text.Format.Field"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="setBeginIndex"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="index" type="int">
+</parameter>
+</method>
+<method name="setEndIndex"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="index" type="int">
+</parameter>
+</method>
+</class>
+<class name="Format"
+ extends="java.lang.Object"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="java.lang.Cloneable">
+</implements>
+<implements name="java.io.Serializable">
+</implements>
+<constructor name="Format"
+ type="java.text.Format"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<method name="clone"
+ return="java.lang.Object"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="format"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="object" type="java.lang.Object">
+</parameter>
+</method>
+<method name="format"
+ return="java.lang.StringBuffer"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="object" type="java.lang.Object">
+</parameter>
+<parameter name="buffer" type="java.lang.StringBuffer">
+</parameter>
+<parameter name="field" type="java.text.FieldPosition">
+</parameter>
+</method>
+<method name="formatToCharacterIterator"
+ return="java.text.AttributedCharacterIterator"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="object" type="java.lang.Object">
+</parameter>
+</method>
+<method name="parseObject"
+ return="java.lang.Object"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="string" type="java.lang.String">
+</parameter>
+<exception name="ParseException" type="java.text.ParseException">
+</exception>
+</method>
+<method name="parseObject"
+ return="java.lang.Object"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="string" type="java.lang.String">
+</parameter>
+<parameter name="position" type="java.text.ParsePosition">
+</parameter>
+</method>
+</class>
+<class name="Format.Field"
+ extends="java.text.AttributedCharacterIterator.Attribute"
+ abstract="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="Format.Field"
+ type="java.text.Format.Field"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="fieldName" type="java.lang.String">
+</parameter>
+</constructor>
+</class>
+<class name="MessageFormat"
+ extends="java.text.Format"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="MessageFormat"
+ type="java.text.MessageFormat"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="template" type="java.lang.String">
+</parameter>
+<parameter name="locale" type="java.util.Locale">
+</parameter>
+</constructor>
+<constructor name="MessageFormat"
+ type="java.text.MessageFormat"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="template" type="java.lang.String">
+</parameter>
+</constructor>
+<method name="applyPattern"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="template" type="java.lang.String">
+</parameter>
+</method>
+<method name="format"
+ return="java.lang.StringBuffer"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="objects" type="java.lang.Object[]">
+</parameter>
+<parameter name="buffer" type="java.lang.StringBuffer">
+</parameter>
+<parameter name="field" type="java.text.FieldPosition">
+</parameter>
+</method>
+<method name="format"
+ return="java.lang.StringBuffer"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="object" type="java.lang.Object">
+</parameter>
+<parameter name="buffer" type="java.lang.StringBuffer">
+</parameter>
+<parameter name="field" type="java.text.FieldPosition">
+</parameter>
+</method>
+<method name="format"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="template" type="java.lang.String">
+</parameter>
+<parameter name="objects" type="java.lang.Object...">
+</parameter>
+</method>
+<method name="getFormats"
+ return="java.text.Format[]"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getFormatsByArgumentIndex"
+ return="java.text.Format[]"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getLocale"
+ return="java.util.Locale"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="parse"
+ return="java.lang.Object[]"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="string" type="java.lang.String">
+</parameter>
+<exception name="ParseException" type="java.text.ParseException">
+</exception>
+</method>
+<method name="parse"
+ return="java.lang.Object[]"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="string" type="java.lang.String">
+</parameter>
+<parameter name="position" type="java.text.ParsePosition">
+</parameter>
+</method>
+<method name="parseObject"
+ return="java.lang.Object"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="string" type="java.lang.String">
+</parameter>
+<parameter name="position" type="java.text.ParsePosition">
+</parameter>
+</method>
+<method name="setFormat"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="offset" type="int">
+</parameter>
+<parameter name="format" type="java.text.Format">
+</parameter>
+</method>
+<method name="setFormatByArgumentIndex"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="argIndex" type="int">
+</parameter>
+<parameter name="format" type="java.text.Format">
+</parameter>
+</method>
+<method name="setFormats"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="formats" type="java.text.Format[]">
+</parameter>
+</method>
+<method name="setFormatsByArgumentIndex"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="formats" type="java.text.Format[]">
+</parameter>
+</method>
+<method name="setLocale"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="locale" type="java.util.Locale">
+</parameter>
+</method>
+<method name="toPattern"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+</class>
+<class name="MessageFormat.Field"
+ extends="java.text.Format.Field"
+ abstract="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="MessageFormat.Field"
+ type="java.text.MessageFormat.Field"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="fieldName" type="java.lang.String">
+</parameter>
+</constructor>
+<field name="ARGUMENT"
+ type="java.text.MessageFormat.Field"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<class name="NumberFormat"
+ extends="java.text.Format"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="NumberFormat"
+ type="java.text.NumberFormat"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<method name="format"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="value" type="double">
+</parameter>
+</method>
+<method name="format"
+ return="java.lang.StringBuffer"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="value" type="double">
+</parameter>
+<parameter name="buffer" type="java.lang.StringBuffer">
+</parameter>
+<parameter name="field" type="java.text.FieldPosition">
+</parameter>
+</method>
+<method name="format"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="value" type="long">
+</parameter>
+</method>
+<method name="format"
+ return="java.lang.StringBuffer"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="value" type="long">
+</parameter>
+<parameter name="buffer" type="java.lang.StringBuffer">
+</parameter>
+<parameter name="field" type="java.text.FieldPosition">
+</parameter>
+</method>
+<method name="format"
+ return="java.lang.StringBuffer"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="object" type="java.lang.Object">
+</parameter>
+<parameter name="buffer" type="java.lang.StringBuffer">
+</parameter>
+<parameter name="field" type="java.text.FieldPosition">
+</parameter>
+</method>
+<method name="getAvailableLocales"
+ return="java.util.Locale[]"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getCurrency"
+ return="java.util.Currency"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getCurrencyInstance"
+ return="java.text.NumberFormat"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getCurrencyInstance"
+ return="java.text.NumberFormat"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="locale" type="java.util.Locale">
+</parameter>
+</method>
+<method name="getInstance"
+ return="java.text.NumberFormat"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getInstance"
+ return="java.text.NumberFormat"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="locale" type="java.util.Locale">
+</parameter>
+</method>
+<method name="getIntegerInstance"
+ return="java.text.NumberFormat"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getIntegerInstance"
+ return="java.text.NumberFormat"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="locale" type="java.util.Locale">
+</parameter>
+</method>
+<method name="getMaximumFractionDigits"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getMaximumIntegerDigits"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getMinimumFractionDigits"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getMinimumIntegerDigits"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getNumberInstance"
+ return="java.text.NumberFormat"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getNumberInstance"
+ return="java.text.NumberFormat"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="locale" type="java.util.Locale">
+</parameter>
+</method>
+<method name="getPercentInstance"
+ return="java.text.NumberFormat"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getPercentInstance"
+ return="java.text.NumberFormat"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="locale" type="java.util.Locale">
+</parameter>
+</method>
+<method name="isGroupingUsed"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isParseIntegerOnly"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="parse"
+ return="java.lang.Number"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="string" type="java.lang.String">
+</parameter>
+<exception name="ParseException" type="java.text.ParseException">
+</exception>
+</method>
+<method name="parse"
+ return="java.lang.Number"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="string" type="java.lang.String">
+</parameter>
+<parameter name="position" type="java.text.ParsePosition">
+</parameter>
+</method>
+<method name="parseObject"
+ return="java.lang.Object"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="string" type="java.lang.String">
+</parameter>
+<parameter name="position" type="java.text.ParsePosition">
+</parameter>
+</method>
+<method name="setCurrency"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="currency" type="java.util.Currency">
+</parameter>
+</method>
+<method name="setGroupingUsed"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="value" type="boolean">
+</parameter>
+</method>
+<method name="setMaximumFractionDigits"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="value" type="int">
+</parameter>
+</method>
+<method name="setMaximumIntegerDigits"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="value" type="int">
+</parameter>
+</method>
+<method name="setMinimumFractionDigits"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="value" type="int">
+</parameter>
+</method>
+<method name="setMinimumIntegerDigits"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="value" type="int">
+</parameter>
+</method>
+<method name="setParseIntegerOnly"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="value" type="boolean">
+</parameter>
+</method>
+<field name="FRACTION_FIELD"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="INTEGER_FIELD"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="0"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<class name="NumberFormat.Field"
+ extends="java.text.Format.Field"
+ abstract="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="NumberFormat.Field"
+ type="java.text.NumberFormat.Field"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="fieldName" type="java.lang.String">
+</parameter>
+</constructor>
+<field name="CURRENCY"
+ type="java.text.NumberFormat.Field"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="DECIMAL_SEPARATOR"
+ type="java.text.NumberFormat.Field"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="EXPONENT"
+ type="java.text.NumberFormat.Field"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="EXPONENT_SIGN"
+ type="java.text.NumberFormat.Field"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="EXPONENT_SYMBOL"
+ type="java.text.NumberFormat.Field"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="FRACTION"
+ type="java.text.NumberFormat.Field"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GROUPING_SEPARATOR"
+ type="java.text.NumberFormat.Field"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="INTEGER"
+ type="java.text.NumberFormat.Field"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="PERCENT"
+ type="java.text.NumberFormat.Field"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="PERMILLE"
+ type="java.text.NumberFormat.Field"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="SIGN"
+ type="java.text.NumberFormat.Field"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<class name="ParseException"
+ extends="java.lang.Exception"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="ParseException"
+ type="java.text.ParseException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="detailMessage" type="java.lang.String">
+</parameter>
+<parameter name="location" type="int">
+</parameter>
+</constructor>
+<method name="getErrorOffset"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+</class>
+<class name="ParsePosition"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="ParsePosition"
+ type="java.text.ParsePosition"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="index" type="int">
+</parameter>
+</constructor>
+<method name="getErrorIndex"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getIndex"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="setErrorIndex"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="index" type="int">
+</parameter>
+</method>
+<method name="setIndex"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="index" type="int">
+</parameter>
+</method>
+</class>
+<class name="RuleBasedCollator"
+ extends="java.text.Collator"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="RuleBasedCollator"
+ type="java.text.RuleBasedCollator"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="rules" type="java.lang.String">
+</parameter>
+<exception name="ParseException" type="java.text.ParseException">
+</exception>
+</constructor>
+<method name="compare"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="source" type="java.lang.String">
+</parameter>
+<parameter name="target" type="java.lang.String">
+</parameter>
+</method>
+<method name="getCollationElementIterator"
+ return="java.text.CollationElementIterator"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="source" type="java.text.CharacterIterator">
+</parameter>
+</method>
+<method name="getCollationElementIterator"
+ return="java.text.CollationElementIterator"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="source" type="java.lang.String">
+</parameter>
+</method>
+<method name="getCollationKey"
+ return="java.text.CollationKey"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="source" type="java.lang.String">
+</parameter>
+</method>
+<method name="getRules"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="hashCode"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+</class>
+<class name="SimpleDateFormat"
+ extends="java.text.DateFormat"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="SimpleDateFormat"
+ type="java.text.SimpleDateFormat"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<constructor name="SimpleDateFormat"
+ type="java.text.SimpleDateFormat"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="pattern" type="java.lang.String">
+</parameter>
+</constructor>
+<constructor name="SimpleDateFormat"
+ type="java.text.SimpleDateFormat"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="template" type="java.lang.String">
+</parameter>
+<parameter name="value" type="java.text.DateFormatSymbols">
+</parameter>
+</constructor>
+<constructor name="SimpleDateFormat"
+ type="java.text.SimpleDateFormat"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="template" type="java.lang.String">
+</parameter>
+<parameter name="locale" type="java.util.Locale">
+</parameter>
+</constructor>
+<method name="applyLocalizedPattern"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="template" type="java.lang.String">
+</parameter>
+</method>
+<method name="applyPattern"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="template" type="java.lang.String">
+</parameter>
+</method>
+<method name="format"
+ return="java.lang.StringBuffer"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="date" type="java.util.Date">
+</parameter>
+<parameter name="buffer" type="java.lang.StringBuffer">
+</parameter>
+<parameter name="fieldPos" type="java.text.FieldPosition">
+</parameter>
+</method>
+<method name="get2DigitYearStart"
+ return="java.util.Date"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getDateFormatSymbols"
+ return="java.text.DateFormatSymbols"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="parse"
+ return="java.util.Date"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="string" type="java.lang.String">
+</parameter>
+<parameter name="position" type="java.text.ParsePosition">
+</parameter>
+</method>
+<method name="set2DigitYearStart"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="date" type="java.util.Date">
+</parameter>
+</method>
+<method name="setDateFormatSymbols"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="value" type="java.text.DateFormatSymbols">
+</parameter>
+</method>
+<method name="toLocalizedPattern"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="toPattern"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+</class>
+<class name="StringCharacterIterator"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="java.text.CharacterIterator">
+</implements>
+<constructor name="StringCharacterIterator"
+ type="java.text.StringCharacterIterator"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="value" type="java.lang.String">
+</parameter>
+</constructor>
+<constructor name="StringCharacterIterator"
+ type="java.text.StringCharacterIterator"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="value" type="java.lang.String">
+</parameter>
+<parameter name="location" type="int">
+</parameter>
+</constructor>
+<constructor name="StringCharacterIterator"
+ type="java.text.StringCharacterIterator"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="value" type="java.lang.String">
+</parameter>
+<parameter name="start" type="int">
+</parameter>
+<parameter name="end" type="int">
+</parameter>
+<parameter name="location" type="int">
+</parameter>
+</constructor>
+<method name="clone"
+ return="java.lang.Object"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="current"
+ return="char"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="first"
+ return="char"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getBeginIndex"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getEndIndex"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getIndex"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="last"
+ return="char"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="next"
+ return="char"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="previous"
+ return="char"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="setIndex"
+ return="char"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="location" type="int">
+</parameter>
+</method>
+<method name="setText"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="value" type="java.lang.String">
+</parameter>
+</method>
+</class>
+</package>
+<package name="java.util"
+>
+<class name="AbstractCollection"
+ extends="java.lang.Object"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="java.util.Collection">
+</implements>
+<constructor name="AbstractCollection"
+ type="java.util.AbstractCollection"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</constructor>
+<method name="add"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="object" type="E">
+</parameter>
+</method>
+<method name="addAll"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="collection" type="java.util.Collection&lt;? extends E&gt;">
+</parameter>
+</method>
+<method name="clear"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="contains"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="object" type="java.lang.Object">
+</parameter>
+</method>
+<method name="containsAll"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="collection" type="java.util.Collection&lt;?&gt;">
+</parameter>
+</method>
+<method name="isEmpty"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="iterator"
+ return="java.util.Iterator&lt;E&gt;"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="remove"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="object" type="java.lang.Object">
+</parameter>
+</method>
+<method name="removeAll"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="collection" type="java.util.Collection&lt;?&gt;">
+</parameter>
+</method>
+<method name="retainAll"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="collection" type="java.util.Collection&lt;?&gt;">
+</parameter>
+</method>
+<method name="size"
+ return="int"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="toArray"
+ return="java.lang.Object[]"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="toArray"
+ return="T[]"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="contents" type="T[]">
+</parameter>
+</method>
+</class>
+<class name="AbstractList"
+ extends="java.util.AbstractCollection"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="java.util.List">
+</implements>
+<constructor name="AbstractList"
+ type="java.util.AbstractList"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</constructor>
+<method name="add"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="location" type="int">
+</parameter>
+<parameter name="object" type="E">
+</parameter>
+</method>
+<method name="addAll"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="location" type="int">
+</parameter>
+<parameter name="collection" type="java.util.Collection&lt;? extends E&gt;">
+</parameter>
+</method>
+<method name="get"
+ return="E"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="location" type="int">
+</parameter>
+</method>
+<method name="indexOf"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="object" type="java.lang.Object">
+</parameter>
+</method>
+<method name="iterator"
+ return="java.util.Iterator&lt;E&gt;"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="lastIndexOf"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="object" type="java.lang.Object">
+</parameter>
+</method>
+<method name="listIterator"
+ return="java.util.ListIterator&lt;E&gt;"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="listIterator"
+ return="java.util.ListIterator&lt;E&gt;"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="location" type="int">
+</parameter>
+</method>
+<method name="remove"
+ return="E"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="location" type="int">
+</parameter>
+</method>
+<method name="removeRange"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="start" type="int">
+</parameter>
+<parameter name="end" type="int">
+</parameter>
+</method>
+<method name="set"
+ return="E"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="location" type="int">
+</parameter>
+<parameter name="object" type="E">
+</parameter>
+</method>
+<method name="subList"
+ return="java.util.List&lt;E&gt;"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="start" type="int">
+</parameter>
+<parameter name="end" type="int">
+</parameter>
+</method>
+<field name="modCount"
+ type="int"
+ transient="true"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</field>
+</class>
+<class name="AbstractMap"
+ extends="java.lang.Object"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="java.util.Map">
+</implements>
+<constructor name="AbstractMap"
+ type="java.util.AbstractMap"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</constructor>
+<method name="clear"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="containsKey"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="key" type="java.lang.Object">
+</parameter>
+</method>
+<method name="containsValue"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="value" type="java.lang.Object">
+</parameter>
+</method>
+<method name="entrySet"
+ return="java.util.Set&lt;java.util.Map.Entry&lt;K, V&gt;&gt;"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="get"
+ return="V"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="key" type="java.lang.Object">
+</parameter>
+</method>
+<method name="isEmpty"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="keySet"
+ return="java.util.Set&lt;K&gt;"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="put"
+ return="V"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="key" type="K">
+</parameter>
+<parameter name="value" type="V">
+</parameter>
+</method>
+<method name="putAll"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="map" type="java.util.Map&lt;? extends K, ? extends V&gt;">
+</parameter>
+</method>
+<method name="remove"
+ return="V"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="key" type="java.lang.Object">
+</parameter>
+</method>
+<method name="size"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="values"
+ return="java.util.Collection&lt;V&gt;"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+</class>
+<class name="AbstractQueue"
+ extends="java.util.AbstractCollection"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="java.util.Queue">
+</implements>
+<constructor name="AbstractQueue"
+ type="java.util.AbstractQueue"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</constructor>
+<method name="element"
+ return="E"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="remove"
+ return="E"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+</class>
+<class name="AbstractSequentialList"
+ extends="java.util.AbstractList"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="AbstractSequentialList"
+ type="java.util.AbstractSequentialList"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</constructor>
+<method name="get"
+ return="E"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="location" type="int">
+</parameter>
+</method>
+<method name="listIterator"
+ return="java.util.ListIterator&lt;E&gt;"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="location" type="int">
+</parameter>
+</method>
+</class>
+<class name="AbstractSet"
+ extends="java.util.AbstractCollection"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="java.util.Set">
+</implements>
+<constructor name="AbstractSet"
+ type="java.util.AbstractSet"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</constructor>
+</class>
+<class name="ArrayList"
+ extends="java.util.AbstractList"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="java.lang.Cloneable">
+</implements>
+<implements name="java.util.RandomAccess">
+</implements>
+<implements name="java.io.Serializable">
+</implements>
+<constructor name="ArrayList"
+ type="java.util.ArrayList"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="capacity" type="int">
+</parameter>
+</constructor>
+<constructor name="ArrayList"
+ type="java.util.ArrayList"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<constructor name="ArrayList"
+ type="java.util.ArrayList"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="collection" type="java.util.Collection&lt;? extends E&gt;">
+</parameter>
+</constructor>
+<method name="clone"
+ return="java.lang.Object"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="ensureCapacity"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="minimumCapacity" type="int">
+</parameter>
+</method>
+<method name="get"
+ return="E"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="index" type="int">
+</parameter>
+</method>
+<method name="size"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="trimToSize"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+</class>
+<class name="Arrays"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="asList"
+ return="java.util.List&lt;T&gt;"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="array" type="T...">
+</parameter>
+</method>
+<method name="binarySearch"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="array" type="byte[]">
+</parameter>
+<parameter name="value" type="byte">
+</parameter>
+</method>
+<method name="binarySearch"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="array" type="char[]">
+</parameter>
+<parameter name="value" type="char">
+</parameter>
+</method>
+<method name="binarySearch"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="array" type="double[]">
+</parameter>
+<parameter name="value" type="double">
+</parameter>
+</method>
+<method name="binarySearch"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="array" type="float[]">
+</parameter>
+<parameter name="value" type="float">
+</parameter>
+</method>
+<method name="binarySearch"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="array" type="int[]">
+</parameter>
+<parameter name="value" type="int">
+</parameter>
+</method>
+<method name="binarySearch"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="array" type="long[]">
+</parameter>
+<parameter name="value" type="long">
+</parameter>
+</method>
+<method name="binarySearch"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="array" type="java.lang.Object[]">
+</parameter>
+<parameter name="value" type="java.lang.Object">
+</parameter>
+</method>
+<method name="binarySearch"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="array" type="T[]">
+</parameter>
+<parameter name="value" type="T">
+</parameter>
+<parameter name="comparator" type="java.util.Comparator&lt;? super T&gt;">
+</parameter>
+</method>
+<method name="binarySearch"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="array" type="short[]">
+</parameter>
+<parameter name="value" type="short">
+</parameter>
+</method>
+<method name="deepEquals"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="array1" type="java.lang.Object[]">
+</parameter>
+<parameter name="array2" type="java.lang.Object[]">
+</parameter>
+</method>
+<method name="deepHashCode"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="array" type="java.lang.Object[]">
+</parameter>
+</method>
+<method name="deepToString"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="array" type="java.lang.Object[]">
+</parameter>
+</method>
+<method name="equals"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="array1" type="byte[]">
+</parameter>
+<parameter name="array2" type="byte[]">
+</parameter>
+</method>
+<method name="equals"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="array1" type="short[]">
+</parameter>
+<parameter name="array2" type="short[]">
+</parameter>
+</method>
+<method name="equals"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="array1" type="char[]">
+</parameter>
+<parameter name="array2" type="char[]">
+</parameter>
+</method>
+<method name="equals"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="array1" type="int[]">
+</parameter>
+<parameter name="array2" type="int[]">
+</parameter>
+</method>
+<method name="equals"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="array1" type="long[]">
+</parameter>
+<parameter name="array2" type="long[]">
+</parameter>
+</method>
+<method name="equals"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="array1" type="float[]">
+</parameter>
+<parameter name="array2" type="float[]">
+</parameter>
+</method>
+<method name="equals"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="array1" type="double[]">
+</parameter>
+<parameter name="array2" type="double[]">
+</parameter>
+</method>
+<method name="equals"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="array1" type="boolean[]">
+</parameter>
+<parameter name="array2" type="boolean[]">
+</parameter>
+</method>
+<method name="equals"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="array1" type="java.lang.Object[]">
+</parameter>
+<parameter name="array2" type="java.lang.Object[]">
+</parameter>
+</method>
+<method name="fill"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="array" type="byte[]">
+</parameter>
+<parameter name="value" type="byte">
+</parameter>
+</method>
+<method name="fill"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="array" type="byte[]">
+</parameter>
+<parameter name="start" type="int">
+</parameter>
+<parameter name="end" type="int">
+</parameter>
+<parameter name="value" type="byte">
+</parameter>
+</method>
+<method name="fill"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="array" type="short[]">
+</parameter>
+<parameter name="value" type="short">
+</parameter>
+</method>
+<method name="fill"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="array" type="short[]">
+</parameter>
+<parameter name="start" type="int">
+</parameter>
+<parameter name="end" type="int">
+</parameter>
+<parameter name="value" type="short">
+</parameter>
+</method>
+<method name="fill"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="array" type="char[]">
+</parameter>
+<parameter name="value" type="char">
+</parameter>
+</method>
+<method name="fill"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="array" type="char[]">
+</parameter>
+<parameter name="start" type="int">
+</parameter>
+<parameter name="end" type="int">
+</parameter>
+<parameter name="value" type="char">
+</parameter>
+</method>
+<method name="fill"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="array" type="int[]">
+</parameter>
+<parameter name="value" type="int">
+</parameter>
+</method>
+<method name="fill"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="array" type="int[]">
+</parameter>
+<parameter name="start" type="int">
+</parameter>
+<parameter name="end" type="int">
+</parameter>
+<parameter name="value" type="int">
+</parameter>
+</method>
+<method name="fill"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="array" type="long[]">
+</parameter>
+<parameter name="value" type="long">
+</parameter>
+</method>
+<method name="fill"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="array" type="long[]">
+</parameter>
+<parameter name="start" type="int">
+</parameter>
+<parameter name="end" type="int">
+</parameter>
+<parameter name="value" type="long">
+</parameter>
+</method>
+<method name="fill"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="array" type="float[]">
+</parameter>
+<parameter name="value" type="float">
+</parameter>
+</method>
+<method name="fill"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="array" type="float[]">
+</parameter>
+<parameter name="start" type="int">
+</parameter>
+<parameter name="end" type="int">
+</parameter>
+<parameter name="value" type="float">
+</parameter>
+</method>
+<method name="fill"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="array" type="double[]">
+</parameter>
+<parameter name="value" type="double">
+</parameter>
+</method>
+<method name="fill"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="array" type="double[]">
+</parameter>
+<parameter name="start" type="int">
+</parameter>
+<parameter name="end" type="int">
+</parameter>
+<parameter name="value" type="double">
+</parameter>
+</method>
+<method name="fill"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="array" type="boolean[]">
+</parameter>
+<parameter name="value" type="boolean">
+</parameter>
+</method>
+<method name="fill"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="array" type="boolean[]">
+</parameter>
+<parameter name="start" type="int">
+</parameter>
+<parameter name="end" type="int">
+</parameter>
+<parameter name="value" type="boolean">
+</parameter>
+</method>
+<method name="fill"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="array" type="java.lang.Object[]">
+</parameter>
+<parameter name="value" type="java.lang.Object">
+</parameter>
+</method>
+<method name="fill"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="array" type="java.lang.Object[]">
+</parameter>
+<parameter name="start" type="int">
+</parameter>
+<parameter name="end" type="int">
+</parameter>
+<parameter name="value" type="java.lang.Object">
+</parameter>
+</method>
+<method name="hashCode"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="array" type="boolean[]">
+</parameter>
+</method>
+<method name="hashCode"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="array" type="int[]">
+</parameter>
+</method>
+<method name="hashCode"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="array" type="short[]">
+</parameter>
+</method>
+<method name="hashCode"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="array" type="char[]">
+</parameter>
+</method>
+<method name="hashCode"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="array" type="byte[]">
+</parameter>
+</method>
+<method name="hashCode"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="array" type="long[]">
+</parameter>
+</method>
+<method name="hashCode"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="array" type="float[]">
+</parameter>
+</method>
+<method name="hashCode"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="array" type="double[]">
+</parameter>
+</method>
+<method name="hashCode"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="array" type="java.lang.Object[]">
+</parameter>
+</method>
+<method name="sort"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="array" type="byte[]">
+</parameter>
+</method>
+<method name="sort"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="array" type="byte[]">
+</parameter>
+<parameter name="start" type="int">
+</parameter>
+<parameter name="end" type="int">
+</parameter>
+</method>
+<method name="sort"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="array" type="char[]">
+</parameter>
+</method>
+<method name="sort"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="array" type="char[]">
+</parameter>
+<parameter name="start" type="int">
+</parameter>
+<parameter name="end" type="int">
+</parameter>
+</method>
+<method name="sort"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="array" type="double[]">
+</parameter>
+</method>
+<method name="sort"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="array" type="double[]">
+</parameter>
+<parameter name="start" type="int">
+</parameter>
+<parameter name="end" type="int">
+</parameter>
+</method>
+<method name="sort"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="array" type="float[]">
+</parameter>
+</method>
+<method name="sort"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="array" type="float[]">
+</parameter>
+<parameter name="start" type="int">
+</parameter>
+<parameter name="end" type="int">
+</parameter>
+</method>
+<method name="sort"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="array" type="int[]">
+</parameter>
+</method>
+<method name="sort"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="array" type="int[]">
+</parameter>
+<parameter name="start" type="int">
+</parameter>
+<parameter name="end" type="int">
+</parameter>
+</method>
+<method name="sort"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="array" type="long[]">
+</parameter>
+</method>
+<method name="sort"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="array" type="long[]">
+</parameter>
+<parameter name="start" type="int">
+</parameter>
+<parameter name="end" type="int">
+</parameter>
+</method>
+<method name="sort"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="array" type="short[]">
+</parameter>
+</method>
+<method name="sort"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="array" type="short[]">
+</parameter>
+<parameter name="start" type="int">
+</parameter>
+<parameter name="end" type="int">
+</parameter>
+</method>
+<method name="sort"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="array" type="java.lang.Object[]">
+</parameter>
+</method>
+<method name="sort"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="array" type="java.lang.Object[]">
+</parameter>
+<parameter name="start" type="int">
+</parameter>
+<parameter name="end" type="int">
+</parameter>
+</method>
+<method name="sort"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="array" type="T[]">
+</parameter>
+<parameter name="start" type="int">
+</parameter>
+<parameter name="end" type="int">
+</parameter>
+<parameter name="comparator" type="java.util.Comparator&lt;? super T&gt;">
+</parameter>
+</method>
+<method name="sort"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="array" type="T[]">
+</parameter>
+<parameter name="comparator" type="java.util.Comparator&lt;? super T&gt;">
+</parameter>
+</method>
+<method name="toString"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="array" type="boolean[]">
+</parameter>
+</method>
+<method name="toString"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="array" type="byte[]">
+</parameter>
+</method>
+<method name="toString"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="array" type="char[]">
+</parameter>
+</method>
+<method name="toString"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="array" type="double[]">
+</parameter>
+</method>
+<method name="toString"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="array" type="float[]">
+</parameter>
+</method>
+<method name="toString"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="array" type="int[]">
+</parameter>
+</method>
+<method name="toString"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="array" type="long[]">
+</parameter>
+</method>
+<method name="toString"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="array" type="short[]">
+</parameter>
+</method>
+<method name="toString"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="array" type="java.lang.Object[]">
+</parameter>
+</method>
+</class>
+<class name="BitSet"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="java.lang.Cloneable">
+</implements>
+<implements name="java.io.Serializable">
+</implements>
+<constructor name="BitSet"
+ type="java.util.BitSet"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<constructor name="BitSet"
+ type="java.util.BitSet"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="nbits" type="int">
+</parameter>
+</constructor>
+<method name="and"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="bs" type="java.util.BitSet">
+</parameter>
+</method>
+<method name="andNot"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="bs" type="java.util.BitSet">
+</parameter>
+</method>
+<method name="cardinality"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="clear"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="clear"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="pos" type="int">
+</parameter>
+</method>
+<method name="clear"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="pos1" type="int">
+</parameter>
+<parameter name="pos2" type="int">
+</parameter>
+</method>
+<method name="clone"
+ return="java.lang.Object"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="flip"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="pos" type="int">
+</parameter>
+</method>
+<method name="flip"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="pos1" type="int">
+</parameter>
+<parameter name="pos2" type="int">
+</parameter>
+</method>
+<method name="get"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="pos" type="int">
+</parameter>
+</method>
+<method name="get"
+ return="java.util.BitSet"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="pos1" type="int">
+</parameter>
+<parameter name="pos2" type="int">
+</parameter>
+</method>
+<method name="intersects"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="bs" type="java.util.BitSet">
+</parameter>
+</method>
+<method name="isEmpty"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="length"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="nextClearBit"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="pos" type="int">
+</parameter>
+</method>
+<method name="nextSetBit"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="pos" type="int">
+</parameter>
+</method>
+<method name="or"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="bs" type="java.util.BitSet">
+</parameter>
+</method>
+<method name="set"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="pos" type="int">
+</parameter>
+</method>
+<method name="set"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="pos" type="int">
+</parameter>
+<parameter name="val" type="boolean">
+</parameter>
+</method>
+<method name="set"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="pos1" type="int">
+</parameter>
+<parameter name="pos2" type="int">
+</parameter>
+</method>
+<method name="set"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="pos1" type="int">
+</parameter>
+<parameter name="pos2" type="int">
+</parameter>
+<parameter name="val" type="boolean">
+</parameter>
+</method>
+<method name="size"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="xor"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="bs" type="java.util.BitSet">
+</parameter>
+</method>
+</class>
+<class name="Calendar"
+ extends="java.lang.Object"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="java.lang.Cloneable">
+</implements>
+<implements name="java.lang.Comparable">
+</implements>
+<implements name="java.io.Serializable">
+</implements>
+<constructor name="Calendar"
+ type="java.util.Calendar"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</constructor>
+<constructor name="Calendar"
+ type="java.util.Calendar"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="timezone" type="java.util.TimeZone">
+</parameter>
+<parameter name="locale" type="java.util.Locale">
+</parameter>
+</constructor>
+<method name="add"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="field" type="int">
+</parameter>
+<parameter name="value" type="int">
+</parameter>
+</method>
+<method name="after"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="calendar" type="java.lang.Object">
+</parameter>
+</method>
+<method name="before"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="calendar" type="java.lang.Object">
+</parameter>
+</method>
+<method name="clear"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="clear"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="field" type="int">
+</parameter>
+</method>
+<method name="clone"
+ return="java.lang.Object"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="compareTo"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="anotherCalendar" type="java.util.Calendar">
+</parameter>
+</method>
+<method name="complete"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</method>
+<method name="computeFields"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</method>
+<method name="computeTime"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</method>
+<method name="get"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="field" type="int">
+</parameter>
+</method>
+<method name="getActualMaximum"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="field" type="int">
+</parameter>
+</method>
+<method name="getActualMinimum"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="field" type="int">
+</parameter>
+</method>
+<method name="getAvailableLocales"
+ return="java.util.Locale[]"
+ abstract="false"
+ native="false"
+ synchronized="true"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getFirstDayOfWeek"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getGreatestMinimum"
+ return="int"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="field" type="int">
+</parameter>
+</method>
+<method name="getInstance"
+ return="java.util.Calendar"
+ abstract="false"
+ native="false"
+ synchronized="true"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getInstance"
+ return="java.util.Calendar"
+ abstract="false"
+ native="false"
+ synchronized="true"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="locale" type="java.util.Locale">
+</parameter>
+</method>
+<method name="getInstance"
+ return="java.util.Calendar"
+ abstract="false"
+ native="false"
+ synchronized="true"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="timezone" type="java.util.TimeZone">
+</parameter>
+</method>
+<method name="getInstance"
+ return="java.util.Calendar"
+ abstract="false"
+ native="false"
+ synchronized="true"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="timezone" type="java.util.TimeZone">
+</parameter>
+<parameter name="locale" type="java.util.Locale">
+</parameter>
+</method>
+<method name="getLeastMaximum"
+ return="int"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="field" type="int">
+</parameter>
+</method>
+<method name="getMaximum"
+ return="int"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="field" type="int">
+</parameter>
+</method>
+<method name="getMinimalDaysInFirstWeek"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getMinimum"
+ return="int"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="field" type="int">
+</parameter>
+</method>
+<method name="getTime"
+ return="java.util.Date"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getTimeInMillis"
+ return="long"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getTimeZone"
+ return="java.util.TimeZone"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="internalGet"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="field" type="int">
+</parameter>
+</method>
+<method name="isLenient"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isSet"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="field" type="int">
+</parameter>
+</method>
+<method name="roll"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="field" type="int">
+</parameter>
+<parameter name="value" type="int">
+</parameter>
+</method>
+<method name="roll"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="field" type="int">
+</parameter>
+<parameter name="increment" type="boolean">
+</parameter>
+</method>
+<method name="set"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="field" type="int">
+</parameter>
+<parameter name="value" type="int">
+</parameter>
+</method>
+<method name="set"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="year" type="int">
+</parameter>
+<parameter name="month" type="int">
+</parameter>
+<parameter name="day" type="int">
+</parameter>
+</method>
+<method name="set"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="year" type="int">
+</parameter>
+<parameter name="month" type="int">
+</parameter>
+<parameter name="day" type="int">
+</parameter>
+<parameter name="hourOfDay" type="int">
+</parameter>
+<parameter name="minute" type="int">
+</parameter>
+</method>
+<method name="set"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="year" type="int">
+</parameter>
+<parameter name="month" type="int">
+</parameter>
+<parameter name="day" type="int">
+</parameter>
+<parameter name="hourOfDay" type="int">
+</parameter>
+<parameter name="minute" type="int">
+</parameter>
+<parameter name="second" type="int">
+</parameter>
+</method>
+<method name="setFirstDayOfWeek"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="value" type="int">
+</parameter>
+</method>
+<method name="setLenient"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="value" type="boolean">
+</parameter>
+</method>
+<method name="setMinimalDaysInFirstWeek"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="value" type="int">
+</parameter>
+</method>
+<method name="setTime"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="date" type="java.util.Date">
+</parameter>
+</method>
+<method name="setTimeInMillis"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="milliseconds" type="long">
+</parameter>
+</method>
+<method name="setTimeZone"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="timezone" type="java.util.TimeZone">
+</parameter>
+</method>
+<field name="AM"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="0"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="AM_PM"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="9"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="APRIL"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="3"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="AUGUST"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="7"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="DATE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="5"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="DAY_OF_MONTH"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="5"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="DAY_OF_WEEK"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="7"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="DAY_OF_WEEK_IN_MONTH"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="8"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="DAY_OF_YEAR"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="6"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="DECEMBER"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="11"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="DST_OFFSET"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ERA"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="0"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="FEBRUARY"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="FIELD_COUNT"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="17"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="FRIDAY"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="6"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="HOUR"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="10"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="HOUR_OF_DAY"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="11"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="JANUARY"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="0"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="JULY"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="6"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="JUNE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="5"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="MARCH"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="MAY"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="4"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="MILLISECOND"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="14"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="MINUTE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="12"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="MONDAY"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="MONTH"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="NOVEMBER"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="10"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="OCTOBER"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="9"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="PM"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="SATURDAY"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="7"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="SECOND"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="13"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="SEPTEMBER"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="8"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="SUNDAY"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="THURSDAY"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="5"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TUESDAY"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="3"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="UNDECIMBER"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="12"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="WEDNESDAY"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="4"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="WEEK_OF_MONTH"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="4"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="WEEK_OF_YEAR"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="3"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="YEAR"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ZONE_OFFSET"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="15"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="areFieldsSet"
+ type="boolean"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</field>
+<field name="fields"
+ type="int[]"
+ transient="false"
+ volatile="false"
+ value="null"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</field>
+<field name="isSet"
+ type="boolean[]"
+ transient="false"
+ volatile="false"
+ value="null"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</field>
+<field name="isTimeSet"
+ type="boolean"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</field>
+<field name="time"
+ type="long"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</field>
+</class>
+<interface name="Collection"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="java.lang.Iterable">
+</implements>
+<method name="add"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="object" type="E">
+</parameter>
+</method>
+<method name="addAll"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="collection" type="java.util.Collection&lt;? extends E&gt;">
+</parameter>
+</method>
+<method name="clear"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="contains"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="object" type="java.lang.Object">
+</parameter>
+</method>
+<method name="containsAll"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="collection" type="java.util.Collection&lt;?&gt;">
+</parameter>
+</method>
+<method name="equals"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="object" type="java.lang.Object">
+</parameter>
+</method>
+<method name="hashCode"
+ return="int"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isEmpty"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="iterator"
+ return="java.util.Iterator&lt;E&gt;"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="remove"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="object" type="java.lang.Object">
+</parameter>
+</method>
+<method name="removeAll"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="collection" type="java.util.Collection&lt;?&gt;">
+</parameter>
+</method>
+<method name="retainAll"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="collection" type="java.util.Collection&lt;?&gt;">
+</parameter>
+</method>
+<method name="size"
+ return="int"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="toArray"
+ return="java.lang.Object[]"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="toArray"
+ return="T[]"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="array" type="T[]">
+</parameter>
+</method>
+</interface>
+<class name="Collections"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="addAll"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="c" type="java.util.Collection&lt;? super T&gt;">
+</parameter>
+<parameter name="a" type="T...">
+</parameter>
+</method>
+<method name="binarySearch"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="list" type="java.util.List&lt;? extends java.lang.Comparable&lt;? super T&gt;&gt;">
+</parameter>
+<parameter name="object" type="T">
+</parameter>
+</method>
+<method name="binarySearch"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="list" type="java.util.List&lt;? extends T&gt;">
+</parameter>
+<parameter name="object" type="T">
+</parameter>
+<parameter name="comparator" type="java.util.Comparator&lt;? super T&gt;">
+</parameter>
+</method>
+<method name="checkedCollection"
+ return="java.util.Collection&lt;E&gt;"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="c" type="java.util.Collection&lt;E&gt;">
+</parameter>
+<parameter name="type" type="java.lang.Class&lt;E&gt;">
+</parameter>
+</method>
+<method name="checkedList"
+ return="java.util.List&lt;E&gt;"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="list" type="java.util.List&lt;E&gt;">
+</parameter>
+<parameter name="type" type="java.lang.Class&lt;E&gt;">
+</parameter>
+</method>
+<method name="checkedMap"
+ return="java.util.Map&lt;K, V&gt;"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="m" type="java.util.Map&lt;K, V&gt;">
+</parameter>
+<parameter name="keyType" type="java.lang.Class&lt;K&gt;">
+</parameter>
+<parameter name="valueType" type="java.lang.Class&lt;V&gt;">
+</parameter>
+</method>
+<method name="checkedSet"
+ return="java.util.Set&lt;E&gt;"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="s" type="java.util.Set&lt;E&gt;">
+</parameter>
+<parameter name="type" type="java.lang.Class&lt;E&gt;">
+</parameter>
+</method>
+<method name="checkedSortedMap"
+ return="java.util.SortedMap&lt;K, V&gt;"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="m" type="java.util.SortedMap&lt;K, V&gt;">
+</parameter>
+<parameter name="keyType" type="java.lang.Class&lt;K&gt;">
+</parameter>
+<parameter name="valueType" type="java.lang.Class&lt;V&gt;">
+</parameter>
+</method>
+<method name="checkedSortedSet"
+ return="java.util.SortedSet&lt;E&gt;"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="s" type="java.util.SortedSet&lt;E&gt;">
+</parameter>
+<parameter name="type" type="java.lang.Class&lt;E&gt;">
+</parameter>
+</method>
+<method name="copy"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="destination" type="java.util.List&lt;? super T&gt;">
+</parameter>
+<parameter name="source" type="java.util.List&lt;? extends T&gt;">
+</parameter>
+</method>
+<method name="disjoint"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="c1" type="java.util.Collection&lt;?&gt;">
+</parameter>
+<parameter name="c2" type="java.util.Collection&lt;?&gt;">
+</parameter>
+</method>
+<method name="emptyList"
+ return="java.util.List&lt;T&gt;"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="emptyMap"
+ return="java.util.Map&lt;K, V&gt;"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="emptySet"
+ return="java.util.Set&lt;T&gt;"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="enumeration"
+ return="java.util.Enumeration&lt;T&gt;"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="collection" type="java.util.Collection&lt;T&gt;">
+</parameter>
+</method>
+<method name="fill"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="list" type="java.util.List&lt;? super T&gt;">
+</parameter>
+<parameter name="object" type="T">
+</parameter>
+</method>
+<method name="frequency"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="c" type="java.util.Collection&lt;?&gt;">
+</parameter>
+<parameter name="o" type="java.lang.Object">
+</parameter>
+</method>
+<method name="indexOfSubList"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="list" type="java.util.List&lt;?&gt;">
+</parameter>
+<parameter name="sublist" type="java.util.List&lt;?&gt;">
+</parameter>
+</method>
+<method name="lastIndexOfSubList"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="list" type="java.util.List&lt;?&gt;">
+</parameter>
+<parameter name="sublist" type="java.util.List&lt;?&gt;">
+</parameter>
+</method>
+<method name="list"
+ return="java.util.ArrayList&lt;T&gt;"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="enumeration" type="java.util.Enumeration&lt;T&gt;">
+</parameter>
+</method>
+<method name="max"
+ return="T"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="collection" type="java.util.Collection&lt;? extends T&gt;">
+</parameter>
+</method>
+<method name="max"
+ return="T"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="collection" type="java.util.Collection&lt;? extends T&gt;">
+</parameter>
+<parameter name="comparator" type="java.util.Comparator&lt;? super T&gt;">
+</parameter>
+</method>
+<method name="min"
+ return="T"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="collection" type="java.util.Collection&lt;? extends T&gt;">
+</parameter>
+</method>
+<method name="min"
+ return="T"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="collection" type="java.util.Collection&lt;? extends T&gt;">
+</parameter>
+<parameter name="comparator" type="java.util.Comparator&lt;? super T&gt;">
+</parameter>
+</method>
+<method name="nCopies"
+ return="java.util.List&lt;T&gt;"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="length" type="int">
+</parameter>
+<parameter name="object" type="T">
+</parameter>
+</method>
+<method name="replaceAll"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="list" type="java.util.List&lt;T&gt;">
+</parameter>
+<parameter name="obj" type="T">
+</parameter>
+<parameter name="obj2" type="T">
+</parameter>
+</method>
+<method name="reverse"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="list" type="java.util.List&lt;?&gt;">
+</parameter>
+</method>
+<method name="reverseOrder"
+ return="java.util.Comparator&lt;T&gt;"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="reverseOrder"
+ return="java.util.Comparator&lt;T&gt;"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="c" type="java.util.Comparator&lt;T&gt;">
+</parameter>
+</method>
+<method name="rotate"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="lst" type="java.util.List&lt;?&gt;">
+</parameter>
+<parameter name="dist" type="int">
+</parameter>
+</method>
+<method name="shuffle"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="list" type="java.util.List&lt;?&gt;">
+</parameter>
+</method>
+<method name="shuffle"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="list" type="java.util.List&lt;?&gt;">
+</parameter>
+<parameter name="random" type="java.util.Random">
+</parameter>
+</method>
+<method name="singleton"
+ return="java.util.Set&lt;E&gt;"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="object" type="E">
+</parameter>
+</method>
+<method name="singletonList"
+ return="java.util.List&lt;E&gt;"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="object" type="E">
+</parameter>
+</method>
+<method name="singletonMap"
+ return="java.util.Map&lt;K, V&gt;"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="key" type="K">
+</parameter>
+<parameter name="value" type="V">
+</parameter>
+</method>
+<method name="sort"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="list" type="java.util.List&lt;T&gt;">
+</parameter>
+</method>
+<method name="sort"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="list" type="java.util.List&lt;T&gt;">
+</parameter>
+<parameter name="comparator" type="java.util.Comparator&lt;? super T&gt;">
+</parameter>
+</method>
+<method name="swap"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="list" type="java.util.List&lt;?&gt;">
+</parameter>
+<parameter name="index1" type="int">
+</parameter>
+<parameter name="index2" type="int">
+</parameter>
+</method>
+<method name="synchronizedCollection"
+ return="java.util.Collection&lt;T&gt;"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="collection" type="java.util.Collection&lt;T&gt;">
+</parameter>
+</method>
+<method name="synchronizedList"
+ return="java.util.List&lt;T&gt;"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="list" type="java.util.List&lt;T&gt;">
+</parameter>
+</method>
+<method name="synchronizedMap"
+ return="java.util.Map&lt;K, V&gt;"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="map" type="java.util.Map&lt;K, V&gt;">
+</parameter>
+</method>
+<method name="synchronizedSet"
+ return="java.util.Set&lt;E&gt;"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="set" type="java.util.Set&lt;E&gt;">
+</parameter>
+</method>
+<method name="synchronizedSortedMap"
+ return="java.util.SortedMap&lt;K, V&gt;"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="map" type="java.util.SortedMap&lt;K, V&gt;">
+</parameter>
+</method>
+<method name="synchronizedSortedSet"
+ return="java.util.SortedSet&lt;E&gt;"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="set" type="java.util.SortedSet&lt;E&gt;">
+</parameter>
+</method>
+<method name="unmodifiableCollection"
+ return="java.util.Collection&lt;E&gt;"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="collection" type="java.util.Collection&lt;? extends E&gt;">
+</parameter>
+</method>
+<method name="unmodifiableList"
+ return="java.util.List&lt;E&gt;"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="list" type="java.util.List&lt;? extends E&gt;">
+</parameter>
+</method>
+<method name="unmodifiableMap"
+ return="java.util.Map&lt;K, V&gt;"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="map" type="java.util.Map&lt;? extends K, ? extends V&gt;">
+</parameter>
+</method>
+<method name="unmodifiableSet"
+ return="java.util.Set&lt;E&gt;"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="set" type="java.util.Set&lt;? extends E&gt;">
+</parameter>
+</method>
+<method name="unmodifiableSortedMap"
+ return="java.util.SortedMap&lt;K, V&gt;"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="map" type="java.util.SortedMap&lt;K, ? extends V&gt;">
+</parameter>
+</method>
+<method name="unmodifiableSortedSet"
+ return="java.util.SortedSet&lt;E&gt;"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="set" type="java.util.SortedSet&lt;E&gt;">
+</parameter>
+</method>
+<field name="EMPTY_LIST"
+ type="java.util.List"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="EMPTY_MAP"
+ type="java.util.Map"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="EMPTY_SET"
+ type="java.util.Set"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<interface name="Comparator"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="compare"
+ return="int"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="object1" type="T">
+</parameter>
+<parameter name="object2" type="T">
+</parameter>
+</method>
+<method name="equals"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="object" type="java.lang.Object">
+</parameter>
+</method>
+</interface>
+<class name="ConcurrentModificationException"
+ extends="java.lang.RuntimeException"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="ConcurrentModificationException"
+ type="java.util.ConcurrentModificationException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<constructor name="ConcurrentModificationException"
+ type="java.util.ConcurrentModificationException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="detailMessage" type="java.lang.String">
+</parameter>
+</constructor>
+</class>
+<class name="Currency"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="java.io.Serializable">
+</implements>
+<method name="getCurrencyCode"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getDefaultFractionDigits"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getInstance"
+ return="java.util.Currency"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="currencyCode" type="java.lang.String">
+</parameter>
+</method>
+<method name="getInstance"
+ return="java.util.Currency"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="locale" type="java.util.Locale">
+</parameter>
+</method>
+<method name="getSymbol"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getSymbol"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="locale" type="java.util.Locale">
+</parameter>
+</method>
+</class>
+<class name="Date"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="java.lang.Cloneable">
+</implements>
+<implements name="java.lang.Comparable">
+</implements>
+<implements name="java.io.Serializable">
+</implements>
+<constructor name="Date"
+ type="java.util.Date"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<constructor name="Date"
+ type="java.util.Date"
+ static="false"
+ final="false"
+ deprecated="deprecated"
+ visibility="public"
+>
+<parameter name="year" type="int">
+</parameter>
+<parameter name="month" type="int">
+</parameter>
+<parameter name="day" type="int">
+</parameter>
+</constructor>
+<constructor name="Date"
+ type="java.util.Date"
+ static="false"
+ final="false"
+ deprecated="deprecated"
+ visibility="public"
+>
+<parameter name="year" type="int">
+</parameter>
+<parameter name="month" type="int">
+</parameter>
+<parameter name="day" type="int">
+</parameter>
+<parameter name="hour" type="int">
+</parameter>
+<parameter name="minute" type="int">
+</parameter>
+</constructor>
+<constructor name="Date"
+ type="java.util.Date"
+ static="false"
+ final="false"
+ deprecated="deprecated"
+ visibility="public"
+>
+<parameter name="year" type="int">
+</parameter>
+<parameter name="month" type="int">
+</parameter>
+<parameter name="day" type="int">
+</parameter>
+<parameter name="hour" type="int">
+</parameter>
+<parameter name="minute" type="int">
+</parameter>
+<parameter name="second" type="int">
+</parameter>
+</constructor>
+<constructor name="Date"
+ type="java.util.Date"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="milliseconds" type="long">
+</parameter>
+</constructor>
+<constructor name="Date"
+ type="java.util.Date"
+ static="false"
+ final="false"
+ deprecated="deprecated"
+ visibility="public"
+>
+<parameter name="string" type="java.lang.String">
+</parameter>
+</constructor>
+<method name="UTC"
+ return="long"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="deprecated"
+ visibility="public"
+>
+<parameter name="year" type="int">
+</parameter>
+<parameter name="month" type="int">
+</parameter>
+<parameter name="day" type="int">
+</parameter>
+<parameter name="hour" type="int">
+</parameter>
+<parameter name="minute" type="int">
+</parameter>
+<parameter name="second" type="int">
+</parameter>
+</method>
+<method name="after"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="date" type="java.util.Date">
+</parameter>
+</method>
+<method name="before"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="date" type="java.util.Date">
+</parameter>
+</method>
+<method name="clone"
+ return="java.lang.Object"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="compareTo"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="date" type="java.util.Date">
+</parameter>
+</method>
+<method name="getDate"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="deprecated"
+ visibility="public"
+>
+</method>
+<method name="getDay"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="deprecated"
+ visibility="public"
+>
+</method>
+<method name="getHours"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="deprecated"
+ visibility="public"
+>
+</method>
+<method name="getMinutes"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="deprecated"
+ visibility="public"
+>
+</method>
+<method name="getMonth"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="deprecated"
+ visibility="public"
+>
+</method>
+<method name="getSeconds"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="deprecated"
+ visibility="public"
+>
+</method>
+<method name="getTime"
+ return="long"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getTimezoneOffset"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="deprecated"
+ visibility="public"
+>
+</method>
+<method name="getYear"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="deprecated"
+ visibility="public"
+>
+</method>
+<method name="parse"
+ return="long"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="deprecated"
+ visibility="public"
+>
+<parameter name="string" type="java.lang.String">
+</parameter>
+</method>
+<method name="setDate"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="deprecated"
+ visibility="public"
+>
+<parameter name="day" type="int">
+</parameter>
+</method>
+<method name="setHours"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="deprecated"
+ visibility="public"
+>
+<parameter name="hour" type="int">
+</parameter>
+</method>
+<method name="setMinutes"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="deprecated"
+ visibility="public"
+>
+<parameter name="minute" type="int">
+</parameter>
+</method>
+<method name="setMonth"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="deprecated"
+ visibility="public"
+>
+<parameter name="month" type="int">
+</parameter>
+</method>
+<method name="setSeconds"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="deprecated"
+ visibility="public"
+>
+<parameter name="second" type="int">
+</parameter>
+</method>
+<method name="setTime"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="milliseconds" type="long">
+</parameter>
+</method>
+<method name="setYear"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="deprecated"
+ visibility="public"
+>
+<parameter name="year" type="int">
+</parameter>
+</method>
+<method name="toGMTString"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="deprecated"
+ visibility="public"
+>
+</method>
+<method name="toLocaleString"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="deprecated"
+ visibility="public"
+>
+</method>
+</class>
+<class name="Dictionary"
+ extends="java.lang.Object"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="Dictionary"
+ type="java.util.Dictionary"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<method name="elements"
+ return="java.util.Enumeration&lt;V&gt;"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="get"
+ return="V"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="key" type="java.lang.Object">
+</parameter>
+</method>
+<method name="isEmpty"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="keys"
+ return="java.util.Enumeration&lt;K&gt;"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="put"
+ return="V"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="key" type="K">
+</parameter>
+<parameter name="value" type="V">
+</parameter>
+</method>
+<method name="remove"
+ return="V"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="key" type="java.lang.Object">
+</parameter>
+</method>
+<method name="size"
+ return="int"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+</class>
+<class name="DuplicateFormatFlagsException"
+ extends="java.util.IllegalFormatException"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="DuplicateFormatFlagsException"
+ type="java.util.DuplicateFormatFlagsException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="f" type="java.lang.String">
+</parameter>
+</constructor>
+<method name="getFlags"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+</class>
+<class name="EmptyStackException"
+ extends="java.lang.RuntimeException"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="EmptyStackException"
+ type="java.util.EmptyStackException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+</class>
+<class name="EnumMap"
+ extends="java.util.AbstractMap"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="java.lang.Cloneable">
+</implements>
+<implements name="java.util.Map">
+</implements>
+<implements name="java.io.Serializable">
+</implements>
+<constructor name="EnumMap"
+ type="java.util.EnumMap"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="keyType" type="java.lang.Class&lt;K&gt;">
+</parameter>
+</constructor>
+<constructor name="EnumMap"
+ type="java.util.EnumMap"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="map" type="java.util.EnumMap&lt;K, ? extends V&gt;">
+</parameter>
+</constructor>
+<constructor name="EnumMap"
+ type="java.util.EnumMap"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="map" type="java.util.Map&lt;K, ? extends V&gt;">
+</parameter>
+</constructor>
+<method name="clone"
+ return="java.util.EnumMap&lt;K, V&gt;"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="entrySet"
+ return="java.util.Set&lt;java.util.Map.Entry&lt;K, V&gt;&gt;"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+</class>
+<class name="EnumSet"
+ extends="java.util.AbstractSet"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="java.lang.Cloneable">
+</implements>
+<implements name="java.io.Serializable">
+</implements>
+<method name="allOf"
+ return="java.util.EnumSet&lt;E&gt;"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="elementType" type="java.lang.Class&lt;E&gt;">
+</parameter>
+</method>
+<method name="clone"
+ return="java.util.EnumSet&lt;E&gt;"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="complementOf"
+ return="java.util.EnumSet&lt;E&gt;"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="s" type="java.util.EnumSet&lt;E&gt;">
+</parameter>
+</method>
+<method name="copyOf"
+ return="java.util.EnumSet&lt;E&gt;"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="s" type="java.util.EnumSet&lt;E&gt;">
+</parameter>
+</method>
+<method name="copyOf"
+ return="java.util.EnumSet&lt;E&gt;"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="c" type="java.util.Collection&lt;E&gt;">
+</parameter>
+</method>
+<method name="noneOf"
+ return="java.util.EnumSet&lt;E&gt;"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="elementType" type="java.lang.Class&lt;E&gt;">
+</parameter>
+</method>
+<method name="of"
+ return="java.util.EnumSet&lt;E&gt;"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="e" type="E">
+</parameter>
+</method>
+<method name="of"
+ return="java.util.EnumSet&lt;E&gt;"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="e1" type="E">
+</parameter>
+<parameter name="e2" type="E">
+</parameter>
+</method>
+<method name="of"
+ return="java.util.EnumSet&lt;E&gt;"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="e1" type="E">
+</parameter>
+<parameter name="e2" type="E">
+</parameter>
+<parameter name="e3" type="E">
+</parameter>
+</method>
+<method name="of"
+ return="java.util.EnumSet&lt;E&gt;"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="e1" type="E">
+</parameter>
+<parameter name="e2" type="E">
+</parameter>
+<parameter name="e3" type="E">
+</parameter>
+<parameter name="e4" type="E">
+</parameter>
+</method>
+<method name="of"
+ return="java.util.EnumSet&lt;E&gt;"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="e1" type="E">
+</parameter>
+<parameter name="e2" type="E">
+</parameter>
+<parameter name="e3" type="E">
+</parameter>
+<parameter name="e4" type="E">
+</parameter>
+<parameter name="e5" type="E">
+</parameter>
+</method>
+<method name="of"
+ return="java.util.EnumSet&lt;E&gt;"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="start" type="E">
+</parameter>
+<parameter name="others" type="E...">
+</parameter>
+</method>
+<method name="range"
+ return="java.util.EnumSet&lt;E&gt;"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="start" type="E">
+</parameter>
+<parameter name="end" type="E">
+</parameter>
+</method>
+</class>
+<interface name="Enumeration"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="hasMoreElements"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="nextElement"
+ return="E"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+</interface>
+<interface name="EventListener"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</interface>
+<class name="EventListenerProxy"
+ extends="java.lang.Object"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="java.util.EventListener">
+</implements>
+<constructor name="EventListenerProxy"
+ type="java.util.EventListenerProxy"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="listener" type="java.util.EventListener">
+</parameter>
+</constructor>
+<method name="getListener"
+ return="java.util.EventListener"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+</class>
+<class name="EventObject"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="java.io.Serializable">
+</implements>
+<constructor name="EventObject"
+ type="java.util.EventObject"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="source" type="java.lang.Object">
+</parameter>
+</constructor>
+<method name="getSource"
+ return="java.lang.Object"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<field name="source"
+ type="java.lang.Object"
+ transient="true"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</field>
+</class>
+<class name="FormatFlagsConversionMismatchException"
+ extends="java.util.IllegalFormatException"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="java.io.Serializable">
+</implements>
+<constructor name="FormatFlagsConversionMismatchException"
+ type="java.util.FormatFlagsConversionMismatchException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="f" type="java.lang.String">
+</parameter>
+<parameter name="c" type="char">
+</parameter>
+</constructor>
+<method name="getConversion"
+ return="char"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getFlags"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+</class>
+<interface name="Formattable"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="formatTo"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="formatter" type="java.util.Formatter">
+</parameter>
+<parameter name="flags" type="int">
+</parameter>
+<parameter name="width" type="int">
+</parameter>
+<parameter name="precision" type="int">
+</parameter>
+<exception name="IllegalFormatException" type="java.util.IllegalFormatException">
+</exception>
+</method>
+</interface>
+<class name="FormattableFlags"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<field name="ALTERNATE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="4"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="LEFT_JUSTIFY"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="UPPERCASE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<class name="Formatter"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="java.io.Closeable">
+</implements>
+<implements name="java.io.Flushable">
+</implements>
+<constructor name="Formatter"
+ type="java.util.Formatter"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<constructor name="Formatter"
+ type="java.util.Formatter"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="a" type="java.lang.Appendable">
+</parameter>
+</constructor>
+<constructor name="Formatter"
+ type="java.util.Formatter"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="l" type="java.util.Locale">
+</parameter>
+</constructor>
+<constructor name="Formatter"
+ type="java.util.Formatter"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="a" type="java.lang.Appendable">
+</parameter>
+<parameter name="l" type="java.util.Locale">
+</parameter>
+</constructor>
+<constructor name="Formatter"
+ type="java.util.Formatter"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="fileName" type="java.lang.String">
+</parameter>
+<exception name="FileNotFoundException" type="java.io.FileNotFoundException">
+</exception>
+</constructor>
+<constructor name="Formatter"
+ type="java.util.Formatter"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="fileName" type="java.lang.String">
+</parameter>
+<parameter name="csn" type="java.lang.String">
+</parameter>
+<exception name="FileNotFoundException" type="java.io.FileNotFoundException">
+</exception>
+<exception name="UnsupportedEncodingException" type="java.io.UnsupportedEncodingException">
+</exception>
+</constructor>
+<constructor name="Formatter"
+ type="java.util.Formatter"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="fileName" type="java.lang.String">
+</parameter>
+<parameter name="csn" type="java.lang.String">
+</parameter>
+<parameter name="l" type="java.util.Locale">
+</parameter>
+<exception name="FileNotFoundException" type="java.io.FileNotFoundException">
+</exception>
+<exception name="UnsupportedEncodingException" type="java.io.UnsupportedEncodingException">
+</exception>
+</constructor>
+<constructor name="Formatter"
+ type="java.util.Formatter"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="file" type="java.io.File">
+</parameter>
+<exception name="FileNotFoundException" type="java.io.FileNotFoundException">
+</exception>
+</constructor>
+<constructor name="Formatter"
+ type="java.util.Formatter"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="file" type="java.io.File">
+</parameter>
+<parameter name="csn" type="java.lang.String">
+</parameter>
+<exception name="FileNotFoundException" type="java.io.FileNotFoundException">
+</exception>
+<exception name="UnsupportedEncodingException" type="java.io.UnsupportedEncodingException">
+</exception>
+</constructor>
+<constructor name="Formatter"
+ type="java.util.Formatter"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="file" type="java.io.File">
+</parameter>
+<parameter name="csn" type="java.lang.String">
+</parameter>
+<parameter name="l" type="java.util.Locale">
+</parameter>
+<exception name="FileNotFoundException" type="java.io.FileNotFoundException">
+</exception>
+<exception name="UnsupportedEncodingException" type="java.io.UnsupportedEncodingException">
+</exception>
+</constructor>
+<constructor name="Formatter"
+ type="java.util.Formatter"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="os" type="java.io.OutputStream">
+</parameter>
+</constructor>
+<constructor name="Formatter"
+ type="java.util.Formatter"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="os" type="java.io.OutputStream">
+</parameter>
+<parameter name="csn" type="java.lang.String">
+</parameter>
+<exception name="UnsupportedEncodingException" type="java.io.UnsupportedEncodingException">
+</exception>
+</constructor>
+<constructor name="Formatter"
+ type="java.util.Formatter"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="os" type="java.io.OutputStream">
+</parameter>
+<parameter name="csn" type="java.lang.String">
+</parameter>
+<parameter name="l" type="java.util.Locale">
+</parameter>
+<exception name="UnsupportedEncodingException" type="java.io.UnsupportedEncodingException">
+</exception>
+</constructor>
+<constructor name="Formatter"
+ type="java.util.Formatter"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="ps" type="java.io.PrintStream">
+</parameter>
+</constructor>
+<method name="close"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="flush"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="format"
+ return="java.util.Formatter"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="format" type="java.lang.String">
+</parameter>
+<parameter name="args" type="java.lang.Object...">
+</parameter>
+</method>
+<method name="format"
+ return="java.util.Formatter"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="l" type="java.util.Locale">
+</parameter>
+<parameter name="format" type="java.lang.String">
+</parameter>
+<parameter name="args" type="java.lang.Object...">
+</parameter>
+</method>
+<method name="ioException"
+ return="java.io.IOException"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="locale"
+ return="java.util.Locale"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="out"
+ return="java.lang.Appendable"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+</class>
+<class name="Formatter.BigDecimalLayoutForm"
+ extends="java.lang.Enum"
+ abstract="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="valueOf"
+ return="java.util.Formatter.BigDecimalLayoutForm"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+</method>
+<method name="values"
+ return="java.util.Formatter.BigDecimalLayoutForm[]"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+</class>
+<class name="FormatterClosedException"
+ extends="java.lang.IllegalStateException"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="java.io.Serializable">
+</implements>
+<constructor name="FormatterClosedException"
+ type="java.util.FormatterClosedException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+</class>
+<class name="GregorianCalendar"
+ extends="java.util.Calendar"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="GregorianCalendar"
+ type="java.util.GregorianCalendar"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<constructor name="GregorianCalendar"
+ type="java.util.GregorianCalendar"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="year" type="int">
+</parameter>
+<parameter name="month" type="int">
+</parameter>
+<parameter name="day" type="int">
+</parameter>
+</constructor>
+<constructor name="GregorianCalendar"
+ type="java.util.GregorianCalendar"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="year" type="int">
+</parameter>
+<parameter name="month" type="int">
+</parameter>
+<parameter name="day" type="int">
+</parameter>
+<parameter name="hour" type="int">
+</parameter>
+<parameter name="minute" type="int">
+</parameter>
+</constructor>
+<constructor name="GregorianCalendar"
+ type="java.util.GregorianCalendar"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="year" type="int">
+</parameter>
+<parameter name="month" type="int">
+</parameter>
+<parameter name="day" type="int">
+</parameter>
+<parameter name="hour" type="int">
+</parameter>
+<parameter name="minute" type="int">
+</parameter>
+<parameter name="second" type="int">
+</parameter>
+</constructor>
+<constructor name="GregorianCalendar"
+ type="java.util.GregorianCalendar"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="locale" type="java.util.Locale">
+</parameter>
+</constructor>
+<constructor name="GregorianCalendar"
+ type="java.util.GregorianCalendar"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="timezone" type="java.util.TimeZone">
+</parameter>
+</constructor>
+<constructor name="GregorianCalendar"
+ type="java.util.GregorianCalendar"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="timezone" type="java.util.TimeZone">
+</parameter>
+<parameter name="locale" type="java.util.Locale">
+</parameter>
+</constructor>
+<method name="add"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="field" type="int">
+</parameter>
+<parameter name="value" type="int">
+</parameter>
+</method>
+<method name="computeFields"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</method>
+<method name="computeTime"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</method>
+<method name="getGreatestMinimum"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="field" type="int">
+</parameter>
+</method>
+<method name="getGregorianChange"
+ return="java.util.Date"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getLeastMaximum"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="field" type="int">
+</parameter>
+</method>
+<method name="getMaximum"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="field" type="int">
+</parameter>
+</method>
+<method name="getMinimum"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="field" type="int">
+</parameter>
+</method>
+<method name="isLeapYear"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="year" type="int">
+</parameter>
+</method>
+<method name="roll"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="field" type="int">
+</parameter>
+<parameter name="increment" type="boolean">
+</parameter>
+</method>
+<method name="setGregorianChange"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="date" type="java.util.Date">
+</parameter>
+</method>
+<field name="AD"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="BC"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="0"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<class name="HashMap"
+ extends="java.util.AbstractMap"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="java.lang.Cloneable">
+</implements>
+<implements name="java.io.Serializable">
+</implements>
+<constructor name="HashMap"
+ type="java.util.HashMap"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<constructor name="HashMap"
+ type="java.util.HashMap"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="capacity" type="int">
+</parameter>
+</constructor>
+<constructor name="HashMap"
+ type="java.util.HashMap"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="capacity" type="int">
+</parameter>
+<parameter name="loadFactor" type="float">
+</parameter>
+</constructor>
+<constructor name="HashMap"
+ type="java.util.HashMap"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="map" type="java.util.Map&lt;? extends K, ? extends V&gt;">
+</parameter>
+</constructor>
+<method name="clone"
+ return="java.lang.Object"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="entrySet"
+ return="java.util.Set&lt;java.util.Map.Entry&lt;K, V&gt;&gt;"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+</class>
+<class name="HashSet"
+ extends="java.util.AbstractSet"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="java.lang.Cloneable">
+</implements>
+<implements name="java.io.Serializable">
+</implements>
+<implements name="java.util.Set">
+</implements>
+<constructor name="HashSet"
+ type="java.util.HashSet"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<constructor name="HashSet"
+ type="java.util.HashSet"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="capacity" type="int">
+</parameter>
+</constructor>
+<constructor name="HashSet"
+ type="java.util.HashSet"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="capacity" type="int">
+</parameter>
+<parameter name="loadFactor" type="float">
+</parameter>
+</constructor>
+<constructor name="HashSet"
+ type="java.util.HashSet"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="collection" type="java.util.Collection&lt;? extends E&gt;">
+</parameter>
+</constructor>
+<method name="clone"
+ return="java.lang.Object"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="iterator"
+ return="java.util.Iterator&lt;E&gt;"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="size"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+</class>
+<class name="Hashtable"
+ extends="java.util.Dictionary"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="java.lang.Cloneable">
+</implements>
+<implements name="java.util.Map">
+</implements>
+<implements name="java.io.Serializable">
+</implements>
+<constructor name="Hashtable"
+ type="java.util.Hashtable"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<constructor name="Hashtable"
+ type="java.util.Hashtable"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="capacity" type="int">
+</parameter>
+</constructor>
+<constructor name="Hashtable"
+ type="java.util.Hashtable"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="capacity" type="int">
+</parameter>
+<parameter name="loadFactor" type="float">
+</parameter>
+</constructor>
+<constructor name="Hashtable"
+ type="java.util.Hashtable"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="map" type="java.util.Map&lt;? extends K, ? extends V&gt;">
+</parameter>
+</constructor>
+<method name="clear"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="clone"
+ return="java.lang.Object"
+ abstract="false"
+ native="false"
+ synchronized="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="contains"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="value" type="java.lang.Object">
+</parameter>
+</method>
+<method name="containsKey"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="key" type="java.lang.Object">
+</parameter>
+</method>
+<method name="containsValue"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="value" type="java.lang.Object">
+</parameter>
+</method>
+<method name="elements"
+ return="java.util.Enumeration&lt;V&gt;"
+ abstract="false"
+ native="false"
+ synchronized="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="entrySet"
+ return="java.util.Set&lt;java.util.Map.Entry&lt;K, V&gt;&gt;"
+ abstract="false"
+ native="false"
+ synchronized="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="get"
+ return="V"
+ abstract="false"
+ native="false"
+ synchronized="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="key" type="java.lang.Object">
+</parameter>
+</method>
+<method name="isEmpty"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="keySet"
+ return="java.util.Set&lt;K&gt;"
+ abstract="false"
+ native="false"
+ synchronized="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="keys"
+ return="java.util.Enumeration&lt;K&gt;"
+ abstract="false"
+ native="false"
+ synchronized="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="put"
+ return="V"
+ abstract="false"
+ native="false"
+ synchronized="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="key" type="K">
+</parameter>
+<parameter name="value" type="V">
+</parameter>
+</method>
+<method name="putAll"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="map" type="java.util.Map&lt;? extends K, ? extends V&gt;">
+</parameter>
+</method>
+<method name="rehash"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</method>
+<method name="remove"
+ return="V"
+ abstract="false"
+ native="false"
+ synchronized="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="key" type="java.lang.Object">
+</parameter>
+</method>
+<method name="size"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="values"
+ return="java.util.Collection&lt;V&gt;"
+ abstract="false"
+ native="false"
+ synchronized="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+</class>
+<class name="IdentityHashMap"
+ extends="java.util.AbstractMap"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="java.lang.Cloneable">
+</implements>
+<implements name="java.util.Map">
+</implements>
+<implements name="java.io.Serializable">
+</implements>
+<constructor name="IdentityHashMap"
+ type="java.util.IdentityHashMap"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<constructor name="IdentityHashMap"
+ type="java.util.IdentityHashMap"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="maxSize" type="int">
+</parameter>
+</constructor>
+<constructor name="IdentityHashMap"
+ type="java.util.IdentityHashMap"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="map" type="java.util.Map&lt;? extends K, ? extends V&gt;">
+</parameter>
+</constructor>
+<method name="clone"
+ return="java.lang.Object"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="entrySet"
+ return="java.util.Set&lt;java.util.Map.Entry&lt;K, V&gt;&gt;"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+</class>
+<class name="IllegalFormatCodePointException"
+ extends="java.util.IllegalFormatException"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="java.io.Serializable">
+</implements>
+<constructor name="IllegalFormatCodePointException"
+ type="java.util.IllegalFormatCodePointException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="c" type="int">
+</parameter>
+</constructor>
+<method name="getCodePoint"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+</class>
+<class name="IllegalFormatConversionException"
+ extends="java.util.IllegalFormatException"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="java.io.Serializable">
+</implements>
+<constructor name="IllegalFormatConversionException"
+ type="java.util.IllegalFormatConversionException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="c" type="char">
+</parameter>
+<parameter name="arg" type="java.lang.Class&lt;?&gt;">
+</parameter>
+</constructor>
+<method name="getArgumentClass"
+ return="java.lang.Class&lt;?&gt;"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getConversion"
+ return="char"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+</class>
+<class name="IllegalFormatException"
+ extends="java.lang.IllegalArgumentException"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="java.io.Serializable">
+</implements>
+</class>
+<class name="IllegalFormatFlagsException"
+ extends="java.util.IllegalFormatException"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="java.io.Serializable">
+</implements>
+<constructor name="IllegalFormatFlagsException"
+ type="java.util.IllegalFormatFlagsException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="f" type="java.lang.String">
+</parameter>
+</constructor>
+<method name="getFlags"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+</class>
+<class name="IllegalFormatPrecisionException"
+ extends="java.util.IllegalFormatException"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="IllegalFormatPrecisionException"
+ type="java.util.IllegalFormatPrecisionException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="p" type="int">
+</parameter>
+</constructor>
+<method name="getPrecision"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+</class>
+<class name="IllegalFormatWidthException"
+ extends="java.util.IllegalFormatException"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="IllegalFormatWidthException"
+ type="java.util.IllegalFormatWidthException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="w" type="int">
+</parameter>
+</constructor>
+<method name="getWidth"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+</class>
+<class name="InputMismatchException"
+ extends="java.util.NoSuchElementException"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="java.io.Serializable">
+</implements>
+<constructor name="InputMismatchException"
+ type="java.util.InputMismatchException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<constructor name="InputMismatchException"
+ type="java.util.InputMismatchException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="msg" type="java.lang.String">
+</parameter>
+</constructor>
+</class>
+<class name="InvalidPropertiesFormatException"
+ extends="java.io.IOException"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="InvalidPropertiesFormatException"
+ type="java.util.InvalidPropertiesFormatException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="m" type="java.lang.String">
+</parameter>
+</constructor>
+<constructor name="InvalidPropertiesFormatException"
+ type="java.util.InvalidPropertiesFormatException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="c" type="java.lang.Throwable">
+</parameter>
+</constructor>
+</class>
+<interface name="Iterator"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="hasNext"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="next"
+ return="E"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="remove"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+</interface>
+<class name="LinkedHashMap"
+ extends="java.util.HashMap"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="LinkedHashMap"
+ type="java.util.LinkedHashMap"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<constructor name="LinkedHashMap"
+ type="java.util.LinkedHashMap"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="initialCapacity" type="int">
+</parameter>
+</constructor>
+<constructor name="LinkedHashMap"
+ type="java.util.LinkedHashMap"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="initialCapacity" type="int">
+</parameter>
+<parameter name="loadFactor" type="float">
+</parameter>
+</constructor>
+<constructor name="LinkedHashMap"
+ type="java.util.LinkedHashMap"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="initialCapacity" type="int">
+</parameter>
+<parameter name="loadFactor" type="float">
+</parameter>
+<parameter name="accessOrder" type="boolean">
+</parameter>
+</constructor>
+<constructor name="LinkedHashMap"
+ type="java.util.LinkedHashMap"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="map" type="java.util.Map&lt;? extends K, ? extends V&gt;">
+</parameter>
+</constructor>
+<method name="removeEldestEntry"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="eldest" type="java.util.Map.Entry&lt;K, V&gt;">
+</parameter>
+</method>
+</class>
+<class name="LinkedHashSet"
+ extends="java.util.HashSet"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="java.lang.Cloneable">
+</implements>
+<implements name="java.io.Serializable">
+</implements>
+<implements name="java.util.Set">
+</implements>
+<constructor name="LinkedHashSet"
+ type="java.util.LinkedHashSet"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<constructor name="LinkedHashSet"
+ type="java.util.LinkedHashSet"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="capacity" type="int">
+</parameter>
+</constructor>
+<constructor name="LinkedHashSet"
+ type="java.util.LinkedHashSet"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="capacity" type="int">
+</parameter>
+<parameter name="loadFactor" type="float">
+</parameter>
+</constructor>
+<constructor name="LinkedHashSet"
+ type="java.util.LinkedHashSet"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="collection" type="java.util.Collection&lt;? extends E&gt;">
+</parameter>
+</constructor>
+</class>
+<class name="LinkedList"
+ extends="java.util.AbstractSequentialList"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="java.lang.Cloneable">
+</implements>
+<implements name="java.util.List">
+</implements>
+<implements name="java.util.Queue">
+</implements>
+<implements name="java.io.Serializable">
+</implements>
+<constructor name="LinkedList"
+ type="java.util.LinkedList"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<constructor name="LinkedList"
+ type="java.util.LinkedList"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="collection" type="java.util.Collection&lt;? extends E&gt;">
+</parameter>
+</constructor>
+<method name="addFirst"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="object" type="E">
+</parameter>
+</method>
+<method name="addLast"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="object" type="E">
+</parameter>
+</method>
+<method name="clone"
+ return="java.lang.Object"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="element"
+ return="E"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getFirst"
+ return="E"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getLast"
+ return="E"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="listIterator"
+ return="java.util.ListIterator&lt;E&gt;"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="location" type="int">
+</parameter>
+</method>
+<method name="offer"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="o" type="E">
+</parameter>
+</method>
+<method name="peek"
+ return="E"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="poll"
+ return="E"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="remove"
+ return="E"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="removeFirst"
+ return="E"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="removeLast"
+ return="E"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="size"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+</class>
+<interface name="List"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="java.util.Collection">
+</implements>
+<method name="add"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="location" type="int">
+</parameter>
+<parameter name="object" type="E">
+</parameter>
+</method>
+<method name="add"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="object" type="E">
+</parameter>
+</method>
+<method name="addAll"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="location" type="int">
+</parameter>
+<parameter name="collection" type="java.util.Collection&lt;? extends E&gt;">
+</parameter>
+</method>
+<method name="addAll"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="collection" type="java.util.Collection&lt;? extends E&gt;">
+</parameter>
+</method>
+<method name="clear"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="contains"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="object" type="java.lang.Object">
+</parameter>
+</method>
+<method name="containsAll"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="collection" type="java.util.Collection&lt;?&gt;">
+</parameter>
+</method>
+<method name="equals"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="object" type="java.lang.Object">
+</parameter>
+</method>
+<method name="get"
+ return="E"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="location" type="int">
+</parameter>
+</method>
+<method name="hashCode"
+ return="int"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="indexOf"
+ return="int"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="object" type="java.lang.Object">
+</parameter>
+</method>
+<method name="isEmpty"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="iterator"
+ return="java.util.Iterator&lt;E&gt;"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="lastIndexOf"
+ return="int"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="object" type="java.lang.Object">
+</parameter>
+</method>
+<method name="listIterator"
+ return="java.util.ListIterator&lt;E&gt;"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="listIterator"
+ return="java.util.ListIterator&lt;E&gt;"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="location" type="int">
+</parameter>
+</method>
+<method name="remove"
+ return="E"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="location" type="int">
+</parameter>
+</method>
+<method name="remove"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="object" type="java.lang.Object">
+</parameter>
+</method>
+<method name="removeAll"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="collection" type="java.util.Collection&lt;?&gt;">
+</parameter>
+</method>
+<method name="retainAll"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="collection" type="java.util.Collection&lt;?&gt;">
+</parameter>
+</method>
+<method name="set"
+ return="E"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="location" type="int">
+</parameter>
+<parameter name="object" type="E">
+</parameter>
+</method>
+<method name="size"
+ return="int"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="subList"
+ return="java.util.List&lt;E&gt;"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="start" type="int">
+</parameter>
+<parameter name="end" type="int">
+</parameter>
+</method>
+<method name="toArray"
+ return="java.lang.Object[]"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="toArray"
+ return="T[]"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="array" type="T[]">
+</parameter>
+</method>
+</interface>
+<interface name="ListIterator"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="java.util.Iterator">
+</implements>
+<method name="add"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="object" type="E">
+</parameter>
+</method>
+<method name="hasNext"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="hasPrevious"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="next"
+ return="E"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="nextIndex"
+ return="int"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="previous"
+ return="E"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="previousIndex"
+ return="int"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="remove"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="set"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="object" type="E">
+</parameter>
+</method>
+</interface>
+<class name="ListResourceBundle"
+ extends="java.util.ResourceBundle"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="ListResourceBundle"
+ type="java.util.ListResourceBundle"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<method name="getContents"
+ return="java.lang.Object[][]"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</method>
+<method name="getKeys"
+ return="java.util.Enumeration&lt;java.lang.String&gt;"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="handleGetObject"
+ return="java.lang.Object"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="key" type="java.lang.String">
+</parameter>
+</method>
+</class>
+<class name="Locale"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="java.lang.Cloneable">
+</implements>
+<implements name="java.io.Serializable">
+</implements>
+<constructor name="Locale"
+ type="java.util.Locale"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="language" type="java.lang.String">
+</parameter>
+</constructor>
+<constructor name="Locale"
+ type="java.util.Locale"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="language" type="java.lang.String">
+</parameter>
+<parameter name="country" type="java.lang.String">
+</parameter>
+</constructor>
+<constructor name="Locale"
+ type="java.util.Locale"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="language" type="java.lang.String">
+</parameter>
+<parameter name="country" type="java.lang.String">
+</parameter>
+<parameter name="variant" type="java.lang.String">
+</parameter>
+</constructor>
+<method name="clone"
+ return="java.lang.Object"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getAvailableLocales"
+ return="java.util.Locale[]"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getCountry"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getDefault"
+ return="java.util.Locale"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getDisplayCountry"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getDisplayCountry"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="locale" type="java.util.Locale">
+</parameter>
+</method>
+<method name="getDisplayLanguage"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getDisplayLanguage"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="locale" type="java.util.Locale">
+</parameter>
+</method>
+<method name="getDisplayName"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getDisplayName"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="locale" type="java.util.Locale">
+</parameter>
+</method>
+<method name="getDisplayVariant"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getDisplayVariant"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="locale" type="java.util.Locale">
+</parameter>
+</method>
+<method name="getISO3Country"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="MissingResourceException" type="java.util.MissingResourceException">
+</exception>
+</method>
+<method name="getISO3Language"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="MissingResourceException" type="java.util.MissingResourceException">
+</exception>
+</method>
+<method name="getISOCountries"
+ return="java.lang.String[]"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getISOLanguages"
+ return="java.lang.String[]"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getLanguage"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getVariant"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="setDefault"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="true"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="locale" type="java.util.Locale">
+</parameter>
+</method>
+<method name="toString"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<field name="CANADA"
+ type="java.util.Locale"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="CANADA_FRENCH"
+ type="java.util.Locale"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="CHINA"
+ type="java.util.Locale"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="CHINESE"
+ type="java.util.Locale"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ENGLISH"
+ type="java.util.Locale"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="FRANCE"
+ type="java.util.Locale"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="FRENCH"
+ type="java.util.Locale"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GERMAN"
+ type="java.util.Locale"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GERMANY"
+ type="java.util.Locale"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ITALIAN"
+ type="java.util.Locale"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ITALY"
+ type="java.util.Locale"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="JAPAN"
+ type="java.util.Locale"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="JAPANESE"
+ type="java.util.Locale"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="KOREA"
+ type="java.util.Locale"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="KOREAN"
+ type="java.util.Locale"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="PRC"
+ type="java.util.Locale"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="SIMPLIFIED_CHINESE"
+ type="java.util.Locale"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TAIWAN"
+ type="java.util.Locale"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TRADITIONAL_CHINESE"
+ type="java.util.Locale"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="UK"
+ type="java.util.Locale"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="US"
+ type="java.util.Locale"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<interface name="Map"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="clear"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="containsKey"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="key" type="java.lang.Object">
+</parameter>
+</method>
+<method name="containsValue"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="value" type="java.lang.Object">
+</parameter>
+</method>
+<method name="entrySet"
+ return="java.util.Set&lt;java.util.Map.Entry&lt;K, V&gt;&gt;"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="equals"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="object" type="java.lang.Object">
+</parameter>
+</method>
+<method name="get"
+ return="V"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="key" type="java.lang.Object">
+</parameter>
+</method>
+<method name="hashCode"
+ return="int"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isEmpty"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="keySet"
+ return="java.util.Set&lt;K&gt;"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="put"
+ return="V"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="key" type="K">
+</parameter>
+<parameter name="value" type="V">
+</parameter>
+</method>
+<method name="putAll"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="map" type="java.util.Map&lt;? extends K, ? extends V&gt;">
+</parameter>
+</method>
+<method name="remove"
+ return="V"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="key" type="java.lang.Object">
+</parameter>
+</method>
+<method name="size"
+ return="int"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="values"
+ return="java.util.Collection&lt;V&gt;"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+</interface>
+<interface name="Map.Entry"
+ abstract="true"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="equals"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="object" type="java.lang.Object">
+</parameter>
+</method>
+<method name="getKey"
+ return="K"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getValue"
+ return="V"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="hashCode"
+ return="int"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="setValue"
+ return="V"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="object" type="V">
+</parameter>
+</method>
+</interface>
+<class name="MissingFormatArgumentException"
+ extends="java.util.IllegalFormatException"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="MissingFormatArgumentException"
+ type="java.util.MissingFormatArgumentException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="s" type="java.lang.String">
+</parameter>
+</constructor>
+<method name="getFormatSpecifier"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+</class>
+<class name="MissingFormatWidthException"
+ extends="java.util.IllegalFormatException"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="MissingFormatWidthException"
+ type="java.util.MissingFormatWidthException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="s" type="java.lang.String">
+</parameter>
+</constructor>
+<method name="getFormatSpecifier"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+</class>
+<class name="MissingResourceException"
+ extends="java.lang.RuntimeException"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="MissingResourceException"
+ type="java.util.MissingResourceException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="detailMessage" type="java.lang.String">
+</parameter>
+<parameter name="className" type="java.lang.String">
+</parameter>
+<parameter name="resourceName" type="java.lang.String">
+</parameter>
+</constructor>
+<method name="getClassName"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getKey"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+</class>
+<class name="NoSuchElementException"
+ extends="java.lang.RuntimeException"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="NoSuchElementException"
+ type="java.util.NoSuchElementException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<constructor name="NoSuchElementException"
+ type="java.util.NoSuchElementException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="detailMessage" type="java.lang.String">
+</parameter>
+</constructor>
+</class>
+<class name="Observable"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="Observable"
+ type="java.util.Observable"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<method name="addObserver"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="observer" type="java.util.Observer">
+</parameter>
+</method>
+<method name="clearChanged"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</method>
+<method name="countObservers"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="deleteObserver"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="observer" type="java.util.Observer">
+</parameter>
+</method>
+<method name="deleteObservers"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="hasChanged"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="notifyObservers"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="notifyObservers"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="data" type="java.lang.Object">
+</parameter>
+</method>
+<method name="setChanged"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</method>
+</class>
+<interface name="Observer"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="update"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="observable" type="java.util.Observable">
+</parameter>
+<parameter name="data" type="java.lang.Object">
+</parameter>
+</method>
+</interface>
+<class name="PriorityQueue"
+ extends="java.util.AbstractQueue"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="java.io.Serializable">
+</implements>
+<constructor name="PriorityQueue"
+ type="java.util.PriorityQueue"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<constructor name="PriorityQueue"
+ type="java.util.PriorityQueue"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="initialCapacity" type="int">
+</parameter>
+</constructor>
+<constructor name="PriorityQueue"
+ type="java.util.PriorityQueue"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="initialCapacity" type="int">
+</parameter>
+<parameter name="comparator" type="java.util.Comparator&lt;? super E&gt;">
+</parameter>
+</constructor>
+<constructor name="PriorityQueue"
+ type="java.util.PriorityQueue"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="c" type="java.util.Collection&lt;? extends E&gt;">
+</parameter>
+</constructor>
+<constructor name="PriorityQueue"
+ type="java.util.PriorityQueue"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="c" type="java.util.PriorityQueue&lt;? extends E&gt;">
+</parameter>
+</constructor>
+<constructor name="PriorityQueue"
+ type="java.util.PriorityQueue"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="c" type="java.util.SortedSet&lt;? extends E&gt;">
+</parameter>
+</constructor>
+<method name="comparator"
+ return="java.util.Comparator&lt;? super E&gt;"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="iterator"
+ return="java.util.Iterator&lt;E&gt;"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="offer"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="o" type="E">
+</parameter>
+</method>
+<method name="peek"
+ return="E"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="poll"
+ return="E"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="size"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+</class>
+<class name="Properties"
+ extends="java.util.Hashtable"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="Properties"
+ type="java.util.Properties"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<constructor name="Properties"
+ type="java.util.Properties"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="properties" type="java.util.Properties">
+</parameter>
+</constructor>
+<method name="getProperty"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+</method>
+<method name="getProperty"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+<parameter name="defaultValue" type="java.lang.String">
+</parameter>
+</method>
+<method name="list"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="out" type="java.io.PrintStream">
+</parameter>
+</method>
+<method name="list"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="writer" type="java.io.PrintWriter">
+</parameter>
+</method>
+<method name="load"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="in" type="java.io.InputStream">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="loadFromXML"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="in" type="java.io.InputStream">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+<exception name="InvalidPropertiesFormatException" type="java.util.InvalidPropertiesFormatException">
+</exception>
+</method>
+<method name="propertyNames"
+ return="java.util.Enumeration&lt;?&gt;"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="save"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="deprecated"
+ visibility="public"
+>
+<parameter name="out" type="java.io.OutputStream">
+</parameter>
+<parameter name="comment" type="java.lang.String">
+</parameter>
+</method>
+<method name="setProperty"
+ return="java.lang.Object"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+<parameter name="value" type="java.lang.String">
+</parameter>
+</method>
+<method name="store"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="out" type="java.io.OutputStream">
+</parameter>
+<parameter name="comment" type="java.lang.String">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="storeToXML"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="os" type="java.io.OutputStream">
+</parameter>
+<parameter name="comment" type="java.lang.String">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="storeToXML"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="os" type="java.io.OutputStream">
+</parameter>
+<parameter name="comment" type="java.lang.String">
+</parameter>
+<parameter name="encoding" type="java.lang.String">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<field name="defaults"
+ type="java.util.Properties"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</field>
+</class>
+<class name="PropertyPermission"
+ extends="java.security.BasicPermission"
+ abstract="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="PropertyPermission"
+ type="java.util.PropertyPermission"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+<parameter name="actions" type="java.lang.String">
+</parameter>
+</constructor>
+</class>
+<class name="PropertyResourceBundle"
+ extends="java.util.ResourceBundle"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="PropertyResourceBundle"
+ type="java.util.PropertyResourceBundle"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="stream" type="java.io.InputStream">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</constructor>
+<method name="getKeys"
+ return="java.util.Enumeration&lt;java.lang.String&gt;"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="handleGetObject"
+ return="java.lang.Object"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="key" type="java.lang.String">
+</parameter>
+</method>
+</class>
+<interface name="Queue"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="java.util.Collection">
+</implements>
+<method name="element"
+ return="E"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="offer"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="o" type="E">
+</parameter>
+</method>
+<method name="peek"
+ return="E"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="poll"
+ return="E"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="remove"
+ return="E"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+</interface>
+<class name="Random"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="java.io.Serializable">
+</implements>
+<constructor name="Random"
+ type="java.util.Random"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<constructor name="Random"
+ type="java.util.Random"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="seed" type="long">
+</parameter>
+</constructor>
+<method name="next"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="bits" type="int">
+</parameter>
+</method>
+<method name="nextBoolean"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="nextBytes"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="buf" type="byte[]">
+</parameter>
+</method>
+<method name="nextDouble"
+ return="double"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="nextFloat"
+ return="float"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="nextGaussian"
+ return="double"
+ abstract="false"
+ native="false"
+ synchronized="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="nextInt"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="nextInt"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="n" type="int">
+</parameter>
+</method>
+<method name="nextLong"
+ return="long"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="setSeed"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="seed" type="long">
+</parameter>
+</method>
+</class>
+<interface name="RandomAccess"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</interface>
+<class name="ResourceBundle"
+ extends="java.lang.Object"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="ResourceBundle"
+ type="java.util.ResourceBundle"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<method name="getBundle"
+ return="java.util.ResourceBundle"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="bundleName" type="java.lang.String">
+</parameter>
+<exception name="MissingResourceException" type="java.util.MissingResourceException">
+</exception>
+</method>
+<method name="getBundle"
+ return="java.util.ResourceBundle"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="bundleName" type="java.lang.String">
+</parameter>
+<parameter name="locale" type="java.util.Locale">
+</parameter>
+</method>
+<method name="getBundle"
+ return="java.util.ResourceBundle"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="bundleName" type="java.lang.String">
+</parameter>
+<parameter name="locale" type="java.util.Locale">
+</parameter>
+<parameter name="loader" type="java.lang.ClassLoader">
+</parameter>
+<exception name="MissingResourceException" type="java.util.MissingResourceException">
+</exception>
+</method>
+<method name="getKeys"
+ return="java.util.Enumeration&lt;java.lang.String&gt;"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getLocale"
+ return="java.util.Locale"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getObject"
+ return="java.lang.Object"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="key" type="java.lang.String">
+</parameter>
+</method>
+<method name="getString"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="key" type="java.lang.String">
+</parameter>
+</method>
+<method name="getStringArray"
+ return="java.lang.String[]"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="key" type="java.lang.String">
+</parameter>
+</method>
+<method name="handleGetObject"
+ return="java.lang.Object"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="key" type="java.lang.String">
+</parameter>
+</method>
+<method name="setParent"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="bundle" type="java.util.ResourceBundle">
+</parameter>
+</method>
+<field name="parent"
+ type="java.util.ResourceBundle"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</field>
+</class>
+<class name="Scanner"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="java.util.Iterator">
+</implements>
+<constructor name="Scanner"
+ type="java.util.Scanner"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="src" type="java.io.File">
+</parameter>
+<exception name="FileNotFoundException" type="java.io.FileNotFoundException">
+</exception>
+</constructor>
+<constructor name="Scanner"
+ type="java.util.Scanner"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="src" type="java.io.File">
+</parameter>
+<parameter name="charsetName" type="java.lang.String">
+</parameter>
+<exception name="FileNotFoundException" type="java.io.FileNotFoundException">
+</exception>
+</constructor>
+<constructor name="Scanner"
+ type="java.util.Scanner"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="src" type="java.lang.String">
+</parameter>
+</constructor>
+<constructor name="Scanner"
+ type="java.util.Scanner"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="src" type="java.io.InputStream">
+</parameter>
+</constructor>
+<constructor name="Scanner"
+ type="java.util.Scanner"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="src" type="java.io.InputStream">
+</parameter>
+<parameter name="charsetName" type="java.lang.String">
+</parameter>
+</constructor>
+<constructor name="Scanner"
+ type="java.util.Scanner"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="src" type="java.lang.Readable">
+</parameter>
+</constructor>
+<constructor name="Scanner"
+ type="java.util.Scanner"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="src" type="java.nio.channels.ReadableByteChannel">
+</parameter>
+</constructor>
+<constructor name="Scanner"
+ type="java.util.Scanner"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="src" type="java.nio.channels.ReadableByteChannel">
+</parameter>
+<parameter name="charsetName" type="java.lang.String">
+</parameter>
+</constructor>
+<method name="close"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="delimiter"
+ return="java.util.regex.Pattern"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="findInLine"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="pattern" type="java.util.regex.Pattern">
+</parameter>
+</method>
+<method name="findInLine"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="pattern" type="java.lang.String">
+</parameter>
+</method>
+<method name="findWithinHorizon"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="pattern" type="java.util.regex.Pattern">
+</parameter>
+<parameter name="horizon" type="int">
+</parameter>
+</method>
+<method name="findWithinHorizon"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="pattern" type="java.lang.String">
+</parameter>
+<parameter name="horizon" type="int">
+</parameter>
+</method>
+<method name="hasNext"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="hasNext"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="pattern" type="java.util.regex.Pattern">
+</parameter>
+</method>
+<method name="hasNext"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="pattern" type="java.lang.String">
+</parameter>
+</method>
+<method name="hasNextBigDecimal"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="hasNextBigInteger"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="hasNextBigInteger"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="radix" type="int">
+</parameter>
+</method>
+<method name="hasNextBoolean"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="hasNextByte"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="hasNextByte"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="radix" type="int">
+</parameter>
+</method>
+<method name="hasNextDouble"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="hasNextFloat"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="hasNextInt"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="hasNextInt"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="radix" type="int">
+</parameter>
+</method>
+<method name="hasNextLine"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="hasNextLong"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="hasNextLong"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="radix" type="int">
+</parameter>
+</method>
+<method name="hasNextShort"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="hasNextShort"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="radix" type="int">
+</parameter>
+</method>
+<method name="ioException"
+ return="java.io.IOException"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="locale"
+ return="java.util.Locale"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="match"
+ return="java.util.regex.MatchResult"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="next"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="next"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="pattern" type="java.util.regex.Pattern">
+</parameter>
+</method>
+<method name="next"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="pattern" type="java.lang.String">
+</parameter>
+</method>
+<method name="nextBigDecimal"
+ return="java.math.BigDecimal"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="nextBigInteger"
+ return="java.math.BigInteger"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="nextBigInteger"
+ return="java.math.BigInteger"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="radix" type="int">
+</parameter>
+</method>
+<method name="nextBoolean"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="nextByte"
+ return="byte"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="nextByte"
+ return="byte"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="radix" type="int">
+</parameter>
+</method>
+<method name="nextDouble"
+ return="double"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="nextFloat"
+ return="float"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="nextInt"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="nextInt"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="radix" type="int">
+</parameter>
+</method>
+<method name="nextLine"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="nextLong"
+ return="long"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="nextLong"
+ return="long"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="radix" type="int">
+</parameter>
+</method>
+<method name="nextShort"
+ return="short"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="nextShort"
+ return="short"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="radix" type="int">
+</parameter>
+</method>
+<method name="radix"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="remove"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="skip"
+ return="java.util.Scanner"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="pattern" type="java.util.regex.Pattern">
+</parameter>
+</method>
+<method name="skip"
+ return="java.util.Scanner"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="pattern" type="java.lang.String">
+</parameter>
+</method>
+<method name="useDelimiter"
+ return="java.util.Scanner"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="pattern" type="java.util.regex.Pattern">
+</parameter>
+</method>
+<method name="useDelimiter"
+ return="java.util.Scanner"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="pattern" type="java.lang.String">
+</parameter>
+</method>
+<method name="useLocale"
+ return="java.util.Scanner"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="l" type="java.util.Locale">
+</parameter>
+</method>
+<method name="useRadix"
+ return="java.util.Scanner"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="radix" type="int">
+</parameter>
+</method>
+</class>
+<interface name="Set"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="java.util.Collection">
+</implements>
+<method name="add"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="object" type="E">
+</parameter>
+</method>
+<method name="addAll"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="collection" type="java.util.Collection&lt;? extends E&gt;">
+</parameter>
+</method>
+<method name="clear"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="contains"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="object" type="java.lang.Object">
+</parameter>
+</method>
+<method name="containsAll"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="collection" type="java.util.Collection&lt;?&gt;">
+</parameter>
+</method>
+<method name="equals"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="object" type="java.lang.Object">
+</parameter>
+</method>
+<method name="hashCode"
+ return="int"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isEmpty"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="iterator"
+ return="java.util.Iterator&lt;E&gt;"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="remove"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="object" type="java.lang.Object">
+</parameter>
+</method>
+<method name="removeAll"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="collection" type="java.util.Collection&lt;?&gt;">
+</parameter>
+</method>
+<method name="retainAll"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="collection" type="java.util.Collection&lt;?&gt;">
+</parameter>
+</method>
+<method name="size"
+ return="int"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="toArray"
+ return="java.lang.Object[]"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="toArray"
+ return="T[]"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="array" type="T[]">
+</parameter>
+</method>
+</interface>
+<class name="SimpleTimeZone"
+ extends="java.util.TimeZone"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="SimpleTimeZone"
+ type="java.util.SimpleTimeZone"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="offset" type="int">
+</parameter>
+<parameter name="name" type="java.lang.String">
+</parameter>
+</constructor>
+<constructor name="SimpleTimeZone"
+ type="java.util.SimpleTimeZone"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="offset" type="int">
+</parameter>
+<parameter name="name" type="java.lang.String">
+</parameter>
+<parameter name="startMonth" type="int">
+</parameter>
+<parameter name="startDay" type="int">
+</parameter>
+<parameter name="startDayOfWeek" type="int">
+</parameter>
+<parameter name="startTime" type="int">
+</parameter>
+<parameter name="endMonth" type="int">
+</parameter>
+<parameter name="endDay" type="int">
+</parameter>
+<parameter name="endDayOfWeek" type="int">
+</parameter>
+<parameter name="endTime" type="int">
+</parameter>
+</constructor>
+<constructor name="SimpleTimeZone"
+ type="java.util.SimpleTimeZone"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="offset" type="int">
+</parameter>
+<parameter name="name" type="java.lang.String">
+</parameter>
+<parameter name="startMonth" type="int">
+</parameter>
+<parameter name="startDay" type="int">
+</parameter>
+<parameter name="startDayOfWeek" type="int">
+</parameter>
+<parameter name="startTime" type="int">
+</parameter>
+<parameter name="endMonth" type="int">
+</parameter>
+<parameter name="endDay" type="int">
+</parameter>
+<parameter name="endDayOfWeek" type="int">
+</parameter>
+<parameter name="endTime" type="int">
+</parameter>
+<parameter name="daylightSavings" type="int">
+</parameter>
+</constructor>
+<constructor name="SimpleTimeZone"
+ type="java.util.SimpleTimeZone"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="offset" type="int">
+</parameter>
+<parameter name="name" type="java.lang.String">
+</parameter>
+<parameter name="startMonth" type="int">
+</parameter>
+<parameter name="startDay" type="int">
+</parameter>
+<parameter name="startDayOfWeek" type="int">
+</parameter>
+<parameter name="startTime" type="int">
+</parameter>
+<parameter name="startTimeMode" type="int">
+</parameter>
+<parameter name="endMonth" type="int">
+</parameter>
+<parameter name="endDay" type="int">
+</parameter>
+<parameter name="endDayOfWeek" type="int">
+</parameter>
+<parameter name="endTime" type="int">
+</parameter>
+<parameter name="endTimeMode" type="int">
+</parameter>
+<parameter name="daylightSavings" type="int">
+</parameter>
+</constructor>
+<method name="getOffset"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="era" type="int">
+</parameter>
+<parameter name="year" type="int">
+</parameter>
+<parameter name="month" type="int">
+</parameter>
+<parameter name="day" type="int">
+</parameter>
+<parameter name="dayOfWeek" type="int">
+</parameter>
+<parameter name="time" type="int">
+</parameter>
+</method>
+<method name="getRawOffset"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="inDaylightTime"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="time" type="java.util.Date">
+</parameter>
+</method>
+<method name="setDSTSavings"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="milliseconds" type="int">
+</parameter>
+</method>
+<method name="setEndRule"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="month" type="int">
+</parameter>
+<parameter name="dayOfMonth" type="int">
+</parameter>
+<parameter name="time" type="int">
+</parameter>
+</method>
+<method name="setEndRule"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="month" type="int">
+</parameter>
+<parameter name="day" type="int">
+</parameter>
+<parameter name="dayOfWeek" type="int">
+</parameter>
+<parameter name="time" type="int">
+</parameter>
+</method>
+<method name="setEndRule"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="month" type="int">
+</parameter>
+<parameter name="day" type="int">
+</parameter>
+<parameter name="dayOfWeek" type="int">
+</parameter>
+<parameter name="time" type="int">
+</parameter>
+<parameter name="after" type="boolean">
+</parameter>
+</method>
+<method name="setRawOffset"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="offset" type="int">
+</parameter>
+</method>
+<method name="setStartRule"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="month" type="int">
+</parameter>
+<parameter name="dayOfMonth" type="int">
+</parameter>
+<parameter name="time" type="int">
+</parameter>
+</method>
+<method name="setStartRule"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="month" type="int">
+</parameter>
+<parameter name="day" type="int">
+</parameter>
+<parameter name="dayOfWeek" type="int">
+</parameter>
+<parameter name="time" type="int">
+</parameter>
+</method>
+<method name="setStartRule"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="month" type="int">
+</parameter>
+<parameter name="day" type="int">
+</parameter>
+<parameter name="dayOfWeek" type="int">
+</parameter>
+<parameter name="time" type="int">
+</parameter>
+<parameter name="after" type="boolean">
+</parameter>
+</method>
+<method name="setStartYear"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="year" type="int">
+</parameter>
+</method>
+<method name="useDaylightTime"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<field name="STANDARD_TIME"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="UTC_TIME"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="WALL_TIME"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="0"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<interface name="SortedMap"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="java.util.Map">
+</implements>
+<method name="comparator"
+ return="java.util.Comparator&lt;? super K&gt;"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="firstKey"
+ return="K"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="headMap"
+ return="java.util.SortedMap&lt;K, V&gt;"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="endKey" type="K">
+</parameter>
+</method>
+<method name="lastKey"
+ return="K"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="subMap"
+ return="java.util.SortedMap&lt;K, V&gt;"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="startKey" type="K">
+</parameter>
+<parameter name="endKey" type="K">
+</parameter>
+</method>
+<method name="tailMap"
+ return="java.util.SortedMap&lt;K, V&gt;"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="startKey" type="K">
+</parameter>
+</method>
+</interface>
+<interface name="SortedSet"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="java.util.Set">
+</implements>
+<method name="comparator"
+ return="java.util.Comparator&lt;? super E&gt;"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="first"
+ return="E"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="headSet"
+ return="java.util.SortedSet&lt;E&gt;"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="end" type="E">
+</parameter>
+</method>
+<method name="last"
+ return="E"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="subSet"
+ return="java.util.SortedSet&lt;E&gt;"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="start" type="E">
+</parameter>
+<parameter name="end" type="E">
+</parameter>
+</method>
+<method name="tailSet"
+ return="java.util.SortedSet&lt;E&gt;"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="start" type="E">
+</parameter>
+</method>
+</interface>
+<class name="Stack"
+ extends="java.util.Vector"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="Stack"
+ type="java.util.Stack"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<method name="empty"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="peek"
+ return="E"
+ abstract="false"
+ native="false"
+ synchronized="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="pop"
+ return="E"
+ abstract="false"
+ native="false"
+ synchronized="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="push"
+ return="E"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="object" type="E">
+</parameter>
+</method>
+<method name="search"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="o" type="java.lang.Object">
+</parameter>
+</method>
+</class>
+<class name="StringTokenizer"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="java.util.Enumeration">
+</implements>
+<constructor name="StringTokenizer"
+ type="java.util.StringTokenizer"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="string" type="java.lang.String">
+</parameter>
+</constructor>
+<constructor name="StringTokenizer"
+ type="java.util.StringTokenizer"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="string" type="java.lang.String">
+</parameter>
+<parameter name="delimiters" type="java.lang.String">
+</parameter>
+</constructor>
+<constructor name="StringTokenizer"
+ type="java.util.StringTokenizer"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="string" type="java.lang.String">
+</parameter>
+<parameter name="delimiters" type="java.lang.String">
+</parameter>
+<parameter name="returnDelimiters" type="boolean">
+</parameter>
+</constructor>
+<method name="countTokens"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="hasMoreElements"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="hasMoreTokens"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="nextElement"
+ return="java.lang.Object"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="nextToken"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="nextToken"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="delims" type="java.lang.String">
+</parameter>
+</method>
+</class>
+<class name="TimeZone"
+ extends="java.lang.Object"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="java.lang.Cloneable">
+</implements>
+<implements name="java.io.Serializable">
+</implements>
+<constructor name="TimeZone"
+ type="java.util.TimeZone"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<method name="clone"
+ return="java.lang.Object"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getAvailableIDs"
+ return="java.lang.String[]"
+ abstract="false"
+ native="false"
+ synchronized="true"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getAvailableIDs"
+ return="java.lang.String[]"
+ abstract="false"
+ native="false"
+ synchronized="true"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="offset" type="int">
+</parameter>
+</method>
+<method name="getDSTSavings"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getDefault"
+ return="java.util.TimeZone"
+ abstract="false"
+ native="false"
+ synchronized="true"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getDisplayName"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getDisplayName"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="locale" type="java.util.Locale">
+</parameter>
+</method>
+<method name="getDisplayName"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="daylightTime" type="boolean">
+</parameter>
+<parameter name="style" type="int">
+</parameter>
+</method>
+<method name="getDisplayName"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="daylightTime" type="boolean">
+</parameter>
+<parameter name="style" type="int">
+</parameter>
+<parameter name="locale" type="java.util.Locale">
+</parameter>
+</method>
+<method name="getID"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getOffset"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="time" type="long">
+</parameter>
+</method>
+<method name="getOffset"
+ return="int"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="era" type="int">
+</parameter>
+<parameter name="year" type="int">
+</parameter>
+<parameter name="month" type="int">
+</parameter>
+<parameter name="day" type="int">
+</parameter>
+<parameter name="dayOfWeek" type="int">
+</parameter>
+<parameter name="time" type="int">
+</parameter>
+</method>
+<method name="getRawOffset"
+ return="int"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getTimeZone"
+ return="java.util.TimeZone"
+ abstract="false"
+ native="false"
+ synchronized="true"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+</method>
+<method name="hasSameRules"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="zone" type="java.util.TimeZone">
+</parameter>
+</method>
+<method name="inDaylightTime"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="time" type="java.util.Date">
+</parameter>
+</method>
+<method name="setDefault"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="true"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="timezone" type="java.util.TimeZone">
+</parameter>
+</method>
+<method name="setID"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+</method>
+<method name="setRawOffset"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="offset" type="int">
+</parameter>
+</method>
+<method name="useDaylightTime"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<field name="LONG"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="SHORT"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="0"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<class name="Timer"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="Timer"
+ type="java.util.Timer"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+<parameter name="isDaemon" type="boolean">
+</parameter>
+</constructor>
+<constructor name="Timer"
+ type="java.util.Timer"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+</constructor>
+<constructor name="Timer"
+ type="java.util.Timer"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="isDaemon" type="boolean">
+</parameter>
+</constructor>
+<constructor name="Timer"
+ type="java.util.Timer"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<method name="cancel"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="purge"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="schedule"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="task" type="java.util.TimerTask">
+</parameter>
+<parameter name="when" type="java.util.Date">
+</parameter>
+</method>
+<method name="schedule"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="task" type="java.util.TimerTask">
+</parameter>
+<parameter name="delay" type="long">
+</parameter>
+</method>
+<method name="schedule"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="task" type="java.util.TimerTask">
+</parameter>
+<parameter name="delay" type="long">
+</parameter>
+<parameter name="period" type="long">
+</parameter>
+</method>
+<method name="schedule"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="task" type="java.util.TimerTask">
+</parameter>
+<parameter name="when" type="java.util.Date">
+</parameter>
+<parameter name="period" type="long">
+</parameter>
+</method>
+<method name="scheduleAtFixedRate"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="task" type="java.util.TimerTask">
+</parameter>
+<parameter name="delay" type="long">
+</parameter>
+<parameter name="period" type="long">
+</parameter>
+</method>
+<method name="scheduleAtFixedRate"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="task" type="java.util.TimerTask">
+</parameter>
+<parameter name="when" type="java.util.Date">
+</parameter>
+<parameter name="period" type="long">
+</parameter>
+</method>
+</class>
+<class name="TimerTask"
+ extends="java.lang.Object"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="java.lang.Runnable">
+</implements>
+<constructor name="TimerTask"
+ type="java.util.TimerTask"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</constructor>
+<method name="cancel"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="run"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="scheduledExecutionTime"
+ return="long"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+</class>
+<class name="TooManyListenersException"
+ extends="java.lang.Exception"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="TooManyListenersException"
+ type="java.util.TooManyListenersException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<constructor name="TooManyListenersException"
+ type="java.util.TooManyListenersException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="detailMessage" type="java.lang.String">
+</parameter>
+</constructor>
+</class>
+<class name="TreeMap"
+ extends="java.util.AbstractMap"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="java.lang.Cloneable">
+</implements>
+<implements name="java.io.Serializable">
+</implements>
+<implements name="java.util.SortedMap">
+</implements>
+<constructor name="TreeMap"
+ type="java.util.TreeMap"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<constructor name="TreeMap"
+ type="java.util.TreeMap"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="comparator" type="java.util.Comparator&lt;? super K&gt;">
+</parameter>
+</constructor>
+<constructor name="TreeMap"
+ type="java.util.TreeMap"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="map" type="java.util.Map&lt;? extends K, ? extends V&gt;">
+</parameter>
+</constructor>
+<constructor name="TreeMap"
+ type="java.util.TreeMap"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="map" type="java.util.SortedMap&lt;K, ? extends V&gt;">
+</parameter>
+</constructor>
+<method name="clone"
+ return="java.lang.Object"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="comparator"
+ return="java.util.Comparator&lt;? super K&gt;"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="entrySet"
+ return="java.util.Set&lt;java.util.Map.Entry&lt;K, V&gt;&gt;"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="firstKey"
+ return="K"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="headMap"
+ return="java.util.SortedMap&lt;K, V&gt;"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="endKey" type="K">
+</parameter>
+</method>
+<method name="lastKey"
+ return="K"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="subMap"
+ return="java.util.SortedMap&lt;K, V&gt;"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="startKey" type="K">
+</parameter>
+<parameter name="endKey" type="K">
+</parameter>
+</method>
+<method name="tailMap"
+ return="java.util.SortedMap&lt;K, V&gt;"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="startKey" type="K">
+</parameter>
+</method>
+</class>
+<class name="TreeSet"
+ extends="java.util.AbstractSet"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="java.lang.Cloneable">
+</implements>
+<implements name="java.io.Serializable">
+</implements>
+<implements name="java.util.SortedSet">
+</implements>
+<constructor name="TreeSet"
+ type="java.util.TreeSet"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<constructor name="TreeSet"
+ type="java.util.TreeSet"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="collection" type="java.util.Collection&lt;? extends E&gt;">
+</parameter>
+</constructor>
+<constructor name="TreeSet"
+ type="java.util.TreeSet"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="comparator" type="java.util.Comparator&lt;? super E&gt;">
+</parameter>
+</constructor>
+<constructor name="TreeSet"
+ type="java.util.TreeSet"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="set" type="java.util.SortedSet&lt;E&gt;">
+</parameter>
+</constructor>
+<method name="clone"
+ return="java.lang.Object"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="comparator"
+ return="java.util.Comparator&lt;? super E&gt;"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="first"
+ return="E"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="headSet"
+ return="java.util.SortedSet&lt;E&gt;"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="end" type="E">
+</parameter>
+</method>
+<method name="iterator"
+ return="java.util.Iterator&lt;E&gt;"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="last"
+ return="E"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="size"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="subSet"
+ return="java.util.SortedSet&lt;E&gt;"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="start" type="E">
+</parameter>
+<parameter name="end" type="E">
+</parameter>
+</method>
+<method name="tailSet"
+ return="java.util.SortedSet&lt;E&gt;"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="start" type="E">
+</parameter>
+</method>
+</class>
+<class name="UUID"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="java.lang.Comparable">
+</implements>
+<implements name="java.io.Serializable">
+</implements>
+<constructor name="UUID"
+ type="java.util.UUID"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="mostSigBits" type="long">
+</parameter>
+<parameter name="leastSigBits" type="long">
+</parameter>
+</constructor>
+<method name="clockSequence"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="compareTo"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="uuid" type="java.util.UUID">
+</parameter>
+</method>
+<method name="fromString"
+ return="java.util.UUID"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="uuid" type="java.lang.String">
+</parameter>
+</method>
+<method name="getLeastSignificantBits"
+ return="long"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getMostSignificantBits"
+ return="long"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="nameUUIDFromBytes"
+ return="java.util.UUID"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="byte[]">
+</parameter>
+</method>
+<method name="node"
+ return="long"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="randomUUID"
+ return="java.util.UUID"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="timestamp"
+ return="long"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="variant"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="version"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+</class>
+<class name="UnknownFormatConversionException"
+ extends="java.util.IllegalFormatException"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="UnknownFormatConversionException"
+ type="java.util.UnknownFormatConversionException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="s" type="java.lang.String">
+</parameter>
+</constructor>
+<method name="getConversion"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+</class>
+<class name="UnknownFormatFlagsException"
+ extends="java.util.IllegalFormatException"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="UnknownFormatFlagsException"
+ type="java.util.UnknownFormatFlagsException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="f" type="java.lang.String">
+</parameter>
+</constructor>
+<method name="getFlags"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+</class>
+<class name="Vector"
+ extends="java.util.AbstractList"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="java.lang.Cloneable">
+</implements>
+<implements name="java.util.List">
+</implements>
+<implements name="java.util.RandomAccess">
+</implements>
+<implements name="java.io.Serializable">
+</implements>
+<constructor name="Vector"
+ type="java.util.Vector"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<constructor name="Vector"
+ type="java.util.Vector"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="capacity" type="int">
+</parameter>
+</constructor>
+<constructor name="Vector"
+ type="java.util.Vector"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="capacity" type="int">
+</parameter>
+<parameter name="capacityIncrement" type="int">
+</parameter>
+</constructor>
+<constructor name="Vector"
+ type="java.util.Vector"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="collection" type="java.util.Collection&lt;? extends E&gt;">
+</parameter>
+</constructor>
+<method name="addElement"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="object" type="E">
+</parameter>
+</method>
+<method name="capacity"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="clone"
+ return="java.lang.Object"
+ abstract="false"
+ native="false"
+ synchronized="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="copyInto"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="elements" type="java.lang.Object[]">
+</parameter>
+</method>
+<method name="elementAt"
+ return="E"
+ abstract="false"
+ native="false"
+ synchronized="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="location" type="int">
+</parameter>
+</method>
+<method name="elements"
+ return="java.util.Enumeration&lt;E&gt;"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="ensureCapacity"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="minimumCapacity" type="int">
+</parameter>
+</method>
+<method name="firstElement"
+ return="E"
+ abstract="false"
+ native="false"
+ synchronized="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="get"
+ return="E"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="location" type="int">
+</parameter>
+</method>
+<method name="indexOf"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="object" type="java.lang.Object">
+</parameter>
+<parameter name="location" type="int">
+</parameter>
+</method>
+<method name="insertElementAt"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="object" type="E">
+</parameter>
+<parameter name="location" type="int">
+</parameter>
+</method>
+<method name="lastElement"
+ return="E"
+ abstract="false"
+ native="false"
+ synchronized="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="lastIndexOf"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="object" type="java.lang.Object">
+</parameter>
+<parameter name="location" type="int">
+</parameter>
+</method>
+<method name="removeAllElements"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="removeElement"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="object" type="java.lang.Object">
+</parameter>
+</method>
+<method name="removeElementAt"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="location" type="int">
+</parameter>
+</method>
+<method name="setElementAt"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="object" type="E">
+</parameter>
+<parameter name="location" type="int">
+</parameter>
+</method>
+<method name="setSize"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="length" type="int">
+</parameter>
+</method>
+<method name="size"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="trimToSize"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<field name="capacityIncrement"
+ type="int"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</field>
+<field name="elementCount"
+ type="int"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</field>
+<field name="elementData"
+ type="java.lang.Object[]"
+ transient="false"
+ volatile="false"
+ value="null"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</field>
+</class>
+<class name="WeakHashMap"
+ extends="java.util.AbstractMap"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="java.util.Map">
+</implements>
+<constructor name="WeakHashMap"
+ type="java.util.WeakHashMap"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<constructor name="WeakHashMap"
+ type="java.util.WeakHashMap"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="capacity" type="int">
+</parameter>
+</constructor>
+<constructor name="WeakHashMap"
+ type="java.util.WeakHashMap"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="capacity" type="int">
+</parameter>
+<parameter name="loadFactor" type="float">
+</parameter>
+</constructor>
+<constructor name="WeakHashMap"
+ type="java.util.WeakHashMap"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="map" type="java.util.Map&lt;? extends K, ? extends V&gt;">
+</parameter>
+</constructor>
+<method name="entrySet"
+ return="java.util.Set&lt;java.util.Map.Entry&lt;K, V&gt;&gt;"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+</class>
+</package>
+<package name="java.util.concurrent"
+>
+<class name="AbstractExecutorService"
+ extends="java.lang.Object"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="java.util.concurrent.ExecutorService">
+</implements>
+<constructor name="AbstractExecutorService"
+ type="java.util.concurrent.AbstractExecutorService"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<method name="invokeAll"
+ return="java.util.List&lt;java.util.concurrent.Future&lt;T&gt;&gt;"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="tasks" type="java.util.Collection&lt;java.util.concurrent.Callable&lt;T&gt;&gt;">
+</parameter>
+<exception name="InterruptedException" type="java.lang.InterruptedException">
+</exception>
+</method>
+<method name="invokeAll"
+ return="java.util.List&lt;java.util.concurrent.Future&lt;T&gt;&gt;"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="tasks" type="java.util.Collection&lt;java.util.concurrent.Callable&lt;T&gt;&gt;">
+</parameter>
+<parameter name="timeout" type="long">
+</parameter>
+<parameter name="unit" type="java.util.concurrent.TimeUnit">
+</parameter>
+<exception name="InterruptedException" type="java.lang.InterruptedException">
+</exception>
+</method>
+<method name="invokeAny"
+ return="T"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="tasks" type="java.util.Collection&lt;java.util.concurrent.Callable&lt;T&gt;&gt;">
+</parameter>
+<exception name="ExecutionException" type="java.util.concurrent.ExecutionException">
+</exception>
+<exception name="InterruptedException" type="java.lang.InterruptedException">
+</exception>
+</method>
+<method name="invokeAny"
+ return="T"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="tasks" type="java.util.Collection&lt;java.util.concurrent.Callable&lt;T&gt;&gt;">
+</parameter>
+<parameter name="timeout" type="long">
+</parameter>
+<parameter name="unit" type="java.util.concurrent.TimeUnit">
+</parameter>
+<exception name="ExecutionException" type="java.util.concurrent.ExecutionException">
+</exception>
+<exception name="InterruptedException" type="java.lang.InterruptedException">
+</exception>
+<exception name="TimeoutException" type="java.util.concurrent.TimeoutException">
+</exception>
+</method>
+<method name="submit"
+ return="java.util.concurrent.Future&lt;?&gt;"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="task" type="java.lang.Runnable">
+</parameter>
+</method>
+<method name="submit"
+ return="java.util.concurrent.Future&lt;T&gt;"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="task" type="java.lang.Runnable">
+</parameter>
+<parameter name="result" type="T">
+</parameter>
+</method>
+<method name="submit"
+ return="java.util.concurrent.Future&lt;T&gt;"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="task" type="java.util.concurrent.Callable&lt;T&gt;">
+</parameter>
+</method>
+</class>
+<class name="ArrayBlockingQueue"
+ extends="java.util.AbstractQueue"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="java.util.concurrent.BlockingQueue">
+</implements>
+<implements name="java.io.Serializable">
+</implements>
+<constructor name="ArrayBlockingQueue"
+ type="java.util.concurrent.ArrayBlockingQueue"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="capacity" type="int">
+</parameter>
+</constructor>
+<constructor name="ArrayBlockingQueue"
+ type="java.util.concurrent.ArrayBlockingQueue"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="capacity" type="int">
+</parameter>
+<parameter name="fair" type="boolean">
+</parameter>
+</constructor>
+<constructor name="ArrayBlockingQueue"
+ type="java.util.concurrent.ArrayBlockingQueue"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="capacity" type="int">
+</parameter>
+<parameter name="fair" type="boolean">
+</parameter>
+<parameter name="c" type="java.util.Collection&lt;? extends E&gt;">
+</parameter>
+</constructor>
+<method name="drainTo"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="c" type="java.util.Collection&lt;? super E&gt;">
+</parameter>
+</method>
+<method name="drainTo"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="c" type="java.util.Collection&lt;? super E&gt;">
+</parameter>
+<parameter name="maxElements" type="int">
+</parameter>
+</method>
+<method name="iterator"
+ return="java.util.Iterator&lt;E&gt;"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="offer"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="e" type="E">
+</parameter>
+</method>
+<method name="offer"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="e" type="E">
+</parameter>
+<parameter name="timeout" type="long">
+</parameter>
+<parameter name="unit" type="java.util.concurrent.TimeUnit">
+</parameter>
+<exception name="InterruptedException" type="java.lang.InterruptedException">
+</exception>
+</method>
+<method name="peek"
+ return="E"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="poll"
+ return="E"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="poll"
+ return="E"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="timeout" type="long">
+</parameter>
+<parameter name="unit" type="java.util.concurrent.TimeUnit">
+</parameter>
+<exception name="InterruptedException" type="java.lang.InterruptedException">
+</exception>
+</method>
+<method name="put"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="e" type="E">
+</parameter>
+<exception name="InterruptedException" type="java.lang.InterruptedException">
+</exception>
+</method>
+<method name="remainingCapacity"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="size"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="take"
+ return="E"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="InterruptedException" type="java.lang.InterruptedException">
+</exception>
+</method>
+</class>
+<interface name="BlockingQueue"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="java.util.Queue">
+</implements>
+<method name="add"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="e" type="E">
+</parameter>
+</method>
+<method name="contains"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="o" type="java.lang.Object">
+</parameter>
+</method>
+<method name="drainTo"
+ return="int"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="c" type="java.util.Collection&lt;? super E&gt;">
+</parameter>
+</method>
+<method name="drainTo"
+ return="int"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="c" type="java.util.Collection&lt;? super E&gt;">
+</parameter>
+<parameter name="maxElements" type="int">
+</parameter>
+</method>
+<method name="offer"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="e" type="E">
+</parameter>
+</method>
+<method name="offer"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="e" type="E">
+</parameter>
+<parameter name="timeout" type="long">
+</parameter>
+<parameter name="unit" type="java.util.concurrent.TimeUnit">
+</parameter>
+<exception name="InterruptedException" type="java.lang.InterruptedException">
+</exception>
+</method>
+<method name="poll"
+ return="E"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="timeout" type="long">
+</parameter>
+<parameter name="unit" type="java.util.concurrent.TimeUnit">
+</parameter>
+<exception name="InterruptedException" type="java.lang.InterruptedException">
+</exception>
+</method>
+<method name="put"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="e" type="E">
+</parameter>
+<exception name="InterruptedException" type="java.lang.InterruptedException">
+</exception>
+</method>
+<method name="remainingCapacity"
+ return="int"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="remove"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="o" type="java.lang.Object">
+</parameter>
+</method>
+<method name="take"
+ return="E"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="InterruptedException" type="java.lang.InterruptedException">
+</exception>
+</method>
+</interface>
+<class name="BrokenBarrierException"
+ extends="java.lang.Exception"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="BrokenBarrierException"
+ type="java.util.concurrent.BrokenBarrierException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<constructor name="BrokenBarrierException"
+ type="java.util.concurrent.BrokenBarrierException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="message" type="java.lang.String">
+</parameter>
+</constructor>
+</class>
+<interface name="Callable"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="call"
+ return="V"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="Exception" type="java.lang.Exception">
+</exception>
+</method>
+</interface>
+<class name="CancellationException"
+ extends="java.lang.IllegalStateException"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="CancellationException"
+ type="java.util.concurrent.CancellationException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<constructor name="CancellationException"
+ type="java.util.concurrent.CancellationException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="message" type="java.lang.String">
+</parameter>
+</constructor>
+</class>
+<interface name="CompletionService"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="poll"
+ return="java.util.concurrent.Future&lt;V&gt;"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="poll"
+ return="java.util.concurrent.Future&lt;V&gt;"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="timeout" type="long">
+</parameter>
+<parameter name="unit" type="java.util.concurrent.TimeUnit">
+</parameter>
+<exception name="InterruptedException" type="java.lang.InterruptedException">
+</exception>
+</method>
+<method name="submit"
+ return="java.util.concurrent.Future&lt;V&gt;"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="task" type="java.util.concurrent.Callable&lt;V&gt;">
+</parameter>
+</method>
+<method name="submit"
+ return="java.util.concurrent.Future&lt;V&gt;"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="task" type="java.lang.Runnable">
+</parameter>
+<parameter name="result" type="V">
+</parameter>
+</method>
+<method name="take"
+ return="java.util.concurrent.Future&lt;V&gt;"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="InterruptedException" type="java.lang.InterruptedException">
+</exception>
+</method>
+</interface>
+<class name="ConcurrentHashMap"
+ extends="java.util.AbstractMap"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="java.util.concurrent.ConcurrentMap">
+</implements>
+<implements name="java.io.Serializable">
+</implements>
+<constructor name="ConcurrentHashMap"
+ type="java.util.concurrent.ConcurrentHashMap"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="initialCapacity" type="int">
+</parameter>
+<parameter name="loadFactor" type="float">
+</parameter>
+<parameter name="concurrencyLevel" type="int">
+</parameter>
+</constructor>
+<constructor name="ConcurrentHashMap"
+ type="java.util.concurrent.ConcurrentHashMap"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="initialCapacity" type="int">
+</parameter>
+</constructor>
+<constructor name="ConcurrentHashMap"
+ type="java.util.concurrent.ConcurrentHashMap"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<constructor name="ConcurrentHashMap"
+ type="java.util.concurrent.ConcurrentHashMap"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="m" type="java.util.Map&lt;? extends K, ? extends V&gt;">
+</parameter>
+</constructor>
+<method name="contains"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="value" type="java.lang.Object">
+</parameter>
+</method>
+<method name="elements"
+ return="java.util.Enumeration&lt;V&gt;"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="entrySet"
+ return="java.util.Set&lt;java.util.Map.Entry&lt;K, V&gt;&gt;"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="keys"
+ return="java.util.Enumeration&lt;K&gt;"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="putIfAbsent"
+ return="V"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="key" type="K">
+</parameter>
+<parameter name="value" type="V">
+</parameter>
+</method>
+<method name="remove"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="key" type="java.lang.Object">
+</parameter>
+<parameter name="value" type="java.lang.Object">
+</parameter>
+</method>
+<method name="replace"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="key" type="K">
+</parameter>
+<parameter name="oldValue" type="V">
+</parameter>
+<parameter name="newValue" type="V">
+</parameter>
+</method>
+<method name="replace"
+ return="V"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="key" type="K">
+</parameter>
+<parameter name="value" type="V">
+</parameter>
+</method>
+</class>
+<class name="ConcurrentLinkedQueue"
+ extends="java.util.AbstractQueue"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="java.util.Queue">
+</implements>
+<implements name="java.io.Serializable">
+</implements>
+<constructor name="ConcurrentLinkedQueue"
+ type="java.util.concurrent.ConcurrentLinkedQueue"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<constructor name="ConcurrentLinkedQueue"
+ type="java.util.concurrent.ConcurrentLinkedQueue"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="c" type="java.util.Collection&lt;? extends E&gt;">
+</parameter>
+</constructor>
+<method name="iterator"
+ return="java.util.Iterator&lt;E&gt;"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="offer"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="e" type="E">
+</parameter>
+</method>
+<method name="peek"
+ return="E"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="poll"
+ return="E"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="size"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+</class>
+<interface name="ConcurrentMap"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="java.util.Map">
+</implements>
+<method name="putIfAbsent"
+ return="V"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="key" type="K">
+</parameter>
+<parameter name="value" type="V">
+</parameter>
+</method>
+<method name="remove"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="key" type="java.lang.Object">
+</parameter>
+<parameter name="value" type="java.lang.Object">
+</parameter>
+</method>
+<method name="replace"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="key" type="K">
+</parameter>
+<parameter name="oldValue" type="V">
+</parameter>
+<parameter name="newValue" type="V">
+</parameter>
+</method>
+<method name="replace"
+ return="V"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="key" type="K">
+</parameter>
+<parameter name="value" type="V">
+</parameter>
+</method>
+</interface>
+<class name="CopyOnWriteArrayList"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="java.lang.Cloneable">
+</implements>
+<implements name="java.util.List">
+</implements>
+<implements name="java.util.RandomAccess">
+</implements>
+<implements name="java.io.Serializable">
+</implements>
+<constructor name="CopyOnWriteArrayList"
+ type="java.util.concurrent.CopyOnWriteArrayList"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<constructor name="CopyOnWriteArrayList"
+ type="java.util.concurrent.CopyOnWriteArrayList"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="c" type="java.util.Collection&lt;? extends E&gt;">
+</parameter>
+</constructor>
+<constructor name="CopyOnWriteArrayList"
+ type="java.util.concurrent.CopyOnWriteArrayList"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="toCopyIn" type="E[]">
+</parameter>
+</constructor>
+<method name="add"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="e" type="E">
+</parameter>
+</method>
+<method name="add"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="index" type="int">
+</parameter>
+<parameter name="element" type="E">
+</parameter>
+</method>
+<method name="addAll"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="c" type="java.util.Collection&lt;? extends E&gt;">
+</parameter>
+</method>
+<method name="addAll"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="index" type="int">
+</parameter>
+<parameter name="c" type="java.util.Collection&lt;? extends E&gt;">
+</parameter>
+</method>
+<method name="addAllAbsent"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="c" type="java.util.Collection&lt;? extends E&gt;">
+</parameter>
+</method>
+<method name="addIfAbsent"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="e" type="E">
+</parameter>
+</method>
+<method name="clear"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="clone"
+ return="java.lang.Object"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="contains"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="o" type="java.lang.Object">
+</parameter>
+</method>
+<method name="containsAll"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="c" type="java.util.Collection&lt;?&gt;">
+</parameter>
+</method>
+<method name="get"
+ return="E"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="index" type="int">
+</parameter>
+</method>
+<method name="indexOf"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="o" type="java.lang.Object">
+</parameter>
+</method>
+<method name="indexOf"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="e" type="E">
+</parameter>
+<parameter name="index" type="int">
+</parameter>
+</method>
+<method name="isEmpty"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="iterator"
+ return="java.util.Iterator&lt;E&gt;"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="lastIndexOf"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="o" type="java.lang.Object">
+</parameter>
+</method>
+<method name="lastIndexOf"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="e" type="E">
+</parameter>
+<parameter name="index" type="int">
+</parameter>
+</method>
+<method name="listIterator"
+ return="java.util.ListIterator&lt;E&gt;"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="listIterator"
+ return="java.util.ListIterator&lt;E&gt;"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="index" type="int">
+</parameter>
+</method>
+<method name="remove"
+ return="E"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="index" type="int">
+</parameter>
+</method>
+<method name="remove"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="o" type="java.lang.Object">
+</parameter>
+</method>
+<method name="removeAll"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="c" type="java.util.Collection&lt;?&gt;">
+</parameter>
+</method>
+<method name="retainAll"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="c" type="java.util.Collection&lt;?&gt;">
+</parameter>
+</method>
+<method name="set"
+ return="E"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="index" type="int">
+</parameter>
+<parameter name="element" type="E">
+</parameter>
+</method>
+<method name="size"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="subList"
+ return="java.util.List&lt;E&gt;"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="fromIndex" type="int">
+</parameter>
+<parameter name="toIndex" type="int">
+</parameter>
+</method>
+<method name="toArray"
+ return="java.lang.Object[]"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="toArray"
+ return="T[]"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="a" type="T[]">
+</parameter>
+</method>
+</class>
+<class name="CopyOnWriteArraySet"
+ extends="java.util.AbstractSet"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="java.io.Serializable">
+</implements>
+<constructor name="CopyOnWriteArraySet"
+ type="java.util.concurrent.CopyOnWriteArraySet"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<constructor name="CopyOnWriteArraySet"
+ type="java.util.concurrent.CopyOnWriteArraySet"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="c" type="java.util.Collection&lt;? extends E&gt;">
+</parameter>
+</constructor>
+<method name="iterator"
+ return="java.util.Iterator&lt;E&gt;"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="size"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+</class>
+<class name="CountDownLatch"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="CountDownLatch"
+ type="java.util.concurrent.CountDownLatch"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="count" type="int">
+</parameter>
+</constructor>
+<method name="await"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="InterruptedException" type="java.lang.InterruptedException">
+</exception>
+</method>
+<method name="await"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="timeout" type="long">
+</parameter>
+<parameter name="unit" type="java.util.concurrent.TimeUnit">
+</parameter>
+<exception name="InterruptedException" type="java.lang.InterruptedException">
+</exception>
+</method>
+<method name="countDown"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getCount"
+ return="long"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+</class>
+<class name="CyclicBarrier"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="CyclicBarrier"
+ type="java.util.concurrent.CyclicBarrier"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="parties" type="int">
+</parameter>
+<parameter name="barrierAction" type="java.lang.Runnable">
+</parameter>
+</constructor>
+<constructor name="CyclicBarrier"
+ type="java.util.concurrent.CyclicBarrier"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="parties" type="int">
+</parameter>
+</constructor>
+<method name="await"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="BrokenBarrierException" type="java.util.concurrent.BrokenBarrierException">
+</exception>
+<exception name="InterruptedException" type="java.lang.InterruptedException">
+</exception>
+</method>
+<method name="await"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="timeout" type="long">
+</parameter>
+<parameter name="unit" type="java.util.concurrent.TimeUnit">
+</parameter>
+<exception name="BrokenBarrierException" type="java.util.concurrent.BrokenBarrierException">
+</exception>
+<exception name="InterruptedException" type="java.lang.InterruptedException">
+</exception>
+<exception name="TimeoutException" type="java.util.concurrent.TimeoutException">
+</exception>
+</method>
+<method name="getNumberWaiting"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getParties"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isBroken"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="reset"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+</class>
+<class name="DelayQueue"
+ extends="java.util.AbstractQueue"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="java.util.concurrent.BlockingQueue">
+</implements>
+<constructor name="DelayQueue"
+ type="java.util.concurrent.DelayQueue"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<constructor name="DelayQueue"
+ type="java.util.concurrent.DelayQueue"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="c" type="java.util.Collection&lt;? extends E&gt;">
+</parameter>
+</constructor>
+<method name="drainTo"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="c" type="java.util.Collection&lt;? super E&gt;">
+</parameter>
+</method>
+<method name="drainTo"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="c" type="java.util.Collection&lt;? super E&gt;">
+</parameter>
+<parameter name="maxElements" type="int">
+</parameter>
+</method>
+<method name="iterator"
+ return="java.util.Iterator&lt;E&gt;"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="offer"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="e" type="E">
+</parameter>
+</method>
+<method name="offer"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="e" type="E">
+</parameter>
+<parameter name="timeout" type="long">
+</parameter>
+<parameter name="unit" type="java.util.concurrent.TimeUnit">
+</parameter>
+</method>
+<method name="peek"
+ return="E"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="poll"
+ return="E"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="poll"
+ return="E"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="timeout" type="long">
+</parameter>
+<parameter name="unit" type="java.util.concurrent.TimeUnit">
+</parameter>
+<exception name="InterruptedException" type="java.lang.InterruptedException">
+</exception>
+</method>
+<method name="put"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="e" type="E">
+</parameter>
+</method>
+<method name="remainingCapacity"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="size"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="take"
+ return="E"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="InterruptedException" type="java.lang.InterruptedException">
+</exception>
+</method>
+</class>
+<interface name="Delayed"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="java.lang.Comparable">
+</implements>
+<method name="getDelay"
+ return="long"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="unit" type="java.util.concurrent.TimeUnit">
+</parameter>
+</method>
+</interface>
+<class name="Exchanger"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="Exchanger"
+ type="java.util.concurrent.Exchanger"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<method name="exchange"
+ return="V"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="x" type="V">
+</parameter>
+<exception name="InterruptedException" type="java.lang.InterruptedException">
+</exception>
+</method>
+<method name="exchange"
+ return="V"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="x" type="V">
+</parameter>
+<parameter name="timeout" type="long">
+</parameter>
+<parameter name="unit" type="java.util.concurrent.TimeUnit">
+</parameter>
+<exception name="InterruptedException" type="java.lang.InterruptedException">
+</exception>
+<exception name="TimeoutException" type="java.util.concurrent.TimeoutException">
+</exception>
+</method>
+</class>
+<class name="ExecutionException"
+ extends="java.lang.Exception"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="ExecutionException"
+ type="java.util.concurrent.ExecutionException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</constructor>
+<constructor name="ExecutionException"
+ type="java.util.concurrent.ExecutionException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="message" type="java.lang.String">
+</parameter>
+</constructor>
+<constructor name="ExecutionException"
+ type="java.util.concurrent.ExecutionException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="message" type="java.lang.String">
+</parameter>
+<parameter name="cause" type="java.lang.Throwable">
+</parameter>
+</constructor>
+<constructor name="ExecutionException"
+ type="java.util.concurrent.ExecutionException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="cause" type="java.lang.Throwable">
+</parameter>
+</constructor>
+</class>
+<interface name="Executor"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="execute"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="command" type="java.lang.Runnable">
+</parameter>
+</method>
+</interface>
+<class name="ExecutorCompletionService"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="java.util.concurrent.CompletionService">
+</implements>
+<constructor name="ExecutorCompletionService"
+ type="java.util.concurrent.ExecutorCompletionService"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="executor" type="java.util.concurrent.Executor">
+</parameter>
+</constructor>
+<constructor name="ExecutorCompletionService"
+ type="java.util.concurrent.ExecutorCompletionService"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="executor" type="java.util.concurrent.Executor">
+</parameter>
+<parameter name="completionQueue" type="java.util.concurrent.BlockingQueue&lt;java.util.concurrent.Future&lt;V&gt;&gt;">
+</parameter>
+</constructor>
+<method name="poll"
+ return="java.util.concurrent.Future&lt;V&gt;"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="poll"
+ return="java.util.concurrent.Future&lt;V&gt;"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="timeout" type="long">
+</parameter>
+<parameter name="unit" type="java.util.concurrent.TimeUnit">
+</parameter>
+<exception name="InterruptedException" type="java.lang.InterruptedException">
+</exception>
+</method>
+<method name="submit"
+ return="java.util.concurrent.Future&lt;V&gt;"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="task" type="java.util.concurrent.Callable&lt;V&gt;">
+</parameter>
+</method>
+<method name="submit"
+ return="java.util.concurrent.Future&lt;V&gt;"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="task" type="java.lang.Runnable">
+</parameter>
+<parameter name="result" type="V">
+</parameter>
+</method>
+<method name="take"
+ return="java.util.concurrent.Future&lt;V&gt;"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="InterruptedException" type="java.lang.InterruptedException">
+</exception>
+</method>
+</class>
+<interface name="ExecutorService"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="java.util.concurrent.Executor">
+</implements>
+<method name="awaitTermination"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="timeout" type="long">
+</parameter>
+<parameter name="unit" type="java.util.concurrent.TimeUnit">
+</parameter>
+<exception name="InterruptedException" type="java.lang.InterruptedException">
+</exception>
+</method>
+<method name="invokeAll"
+ return="java.util.List&lt;java.util.concurrent.Future&lt;T&gt;&gt;"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="tasks" type="java.util.Collection&lt;java.util.concurrent.Callable&lt;T&gt;&gt;">
+</parameter>
+<exception name="InterruptedException" type="java.lang.InterruptedException">
+</exception>
+</method>
+<method name="invokeAll"
+ return="java.util.List&lt;java.util.concurrent.Future&lt;T&gt;&gt;"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="tasks" type="java.util.Collection&lt;java.util.concurrent.Callable&lt;T&gt;&gt;">
+</parameter>
+<parameter name="timeout" type="long">
+</parameter>
+<parameter name="unit" type="java.util.concurrent.TimeUnit">
+</parameter>
+<exception name="InterruptedException" type="java.lang.InterruptedException">
+</exception>
+</method>
+<method name="invokeAny"
+ return="T"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="tasks" type="java.util.Collection&lt;java.util.concurrent.Callable&lt;T&gt;&gt;">
+</parameter>
+<exception name="ExecutionException" type="java.util.concurrent.ExecutionException">
+</exception>
+<exception name="InterruptedException" type="java.lang.InterruptedException">
+</exception>
+</method>
+<method name="invokeAny"
+ return="T"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="tasks" type="java.util.Collection&lt;java.util.concurrent.Callable&lt;T&gt;&gt;">
+</parameter>
+<parameter name="timeout" type="long">
+</parameter>
+<parameter name="unit" type="java.util.concurrent.TimeUnit">
+</parameter>
+<exception name="ExecutionException" type="java.util.concurrent.ExecutionException">
+</exception>
+<exception name="InterruptedException" type="java.lang.InterruptedException">
+</exception>
+<exception name="TimeoutException" type="java.util.concurrent.TimeoutException">
+</exception>
+</method>
+<method name="isShutdown"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isTerminated"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="shutdown"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="shutdownNow"
+ return="java.util.List&lt;java.lang.Runnable&gt;"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="submit"
+ return="java.util.concurrent.Future&lt;T&gt;"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="task" type="java.util.concurrent.Callable&lt;T&gt;">
+</parameter>
+</method>
+<method name="submit"
+ return="java.util.concurrent.Future&lt;T&gt;"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="task" type="java.lang.Runnable">
+</parameter>
+<parameter name="result" type="T">
+</parameter>
+</method>
+<method name="submit"
+ return="java.util.concurrent.Future&lt;?&gt;"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="task" type="java.lang.Runnable">
+</parameter>
+</method>
+</interface>
+<class name="Executors"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="callable"
+ return="java.util.concurrent.Callable&lt;T&gt;"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="task" type="java.lang.Runnable">
+</parameter>
+<parameter name="result" type="T">
+</parameter>
+</method>
+<method name="callable"
+ return="java.util.concurrent.Callable&lt;java.lang.Object&gt;"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="task" type="java.lang.Runnable">
+</parameter>
+</method>
+<method name="callable"
+ return="java.util.concurrent.Callable&lt;java.lang.Object&gt;"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="action" type="java.security.PrivilegedAction">
+</parameter>
+</method>
+<method name="callable"
+ return="java.util.concurrent.Callable&lt;java.lang.Object&gt;"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="action" type="java.security.PrivilegedExceptionAction">
+</parameter>
+</method>
+<method name="defaultThreadFactory"
+ return="java.util.concurrent.ThreadFactory"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="newCachedThreadPool"
+ return="java.util.concurrent.ExecutorService"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="newCachedThreadPool"
+ return="java.util.concurrent.ExecutorService"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="threadFactory" type="java.util.concurrent.ThreadFactory">
+</parameter>
+</method>
+<method name="newFixedThreadPool"
+ return="java.util.concurrent.ExecutorService"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="nThreads" type="int">
+</parameter>
+</method>
+<method name="newFixedThreadPool"
+ return="java.util.concurrent.ExecutorService"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="nThreads" type="int">
+</parameter>
+<parameter name="threadFactory" type="java.util.concurrent.ThreadFactory">
+</parameter>
+</method>
+<method name="newScheduledThreadPool"
+ return="java.util.concurrent.ScheduledExecutorService"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="corePoolSize" type="int">
+</parameter>
+</method>
+<method name="newScheduledThreadPool"
+ return="java.util.concurrent.ScheduledExecutorService"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="corePoolSize" type="int">
+</parameter>
+<parameter name="threadFactory" type="java.util.concurrent.ThreadFactory">
+</parameter>
+</method>
+<method name="newSingleThreadExecutor"
+ return="java.util.concurrent.ExecutorService"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="newSingleThreadExecutor"
+ return="java.util.concurrent.ExecutorService"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="threadFactory" type="java.util.concurrent.ThreadFactory">
+</parameter>
+</method>
+<method name="newSingleThreadScheduledExecutor"
+ return="java.util.concurrent.ScheduledExecutorService"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="newSingleThreadScheduledExecutor"
+ return="java.util.concurrent.ScheduledExecutorService"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="threadFactory" type="java.util.concurrent.ThreadFactory">
+</parameter>
+</method>
+<method name="privilegedCallable"
+ return="java.util.concurrent.Callable&lt;T&gt;"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="callable" type="java.util.concurrent.Callable&lt;T&gt;">
+</parameter>
+</method>
+<method name="privilegedCallableUsingCurrentClassLoader"
+ return="java.util.concurrent.Callable&lt;T&gt;"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="callable" type="java.util.concurrent.Callable&lt;T&gt;">
+</parameter>
+</method>
+<method name="privilegedThreadFactory"
+ return="java.util.concurrent.ThreadFactory"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="unconfigurableExecutorService"
+ return="java.util.concurrent.ExecutorService"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="executor" type="java.util.concurrent.ExecutorService">
+</parameter>
+</method>
+<method name="unconfigurableScheduledExecutorService"
+ return="java.util.concurrent.ScheduledExecutorService"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="executor" type="java.util.concurrent.ScheduledExecutorService">
+</parameter>
+</method>
+</class>
+<interface name="Future"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="cancel"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="mayInterruptIfRunning" type="boolean">
+</parameter>
+</method>
+<method name="get"
+ return="V"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="ExecutionException" type="java.util.concurrent.ExecutionException">
+</exception>
+<exception name="InterruptedException" type="java.lang.InterruptedException">
+</exception>
+</method>
+<method name="get"
+ return="V"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="timeout" type="long">
+</parameter>
+<parameter name="unit" type="java.util.concurrent.TimeUnit">
+</parameter>
+<exception name="ExecutionException" type="java.util.concurrent.ExecutionException">
+</exception>
+<exception name="InterruptedException" type="java.lang.InterruptedException">
+</exception>
+<exception name="TimeoutException" type="java.util.concurrent.TimeoutException">
+</exception>
+</method>
+<method name="isCancelled"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isDone"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+</interface>
+<class name="FutureTask"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="java.util.concurrent.Future">
+</implements>
+<implements name="java.lang.Runnable">
+</implements>
+<constructor name="FutureTask"
+ type="java.util.concurrent.FutureTask"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="callable" type="java.util.concurrent.Callable&lt;V&gt;">
+</parameter>
+</constructor>
+<constructor name="FutureTask"
+ type="java.util.concurrent.FutureTask"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="runnable" type="java.lang.Runnable">
+</parameter>
+<parameter name="result" type="V">
+</parameter>
+</constructor>
+<method name="cancel"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="mayInterruptIfRunning" type="boolean">
+</parameter>
+</method>
+<method name="done"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</method>
+<method name="get"
+ return="V"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="ExecutionException" type="java.util.concurrent.ExecutionException">
+</exception>
+<exception name="InterruptedException" type="java.lang.InterruptedException">
+</exception>
+</method>
+<method name="get"
+ return="V"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="timeout" type="long">
+</parameter>
+<parameter name="unit" type="java.util.concurrent.TimeUnit">
+</parameter>
+<exception name="ExecutionException" type="java.util.concurrent.ExecutionException">
+</exception>
+<exception name="InterruptedException" type="java.lang.InterruptedException">
+</exception>
+<exception name="TimeoutException" type="java.util.concurrent.TimeoutException">
+</exception>
+</method>
+<method name="isCancelled"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isDone"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="run"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="runAndReset"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</method>
+<method name="set"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="v" type="V">
+</parameter>
+</method>
+<method name="setException"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="t" type="java.lang.Throwable">
+</parameter>
+</method>
+</class>
+<class name="LinkedBlockingQueue"
+ extends="java.util.AbstractQueue"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="java.util.concurrent.BlockingQueue">
+</implements>
+<implements name="java.io.Serializable">
+</implements>
+<constructor name="LinkedBlockingQueue"
+ type="java.util.concurrent.LinkedBlockingQueue"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<constructor name="LinkedBlockingQueue"
+ type="java.util.concurrent.LinkedBlockingQueue"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="capacity" type="int">
+</parameter>
+</constructor>
+<constructor name="LinkedBlockingQueue"
+ type="java.util.concurrent.LinkedBlockingQueue"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="c" type="java.util.Collection&lt;? extends E&gt;">
+</parameter>
+</constructor>
+<method name="drainTo"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="c" type="java.util.Collection&lt;? super E&gt;">
+</parameter>
+</method>
+<method name="drainTo"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="c" type="java.util.Collection&lt;? super E&gt;">
+</parameter>
+<parameter name="maxElements" type="int">
+</parameter>
+</method>
+<method name="iterator"
+ return="java.util.Iterator&lt;E&gt;"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="offer"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="e" type="E">
+</parameter>
+<parameter name="timeout" type="long">
+</parameter>
+<parameter name="unit" type="java.util.concurrent.TimeUnit">
+</parameter>
+<exception name="InterruptedException" type="java.lang.InterruptedException">
+</exception>
+</method>
+<method name="offer"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="e" type="E">
+</parameter>
+</method>
+<method name="peek"
+ return="E"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="poll"
+ return="E"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="timeout" type="long">
+</parameter>
+<parameter name="unit" type="java.util.concurrent.TimeUnit">
+</parameter>
+<exception name="InterruptedException" type="java.lang.InterruptedException">
+</exception>
+</method>
+<method name="poll"
+ return="E"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="put"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="e" type="E">
+</parameter>
+<exception name="InterruptedException" type="java.lang.InterruptedException">
+</exception>
+</method>
+<method name="remainingCapacity"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="size"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="take"
+ return="E"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="InterruptedException" type="java.lang.InterruptedException">
+</exception>
+</method>
+</class>
+<class name="PriorityBlockingQueue"
+ extends="java.util.AbstractQueue"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="java.util.concurrent.BlockingQueue">
+</implements>
+<implements name="java.io.Serializable">
+</implements>
+<constructor name="PriorityBlockingQueue"
+ type="java.util.concurrent.PriorityBlockingQueue"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<constructor name="PriorityBlockingQueue"
+ type="java.util.concurrent.PriorityBlockingQueue"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="initialCapacity" type="int">
+</parameter>
+</constructor>
+<constructor name="PriorityBlockingQueue"
+ type="java.util.concurrent.PriorityBlockingQueue"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="initialCapacity" type="int">
+</parameter>
+<parameter name="comparator" type="java.util.Comparator&lt;? super E&gt;">
+</parameter>
+</constructor>
+<constructor name="PriorityBlockingQueue"
+ type="java.util.concurrent.PriorityBlockingQueue"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="c" type="java.util.Collection&lt;? extends E&gt;">
+</parameter>
+</constructor>
+<method name="comparator"
+ return="java.util.Comparator&lt;? super E&gt;"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="drainTo"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="c" type="java.util.Collection&lt;? super E&gt;">
+</parameter>
+</method>
+<method name="drainTo"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="c" type="java.util.Collection&lt;? super E&gt;">
+</parameter>
+<parameter name="maxElements" type="int">
+</parameter>
+</method>
+<method name="iterator"
+ return="java.util.Iterator&lt;E&gt;"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="offer"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="e" type="E">
+</parameter>
+</method>
+<method name="offer"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="e" type="E">
+</parameter>
+<parameter name="timeout" type="long">
+</parameter>
+<parameter name="unit" type="java.util.concurrent.TimeUnit">
+</parameter>
+</method>
+<method name="peek"
+ return="E"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="poll"
+ return="E"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="poll"
+ return="E"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="timeout" type="long">
+</parameter>
+<parameter name="unit" type="java.util.concurrent.TimeUnit">
+</parameter>
+<exception name="InterruptedException" type="java.lang.InterruptedException">
+</exception>
+</method>
+<method name="put"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="e" type="E">
+</parameter>
+</method>
+<method name="remainingCapacity"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="size"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="take"
+ return="E"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="InterruptedException" type="java.lang.InterruptedException">
+</exception>
+</method>
+</class>
+<class name="RejectedExecutionException"
+ extends="java.lang.RuntimeException"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="RejectedExecutionException"
+ type="java.util.concurrent.RejectedExecutionException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<constructor name="RejectedExecutionException"
+ type="java.util.concurrent.RejectedExecutionException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="message" type="java.lang.String">
+</parameter>
+</constructor>
+<constructor name="RejectedExecutionException"
+ type="java.util.concurrent.RejectedExecutionException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="message" type="java.lang.String">
+</parameter>
+<parameter name="cause" type="java.lang.Throwable">
+</parameter>
+</constructor>
+<constructor name="RejectedExecutionException"
+ type="java.util.concurrent.RejectedExecutionException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="cause" type="java.lang.Throwable">
+</parameter>
+</constructor>
+</class>
+<interface name="RejectedExecutionHandler"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="rejectedExecution"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="r" type="java.lang.Runnable">
+</parameter>
+<parameter name="executor" type="java.util.concurrent.ThreadPoolExecutor">
+</parameter>
+</method>
+</interface>
+<interface name="ScheduledExecutorService"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="java.util.concurrent.ExecutorService">
+</implements>
+<method name="schedule"
+ return="java.util.concurrent.ScheduledFuture&lt;?&gt;"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="command" type="java.lang.Runnable">
+</parameter>
+<parameter name="delay" type="long">
+</parameter>
+<parameter name="unit" type="java.util.concurrent.TimeUnit">
+</parameter>
+</method>
+<method name="schedule"
+ return="java.util.concurrent.ScheduledFuture&lt;V&gt;"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="callable" type="java.util.concurrent.Callable&lt;V&gt;">
+</parameter>
+<parameter name="delay" type="long">
+</parameter>
+<parameter name="unit" type="java.util.concurrent.TimeUnit">
+</parameter>
+</method>
+<method name="scheduleAtFixedRate"
+ return="java.util.concurrent.ScheduledFuture&lt;?&gt;"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="command" type="java.lang.Runnable">
+</parameter>
+<parameter name="initialDelay" type="long">
+</parameter>
+<parameter name="period" type="long">
+</parameter>
+<parameter name="unit" type="java.util.concurrent.TimeUnit">
+</parameter>
+</method>
+<method name="scheduleWithFixedDelay"
+ return="java.util.concurrent.ScheduledFuture&lt;?&gt;"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="command" type="java.lang.Runnable">
+</parameter>
+<parameter name="initialDelay" type="long">
+</parameter>
+<parameter name="delay" type="long">
+</parameter>
+<parameter name="unit" type="java.util.concurrent.TimeUnit">
+</parameter>
+</method>
+</interface>
+<interface name="ScheduledFuture"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="java.util.concurrent.Delayed">
+</implements>
+<implements name="java.util.concurrent.Future">
+</implements>
+</interface>
+<class name="ScheduledThreadPoolExecutor"
+ extends="java.util.concurrent.ThreadPoolExecutor"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="java.util.concurrent.ScheduledExecutorService">
+</implements>
+<constructor name="ScheduledThreadPoolExecutor"
+ type="java.util.concurrent.ScheduledThreadPoolExecutor"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="corePoolSize" type="int">
+</parameter>
+</constructor>
+<constructor name="ScheduledThreadPoolExecutor"
+ type="java.util.concurrent.ScheduledThreadPoolExecutor"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="corePoolSize" type="int">
+</parameter>
+<parameter name="threadFactory" type="java.util.concurrent.ThreadFactory">
+</parameter>
+</constructor>
+<constructor name="ScheduledThreadPoolExecutor"
+ type="java.util.concurrent.ScheduledThreadPoolExecutor"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="corePoolSize" type="int">
+</parameter>
+<parameter name="handler" type="java.util.concurrent.RejectedExecutionHandler">
+</parameter>
+</constructor>
+<constructor name="ScheduledThreadPoolExecutor"
+ type="java.util.concurrent.ScheduledThreadPoolExecutor"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="corePoolSize" type="int">
+</parameter>
+<parameter name="threadFactory" type="java.util.concurrent.ThreadFactory">
+</parameter>
+<parameter name="handler" type="java.util.concurrent.RejectedExecutionHandler">
+</parameter>
+</constructor>
+<method name="getContinueExistingPeriodicTasksAfterShutdownPolicy"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getExecuteExistingDelayedTasksAfterShutdownPolicy"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="schedule"
+ return="java.util.concurrent.ScheduledFuture&lt;?&gt;"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="command" type="java.lang.Runnable">
+</parameter>
+<parameter name="delay" type="long">
+</parameter>
+<parameter name="unit" type="java.util.concurrent.TimeUnit">
+</parameter>
+</method>
+<method name="schedule"
+ return="java.util.concurrent.ScheduledFuture&lt;V&gt;"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="callable" type="java.util.concurrent.Callable&lt;V&gt;">
+</parameter>
+<parameter name="delay" type="long">
+</parameter>
+<parameter name="unit" type="java.util.concurrent.TimeUnit">
+</parameter>
+</method>
+<method name="scheduleAtFixedRate"
+ return="java.util.concurrent.ScheduledFuture&lt;?&gt;"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="command" type="java.lang.Runnable">
+</parameter>
+<parameter name="initialDelay" type="long">
+</parameter>
+<parameter name="period" type="long">
+</parameter>
+<parameter name="unit" type="java.util.concurrent.TimeUnit">
+</parameter>
+</method>
+<method name="scheduleWithFixedDelay"
+ return="java.util.concurrent.ScheduledFuture&lt;?&gt;"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="command" type="java.lang.Runnable">
+</parameter>
+<parameter name="initialDelay" type="long">
+</parameter>
+<parameter name="delay" type="long">
+</parameter>
+<parameter name="unit" type="java.util.concurrent.TimeUnit">
+</parameter>
+</method>
+<method name="setContinueExistingPeriodicTasksAfterShutdownPolicy"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="value" type="boolean">
+</parameter>
+</method>
+<method name="setExecuteExistingDelayedTasksAfterShutdownPolicy"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="value" type="boolean">
+</parameter>
+</method>
+</class>
+<class name="Semaphore"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="java.io.Serializable">
+</implements>
+<constructor name="Semaphore"
+ type="java.util.concurrent.Semaphore"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="permits" type="int">
+</parameter>
+</constructor>
+<constructor name="Semaphore"
+ type="java.util.concurrent.Semaphore"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="permits" type="int">
+</parameter>
+<parameter name="fair" type="boolean">
+</parameter>
+</constructor>
+<method name="acquire"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="InterruptedException" type="java.lang.InterruptedException">
+</exception>
+</method>
+<method name="acquire"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="permits" type="int">
+</parameter>
+<exception name="InterruptedException" type="java.lang.InterruptedException">
+</exception>
+</method>
+<method name="acquireUninterruptibly"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="acquireUninterruptibly"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="permits" type="int">
+</parameter>
+</method>
+<method name="availablePermits"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="drainPermits"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getQueueLength"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getQueuedThreads"
+ return="java.util.Collection&lt;java.lang.Thread&gt;"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</method>
+<method name="hasQueuedThreads"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isFair"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="reducePermits"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="reduction" type="int">
+</parameter>
+</method>
+<method name="release"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="release"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="permits" type="int">
+</parameter>
+</method>
+<method name="tryAcquire"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="tryAcquire"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="timeout" type="long">
+</parameter>
+<parameter name="unit" type="java.util.concurrent.TimeUnit">
+</parameter>
+<exception name="InterruptedException" type="java.lang.InterruptedException">
+</exception>
+</method>
+<method name="tryAcquire"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="permits" type="int">
+</parameter>
+</method>
+<method name="tryAcquire"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="permits" type="int">
+</parameter>
+<parameter name="timeout" type="long">
+</parameter>
+<parameter name="unit" type="java.util.concurrent.TimeUnit">
+</parameter>
+<exception name="InterruptedException" type="java.lang.InterruptedException">
+</exception>
+</method>
+</class>
+<class name="SynchronousQueue"
+ extends="java.util.AbstractQueue"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="java.util.concurrent.BlockingQueue">
+</implements>
+<implements name="java.io.Serializable">
+</implements>
+<constructor name="SynchronousQueue"
+ type="java.util.concurrent.SynchronousQueue"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<constructor name="SynchronousQueue"
+ type="java.util.concurrent.SynchronousQueue"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="fair" type="boolean">
+</parameter>
+</constructor>
+<method name="drainTo"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="c" type="java.util.Collection&lt;? super E&gt;">
+</parameter>
+</method>
+<method name="drainTo"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="c" type="java.util.Collection&lt;? super E&gt;">
+</parameter>
+<parameter name="maxElements" type="int">
+</parameter>
+</method>
+<method name="iterator"
+ return="java.util.Iterator&lt;E&gt;"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="offer"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="o" type="E">
+</parameter>
+<parameter name="timeout" type="long">
+</parameter>
+<parameter name="unit" type="java.util.concurrent.TimeUnit">
+</parameter>
+<exception name="InterruptedException" type="java.lang.InterruptedException">
+</exception>
+</method>
+<method name="offer"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="e" type="E">
+</parameter>
+</method>
+<method name="peek"
+ return="E"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="poll"
+ return="E"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="timeout" type="long">
+</parameter>
+<parameter name="unit" type="java.util.concurrent.TimeUnit">
+</parameter>
+<exception name="InterruptedException" type="java.lang.InterruptedException">
+</exception>
+</method>
+<method name="poll"
+ return="E"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="put"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="o" type="E">
+</parameter>
+<exception name="InterruptedException" type="java.lang.InterruptedException">
+</exception>
+</method>
+<method name="remainingCapacity"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="size"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="take"
+ return="E"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="InterruptedException" type="java.lang.InterruptedException">
+</exception>
+</method>
+</class>
+<interface name="ThreadFactory"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="newThread"
+ return="java.lang.Thread"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="r" type="java.lang.Runnable">
+</parameter>
+</method>
+</interface>
+<class name="ThreadPoolExecutor"
+ extends="java.util.concurrent.AbstractExecutorService"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="ThreadPoolExecutor"
+ type="java.util.concurrent.ThreadPoolExecutor"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="corePoolSize" type="int">
+</parameter>
+<parameter name="maximumPoolSize" type="int">
+</parameter>
+<parameter name="keepAliveTime" type="long">
+</parameter>
+<parameter name="unit" type="java.util.concurrent.TimeUnit">
+</parameter>
+<parameter name="workQueue" type="java.util.concurrent.BlockingQueue&lt;java.lang.Runnable&gt;">
+</parameter>
+</constructor>
+<constructor name="ThreadPoolExecutor"
+ type="java.util.concurrent.ThreadPoolExecutor"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="corePoolSize" type="int">
+</parameter>
+<parameter name="maximumPoolSize" type="int">
+</parameter>
+<parameter name="keepAliveTime" type="long">
+</parameter>
+<parameter name="unit" type="java.util.concurrent.TimeUnit">
+</parameter>
+<parameter name="workQueue" type="java.util.concurrent.BlockingQueue&lt;java.lang.Runnable&gt;">
+</parameter>
+<parameter name="threadFactory" type="java.util.concurrent.ThreadFactory">
+</parameter>
+</constructor>
+<constructor name="ThreadPoolExecutor"
+ type="java.util.concurrent.ThreadPoolExecutor"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="corePoolSize" type="int">
+</parameter>
+<parameter name="maximumPoolSize" type="int">
+</parameter>
+<parameter name="keepAliveTime" type="long">
+</parameter>
+<parameter name="unit" type="java.util.concurrent.TimeUnit">
+</parameter>
+<parameter name="workQueue" type="java.util.concurrent.BlockingQueue&lt;java.lang.Runnable&gt;">
+</parameter>
+<parameter name="handler" type="java.util.concurrent.RejectedExecutionHandler">
+</parameter>
+</constructor>
+<constructor name="ThreadPoolExecutor"
+ type="java.util.concurrent.ThreadPoolExecutor"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="corePoolSize" type="int">
+</parameter>
+<parameter name="maximumPoolSize" type="int">
+</parameter>
+<parameter name="keepAliveTime" type="long">
+</parameter>
+<parameter name="unit" type="java.util.concurrent.TimeUnit">
+</parameter>
+<parameter name="workQueue" type="java.util.concurrent.BlockingQueue&lt;java.lang.Runnable&gt;">
+</parameter>
+<parameter name="threadFactory" type="java.util.concurrent.ThreadFactory">
+</parameter>
+<parameter name="handler" type="java.util.concurrent.RejectedExecutionHandler">
+</parameter>
+</constructor>
+<method name="afterExecute"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="r" type="java.lang.Runnable">
+</parameter>
+<parameter name="t" type="java.lang.Throwable">
+</parameter>
+</method>
+<method name="awaitTermination"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="timeout" type="long">
+</parameter>
+<parameter name="unit" type="java.util.concurrent.TimeUnit">
+</parameter>
+<exception name="InterruptedException" type="java.lang.InterruptedException">
+</exception>
+</method>
+<method name="beforeExecute"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="t" type="java.lang.Thread">
+</parameter>
+<parameter name="r" type="java.lang.Runnable">
+</parameter>
+</method>
+<method name="execute"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="command" type="java.lang.Runnable">
+</parameter>
+</method>
+<method name="getActiveCount"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getCompletedTaskCount"
+ return="long"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getCorePoolSize"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getKeepAliveTime"
+ return="long"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="unit" type="java.util.concurrent.TimeUnit">
+</parameter>
+</method>
+<method name="getLargestPoolSize"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getMaximumPoolSize"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getPoolSize"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getQueue"
+ return="java.util.concurrent.BlockingQueue&lt;java.lang.Runnable&gt;"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getRejectedExecutionHandler"
+ return="java.util.concurrent.RejectedExecutionHandler"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getTaskCount"
+ return="long"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getThreadFactory"
+ return="java.util.concurrent.ThreadFactory"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isShutdown"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isTerminated"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isTerminating"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="prestartAllCoreThreads"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="prestartCoreThread"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="purge"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="remove"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="task" type="java.lang.Runnable">
+</parameter>
+</method>
+<method name="setCorePoolSize"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="corePoolSize" type="int">
+</parameter>
+</method>
+<method name="setKeepAliveTime"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="time" type="long">
+</parameter>
+<parameter name="unit" type="java.util.concurrent.TimeUnit">
+</parameter>
+</method>
+<method name="setMaximumPoolSize"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="maximumPoolSize" type="int">
+</parameter>
+</method>
+<method name="setRejectedExecutionHandler"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="handler" type="java.util.concurrent.RejectedExecutionHandler">
+</parameter>
+</method>
+<method name="setThreadFactory"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="threadFactory" type="java.util.concurrent.ThreadFactory">
+</parameter>
+</method>
+<method name="shutdown"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="shutdownNow"
+ return="java.util.List&lt;java.lang.Runnable&gt;"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="terminated"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</method>
+</class>
+<class name="ThreadPoolExecutor.AbortPolicy"
+ extends="java.lang.Object"
+ abstract="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="java.util.concurrent.RejectedExecutionHandler">
+</implements>
+<constructor name="ThreadPoolExecutor.AbortPolicy"
+ type="java.util.concurrent.ThreadPoolExecutor.AbortPolicy"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<method name="rejectedExecution"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="r" type="java.lang.Runnable">
+</parameter>
+<parameter name="e" type="java.util.concurrent.ThreadPoolExecutor">
+</parameter>
+</method>
+</class>
+<class name="ThreadPoolExecutor.CallerRunsPolicy"
+ extends="java.lang.Object"
+ abstract="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="java.util.concurrent.RejectedExecutionHandler">
+</implements>
+<constructor name="ThreadPoolExecutor.CallerRunsPolicy"
+ type="java.util.concurrent.ThreadPoolExecutor.CallerRunsPolicy"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<method name="rejectedExecution"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="r" type="java.lang.Runnable">
+</parameter>
+<parameter name="e" type="java.util.concurrent.ThreadPoolExecutor">
+</parameter>
+</method>
+</class>
+<class name="ThreadPoolExecutor.DiscardOldestPolicy"
+ extends="java.lang.Object"
+ abstract="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="java.util.concurrent.RejectedExecutionHandler">
+</implements>
+<constructor name="ThreadPoolExecutor.DiscardOldestPolicy"
+ type="java.util.concurrent.ThreadPoolExecutor.DiscardOldestPolicy"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<method name="rejectedExecution"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="r" type="java.lang.Runnable">
+</parameter>
+<parameter name="e" type="java.util.concurrent.ThreadPoolExecutor">
+</parameter>
+</method>
+</class>
+<class name="ThreadPoolExecutor.DiscardPolicy"
+ extends="java.lang.Object"
+ abstract="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="java.util.concurrent.RejectedExecutionHandler">
+</implements>
+<constructor name="ThreadPoolExecutor.DiscardPolicy"
+ type="java.util.concurrent.ThreadPoolExecutor.DiscardPolicy"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<method name="rejectedExecution"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="r" type="java.lang.Runnable">
+</parameter>
+<parameter name="e" type="java.util.concurrent.ThreadPoolExecutor">
+</parameter>
+</method>
+</class>
+<class name="TimeUnit"
+ extends="java.lang.Enum"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="convert"
+ return="long"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="sourceDuration" type="long">
+</parameter>
+<parameter name="sourceUnit" type="java.util.concurrent.TimeUnit">
+</parameter>
+</method>
+<method name="sleep"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="timeout" type="long">
+</parameter>
+<exception name="InterruptedException" type="java.lang.InterruptedException">
+</exception>
+</method>
+<method name="timedJoin"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="thread" type="java.lang.Thread">
+</parameter>
+<parameter name="timeout" type="long">
+</parameter>
+<exception name="InterruptedException" type="java.lang.InterruptedException">
+</exception>
+</method>
+<method name="timedWait"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="obj" type="java.lang.Object">
+</parameter>
+<parameter name="timeout" type="long">
+</parameter>
+<exception name="InterruptedException" type="java.lang.InterruptedException">
+</exception>
+</method>
+<method name="toMicros"
+ return="long"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="duration" type="long">
+</parameter>
+</method>
+<method name="toMillis"
+ return="long"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="duration" type="long">
+</parameter>
+</method>
+<method name="toNanos"
+ return="long"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="duration" type="long">
+</parameter>
+</method>
+<method name="toSeconds"
+ return="long"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="duration" type="long">
+</parameter>
+</method>
+<method name="valueOf"
+ return="java.util.concurrent.TimeUnit"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+</method>
+<method name="values"
+ return="java.util.concurrent.TimeUnit[]"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+</class>
+<class name="TimeoutException"
+ extends="java.lang.Exception"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="TimeoutException"
+ type="java.util.concurrent.TimeoutException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<constructor name="TimeoutException"
+ type="java.util.concurrent.TimeoutException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="message" type="java.lang.String">
+</parameter>
+</constructor>
+</class>
+</package>
+<package name="java.util.concurrent.atomic"
+>
+<class name="AtomicBoolean"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="java.io.Serializable">
+</implements>
+<constructor name="AtomicBoolean"
+ type="java.util.concurrent.atomic.AtomicBoolean"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="initialValue" type="boolean">
+</parameter>
+</constructor>
+<constructor name="AtomicBoolean"
+ type="java.util.concurrent.atomic.AtomicBoolean"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<method name="compareAndSet"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="expect" type="boolean">
+</parameter>
+<parameter name="update" type="boolean">
+</parameter>
+</method>
+<method name="get"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getAndSet"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="newValue" type="boolean">
+</parameter>
+</method>
+<method name="set"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="newValue" type="boolean">
+</parameter>
+</method>
+<method name="weakCompareAndSet"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="expect" type="boolean">
+</parameter>
+<parameter name="update" type="boolean">
+</parameter>
+</method>
+</class>
+<class name="AtomicInteger"
+ extends="java.lang.Number"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="java.io.Serializable">
+</implements>
+<constructor name="AtomicInteger"
+ type="java.util.concurrent.atomic.AtomicInteger"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="initialValue" type="int">
+</parameter>
+</constructor>
+<constructor name="AtomicInteger"
+ type="java.util.concurrent.atomic.AtomicInteger"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<method name="addAndGet"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="delta" type="int">
+</parameter>
+</method>
+<method name="compareAndSet"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="expect" type="int">
+</parameter>
+<parameter name="update" type="int">
+</parameter>
+</method>
+<method name="decrementAndGet"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="doubleValue"
+ return="double"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="floatValue"
+ return="float"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="get"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getAndAdd"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="delta" type="int">
+</parameter>
+</method>
+<method name="getAndDecrement"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getAndIncrement"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getAndSet"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="newValue" type="int">
+</parameter>
+</method>
+<method name="incrementAndGet"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="intValue"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="longValue"
+ return="long"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="set"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="newValue" type="int">
+</parameter>
+</method>
+<method name="weakCompareAndSet"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="expect" type="int">
+</parameter>
+<parameter name="update" type="int">
+</parameter>
+</method>
+</class>
+<class name="AtomicIntegerArray"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="java.io.Serializable">
+</implements>
+<constructor name="AtomicIntegerArray"
+ type="java.util.concurrent.atomic.AtomicIntegerArray"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="length" type="int">
+</parameter>
+</constructor>
+<constructor name="AtomicIntegerArray"
+ type="java.util.concurrent.atomic.AtomicIntegerArray"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="array" type="int[]">
+</parameter>
+</constructor>
+<method name="addAndGet"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="i" type="int">
+</parameter>
+<parameter name="delta" type="int">
+</parameter>
+</method>
+<method name="compareAndSet"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="i" type="int">
+</parameter>
+<parameter name="expect" type="int">
+</parameter>
+<parameter name="update" type="int">
+</parameter>
+</method>
+<method name="decrementAndGet"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="i" type="int">
+</parameter>
+</method>
+<method name="get"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="i" type="int">
+</parameter>
+</method>
+<method name="getAndAdd"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="i" type="int">
+</parameter>
+<parameter name="delta" type="int">
+</parameter>
+</method>
+<method name="getAndDecrement"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="i" type="int">
+</parameter>
+</method>
+<method name="getAndIncrement"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="i" type="int">
+</parameter>
+</method>
+<method name="getAndSet"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="i" type="int">
+</parameter>
+<parameter name="newValue" type="int">
+</parameter>
+</method>
+<method name="incrementAndGet"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="i" type="int">
+</parameter>
+</method>
+<method name="length"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="set"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="i" type="int">
+</parameter>
+<parameter name="newValue" type="int">
+</parameter>
+</method>
+<method name="weakCompareAndSet"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="i" type="int">
+</parameter>
+<parameter name="expect" type="int">
+</parameter>
+<parameter name="update" type="int">
+</parameter>
+</method>
+</class>
+<class name="AtomicIntegerFieldUpdater"
+ extends="java.lang.Object"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="AtomicIntegerFieldUpdater"
+ type="java.util.concurrent.atomic.AtomicIntegerFieldUpdater"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</constructor>
+<method name="addAndGet"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="obj" type="T">
+</parameter>
+<parameter name="delta" type="int">
+</parameter>
+</method>
+<method name="compareAndSet"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="obj" type="T">
+</parameter>
+<parameter name="expect" type="int">
+</parameter>
+<parameter name="update" type="int">
+</parameter>
+</method>
+<method name="decrementAndGet"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="obj" type="T">
+</parameter>
+</method>
+<method name="get"
+ return="int"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="obj" type="T">
+</parameter>
+</method>
+<method name="getAndAdd"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="obj" type="T">
+</parameter>
+<parameter name="delta" type="int">
+</parameter>
+</method>
+<method name="getAndDecrement"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="obj" type="T">
+</parameter>
+</method>
+<method name="getAndIncrement"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="obj" type="T">
+</parameter>
+</method>
+<method name="getAndSet"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="obj" type="T">
+</parameter>
+<parameter name="newValue" type="int">
+</parameter>
+</method>
+<method name="incrementAndGet"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="obj" type="T">
+</parameter>
+</method>
+<method name="newUpdater"
+ return="java.util.concurrent.atomic.AtomicIntegerFieldUpdater&lt;U&gt;"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="tclass" type="java.lang.Class&lt;U&gt;">
+</parameter>
+<parameter name="fieldName" type="java.lang.String">
+</parameter>
+</method>
+<method name="set"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="obj" type="T">
+</parameter>
+<parameter name="newValue" type="int">
+</parameter>
+</method>
+<method name="weakCompareAndSet"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="obj" type="T">
+</parameter>
+<parameter name="expect" type="int">
+</parameter>
+<parameter name="update" type="int">
+</parameter>
+</method>
+</class>
+<class name="AtomicLong"
+ extends="java.lang.Number"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="java.io.Serializable">
+</implements>
+<constructor name="AtomicLong"
+ type="java.util.concurrent.atomic.AtomicLong"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="initialValue" type="long">
+</parameter>
+</constructor>
+<constructor name="AtomicLong"
+ type="java.util.concurrent.atomic.AtomicLong"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<method name="addAndGet"
+ return="long"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="delta" type="long">
+</parameter>
+</method>
+<method name="compareAndSet"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="expect" type="long">
+</parameter>
+<parameter name="update" type="long">
+</parameter>
+</method>
+<method name="decrementAndGet"
+ return="long"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="doubleValue"
+ return="double"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="floatValue"
+ return="float"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="get"
+ return="long"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getAndAdd"
+ return="long"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="delta" type="long">
+</parameter>
+</method>
+<method name="getAndDecrement"
+ return="long"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getAndIncrement"
+ return="long"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getAndSet"
+ return="long"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="newValue" type="long">
+</parameter>
+</method>
+<method name="incrementAndGet"
+ return="long"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="intValue"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="longValue"
+ return="long"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="set"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="newValue" type="long">
+</parameter>
+</method>
+<method name="weakCompareAndSet"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="expect" type="long">
+</parameter>
+<parameter name="update" type="long">
+</parameter>
+</method>
+</class>
+<class name="AtomicLongArray"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="java.io.Serializable">
+</implements>
+<constructor name="AtomicLongArray"
+ type="java.util.concurrent.atomic.AtomicLongArray"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="length" type="int">
+</parameter>
+</constructor>
+<constructor name="AtomicLongArray"
+ type="java.util.concurrent.atomic.AtomicLongArray"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="array" type="long[]">
+</parameter>
+</constructor>
+<method name="addAndGet"
+ return="long"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="i" type="int">
+</parameter>
+<parameter name="delta" type="long">
+</parameter>
+</method>
+<method name="compareAndSet"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="i" type="int">
+</parameter>
+<parameter name="expect" type="long">
+</parameter>
+<parameter name="update" type="long">
+</parameter>
+</method>
+<method name="decrementAndGet"
+ return="long"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="i" type="int">
+</parameter>
+</method>
+<method name="get"
+ return="long"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="i" type="int">
+</parameter>
+</method>
+<method name="getAndAdd"
+ return="long"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="i" type="int">
+</parameter>
+<parameter name="delta" type="long">
+</parameter>
+</method>
+<method name="getAndDecrement"
+ return="long"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="i" type="int">
+</parameter>
+</method>
+<method name="getAndIncrement"
+ return="long"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="i" type="int">
+</parameter>
+</method>
+<method name="getAndSet"
+ return="long"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="i" type="int">
+</parameter>
+<parameter name="newValue" type="long">
+</parameter>
+</method>
+<method name="incrementAndGet"
+ return="long"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="i" type="int">
+</parameter>
+</method>
+<method name="length"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="set"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="i" type="int">
+</parameter>
+<parameter name="newValue" type="long">
+</parameter>
+</method>
+<method name="weakCompareAndSet"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="i" type="int">
+</parameter>
+<parameter name="expect" type="long">
+</parameter>
+<parameter name="update" type="long">
+</parameter>
+</method>
+</class>
+<class name="AtomicLongFieldUpdater"
+ extends="java.lang.Object"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="AtomicLongFieldUpdater"
+ type="java.util.concurrent.atomic.AtomicLongFieldUpdater"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</constructor>
+<method name="addAndGet"
+ return="long"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="obj" type="T">
+</parameter>
+<parameter name="delta" type="long">
+</parameter>
+</method>
+<method name="compareAndSet"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="obj" type="T">
+</parameter>
+<parameter name="expect" type="long">
+</parameter>
+<parameter name="update" type="long">
+</parameter>
+</method>
+<method name="decrementAndGet"
+ return="long"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="obj" type="T">
+</parameter>
+</method>
+<method name="get"
+ return="long"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="obj" type="T">
+</parameter>
+</method>
+<method name="getAndAdd"
+ return="long"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="obj" type="T">
+</parameter>
+<parameter name="delta" type="long">
+</parameter>
+</method>
+<method name="getAndDecrement"
+ return="long"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="obj" type="T">
+</parameter>
+</method>
+<method name="getAndIncrement"
+ return="long"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="obj" type="T">
+</parameter>
+</method>
+<method name="getAndSet"
+ return="long"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="obj" type="T">
+</parameter>
+<parameter name="newValue" type="long">
+</parameter>
+</method>
+<method name="incrementAndGet"
+ return="long"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="obj" type="T">
+</parameter>
+</method>
+<method name="newUpdater"
+ return="java.util.concurrent.atomic.AtomicLongFieldUpdater&lt;U&gt;"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="tclass" type="java.lang.Class&lt;U&gt;">
+</parameter>
+<parameter name="fieldName" type="java.lang.String">
+</parameter>
+</method>
+<method name="set"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="obj" type="T">
+</parameter>
+<parameter name="newValue" type="long">
+</parameter>
+</method>
+<method name="weakCompareAndSet"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="obj" type="T">
+</parameter>
+<parameter name="expect" type="long">
+</parameter>
+<parameter name="update" type="long">
+</parameter>
+</method>
+</class>
+<class name="AtomicMarkableReference"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="AtomicMarkableReference"
+ type="java.util.concurrent.atomic.AtomicMarkableReference"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="initialRef" type="V">
+</parameter>
+<parameter name="initialMark" type="boolean">
+</parameter>
+</constructor>
+<method name="attemptMark"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="expectedReference" type="V">
+</parameter>
+<parameter name="newMark" type="boolean">
+</parameter>
+</method>
+<method name="compareAndSet"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="expectedReference" type="V">
+</parameter>
+<parameter name="newReference" type="V">
+</parameter>
+<parameter name="expectedMark" type="boolean">
+</parameter>
+<parameter name="newMark" type="boolean">
+</parameter>
+</method>
+<method name="get"
+ return="V"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="markHolder" type="boolean[]">
+</parameter>
+</method>
+<method name="getReference"
+ return="V"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isMarked"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="set"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="newReference" type="V">
+</parameter>
+<parameter name="newMark" type="boolean">
+</parameter>
+</method>
+<method name="weakCompareAndSet"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="expectedReference" type="V">
+</parameter>
+<parameter name="newReference" type="V">
+</parameter>
+<parameter name="expectedMark" type="boolean">
+</parameter>
+<parameter name="newMark" type="boolean">
+</parameter>
+</method>
+</class>
+<class name="AtomicReference"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="java.io.Serializable">
+</implements>
+<constructor name="AtomicReference"
+ type="java.util.concurrent.atomic.AtomicReference"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="initialValue" type="V">
+</parameter>
+</constructor>
+<constructor name="AtomicReference"
+ type="java.util.concurrent.atomic.AtomicReference"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<method name="compareAndSet"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="expect" type="V">
+</parameter>
+<parameter name="update" type="V">
+</parameter>
+</method>
+<method name="get"
+ return="V"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getAndSet"
+ return="V"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="newValue" type="V">
+</parameter>
+</method>
+<method name="set"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="newValue" type="V">
+</parameter>
+</method>
+<method name="weakCompareAndSet"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="expect" type="V">
+</parameter>
+<parameter name="update" type="V">
+</parameter>
+</method>
+</class>
+<class name="AtomicReferenceArray"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="java.io.Serializable">
+</implements>
+<constructor name="AtomicReferenceArray"
+ type="java.util.concurrent.atomic.AtomicReferenceArray"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="length" type="int">
+</parameter>
+</constructor>
+<constructor name="AtomicReferenceArray"
+ type="java.util.concurrent.atomic.AtomicReferenceArray"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="array" type="E[]">
+</parameter>
+</constructor>
+<method name="compareAndSet"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="i" type="int">
+</parameter>
+<parameter name="expect" type="E">
+</parameter>
+<parameter name="update" type="E">
+</parameter>
+</method>
+<method name="get"
+ return="E"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="i" type="int">
+</parameter>
+</method>
+<method name="getAndSet"
+ return="E"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="i" type="int">
+</parameter>
+<parameter name="newValue" type="E">
+</parameter>
+</method>
+<method name="length"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="set"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="i" type="int">
+</parameter>
+<parameter name="newValue" type="E">
+</parameter>
+</method>
+<method name="weakCompareAndSet"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="i" type="int">
+</parameter>
+<parameter name="expect" type="E">
+</parameter>
+<parameter name="update" type="E">
+</parameter>
+</method>
+</class>
+<class name="AtomicReferenceFieldUpdater"
+ extends="java.lang.Object"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="AtomicReferenceFieldUpdater"
+ type="java.util.concurrent.atomic.AtomicReferenceFieldUpdater"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</constructor>
+<method name="compareAndSet"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="obj" type="T">
+</parameter>
+<parameter name="expect" type="V">
+</parameter>
+<parameter name="update" type="V">
+</parameter>
+</method>
+<method name="get"
+ return="V"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="obj" type="T">
+</parameter>
+</method>
+<method name="getAndSet"
+ return="V"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="obj" type="T">
+</parameter>
+<parameter name="newValue" type="V">
+</parameter>
+</method>
+<method name="newUpdater"
+ return="java.util.concurrent.atomic.AtomicReferenceFieldUpdater&lt;U, W&gt;"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="tclass" type="java.lang.Class&lt;U&gt;">
+</parameter>
+<parameter name="vclass" type="java.lang.Class&lt;W&gt;">
+</parameter>
+<parameter name="fieldName" type="java.lang.String">
+</parameter>
+</method>
+<method name="set"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="obj" type="T">
+</parameter>
+<parameter name="newValue" type="V">
+</parameter>
+</method>
+<method name="weakCompareAndSet"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="obj" type="T">
+</parameter>
+<parameter name="expect" type="V">
+</parameter>
+<parameter name="update" type="V">
+</parameter>
+</method>
+</class>
+<class name="AtomicStampedReference"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="AtomicStampedReference"
+ type="java.util.concurrent.atomic.AtomicStampedReference"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="initialRef" type="V">
+</parameter>
+<parameter name="initialStamp" type="int">
+</parameter>
+</constructor>
+<method name="attemptStamp"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="expectedReference" type="V">
+</parameter>
+<parameter name="newStamp" type="int">
+</parameter>
+</method>
+<method name="compareAndSet"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="expectedReference" type="V">
+</parameter>
+<parameter name="newReference" type="V">
+</parameter>
+<parameter name="expectedStamp" type="int">
+</parameter>
+<parameter name="newStamp" type="int">
+</parameter>
+</method>
+<method name="get"
+ return="V"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="stampHolder" type="int[]">
+</parameter>
+</method>
+<method name="getReference"
+ return="V"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getStamp"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="set"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="newReference" type="V">
+</parameter>
+<parameter name="newStamp" type="int">
+</parameter>
+</method>
+<method name="weakCompareAndSet"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="expectedReference" type="V">
+</parameter>
+<parameter name="newReference" type="V">
+</parameter>
+<parameter name="expectedStamp" type="int">
+</parameter>
+<parameter name="newStamp" type="int">
+</parameter>
+</method>
+</class>
+</package>
+<package name="java.util.concurrent.locks"
+>
+<class name="AbstractOwnableSynchronizer"
+ extends="java.lang.Object"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility=""
+>
+<implements name="java.io.Serializable">
+</implements>
+<constructor name="AbstractOwnableSynchronizer"
+ type="java.util.concurrent.locks.AbstractOwnableSynchronizer"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</constructor>
+<method name="getExclusiveOwnerThread"
+ return="java.lang.Thread"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</method>
+<method name="setExclusiveOwnerThread"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="t" type="java.lang.Thread">
+</parameter>
+</method>
+</class>
+<class name="AbstractQueuedSynchronizer"
+ extends="java.util.concurrent.locks.AbstractOwnableSynchronizer"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="java.io.Serializable">
+</implements>
+<constructor name="AbstractQueuedSynchronizer"
+ type="java.util.concurrent.locks.AbstractQueuedSynchronizer"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</constructor>
+<method name="acquire"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="arg" type="int">
+</parameter>
+</method>
+<method name="acquireInterruptibly"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="arg" type="int">
+</parameter>
+<exception name="InterruptedException" type="java.lang.InterruptedException">
+</exception>
+</method>
+<method name="acquireShared"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="arg" type="int">
+</parameter>
+</method>
+<method name="acquireSharedInterruptibly"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="arg" type="int">
+</parameter>
+<exception name="InterruptedException" type="java.lang.InterruptedException">
+</exception>
+</method>
+<method name="compareAndSetState"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="expect" type="int">
+</parameter>
+<parameter name="update" type="int">
+</parameter>
+</method>
+<method name="getExclusiveQueuedThreads"
+ return="java.util.Collection&lt;java.lang.Thread&gt;"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getFirstQueuedThread"
+ return="java.lang.Thread"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getQueueLength"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getQueuedThreads"
+ return="java.util.Collection&lt;java.lang.Thread&gt;"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getSharedQueuedThreads"
+ return="java.util.Collection&lt;java.lang.Thread&gt;"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getState"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</method>
+<method name="getWaitQueueLength"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="condition" type="java.util.concurrent.locks.AbstractQueuedSynchronizer.ConditionObject">
+</parameter>
+</method>
+<method name="getWaitingThreads"
+ return="java.util.Collection&lt;java.lang.Thread&gt;"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="condition" type="java.util.concurrent.locks.AbstractQueuedSynchronizer.ConditionObject">
+</parameter>
+</method>
+<method name="hasContended"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="hasQueuedThreads"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="hasWaiters"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="condition" type="java.util.concurrent.locks.AbstractQueuedSynchronizer.ConditionObject">
+</parameter>
+</method>
+<method name="isHeldExclusively"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</method>
+<method name="isQueued"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="thread" type="java.lang.Thread">
+</parameter>
+</method>
+<method name="owns"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="condition" type="java.util.concurrent.locks.AbstractQueuedSynchronizer.ConditionObject">
+</parameter>
+</method>
+<method name="release"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="arg" type="int">
+</parameter>
+</method>
+<method name="releaseShared"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="arg" type="int">
+</parameter>
+</method>
+<method name="setState"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="newState" type="int">
+</parameter>
+</method>
+<method name="tryAcquire"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="arg" type="int">
+</parameter>
+</method>
+<method name="tryAcquireNanos"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="arg" type="int">
+</parameter>
+<parameter name="nanosTimeout" type="long">
+</parameter>
+<exception name="InterruptedException" type="java.lang.InterruptedException">
+</exception>
+</method>
+<method name="tryAcquireShared"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="arg" type="int">
+</parameter>
+</method>
+<method name="tryAcquireSharedNanos"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="arg" type="int">
+</parameter>
+<parameter name="nanosTimeout" type="long">
+</parameter>
+<exception name="InterruptedException" type="java.lang.InterruptedException">
+</exception>
+</method>
+<method name="tryRelease"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="arg" type="int">
+</parameter>
+</method>
+<method name="tryReleaseShared"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="arg" type="int">
+</parameter>
+</method>
+</class>
+<class name="AbstractQueuedSynchronizer.ConditionObject"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="java.util.concurrent.locks.Condition">
+</implements>
+<implements name="java.io.Serializable">
+</implements>
+<constructor name="AbstractQueuedSynchronizer.ConditionObject"
+ type="java.util.concurrent.locks.AbstractQueuedSynchronizer.ConditionObject"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<method name="await"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="InterruptedException" type="java.lang.InterruptedException">
+</exception>
+</method>
+<method name="await"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="time" type="long">
+</parameter>
+<parameter name="unit" type="java.util.concurrent.TimeUnit">
+</parameter>
+<exception name="InterruptedException" type="java.lang.InterruptedException">
+</exception>
+</method>
+<method name="awaitNanos"
+ return="long"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="nanosTimeout" type="long">
+</parameter>
+<exception name="InterruptedException" type="java.lang.InterruptedException">
+</exception>
+</method>
+<method name="awaitUninterruptibly"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="awaitUntil"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="deadline" type="java.util.Date">
+</parameter>
+<exception name="InterruptedException" type="java.lang.InterruptedException">
+</exception>
+</method>
+<method name="getWaitQueueLength"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</method>
+<method name="getWaitingThreads"
+ return="java.util.Collection&lt;java.lang.Thread&gt;"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</method>
+<method name="hasWaiters"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</method>
+<method name="signal"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="signalAll"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+</class>
+<interface name="Condition"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="await"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="InterruptedException" type="java.lang.InterruptedException">
+</exception>
+</method>
+<method name="await"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="time" type="long">
+</parameter>
+<parameter name="unit" type="java.util.concurrent.TimeUnit">
+</parameter>
+<exception name="InterruptedException" type="java.lang.InterruptedException">
+</exception>
+</method>
+<method name="awaitNanos"
+ return="long"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="nanosTimeout" type="long">
+</parameter>
+<exception name="InterruptedException" type="java.lang.InterruptedException">
+</exception>
+</method>
+<method name="awaitUninterruptibly"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="awaitUntil"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="deadline" type="java.util.Date">
+</parameter>
+<exception name="InterruptedException" type="java.lang.InterruptedException">
+</exception>
+</method>
+<method name="signal"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="signalAll"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+</interface>
+<interface name="Lock"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="lock"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="lockInterruptibly"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="InterruptedException" type="java.lang.InterruptedException">
+</exception>
+</method>
+<method name="newCondition"
+ return="java.util.concurrent.locks.Condition"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="tryLock"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="tryLock"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="time" type="long">
+</parameter>
+<parameter name="unit" type="java.util.concurrent.TimeUnit">
+</parameter>
+<exception name="InterruptedException" type="java.lang.InterruptedException">
+</exception>
+</method>
+<method name="unlock"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+</interface>
+<class name="LockSupport"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="park"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="parkNanos"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="nanos" type="long">
+</parameter>
+</method>
+<method name="parkUntil"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="deadline" type="long">
+</parameter>
+</method>
+<method name="unpark"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="thread" type="java.lang.Thread">
+</parameter>
+</method>
+</class>
+<interface name="ReadWriteLock"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="readLock"
+ return="java.util.concurrent.locks.Lock"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="writeLock"
+ return="java.util.concurrent.locks.Lock"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+</interface>
+<class name="ReentrantLock"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="java.util.concurrent.locks.Lock">
+</implements>
+<implements name="java.io.Serializable">
+</implements>
+<constructor name="ReentrantLock"
+ type="java.util.concurrent.locks.ReentrantLock"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<constructor name="ReentrantLock"
+ type="java.util.concurrent.locks.ReentrantLock"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="fair" type="boolean">
+</parameter>
+</constructor>
+<method name="getHoldCount"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getOwner"
+ return="java.lang.Thread"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</method>
+<method name="getQueueLength"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getQueuedThreads"
+ return="java.util.Collection&lt;java.lang.Thread&gt;"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</method>
+<method name="getWaitQueueLength"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="condition" type="java.util.concurrent.locks.Condition">
+</parameter>
+</method>
+<method name="getWaitingThreads"
+ return="java.util.Collection&lt;java.lang.Thread&gt;"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="condition" type="java.util.concurrent.locks.Condition">
+</parameter>
+</method>
+<method name="hasQueuedThread"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="thread" type="java.lang.Thread">
+</parameter>
+</method>
+<method name="hasQueuedThreads"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="hasWaiters"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="condition" type="java.util.concurrent.locks.Condition">
+</parameter>
+</method>
+<method name="isFair"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isHeldByCurrentThread"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isLocked"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="lock"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="lockInterruptibly"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="InterruptedException" type="java.lang.InterruptedException">
+</exception>
+</method>
+<method name="newCondition"
+ return="java.util.concurrent.locks.Condition"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="tryLock"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="tryLock"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="timeout" type="long">
+</parameter>
+<parameter name="unit" type="java.util.concurrent.TimeUnit">
+</parameter>
+<exception name="InterruptedException" type="java.lang.InterruptedException">
+</exception>
+</method>
+<method name="unlock"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+</class>
+<class name="ReentrantReadWriteLock"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="java.util.concurrent.locks.ReadWriteLock">
+</implements>
+<implements name="java.io.Serializable">
+</implements>
+<constructor name="ReentrantReadWriteLock"
+ type="java.util.concurrent.locks.ReentrantReadWriteLock"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<constructor name="ReentrantReadWriteLock"
+ type="java.util.concurrent.locks.ReentrantReadWriteLock"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="fair" type="boolean">
+</parameter>
+</constructor>
+<method name="getOwner"
+ return="java.lang.Thread"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</method>
+<method name="getQueueLength"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getQueuedReaderThreads"
+ return="java.util.Collection&lt;java.lang.Thread&gt;"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</method>
+<method name="getQueuedThreads"
+ return="java.util.Collection&lt;java.lang.Thread&gt;"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</method>
+<method name="getQueuedWriterThreads"
+ return="java.util.Collection&lt;java.lang.Thread&gt;"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</method>
+<method name="getReadLockCount"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getWaitQueueLength"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="condition" type="java.util.concurrent.locks.Condition">
+</parameter>
+</method>
+<method name="getWaitingThreads"
+ return="java.util.Collection&lt;java.lang.Thread&gt;"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="condition" type="java.util.concurrent.locks.Condition">
+</parameter>
+</method>
+<method name="getWriteHoldCount"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="hasQueuedThread"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="thread" type="java.lang.Thread">
+</parameter>
+</method>
+<method name="hasQueuedThreads"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="hasWaiters"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="condition" type="java.util.concurrent.locks.Condition">
+</parameter>
+</method>
+<method name="isFair"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isWriteLocked"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isWriteLockedByCurrentThread"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="readLock"
+ return="java.util.concurrent.locks.ReentrantReadWriteLock.ReadLock"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="writeLock"
+ return="java.util.concurrent.locks.ReentrantReadWriteLock.WriteLock"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+</class>
+<class name="ReentrantReadWriteLock.ReadLock"
+ extends="java.lang.Object"
+ abstract="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="java.util.concurrent.locks.Lock">
+</implements>
+<implements name="java.io.Serializable">
+</implements>
+<constructor name="ReentrantReadWriteLock.ReadLock"
+ type="java.util.concurrent.locks.ReentrantReadWriteLock.ReadLock"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="lock" type="java.util.concurrent.locks.ReentrantReadWriteLock">
+</parameter>
+</constructor>
+<method name="lock"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="lockInterruptibly"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="InterruptedException" type="java.lang.InterruptedException">
+</exception>
+</method>
+<method name="newCondition"
+ return="java.util.concurrent.locks.Condition"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="tryLock"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="tryLock"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="timeout" type="long">
+</parameter>
+<parameter name="unit" type="java.util.concurrent.TimeUnit">
+</parameter>
+<exception name="InterruptedException" type="java.lang.InterruptedException">
+</exception>
+</method>
+<method name="unlock"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+</class>
+<class name="ReentrantReadWriteLock.WriteLock"
+ extends="java.lang.Object"
+ abstract="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="java.util.concurrent.locks.Lock">
+</implements>
+<implements name="java.io.Serializable">
+</implements>
+<constructor name="ReentrantReadWriteLock.WriteLock"
+ type="java.util.concurrent.locks.ReentrantReadWriteLock.WriteLock"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="lock" type="java.util.concurrent.locks.ReentrantReadWriteLock">
+</parameter>
+</constructor>
+<method name="lock"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="lockInterruptibly"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="InterruptedException" type="java.lang.InterruptedException">
+</exception>
+</method>
+<method name="newCondition"
+ return="java.util.concurrent.locks.Condition"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="tryLock"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="tryLock"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="timeout" type="long">
+</parameter>
+<parameter name="unit" type="java.util.concurrent.TimeUnit">
+</parameter>
+<exception name="InterruptedException" type="java.lang.InterruptedException">
+</exception>
+</method>
+<method name="unlock"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+</class>
+</package>
+<package name="java.util.jar"
+>
+<class name="Attributes"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="java.lang.Cloneable">
+</implements>
+<implements name="java.util.Map">
+</implements>
+<constructor name="Attributes"
+ type="java.util.jar.Attributes"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<constructor name="Attributes"
+ type="java.util.jar.Attributes"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="attrib" type="java.util.jar.Attributes">
+</parameter>
+</constructor>
+<constructor name="Attributes"
+ type="java.util.jar.Attributes"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="size" type="int">
+</parameter>
+</constructor>
+<method name="clear"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="clone"
+ return="java.lang.Object"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="containsKey"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="key" type="java.lang.Object">
+</parameter>
+</method>
+<method name="containsValue"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="value" type="java.lang.Object">
+</parameter>
+</method>
+<method name="entrySet"
+ return="java.util.Set&lt;java.util.Map.Entry&lt;java.lang.Object, java.lang.Object&gt;&gt;"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="get"
+ return="java.lang.Object"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="key" type="java.lang.Object">
+</parameter>
+</method>
+<method name="getValue"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.util.jar.Attributes.Name">
+</parameter>
+</method>
+<method name="getValue"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+</method>
+<method name="isEmpty"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="keySet"
+ return="java.util.Set&lt;java.lang.Object&gt;"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="put"
+ return="java.lang.Object"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="key" type="java.lang.Object">
+</parameter>
+<parameter name="value" type="java.lang.Object">
+</parameter>
+</method>
+<method name="putAll"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="attrib" type="java.util.Map&lt;?, ?&gt;">
+</parameter>
+</method>
+<method name="putValue"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+<parameter name="val" type="java.lang.String">
+</parameter>
+</method>
+<method name="remove"
+ return="java.lang.Object"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="key" type="java.lang.Object">
+</parameter>
+</method>
+<method name="size"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="values"
+ return="java.util.Collection&lt;java.lang.Object&gt;"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<field name="map"
+ type="java.util.Map"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</field>
+</class>
+<class name="Attributes.Name"
+ extends="java.lang.Object"
+ abstract="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="Attributes.Name"
+ type="java.util.jar.Attributes.Name"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="s" type="java.lang.String">
+</parameter>
+</constructor>
+<field name="CLASS_PATH"
+ type="java.util.jar.Attributes.Name"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="CONTENT_TYPE"
+ type="java.util.jar.Attributes.Name"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="EXTENSION_INSTALLATION"
+ type="java.util.jar.Attributes.Name"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="EXTENSION_LIST"
+ type="java.util.jar.Attributes.Name"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="EXTENSION_NAME"
+ type="java.util.jar.Attributes.Name"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="IMPLEMENTATION_TITLE"
+ type="java.util.jar.Attributes.Name"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="IMPLEMENTATION_URL"
+ type="java.util.jar.Attributes.Name"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="IMPLEMENTATION_VENDOR"
+ type="java.util.jar.Attributes.Name"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="IMPLEMENTATION_VENDOR_ID"
+ type="java.util.jar.Attributes.Name"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="IMPLEMENTATION_VERSION"
+ type="java.util.jar.Attributes.Name"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="MAIN_CLASS"
+ type="java.util.jar.Attributes.Name"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="MANIFEST_VERSION"
+ type="java.util.jar.Attributes.Name"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="SEALED"
+ type="java.util.jar.Attributes.Name"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="SIGNATURE_VERSION"
+ type="java.util.jar.Attributes.Name"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="SPECIFICATION_TITLE"
+ type="java.util.jar.Attributes.Name"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="SPECIFICATION_VENDOR"
+ type="java.util.jar.Attributes.Name"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="SPECIFICATION_VERSION"
+ type="java.util.jar.Attributes.Name"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<class name="JarEntry"
+ extends="java.util.zip.ZipEntry"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="JarEntry"
+ type="java.util.jar.JarEntry"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+</constructor>
+<constructor name="JarEntry"
+ type="java.util.jar.JarEntry"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="entry" type="java.util.zip.ZipEntry">
+</parameter>
+</constructor>
+<constructor name="JarEntry"
+ type="java.util.jar.JarEntry"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="je" type="java.util.jar.JarEntry">
+</parameter>
+</constructor>
+<method name="getAttributes"
+ return="java.util.jar.Attributes"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="getCertificates"
+ return="java.security.cert.Certificate[]"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getCodeSigners"
+ return="java.security.CodeSigner[]"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+</class>
+<class name="JarException"
+ extends="java.util.zip.ZipException"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="JarException"
+ type="java.util.jar.JarException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<constructor name="JarException"
+ type="java.util.jar.JarException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="detailMessage" type="java.lang.String">
+</parameter>
+</constructor>
+</class>
+<class name="JarFile"
+ extends="java.util.zip.ZipFile"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="JarFile"
+ type="java.util.jar.JarFile"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="file" type="java.io.File">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</constructor>
+<constructor name="JarFile"
+ type="java.util.jar.JarFile"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="file" type="java.io.File">
+</parameter>
+<parameter name="verify" type="boolean">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</constructor>
+<constructor name="JarFile"
+ type="java.util.jar.JarFile"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="file" type="java.io.File">
+</parameter>
+<parameter name="verify" type="boolean">
+</parameter>
+<parameter name="mode" type="int">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</constructor>
+<constructor name="JarFile"
+ type="java.util.jar.JarFile"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="filename" type="java.lang.String">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</constructor>
+<constructor name="JarFile"
+ type="java.util.jar.JarFile"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="filename" type="java.lang.String">
+</parameter>
+<parameter name="verify" type="boolean">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</constructor>
+<method name="getJarEntry"
+ return="java.util.jar.JarEntry"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+</method>
+<method name="getManifest"
+ return="java.util.jar.Manifest"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<field name="MANIFEST_NAME"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;META-INF/MANIFEST.MF&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<class name="JarInputStream"
+ extends="java.util.zip.ZipInputStream"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="JarInputStream"
+ type="java.util.jar.JarInputStream"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="stream" type="java.io.InputStream">
+</parameter>
+<parameter name="verify" type="boolean">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</constructor>
+<constructor name="JarInputStream"
+ type="java.util.jar.JarInputStream"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="stream" type="java.io.InputStream">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</constructor>
+<method name="getManifest"
+ return="java.util.jar.Manifest"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getNextJarEntry"
+ return="java.util.jar.JarEntry"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+</class>
+<class name="JarOutputStream"
+ extends="java.util.zip.ZipOutputStream"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="JarOutputStream"
+ type="java.util.jar.JarOutputStream"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="os" type="java.io.OutputStream">
+</parameter>
+<parameter name="mf" type="java.util.jar.Manifest">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</constructor>
+<constructor name="JarOutputStream"
+ type="java.util.jar.JarOutputStream"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="os" type="java.io.OutputStream">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</constructor>
+</class>
+<class name="Manifest"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="java.lang.Cloneable">
+</implements>
+<constructor name="Manifest"
+ type="java.util.jar.Manifest"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<constructor name="Manifest"
+ type="java.util.jar.Manifest"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="is" type="java.io.InputStream">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</constructor>
+<constructor name="Manifest"
+ type="java.util.jar.Manifest"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="man" type="java.util.jar.Manifest">
+</parameter>
+</constructor>
+<method name="clear"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="clone"
+ return="java.lang.Object"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getAttributes"
+ return="java.util.jar.Attributes"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+</method>
+<method name="getEntries"
+ return="java.util.Map&lt;java.lang.String, java.util.jar.Attributes&gt;"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getMainAttributes"
+ return="java.util.jar.Attributes"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="read"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="is" type="java.io.InputStream">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="write"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="os" type="java.io.OutputStream">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+</class>
+<class name="Pack200"
+ extends="java.lang.Object"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="newPacker"
+ return="java.util.jar.Pack200.Packer"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="newUnpacker"
+ return="java.util.jar.Pack200.Unpacker"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+</class>
+<interface name="Pack200.Packer"
+ abstract="true"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="addPropertyChangeListener"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="listener" type="java.beans.PropertyChangeListener">
+</parameter>
+</method>
+<method name="pack"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="in" type="java.util.jar.JarFile">
+</parameter>
+<parameter name="out" type="java.io.OutputStream">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="pack"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="in" type="java.util.jar.JarInputStream">
+</parameter>
+<parameter name="out" type="java.io.OutputStream">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="properties"
+ return="java.util.SortedMap&lt;java.lang.String, java.lang.String&gt;"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="removePropertyChangeListener"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="listener" type="java.beans.PropertyChangeListener">
+</parameter>
+</method>
+<field name="CLASS_ATTRIBUTE_PFX"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;pack.class.attribute.&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="CODE_ATTRIBUTE_PFX"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;pack.code.attribute.&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="DEFLATE_HINT"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;pack.deflate.hint&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="EFFORT"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;pack.effort&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ERROR"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;error&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="FALSE"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;false&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="FIELD_ATTRIBUTE_PFX"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;pack.field.attribute.&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="KEEP"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;keep&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="KEEP_FILE_ORDER"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;pack.keep.file.order&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="LATEST"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;latest&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="METHOD_ATTRIBUTE_PFX"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;pack.method.attribute.&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="MODIFICATION_TIME"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;pack.modification.time&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="PASS"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;pass&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="PASS_FILE_PFX"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;pack.pass.file.&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="PROGRESS"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;pack.progress&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="SEGMENT_LIMIT"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;pack.segment.limit&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="STRIP"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;strip&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TRUE"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;true&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="UNKNOWN_ATTRIBUTE"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;pack.unknown.attribute&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</interface>
+<interface name="Pack200.Unpacker"
+ abstract="true"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="addPropertyChangeListener"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="listener" type="java.beans.PropertyChangeListener">
+</parameter>
+</method>
+<method name="properties"
+ return="java.util.SortedMap&lt;java.lang.String, java.lang.String&gt;"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="removePropertyChangeListener"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="listener" type="java.beans.PropertyChangeListener">
+</parameter>
+</method>
+<method name="unpack"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="in" type="java.io.InputStream">
+</parameter>
+<parameter name="out" type="java.util.jar.JarOutputStream">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="unpack"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="in" type="java.io.File">
+</parameter>
+<parameter name="out" type="java.util.jar.JarOutputStream">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<field name="DEFLATE_HINT"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;unpack.deflate.hint&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="FALSE"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;false&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="KEEP"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;keep&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="PROGRESS"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;unpack.progress&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TRUE"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;true&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</interface>
+</package>
+<package name="java.util.logging"
+>
+<class name="ConsoleHandler"
+ extends="java.util.logging.StreamHandler"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="ConsoleHandler"
+ type="java.util.logging.ConsoleHandler"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+</class>
+<class name="ErrorManager"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="ErrorManager"
+ type="java.util.logging.ErrorManager"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<method name="error"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="message" type="java.lang.String">
+</parameter>
+<parameter name="exception" type="java.lang.Exception">
+</parameter>
+<parameter name="errorCode" type="int">
+</parameter>
+</method>
+<field name="CLOSE_FAILURE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="3"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="FLUSH_FAILURE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="FORMAT_FAILURE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="5"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GENERIC_FAILURE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="0"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="OPEN_FAILURE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="4"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="WRITE_FAILURE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<class name="FileHandler"
+ extends="java.util.logging.StreamHandler"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="FileHandler"
+ type="java.util.logging.FileHandler"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</constructor>
+<constructor name="FileHandler"
+ type="java.util.logging.FileHandler"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="pattern" type="java.lang.String">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</constructor>
+<constructor name="FileHandler"
+ type="java.util.logging.FileHandler"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="pattern" type="java.lang.String">
+</parameter>
+<parameter name="append" type="boolean">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</constructor>
+<constructor name="FileHandler"
+ type="java.util.logging.FileHandler"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="pattern" type="java.lang.String">
+</parameter>
+<parameter name="limit" type="int">
+</parameter>
+<parameter name="count" type="int">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</constructor>
+<constructor name="FileHandler"
+ type="java.util.logging.FileHandler"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="pattern" type="java.lang.String">
+</parameter>
+<parameter name="limit" type="int">
+</parameter>
+<parameter name="count" type="int">
+</parameter>
+<parameter name="append" type="boolean">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</constructor>
+</class>
+<interface name="Filter"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="isLoggable"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="record" type="java.util.logging.LogRecord">
+</parameter>
+</method>
+</interface>
+<class name="Formatter"
+ extends="java.lang.Object"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="Formatter"
+ type="java.util.logging.Formatter"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</constructor>
+<method name="format"
+ return="java.lang.String"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="r" type="java.util.logging.LogRecord">
+</parameter>
+</method>
+<method name="formatMessage"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="r" type="java.util.logging.LogRecord">
+</parameter>
+</method>
+<method name="getHead"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="h" type="java.util.logging.Handler">
+</parameter>
+</method>
+<method name="getTail"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="h" type="java.util.logging.Handler">
+</parameter>
+</method>
+</class>
+<class name="Handler"
+ extends="java.lang.Object"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="Handler"
+ type="java.util.logging.Handler"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</constructor>
+<method name="close"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="flush"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getEncoding"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getErrorManager"
+ return="java.util.logging.ErrorManager"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getFilter"
+ return="java.util.logging.Filter"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getFormatter"
+ return="java.util.logging.Formatter"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getLevel"
+ return="java.util.logging.Level"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isLoggable"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="record" type="java.util.logging.LogRecord">
+</parameter>
+</method>
+<method name="publish"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="record" type="java.util.logging.LogRecord">
+</parameter>
+</method>
+<method name="reportError"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="msg" type="java.lang.String">
+</parameter>
+<parameter name="ex" type="java.lang.Exception">
+</parameter>
+<parameter name="code" type="int">
+</parameter>
+</method>
+<method name="setEncoding"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="encoding" type="java.lang.String">
+</parameter>
+<exception name="SecurityException" type="java.lang.SecurityException">
+</exception>
+<exception name="UnsupportedEncodingException" type="java.io.UnsupportedEncodingException">
+</exception>
+</method>
+<method name="setErrorManager"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="em" type="java.util.logging.ErrorManager">
+</parameter>
+</method>
+<method name="setFilter"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="newFilter" type="java.util.logging.Filter">
+</parameter>
+</method>
+<method name="setFormatter"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="newFormatter" type="java.util.logging.Formatter">
+</parameter>
+</method>
+<method name="setLevel"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="newLevel" type="java.util.logging.Level">
+</parameter>
+</method>
+</class>
+<class name="Level"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="java.io.Serializable">
+</implements>
+<constructor name="Level"
+ type="java.util.logging.Level"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+<parameter name="level" type="int">
+</parameter>
+</constructor>
+<constructor name="Level"
+ type="java.util.logging.Level"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+<parameter name="level" type="int">
+</parameter>
+<parameter name="resourceBundleName" type="java.lang.String">
+</parameter>
+</constructor>
+<method name="getLocalizedName"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getName"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getResourceBundleName"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="intValue"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="parse"
+ return="java.util.logging.Level"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+<exception name="IllegalArgumentException" type="java.lang.IllegalArgumentException">
+</exception>
+</method>
+<method name="toString"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<field name="ALL"
+ type="java.util.logging.Level"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="CONFIG"
+ type="java.util.logging.Level"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="FINE"
+ type="java.util.logging.Level"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="FINER"
+ type="java.util.logging.Level"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="FINEST"
+ type="java.util.logging.Level"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="INFO"
+ type="java.util.logging.Level"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="OFF"
+ type="java.util.logging.Level"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="SEVERE"
+ type="java.util.logging.Level"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="WARNING"
+ type="java.util.logging.Level"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<class name="LogManager"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="LogManager"
+ type="java.util.logging.LogManager"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</constructor>
+<method name="addLogger"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="logger" type="java.util.logging.Logger">
+</parameter>
+</method>
+<method name="addPropertyChangeListener"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="l" type="java.beans.PropertyChangeListener">
+</parameter>
+</method>
+<method name="checkAccess"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getLogManager"
+ return="java.util.logging.LogManager"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getLogger"
+ return="java.util.logging.Logger"
+ abstract="false"
+ native="false"
+ synchronized="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+</method>
+<method name="getLoggerNames"
+ return="java.util.Enumeration&lt;java.lang.String&gt;"
+ abstract="false"
+ native="false"
+ synchronized="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getLoggingMXBean"
+ return="java.util.logging.LoggingMXBean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getProperty"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+</method>
+<method name="readConfiguration"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="readConfiguration"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="ins" type="java.io.InputStream">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="removePropertyChangeListener"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="l" type="java.beans.PropertyChangeListener">
+</parameter>
+</method>
+<method name="reset"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<field name="LOGGING_MXBEAN_NAME"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;java.util.logging:type=Logging&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<class name="LogRecord"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="java.io.Serializable">
+</implements>
+<constructor name="LogRecord"
+ type="java.util.logging.LogRecord"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="level" type="java.util.logging.Level">
+</parameter>
+<parameter name="msg" type="java.lang.String">
+</parameter>
+</constructor>
+<method name="getLevel"
+ return="java.util.logging.Level"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getLoggerName"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getMessage"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getMillis"
+ return="long"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getParameters"
+ return="java.lang.Object[]"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getResourceBundle"
+ return="java.util.ResourceBundle"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getResourceBundleName"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getSequenceNumber"
+ return="long"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getSourceClassName"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getSourceMethodName"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getThreadID"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getThrown"
+ return="java.lang.Throwable"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="setLevel"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="level" type="java.util.logging.Level">
+</parameter>
+</method>
+<method name="setLoggerName"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="loggerName" type="java.lang.String">
+</parameter>
+</method>
+<method name="setMessage"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="message" type="java.lang.String">
+</parameter>
+</method>
+<method name="setMillis"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="millis" type="long">
+</parameter>
+</method>
+<method name="setParameters"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="parameters" type="java.lang.Object[]">
+</parameter>
+</method>
+<method name="setResourceBundle"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="resourceBundle" type="java.util.ResourceBundle">
+</parameter>
+</method>
+<method name="setResourceBundleName"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="resourceBundleName" type="java.lang.String">
+</parameter>
+</method>
+<method name="setSequenceNumber"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="sequenceNumber" type="long">
+</parameter>
+</method>
+<method name="setSourceClassName"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="sourceClassName" type="java.lang.String">
+</parameter>
+</method>
+<method name="setSourceMethodName"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="sourceMethodName" type="java.lang.String">
+</parameter>
+</method>
+<method name="setThreadID"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="threadID" type="int">
+</parameter>
+</method>
+<method name="setThrown"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="thrown" type="java.lang.Throwable">
+</parameter>
+</method>
+</class>
+<class name="Logger"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="Logger"
+ type="java.util.logging.Logger"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+<parameter name="resourceBundleName" type="java.lang.String">
+</parameter>
+</constructor>
+<method name="addHandler"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="handler" type="java.util.logging.Handler">
+</parameter>
+</method>
+<method name="config"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="msg" type="java.lang.String">
+</parameter>
+</method>
+<method name="entering"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="sourceClass" type="java.lang.String">
+</parameter>
+<parameter name="sourceMethod" type="java.lang.String">
+</parameter>
+</method>
+<method name="entering"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="sourceClass" type="java.lang.String">
+</parameter>
+<parameter name="sourceMethod" type="java.lang.String">
+</parameter>
+<parameter name="param" type="java.lang.Object">
+</parameter>
+</method>
+<method name="entering"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="sourceClass" type="java.lang.String">
+</parameter>
+<parameter name="sourceMethod" type="java.lang.String">
+</parameter>
+<parameter name="params" type="java.lang.Object[]">
+</parameter>
+</method>
+<method name="exiting"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="sourceClass" type="java.lang.String">
+</parameter>
+<parameter name="sourceMethod" type="java.lang.String">
+</parameter>
+</method>
+<method name="exiting"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="sourceClass" type="java.lang.String">
+</parameter>
+<parameter name="sourceMethod" type="java.lang.String">
+</parameter>
+<parameter name="result" type="java.lang.Object">
+</parameter>
+</method>
+<method name="fine"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="msg" type="java.lang.String">
+</parameter>
+</method>
+<method name="finer"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="msg" type="java.lang.String">
+</parameter>
+</method>
+<method name="finest"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="msg" type="java.lang.String">
+</parameter>
+</method>
+<method name="getAnonymousLogger"
+ return="java.util.logging.Logger"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getAnonymousLogger"
+ return="java.util.logging.Logger"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="resourceBundleName" type="java.lang.String">
+</parameter>
+</method>
+<method name="getFilter"
+ return="java.util.logging.Filter"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getHandlers"
+ return="java.util.logging.Handler[]"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getLevel"
+ return="java.util.logging.Level"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getLogger"
+ return="java.util.logging.Logger"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+</method>
+<method name="getLogger"
+ return="java.util.logging.Logger"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+<parameter name="resourceBundleName" type="java.lang.String">
+</parameter>
+</method>
+<method name="getName"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getParent"
+ return="java.util.logging.Logger"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getResourceBundle"
+ return="java.util.ResourceBundle"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getResourceBundleName"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getUseParentHandlers"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="info"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="msg" type="java.lang.String">
+</parameter>
+</method>
+<method name="isLoggable"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="l" type="java.util.logging.Level">
+</parameter>
+</method>
+<method name="log"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="logLevel" type="java.util.logging.Level">
+</parameter>
+<parameter name="msg" type="java.lang.String">
+</parameter>
+</method>
+<method name="log"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="logLevel" type="java.util.logging.Level">
+</parameter>
+<parameter name="msg" type="java.lang.String">
+</parameter>
+<parameter name="param" type="java.lang.Object">
+</parameter>
+</method>
+<method name="log"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="logLevel" type="java.util.logging.Level">
+</parameter>
+<parameter name="msg" type="java.lang.String">
+</parameter>
+<parameter name="params" type="java.lang.Object[]">
+</parameter>
+</method>
+<method name="log"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="logLevel" type="java.util.logging.Level">
+</parameter>
+<parameter name="msg" type="java.lang.String">
+</parameter>
+<parameter name="thrown" type="java.lang.Throwable">
+</parameter>
+</method>
+<method name="log"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="record" type="java.util.logging.LogRecord">
+</parameter>
+</method>
+<method name="logp"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="logLevel" type="java.util.logging.Level">
+</parameter>
+<parameter name="sourceClass" type="java.lang.String">
+</parameter>
+<parameter name="sourceMethod" type="java.lang.String">
+</parameter>
+<parameter name="msg" type="java.lang.String">
+</parameter>
+</method>
+<method name="logp"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="logLevel" type="java.util.logging.Level">
+</parameter>
+<parameter name="sourceClass" type="java.lang.String">
+</parameter>
+<parameter name="sourceMethod" type="java.lang.String">
+</parameter>
+<parameter name="msg" type="java.lang.String">
+</parameter>
+<parameter name="param" type="java.lang.Object">
+</parameter>
+</method>
+<method name="logp"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="logLevel" type="java.util.logging.Level">
+</parameter>
+<parameter name="sourceClass" type="java.lang.String">
+</parameter>
+<parameter name="sourceMethod" type="java.lang.String">
+</parameter>
+<parameter name="msg" type="java.lang.String">
+</parameter>
+<parameter name="params" type="java.lang.Object[]">
+</parameter>
+</method>
+<method name="logp"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="logLevel" type="java.util.logging.Level">
+</parameter>
+<parameter name="sourceClass" type="java.lang.String">
+</parameter>
+<parameter name="sourceMethod" type="java.lang.String">
+</parameter>
+<parameter name="msg" type="java.lang.String">
+</parameter>
+<parameter name="thrown" type="java.lang.Throwable">
+</parameter>
+</method>
+<method name="logrb"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="logLevel" type="java.util.logging.Level">
+</parameter>
+<parameter name="sourceClass" type="java.lang.String">
+</parameter>
+<parameter name="sourceMethod" type="java.lang.String">
+</parameter>
+<parameter name="bundleName" type="java.lang.String">
+</parameter>
+<parameter name="msg" type="java.lang.String">
+</parameter>
+</method>
+<method name="logrb"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="logLevel" type="java.util.logging.Level">
+</parameter>
+<parameter name="sourceClass" type="java.lang.String">
+</parameter>
+<parameter name="sourceMethod" type="java.lang.String">
+</parameter>
+<parameter name="bundleName" type="java.lang.String">
+</parameter>
+<parameter name="msg" type="java.lang.String">
+</parameter>
+<parameter name="param" type="java.lang.Object">
+</parameter>
+</method>
+<method name="logrb"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="logLevel" type="java.util.logging.Level">
+</parameter>
+<parameter name="sourceClass" type="java.lang.String">
+</parameter>
+<parameter name="sourceMethod" type="java.lang.String">
+</parameter>
+<parameter name="bundleName" type="java.lang.String">
+</parameter>
+<parameter name="msg" type="java.lang.String">
+</parameter>
+<parameter name="params" type="java.lang.Object[]">
+</parameter>
+</method>
+<method name="logrb"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="logLevel" type="java.util.logging.Level">
+</parameter>
+<parameter name="sourceClass" type="java.lang.String">
+</parameter>
+<parameter name="sourceMethod" type="java.lang.String">
+</parameter>
+<parameter name="bundleName" type="java.lang.String">
+</parameter>
+<parameter name="msg" type="java.lang.String">
+</parameter>
+<parameter name="thrown" type="java.lang.Throwable">
+</parameter>
+</method>
+<method name="removeHandler"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="handler" type="java.util.logging.Handler">
+</parameter>
+</method>
+<method name="setFilter"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="newFilter" type="java.util.logging.Filter">
+</parameter>
+</method>
+<method name="setLevel"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="newLevel" type="java.util.logging.Level">
+</parameter>
+</method>
+<method name="setParent"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="parent" type="java.util.logging.Logger">
+</parameter>
+</method>
+<method name="setUseParentHandlers"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="notifyParentHandlers" type="boolean">
+</parameter>
+</method>
+<method name="severe"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="msg" type="java.lang.String">
+</parameter>
+</method>
+<method name="throwing"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="sourceClass" type="java.lang.String">
+</parameter>
+<parameter name="sourceMethod" type="java.lang.String">
+</parameter>
+<parameter name="thrown" type="java.lang.Throwable">
+</parameter>
+</method>
+<method name="warning"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="msg" type="java.lang.String">
+</parameter>
+</method>
+<field name="global"
+ type="java.util.logging.Logger"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<interface name="LoggingMXBean"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="getLoggerLevel"
+ return="java.lang.String"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="loggerName" type="java.lang.String">
+</parameter>
+</method>
+<method name="getLoggerNames"
+ return="java.util.List&lt;java.lang.String&gt;"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getParentLoggerName"
+ return="java.lang.String"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="loggerName" type="java.lang.String">
+</parameter>
+</method>
+<method name="setLoggerLevel"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="loggerName" type="java.lang.String">
+</parameter>
+<parameter name="levelName" type="java.lang.String">
+</parameter>
+</method>
+</interface>
+<class name="LoggingPermission"
+ extends="java.security.BasicPermission"
+ abstract="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="java.security.Guard">
+</implements>
+<implements name="java.io.Serializable">
+</implements>
+<constructor name="LoggingPermission"
+ type="java.util.logging.LoggingPermission"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+<parameter name="actions" type="java.lang.String">
+</parameter>
+</constructor>
+</class>
+<class name="MemoryHandler"
+ extends="java.util.logging.Handler"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="MemoryHandler"
+ type="java.util.logging.MemoryHandler"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<constructor name="MemoryHandler"
+ type="java.util.logging.MemoryHandler"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="target" type="java.util.logging.Handler">
+</parameter>
+<parameter name="size" type="int">
+</parameter>
+<parameter name="pushLevel" type="java.util.logging.Level">
+</parameter>
+</constructor>
+<method name="close"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="flush"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getPushLevel"
+ return="java.util.logging.Level"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="publish"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="record" type="java.util.logging.LogRecord">
+</parameter>
+</method>
+<method name="push"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="setPushLevel"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="newLevel" type="java.util.logging.Level">
+</parameter>
+</method>
+</class>
+<class name="SimpleFormatter"
+ extends="java.util.logging.Formatter"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="SimpleFormatter"
+ type="java.util.logging.SimpleFormatter"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<method name="format"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="r" type="java.util.logging.LogRecord">
+</parameter>
+</method>
+</class>
+<class name="SocketHandler"
+ extends="java.util.logging.StreamHandler"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="SocketHandler"
+ type="java.util.logging.SocketHandler"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</constructor>
+<constructor name="SocketHandler"
+ type="java.util.logging.SocketHandler"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="host" type="java.lang.String">
+</parameter>
+<parameter name="port" type="int">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</constructor>
+</class>
+<class name="StreamHandler"
+ extends="java.util.logging.Handler"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="StreamHandler"
+ type="java.util.logging.StreamHandler"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<constructor name="StreamHandler"
+ type="java.util.logging.StreamHandler"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="os" type="java.io.OutputStream">
+</parameter>
+<parameter name="formatter" type="java.util.logging.Formatter">
+</parameter>
+</constructor>
+<method name="close"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="flush"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="publish"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="record" type="java.util.logging.LogRecord">
+</parameter>
+</method>
+<method name="setOutputStream"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="os" type="java.io.OutputStream">
+</parameter>
+</method>
+</class>
+<class name="XMLFormatter"
+ extends="java.util.logging.Formatter"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="XMLFormatter"
+ type="java.util.logging.XMLFormatter"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<method name="format"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="r" type="java.util.logging.LogRecord">
+</parameter>
+</method>
+</class>
+</package>
+<package name="java.util.prefs"
+>
+<class name="AbstractPreferences"
+ extends="java.util.prefs.Preferences"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="AbstractPreferences"
+ type="java.util.prefs.AbstractPreferences"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="parent" type="java.util.prefs.AbstractPreferences">
+</parameter>
+<parameter name="name" type="java.lang.String">
+</parameter>
+</constructor>
+<method name="absolutePath"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="addNodeChangeListener"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="ncl" type="java.util.prefs.NodeChangeListener">
+</parameter>
+</method>
+<method name="addPreferenceChangeListener"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="pcl" type="java.util.prefs.PreferenceChangeListener">
+</parameter>
+</method>
+<method name="cachedChildren"
+ return="java.util.prefs.AbstractPreferences[]"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</method>
+<method name="childSpi"
+ return="java.util.prefs.AbstractPreferences"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+</method>
+<method name="childrenNames"
+ return="java.lang.String[]"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="BackingStoreException" type="java.util.prefs.BackingStoreException">
+</exception>
+</method>
+<method name="childrenNamesSpi"
+ return="java.lang.String[]"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<exception name="BackingStoreException" type="java.util.prefs.BackingStoreException">
+</exception>
+</method>
+<method name="clear"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="BackingStoreException" type="java.util.prefs.BackingStoreException">
+</exception>
+</method>
+<method name="exportNode"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="ostream" type="java.io.OutputStream">
+</parameter>
+<exception name="BackingStoreException" type="java.util.prefs.BackingStoreException">
+</exception>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="exportSubtree"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="ostream" type="java.io.OutputStream">
+</parameter>
+<exception name="BackingStoreException" type="java.util.prefs.BackingStoreException">
+</exception>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="flush"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="BackingStoreException" type="java.util.prefs.BackingStoreException">
+</exception>
+</method>
+<method name="flushSpi"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<exception name="BackingStoreException" type="java.util.prefs.BackingStoreException">
+</exception>
+</method>
+<method name="get"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="key" type="java.lang.String">
+</parameter>
+<parameter name="deflt" type="java.lang.String">
+</parameter>
+</method>
+<method name="getBoolean"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="key" type="java.lang.String">
+</parameter>
+<parameter name="deflt" type="boolean">
+</parameter>
+</method>
+<method name="getByteArray"
+ return="byte[]"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="key" type="java.lang.String">
+</parameter>
+<parameter name="deflt" type="byte[]">
+</parameter>
+</method>
+<method name="getChild"
+ return="java.util.prefs.AbstractPreferences"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+<exception name="BackingStoreException" type="java.util.prefs.BackingStoreException">
+</exception>
+</method>
+<method name="getDouble"
+ return="double"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="key" type="java.lang.String">
+</parameter>
+<parameter name="deflt" type="double">
+</parameter>
+</method>
+<method name="getFloat"
+ return="float"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="key" type="java.lang.String">
+</parameter>
+<parameter name="deflt" type="float">
+</parameter>
+</method>
+<method name="getInt"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="key" type="java.lang.String">
+</parameter>
+<parameter name="deflt" type="int">
+</parameter>
+</method>
+<method name="getLong"
+ return="long"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="key" type="java.lang.String">
+</parameter>
+<parameter name="deflt" type="long">
+</parameter>
+</method>
+<method name="getSpi"
+ return="java.lang.String"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="key" type="java.lang.String">
+</parameter>
+</method>
+<method name="isRemoved"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</method>
+<method name="isUserNode"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="keys"
+ return="java.lang.String[]"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="BackingStoreException" type="java.util.prefs.BackingStoreException">
+</exception>
+</method>
+<method name="keysSpi"
+ return="java.lang.String[]"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<exception name="BackingStoreException" type="java.util.prefs.BackingStoreException">
+</exception>
+</method>
+<method name="name"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="node"
+ return="java.util.prefs.Preferences"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+</method>
+<method name="nodeExists"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+<exception name="BackingStoreException" type="java.util.prefs.BackingStoreException">
+</exception>
+</method>
+<method name="parent"
+ return="java.util.prefs.Preferences"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="put"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="key" type="java.lang.String">
+</parameter>
+<parameter name="value" type="java.lang.String">
+</parameter>
+</method>
+<method name="putBoolean"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="key" type="java.lang.String">
+</parameter>
+<parameter name="value" type="boolean">
+</parameter>
+</method>
+<method name="putByteArray"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="key" type="java.lang.String">
+</parameter>
+<parameter name="value" type="byte[]">
+</parameter>
+</method>
+<method name="putDouble"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="key" type="java.lang.String">
+</parameter>
+<parameter name="value" type="double">
+</parameter>
+</method>
+<method name="putFloat"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="key" type="java.lang.String">
+</parameter>
+<parameter name="value" type="float">
+</parameter>
+</method>
+<method name="putInt"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="key" type="java.lang.String">
+</parameter>
+<parameter name="value" type="int">
+</parameter>
+</method>
+<method name="putLong"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="key" type="java.lang.String">
+</parameter>
+<parameter name="value" type="long">
+</parameter>
+</method>
+<method name="putSpi"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+<parameter name="value" type="java.lang.String">
+</parameter>
+</method>
+<method name="remove"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="key" type="java.lang.String">
+</parameter>
+</method>
+<method name="removeNode"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="BackingStoreException" type="java.util.prefs.BackingStoreException">
+</exception>
+</method>
+<method name="removeNodeChangeListener"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="ncl" type="java.util.prefs.NodeChangeListener">
+</parameter>
+</method>
+<method name="removeNodeSpi"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<exception name="BackingStoreException" type="java.util.prefs.BackingStoreException">
+</exception>
+</method>
+<method name="removePreferenceChangeListener"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="pcl" type="java.util.prefs.PreferenceChangeListener">
+</parameter>
+</method>
+<method name="removeSpi"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="key" type="java.lang.String">
+</parameter>
+</method>
+<method name="sync"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="BackingStoreException" type="java.util.prefs.BackingStoreException">
+</exception>
+</method>
+<method name="syncSpi"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<exception name="BackingStoreException" type="java.util.prefs.BackingStoreException">
+</exception>
+</method>
+<method name="toString"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<field name="lock"
+ type="java.lang.Object"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</field>
+<field name="newNode"
+ type="boolean"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</field>
+</class>
+<class name="BackingStoreException"
+ extends="java.lang.Exception"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="BackingStoreException"
+ type="java.util.prefs.BackingStoreException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="s" type="java.lang.String">
+</parameter>
+</constructor>
+<constructor name="BackingStoreException"
+ type="java.util.prefs.BackingStoreException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="t" type="java.lang.Throwable">
+</parameter>
+</constructor>
+</class>
+<class name="InvalidPreferencesFormatException"
+ extends="java.lang.Exception"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="InvalidPreferencesFormatException"
+ type="java.util.prefs.InvalidPreferencesFormatException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="s" type="java.lang.String">
+</parameter>
+</constructor>
+<constructor name="InvalidPreferencesFormatException"
+ type="java.util.prefs.InvalidPreferencesFormatException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="s" type="java.lang.String">
+</parameter>
+<parameter name="t" type="java.lang.Throwable">
+</parameter>
+</constructor>
+<constructor name="InvalidPreferencesFormatException"
+ type="java.util.prefs.InvalidPreferencesFormatException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="t" type="java.lang.Throwable">
+</parameter>
+</constructor>
+</class>
+<class name="NodeChangeEvent"
+ extends="java.util.EventObject"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="java.io.Serializable">
+</implements>
+<constructor name="NodeChangeEvent"
+ type="java.util.prefs.NodeChangeEvent"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="p" type="java.util.prefs.Preferences">
+</parameter>
+<parameter name="c" type="java.util.prefs.Preferences">
+</parameter>
+</constructor>
+<method name="getChild"
+ return="java.util.prefs.Preferences"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getParent"
+ return="java.util.prefs.Preferences"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+</class>
+<interface name="NodeChangeListener"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="java.util.EventListener">
+</implements>
+<method name="childAdded"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="e" type="java.util.prefs.NodeChangeEvent">
+</parameter>
+</method>
+<method name="childRemoved"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="e" type="java.util.prefs.NodeChangeEvent">
+</parameter>
+</method>
+</interface>
+<class name="PreferenceChangeEvent"
+ extends="java.util.EventObject"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="java.io.Serializable">
+</implements>
+<constructor name="PreferenceChangeEvent"
+ type="java.util.prefs.PreferenceChangeEvent"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="p" type="java.util.prefs.Preferences">
+</parameter>
+<parameter name="k" type="java.lang.String">
+</parameter>
+<parameter name="v" type="java.lang.String">
+</parameter>
+</constructor>
+<method name="getKey"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getNewValue"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getNode"
+ return="java.util.prefs.Preferences"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+</class>
+<interface name="PreferenceChangeListener"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="java.util.EventListener">
+</implements>
+<method name="preferenceChange"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="pce" type="java.util.prefs.PreferenceChangeEvent">
+</parameter>
+</method>
+</interface>
+<class name="Preferences"
+ extends="java.lang.Object"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="Preferences"
+ type="java.util.prefs.Preferences"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</constructor>
+<method name="absolutePath"
+ return="java.lang.String"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="addNodeChangeListener"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="ncl" type="java.util.prefs.NodeChangeListener">
+</parameter>
+</method>
+<method name="addPreferenceChangeListener"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="pcl" type="java.util.prefs.PreferenceChangeListener">
+</parameter>
+</method>
+<method name="childrenNames"
+ return="java.lang.String[]"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="BackingStoreException" type="java.util.prefs.BackingStoreException">
+</exception>
+</method>
+<method name="clear"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="BackingStoreException" type="java.util.prefs.BackingStoreException">
+</exception>
+</method>
+<method name="exportNode"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="ostream" type="java.io.OutputStream">
+</parameter>
+<exception name="BackingStoreException" type="java.util.prefs.BackingStoreException">
+</exception>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="exportSubtree"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="ostream" type="java.io.OutputStream">
+</parameter>
+<exception name="BackingStoreException" type="java.util.prefs.BackingStoreException">
+</exception>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="flush"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="BackingStoreException" type="java.util.prefs.BackingStoreException">
+</exception>
+</method>
+<method name="get"
+ return="java.lang.String"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="key" type="java.lang.String">
+</parameter>
+<parameter name="deflt" type="java.lang.String">
+</parameter>
+</method>
+<method name="getBoolean"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="key" type="java.lang.String">
+</parameter>
+<parameter name="deflt" type="boolean">
+</parameter>
+</method>
+<method name="getByteArray"
+ return="byte[]"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="key" type="java.lang.String">
+</parameter>
+<parameter name="deflt" type="byte[]">
+</parameter>
+</method>
+<method name="getDouble"
+ return="double"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="key" type="java.lang.String">
+</parameter>
+<parameter name="deflt" type="double">
+</parameter>
+</method>
+<method name="getFloat"
+ return="float"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="key" type="java.lang.String">
+</parameter>
+<parameter name="deflt" type="float">
+</parameter>
+</method>
+<method name="getInt"
+ return="int"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="key" type="java.lang.String">
+</parameter>
+<parameter name="deflt" type="int">
+</parameter>
+</method>
+<method name="getLong"
+ return="long"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="key" type="java.lang.String">
+</parameter>
+<parameter name="deflt" type="long">
+</parameter>
+</method>
+<method name="importPreferences"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="istream" type="java.io.InputStream">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+<exception name="InvalidPreferencesFormatException" type="java.util.prefs.InvalidPreferencesFormatException">
+</exception>
+</method>
+<method name="isUserNode"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="keys"
+ return="java.lang.String[]"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="BackingStoreException" type="java.util.prefs.BackingStoreException">
+</exception>
+</method>
+<method name="name"
+ return="java.lang.String"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="node"
+ return="java.util.prefs.Preferences"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="path" type="java.lang.String">
+</parameter>
+</method>
+<method name="nodeExists"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="path" type="java.lang.String">
+</parameter>
+<exception name="BackingStoreException" type="java.util.prefs.BackingStoreException">
+</exception>
+</method>
+<method name="parent"
+ return="java.util.prefs.Preferences"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="put"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="key" type="java.lang.String">
+</parameter>
+<parameter name="value" type="java.lang.String">
+</parameter>
+</method>
+<method name="putBoolean"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="key" type="java.lang.String">
+</parameter>
+<parameter name="value" type="boolean">
+</parameter>
+</method>
+<method name="putByteArray"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="key" type="java.lang.String">
+</parameter>
+<parameter name="value" type="byte[]">
+</parameter>
+</method>
+<method name="putDouble"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="key" type="java.lang.String">
+</parameter>
+<parameter name="value" type="double">
+</parameter>
+</method>
+<method name="putFloat"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="key" type="java.lang.String">
+</parameter>
+<parameter name="value" type="float">
+</parameter>
+</method>
+<method name="putInt"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="key" type="java.lang.String">
+</parameter>
+<parameter name="value" type="int">
+</parameter>
+</method>
+<method name="putLong"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="key" type="java.lang.String">
+</parameter>
+<parameter name="value" type="long">
+</parameter>
+</method>
+<method name="remove"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="key" type="java.lang.String">
+</parameter>
+</method>
+<method name="removeNode"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="BackingStoreException" type="java.util.prefs.BackingStoreException">
+</exception>
+</method>
+<method name="removeNodeChangeListener"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="ncl" type="java.util.prefs.NodeChangeListener">
+</parameter>
+</method>
+<method name="removePreferenceChangeListener"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="pcl" type="java.util.prefs.PreferenceChangeListener">
+</parameter>
+</method>
+<method name="sync"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="BackingStoreException" type="java.util.prefs.BackingStoreException">
+</exception>
+</method>
+<method name="systemNodeForPackage"
+ return="java.util.prefs.Preferences"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="c" type="java.lang.Class&lt;?&gt;">
+</parameter>
+</method>
+<method name="systemRoot"
+ return="java.util.prefs.Preferences"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="toString"
+ return="java.lang.String"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="userNodeForPackage"
+ return="java.util.prefs.Preferences"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="c" type="java.lang.Class&lt;?&gt;">
+</parameter>
+</method>
+<method name="userRoot"
+ return="java.util.prefs.Preferences"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<field name="MAX_KEY_LENGTH"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="80"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="MAX_NAME_LENGTH"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="80"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="MAX_VALUE_LENGTH"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="8192"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<interface name="PreferencesFactory"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="systemRoot"
+ return="java.util.prefs.Preferences"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="userRoot"
+ return="java.util.prefs.Preferences"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+</interface>
+</package>
+<package name="java.util.regex"
+>
+<interface name="MatchResult"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="end"
+ return="int"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="end"
+ return="int"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="group" type="int">
+</parameter>
+</method>
+<method name="group"
+ return="java.lang.String"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="group"
+ return="java.lang.String"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="group" type="int">
+</parameter>
+</method>
+<method name="groupCount"
+ return="int"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="start"
+ return="int"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="start"
+ return="int"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="group" type="int">
+</parameter>
+</method>
+</interface>
+<class name="Matcher"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="java.util.regex.MatchResult">
+</implements>
+<method name="appendReplacement"
+ return="java.util.regex.Matcher"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="buffer" type="java.lang.StringBuffer">
+</parameter>
+<parameter name="replacement" type="java.lang.String">
+</parameter>
+</method>
+<method name="appendTail"
+ return="java.lang.StringBuffer"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="buffer" type="java.lang.StringBuffer">
+</parameter>
+</method>
+<method name="end"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="group" type="int">
+</parameter>
+</method>
+<method name="end"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="find"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="start" type="int">
+</parameter>
+</method>
+<method name="find"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="group"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="group" type="int">
+</parameter>
+</method>
+<method name="group"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="groupCount"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="hasAnchoringBounds"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="hasTransparentBounds"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="hitEnd"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="lookingAt"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="matches"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="pattern"
+ return="java.util.regex.Pattern"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="quoteReplacement"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="s" type="java.lang.String">
+</parameter>
+</method>
+<method name="region"
+ return="java.util.regex.Matcher"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="start" type="int">
+</parameter>
+<parameter name="end" type="int">
+</parameter>
+</method>
+<method name="regionEnd"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="regionStart"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="replaceAll"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="replacement" type="java.lang.String">
+</parameter>
+</method>
+<method name="replaceFirst"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="replacement" type="java.lang.String">
+</parameter>
+</method>
+<method name="requireEnd"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="reset"
+ return="java.util.regex.Matcher"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="input" type="java.lang.CharSequence">
+</parameter>
+</method>
+<method name="reset"
+ return="java.util.regex.Matcher"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="start"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="group" type="int">
+</parameter>
+<exception name="IllegalStateException" type="java.lang.IllegalStateException">
+</exception>
+</method>
+<method name="start"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="toMatchResult"
+ return="java.util.regex.MatchResult"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="useAnchoringBounds"
+ return="java.util.regex.Matcher"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="value" type="boolean">
+</parameter>
+</method>
+<method name="usePattern"
+ return="java.util.regex.Matcher"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="pattern" type="java.util.regex.Pattern">
+</parameter>
+</method>
+<method name="useTransparentBounds"
+ return="java.util.regex.Matcher"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="value" type="boolean">
+</parameter>
+</method>
+</class>
+<class name="Pattern"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="java.io.Serializable">
+</implements>
+<method name="compile"
+ return="java.util.regex.Pattern"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="pattern" type="java.lang.String">
+</parameter>
+<parameter name="flags" type="int">
+</parameter>
+<exception name="PatternSyntaxException" type="java.util.regex.PatternSyntaxException">
+</exception>
+</method>
+<method name="compile"
+ return="java.util.regex.Pattern"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="pattern" type="java.lang.String">
+</parameter>
+</method>
+<method name="flags"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="matcher"
+ return="java.util.regex.Matcher"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="input" type="java.lang.CharSequence">
+</parameter>
+</method>
+<method name="matches"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="regex" type="java.lang.String">
+</parameter>
+<parameter name="input" type="java.lang.CharSequence">
+</parameter>
+</method>
+<method name="pattern"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="quote"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="s" type="java.lang.String">
+</parameter>
+</method>
+<method name="split"
+ return="java.lang.String[]"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="inputSeq" type="java.lang.CharSequence">
+</parameter>
+<parameter name="limit" type="int">
+</parameter>
+</method>
+<method name="split"
+ return="java.lang.String[]"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="input" type="java.lang.CharSequence">
+</parameter>
+</method>
+<field name="CANON_EQ"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="128"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="CASE_INSENSITIVE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="COMMENTS"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="4"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="DOTALL"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="32"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="LITERAL"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="MULTILINE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="8"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="UNICODE_CASE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="64"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="UNIX_LINES"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<class name="PatternSyntaxException"
+ extends="java.lang.IllegalArgumentException"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="PatternSyntaxException"
+ type="java.util.regex.PatternSyntaxException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="description" type="java.lang.String">
+</parameter>
+<parameter name="pattern" type="java.lang.String">
+</parameter>
+<parameter name="index" type="int">
+</parameter>
+</constructor>
+<method name="getDescription"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getIndex"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getPattern"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+</class>
+</package>
+<package name="java.util.zip"
+>
+<class name="Adler32"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="java.util.zip.Checksum">
+</implements>
+<constructor name="Adler32"
+ type="java.util.zip.Adler32"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<method name="getValue"
+ return="long"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="reset"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="update"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="i" type="int">
+</parameter>
+</method>
+<method name="update"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="buf" type="byte[]">
+</parameter>
+</method>
+<method name="update"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="buf" type="byte[]">
+</parameter>
+<parameter name="off" type="int">
+</parameter>
+<parameter name="nbytes" type="int">
+</parameter>
+</method>
+</class>
+<class name="CRC32"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="java.util.zip.Checksum">
+</implements>
+<constructor name="CRC32"
+ type="java.util.zip.CRC32"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<method name="getValue"
+ return="long"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="reset"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="update"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="val" type="int">
+</parameter>
+</method>
+<method name="update"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="buf" type="byte[]">
+</parameter>
+</method>
+<method name="update"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="buf" type="byte[]">
+</parameter>
+<parameter name="off" type="int">
+</parameter>
+<parameter name="nbytes" type="int">
+</parameter>
+</method>
+</class>
+<class name="CheckedInputStream"
+ extends="java.io.FilterInputStream"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="CheckedInputStream"
+ type="java.util.zip.CheckedInputStream"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="is" type="java.io.InputStream">
+</parameter>
+<parameter name="csum" type="java.util.zip.Checksum">
+</parameter>
+</constructor>
+<method name="getChecksum"
+ return="java.util.zip.Checksum"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+</class>
+<class name="CheckedOutputStream"
+ extends="java.io.FilterOutputStream"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="CheckedOutputStream"
+ type="java.util.zip.CheckedOutputStream"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="os" type="java.io.OutputStream">
+</parameter>
+<parameter name="cs" type="java.util.zip.Checksum">
+</parameter>
+</constructor>
+<method name="getChecksum"
+ return="java.util.zip.Checksum"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+</class>
+<interface name="Checksum"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="getValue"
+ return="long"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="reset"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="update"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="buf" type="byte[]">
+</parameter>
+<parameter name="off" type="int">
+</parameter>
+<parameter name="nbytes" type="int">
+</parameter>
+</method>
+<method name="update"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="val" type="int">
+</parameter>
+</method>
+</interface>
+<class name="DataFormatException"
+ extends="java.lang.Exception"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="DataFormatException"
+ type="java.util.zip.DataFormatException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<constructor name="DataFormatException"
+ type="java.util.zip.DataFormatException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="detailMessage" type="java.lang.String">
+</parameter>
+</constructor>
+</class>
+<class name="Deflater"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="Deflater"
+ type="java.util.zip.Deflater"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<constructor name="Deflater"
+ type="java.util.zip.Deflater"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="level" type="int">
+</parameter>
+</constructor>
+<constructor name="Deflater"
+ type="java.util.zip.Deflater"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="level" type="int">
+</parameter>
+<parameter name="noHeader" type="boolean">
+</parameter>
+</constructor>
+<method name="deflate"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="buf" type="byte[]">
+</parameter>
+</method>
+<method name="deflate"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="buf" type="byte[]">
+</parameter>
+<parameter name="off" type="int">
+</parameter>
+<parameter name="nbytes" type="int">
+</parameter>
+</method>
+<method name="end"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="finish"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="finished"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getAdler"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getBytesRead"
+ return="long"
+ abstract="false"
+ native="false"
+ synchronized="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getBytesWritten"
+ return="long"
+ abstract="false"
+ native="false"
+ synchronized="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getTotalIn"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getTotalOut"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="needsInput"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="reset"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="setDictionary"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="buf" type="byte[]">
+</parameter>
+</method>
+<method name="setDictionary"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="buf" type="byte[]">
+</parameter>
+<parameter name="off" type="int">
+</parameter>
+<parameter name="nbytes" type="int">
+</parameter>
+</method>
+<method name="setInput"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="buf" type="byte[]">
+</parameter>
+</method>
+<method name="setInput"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="buf" type="byte[]">
+</parameter>
+<parameter name="off" type="int">
+</parameter>
+<parameter name="nbytes" type="int">
+</parameter>
+</method>
+<method name="setLevel"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="level" type="int">
+</parameter>
+</method>
+<method name="setStrategy"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="strategy" type="int">
+</parameter>
+</method>
+<field name="BEST_COMPRESSION"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="9"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="BEST_SPEED"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="DEFAULT_COMPRESSION"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="-1"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="DEFAULT_STRATEGY"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="0"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="DEFLATED"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="8"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="FILTERED"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="HUFFMAN_ONLY"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="NO_COMPRESSION"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="0"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<class name="DeflaterOutputStream"
+ extends="java.io.FilterOutputStream"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="DeflaterOutputStream"
+ type="java.util.zip.DeflaterOutputStream"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="os" type="java.io.OutputStream">
+</parameter>
+<parameter name="def" type="java.util.zip.Deflater">
+</parameter>
+</constructor>
+<constructor name="DeflaterOutputStream"
+ type="java.util.zip.DeflaterOutputStream"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="os" type="java.io.OutputStream">
+</parameter>
+</constructor>
+<constructor name="DeflaterOutputStream"
+ type="java.util.zip.DeflaterOutputStream"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="os" type="java.io.OutputStream">
+</parameter>
+<parameter name="def" type="java.util.zip.Deflater">
+</parameter>
+<parameter name="bsize" type="int">
+</parameter>
+</constructor>
+<method name="deflate"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="finish"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<field name="buf"
+ type="byte[]"
+ transient="false"
+ volatile="false"
+ value="null"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</field>
+<field name="def"
+ type="java.util.zip.Deflater"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</field>
+</class>
+<class name="GZIPInputStream"
+ extends="java.util.zip.InflaterInputStream"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="GZIPInputStream"
+ type="java.util.zip.GZIPInputStream"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="is" type="java.io.InputStream">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</constructor>
+<constructor name="GZIPInputStream"
+ type="java.util.zip.GZIPInputStream"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="is" type="java.io.InputStream">
+</parameter>
+<parameter name="size" type="int">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</constructor>
+<field name="GZIP_MAGIC"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="35615"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="crc"
+ type="java.util.zip.CRC32"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</field>
+<field name="eos"
+ type="boolean"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</field>
+</class>
+<class name="GZIPOutputStream"
+ extends="java.util.zip.DeflaterOutputStream"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="GZIPOutputStream"
+ type="java.util.zip.GZIPOutputStream"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="os" type="java.io.OutputStream">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</constructor>
+<constructor name="GZIPOutputStream"
+ type="java.util.zip.GZIPOutputStream"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="os" type="java.io.OutputStream">
+</parameter>
+<parameter name="size" type="int">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</constructor>
+<field name="crc"
+ type="java.util.zip.CRC32"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</field>
+</class>
+<class name="Inflater"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="Inflater"
+ type="java.util.zip.Inflater"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<constructor name="Inflater"
+ type="java.util.zip.Inflater"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="noHeader" type="boolean">
+</parameter>
+</constructor>
+<method name="end"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="finished"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getAdler"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getBytesRead"
+ return="long"
+ abstract="false"
+ native="false"
+ synchronized="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getBytesWritten"
+ return="long"
+ abstract="false"
+ native="false"
+ synchronized="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getRemaining"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getTotalIn"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getTotalOut"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="inflate"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="buf" type="byte[]">
+</parameter>
+<exception name="DataFormatException" type="java.util.zip.DataFormatException">
+</exception>
+</method>
+<method name="inflate"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="buf" type="byte[]">
+</parameter>
+<parameter name="off" type="int">
+</parameter>
+<parameter name="nbytes" type="int">
+</parameter>
+<exception name="DataFormatException" type="java.util.zip.DataFormatException">
+</exception>
+</method>
+<method name="needsDictionary"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="needsInput"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="reset"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="setDictionary"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="buf" type="byte[]">
+</parameter>
+</method>
+<method name="setDictionary"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="buf" type="byte[]">
+</parameter>
+<parameter name="off" type="int">
+</parameter>
+<parameter name="nbytes" type="int">
+</parameter>
+</method>
+<method name="setInput"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="buf" type="byte[]">
+</parameter>
+</method>
+<method name="setInput"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="buf" type="byte[]">
+</parameter>
+<parameter name="off" type="int">
+</parameter>
+<parameter name="nbytes" type="int">
+</parameter>
+</method>
+</class>
+<class name="InflaterInputStream"
+ extends="java.io.FilterInputStream"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="InflaterInputStream"
+ type="java.util.zip.InflaterInputStream"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="is" type="java.io.InputStream">
+</parameter>
+</constructor>
+<constructor name="InflaterInputStream"
+ type="java.util.zip.InflaterInputStream"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="is" type="java.io.InputStream">
+</parameter>
+<parameter name="inf" type="java.util.zip.Inflater">
+</parameter>
+</constructor>
+<constructor name="InflaterInputStream"
+ type="java.util.zip.InflaterInputStream"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="is" type="java.io.InputStream">
+</parameter>
+<parameter name="inf" type="java.util.zip.Inflater">
+</parameter>
+<parameter name="bsize" type="int">
+</parameter>
+</constructor>
+<method name="fill"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<field name="buf"
+ type="byte[]"
+ transient="false"
+ volatile="false"
+ value="null"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</field>
+<field name="inf"
+ type="java.util.zip.Inflater"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</field>
+<field name="len"
+ type="int"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</field>
+</class>
+<class name="ZipEntry"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="java.lang.Cloneable">
+</implements>
+<constructor name="ZipEntry"
+ type="java.util.zip.ZipEntry"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+</constructor>
+<constructor name="ZipEntry"
+ type="java.util.zip.ZipEntry"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="ze" type="java.util.zip.ZipEntry">
+</parameter>
+</constructor>
+<method name="clone"
+ return="java.lang.Object"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getComment"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getCompressedSize"
+ return="long"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getCrc"
+ return="long"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getExtra"
+ return="byte[]"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getMethod"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getName"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getSize"
+ return="long"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getTime"
+ return="long"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isDirectory"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="setComment"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="string" type="java.lang.String">
+</parameter>
+</method>
+<method name="setCompressedSize"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="value" type="long">
+</parameter>
+</method>
+<method name="setCrc"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="value" type="long">
+</parameter>
+</method>
+<method name="setExtra"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="data" type="byte[]">
+</parameter>
+</method>
+<method name="setMethod"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="value" type="int">
+</parameter>
+</method>
+<method name="setSize"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="value" type="long">
+</parameter>
+</method>
+<method name="setTime"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="value" type="long">
+</parameter>
+</method>
+<field name="DEFLATED"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="8"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="STORED"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="0"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<class name="ZipException"
+ extends="java.io.IOException"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="ZipException"
+ type="java.util.zip.ZipException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<constructor name="ZipException"
+ type="java.util.zip.ZipException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="detailMessage" type="java.lang.String">
+</parameter>
+</constructor>
+</class>
+<class name="ZipFile"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="ZipFile"
+ type="java.util.zip.ZipFile"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="file" type="java.io.File">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+<exception name="ZipException" type="java.util.zip.ZipException">
+</exception>
+</constructor>
+<constructor name="ZipFile"
+ type="java.util.zip.ZipFile"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="file" type="java.io.File">
+</parameter>
+<parameter name="mode" type="int">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</constructor>
+<constructor name="ZipFile"
+ type="java.util.zip.ZipFile"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</constructor>
+<method name="close"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="entries"
+ return="java.util.Enumeration&lt;? extends java.util.zip.ZipEntry&gt;"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getEntry"
+ return="java.util.zip.ZipEntry"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="entryName" type="java.lang.String">
+</parameter>
+</method>
+<method name="getInputStream"
+ return="java.io.InputStream"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="entry" type="java.util.zip.ZipEntry">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="getName"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="size"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<field name="OPEN_DELETE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="4"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="OPEN_READ"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<class name="ZipInputStream"
+ extends="java.util.zip.InflaterInputStream"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="ZipInputStream"
+ type="java.util.zip.ZipInputStream"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="stream" type="java.io.InputStream">
+</parameter>
+</constructor>
+<method name="closeEntry"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="createZipEntry"
+ return="java.util.zip.ZipEntry"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+</method>
+<method name="getNextEntry"
+ return="java.util.zip.ZipEntry"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+</class>
+<class name="ZipOutputStream"
+ extends="java.util.zip.DeflaterOutputStream"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="ZipOutputStream"
+ type="java.util.zip.ZipOutputStream"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="p1" type="java.io.OutputStream">
+</parameter>
+</constructor>
+<method name="closeEntry"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="putNextEntry"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="ze" type="java.util.zip.ZipEntry">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="setComment"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="comment" type="java.lang.String">
+</parameter>
+</method>
+<method name="setLevel"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="level" type="int">
+</parameter>
+</method>
+<method name="setMethod"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="method" type="int">
+</parameter>
+</method>
+<field name="DEFLATED"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="8"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="STORED"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="0"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+</package>
+<package name="javax.crypto"
+>
+<class name="BadPaddingException"
+ extends="java.security.GeneralSecurityException"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="BadPaddingException"
+ type="javax.crypto.BadPaddingException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="msg" type="java.lang.String">
+</parameter>
+</constructor>
+<constructor name="BadPaddingException"
+ type="javax.crypto.BadPaddingException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+</class>
+<class name="Cipher"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="Cipher"
+ type="javax.crypto.Cipher"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="cipherSpi" type="javax.crypto.CipherSpi">
+</parameter>
+<parameter name="provider" type="java.security.Provider">
+</parameter>
+<parameter name="transformation" type="java.lang.String">
+</parameter>
+</constructor>
+<method name="doFinal"
+ return="byte[]"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="BadPaddingException" type="javax.crypto.BadPaddingException">
+</exception>
+<exception name="IllegalBlockSizeException" type="javax.crypto.IllegalBlockSizeException">
+</exception>
+</method>
+<method name="doFinal"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="output" type="byte[]">
+</parameter>
+<parameter name="outputOffset" type="int">
+</parameter>
+<exception name="BadPaddingException" type="javax.crypto.BadPaddingException">
+</exception>
+<exception name="IllegalBlockSizeException" type="javax.crypto.IllegalBlockSizeException">
+</exception>
+<exception name="ShortBufferException" type="javax.crypto.ShortBufferException">
+</exception>
+</method>
+<method name="doFinal"
+ return="byte[]"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="input" type="byte[]">
+</parameter>
+<exception name="BadPaddingException" type="javax.crypto.BadPaddingException">
+</exception>
+<exception name="IllegalBlockSizeException" type="javax.crypto.IllegalBlockSizeException">
+</exception>
+</method>
+<method name="doFinal"
+ return="byte[]"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="input" type="byte[]">
+</parameter>
+<parameter name="inputOffset" type="int">
+</parameter>
+<parameter name="inputLen" type="int">
+</parameter>
+<exception name="BadPaddingException" type="javax.crypto.BadPaddingException">
+</exception>
+<exception name="IllegalBlockSizeException" type="javax.crypto.IllegalBlockSizeException">
+</exception>
+</method>
+<method name="doFinal"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="input" type="byte[]">
+</parameter>
+<parameter name="inputOffset" type="int">
+</parameter>
+<parameter name="inputLen" type="int">
+</parameter>
+<parameter name="output" type="byte[]">
+</parameter>
+<exception name="BadPaddingException" type="javax.crypto.BadPaddingException">
+</exception>
+<exception name="IllegalBlockSizeException" type="javax.crypto.IllegalBlockSizeException">
+</exception>
+<exception name="ShortBufferException" type="javax.crypto.ShortBufferException">
+</exception>
+</method>
+<method name="doFinal"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="input" type="byte[]">
+</parameter>
+<parameter name="inputOffset" type="int">
+</parameter>
+<parameter name="inputLen" type="int">
+</parameter>
+<parameter name="output" type="byte[]">
+</parameter>
+<parameter name="outputOffset" type="int">
+</parameter>
+<exception name="BadPaddingException" type="javax.crypto.BadPaddingException">
+</exception>
+<exception name="IllegalBlockSizeException" type="javax.crypto.IllegalBlockSizeException">
+</exception>
+<exception name="ShortBufferException" type="javax.crypto.ShortBufferException">
+</exception>
+</method>
+<method name="doFinal"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="input" type="java.nio.ByteBuffer">
+</parameter>
+<parameter name="output" type="java.nio.ByteBuffer">
+</parameter>
+<exception name="BadPaddingException" type="javax.crypto.BadPaddingException">
+</exception>
+<exception name="IllegalBlockSizeException" type="javax.crypto.IllegalBlockSizeException">
+</exception>
+<exception name="ShortBufferException" type="javax.crypto.ShortBufferException">
+</exception>
+</method>
+<method name="getAlgorithm"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getBlockSize"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getExemptionMechanism"
+ return="javax.crypto.ExemptionMechanism"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getIV"
+ return="byte[]"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getInstance"
+ return="javax.crypto.Cipher"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="transformation" type="java.lang.String">
+</parameter>
+<exception name="NoSuchAlgorithmException" type="java.security.NoSuchAlgorithmException">
+</exception>
+<exception name="NoSuchPaddingException" type="javax.crypto.NoSuchPaddingException">
+</exception>
+</method>
+<method name="getInstance"
+ return="javax.crypto.Cipher"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="transformation" type="java.lang.String">
+</parameter>
+<parameter name="provider" type="java.lang.String">
+</parameter>
+<exception name="NoSuchAlgorithmException" type="java.security.NoSuchAlgorithmException">
+</exception>
+<exception name="NoSuchPaddingException" type="javax.crypto.NoSuchPaddingException">
+</exception>
+<exception name="NoSuchProviderException" type="java.security.NoSuchProviderException">
+</exception>
+</method>
+<method name="getInstance"
+ return="javax.crypto.Cipher"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="transformation" type="java.lang.String">
+</parameter>
+<parameter name="provider" type="java.security.Provider">
+</parameter>
+<exception name="NoSuchAlgorithmException" type="java.security.NoSuchAlgorithmException">
+</exception>
+<exception name="NoSuchPaddingException" type="javax.crypto.NoSuchPaddingException">
+</exception>
+</method>
+<method name="getMaxAllowedKeyLength"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="transformation" type="java.lang.String">
+</parameter>
+<exception name="NoSuchAlgorithmException" type="java.security.NoSuchAlgorithmException">
+</exception>
+</method>
+<method name="getMaxAllowedParameterSpec"
+ return="java.security.spec.AlgorithmParameterSpec"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="transformation" type="java.lang.String">
+</parameter>
+<exception name="NoSuchAlgorithmException" type="java.security.NoSuchAlgorithmException">
+</exception>
+</method>
+<method name="getOutputSize"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="inputLen" type="int">
+</parameter>
+</method>
+<method name="getParameters"
+ return="java.security.AlgorithmParameters"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getProvider"
+ return="java.security.Provider"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="init"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="opmode" type="int">
+</parameter>
+<parameter name="key" type="java.security.Key">
+</parameter>
+<exception name="InvalidKeyException" type="java.security.InvalidKeyException">
+</exception>
+</method>
+<method name="init"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="opmode" type="int">
+</parameter>
+<parameter name="key" type="java.security.Key">
+</parameter>
+<parameter name="random" type="java.security.SecureRandom">
+</parameter>
+<exception name="InvalidKeyException" type="java.security.InvalidKeyException">
+</exception>
+</method>
+<method name="init"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="opmode" type="int">
+</parameter>
+<parameter name="key" type="java.security.Key">
+</parameter>
+<parameter name="params" type="java.security.spec.AlgorithmParameterSpec">
+</parameter>
+<exception name="InvalidAlgorithmParameterException" type="java.security.InvalidAlgorithmParameterException">
+</exception>
+<exception name="InvalidKeyException" type="java.security.InvalidKeyException">
+</exception>
+</method>
+<method name="init"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="opmode" type="int">
+</parameter>
+<parameter name="key" type="java.security.Key">
+</parameter>
+<parameter name="params" type="java.security.spec.AlgorithmParameterSpec">
+</parameter>
+<parameter name="random" type="java.security.SecureRandom">
+</parameter>
+<exception name="InvalidAlgorithmParameterException" type="java.security.InvalidAlgorithmParameterException">
+</exception>
+<exception name="InvalidKeyException" type="java.security.InvalidKeyException">
+</exception>
+</method>
+<method name="init"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="opmode" type="int">
+</parameter>
+<parameter name="key" type="java.security.Key">
+</parameter>
+<parameter name="params" type="java.security.AlgorithmParameters">
+</parameter>
+<exception name="InvalidAlgorithmParameterException" type="java.security.InvalidAlgorithmParameterException">
+</exception>
+<exception name="InvalidKeyException" type="java.security.InvalidKeyException">
+</exception>
+</method>
+<method name="init"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="opmode" type="int">
+</parameter>
+<parameter name="key" type="java.security.Key">
+</parameter>
+<parameter name="params" type="java.security.AlgorithmParameters">
+</parameter>
+<parameter name="random" type="java.security.SecureRandom">
+</parameter>
+<exception name="InvalidAlgorithmParameterException" type="java.security.InvalidAlgorithmParameterException">
+</exception>
+<exception name="InvalidKeyException" type="java.security.InvalidKeyException">
+</exception>
+</method>
+<method name="init"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="opmode" type="int">
+</parameter>
+<parameter name="certificate" type="java.security.cert.Certificate">
+</parameter>
+<exception name="InvalidKeyException" type="java.security.InvalidKeyException">
+</exception>
+</method>
+<method name="init"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="opmode" type="int">
+</parameter>
+<parameter name="certificate" type="java.security.cert.Certificate">
+</parameter>
+<parameter name="random" type="java.security.SecureRandom">
+</parameter>
+<exception name="InvalidKeyException" type="java.security.InvalidKeyException">
+</exception>
+</method>
+<method name="unwrap"
+ return="java.security.Key"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="wrappedKey" type="byte[]">
+</parameter>
+<parameter name="wrappedKeyAlgorithm" type="java.lang.String">
+</parameter>
+<parameter name="wrappedKeyType" type="int">
+</parameter>
+<exception name="InvalidKeyException" type="java.security.InvalidKeyException">
+</exception>
+<exception name="NoSuchAlgorithmException" type="java.security.NoSuchAlgorithmException">
+</exception>
+</method>
+<method name="update"
+ return="byte[]"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="input" type="byte[]">
+</parameter>
+</method>
+<method name="update"
+ return="byte[]"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="input" type="byte[]">
+</parameter>
+<parameter name="inputOffset" type="int">
+</parameter>
+<parameter name="inputLen" type="int">
+</parameter>
+</method>
+<method name="update"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="input" type="byte[]">
+</parameter>
+<parameter name="inputOffset" type="int">
+</parameter>
+<parameter name="inputLen" type="int">
+</parameter>
+<parameter name="output" type="byte[]">
+</parameter>
+<exception name="ShortBufferException" type="javax.crypto.ShortBufferException">
+</exception>
+</method>
+<method name="update"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="input" type="byte[]">
+</parameter>
+<parameter name="inputOffset" type="int">
+</parameter>
+<parameter name="inputLen" type="int">
+</parameter>
+<parameter name="output" type="byte[]">
+</parameter>
+<parameter name="outputOffset" type="int">
+</parameter>
+<exception name="ShortBufferException" type="javax.crypto.ShortBufferException">
+</exception>
+</method>
+<method name="update"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="input" type="java.nio.ByteBuffer">
+</parameter>
+<parameter name="output" type="java.nio.ByteBuffer">
+</parameter>
+<exception name="ShortBufferException" type="javax.crypto.ShortBufferException">
+</exception>
+</method>
+<method name="wrap"
+ return="byte[]"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="key" type="java.security.Key">
+</parameter>
+<exception name="IllegalBlockSizeException" type="javax.crypto.IllegalBlockSizeException">
+</exception>
+<exception name="InvalidKeyException" type="java.security.InvalidKeyException">
+</exception>
+</method>
+<field name="DECRYPT_MODE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ENCRYPT_MODE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="PRIVATE_KEY"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="PUBLIC_KEY"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="SECRET_KEY"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="3"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="UNWRAP_MODE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="4"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="WRAP_MODE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="3"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<class name="CipherInputStream"
+ extends="java.io.FilterInputStream"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="CipherInputStream"
+ type="javax.crypto.CipherInputStream"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="is" type="java.io.InputStream">
+</parameter>
+<parameter name="c" type="javax.crypto.Cipher">
+</parameter>
+</constructor>
+<constructor name="CipherInputStream"
+ type="javax.crypto.CipherInputStream"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="is" type="java.io.InputStream">
+</parameter>
+</constructor>
+</class>
+<class name="CipherOutputStream"
+ extends="java.io.FilterOutputStream"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="CipherOutputStream"
+ type="javax.crypto.CipherOutputStream"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="os" type="java.io.OutputStream">
+</parameter>
+<parameter name="c" type="javax.crypto.Cipher">
+</parameter>
+</constructor>
+<constructor name="CipherOutputStream"
+ type="javax.crypto.CipherOutputStream"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="os" type="java.io.OutputStream">
+</parameter>
+</constructor>
+</class>
+<class name="CipherSpi"
+ extends="java.lang.Object"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="CipherSpi"
+ type="javax.crypto.CipherSpi"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<method name="engineDoFinal"
+ return="byte[]"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="input" type="byte[]">
+</parameter>
+<parameter name="inputOffset" type="int">
+</parameter>
+<parameter name="inputLen" type="int">
+</parameter>
+<exception name="BadPaddingException" type="javax.crypto.BadPaddingException">
+</exception>
+<exception name="IllegalBlockSizeException" type="javax.crypto.IllegalBlockSizeException">
+</exception>
+</method>
+<method name="engineDoFinal"
+ return="int"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="input" type="byte[]">
+</parameter>
+<parameter name="inputOffset" type="int">
+</parameter>
+<parameter name="inputLen" type="int">
+</parameter>
+<parameter name="output" type="byte[]">
+</parameter>
+<parameter name="outputOffset" type="int">
+</parameter>
+<exception name="BadPaddingException" type="javax.crypto.BadPaddingException">
+</exception>
+<exception name="IllegalBlockSizeException" type="javax.crypto.IllegalBlockSizeException">
+</exception>
+<exception name="ShortBufferException" type="javax.crypto.ShortBufferException">
+</exception>
+</method>
+<method name="engineDoFinal"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="input" type="java.nio.ByteBuffer">
+</parameter>
+<parameter name="output" type="java.nio.ByteBuffer">
+</parameter>
+<exception name="BadPaddingException" type="javax.crypto.BadPaddingException">
+</exception>
+<exception name="IllegalBlockSizeException" type="javax.crypto.IllegalBlockSizeException">
+</exception>
+<exception name="ShortBufferException" type="javax.crypto.ShortBufferException">
+</exception>
+</method>
+<method name="engineGetBlockSize"
+ return="int"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</method>
+<method name="engineGetIV"
+ return="byte[]"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</method>
+<method name="engineGetKeySize"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="key" type="java.security.Key">
+</parameter>
+<exception name="InvalidKeyException" type="java.security.InvalidKeyException">
+</exception>
+</method>
+<method name="engineGetOutputSize"
+ return="int"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="inputLen" type="int">
+</parameter>
+</method>
+<method name="engineGetParameters"
+ return="java.security.AlgorithmParameters"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</method>
+<method name="engineInit"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="opmode" type="int">
+</parameter>
+<parameter name="key" type="java.security.Key">
+</parameter>
+<parameter name="random" type="java.security.SecureRandom">
+</parameter>
+<exception name="InvalidKeyException" type="java.security.InvalidKeyException">
+</exception>
+</method>
+<method name="engineInit"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="opmode" type="int">
+</parameter>
+<parameter name="key" type="java.security.Key">
+</parameter>
+<parameter name="params" type="java.security.spec.AlgorithmParameterSpec">
+</parameter>
+<parameter name="random" type="java.security.SecureRandom">
+</parameter>
+<exception name="InvalidAlgorithmParameterException" type="java.security.InvalidAlgorithmParameterException">
+</exception>
+<exception name="InvalidKeyException" type="java.security.InvalidKeyException">
+</exception>
+</method>
+<method name="engineInit"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="opmode" type="int">
+</parameter>
+<parameter name="key" type="java.security.Key">
+</parameter>
+<parameter name="params" type="java.security.AlgorithmParameters">
+</parameter>
+<parameter name="random" type="java.security.SecureRandom">
+</parameter>
+<exception name="InvalidAlgorithmParameterException" type="java.security.InvalidAlgorithmParameterException">
+</exception>
+<exception name="InvalidKeyException" type="java.security.InvalidKeyException">
+</exception>
+</method>
+<method name="engineSetMode"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="mode" type="java.lang.String">
+</parameter>
+<exception name="NoSuchAlgorithmException" type="java.security.NoSuchAlgorithmException">
+</exception>
+</method>
+<method name="engineSetPadding"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="padding" type="java.lang.String">
+</parameter>
+<exception name="NoSuchPaddingException" type="javax.crypto.NoSuchPaddingException">
+</exception>
+</method>
+<method name="engineUnwrap"
+ return="java.security.Key"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="wrappedKey" type="byte[]">
+</parameter>
+<parameter name="wrappedKeyAlgorithm" type="java.lang.String">
+</parameter>
+<parameter name="wrappedKeyType" type="int">
+</parameter>
+<exception name="InvalidKeyException" type="java.security.InvalidKeyException">
+</exception>
+<exception name="NoSuchAlgorithmException" type="java.security.NoSuchAlgorithmException">
+</exception>
+</method>
+<method name="engineUpdate"
+ return="byte[]"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="input" type="byte[]">
+</parameter>
+<parameter name="inputOffset" type="int">
+</parameter>
+<parameter name="inputLen" type="int">
+</parameter>
+</method>
+<method name="engineUpdate"
+ return="int"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="input" type="byte[]">
+</parameter>
+<parameter name="inputOffset" type="int">
+</parameter>
+<parameter name="inputLen" type="int">
+</parameter>
+<parameter name="output" type="byte[]">
+</parameter>
+<parameter name="outputOffset" type="int">
+</parameter>
+<exception name="ShortBufferException" type="javax.crypto.ShortBufferException">
+</exception>
+</method>
+<method name="engineUpdate"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="input" type="java.nio.ByteBuffer">
+</parameter>
+<parameter name="output" type="java.nio.ByteBuffer">
+</parameter>
+<exception name="ShortBufferException" type="javax.crypto.ShortBufferException">
+</exception>
+</method>
+<method name="engineWrap"
+ return="byte[]"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="key" type="java.security.Key">
+</parameter>
+<exception name="IllegalBlockSizeException" type="javax.crypto.IllegalBlockSizeException">
+</exception>
+<exception name="InvalidKeyException" type="java.security.InvalidKeyException">
+</exception>
+</method>
+</class>
+<class name="EncryptedPrivateKeyInfo"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="EncryptedPrivateKeyInfo"
+ type="javax.crypto.EncryptedPrivateKeyInfo"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="encoded" type="byte[]">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</constructor>
+<constructor name="EncryptedPrivateKeyInfo"
+ type="javax.crypto.EncryptedPrivateKeyInfo"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="encrAlgName" type="java.lang.String">
+</parameter>
+<parameter name="encryptedData" type="byte[]">
+</parameter>
+<exception name="NoSuchAlgorithmException" type="java.security.NoSuchAlgorithmException">
+</exception>
+</constructor>
+<constructor name="EncryptedPrivateKeyInfo"
+ type="javax.crypto.EncryptedPrivateKeyInfo"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="algParams" type="java.security.AlgorithmParameters">
+</parameter>
+<parameter name="encryptedData" type="byte[]">
+</parameter>
+<exception name="NoSuchAlgorithmException" type="java.security.NoSuchAlgorithmException">
+</exception>
+</constructor>
+<method name="getAlgName"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getAlgParameters"
+ return="java.security.AlgorithmParameters"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getEncoded"
+ return="byte[]"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="getEncryptedData"
+ return="byte[]"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getKeySpec"
+ return="java.security.spec.PKCS8EncodedKeySpec"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="cipher" type="javax.crypto.Cipher">
+</parameter>
+<exception name="InvalidKeySpecException" type="java.security.spec.InvalidKeySpecException">
+</exception>
+</method>
+<method name="getKeySpec"
+ return="java.security.spec.PKCS8EncodedKeySpec"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="decryptKey" type="java.security.Key">
+</parameter>
+<exception name="InvalidKeyException" type="java.security.InvalidKeyException">
+</exception>
+<exception name="NoSuchAlgorithmException" type="java.security.NoSuchAlgorithmException">
+</exception>
+</method>
+<method name="getKeySpec"
+ return="java.security.spec.PKCS8EncodedKeySpec"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="decryptKey" type="java.security.Key">
+</parameter>
+<parameter name="providerName" type="java.lang.String">
+</parameter>
+<exception name="InvalidKeyException" type="java.security.InvalidKeyException">
+</exception>
+<exception name="NoSuchAlgorithmException" type="java.security.NoSuchAlgorithmException">
+</exception>
+<exception name="NoSuchProviderException" type="java.security.NoSuchProviderException">
+</exception>
+</method>
+<method name="getKeySpec"
+ return="java.security.spec.PKCS8EncodedKeySpec"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="decryptKey" type="java.security.Key">
+</parameter>
+<parameter name="provider" type="java.security.Provider">
+</parameter>
+<exception name="InvalidKeyException" type="java.security.InvalidKeyException">
+</exception>
+<exception name="NoSuchAlgorithmException" type="java.security.NoSuchAlgorithmException">
+</exception>
+</method>
+</class>
+<class name="ExemptionMechanism"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="ExemptionMechanism"
+ type="javax.crypto.ExemptionMechanism"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="exmechSpi" type="javax.crypto.ExemptionMechanismSpi">
+</parameter>
+<parameter name="provider" type="java.security.Provider">
+</parameter>
+<parameter name="mechanism" type="java.lang.String">
+</parameter>
+</constructor>
+<method name="genExemptionBlob"
+ return="byte[]"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="ExemptionMechanismException" type="javax.crypto.ExemptionMechanismException">
+</exception>
+<exception name="IllegalStateException" type="java.lang.IllegalStateException">
+</exception>
+</method>
+<method name="genExemptionBlob"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="output" type="byte[]">
+</parameter>
+<exception name="ExemptionMechanismException" type="javax.crypto.ExemptionMechanismException">
+</exception>
+<exception name="IllegalStateException" type="java.lang.IllegalStateException">
+</exception>
+<exception name="ShortBufferException" type="javax.crypto.ShortBufferException">
+</exception>
+</method>
+<method name="genExemptionBlob"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="output" type="byte[]">
+</parameter>
+<parameter name="outputOffset" type="int">
+</parameter>
+<exception name="ExemptionMechanismException" type="javax.crypto.ExemptionMechanismException">
+</exception>
+<exception name="IllegalStateException" type="java.lang.IllegalStateException">
+</exception>
+<exception name="ShortBufferException" type="javax.crypto.ShortBufferException">
+</exception>
+</method>
+<method name="getInstance"
+ return="javax.crypto.ExemptionMechanism"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="algorithm" type="java.lang.String">
+</parameter>
+<exception name="NoSuchAlgorithmException" type="java.security.NoSuchAlgorithmException">
+</exception>
+</method>
+<method name="getInstance"
+ return="javax.crypto.ExemptionMechanism"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="algorithm" type="java.lang.String">
+</parameter>
+<parameter name="provider" type="java.lang.String">
+</parameter>
+<exception name="NoSuchAlgorithmException" type="java.security.NoSuchAlgorithmException">
+</exception>
+<exception name="NoSuchProviderException" type="java.security.NoSuchProviderException">
+</exception>
+</method>
+<method name="getInstance"
+ return="javax.crypto.ExemptionMechanism"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="algorithm" type="java.lang.String">
+</parameter>
+<parameter name="provider" type="java.security.Provider">
+</parameter>
+<exception name="NoSuchAlgorithmException" type="java.security.NoSuchAlgorithmException">
+</exception>
+</method>
+<method name="getName"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getOutputSize"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="inputLen" type="int">
+</parameter>
+<exception name="IllegalStateException" type="java.lang.IllegalStateException">
+</exception>
+</method>
+<method name="getProvider"
+ return="java.security.Provider"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="init"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="key" type="java.security.Key">
+</parameter>
+<exception name="ExemptionMechanismException" type="javax.crypto.ExemptionMechanismException">
+</exception>
+<exception name="InvalidKeyException" type="java.security.InvalidKeyException">
+</exception>
+</method>
+<method name="init"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="key" type="java.security.Key">
+</parameter>
+<parameter name="param" type="java.security.AlgorithmParameters">
+</parameter>
+<exception name="ExemptionMechanismException" type="javax.crypto.ExemptionMechanismException">
+</exception>
+<exception name="InvalidAlgorithmParameterException" type="java.security.InvalidAlgorithmParameterException">
+</exception>
+<exception name="InvalidKeyException" type="java.security.InvalidKeyException">
+</exception>
+</method>
+<method name="init"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="key" type="java.security.Key">
+</parameter>
+<parameter name="param" type="java.security.spec.AlgorithmParameterSpec">
+</parameter>
+<exception name="ExemptionMechanismException" type="javax.crypto.ExemptionMechanismException">
+</exception>
+<exception name="InvalidAlgorithmParameterException" type="java.security.InvalidAlgorithmParameterException">
+</exception>
+<exception name="InvalidKeyException" type="java.security.InvalidKeyException">
+</exception>
+</method>
+<method name="isCryptoAllowed"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="key" type="java.security.Key">
+</parameter>
+<exception name="ExemptionMechanismException" type="javax.crypto.ExemptionMechanismException">
+</exception>
+</method>
+</class>
+<class name="ExemptionMechanismException"
+ extends="java.security.GeneralSecurityException"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="ExemptionMechanismException"
+ type="javax.crypto.ExemptionMechanismException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="msg" type="java.lang.String">
+</parameter>
+</constructor>
+<constructor name="ExemptionMechanismException"
+ type="javax.crypto.ExemptionMechanismException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+</class>
+<class name="ExemptionMechanismSpi"
+ extends="java.lang.Object"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="ExemptionMechanismSpi"
+ type="javax.crypto.ExemptionMechanismSpi"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<method name="engineGenExemptionBlob"
+ return="byte[]"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<exception name="ExemptionMechanismException" type="javax.crypto.ExemptionMechanismException">
+</exception>
+</method>
+<method name="engineGenExemptionBlob"
+ return="int"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="output" type="byte[]">
+</parameter>
+<parameter name="outputOffset" type="int">
+</parameter>
+<exception name="ExemptionMechanismException" type="javax.crypto.ExemptionMechanismException">
+</exception>
+<exception name="ShortBufferException" type="javax.crypto.ShortBufferException">
+</exception>
+</method>
+<method name="engineGetOutputSize"
+ return="int"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="inputLen" type="int">
+</parameter>
+</method>
+<method name="engineInit"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="key" type="java.security.Key">
+</parameter>
+<exception name="ExemptionMechanismException" type="javax.crypto.ExemptionMechanismException">
+</exception>
+<exception name="InvalidKeyException" type="java.security.InvalidKeyException">
+</exception>
+</method>
+<method name="engineInit"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="key" type="java.security.Key">
+</parameter>
+<parameter name="params" type="java.security.AlgorithmParameters">
+</parameter>
+<exception name="ExemptionMechanismException" type="javax.crypto.ExemptionMechanismException">
+</exception>
+<exception name="InvalidAlgorithmParameterException" type="java.security.InvalidAlgorithmParameterException">
+</exception>
+<exception name="InvalidKeyException" type="java.security.InvalidKeyException">
+</exception>
+</method>
+<method name="engineInit"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="key" type="java.security.Key">
+</parameter>
+<parameter name="params" type="java.security.spec.AlgorithmParameterSpec">
+</parameter>
+<exception name="ExemptionMechanismException" type="javax.crypto.ExemptionMechanismException">
+</exception>
+<exception name="InvalidAlgorithmParameterException" type="java.security.InvalidAlgorithmParameterException">
+</exception>
+<exception name="InvalidKeyException" type="java.security.InvalidKeyException">
+</exception>
+</method>
+</class>
+<class name="IllegalBlockSizeException"
+ extends="java.security.GeneralSecurityException"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="IllegalBlockSizeException"
+ type="javax.crypto.IllegalBlockSizeException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="msg" type="java.lang.String">
+</parameter>
+</constructor>
+<constructor name="IllegalBlockSizeException"
+ type="javax.crypto.IllegalBlockSizeException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+</class>
+<class name="KeyAgreement"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="KeyAgreement"
+ type="javax.crypto.KeyAgreement"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="keyAgreeSpi" type="javax.crypto.KeyAgreementSpi">
+</parameter>
+<parameter name="provider" type="java.security.Provider">
+</parameter>
+<parameter name="algorithm" type="java.lang.String">
+</parameter>
+</constructor>
+<method name="doPhase"
+ return="java.security.Key"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="key" type="java.security.Key">
+</parameter>
+<parameter name="lastPhase" type="boolean">
+</parameter>
+<exception name="IllegalStateException" type="java.lang.IllegalStateException">
+</exception>
+<exception name="InvalidKeyException" type="java.security.InvalidKeyException">
+</exception>
+</method>
+<method name="generateSecret"
+ return="byte[]"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="IllegalStateException" type="java.lang.IllegalStateException">
+</exception>
+</method>
+<method name="generateSecret"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="sharedSecret" type="byte[]">
+</parameter>
+<parameter name="offset" type="int">
+</parameter>
+<exception name="IllegalStateException" type="java.lang.IllegalStateException">
+</exception>
+<exception name="ShortBufferException" type="javax.crypto.ShortBufferException">
+</exception>
+</method>
+<method name="generateSecret"
+ return="javax.crypto.SecretKey"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="algorithm" type="java.lang.String">
+</parameter>
+<exception name="IllegalStateException" type="java.lang.IllegalStateException">
+</exception>
+<exception name="InvalidKeyException" type="java.security.InvalidKeyException">
+</exception>
+<exception name="NoSuchAlgorithmException" type="java.security.NoSuchAlgorithmException">
+</exception>
+</method>
+<method name="getAlgorithm"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getInstance"
+ return="javax.crypto.KeyAgreement"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="algorithm" type="java.lang.String">
+</parameter>
+<exception name="NoSuchAlgorithmException" type="java.security.NoSuchAlgorithmException">
+</exception>
+</method>
+<method name="getInstance"
+ return="javax.crypto.KeyAgreement"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="algorithm" type="java.lang.String">
+</parameter>
+<parameter name="provider" type="java.lang.String">
+</parameter>
+<exception name="NoSuchAlgorithmException" type="java.security.NoSuchAlgorithmException">
+</exception>
+<exception name="NoSuchProviderException" type="java.security.NoSuchProviderException">
+</exception>
+</method>
+<method name="getInstance"
+ return="javax.crypto.KeyAgreement"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="algorithm" type="java.lang.String">
+</parameter>
+<parameter name="provider" type="java.security.Provider">
+</parameter>
+<exception name="NoSuchAlgorithmException" type="java.security.NoSuchAlgorithmException">
+</exception>
+</method>
+<method name="getProvider"
+ return="java.security.Provider"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="init"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="key" type="java.security.Key">
+</parameter>
+<exception name="InvalidKeyException" type="java.security.InvalidKeyException">
+</exception>
+</method>
+<method name="init"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="key" type="java.security.Key">
+</parameter>
+<parameter name="random" type="java.security.SecureRandom">
+</parameter>
+<exception name="InvalidKeyException" type="java.security.InvalidKeyException">
+</exception>
+</method>
+<method name="init"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="key" type="java.security.Key">
+</parameter>
+<parameter name="params" type="java.security.spec.AlgorithmParameterSpec">
+</parameter>
+<exception name="InvalidAlgorithmParameterException" type="java.security.InvalidAlgorithmParameterException">
+</exception>
+<exception name="InvalidKeyException" type="java.security.InvalidKeyException">
+</exception>
+</method>
+<method name="init"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="key" type="java.security.Key">
+</parameter>
+<parameter name="params" type="java.security.spec.AlgorithmParameterSpec">
+</parameter>
+<parameter name="random" type="java.security.SecureRandom">
+</parameter>
+<exception name="InvalidAlgorithmParameterException" type="java.security.InvalidAlgorithmParameterException">
+</exception>
+<exception name="InvalidKeyException" type="java.security.InvalidKeyException">
+</exception>
+</method>
+</class>
+<class name="KeyAgreementSpi"
+ extends="java.lang.Object"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="KeyAgreementSpi"
+ type="javax.crypto.KeyAgreementSpi"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<method name="engineDoPhase"
+ return="java.security.Key"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="key" type="java.security.Key">
+</parameter>
+<parameter name="lastPhase" type="boolean">
+</parameter>
+<exception name="IllegalStateException" type="java.lang.IllegalStateException">
+</exception>
+<exception name="InvalidKeyException" type="java.security.InvalidKeyException">
+</exception>
+</method>
+<method name="engineGenerateSecret"
+ return="byte[]"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<exception name="IllegalStateException" type="java.lang.IllegalStateException">
+</exception>
+</method>
+<method name="engineGenerateSecret"
+ return="int"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="sharedSecret" type="byte[]">
+</parameter>
+<parameter name="offset" type="int">
+</parameter>
+<exception name="IllegalStateException" type="java.lang.IllegalStateException">
+</exception>
+<exception name="ShortBufferException" type="javax.crypto.ShortBufferException">
+</exception>
+</method>
+<method name="engineGenerateSecret"
+ return="javax.crypto.SecretKey"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="algorithm" type="java.lang.String">
+</parameter>
+<exception name="IllegalStateException" type="java.lang.IllegalStateException">
+</exception>
+<exception name="InvalidKeyException" type="java.security.InvalidKeyException">
+</exception>
+<exception name="NoSuchAlgorithmException" type="java.security.NoSuchAlgorithmException">
+</exception>
+</method>
+<method name="engineInit"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="key" type="java.security.Key">
+</parameter>
+<parameter name="random" type="java.security.SecureRandom">
+</parameter>
+<exception name="InvalidKeyException" type="java.security.InvalidKeyException">
+</exception>
+</method>
+<method name="engineInit"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="key" type="java.security.Key">
+</parameter>
+<parameter name="params" type="java.security.spec.AlgorithmParameterSpec">
+</parameter>
+<parameter name="random" type="java.security.SecureRandom">
+</parameter>
+<exception name="InvalidAlgorithmParameterException" type="java.security.InvalidAlgorithmParameterException">
+</exception>
+<exception name="InvalidKeyException" type="java.security.InvalidKeyException">
+</exception>
+</method>
+</class>
+<class name="KeyGenerator"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="KeyGenerator"
+ type="javax.crypto.KeyGenerator"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="keyGenSpi" type="javax.crypto.KeyGeneratorSpi">
+</parameter>
+<parameter name="provider" type="java.security.Provider">
+</parameter>
+<parameter name="algorithm" type="java.lang.String">
+</parameter>
+</constructor>
+<method name="generateKey"
+ return="javax.crypto.SecretKey"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getAlgorithm"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getInstance"
+ return="javax.crypto.KeyGenerator"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="algorithm" type="java.lang.String">
+</parameter>
+<exception name="NoSuchAlgorithmException" type="java.security.NoSuchAlgorithmException">
+</exception>
+</method>
+<method name="getInstance"
+ return="javax.crypto.KeyGenerator"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="algorithm" type="java.lang.String">
+</parameter>
+<parameter name="provider" type="java.lang.String">
+</parameter>
+<exception name="NoSuchAlgorithmException" type="java.security.NoSuchAlgorithmException">
+</exception>
+<exception name="NoSuchProviderException" type="java.security.NoSuchProviderException">
+</exception>
+</method>
+<method name="getInstance"
+ return="javax.crypto.KeyGenerator"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="algorithm" type="java.lang.String">
+</parameter>
+<parameter name="provider" type="java.security.Provider">
+</parameter>
+<exception name="NoSuchAlgorithmException" type="java.security.NoSuchAlgorithmException">
+</exception>
+</method>
+<method name="getProvider"
+ return="java.security.Provider"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="init"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="params" type="java.security.spec.AlgorithmParameterSpec">
+</parameter>
+<exception name="InvalidAlgorithmParameterException" type="java.security.InvalidAlgorithmParameterException">
+</exception>
+</method>
+<method name="init"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="params" type="java.security.spec.AlgorithmParameterSpec">
+</parameter>
+<parameter name="random" type="java.security.SecureRandom">
+</parameter>
+<exception name="InvalidAlgorithmParameterException" type="java.security.InvalidAlgorithmParameterException">
+</exception>
+</method>
+<method name="init"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="keysize" type="int">
+</parameter>
+</method>
+<method name="init"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="keysize" type="int">
+</parameter>
+<parameter name="random" type="java.security.SecureRandom">
+</parameter>
+</method>
+<method name="init"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="random" type="java.security.SecureRandom">
+</parameter>
+</method>
+</class>
+<class name="KeyGeneratorSpi"
+ extends="java.lang.Object"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="KeyGeneratorSpi"
+ type="javax.crypto.KeyGeneratorSpi"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<method name="engineGenerateKey"
+ return="javax.crypto.SecretKey"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</method>
+<method name="engineInit"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="params" type="java.security.spec.AlgorithmParameterSpec">
+</parameter>
+<parameter name="random" type="java.security.SecureRandom">
+</parameter>
+<exception name="InvalidAlgorithmParameterException" type="java.security.InvalidAlgorithmParameterException">
+</exception>
+</method>
+<method name="engineInit"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="keysize" type="int">
+</parameter>
+<parameter name="random" type="java.security.SecureRandom">
+</parameter>
+</method>
+<method name="engineInit"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="random" type="java.security.SecureRandom">
+</parameter>
+</method>
+</class>
+<class name="Mac"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="java.lang.Cloneable">
+</implements>
+<constructor name="Mac"
+ type="javax.crypto.Mac"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="macSpi" type="javax.crypto.MacSpi">
+</parameter>
+<parameter name="provider" type="java.security.Provider">
+</parameter>
+<parameter name="algorithm" type="java.lang.String">
+</parameter>
+</constructor>
+<method name="clone"
+ return="java.lang.Object"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="CloneNotSupportedException" type="java.lang.CloneNotSupportedException">
+</exception>
+</method>
+<method name="doFinal"
+ return="byte[]"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="IllegalStateException" type="java.lang.IllegalStateException">
+</exception>
+</method>
+<method name="doFinal"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="output" type="byte[]">
+</parameter>
+<parameter name="outOffset" type="int">
+</parameter>
+<exception name="IllegalStateException" type="java.lang.IllegalStateException">
+</exception>
+<exception name="ShortBufferException" type="javax.crypto.ShortBufferException">
+</exception>
+</method>
+<method name="doFinal"
+ return="byte[]"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="input" type="byte[]">
+</parameter>
+<exception name="IllegalStateException" type="java.lang.IllegalStateException">
+</exception>
+</method>
+<method name="getAlgorithm"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getInstance"
+ return="javax.crypto.Mac"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="algorithm" type="java.lang.String">
+</parameter>
+<exception name="NoSuchAlgorithmException" type="java.security.NoSuchAlgorithmException">
+</exception>
+</method>
+<method name="getInstance"
+ return="javax.crypto.Mac"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="algorithm" type="java.lang.String">
+</parameter>
+<parameter name="provider" type="java.lang.String">
+</parameter>
+<exception name="NoSuchAlgorithmException" type="java.security.NoSuchAlgorithmException">
+</exception>
+<exception name="NoSuchProviderException" type="java.security.NoSuchProviderException">
+</exception>
+</method>
+<method name="getInstance"
+ return="javax.crypto.Mac"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="algorithm" type="java.lang.String">
+</parameter>
+<parameter name="provider" type="java.security.Provider">
+</parameter>
+<exception name="NoSuchAlgorithmException" type="java.security.NoSuchAlgorithmException">
+</exception>
+</method>
+<method name="getMacLength"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getProvider"
+ return="java.security.Provider"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="init"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="key" type="java.security.Key">
+</parameter>
+<parameter name="params" type="java.security.spec.AlgorithmParameterSpec">
+</parameter>
+<exception name="InvalidAlgorithmParameterException" type="java.security.InvalidAlgorithmParameterException">
+</exception>
+<exception name="InvalidKeyException" type="java.security.InvalidKeyException">
+</exception>
+</method>
+<method name="init"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="key" type="java.security.Key">
+</parameter>
+<exception name="InvalidKeyException" type="java.security.InvalidKeyException">
+</exception>
+</method>
+<method name="reset"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="update"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="input" type="byte">
+</parameter>
+<exception name="IllegalStateException" type="java.lang.IllegalStateException">
+</exception>
+</method>
+<method name="update"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="input" type="byte[]">
+</parameter>
+<parameter name="offset" type="int">
+</parameter>
+<parameter name="len" type="int">
+</parameter>
+<exception name="IllegalStateException" type="java.lang.IllegalStateException">
+</exception>
+</method>
+<method name="update"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="input" type="byte[]">
+</parameter>
+<exception name="IllegalStateException" type="java.lang.IllegalStateException">
+</exception>
+</method>
+<method name="update"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="input" type="java.nio.ByteBuffer">
+</parameter>
+</method>
+</class>
+<class name="MacSpi"
+ extends="java.lang.Object"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="MacSpi"
+ type="javax.crypto.MacSpi"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<method name="clone"
+ return="java.lang.Object"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="CloneNotSupportedException" type="java.lang.CloneNotSupportedException">
+</exception>
+</method>
+<method name="engineDoFinal"
+ return="byte[]"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</method>
+<method name="engineGetMacLength"
+ return="int"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</method>
+<method name="engineInit"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="key" type="java.security.Key">
+</parameter>
+<parameter name="params" type="java.security.spec.AlgorithmParameterSpec">
+</parameter>
+<exception name="InvalidAlgorithmParameterException" type="java.security.InvalidAlgorithmParameterException">
+</exception>
+<exception name="InvalidKeyException" type="java.security.InvalidKeyException">
+</exception>
+</method>
+<method name="engineReset"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</method>
+<method name="engineUpdate"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="input" type="byte">
+</parameter>
+</method>
+<method name="engineUpdate"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="input" type="byte[]">
+</parameter>
+<parameter name="offset" type="int">
+</parameter>
+<parameter name="len" type="int">
+</parameter>
+</method>
+<method name="engineUpdate"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="input" type="java.nio.ByteBuffer">
+</parameter>
+</method>
+</class>
+<class name="NoSuchPaddingException"
+ extends="java.security.GeneralSecurityException"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="NoSuchPaddingException"
+ type="javax.crypto.NoSuchPaddingException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="msg" type="java.lang.String">
+</parameter>
+</constructor>
+<constructor name="NoSuchPaddingException"
+ type="javax.crypto.NoSuchPaddingException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+</class>
+<class name="NullCipher"
+ extends="javax.crypto.Cipher"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="NullCipher"
+ type="javax.crypto.NullCipher"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+</class>
+<class name="SealedObject"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="java.io.Serializable">
+</implements>
+<constructor name="SealedObject"
+ type="javax.crypto.SealedObject"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="object" type="java.io.Serializable">
+</parameter>
+<parameter name="c" type="javax.crypto.Cipher">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+<exception name="IllegalBlockSizeException" type="javax.crypto.IllegalBlockSizeException">
+</exception>
+</constructor>
+<constructor name="SealedObject"
+ type="javax.crypto.SealedObject"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="so" type="javax.crypto.SealedObject">
+</parameter>
+</constructor>
+<method name="getAlgorithm"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getObject"
+ return="java.lang.Object"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="key" type="java.security.Key">
+</parameter>
+<exception name="ClassNotFoundException" type="java.lang.ClassNotFoundException">
+</exception>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+<exception name="InvalidKeyException" type="java.security.InvalidKeyException">
+</exception>
+<exception name="NoSuchAlgorithmException" type="java.security.NoSuchAlgorithmException">
+</exception>
+</method>
+<method name="getObject"
+ return="java.lang.Object"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="c" type="javax.crypto.Cipher">
+</parameter>
+<exception name="BadPaddingException" type="javax.crypto.BadPaddingException">
+</exception>
+<exception name="ClassNotFoundException" type="java.lang.ClassNotFoundException">
+</exception>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+<exception name="IllegalBlockSizeException" type="javax.crypto.IllegalBlockSizeException">
+</exception>
+</method>
+<method name="getObject"
+ return="java.lang.Object"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="key" type="java.security.Key">
+</parameter>
+<parameter name="provider" type="java.lang.String">
+</parameter>
+<exception name="ClassNotFoundException" type="java.lang.ClassNotFoundException">
+</exception>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+<exception name="InvalidKeyException" type="java.security.InvalidKeyException">
+</exception>
+<exception name="NoSuchAlgorithmException" type="java.security.NoSuchAlgorithmException">
+</exception>
+<exception name="NoSuchProviderException" type="java.security.NoSuchProviderException">
+</exception>
+</method>
+<field name="encodedParams"
+ type="byte[]"
+ transient="false"
+ volatile="false"
+ value="null"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</field>
+</class>
+<interface name="SecretKey"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="java.security.Key">
+</implements>
+<field name="serialVersionUID"
+ type="long"
+ transient="false"
+ volatile="false"
+ value="-4795878709595146952L"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</interface>
+<class name="SecretKeyFactory"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="SecretKeyFactory"
+ type="javax.crypto.SecretKeyFactory"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="keyFacSpi" type="javax.crypto.SecretKeyFactorySpi">
+</parameter>
+<parameter name="provider" type="java.security.Provider">
+</parameter>
+<parameter name="algorithm" type="java.lang.String">
+</parameter>
+</constructor>
+<method name="generateSecret"
+ return="javax.crypto.SecretKey"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="keySpec" type="java.security.spec.KeySpec">
+</parameter>
+<exception name="InvalidKeySpecException" type="java.security.spec.InvalidKeySpecException">
+</exception>
+</method>
+<method name="getAlgorithm"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getInstance"
+ return="javax.crypto.SecretKeyFactory"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="algorithm" type="java.lang.String">
+</parameter>
+<exception name="NoSuchAlgorithmException" type="java.security.NoSuchAlgorithmException">
+</exception>
+</method>
+<method name="getInstance"
+ return="javax.crypto.SecretKeyFactory"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="algorithm" type="java.lang.String">
+</parameter>
+<parameter name="provider" type="java.lang.String">
+</parameter>
+<exception name="NoSuchAlgorithmException" type="java.security.NoSuchAlgorithmException">
+</exception>
+<exception name="NoSuchProviderException" type="java.security.NoSuchProviderException">
+</exception>
+</method>
+<method name="getInstance"
+ return="javax.crypto.SecretKeyFactory"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="algorithm" type="java.lang.String">
+</parameter>
+<parameter name="provider" type="java.security.Provider">
+</parameter>
+<exception name="NoSuchAlgorithmException" type="java.security.NoSuchAlgorithmException">
+</exception>
+</method>
+<method name="getKeySpec"
+ return="java.security.spec.KeySpec"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="key" type="javax.crypto.SecretKey">
+</parameter>
+<parameter name="keySpec" type="java.lang.Class">
+</parameter>
+<exception name="InvalidKeySpecException" type="java.security.spec.InvalidKeySpecException">
+</exception>
+</method>
+<method name="getProvider"
+ return="java.security.Provider"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="translateKey"
+ return="javax.crypto.SecretKey"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="key" type="javax.crypto.SecretKey">
+</parameter>
+<exception name="InvalidKeyException" type="java.security.InvalidKeyException">
+</exception>
+</method>
+</class>
+<class name="SecretKeyFactorySpi"
+ extends="java.lang.Object"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="SecretKeyFactorySpi"
+ type="javax.crypto.SecretKeyFactorySpi"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<method name="engineGenerateSecret"
+ return="javax.crypto.SecretKey"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="keySpec" type="java.security.spec.KeySpec">
+</parameter>
+<exception name="InvalidKeySpecException" type="java.security.spec.InvalidKeySpecException">
+</exception>
+</method>
+<method name="engineGetKeySpec"
+ return="java.security.spec.KeySpec"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="key" type="javax.crypto.SecretKey">
+</parameter>
+<parameter name="keySpec" type="java.lang.Class">
+</parameter>
+<exception name="InvalidKeySpecException" type="java.security.spec.InvalidKeySpecException">
+</exception>
+</method>
+<method name="engineTranslateKey"
+ return="javax.crypto.SecretKey"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="key" type="javax.crypto.SecretKey">
+</parameter>
+<exception name="InvalidKeyException" type="java.security.InvalidKeyException">
+</exception>
+</method>
+</class>
+<class name="ShortBufferException"
+ extends="java.security.GeneralSecurityException"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="ShortBufferException"
+ type="javax.crypto.ShortBufferException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="msg" type="java.lang.String">
+</parameter>
+</constructor>
+<constructor name="ShortBufferException"
+ type="javax.crypto.ShortBufferException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+</class>
+</package>
+<package name="javax.crypto.interfaces"
+>
+<interface name="DHKey"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="getParams"
+ return="javax.crypto.spec.DHParameterSpec"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+</interface>
+<interface name="DHPrivateKey"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="javax.crypto.interfaces.DHKey">
+</implements>
+<implements name="java.security.PrivateKey">
+</implements>
+<method name="getX"
+ return="java.math.BigInteger"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<field name="serialVersionUID"
+ type="long"
+ transient="false"
+ volatile="false"
+ value="2211791113380396553L"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</interface>
+<interface name="DHPublicKey"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="javax.crypto.interfaces.DHKey">
+</implements>
+<implements name="java.security.PublicKey">
+</implements>
+<method name="getY"
+ return="java.math.BigInteger"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<field name="serialVersionUID"
+ type="long"
+ transient="false"
+ volatile="false"
+ value="-6628103563352519193L"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</interface>
+<interface name="PBEKey"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="javax.crypto.SecretKey">
+</implements>
+<method name="getIterationCount"
+ return="int"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getPassword"
+ return="char[]"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getSalt"
+ return="byte[]"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<field name="serialVersionUID"
+ type="long"
+ transient="false"
+ volatile="false"
+ value="-1430015993304333921L"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</interface>
+</package>
+<package name="javax.crypto.spec"
+>
+<class name="DESKeySpec"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="java.security.spec.KeySpec">
+</implements>
+<constructor name="DESKeySpec"
+ type="javax.crypto.spec.DESKeySpec"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="key" type="byte[]">
+</parameter>
+<exception name="InvalidKeyException" type="java.security.InvalidKeyException">
+</exception>
+</constructor>
+<constructor name="DESKeySpec"
+ type="javax.crypto.spec.DESKeySpec"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="key" type="byte[]">
+</parameter>
+<parameter name="offset" type="int">
+</parameter>
+<exception name="InvalidKeyException" type="java.security.InvalidKeyException">
+</exception>
+</constructor>
+<method name="getKey"
+ return="byte[]"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isParityAdjusted"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="key" type="byte[]">
+</parameter>
+<parameter name="offset" type="int">
+</parameter>
+<exception name="InvalidKeyException" type="java.security.InvalidKeyException">
+</exception>
+</method>
+<method name="isWeak"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="key" type="byte[]">
+</parameter>
+<parameter name="offset" type="int">
+</parameter>
+<exception name="InvalidKeyException" type="java.security.InvalidKeyException">
+</exception>
+</method>
+<field name="DES_KEY_LEN"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="8"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<class name="DESedeKeySpec"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="java.security.spec.KeySpec">
+</implements>
+<constructor name="DESedeKeySpec"
+ type="javax.crypto.spec.DESedeKeySpec"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="key" type="byte[]">
+</parameter>
+<exception name="InvalidKeyException" type="java.security.InvalidKeyException">
+</exception>
+</constructor>
+<constructor name="DESedeKeySpec"
+ type="javax.crypto.spec.DESedeKeySpec"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="key" type="byte[]">
+</parameter>
+<parameter name="offset" type="int">
+</parameter>
+<exception name="InvalidKeyException" type="java.security.InvalidKeyException">
+</exception>
+</constructor>
+<method name="getKey"
+ return="byte[]"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isParityAdjusted"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="key" type="byte[]">
+</parameter>
+<parameter name="offset" type="int">
+</parameter>
+<exception name="InvalidKeyException" type="java.security.InvalidKeyException">
+</exception>
+</method>
+<field name="DES_EDE_KEY_LEN"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="24"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<class name="DHGenParameterSpec"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="java.security.spec.AlgorithmParameterSpec">
+</implements>
+<constructor name="DHGenParameterSpec"
+ type="javax.crypto.spec.DHGenParameterSpec"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="primeSize" type="int">
+</parameter>
+<parameter name="exponentSize" type="int">
+</parameter>
+</constructor>
+<method name="getExponentSize"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getPrimeSize"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+</class>
+<class name="DHParameterSpec"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="java.security.spec.AlgorithmParameterSpec">
+</implements>
+<constructor name="DHParameterSpec"
+ type="javax.crypto.spec.DHParameterSpec"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="p" type="java.math.BigInteger">
+</parameter>
+<parameter name="g" type="java.math.BigInteger">
+</parameter>
+</constructor>
+<constructor name="DHParameterSpec"
+ type="javax.crypto.spec.DHParameterSpec"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="p" type="java.math.BigInteger">
+</parameter>
+<parameter name="g" type="java.math.BigInteger">
+</parameter>
+<parameter name="l" type="int">
+</parameter>
+</constructor>
+<method name="getG"
+ return="java.math.BigInteger"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getL"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getP"
+ return="java.math.BigInteger"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+</class>
+<class name="DHPrivateKeySpec"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="java.security.spec.KeySpec">
+</implements>
+<constructor name="DHPrivateKeySpec"
+ type="javax.crypto.spec.DHPrivateKeySpec"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="x" type="java.math.BigInteger">
+</parameter>
+<parameter name="p" type="java.math.BigInteger">
+</parameter>
+<parameter name="g" type="java.math.BigInteger">
+</parameter>
+</constructor>
+<method name="getG"
+ return="java.math.BigInteger"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getP"
+ return="java.math.BigInteger"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getX"
+ return="java.math.BigInteger"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+</class>
+<class name="DHPublicKeySpec"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="java.security.spec.KeySpec">
+</implements>
+<constructor name="DHPublicKeySpec"
+ type="javax.crypto.spec.DHPublicKeySpec"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="y" type="java.math.BigInteger">
+</parameter>
+<parameter name="p" type="java.math.BigInteger">
+</parameter>
+<parameter name="g" type="java.math.BigInteger">
+</parameter>
+</constructor>
+<method name="getG"
+ return="java.math.BigInteger"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getP"
+ return="java.math.BigInteger"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getY"
+ return="java.math.BigInteger"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+</class>
+<class name="IvParameterSpec"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="java.security.spec.AlgorithmParameterSpec">
+</implements>
+<constructor name="IvParameterSpec"
+ type="javax.crypto.spec.IvParameterSpec"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="iv" type="byte[]">
+</parameter>
+</constructor>
+<constructor name="IvParameterSpec"
+ type="javax.crypto.spec.IvParameterSpec"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="iv" type="byte[]">
+</parameter>
+<parameter name="offset" type="int">
+</parameter>
+<parameter name="len" type="int">
+</parameter>
+</constructor>
+<method name="getIV"
+ return="byte[]"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+</class>
+<class name="OAEPParameterSpec"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="java.security.spec.AlgorithmParameterSpec">
+</implements>
+<constructor name="OAEPParameterSpec"
+ type="javax.crypto.spec.OAEPParameterSpec"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="mdName" type="java.lang.String">
+</parameter>
+<parameter name="mgfName" type="java.lang.String">
+</parameter>
+<parameter name="mgfSpec" type="java.security.spec.AlgorithmParameterSpec">
+</parameter>
+<parameter name="pSrc" type="javax.crypto.spec.PSource">
+</parameter>
+</constructor>
+<method name="getDigestAlgorithm"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getMGFAlgorithm"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getMGFParameters"
+ return="java.security.spec.AlgorithmParameterSpec"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getPSource"
+ return="javax.crypto.spec.PSource"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<field name="DEFAULT"
+ type="javax.crypto.spec.OAEPParameterSpec"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<class name="PBEKeySpec"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="java.security.spec.KeySpec">
+</implements>
+<constructor name="PBEKeySpec"
+ type="javax.crypto.spec.PBEKeySpec"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="password" type="char[]">
+</parameter>
+</constructor>
+<constructor name="PBEKeySpec"
+ type="javax.crypto.spec.PBEKeySpec"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="password" type="char[]">
+</parameter>
+<parameter name="salt" type="byte[]">
+</parameter>
+<parameter name="iterationCount" type="int">
+</parameter>
+<parameter name="keyLength" type="int">
+</parameter>
+</constructor>
+<constructor name="PBEKeySpec"
+ type="javax.crypto.spec.PBEKeySpec"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="password" type="char[]">
+</parameter>
+<parameter name="salt" type="byte[]">
+</parameter>
+<parameter name="iterationCount" type="int">
+</parameter>
+</constructor>
+<method name="clearPassword"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getIterationCount"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getKeyLength"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getPassword"
+ return="char[]"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getSalt"
+ return="byte[]"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+</class>
+<class name="PBEParameterSpec"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="java.security.spec.AlgorithmParameterSpec">
+</implements>
+<constructor name="PBEParameterSpec"
+ type="javax.crypto.spec.PBEParameterSpec"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="salt" type="byte[]">
+</parameter>
+<parameter name="iterationCount" type="int">
+</parameter>
+</constructor>
+<method name="getIterationCount"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getSalt"
+ return="byte[]"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+</class>
+<class name="PSource"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="PSource"
+ type="javax.crypto.spec.PSource"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="pSrcName" type="java.lang.String">
+</parameter>
+</constructor>
+<method name="getAlgorithm"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+</class>
+<class name="PSource.PSpecified"
+ extends="javax.crypto.spec.PSource"
+ abstract="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="PSource.PSpecified"
+ type="javax.crypto.spec.PSource.PSpecified"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="p" type="byte[]">
+</parameter>
+</constructor>
+<method name="getValue"
+ return="byte[]"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<field name="DEFAULT"
+ type="javax.crypto.spec.PSource.PSpecified"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<class name="RC2ParameterSpec"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="java.security.spec.AlgorithmParameterSpec">
+</implements>
+<constructor name="RC2ParameterSpec"
+ type="javax.crypto.spec.RC2ParameterSpec"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="effectiveKeyBits" type="int">
+</parameter>
+</constructor>
+<constructor name="RC2ParameterSpec"
+ type="javax.crypto.spec.RC2ParameterSpec"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="effectiveKeyBits" type="int">
+</parameter>
+<parameter name="iv" type="byte[]">
+</parameter>
+</constructor>
+<constructor name="RC2ParameterSpec"
+ type="javax.crypto.spec.RC2ParameterSpec"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="effectiveKeyBits" type="int">
+</parameter>
+<parameter name="iv" type="byte[]">
+</parameter>
+<parameter name="offset" type="int">
+</parameter>
+</constructor>
+<method name="getEffectiveKeyBits"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getIV"
+ return="byte[]"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+</class>
+<class name="RC5ParameterSpec"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="java.security.spec.AlgorithmParameterSpec">
+</implements>
+<constructor name="RC5ParameterSpec"
+ type="javax.crypto.spec.RC5ParameterSpec"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="version" type="int">
+</parameter>
+<parameter name="rounds" type="int">
+</parameter>
+<parameter name="wordSize" type="int">
+</parameter>
+</constructor>
+<constructor name="RC5ParameterSpec"
+ type="javax.crypto.spec.RC5ParameterSpec"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="version" type="int">
+</parameter>
+<parameter name="rounds" type="int">
+</parameter>
+<parameter name="wordSize" type="int">
+</parameter>
+<parameter name="iv" type="byte[]">
+</parameter>
+</constructor>
+<constructor name="RC5ParameterSpec"
+ type="javax.crypto.spec.RC5ParameterSpec"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="version" type="int">
+</parameter>
+<parameter name="rounds" type="int">
+</parameter>
+<parameter name="wordSize" type="int">
+</parameter>
+<parameter name="iv" type="byte[]">
+</parameter>
+<parameter name="offset" type="int">
+</parameter>
+</constructor>
+<method name="getIV"
+ return="byte[]"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getRounds"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getVersion"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getWordSize"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+</class>
+<class name="SecretKeySpec"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="java.security.spec.KeySpec">
+</implements>
+<implements name="javax.crypto.SecretKey">
+</implements>
+<implements name="java.io.Serializable">
+</implements>
+<constructor name="SecretKeySpec"
+ type="javax.crypto.spec.SecretKeySpec"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="key" type="byte[]">
+</parameter>
+<parameter name="algorithm" type="java.lang.String">
+</parameter>
+</constructor>
+<constructor name="SecretKeySpec"
+ type="javax.crypto.spec.SecretKeySpec"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="key" type="byte[]">
+</parameter>
+<parameter name="offset" type="int">
+</parameter>
+<parameter name="len" type="int">
+</parameter>
+<parameter name="algorithm" type="java.lang.String">
+</parameter>
+</constructor>
+<method name="getAlgorithm"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getEncoded"
+ return="byte[]"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getFormat"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+</class>
+</package>
+<package name="javax.microedition.khronos.egl"
+>
+<interface name="EGL"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</interface>
+<interface name="EGL10"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="javax.microedition.khronos.egl.EGL">
+</implements>
+<method name="eglChooseConfig"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="display" type="javax.microedition.khronos.egl.EGLDisplay">
+</parameter>
+<parameter name="attrib_list" type="int[]">
+</parameter>
+<parameter name="configs" type="javax.microedition.khronos.egl.EGLConfig[]">
+</parameter>
+<parameter name="config_size" type="int">
+</parameter>
+<parameter name="num_config" type="int[]">
+</parameter>
+</method>
+<method name="eglCopyBuffers"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="display" type="javax.microedition.khronos.egl.EGLDisplay">
+</parameter>
+<parameter name="surface" type="javax.microedition.khronos.egl.EGLSurface">
+</parameter>
+<parameter name="native_pixmap" type="java.lang.Object">
+</parameter>
+</method>
+<method name="eglCreateContext"
+ return="javax.microedition.khronos.egl.EGLContext"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="display" type="javax.microedition.khronos.egl.EGLDisplay">
+</parameter>
+<parameter name="config" type="javax.microedition.khronos.egl.EGLConfig">
+</parameter>
+<parameter name="share_context" type="javax.microedition.khronos.egl.EGLContext">
+</parameter>
+<parameter name="attrib_list" type="int[]">
+</parameter>
+</method>
+<method name="eglCreatePbufferSurface"
+ return="javax.microedition.khronos.egl.EGLSurface"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="display" type="javax.microedition.khronos.egl.EGLDisplay">
+</parameter>
+<parameter name="config" type="javax.microedition.khronos.egl.EGLConfig">
+</parameter>
+<parameter name="attrib_list" type="int[]">
+</parameter>
+</method>
+<method name="eglCreatePixmapSurface"
+ return="javax.microedition.khronos.egl.EGLSurface"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="display" type="javax.microedition.khronos.egl.EGLDisplay">
+</parameter>
+<parameter name="config" type="javax.microedition.khronos.egl.EGLConfig">
+</parameter>
+<parameter name="native_pixmap" type="java.lang.Object">
+</parameter>
+<parameter name="attrib_list" type="int[]">
+</parameter>
+</method>
+<method name="eglCreateWindowSurface"
+ return="javax.microedition.khronos.egl.EGLSurface"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="display" type="javax.microedition.khronos.egl.EGLDisplay">
+</parameter>
+<parameter name="config" type="javax.microedition.khronos.egl.EGLConfig">
+</parameter>
+<parameter name="native_window" type="java.lang.Object">
+</parameter>
+<parameter name="attrib_list" type="int[]">
+</parameter>
+</method>
+<method name="eglDestroyContext"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="display" type="javax.microedition.khronos.egl.EGLDisplay">
+</parameter>
+<parameter name="context" type="javax.microedition.khronos.egl.EGLContext">
+</parameter>
+</method>
+<method name="eglDestroySurface"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="display" type="javax.microedition.khronos.egl.EGLDisplay">
+</parameter>
+<parameter name="surface" type="javax.microedition.khronos.egl.EGLSurface">
+</parameter>
+</method>
+<method name="eglGetConfigAttrib"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="display" type="javax.microedition.khronos.egl.EGLDisplay">
+</parameter>
+<parameter name="config" type="javax.microedition.khronos.egl.EGLConfig">
+</parameter>
+<parameter name="attribute" type="int">
+</parameter>
+<parameter name="value" type="int[]">
+</parameter>
+</method>
+<method name="eglGetConfigs"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="display" type="javax.microedition.khronos.egl.EGLDisplay">
+</parameter>
+<parameter name="configs" type="javax.microedition.khronos.egl.EGLConfig[]">
+</parameter>
+<parameter name="config_size" type="int">
+</parameter>
+<parameter name="num_config" type="int[]">
+</parameter>
+</method>
+<method name="eglGetCurrentContext"
+ return="javax.microedition.khronos.egl.EGLContext"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="eglGetCurrentDisplay"
+ return="javax.microedition.khronos.egl.EGLDisplay"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="eglGetCurrentSurface"
+ return="javax.microedition.khronos.egl.EGLSurface"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="readdraw" type="int">
+</parameter>
+</method>
+<method name="eglGetDisplay"
+ return="javax.microedition.khronos.egl.EGLDisplay"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="native_display" type="java.lang.Object">
+</parameter>
+</method>
+<method name="eglGetError"
+ return="int"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="eglInitialize"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="display" type="javax.microedition.khronos.egl.EGLDisplay">
+</parameter>
+<parameter name="major_minor" type="int[]">
+</parameter>
+</method>
+<method name="eglMakeCurrent"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="display" type="javax.microedition.khronos.egl.EGLDisplay">
+</parameter>
+<parameter name="draw" type="javax.microedition.khronos.egl.EGLSurface">
+</parameter>
+<parameter name="read" type="javax.microedition.khronos.egl.EGLSurface">
+</parameter>
+<parameter name="context" type="javax.microedition.khronos.egl.EGLContext">
+</parameter>
+</method>
+<method name="eglQueryContext"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="display" type="javax.microedition.khronos.egl.EGLDisplay">
+</parameter>
+<parameter name="context" type="javax.microedition.khronos.egl.EGLContext">
+</parameter>
+<parameter name="attribute" type="int">
+</parameter>
+<parameter name="value" type="int[]">
+</parameter>
+</method>
+<method name="eglQueryString"
+ return="java.lang.String"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="display" type="javax.microedition.khronos.egl.EGLDisplay">
+</parameter>
+<parameter name="name" type="int">
+</parameter>
+</method>
+<method name="eglQuerySurface"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="display" type="javax.microedition.khronos.egl.EGLDisplay">
+</parameter>
+<parameter name="surface" type="javax.microedition.khronos.egl.EGLSurface">
+</parameter>
+<parameter name="attribute" type="int">
+</parameter>
+<parameter name="value" type="int[]">
+</parameter>
+</method>
+<method name="eglSwapBuffers"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="display" type="javax.microedition.khronos.egl.EGLDisplay">
+</parameter>
+<parameter name="surface" type="javax.microedition.khronos.egl.EGLSurface">
+</parameter>
+</method>
+<method name="eglTerminate"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="display" type="javax.microedition.khronos.egl.EGLDisplay">
+</parameter>
+</method>
+<method name="eglWaitGL"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="eglWaitNative"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="engine" type="int">
+</parameter>
+<parameter name="bindTarget" type="java.lang.Object">
+</parameter>
+</method>
+<field name="EGL_ALPHA_FORMAT"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="12424"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="EGL_ALPHA_MASK_SIZE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="12350"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="EGL_ALPHA_SIZE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="12321"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="EGL_BAD_ACCESS"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="12290"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="EGL_BAD_ALLOC"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="12291"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="EGL_BAD_ATTRIBUTE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="12292"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="EGL_BAD_CONFIG"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="12293"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="EGL_BAD_CONTEXT"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="12294"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="EGL_BAD_CURRENT_SURFACE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="12295"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="EGL_BAD_DISPLAY"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="12296"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="EGL_BAD_MATCH"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="12297"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="EGL_BAD_NATIVE_PIXMAP"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="12298"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="EGL_BAD_NATIVE_WINDOW"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="12299"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="EGL_BAD_PARAMETER"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="12300"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="EGL_BAD_SURFACE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="12301"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="EGL_BLUE_SIZE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="12322"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="EGL_BUFFER_SIZE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="12320"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="EGL_COLORSPACE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="12423"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="EGL_COLOR_BUFFER_TYPE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="12351"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="EGL_CONFIG_CAVEAT"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="12327"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="EGL_CONFIG_ID"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="12328"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="EGL_CORE_NATIVE_ENGINE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="12379"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="EGL_DEFAULT_DISPLAY"
+ type="java.lang.Object"
+ transient="false"
+ volatile="false"
+ value="null"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="EGL_DEPTH_SIZE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="12325"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="EGL_DONT_CARE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="-1"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="EGL_DRAW"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="12377"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="EGL_EXTENSIONS"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="12373"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="EGL_GREEN_SIZE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="12323"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="EGL_HEIGHT"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="12374"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="EGL_HORIZONTAL_RESOLUTION"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="12432"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="EGL_LARGEST_PBUFFER"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="12376"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="EGL_LEVEL"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="12329"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="EGL_LUMINANCE_BUFFER"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="12431"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="EGL_LUMINANCE_SIZE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="12349"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="EGL_MAX_PBUFFER_HEIGHT"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="12330"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="EGL_MAX_PBUFFER_PIXELS"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="12331"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="EGL_MAX_PBUFFER_WIDTH"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="12332"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="EGL_NATIVE_RENDERABLE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="12333"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="EGL_NATIVE_VISUAL_ID"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="12334"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="EGL_NATIVE_VISUAL_TYPE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="12335"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="EGL_NONE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="12344"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="EGL_NON_CONFORMANT_CONFIG"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="12369"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="EGL_NOT_INITIALIZED"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="12289"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="EGL_NO_CONTEXT"
+ type="javax.microedition.khronos.egl.EGLContext"
+ transient="false"
+ volatile="false"
+ value="null"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="EGL_NO_DISPLAY"
+ type="javax.microedition.khronos.egl.EGLDisplay"
+ transient="false"
+ volatile="false"
+ value="null"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="EGL_NO_SURFACE"
+ type="javax.microedition.khronos.egl.EGLSurface"
+ transient="false"
+ volatile="false"
+ value="null"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="EGL_PBUFFER_BIT"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="EGL_PIXEL_ASPECT_RATIO"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="12434"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="EGL_PIXMAP_BIT"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="EGL_READ"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="12378"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="EGL_RED_SIZE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="12324"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="EGL_RENDERABLE_TYPE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="12352"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="EGL_RENDER_BUFFER"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="12422"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="EGL_RGB_BUFFER"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="12430"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="EGL_SAMPLES"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="12337"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="EGL_SAMPLE_BUFFERS"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="12338"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="EGL_SINGLE_BUFFER"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="12421"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="EGL_SLOW_CONFIG"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="12368"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="EGL_STENCIL_SIZE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="12326"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="EGL_SUCCESS"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="12288"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="EGL_SURFACE_TYPE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="12339"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="EGL_TRANSPARENT_BLUE_VALUE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="12341"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="EGL_TRANSPARENT_GREEN_VALUE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="12342"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="EGL_TRANSPARENT_RED_VALUE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="12343"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="EGL_TRANSPARENT_RGB"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="12370"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="EGL_TRANSPARENT_TYPE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="12340"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="EGL_VENDOR"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="12371"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="EGL_VERSION"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="12372"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="EGL_VERTICAL_RESOLUTION"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="12433"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="EGL_WIDTH"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="12375"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="EGL_WINDOW_BIT"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="4"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</interface>
+<interface name="EGL11"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="javax.microedition.khronos.egl.EGL10">
+</implements>
+<field name="EGL_CONTEXT_LOST"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="12302"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</interface>
+<class name="EGLConfig"
+ extends="java.lang.Object"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="EGLConfig"
+ type="javax.microedition.khronos.egl.EGLConfig"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+</class>
+<class name="EGLContext"
+ extends="java.lang.Object"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="EGLContext"
+ type="javax.microedition.khronos.egl.EGLContext"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<method name="getEGL"
+ return="javax.microedition.khronos.egl.EGL"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getGL"
+ return="javax.microedition.khronos.opengles.GL"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+</class>
+<class name="EGLDisplay"
+ extends="java.lang.Object"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="EGLDisplay"
+ type="javax.microedition.khronos.egl.EGLDisplay"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+</class>
+<class name="EGLSurface"
+ extends="java.lang.Object"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="EGLSurface"
+ type="javax.microedition.khronos.egl.EGLSurface"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+</class>
+</package>
+<package name="javax.microedition.khronos.opengles"
+>
+<interface name="GL"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</interface>
+<interface name="GL10"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="javax.microedition.khronos.opengles.GL">
+</implements>
+<method name="glActiveTexture"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="texture" type="int">
+</parameter>
+</method>
+<method name="glAlphaFunc"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="func" type="int">
+</parameter>
+<parameter name="ref" type="float">
+</parameter>
+</method>
+<method name="glAlphaFuncx"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="func" type="int">
+</parameter>
+<parameter name="ref" type="int">
+</parameter>
+</method>
+<method name="glBindTexture"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="target" type="int">
+</parameter>
+<parameter name="texture" type="int">
+</parameter>
+</method>
+<method name="glBlendFunc"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="sfactor" type="int">
+</parameter>
+<parameter name="dfactor" type="int">
+</parameter>
+</method>
+<method name="glClear"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="mask" type="int">
+</parameter>
+</method>
+<method name="glClearColor"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="red" type="float">
+</parameter>
+<parameter name="green" type="float">
+</parameter>
+<parameter name="blue" type="float">
+</parameter>
+<parameter name="alpha" type="float">
+</parameter>
+</method>
+<method name="glClearColorx"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="red" type="int">
+</parameter>
+<parameter name="green" type="int">
+</parameter>
+<parameter name="blue" type="int">
+</parameter>
+<parameter name="alpha" type="int">
+</parameter>
+</method>
+<method name="glClearDepthf"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="depth" type="float">
+</parameter>
+</method>
+<method name="glClearDepthx"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="depth" type="int">
+</parameter>
+</method>
+<method name="glClearStencil"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="s" type="int">
+</parameter>
+</method>
+<method name="glClientActiveTexture"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="texture" type="int">
+</parameter>
+</method>
+<method name="glColor4f"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="red" type="float">
+</parameter>
+<parameter name="green" type="float">
+</parameter>
+<parameter name="blue" type="float">
+</parameter>
+<parameter name="alpha" type="float">
+</parameter>
+</method>
+<method name="glColor4x"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="red" type="int">
+</parameter>
+<parameter name="green" type="int">
+</parameter>
+<parameter name="blue" type="int">
+</parameter>
+<parameter name="alpha" type="int">
+</parameter>
+</method>
+<method name="glColorMask"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="red" type="boolean">
+</parameter>
+<parameter name="green" type="boolean">
+</parameter>
+<parameter name="blue" type="boolean">
+</parameter>
+<parameter name="alpha" type="boolean">
+</parameter>
+</method>
+<method name="glColorPointer"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="size" type="int">
+</parameter>
+<parameter name="type" type="int">
+</parameter>
+<parameter name="stride" type="int">
+</parameter>
+<parameter name="pointer" type="java.nio.Buffer">
+</parameter>
+</method>
+<method name="glCompressedTexImage2D"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="target" type="int">
+</parameter>
+<parameter name="level" type="int">
+</parameter>
+<parameter name="internalformat" type="int">
+</parameter>
+<parameter name="width" type="int">
+</parameter>
+<parameter name="height" type="int">
+</parameter>
+<parameter name="border" type="int">
+</parameter>
+<parameter name="imageSize" type="int">
+</parameter>
+<parameter name="data" type="java.nio.Buffer">
+</parameter>
+</method>
+<method name="glCompressedTexSubImage2D"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="target" type="int">
+</parameter>
+<parameter name="level" type="int">
+</parameter>
+<parameter name="xoffset" type="int">
+</parameter>
+<parameter name="yoffset" type="int">
+</parameter>
+<parameter name="width" type="int">
+</parameter>
+<parameter name="height" type="int">
+</parameter>
+<parameter name="format" type="int">
+</parameter>
+<parameter name="imageSize" type="int">
+</parameter>
+<parameter name="data" type="java.nio.Buffer">
+</parameter>
+</method>
+<method name="glCopyTexImage2D"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="target" type="int">
+</parameter>
+<parameter name="level" type="int">
+</parameter>
+<parameter name="internalformat" type="int">
+</parameter>
+<parameter name="x" type="int">
+</parameter>
+<parameter name="y" type="int">
+</parameter>
+<parameter name="width" type="int">
+</parameter>
+<parameter name="height" type="int">
+</parameter>
+<parameter name="border" type="int">
+</parameter>
+</method>
+<method name="glCopyTexSubImage2D"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="target" type="int">
+</parameter>
+<parameter name="level" type="int">
+</parameter>
+<parameter name="xoffset" type="int">
+</parameter>
+<parameter name="yoffset" type="int">
+</parameter>
+<parameter name="x" type="int">
+</parameter>
+<parameter name="y" type="int">
+</parameter>
+<parameter name="width" type="int">
+</parameter>
+<parameter name="height" type="int">
+</parameter>
+</method>
+<method name="glCullFace"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="mode" type="int">
+</parameter>
+</method>
+<method name="glDeleteTextures"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="n" type="int">
+</parameter>
+<parameter name="textures" type="int[]">
+</parameter>
+<parameter name="offset" type="int">
+</parameter>
+</method>
+<method name="glDeleteTextures"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="n" type="int">
+</parameter>
+<parameter name="textures" type="java.nio.IntBuffer">
+</parameter>
+</method>
+<method name="glDepthFunc"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="func" type="int">
+</parameter>
+</method>
+<method name="glDepthMask"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="flag" type="boolean">
+</parameter>
+</method>
+<method name="glDepthRangef"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="zNear" type="float">
+</parameter>
+<parameter name="zFar" type="float">
+</parameter>
+</method>
+<method name="glDepthRangex"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="zNear" type="int">
+</parameter>
+<parameter name="zFar" type="int">
+</parameter>
+</method>
+<method name="glDisable"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="cap" type="int">
+</parameter>
+</method>
+<method name="glDisableClientState"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="array" type="int">
+</parameter>
+</method>
+<method name="glDrawArrays"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="mode" type="int">
+</parameter>
+<parameter name="first" type="int">
+</parameter>
+<parameter name="count" type="int">
+</parameter>
+</method>
+<method name="glDrawElements"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="mode" type="int">
+</parameter>
+<parameter name="count" type="int">
+</parameter>
+<parameter name="type" type="int">
+</parameter>
+<parameter name="indices" type="java.nio.Buffer">
+</parameter>
+</method>
+<method name="glEnable"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="cap" type="int">
+</parameter>
+</method>
+<method name="glEnableClientState"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="array" type="int">
+</parameter>
+</method>
+<method name="glFinish"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="glFlush"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="glFogf"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="pname" type="int">
+</parameter>
+<parameter name="param" type="float">
+</parameter>
+</method>
+<method name="glFogfv"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="pname" type="int">
+</parameter>
+<parameter name="params" type="float[]">
+</parameter>
+<parameter name="offset" type="int">
+</parameter>
+</method>
+<method name="glFogfv"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="pname" type="int">
+</parameter>
+<parameter name="params" type="java.nio.FloatBuffer">
+</parameter>
+</method>
+<method name="glFogx"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="pname" type="int">
+</parameter>
+<parameter name="param" type="int">
+</parameter>
+</method>
+<method name="glFogxv"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="pname" type="int">
+</parameter>
+<parameter name="params" type="int[]">
+</parameter>
+<parameter name="offset" type="int">
+</parameter>
+</method>
+<method name="glFogxv"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="pname" type="int">
+</parameter>
+<parameter name="params" type="java.nio.IntBuffer">
+</parameter>
+</method>
+<method name="glFrontFace"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="mode" type="int">
+</parameter>
+</method>
+<method name="glFrustumf"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="left" type="float">
+</parameter>
+<parameter name="right" type="float">
+</parameter>
+<parameter name="bottom" type="float">
+</parameter>
+<parameter name="top" type="float">
+</parameter>
+<parameter name="zNear" type="float">
+</parameter>
+<parameter name="zFar" type="float">
+</parameter>
+</method>
+<method name="glFrustumx"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="left" type="int">
+</parameter>
+<parameter name="right" type="int">
+</parameter>
+<parameter name="bottom" type="int">
+</parameter>
+<parameter name="top" type="int">
+</parameter>
+<parameter name="zNear" type="int">
+</parameter>
+<parameter name="zFar" type="int">
+</parameter>
+</method>
+<method name="glGenTextures"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="n" type="int">
+</parameter>
+<parameter name="textures" type="int[]">
+</parameter>
+<parameter name="offset" type="int">
+</parameter>
+</method>
+<method name="glGenTextures"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="n" type="int">
+</parameter>
+<parameter name="textures" type="java.nio.IntBuffer">
+</parameter>
+</method>
+<method name="glGetError"
+ return="int"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="glGetIntegerv"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="pname" type="int">
+</parameter>
+<parameter name="params" type="int[]">
+</parameter>
+<parameter name="offset" type="int">
+</parameter>
+</method>
+<method name="glGetIntegerv"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="pname" type="int">
+</parameter>
+<parameter name="params" type="java.nio.IntBuffer">
+</parameter>
+</method>
+<method name="glGetString"
+ return="java.lang.String"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="int">
+</parameter>
+</method>
+<method name="glHint"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="target" type="int">
+</parameter>
+<parameter name="mode" type="int">
+</parameter>
+</method>
+<method name="glLightModelf"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="pname" type="int">
+</parameter>
+<parameter name="param" type="float">
+</parameter>
+</method>
+<method name="glLightModelfv"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="pname" type="int">
+</parameter>
+<parameter name="params" type="float[]">
+</parameter>
+<parameter name="offset" type="int">
+</parameter>
+</method>
+<method name="glLightModelfv"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="pname" type="int">
+</parameter>
+<parameter name="params" type="java.nio.FloatBuffer">
+</parameter>
+</method>
+<method name="glLightModelx"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="pname" type="int">
+</parameter>
+<parameter name="param" type="int">
+</parameter>
+</method>
+<method name="glLightModelxv"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="pname" type="int">
+</parameter>
+<parameter name="params" type="int[]">
+</parameter>
+<parameter name="offset" type="int">
+</parameter>
+</method>
+<method name="glLightModelxv"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="pname" type="int">
+</parameter>
+<parameter name="params" type="java.nio.IntBuffer">
+</parameter>
+</method>
+<method name="glLightf"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="light" type="int">
+</parameter>
+<parameter name="pname" type="int">
+</parameter>
+<parameter name="param" type="float">
+</parameter>
+</method>
+<method name="glLightfv"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="light" type="int">
+</parameter>
+<parameter name="pname" type="int">
+</parameter>
+<parameter name="params" type="float[]">
+</parameter>
+<parameter name="offset" type="int">
+</parameter>
+</method>
+<method name="glLightfv"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="light" type="int">
+</parameter>
+<parameter name="pname" type="int">
+</parameter>
+<parameter name="params" type="java.nio.FloatBuffer">
+</parameter>
+</method>
+<method name="glLightx"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="light" type="int">
+</parameter>
+<parameter name="pname" type="int">
+</parameter>
+<parameter name="param" type="int">
+</parameter>
+</method>
+<method name="glLightxv"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="light" type="int">
+</parameter>
+<parameter name="pname" type="int">
+</parameter>
+<parameter name="params" type="int[]">
+</parameter>
+<parameter name="offset" type="int">
+</parameter>
+</method>
+<method name="glLightxv"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="light" type="int">
+</parameter>
+<parameter name="pname" type="int">
+</parameter>
+<parameter name="params" type="java.nio.IntBuffer">
+</parameter>
+</method>
+<method name="glLineWidth"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="width" type="float">
+</parameter>
+</method>
+<method name="glLineWidthx"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="width" type="int">
+</parameter>
+</method>
+<method name="glLoadIdentity"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="glLoadMatrixf"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="m" type="float[]">
+</parameter>
+<parameter name="offset" type="int">
+</parameter>
+</method>
+<method name="glLoadMatrixf"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="m" type="java.nio.FloatBuffer">
+</parameter>
+</method>
+<method name="glLoadMatrixx"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="m" type="int[]">
+</parameter>
+<parameter name="offset" type="int">
+</parameter>
+</method>
+<method name="glLoadMatrixx"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="m" type="java.nio.IntBuffer">
+</parameter>
+</method>
+<method name="glLogicOp"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="opcode" type="int">
+</parameter>
+</method>
+<method name="glMaterialf"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="face" type="int">
+</parameter>
+<parameter name="pname" type="int">
+</parameter>
+<parameter name="param" type="float">
+</parameter>
+</method>
+<method name="glMaterialfv"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="face" type="int">
+</parameter>
+<parameter name="pname" type="int">
+</parameter>
+<parameter name="params" type="float[]">
+</parameter>
+<parameter name="offset" type="int">
+</parameter>
+</method>
+<method name="glMaterialfv"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="face" type="int">
+</parameter>
+<parameter name="pname" type="int">
+</parameter>
+<parameter name="params" type="java.nio.FloatBuffer">
+</parameter>
+</method>
+<method name="glMaterialx"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="face" type="int">
+</parameter>
+<parameter name="pname" type="int">
+</parameter>
+<parameter name="param" type="int">
+</parameter>
+</method>
+<method name="glMaterialxv"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="face" type="int">
+</parameter>
+<parameter name="pname" type="int">
+</parameter>
+<parameter name="params" type="int[]">
+</parameter>
+<parameter name="offset" type="int">
+</parameter>
+</method>
+<method name="glMaterialxv"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="face" type="int">
+</parameter>
+<parameter name="pname" type="int">
+</parameter>
+<parameter name="params" type="java.nio.IntBuffer">
+</parameter>
+</method>
+<method name="glMatrixMode"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="mode" type="int">
+</parameter>
+</method>
+<method name="glMultMatrixf"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="m" type="float[]">
+</parameter>
+<parameter name="offset" type="int">
+</parameter>
+</method>
+<method name="glMultMatrixf"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="m" type="java.nio.FloatBuffer">
+</parameter>
+</method>
+<method name="glMultMatrixx"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="m" type="int[]">
+</parameter>
+<parameter name="offset" type="int">
+</parameter>
+</method>
+<method name="glMultMatrixx"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="m" type="java.nio.IntBuffer">
+</parameter>
+</method>
+<method name="glMultiTexCoord4f"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="target" type="int">
+</parameter>
+<parameter name="s" type="float">
+</parameter>
+<parameter name="t" type="float">
+</parameter>
+<parameter name="r" type="float">
+</parameter>
+<parameter name="q" type="float">
+</parameter>
+</method>
+<method name="glMultiTexCoord4x"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="target" type="int">
+</parameter>
+<parameter name="s" type="int">
+</parameter>
+<parameter name="t" type="int">
+</parameter>
+<parameter name="r" type="int">
+</parameter>
+<parameter name="q" type="int">
+</parameter>
+</method>
+<method name="glNormal3f"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="nx" type="float">
+</parameter>
+<parameter name="ny" type="float">
+</parameter>
+<parameter name="nz" type="float">
+</parameter>
+</method>
+<method name="glNormal3x"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="nx" type="int">
+</parameter>
+<parameter name="ny" type="int">
+</parameter>
+<parameter name="nz" type="int">
+</parameter>
+</method>
+<method name="glNormalPointer"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="type" type="int">
+</parameter>
+<parameter name="stride" type="int">
+</parameter>
+<parameter name="pointer" type="java.nio.Buffer">
+</parameter>
+</method>
+<method name="glOrthof"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="left" type="float">
+</parameter>
+<parameter name="right" type="float">
+</parameter>
+<parameter name="bottom" type="float">
+</parameter>
+<parameter name="top" type="float">
+</parameter>
+<parameter name="zNear" type="float">
+</parameter>
+<parameter name="zFar" type="float">
+</parameter>
+</method>
+<method name="glOrthox"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="left" type="int">
+</parameter>
+<parameter name="right" type="int">
+</parameter>
+<parameter name="bottom" type="int">
+</parameter>
+<parameter name="top" type="int">
+</parameter>
+<parameter name="zNear" type="int">
+</parameter>
+<parameter name="zFar" type="int">
+</parameter>
+</method>
+<method name="glPixelStorei"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="pname" type="int">
+</parameter>
+<parameter name="param" type="int">
+</parameter>
+</method>
+<method name="glPointSize"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="size" type="float">
+</parameter>
+</method>
+<method name="glPointSizex"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="size" type="int">
+</parameter>
+</method>
+<method name="glPolygonOffset"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="factor" type="float">
+</parameter>
+<parameter name="units" type="float">
+</parameter>
+</method>
+<method name="glPolygonOffsetx"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="factor" type="int">
+</parameter>
+<parameter name="units" type="int">
+</parameter>
+</method>
+<method name="glPopMatrix"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="glPushMatrix"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="glReadPixels"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="x" type="int">
+</parameter>
+<parameter name="y" type="int">
+</parameter>
+<parameter name="width" type="int">
+</parameter>
+<parameter name="height" type="int">
+</parameter>
+<parameter name="format" type="int">
+</parameter>
+<parameter name="type" type="int">
+</parameter>
+<parameter name="pixels" type="java.nio.Buffer">
+</parameter>
+</method>
+<method name="glRotatef"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="angle" type="float">
+</parameter>
+<parameter name="x" type="float">
+</parameter>
+<parameter name="y" type="float">
+</parameter>
+<parameter name="z" type="float">
+</parameter>
+</method>
+<method name="glRotatex"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="angle" type="int">
+</parameter>
+<parameter name="x" type="int">
+</parameter>
+<parameter name="y" type="int">
+</parameter>
+<parameter name="z" type="int">
+</parameter>
+</method>
+<method name="glSampleCoverage"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="value" type="float">
+</parameter>
+<parameter name="invert" type="boolean">
+</parameter>
+</method>
+<method name="glSampleCoveragex"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="value" type="int">
+</parameter>
+<parameter name="invert" type="boolean">
+</parameter>
+</method>
+<method name="glScalef"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="x" type="float">
+</parameter>
+<parameter name="y" type="float">
+</parameter>
+<parameter name="z" type="float">
+</parameter>
+</method>
+<method name="glScalex"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="x" type="int">
+</parameter>
+<parameter name="y" type="int">
+</parameter>
+<parameter name="z" type="int">
+</parameter>
+</method>
+<method name="glScissor"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="x" type="int">
+</parameter>
+<parameter name="y" type="int">
+</parameter>
+<parameter name="width" type="int">
+</parameter>
+<parameter name="height" type="int">
+</parameter>
+</method>
+<method name="glShadeModel"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="mode" type="int">
+</parameter>
+</method>
+<method name="glStencilFunc"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="func" type="int">
+</parameter>
+<parameter name="ref" type="int">
+</parameter>
+<parameter name="mask" type="int">
+</parameter>
+</method>
+<method name="glStencilMask"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="mask" type="int">
+</parameter>
+</method>
+<method name="glStencilOp"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="fail" type="int">
+</parameter>
+<parameter name="zfail" type="int">
+</parameter>
+<parameter name="zpass" type="int">
+</parameter>
+</method>
+<method name="glTexCoordPointer"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="size" type="int">
+</parameter>
+<parameter name="type" type="int">
+</parameter>
+<parameter name="stride" type="int">
+</parameter>
+<parameter name="pointer" type="java.nio.Buffer">
+</parameter>
+</method>
+<method name="glTexEnvf"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="target" type="int">
+</parameter>
+<parameter name="pname" type="int">
+</parameter>
+<parameter name="param" type="float">
+</parameter>
+</method>
+<method name="glTexEnvfv"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="target" type="int">
+</parameter>
+<parameter name="pname" type="int">
+</parameter>
+<parameter name="params" type="float[]">
+</parameter>
+<parameter name="offset" type="int">
+</parameter>
+</method>
+<method name="glTexEnvfv"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="target" type="int">
+</parameter>
+<parameter name="pname" type="int">
+</parameter>
+<parameter name="params" type="java.nio.FloatBuffer">
+</parameter>
+</method>
+<method name="glTexEnvx"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="target" type="int">
+</parameter>
+<parameter name="pname" type="int">
+</parameter>
+<parameter name="param" type="int">
+</parameter>
+</method>
+<method name="glTexEnvxv"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="target" type="int">
+</parameter>
+<parameter name="pname" type="int">
+</parameter>
+<parameter name="params" type="int[]">
+</parameter>
+<parameter name="offset" type="int">
+</parameter>
+</method>
+<method name="glTexEnvxv"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="target" type="int">
+</parameter>
+<parameter name="pname" type="int">
+</parameter>
+<parameter name="params" type="java.nio.IntBuffer">
+</parameter>
+</method>
+<method name="glTexImage2D"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="target" type="int">
+</parameter>
+<parameter name="level" type="int">
+</parameter>
+<parameter name="internalformat" type="int">
+</parameter>
+<parameter name="width" type="int">
+</parameter>
+<parameter name="height" type="int">
+</parameter>
+<parameter name="border" type="int">
+</parameter>
+<parameter name="format" type="int">
+</parameter>
+<parameter name="type" type="int">
+</parameter>
+<parameter name="pixels" type="java.nio.Buffer">
+</parameter>
+</method>
+<method name="glTexParameterf"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="target" type="int">
+</parameter>
+<parameter name="pname" type="int">
+</parameter>
+<parameter name="param" type="float">
+</parameter>
+</method>
+<method name="glTexParameterx"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="target" type="int">
+</parameter>
+<parameter name="pname" type="int">
+</parameter>
+<parameter name="param" type="int">
+</parameter>
+</method>
+<method name="glTexSubImage2D"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="target" type="int">
+</parameter>
+<parameter name="level" type="int">
+</parameter>
+<parameter name="xoffset" type="int">
+</parameter>
+<parameter name="yoffset" type="int">
+</parameter>
+<parameter name="width" type="int">
+</parameter>
+<parameter name="height" type="int">
+</parameter>
+<parameter name="format" type="int">
+</parameter>
+<parameter name="type" type="int">
+</parameter>
+<parameter name="pixels" type="java.nio.Buffer">
+</parameter>
+</method>
+<method name="glTranslatef"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="x" type="float">
+</parameter>
+<parameter name="y" type="float">
+</parameter>
+<parameter name="z" type="float">
+</parameter>
+</method>
+<method name="glTranslatex"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="x" type="int">
+</parameter>
+<parameter name="y" type="int">
+</parameter>
+<parameter name="z" type="int">
+</parameter>
+</method>
+<method name="glVertexPointer"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="size" type="int">
+</parameter>
+<parameter name="type" type="int">
+</parameter>
+<parameter name="stride" type="int">
+</parameter>
+<parameter name="pointer" type="java.nio.Buffer">
+</parameter>
+</method>
+<method name="glViewport"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="x" type="int">
+</parameter>
+<parameter name="y" type="int">
+</parameter>
+<parameter name="width" type="int">
+</parameter>
+<parameter name="height" type="int">
+</parameter>
+</method>
+<field name="GL_ADD"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="260"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_ALIASED_LINE_WIDTH_RANGE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="33902"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_ALIASED_POINT_SIZE_RANGE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="33901"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_ALPHA"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="6406"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_ALPHA_BITS"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="3413"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_ALPHA_TEST"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="3008"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_ALWAYS"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="519"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_AMBIENT"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="4608"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_AMBIENT_AND_DIFFUSE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="5634"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_AND"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="5377"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_AND_INVERTED"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="5380"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_AND_REVERSE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="5378"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_BACK"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1029"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_BLEND"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="3042"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_BLUE_BITS"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="3412"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_BYTE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="5120"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_CCW"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2305"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_CLAMP_TO_EDGE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="33071"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_CLEAR"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="5376"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_COLOR_ARRAY"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="32886"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_COLOR_BUFFER_BIT"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16384"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_COLOR_LOGIC_OP"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="3058"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_COLOR_MATERIAL"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2903"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_COMPRESSED_TEXTURE_FORMATS"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="34467"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_CONSTANT_ATTENUATION"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="4615"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_COPY"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="5379"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_COPY_INVERTED"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="5388"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_CULL_FACE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2884"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_CW"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2304"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_DECAL"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="8449"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_DECR"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="7683"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_DEPTH_BITS"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="3414"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_DEPTH_BUFFER_BIT"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="256"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_DEPTH_TEST"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2929"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_DIFFUSE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="4609"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_DITHER"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="3024"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_DONT_CARE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="4352"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_DST_ALPHA"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="772"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_DST_COLOR"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="774"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_EMISSION"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="5632"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_EQUAL"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="514"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_EQUIV"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="5385"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_EXP"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2048"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_EXP2"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2049"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_EXTENSIONS"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="7939"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_FALSE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="0"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_FASTEST"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="4353"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_FIXED"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="5132"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_FLAT"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="7424"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_FLOAT"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="5126"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_FOG"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2912"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_FOG_COLOR"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2918"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_FOG_DENSITY"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2914"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_FOG_END"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2916"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_FOG_HINT"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="3156"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_FOG_MODE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2917"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_FOG_START"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2915"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_FRONT"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1028"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_FRONT_AND_BACK"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1032"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_GEQUAL"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="518"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_GREATER"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="516"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_GREEN_BITS"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="3411"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_IMPLEMENTATION_COLOR_READ_FORMAT_OES"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="35739"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_IMPLEMENTATION_COLOR_READ_TYPE_OES"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="35738"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_INCR"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="7682"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_INVALID_ENUM"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1280"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_INVALID_OPERATION"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1282"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_INVALID_VALUE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1281"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_INVERT"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="5386"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_KEEP"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="7680"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_LEQUAL"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="515"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_LESS"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="513"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_LIGHT0"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16384"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_LIGHT1"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16385"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_LIGHT2"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16386"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_LIGHT3"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16387"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_LIGHT4"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16388"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_LIGHT5"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16389"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_LIGHT6"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16390"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_LIGHT7"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16391"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_LIGHTING"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2896"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_LIGHT_MODEL_AMBIENT"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2899"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_LIGHT_MODEL_TWO_SIDE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2898"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_LINEAR"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="9729"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_LINEAR_ATTENUATION"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="4616"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_LINEAR_MIPMAP_LINEAR"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="9987"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_LINEAR_MIPMAP_NEAREST"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="9985"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_LINES"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_LINE_LOOP"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_LINE_SMOOTH"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2848"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_LINE_SMOOTH_HINT"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="3154"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_LINE_STRIP"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="3"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_LUMINANCE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="6409"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_LUMINANCE_ALPHA"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="6410"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_MAX_ELEMENTS_INDICES"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="33001"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_MAX_ELEMENTS_VERTICES"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="33000"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_MAX_LIGHTS"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="3377"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_MAX_MODELVIEW_STACK_DEPTH"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="3382"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_MAX_PROJECTION_STACK_DEPTH"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="3384"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_MAX_TEXTURE_SIZE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="3379"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_MAX_TEXTURE_STACK_DEPTH"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="3385"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_MAX_TEXTURE_UNITS"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="34018"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_MAX_VIEWPORT_DIMS"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="3386"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_MODELVIEW"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="5888"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_MODULATE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="8448"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_MULTISAMPLE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="32925"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_NAND"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="5390"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_NEAREST"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="9728"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_NEAREST_MIPMAP_LINEAR"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="9986"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_NEAREST_MIPMAP_NEAREST"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="9984"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_NEVER"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="512"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_NICEST"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="4354"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_NOOP"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="5381"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_NOR"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="5384"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_NORMALIZE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2977"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_NORMAL_ARRAY"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="32885"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_NOTEQUAL"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="517"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_NO_ERROR"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="0"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_NUM_COMPRESSED_TEXTURE_FORMATS"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="34466"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_ONE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_ONE_MINUS_DST_ALPHA"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="773"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_ONE_MINUS_DST_COLOR"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="775"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_ONE_MINUS_SRC_ALPHA"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="771"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_ONE_MINUS_SRC_COLOR"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="769"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_OR"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="5383"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_OR_INVERTED"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="5389"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_OR_REVERSE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="5387"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_OUT_OF_MEMORY"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1285"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_PACK_ALIGNMENT"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="3333"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_PALETTE4_R5_G6_B5_OES"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="35730"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_PALETTE4_RGB5_A1_OES"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="35732"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_PALETTE4_RGB8_OES"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="35728"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_PALETTE4_RGBA4_OES"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="35731"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_PALETTE4_RGBA8_OES"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="35729"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_PALETTE8_R5_G6_B5_OES"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="35735"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_PALETTE8_RGB5_A1_OES"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="35737"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_PALETTE8_RGB8_OES"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="35733"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_PALETTE8_RGBA4_OES"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="35736"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_PALETTE8_RGBA8_OES"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="35734"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_PERSPECTIVE_CORRECTION_HINT"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="3152"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_POINTS"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="0"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_POINT_FADE_THRESHOLD_SIZE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="33064"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_POINT_SIZE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2833"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_POINT_SMOOTH"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2832"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_POINT_SMOOTH_HINT"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="3153"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_POLYGON_OFFSET_FILL"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="32823"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_POLYGON_SMOOTH_HINT"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="3155"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_POSITION"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="4611"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_PROJECTION"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="5889"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_QUADRATIC_ATTENUATION"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="4617"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_RED_BITS"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="3410"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_RENDERER"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="7937"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_REPEAT"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="10497"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_REPLACE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="7681"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_RESCALE_NORMAL"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="32826"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_RGB"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="6407"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_RGBA"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="6408"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_SAMPLE_ALPHA_TO_COVERAGE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="32926"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_SAMPLE_ALPHA_TO_ONE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="32927"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_SAMPLE_COVERAGE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="32928"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_SCISSOR_TEST"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="3089"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_SET"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="5391"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_SHININESS"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="5633"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_SHORT"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="5122"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_SMOOTH"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="7425"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_SMOOTH_LINE_WIDTH_RANGE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2850"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_SMOOTH_POINT_SIZE_RANGE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2834"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_SPECULAR"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="4610"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_SPOT_CUTOFF"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="4614"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_SPOT_DIRECTION"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="4612"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_SPOT_EXPONENT"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="4613"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_SRC_ALPHA"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="770"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_SRC_ALPHA_SATURATE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="776"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_SRC_COLOR"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="768"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_STACK_OVERFLOW"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1283"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_STACK_UNDERFLOW"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1284"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_STENCIL_BITS"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="3415"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_STENCIL_BUFFER_BIT"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1024"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_STENCIL_TEST"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2960"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_SUBPIXEL_BITS"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="3408"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_TEXTURE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="5890"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_TEXTURE0"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="33984"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_TEXTURE1"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="33985"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_TEXTURE10"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="33994"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_TEXTURE11"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="33995"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_TEXTURE12"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="33996"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_TEXTURE13"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="33997"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_TEXTURE14"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="33998"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_TEXTURE15"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="33999"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_TEXTURE16"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="34000"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_TEXTURE17"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="34001"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_TEXTURE18"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="34002"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_TEXTURE19"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="34003"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_TEXTURE2"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="33986"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_TEXTURE20"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="34004"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_TEXTURE21"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="34005"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_TEXTURE22"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="34006"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_TEXTURE23"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="34007"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_TEXTURE24"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="34008"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_TEXTURE25"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="34009"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_TEXTURE26"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="34010"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_TEXTURE27"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="34011"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_TEXTURE28"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="34012"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_TEXTURE29"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="34013"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_TEXTURE3"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="33987"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_TEXTURE30"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="34014"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_TEXTURE31"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="34015"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_TEXTURE4"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="33988"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_TEXTURE5"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="33989"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_TEXTURE6"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="33990"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_TEXTURE7"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="33991"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_TEXTURE8"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="33992"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_TEXTURE9"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="33993"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_TEXTURE_2D"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="3553"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_TEXTURE_COORD_ARRAY"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="32888"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_TEXTURE_ENV"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="8960"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_TEXTURE_ENV_COLOR"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="8705"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_TEXTURE_ENV_MODE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="8704"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_TEXTURE_MAG_FILTER"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="10240"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_TEXTURE_MIN_FILTER"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="10241"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_TEXTURE_WRAP_S"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="10242"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_TEXTURE_WRAP_T"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="10243"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_TRIANGLES"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="4"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_TRIANGLE_FAN"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="6"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_TRIANGLE_STRIP"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="5"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_TRUE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_UNPACK_ALIGNMENT"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="3317"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_UNSIGNED_BYTE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="5121"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_UNSIGNED_SHORT"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="5123"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_UNSIGNED_SHORT_4_4_4_4"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="32819"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_UNSIGNED_SHORT_5_5_5_1"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="32820"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_UNSIGNED_SHORT_5_6_5"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="33635"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_VENDOR"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="7936"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_VERSION"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="7938"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_VERTEX_ARRAY"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="32884"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_XOR"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="5382"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_ZERO"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="0"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</interface>
+<interface name="GL10Ext"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="javax.microedition.khronos.opengles.GL">
+</implements>
+<method name="glQueryMatrixxOES"
+ return="int"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="mantissa" type="int[]">
+</parameter>
+<parameter name="mantissaOffset" type="int">
+</parameter>
+<parameter name="exponent" type="int[]">
+</parameter>
+<parameter name="exponentOffset" type="int">
+</parameter>
+</method>
+<method name="glQueryMatrixxOES"
+ return="int"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="mantissa" type="java.nio.IntBuffer">
+</parameter>
+<parameter name="exponent" type="java.nio.IntBuffer">
+</parameter>
+</method>
+</interface>
+<interface name="GL11"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="javax.microedition.khronos.opengles.GL10">
+</implements>
+<method name="glBindBuffer"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="target" type="int">
+</parameter>
+<parameter name="buffer" type="int">
+</parameter>
+</method>
+<method name="glBufferData"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="target" type="int">
+</parameter>
+<parameter name="size" type="int">
+</parameter>
+<parameter name="data" type="java.nio.Buffer">
+</parameter>
+<parameter name="usage" type="int">
+</parameter>
+</method>
+<method name="glBufferSubData"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="target" type="int">
+</parameter>
+<parameter name="offset" type="int">
+</parameter>
+<parameter name="size" type="int">
+</parameter>
+<parameter name="data" type="java.nio.Buffer">
+</parameter>
+</method>
+<method name="glClipPlanef"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="plane" type="int">
+</parameter>
+<parameter name="equation" type="float[]">
+</parameter>
+<parameter name="offset" type="int">
+</parameter>
+</method>
+<method name="glClipPlanef"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="plane" type="int">
+</parameter>
+<parameter name="equation" type="java.nio.FloatBuffer">
+</parameter>
+</method>
+<method name="glClipPlanex"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="plane" type="int">
+</parameter>
+<parameter name="equation" type="int[]">
+</parameter>
+<parameter name="offset" type="int">
+</parameter>
+</method>
+<method name="glClipPlanex"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="plane" type="int">
+</parameter>
+<parameter name="equation" type="java.nio.IntBuffer">
+</parameter>
+</method>
+<method name="glColor4ub"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="red" type="byte">
+</parameter>
+<parameter name="green" type="byte">
+</parameter>
+<parameter name="blue" type="byte">
+</parameter>
+<parameter name="alpha" type="byte">
+</parameter>
+</method>
+<method name="glColorPointer"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="size" type="int">
+</parameter>
+<parameter name="type" type="int">
+</parameter>
+<parameter name="stride" type="int">
+</parameter>
+<parameter name="offset" type="int">
+</parameter>
+</method>
+<method name="glDeleteBuffers"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="n" type="int">
+</parameter>
+<parameter name="buffers" type="int[]">
+</parameter>
+<parameter name="offset" type="int">
+</parameter>
+</method>
+<method name="glDeleteBuffers"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="n" type="int">
+</parameter>
+<parameter name="buffers" type="java.nio.IntBuffer">
+</parameter>
+</method>
+<method name="glDrawElements"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="mode" type="int">
+</parameter>
+<parameter name="count" type="int">
+</parameter>
+<parameter name="type" type="int">
+</parameter>
+<parameter name="offset" type="int">
+</parameter>
+</method>
+<method name="glGenBuffers"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="n" type="int">
+</parameter>
+<parameter name="buffers" type="int[]">
+</parameter>
+<parameter name="offset" type="int">
+</parameter>
+</method>
+<method name="glGenBuffers"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="n" type="int">
+</parameter>
+<parameter name="buffers" type="java.nio.IntBuffer">
+</parameter>
+</method>
+<method name="glGetBooleanv"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="pname" type="int">
+</parameter>
+<parameter name="params" type="boolean[]">
+</parameter>
+<parameter name="offset" type="int">
+</parameter>
+</method>
+<method name="glGetBooleanv"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="pname" type="int">
+</parameter>
+<parameter name="params" type="java.nio.IntBuffer">
+</parameter>
+</method>
+<method name="glGetBufferParameteriv"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="target" type="int">
+</parameter>
+<parameter name="pname" type="int">
+</parameter>
+<parameter name="params" type="int[]">
+</parameter>
+<parameter name="offset" type="int">
+</parameter>
+</method>
+<method name="glGetBufferParameteriv"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="target" type="int">
+</parameter>
+<parameter name="pname" type="int">
+</parameter>
+<parameter name="params" type="java.nio.IntBuffer">
+</parameter>
+</method>
+<method name="glGetClipPlanef"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="pname" type="int">
+</parameter>
+<parameter name="eqn" type="float[]">
+</parameter>
+<parameter name="offset" type="int">
+</parameter>
+</method>
+<method name="glGetClipPlanef"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="pname" type="int">
+</parameter>
+<parameter name="eqn" type="java.nio.FloatBuffer">
+</parameter>
+</method>
+<method name="glGetClipPlanex"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="pname" type="int">
+</parameter>
+<parameter name="eqn" type="int[]">
+</parameter>
+<parameter name="offset" type="int">
+</parameter>
+</method>
+<method name="glGetClipPlanex"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="pname" type="int">
+</parameter>
+<parameter name="eqn" type="java.nio.IntBuffer">
+</parameter>
+</method>
+<method name="glGetFixedv"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="pname" type="int">
+</parameter>
+<parameter name="params" type="int[]">
+</parameter>
+<parameter name="offset" type="int">
+</parameter>
+</method>
+<method name="glGetFixedv"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="pname" type="int">
+</parameter>
+<parameter name="params" type="java.nio.IntBuffer">
+</parameter>
+</method>
+<method name="glGetFloatv"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="pname" type="int">
+</parameter>
+<parameter name="params" type="float[]">
+</parameter>
+<parameter name="offset" type="int">
+</parameter>
+</method>
+<method name="glGetFloatv"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="pname" type="int">
+</parameter>
+<parameter name="params" type="java.nio.FloatBuffer">
+</parameter>
+</method>
+<method name="glGetLightfv"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="light" type="int">
+</parameter>
+<parameter name="pname" type="int">
+</parameter>
+<parameter name="params" type="float[]">
+</parameter>
+<parameter name="offset" type="int">
+</parameter>
+</method>
+<method name="glGetLightfv"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="light" type="int">
+</parameter>
+<parameter name="pname" type="int">
+</parameter>
+<parameter name="params" type="java.nio.FloatBuffer">
+</parameter>
+</method>
+<method name="glGetLightxv"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="light" type="int">
+</parameter>
+<parameter name="pname" type="int">
+</parameter>
+<parameter name="params" type="int[]">
+</parameter>
+<parameter name="offset" type="int">
+</parameter>
+</method>
+<method name="glGetLightxv"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="light" type="int">
+</parameter>
+<parameter name="pname" type="int">
+</parameter>
+<parameter name="params" type="java.nio.IntBuffer">
+</parameter>
+</method>
+<method name="glGetMaterialfv"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="face" type="int">
+</parameter>
+<parameter name="pname" type="int">
+</parameter>
+<parameter name="params" type="float[]">
+</parameter>
+<parameter name="offset" type="int">
+</parameter>
+</method>
+<method name="glGetMaterialfv"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="face" type="int">
+</parameter>
+<parameter name="pname" type="int">
+</parameter>
+<parameter name="params" type="java.nio.FloatBuffer">
+</parameter>
+</method>
+<method name="glGetMaterialxv"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="face" type="int">
+</parameter>
+<parameter name="pname" type="int">
+</parameter>
+<parameter name="params" type="int[]">
+</parameter>
+<parameter name="offset" type="int">
+</parameter>
+</method>
+<method name="glGetMaterialxv"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="face" type="int">
+</parameter>
+<parameter name="pname" type="int">
+</parameter>
+<parameter name="params" type="java.nio.IntBuffer">
+</parameter>
+</method>
+<method name="glGetPointerv"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="pname" type="int">
+</parameter>
+<parameter name="params" type="java.nio.Buffer[]">
+</parameter>
+</method>
+<method name="glGetTexEnviv"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="env" type="int">
+</parameter>
+<parameter name="pname" type="int">
+</parameter>
+<parameter name="params" type="int[]">
+</parameter>
+<parameter name="offset" type="int">
+</parameter>
+</method>
+<method name="glGetTexEnviv"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="env" type="int">
+</parameter>
+<parameter name="pname" type="int">
+</parameter>
+<parameter name="params" type="java.nio.IntBuffer">
+</parameter>
+</method>
+<method name="glGetTexEnvxv"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="env" type="int">
+</parameter>
+<parameter name="pname" type="int">
+</parameter>
+<parameter name="params" type="int[]">
+</parameter>
+<parameter name="offset" type="int">
+</parameter>
+</method>
+<method name="glGetTexEnvxv"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="env" type="int">
+</parameter>
+<parameter name="pname" type="int">
+</parameter>
+<parameter name="params" type="java.nio.IntBuffer">
+</parameter>
+</method>
+<method name="glGetTexParameterfv"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="target" type="int">
+</parameter>
+<parameter name="pname" type="int">
+</parameter>
+<parameter name="params" type="float[]">
+</parameter>
+<parameter name="offset" type="int">
+</parameter>
+</method>
+<method name="glGetTexParameterfv"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="target" type="int">
+</parameter>
+<parameter name="pname" type="int">
+</parameter>
+<parameter name="params" type="java.nio.FloatBuffer">
+</parameter>
+</method>
+<method name="glGetTexParameteriv"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="target" type="int">
+</parameter>
+<parameter name="pname" type="int">
+</parameter>
+<parameter name="params" type="int[]">
+</parameter>
+<parameter name="offset" type="int">
+</parameter>
+</method>
+<method name="glGetTexParameteriv"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="target" type="int">
+</parameter>
+<parameter name="pname" type="int">
+</parameter>
+<parameter name="params" type="java.nio.IntBuffer">
+</parameter>
+</method>
+<method name="glGetTexParameterxv"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="target" type="int">
+</parameter>
+<parameter name="pname" type="int">
+</parameter>
+<parameter name="params" type="int[]">
+</parameter>
+<parameter name="offset" type="int">
+</parameter>
+</method>
+<method name="glGetTexParameterxv"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="target" type="int">
+</parameter>
+<parameter name="pname" type="int">
+</parameter>
+<parameter name="params" type="java.nio.IntBuffer">
+</parameter>
+</method>
+<method name="glIsBuffer"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="buffer" type="int">
+</parameter>
+</method>
+<method name="glIsEnabled"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="cap" type="int">
+</parameter>
+</method>
+<method name="glIsTexture"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="texture" type="int">
+</parameter>
+</method>
+<method name="glNormalPointer"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="type" type="int">
+</parameter>
+<parameter name="stride" type="int">
+</parameter>
+<parameter name="offset" type="int">
+</parameter>
+</method>
+<method name="glPointParameterf"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="pname" type="int">
+</parameter>
+<parameter name="param" type="float">
+</parameter>
+</method>
+<method name="glPointParameterfv"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="pname" type="int">
+</parameter>
+<parameter name="params" type="float[]">
+</parameter>
+<parameter name="offset" type="int">
+</parameter>
+</method>
+<method name="glPointParameterfv"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="pname" type="int">
+</parameter>
+<parameter name="params" type="java.nio.FloatBuffer">
+</parameter>
+</method>
+<method name="glPointParameterx"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="pname" type="int">
+</parameter>
+<parameter name="param" type="int">
+</parameter>
+</method>
+<method name="glPointParameterxv"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="pname" type="int">
+</parameter>
+<parameter name="params" type="int[]">
+</parameter>
+<parameter name="offset" type="int">
+</parameter>
+</method>
+<method name="glPointParameterxv"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="pname" type="int">
+</parameter>
+<parameter name="params" type="java.nio.IntBuffer">
+</parameter>
+</method>
+<method name="glPointSizePointerOES"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="type" type="int">
+</parameter>
+<parameter name="stride" type="int">
+</parameter>
+<parameter name="pointer" type="java.nio.Buffer">
+</parameter>
+</method>
+<method name="glTexCoordPointer"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="size" type="int">
+</parameter>
+<parameter name="type" type="int">
+</parameter>
+<parameter name="stride" type="int">
+</parameter>
+<parameter name="offset" type="int">
+</parameter>
+</method>
+<method name="glTexEnvi"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="target" type="int">
+</parameter>
+<parameter name="pname" type="int">
+</parameter>
+<parameter name="param" type="int">
+</parameter>
+</method>
+<method name="glTexEnviv"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="target" type="int">
+</parameter>
+<parameter name="pname" type="int">
+</parameter>
+<parameter name="params" type="int[]">
+</parameter>
+<parameter name="offset" type="int">
+</parameter>
+</method>
+<method name="glTexEnviv"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="target" type="int">
+</parameter>
+<parameter name="pname" type="int">
+</parameter>
+<parameter name="params" type="java.nio.IntBuffer">
+</parameter>
+</method>
+<method name="glTexParameterfv"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="target" type="int">
+</parameter>
+<parameter name="pname" type="int">
+</parameter>
+<parameter name="params" type="float[]">
+</parameter>
+<parameter name="offset" type="int">
+</parameter>
+</method>
+<method name="glTexParameterfv"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="target" type="int">
+</parameter>
+<parameter name="pname" type="int">
+</parameter>
+<parameter name="params" type="java.nio.FloatBuffer">
+</parameter>
+</method>
+<method name="glTexParameteri"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="target" type="int">
+</parameter>
+<parameter name="pname" type="int">
+</parameter>
+<parameter name="param" type="int">
+</parameter>
+</method>
+<method name="glTexParameteriv"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="target" type="int">
+</parameter>
+<parameter name="pname" type="int">
+</parameter>
+<parameter name="params" type="int[]">
+</parameter>
+<parameter name="offset" type="int">
+</parameter>
+</method>
+<method name="glTexParameteriv"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="target" type="int">
+</parameter>
+<parameter name="pname" type="int">
+</parameter>
+<parameter name="params" type="java.nio.IntBuffer">
+</parameter>
+</method>
+<method name="glTexParameterxv"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="target" type="int">
+</parameter>
+<parameter name="pname" type="int">
+</parameter>
+<parameter name="params" type="int[]">
+</parameter>
+<parameter name="offset" type="int">
+</parameter>
+</method>
+<method name="glTexParameterxv"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="target" type="int">
+</parameter>
+<parameter name="pname" type="int">
+</parameter>
+<parameter name="params" type="java.nio.IntBuffer">
+</parameter>
+</method>
+<method name="glVertexPointer"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="size" type="int">
+</parameter>
+<parameter name="type" type="int">
+</parameter>
+<parameter name="stride" type="int">
+</parameter>
+<parameter name="offset" type="int">
+</parameter>
+</method>
+<field name="GL_ACTIVE_TEXTURE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="34016"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_ADD_SIGNED"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="34164"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_ALPHA_SCALE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="3356"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_ALPHA_TEST_FUNC"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="3009"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_ALPHA_TEST_REF"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="3010"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_ARRAY_BUFFER"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="34962"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_ARRAY_BUFFER_BINDING"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="34964"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_BLEND_DST"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="3040"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_BLEND_SRC"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="3041"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_BUFFER_ACCESS"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="35003"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_BUFFER_SIZE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="34660"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_BUFFER_USAGE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="34661"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_CLIENT_ACTIVE_TEXTURE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="34017"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_CLIP_PLANE0"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="12288"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_CLIP_PLANE1"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="12289"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_CLIP_PLANE2"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="12290"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_CLIP_PLANE3"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="12291"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_CLIP_PLANE4"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="12292"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_CLIP_PLANE5"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="12293"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_COLOR_ARRAY_BUFFER_BINDING"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="34968"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_COLOR_ARRAY_POINTER"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="32912"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_COLOR_ARRAY_SIZE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="32897"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_COLOR_ARRAY_STRIDE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="32899"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_COLOR_ARRAY_TYPE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="32898"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_COLOR_CLEAR_VALUE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="3106"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_COLOR_WRITEMASK"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="3107"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_COMBINE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="34160"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_COMBINE_ALPHA"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="34162"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_COMBINE_RGB"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="34161"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_CONSTANT"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="34166"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_COORD_REPLACE_OES"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="34914"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_CULL_FACE_MODE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2885"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_CURRENT_COLOR"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2816"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_CURRENT_NORMAL"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2818"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_CURRENT_TEXTURE_COORDS"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2819"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_DEPTH_CLEAR_VALUE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2931"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_DEPTH_FUNC"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2932"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_DEPTH_RANGE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2928"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_DEPTH_WRITEMASK"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2930"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_DOT3_RGB"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="34478"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_DOT3_RGBA"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="34479"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_DYNAMIC_DRAW"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="35048"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_ELEMENT_ARRAY_BUFFER"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="34963"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_ELEMENT_ARRAY_BUFFER_BINDING"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="34965"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_FRONT_FACE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2886"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_GENERATE_MIPMAP"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="33169"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_GENERATE_MIPMAP_HINT"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="33170"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_INTERPOLATE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="34165"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_LINE_WIDTH"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2849"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_LOGIC_OP_MODE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="3056"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_MATRIX_MODE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2976"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_MAX_CLIP_PLANES"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="3378"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_MODELVIEW_MATRIX"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2982"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_MODELVIEW_MATRIX_FLOAT_AS_INT_BITS_OES"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="35213"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_MODELVIEW_STACK_DEPTH"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2979"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_NORMAL_ARRAY_BUFFER_BINDING"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="34967"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_NORMAL_ARRAY_POINTER"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="32911"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_NORMAL_ARRAY_STRIDE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="32895"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_NORMAL_ARRAY_TYPE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="32894"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_OPERAND0_ALPHA"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="34200"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_OPERAND0_RGB"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="34192"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_OPERAND1_ALPHA"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="34201"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_OPERAND1_RGB"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="34193"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_OPERAND2_ALPHA"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="34202"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_OPERAND2_RGB"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="34194"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_POINT_DISTANCE_ATTENUATION"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="33065"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_POINT_FADE_THRESHOLD_SIZE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="33064"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_POINT_SIZE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2833"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_POINT_SIZE_ARRAY_BUFFER_BINDING_OES"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="35743"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_POINT_SIZE_ARRAY_OES"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="35740"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_POINT_SIZE_ARRAY_POINTER_OES"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="35212"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_POINT_SIZE_ARRAY_STRIDE_OES"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="35211"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_POINT_SIZE_ARRAY_TYPE_OES"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="35210"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_POINT_SIZE_MAX"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="33063"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_POINT_SIZE_MIN"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="33062"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_POINT_SPRITE_OES"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="34913"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_POLYGON_OFFSET_FACTOR"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="32824"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_POLYGON_OFFSET_UNITS"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="10752"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_PREVIOUS"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="34168"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_PRIMARY_COLOR"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="34167"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_PROJECTION_MATRIX"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2983"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_PROJECTION_MATRIX_FLOAT_AS_INT_BITS_OES"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="35214"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_PROJECTION_STACK_DEPTH"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2980"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_RGB_SCALE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="34163"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_SAMPLES"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="32937"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_SAMPLE_BUFFERS"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="32936"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_SAMPLE_COVERAGE_INVERT"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="32939"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_SAMPLE_COVERAGE_VALUE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="32938"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_SCISSOR_BOX"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="3088"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_SHADE_MODEL"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2900"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_SRC0_ALPHA"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="34184"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_SRC0_RGB"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="34176"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_SRC1_ALPHA"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="34185"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_SRC1_RGB"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="34177"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_SRC2_ALPHA"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="34186"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_SRC2_RGB"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="34178"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_STATIC_DRAW"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="35044"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_STENCIL_CLEAR_VALUE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2961"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_STENCIL_FAIL"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2964"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_STENCIL_FUNC"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2962"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_STENCIL_PASS_DEPTH_FAIL"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2965"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_STENCIL_PASS_DEPTH_PASS"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2966"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_STENCIL_REF"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2967"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_STENCIL_VALUE_MASK"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2963"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_STENCIL_WRITEMASK"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2968"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_SUBTRACT"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="34023"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_TEXTURE_BINDING_2D"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="32873"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_TEXTURE_COORD_ARRAY_BUFFER_BINDING"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="34970"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_TEXTURE_COORD_ARRAY_POINTER"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="32914"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_TEXTURE_COORD_ARRAY_SIZE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="32904"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_TEXTURE_COORD_ARRAY_STRIDE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="32906"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_TEXTURE_COORD_ARRAY_TYPE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="32905"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_TEXTURE_MATRIX"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2984"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_TEXTURE_MATRIX_FLOAT_AS_INT_BITS_OES"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="35215"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_TEXTURE_STACK_DEPTH"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2981"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_VERTEX_ARRAY_BUFFER_BINDING"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="34966"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_VERTEX_ARRAY_POINTER"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="32910"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_VERTEX_ARRAY_SIZE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="32890"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_VERTEX_ARRAY_STRIDE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="32892"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_VERTEX_ARRAY_TYPE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="32891"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_VIEWPORT"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2978"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_WRITE_ONLY"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="35001"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</interface>
+<interface name="GL11Ext"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="javax.microedition.khronos.opengles.GL">
+</implements>
+<method name="glCurrentPaletteMatrixOES"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="matrixpaletteindex" type="int">
+</parameter>
+</method>
+<method name="glDrawTexfOES"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="x" type="float">
+</parameter>
+<parameter name="y" type="float">
+</parameter>
+<parameter name="z" type="float">
+</parameter>
+<parameter name="width" type="float">
+</parameter>
+<parameter name="height" type="float">
+</parameter>
+</method>
+<method name="glDrawTexfvOES"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="coords" type="float[]">
+</parameter>
+<parameter name="offset" type="int">
+</parameter>
+</method>
+<method name="glDrawTexfvOES"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="coords" type="java.nio.FloatBuffer">
+</parameter>
+</method>
+<method name="glDrawTexiOES"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="x" type="int">
+</parameter>
+<parameter name="y" type="int">
+</parameter>
+<parameter name="z" type="int">
+</parameter>
+<parameter name="width" type="int">
+</parameter>
+<parameter name="height" type="int">
+</parameter>
+</method>
+<method name="glDrawTexivOES"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="coords" type="int[]">
+</parameter>
+<parameter name="offset" type="int">
+</parameter>
+</method>
+<method name="glDrawTexivOES"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="coords" type="java.nio.IntBuffer">
+</parameter>
+</method>
+<method name="glDrawTexsOES"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="x" type="short">
+</parameter>
+<parameter name="y" type="short">
+</parameter>
+<parameter name="z" type="short">
+</parameter>
+<parameter name="width" type="short">
+</parameter>
+<parameter name="height" type="short">
+</parameter>
+</method>
+<method name="glDrawTexsvOES"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="coords" type="short[]">
+</parameter>
+<parameter name="offset" type="int">
+</parameter>
+</method>
+<method name="glDrawTexsvOES"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="coords" type="java.nio.ShortBuffer">
+</parameter>
+</method>
+<method name="glDrawTexxOES"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="x" type="int">
+</parameter>
+<parameter name="y" type="int">
+</parameter>
+<parameter name="z" type="int">
+</parameter>
+<parameter name="width" type="int">
+</parameter>
+<parameter name="height" type="int">
+</parameter>
+</method>
+<method name="glDrawTexxvOES"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="coords" type="int[]">
+</parameter>
+<parameter name="offset" type="int">
+</parameter>
+</method>
+<method name="glDrawTexxvOES"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="coords" type="java.nio.IntBuffer">
+</parameter>
+</method>
+<method name="glEnable"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="cap" type="int">
+</parameter>
+</method>
+<method name="glEnableClientState"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="array" type="int">
+</parameter>
+</method>
+<method name="glLoadPaletteFromModelViewMatrixOES"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="glMatrixIndexPointerOES"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="size" type="int">
+</parameter>
+<parameter name="type" type="int">
+</parameter>
+<parameter name="stride" type="int">
+</parameter>
+<parameter name="pointer" type="java.nio.Buffer">
+</parameter>
+</method>
+<method name="glMatrixIndexPointerOES"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="size" type="int">
+</parameter>
+<parameter name="type" type="int">
+</parameter>
+<parameter name="stride" type="int">
+</parameter>
+<parameter name="offset" type="int">
+</parameter>
+</method>
+<method name="glTexParameterfv"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="target" type="int">
+</parameter>
+<parameter name="pname" type="int">
+</parameter>
+<parameter name="param" type="float[]">
+</parameter>
+<parameter name="offset" type="int">
+</parameter>
+</method>
+<method name="glWeightPointerOES"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="size" type="int">
+</parameter>
+<parameter name="type" type="int">
+</parameter>
+<parameter name="stride" type="int">
+</parameter>
+<parameter name="pointer" type="java.nio.Buffer">
+</parameter>
+</method>
+<method name="glWeightPointerOES"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="size" type="int">
+</parameter>
+<parameter name="type" type="int">
+</parameter>
+<parameter name="stride" type="int">
+</parameter>
+<parameter name="offset" type="int">
+</parameter>
+</method>
+<field name="GL_MATRIX_INDEX_ARRAY_BUFFER_BINDING_OES"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="35742"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_MATRIX_INDEX_ARRAY_OES"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="34884"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_MATRIX_INDEX_ARRAY_POINTER_OES"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="34889"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_MATRIX_INDEX_ARRAY_SIZE_OES"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="34886"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_MATRIX_INDEX_ARRAY_STRIDE_OES"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="34888"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_MATRIX_INDEX_ARRAY_TYPE_OES"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="34887"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_MATRIX_PALETTE_OES"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="34880"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_MAX_PALETTE_MATRICES_OES"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="34882"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_MAX_VERTEX_UNITS_OES"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="34468"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_TEXTURE_CROP_RECT_OES"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="35741"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_WEIGHT_ARRAY_BUFFER_BINDING_OES"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="34974"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_WEIGHT_ARRAY_OES"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="34477"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_WEIGHT_ARRAY_POINTER_OES"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="34476"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_WEIGHT_ARRAY_SIZE_OES"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="34475"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_WEIGHT_ARRAY_STRIDE_OES"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="34474"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_WEIGHT_ARRAY_TYPE_OES"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="34473"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</interface>
+<interface name="GL11ExtensionPack"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="javax.microedition.khronos.opengles.GL">
+</implements>
+<method name="glBindFramebufferOES"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="target" type="int">
+</parameter>
+<parameter name="framebuffer" type="int">
+</parameter>
+</method>
+<method name="glBindRenderbufferOES"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="target" type="int">
+</parameter>
+<parameter name="renderbuffer" type="int">
+</parameter>
+</method>
+<method name="glBindTexture"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="target" type="int">
+</parameter>
+<parameter name="texture" type="int">
+</parameter>
+</method>
+<method name="glBlendEquation"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="mode" type="int">
+</parameter>
+</method>
+<method name="glBlendEquationSeparate"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="modeRGB" type="int">
+</parameter>
+<parameter name="modeAlpha" type="int">
+</parameter>
+</method>
+<method name="glBlendFuncSeparate"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="srcRGB" type="int">
+</parameter>
+<parameter name="dstRGB" type="int">
+</parameter>
+<parameter name="srcAlpha" type="int">
+</parameter>
+<parameter name="dstAlpha" type="int">
+</parameter>
+</method>
+<method name="glCheckFramebufferStatusOES"
+ return="int"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="target" type="int">
+</parameter>
+</method>
+<method name="glCompressedTexImage2D"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="target" type="int">
+</parameter>
+<parameter name="level" type="int">
+</parameter>
+<parameter name="internalformat" type="int">
+</parameter>
+<parameter name="width" type="int">
+</parameter>
+<parameter name="height" type="int">
+</parameter>
+<parameter name="border" type="int">
+</parameter>
+<parameter name="imageSize" type="int">
+</parameter>
+<parameter name="data" type="java.nio.Buffer">
+</parameter>
+</method>
+<method name="glCopyTexImage2D"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="target" type="int">
+</parameter>
+<parameter name="level" type="int">
+</parameter>
+<parameter name="internalformat" type="int">
+</parameter>
+<parameter name="x" type="int">
+</parameter>
+<parameter name="y" type="int">
+</parameter>
+<parameter name="width" type="int">
+</parameter>
+<parameter name="height" type="int">
+</parameter>
+<parameter name="border" type="int">
+</parameter>
+</method>
+<method name="glDeleteFramebuffersOES"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="n" type="int">
+</parameter>
+<parameter name="framebuffers" type="int[]">
+</parameter>
+<parameter name="offset" type="int">
+</parameter>
+</method>
+<method name="glDeleteFramebuffersOES"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="n" type="int">
+</parameter>
+<parameter name="framebuffers" type="java.nio.IntBuffer">
+</parameter>
+</method>
+<method name="glDeleteRenderbuffersOES"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="n" type="int">
+</parameter>
+<parameter name="renderbuffers" type="int[]">
+</parameter>
+<parameter name="offset" type="int">
+</parameter>
+</method>
+<method name="glDeleteRenderbuffersOES"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="n" type="int">
+</parameter>
+<parameter name="renderbuffers" type="java.nio.IntBuffer">
+</parameter>
+</method>
+<method name="glEnable"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="cap" type="int">
+</parameter>
+</method>
+<method name="glFramebufferRenderbufferOES"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="target" type="int">
+</parameter>
+<parameter name="attachment" type="int">
+</parameter>
+<parameter name="renderbuffertarget" type="int">
+</parameter>
+<parameter name="renderbuffer" type="int">
+</parameter>
+</method>
+<method name="glFramebufferTexture2DOES"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="target" type="int">
+</parameter>
+<parameter name="attachment" type="int">
+</parameter>
+<parameter name="textarget" type="int">
+</parameter>
+<parameter name="texture" type="int">
+</parameter>
+<parameter name="level" type="int">
+</parameter>
+</method>
+<method name="glGenFramebuffersOES"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="n" type="int">
+</parameter>
+<parameter name="framebuffers" type="int[]">
+</parameter>
+<parameter name="offset" type="int">
+</parameter>
+</method>
+<method name="glGenFramebuffersOES"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="n" type="int">
+</parameter>
+<parameter name="framebuffers" type="java.nio.IntBuffer">
+</parameter>
+</method>
+<method name="glGenRenderbuffersOES"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="n" type="int">
+</parameter>
+<parameter name="renderbuffers" type="int[]">
+</parameter>
+<parameter name="offset" type="int">
+</parameter>
+</method>
+<method name="glGenRenderbuffersOES"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="n" type="int">
+</parameter>
+<parameter name="renderbuffers" type="java.nio.IntBuffer">
+</parameter>
+</method>
+<method name="glGenerateMipmapOES"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="target" type="int">
+</parameter>
+</method>
+<method name="glGetFramebufferAttachmentParameterivOES"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="target" type="int">
+</parameter>
+<parameter name="attachment" type="int">
+</parameter>
+<parameter name="pname" type="int">
+</parameter>
+<parameter name="params" type="int[]">
+</parameter>
+<parameter name="offset" type="int">
+</parameter>
+</method>
+<method name="glGetFramebufferAttachmentParameterivOES"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="target" type="int">
+</parameter>
+<parameter name="attachment" type="int">
+</parameter>
+<parameter name="pname" type="int">
+</parameter>
+<parameter name="params" type="java.nio.IntBuffer">
+</parameter>
+</method>
+<method name="glGetIntegerv"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="pname" type="int">
+</parameter>
+<parameter name="params" type="int[]">
+</parameter>
+<parameter name="offset" type="int">
+</parameter>
+</method>
+<method name="glGetIntegerv"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="pname" type="int">
+</parameter>
+<parameter name="params" type="java.nio.IntBuffer">
+</parameter>
+</method>
+<method name="glGetRenderbufferParameterivOES"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="target" type="int">
+</parameter>
+<parameter name="pname" type="int">
+</parameter>
+<parameter name="params" type="int[]">
+</parameter>
+<parameter name="offset" type="int">
+</parameter>
+</method>
+<method name="glGetRenderbufferParameterivOES"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="target" type="int">
+</parameter>
+<parameter name="pname" type="int">
+</parameter>
+<parameter name="params" type="java.nio.IntBuffer">
+</parameter>
+</method>
+<method name="glGetTexGenfv"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="coord" type="int">
+</parameter>
+<parameter name="pname" type="int">
+</parameter>
+<parameter name="params" type="float[]">
+</parameter>
+<parameter name="offset" type="int">
+</parameter>
+</method>
+<method name="glGetTexGenfv"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="coord" type="int">
+</parameter>
+<parameter name="pname" type="int">
+</parameter>
+<parameter name="params" type="java.nio.FloatBuffer">
+</parameter>
+</method>
+<method name="glGetTexGeniv"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="coord" type="int">
+</parameter>
+<parameter name="pname" type="int">
+</parameter>
+<parameter name="params" type="int[]">
+</parameter>
+<parameter name="offset" type="int">
+</parameter>
+</method>
+<method name="glGetTexGeniv"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="coord" type="int">
+</parameter>
+<parameter name="pname" type="int">
+</parameter>
+<parameter name="params" type="java.nio.IntBuffer">
+</parameter>
+</method>
+<method name="glGetTexGenxv"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="coord" type="int">
+</parameter>
+<parameter name="pname" type="int">
+</parameter>
+<parameter name="params" type="int[]">
+</parameter>
+<parameter name="offset" type="int">
+</parameter>
+</method>
+<method name="glGetTexGenxv"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="coord" type="int">
+</parameter>
+<parameter name="pname" type="int">
+</parameter>
+<parameter name="params" type="java.nio.IntBuffer">
+</parameter>
+</method>
+<method name="glIsFramebufferOES"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="framebuffer" type="int">
+</parameter>
+</method>
+<method name="glIsRenderbufferOES"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="renderbuffer" type="int">
+</parameter>
+</method>
+<method name="glRenderbufferStorageOES"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="target" type="int">
+</parameter>
+<parameter name="internalformat" type="int">
+</parameter>
+<parameter name="width" type="int">
+</parameter>
+<parameter name="height" type="int">
+</parameter>
+</method>
+<method name="glStencilOp"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="fail" type="int">
+</parameter>
+<parameter name="zfail" type="int">
+</parameter>
+<parameter name="zpass" type="int">
+</parameter>
+</method>
+<method name="glTexEnvf"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="target" type="int">
+</parameter>
+<parameter name="pname" type="int">
+</parameter>
+<parameter name="param" type="float">
+</parameter>
+</method>
+<method name="glTexEnvfv"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="target" type="int">
+</parameter>
+<parameter name="pname" type="int">
+</parameter>
+<parameter name="params" type="float[]">
+</parameter>
+<parameter name="offset" type="int">
+</parameter>
+</method>
+<method name="glTexEnvfv"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="target" type="int">
+</parameter>
+<parameter name="pname" type="int">
+</parameter>
+<parameter name="params" type="java.nio.FloatBuffer">
+</parameter>
+</method>
+<method name="glTexEnvx"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="target" type="int">
+</parameter>
+<parameter name="pname" type="int">
+</parameter>
+<parameter name="param" type="int">
+</parameter>
+</method>
+<method name="glTexEnvxv"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="target" type="int">
+</parameter>
+<parameter name="pname" type="int">
+</parameter>
+<parameter name="params" type="int[]">
+</parameter>
+<parameter name="offset" type="int">
+</parameter>
+</method>
+<method name="glTexEnvxv"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="target" type="int">
+</parameter>
+<parameter name="pname" type="int">
+</parameter>
+<parameter name="params" type="java.nio.IntBuffer">
+</parameter>
+</method>
+<method name="glTexGenf"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="coord" type="int">
+</parameter>
+<parameter name="pname" type="int">
+</parameter>
+<parameter name="param" type="float">
+</parameter>
+</method>
+<method name="glTexGenfv"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="coord" type="int">
+</parameter>
+<parameter name="pname" type="int">
+</parameter>
+<parameter name="params" type="float[]">
+</parameter>
+<parameter name="offset" type="int">
+</parameter>
+</method>
+<method name="glTexGenfv"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="coord" type="int">
+</parameter>
+<parameter name="pname" type="int">
+</parameter>
+<parameter name="params" type="java.nio.FloatBuffer">
+</parameter>
+</method>
+<method name="glTexGeni"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="coord" type="int">
+</parameter>
+<parameter name="pname" type="int">
+</parameter>
+<parameter name="param" type="int">
+</parameter>
+</method>
+<method name="glTexGeniv"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="coord" type="int">
+</parameter>
+<parameter name="pname" type="int">
+</parameter>
+<parameter name="params" type="int[]">
+</parameter>
+<parameter name="offset" type="int">
+</parameter>
+</method>
+<method name="glTexGeniv"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="coord" type="int">
+</parameter>
+<parameter name="pname" type="int">
+</parameter>
+<parameter name="params" type="java.nio.IntBuffer">
+</parameter>
+</method>
+<method name="glTexGenx"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="coord" type="int">
+</parameter>
+<parameter name="pname" type="int">
+</parameter>
+<parameter name="param" type="int">
+</parameter>
+</method>
+<method name="glTexGenxv"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="coord" type="int">
+</parameter>
+<parameter name="pname" type="int">
+</parameter>
+<parameter name="params" type="int[]">
+</parameter>
+<parameter name="offset" type="int">
+</parameter>
+</method>
+<method name="glTexGenxv"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="coord" type="int">
+</parameter>
+<parameter name="pname" type="int">
+</parameter>
+<parameter name="params" type="java.nio.IntBuffer">
+</parameter>
+</method>
+<method name="glTexParameterf"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="target" type="int">
+</parameter>
+<parameter name="pname" type="int">
+</parameter>
+<parameter name="param" type="float">
+</parameter>
+</method>
+<field name="GL_BLEND_DST_ALPHA"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="32970"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_BLEND_DST_RGB"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="32968"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_BLEND_EQUATION"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="32777"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_BLEND_EQUATION_ALPHA"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="34877"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_BLEND_EQUATION_RGB"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="32777"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_BLEND_SRC_ALPHA"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="32971"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_BLEND_SRC_RGB"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="32969"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_COLOR_ATTACHMENT0_OES"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="36064"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_COLOR_ATTACHMENT10_OES"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="36074"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_COLOR_ATTACHMENT11_OES"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="36075"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_COLOR_ATTACHMENT12_OES"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="36076"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_COLOR_ATTACHMENT13_OES"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="36077"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_COLOR_ATTACHMENT14_OES"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="36078"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_COLOR_ATTACHMENT15_OES"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="36079"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_COLOR_ATTACHMENT1_OES"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="36065"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_COLOR_ATTACHMENT2_OES"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="36066"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_COLOR_ATTACHMENT3_OES"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="36067"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_COLOR_ATTACHMENT4_OES"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="36068"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_COLOR_ATTACHMENT5_OES"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="36069"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_COLOR_ATTACHMENT6_OES"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="36070"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_COLOR_ATTACHMENT7_OES"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="36071"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_COLOR_ATTACHMENT8_OES"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="36072"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_COLOR_ATTACHMENT9_OES"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="36073"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_DECR_WRAP"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="34056"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_DEPTH_ATTACHMENT_OES"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="36096"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_DEPTH_COMPONENT"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="6402"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_DEPTH_COMPONENT16"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="33189"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_DEPTH_COMPONENT24"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="33190"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_DEPTH_COMPONENT32"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="33191"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME_OES"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="36049"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE_OES"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="36048"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE_OES"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="36051"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL_OES"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="36050"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_FRAMEBUFFER_BINDING_OES"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="36006"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_FRAMEBUFFER_COMPLETE_OES"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="36053"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT_OES"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="36054"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS_OES"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="36057"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_FRAMEBUFFER_INCOMPLETE_DRAW_BUFFER_OES"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="36059"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_FRAMEBUFFER_INCOMPLETE_FORMATS_OES"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="36058"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT_OES"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="36055"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_FRAMEBUFFER_INCOMPLETE_READ_BUFFER_OES"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="36060"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_FRAMEBUFFER_OES"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="36160"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_FRAMEBUFFER_UNSUPPORTED_OES"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="36061"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_FUNC_ADD"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="32774"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_FUNC_REVERSE_SUBTRACT"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="32779"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_FUNC_SUBTRACT"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="32778"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_INCR_WRAP"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="34055"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_INVALID_FRAMEBUFFER_OPERATION_OES"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1286"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_MAX_COLOR_ATTACHMENTS_OES"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="36063"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_MAX_CUBE_MAP_TEXTURE_SIZE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="34076"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_MAX_RENDERBUFFER_SIZE_OES"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="34024"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_MIRRORED_REPEAT"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="33648"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_NORMAL_MAP"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="34065"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_REFLECTION_MAP"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="34066"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_RENDERBUFFER_ALPHA_SIZE_OES"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="36179"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_RENDERBUFFER_BINDING_OES"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="36007"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_RENDERBUFFER_BLUE_SIZE_OES"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="36178"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_RENDERBUFFER_DEPTH_SIZE_OES"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="36180"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_RENDERBUFFER_GREEN_SIZE_OES"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="36177"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_RENDERBUFFER_HEIGHT_OES"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="36163"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_RENDERBUFFER_INTERNAL_FORMAT_OES"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="36164"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_RENDERBUFFER_OES"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="36161"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_RENDERBUFFER_RED_SIZE_OES"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="36176"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_RENDERBUFFER_STENCIL_SIZE_OES"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="36181"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_RENDERBUFFER_WIDTH_OES"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="36162"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_RGB565_OES"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="36194"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_RGB5_A1"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="32855"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_RGB8"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="32849"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_RGBA4"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="32854"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_RGBA8"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="32856"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_STENCIL_ATTACHMENT_OES"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="36128"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_STENCIL_INDEX"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="6401"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_STENCIL_INDEX1_OES"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="36166"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_STENCIL_INDEX4_OES"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="36167"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_STENCIL_INDEX8_OES"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="36168"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_STR"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="-1"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_TEXTURE_BINDING_CUBE_MAP"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="34068"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_TEXTURE_CUBE_MAP"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="34067"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_TEXTURE_CUBE_MAP_NEGATIVE_X"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="34070"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_TEXTURE_CUBE_MAP_NEGATIVE_Y"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="34072"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_TEXTURE_CUBE_MAP_NEGATIVE_Z"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="34074"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_TEXTURE_CUBE_MAP_POSITIVE_X"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="34069"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_TEXTURE_CUBE_MAP_POSITIVE_Y"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="34071"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_TEXTURE_CUBE_MAP_POSITIVE_Z"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="34073"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_TEXTURE_GEN_MODE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="9472"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GL_TEXTURE_GEN_STR"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="36192"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</interface>
+</package>
+<package name="javax.net"
+>
+<class name="ServerSocketFactory"
+ extends="java.lang.Object"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="ServerSocketFactory"
+ type="javax.net.ServerSocketFactory"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</constructor>
+<method name="createServerSocket"
+ return="java.net.ServerSocket"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="createServerSocket"
+ return="java.net.ServerSocket"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="port" type="int">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="createServerSocket"
+ return="java.net.ServerSocket"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="port" type="int">
+</parameter>
+<parameter name="backlog" type="int">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="createServerSocket"
+ return="java.net.ServerSocket"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="port" type="int">
+</parameter>
+<parameter name="backlog" type="int">
+</parameter>
+<parameter name="iAddress" type="java.net.InetAddress">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="getDefault"
+ return="javax.net.ServerSocketFactory"
+ abstract="false"
+ native="false"
+ synchronized="true"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+</class>
+<class name="SocketFactory"
+ extends="java.lang.Object"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="SocketFactory"
+ type="javax.net.SocketFactory"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</constructor>
+<method name="createSocket"
+ return="java.net.Socket"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="createSocket"
+ return="java.net.Socket"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="host" type="java.lang.String">
+</parameter>
+<parameter name="port" type="int">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+<exception name="UnknownHostException" type="java.net.UnknownHostException">
+</exception>
+</method>
+<method name="createSocket"
+ return="java.net.Socket"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="host" type="java.lang.String">
+</parameter>
+<parameter name="port" type="int">
+</parameter>
+<parameter name="localHost" type="java.net.InetAddress">
+</parameter>
+<parameter name="localPort" type="int">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+<exception name="UnknownHostException" type="java.net.UnknownHostException">
+</exception>
+</method>
+<method name="createSocket"
+ return="java.net.Socket"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="host" type="java.net.InetAddress">
+</parameter>
+<parameter name="port" type="int">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="createSocket"
+ return="java.net.Socket"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="address" type="java.net.InetAddress">
+</parameter>
+<parameter name="port" type="int">
+</parameter>
+<parameter name="localAddress" type="java.net.InetAddress">
+</parameter>
+<parameter name="localPort" type="int">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="getDefault"
+ return="javax.net.SocketFactory"
+ abstract="false"
+ native="false"
+ synchronized="true"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+</class>
+</package>
+<package name="javax.net.ssl"
+>
+<class name="CertPathTrustManagerParameters"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="javax.net.ssl.ManagerFactoryParameters">
+</implements>
+<constructor name="CertPathTrustManagerParameters"
+ type="javax.net.ssl.CertPathTrustManagerParameters"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="parameters" type="java.security.cert.CertPathParameters">
+</parameter>
+</constructor>
+<method name="getParameters"
+ return="java.security.cert.CertPathParameters"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+</class>
+<class name="HandshakeCompletedEvent"
+ extends="java.util.EventObject"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="java.io.Serializable">
+</implements>
+<constructor name="HandshakeCompletedEvent"
+ type="javax.net.ssl.HandshakeCompletedEvent"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="sock" type="javax.net.ssl.SSLSocket">
+</parameter>
+<parameter name="s" type="javax.net.ssl.SSLSession">
+</parameter>
+</constructor>
+<method name="getCipherSuite"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getLocalCertificates"
+ return="java.security.cert.Certificate[]"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getLocalPrincipal"
+ return="java.security.Principal"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getPeerCertificateChain"
+ return="javax.security.cert.X509Certificate[]"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="SSLPeerUnverifiedException" type="javax.net.ssl.SSLPeerUnverifiedException">
+</exception>
+</method>
+<method name="getPeerCertificates"
+ return="java.security.cert.Certificate[]"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="SSLPeerUnverifiedException" type="javax.net.ssl.SSLPeerUnverifiedException">
+</exception>
+</method>
+<method name="getPeerPrincipal"
+ return="java.security.Principal"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="SSLPeerUnverifiedException" type="javax.net.ssl.SSLPeerUnverifiedException">
+</exception>
+</method>
+<method name="getSession"
+ return="javax.net.ssl.SSLSession"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getSocket"
+ return="javax.net.ssl.SSLSocket"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+</class>
+<interface name="HandshakeCompletedListener"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="java.util.EventListener">
+</implements>
+<method name="handshakeCompleted"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="event" type="javax.net.ssl.HandshakeCompletedEvent">
+</parameter>
+</method>
+</interface>
+<interface name="HostnameVerifier"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="verify"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="hostname" type="java.lang.String">
+</parameter>
+<parameter name="session" type="javax.net.ssl.SSLSession">
+</parameter>
+</method>
+</interface>
+<class name="HttpsURLConnection"
+ extends="java.net.HttpURLConnection"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="HttpsURLConnection"
+ type="javax.net.ssl.HttpsURLConnection"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="url" type="java.net.URL">
+</parameter>
+</constructor>
+<method name="getCipherSuite"
+ return="java.lang.String"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getDefaultHostnameVerifier"
+ return="javax.net.ssl.HostnameVerifier"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getDefaultSSLSocketFactory"
+ return="javax.net.ssl.SSLSocketFactory"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getHostnameVerifier"
+ return="javax.net.ssl.HostnameVerifier"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getLocalCertificates"
+ return="java.security.cert.Certificate[]"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getLocalPrincipal"
+ return="java.security.Principal"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getPeerPrincipal"
+ return="java.security.Principal"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="SSLPeerUnverifiedException" type="javax.net.ssl.SSLPeerUnverifiedException">
+</exception>
+</method>
+<method name="getSSLSocketFactory"
+ return="javax.net.ssl.SSLSocketFactory"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getServerCertificates"
+ return="java.security.cert.Certificate[]"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="SSLPeerUnverifiedException" type="javax.net.ssl.SSLPeerUnverifiedException">
+</exception>
+</method>
+<method name="setDefaultHostnameVerifier"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="v" type="javax.net.ssl.HostnameVerifier">
+</parameter>
+</method>
+<method name="setDefaultSSLSocketFactory"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="sf" type="javax.net.ssl.SSLSocketFactory">
+</parameter>
+</method>
+<method name="setHostnameVerifier"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="v" type="javax.net.ssl.HostnameVerifier">
+</parameter>
+</method>
+<method name="setSSLSocketFactory"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="sf" type="javax.net.ssl.SSLSocketFactory">
+</parameter>
+</method>
+<field name="hostnameVerifier"
+ type="javax.net.ssl.HostnameVerifier"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</field>
+</class>
+<interface name="KeyManager"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</interface>
+<class name="KeyManagerFactory"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="KeyManagerFactory"
+ type="javax.net.ssl.KeyManagerFactory"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="factorySpi" type="javax.net.ssl.KeyManagerFactorySpi">
+</parameter>
+<parameter name="provider" type="java.security.Provider">
+</parameter>
+<parameter name="algorithm" type="java.lang.String">
+</parameter>
+</constructor>
+<method name="getAlgorithm"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getDefaultAlgorithm"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getInstance"
+ return="javax.net.ssl.KeyManagerFactory"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="algorithm" type="java.lang.String">
+</parameter>
+<exception name="NoSuchAlgorithmException" type="java.security.NoSuchAlgorithmException">
+</exception>
+</method>
+<method name="getInstance"
+ return="javax.net.ssl.KeyManagerFactory"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="algorithm" type="java.lang.String">
+</parameter>
+<parameter name="provider" type="java.lang.String">
+</parameter>
+<exception name="NoSuchAlgorithmException" type="java.security.NoSuchAlgorithmException">
+</exception>
+<exception name="NoSuchProviderException" type="java.security.NoSuchProviderException">
+</exception>
+</method>
+<method name="getInstance"
+ return="javax.net.ssl.KeyManagerFactory"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="algorithm" type="java.lang.String">
+</parameter>
+<parameter name="provider" type="java.security.Provider">
+</parameter>
+<exception name="NoSuchAlgorithmException" type="java.security.NoSuchAlgorithmException">
+</exception>
+</method>
+<method name="getKeyManagers"
+ return="javax.net.ssl.KeyManager[]"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getProvider"
+ return="java.security.Provider"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="init"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="ks" type="java.security.KeyStore">
+</parameter>
+<parameter name="password" type="char[]">
+</parameter>
+<exception name="KeyStoreException" type="java.security.KeyStoreException">
+</exception>
+<exception name="NoSuchAlgorithmException" type="java.security.NoSuchAlgorithmException">
+</exception>
+<exception name="UnrecoverableKeyException" type="java.security.UnrecoverableKeyException">
+</exception>
+</method>
+<method name="init"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="spec" type="javax.net.ssl.ManagerFactoryParameters">
+</parameter>
+<exception name="InvalidAlgorithmParameterException" type="java.security.InvalidAlgorithmParameterException">
+</exception>
+</method>
+</class>
+<class name="KeyManagerFactorySpi"
+ extends="java.lang.Object"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="KeyManagerFactorySpi"
+ type="javax.net.ssl.KeyManagerFactorySpi"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<method name="engineGetKeyManagers"
+ return="javax.net.ssl.KeyManager[]"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</method>
+<method name="engineInit"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="ks" type="java.security.KeyStore">
+</parameter>
+<parameter name="password" type="char[]">
+</parameter>
+<exception name="KeyStoreException" type="java.security.KeyStoreException">
+</exception>
+<exception name="NoSuchAlgorithmException" type="java.security.NoSuchAlgorithmException">
+</exception>
+<exception name="UnrecoverableKeyException" type="java.security.UnrecoverableKeyException">
+</exception>
+</method>
+<method name="engineInit"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="spec" type="javax.net.ssl.ManagerFactoryParameters">
+</parameter>
+<exception name="InvalidAlgorithmParameterException" type="java.security.InvalidAlgorithmParameterException">
+</exception>
+</method>
+</class>
+<class name="KeyStoreBuilderParameters"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="javax.net.ssl.ManagerFactoryParameters">
+</implements>
+<constructor name="KeyStoreBuilderParameters"
+ type="javax.net.ssl.KeyStoreBuilderParameters"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="builder" type="java.security.KeyStore.Builder">
+</parameter>
+</constructor>
+<constructor name="KeyStoreBuilderParameters"
+ type="javax.net.ssl.KeyStoreBuilderParameters"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="parameters" type="java.util.List">
+</parameter>
+</constructor>
+<method name="getParameters"
+ return="java.util.List"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+</class>
+<interface name="ManagerFactoryParameters"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</interface>
+<class name="SSLContext"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="SSLContext"
+ type="javax.net.ssl.SSLContext"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="contextSpi" type="javax.net.ssl.SSLContextSpi">
+</parameter>
+<parameter name="provider" type="java.security.Provider">
+</parameter>
+<parameter name="protocol" type="java.lang.String">
+</parameter>
+</constructor>
+<method name="createSSLEngine"
+ return="javax.net.ssl.SSLEngine"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="createSSLEngine"
+ return="javax.net.ssl.SSLEngine"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="peerHost" type="java.lang.String">
+</parameter>
+<parameter name="peerPort" type="int">
+</parameter>
+</method>
+<method name="getClientSessionContext"
+ return="javax.net.ssl.SSLSessionContext"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getInstance"
+ return="javax.net.ssl.SSLContext"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="protocol" type="java.lang.String">
+</parameter>
+<exception name="NoSuchAlgorithmException" type="java.security.NoSuchAlgorithmException">
+</exception>
+</method>
+<method name="getInstance"
+ return="javax.net.ssl.SSLContext"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="protocol" type="java.lang.String">
+</parameter>
+<parameter name="provider" type="java.lang.String">
+</parameter>
+<exception name="NoSuchAlgorithmException" type="java.security.NoSuchAlgorithmException">
+</exception>
+<exception name="NoSuchProviderException" type="java.security.NoSuchProviderException">
+</exception>
+</method>
+<method name="getInstance"
+ return="javax.net.ssl.SSLContext"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="protocol" type="java.lang.String">
+</parameter>
+<parameter name="provider" type="java.security.Provider">
+</parameter>
+<exception name="NoSuchAlgorithmException" type="java.security.NoSuchAlgorithmException">
+</exception>
+</method>
+<method name="getProtocol"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getProvider"
+ return="java.security.Provider"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getServerSessionContext"
+ return="javax.net.ssl.SSLSessionContext"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getServerSocketFactory"
+ return="javax.net.ssl.SSLServerSocketFactory"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getSocketFactory"
+ return="javax.net.ssl.SSLSocketFactory"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="init"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="km" type="javax.net.ssl.KeyManager[]">
+</parameter>
+<parameter name="tm" type="javax.net.ssl.TrustManager[]">
+</parameter>
+<parameter name="sr" type="java.security.SecureRandom">
+</parameter>
+<exception name="KeyManagementException" type="java.security.KeyManagementException">
+</exception>
+</method>
+</class>
+<class name="SSLContextSpi"
+ extends="java.lang.Object"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="SSLContextSpi"
+ type="javax.net.ssl.SSLContextSpi"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<method name="engineCreateSSLEngine"
+ return="javax.net.ssl.SSLEngine"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="host" type="java.lang.String">
+</parameter>
+<parameter name="port" type="int">
+</parameter>
+</method>
+<method name="engineCreateSSLEngine"
+ return="javax.net.ssl.SSLEngine"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</method>
+<method name="engineGetClientSessionContext"
+ return="javax.net.ssl.SSLSessionContext"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</method>
+<method name="engineGetServerSessionContext"
+ return="javax.net.ssl.SSLSessionContext"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</method>
+<method name="engineGetServerSocketFactory"
+ return="javax.net.ssl.SSLServerSocketFactory"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</method>
+<method name="engineGetSocketFactory"
+ return="javax.net.ssl.SSLSocketFactory"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</method>
+<method name="engineInit"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="km" type="javax.net.ssl.KeyManager[]">
+</parameter>
+<parameter name="tm" type="javax.net.ssl.TrustManager[]">
+</parameter>
+<parameter name="sr" type="java.security.SecureRandom">
+</parameter>
+<exception name="KeyManagementException" type="java.security.KeyManagementException">
+</exception>
+</method>
+</class>
+<class name="SSLEngine"
+ extends="java.lang.Object"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="SSLEngine"
+ type="javax.net.ssl.SSLEngine"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</constructor>
+<constructor name="SSLEngine"
+ type="javax.net.ssl.SSLEngine"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="host" type="java.lang.String">
+</parameter>
+<parameter name="port" type="int">
+</parameter>
+</constructor>
+<method name="beginHandshake"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="SSLException" type="javax.net.ssl.SSLException">
+</exception>
+</method>
+<method name="closeInbound"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="SSLException" type="javax.net.ssl.SSLException">
+</exception>
+</method>
+<method name="closeOutbound"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getDelegatedTask"
+ return="java.lang.Runnable"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getEnableSessionCreation"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getEnabledCipherSuites"
+ return="java.lang.String[]"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getEnabledProtocols"
+ return="java.lang.String[]"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getHandshakeStatus"
+ return="javax.net.ssl.SSLEngineResult.HandshakeStatus"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getNeedClientAuth"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getPeerHost"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getPeerPort"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getSession"
+ return="javax.net.ssl.SSLSession"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getSupportedCipherSuites"
+ return="java.lang.String[]"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getSupportedProtocols"
+ return="java.lang.String[]"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getUseClientMode"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getWantClientAuth"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isInboundDone"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isOutboundDone"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="setEnableSessionCreation"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="flag" type="boolean">
+</parameter>
+</method>
+<method name="setEnabledCipherSuites"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="suites" type="java.lang.String[]">
+</parameter>
+</method>
+<method name="setEnabledProtocols"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="protocols" type="java.lang.String[]">
+</parameter>
+</method>
+<method name="setNeedClientAuth"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="need" type="boolean">
+</parameter>
+</method>
+<method name="setUseClientMode"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="mode" type="boolean">
+</parameter>
+</method>
+<method name="setWantClientAuth"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="want" type="boolean">
+</parameter>
+</method>
+<method name="unwrap"
+ return="javax.net.ssl.SSLEngineResult"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="src" type="java.nio.ByteBuffer">
+</parameter>
+<parameter name="dsts" type="java.nio.ByteBuffer[]">
+</parameter>
+<parameter name="offset" type="int">
+</parameter>
+<parameter name="length" type="int">
+</parameter>
+<exception name="SSLException" type="javax.net.ssl.SSLException">
+</exception>
+</method>
+<method name="unwrap"
+ return="javax.net.ssl.SSLEngineResult"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="src" type="java.nio.ByteBuffer">
+</parameter>
+<parameter name="dst" type="java.nio.ByteBuffer">
+</parameter>
+<exception name="SSLException" type="javax.net.ssl.SSLException">
+</exception>
+</method>
+<method name="unwrap"
+ return="javax.net.ssl.SSLEngineResult"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="src" type="java.nio.ByteBuffer">
+</parameter>
+<parameter name="dsts" type="java.nio.ByteBuffer[]">
+</parameter>
+<exception name="SSLException" type="javax.net.ssl.SSLException">
+</exception>
+</method>
+<method name="wrap"
+ return="javax.net.ssl.SSLEngineResult"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="srcs" type="java.nio.ByteBuffer[]">
+</parameter>
+<parameter name="offset" type="int">
+</parameter>
+<parameter name="length" type="int">
+</parameter>
+<parameter name="dst" type="java.nio.ByteBuffer">
+</parameter>
+<exception name="SSLException" type="javax.net.ssl.SSLException">
+</exception>
+</method>
+<method name="wrap"
+ return="javax.net.ssl.SSLEngineResult"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="srcs" type="java.nio.ByteBuffer[]">
+</parameter>
+<parameter name="dst" type="java.nio.ByteBuffer">
+</parameter>
+<exception name="SSLException" type="javax.net.ssl.SSLException">
+</exception>
+</method>
+<method name="wrap"
+ return="javax.net.ssl.SSLEngineResult"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="src" type="java.nio.ByteBuffer">
+</parameter>
+<parameter name="dst" type="java.nio.ByteBuffer">
+</parameter>
+<exception name="SSLException" type="javax.net.ssl.SSLException">
+</exception>
+</method>
+</class>
+<class name="SSLEngineResult"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="SSLEngineResult"
+ type="javax.net.ssl.SSLEngineResult"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="status" type="javax.net.ssl.SSLEngineResult.Status">
+</parameter>
+<parameter name="handshakeStatus" type="javax.net.ssl.SSLEngineResult.HandshakeStatus">
+</parameter>
+<parameter name="bytesConsumed" type="int">
+</parameter>
+<parameter name="bytesProduced" type="int">
+</parameter>
+</constructor>
+<method name="bytesConsumed"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="bytesProduced"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getHandshakeStatus"
+ return="javax.net.ssl.SSLEngineResult.HandshakeStatus"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getStatus"
+ return="javax.net.ssl.SSLEngineResult.Status"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+</class>
+<class name="SSLEngineResult.HandshakeStatus"
+ extends="java.lang.Enum"
+ abstract="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="valueOf"
+ return="javax.net.ssl.SSLEngineResult.HandshakeStatus"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+</method>
+<method name="values"
+ return="javax.net.ssl.SSLEngineResult.HandshakeStatus[]"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+</class>
+<class name="SSLEngineResult.Status"
+ extends="java.lang.Enum"
+ abstract="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="valueOf"
+ return="javax.net.ssl.SSLEngineResult.Status"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+</method>
+<method name="values"
+ return="javax.net.ssl.SSLEngineResult.Status[]"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+</class>
+<class name="SSLException"
+ extends="java.io.IOException"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="SSLException"
+ type="javax.net.ssl.SSLException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="reason" type="java.lang.String">
+</parameter>
+</constructor>
+<constructor name="SSLException"
+ type="javax.net.ssl.SSLException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="message" type="java.lang.String">
+</parameter>
+<parameter name="cause" type="java.lang.Throwable">
+</parameter>
+</constructor>
+<constructor name="SSLException"
+ type="javax.net.ssl.SSLException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="cause" type="java.lang.Throwable">
+</parameter>
+</constructor>
+</class>
+<class name="SSLHandshakeException"
+ extends="javax.net.ssl.SSLException"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="SSLHandshakeException"
+ type="javax.net.ssl.SSLHandshakeException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="reason" type="java.lang.String">
+</parameter>
+</constructor>
+</class>
+<class name="SSLKeyException"
+ extends="javax.net.ssl.SSLException"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="SSLKeyException"
+ type="javax.net.ssl.SSLKeyException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="reason" type="java.lang.String">
+</parameter>
+</constructor>
+</class>
+<class name="SSLPeerUnverifiedException"
+ extends="javax.net.ssl.SSLException"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="SSLPeerUnverifiedException"
+ type="javax.net.ssl.SSLPeerUnverifiedException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="reason" type="java.lang.String">
+</parameter>
+</constructor>
+</class>
+<class name="SSLPermission"
+ extends="java.security.BasicPermission"
+ abstract="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="SSLPermission"
+ type="javax.net.ssl.SSLPermission"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+</constructor>
+<constructor name="SSLPermission"
+ type="javax.net.ssl.SSLPermission"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+<parameter name="actions" type="java.lang.String">
+</parameter>
+</constructor>
+</class>
+<class name="SSLProtocolException"
+ extends="javax.net.ssl.SSLException"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="SSLProtocolException"
+ type="javax.net.ssl.SSLProtocolException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="reason" type="java.lang.String">
+</parameter>
+</constructor>
+</class>
+<class name="SSLServerSocket"
+ extends="java.net.ServerSocket"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="SSLServerSocket"
+ type="javax.net.ssl.SSLServerSocket"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</constructor>
+<constructor name="SSLServerSocket"
+ type="javax.net.ssl.SSLServerSocket"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="port" type="int">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</constructor>
+<constructor name="SSLServerSocket"
+ type="javax.net.ssl.SSLServerSocket"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="port" type="int">
+</parameter>
+<parameter name="backlog" type="int">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</constructor>
+<constructor name="SSLServerSocket"
+ type="javax.net.ssl.SSLServerSocket"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="port" type="int">
+</parameter>
+<parameter name="backlog" type="int">
+</parameter>
+<parameter name="address" type="java.net.InetAddress">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</constructor>
+<method name="getEnableSessionCreation"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getEnabledCipherSuites"
+ return="java.lang.String[]"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getEnabledProtocols"
+ return="java.lang.String[]"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getNeedClientAuth"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getSupportedCipherSuites"
+ return="java.lang.String[]"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getSupportedProtocols"
+ return="java.lang.String[]"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getUseClientMode"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getWantClientAuth"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="setEnableSessionCreation"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="flag" type="boolean">
+</parameter>
+</method>
+<method name="setEnabledCipherSuites"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="suites" type="java.lang.String[]">
+</parameter>
+</method>
+<method name="setEnabledProtocols"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="protocols" type="java.lang.String[]">
+</parameter>
+</method>
+<method name="setNeedClientAuth"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="need" type="boolean">
+</parameter>
+</method>
+<method name="setUseClientMode"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="mode" type="boolean">
+</parameter>
+</method>
+<method name="setWantClientAuth"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="want" type="boolean">
+</parameter>
+</method>
+</class>
+<class name="SSLServerSocketFactory"
+ extends="javax.net.ServerSocketFactory"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="SSLServerSocketFactory"
+ type="javax.net.ssl.SSLServerSocketFactory"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</constructor>
+<method name="getDefault"
+ return="javax.net.ServerSocketFactory"
+ abstract="false"
+ native="false"
+ synchronized="true"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getDefaultCipherSuites"
+ return="java.lang.String[]"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getSupportedCipherSuites"
+ return="java.lang.String[]"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+</class>
+<interface name="SSLSession"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="getApplicationBufferSize"
+ return="int"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getCipherSuite"
+ return="java.lang.String"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getCreationTime"
+ return="long"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getId"
+ return="byte[]"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getLastAccessedTime"
+ return="long"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getLocalCertificates"
+ return="java.security.cert.Certificate[]"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getLocalPrincipal"
+ return="java.security.Principal"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getPacketBufferSize"
+ return="int"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getPeerCertificateChain"
+ return="javax.security.cert.X509Certificate[]"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="SSLPeerUnverifiedException" type="javax.net.ssl.SSLPeerUnverifiedException">
+</exception>
+</method>
+<method name="getPeerCertificates"
+ return="java.security.cert.Certificate[]"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="SSLPeerUnverifiedException" type="javax.net.ssl.SSLPeerUnverifiedException">
+</exception>
+</method>
+<method name="getPeerHost"
+ return="java.lang.String"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getPeerPort"
+ return="int"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getPeerPrincipal"
+ return="java.security.Principal"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="SSLPeerUnverifiedException" type="javax.net.ssl.SSLPeerUnverifiedException">
+</exception>
+</method>
+<method name="getProtocol"
+ return="java.lang.String"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getSessionContext"
+ return="javax.net.ssl.SSLSessionContext"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getValue"
+ return="java.lang.Object"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+</method>
+<method name="getValueNames"
+ return="java.lang.String[]"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="invalidate"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isValid"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="putValue"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+<parameter name="value" type="java.lang.Object">
+</parameter>
+</method>
+<method name="removeValue"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+</method>
+</interface>
+<class name="SSLSessionBindingEvent"
+ extends="java.util.EventObject"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="java.io.Serializable">
+</implements>
+<constructor name="SSLSessionBindingEvent"
+ type="javax.net.ssl.SSLSessionBindingEvent"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="session" type="javax.net.ssl.SSLSession">
+</parameter>
+<parameter name="name" type="java.lang.String">
+</parameter>
+</constructor>
+<method name="getName"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getSession"
+ return="javax.net.ssl.SSLSession"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+</class>
+<interface name="SSLSessionBindingListener"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="java.util.EventListener">
+</implements>
+<method name="valueBound"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="event" type="javax.net.ssl.SSLSessionBindingEvent">
+</parameter>
+</method>
+<method name="valueUnbound"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="event" type="javax.net.ssl.SSLSessionBindingEvent">
+</parameter>
+</method>
+</interface>
+<interface name="SSLSessionContext"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="getIds"
+ return="java.util.Enumeration"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getSession"
+ return="javax.net.ssl.SSLSession"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="sessionId" type="byte[]">
+</parameter>
+</method>
+<method name="getSessionCacheSize"
+ return="int"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getSessionTimeout"
+ return="int"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="setSessionCacheSize"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="size" type="int">
+</parameter>
+<exception name="IllegalArgumentException" type="java.lang.IllegalArgumentException">
+</exception>
+</method>
+<method name="setSessionTimeout"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="seconds" type="int">
+</parameter>
+<exception name="IllegalArgumentException" type="java.lang.IllegalArgumentException">
+</exception>
+</method>
+</interface>
+<class name="SSLSocket"
+ extends="java.net.Socket"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="SSLSocket"
+ type="javax.net.ssl.SSLSocket"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</constructor>
+<constructor name="SSLSocket"
+ type="javax.net.ssl.SSLSocket"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="host" type="java.lang.String">
+</parameter>
+<parameter name="port" type="int">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+<exception name="UnknownHostException" type="java.net.UnknownHostException">
+</exception>
+</constructor>
+<constructor name="SSLSocket"
+ type="javax.net.ssl.SSLSocket"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="address" type="java.net.InetAddress">
+</parameter>
+<parameter name="port" type="int">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</constructor>
+<constructor name="SSLSocket"
+ type="javax.net.ssl.SSLSocket"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="host" type="java.lang.String">
+</parameter>
+<parameter name="port" type="int">
+</parameter>
+<parameter name="clientAddress" type="java.net.InetAddress">
+</parameter>
+<parameter name="clientPort" type="int">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+<exception name="UnknownHostException" type="java.net.UnknownHostException">
+</exception>
+</constructor>
+<constructor name="SSLSocket"
+ type="javax.net.ssl.SSLSocket"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="address" type="java.net.InetAddress">
+</parameter>
+<parameter name="port" type="int">
+</parameter>
+<parameter name="clientAddress" type="java.net.InetAddress">
+</parameter>
+<parameter name="clientPort" type="int">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</constructor>
+<method name="addHandshakeCompletedListener"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="listener" type="javax.net.ssl.HandshakeCompletedListener">
+</parameter>
+</method>
+<method name="getEnableSessionCreation"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getEnabledCipherSuites"
+ return="java.lang.String[]"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getEnabledProtocols"
+ return="java.lang.String[]"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getNeedClientAuth"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getSession"
+ return="javax.net.ssl.SSLSession"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getSupportedCipherSuites"
+ return="java.lang.String[]"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getSupportedProtocols"
+ return="java.lang.String[]"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getUseClientMode"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getWantClientAuth"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="removeHandshakeCompletedListener"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="listener" type="javax.net.ssl.HandshakeCompletedListener">
+</parameter>
+</method>
+<method name="setEnableSessionCreation"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="flag" type="boolean">
+</parameter>
+</method>
+<method name="setEnabledCipherSuites"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="suites" type="java.lang.String[]">
+</parameter>
+</method>
+<method name="setEnabledProtocols"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="protocols" type="java.lang.String[]">
+</parameter>
+</method>
+<method name="setNeedClientAuth"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="need" type="boolean">
+</parameter>
+</method>
+<method name="setUseClientMode"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="mode" type="boolean">
+</parameter>
+</method>
+<method name="setWantClientAuth"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="want" type="boolean">
+</parameter>
+</method>
+<method name="startHandshake"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+</class>
+<class name="SSLSocketFactory"
+ extends="javax.net.SocketFactory"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="SSLSocketFactory"
+ type="javax.net.ssl.SSLSocketFactory"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<method name="createSocket"
+ return="java.net.Socket"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="s" type="java.net.Socket">
+</parameter>
+<parameter name="host" type="java.lang.String">
+</parameter>
+<parameter name="port" type="int">
+</parameter>
+<parameter name="autoClose" type="boolean">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="getDefault"
+ return="javax.net.SocketFactory"
+ abstract="false"
+ native="false"
+ synchronized="true"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getDefaultCipherSuites"
+ return="java.lang.String[]"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getSupportedCipherSuites"
+ return="java.lang.String[]"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+</class>
+<interface name="TrustManager"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</interface>
+<class name="TrustManagerFactory"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="TrustManagerFactory"
+ type="javax.net.ssl.TrustManagerFactory"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="factorySpi" type="javax.net.ssl.TrustManagerFactorySpi">
+</parameter>
+<parameter name="provider" type="java.security.Provider">
+</parameter>
+<parameter name="algorithm" type="java.lang.String">
+</parameter>
+</constructor>
+<method name="getAlgorithm"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getDefaultAlgorithm"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getInstance"
+ return="javax.net.ssl.TrustManagerFactory"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="algorithm" type="java.lang.String">
+</parameter>
+<exception name="NoSuchAlgorithmException" type="java.security.NoSuchAlgorithmException">
+</exception>
+</method>
+<method name="getInstance"
+ return="javax.net.ssl.TrustManagerFactory"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="algorithm" type="java.lang.String">
+</parameter>
+<parameter name="provider" type="java.lang.String">
+</parameter>
+<exception name="NoSuchAlgorithmException" type="java.security.NoSuchAlgorithmException">
+</exception>
+<exception name="NoSuchProviderException" type="java.security.NoSuchProviderException">
+</exception>
+</method>
+<method name="getInstance"
+ return="javax.net.ssl.TrustManagerFactory"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="algorithm" type="java.lang.String">
+</parameter>
+<parameter name="provider" type="java.security.Provider">
+</parameter>
+<exception name="NoSuchAlgorithmException" type="java.security.NoSuchAlgorithmException">
+</exception>
+</method>
+<method name="getProvider"
+ return="java.security.Provider"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getTrustManagers"
+ return="javax.net.ssl.TrustManager[]"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="init"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="ks" type="java.security.KeyStore">
+</parameter>
+<exception name="KeyStoreException" type="java.security.KeyStoreException">
+</exception>
+</method>
+<method name="init"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="spec" type="javax.net.ssl.ManagerFactoryParameters">
+</parameter>
+<exception name="InvalidAlgorithmParameterException" type="java.security.InvalidAlgorithmParameterException">
+</exception>
+</method>
+</class>
+<class name="TrustManagerFactorySpi"
+ extends="java.lang.Object"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="TrustManagerFactorySpi"
+ type="javax.net.ssl.TrustManagerFactorySpi"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<method name="engineGetTrustManagers"
+ return="javax.net.ssl.TrustManager[]"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</method>
+<method name="engineInit"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="ks" type="java.security.KeyStore">
+</parameter>
+<exception name="KeyStoreException" type="java.security.KeyStoreException">
+</exception>
+</method>
+<method name="engineInit"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="spec" type="javax.net.ssl.ManagerFactoryParameters">
+</parameter>
+<exception name="InvalidAlgorithmParameterException" type="java.security.InvalidAlgorithmParameterException">
+</exception>
+</method>
+</class>
+<class name="X509ExtendedKeyManager"
+ extends="java.lang.Object"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="javax.net.ssl.X509KeyManager">
+</implements>
+<constructor name="X509ExtendedKeyManager"
+ type="javax.net.ssl.X509ExtendedKeyManager"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</constructor>
+<method name="chooseEngineClientAlias"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="keyType" type="java.lang.String[]">
+</parameter>
+<parameter name="issuers" type="java.security.Principal[]">
+</parameter>
+<parameter name="engine" type="javax.net.ssl.SSLEngine">
+</parameter>
+</method>
+<method name="chooseEngineServerAlias"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="keyType" type="java.lang.String">
+</parameter>
+<parameter name="issuers" type="java.security.Principal[]">
+</parameter>
+<parameter name="engine" type="javax.net.ssl.SSLEngine">
+</parameter>
+</method>
+</class>
+<interface name="X509KeyManager"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="javax.net.ssl.KeyManager">
+</implements>
+<method name="chooseClientAlias"
+ return="java.lang.String"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="keyType" type="java.lang.String[]">
+</parameter>
+<parameter name="issuers" type="java.security.Principal[]">
+</parameter>
+<parameter name="socket" type="java.net.Socket">
+</parameter>
+</method>
+<method name="chooseServerAlias"
+ return="java.lang.String"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="keyType" type="java.lang.String">
+</parameter>
+<parameter name="issuers" type="java.security.Principal[]">
+</parameter>
+<parameter name="socket" type="java.net.Socket">
+</parameter>
+</method>
+<method name="getCertificateChain"
+ return="java.security.cert.X509Certificate[]"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="alias" type="java.lang.String">
+</parameter>
+</method>
+<method name="getClientAliases"
+ return="java.lang.String[]"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="keyType" type="java.lang.String">
+</parameter>
+<parameter name="issuers" type="java.security.Principal[]">
+</parameter>
+</method>
+<method name="getPrivateKey"
+ return="java.security.PrivateKey"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="alias" type="java.lang.String">
+</parameter>
+</method>
+<method name="getServerAliases"
+ return="java.lang.String[]"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="keyType" type="java.lang.String">
+</parameter>
+<parameter name="issuers" type="java.security.Principal[]">
+</parameter>
+</method>
+</interface>
+<interface name="X509TrustManager"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="javax.net.ssl.TrustManager">
+</implements>
+<method name="checkClientTrusted"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="chain" type="java.security.cert.X509Certificate[]">
+</parameter>
+<parameter name="authType" type="java.lang.String">
+</parameter>
+<exception name="CertificateException" type="java.security.cert.CertificateException">
+</exception>
+</method>
+<method name="checkServerTrusted"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="chain" type="java.security.cert.X509Certificate[]">
+</parameter>
+<parameter name="authType" type="java.lang.String">
+</parameter>
+<exception name="CertificateException" type="java.security.cert.CertificateException">
+</exception>
+</method>
+<method name="getAcceptedIssuers"
+ return="java.security.cert.X509Certificate[]"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+</interface>
+</package>
+<package name="javax.security.auth"
+>
+<class name="AuthPermission"
+ extends="java.security.BasicPermission"
+ abstract="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="AuthPermission"
+ type="javax.security.auth.AuthPermission"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+</constructor>
+<constructor name="AuthPermission"
+ type="javax.security.auth.AuthPermission"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+<parameter name="actions" type="java.lang.String">
+</parameter>
+</constructor>
+</class>
+<class name="DestroyFailedException"
+ extends="java.lang.Exception"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="DestroyFailedException"
+ type="javax.security.auth.DestroyFailedException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<constructor name="DestroyFailedException"
+ type="javax.security.auth.DestroyFailedException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="message" type="java.lang.String">
+</parameter>
+</constructor>
+</class>
+<interface name="Destroyable"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="destroy"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="DestroyFailedException" type="javax.security.auth.DestroyFailedException">
+</exception>
+</method>
+<method name="isDestroyed"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+</interface>
+<class name="PrivateCredentialPermission"
+ extends="java.security.Permission"
+ abstract="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="PrivateCredentialPermission"
+ type="javax.security.auth.PrivateCredentialPermission"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+<parameter name="action" type="java.lang.String">
+</parameter>
+</constructor>
+<method name="equals"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="obj" type="java.lang.Object">
+</parameter>
+</method>
+<method name="getActions"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getCredentialClass"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getPrincipals"
+ return="java.lang.String[][]"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="hashCode"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="implies"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="permission" type="java.security.Permission">
+</parameter>
+</method>
+</class>
+<class name="Subject"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="java.io.Serializable">
+</implements>
+<constructor name="Subject"
+ type="javax.security.auth.Subject"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<constructor name="Subject"
+ type="javax.security.auth.Subject"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="readOnly" type="boolean">
+</parameter>
+<parameter name="subjPrincipals" type="java.util.Set&lt;? extends java.security.Principal&gt;">
+</parameter>
+<parameter name="pubCredentials" type="java.util.Set&lt;?&gt;">
+</parameter>
+<parameter name="privCredentials" type="java.util.Set&lt;?&gt;">
+</parameter>
+</constructor>
+<method name="doAs"
+ return="java.lang.Object"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="subject" type="javax.security.auth.Subject">
+</parameter>
+<parameter name="action" type="java.security.PrivilegedAction">
+</parameter>
+</method>
+<method name="doAs"
+ return="java.lang.Object"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="subject" type="javax.security.auth.Subject">
+</parameter>
+<parameter name="action" type="java.security.PrivilegedExceptionAction">
+</parameter>
+<exception name="PrivilegedActionException" type="java.security.PrivilegedActionException">
+</exception>
+</method>
+<method name="doAsPrivileged"
+ return="java.lang.Object"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="subject" type="javax.security.auth.Subject">
+</parameter>
+<parameter name="action" type="java.security.PrivilegedAction">
+</parameter>
+<parameter name="context" type="java.security.AccessControlContext">
+</parameter>
+</method>
+<method name="doAsPrivileged"
+ return="java.lang.Object"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="subject" type="javax.security.auth.Subject">
+</parameter>
+<parameter name="action" type="java.security.PrivilegedExceptionAction">
+</parameter>
+<parameter name="context" type="java.security.AccessControlContext">
+</parameter>
+<exception name="PrivilegedActionException" type="java.security.PrivilegedActionException">
+</exception>
+</method>
+<method name="getPrincipals"
+ return="java.util.Set&lt;java.security.Principal&gt;"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getPrincipals"
+ return="java.util.Set&lt;T&gt;"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="c" type="java.lang.Class&lt;T&gt;">
+</parameter>
+</method>
+<method name="getPrivateCredentials"
+ return="java.util.Set&lt;java.lang.Object&gt;"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getPrivateCredentials"
+ return="java.util.Set&lt;T&gt;"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="c" type="java.lang.Class&lt;T&gt;">
+</parameter>
+</method>
+<method name="getPublicCredentials"
+ return="java.util.Set&lt;java.lang.Object&gt;"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getPublicCredentials"
+ return="java.util.Set&lt;T&gt;"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="c" type="java.lang.Class&lt;T&gt;">
+</parameter>
+</method>
+<method name="getSubject"
+ return="javax.security.auth.Subject"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="context" type="java.security.AccessControlContext">
+</parameter>
+</method>
+<method name="isReadOnly"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="setReadOnly"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+</class>
+<class name="SubjectDomainCombiner"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="java.security.DomainCombiner">
+</implements>
+<constructor name="SubjectDomainCombiner"
+ type="javax.security.auth.SubjectDomainCombiner"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="subject" type="javax.security.auth.Subject">
+</parameter>
+</constructor>
+<method name="combine"
+ return="java.security.ProtectionDomain[]"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="currentDomains" type="java.security.ProtectionDomain[]">
+</parameter>
+<parameter name="assignedDomains" type="java.security.ProtectionDomain[]">
+</parameter>
+</method>
+<method name="getSubject"
+ return="javax.security.auth.Subject"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+</class>
+</package>
+<package name="javax.security.auth.callback"
+>
+<interface name="Callback"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</interface>
+<interface name="CallbackHandler"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="handle"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="callbacks" type="javax.security.auth.callback.Callback[]">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+<exception name="UnsupportedCallbackException" type="javax.security.auth.callback.UnsupportedCallbackException">
+</exception>
+</method>
+</interface>
+<class name="PasswordCallback"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="javax.security.auth.callback.Callback">
+</implements>
+<implements name="java.io.Serializable">
+</implements>
+<constructor name="PasswordCallback"
+ type="javax.security.auth.callback.PasswordCallback"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="prompt" type="java.lang.String">
+</parameter>
+<parameter name="echoOn" type="boolean">
+</parameter>
+</constructor>
+<method name="clearPassword"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getPassword"
+ return="char[]"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getPrompt"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isEchoOn"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="setPassword"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="password" type="char[]">
+</parameter>
+</method>
+</class>
+<class name="UnsupportedCallbackException"
+ extends="java.lang.Exception"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="UnsupportedCallbackException"
+ type="javax.security.auth.callback.UnsupportedCallbackException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="callback" type="javax.security.auth.callback.Callback">
+</parameter>
+</constructor>
+<constructor name="UnsupportedCallbackException"
+ type="javax.security.auth.callback.UnsupportedCallbackException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="callback" type="javax.security.auth.callback.Callback">
+</parameter>
+<parameter name="message" type="java.lang.String">
+</parameter>
+</constructor>
+<method name="getCallback"
+ return="javax.security.auth.callback.Callback"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+</class>
+</package>
+<package name="javax.security.auth.login"
+>
+<class name="LoginException"
+ extends="java.security.GeneralSecurityException"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="LoginException"
+ type="javax.security.auth.login.LoginException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<constructor name="LoginException"
+ type="javax.security.auth.login.LoginException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="message" type="java.lang.String">
+</parameter>
+</constructor>
+</class>
+</package>
+<package name="javax.security.auth.x500"
+>
+<class name="X500Principal"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="java.security.Principal">
+</implements>
+<implements name="java.io.Serializable">
+</implements>
+<constructor name="X500Principal"
+ type="javax.security.auth.x500.X500Principal"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="byte[]">
+</parameter>
+</constructor>
+<constructor name="X500Principal"
+ type="javax.security.auth.x500.X500Principal"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="in" type="java.io.InputStream">
+</parameter>
+</constructor>
+<constructor name="X500Principal"
+ type="javax.security.auth.x500.X500Principal"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+</constructor>
+<method name="getEncoded"
+ return="byte[]"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getName"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getName"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="format" type="java.lang.String">
+</parameter>
+</method>
+<field name="CANONICAL"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;CANONICAL&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="RFC1779"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;RFC1779&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="RFC2253"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;RFC2253&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+</package>
+<package name="javax.security.cert"
+>
+<class name="Certificate"
+ extends="java.lang.Object"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="Certificate"
+ type="javax.security.cert.Certificate"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<method name="getEncoded"
+ return="byte[]"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="CertificateEncodingException" type="javax.security.cert.CertificateEncodingException">
+</exception>
+</method>
+<method name="getPublicKey"
+ return="java.security.PublicKey"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="toString"
+ return="java.lang.String"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="verify"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="key" type="java.security.PublicKey">
+</parameter>
+<exception name="CertificateException" type="javax.security.cert.CertificateException">
+</exception>
+<exception name="InvalidKeyException" type="java.security.InvalidKeyException">
+</exception>
+<exception name="NoSuchAlgorithmException" type="java.security.NoSuchAlgorithmException">
+</exception>
+<exception name="NoSuchProviderException" type="java.security.NoSuchProviderException">
+</exception>
+<exception name="SignatureException" type="java.security.SignatureException">
+</exception>
+</method>
+<method name="verify"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="key" type="java.security.PublicKey">
+</parameter>
+<parameter name="sigProvider" type="java.lang.String">
+</parameter>
+<exception name="CertificateException" type="javax.security.cert.CertificateException">
+</exception>
+<exception name="InvalidKeyException" type="java.security.InvalidKeyException">
+</exception>
+<exception name="NoSuchAlgorithmException" type="java.security.NoSuchAlgorithmException">
+</exception>
+<exception name="NoSuchProviderException" type="java.security.NoSuchProviderException">
+</exception>
+<exception name="SignatureException" type="java.security.SignatureException">
+</exception>
+</method>
+</class>
+<class name="CertificateEncodingException"
+ extends="javax.security.cert.CertificateException"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="CertificateEncodingException"
+ type="javax.security.cert.CertificateEncodingException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="msg" type="java.lang.String">
+</parameter>
+</constructor>
+<constructor name="CertificateEncodingException"
+ type="javax.security.cert.CertificateEncodingException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+</class>
+<class name="CertificateException"
+ extends="java.lang.Exception"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="CertificateException"
+ type="javax.security.cert.CertificateException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="msg" type="java.lang.String">
+</parameter>
+</constructor>
+<constructor name="CertificateException"
+ type="javax.security.cert.CertificateException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+</class>
+<class name="CertificateExpiredException"
+ extends="javax.security.cert.CertificateException"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="CertificateExpiredException"
+ type="javax.security.cert.CertificateExpiredException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="msg" type="java.lang.String">
+</parameter>
+</constructor>
+<constructor name="CertificateExpiredException"
+ type="javax.security.cert.CertificateExpiredException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+</class>
+<class name="CertificateNotYetValidException"
+ extends="javax.security.cert.CertificateException"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="CertificateNotYetValidException"
+ type="javax.security.cert.CertificateNotYetValidException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="msg" type="java.lang.String">
+</parameter>
+</constructor>
+<constructor name="CertificateNotYetValidException"
+ type="javax.security.cert.CertificateNotYetValidException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+</class>
+<class name="CertificateParsingException"
+ extends="javax.security.cert.CertificateException"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="CertificateParsingException"
+ type="javax.security.cert.CertificateParsingException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="msg" type="java.lang.String">
+</parameter>
+</constructor>
+<constructor name="CertificateParsingException"
+ type="javax.security.cert.CertificateParsingException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+</class>
+<class name="X509Certificate"
+ extends="javax.security.cert.Certificate"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="X509Certificate"
+ type="javax.security.cert.X509Certificate"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<method name="checkValidity"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="CertificateExpiredException" type="javax.security.cert.CertificateExpiredException">
+</exception>
+<exception name="CertificateNotYetValidException" type="javax.security.cert.CertificateNotYetValidException">
+</exception>
+</method>
+<method name="checkValidity"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="date" type="java.util.Date">
+</parameter>
+<exception name="CertificateExpiredException" type="javax.security.cert.CertificateExpiredException">
+</exception>
+<exception name="CertificateNotYetValidException" type="javax.security.cert.CertificateNotYetValidException">
+</exception>
+</method>
+<method name="getInstance"
+ return="javax.security.cert.X509Certificate"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="inStream" type="java.io.InputStream">
+</parameter>
+<exception name="CertificateException" type="javax.security.cert.CertificateException">
+</exception>
+</method>
+<method name="getInstance"
+ return="javax.security.cert.X509Certificate"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="certData" type="byte[]">
+</parameter>
+<exception name="CertificateException" type="javax.security.cert.CertificateException">
+</exception>
+</method>
+<method name="getIssuerDN"
+ return="java.security.Principal"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getNotAfter"
+ return="java.util.Date"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getNotBefore"
+ return="java.util.Date"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getSerialNumber"
+ return="java.math.BigInteger"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getSigAlgName"
+ return="java.lang.String"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getSigAlgOID"
+ return="java.lang.String"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getSigAlgParams"
+ return="byte[]"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getSubjectDN"
+ return="java.security.Principal"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getVersion"
+ return="int"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+</class>
+</package>
+<package name="javax.sql"
+>
+<class name="ConnectionEvent"
+ extends="java.util.EventObject"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="java.io.Serializable">
+</implements>
+<constructor name="ConnectionEvent"
+ type="javax.sql.ConnectionEvent"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="theConnection" type="javax.sql.PooledConnection">
+</parameter>
+</constructor>
+<constructor name="ConnectionEvent"
+ type="javax.sql.ConnectionEvent"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="theConnection" type="javax.sql.PooledConnection">
+</parameter>
+<parameter name="theException" type="java.sql.SQLException">
+</parameter>
+</constructor>
+<method name="getSQLException"
+ return="java.sql.SQLException"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+</class>
+<interface name="ConnectionEventListener"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="java.util.EventListener">
+</implements>
+<method name="connectionClosed"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="theEvent" type="javax.sql.ConnectionEvent">
+</parameter>
+</method>
+<method name="connectionErrorOccurred"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="theEvent" type="javax.sql.ConnectionEvent">
+</parameter>
+</method>
+</interface>
+<interface name="ConnectionPoolDataSource"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="getLogWriter"
+ return="java.io.PrintWriter"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="getLoginTimeout"
+ return="int"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="getPooledConnection"
+ return="javax.sql.PooledConnection"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="getPooledConnection"
+ return="javax.sql.PooledConnection"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="theUser" type="java.lang.String">
+</parameter>
+<parameter name="thePassword" type="java.lang.String">
+</parameter>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="setLogWriter"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="theWriter" type="java.io.PrintWriter">
+</parameter>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="setLoginTimeout"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="theTimeout" type="int">
+</parameter>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+</interface>
+<interface name="DataSource"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="getConnection"
+ return="java.sql.Connection"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="getConnection"
+ return="java.sql.Connection"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="theUsername" type="java.lang.String">
+</parameter>
+<parameter name="thePassword" type="java.lang.String">
+</parameter>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="getLogWriter"
+ return="java.io.PrintWriter"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="getLoginTimeout"
+ return="int"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="setLogWriter"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="theWriter" type="java.io.PrintWriter">
+</parameter>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="setLoginTimeout"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="theTimeout" type="int">
+</parameter>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+</interface>
+<interface name="PooledConnection"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="addConnectionEventListener"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="theListener" type="javax.sql.ConnectionEventListener">
+</parameter>
+</method>
+<method name="close"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="getConnection"
+ return="java.sql.Connection"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="removeConnectionEventListener"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="theListener" type="javax.sql.ConnectionEventListener">
+</parameter>
+</method>
+</interface>
+<interface name="RowSet"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="java.sql.ResultSet">
+</implements>
+<method name="addRowSetListener"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="theListener" type="javax.sql.RowSetListener">
+</parameter>
+</method>
+<method name="clearParameters"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="execute"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="getCommand"
+ return="java.lang.String"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getDataSourceName"
+ return="java.lang.String"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getEscapeProcessing"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="getMaxFieldSize"
+ return="int"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="getMaxRows"
+ return="int"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="getPassword"
+ return="java.lang.String"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getQueryTimeout"
+ return="int"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="getTransactionIsolation"
+ return="int"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getTypeMap"
+ return="java.util.Map&lt;java.lang.String, java.lang.Class&lt;?&gt;&gt;"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="getUrl"
+ return="java.lang.String"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="getUsername"
+ return="java.lang.String"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isReadOnly"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="removeRowSetListener"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="theListener" type="javax.sql.RowSetListener">
+</parameter>
+</method>
+<method name="setArray"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="parameterIndex" type="int">
+</parameter>
+<parameter name="theArray" type="java.sql.Array">
+</parameter>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="setAsciiStream"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="parameterIndex" type="int">
+</parameter>
+<parameter name="theInputStream" type="java.io.InputStream">
+</parameter>
+<parameter name="length" type="int">
+</parameter>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="setBigDecimal"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="parameterIndex" type="int">
+</parameter>
+<parameter name="theBigDecimal" type="java.math.BigDecimal">
+</parameter>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="setBinaryStream"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="parameterIndex" type="int">
+</parameter>
+<parameter name="theInputStream" type="java.io.InputStream">
+</parameter>
+<parameter name="length" type="int">
+</parameter>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="setBlob"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="parameterIndex" type="int">
+</parameter>
+<parameter name="theBlob" type="java.sql.Blob">
+</parameter>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="setBoolean"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="parameterIndex" type="int">
+</parameter>
+<parameter name="theBoolean" type="boolean">
+</parameter>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="setByte"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="parameterIndex" type="int">
+</parameter>
+<parameter name="theByte" type="byte">
+</parameter>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="setBytes"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="parameterIndex" type="int">
+</parameter>
+<parameter name="theByteArray" type="byte[]">
+</parameter>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="setCharacterStream"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="parameterIndex" type="int">
+</parameter>
+<parameter name="theReader" type="java.io.Reader">
+</parameter>
+<parameter name="length" type="int">
+</parameter>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="setClob"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="parameterIndex" type="int">
+</parameter>
+<parameter name="theClob" type="java.sql.Clob">
+</parameter>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="setCommand"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="cmd" type="java.lang.String">
+</parameter>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="setConcurrency"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="concurrency" type="int">
+</parameter>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="setDataSourceName"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="setDate"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="parameterIndex" type="int">
+</parameter>
+<parameter name="theDate" type="java.sql.Date">
+</parameter>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="setDate"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="parameterIndex" type="int">
+</parameter>
+<parameter name="theDate" type="java.sql.Date">
+</parameter>
+<parameter name="theCalendar" type="java.util.Calendar">
+</parameter>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="setDouble"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="parameterIndex" type="int">
+</parameter>
+<parameter name="theDouble" type="double">
+</parameter>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="setEscapeProcessing"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="enable" type="boolean">
+</parameter>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="setFloat"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="parameterIndex" type="int">
+</parameter>
+<parameter name="theFloat" type="float">
+</parameter>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="setInt"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="parameterIndex" type="int">
+</parameter>
+<parameter name="theInteger" type="int">
+</parameter>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="setLong"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="parameterIndex" type="int">
+</parameter>
+<parameter name="theLong" type="long">
+</parameter>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="setMaxFieldSize"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="max" type="int">
+</parameter>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="setMaxRows"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="max" type="int">
+</parameter>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="setNull"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="parameterIndex" type="int">
+</parameter>
+<parameter name="sqlType" type="int">
+</parameter>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="setNull"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="parameterIndex" type="int">
+</parameter>
+<parameter name="sqlType" type="int">
+</parameter>
+<parameter name="typeName" type="java.lang.String">
+</parameter>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="setObject"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="parameterIndex" type="int">
+</parameter>
+<parameter name="theObject" type="java.lang.Object">
+</parameter>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="setObject"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="parameterIndex" type="int">
+</parameter>
+<parameter name="theObject" type="java.lang.Object">
+</parameter>
+<parameter name="targetSqlType" type="int">
+</parameter>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="setObject"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="parameterIndex" type="int">
+</parameter>
+<parameter name="theObject" type="java.lang.Object">
+</parameter>
+<parameter name="targetSqlType" type="int">
+</parameter>
+<parameter name="scale" type="int">
+</parameter>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="setPassword"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="password" type="java.lang.String">
+</parameter>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="setQueryTimeout"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="seconds" type="int">
+</parameter>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="setReadOnly"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="readOnly" type="boolean">
+</parameter>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="setRef"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="parameterIndex" type="int">
+</parameter>
+<parameter name="theRef" type="java.sql.Ref">
+</parameter>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="setShort"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="parameterIndex" type="int">
+</parameter>
+<parameter name="theShort" type="short">
+</parameter>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="setString"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="parameterIndex" type="int">
+</parameter>
+<parameter name="theString" type="java.lang.String">
+</parameter>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="setTime"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="parameterIndex" type="int">
+</parameter>
+<parameter name="theTime" type="java.sql.Time">
+</parameter>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="setTime"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="parameterIndex" type="int">
+</parameter>
+<parameter name="theTime" type="java.sql.Time">
+</parameter>
+<parameter name="theCalendar" type="java.util.Calendar">
+</parameter>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="setTimestamp"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="parameterIndex" type="int">
+</parameter>
+<parameter name="theTimestamp" type="java.sql.Timestamp">
+</parameter>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="setTimestamp"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="parameterIndex" type="int">
+</parameter>
+<parameter name="theTimestamp" type="java.sql.Timestamp">
+</parameter>
+<parameter name="theCalendar" type="java.util.Calendar">
+</parameter>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="setTransactionIsolation"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="level" type="int">
+</parameter>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="setType"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="type" type="int">
+</parameter>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="setTypeMap"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="theTypeMap" type="java.util.Map&lt;java.lang.String, java.lang.Class&lt;?&gt;&gt;">
+</parameter>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="setUrl"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="theURL" type="java.lang.String">
+</parameter>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="setUsername"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="theUsername" type="java.lang.String">
+</parameter>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+</interface>
+<class name="RowSetEvent"
+ extends="java.util.EventObject"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="java.io.Serializable">
+</implements>
+<constructor name="RowSetEvent"
+ type="javax.sql.RowSetEvent"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="theSource" type="javax.sql.RowSet">
+</parameter>
+</constructor>
+</class>
+<interface name="RowSetInternal"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="getConnection"
+ return="java.sql.Connection"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="getOriginal"
+ return="java.sql.ResultSet"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="getOriginalRow"
+ return="java.sql.ResultSet"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="getParams"
+ return="java.lang.Object[]"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="setMetaData"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="theMetaData" type="javax.sql.RowSetMetaData">
+</parameter>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+</interface>
+<interface name="RowSetListener"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="java.util.EventListener">
+</implements>
+<method name="cursorMoved"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="theEvent" type="javax.sql.RowSetEvent">
+</parameter>
+</method>
+<method name="rowChanged"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="theEvent" type="javax.sql.RowSetEvent">
+</parameter>
+</method>
+<method name="rowSetChanged"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="theEvent" type="javax.sql.RowSetEvent">
+</parameter>
+</method>
+</interface>
+<interface name="RowSetMetaData"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="java.sql.ResultSetMetaData">
+</implements>
+<method name="setAutoIncrement"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="columnIndex" type="int">
+</parameter>
+<parameter name="autoIncrement" type="boolean">
+</parameter>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="setCaseSensitive"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="columnIndex" type="int">
+</parameter>
+<parameter name="caseSensitive" type="boolean">
+</parameter>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="setCatalogName"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="columnIndex" type="int">
+</parameter>
+<parameter name="catalogName" type="java.lang.String">
+</parameter>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="setColumnCount"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="columnCount" type="int">
+</parameter>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="setColumnDisplaySize"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="columnIndex" type="int">
+</parameter>
+<parameter name="displaySize" type="int">
+</parameter>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="setColumnLabel"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="columnIndex" type="int">
+</parameter>
+<parameter name="theLabel" type="java.lang.String">
+</parameter>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="setColumnName"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="columnIndex" type="int">
+</parameter>
+<parameter name="theColumnName" type="java.lang.String">
+</parameter>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="setColumnType"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="columnIndex" type="int">
+</parameter>
+<parameter name="theSQLType" type="int">
+</parameter>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="setColumnTypeName"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="columnIndex" type="int">
+</parameter>
+<parameter name="theTypeName" type="java.lang.String">
+</parameter>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="setCurrency"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="columnIndex" type="int">
+</parameter>
+<parameter name="isCurrency" type="boolean">
+</parameter>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="setNullable"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="columnIndex" type="int">
+</parameter>
+<parameter name="nullability" type="int">
+</parameter>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="setPrecision"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="columnIndex" type="int">
+</parameter>
+<parameter name="thePrecision" type="int">
+</parameter>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="setScale"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="columnIndex" type="int">
+</parameter>
+<parameter name="theScale" type="int">
+</parameter>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="setSchemaName"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="columnIndex" type="int">
+</parameter>
+<parameter name="theSchemaName" type="java.lang.String">
+</parameter>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="setSearchable"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="columnIndex" type="int">
+</parameter>
+<parameter name="isSearchable" type="boolean">
+</parameter>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="setSigned"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="columnIndex" type="int">
+</parameter>
+<parameter name="isSigned" type="boolean">
+</parameter>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+<method name="setTableName"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="columnIndex" type="int">
+</parameter>
+<parameter name="theTableName" type="java.lang.String">
+</parameter>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+</interface>
+<interface name="RowSetReader"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="readData"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="theCaller" type="javax.sql.RowSetInternal">
+</parameter>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+</interface>
+<interface name="RowSetWriter"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="writeData"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="theRowSet" type="javax.sql.RowSetInternal">
+</parameter>
+<exception name="SQLException" type="java.sql.SQLException">
+</exception>
+</method>
+</interface>
+</package>
+<package name="javax.xml"
+>
+<class name="XMLConstants"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<field name="DEFAULT_NS_PREFIX"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="FEATURE_SECURE_PROCESSING"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;http://javax.xml.XMLConstants/feature/secure-processing&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="NULL_NS_URI"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="RELAXNG_NS_URI"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;http://relaxng.org/ns/structure/1.0&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="W3C_XML_SCHEMA_INSTANCE_NS_URI"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;http://www.w3.org/2001/XMLSchema-instance&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="W3C_XML_SCHEMA_NS_URI"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;http://www.w3.org/2001/XMLSchema&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="W3C_XPATH_DATATYPE_NS_URI"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;http://www.w3.org/2003/11/xpath-datatypes&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="XMLNS_ATTRIBUTE"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;xmlns&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="XMLNS_ATTRIBUTE_NS_URI"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;http://www.w3.org/2000/xmlns/&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="XML_DTD_NS_URI"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;http://www.w3.org/TR/REC-xml&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="XML_NS_PREFIX"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;xml&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="XML_NS_URI"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;http://www.w3.org/XML/1998/namespace&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+</package>
+<package name="javax.xml.datatype"
+>
+<class name="DatatypeConfigurationException"
+ extends="java.lang.Exception"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="DatatypeConfigurationException"
+ type="javax.xml.datatype.DatatypeConfigurationException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<constructor name="DatatypeConfigurationException"
+ type="javax.xml.datatype.DatatypeConfigurationException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="message" type="java.lang.String">
+</parameter>
+</constructor>
+<constructor name="DatatypeConfigurationException"
+ type="javax.xml.datatype.DatatypeConfigurationException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="message" type="java.lang.String">
+</parameter>
+<parameter name="cause" type="java.lang.Throwable">
+</parameter>
+</constructor>
+<constructor name="DatatypeConfigurationException"
+ type="javax.xml.datatype.DatatypeConfigurationException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="cause" type="java.lang.Throwable">
+</parameter>
+</constructor>
+</class>
+<class name="DatatypeConstants"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<field name="APRIL"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="4"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="AUGUST"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="8"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="DATE"
+ type="javax.xml.namespace.QName"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="DATETIME"
+ type="javax.xml.namespace.QName"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="DAYS"
+ type="javax.xml.datatype.DatatypeConstants.Field"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="DECEMBER"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="12"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="DURATION"
+ type="javax.xml.namespace.QName"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="DURATION_DAYTIME"
+ type="javax.xml.namespace.QName"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="DURATION_YEARMONTH"
+ type="javax.xml.namespace.QName"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="EQUAL"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="0"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="FEBRUARY"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="FIELD_UNDEFINED"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="-2147483648"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GDAY"
+ type="javax.xml.namespace.QName"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GMONTH"
+ type="javax.xml.namespace.QName"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GMONTHDAY"
+ type="javax.xml.namespace.QName"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GREATER"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GYEAR"
+ type="javax.xml.namespace.QName"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GYEARMONTH"
+ type="javax.xml.namespace.QName"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="HOURS"
+ type="javax.xml.datatype.DatatypeConstants.Field"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="INDETERMINATE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="JANUARY"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="JULY"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="7"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="JUNE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="6"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="LESSER"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="-1"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="MARCH"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="3"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="MAX_TIMEZONE_OFFSET"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="-840"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="MAY"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="5"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="MINUTES"
+ type="javax.xml.datatype.DatatypeConstants.Field"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="MIN_TIMEZONE_OFFSET"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="840"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="MONTHS"
+ type="javax.xml.datatype.DatatypeConstants.Field"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="NOVEMBER"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="11"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="OCTOBER"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="10"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="SECONDS"
+ type="javax.xml.datatype.DatatypeConstants.Field"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="SEPTEMBER"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="9"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TIME"
+ type="javax.xml.namespace.QName"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="YEARS"
+ type="javax.xml.datatype.DatatypeConstants.Field"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<class name="DatatypeConstants.Field"
+ extends="java.lang.Object"
+ abstract="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="getId"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+</class>
+<class name="DatatypeFactory"
+ extends="java.lang.Object"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="DatatypeFactory"
+ type="javax.xml.datatype.DatatypeFactory"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</constructor>
+<method name="newDuration"
+ return="javax.xml.datatype.Duration"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="lexicalRepresentation" type="java.lang.String">
+</parameter>
+</method>
+<method name="newDuration"
+ return="javax.xml.datatype.Duration"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="durationInMilliSeconds" type="long">
+</parameter>
+</method>
+<method name="newDuration"
+ return="javax.xml.datatype.Duration"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="isPositive" type="boolean">
+</parameter>
+<parameter name="years" type="java.math.BigInteger">
+</parameter>
+<parameter name="months" type="java.math.BigInteger">
+</parameter>
+<parameter name="days" type="java.math.BigInteger">
+</parameter>
+<parameter name="hours" type="java.math.BigInteger">
+</parameter>
+<parameter name="minutes" type="java.math.BigInteger">
+</parameter>
+<parameter name="seconds" type="java.math.BigDecimal">
+</parameter>
+</method>
+<method name="newDuration"
+ return="javax.xml.datatype.Duration"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="isPositive" type="boolean">
+</parameter>
+<parameter name="years" type="int">
+</parameter>
+<parameter name="months" type="int">
+</parameter>
+<parameter name="days" type="int">
+</parameter>
+<parameter name="hours" type="int">
+</parameter>
+<parameter name="minutes" type="int">
+</parameter>
+<parameter name="seconds" type="int">
+</parameter>
+</method>
+<method name="newDurationDayTime"
+ return="javax.xml.datatype.Duration"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="lexicalRepresentation" type="java.lang.String">
+</parameter>
+</method>
+<method name="newDurationDayTime"
+ return="javax.xml.datatype.Duration"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="durationInMilliseconds" type="long">
+</parameter>
+</method>
+<method name="newDurationDayTime"
+ return="javax.xml.datatype.Duration"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="isPositive" type="boolean">
+</parameter>
+<parameter name="day" type="java.math.BigInteger">
+</parameter>
+<parameter name="hour" type="java.math.BigInteger">
+</parameter>
+<parameter name="minute" type="java.math.BigInteger">
+</parameter>
+<parameter name="second" type="java.math.BigInteger">
+</parameter>
+</method>
+<method name="newDurationDayTime"
+ return="javax.xml.datatype.Duration"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="isPositive" type="boolean">
+</parameter>
+<parameter name="day" type="int">
+</parameter>
+<parameter name="hour" type="int">
+</parameter>
+<parameter name="minute" type="int">
+</parameter>
+<parameter name="second" type="int">
+</parameter>
+</method>
+<method name="newDurationYearMonth"
+ return="javax.xml.datatype.Duration"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="lexicalRepresentation" type="java.lang.String">
+</parameter>
+</method>
+<method name="newDurationYearMonth"
+ return="javax.xml.datatype.Duration"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="durationInMilliseconds" type="long">
+</parameter>
+</method>
+<method name="newDurationYearMonth"
+ return="javax.xml.datatype.Duration"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="isPositive" type="boolean">
+</parameter>
+<parameter name="year" type="java.math.BigInteger">
+</parameter>
+<parameter name="month" type="java.math.BigInteger">
+</parameter>
+</method>
+<method name="newDurationYearMonth"
+ return="javax.xml.datatype.Duration"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="isPositive" type="boolean">
+</parameter>
+<parameter name="year" type="int">
+</parameter>
+<parameter name="month" type="int">
+</parameter>
+</method>
+<method name="newInstance"
+ return="javax.xml.datatype.DatatypeFactory"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="DatatypeConfigurationException" type="javax.xml.datatype.DatatypeConfigurationException">
+</exception>
+</method>
+<method name="newXMLGregorianCalendar"
+ return="javax.xml.datatype.XMLGregorianCalendar"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="newXMLGregorianCalendar"
+ return="javax.xml.datatype.XMLGregorianCalendar"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="lexicalRepresentation" type="java.lang.String">
+</parameter>
+</method>
+<method name="newXMLGregorianCalendar"
+ return="javax.xml.datatype.XMLGregorianCalendar"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="cal" type="java.util.GregorianCalendar">
+</parameter>
+</method>
+<method name="newXMLGregorianCalendar"
+ return="javax.xml.datatype.XMLGregorianCalendar"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="year" type="java.math.BigInteger">
+</parameter>
+<parameter name="month" type="int">
+</parameter>
+<parameter name="day" type="int">
+</parameter>
+<parameter name="hour" type="int">
+</parameter>
+<parameter name="minute" type="int">
+</parameter>
+<parameter name="second" type="int">
+</parameter>
+<parameter name="fractionalSecond" type="java.math.BigDecimal">
+</parameter>
+<parameter name="timezone" type="int">
+</parameter>
+</method>
+<method name="newXMLGregorianCalendar"
+ return="javax.xml.datatype.XMLGregorianCalendar"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="year" type="int">
+</parameter>
+<parameter name="month" type="int">
+</parameter>
+<parameter name="day" type="int">
+</parameter>
+<parameter name="hour" type="int">
+</parameter>
+<parameter name="minute" type="int">
+</parameter>
+<parameter name="second" type="int">
+</parameter>
+<parameter name="millisecond" type="int">
+</parameter>
+<parameter name="timezone" type="int">
+</parameter>
+</method>
+<method name="newXMLGregorianCalendarDate"
+ return="javax.xml.datatype.XMLGregorianCalendar"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="year" type="int">
+</parameter>
+<parameter name="month" type="int">
+</parameter>
+<parameter name="day" type="int">
+</parameter>
+<parameter name="timezone" type="int">
+</parameter>
+</method>
+<method name="newXMLGregorianCalendarTime"
+ return="javax.xml.datatype.XMLGregorianCalendar"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="hours" type="int">
+</parameter>
+<parameter name="minutes" type="int">
+</parameter>
+<parameter name="seconds" type="int">
+</parameter>
+<parameter name="timezone" type="int">
+</parameter>
+</method>
+<method name="newXMLGregorianCalendarTime"
+ return="javax.xml.datatype.XMLGregorianCalendar"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="hours" type="int">
+</parameter>
+<parameter name="minutes" type="int">
+</parameter>
+<parameter name="seconds" type="int">
+</parameter>
+<parameter name="fractionalSecond" type="java.math.BigDecimal">
+</parameter>
+<parameter name="timezone" type="int">
+</parameter>
+</method>
+<method name="newXMLGregorianCalendarTime"
+ return="javax.xml.datatype.XMLGregorianCalendar"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="hours" type="int">
+</parameter>
+<parameter name="minutes" type="int">
+</parameter>
+<parameter name="seconds" type="int">
+</parameter>
+<parameter name="milliseconds" type="int">
+</parameter>
+<parameter name="timezone" type="int">
+</parameter>
+</method>
+<field name="DATATYPEFACTORY_IMPLEMENTATION_CLASS"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="DATATYPEFACTORY_PROPERTY"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;javax.xml.datatype.DatatypeFactory&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<class name="Duration"
+ extends="java.lang.Object"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="Duration"
+ type="javax.xml.datatype.Duration"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<method name="add"
+ return="javax.xml.datatype.Duration"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="rhs" type="javax.xml.datatype.Duration">
+</parameter>
+</method>
+<method name="addTo"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="calendar" type="java.util.Calendar">
+</parameter>
+</method>
+<method name="addTo"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="date" type="java.util.Date">
+</parameter>
+</method>
+<method name="compare"
+ return="int"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="duration" type="javax.xml.datatype.Duration">
+</parameter>
+</method>
+<method name="getDays"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getField"
+ return="java.lang.Number"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="field" type="javax.xml.datatype.DatatypeConstants.Field">
+</parameter>
+</method>
+<method name="getHours"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getMinutes"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getMonths"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getSeconds"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getSign"
+ return="int"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getTimeInMillis"
+ return="long"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="startInstant" type="java.util.Calendar">
+</parameter>
+</method>
+<method name="getTimeInMillis"
+ return="long"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="startInstant" type="java.util.Date">
+</parameter>
+</method>
+<method name="getXMLSchemaType"
+ return="javax.xml.namespace.QName"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getYears"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="hashCode"
+ return="int"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isLongerThan"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="duration" type="javax.xml.datatype.Duration">
+</parameter>
+</method>
+<method name="isSet"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="field" type="javax.xml.datatype.DatatypeConstants.Field">
+</parameter>
+</method>
+<method name="isShorterThan"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="duration" type="javax.xml.datatype.Duration">
+</parameter>
+</method>
+<method name="multiply"
+ return="javax.xml.datatype.Duration"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="factor" type="int">
+</parameter>
+</method>
+<method name="multiply"
+ return="javax.xml.datatype.Duration"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="factor" type="java.math.BigDecimal">
+</parameter>
+</method>
+<method name="negate"
+ return="javax.xml.datatype.Duration"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="normalizeWith"
+ return="javax.xml.datatype.Duration"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="startTimeInstant" type="java.util.Calendar">
+</parameter>
+</method>
+<method name="subtract"
+ return="javax.xml.datatype.Duration"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="rhs" type="javax.xml.datatype.Duration">
+</parameter>
+</method>
+</class>
+<class name="XMLGregorianCalendar"
+ extends="java.lang.Object"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="java.lang.Cloneable">
+</implements>
+<constructor name="XMLGregorianCalendar"
+ type="javax.xml.datatype.XMLGregorianCalendar"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<method name="add"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="duration" type="javax.xml.datatype.Duration">
+</parameter>
+</method>
+<method name="clear"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="clone"
+ return="java.lang.Object"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="compare"
+ return="int"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="xmlGregorianCalendar" type="javax.xml.datatype.XMLGregorianCalendar">
+</parameter>
+</method>
+<method name="getDay"
+ return="int"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getEon"
+ return="java.math.BigInteger"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getEonAndYear"
+ return="java.math.BigInteger"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getFractionalSecond"
+ return="java.math.BigDecimal"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getHour"
+ return="int"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getMillisecond"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getMinute"
+ return="int"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getMonth"
+ return="int"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getSecond"
+ return="int"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getTimeZone"
+ return="java.util.TimeZone"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="defaultZoneoffset" type="int">
+</parameter>
+</method>
+<method name="getTimezone"
+ return="int"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getXMLSchemaType"
+ return="javax.xml.namespace.QName"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getYear"
+ return="int"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isValid"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="normalize"
+ return="javax.xml.datatype.XMLGregorianCalendar"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="reset"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="setDay"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="day" type="int">
+</parameter>
+</method>
+<method name="setFractionalSecond"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="fractional" type="java.math.BigDecimal">
+</parameter>
+</method>
+<method name="setHour"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="hour" type="int">
+</parameter>
+</method>
+<method name="setMillisecond"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="millisecond" type="int">
+</parameter>
+</method>
+<method name="setMinute"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="minute" type="int">
+</parameter>
+</method>
+<method name="setMonth"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="month" type="int">
+</parameter>
+</method>
+<method name="setSecond"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="second" type="int">
+</parameter>
+</method>
+<method name="setTime"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="hour" type="int">
+</parameter>
+<parameter name="minute" type="int">
+</parameter>
+<parameter name="second" type="int">
+</parameter>
+</method>
+<method name="setTime"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="hour" type="int">
+</parameter>
+<parameter name="minute" type="int">
+</parameter>
+<parameter name="second" type="int">
+</parameter>
+<parameter name="fractional" type="java.math.BigDecimal">
+</parameter>
+</method>
+<method name="setTime"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="hour" type="int">
+</parameter>
+<parameter name="minute" type="int">
+</parameter>
+<parameter name="second" type="int">
+</parameter>
+<parameter name="millisecond" type="int">
+</parameter>
+</method>
+<method name="setTimezone"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="offset" type="int">
+</parameter>
+</method>
+<method name="setYear"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="year" type="java.math.BigInteger">
+</parameter>
+</method>
+<method name="setYear"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="year" type="int">
+</parameter>
+</method>
+<method name="toGregorianCalendar"
+ return="java.util.GregorianCalendar"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="toGregorianCalendar"
+ return="java.util.GregorianCalendar"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="timezone" type="java.util.TimeZone">
+</parameter>
+<parameter name="aLocale" type="java.util.Locale">
+</parameter>
+<parameter name="defaults" type="javax.xml.datatype.XMLGregorianCalendar">
+</parameter>
+</method>
+<method name="toXMLFormat"
+ return="java.lang.String"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+</class>
+</package>
+<package name="javax.xml.namespace"
+>
+<interface name="NamespaceContext"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="getNamespaceURI"
+ return="java.lang.String"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="prefix" type="java.lang.String">
+</parameter>
+</method>
+<method name="getPrefix"
+ return="java.lang.String"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="namespaceURI" type="java.lang.String">
+</parameter>
+</method>
+<method name="getPrefixes"
+ return="java.util.Iterator"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="namespaceURI" type="java.lang.String">
+</parameter>
+</method>
+</interface>
+<class name="QName"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="java.io.Serializable">
+</implements>
+<constructor name="QName"
+ type="javax.xml.namespace.QName"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="namespaceURI" type="java.lang.String">
+</parameter>
+<parameter name="localPart" type="java.lang.String">
+</parameter>
+</constructor>
+<constructor name="QName"
+ type="javax.xml.namespace.QName"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="namespaceURI" type="java.lang.String">
+</parameter>
+<parameter name="localPart" type="java.lang.String">
+</parameter>
+<parameter name="prefix" type="java.lang.String">
+</parameter>
+</constructor>
+<constructor name="QName"
+ type="javax.xml.namespace.QName"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="localPart" type="java.lang.String">
+</parameter>
+</constructor>
+<method name="equals"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="objectToTest" type="java.lang.Object">
+</parameter>
+</method>
+<method name="getLocalPart"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getNamespaceURI"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getPrefix"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="hashCode"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="valueOf"
+ return="javax.xml.namespace.QName"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="qNameAsString" type="java.lang.String">
+</parameter>
+</method>
+</class>
+</package>
+<package name="javax.xml.parsers"
+>
+<class name="DocumentBuilder"
+ extends="java.lang.Object"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="DocumentBuilder"
+ type="javax.xml.parsers.DocumentBuilder"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</constructor>
+<method name="getDOMImplementation"
+ return="org.w3c.dom.DOMImplementation"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getSchema"
+ return="javax.xml.validation.Schema"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isNamespaceAware"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isValidating"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isXIncludeAware"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="newDocument"
+ return="org.w3c.dom.Document"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="parse"
+ return="org.w3c.dom.Document"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="is" type="java.io.InputStream">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+<exception name="SAXException" type="org.xml.sax.SAXException">
+</exception>
+</method>
+<method name="parse"
+ return="org.w3c.dom.Document"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="is" type="java.io.InputStream">
+</parameter>
+<parameter name="systemId" type="java.lang.String">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+<exception name="SAXException" type="org.xml.sax.SAXException">
+</exception>
+</method>
+<method name="parse"
+ return="org.w3c.dom.Document"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="uri" type="java.lang.String">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+<exception name="SAXException" type="org.xml.sax.SAXException">
+</exception>
+</method>
+<method name="parse"
+ return="org.w3c.dom.Document"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="f" type="java.io.File">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+<exception name="SAXException" type="org.xml.sax.SAXException">
+</exception>
+</method>
+<method name="parse"
+ return="org.w3c.dom.Document"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="is" type="org.xml.sax.InputSource">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+<exception name="SAXException" type="org.xml.sax.SAXException">
+</exception>
+</method>
+<method name="reset"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="setEntityResolver"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="er" type="org.xml.sax.EntityResolver">
+</parameter>
+</method>
+<method name="setErrorHandler"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="eh" type="org.xml.sax.ErrorHandler">
+</parameter>
+</method>
+</class>
+<class name="DocumentBuilderFactory"
+ extends="java.lang.Object"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="DocumentBuilderFactory"
+ type="javax.xml.parsers.DocumentBuilderFactory"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</constructor>
+<method name="getAttribute"
+ return="java.lang.Object"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+<exception name="IllegalArgumentException" type="java.lang.IllegalArgumentException">
+</exception>
+</method>
+<method name="getFeature"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+<exception name="ParserConfigurationException" type="javax.xml.parsers.ParserConfigurationException">
+</exception>
+</method>
+<method name="getSchema"
+ return="javax.xml.validation.Schema"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isCoalescing"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isExpandEntityReferences"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isIgnoringComments"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isIgnoringElementContentWhitespace"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isNamespaceAware"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isValidating"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isXIncludeAware"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="newDocumentBuilder"
+ return="javax.xml.parsers.DocumentBuilder"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="ParserConfigurationException" type="javax.xml.parsers.ParserConfigurationException">
+</exception>
+</method>
+<method name="newInstance"
+ return="javax.xml.parsers.DocumentBuilderFactory"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="setAttribute"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+<parameter name="value" type="java.lang.Object">
+</parameter>
+<exception name="IllegalArgumentException" type="java.lang.IllegalArgumentException">
+</exception>
+</method>
+<method name="setCoalescing"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="coalescing" type="boolean">
+</parameter>
+</method>
+<method name="setExpandEntityReferences"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="expandEntityRef" type="boolean">
+</parameter>
+</method>
+<method name="setFeature"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+<parameter name="value" type="boolean">
+</parameter>
+<exception name="ParserConfigurationException" type="javax.xml.parsers.ParserConfigurationException">
+</exception>
+</method>
+<method name="setIgnoringComments"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="ignoreComments" type="boolean">
+</parameter>
+</method>
+<method name="setIgnoringElementContentWhitespace"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="whitespace" type="boolean">
+</parameter>
+</method>
+<method name="setNamespaceAware"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="awareness" type="boolean">
+</parameter>
+</method>
+<method name="setSchema"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="schema" type="javax.xml.validation.Schema">
+</parameter>
+</method>
+<method name="setValidating"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="validating" type="boolean">
+</parameter>
+</method>
+<method name="setXIncludeAware"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="state" type="boolean">
+</parameter>
+</method>
+</class>
+<class name="FactoryConfigurationError"
+ extends="java.lang.Error"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="FactoryConfigurationError"
+ type="javax.xml.parsers.FactoryConfigurationError"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<constructor name="FactoryConfigurationError"
+ type="javax.xml.parsers.FactoryConfigurationError"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="msg" type="java.lang.String">
+</parameter>
+</constructor>
+<constructor name="FactoryConfigurationError"
+ type="javax.xml.parsers.FactoryConfigurationError"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="e" type="java.lang.Exception">
+</parameter>
+</constructor>
+<constructor name="FactoryConfigurationError"
+ type="javax.xml.parsers.FactoryConfigurationError"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="e" type="java.lang.Exception">
+</parameter>
+<parameter name="msg" type="java.lang.String">
+</parameter>
+</constructor>
+<method name="getException"
+ return="java.lang.Exception"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+</class>
+<class name="ParserConfigurationException"
+ extends="java.lang.Exception"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="ParserConfigurationException"
+ type="javax.xml.parsers.ParserConfigurationException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<constructor name="ParserConfigurationException"
+ type="javax.xml.parsers.ParserConfigurationException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="msg" type="java.lang.String">
+</parameter>
+</constructor>
+</class>
+<class name="SAXParser"
+ extends="java.lang.Object"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="SAXParser"
+ type="javax.xml.parsers.SAXParser"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</constructor>
+<method name="getParser"
+ return="org.xml.sax.Parser"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="SAXException" type="org.xml.sax.SAXException">
+</exception>
+</method>
+<method name="getProperty"
+ return="java.lang.Object"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+<exception name="SAXNotRecognizedException" type="org.xml.sax.SAXNotRecognizedException">
+</exception>
+<exception name="SAXNotSupportedException" type="org.xml.sax.SAXNotSupportedException">
+</exception>
+</method>
+<method name="getSchema"
+ return="javax.xml.validation.Schema"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getXMLReader"
+ return="org.xml.sax.XMLReader"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="SAXException" type="org.xml.sax.SAXException">
+</exception>
+</method>
+<method name="isNamespaceAware"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isValidating"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isXIncludeAware"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="parse"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="is" type="java.io.InputStream">
+</parameter>
+<parameter name="hb" type="org.xml.sax.HandlerBase">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+<exception name="SAXException" type="org.xml.sax.SAXException">
+</exception>
+</method>
+<method name="parse"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="is" type="java.io.InputStream">
+</parameter>
+<parameter name="hb" type="org.xml.sax.HandlerBase">
+</parameter>
+<parameter name="systemId" type="java.lang.String">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+<exception name="SAXException" type="org.xml.sax.SAXException">
+</exception>
+</method>
+<method name="parse"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="is" type="java.io.InputStream">
+</parameter>
+<parameter name="dh" type="org.xml.sax.helpers.DefaultHandler">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+<exception name="SAXException" type="org.xml.sax.SAXException">
+</exception>
+</method>
+<method name="parse"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="is" type="java.io.InputStream">
+</parameter>
+<parameter name="dh" type="org.xml.sax.helpers.DefaultHandler">
+</parameter>
+<parameter name="systemId" type="java.lang.String">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+<exception name="SAXException" type="org.xml.sax.SAXException">
+</exception>
+</method>
+<method name="parse"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="uri" type="java.lang.String">
+</parameter>
+<parameter name="hb" type="org.xml.sax.HandlerBase">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+<exception name="SAXException" type="org.xml.sax.SAXException">
+</exception>
+</method>
+<method name="parse"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="uri" type="java.lang.String">
+</parameter>
+<parameter name="dh" type="org.xml.sax.helpers.DefaultHandler">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+<exception name="SAXException" type="org.xml.sax.SAXException">
+</exception>
+</method>
+<method name="parse"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="f" type="java.io.File">
+</parameter>
+<parameter name="hb" type="org.xml.sax.HandlerBase">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+<exception name="SAXException" type="org.xml.sax.SAXException">
+</exception>
+</method>
+<method name="parse"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="f" type="java.io.File">
+</parameter>
+<parameter name="dh" type="org.xml.sax.helpers.DefaultHandler">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+<exception name="SAXException" type="org.xml.sax.SAXException">
+</exception>
+</method>
+<method name="parse"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="is" type="org.xml.sax.InputSource">
+</parameter>
+<parameter name="hb" type="org.xml.sax.HandlerBase">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+<exception name="SAXException" type="org.xml.sax.SAXException">
+</exception>
+</method>
+<method name="parse"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="is" type="org.xml.sax.InputSource">
+</parameter>
+<parameter name="dh" type="org.xml.sax.helpers.DefaultHandler">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+<exception name="SAXException" type="org.xml.sax.SAXException">
+</exception>
+</method>
+<method name="reset"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="setProperty"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+<parameter name="value" type="java.lang.Object">
+</parameter>
+<exception name="SAXNotRecognizedException" type="org.xml.sax.SAXNotRecognizedException">
+</exception>
+<exception name="SAXNotSupportedException" type="org.xml.sax.SAXNotSupportedException">
+</exception>
+</method>
+</class>
+<class name="SAXParserFactory"
+ extends="java.lang.Object"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="SAXParserFactory"
+ type="javax.xml.parsers.SAXParserFactory"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</constructor>
+<method name="getFeature"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+<exception name="ParserConfigurationException" type="javax.xml.parsers.ParserConfigurationException">
+</exception>
+<exception name="SAXNotRecognizedException" type="org.xml.sax.SAXNotRecognizedException">
+</exception>
+<exception name="SAXNotSupportedException" type="org.xml.sax.SAXNotSupportedException">
+</exception>
+</method>
+<method name="getSchema"
+ return="javax.xml.validation.Schema"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isNamespaceAware"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isValidating"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isXIncludeAware"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="newInstance"
+ return="javax.xml.parsers.SAXParserFactory"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="newSAXParser"
+ return="javax.xml.parsers.SAXParser"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="ParserConfigurationException" type="javax.xml.parsers.ParserConfigurationException">
+</exception>
+<exception name="SAXException" type="org.xml.sax.SAXException">
+</exception>
+</method>
+<method name="setFeature"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+<parameter name="value" type="boolean">
+</parameter>
+<exception name="ParserConfigurationException" type="javax.xml.parsers.ParserConfigurationException">
+</exception>
+<exception name="SAXNotRecognizedException" type="org.xml.sax.SAXNotRecognizedException">
+</exception>
+<exception name="SAXNotSupportedException" type="org.xml.sax.SAXNotSupportedException">
+</exception>
+</method>
+<method name="setNamespaceAware"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="awareness" type="boolean">
+</parameter>
+</method>
+<method name="setSchema"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="schema" type="javax.xml.validation.Schema">
+</parameter>
+</method>
+<method name="setValidating"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="validating" type="boolean">
+</parameter>
+</method>
+<method name="setXIncludeAware"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="state" type="boolean">
+</parameter>
+</method>
+</class>
+</package>
+<package name="javax.xml.transform"
+>
+<interface name="ErrorListener"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="error"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="exception" type="javax.xml.transform.TransformerException">
+</parameter>
+<exception name="TransformerException" type="javax.xml.transform.TransformerException">
+</exception>
+</method>
+<method name="fatalError"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="exception" type="javax.xml.transform.TransformerException">
+</parameter>
+<exception name="TransformerException" type="javax.xml.transform.TransformerException">
+</exception>
+</method>
+<method name="warning"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="exception" type="javax.xml.transform.TransformerException">
+</parameter>
+<exception name="TransformerException" type="javax.xml.transform.TransformerException">
+</exception>
+</method>
+</interface>
+<class name="OutputKeys"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<field name="CDATA_SECTION_ELEMENTS"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;cdata-section-elements&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="DOCTYPE_PUBLIC"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;doctype-public&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="DOCTYPE_SYSTEM"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;doctype-system&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ENCODING"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;encoding&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="INDENT"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;indent&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="MEDIA_TYPE"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;media-type&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="METHOD"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;method&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="OMIT_XML_DECLARATION"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;omit-xml-declaration&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="STANDALONE"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;standalone&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="VERSION"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;version&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<interface name="Result"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="getSystemId"
+ return="java.lang.String"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="setSystemId"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="systemId" type="java.lang.String">
+</parameter>
+</method>
+<field name="PI_DISABLE_OUTPUT_ESCAPING"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;javax.xml.transform.disable-output-escaping&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="PI_ENABLE_OUTPUT_ESCAPING"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;javax.xml.transform.enable-output-escaping&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</interface>
+<interface name="Source"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="getSystemId"
+ return="java.lang.String"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="setSystemId"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="systemId" type="java.lang.String">
+</parameter>
+</method>
+</interface>
+<interface name="SourceLocator"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="getColumnNumber"
+ return="int"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getLineNumber"
+ return="int"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getPublicId"
+ return="java.lang.String"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getSystemId"
+ return="java.lang.String"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+</interface>
+<interface name="Templates"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="getOutputProperties"
+ return="java.util.Properties"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="newTransformer"
+ return="javax.xml.transform.Transformer"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="TransformerConfigurationException" type="javax.xml.transform.TransformerConfigurationException">
+</exception>
+</method>
+</interface>
+<class name="Transformer"
+ extends="java.lang.Object"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="Transformer"
+ type="javax.xml.transform.Transformer"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</constructor>
+<method name="clearParameters"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getErrorListener"
+ return="javax.xml.transform.ErrorListener"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getOutputProperties"
+ return="java.util.Properties"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getOutputProperty"
+ return="java.lang.String"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+<exception name="IllegalArgumentException" type="java.lang.IllegalArgumentException">
+</exception>
+</method>
+<method name="getParameter"
+ return="java.lang.Object"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+</method>
+<method name="getURIResolver"
+ return="javax.xml.transform.URIResolver"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="reset"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="setErrorListener"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="listener" type="javax.xml.transform.ErrorListener">
+</parameter>
+<exception name="IllegalArgumentException" type="java.lang.IllegalArgumentException">
+</exception>
+</method>
+<method name="setOutputProperties"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="oformat" type="java.util.Properties">
+</parameter>
+</method>
+<method name="setOutputProperty"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+<parameter name="value" type="java.lang.String">
+</parameter>
+<exception name="IllegalArgumentException" type="java.lang.IllegalArgumentException">
+</exception>
+</method>
+<method name="setParameter"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+<parameter name="value" type="java.lang.Object">
+</parameter>
+</method>
+<method name="setURIResolver"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="resolver" type="javax.xml.transform.URIResolver">
+</parameter>
+</method>
+<method name="transform"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="xmlSource" type="javax.xml.transform.Source">
+</parameter>
+<parameter name="outputTarget" type="javax.xml.transform.Result">
+</parameter>
+<exception name="TransformerException" type="javax.xml.transform.TransformerException">
+</exception>
+</method>
+</class>
+<class name="TransformerConfigurationException"
+ extends="javax.xml.transform.TransformerException"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="TransformerConfigurationException"
+ type="javax.xml.transform.TransformerConfigurationException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<constructor name="TransformerConfigurationException"
+ type="javax.xml.transform.TransformerConfigurationException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="msg" type="java.lang.String">
+</parameter>
+</constructor>
+<constructor name="TransformerConfigurationException"
+ type="javax.xml.transform.TransformerConfigurationException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="e" type="java.lang.Throwable">
+</parameter>
+</constructor>
+<constructor name="TransformerConfigurationException"
+ type="javax.xml.transform.TransformerConfigurationException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="msg" type="java.lang.String">
+</parameter>
+<parameter name="e" type="java.lang.Throwable">
+</parameter>
+</constructor>
+<constructor name="TransformerConfigurationException"
+ type="javax.xml.transform.TransformerConfigurationException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="message" type="java.lang.String">
+</parameter>
+<parameter name="locator" type="javax.xml.transform.SourceLocator">
+</parameter>
+</constructor>
+<constructor name="TransformerConfigurationException"
+ type="javax.xml.transform.TransformerConfigurationException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="message" type="java.lang.String">
+</parameter>
+<parameter name="locator" type="javax.xml.transform.SourceLocator">
+</parameter>
+<parameter name="e" type="java.lang.Throwable">
+</parameter>
+</constructor>
+</class>
+<class name="TransformerException"
+ extends="java.lang.Exception"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="TransformerException"
+ type="javax.xml.transform.TransformerException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="message" type="java.lang.String">
+</parameter>
+</constructor>
+<constructor name="TransformerException"
+ type="javax.xml.transform.TransformerException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="e" type="java.lang.Throwable">
+</parameter>
+</constructor>
+<constructor name="TransformerException"
+ type="javax.xml.transform.TransformerException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="message" type="java.lang.String">
+</parameter>
+<parameter name="e" type="java.lang.Throwable">
+</parameter>
+</constructor>
+<constructor name="TransformerException"
+ type="javax.xml.transform.TransformerException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="message" type="java.lang.String">
+</parameter>
+<parameter name="locator" type="javax.xml.transform.SourceLocator">
+</parameter>
+</constructor>
+<constructor name="TransformerException"
+ type="javax.xml.transform.TransformerException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="message" type="java.lang.String">
+</parameter>
+<parameter name="locator" type="javax.xml.transform.SourceLocator">
+</parameter>
+<parameter name="e" type="java.lang.Throwable">
+</parameter>
+</constructor>
+<method name="getException"
+ return="java.lang.Throwable"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getLocationAsString"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getLocator"
+ return="javax.xml.transform.SourceLocator"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getMessageAndLocation"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="setLocator"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="location" type="javax.xml.transform.SourceLocator">
+</parameter>
+</method>
+</class>
+<class name="TransformerFactory"
+ extends="java.lang.Object"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="TransformerFactory"
+ type="javax.xml.transform.TransformerFactory"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</constructor>
+<method name="getAssociatedStylesheet"
+ return="javax.xml.transform.Source"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="source" type="javax.xml.transform.Source">
+</parameter>
+<parameter name="media" type="java.lang.String">
+</parameter>
+<parameter name="title" type="java.lang.String">
+</parameter>
+<parameter name="charset" type="java.lang.String">
+</parameter>
+<exception name="TransformerConfigurationException" type="javax.xml.transform.TransformerConfigurationException">
+</exception>
+</method>
+<method name="getAttribute"
+ return="java.lang.Object"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+</method>
+<method name="getErrorListener"
+ return="javax.xml.transform.ErrorListener"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getFeature"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+</method>
+<method name="getURIResolver"
+ return="javax.xml.transform.URIResolver"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="newInstance"
+ return="javax.xml.transform.TransformerFactory"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="TransformerFactoryConfigurationError" type="javax.xml.transform.TransformerFactoryConfigurationError">
+</exception>
+</method>
+<method name="newTemplates"
+ return="javax.xml.transform.Templates"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="source" type="javax.xml.transform.Source">
+</parameter>
+<exception name="TransformerConfigurationException" type="javax.xml.transform.TransformerConfigurationException">
+</exception>
+</method>
+<method name="newTransformer"
+ return="javax.xml.transform.Transformer"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="source" type="javax.xml.transform.Source">
+</parameter>
+<exception name="TransformerConfigurationException" type="javax.xml.transform.TransformerConfigurationException">
+</exception>
+</method>
+<method name="newTransformer"
+ return="javax.xml.transform.Transformer"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="TransformerConfigurationException" type="javax.xml.transform.TransformerConfigurationException">
+</exception>
+</method>
+<method name="setAttribute"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+<parameter name="value" type="java.lang.Object">
+</parameter>
+</method>
+<method name="setErrorListener"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="listener" type="javax.xml.transform.ErrorListener">
+</parameter>
+</method>
+<method name="setFeature"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+<parameter name="value" type="boolean">
+</parameter>
+<exception name="TransformerConfigurationException" type="javax.xml.transform.TransformerConfigurationException">
+</exception>
+</method>
+<method name="setURIResolver"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="resolver" type="javax.xml.transform.URIResolver">
+</parameter>
+</method>
+</class>
+<class name="TransformerFactoryConfigurationError"
+ extends="java.lang.Error"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="TransformerFactoryConfigurationError"
+ type="javax.xml.transform.TransformerFactoryConfigurationError"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<constructor name="TransformerFactoryConfigurationError"
+ type="javax.xml.transform.TransformerFactoryConfigurationError"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="msg" type="java.lang.String">
+</parameter>
+</constructor>
+<constructor name="TransformerFactoryConfigurationError"
+ type="javax.xml.transform.TransformerFactoryConfigurationError"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="e" type="java.lang.Exception">
+</parameter>
+</constructor>
+<constructor name="TransformerFactoryConfigurationError"
+ type="javax.xml.transform.TransformerFactoryConfigurationError"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="e" type="java.lang.Exception">
+</parameter>
+<parameter name="msg" type="java.lang.String">
+</parameter>
+</constructor>
+<method name="getException"
+ return="java.lang.Exception"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+</class>
+<interface name="URIResolver"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="resolve"
+ return="javax.xml.transform.Source"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="href" type="java.lang.String">
+</parameter>
+<parameter name="base" type="java.lang.String">
+</parameter>
+<exception name="TransformerException" type="javax.xml.transform.TransformerException">
+</exception>
+</method>
+</interface>
+</package>
+<package name="javax.xml.transform.dom"
+>
+<interface name="DOMLocator"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="javax.xml.transform.SourceLocator">
+</implements>
+<method name="getOriginatingNode"
+ return="org.w3c.dom.Node"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+</interface>
+<class name="DOMResult"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="javax.xml.transform.Result">
+</implements>
+<constructor name="DOMResult"
+ type="javax.xml.transform.dom.DOMResult"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<constructor name="DOMResult"
+ type="javax.xml.transform.dom.DOMResult"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="node" type="org.w3c.dom.Node">
+</parameter>
+</constructor>
+<constructor name="DOMResult"
+ type="javax.xml.transform.dom.DOMResult"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="node" type="org.w3c.dom.Node">
+</parameter>
+<parameter name="systemId" type="java.lang.String">
+</parameter>
+</constructor>
+<constructor name="DOMResult"
+ type="javax.xml.transform.dom.DOMResult"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="node" type="org.w3c.dom.Node">
+</parameter>
+<parameter name="nextSibling" type="org.w3c.dom.Node">
+</parameter>
+</constructor>
+<constructor name="DOMResult"
+ type="javax.xml.transform.dom.DOMResult"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="node" type="org.w3c.dom.Node">
+</parameter>
+<parameter name="nextSibling" type="org.w3c.dom.Node">
+</parameter>
+<parameter name="systemId" type="java.lang.String">
+</parameter>
+</constructor>
+<method name="getNextSibling"
+ return="org.w3c.dom.Node"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getNode"
+ return="org.w3c.dom.Node"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getSystemId"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="setNextSibling"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="nextSibling" type="org.w3c.dom.Node">
+</parameter>
+</method>
+<method name="setNode"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="node" type="org.w3c.dom.Node">
+</parameter>
+</method>
+<method name="setSystemId"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="systemId" type="java.lang.String">
+</parameter>
+</method>
+<field name="FEATURE"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;http://javax.xml.transform.dom.DOMResult/feature&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<class name="DOMSource"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="javax.xml.transform.Source">
+</implements>
+<constructor name="DOMSource"
+ type="javax.xml.transform.dom.DOMSource"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<constructor name="DOMSource"
+ type="javax.xml.transform.dom.DOMSource"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="n" type="org.w3c.dom.Node">
+</parameter>
+</constructor>
+<constructor name="DOMSource"
+ type="javax.xml.transform.dom.DOMSource"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="node" type="org.w3c.dom.Node">
+</parameter>
+<parameter name="systemID" type="java.lang.String">
+</parameter>
+</constructor>
+<method name="getNode"
+ return="org.w3c.dom.Node"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getSystemId"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="setNode"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="node" type="org.w3c.dom.Node">
+</parameter>
+</method>
+<method name="setSystemId"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="systemID" type="java.lang.String">
+</parameter>
+</method>
+<field name="FEATURE"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;http://javax.xml.transform.dom.DOMSource/feature&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+</package>
+<package name="javax.xml.transform.sax"
+>
+<class name="SAXResult"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="javax.xml.transform.Result">
+</implements>
+<constructor name="SAXResult"
+ type="javax.xml.transform.sax.SAXResult"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<constructor name="SAXResult"
+ type="javax.xml.transform.sax.SAXResult"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="handler" type="org.xml.sax.ContentHandler">
+</parameter>
+</constructor>
+<method name="getHandler"
+ return="org.xml.sax.ContentHandler"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getLexicalHandler"
+ return="org.xml.sax.ext.LexicalHandler"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getSystemId"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="setHandler"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="handler" type="org.xml.sax.ContentHandler">
+</parameter>
+</method>
+<method name="setLexicalHandler"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="handler" type="org.xml.sax.ext.LexicalHandler">
+</parameter>
+</method>
+<method name="setSystemId"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="systemId" type="java.lang.String">
+</parameter>
+</method>
+<field name="FEATURE"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;http://javax.xml.transform.sax.SAXResult/feature&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<class name="SAXSource"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="javax.xml.transform.Source">
+</implements>
+<constructor name="SAXSource"
+ type="javax.xml.transform.sax.SAXSource"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<constructor name="SAXSource"
+ type="javax.xml.transform.sax.SAXSource"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="reader" type="org.xml.sax.XMLReader">
+</parameter>
+<parameter name="inputSource" type="org.xml.sax.InputSource">
+</parameter>
+</constructor>
+<constructor name="SAXSource"
+ type="javax.xml.transform.sax.SAXSource"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="inputSource" type="org.xml.sax.InputSource">
+</parameter>
+</constructor>
+<method name="getInputSource"
+ return="org.xml.sax.InputSource"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getSystemId"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getXMLReader"
+ return="org.xml.sax.XMLReader"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="setInputSource"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="inputSource" type="org.xml.sax.InputSource">
+</parameter>
+</method>
+<method name="setSystemId"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="systemId" type="java.lang.String">
+</parameter>
+</method>
+<method name="setXMLReader"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="reader" type="org.xml.sax.XMLReader">
+</parameter>
+</method>
+<method name="sourceToInputSource"
+ return="org.xml.sax.InputSource"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="source" type="javax.xml.transform.Source">
+</parameter>
+</method>
+<field name="FEATURE"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;http://javax.xml.transform.sax.SAXSource/feature&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<class name="SAXTransformerFactory"
+ extends="javax.xml.transform.TransformerFactory"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="SAXTransformerFactory"
+ type="javax.xml.transform.sax.SAXTransformerFactory"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</constructor>
+<method name="newTemplatesHandler"
+ return="javax.xml.transform.sax.TemplatesHandler"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="TransformerConfigurationException" type="javax.xml.transform.TransformerConfigurationException">
+</exception>
+</method>
+<method name="newTransformerHandler"
+ return="javax.xml.transform.sax.TransformerHandler"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="src" type="javax.xml.transform.Source">
+</parameter>
+<exception name="TransformerConfigurationException" type="javax.xml.transform.TransformerConfigurationException">
+</exception>
+</method>
+<method name="newTransformerHandler"
+ return="javax.xml.transform.sax.TransformerHandler"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="templates" type="javax.xml.transform.Templates">
+</parameter>
+<exception name="TransformerConfigurationException" type="javax.xml.transform.TransformerConfigurationException">
+</exception>
+</method>
+<method name="newTransformerHandler"
+ return="javax.xml.transform.sax.TransformerHandler"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="TransformerConfigurationException" type="javax.xml.transform.TransformerConfigurationException">
+</exception>
+</method>
+<method name="newXMLFilter"
+ return="org.xml.sax.XMLFilter"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="src" type="javax.xml.transform.Source">
+</parameter>
+<exception name="TransformerConfigurationException" type="javax.xml.transform.TransformerConfigurationException">
+</exception>
+</method>
+<method name="newXMLFilter"
+ return="org.xml.sax.XMLFilter"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="templates" type="javax.xml.transform.Templates">
+</parameter>
+<exception name="TransformerConfigurationException" type="javax.xml.transform.TransformerConfigurationException">
+</exception>
+</method>
+<field name="FEATURE"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;http://javax.xml.transform.sax.SAXTransformerFactory/feature&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="FEATURE_XMLFILTER"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;http://javax.xml.transform.sax.SAXTransformerFactory/feature/xmlfilter&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<interface name="TemplatesHandler"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="org.xml.sax.ContentHandler">
+</implements>
+<method name="getSystemId"
+ return="java.lang.String"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getTemplates"
+ return="javax.xml.transform.Templates"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="setSystemId"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="systemID" type="java.lang.String">
+</parameter>
+</method>
+</interface>
+<interface name="TransformerHandler"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="org.xml.sax.ContentHandler">
+</implements>
+<implements name="org.xml.sax.DTDHandler">
+</implements>
+<implements name="org.xml.sax.ext.LexicalHandler">
+</implements>
+<method name="getSystemId"
+ return="java.lang.String"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getTransformer"
+ return="javax.xml.transform.Transformer"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="setResult"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="result" type="javax.xml.transform.Result">
+</parameter>
+<exception name="IllegalArgumentException" type="java.lang.IllegalArgumentException">
+</exception>
+</method>
+<method name="setSystemId"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="systemID" type="java.lang.String">
+</parameter>
+</method>
+</interface>
+</package>
+<package name="javax.xml.transform.stream"
+>
+<class name="StreamResult"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="javax.xml.transform.Result">
+</implements>
+<constructor name="StreamResult"
+ type="javax.xml.transform.stream.StreamResult"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<constructor name="StreamResult"
+ type="javax.xml.transform.stream.StreamResult"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="outputStream" type="java.io.OutputStream">
+</parameter>
+</constructor>
+<constructor name="StreamResult"
+ type="javax.xml.transform.stream.StreamResult"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="writer" type="java.io.Writer">
+</parameter>
+</constructor>
+<constructor name="StreamResult"
+ type="javax.xml.transform.stream.StreamResult"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="systemId" type="java.lang.String">
+</parameter>
+</constructor>
+<constructor name="StreamResult"
+ type="javax.xml.transform.stream.StreamResult"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="f" type="java.io.File">
+</parameter>
+</constructor>
+<method name="getOutputStream"
+ return="java.io.OutputStream"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getSystemId"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getWriter"
+ return="java.io.Writer"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="setOutputStream"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="outputStream" type="java.io.OutputStream">
+</parameter>
+</method>
+<method name="setSystemId"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="systemId" type="java.lang.String">
+</parameter>
+</method>
+<method name="setSystemId"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="f" type="java.io.File">
+</parameter>
+</method>
+<method name="setWriter"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="writer" type="java.io.Writer">
+</parameter>
+</method>
+<field name="FEATURE"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;http://javax.xml.transform.stream.StreamResult/feature&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<class name="StreamSource"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="javax.xml.transform.Source">
+</implements>
+<constructor name="StreamSource"
+ type="javax.xml.transform.stream.StreamSource"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<constructor name="StreamSource"
+ type="javax.xml.transform.stream.StreamSource"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="inputStream" type="java.io.InputStream">
+</parameter>
+</constructor>
+<constructor name="StreamSource"
+ type="javax.xml.transform.stream.StreamSource"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="inputStream" type="java.io.InputStream">
+</parameter>
+<parameter name="systemId" type="java.lang.String">
+</parameter>
+</constructor>
+<constructor name="StreamSource"
+ type="javax.xml.transform.stream.StreamSource"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="reader" type="java.io.Reader">
+</parameter>
+</constructor>
+<constructor name="StreamSource"
+ type="javax.xml.transform.stream.StreamSource"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="reader" type="java.io.Reader">
+</parameter>
+<parameter name="systemId" type="java.lang.String">
+</parameter>
+</constructor>
+<constructor name="StreamSource"
+ type="javax.xml.transform.stream.StreamSource"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="systemId" type="java.lang.String">
+</parameter>
+</constructor>
+<constructor name="StreamSource"
+ type="javax.xml.transform.stream.StreamSource"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="f" type="java.io.File">
+</parameter>
+</constructor>
+<method name="getInputStream"
+ return="java.io.InputStream"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getPublicId"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getReader"
+ return="java.io.Reader"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getSystemId"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="setInputStream"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="inputStream" type="java.io.InputStream">
+</parameter>
+</method>
+<method name="setPublicId"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="publicId" type="java.lang.String">
+</parameter>
+</method>
+<method name="setReader"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="reader" type="java.io.Reader">
+</parameter>
+</method>
+<method name="setSystemId"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="systemId" type="java.lang.String">
+</parameter>
+</method>
+<method name="setSystemId"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="f" type="java.io.File">
+</parameter>
+</method>
+<field name="FEATURE"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;http://javax.xml.transform.stream.StreamSource/feature&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+</package>
+<package name="javax.xml.validation"
+>
+<class name="Schema"
+ extends="java.lang.Object"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="Schema"
+ type="javax.xml.validation.Schema"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</constructor>
+<method name="newValidator"
+ return="javax.xml.validation.Validator"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="newValidatorHandler"
+ return="javax.xml.validation.ValidatorHandler"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+</class>
+<class name="SchemaFactory"
+ extends="java.lang.Object"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="SchemaFactory"
+ type="javax.xml.validation.SchemaFactory"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</constructor>
+<method name="getErrorHandler"
+ return="org.xml.sax.ErrorHandler"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getFeature"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+<exception name="SAXNotRecognizedException" type="org.xml.sax.SAXNotRecognizedException">
+</exception>
+<exception name="SAXNotSupportedException" type="org.xml.sax.SAXNotSupportedException">
+</exception>
+</method>
+<method name="getProperty"
+ return="java.lang.Object"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+<exception name="SAXNotRecognizedException" type="org.xml.sax.SAXNotRecognizedException">
+</exception>
+<exception name="SAXNotSupportedException" type="org.xml.sax.SAXNotSupportedException">
+</exception>
+</method>
+<method name="getResourceResolver"
+ return="org.w3c.dom.ls.LSResourceResolver"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isSchemaLanguageSupported"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="schemaLanguage" type="java.lang.String">
+</parameter>
+</method>
+<method name="newInstance"
+ return="javax.xml.validation.SchemaFactory"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="schemaLanguage" type="java.lang.String">
+</parameter>
+</method>
+<method name="newSchema"
+ return="javax.xml.validation.Schema"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="schema" type="javax.xml.transform.Source">
+</parameter>
+<exception name="SAXException" type="org.xml.sax.SAXException">
+</exception>
+</method>
+<method name="newSchema"
+ return="javax.xml.validation.Schema"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="schema" type="java.io.File">
+</parameter>
+<exception name="SAXException" type="org.xml.sax.SAXException">
+</exception>
+</method>
+<method name="newSchema"
+ return="javax.xml.validation.Schema"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="schema" type="java.net.URL">
+</parameter>
+<exception name="SAXException" type="org.xml.sax.SAXException">
+</exception>
+</method>
+<method name="newSchema"
+ return="javax.xml.validation.Schema"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="schemas" type="javax.xml.transform.Source[]">
+</parameter>
+<exception name="SAXException" type="org.xml.sax.SAXException">
+</exception>
+</method>
+<method name="newSchema"
+ return="javax.xml.validation.Schema"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="SAXException" type="org.xml.sax.SAXException">
+</exception>
+</method>
+<method name="setErrorHandler"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="errorHandler" type="org.xml.sax.ErrorHandler">
+</parameter>
+</method>
+<method name="setFeature"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+<parameter name="value" type="boolean">
+</parameter>
+<exception name="SAXNotRecognizedException" type="org.xml.sax.SAXNotRecognizedException">
+</exception>
+<exception name="SAXNotSupportedException" type="org.xml.sax.SAXNotSupportedException">
+</exception>
+</method>
+<method name="setProperty"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+<parameter name="object" type="java.lang.Object">
+</parameter>
+<exception name="SAXNotRecognizedException" type="org.xml.sax.SAXNotRecognizedException">
+</exception>
+<exception name="SAXNotSupportedException" type="org.xml.sax.SAXNotSupportedException">
+</exception>
+</method>
+<method name="setResourceResolver"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="resourceResolver" type="org.w3c.dom.ls.LSResourceResolver">
+</parameter>
+</method>
+</class>
+<class name="SchemaFactoryLoader"
+ extends="java.lang.Object"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="SchemaFactoryLoader"
+ type="javax.xml.validation.SchemaFactoryLoader"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</constructor>
+<method name="newFactory"
+ return="javax.xml.validation.SchemaFactory"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="schemaLanguage" type="java.lang.String">
+</parameter>
+</method>
+</class>
+<class name="TypeInfoProvider"
+ extends="java.lang.Object"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="TypeInfoProvider"
+ type="javax.xml.validation.TypeInfoProvider"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</constructor>
+<method name="getAttributeTypeInfo"
+ return="org.w3c.dom.TypeInfo"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="index" type="int">
+</parameter>
+</method>
+<method name="getElementTypeInfo"
+ return="org.w3c.dom.TypeInfo"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isIdAttribute"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="index" type="int">
+</parameter>
+</method>
+<method name="isSpecified"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="index" type="int">
+</parameter>
+</method>
+</class>
+<class name="Validator"
+ extends="java.lang.Object"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="Validator"
+ type="javax.xml.validation.Validator"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</constructor>
+<method name="getErrorHandler"
+ return="org.xml.sax.ErrorHandler"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getFeature"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+<exception name="SAXNotRecognizedException" type="org.xml.sax.SAXNotRecognizedException">
+</exception>
+<exception name="SAXNotSupportedException" type="org.xml.sax.SAXNotSupportedException">
+</exception>
+</method>
+<method name="getProperty"
+ return="java.lang.Object"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+<exception name="SAXNotRecognizedException" type="org.xml.sax.SAXNotRecognizedException">
+</exception>
+<exception name="SAXNotSupportedException" type="org.xml.sax.SAXNotSupportedException">
+</exception>
+</method>
+<method name="getResourceResolver"
+ return="org.w3c.dom.ls.LSResourceResolver"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="reset"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="setErrorHandler"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="errorHandler" type="org.xml.sax.ErrorHandler">
+</parameter>
+</method>
+<method name="setFeature"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+<parameter name="value" type="boolean">
+</parameter>
+<exception name="SAXNotRecognizedException" type="org.xml.sax.SAXNotRecognizedException">
+</exception>
+<exception name="SAXNotSupportedException" type="org.xml.sax.SAXNotSupportedException">
+</exception>
+</method>
+<method name="setProperty"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+<parameter name="object" type="java.lang.Object">
+</parameter>
+<exception name="SAXNotRecognizedException" type="org.xml.sax.SAXNotRecognizedException">
+</exception>
+<exception name="SAXNotSupportedException" type="org.xml.sax.SAXNotSupportedException">
+</exception>
+</method>
+<method name="setResourceResolver"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="resourceResolver" type="org.w3c.dom.ls.LSResourceResolver">
+</parameter>
+</method>
+<method name="validate"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="source" type="javax.xml.transform.Source">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+<exception name="SAXException" type="org.xml.sax.SAXException">
+</exception>
+</method>
+<method name="validate"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="source" type="javax.xml.transform.Source">
+</parameter>
+<parameter name="result" type="javax.xml.transform.Result">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+<exception name="SAXException" type="org.xml.sax.SAXException">
+</exception>
+</method>
+</class>
+<class name="ValidatorHandler"
+ extends="java.lang.Object"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="org.xml.sax.ContentHandler">
+</implements>
+<constructor name="ValidatorHandler"
+ type="javax.xml.validation.ValidatorHandler"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</constructor>
+<method name="getContentHandler"
+ return="org.xml.sax.ContentHandler"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getErrorHandler"
+ return="org.xml.sax.ErrorHandler"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getFeature"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+<exception name="SAXNotRecognizedException" type="org.xml.sax.SAXNotRecognizedException">
+</exception>
+<exception name="SAXNotSupportedException" type="org.xml.sax.SAXNotSupportedException">
+</exception>
+</method>
+<method name="getProperty"
+ return="java.lang.Object"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+<exception name="SAXNotRecognizedException" type="org.xml.sax.SAXNotRecognizedException">
+</exception>
+<exception name="SAXNotSupportedException" type="org.xml.sax.SAXNotSupportedException">
+</exception>
+</method>
+<method name="getResourceResolver"
+ return="org.w3c.dom.ls.LSResourceResolver"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getTypeInfoProvider"
+ return="javax.xml.validation.TypeInfoProvider"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="setContentHandler"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="receiver" type="org.xml.sax.ContentHandler">
+</parameter>
+</method>
+<method name="setErrorHandler"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="errorHandler" type="org.xml.sax.ErrorHandler">
+</parameter>
+</method>
+<method name="setFeature"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+<parameter name="value" type="boolean">
+</parameter>
+<exception name="SAXNotRecognizedException" type="org.xml.sax.SAXNotRecognizedException">
+</exception>
+<exception name="SAXNotSupportedException" type="org.xml.sax.SAXNotSupportedException">
+</exception>
+</method>
+<method name="setProperty"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+<parameter name="object" type="java.lang.Object">
+</parameter>
+<exception name="SAXNotRecognizedException" type="org.xml.sax.SAXNotRecognizedException">
+</exception>
+<exception name="SAXNotSupportedException" type="org.xml.sax.SAXNotSupportedException">
+</exception>
+</method>
+<method name="setResourceResolver"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="resourceResolver" type="org.w3c.dom.ls.LSResourceResolver">
+</parameter>
+</method>
+</class>
+</package>
+<package name="javax.xml.xpath"
+>
+<interface name="XPath"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="compile"
+ return="javax.xml.xpath.XPathExpression"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="expression" type="java.lang.String">
+</parameter>
+<exception name="XPathExpressionException" type="javax.xml.xpath.XPathExpressionException">
+</exception>
+</method>
+<method name="evaluate"
+ return="java.lang.Object"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="expression" type="java.lang.String">
+</parameter>
+<parameter name="item" type="java.lang.Object">
+</parameter>
+<parameter name="returnType" type="javax.xml.namespace.QName">
+</parameter>
+<exception name="XPathExpressionException" type="javax.xml.xpath.XPathExpressionException">
+</exception>
+</method>
+<method name="evaluate"
+ return="java.lang.String"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="expression" type="java.lang.String">
+</parameter>
+<parameter name="item" type="java.lang.Object">
+</parameter>
+<exception name="XPathExpressionException" type="javax.xml.xpath.XPathExpressionException">
+</exception>
+</method>
+<method name="evaluate"
+ return="java.lang.Object"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="expression" type="java.lang.String">
+</parameter>
+<parameter name="source" type="org.xml.sax.InputSource">
+</parameter>
+<parameter name="returnType" type="javax.xml.namespace.QName">
+</parameter>
+<exception name="XPathExpressionException" type="javax.xml.xpath.XPathExpressionException">
+</exception>
+</method>
+<method name="evaluate"
+ return="java.lang.String"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="expression" type="java.lang.String">
+</parameter>
+<parameter name="source" type="org.xml.sax.InputSource">
+</parameter>
+<exception name="XPathExpressionException" type="javax.xml.xpath.XPathExpressionException">
+</exception>
+</method>
+<method name="getNamespaceContext"
+ return="javax.xml.namespace.NamespaceContext"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getXPathFunctionResolver"
+ return="javax.xml.xpath.XPathFunctionResolver"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getXPathVariableResolver"
+ return="javax.xml.xpath.XPathVariableResolver"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="reset"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="setNamespaceContext"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="nsContext" type="javax.xml.namespace.NamespaceContext">
+</parameter>
+</method>
+<method name="setXPathFunctionResolver"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="resolver" type="javax.xml.xpath.XPathFunctionResolver">
+</parameter>
+</method>
+<method name="setXPathVariableResolver"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="resolver" type="javax.xml.xpath.XPathVariableResolver">
+</parameter>
+</method>
+</interface>
+<class name="XPathConstants"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<field name="BOOLEAN"
+ type="javax.xml.namespace.QName"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="DOM_OBJECT_MODEL"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;http://java.sun.com/jaxp/xpath/dom&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="NODE"
+ type="javax.xml.namespace.QName"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="NODESET"
+ type="javax.xml.namespace.QName"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="NUMBER"
+ type="javax.xml.namespace.QName"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="STRING"
+ type="javax.xml.namespace.QName"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<class name="XPathException"
+ extends="java.lang.Exception"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="XPathException"
+ type="javax.xml.xpath.XPathException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="message" type="java.lang.String">
+</parameter>
+</constructor>
+<constructor name="XPathException"
+ type="javax.xml.xpath.XPathException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="cause" type="java.lang.Throwable">
+</parameter>
+</constructor>
+</class>
+<interface name="XPathExpression"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="evaluate"
+ return="java.lang.Object"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="item" type="java.lang.Object">
+</parameter>
+<parameter name="returnType" type="javax.xml.namespace.QName">
+</parameter>
+<exception name="XPathExpressionException" type="javax.xml.xpath.XPathExpressionException">
+</exception>
+</method>
+<method name="evaluate"
+ return="java.lang.String"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="item" type="java.lang.Object">
+</parameter>
+<exception name="XPathExpressionException" type="javax.xml.xpath.XPathExpressionException">
+</exception>
+</method>
+<method name="evaluate"
+ return="java.lang.Object"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="source" type="org.xml.sax.InputSource">
+</parameter>
+<parameter name="returnType" type="javax.xml.namespace.QName">
+</parameter>
+<exception name="XPathExpressionException" type="javax.xml.xpath.XPathExpressionException">
+</exception>
+</method>
+<method name="evaluate"
+ return="java.lang.String"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="source" type="org.xml.sax.InputSource">
+</parameter>
+<exception name="XPathExpressionException" type="javax.xml.xpath.XPathExpressionException">
+</exception>
+</method>
+</interface>
+<class name="XPathExpressionException"
+ extends="javax.xml.xpath.XPathException"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="XPathExpressionException"
+ type="javax.xml.xpath.XPathExpressionException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="message" type="java.lang.String">
+</parameter>
+</constructor>
+<constructor name="XPathExpressionException"
+ type="javax.xml.xpath.XPathExpressionException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="cause" type="java.lang.Throwable">
+</parameter>
+</constructor>
+</class>
+<class name="XPathFactory"
+ extends="java.lang.Object"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="XPathFactory"
+ type="javax.xml.xpath.XPathFactory"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</constructor>
+<method name="getFeature"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+<exception name="XPathFactoryConfigurationException" type="javax.xml.xpath.XPathFactoryConfigurationException">
+</exception>
+</method>
+<method name="isObjectModelSupported"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="objectModel" type="java.lang.String">
+</parameter>
+</method>
+<method name="newInstance"
+ return="javax.xml.xpath.XPathFactory"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="newInstance"
+ return="javax.xml.xpath.XPathFactory"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="uri" type="java.lang.String">
+</parameter>
+<exception name="XPathFactoryConfigurationException" type="javax.xml.xpath.XPathFactoryConfigurationException">
+</exception>
+</method>
+<method name="newInstance"
+ return="javax.xml.xpath.XPathFactory"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="uri" type="java.lang.String">
+</parameter>
+<parameter name="factoryClassName" type="java.lang.String">
+</parameter>
+<parameter name="classLoader" type="java.lang.ClassLoader">
+</parameter>
+<exception name="XPathFactoryConfigurationException" type="javax.xml.xpath.XPathFactoryConfigurationException">
+</exception>
+</method>
+<method name="newXPath"
+ return="javax.xml.xpath.XPath"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="setFeature"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+<parameter name="value" type="boolean">
+</parameter>
+<exception name="XPathFactoryConfigurationException" type="javax.xml.xpath.XPathFactoryConfigurationException">
+</exception>
+</method>
+<method name="setXPathFunctionResolver"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="resolver" type="javax.xml.xpath.XPathFunctionResolver">
+</parameter>
+</method>
+<method name="setXPathVariableResolver"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="resolver" type="javax.xml.xpath.XPathVariableResolver">
+</parameter>
+</method>
+<field name="DEFAULT_OBJECT_MODEL_URI"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;http://java.sun.com/jaxp/xpath/dom&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="DEFAULT_PROPERTY_NAME"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;javax.xml.xpath.XPathFactory&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<class name="XPathFactoryConfigurationException"
+ extends="javax.xml.xpath.XPathException"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="XPathFactoryConfigurationException"
+ type="javax.xml.xpath.XPathFactoryConfigurationException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="message" type="java.lang.String">
+</parameter>
+</constructor>
+<constructor name="XPathFactoryConfigurationException"
+ type="javax.xml.xpath.XPathFactoryConfigurationException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="cause" type="java.lang.Throwable">
+</parameter>
+</constructor>
+</class>
+<interface name="XPathFunction"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="evaluate"
+ return="java.lang.Object"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="args" type="java.util.List">
+</parameter>
+<exception name="XPathFunctionException" type="javax.xml.xpath.XPathFunctionException">
+</exception>
+</method>
+</interface>
+<class name="XPathFunctionException"
+ extends="javax.xml.xpath.XPathExpressionException"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="XPathFunctionException"
+ type="javax.xml.xpath.XPathFunctionException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="message" type="java.lang.String">
+</parameter>
+</constructor>
+<constructor name="XPathFunctionException"
+ type="javax.xml.xpath.XPathFunctionException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="cause" type="java.lang.Throwable">
+</parameter>
+</constructor>
+</class>
+<interface name="XPathFunctionResolver"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="resolveFunction"
+ return="javax.xml.xpath.XPathFunction"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="functionName" type="javax.xml.namespace.QName">
+</parameter>
+<parameter name="arity" type="int">
+</parameter>
+</method>
+</interface>
+<interface name="XPathVariableResolver"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="resolveVariable"
+ return="java.lang.Object"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="variableName" type="javax.xml.namespace.QName">
+</parameter>
+</method>
+</interface>
+</package>
+<package name="junit.framework"
+>
+<class name="Assert"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="Assert"
+ type="junit.framework.Assert"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</constructor>
+<method name="assertEquals"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="message" type="java.lang.String">
+</parameter>
+<parameter name="expected" type="java.lang.Object">
+</parameter>
+<parameter name="actual" type="java.lang.Object">
+</parameter>
+</method>
+<method name="assertEquals"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="expected" type="java.lang.Object">
+</parameter>
+<parameter name="actual" type="java.lang.Object">
+</parameter>
+</method>
+<method name="assertEquals"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="message" type="java.lang.String">
+</parameter>
+<parameter name="expected" type="java.lang.String">
+</parameter>
+<parameter name="actual" type="java.lang.String">
+</parameter>
+</method>
+<method name="assertEquals"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="expected" type="java.lang.String">
+</parameter>
+<parameter name="actual" type="java.lang.String">
+</parameter>
+</method>
+<method name="assertEquals"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="message" type="java.lang.String">
+</parameter>
+<parameter name="expected" type="double">
+</parameter>
+<parameter name="actual" type="double">
+</parameter>
+<parameter name="delta" type="double">
+</parameter>
+</method>
+<method name="assertEquals"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="expected" type="double">
+</parameter>
+<parameter name="actual" type="double">
+</parameter>
+<parameter name="delta" type="double">
+</parameter>
+</method>
+<method name="assertEquals"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="message" type="java.lang.String">
+</parameter>
+<parameter name="expected" type="float">
+</parameter>
+<parameter name="actual" type="float">
+</parameter>
+<parameter name="delta" type="float">
+</parameter>
+</method>
+<method name="assertEquals"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="expected" type="float">
+</parameter>
+<parameter name="actual" type="float">
+</parameter>
+<parameter name="delta" type="float">
+</parameter>
+</method>
+<method name="assertEquals"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="message" type="java.lang.String">
+</parameter>
+<parameter name="expected" type="long">
+</parameter>
+<parameter name="actual" type="long">
+</parameter>
+</method>
+<method name="assertEquals"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="expected" type="long">
+</parameter>
+<parameter name="actual" type="long">
+</parameter>
+</method>
+<method name="assertEquals"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="message" type="java.lang.String">
+</parameter>
+<parameter name="expected" type="boolean">
+</parameter>
+<parameter name="actual" type="boolean">
+</parameter>
+</method>
+<method name="assertEquals"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="expected" type="boolean">
+</parameter>
+<parameter name="actual" type="boolean">
+</parameter>
+</method>
+<method name="assertEquals"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="message" type="java.lang.String">
+</parameter>
+<parameter name="expected" type="byte">
+</parameter>
+<parameter name="actual" type="byte">
+</parameter>
+</method>
+<method name="assertEquals"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="expected" type="byte">
+</parameter>
+<parameter name="actual" type="byte">
+</parameter>
+</method>
+<method name="assertEquals"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="message" type="java.lang.String">
+</parameter>
+<parameter name="expected" type="char">
+</parameter>
+<parameter name="actual" type="char">
+</parameter>
+</method>
+<method name="assertEquals"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="expected" type="char">
+</parameter>
+<parameter name="actual" type="char">
+</parameter>
+</method>
+<method name="assertEquals"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="message" type="java.lang.String">
+</parameter>
+<parameter name="expected" type="short">
+</parameter>
+<parameter name="actual" type="short">
+</parameter>
+</method>
+<method name="assertEquals"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="expected" type="short">
+</parameter>
+<parameter name="actual" type="short">
+</parameter>
+</method>
+<method name="assertEquals"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="message" type="java.lang.String">
+</parameter>
+<parameter name="expected" type="int">
+</parameter>
+<parameter name="actual" type="int">
+</parameter>
+</method>
+<method name="assertEquals"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="expected" type="int">
+</parameter>
+<parameter name="actual" type="int">
+</parameter>
+</method>
+<method name="assertFalse"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="message" type="java.lang.String">
+</parameter>
+<parameter name="condition" type="boolean">
+</parameter>
+</method>
+<method name="assertFalse"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="condition" type="boolean">
+</parameter>
+</method>
+<method name="assertNotNull"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="object" type="java.lang.Object">
+</parameter>
+</method>
+<method name="assertNotNull"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="message" type="java.lang.String">
+</parameter>
+<parameter name="object" type="java.lang.Object">
+</parameter>
+</method>
+<method name="assertNotSame"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="message" type="java.lang.String">
+</parameter>
+<parameter name="expected" type="java.lang.Object">
+</parameter>
+<parameter name="actual" type="java.lang.Object">
+</parameter>
+</method>
+<method name="assertNotSame"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="expected" type="java.lang.Object">
+</parameter>
+<parameter name="actual" type="java.lang.Object">
+</parameter>
+</method>
+<method name="assertNull"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="object" type="java.lang.Object">
+</parameter>
+</method>
+<method name="assertNull"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="message" type="java.lang.String">
+</parameter>
+<parameter name="object" type="java.lang.Object">
+</parameter>
+</method>
+<method name="assertSame"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="message" type="java.lang.String">
+</parameter>
+<parameter name="expected" type="java.lang.Object">
+</parameter>
+<parameter name="actual" type="java.lang.Object">
+</parameter>
+</method>
+<method name="assertSame"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="expected" type="java.lang.Object">
+</parameter>
+<parameter name="actual" type="java.lang.Object">
+</parameter>
+</method>
+<method name="assertTrue"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="message" type="java.lang.String">
+</parameter>
+<parameter name="condition" type="boolean">
+</parameter>
+</method>
+<method name="assertTrue"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="condition" type="boolean">
+</parameter>
+</method>
+<method name="fail"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="message" type="java.lang.String">
+</parameter>
+</method>
+<method name="fail"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+</class>
+<class name="AssertionFailedError"
+ extends="java.lang.Error"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="AssertionFailedError"
+ type="junit.framework.AssertionFailedError"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<constructor name="AssertionFailedError"
+ type="junit.framework.AssertionFailedError"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="message" type="java.lang.String">
+</parameter>
+</constructor>
+</class>
+<class name="ComparisonFailure"
+ extends="junit.framework.AssertionFailedError"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="ComparisonFailure"
+ type="junit.framework.ComparisonFailure"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="message" type="java.lang.String">
+</parameter>
+<parameter name="expected" type="java.lang.String">
+</parameter>
+<parameter name="actual" type="java.lang.String">
+</parameter>
+</constructor>
+</class>
+<interface name="Protectable"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="protect"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="Throwable" type="java.lang.Throwable">
+</exception>
+</method>
+</interface>
+<interface name="Test"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="countTestCases"
+ return="int"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="run"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="result" type="junit.framework.TestResult">
+</parameter>
+</method>
+</interface>
+<class name="TestCase"
+ extends="junit.framework.Assert"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="junit.framework.Test">
+</implements>
+<constructor name="TestCase"
+ type="junit.framework.TestCase"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<constructor name="TestCase"
+ type="junit.framework.TestCase"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+</constructor>
+<method name="countTestCases"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="createResult"
+ return="junit.framework.TestResult"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</method>
+<method name="getName"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="run"
+ return="junit.framework.TestResult"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="run"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="result" type="junit.framework.TestResult">
+</parameter>
+</method>
+<method name="runBare"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="Throwable" type="java.lang.Throwable">
+</exception>
+</method>
+<method name="runTest"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<exception name="Throwable" type="java.lang.Throwable">
+</exception>
+</method>
+<method name="setName"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+</method>
+<method name="setUp"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<exception name="Exception" type="java.lang.Exception">
+</exception>
+</method>
+<method name="tearDown"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<exception name="Exception" type="java.lang.Exception">
+</exception>
+</method>
+</class>
+<class name="TestFailure"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="TestFailure"
+ type="junit.framework.TestFailure"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="failedTest" type="junit.framework.Test">
+</parameter>
+<parameter name="thrownException" type="java.lang.Throwable">
+</parameter>
+</constructor>
+<method name="exceptionMessage"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="failedTest"
+ return="junit.framework.Test"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isFailure"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="thrownException"
+ return="java.lang.Throwable"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="trace"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<field name="fFailedTest"
+ type="junit.framework.Test"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</field>
+<field name="fThrownException"
+ type="java.lang.Throwable"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</field>
+</class>
+<interface name="TestListener"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="addError"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="test" type="junit.framework.Test">
+</parameter>
+<parameter name="t" type="java.lang.Throwable">
+</parameter>
+</method>
+<method name="addFailure"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="test" type="junit.framework.Test">
+</parameter>
+<parameter name="t" type="junit.framework.AssertionFailedError">
+</parameter>
+</method>
+<method name="endTest"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="test" type="junit.framework.Test">
+</parameter>
+</method>
+<method name="startTest"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="test" type="junit.framework.Test">
+</parameter>
+</method>
+</interface>
+<class name="TestResult"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="TestResult"
+ type="junit.framework.TestResult"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<method name="addError"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="test" type="junit.framework.Test">
+</parameter>
+<parameter name="t" type="java.lang.Throwable">
+</parameter>
+</method>
+<method name="addFailure"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="test" type="junit.framework.Test">
+</parameter>
+<parameter name="t" type="junit.framework.AssertionFailedError">
+</parameter>
+</method>
+<method name="addListener"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="listener" type="junit.framework.TestListener">
+</parameter>
+</method>
+<method name="endTest"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="test" type="junit.framework.Test">
+</parameter>
+</method>
+<method name="errorCount"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="errors"
+ return="java.util.Enumeration"
+ abstract="false"
+ native="false"
+ synchronized="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="failureCount"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="failures"
+ return="java.util.Enumeration"
+ abstract="false"
+ native="false"
+ synchronized="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="removeListener"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="listener" type="junit.framework.TestListener">
+</parameter>
+</method>
+<method name="run"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="test" type="junit.framework.TestCase">
+</parameter>
+</method>
+<method name="runCount"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="runProtected"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="test" type="junit.framework.Test">
+</parameter>
+<parameter name="p" type="junit.framework.Protectable">
+</parameter>
+</method>
+<method name="shouldStop"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="startTest"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="test" type="junit.framework.Test">
+</parameter>
+</method>
+<method name="stop"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="wasSuccessful"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<field name="fErrors"
+ type="java.util.Vector"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</field>
+<field name="fFailures"
+ type="java.util.Vector"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</field>
+<field name="fListeners"
+ type="java.util.Vector"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</field>
+<field name="fRunTests"
+ type="int"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</field>
+</class>
+<class name="TestSuite"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="junit.framework.Test">
+</implements>
+<constructor name="TestSuite"
+ type="junit.framework.TestSuite"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<constructor name="TestSuite"
+ type="junit.framework.TestSuite"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="theClass" type="java.lang.Class">
+</parameter>
+<parameter name="name" type="java.lang.String">
+</parameter>
+</constructor>
+<constructor name="TestSuite"
+ type="junit.framework.TestSuite"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="theClass" type="java.lang.Class">
+</parameter>
+</constructor>
+<constructor name="TestSuite"
+ type="junit.framework.TestSuite"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+</constructor>
+<method name="addTest"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="test" type="junit.framework.Test">
+</parameter>
+</method>
+<method name="addTestSuite"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="testClass" type="java.lang.Class">
+</parameter>
+</method>
+<method name="countTestCases"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="createTest"
+ return="junit.framework.Test"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="theClass" type="java.lang.Class">
+</parameter>
+<parameter name="name" type="java.lang.String">
+</parameter>
+</method>
+<method name="getName"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getTestConstructor"
+ return="java.lang.reflect.Constructor"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="theClass" type="java.lang.Class">
+</parameter>
+<exception name="NoSuchMethodException" type="java.lang.NoSuchMethodException">
+</exception>
+</method>
+<method name="run"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="result" type="junit.framework.TestResult">
+</parameter>
+</method>
+<method name="runTest"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="test" type="junit.framework.Test">
+</parameter>
+<parameter name="result" type="junit.framework.TestResult">
+</parameter>
+</method>
+<method name="setName"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+</method>
+<method name="testAt"
+ return="junit.framework.Test"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="index" type="int">
+</parameter>
+</method>
+<method name="testCount"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="tests"
+ return="java.util.Enumeration"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+</class>
+</package>
+<package name="junit.runner"
+>
+<class name="BaseTestRunner"
+ extends="java.lang.Object"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="junit.framework.TestListener">
+</implements>
+<constructor name="BaseTestRunner"
+ type="junit.runner.BaseTestRunner"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<method name="addError"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="test" type="junit.framework.Test">
+</parameter>
+<parameter name="t" type="java.lang.Throwable">
+</parameter>
+</method>
+<method name="addFailure"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="test" type="junit.framework.Test">
+</parameter>
+<parameter name="t" type="junit.framework.AssertionFailedError">
+</parameter>
+</method>
+<method name="clearStatus"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</method>
+<method name="elapsedTimeAsString"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="runTime" type="long">
+</parameter>
+</method>
+<method name="endTest"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="test" type="junit.framework.Test">
+</parameter>
+</method>
+<method name="extractClassName"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="className" type="java.lang.String">
+</parameter>
+</method>
+<method name="getFilteredTrace"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="t" type="java.lang.Throwable">
+</parameter>
+</method>
+<method name="getFilteredTrace"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="stack" type="java.lang.String">
+</parameter>
+</method>
+<method name="getLoader"
+ return="junit.runner.TestSuiteLoader"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getPreference"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="key" type="java.lang.String">
+</parameter>
+</method>
+<method name="getPreference"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="key" type="java.lang.String">
+</parameter>
+<parameter name="dflt" type="int">
+</parameter>
+</method>
+<method name="getPreferences"
+ return="java.util.Properties"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</method>
+<method name="getTest"
+ return="junit.framework.Test"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="suiteClassName" type="java.lang.String">
+</parameter>
+</method>
+<method name="inVAJava"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="loadSuiteClass"
+ return="java.lang.Class"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="suiteClassName" type="java.lang.String">
+</parameter>
+<exception name="ClassNotFoundException" type="java.lang.ClassNotFoundException">
+</exception>
+</method>
+<method name="processArguments"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="args" type="java.lang.String[]">
+</parameter>
+</method>
+<method name="runFailed"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="message" type="java.lang.String">
+</parameter>
+</method>
+<method name="savePreferences"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="setLoading"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="enable" type="boolean">
+</parameter>
+</method>
+<method name="setPreference"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="key" type="java.lang.String">
+</parameter>
+<parameter name="value" type="java.lang.String">
+</parameter>
+</method>
+<method name="setPreferences"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="preferences" type="java.util.Properties">
+</parameter>
+</method>
+<method name="showStackRaw"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</method>
+<method name="startTest"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="test" type="junit.framework.Test">
+</parameter>
+</method>
+<method name="testEnded"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="testName" type="java.lang.String">
+</parameter>
+</method>
+<method name="testFailed"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="status" type="int">
+</parameter>
+<parameter name="test" type="junit.framework.Test">
+</parameter>
+<parameter name="t" type="java.lang.Throwable">
+</parameter>
+</method>
+<method name="testStarted"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="testName" type="java.lang.String">
+</parameter>
+</method>
+<method name="truncate"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="s" type="java.lang.String">
+</parameter>
+</method>
+<method name="useReloadingTestSuiteLoader"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</method>
+<field name="SUITE_METHODNAME"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;suite&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<interface name="TestSuiteLoader"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="load"
+ return="java.lang.Class"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="suiteClassName" type="java.lang.String">
+</parameter>
+<exception name="ClassNotFoundException" type="java.lang.ClassNotFoundException">
+</exception>
+</method>
+<method name="reload"
+ return="java.lang.Class"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="aClass" type="java.lang.Class">
+</parameter>
+<exception name="ClassNotFoundException" type="java.lang.ClassNotFoundException">
+</exception>
+</method>
+</interface>
+<class name="Version"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="id"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+</class>
+</package>
+<package name="org.apache.commons.logging"
+>
+<interface name="Log"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="debug"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="arg0" type="java.lang.Object">
+</parameter>
+</method>
+<method name="debug"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="arg0" type="java.lang.Object">
+</parameter>
+<parameter name="arg1" type="java.lang.Throwable">
+</parameter>
+</method>
+<method name="error"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="arg0" type="java.lang.Object">
+</parameter>
+</method>
+<method name="error"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="arg0" type="java.lang.Object">
+</parameter>
+<parameter name="arg1" type="java.lang.Throwable">
+</parameter>
+</method>
+<method name="fatal"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="arg0" type="java.lang.Object">
+</parameter>
+</method>
+<method name="fatal"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="arg0" type="java.lang.Object">
+</parameter>
+<parameter name="arg1" type="java.lang.Throwable">
+</parameter>
+</method>
+<method name="info"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="arg0" type="java.lang.Object">
+</parameter>
+</method>
+<method name="info"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="arg0" type="java.lang.Object">
+</parameter>
+<parameter name="arg1" type="java.lang.Throwable">
+</parameter>
+</method>
+<method name="isDebugEnabled"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isErrorEnabled"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isFatalEnabled"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isInfoEnabled"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isTraceEnabled"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isWarnEnabled"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="trace"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="arg0" type="java.lang.Object">
+</parameter>
+</method>
+<method name="trace"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="arg0" type="java.lang.Object">
+</parameter>
+<parameter name="arg1" type="java.lang.Throwable">
+</parameter>
+</method>
+<method name="warn"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="arg0" type="java.lang.Object">
+</parameter>
+</method>
+<method name="warn"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="arg0" type="java.lang.Object">
+</parameter>
+<parameter name="arg1" type="java.lang.Throwable">
+</parameter>
+</method>
+</interface>
+</package>
+<package name="org.apache.http"
+>
+<class name="ConnectionClosedException"
+ extends="java.io.IOException"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="ConnectionClosedException"
+ type="org.apache.http.ConnectionClosedException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="message" type="java.lang.String">
+</parameter>
+</constructor>
+</class>
+<interface name="ConnectionReuseStrategy"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="keepAlive"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="response" type="org.apache.http.HttpResponse">
+</parameter>
+<parameter name="context" type="org.apache.http.protocol.HttpContext">
+</parameter>
+</method>
+</interface>
+<interface name="FormattedHeader"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="org.apache.http.Header">
+</implements>
+<method name="getBuffer"
+ return="org.apache.http.util.CharArrayBuffer"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getValuePos"
+ return="int"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+</interface>
+<interface name="Header"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="getElements"
+ return="org.apache.http.HeaderElement[]"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="ParseException" type="org.apache.http.ParseException">
+</exception>
+</method>
+<method name="getName"
+ return="java.lang.String"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getValue"
+ return="java.lang.String"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+</interface>
+<interface name="HeaderElement"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="getName"
+ return="java.lang.String"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getParameter"
+ return="org.apache.http.NameValuePair"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="index" type="int">
+</parameter>
+</method>
+<method name="getParameterByName"
+ return="org.apache.http.NameValuePair"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+</method>
+<method name="getParameterCount"
+ return="int"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getParameters"
+ return="org.apache.http.NameValuePair[]"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getValue"
+ return="java.lang.String"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+</interface>
+<interface name="HeaderElementIterator"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="java.util.Iterator">
+</implements>
+<method name="hasNext"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="nextElement"
+ return="org.apache.http.HeaderElement"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+</interface>
+<interface name="HeaderIterator"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="java.util.Iterator">
+</implements>
+<method name="hasNext"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="nextHeader"
+ return="org.apache.http.Header"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+</interface>
+<interface name="HttpClientConnection"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="org.apache.http.HttpConnection">
+</implements>
+<method name="flush"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="isResponseAvailable"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="timeout" type="int">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="receiveResponseEntity"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="response" type="org.apache.http.HttpResponse">
+</parameter>
+<exception name="HttpException" type="org.apache.http.HttpException">
+</exception>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="receiveResponseHeader"
+ return="org.apache.http.HttpResponse"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="HttpException" type="org.apache.http.HttpException">
+</exception>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="sendRequestEntity"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="request" type="org.apache.http.HttpEntityEnclosingRequest">
+</parameter>
+<exception name="HttpException" type="org.apache.http.HttpException">
+</exception>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="sendRequestHeader"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="request" type="org.apache.http.HttpRequest">
+</parameter>
+<exception name="HttpException" type="org.apache.http.HttpException">
+</exception>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+</interface>
+<interface name="HttpConnection"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="close"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="getMetrics"
+ return="org.apache.http.HttpConnectionMetrics"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getSocketTimeout"
+ return="int"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isOpen"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isStale"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="setSocketTimeout"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="timeout" type="int">
+</parameter>
+</method>
+<method name="shutdown"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+</interface>
+<interface name="HttpConnectionMetrics"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="getMetric"
+ return="java.lang.Object"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="metricName" type="java.lang.String">
+</parameter>
+</method>
+<method name="getReceivedBytesCount"
+ return="long"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getRequestCount"
+ return="long"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getResponseCount"
+ return="long"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getSentBytesCount"
+ return="long"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="reset"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+</interface>
+<interface name="HttpEntity"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="consumeContent"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="getContent"
+ return="java.io.InputStream"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+<exception name="IllegalStateException" type="java.lang.IllegalStateException">
+</exception>
+</method>
+<method name="getContentEncoding"
+ return="org.apache.http.Header"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getContentLength"
+ return="long"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getContentType"
+ return="org.apache.http.Header"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isChunked"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isRepeatable"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isStreaming"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="writeTo"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="outstream" type="java.io.OutputStream">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+</interface>
+<interface name="HttpEntityEnclosingRequest"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="org.apache.http.HttpRequest">
+</implements>
+<method name="expectContinue"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getEntity"
+ return="org.apache.http.HttpEntity"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="setEntity"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="entity" type="org.apache.http.HttpEntity">
+</parameter>
+</method>
+</interface>
+<class name="HttpException"
+ extends="java.lang.Exception"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="HttpException"
+ type="org.apache.http.HttpException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<constructor name="HttpException"
+ type="org.apache.http.HttpException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="message" type="java.lang.String">
+</parameter>
+</constructor>
+<constructor name="HttpException"
+ type="org.apache.http.HttpException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="message" type="java.lang.String">
+</parameter>
+<parameter name="cause" type="java.lang.Throwable">
+</parameter>
+</constructor>
+</class>
+<class name="HttpHost"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="java.lang.Cloneable">
+</implements>
+<constructor name="HttpHost"
+ type="org.apache.http.HttpHost"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="hostname" type="java.lang.String">
+</parameter>
+<parameter name="port" type="int">
+</parameter>
+<parameter name="scheme" type="java.lang.String">
+</parameter>
+</constructor>
+<constructor name="HttpHost"
+ type="org.apache.http.HttpHost"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="hostname" type="java.lang.String">
+</parameter>
+<parameter name="port" type="int">
+</parameter>
+</constructor>
+<constructor name="HttpHost"
+ type="org.apache.http.HttpHost"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="hostname" type="java.lang.String">
+</parameter>
+</constructor>
+<constructor name="HttpHost"
+ type="org.apache.http.HttpHost"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="httphost" type="org.apache.http.HttpHost">
+</parameter>
+</constructor>
+<method name="clone"
+ return="java.lang.Object"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="CloneNotSupportedException" type="java.lang.CloneNotSupportedException">
+</exception>
+</method>
+<method name="getHostName"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getPort"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getSchemeName"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="toHostString"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="toURI"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<field name="DEFAULT_SCHEME_NAME"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;http&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="hostname"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</field>
+<field name="lcHostname"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</field>
+<field name="port"
+ type="int"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</field>
+<field name="schemeName"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</field>
+</class>
+<interface name="HttpInetConnection"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="org.apache.http.HttpConnection">
+</implements>
+<method name="getLocalAddress"
+ return="java.net.InetAddress"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getLocalPort"
+ return="int"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getRemoteAddress"
+ return="java.net.InetAddress"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getRemotePort"
+ return="int"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+</interface>
+<interface name="HttpMessage"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="addHeader"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="header" type="org.apache.http.Header">
+</parameter>
+</method>
+<method name="addHeader"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+<parameter name="value" type="java.lang.String">
+</parameter>
+</method>
+<method name="containsHeader"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+</method>
+<method name="getAllHeaders"
+ return="org.apache.http.Header[]"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getFirstHeader"
+ return="org.apache.http.Header"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+</method>
+<method name="getHeaders"
+ return="org.apache.http.Header[]"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+</method>
+<method name="getLastHeader"
+ return="org.apache.http.Header"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+</method>
+<method name="getParams"
+ return="org.apache.http.params.HttpParams"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getProtocolVersion"
+ return="org.apache.http.ProtocolVersion"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="headerIterator"
+ return="org.apache.http.HeaderIterator"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="headerIterator"
+ return="org.apache.http.HeaderIterator"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+</method>
+<method name="removeHeader"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="header" type="org.apache.http.Header">
+</parameter>
+</method>
+<method name="removeHeaders"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+</method>
+<method name="setHeader"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="header" type="org.apache.http.Header">
+</parameter>
+</method>
+<method name="setHeader"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+<parameter name="value" type="java.lang.String">
+</parameter>
+</method>
+<method name="setHeaders"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="headers" type="org.apache.http.Header[]">
+</parameter>
+</method>
+<method name="setParams"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="params" type="org.apache.http.params.HttpParams">
+</parameter>
+</method>
+</interface>
+<interface name="HttpRequest"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="org.apache.http.HttpMessage">
+</implements>
+<method name="getRequestLine"
+ return="org.apache.http.RequestLine"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+</interface>
+<interface name="HttpRequestFactory"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="newHttpRequest"
+ return="org.apache.http.HttpRequest"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="requestline" type="org.apache.http.RequestLine">
+</parameter>
+<exception name="MethodNotSupportedException" type="org.apache.http.MethodNotSupportedException">
+</exception>
+</method>
+<method name="newHttpRequest"
+ return="org.apache.http.HttpRequest"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="method" type="java.lang.String">
+</parameter>
+<parameter name="uri" type="java.lang.String">
+</parameter>
+<exception name="MethodNotSupportedException" type="org.apache.http.MethodNotSupportedException">
+</exception>
+</method>
+</interface>
+<interface name="HttpRequestInterceptor"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="process"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="request" type="org.apache.http.HttpRequest">
+</parameter>
+<parameter name="context" type="org.apache.http.protocol.HttpContext">
+</parameter>
+<exception name="HttpException" type="org.apache.http.HttpException">
+</exception>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+</interface>
+<interface name="HttpResponse"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="org.apache.http.HttpMessage">
+</implements>
+<method name="getEntity"
+ return="org.apache.http.HttpEntity"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getLocale"
+ return="java.util.Locale"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getStatusLine"
+ return="org.apache.http.StatusLine"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="setEntity"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="entity" type="org.apache.http.HttpEntity">
+</parameter>
+</method>
+<method name="setLocale"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="loc" type="java.util.Locale">
+</parameter>
+</method>
+<method name="setReasonPhrase"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="reason" type="java.lang.String">
+</parameter>
+<exception name="IllegalStateException" type="java.lang.IllegalStateException">
+</exception>
+</method>
+<method name="setStatusCode"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="code" type="int">
+</parameter>
+<exception name="IllegalStateException" type="java.lang.IllegalStateException">
+</exception>
+</method>
+<method name="setStatusLine"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="statusline" type="org.apache.http.StatusLine">
+</parameter>
+</method>
+<method name="setStatusLine"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="ver" type="org.apache.http.ProtocolVersion">
+</parameter>
+<parameter name="code" type="int">
+</parameter>
+</method>
+<method name="setStatusLine"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="ver" type="org.apache.http.ProtocolVersion">
+</parameter>
+<parameter name="code" type="int">
+</parameter>
+<parameter name="reason" type="java.lang.String">
+</parameter>
+</method>
+</interface>
+<interface name="HttpResponseFactory"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="newHttpResponse"
+ return="org.apache.http.HttpResponse"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="ver" type="org.apache.http.ProtocolVersion">
+</parameter>
+<parameter name="status" type="int">
+</parameter>
+<parameter name="context" type="org.apache.http.protocol.HttpContext">
+</parameter>
+</method>
+<method name="newHttpResponse"
+ return="org.apache.http.HttpResponse"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="statusline" type="org.apache.http.StatusLine">
+</parameter>
+<parameter name="context" type="org.apache.http.protocol.HttpContext">
+</parameter>
+</method>
+</interface>
+<interface name="HttpResponseInterceptor"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="process"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="response" type="org.apache.http.HttpResponse">
+</parameter>
+<parameter name="context" type="org.apache.http.protocol.HttpContext">
+</parameter>
+<exception name="HttpException" type="org.apache.http.HttpException">
+</exception>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+</interface>
+<interface name="HttpServerConnection"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="org.apache.http.HttpConnection">
+</implements>
+<method name="flush"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="receiveRequestEntity"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="request" type="org.apache.http.HttpEntityEnclosingRequest">
+</parameter>
+<exception name="HttpException" type="org.apache.http.HttpException">
+</exception>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="receiveRequestHeader"
+ return="org.apache.http.HttpRequest"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="HttpException" type="org.apache.http.HttpException">
+</exception>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="sendResponseEntity"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="response" type="org.apache.http.HttpResponse">
+</parameter>
+<exception name="HttpException" type="org.apache.http.HttpException">
+</exception>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="sendResponseHeader"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="response" type="org.apache.http.HttpResponse">
+</parameter>
+<exception name="HttpException" type="org.apache.http.HttpException">
+</exception>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+</interface>
+<interface name="HttpStatus"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<field name="SC_ACCEPTED"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="202"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="SC_BAD_GATEWAY"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="502"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="SC_BAD_REQUEST"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="400"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="SC_CONFLICT"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="409"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="SC_CONTINUE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="100"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="SC_CREATED"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="201"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="SC_EXPECTATION_FAILED"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="417"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="SC_FAILED_DEPENDENCY"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="424"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="SC_FORBIDDEN"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="403"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="SC_GATEWAY_TIMEOUT"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="504"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="SC_GONE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="410"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="SC_HTTP_VERSION_NOT_SUPPORTED"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="505"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="SC_INSUFFICIENT_SPACE_ON_RESOURCE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="419"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="SC_INSUFFICIENT_STORAGE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="507"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="SC_INTERNAL_SERVER_ERROR"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="500"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="SC_LENGTH_REQUIRED"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="411"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="SC_LOCKED"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="423"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="SC_METHOD_FAILURE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="420"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="SC_METHOD_NOT_ALLOWED"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="405"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="SC_MOVED_PERMANENTLY"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="301"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="SC_MOVED_TEMPORARILY"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="302"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="SC_MULTIPLE_CHOICES"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="300"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="SC_MULTI_STATUS"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="207"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="SC_NON_AUTHORITATIVE_INFORMATION"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="203"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="SC_NOT_ACCEPTABLE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="406"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="SC_NOT_FOUND"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="404"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="SC_NOT_IMPLEMENTED"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="501"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="SC_NOT_MODIFIED"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="304"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="SC_NO_CONTENT"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="204"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="SC_OK"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="200"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="SC_PARTIAL_CONTENT"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="206"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="SC_PAYMENT_REQUIRED"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="402"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="SC_PRECONDITION_FAILED"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="412"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="SC_PROCESSING"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="102"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="SC_PROXY_AUTHENTICATION_REQUIRED"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="407"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="SC_REQUESTED_RANGE_NOT_SATISFIABLE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="416"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="SC_REQUEST_TIMEOUT"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="408"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="SC_REQUEST_TOO_LONG"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="413"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="SC_REQUEST_URI_TOO_LONG"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="414"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="SC_RESET_CONTENT"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="205"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="SC_SEE_OTHER"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="303"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="SC_SERVICE_UNAVAILABLE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="503"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="SC_SWITCHING_PROTOCOLS"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="101"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="SC_TEMPORARY_REDIRECT"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="307"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="SC_UNAUTHORIZED"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="401"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="SC_UNPROCESSABLE_ENTITY"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="422"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="SC_UNSUPPORTED_MEDIA_TYPE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="415"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="SC_USE_PROXY"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="305"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</interface>
+<class name="HttpVersion"
+ extends="org.apache.http.ProtocolVersion"
+ abstract="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="java.io.Serializable">
+</implements>
+<constructor name="HttpVersion"
+ type="org.apache.http.HttpVersion"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="major" type="int">
+</parameter>
+<parameter name="minor" type="int">
+</parameter>
+</constructor>
+<field name="HTTP"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;HTTP&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="HTTP_0_9"
+ type="org.apache.http.HttpVersion"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="HTTP_1_0"
+ type="org.apache.http.HttpVersion"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="HTTP_1_1"
+ type="org.apache.http.HttpVersion"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<class name="MalformedChunkCodingException"
+ extends="java.io.IOException"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="MalformedChunkCodingException"
+ type="org.apache.http.MalformedChunkCodingException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<constructor name="MalformedChunkCodingException"
+ type="org.apache.http.MalformedChunkCodingException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="message" type="java.lang.String">
+</parameter>
+</constructor>
+</class>
+<class name="MethodNotSupportedException"
+ extends="org.apache.http.HttpException"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="MethodNotSupportedException"
+ type="org.apache.http.MethodNotSupportedException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="message" type="java.lang.String">
+</parameter>
+</constructor>
+<constructor name="MethodNotSupportedException"
+ type="org.apache.http.MethodNotSupportedException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="message" type="java.lang.String">
+</parameter>
+<parameter name="cause" type="java.lang.Throwable">
+</parameter>
+</constructor>
+</class>
+<interface name="NameValuePair"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="getName"
+ return="java.lang.String"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getValue"
+ return="java.lang.String"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+</interface>
+<class name="NoHttpResponseException"
+ extends="java.io.IOException"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="NoHttpResponseException"
+ type="org.apache.http.NoHttpResponseException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="message" type="java.lang.String">
+</parameter>
+</constructor>
+</class>
+<class name="ParseException"
+ extends="java.lang.RuntimeException"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="ParseException"
+ type="org.apache.http.ParseException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<constructor name="ParseException"
+ type="org.apache.http.ParseException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="message" type="java.lang.String">
+</parameter>
+</constructor>
+</class>
+<class name="ProtocolException"
+ extends="org.apache.http.HttpException"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="ProtocolException"
+ type="org.apache.http.ProtocolException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<constructor name="ProtocolException"
+ type="org.apache.http.ProtocolException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="message" type="java.lang.String">
+</parameter>
+</constructor>
+<constructor name="ProtocolException"
+ type="org.apache.http.ProtocolException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="message" type="java.lang.String">
+</parameter>
+<parameter name="cause" type="java.lang.Throwable">
+</parameter>
+</constructor>
+</class>
+<class name="ProtocolVersion"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="java.lang.Cloneable">
+</implements>
+<implements name="java.io.Serializable">
+</implements>
+<constructor name="ProtocolVersion"
+ type="org.apache.http.ProtocolVersion"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="protocol" type="java.lang.String">
+</parameter>
+<parameter name="major" type="int">
+</parameter>
+<parameter name="minor" type="int">
+</parameter>
+</constructor>
+<method name="clone"
+ return="java.lang.Object"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="CloneNotSupportedException" type="java.lang.CloneNotSupportedException">
+</exception>
+</method>
+<method name="compareToVersion"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="that" type="org.apache.http.ProtocolVersion">
+</parameter>
+</method>
+<method name="equals"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="obj" type="java.lang.Object">
+</parameter>
+</method>
+<method name="forVersion"
+ return="org.apache.http.ProtocolVersion"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="major" type="int">
+</parameter>
+<parameter name="minor" type="int">
+</parameter>
+</method>
+<method name="getMajor"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getMinor"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getProtocol"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="greaterEquals"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="version" type="org.apache.http.ProtocolVersion">
+</parameter>
+</method>
+<method name="hashCode"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isComparable"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="that" type="org.apache.http.ProtocolVersion">
+</parameter>
+</method>
+<method name="lessEquals"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="version" type="org.apache.http.ProtocolVersion">
+</parameter>
+</method>
+<field name="major"
+ type="int"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</field>
+<field name="minor"
+ type="int"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</field>
+<field name="protocol"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</field>
+</class>
+<interface name="ReasonPhraseCatalog"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="getReason"
+ return="java.lang.String"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="status" type="int">
+</parameter>
+<parameter name="loc" type="java.util.Locale">
+</parameter>
+</method>
+</interface>
+<interface name="RequestLine"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="getMethod"
+ return="java.lang.String"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getProtocolVersion"
+ return="org.apache.http.ProtocolVersion"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getUri"
+ return="java.lang.String"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+</interface>
+<interface name="StatusLine"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="getProtocolVersion"
+ return="org.apache.http.ProtocolVersion"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getReasonPhrase"
+ return="java.lang.String"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getStatusCode"
+ return="int"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+</interface>
+<interface name="TokenIterator"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="java.util.Iterator">
+</implements>
+<method name="hasNext"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="nextToken"
+ return="java.lang.String"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+</interface>
+<class name="UnsupportedHttpVersionException"
+ extends="org.apache.http.ProtocolException"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="UnsupportedHttpVersionException"
+ type="org.apache.http.UnsupportedHttpVersionException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<constructor name="UnsupportedHttpVersionException"
+ type="org.apache.http.UnsupportedHttpVersionException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="message" type="java.lang.String">
+</parameter>
+</constructor>
+</class>
+</package>
+<package name="org.apache.http.auth"
+>
+<class name="AUTH"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<field name="PROXY_AUTH"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;Proxy-Authenticate&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="PROXY_AUTH_RESP"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;Proxy-Authorization&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="WWW_AUTH"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;WWW-Authenticate&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="WWW_AUTH_RESP"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;Authorization&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<interface name="AuthScheme"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="authenticate"
+ return="org.apache.http.Header"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="credentials" type="org.apache.http.auth.Credentials">
+</parameter>
+<parameter name="request" type="org.apache.http.HttpRequest">
+</parameter>
+<exception name="AuthenticationException" type="org.apache.http.auth.AuthenticationException">
+</exception>
+</method>
+<method name="getParameter"
+ return="java.lang.String"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+</method>
+<method name="getRealm"
+ return="java.lang.String"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getSchemeName"
+ return="java.lang.String"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isComplete"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isConnectionBased"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="processChallenge"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="header" type="org.apache.http.Header">
+</parameter>
+<exception name="MalformedChallengeException" type="org.apache.http.auth.MalformedChallengeException">
+</exception>
+</method>
+</interface>
+<interface name="AuthSchemeFactory"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="newInstance"
+ return="org.apache.http.auth.AuthScheme"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="params" type="org.apache.http.params.HttpParams">
+</parameter>
+</method>
+</interface>
+<class name="AuthSchemeRegistry"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="AuthSchemeRegistry"
+ type="org.apache.http.auth.AuthSchemeRegistry"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<method name="getAuthScheme"
+ return="org.apache.http.auth.AuthScheme"
+ abstract="false"
+ native="false"
+ synchronized="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+<parameter name="params" type="org.apache.http.params.HttpParams">
+</parameter>
+<exception name="IllegalStateException" type="java.lang.IllegalStateException">
+</exception>
+</method>
+<method name="getSchemeNames"
+ return="java.util.List&lt;java.lang.String&gt;"
+ abstract="false"
+ native="false"
+ synchronized="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="register"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+<parameter name="factory" type="org.apache.http.auth.AuthSchemeFactory">
+</parameter>
+</method>
+<method name="setItems"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="map" type="java.util.Map&lt;java.lang.String, org.apache.http.auth.AuthSchemeFactory&gt;">
+</parameter>
+</method>
+<method name="unregister"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+</method>
+</class>
+<class name="AuthScope"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="AuthScope"
+ type="org.apache.http.auth.AuthScope"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="host" type="java.lang.String">
+</parameter>
+<parameter name="port" type="int">
+</parameter>
+<parameter name="realm" type="java.lang.String">
+</parameter>
+<parameter name="scheme" type="java.lang.String">
+</parameter>
+</constructor>
+<constructor name="AuthScope"
+ type="org.apache.http.auth.AuthScope"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="host" type="java.lang.String">
+</parameter>
+<parameter name="port" type="int">
+</parameter>
+<parameter name="realm" type="java.lang.String">
+</parameter>
+</constructor>
+<constructor name="AuthScope"
+ type="org.apache.http.auth.AuthScope"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="host" type="java.lang.String">
+</parameter>
+<parameter name="port" type="int">
+</parameter>
+</constructor>
+<constructor name="AuthScope"
+ type="org.apache.http.auth.AuthScope"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="authscope" type="org.apache.http.auth.AuthScope">
+</parameter>
+</constructor>
+<method name="getHost"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getPort"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getRealm"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getScheme"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="match"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="that" type="org.apache.http.auth.AuthScope">
+</parameter>
+</method>
+<field name="ANY"
+ type="org.apache.http.auth.AuthScope"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ANY_HOST"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ANY_PORT"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="-1"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ANY_REALM"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ANY_SCHEME"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<class name="AuthState"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="AuthState"
+ type="org.apache.http.auth.AuthState"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<method name="getAuthScheme"
+ return="org.apache.http.auth.AuthScheme"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getAuthScope"
+ return="org.apache.http.auth.AuthScope"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getCredentials"
+ return="org.apache.http.auth.Credentials"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="invalidate"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isValid"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="setAuthScheme"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="authScheme" type="org.apache.http.auth.AuthScheme">
+</parameter>
+</method>
+<method name="setAuthScope"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="authScope" type="org.apache.http.auth.AuthScope">
+</parameter>
+</method>
+<method name="setCredentials"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="credentials" type="org.apache.http.auth.Credentials">
+</parameter>
+</method>
+</class>
+<class name="AuthenticationException"
+ extends="org.apache.http.ProtocolException"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="AuthenticationException"
+ type="org.apache.http.auth.AuthenticationException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<constructor name="AuthenticationException"
+ type="org.apache.http.auth.AuthenticationException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="message" type="java.lang.String">
+</parameter>
+</constructor>
+<constructor name="AuthenticationException"
+ type="org.apache.http.auth.AuthenticationException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="message" type="java.lang.String">
+</parameter>
+<parameter name="cause" type="java.lang.Throwable">
+</parameter>
+</constructor>
+</class>
+<class name="BasicUserPrincipal"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="java.security.Principal">
+</implements>
+<constructor name="BasicUserPrincipal"
+ type="org.apache.http.auth.BasicUserPrincipal"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="username" type="java.lang.String">
+</parameter>
+</constructor>
+<method name="getName"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+</class>
+<interface name="Credentials"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="getPassword"
+ return="java.lang.String"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getUserPrincipal"
+ return="java.security.Principal"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+</interface>
+<class name="InvalidCredentialsException"
+ extends="org.apache.http.auth.AuthenticationException"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="InvalidCredentialsException"
+ type="org.apache.http.auth.InvalidCredentialsException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<constructor name="InvalidCredentialsException"
+ type="org.apache.http.auth.InvalidCredentialsException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="message" type="java.lang.String">
+</parameter>
+</constructor>
+<constructor name="InvalidCredentialsException"
+ type="org.apache.http.auth.InvalidCredentialsException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="message" type="java.lang.String">
+</parameter>
+<parameter name="cause" type="java.lang.Throwable">
+</parameter>
+</constructor>
+</class>
+<class name="MalformedChallengeException"
+ extends="org.apache.http.ProtocolException"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="MalformedChallengeException"
+ type="org.apache.http.auth.MalformedChallengeException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<constructor name="MalformedChallengeException"
+ type="org.apache.http.auth.MalformedChallengeException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="message" type="java.lang.String">
+</parameter>
+</constructor>
+<constructor name="MalformedChallengeException"
+ type="org.apache.http.auth.MalformedChallengeException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="message" type="java.lang.String">
+</parameter>
+<parameter name="cause" type="java.lang.Throwable">
+</parameter>
+</constructor>
+</class>
+<class name="NTCredentials"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="org.apache.http.auth.Credentials">
+</implements>
+<constructor name="NTCredentials"
+ type="org.apache.http.auth.NTCredentials"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="usernamePassword" type="java.lang.String">
+</parameter>
+</constructor>
+<constructor name="NTCredentials"
+ type="org.apache.http.auth.NTCredentials"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="userName" type="java.lang.String">
+</parameter>
+<parameter name="password" type="java.lang.String">
+</parameter>
+<parameter name="workstation" type="java.lang.String">
+</parameter>
+<parameter name="domain" type="java.lang.String">
+</parameter>
+</constructor>
+<method name="getDomain"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getPassword"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getUserName"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getUserPrincipal"
+ return="java.security.Principal"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getWorkstation"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+</class>
+<class name="NTUserPrincipal"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="java.security.Principal">
+</implements>
+<constructor name="NTUserPrincipal"
+ type="org.apache.http.auth.NTUserPrincipal"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="domain" type="java.lang.String">
+</parameter>
+<parameter name="username" type="java.lang.String">
+</parameter>
+</constructor>
+<method name="getDomain"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getName"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getUsername"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+</class>
+<class name="UsernamePasswordCredentials"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="org.apache.http.auth.Credentials">
+</implements>
+<constructor name="UsernamePasswordCredentials"
+ type="org.apache.http.auth.UsernamePasswordCredentials"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="usernamePassword" type="java.lang.String">
+</parameter>
+</constructor>
+<constructor name="UsernamePasswordCredentials"
+ type="org.apache.http.auth.UsernamePasswordCredentials"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="userName" type="java.lang.String">
+</parameter>
+<parameter name="password" type="java.lang.String">
+</parameter>
+</constructor>
+<method name="getPassword"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getUserName"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getUserPrincipal"
+ return="java.security.Principal"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+</class>
+</package>
+<package name="org.apache.http.auth.params"
+>
+<interface name="AuthPNames"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<field name="CREDENTIAL_CHARSET"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;http.auth.credential-charset&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</interface>
+<class name="AuthParamBean"
+ extends="org.apache.http.params.HttpAbstractParamBean"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="AuthParamBean"
+ type="org.apache.http.auth.params.AuthParamBean"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="params" type="org.apache.http.params.HttpParams">
+</parameter>
+</constructor>
+<method name="setCredentialCharset"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="charset" type="java.lang.String">
+</parameter>
+</method>
+</class>
+<class name="AuthParams"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="getCredentialCharset"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="params" type="org.apache.http.params.HttpParams">
+</parameter>
+</method>
+<method name="setCredentialCharset"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="params" type="org.apache.http.params.HttpParams">
+</parameter>
+<parameter name="charset" type="java.lang.String">
+</parameter>
+</method>
+</class>
+</package>
+<package name="org.apache.http.client"
+>
+<interface name="AuthenticationHandler"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="getChallenges"
+ return="java.util.Map&lt;java.lang.String, org.apache.http.Header&gt;"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="response" type="org.apache.http.HttpResponse">
+</parameter>
+<parameter name="context" type="org.apache.http.protocol.HttpContext">
+</parameter>
+<exception name="MalformedChallengeException" type="org.apache.http.auth.MalformedChallengeException">
+</exception>
+</method>
+<method name="isAuthenticationRequested"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="response" type="org.apache.http.HttpResponse">
+</parameter>
+<parameter name="context" type="org.apache.http.protocol.HttpContext">
+</parameter>
+</method>
+<method name="selectScheme"
+ return="org.apache.http.auth.AuthScheme"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="challenges" type="java.util.Map&lt;java.lang.String, org.apache.http.Header&gt;">
+</parameter>
+<parameter name="response" type="org.apache.http.HttpResponse">
+</parameter>
+<parameter name="context" type="org.apache.http.protocol.HttpContext">
+</parameter>
+<exception name="AuthenticationException" type="org.apache.http.auth.AuthenticationException">
+</exception>
+</method>
+</interface>
+<class name="CircularRedirectException"
+ extends="org.apache.http.client.RedirectException"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="CircularRedirectException"
+ type="org.apache.http.client.CircularRedirectException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<constructor name="CircularRedirectException"
+ type="org.apache.http.client.CircularRedirectException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="message" type="java.lang.String">
+</parameter>
+</constructor>
+<constructor name="CircularRedirectException"
+ type="org.apache.http.client.CircularRedirectException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="message" type="java.lang.String">
+</parameter>
+<parameter name="cause" type="java.lang.Throwable">
+</parameter>
+</constructor>
+</class>
+<class name="ClientProtocolException"
+ extends="java.io.IOException"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="ClientProtocolException"
+ type="org.apache.http.client.ClientProtocolException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<constructor name="ClientProtocolException"
+ type="org.apache.http.client.ClientProtocolException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="s" type="java.lang.String">
+</parameter>
+</constructor>
+<constructor name="ClientProtocolException"
+ type="org.apache.http.client.ClientProtocolException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="cause" type="java.lang.Throwable">
+</parameter>
+</constructor>
+<constructor name="ClientProtocolException"
+ type="org.apache.http.client.ClientProtocolException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="message" type="java.lang.String">
+</parameter>
+<parameter name="cause" type="java.lang.Throwable">
+</parameter>
+</constructor>
+</class>
+<interface name="CookieStore"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="addCookie"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="cookie" type="org.apache.http.cookie.Cookie">
+</parameter>
+</method>
+<method name="clear"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="clearExpired"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="date" type="java.util.Date">
+</parameter>
+</method>
+<method name="getCookies"
+ return="java.util.List&lt;org.apache.http.cookie.Cookie&gt;"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+</interface>
+<interface name="CredentialsProvider"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="clear"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getCredentials"
+ return="org.apache.http.auth.Credentials"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="authscope" type="org.apache.http.auth.AuthScope">
+</parameter>
+</method>
+<method name="setCredentials"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="authscope" type="org.apache.http.auth.AuthScope">
+</parameter>
+<parameter name="credentials" type="org.apache.http.auth.Credentials">
+</parameter>
+</method>
+</interface>
+<interface name="HttpClient"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="execute"
+ return="org.apache.http.HttpResponse"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="request" type="org.apache.http.client.methods.HttpUriRequest">
+</parameter>
+<exception name="ClientProtocolException" type="org.apache.http.client.ClientProtocolException">
+</exception>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="execute"
+ return="org.apache.http.HttpResponse"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="request" type="org.apache.http.client.methods.HttpUriRequest">
+</parameter>
+<parameter name="context" type="org.apache.http.protocol.HttpContext">
+</parameter>
+<exception name="ClientProtocolException" type="org.apache.http.client.ClientProtocolException">
+</exception>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="execute"
+ return="org.apache.http.HttpResponse"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="target" type="org.apache.http.HttpHost">
+</parameter>
+<parameter name="request" type="org.apache.http.HttpRequest">
+</parameter>
+<exception name="ClientProtocolException" type="org.apache.http.client.ClientProtocolException">
+</exception>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="execute"
+ return="org.apache.http.HttpResponse"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="target" type="org.apache.http.HttpHost">
+</parameter>
+<parameter name="request" type="org.apache.http.HttpRequest">
+</parameter>
+<parameter name="context" type="org.apache.http.protocol.HttpContext">
+</parameter>
+<exception name="ClientProtocolException" type="org.apache.http.client.ClientProtocolException">
+</exception>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="execute"
+ return="T"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="request" type="org.apache.http.client.methods.HttpUriRequest">
+</parameter>
+<parameter name="responseHandler" type="org.apache.http.client.ResponseHandler&lt;? extends T&gt;">
+</parameter>
+<exception name="ClientProtocolException" type="org.apache.http.client.ClientProtocolException">
+</exception>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="execute"
+ return="T"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="request" type="org.apache.http.client.methods.HttpUriRequest">
+</parameter>
+<parameter name="responseHandler" type="org.apache.http.client.ResponseHandler&lt;? extends T&gt;">
+</parameter>
+<parameter name="context" type="org.apache.http.protocol.HttpContext">
+</parameter>
+<exception name="ClientProtocolException" type="org.apache.http.client.ClientProtocolException">
+</exception>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="execute"
+ return="T"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="target" type="org.apache.http.HttpHost">
+</parameter>
+<parameter name="request" type="org.apache.http.HttpRequest">
+</parameter>
+<parameter name="responseHandler" type="org.apache.http.client.ResponseHandler&lt;? extends T&gt;">
+</parameter>
+<exception name="ClientProtocolException" type="org.apache.http.client.ClientProtocolException">
+</exception>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="execute"
+ return="T"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="target" type="org.apache.http.HttpHost">
+</parameter>
+<parameter name="request" type="org.apache.http.HttpRequest">
+</parameter>
+<parameter name="responseHandler" type="org.apache.http.client.ResponseHandler&lt;? extends T&gt;">
+</parameter>
+<parameter name="context" type="org.apache.http.protocol.HttpContext">
+</parameter>
+<exception name="ClientProtocolException" type="org.apache.http.client.ClientProtocolException">
+</exception>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="getConnectionManager"
+ return="org.apache.http.conn.ClientConnectionManager"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getParams"
+ return="org.apache.http.params.HttpParams"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+</interface>
+<interface name="HttpRequestRetryHandler"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="retryRequest"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="exception" type="java.io.IOException">
+</parameter>
+<parameter name="executionCount" type="int">
+</parameter>
+<parameter name="context" type="org.apache.http.protocol.HttpContext">
+</parameter>
+</method>
+</interface>
+<class name="HttpResponseException"
+ extends="org.apache.http.client.ClientProtocolException"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="HttpResponseException"
+ type="org.apache.http.client.HttpResponseException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="statusCode" type="int">
+</parameter>
+<parameter name="s" type="java.lang.String">
+</parameter>
+</constructor>
+<method name="getStatusCode"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+</class>
+<class name="NonRepeatableRequestException"
+ extends="org.apache.http.ProtocolException"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="NonRepeatableRequestException"
+ type="org.apache.http.client.NonRepeatableRequestException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<constructor name="NonRepeatableRequestException"
+ type="org.apache.http.client.NonRepeatableRequestException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="message" type="java.lang.String">
+</parameter>
+</constructor>
+</class>
+<class name="RedirectException"
+ extends="org.apache.http.ProtocolException"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="RedirectException"
+ type="org.apache.http.client.RedirectException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<constructor name="RedirectException"
+ type="org.apache.http.client.RedirectException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="message" type="java.lang.String">
+</parameter>
+</constructor>
+<constructor name="RedirectException"
+ type="org.apache.http.client.RedirectException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="message" type="java.lang.String">
+</parameter>
+<parameter name="cause" type="java.lang.Throwable">
+</parameter>
+</constructor>
+</class>
+<interface name="RedirectHandler"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="getLocationURI"
+ return="java.net.URI"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="response" type="org.apache.http.HttpResponse">
+</parameter>
+<parameter name="context" type="org.apache.http.protocol.HttpContext">
+</parameter>
+<exception name="ProtocolException" type="org.apache.http.ProtocolException">
+</exception>
+</method>
+<method name="isRedirectRequested"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="response" type="org.apache.http.HttpResponse">
+</parameter>
+<parameter name="context" type="org.apache.http.protocol.HttpContext">
+</parameter>
+</method>
+</interface>
+<interface name="RequestDirector"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="execute"
+ return="org.apache.http.HttpResponse"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="target" type="org.apache.http.HttpHost">
+</parameter>
+<parameter name="request" type="org.apache.http.HttpRequest">
+</parameter>
+<parameter name="context" type="org.apache.http.protocol.HttpContext">
+</parameter>
+<exception name="HttpException" type="org.apache.http.HttpException">
+</exception>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+</interface>
+<interface name="ResponseHandler"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="handleResponse"
+ return="T"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="response" type="org.apache.http.HttpResponse">
+</parameter>
+<exception name="ClientProtocolException" type="org.apache.http.client.ClientProtocolException">
+</exception>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+</interface>
+<interface name="UserTokenHandler"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="getUserToken"
+ return="java.lang.Object"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="context" type="org.apache.http.protocol.HttpContext">
+</parameter>
+</method>
+</interface>
+</package>
+<package name="org.apache.http.client.entity"
+>
+<class name="UrlEncodedFormEntity"
+ extends="org.apache.http.entity.StringEntity"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="UrlEncodedFormEntity"
+ type="org.apache.http.client.entity.UrlEncodedFormEntity"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="parameters" type="java.util.List&lt;? extends org.apache.http.NameValuePair&gt;">
+</parameter>
+<parameter name="encoding" type="java.lang.String">
+</parameter>
+<exception name="UnsupportedEncodingException" type="java.io.UnsupportedEncodingException">
+</exception>
+</constructor>
+<constructor name="UrlEncodedFormEntity"
+ type="org.apache.http.client.entity.UrlEncodedFormEntity"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="parameters" type="java.util.List&lt;? extends org.apache.http.NameValuePair&gt;">
+</parameter>
+<exception name="UnsupportedEncodingException" type="java.io.UnsupportedEncodingException">
+</exception>
+</constructor>
+</class>
+</package>
+<package name="org.apache.http.client.methods"
+>
+<interface name="AbortableHttpRequest"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="abort"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="setConnectionRequest"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="connRequest" type="org.apache.http.conn.ClientConnectionRequest">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="setReleaseTrigger"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="releaseTrigger" type="org.apache.http.conn.ConnectionReleaseTrigger">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+</interface>
+<class name="HttpDelete"
+ extends="org.apache.http.client.methods.HttpRequestBase"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="HttpDelete"
+ type="org.apache.http.client.methods.HttpDelete"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<constructor name="HttpDelete"
+ type="org.apache.http.client.methods.HttpDelete"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="uri" type="java.net.URI">
+</parameter>
+</constructor>
+<constructor name="HttpDelete"
+ type="org.apache.http.client.methods.HttpDelete"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="uri" type="java.lang.String">
+</parameter>
+</constructor>
+<method name="getMethod"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<field name="METHOD_NAME"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;DELETE&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<class name="HttpEntityEnclosingRequestBase"
+ extends="org.apache.http.client.methods.HttpRequestBase"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="org.apache.http.HttpEntityEnclosingRequest">
+</implements>
+<constructor name="HttpEntityEnclosingRequestBase"
+ type="org.apache.http.client.methods.HttpEntityEnclosingRequestBase"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<method name="expectContinue"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getEntity"
+ return="org.apache.http.HttpEntity"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="setEntity"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="entity" type="org.apache.http.HttpEntity">
+</parameter>
+</method>
+</class>
+<class name="HttpGet"
+ extends="org.apache.http.client.methods.HttpRequestBase"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="HttpGet"
+ type="org.apache.http.client.methods.HttpGet"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<constructor name="HttpGet"
+ type="org.apache.http.client.methods.HttpGet"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="uri" type="java.net.URI">
+</parameter>
+</constructor>
+<constructor name="HttpGet"
+ type="org.apache.http.client.methods.HttpGet"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="uri" type="java.lang.String">
+</parameter>
+</constructor>
+<method name="getMethod"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<field name="METHOD_NAME"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;GET&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<class name="HttpHead"
+ extends="org.apache.http.client.methods.HttpRequestBase"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="HttpHead"
+ type="org.apache.http.client.methods.HttpHead"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<constructor name="HttpHead"
+ type="org.apache.http.client.methods.HttpHead"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="uri" type="java.net.URI">
+</parameter>
+</constructor>
+<constructor name="HttpHead"
+ type="org.apache.http.client.methods.HttpHead"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="uri" type="java.lang.String">
+</parameter>
+</constructor>
+<method name="getMethod"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<field name="METHOD_NAME"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;HEAD&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<class name="HttpOptions"
+ extends="org.apache.http.client.methods.HttpRequestBase"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="HttpOptions"
+ type="org.apache.http.client.methods.HttpOptions"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<constructor name="HttpOptions"
+ type="org.apache.http.client.methods.HttpOptions"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="uri" type="java.net.URI">
+</parameter>
+</constructor>
+<constructor name="HttpOptions"
+ type="org.apache.http.client.methods.HttpOptions"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="uri" type="java.lang.String">
+</parameter>
+</constructor>
+<method name="getAllowedMethods"
+ return="java.util.Set&lt;java.lang.String&gt;"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="response" type="org.apache.http.HttpResponse">
+</parameter>
+</method>
+<method name="getMethod"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<field name="METHOD_NAME"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;OPTIONS&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<class name="HttpPost"
+ extends="org.apache.http.client.methods.HttpEntityEnclosingRequestBase"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="HttpPost"
+ type="org.apache.http.client.methods.HttpPost"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<constructor name="HttpPost"
+ type="org.apache.http.client.methods.HttpPost"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="uri" type="java.net.URI">
+</parameter>
+</constructor>
+<constructor name="HttpPost"
+ type="org.apache.http.client.methods.HttpPost"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="uri" type="java.lang.String">
+</parameter>
+</constructor>
+<method name="getMethod"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<field name="METHOD_NAME"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;POST&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<class name="HttpPut"
+ extends="org.apache.http.client.methods.HttpEntityEnclosingRequestBase"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="HttpPut"
+ type="org.apache.http.client.methods.HttpPut"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<constructor name="HttpPut"
+ type="org.apache.http.client.methods.HttpPut"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="uri" type="java.net.URI">
+</parameter>
+</constructor>
+<constructor name="HttpPut"
+ type="org.apache.http.client.methods.HttpPut"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="uri" type="java.lang.String">
+</parameter>
+</constructor>
+<method name="getMethod"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<field name="METHOD_NAME"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;PUT&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<class name="HttpRequestBase"
+ extends="org.apache.http.message.AbstractHttpMessage"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="org.apache.http.client.methods.AbortableHttpRequest">
+</implements>
+<implements name="java.lang.Cloneable">
+</implements>
+<implements name="org.apache.http.client.methods.HttpUriRequest">
+</implements>
+<constructor name="HttpRequestBase"
+ type="org.apache.http.client.methods.HttpRequestBase"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<method name="abort"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="clone"
+ return="java.lang.Object"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="CloneNotSupportedException" type="java.lang.CloneNotSupportedException">
+</exception>
+</method>
+<method name="getMethod"
+ return="java.lang.String"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getProtocolVersion"
+ return="org.apache.http.ProtocolVersion"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getRequestLine"
+ return="org.apache.http.RequestLine"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getURI"
+ return="java.net.URI"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isAborted"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="setConnectionRequest"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="connRequest" type="org.apache.http.conn.ClientConnectionRequest">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="setReleaseTrigger"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="releaseTrigger" type="org.apache.http.conn.ConnectionReleaseTrigger">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="setURI"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="uri" type="java.net.URI">
+</parameter>
+</method>
+</class>
+<class name="HttpTrace"
+ extends="org.apache.http.client.methods.HttpRequestBase"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="HttpTrace"
+ type="org.apache.http.client.methods.HttpTrace"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<constructor name="HttpTrace"
+ type="org.apache.http.client.methods.HttpTrace"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="uri" type="java.net.URI">
+</parameter>
+</constructor>
+<constructor name="HttpTrace"
+ type="org.apache.http.client.methods.HttpTrace"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="uri" type="java.lang.String">
+</parameter>
+</constructor>
+<method name="getMethod"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<field name="METHOD_NAME"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;TRACE&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<interface name="HttpUriRequest"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="org.apache.http.HttpRequest">
+</implements>
+<method name="abort"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="UnsupportedOperationException" type="java.lang.UnsupportedOperationException">
+</exception>
+</method>
+<method name="getMethod"
+ return="java.lang.String"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getURI"
+ return="java.net.URI"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isAborted"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+</interface>
+</package>
+<package name="org.apache.http.client.params"
+>
+<interface name="AllClientPNames"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="org.apache.http.auth.params.AuthPNames">
+</implements>
+<implements name="org.apache.http.client.params.ClientPNames">
+</implements>
+<implements name="org.apache.http.conn.params.ConnConnectionPNames">
+</implements>
+<implements name="org.apache.http.conn.params.ConnManagerPNames">
+</implements>
+<implements name="org.apache.http.conn.params.ConnRoutePNames">
+</implements>
+<implements name="org.apache.http.cookie.params.CookieSpecPNames">
+</implements>
+<implements name="org.apache.http.params.CoreConnectionPNames">
+</implements>
+<implements name="org.apache.http.params.CoreProtocolPNames">
+</implements>
+</interface>
+<class name="AuthPolicy"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<field name="BASIC"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;Basic&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="DIGEST"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;Digest&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="NTLM"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;NTLM&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<interface name="ClientPNames"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<field name="ALLOW_CIRCULAR_REDIRECTS"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;http.protocol.allow-circular-redirects&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="CONNECTION_MANAGER_FACTORY"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;http.connection-manager.factory-object&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="CONNECTION_MANAGER_FACTORY_CLASS_NAME"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;http.connection-manager.factory-class-name&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="COOKIE_POLICY"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;http.protocol.cookie-policy&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="DEFAULT_HEADERS"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;http.default-headers&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="DEFAULT_HOST"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;http.default-host&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="HANDLE_AUTHENTICATION"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;http.protocol.handle-authentication&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="HANDLE_REDIRECTS"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;http.protocol.handle-redirects&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="MAX_REDIRECTS"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;http.protocol.max-redirects&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="REJECT_RELATIVE_REDIRECT"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;http.protocol.reject-relative-redirect&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="VIRTUAL_HOST"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;http.virtual-host&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</interface>
+<class name="ClientParamBean"
+ extends="org.apache.http.params.HttpAbstractParamBean"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="ClientParamBean"
+ type="org.apache.http.client.params.ClientParamBean"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="params" type="org.apache.http.params.HttpParams">
+</parameter>
+</constructor>
+<method name="setAllowCircularRedirects"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="allow" type="boolean">
+</parameter>
+</method>
+<method name="setConnectionManagerFactory"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="factory" type="org.apache.http.conn.ClientConnectionManagerFactory">
+</parameter>
+</method>
+<method name="setConnectionManagerFactoryClassName"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="factory" type="java.lang.String">
+</parameter>
+</method>
+<method name="setCookiePolicy"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="policy" type="java.lang.String">
+</parameter>
+</method>
+<method name="setDefaultHeaders"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="headers" type="java.util.Collection&lt;org.apache.http.Header&gt;">
+</parameter>
+</method>
+<method name="setDefaultHost"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="host" type="org.apache.http.HttpHost">
+</parameter>
+</method>
+<method name="setHandleAuthentication"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="handle" type="boolean">
+</parameter>
+</method>
+<method name="setHandleRedirects"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="handle" type="boolean">
+</parameter>
+</method>
+<method name="setMaxRedirects"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="maxRedirects" type="int">
+</parameter>
+</method>
+<method name="setRejectRelativeRedirect"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="reject" type="boolean">
+</parameter>
+</method>
+<method name="setVirtualHost"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="host" type="org.apache.http.HttpHost">
+</parameter>
+</method>
+</class>
+<class name="CookiePolicy"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<field name="BEST_MATCH"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;best-match&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="BROWSER_COMPATIBILITY"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;compatibility&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="NETSCAPE"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;netscape&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="RFC_2109"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;rfc2109&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="RFC_2965"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;rfc2965&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<class name="HttpClientParams"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="getCookiePolicy"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="params" type="org.apache.http.params.HttpParams">
+</parameter>
+</method>
+<method name="isAuthenticating"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="params" type="org.apache.http.params.HttpParams">
+</parameter>
+</method>
+<method name="isRedirecting"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="params" type="org.apache.http.params.HttpParams">
+</parameter>
+</method>
+<method name="setAuthenticating"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="params" type="org.apache.http.params.HttpParams">
+</parameter>
+<parameter name="value" type="boolean">
+</parameter>
+</method>
+<method name="setCookiePolicy"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="params" type="org.apache.http.params.HttpParams">
+</parameter>
+<parameter name="cookiePolicy" type="java.lang.String">
+</parameter>
+</method>
+<method name="setRedirecting"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="params" type="org.apache.http.params.HttpParams">
+</parameter>
+<parameter name="value" type="boolean">
+</parameter>
+</method>
+</class>
+</package>
+<package name="org.apache.http.client.protocol"
+>
+<interface name="ClientContext"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<field name="AUTHSCHEME_REGISTRY"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;http.authscheme-registry&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="AUTH_SCHEME_PREF"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;http.auth.scheme-pref&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="COOKIESPEC_REGISTRY"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;http.cookiespec-registry&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="COOKIE_ORIGIN"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;http.cookie-origin&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="COOKIE_SPEC"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;http.cookie-spec&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="COOKIE_STORE"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;http.cookie-store&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="CREDS_PROVIDER"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;http.auth.credentials-provider&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="PROXY_AUTH_STATE"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;http.auth.proxy-scope&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TARGET_AUTH_STATE"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;http.auth.target-scope&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="USER_TOKEN"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;http.user-token&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</interface>
+<class name="ClientContextConfigurer"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="org.apache.http.client.protocol.ClientContext">
+</implements>
+<constructor name="ClientContextConfigurer"
+ type="org.apache.http.client.protocol.ClientContextConfigurer"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="context" type="org.apache.http.protocol.HttpContext">
+</parameter>
+</constructor>
+<method name="setAuthSchemePref"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="list" type="java.util.List&lt;java.lang.String&gt;">
+</parameter>
+</method>
+<method name="setAuthSchemeRegistry"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="registry" type="org.apache.http.auth.AuthSchemeRegistry">
+</parameter>
+</method>
+<method name="setCookieSpecRegistry"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="registry" type="org.apache.http.cookie.CookieSpecRegistry">
+</parameter>
+</method>
+<method name="setCookieStore"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="store" type="org.apache.http.client.CookieStore">
+</parameter>
+</method>
+<method name="setCredentialsProvider"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="provider" type="org.apache.http.client.CredentialsProvider">
+</parameter>
+</method>
+</class>
+<class name="RequestAddCookies"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="org.apache.http.HttpRequestInterceptor">
+</implements>
+<constructor name="RequestAddCookies"
+ type="org.apache.http.client.protocol.RequestAddCookies"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<method name="process"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="request" type="org.apache.http.HttpRequest">
+</parameter>
+<parameter name="context" type="org.apache.http.protocol.HttpContext">
+</parameter>
+<exception name="HttpException" type="org.apache.http.HttpException">
+</exception>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+</class>
+<class name="RequestDefaultHeaders"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="org.apache.http.HttpRequestInterceptor">
+</implements>
+<constructor name="RequestDefaultHeaders"
+ type="org.apache.http.client.protocol.RequestDefaultHeaders"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<method name="process"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="request" type="org.apache.http.HttpRequest">
+</parameter>
+<parameter name="context" type="org.apache.http.protocol.HttpContext">
+</parameter>
+<exception name="HttpException" type="org.apache.http.HttpException">
+</exception>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+</class>
+<class name="RequestProxyAuthentication"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="org.apache.http.HttpRequestInterceptor">
+</implements>
+<constructor name="RequestProxyAuthentication"
+ type="org.apache.http.client.protocol.RequestProxyAuthentication"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<method name="process"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="request" type="org.apache.http.HttpRequest">
+</parameter>
+<parameter name="context" type="org.apache.http.protocol.HttpContext">
+</parameter>
+<exception name="HttpException" type="org.apache.http.HttpException">
+</exception>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+</class>
+<class name="RequestTargetAuthentication"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="org.apache.http.HttpRequestInterceptor">
+</implements>
+<constructor name="RequestTargetAuthentication"
+ type="org.apache.http.client.protocol.RequestTargetAuthentication"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<method name="process"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="request" type="org.apache.http.HttpRequest">
+</parameter>
+<parameter name="context" type="org.apache.http.protocol.HttpContext">
+</parameter>
+<exception name="HttpException" type="org.apache.http.HttpException">
+</exception>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+</class>
+<class name="ResponseProcessCookies"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="org.apache.http.HttpResponseInterceptor">
+</implements>
+<constructor name="ResponseProcessCookies"
+ type="org.apache.http.client.protocol.ResponseProcessCookies"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<method name="process"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="response" type="org.apache.http.HttpResponse">
+</parameter>
+<parameter name="context" type="org.apache.http.protocol.HttpContext">
+</parameter>
+<exception name="HttpException" type="org.apache.http.HttpException">
+</exception>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+</class>
+</package>
+<package name="org.apache.http.client.utils"
+>
+<class name="CloneUtils"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="clone"
+ return="java.lang.Object"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="obj" type="java.lang.Object">
+</parameter>
+<exception name="CloneNotSupportedException" type="java.lang.CloneNotSupportedException">
+</exception>
+</method>
+</class>
+<class name="URIUtils"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="createURI"
+ return="java.net.URI"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="scheme" type="java.lang.String">
+</parameter>
+<parameter name="host" type="java.lang.String">
+</parameter>
+<parameter name="port" type="int">
+</parameter>
+<parameter name="path" type="java.lang.String">
+</parameter>
+<parameter name="query" type="java.lang.String">
+</parameter>
+<parameter name="fragment" type="java.lang.String">
+</parameter>
+<exception name="URISyntaxException" type="java.net.URISyntaxException">
+</exception>
+</method>
+<method name="resolve"
+ return="java.net.URI"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="baseURI" type="java.net.URI">
+</parameter>
+<parameter name="reference" type="java.lang.String">
+</parameter>
+</method>
+<method name="resolve"
+ return="java.net.URI"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="baseURI" type="java.net.URI">
+</parameter>
+<parameter name="reference" type="java.net.URI">
+</parameter>
+</method>
+<method name="rewriteURI"
+ return="java.net.URI"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="uri" type="java.net.URI">
+</parameter>
+<parameter name="target" type="org.apache.http.HttpHost">
+</parameter>
+<parameter name="dropFragment" type="boolean">
+</parameter>
+<exception name="URISyntaxException" type="java.net.URISyntaxException">
+</exception>
+</method>
+<method name="rewriteURI"
+ return="java.net.URI"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="uri" type="java.net.URI">
+</parameter>
+<parameter name="target" type="org.apache.http.HttpHost">
+</parameter>
+<exception name="URISyntaxException" type="java.net.URISyntaxException">
+</exception>
+</method>
+</class>
+<class name="URLEncodedUtils"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="URLEncodedUtils"
+ type="org.apache.http.client.utils.URLEncodedUtils"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<method name="format"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="parameters" type="java.util.List&lt;? extends org.apache.http.NameValuePair&gt;">
+</parameter>
+<parameter name="encoding" type="java.lang.String">
+</parameter>
+</method>
+<method name="isEncoded"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="entity" type="org.apache.http.HttpEntity">
+</parameter>
+</method>
+<method name="parse"
+ return="java.util.List&lt;org.apache.http.NameValuePair&gt;"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="uri" type="java.net.URI">
+</parameter>
+<parameter name="encoding" type="java.lang.String">
+</parameter>
+</method>
+<method name="parse"
+ return="java.util.List&lt;org.apache.http.NameValuePair&gt;"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="entity" type="org.apache.http.HttpEntity">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="parse"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="parameters" type="java.util.List&lt;org.apache.http.NameValuePair&gt;">
+</parameter>
+<parameter name="scanner" type="java.util.Scanner">
+</parameter>
+<parameter name="encoding" type="java.lang.String">
+</parameter>
+</method>
+<field name="CONTENT_TYPE"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;application/x-www-form-urlencoded&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+</package>
+<package name="org.apache.http.conn"
+>
+<class name="BasicEofSensorWatcher"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="org.apache.http.conn.EofSensorWatcher">
+</implements>
+<constructor name="BasicEofSensorWatcher"
+ type="org.apache.http.conn.BasicEofSensorWatcher"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="conn" type="org.apache.http.conn.ManagedClientConnection">
+</parameter>
+<parameter name="reuse" type="boolean">
+</parameter>
+</constructor>
+<method name="eofDetected"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="wrapped" type="java.io.InputStream">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="streamAbort"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="wrapped" type="java.io.InputStream">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="streamClosed"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="wrapped" type="java.io.InputStream">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<field name="attemptReuse"
+ type="boolean"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</field>
+<field name="managedConn"
+ type="org.apache.http.conn.ManagedClientConnection"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</field>
+</class>
+<class name="BasicManagedEntity"
+ extends="org.apache.http.entity.HttpEntityWrapper"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="org.apache.http.conn.ConnectionReleaseTrigger">
+</implements>
+<implements name="org.apache.http.conn.EofSensorWatcher">
+</implements>
+<constructor name="BasicManagedEntity"
+ type="org.apache.http.conn.BasicManagedEntity"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="entity" type="org.apache.http.HttpEntity">
+</parameter>
+<parameter name="conn" type="org.apache.http.conn.ManagedClientConnection">
+</parameter>
+<parameter name="reuse" type="boolean">
+</parameter>
+</constructor>
+<method name="abortConnection"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="eofDetected"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="wrapped" type="java.io.InputStream">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="releaseConnection"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="releaseManagedConnection"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="streamAbort"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="wrapped" type="java.io.InputStream">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="streamClosed"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="wrapped" type="java.io.InputStream">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<field name="attemptReuse"
+ type="boolean"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</field>
+<field name="managedConn"
+ type="org.apache.http.conn.ManagedClientConnection"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</field>
+</class>
+<interface name="ClientConnectionManager"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="closeExpiredConnections"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="closeIdleConnections"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="idletime" type="long">
+</parameter>
+<parameter name="tunit" type="java.util.concurrent.TimeUnit">
+</parameter>
+</method>
+<method name="getSchemeRegistry"
+ return="org.apache.http.conn.scheme.SchemeRegistry"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="releaseConnection"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="conn" type="org.apache.http.conn.ManagedClientConnection">
+</parameter>
+<parameter name="validDuration" type="long">
+</parameter>
+<parameter name="timeUnit" type="java.util.concurrent.TimeUnit">
+</parameter>
+</method>
+<method name="requestConnection"
+ return="org.apache.http.conn.ClientConnectionRequest"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="route" type="org.apache.http.conn.routing.HttpRoute">
+</parameter>
+<parameter name="state" type="java.lang.Object">
+</parameter>
+</method>
+<method name="shutdown"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+</interface>
+<interface name="ClientConnectionManagerFactory"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="newInstance"
+ return="org.apache.http.conn.ClientConnectionManager"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="params" type="org.apache.http.params.HttpParams">
+</parameter>
+<parameter name="schemeRegistry" type="org.apache.http.conn.scheme.SchemeRegistry">
+</parameter>
+</method>
+</interface>
+<interface name="ClientConnectionOperator"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="createConnection"
+ return="org.apache.http.conn.OperatedClientConnection"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="openConnection"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="conn" type="org.apache.http.conn.OperatedClientConnection">
+</parameter>
+<parameter name="target" type="org.apache.http.HttpHost">
+</parameter>
+<parameter name="local" type="java.net.InetAddress">
+</parameter>
+<parameter name="context" type="org.apache.http.protocol.HttpContext">
+</parameter>
+<parameter name="params" type="org.apache.http.params.HttpParams">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="updateSecureConnection"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="conn" type="org.apache.http.conn.OperatedClientConnection">
+</parameter>
+<parameter name="target" type="org.apache.http.HttpHost">
+</parameter>
+<parameter name="context" type="org.apache.http.protocol.HttpContext">
+</parameter>
+<parameter name="params" type="org.apache.http.params.HttpParams">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+</interface>
+<interface name="ClientConnectionRequest"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="abortRequest"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getConnection"
+ return="org.apache.http.conn.ManagedClientConnection"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="timeout" type="long">
+</parameter>
+<parameter name="tunit" type="java.util.concurrent.TimeUnit">
+</parameter>
+<exception name="ConnectionPoolTimeoutException" type="org.apache.http.conn.ConnectionPoolTimeoutException">
+</exception>
+<exception name="InterruptedException" type="java.lang.InterruptedException">
+</exception>
+</method>
+</interface>
+<class name="ConnectTimeoutException"
+ extends="java.io.InterruptedIOException"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="ConnectTimeoutException"
+ type="org.apache.http.conn.ConnectTimeoutException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<constructor name="ConnectTimeoutException"
+ type="org.apache.http.conn.ConnectTimeoutException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="message" type="java.lang.String">
+</parameter>
+</constructor>
+</class>
+<interface name="ConnectionKeepAliveStrategy"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="getKeepAliveDuration"
+ return="long"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="response" type="org.apache.http.HttpResponse">
+</parameter>
+<parameter name="context" type="org.apache.http.protocol.HttpContext">
+</parameter>
+</method>
+</interface>
+<class name="ConnectionPoolTimeoutException"
+ extends="org.apache.http.conn.ConnectTimeoutException"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="ConnectionPoolTimeoutException"
+ type="org.apache.http.conn.ConnectionPoolTimeoutException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<constructor name="ConnectionPoolTimeoutException"
+ type="org.apache.http.conn.ConnectionPoolTimeoutException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="message" type="java.lang.String">
+</parameter>
+</constructor>
+</class>
+<interface name="ConnectionReleaseTrigger"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="abortConnection"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="releaseConnection"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+</interface>
+<class name="EofSensorInputStream"
+ extends="java.io.InputStream"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="org.apache.http.conn.ConnectionReleaseTrigger">
+</implements>
+<constructor name="EofSensorInputStream"
+ type="org.apache.http.conn.EofSensorInputStream"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="in" type="java.io.InputStream">
+</parameter>
+<parameter name="watcher" type="org.apache.http.conn.EofSensorWatcher">
+</parameter>
+</constructor>
+<method name="abortConnection"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="checkAbort"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="checkClose"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="checkEOF"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="eof" type="int">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="isReadAllowed"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="read"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="releaseConnection"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<field name="wrappedStream"
+ type="java.io.InputStream"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</field>
+</class>
+<interface name="EofSensorWatcher"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="eofDetected"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="wrapped" type="java.io.InputStream">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="streamAbort"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="wrapped" type="java.io.InputStream">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="streamClosed"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="wrapped" type="java.io.InputStream">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+</interface>
+<class name="HttpHostConnectException"
+ extends="java.net.ConnectException"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="HttpHostConnectException"
+ type="org.apache.http.conn.HttpHostConnectException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="host" type="org.apache.http.HttpHost">
+</parameter>
+<parameter name="cause" type="java.net.ConnectException">
+</parameter>
+</constructor>
+<method name="getHost"
+ return="org.apache.http.HttpHost"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+</class>
+<interface name="ManagedClientConnection"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="org.apache.http.conn.ConnectionReleaseTrigger">
+</implements>
+<implements name="org.apache.http.HttpClientConnection">
+</implements>
+<implements name="org.apache.http.HttpInetConnection">
+</implements>
+<method name="getRoute"
+ return="org.apache.http.conn.routing.HttpRoute"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getSSLSession"
+ return="javax.net.ssl.SSLSession"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getState"
+ return="java.lang.Object"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isMarkedReusable"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isSecure"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="layerProtocol"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="context" type="org.apache.http.protocol.HttpContext">
+</parameter>
+<parameter name="params" type="org.apache.http.params.HttpParams">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="markReusable"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="open"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="route" type="org.apache.http.conn.routing.HttpRoute">
+</parameter>
+<parameter name="context" type="org.apache.http.protocol.HttpContext">
+</parameter>
+<parameter name="params" type="org.apache.http.params.HttpParams">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="setIdleDuration"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="duration" type="long">
+</parameter>
+<parameter name="unit" type="java.util.concurrent.TimeUnit">
+</parameter>
+</method>
+<method name="setState"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="state" type="java.lang.Object">
+</parameter>
+</method>
+<method name="tunnelProxy"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="next" type="org.apache.http.HttpHost">
+</parameter>
+<parameter name="secure" type="boolean">
+</parameter>
+<parameter name="params" type="org.apache.http.params.HttpParams">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="tunnelTarget"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="secure" type="boolean">
+</parameter>
+<parameter name="params" type="org.apache.http.params.HttpParams">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="unmarkReusable"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+</interface>
+<class name="MultihomePlainSocketFactory"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="org.apache.http.conn.scheme.SocketFactory">
+</implements>
+<method name="connectSocket"
+ return="java.net.Socket"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="sock" type="java.net.Socket">
+</parameter>
+<parameter name="host" type="java.lang.String">
+</parameter>
+<parameter name="port" type="int">
+</parameter>
+<parameter name="localAddress" type="java.net.InetAddress">
+</parameter>
+<parameter name="localPort" type="int">
+</parameter>
+<parameter name="params" type="org.apache.http.params.HttpParams">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="createSocket"
+ return="java.net.Socket"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getSocketFactory"
+ return="org.apache.http.conn.MultihomePlainSocketFactory"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isSecure"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="sock" type="java.net.Socket">
+</parameter>
+<exception name="IllegalArgumentException" type="java.lang.IllegalArgumentException">
+</exception>
+</method>
+</class>
+<interface name="OperatedClientConnection"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="org.apache.http.HttpClientConnection">
+</implements>
+<implements name="org.apache.http.HttpInetConnection">
+</implements>
+<method name="getSocket"
+ return="java.net.Socket"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getTargetHost"
+ return="org.apache.http.HttpHost"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isSecure"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="openCompleted"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="secure" type="boolean">
+</parameter>
+<parameter name="params" type="org.apache.http.params.HttpParams">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="opening"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="sock" type="java.net.Socket">
+</parameter>
+<parameter name="target" type="org.apache.http.HttpHost">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="update"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="sock" type="java.net.Socket">
+</parameter>
+<parameter name="target" type="org.apache.http.HttpHost">
+</parameter>
+<parameter name="secure" type="boolean">
+</parameter>
+<parameter name="params" type="org.apache.http.params.HttpParams">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+</interface>
+</package>
+<package name="org.apache.http.conn.params"
+>
+<interface name="ConnConnectionPNames"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<field name="MAX_STATUS_LINE_GARBAGE"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;http.connection.max-status-line-garbage&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</interface>
+<class name="ConnConnectionParamBean"
+ extends="org.apache.http.params.HttpAbstractParamBean"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="ConnConnectionParamBean"
+ type="org.apache.http.conn.params.ConnConnectionParamBean"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="params" type="org.apache.http.params.HttpParams">
+</parameter>
+</constructor>
+<method name="setMaxStatusLineGarbage"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="maxStatusLineGarbage" type="int">
+</parameter>
+</method>
+</class>
+<interface name="ConnManagerPNames"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<field name="MAX_CONNECTIONS_PER_ROUTE"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;http.conn-manager.max-per-route&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="MAX_TOTAL_CONNECTIONS"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;http.conn-manager.max-total&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TIMEOUT"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;http.conn-manager.timeout&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</interface>
+<class name="ConnManagerParamBean"
+ extends="org.apache.http.params.HttpAbstractParamBean"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="ConnManagerParamBean"
+ type="org.apache.http.conn.params.ConnManagerParamBean"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="params" type="org.apache.http.params.HttpParams">
+</parameter>
+</constructor>
+<method name="setConnectionsPerRoute"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="connPerRoute" type="org.apache.http.conn.params.ConnPerRouteBean">
+</parameter>
+</method>
+<method name="setMaxTotalConnections"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="maxConnections" type="int">
+</parameter>
+</method>
+<method name="setTimeout"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="timeout" type="long">
+</parameter>
+</method>
+</class>
+<class name="ConnManagerParams"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="org.apache.http.conn.params.ConnManagerPNames">
+</implements>
+<constructor name="ConnManagerParams"
+ type="org.apache.http.conn.params.ConnManagerParams"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<method name="getMaxConnectionsPerRoute"
+ return="org.apache.http.conn.params.ConnPerRoute"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="params" type="org.apache.http.params.HttpParams">
+</parameter>
+</method>
+<method name="getMaxTotalConnections"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="params" type="org.apache.http.params.HttpParams">
+</parameter>
+</method>
+<method name="getTimeout"
+ return="long"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="params" type="org.apache.http.params.HttpParams">
+</parameter>
+</method>
+<method name="setMaxConnectionsPerRoute"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="params" type="org.apache.http.params.HttpParams">
+</parameter>
+<parameter name="connPerRoute" type="org.apache.http.conn.params.ConnPerRoute">
+</parameter>
+</method>
+<method name="setMaxTotalConnections"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="params" type="org.apache.http.params.HttpParams">
+</parameter>
+<parameter name="maxTotalConnections" type="int">
+</parameter>
+</method>
+<method name="setTimeout"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="params" type="org.apache.http.params.HttpParams">
+</parameter>
+<parameter name="timeout" type="long">
+</parameter>
+</method>
+<field name="DEFAULT_MAX_TOTAL_CONNECTIONS"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="20"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<interface name="ConnPerRoute"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="getMaxForRoute"
+ return="int"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="route" type="org.apache.http.conn.routing.HttpRoute">
+</parameter>
+</method>
+</interface>
+<class name="ConnPerRouteBean"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="org.apache.http.conn.params.ConnPerRoute">
+</implements>
+<constructor name="ConnPerRouteBean"
+ type="org.apache.http.conn.params.ConnPerRouteBean"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="defaultMax" type="int">
+</parameter>
+</constructor>
+<constructor name="ConnPerRouteBean"
+ type="org.apache.http.conn.params.ConnPerRouteBean"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<method name="getDefaultMax"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getMaxForRoute"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="route" type="org.apache.http.conn.routing.HttpRoute">
+</parameter>
+</method>
+<method name="setDefaultMaxPerRoute"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="max" type="int">
+</parameter>
+</method>
+<method name="setMaxForRoute"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="route" type="org.apache.http.conn.routing.HttpRoute">
+</parameter>
+<parameter name="max" type="int">
+</parameter>
+</method>
+<method name="setMaxForRoutes"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="map" type="java.util.Map&lt;org.apache.http.conn.routing.HttpRoute, java.lang.Integer&gt;">
+</parameter>
+</method>
+<field name="DEFAULT_MAX_CONNECTIONS_PER_ROUTE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<interface name="ConnRoutePNames"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<field name="DEFAULT_PROXY"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;http.route.default-proxy&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="FORCED_ROUTE"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;http.route.forced-route&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="LOCAL_ADDRESS"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;http.route.local-address&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</interface>
+<class name="ConnRouteParamBean"
+ extends="org.apache.http.params.HttpAbstractParamBean"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="ConnRouteParamBean"
+ type="org.apache.http.conn.params.ConnRouteParamBean"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="params" type="org.apache.http.params.HttpParams">
+</parameter>
+</constructor>
+<method name="setDefaultProxy"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="defaultProxy" type="org.apache.http.HttpHost">
+</parameter>
+</method>
+<method name="setForcedRoute"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="route" type="org.apache.http.conn.routing.HttpRoute">
+</parameter>
+</method>
+<method name="setLocalAddress"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="address" type="java.net.InetAddress">
+</parameter>
+</method>
+</class>
+<class name="ConnRouteParams"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="org.apache.http.conn.params.ConnRoutePNames">
+</implements>
+<method name="getDefaultProxy"
+ return="org.apache.http.HttpHost"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="params" type="org.apache.http.params.HttpParams">
+</parameter>
+</method>
+<method name="getForcedRoute"
+ return="org.apache.http.conn.routing.HttpRoute"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="params" type="org.apache.http.params.HttpParams">
+</parameter>
+</method>
+<method name="getLocalAddress"
+ return="java.net.InetAddress"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="params" type="org.apache.http.params.HttpParams">
+</parameter>
+</method>
+<method name="setDefaultProxy"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="params" type="org.apache.http.params.HttpParams">
+</parameter>
+<parameter name="proxy" type="org.apache.http.HttpHost">
+</parameter>
+</method>
+<method name="setForcedRoute"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="params" type="org.apache.http.params.HttpParams">
+</parameter>
+<parameter name="route" type="org.apache.http.conn.routing.HttpRoute">
+</parameter>
+</method>
+<method name="setLocalAddress"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="params" type="org.apache.http.params.HttpParams">
+</parameter>
+<parameter name="local" type="java.net.InetAddress">
+</parameter>
+</method>
+<field name="NO_HOST"
+ type="org.apache.http.HttpHost"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="NO_ROUTE"
+ type="org.apache.http.conn.routing.HttpRoute"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+</package>
+<package name="org.apache.http.conn.routing"
+>
+<class name="BasicRouteDirector"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="org.apache.http.conn.routing.HttpRouteDirector">
+</implements>
+<constructor name="BasicRouteDirector"
+ type="org.apache.http.conn.routing.BasicRouteDirector"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<method name="directStep"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="plan" type="org.apache.http.conn.routing.RouteInfo">
+</parameter>
+<parameter name="fact" type="org.apache.http.conn.routing.RouteInfo">
+</parameter>
+</method>
+<method name="firstStep"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="plan" type="org.apache.http.conn.routing.RouteInfo">
+</parameter>
+</method>
+<method name="nextStep"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="plan" type="org.apache.http.conn.routing.RouteInfo">
+</parameter>
+<parameter name="fact" type="org.apache.http.conn.routing.RouteInfo">
+</parameter>
+</method>
+<method name="proxiedStep"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="plan" type="org.apache.http.conn.routing.RouteInfo">
+</parameter>
+<parameter name="fact" type="org.apache.http.conn.routing.RouteInfo">
+</parameter>
+</method>
+</class>
+<class name="HttpRoute"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="java.lang.Cloneable">
+</implements>
+<implements name="org.apache.http.conn.routing.RouteInfo">
+</implements>
+<constructor name="HttpRoute"
+ type="org.apache.http.conn.routing.HttpRoute"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="target" type="org.apache.http.HttpHost">
+</parameter>
+<parameter name="local" type="java.net.InetAddress">
+</parameter>
+<parameter name="proxies" type="org.apache.http.HttpHost[]">
+</parameter>
+<parameter name="secure" type="boolean">
+</parameter>
+<parameter name="tunnelled" type="org.apache.http.conn.routing.RouteInfo.TunnelType">
+</parameter>
+<parameter name="layered" type="org.apache.http.conn.routing.RouteInfo.LayerType">
+</parameter>
+</constructor>
+<constructor name="HttpRoute"
+ type="org.apache.http.conn.routing.HttpRoute"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="target" type="org.apache.http.HttpHost">
+</parameter>
+<parameter name="local" type="java.net.InetAddress">
+</parameter>
+<parameter name="proxy" type="org.apache.http.HttpHost">
+</parameter>
+<parameter name="secure" type="boolean">
+</parameter>
+<parameter name="tunnelled" type="org.apache.http.conn.routing.RouteInfo.TunnelType">
+</parameter>
+<parameter name="layered" type="org.apache.http.conn.routing.RouteInfo.LayerType">
+</parameter>
+</constructor>
+<constructor name="HttpRoute"
+ type="org.apache.http.conn.routing.HttpRoute"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="target" type="org.apache.http.HttpHost">
+</parameter>
+<parameter name="local" type="java.net.InetAddress">
+</parameter>
+<parameter name="secure" type="boolean">
+</parameter>
+</constructor>
+<constructor name="HttpRoute"
+ type="org.apache.http.conn.routing.HttpRoute"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="target" type="org.apache.http.HttpHost">
+</parameter>
+</constructor>
+<constructor name="HttpRoute"
+ type="org.apache.http.conn.routing.HttpRoute"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="target" type="org.apache.http.HttpHost">
+</parameter>
+<parameter name="local" type="java.net.InetAddress">
+</parameter>
+<parameter name="proxy" type="org.apache.http.HttpHost">
+</parameter>
+<parameter name="secure" type="boolean">
+</parameter>
+</constructor>
+<method name="clone"
+ return="java.lang.Object"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="CloneNotSupportedException" type="java.lang.CloneNotSupportedException">
+</exception>
+</method>
+<method name="equals"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="o" type="java.lang.Object">
+</parameter>
+</method>
+<method name="getHopCount"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getHopTarget"
+ return="org.apache.http.HttpHost"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="hop" type="int">
+</parameter>
+</method>
+<method name="getLayerType"
+ return="org.apache.http.conn.routing.RouteInfo.LayerType"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getLocalAddress"
+ return="java.net.InetAddress"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getProxyHost"
+ return="org.apache.http.HttpHost"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getTargetHost"
+ return="org.apache.http.HttpHost"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getTunnelType"
+ return="org.apache.http.conn.routing.RouteInfo.TunnelType"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="hashCode"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isLayered"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isSecure"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isTunnelled"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="toString"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+</class>
+<interface name="HttpRouteDirector"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="nextStep"
+ return="int"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="plan" type="org.apache.http.conn.routing.RouteInfo">
+</parameter>
+<parameter name="fact" type="org.apache.http.conn.routing.RouteInfo">
+</parameter>
+</method>
+<field name="COMPLETE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="0"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="CONNECT_PROXY"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="CONNECT_TARGET"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="LAYER_PROTOCOL"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="5"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TUNNEL_PROXY"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="4"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TUNNEL_TARGET"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="3"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="UNREACHABLE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="-1"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</interface>
+<interface name="HttpRoutePlanner"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="determineRoute"
+ return="org.apache.http.conn.routing.HttpRoute"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="target" type="org.apache.http.HttpHost">
+</parameter>
+<parameter name="request" type="org.apache.http.HttpRequest">
+</parameter>
+<parameter name="context" type="org.apache.http.protocol.HttpContext">
+</parameter>
+<exception name="HttpException" type="org.apache.http.HttpException">
+</exception>
+</method>
+</interface>
+<interface name="RouteInfo"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="getHopCount"
+ return="int"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getHopTarget"
+ return="org.apache.http.HttpHost"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="hop" type="int">
+</parameter>
+</method>
+<method name="getLayerType"
+ return="org.apache.http.conn.routing.RouteInfo.LayerType"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getLocalAddress"
+ return="java.net.InetAddress"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getProxyHost"
+ return="org.apache.http.HttpHost"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getTargetHost"
+ return="org.apache.http.HttpHost"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getTunnelType"
+ return="org.apache.http.conn.routing.RouteInfo.TunnelType"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isLayered"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isSecure"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isTunnelled"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+</interface>
+<class name="RouteInfo.LayerType"
+ extends="java.lang.Enum"
+ abstract="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="valueOf"
+ return="org.apache.http.conn.routing.RouteInfo.LayerType"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+</method>
+<method name="values"
+ return="org.apache.http.conn.routing.RouteInfo.LayerType[]"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+</class>
+<class name="RouteInfo.TunnelType"
+ extends="java.lang.Enum"
+ abstract="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="valueOf"
+ return="org.apache.http.conn.routing.RouteInfo.TunnelType"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+</method>
+<method name="values"
+ return="org.apache.http.conn.routing.RouteInfo.TunnelType[]"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+</class>
+<class name="RouteTracker"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="java.lang.Cloneable">
+</implements>
+<implements name="org.apache.http.conn.routing.RouteInfo">
+</implements>
+<constructor name="RouteTracker"
+ type="org.apache.http.conn.routing.RouteTracker"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="target" type="org.apache.http.HttpHost">
+</parameter>
+<parameter name="local" type="java.net.InetAddress">
+</parameter>
+</constructor>
+<constructor name="RouteTracker"
+ type="org.apache.http.conn.routing.RouteTracker"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="route" type="org.apache.http.conn.routing.HttpRoute">
+</parameter>
+</constructor>
+<method name="clone"
+ return="java.lang.Object"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="CloneNotSupportedException" type="java.lang.CloneNotSupportedException">
+</exception>
+</method>
+<method name="connectProxy"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="proxy" type="org.apache.http.HttpHost">
+</parameter>
+<parameter name="secure" type="boolean">
+</parameter>
+</method>
+<method name="connectTarget"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="secure" type="boolean">
+</parameter>
+</method>
+<method name="equals"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="o" type="java.lang.Object">
+</parameter>
+</method>
+<method name="getHopCount"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getHopTarget"
+ return="org.apache.http.HttpHost"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="hop" type="int">
+</parameter>
+</method>
+<method name="getLayerType"
+ return="org.apache.http.conn.routing.RouteInfo.LayerType"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getLocalAddress"
+ return="java.net.InetAddress"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getProxyHost"
+ return="org.apache.http.HttpHost"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getTargetHost"
+ return="org.apache.http.HttpHost"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getTunnelType"
+ return="org.apache.http.conn.routing.RouteInfo.TunnelType"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="hashCode"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isConnected"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isLayered"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isSecure"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isTunnelled"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="layerProtocol"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="secure" type="boolean">
+</parameter>
+</method>
+<method name="toRoute"
+ return="org.apache.http.conn.routing.HttpRoute"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="toString"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="tunnelProxy"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="proxy" type="org.apache.http.HttpHost">
+</parameter>
+<parameter name="secure" type="boolean">
+</parameter>
+</method>
+<method name="tunnelTarget"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="secure" type="boolean">
+</parameter>
+</method>
+</class>
+</package>
+<package name="org.apache.http.conn.scheme"
+>
+<interface name="HostNameResolver"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="resolve"
+ return="java.net.InetAddress"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="hostname" type="java.lang.String">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+</interface>
+<interface name="LayeredSocketFactory"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="org.apache.http.conn.scheme.SocketFactory">
+</implements>
+<method name="createSocket"
+ return="java.net.Socket"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="socket" type="java.net.Socket">
+</parameter>
+<parameter name="host" type="java.lang.String">
+</parameter>
+<parameter name="port" type="int">
+</parameter>
+<parameter name="autoClose" type="boolean">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+<exception name="UnknownHostException" type="java.net.UnknownHostException">
+</exception>
+</method>
+</interface>
+<class name="PlainSocketFactory"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="org.apache.http.conn.scheme.SocketFactory">
+</implements>
+<constructor name="PlainSocketFactory"
+ type="org.apache.http.conn.scheme.PlainSocketFactory"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="nameResolver" type="org.apache.http.conn.scheme.HostNameResolver">
+</parameter>
+</constructor>
+<constructor name="PlainSocketFactory"
+ type="org.apache.http.conn.scheme.PlainSocketFactory"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<method name="connectSocket"
+ return="java.net.Socket"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="sock" type="java.net.Socket">
+</parameter>
+<parameter name="host" type="java.lang.String">
+</parameter>
+<parameter name="port" type="int">
+</parameter>
+<parameter name="localAddress" type="java.net.InetAddress">
+</parameter>
+<parameter name="localPort" type="int">
+</parameter>
+<parameter name="params" type="org.apache.http.params.HttpParams">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="createSocket"
+ return="java.net.Socket"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getSocketFactory"
+ return="org.apache.http.conn.scheme.PlainSocketFactory"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isSecure"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="sock" type="java.net.Socket">
+</parameter>
+<exception name="IllegalArgumentException" type="java.lang.IllegalArgumentException">
+</exception>
+</method>
+</class>
+<class name="Scheme"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="Scheme"
+ type="org.apache.http.conn.scheme.Scheme"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+<parameter name="factory" type="org.apache.http.conn.scheme.SocketFactory">
+</parameter>
+<parameter name="port" type="int">
+</parameter>
+</constructor>
+<method name="equals"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="obj" type="java.lang.Object">
+</parameter>
+</method>
+<method name="getDefaultPort"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getName"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getSocketFactory"
+ return="org.apache.http.conn.scheme.SocketFactory"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isLayered"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="resolvePort"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="port" type="int">
+</parameter>
+</method>
+<method name="toString"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+</class>
+<class name="SchemeRegistry"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="SchemeRegistry"
+ type="org.apache.http.conn.scheme.SchemeRegistry"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<method name="get"
+ return="org.apache.http.conn.scheme.Scheme"
+ abstract="false"
+ native="false"
+ synchronized="true"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+</method>
+<method name="getScheme"
+ return="org.apache.http.conn.scheme.Scheme"
+ abstract="false"
+ native="false"
+ synchronized="true"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+</method>
+<method name="getScheme"
+ return="org.apache.http.conn.scheme.Scheme"
+ abstract="false"
+ native="false"
+ synchronized="true"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="host" type="org.apache.http.HttpHost">
+</parameter>
+</method>
+<method name="getSchemeNames"
+ return="java.util.List&lt;java.lang.String&gt;"
+ abstract="false"
+ native="false"
+ synchronized="true"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="register"
+ return="org.apache.http.conn.scheme.Scheme"
+ abstract="false"
+ native="false"
+ synchronized="true"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="sch" type="org.apache.http.conn.scheme.Scheme">
+</parameter>
+</method>
+<method name="setItems"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="map" type="java.util.Map&lt;java.lang.String, org.apache.http.conn.scheme.Scheme&gt;">
+</parameter>
+</method>
+<method name="unregister"
+ return="org.apache.http.conn.scheme.Scheme"
+ abstract="false"
+ native="false"
+ synchronized="true"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+</method>
+</class>
+<interface name="SocketFactory"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="connectSocket"
+ return="java.net.Socket"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="sock" type="java.net.Socket">
+</parameter>
+<parameter name="host" type="java.lang.String">
+</parameter>
+<parameter name="port" type="int">
+</parameter>
+<parameter name="localAddress" type="java.net.InetAddress">
+</parameter>
+<parameter name="localPort" type="int">
+</parameter>
+<parameter name="params" type="org.apache.http.params.HttpParams">
+</parameter>
+<exception name="ConnectTimeoutException" type="org.apache.http.conn.ConnectTimeoutException">
+</exception>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+<exception name="UnknownHostException" type="java.net.UnknownHostException">
+</exception>
+</method>
+<method name="createSocket"
+ return="java.net.Socket"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="isSecure"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="sock" type="java.net.Socket">
+</parameter>
+<exception name="IllegalArgumentException" type="java.lang.IllegalArgumentException">
+</exception>
+</method>
+</interface>
+</package>
+<package name="org.apache.http.conn.ssl"
+>
+<class name="AbstractVerifier"
+ extends="java.lang.Object"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="org.apache.http.conn.ssl.X509HostnameVerifier">
+</implements>
+<constructor name="AbstractVerifier"
+ type="org.apache.http.conn.ssl.AbstractVerifier"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<method name="acceptableCountryWildcard"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="cn" type="java.lang.String">
+</parameter>
+</method>
+<method name="countDots"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="s" type="java.lang.String">
+</parameter>
+</method>
+<method name="getCNs"
+ return="java.lang.String[]"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="cert" type="java.security.cert.X509Certificate">
+</parameter>
+</method>
+<method name="getDNSSubjectAlts"
+ return="java.lang.String[]"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="cert" type="java.security.cert.X509Certificate">
+</parameter>
+</method>
+<method name="verify"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="host" type="java.lang.String">
+</parameter>
+<parameter name="ssl" type="javax.net.ssl.SSLSocket">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="verify"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="host" type="java.lang.String">
+</parameter>
+<parameter name="session" type="javax.net.ssl.SSLSession">
+</parameter>
+</method>
+<method name="verify"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="host" type="java.lang.String">
+</parameter>
+<parameter name="cert" type="java.security.cert.X509Certificate">
+</parameter>
+<exception name="SSLException" type="javax.net.ssl.SSLException">
+</exception>
+</method>
+<method name="verify"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="host" type="java.lang.String">
+</parameter>
+<parameter name="cns" type="java.lang.String[]">
+</parameter>
+<parameter name="subjectAlts" type="java.lang.String[]">
+</parameter>
+<parameter name="strictWithSubDomains" type="boolean">
+</parameter>
+<exception name="SSLException" type="javax.net.ssl.SSLException">
+</exception>
+</method>
+</class>
+<class name="AllowAllHostnameVerifier"
+ extends="org.apache.http.conn.ssl.AbstractVerifier"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="AllowAllHostnameVerifier"
+ type="org.apache.http.conn.ssl.AllowAllHostnameVerifier"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<method name="toString"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="verify"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="host" type="java.lang.String">
+</parameter>
+<parameter name="cns" type="java.lang.String[]">
+</parameter>
+<parameter name="subjectAlts" type="java.lang.String[]">
+</parameter>
+</method>
+</class>
+<class name="BrowserCompatHostnameVerifier"
+ extends="org.apache.http.conn.ssl.AbstractVerifier"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="BrowserCompatHostnameVerifier"
+ type="org.apache.http.conn.ssl.BrowserCompatHostnameVerifier"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<method name="toString"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="verify"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="host" type="java.lang.String">
+</parameter>
+<parameter name="cns" type="java.lang.String[]">
+</parameter>
+<parameter name="subjectAlts" type="java.lang.String[]">
+</parameter>
+<exception name="SSLException" type="javax.net.ssl.SSLException">
+</exception>
+</method>
+</class>
+<class name="SSLSocketFactory"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="org.apache.http.conn.scheme.LayeredSocketFactory">
+</implements>
+<constructor name="SSLSocketFactory"
+ type="org.apache.http.conn.ssl.SSLSocketFactory"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="algorithm" type="java.lang.String">
+</parameter>
+<parameter name="keystore" type="java.security.KeyStore">
+</parameter>
+<parameter name="keystorePassword" type="java.lang.String">
+</parameter>
+<parameter name="truststore" type="java.security.KeyStore">
+</parameter>
+<parameter name="random" type="java.security.SecureRandom">
+</parameter>
+<parameter name="nameResolver" type="org.apache.http.conn.scheme.HostNameResolver">
+</parameter>
+<exception name="KeyManagementException" type="java.security.KeyManagementException">
+</exception>
+<exception name="KeyStoreException" type="java.security.KeyStoreException">
+</exception>
+<exception name="NoSuchAlgorithmException" type="java.security.NoSuchAlgorithmException">
+</exception>
+<exception name="UnrecoverableKeyException" type="java.security.UnrecoverableKeyException">
+</exception>
+</constructor>
+<constructor name="SSLSocketFactory"
+ type="org.apache.http.conn.ssl.SSLSocketFactory"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="keystore" type="java.security.KeyStore">
+</parameter>
+<parameter name="keystorePassword" type="java.lang.String">
+</parameter>
+<parameter name="truststore" type="java.security.KeyStore">
+</parameter>
+<exception name="KeyManagementException" type="java.security.KeyManagementException">
+</exception>
+<exception name="KeyStoreException" type="java.security.KeyStoreException">
+</exception>
+<exception name="NoSuchAlgorithmException" type="java.security.NoSuchAlgorithmException">
+</exception>
+<exception name="UnrecoverableKeyException" type="java.security.UnrecoverableKeyException">
+</exception>
+</constructor>
+<constructor name="SSLSocketFactory"
+ type="org.apache.http.conn.ssl.SSLSocketFactory"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="keystore" type="java.security.KeyStore">
+</parameter>
+<parameter name="keystorePassword" type="java.lang.String">
+</parameter>
+<exception name="KeyManagementException" type="java.security.KeyManagementException">
+</exception>
+<exception name="KeyStoreException" type="java.security.KeyStoreException">
+</exception>
+<exception name="NoSuchAlgorithmException" type="java.security.NoSuchAlgorithmException">
+</exception>
+<exception name="UnrecoverableKeyException" type="java.security.UnrecoverableKeyException">
+</exception>
+</constructor>
+<constructor name="SSLSocketFactory"
+ type="org.apache.http.conn.ssl.SSLSocketFactory"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="truststore" type="java.security.KeyStore">
+</parameter>
+<exception name="KeyManagementException" type="java.security.KeyManagementException">
+</exception>
+<exception name="KeyStoreException" type="java.security.KeyStoreException">
+</exception>
+<exception name="NoSuchAlgorithmException" type="java.security.NoSuchAlgorithmException">
+</exception>
+<exception name="UnrecoverableKeyException" type="java.security.UnrecoverableKeyException">
+</exception>
+</constructor>
+<method name="connectSocket"
+ return="java.net.Socket"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="sock" type="java.net.Socket">
+</parameter>
+<parameter name="host" type="java.lang.String">
+</parameter>
+<parameter name="port" type="int">
+</parameter>
+<parameter name="localAddress" type="java.net.InetAddress">
+</parameter>
+<parameter name="localPort" type="int">
+</parameter>
+<parameter name="params" type="org.apache.http.params.HttpParams">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="createSocket"
+ return="java.net.Socket"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="createSocket"
+ return="java.net.Socket"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="socket" type="java.net.Socket">
+</parameter>
+<parameter name="host" type="java.lang.String">
+</parameter>
+<parameter name="port" type="int">
+</parameter>
+<parameter name="autoClose" type="boolean">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+<exception name="UnknownHostException" type="java.net.UnknownHostException">
+</exception>
+</method>
+<method name="getHostnameVerifier"
+ return="org.apache.http.conn.ssl.X509HostnameVerifier"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getSocketFactory"
+ return="org.apache.http.conn.ssl.SSLSocketFactory"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isSecure"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="sock" type="java.net.Socket">
+</parameter>
+<exception name="IllegalArgumentException" type="java.lang.IllegalArgumentException">
+</exception>
+</method>
+<method name="setHostnameVerifier"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="hostnameVerifier" type="org.apache.http.conn.ssl.X509HostnameVerifier">
+</parameter>
+</method>
+<field name="ALLOW_ALL_HOSTNAME_VERIFIER"
+ type="org.apache.http.conn.ssl.X509HostnameVerifier"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="BROWSER_COMPATIBLE_HOSTNAME_VERIFIER"
+ type="org.apache.http.conn.ssl.X509HostnameVerifier"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="SSL"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;SSL&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="SSLV2"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;SSLv2&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="STRICT_HOSTNAME_VERIFIER"
+ type="org.apache.http.conn.ssl.X509HostnameVerifier"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TLS"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;TLS&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<class name="StrictHostnameVerifier"
+ extends="org.apache.http.conn.ssl.AbstractVerifier"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="StrictHostnameVerifier"
+ type="org.apache.http.conn.ssl.StrictHostnameVerifier"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<method name="toString"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="verify"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="host" type="java.lang.String">
+</parameter>
+<parameter name="cns" type="java.lang.String[]">
+</parameter>
+<parameter name="subjectAlts" type="java.lang.String[]">
+</parameter>
+<exception name="SSLException" type="javax.net.ssl.SSLException">
+</exception>
+</method>
+</class>
+<interface name="X509HostnameVerifier"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="javax.net.ssl.HostnameVerifier">
+</implements>
+<method name="verify"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="host" type="java.lang.String">
+</parameter>
+<parameter name="session" type="javax.net.ssl.SSLSession">
+</parameter>
+</method>
+<method name="verify"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="host" type="java.lang.String">
+</parameter>
+<parameter name="ssl" type="javax.net.ssl.SSLSocket">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="verify"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="host" type="java.lang.String">
+</parameter>
+<parameter name="cert" type="java.security.cert.X509Certificate">
+</parameter>
+<exception name="SSLException" type="javax.net.ssl.SSLException">
+</exception>
+</method>
+<method name="verify"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="host" type="java.lang.String">
+</parameter>
+<parameter name="cns" type="java.lang.String[]">
+</parameter>
+<parameter name="subjectAlts" type="java.lang.String[]">
+</parameter>
+<exception name="SSLException" type="javax.net.ssl.SSLException">
+</exception>
+</method>
+</interface>
+</package>
+<package name="org.apache.http.conn.util"
+>
+<class name="InetAddressUtils"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="isIPv4Address"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="input" type="java.lang.String">
+</parameter>
+</method>
+<method name="isIPv6Address"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="input" type="java.lang.String">
+</parameter>
+</method>
+<method name="isIPv6HexCompressedAddress"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="input" type="java.lang.String">
+</parameter>
+</method>
+<method name="isIPv6StdAddress"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="input" type="java.lang.String">
+</parameter>
+</method>
+</class>
+</package>
+<package name="org.apache.http.cookie"
+>
+<interface name="ClientCookie"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="org.apache.http.cookie.Cookie">
+</implements>
+<method name="containsAttribute"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+</method>
+<method name="getAttribute"
+ return="java.lang.String"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+</method>
+<field name="COMMENTURL_ATTR"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;commenturl&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="COMMENT_ATTR"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;comment&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="DISCARD_ATTR"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;discard&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="DOMAIN_ATTR"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;domain&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="EXPIRES_ATTR"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;expires&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="MAX_AGE_ATTR"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;max-age&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="PATH_ATTR"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;path&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="PORT_ATTR"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;port&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="SECURE_ATTR"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;secure&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="VERSION_ATTR"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;version&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</interface>
+<interface name="Cookie"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="getComment"
+ return="java.lang.String"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getCommentURL"
+ return="java.lang.String"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getDomain"
+ return="java.lang.String"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getExpiryDate"
+ return="java.util.Date"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getName"
+ return="java.lang.String"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getPath"
+ return="java.lang.String"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getPorts"
+ return="int[]"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getValue"
+ return="java.lang.String"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getVersion"
+ return="int"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isExpired"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="date" type="java.util.Date">
+</parameter>
+</method>
+<method name="isPersistent"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isSecure"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+</interface>
+<interface name="CookieAttributeHandler"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="match"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="cookie" type="org.apache.http.cookie.Cookie">
+</parameter>
+<parameter name="origin" type="org.apache.http.cookie.CookieOrigin">
+</parameter>
+</method>
+<method name="parse"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="cookie" type="org.apache.http.cookie.SetCookie">
+</parameter>
+<parameter name="value" type="java.lang.String">
+</parameter>
+<exception name="MalformedCookieException" type="org.apache.http.cookie.MalformedCookieException">
+</exception>
+</method>
+<method name="validate"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="cookie" type="org.apache.http.cookie.Cookie">
+</parameter>
+<parameter name="origin" type="org.apache.http.cookie.CookieOrigin">
+</parameter>
+<exception name="MalformedCookieException" type="org.apache.http.cookie.MalformedCookieException">
+</exception>
+</method>
+</interface>
+<class name="CookieIdentityComparator"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="java.util.Comparator">
+</implements>
+<implements name="java.io.Serializable">
+</implements>
+<constructor name="CookieIdentityComparator"
+ type="org.apache.http.cookie.CookieIdentityComparator"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<method name="compare"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="c1" type="org.apache.http.cookie.Cookie">
+</parameter>
+<parameter name="c2" type="org.apache.http.cookie.Cookie">
+</parameter>
+</method>
+</class>
+<class name="CookieOrigin"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="CookieOrigin"
+ type="org.apache.http.cookie.CookieOrigin"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="host" type="java.lang.String">
+</parameter>
+<parameter name="port" type="int">
+</parameter>
+<parameter name="path" type="java.lang.String">
+</parameter>
+<parameter name="secure" type="boolean">
+</parameter>
+</constructor>
+<method name="getHost"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getPath"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getPort"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isSecure"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+</class>
+<class name="CookiePathComparator"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="java.util.Comparator">
+</implements>
+<implements name="java.io.Serializable">
+</implements>
+<constructor name="CookiePathComparator"
+ type="org.apache.http.cookie.CookiePathComparator"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<method name="compare"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="c1" type="org.apache.http.cookie.Cookie">
+</parameter>
+<parameter name="c2" type="org.apache.http.cookie.Cookie">
+</parameter>
+</method>
+</class>
+<interface name="CookieSpec"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="formatCookies"
+ return="java.util.List&lt;org.apache.http.Header&gt;"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="cookies" type="java.util.List&lt;org.apache.http.cookie.Cookie&gt;">
+</parameter>
+</method>
+<method name="getVersion"
+ return="int"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getVersionHeader"
+ return="org.apache.http.Header"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="match"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="cookie" type="org.apache.http.cookie.Cookie">
+</parameter>
+<parameter name="origin" type="org.apache.http.cookie.CookieOrigin">
+</parameter>
+</method>
+<method name="parse"
+ return="java.util.List&lt;org.apache.http.cookie.Cookie&gt;"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="header" type="org.apache.http.Header">
+</parameter>
+<parameter name="origin" type="org.apache.http.cookie.CookieOrigin">
+</parameter>
+<exception name="MalformedCookieException" type="org.apache.http.cookie.MalformedCookieException">
+</exception>
+</method>
+<method name="validate"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="cookie" type="org.apache.http.cookie.Cookie">
+</parameter>
+<parameter name="origin" type="org.apache.http.cookie.CookieOrigin">
+</parameter>
+<exception name="MalformedCookieException" type="org.apache.http.cookie.MalformedCookieException">
+</exception>
+</method>
+</interface>
+<interface name="CookieSpecFactory"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="newInstance"
+ return="org.apache.http.cookie.CookieSpec"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="params" type="org.apache.http.params.HttpParams">
+</parameter>
+</method>
+</interface>
+<class name="CookieSpecRegistry"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="CookieSpecRegistry"
+ type="org.apache.http.cookie.CookieSpecRegistry"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<method name="getCookieSpec"
+ return="org.apache.http.cookie.CookieSpec"
+ abstract="false"
+ native="false"
+ synchronized="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+<parameter name="params" type="org.apache.http.params.HttpParams">
+</parameter>
+<exception name="IllegalStateException" type="java.lang.IllegalStateException">
+</exception>
+</method>
+<method name="getCookieSpec"
+ return="org.apache.http.cookie.CookieSpec"
+ abstract="false"
+ native="false"
+ synchronized="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+<exception name="IllegalStateException" type="java.lang.IllegalStateException">
+</exception>
+</method>
+<method name="getSpecNames"
+ return="java.util.List&lt;java.lang.String&gt;"
+ abstract="false"
+ native="false"
+ synchronized="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="register"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+<parameter name="factory" type="org.apache.http.cookie.CookieSpecFactory">
+</parameter>
+</method>
+<method name="setItems"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="map" type="java.util.Map&lt;java.lang.String, org.apache.http.cookie.CookieSpecFactory&gt;">
+</parameter>
+</method>
+<method name="unregister"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="id" type="java.lang.String">
+</parameter>
+</method>
+</class>
+<class name="MalformedCookieException"
+ extends="org.apache.http.ProtocolException"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="MalformedCookieException"
+ type="org.apache.http.cookie.MalformedCookieException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<constructor name="MalformedCookieException"
+ type="org.apache.http.cookie.MalformedCookieException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="message" type="java.lang.String">
+</parameter>
+</constructor>
+<constructor name="MalformedCookieException"
+ type="org.apache.http.cookie.MalformedCookieException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="message" type="java.lang.String">
+</parameter>
+<parameter name="cause" type="java.lang.Throwable">
+</parameter>
+</constructor>
+</class>
+<interface name="SM"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<field name="COOKIE"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;Cookie&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="COOKIE2"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;Cookie2&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="SET_COOKIE"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;Set-Cookie&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="SET_COOKIE2"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;Set-Cookie2&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</interface>
+<interface name="SetCookie"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="org.apache.http.cookie.Cookie">
+</implements>
+<method name="setComment"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="comment" type="java.lang.String">
+</parameter>
+</method>
+<method name="setDomain"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="domain" type="java.lang.String">
+</parameter>
+</method>
+<method name="setExpiryDate"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="expiryDate" type="java.util.Date">
+</parameter>
+</method>
+<method name="setPath"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="path" type="java.lang.String">
+</parameter>
+</method>
+<method name="setSecure"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="secure" type="boolean">
+</parameter>
+</method>
+<method name="setValue"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="value" type="java.lang.String">
+</parameter>
+</method>
+<method name="setVersion"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="version" type="int">
+</parameter>
+</method>
+</interface>
+<interface name="SetCookie2"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="org.apache.http.cookie.SetCookie">
+</implements>
+<method name="setCommentURL"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="commentURL" type="java.lang.String">
+</parameter>
+</method>
+<method name="setDiscard"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="discard" type="boolean">
+</parameter>
+</method>
+<method name="setPorts"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="ports" type="int[]">
+</parameter>
+</method>
+</interface>
+</package>
+<package name="org.apache.http.cookie.params"
+>
+<interface name="CookieSpecPNames"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<field name="DATE_PATTERNS"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;http.protocol.cookie-datepatterns&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="SINGLE_COOKIE_HEADER"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;http.protocol.single-cookie-header&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</interface>
+<class name="CookieSpecParamBean"
+ extends="org.apache.http.params.HttpAbstractParamBean"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="CookieSpecParamBean"
+ type="org.apache.http.cookie.params.CookieSpecParamBean"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="params" type="org.apache.http.params.HttpParams">
+</parameter>
+</constructor>
+<method name="setDatePatterns"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="patterns" type="java.util.Collection&lt;java.lang.String&gt;">
+</parameter>
+</method>
+<method name="setSingleHeader"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="singleHeader" type="boolean">
+</parameter>
+</method>
+</class>
+</package>
+<package name="org.apache.http.entity"
+>
+<class name="AbstractHttpEntity"
+ extends="java.lang.Object"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="org.apache.http.HttpEntity">
+</implements>
+<constructor name="AbstractHttpEntity"
+ type="org.apache.http.entity.AbstractHttpEntity"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</constructor>
+<method name="consumeContent"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+<exception name="UnsupportedOperationException" type="java.lang.UnsupportedOperationException">
+</exception>
+</method>
+<method name="getContentEncoding"
+ return="org.apache.http.Header"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getContentType"
+ return="org.apache.http.Header"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isChunked"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="setChunked"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="b" type="boolean">
+</parameter>
+</method>
+<method name="setContentEncoding"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="contentEncoding" type="org.apache.http.Header">
+</parameter>
+</method>
+<method name="setContentEncoding"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="ceString" type="java.lang.String">
+</parameter>
+</method>
+<method name="setContentType"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="contentType" type="org.apache.http.Header">
+</parameter>
+</method>
+<method name="setContentType"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="ctString" type="java.lang.String">
+</parameter>
+</method>
+<field name="chunked"
+ type="boolean"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</field>
+<field name="contentEncoding"
+ type="org.apache.http.Header"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</field>
+<field name="contentType"
+ type="org.apache.http.Header"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</field>
+</class>
+<class name="BasicHttpEntity"
+ extends="org.apache.http.entity.AbstractHttpEntity"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="BasicHttpEntity"
+ type="org.apache.http.entity.BasicHttpEntity"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<method name="getContent"
+ return="java.io.InputStream"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="IllegalStateException" type="java.lang.IllegalStateException">
+</exception>
+</method>
+<method name="getContentLength"
+ return="long"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isRepeatable"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isStreaming"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="setContent"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="instream" type="java.io.InputStream">
+</parameter>
+</method>
+<method name="setContentLength"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="len" type="long">
+</parameter>
+</method>
+<method name="writeTo"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="outstream" type="java.io.OutputStream">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+</class>
+<class name="BufferedHttpEntity"
+ extends="org.apache.http.entity.HttpEntityWrapper"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="BufferedHttpEntity"
+ type="org.apache.http.entity.BufferedHttpEntity"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="entity" type="org.apache.http.HttpEntity">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</constructor>
+</class>
+<class name="ByteArrayEntity"
+ extends="org.apache.http.entity.AbstractHttpEntity"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="java.lang.Cloneable">
+</implements>
+<constructor name="ByteArrayEntity"
+ type="org.apache.http.entity.ByteArrayEntity"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="b" type="byte[]">
+</parameter>
+</constructor>
+<method name="clone"
+ return="java.lang.Object"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="CloneNotSupportedException" type="java.lang.CloneNotSupportedException">
+</exception>
+</method>
+<method name="getContent"
+ return="java.io.InputStream"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getContentLength"
+ return="long"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isRepeatable"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isStreaming"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="writeTo"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="outstream" type="java.io.OutputStream">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<field name="content"
+ type="byte[]"
+ transient="false"
+ volatile="false"
+ value="null"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</field>
+</class>
+<interface name="ContentLengthStrategy"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="determineLength"
+ return="long"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="message" type="org.apache.http.HttpMessage">
+</parameter>
+<exception name="HttpException" type="org.apache.http.HttpException">
+</exception>
+</method>
+<field name="CHUNKED"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="-2"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="IDENTITY"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="-1"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</interface>
+<interface name="ContentProducer"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="writeTo"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="outstream" type="java.io.OutputStream">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+</interface>
+<class name="EntityTemplate"
+ extends="org.apache.http.entity.AbstractHttpEntity"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="EntityTemplate"
+ type="org.apache.http.entity.EntityTemplate"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="contentproducer" type="org.apache.http.entity.ContentProducer">
+</parameter>
+</constructor>
+<method name="getContent"
+ return="java.io.InputStream"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getContentLength"
+ return="long"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isRepeatable"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isStreaming"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="writeTo"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="outstream" type="java.io.OutputStream">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+</class>
+<class name="FileEntity"
+ extends="org.apache.http.entity.AbstractHttpEntity"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="java.lang.Cloneable">
+</implements>
+<constructor name="FileEntity"
+ type="org.apache.http.entity.FileEntity"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="file" type="java.io.File">
+</parameter>
+<parameter name="contentType" type="java.lang.String">
+</parameter>
+</constructor>
+<method name="clone"
+ return="java.lang.Object"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="CloneNotSupportedException" type="java.lang.CloneNotSupportedException">
+</exception>
+</method>
+<method name="getContent"
+ return="java.io.InputStream"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="getContentLength"
+ return="long"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isRepeatable"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isStreaming"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="writeTo"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="outstream" type="java.io.OutputStream">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<field name="file"
+ type="java.io.File"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</field>
+</class>
+<class name="HttpEntityWrapper"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="org.apache.http.HttpEntity">
+</implements>
+<constructor name="HttpEntityWrapper"
+ type="org.apache.http.entity.HttpEntityWrapper"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="wrapped" type="org.apache.http.HttpEntity">
+</parameter>
+</constructor>
+<method name="consumeContent"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="getContent"
+ return="java.io.InputStream"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="getContentEncoding"
+ return="org.apache.http.Header"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getContentLength"
+ return="long"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getContentType"
+ return="org.apache.http.Header"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isChunked"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isRepeatable"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isStreaming"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="writeTo"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="outstream" type="java.io.OutputStream">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<field name="wrappedEntity"
+ type="org.apache.http.HttpEntity"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</field>
+</class>
+<class name="InputStreamEntity"
+ extends="org.apache.http.entity.AbstractHttpEntity"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="InputStreamEntity"
+ type="org.apache.http.entity.InputStreamEntity"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="instream" type="java.io.InputStream">
+</parameter>
+<parameter name="length" type="long">
+</parameter>
+</constructor>
+<method name="getContent"
+ return="java.io.InputStream"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="getContentLength"
+ return="long"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isRepeatable"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isStreaming"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="writeTo"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="outstream" type="java.io.OutputStream">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+</class>
+<class name="SerializableEntity"
+ extends="org.apache.http.entity.AbstractHttpEntity"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="SerializableEntity"
+ type="org.apache.http.entity.SerializableEntity"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="ser" type="java.io.Serializable">
+</parameter>
+<parameter name="bufferize" type="boolean">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</constructor>
+<method name="getContent"
+ return="java.io.InputStream"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+<exception name="IllegalStateException" type="java.lang.IllegalStateException">
+</exception>
+</method>
+<method name="getContentLength"
+ return="long"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isRepeatable"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isStreaming"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="writeTo"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="outstream" type="java.io.OutputStream">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+</class>
+<class name="StringEntity"
+ extends="org.apache.http.entity.AbstractHttpEntity"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="java.lang.Cloneable">
+</implements>
+<constructor name="StringEntity"
+ type="org.apache.http.entity.StringEntity"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="s" type="java.lang.String">
+</parameter>
+<parameter name="charset" type="java.lang.String">
+</parameter>
+<exception name="UnsupportedEncodingException" type="java.io.UnsupportedEncodingException">
+</exception>
+</constructor>
+<constructor name="StringEntity"
+ type="org.apache.http.entity.StringEntity"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="s" type="java.lang.String">
+</parameter>
+<exception name="UnsupportedEncodingException" type="java.io.UnsupportedEncodingException">
+</exception>
+</constructor>
+<method name="clone"
+ return="java.lang.Object"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="CloneNotSupportedException" type="java.lang.CloneNotSupportedException">
+</exception>
+</method>
+<method name="getContent"
+ return="java.io.InputStream"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="getContentLength"
+ return="long"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isRepeatable"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isStreaming"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="writeTo"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="outstream" type="java.io.OutputStream">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<field name="content"
+ type="byte[]"
+ transient="false"
+ volatile="false"
+ value="null"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</field>
+</class>
+</package>
+<package name="org.apache.http.impl"
+>
+<class name="AbstractHttpClientConnection"
+ extends="java.lang.Object"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="org.apache.http.HttpClientConnection">
+</implements>
+<constructor name="AbstractHttpClientConnection"
+ type="org.apache.http.impl.AbstractHttpClientConnection"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<method name="assertOpen"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<exception name="IllegalStateException" type="java.lang.IllegalStateException">
+</exception>
+</method>
+<method name="createEntityDeserializer"
+ return="org.apache.http.impl.entity.EntityDeserializer"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</method>
+<method name="createEntitySerializer"
+ return="org.apache.http.impl.entity.EntitySerializer"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</method>
+<method name="createHttpResponseFactory"
+ return="org.apache.http.HttpResponseFactory"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</method>
+<method name="createRequestWriter"
+ return="org.apache.http.io.HttpMessageWriter"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="buffer" type="org.apache.http.io.SessionOutputBuffer">
+</parameter>
+<parameter name="params" type="org.apache.http.params.HttpParams">
+</parameter>
+</method>
+<method name="createResponseParser"
+ return="org.apache.http.io.HttpMessageParser"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="buffer" type="org.apache.http.io.SessionInputBuffer">
+</parameter>
+<parameter name="responseFactory" type="org.apache.http.HttpResponseFactory">
+</parameter>
+<parameter name="params" type="org.apache.http.params.HttpParams">
+</parameter>
+</method>
+<method name="doFlush"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="flush"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="getMetrics"
+ return="org.apache.http.HttpConnectionMetrics"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="init"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="inbuffer" type="org.apache.http.io.SessionInputBuffer">
+</parameter>
+<parameter name="outbuffer" type="org.apache.http.io.SessionOutputBuffer">
+</parameter>
+<parameter name="params" type="org.apache.http.params.HttpParams">
+</parameter>
+</method>
+<method name="isResponseAvailable"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="timeout" type="int">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="isStale"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="receiveResponseEntity"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="response" type="org.apache.http.HttpResponse">
+</parameter>
+<exception name="HttpException" type="org.apache.http.HttpException">
+</exception>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="receiveResponseHeader"
+ return="org.apache.http.HttpResponse"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="HttpException" type="org.apache.http.HttpException">
+</exception>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="sendRequestEntity"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="request" type="org.apache.http.HttpEntityEnclosingRequest">
+</parameter>
+<exception name="HttpException" type="org.apache.http.HttpException">
+</exception>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="sendRequestHeader"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="request" type="org.apache.http.HttpRequest">
+</parameter>
+<exception name="HttpException" type="org.apache.http.HttpException">
+</exception>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+</class>
+<class name="AbstractHttpServerConnection"
+ extends="java.lang.Object"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="org.apache.http.HttpServerConnection">
+</implements>
+<constructor name="AbstractHttpServerConnection"
+ type="org.apache.http.impl.AbstractHttpServerConnection"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<method name="assertOpen"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<exception name="IllegalStateException" type="java.lang.IllegalStateException">
+</exception>
+</method>
+<method name="createEntityDeserializer"
+ return="org.apache.http.impl.entity.EntityDeserializer"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</method>
+<method name="createEntitySerializer"
+ return="org.apache.http.impl.entity.EntitySerializer"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</method>
+<method name="createHttpRequestFactory"
+ return="org.apache.http.HttpRequestFactory"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</method>
+<method name="createRequestParser"
+ return="org.apache.http.io.HttpMessageParser"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="buffer" type="org.apache.http.io.SessionInputBuffer">
+</parameter>
+<parameter name="requestFactory" type="org.apache.http.HttpRequestFactory">
+</parameter>
+<parameter name="params" type="org.apache.http.params.HttpParams">
+</parameter>
+</method>
+<method name="createResponseWriter"
+ return="org.apache.http.io.HttpMessageWriter"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="buffer" type="org.apache.http.io.SessionOutputBuffer">
+</parameter>
+<parameter name="params" type="org.apache.http.params.HttpParams">
+</parameter>
+</method>
+<method name="doFlush"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="flush"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="getMetrics"
+ return="org.apache.http.HttpConnectionMetrics"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="init"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="inbuffer" type="org.apache.http.io.SessionInputBuffer">
+</parameter>
+<parameter name="outbuffer" type="org.apache.http.io.SessionOutputBuffer">
+</parameter>
+<parameter name="params" type="org.apache.http.params.HttpParams">
+</parameter>
+</method>
+<method name="isStale"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="receiveRequestEntity"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="request" type="org.apache.http.HttpEntityEnclosingRequest">
+</parameter>
+<exception name="HttpException" type="org.apache.http.HttpException">
+</exception>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="receiveRequestHeader"
+ return="org.apache.http.HttpRequest"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="HttpException" type="org.apache.http.HttpException">
+</exception>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="sendResponseEntity"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="response" type="org.apache.http.HttpResponse">
+</parameter>
+<exception name="HttpException" type="org.apache.http.HttpException">
+</exception>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="sendResponseHeader"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="response" type="org.apache.http.HttpResponse">
+</parameter>
+<exception name="HttpException" type="org.apache.http.HttpException">
+</exception>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+</class>
+<class name="DefaultConnectionReuseStrategy"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="org.apache.http.ConnectionReuseStrategy">
+</implements>
+<constructor name="DefaultConnectionReuseStrategy"
+ type="org.apache.http.impl.DefaultConnectionReuseStrategy"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<method name="createTokenIterator"
+ return="org.apache.http.TokenIterator"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="hit" type="org.apache.http.HeaderIterator">
+</parameter>
+</method>
+<method name="keepAlive"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="response" type="org.apache.http.HttpResponse">
+</parameter>
+<parameter name="context" type="org.apache.http.protocol.HttpContext">
+</parameter>
+</method>
+</class>
+<class name="DefaultHttpClientConnection"
+ extends="org.apache.http.impl.SocketHttpClientConnection"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="DefaultHttpClientConnection"
+ type="org.apache.http.impl.DefaultHttpClientConnection"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<method name="bind"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="socket" type="java.net.Socket">
+</parameter>
+<parameter name="params" type="org.apache.http.params.HttpParams">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+</class>
+<class name="DefaultHttpRequestFactory"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="org.apache.http.HttpRequestFactory">
+</implements>
+<constructor name="DefaultHttpRequestFactory"
+ type="org.apache.http.impl.DefaultHttpRequestFactory"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<method name="newHttpRequest"
+ return="org.apache.http.HttpRequest"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="requestline" type="org.apache.http.RequestLine">
+</parameter>
+<exception name="MethodNotSupportedException" type="org.apache.http.MethodNotSupportedException">
+</exception>
+</method>
+<method name="newHttpRequest"
+ return="org.apache.http.HttpRequest"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="method" type="java.lang.String">
+</parameter>
+<parameter name="uri" type="java.lang.String">
+</parameter>
+<exception name="MethodNotSupportedException" type="org.apache.http.MethodNotSupportedException">
+</exception>
+</method>
+</class>
+<class name="DefaultHttpResponseFactory"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="org.apache.http.HttpResponseFactory">
+</implements>
+<constructor name="DefaultHttpResponseFactory"
+ type="org.apache.http.impl.DefaultHttpResponseFactory"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="catalog" type="org.apache.http.ReasonPhraseCatalog">
+</parameter>
+</constructor>
+<constructor name="DefaultHttpResponseFactory"
+ type="org.apache.http.impl.DefaultHttpResponseFactory"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<method name="determineLocale"
+ return="java.util.Locale"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="context" type="org.apache.http.protocol.HttpContext">
+</parameter>
+</method>
+<method name="newHttpResponse"
+ return="org.apache.http.HttpResponse"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="ver" type="org.apache.http.ProtocolVersion">
+</parameter>
+<parameter name="status" type="int">
+</parameter>
+<parameter name="context" type="org.apache.http.protocol.HttpContext">
+</parameter>
+</method>
+<method name="newHttpResponse"
+ return="org.apache.http.HttpResponse"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="statusline" type="org.apache.http.StatusLine">
+</parameter>
+<parameter name="context" type="org.apache.http.protocol.HttpContext">
+</parameter>
+</method>
+<field name="reasonCatalog"
+ type="org.apache.http.ReasonPhraseCatalog"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</field>
+</class>
+<class name="DefaultHttpServerConnection"
+ extends="org.apache.http.impl.SocketHttpServerConnection"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="DefaultHttpServerConnection"
+ type="org.apache.http.impl.DefaultHttpServerConnection"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<method name="bind"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="socket" type="java.net.Socket">
+</parameter>
+<parameter name="params" type="org.apache.http.params.HttpParams">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+</class>
+<class name="EnglishReasonPhraseCatalog"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="org.apache.http.ReasonPhraseCatalog">
+</implements>
+<constructor name="EnglishReasonPhraseCatalog"
+ type="org.apache.http.impl.EnglishReasonPhraseCatalog"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</constructor>
+<method name="getReason"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="status" type="int">
+</parameter>
+<parameter name="loc" type="java.util.Locale">
+</parameter>
+</method>
+<field name="INSTANCE"
+ type="org.apache.http.impl.EnglishReasonPhraseCatalog"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<class name="HttpConnectionMetricsImpl"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="org.apache.http.HttpConnectionMetrics">
+</implements>
+<constructor name="HttpConnectionMetricsImpl"
+ type="org.apache.http.impl.HttpConnectionMetricsImpl"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="inTransportMetric" type="org.apache.http.io.HttpTransportMetrics">
+</parameter>
+<parameter name="outTransportMetric" type="org.apache.http.io.HttpTransportMetrics">
+</parameter>
+</constructor>
+<method name="getMetric"
+ return="java.lang.Object"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="metricName" type="java.lang.String">
+</parameter>
+</method>
+<method name="getReceivedBytesCount"
+ return="long"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getRequestCount"
+ return="long"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getResponseCount"
+ return="long"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getSentBytesCount"
+ return="long"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="incrementRequestCount"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="incrementResponseCount"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="reset"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="setMetric"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="metricName" type="java.lang.String">
+</parameter>
+<parameter name="obj" type="java.lang.Object">
+</parameter>
+</method>
+<field name="RECEIVED_BYTES_COUNT"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;http.received-bytes-count&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="REQUEST_COUNT"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;http.request-count&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="RESPONSE_COUNT"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;http.response-count&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="SENT_BYTES_COUNT"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;http.sent-bytes-count&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<class name="NoConnectionReuseStrategy"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="org.apache.http.ConnectionReuseStrategy">
+</implements>
+<constructor name="NoConnectionReuseStrategy"
+ type="org.apache.http.impl.NoConnectionReuseStrategy"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<method name="keepAlive"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="response" type="org.apache.http.HttpResponse">
+</parameter>
+<parameter name="context" type="org.apache.http.protocol.HttpContext">
+</parameter>
+</method>
+</class>
+<class name="SocketHttpClientConnection"
+ extends="org.apache.http.impl.AbstractHttpClientConnection"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="org.apache.http.HttpInetConnection">
+</implements>
+<constructor name="SocketHttpClientConnection"
+ type="org.apache.http.impl.SocketHttpClientConnection"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<method name="assertNotOpen"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</method>
+<method name="assertOpen"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</method>
+<method name="bind"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="socket" type="java.net.Socket">
+</parameter>
+<parameter name="params" type="org.apache.http.params.HttpParams">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="close"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="createSessionInputBuffer"
+ return="org.apache.http.io.SessionInputBuffer"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="socket" type="java.net.Socket">
+</parameter>
+<parameter name="buffersize" type="int">
+</parameter>
+<parameter name="params" type="org.apache.http.params.HttpParams">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="createSessionOutputBuffer"
+ return="org.apache.http.io.SessionOutputBuffer"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="socket" type="java.net.Socket">
+</parameter>
+<parameter name="buffersize" type="int">
+</parameter>
+<parameter name="params" type="org.apache.http.params.HttpParams">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="getLocalAddress"
+ return="java.net.InetAddress"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getLocalPort"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getRemoteAddress"
+ return="java.net.InetAddress"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getRemotePort"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getSocket"
+ return="java.net.Socket"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</method>
+<method name="getSocketTimeout"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isOpen"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="setSocketTimeout"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="timeout" type="int">
+</parameter>
+</method>
+<method name="shutdown"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+</class>
+<class name="SocketHttpServerConnection"
+ extends="org.apache.http.impl.AbstractHttpServerConnection"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="org.apache.http.HttpInetConnection">
+</implements>
+<constructor name="SocketHttpServerConnection"
+ type="org.apache.http.impl.SocketHttpServerConnection"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<method name="assertNotOpen"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</method>
+<method name="assertOpen"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</method>
+<method name="bind"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="socket" type="java.net.Socket">
+</parameter>
+<parameter name="params" type="org.apache.http.params.HttpParams">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="close"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="createHttpDataReceiver"
+ return="org.apache.http.io.SessionInputBuffer"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="socket" type="java.net.Socket">
+</parameter>
+<parameter name="buffersize" type="int">
+</parameter>
+<parameter name="params" type="org.apache.http.params.HttpParams">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="createHttpDataTransmitter"
+ return="org.apache.http.io.SessionOutputBuffer"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="socket" type="java.net.Socket">
+</parameter>
+<parameter name="buffersize" type="int">
+</parameter>
+<parameter name="params" type="org.apache.http.params.HttpParams">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="getLocalAddress"
+ return="java.net.InetAddress"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getLocalPort"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getRemoteAddress"
+ return="java.net.InetAddress"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getRemotePort"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getSocket"
+ return="java.net.Socket"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</method>
+<method name="getSocketTimeout"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isOpen"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="setSocketTimeout"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="timeout" type="int">
+</parameter>
+</method>
+<method name="shutdown"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+</class>
+</package>
+<package name="org.apache.http.impl.auth"
+>
+<class name="AuthSchemeBase"
+ extends="java.lang.Object"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="org.apache.http.auth.AuthScheme">
+</implements>
+<constructor name="AuthSchemeBase"
+ type="org.apache.http.impl.auth.AuthSchemeBase"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<method name="isProxy"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="parseChallenge"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="buffer" type="org.apache.http.util.CharArrayBuffer">
+</parameter>
+<parameter name="pos" type="int">
+</parameter>
+<parameter name="len" type="int">
+</parameter>
+<exception name="MalformedChallengeException" type="org.apache.http.auth.MalformedChallengeException">
+</exception>
+</method>
+<method name="processChallenge"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="header" type="org.apache.http.Header">
+</parameter>
+<exception name="MalformedChallengeException" type="org.apache.http.auth.MalformedChallengeException">
+</exception>
+</method>
+</class>
+<class name="BasicScheme"
+ extends="org.apache.http.impl.auth.RFC2617Scheme"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="BasicScheme"
+ type="org.apache.http.impl.auth.BasicScheme"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<method name="authenticate"
+ return="org.apache.http.Header"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="credentials" type="org.apache.http.auth.Credentials">
+</parameter>
+<parameter name="request" type="org.apache.http.HttpRequest">
+</parameter>
+<exception name="AuthenticationException" type="org.apache.http.auth.AuthenticationException">
+</exception>
+</method>
+<method name="authenticate"
+ return="org.apache.http.Header"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="credentials" type="org.apache.http.auth.Credentials">
+</parameter>
+<parameter name="charset" type="java.lang.String">
+</parameter>
+<parameter name="proxy" type="boolean">
+</parameter>
+</method>
+<method name="getSchemeName"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isComplete"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isConnectionBased"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+</class>
+<class name="BasicSchemeFactory"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="org.apache.http.auth.AuthSchemeFactory">
+</implements>
+<constructor name="BasicSchemeFactory"
+ type="org.apache.http.impl.auth.BasicSchemeFactory"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<method name="newInstance"
+ return="org.apache.http.auth.AuthScheme"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="params" type="org.apache.http.params.HttpParams">
+</parameter>
+</method>
+</class>
+<class name="DigestScheme"
+ extends="org.apache.http.impl.auth.RFC2617Scheme"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="DigestScheme"
+ type="org.apache.http.impl.auth.DigestScheme"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<method name="authenticate"
+ return="org.apache.http.Header"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="credentials" type="org.apache.http.auth.Credentials">
+</parameter>
+<parameter name="request" type="org.apache.http.HttpRequest">
+</parameter>
+<exception name="AuthenticationException" type="org.apache.http.auth.AuthenticationException">
+</exception>
+</method>
+<method name="createCnonce"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getSchemeName"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isComplete"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isConnectionBased"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="overrideParamter"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+<parameter name="value" type="java.lang.String">
+</parameter>
+</method>
+</class>
+<class name="DigestSchemeFactory"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="org.apache.http.auth.AuthSchemeFactory">
+</implements>
+<constructor name="DigestSchemeFactory"
+ type="org.apache.http.impl.auth.DigestSchemeFactory"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<method name="newInstance"
+ return="org.apache.http.auth.AuthScheme"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="params" type="org.apache.http.params.HttpParams">
+</parameter>
+</method>
+</class>
+<interface name="NTLMEngine"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="generateType1Msg"
+ return="java.lang.String"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="domain" type="java.lang.String">
+</parameter>
+<parameter name="workstation" type="java.lang.String">
+</parameter>
+<exception name="NTLMEngineException" type="org.apache.http.impl.auth.NTLMEngineException">
+</exception>
+</method>
+<method name="generateType3Msg"
+ return="java.lang.String"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="username" type="java.lang.String">
+</parameter>
+<parameter name="password" type="java.lang.String">
+</parameter>
+<parameter name="domain" type="java.lang.String">
+</parameter>
+<parameter name="workstation" type="java.lang.String">
+</parameter>
+<parameter name="challenge" type="java.lang.String">
+</parameter>
+<exception name="NTLMEngineException" type="org.apache.http.impl.auth.NTLMEngineException">
+</exception>
+</method>
+</interface>
+<class name="NTLMEngineException"
+ extends="org.apache.http.auth.AuthenticationException"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="NTLMEngineException"
+ type="org.apache.http.impl.auth.NTLMEngineException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<constructor name="NTLMEngineException"
+ type="org.apache.http.impl.auth.NTLMEngineException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="message" type="java.lang.String">
+</parameter>
+</constructor>
+<constructor name="NTLMEngineException"
+ type="org.apache.http.impl.auth.NTLMEngineException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="message" type="java.lang.String">
+</parameter>
+<parameter name="cause" type="java.lang.Throwable">
+</parameter>
+</constructor>
+</class>
+<class name="NTLMScheme"
+ extends="org.apache.http.impl.auth.AuthSchemeBase"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="NTLMScheme"
+ type="org.apache.http.impl.auth.NTLMScheme"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="engine" type="org.apache.http.impl.auth.NTLMEngine">
+</parameter>
+</constructor>
+<method name="authenticate"
+ return="org.apache.http.Header"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="credentials" type="org.apache.http.auth.Credentials">
+</parameter>
+<parameter name="request" type="org.apache.http.HttpRequest">
+</parameter>
+<exception name="AuthenticationException" type="org.apache.http.auth.AuthenticationException">
+</exception>
+</method>
+<method name="getParameter"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+</method>
+<method name="getRealm"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getSchemeName"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isComplete"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isConnectionBased"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="parseChallenge"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="buffer" type="org.apache.http.util.CharArrayBuffer">
+</parameter>
+<parameter name="pos" type="int">
+</parameter>
+<parameter name="len" type="int">
+</parameter>
+<exception name="MalformedChallengeException" type="org.apache.http.auth.MalformedChallengeException">
+</exception>
+</method>
+</class>
+<class name="RFC2617Scheme"
+ extends="org.apache.http.impl.auth.AuthSchemeBase"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="RFC2617Scheme"
+ type="org.apache.http.impl.auth.RFC2617Scheme"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<method name="getParameter"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+</method>
+<method name="getParameters"
+ return="java.util.Map&lt;java.lang.String, java.lang.String&gt;"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</method>
+<method name="getRealm"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="parseChallenge"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="buffer" type="org.apache.http.util.CharArrayBuffer">
+</parameter>
+<parameter name="pos" type="int">
+</parameter>
+<parameter name="len" type="int">
+</parameter>
+<exception name="MalformedChallengeException" type="org.apache.http.auth.MalformedChallengeException">
+</exception>
+</method>
+</class>
+<class name="UnsupportedDigestAlgorithmException"
+ extends="java.lang.RuntimeException"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="UnsupportedDigestAlgorithmException"
+ type="org.apache.http.impl.auth.UnsupportedDigestAlgorithmException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<constructor name="UnsupportedDigestAlgorithmException"
+ type="org.apache.http.impl.auth.UnsupportedDigestAlgorithmException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="message" type="java.lang.String">
+</parameter>
+</constructor>
+<constructor name="UnsupportedDigestAlgorithmException"
+ type="org.apache.http.impl.auth.UnsupportedDigestAlgorithmException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="message" type="java.lang.String">
+</parameter>
+<parameter name="cause" type="java.lang.Throwable">
+</parameter>
+</constructor>
+</class>
+</package>
+<package name="org.apache.http.impl.client"
+>
+<class name="AbstractAuthenticationHandler"
+ extends="java.lang.Object"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="org.apache.http.client.AuthenticationHandler">
+</implements>
+<constructor name="AbstractAuthenticationHandler"
+ type="org.apache.http.impl.client.AbstractAuthenticationHandler"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<method name="getAuthPreferences"
+ return="java.util.List&lt;java.lang.String&gt;"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</method>
+<method name="parseChallenges"
+ return="java.util.Map&lt;java.lang.String, org.apache.http.Header&gt;"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="headers" type="org.apache.http.Header[]">
+</parameter>
+<exception name="MalformedChallengeException" type="org.apache.http.auth.MalformedChallengeException">
+</exception>
+</method>
+<method name="selectScheme"
+ return="org.apache.http.auth.AuthScheme"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="challenges" type="java.util.Map&lt;java.lang.String, org.apache.http.Header&gt;">
+</parameter>
+<parameter name="response" type="org.apache.http.HttpResponse">
+</parameter>
+<parameter name="context" type="org.apache.http.protocol.HttpContext">
+</parameter>
+<exception name="AuthenticationException" type="org.apache.http.auth.AuthenticationException">
+</exception>
+</method>
+</class>
+<class name="AbstractHttpClient"
+ extends="java.lang.Object"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="org.apache.http.client.HttpClient">
+</implements>
+<constructor name="AbstractHttpClient"
+ type="org.apache.http.impl.client.AbstractHttpClient"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="conman" type="org.apache.http.conn.ClientConnectionManager">
+</parameter>
+<parameter name="params" type="org.apache.http.params.HttpParams">
+</parameter>
+</constructor>
+<method name="addRequestInterceptor"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="itcp" type="org.apache.http.HttpRequestInterceptor">
+</parameter>
+</method>
+<method name="addRequestInterceptor"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="itcp" type="org.apache.http.HttpRequestInterceptor">
+</parameter>
+<parameter name="index" type="int">
+</parameter>
+</method>
+<method name="addResponseInterceptor"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="itcp" type="org.apache.http.HttpResponseInterceptor">
+</parameter>
+</method>
+<method name="addResponseInterceptor"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="itcp" type="org.apache.http.HttpResponseInterceptor">
+</parameter>
+<parameter name="index" type="int">
+</parameter>
+</method>
+<method name="clearRequestInterceptors"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="clearResponseInterceptors"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="createAuthSchemeRegistry"
+ return="org.apache.http.auth.AuthSchemeRegistry"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</method>
+<method name="createClientConnectionManager"
+ return="org.apache.http.conn.ClientConnectionManager"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</method>
+<method name="createClientRequestDirector"
+ return="org.apache.http.client.RequestDirector"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="requestExec" type="org.apache.http.protocol.HttpRequestExecutor">
+</parameter>
+<parameter name="conman" type="org.apache.http.conn.ClientConnectionManager">
+</parameter>
+<parameter name="reustrat" type="org.apache.http.ConnectionReuseStrategy">
+</parameter>
+<parameter name="kastrat" type="org.apache.http.conn.ConnectionKeepAliveStrategy">
+</parameter>
+<parameter name="rouplan" type="org.apache.http.conn.routing.HttpRoutePlanner">
+</parameter>
+<parameter name="httpProcessor" type="org.apache.http.protocol.HttpProcessor">
+</parameter>
+<parameter name="retryHandler" type="org.apache.http.client.HttpRequestRetryHandler">
+</parameter>
+<parameter name="redirectHandler" type="org.apache.http.client.RedirectHandler">
+</parameter>
+<parameter name="targetAuthHandler" type="org.apache.http.client.AuthenticationHandler">
+</parameter>
+<parameter name="proxyAuthHandler" type="org.apache.http.client.AuthenticationHandler">
+</parameter>
+<parameter name="stateHandler" type="org.apache.http.client.UserTokenHandler">
+</parameter>
+<parameter name="params" type="org.apache.http.params.HttpParams">
+</parameter>
+</method>
+<method name="createConnectionKeepAliveStrategy"
+ return="org.apache.http.conn.ConnectionKeepAliveStrategy"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</method>
+<method name="createConnectionReuseStrategy"
+ return="org.apache.http.ConnectionReuseStrategy"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</method>
+<method name="createCookieSpecRegistry"
+ return="org.apache.http.cookie.CookieSpecRegistry"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</method>
+<method name="createCookieStore"
+ return="org.apache.http.client.CookieStore"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</method>
+<method name="createCredentialsProvider"
+ return="org.apache.http.client.CredentialsProvider"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</method>
+<method name="createHttpContext"
+ return="org.apache.http.protocol.HttpContext"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</method>
+<method name="createHttpParams"
+ return="org.apache.http.params.HttpParams"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</method>
+<method name="createHttpProcessor"
+ return="org.apache.http.protocol.BasicHttpProcessor"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</method>
+<method name="createHttpRequestRetryHandler"
+ return="org.apache.http.client.HttpRequestRetryHandler"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</method>
+<method name="createHttpRoutePlanner"
+ return="org.apache.http.conn.routing.HttpRoutePlanner"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</method>
+<method name="createProxyAuthenticationHandler"
+ return="org.apache.http.client.AuthenticationHandler"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</method>
+<method name="createRedirectHandler"
+ return="org.apache.http.client.RedirectHandler"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</method>
+<method name="createRequestExecutor"
+ return="org.apache.http.protocol.HttpRequestExecutor"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</method>
+<method name="createTargetAuthenticationHandler"
+ return="org.apache.http.client.AuthenticationHandler"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</method>
+<method name="createUserTokenHandler"
+ return="org.apache.http.client.UserTokenHandler"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</method>
+<method name="determineParams"
+ return="org.apache.http.params.HttpParams"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="req" type="org.apache.http.HttpRequest">
+</parameter>
+</method>
+<method name="execute"
+ return="org.apache.http.HttpResponse"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="request" type="org.apache.http.client.methods.HttpUriRequest">
+</parameter>
+<exception name="ClientProtocolException" type="org.apache.http.client.ClientProtocolException">
+</exception>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="execute"
+ return="org.apache.http.HttpResponse"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="request" type="org.apache.http.client.methods.HttpUriRequest">
+</parameter>
+<parameter name="context" type="org.apache.http.protocol.HttpContext">
+</parameter>
+<exception name="ClientProtocolException" type="org.apache.http.client.ClientProtocolException">
+</exception>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="execute"
+ return="org.apache.http.HttpResponse"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="target" type="org.apache.http.HttpHost">
+</parameter>
+<parameter name="request" type="org.apache.http.HttpRequest">
+</parameter>
+<exception name="ClientProtocolException" type="org.apache.http.client.ClientProtocolException">
+</exception>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="execute"
+ return="org.apache.http.HttpResponse"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="target" type="org.apache.http.HttpHost">
+</parameter>
+<parameter name="request" type="org.apache.http.HttpRequest">
+</parameter>
+<parameter name="context" type="org.apache.http.protocol.HttpContext">
+</parameter>
+<exception name="ClientProtocolException" type="org.apache.http.client.ClientProtocolException">
+</exception>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="execute"
+ return="T"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="request" type="org.apache.http.client.methods.HttpUriRequest">
+</parameter>
+<parameter name="responseHandler" type="org.apache.http.client.ResponseHandler&lt;? extends T&gt;">
+</parameter>
+<exception name="ClientProtocolException" type="org.apache.http.client.ClientProtocolException">
+</exception>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="execute"
+ return="T"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="request" type="org.apache.http.client.methods.HttpUriRequest">
+</parameter>
+<parameter name="responseHandler" type="org.apache.http.client.ResponseHandler&lt;? extends T&gt;">
+</parameter>
+<parameter name="context" type="org.apache.http.protocol.HttpContext">
+</parameter>
+<exception name="ClientProtocolException" type="org.apache.http.client.ClientProtocolException">
+</exception>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="execute"
+ return="T"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="target" type="org.apache.http.HttpHost">
+</parameter>
+<parameter name="request" type="org.apache.http.HttpRequest">
+</parameter>
+<parameter name="responseHandler" type="org.apache.http.client.ResponseHandler&lt;? extends T&gt;">
+</parameter>
+<exception name="ClientProtocolException" type="org.apache.http.client.ClientProtocolException">
+</exception>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="execute"
+ return="T"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="target" type="org.apache.http.HttpHost">
+</parameter>
+<parameter name="request" type="org.apache.http.HttpRequest">
+</parameter>
+<parameter name="responseHandler" type="org.apache.http.client.ResponseHandler&lt;? extends T&gt;">
+</parameter>
+<parameter name="context" type="org.apache.http.protocol.HttpContext">
+</parameter>
+<exception name="ClientProtocolException" type="org.apache.http.client.ClientProtocolException">
+</exception>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="getAuthSchemes"
+ return="org.apache.http.auth.AuthSchemeRegistry"
+ abstract="false"
+ native="false"
+ synchronized="true"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getConnectionKeepAliveStrategy"
+ return="org.apache.http.conn.ConnectionKeepAliveStrategy"
+ abstract="false"
+ native="false"
+ synchronized="true"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getConnectionManager"
+ return="org.apache.http.conn.ClientConnectionManager"
+ abstract="false"
+ native="false"
+ synchronized="true"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getConnectionReuseStrategy"
+ return="org.apache.http.ConnectionReuseStrategy"
+ abstract="false"
+ native="false"
+ synchronized="true"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getCookieSpecs"
+ return="org.apache.http.cookie.CookieSpecRegistry"
+ abstract="false"
+ native="false"
+ synchronized="true"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getCookieStore"
+ return="org.apache.http.client.CookieStore"
+ abstract="false"
+ native="false"
+ synchronized="true"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getCredentialsProvider"
+ return="org.apache.http.client.CredentialsProvider"
+ abstract="false"
+ native="false"
+ synchronized="true"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getHttpProcessor"
+ return="org.apache.http.protocol.BasicHttpProcessor"
+ abstract="false"
+ native="false"
+ synchronized="true"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</method>
+<method name="getHttpRequestRetryHandler"
+ return="org.apache.http.client.HttpRequestRetryHandler"
+ abstract="false"
+ native="false"
+ synchronized="true"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getParams"
+ return="org.apache.http.params.HttpParams"
+ abstract="false"
+ native="false"
+ synchronized="true"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getProxyAuthenticationHandler"
+ return="org.apache.http.client.AuthenticationHandler"
+ abstract="false"
+ native="false"
+ synchronized="true"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getRedirectHandler"
+ return="org.apache.http.client.RedirectHandler"
+ abstract="false"
+ native="false"
+ synchronized="true"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getRequestExecutor"
+ return="org.apache.http.protocol.HttpRequestExecutor"
+ abstract="false"
+ native="false"
+ synchronized="true"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getRequestInterceptor"
+ return="org.apache.http.HttpRequestInterceptor"
+ abstract="false"
+ native="false"
+ synchronized="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="index" type="int">
+</parameter>
+</method>
+<method name="getRequestInterceptorCount"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getResponseInterceptor"
+ return="org.apache.http.HttpResponseInterceptor"
+ abstract="false"
+ native="false"
+ synchronized="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="index" type="int">
+</parameter>
+</method>
+<method name="getResponseInterceptorCount"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getRoutePlanner"
+ return="org.apache.http.conn.routing.HttpRoutePlanner"
+ abstract="false"
+ native="false"
+ synchronized="true"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getTargetAuthenticationHandler"
+ return="org.apache.http.client.AuthenticationHandler"
+ abstract="false"
+ native="false"
+ synchronized="true"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getUserTokenHandler"
+ return="org.apache.http.client.UserTokenHandler"
+ abstract="false"
+ native="false"
+ synchronized="true"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="removeRequestInterceptorByClass"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="clazz" type="java.lang.Class&lt;? extends org.apache.http.HttpRequestInterceptor&gt;">
+</parameter>
+</method>
+<method name="removeResponseInterceptorByClass"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="clazz" type="java.lang.Class&lt;? extends org.apache.http.HttpResponseInterceptor&gt;">
+</parameter>
+</method>
+<method name="setAuthSchemes"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="authSchemeRegistry" type="org.apache.http.auth.AuthSchemeRegistry">
+</parameter>
+</method>
+<method name="setCookieSpecs"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="cookieSpecRegistry" type="org.apache.http.cookie.CookieSpecRegistry">
+</parameter>
+</method>
+<method name="setCookieStore"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="cookieStore" type="org.apache.http.client.CookieStore">
+</parameter>
+</method>
+<method name="setCredentialsProvider"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="credsProvider" type="org.apache.http.client.CredentialsProvider">
+</parameter>
+</method>
+<method name="setHttpRequestRetryHandler"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="retryHandler" type="org.apache.http.client.HttpRequestRetryHandler">
+</parameter>
+</method>
+<method name="setKeepAliveStrategy"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="keepAliveStrategy" type="org.apache.http.conn.ConnectionKeepAliveStrategy">
+</parameter>
+</method>
+<method name="setParams"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="params" type="org.apache.http.params.HttpParams">
+</parameter>
+</method>
+<method name="setProxyAuthenticationHandler"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="proxyAuthHandler" type="org.apache.http.client.AuthenticationHandler">
+</parameter>
+</method>
+<method name="setRedirectHandler"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="redirectHandler" type="org.apache.http.client.RedirectHandler">
+</parameter>
+</method>
+<method name="setReuseStrategy"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="reuseStrategy" type="org.apache.http.ConnectionReuseStrategy">
+</parameter>
+</method>
+<method name="setRoutePlanner"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="routePlanner" type="org.apache.http.conn.routing.HttpRoutePlanner">
+</parameter>
+</method>
+<method name="setTargetAuthenticationHandler"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="targetAuthHandler" type="org.apache.http.client.AuthenticationHandler">
+</parameter>
+</method>
+<method name="setUserTokenHandler"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="userTokenHandler" type="org.apache.http.client.UserTokenHandler">
+</parameter>
+</method>
+</class>
+<class name="BasicCookieStore"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="org.apache.http.client.CookieStore">
+</implements>
+<constructor name="BasicCookieStore"
+ type="org.apache.http.impl.client.BasicCookieStore"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<method name="addCookie"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="cookie" type="org.apache.http.cookie.Cookie">
+</parameter>
+</method>
+<method name="addCookies"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="cookies" type="org.apache.http.cookie.Cookie[]">
+</parameter>
+</method>
+<method name="clear"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="clearExpired"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="date" type="java.util.Date">
+</parameter>
+</method>
+<method name="getCookies"
+ return="java.util.List&lt;org.apache.http.cookie.Cookie&gt;"
+ abstract="false"
+ native="false"
+ synchronized="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+</class>
+<class name="BasicCredentialsProvider"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="org.apache.http.client.CredentialsProvider">
+</implements>
+<constructor name="BasicCredentialsProvider"
+ type="org.apache.http.impl.client.BasicCredentialsProvider"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<method name="clear"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getCredentials"
+ return="org.apache.http.auth.Credentials"
+ abstract="false"
+ native="false"
+ synchronized="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="authscope" type="org.apache.http.auth.AuthScope">
+</parameter>
+</method>
+<method name="setCredentials"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="authscope" type="org.apache.http.auth.AuthScope">
+</parameter>
+<parameter name="credentials" type="org.apache.http.auth.Credentials">
+</parameter>
+</method>
+</class>
+<class name="BasicResponseHandler"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="org.apache.http.client.ResponseHandler">
+</implements>
+<constructor name="BasicResponseHandler"
+ type="org.apache.http.impl.client.BasicResponseHandler"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<method name="handleResponse"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="response" type="org.apache.http.HttpResponse">
+</parameter>
+<exception name="HttpResponseException" type="org.apache.http.client.HttpResponseException">
+</exception>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+</class>
+<class name="ClientParamsStack"
+ extends="org.apache.http.params.AbstractHttpParams"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="ClientParamsStack"
+ type="org.apache.http.impl.client.ClientParamsStack"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="aparams" type="org.apache.http.params.HttpParams">
+</parameter>
+<parameter name="cparams" type="org.apache.http.params.HttpParams">
+</parameter>
+<parameter name="rparams" type="org.apache.http.params.HttpParams">
+</parameter>
+<parameter name="oparams" type="org.apache.http.params.HttpParams">
+</parameter>
+</constructor>
+<constructor name="ClientParamsStack"
+ type="org.apache.http.impl.client.ClientParamsStack"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="stack" type="org.apache.http.impl.client.ClientParamsStack">
+</parameter>
+</constructor>
+<constructor name="ClientParamsStack"
+ type="org.apache.http.impl.client.ClientParamsStack"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="stack" type="org.apache.http.impl.client.ClientParamsStack">
+</parameter>
+<parameter name="aparams" type="org.apache.http.params.HttpParams">
+</parameter>
+<parameter name="cparams" type="org.apache.http.params.HttpParams">
+</parameter>
+<parameter name="rparams" type="org.apache.http.params.HttpParams">
+</parameter>
+<parameter name="oparams" type="org.apache.http.params.HttpParams">
+</parameter>
+</constructor>
+<method name="copy"
+ return="org.apache.http.params.HttpParams"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getApplicationParams"
+ return="org.apache.http.params.HttpParams"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getClientParams"
+ return="org.apache.http.params.HttpParams"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getOverrideParams"
+ return="org.apache.http.params.HttpParams"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getParameter"
+ return="java.lang.Object"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+</method>
+<method name="getRequestParams"
+ return="org.apache.http.params.HttpParams"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="removeParameter"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+</method>
+<method name="setParameter"
+ return="org.apache.http.params.HttpParams"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+<parameter name="value" type="java.lang.Object">
+</parameter>
+<exception name="UnsupportedOperationException" type="java.lang.UnsupportedOperationException">
+</exception>
+</method>
+<field name="applicationParams"
+ type="org.apache.http.params.HttpParams"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</field>
+<field name="clientParams"
+ type="org.apache.http.params.HttpParams"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</field>
+<field name="overrideParams"
+ type="org.apache.http.params.HttpParams"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</field>
+<field name="requestParams"
+ type="org.apache.http.params.HttpParams"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</field>
+</class>
+<class name="DefaultConnectionKeepAliveStrategy"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="org.apache.http.conn.ConnectionKeepAliveStrategy">
+</implements>
+<constructor name="DefaultConnectionKeepAliveStrategy"
+ type="org.apache.http.impl.client.DefaultConnectionKeepAliveStrategy"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<method name="getKeepAliveDuration"
+ return="long"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="response" type="org.apache.http.HttpResponse">
+</parameter>
+<parameter name="context" type="org.apache.http.protocol.HttpContext">
+</parameter>
+</method>
+</class>
+<class name="DefaultHttpClient"
+ extends="org.apache.http.impl.client.AbstractHttpClient"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="DefaultHttpClient"
+ type="org.apache.http.impl.client.DefaultHttpClient"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="conman" type="org.apache.http.conn.ClientConnectionManager">
+</parameter>
+<parameter name="params" type="org.apache.http.params.HttpParams">
+</parameter>
+</constructor>
+<constructor name="DefaultHttpClient"
+ type="org.apache.http.impl.client.DefaultHttpClient"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="params" type="org.apache.http.params.HttpParams">
+</parameter>
+</constructor>
+<constructor name="DefaultHttpClient"
+ type="org.apache.http.impl.client.DefaultHttpClient"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<method name="createAuthSchemeRegistry"
+ return="org.apache.http.auth.AuthSchemeRegistry"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</method>
+<method name="createClientConnectionManager"
+ return="org.apache.http.conn.ClientConnectionManager"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</method>
+<method name="createConnectionKeepAliveStrategy"
+ return="org.apache.http.conn.ConnectionKeepAliveStrategy"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</method>
+<method name="createConnectionReuseStrategy"
+ return="org.apache.http.ConnectionReuseStrategy"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</method>
+<method name="createCookieSpecRegistry"
+ return="org.apache.http.cookie.CookieSpecRegistry"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</method>
+<method name="createCookieStore"
+ return="org.apache.http.client.CookieStore"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</method>
+<method name="createCredentialsProvider"
+ return="org.apache.http.client.CredentialsProvider"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</method>
+<method name="createHttpContext"
+ return="org.apache.http.protocol.HttpContext"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</method>
+<method name="createHttpParams"
+ return="org.apache.http.params.HttpParams"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</method>
+<method name="createHttpProcessor"
+ return="org.apache.http.protocol.BasicHttpProcessor"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</method>
+<method name="createHttpRequestRetryHandler"
+ return="org.apache.http.client.HttpRequestRetryHandler"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</method>
+<method name="createHttpRoutePlanner"
+ return="org.apache.http.conn.routing.HttpRoutePlanner"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</method>
+<method name="createProxyAuthenticationHandler"
+ return="org.apache.http.client.AuthenticationHandler"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</method>
+<method name="createRedirectHandler"
+ return="org.apache.http.client.RedirectHandler"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</method>
+<method name="createRequestExecutor"
+ return="org.apache.http.protocol.HttpRequestExecutor"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</method>
+<method name="createTargetAuthenticationHandler"
+ return="org.apache.http.client.AuthenticationHandler"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</method>
+<method name="createUserTokenHandler"
+ return="org.apache.http.client.UserTokenHandler"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</method>
+</class>
+<class name="DefaultHttpRequestRetryHandler"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="org.apache.http.client.HttpRequestRetryHandler">
+</implements>
+<constructor name="DefaultHttpRequestRetryHandler"
+ type="org.apache.http.impl.client.DefaultHttpRequestRetryHandler"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="retryCount" type="int">
+</parameter>
+<parameter name="requestSentRetryEnabled" type="boolean">
+</parameter>
+</constructor>
+<constructor name="DefaultHttpRequestRetryHandler"
+ type="org.apache.http.impl.client.DefaultHttpRequestRetryHandler"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<method name="getRetryCount"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isRequestSentRetryEnabled"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="retryRequest"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="exception" type="java.io.IOException">
+</parameter>
+<parameter name="executionCount" type="int">
+</parameter>
+<parameter name="context" type="org.apache.http.protocol.HttpContext">
+</parameter>
+</method>
+</class>
+<class name="DefaultProxyAuthenticationHandler"
+ extends="org.apache.http.impl.client.AbstractAuthenticationHandler"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="DefaultProxyAuthenticationHandler"
+ type="org.apache.http.impl.client.DefaultProxyAuthenticationHandler"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<method name="getChallenges"
+ return="java.util.Map&lt;java.lang.String, org.apache.http.Header&gt;"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="response" type="org.apache.http.HttpResponse">
+</parameter>
+<parameter name="context" type="org.apache.http.protocol.HttpContext">
+</parameter>
+<exception name="MalformedChallengeException" type="org.apache.http.auth.MalformedChallengeException">
+</exception>
+</method>
+<method name="isAuthenticationRequested"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="response" type="org.apache.http.HttpResponse">
+</parameter>
+<parameter name="context" type="org.apache.http.protocol.HttpContext">
+</parameter>
+</method>
+</class>
+<class name="DefaultRedirectHandler"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="org.apache.http.client.RedirectHandler">
+</implements>
+<constructor name="DefaultRedirectHandler"
+ type="org.apache.http.impl.client.DefaultRedirectHandler"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<method name="getLocationURI"
+ return="java.net.URI"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="response" type="org.apache.http.HttpResponse">
+</parameter>
+<parameter name="context" type="org.apache.http.protocol.HttpContext">
+</parameter>
+<exception name="ProtocolException" type="org.apache.http.ProtocolException">
+</exception>
+</method>
+<method name="isRedirectRequested"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="response" type="org.apache.http.HttpResponse">
+</parameter>
+<parameter name="context" type="org.apache.http.protocol.HttpContext">
+</parameter>
+</method>
+</class>
+<class name="DefaultRequestDirector"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="org.apache.http.client.RequestDirector">
+</implements>
+<constructor name="DefaultRequestDirector"
+ type="org.apache.http.impl.client.DefaultRequestDirector"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="requestExec" type="org.apache.http.protocol.HttpRequestExecutor">
+</parameter>
+<parameter name="conman" type="org.apache.http.conn.ClientConnectionManager">
+</parameter>
+<parameter name="reustrat" type="org.apache.http.ConnectionReuseStrategy">
+</parameter>
+<parameter name="kastrat" type="org.apache.http.conn.ConnectionKeepAliveStrategy">
+</parameter>
+<parameter name="rouplan" type="org.apache.http.conn.routing.HttpRoutePlanner">
+</parameter>
+<parameter name="httpProcessor" type="org.apache.http.protocol.HttpProcessor">
+</parameter>
+<parameter name="retryHandler" type="org.apache.http.client.HttpRequestRetryHandler">
+</parameter>
+<parameter name="redirectHandler" type="org.apache.http.client.RedirectHandler">
+</parameter>
+<parameter name="targetAuthHandler" type="org.apache.http.client.AuthenticationHandler">
+</parameter>
+<parameter name="proxyAuthHandler" type="org.apache.http.client.AuthenticationHandler">
+</parameter>
+<parameter name="userTokenHandler" type="org.apache.http.client.UserTokenHandler">
+</parameter>
+<parameter name="params" type="org.apache.http.params.HttpParams">
+</parameter>
+</constructor>
+<method name="createConnectRequest"
+ return="org.apache.http.HttpRequest"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="route" type="org.apache.http.conn.routing.HttpRoute">
+</parameter>
+<parameter name="context" type="org.apache.http.protocol.HttpContext">
+</parameter>
+</method>
+<method name="createTunnelToProxy"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="route" type="org.apache.http.conn.routing.HttpRoute">
+</parameter>
+<parameter name="hop" type="int">
+</parameter>
+<parameter name="context" type="org.apache.http.protocol.HttpContext">
+</parameter>
+<exception name="HttpException" type="org.apache.http.HttpException">
+</exception>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="createTunnelToTarget"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="route" type="org.apache.http.conn.routing.HttpRoute">
+</parameter>
+<parameter name="context" type="org.apache.http.protocol.HttpContext">
+</parameter>
+<exception name="HttpException" type="org.apache.http.HttpException">
+</exception>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="determineRoute"
+ return="org.apache.http.conn.routing.HttpRoute"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="target" type="org.apache.http.HttpHost">
+</parameter>
+<parameter name="request" type="org.apache.http.HttpRequest">
+</parameter>
+<parameter name="context" type="org.apache.http.protocol.HttpContext">
+</parameter>
+<exception name="HttpException" type="org.apache.http.HttpException">
+</exception>
+</method>
+<method name="establishRoute"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="route" type="org.apache.http.conn.routing.HttpRoute">
+</parameter>
+<parameter name="context" type="org.apache.http.protocol.HttpContext">
+</parameter>
+<exception name="HttpException" type="org.apache.http.HttpException">
+</exception>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="execute"
+ return="org.apache.http.HttpResponse"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="target" type="org.apache.http.HttpHost">
+</parameter>
+<parameter name="request" type="org.apache.http.HttpRequest">
+</parameter>
+<parameter name="context" type="org.apache.http.protocol.HttpContext">
+</parameter>
+<exception name="HttpException" type="org.apache.http.HttpException">
+</exception>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="handleResponse"
+ return="org.apache.http.impl.client.RoutedRequest"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="roureq" type="org.apache.http.impl.client.RoutedRequest">
+</parameter>
+<parameter name="response" type="org.apache.http.HttpResponse">
+</parameter>
+<parameter name="context" type="org.apache.http.protocol.HttpContext">
+</parameter>
+<exception name="HttpException" type="org.apache.http.HttpException">
+</exception>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="releaseConnection"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</method>
+<method name="rewriteRequestURI"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="request" type="org.apache.http.impl.client.RequestWrapper">
+</parameter>
+<parameter name="route" type="org.apache.http.conn.routing.HttpRoute">
+</parameter>
+<exception name="ProtocolException" type="org.apache.http.ProtocolException">
+</exception>
+</method>
+<field name="connManager"
+ type="org.apache.http.conn.ClientConnectionManager"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</field>
+<field name="httpProcessor"
+ type="org.apache.http.protocol.HttpProcessor"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</field>
+<field name="keepAliveStrategy"
+ type="org.apache.http.conn.ConnectionKeepAliveStrategy"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</field>
+<field name="managedConn"
+ type="org.apache.http.conn.ManagedClientConnection"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</field>
+<field name="params"
+ type="org.apache.http.params.HttpParams"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</field>
+<field name="redirectHandler"
+ type="org.apache.http.client.RedirectHandler"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</field>
+<field name="requestExec"
+ type="org.apache.http.protocol.HttpRequestExecutor"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</field>
+<field name="retryHandler"
+ type="org.apache.http.client.HttpRequestRetryHandler"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</field>
+<field name="reuseStrategy"
+ type="org.apache.http.ConnectionReuseStrategy"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</field>
+<field name="routePlanner"
+ type="org.apache.http.conn.routing.HttpRoutePlanner"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</field>
+</class>
+<class name="DefaultTargetAuthenticationHandler"
+ extends="org.apache.http.impl.client.AbstractAuthenticationHandler"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="DefaultTargetAuthenticationHandler"
+ type="org.apache.http.impl.client.DefaultTargetAuthenticationHandler"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<method name="getChallenges"
+ return="java.util.Map&lt;java.lang.String, org.apache.http.Header&gt;"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="response" type="org.apache.http.HttpResponse">
+</parameter>
+<parameter name="context" type="org.apache.http.protocol.HttpContext">
+</parameter>
+<exception name="MalformedChallengeException" type="org.apache.http.auth.MalformedChallengeException">
+</exception>
+</method>
+<method name="isAuthenticationRequested"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="response" type="org.apache.http.HttpResponse">
+</parameter>
+<parameter name="context" type="org.apache.http.protocol.HttpContext">
+</parameter>
+</method>
+</class>
+<class name="DefaultUserTokenHandler"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="org.apache.http.client.UserTokenHandler">
+</implements>
+<constructor name="DefaultUserTokenHandler"
+ type="org.apache.http.impl.client.DefaultUserTokenHandler"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<method name="getUserToken"
+ return="java.lang.Object"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="context" type="org.apache.http.protocol.HttpContext">
+</parameter>
+</method>
+</class>
+<class name="EntityEnclosingRequestWrapper"
+ extends="org.apache.http.impl.client.RequestWrapper"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="org.apache.http.HttpEntityEnclosingRequest">
+</implements>
+<constructor name="EntityEnclosingRequestWrapper"
+ type="org.apache.http.impl.client.EntityEnclosingRequestWrapper"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="request" type="org.apache.http.HttpEntityEnclosingRequest">
+</parameter>
+<exception name="ProtocolException" type="org.apache.http.ProtocolException">
+</exception>
+</constructor>
+<method name="expectContinue"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getEntity"
+ return="org.apache.http.HttpEntity"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="setEntity"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="entity" type="org.apache.http.HttpEntity">
+</parameter>
+</method>
+</class>
+<class name="RedirectLocations"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="RedirectLocations"
+ type="org.apache.http.impl.client.RedirectLocations"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<method name="add"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="uri" type="java.net.URI">
+</parameter>
+</method>
+<method name="contains"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="uri" type="java.net.URI">
+</parameter>
+</method>
+<method name="remove"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="uri" type="java.net.URI">
+</parameter>
+</method>
+</class>
+<class name="RequestWrapper"
+ extends="org.apache.http.message.AbstractHttpMessage"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="org.apache.http.client.methods.HttpUriRequest">
+</implements>
+<constructor name="RequestWrapper"
+ type="org.apache.http.impl.client.RequestWrapper"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="request" type="org.apache.http.HttpRequest">
+</parameter>
+<exception name="ProtocolException" type="org.apache.http.ProtocolException">
+</exception>
+</constructor>
+<method name="abort"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="UnsupportedOperationException" type="java.lang.UnsupportedOperationException">
+</exception>
+</method>
+<method name="getExecCount"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getMethod"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getOriginal"
+ return="org.apache.http.HttpRequest"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getProtocolVersion"
+ return="org.apache.http.ProtocolVersion"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getRequestLine"
+ return="org.apache.http.RequestLine"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getURI"
+ return="java.net.URI"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="incrementExecCount"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isAborted"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isRepeatable"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="resetHeaders"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="setMethod"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="method" type="java.lang.String">
+</parameter>
+</method>
+<method name="setProtocolVersion"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="version" type="org.apache.http.ProtocolVersion">
+</parameter>
+</method>
+<method name="setURI"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="uri" type="java.net.URI">
+</parameter>
+</method>
+</class>
+<class name="RoutedRequest"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="RoutedRequest"
+ type="org.apache.http.impl.client.RoutedRequest"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="req" type="org.apache.http.impl.client.RequestWrapper">
+</parameter>
+<parameter name="route" type="org.apache.http.conn.routing.HttpRoute">
+</parameter>
+</constructor>
+<method name="getRequest"
+ return="org.apache.http.impl.client.RequestWrapper"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getRoute"
+ return="org.apache.http.conn.routing.HttpRoute"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<field name="request"
+ type="org.apache.http.impl.client.RequestWrapper"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</field>
+<field name="route"
+ type="org.apache.http.conn.routing.HttpRoute"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</field>
+</class>
+<class name="TunnelRefusedException"
+ extends="org.apache.http.HttpException"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="TunnelRefusedException"
+ type="org.apache.http.impl.client.TunnelRefusedException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="message" type="java.lang.String">
+</parameter>
+<parameter name="response" type="org.apache.http.HttpResponse">
+</parameter>
+</constructor>
+<method name="getResponse"
+ return="org.apache.http.HttpResponse"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+</class>
+</package>
+<package name="org.apache.http.impl.conn"
+>
+<class name="AbstractClientConnAdapter"
+ extends="java.lang.Object"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="org.apache.http.conn.ManagedClientConnection">
+</implements>
+<constructor name="AbstractClientConnAdapter"
+ type="org.apache.http.impl.conn.AbstractClientConnAdapter"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="mgr" type="org.apache.http.conn.ClientConnectionManager">
+</parameter>
+<parameter name="conn" type="org.apache.http.conn.OperatedClientConnection">
+</parameter>
+</constructor>
+<method name="abortConnection"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="assertNotAborted"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<exception name="InterruptedIOException" type="java.io.InterruptedIOException">
+</exception>
+</method>
+<method name="assertValid"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="wrappedConn" type="org.apache.http.conn.OperatedClientConnection">
+</parameter>
+</method>
+<method name="detach"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</method>
+<method name="flush"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="getLocalAddress"
+ return="java.net.InetAddress"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getLocalPort"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getManager"
+ return="org.apache.http.conn.ClientConnectionManager"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</method>
+<method name="getMetrics"
+ return="org.apache.http.HttpConnectionMetrics"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getRemoteAddress"
+ return="java.net.InetAddress"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getRemotePort"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getSSLSession"
+ return="javax.net.ssl.SSLSession"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getSocketTimeout"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getWrappedConnection"
+ return="org.apache.http.conn.OperatedClientConnection"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</method>
+<method name="isMarkedReusable"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isOpen"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isResponseAvailable"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="timeout" type="int">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="isSecure"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isStale"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="markReusable"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="receiveResponseEntity"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="response" type="org.apache.http.HttpResponse">
+</parameter>
+<exception name="HttpException" type="org.apache.http.HttpException">
+</exception>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="receiveResponseHeader"
+ return="org.apache.http.HttpResponse"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="HttpException" type="org.apache.http.HttpException">
+</exception>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="releaseConnection"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="sendRequestEntity"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="request" type="org.apache.http.HttpEntityEnclosingRequest">
+</parameter>
+<exception name="HttpException" type="org.apache.http.HttpException">
+</exception>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="sendRequestHeader"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="request" type="org.apache.http.HttpRequest">
+</parameter>
+<exception name="HttpException" type="org.apache.http.HttpException">
+</exception>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="setIdleDuration"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="duration" type="long">
+</parameter>
+<parameter name="unit" type="java.util.concurrent.TimeUnit">
+</parameter>
+</method>
+<method name="setSocketTimeout"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="timeout" type="int">
+</parameter>
+</method>
+<method name="unmarkReusable"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+</class>
+<class name="AbstractPoolEntry"
+ extends="java.lang.Object"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="AbstractPoolEntry"
+ type="org.apache.http.impl.conn.AbstractPoolEntry"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="connOperator" type="org.apache.http.conn.ClientConnectionOperator">
+</parameter>
+<parameter name="route" type="org.apache.http.conn.routing.HttpRoute">
+</parameter>
+</constructor>
+<method name="getState"
+ return="java.lang.Object"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="layerProtocol"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="context" type="org.apache.http.protocol.HttpContext">
+</parameter>
+<parameter name="params" type="org.apache.http.params.HttpParams">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="open"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="route" type="org.apache.http.conn.routing.HttpRoute">
+</parameter>
+<parameter name="context" type="org.apache.http.protocol.HttpContext">
+</parameter>
+<parameter name="params" type="org.apache.http.params.HttpParams">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="setState"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="state" type="java.lang.Object">
+</parameter>
+</method>
+<method name="shutdownEntry"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</method>
+<method name="tunnelProxy"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="next" type="org.apache.http.HttpHost">
+</parameter>
+<parameter name="secure" type="boolean">
+</parameter>
+<parameter name="params" type="org.apache.http.params.HttpParams">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="tunnelTarget"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="secure" type="boolean">
+</parameter>
+<parameter name="params" type="org.apache.http.params.HttpParams">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<field name="connOperator"
+ type="org.apache.http.conn.ClientConnectionOperator"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</field>
+<field name="connection"
+ type="org.apache.http.conn.OperatedClientConnection"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</field>
+<field name="route"
+ type="org.apache.http.conn.routing.HttpRoute"
+ transient="false"
+ volatile="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</field>
+<field name="state"
+ type="java.lang.Object"
+ transient="false"
+ volatile="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</field>
+<field name="tracker"
+ type="org.apache.http.conn.routing.RouteTracker"
+ transient="false"
+ volatile="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</field>
+</class>
+<class name="AbstractPooledConnAdapter"
+ extends="org.apache.http.impl.conn.AbstractClientConnAdapter"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="AbstractPooledConnAdapter"
+ type="org.apache.http.impl.conn.AbstractPooledConnAdapter"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="manager" type="org.apache.http.conn.ClientConnectionManager">
+</parameter>
+<parameter name="entry" type="org.apache.http.impl.conn.AbstractPoolEntry">
+</parameter>
+</constructor>
+<method name="assertAttached"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</method>
+<method name="close"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="getRoute"
+ return="org.apache.http.conn.routing.HttpRoute"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getState"
+ return="java.lang.Object"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="layerProtocol"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="context" type="org.apache.http.protocol.HttpContext">
+</parameter>
+<parameter name="params" type="org.apache.http.params.HttpParams">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="open"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="route" type="org.apache.http.conn.routing.HttpRoute">
+</parameter>
+<parameter name="context" type="org.apache.http.protocol.HttpContext">
+</parameter>
+<parameter name="params" type="org.apache.http.params.HttpParams">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="setState"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="state" type="java.lang.Object">
+</parameter>
+</method>
+<method name="shutdown"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="tunnelProxy"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="next" type="org.apache.http.HttpHost">
+</parameter>
+<parameter name="secure" type="boolean">
+</parameter>
+<parameter name="params" type="org.apache.http.params.HttpParams">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="tunnelTarget"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="secure" type="boolean">
+</parameter>
+<parameter name="params" type="org.apache.http.params.HttpParams">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<field name="poolEntry"
+ type="org.apache.http.impl.conn.AbstractPoolEntry"
+ transient="false"
+ volatile="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</field>
+</class>
+<class name="DefaultClientConnection"
+ extends="org.apache.http.impl.SocketHttpClientConnection"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="org.apache.http.conn.OperatedClientConnection">
+</implements>
+<constructor name="DefaultClientConnection"
+ type="org.apache.http.impl.conn.DefaultClientConnection"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<method name="getSocket"
+ return="java.net.Socket"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getTargetHost"
+ return="org.apache.http.HttpHost"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isSecure"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="openCompleted"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="secure" type="boolean">
+</parameter>
+<parameter name="params" type="org.apache.http.params.HttpParams">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="opening"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="sock" type="java.net.Socket">
+</parameter>
+<parameter name="target" type="org.apache.http.HttpHost">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="update"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="sock" type="java.net.Socket">
+</parameter>
+<parameter name="target" type="org.apache.http.HttpHost">
+</parameter>
+<parameter name="secure" type="boolean">
+</parameter>
+<parameter name="params" type="org.apache.http.params.HttpParams">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+</class>
+<class name="DefaultClientConnectionOperator"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="org.apache.http.conn.ClientConnectionOperator">
+</implements>
+<constructor name="DefaultClientConnectionOperator"
+ type="org.apache.http.impl.conn.DefaultClientConnectionOperator"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="schemes" type="org.apache.http.conn.scheme.SchemeRegistry">
+</parameter>
+</constructor>
+<method name="createConnection"
+ return="org.apache.http.conn.OperatedClientConnection"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="openConnection"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="conn" type="org.apache.http.conn.OperatedClientConnection">
+</parameter>
+<parameter name="target" type="org.apache.http.HttpHost">
+</parameter>
+<parameter name="local" type="java.net.InetAddress">
+</parameter>
+<parameter name="context" type="org.apache.http.protocol.HttpContext">
+</parameter>
+<parameter name="params" type="org.apache.http.params.HttpParams">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="prepareSocket"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="sock" type="java.net.Socket">
+</parameter>
+<parameter name="context" type="org.apache.http.protocol.HttpContext">
+</parameter>
+<parameter name="params" type="org.apache.http.params.HttpParams">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="updateSecureConnection"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="conn" type="org.apache.http.conn.OperatedClientConnection">
+</parameter>
+<parameter name="target" type="org.apache.http.HttpHost">
+</parameter>
+<parameter name="context" type="org.apache.http.protocol.HttpContext">
+</parameter>
+<parameter name="params" type="org.apache.http.params.HttpParams">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<field name="schemeRegistry"
+ type="org.apache.http.conn.scheme.SchemeRegistry"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</field>
+</class>
+<class name="DefaultHttpRoutePlanner"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="org.apache.http.conn.routing.HttpRoutePlanner">
+</implements>
+<constructor name="DefaultHttpRoutePlanner"
+ type="org.apache.http.impl.conn.DefaultHttpRoutePlanner"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="schreg" type="org.apache.http.conn.scheme.SchemeRegistry">
+</parameter>
+</constructor>
+<method name="determineRoute"
+ return="org.apache.http.conn.routing.HttpRoute"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="target" type="org.apache.http.HttpHost">
+</parameter>
+<parameter name="request" type="org.apache.http.HttpRequest">
+</parameter>
+<parameter name="context" type="org.apache.http.protocol.HttpContext">
+</parameter>
+<exception name="HttpException" type="org.apache.http.HttpException">
+</exception>
+</method>
+<field name="schemeRegistry"
+ type="org.apache.http.conn.scheme.SchemeRegistry"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</field>
+</class>
+<class name="DefaultResponseParser"
+ extends="org.apache.http.impl.io.AbstractMessageParser"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="DefaultResponseParser"
+ type="org.apache.http.impl.conn.DefaultResponseParser"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="buffer" type="org.apache.http.io.SessionInputBuffer">
+</parameter>
+<parameter name="parser" type="org.apache.http.message.LineParser">
+</parameter>
+<parameter name="responseFactory" type="org.apache.http.HttpResponseFactory">
+</parameter>
+<parameter name="params" type="org.apache.http.params.HttpParams">
+</parameter>
+</constructor>
+<method name="parseHead"
+ return="org.apache.http.HttpMessage"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="sessionBuffer" type="org.apache.http.io.SessionInputBuffer">
+</parameter>
+<exception name="HttpException" type="org.apache.http.HttpException">
+</exception>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+</class>
+<class name="IdleConnectionHandler"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="IdleConnectionHandler"
+ type="org.apache.http.impl.conn.IdleConnectionHandler"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<method name="add"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="connection" type="org.apache.http.HttpConnection">
+</parameter>
+<parameter name="validDuration" type="long">
+</parameter>
+<parameter name="unit" type="java.util.concurrent.TimeUnit">
+</parameter>
+</method>
+<method name="closeExpiredConnections"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="closeIdleConnections"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="idleTime" type="long">
+</parameter>
+</method>
+<method name="remove"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="connection" type="org.apache.http.HttpConnection">
+</parameter>
+</method>
+<method name="removeAll"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+</class>
+<class name="LoggingSessionInputBuffer"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="org.apache.http.io.SessionInputBuffer">
+</implements>
+<constructor name="LoggingSessionInputBuffer"
+ type="org.apache.http.impl.conn.LoggingSessionInputBuffer"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="in" type="org.apache.http.io.SessionInputBuffer">
+</parameter>
+<parameter name="wire" type="org.apache.http.impl.conn.Wire">
+</parameter>
+</constructor>
+<method name="getMetrics"
+ return="org.apache.http.io.HttpTransportMetrics"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isDataAvailable"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="timeout" type="int">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="read"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="b" type="byte[]">
+</parameter>
+<parameter name="off" type="int">
+</parameter>
+<parameter name="len" type="int">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="read"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="read"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="b" type="byte[]">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="readLine"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="readLine"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="buffer" type="org.apache.http.util.CharArrayBuffer">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+</class>
+<class name="LoggingSessionOutputBuffer"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="org.apache.http.io.SessionOutputBuffer">
+</implements>
+<constructor name="LoggingSessionOutputBuffer"
+ type="org.apache.http.impl.conn.LoggingSessionOutputBuffer"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="out" type="org.apache.http.io.SessionOutputBuffer">
+</parameter>
+<parameter name="wire" type="org.apache.http.impl.conn.Wire">
+</parameter>
+</constructor>
+<method name="flush"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="getMetrics"
+ return="org.apache.http.io.HttpTransportMetrics"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="write"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="b" type="byte[]">
+</parameter>
+<parameter name="off" type="int">
+</parameter>
+<parameter name="len" type="int">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="write"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="b" type="int">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="write"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="b" type="byte[]">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="writeLine"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="buffer" type="org.apache.http.util.CharArrayBuffer">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="writeLine"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="s" type="java.lang.String">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+</class>
+<class name="ProxySelectorRoutePlanner"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="org.apache.http.conn.routing.HttpRoutePlanner">
+</implements>
+<constructor name="ProxySelectorRoutePlanner"
+ type="org.apache.http.impl.conn.ProxySelectorRoutePlanner"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="schreg" type="org.apache.http.conn.scheme.SchemeRegistry">
+</parameter>
+<parameter name="prosel" type="java.net.ProxySelector">
+</parameter>
+</constructor>
+<method name="chooseProxy"
+ return="java.net.Proxy"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="proxies" type="java.util.List&lt;java.net.Proxy&gt;">
+</parameter>
+<parameter name="target" type="org.apache.http.HttpHost">
+</parameter>
+<parameter name="request" type="org.apache.http.HttpRequest">
+</parameter>
+<parameter name="context" type="org.apache.http.protocol.HttpContext">
+</parameter>
+</method>
+<method name="determineProxy"
+ return="org.apache.http.HttpHost"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="target" type="org.apache.http.HttpHost">
+</parameter>
+<parameter name="request" type="org.apache.http.HttpRequest">
+</parameter>
+<parameter name="context" type="org.apache.http.protocol.HttpContext">
+</parameter>
+<exception name="HttpException" type="org.apache.http.HttpException">
+</exception>
+</method>
+<method name="determineRoute"
+ return="org.apache.http.conn.routing.HttpRoute"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="target" type="org.apache.http.HttpHost">
+</parameter>
+<parameter name="request" type="org.apache.http.HttpRequest">
+</parameter>
+<parameter name="context" type="org.apache.http.protocol.HttpContext">
+</parameter>
+<exception name="HttpException" type="org.apache.http.HttpException">
+</exception>
+</method>
+<method name="getHost"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="isa" type="java.net.InetSocketAddress">
+</parameter>
+</method>
+<method name="getProxySelector"
+ return="java.net.ProxySelector"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="setProxySelector"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="prosel" type="java.net.ProxySelector">
+</parameter>
+</method>
+<field name="proxySelector"
+ type="java.net.ProxySelector"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</field>
+<field name="schemeRegistry"
+ type="org.apache.http.conn.scheme.SchemeRegistry"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</field>
+</class>
+<class name="SingleClientConnManager"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="org.apache.http.conn.ClientConnectionManager">
+</implements>
+<constructor name="SingleClientConnManager"
+ type="org.apache.http.impl.conn.SingleClientConnManager"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="params" type="org.apache.http.params.HttpParams">
+</parameter>
+<parameter name="schreg" type="org.apache.http.conn.scheme.SchemeRegistry">
+</parameter>
+</constructor>
+<method name="assertStillUp"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<exception name="IllegalStateException" type="java.lang.IllegalStateException">
+</exception>
+</method>
+<method name="closeExpiredConnections"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="closeIdleConnections"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="idletime" type="long">
+</parameter>
+<parameter name="tunit" type="java.util.concurrent.TimeUnit">
+</parameter>
+</method>
+<method name="createConnectionOperator"
+ return="org.apache.http.conn.ClientConnectionOperator"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="schreg" type="org.apache.http.conn.scheme.SchemeRegistry">
+</parameter>
+</method>
+<method name="getConnection"
+ return="org.apache.http.conn.ManagedClientConnection"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="route" type="org.apache.http.conn.routing.HttpRoute">
+</parameter>
+<parameter name="state" type="java.lang.Object">
+</parameter>
+</method>
+<method name="getSchemeRegistry"
+ return="org.apache.http.conn.scheme.SchemeRegistry"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="releaseConnection"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="conn" type="org.apache.http.conn.ManagedClientConnection">
+</parameter>
+<parameter name="validDuration" type="long">
+</parameter>
+<parameter name="timeUnit" type="java.util.concurrent.TimeUnit">
+</parameter>
+</method>
+<method name="requestConnection"
+ return="org.apache.http.conn.ClientConnectionRequest"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="route" type="org.apache.http.conn.routing.HttpRoute">
+</parameter>
+<parameter name="state" type="java.lang.Object">
+</parameter>
+</method>
+<method name="revokeConnection"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</method>
+<method name="shutdown"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<field name="MISUSE_MESSAGE"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;Invalid use of SingleClientConnManager: connection still allocated.\nMake sure to release the connection before allocating another one.&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="alwaysShutDown"
+ type="boolean"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</field>
+<field name="connOperator"
+ type="org.apache.http.conn.ClientConnectionOperator"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</field>
+<field name="connectionExpiresTime"
+ type="long"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</field>
+<field name="isShutDown"
+ type="boolean"
+ transient="false"
+ volatile="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</field>
+<field name="lastReleaseTime"
+ type="long"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</field>
+<field name="managedConn"
+ type="org.apache.http.impl.conn.SingleClientConnManager.ConnAdapter"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</field>
+<field name="schemeRegistry"
+ type="org.apache.http.conn.scheme.SchemeRegistry"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</field>
+<field name="uniquePoolEntry"
+ type="org.apache.http.impl.conn.SingleClientConnManager.PoolEntry"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</field>
+</class>
+<class name="SingleClientConnManager.ConnAdapter"
+ extends="org.apache.http.impl.conn.AbstractPooledConnAdapter"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<constructor name="SingleClientConnManager.ConnAdapter"
+ type="org.apache.http.impl.conn.SingleClientConnManager.ConnAdapter"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="entry" type="org.apache.http.impl.conn.SingleClientConnManager.PoolEntry">
+</parameter>
+<parameter name="route" type="org.apache.http.conn.routing.HttpRoute">
+</parameter>
+</constructor>
+</class>
+<class name="SingleClientConnManager.PoolEntry"
+ extends="org.apache.http.impl.conn.AbstractPoolEntry"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<constructor name="SingleClientConnManager.PoolEntry"
+ type="org.apache.http.impl.conn.SingleClientConnManager.PoolEntry"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</constructor>
+<method name="close"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="shutdown"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+</class>
+<class name="Wire"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="Wire"
+ type="org.apache.http.impl.conn.Wire"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="log" type="org.apache.commons.logging.Log">
+</parameter>
+</constructor>
+<method name="enabled"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="input"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="instream" type="java.io.InputStream">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="input"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="b" type="byte[]">
+</parameter>
+<parameter name="off" type="int">
+</parameter>
+<parameter name="len" type="int">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="input"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="b" type="byte[]">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="input"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="b" type="int">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="input"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="s" type="java.lang.String">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="output"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="outstream" type="java.io.InputStream">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="output"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="b" type="byte[]">
+</parameter>
+<parameter name="off" type="int">
+</parameter>
+<parameter name="len" type="int">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="output"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="b" type="byte[]">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="output"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="b" type="int">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="output"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="s" type="java.lang.String">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+</class>
+</package>
+<package name="org.apache.http.impl.conn.tsccm"
+>
+<class name="AbstractConnPool"
+ extends="java.lang.Object"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="org.apache.http.impl.conn.tsccm.RefQueueHandler">
+</implements>
+<constructor name="AbstractConnPool"
+ type="org.apache.http.impl.conn.tsccm.AbstractConnPool"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</constructor>
+<method name="closeConnection"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="conn" type="org.apache.http.conn.OperatedClientConnection">
+</parameter>
+</method>
+<method name="closeExpiredConnections"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="closeIdleConnections"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="idletime" type="long">
+</parameter>
+<parameter name="tunit" type="java.util.concurrent.TimeUnit">
+</parameter>
+</method>
+<method name="deleteClosedConnections"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="enableConnectionGC"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="IllegalStateException" type="java.lang.IllegalStateException">
+</exception>
+</method>
+<method name="freeEntry"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="entry" type="org.apache.http.impl.conn.tsccm.BasicPoolEntry">
+</parameter>
+<parameter name="reusable" type="boolean">
+</parameter>
+<parameter name="validDuration" type="long">
+</parameter>
+<parameter name="timeUnit" type="java.util.concurrent.TimeUnit">
+</parameter>
+</method>
+<method name="getEntry"
+ return="org.apache.http.impl.conn.tsccm.BasicPoolEntry"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="route" type="org.apache.http.conn.routing.HttpRoute">
+</parameter>
+<parameter name="state" type="java.lang.Object">
+</parameter>
+<parameter name="timeout" type="long">
+</parameter>
+<parameter name="tunit" type="java.util.concurrent.TimeUnit">
+</parameter>
+<exception name="ConnectionPoolTimeoutException" type="org.apache.http.conn.ConnectionPoolTimeoutException">
+</exception>
+<exception name="InterruptedException" type="java.lang.InterruptedException">
+</exception>
+</method>
+<method name="handleLostEntry"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="route" type="org.apache.http.conn.routing.HttpRoute">
+</parameter>
+</method>
+<method name="handleReference"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="ref" type="java.lang.ref.Reference">
+</parameter>
+</method>
+<method name="requestPoolEntry"
+ return="org.apache.http.impl.conn.tsccm.PoolEntryRequest"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="route" type="org.apache.http.conn.routing.HttpRoute">
+</parameter>
+<parameter name="state" type="java.lang.Object">
+</parameter>
+</method>
+<method name="shutdown"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<field name="idleConnHandler"
+ type="org.apache.http.impl.conn.IdleConnectionHandler"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</field>
+<field name="isShutDown"
+ type="boolean"
+ transient="false"
+ volatile="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</field>
+<field name="issuedConnections"
+ type="java.util.Set"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</field>
+<field name="numConnections"
+ type="int"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</field>
+<field name="poolLock"
+ type="java.util.concurrent.locks.Lock"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</field>
+<field name="refQueue"
+ type="java.lang.ref.ReferenceQueue"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</field>
+</class>
+<class name="BasicPoolEntry"
+ extends="org.apache.http.impl.conn.AbstractPoolEntry"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="BasicPoolEntry"
+ type="org.apache.http.impl.conn.tsccm.BasicPoolEntry"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="op" type="org.apache.http.conn.ClientConnectionOperator">
+</parameter>
+<parameter name="route" type="org.apache.http.conn.routing.HttpRoute">
+</parameter>
+<parameter name="queue" type="java.lang.ref.ReferenceQueue&lt;java.lang.Object&gt;">
+</parameter>
+</constructor>
+<method name="getConnection"
+ return="org.apache.http.conn.OperatedClientConnection"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</method>
+<method name="getPlannedRoute"
+ return="org.apache.http.conn.routing.HttpRoute"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</method>
+<method name="getWeakRef"
+ return="org.apache.http.impl.conn.tsccm.BasicPoolEntryRef"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</method>
+</class>
+<class name="BasicPoolEntryRef"
+ extends="java.lang.ref.WeakReference"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="BasicPoolEntryRef"
+ type="org.apache.http.impl.conn.tsccm.BasicPoolEntryRef"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="entry" type="org.apache.http.impl.conn.tsccm.BasicPoolEntry">
+</parameter>
+<parameter name="queue" type="java.lang.ref.ReferenceQueue&lt;java.lang.Object&gt;">
+</parameter>
+</constructor>
+<method name="getRoute"
+ return="org.apache.http.conn.routing.HttpRoute"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+</class>
+<class name="BasicPooledConnAdapter"
+ extends="org.apache.http.impl.conn.AbstractPooledConnAdapter"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="BasicPooledConnAdapter"
+ type="org.apache.http.impl.conn.tsccm.BasicPooledConnAdapter"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="tsccm" type="org.apache.http.impl.conn.tsccm.ThreadSafeClientConnManager">
+</parameter>
+<parameter name="entry" type="org.apache.http.impl.conn.AbstractPoolEntry">
+</parameter>
+</constructor>
+<method name="getPoolEntry"
+ return="org.apache.http.impl.conn.AbstractPoolEntry"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</method>
+</class>
+<class name="ConnPoolByRoute"
+ extends="org.apache.http.impl.conn.tsccm.AbstractConnPool"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="ConnPoolByRoute"
+ type="org.apache.http.impl.conn.tsccm.ConnPoolByRoute"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="operator" type="org.apache.http.conn.ClientConnectionOperator">
+</parameter>
+<parameter name="params" type="org.apache.http.params.HttpParams">
+</parameter>
+</constructor>
+<method name="createEntry"
+ return="org.apache.http.impl.conn.tsccm.BasicPoolEntry"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="rospl" type="org.apache.http.impl.conn.tsccm.RouteSpecificPool">
+</parameter>
+<parameter name="op" type="org.apache.http.conn.ClientConnectionOperator">
+</parameter>
+</method>
+<method name="createFreeConnQueue"
+ return="java.util.Queue&lt;org.apache.http.impl.conn.tsccm.BasicPoolEntry&gt;"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</method>
+<method name="createRouteToPoolMap"
+ return="java.util.Map&lt;org.apache.http.conn.routing.HttpRoute, org.apache.http.impl.conn.tsccm.RouteSpecificPool&gt;"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</method>
+<method name="createWaitingThreadQueue"
+ return="java.util.Queue&lt;org.apache.http.impl.conn.tsccm.WaitingThread&gt;"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</method>
+<method name="deleteClosedConnections"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="deleteEntry"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="entry" type="org.apache.http.impl.conn.tsccm.BasicPoolEntry">
+</parameter>
+</method>
+<method name="deleteLeastUsedEntry"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</method>
+<method name="freeEntry"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="entry" type="org.apache.http.impl.conn.tsccm.BasicPoolEntry">
+</parameter>
+<parameter name="reusable" type="boolean">
+</parameter>
+<parameter name="validDuration" type="long">
+</parameter>
+<parameter name="timeUnit" type="java.util.concurrent.TimeUnit">
+</parameter>
+</method>
+<method name="getConnectionsInPool"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="route" type="org.apache.http.conn.routing.HttpRoute">
+</parameter>
+</method>
+<method name="getEntryBlocking"
+ return="org.apache.http.impl.conn.tsccm.BasicPoolEntry"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="route" type="org.apache.http.conn.routing.HttpRoute">
+</parameter>
+<parameter name="state" type="java.lang.Object">
+</parameter>
+<parameter name="timeout" type="long">
+</parameter>
+<parameter name="tunit" type="java.util.concurrent.TimeUnit">
+</parameter>
+<parameter name="aborter" type="org.apache.http.impl.conn.tsccm.WaitingThreadAborter">
+</parameter>
+<exception name="ConnectionPoolTimeoutException" type="org.apache.http.conn.ConnectionPoolTimeoutException">
+</exception>
+<exception name="InterruptedException" type="java.lang.InterruptedException">
+</exception>
+</method>
+<method name="getFreeEntry"
+ return="org.apache.http.impl.conn.tsccm.BasicPoolEntry"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="rospl" type="org.apache.http.impl.conn.tsccm.RouteSpecificPool">
+</parameter>
+<parameter name="state" type="java.lang.Object">
+</parameter>
+</method>
+<method name="getRoutePool"
+ return="org.apache.http.impl.conn.tsccm.RouteSpecificPool"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="route" type="org.apache.http.conn.routing.HttpRoute">
+</parameter>
+<parameter name="create" type="boolean">
+</parameter>
+</method>
+<method name="handleLostEntry"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="route" type="org.apache.http.conn.routing.HttpRoute">
+</parameter>
+</method>
+<method name="newRouteSpecificPool"
+ return="org.apache.http.impl.conn.tsccm.RouteSpecificPool"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="route" type="org.apache.http.conn.routing.HttpRoute">
+</parameter>
+</method>
+<method name="newWaitingThread"
+ return="org.apache.http.impl.conn.tsccm.WaitingThread"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="cond" type="java.util.concurrent.locks.Condition">
+</parameter>
+<parameter name="rospl" type="org.apache.http.impl.conn.tsccm.RouteSpecificPool">
+</parameter>
+</method>
+<method name="notifyWaitingThread"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="rospl" type="org.apache.http.impl.conn.tsccm.RouteSpecificPool">
+</parameter>
+</method>
+<method name="requestPoolEntry"
+ return="org.apache.http.impl.conn.tsccm.PoolEntryRequest"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="route" type="org.apache.http.conn.routing.HttpRoute">
+</parameter>
+<parameter name="state" type="java.lang.Object">
+</parameter>
+</method>
+<field name="freeConnections"
+ type="java.util.Queue"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</field>
+<field name="maxTotalConnections"
+ type="int"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</field>
+<field name="operator"
+ type="org.apache.http.conn.ClientConnectionOperator"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</field>
+<field name="routeToPool"
+ type="java.util.Map"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</field>
+<field name="waitingThreads"
+ type="java.util.Queue"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</field>
+</class>
+<interface name="PoolEntryRequest"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="abortRequest"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getPoolEntry"
+ return="org.apache.http.impl.conn.tsccm.BasicPoolEntry"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="timeout" type="long">
+</parameter>
+<parameter name="tunit" type="java.util.concurrent.TimeUnit">
+</parameter>
+<exception name="ConnectionPoolTimeoutException" type="org.apache.http.conn.ConnectionPoolTimeoutException">
+</exception>
+<exception name="InterruptedException" type="java.lang.InterruptedException">
+</exception>
+</method>
+</interface>
+<interface name="RefQueueHandler"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="handleReference"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="ref" type="java.lang.ref.Reference&lt;?&gt;">
+</parameter>
+</method>
+</interface>
+<class name="RefQueueWorker"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="java.lang.Runnable">
+</implements>
+<constructor name="RefQueueWorker"
+ type="org.apache.http.impl.conn.tsccm.RefQueueWorker"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="queue" type="java.lang.ref.ReferenceQueue&lt;?&gt;">
+</parameter>
+<parameter name="handler" type="org.apache.http.impl.conn.tsccm.RefQueueHandler">
+</parameter>
+</constructor>
+<method name="run"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="shutdown"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<field name="refHandler"
+ type="org.apache.http.impl.conn.tsccm.RefQueueHandler"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</field>
+<field name="refQueue"
+ type="java.lang.ref.ReferenceQueue"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</field>
+<field name="workerThread"
+ type="java.lang.Thread"
+ transient="false"
+ volatile="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</field>
+</class>
+<class name="RouteSpecificPool"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="RouteSpecificPool"
+ type="org.apache.http.impl.conn.tsccm.RouteSpecificPool"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="route" type="org.apache.http.conn.routing.HttpRoute">
+</parameter>
+<parameter name="maxEntries" type="int">
+</parameter>
+</constructor>
+<method name="allocEntry"
+ return="org.apache.http.impl.conn.tsccm.BasicPoolEntry"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="state" type="java.lang.Object">
+</parameter>
+</method>
+<method name="createdEntry"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="entry" type="org.apache.http.impl.conn.tsccm.BasicPoolEntry">
+</parameter>
+</method>
+<method name="deleteEntry"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="entry" type="org.apache.http.impl.conn.tsccm.BasicPoolEntry">
+</parameter>
+</method>
+<method name="dropEntry"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="freeEntry"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="entry" type="org.apache.http.impl.conn.tsccm.BasicPoolEntry">
+</parameter>
+</method>
+<method name="getCapacity"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getEntryCount"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getMaxEntries"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getRoute"
+ return="org.apache.http.conn.routing.HttpRoute"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="hasThread"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isUnused"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="nextThread"
+ return="org.apache.http.impl.conn.tsccm.WaitingThread"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="queueThread"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="wt" type="org.apache.http.impl.conn.tsccm.WaitingThread">
+</parameter>
+</method>
+<method name="removeThread"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="wt" type="org.apache.http.impl.conn.tsccm.WaitingThread">
+</parameter>
+</method>
+<field name="freeEntries"
+ type="java.util.LinkedList"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</field>
+<field name="maxEntries"
+ type="int"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</field>
+<field name="numEntries"
+ type="int"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</field>
+<field name="route"
+ type="org.apache.http.conn.routing.HttpRoute"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</field>
+<field name="waitingThreads"
+ type="java.util.Queue"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</field>
+</class>
+<class name="ThreadSafeClientConnManager"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="org.apache.http.conn.ClientConnectionManager">
+</implements>
+<constructor name="ThreadSafeClientConnManager"
+ type="org.apache.http.impl.conn.tsccm.ThreadSafeClientConnManager"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="params" type="org.apache.http.params.HttpParams">
+</parameter>
+<parameter name="schreg" type="org.apache.http.conn.scheme.SchemeRegistry">
+</parameter>
+</constructor>
+<method name="closeExpiredConnections"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="closeIdleConnections"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="idleTimeout" type="long">
+</parameter>
+<parameter name="tunit" type="java.util.concurrent.TimeUnit">
+</parameter>
+</method>
+<method name="createConnectionOperator"
+ return="org.apache.http.conn.ClientConnectionOperator"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="schreg" type="org.apache.http.conn.scheme.SchemeRegistry">
+</parameter>
+</method>
+<method name="createConnectionPool"
+ return="org.apache.http.impl.conn.tsccm.AbstractConnPool"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="params" type="org.apache.http.params.HttpParams">
+</parameter>
+</method>
+<method name="getConnectionsInPool"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="route" type="org.apache.http.conn.routing.HttpRoute">
+</parameter>
+</method>
+<method name="getConnectionsInPool"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getSchemeRegistry"
+ return="org.apache.http.conn.scheme.SchemeRegistry"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="releaseConnection"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="conn" type="org.apache.http.conn.ManagedClientConnection">
+</parameter>
+<parameter name="validDuration" type="long">
+</parameter>
+<parameter name="timeUnit" type="java.util.concurrent.TimeUnit">
+</parameter>
+</method>
+<method name="requestConnection"
+ return="org.apache.http.conn.ClientConnectionRequest"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="route" type="org.apache.http.conn.routing.HttpRoute">
+</parameter>
+<parameter name="state" type="java.lang.Object">
+</parameter>
+</method>
+<method name="shutdown"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<field name="connOperator"
+ type="org.apache.http.conn.ClientConnectionOperator"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</field>
+<field name="connectionPool"
+ type="org.apache.http.impl.conn.tsccm.AbstractConnPool"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</field>
+<field name="schemeRegistry"
+ type="org.apache.http.conn.scheme.SchemeRegistry"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</field>
+</class>
+<class name="WaitingThread"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="WaitingThread"
+ type="org.apache.http.impl.conn.tsccm.WaitingThread"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="cond" type="java.util.concurrent.locks.Condition">
+</parameter>
+<parameter name="pool" type="org.apache.http.impl.conn.tsccm.RouteSpecificPool">
+</parameter>
+</constructor>
+<method name="await"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="deadline" type="java.util.Date">
+</parameter>
+<exception name="InterruptedException" type="java.lang.InterruptedException">
+</exception>
+</method>
+<method name="getCondition"
+ return="java.util.concurrent.locks.Condition"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getPool"
+ return="org.apache.http.impl.conn.tsccm.RouteSpecificPool"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getThread"
+ return="java.lang.Thread"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="interrupt"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="wakeup"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+</class>
+<class name="WaitingThreadAborter"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="WaitingThreadAborter"
+ type="org.apache.http.impl.conn.tsccm.WaitingThreadAborter"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<method name="abort"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="setWaitingThread"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="waitingThread" type="org.apache.http.impl.conn.tsccm.WaitingThread">
+</parameter>
+</method>
+</class>
+</package>
+<package name="org.apache.http.impl.cookie"
+>
+<class name="AbstractCookieAttributeHandler"
+ extends="java.lang.Object"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="org.apache.http.cookie.CookieAttributeHandler">
+</implements>
+<constructor name="AbstractCookieAttributeHandler"
+ type="org.apache.http.impl.cookie.AbstractCookieAttributeHandler"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<method name="match"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="cookie" type="org.apache.http.cookie.Cookie">
+</parameter>
+<parameter name="origin" type="org.apache.http.cookie.CookieOrigin">
+</parameter>
+</method>
+<method name="validate"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="cookie" type="org.apache.http.cookie.Cookie">
+</parameter>
+<parameter name="origin" type="org.apache.http.cookie.CookieOrigin">
+</parameter>
+<exception name="MalformedCookieException" type="org.apache.http.cookie.MalformedCookieException">
+</exception>
+</method>
+</class>
+<class name="AbstractCookieSpec"
+ extends="java.lang.Object"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="org.apache.http.cookie.CookieSpec">
+</implements>
+<constructor name="AbstractCookieSpec"
+ type="org.apache.http.impl.cookie.AbstractCookieSpec"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<method name="findAttribHandler"
+ return="org.apache.http.cookie.CookieAttributeHandler"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+</method>
+<method name="getAttribHandler"
+ return="org.apache.http.cookie.CookieAttributeHandler"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+</method>
+<method name="getAttribHandlers"
+ return="java.util.Collection&lt;org.apache.http.cookie.CookieAttributeHandler&gt;"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</method>
+<method name="registerAttribHandler"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+<parameter name="handler" type="org.apache.http.cookie.CookieAttributeHandler">
+</parameter>
+</method>
+</class>
+<class name="BasicClientCookie"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="org.apache.http.cookie.ClientCookie">
+</implements>
+<implements name="java.lang.Cloneable">
+</implements>
+<implements name="org.apache.http.cookie.SetCookie">
+</implements>
+<constructor name="BasicClientCookie"
+ type="org.apache.http.impl.cookie.BasicClientCookie"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+<parameter name="value" type="java.lang.String">
+</parameter>
+</constructor>
+<method name="clone"
+ return="java.lang.Object"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="CloneNotSupportedException" type="java.lang.CloneNotSupportedException">
+</exception>
+</method>
+<method name="containsAttribute"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+</method>
+<method name="getAttribute"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+</method>
+<method name="getComment"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getCommentURL"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getDomain"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getExpiryDate"
+ return="java.util.Date"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getName"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getPath"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getPorts"
+ return="int[]"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getValue"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getVersion"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isExpired"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="date" type="java.util.Date">
+</parameter>
+</method>
+<method name="isPersistent"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isSecure"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="setAttribute"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+<parameter name="value" type="java.lang.String">
+</parameter>
+</method>
+<method name="setComment"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="comment" type="java.lang.String">
+</parameter>
+</method>
+<method name="setDomain"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="domain" type="java.lang.String">
+</parameter>
+</method>
+<method name="setExpiryDate"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="expiryDate" type="java.util.Date">
+</parameter>
+</method>
+<method name="setPath"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="path" type="java.lang.String">
+</parameter>
+</method>
+<method name="setSecure"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="secure" type="boolean">
+</parameter>
+</method>
+<method name="setValue"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="value" type="java.lang.String">
+</parameter>
+</method>
+<method name="setVersion"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="version" type="int">
+</parameter>
+</method>
+</class>
+<class name="BasicClientCookie2"
+ extends="org.apache.http.impl.cookie.BasicClientCookie"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="org.apache.http.cookie.SetCookie2">
+</implements>
+<constructor name="BasicClientCookie2"
+ type="org.apache.http.impl.cookie.BasicClientCookie2"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+<parameter name="value" type="java.lang.String">
+</parameter>
+</constructor>
+<method name="setCommentURL"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="commentURL" type="java.lang.String">
+</parameter>
+</method>
+<method name="setDiscard"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="discard" type="boolean">
+</parameter>
+</method>
+<method name="setPorts"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="ports" type="int[]">
+</parameter>
+</method>
+</class>
+<class name="BasicCommentHandler"
+ extends="org.apache.http.impl.cookie.AbstractCookieAttributeHandler"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="BasicCommentHandler"
+ type="org.apache.http.impl.cookie.BasicCommentHandler"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<method name="parse"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="cookie" type="org.apache.http.cookie.SetCookie">
+</parameter>
+<parameter name="value" type="java.lang.String">
+</parameter>
+<exception name="MalformedCookieException" type="org.apache.http.cookie.MalformedCookieException">
+</exception>
+</method>
+</class>
+<class name="BasicDomainHandler"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="org.apache.http.cookie.CookieAttributeHandler">
+</implements>
+<constructor name="BasicDomainHandler"
+ type="org.apache.http.impl.cookie.BasicDomainHandler"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<method name="match"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="cookie" type="org.apache.http.cookie.Cookie">
+</parameter>
+<parameter name="origin" type="org.apache.http.cookie.CookieOrigin">
+</parameter>
+</method>
+<method name="parse"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="cookie" type="org.apache.http.cookie.SetCookie">
+</parameter>
+<parameter name="value" type="java.lang.String">
+</parameter>
+<exception name="MalformedCookieException" type="org.apache.http.cookie.MalformedCookieException">
+</exception>
+</method>
+<method name="validate"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="cookie" type="org.apache.http.cookie.Cookie">
+</parameter>
+<parameter name="origin" type="org.apache.http.cookie.CookieOrigin">
+</parameter>
+<exception name="MalformedCookieException" type="org.apache.http.cookie.MalformedCookieException">
+</exception>
+</method>
+</class>
+<class name="BasicExpiresHandler"
+ extends="org.apache.http.impl.cookie.AbstractCookieAttributeHandler"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="BasicExpiresHandler"
+ type="org.apache.http.impl.cookie.BasicExpiresHandler"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="datepatterns" type="java.lang.String[]">
+</parameter>
+</constructor>
+<method name="parse"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="cookie" type="org.apache.http.cookie.SetCookie">
+</parameter>
+<parameter name="value" type="java.lang.String">
+</parameter>
+<exception name="MalformedCookieException" type="org.apache.http.cookie.MalformedCookieException">
+</exception>
+</method>
+</class>
+<class name="BasicMaxAgeHandler"
+ extends="org.apache.http.impl.cookie.AbstractCookieAttributeHandler"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="BasicMaxAgeHandler"
+ type="org.apache.http.impl.cookie.BasicMaxAgeHandler"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<method name="parse"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="cookie" type="org.apache.http.cookie.SetCookie">
+</parameter>
+<parameter name="value" type="java.lang.String">
+</parameter>
+<exception name="MalformedCookieException" type="org.apache.http.cookie.MalformedCookieException">
+</exception>
+</method>
+</class>
+<class name="BasicPathHandler"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="org.apache.http.cookie.CookieAttributeHandler">
+</implements>
+<constructor name="BasicPathHandler"
+ type="org.apache.http.impl.cookie.BasicPathHandler"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<method name="match"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="cookie" type="org.apache.http.cookie.Cookie">
+</parameter>
+<parameter name="origin" type="org.apache.http.cookie.CookieOrigin">
+</parameter>
+</method>
+<method name="parse"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="cookie" type="org.apache.http.cookie.SetCookie">
+</parameter>
+<parameter name="value" type="java.lang.String">
+</parameter>
+<exception name="MalformedCookieException" type="org.apache.http.cookie.MalformedCookieException">
+</exception>
+</method>
+<method name="validate"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="cookie" type="org.apache.http.cookie.Cookie">
+</parameter>
+<parameter name="origin" type="org.apache.http.cookie.CookieOrigin">
+</parameter>
+<exception name="MalformedCookieException" type="org.apache.http.cookie.MalformedCookieException">
+</exception>
+</method>
+</class>
+<class name="BasicSecureHandler"
+ extends="org.apache.http.impl.cookie.AbstractCookieAttributeHandler"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="BasicSecureHandler"
+ type="org.apache.http.impl.cookie.BasicSecureHandler"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<method name="parse"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="cookie" type="org.apache.http.cookie.SetCookie">
+</parameter>
+<parameter name="value" type="java.lang.String">
+</parameter>
+<exception name="MalformedCookieException" type="org.apache.http.cookie.MalformedCookieException">
+</exception>
+</method>
+</class>
+<class name="BestMatchSpec"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="org.apache.http.cookie.CookieSpec">
+</implements>
+<constructor name="BestMatchSpec"
+ type="org.apache.http.impl.cookie.BestMatchSpec"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="datepatterns" type="java.lang.String[]">
+</parameter>
+<parameter name="oneHeader" type="boolean">
+</parameter>
+</constructor>
+<constructor name="BestMatchSpec"
+ type="org.apache.http.impl.cookie.BestMatchSpec"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<method name="formatCookies"
+ return="java.util.List&lt;org.apache.http.Header&gt;"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="cookies" type="java.util.List&lt;org.apache.http.cookie.Cookie&gt;">
+</parameter>
+</method>
+<method name="getVersion"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getVersionHeader"
+ return="org.apache.http.Header"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="match"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="cookie" type="org.apache.http.cookie.Cookie">
+</parameter>
+<parameter name="origin" type="org.apache.http.cookie.CookieOrigin">
+</parameter>
+</method>
+<method name="parse"
+ return="java.util.List&lt;org.apache.http.cookie.Cookie&gt;"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="header" type="org.apache.http.Header">
+</parameter>
+<parameter name="origin" type="org.apache.http.cookie.CookieOrigin">
+</parameter>
+<exception name="MalformedCookieException" type="org.apache.http.cookie.MalformedCookieException">
+</exception>
+</method>
+<method name="validate"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="cookie" type="org.apache.http.cookie.Cookie">
+</parameter>
+<parameter name="origin" type="org.apache.http.cookie.CookieOrigin">
+</parameter>
+<exception name="MalformedCookieException" type="org.apache.http.cookie.MalformedCookieException">
+</exception>
+</method>
+</class>
+<class name="BestMatchSpecFactory"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="org.apache.http.cookie.CookieSpecFactory">
+</implements>
+<constructor name="BestMatchSpecFactory"
+ type="org.apache.http.impl.cookie.BestMatchSpecFactory"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<method name="newInstance"
+ return="org.apache.http.cookie.CookieSpec"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="params" type="org.apache.http.params.HttpParams">
+</parameter>
+</method>
+</class>
+<class name="BrowserCompatSpec"
+ extends="org.apache.http.impl.cookie.CookieSpecBase"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="BrowserCompatSpec"
+ type="org.apache.http.impl.cookie.BrowserCompatSpec"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="datepatterns" type="java.lang.String[]">
+</parameter>
+</constructor>
+<constructor name="BrowserCompatSpec"
+ type="org.apache.http.impl.cookie.BrowserCompatSpec"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<method name="formatCookies"
+ return="java.util.List&lt;org.apache.http.Header&gt;"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="cookies" type="java.util.List&lt;org.apache.http.cookie.Cookie&gt;">
+</parameter>
+</method>
+<method name="getVersion"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getVersionHeader"
+ return="org.apache.http.Header"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="parse"
+ return="java.util.List&lt;org.apache.http.cookie.Cookie&gt;"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="header" type="org.apache.http.Header">
+</parameter>
+<parameter name="origin" type="org.apache.http.cookie.CookieOrigin">
+</parameter>
+<exception name="MalformedCookieException" type="org.apache.http.cookie.MalformedCookieException">
+</exception>
+</method>
+<field name="DATE_PATTERNS"
+ type="java.lang.String[]"
+ transient="false"
+ volatile="false"
+ value="null"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</field>
+</class>
+<class name="BrowserCompatSpecFactory"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="org.apache.http.cookie.CookieSpecFactory">
+</implements>
+<constructor name="BrowserCompatSpecFactory"
+ type="org.apache.http.impl.cookie.BrowserCompatSpecFactory"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<method name="newInstance"
+ return="org.apache.http.cookie.CookieSpec"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="params" type="org.apache.http.params.HttpParams">
+</parameter>
+</method>
+</class>
+<class name="CookieSpecBase"
+ extends="org.apache.http.impl.cookie.AbstractCookieSpec"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="CookieSpecBase"
+ type="org.apache.http.impl.cookie.CookieSpecBase"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<method name="getDefaultDomain"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="origin" type="org.apache.http.cookie.CookieOrigin">
+</parameter>
+</method>
+<method name="getDefaultPath"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="origin" type="org.apache.http.cookie.CookieOrigin">
+</parameter>
+</method>
+<method name="match"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="cookie" type="org.apache.http.cookie.Cookie">
+</parameter>
+<parameter name="origin" type="org.apache.http.cookie.CookieOrigin">
+</parameter>
+</method>
+<method name="parse"
+ return="java.util.List&lt;org.apache.http.cookie.Cookie&gt;"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="elems" type="org.apache.http.HeaderElement[]">
+</parameter>
+<parameter name="origin" type="org.apache.http.cookie.CookieOrigin">
+</parameter>
+<exception name="MalformedCookieException" type="org.apache.http.cookie.MalformedCookieException">
+</exception>
+</method>
+<method name="validate"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="cookie" type="org.apache.http.cookie.Cookie">
+</parameter>
+<parameter name="origin" type="org.apache.http.cookie.CookieOrigin">
+</parameter>
+<exception name="MalformedCookieException" type="org.apache.http.cookie.MalformedCookieException">
+</exception>
+</method>
+</class>
+<class name="DateParseException"
+ extends="java.lang.Exception"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="DateParseException"
+ type="org.apache.http.impl.cookie.DateParseException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<constructor name="DateParseException"
+ type="org.apache.http.impl.cookie.DateParseException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="message" type="java.lang.String">
+</parameter>
+</constructor>
+</class>
+<class name="DateUtils"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="formatDate"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="date" type="java.util.Date">
+</parameter>
+</method>
+<method name="formatDate"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="date" type="java.util.Date">
+</parameter>
+<parameter name="pattern" type="java.lang.String">
+</parameter>
+</method>
+<method name="parseDate"
+ return="java.util.Date"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="dateValue" type="java.lang.String">
+</parameter>
+<exception name="DateParseException" type="org.apache.http.impl.cookie.DateParseException">
+</exception>
+</method>
+<method name="parseDate"
+ return="java.util.Date"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="dateValue" type="java.lang.String">
+</parameter>
+<parameter name="dateFormats" type="java.lang.String[]">
+</parameter>
+<exception name="DateParseException" type="org.apache.http.impl.cookie.DateParseException">
+</exception>
+</method>
+<method name="parseDate"
+ return="java.util.Date"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="dateValue" type="java.lang.String">
+</parameter>
+<parameter name="dateFormats" type="java.lang.String[]">
+</parameter>
+<parameter name="startDate" type="java.util.Date">
+</parameter>
+<exception name="DateParseException" type="org.apache.http.impl.cookie.DateParseException">
+</exception>
+</method>
+<field name="GMT"
+ type="java.util.TimeZone"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="PATTERN_ASCTIME"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;EEE MMM d HH:mm:ss yyyy&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="PATTERN_RFC1036"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;EEEE, dd-MMM-yy HH:mm:ss zzz&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="PATTERN_RFC1123"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;EEE, dd MMM yyyy HH:mm:ss zzz&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<class name="NetscapeDomainHandler"
+ extends="org.apache.http.impl.cookie.BasicDomainHandler"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="NetscapeDomainHandler"
+ type="org.apache.http.impl.cookie.NetscapeDomainHandler"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+</class>
+<class name="NetscapeDraftHeaderParser"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="NetscapeDraftHeaderParser"
+ type="org.apache.http.impl.cookie.NetscapeDraftHeaderParser"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<method name="parseHeader"
+ return="org.apache.http.HeaderElement"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="buffer" type="org.apache.http.util.CharArrayBuffer">
+</parameter>
+<parameter name="cursor" type="org.apache.http.message.ParserCursor">
+</parameter>
+<exception name="ParseException" type="org.apache.http.ParseException">
+</exception>
+</method>
+<field name="DEFAULT"
+ type="org.apache.http.impl.cookie.NetscapeDraftHeaderParser"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<class name="NetscapeDraftSpec"
+ extends="org.apache.http.impl.cookie.CookieSpecBase"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="NetscapeDraftSpec"
+ type="org.apache.http.impl.cookie.NetscapeDraftSpec"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="datepatterns" type="java.lang.String[]">
+</parameter>
+</constructor>
+<constructor name="NetscapeDraftSpec"
+ type="org.apache.http.impl.cookie.NetscapeDraftSpec"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<method name="formatCookies"
+ return="java.util.List&lt;org.apache.http.Header&gt;"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="cookies" type="java.util.List&lt;org.apache.http.cookie.Cookie&gt;">
+</parameter>
+</method>
+<method name="getVersion"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getVersionHeader"
+ return="org.apache.http.Header"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="parse"
+ return="java.util.List&lt;org.apache.http.cookie.Cookie&gt;"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="header" type="org.apache.http.Header">
+</parameter>
+<parameter name="origin" type="org.apache.http.cookie.CookieOrigin">
+</parameter>
+<exception name="MalformedCookieException" type="org.apache.http.cookie.MalformedCookieException">
+</exception>
+</method>
+<field name="EXPIRES_PATTERN"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;EEE, dd-MMM-yyyy HH:mm:ss z&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</field>
+</class>
+<class name="NetscapeDraftSpecFactory"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="org.apache.http.cookie.CookieSpecFactory">
+</implements>
+<constructor name="NetscapeDraftSpecFactory"
+ type="org.apache.http.impl.cookie.NetscapeDraftSpecFactory"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<method name="newInstance"
+ return="org.apache.http.cookie.CookieSpec"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="params" type="org.apache.http.params.HttpParams">
+</parameter>
+</method>
+</class>
+<class name="RFC2109DomainHandler"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="org.apache.http.cookie.CookieAttributeHandler">
+</implements>
+<constructor name="RFC2109DomainHandler"
+ type="org.apache.http.impl.cookie.RFC2109DomainHandler"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<method name="match"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="cookie" type="org.apache.http.cookie.Cookie">
+</parameter>
+<parameter name="origin" type="org.apache.http.cookie.CookieOrigin">
+</parameter>
+</method>
+<method name="parse"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="cookie" type="org.apache.http.cookie.SetCookie">
+</parameter>
+<parameter name="value" type="java.lang.String">
+</parameter>
+<exception name="MalformedCookieException" type="org.apache.http.cookie.MalformedCookieException">
+</exception>
+</method>
+<method name="validate"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="cookie" type="org.apache.http.cookie.Cookie">
+</parameter>
+<parameter name="origin" type="org.apache.http.cookie.CookieOrigin">
+</parameter>
+<exception name="MalformedCookieException" type="org.apache.http.cookie.MalformedCookieException">
+</exception>
+</method>
+</class>
+<class name="RFC2109Spec"
+ extends="org.apache.http.impl.cookie.CookieSpecBase"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="RFC2109Spec"
+ type="org.apache.http.impl.cookie.RFC2109Spec"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="datepatterns" type="java.lang.String[]">
+</parameter>
+<parameter name="oneHeader" type="boolean">
+</parameter>
+</constructor>
+<constructor name="RFC2109Spec"
+ type="org.apache.http.impl.cookie.RFC2109Spec"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<method name="formatCookieAsVer"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="buffer" type="org.apache.http.util.CharArrayBuffer">
+</parameter>
+<parameter name="cookie" type="org.apache.http.cookie.Cookie">
+</parameter>
+<parameter name="version" type="int">
+</parameter>
+</method>
+<method name="formatCookies"
+ return="java.util.List&lt;org.apache.http.Header&gt;"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="cookies" type="java.util.List&lt;org.apache.http.cookie.Cookie&gt;">
+</parameter>
+</method>
+<method name="formatParamAsVer"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="buffer" type="org.apache.http.util.CharArrayBuffer">
+</parameter>
+<parameter name="name" type="java.lang.String">
+</parameter>
+<parameter name="value" type="java.lang.String">
+</parameter>
+<parameter name="version" type="int">
+</parameter>
+</method>
+<method name="getVersion"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getVersionHeader"
+ return="org.apache.http.Header"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="parse"
+ return="java.util.List&lt;org.apache.http.cookie.Cookie&gt;"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="header" type="org.apache.http.Header">
+</parameter>
+<parameter name="origin" type="org.apache.http.cookie.CookieOrigin">
+</parameter>
+<exception name="MalformedCookieException" type="org.apache.http.cookie.MalformedCookieException">
+</exception>
+</method>
+</class>
+<class name="RFC2109SpecFactory"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="org.apache.http.cookie.CookieSpecFactory">
+</implements>
+<constructor name="RFC2109SpecFactory"
+ type="org.apache.http.impl.cookie.RFC2109SpecFactory"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<method name="newInstance"
+ return="org.apache.http.cookie.CookieSpec"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="params" type="org.apache.http.params.HttpParams">
+</parameter>
+</method>
+</class>
+<class name="RFC2109VersionHandler"
+ extends="org.apache.http.impl.cookie.AbstractCookieAttributeHandler"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="RFC2109VersionHandler"
+ type="org.apache.http.impl.cookie.RFC2109VersionHandler"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<method name="parse"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="cookie" type="org.apache.http.cookie.SetCookie">
+</parameter>
+<parameter name="value" type="java.lang.String">
+</parameter>
+<exception name="MalformedCookieException" type="org.apache.http.cookie.MalformedCookieException">
+</exception>
+</method>
+</class>
+<class name="RFC2965CommentUrlAttributeHandler"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="org.apache.http.cookie.CookieAttributeHandler">
+</implements>
+<constructor name="RFC2965CommentUrlAttributeHandler"
+ type="org.apache.http.impl.cookie.RFC2965CommentUrlAttributeHandler"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<method name="match"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="cookie" type="org.apache.http.cookie.Cookie">
+</parameter>
+<parameter name="origin" type="org.apache.http.cookie.CookieOrigin">
+</parameter>
+</method>
+<method name="parse"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="cookie" type="org.apache.http.cookie.SetCookie">
+</parameter>
+<parameter name="commenturl" type="java.lang.String">
+</parameter>
+<exception name="MalformedCookieException" type="org.apache.http.cookie.MalformedCookieException">
+</exception>
+</method>
+<method name="validate"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="cookie" type="org.apache.http.cookie.Cookie">
+</parameter>
+<parameter name="origin" type="org.apache.http.cookie.CookieOrigin">
+</parameter>
+<exception name="MalformedCookieException" type="org.apache.http.cookie.MalformedCookieException">
+</exception>
+</method>
+</class>
+<class name="RFC2965DiscardAttributeHandler"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="org.apache.http.cookie.CookieAttributeHandler">
+</implements>
+<constructor name="RFC2965DiscardAttributeHandler"
+ type="org.apache.http.impl.cookie.RFC2965DiscardAttributeHandler"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<method name="match"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="cookie" type="org.apache.http.cookie.Cookie">
+</parameter>
+<parameter name="origin" type="org.apache.http.cookie.CookieOrigin">
+</parameter>
+</method>
+<method name="parse"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="cookie" type="org.apache.http.cookie.SetCookie">
+</parameter>
+<parameter name="commenturl" type="java.lang.String">
+</parameter>
+<exception name="MalformedCookieException" type="org.apache.http.cookie.MalformedCookieException">
+</exception>
+</method>
+<method name="validate"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="cookie" type="org.apache.http.cookie.Cookie">
+</parameter>
+<parameter name="origin" type="org.apache.http.cookie.CookieOrigin">
+</parameter>
+<exception name="MalformedCookieException" type="org.apache.http.cookie.MalformedCookieException">
+</exception>
+</method>
+</class>
+<class name="RFC2965DomainAttributeHandler"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="org.apache.http.cookie.CookieAttributeHandler">
+</implements>
+<constructor name="RFC2965DomainAttributeHandler"
+ type="org.apache.http.impl.cookie.RFC2965DomainAttributeHandler"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<method name="domainMatch"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="host" type="java.lang.String">
+</parameter>
+<parameter name="domain" type="java.lang.String">
+</parameter>
+</method>
+<method name="match"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="cookie" type="org.apache.http.cookie.Cookie">
+</parameter>
+<parameter name="origin" type="org.apache.http.cookie.CookieOrigin">
+</parameter>
+</method>
+<method name="parse"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="cookie" type="org.apache.http.cookie.SetCookie">
+</parameter>
+<parameter name="domain" type="java.lang.String">
+</parameter>
+<exception name="MalformedCookieException" type="org.apache.http.cookie.MalformedCookieException">
+</exception>
+</method>
+<method name="validate"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="cookie" type="org.apache.http.cookie.Cookie">
+</parameter>
+<parameter name="origin" type="org.apache.http.cookie.CookieOrigin">
+</parameter>
+<exception name="MalformedCookieException" type="org.apache.http.cookie.MalformedCookieException">
+</exception>
+</method>
+</class>
+<class name="RFC2965PortAttributeHandler"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="org.apache.http.cookie.CookieAttributeHandler">
+</implements>
+<constructor name="RFC2965PortAttributeHandler"
+ type="org.apache.http.impl.cookie.RFC2965PortAttributeHandler"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<method name="match"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="cookie" type="org.apache.http.cookie.Cookie">
+</parameter>
+<parameter name="origin" type="org.apache.http.cookie.CookieOrigin">
+</parameter>
+</method>
+<method name="parse"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="cookie" type="org.apache.http.cookie.SetCookie">
+</parameter>
+<parameter name="portValue" type="java.lang.String">
+</parameter>
+<exception name="MalformedCookieException" type="org.apache.http.cookie.MalformedCookieException">
+</exception>
+</method>
+<method name="validate"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="cookie" type="org.apache.http.cookie.Cookie">
+</parameter>
+<parameter name="origin" type="org.apache.http.cookie.CookieOrigin">
+</parameter>
+<exception name="MalformedCookieException" type="org.apache.http.cookie.MalformedCookieException">
+</exception>
+</method>
+</class>
+<class name="RFC2965Spec"
+ extends="org.apache.http.impl.cookie.RFC2109Spec"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="RFC2965Spec"
+ type="org.apache.http.impl.cookie.RFC2965Spec"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<constructor name="RFC2965Spec"
+ type="org.apache.http.impl.cookie.RFC2965Spec"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="datepatterns" type="java.lang.String[]">
+</parameter>
+<parameter name="oneHeader" type="boolean">
+</parameter>
+</constructor>
+</class>
+<class name="RFC2965SpecFactory"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="org.apache.http.cookie.CookieSpecFactory">
+</implements>
+<constructor name="RFC2965SpecFactory"
+ type="org.apache.http.impl.cookie.RFC2965SpecFactory"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<method name="newInstance"
+ return="org.apache.http.cookie.CookieSpec"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="params" type="org.apache.http.params.HttpParams">
+</parameter>
+</method>
+</class>
+<class name="RFC2965VersionAttributeHandler"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="org.apache.http.cookie.CookieAttributeHandler">
+</implements>
+<constructor name="RFC2965VersionAttributeHandler"
+ type="org.apache.http.impl.cookie.RFC2965VersionAttributeHandler"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<method name="match"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="cookie" type="org.apache.http.cookie.Cookie">
+</parameter>
+<parameter name="origin" type="org.apache.http.cookie.CookieOrigin">
+</parameter>
+</method>
+<method name="parse"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="cookie" type="org.apache.http.cookie.SetCookie">
+</parameter>
+<parameter name="value" type="java.lang.String">
+</parameter>
+<exception name="MalformedCookieException" type="org.apache.http.cookie.MalformedCookieException">
+</exception>
+</method>
+<method name="validate"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="cookie" type="org.apache.http.cookie.Cookie">
+</parameter>
+<parameter name="origin" type="org.apache.http.cookie.CookieOrigin">
+</parameter>
+<exception name="MalformedCookieException" type="org.apache.http.cookie.MalformedCookieException">
+</exception>
+</method>
+</class>
+</package>
+<package name="org.apache.http.impl.entity"
+>
+<class name="EntityDeserializer"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="EntityDeserializer"
+ type="org.apache.http.impl.entity.EntityDeserializer"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="lenStrategy" type="org.apache.http.entity.ContentLengthStrategy">
+</parameter>
+</constructor>
+<method name="deserialize"
+ return="org.apache.http.HttpEntity"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="inbuffer" type="org.apache.http.io.SessionInputBuffer">
+</parameter>
+<parameter name="message" type="org.apache.http.HttpMessage">
+</parameter>
+<exception name="HttpException" type="org.apache.http.HttpException">
+</exception>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="doDeserialize"
+ return="org.apache.http.entity.BasicHttpEntity"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="inbuffer" type="org.apache.http.io.SessionInputBuffer">
+</parameter>
+<parameter name="message" type="org.apache.http.HttpMessage">
+</parameter>
+<exception name="HttpException" type="org.apache.http.HttpException">
+</exception>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+</class>
+<class name="EntitySerializer"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="EntitySerializer"
+ type="org.apache.http.impl.entity.EntitySerializer"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="lenStrategy" type="org.apache.http.entity.ContentLengthStrategy">
+</parameter>
+</constructor>
+<method name="doSerialize"
+ return="java.io.OutputStream"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="outbuffer" type="org.apache.http.io.SessionOutputBuffer">
+</parameter>
+<parameter name="message" type="org.apache.http.HttpMessage">
+</parameter>
+<exception name="HttpException" type="org.apache.http.HttpException">
+</exception>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="serialize"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="outbuffer" type="org.apache.http.io.SessionOutputBuffer">
+</parameter>
+<parameter name="message" type="org.apache.http.HttpMessage">
+</parameter>
+<parameter name="entity" type="org.apache.http.HttpEntity">
+</parameter>
+<exception name="HttpException" type="org.apache.http.HttpException">
+</exception>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+</class>
+<class name="LaxContentLengthStrategy"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="org.apache.http.entity.ContentLengthStrategy">
+</implements>
+<constructor name="LaxContentLengthStrategy"
+ type="org.apache.http.impl.entity.LaxContentLengthStrategy"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<method name="determineLength"
+ return="long"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="message" type="org.apache.http.HttpMessage">
+</parameter>
+<exception name="HttpException" type="org.apache.http.HttpException">
+</exception>
+</method>
+</class>
+<class name="StrictContentLengthStrategy"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="org.apache.http.entity.ContentLengthStrategy">
+</implements>
+<constructor name="StrictContentLengthStrategy"
+ type="org.apache.http.impl.entity.StrictContentLengthStrategy"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<method name="determineLength"
+ return="long"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="message" type="org.apache.http.HttpMessage">
+</parameter>
+<exception name="HttpException" type="org.apache.http.HttpException">
+</exception>
+</method>
+</class>
+</package>
+<package name="org.apache.http.impl.io"
+>
+<class name="AbstractMessageParser"
+ extends="java.lang.Object"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="org.apache.http.io.HttpMessageParser">
+</implements>
+<constructor name="AbstractMessageParser"
+ type="org.apache.http.impl.io.AbstractMessageParser"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="buffer" type="org.apache.http.io.SessionInputBuffer">
+</parameter>
+<parameter name="parser" type="org.apache.http.message.LineParser">
+</parameter>
+<parameter name="params" type="org.apache.http.params.HttpParams">
+</parameter>
+</constructor>
+<method name="parse"
+ return="org.apache.http.HttpMessage"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="HttpException" type="org.apache.http.HttpException">
+</exception>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="parseHead"
+ return="org.apache.http.HttpMessage"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="sessionBuffer" type="org.apache.http.io.SessionInputBuffer">
+</parameter>
+<exception name="HttpException" type="org.apache.http.HttpException">
+</exception>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+<exception name="ParseException" type="org.apache.http.ParseException">
+</exception>
+</method>
+<method name="parseHeaders"
+ return="org.apache.http.Header[]"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="inbuffer" type="org.apache.http.io.SessionInputBuffer">
+</parameter>
+<parameter name="maxHeaderCount" type="int">
+</parameter>
+<parameter name="maxLineLen" type="int">
+</parameter>
+<parameter name="parser" type="org.apache.http.message.LineParser">
+</parameter>
+<exception name="HttpException" type="org.apache.http.HttpException">
+</exception>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<field name="lineParser"
+ type="org.apache.http.message.LineParser"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</field>
+</class>
+<class name="AbstractMessageWriter"
+ extends="java.lang.Object"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="org.apache.http.io.HttpMessageWriter">
+</implements>
+<constructor name="AbstractMessageWriter"
+ type="org.apache.http.impl.io.AbstractMessageWriter"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="buffer" type="org.apache.http.io.SessionOutputBuffer">
+</parameter>
+<parameter name="formatter" type="org.apache.http.message.LineFormatter">
+</parameter>
+<parameter name="params" type="org.apache.http.params.HttpParams">
+</parameter>
+</constructor>
+<method name="write"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="message" type="org.apache.http.HttpMessage">
+</parameter>
+<exception name="HttpException" type="org.apache.http.HttpException">
+</exception>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="writeHeadLine"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="message" type="org.apache.http.HttpMessage">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<field name="lineBuf"
+ type="org.apache.http.util.CharArrayBuffer"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</field>
+<field name="lineFormatter"
+ type="org.apache.http.message.LineFormatter"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</field>
+<field name="sessionBuffer"
+ type="org.apache.http.io.SessionOutputBuffer"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</field>
+</class>
+<class name="AbstractSessionInputBuffer"
+ extends="java.lang.Object"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="org.apache.http.io.SessionInputBuffer">
+</implements>
+<constructor name="AbstractSessionInputBuffer"
+ type="org.apache.http.impl.io.AbstractSessionInputBuffer"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<method name="fillBuffer"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="getMetrics"
+ return="org.apache.http.io.HttpTransportMetrics"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="hasBufferedData"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</method>
+<method name="init"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="instream" type="java.io.InputStream">
+</parameter>
+<parameter name="buffersize" type="int">
+</parameter>
+<parameter name="params" type="org.apache.http.params.HttpParams">
+</parameter>
+</method>
+<method name="read"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="read"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="b" type="byte[]">
+</parameter>
+<parameter name="off" type="int">
+</parameter>
+<parameter name="len" type="int">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="read"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="b" type="byte[]">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="readLine"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="charbuffer" type="org.apache.http.util.CharArrayBuffer">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="readLine"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+</class>
+<class name="AbstractSessionOutputBuffer"
+ extends="java.lang.Object"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="org.apache.http.io.SessionOutputBuffer">
+</implements>
+<constructor name="AbstractSessionOutputBuffer"
+ type="org.apache.http.impl.io.AbstractSessionOutputBuffer"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<method name="flush"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="flushBuffer"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="getMetrics"
+ return="org.apache.http.io.HttpTransportMetrics"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="init"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="outstream" type="java.io.OutputStream">
+</parameter>
+<parameter name="buffersize" type="int">
+</parameter>
+<parameter name="params" type="org.apache.http.params.HttpParams">
+</parameter>
+</method>
+<method name="write"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="b" type="byte[]">
+</parameter>
+<parameter name="off" type="int">
+</parameter>
+<parameter name="len" type="int">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="write"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="b" type="byte[]">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="write"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="b" type="int">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="writeLine"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="s" type="java.lang.String">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="writeLine"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="s" type="org.apache.http.util.CharArrayBuffer">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+</class>
+<class name="ChunkedInputStream"
+ extends="java.io.InputStream"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="ChunkedInputStream"
+ type="org.apache.http.impl.io.ChunkedInputStream"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="in" type="org.apache.http.io.SessionInputBuffer">
+</parameter>
+</constructor>
+<method name="getFooters"
+ return="org.apache.http.Header[]"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="read"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+</class>
+<class name="ChunkedOutputStream"
+ extends="java.io.OutputStream"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="ChunkedOutputStream"
+ type="org.apache.http.impl.io.ChunkedOutputStream"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="out" type="org.apache.http.io.SessionOutputBuffer">
+</parameter>
+<parameter name="bufferSize" type="int">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</constructor>
+<constructor name="ChunkedOutputStream"
+ type="org.apache.http.impl.io.ChunkedOutputStream"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="out" type="org.apache.http.io.SessionOutputBuffer">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</constructor>
+<method name="finish"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="flushCache"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="flushCacheWithAppend"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="bufferToAppend" type="byte[]">
+</parameter>
+<parameter name="off" type="int">
+</parameter>
+<parameter name="len" type="int">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="write"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="b" type="int">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="writeClosingChunk"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+</class>
+<class name="ContentLengthInputStream"
+ extends="java.io.InputStream"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="ContentLengthInputStream"
+ type="org.apache.http.impl.io.ContentLengthInputStream"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="in" type="org.apache.http.io.SessionInputBuffer">
+</parameter>
+<parameter name="contentLength" type="long">
+</parameter>
+</constructor>
+<method name="read"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+</class>
+<class name="ContentLengthOutputStream"
+ extends="java.io.OutputStream"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="ContentLengthOutputStream"
+ type="org.apache.http.impl.io.ContentLengthOutputStream"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="out" type="org.apache.http.io.SessionOutputBuffer">
+</parameter>
+<parameter name="contentLength" type="long">
+</parameter>
+</constructor>
+<method name="write"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="b" type="int">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+</class>
+<class name="HttpRequestParser"
+ extends="org.apache.http.impl.io.AbstractMessageParser"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="HttpRequestParser"
+ type="org.apache.http.impl.io.HttpRequestParser"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="buffer" type="org.apache.http.io.SessionInputBuffer">
+</parameter>
+<parameter name="parser" type="org.apache.http.message.LineParser">
+</parameter>
+<parameter name="requestFactory" type="org.apache.http.HttpRequestFactory">
+</parameter>
+<parameter name="params" type="org.apache.http.params.HttpParams">
+</parameter>
+</constructor>
+<method name="parseHead"
+ return="org.apache.http.HttpMessage"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="sessionBuffer" type="org.apache.http.io.SessionInputBuffer">
+</parameter>
+<exception name="HttpException" type="org.apache.http.HttpException">
+</exception>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+<exception name="ParseException" type="org.apache.http.ParseException">
+</exception>
+</method>
+</class>
+<class name="HttpRequestWriter"
+ extends="org.apache.http.impl.io.AbstractMessageWriter"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="HttpRequestWriter"
+ type="org.apache.http.impl.io.HttpRequestWriter"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="buffer" type="org.apache.http.io.SessionOutputBuffer">
+</parameter>
+<parameter name="formatter" type="org.apache.http.message.LineFormatter">
+</parameter>
+<parameter name="params" type="org.apache.http.params.HttpParams">
+</parameter>
+</constructor>
+<method name="writeHeadLine"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="message" type="org.apache.http.HttpMessage">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+</class>
+<class name="HttpResponseParser"
+ extends="org.apache.http.impl.io.AbstractMessageParser"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="HttpResponseParser"
+ type="org.apache.http.impl.io.HttpResponseParser"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="buffer" type="org.apache.http.io.SessionInputBuffer">
+</parameter>
+<parameter name="parser" type="org.apache.http.message.LineParser">
+</parameter>
+<parameter name="responseFactory" type="org.apache.http.HttpResponseFactory">
+</parameter>
+<parameter name="params" type="org.apache.http.params.HttpParams">
+</parameter>
+</constructor>
+<method name="parseHead"
+ return="org.apache.http.HttpMessage"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="sessionBuffer" type="org.apache.http.io.SessionInputBuffer">
+</parameter>
+<exception name="HttpException" type="org.apache.http.HttpException">
+</exception>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+<exception name="ParseException" type="org.apache.http.ParseException">
+</exception>
+</method>
+</class>
+<class name="HttpResponseWriter"
+ extends="org.apache.http.impl.io.AbstractMessageWriter"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="HttpResponseWriter"
+ type="org.apache.http.impl.io.HttpResponseWriter"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="buffer" type="org.apache.http.io.SessionOutputBuffer">
+</parameter>
+<parameter name="formatter" type="org.apache.http.message.LineFormatter">
+</parameter>
+<parameter name="params" type="org.apache.http.params.HttpParams">
+</parameter>
+</constructor>
+<method name="writeHeadLine"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="message" type="org.apache.http.HttpMessage">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+</class>
+<class name="HttpTransportMetricsImpl"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="org.apache.http.io.HttpTransportMetrics">
+</implements>
+<constructor name="HttpTransportMetricsImpl"
+ type="org.apache.http.impl.io.HttpTransportMetricsImpl"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<method name="getBytesTransferred"
+ return="long"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="incrementBytesTransferred"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="count" type="long">
+</parameter>
+</method>
+<method name="reset"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="setBytesTransferred"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="count" type="long">
+</parameter>
+</method>
+</class>
+<class name="IdentityInputStream"
+ extends="java.io.InputStream"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="IdentityInputStream"
+ type="org.apache.http.impl.io.IdentityInputStream"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="in" type="org.apache.http.io.SessionInputBuffer">
+</parameter>
+</constructor>
+<method name="read"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+</class>
+<class name="IdentityOutputStream"
+ extends="java.io.OutputStream"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="IdentityOutputStream"
+ type="org.apache.http.impl.io.IdentityOutputStream"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="out" type="org.apache.http.io.SessionOutputBuffer">
+</parameter>
+</constructor>
+<method name="write"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="b" type="int">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+</class>
+<class name="SocketInputBuffer"
+ extends="org.apache.http.impl.io.AbstractSessionInputBuffer"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="SocketInputBuffer"
+ type="org.apache.http.impl.io.SocketInputBuffer"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="socket" type="java.net.Socket">
+</parameter>
+<parameter name="buffersize" type="int">
+</parameter>
+<parameter name="params" type="org.apache.http.params.HttpParams">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</constructor>
+<method name="isDataAvailable"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="timeout" type="int">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+</class>
+<class name="SocketOutputBuffer"
+ extends="org.apache.http.impl.io.AbstractSessionOutputBuffer"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="SocketOutputBuffer"
+ type="org.apache.http.impl.io.SocketOutputBuffer"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="socket" type="java.net.Socket">
+</parameter>
+<parameter name="buffersize" type="int">
+</parameter>
+<parameter name="params" type="org.apache.http.params.HttpParams">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</constructor>
+</class>
+</package>
+<package name="org.apache.http.io"
+>
+<interface name="HttpMessageParser"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="parse"
+ return="org.apache.http.HttpMessage"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="HttpException" type="org.apache.http.HttpException">
+</exception>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+</interface>
+<interface name="HttpMessageWriter"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="write"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="message" type="org.apache.http.HttpMessage">
+</parameter>
+<exception name="HttpException" type="org.apache.http.HttpException">
+</exception>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+</interface>
+<interface name="HttpTransportMetrics"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="getBytesTransferred"
+ return="long"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="reset"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+</interface>
+<interface name="SessionInputBuffer"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="getMetrics"
+ return="org.apache.http.io.HttpTransportMetrics"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isDataAvailable"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="timeout" type="int">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="read"
+ return="int"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="b" type="byte[]">
+</parameter>
+<parameter name="off" type="int">
+</parameter>
+<parameter name="len" type="int">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="read"
+ return="int"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="b" type="byte[]">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="read"
+ return="int"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="readLine"
+ return="int"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="buffer" type="org.apache.http.util.CharArrayBuffer">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="readLine"
+ return="java.lang.String"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+</interface>
+<interface name="SessionOutputBuffer"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="flush"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="getMetrics"
+ return="org.apache.http.io.HttpTransportMetrics"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="write"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="b" type="byte[]">
+</parameter>
+<parameter name="off" type="int">
+</parameter>
+<parameter name="len" type="int">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="write"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="b" type="byte[]">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="write"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="b" type="int">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="writeLine"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="s" type="java.lang.String">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="writeLine"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="buffer" type="org.apache.http.util.CharArrayBuffer">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+</interface>
+</package>
+<package name="org.apache.http.message"
+>
+<class name="AbstractHttpMessage"
+ extends="java.lang.Object"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="org.apache.http.HttpMessage">
+</implements>
+<constructor name="AbstractHttpMessage"
+ type="org.apache.http.message.AbstractHttpMessage"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="params" type="org.apache.http.params.HttpParams">
+</parameter>
+</constructor>
+<constructor name="AbstractHttpMessage"
+ type="org.apache.http.message.AbstractHttpMessage"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</constructor>
+<method name="addHeader"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="header" type="org.apache.http.Header">
+</parameter>
+</method>
+<method name="addHeader"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+<parameter name="value" type="java.lang.String">
+</parameter>
+</method>
+<method name="containsHeader"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+</method>
+<method name="getAllHeaders"
+ return="org.apache.http.Header[]"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getFirstHeader"
+ return="org.apache.http.Header"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+</method>
+<method name="getHeaders"
+ return="org.apache.http.Header[]"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+</method>
+<method name="getLastHeader"
+ return="org.apache.http.Header"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+</method>
+<method name="getParams"
+ return="org.apache.http.params.HttpParams"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="headerIterator"
+ return="org.apache.http.HeaderIterator"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="headerIterator"
+ return="org.apache.http.HeaderIterator"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+</method>
+<method name="removeHeader"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="header" type="org.apache.http.Header">
+</parameter>
+</method>
+<method name="removeHeaders"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+</method>
+<method name="setHeader"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="header" type="org.apache.http.Header">
+</parameter>
+</method>
+<method name="setHeader"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+<parameter name="value" type="java.lang.String">
+</parameter>
+</method>
+<method name="setHeaders"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="headers" type="org.apache.http.Header[]">
+</parameter>
+</method>
+<method name="setParams"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="params" type="org.apache.http.params.HttpParams">
+</parameter>
+</method>
+<field name="headergroup"
+ type="org.apache.http.message.HeaderGroup"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</field>
+<field name="params"
+ type="org.apache.http.params.HttpParams"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</field>
+</class>
+<class name="BasicHeader"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="java.lang.Cloneable">
+</implements>
+<implements name="org.apache.http.Header">
+</implements>
+<constructor name="BasicHeader"
+ type="org.apache.http.message.BasicHeader"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+<parameter name="value" type="java.lang.String">
+</parameter>
+</constructor>
+<method name="clone"
+ return="java.lang.Object"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="CloneNotSupportedException" type="java.lang.CloneNotSupportedException">
+</exception>
+</method>
+<method name="getElements"
+ return="org.apache.http.HeaderElement[]"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="ParseException" type="org.apache.http.ParseException">
+</exception>
+</method>
+<method name="getName"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getValue"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+</class>
+<class name="BasicHeaderElement"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="java.lang.Cloneable">
+</implements>
+<implements name="org.apache.http.HeaderElement">
+</implements>
+<constructor name="BasicHeaderElement"
+ type="org.apache.http.message.BasicHeaderElement"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+<parameter name="value" type="java.lang.String">
+</parameter>
+<parameter name="parameters" type="org.apache.http.NameValuePair[]">
+</parameter>
+</constructor>
+<constructor name="BasicHeaderElement"
+ type="org.apache.http.message.BasicHeaderElement"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+<parameter name="value" type="java.lang.String">
+</parameter>
+</constructor>
+<method name="clone"
+ return="java.lang.Object"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="CloneNotSupportedException" type="java.lang.CloneNotSupportedException">
+</exception>
+</method>
+<method name="getName"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getParameter"
+ return="org.apache.http.NameValuePair"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="index" type="int">
+</parameter>
+</method>
+<method name="getParameterByName"
+ return="org.apache.http.NameValuePair"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+</method>
+<method name="getParameterCount"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getParameters"
+ return="org.apache.http.NameValuePair[]"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getValue"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+</class>
+<class name="BasicHeaderElementIterator"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="org.apache.http.HeaderElementIterator">
+</implements>
+<constructor name="BasicHeaderElementIterator"
+ type="org.apache.http.message.BasicHeaderElementIterator"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="headerIterator" type="org.apache.http.HeaderIterator">
+</parameter>
+<parameter name="parser" type="org.apache.http.message.HeaderValueParser">
+</parameter>
+</constructor>
+<constructor name="BasicHeaderElementIterator"
+ type="org.apache.http.message.BasicHeaderElementIterator"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="headerIterator" type="org.apache.http.HeaderIterator">
+</parameter>
+</constructor>
+<method name="hasNext"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="next"
+ return="java.lang.Object"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="NoSuchElementException" type="java.util.NoSuchElementException">
+</exception>
+</method>
+<method name="nextElement"
+ return="org.apache.http.HeaderElement"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="NoSuchElementException" type="java.util.NoSuchElementException">
+</exception>
+</method>
+<method name="remove"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="UnsupportedOperationException" type="java.lang.UnsupportedOperationException">
+</exception>
+</method>
+</class>
+<class name="BasicHeaderIterator"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="org.apache.http.HeaderIterator">
+</implements>
+<constructor name="BasicHeaderIterator"
+ type="org.apache.http.message.BasicHeaderIterator"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="headers" type="org.apache.http.Header[]">
+</parameter>
+<parameter name="name" type="java.lang.String">
+</parameter>
+</constructor>
+<method name="filterHeader"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="index" type="int">
+</parameter>
+</method>
+<method name="findNext"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="from" type="int">
+</parameter>
+</method>
+<method name="hasNext"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="next"
+ return="java.lang.Object"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="NoSuchElementException" type="java.util.NoSuchElementException">
+</exception>
+</method>
+<method name="nextHeader"
+ return="org.apache.http.Header"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="NoSuchElementException" type="java.util.NoSuchElementException">
+</exception>
+</method>
+<method name="remove"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="UnsupportedOperationException" type="java.lang.UnsupportedOperationException">
+</exception>
+</method>
+<field name="allHeaders"
+ type="org.apache.http.Header[]"
+ transient="false"
+ volatile="false"
+ value="null"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</field>
+<field name="currentIndex"
+ type="int"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</field>
+<field name="headerName"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</field>
+</class>
+<class name="BasicHeaderValueFormatter"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="org.apache.http.message.HeaderValueFormatter">
+</implements>
+<constructor name="BasicHeaderValueFormatter"
+ type="org.apache.http.message.BasicHeaderValueFormatter"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<method name="doFormatValue"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="buffer" type="org.apache.http.util.CharArrayBuffer">
+</parameter>
+<parameter name="value" type="java.lang.String">
+</parameter>
+<parameter name="quote" type="boolean">
+</parameter>
+</method>
+<method name="estimateElementsLen"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="elems" type="org.apache.http.HeaderElement[]">
+</parameter>
+</method>
+<method name="estimateHeaderElementLen"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="elem" type="org.apache.http.HeaderElement">
+</parameter>
+</method>
+<method name="estimateNameValuePairLen"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="nvp" type="org.apache.http.NameValuePair">
+</parameter>
+</method>
+<method name="estimateParametersLen"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="nvps" type="org.apache.http.NameValuePair[]">
+</parameter>
+</method>
+<method name="formatElements"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="elems" type="org.apache.http.HeaderElement[]">
+</parameter>
+<parameter name="quote" type="boolean">
+</parameter>
+<parameter name="formatter" type="org.apache.http.message.HeaderValueFormatter">
+</parameter>
+</method>
+<method name="formatElements"
+ return="org.apache.http.util.CharArrayBuffer"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="buffer" type="org.apache.http.util.CharArrayBuffer">
+</parameter>
+<parameter name="elems" type="org.apache.http.HeaderElement[]">
+</parameter>
+<parameter name="quote" type="boolean">
+</parameter>
+</method>
+<method name="formatHeaderElement"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="elem" type="org.apache.http.HeaderElement">
+</parameter>
+<parameter name="quote" type="boolean">
+</parameter>
+<parameter name="formatter" type="org.apache.http.message.HeaderValueFormatter">
+</parameter>
+</method>
+<method name="formatHeaderElement"
+ return="org.apache.http.util.CharArrayBuffer"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="buffer" type="org.apache.http.util.CharArrayBuffer">
+</parameter>
+<parameter name="elem" type="org.apache.http.HeaderElement">
+</parameter>
+<parameter name="quote" type="boolean">
+</parameter>
+</method>
+<method name="formatNameValuePair"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="nvp" type="org.apache.http.NameValuePair">
+</parameter>
+<parameter name="quote" type="boolean">
+</parameter>
+<parameter name="formatter" type="org.apache.http.message.HeaderValueFormatter">
+</parameter>
+</method>
+<method name="formatNameValuePair"
+ return="org.apache.http.util.CharArrayBuffer"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="buffer" type="org.apache.http.util.CharArrayBuffer">
+</parameter>
+<parameter name="nvp" type="org.apache.http.NameValuePair">
+</parameter>
+<parameter name="quote" type="boolean">
+</parameter>
+</method>
+<method name="formatParameters"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="nvps" type="org.apache.http.NameValuePair[]">
+</parameter>
+<parameter name="quote" type="boolean">
+</parameter>
+<parameter name="formatter" type="org.apache.http.message.HeaderValueFormatter">
+</parameter>
+</method>
+<method name="formatParameters"
+ return="org.apache.http.util.CharArrayBuffer"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="buffer" type="org.apache.http.util.CharArrayBuffer">
+</parameter>
+<parameter name="nvps" type="org.apache.http.NameValuePair[]">
+</parameter>
+<parameter name="quote" type="boolean">
+</parameter>
+</method>
+<method name="isSeparator"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="ch" type="char">
+</parameter>
+</method>
+<method name="isUnsafe"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="ch" type="char">
+</parameter>
+</method>
+<field name="DEFAULT"
+ type="org.apache.http.message.BasicHeaderValueFormatter"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="SEPARATORS"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot; ;,:@()&lt;&gt;\\\&quot;/[]?={}\t&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="UNSAFE_CHARS"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;\&quot;\\&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<class name="BasicHeaderValueParser"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="org.apache.http.message.HeaderValueParser">
+</implements>
+<constructor name="BasicHeaderValueParser"
+ type="org.apache.http.message.BasicHeaderValueParser"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<method name="createHeaderElement"
+ return="org.apache.http.HeaderElement"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+<parameter name="value" type="java.lang.String">
+</parameter>
+<parameter name="params" type="org.apache.http.NameValuePair[]">
+</parameter>
+</method>
+<method name="createNameValuePair"
+ return="org.apache.http.NameValuePair"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+<parameter name="value" type="java.lang.String">
+</parameter>
+</method>
+<method name="parseElements"
+ return="org.apache.http.HeaderElement[]"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="value" type="java.lang.String">
+</parameter>
+<parameter name="parser" type="org.apache.http.message.HeaderValueParser">
+</parameter>
+<exception name="ParseException" type="org.apache.http.ParseException">
+</exception>
+</method>
+<method name="parseElements"
+ return="org.apache.http.HeaderElement[]"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="buffer" type="org.apache.http.util.CharArrayBuffer">
+</parameter>
+<parameter name="cursor" type="org.apache.http.message.ParserCursor">
+</parameter>
+</method>
+<method name="parseHeaderElement"
+ return="org.apache.http.HeaderElement"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="value" type="java.lang.String">
+</parameter>
+<parameter name="parser" type="org.apache.http.message.HeaderValueParser">
+</parameter>
+<exception name="ParseException" type="org.apache.http.ParseException">
+</exception>
+</method>
+<method name="parseHeaderElement"
+ return="org.apache.http.HeaderElement"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="buffer" type="org.apache.http.util.CharArrayBuffer">
+</parameter>
+<parameter name="cursor" type="org.apache.http.message.ParserCursor">
+</parameter>
+</method>
+<method name="parseNameValuePair"
+ return="org.apache.http.NameValuePair"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="value" type="java.lang.String">
+</parameter>
+<parameter name="parser" type="org.apache.http.message.HeaderValueParser">
+</parameter>
+<exception name="ParseException" type="org.apache.http.ParseException">
+</exception>
+</method>
+<method name="parseNameValuePair"
+ return="org.apache.http.NameValuePair"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="buffer" type="org.apache.http.util.CharArrayBuffer">
+</parameter>
+<parameter name="cursor" type="org.apache.http.message.ParserCursor">
+</parameter>
+</method>
+<method name="parseNameValuePair"
+ return="org.apache.http.NameValuePair"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="buffer" type="org.apache.http.util.CharArrayBuffer">
+</parameter>
+<parameter name="cursor" type="org.apache.http.message.ParserCursor">
+</parameter>
+<parameter name="delimiters" type="char[]">
+</parameter>
+</method>
+<method name="parseParameters"
+ return="org.apache.http.NameValuePair[]"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="value" type="java.lang.String">
+</parameter>
+<parameter name="parser" type="org.apache.http.message.HeaderValueParser">
+</parameter>
+<exception name="ParseException" type="org.apache.http.ParseException">
+</exception>
+</method>
+<method name="parseParameters"
+ return="org.apache.http.NameValuePair[]"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="buffer" type="org.apache.http.util.CharArrayBuffer">
+</parameter>
+<parameter name="cursor" type="org.apache.http.message.ParserCursor">
+</parameter>
+</method>
+<field name="DEFAULT"
+ type="org.apache.http.message.BasicHeaderValueParser"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<class name="BasicHttpEntityEnclosingRequest"
+ extends="org.apache.http.message.BasicHttpRequest"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="org.apache.http.HttpEntityEnclosingRequest">
+</implements>
+<constructor name="BasicHttpEntityEnclosingRequest"
+ type="org.apache.http.message.BasicHttpEntityEnclosingRequest"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="method" type="java.lang.String">
+</parameter>
+<parameter name="uri" type="java.lang.String">
+</parameter>
+</constructor>
+<constructor name="BasicHttpEntityEnclosingRequest"
+ type="org.apache.http.message.BasicHttpEntityEnclosingRequest"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="method" type="java.lang.String">
+</parameter>
+<parameter name="uri" type="java.lang.String">
+</parameter>
+<parameter name="ver" type="org.apache.http.ProtocolVersion">
+</parameter>
+</constructor>
+<constructor name="BasicHttpEntityEnclosingRequest"
+ type="org.apache.http.message.BasicHttpEntityEnclosingRequest"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="requestline" type="org.apache.http.RequestLine">
+</parameter>
+</constructor>
+<method name="expectContinue"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getEntity"
+ return="org.apache.http.HttpEntity"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="setEntity"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="entity" type="org.apache.http.HttpEntity">
+</parameter>
+</method>
+</class>
+<class name="BasicHttpRequest"
+ extends="org.apache.http.message.AbstractHttpMessage"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="org.apache.http.HttpRequest">
+</implements>
+<constructor name="BasicHttpRequest"
+ type="org.apache.http.message.BasicHttpRequest"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="method" type="java.lang.String">
+</parameter>
+<parameter name="uri" type="java.lang.String">
+</parameter>
+</constructor>
+<constructor name="BasicHttpRequest"
+ type="org.apache.http.message.BasicHttpRequest"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="method" type="java.lang.String">
+</parameter>
+<parameter name="uri" type="java.lang.String">
+</parameter>
+<parameter name="ver" type="org.apache.http.ProtocolVersion">
+</parameter>
+</constructor>
+<constructor name="BasicHttpRequest"
+ type="org.apache.http.message.BasicHttpRequest"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="requestline" type="org.apache.http.RequestLine">
+</parameter>
+</constructor>
+<method name="getProtocolVersion"
+ return="org.apache.http.ProtocolVersion"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getRequestLine"
+ return="org.apache.http.RequestLine"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+</class>
+<class name="BasicHttpResponse"
+ extends="org.apache.http.message.AbstractHttpMessage"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="org.apache.http.HttpResponse">
+</implements>
+<constructor name="BasicHttpResponse"
+ type="org.apache.http.message.BasicHttpResponse"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="statusline" type="org.apache.http.StatusLine">
+</parameter>
+<parameter name="catalog" type="org.apache.http.ReasonPhraseCatalog">
+</parameter>
+<parameter name="locale" type="java.util.Locale">
+</parameter>
+</constructor>
+<constructor name="BasicHttpResponse"
+ type="org.apache.http.message.BasicHttpResponse"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="statusline" type="org.apache.http.StatusLine">
+</parameter>
+</constructor>
+<constructor name="BasicHttpResponse"
+ type="org.apache.http.message.BasicHttpResponse"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="ver" type="org.apache.http.ProtocolVersion">
+</parameter>
+<parameter name="code" type="int">
+</parameter>
+<parameter name="reason" type="java.lang.String">
+</parameter>
+</constructor>
+<method name="getEntity"
+ return="org.apache.http.HttpEntity"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getLocale"
+ return="java.util.Locale"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getProtocolVersion"
+ return="org.apache.http.ProtocolVersion"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getReason"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="code" type="int">
+</parameter>
+</method>
+<method name="getStatusLine"
+ return="org.apache.http.StatusLine"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="setEntity"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="entity" type="org.apache.http.HttpEntity">
+</parameter>
+</method>
+<method name="setLocale"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="loc" type="java.util.Locale">
+</parameter>
+</method>
+<method name="setReasonPhrase"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="reason" type="java.lang.String">
+</parameter>
+</method>
+<method name="setStatusCode"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="code" type="int">
+</parameter>
+</method>
+<method name="setStatusLine"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="statusline" type="org.apache.http.StatusLine">
+</parameter>
+</method>
+<method name="setStatusLine"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="ver" type="org.apache.http.ProtocolVersion">
+</parameter>
+<parameter name="code" type="int">
+</parameter>
+</method>
+<method name="setStatusLine"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="ver" type="org.apache.http.ProtocolVersion">
+</parameter>
+<parameter name="code" type="int">
+</parameter>
+<parameter name="reason" type="java.lang.String">
+</parameter>
+</method>
+</class>
+<class name="BasicLineFormatter"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="org.apache.http.message.LineFormatter">
+</implements>
+<constructor name="BasicLineFormatter"
+ type="org.apache.http.message.BasicLineFormatter"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<method name="appendProtocolVersion"
+ return="org.apache.http.util.CharArrayBuffer"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="buffer" type="org.apache.http.util.CharArrayBuffer">
+</parameter>
+<parameter name="version" type="org.apache.http.ProtocolVersion">
+</parameter>
+</method>
+<method name="doFormatHeader"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="buffer" type="org.apache.http.util.CharArrayBuffer">
+</parameter>
+<parameter name="header" type="org.apache.http.Header">
+</parameter>
+</method>
+<method name="doFormatRequestLine"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="buffer" type="org.apache.http.util.CharArrayBuffer">
+</parameter>
+<parameter name="reqline" type="org.apache.http.RequestLine">
+</parameter>
+</method>
+<method name="doFormatStatusLine"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="buffer" type="org.apache.http.util.CharArrayBuffer">
+</parameter>
+<parameter name="statline" type="org.apache.http.StatusLine">
+</parameter>
+</method>
+<method name="estimateProtocolVersionLen"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="version" type="org.apache.http.ProtocolVersion">
+</parameter>
+</method>
+<method name="formatHeader"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="header" type="org.apache.http.Header">
+</parameter>
+<parameter name="formatter" type="org.apache.http.message.LineFormatter">
+</parameter>
+</method>
+<method name="formatHeader"
+ return="org.apache.http.util.CharArrayBuffer"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="buffer" type="org.apache.http.util.CharArrayBuffer">
+</parameter>
+<parameter name="header" type="org.apache.http.Header">
+</parameter>
+</method>
+<method name="formatProtocolVersion"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="version" type="org.apache.http.ProtocolVersion">
+</parameter>
+<parameter name="formatter" type="org.apache.http.message.LineFormatter">
+</parameter>
+</method>
+<method name="formatRequestLine"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="reqline" type="org.apache.http.RequestLine">
+</parameter>
+<parameter name="formatter" type="org.apache.http.message.LineFormatter">
+</parameter>
+</method>
+<method name="formatRequestLine"
+ return="org.apache.http.util.CharArrayBuffer"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="buffer" type="org.apache.http.util.CharArrayBuffer">
+</parameter>
+<parameter name="reqline" type="org.apache.http.RequestLine">
+</parameter>
+</method>
+<method name="formatStatusLine"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="statline" type="org.apache.http.StatusLine">
+</parameter>
+<parameter name="formatter" type="org.apache.http.message.LineFormatter">
+</parameter>
+</method>
+<method name="formatStatusLine"
+ return="org.apache.http.util.CharArrayBuffer"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="buffer" type="org.apache.http.util.CharArrayBuffer">
+</parameter>
+<parameter name="statline" type="org.apache.http.StatusLine">
+</parameter>
+</method>
+<method name="initBuffer"
+ return="org.apache.http.util.CharArrayBuffer"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="buffer" type="org.apache.http.util.CharArrayBuffer">
+</parameter>
+</method>
+<field name="DEFAULT"
+ type="org.apache.http.message.BasicLineFormatter"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<class name="BasicLineParser"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="org.apache.http.message.LineParser">
+</implements>
+<constructor name="BasicLineParser"
+ type="org.apache.http.message.BasicLineParser"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="proto" type="org.apache.http.ProtocolVersion">
+</parameter>
+</constructor>
+<constructor name="BasicLineParser"
+ type="org.apache.http.message.BasicLineParser"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<method name="createProtocolVersion"
+ return="org.apache.http.ProtocolVersion"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="major" type="int">
+</parameter>
+<parameter name="minor" type="int">
+</parameter>
+</method>
+<method name="createRequestLine"
+ return="org.apache.http.RequestLine"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="method" type="java.lang.String">
+</parameter>
+<parameter name="uri" type="java.lang.String">
+</parameter>
+<parameter name="ver" type="org.apache.http.ProtocolVersion">
+</parameter>
+</method>
+<method name="createStatusLine"
+ return="org.apache.http.StatusLine"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="ver" type="org.apache.http.ProtocolVersion">
+</parameter>
+<parameter name="status" type="int">
+</parameter>
+<parameter name="reason" type="java.lang.String">
+</parameter>
+</method>
+<method name="hasProtocolVersion"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="buffer" type="org.apache.http.util.CharArrayBuffer">
+</parameter>
+<parameter name="cursor" type="org.apache.http.message.ParserCursor">
+</parameter>
+</method>
+<method name="parseHeader"
+ return="org.apache.http.Header"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="value" type="java.lang.String">
+</parameter>
+<parameter name="parser" type="org.apache.http.message.LineParser">
+</parameter>
+<exception name="ParseException" type="org.apache.http.ParseException">
+</exception>
+</method>
+<method name="parseHeader"
+ return="org.apache.http.Header"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="buffer" type="org.apache.http.util.CharArrayBuffer">
+</parameter>
+<exception name="ParseException" type="org.apache.http.ParseException">
+</exception>
+</method>
+<method name="parseProtocolVersion"
+ return="org.apache.http.ProtocolVersion"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="value" type="java.lang.String">
+</parameter>
+<parameter name="parser" type="org.apache.http.message.LineParser">
+</parameter>
+<exception name="ParseException" type="org.apache.http.ParseException">
+</exception>
+</method>
+<method name="parseProtocolVersion"
+ return="org.apache.http.ProtocolVersion"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="buffer" type="org.apache.http.util.CharArrayBuffer">
+</parameter>
+<parameter name="cursor" type="org.apache.http.message.ParserCursor">
+</parameter>
+<exception name="ParseException" type="org.apache.http.ParseException">
+</exception>
+</method>
+<method name="parseRequestLine"
+ return="org.apache.http.RequestLine"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="value" type="java.lang.String">
+</parameter>
+<parameter name="parser" type="org.apache.http.message.LineParser">
+</parameter>
+<exception name="ParseException" type="org.apache.http.ParseException">
+</exception>
+</method>
+<method name="parseRequestLine"
+ return="org.apache.http.RequestLine"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="buffer" type="org.apache.http.util.CharArrayBuffer">
+</parameter>
+<parameter name="cursor" type="org.apache.http.message.ParserCursor">
+</parameter>
+<exception name="ParseException" type="org.apache.http.ParseException">
+</exception>
+</method>
+<method name="parseStatusLine"
+ return="org.apache.http.StatusLine"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="value" type="java.lang.String">
+</parameter>
+<parameter name="parser" type="org.apache.http.message.LineParser">
+</parameter>
+<exception name="ParseException" type="org.apache.http.ParseException">
+</exception>
+</method>
+<method name="parseStatusLine"
+ return="org.apache.http.StatusLine"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="buffer" type="org.apache.http.util.CharArrayBuffer">
+</parameter>
+<parameter name="cursor" type="org.apache.http.message.ParserCursor">
+</parameter>
+<exception name="ParseException" type="org.apache.http.ParseException">
+</exception>
+</method>
+<method name="skipWhitespace"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="buffer" type="org.apache.http.util.CharArrayBuffer">
+</parameter>
+<parameter name="cursor" type="org.apache.http.message.ParserCursor">
+</parameter>
+</method>
+<field name="DEFAULT"
+ type="org.apache.http.message.BasicLineParser"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="protocol"
+ type="org.apache.http.ProtocolVersion"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</field>
+</class>
+<class name="BasicListHeaderIterator"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="org.apache.http.HeaderIterator">
+</implements>
+<constructor name="BasicListHeaderIterator"
+ type="org.apache.http.message.BasicListHeaderIterator"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="headers" type="java.util.List">
+</parameter>
+<parameter name="name" type="java.lang.String">
+</parameter>
+</constructor>
+<method name="filterHeader"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="index" type="int">
+</parameter>
+</method>
+<method name="findNext"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="from" type="int">
+</parameter>
+</method>
+<method name="hasNext"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="next"
+ return="java.lang.Object"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="NoSuchElementException" type="java.util.NoSuchElementException">
+</exception>
+</method>
+<method name="nextHeader"
+ return="org.apache.http.Header"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="NoSuchElementException" type="java.util.NoSuchElementException">
+</exception>
+</method>
+<method name="remove"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="UnsupportedOperationException" type="java.lang.UnsupportedOperationException">
+</exception>
+</method>
+<field name="allHeaders"
+ type="java.util.List"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</field>
+<field name="currentIndex"
+ type="int"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</field>
+<field name="headerName"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</field>
+<field name="lastIndex"
+ type="int"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</field>
+</class>
+<class name="BasicNameValuePair"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="java.lang.Cloneable">
+</implements>
+<implements name="org.apache.http.NameValuePair">
+</implements>
+<constructor name="BasicNameValuePair"
+ type="org.apache.http.message.BasicNameValuePair"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+<parameter name="value" type="java.lang.String">
+</parameter>
+</constructor>
+<method name="clone"
+ return="java.lang.Object"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="CloneNotSupportedException" type="java.lang.CloneNotSupportedException">
+</exception>
+</method>
+<method name="getName"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getValue"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+</class>
+<class name="BasicRequestLine"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="java.lang.Cloneable">
+</implements>
+<implements name="org.apache.http.RequestLine">
+</implements>
+<constructor name="BasicRequestLine"
+ type="org.apache.http.message.BasicRequestLine"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="method" type="java.lang.String">
+</parameter>
+<parameter name="uri" type="java.lang.String">
+</parameter>
+<parameter name="version" type="org.apache.http.ProtocolVersion">
+</parameter>
+</constructor>
+<method name="clone"
+ return="java.lang.Object"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="CloneNotSupportedException" type="java.lang.CloneNotSupportedException">
+</exception>
+</method>
+<method name="getMethod"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getProtocolVersion"
+ return="org.apache.http.ProtocolVersion"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getUri"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+</class>
+<class name="BasicStatusLine"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="java.lang.Cloneable">
+</implements>
+<implements name="org.apache.http.StatusLine">
+</implements>
+<constructor name="BasicStatusLine"
+ type="org.apache.http.message.BasicStatusLine"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="version" type="org.apache.http.ProtocolVersion">
+</parameter>
+<parameter name="statusCode" type="int">
+</parameter>
+<parameter name="reasonPhrase" type="java.lang.String">
+</parameter>
+</constructor>
+<method name="clone"
+ return="java.lang.Object"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="CloneNotSupportedException" type="java.lang.CloneNotSupportedException">
+</exception>
+</method>
+<method name="getProtocolVersion"
+ return="org.apache.http.ProtocolVersion"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getReasonPhrase"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getStatusCode"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+</class>
+<class name="BasicTokenIterator"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="org.apache.http.TokenIterator">
+</implements>
+<constructor name="BasicTokenIterator"
+ type="org.apache.http.message.BasicTokenIterator"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="headerIterator" type="org.apache.http.HeaderIterator">
+</parameter>
+</constructor>
+<method name="createToken"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="value" type="java.lang.String">
+</parameter>
+<parameter name="start" type="int">
+</parameter>
+<parameter name="end" type="int">
+</parameter>
+</method>
+<method name="findNext"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="from" type="int">
+</parameter>
+<exception name="ParseException" type="org.apache.http.ParseException">
+</exception>
+</method>
+<method name="findTokenEnd"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="from" type="int">
+</parameter>
+</method>
+<method name="findTokenSeparator"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="from" type="int">
+</parameter>
+</method>
+<method name="findTokenStart"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="from" type="int">
+</parameter>
+</method>
+<method name="hasNext"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isHttpSeparator"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="ch" type="char">
+</parameter>
+</method>
+<method name="isTokenChar"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="ch" type="char">
+</parameter>
+</method>
+<method name="isTokenSeparator"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="ch" type="char">
+</parameter>
+</method>
+<method name="isWhitespace"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="ch" type="char">
+</parameter>
+</method>
+<method name="next"
+ return="java.lang.Object"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="NoSuchElementException" type="java.util.NoSuchElementException">
+</exception>
+<exception name="ParseException" type="org.apache.http.ParseException">
+</exception>
+</method>
+<method name="nextToken"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="NoSuchElementException" type="java.util.NoSuchElementException">
+</exception>
+<exception name="ParseException" type="org.apache.http.ParseException">
+</exception>
+</method>
+<method name="remove"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="UnsupportedOperationException" type="java.lang.UnsupportedOperationException">
+</exception>
+</method>
+<field name="HTTP_SEPARATORS"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot; ,;=()&lt;&gt;@:\\\&quot;/[]?{}\t&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="currentHeader"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</field>
+<field name="currentToken"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</field>
+<field name="headerIt"
+ type="org.apache.http.HeaderIterator"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</field>
+<field name="searchPos"
+ type="int"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</field>
+</class>
+<class name="BufferedHeader"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="java.lang.Cloneable">
+</implements>
+<implements name="org.apache.http.FormattedHeader">
+</implements>
+<constructor name="BufferedHeader"
+ type="org.apache.http.message.BufferedHeader"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="buffer" type="org.apache.http.util.CharArrayBuffer">
+</parameter>
+<exception name="ParseException" type="org.apache.http.ParseException">
+</exception>
+</constructor>
+<method name="clone"
+ return="java.lang.Object"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="CloneNotSupportedException" type="java.lang.CloneNotSupportedException">
+</exception>
+</method>
+<method name="getBuffer"
+ return="org.apache.http.util.CharArrayBuffer"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getElements"
+ return="org.apache.http.HeaderElement[]"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="ParseException" type="org.apache.http.ParseException">
+</exception>
+</method>
+<method name="getName"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getValue"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getValuePos"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+</class>
+<class name="HeaderGroup"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="java.lang.Cloneable">
+</implements>
+<constructor name="HeaderGroup"
+ type="org.apache.http.message.HeaderGroup"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<method name="addHeader"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="header" type="org.apache.http.Header">
+</parameter>
+</method>
+<method name="clear"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="clone"
+ return="java.lang.Object"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="CloneNotSupportedException" type="java.lang.CloneNotSupportedException">
+</exception>
+</method>
+<method name="containsHeader"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+</method>
+<method name="copy"
+ return="org.apache.http.message.HeaderGroup"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getAllHeaders"
+ return="org.apache.http.Header[]"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getCondensedHeader"
+ return="org.apache.http.Header"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+</method>
+<method name="getFirstHeader"
+ return="org.apache.http.Header"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+</method>
+<method name="getHeaders"
+ return="org.apache.http.Header[]"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+</method>
+<method name="getLastHeader"
+ return="org.apache.http.Header"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+</method>
+<method name="iterator"
+ return="org.apache.http.HeaderIterator"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="iterator"
+ return="org.apache.http.HeaderIterator"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+</method>
+<method name="removeHeader"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="header" type="org.apache.http.Header">
+</parameter>
+</method>
+<method name="setHeaders"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="headers" type="org.apache.http.Header[]">
+</parameter>
+</method>
+<method name="updateHeader"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="header" type="org.apache.http.Header">
+</parameter>
+</method>
+</class>
+<interface name="HeaderValueFormatter"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="formatElements"
+ return="org.apache.http.util.CharArrayBuffer"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="buffer" type="org.apache.http.util.CharArrayBuffer">
+</parameter>
+<parameter name="elems" type="org.apache.http.HeaderElement[]">
+</parameter>
+<parameter name="quote" type="boolean">
+</parameter>
+</method>
+<method name="formatHeaderElement"
+ return="org.apache.http.util.CharArrayBuffer"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="buffer" type="org.apache.http.util.CharArrayBuffer">
+</parameter>
+<parameter name="elem" type="org.apache.http.HeaderElement">
+</parameter>
+<parameter name="quote" type="boolean">
+</parameter>
+</method>
+<method name="formatNameValuePair"
+ return="org.apache.http.util.CharArrayBuffer"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="buffer" type="org.apache.http.util.CharArrayBuffer">
+</parameter>
+<parameter name="nvp" type="org.apache.http.NameValuePair">
+</parameter>
+<parameter name="quote" type="boolean">
+</parameter>
+</method>
+<method name="formatParameters"
+ return="org.apache.http.util.CharArrayBuffer"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="buffer" type="org.apache.http.util.CharArrayBuffer">
+</parameter>
+<parameter name="nvps" type="org.apache.http.NameValuePair[]">
+</parameter>
+<parameter name="quote" type="boolean">
+</parameter>
+</method>
+</interface>
+<interface name="HeaderValueParser"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="parseElements"
+ return="org.apache.http.HeaderElement[]"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="buffer" type="org.apache.http.util.CharArrayBuffer">
+</parameter>
+<parameter name="cursor" type="org.apache.http.message.ParserCursor">
+</parameter>
+<exception name="ParseException" type="org.apache.http.ParseException">
+</exception>
+</method>
+<method name="parseHeaderElement"
+ return="org.apache.http.HeaderElement"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="buffer" type="org.apache.http.util.CharArrayBuffer">
+</parameter>
+<parameter name="cursor" type="org.apache.http.message.ParserCursor">
+</parameter>
+<exception name="ParseException" type="org.apache.http.ParseException">
+</exception>
+</method>
+<method name="parseNameValuePair"
+ return="org.apache.http.NameValuePair"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="buffer" type="org.apache.http.util.CharArrayBuffer">
+</parameter>
+<parameter name="cursor" type="org.apache.http.message.ParserCursor">
+</parameter>
+<exception name="ParseException" type="org.apache.http.ParseException">
+</exception>
+</method>
+<method name="parseParameters"
+ return="org.apache.http.NameValuePair[]"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="buffer" type="org.apache.http.util.CharArrayBuffer">
+</parameter>
+<parameter name="cursor" type="org.apache.http.message.ParserCursor">
+</parameter>
+<exception name="ParseException" type="org.apache.http.ParseException">
+</exception>
+</method>
+</interface>
+<interface name="LineFormatter"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="appendProtocolVersion"
+ return="org.apache.http.util.CharArrayBuffer"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="buffer" type="org.apache.http.util.CharArrayBuffer">
+</parameter>
+<parameter name="version" type="org.apache.http.ProtocolVersion">
+</parameter>
+</method>
+<method name="formatHeader"
+ return="org.apache.http.util.CharArrayBuffer"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="buffer" type="org.apache.http.util.CharArrayBuffer">
+</parameter>
+<parameter name="header" type="org.apache.http.Header">
+</parameter>
+</method>
+<method name="formatRequestLine"
+ return="org.apache.http.util.CharArrayBuffer"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="buffer" type="org.apache.http.util.CharArrayBuffer">
+</parameter>
+<parameter name="reqline" type="org.apache.http.RequestLine">
+</parameter>
+</method>
+<method name="formatStatusLine"
+ return="org.apache.http.util.CharArrayBuffer"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="buffer" type="org.apache.http.util.CharArrayBuffer">
+</parameter>
+<parameter name="statline" type="org.apache.http.StatusLine">
+</parameter>
+</method>
+</interface>
+<interface name="LineParser"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="hasProtocolVersion"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="buffer" type="org.apache.http.util.CharArrayBuffer">
+</parameter>
+<parameter name="cursor" type="org.apache.http.message.ParserCursor">
+</parameter>
+</method>
+<method name="parseHeader"
+ return="org.apache.http.Header"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="buffer" type="org.apache.http.util.CharArrayBuffer">
+</parameter>
+<exception name="ParseException" type="org.apache.http.ParseException">
+</exception>
+</method>
+<method name="parseProtocolVersion"
+ return="org.apache.http.ProtocolVersion"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="buffer" type="org.apache.http.util.CharArrayBuffer">
+</parameter>
+<parameter name="cursor" type="org.apache.http.message.ParserCursor">
+</parameter>
+<exception name="ParseException" type="org.apache.http.ParseException">
+</exception>
+</method>
+<method name="parseRequestLine"
+ return="org.apache.http.RequestLine"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="buffer" type="org.apache.http.util.CharArrayBuffer">
+</parameter>
+<parameter name="cursor" type="org.apache.http.message.ParserCursor">
+</parameter>
+<exception name="ParseException" type="org.apache.http.ParseException">
+</exception>
+</method>
+<method name="parseStatusLine"
+ return="org.apache.http.StatusLine"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="buffer" type="org.apache.http.util.CharArrayBuffer">
+</parameter>
+<parameter name="cursor" type="org.apache.http.message.ParserCursor">
+</parameter>
+<exception name="ParseException" type="org.apache.http.ParseException">
+</exception>
+</method>
+</interface>
+<class name="ParserCursor"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="ParserCursor"
+ type="org.apache.http.message.ParserCursor"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="lowerBound" type="int">
+</parameter>
+<parameter name="upperBound" type="int">
+</parameter>
+</constructor>
+<method name="atEnd"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getLowerBound"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getPos"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getUpperBound"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="updatePos"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="pos" type="int">
+</parameter>
+</method>
+</class>
+</package>
+<package name="org.apache.http.params"
+>
+<class name="AbstractHttpParams"
+ extends="java.lang.Object"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="org.apache.http.params.HttpParams">
+</implements>
+<constructor name="AbstractHttpParams"
+ type="org.apache.http.params.AbstractHttpParams"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</constructor>
+<method name="getBooleanParameter"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+<parameter name="defaultValue" type="boolean">
+</parameter>
+</method>
+<method name="getDoubleParameter"
+ return="double"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+<parameter name="defaultValue" type="double">
+</parameter>
+</method>
+<method name="getIntParameter"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+<parameter name="defaultValue" type="int">
+</parameter>
+</method>
+<method name="getLongParameter"
+ return="long"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+<parameter name="defaultValue" type="long">
+</parameter>
+</method>
+<method name="isParameterFalse"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+</method>
+<method name="isParameterTrue"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+</method>
+<method name="setBooleanParameter"
+ return="org.apache.http.params.HttpParams"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+<parameter name="value" type="boolean">
+</parameter>
+</method>
+<method name="setDoubleParameter"
+ return="org.apache.http.params.HttpParams"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+<parameter name="value" type="double">
+</parameter>
+</method>
+<method name="setIntParameter"
+ return="org.apache.http.params.HttpParams"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+<parameter name="value" type="int">
+</parameter>
+</method>
+<method name="setLongParameter"
+ return="org.apache.http.params.HttpParams"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+<parameter name="value" type="long">
+</parameter>
+</method>
+</class>
+<class name="BasicHttpParams"
+ extends="org.apache.http.params.AbstractHttpParams"
+ abstract="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="java.lang.Cloneable">
+</implements>
+<implements name="java.io.Serializable">
+</implements>
+<constructor name="BasicHttpParams"
+ type="org.apache.http.params.BasicHttpParams"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<method name="clear"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="clone"
+ return="java.lang.Object"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="CloneNotSupportedException" type="java.lang.CloneNotSupportedException">
+</exception>
+</method>
+<method name="copy"
+ return="org.apache.http.params.HttpParams"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="copyParams"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="target" type="org.apache.http.params.HttpParams">
+</parameter>
+</method>
+<method name="getParameter"
+ return="java.lang.Object"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+</method>
+<method name="isParameterSet"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+</method>
+<method name="isParameterSetLocally"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+</method>
+<method name="removeParameter"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+</method>
+<method name="setParameter"
+ return="org.apache.http.params.HttpParams"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+<parameter name="value" type="java.lang.Object">
+</parameter>
+</method>
+<method name="setParameters"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="names" type="java.lang.String[]">
+</parameter>
+<parameter name="value" type="java.lang.Object">
+</parameter>
+</method>
+</class>
+<interface name="CoreConnectionPNames"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<field name="CONNECTION_TIMEOUT"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;http.connection.timeout&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="MAX_HEADER_COUNT"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;http.connection.max-header-count&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="MAX_LINE_LENGTH"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;http.connection.max-line-length&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="SOCKET_BUFFER_SIZE"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;http.socket.buffer-size&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="SO_LINGER"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;http.socket.linger&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="SO_TIMEOUT"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;http.socket.timeout&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="STALE_CONNECTION_CHECK"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;http.connection.stalecheck&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TCP_NODELAY"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;http.tcp.nodelay&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</interface>
+<interface name="CoreProtocolPNames"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<field name="HTTP_CONTENT_CHARSET"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;http.protocol.content-charset&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="HTTP_ELEMENT_CHARSET"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;http.protocol.element-charset&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ORIGIN_SERVER"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;http.origin-server&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="PROTOCOL_VERSION"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;http.protocol.version&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="STRICT_TRANSFER_ENCODING"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;http.protocol.strict-transfer-encoding&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="USER_AGENT"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;http.useragent&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="USE_EXPECT_CONTINUE"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;http.protocol.expect-continue&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="WAIT_FOR_CONTINUE"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;http.protocol.wait-for-continue&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</interface>
+<class name="DefaultedHttpParams"
+ extends="org.apache.http.params.AbstractHttpParams"
+ abstract="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="DefaultedHttpParams"
+ type="org.apache.http.params.DefaultedHttpParams"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="local" type="org.apache.http.params.HttpParams">
+</parameter>
+<parameter name="defaults" type="org.apache.http.params.HttpParams">
+</parameter>
+</constructor>
+<method name="copy"
+ return="org.apache.http.params.HttpParams"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getDefaults"
+ return="org.apache.http.params.HttpParams"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getParameter"
+ return="java.lang.Object"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+</method>
+<method name="removeParameter"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+</method>
+<method name="setParameter"
+ return="org.apache.http.params.HttpParams"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+<parameter name="value" type="java.lang.Object">
+</parameter>
+</method>
+</class>
+<class name="HttpAbstractParamBean"
+ extends="java.lang.Object"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="HttpAbstractParamBean"
+ type="org.apache.http.params.HttpAbstractParamBean"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="params" type="org.apache.http.params.HttpParams">
+</parameter>
+</constructor>
+<field name="params"
+ type="org.apache.http.params.HttpParams"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</field>
+</class>
+<class name="HttpConnectionParamBean"
+ extends="org.apache.http.params.HttpAbstractParamBean"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="HttpConnectionParamBean"
+ type="org.apache.http.params.HttpConnectionParamBean"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="params" type="org.apache.http.params.HttpParams">
+</parameter>
+</constructor>
+<method name="setConnectionTimeout"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="connectionTimeout" type="int">
+</parameter>
+</method>
+<method name="setLinger"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="linger" type="int">
+</parameter>
+</method>
+<method name="setSoTimeout"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="soTimeout" type="int">
+</parameter>
+</method>
+<method name="setSocketBufferSize"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="socketBufferSize" type="int">
+</parameter>
+</method>
+<method name="setStaleCheckingEnabled"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="staleCheckingEnabled" type="boolean">
+</parameter>
+</method>
+<method name="setTcpNoDelay"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="tcpNoDelay" type="boolean">
+</parameter>
+</method>
+</class>
+<class name="HttpConnectionParams"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="org.apache.http.params.CoreConnectionPNames">
+</implements>
+<method name="getConnectionTimeout"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="params" type="org.apache.http.params.HttpParams">
+</parameter>
+</method>
+<method name="getLinger"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="params" type="org.apache.http.params.HttpParams">
+</parameter>
+</method>
+<method name="getSoTimeout"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="params" type="org.apache.http.params.HttpParams">
+</parameter>
+</method>
+<method name="getSocketBufferSize"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="params" type="org.apache.http.params.HttpParams">
+</parameter>
+</method>
+<method name="getTcpNoDelay"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="params" type="org.apache.http.params.HttpParams">
+</parameter>
+</method>
+<method name="isStaleCheckingEnabled"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="params" type="org.apache.http.params.HttpParams">
+</parameter>
+</method>
+<method name="setConnectionTimeout"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="params" type="org.apache.http.params.HttpParams">
+</parameter>
+<parameter name="timeout" type="int">
+</parameter>
+</method>
+<method name="setLinger"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="params" type="org.apache.http.params.HttpParams">
+</parameter>
+<parameter name="value" type="int">
+</parameter>
+</method>
+<method name="setSoTimeout"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="params" type="org.apache.http.params.HttpParams">
+</parameter>
+<parameter name="timeout" type="int">
+</parameter>
+</method>
+<method name="setSocketBufferSize"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="params" type="org.apache.http.params.HttpParams">
+</parameter>
+<parameter name="size" type="int">
+</parameter>
+</method>
+<method name="setStaleCheckingEnabled"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="params" type="org.apache.http.params.HttpParams">
+</parameter>
+<parameter name="value" type="boolean">
+</parameter>
+</method>
+<method name="setTcpNoDelay"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="params" type="org.apache.http.params.HttpParams">
+</parameter>
+<parameter name="value" type="boolean">
+</parameter>
+</method>
+</class>
+<interface name="HttpParams"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="copy"
+ return="org.apache.http.params.HttpParams"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getBooleanParameter"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+<parameter name="defaultValue" type="boolean">
+</parameter>
+</method>
+<method name="getDoubleParameter"
+ return="double"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+<parameter name="defaultValue" type="double">
+</parameter>
+</method>
+<method name="getIntParameter"
+ return="int"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+<parameter name="defaultValue" type="int">
+</parameter>
+</method>
+<method name="getLongParameter"
+ return="long"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+<parameter name="defaultValue" type="long">
+</parameter>
+</method>
+<method name="getParameter"
+ return="java.lang.Object"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+</method>
+<method name="isParameterFalse"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+</method>
+<method name="isParameterTrue"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+</method>
+<method name="removeParameter"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+</method>
+<method name="setBooleanParameter"
+ return="org.apache.http.params.HttpParams"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+<parameter name="value" type="boolean">
+</parameter>
+</method>
+<method name="setDoubleParameter"
+ return="org.apache.http.params.HttpParams"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+<parameter name="value" type="double">
+</parameter>
+</method>
+<method name="setIntParameter"
+ return="org.apache.http.params.HttpParams"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+<parameter name="value" type="int">
+</parameter>
+</method>
+<method name="setLongParameter"
+ return="org.apache.http.params.HttpParams"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+<parameter name="value" type="long">
+</parameter>
+</method>
+<method name="setParameter"
+ return="org.apache.http.params.HttpParams"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+<parameter name="value" type="java.lang.Object">
+</parameter>
+</method>
+</interface>
+<class name="HttpProtocolParamBean"
+ extends="org.apache.http.params.HttpAbstractParamBean"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="HttpProtocolParamBean"
+ type="org.apache.http.params.HttpProtocolParamBean"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="params" type="org.apache.http.params.HttpParams">
+</parameter>
+</constructor>
+<method name="setContentCharset"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="contentCharset" type="java.lang.String">
+</parameter>
+</method>
+<method name="setHttpElementCharset"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="httpElementCharset" type="java.lang.String">
+</parameter>
+</method>
+<method name="setUseExpectContinue"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="useExpectContinue" type="boolean">
+</parameter>
+</method>
+<method name="setUserAgent"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="userAgent" type="java.lang.String">
+</parameter>
+</method>
+<method name="setVersion"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="version" type="org.apache.http.HttpVersion">
+</parameter>
+</method>
+</class>
+<class name="HttpProtocolParams"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="org.apache.http.params.CoreProtocolPNames">
+</implements>
+<method name="getContentCharset"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="params" type="org.apache.http.params.HttpParams">
+</parameter>
+</method>
+<method name="getHttpElementCharset"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="params" type="org.apache.http.params.HttpParams">
+</parameter>
+</method>
+<method name="getUserAgent"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="params" type="org.apache.http.params.HttpParams">
+</parameter>
+</method>
+<method name="getVersion"
+ return="org.apache.http.ProtocolVersion"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="params" type="org.apache.http.params.HttpParams">
+</parameter>
+</method>
+<method name="setContentCharset"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="params" type="org.apache.http.params.HttpParams">
+</parameter>
+<parameter name="charset" type="java.lang.String">
+</parameter>
+</method>
+<method name="setHttpElementCharset"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="params" type="org.apache.http.params.HttpParams">
+</parameter>
+<parameter name="charset" type="java.lang.String">
+</parameter>
+</method>
+<method name="setUseExpectContinue"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="params" type="org.apache.http.params.HttpParams">
+</parameter>
+<parameter name="b" type="boolean">
+</parameter>
+</method>
+<method name="setUserAgent"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="params" type="org.apache.http.params.HttpParams">
+</parameter>
+<parameter name="useragent" type="java.lang.String">
+</parameter>
+</method>
+<method name="setVersion"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="params" type="org.apache.http.params.HttpParams">
+</parameter>
+<parameter name="version" type="org.apache.http.ProtocolVersion">
+</parameter>
+</method>
+<method name="useExpectContinue"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="params" type="org.apache.http.params.HttpParams">
+</parameter>
+</method>
+</class>
+</package>
+<package name="org.apache.http.protocol"
+>
+<class name="BasicHttpContext"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="org.apache.http.protocol.HttpContext">
+</implements>
+<constructor name="BasicHttpContext"
+ type="org.apache.http.protocol.BasicHttpContext"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<constructor name="BasicHttpContext"
+ type="org.apache.http.protocol.BasicHttpContext"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="parentContext" type="org.apache.http.protocol.HttpContext">
+</parameter>
+</constructor>
+<method name="getAttribute"
+ return="java.lang.Object"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="id" type="java.lang.String">
+</parameter>
+</method>
+<method name="removeAttribute"
+ return="java.lang.Object"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="id" type="java.lang.String">
+</parameter>
+</method>
+<method name="setAttribute"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="id" type="java.lang.String">
+</parameter>
+<parameter name="obj" type="java.lang.Object">
+</parameter>
+</method>
+</class>
+<class name="BasicHttpProcessor"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="java.lang.Cloneable">
+</implements>
+<implements name="org.apache.http.protocol.HttpProcessor">
+</implements>
+<implements name="org.apache.http.protocol.HttpRequestInterceptorList">
+</implements>
+<implements name="org.apache.http.protocol.HttpResponseInterceptorList">
+</implements>
+<constructor name="BasicHttpProcessor"
+ type="org.apache.http.protocol.BasicHttpProcessor"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<method name="addInterceptor"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="interceptor" type="org.apache.http.HttpRequestInterceptor">
+</parameter>
+</method>
+<method name="addInterceptor"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="interceptor" type="org.apache.http.HttpRequestInterceptor">
+</parameter>
+<parameter name="index" type="int">
+</parameter>
+</method>
+<method name="addInterceptor"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="interceptor" type="org.apache.http.HttpResponseInterceptor">
+</parameter>
+</method>
+<method name="addInterceptor"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="interceptor" type="org.apache.http.HttpResponseInterceptor">
+</parameter>
+<parameter name="index" type="int">
+</parameter>
+</method>
+<method name="addRequestInterceptor"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="itcp" type="org.apache.http.HttpRequestInterceptor">
+</parameter>
+</method>
+<method name="addRequestInterceptor"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="itcp" type="org.apache.http.HttpRequestInterceptor">
+</parameter>
+<parameter name="index" type="int">
+</parameter>
+</method>
+<method name="addResponseInterceptor"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="itcp" type="org.apache.http.HttpResponseInterceptor">
+</parameter>
+<parameter name="index" type="int">
+</parameter>
+</method>
+<method name="addResponseInterceptor"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="itcp" type="org.apache.http.HttpResponseInterceptor">
+</parameter>
+</method>
+<method name="clearInterceptors"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="clearRequestInterceptors"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="clearResponseInterceptors"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="clone"
+ return="java.lang.Object"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="CloneNotSupportedException" type="java.lang.CloneNotSupportedException">
+</exception>
+</method>
+<method name="copy"
+ return="org.apache.http.protocol.BasicHttpProcessor"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="copyInterceptors"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="target" type="org.apache.http.protocol.BasicHttpProcessor">
+</parameter>
+</method>
+<method name="getRequestInterceptor"
+ return="org.apache.http.HttpRequestInterceptor"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="index" type="int">
+</parameter>
+</method>
+<method name="getRequestInterceptorCount"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getResponseInterceptor"
+ return="org.apache.http.HttpResponseInterceptor"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="index" type="int">
+</parameter>
+</method>
+<method name="getResponseInterceptorCount"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="process"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="request" type="org.apache.http.HttpRequest">
+</parameter>
+<parameter name="context" type="org.apache.http.protocol.HttpContext">
+</parameter>
+<exception name="HttpException" type="org.apache.http.HttpException">
+</exception>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="process"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="response" type="org.apache.http.HttpResponse">
+</parameter>
+<parameter name="context" type="org.apache.http.protocol.HttpContext">
+</parameter>
+<exception name="HttpException" type="org.apache.http.HttpException">
+</exception>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="removeRequestInterceptorByClass"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="clazz" type="java.lang.Class">
+</parameter>
+</method>
+<method name="removeResponseInterceptorByClass"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="clazz" type="java.lang.Class">
+</parameter>
+</method>
+<method name="setInterceptors"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="list" type="java.util.List">
+</parameter>
+</method>
+<field name="requestInterceptors"
+ type="java.util.List"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</field>
+<field name="responseInterceptors"
+ type="java.util.List"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</field>
+</class>
+<class name="DefaultedHttpContext"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="org.apache.http.protocol.HttpContext">
+</implements>
+<constructor name="DefaultedHttpContext"
+ type="org.apache.http.protocol.DefaultedHttpContext"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="local" type="org.apache.http.protocol.HttpContext">
+</parameter>
+<parameter name="defaults" type="org.apache.http.protocol.HttpContext">
+</parameter>
+</constructor>
+<method name="getAttribute"
+ return="java.lang.Object"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="id" type="java.lang.String">
+</parameter>
+</method>
+<method name="getDefaults"
+ return="org.apache.http.protocol.HttpContext"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="removeAttribute"
+ return="java.lang.Object"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="id" type="java.lang.String">
+</parameter>
+</method>
+<method name="setAttribute"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="id" type="java.lang.String">
+</parameter>
+<parameter name="obj" type="java.lang.Object">
+</parameter>
+</method>
+</class>
+<interface name="ExecutionContext"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<field name="HTTP_CONNECTION"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;http.connection&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="HTTP_PROXY_HOST"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;http.proxy_host&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="HTTP_REQUEST"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;http.request&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="HTTP_REQ_SENT"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;http.request_sent&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="HTTP_RESPONSE"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;http.response&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="HTTP_TARGET_HOST"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;http.target_host&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</interface>
+<class name="HTTP"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="isWhitespace"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="ch" type="char">
+</parameter>
+</method>
+<field name="ASCII"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;ASCII&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="CHARSET_PARAM"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;; charset=&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="CHUNK_CODING"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;chunked&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="CONN_CLOSE"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;Close&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="CONN_DIRECTIVE"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;Connection&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="CONN_KEEP_ALIVE"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;Keep-Alive&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="CONTENT_ENCODING"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;Content-Encoding&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="CONTENT_LEN"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;Content-Length&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="CONTENT_TYPE"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;Content-Type&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="CR"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="13"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="DATE_HEADER"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;Date&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="DEFAULT_CONTENT_CHARSET"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;ISO-8859-1&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="DEFAULT_CONTENT_TYPE"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;application/octet-stream&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="DEFAULT_PROTOCOL_CHARSET"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;US-ASCII&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="EXPECT_CONTINUE"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;100-Continue&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="EXPECT_DIRECTIVE"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;Expect&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="HT"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="9"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="IDENTITY_CODING"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;identity&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ISO_8859_1"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;ISO-8859-1&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="LF"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="10"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="OCTET_STREAM_TYPE"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;application/octet-stream&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="PLAIN_TEXT_TYPE"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;text/plain&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="SERVER_HEADER"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;Server&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="SP"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="32"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TARGET_HOST"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;Host&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TRANSFER_ENCODING"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;Transfer-Encoding&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="USER_AGENT"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;User-Agent&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="US_ASCII"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;US-ASCII&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="UTF_16"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;UTF-16&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="UTF_8"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;UTF-8&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<interface name="HttpContext"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="getAttribute"
+ return="java.lang.Object"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="id" type="java.lang.String">
+</parameter>
+</method>
+<method name="removeAttribute"
+ return="java.lang.Object"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="id" type="java.lang.String">
+</parameter>
+</method>
+<method name="setAttribute"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="id" type="java.lang.String">
+</parameter>
+<parameter name="obj" type="java.lang.Object">
+</parameter>
+</method>
+<field name="RESERVED_PREFIX"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;http.&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</interface>
+<class name="HttpDateGenerator"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="HttpDateGenerator"
+ type="org.apache.http.protocol.HttpDateGenerator"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<method name="getCurrentDate"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<field name="GMT"
+ type="java.util.TimeZone"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="PATTERN_RFC1123"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;EEE, dd MMM yyyy HH:mm:ss zzz&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<interface name="HttpExpectationVerifier"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="verify"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="request" type="org.apache.http.HttpRequest">
+</parameter>
+<parameter name="response" type="org.apache.http.HttpResponse">
+</parameter>
+<parameter name="context" type="org.apache.http.protocol.HttpContext">
+</parameter>
+<exception name="HttpException" type="org.apache.http.HttpException">
+</exception>
+</method>
+</interface>
+<interface name="HttpProcessor"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="org.apache.http.HttpRequestInterceptor">
+</implements>
+<implements name="org.apache.http.HttpResponseInterceptor">
+</implements>
+</interface>
+<class name="HttpRequestExecutor"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="HttpRequestExecutor"
+ type="org.apache.http.protocol.HttpRequestExecutor"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<method name="canResponseHaveBody"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="request" type="org.apache.http.HttpRequest">
+</parameter>
+<parameter name="response" type="org.apache.http.HttpResponse">
+</parameter>
+</method>
+<method name="doReceiveResponse"
+ return="org.apache.http.HttpResponse"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="request" type="org.apache.http.HttpRequest">
+</parameter>
+<parameter name="conn" type="org.apache.http.HttpClientConnection">
+</parameter>
+<parameter name="context" type="org.apache.http.protocol.HttpContext">
+</parameter>
+<exception name="HttpException" type="org.apache.http.HttpException">
+</exception>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="doSendRequest"
+ return="org.apache.http.HttpResponse"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="request" type="org.apache.http.HttpRequest">
+</parameter>
+<parameter name="conn" type="org.apache.http.HttpClientConnection">
+</parameter>
+<parameter name="context" type="org.apache.http.protocol.HttpContext">
+</parameter>
+<exception name="HttpException" type="org.apache.http.HttpException">
+</exception>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="execute"
+ return="org.apache.http.HttpResponse"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="request" type="org.apache.http.HttpRequest">
+</parameter>
+<parameter name="conn" type="org.apache.http.HttpClientConnection">
+</parameter>
+<parameter name="context" type="org.apache.http.protocol.HttpContext">
+</parameter>
+<exception name="HttpException" type="org.apache.http.HttpException">
+</exception>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="postProcess"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="response" type="org.apache.http.HttpResponse">
+</parameter>
+<parameter name="processor" type="org.apache.http.protocol.HttpProcessor">
+</parameter>
+<parameter name="context" type="org.apache.http.protocol.HttpContext">
+</parameter>
+<exception name="HttpException" type="org.apache.http.HttpException">
+</exception>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="preProcess"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="request" type="org.apache.http.HttpRequest">
+</parameter>
+<parameter name="processor" type="org.apache.http.protocol.HttpProcessor">
+</parameter>
+<parameter name="context" type="org.apache.http.protocol.HttpContext">
+</parameter>
+<exception name="HttpException" type="org.apache.http.HttpException">
+</exception>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+</class>
+<interface name="HttpRequestHandler"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="handle"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="request" type="org.apache.http.HttpRequest">
+</parameter>
+<parameter name="response" type="org.apache.http.HttpResponse">
+</parameter>
+<parameter name="context" type="org.apache.http.protocol.HttpContext">
+</parameter>
+<exception name="HttpException" type="org.apache.http.HttpException">
+</exception>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+</interface>
+<class name="HttpRequestHandlerRegistry"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="org.apache.http.protocol.HttpRequestHandlerResolver">
+</implements>
+<constructor name="HttpRequestHandlerRegistry"
+ type="org.apache.http.protocol.HttpRequestHandlerRegistry"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<method name="lookup"
+ return="org.apache.http.protocol.HttpRequestHandler"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="requestURI" type="java.lang.String">
+</parameter>
+</method>
+<method name="matchUriRequestPattern"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="deprecated"
+ visibility="protected"
+>
+<parameter name="pattern" type="java.lang.String">
+</parameter>
+<parameter name="requestUri" type="java.lang.String">
+</parameter>
+</method>
+<method name="register"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="pattern" type="java.lang.String">
+</parameter>
+<parameter name="handler" type="org.apache.http.protocol.HttpRequestHandler">
+</parameter>
+</method>
+<method name="setHandlers"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="map" type="java.util.Map">
+</parameter>
+</method>
+<method name="unregister"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="pattern" type="java.lang.String">
+</parameter>
+</method>
+</class>
+<interface name="HttpRequestHandlerResolver"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="lookup"
+ return="org.apache.http.protocol.HttpRequestHandler"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="requestURI" type="java.lang.String">
+</parameter>
+</method>
+</interface>
+<interface name="HttpRequestInterceptorList"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="addRequestInterceptor"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="itcp" type="org.apache.http.HttpRequestInterceptor">
+</parameter>
+</method>
+<method name="addRequestInterceptor"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="itcp" type="org.apache.http.HttpRequestInterceptor">
+</parameter>
+<parameter name="index" type="int">
+</parameter>
+</method>
+<method name="clearRequestInterceptors"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getRequestInterceptor"
+ return="org.apache.http.HttpRequestInterceptor"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="index" type="int">
+</parameter>
+</method>
+<method name="getRequestInterceptorCount"
+ return="int"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="removeRequestInterceptorByClass"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="clazz" type="java.lang.Class">
+</parameter>
+</method>
+<method name="setInterceptors"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="itcps" type="java.util.List">
+</parameter>
+</method>
+</interface>
+<interface name="HttpResponseInterceptorList"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="addResponseInterceptor"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="itcp" type="org.apache.http.HttpResponseInterceptor">
+</parameter>
+</method>
+<method name="addResponseInterceptor"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="itcp" type="org.apache.http.HttpResponseInterceptor">
+</parameter>
+<parameter name="index" type="int">
+</parameter>
+</method>
+<method name="clearResponseInterceptors"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getResponseInterceptor"
+ return="org.apache.http.HttpResponseInterceptor"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="index" type="int">
+</parameter>
+</method>
+<method name="getResponseInterceptorCount"
+ return="int"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="removeResponseInterceptorByClass"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="clazz" type="java.lang.Class">
+</parameter>
+</method>
+<method name="setInterceptors"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="itcps" type="java.util.List">
+</parameter>
+</method>
+</interface>
+<class name="HttpService"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="HttpService"
+ type="org.apache.http.protocol.HttpService"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="proc" type="org.apache.http.protocol.HttpProcessor">
+</parameter>
+<parameter name="connStrategy" type="org.apache.http.ConnectionReuseStrategy">
+</parameter>
+<parameter name="responseFactory" type="org.apache.http.HttpResponseFactory">
+</parameter>
+</constructor>
+<method name="doService"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="request" type="org.apache.http.HttpRequest">
+</parameter>
+<parameter name="response" type="org.apache.http.HttpResponse">
+</parameter>
+<parameter name="context" type="org.apache.http.protocol.HttpContext">
+</parameter>
+<exception name="HttpException" type="org.apache.http.HttpException">
+</exception>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="getParams"
+ return="org.apache.http.params.HttpParams"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="handleException"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="ex" type="org.apache.http.HttpException">
+</parameter>
+<parameter name="response" type="org.apache.http.HttpResponse">
+</parameter>
+</method>
+<method name="handleRequest"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="conn" type="org.apache.http.HttpServerConnection">
+</parameter>
+<parameter name="context" type="org.apache.http.protocol.HttpContext">
+</parameter>
+<exception name="HttpException" type="org.apache.http.HttpException">
+</exception>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="setConnReuseStrategy"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="connStrategy" type="org.apache.http.ConnectionReuseStrategy">
+</parameter>
+</method>
+<method name="setExpectationVerifier"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="expectationVerifier" type="org.apache.http.protocol.HttpExpectationVerifier">
+</parameter>
+</method>
+<method name="setHandlerResolver"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="handlerResolver" type="org.apache.http.protocol.HttpRequestHandlerResolver">
+</parameter>
+</method>
+<method name="setHttpProcessor"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="processor" type="org.apache.http.protocol.HttpProcessor">
+</parameter>
+</method>
+<method name="setParams"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="params" type="org.apache.http.params.HttpParams">
+</parameter>
+</method>
+<method name="setResponseFactory"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="responseFactory" type="org.apache.http.HttpResponseFactory">
+</parameter>
+</method>
+</class>
+<class name="RequestConnControl"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="org.apache.http.HttpRequestInterceptor">
+</implements>
+<constructor name="RequestConnControl"
+ type="org.apache.http.protocol.RequestConnControl"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<method name="process"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="request" type="org.apache.http.HttpRequest">
+</parameter>
+<parameter name="context" type="org.apache.http.protocol.HttpContext">
+</parameter>
+<exception name="HttpException" type="org.apache.http.HttpException">
+</exception>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+</class>
+<class name="RequestContent"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="org.apache.http.HttpRequestInterceptor">
+</implements>
+<constructor name="RequestContent"
+ type="org.apache.http.protocol.RequestContent"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<method name="process"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="request" type="org.apache.http.HttpRequest">
+</parameter>
+<parameter name="context" type="org.apache.http.protocol.HttpContext">
+</parameter>
+<exception name="HttpException" type="org.apache.http.HttpException">
+</exception>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+</class>
+<class name="RequestDate"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="org.apache.http.HttpRequestInterceptor">
+</implements>
+<constructor name="RequestDate"
+ type="org.apache.http.protocol.RequestDate"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<method name="process"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="request" type="org.apache.http.HttpRequest">
+</parameter>
+<parameter name="context" type="org.apache.http.protocol.HttpContext">
+</parameter>
+<exception name="HttpException" type="org.apache.http.HttpException">
+</exception>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+</class>
+<class name="RequestExpectContinue"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="org.apache.http.HttpRequestInterceptor">
+</implements>
+<constructor name="RequestExpectContinue"
+ type="org.apache.http.protocol.RequestExpectContinue"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<method name="process"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="request" type="org.apache.http.HttpRequest">
+</parameter>
+<parameter name="context" type="org.apache.http.protocol.HttpContext">
+</parameter>
+<exception name="HttpException" type="org.apache.http.HttpException">
+</exception>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+</class>
+<class name="RequestTargetHost"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="org.apache.http.HttpRequestInterceptor">
+</implements>
+<constructor name="RequestTargetHost"
+ type="org.apache.http.protocol.RequestTargetHost"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<method name="process"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="request" type="org.apache.http.HttpRequest">
+</parameter>
+<parameter name="context" type="org.apache.http.protocol.HttpContext">
+</parameter>
+<exception name="HttpException" type="org.apache.http.HttpException">
+</exception>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+</class>
+<class name="RequestUserAgent"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="org.apache.http.HttpRequestInterceptor">
+</implements>
+<constructor name="RequestUserAgent"
+ type="org.apache.http.protocol.RequestUserAgent"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<method name="process"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="request" type="org.apache.http.HttpRequest">
+</parameter>
+<parameter name="context" type="org.apache.http.protocol.HttpContext">
+</parameter>
+<exception name="HttpException" type="org.apache.http.HttpException">
+</exception>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+</class>
+<class name="ResponseConnControl"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="org.apache.http.HttpResponseInterceptor">
+</implements>
+<constructor name="ResponseConnControl"
+ type="org.apache.http.protocol.ResponseConnControl"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<method name="process"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="response" type="org.apache.http.HttpResponse">
+</parameter>
+<parameter name="context" type="org.apache.http.protocol.HttpContext">
+</parameter>
+<exception name="HttpException" type="org.apache.http.HttpException">
+</exception>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+</class>
+<class name="ResponseContent"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="org.apache.http.HttpResponseInterceptor">
+</implements>
+<constructor name="ResponseContent"
+ type="org.apache.http.protocol.ResponseContent"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<method name="process"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="response" type="org.apache.http.HttpResponse">
+</parameter>
+<parameter name="context" type="org.apache.http.protocol.HttpContext">
+</parameter>
+<exception name="HttpException" type="org.apache.http.HttpException">
+</exception>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+</class>
+<class name="ResponseDate"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="org.apache.http.HttpResponseInterceptor">
+</implements>
+<constructor name="ResponseDate"
+ type="org.apache.http.protocol.ResponseDate"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<method name="process"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="response" type="org.apache.http.HttpResponse">
+</parameter>
+<parameter name="context" type="org.apache.http.protocol.HttpContext">
+</parameter>
+<exception name="HttpException" type="org.apache.http.HttpException">
+</exception>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+</class>
+<class name="ResponseServer"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="org.apache.http.HttpResponseInterceptor">
+</implements>
+<constructor name="ResponseServer"
+ type="org.apache.http.protocol.ResponseServer"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<method name="process"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="response" type="org.apache.http.HttpResponse">
+</parameter>
+<parameter name="context" type="org.apache.http.protocol.HttpContext">
+</parameter>
+<exception name="HttpException" type="org.apache.http.HttpException">
+</exception>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+</class>
+<class name="SyncBasicHttpContext"
+ extends="org.apache.http.protocol.BasicHttpContext"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="SyncBasicHttpContext"
+ type="org.apache.http.protocol.SyncBasicHttpContext"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="parentContext" type="org.apache.http.protocol.HttpContext">
+</parameter>
+</constructor>
+</class>
+<class name="UriPatternMatcher"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="UriPatternMatcher"
+ type="org.apache.http.protocol.UriPatternMatcher"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<method name="lookup"
+ return="java.lang.Object"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="requestURI" type="java.lang.String">
+</parameter>
+</method>
+<method name="matchUriRequestPattern"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="pattern" type="java.lang.String">
+</parameter>
+<parameter name="requestUri" type="java.lang.String">
+</parameter>
+</method>
+<method name="register"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="pattern" type="java.lang.String">
+</parameter>
+<parameter name="handler" type="java.lang.Object">
+</parameter>
+</method>
+<method name="setHandlers"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="map" type="java.util.Map">
+</parameter>
+</method>
+<method name="unregister"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="pattern" type="java.lang.String">
+</parameter>
+</method>
+</class>
+</package>
+<package name="org.apache.http.util"
+>
+<class name="ByteArrayBuffer"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="ByteArrayBuffer"
+ type="org.apache.http.util.ByteArrayBuffer"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="capacity" type="int">
+</parameter>
+</constructor>
+<method name="append"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="b" type="byte[]">
+</parameter>
+<parameter name="off" type="int">
+</parameter>
+<parameter name="len" type="int">
+</parameter>
+</method>
+<method name="append"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="b" type="int">
+</parameter>
+</method>
+<method name="append"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="b" type="char[]">
+</parameter>
+<parameter name="off" type="int">
+</parameter>
+<parameter name="len" type="int">
+</parameter>
+</method>
+<method name="append"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="b" type="org.apache.http.util.CharArrayBuffer">
+</parameter>
+<parameter name="off" type="int">
+</parameter>
+<parameter name="len" type="int">
+</parameter>
+</method>
+<method name="buffer"
+ return="byte[]"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="byteAt"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="i" type="int">
+</parameter>
+</method>
+<method name="capacity"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="clear"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isEmpty"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isFull"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="length"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="setLength"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="len" type="int">
+</parameter>
+</method>
+<method name="toByteArray"
+ return="byte[]"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+</class>
+<class name="CharArrayBuffer"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="CharArrayBuffer"
+ type="org.apache.http.util.CharArrayBuffer"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="capacity" type="int">
+</parameter>
+</constructor>
+<method name="append"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="b" type="char[]">
+</parameter>
+<parameter name="off" type="int">
+</parameter>
+<parameter name="len" type="int">
+</parameter>
+</method>
+<method name="append"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="str" type="java.lang.String">
+</parameter>
+</method>
+<method name="append"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="b" type="org.apache.http.util.CharArrayBuffer">
+</parameter>
+<parameter name="off" type="int">
+</parameter>
+<parameter name="len" type="int">
+</parameter>
+</method>
+<method name="append"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="b" type="org.apache.http.util.CharArrayBuffer">
+</parameter>
+</method>
+<method name="append"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="ch" type="char">
+</parameter>
+</method>
+<method name="append"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="b" type="byte[]">
+</parameter>
+<parameter name="off" type="int">
+</parameter>
+<parameter name="len" type="int">
+</parameter>
+</method>
+<method name="append"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="b" type="org.apache.http.util.ByteArrayBuffer">
+</parameter>
+<parameter name="off" type="int">
+</parameter>
+<parameter name="len" type="int">
+</parameter>
+</method>
+<method name="append"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="obj" type="java.lang.Object">
+</parameter>
+</method>
+<method name="buffer"
+ return="char[]"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="capacity"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="charAt"
+ return="char"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="i" type="int">
+</parameter>
+</method>
+<method name="clear"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="ensureCapacity"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="required" type="int">
+</parameter>
+</method>
+<method name="indexOf"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="ch" type="int">
+</parameter>
+<parameter name="beginIndex" type="int">
+</parameter>
+<parameter name="endIndex" type="int">
+</parameter>
+</method>
+<method name="indexOf"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="ch" type="int">
+</parameter>
+</method>
+<method name="isEmpty"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isFull"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="length"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="setLength"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="len" type="int">
+</parameter>
+</method>
+<method name="substring"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="beginIndex" type="int">
+</parameter>
+<parameter name="endIndex" type="int">
+</parameter>
+</method>
+<method name="substringTrimmed"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="beginIndex" type="int">
+</parameter>
+<parameter name="endIndex" type="int">
+</parameter>
+</method>
+<method name="toCharArray"
+ return="char[]"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+</class>
+<class name="EncodingUtils"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="getAsciiBytes"
+ return="byte[]"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="data" type="java.lang.String">
+</parameter>
+</method>
+<method name="getAsciiString"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="data" type="byte[]">
+</parameter>
+<parameter name="offset" type="int">
+</parameter>
+<parameter name="length" type="int">
+</parameter>
+</method>
+<method name="getAsciiString"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="data" type="byte[]">
+</parameter>
+</method>
+<method name="getBytes"
+ return="byte[]"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="data" type="java.lang.String">
+</parameter>
+<parameter name="charset" type="java.lang.String">
+</parameter>
+</method>
+<method name="getString"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="data" type="byte[]">
+</parameter>
+<parameter name="offset" type="int">
+</parameter>
+<parameter name="length" type="int">
+</parameter>
+<parameter name="charset" type="java.lang.String">
+</parameter>
+</method>
+<method name="getString"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="data" type="byte[]">
+</parameter>
+<parameter name="charset" type="java.lang.String">
+</parameter>
+</method>
+</class>
+<class name="EntityUtils"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="getContentCharSet"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="entity" type="org.apache.http.HttpEntity">
+</parameter>
+<exception name="ParseException" type="org.apache.http.ParseException">
+</exception>
+</method>
+<method name="toByteArray"
+ return="byte[]"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="entity" type="org.apache.http.HttpEntity">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="toString"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="entity" type="org.apache.http.HttpEntity">
+</parameter>
+<parameter name="defaultCharset" type="java.lang.String">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+<exception name="ParseException" type="org.apache.http.ParseException">
+</exception>
+</method>
+<method name="toString"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="entity" type="org.apache.http.HttpEntity">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+<exception name="ParseException" type="org.apache.http.ParseException">
+</exception>
+</method>
+</class>
+<class name="ExceptionUtils"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="initCause"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="throwable" type="java.lang.Throwable">
+</parameter>
+<parameter name="cause" type="java.lang.Throwable">
+</parameter>
+</method>
+</class>
+<class name="LangUtils"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="equals"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="obj1" type="java.lang.Object">
+</parameter>
+<parameter name="obj2" type="java.lang.Object">
+</parameter>
+</method>
+<method name="equals"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="a1" type="java.lang.Object[]">
+</parameter>
+<parameter name="a2" type="java.lang.Object[]">
+</parameter>
+</method>
+<method name="hashCode"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="seed" type="int">
+</parameter>
+<parameter name="hashcode" type="int">
+</parameter>
+</method>
+<method name="hashCode"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="seed" type="int">
+</parameter>
+<parameter name="b" type="boolean">
+</parameter>
+</method>
+<method name="hashCode"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="seed" type="int">
+</parameter>
+<parameter name="obj" type="java.lang.Object">
+</parameter>
+</method>
+<field name="HASH_OFFSET"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="37"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="HASH_SEED"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="17"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<class name="VersionInfo"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="VersionInfo"
+ type="org.apache.http.util.VersionInfo"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="pckg" type="java.lang.String">
+</parameter>
+<parameter name="module" type="java.lang.String">
+</parameter>
+<parameter name="release" type="java.lang.String">
+</parameter>
+<parameter name="time" type="java.lang.String">
+</parameter>
+<parameter name="clsldr" type="java.lang.String">
+</parameter>
+</constructor>
+<method name="fromMap"
+ return="org.apache.http.util.VersionInfo"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="pckg" type="java.lang.String">
+</parameter>
+<parameter name="info" type="java.util.Map">
+</parameter>
+<parameter name="clsldr" type="java.lang.ClassLoader">
+</parameter>
+</method>
+<method name="getClassloader"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getModule"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getPackage"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getRelease"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getTimestamp"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="loadVersionInfo"
+ return="org.apache.http.util.VersionInfo[]"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="pckgs" type="java.lang.String[]">
+</parameter>
+<parameter name="clsldr" type="java.lang.ClassLoader">
+</parameter>
+</method>
+<method name="loadVersionInfo"
+ return="org.apache.http.util.VersionInfo"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="pckg" type="java.lang.String">
+</parameter>
+<parameter name="clsldr" type="java.lang.ClassLoader">
+</parameter>
+</method>
+<field name="PROPERTY_MODULE"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;info.module&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="PROPERTY_RELEASE"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;info.release&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="PROPERTY_TIMESTAMP"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;info.timestamp&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="UNAVAILABLE"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;UNAVAILABLE&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="VERSION_PROPERTY_FILE"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;version.properties&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+</package>
+<package name="org.json"
+>
+<class name="JSONArray"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="JSONArray"
+ type="org.json.JSONArray"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<constructor name="JSONArray"
+ type="org.json.JSONArray"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="copyFrom" type="java.util.Collection">
+</parameter>
+</constructor>
+<constructor name="JSONArray"
+ type="org.json.JSONArray"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="readFrom" type="org.json.JSONTokener">
+</parameter>
+<exception name="JSONException" type="org.json.JSONException">
+</exception>
+</constructor>
+<constructor name="JSONArray"
+ type="org.json.JSONArray"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="json" type="java.lang.String">
+</parameter>
+<exception name="JSONException" type="org.json.JSONException">
+</exception>
+</constructor>
+<method name="get"
+ return="java.lang.Object"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="index" type="int">
+</parameter>
+<exception name="JSONException" type="org.json.JSONException">
+</exception>
+</method>
+<method name="getBoolean"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="index" type="int">
+</parameter>
+<exception name="JSONException" type="org.json.JSONException">
+</exception>
+</method>
+<method name="getDouble"
+ return="double"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="index" type="int">
+</parameter>
+<exception name="JSONException" type="org.json.JSONException">
+</exception>
+</method>
+<method name="getInt"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="index" type="int">
+</parameter>
+<exception name="JSONException" type="org.json.JSONException">
+</exception>
+</method>
+<method name="getJSONArray"
+ return="org.json.JSONArray"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="index" type="int">
+</parameter>
+<exception name="JSONException" type="org.json.JSONException">
+</exception>
+</method>
+<method name="getJSONObject"
+ return="org.json.JSONObject"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="index" type="int">
+</parameter>
+<exception name="JSONException" type="org.json.JSONException">
+</exception>
+</method>
+<method name="getLong"
+ return="long"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="index" type="int">
+</parameter>
+<exception name="JSONException" type="org.json.JSONException">
+</exception>
+</method>
+<method name="getString"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="index" type="int">
+</parameter>
+<exception name="JSONException" type="org.json.JSONException">
+</exception>
+</method>
+<method name="isNull"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="index" type="int">
+</parameter>
+</method>
+<method name="join"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="separator" type="java.lang.String">
+</parameter>
+<exception name="JSONException" type="org.json.JSONException">
+</exception>
+</method>
+<method name="length"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="opt"
+ return="java.lang.Object"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="index" type="int">
+</parameter>
+</method>
+<method name="optBoolean"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="index" type="int">
+</parameter>
+</method>
+<method name="optBoolean"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="index" type="int">
+</parameter>
+<parameter name="fallback" type="boolean">
+</parameter>
+</method>
+<method name="optDouble"
+ return="double"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="index" type="int">
+</parameter>
+</method>
+<method name="optDouble"
+ return="double"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="index" type="int">
+</parameter>
+<parameter name="fallback" type="double">
+</parameter>
+</method>
+<method name="optInt"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="index" type="int">
+</parameter>
+</method>
+<method name="optInt"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="index" type="int">
+</parameter>
+<parameter name="fallback" type="int">
+</parameter>
+</method>
+<method name="optJSONArray"
+ return="org.json.JSONArray"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="index" type="int">
+</parameter>
+</method>
+<method name="optJSONObject"
+ return="org.json.JSONObject"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="index" type="int">
+</parameter>
+</method>
+<method name="optLong"
+ return="long"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="index" type="int">
+</parameter>
+</method>
+<method name="optLong"
+ return="long"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="index" type="int">
+</parameter>
+<parameter name="fallback" type="long">
+</parameter>
+</method>
+<method name="optString"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="index" type="int">
+</parameter>
+</method>
+<method name="optString"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="index" type="int">
+</parameter>
+<parameter name="fallback" type="java.lang.String">
+</parameter>
+</method>
+<method name="put"
+ return="org.json.JSONArray"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="value" type="boolean">
+</parameter>
+</method>
+<method name="put"
+ return="org.json.JSONArray"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="value" type="double">
+</parameter>
+<exception name="JSONException" type="org.json.JSONException">
+</exception>
+</method>
+<method name="put"
+ return="org.json.JSONArray"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="value" type="int">
+</parameter>
+</method>
+<method name="put"
+ return="org.json.JSONArray"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="value" type="long">
+</parameter>
+</method>
+<method name="put"
+ return="org.json.JSONArray"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="value" type="java.lang.Object">
+</parameter>
+</method>
+<method name="put"
+ return="org.json.JSONArray"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="index" type="int">
+</parameter>
+<parameter name="value" type="boolean">
+</parameter>
+<exception name="JSONException" type="org.json.JSONException">
+</exception>
+</method>
+<method name="put"
+ return="org.json.JSONArray"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="index" type="int">
+</parameter>
+<parameter name="value" type="double">
+</parameter>
+<exception name="JSONException" type="org.json.JSONException">
+</exception>
+</method>
+<method name="put"
+ return="org.json.JSONArray"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="index" type="int">
+</parameter>
+<parameter name="value" type="int">
+</parameter>
+<exception name="JSONException" type="org.json.JSONException">
+</exception>
+</method>
+<method name="put"
+ return="org.json.JSONArray"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="index" type="int">
+</parameter>
+<parameter name="value" type="long">
+</parameter>
+<exception name="JSONException" type="org.json.JSONException">
+</exception>
+</method>
+<method name="put"
+ return="org.json.JSONArray"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="index" type="int">
+</parameter>
+<parameter name="value" type="java.lang.Object">
+</parameter>
+<exception name="JSONException" type="org.json.JSONException">
+</exception>
+</method>
+<method name="toJSONObject"
+ return="org.json.JSONObject"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="names" type="org.json.JSONArray">
+</parameter>
+<exception name="JSONException" type="org.json.JSONException">
+</exception>
+</method>
+<method name="toString"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="indentSpaces" type="int">
+</parameter>
+<exception name="JSONException" type="org.json.JSONException">
+</exception>
+</method>
+</class>
+<class name="JSONException"
+ extends="java.lang.Exception"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="JSONException"
+ type="org.json.JSONException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="s" type="java.lang.String">
+</parameter>
+</constructor>
+</class>
+<class name="JSONObject"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="JSONObject"
+ type="org.json.JSONObject"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<constructor name="JSONObject"
+ type="org.json.JSONObject"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="copyFrom" type="java.util.Map">
+</parameter>
+</constructor>
+<constructor name="JSONObject"
+ type="org.json.JSONObject"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="readFrom" type="org.json.JSONTokener">
+</parameter>
+<exception name="JSONException" type="org.json.JSONException">
+</exception>
+</constructor>
+<constructor name="JSONObject"
+ type="org.json.JSONObject"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="json" type="java.lang.String">
+</parameter>
+<exception name="JSONException" type="org.json.JSONException">
+</exception>
+</constructor>
+<constructor name="JSONObject"
+ type="org.json.JSONObject"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="copyFrom" type="org.json.JSONObject">
+</parameter>
+<parameter name="names" type="java.lang.String[]">
+</parameter>
+<exception name="JSONException" type="org.json.JSONException">
+</exception>
+</constructor>
+<method name="accumulate"
+ return="org.json.JSONObject"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+<parameter name="value" type="java.lang.Object">
+</parameter>
+<exception name="JSONException" type="org.json.JSONException">
+</exception>
+</method>
+<method name="get"
+ return="java.lang.Object"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+<exception name="JSONException" type="org.json.JSONException">
+</exception>
+</method>
+<method name="getBoolean"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+<exception name="JSONException" type="org.json.JSONException">
+</exception>
+</method>
+<method name="getDouble"
+ return="double"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+<exception name="JSONException" type="org.json.JSONException">
+</exception>
+</method>
+<method name="getInt"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+<exception name="JSONException" type="org.json.JSONException">
+</exception>
+</method>
+<method name="getJSONArray"
+ return="org.json.JSONArray"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+<exception name="JSONException" type="org.json.JSONException">
+</exception>
+</method>
+<method name="getJSONObject"
+ return="org.json.JSONObject"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+<exception name="JSONException" type="org.json.JSONException">
+</exception>
+</method>
+<method name="getLong"
+ return="long"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+<exception name="JSONException" type="org.json.JSONException">
+</exception>
+</method>
+<method name="getString"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+<exception name="JSONException" type="org.json.JSONException">
+</exception>
+</method>
+<method name="has"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+</method>
+<method name="isNull"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+</method>
+<method name="keys"
+ return="java.util.Iterator"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="length"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="names"
+ return="org.json.JSONArray"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="numberToString"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="number" type="java.lang.Number">
+</parameter>
+<exception name="JSONException" type="org.json.JSONException">
+</exception>
+</method>
+<method name="opt"
+ return="java.lang.Object"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+</method>
+<method name="optBoolean"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+</method>
+<method name="optBoolean"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+<parameter name="fallback" type="boolean">
+</parameter>
+</method>
+<method name="optDouble"
+ return="double"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+</method>
+<method name="optDouble"
+ return="double"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+<parameter name="fallback" type="double">
+</parameter>
+</method>
+<method name="optInt"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+</method>
+<method name="optInt"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+<parameter name="fallback" type="int">
+</parameter>
+</method>
+<method name="optJSONArray"
+ return="org.json.JSONArray"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+</method>
+<method name="optJSONObject"
+ return="org.json.JSONObject"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+</method>
+<method name="optLong"
+ return="long"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+</method>
+<method name="optLong"
+ return="long"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+<parameter name="fallback" type="long">
+</parameter>
+</method>
+<method name="optString"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+</method>
+<method name="optString"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+<parameter name="fallback" type="java.lang.String">
+</parameter>
+</method>
+<method name="put"
+ return="org.json.JSONObject"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+<parameter name="value" type="boolean">
+</parameter>
+<exception name="JSONException" type="org.json.JSONException">
+</exception>
+</method>
+<method name="put"
+ return="org.json.JSONObject"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+<parameter name="value" type="double">
+</parameter>
+<exception name="JSONException" type="org.json.JSONException">
+</exception>
+</method>
+<method name="put"
+ return="org.json.JSONObject"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+<parameter name="value" type="int">
+</parameter>
+<exception name="JSONException" type="org.json.JSONException">
+</exception>
+</method>
+<method name="put"
+ return="org.json.JSONObject"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+<parameter name="value" type="long">
+</parameter>
+<exception name="JSONException" type="org.json.JSONException">
+</exception>
+</method>
+<method name="put"
+ return="org.json.JSONObject"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+<parameter name="value" type="java.lang.Object">
+</parameter>
+<exception name="JSONException" type="org.json.JSONException">
+</exception>
+</method>
+<method name="putOpt"
+ return="org.json.JSONObject"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+<parameter name="value" type="java.lang.Object">
+</parameter>
+<exception name="JSONException" type="org.json.JSONException">
+</exception>
+</method>
+<method name="quote"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="data" type="java.lang.String">
+</parameter>
+</method>
+<method name="remove"
+ return="java.lang.Object"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+</method>
+<method name="toJSONArray"
+ return="org.json.JSONArray"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="names" type="org.json.JSONArray">
+</parameter>
+<exception name="JSONException" type="org.json.JSONException">
+</exception>
+</method>
+<method name="toString"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="indentSpaces" type="int">
+</parameter>
+<exception name="JSONException" type="org.json.JSONException">
+</exception>
+</method>
+<field name="NULL"
+ type="java.lang.Object"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<class name="JSONStringer"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="JSONStringer"
+ type="org.json.JSONStringer"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<method name="array"
+ return="org.json.JSONStringer"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="JSONException" type="org.json.JSONException">
+</exception>
+</method>
+<method name="endArray"
+ return="org.json.JSONStringer"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="JSONException" type="org.json.JSONException">
+</exception>
+</method>
+<method name="endObject"
+ return="org.json.JSONStringer"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="JSONException" type="org.json.JSONException">
+</exception>
+</method>
+<method name="key"
+ return="org.json.JSONStringer"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+<exception name="JSONException" type="org.json.JSONException">
+</exception>
+</method>
+<method name="object"
+ return="org.json.JSONStringer"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="JSONException" type="org.json.JSONException">
+</exception>
+</method>
+<method name="value"
+ return="org.json.JSONStringer"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="value" type="java.lang.Object">
+</parameter>
+<exception name="JSONException" type="org.json.JSONException">
+</exception>
+</method>
+<method name="value"
+ return="org.json.JSONStringer"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="value" type="boolean">
+</parameter>
+<exception name="JSONException" type="org.json.JSONException">
+</exception>
+</method>
+<method name="value"
+ return="org.json.JSONStringer"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="value" type="double">
+</parameter>
+<exception name="JSONException" type="org.json.JSONException">
+</exception>
+</method>
+<method name="value"
+ return="org.json.JSONStringer"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="value" type="long">
+</parameter>
+<exception name="JSONException" type="org.json.JSONException">
+</exception>
+</method>
+</class>
+<class name="JSONTokener"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="JSONTokener"
+ type="org.json.JSONTokener"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="in" type="java.lang.String">
+</parameter>
+</constructor>
+<method name="back"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="dehexchar"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="hex" type="char">
+</parameter>
+</method>
+<method name="more"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="next"
+ return="char"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="next"
+ return="char"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="c" type="char">
+</parameter>
+<exception name="JSONException" type="org.json.JSONException">
+</exception>
+</method>
+<method name="next"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="length" type="int">
+</parameter>
+<exception name="JSONException" type="org.json.JSONException">
+</exception>
+</method>
+<method name="nextClean"
+ return="char"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="JSONException" type="org.json.JSONException">
+</exception>
+</method>
+<method name="nextString"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="quote" type="char">
+</parameter>
+<exception name="JSONException" type="org.json.JSONException">
+</exception>
+</method>
+<method name="nextTo"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="excluded" type="java.lang.String">
+</parameter>
+</method>
+<method name="nextTo"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="excluded" type="char">
+</parameter>
+</method>
+<method name="nextValue"
+ return="java.lang.Object"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="JSONException" type="org.json.JSONException">
+</exception>
+</method>
+<method name="skipPast"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="thru" type="java.lang.String">
+</parameter>
+</method>
+<method name="skipTo"
+ return="char"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="to" type="char">
+</parameter>
+</method>
+<method name="syntaxError"
+ return="org.json.JSONException"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="message" type="java.lang.String">
+</parameter>
+</method>
+</class>
+</package>
+<package name="org.w3c.dom"
+>
+<interface name="Attr"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="org.w3c.dom.Node">
+</implements>
+<method name="getName"
+ return="java.lang.String"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getOwnerElement"
+ return="org.w3c.dom.Element"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getSchemaTypeInfo"
+ return="org.w3c.dom.TypeInfo"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getSpecified"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getValue"
+ return="java.lang.String"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isId"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="setValue"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="value" type="java.lang.String">
+</parameter>
+<exception name="DOMException" type="org.w3c.dom.DOMException">
+</exception>
+</method>
+</interface>
+<interface name="CDATASection"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="org.w3c.dom.Text">
+</implements>
+</interface>
+<interface name="CharacterData"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="org.w3c.dom.Node">
+</implements>
+<method name="appendData"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="arg" type="java.lang.String">
+</parameter>
+<exception name="DOMException" type="org.w3c.dom.DOMException">
+</exception>
+</method>
+<method name="deleteData"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="offset" type="int">
+</parameter>
+<parameter name="count" type="int">
+</parameter>
+<exception name="DOMException" type="org.w3c.dom.DOMException">
+</exception>
+</method>
+<method name="getData"
+ return="java.lang.String"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="DOMException" type="org.w3c.dom.DOMException">
+</exception>
+</method>
+<method name="getLength"
+ return="int"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="insertData"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="offset" type="int">
+</parameter>
+<parameter name="arg" type="java.lang.String">
+</parameter>
+<exception name="DOMException" type="org.w3c.dom.DOMException">
+</exception>
+</method>
+<method name="replaceData"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="offset" type="int">
+</parameter>
+<parameter name="count" type="int">
+</parameter>
+<parameter name="arg" type="java.lang.String">
+</parameter>
+<exception name="DOMException" type="org.w3c.dom.DOMException">
+</exception>
+</method>
+<method name="setData"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="data" type="java.lang.String">
+</parameter>
+<exception name="DOMException" type="org.w3c.dom.DOMException">
+</exception>
+</method>
+<method name="substringData"
+ return="java.lang.String"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="offset" type="int">
+</parameter>
+<parameter name="count" type="int">
+</parameter>
+<exception name="DOMException" type="org.w3c.dom.DOMException">
+</exception>
+</method>
+</interface>
+<interface name="Comment"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="org.w3c.dom.CharacterData">
+</implements>
+</interface>
+<interface name="DOMConfiguration"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="canSetParameter"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+<parameter name="value" type="java.lang.Object">
+</parameter>
+</method>
+<method name="getParameter"
+ return="java.lang.Object"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+<exception name="DOMException" type="org.w3c.dom.DOMException">
+</exception>
+</method>
+<method name="getParameterNames"
+ return="org.w3c.dom.DOMStringList"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="setParameter"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+<parameter name="value" type="java.lang.Object">
+</parameter>
+<exception name="DOMException" type="org.w3c.dom.DOMException">
+</exception>
+</method>
+</interface>
+<interface name="DOMError"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="getLocation"
+ return="org.w3c.dom.DOMLocator"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getMessage"
+ return="java.lang.String"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getRelatedData"
+ return="java.lang.Object"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getRelatedException"
+ return="java.lang.Object"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getSeverity"
+ return="short"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getType"
+ return="java.lang.String"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<field name="SEVERITY_ERROR"
+ type="short"
+ transient="false"
+ volatile="false"
+ value="2"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="SEVERITY_FATAL_ERROR"
+ type="short"
+ transient="false"
+ volatile="false"
+ value="3"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="SEVERITY_WARNING"
+ type="short"
+ transient="false"
+ volatile="false"
+ value="1"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</interface>
+<interface name="DOMErrorHandler"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="handleError"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="error" type="org.w3c.dom.DOMError">
+</parameter>
+</method>
+</interface>
+<class name="DOMException"
+ extends="java.lang.RuntimeException"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="DOMException"
+ type="org.w3c.dom.DOMException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="code" type="short">
+</parameter>
+<parameter name="message" type="java.lang.String">
+</parameter>
+</constructor>
+<field name="DOMSTRING_SIZE_ERR"
+ type="short"
+ transient="false"
+ volatile="false"
+ value="2"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="HIERARCHY_REQUEST_ERR"
+ type="short"
+ transient="false"
+ volatile="false"
+ value="3"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="INDEX_SIZE_ERR"
+ type="short"
+ transient="false"
+ volatile="false"
+ value="1"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="INUSE_ATTRIBUTE_ERR"
+ type="short"
+ transient="false"
+ volatile="false"
+ value="10"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="INVALID_ACCESS_ERR"
+ type="short"
+ transient="false"
+ volatile="false"
+ value="15"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="INVALID_CHARACTER_ERR"
+ type="short"
+ transient="false"
+ volatile="false"
+ value="5"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="INVALID_MODIFICATION_ERR"
+ type="short"
+ transient="false"
+ volatile="false"
+ value="13"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="INVALID_STATE_ERR"
+ type="short"
+ transient="false"
+ volatile="false"
+ value="11"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="NAMESPACE_ERR"
+ type="short"
+ transient="false"
+ volatile="false"
+ value="14"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="NOT_FOUND_ERR"
+ type="short"
+ transient="false"
+ volatile="false"
+ value="8"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="NOT_SUPPORTED_ERR"
+ type="short"
+ transient="false"
+ volatile="false"
+ value="9"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="NO_DATA_ALLOWED_ERR"
+ type="short"
+ transient="false"
+ volatile="false"
+ value="6"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="NO_MODIFICATION_ALLOWED_ERR"
+ type="short"
+ transient="false"
+ volatile="false"
+ value="7"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="SYNTAX_ERR"
+ type="short"
+ transient="false"
+ volatile="false"
+ value="12"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TYPE_MISMATCH_ERR"
+ type="short"
+ transient="false"
+ volatile="false"
+ value="17"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="VALIDATION_ERR"
+ type="short"
+ transient="false"
+ volatile="false"
+ value="16"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="WRONG_DOCUMENT_ERR"
+ type="short"
+ transient="false"
+ volatile="false"
+ value="4"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="code"
+ type="short"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<interface name="DOMImplementation"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="createDocument"
+ return="org.w3c.dom.Document"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="namespaceURI" type="java.lang.String">
+</parameter>
+<parameter name="qualifiedName" type="java.lang.String">
+</parameter>
+<parameter name="doctype" type="org.w3c.dom.DocumentType">
+</parameter>
+<exception name="DOMException" type="org.w3c.dom.DOMException">
+</exception>
+</method>
+<method name="createDocumentType"
+ return="org.w3c.dom.DocumentType"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="qualifiedName" type="java.lang.String">
+</parameter>
+<parameter name="publicId" type="java.lang.String">
+</parameter>
+<parameter name="systemId" type="java.lang.String">
+</parameter>
+<exception name="DOMException" type="org.w3c.dom.DOMException">
+</exception>
+</method>
+<method name="getFeature"
+ return="java.lang.Object"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="feature" type="java.lang.String">
+</parameter>
+<parameter name="version" type="java.lang.String">
+</parameter>
+</method>
+<method name="hasFeature"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="feature" type="java.lang.String">
+</parameter>
+<parameter name="version" type="java.lang.String">
+</parameter>
+</method>
+</interface>
+<interface name="DOMImplementationList"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="getLength"
+ return="int"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="item"
+ return="org.w3c.dom.DOMImplementation"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="index" type="int">
+</parameter>
+</method>
+</interface>
+<interface name="DOMImplementationSource"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="getDOMImplementation"
+ return="org.w3c.dom.DOMImplementation"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="features" type="java.lang.String">
+</parameter>
+</method>
+<method name="getDOMImplementationList"
+ return="org.w3c.dom.DOMImplementationList"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="features" type="java.lang.String">
+</parameter>
+</method>
+</interface>
+<interface name="DOMLocator"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="getByteOffset"
+ return="int"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getColumnNumber"
+ return="int"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getLineNumber"
+ return="int"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getRelatedNode"
+ return="org.w3c.dom.Node"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getUri"
+ return="java.lang.String"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getUtf16Offset"
+ return="int"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+</interface>
+<interface name="DOMStringList"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="contains"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="str" type="java.lang.String">
+</parameter>
+</method>
+<method name="getLength"
+ return="int"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="item"
+ return="java.lang.String"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="index" type="int">
+</parameter>
+</method>
+</interface>
+<interface name="Document"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="org.w3c.dom.Node">
+</implements>
+<method name="adoptNode"
+ return="org.w3c.dom.Node"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="source" type="org.w3c.dom.Node">
+</parameter>
+<exception name="DOMException" type="org.w3c.dom.DOMException">
+</exception>
+</method>
+<method name="createAttribute"
+ return="org.w3c.dom.Attr"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+<exception name="DOMException" type="org.w3c.dom.DOMException">
+</exception>
+</method>
+<method name="createAttributeNS"
+ return="org.w3c.dom.Attr"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="namespaceURI" type="java.lang.String">
+</parameter>
+<parameter name="qualifiedName" type="java.lang.String">
+</parameter>
+<exception name="DOMException" type="org.w3c.dom.DOMException">
+</exception>
+</method>
+<method name="createCDATASection"
+ return="org.w3c.dom.CDATASection"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="data" type="java.lang.String">
+</parameter>
+<exception name="DOMException" type="org.w3c.dom.DOMException">
+</exception>
+</method>
+<method name="createComment"
+ return="org.w3c.dom.Comment"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="data" type="java.lang.String">
+</parameter>
+</method>
+<method name="createDocumentFragment"
+ return="org.w3c.dom.DocumentFragment"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="createElement"
+ return="org.w3c.dom.Element"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="tagName" type="java.lang.String">
+</parameter>
+<exception name="DOMException" type="org.w3c.dom.DOMException">
+</exception>
+</method>
+<method name="createElementNS"
+ return="org.w3c.dom.Element"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="namespaceURI" type="java.lang.String">
+</parameter>
+<parameter name="qualifiedName" type="java.lang.String">
+</parameter>
+<exception name="DOMException" type="org.w3c.dom.DOMException">
+</exception>
+</method>
+<method name="createEntityReference"
+ return="org.w3c.dom.EntityReference"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+<exception name="DOMException" type="org.w3c.dom.DOMException">
+</exception>
+</method>
+<method name="createProcessingInstruction"
+ return="org.w3c.dom.ProcessingInstruction"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="target" type="java.lang.String">
+</parameter>
+<parameter name="data" type="java.lang.String">
+</parameter>
+<exception name="DOMException" type="org.w3c.dom.DOMException">
+</exception>
+</method>
+<method name="createTextNode"
+ return="org.w3c.dom.Text"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="data" type="java.lang.String">
+</parameter>
+</method>
+<method name="getDoctype"
+ return="org.w3c.dom.DocumentType"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getDocumentElement"
+ return="org.w3c.dom.Element"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getDocumentURI"
+ return="java.lang.String"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getDomConfig"
+ return="org.w3c.dom.DOMConfiguration"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getElementById"
+ return="org.w3c.dom.Element"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="elementId" type="java.lang.String">
+</parameter>
+</method>
+<method name="getElementsByTagName"
+ return="org.w3c.dom.NodeList"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="tagname" type="java.lang.String">
+</parameter>
+</method>
+<method name="getElementsByTagNameNS"
+ return="org.w3c.dom.NodeList"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="namespaceURI" type="java.lang.String">
+</parameter>
+<parameter name="localName" type="java.lang.String">
+</parameter>
+</method>
+<method name="getImplementation"
+ return="org.w3c.dom.DOMImplementation"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getInputEncoding"
+ return="java.lang.String"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getStrictErrorChecking"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getXmlEncoding"
+ return="java.lang.String"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getXmlStandalone"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getXmlVersion"
+ return="java.lang.String"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="importNode"
+ return="org.w3c.dom.Node"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="importedNode" type="org.w3c.dom.Node">
+</parameter>
+<parameter name="deep" type="boolean">
+</parameter>
+<exception name="DOMException" type="org.w3c.dom.DOMException">
+</exception>
+</method>
+<method name="normalizeDocument"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="renameNode"
+ return="org.w3c.dom.Node"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="n" type="org.w3c.dom.Node">
+</parameter>
+<parameter name="namespaceURI" type="java.lang.String">
+</parameter>
+<parameter name="qualifiedName" type="java.lang.String">
+</parameter>
+<exception name="DOMException" type="org.w3c.dom.DOMException">
+</exception>
+</method>
+<method name="setDocumentURI"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="documentURI" type="java.lang.String">
+</parameter>
+</method>
+<method name="setStrictErrorChecking"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="strictErrorChecking" type="boolean">
+</parameter>
+</method>
+<method name="setXmlStandalone"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="xmlStandalone" type="boolean">
+</parameter>
+<exception name="DOMException" type="org.w3c.dom.DOMException">
+</exception>
+</method>
+<method name="setXmlVersion"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="xmlVersion" type="java.lang.String">
+</parameter>
+<exception name="DOMException" type="org.w3c.dom.DOMException">
+</exception>
+</method>
+</interface>
+<interface name="DocumentFragment"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="org.w3c.dom.Node">
+</implements>
+</interface>
+<interface name="DocumentType"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="org.w3c.dom.Node">
+</implements>
+<method name="getEntities"
+ return="org.w3c.dom.NamedNodeMap"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getInternalSubset"
+ return="java.lang.String"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getName"
+ return="java.lang.String"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getNotations"
+ return="org.w3c.dom.NamedNodeMap"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getPublicId"
+ return="java.lang.String"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getSystemId"
+ return="java.lang.String"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+</interface>
+<interface name="Element"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="org.w3c.dom.Node">
+</implements>
+<method name="getAttribute"
+ return="java.lang.String"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+</method>
+<method name="getAttributeNS"
+ return="java.lang.String"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="namespaceURI" type="java.lang.String">
+</parameter>
+<parameter name="localName" type="java.lang.String">
+</parameter>
+<exception name="DOMException" type="org.w3c.dom.DOMException">
+</exception>
+</method>
+<method name="getAttributeNode"
+ return="org.w3c.dom.Attr"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+</method>
+<method name="getAttributeNodeNS"
+ return="org.w3c.dom.Attr"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="namespaceURI" type="java.lang.String">
+</parameter>
+<parameter name="localName" type="java.lang.String">
+</parameter>
+<exception name="DOMException" type="org.w3c.dom.DOMException">
+</exception>
+</method>
+<method name="getElementsByTagName"
+ return="org.w3c.dom.NodeList"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+</method>
+<method name="getElementsByTagNameNS"
+ return="org.w3c.dom.NodeList"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="namespaceURI" type="java.lang.String">
+</parameter>
+<parameter name="localName" type="java.lang.String">
+</parameter>
+<exception name="DOMException" type="org.w3c.dom.DOMException">
+</exception>
+</method>
+<method name="getSchemaTypeInfo"
+ return="org.w3c.dom.TypeInfo"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getTagName"
+ return="java.lang.String"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="hasAttribute"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+</method>
+<method name="hasAttributeNS"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="namespaceURI" type="java.lang.String">
+</parameter>
+<parameter name="localName" type="java.lang.String">
+</parameter>
+<exception name="DOMException" type="org.w3c.dom.DOMException">
+</exception>
+</method>
+<method name="removeAttribute"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+<exception name="DOMException" type="org.w3c.dom.DOMException">
+</exception>
+</method>
+<method name="removeAttributeNS"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="namespaceURI" type="java.lang.String">
+</parameter>
+<parameter name="localName" type="java.lang.String">
+</parameter>
+<exception name="DOMException" type="org.w3c.dom.DOMException">
+</exception>
+</method>
+<method name="removeAttributeNode"
+ return="org.w3c.dom.Attr"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="oldAttr" type="org.w3c.dom.Attr">
+</parameter>
+<exception name="DOMException" type="org.w3c.dom.DOMException">
+</exception>
+</method>
+<method name="setAttribute"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+<parameter name="value" type="java.lang.String">
+</parameter>
+<exception name="DOMException" type="org.w3c.dom.DOMException">
+</exception>
+</method>
+<method name="setAttributeNS"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="namespaceURI" type="java.lang.String">
+</parameter>
+<parameter name="qualifiedName" type="java.lang.String">
+</parameter>
+<parameter name="value" type="java.lang.String">
+</parameter>
+<exception name="DOMException" type="org.w3c.dom.DOMException">
+</exception>
+</method>
+<method name="setAttributeNode"
+ return="org.w3c.dom.Attr"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="newAttr" type="org.w3c.dom.Attr">
+</parameter>
+<exception name="DOMException" type="org.w3c.dom.DOMException">
+</exception>
+</method>
+<method name="setAttributeNodeNS"
+ return="org.w3c.dom.Attr"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="newAttr" type="org.w3c.dom.Attr">
+</parameter>
+<exception name="DOMException" type="org.w3c.dom.DOMException">
+</exception>
+</method>
+<method name="setIdAttribute"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+<parameter name="isId" type="boolean">
+</parameter>
+<exception name="DOMException" type="org.w3c.dom.DOMException">
+</exception>
+</method>
+<method name="setIdAttributeNS"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="namespaceURI" type="java.lang.String">
+</parameter>
+<parameter name="localName" type="java.lang.String">
+</parameter>
+<parameter name="isId" type="boolean">
+</parameter>
+<exception name="DOMException" type="org.w3c.dom.DOMException">
+</exception>
+</method>
+<method name="setIdAttributeNode"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="idAttr" type="org.w3c.dom.Attr">
+</parameter>
+<parameter name="isId" type="boolean">
+</parameter>
+<exception name="DOMException" type="org.w3c.dom.DOMException">
+</exception>
+</method>
+</interface>
+<interface name="Entity"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="org.w3c.dom.Node">
+</implements>
+<method name="getInputEncoding"
+ return="java.lang.String"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getNotationName"
+ return="java.lang.String"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getPublicId"
+ return="java.lang.String"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getSystemId"
+ return="java.lang.String"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getXmlEncoding"
+ return="java.lang.String"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getXmlVersion"
+ return="java.lang.String"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+</interface>
+<interface name="EntityReference"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="org.w3c.dom.Node">
+</implements>
+</interface>
+<interface name="NameList"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="contains"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="str" type="java.lang.String">
+</parameter>
+</method>
+<method name="containsNS"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="namespaceURI" type="java.lang.String">
+</parameter>
+<parameter name="name" type="java.lang.String">
+</parameter>
+</method>
+<method name="getLength"
+ return="int"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getName"
+ return="java.lang.String"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="index" type="int">
+</parameter>
+</method>
+<method name="getNamespaceURI"
+ return="java.lang.String"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="index" type="int">
+</parameter>
+</method>
+</interface>
+<interface name="NamedNodeMap"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="getLength"
+ return="int"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getNamedItem"
+ return="org.w3c.dom.Node"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+</method>
+<method name="getNamedItemNS"
+ return="org.w3c.dom.Node"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="namespaceURI" type="java.lang.String">
+</parameter>
+<parameter name="localName" type="java.lang.String">
+</parameter>
+<exception name="DOMException" type="org.w3c.dom.DOMException">
+</exception>
+</method>
+<method name="item"
+ return="org.w3c.dom.Node"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="index" type="int">
+</parameter>
+</method>
+<method name="removeNamedItem"
+ return="org.w3c.dom.Node"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+<exception name="DOMException" type="org.w3c.dom.DOMException">
+</exception>
+</method>
+<method name="removeNamedItemNS"
+ return="org.w3c.dom.Node"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="namespaceURI" type="java.lang.String">
+</parameter>
+<parameter name="localName" type="java.lang.String">
+</parameter>
+<exception name="DOMException" type="org.w3c.dom.DOMException">
+</exception>
+</method>
+<method name="setNamedItem"
+ return="org.w3c.dom.Node"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="arg" type="org.w3c.dom.Node">
+</parameter>
+<exception name="DOMException" type="org.w3c.dom.DOMException">
+</exception>
+</method>
+<method name="setNamedItemNS"
+ return="org.w3c.dom.Node"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="arg" type="org.w3c.dom.Node">
+</parameter>
+<exception name="DOMException" type="org.w3c.dom.DOMException">
+</exception>
+</method>
+</interface>
+<interface name="Node"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="appendChild"
+ return="org.w3c.dom.Node"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="newChild" type="org.w3c.dom.Node">
+</parameter>
+<exception name="DOMException" type="org.w3c.dom.DOMException">
+</exception>
+</method>
+<method name="cloneNode"
+ return="org.w3c.dom.Node"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="deep" type="boolean">
+</parameter>
+</method>
+<method name="compareDocumentPosition"
+ return="short"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="other" type="org.w3c.dom.Node">
+</parameter>
+<exception name="DOMException" type="org.w3c.dom.DOMException">
+</exception>
+</method>
+<method name="getAttributes"
+ return="org.w3c.dom.NamedNodeMap"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getBaseURI"
+ return="java.lang.String"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getChildNodes"
+ return="org.w3c.dom.NodeList"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getFeature"
+ return="java.lang.Object"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="feature" type="java.lang.String">
+</parameter>
+<parameter name="version" type="java.lang.String">
+</parameter>
+</method>
+<method name="getFirstChild"
+ return="org.w3c.dom.Node"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getLastChild"
+ return="org.w3c.dom.Node"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getLocalName"
+ return="java.lang.String"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getNamespaceURI"
+ return="java.lang.String"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getNextSibling"
+ return="org.w3c.dom.Node"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getNodeName"
+ return="java.lang.String"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getNodeType"
+ return="short"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getNodeValue"
+ return="java.lang.String"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="DOMException" type="org.w3c.dom.DOMException">
+</exception>
+</method>
+<method name="getOwnerDocument"
+ return="org.w3c.dom.Document"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getParentNode"
+ return="org.w3c.dom.Node"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getPrefix"
+ return="java.lang.String"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getPreviousSibling"
+ return="org.w3c.dom.Node"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getTextContent"
+ return="java.lang.String"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="DOMException" type="org.w3c.dom.DOMException">
+</exception>
+</method>
+<method name="getUserData"
+ return="java.lang.Object"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="key" type="java.lang.String">
+</parameter>
+</method>
+<method name="hasAttributes"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="hasChildNodes"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="insertBefore"
+ return="org.w3c.dom.Node"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="newChild" type="org.w3c.dom.Node">
+</parameter>
+<parameter name="refChild" type="org.w3c.dom.Node">
+</parameter>
+<exception name="DOMException" type="org.w3c.dom.DOMException">
+</exception>
+</method>
+<method name="isDefaultNamespace"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="namespaceURI" type="java.lang.String">
+</parameter>
+</method>
+<method name="isEqualNode"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="arg" type="org.w3c.dom.Node">
+</parameter>
+</method>
+<method name="isSameNode"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="other" type="org.w3c.dom.Node">
+</parameter>
+</method>
+<method name="isSupported"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="feature" type="java.lang.String">
+</parameter>
+<parameter name="version" type="java.lang.String">
+</parameter>
+</method>
+<method name="lookupNamespaceURI"
+ return="java.lang.String"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="prefix" type="java.lang.String">
+</parameter>
+</method>
+<method name="lookupPrefix"
+ return="java.lang.String"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="namespaceURI" type="java.lang.String">
+</parameter>
+</method>
+<method name="normalize"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="removeChild"
+ return="org.w3c.dom.Node"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="oldChild" type="org.w3c.dom.Node">
+</parameter>
+<exception name="DOMException" type="org.w3c.dom.DOMException">
+</exception>
+</method>
+<method name="replaceChild"
+ return="org.w3c.dom.Node"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="newChild" type="org.w3c.dom.Node">
+</parameter>
+<parameter name="oldChild" type="org.w3c.dom.Node">
+</parameter>
+<exception name="DOMException" type="org.w3c.dom.DOMException">
+</exception>
+</method>
+<method name="setNodeValue"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="nodeValue" type="java.lang.String">
+</parameter>
+<exception name="DOMException" type="org.w3c.dom.DOMException">
+</exception>
+</method>
+<method name="setPrefix"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="prefix" type="java.lang.String">
+</parameter>
+<exception name="DOMException" type="org.w3c.dom.DOMException">
+</exception>
+</method>
+<method name="setTextContent"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="textContent" type="java.lang.String">
+</parameter>
+<exception name="DOMException" type="org.w3c.dom.DOMException">
+</exception>
+</method>
+<method name="setUserData"
+ return="java.lang.Object"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="key" type="java.lang.String">
+</parameter>
+<parameter name="data" type="java.lang.Object">
+</parameter>
+<parameter name="handler" type="org.w3c.dom.UserDataHandler">
+</parameter>
+</method>
+<field name="ATTRIBUTE_NODE"
+ type="short"
+ transient="false"
+ volatile="false"
+ value="2"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="CDATA_SECTION_NODE"
+ type="short"
+ transient="false"
+ volatile="false"
+ value="4"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="COMMENT_NODE"
+ type="short"
+ transient="false"
+ volatile="false"
+ value="8"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="DOCUMENT_FRAGMENT_NODE"
+ type="short"
+ transient="false"
+ volatile="false"
+ value="11"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="DOCUMENT_NODE"
+ type="short"
+ transient="false"
+ volatile="false"
+ value="9"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="DOCUMENT_POSITION_CONTAINED_BY"
+ type="short"
+ transient="false"
+ volatile="false"
+ value="16"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="DOCUMENT_POSITION_CONTAINS"
+ type="short"
+ transient="false"
+ volatile="false"
+ value="8"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="DOCUMENT_POSITION_DISCONNECTED"
+ type="short"
+ transient="false"
+ volatile="false"
+ value="1"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="DOCUMENT_POSITION_FOLLOWING"
+ type="short"
+ transient="false"
+ volatile="false"
+ value="4"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC"
+ type="short"
+ transient="false"
+ volatile="false"
+ value="32"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="DOCUMENT_POSITION_PRECEDING"
+ type="short"
+ transient="false"
+ volatile="false"
+ value="2"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="DOCUMENT_TYPE_NODE"
+ type="short"
+ transient="false"
+ volatile="false"
+ value="10"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ELEMENT_NODE"
+ type="short"
+ transient="false"
+ volatile="false"
+ value="1"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ENTITY_NODE"
+ type="short"
+ transient="false"
+ volatile="false"
+ value="6"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ENTITY_REFERENCE_NODE"
+ type="short"
+ transient="false"
+ volatile="false"
+ value="5"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="NOTATION_NODE"
+ type="short"
+ transient="false"
+ volatile="false"
+ value="12"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="PROCESSING_INSTRUCTION_NODE"
+ type="short"
+ transient="false"
+ volatile="false"
+ value="7"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TEXT_NODE"
+ type="short"
+ transient="false"
+ volatile="false"
+ value="3"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</interface>
+<interface name="NodeList"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="getLength"
+ return="int"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="item"
+ return="org.w3c.dom.Node"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="index" type="int">
+</parameter>
+</method>
+</interface>
+<interface name="Notation"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="org.w3c.dom.Node">
+</implements>
+<method name="getPublicId"
+ return="java.lang.String"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getSystemId"
+ return="java.lang.String"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+</interface>
+<interface name="ProcessingInstruction"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="org.w3c.dom.Node">
+</implements>
+<method name="getData"
+ return="java.lang.String"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getTarget"
+ return="java.lang.String"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="setData"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="data" type="java.lang.String">
+</parameter>
+<exception name="DOMException" type="org.w3c.dom.DOMException">
+</exception>
+</method>
+</interface>
+<interface name="Text"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="org.w3c.dom.CharacterData">
+</implements>
+<method name="getWholeText"
+ return="java.lang.String"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isElementContentWhitespace"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="replaceWholeText"
+ return="org.w3c.dom.Text"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="content" type="java.lang.String">
+</parameter>
+<exception name="DOMException" type="org.w3c.dom.DOMException">
+</exception>
+</method>
+<method name="splitText"
+ return="org.w3c.dom.Text"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="offset" type="int">
+</parameter>
+<exception name="DOMException" type="org.w3c.dom.DOMException">
+</exception>
+</method>
+</interface>
+<interface name="TypeInfo"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="getTypeName"
+ return="java.lang.String"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getTypeNamespace"
+ return="java.lang.String"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isDerivedFrom"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="typeNamespaceArg" type="java.lang.String">
+</parameter>
+<parameter name="typeNameArg" type="java.lang.String">
+</parameter>
+<parameter name="derivationMethod" type="int">
+</parameter>
+</method>
+<field name="DERIVATION_EXTENSION"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="DERIVATION_LIST"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="8"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="DERIVATION_RESTRICTION"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="DERIVATION_UNION"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="4"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</interface>
+<interface name="UserDataHandler"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="handle"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="operation" type="short">
+</parameter>
+<parameter name="key" type="java.lang.String">
+</parameter>
+<parameter name="data" type="java.lang.Object">
+</parameter>
+<parameter name="src" type="org.w3c.dom.Node">
+</parameter>
+<parameter name="dst" type="org.w3c.dom.Node">
+</parameter>
+</method>
+<field name="NODE_ADOPTED"
+ type="short"
+ transient="false"
+ volatile="false"
+ value="5"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="NODE_CLONED"
+ type="short"
+ transient="false"
+ volatile="false"
+ value="1"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="NODE_DELETED"
+ type="short"
+ transient="false"
+ volatile="false"
+ value="3"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="NODE_IMPORTED"
+ type="short"
+ transient="false"
+ volatile="false"
+ value="2"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="NODE_RENAMED"
+ type="short"
+ transient="false"
+ volatile="false"
+ value="4"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</interface>
+</package>
+<package name="org.w3c.dom.ls"
+>
+<interface name="DOMImplementationLS"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="createLSInput"
+ return="org.w3c.dom.ls.LSInput"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="createLSOutput"
+ return="org.w3c.dom.ls.LSOutput"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="createLSParser"
+ return="org.w3c.dom.ls.LSParser"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="mode" type="short">
+</parameter>
+<parameter name="schemaType" type="java.lang.String">
+</parameter>
+<exception name="DOMException" type="org.w3c.dom.DOMException">
+</exception>
+</method>
+<method name="createLSSerializer"
+ return="org.w3c.dom.ls.LSSerializer"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<field name="MODE_ASYNCHRONOUS"
+ type="short"
+ transient="false"
+ volatile="false"
+ value="2"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="MODE_SYNCHRONOUS"
+ type="short"
+ transient="false"
+ volatile="false"
+ value="1"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</interface>
+<class name="LSException"
+ extends="java.lang.RuntimeException"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="LSException"
+ type="org.w3c.dom.ls.LSException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="code" type="short">
+</parameter>
+<parameter name="message" type="java.lang.String">
+</parameter>
+</constructor>
+<field name="PARSE_ERR"
+ type="short"
+ transient="false"
+ volatile="false"
+ value="81"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="SERIALIZE_ERR"
+ type="short"
+ transient="false"
+ volatile="false"
+ value="82"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="code"
+ type="short"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<interface name="LSInput"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="getBaseURI"
+ return="java.lang.String"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getByteStream"
+ return="java.io.InputStream"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getCertifiedText"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getCharacterStream"
+ return="java.io.Reader"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getEncoding"
+ return="java.lang.String"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getPublicId"
+ return="java.lang.String"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getStringData"
+ return="java.lang.String"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getSystemId"
+ return="java.lang.String"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="setBaseURI"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="baseURI" type="java.lang.String">
+</parameter>
+</method>
+<method name="setByteStream"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="byteStream" type="java.io.InputStream">
+</parameter>
+</method>
+<method name="setCertifiedText"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="certifiedText" type="boolean">
+</parameter>
+</method>
+<method name="setCharacterStream"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="characterStream" type="java.io.Reader">
+</parameter>
+</method>
+<method name="setEncoding"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="encoding" type="java.lang.String">
+</parameter>
+</method>
+<method name="setPublicId"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="publicId" type="java.lang.String">
+</parameter>
+</method>
+<method name="setStringData"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="stringData" type="java.lang.String">
+</parameter>
+</method>
+<method name="setSystemId"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="systemId" type="java.lang.String">
+</parameter>
+</method>
+</interface>
+<interface name="LSOutput"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="getByteStream"
+ return="java.io.OutputStream"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getCharacterStream"
+ return="java.io.Writer"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getEncoding"
+ return="java.lang.String"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getSystemId"
+ return="java.lang.String"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="setByteStream"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="byteStream" type="java.io.OutputStream">
+</parameter>
+</method>
+<method name="setCharacterStream"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="characterStream" type="java.io.Writer">
+</parameter>
+</method>
+<method name="setEncoding"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="encoding" type="java.lang.String">
+</parameter>
+</method>
+<method name="setSystemId"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="systemId" type="java.lang.String">
+</parameter>
+</method>
+</interface>
+<interface name="LSParser"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="abort"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getAsync"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getBusy"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getDomConfig"
+ return="org.w3c.dom.DOMConfiguration"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getFilter"
+ return="org.w3c.dom.ls.LSParserFilter"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="parse"
+ return="org.w3c.dom.Document"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="input" type="org.w3c.dom.ls.LSInput">
+</parameter>
+<exception name="DOMException" type="org.w3c.dom.DOMException">
+</exception>
+<exception name="LSException" type="org.w3c.dom.ls.LSException">
+</exception>
+</method>
+<method name="parseURI"
+ return="org.w3c.dom.Document"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="uri" type="java.lang.String">
+</parameter>
+<exception name="DOMException" type="org.w3c.dom.DOMException">
+</exception>
+<exception name="LSException" type="org.w3c.dom.ls.LSException">
+</exception>
+</method>
+<method name="parseWithContext"
+ return="org.w3c.dom.Node"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="input" type="org.w3c.dom.ls.LSInput">
+</parameter>
+<parameter name="contextArg" type="org.w3c.dom.Node">
+</parameter>
+<parameter name="action" type="short">
+</parameter>
+<exception name="DOMException" type="org.w3c.dom.DOMException">
+</exception>
+<exception name="LSException" type="org.w3c.dom.ls.LSException">
+</exception>
+</method>
+<method name="setFilter"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="filter" type="org.w3c.dom.ls.LSParserFilter">
+</parameter>
+</method>
+<field name="ACTION_APPEND_AS_CHILDREN"
+ type="short"
+ transient="false"
+ volatile="false"
+ value="1"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ACTION_INSERT_AFTER"
+ type="short"
+ transient="false"
+ volatile="false"
+ value="4"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ACTION_INSERT_BEFORE"
+ type="short"
+ transient="false"
+ volatile="false"
+ value="3"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ACTION_REPLACE"
+ type="short"
+ transient="false"
+ volatile="false"
+ value="5"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ACTION_REPLACE_CHILDREN"
+ type="short"
+ transient="false"
+ volatile="false"
+ value="2"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</interface>
+<interface name="LSParserFilter"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="acceptNode"
+ return="short"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="nodeArg" type="org.w3c.dom.Node">
+</parameter>
+</method>
+<method name="getWhatToShow"
+ return="int"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="startElement"
+ return="short"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="elementArg" type="org.w3c.dom.Element">
+</parameter>
+</method>
+<field name="FILTER_ACCEPT"
+ type="short"
+ transient="false"
+ volatile="false"
+ value="1"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="FILTER_INTERRUPT"
+ type="short"
+ transient="false"
+ volatile="false"
+ value="4"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="FILTER_REJECT"
+ type="short"
+ transient="false"
+ volatile="false"
+ value="2"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="FILTER_SKIP"
+ type="short"
+ transient="false"
+ volatile="false"
+ value="3"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</interface>
+<interface name="LSResourceResolver"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="resolveResource"
+ return="org.w3c.dom.ls.LSInput"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="type" type="java.lang.String">
+</parameter>
+<parameter name="namespaceURI" type="java.lang.String">
+</parameter>
+<parameter name="publicId" type="java.lang.String">
+</parameter>
+<parameter name="systemId" type="java.lang.String">
+</parameter>
+<parameter name="baseURI" type="java.lang.String">
+</parameter>
+</method>
+</interface>
+<interface name="LSSerializer"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="getDomConfig"
+ return="org.w3c.dom.DOMConfiguration"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getNewLine"
+ return="java.lang.String"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="setNewLine"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="newLine" type="java.lang.String">
+</parameter>
+</method>
+<method name="write"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="nodeArg" type="org.w3c.dom.Node">
+</parameter>
+<parameter name="destination" type="org.w3c.dom.ls.LSOutput">
+</parameter>
+<exception name="LSException" type="org.w3c.dom.ls.LSException">
+</exception>
+</method>
+<method name="writeToString"
+ return="java.lang.String"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="nodeArg" type="org.w3c.dom.Node">
+</parameter>
+<exception name="DOMException" type="org.w3c.dom.DOMException">
+</exception>
+<exception name="LSException" type="org.w3c.dom.ls.LSException">
+</exception>
+</method>
+<method name="writeToURI"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="nodeArg" type="org.w3c.dom.Node">
+</parameter>
+<parameter name="uri" type="java.lang.String">
+</parameter>
+<exception name="LSException" type="org.w3c.dom.ls.LSException">
+</exception>
+</method>
+</interface>
+</package>
+<package name="org.xml.sax"
+>
+<interface name="AttributeList"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="deprecated"
+ visibility="public"
+>
+<method name="getLength"
+ return="int"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getName"
+ return="java.lang.String"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="i" type="int">
+</parameter>
+</method>
+<method name="getType"
+ return="java.lang.String"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="i" type="int">
+</parameter>
+</method>
+<method name="getType"
+ return="java.lang.String"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+</method>
+<method name="getValue"
+ return="java.lang.String"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="i" type="int">
+</parameter>
+</method>
+<method name="getValue"
+ return="java.lang.String"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+</method>
+</interface>
+<interface name="Attributes"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="getIndex"
+ return="int"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="uri" type="java.lang.String">
+</parameter>
+<parameter name="localName" type="java.lang.String">
+</parameter>
+</method>
+<method name="getIndex"
+ return="int"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="qName" type="java.lang.String">
+</parameter>
+</method>
+<method name="getLength"
+ return="int"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getLocalName"
+ return="java.lang.String"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="index" type="int">
+</parameter>
+</method>
+<method name="getQName"
+ return="java.lang.String"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="index" type="int">
+</parameter>
+</method>
+<method name="getType"
+ return="java.lang.String"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="index" type="int">
+</parameter>
+</method>
+<method name="getType"
+ return="java.lang.String"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="uri" type="java.lang.String">
+</parameter>
+<parameter name="localName" type="java.lang.String">
+</parameter>
+</method>
+<method name="getType"
+ return="java.lang.String"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="qName" type="java.lang.String">
+</parameter>
+</method>
+<method name="getURI"
+ return="java.lang.String"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="index" type="int">
+</parameter>
+</method>
+<method name="getValue"
+ return="java.lang.String"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="index" type="int">
+</parameter>
+</method>
+<method name="getValue"
+ return="java.lang.String"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="uri" type="java.lang.String">
+</parameter>
+<parameter name="localName" type="java.lang.String">
+</parameter>
+</method>
+<method name="getValue"
+ return="java.lang.String"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="qName" type="java.lang.String">
+</parameter>
+</method>
+</interface>
+<interface name="ContentHandler"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="characters"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="ch" type="char[]">
+</parameter>
+<parameter name="start" type="int">
+</parameter>
+<parameter name="length" type="int">
+</parameter>
+<exception name="SAXException" type="org.xml.sax.SAXException">
+</exception>
+</method>
+<method name="endDocument"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="SAXException" type="org.xml.sax.SAXException">
+</exception>
+</method>
+<method name="endElement"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="uri" type="java.lang.String">
+</parameter>
+<parameter name="localName" type="java.lang.String">
+</parameter>
+<parameter name="qName" type="java.lang.String">
+</parameter>
+<exception name="SAXException" type="org.xml.sax.SAXException">
+</exception>
+</method>
+<method name="endPrefixMapping"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="prefix" type="java.lang.String">
+</parameter>
+<exception name="SAXException" type="org.xml.sax.SAXException">
+</exception>
+</method>
+<method name="ignorableWhitespace"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="ch" type="char[]">
+</parameter>
+<parameter name="start" type="int">
+</parameter>
+<parameter name="length" type="int">
+</parameter>
+<exception name="SAXException" type="org.xml.sax.SAXException">
+</exception>
+</method>
+<method name="processingInstruction"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="target" type="java.lang.String">
+</parameter>
+<parameter name="data" type="java.lang.String">
+</parameter>
+<exception name="SAXException" type="org.xml.sax.SAXException">
+</exception>
+</method>
+<method name="setDocumentLocator"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="locator" type="org.xml.sax.Locator">
+</parameter>
+</method>
+<method name="skippedEntity"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+<exception name="SAXException" type="org.xml.sax.SAXException">
+</exception>
+</method>
+<method name="startDocument"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="SAXException" type="org.xml.sax.SAXException">
+</exception>
+</method>
+<method name="startElement"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="uri" type="java.lang.String">
+</parameter>
+<parameter name="localName" type="java.lang.String">
+</parameter>
+<parameter name="qName" type="java.lang.String">
+</parameter>
+<parameter name="atts" type="org.xml.sax.Attributes">
+</parameter>
+<exception name="SAXException" type="org.xml.sax.SAXException">
+</exception>
+</method>
+<method name="startPrefixMapping"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="prefix" type="java.lang.String">
+</parameter>
+<parameter name="uri" type="java.lang.String">
+</parameter>
+<exception name="SAXException" type="org.xml.sax.SAXException">
+</exception>
+</method>
+</interface>
+<interface name="DTDHandler"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="notationDecl"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+<parameter name="publicId" type="java.lang.String">
+</parameter>
+<parameter name="systemId" type="java.lang.String">
+</parameter>
+<exception name="SAXException" type="org.xml.sax.SAXException">
+</exception>
+</method>
+<method name="unparsedEntityDecl"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+<parameter name="publicId" type="java.lang.String">
+</parameter>
+<parameter name="systemId" type="java.lang.String">
+</parameter>
+<parameter name="notationName" type="java.lang.String">
+</parameter>
+<exception name="SAXException" type="org.xml.sax.SAXException">
+</exception>
+</method>
+</interface>
+<interface name="DocumentHandler"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="deprecated"
+ visibility="public"
+>
+<method name="characters"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="ch" type="char[]">
+</parameter>
+<parameter name="start" type="int">
+</parameter>
+<parameter name="length" type="int">
+</parameter>
+<exception name="SAXException" type="org.xml.sax.SAXException">
+</exception>
+</method>
+<method name="endDocument"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="SAXException" type="org.xml.sax.SAXException">
+</exception>
+</method>
+<method name="endElement"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+<exception name="SAXException" type="org.xml.sax.SAXException">
+</exception>
+</method>
+<method name="ignorableWhitespace"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="ch" type="char[]">
+</parameter>
+<parameter name="start" type="int">
+</parameter>
+<parameter name="length" type="int">
+</parameter>
+<exception name="SAXException" type="org.xml.sax.SAXException">
+</exception>
+</method>
+<method name="processingInstruction"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="target" type="java.lang.String">
+</parameter>
+<parameter name="data" type="java.lang.String">
+</parameter>
+<exception name="SAXException" type="org.xml.sax.SAXException">
+</exception>
+</method>
+<method name="setDocumentLocator"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="locator" type="org.xml.sax.Locator">
+</parameter>
+</method>
+<method name="startDocument"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="SAXException" type="org.xml.sax.SAXException">
+</exception>
+</method>
+<method name="startElement"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+<parameter name="atts" type="org.xml.sax.AttributeList">
+</parameter>
+<exception name="SAXException" type="org.xml.sax.SAXException">
+</exception>
+</method>
+</interface>
+<interface name="EntityResolver"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="resolveEntity"
+ return="org.xml.sax.InputSource"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="publicId" type="java.lang.String">
+</parameter>
+<parameter name="systemId" type="java.lang.String">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+<exception name="SAXException" type="org.xml.sax.SAXException">
+</exception>
+</method>
+</interface>
+<interface name="ErrorHandler"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="error"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="exception" type="org.xml.sax.SAXParseException">
+</parameter>
+<exception name="SAXException" type="org.xml.sax.SAXException">
+</exception>
+</method>
+<method name="fatalError"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="exception" type="org.xml.sax.SAXParseException">
+</parameter>
+<exception name="SAXException" type="org.xml.sax.SAXException">
+</exception>
+</method>
+<method name="warning"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="exception" type="org.xml.sax.SAXParseException">
+</parameter>
+<exception name="SAXException" type="org.xml.sax.SAXException">
+</exception>
+</method>
+</interface>
+<class name="HandlerBase"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="deprecated"
+ visibility="public"
+>
+<implements name="org.xml.sax.DTDHandler">
+</implements>
+<implements name="org.xml.sax.DocumentHandler">
+</implements>
+<implements name="org.xml.sax.EntityResolver">
+</implements>
+<implements name="org.xml.sax.ErrorHandler">
+</implements>
+<constructor name="HandlerBase"
+ type="org.xml.sax.HandlerBase"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<method name="characters"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="ch" type="char[]">
+</parameter>
+<parameter name="start" type="int">
+</parameter>
+<parameter name="length" type="int">
+</parameter>
+<exception name="SAXException" type="org.xml.sax.SAXException">
+</exception>
+</method>
+<method name="endDocument"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="SAXException" type="org.xml.sax.SAXException">
+</exception>
+</method>
+<method name="endElement"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+<exception name="SAXException" type="org.xml.sax.SAXException">
+</exception>
+</method>
+<method name="error"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="e" type="org.xml.sax.SAXParseException">
+</parameter>
+<exception name="SAXException" type="org.xml.sax.SAXException">
+</exception>
+</method>
+<method name="fatalError"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="e" type="org.xml.sax.SAXParseException">
+</parameter>
+<exception name="SAXException" type="org.xml.sax.SAXException">
+</exception>
+</method>
+<method name="ignorableWhitespace"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="ch" type="char[]">
+</parameter>
+<parameter name="start" type="int">
+</parameter>
+<parameter name="length" type="int">
+</parameter>
+<exception name="SAXException" type="org.xml.sax.SAXException">
+</exception>
+</method>
+<method name="notationDecl"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+<parameter name="publicId" type="java.lang.String">
+</parameter>
+<parameter name="systemId" type="java.lang.String">
+</parameter>
+</method>
+<method name="processingInstruction"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="target" type="java.lang.String">
+</parameter>
+<parameter name="data" type="java.lang.String">
+</parameter>
+<exception name="SAXException" type="org.xml.sax.SAXException">
+</exception>
+</method>
+<method name="resolveEntity"
+ return="org.xml.sax.InputSource"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="publicId" type="java.lang.String">
+</parameter>
+<parameter name="systemId" type="java.lang.String">
+</parameter>
+<exception name="SAXException" type="org.xml.sax.SAXException">
+</exception>
+</method>
+<method name="setDocumentLocator"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="locator" type="org.xml.sax.Locator">
+</parameter>
+</method>
+<method name="startDocument"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="SAXException" type="org.xml.sax.SAXException">
+</exception>
+</method>
+<method name="startElement"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+<parameter name="attributes" type="org.xml.sax.AttributeList">
+</parameter>
+<exception name="SAXException" type="org.xml.sax.SAXException">
+</exception>
+</method>
+<method name="unparsedEntityDecl"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+<parameter name="publicId" type="java.lang.String">
+</parameter>
+<parameter name="systemId" type="java.lang.String">
+</parameter>
+<parameter name="notationName" type="java.lang.String">
+</parameter>
+</method>
+<method name="warning"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="e" type="org.xml.sax.SAXParseException">
+</parameter>
+<exception name="SAXException" type="org.xml.sax.SAXException">
+</exception>
+</method>
+</class>
+<class name="InputSource"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="InputSource"
+ type="org.xml.sax.InputSource"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<constructor name="InputSource"
+ type="org.xml.sax.InputSource"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="systemId" type="java.lang.String">
+</parameter>
+</constructor>
+<constructor name="InputSource"
+ type="org.xml.sax.InputSource"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="byteStream" type="java.io.InputStream">
+</parameter>
+</constructor>
+<constructor name="InputSource"
+ type="org.xml.sax.InputSource"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="characterStream" type="java.io.Reader">
+</parameter>
+</constructor>
+<method name="getByteStream"
+ return="java.io.InputStream"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getCharacterStream"
+ return="java.io.Reader"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getEncoding"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getPublicId"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getSystemId"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="setByteStream"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="byteStream" type="java.io.InputStream">
+</parameter>
+</method>
+<method name="setCharacterStream"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="characterStream" type="java.io.Reader">
+</parameter>
+</method>
+<method name="setEncoding"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="encoding" type="java.lang.String">
+</parameter>
+</method>
+<method name="setPublicId"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="publicId" type="java.lang.String">
+</parameter>
+</method>
+<method name="setSystemId"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="systemId" type="java.lang.String">
+</parameter>
+</method>
+</class>
+<interface name="Locator"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="getColumnNumber"
+ return="int"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getLineNumber"
+ return="int"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getPublicId"
+ return="java.lang.String"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getSystemId"
+ return="java.lang.String"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+</interface>
+<interface name="Parser"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="deprecated"
+ visibility="public"
+>
+<method name="parse"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="source" type="org.xml.sax.InputSource">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+<exception name="SAXException" type="org.xml.sax.SAXException">
+</exception>
+</method>
+<method name="parse"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="systemId" type="java.lang.String">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+<exception name="SAXException" type="org.xml.sax.SAXException">
+</exception>
+</method>
+<method name="setDTDHandler"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="handler" type="org.xml.sax.DTDHandler">
+</parameter>
+</method>
+<method name="setDocumentHandler"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="handler" type="org.xml.sax.DocumentHandler">
+</parameter>
+</method>
+<method name="setEntityResolver"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="resolver" type="org.xml.sax.EntityResolver">
+</parameter>
+</method>
+<method name="setErrorHandler"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="handler" type="org.xml.sax.ErrorHandler">
+</parameter>
+</method>
+<method name="setLocale"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="locale" type="java.util.Locale">
+</parameter>
+<exception name="SAXException" type="org.xml.sax.SAXException">
+</exception>
+</method>
+</interface>
+<class name="SAXException"
+ extends="java.lang.Exception"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="SAXException"
+ type="org.xml.sax.SAXException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<constructor name="SAXException"
+ type="org.xml.sax.SAXException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="message" type="java.lang.String">
+</parameter>
+</constructor>
+<constructor name="SAXException"
+ type="org.xml.sax.SAXException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="e" type="java.lang.Exception">
+</parameter>
+</constructor>
+<constructor name="SAXException"
+ type="org.xml.sax.SAXException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="message" type="java.lang.String">
+</parameter>
+<parameter name="e" type="java.lang.Exception">
+</parameter>
+</constructor>
+<method name="getException"
+ return="java.lang.Exception"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+</class>
+<class name="SAXNotRecognizedException"
+ extends="org.xml.sax.SAXException"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="SAXNotRecognizedException"
+ type="org.xml.sax.SAXNotRecognizedException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<constructor name="SAXNotRecognizedException"
+ type="org.xml.sax.SAXNotRecognizedException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="message" type="java.lang.String">
+</parameter>
+</constructor>
+</class>
+<class name="SAXNotSupportedException"
+ extends="org.xml.sax.SAXException"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="SAXNotSupportedException"
+ type="org.xml.sax.SAXNotSupportedException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<constructor name="SAXNotSupportedException"
+ type="org.xml.sax.SAXNotSupportedException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="message" type="java.lang.String">
+</parameter>
+</constructor>
+</class>
+<class name="SAXParseException"
+ extends="org.xml.sax.SAXException"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="SAXParseException"
+ type="org.xml.sax.SAXParseException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="message" type="java.lang.String">
+</parameter>
+<parameter name="locator" type="org.xml.sax.Locator">
+</parameter>
+</constructor>
+<constructor name="SAXParseException"
+ type="org.xml.sax.SAXParseException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="message" type="java.lang.String">
+</parameter>
+<parameter name="locator" type="org.xml.sax.Locator">
+</parameter>
+<parameter name="e" type="java.lang.Exception">
+</parameter>
+</constructor>
+<constructor name="SAXParseException"
+ type="org.xml.sax.SAXParseException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="message" type="java.lang.String">
+</parameter>
+<parameter name="publicId" type="java.lang.String">
+</parameter>
+<parameter name="systemId" type="java.lang.String">
+</parameter>
+<parameter name="lineNumber" type="int">
+</parameter>
+<parameter name="columnNumber" type="int">
+</parameter>
+</constructor>
+<constructor name="SAXParseException"
+ type="org.xml.sax.SAXParseException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="message" type="java.lang.String">
+</parameter>
+<parameter name="publicId" type="java.lang.String">
+</parameter>
+<parameter name="systemId" type="java.lang.String">
+</parameter>
+<parameter name="lineNumber" type="int">
+</parameter>
+<parameter name="columnNumber" type="int">
+</parameter>
+<parameter name="e" type="java.lang.Exception">
+</parameter>
+</constructor>
+<method name="getColumnNumber"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getLineNumber"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getPublicId"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getSystemId"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+</class>
+<interface name="XMLFilter"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="org.xml.sax.XMLReader">
+</implements>
+<method name="getParent"
+ return="org.xml.sax.XMLReader"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="setParent"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="parent" type="org.xml.sax.XMLReader">
+</parameter>
+</method>
+</interface>
+<interface name="XMLReader"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="getContentHandler"
+ return="org.xml.sax.ContentHandler"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getDTDHandler"
+ return="org.xml.sax.DTDHandler"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getEntityResolver"
+ return="org.xml.sax.EntityResolver"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getErrorHandler"
+ return="org.xml.sax.ErrorHandler"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getFeature"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+<exception name="SAXNotRecognizedException" type="org.xml.sax.SAXNotRecognizedException">
+</exception>
+<exception name="SAXNotSupportedException" type="org.xml.sax.SAXNotSupportedException">
+</exception>
+</method>
+<method name="getProperty"
+ return="java.lang.Object"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+<exception name="SAXNotRecognizedException" type="org.xml.sax.SAXNotRecognizedException">
+</exception>
+<exception name="SAXNotSupportedException" type="org.xml.sax.SAXNotSupportedException">
+</exception>
+</method>
+<method name="parse"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="input" type="org.xml.sax.InputSource">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+<exception name="SAXException" type="org.xml.sax.SAXException">
+</exception>
+</method>
+<method name="parse"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="systemId" type="java.lang.String">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+<exception name="SAXException" type="org.xml.sax.SAXException">
+</exception>
+</method>
+<method name="setContentHandler"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="handler" type="org.xml.sax.ContentHandler">
+</parameter>
+</method>
+<method name="setDTDHandler"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="handler" type="org.xml.sax.DTDHandler">
+</parameter>
+</method>
+<method name="setEntityResolver"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="resolver" type="org.xml.sax.EntityResolver">
+</parameter>
+</method>
+<method name="setErrorHandler"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="handler" type="org.xml.sax.ErrorHandler">
+</parameter>
+</method>
+<method name="setFeature"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+<parameter name="value" type="boolean">
+</parameter>
+<exception name="SAXNotRecognizedException" type="org.xml.sax.SAXNotRecognizedException">
+</exception>
+<exception name="SAXNotSupportedException" type="org.xml.sax.SAXNotSupportedException">
+</exception>
+</method>
+<method name="setProperty"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+<parameter name="value" type="java.lang.Object">
+</parameter>
+<exception name="SAXNotRecognizedException" type="org.xml.sax.SAXNotRecognizedException">
+</exception>
+<exception name="SAXNotSupportedException" type="org.xml.sax.SAXNotSupportedException">
+</exception>
+</method>
+</interface>
+</package>
+<package name="org.xml.sax.ext"
+>
+<interface name="Attributes2"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="org.xml.sax.Attributes">
+</implements>
+<method name="isDeclared"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="index" type="int">
+</parameter>
+</method>
+<method name="isDeclared"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="qName" type="java.lang.String">
+</parameter>
+</method>
+<method name="isDeclared"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="uri" type="java.lang.String">
+</parameter>
+<parameter name="localName" type="java.lang.String">
+</parameter>
+</method>
+<method name="isSpecified"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="index" type="int">
+</parameter>
+</method>
+<method name="isSpecified"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="uri" type="java.lang.String">
+</parameter>
+<parameter name="localName" type="java.lang.String">
+</parameter>
+</method>
+<method name="isSpecified"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="qName" type="java.lang.String">
+</parameter>
+</method>
+</interface>
+<class name="Attributes2Impl"
+ extends="org.xml.sax.helpers.AttributesImpl"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="org.xml.sax.ext.Attributes2">
+</implements>
+<constructor name="Attributes2Impl"
+ type="org.xml.sax.ext.Attributes2Impl"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<constructor name="Attributes2Impl"
+ type="org.xml.sax.ext.Attributes2Impl"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="atts" type="org.xml.sax.Attributes">
+</parameter>
+</constructor>
+<method name="isDeclared"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="index" type="int">
+</parameter>
+</method>
+<method name="isDeclared"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="uri" type="java.lang.String">
+</parameter>
+<parameter name="localName" type="java.lang.String">
+</parameter>
+</method>
+<method name="isDeclared"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="qName" type="java.lang.String">
+</parameter>
+</method>
+<method name="isSpecified"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="index" type="int">
+</parameter>
+</method>
+<method name="isSpecified"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="uri" type="java.lang.String">
+</parameter>
+<parameter name="localName" type="java.lang.String">
+</parameter>
+</method>
+<method name="isSpecified"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="qName" type="java.lang.String">
+</parameter>
+</method>
+<method name="setDeclared"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="index" type="int">
+</parameter>
+<parameter name="value" type="boolean">
+</parameter>
+</method>
+<method name="setSpecified"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="index" type="int">
+</parameter>
+<parameter name="value" type="boolean">
+</parameter>
+</method>
+</class>
+<interface name="DeclHandler"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="attributeDecl"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="eName" type="java.lang.String">
+</parameter>
+<parameter name="aName" type="java.lang.String">
+</parameter>
+<parameter name="type" type="java.lang.String">
+</parameter>
+<parameter name="mode" type="java.lang.String">
+</parameter>
+<parameter name="value" type="java.lang.String">
+</parameter>
+<exception name="SAXException" type="org.xml.sax.SAXException">
+</exception>
+</method>
+<method name="elementDecl"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+<parameter name="model" type="java.lang.String">
+</parameter>
+<exception name="SAXException" type="org.xml.sax.SAXException">
+</exception>
+</method>
+<method name="externalEntityDecl"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+<parameter name="publicId" type="java.lang.String">
+</parameter>
+<parameter name="systemId" type="java.lang.String">
+</parameter>
+<exception name="SAXException" type="org.xml.sax.SAXException">
+</exception>
+</method>
+<method name="internalEntityDecl"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+<parameter name="value" type="java.lang.String">
+</parameter>
+<exception name="SAXException" type="org.xml.sax.SAXException">
+</exception>
+</method>
+</interface>
+<class name="DefaultHandler2"
+ extends="org.xml.sax.helpers.DefaultHandler"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="org.xml.sax.ext.DeclHandler">
+</implements>
+<implements name="org.xml.sax.ext.EntityResolver2">
+</implements>
+<implements name="org.xml.sax.ext.LexicalHandler">
+</implements>
+<constructor name="DefaultHandler2"
+ type="org.xml.sax.ext.DefaultHandler2"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<method name="attributeDecl"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="eName" type="java.lang.String">
+</parameter>
+<parameter name="aName" type="java.lang.String">
+</parameter>
+<parameter name="type" type="java.lang.String">
+</parameter>
+<parameter name="mode" type="java.lang.String">
+</parameter>
+<parameter name="value" type="java.lang.String">
+</parameter>
+<exception name="SAXException" type="org.xml.sax.SAXException">
+</exception>
+</method>
+<method name="comment"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="ch" type="char[]">
+</parameter>
+<parameter name="start" type="int">
+</parameter>
+<parameter name="length" type="int">
+</parameter>
+<exception name="SAXException" type="org.xml.sax.SAXException">
+</exception>
+</method>
+<method name="elementDecl"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+<parameter name="model" type="java.lang.String">
+</parameter>
+<exception name="SAXException" type="org.xml.sax.SAXException">
+</exception>
+</method>
+<method name="endCDATA"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="SAXException" type="org.xml.sax.SAXException">
+</exception>
+</method>
+<method name="endDTD"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="SAXException" type="org.xml.sax.SAXException">
+</exception>
+</method>
+<method name="endEntity"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+<exception name="SAXException" type="org.xml.sax.SAXException">
+</exception>
+</method>
+<method name="externalEntityDecl"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+<parameter name="publicId" type="java.lang.String">
+</parameter>
+<parameter name="systemId" type="java.lang.String">
+</parameter>
+<exception name="SAXException" type="org.xml.sax.SAXException">
+</exception>
+</method>
+<method name="getExternalSubset"
+ return="org.xml.sax.InputSource"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+<parameter name="baseURI" type="java.lang.String">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+<exception name="SAXException" type="org.xml.sax.SAXException">
+</exception>
+</method>
+<method name="internalEntityDecl"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+<parameter name="value" type="java.lang.String">
+</parameter>
+<exception name="SAXException" type="org.xml.sax.SAXException">
+</exception>
+</method>
+<method name="resolveEntity"
+ return="org.xml.sax.InputSource"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+<parameter name="publicId" type="java.lang.String">
+</parameter>
+<parameter name="baseURI" type="java.lang.String">
+</parameter>
+<parameter name="systemId" type="java.lang.String">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+<exception name="SAXException" type="org.xml.sax.SAXException">
+</exception>
+</method>
+<method name="startCDATA"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="SAXException" type="org.xml.sax.SAXException">
+</exception>
+</method>
+<method name="startDTD"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+<parameter name="publicId" type="java.lang.String">
+</parameter>
+<parameter name="systemId" type="java.lang.String">
+</parameter>
+<exception name="SAXException" type="org.xml.sax.SAXException">
+</exception>
+</method>
+<method name="startEntity"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+<exception name="SAXException" type="org.xml.sax.SAXException">
+</exception>
+</method>
+</class>
+<interface name="EntityResolver2"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="org.xml.sax.EntityResolver">
+</implements>
+<method name="getExternalSubset"
+ return="org.xml.sax.InputSource"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+<parameter name="baseURI" type="java.lang.String">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+<exception name="SAXException" type="org.xml.sax.SAXException">
+</exception>
+</method>
+<method name="resolveEntity"
+ return="org.xml.sax.InputSource"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+<parameter name="publicId" type="java.lang.String">
+</parameter>
+<parameter name="baseURI" type="java.lang.String">
+</parameter>
+<parameter name="systemId" type="java.lang.String">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+<exception name="SAXException" type="org.xml.sax.SAXException">
+</exception>
+</method>
+</interface>
+<interface name="LexicalHandler"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="comment"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="ch" type="char[]">
+</parameter>
+<parameter name="start" type="int">
+</parameter>
+<parameter name="length" type="int">
+</parameter>
+<exception name="SAXException" type="org.xml.sax.SAXException">
+</exception>
+</method>
+<method name="endCDATA"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="SAXException" type="org.xml.sax.SAXException">
+</exception>
+</method>
+<method name="endDTD"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="SAXException" type="org.xml.sax.SAXException">
+</exception>
+</method>
+<method name="endEntity"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+<exception name="SAXException" type="org.xml.sax.SAXException">
+</exception>
+</method>
+<method name="startCDATA"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="SAXException" type="org.xml.sax.SAXException">
+</exception>
+</method>
+<method name="startDTD"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+<parameter name="publicId" type="java.lang.String">
+</parameter>
+<parameter name="systemId" type="java.lang.String">
+</parameter>
+<exception name="SAXException" type="org.xml.sax.SAXException">
+</exception>
+</method>
+<method name="startEntity"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+<exception name="SAXException" type="org.xml.sax.SAXException">
+</exception>
+</method>
+</interface>
+<interface name="Locator2"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="org.xml.sax.Locator">
+</implements>
+<method name="getEncoding"
+ return="java.lang.String"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getXMLVersion"
+ return="java.lang.String"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+</interface>
+<class name="Locator2Impl"
+ extends="org.xml.sax.helpers.LocatorImpl"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="org.xml.sax.ext.Locator2">
+</implements>
+<constructor name="Locator2Impl"
+ type="org.xml.sax.ext.Locator2Impl"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<constructor name="Locator2Impl"
+ type="org.xml.sax.ext.Locator2Impl"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="locator" type="org.xml.sax.Locator">
+</parameter>
+</constructor>
+<method name="getEncoding"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getXMLVersion"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="setEncoding"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="encoding" type="java.lang.String">
+</parameter>
+</method>
+<method name="setXMLVersion"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="version" type="java.lang.String">
+</parameter>
+</method>
+</class>
+</package>
+<package name="org.xml.sax.helpers"
+>
+<class name="AttributeListImpl"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="deprecated"
+ visibility="public"
+>
+<implements name="org.xml.sax.AttributeList">
+</implements>
+<constructor name="AttributeListImpl"
+ type="org.xml.sax.helpers.AttributeListImpl"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<constructor name="AttributeListImpl"
+ type="org.xml.sax.helpers.AttributeListImpl"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="atts" type="org.xml.sax.AttributeList">
+</parameter>
+</constructor>
+<method name="addAttribute"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+<parameter name="type" type="java.lang.String">
+</parameter>
+<parameter name="value" type="java.lang.String">
+</parameter>
+</method>
+<method name="clear"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getLength"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getName"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="i" type="int">
+</parameter>
+</method>
+<method name="getType"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="i" type="int">
+</parameter>
+</method>
+<method name="getType"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+</method>
+<method name="getValue"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="i" type="int">
+</parameter>
+</method>
+<method name="getValue"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+</method>
+<method name="removeAttribute"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+</method>
+<method name="setAttributeList"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="atts" type="org.xml.sax.AttributeList">
+</parameter>
+</method>
+</class>
+<class name="AttributesImpl"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="org.xml.sax.Attributes">
+</implements>
+<constructor name="AttributesImpl"
+ type="org.xml.sax.helpers.AttributesImpl"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<constructor name="AttributesImpl"
+ type="org.xml.sax.helpers.AttributesImpl"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="atts" type="org.xml.sax.Attributes">
+</parameter>
+</constructor>
+<method name="addAttribute"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="uri" type="java.lang.String">
+</parameter>
+<parameter name="localName" type="java.lang.String">
+</parameter>
+<parameter name="qName" type="java.lang.String">
+</parameter>
+<parameter name="type" type="java.lang.String">
+</parameter>
+<parameter name="value" type="java.lang.String">
+</parameter>
+</method>
+<method name="clear"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getIndex"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="uri" type="java.lang.String">
+</parameter>
+<parameter name="localName" type="java.lang.String">
+</parameter>
+</method>
+<method name="getIndex"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="qName" type="java.lang.String">
+</parameter>
+</method>
+<method name="getLength"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getLocalName"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="index" type="int">
+</parameter>
+</method>
+<method name="getQName"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="index" type="int">
+</parameter>
+</method>
+<method name="getType"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="index" type="int">
+</parameter>
+</method>
+<method name="getType"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="uri" type="java.lang.String">
+</parameter>
+<parameter name="localName" type="java.lang.String">
+</parameter>
+</method>
+<method name="getType"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="qName" type="java.lang.String">
+</parameter>
+</method>
+<method name="getURI"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="index" type="int">
+</parameter>
+</method>
+<method name="getValue"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="index" type="int">
+</parameter>
+</method>
+<method name="getValue"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="uri" type="java.lang.String">
+</parameter>
+<parameter name="localName" type="java.lang.String">
+</parameter>
+</method>
+<method name="getValue"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="qName" type="java.lang.String">
+</parameter>
+</method>
+<method name="removeAttribute"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="index" type="int">
+</parameter>
+</method>
+<method name="setAttribute"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="index" type="int">
+</parameter>
+<parameter name="uri" type="java.lang.String">
+</parameter>
+<parameter name="localName" type="java.lang.String">
+</parameter>
+<parameter name="qName" type="java.lang.String">
+</parameter>
+<parameter name="type" type="java.lang.String">
+</parameter>
+<parameter name="value" type="java.lang.String">
+</parameter>
+</method>
+<method name="setAttributes"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="atts" type="org.xml.sax.Attributes">
+</parameter>
+</method>
+<method name="setLocalName"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="index" type="int">
+</parameter>
+<parameter name="localName" type="java.lang.String">
+</parameter>
+</method>
+<method name="setQName"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="index" type="int">
+</parameter>
+<parameter name="qName" type="java.lang.String">
+</parameter>
+</method>
+<method name="setType"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="index" type="int">
+</parameter>
+<parameter name="type" type="java.lang.String">
+</parameter>
+</method>
+<method name="setURI"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="index" type="int">
+</parameter>
+<parameter name="uri" type="java.lang.String">
+</parameter>
+</method>
+<method name="setValue"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="index" type="int">
+</parameter>
+<parameter name="value" type="java.lang.String">
+</parameter>
+</method>
+</class>
+<class name="DefaultHandler"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="org.xml.sax.ContentHandler">
+</implements>
+<implements name="org.xml.sax.DTDHandler">
+</implements>
+<implements name="org.xml.sax.EntityResolver">
+</implements>
+<implements name="org.xml.sax.ErrorHandler">
+</implements>
+<constructor name="DefaultHandler"
+ type="org.xml.sax.helpers.DefaultHandler"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<method name="characters"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="ch" type="char[]">
+</parameter>
+<parameter name="start" type="int">
+</parameter>
+<parameter name="length" type="int">
+</parameter>
+<exception name="SAXException" type="org.xml.sax.SAXException">
+</exception>
+</method>
+<method name="endDocument"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="SAXException" type="org.xml.sax.SAXException">
+</exception>
+</method>
+<method name="endElement"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="uri" type="java.lang.String">
+</parameter>
+<parameter name="localName" type="java.lang.String">
+</parameter>
+<parameter name="qName" type="java.lang.String">
+</parameter>
+<exception name="SAXException" type="org.xml.sax.SAXException">
+</exception>
+</method>
+<method name="endPrefixMapping"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="prefix" type="java.lang.String">
+</parameter>
+<exception name="SAXException" type="org.xml.sax.SAXException">
+</exception>
+</method>
+<method name="error"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="e" type="org.xml.sax.SAXParseException">
+</parameter>
+<exception name="SAXException" type="org.xml.sax.SAXException">
+</exception>
+</method>
+<method name="fatalError"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="e" type="org.xml.sax.SAXParseException">
+</parameter>
+<exception name="SAXException" type="org.xml.sax.SAXException">
+</exception>
+</method>
+<method name="ignorableWhitespace"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="ch" type="char[]">
+</parameter>
+<parameter name="start" type="int">
+</parameter>
+<parameter name="length" type="int">
+</parameter>
+<exception name="SAXException" type="org.xml.sax.SAXException">
+</exception>
+</method>
+<method name="notationDecl"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+<parameter name="publicId" type="java.lang.String">
+</parameter>
+<parameter name="systemId" type="java.lang.String">
+</parameter>
+<exception name="SAXException" type="org.xml.sax.SAXException">
+</exception>
+</method>
+<method name="processingInstruction"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="target" type="java.lang.String">
+</parameter>
+<parameter name="data" type="java.lang.String">
+</parameter>
+<exception name="SAXException" type="org.xml.sax.SAXException">
+</exception>
+</method>
+<method name="resolveEntity"
+ return="org.xml.sax.InputSource"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="publicId" type="java.lang.String">
+</parameter>
+<parameter name="systemId" type="java.lang.String">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+<exception name="SAXException" type="org.xml.sax.SAXException">
+</exception>
+</method>
+<method name="setDocumentLocator"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="locator" type="org.xml.sax.Locator">
+</parameter>
+</method>
+<method name="skippedEntity"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+<exception name="SAXException" type="org.xml.sax.SAXException">
+</exception>
+</method>
+<method name="startDocument"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="SAXException" type="org.xml.sax.SAXException">
+</exception>
+</method>
+<method name="startElement"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="uri" type="java.lang.String">
+</parameter>
+<parameter name="localName" type="java.lang.String">
+</parameter>
+<parameter name="qName" type="java.lang.String">
+</parameter>
+<parameter name="attributes" type="org.xml.sax.Attributes">
+</parameter>
+<exception name="SAXException" type="org.xml.sax.SAXException">
+</exception>
+</method>
+<method name="startPrefixMapping"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="prefix" type="java.lang.String">
+</parameter>
+<parameter name="uri" type="java.lang.String">
+</parameter>
+<exception name="SAXException" type="org.xml.sax.SAXException">
+</exception>
+</method>
+<method name="unparsedEntityDecl"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+<parameter name="publicId" type="java.lang.String">
+</parameter>
+<parameter name="systemId" type="java.lang.String">
+</parameter>
+<parameter name="notationName" type="java.lang.String">
+</parameter>
+<exception name="SAXException" type="org.xml.sax.SAXException">
+</exception>
+</method>
+<method name="warning"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="e" type="org.xml.sax.SAXParseException">
+</parameter>
+<exception name="SAXException" type="org.xml.sax.SAXException">
+</exception>
+</method>
+</class>
+<class name="LocatorImpl"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="org.xml.sax.Locator">
+</implements>
+<constructor name="LocatorImpl"
+ type="org.xml.sax.helpers.LocatorImpl"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<constructor name="LocatorImpl"
+ type="org.xml.sax.helpers.LocatorImpl"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="locator" type="org.xml.sax.Locator">
+</parameter>
+</constructor>
+<method name="getColumnNumber"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getLineNumber"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getPublicId"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getSystemId"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="setColumnNumber"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="columnNumber" type="int">
+</parameter>
+</method>
+<method name="setLineNumber"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="lineNumber" type="int">
+</parameter>
+</method>
+<method name="setPublicId"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="publicId" type="java.lang.String">
+</parameter>
+</method>
+<method name="setSystemId"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="systemId" type="java.lang.String">
+</parameter>
+</method>
+</class>
+<class name="NamespaceSupport"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="NamespaceSupport"
+ type="org.xml.sax.helpers.NamespaceSupport"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<method name="declarePrefix"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="prefix" type="java.lang.String">
+</parameter>
+<parameter name="uri" type="java.lang.String">
+</parameter>
+</method>
+<method name="getDeclaredPrefixes"
+ return="java.util.Enumeration"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getPrefix"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="uri" type="java.lang.String">
+</parameter>
+</method>
+<method name="getPrefixes"
+ return="java.util.Enumeration"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getPrefixes"
+ return="java.util.Enumeration"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="uri" type="java.lang.String">
+</parameter>
+</method>
+<method name="getURI"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="prefix" type="java.lang.String">
+</parameter>
+</method>
+<method name="isNamespaceDeclUris"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="popContext"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="processName"
+ return="java.lang.String[]"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="qName" type="java.lang.String">
+</parameter>
+<parameter name="parts" type="java.lang.String[]">
+</parameter>
+<parameter name="isAttribute" type="boolean">
+</parameter>
+</method>
+<method name="pushContext"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="reset"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="setNamespaceDeclUris"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="value" type="boolean">
+</parameter>
+</method>
+<field name="NSDECL"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;http://www.w3.org/xmlns/2000/&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="XMLNS"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;http://www.w3.org/XML/1998/namespace&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<class name="ParserAdapter"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="org.xml.sax.DocumentHandler">
+</implements>
+<implements name="org.xml.sax.XMLReader">
+</implements>
+<constructor name="ParserAdapter"
+ type="org.xml.sax.helpers.ParserAdapter"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="SAXException" type="org.xml.sax.SAXException">
+</exception>
+</constructor>
+<constructor name="ParserAdapter"
+ type="org.xml.sax.helpers.ParserAdapter"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="parser" type="org.xml.sax.Parser">
+</parameter>
+</constructor>
+<method name="characters"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="ch" type="char[]">
+</parameter>
+<parameter name="start" type="int">
+</parameter>
+<parameter name="length" type="int">
+</parameter>
+<exception name="SAXException" type="org.xml.sax.SAXException">
+</exception>
+</method>
+<method name="endDocument"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="SAXException" type="org.xml.sax.SAXException">
+</exception>
+</method>
+<method name="endElement"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="qName" type="java.lang.String">
+</parameter>
+<exception name="SAXException" type="org.xml.sax.SAXException">
+</exception>
+</method>
+<method name="getContentHandler"
+ return="org.xml.sax.ContentHandler"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getDTDHandler"
+ return="org.xml.sax.DTDHandler"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getEntityResolver"
+ return="org.xml.sax.EntityResolver"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getErrorHandler"
+ return="org.xml.sax.ErrorHandler"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getFeature"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+<exception name="SAXNotRecognizedException" type="org.xml.sax.SAXNotRecognizedException">
+</exception>
+<exception name="SAXNotSupportedException" type="org.xml.sax.SAXNotSupportedException">
+</exception>
+</method>
+<method name="getProperty"
+ return="java.lang.Object"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+<exception name="SAXNotRecognizedException" type="org.xml.sax.SAXNotRecognizedException">
+</exception>
+<exception name="SAXNotSupportedException" type="org.xml.sax.SAXNotSupportedException">
+</exception>
+</method>
+<method name="ignorableWhitespace"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="ch" type="char[]">
+</parameter>
+<parameter name="start" type="int">
+</parameter>
+<parameter name="length" type="int">
+</parameter>
+<exception name="SAXException" type="org.xml.sax.SAXException">
+</exception>
+</method>
+<method name="parse"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="systemId" type="java.lang.String">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+<exception name="SAXException" type="org.xml.sax.SAXException">
+</exception>
+</method>
+<method name="parse"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="input" type="org.xml.sax.InputSource">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+<exception name="SAXException" type="org.xml.sax.SAXException">
+</exception>
+</method>
+<method name="processingInstruction"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="target" type="java.lang.String">
+</parameter>
+<parameter name="data" type="java.lang.String">
+</parameter>
+<exception name="SAXException" type="org.xml.sax.SAXException">
+</exception>
+</method>
+<method name="setContentHandler"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="handler" type="org.xml.sax.ContentHandler">
+</parameter>
+</method>
+<method name="setDTDHandler"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="handler" type="org.xml.sax.DTDHandler">
+</parameter>
+</method>
+<method name="setDocumentLocator"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="locator" type="org.xml.sax.Locator">
+</parameter>
+</method>
+<method name="setEntityResolver"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="resolver" type="org.xml.sax.EntityResolver">
+</parameter>
+</method>
+<method name="setErrorHandler"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="handler" type="org.xml.sax.ErrorHandler">
+</parameter>
+</method>
+<method name="setFeature"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+<parameter name="value" type="boolean">
+</parameter>
+<exception name="SAXNotRecognizedException" type="org.xml.sax.SAXNotRecognizedException">
+</exception>
+<exception name="SAXNotSupportedException" type="org.xml.sax.SAXNotSupportedException">
+</exception>
+</method>
+<method name="setProperty"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+<parameter name="value" type="java.lang.Object">
+</parameter>
+<exception name="SAXNotRecognizedException" type="org.xml.sax.SAXNotRecognizedException">
+</exception>
+<exception name="SAXNotSupportedException" type="org.xml.sax.SAXNotSupportedException">
+</exception>
+</method>
+<method name="startDocument"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="SAXException" type="org.xml.sax.SAXException">
+</exception>
+</method>
+<method name="startElement"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="qName" type="java.lang.String">
+</parameter>
+<parameter name="qAtts" type="org.xml.sax.AttributeList">
+</parameter>
+<exception name="SAXException" type="org.xml.sax.SAXException">
+</exception>
+</method>
+</class>
+<class name="ParserFactory"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="deprecated"
+ visibility="public"
+>
+<method name="makeParser"
+ return="org.xml.sax.Parser"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="ClassCastException" type="java.lang.ClassCastException">
+</exception>
+<exception name="ClassNotFoundException" type="java.lang.ClassNotFoundException">
+</exception>
+<exception name="IllegalAccessException" type="java.lang.IllegalAccessException">
+</exception>
+<exception name="InstantiationException" type="java.lang.InstantiationException">
+</exception>
+<exception name="NullPointerException" type="java.lang.NullPointerException">
+</exception>
+</method>
+<method name="makeParser"
+ return="org.xml.sax.Parser"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="className" type="java.lang.String">
+</parameter>
+<exception name="ClassCastException" type="java.lang.ClassCastException">
+</exception>
+<exception name="ClassNotFoundException" type="java.lang.ClassNotFoundException">
+</exception>
+<exception name="IllegalAccessException" type="java.lang.IllegalAccessException">
+</exception>
+<exception name="InstantiationException" type="java.lang.InstantiationException">
+</exception>
+</method>
+</class>
+<class name="XMLFilterImpl"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="org.xml.sax.ContentHandler">
+</implements>
+<implements name="org.xml.sax.DTDHandler">
+</implements>
+<implements name="org.xml.sax.EntityResolver">
+</implements>
+<implements name="org.xml.sax.ErrorHandler">
+</implements>
+<implements name="org.xml.sax.XMLFilter">
+</implements>
+<constructor name="XMLFilterImpl"
+ type="org.xml.sax.helpers.XMLFilterImpl"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<constructor name="XMLFilterImpl"
+ type="org.xml.sax.helpers.XMLFilterImpl"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="parent" type="org.xml.sax.XMLReader">
+</parameter>
+</constructor>
+<method name="characters"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="ch" type="char[]">
+</parameter>
+<parameter name="start" type="int">
+</parameter>
+<parameter name="length" type="int">
+</parameter>
+<exception name="SAXException" type="org.xml.sax.SAXException">
+</exception>
+</method>
+<method name="endDocument"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="SAXException" type="org.xml.sax.SAXException">
+</exception>
+</method>
+<method name="endElement"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="uri" type="java.lang.String">
+</parameter>
+<parameter name="localName" type="java.lang.String">
+</parameter>
+<parameter name="qName" type="java.lang.String">
+</parameter>
+<exception name="SAXException" type="org.xml.sax.SAXException">
+</exception>
+</method>
+<method name="endPrefixMapping"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="prefix" type="java.lang.String">
+</parameter>
+<exception name="SAXException" type="org.xml.sax.SAXException">
+</exception>
+</method>
+<method name="error"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="e" type="org.xml.sax.SAXParseException">
+</parameter>
+<exception name="SAXException" type="org.xml.sax.SAXException">
+</exception>
+</method>
+<method name="fatalError"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="e" type="org.xml.sax.SAXParseException">
+</parameter>
+<exception name="SAXException" type="org.xml.sax.SAXException">
+</exception>
+</method>
+<method name="getContentHandler"
+ return="org.xml.sax.ContentHandler"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getDTDHandler"
+ return="org.xml.sax.DTDHandler"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getEntityResolver"
+ return="org.xml.sax.EntityResolver"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getErrorHandler"
+ return="org.xml.sax.ErrorHandler"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getFeature"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+<exception name="SAXNotRecognizedException" type="org.xml.sax.SAXNotRecognizedException">
+</exception>
+<exception name="SAXNotSupportedException" type="org.xml.sax.SAXNotSupportedException">
+</exception>
+</method>
+<method name="getParent"
+ return="org.xml.sax.XMLReader"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getProperty"
+ return="java.lang.Object"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+<exception name="SAXNotRecognizedException" type="org.xml.sax.SAXNotRecognizedException">
+</exception>
+<exception name="SAXNotSupportedException" type="org.xml.sax.SAXNotSupportedException">
+</exception>
+</method>
+<method name="ignorableWhitespace"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="ch" type="char[]">
+</parameter>
+<parameter name="start" type="int">
+</parameter>
+<parameter name="length" type="int">
+</parameter>
+<exception name="SAXException" type="org.xml.sax.SAXException">
+</exception>
+</method>
+<method name="notationDecl"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+<parameter name="publicId" type="java.lang.String">
+</parameter>
+<parameter name="systemId" type="java.lang.String">
+</parameter>
+<exception name="SAXException" type="org.xml.sax.SAXException">
+</exception>
+</method>
+<method name="parse"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="input" type="org.xml.sax.InputSource">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+<exception name="SAXException" type="org.xml.sax.SAXException">
+</exception>
+</method>
+<method name="parse"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="systemId" type="java.lang.String">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+<exception name="SAXException" type="org.xml.sax.SAXException">
+</exception>
+</method>
+<method name="processingInstruction"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="target" type="java.lang.String">
+</parameter>
+<parameter name="data" type="java.lang.String">
+</parameter>
+<exception name="SAXException" type="org.xml.sax.SAXException">
+</exception>
+</method>
+<method name="resolveEntity"
+ return="org.xml.sax.InputSource"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="publicId" type="java.lang.String">
+</parameter>
+<parameter name="systemId" type="java.lang.String">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+<exception name="SAXException" type="org.xml.sax.SAXException">
+</exception>
+</method>
+<method name="setContentHandler"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="handler" type="org.xml.sax.ContentHandler">
+</parameter>
+</method>
+<method name="setDTDHandler"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="handler" type="org.xml.sax.DTDHandler">
+</parameter>
+</method>
+<method name="setDocumentLocator"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="locator" type="org.xml.sax.Locator">
+</parameter>
+</method>
+<method name="setEntityResolver"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="resolver" type="org.xml.sax.EntityResolver">
+</parameter>
+</method>
+<method name="setErrorHandler"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="handler" type="org.xml.sax.ErrorHandler">
+</parameter>
+</method>
+<method name="setFeature"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+<parameter name="value" type="boolean">
+</parameter>
+<exception name="SAXNotRecognizedException" type="org.xml.sax.SAXNotRecognizedException">
+</exception>
+<exception name="SAXNotSupportedException" type="org.xml.sax.SAXNotSupportedException">
+</exception>
+</method>
+<method name="setParent"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="parent" type="org.xml.sax.XMLReader">
+</parameter>
+</method>
+<method name="setProperty"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+<parameter name="value" type="java.lang.Object">
+</parameter>
+<exception name="SAXNotRecognizedException" type="org.xml.sax.SAXNotRecognizedException">
+</exception>
+<exception name="SAXNotSupportedException" type="org.xml.sax.SAXNotSupportedException">
+</exception>
+</method>
+<method name="skippedEntity"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+<exception name="SAXException" type="org.xml.sax.SAXException">
+</exception>
+</method>
+<method name="startDocument"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="SAXException" type="org.xml.sax.SAXException">
+</exception>
+</method>
+<method name="startElement"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="uri" type="java.lang.String">
+</parameter>
+<parameter name="localName" type="java.lang.String">
+</parameter>
+<parameter name="qName" type="java.lang.String">
+</parameter>
+<parameter name="atts" type="org.xml.sax.Attributes">
+</parameter>
+<exception name="SAXException" type="org.xml.sax.SAXException">
+</exception>
+</method>
+<method name="startPrefixMapping"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="prefix" type="java.lang.String">
+</parameter>
+<parameter name="uri" type="java.lang.String">
+</parameter>
+<exception name="SAXException" type="org.xml.sax.SAXException">
+</exception>
+</method>
+<method name="unparsedEntityDecl"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+<parameter name="publicId" type="java.lang.String">
+</parameter>
+<parameter name="systemId" type="java.lang.String">
+</parameter>
+<parameter name="notationName" type="java.lang.String">
+</parameter>
+<exception name="SAXException" type="org.xml.sax.SAXException">
+</exception>
+</method>
+<method name="warning"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="e" type="org.xml.sax.SAXParseException">
+</parameter>
+<exception name="SAXException" type="org.xml.sax.SAXException">
+</exception>
+</method>
+</class>
+<class name="XMLReaderAdapter"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="org.xml.sax.ContentHandler">
+</implements>
+<implements name="org.xml.sax.Parser">
+</implements>
+<constructor name="XMLReaderAdapter"
+ type="org.xml.sax.helpers.XMLReaderAdapter"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="SAXException" type="org.xml.sax.SAXException">
+</exception>
+</constructor>
+<constructor name="XMLReaderAdapter"
+ type="org.xml.sax.helpers.XMLReaderAdapter"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="xmlReader" type="org.xml.sax.XMLReader">
+</parameter>
+</constructor>
+<method name="characters"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="ch" type="char[]">
+</parameter>
+<parameter name="start" type="int">
+</parameter>
+<parameter name="length" type="int">
+</parameter>
+<exception name="SAXException" type="org.xml.sax.SAXException">
+</exception>
+</method>
+<method name="endDocument"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="SAXException" type="org.xml.sax.SAXException">
+</exception>
+</method>
+<method name="endElement"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="uri" type="java.lang.String">
+</parameter>
+<parameter name="localName" type="java.lang.String">
+</parameter>
+<parameter name="qName" type="java.lang.String">
+</parameter>
+<exception name="SAXException" type="org.xml.sax.SAXException">
+</exception>
+</method>
+<method name="endPrefixMapping"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="prefix" type="java.lang.String">
+</parameter>
+</method>
+<method name="ignorableWhitespace"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="ch" type="char[]">
+</parameter>
+<parameter name="start" type="int">
+</parameter>
+<parameter name="length" type="int">
+</parameter>
+<exception name="SAXException" type="org.xml.sax.SAXException">
+</exception>
+</method>
+<method name="parse"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="systemId" type="java.lang.String">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+<exception name="SAXException" type="org.xml.sax.SAXException">
+</exception>
+</method>
+<method name="parse"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="input" type="org.xml.sax.InputSource">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+<exception name="SAXException" type="org.xml.sax.SAXException">
+</exception>
+</method>
+<method name="processingInstruction"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="target" type="java.lang.String">
+</parameter>
+<parameter name="data" type="java.lang.String">
+</parameter>
+<exception name="SAXException" type="org.xml.sax.SAXException">
+</exception>
+</method>
+<method name="setDTDHandler"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="handler" type="org.xml.sax.DTDHandler">
+</parameter>
+</method>
+<method name="setDocumentHandler"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="handler" type="org.xml.sax.DocumentHandler">
+</parameter>
+</method>
+<method name="setDocumentLocator"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="locator" type="org.xml.sax.Locator">
+</parameter>
+</method>
+<method name="setEntityResolver"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="resolver" type="org.xml.sax.EntityResolver">
+</parameter>
+</method>
+<method name="setErrorHandler"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="handler" type="org.xml.sax.ErrorHandler">
+</parameter>
+</method>
+<method name="setLocale"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="locale" type="java.util.Locale">
+</parameter>
+<exception name="SAXException" type="org.xml.sax.SAXException">
+</exception>
+</method>
+<method name="skippedEntity"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+<exception name="SAXException" type="org.xml.sax.SAXException">
+</exception>
+</method>
+<method name="startDocument"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="SAXException" type="org.xml.sax.SAXException">
+</exception>
+</method>
+<method name="startElement"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="uri" type="java.lang.String">
+</parameter>
+<parameter name="localName" type="java.lang.String">
+</parameter>
+<parameter name="qName" type="java.lang.String">
+</parameter>
+<parameter name="atts" type="org.xml.sax.Attributes">
+</parameter>
+<exception name="SAXException" type="org.xml.sax.SAXException">
+</exception>
+</method>
+<method name="startPrefixMapping"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="prefix" type="java.lang.String">
+</parameter>
+<parameter name="uri" type="java.lang.String">
+</parameter>
+</method>
+</class>
+<class name="XMLReaderFactory"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="createXMLReader"
+ return="org.xml.sax.XMLReader"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="SAXException" type="org.xml.sax.SAXException">
+</exception>
+</method>
+<method name="createXMLReader"
+ return="org.xml.sax.XMLReader"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="className" type="java.lang.String">
+</parameter>
+<exception name="SAXException" type="org.xml.sax.SAXException">
+</exception>
+</method>
+</class>
+</package>
+<package name="org.xmlpull.v1"
+>
+<interface name="XmlPullParser"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="defineEntityReplacementText"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="entityName" type="java.lang.String">
+</parameter>
+<parameter name="replacementText" type="java.lang.String">
+</parameter>
+<exception name="XmlPullParserException" type="org.xmlpull.v1.XmlPullParserException">
+</exception>
+</method>
+<method name="getAttributeCount"
+ return="int"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getAttributeName"
+ return="java.lang.String"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="index" type="int">
+</parameter>
+</method>
+<method name="getAttributeNamespace"
+ return="java.lang.String"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="index" type="int">
+</parameter>
+</method>
+<method name="getAttributePrefix"
+ return="java.lang.String"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="index" type="int">
+</parameter>
+</method>
+<method name="getAttributeType"
+ return="java.lang.String"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="index" type="int">
+</parameter>
+</method>
+<method name="getAttributeValue"
+ return="java.lang.String"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="index" type="int">
+</parameter>
+</method>
+<method name="getAttributeValue"
+ return="java.lang.String"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="namespace" type="java.lang.String">
+</parameter>
+<parameter name="name" type="java.lang.String">
+</parameter>
+</method>
+<method name="getColumnNumber"
+ return="int"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getDepth"
+ return="int"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getEventType"
+ return="int"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="XmlPullParserException" type="org.xmlpull.v1.XmlPullParserException">
+</exception>
+</method>
+<method name="getFeature"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+</method>
+<method name="getInputEncoding"
+ return="java.lang.String"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getLineNumber"
+ return="int"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getName"
+ return="java.lang.String"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getNamespace"
+ return="java.lang.String"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="prefix" type="java.lang.String">
+</parameter>
+</method>
+<method name="getNamespace"
+ return="java.lang.String"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getNamespaceCount"
+ return="int"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="depth" type="int">
+</parameter>
+<exception name="XmlPullParserException" type="org.xmlpull.v1.XmlPullParserException">
+</exception>
+</method>
+<method name="getNamespacePrefix"
+ return="java.lang.String"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="pos" type="int">
+</parameter>
+<exception name="XmlPullParserException" type="org.xmlpull.v1.XmlPullParserException">
+</exception>
+</method>
+<method name="getNamespaceUri"
+ return="java.lang.String"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="pos" type="int">
+</parameter>
+<exception name="XmlPullParserException" type="org.xmlpull.v1.XmlPullParserException">
+</exception>
+</method>
+<method name="getPositionDescription"
+ return="java.lang.String"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getPrefix"
+ return="java.lang.String"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getProperty"
+ return="java.lang.Object"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+</method>
+<method name="getText"
+ return="java.lang.String"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getTextCharacters"
+ return="char[]"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="holderForStartAndLength" type="int[]">
+</parameter>
+</method>
+<method name="isAttributeDefault"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="index" type="int">
+</parameter>
+</method>
+<method name="isEmptyElementTag"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="XmlPullParserException" type="org.xmlpull.v1.XmlPullParserException">
+</exception>
+</method>
+<method name="isWhitespace"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="XmlPullParserException" type="org.xmlpull.v1.XmlPullParserException">
+</exception>
+</method>
+<method name="next"
+ return="int"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+<exception name="XmlPullParserException" type="org.xmlpull.v1.XmlPullParserException">
+</exception>
+</method>
+<method name="nextTag"
+ return="int"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+<exception name="XmlPullParserException" type="org.xmlpull.v1.XmlPullParserException">
+</exception>
+</method>
+<method name="nextText"
+ return="java.lang.String"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+<exception name="XmlPullParserException" type="org.xmlpull.v1.XmlPullParserException">
+</exception>
+</method>
+<method name="nextToken"
+ return="int"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+<exception name="XmlPullParserException" type="org.xmlpull.v1.XmlPullParserException">
+</exception>
+</method>
+<method name="require"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="type" type="int">
+</parameter>
+<parameter name="namespace" type="java.lang.String">
+</parameter>
+<parameter name="name" type="java.lang.String">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+<exception name="XmlPullParserException" type="org.xmlpull.v1.XmlPullParserException">
+</exception>
+</method>
+<method name="setFeature"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+<parameter name="state" type="boolean">
+</parameter>
+<exception name="XmlPullParserException" type="org.xmlpull.v1.XmlPullParserException">
+</exception>
+</method>
+<method name="setInput"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="in" type="java.io.Reader">
+</parameter>
+<exception name="XmlPullParserException" type="org.xmlpull.v1.XmlPullParserException">
+</exception>
+</method>
+<method name="setInput"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="inputStream" type="java.io.InputStream">
+</parameter>
+<parameter name="inputEncoding" type="java.lang.String">
+</parameter>
+<exception name="XmlPullParserException" type="org.xmlpull.v1.XmlPullParserException">
+</exception>
+</method>
+<method name="setProperty"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+<parameter name="value" type="java.lang.Object">
+</parameter>
+<exception name="XmlPullParserException" type="org.xmlpull.v1.XmlPullParserException">
+</exception>
+</method>
+<field name="CDSECT"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="5"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="COMMENT"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="9"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="DOCDECL"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="10"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="END_DOCUMENT"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="END_TAG"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="3"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ENTITY_REF"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="6"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="FEATURE_PROCESS_DOCDECL"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;http://xmlpull.org/v1/doc/features.html#process-docdecl&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="FEATURE_PROCESS_NAMESPACES"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;http://xmlpull.org/v1/doc/features.html#process-namespaces&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="FEATURE_REPORT_NAMESPACE_ATTRIBUTES"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;http://xmlpull.org/v1/doc/features.html#report-namespace-prefixes&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="FEATURE_VALIDATION"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;http://xmlpull.org/v1/doc/features.html#validation&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="IGNORABLE_WHITESPACE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="7"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="NO_NAMESPACE"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="PROCESSING_INSTRUCTION"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="8"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="START_DOCUMENT"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="0"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="START_TAG"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TEXT"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="4"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TYPES"
+ type="java.lang.String[]"
+ transient="false"
+ volatile="false"
+ value="null"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</interface>
+<class name="XmlPullParserException"
+ extends="java.lang.Exception"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="XmlPullParserException"
+ type="org.xmlpull.v1.XmlPullParserException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="s" type="java.lang.String">
+</parameter>
+</constructor>
+<constructor name="XmlPullParserException"
+ type="org.xmlpull.v1.XmlPullParserException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="msg" type="java.lang.String">
+</parameter>
+<parameter name="parser" type="org.xmlpull.v1.XmlPullParser">
+</parameter>
+<parameter name="chain" type="java.lang.Throwable">
+</parameter>
+</constructor>
+<method name="getColumnNumber"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getDetail"
+ return="java.lang.Throwable"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getLineNumber"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<field name="column"
+ type="int"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</field>
+<field name="detail"
+ type="java.lang.Throwable"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</field>
+<field name="row"
+ type="int"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</field>
+</class>
+<class name="XmlPullParserFactory"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="XmlPullParserFactory"
+ type="org.xmlpull.v1.XmlPullParserFactory"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</constructor>
+<method name="getFeature"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+</method>
+<method name="isNamespaceAware"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isValidating"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="newInstance"
+ return="org.xmlpull.v1.XmlPullParserFactory"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="XmlPullParserException" type="org.xmlpull.v1.XmlPullParserException">
+</exception>
+</method>
+<method name="newInstance"
+ return="org.xmlpull.v1.XmlPullParserFactory"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="classNames" type="java.lang.String">
+</parameter>
+<parameter name="context" type="java.lang.Class">
+</parameter>
+<exception name="XmlPullParserException" type="org.xmlpull.v1.XmlPullParserException">
+</exception>
+</method>
+<method name="newPullParser"
+ return="org.xmlpull.v1.XmlPullParser"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="XmlPullParserException" type="org.xmlpull.v1.XmlPullParserException">
+</exception>
+</method>
+<method name="newSerializer"
+ return="org.xmlpull.v1.XmlSerializer"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="XmlPullParserException" type="org.xmlpull.v1.XmlPullParserException">
+</exception>
+</method>
+<method name="setFeature"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+<parameter name="state" type="boolean">
+</parameter>
+<exception name="XmlPullParserException" type="org.xmlpull.v1.XmlPullParserException">
+</exception>
+</method>
+<method name="setNamespaceAware"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="awareness" type="boolean">
+</parameter>
+</method>
+<method name="setValidating"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="validating" type="boolean">
+</parameter>
+</method>
+<field name="PROPERTY_NAME"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;org.xmlpull.v1.XmlPullParserFactory&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="classNamesLocation"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</field>
+<field name="features"
+ type="java.util.HashMap"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</field>
+<field name="parserClasses"
+ type="java.util.ArrayList"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</field>
+<field name="serializerClasses"
+ type="java.util.ArrayList"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</field>
+</class>
+<interface name="XmlSerializer"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="attribute"
+ return="org.xmlpull.v1.XmlSerializer"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="namespace" type="java.lang.String">
+</parameter>
+<parameter name="name" type="java.lang.String">
+</parameter>
+<parameter name="value" type="java.lang.String">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+<exception name="IllegalArgumentException" type="java.lang.IllegalArgumentException">
+</exception>
+<exception name="IllegalStateException" type="java.lang.IllegalStateException">
+</exception>
+</method>
+<method name="cdsect"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="text" type="java.lang.String">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+<exception name="IllegalArgumentException" type="java.lang.IllegalArgumentException">
+</exception>
+<exception name="IllegalStateException" type="java.lang.IllegalStateException">
+</exception>
+</method>
+<method name="comment"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="text" type="java.lang.String">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+<exception name="IllegalArgumentException" type="java.lang.IllegalArgumentException">
+</exception>
+<exception name="IllegalStateException" type="java.lang.IllegalStateException">
+</exception>
+</method>
+<method name="docdecl"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="text" type="java.lang.String">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+<exception name="IllegalArgumentException" type="java.lang.IllegalArgumentException">
+</exception>
+<exception name="IllegalStateException" type="java.lang.IllegalStateException">
+</exception>
+</method>
+<method name="endDocument"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+<exception name="IllegalArgumentException" type="java.lang.IllegalArgumentException">
+</exception>
+<exception name="IllegalStateException" type="java.lang.IllegalStateException">
+</exception>
+</method>
+<method name="endTag"
+ return="org.xmlpull.v1.XmlSerializer"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="namespace" type="java.lang.String">
+</parameter>
+<parameter name="name" type="java.lang.String">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+<exception name="IllegalArgumentException" type="java.lang.IllegalArgumentException">
+</exception>
+<exception name="IllegalStateException" type="java.lang.IllegalStateException">
+</exception>
+</method>
+<method name="entityRef"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="text" type="java.lang.String">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+<exception name="IllegalArgumentException" type="java.lang.IllegalArgumentException">
+</exception>
+<exception name="IllegalStateException" type="java.lang.IllegalStateException">
+</exception>
+</method>
+<method name="flush"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="getDepth"
+ return="int"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getFeature"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+</method>
+<method name="getName"
+ return="java.lang.String"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getNamespace"
+ return="java.lang.String"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getPrefix"
+ return="java.lang.String"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="namespace" type="java.lang.String">
+</parameter>
+<parameter name="generatePrefix" type="boolean">
+</parameter>
+<exception name="IllegalArgumentException" type="java.lang.IllegalArgumentException">
+</exception>
+</method>
+<method name="getProperty"
+ return="java.lang.Object"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+</method>
+<method name="ignorableWhitespace"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="text" type="java.lang.String">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+<exception name="IllegalArgumentException" type="java.lang.IllegalArgumentException">
+</exception>
+<exception name="IllegalStateException" type="java.lang.IllegalStateException">
+</exception>
+</method>
+<method name="processingInstruction"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="text" type="java.lang.String">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+<exception name="IllegalArgumentException" type="java.lang.IllegalArgumentException">
+</exception>
+<exception name="IllegalStateException" type="java.lang.IllegalStateException">
+</exception>
+</method>
+<method name="setFeature"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+<parameter name="state" type="boolean">
+</parameter>
+<exception name="IllegalArgumentException" type="java.lang.IllegalArgumentException">
+</exception>
+<exception name="IllegalStateException" type="java.lang.IllegalStateException">
+</exception>
+</method>
+<method name="setOutput"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="os" type="java.io.OutputStream">
+</parameter>
+<parameter name="encoding" type="java.lang.String">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+<exception name="IllegalArgumentException" type="java.lang.IllegalArgumentException">
+</exception>
+<exception name="IllegalStateException" type="java.lang.IllegalStateException">
+</exception>
+</method>
+<method name="setOutput"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="writer" type="java.io.Writer">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+<exception name="IllegalArgumentException" type="java.lang.IllegalArgumentException">
+</exception>
+<exception name="IllegalStateException" type="java.lang.IllegalStateException">
+</exception>
+</method>
+<method name="setPrefix"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="prefix" type="java.lang.String">
+</parameter>
+<parameter name="namespace" type="java.lang.String">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+<exception name="IllegalArgumentException" type="java.lang.IllegalArgumentException">
+</exception>
+<exception name="IllegalStateException" type="java.lang.IllegalStateException">
+</exception>
+</method>
+<method name="setProperty"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+<parameter name="value" type="java.lang.Object">
+</parameter>
+<exception name="IllegalArgumentException" type="java.lang.IllegalArgumentException">
+</exception>
+<exception name="IllegalStateException" type="java.lang.IllegalStateException">
+</exception>
+</method>
+<method name="startDocument"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="encoding" type="java.lang.String">
+</parameter>
+<parameter name="standalone" type="java.lang.Boolean">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+<exception name="IllegalArgumentException" type="java.lang.IllegalArgumentException">
+</exception>
+<exception name="IllegalStateException" type="java.lang.IllegalStateException">
+</exception>
+</method>
+<method name="startTag"
+ return="org.xmlpull.v1.XmlSerializer"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="namespace" type="java.lang.String">
+</parameter>
+<parameter name="name" type="java.lang.String">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+<exception name="IllegalArgumentException" type="java.lang.IllegalArgumentException">
+</exception>
+<exception name="IllegalStateException" type="java.lang.IllegalStateException">
+</exception>
+</method>
+<method name="text"
+ return="org.xmlpull.v1.XmlSerializer"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="text" type="java.lang.String">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+<exception name="IllegalArgumentException" type="java.lang.IllegalArgumentException">
+</exception>
+<exception name="IllegalStateException" type="java.lang.IllegalStateException">
+</exception>
+</method>
+<method name="text"
+ return="org.xmlpull.v1.XmlSerializer"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="buf" type="char[]">
+</parameter>
+<parameter name="start" type="int">
+</parameter>
+<parameter name="len" type="int">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+<exception name="IllegalArgumentException" type="java.lang.IllegalArgumentException">
+</exception>
+<exception name="IllegalStateException" type="java.lang.IllegalStateException">
+</exception>
+</method>
+</interface>
+</package>
+<package name="org.xmlpull.v1.sax2"
+>
+<class name="Driver"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="org.xml.sax.Attributes">
+</implements>
+<implements name="org.xml.sax.Locator">
+</implements>
+<implements name="org.xml.sax.XMLReader">
+</implements>
+<constructor name="Driver"
+ type="org.xmlpull.v1.sax2.Driver"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<exception name="XmlPullParserException" type="org.xmlpull.v1.XmlPullParserException">
+</exception>
+</constructor>
+<constructor name="Driver"
+ type="org.xmlpull.v1.sax2.Driver"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="pp" type="org.xmlpull.v1.XmlPullParser">
+</parameter>
+<exception name="XmlPullParserException" type="org.xmlpull.v1.XmlPullParserException">
+</exception>
+</constructor>
+<method name="getColumnNumber"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getContentHandler"
+ return="org.xml.sax.ContentHandler"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getDTDHandler"
+ return="org.xml.sax.DTDHandler"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getEntityResolver"
+ return="org.xml.sax.EntityResolver"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getErrorHandler"
+ return="org.xml.sax.ErrorHandler"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getFeature"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+<exception name="SAXNotRecognizedException" type="org.xml.sax.SAXNotRecognizedException">
+</exception>
+<exception name="SAXNotSupportedException" type="org.xml.sax.SAXNotSupportedException">
+</exception>
+</method>
+<method name="getIndex"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="uri" type="java.lang.String">
+</parameter>
+<parameter name="localName" type="java.lang.String">
+</parameter>
+</method>
+<method name="getIndex"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="qName" type="java.lang.String">
+</parameter>
+</method>
+<method name="getLength"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getLineNumber"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getLocalName"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="index" type="int">
+</parameter>
+</method>
+<method name="getProperty"
+ return="java.lang.Object"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+<exception name="SAXNotRecognizedException" type="org.xml.sax.SAXNotRecognizedException">
+</exception>
+<exception name="SAXNotSupportedException" type="org.xml.sax.SAXNotSupportedException">
+</exception>
+</method>
+<method name="getPublicId"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getQName"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="index" type="int">
+</parameter>
+</method>
+<method name="getSystemId"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getType"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="index" type="int">
+</parameter>
+</method>
+<method name="getType"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="uri" type="java.lang.String">
+</parameter>
+<parameter name="localName" type="java.lang.String">
+</parameter>
+</method>
+<method name="getType"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="qName" type="java.lang.String">
+</parameter>
+</method>
+<method name="getURI"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="index" type="int">
+</parameter>
+</method>
+<method name="getValue"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="index" type="int">
+</parameter>
+</method>
+<method name="getValue"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="uri" type="java.lang.String">
+</parameter>
+<parameter name="localName" type="java.lang.String">
+</parameter>
+</method>
+<method name="getValue"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="qName" type="java.lang.String">
+</parameter>
+</method>
+<method name="parse"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="source" type="org.xml.sax.InputSource">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+<exception name="SAXException" type="org.xml.sax.SAXException">
+</exception>
+</method>
+<method name="parse"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="systemId" type="java.lang.String">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+<exception name="SAXException" type="org.xml.sax.SAXException">
+</exception>
+</method>
+<method name="parseSubTree"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="pp" type="org.xmlpull.v1.XmlPullParser">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+<exception name="SAXException" type="org.xml.sax.SAXException">
+</exception>
+</method>
+<method name="setContentHandler"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="handler" type="org.xml.sax.ContentHandler">
+</parameter>
+</method>
+<method name="setDTDHandler"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="handler" type="org.xml.sax.DTDHandler">
+</parameter>
+</method>
+<method name="setEntityResolver"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="resolver" type="org.xml.sax.EntityResolver">
+</parameter>
+</method>
+<method name="setErrorHandler"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="handler" type="org.xml.sax.ErrorHandler">
+</parameter>
+</method>
+<method name="setFeature"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+<parameter name="value" type="boolean">
+</parameter>
+<exception name="SAXNotRecognizedException" type="org.xml.sax.SAXNotRecognizedException">
+</exception>
+<exception name="SAXNotSupportedException" type="org.xml.sax.SAXNotSupportedException">
+</exception>
+</method>
+<method name="setProperty"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+<parameter name="value" type="java.lang.Object">
+</parameter>
+<exception name="SAXNotRecognizedException" type="org.xml.sax.SAXNotRecognizedException">
+</exception>
+<exception name="SAXNotSupportedException" type="org.xml.sax.SAXNotSupportedException">
+</exception>
+</method>
+<method name="startElement"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="namespace" type="java.lang.String">
+</parameter>
+<parameter name="localName" type="java.lang.String">
+</parameter>
+<parameter name="qName" type="java.lang.String">
+</parameter>
+<exception name="SAXException" type="org.xml.sax.SAXException">
+</exception>
+</method>
+<field name="APACHE_DYNAMIC_VALIDATION_FEATURE"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;http://apache.org/xml/features/validation/dynamic&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</field>
+<field name="APACHE_SCHEMA_VALIDATION_FEATURE"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;http://apache.org/xml/features/validation/schema&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</field>
+<field name="DECLARATION_HANDLER_PROPERTY"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;http://xml.org/sax/properties/declaration-handler&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</field>
+<field name="LEXICAL_HANDLER_PROPERTY"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;http://xml.org/sax/properties/lexical-handler&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</field>
+<field name="NAMESPACES_FEATURE"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;http://xml.org/sax/features/namespaces&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</field>
+<field name="NAMESPACE_PREFIXES_FEATURE"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;http://xml.org/sax/features/namespace-prefixes&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</field>
+<field name="VALIDATION_FEATURE"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;http://xml.org/sax/features/validation&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</field>
+<field name="contentHandler"
+ type="org.xml.sax.ContentHandler"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</field>
+<field name="errorHandler"
+ type="org.xml.sax.ErrorHandler"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</field>
+<field name="pp"
+ type="org.xmlpull.v1.XmlPullParser"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</field>
+<field name="systemId"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</field>
+</class>
+</package>
+</api>
diff --git a/api/current.xml b/api/current.xml
index 9d259f3..5070e04 100644
--- a/api/current.xml
+++ b/api/current.xml
@@ -1559,6 +1559,226 @@
  visibility="public"
 >
 </field>
+<field name="kraken_resource_pad1"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="17432608"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="kraken_resource_pad10"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="17432599"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="kraken_resource_pad11"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="17432598"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="kraken_resource_pad12"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="17432597"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="kraken_resource_pad13"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="17432596"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="kraken_resource_pad14"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="17432595"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="kraken_resource_pad15"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="17432594"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="kraken_resource_pad16"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="17432593"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="kraken_resource_pad17"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="17432592"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="kraken_resource_pad18"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="17432591"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="kraken_resource_pad19"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="17432590"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="kraken_resource_pad2"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="17432607"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="kraken_resource_pad20"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="17432589"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="kraken_resource_pad3"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="17432606"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="kraken_resource_pad4"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="17432605"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="kraken_resource_pad5"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="17432604"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="kraken_resource_pad6"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="17432603"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="kraken_resource_pad7"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="17432602"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="kraken_resource_pad8"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="17432601"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="kraken_resource_pad9"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="17432600"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
 <field name="linear_interpolator"
  type="int"
  transient="false"
@@ -1642,6 +1862,138 @@
  visibility="public"
 >
 </field>
+<field name="kraken_resource_pad1"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="17235984"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="kraken_resource_pad10"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="17235975"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="kraken_resource_pad11"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="17235974"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="kraken_resource_pad12"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="17235973"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="kraken_resource_pad2"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="17235983"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="kraken_resource_pad3"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="17235982"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="kraken_resource_pad4"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="17235981"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="kraken_resource_pad5"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="17235980"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="kraken_resource_pad6"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="17235979"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="kraken_resource_pad7"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="17235978"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="kraken_resource_pad8"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="17235977"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="kraken_resource_pad9"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="17235976"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
 <field name="organizationTypes"
  type="int"
  transient="false"
@@ -4156,6 +4508,17 @@
  visibility="public"
 >
 </field>
+<field name="heavyWeight"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843456"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
 <field name="height"
  type="int"
  transient="false"
@@ -4354,6 +4717,17 @@
  visibility="public"
 >
 </field>
+<field name="immersive"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843457"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
 <field name="inAnimation"
  type="int"
  transient="false"
@@ -4893,6 +5267,699 @@
  visibility="public"
 >
 </field>
+<field name="kraken_resource_pad1"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843520"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="kraken_resource_pad10"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843511"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="kraken_resource_pad11"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843510"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="kraken_resource_pad12"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843509"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="kraken_resource_pad13"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843508"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="kraken_resource_pad14"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843507"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="kraken_resource_pad15"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843506"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="kraken_resource_pad16"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843505"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="kraken_resource_pad17"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843504"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="kraken_resource_pad18"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843503"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="kraken_resource_pad19"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843502"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="kraken_resource_pad2"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843519"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="kraken_resource_pad20"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843501"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="kraken_resource_pad21"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843500"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="kraken_resource_pad22"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843499"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="kraken_resource_pad23"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843498"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="kraken_resource_pad24"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843497"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="kraken_resource_pad25"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843496"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="kraken_resource_pad26"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843495"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="kraken_resource_pad27"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843494"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="kraken_resource_pad28"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843493"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="kraken_resource_pad29"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843492"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="kraken_resource_pad3"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843518"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="kraken_resource_pad30"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843491"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="kraken_resource_pad31"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843490"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="kraken_resource_pad32"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843489"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="kraken_resource_pad33"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843488"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="kraken_resource_pad34"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843487"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="kraken_resource_pad35"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843486"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="kraken_resource_pad36"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843485"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="kraken_resource_pad37"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843484"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="kraken_resource_pad38"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843483"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="kraken_resource_pad39"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843482"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="kraken_resource_pad4"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843517"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="kraken_resource_pad40"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843481"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="kraken_resource_pad41"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843480"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="kraken_resource_pad42"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843479"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="kraken_resource_pad43"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843478"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="kraken_resource_pad44"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843477"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="kraken_resource_pad45"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843476"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="kraken_resource_pad46"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843475"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="kraken_resource_pad47"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843474"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="kraken_resource_pad48"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843473"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="kraken_resource_pad49"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843472"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="kraken_resource_pad5"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843516"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="kraken_resource_pad50"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843471"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="kraken_resource_pad51"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843470"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="kraken_resource_pad52"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843469"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="kraken_resource_pad53"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843468"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="kraken_resource_pad54"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843467"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="kraken_resource_pad55"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843466"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="kraken_resource_pad56"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843465"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="kraken_resource_pad57"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843464"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="kraken_resource_pad58"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843463"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="kraken_resource_pad59"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843462"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="kraken_resource_pad6"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843515"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="kraken_resource_pad60"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843461"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="kraken_resource_pad61"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843460"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="kraken_resource_pad62"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843459"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="kraken_resource_pad63"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843458"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="kraken_resource_pad7"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843514"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="kraken_resource_pad8"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843513"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="kraken_resource_pad9"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843512"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
 <field name="label"
  type="int"
  transient="false"
@@ -5443,6 +6510,17 @@
  visibility="public"
 >
 </field>
+<field name="logo"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843454"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
 <field name="longClickable"
  type="int"
  transient="false"
@@ -9370,6 +10448,17 @@
  visibility="public"
 >
 </field>
+<field name="xlargeScreens"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843455"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
 <field name="y"
  type="int"
  transient="false"
@@ -9481,6 +10570,171 @@
  visibility="public"
 >
 </field>
+<field name="kraken_resource_pad1"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="17170464"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="kraken_resource_pad10"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="17170455"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="kraken_resource_pad11"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="17170454"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="kraken_resource_pad12"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="17170453"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="kraken_resource_pad13"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="17170452"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="kraken_resource_pad14"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="17170451"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="kraken_resource_pad15"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="17170450"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="kraken_resource_pad2"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="17170463"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="kraken_resource_pad3"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="17170462"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="kraken_resource_pad4"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="17170461"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="kraken_resource_pad5"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="17170460"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="kraken_resource_pad6"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="17170459"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="kraken_resource_pad7"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="17170458"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="kraken_resource_pad8"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="17170457"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="kraken_resource_pad9"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="17170456"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
 <field name="primary_text_dark"
  type="int"
  transient="false"
@@ -9663,6 +10917,160 @@
  visibility="public"
 >
 </field>
+<field name="kraken_resource_pad1"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="17104912"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="kraken_resource_pad10"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="17104903"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="kraken_resource_pad11"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="17104902"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="kraken_resource_pad12"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="17104901"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="kraken_resource_pad13"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="17104900"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="kraken_resource_pad14"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="17104899"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="kraken_resource_pad2"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="17104911"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="kraken_resource_pad3"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="17104910"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="kraken_resource_pad4"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="17104909"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="kraken_resource_pad5"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="17104908"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="kraken_resource_pad6"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="17104907"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="kraken_resource_pad7"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="17104906"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="kraken_resource_pad8"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="17104905"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="kraken_resource_pad9"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="17104904"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
 <field name="thumbnail_height"
  type="int"
  transient="false"
@@ -10846,6 +12254,875 @@
  visibility="public"
 >
 </field>
+<field name="kraken_resource_pad1"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="17301760"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="kraken_resource_pad10"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="17301751"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="kraken_resource_pad11"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="17301750"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="kraken_resource_pad12"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="17301749"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="kraken_resource_pad13"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="17301748"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="kraken_resource_pad14"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="17301747"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="kraken_resource_pad15"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="17301746"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="kraken_resource_pad16"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="17301745"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="kraken_resource_pad17"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="17301744"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="kraken_resource_pad18"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="17301743"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="kraken_resource_pad19"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="17301742"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="kraken_resource_pad2"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="17301759"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="kraken_resource_pad20"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="17301741"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="kraken_resource_pad21"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="17301740"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="kraken_resource_pad22"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="17301739"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="kraken_resource_pad23"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="17301738"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="kraken_resource_pad24"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="17301737"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="kraken_resource_pad25"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="17301736"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="kraken_resource_pad26"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="17301735"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="kraken_resource_pad27"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="17301734"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="kraken_resource_pad28"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="17301733"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="kraken_resource_pad29"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="17301732"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="kraken_resource_pad3"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="17301758"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="kraken_resource_pad30"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="17301731"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="kraken_resource_pad31"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="17301730"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="kraken_resource_pad32"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="17301729"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="kraken_resource_pad33"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="17301728"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="kraken_resource_pad34"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="17301727"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="kraken_resource_pad35"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="17301726"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="kraken_resource_pad36"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="17301725"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="kraken_resource_pad37"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="17301724"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="kraken_resource_pad38"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="17301723"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="kraken_resource_pad39"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="17301722"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="kraken_resource_pad4"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="17301757"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="kraken_resource_pad40"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="17301721"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="kraken_resource_pad41"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="17301720"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="kraken_resource_pad42"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="17301719"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="kraken_resource_pad43"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="17301718"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="kraken_resource_pad44"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="17301717"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="kraken_resource_pad45"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="17301716"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="kraken_resource_pad46"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="17301715"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="kraken_resource_pad47"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="17301714"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="kraken_resource_pad48"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="17301713"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="kraken_resource_pad49"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="17301712"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="kraken_resource_pad5"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="17301756"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="kraken_resource_pad50"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="17301711"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="kraken_resource_pad51"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="17301710"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="kraken_resource_pad52"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="17301709"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="kraken_resource_pad53"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="17301708"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="kraken_resource_pad54"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="17301707"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="kraken_resource_pad55"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="17301706"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="kraken_resource_pad56"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="17301705"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="kraken_resource_pad57"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="17301704"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="kraken_resource_pad58"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="17301703"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="kraken_resource_pad59"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="17301702"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="kraken_resource_pad6"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="17301755"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="kraken_resource_pad60"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="17301701"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="kraken_resource_pad61"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="17301700"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="kraken_resource_pad62"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="17301699"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="kraken_resource_pad63"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="17301698"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="kraken_resource_pad64"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="17301697"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="kraken_resource_pad65"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="17301696"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="kraken_resource_pad66"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="17301695"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="kraken_resource_pad67"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="17301694"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="kraken_resource_pad68"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="17301693"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="kraken_resource_pad69"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="17301692"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="kraken_resource_pad7"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="17301754"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="kraken_resource_pad70"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="17301691"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="kraken_resource_pad71"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="17301690"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="kraken_resource_pad72"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="17301689"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="kraken_resource_pad73"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="17301688"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="kraken_resource_pad74"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="17301687"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="kraken_resource_pad75"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="17301686"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="kraken_resource_pad76"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="17301685"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="kraken_resource_pad77"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="17301684"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="kraken_resource_pad78"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="17301683"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="kraken_resource_pad79"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="17301682"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="kraken_resource_pad8"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="17301753"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="kraken_resource_pad9"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="17301752"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
 <field name="list_selector_background"
  type="int"
  transient="false"
@@ -10901,6 +13178,39 @@
  visibility="public"
 >
 </field>
+<field name="presence_audio_away"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="17301679"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="presence_audio_busy"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="17301680"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="presence_audio_online"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="17301681"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
 <field name="presence_away"
  type="int"
  transient="false"
@@ -10956,6 +13266,39 @@
  visibility="public"
 >
 </field>
+<field name="presence_video_away"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="17301676"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="presence_video_busy"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="17301677"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="presence_video_online"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="17301678"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
 <field name="progress_horizontal"
  type="int"
  transient="false"
@@ -11282,7 +13625,7 @@
  value="17301636"
  static="true"
  final="true"
- deprecated="not deprecated"
+ deprecated="deprecated"
  visibility="public"
 >
 </field>
@@ -11293,7 +13636,7 @@
  value="17301637"
  static="true"
  final="true"
- deprecated="not deprecated"
+ deprecated="deprecated"
  visibility="public"
 >
 </field>
@@ -11304,7 +13647,7 @@
  value="17301638"
  static="true"
  final="true"
- deprecated="not deprecated"
+ deprecated="deprecated"
  visibility="public"
 >
 </field>
@@ -11348,7 +13691,7 @@
  value="17301671"
  static="true"
  final="true"
- deprecated="not deprecated"
+ deprecated="deprecated"
  visibility="public"
 >
 </field>
@@ -11359,7 +13702,7 @@
  value="17301672"
  static="true"
  final="true"
- deprecated="not deprecated"
+ deprecated="deprecated"
  visibility="public"
 >
 </field>
@@ -11809,6 +14152,237 @@
  visibility="public"
 >
 </field>
+<field name="kraken_resource_pad1"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16908352"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="kraken_resource_pad10"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16908343"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="kraken_resource_pad11"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16908342"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="kraken_resource_pad12"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16908341"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="kraken_resource_pad13"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16908340"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="kraken_resource_pad14"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16908339"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="kraken_resource_pad15"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16908338"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="kraken_resource_pad16"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16908337"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="kraken_resource_pad17"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16908336"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="kraken_resource_pad18"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16908335"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="kraken_resource_pad19"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16908334"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="kraken_resource_pad2"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16908351"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="kraken_resource_pad20"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16908333"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="kraken_resource_pad21"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16908332"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="kraken_resource_pad3"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16908350"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="kraken_resource_pad4"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16908349"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="kraken_resource_pad5"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16908348"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="kraken_resource_pad6"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16908347"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="kraken_resource_pad7"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16908346"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="kraken_resource_pad8"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16908345"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="kraken_resource_pad9"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16908344"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
 <field name="list"
  type="int"
  transient="false"
@@ -12079,6 +14653,160 @@
  visibility="public"
 >
 </field>
+<field name="kraken_resource_pad1"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="17694736"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="kraken_resource_pad10"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="17694727"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="kraken_resource_pad11"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="17694726"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="kraken_resource_pad12"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="17694725"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="kraken_resource_pad13"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="17694724"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="kraken_resource_pad14"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="17694723"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="kraken_resource_pad2"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="17694735"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="kraken_resource_pad3"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="17694734"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="kraken_resource_pad4"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="17694733"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="kraken_resource_pad5"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="17694732"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="kraken_resource_pad6"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="17694731"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="kraken_resource_pad7"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="17694730"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="kraken_resource_pad8"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="17694729"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="kraken_resource_pad9"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="17694728"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
 </class>
 <class name="R.layout"
  extends="java.lang.Object"
@@ -12129,6 +14857,149 @@
  visibility="public"
 >
 </field>
+<field name="kraken_resource_pad1"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="17367072"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="kraken_resource_pad10"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="17367063"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="kraken_resource_pad11"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="17367062"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="kraken_resource_pad12"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="17367061"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="kraken_resource_pad13"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="17367060"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="kraken_resource_pad2"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="17367071"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="kraken_resource_pad3"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="17367070"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="kraken_resource_pad4"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="17367069"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="kraken_resource_pad5"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="17367068"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="kraken_resource_pad6"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="17367067"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="kraken_resource_pad7"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="17367066"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="kraken_resource_pad8"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="17367065"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="kraken_resource_pad9"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="17367064"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
 <field name="preference_category"
  type="int"
  transient="false"
@@ -12521,6 +15392,127 @@
  visibility="public"
 >
 </field>
+<field name="kraken_resource_pad1"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="17039392"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="kraken_resource_pad10"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="17039383"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="kraken_resource_pad11"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="17039382"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="kraken_resource_pad2"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="17039391"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="kraken_resource_pad3"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="17039390"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="kraken_resource_pad4"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="17039389"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="kraken_resource_pad5"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="17039388"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="kraken_resource_pad6"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="17039387"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="kraken_resource_pad7"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="17039386"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="kraken_resource_pad8"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="17039385"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="kraken_resource_pad9"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="17039384"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
 <field name="no"
  type="int"
  transient="false"
@@ -13704,6 +16696,490 @@
  visibility="public"
 >
 </field>
+<field name="kraken_resource_pad1"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16973968"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="kraken_resource_pad10"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16973959"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="kraken_resource_pad11"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16973958"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="kraken_resource_pad12"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16973957"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="kraken_resource_pad13"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16973956"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="kraken_resource_pad14"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16973955"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="kraken_resource_pad15"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16973954"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="kraken_resource_pad16"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16973953"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="kraken_resource_pad17"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16973952"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="kraken_resource_pad18"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16973951"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="kraken_resource_pad19"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16973950"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="kraken_resource_pad2"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16973967"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="kraken_resource_pad20"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16973949"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="kraken_resource_pad21"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16973948"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="kraken_resource_pad22"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16973947"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="kraken_resource_pad23"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16973946"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="kraken_resource_pad24"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16973945"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="kraken_resource_pad25"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16973944"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="kraken_resource_pad26"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16973943"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="kraken_resource_pad27"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16973942"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="kraken_resource_pad28"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16973941"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="kraken_resource_pad29"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16973940"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="kraken_resource_pad3"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16973966"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="kraken_resource_pad30"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16973939"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="kraken_resource_pad31"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16973938"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="kraken_resource_pad32"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16973937"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="kraken_resource_pad33"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16973936"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="kraken_resource_pad34"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16973935"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="kraken_resource_pad35"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16973934"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="kraken_resource_pad36"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16973933"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="kraken_resource_pad37"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16973932"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="kraken_resource_pad38"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16973931"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="kraken_resource_pad39"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16973930"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="kraken_resource_pad4"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16973965"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="kraken_resource_pad40"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16973929"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="kraken_resource_pad41"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16973928"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="kraken_resource_pad42"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16973927"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="kraken_resource_pad43"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16973926"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="kraken_resource_pad44"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16973925"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="kraken_resource_pad5"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16973964"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="kraken_resource_pad6"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16973963"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="kraken_resource_pad7"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16973962"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="kraken_resource_pad8"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16973961"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="kraken_resource_pad9"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16973960"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
 </class>
 <class name="R.xml"
  extends="java.lang.Object"
@@ -16067,6 +19543,17 @@
  visibility="public"
 >
 </method>
+<method name="isImmersive"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
 <method name="isTaskRoot"
  return="boolean"
  abstract="false"
@@ -17020,6 +20507,19 @@
 <parameter name="uri" type="android.net.Uri">
 </parameter>
 </method>
+<method name="setImmersive"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="i" type="boolean">
+</parameter>
+</method>
 <method name="setIntent"
  return="void"
  abstract="false"
@@ -18250,6 +21750,17 @@
  visibility="public"
 >
 </field>
+<field name="FLAG_HEAVY_WEIGHT"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
 <field name="IMPORTANCE_BACKGROUND"
  type="int"
  transient="false"
@@ -18283,6 +21794,28 @@
  visibility="public"
 >
 </field>
+<field name="IMPORTANCE_HEAVY_WEIGHT"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="170"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="IMPORTANCE_PERCEPTIBLE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="130"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
 <field name="IMPORTANCE_SERVICE"
  type="int"
  transient="false"
@@ -18338,6 +21871,16 @@
  visibility="public"
 >
 </field>
+<field name="flags"
+ type="int"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
 <field name="importance"
  type="int"
  transient="false"
@@ -22800,6 +26343,135 @@
 </parameter>
 </method>
 </class>
+<class name="NativeActivity"
+ extends="android.app.Activity"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="android.view.InputQueue.Callback">
+</implements>
+<implements name="android.view.SurfaceHolder.Callback2">
+</implements>
+<implements name="android.view.ViewTreeObserver.OnGlobalLayoutListener">
+</implements>
+<constructor name="NativeActivity"
+ type="android.app.NativeActivity"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<method name="onGlobalLayout"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="onInputQueueCreated"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="queue" type="android.view.InputQueue">
+</parameter>
+</method>
+<method name="onInputQueueDestroyed"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="queue" type="android.view.InputQueue">
+</parameter>
+</method>
+<method name="surfaceChanged"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="holder" type="android.view.SurfaceHolder">
+</parameter>
+<parameter name="format" type="int">
+</parameter>
+<parameter name="width" type="int">
+</parameter>
+<parameter name="height" type="int">
+</parameter>
+</method>
+<method name="surfaceCreated"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="holder" type="android.view.SurfaceHolder">
+</parameter>
+</method>
+<method name="surfaceDestroyed"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="holder" type="android.view.SurfaceHolder">
+</parameter>
+</method>
+<method name="surfaceRedrawNeeded"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="holder" type="android.view.SurfaceHolder">
+</parameter>
+</method>
+<field name="META_DATA_LIB_NAME"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.app.lib_name&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
 <class name="Notification"
  extends="java.lang.Object"
  abstract="false"
@@ -22842,6 +26514,17 @@
 <parameter name="parcel" type="android.os.Parcel">
 </parameter>
 </constructor>
+<method name="clone"
+ return="android.app.Notification"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
 <method name="describeContents"
  return="int"
  abstract="false"
@@ -22963,6 +26646,17 @@
  visibility="public"
 >
 </field>
+<field name="FLAG_HIGH_PRIORITY"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="128"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
 <field name="FLAG_INSISTENT"
  type="int"
  transient="false"
@@ -23089,6 +26783,16 @@
  visibility="public"
 >
 </field>
+<field name="fullScreenIntent"
+ type="android.app.PendingIntent"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
 <field name="icon"
  type="int"
  transient="false"
@@ -34598,6 +38302,17 @@
  visibility="public"
 >
 </field>
+<field name="STORAGE_SERVICE"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;storage&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
 <field name="TELEPHONY_SERVICE"
  type="java.lang.String"
  transient="false"
@@ -40541,6 +44256,17 @@
  visibility="public"
 >
 </method>
+<method name="getTargetPackage"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
 <method name="readIntentSenderOrNullFromParcel"
  return="android.content.IntentSender"
  abstract="false"
@@ -42336,6 +46062,17 @@
  visibility="public"
 >
 </field>
+<field name="FLAG_IMMERSIVE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="512"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
 <field name="FLAG_MULTIPROCESS"
  type="int"
  transient="false"
@@ -42735,6 +46472,17 @@
  visibility="public"
 >
 </field>
+<field name="FLAG_HEAVY_WEIGHT"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1048576"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
 <field name="FLAG_KILL_AFTER_RESTORE"
  type="int"
  transient="false"
@@ -42823,6 +46571,17 @@
  visibility="public"
 >
 </field>
+<field name="FLAG_SUPPORTS_XLARGE_SCREENS"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="524288"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
 <field name="FLAG_SYSTEM"
  type="int"
  transient="false"
@@ -44037,6 +47796,19 @@
 <parameter name="pm" type="android.content.pm.PackageManager">
 </parameter>
 </method>
+<method name="loadLogo"
+ return="android.graphics.drawable.Drawable"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="pm" type="android.content.pm.PackageManager">
+</parameter>
+</method>
 <method name="loadXmlMetaData"
  return="android.content.res.XmlResourceParser"
  abstract="false"
@@ -44087,6 +47859,16 @@
  visibility="public"
 >
 </field>
+<field name="logo"
+ type="int"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
 <field name="metaData"
  type="android.os.Bundle"
  transient="false"
@@ -44369,6 +48151,36 @@
 <exception name="PackageManager.NameNotFoundException" type="android.content.pm.PackageManager.NameNotFoundException">
 </exception>
 </method>
+<method name="getActivityLogo"
+ return="android.graphics.drawable.Drawable"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="activityName" type="android.content.ComponentName">
+</parameter>
+<exception name="PackageManager.NameNotFoundException" type="android.content.pm.PackageManager.NameNotFoundException">
+</exception>
+</method>
+<method name="getActivityLogo"
+ return="android.graphics.drawable.Drawable"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="intent" type="android.content.Intent">
+</parameter>
+<exception name="PackageManager.NameNotFoundException" type="android.content.pm.PackageManager.NameNotFoundException">
+</exception>
+</method>
 <method name="getAllPermissionGroups"
  return="java.util.List&lt;android.content.pm.PermissionGroupInfo&gt;"
  abstract="true"
@@ -44453,6 +48265,34 @@
 <parameter name="info" type="android.content.pm.ApplicationInfo">
 </parameter>
 </method>
+<method name="getApplicationLogo"
+ return="android.graphics.drawable.Drawable"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="info" type="android.content.pm.ApplicationInfo">
+</parameter>
+</method>
+<method name="getApplicationLogo"
+ return="android.graphics.drawable.Drawable"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="packageName" type="java.lang.String">
+</parameter>
+<exception name="PackageManager.NameNotFoundException" type="android.content.pm.PackageManager.NameNotFoundException">
+</exception>
+</method>
 <method name="getComponentEnabledSetting"
  return="int"
  abstract="true"
@@ -45165,6 +49005,17 @@
  visibility="public"
 >
 </field>
+<field name="FEATURE_CAMERA_FRONT"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.hardware.camera.front&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
 <field name="FEATURE_LIVE_WALLPAPER"
  type="java.lang.String"
  transient="false"
@@ -47862,6 +51713,17 @@
  visibility="public"
 >
 </field>
+<field name="SCREENLAYOUT_SIZE_XLARGE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="4"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
 <field name="TOUCHSCREEN_FINGER"
  type="int"
  transient="false"
@@ -60992,6 +64854,17 @@
  visibility="public"
 >
 </field>
+<field name="YV12"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="842094169"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
 </class>
 <class name="Interpolator"
  extends="java.lang.Object"
@@ -71515,6 +75388,32 @@
  visibility="public"
 >
 </method>
+<method name="getCameraInfo"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="cameraId" type="int">
+</parameter>
+<parameter name="cameraInfo" type="android.hardware.Camera.CameraInfo">
+</parameter>
+</method>
+<method name="getNumberOfCameras"
+ return="int"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
 <method name="getParameters"
  return="android.hardware.Camera.Parameters"
  abstract="false"
@@ -71547,6 +75446,19 @@
  deprecated="not deprecated"
  visibility="public"
 >
+<parameter name="cameraId" type="int">
+</parameter>
+</method>
+<method name="open"
+ return="android.hardware.Camera"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
 </method>
 <method name="reconnect"
  return="void"
@@ -71793,6 +75705,16 @@
  visibility="public"
 >
 </field>
+<field name="CAMERA_ID_DEFAULT"
+ type="int"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
 </class>
 <interface name="Camera.AutoFocusCallback"
  abstract="true"
@@ -71817,6 +75739,65 @@
 </parameter>
 </method>
 </interface>
+<class name="Camera.CameraInfo"
+ extends="java.lang.Object"
+ abstract="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="Camera.CameraInfo"
+ type="android.hardware.Camera.CameraInfo"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<field name="CAMERA_FACING_BACK"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="0"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="CAMERA_FACING_FRONT"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="mFacing"
+ type="int"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="mOrientation"
+ type="int"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
 <interface name="Camera.ErrorCallback"
  abstract="true"
  static="true"
@@ -71963,6 +75944,19 @@
  visibility="public"
 >
 </method>
+<method name="getFocusDistances"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="output" type="float[]">
+</parameter>
+</method>
 <method name="getFocusMode"
  return="java.lang.String"
  abstract="false"
@@ -72053,6 +76047,17 @@
  visibility="public"
 >
 </method>
+<method name="getMeteringMode"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
 <method name="getMinExposureCompensation"
  return="int"
  abstract="false"
@@ -72185,6 +76190,17 @@
  visibility="public"
 >
 </method>
+<method name="getSupportedMeteringModes"
+ return="java.util.List&lt;java.lang.String&gt;"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
 <method name="getSupportedPictureFormats"
  return="java.util.List&lt;java.lang.Integer&gt;"
  abstract="false"
@@ -72553,6 +76569,19 @@
 <parameter name="height" type="int">
 </parameter>
 </method>
+<method name="setMeteringMode"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="value" type="java.lang.String">
+</parameter>
+</method>
 <method name="setPictureFormat"
  return="void"
  abstract="false"
@@ -72885,6 +76914,39 @@
  visibility="public"
 >
 </field>
+<field name="FOCUS_DISTANCE_FAR_INDEX"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="FOCUS_DISTANCE_NEAR_INDEX"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="0"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="FOCUS_DISTANCE_OPTIMAL_INDEX"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
 <field name="FOCUS_MODE_AUTO"
  type="java.lang.String"
  transient="false"
@@ -72896,6 +76958,17 @@
  visibility="public"
 >
 </field>
+<field name="FOCUS_MODE_CONTINUOUS"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;continuous&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
 <field name="FOCUS_MODE_EDOF"
  type="java.lang.String"
  transient="false"
@@ -72940,6 +77013,39 @@
  visibility="public"
 >
 </field>
+<field name="METERING_MODE_CENTER_WEIGHTED"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;center-weighted&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="METERING_MODE_FRAME_AVERAGE"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;frame-average&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="METERING_MODE_SPOT"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;spot&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
 <field name="SCENE_MODE_ACTION"
  type="java.lang.String"
  transient="false"
@@ -77894,6 +82000,28 @@
  visibility="public"
 >
 </method>
+<method name="getBearingAccuracy"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getHorizontalAccuracy"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
 <method name="getPowerRequirement"
  return="int"
  abstract="false"
@@ -77905,6 +82033,28 @@
  visibility="public"
 >
 </method>
+<method name="getSpeedAccuracy"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getVerticalAccuracy"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
 <method name="isAltitudeRequired"
  return="boolean"
  abstract="false"
@@ -77975,6 +82125,19 @@
 <parameter name="altitudeRequired" type="boolean">
 </parameter>
 </method>
+<method name="setBearingAccuracy"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="accuracy" type="int">
+</parameter>
+</method>
 <method name="setBearingRequired"
  return="void"
  abstract="false"
@@ -78001,6 +82164,19 @@
 <parameter name="costAllowed" type="boolean">
 </parameter>
 </method>
+<method name="setHorizontalAccuracy"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="accuracy" type="int">
+</parameter>
+</method>
 <method name="setPowerRequirement"
  return="void"
  abstract="false"
@@ -78014,6 +82190,19 @@
 <parameter name="level" type="int">
 </parameter>
 </method>
+<method name="setSpeedAccuracy"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="accuracy" type="int">
+</parameter>
+</method>
 <method name="setSpeedRequired"
  return="void"
  abstract="false"
@@ -78027,6 +82216,19 @@
 <parameter name="speedRequired" type="boolean">
 </parameter>
 </method>
+<method name="setVerticalAccuracy"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="accuracy" type="int">
+</parameter>
+</method>
 <method name="writeToParcel"
  return="void"
  abstract="false"
@@ -78064,6 +82266,39 @@
  visibility="public"
 >
 </field>
+<field name="ACCURACY_HIGH"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="3"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ACCURACY_LOW"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ACCURACY_MEDIUM"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
 <field name="CREATOR"
  type="android.os.Parcelable.Creator"
  transient="false"
@@ -78210,6 +82445,86 @@
 <exception name="IOException" type="java.io.IOException">
 </exception>
 </method>
+<method name="isImplemented"
+ return="java.lang.Boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+</class>
+<class name="GeocoderParams"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="android.os.Parcelable">
+</implements>
+<method name="describeContents"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getClientPackage"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getLocale"
+ return="java.util.Locale"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="writeToParcel"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="parcel" type="android.os.Parcel">
+</parameter>
+<parameter name="flags" type="int">
+</parameter>
+</method>
+<field name="CREATOR"
+ type="android.os.Parcelable.Creator"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
 </class>
 <class name="GpsSatellite"
  extends="java.lang.Object"
@@ -79368,6 +83683,27 @@
  deprecated="not deprecated"
  visibility="public"
 >
+<parameter name="minTime" type="long">
+</parameter>
+<parameter name="minDistance" type="float">
+</parameter>
+<parameter name="criteria" type="android.location.Criteria">
+</parameter>
+<parameter name="listener" type="android.location.LocationListener">
+</parameter>
+<parameter name="looper" type="android.os.Looper">
+</parameter>
+</method>
+<method name="requestLocationUpdates"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
 <parameter name="provider" type="java.lang.String">
 </parameter>
 <parameter name="minTime" type="long">
@@ -79377,6 +83713,89 @@
 <parameter name="intent" type="android.app.PendingIntent">
 </parameter>
 </method>
+<method name="requestLocationUpdates"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="minTime" type="long">
+</parameter>
+<parameter name="minDistance" type="float">
+</parameter>
+<parameter name="criteria" type="android.location.Criteria">
+</parameter>
+<parameter name="intent" type="android.app.PendingIntent">
+</parameter>
+</method>
+<method name="requestSingleUpdate"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="provider" type="java.lang.String">
+</parameter>
+<parameter name="listener" type="android.location.LocationListener">
+</parameter>
+<parameter name="looper" type="android.os.Looper">
+</parameter>
+</method>
+<method name="requestSingleUpdate"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="criteria" type="android.location.Criteria">
+</parameter>
+<parameter name="listener" type="android.location.LocationListener">
+</parameter>
+<parameter name="looper" type="android.os.Looper">
+</parameter>
+</method>
+<method name="requestSingleUpdate"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="provider" type="java.lang.String">
+</parameter>
+<parameter name="intent" type="android.app.PendingIntent">
+</parameter>
+</method>
+<method name="requestSingleUpdate"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="criteria" type="android.location.Criteria">
+</parameter>
+<parameter name="intent" type="android.app.PendingIntent">
+</parameter>
+</method>
 <method name="sendExtraCommand"
  return="boolean"
  abstract="false"
@@ -79687,6 +84106,390 @@
 </field>
 </class>
 </package>
+<package name="android.location.provider"
+>
+<class name="GeocodeProvider"
+ extends="java.lang.Object"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="GeocodeProvider"
+ type="android.location.provider.GeocodeProvider"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<method name="getBinder"
+ return="android.os.IBinder"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="onGetFromLocation"
+ return="java.lang.String"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="latitude" type="double">
+</parameter>
+<parameter name="longitude" type="double">
+</parameter>
+<parameter name="maxResults" type="int">
+</parameter>
+<parameter name="params" type="android.location.GeocoderParams">
+</parameter>
+<parameter name="addrs" type="java.util.List&lt;android.location.Address&gt;">
+</parameter>
+</method>
+<method name="onGetFromLocationName"
+ return="java.lang.String"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="locationName" type="java.lang.String">
+</parameter>
+<parameter name="lowerLeftLatitude" type="double">
+</parameter>
+<parameter name="lowerLeftLongitude" type="double">
+</parameter>
+<parameter name="upperRightLatitude" type="double">
+</parameter>
+<parameter name="upperRightLongitude" type="double">
+</parameter>
+<parameter name="maxResults" type="int">
+</parameter>
+<parameter name="params" type="android.location.GeocoderParams">
+</parameter>
+<parameter name="addrs" type="java.util.List&lt;android.location.Address&gt;">
+</parameter>
+</method>
+</class>
+<class name="LocationProvider"
+ extends="java.lang.Object"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="LocationProvider"
+ type="android.location.provider.LocationProvider"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<method name="getBinder"
+ return="android.os.IBinder"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="onAddListener"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="uid" type="int">
+</parameter>
+</method>
+<method name="onDisable"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="onEnable"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="onEnableLocationTracking"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="enable" type="boolean">
+</parameter>
+</method>
+<method name="onGetAccuracy"
+ return="int"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="onGetInternalState"
+ return="java.lang.String"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="onGetPowerRequirement"
+ return="int"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="onGetStatus"
+ return="int"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="extras" type="android.os.Bundle">
+</parameter>
+</method>
+<method name="onGetStatusUpdateTime"
+ return="long"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="onHasMonetaryCost"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="onMeetsCriteria"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="criteria" type="android.location.Criteria">
+</parameter>
+</method>
+<method name="onRemoveListener"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="uid" type="int">
+</parameter>
+</method>
+<method name="onRequiresCell"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="onRequiresNetwork"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="onRequiresSatellite"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="onSendExtraCommand"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="command" type="java.lang.String">
+</parameter>
+<parameter name="extras" type="android.os.Bundle">
+</parameter>
+</method>
+<method name="onSetMinTime"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="minTime" type="long">
+</parameter>
+</method>
+<method name="onSupportsAltitude"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="onSupportsBearing"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="onSupportsSpeed"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="onUpdateLocation"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="location" type="android.location.Location">
+</parameter>
+</method>
+<method name="onUpdateNetworkState"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="state" type="int">
+</parameter>
+<parameter name="info" type="android.net.NetworkInfo">
+</parameter>
+</method>
+<method name="reportLocation"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="location" type="android.location.Location">
+</parameter>
+</method>
+</class>
+</package>
 <package name="android.media"
 >
 <class name="AsyncPlayer"
@@ -82539,6 +87342,21 @@
 <parameter name="quality" type="int">
 </parameter>
 </method>
+<method name="get"
+ return="android.media.CamcorderProfile"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="cameraId" type="int">
+</parameter>
+<parameter name="quality" type="int">
+</parameter>
+</method>
 <field name="QUALITY_HIGH"
  type="int"
  transient="false"
@@ -82711,6 +87529,21 @@
 <parameter name="quality" type="int">
 </parameter>
 </method>
+<method name="getJpegEncodingQualityParameter"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="cameraId" type="int">
+</parameter>
+<parameter name="quality" type="int">
+</parameter>
+</method>
 <field name="QUALITY_HIGH"
  type="int"
  transient="false"
@@ -82765,6 +87598,19 @@
 <exception name="IOException" type="java.io.IOException">
 </exception>
 </constructor>
+<method name="getAltitude"
+ return="double"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="defaultValue" type="double">
+</parameter>
+</method>
 <method name="getAttribute"
  return="java.lang.String"
  abstract="false"
@@ -83003,6 +87849,28 @@
  visibility="public"
 >
 </field>
+<field name="TAG_GPS_ALTITUDE"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;GPSAltitude&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TAG_GPS_ALTITUDE_REF"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;GPSAltitudeRef&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
 <field name="TAG_GPS_DATESTAMP"
  type="java.lang.String"
  transient="false"
@@ -84179,6 +89047,28 @@
  visibility="public"
 >
 </field>
+<field name="MEDIA_INFO_BUFFERING_END"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="702"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="MEDIA_INFO_BUFFERING_START"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="701"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
 <field name="MEDIA_INFO_METADATA_UPDATE"
  type="int"
  transient="false"
@@ -104470,6 +109360,25 @@
 </parameter>
 <parameter name="type" type="int">
 </parameter>
+<parameter name="offset" type="int">
+</parameter>
+</method>
+<method name="glDrawElements"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="mode" type="int">
+</parameter>
+<parameter name="count" type="int">
+</parameter>
+<parameter name="type" type="int">
+</parameter>
 <parameter name="indices" type="java.nio.Buffer">
 </parameter>
 </method>
@@ -106888,6 +111797,29 @@
 <method name="glVertexAttribPointer"
  return="void"
  abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="indx" type="int">
+</parameter>
+<parameter name="size" type="int">
+</parameter>
+<parameter name="type" type="int">
+</parameter>
+<parameter name="normalized" type="boolean">
+</parameter>
+<parameter name="stride" type="int">
+</parameter>
+<parameter name="offset" type="int">
+</parameter>
+</method>
+<method name="glVertexAttribPointer"
+ return="void"
+ abstract="false"
  native="false"
  synchronized="false"
  static="true"
@@ -112765,6 +117697,17 @@
  visibility="public"
 >
 </field>
+<field name="GINGERBREAD"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="10000"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
 </class>
 <class name="Bundle"
  extends="java.lang.Object"
@@ -120351,6 +125294,116 @@
 </parameter>
 </method>
 </class>
+<class name="StrictMode"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="getThreadBlockingPolicy"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="setThreadBlockingPolicy"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="policyMask" type="int">
+</parameter>
+</method>
+<field name="DISALLOW_DISK_READ"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="DISALLOW_DISK_WRITE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="DISALLOW_NETWORK"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="4"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="PENALTY_DEATH"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="64"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="PENALTY_DIALOG"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="32"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="PENALTY_DROPBOX"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="128"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="PENALTY_LOG"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
 <class name="SystemClock"
  extends="java.lang.Object"
  abstract="false"
@@ -120576,6 +125629,74 @@
 </method>
 </class>
 </package>
+<package name="android.os.storage"
+>
+<class name="StorageManager"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="getMountedObbPath"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="filename" type="java.lang.String">
+</parameter>
+</method>
+<method name="isObbMounted"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="filename" type="java.lang.String">
+</parameter>
+</method>
+<method name="mountObb"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="filename" type="java.lang.String">
+</parameter>
+<parameter name="key" type="java.lang.String">
+</parameter>
+</method>
+<method name="unmountObb"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="filename" type="java.lang.String">
+</parameter>
+<parameter name="force" type="boolean">
+</parameter>
+</method>
+</class>
+</package>
 <package name="android.preference"
 >
 <class name="CheckBoxPreference"
@@ -131660,6 +136781,17 @@
  visibility="public"
 >
 </field>
+<field name="MEDIA_IGNORE_FILENAME"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;.nomedia&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
 <field name="MEDIA_SCANNER_VOLUME"
  type="java.lang.String"
  transient="false"
@@ -134294,6 +139426,17 @@
  visibility="public"
 >
 </field>
+<field name="ACTION_APPLICATION_DETAILS_SETTINGS"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.settings.APPLICATION_DETAILS_SETTINGS&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
 <field name="ACTION_APPLICATION_DEVELOPMENT_SETTINGS"
  type="java.lang.String"
  transient="false"
@@ -137911,6 +143054,19 @@
 <parameter name="holder" type="android.view.SurfaceHolder">
 </parameter>
 </method>
+<method name="onSurfaceRedrawNeeded"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="holder" type="android.view.SurfaceHolder">
+</parameter>
+</method>
 <method name="onTouchEvent"
  return="void"
  abstract="false"
@@ -142238,6 +147394,17 @@
  visibility="public"
 >
 </field>
+<field name="NETWORK_TYPE_EVDO_B"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="12"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
 <field name="NETWORK_TYPE_GPRS"
  type="int"
  transient="false"
@@ -148732,6 +153899,36 @@
 <exception name="PackageManager.NameNotFoundException" type="android.content.pm.PackageManager.NameNotFoundException">
 </exception>
 </method>
+<method name="getActivityLogo"
+ return="android.graphics.drawable.Drawable"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="activityName" type="android.content.ComponentName">
+</parameter>
+<exception name="PackageManager.NameNotFoundException" type="android.content.pm.PackageManager.NameNotFoundException">
+</exception>
+</method>
+<method name="getActivityLogo"
+ return="android.graphics.drawable.Drawable"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="intent" type="android.content.Intent">
+</parameter>
+<exception name="PackageManager.NameNotFoundException" type="android.content.pm.PackageManager.NameNotFoundException">
+</exception>
+</method>
 <method name="getAllPermissionGroups"
  return="java.util.List&lt;android.content.pm.PermissionGroupInfo&gt;"
  abstract="false"
@@ -148816,6 +154013,34 @@
 <parameter name="info" type="android.content.pm.ApplicationInfo">
 </parameter>
 </method>
+<method name="getApplicationLogo"
+ return="android.graphics.drawable.Drawable"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="info" type="android.content.pm.ApplicationInfo">
+</parameter>
+</method>
+<method name="getApplicationLogo"
+ return="android.graphics.drawable.Drawable"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="packageName" type="java.lang.String">
+</parameter>
+<exception name="PackageManager.NameNotFoundException" type="android.content.pm.PackageManager.NameNotFoundException">
+</exception>
+</method>
 <method name="getComponentEnabledSetting"
  return="int"
  abstract="false"
@@ -149423,6 +154648,21 @@
 <parameter name="flags" type="int">
 </parameter>
 </method>
+<method name="setPackageObbPath"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="packageName" type="java.lang.String">
+</parameter>
+<parameter name="path" type="java.lang.String">
+</parameter>
+</method>
 </class>
 <class name="MockResources"
  extends="android.content.res.Resources"
@@ -167849,6 +173089,549 @@
 </parameter>
 </constructor>
 </class>
+<class name="InputDevice"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="InputDevice"
+ type="android.view.InputDevice"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<method name="getDevice"
+ return="android.view.InputDevice"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="id" type="int">
+</parameter>
+</method>
+<method name="getKeyCharacterMap"
+ return="android.view.KeyCharacterMap"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getMotionRange"
+ return="android.view.InputDevice.MotionRange"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="range" type="int">
+</parameter>
+</method>
+<method name="getName"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getSources"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="hasKey"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="keyCode" type="int">
+</parameter>
+</method>
+<field name="MOTION_RANGE_ORIENTATION"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="8"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="MOTION_RANGE_PRESSURE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="MOTION_RANGE_SIZE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="3"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="MOTION_RANGE_TOOL_MAJOR"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="6"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="MOTION_RANGE_TOOL_MINOR"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="7"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="MOTION_RANGE_TOUCH_MAJOR"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="4"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="MOTION_RANGE_TOUCH_MINOR"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="5"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="MOTION_RANGE_X"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="0"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="MOTION_RANGE_Y"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="SOURCE_CLASS_BUTTON"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="SOURCE_CLASS_JOYSTICK"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="SOURCE_CLASS_MASK"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="255"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="SOURCE_CLASS_POINTER"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="SOURCE_CLASS_POSITION"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="8"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="SOURCE_CLASS_TRACKBALL"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="4"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="SOURCE_DPAD"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="513"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="SOURCE_GAMEPAD"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1025"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="SOURCE_JOYSTICK_LEFT"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16777232"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="SOURCE_JOYSTICK_RIGHT"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="33554448"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="SOURCE_KEYBOARD"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="257"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="SOURCE_MOUSE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="8194"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="SOURCE_TOUCHPAD"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1048584"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="SOURCE_TOUCHSCREEN"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="4098"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="SOURCE_TRACKBALL"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="65540"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="SOURCE_UNKNOWN"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="0"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<class name="InputDevice.MotionRange"
+ extends="java.lang.Object"
+ abstract="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="InputDevice.MotionRange"
+ type="android.view.InputDevice.MotionRange"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<method name="getFlat"
+ return="float"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getFuzz"
+ return="float"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getMax"
+ return="float"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getMin"
+ return="float"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getRange"
+ return="float"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+</class>
+<class name="InputEvent"
+ extends="java.lang.Object"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="android.os.Parcelable">
+</implements>
+<method name="getDevice"
+ return="android.view.InputDevice"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getDeviceId"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getSource"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<field name="mDeviceId"
+ type="int"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</field>
+<field name="mSource"
+ type="int"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</field>
+</class>
+<class name="InputQueue"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</class>
+<interface name="InputQueue.Callback"
+ abstract="true"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="onInputQueueCreated"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="queue" type="android.view.InputQueue">
+</parameter>
+</method>
+<method name="onInputQueueDestroyed"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="queue" type="android.view.InputQueue">
+</parameter>
+</method>
+</interface>
 <class name="KeyCharacterMap"
  extends="java.lang.Object"
  abstract="false"
@@ -168185,7 +173968,7 @@
 </field>
 </class>
 <class name="KeyEvent"
- extends="java.lang.Object"
+ extends="android.view.InputEvent"
  abstract="false"
  static="false"
  final="false"
@@ -168263,7 +174046,7 @@
 </parameter>
 <parameter name="metaState" type="int">
 </parameter>
-<parameter name="device" type="int">
+<parameter name="deviceId" type="int">
 </parameter>
 <parameter name="scancode" type="int">
 </parameter>
@@ -168287,7 +174070,7 @@
 </parameter>
 <parameter name="metaState" type="int">
 </parameter>
-<parameter name="device" type="int">
+<parameter name="deviceId" type="int">
 </parameter>
 <parameter name="scancode" type="int">
 </parameter>
@@ -168301,11 +174084,39 @@
  deprecated="not deprecated"
  visibility="public"
 >
+<parameter name="downTime" type="long">
+</parameter>
+<parameter name="eventTime" type="long">
+</parameter>
+<parameter name="action" type="int">
+</parameter>
+<parameter name="code" type="int">
+</parameter>
+<parameter name="repeat" type="int">
+</parameter>
+<parameter name="metaState" type="int">
+</parameter>
+<parameter name="deviceId" type="int">
+</parameter>
+<parameter name="scancode" type="int">
+</parameter>
+<parameter name="flags" type="int">
+</parameter>
+<parameter name="source" type="int">
+</parameter>
+</constructor>
+<constructor name="KeyEvent"
+ type="android.view.KeyEvent"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
 <parameter name="time" type="long">
 </parameter>
 <parameter name="characters" type="java.lang.String">
 </parameter>
-<parameter name="device" type="int">
+<parameter name="deviceId" type="int">
 </parameter>
 <parameter name="flags" type="int">
 </parameter>
@@ -168478,17 +174289,6 @@
 <parameter name="c" type="int">
 </parameter>
 </method>
-<method name="getDeviceId"
- return="int"
- abstract="false"
- native="false"
- synchronized="false"
- static="false"
- final="true"
- deprecated="not deprecated"
- visibility="public"
->
-</method>
 <method name="getDisplayLabel"
  return="char"
  abstract="false"
@@ -169142,6 +174942,171 @@
  visibility="public"
 >
 </field>
+<field name="KEYCODE_BUTTON_A"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="96"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="KEYCODE_BUTTON_B"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="97"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="KEYCODE_BUTTON_C"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="98"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="KEYCODE_BUTTON_L1"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="102"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="KEYCODE_BUTTON_L2"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="104"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="KEYCODE_BUTTON_MODE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="110"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="KEYCODE_BUTTON_R1"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="103"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="KEYCODE_BUTTON_R2"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="105"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="KEYCODE_BUTTON_SELECT"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="109"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="KEYCODE_BUTTON_START"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="108"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="KEYCODE_BUTTON_THUMBL"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="106"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="KEYCODE_BUTTON_THUMBR"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="107"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="KEYCODE_BUTTON_X"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="99"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="KEYCODE_BUTTON_Y"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="100"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="KEYCODE_BUTTON_Z"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="101"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
 <field name="KEYCODE_C"
  type="int"
  transient="false"
@@ -169637,6 +175602,28 @@
  visibility="public"
 >
 </field>
+<field name="KEYCODE_PAGE_DOWN"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="93"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="KEYCODE_PAGE_UP"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="92"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
 <field name="KEYCODE_PERIOD"
  type="int"
  transient="false"
@@ -169648,6 +175635,17 @@
  visibility="public"
 >
 </field>
+<field name="KEYCODE_PICTSYMBOLS"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="94"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
 <field name="KEYCODE_PLUS"
  type="int"
  transient="false"
@@ -169824,6 +175822,17 @@
  visibility="public"
 >
 </field>
+<field name="KEYCODE_SWITCH_CHARSET"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="95"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
 <field name="KEYCODE_SYM"
  type="int"
  transient="false"
@@ -171363,7 +177372,7 @@
 </method>
 </interface>
 <class name="MotionEvent"
- extends="java.lang.Object"
+ extends="android.view.InputEvent"
  abstract="false"
  static="false"
  final="true"
@@ -171395,6 +177404,23 @@
 <parameter name="metaState" type="int">
 </parameter>
 </method>
+<method name="addBatch"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="eventTime" type="long">
+</parameter>
+<parameter name="pointerCoords" type="android.view.MotionEvent.PointerCoords[]">
+</parameter>
+<parameter name="metaState" type="int">
+</parameter>
+</method>
 <method name="describeContents"
  return="int"
  abstract="false"
@@ -171452,17 +177478,6 @@
  visibility="public"
 >
 </method>
-<method name="getDeviceId"
- return="int"
- abstract="false"
- native="false"
- synchronized="false"
- static="false"
- final="true"
- deprecated="not deprecated"
- visibility="public"
->
-</method>
 <method name="getDownTime"
  return="long"
  abstract="false"
@@ -171509,6 +177524,51 @@
 <parameter name="pos" type="int">
 </parameter>
 </method>
+<method name="getHistoricalOrientation"
+ return="float"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="pos" type="int">
+</parameter>
+</method>
+<method name="getHistoricalOrientation"
+ return="float"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="pointerIndex" type="int">
+</parameter>
+<parameter name="pos" type="int">
+</parameter>
+</method>
+<method name="getHistoricalPointerCoords"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="pointerIndex" type="int">
+</parameter>
+<parameter name="pos" type="int">
+</parameter>
+<parameter name="outPointerCoords" type="android.view.MotionEvent.PointerCoords">
+</parameter>
+</method>
 <method name="getHistoricalPressure"
  return="float"
  abstract="false"
@@ -171565,6 +177625,118 @@
 <parameter name="pos" type="int">
 </parameter>
 </method>
+<method name="getHistoricalToolMajor"
+ return="float"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="pos" type="int">
+</parameter>
+</method>
+<method name="getHistoricalToolMajor"
+ return="float"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="pointerIndex" type="int">
+</parameter>
+<parameter name="pos" type="int">
+</parameter>
+</method>
+<method name="getHistoricalToolMinor"
+ return="float"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="pos" type="int">
+</parameter>
+</method>
+<method name="getHistoricalToolMinor"
+ return="float"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="pointerIndex" type="int">
+</parameter>
+<parameter name="pos" type="int">
+</parameter>
+</method>
+<method name="getHistoricalTouchMajor"
+ return="float"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="pos" type="int">
+</parameter>
+</method>
+<method name="getHistoricalTouchMajor"
+ return="float"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="pointerIndex" type="int">
+</parameter>
+<parameter name="pos" type="int">
+</parameter>
+</method>
+<method name="getHistoricalTouchMinor"
+ return="float"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="pos" type="int">
+</parameter>
+</method>
+<method name="getHistoricalTouchMinor"
+ return="float"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="pointerIndex" type="int">
+</parameter>
+<parameter name="pos" type="int">
+</parameter>
+</method>
 <method name="getHistoricalX"
  return="float"
  abstract="false"
@@ -171643,6 +177815,45 @@
  visibility="public"
 >
 </method>
+<method name="getOrientation"
+ return="float"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getOrientation"
+ return="float"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="pointerIndex" type="int">
+</parameter>
+</method>
+<method name="getPointerCoords"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="pointerIndex" type="int">
+</parameter>
+<parameter name="outPointerCoords" type="android.view.MotionEvent.PointerCoords">
+</parameter>
+</method>
 <method name="getPointerCount"
  return="int"
  abstract="false"
@@ -171737,6 +177948,102 @@
 <parameter name="pointerIndex" type="int">
 </parameter>
 </method>
+<method name="getToolMajor"
+ return="float"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getToolMajor"
+ return="float"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="pointerIndex" type="int">
+</parameter>
+</method>
+<method name="getToolMinor"
+ return="float"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getToolMinor"
+ return="float"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="pointerIndex" type="int">
+</parameter>
+</method>
+<method name="getTouchMajor"
+ return="float"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getTouchMajor"
+ return="float"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="pointerIndex" type="int">
+</parameter>
+</method>
+<method name="getTouchMinor"
+ return="float"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getTouchMinor"
+ return="float"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="pointerIndex" type="int">
+</parameter>
+</method>
 <method name="getX"
  return="float"
  abstract="false"
@@ -171823,6 +178130,41 @@
 </parameter>
 <parameter name="action" type="int">
 </parameter>
+<parameter name="pointers" type="int">
+</parameter>
+<parameter name="pointerIds" type="int[]">
+</parameter>
+<parameter name="pointerCoords" type="android.view.MotionEvent.PointerCoords[]">
+</parameter>
+<parameter name="metaState" type="int">
+</parameter>
+<parameter name="xPrecision" type="float">
+</parameter>
+<parameter name="yPrecision" type="float">
+</parameter>
+<parameter name="deviceId" type="int">
+</parameter>
+<parameter name="edgeFlags" type="int">
+</parameter>
+<parameter name="source" type="int">
+</parameter>
+</method>
+<method name="obtain"
+ return="android.view.MotionEvent"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="downTime" type="long">
+</parameter>
+<parameter name="eventTime" type="long">
+</parameter>
+<parameter name="action" type="int">
+</parameter>
 <parameter name="x" type="float">
 </parameter>
 <parameter name="y" type="float">
@@ -171849,7 +178191,7 @@
  synchronized="false"
  static="true"
  final="false"
- deprecated="not deprecated"
+ deprecated="deprecated"
  visibility="public"
 >
 <parameter name="downTime" type="long">
@@ -171949,7 +178291,7 @@
  native="false"
  synchronized="false"
  static="false"
- final="false"
+ final="true"
  deprecated="not deprecated"
  visibility="public"
 >
@@ -172263,6 +178605,113 @@
 >
 </field>
 </class>
+<class name="MotionEvent.PointerCoords"
+ extends="java.lang.Object"
+ abstract="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="MotionEvent.PointerCoords"
+ type="android.view.MotionEvent.PointerCoords"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<field name="orientation"
+ type="float"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="pressure"
+ type="float"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="size"
+ type="float"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="toolMajor"
+ type="float"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="toolMinor"
+ type="float"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="touchMajor"
+ type="float"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="touchMinor"
+ type="float"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="x"
+ type="float"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="y"
+ type="float"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
 <class name="OrientationEventListener"
  extends="java.lang.Object"
  abstract="true"
@@ -173705,6 +180154,29 @@
 </parameter>
 </method>
 </interface>
+<interface name="SurfaceHolder.Callback2"
+ abstract="true"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="android.view.SurfaceHolder.Callback">
+</implements>
+<method name="surfaceRedrawNeeded"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="holder" type="android.view.SurfaceHolder">
+</parameter>
+</method>
+</interface>
 <class name="SurfaceView"
  extends="android.view.View"
  abstract="false"
@@ -182258,6 +188730,19 @@
 <parameter name="event" type="android.view.MotionEvent">
 </parameter>
 </method>
+<method name="takeInputQueue"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="callback" type="android.view.InputQueue.Callback">
+</parameter>
+</method>
 <method name="takeKeyEvents"
  return="void"
  abstract="true"
@@ -182271,6 +188756,19 @@
 <parameter name="get" type="boolean">
 </parameter>
 </method>
+<method name="takeSurface"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="callback" type="android.view.SurfaceHolder.Callback2">
+</parameter>
+</method>
 <method name="togglePanel"
  return="void"
  abstract="true"
@@ -206654,6 +213152,17 @@
 <parameter name="parent" type="android.view.ViewGroup">
 </parameter>
 </method>
+<method name="clone"
+ return="android.widget.RemoteViews"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
 <method name="describeContents"
  return="int"
  abstract="false"
@@ -214021,7 +220530,7 @@
  deprecated="not deprecated"
  visibility="public"
 >
-<parameter name="arg0" type="T">
+<parameter name="t" type="T">
 </parameter>
 </method>
 </interface>
@@ -216832,6 +223341,19 @@
 <parameter name="parent" type="java.lang.ClassLoader">
 </parameter>
 </constructor>
+<method name="findLibrary"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="libname" type="java.lang.String">
+</parameter>
+</method>
 </class>
 <class name="PotentialDeadlockError"
  extends="java.lang.VirtualMachineError"
diff --git a/camera/libcameraservice/Android.mk b/camera/libcameraservice/Android.mk
deleted file mode 100644
index df5c166..0000000
--- a/camera/libcameraservice/Android.mk
+++ /dev/null
@@ -1,71 +0,0 @@
-LOCAL_PATH:= $(call my-dir)
-
-#
-# Set USE_CAMERA_STUB for non-emulator and non-simulator builds, if you want
-# the camera service to use the fake camera.  For emulator or simulator builds,
-# we always use the fake camera.
-
-ifeq ($(USE_CAMERA_STUB),)
-USE_CAMERA_STUB:=false
-ifneq ($(filter sooner generic sim,$(TARGET_DEVICE)),)
-USE_CAMERA_STUB:=true
-endif #libcamerastub
-endif
-
-ifeq ($(USE_CAMERA_STUB),true)
-#
-# libcamerastub
-#
-
-include $(CLEAR_VARS)
-
-LOCAL_SRC_FILES:=               \
-    CameraHardwareStub.cpp      \
-    FakeCamera.cpp
-
-LOCAL_MODULE:= libcamerastub
-
-ifeq ($(TARGET_SIMULATOR),true)
-LOCAL_CFLAGS += -DSINGLE_PROCESS
-endif
-
-LOCAL_SHARED_LIBRARIES:= libui
-
-include $(BUILD_STATIC_LIBRARY)
-endif # USE_CAMERA_STUB
-
-#
-# libcameraservice
-#
-
-include $(CLEAR_VARS)
-
-LOCAL_SRC_FILES:=               \
-    CameraService.cpp
-
-LOCAL_SHARED_LIBRARIES:= \
-    libui \
-    libutils \
-    libbinder \
-    libcutils \
-    libmedia \
-    libcamera_client \
-    libsurfaceflinger_client
-
-LOCAL_MODULE:= libcameraservice
-
-LOCAL_CFLAGS += -DLOG_TAG=\"CameraService\"
-
-ifeq ($(TARGET_SIMULATOR),true)
-LOCAL_CFLAGS += -DSINGLE_PROCESS
-endif
-
-ifeq ($(USE_CAMERA_STUB), true)
-LOCAL_STATIC_LIBRARIES += libcamerastub
-LOCAL_CFLAGS += -include CameraHardwareStub.h
-else
-LOCAL_SHARED_LIBRARIES += libcamera 
-endif
-
-include $(BUILD_SHARED_LIBRARY)
-
diff --git a/camera/libcameraservice/CameraHardwareStub.cpp b/camera/libcameraservice/CameraHardwareStub.cpp
deleted file mode 100644
index 8b66389..0000000
--- a/camera/libcameraservice/CameraHardwareStub.cpp
+++ /dev/null
@@ -1,402 +0,0 @@
-/*
-**
-** Copyright 2008, The Android Open Source Project
-**
-** Licensed under the Apache License, Version 2.0 (the "License");
-** you may not use this file except in compliance with the License.
-** You may obtain a copy of the License at
-**
-**     http://www.apache.org/licenses/LICENSE-2.0
-**
-** Unless required by applicable law or agreed to in writing, software
-** distributed under the License is distributed on an "AS IS" BASIS,
-** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-** See the License for the specific language governing permissions and
-** limitations under the License.
-*/
-
-#define LOG_TAG "CameraHardwareStub"
-#include <utils/Log.h>
-
-#include "CameraHardwareStub.h"
-#include <utils/threads.h>
-#include <fcntl.h>
-#include <sys/mman.h>
-
-#include "CannedJpeg.h"
-
-namespace android {
-
-CameraHardwareStub::CameraHardwareStub()
-                  : mParameters(),
-                    mPreviewHeap(0),
-                    mRawHeap(0),
-                    mFakeCamera(0),
-                    mPreviewFrameSize(0),
-                    mNotifyCb(0),
-                    mDataCb(0),
-                    mDataCbTimestamp(0),
-                    mCallbackCookie(0),
-                    mMsgEnabled(0),
-                    mCurrentPreviewFrame(0)
-{
-    initDefaultParameters();
-}
-
-void CameraHardwareStub::initDefaultParameters()
-{
-    CameraParameters p;
-
-    p.set("preview-size-values","320x240");
-    p.setPreviewSize(320, 240);
-    p.setPreviewFrameRate(15);
-    p.setPreviewFormat("yuv422sp");
-
-    p.set("picture-size-values", "320x240");
-    p.setPictureSize(320, 240);
-    p.setPictureFormat("jpeg");
-
-    if (setParameters(p) != NO_ERROR) {
-        LOGE("Failed to set default parameters?!");
-    }
-}
-
-void CameraHardwareStub::initHeapLocked()
-{
-    // Create raw heap.
-    int picture_width, picture_height;
-    mParameters.getPictureSize(&picture_width, &picture_height);
-    mRawHeap = new MemoryHeapBase(picture_width * 2 * picture_height);
-
-    int preview_width, preview_height;
-    mParameters.getPreviewSize(&preview_width, &preview_height);
-    LOGD("initHeapLocked: preview size=%dx%d", preview_width, preview_height);
-
-    // Note that we enforce yuv422 in setParameters().
-    int how_big = preview_width * preview_height * 2;
-
-    // If we are being reinitialized to the same size as before, no
-    // work needs to be done.
-    if (how_big == mPreviewFrameSize)
-        return;
-
-    mPreviewFrameSize = how_big;
-
-    // Make a new mmap'ed heap that can be shared across processes.
-    // use code below to test with pmem
-    mPreviewHeap = new MemoryHeapBase(mPreviewFrameSize * kBufferCount);
-    // Make an IMemory for each frame so that we can reuse them in callbacks.
-    for (int i = 0; i < kBufferCount; i++) {
-        mBuffers[i] = new MemoryBase(mPreviewHeap, i * mPreviewFrameSize, mPreviewFrameSize);
-    }
-
-    // Recreate the fake camera to reflect the current size.
-    delete mFakeCamera;
-    mFakeCamera = new FakeCamera(preview_width, preview_height);
-}
-
-CameraHardwareStub::~CameraHardwareStub()
-{
-    delete mFakeCamera;
-    mFakeCamera = 0; // paranoia
-    singleton.clear();
-}
-
-sp<IMemoryHeap> CameraHardwareStub::getPreviewHeap() const
-{
-    return mPreviewHeap;
-}
-
-sp<IMemoryHeap> CameraHardwareStub::getRawHeap() const
-{
-    return mRawHeap;
-}
-
-void CameraHardwareStub::setCallbacks(notify_callback notify_cb,
-                                      data_callback data_cb,
-                                      data_callback_timestamp data_cb_timestamp,
-                                      void* user)
-{
-    Mutex::Autolock lock(mLock);
-    mNotifyCb = notify_cb;
-    mDataCb = data_cb;
-    mDataCbTimestamp = data_cb_timestamp;
-    mCallbackCookie = user;
-}
-
-void CameraHardwareStub::enableMsgType(int32_t msgType)
-{
-    Mutex::Autolock lock(mLock);
-    mMsgEnabled |= msgType;
-}
-
-void CameraHardwareStub::disableMsgType(int32_t msgType)
-{
-    Mutex::Autolock lock(mLock);
-    mMsgEnabled &= ~msgType;
-}
-
-bool CameraHardwareStub::msgTypeEnabled(int32_t msgType)
-{
-    Mutex::Autolock lock(mLock);
-    return (mMsgEnabled & msgType);
-}
-
-// ---------------------------------------------------------------------------
-
-int CameraHardwareStub::previewThread()
-{
-    mLock.lock();
-        // the attributes below can change under our feet...
-
-        int previewFrameRate = mParameters.getPreviewFrameRate();
-
-        // Find the offset within the heap of the current buffer.
-        ssize_t offset = mCurrentPreviewFrame * mPreviewFrameSize;
-
-        sp<MemoryHeapBase> heap = mPreviewHeap;
-
-        // this assumes the internal state of fake camera doesn't change
-        // (or is thread safe)
-        FakeCamera* fakeCamera = mFakeCamera;
-
-        sp<MemoryBase> buffer = mBuffers[mCurrentPreviewFrame];
-
-    mLock.unlock();
-
-    // TODO: here check all the conditions that could go wrong
-    if (buffer != 0) {
-        // Calculate how long to wait between frames.
-        int delay = (int)(1000000.0f / float(previewFrameRate));
-
-        // This is always valid, even if the client died -- the memory
-        // is still mapped in our process.
-        void *base = heap->base();
-
-        // Fill the current frame with the fake camera.
-        uint8_t *frame = ((uint8_t *)base) + offset;
-        fakeCamera->getNextFrameAsYuv422(frame);
-
-        //LOGV("previewThread: generated frame to buffer %d", mCurrentPreviewFrame);
-
-        // Notify the client of a new frame.
-        if (mMsgEnabled & CAMERA_MSG_PREVIEW_FRAME)
-            mDataCb(CAMERA_MSG_PREVIEW_FRAME, buffer, mCallbackCookie);
-
-        // Advance the buffer pointer.
-        mCurrentPreviewFrame = (mCurrentPreviewFrame + 1) % kBufferCount;
-
-        // Wait for it...
-        usleep(delay);
-    }
-
-    return NO_ERROR;
-}
-
-status_t CameraHardwareStub::startPreview()
-{
-    Mutex::Autolock lock(mLock);
-    if (mPreviewThread != 0) {
-        // already running
-        return INVALID_OPERATION;
-    }
-    mPreviewThread = new PreviewThread(this);
-    return NO_ERROR;
-}
-
-void CameraHardwareStub::stopPreview()
-{
-    sp<PreviewThread> previewThread;
-
-    { // scope for the lock
-        Mutex::Autolock lock(mLock);
-        previewThread = mPreviewThread;
-    }
-
-    // don't hold the lock while waiting for the thread to quit
-    if (previewThread != 0) {
-        previewThread->requestExitAndWait();
-    }
-
-    Mutex::Autolock lock(mLock);
-    mPreviewThread.clear();
-}
-
-bool CameraHardwareStub::previewEnabled() {
-    return mPreviewThread != 0;
-}
-
-status_t CameraHardwareStub::startRecording()
-{
-    return UNKNOWN_ERROR;
-}
-
-void CameraHardwareStub::stopRecording()
-{
-}
-
-bool CameraHardwareStub::recordingEnabled()
-{
-    return false;
-}
-
-void CameraHardwareStub::releaseRecordingFrame(const sp<IMemory>& mem)
-{
-}
-
-// ---------------------------------------------------------------------------
-
-int CameraHardwareStub::beginAutoFocusThread(void *cookie)
-{
-    CameraHardwareStub *c = (CameraHardwareStub *)cookie;
-    return c->autoFocusThread();
-}
-
-int CameraHardwareStub::autoFocusThread()
-{
-    if (mMsgEnabled & CAMERA_MSG_FOCUS)
-        mNotifyCb(CAMERA_MSG_FOCUS, true, 0, mCallbackCookie);
-    return NO_ERROR;
-}
-
-status_t CameraHardwareStub::autoFocus()
-{
-    Mutex::Autolock lock(mLock);
-    if (createThread(beginAutoFocusThread, this) == false)
-        return UNKNOWN_ERROR;
-    return NO_ERROR;
-}
-
-status_t CameraHardwareStub::cancelAutoFocus()
-{
-    return NO_ERROR;
-}
-
-/*static*/ int CameraHardwareStub::beginPictureThread(void *cookie)
-{
-    CameraHardwareStub *c = (CameraHardwareStub *)cookie;
-    return c->pictureThread();
-}
-
-int CameraHardwareStub::pictureThread()
-{
-    if (mMsgEnabled & CAMERA_MSG_SHUTTER)
-        mNotifyCb(CAMERA_MSG_SHUTTER, 0, 0, mCallbackCookie);
-
-    if (mMsgEnabled & CAMERA_MSG_RAW_IMAGE) {
-        //FIXME: use a canned YUV image!
-        // In the meantime just make another fake camera picture.
-        int w, h;
-        mParameters.getPictureSize(&w, &h);
-        sp<MemoryBase> mem = new MemoryBase(mRawHeap, 0, w * 2 * h);
-        FakeCamera cam(w, h);
-        cam.getNextFrameAsYuv422((uint8_t *)mRawHeap->base());
-        mDataCb(CAMERA_MSG_RAW_IMAGE, mem, mCallbackCookie);
-    }
-
-    if (mMsgEnabled & CAMERA_MSG_COMPRESSED_IMAGE) {
-        sp<MemoryHeapBase> heap = new MemoryHeapBase(kCannedJpegSize);
-        sp<MemoryBase> mem = new MemoryBase(heap, 0, kCannedJpegSize);
-        memcpy(heap->base(), kCannedJpeg, kCannedJpegSize);
-        mDataCb(CAMERA_MSG_COMPRESSED_IMAGE, mem, mCallbackCookie);
-    }
-    return NO_ERROR;
-}
-
-status_t CameraHardwareStub::takePicture()
-{
-    stopPreview();
-    if (createThread(beginPictureThread, this) == false)
-        return -1;
-    return NO_ERROR;
-}
-
-status_t CameraHardwareStub::cancelPicture()
-{
-    return NO_ERROR;
-}
-
-status_t CameraHardwareStub::dump(int fd, const Vector<String16>& args) const
-{
-    const size_t SIZE = 256;
-    char buffer[SIZE];
-    String8 result;
-    AutoMutex lock(&mLock);
-    if (mFakeCamera != 0) {
-        mFakeCamera->dump(fd);
-        mParameters.dump(fd, args);
-        snprintf(buffer, 255, " preview frame(%d), size (%d), running(%s)\n", mCurrentPreviewFrame, mPreviewFrameSize, mPreviewRunning?"true": "false");
-        result.append(buffer);
-    } else {
-        result.append("No camera client yet.\n");
-    }
-    write(fd, result.string(), result.size());
-    return NO_ERROR;
-}
-
-status_t CameraHardwareStub::setParameters(const CameraParameters& params)
-{
-    Mutex::Autolock lock(mLock);
-    // XXX verify params
-
-    if (strcmp(params.getPreviewFormat(), "yuv422sp") != 0) {
-        LOGE("Only yuv422sp preview is supported");
-        return -1;
-    }
-
-    if (strcmp(params.getPictureFormat(), "jpeg") != 0) {
-        LOGE("Only jpeg still pictures are supported");
-        return -1;
-    }
-
-    int w, h;
-    params.getPictureSize(&w, &h);
-    if (w != kCannedJpegWidth && h != kCannedJpegHeight) {
-        LOGE("Still picture size must be size of canned JPEG (%dx%d)",
-             kCannedJpegWidth, kCannedJpegHeight);
-        return -1;
-    }
-
-    mParameters = params;
-    initHeapLocked();
-
-    return NO_ERROR;
-}
-
-CameraParameters CameraHardwareStub::getParameters() const
-{
-    Mutex::Autolock lock(mLock);
-    return mParameters;
-}
-
-status_t CameraHardwareStub::sendCommand(int32_t command, int32_t arg1,
-                                         int32_t arg2)
-{
-    return BAD_VALUE;
-}
-
-void CameraHardwareStub::release()
-{
-}
-
-wp<CameraHardwareInterface> CameraHardwareStub::singleton;
-
-sp<CameraHardwareInterface> CameraHardwareStub::createInstance()
-{
-    if (singleton != 0) {
-        sp<CameraHardwareInterface> hardware = singleton.promote();
-        if (hardware != 0) {
-            return hardware;
-        }
-    }
-    sp<CameraHardwareInterface> hardware(new CameraHardwareStub());
-    singleton = hardware;
-    return hardware;
-}
-
-extern "C" sp<CameraHardwareInterface> openCameraHardware()
-{
-    return CameraHardwareStub::createInstance();
-}
-
-}; // namespace android
diff --git a/camera/libcameraservice/CameraHardwareStub.h b/camera/libcameraservice/CameraHardwareStub.h
deleted file mode 100644
index 957813a4..0000000
--- a/camera/libcameraservice/CameraHardwareStub.h
+++ /dev/null
@@ -1,135 +0,0 @@
-/*
-**
-** Copyright 2008, The Android Open Source Project
-**
-** Licensed under the Apache License, Version 2.0 (the "License");
-** you may not use this file except in compliance with the License.
-** You may obtain a copy of the License at
-**
-**     http://www.apache.org/licenses/LICENSE-2.0
-**
-** Unless required by applicable law or agreed to in writing, software
-** distributed under the License is distributed on an "AS IS" BASIS,
-** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-** See the License for the specific language governing permissions and
-** limitations under the License.
-*/
-
-#ifndef ANDROID_HARDWARE_CAMERA_HARDWARE_STUB_H
-#define ANDROID_HARDWARE_CAMERA_HARDWARE_STUB_H
-
-#include "FakeCamera.h"
-#include <utils/threads.h>
-#include <camera/CameraHardwareInterface.h>
-#include <binder/MemoryBase.h>
-#include <binder/MemoryHeapBase.h>
-#include <utils/threads.h>
-
-namespace android {
-
-class CameraHardwareStub : public CameraHardwareInterface {
-public:
-    virtual sp<IMemoryHeap> getPreviewHeap() const;
-    virtual sp<IMemoryHeap> getRawHeap() const;
-
-    virtual void        setCallbacks(notify_callback notify_cb,
-                                     data_callback data_cb,
-                                     data_callback_timestamp data_cb_timestamp,
-                                     void* user);
-
-    virtual void        enableMsgType(int32_t msgType);
-    virtual void        disableMsgType(int32_t msgType);
-    virtual bool        msgTypeEnabled(int32_t msgType);
-
-    virtual status_t    startPreview();
-    virtual void        stopPreview();
-    virtual bool        previewEnabled();
-
-    virtual status_t    startRecording();
-    virtual void        stopRecording();
-    virtual bool        recordingEnabled();
-    virtual void        releaseRecordingFrame(const sp<IMemory>& mem);
-
-    virtual status_t    autoFocus();
-    virtual status_t    cancelAutoFocus();
-    virtual status_t    takePicture();
-    virtual status_t    cancelPicture();
-    virtual status_t    dump(int fd, const Vector<String16>& args) const;
-    virtual status_t    setParameters(const CameraParameters& params);
-    virtual CameraParameters  getParameters() const;
-    virtual status_t    sendCommand(int32_t command, int32_t arg1,
-                                    int32_t arg2);
-    virtual void release();
-
-    static sp<CameraHardwareInterface> createInstance();
-
-private:
-                        CameraHardwareStub();
-    virtual             ~CameraHardwareStub();
-
-    static wp<CameraHardwareInterface> singleton;
-
-    static const int kBufferCount = 4;
-
-    class PreviewThread : public Thread {
-        CameraHardwareStub* mHardware;
-    public:
-        PreviewThread(CameraHardwareStub* hw) :
-#ifdef SINGLE_PROCESS
-            // In single process mode this thread needs to be a java thread,
-            // since we won't be calling through the binder.
-            Thread(true),
-#else
-            Thread(false),
-#endif
-              mHardware(hw) { }
-        virtual void onFirstRef() {
-            run("CameraPreviewThread", PRIORITY_URGENT_DISPLAY);
-        }
-        virtual bool threadLoop() {
-            mHardware->previewThread();
-            // loop until we need to quit
-            return true;
-        }
-    };
-
-    void initDefaultParameters();
-    void initHeapLocked();
-
-    int previewThread();
-
-    static int beginAutoFocusThread(void *cookie);
-    int autoFocusThread();
-
-    static int beginPictureThread(void *cookie);
-    int pictureThread();
-
-    mutable Mutex       mLock;
-
-    CameraParameters    mParameters;
-
-    sp<MemoryHeapBase>  mPreviewHeap;
-    sp<MemoryHeapBase>  mRawHeap;
-    sp<MemoryBase>      mBuffers[kBufferCount];
-
-    FakeCamera          *mFakeCamera;
-    bool                mPreviewRunning;
-    int                 mPreviewFrameSize;
-
-    // protected by mLock
-    sp<PreviewThread>   mPreviewThread;
-
-    notify_callback    mNotifyCb;
-    data_callback      mDataCb;
-    data_callback_timestamp mDataCbTimestamp;
-    void               *mCallbackCookie;
-
-    int32_t             mMsgEnabled;
-
-    // only used from PreviewThread
-    int                 mCurrentPreviewFrame;
-};
-
-}; // namespace android
-
-#endif
diff --git a/camera/libcameraservice/CameraService.cpp b/camera/libcameraservice/CameraService.cpp
deleted file mode 100644
index 2690182..0000000
--- a/camera/libcameraservice/CameraService.cpp
+++ /dev/null
@@ -1,1418 +0,0 @@
-/*
-**
-** Copyright (C) 2008, The Android Open Source Project
-** Copyright (C) 2008 HTC Inc.
-**
-** Licensed under the Apache License, Version 2.0 (the "License");
-** you may not use this file except in compliance with the License.
-** You may obtain a copy of the License at
-**
-**     http://www.apache.org/licenses/LICENSE-2.0
-**
-** Unless required by applicable law or agreed to in writing, software
-** distributed under the License is distributed on an "AS IS" BASIS,
-** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-** See the License for the specific language governing permissions and
-** limitations under the License.
-*/
-
-#define LOG_TAG "CameraService"
-#include <utils/Log.h>
-
-#include <binder/IServiceManager.h>
-#include <binder/IPCThreadState.h>
-#include <utils/String16.h>
-#include <utils/Errors.h>
-#include <binder/MemoryBase.h>
-#include <binder/MemoryHeapBase.h>
-#include <camera/ICameraService.h>
-#include <surfaceflinger/ISurface.h>
-#include <ui/Overlay.h>
-
-#include <hardware/hardware.h>
-
-#include <media/mediaplayer.h>
-#include <media/AudioSystem.h>
-#include "CameraService.h"
-
-#include <cutils/atomic.h>
-
-namespace android {
-
-extern "C" {
-#include <stdio.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <fcntl.h>
-#include <pthread.h>
-#include <signal.h>
-}
-
-// When you enable this, as well as DEBUG_REFS=1 and
-// DEBUG_REFS_ENABLED_BY_DEFAULT=0 in libutils/RefBase.cpp, this will track all
-// references to the CameraService::Client in order to catch the case where the
-// client is being destroyed while a callback from the CameraHardwareInterface
-// is outstanding.  This is a serious bug because if we make another call into
-// CameraHardwreInterface that itself triggers a callback, we will deadlock.
-
-#define DEBUG_CLIENT_REFERENCES 0
-
-#define PICTURE_TIMEOUT seconds(5)
-
-#define DEBUG_DUMP_PREVIEW_FRAME_TO_FILE 0 /* n-th frame to write */
-#define DEBUG_DUMP_JPEG_SNAPSHOT_TO_FILE 0
-#define DEBUG_DUMP_YUV_SNAPSHOT_TO_FILE 0
-#define DEBUG_DUMP_POSTVIEW_SNAPSHOT_TO_FILE 0
-
-#if DEBUG_DUMP_PREVIEW_FRAME_TO_FILE
-static int debug_frame_cnt;
-#endif
-
-static int getCallingPid() {
-    return IPCThreadState::self()->getCallingPid();
-}
-
-// ----------------------------------------------------------------------------
-
-void CameraService::instantiate() {
-    defaultServiceManager()->addService(
-            String16("media.camera"), new CameraService());
-}
-
-// ----------------------------------------------------------------------------
-
-CameraService::CameraService() :
-    BnCameraService()
-{
-    LOGI("CameraService started: pid=%d", getpid());
-    mUsers = 0;
-}
-
-CameraService::~CameraService()
-{
-    if (mClient != 0) {
-        LOGE("mClient was still connected in destructor!");
-    }
-}
-
-sp<ICamera> CameraService::connect(const sp<ICameraClient>& cameraClient)
-{
-    int callingPid = getCallingPid();
-    LOGV("CameraService::connect E (pid %d, client %p)", callingPid,
-            cameraClient->asBinder().get());
-
-    Mutex::Autolock lock(mServiceLock);
-    sp<Client> client;
-    if (mClient != 0) {
-        sp<Client> currentClient = mClient.promote();
-        if (currentClient != 0) {
-            sp<ICameraClient> currentCameraClient(currentClient->getCameraClient());
-            if (cameraClient->asBinder() == currentCameraClient->asBinder()) {
-                // This is the same client reconnecting...
-                LOGV("CameraService::connect X (pid %d, same client %p) is reconnecting...",
-                    callingPid, cameraClient->asBinder().get());
-                return currentClient;
-            } else {
-                // It's another client... reject it
-                LOGV("CameraService::connect X (pid %d, new client %p) rejected. "
-                    "(old pid %d, old client %p)",
-                    callingPid, cameraClient->asBinder().get(),
-                    currentClient->mClientPid, currentCameraClient->asBinder().get());
-                if (kill(currentClient->mClientPid, 0) == -1 && errno == ESRCH) {
-                    LOGV("The old client is dead!");
-                }
-                return client;
-            }
-        } else {
-            // can't promote, the previous client has died...
-            LOGV("New client (pid %d) connecting, old reference was dangling...",
-                    callingPid);
-            mClient.clear();
-        }
-    }
-
-    if (mUsers > 0) {
-        LOGV("Still have client, rejected");
-        return client;
-    }
-
-    // create a new Client object
-    client = new Client(this, cameraClient, callingPid);
-    mClient = client;
-#if DEBUG_CLIENT_REFERENCES
-    // Enable tracking for this object, and track increments and decrements of
-    // the refcount.
-    client->trackMe(true, true);
-#endif
-    LOGV("CameraService::connect X");
-    return client;
-}
-
-void CameraService::removeClient(const sp<ICameraClient>& cameraClient)
-{
-    int callingPid = getCallingPid();
-
-    // Declare this outside the lock to make absolutely sure the
-    // destructor won't be called with the lock held.
-    sp<Client> client;
-
-    Mutex::Autolock lock(mServiceLock);
-
-    if (mClient == 0) {
-        // This happens when we have already disconnected.
-        LOGV("removeClient (pid %d): already disconnected", callingPid);
-        return;
-    }
-
-    // Promote mClient. It can fail if we are called from this path:
-    // Client::~Client() -> disconnect() -> removeClient().
-    client = mClient.promote();
-    if (client == 0) {
-        LOGV("removeClient (pid %d): no more strong reference", callingPid);
-        mClient.clear();
-        return;
-    }
-
-    if (cameraClient->asBinder() != client->getCameraClient()->asBinder()) {
-        // ugh! that's not our client!!
-        LOGW("removeClient (pid %d): mClient doesn't match!", callingPid);
-    } else {
-        // okay, good, forget about mClient
-        mClient.clear();
-    }
-
-    LOGV("removeClient (pid %d) done", callingPid);
-}
-
-// The reason we need this count is a new CameraService::connect() request may
-// come in while the previous Client's destructor has not been run or is still
-// running. If the last strong reference of the previous Client is gone but
-// destructor has not been run, we should not allow the new Client to be created
-// because we need to wait for the previous Client to tear down the hardware
-// first.
-void CameraService::incUsers() {
-    android_atomic_inc(&mUsers);
-}
-
-void CameraService::decUsers() {
-    android_atomic_dec(&mUsers);
-}
-
-static sp<MediaPlayer> newMediaPlayer(const char *file)
-{
-    sp<MediaPlayer> mp = new MediaPlayer();
-    if (mp->setDataSource(file, NULL /* headers */) == NO_ERROR) {
-        mp->setAudioStreamType(AudioSystem::ENFORCED_AUDIBLE);
-        mp->prepare();
-    } else {
-        mp.clear();
-        LOGE("Failed to load CameraService sounds.");
-    }
-    return mp;
-}
-
-CameraService::Client::Client(const sp<CameraService>& cameraService,
-        const sp<ICameraClient>& cameraClient, pid_t clientPid)
-{
-    int callingPid = getCallingPid();
-    LOGV("Client::Client E (pid %d)", callingPid);
-    mCameraService = cameraService;
-    mCameraClient = cameraClient;
-    mClientPid = clientPid;
-    mHardware = openCameraHardware();
-    mUseOverlay = mHardware->useOverlay();
-
-    mHardware->setCallbacks(notifyCallback,
-                            dataCallback,
-                            dataCallbackTimestamp,
-                            mCameraService.get());
-
-    // Enable zoom, error, and focus messages by default
-    mHardware->enableMsgType(CAMERA_MSG_ERROR |
-                             CAMERA_MSG_ZOOM |
-                             CAMERA_MSG_FOCUS);
-
-    mMediaPlayerClick = newMediaPlayer("/system/media/audio/ui/camera_click.ogg");
-    mMediaPlayerBeep = newMediaPlayer("/system/media/audio/ui/VideoRecord.ogg");
-    mOverlayW = 0;
-    mOverlayH = 0;
-
-    // Callback is disabled by default
-    mPreviewCallbackFlag = FRAME_CALLBACK_FLAG_NOOP;
-    mOrientation = 0;
-    cameraService->incUsers();
-    LOGV("Client::Client X (pid %d)", callingPid);
-}
-
-status_t CameraService::Client::checkPid()
-{
-    int callingPid = getCallingPid();
-    if (mClientPid == callingPid) return NO_ERROR;
-    LOGW("Attempt to use locked camera (client %p) from different process "
-        " (old pid %d, new pid %d)",
-        getCameraClient()->asBinder().get(), mClientPid, callingPid);
-    return -EBUSY;
-}
-
-status_t CameraService::Client::lock()
-{
-    int callingPid = getCallingPid();
-    LOGV("lock from pid %d (mClientPid %d)", callingPid, mClientPid);
-    Mutex::Autolock _l(mLock);
-    // lock camera to this client if the the camera is unlocked
-    if (mClientPid == 0) {
-        mClientPid = callingPid;
-        return NO_ERROR;
-    }
-    // returns NO_ERROR if the client already owns the camera, -EBUSY otherwise
-    return checkPid();
-}
-
-status_t CameraService::Client::unlock()
-{
-    int callingPid = getCallingPid();
-    LOGV("unlock from pid %d (mClientPid %d)", callingPid, mClientPid);
-    Mutex::Autolock _l(mLock);
-    // allow anyone to use camera
-    status_t result = checkPid();
-    if (result == NO_ERROR) {
-        mClientPid = 0;
-        LOGV("clear mCameraClient (pid %d)", callingPid);
-        // we need to remove the reference so that when app goes
-        // away, the reference count goes to 0.
-        mCameraClient.clear();
-    }
-    return result;
-}
-
-status_t CameraService::Client::connect(const sp<ICameraClient>& client)
-{
-    int callingPid = getCallingPid();
-
-    // connect a new process to the camera
-    LOGV("Client::connect E (pid %d, client %p)", callingPid, client->asBinder().get());
-
-    // I hate this hack, but things get really ugly when the media recorder
-    // service is handing back the camera to the app. The ICameraClient
-    // destructor will be called during the same IPC, making it look like
-    // the remote client is trying to disconnect. This hack temporarily
-    // sets the mClientPid to an invalid pid to prevent the hardware from
-    // being torn down.
-    {
-
-        // hold a reference to the old client or we will deadlock if the client is
-        // in the same process and we hold the lock when we remove the reference
-        sp<ICameraClient> oldClient;
-        {
-            Mutex::Autolock _l(mLock);
-            if (mClientPid != 0 && checkPid() != NO_ERROR) {
-                LOGW("Tried to connect to locked camera (old pid %d, new pid %d)",
-                        mClientPid, callingPid);
-                return -EBUSY;
-            }
-            oldClient = mCameraClient;
-
-            // did the client actually change?
-            if ((mCameraClient != NULL) && (client->asBinder() == mCameraClient->asBinder())) {
-                LOGV("Connect to the same client");
-                return NO_ERROR;
-            }
-
-            mCameraClient = client;
-            mClientPid = -1;
-            mPreviewCallbackFlag = FRAME_CALLBACK_FLAG_NOOP;
-            LOGV("Connect to the new client (pid %d, client %p)",
-                callingPid, mCameraClient->asBinder().get());
-        }
-
-    }
-    // the old client destructor is called when oldClient goes out of scope
-    // now we set the new PID to lock the interface again
-    mClientPid = callingPid;
-
-    return NO_ERROR;
-}
-
-#if HAVE_ANDROID_OS
-static void *unregister_surface(void *arg)
-{
-    ISurface *surface = (ISurface *)arg;
-    surface->unregisterBuffers();
-    IPCThreadState::self()->flushCommands();
-    return NULL;
-}
-#endif
-
-CameraService::Client::~Client()
-{
-    int callingPid = getCallingPid();
-
-    // tear down client
-    LOGV("Client::~Client E (pid %d, client %p)",
-            callingPid, getCameraClient()->asBinder().get());
-    if (mSurface != 0 && !mUseOverlay) {
-#if HAVE_ANDROID_OS
-        pthread_t thr;
-        // We unregister the buffers in a different thread because binder does
-        // not let us make sychronous transactions in a binder destructor (that
-        // is, upon our reaching a refcount of zero.)
-        pthread_create(&thr, NULL,
-                       unregister_surface,
-                       mSurface.get());
-        pthread_join(thr, NULL);
-#else
-        mSurface->unregisterBuffers();
-#endif
-    }
-
-    if (mMediaPlayerBeep.get() != NULL) {
-        mMediaPlayerBeep->disconnect();
-        mMediaPlayerBeep.clear();
-    }
-    if (mMediaPlayerClick.get() != NULL) {
-        mMediaPlayerClick->disconnect();
-        mMediaPlayerClick.clear();
-    }
-
-    // make sure we tear down the hardware
-    mClientPid = callingPid;
-    disconnect();
-    LOGV("Client::~Client X (pid %d)", mClientPid);
-}
-
-void CameraService::Client::disconnect()
-{
-    int callingPid = getCallingPid();
-
-    LOGV("Client::disconnect() E (pid %d client %p)",
-            callingPid, getCameraClient()->asBinder().get());
-
-    Mutex::Autolock lock(mLock);
-    if (mClientPid <= 0) {
-        LOGV("camera is unlocked (mClientPid = %d), don't tear down hardware", mClientPid);
-        return;
-    }
-    if (checkPid() != NO_ERROR) {
-        LOGV("Different client - don't disconnect");
-        return;
-    }
-
-    // Make sure disconnect() is done once and once only, whether it is called
-    // from the user directly, or called by the destructor.
-    if (mHardware == 0) return;
-
-    LOGV("hardware teardown");
-    // Before destroying mHardware, we must make sure it's in the
-    // idle state.
-    mHardware->stopPreview();
-    // Cancel all picture callbacks.
-    mHardware->disableMsgType(CAMERA_MSG_SHUTTER |
-                              CAMERA_MSG_POSTVIEW_FRAME |
-                              CAMERA_MSG_RAW_IMAGE |
-                              CAMERA_MSG_COMPRESSED_IMAGE);
-    mHardware->cancelPicture();
-    // Turn off remaining messages.
-    mHardware->disableMsgType(CAMERA_MSG_ALL_MSGS);
-    // Release the hardware resources.
-    mHardware->release();
-    // Release the held overlay resources.
-    if (mUseOverlay)
-    {
-        mOverlayRef = 0;
-    }
-    mHardware.clear();
-
-    mCameraService->removeClient(mCameraClient);
-    mCameraService->decUsers();
-
-    LOGV("Client::disconnect() X (pid %d)", callingPid);
-}
-
-// pass the buffered ISurface to the camera service
-status_t CameraService::Client::setPreviewDisplay(const sp<ISurface>& surface)
-{
-    LOGV("setPreviewDisplay(%p) (pid %d)",
-         ((surface == NULL) ? NULL : surface.get()), getCallingPid());
-    Mutex::Autolock lock(mLock);
-    status_t result = checkPid();
-    if (result != NO_ERROR) return result;
-
-    Mutex::Autolock surfaceLock(mSurfaceLock);
-    result = NO_ERROR;
-    // asBinder() is safe on NULL (returns NULL)
-    if (surface->asBinder() != mSurface->asBinder()) {
-        if (mSurface != 0) {
-            LOGV("clearing old preview surface %p", mSurface.get());
-            if ( !mUseOverlay)
-            {
-                mSurface->unregisterBuffers();
-            }
-            else
-            {
-                // Force the destruction of any previous overlay
-                sp<Overlay> dummy;
-                mHardware->setOverlay( dummy );
-            }
-        }
-        mSurface = surface;
-        mOverlayRef = 0;
-        // If preview has been already started, set overlay or register preview
-        // buffers now.
-        if (mHardware->previewEnabled()) {
-            if (mUseOverlay) {
-                result = setOverlay();
-            } else if (mSurface != 0) {
-                result = registerPreviewBuffers();
-            }
-        }
-    }
-    return result;
-}
-
-// set the preview callback flag to affect how the received frames from
-// preview are handled.
-void CameraService::Client::setPreviewCallbackFlag(int callback_flag)
-{
-    LOGV("setPreviewCallbackFlag (pid %d)", getCallingPid());
-    Mutex::Autolock lock(mLock);
-    if (checkPid() != NO_ERROR) return;
-    mPreviewCallbackFlag = callback_flag;
-
-    if(mUseOverlay) {
-        if(mPreviewCallbackFlag & FRAME_CALLBACK_FLAG_ENABLE_MASK)
-            mHardware->enableMsgType(CAMERA_MSG_PREVIEW_FRAME);
-        else
-            mHardware->disableMsgType(CAMERA_MSG_PREVIEW_FRAME);
-    }
-}
-
-// start preview mode
-status_t CameraService::Client::startCameraMode(camera_mode mode)
-{
-    int callingPid = getCallingPid();
-
-    LOGV("startCameraMode(%d) (pid %d)", mode, callingPid);
-
-    /* we cannot call into mHardware with mLock held because
-     * mHardware has callbacks onto us which acquire this lock
-     */
-
-    Mutex::Autolock lock(mLock);
-    status_t result = checkPid();
-    if (result != NO_ERROR) return result;
-
-    if (mHardware == 0) {
-        LOGE("mHardware is NULL, returning.");
-        return INVALID_OPERATION;
-    }
-
-    switch(mode) {
-    case CAMERA_RECORDING_MODE:
-        if (mSurface == 0) {
-            LOGE("setPreviewDisplay must be called before startRecordingMode.");
-            return INVALID_OPERATION;
-        }
-        return startRecordingMode();
-
-    default: // CAMERA_PREVIEW_MODE
-        if (mSurface == 0) {
-            LOGV("mSurface is not set yet.");
-        }
-        return startPreviewMode();
-    }
-}
-
-status_t CameraService::Client::startRecordingMode()
-{
-    LOGV("startRecordingMode (pid %d)", getCallingPid());
-
-    status_t ret = UNKNOWN_ERROR;
-
-    // if preview has not been started, start preview first
-    if (!mHardware->previewEnabled()) {
-        ret = startPreviewMode();
-        if (ret != NO_ERROR) {
-            return ret;
-        }
-    }
-
-    // if recording has been enabled, nothing needs to be done
-    if (mHardware->recordingEnabled()) {
-        return NO_ERROR;
-    }
-
-    // start recording mode
-    ret = mHardware->startRecording();
-    if (ret != NO_ERROR) {
-        LOGE("mHardware->startRecording() failed with status %d", ret);
-    }
-    return ret;
-}
-
-status_t CameraService::Client::setOverlay()
-{
-    LOGV("setOverlay");
-    int w, h;
-    CameraParameters params(mHardware->getParameters());
-    params.getPreviewSize(&w, &h);
-
-    if ( w != mOverlayW || h != mOverlayH )
-    {
-        // Force the destruction of any previous overlay
-        sp<Overlay> dummy;
-        mHardware->setOverlay( dummy );
-        mOverlayRef = 0;
-    }
-
-    status_t ret = NO_ERROR;
-    if (mSurface != 0) {
-        if (mOverlayRef.get() == NULL) {
-
-            // FIXME:
-            // Surfaceflinger may hold onto the previous overlay reference for some
-            // time after we try to destroy it. retry a few times. In the future, we
-            // should make the destroy call block, or possibly specify that we can
-            // wait in the createOverlay call if the previous overlay is in the 
-            // process of being destroyed.
-            for (int retry = 0; retry < 50; ++retry) {
-                mOverlayRef = mSurface->createOverlay(w, h, OVERLAY_FORMAT_DEFAULT,
-                                                      mOrientation);
-                if (mOverlayRef != NULL) break;
-                LOGW("Overlay create failed - retrying");
-                usleep(20000);
-            }
-            if ( mOverlayRef.get() == NULL )
-            {
-                LOGE("Overlay Creation Failed!");
-                return -EINVAL;
-            }
-            ret = mHardware->setOverlay(new Overlay(mOverlayRef));
-        }
-    } else {
-        ret = mHardware->setOverlay(NULL);
-    }
-    if (ret != NO_ERROR) {
-        LOGE("mHardware->setOverlay() failed with status %d\n", ret);
-    }
-
-    mOverlayW = w;
-    mOverlayH = h;
-
-    return ret;
-}
-
-status_t CameraService::Client::registerPreviewBuffers()
-{
-    int w, h;
-    CameraParameters params(mHardware->getParameters());
-    params.getPreviewSize(&w, &h);
-
-    // don't use a hardcoded format here
-    ISurface::BufferHeap buffers(w, h, w, h,
-                                 HAL_PIXEL_FORMAT_YCrCb_420_SP,
-                                 mOrientation,
-                                 0,
-                                 mHardware->getPreviewHeap());
-
-    status_t ret = mSurface->registerBuffers(buffers);
-    if (ret != NO_ERROR) {
-        LOGE("registerBuffers failed with status %d", ret);
-    }
-    return ret;
-}
-
-status_t CameraService::Client::startPreviewMode()
-{
-    LOGV("startPreviewMode (pid %d)", getCallingPid());
-
-    // if preview has been enabled, nothing needs to be done
-    if (mHardware->previewEnabled()) {
-        return NO_ERROR;
-    }
-
-    // start preview mode
-#if DEBUG_DUMP_PREVIEW_FRAME_TO_FILE
-    debug_frame_cnt = 0;
-#endif
-    status_t ret = NO_ERROR;
-
-    if (mUseOverlay) {
-        // If preview display has been set, set overlay now.
-        if (mSurface != 0) {
-            ret = setOverlay();
-        }
-        if (ret != NO_ERROR) return ret;
-        ret = mHardware->startPreview();
-    } else {
-        mHardware->enableMsgType(CAMERA_MSG_PREVIEW_FRAME);
-        ret = mHardware->startPreview();
-        if (ret != NO_ERROR) return ret;
-        // If preview display has been set, register preview buffers now.
-        if (mSurface != 0) {
-           // Unregister here because the surface registered with raw heap.
-           mSurface->unregisterBuffers();
-           ret = registerPreviewBuffers();
-        }
-    }
-    return ret;
-}
-
-status_t CameraService::Client::startPreview()
-{
-    LOGV("startPreview (pid %d)", getCallingPid());
-
-    return startCameraMode(CAMERA_PREVIEW_MODE);
-}
-
-status_t CameraService::Client::startRecording()
-{
-    LOGV("startRecording (pid %d)", getCallingPid());
-
-    if (mMediaPlayerBeep.get() != NULL) {
-        // do not play record jingle if stream volume is 0
-        // (typically because ringer mode is silent).
-        int index;
-        AudioSystem::getStreamVolumeIndex(AudioSystem::ENFORCED_AUDIBLE, &index);
-        if (index != 0) {
-            mMediaPlayerBeep->seekTo(0);
-            mMediaPlayerBeep->start();
-        }
-    }
-
-    mHardware->enableMsgType(CAMERA_MSG_VIDEO_FRAME);
-
-    return startCameraMode(CAMERA_RECORDING_MODE);
-}
-
-// stop preview mode
-void CameraService::Client::stopPreview()
-{
-    LOGV("stopPreview (pid %d)", getCallingPid());
-
-    // hold main lock during state transition
-    {
-        Mutex::Autolock lock(mLock);
-        if (checkPid() != NO_ERROR) return;
-
-        if (mHardware == 0) {
-            LOGE("mHardware is NULL, returning.");
-            return;
-        }
-
-        mHardware->stopPreview();
-        mHardware->disableMsgType(CAMERA_MSG_PREVIEW_FRAME);
-        LOGV("stopPreview(), hardware stopped OK");
-
-        if (mSurface != 0 && !mUseOverlay) {
-            mSurface->unregisterBuffers();
-        }
-    }
-
-    // hold preview buffer lock
-    {
-        Mutex::Autolock lock(mPreviewLock);
-        mPreviewBuffer.clear();
-    }
-}
-
-// stop recording mode
-void CameraService::Client::stopRecording()
-{
-    LOGV("stopRecording (pid %d)", getCallingPid());
-
-    // hold main lock during state transition
-    {
-        Mutex::Autolock lock(mLock);
-        if (checkPid() != NO_ERROR) return;
-
-        if (mHardware == 0) {
-            LOGE("mHardware is NULL, returning.");
-            return;
-        }
-
-        if (mMediaPlayerBeep.get() != NULL) {
-            mMediaPlayerBeep->seekTo(0);
-            mMediaPlayerBeep->start();
-        }
-
-        mHardware->stopRecording();
-        mHardware->disableMsgType(CAMERA_MSG_VIDEO_FRAME);
-        LOGV("stopRecording(), hardware stopped OK");
-    }
-
-    // hold preview buffer lock
-    {
-        Mutex::Autolock lock(mPreviewLock);
-        mPreviewBuffer.clear();
-    }
-}
-
-// release a recording frame
-void CameraService::Client::releaseRecordingFrame(const sp<IMemory>& mem)
-{
-    Mutex::Autolock lock(mLock);
-    if (checkPid() != NO_ERROR) return;
-
-    if (mHardware == 0) {
-        LOGE("mHardware is NULL, returning.");
-        return;
-    }
-
-    mHardware->releaseRecordingFrame(mem);
-}
-
-bool CameraService::Client::previewEnabled()
-{
-    Mutex::Autolock lock(mLock);
-    if (mHardware == 0) return false;
-    return mHardware->previewEnabled();
-}
-
-bool CameraService::Client::recordingEnabled()
-{
-    Mutex::Autolock lock(mLock);
-    if (mHardware == 0) return false;
-    return mHardware->recordingEnabled();
-}
-
-// Safely retrieves a strong pointer to the client during a hardware callback.
-sp<CameraService::Client> CameraService::Client::getClientFromCookie(void* user)
-{
-    sp<Client> client = 0;
-    CameraService *service = static_cast<CameraService*>(user);
-    if (service != NULL) {
-        Mutex::Autolock ourLock(service->mServiceLock);
-        if (service->mClient != 0) {
-            client = service->mClient.promote();
-            if (client == 0) {
-                LOGE("getClientFromCookie: client appears to have died");
-                service->mClient.clear();
-            }
-        } else {
-            LOGE("getClientFromCookie: got callback but client was NULL");
-        }
-    }
-    return client;
-}
-
-
-#if DEBUG_DUMP_JPEG_SNAPSHOT_TO_FILE || \
-    DEBUG_DUMP_YUV_SNAPSHOT_TO_FILE || \
-    DEBUG_DUMP_PREVIEW_FRAME_TO_FILE
-static void dump_to_file(const char *fname,
-                         uint8_t *buf, uint32_t size)
-{
-    int nw, cnt = 0;
-    uint32_t written = 0;
-
-    LOGV("opening file [%s]\n", fname);
-    int fd = open(fname, O_RDWR | O_CREAT);
-    if (fd < 0) {
-        LOGE("failed to create file [%s]: %s", fname, strerror(errno));
-        return;
-    }
-
-    LOGV("writing %d bytes to file [%s]\n", size, fname);
-    while (written < size) {
-        nw = ::write(fd,
-                     buf + written,
-                     size - written);
-        if (nw < 0) {
-            LOGE("failed to write to file [%s]: %s",
-                 fname, strerror(errno));
-            break;
-        }
-        written += nw;
-        cnt++;
-    }
-    LOGV("done writing %d bytes to file [%s] in %d passes\n",
-         size, fname, cnt);
-    ::close(fd);
-}
-#endif
-
-status_t CameraService::Client::autoFocus()
-{
-    LOGV("autoFocus (pid %d)", getCallingPid());
-
-    Mutex::Autolock lock(mLock);
-    status_t result = checkPid();
-    if (result != NO_ERROR) return result;
-
-    if (mHardware == 0) {
-        LOGE("mHardware is NULL, returning.");
-        return INVALID_OPERATION;
-    }
-
-    return mHardware->autoFocus();
-}
-
-status_t CameraService::Client::cancelAutoFocus()
-{
-    LOGV("cancelAutoFocus (pid %d)", getCallingPid());
-
-    Mutex::Autolock lock(mLock);
-    status_t result = checkPid();
-    if (result != NO_ERROR) return result;
-
-    if (mHardware == 0) {
-        LOGE("mHardware is NULL, returning.");
-        return INVALID_OPERATION;
-    }
-
-    return mHardware->cancelAutoFocus();
-}
-
-// take a picture - image is returned in callback
-status_t CameraService::Client::takePicture()
-{
-    LOGV("takePicture (pid %d)", getCallingPid());
-
-    Mutex::Autolock lock(mLock);
-    status_t result = checkPid();
-    if (result != NO_ERROR) return result;
-
-    if (mHardware == 0) {
-        LOGE("mHardware is NULL, returning.");
-        return INVALID_OPERATION;
-    }
-
-    mHardware->enableMsgType(CAMERA_MSG_SHUTTER |
-                             CAMERA_MSG_POSTVIEW_FRAME |
-                             CAMERA_MSG_RAW_IMAGE |
-                             CAMERA_MSG_COMPRESSED_IMAGE);
-
-    return mHardware->takePicture();
-}
-
-// snapshot taken
-void CameraService::Client::handleShutter(
-    image_rect_type *size // The width and height of yuv picture for
-                          // registerBuffer. If this is NULL, use the picture
-                          // size from parameters.
-)
-{
-    // Play shutter sound.
-    if (mMediaPlayerClick.get() != NULL) {
-        // do not play shutter sound if stream volume is 0
-        // (typically because ringer mode is silent).
-        int index;
-        AudioSystem::getStreamVolumeIndex(AudioSystem::ENFORCED_AUDIBLE, &index);
-        if (index != 0) {
-            mMediaPlayerClick->seekTo(0);
-            mMediaPlayerClick->start();
-        }
-    }
-
-    // Screen goes black after the buffer is unregistered.
-    if (mSurface != 0 && !mUseOverlay) {
-        mSurface->unregisterBuffers();
-    }
-
-    sp<ICameraClient> c = mCameraClient;
-    if (c != NULL) {
-        c->notifyCallback(CAMERA_MSG_SHUTTER, 0, 0);
-    }
-    mHardware->disableMsgType(CAMERA_MSG_SHUTTER);
-
-    // It takes some time before yuvPicture callback to be called.
-    // Register the buffer for raw image here to reduce latency.
-    if (mSurface != 0 && !mUseOverlay) {
-        int w, h;
-        CameraParameters params(mHardware->getParameters());
-        if (size == NULL) {
-            params.getPictureSize(&w, &h);
-        } else {
-            w = size->width;
-            h = size->height;
-            w &= ~1;
-            h &= ~1;
-            LOGV("Snapshot image width=%d, height=%d", w, h);
-        }
-        // FIXME: don't use hardcoded format constants here
-        ISurface::BufferHeap buffers(w, h, w, h,
-            HAL_PIXEL_FORMAT_YCrCb_420_SP, mOrientation, 0,
-            mHardware->getRawHeap());
-
-        mSurface->registerBuffers(buffers);
-        IPCThreadState::self()->flushCommands();
-    }
-}
-
-// preview callback - frame buffer update
-void CameraService::Client::handlePreviewData(const sp<IMemory>& mem)
-{
-    ssize_t offset;
-    size_t size;
-    sp<IMemoryHeap> heap = mem->getMemory(&offset, &size);
-
-#if DEBUG_HEAP_LEAKS && 0 // debugging
-    if (gWeakHeap == NULL) {
-        if (gWeakHeap != heap) {
-            LOGV("SETTING PREVIEW HEAP");
-            heap->trackMe(true, true);
-            gWeakHeap = heap;
-        }
-    }
-#endif
-#if DEBUG_DUMP_PREVIEW_FRAME_TO_FILE
-    {
-        if (debug_frame_cnt++ == DEBUG_DUMP_PREVIEW_FRAME_TO_FILE) {
-            dump_to_file("/data/preview.yuv",
-                         (uint8_t *)heap->base() + offset, size);
-        }
-    }
-#endif
-
-    if (!mUseOverlay)
-    {
-        Mutex::Autolock surfaceLock(mSurfaceLock);
-        if (mSurface != NULL) {
-            mSurface->postBuffer(offset);
-        }
-    }
-
-    // local copy of the callback flags
-    int flags = mPreviewCallbackFlag;
-
-    // is callback enabled?
-    if (!(flags & FRAME_CALLBACK_FLAG_ENABLE_MASK)) {
-        // If the enable bit is off, the copy-out and one-shot bits are ignored
-        LOGV("frame callback is diabled");
-        return;
-    }
-
-    // hold a strong pointer to the client
-    sp<ICameraClient> c = mCameraClient;
-
-    // clear callback flags if no client or one-shot mode
-    if ((c == NULL) || (mPreviewCallbackFlag & FRAME_CALLBACK_FLAG_ONE_SHOT_MASK)) {
-        LOGV("Disable preview callback");
-        mPreviewCallbackFlag &= ~(FRAME_CALLBACK_FLAG_ONE_SHOT_MASK |
-                                FRAME_CALLBACK_FLAG_COPY_OUT_MASK |
-                                FRAME_CALLBACK_FLAG_ENABLE_MASK);
-        // TODO: Shouldn't we use this API for non-overlay hardware as well?
-        if (mUseOverlay)
-            mHardware->disableMsgType(CAMERA_MSG_PREVIEW_FRAME);
-    }
-
-    // Is the received frame copied out or not?
-    if (flags & FRAME_CALLBACK_FLAG_COPY_OUT_MASK) {
-        LOGV("frame is copied");
-        copyFrameAndPostCopiedFrame(c, heap, offset, size);
-    } else {
-        LOGV("frame is forwarded");
-        c->dataCallback(CAMERA_MSG_PREVIEW_FRAME, mem);
-    }
-}
-
-// picture callback - postview image ready
-void CameraService::Client::handlePostview(const sp<IMemory>& mem)
-{
-#if DEBUG_DUMP_POSTVIEW_SNAPSHOT_TO_FILE // for testing pursposes only
-    {
-        ssize_t offset;
-        size_t size;
-        sp<IMemoryHeap> heap = mem->getMemory(&offset, &size);
-        dump_to_file("/data/postview.yuv",
-                     (uint8_t *)heap->base() + offset, size);
-    }
-#endif
-
-    sp<ICameraClient> c = mCameraClient;
-    if (c != NULL) {
-        c->dataCallback(CAMERA_MSG_POSTVIEW_FRAME, mem);
-    }
-    mHardware->disableMsgType(CAMERA_MSG_POSTVIEW_FRAME);
-}
-
-// picture callback - raw image ready
-void CameraService::Client::handleRawPicture(const sp<IMemory>& mem)
-{
-    ssize_t offset;
-    size_t size;
-    sp<IMemoryHeap> heap = mem->getMemory(&offset, &size);
-#if DEBUG_HEAP_LEAKS && 0 // debugging
-    gWeakHeap = heap; // debugging
-#endif
-
-    //LOGV("handleRawPicture(%d, %d)", offset, size);
-#if DEBUG_DUMP_YUV_SNAPSHOT_TO_FILE // for testing pursposes only
-    dump_to_file("/data/photo.yuv",
-                 (uint8_t *)heap->base() + offset, size);
-#endif
-
-    // Put the YUV version of the snapshot in the preview display.
-    if (mSurface != 0 && !mUseOverlay) {
-        mSurface->postBuffer(offset);
-    }
-
-    sp<ICameraClient> c = mCameraClient;
-    if (c != NULL) {
-        c->dataCallback(CAMERA_MSG_RAW_IMAGE, mem);
-    }
-    mHardware->disableMsgType(CAMERA_MSG_RAW_IMAGE);
-}
-
-// picture callback - compressed picture ready
-void CameraService::Client::handleCompressedPicture(const sp<IMemory>& mem)
-{
-#if DEBUG_DUMP_JPEG_SNAPSHOT_TO_FILE // for testing pursposes only
-    {
-        ssize_t offset;
-        size_t size;
-        sp<IMemoryHeap> heap = mem->getMemory(&offset, &size);
-        dump_to_file("/data/photo.jpg",
-                     (uint8_t *)heap->base() + offset, size);
-    }
-#endif
-
-    sp<ICameraClient> c = mCameraClient;
-    if (c != NULL) {
-        c->dataCallback(CAMERA_MSG_COMPRESSED_IMAGE, mem);
-    }
-    mHardware->disableMsgType(CAMERA_MSG_COMPRESSED_IMAGE);
-}
-
-void CameraService::Client::notifyCallback(int32_t msgType, int32_t ext1, int32_t ext2, void* user)
-{
-    LOGV("notifyCallback(%d)", msgType);
-
-    sp<Client> client = getClientFromCookie(user);
-    if (client == 0) {
-        return;
-    }
-
-    switch (msgType) {
-        case CAMERA_MSG_SHUTTER:
-            // ext1 is the dimension of the yuv picture.
-            client->handleShutter((image_rect_type *)ext1);
-            break;
-        default:
-            sp<ICameraClient> c = client->mCameraClient;
-            if (c != NULL) {
-                c->notifyCallback(msgType, ext1, ext2);
-            }
-            break;
-    }
-
-#if DEBUG_CLIENT_REFERENCES
-    if (client->getStrongCount() == 1) {
-        LOGE("++++++++++++++++ (NOTIFY CALLBACK) THIS WILL CAUSE A LOCKUP!");
-        client->printRefs();
-    }
-#endif
-}
-
-void CameraService::Client::dataCallback(int32_t msgType, const sp<IMemory>& dataPtr, void* user)
-{
-    LOGV("dataCallback(%d)", msgType);
-
-    sp<Client> client = getClientFromCookie(user);
-    if (client == 0) {
-        return;
-    }
-
-    sp<ICameraClient> c = client->mCameraClient;
-    if (dataPtr == NULL) {
-        LOGE("Null data returned in data callback");
-        if (c != NULL) {
-            c->notifyCallback(CAMERA_MSG_ERROR, UNKNOWN_ERROR, 0);
-            c->dataCallback(msgType, NULL);
-        }
-        return;
-    }
-
-    switch (msgType) {
-        case CAMERA_MSG_PREVIEW_FRAME:
-            client->handlePreviewData(dataPtr);
-            break;
-        case CAMERA_MSG_POSTVIEW_FRAME:
-            client->handlePostview(dataPtr);
-            break;
-        case CAMERA_MSG_RAW_IMAGE:
-            client->handleRawPicture(dataPtr);
-            break;
-        case CAMERA_MSG_COMPRESSED_IMAGE:
-            client->handleCompressedPicture(dataPtr);
-            break;
-        default:
-            if (c != NULL) {
-                c->dataCallback(msgType, dataPtr);
-            }
-            break;
-    }
-
-#if DEBUG_CLIENT_REFERENCES
-    if (client->getStrongCount() == 1) {
-        LOGE("++++++++++++++++ (DATA CALLBACK) THIS WILL CAUSE A LOCKUP!");
-        client->printRefs();
-    }
-#endif
-}
-
-void CameraService::Client::dataCallbackTimestamp(nsecs_t timestamp, int32_t msgType,
-                                                  const sp<IMemory>& dataPtr, void* user)
-{
-    LOGV("dataCallbackTimestamp(%d)", msgType);
-
-    sp<Client> client = getClientFromCookie(user);
-    if (client == 0) {
-        return;
-    }
-    sp<ICameraClient> c = client->mCameraClient;
-
-    if (dataPtr == NULL) {
-        LOGE("Null data returned in data with timestamp callback");
-        if (c != NULL) {
-            c->notifyCallback(CAMERA_MSG_ERROR, UNKNOWN_ERROR, 0);
-            c->dataCallbackTimestamp(0, msgType, NULL);
-        }
-        return;
-    }
-
-    if (c != NULL) {
-        c->dataCallbackTimestamp(timestamp, msgType, dataPtr);
-    }
-
-#if DEBUG_CLIENT_REFERENCES
-    if (client->getStrongCount() == 1) {
-        LOGE("++++++++++++++++ (DATA CALLBACK TIMESTAMP) THIS WILL CAUSE A LOCKUP!");
-        client->printRefs();
-    }
-#endif
-}
-
-// set preview/capture parameters - key/value pairs
-status_t CameraService::Client::setParameters(const String8& params)
-{
-    LOGV("setParameters(%s)", params.string());
-
-    Mutex::Autolock lock(mLock);
-    status_t result = checkPid();
-    if (result != NO_ERROR) return result;
-
-    if (mHardware == 0) {
-        LOGE("mHardware is NULL, returning.");
-        return INVALID_OPERATION;
-    }
-
-    CameraParameters p(params);
-
-    return mHardware->setParameters(p);
-}
-
-// get preview/capture parameters - key/value pairs
-String8 CameraService::Client::getParameters() const
-{
-    Mutex::Autolock lock(mLock);
-
-    if (mHardware == 0) {
-        LOGE("mHardware is NULL, returning.");
-        return String8();
-    }
-
-    String8 params(mHardware->getParameters().flatten());
-    LOGV("getParameters(%s)", params.string());
-    return params;
-}
-
-status_t CameraService::Client::sendCommand(int32_t cmd, int32_t arg1, int32_t arg2)
-{
-    LOGV("sendCommand (pid %d)", getCallingPid());
-    Mutex::Autolock lock(mLock);
-    status_t result = checkPid();
-    if (result != NO_ERROR) return result;
-
-    if (cmd == CAMERA_CMD_SET_DISPLAY_ORIENTATION) {
-        // The orientation cannot be set during preview.
-        if (mHardware->previewEnabled()) {
-            return INVALID_OPERATION;
-        }
-        switch (arg1) {
-            case 0:
-                mOrientation = ISurface::BufferHeap::ROT_0;
-                break;
-            case 90:
-                mOrientation = ISurface::BufferHeap::ROT_90;
-                break;
-            case 180:
-                mOrientation = ISurface::BufferHeap::ROT_180;
-                break;
-            case 270:
-                mOrientation = ISurface::BufferHeap::ROT_270;
-                break;
-            default:
-                return BAD_VALUE;
-        }
-        return OK;
-    }
-
-    if (mHardware == 0) {
-        LOGE("mHardware is NULL, returning.");
-        return INVALID_OPERATION;
-    }
-
-    return mHardware->sendCommand(cmd, arg1, arg2);
-}
-
-void CameraService::Client::copyFrameAndPostCopiedFrame(const sp<ICameraClient>& client,
-        const sp<IMemoryHeap>& heap, size_t offset, size_t size)
-{
-    LOGV("copyFrameAndPostCopiedFrame");
-    // It is necessary to copy out of pmem before sending this to
-    // the callback. For efficiency, reuse the same MemoryHeapBase
-    // provided it's big enough. Don't allocate the memory or
-    // perform the copy if there's no callback.
-
-    // hold the preview lock while we grab a reference to the preview buffer
-    sp<MemoryHeapBase> previewBuffer;
-    {
-        Mutex::Autolock lock(mPreviewLock);
-        if (mPreviewBuffer == 0) {
-            mPreviewBuffer = new MemoryHeapBase(size, 0, NULL);
-        } else if (size > mPreviewBuffer->virtualSize()) {
-            mPreviewBuffer.clear();
-            mPreviewBuffer = new MemoryHeapBase(size, 0, NULL);
-        }
-        if (mPreviewBuffer == 0) {
-            LOGE("failed to allocate space for preview buffer");
-            return;
-        }
-        previewBuffer = mPreviewBuffer;
-    }
-    memcpy(previewBuffer->base(),
-           (uint8_t *)heap->base() + offset, size);
-
-    sp<MemoryBase> frame = new MemoryBase(previewBuffer, 0, size);
-    if (frame == 0) {
-        LOGE("failed to allocate space for frame callback");
-        return;
-    }
-    client->dataCallback(CAMERA_MSG_PREVIEW_FRAME, frame);
-}
-
-static const int kDumpLockRetries = 50;
-static const int kDumpLockSleep = 60000;
-
-static bool tryLock(Mutex& mutex)
-{
-    bool locked = false;
-    for (int i = 0; i < kDumpLockRetries; ++i) {
-        if (mutex.tryLock() == NO_ERROR) {
-            locked = true;
-            break;
-        }
-        usleep(kDumpLockSleep);
-    }
-    return locked;
-}
-
-status_t CameraService::dump(int fd, const Vector<String16>& args)
-{
-    static const char* kDeadlockedString = "CameraService may be deadlocked\n";
-
-    const size_t SIZE = 256;
-    char buffer[SIZE];
-    String8 result;
-    if (checkCallingPermission(String16("android.permission.DUMP")) == false) {
-        snprintf(buffer, SIZE, "Permission Denial: "
-                "can't dump CameraService from pid=%d, uid=%d\n",
-                getCallingPid(),
-                IPCThreadState::self()->getCallingUid());
-        result.append(buffer);
-        write(fd, result.string(), result.size());
-    } else {
-        bool locked = tryLock(mServiceLock);
-        // failed to lock - CameraService is probably deadlocked
-        if (!locked) {
-            String8 result(kDeadlockedString);
-            write(fd, result.string(), result.size());
-        }
-
-        if (mClient != 0) {
-            sp<Client> currentClient = mClient.promote();
-            sprintf(buffer, "Client (%p) PID: %d\n",
-                    currentClient->getCameraClient()->asBinder().get(),
-                    currentClient->mClientPid);
-            result.append(buffer);
-            write(fd, result.string(), result.size());
-            currentClient->mHardware->dump(fd, args);
-        } else {
-            result.append("No camera client yet.\n");
-            write(fd, result.string(), result.size());
-        }
-
-        if (locked) mServiceLock.unlock();
-    }
-    return NO_ERROR;
-}
-
-
-status_t CameraService::onTransact(
-    uint32_t code, const Parcel& data, Parcel* reply, uint32_t flags)
-{
-    // permission checks...
-    switch (code) {
-        case BnCameraService::CONNECT:
-            IPCThreadState* ipc = IPCThreadState::self();
-            const int pid = ipc->getCallingPid();
-            const int self_pid = getpid();
-            if (pid != self_pid) {
-                // we're called from a different process, do the real check
-                if (!checkCallingPermission(
-                        String16("android.permission.CAMERA")))
-                {
-                    const int uid = ipc->getCallingUid();
-                    LOGE("Permission Denial: "
-                            "can't use the camera pid=%d, uid=%d", pid, uid);
-                    return PERMISSION_DENIED;
-                }
-            }
-            break;
-    }
-
-    status_t err = BnCameraService::onTransact(code, data, reply, flags);
-
-#if DEBUG_HEAP_LEAKS
-    LOGV("+++ onTransact err %d code %d", err, code);
-
-    if (err == UNKNOWN_TRANSACTION || err == PERMISSION_DENIED) {
-        // the 'service' command interrogates this binder for its name, and then supplies it
-        // even for the debugging commands.  that means we need to check for it here, using
-        // ISurfaceComposer (since we delegated the INTERFACE_TRANSACTION handling to
-        // BnSurfaceComposer before falling through to this code).
-
-        LOGV("+++ onTransact code %d", code);
-
-        CHECK_INTERFACE(ICameraService, data, reply);
-
-        switch(code) {
-        case 1000:
-        {
-            if (gWeakHeap != 0) {
-                sp<IMemoryHeap> h = gWeakHeap.promote();
-                IMemoryHeap *p = gWeakHeap.unsafe_get();
-                LOGV("CHECKING WEAK REFERENCE %p (%p)", h.get(), p);
-                if (h != 0)
-                    h->printRefs();
-                bool attempt_to_delete = data.readInt32() == 1;
-                if (attempt_to_delete) {
-                    // NOT SAFE!
-                    LOGV("DELETING WEAK REFERENCE %p (%p)", h.get(), p);
-                    if (p) delete p;
-                }
-                return NO_ERROR;
-            }
-        }
-        break;
-        default:
-            break;
-        }
-    }
-#endif // DEBUG_HEAP_LEAKS
-
-    return err;
-}
-
-}; // namespace android
diff --git a/camera/libcameraservice/CameraService.h b/camera/libcameraservice/CameraService.h
deleted file mode 100644
index bc49b1d..0000000
--- a/camera/libcameraservice/CameraService.h
+++ /dev/null
@@ -1,227 +0,0 @@
-/*
-**
-** Copyright (C) 2008, The Android Open Source Project
-** Copyright (C) 2008 HTC Inc.
-**
-** Licensed under the Apache License, Version 2.0 (the "License");
-** you may not use this file except in compliance with the License.
-** You may obtain a copy of the License at
-**
-**     http://www.apache.org/licenses/LICENSE-2.0
-**
-** Unless required by applicable law or agreed to in writing, software
-** distributed under the License is distributed on an "AS IS" BASIS,
-** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-** See the License for the specific language governing permissions and
-** limitations under the License.
-*/
-
-#ifndef ANDROID_SERVERS_CAMERA_CAMERASERVICE_H
-#define ANDROID_SERVERS_CAMERA_CAMERASERVICE_H
-
-#include <camera/ICameraService.h>
-#include <camera/CameraHardwareInterface.h>
-#include <camera/Camera.h>
-
-namespace android {
-
-class MemoryHeapBase;
-class MediaPlayer;
-
-// ----------------------------------------------------------------------------
-
-#define LIKELY( exp )       (__builtin_expect( (exp) != 0, true  ))
-#define UNLIKELY( exp )     (__builtin_expect( (exp) != 0, false ))
-
-// When enabled, this feature allows you to send an event to the CameraService
-// so that you can cause all references to the heap object gWeakHeap, defined
-// below, to be printed. You will also need to set DEBUG_REFS=1 and
-// DEBUG_REFS_ENABLED_BY_DEFAULT=0 in libutils/RefBase.cpp. You just have to
-// set gWeakHeap to the appropriate heap you want to track.
-
-#define DEBUG_HEAP_LEAKS 0
-
-// ----------------------------------------------------------------------------
-
-class CameraService : public BnCameraService
-{
-    class Client;
-
-public:
-    static void instantiate();
-
-    // ICameraService interface
-    virtual sp<ICamera>     connect(const sp<ICameraClient>& cameraClient);
-
-    virtual status_t        dump(int fd, const Vector<String16>& args);
-
-            void            removeClient(const sp<ICameraClient>& cameraClient);
-
-    virtual status_t onTransact(
-        uint32_t code, const Parcel& data, Parcel* reply, uint32_t flags);
-
-private:
-
-// ----------------------------------------------------------------------------
-
-    class Client : public BnCamera {
-
-    public:
-        virtual void            disconnect();
-
-        // connect new client with existing camera remote
-        virtual status_t        connect(const sp<ICameraClient>& client);
-
-        // prevent other processes from using this ICamera interface
-        virtual status_t        lock();
-
-        // allow other processes to use this ICamera interface
-        virtual status_t        unlock();
-
-        // pass the buffered ISurface to the camera service
-        virtual status_t        setPreviewDisplay(const sp<ISurface>& surface);
-
-        // set the preview callback flag to affect how the received frames from
-        // preview are handled.
-        virtual void            setPreviewCallbackFlag(int callback_flag);
-
-        // start preview mode, must call setPreviewDisplay first
-        virtual status_t        startPreview();
-
-        // stop preview mode
-        virtual void            stopPreview();
-
-        // get preview state
-        virtual bool            previewEnabled();
-
-        // start recording mode
-        virtual status_t        startRecording();
-
-        // stop recording mode
-        virtual void            stopRecording();
-
-        // get recording state
-        virtual bool            recordingEnabled();
-
-        // release a recording frame
-        virtual void            releaseRecordingFrame(const sp<IMemory>& mem);
-
-        // auto focus
-        virtual status_t        autoFocus();
-
-        // cancel auto focus
-        virtual status_t        cancelAutoFocus();
-
-        // take a picture - returns an IMemory (ref-counted mmap)
-        virtual status_t        takePicture();
-
-        // set preview/capture parameters - key/value pairs
-        virtual status_t        setParameters(const String8& params);
-
-        // get preview/capture parameters - key/value pairs
-        virtual String8         getParameters() const;
-
-        // send command to camera driver
-        virtual status_t        sendCommand(int32_t cmd, int32_t arg1, int32_t arg2);
-
-        // our client...
-        const sp<ICameraClient>&    getCameraClient() const { return mCameraClient; }
-
-    private:
-        friend class CameraService;
-                                Client(const sp<CameraService>& cameraService,
-                                        const sp<ICameraClient>& cameraClient,
-                                        pid_t clientPid);
-                                Client();
-        virtual                 ~Client();
-
-                    status_t    checkPid();
-
-        static      void        notifyCallback(int32_t msgType, int32_t ext1, int32_t ext2, void* user);
-        static      void        dataCallback(int32_t msgType, const sp<IMemory>& dataPtr, void* user);
-        static      void        dataCallbackTimestamp(nsecs_t timestamp, int32_t msgType,
-                                                      const sp<IMemory>& dataPtr, void* user);
-
-        static      sp<Client>  getClientFromCookie(void* user);
-
-                    void        handlePreviewData(const sp<IMemory>&);
-                    void        handleShutter(image_rect_type *image);
-                    void        handlePostview(const sp<IMemory>&);
-                    void        handleRawPicture(const sp<IMemory>&);
-                    void        handleCompressedPicture(const sp<IMemory>&);
-
-                    void        copyFrameAndPostCopiedFrame(const sp<ICameraClient>& client,
-                                    const sp<IMemoryHeap>& heap, size_t offset, size_t size);
-
-        // camera operation mode
-        enum camera_mode {
-            CAMERA_PREVIEW_MODE   = 0,  // frame automatically released
-            CAMERA_RECORDING_MODE = 1,  // frame has to be explicitly released by releaseRecordingFrame()
-        };
-        status_t                startCameraMode(camera_mode mode);
-        status_t                startPreviewMode();
-        status_t                startRecordingMode();
-        status_t                setOverlay();
-        status_t                registerPreviewBuffers();
-
-        // Ensures atomicity among the public methods
-        mutable     Mutex                       mLock;
-
-        // mSurfaceLock synchronizes access to mSurface between
-        // setPreviewSurface() and postPreviewFrame().  Note that among
-        // the public methods, all accesses to mSurface are
-        // syncrhonized by mLock.  However, postPreviewFrame() is called
-        // by the CameraHardwareInterface callback, and needs to
-        // access mSurface.  It cannot hold mLock, however, because
-        // stopPreview() may be holding that lock while attempting
-        // to stop preview, and stopPreview itself will block waiting
-        // for a callback from CameraHardwareInterface.  If this
-        // happens, it will cause a deadlock.
-        mutable     Mutex                       mSurfaceLock;
-        mutable     Condition                   mReady;
-                    sp<CameraService>           mCameraService;
-                    sp<ISurface>                mSurface;
-                    int                         mPreviewCallbackFlag;
-                    int                         mOrientation;
-
-                    sp<MediaPlayer>             mMediaPlayerClick;
-                    sp<MediaPlayer>             mMediaPlayerBeep;
-
-                    // these are immutable once the object is created,
-                    // they don't need to be protected by a lock
-                    sp<ICameraClient>           mCameraClient;
-                    sp<CameraHardwareInterface> mHardware;
-                    pid_t                       mClientPid;
-                    bool                        mUseOverlay;
-
-                    sp<OverlayRef>              mOverlayRef;
-                    int                         mOverlayW;
-                    int                         mOverlayH;
-
-        mutable     Mutex                       mPreviewLock;
-                    sp<MemoryHeapBase>          mPreviewBuffer;
-    };
-
-// ----------------------------------------------------------------------------
-
-                            CameraService();
-    virtual                 ~CameraService();
-
-    // We use a count for number of clients (shoule only be 0 or 1).
-    volatile    int32_t                     mUsers;
-    virtual     void                        incUsers();
-    virtual     void                        decUsers();
-
-    mutable     Mutex                       mServiceLock;
-                wp<Client>                  mClient;
-
-#if DEBUG_HEAP_LEAKS
-                wp<IMemoryHeap>             gWeakHeap;
-#endif
-};
-
-// ----------------------------------------------------------------------------
-
-}; // namespace android
-
-#endif
diff --git a/camera/libcameraservice/FakeCamera.cpp b/camera/libcameraservice/FakeCamera.cpp
deleted file mode 100644
index 6749899..0000000
--- a/camera/libcameraservice/FakeCamera.cpp
+++ /dev/null
@@ -1,430 +0,0 @@
-/*
-**
-** Copyright 2008, The Android Open Source Project
-**
-** Licensed under the Apache License, Version 2.0 (the "License"); 
-** you may not use this file except in compliance with the License. 
-** You may obtain a copy of the License at 
-**
-**     http://www.apache.org/licenses/LICENSE-2.0 
-**
-** Unless required by applicable law or agreed to in writing, software 
-** distributed under the License is distributed on an "AS IS" BASIS, 
-** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 
-** See the License for the specific language governing permissions and 
-** limitations under the License.
-*/
-
-#define LOG_TAG "FakeCamera"
-#include <utils/Log.h>
-
-#include <string.h>
-#include <stdlib.h>
-#include <utils/String8.h>
-
-#include "FakeCamera.h"
-
-
-namespace android {
-
-// TODO: All this rgb to yuv should probably be in a util class.
-
-// TODO: I think something is wrong in this class because the shadow is kBlue
-// and the square color should alternate between kRed and kGreen. However on the
-// emulator screen these are all shades of gray. Y seems ok but the U and V are
-// probably not.
-
-static int tables_initialized = 0;
-uint8_t *gYTable, *gCbTable, *gCrTable;
-
-static int
-clamp(int  x)
-{
-    if (x > 255) return 255;
-    if (x < 0)   return 0;
-    return x;
-}
-
-/* the equation used by the video code to translate YUV to RGB looks like this
- *
- *    Y  = (Y0 - 16)*k0
- *    Cb = Cb0 - 128
- *    Cr = Cr0 - 128
- *
- *    G = ( Y - k1*Cr - k2*Cb )
- *    R = ( Y + k3*Cr )
- *    B = ( Y + k4*Cb )
- *
- */
-
-static const double  k0 = 1.164;
-static const double  k1 = 0.813;
-static const double  k2 = 0.391;
-static const double  k3 = 1.596;
-static const double  k4 = 2.018;
-
-/* let's try to extract the value of Y
- *
- *   G + k1/k3*R + k2/k4*B = Y*( 1 + k1/k3 + k2/k4 )
- *
- *   Y  = ( G + k1/k3*R + k2/k4*B ) / (1 + k1/k3 + k2/k4)
- *   Y0 = ( G0 + k1/k3*R0 + k2/k4*B0 ) / ((1 + k1/k3 + k2/k4)*k0) + 16
- *
- * let define:
- *   kYr = k1/k3
- *   kYb = k2/k4
- *   kYy = k0 * ( 1 + kYr + kYb )
- *
- * we have:
- *    Y  = ( G + kYr*R + kYb*B )
- *    Y0 = clamp[ Y/kYy + 16 ]
- */
-
-static const double kYr = k1/k3;
-static const double kYb = k2/k4;
-static const double kYy = k0*( 1. + kYr + kYb );
-
-static void
-initYtab( void )
-{
-    const  int imax = (int)( (kYr + kYb)*(31 << 2) + (61 << 3) + 0.1 );
-    int    i;
-
-    gYTable = (uint8_t *)malloc(imax);
-
-    for(i=0; i<imax; i++) {
-        int  x = (int)(i/kYy + 16.5);
-        if (x < 16) x = 16;
-        else if (x > 235) x = 235;
-        gYTable[i] = (uint8_t) x;
-    }
-}
-
-/*
- *   the source is RGB565, so adjust for 8-bit range of input values:
- *
- *   G = (pixels >> 3) & 0xFC;
- *   R = (pixels >> 8) & 0xF8;
- *   B = (pixels & 0x1f) << 3;
- *
- *   R2 = (pixels >> 11)      R = R2*8
- *   B2 = (pixels & 0x1f)     B = B2*8
- *
- *   kYr*R = kYr2*R2 =>  kYr2 = kYr*8
- *   kYb*B = kYb2*B2 =>  kYb2 = kYb*8
- *
- *   we want to use integer multiplications:
- *
- *   SHIFT1 = 9
- *
- *   (ALPHA*R2) >> SHIFT1 == R*kYr  =>  ALPHA = kYr*8*(1 << SHIFT1)
- *
- *   ALPHA = kYr*(1 << (SHIFT1+3))
- *   BETA  = kYb*(1 << (SHIFT1+3))
- */
-
-static const int  SHIFT1  = 9;
-static const int  ALPHA   = (int)( kYr*(1 << (SHIFT1+3)) + 0.5 );
-static const int  BETA    = (int)( kYb*(1 << (SHIFT1+3)) + 0.5 );
-
-/*
- *  now let's try to get the values of Cb and Cr
- *
- *  R-B = (k3*Cr - k4*Cb)
- *
- *    k3*Cr = k4*Cb + (R-B)
- *    k4*Cb = k3*Cr - (R-B)
- *
- *  R-G = (k1+k3)*Cr + k2*Cb
- *      = (k1+k3)*Cr + k2/k4*(k3*Cr - (R-B)/k0)
- *      = (k1 + k3 + k2*k3/k4)*Cr - k2/k4*(R-B)
- *
- *  kRr*Cr = (R-G) + kYb*(R-B)
- *
- *  Cr  = ((R-G) + kYb*(R-B))/kRr
- *  Cr0 = clamp(Cr + 128)
- */
-
-static const double  kRr = (k1 + k3 + k2*k3/k4);
-
-static void
-initCrtab( void )
-{
-    uint8_t *pTable;
-    int i;
-
-    gCrTable = (uint8_t *)malloc(768*2);
-
-    pTable = gCrTable + 384;
-    for(i=-384; i<384; i++)
-        pTable[i] = (uint8_t) clamp( i/kRr + 128.5 );
-}
-
-/*
- *  B-G = (k2 + k4)*Cb + k1*Cr
- *      = (k2 + k4)*Cb + k1/k3*(k4*Cb + (R-B))
- *      = (k2 + k4 + k1*k4/k3)*Cb + k1/k3*(R-B)
- *
- *  kBb*Cb = (B-G) - kYr*(R-B)
- *
- *  Cb   = ((B-G) - kYr*(R-B))/kBb
- *  Cb0  = clamp(Cb + 128)
- *
- */
-
-static const double  kBb = (k2 + k4 + k1*k4/k3);
-
-static void
-initCbtab( void )
-{
-    uint8_t *pTable;
-    int i;
-
-    gCbTable = (uint8_t *)malloc(768*2);
-
-    pTable = gCbTable + 384;
-    for(i=-384; i<384; i++)
-        pTable[i] = (uint8_t) clamp( i/kBb + 128.5 );
-}
-
-/*
- *   SHIFT2 = 16
- *
- *   DELTA = kYb*(1 << SHIFT2)
- *   GAMMA = kYr*(1 << SHIFT2)
- */
-
-static const int  SHIFT2 = 16;
-static const int  DELTA  = kYb*(1 << SHIFT2);
-static const int  GAMMA  = kYr*(1 << SHIFT2);
-
-int32_t ccrgb16toyuv_wo_colorkey(uint8_t *rgb16,uint8_t *yuv422,uint32_t *param,uint8_t *table[])
-{
-    uint16_t *inputRGB = (uint16_t*)rgb16;
-    uint8_t *outYUV =  yuv422;
-    int32_t width_dst = param[0];
-    int32_t height_dst = param[1];
-    int32_t pitch_dst = param[2];
-    int32_t mheight_dst = param[3];
-    int32_t pitch_src = param[4];
-    uint8_t *y_tab = table[0];
-    uint8_t *cb_tab = table[1];
-    uint8_t *cr_tab = table[2];
-
-    int32_t size16 = pitch_dst*mheight_dst;
-    int32_t i,j,count;
-    int32_t ilimit,jlimit;
-    uint8_t *tempY,*tempU,*tempV;
-    uint16_t pixels;
-    int   tmp;
-uint32_t temp;
-
-    tempY = outYUV;
-    tempU = outYUV + (height_dst * pitch_dst);
-    tempV = tempU + 1;
-
-    jlimit = height_dst;
-    ilimit = width_dst;
-
-    for(j=0; j<jlimit; j+=1)
-    {
-        for (i=0; i<ilimit; i+=2)
-        {
-            int32_t   G_ds = 0, B_ds = 0, R_ds = 0;
-            uint8_t   y0, y1, u, v;
-
-            pixels =  inputRGB[i];
-            temp = (BETA*(pixels & 0x001F) + ALPHA*(pixels>>11) );
-            y0   = y_tab[(temp>>SHIFT1) + ((pixels>>3) & 0x00FC)];
-
-            G_ds    += (pixels>>1) & 0x03E0;
-            B_ds    += (pixels<<5) & 0x03E0;
-            R_ds    += (pixels>>6) & 0x03E0;
-
-            pixels =  inputRGB[i+1];
-            temp = (BETA*(pixels & 0x001F) + ALPHA*(pixels>>11) );
-            y1   = y_tab[(temp>>SHIFT1) + ((pixels>>3) & 0x00FC)];
-
-            G_ds    += (pixels>>1) & 0x03E0;
-            B_ds    += (pixels<<5) & 0x03E0;
-            R_ds    += (pixels>>6) & 0x03E0;
-
-            R_ds >>= 1;
-            B_ds >>= 1;
-            G_ds >>= 1;
-
-            tmp = R_ds - B_ds;
-
-            u = cb_tab[(((B_ds-G_ds)<<SHIFT2) - GAMMA*tmp)>>(SHIFT2+2)];
-            v = cr_tab[(((R_ds-G_ds)<<SHIFT2) + DELTA*tmp)>>(SHIFT2+2)];
-
-            tempY[0] = y0;
-            tempY[1] = y1;
-            tempU[0] = u;
-            tempV[0] = v;
-
-            tempY += 2;
-            tempU += 2;
-            tempV += 2;
-        }
-
-        inputRGB += pitch_src;
-    }
-
-    return 1;
-}
-
-#define min(a,b) ((a)<(b)?(a):(b))
-#define max(a,b) ((a)>(b)?(a):(b))
-
-static void convert_rgb16_to_yuv422(uint8_t *rgb, uint8_t *yuv, int width, int height)
-{
-    if (!tables_initialized) {
-        initYtab();
-        initCrtab();
-        initCbtab();
-        tables_initialized = 1;
-    }
-
-    uint32_t param[6];
-    param[0] = (uint32_t) width;
-    param[1] = (uint32_t) height;
-    param[2] = (uint32_t) width;
-    param[3] = (uint32_t) height;
-    param[4] = (uint32_t) width;
-    param[5] = (uint32_t) 0;
-
-    uint8_t *table[3];
-    table[0] = gYTable;
-    table[1] = gCbTable + 384;
-    table[2] = gCrTable + 384;
-
-    ccrgb16toyuv_wo_colorkey(rgb, yuv, param, table);
-}
-
-const int FakeCamera::kRed;
-const int FakeCamera::kGreen;
-const int FakeCamera::kBlue;
-
-FakeCamera::FakeCamera(int width, int height)
-          : mTmpRgb16Buffer(0)
-{
-    setSize(width, height);
-}
-
-FakeCamera::~FakeCamera()
-{
-    delete[] mTmpRgb16Buffer;
-}
-
-void FakeCamera::setSize(int width, int height)
-{
-    mWidth = width;
-    mHeight = height;
-    mCounter = 0;
-    mCheckX = 0;
-    mCheckY = 0;
-
-    // This will cause it to be reallocated on the next call
-    // to getNextFrameAsYuv422().
-    delete[] mTmpRgb16Buffer;
-    mTmpRgb16Buffer = 0;
-}
-
-void FakeCamera::getNextFrameAsRgb565(uint16_t *buffer)
-{
-    int size = mWidth / 10;
-
-    drawCheckerboard(buffer, size);
-
-    int x = ((mCounter*3)&255);
-    if(x>128) x = 255 - x;
-    int y = ((mCounter*5)&255);
-    if(y>128) y = 255 - y;
-
-    drawSquare(buffer, x*size/32, y*size/32, (size*5)>>1, (mCounter&0x100)?kRed:kGreen, kBlue);
-
-    mCounter++;
-}
-
-void FakeCamera::getNextFrameAsYuv422(uint8_t *buffer)
-{
-    if (mTmpRgb16Buffer == 0)
-        mTmpRgb16Buffer = new uint16_t[mWidth * mHeight];
-
-    getNextFrameAsRgb565(mTmpRgb16Buffer);
-    convert_rgb16_to_yuv422((uint8_t*)mTmpRgb16Buffer, buffer, mWidth, mHeight);
-}
-
-void FakeCamera::drawSquare(uint16_t *dst, int x, int y, int size, int color, int shadow)
-{
-    int square_xstop, square_ystop, shadow_xstop, shadow_ystop;
-
-    square_xstop = min(mWidth, x+size);
-    square_ystop = min(mHeight, y+size);
-    shadow_xstop = min(mWidth, x+size+(size/4));
-    shadow_ystop = min(mHeight, y+size+(size/4));
-
-    // Do the shadow.
-    uint16_t *sh = &dst[(y+(size/4))*mWidth];
-    for (int j = y + (size/4); j < shadow_ystop; j++) {
-        for (int i = x + (size/4); i < shadow_xstop; i++) {
-            sh[i] &= shadow;
-        }
-        sh += mWidth;
-    }
-
-    // Draw the square.
-    uint16_t *sq = &dst[y*mWidth];
-    for (int j = y; j < square_ystop; j++) {
-        for (int i = x; i < square_xstop; i++) {
-            sq[i] = color;
-        }
-        sq += mWidth;
-    }
-}
-
-void FakeCamera::drawCheckerboard(uint16_t *dst, int size)
-{
-    bool black = true;
-
-    if((mCheckX/size)&1)
-        black = false;
-    if((mCheckY/size)&1)
-        black = !black;
-
-    int county = mCheckY%size;
-    int checkxremainder = mCheckX%size;
-
-    for(int y=0;y<mHeight;y++) {
-        int countx = checkxremainder;
-        bool current = black;
-        for(int x=0;x<mWidth;x++) {
-            dst[y*mWidth+x] = current?0:0xffff;
-            if(countx++ >= size) {
-                countx=0;
-                current = !current;
-            }
-        }
-        if(county++ >= size) {
-            county=0;
-            black = !black;
-        }
-    }
-    mCheckX += 3;
-    mCheckY++;
-}
-
-
-void FakeCamera::dump(int fd) const
-{
-    const size_t SIZE = 256;
-    char buffer[SIZE];
-    String8 result;
-    snprintf(buffer, 255, " width x height (%d x %d), counter (%d), check x-y coordinate(%d, %d)\n", mWidth, mHeight, mCounter, mCheckX, mCheckY);
-    result.append(buffer);
-    ::write(fd, result.string(), result.size());
-}
-
-
-}; // namespace android
diff --git a/camera/libcameraservice/FakeCamera.h b/camera/libcameraservice/FakeCamera.h
deleted file mode 100644
index f7f8803..0000000
--- a/camera/libcameraservice/FakeCamera.h
+++ /dev/null
@@ -1,67 +0,0 @@
-/*
-**
-** Copyright 2008, The Android Open Source Project
-**
-** Licensed under the Apache License, Version 2.0 (the "License"); 
-** you may not use this file except in compliance with the License. 
-** You may obtain a copy of the License at 
-**
-**     http://www.apache.org/licenses/LICENSE-2.0 
-**
-** Unless required by applicable law or agreed to in writing, software 
-** distributed under the License is distributed on an "AS IS" BASIS, 
-** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 
-** See the License for the specific language governing permissions and 
-** limitations under the License.
-*/
-
-#ifndef ANDROID_HARDWARE_FAKECAMERA_H
-#define ANDROID_HARDWARE_FAKECAMERA_H
-
-#include <sys/types.h>
-#include <stdint.h>
-
-namespace android {
-
-/*
- * FakeCamera is used in the CameraHardwareStub to provide a fake video feed
- * when the system does not have a camera in hardware.
- * The fake video is a moving black and white checkerboard background with a
- * bouncing gray square in the foreground.
- * This class is not thread-safe.
- *
- * TODO: Since the major methods provides a raw/uncompressed video feed, rename
- * this class to RawVideoSource.
- */
-
-class FakeCamera {
-public:
-    FakeCamera(int width, int height);
-    ~FakeCamera();
-
-    void setSize(int width, int height);
-    void getNextFrameAsYuv422(uint8_t *buffer);
-    // Write to the fd a string representing the current state.
-    void dump(int fd) const;
-
-private:
-    // TODO: remove the uint16_t buffer param everywhere since it is a field of
-    // this class.
-    void getNextFrameAsRgb565(uint16_t *buffer);
-
-    void drawSquare(uint16_t *buffer, int x, int y, int size, int color, int shadow);
-    void drawCheckerboard(uint16_t *buffer, int size);
-
-    static const int kRed = 0xf800;
-    static const int kGreen = 0x07c0;
-    static const int kBlue = 0x003e;
-
-    int         mWidth, mHeight;
-    int         mCounter;
-    int         mCheckX, mCheckY;
-    uint16_t    *mTmpRgb16Buffer;
-};
-
-}; // namespace android
-
-#endif // ANDROID_HARDWARE_FAKECAMERA_H
diff --git a/camera/tests/CameraServiceTest/Android.mk b/camera/tests/CameraServiceTest/Android.mk
deleted file mode 100644
index 9bb190a..0000000
--- a/camera/tests/CameraServiceTest/Android.mk
+++ /dev/null
@@ -1,24 +0,0 @@
-LOCAL_PATH:= $(call my-dir)
-
-include $(CLEAR_VARS)
-
-LOCAL_SRC_FILES:= CameraServiceTest.cpp
-
-LOCAL_MODULE:= CameraServiceTest
-
-LOCAL_MODULE_TAGS := tests
-
-LOCAL_C_INCLUDES += \
-                frameworks/base/libs
-
-LOCAL_CFLAGS :=
-
-LOCAL_SHARED_LIBRARIES += \
-		libbinder \
-                libcutils \
-                libutils \
-                libui \
-                libcamera_client \
-                libsurfaceflinger_client
-
-include $(BUILD_EXECUTABLE)
diff --git a/camera/tests/CameraServiceTest/CameraServiceTest.cpp b/camera/tests/CameraServiceTest/CameraServiceTest.cpp
deleted file mode 100644
index 9fc795b..0000000
--- a/camera/tests/CameraServiceTest/CameraServiceTest.cpp
+++ /dev/null
@@ -1,849 +0,0 @@
-#define LOG_TAG "CameraServiceTest"
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <sys/types.h>
-#include <sys/wait.h>
-#include <unistd.h>
-#include <surfaceflinger/ISurface.h>
-#include <camera/Camera.h>
-#include <camera/CameraParameters.h>
-#include <ui/GraphicBuffer.h>
-#include <camera/ICamera.h>
-#include <camera/ICameraClient.h>
-#include <camera/ICameraService.h>
-#include <ui/Overlay.h>
-#include <binder/IPCThreadState.h>
-#include <binder/IServiceManager.h>
-#include <binder/ProcessState.h>
-#include <utils/KeyedVector.h>
-#include <utils/Log.h>
-#include <utils/Vector.h>
-#include <utils/threads.h>
-
-using namespace android;
-
-//
-//  Assertion and Logging utilities
-//
-#define INFO(...) \
-    do { \
-        printf(__VA_ARGS__); \
-        printf("\n"); \
-        LOGD(__VA_ARGS__); \
-    } while(0)
-
-void assert_fail(const char *file, int line, const char *func, const char *expr) {
-    INFO("assertion failed at file %s, line %d, function %s:",
-            file, line, func);
-    INFO("%s", expr);
-    exit(1);
-}
-
-void assert_eq_fail(const char *file, int line, const char *func,
-        const char *expr, int actual) {
-    INFO("assertion failed at file %s, line %d, function %s:",
-            file, line, func);
-    INFO("(expected) %s != (actual) %d", expr, actual);
-    exit(1);
-}
-
-#define ASSERT(e) \
-    do { \
-        if (!(e)) \
-            assert_fail(__FILE__, __LINE__, __func__, #e); \
-    } while(0)
-
-#define ASSERT_EQ(expected, actual) \
-    do { \
-        int _x = (actual); \
-        if (_x != (expected)) \
-            assert_eq_fail(__FILE__, __LINE__, __func__, #expected, _x); \
-    } while(0)
-
-//
-//  Holder service for pass objects between processes.
-//
-class IHolder : public IInterface {
-protected:
-    enum {
-        HOLDER_PUT = IBinder::FIRST_CALL_TRANSACTION,
-        HOLDER_GET,
-        HOLDER_CLEAR
-    };
-public:
-    DECLARE_META_INTERFACE(Holder);
-
-    virtual void put(sp<IBinder> obj) = 0;
-    virtual sp<IBinder> get() = 0;
-    virtual void clear() = 0;
-};
-
-class BnHolder : public BnInterface<IHolder> {
-    virtual status_t onTransact(uint32_t code,
-                                const Parcel& data,
-                                Parcel* reply,
-                                uint32_t flags = 0);
-};
-
-class BpHolder : public BpInterface<IHolder> {
-public:
-    BpHolder(const sp<IBinder>& impl)
-        : BpInterface<IHolder>(impl) {
-    }
-
-    virtual void put(sp<IBinder> obj) {
-        Parcel data, reply;
-        data.writeStrongBinder(obj);
-        remote()->transact(HOLDER_PUT, data, &reply, IBinder::FLAG_ONEWAY);
-    }
-
-    virtual sp<IBinder> get() {
-        Parcel data, reply;
-        remote()->transact(HOLDER_GET, data, &reply);
-        return reply.readStrongBinder();
-    }
-
-    virtual void clear() {
-        Parcel data, reply;
-        remote()->transact(HOLDER_CLEAR, data, &reply);
-    }
-};
-
-IMPLEMENT_META_INTERFACE(Holder, "CameraServiceTest.Holder");
-
-status_t BnHolder::onTransact(
-    uint32_t code, const Parcel& data, Parcel* reply, uint32_t flags) {
-    switch(code) {
-        case HOLDER_PUT: {
-            put(data.readStrongBinder());
-            return NO_ERROR;
-        } break;
-        case HOLDER_GET: {
-            reply->writeStrongBinder(get());
-            return NO_ERROR;
-        } break;
-        case HOLDER_CLEAR: {
-            clear();
-            return NO_ERROR;
-        } break;
-        default:
-            return BBinder::onTransact(code, data, reply, flags);
-    }
-}
-
-class HolderService : public BnHolder {
-    virtual void put(sp<IBinder> obj) {
-        mObj = obj;
-    }
-    virtual sp<IBinder> get() {
-        return mObj;
-    }
-    virtual void clear() {
-        mObj.clear();
-    }
-private:
-    sp<IBinder> mObj;
-};
-
-//
-//  A mock CameraClient
-//
-class MCameraClient : public BnCameraClient {
-public:
-    virtual void notifyCallback(int32_t msgType, int32_t ext1, int32_t ext2);
-    virtual void dataCallback(int32_t msgType, const sp<IMemory>& data);
-    virtual void dataCallbackTimestamp(nsecs_t timestamp,
-            int32_t msgType, const sp<IMemory>& data) {}
-
-    // new functions
-    void clearStat();
-    enum OP { EQ, GE, LE, GT, LT };
-    void assertNotify(int32_t msgType, OP op, int count);
-    void assertData(int32_t msgType, OP op, int count);
-    void waitNotify(int32_t msgType, OP op, int count);
-    void waitData(int32_t msgType, OP op, int count);
-    void assertDataSize(int32_t msgType, OP op, int dataSize);
-
-    void setReleaser(ICamera *releaser) {
-        mReleaser = releaser;
-    }
-private:
-    Mutex mLock;
-    Condition mCond;
-    DefaultKeyedVector<int32_t, int> mNotifyCount;
-    DefaultKeyedVector<int32_t, int> mDataCount;
-    DefaultKeyedVector<int32_t, int> mDataSize;
-    bool test(OP op, int v1, int v2);
-
-    ICamera *mReleaser;
-};
-
-void MCameraClient::clearStat() {
-    Mutex::Autolock _l(mLock);
-    mNotifyCount.clear();
-    mDataCount.clear();
-    mDataSize.clear();
-}
-
-bool MCameraClient::test(OP op, int v1, int v2) {
-    switch (op) {
-        case EQ: return v1 == v2;
-        case GT: return v1 > v2;
-        case LT: return v1 < v2;
-        case GE: return v1 >= v2;
-        case LE: return v1 <= v2;
-        default: ASSERT(0); break;
-    }
-    return false;
-}
-
-void MCameraClient::assertNotify(int32_t msgType, OP op, int count) {
-    Mutex::Autolock _l(mLock);
-    int v = mNotifyCount.valueFor(msgType);
-    ASSERT(test(op, v, count));
-}
-
-void MCameraClient::assertData(int32_t msgType, OP op, int count) {
-    Mutex::Autolock _l(mLock);
-    int v = mDataCount.valueFor(msgType);
-    ASSERT(test(op, v, count));
-}
-
-void MCameraClient::assertDataSize(int32_t msgType, OP op, int dataSize) {
-    Mutex::Autolock _l(mLock);
-    int v = mDataSize.valueFor(msgType);
-    ASSERT(test(op, v, dataSize));
-}
-
-void MCameraClient::notifyCallback(int32_t msgType, int32_t ext1, int32_t ext2) {
-    INFO(__func__);
-    Mutex::Autolock _l(mLock);
-    ssize_t i = mNotifyCount.indexOfKey(msgType);
-    if (i < 0) {
-        mNotifyCount.add(msgType, 1);
-    } else {
-        ++mNotifyCount.editValueAt(i);
-    }
-    mCond.signal();
-}
-
-void MCameraClient::dataCallback(int32_t msgType, const sp<IMemory>& data) {
-    INFO(__func__);
-    int dataSize = data->size();
-    INFO("data type = %d, size = %d", msgType, dataSize);
-    Mutex::Autolock _l(mLock);
-    ssize_t i = mDataCount.indexOfKey(msgType);
-    if (i < 0) {
-        mDataCount.add(msgType, 1);
-        mDataSize.add(msgType, dataSize);
-    } else {
-        ++mDataCount.editValueAt(i);
-        mDataSize.editValueAt(i) = dataSize;
-    }
-    mCond.signal();
-
-    if (msgType == CAMERA_MSG_VIDEO_FRAME) {
-        ASSERT(mReleaser != NULL);
-        mReleaser->releaseRecordingFrame(data);
-    }
-}
-
-void MCameraClient::waitNotify(int32_t msgType, OP op, int count) {
-    INFO("waitNotify: %d, %d, %d", msgType, op, count);
-    Mutex::Autolock _l(mLock);
-    while (true) {
-        int v = mNotifyCount.valueFor(msgType);
-        if (test(op, v, count)) {
-            break;
-        }
-        mCond.wait(mLock);
-    }
-}
-
-void MCameraClient::waitData(int32_t msgType, OP op, int count) {
-    INFO("waitData: %d, %d, %d", msgType, op, count);
-    Mutex::Autolock _l(mLock);
-    while (true) {
-        int v = mDataCount.valueFor(msgType);
-        if (test(op, v, count)) {
-            break;
-        }
-        mCond.wait(mLock);
-    }
-}
-
-//
-//  A mock Surface
-//
-class MSurface : public BnSurface {
-public:
-    virtual status_t registerBuffers(const BufferHeap& buffers);
-    virtual void postBuffer(ssize_t offset);
-    virtual void unregisterBuffers();
-    virtual sp<OverlayRef> createOverlay(
-            uint32_t w, uint32_t h, int32_t format, int32_t orientation);
-    virtual sp<GraphicBuffer> requestBuffer(int bufferIdx, int usage);
-
-    // new functions
-    void clearStat();
-    void waitUntil(int c0, int c1, int c2);
-
-private:
-    // check callback count
-    Condition mCond;
-    Mutex mLock;
-    int registerBuffersCount;
-    int postBufferCount;
-    int unregisterBuffersCount;
-};
-
-status_t MSurface::registerBuffers(const BufferHeap& buffers) {
-    INFO(__func__);
-    Mutex::Autolock _l(mLock);
-    ++registerBuffersCount;
-    mCond.signal();
-    return NO_ERROR;
-}
-
-void MSurface::postBuffer(ssize_t offset) {
-    // INFO(__func__);
-    Mutex::Autolock _l(mLock);
-    ++postBufferCount;
-    mCond.signal();
-}
-
-void MSurface::unregisterBuffers() {
-    INFO(__func__);
-    Mutex::Autolock _l(mLock);
-    ++unregisterBuffersCount;
-    mCond.signal();
-}
-
-sp<GraphicBuffer> MSurface::requestBuffer(int bufferIdx, int usage) {
-    INFO(__func__);
-    return NULL;
-}
-
-void MSurface::clearStat() {
-    Mutex::Autolock _l(mLock);
-    registerBuffersCount = 0;
-    postBufferCount = 0;
-    unregisterBuffersCount = 0;
-}
-
-void MSurface::waitUntil(int c0, int c1, int c2) {
-    INFO("waitUntil: %d %d %d", c0, c1, c2);
-    Mutex::Autolock _l(mLock);
-    while (true) {
-        if (registerBuffersCount >= c0 &&
-            postBufferCount >= c1 &&
-            unregisterBuffersCount >= c2) {
-            break;
-        }
-        mCond.wait(mLock);
-    }
-}
-
-sp<OverlayRef> MSurface::createOverlay(uint32_t w, uint32_t h, int32_t format,
-        int32_t orientation) {
-    // We don't expect this to be called in current hardware.
-    ASSERT(0);
-    sp<OverlayRef> dummy;
-    return dummy;
-}
-
-//
-//  Utilities to use the Holder service
-//
-sp<IHolder> getHolder() {
-    sp<IServiceManager> sm = defaultServiceManager();
-    ASSERT(sm != 0);
-    sp<IBinder> binder = sm->getService(String16("CameraServiceTest.Holder"));
-    ASSERT(binder != 0);
-    sp<IHolder> holder = interface_cast<IHolder>(binder);
-    ASSERT(holder != 0);
-    return holder;
-}
-
-void putTempObject(sp<IBinder> obj) {
-    INFO(__func__);
-    getHolder()->put(obj);
-}
-
-sp<IBinder> getTempObject() {
-    INFO(__func__);
-    return getHolder()->get();
-}
-
-void clearTempObject() {
-    INFO(__func__);
-    getHolder()->clear();
-}
-
-//
-//  Get a Camera Service
-//
-sp<ICameraService> getCameraService() {
-    sp<IServiceManager> sm = defaultServiceManager();
-    ASSERT(sm != 0);
-    sp<IBinder> binder = sm->getService(String16("media.camera"));
-    ASSERT(binder != 0);
-    sp<ICameraService> cs = interface_cast<ICameraService>(binder);
-    ASSERT(cs != 0);
-    return cs;
-}
-
-//
-// Various Connect Tests
-//
-void testConnect() {
-    INFO(__func__);
-    sp<ICameraService> cs = getCameraService();
-    sp<MCameraClient> cc = new MCameraClient();
-    sp<ICamera> c = cs->connect(cc);
-    ASSERT(c != 0);
-    c->disconnect();
-}
-
-void testAllowConnectOnceOnly() {
-    INFO(__func__);
-    sp<ICameraService> cs = getCameraService();
-    // Connect the first client.
-    sp<MCameraClient> cc = new MCameraClient();
-    sp<ICamera> c = cs->connect(cc);
-    ASSERT(c != 0);
-    // Same client -- ok.
-    ASSERT(cs->connect(cc) != 0);
-    // Different client -- not ok.
-    sp<MCameraClient> cc2 = new MCameraClient();
-    ASSERT(cs->connect(cc2) == 0);
-    c->disconnect();
-}
-
-void testReconnectFailed() {
-    INFO(__func__);
-    sp<ICamera> c = interface_cast<ICamera>(getTempObject());
-    sp<MCameraClient> cc2 = new MCameraClient();
-    ASSERT(c->connect(cc2) != NO_ERROR);
-}
-
-void testReconnectSuccess() {
-    INFO(__func__);
-    sp<ICamera> c = interface_cast<ICamera>(getTempObject());
-    sp<MCameraClient> cc = new MCameraClient();
-    ASSERT(c->connect(cc) == NO_ERROR);
-}
-
-void testLockFailed() {
-    INFO(__func__);
-    sp<ICamera> c = interface_cast<ICamera>(getTempObject());
-    ASSERT(c->lock() != NO_ERROR);
-}
-
-void testLockUnlockSuccess() {
-    INFO(__func__);
-    sp<ICamera> c = interface_cast<ICamera>(getTempObject());
-    ASSERT(c->lock() == NO_ERROR);
-    ASSERT(c->unlock() == NO_ERROR);
-}
-
-void testLockSuccess() {
-    INFO(__func__);
-    sp<ICamera> c = interface_cast<ICamera>(getTempObject());
-    ASSERT(c->lock() == NO_ERROR);
-}
-
-//
-// Run the connect tests in another process.
-//
-const char *gExecutable;
-
-struct FunctionTableEntry {
-    const char *name;
-    void (*func)();
-};
-
-FunctionTableEntry function_table[] = {
-#define ENTRY(x) {#x, &x}
-    ENTRY(testReconnectFailed),
-    ENTRY(testReconnectSuccess),
-    ENTRY(testLockUnlockSuccess),
-    ENTRY(testLockFailed),
-    ENTRY(testLockSuccess),
-#undef ENTRY
-};
-
-void runFunction(const char *tag) {
-    INFO("runFunction: %s", tag);
-    int entries = sizeof(function_table) / sizeof(function_table[0]);
-    for (int i = 0; i < entries; i++) {
-        if (strcmp(function_table[i].name, tag) == 0) {
-            (*function_table[i].func)();
-            return;
-        }
-    }
-    ASSERT(0);
-}
-
-void runInAnotherProcess(const char *tag) {
-    pid_t pid = fork();
-    if (pid == 0) {
-        execlp(gExecutable, gExecutable, tag, NULL);
-        ASSERT(0);
-    } else {
-        int status;
-        ASSERT_EQ(pid, wait(&status));
-        ASSERT_EQ(0, status);
-    }
-}
-
-void testReconnect() {
-    INFO(__func__);
-    sp<ICameraService> cs = getCameraService();
-    sp<MCameraClient> cc = new MCameraClient();
-    sp<ICamera> c = cs->connect(cc);
-    ASSERT(c != 0);
-    // Reconnect to the same client -- ok.
-    ASSERT(c->connect(cc) == NO_ERROR);
-    // Reconnect to a different client (but the same pid) -- ok.
-    sp<MCameraClient> cc2 = new MCameraClient();
-    ASSERT(c->connect(cc2) == NO_ERROR);
-    c->disconnect();
-    cc->assertNotify(CAMERA_MSG_ERROR, MCameraClient::EQ, 0);
-}
-
-void testLockUnlock() {
-    sp<ICameraService> cs = getCameraService();
-    sp<MCameraClient> cc = new MCameraClient();
-    sp<ICamera> c = cs->connect(cc);
-    ASSERT(c != 0);
-    // We can lock as many times as we want.
-    ASSERT(c->lock() == NO_ERROR);
-    ASSERT(c->lock() == NO_ERROR);
-    // Lock from a different process -- not ok.
-    putTempObject(c->asBinder());
-    runInAnotherProcess("testLockFailed");
-    // Unlock then lock from a different process -- ok.
-    ASSERT(c->unlock() == NO_ERROR);
-    runInAnotherProcess("testLockUnlockSuccess");
-    // Unlock then lock from a different process -- ok.
-    runInAnotherProcess("testLockSuccess");
-    c->disconnect();
-    clearTempObject();
-}
-
-void testReconnectFromAnotherProcess() {
-    INFO(__func__);
-
-    sp<ICameraService> cs = getCameraService();
-    sp<MCameraClient> cc = new MCameraClient();
-    sp<ICamera> c = cs->connect(cc);
-    ASSERT(c != 0);
-    // Reconnect from a different process -- not ok.
-    putTempObject(c->asBinder());
-    runInAnotherProcess("testReconnectFailed");
-    // Unlock then reconnect from a different process -- ok.
-    ASSERT(c->unlock() == NO_ERROR);
-    runInAnotherProcess("testReconnectSuccess");
-    c->disconnect();
-    clearTempObject();
-}
-
-// We need to flush the command buffer after the reference
-// to ICamera is gone. The sleep is for the server to run
-// the destructor for it.
-static void flushCommands() {
-    IPCThreadState::self()->flushCommands();
-    usleep(200000);  // 200ms
-}
-
-// Run a test case
-#define RUN(class_name) do { \
-    { \
-        INFO(#class_name); \
-        class_name instance; \
-        instance.run(); \
-    } \
-    flushCommands(); \
-} while(0)
-
-// Base test case after the the camera is connected.
-class AfterConnect {
-protected:
-    sp<ICameraService> cs;
-    sp<MCameraClient> cc;
-    sp<ICamera> c;
-
-    AfterConnect() {
-        cs = getCameraService();
-        cc = new MCameraClient();
-        c = cs->connect(cc);
-        ASSERT(c != 0);
-    }
-
-    ~AfterConnect() {
-        c.clear();
-        cc.clear();
-        cs.clear();
-    }
-};
-
-class TestSetPreviewDisplay : public AfterConnect {
-public:
-    void run() {
-        sp<MSurface> surface = new MSurface();
-        ASSERT(c->setPreviewDisplay(surface) == NO_ERROR);
-        c->disconnect();
-        cc->assertNotify(CAMERA_MSG_ERROR, MCameraClient::EQ, 0);
-    }
-};
-
-class TestStartPreview : public AfterConnect {
-public:
-    void run() {
-        sp<MSurface> surface = new MSurface();
-        ASSERT(c->setPreviewDisplay(surface) == NO_ERROR);
-
-        ASSERT(c->startPreview() == NO_ERROR);
-        ASSERT(c->previewEnabled() == true);
-
-        surface->waitUntil(1, 10, 0); // needs 1 registerBuffers and 10 postBuffer
-        surface->clearStat();
-
-        c->disconnect();
-        // TODO: CameraService crashes for this. Fix it.
-#if 0
-        sp<MSurface> another_surface = new MSurface();
-        c->setPreviewDisplay(another_surface);  // just to make sure unregisterBuffers
-                                                // is called.
-        surface->waitUntil(0, 0, 1);  // needs unregisterBuffers
-#endif
-        cc->assertNotify(CAMERA_MSG_ERROR, MCameraClient::EQ, 0);
-    }
-};
-
-class TestStartPreviewWithoutDisplay : AfterConnect {
-public:
-    void run() {
-        ASSERT(c->startPreview() == NO_ERROR);
-        ASSERT(c->previewEnabled() == true);
-        c->disconnect();
-        cc->assertNotify(CAMERA_MSG_ERROR, MCameraClient::EQ, 0);
-    }
-};
-
-// Base test case after the the camera is connected and the preview is started.
-class AfterStartPreview : public AfterConnect {
-protected:
-    sp<MSurface> surface;
-
-    AfterStartPreview() {
-        surface = new MSurface();
-        ASSERT(c->setPreviewDisplay(surface) == NO_ERROR);
-        ASSERT(c->startPreview() == NO_ERROR);
-    }
-
-    ~AfterStartPreview() {
-        surface.clear();
-    }
-};
-
-class TestAutoFocus : public AfterStartPreview {
-public:
-    void run() {
-        cc->assertNotify(CAMERA_MSG_FOCUS, MCameraClient::EQ, 0);
-        c->autoFocus();
-        cc->waitNotify(CAMERA_MSG_FOCUS, MCameraClient::EQ, 1);
-        c->disconnect();
-        cc->assertNotify(CAMERA_MSG_ERROR, MCameraClient::EQ, 0);
-    }
-};
-
-class TestStopPreview : public AfterStartPreview {
-public:
-    void run() {
-        ASSERT(c->previewEnabled() == true);
-        c->stopPreview();
-        ASSERT(c->previewEnabled() == false);
-        c->disconnect();
-        cc->assertNotify(CAMERA_MSG_ERROR, MCameraClient::EQ, 0);
-    }
-};
-
-class TestTakePicture: public AfterStartPreview {
-public:
-    void run() {
-        ASSERT(c->takePicture() == NO_ERROR);
-        cc->waitNotify(CAMERA_MSG_SHUTTER, MCameraClient::EQ, 1);
-        cc->waitData(CAMERA_MSG_RAW_IMAGE, MCameraClient::EQ, 1);
-        cc->waitData(CAMERA_MSG_COMPRESSED_IMAGE, MCameraClient::EQ, 1);
-        c->stopPreview();
-#if 1  // TODO: It crashes if we don't have this. Fix it.
-        usleep(100000);
-#endif
-        c->disconnect();
-        cc->assertNotify(CAMERA_MSG_ERROR, MCameraClient::EQ, 0);
-    }
-};
-
-class TestTakeMultiplePictures: public AfterStartPreview {
-public:
-    void run() {
-        for (int i = 0; i < 10; i++) {
-            cc->clearStat();
-            ASSERT(c->takePicture() == NO_ERROR);
-            cc->waitNotify(CAMERA_MSG_SHUTTER, MCameraClient::EQ, 1);
-            cc->waitData(CAMERA_MSG_RAW_IMAGE, MCameraClient::EQ, 1);
-            cc->waitData(CAMERA_MSG_COMPRESSED_IMAGE, MCameraClient::EQ, 1);
-            usleep(100000);  // 100ms
-        }
-        c->disconnect();
-        cc->assertNotify(CAMERA_MSG_ERROR, MCameraClient::EQ, 0);
-    }
-};
-
-class TestGetParameters: public AfterStartPreview {
-public:
-    void run() {
-        String8 param_str = c->getParameters();
-        INFO(param_str);
-    }
-};
-
-class TestPictureSize : public AfterStartPreview {
-public:
-    void checkOnePicture(int w, int h) {
-        const float rate = 0.5;  // byte per pixel limit
-        int pixels = w * h;
-
-        CameraParameters param(c->getParameters());
-        param.setPictureSize(w, h);
-        c->setParameters(param.flatten());
-
-        cc->clearStat();
-        ASSERT(c->takePicture() == NO_ERROR);
-        cc->waitData(CAMERA_MSG_RAW_IMAGE, MCameraClient::EQ, 1);
-        cc->assertDataSize(CAMERA_MSG_RAW_IMAGE, MCameraClient::EQ, pixels*3/2);
-        cc->waitData(CAMERA_MSG_COMPRESSED_IMAGE, MCameraClient::EQ, 1);
-        cc->assertDataSize(CAMERA_MSG_COMPRESSED_IMAGE, MCameraClient::LT,
-                int(pixels * rate));
-        cc->assertDataSize(CAMERA_MSG_COMPRESSED_IMAGE, MCameraClient::GT, 0);
-        cc->assertNotify(CAMERA_MSG_ERROR, MCameraClient::EQ, 0);
-        usleep(100000);  // 100ms
-    }
-
-    void run() {
-        checkOnePicture(2048, 1536);
-        checkOnePicture(1600, 1200);
-        checkOnePicture(1024, 768);
-    }
-};
-
-class TestPreviewCallbackFlag : public AfterConnect {
-public:
-    void run() {
-        sp<MSurface> surface = new MSurface();
-        ASSERT(c->setPreviewDisplay(surface) == NO_ERROR);
-
-        // Try all flag combinations.
-        for (int v = 0; v < 8; v++) {
-            cc->clearStat();
-            c->setPreviewCallbackFlag(v);
-            ASSERT(c->previewEnabled() == false);
-            ASSERT(c->startPreview() == NO_ERROR);
-            ASSERT(c->previewEnabled() == true);
-            sleep(2);
-            c->stopPreview();
-            if ((v & FRAME_CALLBACK_FLAG_ENABLE_MASK) == 0) {
-                cc->assertData(CAMERA_MSG_PREVIEW_FRAME, MCameraClient::EQ, 0);
-            } else {
-                if ((v & FRAME_CALLBACK_FLAG_ONE_SHOT_MASK) == 0) {
-                    cc->assertData(CAMERA_MSG_PREVIEW_FRAME, MCameraClient::GE, 10);
-                } else {
-                    cc->assertData(CAMERA_MSG_PREVIEW_FRAME, MCameraClient::EQ, 1);
-                }
-            }
-        }
-    }
-};
-
-class TestRecording : public AfterConnect {
-public:
-    void run() {
-        ASSERT(c->recordingEnabled() == false);
-        sp<MSurface> surface = new MSurface();
-        ASSERT(c->setPreviewDisplay(surface) == NO_ERROR);
-        c->setPreviewCallbackFlag(FRAME_CALLBACK_FLAG_ENABLE_MASK);
-        cc->setReleaser(c.get());
-        c->startRecording();
-        ASSERT(c->recordingEnabled() == true);
-        sleep(2);
-        c->stopRecording();
-        cc->setReleaser(NULL);
-        cc->assertData(CAMERA_MSG_VIDEO_FRAME, MCameraClient::GE, 10);
-    }
-};
-
-class TestPreviewSize : public AfterStartPreview {
-public:
-    void checkOnePicture(int w, int h) {
-        int size = w*h*3/2;  // should read from parameters
-
-        c->stopPreview();
-
-        CameraParameters param(c->getParameters());
-        param.setPreviewSize(w, h);
-        c->setPreviewCallbackFlag(FRAME_CALLBACK_FLAG_ENABLE_MASK);
-        c->setParameters(param.flatten());
-
-        c->startPreview();
-
-        cc->clearStat();
-        cc->waitData(CAMERA_MSG_PREVIEW_FRAME, MCameraClient::GE, 1);
-        cc->assertDataSize(CAMERA_MSG_PREVIEW_FRAME, MCameraClient::EQ, size);
-    }
-
-    void run() {
-        checkOnePicture(480, 320);
-        checkOnePicture(352, 288);
-        checkOnePicture(176, 144);
-    }
-};
-
-void runHolderService() {
-    defaultServiceManager()->addService(
-            String16("CameraServiceTest.Holder"), new HolderService());
-    ProcessState::self()->startThreadPool();
-}
-
-int main(int argc, char **argv)
-{
-    if (argc != 1) {
-        runFunction(argv[1]);
-        return 0;
-    }
-    INFO("CameraServiceTest start");
-    gExecutable = argv[0];
-    runHolderService();
-
-    testConnect();                              flushCommands();
-    testAllowConnectOnceOnly();                 flushCommands();
-    testReconnect();                            flushCommands();
-    testLockUnlock();                           flushCommands();
-    testReconnectFromAnotherProcess();          flushCommands();
-
-    RUN(TestSetPreviewDisplay);
-    RUN(TestStartPreview);
-    RUN(TestStartPreviewWithoutDisplay);
-    RUN(TestAutoFocus);
-    RUN(TestStopPreview);
-    RUN(TestTakePicture);
-    RUN(TestTakeMultiplePictures);
-    RUN(TestGetParameters);
-    RUN(TestPictureSize);
-    RUN(TestPreviewCallbackFlag);
-    RUN(TestRecording);
-    RUN(TestPreviewSize);
-}
diff --git a/cmds/am/src/com/android/commands/am/Am.java b/cmds/am/src/com/android/commands/am/Am.java
index 736ac08..301883f 100644
--- a/cmds/am/src/com/android/commands/am/Am.java
+++ b/cmds/am/src/com/android/commands/am/Am.java
@@ -205,7 +205,7 @@
         String uri = nextArg();
         if (uri != null) {
             Intent oldIntent = intent;
-            intent = Intent.getIntent(uri);
+            intent = Intent.parseUri(uri, 0);
             if (oldIntent.getAction() != null) {
                 intent.setAction(oldIntent.getAction());
             }
diff --git a/cmds/bmgr/src/com/android/commands/bmgr/Bmgr.java b/cmds/bmgr/src/com/android/commands/bmgr/Bmgr.java
index 8263e75..39b3a20 100644
--- a/cmds/bmgr/src/com/android/commands/bmgr/Bmgr.java
+++ b/cmds/bmgr/src/com/android/commands/bmgr/Bmgr.java
@@ -175,6 +175,11 @@
     private void doTransport() {
         try {
             String which = nextArg();
+            if (which == null) {
+                showUsage();
+                return;
+            }
+
             String old = mBmgr.selectBackupTransport(which);
             if (old == null) {
                 System.out.println("Unknown transport '" + which
@@ -318,6 +323,11 @@
 
     private void doRestore() {
         String arg = nextArg();
+        if (arg == null) {
+            showUsage();
+            return;
+        }
+
         if (arg.indexOf('.') >= 0) {
             // it's a package name
             doRestorePackage(arg);
diff --git a/cmds/bootanimation/BootAnimation.cpp b/cmds/bootanimation/BootAnimation.cpp
index ac2eb0d..7a7f8ed 100644
--- a/cmds/bootanimation/BootAnimation.cpp
+++ b/cmds/bootanimation/BootAnimation.cpp
@@ -38,7 +38,7 @@
 #include <ui/EGLUtils.h>
 
 #include <surfaceflinger/ISurfaceComposer.h>
-#include <surfaceflinger/ISurfaceFlingerClient.h>
+#include <surfaceflinger/ISurfaceComposerClient.h>
 
 #include <core/SkBitmap.h>
 #include <images/SkImageDecoder.h>
diff --git a/cmds/input/input b/cmds/input/input
old mode 100644
new mode 100755
diff --git a/cmds/installd/commands.c b/cmds/installd/commands.c
index 41f070c..b8ba3f6 100644
--- a/cmds/installd/commands.c
+++ b/cmds/installd/commands.c
@@ -16,7 +16,7 @@
 
 #include "installd.h"
 
-int install(const char *pkgname, uid_t uid, gid_t gid)
+int install(const char *pkgname, int encrypted_fs_flag, uid_t uid, gid_t gid)
 {
     char pkgdir[PKG_PATH_MAX];
     char libdir[PKG_PATH_MAX];
@@ -27,11 +27,17 @@
         
     }
 
-    if (create_pkg_path(pkgdir, PKG_DIR_PREFIX, pkgname, PKG_DIR_POSTFIX))
-        return -1;
-    if (create_pkg_path(libdir, PKG_LIB_PREFIX, pkgname, PKG_LIB_POSTFIX))
-        return -1;
-
+    if (encrypted_fs_flag == USE_UNENCRYPTED_FS) {
+        if (create_pkg_path(pkgdir, PKG_DIR_PREFIX, pkgname, PKG_DIR_POSTFIX))
+            return -1;
+        if (create_pkg_path(libdir, PKG_LIB_PREFIX, pkgname, PKG_LIB_POSTFIX))
+            return -1;
+    } else {
+        if (create_pkg_path(pkgdir, PKG_SEC_DIR_PREFIX, pkgname, PKG_DIR_POSTFIX))
+            return -1;
+        if (create_pkg_path(libdir, PKG_SEC_LIB_PREFIX, pkgname, PKG_LIB_POSTFIX))
+            return -1;
+    }
 
     if (mkdir(pkgdir, 0751) < 0) {
         LOGE("cannot create dir '%s': %s\n", pkgdir, strerror(errno));
@@ -56,27 +62,38 @@
     return 0;
 }
 
-int uninstall(const char *pkgname)
+int uninstall(const char *pkgname, int encrypted_fs_flag)
 {
     char pkgdir[PKG_PATH_MAX];
 
-    if (create_pkg_path(pkgdir, PKG_DIR_PREFIX, pkgname, PKG_DIR_POSTFIX))
-        return -1;
+    if (encrypted_fs_flag == USE_UNENCRYPTED_FS) {
+        if (create_pkg_path(pkgdir, PKG_DIR_PREFIX, pkgname, PKG_DIR_POSTFIX))
+            return -1;
+    } else {
+        if (create_pkg_path(pkgdir, PKG_SEC_DIR_PREFIX, pkgname, PKG_DIR_POSTFIX))
+            return -1;
+    }
 
         /* delete contents AND directory, no exceptions */
     return delete_dir_contents(pkgdir, 1, 0);
 }
 
-int renamepkg(const char *oldpkgname, const char *newpkgname)
+int renamepkg(const char *oldpkgname, const char *newpkgname, int encrypted_fs_flag)
 {
     char oldpkgdir[PKG_PATH_MAX];
     char newpkgdir[PKG_PATH_MAX];
 
-    if (create_pkg_path(oldpkgdir, PKG_DIR_PREFIX, oldpkgname, PKG_DIR_POSTFIX))
-        return -1;
-    if (create_pkg_path(newpkgdir, PKG_DIR_PREFIX, newpkgname, PKG_DIR_POSTFIX))
-        return -1;
-
+    if (encrypted_fs_flag == USE_UNENCRYPTED_FS) {
+        if (create_pkg_path(oldpkgdir, PKG_DIR_PREFIX, oldpkgname, PKG_DIR_POSTFIX))
+            return -1;
+        if (create_pkg_path(newpkgdir, PKG_DIR_PREFIX, newpkgname, PKG_DIR_POSTFIX))
+            return -1;
+    } else {
+        if (create_pkg_path(oldpkgdir, PKG_SEC_DIR_PREFIX, oldpkgname, PKG_DIR_POSTFIX))
+            return -1;
+        if (create_pkg_path(newpkgdir, PKG_SEC_DIR_PREFIX, newpkgname, PKG_DIR_POSTFIX))
+            return -1;
+    }
 
     if (rename(oldpkgdir, newpkgdir) < 0) {
         LOGE("cannot rename dir '%s' to '%s': %s\n", oldpkgdir, newpkgdir, strerror(errno));
@@ -85,29 +102,41 @@
     return 0;
 }
 
-int delete_user_data(const char *pkgname)
+int delete_user_data(const char *pkgname, int encrypted_fs_flag)
 {
     char pkgdir[PKG_PATH_MAX];
 
-    if (create_pkg_path(pkgdir, PKG_DIR_PREFIX, pkgname, PKG_DIR_POSTFIX))
-        return -1;
+    if (encrypted_fs_flag == USE_UNENCRYPTED_FS) {
+        if (create_pkg_path(pkgdir, PKG_DIR_PREFIX, pkgname, PKG_DIR_POSTFIX))
+            return -1;
+    } else {
+        if (create_pkg_path(pkgdir, PKG_SEC_DIR_PREFIX, pkgname, PKG_DIR_POSTFIX))
+            return -1;
+    }
 
         /* delete contents, excluding "lib", but not the directory itself */
     return delete_dir_contents(pkgdir, 0, "lib");
 }
 
-int delete_cache(const char *pkgname)
+int delete_cache(const char *pkgname, int encrypted_fs_flag)
 {
     char cachedir[PKG_PATH_MAX];
 
-    if (create_pkg_path(cachedir, CACHE_DIR_PREFIX, pkgname, CACHE_DIR_POSTFIX))
-        return -1;
-
+    if (encrypted_fs_flag == USE_UNENCRYPTED_FS) {
+        if (create_pkg_path(cachedir, CACHE_DIR_PREFIX, pkgname, CACHE_DIR_POSTFIX))
+            return -1;
+    } else {
+        if (create_pkg_path(cachedir, CACHE_SEC_DIR_PREFIX, pkgname, CACHE_DIR_POSTFIX))
+            return -1;
+    }
 
         /* delete contents, not the directory, no exceptions */
     return delete_dir_contents(cachedir, 0, 0);
 }
 
+/* TODO(oam): depending on use case (ecryptfs or dmcrypt)
+ * change implementation
+ */
 static int disk_free()
 {
     struct statfs sfs;
@@ -139,6 +168,39 @@
     LOGI("free_cache(%d) avail %d\n", free_size, avail);
     if (avail >= free_size) return 0;
 
+    /* First try encrypted dir */
+    d = opendir(PKG_SEC_DIR_PREFIX);
+    if (d == NULL) {
+        LOGE("cannot open %s\n", PKG_SEC_DIR_PREFIX);
+    } else {
+        dfd = dirfd(d);
+
+        while ((de = readdir(d))) {
+           if (de->d_type != DT_DIR) continue;
+           name = de->d_name;
+
+            /* always skip "." and ".." */
+            if (name[0] == '.') {
+                if (name[1] == 0) continue;
+                if ((name[1] == '.') && (name[2] == 0)) continue;
+            }
+
+            subfd = openat(dfd, name, O_RDONLY | O_DIRECTORY);
+            if (subfd < 0) continue;
+
+            delete_dir_contents_fd(subfd, "cache");
+            close(subfd);
+
+            avail = disk_free();
+            if (avail >= free_size) {
+                closedir(d);
+                return 0;
+            }
+        }
+        closedir(d);
+    }
+
+    /* Next try unencrypted dir... */
     d = opendir(PKG_DIR_PREFIX);
     if (d == NULL) {
         LOGE("cannot open %s\n", PKG_DIR_PREFIX);
@@ -314,7 +376,7 @@
 
 int get_size(const char *pkgname, const char *apkpath,
              const char *fwdlock_apkpath,
-             int *_codesize, int *_datasize, int *_cachesize)
+             int *_codesize, int *_datasize, int *_cachesize, int encrypted_fs_flag)
 {
     DIR *d;
     int dfd;
@@ -349,8 +411,14 @@
         }
     }
 
-    if (create_pkg_path(path, PKG_DIR_PREFIX, pkgname, PKG_DIR_POSTFIX)) {
-        goto done;
+    if (encrypted_fs_flag == 0) {
+        if (create_pkg_path(path, PKG_DIR_PREFIX, pkgname, PKG_DIR_POSTFIX)) {
+            goto done;
+        }
+    } else {
+        if (create_pkg_path(path, PKG_SEC_DIR_PREFIX, pkgname, PKG_DIR_POSTFIX)) {
+            goto done;
+        }
     }
 
     d = opendir(path);
diff --git a/cmds/installd/installd.c b/cmds/installd/installd.c
index f6ca998..882c493 100644
--- a/cmds/installd/installd.c
+++ b/cmds/installd/installd.c
@@ -29,7 +29,7 @@
 
 static int do_install(char **arg, char reply[REPLY_MAX])
 {
-    return install(arg[0], atoi(arg[1]), atoi(arg[2])); /* pkgname, uid, gid */
+    return install(arg[0], atoi(arg[1]), atoi(arg[2]), atoi(arg[3])); /* pkgname, uid, gid */
 }
 
 static int do_dexopt(char **arg, char reply[REPLY_MAX])
@@ -50,12 +50,12 @@
 
 static int do_remove(char **arg, char reply[REPLY_MAX])
 {
-    return uninstall(arg[0]); /* pkgname */
+    return uninstall(arg[0], atoi(arg[1])); /* pkgname */
 }
 
 static int do_rename(char **arg, char reply[REPLY_MAX])
 {
-    return renamepkg(arg[0], arg[1]); /* oldpkgname, newpkgname */
+    return renamepkg(arg[0], arg[1], atoi(arg[2])); /* oldpkgname, newpkgname */
 }
 
 static int do_free_cache(char **arg, char reply[REPLY_MAX]) /* TODO int:free_size */
@@ -65,7 +65,7 @@
 
 static int do_rm_cache(char **arg, char reply[REPLY_MAX])
 {
-    return delete_cache(arg[0]); /* pkgname */
+    return delete_cache(arg[0], atoi(arg[1])); /* pkgname */
 }
 
 static int do_protect(char **arg, char reply[REPLY_MAX])
@@ -81,7 +81,7 @@
     int res = 0;
 
         /* pkgdir, apkpath */
-    res = get_size(arg[0], arg[1], arg[2], &codesize, &datasize, &cachesize);
+    res = get_size(arg[0], arg[1], arg[2], &codesize, &datasize, &cachesize, atoi(arg[3]));
 
     sprintf(reply,"%d %d %d", codesize, datasize, cachesize);
     return res;
@@ -89,7 +89,7 @@
 
 static int do_rm_user_data(char **arg, char reply[REPLY_MAX])
 {
-    return delete_user_data(arg[0]); /* pkgname */
+    return delete_user_data(arg[0], atoi(arg[1])); /* pkgname */
 }
 
 static int do_movefiles(char **arg, char reply[REPLY_MAX])
@@ -105,17 +105,17 @@
 
 struct cmdinfo cmds[] = {
     { "ping",                 0, do_ping },
-    { "install",              3, do_install },
+    { "install",              4, do_install },
     { "dexopt",               3, do_dexopt },
     { "movedex",              2, do_move_dex },
     { "rmdex",                1, do_rm_dex },
-    { "remove",               1, do_remove },
-    { "rename",               2, do_rename },
+    { "remove",               2, do_remove },
+    { "rename",               3, do_rename },
     { "freecache",            1, do_free_cache },
-    { "rmcache",              1, do_rm_cache },
+    { "rmcache",              2, do_rm_cache },
     { "protect",              2, do_protect },
-    { "getsize",              3, do_get_size },
-    { "rmuserdata",           1, do_rm_user_data },
+    { "getsize",              4, do_get_size },
+    { "rmuserdata",           2, do_rm_user_data },
     { "movefiles",            0, do_movefiles },
 };
 
diff --git a/cmds/installd/installd.h b/cmds/installd/installd.h
index cfcdb98..8e4adb1 100644
--- a/cmds/installd/installd.h
+++ b/cmds/installd/installd.h
@@ -48,16 +48,23 @@
 /* elements combined with a valid package name to form paths */
 
 #define PKG_DIR_PREFIX         "/data/data/"
+#define PKG_SEC_DIR_PREFIX     "/data/secure/data/"
 #define PKG_DIR_POSTFIX        ""
 
 #define PKG_LIB_PREFIX         "/data/data/"
+#define PKG_SEC_LIB_PREFIX     "/data/secure/data/"
 #define PKG_LIB_POSTFIX        "/lib"
 
 #define CACHE_DIR_PREFIX       "/data/data/"
+#define CACHE_SEC_DIR_PREFIX   "/data/secure/data/"
 #define CACHE_DIR_POSTFIX      "/cache"
 
 #define APK_DIR_PREFIX         "/data/app/"
 
+/* Encrypted File SYstems constants */
+#define USE_ENCRYPTED_FS       1
+#define USE_UNENCRYPTED_FS     0
+
 /* other handy constants */
 
 #define PROTECTED_DIR_PREFIX  "/data/app-private/"
@@ -89,16 +96,16 @@
 
 /* commands.c */
 
-int install(const char *pkgname, uid_t uid, gid_t gid);
-int uninstall(const char *pkgname);
-int renamepkg(const char *oldpkgname, const char *newpkgname);
-int delete_user_data(const char *pkgname);
-int delete_cache(const char *pkgname);
+int install(const char *pkgname, int encrypted_fs_flag, uid_t uid, gid_t gid);
+int uninstall(const char *pkgname, int encrypted_fs_flag);
+int renamepkg(const char *oldpkgname, const char *newpkgname, int encrypted_fs_flag);
+int delete_user_data(const char *pkgname, int encrypted_fs_flag);
+int delete_cache(const char *pkgname, int encrypted_fs_flag);
 int move_dex(const char *src, const char *dst);
 int rm_dex(const char *path);
 int protect(char *pkgname, gid_t gid);
 int get_size(const char *pkgname, const char *apkpath, const char *fwdlock_apkpath,
-             int *codesize, int *datasize, int *cachesize);
+             int *codesize, int *datasize, int *cachesize, int encrypted_fs_flag);
 int free_cache(int free_size);
 int dexopt(const char *apk_path, uid_t uid, int is_public);
 int movefiles();
diff --git a/cmds/servicemanager/bctest.c b/cmds/servicemanager/bctest.c
index 6dee816..ff5aced 100644
--- a/cmds/servicemanager/bctest.c
+++ b/cmds/servicemanager/bctest.c
@@ -14,6 +14,7 @@
     struct binder_io msg, reply;
 
     bio_init(&msg, iodata, sizeof(iodata), 4);
+    bio_put_uint32(&msg, 0);  // strict mode header
     bio_put_string16_x(&msg, SVC_MGR_NAME);
     bio_put_string16_x(&msg, name);
 
@@ -37,7 +38,7 @@
     struct binder_io msg, reply;
 
     bio_init(&msg, iodata, sizeof(iodata), 4);
-
+    bio_put_uint32(&msg, 0);  // strict mode header
     bio_put_string16_x(&msg, SVC_MGR_NAME);
     bio_put_string16_x(&msg, name);
     bio_put_obj(&msg, ptr);
diff --git a/cmds/servicemanager/service_manager.c b/cmds/servicemanager/service_manager.c
index a2006c1..01cddc6 100644
--- a/cmds/servicemanager/service_manager.c
+++ b/cmds/servicemanager/service_manager.c
@@ -193,6 +193,7 @@
     uint16_t *s;
     unsigned len;
     void *ptr;
+    uint32_t strict_policy;
 
 //    LOGI("target=%p code=%d pid=%d uid=%d\n",
 //         txn->target, txn->code, txn->sender_pid, txn->sender_euid);
@@ -200,8 +201,12 @@
     if (txn->target != svcmgr_handle)
         return -1;
 
+    // Equivalent to Parcel::enforceInterface(), reading the RPC
+    // header with the strict mode policy mask and the interface name.
+    // Note that we ignore the strict_policy and don't propagate it
+    // further (since we do no outbound RPCs anyway).
+    strict_policy = bio_get_uint32(msg);
     s = bio_get_string16(msg, &len);
-
     if ((len != (sizeof(svcmgr_id) / 2)) ||
         memcmp(svcmgr_id, s, sizeof(svcmgr_id))) {
         fprintf(stderr,"invalid id %s\n", str8(s));
diff --git a/cmds/stagefright/Android.mk b/cmds/stagefright/Android.mk
index 34648b5..9a97284 100644
--- a/cmds/stagefright/Android.mk
+++ b/cmds/stagefright/Android.mk
@@ -1,5 +1,3 @@
-ifeq ($(BUILD_WITH_FULL_STAGEFRIGHT),true)
-
 LOCAL_PATH:= $(call my-dir)
 
 include $(CLEAR_VARS)
@@ -9,11 +7,12 @@
 	SineSource.cpp
 
 LOCAL_SHARED_LIBRARIES := \
-	libstagefright libmedia libutils libbinder
+	libstagefright libmedia libutils libbinder libstagefright_foundation
 
 LOCAL_C_INCLUDES:= \
 	$(JNI_H_INCLUDE) \
 	frameworks/base/media/libstagefright \
+	frameworks/base/media/libstagefright/include \
 	$(TOP)/external/opencore/extern_libs_v2/khronos/openmax/include
 
 LOCAL_CFLAGS += -Wno-multichar
@@ -71,5 +70,3 @@
 LOCAL_MODULE:= audioloop
 
 include $(BUILD_EXECUTABLE)
-
-endif
diff --git a/cmds/stagefright/record.cpp b/cmds/stagefright/record.cpp
index 845c854..5a87f4c 100644
--- a/cmds/stagefright/record.cpp
+++ b/cmds/stagefright/record.cpp
@@ -147,7 +147,7 @@
     OMXClient client;
     CHECK_EQ(client.connect(), OK);
 
-#if 1
+#if 0
     sp<MediaSource> source = createSource(argv[1]);
 
     if (source == NULL) {
@@ -165,14 +165,15 @@
     success = success && meta->findInt32(kKeyHeight, &height);
     CHECK(success);
 #else
-    int width = 800;
+    int width = 720;
     int height = 480;
     sp<MediaSource> decoder = new DummySource(width, height);
 #endif
 
     sp<MetaData> enc_meta = new MetaData;
     // enc_meta->setCString(kKeyMIMEType, MEDIA_MIMETYPE_VIDEO_H263);
-    enc_meta->setCString(kKeyMIMEType, MEDIA_MIMETYPE_VIDEO_MPEG4);
+    // enc_meta->setCString(kKeyMIMEType, MEDIA_MIMETYPE_VIDEO_MPEG4);
+    enc_meta->setCString(kKeyMIMEType, MEDIA_MIMETYPE_VIDEO_AVC);
     enc_meta->setInt32(kKeyWidth, width);
     enc_meta->setInt32(kKeyHeight, height);
 
@@ -213,6 +214,8 @@
 
 #if 0
     CameraSource *source = CameraSource::Create();
+    source->start();
+
     printf("source = %p\n", source);
 
     for (int i = 0; i < 100; ++i) {
@@ -227,6 +230,8 @@
         buffer = NULL;
     }
 
+    source->stop();
+
     delete source;
     source = NULL;
 #endif
diff --git a/cmds/stagefright/stagefright.cpp b/cmds/stagefright/stagefright.cpp
index b838f32..b7a3f99 100644
--- a/cmds/stagefright/stagefright.cpp
+++ b/cmds/stagefright/stagefright.cpp
@@ -26,12 +26,11 @@
 #include <binder/ProcessState.h>
 #include <media/IMediaPlayerService.h>
 #include <media/stagefright/AudioPlayer.h>
-#include <media/stagefright/CachingDataSource.h>
-#include <media/stagefright/FileSource.h>
-#include <media/stagefright/HTTPDataSource.h>
+#include <media/stagefright/DataSource.h>
 #include <media/stagefright/JPEGSource.h>
 #include <media/stagefright/MediaDebug.h>
 #include <media/stagefright/MediaDefs.h>
+#include <media/stagefright/MediaErrors.h>
 #include <media/stagefright/MediaExtractor.h>
 #include <media/stagefright/MediaSource.h>
 #include <media/stagefright/MetaData.h>
@@ -39,6 +38,9 @@
 #include <media/stagefright/OMXCodec.h>
 #include <media/mediametadataretriever.h>
 
+#include <media/stagefright/foundation/hexdump.h>
+#include <media/stagefright/MPEG4Writer.h>
+
 using namespace android;
 
 static long gNumRepetitions;
@@ -46,6 +48,8 @@
 static long gReproduceBug;  // if not -1.
 static bool gPreferSoftwareCodec;
 static bool gPlaybackAudio;
+static bool gWriteMP4;
+static String8 gWriteMP4Filename;
 
 static int64_t getNowUs() {
     struct timeval tv;
@@ -85,6 +89,7 @@
     if (gPlaybackAudio) {
         AudioPlayer *player = new AudioPlayer(NULL);
         player->setSource(rawSource);
+        rawSource.clear();
 
         player->start(true /* sourceAlreadyStarted */);
 
@@ -95,6 +100,8 @@
 
         delete player;
         player = NULL;
+
+        return;
     } else if (gReproduceBug >= 3 && gReproduceBug <= 5) {
         int64_t durationUs;
         CHECK(meta->findInt64(kKeyDuration, &durationUs));
@@ -256,6 +263,21 @@
     }
 }
 
+static void writeSourceToMP4(const sp<MediaSource> &source) {
+    sp<MPEG4Writer> writer =
+        new MPEG4Writer(gWriteMP4Filename.string());
+
+    CHECK_EQ(writer->addSource(source), OK);
+
+    sp<MetaData> params = new MetaData;
+    CHECK_EQ(writer->start(), OK);
+
+    while (!writer->reachedEOS()) {
+        usleep(100000);
+    }
+    writer->stop();
+}
+
 static void usage(const char *me) {
     fprintf(stderr, "usage: %s\n", me);
     fprintf(stderr, "       -h(elp)\n");
@@ -268,6 +290,7 @@
     fprintf(stderr, "       -t(humbnail) extract video thumbnail or album art\n");
     fprintf(stderr, "       -s(oftware) prefer software codec\n");
     fprintf(stderr, "       -o playback audio\n");
+    fprintf(stderr, "       -w(rite) filename (write to .mp4 file)\n");
 }
 
 int main(int argc, char **argv) {
@@ -282,9 +305,10 @@
     gReproduceBug = -1;
     gPreferSoftwareCodec = false;
     gPlaybackAudio = false;
+    gWriteMP4 = false;
 
     int res;
-    while ((res = getopt(argc, argv, "han:lm:b:ptso")) >= 0) {
+    while ((res = getopt(argc, argv, "han:lm:b:ptsow:")) >= 0) {
         switch (res) {
             case 'a':
             {
@@ -320,6 +344,13 @@
                 break;
             }
 
+            case 'w':
+            {
+                gWriteMP4 = true;
+                gWriteMP4Filename.setTo(optarg);
+                break;
+            }
+
             case 'p':
             {
                 dumpProfiles = true;
@@ -479,19 +510,9 @@
     for (int k = 0; k < argc; ++k) {
         const char *filename = argv[k];
 
-        sp<DataSource> dataSource;
-        if (!strncasecmp("http://", filename, 7)) {
-            dataSource = new HTTPDataSource(filename);
-            if (((HTTPDataSource *)dataSource.get())->connect() != OK) {
-                fprintf(stderr, "failed to connect to HTTP server.\n");
-                return -1;
-            }
-            dataSource = new CachingDataSource(dataSource, 32 * 1024, 20);
-        } else {
-            dataSource = new FileSource(filename);
-        }
+        sp<DataSource> dataSource = DataSource::CreateFromURI(filename);
 
-        if (dataSource == NULL) {
+        if (strncasecmp(filename, "sine:", 5) && dataSource == NULL) {
             fprintf(stderr, "Unable to create data source.\n");
             return 1;
         }
@@ -562,7 +583,11 @@
             mediaSource = extractor->getTrack(i);
         }
 
-        playSource(&client, mediaSource);
+        if (gWriteMP4) {
+            writeSourceToMP4(mediaSource);
+        } else {
+            playSource(&client, mediaSource);
+        }
     }
 
     client.disconnect();
diff --git a/cmds/surfaceflinger/Android.mk b/cmds/surfaceflinger/Android.mk
index bfa58a1..1df32bb 100644
--- a/cmds/surfaceflinger/Android.mk
+++ b/cmds/surfaceflinger/Android.mk
@@ -10,7 +10,7 @@
 	libutils
 
 LOCAL_C_INCLUDES := \
-	$(LOCAL_PATH)/../../libs/surfaceflinger
+	$(LOCAL_PATH)/../../services/surfaceflinger
 
 LOCAL_MODULE:= surfaceflinger
 
diff --git a/cmds/surfaceflinger/main_surfaceflinger.cpp b/cmds/surfaceflinger/main_surfaceflinger.cpp
index d650721..78b1007 100644
--- a/cmds/surfaceflinger/main_surfaceflinger.cpp
+++ b/cmds/surfaceflinger/main_surfaceflinger.cpp
@@ -1,18 +1,25 @@
-#include <binder/IPCThreadState.h>
-#include <binder/ProcessState.h>
-#include <binder/IServiceManager.h>
-#include <utils/Log.h>
+/*
+ * Copyright (C) 2010 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
 
+#include <binder/BinderService.h>
 #include <SurfaceFlinger.h>
 
 using namespace android;
 
-int main(int argc, char** argv)
-{
-    sp<ProcessState> proc(ProcessState::self());
-    sp<IServiceManager> sm = defaultServiceManager();
-    LOGI("ServiceManager: %p", sm.get());
-    SurfaceFlinger::instantiate();
-    ProcessState::self()->startThreadPool();
-    IPCThreadState::self()->joinThreadPool();
+int main(int argc, char** argv) {
+    SurfaceFlinger::publishAndJoinThreadPool();
+    return 0;
 }
diff --git a/cmds/system_server/library/Android.mk b/cmds/system_server/library/Android.mk
index 1813d3e..a880a91 100644
--- a/cmds/system_server/library/Android.mk
+++ b/cmds/system_server/library/Android.mk
@@ -7,9 +7,9 @@
 base = $(LOCAL_PATH)/../../..
 
 LOCAL_C_INCLUDES := \
-	$(base)/camera/libcameraservice \
-	$(base)/libs/audioflinger \
-	$(base)/libs/surfaceflinger \
+	$(base)/services/camera/libcameraservice \
+	$(base)/services/audioflinger \
+	$(base)/services/surfaceflinger \
 	$(base)/media/libmediaplayerservice \
 	$(JNI_H_INCLUDE)
 
diff --git a/core/java/android/accounts/AccountManagerService.java b/core/java/android/accounts/AccountManagerService.java
index 1cd7aa7..1d9e0f1 100644
--- a/core/java/android/accounts/AccountManagerService.java
+++ b/core/java/android/accounts/AccountManagerService.java
@@ -1483,7 +1483,13 @@
     }
 
     private static String getDatabaseName() {
-        return DATABASE_NAME;
+        if(Environment.isEncryptedFilesystemEnabled()) {
+            // Hard-coded path in case of encrypted file system
+            return Environment.getSystemSecureDirectory().getPath() + File.separator + DATABASE_NAME;
+        } else {
+            // Regular path in case of non-encrypted file system
+            return DATABASE_NAME;
+        }
     }
 
     private class DatabaseHelper extends SQLiteOpenHelper {
diff --git a/core/java/android/app/Activity.java b/core/java/android/app/Activity.java
index a962391..f7ccc12 100644
--- a/core/java/android/app/Activity.java
+++ b/core/java/android/app/Activity.java
@@ -39,7 +39,6 @@
 import android.os.Bundle;
 import android.os.Handler;
 import android.os.IBinder;
-import android.os.Looper;
 import android.os.RemoteException;
 import android.text.Selection;
 import android.text.SpannableStringBuilder;
@@ -68,6 +67,8 @@
 import android.view.ViewGroup.LayoutParams;
 import android.view.accessibility.AccessibilityEvent;
 import android.widget.AdapterView;
+import android.widget.FrameLayout;
+import android.widget.LinearLayout;
 
 import java.util.ArrayList;
 import java.util.HashMap;
@@ -1205,19 +1206,37 @@
      * @see #onPause
      */
     public boolean onCreateThumbnail(Bitmap outBitmap, Canvas canvas) {
-        final View view = mDecor;
-        if (view == null) {
+        if (mDecor == null) {
             return false;
         }
 
-        final int vw = view.getWidth();
-        final int vh = view.getHeight();
-        final int dw = outBitmap.getWidth();
-        final int dh = outBitmap.getHeight();
+        int paddingLeft = 0;
+        int paddingRight = 0;
+        int paddingTop = 0;
+        int paddingBottom = 0;
+
+        // Find System window and use padding so we ignore space reserved for decorations
+        // like the status bar and such.
+        final FrameLayout top = (FrameLayout) mDecor;
+        for (int i = 0; i < top.getChildCount(); i++) {
+            View child = top.getChildAt(i);
+            if (child.isFitsSystemWindowsFlagSet()) {
+                paddingLeft = child.getPaddingLeft();
+                paddingRight = child.getPaddingRight();
+                paddingTop = child.getPaddingTop();
+                paddingBottom = child.getPaddingBottom();
+                break;
+            }
+        }
+        
+        final int visibleWidth = mDecor.getWidth() - paddingLeft - paddingRight;
+        final int visibleHeight = mDecor.getHeight() - paddingTop - paddingBottom;
 
         canvas.save();
-        canvas.scale(((float)dw)/vw, ((float)dh)/vh);
-        view.draw(canvas);
+        canvas.scale( (float) outBitmap.getWidth() / visibleWidth,
+                (float) outBitmap.getHeight() / visibleHeight);
+        canvas.translate(-paddingLeft, -paddingTop);
+        mDecor.draw(canvas);
         canvas.restore();
 
         return true;
@@ -3720,6 +3739,46 @@
         return null;
     }
 
+    /**
+     * Bit indicating that this activity is "immersive" and should not be
+     * interrupted by notifications if possible.
+     *
+     * This value is initially set by the manifest property
+     * <code>android:immersive</code> but may be changed at runtime by
+     * {@link #setImmersive}.
+     *
+     * @see android.content.pm.ActivityInfo#FLAG_IMMERSIVE
+     */
+    public boolean isImmersive() {
+        try {
+            return ActivityManagerNative.getDefault().isImmersive(mToken);
+        } catch (RemoteException e) {
+            return false;
+        }
+    }
+
+    /**
+     * Adjust the current immersive mode setting.
+     * 
+     * Note that changing this value will have no effect on the activity's
+     * {@link android.content.pm.ActivityInfo} structure; that is, if
+     * <code>android:immersive</code> is set to <code>true</code>
+     * in the application's manifest entry for this activity, the {@link
+     * android.content.pm.ActivityInfo#flags ActivityInfo.flags} member will
+     * always have its {@link android.content.pm.ActivityInfo#FLAG_IMMERSIVE
+     * FLAG_IMMERSIVE} bit set.
+     *
+     * @see #isImmersive
+     * @see android.content.pm.ActivityInfo#FLAG_IMMERSIVE
+     */
+    public void setImmersive(boolean i) {
+        try {
+            ActivityManagerNative.getDefault().setImmersive(mToken, i);
+        } catch (RemoteException e) {
+            // pass
+        }
+    }
+
     // ------------------ Internal API ------------------
     
     final void setParent(Activity parent) {
diff --git a/core/java/android/app/ActivityManager.java b/core/java/android/app/ActivityManager.java
index c9096cf..d66e98b 100644
--- a/core/java/android/app/ActivityManager.java
+++ b/core/java/android/app/ActivityManager.java
@@ -285,24 +285,54 @@
      * @param maxNum The maximum number of entries to return in the list.  The
      * actual number returned may be smaller, depending on how many tasks the
      * user has started.
-     * 
+     *
+     * @param flags Optional flags
+     * @param receiver Optional receiver for delayed thumbnails
+     *
      * @return Returns a list of RunningTaskInfo records describing each of
      * the running tasks.
      * 
+     * Some thumbnails may not be available at the time of this call. The optional
+     * receiver may be used to receive those thumbnails.
+     *
      * @throws SecurityException Throws SecurityException if the caller does
      * not hold the {@link android.Manifest.permission#GET_TASKS} permission.
+     *
+     * @hide
      */
-    public List<RunningTaskInfo> getRunningTasks(int maxNum)
+    public List<RunningTaskInfo> getRunningTasks(int maxNum, int flags, IThumbnailReceiver receiver)
             throws SecurityException {
         try {
-            return (List<RunningTaskInfo>)ActivityManagerNative.getDefault()
-                    .getTasks(maxNum, 0, null);
+            return ActivityManagerNative.getDefault().getTasks(maxNum, flags, receiver);
         } catch (RemoteException e) {
             // System dead, we will be dead too soon!
             return null;
         }
     }
-    
+
+    /**
+     * Return a list of the tasks that are currently running, with
+     * the most recent being first and older ones after in order.  Note that
+     * "running" does not mean any of the task's code is currently loaded or
+     * activity -- the task may have been frozen by the system, so that it
+     * can be restarted in its previous state when next brought to the
+     * foreground.
+     *
+     * @param maxNum The maximum number of entries to return in the list.  The
+     * actual number returned may be smaller, depending on how many tasks the
+     * user has started.
+     *
+     * @return Returns a list of RunningTaskInfo records describing each of
+     * the running tasks.
+     *
+     * @throws SecurityException Throws SecurityException if the caller does
+     * not hold the {@link android.Manifest.permission#GET_TASKS} permission.
+     */
+    public List<RunningTaskInfo> getRunningTasks(int maxNum)
+            throws SecurityException {
+        return getRunningTasks(maxNum, 0, null);
+    }
+
     /**
      * Information you can retrieve about a particular Service that is
      * currently running in the system.
@@ -717,9 +747,24 @@
          */
         public int uid;
         
+        /**
+         * All packages that have been loaded into the process.
+         */
         public String pkgList[];
         
         /**
+         * Constant for {@link #flags}: this is a heavy-weight process,
+         * meaning it will not be killed while in the background.
+         */
+        public static final int FLAG_HEAVY_WEIGHT = 1<<0;
+        
+        /**
+         * Flags of information.  May be any of
+         * {@link #FLAG_HEAVY_WEIGHT}.
+         */
+        public int flags;
+        
+        /**
          * Constant for {@link #importance}: this process is running the
          * foreground UI.
          */
@@ -727,11 +772,25 @@
         
         /**
          * Constant for {@link #importance}: this process is running something
-         * that is considered to be actively visible to the user.
+         * that is actively visible to the user, though not in the immediate
+         * foreground.
          */
         public static final int IMPORTANCE_VISIBLE = 200;
         
         /**
+         * Constant for {@link #importance}: this process is running something
+         * that is considered to be actively perceptible to the user.  An
+         * example would be an application performing background music playback.
+         */
+        public static final int IMPORTANCE_PERCEPTIBLE = 130;
+        
+        /**
+         * Constant for {@link #importance}: this process is running a
+         * heavy-weight application and thus should not be killed.
+         */
+        public static final int IMPORTANCE_HEAVY_WEIGHT = 170;
+        
+        /**
          * Constant for {@link #importance}: this process is contains services
          * that should remain running.
          */
@@ -832,6 +891,7 @@
             dest.writeInt(pid);
             dest.writeInt(uid);
             dest.writeStringArray(pkgList);
+            dest.writeInt(this.flags);
             dest.writeInt(importance);
             dest.writeInt(lru);
             dest.writeInt(importanceReasonCode);
@@ -844,6 +904,7 @@
             pid = source.readInt();
             uid = source.readInt();
             pkgList = source.readStringArray();
+            flags = source.readInt();
             importance = source.readInt();
             lru = source.readInt();
             importanceReasonCode = source.readInt();
diff --git a/core/java/android/app/ActivityManagerNative.java b/core/java/android/app/ActivityManagerNative.java
index f694285..1fe85e6 100644
--- a/core/java/android/app/ActivityManagerNative.java
+++ b/core/java/android/app/ActivityManagerNative.java
@@ -1021,16 +1021,6 @@
             return true;
         }
 
-        case REPORT_PSS_TRANSACTION: {
-            data.enforceInterface(IActivityManager.descriptor);
-            IBinder b = data.readStrongBinder();
-            IApplicationThread app = ApplicationThreadNative.asInterface(b);
-            int pss = data.readInt();
-            reportPss(app, pss);
-            reply.writeNoException();
-            return true;
-        }
-
         case START_RUNNING_TRANSACTION: {
             data.enforceInterface(IActivityManager.descriptor);
             String pkg = data.readString();
@@ -1062,6 +1052,16 @@
             return true;
         }
 
+        case HANDLE_APPLICATION_STRICT_MODE_VIOLATION_TRANSACTION: {
+            data.enforceInterface(IActivityManager.descriptor);
+            IBinder app = data.readStrongBinder();
+            int violationMask = data.readInt();
+            ApplicationErrorReport.CrashInfo ci = new ApplicationErrorReport.CrashInfo(data);
+            handleApplicationStrictModeViolation(app, violationMask, ci);
+            reply.writeNoException();
+            return true;
+        }
+
         case SIGNAL_PERSISTENT_PROCESSES_TRANSACTION: {
             data.enforceInterface(IActivityManager.descriptor);
             int sig = data.readInt();
@@ -1251,6 +1251,49 @@
             reply.writeNoException();
             return true;
         }
+        
+        case FINISH_HEAVY_WEIGHT_APP_TRANSACTION: {
+            data.enforceInterface(IActivityManager.descriptor);
+            finishHeavyWeightApp();
+            reply.writeNoException();
+            return true;
+        }
+
+        case IS_IMMERSIVE_TRANSACTION: {
+            data.enforceInterface(IActivityManager.descriptor);
+            IBinder token = data.readStrongBinder();
+            reply.writeInt(isImmersive(token) ? 1 : 0);
+            reply.writeNoException();
+            return true;
+        }
+
+        case SET_IMMERSIVE_TRANSACTION: {
+            data.enforceInterface(IActivityManager.descriptor);
+            IBinder token = data.readStrongBinder();
+            boolean imm = data.readInt() == 1;
+            setImmersive(token, imm);
+            reply.writeNoException();
+            return true;
+        }
+        
+        case IS_TOP_ACTIVITY_IMMERSIVE_TRANSACTION: {
+            data.enforceInterface(IActivityManager.descriptor);
+            reply.writeInt(isTopActivityImmersive() ? 1 : 0);
+            reply.writeNoException();
+            return true;
+        }
+
+        case CRASH_APPLICATION_TRANSACTION: {
+            data.enforceInterface(IActivityManager.descriptor);
+            int uid = data.readInt();
+            int initialPid = data.readInt();
+            String packageName = data.readString();
+            String message = data.readString();
+            crashApplication(uid, initialPid, packageName, message);
+            reply.writeNoException();
+            return true;
+        }
+
         }
         
         return super.onTransact(code, data, reply, flags);
@@ -2476,14 +2519,6 @@
         reply.recycle();
         return res;
     }
-    public void reportPss(IApplicationThread caller, int pss) throws RemoteException {
-        Parcel data = Parcel.obtain();
-        data.writeInterfaceToken(IActivityManager.descriptor);
-        data.writeStrongBinder(caller.asBinder());
-        data.writeInt(pss);
-        mRemote.transact(REPORT_PSS_TRANSACTION, data, null, 0);
-        data.recycle();
-    }
     public void startRunning(String pkg, String cls, String action,
             String indata) throws RemoteException {
         Parcel data = Parcel.obtain();
@@ -2516,6 +2551,7 @@
         reply.recycle();
         data.recycle();
     }
+
     public boolean handleApplicationWtf(IBinder app, String tag,
             ApplicationErrorReport.CrashInfo crashInfo) throws RemoteException
     {
@@ -2533,6 +2569,22 @@
         return res;
     }
 
+    public void handleApplicationStrictModeViolation(IBinder app,
+            int violationMask,
+            ApplicationErrorReport.CrashInfo crashInfo) throws RemoteException
+    {
+        Parcel data = Parcel.obtain();
+        Parcel reply = Parcel.obtain();
+        data.writeInterfaceToken(IActivityManager.descriptor);
+        data.writeStrongBinder(app);
+        data.writeInt(violationMask);
+        crashInfo.writeToParcel(data, 0);
+        mRemote.transact(HANDLE_APPLICATION_STRICT_MODE_VIOLATION_TRANSACTION, data, reply, 0);
+        reply.readException();
+        reply.recycle();
+        data.recycle();
+    }
+
     public void signalPersistentProcesses(int sig) throws RemoteException {
         Parcel data = Parcel.obtain();
         Parcel reply = Parcel.obtain();
@@ -2758,5 +2810,70 @@
         return res;
     }
     
+    public void finishHeavyWeightApp() throws RemoteException {
+        Parcel data = Parcel.obtain();
+        Parcel reply = Parcel.obtain();
+        data.writeInterfaceToken(IActivityManager.descriptor);
+        mRemote.transact(FINISH_HEAVY_WEIGHT_APP_TRANSACTION, data, reply, 0);
+        reply.readException();
+        data.recycle();
+        reply.recycle();
+    }
+    
+    public void setImmersive(IBinder token, boolean immersive)
+            throws RemoteException {
+        Parcel data = Parcel.obtain();
+        Parcel reply = Parcel.obtain();
+        data.writeInterfaceToken(IActivityManager.descriptor);
+        data.writeStrongBinder(token);
+        data.writeInt(immersive ? 1 : 0);
+        mRemote.transact(SET_IMMERSIVE_TRANSACTION, data, reply, 0);
+        reply.readException();
+        data.recycle();
+        reply.recycle();
+    }
+
+    public boolean isImmersive(IBinder token)
+            throws RemoteException {
+        Parcel data = Parcel.obtain();
+        Parcel reply = Parcel.obtain();
+        data.writeInterfaceToken(IActivityManager.descriptor);
+        data.writeStrongBinder(token);
+        mRemote.transact(IS_IMMERSIVE_TRANSACTION, data, reply, 0);
+        boolean res = reply.readInt() == 1;
+        reply.readException();
+        data.recycle();
+        reply.recycle();
+        return res;
+    }
+
+    public boolean isTopActivityImmersive()
+            throws RemoteException {
+        Parcel data = Parcel.obtain();
+        Parcel reply = Parcel.obtain();
+        data.writeInterfaceToken(IActivityManager.descriptor);
+        mRemote.transact(IS_TOP_ACTIVITY_IMMERSIVE_TRANSACTION, data, reply, 0);
+        boolean res = reply.readInt() == 1;
+        reply.readException();
+        data.recycle();
+        reply.recycle();
+        return res;
+    }
+
+    public void crashApplication(int uid, int initialPid, String packageName,
+            String message) throws RemoteException {
+        Parcel data = Parcel.obtain();
+        Parcel reply = Parcel.obtain();
+        data.writeInterfaceToken(IActivityManager.descriptor);
+        data.writeInt(uid);
+        data.writeInt(initialPid);
+        data.writeString(packageName);
+        data.writeString(message);
+        mRemote.transact(CRASH_APPLICATION_TRANSACTION, data, reply, 0);
+        reply.readException();
+        data.recycle();
+        reply.recycle();
+    }
+    
     private IBinder mRemote;
 }
diff --git a/core/java/android/app/ActivityThread.java b/core/java/android/app/ActivityThread.java
index 773c344..c88e086 100644
--- a/core/java/android/app/ActivityThread.java
+++ b/core/java/android/app/ActivityThread.java
@@ -25,7 +25,6 @@
 import android.content.IContentProvider;
 import android.content.Intent;
 import android.content.IIntentReceiver;
-import android.content.ServiceConnection;
 import android.content.pm.ActivityInfo;
 import android.content.pm.ApplicationInfo;
 import android.content.pm.IPackageManager;
@@ -42,6 +41,7 @@
 import android.database.sqlite.SQLiteDebug.DbStats;
 import android.graphics.Bitmap;
 import android.graphics.Canvas;
+import android.os.Build;
 import android.os.Bundle;
 import android.os.Debug;
 import android.os.Handler;
@@ -53,6 +53,7 @@
 import android.os.Process;
 import android.os.RemoteException;
 import android.os.ServiceManager;
+import android.os.StrictMode;
 import android.os.SystemClock;
 import android.util.AndroidRuntimeException;
 import android.util.Config;
@@ -72,7 +73,6 @@
 import com.android.internal.os.BinderInternal;
 import com.android.internal.os.RuntimeInit;
 import com.android.internal.os.SamplingProfilerIntegration;
-import com.android.internal.util.ArrayUtils;
 
 import org.apache.harmony.xnet.provider.jsse.OpenSSLSocketImpl;
 
@@ -80,12 +80,9 @@
 import java.io.FileDescriptor;
 import java.io.FileOutputStream;
 import java.io.IOException;
-import java.io.InputStream;
 import java.io.PrintWriter;
 import java.lang.ref.WeakReference;
-import java.net.URL;
 import java.util.ArrayList;
-import java.util.Enumeration;
 import java.util.HashMap;
 import java.util.Iterator;
 import java.util.List;
@@ -96,24 +93,18 @@
 
 import dalvik.system.SamplingProfiler;
 
-final class IntentReceiverLeaked extends AndroidRuntimeException {
-    public IntentReceiverLeaked(String msg) {
-        super(msg);
-    }
-}
-
-final class ServiceConnectionLeaked extends AndroidRuntimeException {
-    public ServiceConnectionLeaked(String msg) {
-        super(msg);
-    }
-}
-
 final class SuperNotCalledException extends AndroidRuntimeException {
     public SuperNotCalledException(String msg) {
         super(msg);
     }
 }
 
+final class RemoteServiceException extends AndroidRuntimeException {
+    public RemoteServiceException(String msg) {
+        super(msg);
+    }
+}
+
 /**
  * This manages the execution of the main thread in an
  * application process, scheduling and executing activities,
@@ -123,10 +114,11 @@
  * {@hide}
  */
 public final class ActivityThread {
-    private static final String TAG = "ActivityThread";
+    static final String TAG = "ActivityThread";
+    private static final android.graphics.Bitmap.Config THUMBNAIL_FORMAT = Bitmap.Config.RGB_565;
     private static final boolean DEBUG = false;
-    private static final boolean localLOGV = DEBUG ? Config.LOGD : Config.LOGV;
-    private static final boolean DEBUG_BROADCAST = false;
+    static final boolean localLOGV = DEBUG ? Config.LOGD : Config.LOGV;
+    static final boolean DEBUG_BROADCAST = false;
     private static final boolean DEBUG_RESULTS = false;
     private static final boolean DEBUG_BACKUP = false;
     private static final boolean DEBUG_CONFIGURATION = false;
@@ -136,1162 +128,65 @@
     private static final int LOG_ON_PAUSE_CALLED = 30021;
     private static final int LOG_ON_RESUME_CALLED = 30022;
 
+    static ContextImpl mSystemContext = null;
 
-    public static final ActivityThread currentActivityThread() {
-        return (ActivityThread)sThreadLocal.get();
-    }
+    static IPackageManager sPackageManager;
 
-    public static final String currentPackageName()
-    {
-        ActivityThread am = currentActivityThread();
-        return (am != null && am.mBoundApplication != null)
-            ? am.mBoundApplication.processName : null;
-    }
+    final ApplicationThread mAppThread = new ApplicationThread();
+    final Looper mLooper = Looper.myLooper();
+    final H mH = new H();
+    final HashMap<IBinder, ActivityClientRecord> mActivities
+            = new HashMap<IBinder, ActivityClientRecord>();
+    // List of new activities (via ActivityRecord.nextIdle) that should
+    // be reported when next we idle.
+    ActivityClientRecord mNewActivities = null;
+    // Number of activities that are currently visible on-screen.
+    int mNumVisibleActivities = 0;
+    final HashMap<IBinder, Service> mServices
+            = new HashMap<IBinder, Service>();
+    AppBindData mBoundApplication;
+    Configuration mConfiguration;
+    Configuration mResConfiguration;
+    Application mInitialApplication;
+    final ArrayList<Application> mAllApplications
+            = new ArrayList<Application>();
+    // set of instantiated backup agents, keyed by package name
+    final HashMap<String, BackupAgent> mBackupAgents = new HashMap<String, BackupAgent>();
+    static final ThreadLocal sThreadLocal = new ThreadLocal();
+    Instrumentation mInstrumentation;
+    String mInstrumentationAppDir = null;
+    String mInstrumentationAppPackage = null;
+    String mInstrumentedAppDir = null;
+    boolean mSystemThread = false;
+    boolean mJitEnabled = false;
 
-    public static IPackageManager getPackageManager() {
-        if (sPackageManager != null) {
-            //Slog.v("PackageManager", "returning cur default = " + sPackageManager);
-            return sPackageManager;
-        }
-        IBinder b = ServiceManager.getService("package");
-        //Slog.v("PackageManager", "default service binder = " + b);
-        sPackageManager = IPackageManager.Stub.asInterface(b);
-        //Slog.v("PackageManager", "default service = " + sPackageManager);
-        return sPackageManager;
-    }
+    // These can be accessed by multiple threads; mPackages is the lock.
+    // XXX For now we keep around information about all packages we have
+    // seen, not removing entries from this map.
+    final HashMap<String, WeakReference<LoadedApk>> mPackages
+            = new HashMap<String, WeakReference<LoadedApk>>();
+    final HashMap<String, WeakReference<LoadedApk>> mResourcePackages
+            = new HashMap<String, WeakReference<LoadedApk>>();
+    Display mDisplay = null;
+    DisplayMetrics mDisplayMetrics = null;
+    final HashMap<ResourcesKey, WeakReference<Resources> > mActiveResources
+            = new HashMap<ResourcesKey, WeakReference<Resources> >();
+    final ArrayList<ActivityClientRecord> mRelaunchingActivities
+            = new ArrayList<ActivityClientRecord>();
+    Configuration mPendingConfiguration = null;
 
-    DisplayMetrics getDisplayMetricsLocked(boolean forceUpdate) {
-        if (mDisplayMetrics != null && !forceUpdate) {
-            return mDisplayMetrics;
-        }
-        if (mDisplay == null) {
-            WindowManager wm = WindowManagerImpl.getDefault();
-            mDisplay = wm.getDefaultDisplay();
-        }
-        DisplayMetrics metrics = mDisplayMetrics = new DisplayMetrics();
-        mDisplay.getMetrics(metrics);
-        //Slog.i("foo", "New metrics: w=" + metrics.widthPixels + " h="
-        //        + metrics.heightPixels + " den=" + metrics.density
-        //        + " xdpi=" + metrics.xdpi + " ydpi=" + metrics.ydpi);
-        return metrics;
-    }
+    // The lock of mProviderMap protects the following variables.
+    final HashMap<String, ProviderClientRecord> mProviderMap
+        = new HashMap<String, ProviderClientRecord>();
+    final HashMap<IBinder, ProviderRefCount> mProviderRefCountMap
+        = new HashMap<IBinder, ProviderRefCount>();
+    final HashMap<IBinder, ProviderClientRecord> mLocalProviders
+        = new HashMap<IBinder, ProviderClientRecord>();
 
-    /**
-     * Creates the top level Resources for applications with the given compatibility info.
-     *
-     * @param resDir the resource directory.
-     * @param compInfo the compability info. It will use the default compatibility info when it's
-     * null.
-     */
-    Resources getTopLevelResources(String resDir, CompatibilityInfo compInfo) {
-        ResourcesKey key = new ResourcesKey(resDir, compInfo.applicationScale);
-        Resources r;
-        synchronized (mPackages) {
-            // Resources is app scale dependent.
-            if (false) {
-                Slog.w(TAG, "getTopLevelResources: " + resDir + " / "
-                        + compInfo.applicationScale);
-            }
-            WeakReference<Resources> wr = mActiveResources.get(key);
-            r = wr != null ? wr.get() : null;
-            //if (r != null) Slog.i(TAG, "isUpToDate " + resDir + ": " + r.getAssets().isUpToDate());
-            if (r != null && r.getAssets().isUpToDate()) {
-                if (false) {
-                    Slog.w(TAG, "Returning cached resources " + r + " " + resDir
-                            + ": appScale=" + r.getCompatibilityInfo().applicationScale);
-                }
-                return r;
-            }
-        }
+    final GcIdler mGcIdler = new GcIdler();
+    boolean mGcIdlerScheduled = false;
 
-        //if (r != null) {
-        //    Slog.w(TAG, "Throwing away out-of-date resources!!!! "
-        //            + r + " " + resDir);
-        //}
-
-        AssetManager assets = new AssetManager();
-        if (assets.addAssetPath(resDir) == 0) {
-            return null;
-        }
-
-        //Slog.i(TAG, "Resource: key=" + key + ", display metrics=" + metrics);
-        DisplayMetrics metrics = getDisplayMetricsLocked(false);
-        r = new Resources(assets, metrics, getConfiguration(), compInfo);
-        if (false) {
-            Slog.i(TAG, "Created app resources " + resDir + " " + r + ": "
-                    + r.getConfiguration() + " appScale="
-                    + r.getCompatibilityInfo().applicationScale);
-        }
-        
-        synchronized (mPackages) {
-            WeakReference<Resources> wr = mActiveResources.get(key);
-            Resources existing = wr != null ? wr.get() : null;
-            if (existing != null && existing.getAssets().isUpToDate()) {
-                // Someone else already created the resources while we were
-                // unlocked; go ahead and use theirs.
-                r.getAssets().close();
-                return existing;
-            }
-            
-            // XXX need to remove entries when weak references go away
-            mActiveResources.put(key, new WeakReference<Resources>(r));
-            return r;
-        }
-    }
-
-    /**
-     * Creates the top level resources for the given package.
-     */
-    Resources getTopLevelResources(String resDir, PackageInfo pkgInfo) {
-        return getTopLevelResources(resDir, pkgInfo.mCompatibilityInfo);
-    }
-
-    final Handler getHandler() {
-        return mH;
-    }
-
-    public final static class PackageInfo {
-
-        private final ActivityThread mActivityThread;
-        private final ApplicationInfo mApplicationInfo;
-        private final String mPackageName;
-        private final String mAppDir;
-        private final String mResDir;
-        private final String[] mSharedLibraries;
-        private final String mDataDir;
-        private final File mDataDirFile;
-        private final ClassLoader mBaseClassLoader;
-        private final boolean mSecurityViolation;
-        private final boolean mIncludeCode;
-        private Resources mResources;
-        private ClassLoader mClassLoader;
-        private Application mApplication;
-        private CompatibilityInfo mCompatibilityInfo;
-
-        private final HashMap<Context, HashMap<BroadcastReceiver, ReceiverDispatcher>> mReceivers
-            = new HashMap<Context, HashMap<BroadcastReceiver, ReceiverDispatcher>>();
-        private final HashMap<Context, HashMap<BroadcastReceiver, ReceiverDispatcher>> mUnregisteredReceivers
-        = new HashMap<Context, HashMap<BroadcastReceiver, ReceiverDispatcher>>();
-        private final HashMap<Context, HashMap<ServiceConnection, ServiceDispatcher>> mServices
-            = new HashMap<Context, HashMap<ServiceConnection, ServiceDispatcher>>();
-        private final HashMap<Context, HashMap<ServiceConnection, ServiceDispatcher>> mUnboundServices
-            = new HashMap<Context, HashMap<ServiceConnection, ServiceDispatcher>>();
-
-        int mClientCount = 0;
-
-        Application getApplication() {
-            return mApplication;
-        }
-
-        public PackageInfo(ActivityThread activityThread, ApplicationInfo aInfo,
-                ActivityThread mainThread, ClassLoader baseLoader,
-                boolean securityViolation, boolean includeCode) {
-            mActivityThread = activityThread;
-            mApplicationInfo = aInfo;
-            mPackageName = aInfo.packageName;
-            mAppDir = aInfo.sourceDir;
-            mResDir = aInfo.uid == Process.myUid() ? aInfo.sourceDir
-                    : aInfo.publicSourceDir;
-            mSharedLibraries = aInfo.sharedLibraryFiles;
-            mDataDir = aInfo.dataDir;
-            mDataDirFile = mDataDir != null ? new File(mDataDir) : null;
-            mBaseClassLoader = baseLoader;
-            mSecurityViolation = securityViolation;
-            mIncludeCode = includeCode;
-            mCompatibilityInfo = new CompatibilityInfo(aInfo);
-
-            if (mAppDir == null) {
-                if (mSystemContext == null) {
-                    mSystemContext =
-                        ContextImpl.createSystemContext(mainThread);
-                    mSystemContext.getResources().updateConfiguration(
-                             mainThread.getConfiguration(),
-                             mainThread.getDisplayMetricsLocked(false));
-                    //Slog.i(TAG, "Created system resources "
-                    //        + mSystemContext.getResources() + ": "
-                    //        + mSystemContext.getResources().getConfiguration());
-                }
-                mClassLoader = mSystemContext.getClassLoader();
-                mResources = mSystemContext.getResources();
-            }
-        }
-
-        public PackageInfo(ActivityThread activityThread, String name,
-                Context systemContext, ApplicationInfo info) {
-            mActivityThread = activityThread;
-            mApplicationInfo = info != null ? info : new ApplicationInfo();
-            mApplicationInfo.packageName = name;
-            mPackageName = name;
-            mAppDir = null;
-            mResDir = null;
-            mSharedLibraries = null;
-            mDataDir = null;
-            mDataDirFile = null;
-            mBaseClassLoader = null;
-            mSecurityViolation = false;
-            mIncludeCode = true;
-            mClassLoader = systemContext.getClassLoader();
-            mResources = systemContext.getResources();
-            mCompatibilityInfo = new CompatibilityInfo(mApplicationInfo);
-        }
-
-        public String getPackageName() {
-            return mPackageName;
-        }
-
-        public ApplicationInfo getApplicationInfo() {
-            return mApplicationInfo;
-        }
-
-        public boolean isSecurityViolation() {
-            return mSecurityViolation;
-        }
-
-        /**
-         * Gets the array of shared libraries that are listed as
-         * used by the given package.
-         *
-         * @param packageName the name of the package (note: not its
-         * file name)
-         * @return null-ok; the array of shared libraries, each one
-         * a fully-qualified path
-         */
-        private static String[] getLibrariesFor(String packageName) {
-            ApplicationInfo ai = null;
-            try {
-                ai = getPackageManager().getApplicationInfo(packageName,
-                        PackageManager.GET_SHARED_LIBRARY_FILES);
-            } catch (RemoteException e) {
-                throw new AssertionError(e);
-            }
-
-            if (ai == null) {
-                return null;
-            }
-
-            return ai.sharedLibraryFiles;
-        }
-
-        /**
-         * Combines two arrays (of library names) such that they are
-         * concatenated in order but are devoid of duplicates. The
-         * result is a single string with the names of the libraries
-         * separated by colons, or <code>null</code> if both lists
-         * were <code>null</code> or empty.
-         *
-         * @param list1 null-ok; the first list
-         * @param list2 null-ok; the second list
-         * @return null-ok; the combination
-         */
-        private static String combineLibs(String[] list1, String[] list2) {
-            StringBuilder result = new StringBuilder(300);
-            boolean first = true;
-
-            if (list1 != null) {
-                for (String s : list1) {
-                    if (first) {
-                        first = false;
-                    } else {
-                        result.append(':');
-                    }
-                    result.append(s);
-                }
-            }
-
-            // Only need to check for duplicates if list1 was non-empty.
-            boolean dupCheck = !first;
-
-            if (list2 != null) {
-                for (String s : list2) {
-                    if (dupCheck && ArrayUtils.contains(list1, s)) {
-                        continue;
-                    }
-
-                    if (first) {
-                        first = false;
-                    } else {
-                        result.append(':');
-                    }
-                    result.append(s);
-                }
-            }
-
-            return result.toString();
-        }
-
-        public ClassLoader getClassLoader() {
-            synchronized (this) {
-                if (mClassLoader != null) {
-                    return mClassLoader;
-                }
-
-                if (mIncludeCode && !mPackageName.equals("android")) {
-                    String zip = mAppDir;
-
-                    /*
-                     * The following is a bit of a hack to inject
-                     * instrumentation into the system: If the app
-                     * being started matches one of the instrumentation names,
-                     * then we combine both the "instrumentation" and
-                     * "instrumented" app into the path, along with the
-                     * concatenation of both apps' shared library lists.
-                     */
-
-                    String instrumentationAppDir =
-                            mActivityThread.mInstrumentationAppDir;
-                    String instrumentationAppPackage =
-                            mActivityThread.mInstrumentationAppPackage;
-                    String instrumentedAppDir =
-                            mActivityThread.mInstrumentedAppDir;
-                    String[] instrumentationLibs = null;
-
-                    if (mAppDir.equals(instrumentationAppDir)
-                            || mAppDir.equals(instrumentedAppDir)) {
-                        zip = instrumentationAppDir + ":" + instrumentedAppDir;
-                        if (! instrumentedAppDir.equals(instrumentationAppDir)) {
-                            instrumentationLibs =
-                                getLibrariesFor(instrumentationAppPackage);
-                        }
-                    }
-
-                    if ((mSharedLibraries != null) ||
-                            (instrumentationLibs != null)) {
-                        zip =
-                            combineLibs(mSharedLibraries, instrumentationLibs)
-                            + ':' + zip;
-                    }
-
-                    /*
-                     * With all the combination done (if necessary, actually
-                     * create the class loader.
-                     */
-
-                    if (localLOGV) Slog.v(TAG, "Class path: " + zip);
-
-                    mClassLoader =
-                        ApplicationLoaders.getDefault().getClassLoader(
-                            zip, mDataDir, mBaseClassLoader);
-                    initializeJavaContextClassLoader();
-                } else {
-                    if (mBaseClassLoader == null) {
-                        mClassLoader = ClassLoader.getSystemClassLoader();
-                    } else {
-                        mClassLoader = mBaseClassLoader;
-                    }
-                }
-                return mClassLoader;
-            }
-        }
-
-        /**
-         * Setup value for Thread.getContextClassLoader(). If the
-         * package will not run in in a VM with other packages, we set
-         * the Java context ClassLoader to the
-         * PackageInfo.getClassLoader value. However, if this VM can
-         * contain multiple packages, we intead set the Java context
-         * ClassLoader to a proxy that will warn about the use of Java
-         * context ClassLoaders and then fall through to use the
-         * system ClassLoader.
-         *
-         * <p> Note that this is similar to but not the same as the
-         * android.content.Context.getClassLoader(). While both
-         * context class loaders are typically set to the
-         * PathClassLoader used to load the package archive in the
-         * single application per VM case, a single Android process
-         * may contain several Contexts executing on one thread with
-         * their own logical ClassLoaders while the Java context
-         * ClassLoader is a thread local. This is why in the case when
-         * we have multiple packages per VM we do not set the Java
-         * context ClassLoader to an arbitrary but instead warn the
-         * user to set their own if we detect that they are using a
-         * Java library that expects it to be set.
-         */
-        private void initializeJavaContextClassLoader() {
-            IPackageManager pm = getPackageManager();
-            android.content.pm.PackageInfo pi;
-            try {
-                pi = pm.getPackageInfo(mPackageName, 0);
-            } catch (RemoteException e) {
-                throw new AssertionError(e);
-            }
-            /*
-             * Two possible indications that this package could be
-             * sharing its virtual machine with other packages:
-             *
-             * 1.) the sharedUserId attribute is set in the manifest,
-             *     indicating a request to share a VM with other
-             *     packages with the same sharedUserId.
-             *
-             * 2.) the application element of the manifest has an
-             *     attribute specifying a non-default process name,
-             *     indicating the desire to run in another packages VM.
-             */
-            boolean sharedUserIdSet = (pi.sharedUserId != null);
-            boolean processNameNotDefault =
-                (pi.applicationInfo != null &&
-                 !mPackageName.equals(pi.applicationInfo.processName));
-            boolean sharable = (sharedUserIdSet || processNameNotDefault);
-            ClassLoader contextClassLoader =
-                (sharable)
-                ? new WarningContextClassLoader()
-                : mClassLoader;
-            Thread.currentThread().setContextClassLoader(contextClassLoader);
-        }
-
-        private static class WarningContextClassLoader extends ClassLoader {
-
-            private static boolean warned = false;
-
-            private void warn(String methodName) {
-                if (warned) {
-                    return;
-                }
-                warned = true;
-                Thread.currentThread().setContextClassLoader(getParent());
-                Slog.w(TAG, "ClassLoader." + methodName + ": " +
-                      "The class loader returned by " +
-                      "Thread.getContextClassLoader() may fail for processes " +
-                      "that host multiple applications. You should explicitly " +
-                      "specify a context class loader. For example: " +
-                      "Thread.setContextClassLoader(getClass().getClassLoader());");
-            }
-
-            @Override public URL getResource(String resName) {
-                warn("getResource");
-                return getParent().getResource(resName);
-            }
-
-            @Override public Enumeration<URL> getResources(String resName) throws IOException {
-                warn("getResources");
-                return getParent().getResources(resName);
-            }
-
-            @Override public InputStream getResourceAsStream(String resName) {
-                warn("getResourceAsStream");
-                return getParent().getResourceAsStream(resName);
-            }
-
-            @Override public Class<?> loadClass(String className) throws ClassNotFoundException {
-                warn("loadClass");
-                return getParent().loadClass(className);
-            }
-
-            @Override public void setClassAssertionStatus(String cname, boolean enable) {
-                warn("setClassAssertionStatus");
-                getParent().setClassAssertionStatus(cname, enable);
-            }
-
-            @Override public void setPackageAssertionStatus(String pname, boolean enable) {
-                warn("setPackageAssertionStatus");
-                getParent().setPackageAssertionStatus(pname, enable);
-            }
-
-            @Override public void setDefaultAssertionStatus(boolean enable) {
-                warn("setDefaultAssertionStatus");
-                getParent().setDefaultAssertionStatus(enable);
-            }
-
-            @Override public void clearAssertionStatus() {
-                warn("clearAssertionStatus");
-                getParent().clearAssertionStatus();
-            }
-        }
-
-        public String getAppDir() {
-            return mAppDir;
-        }
-
-        public String getResDir() {
-            return mResDir;
-        }
-
-        public String getDataDir() {
-            return mDataDir;
-        }
-
-        public File getDataDirFile() {
-            return mDataDirFile;
-        }
-
-        public AssetManager getAssets(ActivityThread mainThread) {
-            return getResources(mainThread).getAssets();
-        }
-
-        public Resources getResources(ActivityThread mainThread) {
-            if (mResources == null) {
-                mResources = mainThread.getTopLevelResources(mResDir, this);
-            }
-            return mResources;
-        }
-
-        public Application makeApplication(boolean forceDefaultAppClass,
-                Instrumentation instrumentation) {
-            if (mApplication != null) {
-                return mApplication;
-            }
-
-            Application app = null;
-
-            String appClass = mApplicationInfo.className;
-            if (forceDefaultAppClass || (appClass == null)) {
-                appClass = "android.app.Application";
-            }
-
-            try {
-                java.lang.ClassLoader cl = getClassLoader();
-                ContextImpl appContext = new ContextImpl();
-                appContext.init(this, null, mActivityThread);
-                app = mActivityThread.mInstrumentation.newApplication(
-                        cl, appClass, appContext);
-                appContext.setOuterContext(app);
-            } catch (Exception e) {
-                if (!mActivityThread.mInstrumentation.onException(app, e)) {
-                    throw new RuntimeException(
-                        "Unable to instantiate application " + appClass
-                        + ": " + e.toString(), e);
-                }
-            }
-            mActivityThread.mAllApplications.add(app);
-            mApplication = app;
-
-            if (instrumentation != null) {
-                try {
-                    instrumentation.callApplicationOnCreate(app);
-                } catch (Exception e) {
-                    if (!instrumentation.onException(app, e)) {
-                        throw new RuntimeException(
-                            "Unable to create application " + app.getClass().getName()
-                            + ": " + e.toString(), e);
-                    }
-                }
-            }
-            
-            return app;
-        }
-
-        public void removeContextRegistrations(Context context,
-                String who, String what) {
-            HashMap<BroadcastReceiver, ReceiverDispatcher> rmap =
-                mReceivers.remove(context);
-            if (rmap != null) {
-                Iterator<ReceiverDispatcher> it = rmap.values().iterator();
-                while (it.hasNext()) {
-                    ReceiverDispatcher rd = it.next();
-                    IntentReceiverLeaked leak = new IntentReceiverLeaked(
-                            what + " " + who + " has leaked IntentReceiver "
-                            + rd.getIntentReceiver() + " that was " +
-                            "originally registered here. Are you missing a " +
-                            "call to unregisterReceiver()?");
-                    leak.setStackTrace(rd.getLocation().getStackTrace());
-                    Slog.e(TAG, leak.getMessage(), leak);
-                    try {
-                        ActivityManagerNative.getDefault().unregisterReceiver(
-                                rd.getIIntentReceiver());
-                    } catch (RemoteException e) {
-                        // system crashed, nothing we can do
-                    }
-                }
-            }
-            mUnregisteredReceivers.remove(context);
-            //Slog.i(TAG, "Receiver registrations: " + mReceivers);
-            HashMap<ServiceConnection, ServiceDispatcher> smap =
-                mServices.remove(context);
-            if (smap != null) {
-                Iterator<ServiceDispatcher> it = smap.values().iterator();
-                while (it.hasNext()) {
-                    ServiceDispatcher sd = it.next();
-                    ServiceConnectionLeaked leak = new ServiceConnectionLeaked(
-                            what + " " + who + " has leaked ServiceConnection "
-                            + sd.getServiceConnection() + " that was originally bound here");
-                    leak.setStackTrace(sd.getLocation().getStackTrace());
-                    Slog.e(TAG, leak.getMessage(), leak);
-                    try {
-                        ActivityManagerNative.getDefault().unbindService(
-                                sd.getIServiceConnection());
-                    } catch (RemoteException e) {
-                        // system crashed, nothing we can do
-                    }
-                    sd.doForget();
-                }
-            }
-            mUnboundServices.remove(context);
-            //Slog.i(TAG, "Service registrations: " + mServices);
-        }
-
-        public IIntentReceiver getReceiverDispatcher(BroadcastReceiver r,
-                Context context, Handler handler,
-                Instrumentation instrumentation, boolean registered) {
-            synchronized (mReceivers) {
-                ReceiverDispatcher rd = null;
-                HashMap<BroadcastReceiver, ReceiverDispatcher> map = null;
-                if (registered) {
-                    map = mReceivers.get(context);
-                    if (map != null) {
-                        rd = map.get(r);
-                    }
-                }
-                if (rd == null) {
-                    rd = new ReceiverDispatcher(r, context, handler,
-                            instrumentation, registered);
-                    if (registered) {
-                        if (map == null) {
-                            map = new HashMap<BroadcastReceiver, ReceiverDispatcher>();
-                            mReceivers.put(context, map);
-                        }
-                        map.put(r, rd);
-                    }
-                } else {
-                    rd.validate(context, handler);
-                }
-                return rd.getIIntentReceiver();
-            }
-        }
-
-        public IIntentReceiver forgetReceiverDispatcher(Context context,
-                BroadcastReceiver r) {
-            synchronized (mReceivers) {
-                HashMap<BroadcastReceiver, ReceiverDispatcher> map = mReceivers.get(context);
-                ReceiverDispatcher rd = null;
-                if (map != null) {
-                    rd = map.get(r);
-                    if (rd != null) {
-                        map.remove(r);
-                        if (map.size() == 0) {
-                            mReceivers.remove(context);
-                        }
-                        if (r.getDebugUnregister()) {
-                            HashMap<BroadcastReceiver, ReceiverDispatcher> holder
-                                    = mUnregisteredReceivers.get(context);
-                            if (holder == null) {
-                                holder = new HashMap<BroadcastReceiver, ReceiverDispatcher>();
-                                mUnregisteredReceivers.put(context, holder);
-                            }
-                            RuntimeException ex = new IllegalArgumentException(
-                                    "Originally unregistered here:");
-                            ex.fillInStackTrace();
-                            rd.setUnregisterLocation(ex);
-                            holder.put(r, rd);
-                        }
-                        return rd.getIIntentReceiver();
-                    }
-                }
-                HashMap<BroadcastReceiver, ReceiverDispatcher> holder
-                        = mUnregisteredReceivers.get(context);
-                if (holder != null) {
-                    rd = holder.get(r);
-                    if (rd != null) {
-                        RuntimeException ex = rd.getUnregisterLocation();
-                        throw new IllegalArgumentException(
-                                "Unregistering Receiver " + r
-                                + " that was already unregistered", ex);
-                    }
-                }
-                if (context == null) {
-                    throw new IllegalStateException("Unbinding Receiver " + r
-                            + " from Context that is no longer in use: " + context);
-                } else {
-                    throw new IllegalArgumentException("Receiver not registered: " + r);
-                }
-
-            }
-        }
-
-        static final class ReceiverDispatcher {
-
-            final static class InnerReceiver extends IIntentReceiver.Stub {
-                final WeakReference<ReceiverDispatcher> mDispatcher;
-                final ReceiverDispatcher mStrongRef;
-
-                InnerReceiver(ReceiverDispatcher rd, boolean strong) {
-                    mDispatcher = new WeakReference<ReceiverDispatcher>(rd);
-                    mStrongRef = strong ? rd : null;
-                }
-                public void performReceive(Intent intent, int resultCode,
-                        String data, Bundle extras, boolean ordered, boolean sticky) {
-                    ReceiverDispatcher rd = mDispatcher.get();
-                    if (DEBUG_BROADCAST) {
-                        int seq = intent.getIntExtra("seq", -1);
-                        Slog.i(TAG, "Receiving broadcast " + intent.getAction() + " seq=" + seq
-                                + " to " + (rd != null ? rd.mReceiver : null));
-                    }
-                    if (rd != null) {
-                        rd.performReceive(intent, resultCode, data, extras,
-                                ordered, sticky);
-                    } else {
-                        // The activity manager dispatched a broadcast to a registered
-                        // receiver in this process, but before it could be delivered the
-                        // receiver was unregistered.  Acknowledge the broadcast on its
-                        // behalf so that the system's broadcast sequence can continue.
-                        if (DEBUG_BROADCAST) Slog.i(TAG,
-                                "Finishing broadcast to unregistered receiver");
-                        IActivityManager mgr = ActivityManagerNative.getDefault();
-                        try {
-                            mgr.finishReceiver(this, resultCode, data, extras, false);
-                        } catch (RemoteException e) {
-                            Slog.w(TAG, "Couldn't finish broadcast to unregistered receiver");
-                        }
-                    }
-                }
-            }
-
-            final IIntentReceiver.Stub mIIntentReceiver;
-            final BroadcastReceiver mReceiver;
-            final Context mContext;
-            final Handler mActivityThread;
-            final Instrumentation mInstrumentation;
-            final boolean mRegistered;
-            final IntentReceiverLeaked mLocation;
-            RuntimeException mUnregisterLocation;
-
-            final class Args implements Runnable {
-                private Intent mCurIntent;
-                private int mCurCode;
-                private String mCurData;
-                private Bundle mCurMap;
-                private boolean mCurOrdered;
-                private boolean mCurSticky;
-
-                public void run() {
-                    BroadcastReceiver receiver = mReceiver;
-                    if (DEBUG_BROADCAST) {
-                        int seq = mCurIntent.getIntExtra("seq", -1);
-                        Slog.i(TAG, "Dispatching broadcast " + mCurIntent.getAction()
-                                + " seq=" + seq + " to " + mReceiver);
-                        Slog.i(TAG, "  mRegistered=" + mRegistered
-                                + " mCurOrdered=" + mCurOrdered);
-                    }
-                    
-                    IActivityManager mgr = ActivityManagerNative.getDefault();
-                    Intent intent = mCurIntent;
-                    mCurIntent = null;
-                    
-                    if (receiver == null) {
-                        if (mRegistered && mCurOrdered) {
-                            try {
-                                if (DEBUG_BROADCAST) Slog.i(TAG,
-                                        "Finishing null broadcast to " + mReceiver);
-                                mgr.finishReceiver(mIIntentReceiver,
-                                        mCurCode, mCurData, mCurMap, false);
-                            } catch (RemoteException ex) {
-                            }
-                        }
-                        return;
-                    }
-
-                    try {
-                        ClassLoader cl =  mReceiver.getClass().getClassLoader();
-                        intent.setExtrasClassLoader(cl);
-                        if (mCurMap != null) {
-                            mCurMap.setClassLoader(cl);
-                        }
-                        receiver.setOrderedHint(true);
-                        receiver.setResult(mCurCode, mCurData, mCurMap);
-                        receiver.clearAbortBroadcast();
-                        receiver.setOrderedHint(mCurOrdered);
-                        receiver.setInitialStickyHint(mCurSticky);
-                        receiver.onReceive(mContext, intent);
-                    } catch (Exception e) {
-                        if (mRegistered && mCurOrdered) {
-                            try {
-                                if (DEBUG_BROADCAST) Slog.i(TAG,
-                                        "Finishing failed broadcast to " + mReceiver);
-                                mgr.finishReceiver(mIIntentReceiver,
-                                        mCurCode, mCurData, mCurMap, false);
-                            } catch (RemoteException ex) {
-                            }
-                        }
-                        if (mInstrumentation == null ||
-                                !mInstrumentation.onException(mReceiver, e)) {
-                            throw new RuntimeException(
-                                "Error receiving broadcast " + intent
-                                + " in " + mReceiver, e);
-                        }
-                    }
-                    if (mRegistered && mCurOrdered) {
-                        try {
-                            if (DEBUG_BROADCAST) Slog.i(TAG,
-                                    "Finishing broadcast to " + mReceiver);
-                            mgr.finishReceiver(mIIntentReceiver,
-                                    receiver.getResultCode(),
-                                    receiver.getResultData(),
-                                    receiver.getResultExtras(false),
-                                    receiver.getAbortBroadcast());
-                        } catch (RemoteException ex) {
-                        }
-                    }
-                }
-            }
-
-            ReceiverDispatcher(BroadcastReceiver receiver, Context context,
-                    Handler activityThread, Instrumentation instrumentation,
-                    boolean registered) {
-                if (activityThread == null) {
-                    throw new NullPointerException("Handler must not be null");
-                }
-
-                mIIntentReceiver = new InnerReceiver(this, !registered);
-                mReceiver = receiver;
-                mContext = context;
-                mActivityThread = activityThread;
-                mInstrumentation = instrumentation;
-                mRegistered = registered;
-                mLocation = new IntentReceiverLeaked(null);
-                mLocation.fillInStackTrace();
-            }
-
-            void validate(Context context, Handler activityThread) {
-                if (mContext != context) {
-                    throw new IllegalStateException(
-                        "Receiver " + mReceiver +
-                        " registered with differing Context (was " +
-                        mContext + " now " + context + ")");
-                }
-                if (mActivityThread != activityThread) {
-                    throw new IllegalStateException(
-                        "Receiver " + mReceiver +
-                        " registered with differing handler (was " +
-                        mActivityThread + " now " + activityThread + ")");
-                }
-            }
-
-            IntentReceiverLeaked getLocation() {
-                return mLocation;
-            }
-
-            BroadcastReceiver getIntentReceiver() {
-                return mReceiver;
-            }
-
-            IIntentReceiver getIIntentReceiver() {
-                return mIIntentReceiver;
-            }
-
-            void setUnregisterLocation(RuntimeException ex) {
-                mUnregisterLocation = ex;
-            }
-
-            RuntimeException getUnregisterLocation() {
-                return mUnregisterLocation;
-            }
-
-            public void performReceive(Intent intent, int resultCode,
-                    String data, Bundle extras, boolean ordered, boolean sticky) {
-                if (DEBUG_BROADCAST) {
-                    int seq = intent.getIntExtra("seq", -1);
-                    Slog.i(TAG, "Enqueueing broadcast " + intent.getAction() + " seq=" + seq
-                            + " to " + mReceiver);
-                }
-                Args args = new Args();
-                args.mCurIntent = intent;
-                args.mCurCode = resultCode;
-                args.mCurData = data;
-                args.mCurMap = extras;
-                args.mCurOrdered = ordered;
-                args.mCurSticky = sticky;
-                if (!mActivityThread.post(args)) {
-                    if (mRegistered && ordered) {
-                        IActivityManager mgr = ActivityManagerNative.getDefault();
-                        try {
-                            if (DEBUG_BROADCAST) Slog.i(TAG,
-                                    "Finishing sync broadcast to " + mReceiver);
-                            mgr.finishReceiver(mIIntentReceiver, args.mCurCode,
-                                    args.mCurData, args.mCurMap, false);
-                        } catch (RemoteException ex) {
-                        }
-                    }
-                }
-            }
-
-        }
-
-        public final IServiceConnection getServiceDispatcher(ServiceConnection c,
-                Context context, Handler handler, int flags) {
-            synchronized (mServices) {
-                ServiceDispatcher sd = null;
-                HashMap<ServiceConnection, ServiceDispatcher> map = mServices.get(context);
-                if (map != null) {
-                    sd = map.get(c);
-                }
-                if (sd == null) {
-                    sd = new ServiceDispatcher(c, context, handler, flags);
-                    if (map == null) {
-                        map = new HashMap<ServiceConnection, ServiceDispatcher>();
-                        mServices.put(context, map);
-                    }
-                    map.put(c, sd);
-                } else {
-                    sd.validate(context, handler);
-                }
-                return sd.getIServiceConnection();
-            }
-        }
-
-        public final IServiceConnection forgetServiceDispatcher(Context context,
-                ServiceConnection c) {
-            synchronized (mServices) {
-                HashMap<ServiceConnection, ServiceDispatcher> map
-                        = mServices.get(context);
-                ServiceDispatcher sd = null;
-                if (map != null) {
-                    sd = map.get(c);
-                    if (sd != null) {
-                        map.remove(c);
-                        sd.doForget();
-                        if (map.size() == 0) {
-                            mServices.remove(context);
-                        }
-                        if ((sd.getFlags()&Context.BIND_DEBUG_UNBIND) != 0) {
-                            HashMap<ServiceConnection, ServiceDispatcher> holder
-                                    = mUnboundServices.get(context);
-                            if (holder == null) {
-                                holder = new HashMap<ServiceConnection, ServiceDispatcher>();
-                                mUnboundServices.put(context, holder);
-                            }
-                            RuntimeException ex = new IllegalArgumentException(
-                                    "Originally unbound here:");
-                            ex.fillInStackTrace();
-                            sd.setUnbindLocation(ex);
-                            holder.put(c, sd);
-                        }
-                        return sd.getIServiceConnection();
-                    }
-                }
-                HashMap<ServiceConnection, ServiceDispatcher> holder
-                        = mUnboundServices.get(context);
-                if (holder != null) {
-                    sd = holder.get(c);
-                    if (sd != null) {
-                        RuntimeException ex = sd.getUnbindLocation();
-                        throw new IllegalArgumentException(
-                                "Unbinding Service " + c
-                                + " that was already unbound", ex);
-                    }
-                }
-                if (context == null) {
-                    throw new IllegalStateException("Unbinding Service " + c
-                            + " from Context that is no longer in use: " + context);
-                } else {
-                    throw new IllegalArgumentException("Service not registered: " + c);
-                }
-            }
-        }
-
-        static final class ServiceDispatcher {
-            private final InnerConnection mIServiceConnection;
-            private final ServiceConnection mConnection;
-            private final Context mContext;
-            private final Handler mActivityThread;
-            private final ServiceConnectionLeaked mLocation;
-            private final int mFlags;
-
-            private RuntimeException mUnbindLocation;
-
-            private boolean mDied;
-
-            private static class ConnectionInfo {
-                IBinder binder;
-                IBinder.DeathRecipient deathMonitor;
-            }
-
-            private static class InnerConnection extends IServiceConnection.Stub {
-                final WeakReference<ServiceDispatcher> mDispatcher;
-
-                InnerConnection(ServiceDispatcher sd) {
-                    mDispatcher = new WeakReference<ServiceDispatcher>(sd);
-                }
-
-                public void connected(ComponentName name, IBinder service) throws RemoteException {
-                    ServiceDispatcher sd = mDispatcher.get();
-                    if (sd != null) {
-                        sd.connected(name, service);
-                    }
-                }
-            }
-
-            private final HashMap<ComponentName, ConnectionInfo> mActiveConnections
-                = new HashMap<ComponentName, ConnectionInfo>();
-
-            ServiceDispatcher(ServiceConnection conn,
-                    Context context, Handler activityThread, int flags) {
-                mIServiceConnection = new InnerConnection(this);
-                mConnection = conn;
-                mContext = context;
-                mActivityThread = activityThread;
-                mLocation = new ServiceConnectionLeaked(null);
-                mLocation.fillInStackTrace();
-                mFlags = flags;
-            }
-
-            void validate(Context context, Handler activityThread) {
-                if (mContext != context) {
-                    throw new RuntimeException(
-                        "ServiceConnection " + mConnection +
-                        " registered with differing Context (was " +
-                        mContext + " now " + context + ")");
-                }
-                if (mActivityThread != activityThread) {
-                    throw new RuntimeException(
-                        "ServiceConnection " + mConnection +
-                        " registered with differing handler (was " +
-                        mActivityThread + " now " + activityThread + ")");
-                }
-            }
-
-            void doForget() {
-                synchronized(this) {
-                    Iterator<ConnectionInfo> it = mActiveConnections.values().iterator();
-                    while (it.hasNext()) {
-                        ConnectionInfo ci = it.next();
-                        ci.binder.unlinkToDeath(ci.deathMonitor, 0);
-                    }
-                    mActiveConnections.clear();
-                }
-            }
-
-            ServiceConnectionLeaked getLocation() {
-                return mLocation;
-            }
-
-            ServiceConnection getServiceConnection() {
-                return mConnection;
-            }
-
-            IServiceConnection getIServiceConnection() {
-                return mIServiceConnection;
-            }
-
-            int getFlags() {
-                return mFlags;
-            }
-
-            void setUnbindLocation(RuntimeException ex) {
-                mUnbindLocation = ex;
-            }
-
-            RuntimeException getUnbindLocation() {
-                return mUnbindLocation;
-            }
-
-            public void connected(ComponentName name, IBinder service) {
-                if (mActivityThread != null) {
-                    mActivityThread.post(new RunConnection(name, service, 0));
-                } else {
-                    doConnected(name, service);
-                }
-            }
-
-            public void death(ComponentName name, IBinder service) {
-                ConnectionInfo old;
-
-                synchronized (this) {
-                    mDied = true;
-                    old = mActiveConnections.remove(name);
-                    if (old == null || old.binder != service) {
-                        // Death for someone different than who we last
-                        // reported...  just ignore it.
-                        return;
-                    }
-                    old.binder.unlinkToDeath(old.deathMonitor, 0);
-                }
-
-                if (mActivityThread != null) {
-                    mActivityThread.post(new RunConnection(name, service, 1));
-                } else {
-                    doDeath(name, service);
-                }
-            }
-
-            public void doConnected(ComponentName name, IBinder service) {
-                ConnectionInfo old;
-                ConnectionInfo info;
-
-                synchronized (this) {
-                    old = mActiveConnections.get(name);
-                    if (old != null && old.binder == service) {
-                        // Huh, already have this one.  Oh well!
-                        return;
-                    }
-
-                    if (service != null) {
-                        // A new service is being connected... set it all up.
-                        mDied = false;
-                        info = new ConnectionInfo();
-                        info.binder = service;
-                        info.deathMonitor = new DeathMonitor(name, service);
-                        try {
-                            service.linkToDeath(info.deathMonitor, 0);
-                            mActiveConnections.put(name, info);
-                        } catch (RemoteException e) {
-                            // This service was dead before we got it...  just
-                            // don't do anything with it.
-                            mActiveConnections.remove(name);
-                            return;
-                        }
-
-                    } else {
-                        // The named service is being disconnected... clean up.
-                        mActiveConnections.remove(name);
-                    }
-
-                    if (old != null) {
-                        old.binder.unlinkToDeath(old.deathMonitor, 0);
-                    }
-                }
-
-                // If there was an old service, it is not disconnected.
-                if (old != null) {
-                    mConnection.onServiceDisconnected(name);
-                }
-                // If there is a new service, it is now connected.
-                if (service != null) {
-                    mConnection.onServiceConnected(name, service);
-                }
-            }
-
-            public void doDeath(ComponentName name, IBinder service) {
-                mConnection.onServiceDisconnected(name);
-            }
-
-            private final class RunConnection implements Runnable {
-                RunConnection(ComponentName name, IBinder service, int command) {
-                    mName = name;
-                    mService = service;
-                    mCommand = command;
-                }
-
-                public void run() {
-                    if (mCommand == 0) {
-                        doConnected(mName, mService);
-                    } else if (mCommand == 1) {
-                        doDeath(mName, mService);
-                    }
-                }
-
-                final ComponentName mName;
-                final IBinder mService;
-                final int mCommand;
-            }
-
-            private final class DeathMonitor implements IBinder.DeathRecipient
-            {
-                DeathMonitor(ComponentName name, IBinder service) {
-                    mName = name;
-                    mService = service;
-                }
-
-                public void binderDied() {
-                    death(mName, mService);
-                }
-
-                final ComponentName mName;
-                final IBinder mService;
-            }
-        }
-    }
-
-    private static ContextImpl mSystemContext = null;
-
-    private static final class ActivityRecord {
+    private static final class ActivityClientRecord {
         IBinder token;
         int ident;
         Intent intent;
@@ -1307,10 +202,10 @@
         boolean hideForNow;
         Configuration newConfig;
         Configuration createdConfig;
-        ActivityRecord nextIdle;
+        ActivityClientRecord nextIdle;
 
         ActivityInfo activityInfo;
-        PackageInfo packageInfo;
+        LoadedApk packageInfo;
 
         List<ResultInfo> pendingResults;
         List<Intent> pendingIntents;
@@ -1318,7 +213,7 @@
         boolean startsNotResumed;
         boolean isForward;
 
-        ActivityRecord() {
+        ActivityClientRecord() {
             parent = null;
             embeddedID = null;
             paused = false;
@@ -1337,12 +232,12 @@
         }
     }
 
-    private final class ProviderRecord implements IBinder.DeathRecipient {
+    private final class ProviderClientRecord implements IBinder.DeathRecipient {
         final String mName;
         final IContentProvider mProvider;
         final ContentProvider mLocalProvider;
 
-        ProviderRecord(String name, IContentProvider provider,
+        ProviderClientRecord(String name, IContentProvider provider,
                 ContentProvider localProvider) {
             mName = name;
             mProvider = provider;
@@ -1419,7 +314,7 @@
     }
 
     private static final class AppBindData {
-        PackageInfo info;
+        LoadedApk info;
         String processName;
         ApplicationInfo appInfo;
         List<ProviderInfo> providers;
@@ -1509,7 +404,7 @@
         public final void scheduleLaunchActivity(Intent intent, IBinder token, int ident,
                 ActivityInfo info, Bundle state, List<ResultInfo> pendingResults,
                 List<Intent> pendingNewIntents, boolean notResumed, boolean isForward) {
-            ActivityRecord r = new ActivityRecord();
+            ActivityClientRecord r = new ActivityClientRecord();
 
             r.token = token;
             r.ident = ident;
@@ -1529,7 +424,7 @@
         public final void scheduleRelaunchActivity(IBinder token,
                 List<ResultInfo> pendingResults, List<Intent> pendingNewIntents,
                 int configChanges, boolean notResumed, Configuration config) {
-            ActivityRecord r = new ActivityRecord();
+            ActivityClientRecord r = new ActivityClientRecord();
 
             r.token = token;
             r.pendingResults = pendingResults;
@@ -1722,14 +617,6 @@
             queueOrSendMessage(H.ACTIVITY_CONFIGURATION_CHANGED, token);
         }
 
-        public void requestPss() {
-            try {
-                ActivityManagerNative.getDefault().reportPss(this,
-                        (int)Process.getPss(Process.myPid()));
-            } catch (RemoteException e) {
-            }
-        }
-
         public void profilerControl(boolean start, String path, ParcelFileDescriptor fd) {
             ProfilerControlData pcd = new ProfilerControlData();
             pcd.path = path;
@@ -1756,6 +643,10 @@
         public void dispatchPackageBroadcast(int cmd, String[] packages) {
             queueOrSendMessage(H.DISPATCH_PACKAGE_BROADCAST, packages, cmd);
         }
+
+        public void scheduleCrash(String msg) {
+            queueOrSendMessage(H.SCHEDULE_CRASH, msg);
+        }
         
         @Override
         protected void dump(FileDescriptor fd, PrintWriter pw, String[] args) {
@@ -1982,6 +873,7 @@
         public static final int REMOVE_PROVIDER         = 131;
         public static final int ENABLE_JIT              = 132;
         public static final int DISPATCH_PACKAGE_BROADCAST = 133;
+        public static final int SCHEDULE_CRASH          = 134;
         String codeToString(int code) {
             if (localLOGV) {
                 switch (code) {
@@ -2019,6 +911,7 @@
                     case REMOVE_PROVIDER: return "REMOVE_PROVIDER";
                     case ENABLE_JIT: return "ENABLE_JIT";
                     case DISPATCH_PACKAGE_BROADCAST: return "DISPATCH_PACKAGE_BROADCAST";
+                    case SCHEDULE_CRASH: return "SCHEDULE_CRASH";
                 }
             }
             return "(unknown)";
@@ -2026,14 +919,14 @@
         public void handleMessage(Message msg) {
             switch (msg.what) {
                 case LAUNCH_ACTIVITY: {
-                    ActivityRecord r = (ActivityRecord)msg.obj;
+                    ActivityClientRecord r = (ActivityClientRecord)msg.obj;
 
                     r.packageInfo = getPackageInfoNoCheck(
                             r.activityInfo.applicationInfo);
                     handleLaunchActivity(r, null);
                 } break;
                 case RELAUNCH_ACTIVITY: {
-                    ActivityRecord r = (ActivityRecord)msg.obj;
+                    ActivityClientRecord r = (ActivityClientRecord)msg.obj;
                     handleRelaunchActivity(r, msg.arg1);
                 } break;
                 case PAUSE_ACTIVITY:
@@ -2142,6 +1035,8 @@
                 case DISPATCH_PACKAGE_BROADCAST:
                     handleDispatchPackageBroadcast(msg.arg1, (String[])msg.obj);
                     break;
+                case SCHEDULE_CRASH:
+                    throw new RemoteServiceException((String)msg.obj);
             }
         }
 
@@ -2155,11 +1050,11 @@
 
     private final class Idler implements MessageQueue.IdleHandler {
         public final boolean queueIdle() {
-            ActivityRecord a = mNewActivities;
+            ActivityClientRecord a = mNewActivities;
             if (a != null) {
                 mNewActivities = null;
                 IActivityManager am = ActivityManagerNative.getDefault();
-                ActivityRecord prev;
+                ActivityClientRecord prev;
                 do {
                     if (localLOGV) Slog.v(
                         TAG, "Reporting idle of " + a +
@@ -2215,71 +1110,132 @@
         }
     }
 
-    static IPackageManager sPackageManager;
+    public static final ActivityThread currentActivityThread() {
+        return (ActivityThread)sThreadLocal.get();
+    }
 
-    final ApplicationThread mAppThread = new ApplicationThread();
-    final Looper mLooper = Looper.myLooper();
-    final H mH = new H();
-    final HashMap<IBinder, ActivityRecord> mActivities
-            = new HashMap<IBinder, ActivityRecord>();
-    // List of new activities (via ActivityRecord.nextIdle) that should
-    // be reported when next we idle.
-    ActivityRecord mNewActivities = null;
-    // Number of activities that are currently visible on-screen.
-    int mNumVisibleActivities = 0;
-    final HashMap<IBinder, Service> mServices
-            = new HashMap<IBinder, Service>();
-    AppBindData mBoundApplication;
-    Configuration mConfiguration;
-    Configuration mResConfiguration;
-    Application mInitialApplication;
-    final ArrayList<Application> mAllApplications
-            = new ArrayList<Application>();
-    // set of instantiated backup agents, keyed by package name
-    final HashMap<String, BackupAgent> mBackupAgents = new HashMap<String, BackupAgent>();
-    static final ThreadLocal sThreadLocal = new ThreadLocal();
-    Instrumentation mInstrumentation;
-    String mInstrumentationAppDir = null;
-    String mInstrumentationAppPackage = null;
-    String mInstrumentedAppDir = null;
-    boolean mSystemThread = false;
-    boolean mJitEnabled = false;
+    public static final String currentPackageName() {
+        ActivityThread am = currentActivityThread();
+        return (am != null && am.mBoundApplication != null)
+            ? am.mBoundApplication.processName : null;
+    }
 
-    // These can be accessed by multiple threads; mPackages is the lock.
-    // XXX For now we keep around information about all packages we have
-    // seen, not removing entries from this map.
-    final HashMap<String, WeakReference<PackageInfo>> mPackages
-            = new HashMap<String, WeakReference<PackageInfo>>();
-    final HashMap<String, WeakReference<PackageInfo>> mResourcePackages
-            = new HashMap<String, WeakReference<PackageInfo>>();
-    Display mDisplay = null;
-    DisplayMetrics mDisplayMetrics = null;
-    final HashMap<ResourcesKey, WeakReference<Resources> > mActiveResources
-            = new HashMap<ResourcesKey, WeakReference<Resources> >();
-    final ArrayList<ActivityRecord> mRelaunchingActivities
-            = new ArrayList<ActivityRecord>();
-    Configuration mPendingConfiguration = null;
+    public static final Application currentApplication() {
+        ActivityThread am = currentActivityThread();
+        return am != null ? am.mInitialApplication : null;
+    }
 
-    // The lock of mProviderMap protects the following variables.
-    final HashMap<String, ProviderRecord> mProviderMap
-        = new HashMap<String, ProviderRecord>();
-    final HashMap<IBinder, ProviderRefCount> mProviderRefCountMap
-        = new HashMap<IBinder, ProviderRefCount>();
-    final HashMap<IBinder, ProviderRecord> mLocalProviders
-        = new HashMap<IBinder, ProviderRecord>();
+    public static IPackageManager getPackageManager() {
+        if (sPackageManager != null) {
+            //Slog.v("PackageManager", "returning cur default = " + sPackageManager);
+            return sPackageManager;
+        }
+        IBinder b = ServiceManager.getService("package");
+        //Slog.v("PackageManager", "default service binder = " + b);
+        sPackageManager = IPackageManager.Stub.asInterface(b);
+        //Slog.v("PackageManager", "default service = " + sPackageManager);
+        return sPackageManager;
+    }
 
-    final GcIdler mGcIdler = new GcIdler();
-    boolean mGcIdlerScheduled = false;
+    DisplayMetrics getDisplayMetricsLocked(boolean forceUpdate) {
+        if (mDisplayMetrics != null && !forceUpdate) {
+            return mDisplayMetrics;
+        }
+        if (mDisplay == null) {
+            WindowManager wm = WindowManagerImpl.getDefault();
+            mDisplay = wm.getDefaultDisplay();
+        }
+        DisplayMetrics metrics = mDisplayMetrics = new DisplayMetrics();
+        mDisplay.getMetrics(metrics);
+        //Slog.i("foo", "New metrics: w=" + metrics.widthPixels + " h="
+        //        + metrics.heightPixels + " den=" + metrics.density
+        //        + " xdpi=" + metrics.xdpi + " ydpi=" + metrics.ydpi);
+        return metrics;
+    }
 
-    public final PackageInfo getPackageInfo(String packageName, int flags) {
+    /**
+     * Creates the top level Resources for applications with the given compatibility info.
+     *
+     * @param resDir the resource directory.
+     * @param compInfo the compability info. It will use the default compatibility info when it's
+     * null.
+     */
+    Resources getTopLevelResources(String resDir, CompatibilityInfo compInfo) {
+        ResourcesKey key = new ResourcesKey(resDir, compInfo.applicationScale);
+        Resources r;
         synchronized (mPackages) {
-            WeakReference<PackageInfo> ref;
+            // Resources is app scale dependent.
+            if (false) {
+                Slog.w(TAG, "getTopLevelResources: " + resDir + " / "
+                        + compInfo.applicationScale);
+            }
+            WeakReference<Resources> wr = mActiveResources.get(key);
+            r = wr != null ? wr.get() : null;
+            //if (r != null) Slog.i(TAG, "isUpToDate " + resDir + ": " + r.getAssets().isUpToDate());
+            if (r != null && r.getAssets().isUpToDate()) {
+                if (false) {
+                    Slog.w(TAG, "Returning cached resources " + r + " " + resDir
+                            + ": appScale=" + r.getCompatibilityInfo().applicationScale);
+                }
+                return r;
+            }
+        }
+
+        //if (r != null) {
+        //    Slog.w(TAG, "Throwing away out-of-date resources!!!! "
+        //            + r + " " + resDir);
+        //}
+
+        AssetManager assets = new AssetManager();
+        if (assets.addAssetPath(resDir) == 0) {
+            return null;
+        }
+
+        //Slog.i(TAG, "Resource: key=" + key + ", display metrics=" + metrics);
+        DisplayMetrics metrics = getDisplayMetricsLocked(false);
+        r = new Resources(assets, metrics, getConfiguration(), compInfo);
+        if (false) {
+            Slog.i(TAG, "Created app resources " + resDir + " " + r + ": "
+                    + r.getConfiguration() + " appScale="
+                    + r.getCompatibilityInfo().applicationScale);
+        }
+        
+        synchronized (mPackages) {
+            WeakReference<Resources> wr = mActiveResources.get(key);
+            Resources existing = wr != null ? wr.get() : null;
+            if (existing != null && existing.getAssets().isUpToDate()) {
+                // Someone else already created the resources while we were
+                // unlocked; go ahead and use theirs.
+                r.getAssets().close();
+                return existing;
+            }
+            
+            // XXX need to remove entries when weak references go away
+            mActiveResources.put(key, new WeakReference<Resources>(r));
+            return r;
+        }
+    }
+
+    /**
+     * Creates the top level resources for the given package.
+     */
+    Resources getTopLevelResources(String resDir, LoadedApk pkgInfo) {
+        return getTopLevelResources(resDir, pkgInfo.mCompatibilityInfo);
+    }
+
+    final Handler getHandler() {
+        return mH;
+    }
+
+    public final LoadedApk getPackageInfo(String packageName, int flags) {
+        synchronized (mPackages) {
+            WeakReference<LoadedApk> ref;
             if ((flags&Context.CONTEXT_INCLUDE_CODE) != 0) {
                 ref = mPackages.get(packageName);
             } else {
                 ref = mResourcePackages.get(packageName);
             }
-            PackageInfo packageInfo = ref != null ? ref.get() : null;
+            LoadedApk packageInfo = ref != null ? ref.get() : null;
             //Slog.i(TAG, "getPackageInfo " + packageName + ": " + packageInfo);
             //if (packageInfo != null) Slog.i(TAG, "isUptoDate " + packageInfo.mResDir
             //        + ": " + packageInfo.mResources.getAssets().isUpToDate());
@@ -2311,7 +1267,7 @@
         return null;
     }
 
-    public final PackageInfo getPackageInfo(ApplicationInfo ai, int flags) {
+    public final LoadedApk getPackageInfo(ApplicationInfo ai, int flags) {
         boolean includeCode = (flags&Context.CONTEXT_INCLUDE_CODE) != 0;
         boolean securityViolation = includeCode && ai.uid != 0
                 && ai.uid != Process.SYSTEM_UID && (mBoundApplication != null
@@ -2333,20 +1289,20 @@
         return getPackageInfo(ai, null, securityViolation, includeCode);
     }
 
-    public final PackageInfo getPackageInfoNoCheck(ApplicationInfo ai) {
+    public final LoadedApk getPackageInfoNoCheck(ApplicationInfo ai) {
         return getPackageInfo(ai, null, false, true);
     }
 
-    private final PackageInfo getPackageInfo(ApplicationInfo aInfo,
+    private final LoadedApk getPackageInfo(ApplicationInfo aInfo,
             ClassLoader baseLoader, boolean securityViolation, boolean includeCode) {
         synchronized (mPackages) {
-            WeakReference<PackageInfo> ref;
+            WeakReference<LoadedApk> ref;
             if (includeCode) {
                 ref = mPackages.get(aInfo.packageName);
             } else {
                 ref = mResourcePackages.get(aInfo.packageName);
             }
-            PackageInfo packageInfo = ref != null ? ref.get() : null;
+            LoadedApk packageInfo = ref != null ? ref.get() : null;
             if (packageInfo == null || (packageInfo.mResources != null
                     && !packageInfo.mResources.getAssets().isUpToDate())) {
                 if (localLOGV) Slog.v(TAG, (includeCode ? "Loading code package "
@@ -2355,15 +1311,15 @@
                                 ? mBoundApplication.processName : null)
                         + ")");
                 packageInfo =
-                    new PackageInfo(this, aInfo, this, baseLoader,
+                    new LoadedApk(this, aInfo, this, baseLoader,
                             securityViolation, includeCode &&
                             (aInfo.flags&ApplicationInfo.FLAG_HAS_CODE) != 0);
                 if (includeCode) {
                     mPackages.put(aInfo.packageName,
-                            new WeakReference<PackageInfo>(packageInfo));
+                            new WeakReference<LoadedApk>(packageInfo));
                 } else {
                     mResourcePackages.put(aInfo.packageName,
-                            new WeakReference<PackageInfo>(packageInfo));
+                            new WeakReference<LoadedApk>(packageInfo));
                 }
             }
             return packageInfo;
@@ -2412,7 +1368,7 @@
             if (mSystemContext == null) {
                 ContextImpl context =
                     ContextImpl.createSystemContext(this);
-                PackageInfo info = new PackageInfo(this, "android", context, null);
+                LoadedApk info = new LoadedApk(this, "android", context, null);
                 context.init(info, null, this);
                 context.getResources().updateConfiguration(
                         getConfiguration(), getDisplayMetricsLocked(false));
@@ -2427,7 +1383,7 @@
     public void installSystemApplicationInfo(ApplicationInfo info) {
         synchronized (this) {
             ContextImpl context = getSystemContext();
-            context.init(new PackageInfo(this, "android", context, info), null, this);
+            context.init(new LoadedApk(this, "android", context, info), null, this);
         }
     }
 
@@ -2479,7 +1435,7 @@
     public final Activity startActivityNow(Activity parent, String id,
         Intent intent, ActivityInfo activityInfo, IBinder token, Bundle state,
         Object lastNonConfigurationInstance) {
-        ActivityRecord r = new ActivityRecord();
+        ActivityClientRecord r = new ActivityClientRecord();
             r.token = token;
             r.ident = 0;
             r.intent = intent;
@@ -2550,7 +1506,7 @@
         queueOrSendMessage(H.CLEAN_UP_CONTEXT, cci);
     }
 
-    private final Activity performLaunchActivity(ActivityRecord r, Intent customIntent) {
+    private final Activity performLaunchActivity(ActivityClientRecord r, Intent customIntent) {
         // System.out.println("##### [" + System.currentTimeMillis() + "] ActivityThread.performLaunchActivity(" + r + ")");
 
         ActivityInfo aInfo = r.activityInfo;
@@ -2669,7 +1625,7 @@
         return activity;
     }
 
-    private final void handleLaunchActivity(ActivityRecord r, Intent customIntent) {
+    private final void handleLaunchActivity(ActivityClientRecord r, Intent customIntent) {
         // If we are getting ready to gc after going to the background, well
         // we are back active so skip it.
         unscheduleGcIdler();
@@ -2729,7 +1685,7 @@
         }
     }
 
-    private final void deliverNewIntents(ActivityRecord r,
+    private final void deliverNewIntents(ActivityClientRecord r,
             List<Intent> intents) {
         final int N = intents.size();
         for (int i=0; i<N; i++) {
@@ -2741,7 +1697,7 @@
 
     public final void performNewIntents(IBinder token,
             List<Intent> intents) {
-        ActivityRecord r = mActivities.get(token);
+        ActivityClientRecord r = mActivities.get(token);
         if (r != null) {
             final boolean resumed = !r.paused;
             if (resumed) {
@@ -2765,7 +1721,7 @@
 
         String component = data.intent.getComponent().getClassName();
 
-        PackageInfo packageInfo = getPackageInfoNoCheck(
+        LoadedApk packageInfo = getPackageInfoNoCheck(
                 data.info.applicationInfo);
 
         IActivityManager mgr = ActivityManagerNative.getDefault();
@@ -2849,7 +1805,7 @@
         unscheduleGcIdler();
 
         // instantiate the BackupAgent class named in the manifest
-        PackageInfo packageInfo = getPackageInfoNoCheck(data.appInfo);
+        LoadedApk packageInfo = getPackageInfoNoCheck(data.appInfo);
         String packageName = packageInfo.mPackageName;
         if (mBackupAgents.get(packageName) != null) {
             Slog.d(TAG, "BackupAgent " + "  for " + packageName
@@ -2911,7 +1867,7 @@
     private final void handleDestroyBackupAgent(CreateBackupAgentData data) {
         if (DEBUG_BACKUP) Slog.v(TAG, "handleDestroyBackupAgent: " + data);
 
-        PackageInfo packageInfo = getPackageInfoNoCheck(data.appInfo);
+        LoadedApk packageInfo = getPackageInfoNoCheck(data.appInfo);
         String packageName = packageInfo.mPackageName;
         BackupAgent agent = mBackupAgents.get(packageName);
         if (agent != null) {
@@ -2932,7 +1888,7 @@
         // we are back active so skip it.
         unscheduleGcIdler();
 
-        PackageInfo packageInfo = getPackageInfoNoCheck(
+        LoadedApk packageInfo = getPackageInfoNoCheck(
                 data.info.applicationInfo);
         Service service = null;
         try {
@@ -3096,9 +2052,9 @@
         //Slog.i(TAG, "Running services: " + mServices);
     }
 
-    public final ActivityRecord performResumeActivity(IBinder token,
+    public final ActivityClientRecord performResumeActivity(IBinder token,
             boolean clearHide) {
-        ActivityRecord r = mActivities.get(token);
+        ActivityClientRecord r = mActivities.get(token);
         if (localLOGV) Slog.v(TAG, "Performing resume of " + r
                 + " finished=" + r.activity.mFinished);
         if (r != null && !r.activity.mFinished) {
@@ -3140,7 +2096,7 @@
         // we are back active so skip it.
         unscheduleGcIdler();
 
-        ActivityRecord r = performResumeActivity(token, clearHide);
+        ActivityClientRecord r = performResumeActivity(token, clearHide);
 
         if (r != null) {
             final Activity a = r.activity;
@@ -3239,7 +2195,7 @@
     private int mThumbnailWidth = -1;
     private int mThumbnailHeight = -1;
 
-    private final Bitmap createThumbnailBitmap(ActivityRecord r) {
+    private final Bitmap createThumbnailBitmap(ActivityClientRecord r) {
         Bitmap thumbnail = null;
         try {
             int w = mThumbnailWidth;
@@ -3255,13 +2211,24 @@
                 h = mThumbnailHeight;
             }
 
-            // XXX Only set hasAlpha if needed?
-            thumbnail = Bitmap.createBitmap(w, h, Bitmap.Config.RGB_565);
-            thumbnail.eraseColor(0);
-            Canvas cv = new Canvas(thumbnail);
-            if (!r.activity.onCreateThumbnail(thumbnail, cv)) {
-                thumbnail = null;
+            // On platforms where we don't want thumbnails, set dims to (0,0)
+            if ((w > 0) && (h > 0)) {
+                View topView = r.activity.getWindow().getDecorView();
+
+                // Maximize bitmap by capturing in native aspect.
+                if (topView.getWidth() >= topView.getHeight()) {
+                    thumbnail = Bitmap.createBitmap(w, h, THUMBNAIL_FORMAT);
+                } else {
+                    thumbnail = Bitmap.createBitmap(h, w, THUMBNAIL_FORMAT);
+                }
+
+                thumbnail.eraseColor(0);
+                Canvas cv = new Canvas(thumbnail);
+                if (!r.activity.onCreateThumbnail(thumbnail, cv)) {
+                    thumbnail = null;
+                }
             }
+
         } catch (Exception e) {
             if (!mInstrumentation.onException(r.activity, e)) {
                 throw new RuntimeException(
@@ -3277,7 +2244,7 @@
 
     private final void handlePauseActivity(IBinder token, boolean finished,
             boolean userLeaving, int configChanges) {
-        ActivityRecord r = mActivities.get(token);
+        ActivityClientRecord r = mActivities.get(token);
         if (r != null) {
             //Slog.v(TAG, "userLeaving=" + userLeaving + " handling pause of " + r);
             if (userLeaving) {
@@ -3295,17 +2262,17 @@
         }
     }
 
-    final void performUserLeavingActivity(ActivityRecord r) {
+    final void performUserLeavingActivity(ActivityClientRecord r) {
         mInstrumentation.callActivityOnUserLeaving(r.activity);
     }
 
     final Bundle performPauseActivity(IBinder token, boolean finished,
             boolean saveState) {
-        ActivityRecord r = mActivities.get(token);
+        ActivityClientRecord r = mActivities.get(token);
         return r != null ? performPauseActivity(r, finished, saveState) : null;
     }
 
-    final Bundle performPauseActivity(ActivityRecord r, boolean finished,
+    final Bundle performPauseActivity(ActivityClientRecord r, boolean finished,
             boolean saveState) {
         if (r.paused) {
             if (r.activity.mFinished) {
@@ -3356,7 +2323,7 @@
     }
 
     final void performStopActivity(IBinder token) {
-        ActivityRecord r = mActivities.get(token);
+        ActivityClientRecord r = mActivities.get(token);
         performStopActivityInner(r, null, false);
     }
 
@@ -3372,7 +2339,7 @@
         }
     }
 
-    private final void performStopActivityInner(ActivityRecord r,
+    private final void performStopActivityInner(ActivityClientRecord r,
             StopInfo info, boolean keepShown) {
         if (localLOGV) Slog.v(TAG, "Performing stop of " + r);
         if (r != null) {
@@ -3392,7 +2359,7 @@
             if (info != null) {
                 try {
                     // First create a thumbnail for the activity...
-                    //info.thumbnail = createThumbnailBitmap(r);
+                    info.thumbnail = createThumbnailBitmap(r);
                     info.description = r.activity.onCreateDescription();
                 } catch (Exception e) {
                     if (!mInstrumentation.onException(r.activity, e)) {
@@ -3423,7 +2390,7 @@
         }
     }
 
-    private final void updateVisibility(ActivityRecord r, boolean show) {
+    private final void updateVisibility(ActivityClientRecord r, boolean show) {
         View v = r.activity.mDecor;
         if (v != null) {
             if (show) {
@@ -3451,7 +2418,7 @@
     }
 
     private final void handleStopActivity(IBinder token, boolean show, int configChanges) {
-        ActivityRecord r = mActivities.get(token);
+        ActivityClientRecord r = mActivities.get(token);
         r.activity.mConfigChangeFlags |= configChanges;
 
         StopInfo info = new StopInfo();
@@ -3472,7 +2439,7 @@
     }
 
     final void performRestartActivity(IBinder token) {
-        ActivityRecord r = mActivities.get(token);
+        ActivityClientRecord r = mActivities.get(token);
         if (r.stopped) {
             r.activity.performRestart();
             r.stopped = false;
@@ -3480,7 +2447,7 @@
     }
 
     private final void handleWindowVisibility(IBinder token, boolean show) {
-        ActivityRecord r = mActivities.get(token);
+        ActivityClientRecord r = mActivities.get(token);
         if (!show && !r.stopped) {
             performStopActivityInner(r, null, show);
         } else if (show && r.stopped) {
@@ -3498,7 +2465,7 @@
         }
     }
 
-    private final void deliverResults(ActivityRecord r, List<ResultInfo> results) {
+    private final void deliverResults(ActivityClientRecord r, List<ResultInfo> results) {
         final int N = results.size();
         for (int i=0; i<N; i++) {
             ResultInfo ri = results.get(i);
@@ -3522,7 +2489,7 @@
     }
 
     private final void handleSendResult(ResultData res) {
-        ActivityRecord r = mActivities.get(res.token);
+        ActivityClientRecord r = mActivities.get(res.token);
         if (DEBUG_RESULTS) Slog.v(TAG, "Handling send result to " + r);
         if (r != null) {
             final boolean resumed = !r.paused;
@@ -3561,13 +2528,13 @@
         }
     }
 
-    public final ActivityRecord performDestroyActivity(IBinder token, boolean finishing) {
+    public final ActivityClientRecord performDestroyActivity(IBinder token, boolean finishing) {
         return performDestroyActivity(token, finishing, 0, false);
     }
 
-    private final ActivityRecord performDestroyActivity(IBinder token, boolean finishing,
+    private final ActivityClientRecord performDestroyActivity(IBinder token, boolean finishing,
             int configChanges, boolean getNonConfigInstance) {
-        ActivityRecord r = mActivities.get(token);
+        ActivityClientRecord r = mActivities.get(token);
         if (localLOGV) Slog.v(TAG, "Performing finish of " + r);
         if (r != null) {
             r.activity.mConfigChangeFlags |= configChanges;
@@ -3670,7 +2637,7 @@
 
     private final void handleDestroyActivity(IBinder token, boolean finishing,
             int configChanges, boolean getNonConfigInstance) {
-        ActivityRecord r = performDestroyActivity(token, finishing,
+        ActivityClientRecord r = performDestroyActivity(token, finishing,
                 configChanges, getNonConfigInstance);
         if (r != null) {
             WindowManager wm = r.activity.getWindowManager();
@@ -3711,7 +2678,7 @@
         }
     }
 
-    private final void handleRelaunchActivity(ActivityRecord tmp, int configChanges) {
+    private final void handleRelaunchActivity(ActivityClientRecord tmp, int configChanges) {
         // If we are getting ready to gc after going to the background, well
         // we are back active so skip it.
         unscheduleGcIdler();
@@ -3730,7 +2697,7 @@
             IBinder token = tmp.token;
             tmp = null;
             for (int i=0; i<N; i++) {
-                ActivityRecord r = mRelaunchingActivities.get(i);
+                ActivityClientRecord r = mRelaunchingActivities.get(i);
                 if (r.token == token) {
                     tmp = r;
                     mRelaunchingActivities.remove(i);
@@ -3772,7 +2739,7 @@
             handleConfigurationChanged(changedConfig);
         }
 
-        ActivityRecord r = mActivities.get(tmp.token);
+        ActivityClientRecord r = mActivities.get(tmp.token);
         if (DEBUG_CONFIGURATION) Slog.v(TAG, "Handling relaunch of " + r);
         if (r == null) {
             return;
@@ -3816,7 +2783,7 @@
     }
 
     private final void handleRequestThumbnail(IBinder token) {
-        ActivityRecord r = mActivities.get(token);
+        ActivityClientRecord r = mActivities.get(token);
         Bitmap thumbnail = createThumbnailBitmap(r);
         CharSequence description = null;
         try {
@@ -3843,9 +2810,9 @@
                 = new ArrayList<ComponentCallbacks>();
 
         if (mActivities.size() > 0) {
-            Iterator<ActivityRecord> it = mActivities.values().iterator();
+            Iterator<ActivityClientRecord> it = mActivities.values().iterator();
             while (it.hasNext()) {
-                ActivityRecord ar = it.next();
+                ActivityClientRecord ar = it.next();
                 Activity a = ar.activity;
                 if (a != null) {
                     if (!ar.activity.mFinished && (allActivities ||
@@ -3874,7 +2841,7 @@
         }
         synchronized (mProviderMap) {
             if (mLocalProviders.size() > 0) {
-                Iterator<ProviderRecord> it = mLocalProviders.values().iterator();
+                Iterator<ProviderClientRecord> it = mLocalProviders.values().iterator();
                 while (it.hasNext()) {
                     callbacks.add(it.next().mLocalProvider);
                 }
@@ -4020,7 +2987,7 @@
     }
 
     final void handleActivityConfigurationChanged(IBinder token) {
-        ActivityRecord r = mActivities.get(token);
+        ActivityClientRecord r = mActivities.get(token);
         if (r == null || r.activity == null) {
             return;
         }
@@ -4057,7 +3024,7 @@
             for (int i=packages.length-1; i>=0; i--) {
                 //Slog.i(TAG, "Cleaning old package: " + packages[i]);
                 if (!hasPkgInfo) {
-                    WeakReference<PackageInfo> ref;
+                    WeakReference<LoadedApk> ref;
                     ref = mPackages.get(packages[i]);
                     if (ref != null && ref.get() != null) {
                         hasPkgInfo = true;
@@ -4132,6 +3099,21 @@
         data.info = getPackageInfoNoCheck(data.appInfo);
 
         /**
+         * For system applications on userdebug/eng builds, log stack
+         * traces of disk and network access to dropbox for analysis.
+         */
+        if ((data.appInfo.flags &
+             (ApplicationInfo.FLAG_SYSTEM |
+              ApplicationInfo.FLAG_UPDATED_SYSTEM_APP)) != 0 &&
+            !"user".equals(Build.TYPE)) {
+            StrictMode.setThreadBlockingPolicy(
+                StrictMode.DISALLOW_DISK_WRITE |
+                StrictMode.DISALLOW_DISK_READ |
+                StrictMode.DISALLOW_NETWORK |
+                StrictMode.PENALTY_DROPBOX);
+        }
+
+        /**
          * Switch this process to density compatibility mode if needed.
          */
         if ((data.appInfo.flags&ApplicationInfo.FLAG_SUPPORTS_SCREEN_DENSITIES)
@@ -4189,7 +3171,7 @@
             instrApp.sourceDir = ii.sourceDir;
             instrApp.publicSourceDir = ii.publicSourceDir;
             instrApp.dataDir = ii.dataDir;
-            PackageInfo pi = getPackageInfo(instrApp,
+            LoadedApk pi = getPackageInfo(instrApp,
                     appContext.getClassLoader(), false, true);
             ContextImpl instrContext = new ContextImpl();
             instrContext.init(pi, null, this);
@@ -4300,7 +3282,7 @@
 
     private final IContentProvider getProvider(Context context, String name) {
         synchronized(mProviderMap) {
-            final ProviderRecord pr = mProviderMap.get(name);
+            final ProviderClientRecord pr = mProviderMap.get(name);
             if (pr != null) {
                 return pr.mProvider;
             }
@@ -4411,9 +3393,9 @@
         String name = null;
         
         // remove the provider from mProviderMap
-        Iterator<ProviderRecord> iter = mProviderMap.values().iterator();
+        Iterator<ProviderClientRecord> iter = mProviderMap.values().iterator();
         while (iter.hasNext()) {
-            ProviderRecord pr = iter.next();
+            ProviderClientRecord pr = iter.next();
             IBinder myBinder = pr.mProvider.asBinder();
             if (myBinder == providerBinder) {
                 //find if its published by this process itself
@@ -4438,10 +3420,10 @@
 
     final void removeDeadProvider(String name, IContentProvider provider) {
         synchronized(mProviderMap) {
-            ProviderRecord pr = mProviderMap.get(name);
+            ProviderClientRecord pr = mProviderMap.get(name);
             if (pr.mProvider.asBinder() == provider.asBinder()) {
                 Slog.i(TAG, "Removing dead content provider: " + name);
-                ProviderRecord removed = mProviderMap.remove(name);
+                ProviderClientRecord removed = mProviderMap.remove(name);
                 if (removed != null) {
                     removed.mProvider.asBinder().unlinkToDeath(removed, 0);
                 }
@@ -4450,10 +3432,10 @@
     }
 
     final void removeDeadProviderLocked(String name, IContentProvider provider) {
-        ProviderRecord pr = mProviderMap.get(name);
+        ProviderClientRecord pr = mProviderMap.get(name);
         if (pr.mProvider.asBinder() == provider.asBinder()) {
             Slog.i(TAG, "Removing dead content provider: " + name);
-            ProviderRecord removed = mProviderMap.remove(name);
+            ProviderClientRecord removed = mProviderMap.remove(name);
             if (removed != null) {
                 removed.mProvider.asBinder().unlinkToDeath(removed, 0);
             }
@@ -4521,7 +3503,7 @@
             // Cache the pointer for the remote provider.
             String names[] = PATTERN_SEMICOLON.split(info.authority);
             for (int i=0; i<names.length; i++) {
-                ProviderRecord pr = new ProviderRecord(names[i], provider,
+                ProviderClientRecord pr = new ProviderClientRecord(names[i], provider,
                         localProvider);
                 try {
                     provider.asBinder().linkToDeath(pr, 0);
@@ -4532,7 +3514,7 @@
             }
             if (localProvider != null) {
                 mLocalProviders.put(provider.asBinder(),
-                        new ProviderRecord(null, provider, localProvider));
+                        new ProviderClientRecord(null, provider, localProvider));
             }
         }
 
diff --git a/core/java/android/app/AppGlobals.java b/core/java/android/app/AppGlobals.java
new file mode 100644
index 0000000..9a39129
--- /dev/null
+++ b/core/java/android/app/AppGlobals.java
@@ -0,0 +1,49 @@
+/*
+ * Copyright (C) 2010 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package android.app;
+
+import android.content.pm.IPackageManager;
+
+/**
+ * Special private access for certain globals related to a process.
+ * @hide
+ */
+public class AppGlobals {
+    /**
+     * Return the first Application object made in the process.
+     * NOTE: Only works on the main thread.
+     */
+    public static Application getInitialApplication() {
+        return ActivityThread.currentApplication();
+    }
+    
+    /**
+     * Return the package name of the first .apk loaded into the process.
+     * NOTE: Only works on the main thread.
+     */
+    public static String getInitialPackage() {
+        return ActivityThread.currentPackageName();
+    }
+    
+    /**
+     * Return the raw interface to the package manager.
+     * @return
+     */
+    public static IPackageManager getPackageManager() {
+        return ActivityThread.getPackageManager();
+    }
+}
diff --git a/core/java/android/app/ApplicationErrorReport.java b/core/java/android/app/ApplicationErrorReport.java
index f0cef98..6981cd6 100644
--- a/core/java/android/app/ApplicationErrorReport.java
+++ b/core/java/android/app/ApplicationErrorReport.java
@@ -27,6 +27,7 @@
 import android.os.SystemProperties;
 import android.provider.Settings;
 import android.util.Printer;
+
 import java.io.PrintWriter;
 import java.io.StringWriter;
 
@@ -52,7 +53,6 @@
     // System property defining default error report receiver
     static final String DEFAULT_ERROR_RECEIVER_PROPERTY = "ro.error.receiver.default";
 
-    
     /**
      * Uninitialized error report.
      */
@@ -74,6 +74,11 @@
     public static final int TYPE_BATTERY = 3;
 
     /**
+     * An error report about a StrictMode violation.
+     */
+    public static final int TYPE_STRICT_MODE_VIOLATION = 4;
+
+    /**
      * Type of this report. Can be one of {@link #TYPE_NONE},
      * {@link #TYPE_CRASH}, {@link #TYPE_ANR}, or {@link #TYPE_BATTERY}.
      */
@@ -250,6 +255,10 @@
 
     /**
      * Describes an application crash.
+     *
+     * <p>This is also used to marshal around stack traces of ANRs and
+     * StrictMode violations which aren't necessarily crashes, but have
+     * a lot in common.
      */
     public static class CrashInfo {
         /**
@@ -288,6 +297,12 @@
         public String stackTrace;
 
         /**
+         * For StrictMode violations, the wall time duration of the
+         * violation, when known.
+         */
+        public long durationMillis = -1;
+
+        /**
          * Create an uninitialized instance of CrashInfo.
          */
         public CrashInfo() {
@@ -330,6 +345,7 @@
             throwMethodName = in.readString();
             throwLineNumber = in.readInt();
             stackTrace = in.readString();
+            durationMillis = in.readLong();
         }
 
         /**
@@ -343,6 +359,7 @@
             dest.writeString(throwMethodName);
             dest.writeInt(throwLineNumber);
             dest.writeString(stackTrace);
+            dest.writeLong(durationMillis);
         }
 
         /**
@@ -356,6 +373,9 @@
             pw.println(prefix + "throwMethodName: " + throwMethodName);
             pw.println(prefix + "throwLineNumber: " + throwLineNumber);
             pw.println(prefix + "stackTrace: " + stackTrace);
+            if (durationMillis != -1) {
+                pw.println(prefix + "durationMillis: " + durationMillis);
+            }
         }
     }
 
diff --git a/core/java/android/app/ApplicationThreadNative.java b/core/java/android/app/ApplicationThreadNative.java
index da26a78..1c20062 100644
--- a/core/java/android/app/ApplicationThreadNative.java
+++ b/core/java/android/app/ApplicationThreadNative.java
@@ -341,13 +341,6 @@
             return true;
         }
         
-        case REQUEST_PSS_TRANSACTION:
-        {
-            data.enforceInterface(IApplicationThread.descriptor);
-            requestPss();
-            return true;
-        }
-        
         case PROFILER_CONTROL_TRANSACTION:
         {
             data.enforceInterface(IApplicationThread.descriptor);
@@ -402,6 +395,14 @@
             dispatchPackageBroadcast(cmd, packages);
             return true;
         }
+
+        case SCHEDULE_CRASH_TRANSACTION:
+        {
+            data.enforceInterface(IApplicationThread.descriptor);
+            String msg = data.readString();
+            scheduleCrash(msg);
+            return true;
+        }
         }
 
         return super.onTransact(code, data, reply, flags);
@@ -771,14 +772,6 @@
         data.recycle();
     }
     
-    public final void requestPss() throws RemoteException {
-        Parcel data = Parcel.obtain();
-        data.writeInterfaceToken(IApplicationThread.descriptor);
-        mRemote.transact(REQUEST_PSS_TRANSACTION, data, null,
-                IBinder.FLAG_ONEWAY);
-        data.recycle();
-    }
-    
     public void profilerControl(boolean start, String path,
             ParcelFileDescriptor fd) throws RemoteException {
         Parcel data = Parcel.obtain();
@@ -826,5 +819,15 @@
         data.recycle();
         
     }
+    
+    public void scheduleCrash(String msg) throws RemoteException {
+        Parcel data = Parcel.obtain();
+        data.writeInterfaceToken(IApplicationThread.descriptor);
+        data.writeString(msg);
+        mRemote.transact(SCHEDULE_CRASH_TRANSACTION, data, null,
+                IBinder.FLAG_ONEWAY);
+        data.recycle();
+        
+    }
 }
 
diff --git a/core/java/android/app/ContextImpl.java b/core/java/android/app/ContextImpl.java
index f471f57..167bd3c 100644
--- a/core/java/android/app/ContextImpl.java
+++ b/core/java/android/app/ContextImpl.java
@@ -67,6 +67,7 @@
 import android.media.AudioManager;
 import android.net.ConnectivityManager;
 import android.net.IConnectivityManager;
+import android.net.DownloadManager;
 import android.net.ThrottleManager;
 import android.net.IThrottleManager;
 import android.net.Uri;
@@ -173,7 +174,7 @@
             new HashMap<File, SharedPreferencesImpl>();
 
     private AudioManager mAudioManager;
-    /*package*/ ActivityThread.PackageInfo mPackageInfo;
+    /*package*/ LoadedApk mPackageInfo;
     private Resources mResources;
     /*package*/ ActivityThread mMainThread;
     private Context mOuterContext;
@@ -199,6 +200,7 @@
     private DropBoxManager mDropBoxManager = null;
     private DevicePolicyManager mDevicePolicyManager = null;
     private UiModeManager mUiModeManager = null;
+    private DownloadManager mDownloadManager = null;
 
     private final Object mSync = new Object();
 
@@ -696,7 +698,7 @@
                 if (scheduler == null) {
                     scheduler = mMainThread.getHandler();
                 }
-                rd = new ActivityThread.PackageInfo.ReceiverDispatcher(
+                rd = new LoadedApk.ReceiverDispatcher(
                         resultReceiver, getOuterContext(), scheduler, null, false).getIIntentReceiver();
             }
         }
@@ -739,7 +741,7 @@
                 if (scheduler == null) {
                     scheduler = mMainThread.getHandler();
                 }
-                rd = new ActivityThread.PackageInfo.ReceiverDispatcher(
+                rd = new LoadedApk.ReceiverDispatcher(
                         resultReceiver, getOuterContext(), scheduler, null, false).getIIntentReceiver();
             }
         }
@@ -795,7 +797,7 @@
                 if (scheduler == null) {
                     scheduler = mMainThread.getHandler();
                 }
-                rd = new ActivityThread.PackageInfo.ReceiverDispatcher(
+                rd = new LoadedApk.ReceiverDispatcher(
                         receiver, context, scheduler, null, true).getIIntentReceiver();
             }
         }
@@ -973,6 +975,8 @@
             return getDevicePolicyManager();
         } else if (UI_MODE_SERVICE.equals(name)) {
             return getUiModeManager();
+        } else if (DOWNLOAD_SERVICE.equals(name)) {
+            return getDownloadManager();
         }
 
         return null;
@@ -1157,12 +1161,16 @@
         return mAudioManager;
     }
 
+    /* package */ static DropBoxManager createDropBoxManager() {
+        IBinder b = ServiceManager.getService(DROPBOX_SERVICE);
+        IDropBoxManagerService service = IDropBoxManagerService.Stub.asInterface(b);
+        return new DropBoxManager(service);
+    }
+
     private DropBoxManager getDropBoxManager() {
         synchronized (mSync) {
             if (mDropBoxManager == null) {
-                IBinder b = ServiceManager.getService(DROPBOX_SERVICE);
-                IDropBoxManagerService service = IDropBoxManagerService.Stub.asInterface(b);
-                mDropBoxManager = new DropBoxManager(service);
+                mDropBoxManager = createDropBoxManager();
             }
         }
         return mDropBoxManager;
@@ -1187,6 +1195,15 @@
         return mUiModeManager;
     }
 
+    private DownloadManager getDownloadManager() {
+        synchronized (mSync) {
+            if (mDownloadManager == null) {
+                mDownloadManager = new DownloadManager(getContentResolver());
+            }
+        }
+        return mDownloadManager;
+    }
+
     @Override
     public int checkPermission(String permission, int pid, int uid) {
         if (permission == null) {
@@ -1421,7 +1438,7 @@
             return new ContextImpl(mMainThread.getSystemContext());
         }
 
-        ActivityThread.PackageInfo pi =
+        LoadedApk pi =
             mMainThread.getPackageInfo(packageName, flags);
         if (pi != null) {
             ContextImpl c = new ContextImpl();
@@ -1488,12 +1505,12 @@
         mOuterContext = this;
     }
 
-    final void init(ActivityThread.PackageInfo packageInfo,
+    final void init(LoadedApk packageInfo,
             IBinder activityToken, ActivityThread mainThread) {
         init(packageInfo, activityToken, mainThread, null);
     }
 
-    final void init(ActivityThread.PackageInfo packageInfo,
+    final void init(LoadedApk packageInfo,
                 IBinder activityToken, ActivityThread mainThread,
                 Resources container) {
         mPackageInfo = packageInfo;
@@ -2173,6 +2190,39 @@
                 throws NameNotFoundException {
             return getApplicationIcon(getApplicationInfo(packageName, 0));
         }
+        
+        @Override 
+        public Drawable getActivityLogo(ComponentName activityName)
+                throws NameNotFoundException {
+            return getActivityInfo(activityName, 0).loadLogo(this);
+        }
+
+        @Override
+        public Drawable getActivityLogo(Intent intent)
+                throws NameNotFoundException {
+            if (intent.getComponent() != null) {
+                return getActivityLogo(intent.getComponent());
+            }
+
+            ResolveInfo info = resolveActivity(
+                    intent, PackageManager.MATCH_DEFAULT_ONLY);
+            if (info != null) {
+                return info.activityInfo.loadLogo(this);
+            }
+
+            throw new NameNotFoundException(intent.toUri(0));
+        }
+
+        @Override
+        public Drawable getApplicationLogo(ApplicationInfo info) {
+            return info.loadLogo(this);
+        }
+
+        @Override
+        public Drawable getApplicationLogo(String packageName)
+                throws NameNotFoundException {
+            return getApplicationLogo(getApplicationInfo(packageName, 0));
+        }
 
         @Override public Resources getResourcesForActivity(
                 ComponentName activityName) throws NameNotFoundException {
@@ -2620,6 +2670,15 @@
             return PackageManager.COMPONENT_ENABLED_STATE_DEFAULT;
         }
 
+        @Override
+        public void setPackageObbPath(String packageName, String path) {
+            try {
+                mPM.setPackageObbPath(packageName, path);
+            } catch (RemoteException e) {
+                // Should never happen!
+            }
+        }
+
         private final ContextImpl mContext;
         private final IPackageManager mPM;
 
diff --git a/core/java/android/app/Dialog.java b/core/java/android/app/Dialog.java
index 0235599..da8c9e5 100644
--- a/core/java/android/app/Dialog.java
+++ b/core/java/android/app/Dialog.java
@@ -138,7 +138,7 @@
     public Dialog(Context context, int theme) {
         mContext = new ContextThemeWrapper(
             context, theme == 0 ? com.android.internal.R.style.Theme_Dialog : theme);
-        mWindowManager = (WindowManager)context.getSystemService("window");
+        mWindowManager = (WindowManager)context.getSystemService(Context.WINDOW_SERVICE);
         Window w = PolicyManager.makeNewWindow(mContext);
         mWindow = w;
         w.setCallback(this);
diff --git a/core/java/android/app/IActivityManager.java b/core/java/android/app/IActivityManager.java
index 31f0a63..20c9a80 100644
--- a/core/java/android/app/IActivityManager.java
+++ b/core/java/android/app/IActivityManager.java
@@ -247,8 +247,6 @@
     
     public boolean killPids(int[] pids, String reason) throws RemoteException;
     
-    public void reportPss(IApplicationThread caller, int pss) throws RemoteException;
-    
     // Special low-level communication with activity manager.
     public void startRunning(String pkg, String cls, String action,
             String data) throws RemoteException;
@@ -256,7 +254,14 @@
             ApplicationErrorReport.CrashInfo crashInfo) throws RemoteException;
     public boolean handleApplicationWtf(IBinder app, String tag,
             ApplicationErrorReport.CrashInfo crashInfo) throws RemoteException;
-    
+
+    // A StrictMode violation to be handled.  The violationMask is a
+    // subset of the original StrictMode policy bitmask, with only the
+    // bit violated and penalty bits to be executed by the
+    // ActivityManagerService remaining set.
+    public void handleApplicationStrictModeViolation(IBinder app, int violationMask,
+            ApplicationErrorReport.CrashInfo crashInfo) throws RemoteException;
+
     /*
      * This will deliver the specified signal to all the persistent processes. Currently only 
      * SIGUSR1 is delivered. All others are ignored.
@@ -303,6 +308,15 @@
     
     public boolean isUserAMonkey() throws RemoteException;
     
+    public void finishHeavyWeightApp() throws RemoteException;
+
+    public void setImmersive(IBinder token, boolean immersive) throws RemoteException;
+    public boolean isImmersive(IBinder token) throws RemoteException;
+    public boolean isTopActivityImmersive() throws RemoteException;
+    
+    public void crashApplication(int uid, int initialPid, String packageName,
+            String message) throws RemoteException;
+    
     /*
      * Private non-Binder interfaces
      */
@@ -486,7 +500,7 @@
     int FORCE_STOP_PACKAGE_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+78;
     int KILL_PIDS_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+79;
     int GET_SERVICES_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+80;
-    int REPORT_PSS_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+81;
+
     int GET_RUNNING_APP_PROCESSES_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+82;
     int GET_DEVICE_CONFIGURATION_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+83;
     int PEEK_SERVICE_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+84;
@@ -513,4 +527,10 @@
     int WILL_ACTIVITY_BE_VISIBLE_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+105;
     int START_ACTIVITY_WITH_CONFIG_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+106;
     int GET_RUNNING_EXTERNAL_APPLICATIONS_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+107;
+    int FINISH_HEAVY_WEIGHT_APP_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+108;
+    int HANDLE_APPLICATION_STRICT_MODE_VIOLATION_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+109;
+    int IS_IMMERSIVE_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+110;
+    int SET_IMMERSIVE_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+111;
+    int IS_TOP_ACTIVITY_IMMERSIVE_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+112;
+    int CRASH_APPLICATION_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+113;
 }
diff --git a/core/java/android/app/IApplicationThread.java b/core/java/android/app/IApplicationThread.java
index c917e81..c8ef17f 100644
--- a/core/java/android/app/IApplicationThread.java
+++ b/core/java/android/app/IApplicationThread.java
@@ -95,7 +95,6 @@
             throws RemoteException;
     void scheduleLowMemory() throws RemoteException;
     void scheduleActivityConfigurationChanged(IBinder token) throws RemoteException;
-    void requestPss() throws RemoteException;
     void profilerControl(boolean start, String path, ParcelFileDescriptor fd)
             throws RemoteException;
     void setSchedulingGroup(int group) throws RemoteException;
@@ -103,6 +102,7 @@
     static final int PACKAGE_REMOVED = 0;
     static final int EXTERNAL_STORAGE_UNAVAILABLE = 1;
     void dispatchPackageBroadcast(int cmd, String[] packages) throws RemoteException;
+    void scheduleCrash(String msg) throws RemoteException;
     
     String descriptor = "android.app.IApplicationThread";
 
@@ -131,7 +131,7 @@
     int SCHEDULE_LOW_MEMORY_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+23;
     int SCHEDULE_ACTIVITY_CONFIGURATION_CHANGED_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+24;
     int SCHEDULE_RELAUNCH_ACTIVITY_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+25;
-    int REQUEST_PSS_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+26;
+
     int PROFILER_CONTROL_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+27;
     int SET_SCHEDULING_GROUP_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+28;
     int SCHEDULE_CREATE_BACKUP_AGENT_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+29;
@@ -139,4 +139,5 @@
     int GET_MEMORY_INFO_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+31;
     int SCHEDULE_SUICIDE_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+32;
     int DISPATCH_PACKAGE_BROADCAST_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+33;
+    int SCHEDULE_CRASH_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+34;
 }
diff --git a/core/java/android/app/IStatusBar.aidl b/core/java/android/app/IStatusBar.aidl
deleted file mode 100644
index c64fa50..0000000
--- a/core/java/android/app/IStatusBar.aidl
+++ /dev/null
@@ -1,29 +0,0 @@
-/**
- * Copyright (c) 2007, The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License"); 
- * you may not use this file except in compliance with the License. 
- * You may obtain a copy of the License at 
- *
- *     http://www.apache.org/licenses/LICENSE-2.0 
- *
- * Unless required by applicable law or agreed to in writing, software 
- * distributed under the License is distributed on an "AS IS" BASIS, 
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 
- * See the License for the specific language governing permissions and 
- * limitations under the License.
- */
- 
-package android.app;
-
-/** @hide */
-interface IStatusBar
-{
-    void activate();
-    void deactivate();
-    void toggle();
-    void disable(int what, IBinder token, String pkg);
-    IBinder addIcon(String slot, String iconPackage, int iconId, int iconLevel);
-    void updateIcon(IBinder key, String slot, String iconPackage, int iconId, int iconLevel);
-    void removeIcon(IBinder key);
-}
diff --git a/core/java/android/app/ListActivity.java b/core/java/android/app/ListActivity.java
index 84a57b5..4bf5518 100644
--- a/core/java/android/app/ListActivity.java
+++ b/core/java/android/app/ListActivity.java
@@ -18,9 +18,7 @@
 
 import android.os.Bundle;
 import android.os.Handler;
-import android.view.KeyEvent;
 import android.view.View;
-import android.widget.Adapter;
 import android.widget.AdapterView;
 import android.widget.ListAdapter;
 import android.widget.ListView;
@@ -68,7 +66,7 @@
  *               android:layout_weight=&quot;1&quot;
  *               android:drawSelectorOnTop=&quot;false&quot;/&gt;
  *
- *     &lt;TextView id=&quot;@id/android:empty&quot;
+ *     &lt;TextView android:id=&quot;@id/android:empty&quot;
  *               android:layout_width=&quot;match_parent&quot;
  *               android:layout_height=&quot;match_parent&quot;
  *               android:background=&quot;#FF0000&quot;
@@ -316,7 +314,7 @@
     }
 
     private AdapterView.OnItemClickListener mOnClickListener = new AdapterView.OnItemClickListener() {
-        public void onItemClick(AdapterView parent, View v, int position, long id)
+        public void onItemClick(AdapterView<?> parent, View v, int position, long id)
         {
             onListItemClick((ListView)parent, v, position, id);
         }
diff --git a/core/java/android/app/LoadedApk.java b/core/java/android/app/LoadedApk.java
new file mode 100644
index 0000000..0f98152
--- /dev/null
+++ b/core/java/android/app/LoadedApk.java
@@ -0,0 +1,1103 @@
+/*
+ * Copyright (C) 2010 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package android.app;
+
+import com.android.internal.util.ArrayUtils;
+
+import android.content.BroadcastReceiver;
+import android.content.ComponentName;
+import android.content.Context;
+import android.content.IIntentReceiver;
+import android.content.Intent;
+import android.content.ServiceConnection;
+import android.content.pm.ApplicationInfo;
+import android.content.pm.IPackageManager;
+import android.content.pm.PackageManager;
+import android.content.res.AssetManager;
+import android.content.res.CompatibilityInfo;
+import android.content.res.Resources;
+import android.os.Bundle;
+import android.os.Handler;
+import android.os.IBinder;
+import android.os.Process;
+import android.os.RemoteException;
+import android.util.AndroidRuntimeException;
+import android.util.Slog;
+
+import java.io.File;
+import java.io.IOException;
+import java.io.InputStream;
+import java.lang.ref.WeakReference;
+import java.net.URL;
+import java.util.Enumeration;
+import java.util.HashMap;
+import java.util.Iterator;
+
+final class IntentReceiverLeaked extends AndroidRuntimeException {
+    public IntentReceiverLeaked(String msg) {
+        super(msg);
+    }
+}
+
+final class ServiceConnectionLeaked extends AndroidRuntimeException {
+    public ServiceConnectionLeaked(String msg) {
+        super(msg);
+    }
+}
+
+/**
+ * Local state maintained about a currently loaded .apk.
+ * @hide
+ */
+final class LoadedApk {
+
+    private final ActivityThread mActivityThread;
+    private final ApplicationInfo mApplicationInfo;
+    final String mPackageName;
+    private final String mAppDir;
+    private final String mResDir;
+    private final String[] mSharedLibraries;
+    private final String mDataDir;
+    private final File mDataDirFile;
+    private final ClassLoader mBaseClassLoader;
+    private final boolean mSecurityViolation;
+    private final boolean mIncludeCode;
+    Resources mResources;
+    private ClassLoader mClassLoader;
+    private Application mApplication;
+    CompatibilityInfo mCompatibilityInfo;
+
+    private final HashMap<Context, HashMap<BroadcastReceiver, LoadedApk.ReceiverDispatcher>> mReceivers
+        = new HashMap<Context, HashMap<BroadcastReceiver, LoadedApk.ReceiverDispatcher>>();
+    private final HashMap<Context, HashMap<BroadcastReceiver, LoadedApk.ReceiverDispatcher>> mUnregisteredReceivers
+    = new HashMap<Context, HashMap<BroadcastReceiver, LoadedApk.ReceiverDispatcher>>();
+    private final HashMap<Context, HashMap<ServiceConnection, LoadedApk.ServiceDispatcher>> mServices
+        = new HashMap<Context, HashMap<ServiceConnection, LoadedApk.ServiceDispatcher>>();
+    private final HashMap<Context, HashMap<ServiceConnection, LoadedApk.ServiceDispatcher>> mUnboundServices
+        = new HashMap<Context, HashMap<ServiceConnection, LoadedApk.ServiceDispatcher>>();
+
+    int mClientCount = 0;
+
+    Application getApplication() {
+        return mApplication;
+    }
+
+    public LoadedApk(ActivityThread activityThread, ApplicationInfo aInfo,
+            ActivityThread mainThread, ClassLoader baseLoader,
+            boolean securityViolation, boolean includeCode) {
+        mActivityThread = activityThread;
+        mApplicationInfo = aInfo;
+        mPackageName = aInfo.packageName;
+        mAppDir = aInfo.sourceDir;
+        mResDir = aInfo.uid == Process.myUid() ? aInfo.sourceDir
+                : aInfo.publicSourceDir;
+        mSharedLibraries = aInfo.sharedLibraryFiles;
+        mDataDir = aInfo.dataDir;
+        mDataDirFile = mDataDir != null ? new File(mDataDir) : null;
+        mBaseClassLoader = baseLoader;
+        mSecurityViolation = securityViolation;
+        mIncludeCode = includeCode;
+        mCompatibilityInfo = new CompatibilityInfo(aInfo);
+
+        if (mAppDir == null) {
+            if (ActivityThread.mSystemContext == null) {
+                ActivityThread.mSystemContext =
+                    ContextImpl.createSystemContext(mainThread);
+                ActivityThread.mSystemContext.getResources().updateConfiguration(
+                         mainThread.getConfiguration(),
+                         mainThread.getDisplayMetricsLocked(false));
+                //Slog.i(TAG, "Created system resources "
+                //        + mSystemContext.getResources() + ": "
+                //        + mSystemContext.getResources().getConfiguration());
+            }
+            mClassLoader = ActivityThread.mSystemContext.getClassLoader();
+            mResources = ActivityThread.mSystemContext.getResources();
+        }
+    }
+
+    public LoadedApk(ActivityThread activityThread, String name,
+            Context systemContext, ApplicationInfo info) {
+        mActivityThread = activityThread;
+        mApplicationInfo = info != null ? info : new ApplicationInfo();
+        mApplicationInfo.packageName = name;
+        mPackageName = name;
+        mAppDir = null;
+        mResDir = null;
+        mSharedLibraries = null;
+        mDataDir = null;
+        mDataDirFile = null;
+        mBaseClassLoader = null;
+        mSecurityViolation = false;
+        mIncludeCode = true;
+        mClassLoader = systemContext.getClassLoader();
+        mResources = systemContext.getResources();
+        mCompatibilityInfo = new CompatibilityInfo(mApplicationInfo);
+    }
+
+    public String getPackageName() {
+        return mPackageName;
+    }
+
+    public ApplicationInfo getApplicationInfo() {
+        return mApplicationInfo;
+    }
+
+    public boolean isSecurityViolation() {
+        return mSecurityViolation;
+    }
+
+    /**
+     * Gets the array of shared libraries that are listed as
+     * used by the given package.
+     *
+     * @param packageName the name of the package (note: not its
+     * file name)
+     * @return null-ok; the array of shared libraries, each one
+     * a fully-qualified path
+     */
+    private static String[] getLibrariesFor(String packageName) {
+        ApplicationInfo ai = null;
+        try {
+            ai = ActivityThread.getPackageManager().getApplicationInfo(packageName,
+                    PackageManager.GET_SHARED_LIBRARY_FILES);
+        } catch (RemoteException e) {
+            throw new AssertionError(e);
+        }
+
+        if (ai == null) {
+            return null;
+        }
+
+        return ai.sharedLibraryFiles;
+    }
+
+    /**
+     * Combines two arrays (of library names) such that they are
+     * concatenated in order but are devoid of duplicates. The
+     * result is a single string with the names of the libraries
+     * separated by colons, or <code>null</code> if both lists
+     * were <code>null</code> or empty.
+     *
+     * @param list1 null-ok; the first list
+     * @param list2 null-ok; the second list
+     * @return null-ok; the combination
+     */
+    private static String combineLibs(String[] list1, String[] list2) {
+        StringBuilder result = new StringBuilder(300);
+        boolean first = true;
+
+        if (list1 != null) {
+            for (String s : list1) {
+                if (first) {
+                    first = false;
+                } else {
+                    result.append(':');
+                }
+                result.append(s);
+            }
+        }
+
+        // Only need to check for duplicates if list1 was non-empty.
+        boolean dupCheck = !first;
+
+        if (list2 != null) {
+            for (String s : list2) {
+                if (dupCheck && ArrayUtils.contains(list1, s)) {
+                    continue;
+                }
+
+                if (first) {
+                    first = false;
+                } else {
+                    result.append(':');
+                }
+                result.append(s);
+            }
+        }
+
+        return result.toString();
+    }
+
+    public ClassLoader getClassLoader() {
+        synchronized (this) {
+            if (mClassLoader != null) {
+                return mClassLoader;
+            }
+
+            if (mIncludeCode && !mPackageName.equals("android")) {
+                String zip = mAppDir;
+
+                /*
+                 * The following is a bit of a hack to inject
+                 * instrumentation into the system: If the app
+                 * being started matches one of the instrumentation names,
+                 * then we combine both the "instrumentation" and
+                 * "instrumented" app into the path, along with the
+                 * concatenation of both apps' shared library lists.
+                 */
+
+                String instrumentationAppDir =
+                        mActivityThread.mInstrumentationAppDir;
+                String instrumentationAppPackage =
+                        mActivityThread.mInstrumentationAppPackage;
+                String instrumentedAppDir =
+                        mActivityThread.mInstrumentedAppDir;
+                String[] instrumentationLibs = null;
+
+                if (mAppDir.equals(instrumentationAppDir)
+                        || mAppDir.equals(instrumentedAppDir)) {
+                    zip = instrumentationAppDir + ":" + instrumentedAppDir;
+                    if (! instrumentedAppDir.equals(instrumentationAppDir)) {
+                        instrumentationLibs =
+                            getLibrariesFor(instrumentationAppPackage);
+                    }
+                }
+
+                if ((mSharedLibraries != null) ||
+                        (instrumentationLibs != null)) {
+                    zip =
+                        combineLibs(mSharedLibraries, instrumentationLibs)
+                        + ':' + zip;
+                }
+
+                /*
+                 * With all the combination done (if necessary, actually
+                 * create the class loader.
+                 */
+
+                if (ActivityThread.localLOGV) Slog.v(ActivityThread.TAG, "Class path: " + zip);
+
+                mClassLoader =
+                    ApplicationLoaders.getDefault().getClassLoader(
+                        zip, mDataDir, mBaseClassLoader);
+                initializeJavaContextClassLoader();
+            } else {
+                if (mBaseClassLoader == null) {
+                    mClassLoader = ClassLoader.getSystemClassLoader();
+                } else {
+                    mClassLoader = mBaseClassLoader;
+                }
+            }
+            return mClassLoader;
+        }
+    }
+
+    /**
+     * Setup value for Thread.getContextClassLoader(). If the
+     * package will not run in in a VM with other packages, we set
+     * the Java context ClassLoader to the
+     * PackageInfo.getClassLoader value. However, if this VM can
+     * contain multiple packages, we intead set the Java context
+     * ClassLoader to a proxy that will warn about the use of Java
+     * context ClassLoaders and then fall through to use the
+     * system ClassLoader.
+     *
+     * <p> Note that this is similar to but not the same as the
+     * android.content.Context.getClassLoader(). While both
+     * context class loaders are typically set to the
+     * PathClassLoader used to load the package archive in the
+     * single application per VM case, a single Android process
+     * may contain several Contexts executing on one thread with
+     * their own logical ClassLoaders while the Java context
+     * ClassLoader is a thread local. This is why in the case when
+     * we have multiple packages per VM we do not set the Java
+     * context ClassLoader to an arbitrary but instead warn the
+     * user to set their own if we detect that they are using a
+     * Java library that expects it to be set.
+     */
+    private void initializeJavaContextClassLoader() {
+        IPackageManager pm = ActivityThread.getPackageManager();
+        android.content.pm.PackageInfo pi;
+        try {
+            pi = pm.getPackageInfo(mPackageName, 0);
+        } catch (RemoteException e) {
+            throw new AssertionError(e);
+        }
+        /*
+         * Two possible indications that this package could be
+         * sharing its virtual machine with other packages:
+         *
+         * 1.) the sharedUserId attribute is set in the manifest,
+         *     indicating a request to share a VM with other
+         *     packages with the same sharedUserId.
+         *
+         * 2.) the application element of the manifest has an
+         *     attribute specifying a non-default process name,
+         *     indicating the desire to run in another packages VM.
+         */
+        boolean sharedUserIdSet = (pi.sharedUserId != null);
+        boolean processNameNotDefault =
+            (pi.applicationInfo != null &&
+             !mPackageName.equals(pi.applicationInfo.processName));
+        boolean sharable = (sharedUserIdSet || processNameNotDefault);
+        ClassLoader contextClassLoader =
+            (sharable)
+            ? new WarningContextClassLoader()
+            : mClassLoader;
+        Thread.currentThread().setContextClassLoader(contextClassLoader);
+    }
+
+    private static class WarningContextClassLoader extends ClassLoader {
+
+        private static boolean warned = false;
+
+        private void warn(String methodName) {
+            if (warned) {
+                return;
+            }
+            warned = true;
+            Thread.currentThread().setContextClassLoader(getParent());
+            Slog.w(ActivityThread.TAG, "ClassLoader." + methodName + ": " +
+                  "The class loader returned by " +
+                  "Thread.getContextClassLoader() may fail for processes " +
+                  "that host multiple applications. You should explicitly " +
+                  "specify a context class loader. For example: " +
+                  "Thread.setContextClassLoader(getClass().getClassLoader());");
+        }
+
+        @Override public URL getResource(String resName) {
+            warn("getResource");
+            return getParent().getResource(resName);
+        }
+
+        @Override public Enumeration<URL> getResources(String resName) throws IOException {
+            warn("getResources");
+            return getParent().getResources(resName);
+        }
+
+        @Override public InputStream getResourceAsStream(String resName) {
+            warn("getResourceAsStream");
+            return getParent().getResourceAsStream(resName);
+        }
+
+        @Override public Class<?> loadClass(String className) throws ClassNotFoundException {
+            warn("loadClass");
+            return getParent().loadClass(className);
+        }
+
+        @Override public void setClassAssertionStatus(String cname, boolean enable) {
+            warn("setClassAssertionStatus");
+            getParent().setClassAssertionStatus(cname, enable);
+        }
+
+        @Override public void setPackageAssertionStatus(String pname, boolean enable) {
+            warn("setPackageAssertionStatus");
+            getParent().setPackageAssertionStatus(pname, enable);
+        }
+
+        @Override public void setDefaultAssertionStatus(boolean enable) {
+            warn("setDefaultAssertionStatus");
+            getParent().setDefaultAssertionStatus(enable);
+        }
+
+        @Override public void clearAssertionStatus() {
+            warn("clearAssertionStatus");
+            getParent().clearAssertionStatus();
+        }
+    }
+
+    public String getAppDir() {
+        return mAppDir;
+    }
+
+    public String getResDir() {
+        return mResDir;
+    }
+
+    public String getDataDir() {
+        return mDataDir;
+    }
+
+    public File getDataDirFile() {
+        return mDataDirFile;
+    }
+
+    public AssetManager getAssets(ActivityThread mainThread) {
+        return getResources(mainThread).getAssets();
+    }
+
+    public Resources getResources(ActivityThread mainThread) {
+        if (mResources == null) {
+            mResources = mainThread.getTopLevelResources(mResDir, this);
+        }
+        return mResources;
+    }
+
+    public Application makeApplication(boolean forceDefaultAppClass,
+            Instrumentation instrumentation) {
+        if (mApplication != null) {
+            return mApplication;
+        }
+
+        Application app = null;
+
+        String appClass = mApplicationInfo.className;
+        if (forceDefaultAppClass || (appClass == null)) {
+            appClass = "android.app.Application";
+        }
+
+        try {
+            java.lang.ClassLoader cl = getClassLoader();
+            ContextImpl appContext = new ContextImpl();
+            appContext.init(this, null, mActivityThread);
+            app = mActivityThread.mInstrumentation.newApplication(
+                    cl, appClass, appContext);
+            appContext.setOuterContext(app);
+        } catch (Exception e) {
+            if (!mActivityThread.mInstrumentation.onException(app, e)) {
+                throw new RuntimeException(
+                    "Unable to instantiate application " + appClass
+                    + ": " + e.toString(), e);
+            }
+        }
+        mActivityThread.mAllApplications.add(app);
+        mApplication = app;
+
+        if (instrumentation != null) {
+            try {
+                instrumentation.callApplicationOnCreate(app);
+            } catch (Exception e) {
+                if (!instrumentation.onException(app, e)) {
+                    throw new RuntimeException(
+                        "Unable to create application " + app.getClass().getName()
+                        + ": " + e.toString(), e);
+                }
+            }
+        }
+        
+        return app;
+    }
+
+    public void removeContextRegistrations(Context context,
+            String who, String what) {
+        HashMap<BroadcastReceiver, LoadedApk.ReceiverDispatcher> rmap =
+            mReceivers.remove(context);
+        if (rmap != null) {
+            Iterator<LoadedApk.ReceiverDispatcher> it = rmap.values().iterator();
+            while (it.hasNext()) {
+                LoadedApk.ReceiverDispatcher rd = it.next();
+                IntentReceiverLeaked leak = new IntentReceiverLeaked(
+                        what + " " + who + " has leaked IntentReceiver "
+                        + rd.getIntentReceiver() + " that was " +
+                        "originally registered here. Are you missing a " +
+                        "call to unregisterReceiver()?");
+                leak.setStackTrace(rd.getLocation().getStackTrace());
+                Slog.e(ActivityThread.TAG, leak.getMessage(), leak);
+                try {
+                    ActivityManagerNative.getDefault().unregisterReceiver(
+                            rd.getIIntentReceiver());
+                } catch (RemoteException e) {
+                    // system crashed, nothing we can do
+                }
+            }
+        }
+        mUnregisteredReceivers.remove(context);
+        //Slog.i(TAG, "Receiver registrations: " + mReceivers);
+        HashMap<ServiceConnection, LoadedApk.ServiceDispatcher> smap =
+            mServices.remove(context);
+        if (smap != null) {
+            Iterator<LoadedApk.ServiceDispatcher> it = smap.values().iterator();
+            while (it.hasNext()) {
+                LoadedApk.ServiceDispatcher sd = it.next();
+                ServiceConnectionLeaked leak = new ServiceConnectionLeaked(
+                        what + " " + who + " has leaked ServiceConnection "
+                        + sd.getServiceConnection() + " that was originally bound here");
+                leak.setStackTrace(sd.getLocation().getStackTrace());
+                Slog.e(ActivityThread.TAG, leak.getMessage(), leak);
+                try {
+                    ActivityManagerNative.getDefault().unbindService(
+                            sd.getIServiceConnection());
+                } catch (RemoteException e) {
+                    // system crashed, nothing we can do
+                }
+                sd.doForget();
+            }
+        }
+        mUnboundServices.remove(context);
+        //Slog.i(TAG, "Service registrations: " + mServices);
+    }
+
+    public IIntentReceiver getReceiverDispatcher(BroadcastReceiver r,
+            Context context, Handler handler,
+            Instrumentation instrumentation, boolean registered) {
+        synchronized (mReceivers) {
+            LoadedApk.ReceiverDispatcher rd = null;
+            HashMap<BroadcastReceiver, LoadedApk.ReceiverDispatcher> map = null;
+            if (registered) {
+                map = mReceivers.get(context);
+                if (map != null) {
+                    rd = map.get(r);
+                }
+            }
+            if (rd == null) {
+                rd = new ReceiverDispatcher(r, context, handler,
+                        instrumentation, registered);
+                if (registered) {
+                    if (map == null) {
+                        map = new HashMap<BroadcastReceiver, LoadedApk.ReceiverDispatcher>();
+                        mReceivers.put(context, map);
+                    }
+                    map.put(r, rd);
+                }
+            } else {
+                rd.validate(context, handler);
+            }
+            return rd.getIIntentReceiver();
+        }
+    }
+
+    public IIntentReceiver forgetReceiverDispatcher(Context context,
+            BroadcastReceiver r) {
+        synchronized (mReceivers) {
+            HashMap<BroadcastReceiver, LoadedApk.ReceiverDispatcher> map = mReceivers.get(context);
+            LoadedApk.ReceiverDispatcher rd = null;
+            if (map != null) {
+                rd = map.get(r);
+                if (rd != null) {
+                    map.remove(r);
+                    if (map.size() == 0) {
+                        mReceivers.remove(context);
+                    }
+                    if (r.getDebugUnregister()) {
+                        HashMap<BroadcastReceiver, LoadedApk.ReceiverDispatcher> holder
+                                = mUnregisteredReceivers.get(context);
+                        if (holder == null) {
+                            holder = new HashMap<BroadcastReceiver, LoadedApk.ReceiverDispatcher>();
+                            mUnregisteredReceivers.put(context, holder);
+                        }
+                        RuntimeException ex = new IllegalArgumentException(
+                                "Originally unregistered here:");
+                        ex.fillInStackTrace();
+                        rd.setUnregisterLocation(ex);
+                        holder.put(r, rd);
+                    }
+                    return rd.getIIntentReceiver();
+                }
+            }
+            HashMap<BroadcastReceiver, LoadedApk.ReceiverDispatcher> holder
+                    = mUnregisteredReceivers.get(context);
+            if (holder != null) {
+                rd = holder.get(r);
+                if (rd != null) {
+                    RuntimeException ex = rd.getUnregisterLocation();
+                    throw new IllegalArgumentException(
+                            "Unregistering Receiver " + r
+                            + " that was already unregistered", ex);
+                }
+            }
+            if (context == null) {
+                throw new IllegalStateException("Unbinding Receiver " + r
+                        + " from Context that is no longer in use: " + context);
+            } else {
+                throw new IllegalArgumentException("Receiver not registered: " + r);
+            }
+
+        }
+    }
+
+    static final class ReceiverDispatcher {
+
+        final static class InnerReceiver extends IIntentReceiver.Stub {
+            final WeakReference<LoadedApk.ReceiverDispatcher> mDispatcher;
+            final LoadedApk.ReceiverDispatcher mStrongRef;
+
+            InnerReceiver(LoadedApk.ReceiverDispatcher rd, boolean strong) {
+                mDispatcher = new WeakReference<LoadedApk.ReceiverDispatcher>(rd);
+                mStrongRef = strong ? rd : null;
+            }
+            public void performReceive(Intent intent, int resultCode,
+                    String data, Bundle extras, boolean ordered, boolean sticky) {
+                LoadedApk.ReceiverDispatcher rd = mDispatcher.get();
+                if (ActivityThread.DEBUG_BROADCAST) {
+                    int seq = intent.getIntExtra("seq", -1);
+                    Slog.i(ActivityThread.TAG, "Receiving broadcast " + intent.getAction() + " seq=" + seq
+                            + " to " + (rd != null ? rd.mReceiver : null));
+                }
+                if (rd != null) {
+                    rd.performReceive(intent, resultCode, data, extras,
+                            ordered, sticky);
+                } else {
+                    // The activity manager dispatched a broadcast to a registered
+                    // receiver in this process, but before it could be delivered the
+                    // receiver was unregistered.  Acknowledge the broadcast on its
+                    // behalf so that the system's broadcast sequence can continue.
+                    if (ActivityThread.DEBUG_BROADCAST) Slog.i(ActivityThread.TAG,
+                            "Finishing broadcast to unregistered receiver");
+                    IActivityManager mgr = ActivityManagerNative.getDefault();
+                    try {
+                        mgr.finishReceiver(this, resultCode, data, extras, false);
+                    } catch (RemoteException e) {
+                        Slog.w(ActivityThread.TAG, "Couldn't finish broadcast to unregistered receiver");
+                    }
+                }
+            }
+        }
+
+        final IIntentReceiver.Stub mIIntentReceiver;
+        final BroadcastReceiver mReceiver;
+        final Context mContext;
+        final Handler mActivityThread;
+        final Instrumentation mInstrumentation;
+        final boolean mRegistered;
+        final IntentReceiverLeaked mLocation;
+        RuntimeException mUnregisterLocation;
+
+        final class Args implements Runnable {
+            private Intent mCurIntent;
+            private int mCurCode;
+            private String mCurData;
+            private Bundle mCurMap;
+            private boolean mCurOrdered;
+            private boolean mCurSticky;
+
+            public void run() {
+                BroadcastReceiver receiver = mReceiver;
+                if (ActivityThread.DEBUG_BROADCAST) {
+                    int seq = mCurIntent.getIntExtra("seq", -1);
+                    Slog.i(ActivityThread.TAG, "Dispatching broadcast " + mCurIntent.getAction()
+                            + " seq=" + seq + " to " + mReceiver);
+                    Slog.i(ActivityThread.TAG, "  mRegistered=" + mRegistered
+                            + " mCurOrdered=" + mCurOrdered);
+                }
+                
+                IActivityManager mgr = ActivityManagerNative.getDefault();
+                Intent intent = mCurIntent;
+                mCurIntent = null;
+                
+                if (receiver == null) {
+                    if (mRegistered && mCurOrdered) {
+                        try {
+                            if (ActivityThread.DEBUG_BROADCAST) Slog.i(ActivityThread.TAG,
+                                    "Finishing null broadcast to " + mReceiver);
+                            mgr.finishReceiver(mIIntentReceiver,
+                                    mCurCode, mCurData, mCurMap, false);
+                        } catch (RemoteException ex) {
+                        }
+                    }
+                    return;
+                }
+
+                try {
+                    ClassLoader cl =  mReceiver.getClass().getClassLoader();
+                    intent.setExtrasClassLoader(cl);
+                    if (mCurMap != null) {
+                        mCurMap.setClassLoader(cl);
+                    }
+                    receiver.setOrderedHint(true);
+                    receiver.setResult(mCurCode, mCurData, mCurMap);
+                    receiver.clearAbortBroadcast();
+                    receiver.setOrderedHint(mCurOrdered);
+                    receiver.setInitialStickyHint(mCurSticky);
+                    receiver.onReceive(mContext, intent);
+                } catch (Exception e) {
+                    if (mRegistered && mCurOrdered) {
+                        try {
+                            if (ActivityThread.DEBUG_BROADCAST) Slog.i(ActivityThread.TAG,
+                                    "Finishing failed broadcast to " + mReceiver);
+                            mgr.finishReceiver(mIIntentReceiver,
+                                    mCurCode, mCurData, mCurMap, false);
+                        } catch (RemoteException ex) {
+                        }
+                    }
+                    if (mInstrumentation == null ||
+                            !mInstrumentation.onException(mReceiver, e)) {
+                        throw new RuntimeException(
+                            "Error receiving broadcast " + intent
+                            + " in " + mReceiver, e);
+                    }
+                }
+                if (mRegistered && mCurOrdered) {
+                    try {
+                        if (ActivityThread.DEBUG_BROADCAST) Slog.i(ActivityThread.TAG,
+                                "Finishing broadcast to " + mReceiver);
+                        mgr.finishReceiver(mIIntentReceiver,
+                                receiver.getResultCode(),
+                                receiver.getResultData(),
+                                receiver.getResultExtras(false),
+                                receiver.getAbortBroadcast());
+                    } catch (RemoteException ex) {
+                    }
+                }
+            }
+        }
+
+        ReceiverDispatcher(BroadcastReceiver receiver, Context context,
+                Handler activityThread, Instrumentation instrumentation,
+                boolean registered) {
+            if (activityThread == null) {
+                throw new NullPointerException("Handler must not be null");
+            }
+
+            mIIntentReceiver = new InnerReceiver(this, !registered);
+            mReceiver = receiver;
+            mContext = context;
+            mActivityThread = activityThread;
+            mInstrumentation = instrumentation;
+            mRegistered = registered;
+            mLocation = new IntentReceiverLeaked(null);
+            mLocation.fillInStackTrace();
+        }
+
+        void validate(Context context, Handler activityThread) {
+            if (mContext != context) {
+                throw new IllegalStateException(
+                    "Receiver " + mReceiver +
+                    " registered with differing Context (was " +
+                    mContext + " now " + context + ")");
+            }
+            if (mActivityThread != activityThread) {
+                throw new IllegalStateException(
+                    "Receiver " + mReceiver +
+                    " registered with differing handler (was " +
+                    mActivityThread + " now " + activityThread + ")");
+            }
+        }
+
+        IntentReceiverLeaked getLocation() {
+            return mLocation;
+        }
+
+        BroadcastReceiver getIntentReceiver() {
+            return mReceiver;
+        }
+
+        IIntentReceiver getIIntentReceiver() {
+            return mIIntentReceiver;
+        }
+
+        void setUnregisterLocation(RuntimeException ex) {
+            mUnregisterLocation = ex;
+        }
+
+        RuntimeException getUnregisterLocation() {
+            return mUnregisterLocation;
+        }
+
+        public void performReceive(Intent intent, int resultCode,
+                String data, Bundle extras, boolean ordered, boolean sticky) {
+            if (ActivityThread.DEBUG_BROADCAST) {
+                int seq = intent.getIntExtra("seq", -1);
+                Slog.i(ActivityThread.TAG, "Enqueueing broadcast " + intent.getAction() + " seq=" + seq
+                        + " to " + mReceiver);
+            }
+            Args args = new Args();
+            args.mCurIntent = intent;
+            args.mCurCode = resultCode;
+            args.mCurData = data;
+            args.mCurMap = extras;
+            args.mCurOrdered = ordered;
+            args.mCurSticky = sticky;
+            if (!mActivityThread.post(args)) {
+                if (mRegistered && ordered) {
+                    IActivityManager mgr = ActivityManagerNative.getDefault();
+                    try {
+                        if (ActivityThread.DEBUG_BROADCAST) Slog.i(ActivityThread.TAG,
+                                "Finishing sync broadcast to " + mReceiver);
+                        mgr.finishReceiver(mIIntentReceiver, args.mCurCode,
+                                args.mCurData, args.mCurMap, false);
+                    } catch (RemoteException ex) {
+                    }
+                }
+            }
+        }
+
+    }
+
+    public final IServiceConnection getServiceDispatcher(ServiceConnection c,
+            Context context, Handler handler, int flags) {
+        synchronized (mServices) {
+            LoadedApk.ServiceDispatcher sd = null;
+            HashMap<ServiceConnection, LoadedApk.ServiceDispatcher> map = mServices.get(context);
+            if (map != null) {
+                sd = map.get(c);
+            }
+            if (sd == null) {
+                sd = new ServiceDispatcher(c, context, handler, flags);
+                if (map == null) {
+                    map = new HashMap<ServiceConnection, LoadedApk.ServiceDispatcher>();
+                    mServices.put(context, map);
+                }
+                map.put(c, sd);
+            } else {
+                sd.validate(context, handler);
+            }
+            return sd.getIServiceConnection();
+        }
+    }
+
+    public final IServiceConnection forgetServiceDispatcher(Context context,
+            ServiceConnection c) {
+        synchronized (mServices) {
+            HashMap<ServiceConnection, LoadedApk.ServiceDispatcher> map
+                    = mServices.get(context);
+            LoadedApk.ServiceDispatcher sd = null;
+            if (map != null) {
+                sd = map.get(c);
+                if (sd != null) {
+                    map.remove(c);
+                    sd.doForget();
+                    if (map.size() == 0) {
+                        mServices.remove(context);
+                    }
+                    if ((sd.getFlags()&Context.BIND_DEBUG_UNBIND) != 0) {
+                        HashMap<ServiceConnection, LoadedApk.ServiceDispatcher> holder
+                                = mUnboundServices.get(context);
+                        if (holder == null) {
+                            holder = new HashMap<ServiceConnection, LoadedApk.ServiceDispatcher>();
+                            mUnboundServices.put(context, holder);
+                        }
+                        RuntimeException ex = new IllegalArgumentException(
+                                "Originally unbound here:");
+                        ex.fillInStackTrace();
+                        sd.setUnbindLocation(ex);
+                        holder.put(c, sd);
+                    }
+                    return sd.getIServiceConnection();
+                }
+            }
+            HashMap<ServiceConnection, LoadedApk.ServiceDispatcher> holder
+                    = mUnboundServices.get(context);
+            if (holder != null) {
+                sd = holder.get(c);
+                if (sd != null) {
+                    RuntimeException ex = sd.getUnbindLocation();
+                    throw new IllegalArgumentException(
+                            "Unbinding Service " + c
+                            + " that was already unbound", ex);
+                }
+            }
+            if (context == null) {
+                throw new IllegalStateException("Unbinding Service " + c
+                        + " from Context that is no longer in use: " + context);
+            } else {
+                throw new IllegalArgumentException("Service not registered: " + c);
+            }
+        }
+    }
+
+    static final class ServiceDispatcher {
+        private final ServiceDispatcher.InnerConnection mIServiceConnection;
+        private final ServiceConnection mConnection;
+        private final Context mContext;
+        private final Handler mActivityThread;
+        private final ServiceConnectionLeaked mLocation;
+        private final int mFlags;
+
+        private RuntimeException mUnbindLocation;
+
+        private boolean mDied;
+
+        private static class ConnectionInfo {
+            IBinder binder;
+            IBinder.DeathRecipient deathMonitor;
+        }
+
+        private static class InnerConnection extends IServiceConnection.Stub {
+            final WeakReference<LoadedApk.ServiceDispatcher> mDispatcher;
+
+            InnerConnection(LoadedApk.ServiceDispatcher sd) {
+                mDispatcher = new WeakReference<LoadedApk.ServiceDispatcher>(sd);
+            }
+
+            public void connected(ComponentName name, IBinder service) throws RemoteException {
+                LoadedApk.ServiceDispatcher sd = mDispatcher.get();
+                if (sd != null) {
+                    sd.connected(name, service);
+                }
+            }
+        }
+
+        private final HashMap<ComponentName, ServiceDispatcher.ConnectionInfo> mActiveConnections
+            = new HashMap<ComponentName, ServiceDispatcher.ConnectionInfo>();
+
+        ServiceDispatcher(ServiceConnection conn,
+                Context context, Handler activityThread, int flags) {
+            mIServiceConnection = new InnerConnection(this);
+            mConnection = conn;
+            mContext = context;
+            mActivityThread = activityThread;
+            mLocation = new ServiceConnectionLeaked(null);
+            mLocation.fillInStackTrace();
+            mFlags = flags;
+        }
+
+        void validate(Context context, Handler activityThread) {
+            if (mContext != context) {
+                throw new RuntimeException(
+                    "ServiceConnection " + mConnection +
+                    " registered with differing Context (was " +
+                    mContext + " now " + context + ")");
+            }
+            if (mActivityThread != activityThread) {
+                throw new RuntimeException(
+                    "ServiceConnection " + mConnection +
+                    " registered with differing handler (was " +
+                    mActivityThread + " now " + activityThread + ")");
+            }
+        }
+
+        void doForget() {
+            synchronized(this) {
+                Iterator<ServiceDispatcher.ConnectionInfo> it = mActiveConnections.values().iterator();
+                while (it.hasNext()) {
+                    ServiceDispatcher.ConnectionInfo ci = it.next();
+                    ci.binder.unlinkToDeath(ci.deathMonitor, 0);
+                }
+                mActiveConnections.clear();
+            }
+        }
+
+        ServiceConnectionLeaked getLocation() {
+            return mLocation;
+        }
+
+        ServiceConnection getServiceConnection() {
+            return mConnection;
+        }
+
+        IServiceConnection getIServiceConnection() {
+            return mIServiceConnection;
+        }
+
+        int getFlags() {
+            return mFlags;
+        }
+
+        void setUnbindLocation(RuntimeException ex) {
+            mUnbindLocation = ex;
+        }
+
+        RuntimeException getUnbindLocation() {
+            return mUnbindLocation;
+        }
+
+        public void connected(ComponentName name, IBinder service) {
+            if (mActivityThread != null) {
+                mActivityThread.post(new RunConnection(name, service, 0));
+            } else {
+                doConnected(name, service);
+            }
+        }
+
+        public void death(ComponentName name, IBinder service) {
+            ServiceDispatcher.ConnectionInfo old;
+
+            synchronized (this) {
+                mDied = true;
+                old = mActiveConnections.remove(name);
+                if (old == null || old.binder != service) {
+                    // Death for someone different than who we last
+                    // reported...  just ignore it.
+                    return;
+                }
+                old.binder.unlinkToDeath(old.deathMonitor, 0);
+            }
+
+            if (mActivityThread != null) {
+                mActivityThread.post(new RunConnection(name, service, 1));
+            } else {
+                doDeath(name, service);
+            }
+        }
+
+        public void doConnected(ComponentName name, IBinder service) {
+            ServiceDispatcher.ConnectionInfo old;
+            ServiceDispatcher.ConnectionInfo info;
+
+            synchronized (this) {
+                old = mActiveConnections.get(name);
+                if (old != null && old.binder == service) {
+                    // Huh, already have this one.  Oh well!
+                    return;
+                }
+
+                if (service != null) {
+                    // A new service is being connected... set it all up.
+                    mDied = false;
+                    info = new ConnectionInfo();
+                    info.binder = service;
+                    info.deathMonitor = new DeathMonitor(name, service);
+                    try {
+                        service.linkToDeath(info.deathMonitor, 0);
+                        mActiveConnections.put(name, info);
+                    } catch (RemoteException e) {
+                        // This service was dead before we got it...  just
+                        // don't do anything with it.
+                        mActiveConnections.remove(name);
+                        return;
+                    }
+
+                } else {
+                    // The named service is being disconnected... clean up.
+                    mActiveConnections.remove(name);
+                }
+
+                if (old != null) {
+                    old.binder.unlinkToDeath(old.deathMonitor, 0);
+                }
+            }
+
+            // If there was an old service, it is not disconnected.
+            if (old != null) {
+                mConnection.onServiceDisconnected(name);
+            }
+            // If there is a new service, it is now connected.
+            if (service != null) {
+                mConnection.onServiceConnected(name, service);
+            }
+        }
+
+        public void doDeath(ComponentName name, IBinder service) {
+            mConnection.onServiceDisconnected(name);
+        }
+
+        private final class RunConnection implements Runnable {
+            RunConnection(ComponentName name, IBinder service, int command) {
+                mName = name;
+                mService = service;
+                mCommand = command;
+            }
+
+            public void run() {
+                if (mCommand == 0) {
+                    doConnected(mName, mService);
+                } else if (mCommand == 1) {
+                    doDeath(mName, mService);
+                }
+            }
+
+            final ComponentName mName;
+            final IBinder mService;
+            final int mCommand;
+        }
+
+        private final class DeathMonitor implements IBinder.DeathRecipient
+        {
+            DeathMonitor(ComponentName name, IBinder service) {
+                mName = name;
+                mService = service;
+            }
+
+            public void binderDied() {
+                death(mName, mService);
+            }
+
+            final ComponentName mName;
+            final IBinder mService;
+        }
+    }
+}
diff --git a/core/java/android/app/NativeActivity.java b/core/java/android/app/NativeActivity.java
new file mode 100644
index 0000000..eaf0675
--- /dev/null
+++ b/core/java/android/app/NativeActivity.java
@@ -0,0 +1,343 @@
+package android.app;
+
+import com.android.internal.view.IInputMethodCallback;
+import com.android.internal.view.IInputMethodSession;
+
+import dalvik.system.PathClassLoader;
+
+import android.content.Context;
+import android.content.pm.ActivityInfo;
+import android.content.pm.ApplicationInfo;
+import android.content.pm.PackageManager;
+import android.content.res.AssetManager;
+import android.graphics.PixelFormat;
+import android.os.Build;
+import android.os.Bundle;
+import android.os.Environment;
+import android.os.Looper;
+import android.os.MessageQueue;
+import android.util.AttributeSet;
+import android.view.InputChannel;
+import android.view.InputQueue;
+import android.view.KeyEvent;
+import android.view.Surface;
+import android.view.SurfaceHolder;
+import android.view.View;
+import android.view.WindowManager;
+import android.view.ViewTreeObserver.OnGlobalLayoutListener;
+import android.view.inputmethod.InputMethodManager;
+
+import java.io.File;
+import java.lang.ref.WeakReference;
+
+/**
+ * Convenience for implementing an activity that will be implemented
+ * purely in native code.  That is, a game (or game-like thing).
+ */
+public class NativeActivity extends Activity implements SurfaceHolder.Callback2,
+        InputQueue.Callback, OnGlobalLayoutListener {
+    public static final String META_DATA_LIB_NAME = "android.app.lib_name";
+    
+    private NativeContentView mNativeContentView;
+    private InputMethodManager mIMM;
+    private InputMethodCallback mInputMethodCallback;
+
+    private int mNativeHandle;
+    
+    private InputQueue mCurInputQueue;
+    private SurfaceHolder mCurSurfaceHolder;
+    
+    final int[] mLocation = new int[2];
+    int mLastContentX;
+    int mLastContentY;
+    int mLastContentWidth;
+    int mLastContentHeight;
+
+    private boolean mDispatchingUnhandledKey;
+
+    private boolean mDestroyed;
+    
+    private native int loadNativeCode(String path, MessageQueue queue,
+            String internalDataPath, String externalDataPath, int sdkVersion,
+            AssetManager assetMgr);
+    private native void unloadNativeCode(int handle);
+    
+    private native void onStartNative(int handle);
+    private native void onResumeNative(int handle);
+    private native void onSaveInstanceStateNative(int handle);
+    private native void onPauseNative(int handle);
+    private native void onStopNative(int handle);
+    private native void onLowMemoryNative(int handle);
+    private native void onWindowFocusChangedNative(int handle, boolean focused);
+    private native void onSurfaceCreatedNative(int handle, Surface surface);
+    private native void onSurfaceChangedNative(int handle, Surface surface,
+            int format, int width, int height);
+    private native void onSurfaceRedrawNeededNative(int handle, Surface surface);
+    private native void onSurfaceDestroyedNative(int handle);
+    private native void onInputChannelCreatedNative(int handle, InputChannel channel);
+    private native void onInputChannelDestroyedNative(int handle, InputChannel channel);
+    private native void onContentRectChangedNative(int handle, int x, int y, int w, int h);
+    private native void dispatchKeyEventNative(int handle, KeyEvent event);
+    private native void finishPreDispatchKeyEventNative(int handle, int seq, boolean handled);
+
+    static class NativeContentView extends View {
+        NativeActivity mActivity;
+
+        public NativeContentView(Context context) {
+            super(context);
+        }
+
+        public NativeContentView(Context context, AttributeSet attrs) {
+            super(context, attrs);
+        }
+    }
+    
+    static class InputMethodCallback extends IInputMethodCallback.Stub {
+        WeakReference<NativeActivity> mNa;
+
+        InputMethodCallback(NativeActivity na) {
+            mNa = new WeakReference<NativeActivity>(na);
+        }
+
+        @Override
+        public void finishedEvent(int seq, boolean handled) {
+            NativeActivity na = mNa.get();
+            if (na != null) {
+                na.finishPreDispatchKeyEventNative(na.mNativeHandle, seq, handled);
+            }
+        }
+
+        @Override
+        public void sessionCreated(IInputMethodSession session) {
+            // Stub -- not for use in the client.
+        }
+    }
+
+    @Override
+    protected void onCreate(Bundle savedInstanceState) {
+        String libname = "main";
+        ActivityInfo ai;
+        
+        mIMM = (InputMethodManager)getSystemService(Context.INPUT_METHOD_SERVICE);
+        mInputMethodCallback = new InputMethodCallback(this);
+
+        getWindow().takeSurface(this);
+        getWindow().takeInputQueue(this);
+        getWindow().setFormat(PixelFormat.RGB_565);
+        getWindow().setSoftInputMode(
+                WindowManager.LayoutParams.SOFT_INPUT_STATE_UNSPECIFIED
+                | WindowManager.LayoutParams.SOFT_INPUT_ADJUST_RESIZE);
+
+        mNativeContentView = new NativeContentView(this);
+        mNativeContentView.mActivity = this;
+        setContentView(mNativeContentView);
+        mNativeContentView.requestFocus();
+        mNativeContentView.getViewTreeObserver().addOnGlobalLayoutListener(this);
+        
+        try {
+            ai = getPackageManager().getActivityInfo(
+                    getIntent().getComponent(), PackageManager.GET_META_DATA);
+            if (ai.metaData != null) {
+                String ln = ai.metaData.getString(META_DATA_LIB_NAME);
+                if (ln != null) libname = ln;
+            }
+        } catch (PackageManager.NameNotFoundException e) {
+            throw new RuntimeException("Error getting activity info", e);
+        }
+        
+        String path = null;
+        
+        if ((ai.applicationInfo.flags&ApplicationInfo.FLAG_HAS_CODE) == 0) {
+            // If the application does not have (Java) code, then no ClassLoader
+            // has been set up for it.  We will need to do our own search for
+            // the native code.
+            path = ai.applicationInfo.dataDir + "/lib/" + System.mapLibraryName(libname);
+            if (!(new File(path)).exists()) {
+                path = null;
+            }
+        }
+        
+        if (path == null) {
+            path = ((PathClassLoader)getClassLoader()).findLibrary(libname);
+        }
+        
+        if (path == null) {
+            throw new IllegalArgumentException("Unable to find native library: " + libname);
+        }
+        
+        mNativeHandle = loadNativeCode(path, Looper.myQueue(),
+                 getFilesDir().toString(),
+                 Environment.getExternalStorageAppFilesDirectory(ai.packageName).toString(),
+                 Build.VERSION.SDK_INT, getAssets());
+        
+        if (mNativeHandle == 0) {
+            throw new IllegalArgumentException("Unable to load native library: " + path);
+        }
+        super.onCreate(savedInstanceState);
+    }
+
+    @Override
+    protected void onDestroy() {
+        mDestroyed = true;
+        if (mCurSurfaceHolder != null) {
+            onSurfaceDestroyedNative(mNativeHandle);
+            mCurSurfaceHolder = null;
+        }
+        if (mCurInputQueue != null) {
+            onInputChannelDestroyedNative(mNativeHandle, mCurInputQueue.getInputChannel());
+            mCurInputQueue = null;
+        }
+        unloadNativeCode(mNativeHandle);
+        super.onDestroy();
+    }
+
+    @Override
+    protected void onPause() {
+        super.onPause();
+        onPauseNative(mNativeHandle);
+    }
+
+    @Override
+    protected void onResume() {
+        super.onResume();
+        onResumeNative(mNativeHandle);
+    }
+
+    @Override
+    protected void onSaveInstanceState(Bundle outState) {
+        super.onSaveInstanceState(outState);
+        onSaveInstanceStateNative(mNativeHandle);
+    }
+
+    @Override
+    protected void onStart() {
+        super.onStart();
+        onStartNative(mNativeHandle);
+    }
+
+    @Override
+    protected void onStop() {
+        super.onStop();
+        onStopNative(mNativeHandle);
+    }
+
+    @Override
+    public void onLowMemory() {
+        super.onLowMemory();
+        if (!mDestroyed) {
+            onLowMemoryNative(mNativeHandle);
+        }
+    }
+
+    @Override
+    public void onWindowFocusChanged(boolean hasFocus) {
+        super.onWindowFocusChanged(hasFocus);
+        if (!mDestroyed) {
+            onWindowFocusChangedNative(mNativeHandle, hasFocus);
+        }
+    }
+    
+    @Override
+    public boolean dispatchKeyEvent(KeyEvent event) {
+        if (mDispatchingUnhandledKey) {
+            return super.dispatchKeyEvent(event);
+        } else {
+            // Key events from the IME do not go through the input channel;
+            // we need to intercept them here to hand to the application.
+            dispatchKeyEventNative(mNativeHandle, event);
+            return true;
+        }
+    }
+
+    public void surfaceCreated(SurfaceHolder holder) {
+        if (!mDestroyed) {
+            mCurSurfaceHolder = holder;
+            onSurfaceCreatedNative(mNativeHandle, holder.getSurface());
+        }
+    }
+    
+    public void surfaceChanged(SurfaceHolder holder, int format, int width, int height) {
+        if (!mDestroyed) {
+            mCurSurfaceHolder = holder;
+            onSurfaceChangedNative(mNativeHandle, holder.getSurface(), format, width, height);
+        }
+    }
+    
+    public void surfaceRedrawNeeded(SurfaceHolder holder) {
+        if (!mDestroyed) {
+            mCurSurfaceHolder = holder;
+            onSurfaceRedrawNeededNative(mNativeHandle, holder.getSurface());
+        }
+    }
+
+    public void surfaceDestroyed(SurfaceHolder holder) {
+        mCurSurfaceHolder = null;
+        if (!mDestroyed) {
+            onSurfaceDestroyedNative(mNativeHandle);
+        }
+    }
+    
+    public void onInputQueueCreated(InputQueue queue) {
+        if (!mDestroyed) {
+            mCurInputQueue = queue;
+            onInputChannelCreatedNative(mNativeHandle, queue.getInputChannel());
+        }
+    }
+    
+    public void onInputQueueDestroyed(InputQueue queue) {
+        mCurInputQueue = null;
+        if (!mDestroyed) {
+            onInputChannelDestroyedNative(mNativeHandle, queue.getInputChannel());
+        }
+    }
+    
+    public void onGlobalLayout() {
+        mNativeContentView.getLocationInWindow(mLocation);
+        int w = mNativeContentView.getWidth();
+        int h = mNativeContentView.getHeight();
+        if (mLocation[0] != mLastContentX || mLocation[1] != mLastContentY
+                || w != mLastContentWidth || h != mLastContentHeight) {
+            mLastContentX = mLocation[0];
+            mLastContentY = mLocation[1];
+            mLastContentWidth = w;
+            mLastContentHeight = h;
+            if (!mDestroyed) {
+                onContentRectChangedNative(mNativeHandle, mLastContentX,
+                        mLastContentY, mLastContentWidth, mLastContentHeight);
+            }
+        }
+    }
+
+    void dispatchUnhandledKeyEvent(KeyEvent event) {
+        try {
+            mDispatchingUnhandledKey = true;
+            View decor = getWindow().getDecorView();
+            if (decor != null) {
+                decor.dispatchKeyEvent(event);
+            }
+        } finally {
+            mDispatchingUnhandledKey = false;
+        }
+    }
+    
+    void preDispatchKeyEvent(KeyEvent event, int seq) {
+        mIMM.dispatchKeyEvent(this, seq, event,
+                mInputMethodCallback);
+    }
+
+    void setWindowFlags(int flags, int mask) {
+        getWindow().setFlags(flags, mask);
+    }
+    
+    void setWindowFormat(int format) {
+        getWindow().setFormat(format);
+    }
+
+    void showIme(int mode) {
+        mIMM.showSoftInput(mNativeContentView, mode);
+    }
+
+    void hideIme(int mode) {
+        mIMM.hideSoftInputFromWindow(mNativeContentView.getWindowToken(), mode);
+    }
+}
diff --git a/core/java/android/app/Notification.java b/core/java/android/app/Notification.java
index 4d72f73..83a2024 100644
--- a/core/java/android/app/Notification.java
+++ b/core/java/android/app/Notification.java
@@ -83,10 +83,10 @@
     public int icon;
 
     /**
-     * The number of events that this notification represents.  For example, if this is the
-     * new mail notification, this would be the number of unread messages.  This number is
-     * be superimposed over the icon in the status bar.  If the number is 0 or negative, it
-     * is not shown in the status bar.
+     * The number of events that this notification represents.  For example, in a new mail
+     * notification, this could be the number of unread messages.  This number is superimposed over
+     * the icon in the status bar.  If the number is 0 or negative, it is not shown in the status
+     * bar.
      */
     public int number;
 
@@ -109,13 +109,22 @@
     public PendingIntent deleteIntent;
 
     /**
+     * An intent to launch instead of posting the notification to the status bar. Only for use with
+     * extremely high-priority notifications demanding the user's attention, such as an incoming
+     * call (handled in the core Android Phone app with a full-screen Activity).
+     * Use with {@link #FLAG_HIGH_PRIORITY} to ensure that this notification will reach the user
+     * even when other notifications are suppressed.
+     */
+    public PendingIntent fullScreenIntent;
+
+    /**
      * Text to scroll across the screen when this item is added to
      * the status bar.
      */
     public CharSequence tickerText;
 
     /**
-     * The view that shows when this notification is shown in the expanded status bar.
+     * The view that will represent this notification in the expanded status bar.
      */
     public RemoteViews contentView;
 
@@ -264,6 +273,14 @@
      */
     public static final int FLAG_FOREGROUND_SERVICE = 0x00000040;
 
+    /**
+     * Bit to be bitwise-ored into the {@link #flags} field that should be set if this notification
+     * represents a high-priority event that may be shown to the user even if notifications are
+     * otherwise unavailable (that is, when the status bar is hidden). This flag is ideally used
+     * in conjunction with {@link #fullScreenIntent}.
+     */
+    public static final int FLAG_HIGH_PRIORITY = 0x00000080;
+
     public int flags;
 
     /**
@@ -339,6 +356,49 @@
         ledOnMS = parcel.readInt();
         ledOffMS = parcel.readInt();
         iconLevel = parcel.readInt();
+
+        if (parcel.readInt() != 0) {
+            fullScreenIntent = PendingIntent.CREATOR.createFromParcel(parcel);
+        }
+    }
+
+    public Notification clone() {
+        Notification that = new Notification();
+
+        that.when = this.when;
+        that.icon = this.icon;
+        that.number = this.number;
+
+        // PendingIntents are global, so there's no reason (or way) to clone them.
+        that.contentIntent = this.contentIntent;
+        that.deleteIntent = this.deleteIntent;
+        that.fullScreenIntent = this.fullScreenIntent;
+
+        if (this.tickerText != null) {
+            that.tickerText = this.tickerText.toString();
+        }
+        if (this.contentView != null) {
+            that.contentView = this.contentView.clone();
+        }
+        that.iconLevel = that.iconLevel;
+        that.sound = this.sound; // android.net.Uri is immutable
+        that.audioStreamType = this.audioStreamType;
+
+        final long[] vibrate = this.vibrate;
+        if (vibrate != null) {
+            final int N = vibrate.length;
+            final long[] vib = that.vibrate = new long[N];
+            System.arraycopy(vibrate, 0, vib, 0, N);
+        }
+
+        that.ledARGB = this.ledARGB;
+        that.ledOnMS = this.ledOnMS;
+        that.ledOffMS = this.ledOffMS;
+        that.defaults = this.defaults;
+        
+        that.flags = this.flags;
+
+        return that;
     }
 
     public int describeContents() {
@@ -395,6 +455,13 @@
         parcel.writeInt(ledOnMS);
         parcel.writeInt(ledOffMS);
         parcel.writeInt(iconLevel);
+
+        if (fullScreenIntent != null) {
+            parcel.writeInt(1);
+            fullScreenIntent.writeToParcel(parcel, 0);
+        } else {
+            parcel.writeInt(0);
+        }
     }
 
     /**
@@ -480,6 +547,11 @@
         }
         sb.append(",defaults=0x");
         sb.append(Integer.toHexString(this.defaults));
+        sb.append(",flags=0x");
+        sb.append(Integer.toHexString(this.flags));
+        if ((this.flags & FLAG_HIGH_PRIORITY) != 0) {
+            sb.append("!!!1!one!");
+        }
         sb.append(")");
         return sb.toString();
     }
diff --git a/core/java/android/app/StatusBarManager.java b/core/java/android/app/StatusBarManager.java
index 72ec616..de544fb 100644
--- a/core/java/android/app/StatusBarManager.java
+++ b/core/java/android/app/StatusBarManager.java
@@ -23,6 +23,8 @@
 import android.os.IBinder;
 import android.os.ServiceManager;
 
+import com.android.internal.statusbar.IStatusBarService;
+
 /**
  * Allows an app to control the status bar.
  *
@@ -58,12 +60,12 @@
     public static final int DISABLE_NONE = 0x00000000;
 
     private Context mContext;
-    private IStatusBar mService;
+    private IStatusBarService mService;
     private IBinder mToken = new Binder();
 
     StatusBarManager(Context context) {
         mContext = context;
-        mService = IStatusBar.Stub.asInterface(
+        mService = IStatusBarService.Stub.asInterface(
                 ServiceManager.getService(Context.STATUS_BAR_SERVICE));
     }
 
@@ -85,7 +87,7 @@
      */
     public void expand() {
         try {
-            mService.activate();
+            mService.expand();
         } catch (RemoteException ex) {
             // system process is dead anyway.
             throw new RuntimeException(ex);
@@ -97,46 +99,34 @@
      */
     public void collapse() {
         try {
-            mService.deactivate();
-        } catch (RemoteException ex) {
-            // system process is dead anyway.
-            throw new RuntimeException(ex);
-        }
-    }
-    
-    /**
-     * Toggle the status bar.
-     */
-    public void toggle() {
-        try {
-            mService.toggle();
+            mService.collapse();
         } catch (RemoteException ex) {
             // system process is dead anyway.
             throw new RuntimeException(ex);
         }
     }
 
-    public IBinder addIcon(String slot, int iconId, int iconLevel) {
+    public void setIcon(String slot, int iconId, int iconLevel) {
         try {
-            return mService.addIcon(slot, mContext.getPackageName(), iconId, iconLevel);
+            mService.setIcon(slot, mContext.getPackageName(), iconId, iconLevel);
         } catch (RemoteException ex) {
             // system process is dead anyway.
             throw new RuntimeException(ex);
         }
     }
 
-    public void updateIcon(IBinder key, String slot, int iconId, int iconLevel) {
+    public void removeIcon(String slot) {
         try {
-            mService.updateIcon(key, slot, mContext.getPackageName(), iconId, iconLevel);
+            mService.removeIcon(slot);
         } catch (RemoteException ex) {
             // system process is dead anyway.
             throw new RuntimeException(ex);
         }
     }
 
-    public void removeIcon(IBinder key) {
+    public void setIconVisibility(String slot, boolean visible) {
         try {
-            mService.removeIcon(key);
+            mService.setIconVisibility(slot, visible);
         } catch (RemoteException ex) {
             // system process is dead anyway.
             throw new RuntimeException(ex);
diff --git a/core/java/android/appwidget/AppWidgetHost.java b/core/java/android/appwidget/AppWidgetHost.java
index 88adabd..b2fc13f 100644
--- a/core/java/android/appwidget/AppWidgetHost.java
+++ b/core/java/android/appwidget/AppWidgetHost.java
@@ -237,7 +237,7 @@
             v = mViews.get(appWidgetId);
         }
         if (v != null) {
-            v.updateAppWidget(null, AppWidgetHostView.UPDATE_FLAGS_RESET);
+            v.resetAppWidget(appWidget);
         }
     }
 
@@ -247,7 +247,7 @@
             v = mViews.get(appWidgetId);
         }
         if (v != null) {
-            v.updateAppWidget(views, 0);
+            v.updateAppWidget(views);
         }
     }
 }
diff --git a/core/java/android/appwidget/AppWidgetHostView.java b/core/java/android/appwidget/AppWidgetHostView.java
index 5375193..b33b097 100644
--- a/core/java/android/appwidget/AppWidgetHostView.java
+++ b/core/java/android/appwidget/AppWidgetHostView.java
@@ -46,8 +46,6 @@
     static final boolean LOGD = false;
     static final boolean CROSSFADE = false;
 
-    static final int UPDATE_FLAGS_RESET = 0x00000001;
-
     static final int VIEW_MODE_NOINIT = 0;
     static final int VIEW_MODE_CONTENT = 1;
     static final int VIEW_MODE_ERROR = 2;
@@ -102,7 +100,7 @@
         mAppWidgetId = appWidgetId;
         mInfo = info;
     }
-    
+
     public int getAppWidgetId() {
         return mAppWidgetId;
     }
@@ -148,21 +146,22 @@
     }
 
     /**
+     * Update the AppWidgetProviderInfo for this view, and reset it to the
+     * initial layout.
+     */
+    void resetAppWidget(AppWidgetProviderInfo info) {
+        mInfo = info;
+        mViewMode = VIEW_MODE_NOINIT;
+        updateAppWidget(null);
+    }
+
+    /**
      * Process a set of {@link RemoteViews} coming in as an update from the
      * AppWidget provider. Will animate into these new views as needed
      */
     public void updateAppWidget(RemoteViews remoteViews) {
-        updateAppWidget(remoteViews, 0);
-    }
+        if (LOGD) Log.d(TAG, "updateAppWidget called mOld=" + mOld);
 
-    void updateAppWidget(RemoteViews remoteViews, int flags) {
-        if (LOGD) Log.d(TAG, "updateAppWidget called mOld=" + mOld + " flags=0x"
-                + Integer.toHexString(flags));
-
-        if ((flags & UPDATE_FLAGS_RESET) != 0) {
-            mViewMode = VIEW_MODE_NOINIT;
-        }
-        
         boolean recycled = false;
         View content = null;
         Exception exception = null;
diff --git a/core/java/android/bluetooth/BluetoothDeviceProfileState.java b/core/java/android/bluetooth/BluetoothDeviceProfileState.java
new file mode 100644
index 0000000..8e655e2
--- /dev/null
+++ b/core/java/android/bluetooth/BluetoothDeviceProfileState.java
@@ -0,0 +1,665 @@
+/*
+ * Copyright (C) 2010 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package android.bluetooth;
+
+import android.content.BroadcastReceiver;
+import android.content.Context;
+import android.content.Intent;
+import android.content.IntentFilter;
+import android.os.Message;
+import android.server.BluetoothA2dpService;
+import android.server.BluetoothService;
+import android.util.Log;
+
+import com.android.internal.util.HierarchicalState;
+import com.android.internal.util.HierarchicalStateMachine;
+
+/**
+ * This class is the Profile connection state machine associated with a remote
+ * device. When the device bonds an instance of this class is created.
+ * This tracks incoming and outgoing connections of all the profiles. Incoming
+ * connections are preferred over outgoing connections and HFP preferred over
+ * A2DP. When the device is unbonded, the instance is removed.
+ *
+ * States:
+ * {@link BondedDevice}: This state represents a bonded device. When in this
+ * state none of the profiles are in transition states.
+ *
+ * {@link OutgoingHandsfree}: Handsfree profile connection is in a transition
+ * state because of a outgoing Connect or Disconnect.
+ *
+ * {@link IncomingHandsfree}: Handsfree profile connection is in a transition
+ * state because of a incoming Connect or Disconnect.
+ *
+ * {@link IncomingA2dp}: A2dp profile connection is in a transition
+ * state because of a incoming Connect or Disconnect.
+ *
+ * {@link OutgoingA2dp}: A2dp profile connection is in a transition
+ * state because of a outgoing Connect or Disconnect.
+ *
+ * Todo(): Write tests for this class, when the Android Mock support is completed.
+ * @hide
+ */
+public final class BluetoothDeviceProfileState extends HierarchicalStateMachine {
+    private static final String TAG = "BluetoothDeviceProfileState";
+    private static final boolean DBG = true; //STOPSHIP - Change to false
+
+    public static final int CONNECT_HFP_OUTGOING = 1;
+    public static final int CONNECT_HFP_INCOMING = 2;
+    public static final int CONNECT_A2DP_OUTGOING = 3;
+    public static final int CONNECT_A2DP_INCOMING = 4;
+
+    public static final int DISCONNECT_HFP_OUTGOING = 5;
+    private static final int DISCONNECT_HFP_INCOMING = 6;
+    public static final int DISCONNECT_A2DP_OUTGOING = 7;
+    public static final int DISCONNECT_A2DP_INCOMING = 8;
+
+    public static final int UNPAIR = 9;
+    public static final int AUTO_CONNECT_PROFILES = 10;
+    public static final int TRANSITION_TO_STABLE = 11;
+
+    private static final int AUTO_CONNECT_DELAY = 6000; // 6 secs
+
+    private BondedDevice mBondedDevice = new BondedDevice();
+    private OutgoingHandsfree mOutgoingHandsfree = new OutgoingHandsfree();
+    private IncomingHandsfree mIncomingHandsfree = new IncomingHandsfree();
+    private IncomingA2dp mIncomingA2dp = new IncomingA2dp();
+    private OutgoingA2dp mOutgoingA2dp = new OutgoingA2dp();
+
+    private Context mContext;
+    private BluetoothService mService;
+    private BluetoothA2dpService mA2dpService;
+    private BluetoothHeadset  mHeadsetService;
+    private boolean mHeadsetServiceConnected;
+
+    private BluetoothDevice mDevice;
+    private int mHeadsetState;
+    private int mA2dpState;
+
+    private BroadcastReceiver mBroadcastReceiver = new BroadcastReceiver() {
+        @Override
+        public void onReceive(Context context, Intent intent) {
+            String action = intent.getAction();
+            BluetoothDevice device = intent.getParcelableExtra(BluetoothDevice.EXTRA_DEVICE);
+            if (!device.equals(mDevice)) return;
+
+            if (action.equals(BluetoothHeadset.ACTION_STATE_CHANGED)) {
+                int newState = intent.getIntExtra(BluetoothHeadset.EXTRA_STATE, 0);
+                int oldState = intent.getIntExtra(BluetoothHeadset.EXTRA_PREVIOUS_STATE, 0);
+                int initiator = intent.getIntExtra(
+                    BluetoothHeadset.EXTRA_DISCONNECT_INITIATOR,
+                    BluetoothHeadset.LOCAL_DISCONNECT);
+                mHeadsetState = newState;
+                if (newState == BluetoothHeadset.STATE_DISCONNECTED &&
+                    initiator == BluetoothHeadset.REMOTE_DISCONNECT) {
+                    sendMessage(DISCONNECT_HFP_INCOMING);
+                }
+                if (newState == BluetoothHeadset.STATE_CONNECTED ||
+                    newState == BluetoothHeadset.STATE_DISCONNECTED) {
+                    sendMessage(TRANSITION_TO_STABLE);
+                }
+            } else if (action.equals(BluetoothA2dp.ACTION_SINK_STATE_CHANGED)) {
+                int newState = intent.getIntExtra(BluetoothA2dp.EXTRA_SINK_STATE, 0);
+                int oldState = intent.getIntExtra(BluetoothA2dp.EXTRA_PREVIOUS_SINK_STATE, 0);
+                mA2dpState = newState;
+                if ((oldState == BluetoothA2dp.STATE_CONNECTED ||
+                           oldState == BluetoothA2dp.STATE_PLAYING) &&
+                           newState == BluetoothA2dp.STATE_DISCONNECTED) {
+                    sendMessage(DISCONNECT_A2DP_INCOMING);
+                }
+                if (newState == BluetoothA2dp.STATE_CONNECTED ||
+                    newState == BluetoothA2dp.STATE_DISCONNECTED) {
+                    sendMessage(TRANSITION_TO_STABLE);
+                }
+            } else if (action.equals(BluetoothDevice.ACTION_ACL_CONNECTED)) {
+                if (!getCurrentState().equals(mBondedDevice)) {
+                    Log.e(TAG, "State is: " + getCurrentState());
+                    return;
+                }
+                Message msg = new Message();
+                msg.what = AUTO_CONNECT_PROFILES;
+                sendMessageDelayed(msg, AUTO_CONNECT_DELAY);
+            }
+      }
+    };
+
+    private boolean isPhoneDocked(BluetoothDevice autoConnectDevice) {
+      // This works only because these broadcast intents are "sticky"
+      Intent i = mContext.registerReceiver(null, new IntentFilter(Intent.ACTION_DOCK_EVENT));
+      if (i != null) {
+          int state = i.getIntExtra(Intent.EXTRA_DOCK_STATE, Intent.EXTRA_DOCK_STATE_UNDOCKED);
+          if (state != Intent.EXTRA_DOCK_STATE_UNDOCKED) {
+              BluetoothDevice device = i.getParcelableExtra(BluetoothDevice.EXTRA_DEVICE);
+              if (device != null && autoConnectDevice.equals(device)) {
+                  return true;
+              }
+          }
+      }
+      return false;
+  }
+
+    public BluetoothDeviceProfileState(Context context, String address,
+          BluetoothService service, BluetoothA2dpService a2dpService) {
+        super(address);
+        mContext = context;
+        mDevice = new BluetoothDevice(address);
+        mService = service;
+        mA2dpService = a2dpService;
+
+        addState(mBondedDevice);
+        addState(mOutgoingHandsfree);
+        addState(mIncomingHandsfree);
+        addState(mIncomingA2dp);
+        addState(mOutgoingA2dp);
+        setInitialState(mBondedDevice);
+
+        IntentFilter filter = new IntentFilter();
+        // Fine-grained state broadcasts
+        filter.addAction(BluetoothA2dp.ACTION_SINK_STATE_CHANGED);
+        filter.addAction(BluetoothHeadset.ACTION_STATE_CHANGED);
+        filter.addAction(BluetoothDevice.ACTION_ACL_CONNECTED);
+
+        mContext.registerReceiver(mBroadcastReceiver, filter);
+
+        HeadsetServiceListener l = new HeadsetServiceListener();
+    }
+
+    private class HeadsetServiceListener implements BluetoothHeadset.ServiceListener {
+        public HeadsetServiceListener() {
+            mHeadsetService = new BluetoothHeadset(mContext, this);
+        }
+        public void onServiceConnected() {
+            synchronized(BluetoothDeviceProfileState.this) {
+                mHeadsetServiceConnected = true;
+            }
+        }
+        public void onServiceDisconnected() {
+            synchronized(BluetoothDeviceProfileState.this) {
+                mHeadsetServiceConnected = false;
+            }
+        }
+    }
+
+    private class BondedDevice extends HierarchicalState {
+        @Override
+        protected void enter() {
+            log("Entering ACL Connected state with: " + getCurrentMessage().what);
+            Message m = new Message();
+            m.copyFrom(getCurrentMessage());
+            sendMessageAtFrontOfQueue(m);
+        }
+        @Override
+        protected boolean processMessage(Message message) {
+            log("ACL Connected State -> Processing Message: " + message.what);
+            switch(message.what) {
+                case CONNECT_HFP_OUTGOING:
+                case DISCONNECT_HFP_OUTGOING:
+                    transitionTo(mOutgoingHandsfree);
+                    break;
+                case CONNECT_HFP_INCOMING:
+                    transitionTo(mIncomingHandsfree);
+                    break;
+                case DISCONNECT_HFP_INCOMING:
+                    transitionTo(mIncomingHandsfree);
+                    break;
+                case CONNECT_A2DP_OUTGOING:
+                case DISCONNECT_A2DP_OUTGOING:
+                    transitionTo(mOutgoingA2dp);
+                    break;
+                case CONNECT_A2DP_INCOMING:
+                case DISCONNECT_A2DP_INCOMING:
+                    transitionTo(mIncomingA2dp);
+                    break;
+                case UNPAIR:
+                    if (mHeadsetState != BluetoothHeadset.STATE_DISCONNECTED) {
+                        sendMessage(DISCONNECT_HFP_OUTGOING);
+                        deferMessage(message);
+                        break;
+                    } else if (mA2dpState != BluetoothA2dp.STATE_DISCONNECTED) {
+                        sendMessage(DISCONNECT_A2DP_OUTGOING);
+                        deferMessage(message);
+                        break;
+                    }
+                    processCommand(UNPAIR);
+                    break;
+                case AUTO_CONNECT_PROFILES:
+                    if (isPhoneDocked(mDevice)) {
+                        // Don't auto connect to docks.
+                        break;
+                    } else if (!mHeadsetServiceConnected) {
+                        deferMessage(message);
+                    } else {
+                        if (mHeadsetService.getPriority(mDevice) ==
+                              BluetoothHeadset.PRIORITY_AUTO_CONNECT &&
+                              !mHeadsetService.isConnected(mDevice)) {
+                            mHeadsetService.connectHeadset(mDevice);
+                        }
+                        if (mA2dpService != null &&
+                              mA2dpService.getSinkPriority(mDevice) ==
+                              BluetoothA2dp.PRIORITY_AUTO_CONNECT &&
+                              mA2dpService.getConnectedSinks().length == 0) {
+                            mA2dpService.connectSink(mDevice);
+                        }
+                    }
+                    break;
+                case TRANSITION_TO_STABLE:
+                    // ignore.
+                    break;
+                default:
+                    return NOT_HANDLED;
+            }
+            return HANDLED;
+        }
+    }
+
+    private class OutgoingHandsfree extends HierarchicalState {
+        private boolean mStatus = false;
+        private int mCommand;
+
+        @Override
+        protected void enter() {
+            log("Entering OutgoingHandsfree state with: " + getCurrentMessage().what);
+            mCommand = getCurrentMessage().what;
+            if (mCommand != CONNECT_HFP_OUTGOING &&
+                mCommand != DISCONNECT_HFP_OUTGOING) {
+                Log.e(TAG, "Error: OutgoingHandsfree state with command:" + mCommand);
+            }
+            mStatus = processCommand(mCommand);
+            if (!mStatus) sendMessage(TRANSITION_TO_STABLE);
+        }
+
+        @Override
+        protected boolean processMessage(Message message) {
+            log("OutgoingHandsfree State -> Processing Message: " + message.what);
+            Message deferMsg = new Message();
+            int command = message.what;
+            switch(command) {
+                case CONNECT_HFP_OUTGOING:
+                    if (command != mCommand) {
+                        // Disconnect followed by a connect - defer
+                        deferMessage(message);
+                    }
+                    break;
+                case CONNECT_HFP_INCOMING:
+                    if (mCommand == CONNECT_HFP_OUTGOING) {
+                        // Cancel outgoing connect, accept incoming
+                        cancelCommand(CONNECT_HFP_OUTGOING);
+                        transitionTo(mIncomingHandsfree);
+                    } else {
+                        // We have done the disconnect but we are not
+                        // sure which state we are in at this point.
+                        deferMessage(message);
+                    }
+                    break;
+                case CONNECT_A2DP_INCOMING:
+                    // accept incoming A2DP, retry HFP_OUTGOING
+                    transitionTo(mIncomingA2dp);
+
+                    if (mStatus) {
+                        deferMsg.what = mCommand;
+                        deferMessage(deferMsg);
+                    }
+                    break;
+                case CONNECT_A2DP_OUTGOING:
+                    deferMessage(message);
+                    break;
+                case DISCONNECT_HFP_OUTGOING:
+                    if (mCommand == CONNECT_HFP_OUTGOING) {
+                        // Cancel outgoing connect
+                        cancelCommand(CONNECT_HFP_OUTGOING);
+                        processCommand(DISCONNECT_HFP_OUTGOING);
+                    }
+                    // else ignore
+                    break;
+                case DISCONNECT_HFP_INCOMING:
+                    // When this happens the socket would be closed and the headset
+                    // state moved to DISCONNECTED, cancel the outgoing thread.
+                    // if it still is in CONNECTING state
+                    cancelCommand(CONNECT_HFP_OUTGOING);
+                    break;
+                case DISCONNECT_A2DP_OUTGOING:
+                    deferMessage(message);
+                    break;
+                case DISCONNECT_A2DP_INCOMING:
+                    // Bluez will handle the disconnect. If because of this the outgoing
+                    // handsfree connection has failed, then retry.
+                    if (mStatus) {
+                       deferMsg.what = mCommand;
+                       deferMessage(deferMsg);
+                    }
+                    break;
+                case UNPAIR:
+                case AUTO_CONNECT_PROFILES:
+                    deferMessage(message);
+                    break;
+                case TRANSITION_TO_STABLE:
+                    transitionTo(mBondedDevice);
+                    break;
+                default:
+                    return NOT_HANDLED;
+            }
+            return HANDLED;
+        }
+    }
+
+    private class IncomingHandsfree extends HierarchicalState {
+        private boolean mStatus = false;
+        private int mCommand;
+
+        @Override
+        protected void enter() {
+            log("Entering IncomingHandsfree state with: " + getCurrentMessage().what);
+            mCommand = getCurrentMessage().what;
+            if (mCommand != CONNECT_HFP_INCOMING &&
+                mCommand != DISCONNECT_HFP_INCOMING) {
+                Log.e(TAG, "Error: IncomingHandsfree state with command:" + mCommand);
+            }
+            mStatus = processCommand(mCommand);
+            if (!mStatus) sendMessage(TRANSITION_TO_STABLE);
+        }
+
+        @Override
+        protected boolean processMessage(Message message) {
+            log("IncomingHandsfree State -> Processing Message: " + message.what);
+            switch(message.what) {
+                case CONNECT_HFP_OUTGOING:
+                    deferMessage(message);
+                    break;
+                case CONNECT_HFP_INCOMING:
+                    // Ignore
+                    Log.e(TAG, "Error: Incoming connection with a pending incoming connection");
+                    break;
+                case CONNECT_A2DP_INCOMING:
+                    // Serialize the commands.
+                    deferMessage(message);
+                    break;
+                case CONNECT_A2DP_OUTGOING:
+                    deferMessage(message);
+                    break;
+                case DISCONNECT_HFP_OUTGOING:
+                    // We don't know at what state we are in the incoming HFP connection state.
+                    // We can be changing from DISCONNECTED to CONNECTING, or
+                    // from CONNECTING to CONNECTED, so serializing this command is
+                    // the safest option.
+                    deferMessage(message);
+                    break;
+                case DISCONNECT_HFP_INCOMING:
+                    // Nothing to do here, we will already be DISCONNECTED
+                    // by this point.
+                    break;
+                case DISCONNECT_A2DP_OUTGOING:
+                    deferMessage(message);
+                    break;
+                case DISCONNECT_A2DP_INCOMING:
+                    // Bluez handles incoming A2DP disconnect.
+                    // If this causes incoming HFP to fail, it is more of a headset problem
+                    // since both connections are incoming ones.
+                    break;
+                case UNPAIR:
+                case AUTO_CONNECT_PROFILES:
+                    deferMessage(message);
+                    break;
+                case TRANSITION_TO_STABLE:
+                    transitionTo(mBondedDevice);
+                    break;
+                default:
+                    return NOT_HANDLED;
+            }
+            return HANDLED;
+        }
+    }
+
+    private class OutgoingA2dp extends HierarchicalState {
+        private boolean mStatus = false;
+        private int mCommand;
+
+        @Override
+        protected void enter() {
+            log("Entering OutgoingA2dp state with: " + getCurrentMessage().what);
+            mCommand = getCurrentMessage().what;
+            if (mCommand != CONNECT_A2DP_OUTGOING &&
+                mCommand != DISCONNECT_A2DP_OUTGOING) {
+                Log.e(TAG, "Error: OutgoingA2DP state with command:" + mCommand);
+            }
+            mStatus = processCommand(mCommand);
+            if (!mStatus) sendMessage(TRANSITION_TO_STABLE);
+        }
+
+        @Override
+        protected boolean processMessage(Message message) {
+            log("OutgoingA2dp State->Processing Message: " + message.what);
+            Message deferMsg = new Message();
+            switch(message.what) {
+                case CONNECT_HFP_OUTGOING:
+                    processCommand(CONNECT_HFP_OUTGOING);
+
+                    // Don't cancel A2DP outgoing as there is no guarantee it
+                    // will get canceled.
+                    // It might already be connected but we might not have got the
+                    // A2DP_SINK_STATE_CHANGE. Hence, no point disconnecting here.
+                    // The worst case, the connection will fail, retry.
+                    // The same applies to Disconnecting an A2DP connection.
+                    if (mStatus) {
+                        deferMsg.what = mCommand;
+                        deferMessage(deferMsg);
+                    }
+                    break;
+                case CONNECT_HFP_INCOMING:
+                    processCommand(CONNECT_HFP_INCOMING);
+
+                    // Don't cancel A2DP outgoing as there is no guarantee
+                    // it will get canceled.
+                    // The worst case, the connection will fail, retry.
+                    if (mStatus) {
+                        deferMsg.what = mCommand;
+                        deferMessage(deferMsg);
+                    }
+                    break;
+                case CONNECT_A2DP_INCOMING:
+                    // Bluez will take care of conflicts between incoming and outgoing
+                    // connections.
+                    transitionTo(mIncomingA2dp);
+                    break;
+                case CONNECT_A2DP_OUTGOING:
+                    // Ignore
+                    break;
+                case DISCONNECT_HFP_OUTGOING:
+                    deferMessage(message);
+                    break;
+                case DISCONNECT_HFP_INCOMING:
+                    // At this point, we are already disconnected
+                    // with HFP. Sometimes A2DP connection can
+                    // fail due to the disconnection of HFP. So add a retry
+                    // for the A2DP.
+                    if (mStatus) {
+                        deferMsg.what = mCommand;
+                        deferMessage(deferMsg);
+                    }
+                    break;
+                case DISCONNECT_A2DP_OUTGOING:
+                    processCommand(DISCONNECT_A2DP_OUTGOING);
+                    break;
+                case DISCONNECT_A2DP_INCOMING:
+                    // Ignore, will be handled by Bluez
+                    break;
+                case UNPAIR:
+                case AUTO_CONNECT_PROFILES:
+                    deferMessage(message);
+                    break;
+                case TRANSITION_TO_STABLE:
+                    transitionTo(mBondedDevice);
+                    break;
+                default:
+                    return NOT_HANDLED;
+            }
+            return HANDLED;
+        }
+    }
+
+    private class IncomingA2dp extends HierarchicalState {
+        private boolean mStatus = false;
+        private int mCommand;
+
+        @Override
+        protected void enter() {
+            log("Entering IncomingA2dp state with: " + getCurrentMessage().what);
+            mCommand = getCurrentMessage().what;
+            if (mCommand != CONNECT_A2DP_INCOMING &&
+                mCommand != DISCONNECT_A2DP_INCOMING) {
+                Log.e(TAG, "Error: IncomingA2DP state with command:" + mCommand);
+            }
+            mStatus = processCommand(mCommand);
+            if (!mStatus) sendMessage(TRANSITION_TO_STABLE);
+        }
+
+        @Override
+        protected boolean processMessage(Message message) {
+            log("IncomingA2dp State->Processing Message: " + message.what);
+            Message deferMsg = new Message();
+            switch(message.what) {
+                case CONNECT_HFP_OUTGOING:
+                    deferMessage(message);
+                    break;
+                case CONNECT_HFP_INCOMING:
+                    // Shouldn't happen, but serialize the commands.
+                    deferMessage(message);
+                    break;
+                case CONNECT_A2DP_INCOMING:
+                    // ignore
+                    break;
+                case CONNECT_A2DP_OUTGOING:
+                    // Defer message and retry
+                    deferMessage(message);
+                    break;
+                case DISCONNECT_HFP_OUTGOING:
+                    deferMessage(message);
+                    break;
+                case DISCONNECT_HFP_INCOMING:
+                    // Shouldn't happen but if does, we can handle it.
+                    // Depends if the headset can handle it.
+                    // Incoming A2DP will be handled by Bluez, Disconnect HFP
+                    // the socket would have already been closed.
+                    // ignore
+                    break;
+                case DISCONNECT_A2DP_OUTGOING:
+                    deferMessage(message);
+                    break;
+                case DISCONNECT_A2DP_INCOMING:
+                    // Ignore, will be handled by Bluez
+                    break;
+                case UNPAIR:
+                case AUTO_CONNECT_PROFILES:
+                    deferMessage(message);
+                    break;
+                case TRANSITION_TO_STABLE:
+                    transitionTo(mBondedDevice);
+                    break;
+                default:
+                    return NOT_HANDLED;
+            }
+            return HANDLED;
+        }
+    }
+
+
+
+    synchronized void cancelCommand(int command) {
+        if (command == CONNECT_HFP_OUTGOING ) {
+            // Cancel the outgoing thread.
+            if (mHeadsetServiceConnected) {
+                mHeadsetService.cancelConnectThread();
+            }
+            // HeadsetService is down. Phone process most likely crashed.
+            // The thread would have got killed.
+        }
+    }
+
+    synchronized void deferHeadsetMessage(int command) {
+        Message msg = new Message();
+        msg.what = command;
+        deferMessage(msg);
+    }
+
+    synchronized boolean processCommand(int command) {
+        log("Processing command:" + command);
+        switch(command) {
+            case  CONNECT_HFP_OUTGOING:
+                if (mHeadsetService != null) {
+                    return mHeadsetService.connectHeadsetInternal(mDevice);
+                }
+                break;
+            case CONNECT_HFP_INCOMING:
+                if (!mHeadsetServiceConnected) {
+                    deferHeadsetMessage(command);
+                } else if (mHeadsetState == BluetoothHeadset.STATE_CONNECTING) {
+                    return mHeadsetService.acceptIncomingConnect(mDevice);
+                } else if (mHeadsetState == BluetoothHeadset.STATE_DISCONNECTED) {
+                    return mHeadsetService.createIncomingConnect(mDevice);
+                }
+                break;
+            case CONNECT_A2DP_OUTGOING:
+                if (mA2dpService != null) {
+                    return mA2dpService.connectSinkInternal(mDevice);
+                }
+                break;
+            case CONNECT_A2DP_INCOMING:
+                // ignore, Bluez takes care
+                return true;
+            case DISCONNECT_HFP_OUTGOING:
+                if (!mHeadsetServiceConnected) {
+                    deferHeadsetMessage(command);
+                } else {
+                    if (mHeadsetService.getPriority(mDevice) ==
+                        BluetoothHeadset.PRIORITY_AUTO_CONNECT) {
+                        mHeadsetService.setPriority(mDevice, BluetoothHeadset.PRIORITY_ON);
+                    }
+                    return mHeadsetService.disconnectHeadsetInternal(mDevice);
+                }
+                break;
+            case DISCONNECT_HFP_INCOMING:
+                // ignore
+                return true;
+            case DISCONNECT_A2DP_INCOMING:
+                // ignore
+                return true;
+            case DISCONNECT_A2DP_OUTGOING:
+                if (mA2dpService != null) {
+                    if (mA2dpService.getSinkPriority(mDevice) ==
+                        BluetoothA2dp.PRIORITY_AUTO_CONNECT) {
+                        mA2dpService.setSinkPriority(mDevice, BluetoothHeadset.PRIORITY_ON);
+                    }
+                    return mA2dpService.disconnectSinkInternal(mDevice);
+                }
+                break;
+            case UNPAIR:
+                return mService.removeBondInternal(mDevice.getAddress());
+            default:
+                Log.e(TAG, "Error: Unknown Command");
+        }
+        return false;
+    }
+
+    /*package*/ BluetoothDevice getDevice() {
+        return mDevice;
+    }
+
+    private void log(String message) {
+        if (DBG) {
+            Log.i(TAG, "Device:" + mDevice + " Message:" + message);
+        }
+    }
+}
diff --git a/core/java/android/bluetooth/BluetoothHeadset.java b/core/java/android/bluetooth/BluetoothHeadset.java
index 95e61b6..4a91a8c 100644
--- a/core/java/android/bluetooth/BluetoothHeadset.java
+++ b/core/java/android/bluetooth/BluetoothHeadset.java
@@ -189,11 +189,11 @@
      * @return One of the STATE_ return codes, or STATE_ERROR if this proxy
      *         object is currently not connected to the Headset service.
      */
-    public int getState() {
+    public int getState(BluetoothDevice device) {
         if (DBG) log("getState()");
         if (mService != null) {
             try {
-                return mService.getState();
+                return mService.getState(device);
             } catch (RemoteException e) {Log.e(TAG, e.toString());}
         } else {
             Log.w(TAG, "Proxy not attached to service");
@@ -271,11 +271,11 @@
      * be made asynchornous. Returns false if this proxy object is
      * not currently connected to the Headset service.
      */
-    public boolean disconnectHeadset() {
+    public boolean disconnectHeadset(BluetoothDevice device) {
         if (DBG) log("disconnectHeadset()");
         if (mService != null) {
             try {
-                mService.disconnectHeadset();
+                mService.disconnectHeadset(device);
                 return true;
             } catch (RemoteException e) {Log.e(TAG, e.toString());}
         } else {
@@ -395,7 +395,6 @@
         }
         return -1;
     }
-
     /**
      * Indicates if current platform supports voice dialing over bluetooth SCO.
      * @return true if voice dialing over bluetooth is supported, false otherwise.
@@ -406,6 +405,92 @@
                 com.android.internal.R.bool.config_bluetooth_sco_off_call);
     }
 
+    /**
+     * Cancel the outgoing connection.
+     * @hide
+     */
+    public boolean cancelConnectThread() {
+        if (DBG) log("cancelConnectThread");
+        if (mService != null) {
+            try {
+                return mService.cancelConnectThread();
+            } catch (RemoteException e) {Log.e(TAG, e.toString());}
+        } else {
+            Log.w(TAG, "Proxy not attached to service");
+            if (DBG) Log.d(TAG, Log.getStackTraceString(new Throwable()));
+        }
+        return false;
+    }
+
+    /**
+     * Accept the incoming connection.
+     * @hide
+     */
+    public boolean acceptIncomingConnect(BluetoothDevice device) {
+        if (DBG) log("acceptIncomingConnect");
+        if (mService != null) {
+            try {
+                return mService.acceptIncomingConnect(device);
+            } catch (RemoteException e) {Log.e(TAG, e.toString());}
+        } else {
+            Log.w(TAG, "Proxy not attached to service");
+            if (DBG) Log.d(TAG, Log.getStackTraceString(new Throwable()));
+        }
+        return false;
+    }
+
+    /**
+     * Create the connect thread the incoming connection.
+     * @hide
+     */
+    public boolean createIncomingConnect(BluetoothDevice device) {
+        if (DBG) log("createIncomingConnect");
+        if (mService != null) {
+            try {
+                return mService.createIncomingConnect(device);
+            } catch (RemoteException e) {Log.e(TAG, e.toString());}
+        } else {
+            Log.w(TAG, "Proxy not attached to service");
+            if (DBG) Log.d(TAG, Log.getStackTraceString(new Throwable()));
+        }
+        return false;
+    }
+
+    /**
+     * Connect to a Bluetooth Headset.
+     * Note: This is an internal function and shouldn't be exposed
+     * @hide
+     */
+    public boolean connectHeadsetInternal(BluetoothDevice device) {
+        if (DBG) log("connectHeadsetInternal");
+        if (mService != null) {
+            try {
+                return mService.connectHeadsetInternal(device);
+            } catch (RemoteException e) {Log.e(TAG, e.toString());}
+        } else {
+            Log.w(TAG, "Proxy not attached to service");
+            if (DBG) Log.d(TAG, Log.getStackTraceString(new Throwable()));
+        }
+        return false;
+    }
+
+    /**
+     * Disconnect a Bluetooth Headset.
+     * Note: This is an internal function and shouldn't be exposed
+     * @hide
+     */
+    public boolean disconnectHeadsetInternal(BluetoothDevice device) {
+        if (DBG) log("disconnectHeadsetInternal");
+        if (mService != null) {
+            try {
+                 return mService.disconnectHeadsetInternal(device);
+            } catch (RemoteException e) {Log.e(TAG, e.toString());}
+        } else {
+            Log.w(TAG, "Proxy not attached to service");
+            if (DBG) Log.d(TAG, Log.getStackTraceString(new Throwable()));
+        }
+        return false;
+    }
     private ServiceConnection mConnection = new ServiceConnection() {
         public void onServiceConnected(ComponentName className, IBinder service) {
             if (DBG) Log.d(TAG, "Proxy object connected");
diff --git a/core/java/android/bluetooth/BluetoothProfileState.java b/core/java/android/bluetooth/BluetoothProfileState.java
new file mode 100644
index 0000000..946dcaa
--- /dev/null
+++ b/core/java/android/bluetooth/BluetoothProfileState.java
@@ -0,0 +1,144 @@
+/*
+ * Copyright (C) 2010 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package android.bluetooth;
+
+import android.content.BroadcastReceiver;
+import android.content.Context;
+import android.content.Intent;
+import android.content.IntentFilter;
+import android.os.Message;
+import android.util.Log;
+
+import com.android.internal.util.HierarchicalState;
+import com.android.internal.util.HierarchicalStateMachine;
+
+/**
+ * This state machine is used to serialize the connections
+ * to a particular profile. Currently, we only allow one device
+ * to be connected to a particular profile.
+ * States:
+ *      {@link StableState} : No pending commands. Send the
+ *      command to the appropriate remote device specific state machine.
+ *
+ *      {@link PendingCommandState} : A profile connection / disconnection
+ *      command is being executed. This will result in a profile state
+ *      change. Defer all commands.
+ * @hide
+ */
+
+public class BluetoothProfileState extends HierarchicalStateMachine {
+    private static final boolean DBG = true; // STOPSHIP - change to false.
+    private static final String TAG = "BluetoothProfileState";
+
+    public static int HFP = 0;
+    public static int A2DP = 1;
+
+    private static int TRANSITION_TO_STABLE = 100;
+
+    private int mProfile;
+    private BluetoothDevice mPendingDevice;
+    private PendingCommandState mPendingCommandState = new PendingCommandState();
+    private StableState mStableState = new StableState();
+
+    private BroadcastReceiver mBroadcastReceiver = new BroadcastReceiver() {
+        @Override
+        public void onReceive(Context context, Intent intent) {
+            String action = intent.getAction();
+
+            if (action.equals(BluetoothHeadset.ACTION_STATE_CHANGED)) {
+                int newState = intent.getIntExtra(BluetoothHeadset.EXTRA_STATE, 0);
+                if (mProfile == HFP && (newState == BluetoothHeadset.STATE_CONNECTED ||
+                    newState == BluetoothHeadset.STATE_DISCONNECTED)) {
+                    sendMessage(TRANSITION_TO_STABLE);
+                }
+            } else if (action.equals(BluetoothA2dp.ACTION_SINK_STATE_CHANGED)) {
+                int newState = intent.getIntExtra(BluetoothA2dp.EXTRA_SINK_STATE, 0);
+                if (mProfile == A2DP && (newState == BluetoothA2dp.STATE_CONNECTED ||
+                    newState == BluetoothA2dp.STATE_DISCONNECTED)) {
+                    sendMessage(TRANSITION_TO_STABLE);
+                }
+            }
+        }
+    };
+
+    public BluetoothProfileState(Context context, int profile) {
+        super("BluetoothProfileState:" + profile);
+        mProfile = profile;
+        addState(mStableState);
+        addState(mPendingCommandState);
+        setInitialState(mStableState);
+
+        IntentFilter filter = new IntentFilter();
+        filter.addAction(BluetoothA2dp.ACTION_SINK_STATE_CHANGED);
+        filter.addAction(BluetoothHeadset.ACTION_STATE_CHANGED);
+        context.registerReceiver(mBroadcastReceiver, filter);
+    }
+
+    private class StableState extends HierarchicalState {
+        @Override
+        protected void enter() {
+            log("Entering Stable State");
+            mPendingDevice = null;
+        }
+
+        @Override
+        protected boolean processMessage(Message msg) {
+            if (msg.what != TRANSITION_TO_STABLE) {
+                transitionTo(mPendingCommandState);
+            }
+            return true;
+        }
+    }
+
+    private class PendingCommandState extends HierarchicalState {
+        @Override
+        protected void enter() {
+            log("Entering PendingCommandState State");
+            dispatchMessage(getCurrentMessage());
+        }
+
+        @Override
+        protected boolean processMessage(Message msg) {
+            if (msg.what == TRANSITION_TO_STABLE) {
+                transitionTo(mStableState);
+            } else {
+                dispatchMessage(msg);
+            }
+            return true;
+        }
+
+        private void dispatchMessage(Message msg) {
+            BluetoothDeviceProfileState deviceProfileMgr =
+              (BluetoothDeviceProfileState)msg.obj;
+            int cmd = msg.arg1;
+            if (mPendingDevice == null || mPendingDevice.equals(deviceProfileMgr.getDevice())) {
+                mPendingDevice = deviceProfileMgr.getDevice();
+                deviceProfileMgr.sendMessage(cmd);
+            } else {
+                Message deferMsg = new Message();
+                deferMsg.arg1 = cmd;
+                deferMsg.obj = deviceProfileMgr;
+                deferMessage(deferMsg);
+            }
+        }
+    }
+
+    private void log(String message) {
+        if (DBG) {
+            Log.i(TAG, "Message:" + message);
+        }
+    }
+}
diff --git a/core/java/android/bluetooth/IBluetooth.aidl b/core/java/android/bluetooth/IBluetooth.aidl
index 0868779..ea71034 100644
--- a/core/java/android/bluetooth/IBluetooth.aidl
+++ b/core/java/android/bluetooth/IBluetooth.aidl
@@ -68,4 +68,8 @@
 
     int addRfcommServiceRecord(in String serviceName, in ParcelUuid uuid, int channel, IBinder b);
     void removeServiceRecord(int handle);
+
+    boolean connectHeadset(String address);
+    boolean disconnectHeadset(String address);
+    boolean notifyIncomingConnection(String address);
 }
diff --git a/core/java/android/bluetooth/IBluetoothA2dp.aidl b/core/java/android/bluetooth/IBluetoothA2dp.aidl
index 168fe3b..40f1058 100644
--- a/core/java/android/bluetooth/IBluetoothA2dp.aidl
+++ b/core/java/android/bluetooth/IBluetoothA2dp.aidl
@@ -33,4 +33,7 @@
     int getSinkState(in BluetoothDevice device);
     boolean setSinkPriority(in BluetoothDevice device, int priority);
     int getSinkPriority(in BluetoothDevice device);
+
+    boolean connectSinkInternal(in BluetoothDevice device);
+    boolean disconnectSinkInternal(in BluetoothDevice device);
 }
diff --git a/core/java/android/bluetooth/IBluetoothHeadset.aidl b/core/java/android/bluetooth/IBluetoothHeadset.aidl
index 6cccd50..d96f0ca 100644
--- a/core/java/android/bluetooth/IBluetoothHeadset.aidl
+++ b/core/java/android/bluetooth/IBluetoothHeadset.aidl
@@ -24,14 +24,20 @@
  * {@hide}
  */
 interface IBluetoothHeadset {
-    int getState();
+    int getState(in BluetoothDevice device);
     BluetoothDevice getCurrentHeadset();
     boolean connectHeadset(in BluetoothDevice device);
-    void disconnectHeadset();
+    void disconnectHeadset(in BluetoothDevice device);
     boolean isConnected(in BluetoothDevice device);
     boolean startVoiceRecognition();
     boolean stopVoiceRecognition();
     boolean setPriority(in BluetoothDevice device, int priority);
     int getPriority(in BluetoothDevice device);
     int getBatteryUsageHint();
+
+    boolean createIncomingConnect(in BluetoothDevice device);
+    boolean acceptIncomingConnect(in BluetoothDevice device);
+    boolean cancelConnectThread();
+    boolean connectHeadsetInternal(in BluetoothDevice device);
+    boolean disconnectHeadsetInternal(in BluetoothDevice device);
 }
diff --git a/core/java/android/content/ContentResolver.java b/core/java/android/content/ContentResolver.java
index b4718ab..69f7611 100644
--- a/core/java/android/content/ContentResolver.java
+++ b/core/java/android/content/ContentResolver.java
@@ -18,6 +18,7 @@
 
 import android.accounts.Account;
 import android.app.ActivityThread;
+import android.app.AppGlobals;
 import android.content.pm.PackageManager.NameNotFoundException;
 import android.content.res.AssetFileDescriptor;
 import android.content.res.Resources;
@@ -1306,7 +1307,7 @@
         // ActivityThread.currentPackageName() only returns non-null if the
         // current thread is an application main thread.  This parameter tells
         // us whether an event loop is blocked, and if so, which app it is.
-        String blockingPackage = ActivityThread.currentPackageName();
+        String blockingPackage = AppGlobals.getInitialPackage();
 
         EventLog.writeEvent(
             EventLogTags.CONTENT_QUERY_SAMPLE,
@@ -1329,7 +1330,7 @@
                 }
             }
         }
-        String blockingPackage = ActivityThread.currentPackageName();
+        String blockingPackage = AppGlobals.getInitialPackage();
         EventLog.writeEvent(
             EventLogTags.CONTENT_UPDATE_SAMPLE,
             uri.toString(),
diff --git a/core/java/android/content/ContentService.java b/core/java/android/content/ContentService.java
index 377e383..fc2dfc0 100644
--- a/core/java/android/content/ContentService.java
+++ b/core/java/android/content/ContentService.java
@@ -537,6 +537,9 @@
 
             // Look to see if the proper child already exists
             String segment = getUriSegment(uri, index);
+            if (segment == null) {
+                throw new IllegalArgumentException("Invalid Uri (" + uri + ") used for observer");
+            }
             int N = mChildren.size();
             for (int i = 0; i < N; i++) {
                 ObserverNode node = mChildren.get(i);
diff --git a/core/java/android/content/Context.java b/core/java/android/content/Context.java
index 30822d4..e3b7731 100644
--- a/core/java/android/content/Context.java
+++ b/core/java/android/content/Context.java
@@ -1372,9 +1372,8 @@
     public static final String SENSOR_SERVICE = "sensor";
     
     /**
-     * @hide
      * Use with {@link #getSystemService} to retrieve a {@link
-     * android.os.storage.StorageManager} for accesssing system storage
+     * android.os.storage.StorageManager} for accessing system storage
      * functions.
      *
      * @see #getSystemService
@@ -1535,6 +1534,15 @@
     public static final String UI_MODE_SERVICE = "uimode";
 
     /**
+     * Use with {@link #getSystemService} to retrieve a
+     * {@link android.net.DownloadManager} for requesting HTTP downloads.
+     *
+     * @see #getSystemService
+     * @hide (TODO) for now
+     */
+    public static final String DOWNLOAD_SERVICE = "download";
+
+    /**
      * Determine whether the given permission is allowed for a particular
      * process and user ID running in the system.
      *
diff --git a/core/java/android/content/IntentSender.java b/core/java/android/content/IntentSender.java
index e182021..007a715 100644
--- a/core/java/android/content/IntentSender.java
+++ b/core/java/android/content/IntentSender.java
@@ -16,6 +16,7 @@
 
 package android.content;
 
+import android.app.ActivityManagerNative;
 import android.content.Context;
 import android.content.Intent;
 import android.content.IIntentSender;
@@ -170,6 +171,25 @@
     }
 
     /**
+     * Return the package name of the application that created this
+     * IntentSender, that is the identity under which you will actually be
+     * sending the Intent.  The returned string is supplied by the system, so
+     * that an application can not spoof its package.
+     *
+     * @return The package name of the PendingIntent, or null if there is
+     * none associated with it.
+     */
+    public String getTargetPackage() {
+        try {
+            return ActivityManagerNative.getDefault()
+                .getPackageForIntentSender(mTarget);
+        } catch (RemoteException e) {
+            // Should never happen.
+            return null;
+        }
+    }
+
+    /**
      * Comparison operator on two IntentSender objects, such that true
      * is returned then they both represent the same operation from the
      * same package.
diff --git a/core/java/android/content/SyncStorageEngine.java b/core/java/android/content/SyncStorageEngine.java
index 98a4993..6413cec 100644
--- a/core/java/android/content/SyncStorageEngine.java
+++ b/core/java/android/content/SyncStorageEngine.java
@@ -317,7 +317,9 @@
         if (sSyncStorageEngine != null) {
             return;
         }
-        File dataDir = Environment.getDataDirectory();
+        // This call will return the correct directory whether Encrypted File Systems is
+        // enabled or not.
+        File dataDir = Environment.getSecureDataDirectory();
         sSyncStorageEngine = new SyncStorageEngine(context, dataDir);
     }
 
diff --git a/core/java/android/content/pm/ActivityInfo.java b/core/java/android/content/pm/ActivityInfo.java
index 238b840..364c91e 100644
--- a/core/java/android/content/pm/ActivityInfo.java
+++ b/core/java/android/content/pm/ActivityInfo.java
@@ -149,14 +149,33 @@
      * {@link android.R.attr#finishOnCloseSystemDialogs} attribute.
      */
     public static final int FLAG_FINISH_ON_CLOSE_SYSTEM_DIALOGS = 0x0100;
+    /** 
+     * Bit in {@link #flags} corresponding to an immersive activity
+     * that wishes not to be interrupted by notifications.
+     * Applications that hide the system notification bar with
+     * {@link android.view.WindowManager.LayoutParams#FLAG_FULLSCREEN}
+     * may still be interrupted by high-priority notifications; for example, an
+     * incoming phone call may use
+     * {@link android.app.Notification#fullScreenIntent fullScreenIntent}
+     * to present a full-screen in-call activity to the user, pausing the
+     * current activity as a side-effect. An activity with
+     * {@link #FLAG_IMMERSIVE} set, however, will not be interrupted; the
+     * notification may be shown in some other way (such as a small floating
+     * "toast" window).
+     * {@see android.app.Notification#FLAG_HIGH_PRIORITY}
+     */
+    public static final int FLAG_IMMERSIVE = 0x0200;
     /**
      * Options that have been set in the activity declaration in the
-     * manifest: {@link #FLAG_MULTIPROCESS},
+     * manifest.
+     * These include:
+     * {@link #FLAG_MULTIPROCESS},
      * {@link #FLAG_FINISH_ON_TASK_LAUNCH}, {@link #FLAG_CLEAR_TASK_ON_LAUNCH},
      * {@link #FLAG_ALWAYS_RETAIN_TASK_STATE},
      * {@link #FLAG_STATE_NOT_NEEDED}, {@link #FLAG_EXCLUDE_FROM_RECENTS},
      * {@link #FLAG_ALLOW_TASK_REPARENTING}, {@link #FLAG_NO_HISTORY},
-     * {@link #FLAG_FINISH_ON_CLOSE_SYSTEM_DIALOGS}.
+     * {@link #FLAG_FINISH_ON_CLOSE_SYSTEM_DIALOGS},
+     * {@link #FLAG_IMMERSIVE}
      */
     public int flags;
 
diff --git a/core/java/android/content/pm/ApplicationInfo.java b/core/java/android/content/pm/ApplicationInfo.java
index 1577f9e..7901b155 100644
--- a/core/java/android/content/pm/ApplicationInfo.java
+++ b/core/java/android/content/pm/ApplicationInfo.java
@@ -174,7 +174,7 @@
      * Value for {@link #flags}: true when the application's window can be
      * increased in size for larger screens.  Corresponds to
      * {@link android.R.styleable#AndroidManifestSupportsScreens_largeScreens
-     * android:smallScreens}.
+     * android:largeScreens}.
      */
     public static final int FLAG_SUPPORTS_LARGE_SCREENS = 1<<11;
     
@@ -252,6 +252,9 @@
     public static final int FLAG_RESTORE_ANY_VERSION = 1<<17;
 
     /**
+     * Value for {@link #flags}: Set to true if the application has been
+     * installed using the forward lock option.
+     *
      * Value for {@link #flags}: Set to true if the application is
      * currently installed on external/removable/unprotected storage.  Such
      * applications may not be available if their storage is not currently
@@ -262,12 +265,41 @@
     public static final int FLAG_EXTERNAL_STORAGE = 1<<18;
 
     /**
+     * Value for {@link #flags}: true when the application's window can be
+     * increased in size for extra large screens.  Corresponds to
+     * {@link android.R.styleable#AndroidManifestSupportsScreens_xlargeScreens
+     * android:xlargeScreens}.
+     */
+    public static final int FLAG_SUPPORTS_XLARGE_SCREENS = 1<<19;
+    
+    /**
+     * Value for {@link #flags}: set to <code>true</code> if the application
+     * has reported that it is heavy-weight, and thus can not participate in
+     * the normal application lifecycle.
+     * 
+     * <p>Comes from the
+     * {@link android.R.styleable#AndroidManifestApplication_heavyWeight android:heavyWeight}
+     * attribute of the &lt;application&gt; tag.
+     */
+    public static final int FLAG_HEAVY_WEIGHT = 1<<20;
+    
+    /**
+     * Value for {@link #flags}: this is true if the application has set
+     * its android:neverEncrypt to true, false otherwise. It is used to specify
+     * that this package specifically "opts-out" of a secured file system solution,
+     * and will always store its data in-the-clear.
+     *
+     * {@hide}
+     */
+    public static final int FLAG_NEVER_ENCRYPT = 1<<30;
+
+    /**
      * Value for {@link #flags}: Set to true if the application has been
      * installed using the forward lock option.
      *
      * {@hide}
      */
-    public static final int FLAG_FORWARD_LOCK = 1<<20;
+    public static final int FLAG_FORWARD_LOCK = 1<<29;
 
     /**
      * Value for {@link #flags}: Set to true if the application is
@@ -275,7 +307,7 @@
      *
      * {@hide}
      */
-    public static final int FLAG_NATIVE_DEBUGGABLE = 1<<21;
+    public static final int FLAG_NATIVE_DEBUGGABLE = 1<<28;
 
     /**
      * Flags associated with the application.  Any combination of
@@ -285,7 +317,8 @@
      * {@link #FLAG_ALLOW_CLEAR_USER_DATA}, {@link #FLAG_UPDATED_SYSTEM_APP},
      * {@link #FLAG_TEST_ONLY}, {@link #FLAG_SUPPORTS_SMALL_SCREENS},
      * {@link #FLAG_SUPPORTS_NORMAL_SCREENS},
-     * {@link #FLAG_SUPPORTS_LARGE_SCREENS}, {@link #FLAG_RESIZEABLE_FOR_SCREENS},
+     * {@link #FLAG_SUPPORTS_LARGE_SCREENS}, {@link #FLAG_SUPPORTS_XLARGE_SCREENS},
+     * {@link #FLAG_RESIZEABLE_FOR_SCREENS},
      * {@link #FLAG_SUPPORTS_SCREEN_DENSITIES}, {@link #FLAG_VM_SAFE_MODE}
      */
     public int flags = 0;
@@ -517,7 +550,7 @@
     public void disableCompatibilityMode() {
         flags |= (FLAG_SUPPORTS_LARGE_SCREENS | FLAG_SUPPORTS_NORMAL_SCREENS |
                 FLAG_SUPPORTS_SMALL_SCREENS | FLAG_RESIZEABLE_FOR_SCREENS |
-                FLAG_SUPPORTS_SCREEN_DENSITIES);
+                FLAG_SUPPORTS_SCREEN_DENSITIES | FLAG_SUPPORTS_XLARGE_SCREENS);
     }
     
     /**
diff --git a/core/java/android/content/pm/ComponentInfo.java b/core/java/android/content/pm/ComponentInfo.java
index cafe372..f16c4ef 100644
--- a/core/java/android/content/pm/ComponentInfo.java
+++ b/core/java/android/content/pm/ComponentInfo.java
@@ -157,6 +157,14 @@
     /**
      * @hide
      */
+    @Override
+    protected Drawable loadDefaultLogo(PackageManager pm) {
+        return applicationInfo.loadLogo(pm);
+    }
+    
+    /**
+     * @hide
+     */
     @Override protected ApplicationInfo getApplicationInfo() {
         return applicationInfo;
     }
diff --git a/core/java/android/content/pm/IPackageManager.aidl b/core/java/android/content/pm/IPackageManager.aidl
index 9939478..160a481 100644
--- a/core/java/android/content/pm/IPackageManager.aidl
+++ b/core/java/android/content/pm/IPackageManager.aidl
@@ -319,4 +319,6 @@
 
     boolean setInstallLocation(int loc);
     int getInstallLocation();
+
+    void setPackageObbPath(String packageName, String path);
 }
diff --git a/core/java/android/content/pm/PackageItemInfo.java b/core/java/android/content/pm/PackageItemInfo.java
index 14c06800..d73aaf6 100644
--- a/core/java/android/content/pm/PackageItemInfo.java
+++ b/core/java/android/content/pm/PackageItemInfo.java
@@ -67,6 +67,14 @@
     public int icon;
     
     /**
+     * A drawable resource identifier (in the package's resources) of this
+     * component's logo. Logos may be larger/wider than icons and are
+     * displayed by certain UI elements in place of a name or name/icon
+     * combination. From the "logo" attribute or, if not set, 0. 
+     */
+    public int logo;
+    
+    /**
      * Additional meta-data associated with this component.  This field
      * will only be filled in if you set the
      * {@link PackageManager#GET_META_DATA} flag when requesting the info.
@@ -84,6 +92,7 @@
         nonLocalizedLabel = orig.nonLocalizedLabel;
         if (nonLocalizedLabel != null) nonLocalizedLabel = nonLocalizedLabel.toString().trim();
         icon = orig.icon;
+        logo = orig.logo;
         metaData = orig.metaData;
     }
 
@@ -152,6 +161,42 @@
     }
     
     /**
+     * Retrieve the current graphical logo associated with this item. This
+     * will call back on the given PackageManager to load the logo from
+     * the application.
+     * 
+     * @param pm A PackageManager from which the logo can be loaded; usually
+     * the PackageManager from which you originally retrieved this item.
+     * 
+     * @return Returns a Drawable containing the item's logo. If the item
+     * does not have a logo, this method will return null.
+     */
+    public Drawable loadLogo(PackageManager pm) {
+        if (logo != 0) {
+            Drawable d = pm.getDrawable(packageName, logo, getApplicationInfo());
+            if (d != null) {
+                return d;
+            }
+        }
+        return loadDefaultLogo(pm);
+    }
+    
+    /**
+     * Retrieve the default graphical logo associated with this item.
+     * 
+     * @param pm A PackageManager from which the logo can be loaded; usually
+     * the PackageManager from which you originally retrieved this item.
+     * 
+     * @return Returns a Drawable containing the item's default logo
+     * or null if no default logo is available.
+     * 
+     * @hide
+     */
+    protected Drawable loadDefaultLogo(PackageManager pm) {
+        return null;
+    }
+    
+    /**
      * Load an XML resource attached to the meta-data of this item.  This will
      * retrieved the name meta-data entry, and if defined call back on the
      * given PackageManager to load its XML file from the application.
@@ -196,6 +241,7 @@
         dest.writeInt(labelRes);
         TextUtils.writeToParcel(nonLocalizedLabel, dest, parcelableFlags);
         dest.writeInt(icon);
+        dest.writeInt(logo);
         dest.writeBundle(metaData);
     }
     
@@ -206,6 +252,7 @@
         nonLocalizedLabel
                 = TextUtils.CHAR_SEQUENCE_CREATOR.createFromParcel(source);
         icon = source.readInt();
+        logo = source.readInt();
         metaData = source.readBundle();
     }
 
diff --git a/core/java/android/content/pm/PackageManager.java b/core/java/android/content/pm/PackageManager.java
index 68b44e7..15a446b 100644
--- a/core/java/android/content/pm/PackageManager.java
+++ b/core/java/android/content/pm/PackageManager.java
@@ -656,6 +656,13 @@
 
     /**
      * Feature for {@link #getSystemAvailableFeatures} and
+     * {@link #hasSystemFeature}: The device has a front facing camera.
+     */
+    @SdkConstant(SdkConstantType.FEATURE)
+    public static final String FEATURE_CAMERA_FRONT = "android.hardware.camera.front";
+
+    /**
+     * Feature for {@link #getSystemAvailableFeatures} and
      * {@link #hasSystemFeature}: The device supports one or more methods of
      * reporting current location.
      */
@@ -1597,6 +1604,79 @@
             throws NameNotFoundException;
 
     /**
+     * Retrieve the logo associated with an activity.  Given the full name of
+     * an activity, retrieves the information about it and calls
+     * {@link ComponentInfo#loadLogo ComponentInfo.loadLogo()} to return its logo.
+     * If the activity can not be found, NameNotFoundException is thrown.
+     *
+     * @param activityName Name of the activity whose logo is to be retrieved.
+     *
+     * @return Returns the image of the logo or null if the activity has no
+     * logo specified.
+     * 
+     * @throws NameNotFoundException Thrown if the resources for the given
+     * activity could not be loaded.
+     *
+     * @see #getActivityLogo(Intent)
+     */
+    public abstract Drawable getActivityLogo(ComponentName activityName)
+            throws NameNotFoundException;
+
+    /**
+     * Retrieve the logo associated with an Intent.  If intent.getClassName() is
+     * set, this simply returns the result of
+     * getActivityLogo(intent.getClassName()).  Otherwise it resolves the intent's
+     * component and returns the logo associated with the resolved component.
+     * If intent.getClassName() can not be found or the Intent can not be resolved
+     * to a component, NameNotFoundException is thrown.
+     *
+     * @param intent The intent for which you would like to retrieve a logo.
+     *
+     * @return Returns the image of the logo, or null if the activity has no
+     * logo specified.
+     * 
+     * @throws NameNotFoundException Thrown if the resources for application
+     * matching the given intent could not be loaded.
+     *
+     * @see #getActivityLogo(ComponentName)
+     */
+    public abstract Drawable getActivityLogo(Intent intent)
+            throws NameNotFoundException;
+
+    /**
+     * Retrieve the logo associated with an application.  If it has not specified
+     * a logo, this method returns null.
+     *
+     * @param info Information about application being queried.
+     *
+     * @return Returns the image of the logo, or null if no logo is specified
+     * by the application.
+     *
+     * @see #getApplicationLogo(String)
+     */
+    public abstract Drawable getApplicationLogo(ApplicationInfo info);
+
+    /**
+     * Retrieve the logo associated with an application.  Given the name of the
+     * application's package, retrieves the information about it and calls
+     * getApplicationLogo() to return its logo. If the application can not be
+     * found, NameNotFoundException is thrown.
+     *
+     * @param packageName Name of the package whose application logo is to be
+     *                    retrieved.
+     *
+     * @return Returns the image of the logo, or null if no application logo
+     * has been specified.
+     * 
+     * @throws NameNotFoundException Thrown if the resources for the given
+     * application could not be loaded.
+     *
+     * @see #getApplicationLogo(ApplicationInfo)
+     */
+    public abstract Drawable getApplicationLogo(String packageName)
+            throws NameNotFoundException;
+
+    /**
      * Retrieve text from a package.  This is a low-level API used by
      * the various package manager info structures (such as
      * {@link ComponentInfo} to implement retrieval of their associated
@@ -2113,4 +2193,17 @@
      */
     public abstract void movePackage(
             String packageName, IPackageMoveObserver observer, int flags);
+
+    /**
+     * Sets the Opaque Binary Blob (OBB) file location.
+     * <p>
+     * NOTE: The existence or format of this file is not currently checked, but
+     * it may be in the future.
+     * 
+     * @param packageName Name of the package with which to associate the .obb
+     *            file
+     * @param path Path on the filesystem to the .obb file
+     * @hide
+     */
+    public abstract void setPackageObbPath(String packageName, String path);
 }
diff --git a/core/java/android/content/pm/PackageParser.java b/core/java/android/content/pm/PackageParser.java
index 2a20a2d..5dc41d2 100644
--- a/core/java/android/content/pm/PackageParser.java
+++ b/core/java/android/content/pm/PackageParser.java
@@ -105,17 +105,19 @@
         final int nameRes;
         final int labelRes;
         final int iconRes;
+        final int logoRes;
         
         String tag;
         TypedArray sa;
         
         ParsePackageItemArgs(Package _owner, String[] _outError,
-                int _nameRes, int _labelRes, int _iconRes) {
+                int _nameRes, int _labelRes, int _iconRes, int _logoRes) {
             owner = _owner;
             outError = _outError;
             nameRes = _nameRes;
             labelRes = _labelRes;
             iconRes = _iconRes;
+            logoRes = _logoRes;
         }
     }
     
@@ -127,10 +129,10 @@
         int flags;
         
         ParseComponentArgs(Package _owner, String[] _outError,
-                int _nameRes, int _labelRes, int _iconRes,
+                int _nameRes, int _labelRes, int _iconRes, int _logoRes,
                 String[] _sepProcesses, int _processRes,
                 int _descriptionRes, int _enabledRes) {
-            super(_owner, _outError, _nameRes, _labelRes, _iconRes);
+            super(_owner, _outError, _nameRes, _labelRes, _iconRes, _logoRes);
             sepProcesses = _sepProcesses;
             processRes = _processRes;
             descriptionRes = _descriptionRes;
@@ -789,6 +791,7 @@
         int supportsSmallScreens = 1;
         int supportsNormalScreens = 1;
         int supportsLargeScreens = 1;
+        int supportsXLargeScreens = 1;
         int resizeable = 1;
         int anyDensity = 1;
         
@@ -996,9 +999,12 @@
                 supportsLargeScreens = sa.getInteger(
                         com.android.internal.R.styleable.AndroidManifestSupportsScreens_largeScreens,
                         supportsLargeScreens);
+                supportsXLargeScreens = sa.getInteger(
+                        com.android.internal.R.styleable.AndroidManifestSupportsScreens_xlargeScreens,
+                        supportsXLargeScreens);
                 resizeable = sa.getInteger(
                         com.android.internal.R.styleable.AndroidManifestSupportsScreens_resizeable,
-                        supportsLargeScreens);
+                        resizeable);
                 anyDensity = sa.getInteger(
                         com.android.internal.R.styleable.AndroidManifestSupportsScreens_anyDensity,
                         anyDensity);
@@ -1132,6 +1138,11 @@
                         >= android.os.Build.VERSION_CODES.DONUT)) {
             pkg.applicationInfo.flags |= ApplicationInfo.FLAG_SUPPORTS_LARGE_SCREENS;
         }
+        if (supportsXLargeScreens < 0 || (supportsXLargeScreens > 0
+                && pkg.applicationInfo.targetSdkVersion
+                        >= android.os.Build.VERSION_CODES.GINGERBREAD)) {
+            pkg.applicationInfo.flags |= ApplicationInfo.FLAG_SUPPORTS_XLARGE_SCREENS;
+        }
         if (resizeable < 0 || (resizeable > 0
                 && pkg.applicationInfo.targetSdkVersion
                         >= android.os.Build.VERSION_CODES.DONUT)) {
@@ -1241,7 +1252,8 @@
                 "<permission-group>", sa,
                 com.android.internal.R.styleable.AndroidManifestPermissionGroup_name,
                 com.android.internal.R.styleable.AndroidManifestPermissionGroup_label,
-                com.android.internal.R.styleable.AndroidManifestPermissionGroup_icon)) {
+                com.android.internal.R.styleable.AndroidManifestPermissionGroup_icon,
+                com.android.internal.R.styleable.AndroidManifestPermissionGroup_logo)) {
             sa.recycle();
             mParseError = PackageManager.INSTALL_PARSE_FAILED_MANIFEST_MALFORMED;
             return null;
@@ -1276,7 +1288,8 @@
                 "<permission>", sa,
                 com.android.internal.R.styleable.AndroidManifestPermission_name,
                 com.android.internal.R.styleable.AndroidManifestPermission_label,
-                com.android.internal.R.styleable.AndroidManifestPermission_icon)) {
+                com.android.internal.R.styleable.AndroidManifestPermission_icon,
+                com.android.internal.R.styleable.AndroidManifestPermission_logo)) {
             sa.recycle();
             mParseError = PackageManager.INSTALL_PARSE_FAILED_MANIFEST_MALFORMED;
             return null;
@@ -1329,7 +1342,8 @@
                 "<permission-tree>", sa,
                 com.android.internal.R.styleable.AndroidManifestPermissionTree_name,
                 com.android.internal.R.styleable.AndroidManifestPermissionTree_label,
-                com.android.internal.R.styleable.AndroidManifestPermissionTree_icon)) {
+                com.android.internal.R.styleable.AndroidManifestPermissionTree_icon,
+                com.android.internal.R.styleable.AndroidManifestPermissionTree_logo)) {
             sa.recycle();
             mParseError = PackageManager.INSTALL_PARSE_FAILED_MANIFEST_MALFORMED;
             return null;
@@ -1373,7 +1387,8 @@
             mParseInstrumentationArgs = new ParsePackageItemArgs(owner, outError,
                     com.android.internal.R.styleable.AndroidManifestInstrumentation_name,
                     com.android.internal.R.styleable.AndroidManifestInstrumentation_label,
-                    com.android.internal.R.styleable.AndroidManifestInstrumentation_icon);
+                    com.android.internal.R.styleable.AndroidManifestInstrumentation_icon,
+                    com.android.internal.R.styleable.AndroidManifestInstrumentation_logo);
             mParseInstrumentationArgs.tag = "<instrumentation>";
         }
         
@@ -1485,6 +1500,8 @@
 
         ai.icon = sa.getResourceId(
                 com.android.internal.R.styleable.AndroidManifestApplication_icon, 0);
+        ai.logo = sa.getResourceId(
+                com.android.internal.R.styleable.AndroidManifestApplication_logo, 0);
         ai.theme = sa.getResourceId(
                 com.android.internal.R.styleable.AndroidManifestApplication_theme, 0);
         ai.descriptionRes = sa.getResourceId(
@@ -1542,6 +1559,12 @@
             ai.flags |= ApplicationInfo.FLAG_TEST_ONLY;
         }
 
+        if (sa.getBoolean(
+                com.android.internal.R.styleable.AndroidManifestApplication_neverEncrypt,
+                false)) {
+            ai.flags |= ApplicationInfo.FLAG_NEVER_ENCRYPT;
+        }
+
         String str;
         str = sa.getNonConfigurationString(
                 com.android.internal.R.styleable.AndroidManifestApplication_permission, 0);
@@ -1577,6 +1600,18 @@
     
             ai.enabled = sa.getBoolean(
                     com.android.internal.R.styleable.AndroidManifestApplication_enabled, true);
+            
+            if (sa.getBoolean(
+                    com.android.internal.R.styleable.AndroidManifestApplication_heavyWeight,
+                    false)) {
+                ai.flags |= ApplicationInfo.FLAG_HEAVY_WEIGHT;
+                
+                // A heavy-weight application can not be in a custom process.
+                // We can do direct compare because we intern all strings.
+                if (ai.processName != null && ai.processName != ai.packageName) {
+                    outError[0] = "Heavy-weight applications can not use custom processes";
+                }
+            }
         }
 
         sa.recycle();
@@ -1705,7 +1740,7 @@
 
     private boolean parsePackageItemInfo(Package owner, PackageItemInfo outInfo,
             String[] outError, String tag, TypedArray sa,
-            int nameRes, int labelRes, int iconRes) {
+            int nameRes, int labelRes, int iconRes, int logoRes) {
         String name = sa.getNonConfigurationString(nameRes, 0);
         if (name == null) {
             outError[0] = tag + " does not specify android:name";
@@ -1723,6 +1758,11 @@
             outInfo.icon = iconVal;
             outInfo.nonLocalizedLabel = null;
         }
+        
+        int logoVal = sa.getResourceId(logoRes, 0);
+        if (logoVal != 0) {
+            outInfo.logo = logoVal;
+        }
 
         TypedValue v = sa.peekValue(labelRes);
         if (v != null && (outInfo.labelRes=v.resourceId) == 0) {
@@ -1745,6 +1785,7 @@
                     com.android.internal.R.styleable.AndroidManifestActivity_name,
                     com.android.internal.R.styleable.AndroidManifestActivity_label,
                     com.android.internal.R.styleable.AndroidManifestActivity_icon,
+                    com.android.internal.R.styleable.AndroidManifestActivity_logo,
                     mSeparateProcesses,
                     com.android.internal.R.styleable.AndroidManifestActivity_process,
                     com.android.internal.R.styleable.AndroidManifestActivity_description,
@@ -1840,6 +1881,12 @@
             a.info.flags |= ActivityInfo.FLAG_FINISH_ON_CLOSE_SYSTEM_DIALOGS;
         }
 
+        if (sa.getBoolean(
+                com.android.internal.R.styleable.AndroidManifestActivity_immersive,
+                false)) {
+            a.info.flags |= ActivityInfo.FLAG_IMMERSIVE;
+        }
+
         if (!receiver) {
             a.info.launchMode = sa.getInt(
                     com.android.internal.R.styleable.AndroidManifestActivity_launchMode,
@@ -1860,6 +1907,14 @@
 
         sa.recycle();
 
+        if (receiver && (owner.applicationInfo.flags&ApplicationInfo.FLAG_HEAVY_WEIGHT) != 0) {
+            // A heavy-weight application can not have receives in its main process
+            // We can do direct compare because we intern all strings.
+            if (a.info.processName == owner.packageName) {
+                outError[0] = "Heavy-weight applications can not have receivers in main process";
+            }
+        }
+        
         if (outError[0] != null) {
             return null;
         }
@@ -1947,6 +2002,7 @@
                     com.android.internal.R.styleable.AndroidManifestActivityAlias_name,
                     com.android.internal.R.styleable.AndroidManifestActivityAlias_label,
                     com.android.internal.R.styleable.AndroidManifestActivityAlias_icon,
+                    com.android.internal.R.styleable.AndroidManifestActivityAlias_logo,
                     mSeparateProcesses,
                     0,
                     com.android.internal.R.styleable.AndroidManifestActivityAlias_description,
@@ -1980,6 +2036,7 @@
         info.configChanges = target.info.configChanges;
         info.flags = target.info.flags;
         info.icon = target.info.icon;
+        info.logo = target.info.logo;
         info.labelRes = target.info.labelRes;
         info.nonLocalizedLabel = target.info.nonLocalizedLabel;
         info.launchMode = target.info.launchMode;
@@ -2074,6 +2131,7 @@
                     com.android.internal.R.styleable.AndroidManifestProvider_name,
                     com.android.internal.R.styleable.AndroidManifestProvider_label,
                     com.android.internal.R.styleable.AndroidManifestProvider_icon,
+                    com.android.internal.R.styleable.AndroidManifestProvider_logo,
                     mSeparateProcesses,
                     com.android.internal.R.styleable.AndroidManifestProvider_process,
                     com.android.internal.R.styleable.AndroidManifestProvider_description,
@@ -2139,6 +2197,15 @@
 
         sa.recycle();
 
+        if ((owner.applicationInfo.flags&ApplicationInfo.FLAG_HEAVY_WEIGHT) != 0) {
+            // A heavy-weight application can not have providers in its main process
+            // We can do direct compare because we intern all strings.
+            if (p.info.processName == owner.packageName) {
+                outError[0] = "Heavy-weight applications can not have providers in main process";
+                return null;
+            }
+        }
+        
         if (cpname == null) {
             outError[0] = "<provider> does not incude authorities attribute";
             return null;
@@ -2337,6 +2404,7 @@
                     com.android.internal.R.styleable.AndroidManifestService_name,
                     com.android.internal.R.styleable.AndroidManifestService_label,
                     com.android.internal.R.styleable.AndroidManifestService_icon,
+                    com.android.internal.R.styleable.AndroidManifestService_logo,
                     mSeparateProcesses,
                     com.android.internal.R.styleable.AndroidManifestService_process,
                     com.android.internal.R.styleable.AndroidManifestService_description,
@@ -2370,6 +2438,15 @@
 
         sa.recycle();
 
+        if ((owner.applicationInfo.flags&ApplicationInfo.FLAG_HEAVY_WEIGHT) != 0) {
+            // A heavy-weight application can not have services in its main process
+            // We can do direct compare because we intern all strings.
+            if (s.info.processName == owner.packageName) {
+                outError[0] = "Heavy-weight applications can not have services in main process";
+                return null;
+            }
+        }
+        
         int outerDepth = parser.getDepth();
         int type;
         while ((type=parser.next()) != XmlPullParser.END_DOCUMENT
@@ -2540,6 +2617,9 @@
 
         outInfo.icon = sa.getResourceId(
                 com.android.internal.R.styleable.AndroidManifestIntentFilter_icon, 0);
+        
+        outInfo.logo = sa.getResourceId(
+                com.android.internal.R.styleable.AndroidManifestIntentFilter_logo, 0);
 
         sa.recycle();
 
@@ -2801,6 +2881,11 @@
                 outInfo.icon = iconVal;
                 outInfo.nonLocalizedLabel = null;
             }
+            
+            int logoVal = args.sa.getResourceId(args.logoRes, 0);
+            if (logoVal != 0) {
+                outInfo.logo = logoVal;
+            }
 
             TypedValue v = args.sa.peekValue(args.labelRes);
             if (v != null && (outInfo.labelRes=v.resourceId) == 0) {
@@ -3135,6 +3220,7 @@
         public int labelRes;
         public CharSequence nonLocalizedLabel;
         public int icon;
+        public int logo;
     }
 
     public final static class ActivityIntentInfo extends IntentInfo {
diff --git a/core/java/android/content/res/AssetManager.java b/core/java/android/content/res/AssetManager.java
index 1070f08..73d9458 100644
--- a/core/java/android/content/res/AssetManager.java
+++ b/core/java/android/content/res/AssetManager.java
@@ -70,6 +70,7 @@
     
     // For communication with native code.
     private int mObject;
+    private int mNObject;  // used by the NDK
 
     private StringBlock mStringBlocks[] = null;
     
diff --git a/core/java/android/content/res/CompatibilityInfo.java b/core/java/android/content/res/CompatibilityInfo.java
index 11c67cc..d0ba590 100644
--- a/core/java/android/content/res/CompatibilityInfo.java
+++ b/core/java/android/content/res/CompatibilityInfo.java
@@ -99,7 +99,22 @@
      */
     private static final int CONFIGURED_LARGE_SCREENS = 16; 
 
-    private static final int SCALING_EXPANDABLE_MASK = SCALING_REQUIRED | EXPANDABLE | LARGE_SCREENS;
+    /**
+     * A flag mask to indicates that the application supports xlarge screens.
+     * The flag is set to true if
+     * 1) Application declares it supports xlarge screens in manifest file using <supports-screens> or
+     * 2) The screen size is not xlarge
+     * {@see compatibilityFlag}
+     */
+    private static final int XLARGE_SCREENS = 32;
+    
+    /**
+     * A flag mask to tell if the application supports xlarge screens. This differs
+     * from XLARGE_SCREENS in that the application that does not support xlarge
+     * screens will be marked as supporting them if the current screen is not
+     * xlarge.
+     */
+    private static final int CONFIGURED_XLARGE_SCREENS = 64;
 
     /**
      * The effective screen density we have selected for this application.
@@ -127,6 +142,9 @@
         if ((appInfo.flags & ApplicationInfo.FLAG_SUPPORTS_LARGE_SCREENS) != 0) {
             mCompatibilityFlags |= LARGE_SCREENS | CONFIGURED_LARGE_SCREENS;
         }
+        if ((appInfo.flags & ApplicationInfo.FLAG_SUPPORTS_XLARGE_SCREENS) != 0) {
+            mCompatibilityFlags |= XLARGE_SCREENS | CONFIGURED_XLARGE_SCREENS;
+        }
         if ((appInfo.flags & ApplicationInfo.FLAG_RESIZEABLE_FOR_SCREENS) != 0) {
             mCompatibilityFlags |= EXPANDABLE | CONFIGURED_EXPANDABLE;
         }
@@ -157,6 +175,7 @@
         this(ApplicationInfo.FLAG_SUPPORTS_SMALL_SCREENS
                 | ApplicationInfo.FLAG_SUPPORTS_NORMAL_SCREENS
                 | ApplicationInfo.FLAG_SUPPORTS_LARGE_SCREENS
+                | ApplicationInfo.FLAG_SUPPORTS_XLARGE_SCREENS
                 | ApplicationInfo.FLAG_RESIZEABLE_FOR_SCREENS,
                 EXPANDABLE | CONFIGURED_EXPANDABLE,
                 DisplayMetrics.DENSITY_DEVICE,
@@ -196,6 +215,17 @@
     }
 
     /**
+     * Sets large screen bit in the compatibility flag.
+     */
+    public void setXLargeScreens(boolean expandable) {
+        if (expandable) {
+            mCompatibilityFlags |= CompatibilityInfo.XLARGE_SCREENS;
+        } else {
+            mCompatibilityFlags &= ~CompatibilityInfo.XLARGE_SCREENS;
+        }
+    }
+
+    /**
      * @return true if the application is configured to be expandable.
      */
     public boolean isConfiguredExpandable() {
@@ -210,6 +240,13 @@
     }
 
     /**
+     * @return true if the application is configured to be expandable.
+     */
+    public boolean isConfiguredXLargeScreens() {
+        return (mCompatibilityFlags & CompatibilityInfo.CONFIGURED_XLARGE_SCREENS) != 0;
+    }
+
+    /**
      * @return true if the scaling is required
      */
     public boolean isScalingRequired() {
diff --git a/core/java/android/content/res/Configuration.java b/core/java/android/content/res/Configuration.java
index 1a0c867..02956ba 100644
--- a/core/java/android/content/res/Configuration.java
+++ b/core/java/android/content/res/Configuration.java
@@ -62,6 +62,7 @@
     public static final int SCREENLAYOUT_SIZE_SMALL = 0x01;
     public static final int SCREENLAYOUT_SIZE_NORMAL = 0x02;
     public static final int SCREENLAYOUT_SIZE_LARGE = 0x03;
+    public static final int SCREENLAYOUT_SIZE_XLARGE = 0x04;
     
     public static final int SCREENLAYOUT_LONG_MASK = 0x30;
     public static final int SCREENLAYOUT_LONG_UNDEFINED = 0x00;
@@ -82,7 +83,7 @@
      * <p>The {@link #SCREENLAYOUT_SIZE_MASK} bits define the overall size
      * of the screen.  They may be one of
      * {@link #SCREENLAYOUT_SIZE_SMALL}, {@link #SCREENLAYOUT_SIZE_NORMAL},
-     * or {@link #SCREENLAYOUT_SIZE_LARGE}.
+     * {@link #SCREENLAYOUT_SIZE_LARGE}, or {@link #SCREENLAYOUT_SIZE_XLARGE}.
      * 
      * <p>The {@link #SCREENLAYOUT_LONG_MASK} defines whether the screen
      * is wider/taller than normal.  They may be one of
diff --git a/core/java/android/content/res/ObbInfo.aidl b/core/java/android/content/res/ObbInfo.aidl
new file mode 100755
index 0000000..636ad6a
--- /dev/null
+++ b/core/java/android/content/res/ObbInfo.aidl
@@ -0,0 +1,19 @@
+/*
+ * Copyright (C) 2010 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package android.content.res;
+
+parcelable ObbInfo;
diff --git a/core/java/android/content/res/ObbInfo.java b/core/java/android/content/res/ObbInfo.java
new file mode 100644
index 0000000..b18d784
--- /dev/null
+++ b/core/java/android/content/res/ObbInfo.java
@@ -0,0 +1,71 @@
+/*
+ * Copyright (C) 2010 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package android.content.res;
+
+import android.os.Parcel;
+import android.os.Parcelable;
+
+/**
+ * Basic information about a Opaque Binary Blob (OBB) that reflects
+ * the info from the footer on the OBB file.
+ * @hide
+ */
+public class ObbInfo implements Parcelable {
+    /**
+     * The name of the package to which the OBB file belongs.
+     */
+    public String packageName;
+
+    /**
+     * The version of the package to which the OBB file belongs.
+     */
+    public int version;
+
+    public ObbInfo() {
+    }
+
+    public String toString() {
+        return "ObbInfo{"
+            + Integer.toHexString(System.identityHashCode(this))
+            + " packageName=" + packageName + ",version=" + version + "}";
+    }
+
+    public int describeContents() {
+        return 0;
+    }
+
+    public void writeToParcel(Parcel dest, int parcelableFlags) {
+        dest.writeString(packageName);
+        dest.writeInt(version);
+    }
+
+    public static final Parcelable.Creator<ObbInfo> CREATOR
+            = new Parcelable.Creator<ObbInfo>() {
+        public ObbInfo createFromParcel(Parcel source) {
+            return new ObbInfo(source);
+        }
+
+        public ObbInfo[] newArray(int size) {
+            return new ObbInfo[size];
+        }
+    };
+
+    private ObbInfo(Parcel source) {
+        packageName = source.readString();
+        version = source.readInt();
+    }
+}
diff --git a/core/java/android/content/res/ObbScanner.java b/core/java/android/content/res/ObbScanner.java
new file mode 100644
index 0000000..eb383c3
--- /dev/null
+++ b/core/java/android/content/res/ObbScanner.java
@@ -0,0 +1,40 @@
+/*
+ * Copyright (C) 2010 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package android.content.res;
+
+/**
+ * Class to scan Opaque Binary Blob (OBB) files.
+ * @hide
+ */
+public class ObbScanner {
+    // Don't allow others to instantiate this class
+    private ObbScanner() {}
+
+    public static ObbInfo getObbInfo(String filePath) {
+        if (filePath == null) {
+            return null;
+        }
+
+        ObbInfo obbInfo = new ObbInfo();
+        if (!getObbInfo_native(filePath, obbInfo)) {
+            throw new IllegalArgumentException("Could not read OBB file: " + filePath);
+        }
+        return obbInfo;
+    }
+
+    private native static boolean getObbInfo_native(String filePath, ObbInfo obbInfo);
+}
diff --git a/core/java/android/database/Cursor.java b/core/java/android/database/Cursor.java
index 79178f4..6539156 100644
--- a/core/java/android/database/Cursor.java
+++ b/core/java/android/database/Cursor.java
@@ -25,6 +25,9 @@
 /**
  * This interface provides random read-write access to the result set returned
  * by a database query.
+ *
+ * Cursor implementations are not required to be synchronized so code using a Cursor from multiple
+ * threads should perform its own synchronization when using the Cursor.
  */
 public interface Cursor {
     /**
diff --git a/core/java/android/database/DatabaseUtils.java b/core/java/android/database/DatabaseUtils.java
index 9bfbb74..66406ca 100644
--- a/core/java/android/database/DatabaseUtils.java
+++ b/core/java/android/database/DatabaseUtils.java
@@ -108,7 +108,7 @@
      * @see Parcel#readException
      */
     public static final void readExceptionFromParcel(Parcel reply) {
-        int code = reply.readInt();
+        int code = reply.readExceptionCode();
         if (code == 0) return;
         String msg = reply.readString();
         DatabaseUtils.readExceptionFromParcel(reply, msg, code);
@@ -116,7 +116,7 @@
 
     public static void readExceptionWithFileNotFoundExceptionFromParcel(
             Parcel reply) throws FileNotFoundException {
-        int code = reply.readInt();
+        int code = reply.readExceptionCode();
         if (code == 0) return;
         String msg = reply.readString();
         if (code == 1) {
@@ -128,7 +128,7 @@
 
     public static void readExceptionWithOperationApplicationExceptionFromParcel(
             Parcel reply) throws OperationApplicationException {
-        int code = reply.readInt();
+        int code = reply.readExceptionCode();
         if (code == 0) return;
         String msg = reply.readString();
         if (code == 10) {
diff --git a/core/java/android/database/sqlite/SQLiteCursor.java b/core/java/android/database/sqlite/SQLiteCursor.java
index 6e5b3e1..c7e58fa 100644
--- a/core/java/android/database/sqlite/SQLiteCursor.java
+++ b/core/java/android/database/sqlite/SQLiteCursor.java
@@ -36,6 +36,9 @@
 /**
  * A Cursor implementation that exposes results from a query on a
  * {@link SQLiteDatabase}.
+ *
+ * SQLiteCursor is not internally synchronized so code using a SQLiteCursor from multiple
+ * threads should perform its own synchronization when using the SQLiteCursor.
  */
 public class SQLiteCursor extends AbstractWindowedCursor {
     static final String TAG = "Cursor";
diff --git a/core/java/android/database/sqlite/SQLiteDatabase.java b/core/java/android/database/sqlite/SQLiteDatabase.java
index fb5507d..cdc9bbb 100644
--- a/core/java/android/database/sqlite/SQLiteDatabase.java
+++ b/core/java/android/database/sqlite/SQLiteDatabase.java
@@ -19,6 +19,7 @@
 import com.google.android.collect.Maps;
 
 import android.app.ActivityThread;
+import android.app.AppGlobals;
 import android.content.ContentValues;
 import android.database.Cursor;
 import android.database.DatabaseUtils;
@@ -33,6 +34,8 @@
 import android.util.Log;
 import android.util.Pair;
 
+import dalvik.system.BlockGuard;
+
 import java.io.File;
 import java.lang.ref.WeakReference;
 import java.text.SimpleDateFormat;
@@ -1134,7 +1137,8 @@
      *
      * @param sql The raw SQL statement, may contain ? for unknown values to be
      *            bound later.
-     * @return a pre-compiled statement object.
+     * @return A pre-compiled {@link SQLiteStatement} object. Note that
+     * {@link SQLiteStatement}s are not synchronized, see the documentation for more details.
      */
     public SQLiteStatement compileStatement(String sql) throws SQLException {
         lock();
@@ -1175,7 +1179,8 @@
      *            default sort order, which may be unordered.
      * @param limit Limits the number of rows returned by the query,
      *            formatted as LIMIT clause. Passing null denotes no LIMIT clause.
-     * @return A Cursor object, which is positioned before the first entry
+     * @return A {@link Cursor} object, which is positioned before the first entry. Note that
+     * {@link Cursor}s are not synchronized, see the documentation for more details.
      * @see Cursor
      */
     public Cursor query(boolean distinct, String table, String[] columns,
@@ -1213,7 +1218,8 @@
      *            default sort order, which may be unordered.
      * @param limit Limits the number of rows returned by the query,
      *            formatted as LIMIT clause. Passing null denotes no LIMIT clause.
-     * @return A Cursor object, which is positioned before the first entry
+     * @return A {@link Cursor} object, which is positioned before the first entry. Note that
+     * {@link Cursor}s are not synchronized, see the documentation for more details.
      * @see Cursor
      */
     public Cursor queryWithFactory(CursorFactory cursorFactory,
@@ -1254,7 +1260,8 @@
      * @param orderBy How to order the rows, formatted as an SQL ORDER BY clause
      *            (excluding the ORDER BY itself). Passing null will use the
      *            default sort order, which may be unordered.
-     * @return A {@link Cursor} object, which is positioned before the first entry
+     * @return A {@link Cursor} object, which is positioned before the first entry. Note that
+     * {@link Cursor}s are not synchronized, see the documentation for more details.
      * @see Cursor
      */
     public Cursor query(String table, String[] columns, String selection,
@@ -1291,7 +1298,8 @@
      *            default sort order, which may be unordered.
      * @param limit Limits the number of rows returned by the query,
      *            formatted as LIMIT clause. Passing null denotes no LIMIT clause.
-     * @return A {@link Cursor} object, which is positioned before the first entry
+     * @return A {@link Cursor} object, which is positioned before the first entry. Note that
+     * {@link Cursor}s are not synchronized, see the documentation for more details.
      * @see Cursor
      */
     public Cursor query(String table, String[] columns, String selection,
@@ -1309,7 +1317,8 @@
      * @param selectionArgs You may include ?s in where clause in the query,
      *     which will be replaced by the values from selectionArgs. The
      *     values will be bound as Strings.
-     * @return A {@link Cursor} object, which is positioned before the first entry
+     * @return A {@link Cursor} object, which is positioned before the first entry. Note that
+     * {@link Cursor}s are not synchronized, see the documentation for more details.
      */
     public Cursor rawQuery(String sql, String[] selectionArgs) {
         return rawQueryWithFactory(null, sql, selectionArgs, null);
@@ -1324,7 +1333,8 @@
      *     which will be replaced by the values from selectionArgs. The
      *     values will be bound as Strings.
      * @param editTable the name of the first table, which is editable
-     * @return A {@link Cursor} object, which is positioned before the first entry
+     * @return A {@link Cursor} object, which is positioned before the first entry. Note that
+     * {@link Cursor}s are not synchronized, see the documentation for more details.
      */
     public Cursor rawQueryWithFactory(
             CursorFactory cursorFactory, String sql, String[] selectionArgs,
@@ -1332,6 +1342,7 @@
         if (!isOpen()) {
             throw new IllegalStateException("database not open");
         }
+        BlockGuard.getThreadPolicy().onReadFromDisk();
         long timeStart = 0;
 
         if (Config.LOGV || mSlowQueryThreshold != -1) {
@@ -1379,7 +1390,8 @@
      *     values will be bound as Strings.
      * @param initialRead set the initial count of items to read from the cursor
      * @param maxRead set the count of items to read on each iteration after the first
-     * @return A {@link Cursor} object, which is positioned before the first entry
+     * @return A {@link Cursor} object, which is positioned before the first entry. Note that
+     * {@link Cursor}s are not synchronized, see the documentation for more details.
      *
      * This work is incomplete and not fully tested or reviewed, so currently
      * hidden.
@@ -1489,6 +1501,7 @@
      */
     public long insertWithOnConflict(String table, String nullColumnHack,
             ContentValues initialValues, int conflictAlgorithm) {
+        BlockGuard.getThreadPolicy().onWriteToDisk();
         if (!isOpen()) {
             throw new IllegalStateException("database not open");
         }
@@ -1580,6 +1593,7 @@
      *         whereClause.
      */
     public int delete(String table, String whereClause, String[] whereArgs) {
+        BlockGuard.getThreadPolicy().onWriteToDisk();
         lock();
         if (!isOpen()) {
             throw new IllegalStateException("database not open");
@@ -1635,6 +1649,7 @@
      */
     public int updateWithOnConflict(String table, ContentValues values,
             String whereClause, String[] whereArgs, int conflictAlgorithm) {
+        BlockGuard.getThreadPolicy().onWriteToDisk();
         if (values == null || values.size() == 0) {
             throw new IllegalArgumentException("Empty values");
         }
@@ -1717,6 +1732,7 @@
      * @throws SQLException If the SQL string is invalid for some reason
      */
     public void execSQL(String sql) throws SQLException {
+        BlockGuard.getThreadPolicy().onWriteToDisk();
         long timeStart = SystemClock.uptimeMillis();
         lock();
         if (!isOpen()) {
@@ -1752,6 +1768,7 @@
      * @throws SQLException If the SQL string is invalid for some reason
      */
     public void execSQL(String sql, Object[] bindArgs) throws SQLException {
+        BlockGuard.getThreadPolicy().onWriteToDisk();
         if (bindArgs == null) {
             throw new IllegalArgumentException("Empty bindArgs");
         }
@@ -1905,7 +1922,7 @@
         // main thread, or when we are invoked via Binder (e.g. ContentProvider).
         // Hopefully the full path to the database will be informative enough.
 
-        String blockingPackage = ActivityThread.currentPackageName();
+        String blockingPackage = AppGlobals.getInitialPackage();
         if (blockingPackage == null) blockingPackage = "";
 
         EventLog.writeEvent(
diff --git a/core/java/android/database/sqlite/SQLiteOpenHelper.java b/core/java/android/database/sqlite/SQLiteOpenHelper.java
index 52aac3a..aefbabc 100644
--- a/core/java/android/database/sqlite/SQLiteOpenHelper.java
+++ b/core/java/android/database/sqlite/SQLiteOpenHelper.java
@@ -28,6 +28,12 @@
  * Transactions are used to make sure the database is always in a sensible state.
  * <p>For an example, see the NotePadProvider class in the NotePad sample application,
  * in the <em>samples/</em> directory of the SDK.</p>
+ *
+ * <p class="note"><strong>Note:</strong> this class assumes
+ * monotonically increasing version numbers for upgrades.  Also, there
+ * is no concept of a database downgrade; installing a new version of
+ * your app which uses a lower version number than a
+ * previously-installed version will result in undefined behavior.</p>
  */
 public abstract class SQLiteOpenHelper {
     private static final String TAG = SQLiteOpenHelper.class.getSimpleName();
@@ -105,6 +111,10 @@
                     if (version == 0) {
                         onCreate(db);
                     } else {
+                        if (version > mNewVersion) {
+                            Log.wtf(TAG, "Can't downgrade read-only database from version " +
+                                    version + " to " + mNewVersion + ": " + db.getPath());
+                        }
                         onUpgrade(db, version, mNewVersion);
                     }
                     db.setVersion(mNewVersion);
diff --git a/core/java/android/database/sqlite/SQLiteProgram.java b/core/java/android/database/sqlite/SQLiteProgram.java
index 89a5f0d1..4d96f12 100644
--- a/core/java/android/database/sqlite/SQLiteProgram.java
+++ b/core/java/android/database/sqlite/SQLiteProgram.java
@@ -20,6 +20,9 @@
 
 /**
  * A base class for compiled SQLite programs.
+ *
+ * SQLiteProgram is not internally synchronized so code using a SQLiteProgram from multiple
+ * threads should perform its own synchronization when using the SQLiteProgram.
  */
 public abstract class SQLiteProgram extends SQLiteClosable {
 
diff --git a/core/java/android/database/sqlite/SQLiteQuery.java b/core/java/android/database/sqlite/SQLiteQuery.java
index 43d2fac..905b66b 100644
--- a/core/java/android/database/sqlite/SQLiteQuery.java
+++ b/core/java/android/database/sqlite/SQLiteQuery.java
@@ -23,6 +23,9 @@
 /**
  * A SQLite program that represents a query that reads the resulting rows into a CursorWindow.
  * This class is used by SQLiteCursor and isn't useful itself.
+ *
+ * SQLiteQuery is not internally synchronized so code using a SQLiteQuery from multiple
+ * threads should perform its own synchronization when using the SQLiteQuery.
  */
 public class SQLiteQuery extends SQLiteProgram {
     private static final String TAG = "Cursor";
diff --git a/core/java/android/database/sqlite/SQLiteStatement.java b/core/java/android/database/sqlite/SQLiteStatement.java
index 98da414..9e425c3 100644
--- a/core/java/android/database/sqlite/SQLiteStatement.java
+++ b/core/java/android/database/sqlite/SQLiteStatement.java
@@ -18,11 +18,16 @@
 
 import android.os.SystemClock;
 
+import dalvik.system.BlockGuard;
+
 /**
  * A pre-compiled statement against a {@link SQLiteDatabase} that can be reused.
  * The statement cannot return multiple rows, but 1x1 result sets are allowed.
  * Don't use SQLiteStatement constructor directly, please use
  * {@link SQLiteDatabase#compileStatement(String)}
+ *
+ * SQLiteStatement is not internally synchronized so code using a SQLiteStatement from multiple
+ * threads should perform its own synchronization when using the SQLiteStatement.
  */
 public class SQLiteStatement extends SQLiteProgram
 {
@@ -44,6 +49,7 @@
      *         some reason
      */
     public void execute() {
+        BlockGuard.getThreadPolicy().onWriteToDisk();
         if (!mDatabase.isOpen()) {
             throw new IllegalStateException("database " + mDatabase.getPath() + " already closed");
         }
@@ -70,6 +76,7 @@
      *         some reason
      */
     public long executeInsert() {
+        BlockGuard.getThreadPolicy().onWriteToDisk();
         if (!mDatabase.isOpen()) {
             throw new IllegalStateException("database " + mDatabase.getPath() + " already closed");
         }
@@ -96,6 +103,7 @@
      * @throws android.database.sqlite.SQLiteDoneException if the query returns zero rows
      */
     public long simpleQueryForLong() {
+        BlockGuard.getThreadPolicy().onReadFromDisk();
         if (!mDatabase.isOpen()) {
             throw new IllegalStateException("database " + mDatabase.getPath() + " already closed");
         }
@@ -122,6 +130,7 @@
      * @throws android.database.sqlite.SQLiteDoneException if the query returns zero rows
      */
     public String simpleQueryForString() {
+        BlockGuard.getThreadPolicy().onReadFromDisk();
         if (!mDatabase.isOpen()) {
             throw new IllegalStateException("database " + mDatabase.getPath() + " already closed");
         }
diff --git a/core/java/android/hardware/Camera.java b/core/java/android/hardware/Camera.java
index 8687a89..1100886 100644
--- a/core/java/android/hardware/Camera.java
+++ b/core/java/android/hardware/Camera.java
@@ -58,7 +58,7 @@
 public class Camera {
     private static final String TAG = "Camera";
 
-    // These match the enums in frameworks/base/include/ui/Camera.h
+    // These match the enums in frameworks/base/include/camera/Camera.h
     private static final int CAMERA_MSG_ERROR            = 0x001;
     private static final int CAMERA_MSG_SHUTTER          = 0x002;
     private static final int CAMERA_MSG_FOCUS            = 0x004;
@@ -84,13 +84,66 @@
     private boolean mWithBuffer;
 
     /**
-     * Returns a new Camera object.
+     * Returns the number of Cameras available.
      */
-    public static Camera open() {
-        return new Camera();
+    public native static int getNumberOfCameras();
+
+    /**
+     * Returns the information about the camera.
+     * If {@link #getNumberOfCameras()} returns N, the valid id is 0 to N-1.
+     */
+    public native static void getCameraInfo(int cameraId, CameraInfo cameraInfo);
+
+    /**
+     * Information about a camera
+     */
+    public static class CameraInfo {
+        public static final int CAMERA_FACING_BACK = 0;
+        public static final int CAMERA_FACING_FRONT = 1;
+
+        /**
+         * The direction that the camera faces to. It should be
+         * CAMERA_FACING_BACK or CAMERA_FACING_FRONT.
+         */
+        public int mFacing;
+
+        /**
+         * The orientation of the camera image. The value is the angle that the
+         * camera image needs to be rotated clockwise so it shows correctly on
+         * the display in its natural orientation. It should be 0, 90, 180, or 270.
+         *
+         * For example, suppose a device has a naturally tall screen, but the camera
+         * sensor is mounted in landscape. If the top side of the camera sensor is
+         * aligned with the right edge of the display in natural orientation, the
+         * value should be 90.
+         *
+         * @see #setDisplayOrientation(int)
+         */
+        public int mOrientation;
+    };
+
+    /**
+     * Returns a new Camera object.
+     * If {@link #getNumberOfCameras()} returns N, the valid id is 0 to N-1.
+     * The id 0 is the default camera.
+     */
+    public static Camera open(int cameraId) {
+        return new Camera(cameraId);
     }
 
-    Camera() {
+    /**
+     * The id for the default camera.
+     */
+    public static int CAMERA_ID_DEFAULT = 0;
+
+    /**
+     * Returns a new Camera object. This returns the default camera.
+     */
+    public static Camera open() {
+        return new Camera(CAMERA_ID_DEFAULT);
+    }
+
+    Camera(int cameraId) {
         mShutterCallback = null;
         mRawImageCallback = null;
         mJpegCallback = null;
@@ -107,14 +160,14 @@
             mEventHandler = null;
         }
 
-        native_setup(new WeakReference<Camera>(this));
+        native_setup(new WeakReference<Camera>(this), cameraId);
     }
 
     protected void finalize() {
         native_release();
     }
 
-    private native final void native_setup(Object camera_this);
+    private native final void native_setup(Object camera_this, int cameraId);
     private native final void native_release();
 
 
@@ -482,6 +535,7 @@
      * application does not need a particular callback, a null can be passed
      * instead of a callback method.
      *
+     * This method is only valid after {@link #startPreview()} has been called.
      * This method will stop the preview. Applications should not call {@link
      * #stopPreview()} before this. After jpeg callback is received,
      * applications can call {@link #startPreview()} to restart the preview.
@@ -509,6 +563,7 @@
      * application does not need a particular callback, a null can be passed
      * instead of a callback method.
      *
+     * This method is only valid after {@link #startPreview()} has been called.
      * This method will stop the preview. Applications should not call {@link
      * #stopPreview()} before this. After jpeg callback is received,
      * applications can call {@link #startPreview()} to restart the preview.
@@ -565,6 +620,28 @@
      * {@link PreviewCallback#onPreviewFrame}. This method is not allowed to
      * be called during preview.
      *
+     * If you want to make the camera image show in the same orientation as
+     * the display, you can use the following code.<p>
+     * <pre>
+     * public static void setCameraDisplayOrientation(Activity activity,
+     *         int cameraId, android.hardware.Camera camera) {
+     *     android.hardware.Camera.CameraInfo info =
+     *             new android.hardware.Camera.CameraInfo();
+     *     android.hardware.Camera.getCameraInfo(cameraId, info);
+     *     int rotation = activity.getWindowManager().getDefaultDisplay()
+     *             .getRotation();
+     *     int degrees = 0;
+     *     switch (rotation) {
+     *         case Surface.ROTATION_0: degrees = 0; break;
+     *         case Surface.ROTATION_90: degrees = 90; break;
+     *         case Surface.ROTATION_180: degrees = 180; break;
+     *         case Surface.ROTATION_270: degrees = 270; break;
+     *     }
+     *
+     *     int result = (info.mOrientation - degrees + 360) % 360;
+     *     camera.setDisplayOrientation(result);
+     * }
+     * </pre>
      * @param degrees the angle that the picture will be rotated clockwise.
      *                Valid values are 0, 90, 180, and 270. The starting
      *                position is 0 (landscape).
@@ -746,6 +823,9 @@
         private static final String KEY_ZOOM_RATIOS = "zoom-ratios";
         private static final String KEY_ZOOM_SUPPORTED = "zoom-supported";
         private static final String KEY_SMOOTH_ZOOM_SUPPORTED = "smooth-zoom-supported";
+        private static final String KEY_FOCUS_DISTANCES = "focus-distances";
+        private static final String KEY_METERING_MODE = "metering-mode";
+
         // Parameter key suffix for supported values.
         private static final String SUPPORTED_VALUES_SUFFIX = "-values";
 
@@ -807,21 +887,81 @@
          */
         public static final String FLASH_MODE_TORCH = "torch";
 
-        // Values for scene mode settings.
+        /**
+         * Scene mode is off.
+         */
         public static final String SCENE_MODE_AUTO = "auto";
+
+        /**
+         * Take photos of fast moving objects. Same as {@link
+         * #SCENE_MODE_SPORTS}.
+         */
         public static final String SCENE_MODE_ACTION = "action";
+
+        /**
+         * Take people pictures.
+         */
         public static final String SCENE_MODE_PORTRAIT = "portrait";
+
+        /**
+         * Take pictures on distant objects.
+         */
         public static final String SCENE_MODE_LANDSCAPE = "landscape";
+
+        /**
+         * Take photos at night.
+         */
         public static final String SCENE_MODE_NIGHT = "night";
+
+        /**
+         * Take people pictures at night.
+         */
         public static final String SCENE_MODE_NIGHT_PORTRAIT = "night-portrait";
+
+        /**
+         * Take photos in a theater. Flash light is off.
+         */
         public static final String SCENE_MODE_THEATRE = "theatre";
+
+        /**
+         * Take pictures on the beach.
+         */
         public static final String SCENE_MODE_BEACH = "beach";
+
+        /**
+         * Take pictures on the snow.
+         */
         public static final String SCENE_MODE_SNOW = "snow";
+
+        /**
+         * Take sunset photos.
+         */
         public static final String SCENE_MODE_SUNSET = "sunset";
+
+        /**
+         * Avoid blurry pictures (for example, due to hand shake).
+         */
         public static final String SCENE_MODE_STEADYPHOTO = "steadyphoto";
+
+        /**
+         * For shooting firework displays.
+         */
         public static final String SCENE_MODE_FIREWORKS = "fireworks";
+
+        /**
+         * Take photos of fast moving objects. Same as {@link
+         * #SCENE_MODE_ACTION}.
+         */
         public static final String SCENE_MODE_SPORTS = "sports";
+
+        /**
+         * Take indoor low-light shot.
+         */
         public static final String SCENE_MODE_PARTY = "party";
+
+        /**
+         * Capture the naturally warm color of scenes lit by candles.
+         */
         public static final String SCENE_MODE_CANDLELIGHT = "candlelight";
 
         /**
@@ -858,6 +998,53 @@
          */
         public static final String FOCUS_MODE_EDOF = "edof";
 
+        // Indices for focus distance array.
+        /**
+         * The array index of near focus distance for use with
+         * {@link #getFocusDistances(float[])}.
+         */
+        public static final int FOCUS_DISTANCE_NEAR_INDEX = 0;
+
+        /**
+         * The array index of optimal focus distance for use with
+         * {@link #getFocusDistances(float[])}.
+         */
+        public static final int FOCUS_DISTANCE_OPTIMAL_INDEX = 1;
+
+        /**
+         * The array index of far focus distance for use with
+         * {@link #getFocusDistances(float[])}.
+         */
+        public static final int FOCUS_DISTANCE_FAR_INDEX = 2;
+
+        /**
+         * Continuous focus mode. The camera continuously tries to focus. This
+         * is ideal for shooting video or shooting photo of moving object.
+         * Continuous focus starts when {@link #autoFocus(AutoFocusCallback)} is
+         * called. Continuous focus stops when {@link #cancelAutoFocus()} is
+         * called. AutoFocusCallback will be only called once as soon as the
+         * picture is in focus.
+         */
+        public static final String FOCUS_MODE_CONTINUOUS = "continuous";
+
+        /**
+         * The camera determines the exposure by giving more weight to the
+         * central part of the scene.
+         */
+        public static final String METERING_MODE_CENTER_WEIGHTED = "center-weighted";
+
+        /**
+         * The camera determines the exposure by averaging the entire scene,
+         * giving no weighting to any particular area.
+         */
+        public static final String METERING_MODE_FRAME_AVERAGE = "frame-average";
+
+        /**
+         * The camera determines the exposure by a very small area of the scene,
+         * typically the center.
+         */
+        public static final String METERING_MODE_SPOT = "spot";
+
         // Formats for setPreviewFormat and setPictureFormat.
         private static final String PIXEL_FORMAT_YUV422SP = "yuv422sp";
         private static final String PIXEL_FORMAT_YUV420SP = "yuv420sp";
@@ -1788,6 +1975,76 @@
             return TRUE.equals(str);
         }
 
+        /**
+         * Gets the distances from the camera to where an object appears to be
+         * in focus. The object is sharpest at the optimal focus distance. The
+         * depth of field is the far focus distance minus near focus distance.
+         *
+         * Focus distances may change after calling {@link
+         * #autoFocus(AutoFocusCallback)}, {@link #cancelAutoFocus}, or {@link
+         * #startPreview()}. Applications can call {@link #getParameters()}
+         * and this method anytime to get the latest focus distances. If the
+         * focus mode is FOCUS_MODE_CONTINUOUS and autofocus has started, focus
+         * distances may change from time to time.
+         *
+         * Far focus distance >= optimal focus distance >= near focus distance.
+         * If the focus distance is infinity, the value will be
+         * Float.POSITIVE_INFINITY.
+         *
+         * @param output focus distances in meters. output must be a float
+         *        array with three elements. Near focus distance, optimal focus
+         *        distance, and far focus distance will be filled in the array.
+         * @see #FOCUS_DISTANCE_NEAR_INDEX
+         * @see #FOCUS_DISTANCE_OPTIMAL_INDEX
+         * @see #FOCUS_DISTANCE_FAR_INDEX
+         */
+        public void getFocusDistances(float[] output) {
+            if (output == null || output.length != 3) {
+                throw new IllegalArgumentException(
+                        "output must be an float array with three elements.");
+            }
+            List<Float> distances = splitFloat(get(KEY_FOCUS_DISTANCES));
+            output[0] = distances.get(0);
+            output[1] = distances.get(1);
+            output[2] = distances.get(2);
+        }
+
+        /**
+         * Gets the supported metering modes.
+         *
+         * @return a list of supported metering modes. null if metering mode
+         *         setting is not supported.
+         * @see #getMeteringMode()
+         */
+        public List<String> getSupportedMeteringModes() {
+            String str = get(KEY_METERING_MODE + SUPPORTED_VALUES_SUFFIX);
+            return split(str);
+        }
+
+        /**
+         * Gets the current metering mode, which affects how camera determines
+         * exposure.
+         *
+         * @return current metering mode. If the camera does not support
+         *         metering setting, this should return null.
+         * @see #METERING_MODE_CENTER_WEIGHTED
+         * @see #METERING_MODE_FRAME_AVERAGE
+         * @see #METERING_MODE_SPOT
+         */
+        public String getMeteringMode() {
+            return get(KEY_METERING_MODE);
+        }
+
+        /**
+         * Sets the metering mode.
+         *
+         * @param value metering mode.
+         * @see #getMeteringMode()
+         */
+        public void setMeteringMode(String value) {
+            set(KEY_METERING_MODE, value);
+        }
+
         // Splits a comma delimited string to an ArrayList of String.
         // Return null if the passing string is null or the size is 0.
         private ArrayList<String> split(String str) {
@@ -1817,6 +2074,21 @@
             return substrings;
         }
 
+        // Splits a comma delimited string to an ArrayList of Float.
+        // Return null if the passing string is null or the size is 0.
+        private ArrayList<Float> splitFloat(String str) {
+            if (str == null) return null;
+
+            StringTokenizer tokenizer = new StringTokenizer(str, ",");
+            ArrayList<Float> substrings = new ArrayList<Float>();
+            while (tokenizer.hasMoreElements()) {
+                String token = tokenizer.nextToken();
+                substrings.add(Float.parseFloat(token));
+            }
+            if (substrings.size() == 0) return null;
+            return substrings;
+        }
+
         // Returns the value of a float parameter.
         private float getFloat(String key, float defaultValue) {
             try {
diff --git a/core/java/android/hardware/Sensor.java b/core/java/android/hardware/Sensor.java
index 317e547..3490ac0 100644
--- a/core/java/android/hardware/Sensor.java
+++ b/core/java/android/hardware/Sensor.java
@@ -17,65 +17,71 @@
 
 package android.hardware;
 
-/** 
- * Class representing a sensor. Use {@link SensorManager#getSensorList}
- * to get the list of available Sensors.
+/**
+ * Class representing a sensor. Use {@link SensorManager#getSensorList} to get
+ * the list of available Sensors.
+ *
+ * @see SensorManager
+ * @see SensorEventListener
+ * @see SensorEvent
+ *
  */
 public class Sensor {
 
-    /** 
-     * A constant describing an accelerometer sensor type.
-     * See {@link android.hardware.SensorEvent SensorEvent}
-     * for more details.
+    /**
+     * A constant describing an accelerometer sensor type. See
+     * {@link android.hardware.SensorEvent#values SensorEvent.values} for more
+     * details.
      */
-    public static final int TYPE_ACCELEROMETER  = 1;
+    public static final int TYPE_ACCELEROMETER = 1;
 
-    /** 
-     * A constant describing a magnetic field sensor type.
-     * See {@link android.hardware.SensorEvent SensorEvent}
-     * for more details.
+    /**
+     * A constant describing a magnetic field sensor type. See
+     * {@link android.hardware.SensorEvent#values SensorEvent.values} for more
+     * details.
      */
     public static final int TYPE_MAGNETIC_FIELD = 2;
-    
-    /** 
-     * A constant describing an orientation sensor type.
-     * See {@link android.hardware.SensorEvent SensorEvent}
-     * for more details.
+
+    /**
+     * A constant describing an orientation sensor type. See
+     * {@link android.hardware.SensorEvent#values SensorEvent.values} for more
+     * details.
+     *
      * @deprecated use {@link android.hardware.SensorManager#getOrientation
-     *  SensorManager.getOrientation()} instead.
+     *             SensorManager.getOrientation()} instead.
      */
     @Deprecated
-    public static final int TYPE_ORIENTATION    = 3;
+    public static final int TYPE_ORIENTATION = 3;
 
     /** A constant describing a gyroscope sensor type */
-    public static final int TYPE_GYROSCOPE      = 4;
+    public static final int TYPE_GYROSCOPE = 4;
+
     /**
-     * A constant describing an light sensor type.
-     * See {@link android.hardware.SensorEvent SensorEvent}
-     * for more details.
+     * A constant describing an light sensor type. See
+     * {@link android.hardware.SensorEvent#values SensorEvent.values} for more
+     * details.
      */
-    public static final int TYPE_LIGHT          = 5;
+    public static final int TYPE_LIGHT = 5;
 
     /** A constant describing a pressure sensor type */
-    public static final int TYPE_PRESSURE       = 6;
+    public static final int TYPE_PRESSURE = 6;
 
     /** A constant describing a temperature sensor type */
-    public static final int TYPE_TEMPERATURE    = 7;
+    public static final int TYPE_TEMPERATURE = 7;
 
     /**
-     * A constant describing an proximity sensor type.
-     * See {@link android.hardware.SensorEvent SensorEvent}
-     * for more details.
+     * A constant describing an proximity sensor type. See
+     * {@link android.hardware.SensorEvent#values SensorEvent.values} for more
+     * details.
      */
-    public static final int TYPE_PROXIMITY      = 8;
+    public static final int TYPE_PROXIMITY = 8;
 
-    
-    /** 
+    /**
      * A constant describing all sensor types.
      */
-    public static final int TYPE_ALL             = -1;
+    public static final int TYPE_ALL = -1;
 
-    /* Some of these fields are set only by the native bindings in 
+    /* Some of these fields are set only by the native bindings in
      * SensorManager.
      */
     private String  mName;
@@ -87,8 +93,8 @@
     private float   mResolution;
     private float   mPower;
     private int     mLegacyType;
-    
-    
+
+
     Sensor() {
     }
 
@@ -105,51 +111,51 @@
     public String getVendor() {
         return mVendor;
     }
-    
+
     /**
      * @return generic type of this sensor.
      */
     public int getType() {
         return mType;
     }
-    
+
     /**
      * @return version of the sensor's module.
      */
     public int getVersion() {
         return mVersion;
     }
-    
+
     /**
      * @return maximum range of the sensor in the sensor's unit.
      */
     public float getMaximumRange() {
         return mMaxRange;
     }
-    
+
     /**
      * @return resolution of the sensor in the sensor's unit.
      */
     public float getResolution() {
         return mResolution;
     }
-    
+
     /**
      * @return the power in mA used by this sensor while in use
      */
     public float getPower() {
         return mPower;
     }
-    
+
     int getHandle() {
         return mHandle;
     }
-    
+
     void setRange(float max, float res) {
         mMaxRange = max;
         mResolution = res;
     }
-    
+
     void setLegacyType(int legacyType) {
         mLegacyType = legacyType;
     }
diff --git a/core/java/android/hardware/SensorEvent.java b/core/java/android/hardware/SensorEvent.java
index 9a9f0bf..70519ff 100644
--- a/core/java/android/hardware/SensorEvent.java
+++ b/core/java/android/hardware/SensorEvent.java
@@ -17,143 +17,211 @@
 package android.hardware;
 
 /**
- * This class represents a sensor event and holds informations such as the
- * sensor type (eg: accelerometer, orientation, etc...), the time-stamp, 
- * accuracy and of course the sensor's {@link SensorEvent#values data}.
+ * <p>
+ * This class represents a {@link android.hardware.Sensor Sensor} event and
+ * holds informations such as the sensor's type, the time-stamp, accuracy and of
+ * course the sensor's {@link SensorEvent#values data}.
+ * </p>
  *
- * <p><u>Definition of the coordinate system used by the SensorEvent API.</u><p>
- * 
- * <pre>
- * The coordinate space is defined relative to the screen of the phone 
- * in its default orientation. The axes are not swapped when the device's
- * screen orientation changes.
- * 
- * The OpenGL ES coordinate system is used. The origin is in the
- * lower-left corner  with respect to the screen, with the X axis horizontal
- * and pointing  right, the Y axis vertical and pointing up and the Z axis
- * pointing outside the front face of the screen. In this system, coordinates
- * behind the screen have negative Z values.
- * 
+ * <p>
+ * <u>Definition of the coordinate system used by the SensorEvent API.</u>
+ * </p>
+ *
+ * <p>
+ * The coordinate-system is defined relative to the screen of the phone in its
+ * default orientation. The axes are not swapped when the device's screen
+ * orientation changes.
+ * </p>
+ *
+ * <p>
+ * The X axis is horizontal and points to the right, the Y axis is vertical and
+ * points up and the Z axis points towards the outside of the front face of the
+ * screen. In this system, coordinates behind the screen have negative Z values.
+ * </p>
+ *
+ * <p>
+ * <center><img src="../../../images/axis_device.png"
+ * alt="Sensors coordinate-system diagram." border="0" /></center>
+ * </p>
+ *
+ * <p>
  * <b>Note:</b> This coordinate system is different from the one used in the
- * Android 2D APIs where the origin is in the top-left corner. 
+ * Android 2D APIs where the origin is in the top-left corner.
+ * </p>
  *
- *   x<0         x>0
- *                ^
- *                |
- *    +-----------+-->  y>0
- *    |           |
- *    |           |
- *    |           |
- *    |           |   / z<0
- *    |           |  /
- *    |           | /
- *    O-----------+/
- *    |[]  [ ]  []/
- *    +----------/+     y<0
- *              /
- *             /
- *           |/ z>0 (toward the sky)
+ * @see SensorManager
+ * @see SensorEvent
+ * @see Sensor
  *
- *    O: Origin (x=0,y=0,z=0)
- * </pre>
  */
 
 public class SensorEvent {
     /**
-     * The length and contents of the values array vary depending on which
-     * sensor type is being monitored (see also {@link SensorEvent} for a 
-     * definition of the coordinate system used):
+     * <p>
+     * The length and contents of the {@link #values values} array depends on
+     * which {@link android.hardware.Sensor sensor} type is being monitored (see
+     * also {@link SensorEvent} for a definition of the coordinate system used).
+     * </p>
+     *
+     * <h4>{@link android.hardware.Sensor#TYPE_ACCELEROMETER
+     * Sensor.TYPE_ACCELEROMETER}:</h4> All values are in SI units (m/s^2)
      * 
-     * <p>{@link android.hardware.Sensor#TYPE_ORIENTATION Sensor.TYPE_ORIENTATION}:<p>
-     *  All values are angles in degrees.
+     * <ul>
+     * <p>
+     * values[0]: Acceleration minus Gx on the x-axis
+     * </p>
+     * <p>
+     * values[1]: Acceleration minus Gy on the y-axis
+     * </p>
+     * <p>
+     * values[2]: Acceleration minus Gz on the z-axis
+     * </p>
+     * </ul>
      * 
-     * <p>values[0]: Azimuth, angle between the magnetic north direction and
-     * the Y axis, around the Z axis (0 to 359).
-     * 0=North, 90=East, 180=South, 270=West
-     *
-     * <p>values[1]: Pitch, rotation around X axis (-180 to 180), 
-     * with positive values when the z-axis moves <b>toward</b> the y-axis.
-     *
-     * <p>values[2]: Roll, rotation around Y axis (-90 to 90), with 
-     * positive values  when the x-axis moves <b>toward</b> the z-axis.
+     * <p>
+     * A sensor of this type measures the acceleration applied to the device
+     * (<b>Ad</b>). Conceptually, it does so by measuring forces applied to the
+     * sensor itself (<b>Fs</b>) using the relation:
+     * </p>
      * 
-     * <p><b>Important note:</b> For historical reasons the roll angle is
-     * positive in the clockwise direction (mathematically speaking, it
-     * should be positive in the counter-clockwise direction).
-     *
-     * <p><b>Note:</b> This definition is different from <b>yaw, pitch and 
-     * roll</b> used in aviation where the X axis is along the long side of
-     * the plane (tail to nose).
-     *
-     * <p><b>Note:</b> This sensor type exists for legacy reasons, please use
-     * {@link android.hardware.SensorManager#getRotationMatrix 
-     *      getRotationMatrix()} in conjunction with
-     * {@link android.hardware.SensorManager#remapCoordinateSystem 
-     *      remapCoordinateSystem()} and
-     * {@link android.hardware.SensorManager#getOrientation getOrientation()}
-     * to compute these values instead.
-     *
-     * <p>{@link android.hardware.Sensor#TYPE_ACCELEROMETER Sensor.TYPE_ACCELEROMETER}:<p>
-     *  All values are in SI units (m/s^2) and measure the acceleration applied
-     *  to the phone minus the force of gravity.
-     *  
-     *  <p>values[0]: Acceleration minus Gx on the x-axis 
-     *  <p>values[1]: Acceleration minus Gy on the y-axis 
-     *  <p>values[2]: Acceleration minus Gz on the z-axis
-     *  
-     *  <p><u>Examples</u>:
-     *    <li>When the device lies flat on a table and is pushed on its left 
-     *    side toward the right, the x acceleration value is positive.</li>
-     *    
-     *    <li>When the device lies flat on a table, the acceleration value is 
-     *    +9.81, which correspond to the acceleration of the device (0 m/s^2) 
-     *    minus the force of gravity (-9.81 m/s^2).</li>
-     *    
-     *    <li>When the device lies flat on a table and is pushed toward the sky
-     *    with an acceleration of A m/s^2, the acceleration value is equal to 
-     *    A+9.81 which correspond to the acceleration of the 
-     *    device (+A m/s^2) minus the force of gravity (-9.81 m/s^2).</li>
+     * <b><center>Ad = - ·Fs / mass</center></b>
+     * 
+     * <p>
+     * In particular, the force of gravity is always influencing the measured
+     * acceleration:
+     * </p>
+     * 
+     * <b><center>Ad = -g - ·F / mass</center></b>
+     * 
+     * <p>
+     * For this reason, when the device is sitting on a table (and obviously not
+     * accelerating), the accelerometer reads a magnitude of <b>g</b> = 9.81
+     * m/s^2
+     * </p>
+     * 
+     * <p>
+     * Similarly, when the device is in free-fall and therefore dangerously
+     * accelerating towards to ground at 9.81 m/s^2, its accelerometer reads a
+     * magnitude of 0 m/s^2.
+     * </p>
+     * 
+     * <p>
+     * It should be apparent that in order to measure the real acceleration of
+     * the device, the contribution of the force of gravity must be eliminated.
+     * This can be achieved by applying a <i>high-pass</i> filter. Conversely, a
+     * <i>low-pass</i> filter can be used to isolate the force of gravity.
+     * </p>
+     * <p>
+     * <u>Examples</u>:
+     * <ul>
+     * <li>When the device lies flat on a table and is pushed on its left side
+     * toward the right, the x acceleration value is positive.</li>
+     * 
+     * <li>When the device lies flat on a table, the acceleration value is
+     * +9.81, which correspond to the acceleration of the device (0 m/s^2) minus
+     * the force of gravity (-9.81 m/s^2).</li>
+     * 
+     * <li>When the device lies flat on a table and is pushed toward the sky
+     * with an acceleration of A m/s^2, the acceleration value is equal to
+     * A+9.81 which correspond to the acceleration of the device (+A m/s^2)
+     * minus the force of gravity (-9.81 m/s^2).</li>
+     * </ul>
      * 
      * 
-     * <p>{@link android.hardware.Sensor#TYPE_MAGNETIC_FIELD Sensor.TYPE_MAGNETIC_FIELD}:<p>
-     *  All values are in micro-Tesla (uT) and measure the ambient magnetic
-     *  field in the X, Y and Z axis.
-     *
-     * <p>{@link android.hardware.Sensor#TYPE_LIGHT Sensor.TYPE_LIGHT}:<p>
-     *
-     *  <p>values[0]: Ambient light level in SI lux units
-     *
-     * <p>{@link android.hardware.Sensor#TYPE_PROXIMITY Sensor.TYPE_PROXIMITY}:<p>
-     *
-     *  <p>values[0]: Proximity sensor distance measured in centimeters
-     *
-     *  <p> Note that some proximity sensors only support a binary "close" or "far" measurement.
-     *   In this case, the sensor should report its maxRange value in the "far" state and a value
-     *   less than maxRange in the "near" state.
+     * <h4>{@link android.hardware.Sensor#TYPE_MAGNETIC_FIELD
+     * Sensor.TYPE_MAGNETIC_FIELD}:</h4>
+     * All values are in micro-Tesla (uT) and measure the ambient magnetic field
+     * in the X, Y and Z axis.
+     * 
+     * <h4>{@link android.hardware.Sensor#TYPE_LIGHT Sensor.TYPE_LIGHT}:</h4>
+     * 
+     * <ul>
+     * <p>
+     * values[0]: Ambient light level in SI lux units
+     * </ul>
+     * 
+     * <h4>{@link android.hardware.Sensor#TYPE_PROXIMITY Sensor.TYPE_PROXIMITY}:
+     * </h4>
+     * 
+     * <ul>
+     * <p>
+     * values[0]: Proximity sensor distance measured in centimeters
+     * </ul>
+     * 
+     * <p>
+     * <b>Note:</b> Some proximity sensors only support a binary <i>near</i> or
+     * <i>far</i> measurement. In this case, the sensor should report its
+     * {@link android.hardware.Sensor#getMaximumRange() maximum range} value in
+     * the <i>far</i> state and a lesser value in the <i>near</i> state.
+     * </p>
+     * 
+     * <h4>{@link android.hardware.Sensor#TYPE_ORIENTATION
+     * Sensor.TYPE_ORIENTATION}:</h4> All values are angles in degrees.
+     * 
+     * <ul>
+     * <p>
+     * values[0]: Azimuth, angle between the magnetic north direction and the
+     * y-axis, around the z-axis (0 to 359). 0=North, 90=East, 180=South,
+     * 270=West
+     * </p>
+     * 
+     * <p>
+     * values[1]: Pitch, rotation around x-axis (-180 to 180), with positive
+     * values when the z-axis moves <b>toward</b> the y-axis.
+     * </p>
+     * 
+     * <p>
+     * values[2]: Roll, rotation around y-axis (-90 to 90), with positive values
+     * when the x-axis moves <b>toward</b> the z-axis.
+     * </p>
+     * </ul>
+     * 
+     * <p>
+     * <b>Note:</b> This definition is different from <b>yaw, pitch and roll</b>
+     * used in aviation where the X axis is along the long side of the plane
+     * (tail to nose).
+     * </p>
+     * 
+     * <p>
+     * <b>Note:</b> This sensor type exists for legacy reasons, please use
+     * {@link android.hardware.SensorManager#getRotationMatrix
+     * getRotationMatrix()} in conjunction with
+     * {@link android.hardware.SensorManager#remapCoordinateSystem
+     * remapCoordinateSystem()} and
+     * {@link android.hardware.SensorManager#getOrientation getOrientation()} to
+     * compute these values instead.
+     * </p>
+     * 
+     * <p>
+     * <b>Important note:</b> For historical reasons the roll angle is positive
+     * in the clockwise direction (mathematically speaking, it should be
+     * positive in the counter-clockwise direction).
+     * </p>
+     * 
+     * @see SensorEvent
+     * @see GeomagneticField
      */
     public final float[] values;
 
     /**
-     * The sensor that generated this event.
-     * See {@link android.hardware.SensorManager SensorManager}
-     * for details.
+     * The sensor that generated this event. See
+     * {@link android.hardware.SensorManager SensorManager} for details.
      */
-    public Sensor sensor;
-    
+   public Sensor sensor;
+
     /**
-     * The accuracy of this event.
-     * See {@link android.hardware.SensorManager SensorManager}
-     * for details.
+     * The accuracy of this event. See {@link android.hardware.SensorManager
+     * SensorManager} for details.
      */
     public int accuracy;
-    
-    
+
+
     /**
      * The time in nanosecond at which the event happened
      */
     public long timestamp;
 
-    
+
     SensorEvent(int size) {
         values = new float[size];
     }
diff --git a/core/java/android/hardware/SensorManager.java b/core/java/android/hardware/SensorManager.java
index 98172e6..492f8cc 100644
--- a/core/java/android/hardware/SensorManager.java
+++ b/core/java/android/hardware/SensorManager.java
@@ -41,9 +41,35 @@
 import java.util.List;
 
 /**
- * Class that lets you access the device's sensors. Get an instance of this
- * class by calling {@link android.content.Context#getSystemService(java.lang.String)
- * Context.getSystemService()} with an argument of {@link android.content.Context#SENSOR_SERVICE}.
+ * SensorManager lets you access the device's {@link android.hardware.Sensor
+ * sensors}. Get an instance of this class by calling
+ * {@link android.content.Context#getSystemService(java.lang.String)
+ * Context.getSystemService()} with the argument
+ * {@link android.content.Context#SENSOR_SERVICE}.
+ *
+ * <pre class="prettyprint">
+ * public class SensorActivity extends Activity, implements SensorEventListener {
+ *     private final SensorManager mSensorManager;
+ *     private final Sensor mAccelerometer;
+ *
+ *     public SensorActivity() {
+ *         mSensorManager = (SensorManager)getSystemService(SENSOR_SERVICE);
+ *         mAccelerometer = mSensorManager.getDefaultSensor(Sensor.TYPE_ACCELEROMETER);
+ *         mSensorManager.registerListener(this, mAccelerometer, SensorManager.SENSOR_DELAY_NORMAL);
+ *     }
+ *
+ *     public void onAccuracyChanged(Sensor sensor, int accuracy) {
+ *     }
+ *
+ *     public abstract void onSensorChanged(SensorEvent event) {
+ *     }
+ * }
+ * </pre>
+ *
+ * @see SensorEventListener
+ * @see SensorEvent
+ * @see Sensor
+ *
  */
 public class SensorManager
 {
@@ -53,172 +79,220 @@
     /* NOTE: sensor IDs must be a power of 2 */
 
     /**
-     * A constant describing an orientation sensor.
-     * See {@link android.hardware.SensorListener SensorListener} for more details.
+     * A constant describing an orientation sensor. See
+     * {@link android.hardware.SensorListener SensorListener} for more details.
+     *
      * @deprecated use {@link android.hardware.Sensor Sensor} instead.
      */
     @Deprecated
     public static final int SENSOR_ORIENTATION = 1 << 0;
 
     /**
-     * A constant describing an accelerometer.
-     * See {@link android.hardware.SensorListener SensorListener} for more details.
+     * A constant describing an accelerometer. See
+     * {@link android.hardware.SensorListener SensorListener} for more details.
+     *
      * @deprecated use {@link android.hardware.Sensor Sensor} instead.
      */
     @Deprecated
     public static final int SENSOR_ACCELEROMETER = 1 << 1;
 
     /**
-     * A constant describing a temperature sensor
-     * See {@link android.hardware.SensorListener SensorListener} for more details.
+     * A constant describing a temperature sensor See
+     * {@link android.hardware.SensorListener SensorListener} for more details.
+     *
      * @deprecated use {@link android.hardware.Sensor Sensor} instead.
      */
     @Deprecated
     public static final int SENSOR_TEMPERATURE = 1 << 2;
 
     /**
-     * A constant describing a magnetic sensor
-     * See {@link android.hardware.SensorListener SensorListener} for more details.
+     * A constant describing a magnetic sensor See
+     * {@link android.hardware.SensorListener SensorListener} for more details.
+     *
      * @deprecated use {@link android.hardware.Sensor Sensor} instead.
      */
     @Deprecated
     public static final int SENSOR_MAGNETIC_FIELD = 1 << 3;
 
     /**
-     * A constant describing an ambient light sensor
-     * See {@link android.hardware.SensorListener SensorListener} for more details.
+     * A constant describing an ambient light sensor See
+     * {@link android.hardware.SensorListener SensorListener} for more details.
+     *
      * @deprecated use {@link android.hardware.Sensor Sensor} instead.
      */
     @Deprecated
     public static final int SENSOR_LIGHT = 1 << 4;
 
     /**
-     * A constant describing a proximity sensor
-     * See {@link android.hardware.SensorListener SensorListener} for more details.
+     * A constant describing a proximity sensor See
+     * {@link android.hardware.SensorListener SensorListener} for more details.
+     *
      * @deprecated use {@link android.hardware.Sensor Sensor} instead.
      */
     @Deprecated
     public static final int SENSOR_PROXIMITY = 1 << 5;
 
     /**
-     * A constant describing a Tricorder
-     * See {@link android.hardware.SensorListener SensorListener} for more details.
+     * A constant describing a Tricorder See
+     * {@link android.hardware.SensorListener SensorListener} for more details.
+     *
      * @deprecated use {@link android.hardware.Sensor Sensor} instead.
      */
     @Deprecated
     public static final int SENSOR_TRICORDER = 1 << 6;
 
     /**
-     * A constant describing an orientation sensor.
-     * See {@link android.hardware.SensorListener SensorListener} for more details.
+     * A constant describing an orientation sensor. See
+     * {@link android.hardware.SensorListener SensorListener} for more details.
+     *
      * @deprecated use {@link android.hardware.Sensor Sensor} instead.
      */
     @Deprecated
     public static final int SENSOR_ORIENTATION_RAW = 1 << 7;
 
-    /** A constant that includes all sensors
+    /**
+     * A constant that includes all sensors
+     *
      * @deprecated use {@link android.hardware.Sensor Sensor} instead.
      */
     @Deprecated
     public static final int SENSOR_ALL = 0x7F;
 
-    /** Smallest sensor ID 
+    /**
+     * Smallest sensor ID
+     *
      * @deprecated use {@link android.hardware.Sensor Sensor} instead.
      */
     @Deprecated
     public static final int SENSOR_MIN = SENSOR_ORIENTATION;
 
-    /** Largest sensor ID
+    /**
+     * Largest sensor ID
+     *
      * @deprecated use {@link android.hardware.Sensor Sensor} instead.
      */
     @Deprecated
     public static final int SENSOR_MAX = ((SENSOR_ALL + 1)>>1);
 
 
-    /** Index of the X value in the array returned by
+    /**
+     * Index of the X value in the array returned by
      * {@link android.hardware.SensorListener#onSensorChanged}
+     *
      * @deprecated use {@link android.hardware.Sensor Sensor} instead.
      */
     @Deprecated
     public static final int DATA_X = 0;
-    /** Index of the Y value in the array returned by
+
+    /**
+     * Index of the Y value in the array returned by
      * {@link android.hardware.SensorListener#onSensorChanged}
+     *
      * @deprecated use {@link android.hardware.Sensor Sensor} instead.
      */
     @Deprecated
     public static final int DATA_Y = 1;
-    /** Index of the Z value in the array returned by
+
+    /**
+     * Index of the Z value in the array returned by
      * {@link android.hardware.SensorListener#onSensorChanged}
+     *
      * @deprecated use {@link android.hardware.Sensor Sensor} instead.
      */
     @Deprecated
     public static final int DATA_Z = 2;
 
-    /** Offset to the untransformed values in the array returned by
+    /**
+     * Offset to the untransformed values in the array returned by
      * {@link android.hardware.SensorListener#onSensorChanged}
+     *
      * @deprecated use {@link android.hardware.Sensor Sensor} instead.
      */
     @Deprecated
     public static final int RAW_DATA_INDEX = 3;
 
-    /** Index of the untransformed X value in the array returned by
+    /**
+     * Index of the untransformed X value in the array returned by
      * {@link android.hardware.SensorListener#onSensorChanged}
+     *
      * @deprecated use {@link android.hardware.Sensor Sensor} instead.
      */
     @Deprecated
     public static final int RAW_DATA_X = 3;
-    /** Index of the untransformed Y value in the array returned by
+
+    /**
+     * Index of the untransformed Y value in the array returned by
      * {@link android.hardware.SensorListener#onSensorChanged}
+     *
      * @deprecated use {@link android.hardware.Sensor Sensor} instead.
      */
     @Deprecated
     public static final int RAW_DATA_Y = 4;
-    /** Index of the untransformed Z value in the array returned by
+
+    /**
+     * Index of the untransformed Z value in the array returned by
      * {@link android.hardware.SensorListener#onSensorChanged}
+     *
      * @deprecated use {@link android.hardware.Sensor Sensor} instead.
      */
     @Deprecated
     public static final int RAW_DATA_Z = 5;
 
-
     /** Standard gravity (g) on Earth. This value is equivalent to 1G */
     public static final float STANDARD_GRAVITY = 9.80665f;
 
-    /** values returned by the accelerometer in various locations in the universe.
-     * all values are in SI units (m/s^2) */
+    /** Sun's gravity in SI units (m/s^2) */
     public static final float GRAVITY_SUN             = 275.0f;
+    /** Mercury's gravity in SI units (m/s^2) */
     public static final float GRAVITY_MERCURY         = 3.70f;
+    /** Venus' gravity in SI units (m/s^2) */
     public static final float GRAVITY_VENUS           = 8.87f;
+    /** Earth's gravity in SI units (m/s^2) */
     public static final float GRAVITY_EARTH           = 9.80665f;
+    /** The Moon's gravity in SI units (m/s^2) */
     public static final float GRAVITY_MOON            = 1.6f;
+    /** Mars' gravity in SI units (m/s^2) */
     public static final float GRAVITY_MARS            = 3.71f;
+    /** Jupiter's gravity in SI units (m/s^2) */
     public static final float GRAVITY_JUPITER         = 23.12f;
+    /** Saturn's gravity in SI units (m/s^2) */
     public static final float GRAVITY_SATURN          = 8.96f;
+    /** Uranus' gravity in SI units (m/s^2) */
     public static final float GRAVITY_URANUS          = 8.69f;
+    /** Neptune's gravity in SI units (m/s^2) */
     public static final float GRAVITY_NEPTUNE         = 11.0f;
+    /** Pluto's gravity in SI units (m/s^2) */
     public static final float GRAVITY_PLUTO           = 0.6f;
+    /** Gravity (estimate) on the first Death Star in Empire units (m/s^2) */
     public static final float GRAVITY_DEATH_STAR_I    = 0.000000353036145f;
+    /** Gravity on the island */
     public static final float GRAVITY_THE_ISLAND      = 4.815162342f;
 
 
     /** Maximum magnetic field on Earth's surface */
     public static final float MAGNETIC_FIELD_EARTH_MAX = 60.0f;
-
     /** Minimum magnetic field on Earth's surface */
     public static final float MAGNETIC_FIELD_EARTH_MIN = 30.0f;
 
 
-    /** Various luminance values during the day (lux) */
+    /** Maximum luminance of sunlight in lux */
     public static final float LIGHT_SUNLIGHT_MAX = 120000.0f;
+    /** luminance of sunlight in lux */
     public static final float LIGHT_SUNLIGHT     = 110000.0f;
+    /** luminance in shade in lux */
     public static final float LIGHT_SHADE        = 20000.0f;
+    /** luminance under an overcast sky in lux */
     public static final float LIGHT_OVERCAST     = 10000.0f;
+    /** luminance at sunrise in lux */
     public static final float LIGHT_SUNRISE      = 400.0f;
+    /** luminance under a cloudy sky in lux */
     public static final float LIGHT_CLOUDY       = 100.0f;
-    /** Various luminance values during the night (lux) */
+    /** luminance at night with full moon in lux */
     public static final float LIGHT_FULLMOON     = 0.25f;
+    /** luminance at night with no moon in lux*/
     public static final float LIGHT_NO_MOON      = 0.001f;
 
+
     /** get sensor data as fast as possible */
     public static final int SENSOR_DELAY_FASTEST = 0;
     /** rate suitable for games */
@@ -229,16 +303,22 @@
     public static final int SENSOR_DELAY_NORMAL = 3;
 
 
-    /** The values returned by this sensor cannot be trusted, calibration
-     * is needed or the environment doesn't allow readings */
+    /**
+     * The values returned by this sensor cannot be trusted, calibration is
+     * needed or the environment doesn't allow readings
+     */
     public static final int SENSOR_STATUS_UNRELIABLE = 0;
 
-    /** This sensor is reporting data with low accuracy, calibration with the
-     * environment is needed */
+    /**
+     * This sensor is reporting data with low accuracy, calibration with the
+     * environment is needed
+     */
     public static final int SENSOR_STATUS_ACCURACY_LOW = 1;
 
-    /** This sensor is reporting data with an average level of accuracy,
-     * calibration with the environment may improve the readings */
+    /**
+     * This sensor is reporting data with an average level of accuracy,
+     * calibration with the environment may improve the readings
+     */
     public static final int SENSOR_STATUS_ACCURACY_MEDIUM = 2;
 
     /** This sensor is reporting data with maximum accuracy */
@@ -586,9 +666,10 @@
         return 0;
     }
 
-    /** @return available sensors.
+    /**
+     * @return available sensors.
      * @deprecated This method is deprecated, use
-     * {@link SensorManager#getSensorList(int)} instead
+     *             {@link SensorManager#getSensorList(int)} instead
      */
     @Deprecated
     public int getSensors() {
@@ -612,13 +693,18 @@
     }
 
     /**
-     * Use this method to get the list of available sensors of a certain
-     * type. Make multiple calls to get sensors of different types or use
-     * {@link android.hardware.Sensor#TYPE_ALL Sensor.TYPE_ALL} to get all
-     * the sensors.
+     * Use this method to get the list of available sensors of a certain type.
+     * Make multiple calls to get sensors of different types or use
+     * {@link android.hardware.Sensor#TYPE_ALL Sensor.TYPE_ALL} to get all the
+     * sensors.
      *
-     * @param type of sensors requested
+     * @param type
+     *        of sensors requested
+     *
      * @return a list of sensors matching the asked type.
+     *
+     * @see #getDefaultSensor(int)
+     * @see Sensor
      */
     public List<Sensor> getSensorList(int type) {
         // cache the returned lists the first time
@@ -644,14 +730,18 @@
     }
 
     /**
-     * Use this method to get the default sensor for a given type. Note that
-     * the returned sensor could be a composite sensor, and its data could be
+     * Use this method to get the default sensor for a given type. Note that the
+     * returned sensor could be a composite sensor, and its data could be
      * averaged or filtered. If you need to access the raw sensors use
      * {@link SensorManager#getSensorList(int) getSensorList}.
      *
+     * @param type
+     *        of sensors requested
      *
-     * @param type of sensors requested
      * @return the default sensors matching the asked type.
+     *
+     * @see #getSensorList(int)
+     * @see Sensor
      */
     public Sensor getDefaultSensor(int type) {
         // TODO: need to be smarter, for now, just return the 1st sensor
@@ -659,17 +749,21 @@
         return l.isEmpty() ? null : l.get(0);
     }
 
-
     /**
      * Registers a listener for given sensors.
+     *
      * @deprecated This method is deprecated, use
-     * {@link SensorManager#registerListener(SensorEventListener, Sensor, int)}
-     * instead.
+     *             {@link SensorManager#registerListener(SensorEventListener, Sensor, int)}
+     *             instead.
      *
-     * @param listener sensor listener object
-     * @param sensors a bit masks of the sensors to register to
+     * @param listener
+     *        sensor listener object
      *
-     * @return true if the sensor is supported and successfully enabled
+     * @param sensors
+     *        a bit masks of the sensors to register to
+     *
+     * @return <code>true</code> if the sensor is supported and successfully
+     *         enabled
      */
     @Deprecated
     public boolean registerListener(SensorListener listener, int sensors) {
@@ -678,18 +772,26 @@
 
     /**
      * Registers a SensorListener for given sensors.
+     *
      * @deprecated This method is deprecated, use
-     * {@link SensorManager#registerListener(SensorEventListener, Sensor, int)}
-     * instead.
+     *             {@link SensorManager#registerListener(SensorEventListener, Sensor, int)}
+     *             instead.
      *
-     * @param listener sensor listener object
-     * @param sensors a bit masks of the sensors to register to
-     * @param rate rate of events. This is only a hint to the system. events
-     * may be received faster or slower than the specified rate. Usually events
-     * are received faster. The value must be one of {@link #SENSOR_DELAY_NORMAL},
-     * {@link #SENSOR_DELAY_UI}, {@link #SENSOR_DELAY_GAME}, or {@link #SENSOR_DELAY_FASTEST}.
+     * @param listener
+     *        sensor listener object
      *
-     * @return true if the sensor is supported and successfully enabled
+     * @param sensors
+     *        a bit masks of the sensors to register to
+     *
+     * @param rate
+     *        rate of events. This is only a hint to the system. events may be
+     *        received faster or slower than the specified rate. Usually events
+     *        are received faster. The value must be one of
+     *        {@link #SENSOR_DELAY_NORMAL}, {@link #SENSOR_DELAY_UI},
+     *        {@link #SENSOR_DELAY_GAME}, or {@link #SENSOR_DELAY_FASTEST}.
+     *
+     * @return <code>true</code> if the sensor is supported and successfully
+     *         enabled
      */
     @Deprecated
     public boolean registerListener(SensorListener listener, int sensors, int rate) {
@@ -747,12 +849,16 @@
 
     /**
      * Unregisters a listener for the sensors with which it is registered.
-     * @deprecated This method is deprecated, use
-     * {@link SensorManager#unregisterListener(SensorEventListener, Sensor)}
-     * instead.
      *
-     * @param listener a SensorListener object
-     * @param sensors a bit masks of the sensors to unregister from
+     * @deprecated This method is deprecated, use
+     *             {@link SensorManager#unregisterListener(SensorEventListener, Sensor)}
+     *             instead.
+     *
+     * @param listener
+     *        a SensorListener object
+     *
+     * @param sensors
+     *        a bit masks of the sensors to unregister from
      */
     @Deprecated
     public void unregisterListener(SensorListener listener, int sensors) {
@@ -815,11 +921,13 @@
 
     /**
      * Unregisters a listener for all sensors.
-     * @deprecated This method is deprecated, use
-     * {@link SensorManager#unregisterListener(SensorEventListener)}
-     * instead.
      *
-     * @param listener a SensorListener object
+     * @deprecated This method is deprecated, use
+     *             {@link SensorManager#unregisterListener(SensorEventListener)}
+     *             instead.
+     *
+     * @param listener
+     *        a SensorListener object
      */
     @Deprecated
     public void unregisterListener(SensorListener listener) {
@@ -829,8 +937,14 @@
     /**
      * Unregisters a listener for the sensors with which it is registered.
      *
-     * @param listener a SensorEventListener object
-     * @param sensor the sensor to unregister from
+     * @param listener
+     *        a SensorEventListener object
+     *
+     * @param sensor
+     *        the sensor to unregister from
+     *
+     * @see #unregisterListener(SensorEventListener)
+     * @see #registerListener(SensorEventListener, Sensor, int)
      *
      */
     public void unregisterListener(SensorEventListener listener, Sensor sensor) {
@@ -840,27 +954,42 @@
     /**
      * Unregisters a listener for all sensors.
      *
-     * @param listener a SensorListener object
+     * @param listener
+     *        a SensorListener object
+     *
+     * @see #unregisterListener(SensorEventListener, Sensor)
+     * @see #registerListener(SensorEventListener, Sensor, int)
      *
      */
     public void unregisterListener(SensorEventListener listener) {
         unregisterListener((Object)listener);
     }
 
-
     /**
-     * Registers a {@link android.hardware.SensorEventListener SensorEventListener}
-     * for the given sensor.
+     * Registers a {@link android.hardware.SensorEventListener
+     * SensorEventListener} for the given sensor.
      *
-     * @param listener A {@link android.hardware.SensorEventListener SensorEventListener} object.
-     * @param sensor The {@link android.hardware.Sensor Sensor} to register to.
-     * @param rate The rate {@link android.hardware.SensorEvent sensor events} are delivered at.
-     * This is only a hint to the system. Events may be received faster or
-     * slower than the specified rate. Usually events are received faster. The value must be
-     * one of {@link #SENSOR_DELAY_NORMAL}, {@link #SENSOR_DELAY_UI}, {@link #SENSOR_DELAY_GAME},
-     * or {@link #SENSOR_DELAY_FASTEST}.
+     * @param listener
+     *        A {@link android.hardware.SensorEventListener SensorEventListener}
+     *        object.
      *
-     * @return true if the sensor is supported and successfully enabled.
+     * @param sensor
+     *        The {@link android.hardware.Sensor Sensor} to register to.
+     *
+     * @param rate
+     *        The rate {@link android.hardware.SensorEvent sensor events} are
+     *        delivered at. This is only a hint to the system. Events may be
+     *        received faster or slower than the specified rate. Usually events
+     *        are received faster. The value must be one of
+     *        {@link #SENSOR_DELAY_NORMAL}, {@link #SENSOR_DELAY_UI},
+     *        {@link #SENSOR_DELAY_GAME}, or {@link #SENSOR_DELAY_FASTEST}.
+     *
+     * @return <code>true</code> if the sensor is supported and successfully
+     *         enabled.
+     *
+     * @see #registerListener(SensorEventListener, Sensor, int, Handler)
+     * @see #unregisterListener(SensorEventListener)
+     * @see #unregisterListener(SensorEventListener, Sensor)
      *
      */
     public boolean registerListener(SensorEventListener listener, Sensor sensor, int rate) {
@@ -868,21 +997,35 @@
     }
 
     /**
-     * Registers a {@link android.hardware.SensorEventListener SensorEventListener}
-     * for the given sensor.
+     * Registers a {@link android.hardware.SensorEventListener
+     * SensorEventListener} for the given sensor.
      *
-     * @param listener A {@link android.hardware.SensorEventListener SensorEventListener} object.
-     * @param sensor The {@link android.hardware.Sensor Sensor} to register to.
-     * @param rate The rate {@link android.hardware.SensorEvent sensor events} are delivered at.
-     * This is only a hint to the system. Events may be received faster or
-     * slower than the specified rate. Usually events are received faster. The value must be one
-     * of {@link #SENSOR_DELAY_NORMAL}, {@link #SENSOR_DELAY_UI}, {@link #SENSOR_DELAY_GAME}, or
-     * {@link #SENSOR_DELAY_FASTEST}.
-     * @param handler The {@link android.os.Handler Handler} the
-     * {@link android.hardware.SensorEvent sensor events} will be delivered to.
+     * @param listener
+     *        A {@link android.hardware.SensorEventListener SensorEventListener}
+     *        object.
+     *
+     * @param sensor
+     *        The {@link android.hardware.Sensor Sensor} to register to.
+     *
+     * @param rate
+     *        The rate {@link android.hardware.SensorEvent sensor events} are
+     *        delivered at. This is only a hint to the system. Events may be
+     *        received faster or slower than the specified rate. Usually events
+     *        are received faster. The value must be one of
+     *        {@link #SENSOR_DELAY_NORMAL}, {@link #SENSOR_DELAY_UI},
+     *        {@link #SENSOR_DELAY_GAME}, or {@link #SENSOR_DELAY_FASTEST}.
+     *
+     * @param handler
+     *        The {@link android.os.Handler Handler} the
+     *        {@link android.hardware.SensorEvent sensor events} will be
+     *        delivered to.
      *
      * @return true if the sensor is supported and successfully enabled.
      *
+     * @see #registerListener(SensorEventListener, Sensor, int)
+     * @see #unregisterListener(SensorEventListener)
+     * @see #unregisterListener(SensorEventListener, Sensor)
+     *
      */
     public boolean registerListener(SensorEventListener listener, Sensor sensor, int rate,
             Handler handler) {
@@ -1003,60 +1146,83 @@
     }
 
     /**
-     * Computes the inclination matrix <b>I</b> as well as the rotation
-     * matrix <b>R</b> transforming a vector from the
-     * device coordinate system to the world's coordinate system which is
-     * defined as a direct orthonormal basis, where:
-     * 
+     * <p>
+     * Computes the inclination matrix <b>I</b> as well as the rotation matrix
+     * <b>R</b> transforming a vector from the device coordinate system to the
+     * world's coordinate system which is defined as a direct orthonormal basis,
+     * where:
+     * </p>
+     *
+     * <ul>
      * <li>X is defined as the vector product <b>Y.Z</b> (It is tangential to
      * the ground at the device's current location and roughly points East).</li>
      * <li>Y is tangential to the ground at the device's current location and
      * points towards the magnetic North Pole.</li>
      * <li>Z points towards the sky and is perpendicular to the ground.</li>
+     * </ul>
+     *
+     * <p>
+     * <center><img src="../../../images/axis_globe.png"
+     * alt="Sensors coordinate-system diagram." border="0" /></center>
+     * </p>
+     *
      * <p>
      * <hr>
-     * <p>By definition:
-     * <p>[0 0 g] = <b>R</b> * <b>gravity</b> (g = magnitude of gravity)
-     * <p>[0 m 0] = <b>I</b> * <b>R</b> * <b>geomagnetic</b>
-     * (m = magnitude of geomagnetic field)
-     * <p><b>R</b> is the identity matrix when the device is aligned with the
+     * <p>
+     * By definition:
+     * <p>
+     * [0 0 g] = <b>R</b> * <b>gravity</b> (g = magnitude of gravity)
+     * <p>
+     * [0 m 0] = <b>I</b> * <b>R</b> * <b>geomagnetic</b> (m = magnitude of
+     * geomagnetic field)
+     * <p>
+     * <b>R</b> is the identity matrix when the device is aligned with the
      * world's coordinate system, that is, when the device's X axis points
      * toward East, the Y axis points to the North Pole and the device is facing
      * the sky.
      *
-     * <p><b>I</b> is a rotation matrix transforming the geomagnetic
-     * vector into the same coordinate space as gravity (the world's coordinate
-     * space). <b>I</b> is a simple rotation around the X axis.
-     * The inclination angle in radians can be computed with
-     * {@link #getInclination}.
+     * <p>
+     * <b>I</b> is a rotation matrix transforming the geomagnetic vector into
+     * the same coordinate space as gravity (the world's coordinate space).
+     * <b>I</b> is a simple rotation around the X axis. The inclination angle in
+     * radians can be computed with {@link #getInclination}.
      * <hr>
-     * 
-     * <p> Each matrix is returned either as a 3x3 or 4x4 row-major matrix
-     * depending on the length of the passed array:
-     * <p><u>If the array length is 16:</u>
+     *
+     * <p>
+     * Each matrix is returned either as a 3x3 or 4x4 row-major matrix depending
+     * on the length of the passed array:
+     * <p>
+     * <u>If the array length is 16:</u>
+     *
      * <pre>
      *   /  M[ 0]   M[ 1]   M[ 2]   M[ 3]  \
      *   |  M[ 4]   M[ 5]   M[ 6]   M[ 7]  |
      *   |  M[ 8]   M[ 9]   M[10]   M[11]  |
      *   \  M[12]   M[13]   M[14]   M[15]  /
      *</pre>
-     * This matrix is ready to be used by OpenGL ES's 
-     * {@link javax.microedition.khronos.opengles.GL10#glLoadMatrixf(float[], int) 
-     * glLoadMatrixf(float[], int)}. 
-     * <p>Note that because OpenGL matrices are column-major matrices you must
-     * transpose the matrix before using it. However, since the matrix is a 
+     *
+     * This matrix is ready to be used by OpenGL ES's
+     * {@link javax.microedition.khronos.opengles.GL10#glLoadMatrixf(float[], int)
+     * glLoadMatrixf(float[], int)}.
+     * <p>
+     * Note that because OpenGL matrices are column-major matrices you must
+     * transpose the matrix before using it. However, since the matrix is a
      * rotation matrix, its transpose is also its inverse, conveniently, it is
      * often the inverse of the rotation that is needed for rendering; it can
      * therefore be used with OpenGL ES directly.
      * <p>
      * Also note that the returned matrices always have this form:
+     *
      * <pre>
      *   /  M[ 0]   M[ 1]   M[ 2]   0  \
      *   |  M[ 4]   M[ 5]   M[ 6]   0  |
      *   |  M[ 8]   M[ 9]   M[10]   0  |
      *   \      0       0       0   1  /
      *</pre>
-     * <p><u>If the array length is 9:</u>
+     *
+     * <p>
+     * <u>If the array length is 9:</u>
+     *
      * <pre>
      *   /  M[ 0]   M[ 1]   M[ 2]  \
      *   |  M[ 3]   M[ 4]   M[ 5]  |
@@ -1064,34 +1230,52 @@
      *</pre>
      *
      * <hr>
-     * <p>The inverse of each matrix can be computed easily by taking its
+     * <p>
+     * The inverse of each matrix can be computed easily by taking its
      * transpose.
      *
-     * <p>The matrices returned by this function are meaningful only when the
-     * device is not free-falling and it is not close to the magnetic north.
-     * If the device is accelerating, or placed into a strong magnetic field,
-     * the returned matrices may be inaccurate.
+     * <p>
+     * The matrices returned by this function are meaningful only when the
+     * device is not free-falling and it is not close to the magnetic north. If
+     * the device is accelerating, or placed into a strong magnetic field, the
+     * returned matrices may be inaccurate.
      *
-     * @param R is an array of 9 floats holding the rotation matrix <b>R</b>
-     * when this function returns. R can be null.<p>
-     * @param I is an array of 9 floats holding the rotation matrix <b>I</b>
-     * when this function returns. I can be null.<p>
-     * @param gravity is an array of 3 floats containing the gravity vector
-     * expressed in the device's coordinate. You can simply use the
-     * {@link android.hardware.SensorEvent#values values}
-     * returned by a {@link android.hardware.SensorEvent SensorEvent} of a
-     * {@link android.hardware.Sensor Sensor} of type
-     * {@link android.hardware.Sensor#TYPE_ACCELEROMETER TYPE_ACCELEROMETER}.<p>
-     * @param geomagnetic is an array of 3 floats containing the geomagnetic
-     * vector expressed in the device's coordinate. You can simply use the
-     * {@link android.hardware.SensorEvent#values values}
-     * returned by a {@link android.hardware.SensorEvent SensorEvent} of a
-     * {@link android.hardware.Sensor Sensor} of type
-     * {@link android.hardware.Sensor#TYPE_MAGNETIC_FIELD TYPE_MAGNETIC_FIELD}.
-     * @return
-     *   true on success<p>
-     *   false on failure (for instance, if the device is in free fall).
-     *   On failure the output matrices are not modified.
+     * @param R
+     *        is an array of 9 floats holding the rotation matrix <b>R</b> when
+     *        this function returns. R can be null.
+     *        <p>
+     *
+     * @param I
+     *        is an array of 9 floats holding the rotation matrix <b>I</b> when
+     *        this function returns. I can be null.
+     *        <p>
+     *
+     * @param gravity
+     *        is an array of 3 floats containing the gravity vector expressed in
+     *        the device's coordinate. You can simply use the
+     *        {@link android.hardware.SensorEvent#values values} returned by a
+     *        {@link android.hardware.SensorEvent SensorEvent} of a
+     *        {@link android.hardware.Sensor Sensor} of type
+     *        {@link android.hardware.Sensor#TYPE_ACCELEROMETER
+     *        TYPE_ACCELEROMETER}.
+     *        <p>
+     *
+     * @param geomagnetic
+     *        is an array of 3 floats containing the geomagnetic vector
+     *        expressed in the device's coordinate. You can simply use the
+     *        {@link android.hardware.SensorEvent#values values} returned by a
+     *        {@link android.hardware.SensorEvent SensorEvent} of a
+     *        {@link android.hardware.Sensor Sensor} of type
+     *        {@link android.hardware.Sensor#TYPE_MAGNETIC_FIELD
+     *        TYPE_MAGNETIC_FIELD}.
+     *
+     * @return <code>true</code> on success, <code>false</code> on failure (for
+     *         instance, if the device is in free fall). On failure the output
+     *         matrices are not modified.
+     *
+     * @see #getInclination(float[])
+     * @see #getOrientation(float[], float[])
+     * @see #remapCoordinateSystem(float[], int, int, float[])
      */
 
     public static boolean getRotationMatrix(float[] R, float[] I,
@@ -1160,64 +1344,98 @@
     /**
      * Computes the geomagnetic inclination angle in radians from the
      * inclination matrix <b>I</b> returned by {@link #getRotationMatrix}.
-     * @param I inclination matrix see {@link #getRotationMatrix}.
+     *
+     * @param I
+     *        inclination matrix see {@link #getRotationMatrix}.
+     *
      * @return The geomagnetic inclination angle in radians.
+     *
+     * @see #getRotationMatrix(float[], float[], float[], float[])
+     * @see #getOrientation(float[], float[])
+     * @see GeomagneticField
+     *
      */
     public static float getInclination(float[] I) {
         if (I.length == 9) {
             return (float)Math.atan2(I[5], I[4]);
         } else {
-            return (float)Math.atan2(I[6], I[5]);            
+            return (float)Math.atan2(I[6], I[5]);
         }
     }
 
     /**
-     * Rotates the supplied rotation matrix so it is expressed in a
-     * different coordinate system. This is typically used when an application
-     * needs to compute the three orientation angles of the device (see
+     * <p>
+     * Rotates the supplied rotation matrix so it is expressed in a different
+     * coordinate system. This is typically used when an application needs to
+     * compute the three orientation angles of the device (see
      * {@link #getOrientation}) in a different coordinate system.
-     * 
-     * <p>When the rotation matrix is used for drawing (for instance with 
-     * OpenGL ES), it usually <b>doesn't need</b> to be transformed by this 
-     * function, unless the screen is physically rotated, in which case you
-     * can use {@link android.view.Display#getRotation() Display.getRotation()}
-     * to retrieve the current rotation of the screen.  Note that because the
-     * user is generally free to rotate their screen, you often should
-     * consider the rotation in deciding the parameters to use here.
+     * </p>
      *
-     * <p><u>Examples:</u><p>
+     * <p>
+     * When the rotation matrix is used for drawing (for instance with OpenGL
+     * ES), it usually <b>doesn't need</b> to be transformed by this function,
+     * unless the screen is physically rotated, in which case you can use
+     * {@link android.view.Display#getRotation() Display.getRotation()} to
+     * retrieve the current rotation of the screen. Note that because the user
+     * is generally free to rotate their screen, you often should consider the
+     * rotation in deciding the parameters to use here.
+     * </p>
      *
-     * <li>Using the camera (Y axis along the camera's axis) for an augmented 
-     * reality application where the rotation angles are needed: </li><p>
+     * <p>
+     * <u>Examples:</u>
+     * <p>
      *
-     * <code>remapCoordinateSystem(inR, AXIS_X, AXIS_Z, outR);</code><p>
+     * <ul>
+     * <li>Using the camera (Y axis along the camera's axis) for an augmented
+     * reality application where the rotation angles are needed:</li>
+     *
+     * <p>
+     * <ul>
+     * <code>remapCoordinateSystem(inR, AXIS_X, AXIS_Z, outR);</code>
+     * </ul>
+     * </p>
      *
      * <li>Using the device as a mechanical compass when rotation is
-     * {@link android.view.Surface#ROTATION_90 Surface.ROTATION_90}:</li><p>
+     * {@link android.view.Surface#ROTATION_90 Surface.ROTATION_90}:</li>
      *
-     * <code>remapCoordinateSystem(inR, AXIS_Y, AXIS_MINUS_X, outR);</code><p>
+     * <p>
+     * <ul>
+     * <code>remapCoordinateSystem(inR, AXIS_Y, AXIS_MINUS_X, outR);</code>
+     * </ul>
+     * </p>
      *
-     * Beware of the above example. This call is needed only to account for
-     * a rotation from its natural orientation when calculating the
-     * rotation angles (see {@link #getOrientation}).
-     * If the rotation matrix is also used for rendering, it may not need to 
-     * be transformed, for instance if your {@link android.app.Activity
-     * Activity} is running in landscape mode.
+     * Beware of the above example. This call is needed only to account for a
+     * rotation from its natural orientation when calculating the rotation
+     * angles (see {@link #getOrientation}). If the rotation matrix is also used
+     * for rendering, it may not need to be transformed, for instance if your
+     * {@link android.app.Activity Activity} is running in landscape mode.
+     * </ul>
      *
-     * <p>Since the resulting coordinate system is orthonormal, only two axes
-     * need to be specified.
+     * <p>
+     * Since the resulting coordinate system is orthonormal, only two axes need
+     * to be specified.
      *
-     * @param inR the rotation matrix to be transformed. Usually it is the
-     * matrix returned by {@link #getRotationMatrix}.
-     * @param X defines on which world axis and direction the X axis of the
-     *        device is mapped.
-     * @param Y defines on which world axis and direction the Y axis of the
-     *        device is mapped.
-     * @param outR the transformed rotation matrix. inR and outR can be the same
+     * @param inR
+     *        the rotation matrix to be transformed. Usually it is the matrix
+     *        returned by {@link #getRotationMatrix}.
+     *
+     * @param X
+     *        defines on which world axis and direction the X axis of the device
+     *        is mapped.
+     *
+     * @param Y
+     *        defines on which world axis and direction the Y axis of the device
+     *        is mapped.
+     *
+     * @param outR
+     *        the transformed rotation matrix. inR and outR can be the same
      *        array, but it is not recommended for performance reason.
-     * @return true on success. false if the input parameters are incorrect, for
-     * instance if X and Y define the same axis. Or if inR and outR don't have 
-     * the same length.
+     *
+     * @return <code>true</code> on success. <code>false</code> if the input
+     *         parameters are incorrect, for instance if X and Y define the same
+     *         axis. Or if inR and outR don't have the same length.
+     *
+     * @see #getRotationMatrix(float[], float[], float[], float[])
      */
 
     public static boolean remapCoordinateSystem(float[] inR, int X, int Y,
@@ -1301,31 +1519,45 @@
 
     /**
      * Computes the device's orientation based on the rotation matrix.
-     * <p> When it returns, the array values is filled with the result:
+     * <p>
+     * When it returns, the array values is filled with the result:
+     * <ul>
      * <li>values[0]: <i>azimuth</i>, rotation around the Z axis.</li>
      * <li>values[1]: <i>pitch</i>, rotation around the X axis.</li>
      * <li>values[2]: <i>roll</i>, rotation around the Y axis.</li>
+     * </ul>
+     * <p>
+     * <center><img src="../../../images/axis_device.png"
+     * alt="Sensors coordinate-system diagram." border="0" /></center>
+     * </p>
      * <p>
      * All three angles above are in <b>radians</b> and <b>positive</b> in the
      * <b>counter-clockwise</b> direction.
-     *
-     * @param R rotation matrix see {@link #getRotationMatrix}.
-     * @param values an array of 3 floats to hold the result.
+     * 
+     * @param R
+     *        rotation matrix see {@link #getRotationMatrix}.
+     * 
+     * @param values
+     *        an array of 3 floats to hold the result.
+     * 
      * @return The array values passed as argument.
+     * 
+     * @see #getRotationMatrix(float[], float[], float[], float[])
+     * @see GeomagneticField
      */
-    public static float[] getOrientation(float[] R, float values[]) {
+   public static float[] getOrientation(float[] R, float values[]) {
         /*
          * 4x4 (length=16) case:
          *   /  R[ 0]   R[ 1]   R[ 2]   0  \
          *   |  R[ 4]   R[ 5]   R[ 6]   0  |
          *   |  R[ 8]   R[ 9]   R[10]   0  |
          *   \      0       0       0   1  /
-         *   
+         *
          * 3x3 (length=9) case:
          *   /  R[ 0]   R[ 1]   R[ 2]  \
          *   |  R[ 3]   R[ 4]   R[ 5]  |
          *   \  R[ 6]   R[ 7]   R[ 8]  /
-         * 
+         *
          */
         if (R.length == 9) {
             values[0] = (float)Math.atan2(R[1], R[4]);
@@ -1487,7 +1719,7 @@
             }
         }
     }
-    
+
     class LmsFilter {
         private static final int SENSORS_RATE_MS = 20;
         private static final int COUNT = 12;
@@ -1555,7 +1787,7 @@
         }
     }
 
-    
+
     private static native void nativeClassInit();
 
     private static native int sensors_module_init();
diff --git a/core/java/android/hardware/Usb.java b/core/java/android/hardware/Usb.java
new file mode 100644
index 0000000..57271d4
--- /dev/null
+++ b/core/java/android/hardware/Usb.java
@@ -0,0 +1,99 @@
+/*
+ * Copyright (C) 2010 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+
+package android.hardware;
+
+/**
+ * Class for accessing USB state information.
+ * @hide
+ */
+public class Usb {
+   /**
+     * Broadcast Action:  A broadcast for USB connected events.
+     *
+     * The extras bundle will name/value pairs with the name of the function
+     * and a value of either {@link #USB_FUNCTION_ENABLED} or {@link #USB_FUNCTION_DISABLED}.
+     * Possible USB function names include {@link #USB_FUNCTION_MASS_STORAGE},
+     * {@link #USB_FUNCTION_ADB}, {@link #USB_FUNCTION_RNDIS} and {@link #USB_FUNCTION_MTP}.
+     */
+    public static final String ACTION_USB_CONNECTED =
+            "android.hardware.action.USB_CONNECTED";
+
+   /**
+     * Broadcast Action:  A broadcast for USB disconnected events.
+     */
+    public static final String ACTION_USB_DISCONNECTED =
+            "android.hardware.action.USB_DISCONNECTED";
+
+   /**
+     * Broadcast Action:  A sticky broadcast for USB state change events.
+     *
+     * This is a sticky broadcast for clients that are interested in both USB connect and
+     * disconnect events.  If you are only concerned with one or the other, you can use
+     * {@link #ACTION_USB_CONNECTED} or {@link #ACTION_USB_DISCONNECTED} to avoid receiving
+     * unnecessary broadcasts.  The boolean {@link #USB_CONNECTED} extra indicates whether
+     * USB is connected or disconnected.
+     * The extras bundle will also contain name/value pairs with the name of the function
+     * and a value of either {@link #USB_FUNCTION_ENABLED} or {@link #USB_FUNCTION_DISABLED}.
+     * Possible USB function names include {@link #USB_FUNCTION_MASS_STORAGE},
+     * {@link #USB_FUNCTION_ADB}, {@link #USB_FUNCTION_RNDIS} and {@link #USB_FUNCTION_MTP}.
+     */
+    public static final String ACTION_USB_STATE =
+            "android.hardware.action.USB_STATE";
+
+    /**
+     * Boolean extra indicating whether USB is connected or disconnected.
+     * Used in extras for the {@link #ACTION_USB_STATE} broadcast.
+     */
+    public static final String USB_CONNECTED = "connected";
+
+    /**
+     * Name of the USB mass storage USB function.
+     * Used in extras for the {@link #ACTION_USB_CONNECTED} broadcast
+     */
+    public static final String USB_FUNCTION_MASS_STORAGE = "mass_storage";
+
+    /**
+     * Name of the adb USB function.
+     * Used in extras for the {@link #ACTION_USB_CONNECTED} broadcast
+     */
+    public static final String USB_FUNCTION_ADB = "adb";
+
+    /**
+     * Name of the RNDIS ethernet USB function.
+     * Used in extras for the {@link #ACTION_USB_CONNECTED} broadcast
+     */
+    public static final String USB_FUNCTION_RNDIS = "rndis";
+
+    /**
+     * Name of the MTP USB function.
+     * Used in extras for the {@link #ACTION_USB_CONNECTED} broadcast
+     */
+    public static final String USB_FUNCTION_MTP = "mtp";
+
+    /**
+     * Value indicating that a USB function is enabled.
+     * Used in extras for the {@link #ACTION_USB_CONNECTED} broadcast
+     */
+    public static final String USB_FUNCTION_ENABLED = "enabled";
+
+    /**
+     * Value indicating that a USB function is disabled.
+     * Used in extras for the {@link #ACTION_USB_CONNECTED} broadcast
+     */
+    public static final String USB_FUNCTION_DISABLED = "disabled";
+}
diff --git a/core/java/android/inputmethodservice/IInputMethodSessionWrapper.java b/core/java/android/inputmethodservice/IInputMethodSessionWrapper.java
index 80e9865..44f30f7 100644
--- a/core/java/android/inputmethodservice/IInputMethodSessionWrapper.java
+++ b/core/java/android/inputmethodservice/IInputMethodSessionWrapper.java
@@ -47,9 +47,10 @@
     private static final int DO_UPDATE_CURSOR = 95;
     private static final int DO_APP_PRIVATE_COMMAND = 100;
     private static final int DO_TOGGLE_SOFT_INPUT = 105;
-   
-    final HandlerCaller mCaller;
-    final InputMethodSession mInputMethodSession;
+    private static final int DO_FINISH_SESSION = 110;
+
+    HandlerCaller mCaller;
+    InputMethodSession mInputMethodSession;
     
     // NOTE: we should have a cache of these.
     static class InputMethodEventCallbackWrapper implements InputMethodSession.EventCallback {
@@ -127,6 +128,10 @@
                 mInputMethodSession.toggleSoftInput(msg.arg1, msg.arg2);
                 return;
             }
+            case DO_FINISH_SESSION: {
+                mInputMethodSession = null;
+                return;
+            }
         }
         Log.w(TAG, "Unhandled message code: " + msg.what);
     }
@@ -174,4 +179,8 @@
     public void toggleSoftInput(int showFlags, int hideFlags) {
         mCaller.executeOrSendMessage(mCaller.obtainMessageII(DO_TOGGLE_SOFT_INPUT, showFlags, hideFlags));
     }
+
+    public void finishSession() {
+        mCaller.executeOrSendMessage(mCaller.obtainMessage(DO_FINISH_SESSION));
+    }
 }
diff --git a/core/java/android/inputmethodservice/IInputMethodWrapper.java b/core/java/android/inputmethodservice/IInputMethodWrapper.java
index bfa82ee..35fd46f 100644
--- a/core/java/android/inputmethodservice/IInputMethodWrapper.java
+++ b/core/java/android/inputmethodservice/IInputMethodWrapper.java
@@ -39,6 +39,7 @@
 
 import java.io.FileDescriptor;
 import java.io.PrintWriter;
+import java.lang.ref.WeakReference;
 import java.util.concurrent.CountDownLatch;
 import java.util.concurrent.TimeUnit;
 
@@ -64,9 +65,9 @@
     private static final int DO_SHOW_SOFT_INPUT = 60;
     private static final int DO_HIDE_SOFT_INPUT = 70;
    
-    final AbstractInputMethodService mTarget;
+    final WeakReference<AbstractInputMethodService> mTarget;
     final HandlerCaller mCaller;
-    final InputMethod mInputMethod;
+    final WeakReference<InputMethod> mInputMethod;
     
     static class Notifier {
         boolean notified;
@@ -96,21 +97,32 @@
     
     public IInputMethodWrapper(AbstractInputMethodService context,
             InputMethod inputMethod) {
-        mTarget = context;
-        mCaller = new HandlerCaller(context, this);
-        mInputMethod = inputMethod;
+        mTarget = new WeakReference<AbstractInputMethodService>(context);
+        mCaller = new HandlerCaller(context.getApplicationContext(), this);
+        mInputMethod = new WeakReference<InputMethod>(inputMethod);
     }
 
     public InputMethod getInternalInputMethod() {
-        return mInputMethod;
+        return mInputMethod.get();
     }
 
     public void executeMessage(Message msg) {
+        InputMethod inputMethod = mInputMethod.get();
+        // Need a valid reference to the inputMethod for everything except a dump.
+        if (inputMethod == null && msg.what != DO_DUMP) {
+            Log.w(TAG, "Input method reference was null, ignoring message: " + msg.what);
+            return;
+        }
+
         switch (msg.what) {
             case DO_DUMP: {
+                AbstractInputMethodService target = mTarget.get();
+                if (target == null) {
+                    return;
+                }
                 HandlerCaller.SomeArgs args = (HandlerCaller.SomeArgs)msg.obj;
                 try {
-                    mTarget.dump((FileDescriptor)args.arg1,
+                    target.dump((FileDescriptor)args.arg1,
                             (PrintWriter)args.arg2, (String[])args.arg3);
                 } catch (RuntimeException e) {
                     ((PrintWriter)args.arg2).println("Exception: " + e);
@@ -122,22 +134,22 @@
             }
             
             case DO_ATTACH_TOKEN: {
-                mInputMethod.attachToken((IBinder)msg.obj);
+                inputMethod.attachToken((IBinder)msg.obj);
                 return;
             }
             case DO_SET_INPUT_CONTEXT: {
-                mInputMethod.bindInput((InputBinding)msg.obj);
+                inputMethod.bindInput((InputBinding)msg.obj);
                 return;
             }
             case DO_UNSET_INPUT_CONTEXT:
-                mInputMethod.unbindInput();
+                inputMethod.unbindInput();
                 return;
             case DO_START_INPUT: {
                 HandlerCaller.SomeArgs args = (HandlerCaller.SomeArgs)msg.obj;
                 IInputContext inputContext = (IInputContext)args.arg1;
                 InputConnection ic = inputContext != null
                         ? new InputConnectionWrapper(inputContext) : null;
-                mInputMethod.startInput(ic, (EditorInfo)args.arg2);
+                inputMethod.startInput(ic, (EditorInfo)args.arg2);
                 return;
             }
             case DO_RESTART_INPUT: {
@@ -145,33 +157,37 @@
                 IInputContext inputContext = (IInputContext)args.arg1;
                 InputConnection ic = inputContext != null
                         ? new InputConnectionWrapper(inputContext) : null;
-                mInputMethod.restartInput(ic, (EditorInfo)args.arg2);
+                inputMethod.restartInput(ic, (EditorInfo)args.arg2);
                 return;
             }
             case DO_CREATE_SESSION: {
-                mInputMethod.createSession(new InputMethodSessionCallbackWrapper(
+                inputMethod.createSession(new InputMethodSessionCallbackWrapper(
                         mCaller.mContext, (IInputMethodCallback)msg.obj));
                 return;
             }
             case DO_SET_SESSION_ENABLED:
-                mInputMethod.setSessionEnabled((InputMethodSession)msg.obj,
+                inputMethod.setSessionEnabled((InputMethodSession)msg.obj,
                         msg.arg1 != 0);
                 return;
             case DO_REVOKE_SESSION:
-                mInputMethod.revokeSession((InputMethodSession)msg.obj);
+                inputMethod.revokeSession((InputMethodSession)msg.obj);
                 return;
             case DO_SHOW_SOFT_INPUT:
-                mInputMethod.showSoftInput(msg.arg1, (ResultReceiver)msg.obj);
+                inputMethod.showSoftInput(msg.arg1, (ResultReceiver)msg.obj);
                 return;
             case DO_HIDE_SOFT_INPUT:
-                mInputMethod.hideSoftInput(msg.arg1, (ResultReceiver)msg.obj);
+                inputMethod.hideSoftInput(msg.arg1, (ResultReceiver)msg.obj);
                 return;
         }
         Log.w(TAG, "Unhandled message code: " + msg.what);
     }
     
     @Override protected void dump(FileDescriptor fd, PrintWriter fout, String[] args) {
-        if (mTarget.checkCallingOrSelfPermission(android.Manifest.permission.DUMP)
+        AbstractInputMethodService target = mTarget.get();
+        if (target == null) {
+            return;
+        }
+        if (target.checkCallingOrSelfPermission(android.Manifest.permission.DUMP)
                 != PackageManager.PERMISSION_GRANTED) {
             
             fout.println("Permission Denial: can't dump InputMethodManager from from pid="
diff --git a/core/java/android/inputmethodservice/InputMethodService.java b/core/java/android/inputmethodservice/InputMethodService.java
index 8c8d3e5..1a261d3 100644
--- a/core/java/android/inputmethodservice/InputMethodService.java
+++ b/core/java/android/inputmethodservice/InputMethodService.java
@@ -1988,15 +1988,19 @@
                 ei.inputType != InputType.TYPE_NULL);
         if (hasAction) {
             mExtractAccessories.setVisibility(View.VISIBLE);
-            if (ei.actionLabel != null) {
-                mExtractAction.setText(ei.actionLabel);
-            } else {
-                mExtractAction.setText(getTextForImeAction(ei.imeOptions));
+            if (mExtractAction != null) {
+                if (ei.actionLabel != null) {
+                    mExtractAction.setText(ei.actionLabel);
+                } else {
+                    mExtractAction.setText(getTextForImeAction(ei.imeOptions));
+                }
+                mExtractAction.setOnClickListener(mActionClickListener);
             }
-            mExtractAction.setOnClickListener(mActionClickListener);
         } else {
             mExtractAccessories.setVisibility(View.GONE);
-            mExtractAction.setOnClickListener(null);
+            if (mExtractAction != null) {
+                mExtractAction.setOnClickListener(null);
+            }
         }
     }
     
diff --git a/core/java/android/net/DownloadManager.java b/core/java/android/net/DownloadManager.java
new file mode 100644
index 0000000..00b6864
--- /dev/null
+++ b/core/java/android/net/DownloadManager.java
@@ -0,0 +1,729 @@
+/*
+ * Copyright (C) 2010 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package android.net;
+
+import android.content.ContentResolver;
+import android.content.ContentValues;
+import android.database.Cursor;
+import android.database.CursorWrapper;
+import android.os.ParcelFileDescriptor;
+import android.provider.Downloads;
+import android.util.Log;
+
+import java.io.File;
+import java.io.FileNotFoundException;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+
+/**
+ * The download manager is a system service that handles long-running HTTP downloads. Clients may
+ * request that a URI be downloaded to a particular destination file. The download manager will
+ * conduct the download in the background, taking care of HTTP interactions and retrying downloads
+ * after failures or across connectivity changes and system reboots.
+ *
+ * Instances of this class should be obtained through
+ * {@link android.content.Context#getSystemService(String)} by passing
+ * {@link android.content.Context#DOWNLOAD_SERVICE}.
+ *
+ * @hide
+ */
+public class DownloadManager {
+    /**
+     * An identifier for a particular download, unique across the system.  Clients use this ID to
+     * make subsequent calls related to the download.
+     */
+    public final static String COLUMN_ID = "id";
+
+    /**
+     * The client-supplied title for this download.  This will be displayed in system notifications,
+     * if enabled.
+     */
+    public final static String COLUMN_TITLE = "title";
+
+    /**
+     * The client-supplied description of this download.  This will be displayed in system
+     * notifications, if enabled.
+     */
+    public final static String COLUMN_DESCRIPTION = "description";
+
+    /**
+     * URI to be downloaded.
+     */
+    public final static String COLUMN_URI = "uri";
+
+    /**
+     * Internet Media Type of the downloaded file.  This will be filled in based on the server's
+     * response once the download has started.
+     *
+     * @see <a href="http://www.ietf.org/rfc/rfc1590.txt">RFC 1590, defining Media Types</a>
+     */
+    public final static String COLUMN_MEDIA_TYPE = "media_type";
+
+    /**
+     * Total size of the download in bytes.  This will be filled in once the download starts.
+     */
+    public final static String COLUMN_TOTAL_SIZE_BYTES = "total_size";
+
+    /**
+     * Uri where downloaded file will be stored.  If a destination is supplied by client, that URI
+     * will be used here.  Otherwise, the value will be filled in with a generated URI once the
+     * download has started.
+     */
+    public final static String COLUMN_LOCAL_URI = "local_uri";
+
+    /**
+     * Current status of the download, as one of the STATUS_* constants.
+     */
+    public final static String COLUMN_STATUS = "status";
+
+    /**
+     * Indicates the type of error that occurred, when {@link #COLUMN_STATUS} is
+     * {@link #STATUS_FAILED}.  If an HTTP error occurred, this will hold the HTTP status code as
+     * defined in RFC 2616.  Otherwise, it will hold one of the ERROR_* constants.
+     *
+     * If {@link #COLUMN_STATUS} is not {@link #STATUS_FAILED}, this column's value is undefined.
+     *
+     * @see <a href="http://www.w3.org/Protocols/rfc2616/rfc2616-sec6.html#sec6.1.1">RFC 2616
+     * status codes</a>
+     */
+    public final static String COLUMN_ERROR_CODE = "error_code";
+
+    /**
+     * Number of bytes download so far.
+     */
+    public final static String COLUMN_BYTES_DOWNLOADED_SO_FAR = "bytes_so_far";
+
+    /**
+     * Timestamp when the download was last modified, in {@link System#currentTimeMillis
+     * System.currentTimeMillis()} (wall clock time in UTC).
+     */
+    public final static String COLUMN_LAST_MODIFIED_TIMESTAMP = "last_modified_timestamp";
+
+
+    /**
+     * Value of {@link #COLUMN_STATUS} when the download is waiting to start.
+     */
+    public final static int STATUS_PENDING = 1 << 0;
+
+    /**
+     * Value of {@link #COLUMN_STATUS} when the download is currently running.
+     */
+    public final static int STATUS_RUNNING = 1 << 1;
+
+    /**
+     * Value of {@link #COLUMN_STATUS} when the download is waiting to retry or resume.
+     */
+    public final static int STATUS_PAUSED = 1 << 2;
+
+    /**
+     * Value of {@link #COLUMN_STATUS} when the download has successfully completed.
+     */
+    public final static int STATUS_SUCCESSFUL = 1 << 3;
+
+    /**
+     * Value of {@link #COLUMN_STATUS} when the download has failed (and will not be retried).
+     */
+    public final static int STATUS_FAILED = 1 << 4;
+
+
+    /**
+     * Value of COLUMN_ERROR_CODE when the download has completed with an error that doesn't fit
+     * under any other error code.
+     */
+    public final static int ERROR_UNKNOWN = 1000;
+
+    /**
+     * Value of {@link #COLUMN_ERROR_CODE} when a storage issue arises which doesn't fit under any
+     * other error code. Use the more specific {@link #ERROR_INSUFFICIENT_SPACE} and
+     * {@link #ERROR_DEVICE_NOT_FOUND} when appropriate.
+     */
+    public final static int ERROR_FILE_ERROR = 1001;
+
+    /**
+     * Value of {@link #COLUMN_ERROR_CODE} when an HTTP code was received that download manager
+     * can't handle.
+     */
+    public final static int ERROR_UNHANDLED_HTTP_CODE = 1002;
+
+    /**
+     * Value of {@link #COLUMN_ERROR_CODE} when an error receiving or processing data occurred at
+     * the HTTP level.
+     */
+    public final static int ERROR_HTTP_DATA_ERROR = 1004;
+
+    /**
+     * Value of {@link #COLUMN_ERROR_CODE} when there were too many redirects.
+     */
+    public final static int ERROR_TOO_MANY_REDIRECTS = 1005;
+
+    /**
+     * Value of {@link #COLUMN_ERROR_CODE} when there was insufficient storage space. Typically,
+     * this is because the SD card is full.
+     */
+    public final static int ERROR_INSUFFICIENT_SPACE = 1006;
+
+    /**
+     * Value of {@link #COLUMN_ERROR_CODE} when no external storage device was found. Typically,
+     * this is because the SD card is not mounted.
+     */
+    public final static int ERROR_DEVICE_NOT_FOUND = 1007;
+
+
+    // this array must contain all public columns
+    private static final String[] COLUMNS = new String[] {
+        COLUMN_ID,
+        COLUMN_TITLE,
+        COLUMN_DESCRIPTION,
+        COLUMN_URI,
+        COLUMN_MEDIA_TYPE,
+        COLUMN_TOTAL_SIZE_BYTES,
+        COLUMN_LOCAL_URI,
+        COLUMN_STATUS,
+        COLUMN_ERROR_CODE,
+        COLUMN_BYTES_DOWNLOADED_SO_FAR,
+        COLUMN_LAST_MODIFIED_TIMESTAMP
+    };
+
+    // columns to request from DownloadProvider
+    private static final String[] UNDERLYING_COLUMNS = new String[] {
+        Downloads.Impl._ID,
+        Downloads.COLUMN_TITLE,
+        Downloads.COLUMN_DESCRIPTION,
+        Downloads.COLUMN_URI,
+        Downloads.COLUMN_MIME_TYPE,
+        Downloads.COLUMN_TOTAL_BYTES,
+        Downloads._DATA,
+        Downloads.COLUMN_STATUS,
+        Downloads.COLUMN_CURRENT_BYTES,
+        Downloads.COLUMN_LAST_MODIFICATION,
+    };
+
+    private static final Set<String> LONG_COLUMNS = new HashSet<String>(
+            Arrays.asList(COLUMN_ID, COLUMN_TOTAL_SIZE_BYTES, COLUMN_STATUS, COLUMN_ERROR_CODE,
+                          COLUMN_BYTES_DOWNLOADED_SO_FAR, COLUMN_LAST_MODIFIED_TIMESTAMP));
+
+    /**
+     * This class contains all the information necessary to request a new download.  The URI is the
+     * only required parameter.
+     */
+    public static class Request {
+        /**
+         * Bit flag for setShowNotification indicated a notification should be created while the
+         * download is running.
+         */
+        private static final int NOTIFICATION_WHEN_RUNNING = 1;
+
+        Uri mUri;
+        Uri mDestinationUri;
+        Map<String, String> mRequestHeaders = new HashMap<String, String>();
+        String mTitle;
+        String mDescription;
+        int mNotificationFlags;
+
+        private String mMediaType;
+
+        /**
+         * @param uri the HTTP URI to download.
+         */
+        public Request(Uri uri) {
+            if (uri == null) {
+                throw new NullPointerException();
+            }
+            String scheme = uri.getScheme();
+            if (scheme == null || !scheme.equals("http")) {
+                throw new IllegalArgumentException("Can only download HTTP URIs: " + uri);
+            }
+            mUri = uri;
+        }
+
+        /**
+         * Set the local destination for the downloaded data. Must be a file URI to a path on
+         * external storage, and the calling application must have the WRITE_EXTERNAL_STORAGE
+         * permission.
+         *
+         *  By default, downloads are saved to a generated file in the download cache and may be
+         * deleted by the download manager at any time.
+         *
+         * @return this object
+         */
+        public Request setDestinationUri(Uri uri) {
+            mDestinationUri = uri;
+            return this;
+        }
+
+        /**
+         * Set an HTTP header to be included with the download request.
+         * @param header HTTP header name
+         * @param value header value
+         * @return this object
+         */
+        public Request setRequestHeader(String header, String value) {
+            mRequestHeaders.put(header, value);
+            return this;
+        }
+
+        /**
+         * Set the title of this download, to be displayed in notifications (if enabled)
+         * @return this object
+         */
+        public Request setTitle(String title) {
+            mTitle = title;
+            return this;
+        }
+
+        /**
+         * Set a description of this download, to be displayed in notifications (if enabled)
+         * @return this object
+         */
+        public Request setDescription(String description) {
+            mDescription = description;
+            return this;
+        }
+
+        /**
+         * Set the Internet Media Type of this download.  This will override the media type declared
+         * in the server's response.
+         * @see <a href="http://www.ietf.org/rfc/rfc1590.txt">RFC 1590, defining Media Types</a>
+         * @return this object
+         */
+        public Request setMediaType(String mediaType) {
+            mMediaType = mediaType;
+            return this;
+        }
+
+        /**
+         * Control system notifications posted by the download manager for this download.  If
+         * enabled, the download manager posts notifications about downloads through the system
+         * {@link android.app.NotificationManager}.
+         *
+         * @param flags any combination of the NOTIFICATION_* bit flags
+         * @return this object
+         */
+        public Request setShowNotification(int flags) {
+            mNotificationFlags = flags;
+            return this;
+        }
+
+        public Request setAllowedNetworkTypes(int flags) {
+            // TODO allowed networks support
+            throw new UnsupportedOperationException();
+        }
+
+        public Request setAllowedOverRoaming(boolean allowed) {
+            // TODO roaming support
+            throw new UnsupportedOperationException();
+        }
+
+        /**
+         * @return ContentValues to be passed to DownloadProvider.insert()
+         */
+        ContentValues toContentValues() {
+            ContentValues values = new ContentValues();
+            assert mUri != null;
+            values.put(Downloads.COLUMN_URI, mUri.toString());
+
+            if (mDestinationUri != null) {
+                values.put(Downloads.COLUMN_DESTINATION, Downloads.Impl.DESTINATION_FILE_URI);
+                values.put(Downloads.COLUMN_FILE_NAME_HINT, mDestinationUri.toString());
+            } else {
+                values.put(Downloads.COLUMN_DESTINATION,
+                           Downloads.DESTINATION_CACHE_PARTITION_PURGEABLE);
+            }
+
+            if (!mRequestHeaders.isEmpty()) {
+                encodeHttpHeaders(values);
+            }
+
+            putIfNonNull(values, Downloads.COLUMN_TITLE, mTitle);
+            putIfNonNull(values, Downloads.COLUMN_DESCRIPTION, mDescription);
+            putIfNonNull(values, Downloads.COLUMN_MIME_TYPE, mMediaType);
+
+            int visibility = Downloads.VISIBILITY_HIDDEN;
+            if ((mNotificationFlags & NOTIFICATION_WHEN_RUNNING) != 0) {
+                visibility = Downloads.VISIBILITY_VISIBLE;
+            }
+            values.put(Downloads.COLUMN_VISIBILITY, visibility);
+
+            return values;
+        }
+
+        private void encodeHttpHeaders(ContentValues values) {
+            int index = 0;
+            for (Map.Entry<String, String> entry : mRequestHeaders.entrySet()) {
+                String headerString = entry.getKey() + ": " + entry.getValue();
+                values.put(Downloads.Impl.RequestHeaders.INSERT_KEY_PREFIX + index, headerString);
+                index++;
+            }
+        }
+
+        private void putIfNonNull(ContentValues contentValues, String key, String value) {
+            if (value != null) {
+                contentValues.put(key, value);
+            }
+        }
+    }
+
+    /**
+     * This class may be used to filter download manager queries.
+     */
+    public static class Query {
+        private Long mId;
+        private Integer mStatusFlags = null;
+
+        /**
+         * Include only the download with the given ID.
+         * @return this object
+         */
+        public Query setFilterById(long id) {
+            mId = id;
+            return this;
+        }
+
+        /**
+         * Include only downloads with status matching any the given status flags.
+         * @param flags any combination of the STATUS_* bit flags
+         * @return this object
+         */
+        public Query setFilterByStatus(int flags) {
+            mStatusFlags = flags;
+            return this;
+        }
+
+        /**
+         * Run this query using the given ContentResolver.
+         * @param projection the projection to pass to ContentResolver.query()
+         * @return the Cursor returned by ContentResolver.query()
+         */
+        Cursor runQuery(ContentResolver resolver, String[] projection) {
+            Uri uri = Downloads.CONTENT_URI;
+            String selection = null;
+
+            if (mId != null) {
+                uri = Uri.withAppendedPath(uri, mId.toString());
+            }
+
+            if (mStatusFlags != null) {
+                List<String> parts = new ArrayList<String>();
+                if ((mStatusFlags & STATUS_PENDING) != 0) {
+                    parts.add(statusClause("=", Downloads.STATUS_PENDING));
+                }
+                if ((mStatusFlags & STATUS_RUNNING) != 0) {
+                    parts.add(statusClause("=", Downloads.STATUS_RUNNING));
+                }
+                if ((mStatusFlags & STATUS_PAUSED) != 0) {
+                    parts.add(statusClause("=", Downloads.STATUS_PENDING_PAUSED));
+                    parts.add(statusClause("=", Downloads.STATUS_RUNNING_PAUSED));
+                }
+                if ((mStatusFlags & STATUS_SUCCESSFUL) != 0) {
+                    parts.add(statusClause("=", Downloads.STATUS_SUCCESS));
+                }
+                if ((mStatusFlags & STATUS_FAILED) != 0) {
+                    parts.add("(" + statusClause(">=", 400)
+                              + " AND " + statusClause("<", 600) + ")");
+                }
+                selection = joinStrings(" OR ", parts);
+                Log.w("DownloadManagerPublic", selection);
+            }
+            String orderBy = Downloads.COLUMN_LAST_MODIFICATION + " DESC";
+            return resolver.query(uri, projection, selection, null, orderBy);
+        }
+
+        private String joinStrings(String joiner, Iterable<String> parts) {
+            StringBuilder builder = new StringBuilder();
+            boolean first = true;
+            for (String part : parts) {
+                if (!first) {
+                    builder.append(joiner);
+                }
+                builder.append(part);
+                first = false;
+            }
+            return builder.toString();
+        }
+
+        private String statusClause(String operator, int value) {
+            return Downloads.COLUMN_STATUS + operator + "'" + value + "'";
+        }
+    }
+
+    private ContentResolver mResolver;
+
+    /**
+     * @hide
+     */
+    public DownloadManager(ContentResolver resolver) {
+        mResolver = resolver;
+    }
+
+    /**
+     * Enqueue a new download.  The download will start automatically once the download manager is
+     * ready to execute it and connectivity is available.
+     *
+     * @param request the parameters specifying this download
+     * @return an ID for the download, unique across the system.  This ID is used to make future
+     * calls related to this download.
+     */
+    public long enqueue(Request request) {
+        ContentValues values = request.toContentValues();
+        Uri downloadUri = mResolver.insert(Downloads.CONTENT_URI, values);
+        long id = Long.parseLong(downloadUri.getLastPathSegment());
+        return id;
+    }
+
+    /**
+     * Cancel a download and remove it from the download manager.  The download will be stopped if
+     * it was running, and it will no longer be accessible through the download manager.  If a file
+     * was already downloaded, it will not be deleted.
+     *
+     * @param id the ID of the download
+     */
+    public void remove(long id) {
+        int numDeleted = mResolver.delete(getDownloadUri(id), null, null);
+        if (numDeleted == 0) {
+            throw new IllegalArgumentException("Download " + id + " does not exist");
+        }
+    }
+
+    /**
+     * Query the download manager about downloads that have been requested.
+     * @param query parameters specifying filters for this query
+     * @return a Cursor over the result set of downloads, with columns consisting of all the
+     * COLUMN_* constants.
+     */
+    public Cursor query(Query query) {
+        Cursor underlyingCursor = query.runQuery(mResolver, UNDERLYING_COLUMNS);
+        return new CursorTranslator(underlyingCursor);
+    }
+
+    /**
+     * Open a downloaded file for reading.  The download must have completed.
+     * @param id the ID of the download
+     * @return a read-only {@link ParcelFileDescriptor}
+     * @throws FileNotFoundException if the destination file does not already exist
+     */
+    public ParcelFileDescriptor openDownloadedFile(long id) throws FileNotFoundException {
+        return mResolver.openFileDescriptor(getDownloadUri(id), "r");
+    }
+
+    /**
+     * Get the DownloadProvider URI for the download with the given ID.
+     */
+    private Uri getDownloadUri(long id) {
+        Uri downloadUri = Uri.withAppendedPath(Downloads.CONTENT_URI, Long.toString(id));
+        return downloadUri;
+    }
+
+    /**
+     * This class wraps a cursor returned by DownloadProvider -- the "underlying cursor" -- and
+     * presents a different set of columns, those defined in the DownloadManager.COLUMN_* constants.
+     * Some columns correspond directly to underlying values while others are computed from
+     * underlying data.
+     */
+    private static class CursorTranslator extends CursorWrapper {
+        public CursorTranslator(Cursor cursor) {
+            super(cursor);
+        }
+
+        @Override
+        public int getColumnIndex(String columnName) {
+            return Arrays.asList(COLUMNS).indexOf(columnName);
+        }
+
+        @Override
+        public int getColumnIndexOrThrow(String columnName) throws IllegalArgumentException {
+            int index = getColumnIndex(columnName);
+            if (index == -1) {
+                throw new IllegalArgumentException();
+            }
+            return index;
+        }
+
+        @Override
+        public String getColumnName(int columnIndex) {
+            int numColumns = COLUMNS.length;
+            if (columnIndex < 0 || columnIndex >= numColumns) {
+                throw new IllegalArgumentException("Invalid column index " + columnIndex + ", "
+                                                   + numColumns + " columns exist");
+            }
+            return COLUMNS[columnIndex];
+        }
+
+        @Override
+        public String[] getColumnNames() {
+            String[] returnColumns = new String[COLUMNS.length];
+            System.arraycopy(COLUMNS, 0, returnColumns, 0, COLUMNS.length);
+            return returnColumns;
+        }
+
+        @Override
+        public int getColumnCount() {
+            return COLUMNS.length;
+        }
+
+        @Override
+        public byte[] getBlob(int columnIndex) {
+            throw new UnsupportedOperationException();
+        }
+
+        @Override
+        public double getDouble(int columnIndex) {
+            return getLong(columnIndex);
+        }
+
+        private boolean isLongColumn(String column) {
+            return LONG_COLUMNS.contains(column);
+        }
+
+        @Override
+        public float getFloat(int columnIndex) {
+            return (float) getDouble(columnIndex);
+        }
+
+        @Override
+        public int getInt(int columnIndex) {
+            return (int) getLong(columnIndex);
+        }
+
+        @Override
+        public long getLong(int columnIndex) {
+            return translateLong(getColumnName(columnIndex));
+        }
+
+        @Override
+        public short getShort(int columnIndex) {
+            return (short) getLong(columnIndex);
+        }
+
+        @Override
+        public String getString(int columnIndex) {
+            return translateString(getColumnName(columnIndex));
+        }
+
+        private String translateString(String column) {
+            if (isLongColumn(column)) {
+                return Long.toString(translateLong(column));
+            }
+            if (column.equals(COLUMN_TITLE)) {
+                return getUnderlyingString(Downloads.COLUMN_TITLE);
+            }
+            if (column.equals(COLUMN_DESCRIPTION)) {
+                return getUnderlyingString(Downloads.COLUMN_DESCRIPTION);
+            }
+            if (column.equals(COLUMN_URI)) {
+                return getUnderlyingString(Downloads.COLUMN_URI);
+            }
+            if (column.equals(COLUMN_MEDIA_TYPE)) {
+                return getUnderlyingString(Downloads.COLUMN_MIME_TYPE);
+            }
+            assert column.equals(COLUMN_LOCAL_URI);
+            return Uri.fromFile(new File(getUnderlyingString(Downloads._DATA))).toString();
+        }
+
+        private long translateLong(String column) {
+            if (!isLongColumn(column)) {
+                // mimic behavior of underlying cursor -- most likely, throw NumberFormatException
+                return Long.valueOf(translateString(column));
+            }
+
+            if (column.equals(COLUMN_ID)) {
+                return getUnderlyingLong(Downloads.Impl._ID);
+            }
+            if (column.equals(COLUMN_TOTAL_SIZE_BYTES)) {
+                return getUnderlyingLong(Downloads.COLUMN_TOTAL_BYTES);
+            }
+            if (column.equals(COLUMN_STATUS)) {
+                return translateStatus((int) getUnderlyingLong(Downloads.COLUMN_STATUS));
+            }
+            if (column.equals(COLUMN_ERROR_CODE)) {
+                return translateErrorCode((int) getUnderlyingLong(Downloads.COLUMN_STATUS));
+            }
+            if (column.equals(COLUMN_BYTES_DOWNLOADED_SO_FAR)) {
+                return getUnderlyingLong(Downloads.COLUMN_CURRENT_BYTES);
+            }
+            assert column.equals(COLUMN_LAST_MODIFIED_TIMESTAMP);
+            return getUnderlyingLong(Downloads.COLUMN_LAST_MODIFICATION);
+        }
+
+        private long translateErrorCode(int status) {
+            if (translateStatus(status) != STATUS_FAILED) {
+                return 0; // arbitrary value when status is not an error
+            }
+            if ((400 <= status && status < 490) || (500 <= status && status < 600)) {
+                // HTTP status code
+                return status;
+            }
+
+            switch (status) {
+                case Downloads.STATUS_FILE_ERROR:
+                    return ERROR_FILE_ERROR;
+
+                case Downloads.STATUS_UNHANDLED_HTTP_CODE:
+                case Downloads.STATUS_UNHANDLED_REDIRECT:
+                    return ERROR_UNHANDLED_HTTP_CODE;
+
+                case Downloads.STATUS_HTTP_DATA_ERROR:
+                    return ERROR_HTTP_DATA_ERROR;
+
+                case Downloads.STATUS_TOO_MANY_REDIRECTS:
+                    return ERROR_TOO_MANY_REDIRECTS;
+
+                case Downloads.STATUS_INSUFFICIENT_SPACE_ERROR:
+                    return ERROR_INSUFFICIENT_SPACE;
+
+                case Downloads.STATUS_DEVICE_NOT_FOUND_ERROR:
+                    return ERROR_DEVICE_NOT_FOUND;
+
+                default:
+                    return ERROR_UNKNOWN;
+            }
+        }
+
+        private long getUnderlyingLong(String column) {
+            return super.getLong(super.getColumnIndex(column));
+        }
+
+        private String getUnderlyingString(String column) {
+            return super.getString(super.getColumnIndex(column));
+        }
+
+        private long translateStatus(int status) {
+            switch (status) {
+                case Downloads.STATUS_PENDING:
+                    return STATUS_PENDING;
+
+                case Downloads.STATUS_RUNNING:
+                    return STATUS_RUNNING;
+
+                case Downloads.STATUS_PENDING_PAUSED:
+                case Downloads.STATUS_RUNNING_PAUSED:
+                    return STATUS_PAUSED;
+
+                case Downloads.STATUS_SUCCESS:
+                    return STATUS_SUCCESSFUL;
+
+                default:
+                    assert Downloads.isStatusError(status);
+                    return STATUS_FAILED;
+            }
+        }
+    }
+}
diff --git a/core/java/android/net/MobileDataStateTracker.java b/core/java/android/net/MobileDataStateTracker.java
index 98f32b3..214510d 100644
--- a/core/java/android/net/MobileDataStateTracker.java
+++ b/core/java/android/net/MobileDataStateTracker.java
@@ -310,6 +310,9 @@
         case TelephonyManager.NETWORK_TYPE_EVDO_A:
             networkTypeStr = "evdo";
             break;
+        case TelephonyManager.NETWORK_TYPE_EVDO_B:
+            networkTypeStr = "evdo";
+            break;
         }
         return "net.tcp.buffersize." + networkTypeStr;
     }
diff --git a/core/java/android/os/BatteryStats.java b/core/java/android/os/BatteryStats.java
index d114bff..e3f3b87 100644
--- a/core/java/android/os/BatteryStats.java
+++ b/core/java/android/os/BatteryStats.java
@@ -51,57 +51,43 @@
     
     /**
      * A constant indicating a sensor timer.
-     * 
-     * {@hide}
      */
     public static final int SENSOR = 3;
     
     /**
      * A constant indicating a a wifi turn on timer
-     *
-     * {@hide}
      */
     public static final int WIFI_TURNED_ON = 4;
     
     /**
      * A constant indicating a full wifi lock timer
-     *
-     * {@hide}
      */
     public static final int FULL_WIFI_LOCK = 5;
     
     /**
      * A constant indicating a scan wifi lock timer
-     *
-     * {@hide}
      */
     public static final int SCAN_WIFI_LOCK = 6;
 
      /**
       * A constant indicating a wifi multicast timer
-      *
-      * {@hide}
       */
      public static final int WIFI_MULTICAST_ENABLED = 7;
 
     /**
      * A constant indicating an audio turn on timer
-     *
-     * {@hide}
      */
     public static final int AUDIO_TURNED_ON = 7;
 
     /**
      * A constant indicating a video turn on timer
-     *
-     * {@hide}
      */
     public static final int VIDEO_TURNED_ON = 8;
 
     /**
      * Include all of the data in the stats, including previously saved data.
      */
-    public static final int STATS_TOTAL = 0;
+    public static final int STATS_SINCE_CHARGED = 0;
 
     /**
      * Include only the last run in the stats.
@@ -116,7 +102,7 @@
     /**
      * Include only the run since the last time the device was unplugged in the stats.
      */
-    public static final int STATS_UNPLUGGED = 3;
+    public static final int STATS_SINCE_UNPLUGGED = 3;
 
     // NOTE: Update this list if you add/change any stats above.
     // These characters are supposed to represent "total", "last", "current", 
@@ -391,6 +377,123 @@
         }
     }
 
+    public final class HistoryItem implements Parcelable {
+        public HistoryItem next;
+        
+        public long time;
+        
+        public static final byte CMD_UPDATE = 0;
+        public static final byte CMD_START = 1;
+        
+        public byte cmd;
+        
+        public byte batteryLevel;
+        public byte batteryStatus;
+        public byte batteryHealth;
+        public byte batteryPlugType;
+        
+        public char batteryTemperature;
+        public char batteryVoltage;
+        
+        public static final int STATE_BRIGHTNESS_MASK = 0x000000f;
+        public static final int STATE_BRIGHTNESS_SHIFT = 0;
+        public static final int STATE_SIGNAL_STRENGTH_MASK = 0x00000f0;
+        public static final int STATE_SIGNAL_STRENGTH_SHIFT = 4;
+        public static final int STATE_PHONE_STATE_MASK = 0x0000f00;
+        public static final int STATE_PHONE_STATE_SHIFT = 8;
+        public static final int STATE_DATA_CONNECTION_MASK = 0x000f000;
+        public static final int STATE_DATA_CONNECTION_SHIFT = 12;
+        
+        public static final int STATE_BATTERY_PLUGGED_FLAG = 1<<30;
+        public static final int STATE_SCREEN_ON_FLAG = 1<<29;
+        public static final int STATE_GPS_ON_FLAG = 1<<28;
+        public static final int STATE_PHONE_ON_FLAG = 1<<27;
+        public static final int STATE_PHONE_SCANNING_FLAG = 1<<26;
+        public static final int STATE_WIFI_ON_FLAG = 1<<25;
+        public static final int STATE_WIFI_RUNNING_FLAG = 1<<24;
+        public static final int STATE_WIFI_FULL_LOCK_FLAG = 1<<23;
+        public static final int STATE_WIFI_SCAN_LOCK_FLAG = 1<<22;
+        public static final int STATE_WIFI_MULTICAST_ON_FLAG = 1<<21;
+        public static final int STATE_BLUETOOTH_ON_FLAG = 1<<20;
+        public static final int STATE_AUDIO_ON_FLAG = 1<<19;
+        public static final int STATE_VIDEO_ON_FLAG = 1<<18;
+        
+        public int states;
+
+        public HistoryItem() {
+        }
+        
+        public HistoryItem(long time, Parcel src) {
+            this.time = time;
+            int bat = src.readInt();
+            cmd = (byte)(bat&0xff);
+            batteryLevel = (byte)((bat>>8)&0xff);
+            batteryStatus = (byte)((bat>>16)&0xf);
+            batteryHealth = (byte)((bat>>20)&0xf);
+            batteryPlugType = (byte)((bat>>24)&0xf);
+            bat = src.readInt();
+            batteryTemperature = (char)(bat&0xffff);
+            batteryVoltage = (char)((bat>>16)&0xffff);
+            states = src.readInt();
+        }
+        
+        public int describeContents() {
+            return 0;
+        }
+
+        public void writeToParcel(Parcel dest, int flags) {
+            dest.writeLong(time);
+            int bat = (((int)cmd)&0xff)
+                    | ((((int)batteryLevel)<<8)&0xff00)
+                    | ((((int)batteryStatus)<<16)&0xf0000)
+                    | ((((int)batteryHealth)<<20)&0xf00000)
+                    | ((((int)batteryPlugType)<<24)&0xf000000);
+            dest.writeInt(bat);
+            bat = (((int)batteryTemperature)&0xffff)
+                    | ((((int)batteryVoltage)<<16)&0xffff0000);
+            dest.writeInt(bat);
+            dest.writeInt(states);
+        }
+        
+        public void setTo(long time, byte cmd, HistoryItem o) {
+            this.time = time;
+            this.cmd = cmd;
+            batteryLevel = o.batteryLevel;
+            batteryStatus = o.batteryStatus;
+            batteryHealth = o.batteryHealth;
+            batteryPlugType = o.batteryPlugType;
+            batteryTemperature = o.batteryTemperature;
+            batteryVoltage = o.batteryVoltage;
+            states = o.states;
+        }
+    }
+    
+    public static final class BitDescription {
+        public final int mask;
+        public final int shift;
+        public final String name;
+        public final String[] values;
+        
+        public BitDescription(int mask, String name) {
+            this.mask = mask;
+            this.shift = -1;
+            this.name = name;
+            this.values = null;
+        }
+        
+        public BitDescription(int mask, int shift, String name, String[] values) {
+            this.mask = mask;
+            this.shift = shift;
+            this.name = name;
+            this.values = values;
+        }
+    }
+    
+    /**
+     * Return the current history of battery state changes.
+     */
+    public abstract HistoryItem getHistory();
+    
     /**
      * Returns the number of times the device has been started.
      */
@@ -476,13 +579,23 @@
     public static final int DATA_CONNECTION_GPRS = 1;
     public static final int DATA_CONNECTION_EDGE = 2;
     public static final int DATA_CONNECTION_UMTS = 3;
-    public static final int DATA_CONNECTION_OTHER = 4;
+    public static final int DATA_CONNECTION_CDMA = 4;
+    public static final int DATA_CONNECTION_EVDO_0 = 5;
+    public static final int DATA_CONNECTION_EVDO_A = 6;
+    public static final int DATA_CONNECTION_1xRTT = 7;
+    public static final int DATA_CONNECTION_HSDPA = 8;
+    public static final int DATA_CONNECTION_HSUPA = 9;
+    public static final int DATA_CONNECTION_HSPA = 10;
+    public static final int DATA_CONNECTION_IDEN = 11;
+    public static final int DATA_CONNECTION_EVDO_B = 12;
+    public static final int DATA_CONNECTION_OTHER = 13;
     
     static final String[] DATA_CONNECTION_NAMES = {
-        "none", "gprs", "edge", "umts", "other"
+        "none", "gprs", "edge", "umts", "cdma", "evdo_0", "evdo_A",
+        "1xrtt", "hsdpa", "hsupa", "hspa", "iden", "evdo_b", "other"
     };
     
-    public static final int NUM_DATA_CONNECTION_TYPES = 5;
+    public static final int NUM_DATA_CONNECTION_TYPES = DATA_CONNECTION_OTHER+1;
     
     /**
      * Returns the time in microseconds that the phone has been running with
@@ -500,6 +613,35 @@
      * {@hide}
      */
     public abstract int getPhoneDataConnectionCount(int dataType, int which);
+    
+    public static final BitDescription[] HISTORY_STATE_DESCRIPTIONS
+            = new BitDescription[] {
+        new BitDescription(HistoryItem.STATE_BATTERY_PLUGGED_FLAG, "plugged"),
+        new BitDescription(HistoryItem.STATE_SCREEN_ON_FLAG, "screen"),
+        new BitDescription(HistoryItem.STATE_GPS_ON_FLAG, "gps"),
+        new BitDescription(HistoryItem.STATE_PHONE_ON_FLAG, "phone"),
+        new BitDescription(HistoryItem.STATE_PHONE_SCANNING_FLAG, "phone_scanning"),
+        new BitDescription(HistoryItem.STATE_WIFI_ON_FLAG, "wifi"),
+        new BitDescription(HistoryItem.STATE_WIFI_RUNNING_FLAG, "wifi_running"),
+        new BitDescription(HistoryItem.STATE_WIFI_FULL_LOCK_FLAG, "wifi_full_lock"),
+        new BitDescription(HistoryItem.STATE_WIFI_SCAN_LOCK_FLAG, "wifi_scan_lock"),
+        new BitDescription(HistoryItem.STATE_WIFI_MULTICAST_ON_FLAG, "wifi_multicast"),
+        new BitDescription(HistoryItem.STATE_BLUETOOTH_ON_FLAG, "bluetooth"),
+        new BitDescription(HistoryItem.STATE_AUDIO_ON_FLAG, "audio"),
+        new BitDescription(HistoryItem.STATE_VIDEO_ON_FLAG, "video"),
+        new BitDescription(HistoryItem.STATE_BRIGHTNESS_MASK,
+                HistoryItem.STATE_BRIGHTNESS_SHIFT, "brightness",
+                SCREEN_BRIGHTNESS_NAMES),
+        new BitDescription(HistoryItem.STATE_SIGNAL_STRENGTH_MASK,
+                HistoryItem.STATE_SIGNAL_STRENGTH_SHIFT, "signal_strength",
+                SIGNAL_STRENGTH_NAMES),
+        new BitDescription(HistoryItem.STATE_PHONE_STATE_MASK,
+                HistoryItem.STATE_PHONE_STATE_SHIFT, "phone_state",
+                new String[] {"in", "out", "emergency", "off"}),
+        new BitDescription(HistoryItem.STATE_DATA_CONNECTION_MASK,
+                HistoryItem.STATE_DATA_CONNECTION_SHIFT, "data_conn",
+                DATA_CONNECTION_NAMES),
+    };
 
     /**
      * Returns the time in microseconds that wifi has been on while the device was
@@ -791,7 +933,7 @@
         
         // Dump "battery" stat
         dumpLine(pw, 0 /* uid */, category, BATTERY_DATA, 
-                which == STATS_TOTAL ? getStartCount() : "N/A",
+                which == STATS_SINCE_CHARGED ? getStartCount() : "N/A",
                 whichBatteryRealtime / 1000, whichBatteryUptime / 1000,
                 totalRealtime / 1000, totalUptime / 1000); 
         
@@ -864,7 +1006,7 @@
         }
         dumpLine(pw, 0 /* uid */, category, DATA_CONNECTION_COUNT_DATA, args);
         
-        if (which == STATS_UNPLUGGED) {
+        if (which == STATS_SINCE_UNPLUGGED) {
             dumpLine(pw, 0 /* uid */, category, BATTERY_LEVEL_DATA, getDischargeStartLevel(), 
                     getDischargeCurrentLevel());
         }
@@ -1212,7 +1354,7 @@
         
         pw.println(" ");
 
-        if (which == STATS_UNPLUGGED) {
+        if (which == STATS_SINCE_UNPLUGGED) {
             if (getIsOnBattery()) {
                 pw.print(prefix); pw.println("  Device is currently unplugged");
                 pw.print(prefix); pw.print("    Discharge cycle start level: "); 
@@ -1436,6 +1578,30 @@
         }
     }
 
+    void printBitDescriptions(PrintWriter pw, int oldval, int newval, BitDescription[] descriptions) {
+        int diff = oldval ^ newval;
+        if (diff == 0) return;
+        for (int i=0; i<descriptions.length; i++) {
+            BitDescription bd = descriptions[i];
+            if ((diff&bd.mask) != 0) {
+                if (bd.shift < 0) {
+                    pw.print((newval&bd.mask) != 0 ? " +" : " -");
+                    pw.print(bd.name);
+                } else {
+                    pw.print(" ");
+                    pw.print(bd.name);
+                    pw.print("=");
+                    int val = (newval&bd.mask)>>bd.shift;
+                    if (bd.values != null && val >= 0 && val < bd.values.length) {
+                        pw.print(bd.values[val]);
+                    } else {
+                        pw.print(val);
+                    }
+                }
+            }
+        }
+    }
+    
     /**
      * Dumps a human-readable summary of the battery statistics to the given PrintWriter.
      *
@@ -1443,19 +1609,129 @@
      */
     @SuppressWarnings("unused")
     public void dumpLocked(PrintWriter pw) {
-        pw.println("Total Statistics (Current and Historic):");
+        HistoryItem rec = getHistory();
+        if (rec != null) {
+            pw.println("Battery History:");
+            int oldState = 0;
+            int oldStatus = -1;
+            int oldHealth = -1;
+            int oldPlug = -1;
+            int oldTemp = -1;
+            int oldVolt = -1;
+            while (rec != null) {
+                pw.print("  ");
+                pw.print(rec.time);
+                pw.print(" ");
+                if (rec.cmd == HistoryItem.CMD_START) {
+                    pw.println(" START");
+                } else {
+                    if (rec.batteryLevel < 10) pw.print("00");
+                    else if (rec.batteryLevel < 100) pw.print("0");
+                    pw.print(rec.batteryLevel);
+                    pw.print(" ");
+                    if (rec.states < 0x10) pw.print("0000000");
+                    else if (rec.states < 0x100) pw.print("000000");
+                    else if (rec.states < 0x1000) pw.print("00000");
+                    else if (rec.states < 0x10000) pw.print("0000");
+                    else if (rec.states < 0x100000) pw.print("000");
+                    else if (rec.states < 0x1000000) pw.print("00");
+                    else if (rec.states < 0x10000000) pw.print("0");
+                    pw.print(Integer.toHexString(rec.states));
+                    if (oldStatus != rec.batteryStatus) {
+                        oldStatus = rec.batteryStatus;
+                        pw.print(" status=");
+                        switch (oldStatus) {
+                            case BatteryManager.BATTERY_STATUS_UNKNOWN:
+                                pw.print("unknown");
+                                break;
+                            case BatteryManager.BATTERY_STATUS_CHARGING:
+                                pw.print("charging");
+                                break;
+                            case BatteryManager.BATTERY_STATUS_DISCHARGING:
+                                pw.print("discharging");
+                                break;
+                            case BatteryManager.BATTERY_STATUS_NOT_CHARGING:
+                                pw.print("not-charging");
+                                break;
+                            case BatteryManager.BATTERY_STATUS_FULL:
+                                pw.print("full");
+                                break;
+                            default:
+                                pw.print(oldStatus);
+                                break;
+                        }
+                    }
+                    if (oldHealth != rec.batteryHealth) {
+                        oldHealth = rec.batteryHealth;
+                        pw.print(" health=");
+                        switch (oldHealth) {
+                            case BatteryManager.BATTERY_HEALTH_UNKNOWN:
+                                pw.print("unknown");
+                                break;
+                            case BatteryManager.BATTERY_HEALTH_GOOD:
+                                pw.print("good");
+                                break;
+                            case BatteryManager.BATTERY_HEALTH_OVERHEAT:
+                                pw.print("overheat");
+                                break;
+                            case BatteryManager.BATTERY_HEALTH_DEAD:
+                                pw.print("dead");
+                                break;
+                            case BatteryManager.BATTERY_HEALTH_OVER_VOLTAGE:
+                                pw.print("over-voltage");
+                                break;
+                            case BatteryManager.BATTERY_HEALTH_UNSPECIFIED_FAILURE:
+                                pw.print("failure");
+                                break;
+                            default:
+                                pw.print(oldHealth);
+                                break;
+                        }
+                    }
+                    if (oldPlug != rec.batteryPlugType) {
+                        oldPlug = rec.batteryPlugType;
+                        pw.print(" plug=");
+                        switch (oldPlug) {
+                            case 0:
+                                pw.print("none");
+                                break;
+                            case BatteryManager.BATTERY_PLUGGED_AC:
+                                pw.print("ac");
+                                break;
+                            case BatteryManager.BATTERY_PLUGGED_USB:
+                                pw.print("usb");
+                                break;
+                            default:
+                                pw.print(oldPlug);
+                                break;
+                        }
+                    }
+                    if (oldTemp != rec.batteryTemperature) {
+                        oldTemp = rec.batteryTemperature;
+                        pw.print(" temp=");
+                        pw.print(oldTemp);
+                    }
+                    if (oldVolt != rec.batteryVoltage) {
+                        oldVolt = rec.batteryVoltage;
+                        pw.print(" volt=");
+                        pw.print(oldVolt);
+                    }
+                    printBitDescriptions(pw, oldState, rec.states,
+                            HISTORY_STATE_DESCRIPTIONS);
+                    pw.println();
+                }
+                oldState = rec.states;
+                rec = rec.next;
+            }
+        }
+        
+        pw.println("Statistics since last charge:");
         pw.println("  System starts: " + getStartCount()
                 + ", currently on battery: " + getIsOnBattery());
-        dumpLocked(pw, "", STATS_TOTAL, -1);
+        dumpLocked(pw, "", STATS_SINCE_CHARGED, -1);
         pw.println("");
-        pw.println("Last Run Statistics (Previous run of system):");
-        dumpLocked(pw, "", STATS_LAST, -1);
-        pw.println("");
-        pw.println("Current Battery Statistics (Currently running system):");
-        dumpLocked(pw, "", STATS_CURRENT, -1);
-        pw.println("");
-        pw.println("Unplugged Statistics (Since last unplugged from power):");
-        dumpLocked(pw, "", STATS_UNPLUGGED, -1);
+        pw.println("Statistics since last unplugged:");
+        dumpLocked(pw, "", STATS_SINCE_UNPLUGGED, -1);
     }
     
     @SuppressWarnings("unused")
@@ -1470,14 +1746,11 @@
         }
         
         if (isUnpluggedOnly) {
-            dumpCheckinLocked(pw, STATS_UNPLUGGED, -1);
+            dumpCheckinLocked(pw, STATS_SINCE_UNPLUGGED, -1);
         }
         else {
-            dumpCheckinLocked(pw, STATS_TOTAL, -1);
-            dumpCheckinLocked(pw, STATS_LAST, -1);
-            dumpCheckinLocked(pw, STATS_UNPLUGGED, -1);
-            dumpCheckinLocked(pw, STATS_CURRENT, -1);
+            dumpCheckinLocked(pw, STATS_SINCE_CHARGED, -1);
+            dumpCheckinLocked(pw, STATS_SINCE_UNPLUGGED, -1);
         }
     }
-    
 }
diff --git a/core/java/android/os/Binder.java b/core/java/android/os/Binder.java
index c9df567..59b8274 100644
--- a/core/java/android/os/Binder.java
+++ b/core/java/android/os/Binder.java
@@ -101,7 +101,30 @@
      * @see #clearCallingIdentity
      */
     public static final native void restoreCallingIdentity(long token);
-    
+
+    /**
+     * Sets the native thread-local StrictMode policy mask.
+     *
+     * <p>The StrictMode settings are kept in two places: a Java-level
+     * threadlocal for libcore/Dalvik, and a native threadlocal (set
+     * here) for propagation via Binder calls.  This is a little
+     * unfortunate, but necessary to break otherwise more unfortunate
+     * dependencies either of Dalvik on Android, or Android
+     * native-only code on Dalvik.
+     *
+     * @see StrictMode
+     * @hide
+     */
+    public static final native void setThreadStrictModePolicy(int policyMask);
+
+    /**
+     * Gets the current native thread-local StrictMode policy mask.
+     *
+     * @see #setThreadStrictModePolicy
+     * @hide
+     */
+    public static final native int getThreadStrictModePolicy();
+
     /**
      * Flush any Binder commands pending in the current thread to the kernel
      * driver.  This can be
@@ -276,6 +299,8 @@
     
     private native final void init();
     private native final void destroy();
+
+    // Entry point from android_util_Binder.cpp's onTransact
     private boolean execTransact(int code, int dataObj, int replyObj,
             int flags) {
         Parcel data = Parcel.obtain(dataObj);
diff --git a/core/java/android/os/Build.java b/core/java/android/os/Build.java
index 3e9fd42..fdd3573 100644
--- a/core/java/android/os/Build.java
+++ b/core/java/android/os/Build.java
@@ -179,7 +179,23 @@
          */
         public static final int ECLAIR_MR1 = 7;
         
+        /**
+         * June 2010: Android 2.2
+         */
         public static final int FROYO = 8;
+        
+        /**
+         * Next version of Android.
+         * 
+         * <p>Applications targeting this or a later release will get these
+         * new changes in behavior:</p>
+         * <ul>
+         * <li> The status bar is now dark.  Targeting this version allows
+         * the platform to perform performing compatibility on status bar
+         * graphics to ensure they look okay on a dark background.
+         * </ul>
+         */
+        public static final int GINGERBREAD = CUR_DEVELOPMENT;
     }
     
     /** The type of build, like "user" or "eng". */
diff --git a/core/java/android/os/DropBoxManager.java b/core/java/android/os/DropBoxManager.java
index 7889a92..4df33e0 100644
--- a/core/java/android/os/DropBoxManager.java
+++ b/core/java/android/os/DropBoxManager.java
@@ -242,7 +242,7 @@
         if (file == null) throw new NullPointerException();
         Entry entry = new Entry(tag, 0, file, flags);
         try {
-            mService.add(new Entry(tag, 0, file, flags));
+            mService.add(entry);
         } catch (RemoteException e) {
             // ignore
         } finally {
diff --git a/core/java/android/os/Environment.java b/core/java/android/os/Environment.java
index 812391c..c7cbed6 100644
--- a/core/java/android/os/Environment.java
+++ b/core/java/android/os/Environment.java
@@ -28,6 +28,8 @@
     private static final File ROOT_DIRECTORY
             = getDirectory("ANDROID_ROOT", "/system");
 
+    private static final String SYSTEM_PROPERTY_EFS_ENABLED = "persist.security.efs.enabled";
+
     private static IMountService mMntSvc = null;
 
     /**
@@ -37,9 +39,55 @@
         return ROOT_DIRECTORY;
     }
 
+    /**
+     * Gets the system directory available for secure storage.
+     * If Encrypted File system is enabled, it returns an encrypted directory (/data/secure/system).
+     * Otherwise, it returns the unencrypted /data/system directory.
+     * @return File object representing the secure storage system directory.
+     * @hide
+     */
+    public static File getSystemSecureDirectory() {
+        if (isEncryptedFilesystemEnabled()) {
+            return new File(SECURE_DATA_DIRECTORY, "system");
+        } else {
+            return new File(DATA_DIRECTORY, "system");
+        }
+    }
+
+    /**
+     * Gets the data directory for secure storage.
+     * If Encrypted File system is enabled, it returns an encrypted directory (/data/secure).
+     * Otherwise, it returns the unencrypted /data directory.
+     * @return File object representing the data directory for secure storage.
+     * @hide
+     */
+    public static File getSecureDataDirectory() {
+        if (isEncryptedFilesystemEnabled()) {
+            return SECURE_DATA_DIRECTORY;
+        } else {
+            return DATA_DIRECTORY;
+        }
+    }
+
+    /**
+     * Returns whether the Encrypted File System feature is enabled on the device or not.
+     * @return <code>true</code> if Encrypted File System feature is enabled, <code>false</code>
+     * if disabled.
+     * @hide
+     */
+    public static boolean isEncryptedFilesystemEnabled() {
+        return SystemProperties.getBoolean(SYSTEM_PROPERTY_EFS_ENABLED, false);
+    }
+
     private static final File DATA_DIRECTORY
             = getDirectory("ANDROID_DATA", "/data");
 
+    /**
+     * @hide
+     */
+    private static final File SECURE_DATA_DIRECTORY
+            = getDirectory("ANDROID_SECURE_DATA", "/data/secure");
+
     private static final File EXTERNAL_STORAGE_DIRECTORY
             = getDirectory("EXTERNAL_STORAGE", "/sdcard");
 
diff --git a/core/java/android/os/MessageQueue.java b/core/java/android/os/MessageQueue.java
index bc653d6..adb11c8 100644
--- a/core/java/android/os/MessageQueue.java
+++ b/core/java/android/os/MessageQueue.java
@@ -16,13 +16,11 @@
 
 package android.os;
 
-import java.util.ArrayList;
-
 import android.util.AndroidRuntimeException;
 import android.util.Config;
 import android.util.Log;
 
-import com.android.internal.os.RuntimeInit;
+import java.util.ArrayList;
 
 /**
  * Low-level class holding the list of messages to be dispatched by a
@@ -34,10 +32,18 @@
  */
 public class MessageQueue {
     Message mMessages;
-    private final ArrayList mIdleHandlers = new ArrayList();
+    private final ArrayList<IdleHandler> mIdleHandlers = new ArrayList<IdleHandler>();
     private boolean mQuiting = false;
     boolean mQuitAllowed = true;
+
+    @SuppressWarnings("unused")
+    private int mPtr; // used by native code
     
+    private native void nativeInit();
+    private native void nativeDestroy();
+    private native boolean nativePollOnce(int timeoutMillis);
+    private native void nativeWake();
+
     /**
      * Callback interface for discovering when a thread is going to block
      * waiting for more messages.
@@ -84,22 +90,39 @@
             mIdleHandlers.remove(handler);
         }
     }
-
+    
     MessageQueue() {
+        nativeInit();
+    }
+    
+    @Override
+    protected void finalize() throws Throwable {
+        try {
+            nativeDestroy();
+        } finally {
+            super.finalize();
+        }
     }
 
     final Message next() {
         boolean tryIdle = true;
+        // when we start out, we'll just touch the input pipes and then go from there
+        int timeToNextEventMillis = 0;
 
         while (true) {
             long now;
             Object[] idlers = null;
-    
+
+            boolean dispatched = nativePollOnce(timeToNextEventMillis);
+
             // Try to retrieve the next message, returning if found.
             synchronized (this) {
                 now = SystemClock.uptimeMillis();
                 Message msg = pullNextLocked(now);
-                if (msg != null) return msg;
+                if (msg != null) {
+                    return msg;
+                }
+                
                 if (tryIdle && mIdleHandlers.size() > 0) {
                     idlers = mIdleHandlers.toArray();
                 }
@@ -135,20 +158,22 @@
 
             synchronized (this) {
                 // No messages, nobody to tell about it...  time to wait!
-                try {
-                    if (mMessages != null) {
-                        if (mMessages.when-now > 0) {
-                            Binder.flushPendingCommands();
-                            this.wait(mMessages.when-now);
-                        }
-                    } else {
+                if (mMessages != null) {
+                    long longTimeToNextEventMillis = mMessages.when - now;
+                    
+                    if (longTimeToNextEventMillis > 0) {
                         Binder.flushPendingCommands();
-                        this.wait();
+                        timeToNextEventMillis = (int) Math.min(longTimeToNextEventMillis,
+                                Integer.MAX_VALUE);
+                    } else {
+                        timeToNextEventMillis = 0;
                     }
-                }
-                catch (InterruptedException e) {
+                } else {
+                    Binder.flushPendingCommands();
+                    timeToNextEventMillis = -1;
                 }
             }
+            // loop to the while(true) and do the appropriate nativeWait(when)
         }
     }
 
@@ -190,7 +215,6 @@
             if (p == null || when == 0 || when < p.when) {
                 msg.next = p;
                 mMessages = msg;
-                this.notify();
             } else {
                 Message prev = null;
                 while (p != null && p.when <= when) {
@@ -199,8 +223,8 @@
                 }
                 msg.next = prev.next;
                 prev.next = msg;
-                this.notify();
             }
+            nativeWake();
         }
         return true;
     }
@@ -317,11 +341,4 @@
         }
     }
     */
-
-    void poke()
-    {
-        synchronized (this) {
-            this.notify();
-        }
-    }
 }
diff --git a/core/java/android/os/Parcel.java b/core/java/android/os/Parcel.java
index 8ad600c..b9c9565 100644
--- a/core/java/android/os/Parcel.java
+++ b/core/java/android/os/Parcel.java
@@ -176,6 +176,7 @@
  */
 public final class Parcel {
     private static final boolean DEBUG_RECYCLE = false;
+    private static final String TAG = "Parcel";
 
     @SuppressWarnings({"UnusedDeclaration"})
     private int mObject; // used by native code
@@ -214,12 +215,14 @@
     private static final int VAL_BOOLEANARRAY = 23;
     private static final int VAL_CHARSEQUENCEARRAY = 24;
 
+    // The initial int32 in a Binder call's reply Parcel header:
     private static final int EX_SECURITY = -1;
     private static final int EX_BAD_PARCELABLE = -2;
     private static final int EX_ILLEGAL_ARGUMENT = -3;
     private static final int EX_NULL_POINTER = -4;
     private static final int EX_ILLEGAL_STATE = -5;
-    
+    private static final int EX_HAS_REPLY_HEADER = -128;  // special; see below
+
     public final static Parcelable.Creator<String> STRING_CREATOR
              = new Parcelable.Creator<String>() {
         public String createFromParcel(Parcel source) {
@@ -1199,6 +1202,7 @@
             code = EX_ILLEGAL_STATE;
         }
         writeInt(code);
+        StrictMode.clearGatheredViolations();
         if (code == 0) {
             if (e instanceof RuntimeException) {
                 throw (RuntimeException) e;
@@ -1216,7 +1220,31 @@
      * @see #readException
      */
     public final void writeNoException() {
-        writeInt(0);
+        // Despite the name of this function ("write no exception"),
+        // it should instead be thought of as "write the RPC response
+        // header", but because this function name is written out by
+        // the AIDL compiler, we're not going to rename it.
+        //
+        // The response header, in the non-exception case (see also
+        // writeException above, also called by the AIDL compiler), is
+        // either a 0 (the default case), or EX_HAS_REPLY_HEADER if
+        // StrictMode has gathered up violations that have occurred
+        // during a Binder call, in which case we write out the number
+        // of violations and their details, serialized, before the
+        // actual RPC respons data.  The receiving end of this is
+        // readException(), below.
+        if (StrictMode.hasGatheredViolations()) {
+            writeInt(EX_HAS_REPLY_HEADER);
+            final int sizePosition = dataPosition();
+            writeInt(0);  // total size of fat header, to be filled in later
+            StrictMode.writeGatheredViolationsToParcel(this);
+            final int payloadPosition = dataPosition();
+            setDataPosition(sizePosition);
+            writeInt(payloadPosition - sizePosition);  // header size
+            setDataPosition(payloadPosition);
+        } else {
+            writeInt(0);
+        }
     }
 
     /**
@@ -1229,10 +1257,44 @@
      * @see #writeNoException
      */
     public final void readException() {
+        int code = readExceptionCode();
+        if (code != 0) {
+            String msg = readString();
+            readException(code, msg);
+        }
+    }
+
+    /**
+     * Parses the header of a Binder call's response Parcel and
+     * returns the exception code.  Deals with lite or fat headers.
+     * In the common successful case, this header is generally zero.
+     * In less common cases, it's a small negative number and will be
+     * followed by an error string.
+     *
+     * This exists purely for android.database.DatabaseUtils and
+     * insulating it from having to handle fat headers as returned by
+     * e.g. StrictMode-induced RPC responses.
+     *
+     * @hide
+     */
+    public final int readExceptionCode() {
         int code = readInt();
-        if (code == 0) return;
-        String msg = readString();
-        readException(code, msg);
+        if (code == EX_HAS_REPLY_HEADER) {
+            int headerSize = readInt();
+            if (headerSize == 0) {
+                Log.e(TAG, "Unexpected zero-sized Parcel reply header.");
+            } else {
+                // Currently the only thing in the header is StrictMode stacks,
+                // but discussions around event/RPC tracing suggest we might
+                // put that here too.  If so, switch on sub-header tags here.
+                // But for now, just parse out the StrictMode stuff.
+                StrictMode.readAndHandleBinderCallViolations(this);
+            }
+            // And fat response headers are currently only used when
+            // there are no exceptions, so return no error:
+            return 0;
+        }
+        return code;
     }
 
     /**
@@ -1872,13 +1934,13 @@
                     creator = (Parcelable.Creator)f.get(null);
                 }
                 catch (IllegalAccessException e) {
-                    Log.e("Parcel", "Class not found when unmarshalling: "
+                    Log.e(TAG, "Class not found when unmarshalling: "
                                         + name + ", e: " + e);
                     throw new BadParcelableException(
                             "IllegalAccessException when unmarshalling: " + name);
                 }
                 catch (ClassNotFoundException e) {
-                    Log.e("Parcel", "Class not found when unmarshalling: "
+                    Log.e(TAG, "Class not found when unmarshalling: "
                                         + name + ", e: " + e);
                     throw new BadParcelableException(
                             "ClassNotFoundException when unmarshalling: " + name);
@@ -1983,7 +2045,7 @@
         if (DEBUG_RECYCLE) {
             mStack = new RuntimeException();
         }
-        //Log.i("Parcel", "Initializing obj=0x" + Integer.toHexString(obj), mStack);
+        //Log.i(TAG, "Initializing obj=0x" + Integer.toHexString(obj), mStack);
         init(obj);
     }
 
@@ -1991,7 +2053,7 @@
     protected void finalize() throws Throwable {
         if (DEBUG_RECYCLE) {
             if (mStack != null) {
-                Log.w("Parcel", "Client did not call Parcel.recycle()", mStack);
+                Log.w(TAG, "Client did not call Parcel.recycle()", mStack);
             }
         }
         destroy();
@@ -2015,7 +2077,7 @@
         ClassLoader loader) {
         while (N > 0) {
             Object value = readValue(loader);
-            //Log.d("Parcel", "Unmarshalling value=" + value);
+            //Log.d(TAG, "Unmarshalling value=" + value);
             outVal.add(value);
             N--;
         }
@@ -2025,7 +2087,7 @@
         ClassLoader loader) {
         for (int i = 0; i < N; i++) {
             Object value = readValue(loader);
-            //Log.d("Parcel", "Unmarshalling value=" + value);
+            //Log.d(TAG, "Unmarshalling value=" + value);
             outVal[i] = value;
         }
     }
@@ -2035,7 +2097,7 @@
         while (N > 0) {
             int key = readInt();
             Object value = readValue(loader);
-            //Log.i("Parcel", "Unmarshalling key=" + key + " value=" + value);
+            //Log.i(TAG, "Unmarshalling key=" + key + " value=" + value);
             outVal.append(key, value);
             N--;
         }
@@ -2046,7 +2108,7 @@
         while (N > 0) {
             int key = readInt();
             boolean value = this.readByte() == 1;
-            //Log.i("Parcel", "Unmarshalling key=" + key + " value=" + value);
+            //Log.i(TAG, "Unmarshalling key=" + key + " value=" + value);
             outVal.append(key, value);
             N--;
         }
diff --git a/core/java/android/os/ParcelFileDescriptor.java b/core/java/android/os/ParcelFileDescriptor.java
index 0a3b2cf..d26f066 100644
--- a/core/java/android/os/ParcelFileDescriptor.java
+++ b/core/java/android/os/ParcelFileDescriptor.java
@@ -179,7 +179,7 @@
     /**
      * An InputStream you can create on a ParcelFileDescriptor, which will
      * take care of calling {@link ParcelFileDescriptor#close
-     * ParcelFileDescritor.close()} for you when the stream is closed.
+     * ParcelFileDescriptor.close()} for you when the stream is closed.
      */
     public static class AutoCloseInputStream extends FileInputStream {
         private final ParcelFileDescriptor mFd;
@@ -198,7 +198,7 @@
     /**
      * An OutputStream you can create on a ParcelFileDescriptor, which will
      * take care of calling {@link ParcelFileDescriptor#close
-     * ParcelFileDescritor.close()} for you when the stream is closed.
+     * ParcelFileDescriptor.close()} for you when the stream is closed.
      */
     public static class AutoCloseOutputStream extends FileOutputStream {
         private final ParcelFileDescriptor mFd;
diff --git a/core/java/android/os/Process.java b/core/java/android/os/Process.java
index 5640a06..f695dbb 100644
--- a/core/java/android/os/Process.java
+++ b/core/java/android/os/Process.java
@@ -626,6 +626,15 @@
             throws IllegalArgumentException, SecurityException;
 
     /**
+     * Call with 'false' to cause future calls to {@link #setThreadPriority(int)} to
+     * throw an exception if passed a background-level thread priority.  This is only
+     * effective if the JNI layer is built with GUARD_THREAD_PRIORITY defined to 1.
+     *
+     * @hide
+     */
+    public static final native void setCanSelfBackground(boolean backgroundOk);
+
+    /**
      * Sets the scheduling group for a thread.
      * @hide
      * @param tid The indentifier of the thread/process to change.
diff --git a/core/java/android/os/RecoverySystem.java b/core/java/android/os/RecoverySystem.java
index b6dc1b5..5fea6fe 100644
--- a/core/java/android/os/RecoverySystem.java
+++ b/core/java/android/os/RecoverySystem.java
@@ -348,6 +348,23 @@
     }
 
     /**
+     * Reboot into the recovery system to wipe the /data partition and toggle
+     * Encrypted File Systems on/off.
+     * @param extras to add to the RECOVERY_COMPLETED intent after rebooting.
+     * @throws IOException if something goes wrong.
+     *
+     * @hide
+     */
+    public static void rebootToggleEFS(Context context, boolean efsEnabled)
+        throws IOException {
+        if (efsEnabled) {
+            bootCommand(context, "--set_encrypted_filesystem=on");
+        } else {
+            bootCommand(context, "--set_encrypted_filesystem=off");
+        }
+    }
+
+    /**
      * Reboot into the recovery system with the supplied argument.
      * @param arg to pass to the recovery utility.
      * @throws IOException if something goes wrong.
diff --git a/core/java/android/os/StrictMode.java b/core/java/android/os/StrictMode.java
new file mode 100644
index 0000000..dc92590
--- /dev/null
+++ b/core/java/android/os/StrictMode.java
@@ -0,0 +1,486 @@
+/*
+ * Copyright (C) 2010 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package android.os;
+
+import android.app.ActivityManagerNative;
+import android.app.ApplicationErrorReport;
+import android.util.Log;
+
+import com.android.internal.os.RuntimeInit;
+
+import dalvik.system.BlockGuard;
+
+import java.io.PrintWriter;
+import java.io.StringWriter;
+import java.util.ArrayList;
+import java.util.HashMap;
+
+/**
+ * <p>StrictMode lets you impose stricter rules under which your
+ * application runs.</p>
+ */
+public final class StrictMode {
+    private static final String TAG = "StrictMode";
+    private static final boolean LOG_V = false;
+
+    // Only log a duplicate stack trace to the logs every second.
+    private static final long MIN_LOG_INTERVAL_MS = 1000;
+
+    // Only show an annoying dialog at most every 30 seconds
+    private static final long MIN_DIALOG_INTERVAL_MS = 30000;
+
+    private StrictMode() {}
+
+    public static final int DISALLOW_DISK_WRITE = 0x01;
+    public static final int DISALLOW_DISK_READ = 0x02;
+    public static final int DISALLOW_NETWORK = 0x04;
+
+    /** @hide */
+    public static final int DISALLOW_MASK =
+            DISALLOW_DISK_WRITE | DISALLOW_DISK_READ | DISALLOW_NETWORK;
+
+    /**
+     * Flag to log to the system log.
+     */
+    public static final int PENALTY_LOG = 0x10;  // normal android.util.Log
+
+    /**
+     * Show an annoying dialog to the user.  Will be rate-limited to be only
+     * a little annoying.
+     */
+    public static final int PENALTY_DIALOG = 0x20;
+
+    /**
+     * Crash hard if policy is violated.
+     */
+    public static final int PENALTY_DEATH = 0x40;
+
+    /**
+     * Log a stacktrace to the DropBox on policy violation.
+     */
+    public static final int PENALTY_DROPBOX = 0x80;
+
+    /**
+     * Non-public penalty mode which overrides all the other penalty
+     * bits and signals that we're in a Binder call and we should
+     * ignore the other penalty bits and instead serialize back all
+     * our offending stack traces to the caller to ultimately handle
+     * in the originating process.
+     *
+     * This must be kept in sync with the constant in libs/binder/Parcel.cpp
+     *
+     * @hide
+     */
+    public static final int PENALTY_GATHER = 0x100;
+
+    /** @hide */
+    public static final int PENALTY_MASK =
+            PENALTY_LOG | PENALTY_DIALOG |
+            PENALTY_DROPBOX | PENALTY_DEATH;
+
+    /**
+     * Log of strict mode violation stack traces that have occurred
+     * during a Binder call, to be serialized back later to the caller
+     * via Parcel.writeNoException() (amusingly) where the caller can
+     * choose how to react.
+     */
+    private static ThreadLocal<ArrayList<ApplicationErrorReport.CrashInfo>> gatheredViolations =
+            new ThreadLocal<ArrayList<ApplicationErrorReport.CrashInfo>>() {
+        @Override protected ArrayList<ApplicationErrorReport.CrashInfo> initialValue() {
+            // Starts null to avoid unnecessary allocations when
+            // checking whether there are any violations or not in
+            // hasGatheredViolations() below.
+            return null;
+        }
+    };
+
+    /**
+     * Sets the policy for what actions the current thread is denied,
+     * as well as the penalty for violating the policy.
+     *
+     * @param policyMask a bitmask of DISALLOW_* and PENALTY_* values.
+     */
+    public static void setThreadBlockingPolicy(final int policyMask) {
+        // In addition to the Java-level thread-local in Dalvik's
+        // BlockGuard, we also need to keep a native thread-local in
+        // Binder in order to propagate the value across Binder calls,
+        // even across native-only processes.  The two are kept in
+        // sync via the callback to onStrictModePolicyChange, below.
+        setBlockGuardPolicy(policyMask);
+
+        // And set the Android native version...
+        Binder.setThreadStrictModePolicy(policyMask);
+    }
+
+    // Sets the policy in Dalvik/libcore (BlockGuard)
+    private static void setBlockGuardPolicy(final int policyMask) {
+        if (policyMask == 0) {
+            BlockGuard.setThreadPolicy(BlockGuard.LAX_POLICY);
+            return;
+        }
+        BlockGuard.Policy policy = BlockGuard.getThreadPolicy();
+        if (!(policy instanceof AndroidBlockGuardPolicy)) {
+            BlockGuard.setThreadPolicy(new AndroidBlockGuardPolicy(policyMask));
+        } else {
+            AndroidBlockGuardPolicy androidPolicy = (AndroidBlockGuardPolicy) policy;
+            androidPolicy.setPolicyMask(policyMask);
+        }
+    }
+
+    private static class StrictModeNetworkViolation extends BlockGuard.BlockGuardPolicyException {
+        public StrictModeNetworkViolation(int policyMask) {
+            super(policyMask, DISALLOW_NETWORK);
+        }
+    }
+
+    private static class StrictModeDiskReadViolation extends BlockGuard.BlockGuardPolicyException {
+        public StrictModeDiskReadViolation(int policyMask) {
+            super(policyMask, DISALLOW_DISK_READ);
+        }
+    }
+
+    private static class StrictModeDiskWriteViolation extends BlockGuard.BlockGuardPolicyException {
+        public StrictModeDiskWriteViolation(int policyMask) {
+            super(policyMask, DISALLOW_DISK_WRITE);
+        }
+    }
+
+    /**
+     * Returns the bitmask of the current thread's blocking policy.
+     *
+     * @return the bitmask of all the DISALLOW_* and PENALTY_* bits currently enabled
+     */
+    public static int getThreadBlockingPolicy() {
+        return BlockGuard.getThreadPolicy().getPolicyMask();
+    }
+
+    /**
+     * Parses the BlockGuard policy mask out from the Exception's
+     * getMessage() String value.  Kinda gross, but least
+     * invasive.  :/
+     *
+     * Input is of form "policy=137 violation=64"
+     *
+     * Returns 0 on failure, which is a valid policy, but not a
+     * valid policy during a violation (else there must've been
+     * some policy in effect to violate).
+     */
+    private static int parsePolicyFromMessage(String message) {
+        if (message == null || !message.startsWith("policy=")) {
+            return 0;
+        }
+        int spaceIndex = message.indexOf(' ');
+        if (spaceIndex == -1) {
+            return 0;
+        }
+        String policyString = message.substring(7, spaceIndex);
+        try {
+            return Integer.valueOf(policyString).intValue();
+        } catch (NumberFormatException e) {
+            return 0;
+        }
+    }
+
+    /**
+     * Like parsePolicyFromMessage(), but returns the violation.
+     */
+    private static int parseViolationFromMessage(String message) {
+        if (message == null) {
+            return 0;
+        }
+        int violationIndex = message.indexOf("violation=");
+        if (violationIndex == -1) {
+            return 0;
+        }
+        String violationString = message.substring(violationIndex + 10);
+        try {
+            return Integer.valueOf(violationString).intValue();
+        } catch (NumberFormatException e) {
+            return 0;
+        }
+    }
+
+    private static class AndroidBlockGuardPolicy implements BlockGuard.Policy {
+        private int mPolicyMask;
+
+        // Map from violation stacktrace hashcode -> uptimeMillis of
+        // last violation.  No locking needed, as this is only
+        // accessed by the same thread.
+        private final HashMap<Integer, Long> mLastViolationTime = new HashMap<Integer, Long>();
+
+        public AndroidBlockGuardPolicy(final int policyMask) {
+            mPolicyMask = policyMask;
+        }
+
+        @Override
+        public String toString() {
+            return "AndroidBlockGuardPolicy; mPolicyMask=" + mPolicyMask;
+        }
+
+        // Part of BlockGuard.Policy interface:
+        public int getPolicyMask() {
+            return mPolicyMask;
+        }
+
+        // Part of BlockGuard.Policy interface:
+        public void onWriteToDisk() {
+            if ((mPolicyMask & DISALLOW_DISK_WRITE) == 0) {
+                return;
+            }
+            startHandlingViolationException(new StrictModeDiskWriteViolation(mPolicyMask));
+        }
+
+        // Part of BlockGuard.Policy interface:
+        public void onReadFromDisk() {
+            if ((mPolicyMask & DISALLOW_DISK_READ) == 0) {
+                return;
+            }
+            startHandlingViolationException(new StrictModeDiskReadViolation(mPolicyMask));
+        }
+
+        // Part of BlockGuard.Policy interface:
+        public void onNetwork() {
+            if ((mPolicyMask & DISALLOW_NETWORK) == 0) {
+                return;
+            }
+            startHandlingViolationException(new StrictModeNetworkViolation(mPolicyMask));
+        }
+
+        public void setPolicyMask(int policyMask) {
+            mPolicyMask = policyMask;
+        }
+
+        // Start handling a violation that just started and hasn't
+        // actually run yet (e.g. no disk write or network operation
+        // has yet occurred).  This sees if we're in an event loop
+        // thread and, if so, uses it to roughly measure how long the
+        // violation took.
+        void startHandlingViolationException(BlockGuard.BlockGuardPolicyException e) {
+            e.fillInStackTrace();
+            final ApplicationErrorReport.CrashInfo crashInfo = new ApplicationErrorReport.CrashInfo(e);
+            crashInfo.durationMillis = -1;  // unknown
+            final int savedPolicy = mPolicyMask;
+
+            Looper looper = Looper.myLooper();
+            if (looper == null) {
+                // Without a Looper, we're unable to time how long the
+                // violation takes place.  This case should be rare,
+                // as most users will care about timing violations
+                // that happen on their main UI thread.
+                handleViolation(crashInfo, savedPolicy);
+            } else {
+                MessageQueue queue = Looper.myQueue();
+                final long violationTime = SystemClock.uptimeMillis();
+                queue.addIdleHandler(new MessageQueue.IdleHandler() {
+                        public boolean queueIdle() {
+                            long afterViolationTime = SystemClock.uptimeMillis();
+                            crashInfo.durationMillis = afterViolationTime - violationTime;
+                            handleViolation(crashInfo, savedPolicy);
+                            return false;  // remove this idle handler from the array
+                        }
+                    });
+            }
+
+        }
+
+        // Note: It's possible (even quite likely) that the
+        // thread-local policy mask has changed from the time the
+        // violation fired and now (after the violating code ran) due
+        // to people who push/pop temporary policy in regions of code,
+        // hence the policy being passed around.
+        void handleViolation(
+            final ApplicationErrorReport.CrashInfo crashInfo,
+            int policy) {
+            if (crashInfo.stackTrace == null) {
+                Log.d(TAG, "unexpected null stacktrace");
+                return;
+            }
+
+            if (LOG_V) Log.d(TAG, "handleViolation; policy=" + policy);
+
+            if ((policy & PENALTY_GATHER) != 0) {
+                ArrayList<ApplicationErrorReport.CrashInfo> violations = gatheredViolations.get();
+                if (violations == null) {
+                    violations = new ArrayList<ApplicationErrorReport.CrashInfo>(1);
+                    gatheredViolations.set(violations);
+                } else if (violations.size() >= 5) {
+                    // Too many.  In a loop or something?  Don't gather them all.
+                    return;
+                }
+                for (ApplicationErrorReport.CrashInfo previous : violations) {
+                    if (crashInfo.stackTrace.equals(previous.stackTrace)) {
+                        // Duplicate. Don't log.
+                        return;
+                    }
+                }
+                violations.add(crashInfo);
+                return;
+            }
+
+            // Not perfect, but fast and good enough for dup suppression.
+            Integer crashFingerprint = crashInfo.stackTrace.hashCode();
+            long lastViolationTime = 0;
+            if (mLastViolationTime.containsKey(crashFingerprint)) {
+                lastViolationTime = mLastViolationTime.get(crashFingerprint);
+            }
+            long now = SystemClock.uptimeMillis();
+            mLastViolationTime.put(crashFingerprint, now);
+            long timeSinceLastViolationMillis = lastViolationTime == 0 ?
+                    Long.MAX_VALUE : (now - lastViolationTime);
+
+            if ((policy & PENALTY_LOG) != 0 &&
+                timeSinceLastViolationMillis > MIN_LOG_INTERVAL_MS) {
+                if (crashInfo.durationMillis != -1) {
+                    Log.d(TAG, "StrictMode policy violation; ~duration=" +
+                          crashInfo.durationMillis + " ms: " + crashInfo.stackTrace);
+                } else {
+                    Log.d(TAG, "StrictMode policy violation: " + crashInfo.stackTrace);
+                }
+            }
+
+            // The violationMask, passed to ActivityManager, is a
+            // subset of the original StrictMode policy bitmask, with
+            // only the bit violated and penalty bits to be executed
+            // by the ActivityManagerService remaining set.
+            int violationMask = 0;
+
+            if ((policy & PENALTY_DIALOG) != 0 &&
+                timeSinceLastViolationMillis > MIN_DIALOG_INTERVAL_MS) {
+                violationMask |= PENALTY_DIALOG;
+            }
+
+            if ((policy & PENALTY_DROPBOX) != 0 && lastViolationTime == 0) {
+                violationMask |= PENALTY_DROPBOX;
+            }
+
+            if (violationMask != 0) {
+                int violationBit = parseViolationFromMessage(crashInfo.exceptionMessage);
+                violationMask |= violationBit;
+                final int savedPolicy = getThreadBlockingPolicy();
+                try {
+                    // First, remove any policy before we call into the Activity Manager,
+                    // otherwise we'll infinite recurse as we try to log policy violations
+                    // to disk, thus violating policy, thus requiring logging, etc...
+                    // We restore the current policy below, in the finally block.
+                    setThreadBlockingPolicy(0);
+
+                    ActivityManagerNative.getDefault().handleApplicationStrictModeViolation(
+                        RuntimeInit.getApplicationObject(),
+                        violationMask,
+                        crashInfo);
+                } catch (RemoteException e) {
+                    Log.e(TAG, "RemoteException trying to handle StrictMode violation", e);
+                } finally {
+                    // Restore the policy.
+                    setThreadBlockingPolicy(savedPolicy);
+                }
+            }
+
+            if ((policy & PENALTY_DEATH) != 0) {
+                System.err.println("StrictMode policy violation with POLICY_DEATH; shutting down.");
+                Process.killProcess(Process.myPid());
+                System.exit(10);
+            }
+        }
+    }
+
+    /**
+     * Called from Parcel.writeNoException()
+     */
+    /* package */ static boolean hasGatheredViolations() {
+        return gatheredViolations.get() != null;
+    }
+
+    /**
+     * Called from Parcel.writeException(), so we drop this memory and
+     * don't incorrectly attribute it to the wrong caller on the next
+     * Binder call on this thread.
+     */
+    /* package */ static void clearGatheredViolations() {
+        gatheredViolations.set(null);
+    }
+
+    /**
+     * Called from Parcel.writeNoException()
+     */
+    /* package */ static void writeGatheredViolationsToParcel(Parcel p) {
+        ArrayList<ApplicationErrorReport.CrashInfo> violations = gatheredViolations.get();
+        if (violations == null) {
+            p.writeInt(0);
+        } else {
+            p.writeInt(violations.size());
+            for (int i = 0; i < violations.size(); ++i) {
+                violations.get(i).writeToParcel(p, 0 /* unused flags? */);
+            }
+            if (LOG_V) Log.d(TAG, "wrote violations to response parcel; num=" + violations.size());
+            violations.clear(); // somewhat redundant, as we're about to null the threadlocal
+        }
+        gatheredViolations.set(null);
+    }
+
+    private static class LogStackTrace extends Exception {}
+
+    /**
+     * Called from Parcel.readException() when the exception is EX_STRICT_MODE_VIOLATIONS,
+     * we here read back all the encoded violations.
+     */
+    /* package */ static void readAndHandleBinderCallViolations(Parcel p) {
+        // Our own stack trace to append
+        Exception e = new LogStackTrace();
+        StringWriter sw = new StringWriter();
+        e.printStackTrace(new PrintWriter(sw));
+        String ourStack = sw.toString();
+
+        int policyMask = getThreadBlockingPolicy();
+
+        int numViolations = p.readInt();
+        for (int i = 0; i < numViolations; ++i) {
+            if (LOG_V) Log.d(TAG, "strict mode violation stacks read from binder call.  i=" + i);
+            ApplicationErrorReport.CrashInfo crashInfo = new ApplicationErrorReport.CrashInfo(p);
+            crashInfo.stackTrace += "# via Binder call with stack:\n" + ourStack;
+
+            // Unlike the in-process violations in which case we
+            // trigger an error _before_ the thing occurs, in this
+            // case the violating thing has already occurred, so we
+            // can't use our heuristic of waiting for the next event
+            // loop idle cycle to measure the approximate violation
+            // duration.  Instead, just skip that step and use -1
+            // (unknown duration) for now.
+            // TODO: keep a thread-local on remote process of first
+            // violation time's uptimeMillis, and when writing that
+            // back out in Parcel reply, include in the header the
+            // violation time and use it here.
+            crashInfo.durationMillis = -1;
+
+            BlockGuard.Policy policy = BlockGuard.getThreadPolicy();
+            if (policy instanceof AndroidBlockGuardPolicy) {
+                ((AndroidBlockGuardPolicy) policy).handleViolation(crashInfo, policyMask);
+            }
+        }
+    }
+
+    /**
+     * Called from android_util_Binder.cpp's
+     * android_os_Parcel_enforceInterface when an incoming Binder call
+     * requires changing the StrictMode policy mask.  The role of this
+     * function is to ask Binder for its current (native) thread-local
+     * policy value and synchronize it to libcore's (Java)
+     * thread-local policy value.
+     */
+    private static void onBinderStrictModePolicyChange(int newPolicy) {
+        setBlockGuardPolicy(newPolicy);
+    }
+}
diff --git a/core/java/android/os/storage/IMountService.aidl b/core/java/android/os/storage/IMountService.aidl
index 4862f80..ca7efe7 100644
--- a/core/java/android/os/storage/IMountService.aidl
+++ b/core/java/android/os/storage/IMountService.aidl
@@ -152,4 +152,26 @@
      * processing the media status update request.
      */
     void finishMediaUpdate();
+
+    /**
+     * Mounts an Opaque Binary Blob (OBB) with the specified decryption key and only
+     * allows the calling process's UID access to the contents.
+     */
+    int mountObb(String filename, String key);
+
+    /**
+     * Unmounts an Opaque Binary Blob (OBB). When the force flag is specified, any
+     * program using it will be forcibly killed to unmount the image.
+     */
+    int unmountObb(String filename, boolean force);
+
+    /**
+     * Checks whether the specified Opaque Binary Blob (OBB) is mounted somewhere.
+     */
+    boolean isObbMounted(String filename);
+
+    /**
+     * Gets the path to the mounted Opaque Binary Blob (OBB).
+     */
+    String getMountedObbPath(String filename);
 }
diff --git a/core/java/android/os/storage/StorageManager.java b/core/java/android/os/storage/StorageManager.java
index a12603c..96bf2d5 100644
--- a/core/java/android/os/storage/StorageManager.java
+++ b/core/java/android/os/storage/StorageManager.java
@@ -44,9 +44,6 @@
  * Get an instance of this class by calling
  * {@link android.content.Context#getSystemService(java.lang.String)} with an argument
  * of {@link android.content.Context#STORAGE_SERVICE}.
- *
- * @hide
- *
  */
 
 public class StorageManager
@@ -209,6 +206,7 @@
      *
      * @param listener A {@link android.os.storage.StorageEventListener StorageEventListener} object.
      *
+     * @hide
      */
     public void registerListener(StorageEventListener listener) {
         if (listener == null) {
@@ -225,6 +223,7 @@
      *
      * @param listener A {@link android.os.storage.StorageEventListener StorageEventListener} object.
      *
+     * @hide
      */
     public void unregisterListener(StorageEventListener listener) {
         if (listener == null) {
@@ -245,6 +244,8 @@
 
     /**
      * Enables USB Mass Storage (UMS) on the device.
+     *
+     * @hide
      */
     public void enableUsbMassStorage() {
         try {
@@ -256,6 +257,8 @@
 
     /**
      * Disables USB Mass Storage (UMS) on the device.
+     *
+     * @hide
      */
     public void disableUsbMassStorage() {
         try {
@@ -268,6 +271,8 @@
     /**
      * Query if a USB Mass Storage (UMS) host is connected.
      * @return true if UMS host is connected.
+     *
+     * @hide
      */
     public boolean isUsbMassStorageConnected() {
         try {
@@ -281,6 +286,8 @@
     /**
      * Query if a USB Mass Storage (UMS) is enabled on the device.
      * @return true if UMS host is enabled.
+     *
+     * @hide
      */
     public boolean isUsbMassStorageEnabled() {
         try {
@@ -290,4 +297,55 @@
         }
         return false;
     }
+
+    /**
+     * Mount an OBB file.
+     */
+    public boolean mountObb(String filename, String key) {
+        try {
+            return mMountService.mountObb(filename, key)
+                    == StorageResultCode.OperationSucceeded;
+        } catch (RemoteException e) {
+            Log.e(TAG, "Failed to mount OBB", e);
+        }
+
+        return false;
+    }
+
+    /**
+     * Mount an OBB file.
+     */
+    public boolean unmountObb(String filename, boolean force) {
+        try {
+            return mMountService.unmountObb(filename, force)
+                    == StorageResultCode.OperationSucceeded;
+        } catch (RemoteException e) {
+            Log.e(TAG, "Failed to mount OBB", e);
+        }
+
+        return false;
+    }
+
+    public boolean isObbMounted(String filename) {
+        try {
+            return mMountService.isObbMounted(filename);
+        } catch (RemoteException e) {
+            Log.e(TAG, "Failed to check if OBB is mounted", e);
+        }
+
+        return false;
+    }
+
+    /**
+     * Check the mounted path of an OBB file.
+     */
+    public String getMountedObbPath(String filename) {
+        try {
+            return mMountService.getMountedObbPath(filename);
+        } catch (RemoteException e) {
+            Log.e(TAG, "Failed to find mounted path for OBB", e);
+        }
+
+        return null;
+    }
 }
diff --git a/core/java/android/pim/vcard/VCardBuilder.java b/core/java/android/pim/vcard/VCardBuilder.java
index 0a6415d..1da6d7a 100644
--- a/core/java/android/pim/vcard/VCardBuilder.java
+++ b/core/java/android/pim/vcard/VCardBuilder.java
@@ -642,22 +642,18 @@
                 if (TextUtils.isEmpty(phoneNumber)) {
                     continue;
                 }
-                int type = (typeAsObject != null ? typeAsObject : DEFAULT_PHONE_TYPE);
-                if (type == Phone.TYPE_PAGER) {
+
+                // PAGER number needs unformatted "phone number".
+                final int type = (typeAsObject != null ? typeAsObject : DEFAULT_PHONE_TYPE);
+                if (type == Phone.TYPE_PAGER ||
+                        VCardConfig.refrainPhoneNumberFormatting(mVCardType)) {
                     phoneLineExists = true;
                     if (!phoneSet.contains(phoneNumber)) {
                         phoneSet.add(phoneNumber);
                         appendTelLine(type, label, phoneNumber, isPrimary);
                     }
                 } else {
-                    // The entry "may" have several phone numbers when the contact entry is
-                    // corrupted because of its original source.
-                    //
-                    // e.g. I encountered the entry like the following.
-                    // "111-222-3333 (Miami)\n444-555-6666 (Broward; 305-653-6796 (Miami); ..."
-                    // This kind of entry is not able to be inserted via Android devices, but
-                    // possible if the source of the data is already corrupted.
-                    List<String> phoneNumberList = splitIfSeveralPhoneNumbersExist(phoneNumber);
+                    final List<String> phoneNumberList = splitAndTrimPhoneNumbers(phoneNumber);
                     if (phoneNumberList.isEmpty()) {
                         continue;
                     }
@@ -670,7 +666,7 @@
                             phoneSet.add(actualPhoneNumber);
                             appendTelLine(type, label, formattedPhoneNumber, isPrimary);
                         }
-                    }
+                    }  // for (String actualPhoneNumber : phoneNumberList) {
                 }
             }
         }
@@ -682,15 +678,38 @@
         return this;
     }
 
-    private List<String> splitIfSeveralPhoneNumbersExist(final String phoneNumber) {
-        List<String> phoneList = new ArrayList<String>();
+    /**
+     * <p>
+     * Splits a given string expressing phone numbers into several strings, and remove
+     * unnecessary characters inside them. The size of a returned list becomes 1 when
+     * no split is needed.
+     * </p>
+     * <p>
+     * The given number "may" have several phone numbers when the contact entry is corrupted
+     * because of its original source.
+     * e.g. "111-222-3333 (Miami)\n444-555-6666 (Broward; 305-653-6796 (Miami)"
+     * </p>
+     * <p>
+     * This kind of "phone numbers" will not be created with Android vCard implementation,
+     * but we may encounter them if the source of the input data has already corrupted
+     * implementation.
+     * </p>
+     * <p>
+     * To handle this case, this method first splits its input into multiple parts
+     * (e.g. "111-222-3333 (Miami)", "444-555-6666 (Broward", and 305653-6796 (Miami)") and
+     * removes unnecessary strings like "(Miami)".
+     * </p>
+     * <p>
+     * Do not call this method when trimming is inappropriate for its receivers.
+     * </p>
+     */
+    private List<String> splitAndTrimPhoneNumbers(final String phoneNumber) {
+        final List<String> phoneList = new ArrayList<String>();
 
         StringBuilder builder = new StringBuilder();
         final int length = phoneNumber.length();
         for (int i = 0; i < length; i++) {
             final char ch = phoneNumber.charAt(i);
-            // TODO: add a test case for string with '+', and care the other possible issues
-            // which may happen by ignoring non-digits other than '+'.
             if (Character.isDigit(ch) || ch == '+') {
                 builder.append(ch);
             } else if ((ch == ';' || ch == '\n') && builder.length() > 0) {
diff --git a/core/java/android/pim/vcard/VCardConfig.java b/core/java/android/pim/vcard/VCardConfig.java
index 3409be6..8219840 100644
--- a/core/java/android/pim/vcard/VCardConfig.java
+++ b/core/java/android/pim/vcard/VCardConfig.java
@@ -15,6 +15,7 @@
  */
 package android.pim.vcard;
 
+import android.telephony.PhoneNumberUtils;
 import android.util.Log;
 
 import java.util.HashMap;
@@ -190,6 +191,30 @@
      */
     public static final int FLAG_REFRAIN_IMAGE_EXPORT = 0x02000000;
 
+    /**
+     * <P>
+     * The flag indicating the vCard composer does touch nothing toward phone number Strings
+     * but leave it as is.
+     * </P>
+     * <P>
+     * The vCard specifications mention nothing toward phone numbers, while some devices
+     * do (wrongly, but with innevitable reasons).
+     * For example, there's a possibility Japanese mobile phones are expected to have
+     * just numbers, hypens, plus, etc. but not usual alphabets, while US mobile phones
+     * should get such characters. To make exported vCard simple for external parsers,
+     * we have used {@link PhoneNumberUtils#formatNumber(String)} during export, and
+     * removed unnecessary characters inside the number (e.g. "111-222-3333 (Miami)"
+     * becomes "111-222-3333").
+     * Unfortunate side effect of that use was some control characters used in the other
+     * areas may be badly affected by the formatting.
+     * </P>
+     * <P>
+     * This flag disables that formatting, affecting both importer and exporter.
+     * If the user is aware of some side effects due to the implicit formatting, use this flag.
+     * </P>
+     */
+    public static final int FLAG_REFRAIN_PHONE_NUMBER_FORMATTING = 0x02000000;
+
     //// The followings are VCard types available from importer/exporter. ////
 
     /**
@@ -431,6 +456,10 @@
         return sJapaneseMobileTypeSet.contains(vcardType);
     }
 
+    /* package */ static boolean refrainPhoneNumberFormatting(final int vcardType) {
+        return ((vcardType & FLAG_REFRAIN_PHONE_NUMBER_FORMATTING) != 0);
+    }
+
     public static boolean needsToConvertPhoneticString(final int vcardType) {
         return ((vcardType & FLAG_CONVERT_PHONETIC_NAME_STRINGS) != 0);
     }
@@ -445,4 +474,4 @@
 
     private VCardConfig() {
     }
-}
\ No newline at end of file
+}
diff --git a/core/java/android/pim/vcard/VCardEntry.java b/core/java/android/pim/vcard/VCardEntry.java
index 1327770..7c7e9b8 100644
--- a/core/java/android/pim/vcard/VCardEntry.java
+++ b/core/java/android/pim/vcard/VCardEntry.java
@@ -488,7 +488,7 @@
         final StringBuilder builder = new StringBuilder();
         final String trimed = data.trim();
         final String formattedNumber;
-        if (type == Phone.TYPE_PAGER) {
+        if (type == Phone.TYPE_PAGER || VCardConfig.refrainPhoneNumberFormatting(mVCardType)) {
             formattedNumber = trimed;
         } else {
             final int length = trimed.length();
@@ -500,8 +500,7 @@
             }
 
             // Use NANP in default when there's no information about locale.
-            final int formattingType = (VCardConfig.isJapaneseDevice(mVCardType) ?
-                    PhoneNumberUtils.FORMAT_JAPAN : PhoneNumberUtils.FORMAT_NANP);
+            final int formattingType = VCardUtils.getPhoneNumberFormat(mVCardType);
             formattedNumber = PhoneNumberUtils.formatNumber(builder.toString(), formattingType);
         }
         PhoneData phoneData = new PhoneData(type, formattedNumber, label, isPrimary);
diff --git a/core/java/android/preference/DialogPreference.java b/core/java/android/preference/DialogPreference.java
index cc48aeb..bbad2b6 100644
--- a/core/java/android/preference/DialogPreference.java
+++ b/core/java/android/preference/DialogPreference.java
@@ -33,7 +33,6 @@
 import android.view.View;
 import android.view.Window;
 import android.view.WindowManager;
-import android.view.inputmethod.InputMethodManager;
 import android.widget.TextView;
 
 /**
@@ -275,7 +274,7 @@
     protected void showDialog(Bundle state) {
         Context context = getContext();
 
-        mWhichButtonClicked = DialogInterface.BUTTON2;
+        mWhichButtonClicked = DialogInterface.BUTTON_NEGATIVE;
         
         mBuilder = new AlertDialog.Builder(context)
             .setTitle(mDialogTitle)
diff --git a/core/java/android/provider/Downloads.java b/core/java/android/provider/Downloads.java
index 348e9e8..2a612fe 100644
--- a/core/java/android/provider/Downloads.java
+++ b/core/java/android/provider/Downloads.java
@@ -899,6 +899,12 @@
         public static final int DESTINATION_CACHE_PARTITION_NOROAMING = 3;
 
         /**
+         * This download will be saved to the location given by the file URI in
+         * {@link #COLUMN_FILE_NAME_HINT}.
+         */
+        public static final int DESTINATION_FILE_URI = 4;
+
+        /**
          * This download is allowed to run.
          */
         public static final int CONTROL_RUN = 0;
@@ -1109,5 +1115,26 @@
          * This download doesn't show in the UI or in the notifications.
          */
         public static final int VISIBILITY_HIDDEN = 2;
+
+        /**
+         * Constants related to HTTP request headers associated with each download.
+         */
+        public static class RequestHeaders {
+            public static final String HEADERS_DB_TABLE = "request_headers";
+            public static final String COLUMN_DOWNLOAD_ID = "download_id";
+            public static final String COLUMN_HEADER = "header";
+            public static final String COLUMN_VALUE = "value";
+
+            /**
+             * Path segment to add to a download URI to retrieve request headers
+             */
+            public static final String URI_SEGMENT = "headers";
+
+            /**
+             * Prefix for ContentValues keys that contain HTTP header lines, to be passed to
+             * DownloadProvider.insert().
+             */
+            public static final String INSERT_KEY_PREFIX = "http_header_";
+        }
     }
 }
diff --git a/core/java/android/provider/MediaStore.java b/core/java/android/provider/MediaStore.java
index c9d125b..40ed980 100644
--- a/core/java/android/provider/MediaStore.java
+++ b/core/java/android/provider/MediaStore.java
@@ -1819,4 +1819,12 @@
      * Name of current volume being scanned by the media scanner.
      */
     public static final String MEDIA_SCANNER_VOLUME = "volume";
+
+    /**
+     * Name of the file signaling the media scanner to ignore media in the containing directory
+     * and its subdirectories. Developers should use this to avoid application graphics showing
+     * up in the Gallery and likewise prevent application sounds and music from showing up in
+     * the Music app.
+     */
+    public static final String MEDIA_IGNORE_FILENAME = ".nomedia";
 }
diff --git a/core/java/android/provider/Settings.java b/core/java/android/provider/Settings.java
index e12dfb0..7bb89f5 100644
--- a/core/java/android/provider/Settings.java
+++ b/core/java/android/provider/Settings.java
@@ -355,6 +355,21 @@
             "android.settings.MANAGE_APPLICATIONS_SETTINGS";
 
     /**
+     * Activity Action: Show screen of details about a particular application.
+     * <p>
+     * In some cases, a matching Activity may not exist, so ensure you
+     * safeguard against this.
+     * <p>
+     * Input: The Intent's data URI specifies the application package name
+     * to be shown, with the "package" scheme.  That is "package:com.my.app".
+     * <p>
+     * Output: Nothing.
+     */
+    @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION)
+    public static final String ACTION_APPLICATION_DETAILS_SETTINGS =
+            "android.settings.APPLICATION_DETAILS_SETTINGS";
+
+    /**
      * Activity Action: Show settings for system update functionality.
      * <p>
      * In some cases, a matching Activity may not exist, so ensure you
diff --git a/core/java/android/server/BluetoothA2dpService.java b/core/java/android/server/BluetoothA2dpService.java
index 893db2e..a52a221 100644
--- a/core/java/android/server/BluetoothA2dpService.java
+++ b/core/java/android/server/BluetoothA2dpService.java
@@ -27,7 +27,6 @@
 import android.bluetooth.BluetoothDevice;
 import android.bluetooth.BluetoothUuid;
 import android.bluetooth.IBluetoothA2dp;
-import android.os.ParcelUuid;
 import android.content.BroadcastReceiver;
 import android.content.Context;
 import android.content.Intent;
@@ -35,6 +34,7 @@
 import android.media.AudioManager;
 import android.os.Handler;
 import android.os.Message;
+import android.os.ParcelUuid;
 import android.provider.Settings;
 import android.util.Log;
 
@@ -55,8 +55,6 @@
 
     private static final String BLUETOOTH_ENABLED = "bluetooth_enabled";
 
-    private static final int MESSAGE_CONNECT_TO = 1;
-
     private static final String PROPERTY_STATE = "State";
 
     private static final String SINK_STATE_DISCONNECTED = "disconnected";
@@ -73,6 +71,7 @@
     private final BluetoothService mBluetoothService;
     private final BluetoothAdapter mAdapter;
     private int   mTargetA2dpState;
+    private boolean mAdjustedPriority = false;
 
     private final BroadcastReceiver mReceiver = new BroadcastReceiver() {
         @Override
@@ -104,16 +103,6 @@
                     setSinkPriority(device, BluetoothA2dp.PRIORITY_UNDEFINED);
                     break;
                 }
-            } else if (action.equals(BluetoothDevice.ACTION_ACL_CONNECTED)) {
-                if (getSinkPriority(device) == BluetoothA2dp.PRIORITY_AUTO_CONNECT &&
-                        isSinkDevice(device)) {
-                    // This device is a preferred sink. Make an A2DP connection
-                    // after a delay. We delay to avoid connection collisions,
-                    // and to give other profiles such as HFP a chance to
-                    // connect first.
-                    Message msg = Message.obtain(mHandler, MESSAGE_CONNECT_TO, device);
-                    mHandler.sendMessageDelayed(msg, 6000);
-                }
             } else if (action.equals(BluetoothDevice.ACTION_ACL_DISCONNECTED)) {
                 synchronized (this) {
                     if (mAudioDevices.containsKey(device)) {
@@ -187,6 +176,7 @@
         if (mBluetoothService.isEnabled())
             onBluetoothEnable();
         mTargetA2dpState = -1;
+        mBluetoothService.setA2dpService(this);
     }
 
     @Override
@@ -198,29 +188,6 @@
         }
     }
 
-    private final Handler mHandler = new Handler() {
-        @Override
-        public void handleMessage(Message msg) {
-            switch (msg.what) {
-            case MESSAGE_CONNECT_TO:
-                BluetoothDevice device = (BluetoothDevice) msg.obj;
-                // check bluetooth is still on, device is still preferred, and
-                // nothing is currently connected
-                if (mBluetoothService.isEnabled() &&
-                        getSinkPriority(device) == BluetoothA2dp.PRIORITY_AUTO_CONNECT &&
-                        lookupSinksMatchingStates(new int[] {
-                            BluetoothA2dp.STATE_CONNECTING,
-                            BluetoothA2dp.STATE_CONNECTED,
-                            BluetoothA2dp.STATE_PLAYING,
-                            BluetoothA2dp.STATE_DISCONNECTING}).size() == 0) {
-                    log("Auto-connecting A2DP to sink " + device);
-                    connectSink(device);
-                }
-                break;
-            }
-        }
-    };
-
     private int convertBluezSinkStringtoState(String value) {
         if (value.equalsIgnoreCase("disconnected"))
             return BluetoothA2dp.STATE_DISCONNECTED;
@@ -308,13 +275,37 @@
         mAudioManager.setParameters(BLUETOOTH_ENABLED + "=false");
     }
 
+    private synchronized boolean isConnectSinkFeasible(BluetoothDevice device) {
+        if (!mBluetoothService.isEnabled() || !isSinkDevice(device) ||
+                getSinkPriority(device) == BluetoothA2dp.PRIORITY_OFF) {
+                return false;
+            }
+
+            if (mAudioDevices.get(device) == null && !addAudioSink(device)) {
+                return false;
+            }
+
+            String path = mBluetoothService.getObjectPathFromAddress(device.getAddress());
+            if (path == null) {
+                return false;
+            }
+            return true;
+    }
+
     public synchronized boolean connectSink(BluetoothDevice device) {
         mContext.enforceCallingOrSelfPermission(BLUETOOTH_ADMIN_PERM,
                                                 "Need BLUETOOTH_ADMIN permission");
         if (DBG) log("connectSink(" + device + ")");
+        if (!isConnectSinkFeasible(device)) return false;
 
+        return mBluetoothService.connectSink(device.getAddress());
+    }
+
+    public synchronized boolean connectSinkInternal(BluetoothDevice device) {
         if (!mBluetoothService.isEnabled()) return false;
 
+        int state = mAudioDevices.get(device);
+
         // ignore if there are any active sinks
         if (lookupSinksMatchingStates(new int[] {
                 BluetoothA2dp.STATE_CONNECTING,
@@ -324,11 +315,6 @@
             return false;
         }
 
-        if (mAudioDevices.get(device) == null && !addAudioSink(device))
-            return false;
-
-        int state = mAudioDevices.get(device);
-
         switch (state) {
         case BluetoothA2dp.STATE_CONNECTED:
         case BluetoothA2dp.STATE_PLAYING:
@@ -339,8 +325,6 @@
         }
 
         String path = mBluetoothService.getObjectPathFromAddress(device.getAddress());
-        if (path == null)
-            return false;
 
         // State is DISCONNECTED
         handleSinkStateChange(device, state, BluetoothA2dp.STATE_CONNECTING);
@@ -353,11 +337,7 @@
         return true;
     }
 
-    public synchronized boolean disconnectSink(BluetoothDevice device) {
-        mContext.enforceCallingOrSelfPermission(BLUETOOTH_ADMIN_PERM,
-                                                "Need BLUETOOTH_ADMIN permission");
-        if (DBG) log("disconnectSink(" + device + ")");
-
+    private synchronized boolean isDisconnectSinkFeasible(BluetoothDevice device) {
         String path = mBluetoothService.getObjectPathFromAddress(device.getAddress());
         if (path == null) {
             return false;
@@ -370,6 +350,20 @@
         case BluetoothA2dp.STATE_DISCONNECTING:
             return true;
         }
+        return true;
+    }
+
+    public synchronized boolean disconnectSink(BluetoothDevice device) {
+        mContext.enforceCallingOrSelfPermission(BLUETOOTH_ADMIN_PERM,
+                                                "Need BLUETOOTH_ADMIN permission");
+        if (DBG) log("disconnectSink(" + device + ")");
+        if (!isDisconnectSinkFeasible(device)) return false;
+        return mBluetoothService.disconnectSink(device.getAddress());
+    }
+
+    public synchronized boolean disconnectSinkInternal(BluetoothDevice device) {
+        int state = getSinkState(device);
+        String path = mBluetoothService.getObjectPathFromAddress(device.getAddress());
 
         // State is CONNECTING or CONNECTED or PLAYING
         handleSinkStateChange(device, state, BluetoothA2dp.STATE_DISCONNECTING);
@@ -504,6 +498,12 @@
                 setSinkPriority(device, BluetoothA2dp.PRIORITY_AUTO_CONNECT);
             }
 
+            if (state == BluetoothA2dp.STATE_CONNECTED) {
+                // We will only have 1 device with AUTO_CONNECT priority
+                // To be backward compatible set everyone else to have PRIORITY_ON
+                adjustOtherSinkPriorities(device);
+            }
+
             Intent intent = new Intent(BluetoothA2dp.ACTION_SINK_STATE_CHANGED);
             intent.putExtra(BluetoothDevice.EXTRA_DEVICE, device);
             intent.putExtra(BluetoothA2dp.EXTRA_PREVIOUS_SINK_STATE, prevState);
@@ -514,6 +514,18 @@
         }
     }
 
+    private void adjustOtherSinkPriorities(BluetoothDevice connectedDevice) {
+        if (!mAdjustedPriority) {
+            for (BluetoothDevice device : mAdapter.getBondedDevices()) {
+                if (getSinkPriority(device) >= BluetoothA2dp.PRIORITY_AUTO_CONNECT &&
+                    !device.equals(connectedDevice)) {
+                    setSinkPriority(device, BluetoothA2dp.PRIORITY_ON);
+                }
+            }
+            mAdjustedPriority = true;
+        }
+    }
+
     private synchronized Set<BluetoothDevice> lookupSinksMatchingStates(int[] states) {
         Set<BluetoothDevice> sinks = new HashSet<BluetoothDevice>();
         if (mAudioDevices.isEmpty()) {
@@ -554,6 +566,7 @@
         if (!result) {
             if (deviceObjectPath != null) {
                 String address = mBluetoothService.getAddressFromObjectPath(deviceObjectPath);
+                if (address == null) return;
                 BluetoothDevice device = mAdapter.getRemoteDevice(address);
                 int state = getSinkState(device);
                 handleSinkStateChange(device, state, BluetoothA2dp.STATE_DISCONNECTED);
diff --git a/core/java/android/server/BluetoothEventLoop.java b/core/java/android/server/BluetoothEventLoop.java
index c0e4600..e1d3f13 100644
--- a/core/java/android/server/BluetoothEventLoop.java
+++ b/core/java/android/server/BluetoothEventLoop.java
@@ -566,6 +566,7 @@
             authorized = a2dp.getSinkPriority(device) > BluetoothA2dp.PRIORITY_OFF;
             if (authorized) {
                 Log.i(TAG, "Allowing incoming A2DP / AVRCP connection from " + address);
+                mBluetoothService.notifyIncomingA2dpConnection(address);
             } else {
                 Log.i(TAG, "Rejecting incoming A2DP / AVRCP connection from " + address);
             }
diff --git a/core/java/android/server/BluetoothService.java b/core/java/android/server/BluetoothService.java
index c0affd3..31e5a7b 100644
--- a/core/java/android/server/BluetoothService.java
+++ b/core/java/android/server/BluetoothService.java
@@ -28,6 +28,8 @@
 import android.bluetooth.BluetoothClass;
 import android.bluetooth.BluetoothDevice;
 import android.bluetooth.BluetoothHeadset;
+import android.bluetooth.BluetoothDeviceProfileState;
+import android.bluetooth.BluetoothProfileState;
 import android.bluetooth.BluetoothSocket;
 import android.bluetooth.BluetoothUuid;
 import android.bluetooth.IBluetooth;
@@ -112,7 +114,7 @@
             BluetoothUuid.HSP,
             BluetoothUuid.ObexObjectPush };
 
-
+    // TODO(): Optimize all these string handling
     private final Map<String, String> mAdapterProperties;
     private final HashMap<String, Map<String, String>> mDeviceProperties;
 
@@ -122,6 +124,11 @@
 
     private final HashMap<Integer, Integer> mServiceRecordToPid;
 
+    private final HashMap<String, BluetoothDeviceProfileState> mDeviceProfileState;
+    private final BluetoothProfileState mA2dpProfileState;
+    private final BluetoothProfileState mHfpProfileState;
+
+    private BluetoothA2dpService mA2dpService;
     private static String mDockAddress;
     private String mDockPin;
 
@@ -179,6 +186,12 @@
         mUuidIntentTracker = new ArrayList<String>();
         mUuidCallbackTracker = new HashMap<RemoteService, IBluetoothCallback>();
         mServiceRecordToPid = new HashMap<Integer, Integer>();
+        mDeviceProfileState = new HashMap<String, BluetoothDeviceProfileState>();
+        mA2dpProfileState = new BluetoothProfileState(mContext, BluetoothProfileState.A2DP);
+        mHfpProfileState = new BluetoothProfileState(mContext, BluetoothProfileState.HFP);
+
+        mHfpProfileState.start();
+        mA2dpProfileState.start();
 
         IntentFilter filter = new IntentFilter();
         registerForAirplaneMode(filter);
@@ -187,7 +200,7 @@
         mContext.registerReceiver(mReceiver, filter);
     }
 
-     public static synchronized String readDockBluetoothAddress() {
+    public static synchronized String readDockBluetoothAddress() {
         if (mDockAddress != null) return mDockAddress;
 
         BufferedInputStream file = null;
@@ -534,6 +547,7 @@
                 mIsDiscovering = false;
                 mBondState.readAutoPairingData();
                 mBondState.loadBondState();
+                initProfileState();
                 mHandler.sendMessageDelayed(
                         mHandler.obtainMessage(MESSAGE_REGISTER_SDP_RECORDS, 1, -1), 3000);
 
@@ -648,6 +662,12 @@
                 }
             }
 
+            if (state == BluetoothDevice.BOND_BONDED) {
+                addProfileState(address);
+            } else if (state == BluetoothDevice.BOND_NONE) {
+                removeProfileState(address);
+            }
+
             if (DBG) log(address + " bond state " + oldState + " -> " + state + " (" +
                          reason + ")");
             Intent intent = new Intent(BluetoothDevice.ACTION_BOND_STATE_CHANGED);
@@ -1167,6 +1187,16 @@
         if (!BluetoothAdapter.checkBluetoothAddress(address)) {
             return false;
         }
+        BluetoothDeviceProfileState state = mDeviceProfileState.get(address);
+        if (state != null) {
+            state.sendMessage(BluetoothDeviceProfileState.UNPAIR);
+            return true;
+        } else {
+            return false;
+        }
+    }
+
+    public synchronized boolean removeBondInternal(String address) {
         return removeDeviceNative(getObjectPathFromAddress(address));
     }
 
@@ -1836,7 +1866,7 @@
         // Rather not do this from here, but no-where else and I need this
         // dump
         pw.println("\n--Headset Service--");
-        switch (headset.getState()) {
+        switch (headset.getState(headset.getCurrentHeadset())) {
         case BluetoothHeadset.STATE_DISCONNECTED:
             pw.println("getState() = STATE_DISCONNECTED");
             break;
@@ -1919,6 +1949,116 @@
         if (!result) log("Set Link Timeout to:" + num_slots + " slots failed");
     }
 
+    public boolean connectHeadset(String address) {
+        BluetoothDeviceProfileState state = mDeviceProfileState.get(address);
+        if (state != null) {
+            Message msg = new Message();
+            msg.arg1 = BluetoothDeviceProfileState.CONNECT_HFP_OUTGOING;
+            msg.obj = state;
+            mHfpProfileState.sendMessage(msg);
+            return true;
+        }
+        return false;
+    }
+
+    public boolean disconnectHeadset(String address) {
+        BluetoothDeviceProfileState state = mDeviceProfileState.get(address);
+        if (state != null) {
+            Message msg = new Message();
+            msg.arg1 = BluetoothDeviceProfileState.DISCONNECT_HFP_OUTGOING;
+            msg.obj = state;
+            mHfpProfileState.sendMessage(msg);
+            return true;
+        }
+        return false;
+    }
+
+    public boolean connectSink(String address) {
+        BluetoothDeviceProfileState state = mDeviceProfileState.get(address);
+        if (state != null) {
+            Message msg = new Message();
+            msg.arg1 = BluetoothDeviceProfileState.CONNECT_A2DP_OUTGOING;
+            msg.obj = state;
+            mA2dpProfileState.sendMessage(msg);
+            return true;
+        }
+        return false;
+    }
+
+    public boolean disconnectSink(String address) {
+        BluetoothDeviceProfileState state = mDeviceProfileState.get(address);
+        if (state != null) {
+            Message msg = new Message();
+            msg.arg1 = BluetoothDeviceProfileState.DISCONNECT_A2DP_OUTGOING;
+            msg.obj = state;
+            mA2dpProfileState.sendMessage(msg);
+            return true;
+        }
+        return false;
+    }
+
+    private BluetoothDeviceProfileState addProfileState(String address) {
+        BluetoothDeviceProfileState state = mDeviceProfileState.get(address);
+        if (state != null) return state;
+
+        state = new BluetoothDeviceProfileState(mContext, address, this, mA2dpService);
+        mDeviceProfileState.put(address, state);
+        state.start();
+        return state;
+    }
+
+    private void removeProfileState(String address) {
+        mDeviceProfileState.remove(address);
+    }
+
+    private void initProfileState() {
+        String []bonds = null;
+        String val = getPropertyInternal("Devices");
+        if (val != null) {
+            bonds = val.split(",");
+        }
+        if (bonds == null) {
+            return;
+        }
+
+        for (String path : bonds) {
+            String address = getAddressFromObjectPath(path);
+            BluetoothDeviceProfileState state = addProfileState(address);
+            // Allow 8 secs for SDP records to get registered.
+            Message msg = new Message();
+            msg.what = BluetoothDeviceProfileState.AUTO_CONNECT_PROFILES;
+            state.sendMessageDelayed(msg, 8000);
+        }
+    }
+
+    public boolean notifyIncomingConnection(String address) {
+        BluetoothDeviceProfileState state =
+             mDeviceProfileState.get(address);
+        if (state != null) {
+            Message msg = new Message();
+            msg.what = BluetoothDeviceProfileState.CONNECT_HFP_INCOMING;
+            state.sendMessage(msg);
+            return true;
+        }
+        return false;
+    }
+
+    /*package*/ boolean notifyIncomingA2dpConnection(String address) {
+       BluetoothDeviceProfileState state =
+            mDeviceProfileState.get(address);
+       if (state != null) {
+           Message msg = new Message();
+           msg.what = BluetoothDeviceProfileState.CONNECT_A2DP_INCOMING;
+           state.sendMessage(msg);
+           return true;
+       }
+       return false;
+    }
+
+    /*package*/ void setA2dpService(BluetoothA2dpService a2dpService) {
+        mA2dpService = a2dpService;
+    }
+
     private static void log(String msg) {
         Log.d(TAG, msg);
     }
diff --git a/core/java/android/service/wallpaper/WallpaperService.java b/core/java/android/service/wallpaper/WallpaperService.java
index 3d1d7d6..57a72bf 100644
--- a/core/java/android/service/wallpaper/WallpaperService.java
+++ b/core/java/android/service/wallpaper/WallpaperService.java
@@ -18,6 +18,7 @@
 
 import com.android.internal.os.HandlerCaller;
 import com.android.internal.view.BaseIWindow;
+import com.android.internal.view.BaseInputHandler;
 import com.android.internal.view.BaseSurfaceHolder;
 
 import android.annotation.SdkConstant;
@@ -39,6 +40,11 @@
 import android.util.LogPrinter;
 import android.view.Gravity;
 import android.view.IWindowSession;
+import android.view.InputChannel;
+import android.view.InputDevice;
+import android.view.InputHandler;
+import android.view.InputQueue;
+import android.view.KeyEvent;
 import android.view.MotionEvent;
 import android.view.SurfaceHolder;
 import android.view.View;
@@ -46,6 +52,7 @@
 import android.view.ViewRoot;
 import android.view.WindowManager;
 import android.view.WindowManagerImpl;
+import android.view.WindowManagerPolicy;
 
 import java.util.ArrayList;
 
@@ -146,6 +153,7 @@
         final WindowManager.LayoutParams mLayout
                 = new WindowManager.LayoutParams();
         IWindowSession mSession;
+        InputChannel mInputChannel;
 
         final Object mLock = new Object();
         boolean mOffsetMessageEnqueued;
@@ -205,27 +213,21 @@
             
         };
         
-        final BaseIWindow mWindow = new BaseIWindow() {
+        final InputHandler mInputHandler = new BaseInputHandler() {
             @Override
-            public boolean onDispatchPointer(MotionEvent event, long eventTime,
-                    boolean callWhenDone) {
-                synchronized (mLock) {
-                    if (event.getAction() == MotionEvent.ACTION_MOVE) {
-                        if (mPendingMove != null) {
-                            mCaller.removeMessages(MSG_TOUCH_EVENT, mPendingMove);
-                            mPendingMove.recycle();
-                        }
-                        mPendingMove = event;
-                    } else {
-                        mPendingMove = null;
+            public void handleMotion(MotionEvent event, Runnable finishedCallback) {
+                try {
+                    int source = event.getSource();
+                    if ((source & InputDevice.SOURCE_CLASS_POINTER) != 0) {
+                        dispatchPointer(event);
                     }
-                    Message msg = mCaller.obtainMessageO(MSG_TOUCH_EVENT,
-                            event);
-                    mCaller.sendMessage(msg);
+                } finally {
+                    finishedCallback.run();
                 }
-                return false;
             }
-            
+        };
+        
+        final BaseIWindow mWindow = new BaseIWindow() {
             @Override
             public void resized(int w, int h, Rect coveredInsets,
                     Rect visibleInsets, boolean reportDraw, Configuration newConfig) {
@@ -338,7 +340,7 @@
                     ? (mWindowFlags&~WindowManager.LayoutParams.FLAG_NOT_TOUCHABLE)
                     : (mWindowFlags|WindowManager.LayoutParams.FLAG_NOT_TOUCHABLE);
             if (mCreated) {
-                updateSurface(false, false);
+                updateSurface(false, false, false);
             }
         }
         
@@ -423,6 +425,13 @@
         }
 
         /**
+         * Convenience for {@link SurfaceHolder.Callback2#surfaceRedrawNeeded
+         * SurfaceHolder.Callback.surfaceRedrawNeeded()}.
+         */
+        public void onSurfaceRedrawNeeded(SurfaceHolder holder) {
+        }
+
+        /**
          * Convenience for {@link SurfaceHolder.Callback#surfaceCreated
          * SurfaceHolder.Callback.surfaceCreated()}.
          */
@@ -435,8 +444,24 @@
          */
         public void onSurfaceDestroyed(SurfaceHolder holder) {
         }
+        
+        private void dispatchPointer(MotionEvent event) {
+            synchronized (mLock) {
+                if (event.getAction() == MotionEvent.ACTION_MOVE) {
+                    if (mPendingMove != null) {
+                        mCaller.removeMessages(MSG_TOUCH_EVENT, mPendingMove);
+                        mPendingMove.recycle();
+                    }
+                    mPendingMove = event;
+                } else {
+                    mPendingMove = null;
+                }
+                Message msg = mCaller.obtainMessageO(MSG_TOUCH_EVENT, event);
+                mCaller.sendMessage(msg);
+            }
+        }
 
-        void updateSurface(boolean forceRelayout, boolean forceReport) {
+        void updateSurface(boolean forceRelayout, boolean forceReport, boolean redrawNeeded) {
             if (mDestroyed) {
                 Log.w(TAG, "Ignoring updateSurface: destroyed");
             }
@@ -453,7 +478,7 @@
             final boolean typeChanged = mType != mSurfaceHolder.getRequestedType();
             final boolean flagsChanged = mCurWindowFlags != mWindowFlags;
             if (forceRelayout || creating || surfaceCreating || formatChanged || sizeChanged
-                    || typeChanged || flagsChanged) {
+                    || typeChanged || flagsChanged || redrawNeeded) {
 
                 if (DEBUG) Log.v(TAG, "Changes: creating=" + creating
                         + " format=" + formatChanged + " size=" + sizeChanged);
@@ -487,8 +512,13 @@
                         mLayout.setTitle(WallpaperService.this.getClass().getName());
                         mLayout.windowAnimations =
                                 com.android.internal.R.style.Animation_Wallpaper;
-                        mSession.add(mWindow, mLayout, View.VISIBLE, mContentInsets);
+                        mInputChannel = new InputChannel();
+                        mSession.add(mWindow, mLayout, View.VISIBLE, mContentInsets,
+                                mInputChannel);
                         mCreated = true;
+
+                        InputQueue.registerInputChannel(mInputChannel, mInputHandler,
+                                Looper.myQueue());
                     }
                     
                     mSurfaceHolder.mSurfaceLock.lock();
@@ -522,26 +552,24 @@
                     }
                     
                     try {
-                        SurfaceHolder.Callback callbacks[] = null;
-                        synchronized (mSurfaceHolder.mCallbacks) {
-                            final int N = mSurfaceHolder.mCallbacks.size();
-                            if (N > 0) {
-                                callbacks = new SurfaceHolder.Callback[N];
-                                mSurfaceHolder.mCallbacks.toArray(callbacks);
-                            }
-                        }
+                        mSurfaceHolder.ungetCallbacks();
 
                         if (surfaceCreating) {
                             mIsCreating = true;
                             if (DEBUG) Log.v(TAG, "onSurfaceCreated("
                                     + mSurfaceHolder + "): " + this);
                             onSurfaceCreated(mSurfaceHolder);
+                            SurfaceHolder.Callback callbacks[] = mSurfaceHolder.getCallbacks();
                             if (callbacks != null) {
                                 for (SurfaceHolder.Callback c : callbacks) {
                                     c.surfaceCreated(mSurfaceHolder);
                                 }
                             }
                         }
+
+                        redrawNeeded |= creating
+                                || (relayoutResult&WindowManagerImpl.RELAYOUT_FIRST_TIME) != 0;
+
                         if (forceReport || creating || surfaceCreating
                                 || formatChanged || sizeChanged) {
                             if (DEBUG) {
@@ -557,6 +585,7 @@
                                     + "): " + this);
                             onSurfaceChanged(mSurfaceHolder, mFormat,
                                     mCurWidth, mCurHeight);
+                            SurfaceHolder.Callback callbacks[] = mSurfaceHolder.getCallbacks();
                             if (callbacks != null) {
                                 for (SurfaceHolder.Callback c : callbacks) {
                                     c.surfaceChanged(mSurfaceHolder, mFormat,
@@ -564,10 +593,24 @@
                                 }
                             }
                         }
+
+                        if (redrawNeeded) {
+                            onSurfaceRedrawNeeded(mSurfaceHolder);
+                            SurfaceHolder.Callback callbacks[] = mSurfaceHolder.getCallbacks();
+                            if (callbacks != null) {
+                                for (SurfaceHolder.Callback c : callbacks) {
+                                    if (c instanceof SurfaceHolder.Callback2) {
+                                        ((SurfaceHolder.Callback2)c).surfaceRedrawNeeded(
+                                                mSurfaceHolder);
+                                    }
+                                }
+                            }
+                        }
+
                     } finally {
                         mIsCreating = false;
                         mSurfaceCreated = true;
-                        if (creating || (relayoutResult&WindowManagerImpl.RELAYOUT_FIRST_TIME) != 0) {
+                        if (redrawNeeded) {
                             mSession.finishDrawing(mWindow);
                         }
                     }
@@ -592,6 +635,7 @@
             mSurfaceHolder.setSizeFromLayout();
             mInitializing = true;
             mSession = ViewRoot.getWindowSession(getMainLooper());
+            
             mWindow.setSession(mSession);
             
             IntentFilter filter = new IntentFilter();
@@ -603,7 +647,7 @@
             onCreate(mSurfaceHolder);
             
             mInitializing = false;
-            updateSurface(false, false);
+            updateSurface(false, false, false);
         }
         
         void doDesiredSizeChanged(int desiredWidth, int desiredHeight) {
@@ -632,7 +676,7 @@
                         // If becoming visible, in preview mode the surface
                         // may have been destroyed so now we need to make
                         // sure it is re-created.
-                        updateSurface(false, false);
+                        updateSurface(false, false, false);
                     }
                     onVisibilityChanged(visible);
                 }
@@ -698,14 +742,12 @@
         void reportSurfaceDestroyed() {
             if (mSurfaceCreated) {
                 mSurfaceCreated = false;
-                SurfaceHolder.Callback callbacks[];
-                synchronized (mSurfaceHolder.mCallbacks) {
-                    callbacks = new SurfaceHolder.Callback[
-                            mSurfaceHolder.mCallbacks.size()];
-                    mSurfaceHolder.mCallbacks.toArray(callbacks);
-                }
-                for (SurfaceHolder.Callback c : callbacks) {
-                    c.surfaceDestroyed(mSurfaceHolder);
+                mSurfaceHolder.ungetCallbacks();
+                SurfaceHolder.Callback callbacks[] = mSurfaceHolder.getCallbacks();
+                if (callbacks != null) {
+                    for (SurfaceHolder.Callback c : callbacks) {
+                        c.surfaceDestroyed(mSurfaceHolder);
+                    }
                 }
                 if (DEBUG) Log.v(TAG, "onSurfaceDestroyed("
                         + mSurfaceHolder + "): " + this);
@@ -737,11 +779,23 @@
                 try {
                     if (DEBUG) Log.v(TAG, "Removing window and destroying surface "
                             + mSurfaceHolder.getSurface() + " of: " + this);
+                    
+                    if (mInputChannel != null) {
+                        InputQueue.unregisterInputChannel(mInputChannel);
+                    }
+                    
                     mSession.remove(mWindow);
                 } catch (RemoteException e) {
                 }
                 mSurfaceHolder.mSurface.release();
                 mCreated = false;
+                
+                // Dispose the input channel after removing the window so the Window Manager
+                // doesn't interpret the input channel being closed as an abnormal termination.
+                if (mInputChannel != null) {
+                    mInputChannel.dispose();
+                    mInputChannel = null;
+                }
             }
         }
     }
@@ -793,7 +847,7 @@
 
         public void dispatchPointer(MotionEvent event) {
             if (mEngine != null) {
-                mEngine.mWindow.onDispatchPointer(event, event.getEventTime(), false);
+                mEngine.dispatchPointer(event);
             }
         }
         
@@ -827,7 +881,7 @@
                     return;
                 }
                 case MSG_UPDATE_SURFACE:
-                    mEngine.updateSurface(true, false);
+                    mEngine.updateSurface(true, false, false);
                     break;
                 case MSG_VISIBILITY_CHANGED:
                     if (DEBUG) Log.v(TAG, "Visibility change in " + mEngine
@@ -843,14 +897,8 @@
                 } break;
                 case MSG_WINDOW_RESIZED: {
                     final boolean reportDraw = message.arg1 != 0;
-                    mEngine.updateSurface(true, false);
+                    mEngine.updateSurface(true, false, reportDraw);
                     mEngine.doOffsetsChanged();
-                    if (reportDraw) {
-                        try {
-                            mEngine.mSession.finishDrawing(mEngine.mWindow);
-                        } catch (RemoteException e) {
-                        }
-                    }
                 } break;
                 case MSG_TOUCH_EVENT: {
                     MotionEvent ev = (MotionEvent)message.obj;
diff --git a/core/java/android/text/util/Rfc822Tokenizer.java b/core/java/android/text/util/Rfc822Tokenizer.java
index 952d833..69cf93c 100644
--- a/core/java/android/text/util/Rfc822Tokenizer.java
+++ b/core/java/android/text/util/Rfc822Tokenizer.java
@@ -84,8 +84,10 @@
                     if (c == '"') {
                         i++;
                         break;
-                    } else if (c == '\\' && i + 1 < cursor) {
-                        name.append(text.charAt(i + 1));
+                    } else if (c == '\\') {
+                        if (i + 1 < cursor) {
+                            name.append(text.charAt(i + 1));
+                        }
                         i += 2;
                     } else {
                         name.append(c);
@@ -110,8 +112,10 @@
                         comment.append(c);
                         level++;
                         i++;
-                    } else if (c == '\\' && i + 1 < cursor) {
-                        comment.append(text.charAt(i + 1));
+                    } else if (c == '\\') {
+                        if (i + 1 < cursor) {
+                            comment.append(text.charAt(i + 1));
+                        }
                         i += 2;
                     } else {
                         comment.append(c);
diff --git a/core/java/android/util/DisplayMetrics.java b/core/java/android/util/DisplayMetrics.java
index 2628eb4..76d8106 100644
--- a/core/java/android/util/DisplayMetrics.java
+++ b/core/java/android/util/DisplayMetrics.java
@@ -135,6 +135,7 @@
             int screenLayout) {
         boolean expandable = compatibilityInfo.isConfiguredExpandable();
         boolean largeScreens = compatibilityInfo.isConfiguredLargeScreens();
+        boolean xlargeScreens = compatibilityInfo.isConfiguredXLargeScreens();
         
         // Note: this assume that configuration is updated before calling
         // updateMetrics method.
@@ -157,8 +158,18 @@
                 compatibilityInfo.setLargeScreens(false);
             }
         }
+        if (!xlargeScreens) {
+            if ((screenLayout&Configuration.SCREENLAYOUT_SIZE_MASK)
+                    != Configuration.SCREENLAYOUT_SIZE_XLARGE) {
+                xlargeScreens = true;
+                // the current screen size is not large.
+                compatibilityInfo.setXLargeScreens(true);
+            } else {
+                compatibilityInfo.setXLargeScreens(false);
+            }
+        }
         
-        if (!expandable || !largeScreens) {
+        if (!expandable || (!largeScreens && !xlargeScreens)) {
             // This is a larger screen device and the app is not 
             // compatible with large screens, so diddle it.
             
diff --git a/core/java/android/util/Log.java b/core/java/android/util/Log.java
index e111669..d577b74 100644
--- a/core/java/android/util/Log.java
+++ b/core/java/android/util/Log.java
@@ -88,6 +88,21 @@
         TerribleFailure(String msg, Throwable cause) { super(msg, cause); }
     }
 
+    /**
+     * Interface to handle terrible failures from {@link #wtf()}.
+     *
+     * @hide
+     */
+    public interface TerribleFailureHandler {
+        void onTerribleFailure(String tag, TerribleFailure what);
+    }
+
+    private static TerribleFailureHandler sWtfHandler = new TerribleFailureHandler() {
+            public void onTerribleFailure(String tag, TerribleFailure what) {
+                RuntimeInit.wtf(tag, what);
+            }
+        };
+
     private Log() {
     }
 
@@ -257,13 +272,29 @@
      * @param tr An exception to log.  May be null.
      */
     public static int wtf(String tag, String msg, Throwable tr) {
-        tr = new TerribleFailure(msg, tr);
+        TerribleFailure what = new TerribleFailure(msg, tr);
         int bytes = println_native(LOG_ID_MAIN, ASSERT, tag, getStackTraceString(tr));
-        RuntimeInit.wtf(tag, tr);
+        sWtfHandler.onTerribleFailure(tag, what);
         return bytes;
     }
 
     /**
+     * Sets the terrible failure handler, for testing.
+     *
+     * @return the old handler
+     *
+     * @hide
+     */
+    public static TerribleFailureHandler setWtfHandler(TerribleFailureHandler handler) {
+        if (handler == null) {
+            throw new NullPointerException("handler == null");
+        }
+        TerribleFailureHandler oldHandler = sWtfHandler;
+        sWtfHandler = handler;
+        return oldHandler;
+    }
+
+    /**
      * Handy function to get a loggable stack trace from a Throwable
      * @param tr An exception to log
      */
diff --git a/core/java/android/view/IWindow.aidl b/core/java/android/view/IWindow.aidl
index 3b09808..921018a 100644
--- a/core/java/android/view/IWindow.aidl
+++ b/core/java/android/view/IWindow.aidl
@@ -46,9 +46,6 @@
 
     void resized(int w, int h, in Rect coveredInsets, in Rect visibleInsets,
             boolean reportDraw, in Configuration newConfig);
-    void dispatchKey(in KeyEvent event);
-    void dispatchPointer(in MotionEvent event, long eventTime, boolean callWhenDone);
-    void dispatchTrackball(in MotionEvent event, long eventTime, boolean callWhenDone);
     void dispatchAppVisibility(boolean visible);
     void dispatchGetNewSurface();
 
diff --git a/core/java/android/view/IWindowSession.aidl b/core/java/android/view/IWindowSession.aidl
index 01f07d6..7f10b76 100644
--- a/core/java/android/view/IWindowSession.aidl
+++ b/core/java/android/view/IWindowSession.aidl
@@ -21,6 +21,7 @@
 import android.graphics.Rect;
 import android.graphics.Region;
 import android.os.Bundle;
+import android.view.InputChannel;
 import android.view.IWindow;
 import android.view.MotionEvent;
 import android.view.WindowManager;
@@ -33,6 +34,9 @@
  */
 interface IWindowSession {
     int add(IWindow window, in WindowManager.LayoutParams attrs,
+            in int viewVisibility, out Rect outContentInsets,
+            out InputChannel outInputChannel);
+    int addWithoutInputChannel(IWindow window, in WindowManager.LayoutParams attrs,
             in int viewVisibility, out Rect outContentInsets);
     void remove(IWindow window);
     
@@ -105,10 +109,6 @@
     void getDisplayFrame(IWindow window, out Rect outDisplayFrame);
     
     void finishDrawing(IWindow window);
-
-    void finishKey(IWindow window);
-    MotionEvent getPendingPointerMove(IWindow window);
-    MotionEvent getPendingTrackballMove(IWindow window);
     
     void setInTouchMode(boolean showFocus);
     boolean getInTouchMode();
diff --git a/core/java/android/view/InputChannel.aidl b/core/java/android/view/InputChannel.aidl
new file mode 100644
index 0000000..74c0aa4
--- /dev/null
+++ b/core/java/android/view/InputChannel.aidl
@@ -0,0 +1,20 @@
+/* //device/java/android/android/view/InputChannel.aidl
+**
+** Copyright 2010, The Android Open Source Project
+**
+** Licensed under the Apache License, Version 2.0 (the "License"); 
+** you may not use this file except in compliance with the License. 
+** You may obtain a copy of the License at 
+**
+**     http://www.apache.org/licenses/LICENSE-2.0 
+**
+** Unless required by applicable law or agreed to in writing, software 
+** distributed under the License is distributed on an "AS IS" BASIS, 
+** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 
+** See the License for the specific language governing permissions and 
+** limitations under the License.
+*/
+
+package android.view;
+
+parcelable InputChannel;
diff --git a/core/java/android/view/InputChannel.java b/core/java/android/view/InputChannel.java
new file mode 100644
index 0000000..f2cad2f
--- /dev/null
+++ b/core/java/android/view/InputChannel.java
@@ -0,0 +1,157 @@
+/*
+ * Copyright (C) 2010 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package android.view;
+
+import android.os.Parcel;
+import android.os.Parcelable;
+import android.util.Slog;
+
+/**
+ * An input channel specifies the file descriptors used to send input events to
+ * a window in another process.  It is Parcelable so that it can be sent
+ * to the process that is to receive events.  Only one thread should be reading
+ * from an InputChannel at a time.
+ * @hide
+ */
+public final class InputChannel implements Parcelable {
+    private static final String TAG = "InputChannel";
+    
+    private static final boolean DEBUG = false;
+    
+    public static final Parcelable.Creator<InputChannel> CREATOR
+            = new Parcelable.Creator<InputChannel>() {
+        public InputChannel createFromParcel(Parcel source) {
+            InputChannel result = new InputChannel();
+            result.readFromParcel(source);
+            return result;
+        }
+        
+        public InputChannel[] newArray(int size) {
+            return new InputChannel[size];
+        }
+    };
+    
+    @SuppressWarnings("unused")
+    private int mPtr; // used by native code
+    
+    private boolean mDisposeAfterWriteToParcel;
+    
+    private static native InputChannel[] nativeOpenInputChannelPair(String name);
+    
+    private native void nativeDispose(boolean finalized);
+    private native void nativeTransferTo(InputChannel other);
+    private native void nativeReadFromParcel(Parcel parcel);
+    private native void nativeWriteToParcel(Parcel parcel);
+    
+    private native String nativeGetName();
+
+    /**
+     * Creates an uninitialized input channel.
+     * It can be initialized by reading from a Parcel or by transferring the state of
+     * another input channel into this one.
+     */
+    public InputChannel() {
+    }
+    
+    @Override
+    protected void finalize() throws Throwable {
+        try {
+            nativeDispose(true);
+        } finally {
+            super.finalize();
+        }
+    }
+    
+    /**
+     * Creates a new input channel pair.  One channel should be provided to the input
+     * dispatcher and the other to the application's input queue.
+     * @param name The descriptive (non-unique) name of the channel pair.
+     * @return A pair of input channels.  They are symmetric and indistinguishable.
+     */
+    public static InputChannel[] openInputChannelPair(String name) {
+        if (name == null) {
+            throw new IllegalArgumentException("name must not be null");
+        }
+
+        if (DEBUG) {
+            Slog.d(TAG, "Opening input channel pair '" + name + "'");
+        }
+        return nativeOpenInputChannelPair(name);
+    }
+    
+    /**
+     * Gets the name of the input channel.
+     * @return The input channel name.
+     */
+    public String getName() {
+        String name = nativeGetName();
+        return name != null ? name : "uninitialized";
+    }
+
+    /**
+     * Disposes the input channel.
+     * Explicitly releases the reference this object is holding on the input channel.
+     * When all references are released, the input channel will be closed.
+     */
+    public void dispose() {
+        nativeDispose(false);
+    }
+    
+    /**
+     * Transfers ownership of the internal state of the input channel to another
+     * instance and invalidates this instance.  This is used to pass an input channel
+     * as an out parameter in a binder call.
+     * @param other The other input channel instance.
+     */
+    public void transferToBinderOutParameter(InputChannel outParameter) {
+        if (outParameter == null) {
+            throw new IllegalArgumentException("outParameter must not be null");
+        }
+        
+        nativeTransferTo(outParameter);
+        outParameter.mDisposeAfterWriteToParcel = true;
+    }
+
+    public int describeContents() {
+        return Parcelable.CONTENTS_FILE_DESCRIPTOR;
+    }
+    
+    public void readFromParcel(Parcel in) {
+        if (in == null) {
+            throw new IllegalArgumentException("in must not be null");
+        }
+        
+        nativeReadFromParcel(in);
+    }
+    
+    public void writeToParcel(Parcel out, int flags) {
+        if (out == null) {
+            throw new IllegalArgumentException("out must not be null");
+        }
+        
+        nativeWriteToParcel(out);
+        
+        if (mDisposeAfterWriteToParcel) {
+            dispose();
+        }
+    }
+    
+    @Override
+    public String toString() {
+        return getName();
+    }
+}
diff --git a/core/java/android/view/InputDevice.java b/core/java/android/view/InputDevice.java
new file mode 100755
index 0000000..21c2976
--- /dev/null
+++ b/core/java/android/view/InputDevice.java
@@ -0,0 +1,351 @@
+/*
+ * Copyright (C) 2010 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package android.view;
+
+/**
+ * Describes the capabilities of a particular input device.
+ * <p>
+ * Each input device may support multiple classes of input.  For example, a multifunction
+ * keyboard may compose the capabilities of a standard keyboard together with a track pad mouse
+ * or other pointing device.
+ * </p><p>
+ * Some input devices present multiple distinguishable sources of input.  For example, a
+ * game pad may have two analog joysticks, a directional pad and a full complement of buttons.
+ * Applications can query the framework about the characteristics of each distinct source.
+ * </p><p>
+ * As a further wrinkle, different kinds of input sources uses different coordinate systems
+ * to describe motion events.  Refer to the comments on the input source constants for
+ * the appropriate interpretation.
+ */
+public final class InputDevice {
+    private int mId;
+    private String mName;
+    private int mSources;
+    
+    /**
+     * A mask for input source classes.
+     * 
+     * Each distinct input source constant has one or more input source class bits set to
+     * specify the desired interpretation for its input events.
+     */
+    public static final int SOURCE_CLASS_MASK = 0x000000ff;
+    
+    /**
+     * The input source has buttons or keys.
+     * Examples: {@link #SOURCE_KEYBOARD}, {@link #SOURCE_GAMEPAD}, {@link #SOURCE_DPAD}.
+     * 
+     * A {@link KeyEvent} should be interpreted as a button or key press.
+     * 
+     * Use {@link #hasKey} to query whether the device supports a particular button or key.
+     */
+    public static final int SOURCE_CLASS_BUTTON = 0x00000001;
+    
+    /**
+     * The input source is a pointing device associated with a display.
+     * Examples: {@link #SOURCE_TOUCHSCREEN}, {@link #SOURCE_MOUSE}.
+     * 
+     * A {@link MotionEvent} should be interpreted as absolute coordinates in
+     * display units according to the {@link View} hierarchy.  Pointer down/up indicated when
+     * the finger touches the display or when the selection button is pressed/released.
+     * 
+     * Use {@link #getMotionRange} to query the range of the pointing device.  Some devices permit
+     * touches outside the display area so the effective range may be somewhat smaller or larger
+     * than the actual display size.
+     */
+    public static final int SOURCE_CLASS_POINTER = 0x00000002;
+    
+    /**
+     * The input source is a trackball navigation device.
+     * Examples: {@link #SOURCE_TRACKBALL}.
+     * 
+     * A {@link MotionEvent} should be interpreted as relative movements in device-specific
+     * units used for navigation purposes.  Pointer down/up indicates when the selection button
+     * is pressed/released.
+     * 
+     * Use {@link #getMotionRange} to query the range of motion.
+     */
+    public static final int SOURCE_CLASS_TRACKBALL = 0x00000004;
+    
+    /**
+     * The input source is an absolute positioning device not associated with a display
+     * (unlike {@link #SOURCE_CLASS_POINTER}).
+     * 
+     * A {@link MotionEvent} should be interpreted as absolute coordinates in
+     * device-specific surface units.
+     * 
+     * Use {@link #getMotionRange} to query the range of positions.
+     */
+    public static final int SOURCE_CLASS_POSITION = 0x00000008;
+    
+    /**
+     * The input source is a joystick.
+     * 
+     * A {@link KeyEvent} should be interpreted as a joystick button press.
+     * 
+     * A {@link MotionEvent} should be interpreted in absolute coordinates as a joystick
+     * position in normalized device-specific units nominally between -1.0 and 1.0.
+     * 
+     * Use {@link #getMotionRange} to query the range and precision of motion.
+     */
+    public static final int SOURCE_CLASS_JOYSTICK = 0x00000010;
+    
+    /**
+     * The input source is unknown.
+     */
+    public static final int SOURCE_UNKNOWN = 0x00000000;
+    
+    /**
+     * The input source is a keyboard.
+     * 
+     * @see #SOURCE_CLASS_BUTTON
+     */
+    public static final int SOURCE_KEYBOARD = 0x00000100 | SOURCE_CLASS_BUTTON;
+    
+    /**
+     * The input source is a DPad.
+     * 
+     * @see #SOURCE_CLASS_BUTTON
+     */
+    public static final int SOURCE_DPAD = 0x00000200 | SOURCE_CLASS_BUTTON;
+    
+    /**
+     * The input source is a gamepad.
+     * 
+     * @see #SOURCE_CLASS_BUTTON
+     */
+    public static final int SOURCE_GAMEPAD = 0x00000400 | SOURCE_CLASS_BUTTON;
+    
+    /**
+     * The input source is a touch screen pointing device.
+     * 
+     * @see #SOURCE_CLASS_POINTER
+     */
+    public static final int SOURCE_TOUCHSCREEN = 0x00001000 | SOURCE_CLASS_POINTER;
+    
+    /**
+     * The input source is a mouse pointing device.
+     * This code is also used for other mouse-like pointing devices such as trackpads
+     * and trackpoints.
+     * 
+     * @see #SOURCE_CLASS_POINTER
+     */
+    public static final int SOURCE_MOUSE = 0x00002000 | SOURCE_CLASS_POINTER;
+    
+    /**
+     * The input source is a trackball.
+     * 
+     * @see #SOURCE_CLASS_TRACKBALL
+     */
+    public static final int SOURCE_TRACKBALL = 0x00010000 | SOURCE_CLASS_TRACKBALL;
+    
+    /**
+     * The input source is a touch pad or digitizer tablet that is not
+     * associated with a display (unlike {@link #SOURCE_TOUCHSCREEN}).
+     * 
+     * @see #SOURCE_CLASS_POSITION
+     */
+    public static final int SOURCE_TOUCHPAD = 0x00100000 | SOURCE_CLASS_POSITION;
+
+    /**
+     * The input source is a joystick mounted on the left or is a standalone joystick.
+     * 
+     * @see #SOURCE_CLASS_JOYSTICK
+     */
+    public static final int SOURCE_JOYSTICK_LEFT = 0x01000000 | SOURCE_CLASS_JOYSTICK;
+    
+    /**
+     * The input source is a joystick mounted on the right.
+     * 
+     * @see #SOURCE_CLASS_JOYSTICK
+     */
+    public static final int SOURCE_JOYSTICK_RIGHT = 0x02000000 | SOURCE_CLASS_JOYSTICK;
+
+    /**
+     * Constant for retrieving the range of values for {@link MotionEvent.PointerCoords#x}.
+     * 
+     * @see #getMotionRange
+     */
+    public static final int MOTION_RANGE_X = 0;
+    
+    /**
+     * Constant for retrieving the range of values for {@link MotionEvent.PointerCoords#y}.
+     * 
+     * @see #getMotionRange
+     */
+    public static final int MOTION_RANGE_Y = 1;
+    
+    /**
+     * Constant for retrieving the range of values for {@link MotionEvent.PointerCoords#pressure}.
+     * 
+     * @see #getMotionRange
+     */
+    public static final int MOTION_RANGE_PRESSURE = 2;
+    
+    /**
+     * Constant for retrieving the range of values for {@link MotionEvent.PointerCoords#size}.
+     * 
+     * @see #getMotionRange
+     */
+    public static final int MOTION_RANGE_SIZE = 3;
+    
+    /**
+     * Constant for retrieving the range of values for {@link MotionEvent.PointerCoords#touchMajor}.
+     * 
+     * @see #getMotionRange
+     */
+    public static final int MOTION_RANGE_TOUCH_MAJOR = 4;
+    
+    /**
+     * Constant for retrieving the range of values for {@link MotionEvent.PointerCoords#touchMinor}.
+     * 
+     * @see #getMotionRange
+     */
+    public static final int MOTION_RANGE_TOUCH_MINOR = 5;
+    
+    /**
+     * Constant for retrieving the range of values for {@link MotionEvent.PointerCoords#toolMajor}.
+     * 
+     * @see #getMotionRange
+     */
+    public static final int MOTION_RANGE_TOOL_MAJOR = 6;
+    
+    /**
+     * Constant for retrieving the range of values for {@link MotionEvent.PointerCoords#toolMinor}.
+     * 
+     * @see #getMotionRange
+     */
+    public static final int MOTION_RANGE_TOOL_MINOR = 7;
+    
+    /**
+     * Constant for retrieving the range of values for
+     * {@link MotionEvent.PointerCoords#orientation}.
+     * 
+     * @see #getMotionRange
+     */
+    public static final int MOTION_RANGE_ORIENTATION = 8;
+
+    /**
+     * Gets information about the input device with the specified id.
+     * @param id The device id.
+     * @return The input device or null if not found.
+     */
+    public static InputDevice getDevice(int id) {
+        // TODO
+        return null;
+    }
+    
+    /**
+     * Gets the name of this input device.
+     * @return The input device name.
+     */
+    public String getName() {
+        return mName;
+    }
+    
+    /**
+     * Gets the input sources supported by this input device as a combined bitfield.
+     * @return The supported input sources.
+     */
+    public int getSources() {
+        return mSources;
+    }
+    
+    /**
+     * Gets the key character map associated with this input device.
+     * @return The key character map.
+     */
+    public KeyCharacterMap getKeyCharacterMap() {
+        return KeyCharacterMap.load(mId);
+    }
+    
+    /**
+     * Gets information about the range of values for a particular {@link MotionEvent}
+     * coordinate.
+     * @param range The motion range constant.
+     * @return The range of values, or null if the requested coordinate is not
+     * supported by the device.
+     */
+    public MotionRange getMotionRange(int range) {
+        // TODO
+        return null;
+    }
+    
+    /**
+     * Returns true if the device supports a particular button or key.
+     * @param keyCode The key code.
+     * @return True if the device supports the key.
+     */
+    public boolean hasKey(int keyCode) {
+        // TODO
+        return false;
+    }
+    
+    /**
+     * Provides information about the range of values for a particular {@link MotionEvent}
+     * coordinate.
+     */
+    public static final class MotionRange {
+        /**
+         * Gets the minimum value for the coordinate.
+         * @return The minimum value.
+         */
+        public float getMin() {
+            // TODO
+            return 0;
+        }
+        
+        /**
+         * Gets the maximum value for the coordinate.
+         * @return The minimum value.
+         */
+        public float getMax() {
+            // TODO
+            return 0;
+        }
+        
+        /**
+         * Gets the range of the coordinate (difference between maximum and minimum).
+         * @return The range of values.
+         */
+        public float getRange() {
+            // TODO
+            return 0;
+        }
+        
+        /**
+         * Gets the extent of the center flat position with respect to this coordinate.
+         * For example, a flat value of 8 means that the center position is between -8 and +8.
+         * This value is mainly useful for calibrating joysticks.
+         * @return The extent of the center flat position.
+         */
+        public float getFlat() {
+            // TODO
+            return 0;
+        }
+        
+        /**
+         * Gets the error tolerance for input device measurements with respect to this coordinate.
+         * For example, a value of 2 indicates that the measured value may be up to +/- 2 units
+         * away from the actual value due to noise and device sensitivity limitations.
+         * @return The error tolerance.
+         */
+        public float getFuzz() {
+            // TODO
+            return 0;
+        }
+    }
+}
diff --git a/core/java/android/view/InputEvent.java b/core/java/android/view/InputEvent.java
new file mode 100755
index 0000000..78b73fe
--- /dev/null
+++ b/core/java/android/view/InputEvent.java
@@ -0,0 +1,72 @@
+/*
+ * Copyright (C) 2010 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package android.view;
+
+import android.os.Parcelable;
+
+/**
+ * Common base class for input events.
+ */
+public abstract class InputEvent implements Parcelable {
+    protected int mDeviceId;
+    protected int mSource;
+    
+    /*package*/ InputEvent() {
+    }
+
+    /**
+     * Gets the id for the device that this event came from.  An id of
+     * zero indicates that the event didn't come from a physical device
+     * and maps to the default keymap.  The other numbers are arbitrary and
+     * you shouldn't depend on the values.
+     * 
+     * @return The device id.
+     * @see InputDevice#getDevice
+     */
+    public final int getDeviceId() {
+        return mDeviceId;
+    }
+    
+    /**
+     * Gets the device that this event came from.
+     * 
+     * @return The device, or null if unknown.
+     */
+    public final InputDevice getDevice() {
+        return InputDevice.getDevice(mDeviceId);
+    }
+    
+    /**
+     * Gets the source of the event.
+     * 
+     * @return The event source or {@link InputDevice#SOURCE_UNKNOWN} if unknown.
+     * @see InputDevice#getSourceInfo
+     */
+    public final int getSource() {
+        return mSource;
+    }
+    
+    /**
+     * Modifies the source of the event.
+     * @param source The source.
+     * 
+     * @hide
+     */
+    public final void setSource(int source) {
+        mSource = source;
+    }
+}
diff --git a/core/java/android/view/InputHandler.java b/core/java/android/view/InputHandler.java
new file mode 100644
index 0000000..41a152d
--- /dev/null
+++ b/core/java/android/view/InputHandler.java
@@ -0,0 +1,43 @@
+/*
+ * Copyright (C) 2010 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package android.view;
+
+/**
+ * Handles input messages that arrive on an input channel.
+ * @hide
+ */
+public interface InputHandler {
+    /**
+     * Handle a key event.
+     * It is the responsibility of the callee to ensure that the finished callback is
+     * eventually invoked when the event processing is finished and the input system
+     * can send the next event.
+     * @param event The key event data.
+     * @param finishedCallback The callback to invoke when event processing is finished.
+     */
+    public void handleKey(KeyEvent event, Runnable finishedCallback);
+    
+    /**
+     * Handle a motion event.
+     * It is the responsibility of the callee to ensure that the finished callback is
+     * eventually invoked when the event processing is finished and the input system
+     * can send the next event.
+     * @param event The motion event data.
+     * @param finishedCallback The callback to invoke when event processing is finished.
+     */
+    public void handleMotion(MotionEvent event, Runnable finishedCallback);
+}
diff --git a/core/java/android/view/InputQueue.java b/core/java/android/view/InputQueue.java
new file mode 100644
index 0000000..997246f
--- /dev/null
+++ b/core/java/android/view/InputQueue.java
@@ -0,0 +1,131 @@
+/*
+ * Copyright (C) 2010 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package android.view;
+
+import android.os.MessageQueue;
+import android.util.Slog;
+
+/**
+ * An input queue provides a mechanism for an application to receive incoming
+ * input events.  Currently only usable from native code.
+ */
+public final class InputQueue {
+    private static final String TAG = "InputQueue";
+    
+    private static final boolean DEBUG = false;
+    
+    public static interface Callback {
+        void onInputQueueCreated(InputQueue queue);
+        void onInputQueueDestroyed(InputQueue queue);
+    }
+
+    final InputChannel mChannel;
+    
+    private static Object sLock = new Object();
+    
+    private static native void nativeRegisterInputChannel(InputChannel inputChannel,
+            InputHandler inputHandler, MessageQueue messageQueue);
+    private static native void nativeUnregisterInputChannel(InputChannel inputChannel);
+    private static native void nativeFinished(long finishedToken);
+    
+    /** @hide */
+    public InputQueue(InputChannel channel) {
+        mChannel = channel;
+    }
+    
+    /** @hide */
+    public InputChannel getInputChannel() {
+        return mChannel;
+    }
+    
+    /**
+     * Registers an input channel and handler.
+     * @param inputChannel The input channel to register.
+     * @param inputHandler The input handler to input events send to the target.
+     * @param messageQueue The message queue on whose thread the handler should be invoked.
+     * @hide
+     */
+    public static void registerInputChannel(InputChannel inputChannel, InputHandler inputHandler,
+            MessageQueue messageQueue) {
+        if (inputChannel == null) {
+            throw new IllegalArgumentException("inputChannel must not be null");
+        }
+        if (inputHandler == null) {
+            throw new IllegalArgumentException("inputHandler must not be null");
+        }
+        if (messageQueue == null) {
+            throw new IllegalArgumentException("messageQueue must not be null");
+        }
+        
+        synchronized (sLock) {
+            if (DEBUG) {
+                Slog.d(TAG, "Registering input channel '" + inputChannel + "'");
+            }
+            
+            nativeRegisterInputChannel(inputChannel, inputHandler, messageQueue);
+        }
+    }
+    
+    /**
+     * Unregisters an input channel.
+     * Does nothing if the channel is not currently registered.
+     * @param inputChannel The input channel to unregister.
+     * @hide
+     */
+    public static void unregisterInputChannel(InputChannel inputChannel) {
+        if (inputChannel == null) {
+            throw new IllegalArgumentException("inputChannel must not be null");
+        }
+
+        synchronized (sLock) {
+            if (DEBUG) {
+                Slog.d(TAG, "Unregistering input channel '" + inputChannel + "'");
+            }
+            
+            nativeUnregisterInputChannel(inputChannel);
+        }
+    }
+    
+    @SuppressWarnings("unused")
+    private static void dispatchKeyEvent(InputHandler inputHandler,
+            KeyEvent event, long finishedToken) {
+        Runnable finishedCallback = new FinishedCallback(finishedToken);
+        inputHandler.handleKey(event, finishedCallback);
+    }
+
+    @SuppressWarnings("unused")
+    private static void dispatchMotionEvent(InputHandler inputHandler,
+            MotionEvent event, long finishedToken) {
+        Runnable finishedCallback = new FinishedCallback(finishedToken);
+        inputHandler.handleMotion(event, finishedCallback);
+    }
+    
+    // TODO consider recycling finished callbacks when done
+    private static class FinishedCallback implements Runnable {
+        private long mFinishedToken;
+        
+        public FinishedCallback(long finishedToken) {
+            mFinishedToken = finishedToken;
+        }
+        
+        public void run() {
+            synchronized (sLock) {
+                nativeFinished(mFinishedToken);
+            }
+        }
+    }
+}
diff --git a/core/java/android/view/KeyCharacterMap.java b/core/java/android/view/KeyCharacterMap.java
index 25958aa..9981d87 100644
--- a/core/java/android/view/KeyCharacterMap.java
+++ b/core/java/android/view/KeyCharacterMap.java
@@ -26,6 +26,9 @@
 import java.lang.Character;
 import java.lang.ref.WeakReference;
 
+/**
+ * Describes the keys provided by a device and their associated labels.
+ */
 public class KeyCharacterMap
 {
     /**
@@ -59,6 +62,11 @@
     private static SparseArray<WeakReference<KeyCharacterMap>> sInstances 
         = new SparseArray<WeakReference<KeyCharacterMap>>();
 
+    /**
+     * Loads the key character maps for the keyboard with the specified device id.
+     * @param keyboard The device id of the keyboard.
+     * @return The associated key character map.
+     */
     public static KeyCharacterMap load(int keyboard)
     {
         synchronized (sLock) {
diff --git a/core/java/android/view/KeyEvent.java b/core/java/android/view/KeyEvent.java
old mode 100644
new mode 100755
index d4f9787..dd0d21a3
--- a/core/java/android/view/KeyEvent.java
+++ b/core/java/android/view/KeyEvent.java
@@ -26,7 +26,7 @@
 /**
  * Contains constants for key events.
  */
-public class KeyEvent implements Parcelable {
+public class KeyEvent extends InputEvent implements Parcelable {
     // key codes
     public static final int KEYCODE_UNKNOWN         = 0;
     public static final int KEYCODE_SOFT_LEFT       = 1;
@@ -120,10 +120,31 @@
     public static final int KEYCODE_MEDIA_REWIND    = 89;
     public static final int KEYCODE_MEDIA_FAST_FORWARD = 90;
     public static final int KEYCODE_MUTE            = 91;
+    public static final int KEYCODE_PAGE_UP         = 92;
+    public static final int KEYCODE_PAGE_DOWN       = 93;
+    public static final int KEYCODE_PICTSYMBOLS     = 94;   // switch symbol-sets (Emoji,Kao-moji)
+    public static final int KEYCODE_SWITCH_CHARSET  = 95;   // switch char-sets (Kanji,Katakana)
+    public static final int KEYCODE_BUTTON_A        = 96;
+    public static final int KEYCODE_BUTTON_B        = 97;
+    public static final int KEYCODE_BUTTON_C        = 98;
+    public static final int KEYCODE_BUTTON_X        = 99;
+    public static final int KEYCODE_BUTTON_Y        = 100;
+    public static final int KEYCODE_BUTTON_Z        = 101;
+    public static final int KEYCODE_BUTTON_L1       = 102;
+    public static final int KEYCODE_BUTTON_R1       = 103;
+    public static final int KEYCODE_BUTTON_L2       = 104;
+    public static final int KEYCODE_BUTTON_R2       = 105;
+    public static final int KEYCODE_BUTTON_THUMBL   = 106;
+    public static final int KEYCODE_BUTTON_THUMBR   = 107;
+    public static final int KEYCODE_BUTTON_START    = 108;
+    public static final int KEYCODE_BUTTON_SELECT   = 109;
+    public static final int KEYCODE_BUTTON_MODE     = 110;
 
     // NOTE: If you add a new keycode here you must also add it to:
     //  isSystem()
+    //  native/include/android/keycodes.h
     //  frameworks/base/include/ui/KeycodeLabels.h
+    //  external/webkit/WebKit/android/plugins/ANPKeyCodes.h
     //  tools/puppet_master/PuppetMaster/nav_keys.py
     //  frameworks/base/core/res/res/values/attrs.xml
     //  commands/monkey/Monkey.java
@@ -135,7 +156,7 @@
     //  those new codes.  This is intended to maintain a consistent
     //  set of key code definitions across all Android devices.
    
-    private static final int LAST_KEYCODE           = KEYCODE_MUTE;
+    private static final int LAST_KEYCODE           = KEYCODE_SWITCH_CHARSET;
     
     /**
      * @deprecated There are now more than MAX_KEYCODE keycodes.
@@ -158,7 +179,7 @@
      * key code is not {#link {@link #KEYCODE_UNKNOWN} then the
      * {#link {@link #getRepeatCount()} method returns the number of times
      * the given key code should be executed.
-     * Otherwise, if the key code {@link #KEYCODE_UNKNOWN}, then
+     * Otherwise, if the key code is {@link #KEYCODE_UNKNOWN}, then
      * this is a sequence of characters as returned by {@link #getCharacters}.
      */
     public static final int ACTION_MULTIPLE         = 2;
@@ -326,9 +347,8 @@
     private int mMetaState;
     private int mAction;
     private int mKeyCode;
-    private int mScancode;
+    private int mScanCode;
     private int mRepeatCount;
-    private int mDeviceId;
     private int mFlags;
     private long mDownTime;
     private long mEventTime;
@@ -463,20 +483,20 @@
      * @param repeat A repeat count for down events (> 0 if this is after the
      * initial down) or event count for multiple events.
      * @param metaState Flags indicating which meta keys are currently pressed.
-     * @param device The device ID that generated the key event.
+     * @param deviceId The device ID that generated the key event.
      * @param scancode Raw device scan code of the event.
      */
     public KeyEvent(long downTime, long eventTime, int action,
                     int code, int repeat, int metaState,
-                    int device, int scancode) {
+                    int deviceId, int scancode) {
         mDownTime = downTime;
         mEventTime = eventTime;
         mAction = action;
         mKeyCode = code;
         mRepeatCount = repeat;
         mMetaState = metaState;
-        mDeviceId = device;
-        mScancode = scancode;
+        mDeviceId = deviceId;
+        mScanCode = scancode;
     }
 
     /**
@@ -492,44 +512,79 @@
      * @param repeat A repeat count for down events (> 0 if this is after the
      * initial down) or event count for multiple events.
      * @param metaState Flags indicating which meta keys are currently pressed.
-     * @param device The device ID that generated the key event.
+     * @param deviceId The device ID that generated the key event.
      * @param scancode Raw device scan code of the event.
      * @param flags The flags for this key event
      */
     public KeyEvent(long downTime, long eventTime, int action,
                     int code, int repeat, int metaState,
-                    int device, int scancode, int flags) {
+                    int deviceId, int scancode, int flags) {
         mDownTime = downTime;
         mEventTime = eventTime;
         mAction = action;
         mKeyCode = code;
         mRepeatCount = repeat;
         mMetaState = metaState;
-        mDeviceId = device;
-        mScancode = scancode;
+        mDeviceId = deviceId;
+        mScanCode = scancode;
         mFlags = flags;
     }
 
     /**
+     * Create a new key event.
+     * 
+     * @param downTime The time (in {@link android.os.SystemClock#uptimeMillis})
+     * at which this key code originally went down.
+     * @param eventTime The time (in {@link android.os.SystemClock#uptimeMillis})
+     * at which this event happened.
+     * @param action Action code: either {@link #ACTION_DOWN},
+     * {@link #ACTION_UP}, or {@link #ACTION_MULTIPLE}.
+     * @param code The key code.
+     * @param repeat A repeat count for down events (> 0 if this is after the
+     * initial down) or event count for multiple events.
+     * @param metaState Flags indicating which meta keys are currently pressed.
+     * @param deviceId The device ID that generated the key event.
+     * @param scancode Raw device scan code of the event.
+     * @param flags The flags for this key event
+     * @param source The input source such as {@link InputDevice#SOURCE_KEYBOARD}.
+     */
+    public KeyEvent(long downTime, long eventTime, int action,
+                    int code, int repeat, int metaState,
+                    int deviceId, int scancode, int flags, int source) {
+        mDownTime = downTime;
+        mEventTime = eventTime;
+        mAction = action;
+        mKeyCode = code;
+        mRepeatCount = repeat;
+        mMetaState = metaState;
+        mDeviceId = deviceId;
+        mScanCode = scancode;
+        mFlags = flags;
+        mSource = source;
+    }
+
+    /**
      * Create a new key event for a string of characters.  The key code,
-     * action, and repeat could will automatically be set to
-     * {@link #KEYCODE_UNKNOWN}, {@link #ACTION_MULTIPLE}, and 0 for you.
+     * action, repeat count and source will automatically be set to
+     * {@link #KEYCODE_UNKNOWN}, {@link #ACTION_MULTIPLE}, 0, and
+     * {@link InputDevice#SOURCE_KEYBOARD} for you.
      * 
      * @param time The time (in {@link android.os.SystemClock#uptimeMillis})
      * at which this event occured.
      * @param characters The string of characters.
-     * @param device The device ID that generated the key event.
+     * @param deviceId The device ID that generated the key event.
      * @param flags The flags for this key event
      */
-    public KeyEvent(long time, String characters, int device, int flags) {
+    public KeyEvent(long time, String characters, int deviceId, int flags) {
         mDownTime = time;
         mEventTime = time;
         mCharacters = characters;
         mAction = ACTION_MULTIPLE;
         mKeyCode = KEYCODE_UNKNOWN;
         mRepeatCount = 0;
-        mDeviceId = device;
+        mDeviceId = deviceId;
         mFlags = flags;
+        mSource = InputDevice.SOURCE_KEYBOARD;
     }
 
     /**
@@ -543,7 +598,8 @@
         mRepeatCount = origEvent.mRepeatCount;
         mMetaState = origEvent.mMetaState;
         mDeviceId = origEvent.mDeviceId;
-        mScancode = origEvent.mScancode;
+        mSource = origEvent.mSource;
+        mScanCode = origEvent.mScanCode;
         mFlags = origEvent.mFlags;
         mCharacters = origEvent.mCharacters;
     }
@@ -568,7 +624,8 @@
         mRepeatCount = newRepeat;
         mMetaState = origEvent.mMetaState;
         mDeviceId = origEvent.mDeviceId;
-        mScancode = origEvent.mScancode;
+        mSource = origEvent.mSource;
+        mScanCode = origEvent.mScanCode;
         mFlags = origEvent.mFlags;
         mCharacters = origEvent.mCharacters;
     }
@@ -621,7 +678,8 @@
         mRepeatCount = origEvent.mRepeatCount;
         mMetaState = origEvent.mMetaState;
         mDeviceId = origEvent.mDeviceId;
-        mScancode = origEvent.mScancode;
+        mSource = origEvent.mSource;
+        mScanCode = origEvent.mScanCode;
         mFlags = origEvent.mFlags;
         // Don't copy mCharacters, since one way or the other we'll lose it
         // when changing the action.
@@ -671,31 +729,12 @@
      * TODO: should the dpad keys be here?  arguably, because they also shouldn't be menu shortcuts
      */
     public final boolean isSystem() {
-        switch (mKeyCode) {
-        case KEYCODE_MENU:
-        case KEYCODE_SOFT_RIGHT:
-        case KEYCODE_HOME:
-        case KEYCODE_BACK:
-        case KEYCODE_CALL:
-        case KEYCODE_ENDCALL:
-        case KEYCODE_VOLUME_UP:
-        case KEYCODE_VOLUME_DOWN:
-        case KEYCODE_MUTE:
-        case KEYCODE_POWER:
-        case KEYCODE_HEADSETHOOK:
-        case KEYCODE_MEDIA_PLAY_PAUSE:
-        case KEYCODE_MEDIA_STOP:
-        case KEYCODE_MEDIA_NEXT:
-        case KEYCODE_MEDIA_PREVIOUS:
-        case KEYCODE_MEDIA_REWIND:
-        case KEYCODE_MEDIA_FAST_FORWARD:
-        case KEYCODE_CAMERA:
-        case KEYCODE_FOCUS:
-        case KEYCODE_SEARCH:
-            return true;
-        default:
-            return false;
-        }
+        return native_isSystemKey(mKeyCode);
+    }
+
+    /** @hide */
+    public final boolean hasDefaultAction() {
+        return native_hasDefaultAction(mKeyCode);
     }
 
 
@@ -853,7 +892,7 @@
      * Mostly this is here for debugging purposes.
      */
     public final int getScanCode() {
-        return mScancode;
+        return mScanCode;
     }
 
     /**
@@ -895,18 +934,6 @@
     }
 
     /**
-     * Return the id for the keyboard that this event came from.  A device
-     * id of 0 indicates the event didn't come from a physical device and
-     * maps to the default keymap.  The other numbers are arbitrary and
-     * you shouldn't depend on the values.
-     * 
-     * @see KeyCharacterMap#load
-     */
-    public final int getDeviceId() {
-        return mDeviceId;
-    }
-
-    /**
      * Renamed to {@link #getDeviceId}.
      * 
      * @hide
@@ -1177,7 +1204,7 @@
     public String toString() {
         return "KeyEvent{action=" + mAction + " code=" + mKeyCode
             + " repeat=" + mRepeatCount
-            + " meta=" + mMetaState + " scancode=" + mScancode
+            + " meta=" + mMetaState + " scancode=" + mScanCode
             + " mFlags=" + mFlags + "}";
     }
 
@@ -1202,7 +1229,8 @@
         out.writeInt(mRepeatCount);
         out.writeInt(mMetaState);
         out.writeInt(mDeviceId);
-        out.writeInt(mScancode);
+        out.writeInt(mSource);
+        out.writeInt(mScanCode);
         out.writeInt(mFlags);
         out.writeLong(mDownTime);
         out.writeLong(mEventTime);
@@ -1214,9 +1242,13 @@
         mRepeatCount = in.readInt();
         mMetaState = in.readInt();
         mDeviceId = in.readInt();
-        mScancode = in.readInt();
+        mSource = in.readInt();
+        mScanCode = in.readInt();
         mFlags = in.readInt();
         mDownTime = in.readLong();
         mEventTime = in.readLong();
     }
+    
+    private native boolean native_isSystemKey(int keyCode);
+    private native boolean native_hasDefaultAction(int keyCode);
 }
diff --git a/core/java/android/view/MotionEvent.java b/core/java/android/view/MotionEvent.java
index d648e96..13360d9 100644
--- a/core/java/android/view/MotionEvent.java
+++ b/core/java/android/view/MotionEvent.java
@@ -19,15 +19,17 @@
 import android.os.Parcel;
 import android.os.Parcelable;
 import android.os.SystemClock;
-import android.util.Log;
 
 /**
  * Object used to report movement (mouse, pen, finger, trackball) events.  This
  * class may hold either absolute or relative movements, depending on what
  * it is being used for.
+ * 
+ * Refer to {@link InputDevice} for information about how different kinds of
+ * input devices and sources represent pointer coordinates.
  */
-public final class MotionEvent implements Parcelable {
-    static final boolean DEBUG_POINTERS = false;
+public final class MotionEvent extends InputEvent implements Parcelable {
+    private static final long MS_PER_NS = 1000000;
     
     /**
      * Bit mask of the parts of the action code that are the action itself.
@@ -188,22 +190,52 @@
     static public final int SAMPLE_Y = 1;
     
     /**
-     * Offset for the sample's X coordinate.
+     * Offset for the sample's pressure.
      * @hide
      */
     static public final int SAMPLE_PRESSURE = 2;
     
     /**
-     * Offset for the sample's X coordinate.
+     * Offset for the sample's size
      * @hide
      */
     static public final int SAMPLE_SIZE = 3;
     
     /**
+     * Offset for the sample's touch major axis length.
+     * @hide
+     */
+    static public final int SAMPLE_TOUCH_MAJOR = 4;
+
+    /**
+     * Offset for the sample's touch minor axis length.
+     * @hide
+     */
+    static public final int SAMPLE_TOUCH_MINOR = 5;
+    
+    /**
+     * Offset for the sample's tool major axis length.
+     * @hide
+     */
+    static public final int SAMPLE_TOOL_MAJOR = 6;
+
+    /**
+     * Offset for the sample's tool minor axis length.
+     * @hide
+     */
+    static public final int SAMPLE_TOOL_MINOR = 7;
+    
+    /**
+     * Offset for the sample's orientation.
+     * @hide
+     */
+    static public final int SAMPLE_ORIENTATION = 8;
+
+    /**
      * Number of data items for each sample.
      * @hide
      */
-    static public final int NUM_SAMPLE_DATA = 4;
+    static public final int NUM_SAMPLE_DATA = 9;
     
     /**
      * Number of possible pointers.
@@ -218,74 +250,94 @@
     static private int gRecyclerUsed = 0;
     static private MotionEvent gRecyclerTop = null;
 
-    private long mDownTime;
-    private long mEventTimeNano;
+    private long mDownTimeNano;
     private int mAction;
-    private float mRawX;
-    private float mRawY;
+    private float mXOffset;
+    private float mYOffset;
     private float mXPrecision;
     private float mYPrecision;
-    private int mDeviceId;
     private int mEdgeFlags;
     private int mMetaState;
     
-    // Here is the actual event data.  Note that the order of the array
-    // is a little odd: the first entry is the most recent, and the ones
-    // following it are the historical data from oldest to newest.  This
-    // allows us to easily retrieve the most recent data, without having
-    // to copy the arrays every time a new sample is added.
-    
     private int mNumPointers;
     private int mNumSamples;
+    
+    private int mLastDataSampleIndex;
+    private int mLastEventTimeNanoSampleIndex;
+    
     // Array of mNumPointers size of identifiers for each pointer of data.
     private int[] mPointerIdentifiers;
+    
     // Array of (mNumSamples * mNumPointers * NUM_SAMPLE_DATA) size of event data.
+    // Samples are ordered from oldest to newest.
     private float[] mDataSamples;
-    // Array of mNumSamples size of time stamps.
-    private long[] mTimeSamples;
+    
+    // Array of mNumSamples size of event time stamps in nanoseconds.
+    // Samples are ordered from oldest to newest.
+    private long[] mEventTimeNanoSamples;
 
     private MotionEvent mNext;
     private RuntimeException mRecycledLocation;
     private boolean mRecycled;
 
-    private MotionEvent() {
-        mPointerIdentifiers = new int[BASE_AVAIL_POINTERS];
-        mDataSamples = new float[BASE_AVAIL_POINTERS*BASE_AVAIL_SAMPLES*NUM_SAMPLE_DATA];
-        mTimeSamples = new long[BASE_AVAIL_SAMPLES];
+    private MotionEvent(int pointerCount, int sampleCount) {
+        mPointerIdentifiers = new int[pointerCount];
+        mDataSamples = new float[pointerCount * sampleCount * NUM_SAMPLE_DATA];
+        mEventTimeNanoSamples = new long[sampleCount];
     }
 
-    static private MotionEvent obtain() {
+    static private MotionEvent obtain(int pointerCount, int sampleCount) {
+        final MotionEvent ev;
         synchronized (gRecyclerLock) {
             if (gRecyclerTop == null) {
-                return new MotionEvent();
+                if (pointerCount < BASE_AVAIL_POINTERS) {
+                    pointerCount = BASE_AVAIL_POINTERS;
+                }
+                if (sampleCount < BASE_AVAIL_SAMPLES) {
+                    sampleCount = BASE_AVAIL_SAMPLES;
+                }
+                return new MotionEvent(pointerCount, sampleCount);
             }
-            MotionEvent ev = gRecyclerTop;
+            ev = gRecyclerTop;
             gRecyclerTop = ev.mNext;
-            gRecyclerUsed--;
-            ev.mRecycledLocation = null;
-            ev.mRecycled = false;
-            return ev;
+            gRecyclerUsed -= 1;
         }
+        ev.mRecycledLocation = null;
+        ev.mRecycled = false;
+        ev.mNext = null;
+        
+        if (ev.mPointerIdentifiers.length < pointerCount) {
+            ev.mPointerIdentifiers = new int[pointerCount];
+        }
+        
+        if (ev.mEventTimeNanoSamples.length < sampleCount) {
+            ev.mEventTimeNanoSamples = new long[sampleCount];
+        }
+        
+        final int neededDataSamplesLength = pointerCount * sampleCount * NUM_SAMPLE_DATA;
+        if (ev.mDataSamples.length < neededDataSamplesLength) {
+            ev.mDataSamples = new float[neededDataSamplesLength];
+        }
+        
+        return ev;
     }
-
+    
     /**
      * Create a new MotionEvent, filling in all of the basic values that
      * define the motion.
      * 
      * @param downTime The time (in ms) when the user originally pressed down to start 
      * a stream of position events.  This must be obtained from {@link SystemClock#uptimeMillis()}.
-     * @param eventTime  The the time (in ms) when this specific event was generated.  This 
+     * @param eventTime The the time (in ms) when this specific event was generated.  This 
      * must be obtained from {@link SystemClock#uptimeMillis()}.
-     * @param eventTimeNano  The the time (in ns) when this specific event was generated.  This 
-     * must be obtained from {@link System#nanoTime()}.
      * @param action The kind of action being performed -- one of either
      * {@link #ACTION_DOWN}, {@link #ACTION_MOVE}, {@link #ACTION_UP}, or
      * {@link #ACTION_CANCEL}.
      * @param pointers The number of points that will be in this event.
-     * @param inPointerIds An array of <em>pointers</em> values providing
+     * @param pointerIds An array of <em>pointers</em> values providing
      * an identifier for each pointer.
-     * @param inData An array of <em>pointers*NUM_SAMPLE_DATA</em> of initial
-     * data samples for the event.
+     * @param pointerCoords An array of <em>pointers</em> values providing
+     * a {@link PointerCoords} coordinate object for each pointer.
      * @param metaState The state of any meta / modifier keys that were in effect when
      * the event was generated.
      * @param xPrecision The precision of the X coordinate being reported.
@@ -295,55 +347,35 @@
      * numbers are arbitrary and you shouldn't depend on the values.
      * @param edgeFlags A bitfield indicating which edges, if any, where touched by this
      * MotionEvent.
-     *
-     * @hide
+     * @param source The source of this event.
      */
-    static public MotionEvent obtainNano(long downTime, long eventTime, long eventTimeNano,
-            int action, int pointers, int[] inPointerIds, float[] inData, int metaState,
-            float xPrecision, float yPrecision, int deviceId, int edgeFlags) {
-        MotionEvent ev = obtain();
+    static public MotionEvent obtain(long downTime, long eventTime,
+            int action, int pointers, int[] pointerIds, PointerCoords[] pointerCoords,
+            int metaState, float xPrecision, float yPrecision, int deviceId,
+            int edgeFlags, int source) {
+        MotionEvent ev = obtain(pointers, 1);
         ev.mDeviceId = deviceId;
+        ev.mSource = source;
         ev.mEdgeFlags = edgeFlags;
-        ev.mDownTime = downTime;
-        ev.mEventTimeNano = eventTimeNano;
+        ev.mDownTimeNano = downTime * MS_PER_NS;
         ev.mAction = action;
         ev.mMetaState = metaState;
-        ev.mRawX = inData[SAMPLE_X];
-        ev.mRawY = inData[SAMPLE_Y];
+        ev.mXOffset = 0;
+        ev.mYOffset = 0;
         ev.mXPrecision = xPrecision;
         ev.mYPrecision = yPrecision;
+        
         ev.mNumPointers = pointers;
         ev.mNumSamples = 1;
         
-        int[] pointerIdentifiers = ev.mPointerIdentifiers;
-        if (pointerIdentifiers.length < pointers) {
-            ev.mPointerIdentifiers = pointerIdentifiers = new int[pointers];
-        }
-        System.arraycopy(inPointerIds, 0, pointerIdentifiers, 0, pointers);
+        ev.mLastDataSampleIndex = 0;
+        ev.mLastEventTimeNanoSampleIndex = 0;
         
-        final int ND = pointers * NUM_SAMPLE_DATA;
-        float[] dataSamples = ev.mDataSamples;
-        if (dataSamples.length < ND) {
-            ev.mDataSamples = dataSamples = new float[ND];
-        }
-        System.arraycopy(inData, 0, dataSamples, 0, ND);
+        System.arraycopy(pointerIds, 0, ev.mPointerIdentifiers, 0, pointers);
         
-        ev.mTimeSamples[0] = eventTime;
-
-        if (DEBUG_POINTERS) {
-            StringBuilder sb = new StringBuilder(128);
-            sb.append("New:");
-            for (int i=0; i<pointers; i++) {
-                sb.append(" #");
-                sb.append(ev.mPointerIdentifiers[i]);
-                sb.append("(");
-                sb.append(ev.mDataSamples[(i*NUM_SAMPLE_DATA) + SAMPLE_X]);
-                sb.append(",");
-                sb.append(ev.mDataSamples[(i*NUM_SAMPLE_DATA) + SAMPLE_Y]);
-                sb.append(")");
-            }
-            Log.v("MotionEvent", sb.toString());
-        }
+        ev.mEventTimeNanoSamples[0] = eventTime * MS_PER_NS;
+        
+        ev.setPointerCoordsAtSampleIndex(0, pointerCoords);
         
         return ev;
     }
@@ -382,27 +414,29 @@
     static public MotionEvent obtain(long downTime, long eventTime, int action,
             float x, float y, float pressure, float size, int metaState,
             float xPrecision, float yPrecision, int deviceId, int edgeFlags) {
-        MotionEvent ev = obtain();
+        MotionEvent ev = obtain(1, 1);
         ev.mDeviceId = deviceId;
+        ev.mSource = InputDevice.SOURCE_UNKNOWN;
         ev.mEdgeFlags = edgeFlags;
-        ev.mDownTime = downTime;
-        ev.mEventTimeNano = eventTime * 1000000;
+        ev.mDownTimeNano = downTime * MS_PER_NS;
         ev.mAction = action;
         ev.mMetaState = metaState;
+        ev.mXOffset = 0;
+        ev.mYOffset = 0;
         ev.mXPrecision = xPrecision;
         ev.mYPrecision = yPrecision;
-
+        
         ev.mNumPointers = 1;
         ev.mNumSamples = 1;
-        int[] pointerIds = ev.mPointerIdentifiers;
-        pointerIds[0] = 0;
-        float[] data = ev.mDataSamples;
-        data[SAMPLE_X] = ev.mRawX = x;
-        data[SAMPLE_Y] = ev.mRawY = y;
-        data[SAMPLE_PRESSURE] = pressure;
-        data[SAMPLE_SIZE] = size;
-        ev.mTimeSamples[0] = eventTime;
-
+        
+        ev.mLastDataSampleIndex = 0;
+        ev.mLastEventTimeNanoSampleIndex = 0;
+        
+        ev.mPointerIdentifiers[0] = 0;
+        
+        ev.mEventTimeNanoSamples[0] = eventTime * MS_PER_NS;
+        
+        ev.setPointerCoordsAtSampleIndex(0, x, y, pressure, size);
         return ev;
     }
 
@@ -437,33 +471,16 @@
      * numbers are arbitrary and you shouldn't depend on the values.
      * @param edgeFlags A bitfield indicating which edges, if any, where touched by this
      * MotionEvent.
+     * 
+     * @deprecated Use {@link #obtain(long, long, int, float, float, float, float, int, float, float, int, int)}
+     * instead.
      */
+    @Deprecated
     static public MotionEvent obtain(long downTime, long eventTime, int action,
             int pointers, float x, float y, float pressure, float size, int metaState,
             float xPrecision, float yPrecision, int deviceId, int edgeFlags) {
-        MotionEvent ev = obtain();
-        ev.mDeviceId = deviceId;
-        ev.mEdgeFlags = edgeFlags;
-        ev.mDownTime = downTime;
-        ev.mEventTimeNano = eventTime * 1000000;
-        ev.mAction = action;
-        ev.mNumPointers = pointers;
-        ev.mMetaState = metaState;
-        ev.mXPrecision = xPrecision;
-        ev.mYPrecision = yPrecision;
-
-        ev.mNumPointers = 1;
-        ev.mNumSamples = 1;
-        int[] pointerIds = ev.mPointerIdentifiers;
-        pointerIds[0] = 0;
-        float[] data = ev.mDataSamples;
-        data[SAMPLE_X] = ev.mRawX = x;
-        data[SAMPLE_Y] = ev.mRawY = y;
-        data[SAMPLE_PRESSURE] = pressure;
-        data[SAMPLE_SIZE] = size;
-        ev.mTimeSamples[0] = eventTime;
-
-        return ev;
+        return obtain(downTime, eventTime, action, x, y, pressure, size,
+                metaState, xPrecision, yPrecision, deviceId, edgeFlags);
     }
 
     /**
@@ -485,89 +502,37 @@
      */
     static public MotionEvent obtain(long downTime, long eventTime, int action,
             float x, float y, int metaState) {
-        MotionEvent ev = obtain();
-        ev.mDeviceId = 0;
-        ev.mEdgeFlags = 0;
-        ev.mDownTime = downTime;
-        ev.mEventTimeNano = eventTime * 1000000;
-        ev.mAction = action;
-        ev.mNumPointers = 1;
-        ev.mMetaState = metaState;
-        ev.mXPrecision = 1.0f;
-        ev.mYPrecision = 1.0f;
-
-        ev.mNumPointers = 1;
-        ev.mNumSamples = 1;
-        int[] pointerIds = ev.mPointerIdentifiers;
-        pointerIds[0] = 0;
-        float[] data = ev.mDataSamples;
-        data[SAMPLE_X] = ev.mRawX = x;
-        data[SAMPLE_Y] = ev.mRawY = y;
-        data[SAMPLE_PRESSURE] = 1.0f;
-        data[SAMPLE_SIZE] = 1.0f;
-        ev.mTimeSamples[0] = eventTime;
-
-        return ev;
-    }
-
-    /**
-     * Scales down the coordination of this event by the given scale.
-     *
-     * @hide
-     */
-    public void scale(float scale) {
-        mRawX *= scale;
-        mRawY *= scale;
-        mXPrecision *= scale;
-        mYPrecision *= scale;
-        float[] history = mDataSamples;
-        final int length = mNumPointers * mNumSamples * NUM_SAMPLE_DATA;
-        for (int i = 0; i < length; i += NUM_SAMPLE_DATA) {
-            history[i + SAMPLE_X] *= scale;
-            history[i + SAMPLE_Y] *= scale;
-            // no need to scale pressure
-            history[i + SAMPLE_SIZE] *= scale;    // TODO: square this?
-        }
+        return obtain(downTime, eventTime, action, x, y, 1.0f, 1.0f,
+                metaState, 1.0f, 1.0f, 0, 0);
     }
 
     /**
      * Create a new MotionEvent, copying from an existing one.
      */
     static public MotionEvent obtain(MotionEvent o) {
-        MotionEvent ev = obtain();
+        MotionEvent ev = obtain(o.mNumPointers, o.mNumSamples);
         ev.mDeviceId = o.mDeviceId;
+        ev.mSource = o.mSource;
         ev.mEdgeFlags = o.mEdgeFlags;
-        ev.mDownTime = o.mDownTime;
-        ev.mEventTimeNano = o.mEventTimeNano;
+        ev.mDownTimeNano = o.mDownTimeNano;
         ev.mAction = o.mAction;
-        ev.mNumPointers = o.mNumPointers;
-        ev.mRawX = o.mRawX;
-        ev.mRawY = o.mRawY;
         ev.mMetaState = o.mMetaState;
+        ev.mXOffset = o.mXOffset;
+        ev.mYOffset = o.mYOffset;
         ev.mXPrecision = o.mXPrecision;
         ev.mYPrecision = o.mYPrecision;
+        int numPointers = ev.mNumPointers = o.mNumPointers;
+        int numSamples = ev.mNumSamples = o.mNumSamples;
         
-        final int NS = ev.mNumSamples = o.mNumSamples;
-        if (ev.mTimeSamples.length >= NS) {
-            System.arraycopy(o.mTimeSamples, 0, ev.mTimeSamples, 0, NS);
-        } else {
-            ev.mTimeSamples = (long[])o.mTimeSamples.clone();
-        }
+        ev.mLastDataSampleIndex = o.mLastDataSampleIndex;
+        ev.mLastEventTimeNanoSampleIndex = o.mLastEventTimeNanoSampleIndex;
         
-        final int NP = (ev.mNumPointers=o.mNumPointers);
-        if (ev.mPointerIdentifiers.length >= NP) {
-            System.arraycopy(o.mPointerIdentifiers, 0, ev.mPointerIdentifiers, 0, NP);
-        } else {
-            ev.mPointerIdentifiers = (int[])o.mPointerIdentifiers.clone();
-        }
+        System.arraycopy(o.mPointerIdentifiers, 0, ev.mPointerIdentifiers, 0, numPointers);
         
-        final int ND = NP * NS * NUM_SAMPLE_DATA;
-        if (ev.mDataSamples.length >= ND) {
-            System.arraycopy(o.mDataSamples, 0, ev.mDataSamples, 0, ND);
-        } else {
-            ev.mDataSamples = (float[])o.mDataSamples.clone();
-        }
+        System.arraycopy(o.mEventTimeNanoSamples, 0, ev.mEventTimeNanoSamples, 0, numSamples);
         
+        System.arraycopy(o.mDataSamples, 0, ev.mDataSamples, 0,
+                numPointers * numSamples * NUM_SAMPLE_DATA);
         return ev;
     }
 
@@ -576,36 +541,30 @@
      * any historical point information.
      */
     static public MotionEvent obtainNoHistory(MotionEvent o) {
-        MotionEvent ev = obtain();
+        MotionEvent ev = obtain(o.mNumPointers, 1);
         ev.mDeviceId = o.mDeviceId;
+        ev.mSource = o.mSource;
         ev.mEdgeFlags = o.mEdgeFlags;
-        ev.mDownTime = o.mDownTime;
-        ev.mEventTimeNano = o.mEventTimeNano;
+        ev.mDownTimeNano = o.mDownTimeNano;
         ev.mAction = o.mAction;
-        ev.mNumPointers = o.mNumPointers;
-        ev.mRawX = o.mRawX;
-        ev.mRawY = o.mRawY;
         ev.mMetaState = o.mMetaState;
+        ev.mXOffset = o.mXOffset;
+        ev.mYOffset = o.mYOffset;
         ev.mXPrecision = o.mXPrecision;
         ev.mYPrecision = o.mYPrecision;
         
+        int numPointers = ev.mNumPointers = o.mNumPointers;
         ev.mNumSamples = 1;
-        ev.mTimeSamples[0] = o.mTimeSamples[0];
         
-        final int NP = (ev.mNumPointers=o.mNumPointers);
-        if (ev.mPointerIdentifiers.length >= NP) {
-            System.arraycopy(o.mPointerIdentifiers, 0, ev.mPointerIdentifiers, 0, NP);
-        } else {
-            ev.mPointerIdentifiers = (int[])o.mPointerIdentifiers.clone();
-        }
+        ev.mLastDataSampleIndex = 0;
+        ev.mLastEventTimeNanoSampleIndex = 0;
         
-        final int ND = NP * NUM_SAMPLE_DATA;
-        if (ev.mDataSamples.length >= ND) {
-            System.arraycopy(o.mDataSamples, 0, ev.mDataSamples, 0, ND);
-        } else {
-            ev.mDataSamples = (float[])o.mDataSamples.clone();
-        }
+        System.arraycopy(o.mPointerIdentifiers, 0, ev.mPointerIdentifiers, 0, numPointers);
         
+        ev.mEventTimeNanoSamples[0] = o.mEventTimeNanoSamples[o.mLastEventTimeNanoSampleIndex];
+        
+        System.arraycopy(o.mDataSamples, o.mLastDataSampleIndex, ev.mDataSamples, 0,
+                numPointers * NUM_SAMPLE_DATA);
         return ev;
     }
 
@@ -613,18 +572,21 @@
      * Recycle the MotionEvent, to be re-used by a later caller.  After calling
      * this function you must not ever touch the event again.
      */
-    public void recycle() {
+    public final void recycle() {
         // Ensure recycle is only called once!
         if (TRACK_RECYCLED_LOCATION) {
             if (mRecycledLocation != null) {
                 throw new RuntimeException(toString() + " recycled twice!", mRecycledLocation);
             }
             mRecycledLocation = new RuntimeException("Last recycled here");
-        } else if (mRecycled) {
-            throw new RuntimeException(toString() + " recycled twice!");
+            //Log.w("MotionEvent", "Recycling event " + this, mRecycledLocation);
+        } else {
+            if (mRecycled) {
+                throw new RuntimeException(toString() + " recycled twice!");
+            }
+            mRecycled = true;
         }
 
-        //Log.w("MotionEvent", "Recycling event " + this, mRecycledLocation);
         synchronized (gRecyclerLock) {
             if (gRecyclerUsed < MAX_RECYCLED) {
                 gRecyclerUsed++;
@@ -634,6 +596,31 @@
             }
         }
     }
+    
+    /**
+     * Scales down the coordination of this event by the given scale.
+     *
+     * @hide
+     */
+    public final void scale(float scale) {
+        mXOffset *= scale;
+        mYOffset *= scale;
+        mXPrecision *= scale;
+        mYPrecision *= scale;
+        
+        float[] history = mDataSamples;
+        final int length = mNumPointers * mNumSamples * NUM_SAMPLE_DATA;
+        for (int i = 0; i < length; i += NUM_SAMPLE_DATA) {
+            history[i + SAMPLE_X] *= scale;
+            history[i + SAMPLE_Y] *= scale;
+            // no need to scale pressure
+            history[i + SAMPLE_SIZE] *= scale;    // TODO: square this?
+            history[i + SAMPLE_TOUCH_MAJOR] *= scale;
+            history[i + SAMPLE_TOUCH_MINOR] *= scale;
+            history[i + SAMPLE_TOOL_MAJOR] *= scale;
+            history[i + SAMPLE_TOOL_MINOR] *= scale;
+        }
+    }
 
     /**
      * Return the kind of action being performed -- one of either
@@ -675,14 +662,14 @@
      * a stream of position events.
      */
     public final long getDownTime() {
-        return mDownTime;
+        return mDownTimeNano / MS_PER_NS;
     }
 
     /**
      * Returns the time (in ms) when this specific event was generated.
      */
     public final long getEventTime() {
-        return mTimeSamples[0];
+        return mEventTimeNanoSamples[mLastEventTimeNanoSampleIndex] / MS_PER_NS;
     }
 
     /**
@@ -692,7 +679,7 @@
      * @hide
      */
     public final long getEventTimeNano() {
-        return mEventTimeNano;
+        return mEventTimeNanoSamples[mLastEventTimeNanoSampleIndex];
     }
 
     /**
@@ -700,7 +687,7 @@
      * arbitrary pointer identifier).
      */
     public final float getX() {
-        return mDataSamples[SAMPLE_X];
+        return mDataSamples[mLastDataSampleIndex + SAMPLE_X] + mXOffset;
     }
 
     /**
@@ -708,7 +695,7 @@
      * arbitrary pointer identifier).
      */
     public final float getY() {
-        return mDataSamples[SAMPLE_Y];
+        return mDataSamples[mLastDataSampleIndex + SAMPLE_Y] + mYOffset;
     }
 
     /**
@@ -716,7 +703,7 @@
      * arbitrary pointer identifier).
      */
     public final float getPressure() {
-        return mDataSamples[SAMPLE_PRESSURE];
+        return mDataSamples[mLastDataSampleIndex + SAMPLE_PRESSURE];
     }
 
     /**
@@ -724,7 +711,47 @@
      * arbitrary pointer identifier).
      */
     public final float getSize() {
-        return mDataSamples[SAMPLE_SIZE];
+        return mDataSamples[mLastDataSampleIndex + SAMPLE_SIZE];
+    }
+    
+    /**
+     * {@link #getTouchMajor(int)} for the first pointer index (may be an
+     * arbitrary pointer identifier).
+     */
+    public final float getTouchMajor() {
+        return mDataSamples[mLastDataSampleIndex + SAMPLE_TOUCH_MAJOR];
+    }
+
+    /**
+     * {@link #getTouchMinor(int)} for the first pointer index (may be an
+     * arbitrary pointer identifier).
+     */
+    public final float getTouchMinor() {
+        return mDataSamples[mLastDataSampleIndex + SAMPLE_TOUCH_MINOR];
+    }
+    
+    /**
+     * {@link #getToolMajor(int)} for the first pointer index (may be an
+     * arbitrary pointer identifier).
+     */
+    public final float getToolMajor() {
+        return mDataSamples[mLastDataSampleIndex + SAMPLE_TOOL_MAJOR];
+    }
+
+    /**
+     * {@link #getToolMinor(int)} for the first pointer index (may be an
+     * arbitrary pointer identifier).
+     */
+    public final float getToolMinor() {
+        return mDataSamples[mLastDataSampleIndex + SAMPLE_TOOL_MINOR];
+    }
+    
+    /**
+     * {@link #getOrientation(int)} for the first pointer index (may be an
+     * arbitrary pointer identifier).
+     */
+    public final float getOrientation() {
+        return mDataSamples[mLastDataSampleIndex + SAMPLE_ORIENTATION];
     }
 
     /**
@@ -776,7 +803,8 @@
      * (the first pointer that is down) to {@link #getPointerCount()}-1.
      */
     public final float getX(int pointerIndex) {
-        return mDataSamples[(pointerIndex*NUM_SAMPLE_DATA) + SAMPLE_X];
+        return mDataSamples[mLastDataSampleIndex
+                            + pointerIndex * NUM_SAMPLE_DATA + SAMPLE_X] + mXOffset;
     }
 
     /**
@@ -789,7 +817,8 @@
      * (the first pointer that is down) to {@link #getPointerCount()}-1.
      */
     public final float getY(int pointerIndex) {
-        return mDataSamples[(pointerIndex*NUM_SAMPLE_DATA) + SAMPLE_Y];
+        return mDataSamples[mLastDataSampleIndex
+                            + pointerIndex * NUM_SAMPLE_DATA + SAMPLE_Y] + mYOffset;
     }
 
     /**
@@ -804,7 +833,8 @@
      * (the first pointer that is down) to {@link #getPointerCount()}-1.
      */
     public final float getPressure(int pointerIndex) {
-        return mDataSamples[(pointerIndex*NUM_SAMPLE_DATA) + SAMPLE_PRESSURE];
+        return mDataSamples[mLastDataSampleIndex
+                            + pointerIndex * NUM_SAMPLE_DATA + SAMPLE_PRESSURE];
     }
 
     /**
@@ -820,7 +850,95 @@
      * (the first pointer that is down) to {@link #getPointerCount()}-1.
      */
     public final float getSize(int pointerIndex) {
-        return mDataSamples[(pointerIndex*NUM_SAMPLE_DATA) + SAMPLE_SIZE];
+        return mDataSamples[mLastDataSampleIndex
+                            + pointerIndex * NUM_SAMPLE_DATA + SAMPLE_SIZE];
+    }
+    
+    /**
+     * Returns the length of the major axis of an ellipse that describes the touch
+     * area at the point of contact for the given pointer
+     * <em>index</em> (use {@link #getPointerId(int)} to find the pointer
+     * identifier for this index).
+     * @param pointerIndex Raw index of pointer to retrieve.  Value may be from 0
+     * (the first pointer that is down) to {@link #getPointerCount()}-1.
+     */
+    public final float getTouchMajor(int pointerIndex) {
+        return mDataSamples[mLastDataSampleIndex
+                            + pointerIndex * NUM_SAMPLE_DATA + SAMPLE_TOUCH_MAJOR];
+    }
+    
+    /**
+     * Returns the length of the minor axis of an ellipse that describes the touch
+     * area at the point of contact for the given pointer
+     * <em>index</em> (use {@link #getPointerId(int)} to find the pointer
+     * identifier for this index).
+     * @param pointerIndex Raw index of pointer to retrieve.  Value may be from 0
+     * (the first pointer that is down) to {@link #getPointerCount()}-1.
+     */
+    public final float getTouchMinor(int pointerIndex) {
+        return mDataSamples[mLastDataSampleIndex
+                            + pointerIndex * NUM_SAMPLE_DATA + SAMPLE_TOUCH_MINOR];
+    }
+    
+    /**
+     * Returns the length of the major axis of an ellipse that describes the size of
+     * the approaching tool for the given pointer
+     * <em>index</em> (use {@link #getPointerId(int)} to find the pointer
+     * identifier for this index).
+     * The tool area represents the estimated size of the finger or pen that is
+     * touching the device independent of its actual touch area at the point of contact.
+     * @param pointerIndex Raw index of pointer to retrieve.  Value may be from 0
+     * (the first pointer that is down) to {@link #getPointerCount()}-1.
+     */
+    public final float getToolMajor(int pointerIndex) {
+        return mDataSamples[mLastDataSampleIndex
+                            + pointerIndex * NUM_SAMPLE_DATA + SAMPLE_TOOL_MAJOR];
+    }
+    
+    /**
+     * Returns the length of the minor axis of an ellipse that describes the size of
+     * the approaching tool for the given pointer
+     * <em>index</em> (use {@link #getPointerId(int)} to find the pointer
+     * identifier for this index).
+     * The tool area represents the estimated size of the finger or pen that is
+     * touching the device independent of its actual touch area at the point of contact.
+     * @param pointerIndex Raw index of pointer to retrieve.  Value may be from 0
+     * (the first pointer that is down) to {@link #getPointerCount()}-1.
+     */
+    public final float getToolMinor(int pointerIndex) {
+        return mDataSamples[mLastDataSampleIndex
+                            + pointerIndex * NUM_SAMPLE_DATA + SAMPLE_TOOL_MINOR];
+    }
+    
+    /**
+     * Returns the orientation of the touch area and tool area in radians clockwise from vertical
+     * for the given pointer <em>index</em> (use {@link #getPointerId(int)} to find the pointer
+     * identifier for this index).
+     * An angle of 0 degrees indicates that the major axis of contact is oriented
+     * upwards, is perfectly circular or is of unknown orientation.  A positive angle
+     * indicates that the major axis of contact is oriented to the right.  A negative angle
+     * indicates that the major axis of contact is oriented to the left.
+     * The full range is from -PI/4 radians (finger pointing fully left) to PI/4 radians
+     * (finger pointing fully right).
+     * @param pointerIndex Raw index of pointer to retrieve.  Value may be from 0
+     * (the first pointer that is down) to {@link #getPointerCount()}-1.
+     */
+    public final float getOrientation(int pointerIndex) {
+        return mDataSamples[mLastDataSampleIndex
+                            + pointerIndex * NUM_SAMPLE_DATA + SAMPLE_ORIENTATION];
+    }
+    
+    /**
+     * Populates a {@link PointerCoords} object with pointer coordinate data for
+     * the specified pointer index.
+     * 
+     * @param pointerIndex Raw index of pointer to retrieve.  Value may be from 0
+     * (the first pointer that is down) to {@link #getPointerCount()}-1.
+     * @param outPointerCoords The pointer coordinate object to populate.
+     */
+    public final void getPointerCoords(int pointerIndex, PointerCoords outPointerCoords) {
+        final int sampleIndex = mLastDataSampleIndex + pointerIndex * NUM_SAMPLE_DATA;
+        getPointerCoordsAtSampleIndex(sampleIndex, outPointerCoords);
     }
 
     /**
@@ -844,9 +962,9 @@
      * and views.
      */
     public final float getRawX() {
-        return mRawX;
+        return mDataSamples[mLastDataSampleIndex + SAMPLE_X];
     }
-
+    
     /**
      * Returns the original raw Y coordinate of this event.  For touch
      * events on the screen, this is the original location of the event
@@ -854,7 +972,7 @@
      * and views.
      */
     public final float getRawY() {
-        return mRawY;
+        return mDataSamples[mLastDataSampleIndex + SAMPLE_Y];
     }
 
     /**
@@ -886,7 +1004,7 @@
      * @return Returns the number of historical points in the event.
      */
     public final int getHistorySize() {
-        return mNumSamples - 1;
+        return mLastEventTimeNanoSampleIndex;
     }
 
     /**
@@ -900,7 +1018,7 @@
      * @see #getEventTime
      */
     public final long getHistoricalEventTime(int pos) {
-        return mTimeSamples[pos + 1];
+        return mEventTimeNanoSamples[pos] / MS_PER_NS;
     }
 
     /**
@@ -908,7 +1026,7 @@
      * arbitrary pointer identifier).
      */
     public final float getHistoricalX(int pos) {
-        return mDataSamples[((pos + 1) * NUM_SAMPLE_DATA * mNumPointers) + SAMPLE_X];
+        return mDataSamples[pos * mNumPointers * NUM_SAMPLE_DATA + SAMPLE_X] + mXOffset;
     }
 
     /**
@@ -916,7 +1034,7 @@
      * arbitrary pointer identifier).
      */
     public final float getHistoricalY(int pos) {
-        return mDataSamples[((pos + 1) * NUM_SAMPLE_DATA * mNumPointers) + SAMPLE_Y];
+        return mDataSamples[pos * mNumPointers * NUM_SAMPLE_DATA + SAMPLE_Y] + mYOffset;
     }
 
     /**
@@ -924,7 +1042,7 @@
      * arbitrary pointer identifier).
      */
     public final float getHistoricalPressure(int pos) {
-        return mDataSamples[((pos + 1) * NUM_SAMPLE_DATA * mNumPointers) + SAMPLE_PRESSURE];
+        return mDataSamples[pos * mNumPointers * NUM_SAMPLE_DATA + SAMPLE_PRESSURE];
     }
 
     /**
@@ -932,10 +1050,50 @@
      * arbitrary pointer identifier).
      */
     public final float getHistoricalSize(int pos) {
-        return mDataSamples[((pos + 1) * NUM_SAMPLE_DATA * mNumPointers) + SAMPLE_SIZE];
+        return mDataSamples[pos * mNumPointers * NUM_SAMPLE_DATA + SAMPLE_SIZE];
     }
 
     /**
+     * {@link #getHistoricalTouchMajor(int)} for the first pointer index (may be an
+     * arbitrary pointer identifier).
+     */
+    public final float getHistoricalTouchMajor(int pos) {
+        return mDataSamples[pos * mNumPointers * NUM_SAMPLE_DATA + SAMPLE_TOUCH_MAJOR];
+    }
+
+    /**
+     * {@link #getHistoricalTouchMinor(int)} for the first pointer index (may be an
+     * arbitrary pointer identifier).
+     */
+    public final float getHistoricalTouchMinor(int pos) {
+        return mDataSamples[pos * mNumPointers * NUM_SAMPLE_DATA + SAMPLE_TOUCH_MINOR];
+    }
+    
+    /**
+     * {@link #getHistoricalToolMajor(int)} for the first pointer index (may be an
+     * arbitrary pointer identifier).
+     */
+    public final float getHistoricalToolMajor(int pos) {
+        return mDataSamples[pos * mNumPointers * NUM_SAMPLE_DATA + SAMPLE_TOOL_MAJOR];
+    }
+
+    /**
+     * {@link #getHistoricalToolMinor(int)} for the first pointer index (may be an
+     * arbitrary pointer identifier).
+     */
+    public final float getHistoricalToolMinor(int pos) {
+        return mDataSamples[pos * mNumPointers * NUM_SAMPLE_DATA + SAMPLE_TOOL_MINOR];
+    }
+    
+    /**
+     * {@link #getHistoricalOrientation(int)} for the first pointer index (may be an
+     * arbitrary pointer identifier).
+     */
+    public final float getHistoricalOrientation(int pos) {
+        return mDataSamples[pos * mNumPointers * NUM_SAMPLE_DATA + SAMPLE_ORIENTATION];
+    }
+    
+    /**
      * Returns a historical X coordinate, as per {@link #getX(int)}, that
      * occurred between this event and the previous event for the given pointer.
      * Only applies to ACTION_MOVE events.
@@ -949,8 +1107,8 @@
      * @see #getX
      */
     public final float getHistoricalX(int pointerIndex, int pos) {
-        return mDataSamples[((pos + 1) * NUM_SAMPLE_DATA * mNumPointers)
-                            + (pointerIndex * NUM_SAMPLE_DATA) + SAMPLE_X];
+        return mDataSamples[(pos * mNumPointers + pointerIndex)
+                            * NUM_SAMPLE_DATA + SAMPLE_X] + mXOffset;
     }
 
     /**
@@ -967,8 +1125,8 @@
      * @see #getY
      */
     public final float getHistoricalY(int pointerIndex, int pos) {
-        return mDataSamples[((pos + 1) * NUM_SAMPLE_DATA * mNumPointers)
-                            + (pointerIndex * NUM_SAMPLE_DATA) + SAMPLE_Y];
+        return mDataSamples[(pos * mNumPointers + pointerIndex)
+                            * NUM_SAMPLE_DATA + SAMPLE_Y] + mYOffset;
     }
 
     /**
@@ -985,8 +1143,8 @@
      * @see #getPressure
      */
     public final float getHistoricalPressure(int pointerIndex, int pos) {
-        return mDataSamples[((pos + 1) * NUM_SAMPLE_DATA * mNumPointers)
-                            + (pointerIndex * NUM_SAMPLE_DATA) + SAMPLE_PRESSURE];
+        return mDataSamples[(pos * mNumPointers + pointerIndex)
+                            * NUM_SAMPLE_DATA + SAMPLE_PRESSURE];
     }
 
     /**
@@ -1003,21 +1161,123 @@
      * @see #getSize
      */
     public final float getHistoricalSize(int pointerIndex, int pos) {
-        return mDataSamples[((pos + 1) * NUM_SAMPLE_DATA * mNumPointers)
-                            + (pointerIndex * NUM_SAMPLE_DATA) + SAMPLE_SIZE];
+        return mDataSamples[(pos * mNumPointers + pointerIndex)
+                            * NUM_SAMPLE_DATA + SAMPLE_SIZE];
     }
-
+    
     /**
-     * Return the id for the device that this event came from.  An id of
-     * zero indicates that the event didn't come from a physical device; other
-     * numbers are arbitrary and you shouldn't depend on the values.
+     * Returns a historical touch major axis coordinate, as per {@link #getTouchMajor(int)}, that
+     * occurred between this event and the previous event for the given pointer.
+     * Only applies to ACTION_MOVE events.
+     *
+     * @param pointerIndex Raw index of pointer to retrieve.  Value may be from 0
+     * (the first pointer that is down) to {@link #getPointerCount()}-1.
+     * @param pos Which historical value to return; must be less than
+     * {@link #getHistorySize}
+     * 
+     * @see #getHistorySize
+     * @see #getTouchMajor
      */
-    public final int getDeviceId() {
-        return mDeviceId;
+    public final float getHistoricalTouchMajor(int pointerIndex, int pos) {
+        return mDataSamples[(pos * mNumPointers + pointerIndex)
+                            * NUM_SAMPLE_DATA + SAMPLE_TOUCH_MAJOR];
     }
 
     /**
-     * Returns a bitfield indicating which edges, if any, where touched by this
+     * Returns a historical touch minor axis coordinate, as per {@link #getTouchMinor(int)}, that
+     * occurred between this event and the previous event for the given pointer.
+     * Only applies to ACTION_MOVE events.
+     *
+     * @param pointerIndex Raw index of pointer to retrieve.  Value may be from 0
+     * (the first pointer that is down) to {@link #getPointerCount()}-1.
+     * @param pos Which historical value to return; must be less than
+     * {@link #getHistorySize}
+     * 
+     * @see #getHistorySize
+     * @see #getTouchMinor
+     */
+    public final float getHistoricalTouchMinor(int pointerIndex, int pos) {
+        return mDataSamples[(pos * mNumPointers + pointerIndex)
+                            * NUM_SAMPLE_DATA + SAMPLE_TOUCH_MINOR];
+    }
+
+    /**
+     * Returns a historical tool major axis coordinate, as per {@link #getToolMajor(int)}, that
+     * occurred between this event and the previous event for the given pointer.
+     * Only applies to ACTION_MOVE events.
+     *
+     * @param pointerIndex Raw index of pointer to retrieve.  Value may be from 0
+     * (the first pointer that is down) to {@link #getPointerCount()}-1.
+     * @param pos Which historical value to return; must be less than
+     * {@link #getHistorySize}
+     * 
+     * @see #getHistorySize
+     * @see #getToolMajor
+     */
+    public final float getHistoricalToolMajor(int pointerIndex, int pos) {
+        return mDataSamples[(pos * mNumPointers + pointerIndex)
+                            * NUM_SAMPLE_DATA + SAMPLE_TOOL_MAJOR];
+    }
+
+    /**
+     * Returns a historical tool minor axis coordinate, as per {@link #getToolMinor(int)}, that
+     * occurred between this event and the previous event for the given pointer.
+     * Only applies to ACTION_MOVE events.
+     *
+     * @param pointerIndex Raw index of pointer to retrieve.  Value may be from 0
+     * (the first pointer that is down) to {@link #getPointerCount()}-1.
+     * @param pos Which historical value to return; must be less than
+     * {@link #getHistorySize}
+     * 
+     * @see #getHistorySize
+     * @see #getToolMinor
+     */
+    public final float getHistoricalToolMinor(int pointerIndex, int pos) {
+        return mDataSamples[(pos * mNumPointers + pointerIndex)
+                            * NUM_SAMPLE_DATA + SAMPLE_TOOL_MINOR];
+    }
+
+    /**
+     * Returns a historical orientation coordinate, as per {@link #getOrientation(int)}, that
+     * occurred between this event and the previous event for the given pointer.
+     * Only applies to ACTION_MOVE events.
+     *
+     * @param pointerIndex Raw index of pointer to retrieve.  Value may be from 0
+     * (the first pointer that is down) to {@link #getPointerCount()}-1.
+     * @param pos Which historical value to return; must be less than
+     * {@link #getHistorySize}
+     * 
+     * @see #getHistorySize
+     * @see #getOrientation
+     */
+    public final float getHistoricalOrientation(int pointerIndex, int pos) {
+        return mDataSamples[(pos * mNumPointers + pointerIndex)
+                            * NUM_SAMPLE_DATA + SAMPLE_ORIENTATION];
+    }
+
+    /**
+     * Populates a {@link PointerCoords} object with historical pointer coordinate data,
+     * as per {@link #getPointerCoords}, that occurred between this event and the previous
+     * event for the given pointer.
+     * Only applies to ACTION_MOVE events.
+     * 
+     * @param pointerIndex Raw index of pointer to retrieve.  Value may be from 0
+     * (the first pointer that is down) to {@link #getPointerCount()}-1.
+     * @param pos Which historical value to return; must be less than
+     * {@link #getHistorySize}
+     * @param outPointerCoords The pointer coordinate object to populate.
+     * 
+     * @see #getHistorySize
+     * @see #getPointerCoords
+     */
+    public final void getHistoricalPointerCoords(int pointerIndex, int pos,
+            PointerCoords outPointerCoords) {
+        final int sampleIndex = (pos * mNumPointers + pointerIndex) * NUM_SAMPLE_DATA;
+        getPointerCoordsAtSampleIndex(sampleIndex, outPointerCoords);
+    }
+    
+    /**
+     * Returns a bitfield indicating which edges, if any, were touched by this
      * MotionEvent. For touch events, clients can use this to determine if the
      * user's finger was touching the edge of the display.
      *
@@ -1054,12 +1314,8 @@
      * @param deltaY Amount to add to the current Y coordinate of the event.
      */
     public final void offsetLocation(float deltaX, float deltaY) {
-        final int N = mNumPointers*mNumSamples*4;
-        final float[] pos = mDataSamples;
-        for (int i=0; i<N; i+=NUM_SAMPLE_DATA) {
-            pos[i+SAMPLE_X] += deltaX;
-            pos[i+SAMPLE_Y] += deltaY;
-        }
+        mXOffset += deltaX;
+        mYOffset += deltaY;
     }
 
     /**
@@ -1070,20 +1326,86 @@
      * @param y New absolute Y location.
      */
     public final void setLocation(float x, float y) {
-        float deltaX = x-mDataSamples[SAMPLE_X];
-        float deltaY = y-mDataSamples[SAMPLE_Y];
-        if (deltaX != 0 || deltaY != 0) {
-            offsetLocation(deltaX, deltaY);
+        mXOffset = x - mDataSamples[mLastDataSampleIndex + SAMPLE_X];
+        mYOffset = y - mDataSamples[mLastDataSampleIndex + SAMPLE_Y];
+    }
+    
+    private final void getPointerCoordsAtSampleIndex(int sampleIndex,
+            PointerCoords outPointerCoords) {
+        outPointerCoords.x = mDataSamples[sampleIndex + SAMPLE_X] + mXOffset;
+        outPointerCoords.y = mDataSamples[sampleIndex + SAMPLE_Y] + mYOffset;
+        outPointerCoords.pressure = mDataSamples[sampleIndex + SAMPLE_PRESSURE];
+        outPointerCoords.size = mDataSamples[sampleIndex + SAMPLE_SIZE];
+        outPointerCoords.touchMajor = mDataSamples[sampleIndex + SAMPLE_TOUCH_MAJOR];
+        outPointerCoords.touchMinor = mDataSamples[sampleIndex + SAMPLE_TOUCH_MINOR];
+        outPointerCoords.toolMajor = mDataSamples[sampleIndex + SAMPLE_TOOL_MAJOR];
+        outPointerCoords.toolMinor = mDataSamples[sampleIndex + SAMPLE_TOOL_MINOR];
+        outPointerCoords.orientation = mDataSamples[sampleIndex + SAMPLE_ORIENTATION];
+    }
+    
+    private final void setPointerCoordsAtSampleIndex(int sampleIndex,
+            PointerCoords[] pointerCoords) {
+        final int numPointers = mNumPointers;
+        for (int i = 0; i < numPointers; i++) {
+            setPointerCoordsAtSampleIndex(sampleIndex, pointerCoords[i]);
+            sampleIndex += NUM_SAMPLE_DATA;
         }
     }
+    
+    private final void setPointerCoordsAtSampleIndex(int sampleIndex,
+            PointerCoords pointerCoords) {
+        mDataSamples[sampleIndex + SAMPLE_X] = pointerCoords.x - mXOffset;
+        mDataSamples[sampleIndex + SAMPLE_Y] = pointerCoords.y - mYOffset;
+        mDataSamples[sampleIndex + SAMPLE_PRESSURE] = pointerCoords.pressure;
+        mDataSamples[sampleIndex + SAMPLE_SIZE] = pointerCoords.size;
+        mDataSamples[sampleIndex + SAMPLE_TOUCH_MAJOR] = pointerCoords.touchMajor;
+        mDataSamples[sampleIndex + SAMPLE_TOUCH_MINOR] = pointerCoords.touchMinor;
+        mDataSamples[sampleIndex + SAMPLE_TOOL_MAJOR] = pointerCoords.toolMajor;
+        mDataSamples[sampleIndex + SAMPLE_TOOL_MINOR] = pointerCoords.toolMinor;
+        mDataSamples[sampleIndex + SAMPLE_ORIENTATION] = pointerCoords.orientation;
+    }
+    
+    private final void setPointerCoordsAtSampleIndex(int sampleIndex,
+            float x, float y, float pressure, float size) {
+        mDataSamples[sampleIndex + SAMPLE_X] = x - mXOffset;
+        mDataSamples[sampleIndex + SAMPLE_Y] = y - mYOffset;
+        mDataSamples[sampleIndex + SAMPLE_PRESSURE] = pressure;
+        mDataSamples[sampleIndex + SAMPLE_SIZE] = size;
+        mDataSamples[sampleIndex + SAMPLE_TOUCH_MAJOR] = pressure;
+        mDataSamples[sampleIndex + SAMPLE_TOUCH_MINOR] = pressure;
+        mDataSamples[sampleIndex + SAMPLE_TOOL_MAJOR] = size;
+        mDataSamples[sampleIndex + SAMPLE_TOOL_MINOR] = size;
+        mDataSamples[sampleIndex + SAMPLE_ORIENTATION] = 0;
+    }
+    
+    private final void incrementNumSamplesAndReserveStorage(int dataSampleStride) {
+        if (mNumSamples == mEventTimeNanoSamples.length) {
+            long[] newEventTimeNanoSamples = new long[mNumSamples + BASE_AVAIL_SAMPLES];
+            System.arraycopy(mEventTimeNanoSamples, 0, newEventTimeNanoSamples, 0, mNumSamples);
+            mEventTimeNanoSamples = newEventTimeNanoSamples;
+        }
+        
+        int nextDataSampleIndex = mLastDataSampleIndex + dataSampleStride;
+        if (nextDataSampleIndex + dataSampleStride > mDataSamples.length) {
+            float[] newDataSamples = new float[nextDataSampleIndex
+                                               + BASE_AVAIL_SAMPLES * dataSampleStride];
+            System.arraycopy(mDataSamples, 0, newDataSamples, 0, nextDataSampleIndex);
+            mDataSamples = newDataSamples;
+        }
+        
+        mLastEventTimeNanoSampleIndex = mNumSamples;
+        mLastDataSampleIndex = nextDataSampleIndex;
+        mNumSamples += 1;
+    }
 
     /**
      * Add a new movement to the batch of movements in this event.  The event's
-     * current location, position and size is updated to the new values.  In
-     * the future, the current values in the event will be added to a list of
-     * historic values.
+     * current location, position and size is updated to the new values.
+     * The current values in the event are added to a list of historical values.
+     * 
+     * Only applies to {@link #ACTION_MOVE} events.
      *
-     * @param eventTime The time stamp for this data.
+     * @param eventTime The time stamp (in ms) for this data.
      * @param x The new X position.
      * @param y The new Y position.
      * @param pressure The new pressure.
@@ -1092,103 +1414,33 @@
      */
     public final void addBatch(long eventTime, float x, float y,
             float pressure, float size, int metaState) {
-        float[] data = mDataSamples;
-        long[] times = mTimeSamples;
+        incrementNumSamplesAndReserveStorage(NUM_SAMPLE_DATA);
         
-        final int NP = mNumPointers;
-        final int NS = mNumSamples;
-        final int NI = NP*NS;
-        final int ND = NI * NUM_SAMPLE_DATA;
-        if (data.length <= ND) {
-            final int NEW_ND = ND + (NP * (BASE_AVAIL_SAMPLES * NUM_SAMPLE_DATA));
-            float[] newData = new float[NEW_ND];
-            System.arraycopy(data, 0, newData, 0, ND);
-            mDataSamples = data = newData;
-        }
-        if (times.length <= NS) {
-            final int NEW_NS = NS + BASE_AVAIL_SAMPLES;
-            long[] newHistoryTimes = new long[NEW_NS];
-            System.arraycopy(times, 0, newHistoryTimes, 0, NS);
-            mTimeSamples = times = newHistoryTimes;
-        }
+        mEventTimeNanoSamples[mLastEventTimeNanoSampleIndex] = eventTime * MS_PER_NS;
+        setPointerCoordsAtSampleIndex(mLastDataSampleIndex, x, y, pressure, size);
         
-        times[NS] = times[0];
-        times[0] = eventTime;
-        
-        final int pos = NS*NUM_SAMPLE_DATA;
-        data[pos+SAMPLE_X] = data[SAMPLE_X];
-        data[pos+SAMPLE_Y] = data[SAMPLE_Y];
-        data[pos+SAMPLE_PRESSURE] = data[SAMPLE_PRESSURE];
-        data[pos+SAMPLE_SIZE] = data[SAMPLE_SIZE];
-        data[SAMPLE_X] = x;
-        data[SAMPLE_Y] = y;
-        data[SAMPLE_PRESSURE] = pressure;
-        data[SAMPLE_SIZE] = size;
-        mNumSamples = NS+1;
-
-        mRawX = x;
-        mRawY = y;
         mMetaState |= metaState;
     }
 
     /**
-     * Add a new movement to the batch of movements in this event.  The
-     * input data must contain (NUM_SAMPLE_DATA * {@link #getPointerCount()})
-     * samples of data.
-     *
-     * @param eventTime The time stamp for this data.
-     * @param inData The actual data.
-     * @param metaState Meta key state.
+     * Add a new movement to the batch of movements in this event.  The event's
+     * current location, position and size is updated to the new values.
+     * The current values in the event are added to a list of historical values.
      * 
-     * @hide
+     * Only applies to {@link #ACTION_MOVE} events.
+     *
+     * @param eventTime The time stamp (in ms) for this data.
+     * @param pointerCoords The new pointer coordinates.
+     * @param metaState Meta key state.
      */
-    public final void addBatch(long eventTime, float[] inData, int metaState) {
-        float[] data = mDataSamples;
-        long[] times = mTimeSamples;
+    public final void addBatch(long eventTime, PointerCoords[] pointerCoords, int metaState) {
+        final int dataSampleStride = mNumPointers * NUM_SAMPLE_DATA;
+        incrementNumSamplesAndReserveStorage(dataSampleStride);
         
-        final int NP = mNumPointers;
-        final int NS = mNumSamples;
-        final int NI = NP*NS;
-        final int ND = NI * NUM_SAMPLE_DATA;
-        if (data.length < (ND+(NP*NUM_SAMPLE_DATA))) {
-            final int NEW_ND = ND + (NP * (BASE_AVAIL_SAMPLES * NUM_SAMPLE_DATA));
-            float[] newData = new float[NEW_ND];
-            System.arraycopy(data, 0, newData, 0, ND);
-            mDataSamples = data = newData;
-        }
-        if (times.length < (NS+1)) {
-            final int NEW_NS = NS + BASE_AVAIL_SAMPLES;
-            long[] newHistoryTimes = new long[NEW_NS];
-            System.arraycopy(times, 0, newHistoryTimes, 0, NS);
-            mTimeSamples = times = newHistoryTimes;
-        }
+        mEventTimeNanoSamples[mLastEventTimeNanoSampleIndex] = eventTime * MS_PER_NS;
+        setPointerCoordsAtSampleIndex(mLastDataSampleIndex, pointerCoords);
         
-        times[NS] = times[0];
-        times[0] = eventTime;
-        
-        System.arraycopy(data, 0, data, ND, mNumPointers*NUM_SAMPLE_DATA);
-        System.arraycopy(inData, 0, data, 0, mNumPointers*NUM_SAMPLE_DATA);
-        
-        mNumSamples = NS+1;
-
-        mRawX = inData[SAMPLE_X];
-        mRawY = inData[SAMPLE_Y];
         mMetaState |= metaState;
-        
-        if (DEBUG_POINTERS) {
-            StringBuilder sb = new StringBuilder(128);
-            sb.append("Add:");
-            for (int i=0; i<mNumPointers; i++) {
-                sb.append(" #");
-                sb.append(mPointerIdentifiers[i]);
-                sb.append("(");
-                sb.append(mDataSamples[(i*NUM_SAMPLE_DATA) + SAMPLE_X]);
-                sb.append(",");
-                sb.append(mDataSamples[(i*NUM_SAMPLE_DATA) + SAMPLE_Y]);
-                sb.append(")");
-            }
-            Log.v("MotionEvent", sb.toString());
-        }
     }
 
     @Override
@@ -1201,8 +1453,42 @@
     public static final Parcelable.Creator<MotionEvent> CREATOR
             = new Parcelable.Creator<MotionEvent>() {
         public MotionEvent createFromParcel(Parcel in) {
-            MotionEvent ev = obtain();
-            ev.readFromParcel(in);
+            final int NP = in.readInt();
+            final int NS = in.readInt();
+            final int NI = NP * NS * NUM_SAMPLE_DATA;
+            
+            MotionEvent ev = obtain(NP, NS);
+            ev.mNumPointers = NP;
+            ev.mNumSamples = NS;
+            
+            ev.mDownTimeNano = in.readLong();
+            ev.mAction = in.readInt();
+            ev.mXOffset = in.readFloat();
+            ev.mYOffset = in.readFloat();
+            ev.mXPrecision = in.readFloat();
+            ev.mYPrecision = in.readFloat();
+            ev.mDeviceId = in.readInt();
+            ev.mSource = in.readInt();
+            ev.mEdgeFlags = in.readInt();
+            ev.mMetaState = in.readInt();
+            
+            final int[] pointerIdentifiers = ev.mPointerIdentifiers;
+            for (int i = 0; i < NP; i++) {
+                pointerIdentifiers[i] = in.readInt();
+            }
+            
+            final long[] eventTimeNanoSamples = ev.mEventTimeNanoSamples;
+            for (int i = 0; i < NS; i++) {
+                eventTimeNanoSamples[i] = in.readLong();
+            }
+
+            final float[] dataSamples = ev.mDataSamples;
+            for (int i = 0; i < NI; i++) {
+                dataSamples[i] = in.readFloat();
+            }
+            
+            ev.mLastEventTimeNanoSampleIndex = NS - 1;
+            ev.mLastDataSampleIndex = (NS - 1) * NP * NUM_SAMPLE_DATA;
             return ev;
         }
 
@@ -1216,79 +1502,141 @@
     }
 
     public void writeToParcel(Parcel out, int flags) {
-        out.writeLong(mDownTime);
-        out.writeLong(mEventTimeNano);
-        out.writeInt(mAction);
-        out.writeInt(mMetaState);
-        out.writeFloat(mRawX);
-        out.writeFloat(mRawY);
         final int NP = mNumPointers;
-        out.writeInt(NP);
         final int NS = mNumSamples;
+        final int NI = NP * NS * NUM_SAMPLE_DATA;
+        
+        out.writeInt(NP);
         out.writeInt(NS);
-        final int NI = NP*NS;
-        if (NI > 0) {
-            int i;
-            int[] state = mPointerIdentifiers;
-            for (i=0; i<NP; i++) {
-                out.writeInt(state[i]);
-            }
-            final int ND = NI*NUM_SAMPLE_DATA;
-            float[] history = mDataSamples;
-            for (i=0; i<ND; i++) {
-                out.writeFloat(history[i]);
-            }
-            long[] times = mTimeSamples;
-            for (i=0; i<NS; i++) {
-                out.writeLong(times[i]);
-            }
-        }
+        
+        out.writeLong(mDownTimeNano);
+        out.writeInt(mAction);
+        out.writeFloat(mXOffset);
+        out.writeFloat(mYOffset);
         out.writeFloat(mXPrecision);
         out.writeFloat(mYPrecision);
         out.writeInt(mDeviceId);
+        out.writeInt(mSource);
         out.writeInt(mEdgeFlags);
-    }
-
-    private void readFromParcel(Parcel in) {
-        mDownTime = in.readLong();
-        mEventTimeNano = in.readLong();
-        mAction = in.readInt();
-        mMetaState = in.readInt();
-        mRawX = in.readFloat();
-        mRawY = in.readFloat();
-        final int NP = in.readInt();
-        mNumPointers = NP;
-        final int NS = in.readInt();
-        mNumSamples = NS;
-        final int NI = NP*NS;
-        if (NI > 0) {
-            int[] ids = mPointerIdentifiers;
-            if (ids.length < NP) {
-                mPointerIdentifiers = ids = new int[NP];
-            }
-            for (int i=0; i<NP; i++) {
-                ids[i] = in.readInt();
-            }
-            float[] history = mDataSamples;
-            final int ND = NI*NUM_SAMPLE_DATA;
-            if (history.length < ND) {
-                mDataSamples = history = new float[ND];
-            }
-            for (int i=0; i<ND; i++) {
-                history[i] = in.readFloat();
-            }
-            long[] times = mTimeSamples;
-            if (times == null || times.length < NS) {
-                mTimeSamples = times = new long[NS];
-            }
-            for (int i=0; i<NS; i++) {
-                times[i] = in.readLong();
-            }
+        out.writeInt(mMetaState);
+        
+        final int[] pointerIdentifiers = mPointerIdentifiers;
+        for (int i = 0; i < NP; i++) {
+            out.writeInt(pointerIdentifiers[i]);
         }
-        mXPrecision = in.readFloat();
-        mYPrecision = in.readFloat();
-        mDeviceId = in.readInt();
-        mEdgeFlags = in.readInt();
-    }
+        
+        final long[] eventTimeNanoSamples = mEventTimeNanoSamples;
+        for (int i = 0; i < NS; i++) {
+            out.writeLong(eventTimeNanoSamples[i]);
+        }
 
+        final float[] dataSamples = mDataSamples;
+        for (int i = 0; i < NI; i++) {
+            out.writeFloat(dataSamples[i]);
+        }
+    }
+    
+    /**
+     * Transfer object for pointer coordinates.
+     * 
+     * Objects of this type can be used to manufacture new {@link MotionEvent} objects
+     * and to query pointer coordinate information in bulk.
+     * 
+     * Refer to {@link InputDevice} for information about how different kinds of
+     * input devices and sources represent pointer coordinates.
+     */
+    public static final class PointerCoords {
+        /**
+         * The X coordinate of the pointer movement.
+         * The interpretation varies by input source and may represent the position of
+         * the center of the contact area, a relative displacement in device-specific units
+         * or something else.
+         */
+        public float x;
+        
+        /**
+         * The Y coordinate of the pointer movement.
+         * The interpretation varies by input source and may represent the position of
+         * the center of the contact area, a relative displacement in device-specific units
+         * or something else.
+         */
+        public float y;
+        
+        /**
+         * A scaled value that describes the pressure applied to the pointer.
+         * The pressure generally ranges from 0 (no pressure at all) to 1 (normal pressure),
+         * however values higher than 1 may be generated depending on the calibration of
+         * the input device.
+         */
+        public float pressure;
+        
+        /**
+         * A scaled value of the approximate size of the pointer touch area.
+         * This represents some approximation of the area of the screen being
+         * pressed; the actual value in pixels corresponding to the
+         * touch is normalized with the device specific range of values
+         * and scaled to a value between 0 and 1. The value of size can be used to
+         * determine fat touch events.
+         */
+        public float size;
+        
+        /**
+         * The length of the major axis of an ellipse that describes the touch area at
+         * the point of contact.
+         */
+        public float touchMajor;
+        
+        /**
+         * The length of the minor axis of an ellipse that describes the touch area at
+         * the point of contact.
+         */
+        public float touchMinor;
+        
+        /**
+         * The length of the major axis of an ellipse that describes the size of
+         * the approaching tool.
+         * The tool area represents the estimated size of the finger or pen that is
+         * touching the device independent of its actual touch area at the point of contact.
+         */
+        public float toolMajor;
+        
+        /**
+         * The length of the minor axis of an ellipse that describes the size of
+         * the approaching tool.
+         * The tool area represents the estimated size of the finger or pen that is
+         * touching the device independent of its actual touch area at the point of contact.
+         */
+        public float toolMinor;
+        
+        /**
+         * The orientation of the touch area and tool area in radians clockwise from vertical.
+         * An angle of 0 degrees indicates that the major axis of contact is oriented
+         * upwards, is perfectly circular or is of unknown orientation.  A positive angle
+         * indicates that the major axis of contact is oriented to the right.  A negative angle
+         * indicates that the major axis of contact is oriented to the left.
+         * The full range is from -PI/4 radians (finger pointing fully left) to PI/4 radians
+         * (finger pointing fully right).
+         */
+        public float orientation;
+        
+        /*
+        private static final float PI_8 = (float) (Math.PI / 8);
+        
+        public float getTouchWidth() {
+            return Math.abs(orientation) > PI_8 ? touchMajor : touchMinor;
+        }
+        
+        public float getTouchHeight() {
+            return Math.abs(orientation) > PI_8 ? touchMinor : touchMajor;
+        }
+        
+        public float getToolWidth() {
+            return Math.abs(orientation) > PI_8 ? toolMajor : toolMinor;
+        }
+        
+        public float getToolHeight() {
+            return Math.abs(orientation) > PI_8 ? toolMinor : toolMajor;
+        }
+        */
+    }
 }
diff --git a/core/java/android/view/RawInputEvent.java b/core/java/android/view/RawInputEvent.java
deleted file mode 100644
index 3bbfea8..0000000
--- a/core/java/android/view/RawInputEvent.java
+++ /dev/null
@@ -1,201 +0,0 @@
-/*
- * Copyright (C) 2008 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package android.view;
-
-/**
- * @hide
- * This really belongs in services.jar; WindowManagerPolicy should go there too.
- */
-public class RawInputEvent {
-    // Event class as defined by EventHub.
-    public static final int CLASS_KEYBOARD = 0x00000001;
-    public static final int CLASS_ALPHAKEY = 0x00000002;
-    public static final int CLASS_TOUCHSCREEN = 0x00000004;
-    public static final int CLASS_TRACKBALL = 0x00000008;
-    public static final int CLASS_TOUCHSCREEN_MT = 0x00000010;
-    public static final int CLASS_DPAD = 0x00000020;
-    
-    // More special classes for QueuedEvent below.
-    public static final int CLASS_CONFIGURATION_CHANGED = 0x10000000;
-    
-    // Event types.
-
-    public static final int EV_SYN = 0x00;
-    public static final int EV_KEY = 0x01;
-    public static final int EV_REL = 0x02;
-    public static final int EV_ABS = 0x03;
-    public static final int EV_MSC = 0x04;
-    public static final int EV_SW = 0x05;
-    public static final int EV_LED = 0x11;
-    public static final int EV_SND = 0x12;
-    public static final int EV_REP = 0x14;
-    public static final int EV_FF = 0x15;
-    public static final int EV_PWR = 0x16;
-    public static final int EV_FF_STATUS = 0x17;
-
-    // Platform-specific event types.
-    
-    public static final int EV_DEVICE_ADDED = 0x10000000;
-    public static final int EV_DEVICE_REMOVED = 0x20000000;
-    
-    // Special key (EV_KEY) scan codes for pointer buttons.
-
-    public static final int BTN_FIRST = 0x100;
-
-    public static final int BTN_MISC = 0x100;
-    public static final int BTN_0 = 0x100;
-    public static final int BTN_1 = 0x101;
-    public static final int BTN_2 = 0x102;
-    public static final int BTN_3 = 0x103;
-    public static final int BTN_4 = 0x104;
-    public static final int BTN_5 = 0x105;
-    public static final int BTN_6 = 0x106;
-    public static final int BTN_7 = 0x107;
-    public static final int BTN_8 = 0x108;
-    public static final int BTN_9 = 0x109;
-
-    public static final int BTN_MOUSE = 0x110;
-    public static final int BTN_LEFT = 0x110;
-    public static final int BTN_RIGHT = 0x111;
-    public static final int BTN_MIDDLE = 0x112;
-    public static final int BTN_SIDE = 0x113;
-    public static final int BTN_EXTRA = 0x114;
-    public static final int BTN_FORWARD = 0x115;
-    public static final int BTN_BACK = 0x116;
-    public static final int BTN_TASK = 0x117;
-
-    public static final int BTN_JOYSTICK = 0x120;
-    public static final int BTN_TRIGGER = 0x120;
-    public static final int BTN_THUMB = 0x121;
-    public static final int BTN_THUMB2 = 0x122;
-    public static final int BTN_TOP = 0x123;
-    public static final int BTN_TOP2 = 0x124;
-    public static final int BTN_PINKIE = 0x125;
-    public static final int BTN_BASE = 0x126;
-    public static final int BTN_BASE2 = 0x127;
-    public static final int BTN_BASE3 = 0x128;
-    public static final int BTN_BASE4 = 0x129;
-    public static final int BTN_BASE5 = 0x12a;
-    public static final int BTN_BASE6 = 0x12b;
-    public static final int BTN_DEAD = 0x12f;
-
-    public static final int BTN_GAMEPAD = 0x130;
-    public static final int BTN_A = 0x130;
-    public static final int BTN_B = 0x131;
-    public static final int BTN_C = 0x132;
-    public static final int BTN_X = 0x133;
-    public static final int BTN_Y = 0x134;
-    public static final int BTN_Z = 0x135;
-    public static final int BTN_TL = 0x136;
-    public static final int BTN_TR = 0x137;
-    public static final int BTN_TL2 = 0x138;
-    public static final int BTN_TR2 = 0x139;
-    public static final int BTN_SELECT = 0x13a;
-    public static final int BTN_START = 0x13b;
-    public static final int BTN_MODE = 0x13c;
-    public static final int BTN_THUMBL = 0x13d;
-    public static final int BTN_THUMBR = 0x13e;
-
-    public static final int BTN_DIGI = 0x140;
-    public static final int BTN_TOOL_PEN = 0x140;
-    public static final int BTN_TOOL_RUBBER = 0x141;
-    public static final int BTN_TOOL_BRUSH = 0x142;
-    public static final int BTN_TOOL_PENCIL = 0x143;
-    public static final int BTN_TOOL_AIRBRUSH = 0x144;
-    public static final int BTN_TOOL_FINGER = 0x145;
-    public static final int BTN_TOOL_MOUSE = 0x146;
-    public static final int BTN_TOOL_LENS = 0x147;
-    public static final int BTN_TOUCH = 0x14a;
-    public static final int BTN_STYLUS = 0x14b;
-    public static final int BTN_STYLUS2 = 0x14c;
-    public static final int BTN_TOOL_DOUBLETAP = 0x14d;
-    public static final int BTN_TOOL_TRIPLETAP = 0x14e;
-
-    public static final int BTN_WHEEL = 0x150;
-    public static final int BTN_GEAR_DOWN = 0x150;
-    public static final int BTN_GEAR_UP = 0x151;
-
-    public static final int BTN_LAST = 0x15f;
-
-    // Relative axes (EV_REL) scan codes.
-
-    public static final int REL_X = 0x00;
-    public static final int REL_Y = 0x01;
-    public static final int REL_Z = 0x02;
-    public static final int REL_RX = 0x03;
-    public static final int REL_RY = 0x04;
-    public static final int REL_RZ = 0x05;
-    public static final int REL_HWHEEL = 0x06;
-    public static final int REL_DIAL = 0x07;
-    public static final int REL_WHEEL = 0x08;
-    public static final int REL_MISC = 0x09;
-    public static final int REL_MAX = 0x0f;
-
-    // Absolute axes (EV_ABS) scan codes.
-
-    public static final int ABS_X = 0x00;
-    public static final int ABS_Y = 0x01;
-    public static final int ABS_Z = 0x02;
-    public static final int ABS_RX = 0x03;
-    public static final int ABS_RY = 0x04;
-    public static final int ABS_RZ = 0x05;
-    public static final int ABS_THROTTLE = 0x06;
-    public static final int ABS_RUDDER = 0x07;
-    public static final int ABS_WHEEL = 0x08;
-    public static final int ABS_GAS = 0x09;
-    public static final int ABS_BRAKE = 0x0a;
-    public static final int ABS_HAT0X = 0x10;
-    public static final int ABS_HAT0Y = 0x11;
-    public static final int ABS_HAT1X = 0x12;
-    public static final int ABS_HAT1Y = 0x13;
-    public static final int ABS_HAT2X = 0x14;
-    public static final int ABS_HAT2Y = 0x15;
-    public static final int ABS_HAT3X = 0x16;
-    public static final int ABS_HAT3Y = 0x17;
-    public static final int ABS_PRESSURE = 0x18;
-    public static final int ABS_DISTANCE = 0x19;
-    public static final int ABS_TILT_X = 0x1a;
-    public static final int ABS_TILT_Y = 0x1b;
-    public static final int ABS_TOOL_WIDTH = 0x1c;
-    public static final int ABS_VOLUME = 0x20;
-    public static final int ABS_MISC = 0x28;
-    public static final int ABS_MT_TOUCH_MAJOR = 0x30;
-    public static final int ABS_MT_TOUCH_MINOR = 0x31;
-    public static final int ABS_MT_WIDTH_MAJOR = 0x32;
-    public static final int ABS_MT_WIDTH_MINOR = 0x33;
-    public static final int ABS_MT_ORIENTATION = 0x34;
-    public static final int ABS_MT_POSITION_X = 0x35;
-    public static final int ABS_MT_POSITION_Y = 0x36;
-    public static final int ABS_MT_TOOL_TYPE = 0x37;
-    public static final int ABS_MT_BLOB_ID = 0x38;
-    public static final int ABS_MAX = 0x3f;
-
-    // Switch events
-    public static final int SW_LID = 0x00;
-
-    public static final int SYN_REPORT = 0;
-    public static final int SYN_CONFIG = 1;
-    public static final int SYN_MT_REPORT = 2;
-    
-    public int deviceId;
-    public int type;
-    public int scancode;
-    public int keycode;
-    public int flags;
-    public int value;
-    public long when;
-}
diff --git a/core/java/android/view/Surface.java b/core/java/android/view/Surface.java
index 83ef8ba..cd0ae3b 100644
--- a/core/java/android/view/Surface.java
+++ b/core/java/android/view/Surface.java
@@ -140,13 +140,13 @@
     public static final int FLAGS_ORIENTATION_ANIMATION_DISABLE = 0x000000001;
 
     @SuppressWarnings("unused")
-    private int mSurface;
-    @SuppressWarnings("unused")
     private int mSurfaceControl;
     @SuppressWarnings("unused")
     private int mSaveCount;
     @SuppressWarnings("unused")
     private Canvas mCanvas;
+    @SuppressWarnings("unused")
+    private int mNativeSurface;
     private String mName;
 
     // The display metrics used to provide the pseudo canvas size for applications
@@ -422,13 +422,13 @@
     /* no user serviceable parts here ... */
     @Override
     protected void finalize() throws Throwable {
-        if (mSurface != 0 || mSurfaceControl != 0) {
+        if (mNativeSurface != 0 || mSurfaceControl != 0) {
             if (DEBUG_RELEASE) {
                 Log.w(LOG_TAG, "Surface.finalize() has work. You should have called release() (" 
-                        + mSurface + ", " + mSurfaceControl + ")", mCreationStack);
+                        + mNativeSurface + ", " + mSurfaceControl + ")", mCreationStack);
             } else {
                 Log.w(LOG_TAG, "Surface.finalize() has work. You should have called release() (" 
-                        + mSurface + ", " + mSurfaceControl + ")");
+                        + mNativeSurface + ", " + mSurfaceControl + ")");
             }
         }
         release();
diff --git a/core/java/android/view/SurfaceHolder.java b/core/java/android/view/SurfaceHolder.java
index 64a10d1..0d38f7b 100644
--- a/core/java/android/view/SurfaceHolder.java
+++ b/core/java/android/view/SurfaceHolder.java
@@ -119,6 +119,23 @@
     }
 
     /**
+     * Additional callbacks that can be received for {@link Callback}.
+     */
+    public interface Callback2 extends Callback {
+        /**
+         * Called when the application needs to redraw the content of its
+         * surface, after it is resized or for some other reason.  By not
+         * returning here until the redraw is complete, you can ensure that
+         * the user will not see your surface in a bad state (at its new
+         * size before it has been correctly drawn that way).  This will
+         * typically be preceeded by a call to {@link #surfaceChanged}.
+         *
+         * @param holder The SurfaceHolder whose surface has changed.
+         */
+        public void surfaceRedrawNeeded(SurfaceHolder holder);
+    }
+
+    /**
      * Add a Callback interface for this holder.  There can several Callback
      * interfaces associated to a holder.
      * 
@@ -182,7 +199,6 @@
     /**
      * Enable or disable option to keep the screen turned on while this
      * surface is displayed.  The default is false, allowing it to turn off.
-     * Enabling the option effectivelty.
      * This is safe to call from any thread.
      * 
      * @param screenOn Supply to true to force the screen to stay on, false
diff --git a/core/java/android/view/SurfaceView.java b/core/java/android/view/SurfaceView.java
index 53f0c2e..54cb4ca 100644
--- a/core/java/android/view/SurfaceView.java
+++ b/core/java/android/view/SurfaceView.java
@@ -123,7 +123,7 @@
                     handleGetNewSurface();
                 } break;
                 case UPDATE_WINDOW_MSG: {
-                    updateWindow(false);
+                    updateWindow(false, false);
                 } break;
             }
         }
@@ -132,7 +132,7 @@
     final ViewTreeObserver.OnScrollChangedListener mScrollChangedListener
             = new ViewTreeObserver.OnScrollChangedListener() {
                     public void onScrollChanged() {
-                        updateWindow(false);
+                        updateWindow(false, false);
                     }
             };
             
@@ -141,7 +141,10 @@
     boolean mViewVisibility = false;
     int mRequestedWidth = -1;
     int mRequestedHeight = -1;
-    int mRequestedFormat = PixelFormat.OPAQUE;
+    /* Set SurfaceView's format to 565 by default to maintain backward
+     * compatibility with applications assuming this format.
+     */
+    int mRequestedFormat = PixelFormat.RGB_565;
     int mRequestedType = -1;
 
     boolean mHaveFrame = false;
@@ -164,16 +167,20 @@
     
     public SurfaceView(Context context) {
         super(context);
-        setWillNotDraw(true);
+        init();
     }
     
     public SurfaceView(Context context, AttributeSet attrs) {
         super(context, attrs);
-        setWillNotDraw(true);
+        init();
     }
 
     public SurfaceView(Context context, AttributeSet attrs, int defStyle) {
         super(context, attrs, defStyle);
+        init();
+    }
+
+    private void init() {
         setWillNotDraw(true);
     }
     
@@ -203,7 +210,7 @@
         super.onWindowVisibilityChanged(visibility);
         mWindowVisibility = visibility == VISIBLE;
         mRequestedVisible = mWindowVisibility && mViewVisibility;
-        updateWindow(false);
+        updateWindow(false, false);
     }
 
     @Override
@@ -211,7 +218,7 @@
         super.setVisibility(visibility);
         mViewVisibility = visibility == VISIBLE;
         mRequestedVisible = mWindowVisibility && mViewVisibility;
-        updateWindow(false);
+        updateWindow(false, false);
     }
 
     /**
@@ -225,7 +232,7 @@
      */
     protected void showSurface() {
         if (mSession != null) {
-            updateWindow(true);
+            updateWindow(true, false);
         }
     }
 
@@ -258,7 +265,7 @@
     protected void onDetachedFromWindow() {
         getViewTreeObserver().removeOnScrollChangedListener(mScrollChangedListener);
         mRequestedVisible = false;
-        updateWindow(false);
+        updateWindow(false, false);
         mHaveFrame = false;
         if (mWindow != null) {
             try {
@@ -283,7 +290,7 @@
     @Override
     protected void onSizeChanged(int w, int h, int oldw, int oldh) {
         super.onSizeChanged(w, h, oldw, oldh);
-        updateWindow(false);
+        updateWindow(false, false);
     }
 
     @Override
@@ -336,7 +343,7 @@
         }
         // reposition ourselves where the surface is 
         mHaveFrame = true;
-        updateWindow(false);
+        updateWindow(false, false);
         super.dispatchDraw(canvas);
     }
 
@@ -390,7 +397,7 @@
         mWindowType = type;
     }
 
-    private void updateWindow(boolean force) {
+    private void updateWindow(boolean force, boolean redrawNeeded) {
         if (!mHaveFrame) {
             return;
         }
@@ -418,7 +425,7 @@
         final boolean typeChanged = mType != mRequestedType;
         if (force || creating || formatChanged || sizeChanged || visibleChanged
             || typeChanged || mLeft != mLocation[0] || mTop != mLocation[1]
-            || mUpdateWindowNeeded || mReportDrawNeeded) {
+            || mUpdateWindowNeeded || mReportDrawNeeded || redrawNeeded) {
 
             if (localLOGV) Log.i(TAG, "Changes: creating=" + creating
                     + " format=" + formatChanged + " size=" + sizeChanged
@@ -464,7 +471,7 @@
                     mWindow = new MyWindow(this);
                     mLayout.type = mWindowType;
                     mLayout.gravity = Gravity.LEFT|Gravity.TOP;
-                    mSession.add(mWindow, mLayout,
+                    mSession.addWithoutInputChannel(mWindow, mLayout,
                             mVisible ? VISIBLE : GONE, mContentInsets);
                 }
                 
@@ -517,6 +524,8 @@
                 }
 
                 try {
+                    redrawNeeded |= creating | reportDrawNeeded;
+
                     if (visible) {
                         mDestroyReportNeeded = true;
 
@@ -538,12 +547,20 @@
                                 c.surfaceChanged(mSurfaceHolder, mFormat, myWidth, myHeight);
                             }
                         }
+                        if (redrawNeeded) {
+                            for (SurfaceHolder.Callback c : callbacks) {
+                                if (c instanceof SurfaceHolder.Callback2) {
+                                    ((SurfaceHolder.Callback2)c).surfaceRedrawNeeded(
+                                            mSurfaceHolder);
+                                }
+                            }
+                        }
                     } else {
                         mSurface.release();
                     }
                 } finally {
                     mIsCreating = false;
-                    if (creating || reportDrawNeeded) {
+                    if (redrawNeeded) {
                         mSession.finishDrawing(mWindow);
                     }
                 }
@@ -573,7 +590,7 @@
 
     void handleGetNewSurface() {
         mNewSurfaceNeeded = true;
-        updateWindow(false);
+        updateWindow(false, false);
     }
 
     /**
@@ -618,41 +635,6 @@
             }
         }
 
-        public void dispatchKey(KeyEvent event) {
-            SurfaceView surfaceView = mSurfaceView.get();
-            if (surfaceView != null) {
-                //Log.w("SurfaceView", "Unexpected key event in surface: " + event);
-                if (surfaceView.mSession != null && surfaceView.mSurface != null) {
-                    try {
-                        surfaceView.mSession.finishKey(surfaceView.mWindow);
-                    } catch (RemoteException ex) {
-                    }
-                }
-            }
-        }
-
-        public void dispatchPointer(MotionEvent event, long eventTime,
-                boolean callWhenDone) {
-            Log.w("SurfaceView", "Unexpected pointer event in surface: " + event);
-            //if (mSession != null && mSurface != null) {
-            //    try {
-            //        //mSession.finishKey(mWindow);
-            //    } catch (RemoteException ex) {
-            //    }
-            //}
-        }
-
-        public void dispatchTrackball(MotionEvent event, long eventTime,
-                boolean callWhenDone) {
-            Log.w("SurfaceView", "Unexpected trackball event in surface: " + event);
-            //if (mSession != null && mSurface != null) {
-            //    try {
-            //        //mSession.finishKey(mWindow);
-            //    } catch (RemoteException ex) {
-            //    }
-            //}
-        }
-
         public void dispatchAppVisibility(boolean visible) {
             // The point of SurfaceView is to let the app control the surface.
         }
@@ -679,7 +661,6 @@
     private SurfaceHolder mSurfaceHolder = new SurfaceHolder() {
         
         private static final String LOG_TAG = "SurfaceHolder";
-        private int mSaveCount;
         
         public boolean isCreating() {
             return mIsCreating;
@@ -717,9 +698,15 @@
         }
 
         public void setFormat(int format) {
+
+            // for backward compatibility reason, OPAQUE always
+            // means 565 for SurfaceView
+            if (format == PixelFormat.OPAQUE)
+                format = PixelFormat.RGB_565;
+
             mRequestedFormat = format;
             if (mWindow != null) {
-                updateWindow(false);
+                updateWindow(false, false);
             }
         }
 
@@ -736,7 +723,7 @@
             case SURFACE_TYPE_PUSH_BUFFERS:
                 mRequestedType = type;
                 if (mWindow != null) {
-                    updateWindow(false);
+                    updateWindow(false, false);
                 }
                 break;
             }
diff --git a/core/java/android/view/VelocityTracker.java b/core/java/android/view/VelocityTracker.java
index aab76c4..e69b807 100644
--- a/core/java/android/view/VelocityTracker.java
+++ b/core/java/android/view/VelocityTracker.java
@@ -206,7 +206,7 @@
             final long oldestTime = pastTime[oldestTouch];
             float accumX = 0;
             float accumY = 0;
-            float N = (lastTouch - oldestTouch + NUM_PAST) % NUM_PAST + 1;
+            int N = (lastTouch - oldestTouch + NUM_PAST) % NUM_PAST + 1;
             // Skip the last received event, since it is probably pretty noisy.
             if (N > 3) N--;
 
diff --git a/core/java/android/view/View.java b/core/java/android/view/View.java
index f9abe60..c3f81a2 100644
--- a/core/java/android/view/View.java
+++ b/core/java/android/view/View.java
@@ -3005,6 +3005,16 @@
     }
 
     /**
+     * Determine if this view has the FITS_SYSTEM_WINDOWS flag set.
+     * @return True if window has FITS_SYSTEM_WINDOWS set
+     *
+     * @hide
+     */
+    public boolean isFitsSystemWindowsFlagSet() {
+        return (mViewFlags & FITS_SYSTEM_WINDOWS) == FITS_SYSTEM_WINDOWS;
+    }
+
+    /**
      * Returns the visibility status for this view.
      *
      * @return One of {@link #VISIBLE}, {@link #INVISIBLE}, or {@link #GONE}.
diff --git a/core/java/android/view/ViewGroup.java b/core/java/android/view/ViewGroup.java
index eca583f..e7b6c50 100644
--- a/core/java/android/view/ViewGroup.java
+++ b/core/java/android/view/ViewGroup.java
@@ -223,8 +223,9 @@
 
     /**
      * When set, this ViewGroup should not intercept touch events.
+     * {@hide}
      */
-    private static final int FLAG_DISALLOW_INTERCEPT = 0x80000;
+    protected static final int FLAG_DISALLOW_INTERCEPT = 0x80000;
 
     /**
      * Indicates which types of drawing caches are to be kept in memory.
diff --git a/core/java/android/view/ViewRoot.java b/core/java/android/view/ViewRoot.java
index 03efea9..7ce04cf 100644
--- a/core/java/android/view/ViewRoot.java
+++ b/core/java/android/view/ViewRoot.java
@@ -16,8 +16,10 @@
 
 package android.view;
 
+import com.android.internal.view.BaseSurfaceHolder;
 import com.android.internal.view.IInputMethodCallback;
 import com.android.internal.view.IInputMethodSession;
+import com.android.internal.view.RootViewSurfaceTaker;
 
 import android.graphics.Canvas;
 import android.graphics.PixelFormat;
@@ -26,12 +28,12 @@
 import android.graphics.Region;
 import android.os.*;
 import android.os.Process;
-import android.os.SystemProperties;
 import android.util.AndroidRuntimeException;
 import android.util.Config;
 import android.util.DisplayMetrics;
 import android.util.Log;
 import android.util.EventLog;
+import android.util.Slog;
 import android.util.SparseArray;
 import android.view.View.MeasureSpec;
 import android.view.accessibility.AccessibilityEvent;
@@ -50,6 +52,7 @@
 import android.media.AudioManager;
 
 import java.lang.ref.WeakReference;
+import java.io.FileDescriptor;
 import java.io.IOException;
 import java.io.OutputStream;
 import java.util.ArrayList;
@@ -76,6 +79,7 @@
     /** @noinspection PointlessBooleanExpression*/
     private static final boolean DEBUG_DRAW = false || LOCAL_LOGV;
     private static final boolean DEBUG_LAYOUT = false || LOCAL_LOGV;
+    private static final boolean DEBUG_INPUT = true || LOCAL_LOGV;
     private static final boolean DEBUG_INPUT_RESIZE = false || LOCAL_LOGV;
     private static final boolean DEBUG_ORIENTATION = false || LOCAL_LOGV;
     private static final boolean DEBUG_TRACKBALL = false || LOCAL_LOGV;
@@ -133,6 +137,11 @@
     int mViewVisibility;
     boolean mAppVisible = true;
 
+    SurfaceHolder.Callback2 mSurfaceHolderCallback;
+    BaseSurfaceHolder mSurfaceHolder;
+    boolean mIsCreating;
+    boolean mDrawingAllowed;
+    
     final Region mTransparentRegion;
     final Region mPreviousTransparentRegion;
 
@@ -144,7 +153,10 @@
     CompatibilityInfo.Translator mTranslator;
 
     final View.AttachInfo mAttachInfo;
-
+    InputChannel mInputChannel;
+    InputQueue.Callback mInputQueueCallback;
+    InputQueue mInputQueue;
+    
     final Rect mTempRect; // used in the transaction to not thrash the heap.
     final Rect mVisRect; // used to retrieve visible rect of focused view.
 
@@ -210,7 +222,7 @@
     AudioManager mAudioManager;
 
     private final int mDensity;
-
+    
     public static IWindowSession getWindowSession(Looper mainLooper) {
         synchronized (mStaticInit) {
             if (!mInitialized) {
@@ -435,6 +447,14 @@
                 mView = view;
                 mWindowAttributes.copyFrom(attrs);
                 attrs = mWindowAttributes;
+                if (view instanceof RootViewSurfaceTaker) {
+                    mSurfaceHolderCallback =
+                            ((RootViewSurfaceTaker)view).willYouTakeTheSurface();
+                    if (mSurfaceHolderCallback != null) {
+                        mSurfaceHolder = new TakenSurfaceHolder();
+                        mSurfaceHolder.setFormat(PixelFormat.UNKNOWN);
+                    }
+                }
                 Resources resources = mView.getContext().getResources();
                 CompatibilityInfo compatibilityInfo = resources.getCompatibilityInfo();
                 mTranslator = compatibilityInfo.getTranslator();
@@ -473,13 +493,16 @@
                 // manager, to make sure we do the relayout before receiving
                 // any other events from the system.
                 requestLayout();
+                mInputChannel = new InputChannel();
                 try {
                     res = sWindowSession.add(mWindow, mWindowAttributes,
-                            getHostVisibility(), mAttachInfo.mContentInsets);
+                            getHostVisibility(), mAttachInfo.mContentInsets,
+                            mInputChannel);
                 } catch (RemoteException e) {
                     mAdded = false;
                     mView = null;
                     mAttachInfo.mRootView = null;
+                    mInputChannel = null;
                     unscheduleTraversals();
                     throw new RuntimeException("Adding window failed", e);
                 } finally {
@@ -487,13 +510,13 @@
                         attrs.restore();
                     }
                 }
-
+                
                 if (mTranslator != null) {
                     mTranslator.translateRectInScreenToAppWindow(mAttachInfo.mContentInsets);
                 }
                 mPendingContentInsets.set(mAttachInfo.mContentInsets);
                 mPendingVisibleInsets.set(0, 0, 0, 0);
-                if (Config.LOGV) Log.v("ViewRoot", "Added window " + mWindow);
+                if (Config.LOGV) Log.v(TAG, "Added window " + mWindow);
                 if (res < WindowManagerImpl.ADD_OKAY) {
                     mView = null;
                     mAttachInfo.mRootView = null;
@@ -533,6 +556,19 @@
                     throw new RuntimeException(
                         "Unable to add window -- unknown error code " + res);
                 }
+
+                if (view instanceof RootViewSurfaceTaker) {
+                    mInputQueueCallback =
+                        ((RootViewSurfaceTaker)view).willYouTakeTheInputQueue();
+                }
+                if (mInputQueueCallback != null) {
+                    mInputQueue = new InputQueue(mInputChannel);
+                    mInputQueueCallback.onInputQueueCreated(mInputQueue);
+                } else {
+                    InputQueue.registerInputChannel(mInputChannel, mInputHandler,
+                            Looper.myQueue());
+                }
+                
                 view.assignParent(this);
                 mAddedTouchMode = (res&WindowManagerImpl.ADD_FLAG_IN_TOUCH_MODE) != 0;
                 mAppVisible = (res&WindowManagerImpl.ADD_FLAG_APP_VISIBLE) != 0;
@@ -682,6 +718,7 @@
         boolean windowResizesToFitContent = false;
         boolean fullRedrawNeeded = mFullRedrawNeeded;
         boolean newSurface = false;
+        boolean surfaceChanged = false;
         WindowManager.LayoutParams lp = mWindowAttributes;
 
         int desiredWindowWidth;
@@ -700,6 +737,7 @@
         WindowManager.LayoutParams params = null;
         if (mWindowAttributesChanged) {
             mWindowAttributesChanged = false;
+            surfaceChanged = true;
             params = lp;
         }
         Rect frame = mWinFrame;
@@ -717,7 +755,7 @@
             // object is not initialized to its backing store, but soon it
             // will be (assuming the window is visible).
             attachInfo.mSurface = mSurface;
-            attachInfo.mTranslucentWindow = lp.format != PixelFormat.OPAQUE;
+            attachInfo.mTranslucentWindow = PixelFormat.formatHasAlpha(lp.format);
             attachInfo.mHasWindowFocus = false;
             attachInfo.mWindowVisibility = viewVisibility;
             attachInfo.mRecomputeGlobalAttributes = false;
@@ -731,7 +769,7 @@
             desiredWindowWidth = frame.width();
             desiredWindowHeight = frame.height();
             if (desiredWindowWidth != mWidth || desiredWindowHeight != mHeight) {
-                if (DEBUG_ORIENTATION) Log.v("ViewRoot",
+                if (DEBUG_ORIENTATION) Log.v(TAG,
                         "View " + host + " resized to: " + frame);
                 fullRedrawNeeded = true;
                 mLayoutRequested = true;
@@ -795,7 +833,7 @@
             childHeightMeasureSpec = getRootMeasureSpec(desiredWindowHeight, lp.height);
 
             // Ask host how big it wants to be
-            if (DEBUG_ORIENTATION || DEBUG_LAYOUT) Log.v("ViewRoot",
+            if (DEBUG_ORIENTATION || DEBUG_LAYOUT) Log.v(TAG,
                     "Measuring " + host + " in display " + desiredWindowWidth
                     + "x" + desiredWindowHeight + "...");
             host.measure(childWidthMeasureSpec, childHeightMeasureSpec);
@@ -886,11 +924,16 @@
                 }
             }
 
+            if (mSurfaceHolder != null) {
+                mSurfaceHolder.mSurfaceLock.lock();
+                mDrawingAllowed = true;
+            }
+            
             boolean initialized = false;
             boolean contentInsetsChanged = false;
             boolean visibleInsetsChanged;
+            boolean hadSurface = mSurface.isValid();
             try {
-                boolean hadSurface = mSurface.isValid();
                 int fl = 0;
                 if (params != null) {
                     fl = params.flags;
@@ -965,8 +1008,9 @@
                 }
             } catch (RemoteException e) {
             }
+            
             if (DEBUG_ORIENTATION) Log.v(
-                    "ViewRoot", "Relayout returned: frame=" + frame + ", surface=" + mSurface);
+                    TAG, "Relayout returned: frame=" + frame + ", surface=" + mSurface);
 
             attachInfo.mWindowLeft = frame.left;
             attachInfo.mWindowTop = frame.top;
@@ -977,6 +1021,57 @@
             mWidth = frame.width();
             mHeight = frame.height();
 
+            if (mSurfaceHolder != null) {
+                // The app owns the surface; tell it about what is going on.
+                if (mSurface.isValid()) {
+                    // XXX .copyFrom() doesn't work!
+                    //mSurfaceHolder.mSurface.copyFrom(mSurface);
+                    mSurfaceHolder.mSurface = mSurface;
+                }
+                mSurfaceHolder.mSurfaceLock.unlock();
+                if (mSurface.isValid()) {
+                    if (!hadSurface) {
+                        mSurfaceHolder.ungetCallbacks();
+
+                        mIsCreating = true;
+                        mSurfaceHolderCallback.surfaceCreated(mSurfaceHolder);
+                        SurfaceHolder.Callback callbacks[] = mSurfaceHolder.getCallbacks();
+                        if (callbacks != null) {
+                            for (SurfaceHolder.Callback c : callbacks) {
+                                c.surfaceCreated(mSurfaceHolder);
+                            }
+                        }
+                        surfaceChanged = true;
+                    }
+                    if (surfaceChanged) {
+                        mSurfaceHolderCallback.surfaceChanged(mSurfaceHolder,
+                                lp.format, mWidth, mHeight);
+                        SurfaceHolder.Callback callbacks[] = mSurfaceHolder.getCallbacks();
+                        if (callbacks != null) {
+                            for (SurfaceHolder.Callback c : callbacks) {
+                                c.surfaceChanged(mSurfaceHolder, lp.format,
+                                        mWidth, mHeight);
+                            }
+                        }
+                    }
+                    mIsCreating = false;
+                } else if (hadSurface) {
+                    mSurfaceHolder.ungetCallbacks();
+                    SurfaceHolder.Callback callbacks[] = mSurfaceHolder.getCallbacks();
+                    mSurfaceHolderCallback.surfaceDestroyed(mSurfaceHolder);
+                    if (callbacks != null) {
+                        for (SurfaceHolder.Callback c : callbacks) {
+                            c.surfaceDestroyed(mSurfaceHolder);
+                        }
+                    }
+                    mSurfaceHolder.mSurfaceLock.lock();
+                    // Make surface invalid.
+                    //mSurfaceHolder.mSurface.copyFrom(mSurface);
+                    mSurfaceHolder.mSurface = new Surface();
+                    mSurfaceHolder.mSurfaceLock.unlock();
+                }
+            }
+            
             if (initialized) {
                 mGlCanvas.setViewport((int) (mWidth * appScale + 0.5f),
                         (int) (mHeight * appScale + 0.5f));
@@ -1036,7 +1131,7 @@
             mLayoutRequested = false;
             mScrollMayChange = true;
             if (DEBUG_ORIENTATION || DEBUG_LAYOUT) Log.v(
-                "ViewRoot", "Laying out " + host + " to (" +
+                TAG, "Laying out " + host + " to (" +
                 host.mMeasuredWidth + ", " + host.mMeasuredHeight + ")");
             long startTime = 0L;
             if (Config.DEBUG && ViewDebug.profileLayout) {
@@ -1165,9 +1260,21 @@
             if ((relayoutResult&WindowManagerImpl.RELAYOUT_FIRST_TIME) != 0
                     || mReportNextDraw) {
                 if (LOCAL_LOGV) {
-                    Log.v("ViewRoot", "FINISHED DRAWING: " + mWindowAttributes.getTitle());
+                    Log.v(TAG, "FINISHED DRAWING: " + mWindowAttributes.getTitle());
                 }
                 mReportNextDraw = false;
+                if (mSurfaceHolder != null && mSurface.isValid()) {
+                    mSurfaceHolderCallback.surfaceRedrawNeeded(mSurfaceHolder);
+                    SurfaceHolder.Callback callbacks[] = mSurfaceHolder.getCallbacks();
+                    if (callbacks != null) {
+                        for (SurfaceHolder.Callback c : callbacks) {
+                            if (c instanceof SurfaceHolder.Callback2) {
+                                ((SurfaceHolder.Callback2)c).surfaceRedrawNeeded(
+                                        mSurfaceHolder);
+                            }
+                        }
+                    }
+                }
                 try {
                     sWindowSession.finishDrawing(mWindow);
                 } catch (RemoteException e) {
@@ -1268,6 +1375,12 @@
         boolean scalingRequired = mAttachInfo.mScalingRequired;
 
         Rect dirty = mDirty;
+        if (mSurfaceHolder != null) {
+            // The app owns the surface, we won't draw.
+            dirty.setEmpty();
+            return;
+        }
+        
         if (mUseGL) {
             if (!dirty.isEmpty()) {
                 Canvas canvas = mGlCanvas;
@@ -1324,7 +1437,7 @@
         }
 
         if (DEBUG_ORIENTATION || DEBUG_DRAW) {
-            Log.v("ViewRoot", "Draw " + mView + "/"
+            Log.v(TAG, "Draw " + mView + "/"
                     + mWindowAttributes.getTitle()
                     + ": dirty={" + dirty.left + "," + dirty.top
                     + "," + dirty.right + "," + dirty.bottom + "} surface="
@@ -1332,107 +1445,109 @@
                     appScale + ", width=" + mWidth + ", height=" + mHeight);
         }
 
-        Canvas canvas;
-        try {
-            int left = dirty.left;
-            int top = dirty.top;
-            int right = dirty.right;
-            int bottom = dirty.bottom;
-            canvas = surface.lockCanvas(dirty);
+        if (!dirty.isEmpty() || mIsAnimating) {
+            Canvas canvas;
+            try {
+                int left = dirty.left;
+                int top = dirty.top;
+                int right = dirty.right;
+                int bottom = dirty.bottom;
+                canvas = surface.lockCanvas(dirty);
 
-            if (left != dirty.left || top != dirty.top || right != dirty.right ||
-                    bottom != dirty.bottom) {
-                mAttachInfo.mIgnoreDirtyState = true;
+                if (left != dirty.left || top != dirty.top || right != dirty.right ||
+                        bottom != dirty.bottom) {
+                    mAttachInfo.mIgnoreDirtyState = true;
+                }
+
+                // TODO: Do this in native
+                canvas.setDensity(mDensity);
+            } catch (Surface.OutOfResourcesException e) {
+                Log.e(TAG, "OutOfResourcesException locking surface", e);
+                // TODO: we should ask the window manager to do something!
+                // for now we just do nothing
+                return;
+            } catch (IllegalArgumentException e) {
+                Log.e(TAG, "IllegalArgumentException locking surface", e);
+                // TODO: we should ask the window manager to do something!
+                // for now we just do nothing
+                return;
             }
 
-            // TODO: Do this in native
-            canvas.setDensity(mDensity);
-        } catch (Surface.OutOfResourcesException e) {
-            Log.e("ViewRoot", "OutOfResourcesException locking surface", e);
-            // TODO: we should ask the window manager to do something!
-            // for now we just do nothing
-            return;
-        } catch (IllegalArgumentException e) {
-            Log.e("ViewRoot", "IllegalArgumentException locking surface", e);
-            // TODO: we should ask the window manager to do something!
-            // for now we just do nothing
-            return;
-        }
+            try {
+                if (!dirty.isEmpty() || mIsAnimating) {
+                    long startTime = 0L;
 
-        try {
-            if (!dirty.isEmpty() || mIsAnimating) {
-                long startTime = 0L;
-
-                if (DEBUG_ORIENTATION || DEBUG_DRAW) {
-                    Log.v("ViewRoot", "Surface " + surface + " drawing to bitmap w="
-                            + canvas.getWidth() + ", h=" + canvas.getHeight());
-                    //canvas.drawARGB(255, 255, 0, 0);
-                }
-
-                if (Config.DEBUG && ViewDebug.profileDrawing) {
-                    startTime = SystemClock.elapsedRealtime();
-                }
-
-                // If this bitmap's format includes an alpha channel, we
-                // need to clear it before drawing so that the child will
-                // properly re-composite its drawing on a transparent
-                // background. This automatically respects the clip/dirty region
-                // or
-                // If we are applying an offset, we need to clear the area
-                // where the offset doesn't appear to avoid having garbage
-                // left in the blank areas.
-                if (!canvas.isOpaque() || yoff != 0) {
-                    canvas.drawColor(0, PorterDuff.Mode.CLEAR);
-                }
-
-                dirty.setEmpty();
-                mIsAnimating = false;
-                mAttachInfo.mDrawingTime = SystemClock.uptimeMillis();
-                mView.mPrivateFlags |= View.DRAWN;
-
-                if (DEBUG_DRAW) {
-                    Context cxt = mView.getContext();
-                    Log.i(TAG, "Drawing: package:" + cxt.getPackageName() +
-                            ", metrics=" + cxt.getResources().getDisplayMetrics() +
-                            ", compatibilityInfo=" + cxt.getResources().getCompatibilityInfo());
-                }
-                int saveCount = canvas.save(Canvas.MATRIX_SAVE_FLAG);
-                try {
-                    canvas.translate(0, -yoff);
-                    if (mTranslator != null) {
-                        mTranslator.translateCanvas(canvas);
+                    if (DEBUG_ORIENTATION || DEBUG_DRAW) {
+                        Log.v(TAG, "Surface " + surface + " drawing to bitmap w="
+                                + canvas.getWidth() + ", h=" + canvas.getHeight());
+                        //canvas.drawARGB(255, 255, 0, 0);
                     }
-                    canvas.setScreenDensity(scalingRequired
-                            ? DisplayMetrics.DENSITY_DEVICE : 0);
-                    mView.draw(canvas);
-                } finally {
-                    mAttachInfo.mIgnoreDirtyState = false;
-                    canvas.restoreToCount(saveCount);
-                }
 
-                if (Config.DEBUG && ViewDebug.consistencyCheckEnabled) {
-                    mView.dispatchConsistencyCheck(ViewDebug.CONSISTENCY_DRAWING);
-                }
-
-                if (SHOW_FPS || Config.DEBUG && ViewDebug.showFps) {
-                    int now = (int)SystemClock.elapsedRealtime();
-                    if (sDrawTime != 0) {
-                        nativeShowFPS(canvas, now - sDrawTime);
+                    if (Config.DEBUG && ViewDebug.profileDrawing) {
+                        startTime = SystemClock.elapsedRealtime();
                     }
-                    sDrawTime = now;
+
+                    // If this bitmap's format includes an alpha channel, we
+                    // need to clear it before drawing so that the child will
+                    // properly re-composite its drawing on a transparent
+                    // background. This automatically respects the clip/dirty region
+                    // or
+                    // If we are applying an offset, we need to clear the area
+                    // where the offset doesn't appear to avoid having garbage
+                    // left in the blank areas.
+                    if (!canvas.isOpaque() || yoff != 0) {
+                        canvas.drawColor(0, PorterDuff.Mode.CLEAR);
+                    }
+
+                    dirty.setEmpty();
+                    mIsAnimating = false;
+                    mAttachInfo.mDrawingTime = SystemClock.uptimeMillis();
+                    mView.mPrivateFlags |= View.DRAWN;
+
+                    if (DEBUG_DRAW) {
+                        Context cxt = mView.getContext();
+                        Log.i(TAG, "Drawing: package:" + cxt.getPackageName() +
+                                ", metrics=" + cxt.getResources().getDisplayMetrics() +
+                                ", compatibilityInfo=" + cxt.getResources().getCompatibilityInfo());
+                    }
+                    int saveCount = canvas.save(Canvas.MATRIX_SAVE_FLAG);
+                    try {
+                        canvas.translate(0, -yoff);
+                        if (mTranslator != null) {
+                            mTranslator.translateCanvas(canvas);
+                        }
+                        canvas.setScreenDensity(scalingRequired
+                                ? DisplayMetrics.DENSITY_DEVICE : 0);
+                        mView.draw(canvas);
+                    } finally {
+                        mAttachInfo.mIgnoreDirtyState = false;
+                        canvas.restoreToCount(saveCount);
+                    }
+
+                    if (Config.DEBUG && ViewDebug.consistencyCheckEnabled) {
+                        mView.dispatchConsistencyCheck(ViewDebug.CONSISTENCY_DRAWING);
+                    }
+
+                    if (SHOW_FPS || Config.DEBUG && ViewDebug.showFps) {
+                        int now = (int)SystemClock.elapsedRealtime();
+                        if (sDrawTime != 0) {
+                            nativeShowFPS(canvas, now - sDrawTime);
+                        }
+                        sDrawTime = now;
+                    }
+
+                    if (Config.DEBUG && ViewDebug.profileDrawing) {
+                        EventLog.writeEvent(60000, SystemClock.elapsedRealtime() - startTime);
+                    }
                 }
 
-                if (Config.DEBUG && ViewDebug.profileDrawing) {
-                    EventLog.writeEvent(60000, SystemClock.elapsedRealtime() - startTime);
-                }
+            } finally {
+                surface.unlockCanvasAndPost(canvas);
             }
-
-        } finally {
-            surface.unlockCanvasAndPost(canvas);
         }
 
         if (LOCAL_LOGV) {
-            Log.v("ViewRoot", "Surface " + surface + " unlockCanvasAndPost");
+            Log.v(TAG, "Surface " + surface + " unlockCanvasAndPost");
         }
 
         if (scrolling) {
@@ -1624,7 +1739,7 @@
     }
 
     void dispatchDetachedFromWindow() {
-        if (Config.LOGV) Log.v("ViewRoot", "Detaching in " + this + " of " + mSurface);
+        if (Config.LOGV) Log.v(TAG, "Detaching in " + this + " of " + mSurface);
 
         if (mView != null) {
             mView.dispatchDetachedFromWindow();
@@ -1639,10 +1754,26 @@
         }
         mSurface.release();
 
+        if (mInputChannel != null) {
+            if (mInputQueueCallback != null) {
+                mInputQueueCallback.onInputQueueDestroyed(mInputQueue);
+                mInputQueueCallback = null;
+            } else {
+                InputQueue.unregisterInputChannel(mInputChannel);
+            }
+        }
+        
         try {
             sWindowSession.remove(mWindow);
         } catch (RemoteException e) {
         }
+        
+        // Dispose the input channel after removing the window so the Window Manager
+        // doesn't interpret the input channel being closed as an abnormal termination.
+        if (mInputChannel != null) {
+            mInputChannel.dispose();
+            mInputChannel = null;
+        }
     }
 
     void updateConfiguration(Configuration config, boolean force) {
@@ -1736,118 +1867,27 @@
             break;
         case DISPATCH_KEY:
             if (LOCAL_LOGV) Log.v(
-                "ViewRoot", "Dispatching key "
+                TAG, "Dispatching key "
                 + msg.obj + " to " + mView);
             deliverKeyEvent((KeyEvent)msg.obj, true);
             break;
         case DISPATCH_POINTER: {
-            MotionEvent event = (MotionEvent)msg.obj;
-            boolean callWhenDone = msg.arg1 != 0;
-            
-            if (event == null) {
-                try {
-                    long timeBeforeGettingEvents;
-                    if (MEASURE_LATENCY) {
-                        timeBeforeGettingEvents = System.nanoTime();
-                    }
-
-                    event = sWindowSession.getPendingPointerMove(mWindow);
-
-                    if (MEASURE_LATENCY && event != null) {
-                        lt.sample("9 Client got events      ", System.nanoTime() - event.getEventTimeNano());
-                        lt.sample("8 Client getting events  ", timeBeforeGettingEvents - event.getEventTimeNano());
-                    }
-                } catch (RemoteException e) {
-                }
-                callWhenDone = false;
-            }
-            if (event != null && mTranslator != null) {
-                mTranslator.translateEventInScreenToAppWindow(event);
-            }
+            MotionEvent event = (MotionEvent) msg.obj;
             try {
-                boolean handled;
-                if (mView != null && mAdded && event != null) {
-
-                    // enter touch mode on the down
-                    boolean isDown = event.getAction() == MotionEvent.ACTION_DOWN;
-                    if (isDown) {
-                        ensureTouchMode(true);
-                    }
-                    if(Config.LOGV) {
-                        captureMotionLog("captureDispatchPointer", event);
-                    }
-                    if (mCurScrollY != 0) {
-                        event.offsetLocation(0, mCurScrollY);
-                    }
-                    if (MEASURE_LATENCY) {
-                        lt.sample("A Dispatching TouchEvents", System.nanoTime() - event.getEventTimeNano());
-                    }
-                    handled = mView.dispatchTouchEvent(event);
-                    if (MEASURE_LATENCY) {
-                        lt.sample("B Dispatched TouchEvents ", System.nanoTime() - event.getEventTimeNano());
-                    }
-                    if (!handled && isDown) {
-                        int edgeSlop = mViewConfiguration.getScaledEdgeSlop();
-
-                        final int edgeFlags = event.getEdgeFlags();
-                        int direction = View.FOCUS_UP;
-                        int x = (int)event.getX();
-                        int y = (int)event.getY();
-                        final int[] deltas = new int[2];
-
-                        if ((edgeFlags & MotionEvent.EDGE_TOP) != 0) {
-                            direction = View.FOCUS_DOWN;
-                            if ((edgeFlags & MotionEvent.EDGE_LEFT) != 0) {
-                                deltas[0] = edgeSlop;
-                                x += edgeSlop;
-                            } else if ((edgeFlags & MotionEvent.EDGE_RIGHT) != 0) {
-                                deltas[0] = -edgeSlop;
-                                x -= edgeSlop;
-                            }
-                        } else if ((edgeFlags & MotionEvent.EDGE_BOTTOM) != 0) {
-                            direction = View.FOCUS_UP;
-                            if ((edgeFlags & MotionEvent.EDGE_LEFT) != 0) {
-                                deltas[0] = edgeSlop;
-                                x += edgeSlop;
-                            } else if ((edgeFlags & MotionEvent.EDGE_RIGHT) != 0) {
-                                deltas[0] = -edgeSlop;
-                                x -= edgeSlop;
-                            }
-                        } else if ((edgeFlags & MotionEvent.EDGE_LEFT) != 0) {
-                            direction = View.FOCUS_RIGHT;
-                        } else if ((edgeFlags & MotionEvent.EDGE_RIGHT) != 0) {
-                            direction = View.FOCUS_LEFT;
-                        }
-
-                        if (edgeFlags != 0 && mView instanceof ViewGroup) {
-                            View nearest = FocusFinder.getInstance().findNearestTouchable(
-                                    ((ViewGroup) mView), x, y, direction, deltas);
-                            if (nearest != null) {
-                                event.offsetLocation(deltas[0], deltas[1]);
-                                event.setEdgeFlags(0);
-                                mView.dispatchTouchEvent(event);
-                            }
-                        }
-                    }
-                }
+                deliverPointerEvent(event);
             } finally {
-                if (callWhenDone) {
-                    try {
-                        sWindowSession.finishKey(mWindow);
-                    } catch (RemoteException e) {
-                    }
-                }
-                if (event != null) {
-                    event.recycle();
-                }
+                event.recycle();
                 if (LOCAL_LOGV || WATCH_POINTER) Log.i(TAG, "Done dispatching!");
-                // Let the exception fall through -- the looper will catch
-                // it and take care of the bad app for us.
             }
         } break;
-        case DISPATCH_TRACKBALL:
-            deliverTrackballEvent((MotionEvent)msg.obj, msg.arg1 != 0);
-            break;
+        case DISPATCH_TRACKBALL: {
+            MotionEvent event = (MotionEvent) msg.obj;
+            try {
+                deliverTrackballEvent(event);
+            } finally {
+                event.recycle();
+            }
+        } break;
         case DISPATCH_APP_VISIBILITY:
             handleAppVisibility(msg.arg1 != 0);
             break;
@@ -1949,7 +1989,7 @@
             break;
         case DISPATCH_KEY_FROM_IME: {
             if (LOCAL_LOGV) Log.v(
-                "ViewRoot", "Dispatching key "
+                TAG, "Dispatching key "
                 + msg.obj + " from IME to " + mView);
             KeyEvent event = (KeyEvent)msg.obj;
             if ((event.getFlags()&KeyEvent.FLAG_FROM_SYSTEM) != 0) {
@@ -1979,7 +2019,14 @@
         } break;
         }
     }
-
+    
+    private void finishKeyEvent(KeyEvent event) {
+        if (mFinishedCallback != null) {
+            mFinishedCallback.run();
+            mFinishedCallback = null;
+        }
+    }
+    
     /**
      * Something in the current window tells us we need to change the touch mode.  For
      * example, we are not in touch mode, and the user touches the screen.
@@ -2101,50 +2148,95 @@
         return false;
     }
 
-
-    private void deliverTrackballEvent(MotionEvent event, boolean callWhenDone) {
-        if (event == null) {
-            try {
-                event = sWindowSession.getPendingTrackballMove(mWindow);
-            } catch (RemoteException e) {
-            }
-            callWhenDone = false;
+    private void deliverPointerEvent(MotionEvent event) {
+        if (mTranslator != null) {
+            mTranslator.translateEventInScreenToAppWindow(event);
         }
+        
+        boolean handled;
+        if (mView != null && mAdded) {
 
+            // enter touch mode on the down
+            boolean isDown = event.getAction() == MotionEvent.ACTION_DOWN;
+            if (isDown) {
+                ensureTouchMode(true);
+            }
+            if(Config.LOGV) {
+                captureMotionLog("captureDispatchPointer", event);
+            }
+            if (mCurScrollY != 0) {
+                event.offsetLocation(0, mCurScrollY);
+            }
+            if (MEASURE_LATENCY) {
+                lt.sample("A Dispatching TouchEvents", System.nanoTime() - event.getEventTimeNano());
+            }
+            handled = mView.dispatchTouchEvent(event);
+            if (MEASURE_LATENCY) {
+                lt.sample("B Dispatched TouchEvents ", System.nanoTime() - event.getEventTimeNano());
+            }
+            if (!handled && isDown) {
+                int edgeSlop = mViewConfiguration.getScaledEdgeSlop();
+
+                final int edgeFlags = event.getEdgeFlags();
+                int direction = View.FOCUS_UP;
+                int x = (int)event.getX();
+                int y = (int)event.getY();
+                final int[] deltas = new int[2];
+
+                if ((edgeFlags & MotionEvent.EDGE_TOP) != 0) {
+                    direction = View.FOCUS_DOWN;
+                    if ((edgeFlags & MotionEvent.EDGE_LEFT) != 0) {
+                        deltas[0] = edgeSlop;
+                        x += edgeSlop;
+                    } else if ((edgeFlags & MotionEvent.EDGE_RIGHT) != 0) {
+                        deltas[0] = -edgeSlop;
+                        x -= edgeSlop;
+                    }
+                } else if ((edgeFlags & MotionEvent.EDGE_BOTTOM) != 0) {
+                    direction = View.FOCUS_UP;
+                    if ((edgeFlags & MotionEvent.EDGE_LEFT) != 0) {
+                        deltas[0] = edgeSlop;
+                        x += edgeSlop;
+                    } else if ((edgeFlags & MotionEvent.EDGE_RIGHT) != 0) {
+                        deltas[0] = -edgeSlop;
+                        x -= edgeSlop;
+                    }
+                } else if ((edgeFlags & MotionEvent.EDGE_LEFT) != 0) {
+                    direction = View.FOCUS_RIGHT;
+                } else if ((edgeFlags & MotionEvent.EDGE_RIGHT) != 0) {
+                    direction = View.FOCUS_LEFT;
+                }
+
+                if (edgeFlags != 0 && mView instanceof ViewGroup) {
+                    View nearest = FocusFinder.getInstance().findNearestTouchable(
+                            ((ViewGroup) mView), x, y, direction, deltas);
+                    if (nearest != null) {
+                        event.offsetLocation(deltas[0], deltas[1]);
+                        event.setEdgeFlags(0);
+                        mView.dispatchTouchEvent(event);
+                    }
+                }
+            }
+        }
+    }
+
+    private void deliverTrackballEvent(MotionEvent event) {
         if (DEBUG_TRACKBALL) Log.v(TAG, "Motion event:" + event);
 
         boolean handled = false;
-        try {
-            if (event == null) {
-                handled = true;
-            } else if (mView != null && mAdded) {
-                handled = mView.dispatchTrackballEvent(event);
-                if (!handled) {
-                    // we could do something here, like changing the focus
-                    // or something?
-                }
-            }
-        } finally {
+        if (mView != null && mAdded) {
+            handled = mView.dispatchTrackballEvent(event);
             if (handled) {
-                if (callWhenDone) {
-                    try {
-                        sWindowSession.finishKey(mWindow);
-                    } catch (RemoteException e) {
-                    }
-                }
-                if (event != null) {
-                    event.recycle();
-                }
                 // If we reach this, we delivered a trackball event to mView and
                 // mView consumed it. Because we will not translate the trackball
                 // event into a key event, touch mode will not exit, so we exit
                 // touch mode here.
                 ensureTouchMode(false);
-                //noinspection ReturnInsideFinallyBlock
                 return;
             }
-            // Let the exception fall through -- the looper will catch
-            // it and take care of the bad app for us.
+            
+            // Otherwise we could do something here, like changing the focus
+            // or something?
         }
 
         final TrackballAxis x = mTrackballAxisX;
@@ -2159,100 +2251,86 @@
             mLastTrackballTime = curTime;
         }
 
-        try {
-            final int action = event.getAction();
-            final int metastate = event.getMetaState();
-            switch (action) {
-                case MotionEvent.ACTION_DOWN:
-                    x.reset(2);
-                    y.reset(2);
-                    deliverKeyEvent(new KeyEvent(curTime, curTime,
-                            KeyEvent.ACTION_DOWN, KeyEvent.KEYCODE_DPAD_CENTER,
-                            0, metastate), false);
-                    break;
-                case MotionEvent.ACTION_UP:
-                    x.reset(2);
-                    y.reset(2);
-                    deliverKeyEvent(new KeyEvent(curTime, curTime,
-                            KeyEvent.ACTION_UP, KeyEvent.KEYCODE_DPAD_CENTER,
-                            0, metastate), false);
-                    break;
-            }
+        final int action = event.getAction();
+        final int metastate = event.getMetaState();
+        switch (action) {
+            case MotionEvent.ACTION_DOWN:
+                x.reset(2);
+                y.reset(2);
+                deliverKeyEvent(new KeyEvent(curTime, curTime,
+                        KeyEvent.ACTION_DOWN, KeyEvent.KEYCODE_DPAD_CENTER,
+                        0, metastate), false);
+                break;
+            case MotionEvent.ACTION_UP:
+                x.reset(2);
+                y.reset(2);
+                deliverKeyEvent(new KeyEvent(curTime, curTime,
+                        KeyEvent.ACTION_UP, KeyEvent.KEYCODE_DPAD_CENTER,
+                        0, metastate), false);
+                break;
+        }
 
-            if (DEBUG_TRACKBALL) Log.v(TAG, "TB X=" + x.position + " step="
-                    + x.step + " dir=" + x.dir + " acc=" + x.acceleration
-                    + " move=" + event.getX()
-                    + " / Y=" + y.position + " step="
-                    + y.step + " dir=" + y.dir + " acc=" + y.acceleration
-                    + " move=" + event.getY());
-            final float xOff = x.collect(event.getX(), event.getEventTime(), "X");
-            final float yOff = y.collect(event.getY(), event.getEventTime(), "Y");
+        if (DEBUG_TRACKBALL) Log.v(TAG, "TB X=" + x.position + " step="
+                + x.step + " dir=" + x.dir + " acc=" + x.acceleration
+                + " move=" + event.getX()
+                + " / Y=" + y.position + " step="
+                + y.step + " dir=" + y.dir + " acc=" + y.acceleration
+                + " move=" + event.getY());
+        final float xOff = x.collect(event.getX(), event.getEventTime(), "X");
+        final float yOff = y.collect(event.getY(), event.getEventTime(), "Y");
 
-            // Generate DPAD events based on the trackball movement.
-            // We pick the axis that has moved the most as the direction of
-            // the DPAD.  When we generate DPAD events for one axis, then the
-            // other axis is reset -- we don't want to perform DPAD jumps due
-            // to slight movements in the trackball when making major movements
-            // along the other axis.
-            int keycode = 0;
-            int movement = 0;
-            float accel = 1;
-            if (xOff > yOff) {
-                movement = x.generate((2/event.getXPrecision()));
-                if (movement != 0) {
-                    keycode = movement > 0 ? KeyEvent.KEYCODE_DPAD_RIGHT
-                            : KeyEvent.KEYCODE_DPAD_LEFT;
-                    accel = x.acceleration;
-                    y.reset(2);
-                }
-            } else if (yOff > 0) {
-                movement = y.generate((2/event.getYPrecision()));
-                if (movement != 0) {
-                    keycode = movement > 0 ? KeyEvent.KEYCODE_DPAD_DOWN
-                            : KeyEvent.KEYCODE_DPAD_UP;
-                    accel = y.acceleration;
-                    x.reset(2);
-                }
+        // Generate DPAD events based on the trackball movement.
+        // We pick the axis that has moved the most as the direction of
+        // the DPAD.  When we generate DPAD events for one axis, then the
+        // other axis is reset -- we don't want to perform DPAD jumps due
+        // to slight movements in the trackball when making major movements
+        // along the other axis.
+        int keycode = 0;
+        int movement = 0;
+        float accel = 1;
+        if (xOff > yOff) {
+            movement = x.generate((2/event.getXPrecision()));
+            if (movement != 0) {
+                keycode = movement > 0 ? KeyEvent.KEYCODE_DPAD_RIGHT
+                        : KeyEvent.KEYCODE_DPAD_LEFT;
+                accel = x.acceleration;
+                y.reset(2);
             }
+        } else if (yOff > 0) {
+            movement = y.generate((2/event.getYPrecision()));
+            if (movement != 0) {
+                keycode = movement > 0 ? KeyEvent.KEYCODE_DPAD_DOWN
+                        : KeyEvent.KEYCODE_DPAD_UP;
+                accel = y.acceleration;
+                x.reset(2);
+            }
+        }
 
-            if (keycode != 0) {
-                if (movement < 0) movement = -movement;
-                int accelMovement = (int)(movement * accel);
-                if (DEBUG_TRACKBALL) Log.v(TAG, "Move: movement=" + movement
-                        + " accelMovement=" + accelMovement
-                        + " accel=" + accel);
-                if (accelMovement > movement) {
-                    if (DEBUG_TRACKBALL) Log.v("foo", "Delivering fake DPAD: "
-                            + keycode);
-                    movement--;
-                    deliverKeyEvent(new KeyEvent(curTime, curTime,
-                            KeyEvent.ACTION_MULTIPLE, keycode,
-                            accelMovement-movement, metastate), false);
-                }
-                while (movement > 0) {
-                    if (DEBUG_TRACKBALL) Log.v("foo", "Delivering fake DPAD: "
-                            + keycode);
-                    movement--;
-                    curTime = SystemClock.uptimeMillis();
-                    deliverKeyEvent(new KeyEvent(curTime, curTime,
-                            KeyEvent.ACTION_DOWN, keycode, 0, event.getMetaState()), false);
-                    deliverKeyEvent(new KeyEvent(curTime, curTime,
-                            KeyEvent.ACTION_UP, keycode, 0, metastate), false);
-                }
-                mLastTrackballTime = curTime;
+        if (keycode != 0) {
+            if (movement < 0) movement = -movement;
+            int accelMovement = (int)(movement * accel);
+            if (DEBUG_TRACKBALL) Log.v(TAG, "Move: movement=" + movement
+                    + " accelMovement=" + accelMovement
+                    + " accel=" + accel);
+            if (accelMovement > movement) {
+                if (DEBUG_TRACKBALL) Log.v("foo", "Delivering fake DPAD: "
+                        + keycode);
+                movement--;
+                deliverKeyEvent(new KeyEvent(curTime, curTime,
+                        KeyEvent.ACTION_MULTIPLE, keycode,
+                        accelMovement-movement, metastate), false);
             }
-        } finally {
-            if (callWhenDone) {
-                try {
-                    sWindowSession.finishKey(mWindow);
-                } catch (RemoteException e) {
-                }
-                if (event != null) {
-                    event.recycle();
-                }
+            while (movement > 0) {
+                if (DEBUG_TRACKBALL) Log.v("foo", "Delivering fake DPAD: "
+                        + keycode);
+                movement--;
+                curTime = SystemClock.uptimeMillis();
+                deliverKeyEvent(new KeyEvent(curTime, curTime,
+                        KeyEvent.ACTION_DOWN, keycode, 0, event.getMetaState()), false);
+                deliverKeyEvent(new KeyEvent(curTime, curTime,
+                        KeyEvent.ACTION_UP, keycode, 0, metastate), false);
             }
-            // Let the exception fall through -- the looper will catch
-            // it and take care of the bad app for us.
+            mLastTrackballTime = curTime;
         }
     }
 
@@ -2406,11 +2484,8 @@
         if (handled) {
             if (sendDone) {
                 if (LOCAL_LOGV) Log.v(
-                    "ViewRoot", "Telling window manager key is finished");
-                try {
-                    sWindowSession.finishKey(mWindow);
-                } catch (RemoteException e) {
-                }
+                    TAG, "Telling window manager key is finished");
+                finishKeyEvent(event);
             }
             return;
         }
@@ -2442,13 +2517,10 @@
                 return;
             } else if (sendDone) {
                 if (LOCAL_LOGV) Log.v(
-                        "ViewRoot", "Telling window manager key is finished");
-                try {
-                    sWindowSession.finishKey(mWindow);
-                } catch (RemoteException e) {
-                }
+                        TAG, "Telling window manager key is finished");
+                finishKeyEvent(event);
             } else {
-                Log.w("ViewRoot", "handleFinishedEvent(seq=" + seq
+                Log.w(TAG, "handleFinishedEvent(seq=" + seq
                         + " handled=" + handled + " ev=" + event
                         + ") neither delivering nor finishing key");
             }
@@ -2520,11 +2592,8 @@
         } finally {
             if (sendDone) {
                 if (LOCAL_LOGV) Log.v(
-                    "ViewRoot", "Telling window manager key is finished");
-                try {
-                    sWindowSession.finishKey(mWindow);
-                } catch (RemoteException e) {
-                }
+                    TAG, "Telling window manager key is finished");
+                finishKeyEvent(event);
             }
             // Let the exception fall through -- the looper will catch
             // it and take care of the bad app for us.
@@ -2646,7 +2715,7 @@
 
     void doDie() {
         checkThread();
-        if (Config.LOGV) Log.v("ViewRoot", "DIE in " + this + " of " + mSurface);
+        if (Config.LOGV) Log.v(TAG, "DIE in " + this + " of " + mSurface);
         synchronized (this) {
             if (mAdded && !mFirst) {
                 int viewVisibility = mView.getVisibility();
@@ -2702,6 +2771,22 @@
         msg.obj = ri;
         sendMessage(msg);
     }
+    
+    private Runnable mFinishedCallback;
+    
+    private final InputHandler mInputHandler = new InputHandler() {
+        public void handleKey(KeyEvent event, Runnable finishedCallback) {
+            mFinishedCallback = finishedCallback;
+
+            dispatchKey(event);
+        }
+
+        public void handleMotion(MotionEvent event, Runnable finishedCallback) {
+            finishedCallback.run();
+            
+            dispatchMotion(event);
+        }
+    };
 
     public void dispatchKey(KeyEvent event) {
         if (event.getAction() == KeyEvent.ACTION_DOWN) {
@@ -2721,27 +2806,35 @@
         msg.obj = event;
 
         if (LOCAL_LOGV) Log.v(
-            "ViewRoot", "sending key " + event + " to " + mView);
+            TAG, "sending key " + event + " to " + mView);
 
         sendMessageAtTime(msg, event.getEventTime());
     }
+    
+    public void dispatchMotion(MotionEvent event) {
+        int source = event.getSource();
+        if ((source & InputDevice.SOURCE_CLASS_POINTER) != 0) {
+            dispatchPointer(event);
+        } else if ((source & InputDevice.SOURCE_CLASS_TRACKBALL) != 0) {
+            dispatchTrackball(event);
+        } else {
+            // TODO
+            Log.v(TAG, "Dropping unsupported motion event (unimplemented): " + event);
+        }
+    }
 
-    public void dispatchPointer(MotionEvent event, long eventTime,
-            boolean callWhenDone) {
+    public void dispatchPointer(MotionEvent event) {
         Message msg = obtainMessage(DISPATCH_POINTER);
         msg.obj = event;
-        msg.arg1 = callWhenDone ? 1 : 0;
-        sendMessageAtTime(msg, eventTime);
+        sendMessageAtTime(msg, event.getEventTime());
     }
 
-    public void dispatchTrackball(MotionEvent event, long eventTime,
-            boolean callWhenDone) {
+    public void dispatchTrackball(MotionEvent event) {
         Message msg = obtainMessage(DISPATCH_TRACKBALL);
         msg.obj = event;
-        msg.arg1 = callWhenDone ? 1 : 0;
-        sendMessageAtTime(msg, eventTime);
+        sendMessageAtTime(msg, event.getEventTime());
     }
-
+    
     public void dispatchAppVisibility(boolean visible) {
         Message msg = obtainMessage(DISPATCH_APP_VISIBILITY);
         msg.arg1 = visible ? 1 : 0;
@@ -2813,6 +2906,46 @@
         return scrollToRectOrFocus(rectangle, immediate);
     }
 
+    class TakenSurfaceHolder extends BaseSurfaceHolder {
+        @Override
+        public boolean onAllowLockCanvas() {
+            return mDrawingAllowed;
+        }
+
+        @Override
+        public void onRelayoutContainer() {
+            // Not currently interesting -- from changing between fixed and layout size.
+        }
+
+        public void setFormat(int format) {
+            ((RootViewSurfaceTaker)mView).setSurfaceFormat(format);
+        }
+
+        public void setType(int type) {
+            ((RootViewSurfaceTaker)mView).setSurfaceType(type);
+        }
+        
+        @Override
+        public void onUpdateSurface() {
+            // We take care of format and type changes on our own.
+            throw new IllegalStateException("Shouldn't be here");
+        }
+
+        public boolean isCreating() {
+            return mIsCreating;
+        }
+
+        @Override
+        public void setFixedSize(int width, int height) {
+            throw new UnsupportedOperationException(
+                    "Currently only support sizing from layout");
+        }
+        
+        public void setKeepScreenOn(boolean screenOn) {
+            ((RootViewSurfaceTaker)mView).setSurfaceKeepScreenOn(screenOn);
+        }
+    }
+    
     static class InputMethodCallback extends IInputMethodCallback.Stub {
         private WeakReference<ViewRoot> mViewRoot;
 
@@ -2832,71 +2965,11 @@
         }
     }
 
-    static class EventCompletion extends Handler {
-        final IWindow mWindow;
-        final KeyEvent mKeyEvent;
-        final boolean mIsPointer;
-        final MotionEvent mMotionEvent;
-
-        EventCompletion(Looper looper, IWindow window, KeyEvent key,
-                boolean isPointer, MotionEvent motion) {
-            super(looper);
-            mWindow = window;
-            mKeyEvent = key;
-            mIsPointer = isPointer;
-            mMotionEvent = motion;
-            sendEmptyMessage(0);
-        }
-
-        @Override
-        public void handleMessage(Message msg) {
-            if (mKeyEvent != null) {
-                try {
-                    sWindowSession.finishKey(mWindow);
-                 } catch (RemoteException e) {
-                 }
-           } else if (mIsPointer) {
-                boolean didFinish;
-                MotionEvent event = mMotionEvent;
-                if (event == null) {
-                    try {
-                        event = sWindowSession.getPendingPointerMove(mWindow);
-                    } catch (RemoteException e) {
-                    }
-                    didFinish = true;
-                } else {
-                    didFinish = event.getAction() == MotionEvent.ACTION_OUTSIDE;
-                }
-                if (!didFinish) {
-                    try {
-                        sWindowSession.finishKey(mWindow);
-                     } catch (RemoteException e) {
-                     }
-                }
-            } else {
-                MotionEvent event = mMotionEvent;
-                if (event == null) {
-                    try {
-                        event = sWindowSession.getPendingTrackballMove(mWindow);
-                    } catch (RemoteException e) {
-                    }
-                } else {
-                    try {
-                        sWindowSession.finishKey(mWindow);
-                     } catch (RemoteException e) {
-                     }
-                }
-            }
-        }
-    }
-
     static class W extends IWindow.Stub {
         private final WeakReference<ViewRoot> mViewRoot;
-        private final Looper mMainLooper;
 
         public W(ViewRoot viewRoot, Context context) {
             mViewRoot = new WeakReference<ViewRoot>(viewRoot);
-            mMainLooper = context.getMainLooper();
         }
 
         public void resized(int w, int h, Rect coveredInsets,
@@ -2908,40 +2981,6 @@
             }
         }
 
-        public void dispatchKey(KeyEvent event) {
-            final ViewRoot viewRoot = mViewRoot.get();
-            if (viewRoot != null) {
-                viewRoot.dispatchKey(event);
-            } else {
-                Log.w("ViewRoot.W", "Key event " + event + " but no ViewRoot available!");
-                new EventCompletion(mMainLooper, this, event, false, null);
-            }
-        }
-
-        public void dispatchPointer(MotionEvent event, long eventTime,
-                boolean callWhenDone) {
-            final ViewRoot viewRoot = mViewRoot.get();
-            if (viewRoot != null) {                
-                if (MEASURE_LATENCY) {
-                    // Note: eventTime is in milliseconds
-                    ViewRoot.lt.sample("* ViewRoot b4 dispatchPtr", System.nanoTime() - eventTime * 1000000);
-                }
-                viewRoot.dispatchPointer(event, eventTime, callWhenDone);
-            } else {
-                new EventCompletion(mMainLooper, this, null, true, event);
-            }
-        }
-
-        public void dispatchTrackball(MotionEvent event, long eventTime,
-                boolean callWhenDone) {
-            final ViewRoot viewRoot = mViewRoot.get();
-            if (viewRoot != null) {
-                viewRoot.dispatchTrackball(event, eventTime, callWhenDone);
-            } else {
-                new EventCompletion(mMainLooper, this, null, false, event);
-            }
-        }
-
         public void dispatchAppVisibility(boolean visible) {
             final ViewRoot viewRoot = mViewRoot.get();
             if (viewRoot != null) {
diff --git a/core/java/android/view/Window.java b/core/java/android/view/Window.java
index 7dd5085..11c09c1 100644
--- a/core/java/android/view/Window.java
+++ b/core/java/android/view/Window.java
@@ -473,6 +473,21 @@
     }
 
     /**
+     * Take ownership of this window's surface.  The window's view hierarchy
+     * will no longer draw into the surface, though it will otherwise continue
+     * to operate (such as for receiving input events).  The given SurfaceHolder
+     * callback will be used to tell you about state changes to the surface.
+     */
+    public abstract void takeSurface(SurfaceHolder.Callback2 callback);
+    
+    /**
+     * Take ownership of this window's InputQueue.  The window will no
+     * longer read and dispatch input events from the queue; it is your
+     * responsibility to do so.
+     */
+    public abstract void takeInputQueue(InputQueue.Callback callback);
+    
+    /**
      * Return whether this window is being displayed with a floating style
      * (based on the {@link android.R.attr#windowIsFloating} attribute in
      * the style/theme).
diff --git a/core/java/android/view/WindowManager.java b/core/java/android/view/WindowManager.java
index adceeb2..eebbc93 100644
--- a/core/java/android/view/WindowManager.java
+++ b/core/java/android/view/WindowManager.java
@@ -580,9 +580,10 @@
          * If the keyguard is currently active and is secure (requires an
          * unlock pattern) than the user will still need to confirm it before
          * seeing this window, unless {@link #FLAG_SHOW_WHEN_LOCKED} has
-         * also been set. */
+         * also been set.
+         */
         public static final int FLAG_DISMISS_KEYGUARD = 0x00400000;
-        
+
         /** Window flag: *sigh* The lock screen wants to continue running its
          * animation while it is fading.  A kind-of hack to allow this.  Maybe
          * in the future we just make this the default behavior.
diff --git a/core/java/android/view/WindowManagerPolicy.java b/core/java/android/view/WindowManagerPolicy.java
index b39cb9d..33757f0 100644
--- a/core/java/android/view/WindowManagerPolicy.java
+++ b/core/java/android/view/WindowManagerPolicy.java
@@ -549,23 +549,26 @@
     public Animation createForceHideEnterAnimation();
     
     /**
-     * Called from the key queue thread before a key is dispatched to the
-     * input thread.
+     * Called from the input reader thread before a key is enqueued.
      *
      * <p>There are some actions that need to be handled here because they
      * affect the power state of the device, for example, the power keys.
      * Generally, it's best to keep as little as possible in the queue thread
      * because it's the most fragile.
+     * @param whenNanos The event time in uptime nanoseconds.
+     * @param keyCode The key code.
+     * @param down True if the key is down.
+     * @param policyFlags The policy flags associated with the key.
+     * @param isScreenOn True if the screen is already on
      *
-     * @param event the raw input event as read from the driver
-     * @param screenIsOn true if the screen is already on
      * @return The bitwise or of the {@link #ACTION_PASS_TO_USER},
      *          {@link #ACTION_POKE_USER_ACTIVITY} and {@link #ACTION_GO_TO_SLEEP} flags.
      */
-    public int interceptKeyTq(RawInputEvent event, boolean screenIsOn);
+    public int interceptKeyBeforeQueueing(long whenNanos, int keyCode, boolean down, int policyFlags,
+            boolean isScreenOn);
     
     /**
-     * Called from the input thread before a key is dispatched to a window.
+     * Called from the input dispatcher thread before a key is dispatched to a window.
      *
      * <p>Allows you to define
      * behavior for keys that can not be overridden by applications or redirect
@@ -577,16 +580,17 @@
      * 
      * @param win The window that currently has focus.  This is where the key
      *            event will normally go.
-     * @param code Key code.
-     * @param metaKeys bit mask of meta keys that are held.
-     * @param down Is this a key press (true) or release (false)?
+     * @param action The key event action.
+     * @param flags The key event flags.
+     * @param keyCode The key code.
+     * @param metaState bit mask of meta keys that are held.
      * @param repeatCount Number of times a key down has repeated.
-     * @param flags event's flags.
+     * @param policyFlags The policy flags associated with the key.
      * @return Returns true if the policy consumed the event and it should
      * not be further dispatched.
      */
-    public boolean interceptKeyTi(WindowState win, int code,
-                               int metaKeys, boolean down, int repeatCount, int flags);
+    public boolean interceptKeyBeforeDispatching(WindowState win, int action, int flags,
+            int keyCode, int metaState, int repeatCount, int policyFlags);
 
     /**
      * Called when layout of the windows is about to start.
@@ -695,81 +699,13 @@
      * Return whether the screen is currently on.
      */
     public boolean isScreenOn();
-    
+
     /**
-     * Perform any initial processing of a low-level input event before the
-     * window manager handles special keys and generates a high-level event
-     * that is dispatched to the application.
-     * 
-     * @param event The input event that has occurred.
-     * 
-     * @return Return true if you have consumed the event and do not want
-     * further processing to occur; return false for normal processing.
+     * Tell the policy that the lid switch has changed state.
+     * @param whenNanos The time when the change occurred in uptime nanoseconds.
+     * @param lidOpen True if the lid is now open.
      */
-    public boolean preprocessInputEventTq(RawInputEvent event);
-    
-    /**
-     * Determine whether a given key code is used to cause an app switch
-     * to occur (most often the HOME key, also often ENDCALL).  If you return
-     * true, then the system will go into a special key processing state
-     * where it drops any pending events that it cans and adjusts timeouts to
-     * try to get to this key as quickly as possible.
-     * 
-     * <p>Note that this function is called from the low-level input queue
-     * thread, with either/or the window or input lock held; be very careful
-     * about what you do here.  You absolutely should never acquire a lock
-     * that you would ever hold elsewhere while calling out into the window
-     * manager or view hierarchy.
-     * 
-     * @param keycode The key that should be checked for performing an
-     * app switch before delivering to the application.
-     * 
-     * @return Return true if this is an app switch key and special processing
-     * should happen; return false for normal processing.
-     */
-    public boolean isAppSwitchKeyTqTiLwLi(int keycode);
-    
-    /**
-     * Determine whether a given key code is used for movement within a UI,
-     * and does not generally cause actions to be performed (normally the DPAD
-     * movement keys, NOT the DPAD center press key).  This is called
-     * when {@link #isAppSwitchKeyTiLi} returns true to remove any pending events
-     * in the key queue that are not needed to switch applications.
-     * 
-     * <p>Note that this function is called from the low-level input queue
-     * thread; be very careful about what you do here.
-     * 
-     * @param keycode The key that is waiting to be delivered to the
-     * application.
-     * 
-     * @return Return true if this is a purely navigation key and can be
-     * dropped without negative consequences; return false to keep it.
-     */
-    public boolean isMovementKeyTi(int keycode);
-    
-    /**
-     * Given the current state of the world, should this relative movement
-     * wake up the device?
-     * 
-     * @param device The device the movement came from.
-     * @param classes The input classes associated with the device.
-     * @param event The input event that occurred.
-     * @return
-     */
-    public boolean isWakeRelMovementTq(int device, int classes,
-            RawInputEvent event);
-    
-    /**
-     * Given the current state of the world, should this absolute movement
-     * wake up the device?
-     * 
-     * @param device The device the movement came from.
-     * @param classes The input classes associated with the device.
-     * @param event The input event that occurred.
-     * @return
-     */
-    public boolean isWakeAbsMovementTq(int device, int classes,
-            RawInputEvent event);
+    public void notifyLidSwitchChanged(long whenNanos, boolean lidOpen);
     
     /**
      * Tell the policy if anyone is requesting that keyguard not come on.
@@ -844,18 +780,6 @@
     public void enableScreenAfterBoot();
     
     /**
-     * Returns true if the user's cheek has been pressed against the phone. This is 
-     * determined by comparing the event's size attribute with a threshold value.
-     * For example for a motion event like down or up or move, if the size exceeds
-     * the threshold, it is considered as cheek press.
-     * @param ev the motion event generated when the cheek is pressed 
-     * against the phone
-     * @return Returns true if the user's cheek has been pressed against the phone
-     * screen resulting in an invalid motion event
-     */
-    public boolean isCheekPressedAgainstScreen(MotionEvent ev);
-    
-    /**
      * Called every time the window manager is dispatching a pointer event.
      */
     public void dispatchedPointerEventLw(MotionEvent ev, int targetX, int targetY);
@@ -868,13 +792,6 @@
     public boolean performHapticFeedbackLw(WindowState win, int effectId, boolean always);
     
     /**
-     * A special function that is called from the very low-level input queue
-     * to provide feedback to the user.  Currently only called for virtual
-     * keys.
-     */
-    public void keyFeedbackFromInput(KeyEvent event);
-    
-    /**
      * Called when we have stopped keeping the screen on because a window
      * requesting this is no longer visible.
      */
diff --git a/core/java/android/webkit/MimeTypeMap.java b/core/java/android/webkit/MimeTypeMap.java
index 034c88a..ca9ad53 100644
--- a/core/java/android/webkit/MimeTypeMap.java
+++ b/core/java/android/webkit/MimeTypeMap.java
@@ -67,7 +67,7 @@
             // if the filename contains special characters, we don't
             // consider it valid for our matching purposes:
             if (filename.length() > 0 &&
-                Pattern.matches("[a-zA-Z_0-9\\.\\-\\(\\)]+", filename)) {
+                Pattern.matches("[a-zA-Z_0-9\\.\\-\\(\\)\\%]+", filename)) {
                 int dotPos = filename.lastIndexOf('.');
                 if (0 <= dotPos) {
                     return filename.substring(dotPos + 1);
diff --git a/core/java/android/webkit/WebView.java b/core/java/android/webkit/WebView.java
index 2df250d..bf751f5 100644
--- a/core/java/android/webkit/WebView.java
+++ b/core/java/android/webkit/WebView.java
@@ -236,14 +236,14 @@
  *
  * <h3>Building web pages to support different screen densities</h3>
  *
- * <p>A screen's density is based on it's screen resolution and physical size. A screen with low
- * density has fewer available pixels per inch, where a screen with high density
- * has more -- sometimes significantly more -- pixels per inch. The density of a
+ * <p>The screen density of a device is based on the screen resolution. A screen with low density
+ * has fewer available pixels per inch, where a screen with high density
+ * has more &mdash; sometimes significantly more &mdash; pixels per inch. The density of a
  * screen is important because, other things being equal, a UI element (such as a button) whose
  * height and width are defined in terms of screen pixels will appear larger on the lower density
- * screen and smaller on the higher density screen. For simplicity, Android collapses all
- * actual screen densities into three generalized densities:high, medium, and low. </p>
- *
+ * screen and smaller on the higher density screen.
+ * For simplicity, Android collapses all actual screen densities into three generalized densities:
+ * high, medium, and low.</p>
  * <p>By default, WebView scales a web page so that it is drawn at a size that matches the default
  * appearance on a medium density screen. So, it applies 1.5x scaling on a high density screen
  * (because its pixels are smaller) and 0.75x scaling on a low density screen (because its pixels
@@ -1380,16 +1380,23 @@
         final File temp = new File(dest.getPath() + ".writing");
         new Thread(new Runnable() {
             public void run() {
+                FileOutputStream out = null;
                 try {
-                    FileOutputStream out = new FileOutputStream(temp);
+                    out = new FileOutputStream(temp);
                     p.writeToStream(out);
-                    out.close();
                     // Writing the picture succeeded, rename the temporary file
                     // to the destination.
                     temp.renameTo(dest);
                 } catch (Exception e) {
                     // too late to do anything about it.
                 } finally {
+                    if (out != null) {
+                        try {
+                            out.close();
+                        } catch (Exception e) {
+                            // Can't do anything about that
+                        }
+                    }
                     temp.delete();
                 }
             }
@@ -1442,20 +1449,23 @@
             final Bundle copy = new Bundle(b);
             new Thread(new Runnable() {
                 public void run() {
-                    final Picture p = Picture.createFromStream(in);
-                    if (p != null) {
-                        // Post a runnable on the main thread to update the
-                        // history picture fields.
-                        mPrivateHandler.post(new Runnable() {
-                            public void run() {
-                                restoreHistoryPictureFields(p, copy);
-                            }
-                        });
-                    }
                     try {
-                        in.close();
-                    } catch (Exception e) {
-                        // Nothing we can do now.
+                        final Picture p = Picture.createFromStream(in);
+                        if (p != null) {
+                            // Post a runnable on the main thread to update the
+                            // history picture fields.
+                            mPrivateHandler.post(new Runnable() {
+                                public void run() {
+                                    restoreHistoryPictureFields(p, copy);
+                                }
+                            });
+                        }
+                    } finally {
+                        try {
+                            in.close();
+                        } catch (Exception e) {
+                            // Nothing we can do now.
+                        }
                     }
                 }
             }).start();
diff --git a/core/java/android/widget/AbsListView.java b/core/java/android/widget/AbsListView.java
index fcfecb3..6cfeb68 100644
--- a/core/java/android/widget/AbsListView.java
+++ b/core/java/android/widget/AbsListView.java
@@ -2056,6 +2056,14 @@
                 }
 
                 if (y != mLastY) {
+                    // We may be here after stopping a fling and continuing to scroll.
+                    // If so, we haven't disallowed intercepting touch events yet.
+                    // Make sure that we do so in case we're in a parent that can intercept.
+                    if ((mGroupFlags & FLAG_DISALLOW_INTERCEPT) == 0 &&
+                            Math.abs(deltaY) > mTouchSlop) {
+                        requestDisallowInterceptTouchEvent(true);
+                    }
+
                     deltaY -= mMotionCorrection;
                     int incrementalDeltaY = mLastY != Integer.MIN_VALUE ? y - mLastY : deltaY;
                     
diff --git a/core/java/android/widget/CursorTreeAdapter.java b/core/java/android/widget/CursorTreeAdapter.java
index 7b9b7bd..3fadf4c 100644
--- a/core/java/android/widget/CursorTreeAdapter.java
+++ b/core/java/android/widget/CursorTreeAdapter.java
@@ -134,14 +134,16 @@
     /**
      * Sets the group Cursor.
      * 
-     * @param cursor The Cursor to set for the group.
+     * @param cursor The Cursor to set for the group. If there is an existing cursor 
+     * it will be closed.
      */
     public void setGroupCursor(Cursor cursor) {
         mGroupCursorHelper.changeCursor(cursor, false);
     }
     
     /**
-     * Sets the children Cursor for a particular group.
+     * Sets the children Cursor for a particular group. If there is an existing cursor
+     * it will be closed.
      * <p>
      * This is useful when asynchronously querying to prevent blocking the UI.
      * 
@@ -476,7 +478,7 @@
             
             mCursor.unregisterContentObserver(mContentObserver);
             mCursor.unregisterDataSetObserver(mDataSetObserver);
-            mCursor.deactivate();
+            mCursor.close();
             mCursor = null;
         }
         
diff --git a/core/java/android/widget/DatePicker.java b/core/java/android/widget/DatePicker.java
index b3d5f1a..1fc23ab 100644
--- a/core/java/android/widget/DatePicker.java
+++ b/core/java/android/widget/DatePicker.java
@@ -328,6 +328,7 @@
         mYear = ss.getYear();
         mMonth = ss.getMonth();
         mDay = ss.getDay();
+        updateSpinners();
     }
 
     /**
diff --git a/core/java/android/widget/Gallery.java b/core/java/android/widget/Gallery.java
index f34823c..1ed6b16 100644
--- a/core/java/android/widget/Gallery.java
+++ b/core/java/android/widget/Gallery.java
@@ -1087,7 +1087,7 @@
     @Override
     public boolean dispatchKeyEvent(KeyEvent event) {
         // Gallery steals all key events
-        return event.dispatch(this);
+        return event.dispatch(this, null, null);
     }
 
     /**
diff --git a/core/java/android/widget/MediaController.java b/core/java/android/widget/MediaController.java
index c246c247..39b1377 100644
--- a/core/java/android/widget/MediaController.java
+++ b/core/java/android/widget/MediaController.java
@@ -123,7 +123,7 @@
     }
 
     private void initFloatingWindow() {
-        mWindowManager = (WindowManager)mContext.getSystemService("window");
+        mWindowManager = (WindowManager)mContext.getSystemService(Context.WINDOW_SERVICE);
         mWindow = PolicyManager.makeNewWindow(mContext);
         mWindow.setWindowManager(mWindowManager, null, null);
         mWindow.requestFeature(Window.FEATURE_NO_TITLE);
diff --git a/core/java/android/widget/ProgressBar.java b/core/java/android/widget/ProgressBar.java
index 202e658..8e9eb05 100644
--- a/core/java/android/widget/ProgressBar.java
+++ b/core/java/android/widget/ProgressBar.java
@@ -947,4 +947,20 @@
         setProgress(ss.progress);
         setSecondaryProgress(ss.secondaryProgress);
     }
+
+    @Override
+    protected void onAttachedToWindow() {
+        super.onAttachedToWindow();
+        if (mIndeterminate) {
+            startAnimation();
+        }
+    }
+
+    @Override
+    protected void onDetachedFromWindow() {
+        super.onDetachedFromWindow();
+        if (mIndeterminate) {
+            stopAnimation();
+        }
+    }
 }
diff --git a/core/java/android/widget/RemoteViews.java b/core/java/android/widget/RemoteViews.java
index 3003580..7a70c80 100644
--- a/core/java/android/widget/RemoteViews.java
+++ b/core/java/android/widget/RemoteViews.java
@@ -100,6 +100,7 @@
      * Base class for all actions that can be performed on an 
      * inflated view.
      *
+     *  SUBCLASSES MUST BE IMMUTABLE SO CLONE WORKS!!!!!
      */
     private abstract static class Action implements Parcelable {
         public abstract void apply(View root) throws ActionException;
@@ -568,6 +569,14 @@
         }
     }
 
+    public RemoteViews clone() {
+        final RemoteViews that = new RemoteViews(mPackage, mLayoutId);
+        if (mActions != null) {
+            that.mActions = (ArrayList<Action>)mActions.clone();
+        }
+        return that;
+    }
+
     public String getPackage() {
         return mPackage;
     }
diff --git a/core/java/android/widget/SimpleCursorTreeAdapter.java b/core/java/android/widget/SimpleCursorTreeAdapter.java
index a1c65f0..a033542 100644
--- a/core/java/android/widget/SimpleCursorTreeAdapter.java
+++ b/core/java/android/widget/SimpleCursorTreeAdapter.java
@@ -38,6 +38,10 @@
  * binding can be found, an {@link IllegalStateException} is thrown.
  */
 public abstract class SimpleCursorTreeAdapter extends ResourceCursorTreeAdapter {
+    
+    /** The name of the columns that contain the data to display for a group. */
+    private String[] mGroupFromNames;
+    
     /** The indices of columns that contain data to display for a group. */
     private int[] mGroupFrom;
     /**
@@ -46,6 +50,9 @@
      */
     private int[] mGroupTo;
 
+    /** The name of the columns that contain the data to display for a child. */
+    private String[] mChildFromNames;
+    
     /** The indices of columns that contain data to display for a child. */
     private int[] mChildFrom;
     /**
@@ -171,38 +178,12 @@
 
     private void init(String[] groupFromNames, int[] groupTo, String[] childFromNames,
             int[] childTo) {
+        
+        mGroupFromNames = groupFromNames;
         mGroupTo = groupTo;
         
+        mChildFromNames = childFromNames;
         mChildTo = childTo;
-        
-        // Get the group cursor column indices, the child cursor column indices will come
-        // when needed
-        initGroupFromColumns(groupFromNames);
-        
-        // Get a temporary child cursor to init the column indices
-        if (getGroupCount() > 0) {
-            MyCursorHelper tmpCursorHelper = getChildrenCursorHelper(0, true);
-            if (tmpCursorHelper != null) {
-                initChildrenFromColumns(childFromNames, tmpCursorHelper.getCursor());
-                deactivateChildrenCursorHelper(0);
-            }
-        }
-    }
-    
-    private void initFromColumns(Cursor cursor, String[] fromColumnNames, int[] fromColumns) {
-        for (int i = fromColumnNames.length - 1; i >= 0; i--) {
-            fromColumns[i] = cursor.getColumnIndexOrThrow(fromColumnNames[i]);
-        }
-    }
-    
-    private void initGroupFromColumns(String[] groupFromNames) {
-        mGroupFrom = new int[groupFromNames.length];
-        initFromColumns(mGroupCursorHelper.getCursor(), groupFromNames, mGroupFrom);
-    }
-
-    private void initChildrenFromColumns(String[] childFromNames, Cursor childCursor) {
-        mChildFrom = new int[childFromNames.length];
-        initFromColumns(childCursor, childFromNames, mChildFrom);
     }
     
     /**
@@ -257,13 +238,29 @@
         }
     }
     
+    private void initFromColumns(Cursor cursor, String[] fromColumnNames, int[] fromColumns) {
+        for (int i = fromColumnNames.length - 1; i >= 0; i--) {
+            fromColumns[i] = cursor.getColumnIndexOrThrow(fromColumnNames[i]);
+        }
+    }
+    
     @Override
     protected void bindChildView(View view, Context context, Cursor cursor, boolean isLastChild) {
+        if (mChildFrom == null) {
+            mChildFrom = new int[mChildFromNames.length];
+            initFromColumns(cursor, mChildFromNames, mChildFrom);
+        }
+        
         bindView(view, context, cursor, mChildFrom, mChildTo);
     }
 
     @Override
     protected void bindGroupView(View view, Context context, Cursor cursor, boolean isExpanded) {
+        if (mGroupFrom == null) {
+            mGroupFrom = new int[mGroupFromNames.length];
+            initFromColumns(cursor, mGroupFromNames, mGroupFrom);
+        }
+        
         bindView(view, context, cursor, mGroupFrom, mGroupTo);
     }
 
diff --git a/core/java/android/widget/TextView.java b/core/java/android/widget/TextView.java
index 64c9c99..950012c 100644
--- a/core/java/android/widget/TextView.java
+++ b/core/java/android/widget/TextView.java
@@ -4547,6 +4547,10 @@
                     outText.text = TextUtils.substring(content, partialStartOffset,
                             partialEndOffset);
                 }
+            } else {
+                outText.partialStartOffset = 0;
+                outText.partialEndOffset = 0;
+                outText.text = "";
             }
             outText.flags = 0;
             if (MetaKeyKeyListener.getMetaState(mText, MetaKeyKeyListener.META_SELECTING) != 0) {
diff --git a/core/java/com/android/internal/app/ExternalMediaFormatActivity.java b/core/java/com/android/internal/app/ExternalMediaFormatActivity.java
index 7e9bbd1..98dcb8b 100644
--- a/core/java/com/android/internal/app/ExternalMediaFormatActivity.java
+++ b/core/java/com/android/internal/app/ExternalMediaFormatActivity.java
@@ -23,13 +23,10 @@
 import android.content.Intent;
 import android.content.IntentFilter;
 import android.os.Bundle;
-import android.os.Handler;
 import android.os.storage.IMountService;
-import android.os.Message;
 import android.os.RemoteException;
 import android.os.ServiceManager;
 import android.os.Environment;
-import android.widget.Toast;
 import android.util.Log;
 
 /**
@@ -38,7 +35,7 @@
  */
 public class ExternalMediaFormatActivity extends AlertActivity implements DialogInterface.OnClickListener {
 
-    private static final int POSITIVE_BUTTON = AlertDialog.BUTTON1;
+    private static final int POSITIVE_BUTTON = AlertDialog.BUTTON_POSITIVE;
 
     /** Used to detect when the media state changes, in case we need to call finish() */
     private BroadcastReceiver mStorageReceiver = new BroadcastReceiver() {
diff --git a/core/java/com/android/internal/app/HeavyWeightSwitcherActivity.java b/core/java/com/android/internal/app/HeavyWeightSwitcherActivity.java
new file mode 100644
index 0000000..ada7f36
--- /dev/null
+++ b/core/java/com/android/internal/app/HeavyWeightSwitcherActivity.java
@@ -0,0 +1,156 @@
+/*
+ * Copyright (C) 2010 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.android.internal.app;
+
+import com.android.internal.R;
+
+import android.app.Activity;
+import android.app.ActivityManagerNative;
+import android.content.Intent;
+import android.content.IntentSender;
+import android.content.pm.ApplicationInfo;
+import android.content.pm.PackageManager;
+import android.graphics.drawable.Drawable;
+import android.os.Bundle;
+import android.os.RemoteException;
+import android.util.Log;
+import android.view.View;
+import android.view.Window;
+import android.view.View.OnClickListener;
+import android.widget.Button;
+import android.widget.ImageView;
+import android.widget.TextView;
+
+/**
+ * This activity is displayed when the system attempts to start an Intent for
+ * which there is more than one matching activity, allowing the user to decide
+ * which to go to.  It is not normally used directly by application developers.
+ */
+public class HeavyWeightSwitcherActivity extends Activity {
+    /** The PendingIntent of the new activity being launched. */
+    public static final String KEY_INTENT = "intent";
+    /** Set if the caller is requesting a result. */
+    public static final String KEY_HAS_RESULT = "has_result";
+    /** Package of current heavy-weight app. */
+    public static final String KEY_CUR_APP = "cur_app";
+    /** Task that current heavy-weight activity is running in. */
+    public static final String KEY_CUR_TASK = "cur_task";
+    /** Package of newly requested heavy-weight app. */
+    public static final String KEY_NEW_APP = "new_app";
+    
+    IntentSender mStartIntent;
+    boolean mHasResult;
+    String mCurApp;
+    int mCurTask;
+    String mNewApp;
+    
+    @Override
+    protected void onCreate(Bundle savedInstanceState) {
+        super.onCreate(savedInstanceState);
+        
+        requestWindowFeature(Window.FEATURE_LEFT_ICON);
+        
+        mStartIntent = (IntentSender)getIntent().getParcelableExtra(KEY_INTENT);
+        mHasResult = getIntent().getBooleanExtra(KEY_HAS_RESULT, false);
+        mCurApp = getIntent().getStringExtra(KEY_CUR_APP);
+        mCurTask = getIntent().getIntExtra(KEY_CUR_TASK, 0);
+        mNewApp = getIntent().getStringExtra(KEY_NEW_APP);
+        
+        setContentView(com.android.internal.R.layout.heavy_weight_switcher);
+        
+        setIconAndText(R.id.old_app_icon, R.id.old_app_action, R.id.old_app_description,
+                mCurApp, R.string.old_app_action, R.string.old_app_description);
+        setIconAndText(R.id.new_app_icon, R.id.new_app_action, R.id.new_app_description,
+                mNewApp, R.string.new_app_action, R.string.new_app_description);
+            
+        View button = findViewById((R.id.switch_old));
+        button.setOnClickListener(mSwitchOldListener);
+        button = findViewById((R.id.switch_new));
+        button.setOnClickListener(mSwitchNewListener);
+        button = findViewById((R.id.cancel));
+        button.setOnClickListener(mCancelListener);
+        
+        getWindow().setFeatureDrawableResource(Window.FEATURE_LEFT_ICON, 
+                android.R.drawable.ic_dialog_alert);
+    }
+
+    void setText(int id, CharSequence text) {
+        ((TextView)findViewById(id)).setText(text);
+    }
+    
+    void setDrawable(int id, Drawable dr) {
+        if (dr != null) {
+            ((ImageView)findViewById(id)).setImageDrawable(dr);
+        }
+    }
+    
+    void setIconAndText(int iconId, int actionId, int descriptionId,
+            String packageName, int actionStr, int descriptionStr) {
+        CharSequence appName = "";
+        Drawable appIcon = null;
+        if (mCurApp != null) {
+            try {
+                ApplicationInfo info = getPackageManager().getApplicationInfo(
+                        packageName, 0);
+                appName = info.loadLabel(getPackageManager());
+                appIcon = info.loadIcon(getPackageManager());
+            } catch (PackageManager.NameNotFoundException e) {
+            }
+        }
+        
+        setDrawable(iconId, appIcon);
+        setText(actionId, getString(actionStr, appName));
+        setText(descriptionId, getText(descriptionStr));
+    }
+    
+    private OnClickListener mSwitchOldListener = new OnClickListener() {
+        public void onClick(View v) {
+            try {
+                ActivityManagerNative.getDefault().moveTaskToFront(mCurTask);
+            } catch (RemoteException e) {
+            }
+            finish();
+        }
+    };
+    
+    private OnClickListener mSwitchNewListener = new OnClickListener() {
+        public void onClick(View v) {
+            try {
+                ActivityManagerNative.getDefault().finishHeavyWeightApp();
+            } catch (RemoteException e) {
+            }
+            try {
+                if (mHasResult) {
+                    startIntentSenderForResult(mStartIntent, -1, null,
+                            Intent.FLAG_ACTIVITY_FORWARD_RESULT,
+                            Intent.FLAG_ACTIVITY_FORWARD_RESULT, 0);
+                } else {
+                    startIntentSenderForResult(mStartIntent, -1, null, 0, 0, 0);
+                }
+            } catch (IntentSender.SendIntentException ex) {
+                Log.w("HeavyWeightSwitcherActivity", "Failure starting", ex);
+            }
+            finish();
+        }
+    };
+    
+    private OnClickListener mCancelListener = new OnClickListener() {
+        public void onClick(View v) {
+            finish();
+        }
+    };
+}
diff --git a/core/java/com/android/internal/app/IBatteryStats.aidl b/core/java/com/android/internal/app/IBatteryStats.aidl
index d5ccdeb..88ef395 100644
--- a/core/java/com/android/internal/app/IBatteryStats.aidl
+++ b/core/java/com/android/internal/app/IBatteryStats.aidl
@@ -50,8 +50,7 @@
     void noteScanWifiLockReleased(int uid);
     void noteWifiMulticastEnabled(int uid);
     void noteWifiMulticastDisabled(int uid);
-    void setOnBattery(boolean onBattery, int level);
-    void recordCurrentLevel(int level);
+    void setBatteryState(int status, int health, int plugType, int level, int temp, int volt);
     long getAwakeTimeBattery();
     long getAwakeTimePlugged();
 }
diff --git a/core/java/com/android/internal/app/IMediaContainerService.aidl b/core/java/com/android/internal/app/IMediaContainerService.aidl
index 0f817b7..89649a9 100755
--- a/core/java/com/android/internal/app/IMediaContainerService.aidl
+++ b/core/java/com/android/internal/app/IMediaContainerService.aidl
@@ -28,4 +28,4 @@
                 in ParcelFileDescriptor outStream);
     PackageInfoLite getMinimalPackageInfo(in Uri fileUri, int flags);
     boolean checkFreeStorage(boolean external, in Uri fileUri);
-}
\ No newline at end of file
+}
diff --git a/core/java/com/android/internal/app/NetInitiatedActivity.java b/core/java/com/android/internal/app/NetInitiatedActivity.java
index 24818a8..36f45b2 100755
--- a/core/java/com/android/internal/app/NetInitiatedActivity.java
+++ b/core/java/com/android/internal/app/NetInitiatedActivity.java
@@ -23,14 +23,9 @@
 import android.content.Intent;
 import android.content.IntentFilter;
 import android.os.Bundle;
-import android.os.Handler;
-import android.os.Message;
-import android.os.RemoteException;
-import android.os.ServiceManager;
 import android.widget.Toast;
 import android.util.Log;
 import android.location.LocationManager;
-import com.android.internal.location.GpsLocationProvider;
 import com.android.internal.location.GpsNetInitiatedHandler;
 
 /**
@@ -44,8 +39,8 @@
     private static final boolean DEBUG = true;
     private static final boolean VERBOSE = false;
 
-    private static final int POSITIVE_BUTTON = AlertDialog.BUTTON1;
-    private static final int NEGATIVE_BUTTON = AlertDialog.BUTTON2;
+    private static final int POSITIVE_BUTTON = AlertDialog.BUTTON_POSITIVE;
+    private static final int NEGATIVE_BUTTON = AlertDialog.BUTTON_NEGATIVE;
 
     // Dialog button text
     public static final String BUTTON_TEXT_ACCEPT = "Accept";
diff --git a/core/java/com/android/internal/app/RingtonePickerActivity.java b/core/java/com/android/internal/app/RingtonePickerActivity.java
index ddddabe..5569ffe 100644
--- a/core/java/com/android/internal/app/RingtonePickerActivity.java
+++ b/core/java/com/android/internal/app/RingtonePickerActivity.java
@@ -223,7 +223,7 @@
      * On click of Ok/Cancel buttons
      */
     public void onClick(DialogInterface dialog, int which) {
-        boolean positiveResult = which == BUTTON1;
+        boolean positiveResult = which == DialogInterface.BUTTON_POSITIVE;
         
         // Stop playing the previous ringtone
         mRingtoneManager.stopPreviousRingtone();
diff --git a/core/java/com/android/internal/os/BatteryStatsImpl.java b/core/java/com/android/internal/os/BatteryStatsImpl.java
index aadb576..642c313 100644
--- a/core/java/com/android/internal/os/BatteryStatsImpl.java
+++ b/core/java/com/android/internal/os/BatteryStatsImpl.java
@@ -20,6 +20,7 @@
 
 import android.bluetooth.BluetoothHeadset;
 import android.net.TrafficStats;
+import android.os.BatteryManager;
 import android.os.BatteryStats;
 import android.os.Parcel;
 import android.os.ParcelFormatException;
@@ -56,13 +57,17 @@
 public final class BatteryStatsImpl extends BatteryStats {
     private static final String TAG = "BatteryStatsImpl";
     private static final boolean DEBUG = false;
-
+    private static final boolean DEBUG_HISTORY = false;
+    
     // In-memory Parcel magic number, used to detect attempts to unmarshall bad data
     private static final int MAGIC = 0xBA757475; // 'BATSTATS' 
 
     // Current on-disk Parcel version
-    private static final int VERSION = 43;
+    private static final int VERSION = 48;
 
+    // Maximum number of items we will record in the history.
+    private static final int MAX_HISTORY_ITEMS = 1000;
+    
     // The maximum number of names wakelocks we will keep track of
     // per uid; once the limit is reached, we batch the remaining wakelocks
     // in to one common name.
@@ -94,6 +99,17 @@
     // is unplugged from power.
     final ArrayList<Unpluggable> mUnpluggables = new ArrayList<Unpluggable>();
     
+    boolean mShuttingDown;
+    
+    long mHistoryBaseTime;
+    boolean mHaveBatteryLevel = false;
+    boolean mRecordingHistory = true;
+    int mNumHistoryItems;
+    HistoryItem mHistory;
+    HistoryItem mHistoryEnd;
+    HistoryItem mHistoryCache;
+    final HistoryItem mHistoryCur = new HistoryItem();
+    
     int mStartCount;
 
     long mBatteryUptime;
@@ -166,6 +182,7 @@
      * These keep track of battery levels (1-100) at the last plug event and the last unplug event.
      */
     int mDischargeStartLevel;
+    int mDischargeUnplugLevel;
     int mDischargeCurrentLevel;
 
     long mLastWriteTime = 0; // Milliseconds
@@ -232,12 +249,14 @@
      */
     public static class Counter extends BatteryStats.Counter implements Unpluggable {
         final AtomicInteger mCount = new AtomicInteger();
+        final ArrayList<Unpluggable> mUnpluggables;
         int mLoadedCount;
         int mLastCount;
         int mUnpluggedCount;
         int mPluggedCount;
         
         Counter(ArrayList<Unpluggable> unpluggables, Parcel in) {
+            mUnpluggables = unpluggables;
             mPluggedCount = in.readInt();
             mCount.set(mPluggedCount);
             mLoadedCount = in.readInt();
@@ -247,6 +266,7 @@
         }
 
         Counter(ArrayList<Unpluggable> unpluggables) {
+            mUnpluggables = unpluggables;
             unpluggables.add(this);
         }
         
@@ -289,9 +309,9 @@
                 val = mLastCount;
             } else {
                 val = mCount.get();
-                if (which == STATS_UNPLUGGED) {
+                if (which == STATS_SINCE_UNPLUGGED) {
                     val -= mUnpluggedCount;
-                } else if (which != STATS_TOTAL) {
+                } else if (which != STATS_SINCE_CHARGED) {
                     val -= mLoadedCount;
                 }
             }
@@ -310,6 +330,21 @@
             mCount.incrementAndGet();
         }
 
+        /**
+         * Clear state of this counter.
+         */
+        void reset(boolean detachIfReset) {
+            mCount.set(0);
+            mLoadedCount = mLastCount = mPluggedCount = mUnpluggedCount = 0;
+            if (detachIfReset) {
+                detach();
+            }
+        }
+        
+        void detach() {
+            mUnpluggables.remove(this);
+        }
+        
         void writeSummaryFromParcelLocked(Parcel out) {
             int count = mCount.get();
             out.writeInt(count);
@@ -344,7 +379,7 @@
      */
     public static abstract class Timer extends BatteryStats.Timer implements Unpluggable {
         final int mType;
-
+        final ArrayList<Unpluggable> mUnpluggables;
         
         int mCount;
         int mLoadedCount;
@@ -389,6 +424,7 @@
          */
         Timer(int type, ArrayList<Unpluggable> unpluggables, Parcel in) {
             mType = type;
+            mUnpluggables = unpluggables;
             
             mCount = in.readInt();
             mLoadedCount = in.readInt();
@@ -403,6 +439,7 @@
 
         Timer(int type, ArrayList<Unpluggable> unpluggables) {
             mType = type;
+            mUnpluggables = unpluggables;
             unpluggables.add(this);
         }
 
@@ -410,6 +447,22 @@
         
         protected abstract int computeCurrentCountLocked();
         
+        /**
+         * Clear state of this timer.  Returns true if the timer is inactive
+         * so can be completely dropped.
+         */
+        boolean reset(boolean detachIfReset) {
+            mTotalTime = mLoadedTime = mLastTime = 0;
+            mCount = mLoadedCount = mLastCount = 0;
+            if (detachIfReset) {
+                detach();
+            }
+            return true;
+        }
+        
+        void detach() {
+            mUnpluggables.remove(this);
+        }
         
         public void writeToParcel(Parcel out, long batteryRealtime) {
             out.writeInt(mCount);
@@ -474,9 +527,9 @@
                 val = mLastTime;
             } else {
                 val = computeRunTimeLocked(batteryRealtime);
-                if (which == STATS_UNPLUGGED) {
+                if (which == STATS_SINCE_UNPLUGGED) {
                     val -= mUnpluggedTime;
-                } else if (which != STATS_TOTAL) {
+                } else if (which != STATS_SINCE_CHARGED) {
                     val -= mLoadedTime;
                 }
             }
@@ -491,9 +544,9 @@
                 val = mLastCount;
             } else {
                 val = computeCurrentCountLocked();
-                if (which == STATS_UNPLUGGED) {
+                if (which == STATS_SINCE_UNPLUGGED) {
                     val -= mUnpluggedCount;
-                } else if (which != STATS_TOTAL) {
+                } else if (which != STATS_SINCE_CHARGED) {
                     val -= mLoadedCount;
                 }
             }
@@ -664,6 +717,12 @@
             out.writeInt(mTrackingReportedValues ? 1 : 0);
         }
         
+        boolean reset(boolean detachIfReset) {
+            super.reset(detachIfReset);
+            setStale();
+            return true;
+        }
+        
         void writeSummaryFromParcelLocked(Parcel out, long batteryRealtime) {
             super.writeSummaryFromParcelLocked(out, batteryRealtime);
             out.writeLong(mCurrentReportedTotalTime);
@@ -686,7 +745,6 @@
         final ArrayList<StopwatchTimer> mTimerPool;
         int mNesting;
 
-
         /**
          * The last time at which we updated the timer.  If mNesting is > 0,
          * subtract this from the current battery time to find the amount of
@@ -836,6 +894,19 @@
             return mCount;
         }
 
+        boolean reset(boolean detachIfReset) {
+            boolean canDetach = mNesting <= 0;
+            super.reset(canDetach && detachIfReset);
+            return canDetach;
+        }
+        
+        void detach() {
+            super.detach();
+            if (mTimerPool != null) {
+                mTimerPool.remove(this);
+            }
+        }
+        
         void readSummaryFromParcelLocked(Parcel in) {
             super.readSummaryFromParcelLocked(in);
             mNesting = 0;
@@ -973,12 +1044,12 @@
     }
 
     private void doDataPlug(long[] dataTransfer, long currentBytes) {
-        dataTransfer[STATS_LAST] = dataTransfer[STATS_UNPLUGGED];
-        dataTransfer[STATS_UNPLUGGED] = -1;
+        dataTransfer[STATS_LAST] = dataTransfer[STATS_SINCE_UNPLUGGED];
+        dataTransfer[STATS_SINCE_UNPLUGGED] = -1;
     }
 
     private void doDataUnplug(long[] dataTransfer, long currentBytes) {
-        dataTransfer[STATS_UNPLUGGED] = currentBytes;
+        dataTransfer[STATS_SINCE_UNPLUGGED] = currentBytes;
     }
 
     /**
@@ -1042,7 +1113,55 @@
         mBtHeadset = headset;
     }
 
-    public void doUnplug(long batteryUptime, long batteryRealtime) {
+    void addHistoryRecordLocked(long curTime) {
+        if (!mHaveBatteryLevel || !mRecordingHistory) {
+            return;
+        }
+        if (mNumHistoryItems >= MAX_HISTORY_ITEMS) {
+            // Once we've reached the maximum number of items, we only
+            // record changes to the battery level.
+            if (mHistoryEnd != null && mHistoryEnd.batteryLevel
+                    == mHistoryCur.batteryLevel) {
+                return;
+            }
+        }
+        addHistoryRecordLocked(curTime, HistoryItem.CMD_UPDATE);
+    }
+    
+    void addHistoryRecordLocked(long curTime, byte cmd) {
+        HistoryItem rec = mHistoryCache;
+        if (rec != null) {
+            mHistoryCache = rec.next;
+        } else {
+            rec = new HistoryItem();
+        }
+        rec.setTo(mHistoryBaseTime + curTime, cmd, mHistoryCur);
+        
+        addHistoryRecordLocked(rec);
+    }
+    
+    void addHistoryRecordLocked(HistoryItem rec) {
+        mNumHistoryItems++;
+        rec.next = null;
+        if (mHistoryEnd != null) {
+            mHistoryEnd.next = rec;
+            mHistoryEnd = rec;
+        } else {
+            mHistory = mHistoryEnd = rec;
+        }
+    }
+    
+    void clearHistoryLocked() {
+        if (mHistory != null) {
+            mHistoryEnd.next = mHistoryCache;
+            mHistoryCache = mHistory;
+            mHistory = mHistoryEnd = null;
+        }
+        mNumHistoryItems = 0;
+        mHistoryBaseTime = 0;
+    }
+    
+    public void doUnplugLocked(long batteryUptime, long batteryRealtime) {
         for (int iu = mUidStats.size() - 1; iu >= 0; iu--) {
             Uid u = mUidStats.valueAt(iu);
             u.mStartedTcpBytesReceived = TrafficStats.getUidRxBytes(u.mUid);
@@ -1066,7 +1185,7 @@
         mBluetoothPingCount = 0;
     }
 
-    public void doPlug(long batteryUptime, long batteryRealtime) {
+    public void doPlugLocked(long batteryUptime, long batteryRealtime) {
         for (int iu = mUidStats.size() - 1; iu >= 0; iu--) {
             Uid u = mUidStats.valueAt(iu);
             if (u.mStartedTcpBytesReceived >= 0) {
@@ -1094,16 +1213,37 @@
         mBluetoothPingStart = -1;
     }
 
-    public void noteStartGps(int uid) {
+    int mGpsNesting;
+    
+    public void noteStartGpsLocked(int uid) {
+        if (mGpsNesting == 0) {
+            mHistoryCur.states |= HistoryItem.STATE_GPS_ON_FLAG;
+            if (DEBUG_HISTORY) Slog.v(TAG, "Start GPS to: "
+                    + Integer.toHexString(mHistoryCur.states));
+            addHistoryRecordLocked(SystemClock.elapsedRealtime());
+        }
+        mGpsNesting++;
         getUidStatsLocked(uid).noteStartGps();
     }
     
-    public void noteStopGps(int uid) {
+    public void noteStopGpsLocked(int uid) {
+        mGpsNesting--;
+        if (mGpsNesting == 0) {
+            mHistoryCur.states &= ~HistoryItem.STATE_GPS_ON_FLAG;
+            if (DEBUG_HISTORY) Slog.v(TAG, "Stop GPS to: "
+                    + Integer.toHexString(mHistoryCur.states));
+            addHistoryRecordLocked(SystemClock.elapsedRealtime());
+        }
         getUidStatsLocked(uid).noteStopGps();
     }
 
     public void noteScreenOnLocked() {
         if (!mScreenOn) {
+            mHistoryCur.states |= HistoryItem.STATE_SCREEN_ON_FLAG;
+            if (DEBUG_HISTORY) Slog.v(TAG, "Screen on to: "
+                    + Integer.toHexString(mHistoryCur.states));
+            addHistoryRecordLocked(SystemClock.elapsedRealtime());
+            mGpsNesting++;
             mScreenOn = true;
             mScreenOnTimer.startRunningLocked(this);
             if (mScreenBrightnessBin >= 0) {
@@ -1114,6 +1254,10 @@
     
     public void noteScreenOffLocked() {
         if (mScreenOn) {
+            mHistoryCur.states &= ~HistoryItem.STATE_SCREEN_ON_FLAG;
+            if (DEBUG_HISTORY) Slog.v(TAG, "Screen off to: "
+                    + Integer.toHexString(mHistoryCur.states));
+            addHistoryRecordLocked(SystemClock.elapsedRealtime());
             mScreenOn = false;
             mScreenOnTimer.stopRunningLocked(this);
             if (mScreenBrightnessBin >= 0) {
@@ -1128,6 +1272,11 @@
         if (bin < 0) bin = 0;
         else if (bin >= NUM_SCREEN_BRIGHTNESS_BINS) bin = NUM_SCREEN_BRIGHTNESS_BINS-1;
         if (mScreenBrightnessBin != bin) {
+            mHistoryCur.states = (mHistoryCur.states&~HistoryItem.STATE_BRIGHTNESS_MASK)
+                    | (bin << HistoryItem.STATE_BRIGHTNESS_SHIFT);
+            if (DEBUG_HISTORY) Slog.v(TAG, "Screen brightness " + bin + " to: "
+                    + Integer.toHexString(mHistoryCur.states));
+            addHistoryRecordLocked(SystemClock.elapsedRealtime());
             if (mScreenOn) {
                 if (mScreenBrightnessBin >= 0) {
                     mScreenBrightnessTimer[mScreenBrightnessBin].stopRunningLocked(this);
@@ -1148,6 +1297,10 @@
     
     public void notePhoneOnLocked() {
         if (!mPhoneOn) {
+            mHistoryCur.states |= HistoryItem.STATE_PHONE_ON_FLAG;
+            if (DEBUG_HISTORY) Slog.v(TAG, "Phone on to: "
+                    + Integer.toHexString(mHistoryCur.states));
+            addHistoryRecordLocked(SystemClock.elapsedRealtime());
             mPhoneOn = true;
             mPhoneOnTimer.startRunningLocked(this);
         }
@@ -1155,6 +1308,10 @@
     
     public void notePhoneOffLocked() {
         if (mPhoneOn) {
+            mHistoryCur.states &= ~HistoryItem.STATE_PHONE_ON_FLAG;
+            if (DEBUG_HISTORY) Slog.v(TAG, "Phone off to: "
+                    + Integer.toHexString(mHistoryCur.states));
+            addHistoryRecordLocked(SystemClock.elapsedRealtime());
             mPhoneOn = false;
             mPhoneOnTimer.stopRunningLocked(this);
         }
@@ -1176,7 +1333,11 @@
             }
         }
         // Stop Signal Scanning timer, in case we're going into service
-        while (mPhoneSignalScanningTimer.isRunningLocked()) {
+        if (mPhoneSignalScanningTimer.isRunningLocked()) {
+            mHistoryCur.states &= ~HistoryItem.STATE_PHONE_SCANNING_FLAG;
+            if (DEBUG_HISTORY) Slog.v(TAG, "Phone stopped scanning to: "
+                    + Integer.toHexString(mHistoryCur.states));
+            addHistoryRecordLocked(SystemClock.elapsedRealtime());
             mPhoneSignalScanningTimer.stopRunningLocked(this);
         }
 
@@ -1192,10 +1353,22 @@
                 mPhoneSignalStrengthsTimer[mPhoneSignalStrengthBin].startRunningLocked(this);
             }
             if (!mPhoneSignalScanningTimer.isRunningLocked()) {
+                mHistoryCur.states |= HistoryItem.STATE_PHONE_SCANNING_FLAG;
+                if (DEBUG_HISTORY) Slog.v(TAG, "Phone started scanning to: "
+                        + Integer.toHexString(mHistoryCur.states));
+                addHistoryRecordLocked(SystemClock.elapsedRealtime());
                 mPhoneSignalScanningTimer.startRunningLocked(this);
             }
         }
-        mPhoneServiceState = state;
+        
+        if (mPhoneServiceState != state) {
+            mHistoryCur.states = (mHistoryCur.states&~HistoryItem.STATE_PHONE_STATE_MASK)
+                    | (state << HistoryItem.STATE_PHONE_STATE_SHIFT);
+            if (DEBUG_HISTORY) Slog.v(TAG, "Phone state " + bin + " to: "
+                    + Integer.toHexString(mHistoryCur.states));
+            addHistoryRecordLocked(SystemClock.elapsedRealtime());
+            mPhoneServiceState = state;
+        }
     }
 
     public void notePhoneSignalStrengthLocked(SignalStrength signalStrength) {
@@ -1222,6 +1395,11 @@
             else bin = SIGNAL_STRENGTH_POOR;
         }
         if (mPhoneSignalStrengthBin != bin) {
+            mHistoryCur.states = (mHistoryCur.states&~HistoryItem.STATE_SIGNAL_STRENGTH_MASK)
+                    | (bin << HistoryItem.STATE_SIGNAL_STRENGTH_SHIFT);
+            if (DEBUG_HISTORY) Slog.v(TAG, "Signal strength " + bin + " to: "
+                    + Integer.toHexString(mHistoryCur.states));
+            addHistoryRecordLocked(SystemClock.elapsedRealtime());
             if (mPhoneSignalStrengthBin >= 0) {
                 mPhoneSignalStrengthsTimer[mPhoneSignalStrengthBin].stopRunningLocked(this);
             }
@@ -1243,6 +1421,33 @@
                 case TelephonyManager.NETWORK_TYPE_UMTS:
                     bin = DATA_CONNECTION_UMTS;
                     break;
+                case TelephonyManager.NETWORK_TYPE_CDMA:
+                    bin = DATA_CONNECTION_CDMA;
+                    break;
+                case TelephonyManager.NETWORK_TYPE_EVDO_0:
+                    bin = DATA_CONNECTION_EVDO_0;
+                    break;
+                case TelephonyManager.NETWORK_TYPE_EVDO_A:
+                    bin = DATA_CONNECTION_EVDO_A;
+                    break;
+                case TelephonyManager.NETWORK_TYPE_1xRTT:
+                    bin = DATA_CONNECTION_1xRTT;
+                    break;
+                case TelephonyManager.NETWORK_TYPE_HSDPA:
+                    bin = DATA_CONNECTION_HSDPA;
+                    break;
+                case TelephonyManager.NETWORK_TYPE_HSUPA:
+                    bin = DATA_CONNECTION_HSUPA;
+                    break;
+                case TelephonyManager.NETWORK_TYPE_HSPA:
+                    bin = DATA_CONNECTION_HSPA;
+                    break;
+                case TelephonyManager.NETWORK_TYPE_IDEN:
+                    bin = DATA_CONNECTION_IDEN;
+                    break;
+                case TelephonyManager.NETWORK_TYPE_EVDO_B:
+                    bin = DATA_CONNECTION_EVDO_B;
+                    break;
                 default:
                     bin = DATA_CONNECTION_OTHER;
                     break;
@@ -1250,6 +1455,11 @@
         }
         if (DEBUG) Log.i(TAG, "Phone Data Connection -> " + dataType + " = " + hasData);
         if (mPhoneDataConnectionType != bin) {
+            mHistoryCur.states = (mHistoryCur.states&~HistoryItem.STATE_DATA_CONNECTION_MASK)
+                    | (bin << HistoryItem.STATE_DATA_CONNECTION_SHIFT);
+            if (DEBUG_HISTORY) Slog.v(TAG, "Data connection " + bin + " to: "
+                    + Integer.toHexString(mHistoryCur.states));
+            addHistoryRecordLocked(SystemClock.elapsedRealtime());
             if (mPhoneDataConnectionType >= 0) {
                 mPhoneDataConnectionsTimer[mPhoneDataConnectionType].stopRunningLocked(this);
             }
@@ -1260,6 +1470,10 @@
     
     public void noteWifiOnLocked(int uid) {
         if (!mWifiOn) {
+            mHistoryCur.states |= HistoryItem.STATE_WIFI_ON_FLAG;
+            if (DEBUG_HISTORY) Slog.v(TAG, "WIFI on to: "
+                    + Integer.toHexString(mHistoryCur.states));
+            addHistoryRecordLocked(SystemClock.elapsedRealtime());
             mWifiOn = true;
             mWifiOnTimer.startRunningLocked(this);
         }
@@ -1274,6 +1488,10 @@
     
     public void noteWifiOffLocked(int uid) {
         if (mWifiOn) {
+            mHistoryCur.states &= ~HistoryItem.STATE_WIFI_ON_FLAG;
+            if (DEBUG_HISTORY) Slog.v(TAG, "WIFI off to: "
+                    + Integer.toHexString(mHistoryCur.states));
+            addHistoryRecordLocked(SystemClock.elapsedRealtime());
             mWifiOn = false;
             mWifiOnTimer.stopRunningLocked(this);
         }
@@ -1285,6 +1503,10 @@
 
     public void noteAudioOnLocked(int uid) {
         if (!mAudioOn) {
+            mHistoryCur.states |= HistoryItem.STATE_AUDIO_ON_FLAG;
+            if (DEBUG_HISTORY) Slog.v(TAG, "Audio on to: "
+                    + Integer.toHexString(mHistoryCur.states));
+            addHistoryRecordLocked(SystemClock.elapsedRealtime());
             mAudioOn = true;
             mAudioOnTimer.startRunningLocked(this);
         }
@@ -1293,6 +1515,10 @@
     
     public void noteAudioOffLocked(int uid) {
         if (mAudioOn) {
+            mHistoryCur.states &= ~HistoryItem.STATE_AUDIO_ON_FLAG;
+            if (DEBUG_HISTORY) Slog.v(TAG, "Audio off to: "
+                    + Integer.toHexString(mHistoryCur.states));
+            addHistoryRecordLocked(SystemClock.elapsedRealtime());
             mAudioOn = false;
             mAudioOnTimer.stopRunningLocked(this);
         }
@@ -1301,6 +1527,10 @@
 
     public void noteVideoOnLocked(int uid) {
         if (!mVideoOn) {
+            mHistoryCur.states |= HistoryItem.STATE_VIDEO_ON_FLAG;
+            if (DEBUG_HISTORY) Slog.v(TAG, "Video on to: "
+                    + Integer.toHexString(mHistoryCur.states));
+            addHistoryRecordLocked(SystemClock.elapsedRealtime());
             mVideoOn = true;
             mVideoOnTimer.startRunningLocked(this);
         }
@@ -1309,6 +1539,10 @@
     
     public void noteVideoOffLocked(int uid) {
         if (mVideoOn) {
+            mHistoryCur.states &= ~HistoryItem.STATE_VIDEO_ON_FLAG;
+            if (DEBUG_HISTORY) Slog.v(TAG, "Video off to: "
+                    + Integer.toHexString(mHistoryCur.states));
+            addHistoryRecordLocked(SystemClock.elapsedRealtime());
             mVideoOn = false;
             mVideoOnTimer.stopRunningLocked(this);
         }
@@ -1317,6 +1551,10 @@
 
     public void noteWifiRunningLocked() {
         if (!mWifiRunning) {
+            mHistoryCur.states |= HistoryItem.STATE_WIFI_RUNNING_FLAG;
+            if (DEBUG_HISTORY) Slog.v(TAG, "WIFI running to: "
+                    + Integer.toHexString(mHistoryCur.states));
+            addHistoryRecordLocked(SystemClock.elapsedRealtime());
             mWifiRunning = true;
             mWifiRunningTimer.startRunningLocked(this);
         }
@@ -1324,6 +1562,10 @@
 
     public void noteWifiStoppedLocked() {
         if (mWifiRunning) {
+            mHistoryCur.states &= ~HistoryItem.STATE_WIFI_RUNNING_FLAG;
+            if (DEBUG_HISTORY) Slog.v(TAG, "WIFI stopped to: "
+                    + Integer.toHexString(mHistoryCur.states));
+            addHistoryRecordLocked(SystemClock.elapsedRealtime());
             mWifiRunning = false;
             mWifiRunningTimer.stopRunningLocked(this);
         }
@@ -1331,6 +1573,10 @@
 
     public void noteBluetoothOnLocked() {
         if (!mBluetoothOn) {
+            mHistoryCur.states |= HistoryItem.STATE_BLUETOOTH_ON_FLAG;
+            if (DEBUG_HISTORY) Slog.v(TAG, "Bluetooth on to: "
+                    + Integer.toHexString(mHistoryCur.states));
+            addHistoryRecordLocked(SystemClock.elapsedRealtime());
             mBluetoothOn = true;
             mBluetoothOnTimer.startRunningLocked(this);
         }
@@ -1338,32 +1584,84 @@
     
     public void noteBluetoothOffLocked() {
         if (mBluetoothOn) {
+            mHistoryCur.states &= ~HistoryItem.STATE_BLUETOOTH_ON_FLAG;
+            if (DEBUG_HISTORY) Slog.v(TAG, "Bluetooth off to: "
+                    + Integer.toHexString(mHistoryCur.states));
+            addHistoryRecordLocked(SystemClock.elapsedRealtime());
             mBluetoothOn = false;
             mBluetoothOnTimer.stopRunningLocked(this);
         }
     }
     
+    int mWifiFullLockNesting = 0;
+    
     public void noteFullWifiLockAcquiredLocked(int uid) {
+        if (mWifiFullLockNesting == 0) {
+            mHistoryCur.states |= HistoryItem.STATE_WIFI_FULL_LOCK_FLAG;
+            if (DEBUG_HISTORY) Slog.v(TAG, "WIFI full lock on to: "
+                    + Integer.toHexString(mHistoryCur.states));
+            addHistoryRecordLocked(SystemClock.elapsedRealtime());
+        }
+        mWifiFullLockNesting++;
         getUidStatsLocked(uid).noteFullWifiLockAcquiredLocked();
     }
 
     public void noteFullWifiLockReleasedLocked(int uid) {
+        mWifiFullLockNesting--;
+        if (mWifiFullLockNesting == 0) {
+            mHistoryCur.states &= ~HistoryItem.STATE_WIFI_FULL_LOCK_FLAG;
+            if (DEBUG_HISTORY) Slog.v(TAG, "WIFI full lock off to: "
+                    + Integer.toHexString(mHistoryCur.states));
+            addHistoryRecordLocked(SystemClock.elapsedRealtime());
+        }
         getUidStatsLocked(uid).noteFullWifiLockReleasedLocked();
     }
 
+    int mWifiScanLockNesting = 0;
+    
     public void noteScanWifiLockAcquiredLocked(int uid) {
+        if (mWifiScanLockNesting == 0) {
+            mHistoryCur.states |= HistoryItem.STATE_WIFI_SCAN_LOCK_FLAG;
+            if (DEBUG_HISTORY) Slog.v(TAG, "WIFI scan lock on to: "
+                    + Integer.toHexString(mHistoryCur.states));
+            addHistoryRecordLocked(SystemClock.elapsedRealtime());
+        }
+        mWifiScanLockNesting++;
         getUidStatsLocked(uid).noteScanWifiLockAcquiredLocked();
     }
 
     public void noteScanWifiLockReleasedLocked(int uid) {
+        mWifiScanLockNesting--;
+        if (mWifiScanLockNesting == 0) {
+            mHistoryCur.states &= ~HistoryItem.STATE_WIFI_SCAN_LOCK_FLAG;
+            if (DEBUG_HISTORY) Slog.v(TAG, "WIFI scan lock off to: "
+                    + Integer.toHexString(mHistoryCur.states));
+            addHistoryRecordLocked(SystemClock.elapsedRealtime());
+        }
         getUidStatsLocked(uid).noteScanWifiLockReleasedLocked();
     }
 
+    int mWifiMulticastNesting = 0;
+    
     public void noteWifiMulticastEnabledLocked(int uid) {
+        if (mWifiMulticastNesting == 0) {
+            mHistoryCur.states |= HistoryItem.STATE_WIFI_MULTICAST_ON_FLAG;
+            if (DEBUG_HISTORY) Slog.v(TAG, "WIFI multicast on to: "
+                    + Integer.toHexString(mHistoryCur.states));
+            addHistoryRecordLocked(SystemClock.elapsedRealtime());
+        }
+        mWifiMulticastNesting++;
         getUidStatsLocked(uid).noteWifiMulticastEnabledLocked();
     }
 
     public void noteWifiMulticastDisabledLocked(int uid) {
+        mWifiMulticastNesting--;
+        if (mWifiMulticastNesting == 0) {
+            mHistoryCur.states &= ~HistoryItem.STATE_WIFI_MULTICAST_ON_FLAG;
+            if (DEBUG_HISTORY) Slog.v(TAG, "WIFI multicast off to: "
+                    + Integer.toHexString(mHistoryCur.states));
+            addHistoryRecordLocked(SystemClock.elapsedRealtime());
+        }
         getUidStatsLocked(uid).noteWifiMulticastDisabledLocked();
     }
 
@@ -1531,9 +1829,9 @@
                 return mLoadedTcpBytesReceived;
             } else {
                 long current = computeCurrentTcpBytesReceived();
-                if (which == STATS_UNPLUGGED) {
+                if (which == STATS_SINCE_UNPLUGGED) {
                     current -= mTcpBytesReceivedAtLastUnplug;
-                } else if (which == STATS_TOTAL) {
+                } else if (which == STATS_SINCE_CHARGED) {
                     current += mLoadedTcpBytesReceived;
                 }
                 return current;
@@ -1551,9 +1849,9 @@
                 return mLoadedTcpBytesSent;
             } else {
                 long current = computeCurrentTcpBytesSent();
-                if (which == STATS_UNPLUGGED) {
+                if (which == STATS_SINCE_UNPLUGGED) {
                     current -= mTcpBytesSentAtLastUnplug;
-                } else if (which == STATS_TOTAL) {
+                } else if (which == STATS_SINCE_CHARGED) {
                     current += mLoadedTcpBytesSent;
                 }
                 return current;
@@ -1564,6 +1862,10 @@
         public void noteWifiTurnedOnLocked() {
             if (!mWifiTurnedOn) {
                 mWifiTurnedOn = true;
+                if (mWifiTurnedOnTimer == null) {
+                    mWifiTurnedOnTimer = new StopwatchTimer(WIFI_TURNED_ON,
+                            null, mUnpluggables);
+                }
                 mWifiTurnedOnTimer.startRunningLocked(BatteryStatsImpl.this);
             }
         }
@@ -1580,43 +1882,15 @@
         public void noteFullWifiLockAcquiredLocked() {
             if (!mFullWifiLockOut) {
                 mFullWifiLockOut = true;
+                if (mFullWifiLockTimer == null) {
+                    mFullWifiLockTimer = new StopwatchTimer(FULL_WIFI_LOCK,
+                            null, mUnpluggables);
+                }
                 mFullWifiLockTimer.startRunningLocked(BatteryStatsImpl.this);
             }
         }
         
         @Override
-        public void noteVideoTurnedOnLocked() {
-            if (!mVideoTurnedOn) {
-                mVideoTurnedOn = true;
-                mVideoTurnedOnTimer.startRunningLocked(BatteryStatsImpl.this);
-            }
-        }
-
-        @Override
-        public void noteVideoTurnedOffLocked() {
-            if (mVideoTurnedOn) {
-                mVideoTurnedOn = false;
-                mVideoTurnedOnTimer.stopRunningLocked(BatteryStatsImpl.this);
-            }
-        }
-
-        @Override
-        public void noteAudioTurnedOnLocked() {
-            if (!mAudioTurnedOn) {
-                mAudioTurnedOn = true;
-                mAudioTurnedOnTimer.startRunningLocked(BatteryStatsImpl.this);
-            }
-        }
-
-        @Override
-        public void noteAudioTurnedOffLocked() {
-            if (mAudioTurnedOn) {
-                mAudioTurnedOn = false;
-                mAudioTurnedOnTimer.stopRunningLocked(BatteryStatsImpl.this);
-            }
-        }
-
-        @Override
         public void noteFullWifiLockReleasedLocked() {
             if (mFullWifiLockOut) {
                 mFullWifiLockOut = false;
@@ -1628,6 +1902,10 @@
         public void noteScanWifiLockAcquiredLocked() {
             if (!mScanWifiLockOut) {
                 mScanWifiLockOut = true;
+                if (mScanWifiLockTimer == null) {
+                    mScanWifiLockTimer = new StopwatchTimer(SCAN_WIFI_LOCK,
+                            null, mUnpluggables);
+                }
                 mScanWifiLockTimer.startRunningLocked(BatteryStatsImpl.this);
             }
         }
@@ -1644,6 +1922,10 @@
         public void noteWifiMulticastEnabledLocked() {
             if (!mWifiMulticastEnabled) {
                 mWifiMulticastEnabled = true;
+                if (mWifiMulticastTimer == null) {
+                    mWifiMulticastTimer = new StopwatchTimer(WIFI_MULTICAST_ENABLED,
+                            null, mUnpluggables);
+                }
                 mWifiMulticastTimer.startRunningLocked(BatteryStatsImpl.this);
             }
         }
@@ -1656,37 +1938,95 @@
             }
         }
 
+        @Override
+        public void noteAudioTurnedOnLocked() {
+            if (!mAudioTurnedOn) {
+                mAudioTurnedOn = true;
+                if (mAudioTurnedOnTimer == null) {
+                    mAudioTurnedOnTimer = new StopwatchTimer(AUDIO_TURNED_ON,
+                            null, mUnpluggables);
+                }
+                mAudioTurnedOnTimer.startRunningLocked(BatteryStatsImpl.this);
+            }
+        }
+
+        @Override
+        public void noteAudioTurnedOffLocked() {
+            if (mAudioTurnedOn) {
+                mAudioTurnedOn = false;
+                mAudioTurnedOnTimer.stopRunningLocked(BatteryStatsImpl.this);
+            }
+        }
+
+        @Override
+        public void noteVideoTurnedOnLocked() {
+            if (!mVideoTurnedOn) {
+                mVideoTurnedOn = true;
+                if (mVideoTurnedOnTimer == null) {
+                    mVideoTurnedOnTimer = new StopwatchTimer(VIDEO_TURNED_ON,
+                            null, mUnpluggables);
+                }
+                mVideoTurnedOnTimer.startRunningLocked(BatteryStatsImpl.this);
+            }
+        }
+
+        @Override
+        public void noteVideoTurnedOffLocked() {
+            if (mVideoTurnedOn) {
+                mVideoTurnedOn = false;
+                mVideoTurnedOnTimer.stopRunningLocked(BatteryStatsImpl.this);
+            }
+        }
+
         @Override 
         public long getWifiTurnedOnTime(long batteryRealtime, int which) {
+            if (mWifiTurnedOnTimer == null) {
+                return 0;
+            }
             return mWifiTurnedOnTimer.getTotalTimeLocked(batteryRealtime, which);
         }
 
         @Override 
-        public long getAudioTurnedOnTime(long batteryRealtime, int which) {
-            return mAudioTurnedOnTimer.getTotalTimeLocked(batteryRealtime, which);
-        }
-
-        @Override 
-        public long getVideoTurnedOnTime(long batteryRealtime, int which) {
-            return mVideoTurnedOnTimer.getTotalTimeLocked(batteryRealtime, which);
-        }
-
-        @Override 
         public long getFullWifiLockTime(long batteryRealtime, int which) {
+            if (mFullWifiLockTimer == null) {
+                return 0;
+            }
             return mFullWifiLockTimer.getTotalTimeLocked(batteryRealtime, which);
         }
         
         @Override 
         public long getScanWifiLockTime(long batteryRealtime, int which) {
+            if (mScanWifiLockTimer == null) {
+                return 0;
+            }
             return mScanWifiLockTimer.getTotalTimeLocked(batteryRealtime, which);
         }
 
         @Override
         public long getWifiMulticastTime(long batteryRealtime, int which) {
+            if (mWifiMulticastTimer == null) {
+                return 0;
+            }
             return mWifiMulticastTimer.getTotalTimeLocked(batteryRealtime,
                                                           which);
         }
 
+        @Override 
+        public long getAudioTurnedOnTime(long batteryRealtime, int which) {
+            if (mAudioTurnedOnTimer == null) {
+                return 0;
+            }
+            return mAudioTurnedOnTimer.getTotalTimeLocked(batteryRealtime, which);
+        }
+
+        @Override 
+        public long getVideoTurnedOnTime(long batteryRealtime, int which) {
+            if (mVideoTurnedOnTimer == null) {
+                return 0;
+            }
+            return mVideoTurnedOnTimer.getTotalTimeLocked(batteryRealtime, which);
+        }
+
         @Override
         public void noteUserActivityLocked(int type) {
             if (mUserActivityCounters == null) {
@@ -1722,6 +2062,126 @@
                     ? (TrafficStats.getUidTxBytes(mUid) - mStartedTcpBytesSent) : 0);
         }
 
+        /**
+         * Clear all stats for this uid.  Returns true if the uid is completely
+         * inactive so can be dropped.
+         */
+        boolean reset() {
+            boolean active = false;
+            
+            if (mWifiTurnedOnTimer != null) {
+                active |= !mWifiTurnedOnTimer.reset(false);
+                active |= mWifiTurnedOn;
+            }
+            if (mFullWifiLockTimer != null) {
+                active |= !mFullWifiLockTimer.reset(false);
+                active |= mFullWifiLockOut;
+            }
+            if (mScanWifiLockTimer != null) {
+                active |= !mScanWifiLockTimer.reset(false);
+                active |= mScanWifiLockOut;
+            }
+            if (mWifiMulticastTimer != null) {
+                active |= !mWifiMulticastTimer.reset(false);
+                active |= mWifiMulticastEnabled;
+            }
+            if (mAudioTurnedOnTimer != null) {
+                active |= !mAudioTurnedOnTimer.reset(false);
+                active |= mAudioTurnedOn;
+            }
+            if (mVideoTurnedOnTimer != null) {
+                active |= !mVideoTurnedOnTimer.reset(false);
+                active |= mVideoTurnedOn;
+            }
+            
+            mLoadedTcpBytesReceived = mLoadedTcpBytesSent = 0;
+            mCurrentTcpBytesReceived = mCurrentTcpBytesSent = 0;
+            
+            if (mUserActivityCounters != null) {
+                for (int i=0; i<NUM_USER_ACTIVITY_TYPES; i++) {
+                    mUserActivityCounters[i].reset(false);
+                }
+            }
+
+            if (mWakelockStats.size() > 0) {
+                Iterator<Map.Entry<String, Wakelock>> it = mWakelockStats.entrySet().iterator();
+                while (it.hasNext()) {
+                    Map.Entry<String, Wakelock> wakelockEntry = it.next();
+                    Wakelock wl = wakelockEntry.getValue();
+                    if (wl.reset()) {
+                        it.remove();
+                    } else {
+                        active = true;
+                    }
+                }
+            }
+            if (mSensorStats.size() > 0) {
+                Iterator<Map.Entry<Integer, Sensor>> it = mSensorStats.entrySet().iterator();
+                while (it.hasNext()) {
+                    Map.Entry<Integer, Sensor> sensorEntry = it.next();
+                    Sensor s = sensorEntry.getValue();
+                    if (s.reset()) {
+                        it.remove();
+                    } else {
+                        active = true;
+                    }
+                }
+            }
+            if (mProcessStats.size() > 0) {
+                Iterator<Map.Entry<String, Proc>> it = mProcessStats.entrySet().iterator();
+                while (it.hasNext()) {
+                    Map.Entry<String, Proc> procEntry = it.next();
+                    procEntry.getValue().detach();
+                }
+                mProcessStats.clear();
+            }
+            if (mPackageStats.size() > 0) {
+                Iterator<Map.Entry<String, Pkg>> it = mPackageStats.entrySet().iterator();
+                while (it.hasNext()) {
+                    Map.Entry<String, Pkg> pkgEntry = it.next();
+                    Pkg p = pkgEntry.getValue();
+                    p.detach();
+                    if (p.mServiceStats.size() > 0) {
+                        Iterator<Map.Entry<String, Pkg.Serv>> it2
+                                = p.mServiceStats.entrySet().iterator();
+                        while (it2.hasNext()) {
+                            Map.Entry<String, Pkg.Serv> servEntry = it2.next();
+                            servEntry.getValue().detach();
+                        }
+                    }
+                }
+                mPackageStats.clear();
+            }
+            
+            if (!active) {
+                if (mWifiTurnedOnTimer != null) {
+                    mWifiTurnedOnTimer.detach();
+                }
+                if (mFullWifiLockTimer != null) {
+                    mFullWifiLockTimer.detach();
+                }
+                if (mScanWifiLockTimer != null) {
+                    mScanWifiLockTimer.detach();
+                }
+                if (mWifiMulticastTimer != null) {
+                    mWifiMulticastTimer.detach();
+                }
+                if (mAudioTurnedOnTimer != null) {
+                    mAudioTurnedOnTimer.detach();
+                }
+                if (mVideoTurnedOnTimer != null) {
+                    mVideoTurnedOnTimer.detach();
+                }
+                if (mUserActivityCounters != null) {
+                    for (int i=0; i<NUM_USER_ACTIVITY_TYPES; i++) {
+                        mUserActivityCounters[i].detach();
+                    }
+                }
+            }
+            
+            return !active;
+        }
+        
         void writeToParcelLocked(Parcel out, long batteryRealtime) {
             out.writeInt(mWakelockStats.size());
             for (Map.Entry<String, Uid.Wakelock> wakelockEntry : mWakelockStats.entrySet()) {
@@ -1757,19 +2217,49 @@
             out.writeLong(computeCurrentTcpBytesSent());
             out.writeLong(mTcpBytesReceivedAtLastUnplug);
             out.writeLong(mTcpBytesSentAtLastUnplug);
-            mWifiTurnedOnTimer.writeToParcel(out, batteryRealtime);
-            mFullWifiLockTimer.writeToParcel(out, batteryRealtime);
-            mAudioTurnedOnTimer.writeToParcel(out, batteryRealtime);
-            mVideoTurnedOnTimer.writeToParcel(out, batteryRealtime);
-            mScanWifiLockTimer.writeToParcel(out, batteryRealtime);
-            mWifiMulticastTimer.writeToParcel(out, batteryRealtime);
-            if (mUserActivityCounters == null) {
-                out.writeInt(0);
+            if (mWifiTurnedOnTimer != null) {
+                out.writeInt(1);
+                mWifiTurnedOnTimer.writeToParcel(out, batteryRealtime);
             } else {
+                out.writeInt(0);
+            }
+            if (mFullWifiLockTimer != null) {
+                out.writeInt(1);
+                mFullWifiLockTimer.writeToParcel(out, batteryRealtime);
+            } else {
+                out.writeInt(0);
+            }
+            if (mScanWifiLockTimer != null) {
+                out.writeInt(1);
+                mScanWifiLockTimer.writeToParcel(out, batteryRealtime);
+            } else {
+                out.writeInt(0);
+            }
+            if (mWifiMulticastTimer != null) {
+                out.writeInt(1);
+                mWifiMulticastTimer.writeToParcel(out, batteryRealtime);
+            } else {
+                out.writeInt(0);
+            }
+            if (mAudioTurnedOnTimer != null) {
+                out.writeInt(1);
+                mAudioTurnedOnTimer.writeToParcel(out, batteryRealtime);
+            } else {
+                out.writeInt(0);
+            }
+            if (mVideoTurnedOnTimer != null) {
+                out.writeInt(1);
+                mVideoTurnedOnTimer.writeToParcel(out, batteryRealtime);
+            } else {
+                out.writeInt(0);
+            }
+            if (mUserActivityCounters != null) {
                 out.writeInt(1);
                 for (int i=0; i<NUM_USER_ACTIVITY_TYPES; i++) {
                     mUserActivityCounters[i].writeToParcel(out);
                 }
+            } else {
+                out.writeInt(0);
             }
         }
 
@@ -1822,25 +2312,54 @@
             mTcpBytesReceivedAtLastUnplug = in.readLong();
             mTcpBytesSentAtLastUnplug = in.readLong();
             mWifiTurnedOn = false;
-            mWifiTurnedOnTimer = new StopwatchTimer(WIFI_TURNED_ON, null, mUnpluggables, in);
-            mFullWifiLockOut = false;
-            mFullWifiLockTimer = new StopwatchTimer(FULL_WIFI_LOCK, null, mUnpluggables, in);
-            mAudioTurnedOn = false;
-            mAudioTurnedOnTimer = new StopwatchTimer(AUDIO_TURNED_ON, null, mUnpluggables, in);
-            mVideoTurnedOn = false;
-            mVideoTurnedOnTimer = new StopwatchTimer(VIDEO_TURNED_ON, null, mUnpluggables, in);
-            mScanWifiLockOut = false;
-            mScanWifiLockTimer = new StopwatchTimer(SCAN_WIFI_LOCK, null, mUnpluggables, in);
-            mWifiMulticastEnabled = false;
-            mWifiMulticastTimer = new StopwatchTimer(WIFI_MULTICAST_ENABLED,
-                    null, mUnpluggables, in);
-            if (in.readInt() == 0) {
-                mUserActivityCounters = null;
+            if (in.readInt() != 0) {
+                mWifiTurnedOnTimer = new StopwatchTimer(WIFI_TURNED_ON,
+                        null, mUnpluggables, in);
             } else {
+                mWifiTurnedOnTimer = null;
+            }
+            mFullWifiLockOut = false;
+            if (in.readInt() != 0) {
+                mFullWifiLockTimer = new StopwatchTimer(FULL_WIFI_LOCK,
+                        null, mUnpluggables, in);
+            } else {
+                mFullWifiLockTimer = null;
+            }
+            mScanWifiLockOut = false;
+            if (in.readInt() != 0) {
+                mScanWifiLockTimer = new StopwatchTimer(SCAN_WIFI_LOCK,
+                        null, mUnpluggables, in);
+            } else {
+                mScanWifiLockTimer = null;
+            }
+            mWifiMulticastEnabled = false;
+            if (in.readInt() != 0) {
+                mWifiMulticastTimer = new StopwatchTimer(WIFI_MULTICAST_ENABLED,
+                        null, mUnpluggables, in);
+            } else {
+                mWifiMulticastTimer = null;
+            }
+            mAudioTurnedOn = false;
+            if (in.readInt() != 0) {
+                mAudioTurnedOnTimer = new StopwatchTimer(AUDIO_TURNED_ON,
+                        null, mUnpluggables, in);
+            } else {
+                mAudioTurnedOnTimer = null;
+            }
+            mVideoTurnedOn = false;
+            if (in.readInt() != 0) {
+                mVideoTurnedOnTimer = new StopwatchTimer(VIDEO_TURNED_ON,
+                        null, mUnpluggables, in);
+            } else {
+                mVideoTurnedOnTimer = null;
+            }
+            if (in.readInt() != 0) {
                 mUserActivityCounters = new Counter[NUM_USER_ACTIVITY_TYPES];
                 for (int i=0; i<NUM_USER_ACTIVITY_TYPES; i++) {
                     mUserActivityCounters[i] = new Counter(mUnpluggables, in);
                 }
+            } else {
+                mUserActivityCounters = null;
             }
         }
 
@@ -1879,6 +2398,34 @@
                 return new StopwatchTimer(type, pool, unpluggables, in);
             }
 
+            boolean reset() {
+                boolean wlactive = false;
+                if (mTimerFull != null) {
+                    wlactive |= !mTimerFull.reset(false);
+                }
+                if (mTimerPartial != null) {
+                    wlactive |= !mTimerPartial.reset(false);
+                }
+                if (mTimerWindow != null) {
+                    wlactive |= !mTimerWindow.reset(false);
+                }
+                if (!wlactive) {
+                    if (mTimerFull != null) {
+                        mTimerFull.detach();
+                        mTimerFull = null;
+                    }
+                    if (mTimerPartial != null) {
+                        mTimerPartial.detach();
+                        mTimerPartial = null;
+                    }
+                    if (mTimerWindow != null) {
+                        mTimerWindow.detach();
+                        mTimerWindow = null;
+                    }
+                }
+                return !wlactive;
+            }
+            
             void readFromParcelLocked(ArrayList<Unpluggable> unpluggables, Parcel in) {
                 mTimerPartial = readTimerFromParcel(WAKE_TYPE_PARTIAL,
                         mPartialTimers, unpluggables, in);
@@ -1927,6 +2474,14 @@
                 return new StopwatchTimer(0, pool, unpluggables, in);
             }
 
+            boolean reset() {
+                if (mTimer.reset(true)) {
+                    mTimer = null;
+                    return true;
+                }
+                return false;
+            }
+            
             void readFromParcelLocked(ArrayList<Unpluggable> unpluggables, Parcel in) {
                 mTimer = readTimerFromParcel(unpluggables, in);
             }
@@ -2035,9 +2590,6 @@
             Proc() {
                 mUnpluggables.add(this);
                 mSpeedBins = new SamplingCounter[getCpuSpeedSteps()];
-                for (int i = 0; i < mSpeedBins.length; i++) {
-                    mSpeedBins[i] = new SamplingCounter(mUnpluggables);
-                }
             }
 
             public void unplug(long batteryUptime, long batteryRealtime) {
@@ -2050,10 +2602,18 @@
             public void plug(long batteryUptime, long batteryRealtime) {
             }
             
+            void detach() {
+                mUnpluggables.remove(this);
+                for (int i = 0; i < mSpeedBins.length; i++) {
+                    SamplingCounter c = mSpeedBins[i];
+                    if (c != null) {
+                        mUnpluggables.remove(c);
+                        mSpeedBins[i] = null;
+                    }
+                }
+            }
+            
             void writeToParcelLocked(Parcel out) {
-                final long uSecRealtime = SystemClock.elapsedRealtime() * 1000;
-                final long batteryRealtime = getBatteryRealtimeLocked(uSecRealtime);
-                
                 out.writeLong(mUserTime);
                 out.writeLong(mSystemTime);
                 out.writeLong(mForegroundTime);
@@ -2073,7 +2633,13 @@
 
                 out.writeInt(mSpeedBins.length);
                 for (int i = 0; i < mSpeedBins.length; i++) {
-                    mSpeedBins[i].writeToParcel(out);
+                    SamplingCounter c = mSpeedBins[i];
+                    if (c != null) {
+                        out.writeInt(1);
+                        c.writeToParcel(out);
+                    } else {
+                        out.writeInt(0);
+                    }
                 }
             }
 
@@ -2096,9 +2662,12 @@
                 mUnpluggedStarts = in.readInt();
 
                 int bins = in.readInt();
-                mSpeedBins = new SamplingCounter[bins];
+                int steps = getCpuSpeedSteps();
+                mSpeedBins = new SamplingCounter[bins >= steps ? bins : steps];
                 for (int i = 0; i < bins; i++) {
-                    mSpeedBins[i] = new SamplingCounter(mUnpluggables, in);
+                    if (in.readInt() != 0) {
+                        mSpeedBins[i] = new SamplingCounter(mUnpluggables, in);
+                    }
                 }
             }
 
@@ -2128,7 +2697,7 @@
                     val = mUserTime;
                     if (which == STATS_CURRENT) {
                         val -= mLoadedUserTime;
-                    } else if (which == STATS_UNPLUGGED) {
+                    } else if (which == STATS_SINCE_UNPLUGGED) {
                         val -= mUnpluggedUserTime;
                     }
                 }
@@ -2144,7 +2713,7 @@
                     val = mSystemTime;
                     if (which == STATS_CURRENT) {
                         val -= mLoadedSystemTime;
-                    } else if (which == STATS_UNPLUGGED) {
+                    } else if (which == STATS_SINCE_UNPLUGGED) {
                         val -= mUnpluggedSystemTime;
                     }
                 }
@@ -2160,7 +2729,7 @@
                     val = mForegroundTime;
                     if (which == STATS_CURRENT) {
                         val -= mLoadedForegroundTime;
-                    } else if (which == STATS_UNPLUGGED) {
+                    } else if (which == STATS_SINCE_UNPLUGGED) {
                         val -= mUnpluggedForegroundTime;
                     }
                 }
@@ -2176,7 +2745,7 @@
                     val = mStarts;
                     if (which == STATS_CURRENT) {
                         val -= mLoadedStarts;
-                    } else if (which == STATS_UNPLUGGED) {
+                    } else if (which == STATS_SINCE_UNPLUGGED) {
                         val -= mUnpluggedStarts;
                     }
                 }
@@ -2186,14 +2755,22 @@
             /* Called by ActivityManagerService when CPU times are updated. */
             public void addSpeedStepTimes(long[] values) {
                 for (int i = 0; i < mSpeedBins.length && i < values.length; i++) {
-                    mSpeedBins[i].addCountAtomic(values[i]);
+                    long amt = values[i];
+                    if (amt != 0) {
+                        SamplingCounter c = mSpeedBins[i];
+                        if (c == null) {
+                            mSpeedBins[i] = c = new SamplingCounter(mUnpluggables);
+                        }
+                        c.addCountAtomic(values[i]);
+                    }
                 }
             }
 
             @Override
             public long getTimeAtCpuSpeedStep(int speedStep, int which) {
                 if (speedStep < mSpeedBins.length) {
-                    return mSpeedBins[speedStep].getCountLocked(which);
+                    SamplingCounter c = mSpeedBins[speedStep];
+                    return c != null ? c.getCountLocked(which) : 0;
                 } else {
                     return 0;
                 }
@@ -2244,6 +2821,10 @@
             public void plug(long batteryUptime, long batteryRealtime) {
             }
             
+            void detach() {
+                mUnpluggables.remove(this);
+            }
+            
             void readFromParcelLocked(Parcel in) {
                 mWakeups = in.readInt();
                 mLoadedWakeups = in.readInt();
@@ -2290,7 +2871,7 @@
                     val = mWakeups;
                     if (which == STATS_CURRENT) {
                         val -= mLoadedWakeups;
-                    } else if (which == STATS_UNPLUGGED) {
+                    } else if (which == STATS_SINCE_UNPLUGGED) {
                         val -= mUnpluggedWakeups;
                     }
                 }
@@ -2405,6 +2986,10 @@
                 public void plug(long batteryUptime, long batteryRealtime) {
                 }
                 
+                void detach() {
+                    mUnpluggables.remove(this);
+                }
+                
                 void readFromParcelLocked(Parcel in) {
                     mStartTime = in.readLong();
                     mRunningSince = in.readLong();
@@ -2509,7 +3094,7 @@
                         val = mLaunches;
                         if (which == STATS_CURRENT) {
                             val -= mLoadedLaunches;
-                        } else if (which == STATS_UNPLUGGED) {
+                        } else if (which == STATS_SINCE_UNPLUGGED) {
                             val -= mUnpluggedLaunches;
                         }
                     }
@@ -2526,7 +3111,7 @@
                         val = getStartTimeToNowLocked(now);
                         if (which == STATS_CURRENT) {
                             val -= mLoadedStartTime;
-                        } else if (which == STATS_UNPLUGGED) {
+                        } else if (which == STATS_SINCE_UNPLUGGED) {
                             val -= mUnpluggedStartTime;
                         }
                     }
@@ -2543,7 +3128,7 @@
                         val = mStarts;
                         if (which == STATS_CURRENT) {
                             val -= mLoadedStarts;
-                        } else if (which == STATS_UNPLUGGED) {
+                        } else if (which == STATS_SINCE_UNPLUGGED) {
                             val -= mUnpluggedStarts;
                         }
                     }
@@ -2739,7 +3324,9 @@
         mWifiRunningTimer = new StopwatchTimer(-4, null, mUnpluggables);
         mBluetoothOnTimer = new StopwatchTimer(-5, null, mUnpluggables);
         mAudioOnTimer = new StopwatchTimer(-6, null, mUnpluggables);
+        mVideoOnTimer = new StopwatchTimer(-7, null, mUnpluggables);
         mOnBattery = mOnBatteryInternal = false;
+        initTimes();
         mTrackBatteryPastUptime = 0;
         mTrackBatteryPastRealtime = 0;
         mUptimeStart = mTrackBatteryUptimeStart = SystemClock.uptimeMillis() * 1000;
@@ -2747,6 +3334,7 @@
         mUnpluggedBatteryUptime = getBatteryUptimeLocked(mUptimeStart);
         mUnpluggedBatteryRealtime = getBatteryRealtimeLocked(mRealtimeStart);
         mDischargeStartLevel = 0;
+        mDischargeUnplugLevel = 0;
         mDischargeCurrentLevel = 0;
     }
 
@@ -2766,6 +3354,11 @@
     }
 
     @Override
+    public HistoryItem getHistory() {
+        return mHistory;
+    }
+    
+    @Override
     public int getStartCount() {
         return mStartCount;
     }
@@ -2774,39 +3367,175 @@
         return mOnBattery;
     }
 
-    public void setOnBattery(boolean onBattery, int level) {
+    void initTimes() {
+        mBatteryRealtime = mTrackBatteryPastUptime = 0;
+        mBatteryUptime = mTrackBatteryPastRealtime = 0;
+        mUptimeStart = mTrackBatteryUptimeStart = SystemClock.uptimeMillis() * 1000;
+        mRealtimeStart = mTrackBatteryRealtimeStart = SystemClock.elapsedRealtime() * 1000;
+        mUnpluggedBatteryUptime = getBatteryUptimeLocked(mUptimeStart);
+        mUnpluggedBatteryRealtime = getBatteryRealtimeLocked(mRealtimeStart);
+    }
+    
+    public void resetAllStatsLocked() {
+        mStartCount = 0;
+        initTimes();
+        mScreenOnTimer.reset(false);
+        for (int i=0; i<NUM_SCREEN_BRIGHTNESS_BINS; i++) {
+            mScreenBrightnessTimer[i].reset(false);
+        }
+        mInputEventCounter.reset(false);
+        mPhoneOnTimer.reset(false);
+        mAudioOnTimer.reset(false);
+        mVideoOnTimer.reset(false);
+        for (int i=0; i<NUM_SIGNAL_STRENGTH_BINS; i++) {
+            mPhoneSignalStrengthsTimer[i].reset(false);
+        }
+        mPhoneSignalScanningTimer.reset(false);
+        for (int i=0; i<NUM_DATA_CONNECTION_TYPES; i++) {
+            mPhoneDataConnectionsTimer[i].reset(false);
+        }
+        mWifiOnTimer.reset(false);
+        mWifiRunningTimer.reset(false);
+        mBluetoothOnTimer.reset(false);
+        
+        for (int i=0; i<mUidStats.size(); i++) {
+            if (mUidStats.valueAt(i).reset()) {
+                mUidStats.remove(mUidStats.keyAt(i));
+                i--;
+            }
+        }
+        
+        if (mKernelWakelockStats.size() > 0) {
+            for (SamplingTimer timer : mKernelWakelockStats.values()) {
+                mUnpluggables.remove(timer);
+            }
+            mKernelWakelockStats.clear();
+        }
+        
+        clearHistoryLocked();
+    }
+    
+    void setOnBattery(boolean onBattery, int oldStatus, int level) {
         synchronized(this) {
-            updateKernelWakelocksLocked();
-            if (mOnBattery != onBattery) {
-                mOnBattery = mOnBatteryInternal = onBattery;
-                
-                long uptime = SystemClock.uptimeMillis() * 1000;
-                long mSecRealtime = SystemClock.elapsedRealtime();
-                long realtime = mSecRealtime * 1000;
-                if (onBattery) {
-                    mTrackBatteryUptimeStart = uptime;
-                    mTrackBatteryRealtimeStart = realtime;
-                    mUnpluggedBatteryUptime = getBatteryUptimeLocked(uptime);
-                    mUnpluggedBatteryRealtime = getBatteryRealtimeLocked(realtime);
-                    mDischargeCurrentLevel = mDischargeStartLevel = level;
-                    doUnplug(mUnpluggedBatteryUptime, mUnpluggedBatteryRealtime);
-                } else {
-                    mTrackBatteryPastUptime += uptime - mTrackBatteryUptimeStart;
-                    mTrackBatteryPastRealtime += realtime - mTrackBatteryRealtimeStart;
-                    mDischargeCurrentLevel = level;
-                    doPlug(getBatteryUptimeLocked(uptime), getBatteryRealtimeLocked(realtime));
+            boolean doWrite = false;
+            mOnBattery = mOnBatteryInternal = onBattery;
+            
+            long uptime = SystemClock.uptimeMillis() * 1000;
+            long mSecRealtime = SystemClock.elapsedRealtime();
+            long realtime = mSecRealtime * 1000;
+            if (onBattery) {
+                // We will reset our status if we are unplugging after the
+                // battery was last full, or the level is at 100, or
+                // we have gone through a significant charge (from a very low
+                // level to a now very high level).
+                if (oldStatus == BatteryManager.BATTERY_STATUS_FULL
+                        || level >= 100
+                        || (mDischargeCurrentLevel < 20 && level > 90)) {
+                    doWrite = true;
+                    resetAllStatsLocked();
+                    mDischargeStartLevel = level;
                 }
-                if ((mLastWriteTime + (60 * 1000)) < mSecRealtime) {
-                    if (mFile != null) {
-                        writeLocked();
-                    }
+                updateKernelWakelocksLocked();
+                mHistoryCur.batteryLevel = (byte)level;
+                mHistoryCur.states &= ~HistoryItem.STATE_BATTERY_PLUGGED_FLAG;
+                if (DEBUG_HISTORY) Slog.v(TAG, "Battery unplugged to: "
+                        + Integer.toHexString(mHistoryCur.states));
+                addHistoryRecordLocked(mSecRealtime);
+                mTrackBatteryUptimeStart = uptime;
+                mTrackBatteryRealtimeStart = realtime;
+                mUnpluggedBatteryUptime = getBatteryUptimeLocked(uptime);
+                mUnpluggedBatteryRealtime = getBatteryRealtimeLocked(realtime);
+                mDischargeCurrentLevel = mDischargeUnplugLevel = level;
+                doUnplugLocked(mUnpluggedBatteryUptime, mUnpluggedBatteryRealtime);
+            } else {
+                updateKernelWakelocksLocked();
+                mHistoryCur.batteryLevel = (byte)level;
+                mHistoryCur.states |= HistoryItem.STATE_BATTERY_PLUGGED_FLAG;
+                if (DEBUG_HISTORY) Slog.v(TAG, "Battery plugged to: "
+                        + Integer.toHexString(mHistoryCur.states));
+                addHistoryRecordLocked(mSecRealtime);
+                mTrackBatteryPastUptime += uptime - mTrackBatteryUptimeStart;
+                mTrackBatteryPastRealtime += realtime - mTrackBatteryRealtimeStart;
+                mDischargeCurrentLevel = level;
+                doPlugLocked(getBatteryUptimeLocked(uptime), getBatteryRealtimeLocked(realtime));
+            }
+            if (doWrite || (mLastWriteTime + (60 * 1000)) < mSecRealtime) {
+                if (mFile != null) {
+                    writeLocked();
                 }
             }
         }
     }
     
-    public void recordCurrentLevel(int level) {
-        mDischargeCurrentLevel = level;
+    // This should probably be exposed in the API, though it's not critical
+    private static final int BATTERY_PLUGGED_NONE = 0;
+    
+    public void setBatteryState(int status, int health, int plugType, int level,
+            int temp, int volt) {
+        boolean onBattery = plugType == BATTERY_PLUGGED_NONE;
+        int oldStatus = mHistoryCur.batteryStatus;
+        if (!mHaveBatteryLevel) {
+            mHaveBatteryLevel = true;
+            // We start out assuming that the device is plugged in (not
+            // on battery).  If our first report is now that we are indeed
+            // plugged in, then twiddle our state to correctly reflect that
+            // since we won't be going through the full setOnBattery().
+            if (onBattery == mOnBattery) {
+                if (onBattery) {
+                    mHistoryCur.states &= ~HistoryItem.STATE_BATTERY_PLUGGED_FLAG;
+                } else {
+                    mHistoryCur.states |= HistoryItem.STATE_BATTERY_PLUGGED_FLAG;
+                }
+            }
+            oldStatus = status;
+        }
+        if (onBattery) {
+            mDischargeCurrentLevel = level;
+            mRecordingHistory = true;
+        }
+        if (onBattery != mOnBattery) {
+            mHistoryCur.batteryLevel = (byte)level;
+            mHistoryCur.batteryStatus = (byte)status;
+            mHistoryCur.batteryHealth = (byte)health;
+            mHistoryCur.batteryPlugType = (byte)plugType;
+            mHistoryCur.batteryTemperature = (char)temp;
+            mHistoryCur.batteryVoltage = (char)volt;
+            setOnBattery(onBattery, oldStatus, level);
+        } else {
+            boolean changed = false;
+            if (mHistoryCur.batteryLevel != level) {
+                mHistoryCur.batteryLevel = (byte)level;
+                changed = true;
+            }
+            if (mHistoryCur.batteryStatus != status) {
+                mHistoryCur.batteryStatus = (byte)status;
+                changed = true;
+            }
+            if (mHistoryCur.batteryHealth != health) {
+                mHistoryCur.batteryHealth = (byte)health;
+                changed = true;
+            }
+            if (mHistoryCur.batteryPlugType != plugType) {
+                mHistoryCur.batteryPlugType = (byte)plugType;
+                changed = true;
+            }
+            if (mHistoryCur.batteryTemperature != temp) {
+                mHistoryCur.batteryTemperature = (char)temp;
+                changed = true;
+            }
+            if (mHistoryCur.batteryVoltage != volt) {
+                mHistoryCur.batteryVoltage = (char)volt;
+                changed = true;
+            }
+            if (changed) {
+                addHistoryRecordLocked(SystemClock.elapsedRealtime());
+            }
+        }
+        if (!onBattery && status == BatteryManager.BATTERY_STATUS_FULL) {
+            // We don't record history while we are plugged in and fully charged.
+            // The next time we are unplugged, history will be cleared.
+            mRecordingHistory = false;
+        }
     }
     
     public void updateKernelWakelocksLocked() {
@@ -2855,10 +3584,10 @@
     @Override
     public long computeUptime(long curTime, int which) {
         switch (which) {
-            case STATS_TOTAL: return mUptime + (curTime-mUptimeStart);
+            case STATS_SINCE_CHARGED: return mUptime + (curTime-mUptimeStart);
             case STATS_LAST: return mLastUptime;
             case STATS_CURRENT: return (curTime-mUptimeStart);
-            case STATS_UNPLUGGED: return (curTime-mTrackBatteryUptimeStart);
+            case STATS_SINCE_UNPLUGGED: return (curTime-mTrackBatteryUptimeStart);
         }
         return 0;
     }
@@ -2866,10 +3595,10 @@
     @Override
     public long computeRealtime(long curTime, int which) {
         switch (which) {
-            case STATS_TOTAL: return mRealtime + (curTime-mRealtimeStart);
+            case STATS_SINCE_CHARGED: return mRealtime + (curTime-mRealtimeStart);
             case STATS_LAST: return mLastRealtime;
             case STATS_CURRENT: return (curTime-mRealtimeStart);
-            case STATS_UNPLUGGED: return (curTime-mTrackBatteryRealtimeStart);
+            case STATS_SINCE_UNPLUGGED: return (curTime-mTrackBatteryRealtimeStart);
         }
         return 0;
     }
@@ -2877,13 +3606,13 @@
     @Override
     public long computeBatteryUptime(long curTime, int which) {
         switch (which) {
-            case STATS_TOTAL:
+            case STATS_SINCE_CHARGED:
                 return mBatteryUptime + getBatteryUptime(curTime);
             case STATS_LAST:
                 return mBatteryLastUptime;
             case STATS_CURRENT:
                 return getBatteryUptime(curTime);
-            case STATS_UNPLUGGED:
+            case STATS_SINCE_UNPLUGGED:
                 return getBatteryUptimeLocked(curTime) - mUnpluggedBatteryUptime;
         }
         return 0;
@@ -2892,13 +3621,13 @@
     @Override
     public long computeBatteryRealtime(long curTime, int which) {
         switch (which) {
-            case STATS_TOTAL:
+            case STATS_SINCE_CHARGED:
                 return mBatteryRealtime + getBatteryRealtimeLocked(curTime);
             case STATS_LAST:
                 return mBatteryLastRealtime;
             case STATS_CURRENT:
                 return getBatteryRealtimeLocked(curTime);
-            case STATS_UNPLUGGED:
+            case STATS_SINCE_UNPLUGGED:
                 return getBatteryRealtimeLocked(curTime) - mUnpluggedBatteryRealtime;
         }
         return 0;
@@ -2938,14 +3667,14 @@
         if (which == STATS_LAST) {
             return dataBytes[STATS_LAST];
         } else {
-            if (which == STATS_UNPLUGGED) {
-                if (dataBytes[STATS_UNPLUGGED] < 0) {
+            if (which == STATS_SINCE_UNPLUGGED) {
+                if (dataBytes[STATS_SINCE_UNPLUGGED] < 0) {
                     return dataBytes[STATS_LAST];
                 } else {
-                    return current - dataBytes[STATS_UNPLUGGED];
+                    return current - dataBytes[STATS_SINCE_UNPLUGGED];
                 }
-            } else if (which == STATS_TOTAL) {
-                return (current - dataBytes[STATS_CURRENT]) + dataBytes[STATS_TOTAL];
+            } else if (which == STATS_SINCE_CHARGED) {
+                return (current - dataBytes[STATS_CURRENT]) + dataBytes[STATS_SINCE_CHARGED];
             }
             return current - dataBytes[STATS_CURRENT];
         }
@@ -2979,7 +3708,7 @@
     }
     
     public int getDischargeStartLevelLocked() {
-            return mDischargeStartLevel;
+            return mDischargeUnplugLevel;
     }
     
     @Override
@@ -3062,17 +3791,21 @@
         return u.getServiceStatsLocked(pkg, name);
     }
 
-    private static JournaledFile makeJournaledFile() {
-        final String base = "/data/system/device_policies.xml";
-        return new JournaledFile(new File(base), new File(base + ".tmp"));
+    public void shutdownLocked() {
+        writeLocked();
+        mShuttingDown = true;
     }
-
+    
     public void writeLocked() {
         if (mFile == null) {
             Slog.w("BatteryStats", "writeLocked: no file associated with this instance");
             return;
         }
 
+        if (mShuttingDown) {
+            return;
+        }
+        
         try {
             FileOutputStream stream = new FileOutputStream(mFile.chooseForWrite());
             Parcel out = Parcel.obtain();
@@ -3140,12 +3873,47 @@
         } catch(java.io.IOException e) {
             Slog.e("BatteryStats", "Error reading battery statistics", e);
         }
+        
+        addHistoryRecordLocked(SystemClock.elapsedRealtime(), HistoryItem.CMD_START);
     }
 
     public int describeContents() {
         return 0;
     }
 
+    void readHistory(Parcel in) {
+        mHistory = mHistoryEnd = mHistoryCache = null;
+        mHistoryBaseTime = 0;
+        long time;
+        while ((time=in.readLong()) >= 0) {
+            HistoryItem rec = new HistoryItem(time, in);
+            addHistoryRecordLocked(rec);
+            if (rec.time > mHistoryBaseTime) {
+                mHistoryBaseTime = rec.time;
+            }
+        }
+        
+        long oldnow = SystemClock.elapsedRealtime() - (5*60*100);
+        if (oldnow > 0) {
+            // If the system process has restarted, but not the entire
+            // system, then the mHistoryBaseTime already accounts for
+            // much of the elapsed time.  We thus want to adjust it back,
+            // to avoid large gaps in the data.  We determine we are
+            // in this case by arbitrarily saying it is so if at this
+            // point in boot the elapsed time is already more than 5 seconds.
+            mHistoryBaseTime -= oldnow;
+        }
+    }
+    
+    void writeHistory(Parcel out) {
+        HistoryItem rec = mHistory;
+        while (rec != null) {
+            if (rec.time >= 0) rec.writeToParcel(out, 0);
+            rec = rec.next;
+        }
+        out.writeLong(-1);
+    }
+    
     private void readSummaryFromParcel(Parcel in) {
         final int version = in.readInt();
         if (version != VERSION) {
@@ -3154,6 +3922,8 @@
             return;
         }
 
+        readHistory(in);
+        
         mStartCount = in.readInt();
         mBatteryUptime = in.readLong();
         mBatteryLastUptime = in.readLong();
@@ -3163,7 +3933,7 @@
         mLastUptime = in.readLong();
         mRealtime = in.readLong();
         mLastRealtime = in.readLong();
-        mDischargeStartLevel = in.readInt();
+        mDischargeUnplugLevel = in.readInt();
         mDischargeCurrentLevel = in.readInt();
         
         mStartCount++;
@@ -3215,17 +3985,29 @@
             mUidStats.put(uid, u);
 
             u.mWifiTurnedOn = false;
-            u.mWifiTurnedOnTimer.readSummaryFromParcelLocked(in);
+            if (in.readInt() != 0) {
+                u.mWifiTurnedOnTimer.readSummaryFromParcelLocked(in);
+            }
             u.mFullWifiLockOut = false;
-            u.mFullWifiLockTimer.readSummaryFromParcelLocked(in);
-            u.mAudioTurnedOn = false;
-            u.mAudioTurnedOnTimer.readSummaryFromParcelLocked(in);
-            u.mVideoTurnedOn = false;
-            u.mVideoTurnedOnTimer.readSummaryFromParcelLocked(in);
+            if (in.readInt() != 0) {
+                u.mFullWifiLockTimer.readSummaryFromParcelLocked(in);
+            }
             u.mScanWifiLockOut = false;
-            u.mScanWifiLockTimer.readSummaryFromParcelLocked(in);
+            if (in.readInt() != 0) {
+                u.mScanWifiLockTimer.readSummaryFromParcelLocked(in);
+            }
             u.mWifiMulticastEnabled = false;
-            u.mWifiMulticastTimer.readSummaryFromParcelLocked(in);
+            if (in.readInt() != 0) {
+                u.mWifiMulticastTimer.readSummaryFromParcelLocked(in);
+            }
+            u.mAudioTurnedOn = false;
+            if (in.readInt() != 0) {
+                u.mAudioTurnedOnTimer.readSummaryFromParcelLocked(in);
+            }
+            u.mVideoTurnedOn = false;
+            if (in.readInt() != 0) {
+                u.mVideoTurnedOnTimer.readSummaryFromParcelLocked(in);
+            }
 
             if (in.readInt() != 0) {
                 if (u.mUserActivityCounters == null) {
@@ -3325,16 +4107,18 @@
 
         out.writeInt(VERSION);
 
+        writeHistory(out);
+        
         out.writeInt(mStartCount);
-        out.writeLong(computeBatteryUptime(NOW_SYS, STATS_TOTAL));
+        out.writeLong(computeBatteryUptime(NOW_SYS, STATS_SINCE_CHARGED));
         out.writeLong(computeBatteryUptime(NOW_SYS, STATS_CURRENT));
-        out.writeLong(computeBatteryRealtime(NOWREAL_SYS, STATS_TOTAL));
+        out.writeLong(computeBatteryRealtime(NOWREAL_SYS, STATS_SINCE_CHARGED));
         out.writeLong(computeBatteryRealtime(NOWREAL_SYS, STATS_CURRENT));
-        out.writeLong(computeUptime(NOW_SYS, STATS_TOTAL));
+        out.writeLong(computeUptime(NOW_SYS, STATS_SINCE_CHARGED));
         out.writeLong(computeUptime(NOW_SYS, STATS_CURRENT));
-        out.writeLong(computeRealtime(NOWREAL_SYS, STATS_TOTAL));
+        out.writeLong(computeRealtime(NOWREAL_SYS, STATS_SINCE_CHARGED));
         out.writeLong(computeRealtime(NOWREAL_SYS, STATS_CURRENT));
-        out.writeInt(mDischargeStartLevel);
+        out.writeInt(mDischargeUnplugLevel);
         out.writeInt(mDischargeCurrentLevel);
         
         
@@ -3374,12 +4158,42 @@
             out.writeInt(mUidStats.keyAt(iu));
             Uid u = mUidStats.valueAt(iu);
             
-            u.mWifiTurnedOnTimer.writeSummaryFromParcelLocked(out, NOWREAL);
-            u.mFullWifiLockTimer.writeSummaryFromParcelLocked(out, NOWREAL);
-            u.mAudioTurnedOnTimer.writeSummaryFromParcelLocked(out, NOWREAL);
-            u.mVideoTurnedOnTimer.writeSummaryFromParcelLocked(out, NOWREAL);
-            u.mScanWifiLockTimer.writeSummaryFromParcelLocked(out, NOWREAL);
-            u.mWifiMulticastTimer.writeSummaryFromParcelLocked(out, NOWREAL);
+            if (u.mWifiTurnedOnTimer != null) {
+                out.writeInt(1);
+                u.mWifiTurnedOnTimer.writeSummaryFromParcelLocked(out, NOWREAL);
+            } else {
+                out.writeInt(0);
+            }
+            if (u.mFullWifiLockTimer != null) {
+                out.writeInt(1);
+                u.mFullWifiLockTimer.writeSummaryFromParcelLocked(out, NOWREAL);
+            } else {
+                out.writeInt(0);
+            }
+            if (u.mScanWifiLockTimer != null) {
+                out.writeInt(1);
+                u.mScanWifiLockTimer.writeSummaryFromParcelLocked(out, NOWREAL);
+            } else {
+                out.writeInt(0);
+            }
+            if (u.mWifiMulticastTimer != null) {
+                out.writeInt(1);
+                u.mWifiMulticastTimer.writeSummaryFromParcelLocked(out, NOWREAL);
+            } else {
+                out.writeInt(0);
+            }
+            if (u.mAudioTurnedOnTimer != null) {
+                out.writeInt(1);
+                u.mAudioTurnedOnTimer.writeSummaryFromParcelLocked(out, NOWREAL);
+            } else {
+                out.writeInt(0);
+            }
+            if (u.mVideoTurnedOnTimer != null) {
+                out.writeInt(1);
+                u.mVideoTurnedOnTimer.writeSummaryFromParcelLocked(out, NOWREAL);
+            } else {
+                out.writeInt(0);
+            }
 
             if (u.mUserActivityCounters == null) {
                 out.writeInt(0);
@@ -3478,8 +4292,8 @@
                 }
             }
             
-            out.writeLong(u.getTcpBytesReceived(STATS_TOTAL));
-            out.writeLong(u.getTcpBytesSent(STATS_TOTAL));
+            out.writeLong(u.getTcpBytesReceived(STATS_SINCE_CHARGED));
+            out.writeLong(u.getTcpBytesSent(STATS_SINCE_CHARGED));
         }
     }
 
@@ -3493,6 +4307,8 @@
             throw new ParcelFormatException("Bad magic number");
         }
 
+        readHistory(in);
+        
         mStartCount = in.readInt();
         mBatteryUptime = in.readLong();
         mBatteryLastUptime = in.readLong();
@@ -3533,18 +4349,18 @@
         mTrackBatteryRealtimeStart = in.readLong();
         mUnpluggedBatteryUptime = in.readLong();
         mUnpluggedBatteryRealtime = in.readLong();
-        mDischargeStartLevel = in.readInt();
+        mDischargeUnplugLevel = in.readInt();
         mDischargeCurrentLevel = in.readInt();
         mLastWriteTime = in.readLong();
 
         mMobileDataRx[STATS_LAST] = in.readLong();
-        mMobileDataRx[STATS_UNPLUGGED] = -1;
+        mMobileDataRx[STATS_SINCE_UNPLUGGED] = -1;
         mMobileDataTx[STATS_LAST] = in.readLong();
-        mMobileDataTx[STATS_UNPLUGGED] = -1;
+        mMobileDataTx[STATS_SINCE_UNPLUGGED] = -1;
         mTotalDataRx[STATS_LAST] = in.readLong();
-        mTotalDataRx[STATS_UNPLUGGED] = -1;
+        mTotalDataRx[STATS_SINCE_UNPLUGGED] = -1;
         mTotalDataTx[STATS_LAST] = in.readLong();
-        mTotalDataTx[STATS_UNPLUGGED] = -1;
+        mTotalDataTx[STATS_SINCE_UNPLUGGED] = -1;
 
         mRadioDataUptime = in.readLong();
         mRadioDataStart = -1;
@@ -3591,6 +4407,9 @@
         final long batteryRealtime = getBatteryRealtimeLocked(uSecRealtime);
         
         out.writeInt(MAGIC);
+        
+        writeHistory(out);
+        
         out.writeInt(mStartCount);
         out.writeLong(mBatteryUptime);
         out.writeLong(mBatteryLastUptime);
@@ -3625,14 +4444,14 @@
         out.writeLong(mTrackBatteryRealtimeStart);
         out.writeLong(mUnpluggedBatteryUptime);
         out.writeLong(mUnpluggedBatteryRealtime);
-        out.writeInt(mDischargeStartLevel);
+        out.writeInt(mDischargeUnplugLevel);
         out.writeInt(mDischargeCurrentLevel);
         out.writeLong(mLastWriteTime);
 
-        out.writeLong(getMobileTcpBytesReceived(STATS_UNPLUGGED));
-        out.writeLong(getMobileTcpBytesSent(STATS_UNPLUGGED));
-        out.writeLong(getTotalTcpBytesReceived(STATS_UNPLUGGED));
-        out.writeLong(getTotalTcpBytesSent(STATS_UNPLUGGED));
+        out.writeLong(getMobileTcpBytesReceived(STATS_SINCE_UNPLUGGED));
+        out.writeLong(getMobileTcpBytesSent(STATS_SINCE_UNPLUGGED));
+        out.writeLong(getTotalTcpBytesReceived(STATS_SINCE_UNPLUGGED));
+        out.writeLong(getTotalTcpBytesSent(STATS_SINCE_UNPLUGGED));
 
         // Write radio uptime for data
         out.writeLong(getRadioDataUptime());
diff --git a/core/java/com/android/internal/os/PowerProfile.java b/core/java/com/android/internal/os/PowerProfile.java
index 2369d25..127ed68 100644
--- a/core/java/com/android/internal/os/PowerProfile.java
+++ b/core/java/com/android/internal/os/PowerProfile.java
@@ -126,6 +126,11 @@
 
     public static final String POWER_CPU_SPEEDS = "cpu.speeds";
 
+    /**
+     * Battery capacity in milliAmpHour (mAh).
+     */
+    public static final String POWER_BATTERY_CAPACITY = "battery.capacity";
+
     static final HashMap<String, Object> sPowerMap = new HashMap<String, Object>();
 
     private static final String TAG_DEVICE = "device";
@@ -243,6 +248,19 @@
         }
     }
 
+    /**
+     * Returns the battery capacity, if available, in milli Amp Hours. If not available,
+     * it returns zero.
+     * @return the battery capacity in mAh
+     */
+    public double getBatteryCapacity() {
+        return getAveragePower(POWER_BATTERY_CAPACITY);
+    }
+
+    /**
+     * Returns the number of speeds that the CPU can be run at.
+     * @return
+     */
     public int getNumSpeedSteps() {
         Object value = sPowerMap.get(POWER_CPU_SPEEDS);
         if (value != null && value instanceof Double[]) {
diff --git a/core/java/com/android/internal/os/RuntimeInit.java b/core/java/com/android/internal/os/RuntimeInit.java
index 599a7fe..59600dc 100644
--- a/core/java/com/android/internal/os/RuntimeInit.java
+++ b/core/java/com/android/internal/os/RuntimeInit.java
@@ -342,6 +342,10 @@
         mApplicationObject = app;
     }
 
+    public static final IBinder getApplicationObject() {
+        return mApplicationObject;
+    }
+
     /**
      * Enable debugging features.
      */
diff --git a/core/java/com/android/internal/statusbar/IStatusBar.aidl b/core/java/com/android/internal/statusbar/IStatusBar.aidl
new file mode 100644
index 0000000..4501bd7
--- /dev/null
+++ b/core/java/com/android/internal/statusbar/IStatusBar.aidl
@@ -0,0 +1,34 @@
+/**
+ * Copyright (c) 2007, The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License"); 
+ * you may not use this file except in compliance with the License. 
+ * You may obtain a copy of the License at 
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0 
+ *
+ * Unless required by applicable law or agreed to in writing, software 
+ * distributed under the License is distributed on an "AS IS" BASIS, 
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 
+ * See the License for the specific language governing permissions and 
+ * limitations under the License.
+ */
+ 
+package com.android.internal.statusbar;
+
+import com.android.internal.statusbar.StatusBarIcon;
+import com.android.internal.statusbar.StatusBarNotification;
+
+/** @hide */
+oneway interface IStatusBar
+{
+    void setIcon(int index, in StatusBarIcon icon);
+    void removeIcon(int index);
+    void addNotification(IBinder key, in StatusBarNotification notification);
+    void updateNotification(IBinder key, in StatusBarNotification notification);
+    void removeNotification(IBinder key);
+    void disable(int state);
+    void animateExpand();
+    void animateCollapse();
+}
+
diff --git a/core/java/com/android/internal/statusbar/IStatusBarService.aidl b/core/java/com/android/internal/statusbar/IStatusBarService.aidl
new file mode 100644
index 0000000..852630d
--- /dev/null
+++ b/core/java/com/android/internal/statusbar/IStatusBarService.aidl
@@ -0,0 +1,43 @@
+/**
+ * Copyright (c) 2007, The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License"); 
+ * you may not use this file except in compliance with the License. 
+ * You may obtain a copy of the License at 
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0 
+ *
+ * Unless required by applicable law or agreed to in writing, software 
+ * distributed under the License is distributed on an "AS IS" BASIS, 
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 
+ * See the License for the specific language governing permissions and 
+ * limitations under the License.
+ */
+ 
+package com.android.internal.statusbar;
+
+import com.android.internal.statusbar.IStatusBar;
+import com.android.internal.statusbar.StatusBarIcon;
+import com.android.internal.statusbar.StatusBarIconList;
+import com.android.internal.statusbar.StatusBarNotification;
+
+/** @hide */
+interface IStatusBarService
+{
+    void expand();
+    void collapse();
+    void disable(int what, IBinder token, String pkg);
+    void setIcon(String slot, String iconPackage, int iconId, int iconLevel);
+    void setIconVisibility(String slot, boolean visible);
+    void removeIcon(String slot);
+
+    // ---- Methods below are for use by the status bar policy services ----
+    // You need the STATUS_BAR_SERVICE permission
+    void registerStatusBar(IStatusBar callbacks, out StatusBarIconList iconList,
+            out List<IBinder> notificationKeys, out List<StatusBarNotification> notifications);
+    void onPanelRevealed();
+    void onNotificationClick(String pkg, String tag, int id);
+    void onNotificationError(String pkg, String tag, int id,
+            int uid, int initialPid, String message);
+    void onClearAllNotifications();
+}
diff --git a/core/java/com/android/internal/statusbar/StatusBarIcon.aidl b/core/java/com/android/internal/statusbar/StatusBarIcon.aidl
new file mode 100644
index 0000000..311a077
--- /dev/null
+++ b/core/java/com/android/internal/statusbar/StatusBarIcon.aidl
@@ -0,0 +1,20 @@
+/*
+ * Copyright (c) 2010, The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License"); 
+ * you may not use this file except in compliance with the License. 
+ * You may obtain a copy of the License at 
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0 
+ *
+ * Unless required by applicable law or agreed to in writing, software 
+ * distributed under the License is distributed on an "AS IS" BASIS, 
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 
+ * See the License for the specific language governing permissions and 
+ * limitations under the License.
+ */
+
+package com.android.internal.statusbar;
+
+parcelable StatusBarIcon;
+
diff --git a/core/java/com/android/internal/statusbar/StatusBarIcon.java b/core/java/com/android/internal/statusbar/StatusBarIcon.java
new file mode 100644
index 0000000..ae2cac2
--- /dev/null
+++ b/core/java/com/android/internal/statusbar/StatusBarIcon.java
@@ -0,0 +1,105 @@
+/*
+ * Copyright (C) 2010 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.android.internal.statusbar;
+
+import android.os.Parcel;
+import android.os.Parcelable;
+
+/**
+ * @hide
+ */
+public class StatusBarIcon implements Parcelable {
+    public String iconPackage;
+    public int iconId;
+    public int iconLevel;
+    public boolean visible = true;
+    public int number;
+
+    private StatusBarIcon() {
+    }
+
+    public StatusBarIcon(String iconPackage, int iconId, int iconLevel) {
+        this.iconPackage = iconPackage;
+        this.iconId = iconId;
+        this.iconLevel = iconLevel;
+    }
+
+    public StatusBarIcon(String iconPackage, int iconId, int iconLevel, int number) {
+        this.iconPackage = iconPackage;
+        this.iconId = iconId;
+        this.iconLevel = iconLevel;
+        this.number = number;
+    }
+
+    public String toString() {
+        return "StatusBarIcon(pkg=" + this.iconPackage + " id=0x" + Integer.toHexString(this.iconId)
+                + " level=" + this.iconLevel + " visible=" + visible
+                + " num=" + this.number + " )";
+    }
+
+    public StatusBarIcon clone() {
+        StatusBarIcon that = new StatusBarIcon(this.iconPackage, this.iconId, this.iconLevel);
+        that.visible = this.visible;
+        that.number = this.number;
+        return that;
+    }
+
+    /**
+     * Unflatten the StatusBarIcon from a parcel.
+     */
+    public StatusBarIcon(Parcel in) {
+        readFromParcel(in);
+    }
+
+    public void readFromParcel(Parcel in) {
+        this.iconPackage = in.readString();
+        this.iconId = in.readInt();
+        this.iconLevel = in.readInt();
+        this.visible = in.readInt() != 0;
+        this.number = in.readInt();
+    }
+
+    public void writeToParcel(Parcel out, int flags) {
+        out.writeString(this.iconPackage);
+        out.writeInt(this.iconId);
+        out.writeInt(this.iconLevel);
+        out.writeInt(this.visible ? 1 : 0);
+        out.writeInt(this.number);
+    }
+
+    public int describeContents() {
+        return 0;
+    }
+
+    /**
+     * Parcelable.Creator that instantiates StatusBarIcon objects
+     */
+    public static final Parcelable.Creator<StatusBarIcon> CREATOR
+            = new Parcelable.Creator<StatusBarIcon>()
+    {
+        public StatusBarIcon createFromParcel(Parcel parcel)
+        {
+            return new StatusBarIcon(parcel);
+        }
+
+        public StatusBarIcon[] newArray(int size)
+        {
+            return new StatusBarIcon[size];
+        }
+    };
+}
+
diff --git a/core/java/com/android/internal/statusbar/StatusBarIconList.aidl b/core/java/com/android/internal/statusbar/StatusBarIconList.aidl
new file mode 100644
index 0000000..c745120
--- /dev/null
+++ b/core/java/com/android/internal/statusbar/StatusBarIconList.aidl
@@ -0,0 +1,20 @@
+/*
+ * Copyright (c) 2010, The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License"); 
+ * you may not use this file except in compliance with the License. 
+ * You may obtain a copy of the License at 
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0 
+ *
+ * Unless required by applicable law or agreed to in writing, software 
+ * distributed under the License is distributed on an "AS IS" BASIS, 
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 
+ * See the License for the specific language governing permissions and 
+ * limitations under the License.
+ */
+
+package com.android.internal.statusbar;
+
+parcelable StatusBarIconList;
+
diff --git a/core/java/com/android/internal/statusbar/StatusBarIconList.java b/core/java/com/android/internal/statusbar/StatusBarIconList.java
new file mode 100644
index 0000000..478d245
--- /dev/null
+++ b/core/java/com/android/internal/statusbar/StatusBarIconList.java
@@ -0,0 +1,161 @@
+/*
+ * Copyright (C) 2007 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.android.internal.statusbar;
+
+import android.os.Parcel;
+import android.os.Parcelable;
+
+import java.io.PrintWriter;
+
+public class StatusBarIconList implements Parcelable {
+    private String[] mSlots;
+    private StatusBarIcon[] mIcons;
+
+    public StatusBarIconList() {
+    }
+
+    public StatusBarIconList(Parcel in) {
+        readFromParcel(in);
+    }
+    
+    public void readFromParcel(Parcel in) {
+        this.mSlots = in.readStringArray();
+        final int N = in.readInt();
+        if (N < 0) {
+            mIcons = null;
+        } else {
+            mIcons = new StatusBarIcon[N];
+            for (int i=0; i<N; i++) {
+                if (in.readInt() != 0) {
+                    mIcons[i] = new StatusBarIcon(in);
+                }
+            }
+        }
+    }
+
+    public void writeToParcel(Parcel out, int flags) {
+        out.writeStringArray(mSlots);
+        if (mIcons == null) {
+            out.writeInt(-1);
+        } else {
+            final int N = mIcons.length;
+            out.writeInt(N);
+            for (int i=0; i<N; i++) {
+                StatusBarIcon ic = mIcons[i];
+                if (ic == null) {
+                    out.writeInt(0);
+                } else {
+                    out.writeInt(1);
+                    ic.writeToParcel(out, flags);
+                }
+            }
+        }
+    }
+
+    public int describeContents() {
+        return 0;
+    }
+
+    /**
+     * Parcelable.Creator that instantiates StatusBarIconList objects
+     */
+    public static final Parcelable.Creator<StatusBarIconList> CREATOR
+            = new Parcelable.Creator<StatusBarIconList>()
+    {
+        public StatusBarIconList createFromParcel(Parcel parcel)
+        {
+            return new StatusBarIconList(parcel);
+        }
+
+        public StatusBarIconList[] newArray(int size)
+        {
+            return new StatusBarIconList[size];
+        }
+    };
+
+    public void defineSlots(String[] slots) {
+        final int N = slots.length;
+        String[] s = mSlots = new String[N];
+        for (int i=0; i<N; i++) {
+            s[i] = slots[i];
+        }
+        mIcons = new StatusBarIcon[N];
+    }
+
+    public int getSlotIndex(String slot) {
+        final int N = mSlots.length;
+        for (int i=0; i<N; i++) {
+            if (slot.equals(mSlots[i])) {
+                return i;
+            }
+        }
+        return -1;
+    }
+
+    public int size() {
+        return mSlots.length;
+    }
+
+    public void setIcon(int index, StatusBarIcon icon) {
+        mIcons[index] = icon.clone();
+    }
+
+    public void removeIcon(int index) {
+        mIcons[index] = null;
+    }
+
+    public String getSlot(int index) {
+        return mSlots[index];
+    }
+
+    public StatusBarIcon getIcon(int index) {
+        return mIcons[index];
+    }
+
+    public int getViewIndex(int index) {
+        int count = 0;
+        for (int i=0; i<index; i++) {
+            if (mIcons[i] != null) {
+                count++;
+            }
+        }
+        return count;
+    }
+
+    public void copyFrom(StatusBarIconList that) {
+        if (that.mSlots == null) {
+            this.mSlots = null;
+            this.mIcons = null;
+        } else {
+            final int N = that.mSlots.length;
+            this.mSlots = new String[N];
+            this.mIcons = new StatusBarIcon[N];
+            for (int i=0; i<N; i++) {
+                this.mSlots[i] = that.mSlots[i];
+                this.mIcons[i] = that.mIcons[i] != null ? that.mIcons[i].clone() : null;
+            }
+        }
+    }
+
+    public void dump(PrintWriter pw) {
+        final int N = mSlots.length;
+        pw.println("Icon list:");
+        for (int i=0; i<N; i++) {
+            pw.printf("  %2d: (%s) %s\n", i, mSlots[i], mIcons[i]);
+        }
+    }
+}
diff --git a/core/java/com/android/internal/statusbar/StatusBarNotification.aidl b/core/java/com/android/internal/statusbar/StatusBarNotification.aidl
new file mode 100644
index 0000000..bd9e89c
--- /dev/null
+++ b/core/java/com/android/internal/statusbar/StatusBarNotification.aidl
@@ -0,0 +1,20 @@
+/*
+ * Copyright (c) 2010, The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License"); 
+ * you may not use this file except in compliance with the License. 
+ * You may obtain a copy of the License at 
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0 
+ *
+ * Unless required by applicable law or agreed to in writing, software 
+ * distributed under the License is distributed on an "AS IS" BASIS, 
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 
+ * See the License for the specific language governing permissions and 
+ * limitations under the License.
+ */
+
+package com.android.internal.statusbar;
+
+parcelable StatusBarNotification;
+
diff --git a/core/java/com/android/internal/statusbar/StatusBarNotification.java b/core/java/com/android/internal/statusbar/StatusBarNotification.java
new file mode 100644
index 0000000..aa340fb
--- /dev/null
+++ b/core/java/com/android/internal/statusbar/StatusBarNotification.java
@@ -0,0 +1,126 @@
+/*
+ * Copyright (C) 2008 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.android.internal.statusbar;
+
+import android.app.Notification;
+import android.os.Parcel;
+import android.os.Parcelable;
+import android.widget.RemoteViews;
+
+
+/*
+boolean clearable = !n.ongoingEvent && ((notification.flags & Notification.FLAG_NO_CLEAR) == 0);
+
+
+// TODO: make this restriction do something smarter like never fill
+// more than two screens.  "Why would anyone need more than 80 characters." :-/
+final int maxTickerLen = 80;
+if (truncatedTicker != null && truncatedTicker.length() > maxTickerLen) {
+    truncatedTicker = truncatedTicker.subSequence(0, maxTickerLen);
+}
+*/
+
+public class StatusBarNotification implements Parcelable {
+    public String pkg;
+    public int id;
+    public String tag;
+    public int uid;
+    public int initialPid;
+    public Notification notification;
+
+    public StatusBarNotification() {
+    }
+
+    public StatusBarNotification(String pkg, int id, String tag,
+            int uid, int initialPid, Notification notification) {
+        if (pkg == null) throw new NullPointerException();
+        if (notification == null) throw new NullPointerException();
+
+        this.pkg = pkg;
+        this.id = id;
+        this.tag = tag;
+        this.uid = uid;
+        this.initialPid = initialPid;
+        this.notification = notification;
+    }
+
+    public StatusBarNotification(Parcel in) {
+        readFromParcel(in);
+    }
+
+    public void readFromParcel(Parcel in) {
+        this.pkg = in.readString();
+        this.id = in.readInt();
+        if (in.readInt() != 0) {
+            this.tag = in.readString();
+        } else {
+            this.tag = null;
+        }
+        this.uid = in.readInt();
+        this.initialPid = in.readInt();
+        this.notification = new Notification(in);
+    }
+
+    public void writeToParcel(Parcel out, int flags) {
+        out.writeString(this.pkg);
+        out.writeInt(this.id);
+        if (this.tag != null) {
+            out.writeInt(1);
+            out.writeString(this.tag);
+        } else {
+            out.writeInt(0);
+        }
+        out.writeInt(this.uid);
+        out.writeInt(this.initialPid);
+        this.notification.writeToParcel(out, flags);
+    }
+
+    public int describeContents() {
+        return 0;
+    }
+
+    public static final Parcelable.Creator<StatusBarNotification> CREATOR
+            = new Parcelable.Creator<StatusBarNotification>()
+    {
+        public StatusBarNotification createFromParcel(Parcel parcel)
+        {
+            return new StatusBarNotification(parcel);
+        }
+
+        public StatusBarNotification[] newArray(int size)
+        {
+            return new StatusBarNotification[size];
+        }
+    };
+
+    public StatusBarNotification clone() {
+        return new StatusBarNotification(this.pkg, this.id, this.tag,
+                this.uid, this.initialPid, this.notification.clone());
+    }
+
+    public String toString() {
+        return "StatusBarNotification(package=" + pkg + " id=" + id + " tag=" + tag
+                + " notification=" + notification + ")";
+    }
+
+    public boolean isOngoing() {
+        return (notification.flags & Notification.FLAG_ONGOING_EVENT) != 0;
+    }
+
+}
+
+
diff --git a/core/java/com/android/internal/statusbar/StatusBarNotificationList.aidl b/core/java/com/android/internal/statusbar/StatusBarNotificationList.aidl
new file mode 100644
index 0000000..10abeee
--- /dev/null
+++ b/core/java/com/android/internal/statusbar/StatusBarNotificationList.aidl
@@ -0,0 +1,20 @@
+/*
+ * Copyright (c) 2010, The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License"); 
+ * you may not use this file except in compliance with the License. 
+ * You may obtain a copy of the License at 
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0 
+ *
+ * Unless required by applicable law or agreed to in writing, software 
+ * distributed under the License is distributed on an "AS IS" BASIS, 
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 
+ * See the License for the specific language governing permissions and 
+ * limitations under the License.
+ */
+
+package com.android.internal.statusbar;
+
+parcelable StatusBarNotificationList;
+
diff --git a/core/java/com/android/internal/util/HierarchicalStateMachine.java b/core/java/com/android/internal/util/HierarchicalStateMachine.java
index 9911f48..c599d68 100644
--- a/core/java/com/android/internal/util/HierarchicalStateMachine.java
+++ b/core/java/com/android/internal/util/HierarchicalStateMachine.java
@@ -51,7 +51,7 @@
       mS2   mS1 ----> initial state
 </code>
  * After the state machine is created and started, messages are sent to a state
- * machine using <code>sendMessage</code and the messages are created using
+ * machine using <code>sendMessage</code> and the messages are created using
  * <code>obtainMessage</code>. When the state machine receives a message the
  * current state's <code>processMessage</code> is invoked. In the above example
  * mS1.processMessage will be invoked first. The state may use <code>transitionTo</code>
@@ -59,9 +59,9 @@
  *
  * Each state in the state machine may have a zero or one parent states and if
  * a child state is unable to handle a message it may have the message processed
- * by its parent by returning false. If a message is never processed <code>unhandledMessage</code>
- * will be invoked to give one last chance for the state machine to process
- * the message.
+ * by its parent by returning false or NOT_HANDLED. If a message is never processed
+ * <code>unhandledMessage</code> will be invoked to give one last chance for the state machine
+ * to process the message.
  *
  * When all processing is completed a state machine may choose to call
  * <code>transitionToHaltingState</code>. When the current <code>processingMessage</code>
@@ -95,7 +95,7 @@
  * any other messages that are on the queue or might be added later. Both of
  * these are protected and may only be invoked from within a state machine.
  *
- * To illustrate some of these properties we'll use state machine with 8
+ * To illustrate some of these properties we'll use state machine with an 8
  * state hierarchy:
 <code>
           mP0
@@ -109,44 +109,19 @@
  *
  * After starting mS5 the list of active states is mP0, mP1, mS1 and mS5.
  * So the order of calling processMessage when a message is received is mS5,
- * mS1, mP1, mP0 assuming each processMessage  indicates it can't handle this
- * message by returning false.
+ * mS1, mP1, mP0 assuming each processMessage indicates it can't handle this
+ * message by returning false or NOT_HANDLED.
  *
  * Now assume mS5.processMessage receives a message it can handle, and during
- * the handling determines the machine should changes states. It would call
- * transitionTo(mS4) and return true. Immediately after returning from
+ * the handling determines the machine should change states. It could call
+ * transitionTo(mS4) and return true or HANDLED. Immediately after returning from
  * processMessage the state machine runtime will find the common parent,
  * which is mP1. It will then call mS5.exit, mS1.exit, mS2.enter and then
  * mS4.enter. The new list of active states is mP0, mP1, mS2 and mS4. So
  * when the next message is received mS4.processMessage will be invoked.
  *
- * To assist in describing an HSM a simple grammar has been created which
- * is informally defined here and a formal EBNF description is at the end
- * of the class comment.
- *
- * An HSM starts with the name and includes a set of hierarchical states.
- * A state is preceeded by one or more plus signs (+), to indicate its
- * depth and a hash (#) if its the initial state. Child states follow their
- * parents and have one more plus sign then their parent. Inside a state
- * are a series of messages, the actions they perform and if the processing
- * is complete ends with a period (.). If processing isn't complete and
- * the parent should process the message it ends with a caret (^). The
- * actions include send a message ($MESSAGE), defer a message (%MESSAGE),
- * transition to a new state (>MESSAGE) and an if statement
- * (if ( expression ) { list of actions }.)
- *
- * The Hsm HelloWorld could documented as:
- *
- * HelloWorld {
- *   + # mState1.
- * }
- *
- * and interpreted as HSM HelloWorld:
- *
- * mState1 a root state (single +) and initial state (#) which
- * processes all messages completely, the period (.).
- *
- * The implementation is:
+ * Now for some concrete examples, here is the canonical HelloWorld as an HSM.
+ * It responds with "Hello World" being printed to the log for every message.
 <code>
 class HelloWorld extends HierarchicalStateMachine {
     Hsm1(String name) {
@@ -164,7 +139,7 @@
     class State1 extends HierarchicalState {
         @Override public boolean processMessage(Message message) {
             Log.d(TAG, "Hello World");
-            return true;
+            return HANDLED;
         }
     }
     State1 mState1 = new State1();
@@ -176,7 +151,7 @@
 }
 </code>
  *
- * A more interesting state machine is one of four states
+ * A more interesting state machine is one with four states
  * with two independent parent states.
 <code>
         mP1      mP2
@@ -184,45 +159,68 @@
       mS2   mS1
 </code>
  *
- * documented as:
+ * Here is a description of this state machine using pseudo code.
  *
- * Hsm1 {
- *   + mP1 {
- *       CMD_2 {
- *          $CMD_3
- *          %CMD_2
- *          >mS2
- *       }.
- *     }
- *   ++ # mS1 { CMD_1{ >mS1 }^ }
- *   ++   mS2 {
- *            CMD_2{$CMD_4}.
- *            CMD_3{%CMD_3 ; >mP2}.
- *     }
  *
- *   + mP2 e($CMD_5) {
- *            CMD_3, CMD_4.
- *            CMD_5{>HALT}.
- *     }
+ * state mP1 {
+ *      enter { log("mP1.enter"); }
+ *      exit { log("mP1.exit");  }
+ *      on msg {
+ *          CMD_2 {
+ *              send(CMD_3);
+ *              defer(msg);
+ *              transitonTo(mS2);
+ *              return HANDLED;
+ *          }
+ *          return NOT_HANDLED;
+ *      }
  * }
  *
- * and interpreted as HierarchicalStateMachine Hsm1:
+ * INITIAL
+ * state mS1 parent mP1 {
+ *      enter { log("mS1.enter"); }
+ *      exit  { log("mS1.exit");  }
+ *      on msg {
+ *          CMD_1 {
+ *              transitionTo(mS1);
+ *              return HANDLED;
+ *          }
+ *          return NOT_HANDLED;
+ *      }
+ * }
  *
- * mP1 a root state.
- *      processes message CMD_2 which sends CMD_3, defers CMD_2, and transitions to mS2
+ * state mS2 parent mP1 {
+ *      enter { log("mS2.enter"); }
+ *      exit  { log("mS2.exit");  }
+ *      on msg {
+ *          CMD_2 {
+ *              send(CMD_4);
+ *              return HANDLED;
+ *          }
+ *          CMD_3 {
+ *              defer(msg);
+ *              transitionTo(mP2);
+ *              return HANDLED;
+ *          }
+ *          return NOT_HANDLED;
+ *      }
+ * }
  *
- * mS1 a child of mP1 is the initial state:
- *      processes message CMD_1 which transitions to itself and returns false to let mP1 handle it.
- *
- * mS2 a child of mP1:
- *      processes message CMD_2 which send CMD_4
- *      processes message CMD_3 which defers CMD_3 and transitions to mP2
- *
- * mP2 a root state.
- *      on enter it sends CMD_5
- *      processes message CMD_3
- *      processes message CMD_4
- *      processes message CMD_5 which transitions to halt state
+ * state mP2 {
+ *      enter {
+ *          log("mP2.enter");
+ *          send(CMD_5);
+ *      }
+ *      exit { log("mP2.exit"); }
+ *      on msg {
+ *          CMD_3, CMD_4 { return HANDLED; }
+ *          CMD_5 {
+ *              transitionTo(HaltingState);
+ *              return HANDLED;
+ *          }
+ *          return NOT_HANDLED;
+ *      }
+ * }
  *
  * The implementation is below and also in HierarchicalStateMachineTest:
 <code>
@@ -271,11 +269,11 @@
                 sendMessage(obtainMessage(CMD_3));
                 deferMessage(message);
                 transitionTo(mS2);
-                retVal = true;
+                retVal = HANDLED;
                 break;
             default:
                 // Any message we don't understand in this state invokes unhandledMessage
-                retVal = false;
+                retVal = NOT_HANDLED;
                 break;
             }
             return retVal;
@@ -294,10 +292,10 @@
             if (message.what == CMD_1) {
                 // Transition to ourself to show that enter/exit is called
                 transitionTo(mS1);
-                return true;
+                return HANDLED;
             } else {
                 // Let parent process all other messages
-                return false;
+                return NOT_HANDLED;
             }
         }
         @Override public void exit() {
@@ -315,15 +313,15 @@
             switch(message.what) {
             case(CMD_2):
                 sendMessage(obtainMessage(CMD_4));
-                retVal = true;
+                retVal = HANDLED;
                 break;
             case(CMD_3):
                 deferMessage(message);
                 transitionTo(mP2);
-                retVal = true;
+                retVal = HANDLED;
                 break;
             default:
-                retVal = false;
+                retVal = NOT_HANDLED;
                 break;
             }
             return retVal;
@@ -349,7 +347,7 @@
                 transitionToHaltingState();
                 break;
             }
-            return true;
+            return HANDLED;
         }
         @Override public void exit() {
             Log.d(TAG, "mP2.exit");
@@ -357,7 +355,7 @@
     }
 
     @Override
-    protected void halting() {
+    void halting() {
         Log.d(TAG, "halting");
         synchronized (this) {
             this.notifyAll();
@@ -413,53 +411,32 @@
  * D/hsm1    ( 1999): mP2.exit
  * D/hsm1    ( 1999): halting
  *
- * Here is the HSM a BNF grammar, this is a first stab at creating an
- * HSM description language, suggestions corrections or alternatives
- * would be much appreciated.
- *
- * Legend:
- *   {}  ::= zero or more
- *   {}+ ::= one or more
- *   []  ::= zero or one
- *   ()  ::= define a group with "or" semantics.
- *
- * HSM EBNF:
- *   HSM = HSM_NAME "{" { STATE }+ "}" ;
- *   HSM_NAME = alpha_numeric_name ;
- *   STATE = INTRODUCE_STATE [ ENTER | [ ENTER EXIT ] "{" [ MESSAGES ] "}" [ EXIT ] ;
- *   INTRODUCE_STATE = { STATE_DEPTH }+ [ INITIAL_STATE_INDICATOR ] STATE_NAME ;
- *   STATE_DEPTH = "+" ;
- *   INITIAL_STATE_INDICATOR = "#"
- *   ENTER = "e(" SEND_ACTION | TRANSITION_ACTION | HALT_ACTION ")" ;
- *   MESSAGES = { MSG_LIST MESSAGE_ACTIONS } ;
- *   MSG_LIST = { MSG_NAME { "," MSG_NAME } };
- *   EXIT = "x(" SEND_ACTION | TRANSITION_ACTION | HALT_ACTION ")" ;
- *   PROCESS_COMPLETION = PROCESS_IN_PARENT_OR_COMPLETE | PROCESS_COMPLETE ;
- *   SEND_ACTION = "$" MSG_NAME ;
- *   DEFER_ACTION = "%" MSG_NAME ;
- *   TRANSITION_ACTION = ">" STATE_NAME ;
- *   HALT_ACTION = ">" HALT ;
- *   MESSAGE_ACTIONS = { "{" ACTION_LIST "}" } [ PROCESS_COMPLETION ] ;
- *   ACTION_LIST = ACTION { (";" | "\n") ACTION } ;
- *   ACTION = IF_ACTION | SEND_ACTION | DEFER_ACTION | TRANSITION_ACTION | HALT_ACTION ;
- *   IF_ACTION = "if(" boolean_expression ")" "{" ACTION_LIST "}"
- *   PROCESS_IN_PARENT_OR_COMPLETE = "^" ;
- *   PROCESS_COMPLETE = "." ;
- *   STATE_NAME = alpha_numeric_name ;
- *   MSG_NAME = alpha_numeric_name | ALL_OTHER_MESSAGES ;
- *   ALL_OTHER_MESSAGES = "*" ;
- *   EXP = boolean_expression ;
- *
- * Idioms:
- *   * { %* }. ::= All other messages will be deferred.
  */
 public class HierarchicalStateMachine {
 
     private static final String TAG = "HierarchicalStateMachine";
     private String mName;
 
+    /** Message.what value when quitting */
     public static final int HSM_QUIT_CMD = -1;
 
+    /** Message.what value when initializing */
+    public static final int HSM_INIT_CMD = -1;
+
+    /**
+     * Convenience constant that maybe returned by processMessage
+     * to indicate the the message was processed and is not to be
+     * processed by parent states
+     */
+    public static final boolean HANDLED = true;
+
+    /**
+     * Convenience constant that maybe returned by processMessage
+     * to indicate the the message was NOT processed and is to be
+     * processed by parent states
+     */
+    public static final boolean NOT_HANDLED = false;
+
     private static class HsmHandler extends Handler {
 
         /** The debug flag */
@@ -468,6 +445,12 @@
         /** The quit object */
         private static final Object mQuitObj = new Object();
 
+        /** The initialization message */
+        private static final Message mInitMsg = null;
+
+        /** The current message */
+        private Message mMsg;
+
         /** A list of messages that this state machine has processed */
         private ProcessedMessages mProcessedMessages = new ProcessedMessages();
 
@@ -550,8 +533,7 @@
         private class QuittingState extends HierarchicalState {
             @Override
             public boolean processMessage(Message msg) {
-                // Ignore
-                return false;
+                return NOT_HANDLED;
             }
         }
 
@@ -565,6 +547,9 @@
         public final void handleMessage(Message msg) {
             if (mDbg) Log.d(TAG, "handleMessage: E msg.what=" + msg.what);
 
+            /** Save the current message */
+            mMsg = msg;
+
             /**
              * Check that construction was completed
              */
@@ -679,6 +664,7 @@
              * starting at the first entry.
              */
             mIsConstructionCompleted = true;
+            mMsg = obtainMessage(HSM_INIT_CMD);
             invokeEnterMethods(0);
 
             /**
@@ -855,6 +841,13 @@
         }
 
         /**
+         * @return current message
+         */
+        private final Message getCurrentMessage() {
+            return mMsg;
+        }
+
+        /**
          * @return current state
          */
         private final HierarchicalState getCurrentState() {
@@ -1025,6 +1018,14 @@
     protected final void addState(HierarchicalState state, HierarchicalState parent) {
         mHsmHandler.addState(state, parent);
     }
+
+    /**
+     * @return current message
+     */
+    protected final Message getCurrentMessage() {
+        return mHsmHandler.getCurrentMessage();
+    }
+
     /**
      * @return current state
      */
@@ -1032,7 +1033,6 @@
         return mHsmHandler.getCurrentState();
     }
 
-
     /**
      * Add a new state to the state machine, parent will be null
      * @param state to add
diff --git a/core/java/com/android/internal/view/BaseIWindow.java b/core/java/com/android/internal/view/BaseIWindow.java
index b13d656..4da74e6 100644
--- a/core/java/com/android/internal/view/BaseIWindow.java
+++ b/core/java/com/android/internal/view/BaseIWindow.java
@@ -43,59 +43,6 @@
         }
     }
 
-    public void dispatchKey(KeyEvent event) {
-        try {
-            mSession.finishKey(this);
-        } catch (RemoteException ex) {
-        }
-    }
-
-    public boolean onDispatchPointer(MotionEvent event, long eventTime,
-            boolean callWhenDone) {
-        event.recycle();
-        return false;
-    }
-    
-    public void dispatchPointer(MotionEvent event, long eventTime,
-            boolean callWhenDone) {
-        try {
-            if (event == null) {
-                event = mSession.getPendingPointerMove(this);
-                onDispatchPointer(event, eventTime, false);
-            } else if (callWhenDone) {
-                if (!onDispatchPointer(event, eventTime, true)) {
-                    mSession.finishKey(this);
-                }
-            } else {
-                onDispatchPointer(event, eventTime, false);
-            }
-        } catch (RemoteException ex) {
-        }
-    }
-
-    public boolean onDispatchTrackball(MotionEvent event, long eventTime,
-            boolean callWhenDone) {
-        event.recycle();
-        return false;
-    }
-    
-    public void dispatchTrackball(MotionEvent event, long eventTime,
-            boolean callWhenDone) {
-        try {
-            if (event == null) {
-                event = mSession.getPendingTrackballMove(this);
-                onDispatchTrackball(event, eventTime, false);
-            } else if (callWhenDone) {
-                if (!onDispatchTrackball(event, eventTime, true)) {
-                    mSession.finishKey(this);
-                }
-            } else {
-                onDispatchTrackball(event, eventTime, false);
-            }
-        } catch (RemoteException ex) {
-        }
-    }
-
     public void dispatchAppVisibility(boolean visible) {
     }
 
diff --git a/core/java/com/android/internal/view/BaseInputHandler.java b/core/java/com/android/internal/view/BaseInputHandler.java
new file mode 100644
index 0000000..e943a7d
--- /dev/null
+++ b/core/java/com/android/internal/view/BaseInputHandler.java
@@ -0,0 +1,35 @@
+/*
+ * Copyright (C) 2010 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.android.internal.view;
+
+import android.view.InputHandler;
+import android.view.KeyEvent;
+import android.view.MotionEvent;
+
+/**
+ * Base do-nothing implementation of an input handler.
+ * @hide
+ */
+public abstract class BaseInputHandler implements InputHandler {
+    public void handleKey(KeyEvent event, Runnable finishedCallback) {
+        finishedCallback.run();
+    }
+    
+    public void handleMotion(MotionEvent event, Runnable finishedCallback) {
+        finishedCallback.run();
+    }
+}
diff --git a/core/java/com/android/internal/view/BaseSurfaceHolder.java b/core/java/com/android/internal/view/BaseSurfaceHolder.java
index e0d3a5f..3a04993 100644
--- a/core/java/com/android/internal/view/BaseSurfaceHolder.java
+++ b/core/java/com/android/internal/view/BaseSurfaceHolder.java
@@ -33,9 +33,11 @@
 
     public final ArrayList<SurfaceHolder.Callback> mCallbacks
             = new ArrayList<SurfaceHolder.Callback>();
-
+    SurfaceHolder.Callback[] mGottenCallbacks;
+    boolean mHaveGottenCallbacks;
+    
     public final ReentrantLock mSurfaceLock = new ReentrantLock();
-    public final Surface mSurface = new Surface();
+    public Surface mSurface = new Surface();
 
     int mRequestedWidth = -1;
     int mRequestedHeight = -1;
@@ -83,6 +85,31 @@
         }
     }
     
+    public SurfaceHolder.Callback[] getCallbacks() {
+        if (mHaveGottenCallbacks) {
+            return mGottenCallbacks;
+        }
+        
+        synchronized (mCallbacks) {
+            final int N = mCallbacks.size();
+            if (N > 0) {
+                if (mGottenCallbacks == null || mGottenCallbacks.length != N) {
+                    mGottenCallbacks = new SurfaceHolder.Callback[N];
+                }
+                mCallbacks.toArray(mGottenCallbacks);
+            } else {
+                mGottenCallbacks = null;
+            }
+            mHaveGottenCallbacks = true;
+        }
+        
+        return mGottenCallbacks;
+    }
+    
+    public void ungetCallbacks() {
+        mHaveGottenCallbacks = false;
+    }
+    
     public void setFixedSize(int width, int height) {
         if (mRequestedWidth != width || mRequestedHeight != height) {
             mRequestedWidth = width;
diff --git a/core/java/com/android/internal/view/IInputMethodSession.aidl b/core/java/com/android/internal/view/IInputMethodSession.aidl
index a05ff14..338dcaa 100644
--- a/core/java/com/android/internal/view/IInputMethodSession.aidl
+++ b/core/java/com/android/internal/view/IInputMethodSession.aidl
@@ -48,4 +48,6 @@
     void appPrivateCommand(String action, in Bundle data);
 
     void toggleSoftInput(int showFlags, int hideFlags);
+
+    void finishSession();
 }
diff --git a/core/java/com/android/internal/view/RootViewSurfaceTaker.java b/core/java/com/android/internal/view/RootViewSurfaceTaker.java
new file mode 100644
index 0000000..9c1b558
--- /dev/null
+++ b/core/java/com/android/internal/view/RootViewSurfaceTaker.java
@@ -0,0 +1,13 @@
+package com.android.internal.view;
+
+import android.view.InputQueue;
+import android.view.SurfaceHolder;
+
+/** hahahah */
+public interface RootViewSurfaceTaker {
+    SurfaceHolder.Callback2 willYouTakeTheSurface();
+    void setSurfaceType(int type);
+    void setSurfaceFormat(int format);
+    void setSurfaceKeepScreenOn(boolean keepOn);
+    InputQueue.Callback willYouTakeTheInputQueue();
+}
diff --git a/core/java/com/android/internal/widget/DigitalClock.java b/core/java/com/android/internal/widget/DigitalClock.java
index 23e2277..fa47ff6 100644
--- a/core/java/com/android/internal/widget/DigitalClock.java
+++ b/core/java/com/android/internal/widget/DigitalClock.java
@@ -30,7 +30,7 @@
 import android.text.format.DateFormat;
 import android.util.AttributeSet;
 import android.view.View;
-import android.widget.RelativeLayout;
+import android.widget.LinearLayout;
 import android.widget.TextView;
 
 import java.text.DateFormatSymbols;
@@ -39,7 +39,7 @@
 /**
  * Displays the time
  */
-public class DigitalClock extends RelativeLayout {
+public class DigitalClock extends LinearLayout {
 
     private final static String M12 = "h:mm";
     private final static String M24 = "kk:mm";
diff --git a/core/java/com/google/android/mms/ContentType.java b/core/java/com/google/android/mms/ContentType.java
index 94bc9fd..b066fad 100644
--- a/core/java/com/google/android/mms/ContentType.java
+++ b/core/java/com/google/android/mms/ContentType.java
@@ -26,6 +26,7 @@
     public static final String MMS_GENERIC       = "application/vnd.wap.mms-generic";
     public static final String MULTIPART_MIXED   = "application/vnd.wap.multipart.mixed";
     public static final String MULTIPART_RELATED = "application/vnd.wap.multipart.related";
+    public static final String MULTIPART_ALTERNATIVE = "application/vnd.wap.multipart.alternative";
 
     public static final String TEXT_PLAIN        = "text/plain";
     public static final String TEXT_HTML         = "text/html";
diff --git a/core/java/com/google/android/mms/pdu/PduParser.java b/core/java/com/google/android/mms/pdu/PduParser.java
index d465c5a..1cd118b 100644
--- a/core/java/com/google/android/mms/pdu/PduParser.java
+++ b/core/java/com/google/android/mms/pdu/PduParser.java
@@ -200,7 +200,18 @@
         PduHeaders headers = new PduHeaders();
 
         while (keepParsing && (pduDataStream.available() > 0)) {
+            pduDataStream.mark(1);
             int headerField = extractByteValue(pduDataStream);
+            /* parse custom text header */
+            if ((headerField >= TEXT_MIN) && (headerField <= TEXT_MAX)) {
+                pduDataStream.reset();
+                byte [] bVal = parseWapString(pduDataStream, TYPE_TEXT_STRING);
+                if (LOCAL_LOGV) {
+                    Log.v(LOG_TAG, "TextHeader: " + new String(bVal));
+                }
+                /* we should ignore it at the moment */
+                continue;
+            }
             switch (headerField) {
                 case PduHeaders.MESSAGE_TYPE:
                 {
@@ -778,26 +789,34 @@
             /* get part's data */
             if (dataLength > 0) {
                 byte[] partData = new byte[dataLength];
+                String partContentType = new String(part.getContentType());
                 pduDataStream.read(partData, 0, dataLength);
-                // Check Content-Transfer-Encoding.
-                byte[] partDataEncoding = part.getContentTransferEncoding();
-                if (null != partDataEncoding) {
-                    String encoding = new String(partDataEncoding);
-                    if (encoding.equalsIgnoreCase(PduPart.P_BASE64)) {
-                        // Decode "base64" into "binary".
-                        partData = Base64.decodeBase64(partData);
-                    } else if (encoding.equalsIgnoreCase(PduPart.P_QUOTED_PRINTABLE)) {
-                        // Decode "quoted-printable" into "binary".
-                        partData = QuotedPrintable.decodeQuotedPrintable(partData);
-                    } else {
-                        // "binary" is the default encoding.
+                if (partContentType.equalsIgnoreCase(ContentType.MULTIPART_ALTERNATIVE)) {
+                    // parse "multipart/vnd.wap.multipart.alternative".
+                    PduBody childBody = parseParts(new ByteArrayInputStream(partData));
+                    // take the first part of children.
+                    part = childBody.getPart(0);
+                } else {
+                    // Check Content-Transfer-Encoding.
+                    byte[] partDataEncoding = part.getContentTransferEncoding();
+                    if (null != partDataEncoding) {
+                        String encoding = new String(partDataEncoding);
+                        if (encoding.equalsIgnoreCase(PduPart.P_BASE64)) {
+                            // Decode "base64" into "binary".
+                            partData = Base64.decodeBase64(partData);
+                        } else if (encoding.equalsIgnoreCase(PduPart.P_QUOTED_PRINTABLE)) {
+                            // Decode "quoted-printable" into "binary".
+                            partData = QuotedPrintable.decodeQuotedPrintable(partData);
+                        } else {
+                            // "binary" is the default encoding.
+                        }
                     }
+                    if (null == partData) {
+                        log("Decode part data error!");
+                        return null;
+                    }
+                    part.setData(partData);
                 }
-                if (null == partData) {
-                    log("Decode part data error!");
-                    return null;
-                }
-                part.setData(partData);
             }
 
             /* add this part to body */
diff --git a/core/jni/ActivityManager.cpp b/core/jni/ActivityManager.cpp
index 8950dfb..0bd14fa 100644
--- a/core/jni/ActivityManager.cpp
+++ b/core/jni/ActivityManager.cpp
@@ -39,7 +39,7 @@
         data.writeString16(uri);
         status_t ret = am->transact(OPEN_CONTENT_URI_TRANSACTION, data, &reply);
         if (ret == NO_ERROR) {
-            int32_t exceptionCode = reply.readInt32();
+            int32_t exceptionCode = reply.readExceptionCode();
             if (!exceptionCode) {
                 // Success is indicated here by a nonzero int followed by the fd;
                 // failure by a zero int with no data following.
diff --git a/core/jni/Android.mk b/core/jni/Android.mk
index df1ab9e..89fea41 100644
--- a/core/jni/Android.mk
+++ b/core/jni/Android.mk
@@ -28,6 +28,7 @@
 	Time.cpp \
 	com_google_android_gles_jni_EGLImpl.cpp \
 	com_google_android_gles_jni_GLImpl.cpp.arm \
+	android_app_NativeActivity.cpp \
 	android_opengl_GLES10.cpp \
 	android_opengl_GLES10Ext.cpp \
 	android_opengl_GLES11.cpp \
@@ -44,12 +45,17 @@
 	android_view_Display.cpp \
 	android_view_Surface.cpp \
 	android_view_ViewRoot.cpp \
+	android_view_InputChannel.cpp \
+	android_view_InputQueue.cpp \
+	android_view_KeyEvent.cpp \
+	android_view_MotionEvent.cpp \
 	android_text_AndroidCharacter.cpp \
 	android_text_AndroidBidi.cpp \
 	android_text_KeyCharacterMap.cpp \
 	android_os_Debug.cpp \
 	android_os_FileUtils.cpp \
 	android_os_MemoryFile.cpp \
+	android_os_MessageQueue.cpp \
 	android_os_ParcelFileDescriptor.cpp \
 	android_os_Power.cpp \
 	android_os_StatFs.cpp \
@@ -123,13 +129,13 @@
 	android_server_Watchdog.cpp \
 	android_message_digest_sha1.cpp \
 	android_ddm_DdmHandleNativeHeap.cpp \
-	android_location_GpsLocationProvider.cpp \
 	com_android_internal_os_ZygoteInit.cpp \
 	com_android_internal_graphics_NativeUtils.cpp \
 	android_backup_BackupDataInput.cpp \
 	android_backup_BackupDataOutput.cpp \
 	android_backup_FileBackupHelperBase.cpp \
-	android_backup_BackupHelperDispatcher.cpp
+	android_backup_BackupHelperDispatcher.cpp \
+	android_content_res_ObbScanner.cpp
 
 LOCAL_C_INCLUDES += \
 	$(JNI_H_INCLUDE) \
@@ -179,7 +185,6 @@
 	libssl \
 	libicuuc \
 	libicui18n \
-	libicudata \
 	libmedia \
 	libwpa_client \
 	libjpeg
diff --git a/core/jni/AndroidRuntime.cpp b/core/jni/AndroidRuntime.cpp
index d38d748..fc1f4884 100644
--- a/core/jni/AndroidRuntime.cpp
+++ b/core/jni/AndroidRuntime.cpp
@@ -128,6 +128,7 @@
 extern int register_android_pim_EventRecurrence(JNIEnv* env);
 extern int register_android_text_format_Time(JNIEnv* env);
 extern int register_android_os_Debug(JNIEnv* env);
+extern int register_android_os_MessageQueue(JNIEnv* env);
 extern int register_android_os_ParcelFileDescriptor(JNIEnv *env);
 extern int register_android_os_Power(JNIEnv *env);
 extern int register_android_os_StatFs(JNIEnv *env);
@@ -156,11 +157,16 @@
 extern int register_android_server_Watchdog(JNIEnv* env);
 extern int register_android_ddm_DdmHandleNativeHeap(JNIEnv *env);
 extern int register_com_android_internal_os_ZygoteInit(JNIEnv* env);
-extern int register_android_location_GpsLocationProvider(JNIEnv* env);
 extern int register_android_backup_BackupDataInput(JNIEnv *env);
 extern int register_android_backup_BackupDataOutput(JNIEnv *env);
 extern int register_android_backup_FileBackupHelperBase(JNIEnv *env);
 extern int register_android_backup_BackupHelperDispatcher(JNIEnv *env);
+extern int register_android_app_NativeActivity(JNIEnv *env);
+extern int register_android_view_InputChannel(JNIEnv* env);
+extern int register_android_view_InputQueue(JNIEnv* env);
+extern int register_android_view_KeyEvent(JNIEnv* env);
+extern int register_android_view_MotionEvent(JNIEnv* env);
+extern int register_android_content_res_ObbScanner(JNIEnv* env);
 
 static AndroidRuntime* gCurRuntime = NULL;
 
@@ -1130,11 +1136,13 @@
  *
  * This is called from elsewhere in the library.
  */
-/*static*/ void AndroidRuntime::createJavaThread(const char* name,
+/*static*/ android_thread_id_t AndroidRuntime::createJavaThread(const char* name,
     void (*start)(void *), void* arg)
 {
+    android_thread_id_t threadId = 0;
     javaCreateThreadEtc((android_thread_func_t) start, arg, name,
-        ANDROID_PRIORITY_DEFAULT, 0, NULL);
+        ANDROID_PRIORITY_DEFAULT, 0, &threadId);
+    return threadId;
 }
 
 #if 0
@@ -1250,6 +1258,7 @@
     REG_JNI(register_android_os_Debug),
     REG_JNI(register_android_os_FileObserver),
     REG_JNI(register_android_os_FileUtils),
+    REG_JNI(register_android_os_MessageQueue),
     REG_JNI(register_android_os_ParcelFileDescriptor),
     REG_JNI(register_android_os_Power),
     REG_JNI(register_android_os_StatFs),
@@ -1280,11 +1289,18 @@
     REG_JNI(register_android_server_Watchdog),
     REG_JNI(register_android_message_digest_sha1),
     REG_JNI(register_android_ddm_DdmHandleNativeHeap),
-    REG_JNI(register_android_location_GpsLocationProvider),
     REG_JNI(register_android_backup_BackupDataInput),
     REG_JNI(register_android_backup_BackupDataOutput),
     REG_JNI(register_android_backup_FileBackupHelperBase),
     REG_JNI(register_android_backup_BackupHelperDispatcher),
+    
+    REG_JNI(register_android_app_NativeActivity),
+    REG_JNI(register_android_view_InputChannel),
+    REG_JNI(register_android_view_InputQueue),
+    REG_JNI(register_android_view_KeyEvent),
+    REG_JNI(register_android_view_MotionEvent),
+
+    REG_JNI(register_android_content_res_ObbScanner),
 };
 
 /*
diff --git a/core/jni/android_app_NativeActivity.cpp b/core/jni/android_app_NativeActivity.cpp
new file mode 100644
index 0000000..1feb3b3
--- /dev/null
+++ b/core/jni/android_app_NativeActivity.cpp
@@ -0,0 +1,1000 @@
+/*
+ * Copyright (C) 2010 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#define LOG_TAG "NativeActivity"
+#include <utils/Log.h>
+
+#include <poll.h>
+#include <dlfcn.h>
+#include <fcntl.h>
+
+#include <android_runtime/AndroidRuntime.h>
+#include <android_runtime/android_view_Surface.h>
+#include <android_runtime/android_app_NativeActivity.h>
+#include <android_runtime/android_util_AssetManager.h>
+#include <surfaceflinger/Surface.h>
+#include <ui/egl/android_natives.h>
+#include <ui/InputTransport.h>
+#include <utils/PollLoop.h>
+
+#include "JNIHelp.h"
+#include "android_os_MessageQueue.h"
+#include "android_view_InputChannel.h"
+#include "android_view_KeyEvent.h"
+
+//#define LOG_TRACE(...)
+#define LOG_TRACE(...) LOG(LOG_DEBUG, LOG_TAG, __VA_ARGS__)
+
+namespace android
+{
+
+static struct {
+    jclass clazz;
+
+    jmethodID dispatchUnhandledKeyEvent;
+    jmethodID preDispatchKeyEvent;
+    jmethodID setWindowFlags;
+    jmethodID setWindowFormat;
+    jmethodID showIme;
+    jmethodID hideIme;
+} gNativeActivityClassInfo;
+
+// ------------------------------------------------------------------------
+
+struct ActivityWork {
+    int32_t cmd;
+    int32_t arg1;
+    int32_t arg2;
+};
+
+enum {
+    CMD_DEF_KEY = 1,
+    CMD_SET_WINDOW_FORMAT,
+    CMD_SET_WINDOW_FLAGS,
+    CMD_SHOW_SOFT_INPUT,
+    CMD_HIDE_SOFT_INPUT,
+};
+
+static void write_work(int fd, int32_t cmd, int32_t arg1=0, int32_t arg2=0) {
+    ActivityWork work;
+    work.cmd = cmd;
+    work.arg1 = arg1;
+    work.arg2 = arg2;
+    
+    LOG_TRACE("write_work: cmd=%d", cmd);
+
+restart:
+    int res = write(fd, &work, sizeof(work));
+    if (res < 0 && errno == EINTR) {
+        goto restart;
+    }
+    
+    if (res == sizeof(work)) return;
+    
+    if (res < 0) LOGW("Failed writing to work fd: %s", strerror(errno));
+    else LOGW("Truncated writing to work fd: %d", res);
+}
+
+static bool read_work(int fd, ActivityWork* outWork) {
+    int res = read(fd, outWork, sizeof(ActivityWork));
+    // no need to worry about EINTR, poll loop will just come back again.
+    if (res == sizeof(ActivityWork)) return true;
+    
+    if (res < 0) LOGW("Failed reading work fd: %s", strerror(errno));
+    else LOGW("Truncated reading work fd: %d", res);
+    return false;
+}
+
+// ------------------------------------------------------------------------
+
+} // namespace android
+
+using namespace android;
+
+AInputQueue::AInputQueue(const sp<InputChannel>& channel, int workWrite) :
+        mWorkWrite(workWrite), mConsumer(channel), mSeq(0) {
+    int msgpipe[2];
+    if (pipe(msgpipe)) {
+        LOGW("could not create pipe: %s", strerror(errno));
+        mDispatchKeyRead = mDispatchKeyWrite = -1;
+    } else {
+        mDispatchKeyRead = msgpipe[0];
+        mDispatchKeyWrite = msgpipe[1];
+        int result = fcntl(mDispatchKeyRead, F_SETFL, O_NONBLOCK);
+        SLOGW_IF(result != 0, "Could not make AInputQueue read pipe "
+                "non-blocking: %s", strerror(errno));
+        result = fcntl(mDispatchKeyWrite, F_SETFL, O_NONBLOCK);
+        SLOGW_IF(result != 0, "Could not make AInputQueue write pipe "
+                "non-blocking: %s", strerror(errno));
+    }
+}
+
+AInputQueue::~AInputQueue() {
+    close(mDispatchKeyRead);
+    close(mDispatchKeyWrite);
+}
+
+void AInputQueue::attachLooper(ALooper* looper, ALooper_callbackFunc* callback, void* data) {
+    mPollLoop = static_cast<android::PollLoop*>(looper);
+    mPollLoop->setLooperCallback(mConsumer.getChannel()->getReceivePipeFd(),
+            POLLIN, callback, data);
+    mPollLoop->setLooperCallback(mDispatchKeyRead,
+            POLLIN, callback, data);
+}
+
+void AInputQueue::detachLooper() {
+    mPollLoop->removeCallback(mConsumer.getChannel()->getReceivePipeFd());
+    mPollLoop->removeCallback(mDispatchKeyRead);
+}
+
+int32_t AInputQueue::hasEvents() {
+    struct pollfd pfd[2];
+
+    pfd[0].fd = mConsumer.getChannel()->getReceivePipeFd();
+    pfd[0].events = POLLIN;
+    pfd[0].revents = 0;
+    pfd[1].fd = mDispatchKeyRead;
+    pfd[0].events = POLLIN;
+    pfd[0].revents = 0;
+    
+    int nfd = poll(pfd, 2, 0);
+    if (nfd <= 0) return 0;
+    return (pfd[0].revents == POLLIN || pfd[1].revents == POLLIN) ? 1 : -1;
+}
+
+int32_t AInputQueue::getEvent(AInputEvent** outEvent) {
+    *outEvent = NULL;
+
+    bool finishNow = false;
+
+    char byteread;
+    ssize_t nRead = read(mDispatchKeyRead, &byteread, 1);
+    if (nRead == 1) {
+        mLock.lock();
+        if (mDispatchingKeys.size() > 0) {
+            KeyEvent* kevent = mDispatchingKeys[0];
+            *outEvent = kevent;
+            mDispatchingKeys.removeAt(0);
+            in_flight_event inflight;
+            inflight.event = kevent;
+            inflight.seq = -1;
+            inflight.doFinish = false;
+            mInFlightEvents.push(inflight);
+        }
+        if (mFinishPreDispatches.size() > 0) {
+            finish_pre_dispatch finish(mFinishPreDispatches[0]);
+            mFinishPreDispatches.removeAt(0);
+            const size_t N = mInFlightEvents.size();
+            for (size_t i=0; i<N; i++) {
+                const in_flight_event& inflight(mInFlightEvents[i]);
+                if (inflight.seq == finish.seq) {
+                    *outEvent = inflight.event;
+                    finishNow = finish.handled;
+                }
+            }
+            if (*outEvent == NULL) {
+                LOGW("getEvent couldn't find inflight for seq %d", finish.seq);
+            }
+        }
+        mLock.unlock();
+
+        if (finishNow) {
+            finishEvent(*outEvent, true);
+            *outEvent = NULL;
+            return -1;
+        } else if (*outEvent != NULL) {
+            return 0;
+        }
+    }
+    
+    int32_t res = mConsumer.receiveDispatchSignal();
+    if (res != android::OK) {
+        LOGE("channel '%s' ~ Failed to receive dispatch signal.  status=%d",
+                mConsumer.getChannel()->getName().string(), res);
+        return -1;
+    }
+
+    InputEvent* myEvent = NULL;
+    res = mConsumer.consume(this, &myEvent);
+    if (res != android::OK) {
+        LOGW("channel '%s' ~ Failed to consume input event.  status=%d",
+                mConsumer.getChannel()->getName().string(), res);
+        mConsumer.sendFinishedSignal();
+        return -1;
+    }
+
+    in_flight_event inflight;
+    inflight.event = myEvent;
+    inflight.seq = -1;
+    inflight.doFinish = true;
+    mInFlightEvents.push(inflight);
+
+    *outEvent = myEvent;
+    return 0;
+}
+
+bool AInputQueue::preDispatchEvent(AInputEvent* event) {
+    if (((InputEvent*)event)->getType() != AINPUT_EVENT_TYPE_KEY) {
+        // The IME only cares about key events.
+        return false;
+    }
+
+    // For now we only send system keys to the IME...  this avoids having
+    // critical keys like DPAD go through this path.  We really need to have
+    // the IME report which keys it wants.
+    if (!((KeyEvent*)event)->isSystemKey()) {
+        return false;
+    }
+
+    return preDispatchKey((KeyEvent*)event);
+}
+
+void AInputQueue::finishEvent(AInputEvent* event, bool handled) {
+    LOG_TRACE("finishEvent: %p handled=%d", event, handled ? 1 : 0);
+
+    if (!handled && ((InputEvent*)event)->getType() == AINPUT_EVENT_TYPE_KEY
+            && ((KeyEvent*)event)->hasDefaultAction()) {
+        // The app didn't handle this, but it may have a default action
+        // associated with it.  We need to hand this back to Java to be
+        // executed.
+        doUnhandledKey((KeyEvent*)event);
+        return;
+    }
+
+    mLock.lock();
+    const size_t N = mInFlightEvents.size();
+    for (size_t i=0; i<N; i++) {
+        const in_flight_event& inflight(mInFlightEvents[i]);
+        if (inflight.event == event) {
+            if (inflight.doFinish) {
+                int32_t res = mConsumer.sendFinishedSignal();
+                if (res != android::OK) {
+                    LOGW("Failed to send finished signal on channel '%s'.  status=%d",
+                            mConsumer.getChannel()->getName().string(), res);
+                }
+            }
+            if (static_cast<InputEvent*>(event)->getType() == AINPUT_EVENT_TYPE_KEY) {
+                mAvailKeyEvents.push(static_cast<KeyEvent*>(event));
+            } else {
+                mAvailMotionEvents.push(static_cast<MotionEvent*>(event));
+            }
+            mInFlightEvents.removeAt(i);
+            mLock.unlock();
+            return;
+        }
+    }
+    mLock.unlock();
+    
+    LOGW("finishEvent called for unknown event: %p", event);
+}
+
+void AInputQueue::dispatchEvent(android::KeyEvent* event) {
+    mLock.lock();
+    LOG_TRACE("dispatchEvent: dispatching=%d write=%d\n", mDispatchingKeys.size(),
+            mDispatchKeyWrite);
+    mDispatchingKeys.add(event);
+    wakeupDispatch();
+    mLock.unlock();
+}
+
+void AInputQueue::finishPreDispatch(int seq, bool handled) {
+    mLock.lock();
+    LOG_TRACE("finishPreDispatch: seq=%d handled=%d\n", seq, handled ? 1 : 0);
+    finish_pre_dispatch finish;
+    finish.seq = seq;
+    finish.handled = handled;
+    mFinishPreDispatches.add(finish);
+    wakeupDispatch();
+    mLock.unlock();
+}
+
+KeyEvent* AInputQueue::consumeUnhandledEvent() {
+    KeyEvent* event = NULL;
+
+    mLock.lock();
+    if (mUnhandledKeys.size() > 0) {
+        event = mUnhandledKeys[0];
+        mUnhandledKeys.removeAt(0);
+    }
+    mLock.unlock();
+
+    LOG_TRACE("consumeUnhandledEvent: KeyEvent=%p", event);
+
+    return event;
+}
+
+KeyEvent* AInputQueue::consumePreDispatchingEvent(int* outSeq) {
+    KeyEvent* event = NULL;
+
+    mLock.lock();
+    if (mPreDispatchingKeys.size() > 0) {
+        const in_flight_event& inflight(mPreDispatchingKeys[0]);
+        event = static_cast<KeyEvent*>(inflight.event);
+        *outSeq = inflight.seq;
+        mPreDispatchingKeys.removeAt(0);
+    }
+    mLock.unlock();
+
+    LOG_TRACE("consumePreDispatchingEvent: KeyEvent=%p", event);
+
+    return event;
+}
+
+KeyEvent* AInputQueue::createKeyEvent() {
+    mLock.lock();
+    KeyEvent* event;
+    if (mAvailKeyEvents.size() <= 0) {
+        event = new KeyEvent();
+    } else {
+        event = mAvailKeyEvents.top();
+        mAvailKeyEvents.pop();
+    }
+    mLock.unlock();
+    return event;
+}
+
+MotionEvent* AInputQueue::createMotionEvent() {
+    mLock.lock();
+    MotionEvent* event;
+    if (mAvailMotionEvents.size() <= 0) {
+        event = new MotionEvent();
+    } else {
+        event = mAvailMotionEvents.top();
+        mAvailMotionEvents.pop();
+    }
+    mLock.unlock();
+    return event;
+}
+
+void AInputQueue::doUnhandledKey(KeyEvent* keyEvent) {
+    mLock.lock();
+    LOG_TRACE("Unhandled key: pending=%d write=%d\n", mUnhandledKeys.size(), mWorkWrite);
+    if (mUnhandledKeys.size() <= 0 && mWorkWrite >= 0) {
+        write_work(mWorkWrite, CMD_DEF_KEY);
+    }
+    mUnhandledKeys.add(keyEvent);
+    mLock.unlock();
+}
+
+bool AInputQueue::preDispatchKey(KeyEvent* keyEvent) {
+    mLock.lock();
+    LOG_TRACE("preDispatch key: pending=%d write=%d\n", mPreDispatchingKeys.size(), mWorkWrite);
+    const size_t N = mInFlightEvents.size();
+    for (size_t i=0; i<N; i++) {
+        in_flight_event& inflight(mInFlightEvents.editItemAt(i));
+        if (inflight.event == keyEvent) {
+            if (inflight.seq >= 0) {
+                // This event has already been pre-dispatched!
+                LOG_TRACE("Event already pre-dispatched!");
+                mLock.unlock();
+                return false;
+            }
+            mSeq++;
+            if (mSeq < 0) mSeq = 1;
+            inflight.seq = mSeq;
+
+            if (mPreDispatchingKeys.size() <= 0 && mWorkWrite >= 0) {
+                write_work(mWorkWrite, CMD_DEF_KEY);
+            }
+            mPreDispatchingKeys.add(inflight);
+            mLock.unlock();
+            return true;
+        }
+    }
+
+    LOGW("preDispatchKey called for unknown event: %p", keyEvent);
+    return false;
+}
+
+void AInputQueue::wakeupDispatch() {
+restart:
+    char dummy = 0;
+    int res = write(mDispatchKeyWrite, &dummy, sizeof(dummy));
+    if (res < 0 && errno == EINTR) {
+        goto restart;
+    }
+
+    if (res == sizeof(dummy)) return;
+
+    if (res < 0) LOGW("Failed writing to dispatch fd: %s", strerror(errno));
+    else LOGW("Truncated writing to dispatch fd: %d", res);
+}
+
+namespace android {
+
+// ------------------------------------------------------------------------
+
+/*
+ * Native state for interacting with the NativeActivity class.
+ */
+struct NativeCode : public ANativeActivity {
+    NativeCode(void* _dlhandle, ANativeActivity_createFunc* _createFunc) {
+        memset((ANativeActivity*)this, 0, sizeof(ANativeActivity));
+        memset(&callbacks, 0, sizeof(callbacks));
+        dlhandle = _dlhandle;
+        createActivityFunc = _createFunc;
+        nativeWindow = NULL;
+        inputChannel = NULL;
+        nativeInputQueue = NULL;
+        mainWorkRead = mainWorkWrite = -1;
+    }
+    
+    ~NativeCode() {
+        if (callbacks.onDestroy != NULL) {
+            callbacks.onDestroy(this);
+        }
+        if (env != NULL && clazz != NULL) {
+            env->DeleteGlobalRef(clazz);
+        }
+        if (pollLoop != NULL && mainWorkRead >= 0) {
+            pollLoop->removeCallback(mainWorkRead);
+        }
+        if (nativeInputQueue != NULL) {
+            nativeInputQueue->mWorkWrite = -1;
+        }
+        setSurface(NULL);
+        setInputChannel(NULL);
+        if (mainWorkRead >= 0) close(mainWorkRead);
+        if (mainWorkWrite >= 0) close(mainWorkWrite);
+        if (dlhandle != NULL) {
+            // for now don't unload...  we probably should clean this
+            // up and only keep one open dlhandle per proc, since there
+            // is really no benefit to unloading the code.
+            //dlclose(dlhandle);
+        }
+    }
+    
+    void setSurface(jobject _surface) {
+        if (_surface != NULL) {
+            nativeWindow = android_Surface_getNativeWindow(env, _surface);
+        } else {
+            nativeWindow = NULL;
+        }
+    }
+    
+    status_t setInputChannel(jobject _channel) {
+        if (inputChannel != NULL) {
+            delete nativeInputQueue;
+            env->DeleteGlobalRef(inputChannel);
+        }
+        inputChannel = NULL;
+        nativeInputQueue = NULL;
+        if (_channel != NULL) {
+            inputChannel = env->NewGlobalRef(_channel);
+            sp<InputChannel> ic =
+                    android_view_InputChannel_getInputChannel(env, _channel);
+            if (ic != NULL) {
+                nativeInputQueue = new AInputQueue(ic, mainWorkWrite);
+                if (nativeInputQueue->getConsumer().initialize() != android::OK) {
+                    delete nativeInputQueue;
+                    nativeInputQueue = NULL;
+                    return UNKNOWN_ERROR;
+                }
+            } else {
+                return UNKNOWN_ERROR;
+            }
+        }
+        return OK;
+    }
+    
+    ANativeActivityCallbacks callbacks;
+    
+    void* dlhandle;
+    ANativeActivity_createFunc* createActivityFunc;
+    
+    String8 internalDataPath;
+    String8 externalDataPath;
+    
+    sp<ANativeWindow> nativeWindow;
+    int32_t lastWindowWidth;
+    int32_t lastWindowHeight;
+
+    jobject inputChannel;
+    struct AInputQueue* nativeInputQueue;
+    
+    // These are used to wake up the main thread to process work.
+    int mainWorkRead;
+    int mainWorkWrite;
+    sp<PollLoop> pollLoop;
+};
+
+void android_NativeActivity_setWindowFormat(
+        ANativeActivity* activity, int32_t format) {
+    NativeCode* code = static_cast<NativeCode*>(activity);
+    write_work(code->mainWorkWrite, CMD_SET_WINDOW_FORMAT, format);
+}
+
+void android_NativeActivity_setWindowFlags(
+        ANativeActivity* activity, int32_t values, int32_t mask) {
+    NativeCode* code = static_cast<NativeCode*>(activity);
+    write_work(code->mainWorkWrite, CMD_SET_WINDOW_FLAGS, values, mask);
+}
+
+void android_NativeActivity_showSoftInput(
+        ANativeActivity* activity, int32_t flags) {
+    NativeCode* code = static_cast<NativeCode*>(activity);
+    write_work(code->mainWorkWrite, CMD_SHOW_SOFT_INPUT, flags);
+}
+
+void android_NativeActivity_hideSoftInput(
+        ANativeActivity* activity, int32_t flags) {
+    NativeCode* code = static_cast<NativeCode*>(activity);
+    write_work(code->mainWorkWrite, CMD_HIDE_SOFT_INPUT, flags);
+}
+
+// ------------------------------------------------------------------------
+
+/*
+ * Callback for handling native events on the application's main thread.
+ */
+static bool mainWorkCallback(int fd, int events, void* data) {
+    NativeCode* code = (NativeCode*)data;
+    if ((events & POLLIN) == 0) {
+        return true;
+    }
+    
+    ActivityWork work;
+    if (!read_work(code->mainWorkRead, &work)) {
+        return true;
+    }
+
+    LOG_TRACE("mainWorkCallback: cmd=%d", work.cmd);
+
+    switch (work.cmd) {
+        case CMD_DEF_KEY: {
+            KeyEvent* keyEvent;
+            while ((keyEvent=code->nativeInputQueue->consumeUnhandledEvent()) != NULL) {
+                jobject inputEventObj = android_view_KeyEvent_fromNative(
+                        code->env, keyEvent);
+                code->env->CallVoidMethod(code->clazz,
+                        gNativeActivityClassInfo.dispatchUnhandledKeyEvent, inputEventObj);
+                code->nativeInputQueue->finishEvent(keyEvent, true);
+            }
+            int seq;
+            while ((keyEvent=code->nativeInputQueue->consumePreDispatchingEvent(&seq)) != NULL) {
+                jobject inputEventObj = android_view_KeyEvent_fromNative(
+                        code->env, keyEvent);
+                code->env->CallVoidMethod(code->clazz,
+                        gNativeActivityClassInfo.preDispatchKeyEvent, inputEventObj, seq);
+            }
+        } break;
+        case CMD_SET_WINDOW_FORMAT: {
+            code->env->CallVoidMethod(code->clazz,
+                    gNativeActivityClassInfo.setWindowFormat, work.arg1);
+        } break;
+        case CMD_SET_WINDOW_FLAGS: {
+            code->env->CallVoidMethod(code->clazz,
+                    gNativeActivityClassInfo.setWindowFlags, work.arg1, work.arg2);
+        } break;
+        case CMD_SHOW_SOFT_INPUT: {
+            code->env->CallVoidMethod(code->clazz,
+                    gNativeActivityClassInfo.showIme, work.arg1);
+        } break;
+        case CMD_HIDE_SOFT_INPUT: {
+            code->env->CallVoidMethod(code->clazz,
+                    gNativeActivityClassInfo.hideIme, work.arg1);
+        } break;
+        default:
+            LOGW("Unknown work command: %d", work.cmd);
+            break;
+    }
+    
+    return true;
+}
+
+// ------------------------------------------------------------------------
+
+static jint
+loadNativeCode_native(JNIEnv* env, jobject clazz, jstring path, jobject messageQueue,
+        jstring internalDataDir, jstring externalDataDir, int sdkVersion,
+        jobject jAssetMgr)
+{
+    LOG_TRACE("loadNativeCode_native");
+
+    const char* pathStr = env->GetStringUTFChars(path, NULL);
+    NativeCode* code = NULL;
+    
+    void* handle = dlopen(pathStr, RTLD_LAZY);
+    
+    env->ReleaseStringUTFChars(path, pathStr);
+    
+    if (handle != NULL) {
+        code = new NativeCode(handle, (ANativeActivity_createFunc*)
+                dlsym(handle, "ANativeActivity_onCreate"));
+        if (code->createActivityFunc == NULL) {
+            LOGW("ANativeActivity_onCreate not found");
+            delete code;
+            return 0;
+        }
+        
+        code->pollLoop = android_os_MessageQueue_getPollLoop(env, messageQueue);
+        if (code->pollLoop == NULL) {
+            LOGW("Unable to retrieve MessageQueue's PollLoop");
+            delete code;
+            return 0;
+        }
+        
+        int msgpipe[2];
+        if (pipe(msgpipe)) {
+            LOGW("could not create pipe: %s", strerror(errno));
+            delete code;
+            return 0;
+        }
+        code->mainWorkRead = msgpipe[0];
+        code->mainWorkWrite = msgpipe[1];
+        int result = fcntl(code->mainWorkRead, F_SETFL, O_NONBLOCK);
+        SLOGW_IF(result != 0, "Could not make main work read pipe "
+                "non-blocking: %s", strerror(errno));
+        result = fcntl(code->mainWorkWrite, F_SETFL, O_NONBLOCK);
+        SLOGW_IF(result != 0, "Could not make main work write pipe "
+                "non-blocking: %s", strerror(errno));
+        code->pollLoop->setCallback(code->mainWorkRead, POLLIN, mainWorkCallback, code);
+        
+        code->ANativeActivity::callbacks = &code->callbacks;
+        if (env->GetJavaVM(&code->vm) < 0) {
+            LOGW("NativeActivity GetJavaVM failed");
+            delete code;
+            return 0;
+        }
+        code->env = env;
+        code->clazz = env->NewGlobalRef(clazz);
+
+        const char* dirStr = env->GetStringUTFChars(internalDataDir, NULL);
+        code->internalDataPath = dirStr;
+        code->internalDataPath = code->internalDataPath.string();
+        env->ReleaseStringUTFChars(path, dirStr);
+    
+        dirStr = env->GetStringUTFChars(externalDataDir, NULL);
+        code->externalDataPath = dirStr;
+        code->externalDataPath = code->externalDataPath.string();
+        env->ReleaseStringUTFChars(path, dirStr);
+
+        code->sdkVersion = sdkVersion;
+        
+        code->assetManager = assetManagerForJavaObject(env, jAssetMgr);
+
+        code->createActivityFunc(code, NULL, 0);
+    }
+    
+    return (jint)code;
+}
+
+static void
+unloadNativeCode_native(JNIEnv* env, jobject clazz, jint handle)
+{
+    LOG_TRACE("unloadNativeCode_native");
+    if (handle != 0) {
+        NativeCode* code = (NativeCode*)handle;
+        delete code;
+    }
+}
+
+static void
+onStart_native(JNIEnv* env, jobject clazz, jint handle)
+{
+    LOG_TRACE("onStart_native");
+    if (handle != 0) {
+        NativeCode* code = (NativeCode*)handle;
+        if (code->callbacks.onStart != NULL) {
+            code->callbacks.onStart(code);
+        }
+    }
+}
+
+static void
+onResume_native(JNIEnv* env, jobject clazz, jint handle)
+{
+    LOG_TRACE("onResume_native");
+    if (handle != 0) {
+        NativeCode* code = (NativeCode*)handle;
+        if (code->callbacks.onResume != NULL) {
+            code->callbacks.onResume(code);
+        }
+    }
+}
+
+static void
+onSaveInstanceState_native(JNIEnv* env, jobject clazz, jint handle)
+{
+    LOG_TRACE("onSaveInstanceState_native");
+    if (handle != 0) {
+        NativeCode* code = (NativeCode*)handle;
+        if (code->callbacks.onSaveInstanceState != NULL) {
+            size_t len = 0;
+            code->callbacks.onSaveInstanceState(code, &len);
+        }
+    }
+}
+
+static void
+onPause_native(JNIEnv* env, jobject clazz, jint handle)
+{
+    LOG_TRACE("onPause_native");
+    if (handle != 0) {
+        NativeCode* code = (NativeCode*)handle;
+        if (code->callbacks.onPause != NULL) {
+            code->callbacks.onPause(code);
+        }
+    }
+}
+
+static void
+onStop_native(JNIEnv* env, jobject clazz, jint handle)
+{
+    LOG_TRACE("onStop_native");
+    if (handle != 0) {
+        NativeCode* code = (NativeCode*)handle;
+        if (code->callbacks.onStop != NULL) {
+            code->callbacks.onStop(code);
+        }
+    }
+}
+
+static void
+onLowMemory_native(JNIEnv* env, jobject clazz, jint handle)
+{
+    LOG_TRACE("onLowMemory_native");
+    if (handle != 0) {
+        NativeCode* code = (NativeCode*)handle;
+        if (code->callbacks.onLowMemory != NULL) {
+            code->callbacks.onLowMemory(code);
+        }
+    }
+}
+
+static void
+onWindowFocusChanged_native(JNIEnv* env, jobject clazz, jint handle, jboolean focused)
+{
+    LOG_TRACE("onWindowFocusChanged_native");
+    if (handle != 0) {
+        NativeCode* code = (NativeCode*)handle;
+        if (code->callbacks.onWindowFocusChanged != NULL) {
+            code->callbacks.onWindowFocusChanged(code, focused ? 1 : 0);
+        }
+    }
+}
+
+static void
+onSurfaceCreated_native(JNIEnv* env, jobject clazz, jint handle, jobject surface)
+{
+    LOG_TRACE("onSurfaceCreated_native");
+    if (handle != 0) {
+        NativeCode* code = (NativeCode*)handle;
+        code->setSurface(surface);
+        if (code->nativeWindow != NULL && code->callbacks.onNativeWindowCreated != NULL) {
+            code->callbacks.onNativeWindowCreated(code,
+                    code->nativeWindow.get());
+        }
+    }
+}
+
+static int32_t getWindowProp(ANativeWindow* window, int what) {
+    int value;
+    int res = window->query(window, what, &value);
+    return res < 0 ? res : value;
+}
+
+static void
+onSurfaceChanged_native(JNIEnv* env, jobject clazz, jint handle, jobject surface,
+        jint format, jint width, jint height)
+{
+    LOG_TRACE("onSurfaceChanged_native");
+    if (handle != 0) {
+        NativeCode* code = (NativeCode*)handle;
+        sp<ANativeWindow> oldNativeWindow = code->nativeWindow;
+        code->setSurface(surface);
+        if (oldNativeWindow != code->nativeWindow) {
+            if (oldNativeWindow != NULL && code->callbacks.onNativeWindowDestroyed != NULL) {
+                code->callbacks.onNativeWindowDestroyed(code,
+                        oldNativeWindow.get());
+            }
+            if (code->nativeWindow != NULL) {
+                if (code->callbacks.onNativeWindowCreated != NULL) {
+                    code->callbacks.onNativeWindowCreated(code,
+                            code->nativeWindow.get());
+                }
+                code->lastWindowWidth = getWindowProp(code->nativeWindow.get(),
+                        NATIVE_WINDOW_WIDTH);
+                code->lastWindowHeight = getWindowProp(code->nativeWindow.get(),
+                        NATIVE_WINDOW_HEIGHT);
+            }
+        } else {
+            // Maybe it resized?
+            int32_t newWidth = getWindowProp(code->nativeWindow.get(),
+                    NATIVE_WINDOW_WIDTH);
+            int32_t newHeight = getWindowProp(code->nativeWindow.get(),
+                    NATIVE_WINDOW_HEIGHT);
+            if (newWidth != code->lastWindowWidth
+                    || newHeight != code->lastWindowHeight) {
+                if (code->callbacks.onNativeWindowResized != NULL) {
+                    code->callbacks.onNativeWindowResized(code,
+                            code->nativeWindow.get());
+                }
+            }
+        }
+    }
+}
+
+static void
+onSurfaceRedrawNeeded_native(JNIEnv* env, jobject clazz, jint handle)
+{
+    LOG_TRACE("onSurfaceRedrawNeeded_native");
+    if (handle != 0) {
+        NativeCode* code = (NativeCode*)handle;
+        if (code->nativeWindow != NULL && code->callbacks.onNativeWindowRedrawNeeded != NULL) {
+            code->callbacks.onNativeWindowRedrawNeeded(code, code->nativeWindow.get());
+        }
+    }
+}
+
+static void
+onSurfaceDestroyed_native(JNIEnv* env, jobject clazz, jint handle, jobject surface)
+{
+    LOG_TRACE("onSurfaceDestroyed_native");
+    if (handle != 0) {
+        NativeCode* code = (NativeCode*)handle;
+        if (code->nativeWindow != NULL && code->callbacks.onNativeWindowDestroyed != NULL) {
+            code->callbacks.onNativeWindowDestroyed(code,
+                    code->nativeWindow.get());
+        }
+        code->setSurface(NULL);
+    }
+}
+
+static void
+onInputChannelCreated_native(JNIEnv* env, jobject clazz, jint handle, jobject channel)
+{
+    LOG_TRACE("onInputChannelCreated_native");
+    if (handle != 0) {
+        NativeCode* code = (NativeCode*)handle;
+        status_t err = code->setInputChannel(channel);
+        if (err != OK) {
+            jniThrowException(env, "java/lang/IllegalStateException",
+                    "Error setting input channel");
+            return;
+        }
+        if (code->callbacks.onInputQueueCreated != NULL) {
+            code->callbacks.onInputQueueCreated(code,
+                    code->nativeInputQueue);
+        }
+    }
+}
+
+static void
+onInputChannelDestroyed_native(JNIEnv* env, jobject clazz, jint handle, jobject channel)
+{
+    LOG_TRACE("onInputChannelDestroyed_native");
+    if (handle != 0) {
+        NativeCode* code = (NativeCode*)handle;
+        if (code->nativeInputQueue != NULL
+                && code->callbacks.onInputQueueDestroyed != NULL) {
+            code->callbacks.onInputQueueDestroyed(code,
+                    code->nativeInputQueue);
+        }
+        code->setInputChannel(NULL);
+    }
+}
+
+static void
+onContentRectChanged_native(JNIEnv* env, jobject clazz, jint handle,
+        jint x, jint y, jint w, jint h)
+{
+    LOG_TRACE("onContentRectChanged_native");
+    if (handle != 0) {
+        NativeCode* code = (NativeCode*)handle;
+        if (code->callbacks.onContentRectChanged != NULL) {
+            ARect rect;
+            rect.left = x;
+            rect.top = y;
+            rect.right = x+w;
+            rect.bottom = y+h;
+            code->callbacks.onContentRectChanged(code, &rect);
+        }
+    }
+}
+
+static void
+dispatchKeyEvent_native(JNIEnv* env, jobject clazz, jint handle, jobject eventObj)
+{
+    LOG_TRACE("dispatchKeyEvent_native");
+    if (handle != 0) {
+        NativeCode* code = (NativeCode*)handle;
+        if (code->nativeInputQueue != NULL) {
+            KeyEvent* event = code->nativeInputQueue->createKeyEvent();
+            android_view_KeyEvent_toNative(env, eventObj, event);
+            code->nativeInputQueue->dispatchEvent(event);
+        }
+    }
+}
+
+static void
+finishPreDispatchKeyEvent_native(JNIEnv* env, jobject clazz, jint handle,
+        jint seq, jboolean handled)
+{
+    LOG_TRACE("finishPreDispatchKeyEvent_native");
+    if (handle != 0) {
+        NativeCode* code = (NativeCode*)handle;
+        if (code->nativeInputQueue != NULL) {
+            code->nativeInputQueue->finishPreDispatch(seq, handled ? true : false);
+        }
+    }
+}
+
+static const JNINativeMethod g_methods[] = {
+    { "loadNativeCode", "(Ljava/lang/String;Landroid/os/MessageQueue;Ljava/lang/String;Ljava/lang/String;ILandroid/content/res/AssetManager;)I",
+            (void*)loadNativeCode_native },
+    { "unloadNativeCode", "(I)V", (void*)unloadNativeCode_native },
+    { "onStartNative", "(I)V", (void*)onStart_native },
+    { "onResumeNative", "(I)V", (void*)onResume_native },
+    { "onSaveInstanceStateNative", "(I)V", (void*)onSaveInstanceState_native },
+    { "onPauseNative", "(I)V", (void*)onPause_native },
+    { "onStopNative", "(I)V", (void*)onStop_native },
+    { "onLowMemoryNative", "(I)V", (void*)onLowMemory_native },
+    { "onWindowFocusChangedNative", "(IZ)V", (void*)onWindowFocusChanged_native },
+    { "onSurfaceCreatedNative", "(ILandroid/view/Surface;)V", (void*)onSurfaceCreated_native },
+    { "onSurfaceChangedNative", "(ILandroid/view/Surface;III)V", (void*)onSurfaceChanged_native },
+    { "onSurfaceRedrawNeededNative", "(ILandroid/view/Surface;)V", (void*)onSurfaceRedrawNeeded_native },
+    { "onSurfaceDestroyedNative", "(I)V", (void*)onSurfaceDestroyed_native },
+    { "onInputChannelCreatedNative", "(ILandroid/view/InputChannel;)V", (void*)onInputChannelCreated_native },
+    { "onInputChannelDestroyedNative", "(ILandroid/view/InputChannel;)V", (void*)onInputChannelDestroyed_native },
+    { "onContentRectChangedNative", "(IIIII)V", (void*)onContentRectChanged_native },
+    { "dispatchKeyEventNative", "(ILandroid/view/KeyEvent;)V", (void*)dispatchKeyEvent_native },
+    { "finishPreDispatchKeyEventNative", "(IIZ)V", (void*)finishPreDispatchKeyEvent_native },
+};
+
+static const char* const kNativeActivityPathName = "android/app/NativeActivity";
+
+#define FIND_CLASS(var, className) \
+        var = env->FindClass(className); \
+        LOG_FATAL_IF(! var, "Unable to find class " className); \
+        var = jclass(env->NewGlobalRef(var));
+
+#define GET_METHOD_ID(var, clazz, methodName, fieldDescriptor) \
+        var = env->GetMethodID(clazz, methodName, fieldDescriptor); \
+        LOG_FATAL_IF(! var, "Unable to find method" methodName);
+        
+int register_android_app_NativeActivity(JNIEnv* env)
+{
+    //LOGD("register_android_app_NativeActivity");
+
+    FIND_CLASS(gNativeActivityClassInfo.clazz, kNativeActivityPathName);
+    
+    GET_METHOD_ID(gNativeActivityClassInfo.dispatchUnhandledKeyEvent,
+            gNativeActivityClassInfo.clazz,
+            "dispatchUnhandledKeyEvent", "(Landroid/view/KeyEvent;)V");
+    GET_METHOD_ID(gNativeActivityClassInfo.preDispatchKeyEvent,
+            gNativeActivityClassInfo.clazz,
+            "preDispatchKeyEvent", "(Landroid/view/KeyEvent;I)V");
+
+    GET_METHOD_ID(gNativeActivityClassInfo.setWindowFlags,
+            gNativeActivityClassInfo.clazz,
+            "setWindowFlags", "(II)V");
+    GET_METHOD_ID(gNativeActivityClassInfo.setWindowFormat,
+            gNativeActivityClassInfo.clazz,
+            "setWindowFormat", "(I)V");
+    GET_METHOD_ID(gNativeActivityClassInfo.showIme,
+            gNativeActivityClassInfo.clazz,
+            "showIme", "(I)V");
+    GET_METHOD_ID(gNativeActivityClassInfo.hideIme,
+            gNativeActivityClassInfo.clazz,
+            "hideIme", "(I)V");
+
+    return AndroidRuntime::registerNativeMethods(
+        env, kNativeActivityPathName,
+        g_methods, NELEM(g_methods));
+}
+
+} // namespace android
diff --git a/core/jni/android_bluetooth_HeadsetBase.cpp b/core/jni/android_bluetooth_HeadsetBase.cpp
index 3f14c3a..4e9fbaf 100644
--- a/core/jni/android_bluetooth_HeadsetBase.cpp
+++ b/core/jni/android_bluetooth_HeadsetBase.cpp
@@ -169,7 +169,7 @@
     // never receive non-ASCII UTF-8).
     // This was added because of the BMW 2005 E46 which sends binary junk.
     if (is_ascii(buf)) {
-        IF_LOGV() LOG(LOG_VERBOSE, "Bluetooth AT recv", buf);
+        IF_LOGV() LOG(LOG_VERBOSE, "Bluetooth AT recv", "%s", buf);
     } else {
         LOGW("Ignoring invalid AT command: %s", buf);
         buf[0] = NULL;
@@ -494,7 +494,7 @@
             }
         }
     }
-    IF_LOGV() LOG(LOG_VERBOSE, "Bluetooth AT sent", buf);
+    IF_LOGV() LOG(LOG_VERBOSE, "Bluetooth AT sent", "%s", buf);
 
     free(buf);
 }
diff --git a/core/jni/android_bluetooth_common.cpp b/core/jni/android_bluetooth_common.cpp
index 343fa53..9a8f1b8 100644
--- a/core/jni/android_bluetooth_common.cpp
+++ b/core/jni/android_bluetooth_common.cpp
@@ -65,6 +65,7 @@
     {"PairableTimeout", DBUS_TYPE_UINT32},
     {"Discovering", DBUS_TYPE_BOOLEAN},
     {"Devices", DBUS_TYPE_ARRAY},
+    {"UUIDs", DBUS_TYPE_ARRAY},
 };
 
 typedef union {
diff --git a/core/jni/android_content_res_ObbScanner.cpp b/core/jni/android_content_res_ObbScanner.cpp
new file mode 100644
index 0000000..1239274
--- /dev/null
+++ b/core/jni/android_content_res_ObbScanner.cpp
@@ -0,0 +1,94 @@
+/*
+ * Copyright 2010, The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#define LOG_TAG "ObbScanner"
+
+#include <utils/Log.h>
+#include <utils/String8.h>
+#include <utils/ObbFile.h>
+
+#include "jni.h"
+#include "utils/misc.h"
+#include "android_runtime/AndroidRuntime.h"
+
+namespace android {
+
+static struct {
+    jclass clazz;
+
+    jfieldID packageName;
+    jfieldID version;
+} gObbInfoClassInfo;
+
+static jboolean android_content_res_ObbScanner_getObbInfo(JNIEnv* env, jobject clazz, jstring file,
+        jobject obbInfo)
+{
+    const char* filePath = env->GetStringUTFChars(file, JNI_FALSE);
+
+    sp<ObbFile> obb = new ObbFile();
+    if (!obb->readFrom(filePath)) {
+        env->ReleaseStringUTFChars(file, filePath);
+        return JNI_FALSE;
+    }
+
+    env->ReleaseStringUTFChars(file, filePath);
+
+    const char* packageNameStr = obb->getPackageName().string();
+
+    jstring packageName = env->NewStringUTF(packageNameStr);
+    if (packageName == NULL) {
+        return JNI_FALSE;
+    }
+
+    env->SetObjectField(obbInfo, gObbInfoClassInfo.packageName, packageName);
+    env->SetIntField(obbInfo, gObbInfoClassInfo.version, obb->getVersion());
+
+    return JNI_TRUE;
+}
+
+/*
+ * JNI registration.
+ */
+static JNINativeMethod gMethods[] = {
+    /* name, signature, funcPtr */
+    { "getObbInfo_native", "(Ljava/lang/String;Landroid/content/res/ObbInfo;)Z",
+            (void*) android_content_res_ObbScanner_getObbInfo },
+};
+
+#define FIND_CLASS(var, className) \
+        var = env->FindClass(className); \
+        LOG_FATAL_IF(! var, "Unable to find class " className); \
+        var = jclass(env->NewGlobalRef(var));
+
+#define GET_FIELD_ID(var, clazz, fieldName, fieldDescriptor) \
+        var = env->GetFieldID(clazz, fieldName, fieldDescriptor); \
+        LOG_FATAL_IF(! var, "Unable to find field " fieldName);
+
+int register_android_content_res_ObbScanner(JNIEnv* env)
+{
+    FIND_CLASS(gObbInfoClassInfo.clazz, "android/content/res/ObbInfo");
+
+    GET_FIELD_ID(gObbInfoClassInfo.packageName, gObbInfoClassInfo.clazz,
+            "packageName", "Ljava/lang/String;");
+    GET_FIELD_ID(gObbInfoClassInfo.version, gObbInfoClassInfo.clazz,
+            "version", "I");
+
+    return AndroidRuntime::registerNativeMethods(env, "android/content/res/ObbScanner", gMethods,
+            NELEM(gMethods));
+}
+
+}; // namespace android
+
diff --git a/core/jni/android_hardware_Camera.cpp b/core/jni/android_hardware_Camera.cpp
index b85466b..c784974 100644
--- a/core/jni/android_hardware_Camera.cpp
+++ b/core/jni/android_hardware_Camera.cpp
@@ -34,6 +34,8 @@
 struct fields_t {
     jfieldID    context;
     jfieldID    surface;
+    jfieldID    facing;
+    jfieldID    orientation;
     jmethodID   post_event;
 };
 
@@ -288,10 +290,30 @@
     }
 }
 
-// connect to camera service
-static void android_hardware_Camera_native_setup(JNIEnv *env, jobject thiz, jobject weak_this)
+static jint android_hardware_Camera_getNumberOfCameras(JNIEnv *env, jobject thiz)
 {
-    sp<Camera> camera = Camera::connect();
+    return Camera::getNumberOfCameras();
+}
+
+static void android_hardware_Camera_getCameraInfo(JNIEnv *env, jobject thiz,
+    jint cameraId, jobject info_obj)
+{
+    CameraInfo cameraInfo;
+    status_t rc = Camera::getCameraInfo(cameraId, &cameraInfo);
+    if (rc != NO_ERROR) {
+        jniThrowException(env, "java/lang/RuntimeException",
+                          "Fail to get camera info");
+        return;
+    }
+    env->SetIntField(info_obj, fields.facing, cameraInfo.facing);
+    env->SetIntField(info_obj, fields.orientation, cameraInfo.orientation);
+}
+
+// connect to camera service
+static void android_hardware_Camera_native_setup(JNIEnv *env, jobject thiz,
+    jobject weak_this, jint cameraId)
+{
+    sp<Camera> camera = Camera::connect(cameraId);
 
     if (camera == NULL) {
         jniThrowException(env, "java/lang/RuntimeException",
@@ -566,8 +588,14 @@
 //-------------------------------------------------
 
 static JNINativeMethod camMethods[] = {
+  { "getNumberOfCameras",
+    "()I",
+    (void *)android_hardware_Camera_getNumberOfCameras },
+  { "getCameraInfo",
+    "(ILandroid/hardware/Camera$CameraInfo;)V",
+    (void*)android_hardware_Camera_getCameraInfo },
   { "native_setup",
-    "(Ljava/lang/Object;)V",
+    "(Ljava/lang/Object;I)V",
     (void*)android_hardware_Camera_native_setup },
   { "native_release",
     "()V",
@@ -659,7 +687,9 @@
 {
     field fields_to_find[] = {
         { "android/hardware/Camera", "mNativeContext",   "I", &fields.context },
-        { "android/view/Surface",    "mSurface",         "I", &fields.surface }
+        { "android/view/Surface",    ANDROID_VIEW_SURFACE_JNI_ID, "I", &fields.surface },
+        { "android/hardware/Camera$CameraInfo", "mFacing",   "I", &fields.facing },
+        { "android/hardware/Camera$CameraInfo", "mOrientation",   "I", &fields.orientation },
     };
 
     if (find_fields(env, fields_to_find, NELEM(fields_to_find)) < 0)
diff --git a/core/jni/android_location_GpsLocationProvider.cpp b/core/jni/android_location_GpsLocationProvider.cpp
deleted file mode 100755
index f60fe6d..0000000
--- a/core/jni/android_location_GpsLocationProvider.cpp
+++ /dev/null
@@ -1,542 +0,0 @@
-/*
- * Copyright (C) 2008 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#define LOG_TAG "GpsLocationProvider"
-
-//#define LOG_NDDEBUG 0
-
-#include "JNIHelp.h"
-#include "jni.h"
-#include "hardware_legacy/gps.h"
-#include "hardware_legacy/gps_ni.h"
-#include "utils/Log.h"
-#include "utils/misc.h"
-
-#include <string.h>
-#include <pthread.h>
-
-static pthread_mutex_t sEventMutex = PTHREAD_MUTEX_INITIALIZER;
-static pthread_cond_t sEventCond = PTHREAD_COND_INITIALIZER;
-static jmethodID method_reportLocation;
-static jmethodID method_reportStatus;
-static jmethodID method_reportSvStatus;
-static jmethodID method_reportAGpsStatus;
-static jmethodID method_reportNmea;
-static jmethodID method_xtraDownloadRequest;
-static jmethodID method_reportNiNotification;
-
-static const GpsInterface* sGpsInterface = NULL;
-static const GpsXtraInterface* sGpsXtraInterface = NULL;
-static const AGpsInterface* sAGpsInterface = NULL;
-static const GpsPrivacyInterface* sGpsPrivacyInterface = NULL;
-static const GpsNiInterface* sGpsNiInterface = NULL;
-static const GpsDebugInterface* sGpsDebugInterface = NULL;
-
-// data written to by GPS callbacks
-static GpsLocation  sGpsLocation;
-static GpsStatus    sGpsStatus;
-static GpsSvStatus  sGpsSvStatus;
-static AGpsStatus   sAGpsStatus;
-static GpsNiNotification  sGpsNiNotification;
-
-// buffer for NMEA data
-#define NMEA_SENTENCE_LENGTH    100
-#define NMEA_SENTENCE_COUNT     40
-struct NmeaSentence {
-    GpsUtcTime  timestamp;
-    char        nmea[NMEA_SENTENCE_LENGTH];
-};
-static NmeaSentence sNmeaBuffer[NMEA_SENTENCE_COUNT];
-static int mNmeaSentenceCount = 0;
-
-// a copy of the data shared by android_location_GpsLocationProvider_wait_for_event
-// and android_location_GpsLocationProvider_read_status
-static GpsLocation  sGpsLocationCopy;
-static GpsStatus    sGpsStatusCopy;
-static GpsSvStatus  sGpsSvStatusCopy;
-static AGpsStatus   sAGpsStatusCopy;
-static NmeaSentence sNmeaBufferCopy[NMEA_SENTENCE_COUNT];
-static GpsNiNotification  sGpsNiNotificationCopy;
-
-enum CallbackType {
-    kLocation = 1,
-    kStatus = 2,
-    kSvStatus = 4,
-    kAGpsStatus = 8,
-    kXtraDownloadRequest = 16,
-    kDisableRequest = 32,
-    kNmeaAvailable = 64,
-    kNiNotification = 128,
-}; 
-static int sPendingCallbacks;
-
-namespace android {
-
-static void location_callback(GpsLocation* location)
-{
-    pthread_mutex_lock(&sEventMutex);
-
-    sPendingCallbacks |= kLocation;
-    memcpy(&sGpsLocation, location, sizeof(sGpsLocation));
-
-    pthread_cond_signal(&sEventCond);
-    pthread_mutex_unlock(&sEventMutex);
-}
-
-static void status_callback(GpsStatus* status)
-{
-    pthread_mutex_lock(&sEventMutex);
-
-    sPendingCallbacks |= kStatus;
-    memcpy(&sGpsStatus, status, sizeof(sGpsStatus));
-
-    pthread_cond_signal(&sEventCond);
-    pthread_mutex_unlock(&sEventMutex);
-}
-
-static void sv_status_callback(GpsSvStatus* sv_status)
-{
-    pthread_mutex_lock(&sEventMutex);
-
-    sPendingCallbacks |= kSvStatus;
-    memcpy(&sGpsSvStatus, sv_status, sizeof(GpsSvStatus));
-
-    pthread_cond_signal(&sEventCond);
-    pthread_mutex_unlock(&sEventMutex);
-}
-
-static void nmea_callback(GpsUtcTime timestamp, const char* nmea, int length)
-{
-    pthread_mutex_lock(&sEventMutex);
-
-    if (length >= NMEA_SENTENCE_LENGTH) {
-        LOGE("NMEA data too long in nmea_callback (length = %d)\n", length);
-        length = NMEA_SENTENCE_LENGTH - 1;
-    }
-    if (mNmeaSentenceCount >= NMEA_SENTENCE_COUNT) {
-        LOGE("NMEA data overflowed buffer\n");
-        pthread_mutex_unlock(&sEventMutex);
-        return;
-    }
-
-    sPendingCallbacks |= kNmeaAvailable;
-    sNmeaBuffer[mNmeaSentenceCount].timestamp = timestamp;
-    memcpy(sNmeaBuffer[mNmeaSentenceCount].nmea, nmea, length);
-    sNmeaBuffer[mNmeaSentenceCount].nmea[length] = 0;
-    mNmeaSentenceCount++;
-
-    pthread_cond_signal(&sEventCond);
-    pthread_mutex_unlock(&sEventMutex);
-}
-
-static void agps_status_callback(AGpsStatus* agps_status)
-{
-    pthread_mutex_lock(&sEventMutex);
-
-    sPendingCallbacks |= kAGpsStatus;
-    memcpy(&sAGpsStatus, agps_status, sizeof(AGpsStatus));
-
-    pthread_cond_signal(&sEventCond);
-    pthread_mutex_unlock(&sEventMutex);
-}
-
-GpsCallbacks sGpsCallbacks = {
-    location_callback,
-    status_callback,
-    sv_status_callback,
-    nmea_callback
-};
-
-static void
-download_request_callback()
-{
-    pthread_mutex_lock(&sEventMutex);
-    sPendingCallbacks |= kXtraDownloadRequest;
-    pthread_cond_signal(&sEventCond);
-    pthread_mutex_unlock(&sEventMutex);
-}
-
-static void
-gps_ni_notify_callback(GpsNiNotification *notification)
-{
-   LOGD("gps_ni_notify_callback: notif=%d", notification->notification_id);
-
-   pthread_mutex_lock(&sEventMutex);
-
-   sPendingCallbacks |= kNiNotification;
-   memcpy(&sGpsNiNotification, notification, sizeof(GpsNiNotification));
-
-   pthread_cond_signal(&sEventCond);
-   pthread_mutex_unlock(&sEventMutex);
-}
-
-GpsXtraCallbacks sGpsXtraCallbacks = {
-    download_request_callback,
-};
-
-AGpsCallbacks sAGpsCallbacks = {
-    agps_status_callback,
-};
-
-GpsNiCallbacks sGpsNiCallbacks = {
-    gps_ni_notify_callback,
-};
-
-static void android_location_GpsLocationProvider_class_init_native(JNIEnv* env, jclass clazz) {
-    method_reportLocation = env->GetMethodID(clazz, "reportLocation", "(IDDDFFFJ)V");
-    method_reportStatus = env->GetMethodID(clazz, "reportStatus", "(I)V");
-    method_reportSvStatus = env->GetMethodID(clazz, "reportSvStatus", "()V");
-    method_reportAGpsStatus = env->GetMethodID(clazz, "reportAGpsStatus", "(II)V");
-    method_reportNmea = env->GetMethodID(clazz, "reportNmea", "(IJ)V");
-    method_xtraDownloadRequest = env->GetMethodID(clazz, "xtraDownloadRequest", "()V");
-    method_reportNiNotification = env->GetMethodID(clazz, "reportNiNotification", "(IIIIILjava/lang/String;Ljava/lang/String;IILjava/lang/String;)V");
-}
-
-static jboolean android_location_GpsLocationProvider_is_supported(JNIEnv* env, jclass clazz) {
-    if (!sGpsInterface)
-        sGpsInterface = gps_get_interface();
-    return (sGpsInterface != NULL);
-}
-
-static jboolean android_location_GpsLocationProvider_init(JNIEnv* env, jobject obj)
-{
-    if (!sGpsInterface)
-        sGpsInterface = gps_get_interface();
-    if (!sGpsInterface || sGpsInterface->init(&sGpsCallbacks) != 0)
-        return false;
-
-    if (!sAGpsInterface)
-        sAGpsInterface = (const AGpsInterface*)sGpsInterface->get_extension(AGPS_INTERFACE);
-    if (sAGpsInterface)
-        sAGpsInterface->init(&sAGpsCallbacks);
-
-    if (!sGpsNiInterface)
-        sGpsNiInterface = (const GpsNiInterface*)sGpsInterface->get_extension(GPS_NI_INTERFACE);
-    if (sGpsNiInterface)
-        sGpsNiInterface->init(&sGpsNiCallbacks);
-
-    // Clear privacy lock while enabled
-    if (!sGpsPrivacyInterface)
-        sGpsPrivacyInterface = (const GpsPrivacyInterface*)sGpsInterface->get_extension(GPS_PRIVACY_INTERFACE);
-    if (sGpsPrivacyInterface)
-        sGpsPrivacyInterface->set_privacy_lock(0);
-
-    if (!sGpsDebugInterface)
-       sGpsDebugInterface = (const GpsDebugInterface*)sGpsInterface->get_extension(GPS_DEBUG_INTERFACE);
-
-    return true;
-}
-
-static void android_location_GpsLocationProvider_disable(JNIEnv* env, jobject obj)
-{
-    // Enable privacy lock while disabled
-    if (!sGpsPrivacyInterface)
-        sGpsPrivacyInterface = (const GpsPrivacyInterface*)sGpsInterface->get_extension(GPS_PRIVACY_INTERFACE);
-    if (sGpsPrivacyInterface)
-        sGpsPrivacyInterface->set_privacy_lock(1);
-
-    pthread_mutex_lock(&sEventMutex);
-    sPendingCallbacks |= kDisableRequest;
-    pthread_cond_signal(&sEventCond);
-    pthread_mutex_unlock(&sEventMutex);
-}
-
-static void android_location_GpsLocationProvider_cleanup(JNIEnv* env, jobject obj)
-{
-    sGpsInterface->cleanup();
-}
-
-static jboolean android_location_GpsLocationProvider_start(JNIEnv* env, jobject obj, jint positionMode,
-        jboolean singleFix, jint fixFrequency)
-{
-    int result = sGpsInterface->set_position_mode(positionMode, (singleFix ? 0 : fixFrequency));
-    if (result) {
-        return false;
-    }
-
-    return (sGpsInterface->start() == 0);
-}
-
-static jboolean android_location_GpsLocationProvider_stop(JNIEnv* env, jobject obj)
-{
-    return (sGpsInterface->stop() == 0);
-}
-
-static void android_location_GpsLocationProvider_delete_aiding_data(JNIEnv* env, jobject obj, jint flags)
-{
-    sGpsInterface->delete_aiding_data(flags);
-}
-
-static void android_location_GpsLocationProvider_wait_for_event(JNIEnv* env, jobject obj)
-{
-    pthread_mutex_lock(&sEventMutex);
-    while (sPendingCallbacks == 0) {
-        pthread_cond_wait(&sEventCond, &sEventMutex);
-    }
-
-    // copy and clear the callback flags
-    int pendingCallbacks = sPendingCallbacks;
-    sPendingCallbacks = 0;
-    int nmeaSentenceCount = mNmeaSentenceCount;
-    mNmeaSentenceCount = 0;
-    
-    // copy everything and unlock the mutex before calling into Java code to avoid the possibility
-    // of timeouts in the GPS engine.
-    if (pendingCallbacks & kLocation)
-        memcpy(&sGpsLocationCopy, &sGpsLocation, sizeof(sGpsLocationCopy));
-    if (pendingCallbacks & kStatus)
-        memcpy(&sGpsStatusCopy, &sGpsStatus, sizeof(sGpsStatusCopy));
-    if (pendingCallbacks & kSvStatus)
-        memcpy(&sGpsSvStatusCopy, &sGpsSvStatus, sizeof(sGpsSvStatusCopy));
-    if (pendingCallbacks & kAGpsStatus)
-        memcpy(&sAGpsStatusCopy, &sAGpsStatus, sizeof(sAGpsStatusCopy));
-    if (pendingCallbacks & kNmeaAvailable)
-        memcpy(&sNmeaBufferCopy, &sNmeaBuffer, nmeaSentenceCount * sizeof(sNmeaBuffer[0]));
-    if (pendingCallbacks & kNiNotification)
-        memcpy(&sGpsNiNotificationCopy, &sGpsNiNotification, sizeof(sGpsNiNotificationCopy));
-    pthread_mutex_unlock(&sEventMutex);   
-
-    if (pendingCallbacks & kLocation) {
-        env->CallVoidMethod(obj, method_reportLocation, sGpsLocationCopy.flags,
-                (jdouble)sGpsLocationCopy.latitude, (jdouble)sGpsLocationCopy.longitude,
-                (jdouble)sGpsLocationCopy.altitude,
-                (jfloat)sGpsLocationCopy.speed, (jfloat)sGpsLocationCopy.bearing,
-                (jfloat)sGpsLocationCopy.accuracy, (jlong)sGpsLocationCopy.timestamp);
-    }
-    if (pendingCallbacks & kStatus) {
-        env->CallVoidMethod(obj, method_reportStatus, sGpsStatusCopy.status);
-    }
-    if (pendingCallbacks & kSvStatus) {
-        env->CallVoidMethod(obj, method_reportSvStatus);
-    }
-    if (pendingCallbacks & kAGpsStatus) {
-        env->CallVoidMethod(obj, method_reportAGpsStatus, sAGpsStatusCopy.type, sAGpsStatusCopy.status);
-    }  
-    if (pendingCallbacks & kNmeaAvailable) {
-        for (int i = 0; i < nmeaSentenceCount; i++) {
-            env->CallVoidMethod(obj, method_reportNmea, i, sNmeaBuffer[i].timestamp);
-        }
-    }
-    if (pendingCallbacks & kXtraDownloadRequest) {
-        env->CallVoidMethod(obj, method_xtraDownloadRequest);
-    }
-    if (pendingCallbacks & kDisableRequest) {
-        // don't need to do anything - we are just poking so wait_for_event will return.
-    }
-    if (pendingCallbacks & kNiNotification) {
-       LOGD("android_location_GpsLocationProvider_wait_for_event: sent notification callback.");
-       jstring reqId = env->NewStringUTF(sGpsNiNotificationCopy.requestor_id);
-       jstring text = env->NewStringUTF(sGpsNiNotificationCopy.text);
-       jstring extras = env->NewStringUTF(sGpsNiNotificationCopy.extras);
-       env->CallVoidMethod(obj, method_reportNiNotification,
-             sGpsNiNotificationCopy.notification_id,
-             sGpsNiNotificationCopy.ni_type,
-             sGpsNiNotificationCopy.notify_flags,
-             sGpsNiNotificationCopy.timeout,
-             sGpsNiNotificationCopy.default_response,
-             reqId,
-             text,
-             sGpsNiNotificationCopy.requestor_id_encoding,
-             sGpsNiNotificationCopy.text_encoding,
-             extras
-       );
-    }
-}
-
-static jint android_location_GpsLocationProvider_read_sv_status(JNIEnv* env, jobject obj,
-        jintArray prnArray, jfloatArray snrArray, jfloatArray elevArray, jfloatArray azumArray,
-        jintArray maskArray)
-{
-    // this should only be called from within a call to reportStatus, so we don't need to lock here
-
-    jint* prns = env->GetIntArrayElements(prnArray, 0);
-    jfloat* snrs = env->GetFloatArrayElements(snrArray, 0);
-    jfloat* elev = env->GetFloatArrayElements(elevArray, 0);
-    jfloat* azim = env->GetFloatArrayElements(azumArray, 0);
-    jint* mask = env->GetIntArrayElements(maskArray, 0);
-
-    int num_svs = sGpsSvStatusCopy.num_svs;
-    for (int i = 0; i < num_svs; i++) {
-        prns[i] = sGpsSvStatusCopy.sv_list[i].prn;
-        snrs[i] = sGpsSvStatusCopy.sv_list[i].snr;
-        elev[i] = sGpsSvStatusCopy.sv_list[i].elevation;
-        azim[i] = sGpsSvStatusCopy.sv_list[i].azimuth;
-    }
-    mask[0] = sGpsSvStatusCopy.ephemeris_mask;
-    mask[1] = sGpsSvStatusCopy.almanac_mask;
-    mask[2] = sGpsSvStatusCopy.used_in_fix_mask;
-
-    env->ReleaseIntArrayElements(prnArray, prns, 0);
-    env->ReleaseFloatArrayElements(snrArray, snrs, 0);
-    env->ReleaseFloatArrayElements(elevArray, elev, 0);
-    env->ReleaseFloatArrayElements(azumArray, azim, 0);
-    env->ReleaseIntArrayElements(maskArray, mask, 0);
-    return num_svs;
-}
-
-static jint android_location_GpsLocationProvider_read_nmea(JNIEnv* env, jobject obj, jint index, jbyteArray nmeaArray, jint buffer_size)
-{
-    // this should only be called from within a call to reportNmea, so we don't need to lock here
-
-    jbyte* nmea = env->GetByteArrayElements(nmeaArray, 0);
-
-    int length = strlen(sNmeaBufferCopy[index].nmea);
-    if (length > buffer_size)
-        length = buffer_size;
-    memcpy(nmea, sNmeaBufferCopy[index].nmea, length);
-
-    env->ReleaseByteArrayElements(nmeaArray, nmea, 0);
-    return length;
-}
-
-static void android_location_GpsLocationProvider_inject_time(JNIEnv* env, jobject obj, jlong time, 
-        jlong timeReference, jint uncertainty)
-{
-    sGpsInterface->inject_time(time, timeReference, uncertainty);
-}
-
-static void android_location_GpsLocationProvider_inject_location(JNIEnv* env, jobject obj,
-        jdouble latitude, jdouble longitude, jfloat accuracy)
-{
-    sGpsInterface->inject_location(latitude, longitude, accuracy);
-}
-
-static jboolean android_location_GpsLocationProvider_supports_xtra(JNIEnv* env, jobject obj)
-{
-    if (!sGpsXtraInterface) {
-        sGpsXtraInterface = (const GpsXtraInterface*)sGpsInterface->get_extension(GPS_XTRA_INTERFACE);
-        if (sGpsXtraInterface) {
-            int result = sGpsXtraInterface->init(&sGpsXtraCallbacks);
-            if (result) {
-                sGpsXtraInterface = NULL;
-            }
-        }
-    }
-
-    return (sGpsXtraInterface != NULL);
-}
-
-static void android_location_GpsLocationProvider_inject_xtra_data(JNIEnv* env, jobject obj,
-        jbyteArray data, jint length)
-{
-    jbyte* bytes = env->GetByteArrayElements(data, 0);
-    sGpsXtraInterface->inject_xtra_data((char *)bytes, length);
-    env->ReleaseByteArrayElements(data, bytes, 0);
-}
-
-static void android_location_GpsLocationProvider_agps_data_conn_open(JNIEnv* env, jobject obj, jstring apn)
-{
-    if (!sAGpsInterface) {
-        sAGpsInterface = (const AGpsInterface*)sGpsInterface->get_extension(AGPS_INTERFACE);
-    }
-    if (sAGpsInterface) {
-        if (apn == NULL) {
-            jniThrowException(env, "java/lang/IllegalArgumentException", NULL);
-            return;
-        }
-        const char *apnStr = env->GetStringUTFChars(apn, NULL);
-        sAGpsInterface->data_conn_open(apnStr);
-        env->ReleaseStringUTFChars(apn, apnStr);
-    }
-}
-
-static void android_location_GpsLocationProvider_agps_data_conn_closed(JNIEnv* env, jobject obj)
-{
-    if (!sAGpsInterface) {
-        sAGpsInterface = (const AGpsInterface*)sGpsInterface->get_extension(AGPS_INTERFACE);
-    }
-    if (sAGpsInterface) {
-        sAGpsInterface->data_conn_closed();
-    }
-}
-
-static void android_location_GpsLocationProvider_agps_data_conn_failed(JNIEnv* env, jobject obj)
-{
-    if (!sAGpsInterface) {
-        sAGpsInterface = (const AGpsInterface*)sGpsInterface->get_extension(AGPS_INTERFACE);
-    }
-    if (sAGpsInterface) {
-        sAGpsInterface->data_conn_failed();
-    }
-}
-
-static void android_location_GpsLocationProvider_set_agps_server(JNIEnv* env, jobject obj,
-        jint type, jstring hostname, jint port)
-{
-    if (!sAGpsInterface) {
-        sAGpsInterface = (const AGpsInterface*)sGpsInterface->get_extension(AGPS_INTERFACE);
-    }
-    if (sAGpsInterface) {
-        const char *c_hostname = env->GetStringUTFChars(hostname, NULL);
-        sAGpsInterface->set_server(type, c_hostname, port);
-        env->ReleaseStringUTFChars(hostname, c_hostname);
-    }
-}
-
-static void android_location_GpsLocationProvider_send_ni_response(JNIEnv* env, jobject obj,
-      jint notifId, jint response)
-{
-    if (!sGpsNiInterface)
-        sGpsNiInterface = (const GpsNiInterface*)sGpsInterface->get_extension(GPS_NI_INTERFACE);
-    if (sGpsNiInterface)
-        sGpsNiInterface->respond(notifId, response);
-}
-
-static jstring android_location_GpsLocationProvider_get_internal_state(JNIEnv* env, jobject obj)
-{
-    jstring result = NULL;
-    if (sGpsDebugInterface) {
-        const size_t maxLength = 2047;
-        char buffer[maxLength+1];
-        size_t length = sGpsDebugInterface->get_internal_state(buffer, maxLength);
-        if (length > maxLength) length = maxLength;
-        buffer[length] = 0;
-        result = env->NewStringUTF(buffer);
-    }
-    return result;
-}
-
-static JNINativeMethod sMethods[] = {
-     /* name, signature, funcPtr */
-    {"class_init_native", "()V", (void *)android_location_GpsLocationProvider_class_init_native},
-    {"native_is_supported", "()Z", (void*)android_location_GpsLocationProvider_is_supported},
-    {"native_init", "()Z", (void*)android_location_GpsLocationProvider_init},
-    {"native_disable", "()V", (void*)android_location_GpsLocationProvider_disable},
-    {"native_cleanup", "()V", (void*)android_location_GpsLocationProvider_cleanup},
-    {"native_start", "(IZI)Z", (void*)android_location_GpsLocationProvider_start},
-    {"native_stop", "()Z", (void*)android_location_GpsLocationProvider_stop},
-    {"native_delete_aiding_data", "(I)V", (void*)android_location_GpsLocationProvider_delete_aiding_data},
-    {"native_wait_for_event", "()V", (void*)android_location_GpsLocationProvider_wait_for_event},
-    {"native_read_sv_status", "([I[F[F[F[I)I", (void*)android_location_GpsLocationProvider_read_sv_status},
-    {"native_read_nmea", "(I[BI)I", (void*)android_location_GpsLocationProvider_read_nmea},
-    {"native_inject_time", "(JJI)V", (void*)android_location_GpsLocationProvider_inject_time},
-    {"native_inject_location", "(DDF)V", (void*)android_location_GpsLocationProvider_inject_location},
-    {"native_supports_xtra", "()Z", (void*)android_location_GpsLocationProvider_supports_xtra},
-    {"native_inject_xtra_data", "([BI)V", (void*)android_location_GpsLocationProvider_inject_xtra_data},
-    {"native_agps_data_conn_open", "(Ljava/lang/String;)V", (void*)android_location_GpsLocationProvider_agps_data_conn_open},
-    {"native_agps_data_conn_closed", "()V", (void*)android_location_GpsLocationProvider_agps_data_conn_closed},
-    {"native_agps_data_conn_failed", "()V", (void*)android_location_GpsLocationProvider_agps_data_conn_failed},
-    {"native_set_agps_server", "(ILjava/lang/String;I)V", (void*)android_location_GpsLocationProvider_set_agps_server},
-    {"native_send_ni_response", "(II)V", (void*)android_location_GpsLocationProvider_send_ni_response},
-    {"native_get_internal_state", "()Ljava/lang/String;", (void*)android_location_GpsLocationProvider_get_internal_state},
-};
-
-int register_android_location_GpsLocationProvider(JNIEnv* env)
-{
-    return jniRegisterNativeMethods(env, "com/android/internal/location/GpsLocationProvider", sMethods, NELEM(sMethods));
-}
-
-} /* namespace android */
diff --git a/core/jni/android_media_AudioTrack.cpp b/core/jni/android_media_AudioTrack.cpp
index 65c0435..ce43e73 100644
--- a/core/jni/android_media_AudioTrack.cpp
+++ b/core/jni/android_media_AudioTrack.cpp
@@ -166,7 +166,7 @@
 static int
 android_media_AudioTrack_native_setup(JNIEnv *env, jobject thiz, jobject weak_this,
         jint streamType, jint sampleRateInHertz, jint channels,
-        jint audioFormat, jint buffSizeInBytes, jint memoryMode)
+        jint audioFormat, jint buffSizeInBytes, jint memoryMode, jintArray jSession)
 {
     LOGV("sampleRate=%d, audioFormat(from Java)=%d, channels=%x, buffSize=%d",
         sampleRateInHertz, audioFormat, channels, buffSizeInBytes);
@@ -253,6 +253,20 @@
     
     lpJniStorage->mStreamType = atStreamType;
     
+    jint* nSession = NULL;
+    if (jSession) {
+        nSession = (jint *) env->GetPrimitiveArrayCritical(jSession, NULL);
+        if (nSession == NULL) {
+            LOGE("Error creating AudioTrack: Error retrieving session id pointer");
+            delete lpJniStorage;
+            return AUDIOTRACK_ERROR;
+        }
+    } else {
+        LOGE("Error creating AudioTrack: invalid session ID pointer");
+        delete lpJniStorage;
+        return AUDIOTRACK_ERROR;
+    }
+
     // create the native AudioTrack object
     AudioTrack* lpTrack = new AudioTrack();
     if (lpTrack == NULL) {
@@ -273,7 +287,8 @@
             audioCallback, &(lpJniStorage->mCallbackData),//callback, callback data (user)
             0,// notificationFrames == 0 since not using EVENT_MORE_DATA to feed the AudioTrack
             0,// shared mem
-            true);// thread can call Java
+            true,// thread can call Java
+            nSession[0]);// audio session ID
             
     } else if (memoryMode == javaAudioTrackFields.MODE_STATIC) {
         // AudioTrack is using shared memory
@@ -293,7 +308,8 @@
             audioCallback, &(lpJniStorage->mCallbackData),//callback, callback data (user));
             0,// notificationFrames == 0 since not using EVENT_MORE_DATA to feed the AudioTrack 
             lpJniStorage->mMemBase,// shared mem
-            true);// thread can call Java 
+            true,// thread can call Java
+            nSession[0]);// audio session ID
     }
 
     if (lpTrack->initCheck() != NO_ERROR) {
@@ -301,6 +317,12 @@
         goto native_init_failure;
     }
 
+    // read the audio session ID back from AudioTrack in case we create a new session
+    nSession[0] = lpTrack->getSessionId();
+
+    env->ReleasePrimitiveArrayCritical(jSession, nSession, 0);
+    nSession = NULL;
+
     // save our newly created C++ AudioTrack in the "nativeTrackInJavaObj" field 
     // of the Java object (in mNativeTrackInJavaObj)
     env->SetIntField(thiz, javaAudioTrackFields.nativeTrackInJavaObj, (int)lpTrack);
@@ -317,6 +339,9 @@
     env->SetIntField(thiz, javaAudioTrackFields.nativeTrackInJavaObj, 0);
     
 native_track_failure:
+    if (nSession != NULL) {
+        env->ReleasePrimitiveArrayCritical(jSession, nSession, 0);
+    }
     env->DeleteGlobalRef(lpJniStorage->mCallbackData.audioTrack_class);
     env->DeleteGlobalRef(lpJniStorage->mCallbackData.audioTrack_ref);
     delete lpJniStorage;
@@ -785,7 +810,7 @@
     {"native_stop",          "()V",      (void *)android_media_AudioTrack_stop},
     {"native_pause",         "()V",      (void *)android_media_AudioTrack_pause},
     {"native_flush",         "()V",      (void *)android_media_AudioTrack_flush},
-    {"native_setup",         "(Ljava/lang/Object;IIIIII)I", 
+    {"native_setup",         "(Ljava/lang/Object;IIIIII[I)I",
                                          (void *)android_media_AudioTrack_native_setup},
     {"native_finalize",      "()V",      (void *)android_media_AudioTrack_native_finalize},
     {"native_release",       "()V",      (void *)android_media_AudioTrack_native_release},
diff --git a/core/jni/android_opengl_GLES20.cpp b/core/jni/android_opengl_GLES20.cpp
index fd1c8fd..ef25319 100644
--- a/core/jni/android_opengl_GLES20.cpp
+++ b/core/jni/android_opengl_GLES20.cpp
@@ -823,6 +823,18 @@
     );
 }
 
+/* void glDrawElements ( GLenum mode, GLsizei count, GLenum type, GLint offset ) */
+static void
+android_glDrawElements__IIII
+  (JNIEnv *_env, jobject _this, jint mode, jint count, jint type, jint offset) {
+    glDrawElements(
+        (GLenum)mode,
+        (GLsizei)count,
+        (GLenum)type,
+        (const GLvoid *)offset
+    );
+}
+
 /* void glDrawElements ( GLenum mode, GLsizei count, GLenum type, const GLvoid *indices ) */
 static void
 android_glDrawElements__IIILjava_nio_Buffer_2
@@ -4786,6 +4798,20 @@
     }
 }
 
+/* void glVertexAttribPointer ( GLuint indx, GLint size, GLenum type, GLboolean normalized, GLsizei stride, GLint offset ) */
+static void
+android_glVertexAttribPointer__IIIZII
+  (JNIEnv *_env, jobject _this, jint indx, jint size, jint type, jboolean normalized, jint stride, jint offset) {
+    glVertexAttribPointer(
+        (GLuint)indx,
+        (GLint)size,
+        (GLenum)type,
+        (GLboolean)normalized,
+        (GLsizei)stride,
+        (const GLvoid *)offset
+    );
+}
+
 /* void glVertexAttribPointer ( GLuint indx, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const GLvoid *ptr ) */
 static void
 android_glVertexAttribPointerBounds__IIIZILjava_nio_Buffer_2I
@@ -4872,6 +4898,7 @@
 {"glDisable", "(I)V", (void *) android_glDisable__I },
 {"glDisableVertexAttribArray", "(I)V", (void *) android_glDisableVertexAttribArray__I },
 {"glDrawArrays", "(III)V", (void *) android_glDrawArrays__III },
+{"glDrawElements", "(IIII)V", (void *) android_glDrawElements__IIII },
 {"glDrawElements", "(IIILjava/nio/Buffer;)V", (void *) android_glDrawElements__IIILjava_nio_Buffer_2 },
 {"glEnable", "(I)V", (void *) android_glEnable__I },
 {"glEnableVertexAttribArray", "(I)V", (void *) android_glEnableVertexAttribArray__I },
@@ -5011,6 +5038,7 @@
 {"glVertexAttrib4f", "(IFFFF)V", (void *) android_glVertexAttrib4f__IFFFF },
 {"glVertexAttrib4fv", "(I[FI)V", (void *) android_glVertexAttrib4fv__I_3FI },
 {"glVertexAttrib4fv", "(ILjava/nio/FloatBuffer;)V", (void *) android_glVertexAttrib4fv__ILjava_nio_FloatBuffer_2 },
+{"glVertexAttribPointer", "(IIIZII)V", (void *) android_glVertexAttribPointer__IIIZII },
 {"glVertexAttribPointerBounds", "(IIIZILjava/nio/Buffer;I)V", (void *) android_glVertexAttribPointerBounds__IIIZILjava_nio_Buffer_2I },
 {"glViewport", "(IIII)V", (void *) android_glViewport__IIII },
 };
diff --git a/core/jni/android_os_MessageQueue.cpp b/core/jni/android_os_MessageQueue.cpp
new file mode 100644
index 0000000..847b5a5
--- /dev/null
+++ b/core/jni/android_os_MessageQueue.cpp
@@ -0,0 +1,168 @@
+/*
+ * Copyright (C) 2010 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#define LOG_TAG "MessageQueue-JNI"
+
+#include "JNIHelp.h"
+
+#include <utils/PollLoop.h>
+#include <utils/Log.h>
+#include "android_os_MessageQueue.h"
+
+namespace android {
+
+// ----------------------------------------------------------------------------
+
+static struct {
+    jclass clazz;
+
+    jfieldID mPtr;   // native object attached to the DVM MessageQueue
+} gMessageQueueClassInfo;
+
+// ----------------------------------------------------------------------------
+
+class NativeMessageQueue {
+public:
+    NativeMessageQueue();
+    ~NativeMessageQueue();
+
+    inline sp<PollLoop> getPollLoop() { return mPollLoop; }
+
+    bool pollOnce(int timeoutMillis);
+    void wake();
+
+private:
+    sp<PollLoop> mPollLoop;
+};
+
+// ----------------------------------------------------------------------------
+
+NativeMessageQueue::NativeMessageQueue() {
+    mPollLoop = PollLoop::getForThread();
+    if (mPollLoop == NULL) {
+        mPollLoop = new PollLoop(false);
+        PollLoop::setForThread(mPollLoop);
+    }
+}
+
+NativeMessageQueue::~NativeMessageQueue() {
+}
+
+bool NativeMessageQueue::pollOnce(int timeoutMillis) {
+    return mPollLoop->pollOnce(timeoutMillis) != PollLoop::POLL_TIMEOUT;
+}
+
+void NativeMessageQueue::wake() {
+    mPollLoop->wake();
+}
+
+// ----------------------------------------------------------------------------
+
+static NativeMessageQueue* android_os_MessageQueue_getNativeMessageQueue(JNIEnv* env,
+        jobject messageQueueObj) {
+    jint intPtr = env->GetIntField(messageQueueObj, gMessageQueueClassInfo.mPtr);
+    return reinterpret_cast<NativeMessageQueue*>(intPtr);
+}
+
+static void android_os_MessageQueue_setNativeMessageQueue(JNIEnv* env, jobject messageQueueObj,
+        NativeMessageQueue* nativeMessageQueue) {
+    env->SetIntField(messageQueueObj, gMessageQueueClassInfo.mPtr,
+             reinterpret_cast<jint>(nativeMessageQueue));
+}
+
+sp<PollLoop> android_os_MessageQueue_getPollLoop(JNIEnv* env, jobject messageQueueObj) {
+    NativeMessageQueue* nativeMessageQueue =
+            android_os_MessageQueue_getNativeMessageQueue(env, messageQueueObj);
+    return nativeMessageQueue != NULL ? nativeMessageQueue->getPollLoop() : NULL;
+}
+
+static void android_os_MessageQueue_nativeInit(JNIEnv* env, jobject obj) {
+    NativeMessageQueue* nativeMessageQueue = new NativeMessageQueue();
+    if (! nativeMessageQueue) {
+        jniThrowRuntimeException(env, "Unable to allocate native queue");
+        return;
+    }
+
+    android_os_MessageQueue_setNativeMessageQueue(env, obj, nativeMessageQueue);
+}
+
+static void android_os_MessageQueue_nativeDestroy(JNIEnv* env, jobject obj) {
+    NativeMessageQueue* nativeMessageQueue =
+            android_os_MessageQueue_getNativeMessageQueue(env, obj);
+    if (nativeMessageQueue) {
+        android_os_MessageQueue_setNativeMessageQueue(env, obj, NULL);
+        delete nativeMessageQueue;
+    }
+}
+
+static void throwQueueNotInitialized(JNIEnv* env) {
+    jniThrowException(env, "java/lang/IllegalStateException", "Message queue not initialized");
+}
+
+static jboolean android_os_MessageQueue_nativePollOnce(JNIEnv* env, jobject obj,
+        jint timeoutMillis) {
+    NativeMessageQueue* nativeMessageQueue =
+            android_os_MessageQueue_getNativeMessageQueue(env, obj);
+    if (! nativeMessageQueue) {
+        throwQueueNotInitialized(env);
+        return false;
+    }
+    return nativeMessageQueue->pollOnce(timeoutMillis);
+}
+
+static void android_os_MessageQueue_nativeWake(JNIEnv* env, jobject obj) {
+    NativeMessageQueue* nativeMessageQueue =
+            android_os_MessageQueue_getNativeMessageQueue(env, obj);
+    if (! nativeMessageQueue) {
+        throwQueueNotInitialized(env);
+        return;
+    }
+    return nativeMessageQueue->wake();
+}
+
+// ----------------------------------------------------------------------------
+
+static JNINativeMethod gMessageQueueMethods[] = {
+    /* name, signature, funcPtr */
+    { "nativeInit", "()V", (void*)android_os_MessageQueue_nativeInit },
+    { "nativeDestroy", "()V", (void*)android_os_MessageQueue_nativeDestroy },
+    { "nativePollOnce", "(I)Z", (void*)android_os_MessageQueue_nativePollOnce },
+    { "nativeWake", "()V", (void*)android_os_MessageQueue_nativeWake }
+};
+
+#define FIND_CLASS(var, className) \
+        var = env->FindClass(className); \
+        LOG_FATAL_IF(! var, "Unable to find class " className); \
+        var = jclass(env->NewGlobalRef(var));
+
+#define GET_FIELD_ID(var, clazz, fieldName, fieldDescriptor) \
+        var = env->GetFieldID(clazz, fieldName, fieldDescriptor); \
+        LOG_FATAL_IF(! var, "Unable to find field " fieldName);
+
+int register_android_os_MessageQueue(JNIEnv* env) {
+    int res = jniRegisterNativeMethods(env, "android/os/MessageQueue",
+            gMessageQueueMethods, NELEM(gMessageQueueMethods));
+    LOG_FATAL_IF(res < 0, "Unable to register native methods.");
+
+    FIND_CLASS(gMessageQueueClassInfo.clazz, "android/os/MessageQueue");
+
+    GET_FIELD_ID(gMessageQueueClassInfo.mPtr, gMessageQueueClassInfo.clazz,
+            "mPtr", "I");
+    
+    return 0;
+}
+
+} // namespace android
diff --git a/core/jni/android_os_MessageQueue.h b/core/jni/android_os_MessageQueue.h
new file mode 100644
index 0000000..5c742e2
--- /dev/null
+++ b/core/jni/android_os_MessageQueue.h
@@ -0,0 +1,30 @@
+/*
+ * Copyright (C) 2010 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef _ANDROID_OS_MESSAGEQUEUE_H
+#define _ANDROID_OS_MESSAGEQUEUE_H
+
+#include "jni.h"
+
+namespace android {
+
+class PollLoop;
+
+extern sp<PollLoop> android_os_MessageQueue_getPollLoop(JNIEnv* env, jobject messageQueueObj);
+
+} // namespace android
+
+#endif // _ANDROID_OS_MESSAGEQUEUE_H
diff --git a/core/jni/android_server_BluetoothA2dpService.cpp b/core/jni/android_server_BluetoothA2dpService.cpp
index cf53a06..8c795af 100644
--- a/core/jni/android_server_BluetoothA2dpService.cpp
+++ b/core/jni/android_server_BluetoothA2dpService.cpp
@@ -256,10 +256,12 @@
                     parse_property_change(env, msg, (Properties *)&sink_properties,
                                 sizeof(sink_properties) / sizeof(Properties));
         const char *c_path = dbus_message_get_path(msg);
+        jstring path = env->NewStringUTF(c_path);
         env->CallVoidMethod(nat->me,
                             method_onSinkPropertyChanged,
-                            env->NewStringUTF(c_path),
+                            path,
                             str_array);
+        env->DeleteLocalRef(path);
         result = DBUS_HANDLER_RESULT_HANDLED;
         return result;
     } else {
@@ -292,10 +294,13 @@
         result = JNI_FALSE;
     }
     LOGV("... Device Path = %s, result = %d", path, result);
+
+    jstring jPath = env->NewStringUTF(path);
     env->CallVoidMethod(nat->me,
                         method_onConnectSinkResult,
-                        env->NewStringUTF(path),
+                        jPath,
                         result);
+    env->DeleteLocalRef(jPath);
     free(user);
 }
 
diff --git a/core/jni/android_server_BluetoothEventLoop.cpp b/core/jni/android_server_BluetoothEventLoop.cpp
index 259cc01..01b6711 100644
--- a/core/jni/android_server_BluetoothEventLoop.cpp
+++ b/core/jni/android_server_BluetoothEventLoop.cpp
@@ -1061,6 +1061,8 @@
     DBusError err;
     dbus_error_init(&err);
     JNIEnv *env;
+    jstring addr;
+
     nat->vm->GetEnv((void**)&env, nat->envVer);
 
     LOGV("... address = %s", address);
@@ -1109,10 +1111,12 @@
         }
     }
 
+    addr = env->NewStringUTF(address);
     env->CallVoidMethod(nat->me,
                         method_onCreatePairedDeviceResult,
-                        env->NewStringUTF(address),
+                        addr,
                         result);
+    env->DeleteLocalRef(addr);
 done:
     dbus_error_free(&err);
     free(user);
@@ -1139,10 +1143,12 @@
         }
         LOG_AND_FREE_DBUS_ERROR(&err);
     }
+    jstring addr = env->NewStringUTF(address);
     env->CallVoidMethod(nat->me,
                         method_onCreateDeviceResult,
-                        env->NewStringUTF(address),
+                        addr,
                         result);
+    env->DeleteLocalRef(addr);
     free(user);
 }
 
@@ -1163,10 +1169,12 @@
         LOG_AND_FREE_DBUS_ERROR(&err);
         result = JNI_FALSE;
     }
+    jstring jPath = env->NewStringUTF(path);
     env->CallVoidMethod(nat->me,
                         method_onDiscoverServicesResult,
-                        env->NewStringUTF(path),
+                        jPath,
                         result);
+    env->DeleteLocalRef(jPath);
     free(user);
 }
 
@@ -1194,10 +1202,12 @@
     }
 
 done:
+    jstring addr = env->NewStringUTF(address);
     env->CallVoidMethod(nat->me,
                         method_onGetDeviceServiceChannelResult,
-                        env->NewStringUTF(address),
+                        addr,
                         channel);
+    env->DeleteLocalRef(addr);
     free(user);
 }
 #endif
diff --git a/core/jni/android_util_AssetManager.cpp b/core/jni/android_util_AssetManager.cpp
index a2b7cc4..b7d0c67 100644
--- a/core/jni/android_util_AssetManager.cpp
+++ b/core/jni/android_util_AssetManager.cpp
@@ -1504,8 +1504,7 @@
     }
 
     jobjectArray array = env->NewObjectArray(N, cls, NULL);
-    if (array == NULL) {
-        doThrow(env, "java/lang/OutOfMemoryError");
+    if (env->ExceptionCheck()) {
         res.unlockBag(startOfBag);
         return NULL;
     }
@@ -1533,15 +1532,23 @@
             } else {
                 const char16_t* str16 = pool->stringAt(value.data, &strLen);
                 str = env->NewString(str16, strLen);
-                if (str == NULL) {
-                    doThrow(env, "java/lang/OutOfMemoryError");
-                    res.unlockBag(startOfBag);
-                    return NULL;
-                }
+            }
+
+            // If one of our NewString{UTF} calls failed due to memory, an
+            // exception will be pending.
+            if (env->ExceptionCheck()) {
+                res.unlockBag(startOfBag);
+                return NULL;
             }
         }
 
         env->SetObjectArrayElement(array, i, str);
+
+        // If we have a large amount of strings in our array, we might
+        // overflow the local reference table of the VM.
+        if (str != NULL) {
+            env->DeleteLocalRef(str);
+        }
     }
     res.unlockBag(startOfBag);
     return array;
diff --git a/core/jni/android_util_Binder.cpp b/core/jni/android_util_Binder.cpp
index d26cd28..040b324 100644
--- a/core/jni/android_util_Binder.cpp
+++ b/core/jni/android_util_Binder.cpp
@@ -134,6 +134,12 @@
     jmethodID mConstructor;
 } gParcelFileDescriptorOffsets;
 
+static struct strict_mode_callback_offsets_t
+{
+    jclass mClass;
+    jmethodID mCallback;
+} gStrictModeCallbackOffsets;
+
 // ****************************************************************************
 // ****************************************************************************
 // ****************************************************************************
@@ -214,6 +220,15 @@
     env->DeleteLocalRef(msgstr);
 }
 
+static void set_dalvik_blockguard_policy(JNIEnv* env, jint strict_policy)
+{
+    // Call back into android.os.StrictMode#onBinderStrictModePolicyChange
+    // to sync our state back to it.  See the comments in StrictMode.java.
+    env->CallStaticVoidMethod(gStrictModeCallbackOffsets.mClass,
+                              gStrictModeCallbackOffsets.mCallback,
+                              strict_policy);
+}
+
 class JavaBBinderHolder;
 
 class JavaBBinder : public BBinder
@@ -253,12 +268,28 @@
 
         LOGV("onTransact() on %p calling object %p in env %p vm %p\n", this, mObject, env, mVM);
 
+        IPCThreadState* thread_state = IPCThreadState::self();
+        const int strict_policy_before = thread_state->getStrictModePolicy();
+
         //printf("Transact from %p to Java code sending: ", this);
         //data.print();
         //printf("\n");
         jboolean res = env->CallBooleanMethod(mObject, gBinderOffsets.mExecTransact,
             code, (int32_t)&data, (int32_t)reply, flags);
         jthrowable excep = env->ExceptionOccurred();
+
+        // Restore the Java binder thread's state if it changed while
+        // processing a call (as it would if the Parcel's header had a
+        // new policy mask and Parcel.enforceInterface() changed
+        // it...)
+        const int strict_policy_after = thread_state->getStrictModePolicy();
+        if (strict_policy_after != strict_policy_before) {
+            // Our thread-local...
+            thread_state->setStrictModePolicy(strict_policy_before);
+            // And the Java-level thread-local...
+            set_dalvik_blockguard_policy(env, strict_policy_before);
+        }
+
         if (excep) {
             report_exception(env, excep,
                 "*** Uncaught remote exception!  "
@@ -574,6 +605,16 @@
     IPCThreadState::self()->restoreCallingIdentity(token);
 }
 
+static void android_os_Binder_setThreadStrictModePolicy(JNIEnv* env, jobject clazz, jint policyMask)
+{
+    IPCThreadState::self()->setStrictModePolicy(policyMask);
+}
+
+static jint android_os_Binder_getThreadStrictModePolicy(JNIEnv* env, jobject clazz)
+{
+    return IPCThreadState::self()->getStrictModePolicy();
+}
+
 static void android_os_Binder_flushPendingCommands(JNIEnv* env, jobject clazz)
 {
     IPCThreadState::self()->flushCommands();
@@ -618,6 +659,8 @@
     { "getCallingUid", "()I", (void*)android_os_Binder_getCallingUid },
     { "clearCallingIdentity", "()J", (void*)android_os_Binder_clearCallingIdentity },
     { "restoreCallingIdentity", "(J)V", (void*)android_os_Binder_restoreCallingIdentity },
+    { "setThreadStrictModePolicy", "(I)V", (void*)android_os_Binder_setThreadStrictModePolicy },
+    { "getThreadStrictModePolicy", "()I", (void*)android_os_Binder_getThreadStrictModePolicy },
     { "flushPendingCommands", "()V", (void*)android_os_Binder_flushPendingCommands },
     { "init", "()V", (void*)android_os_Binder_init },
     { "destroy", "()V", (void*)android_os_Binder_destroy }
@@ -1523,9 +1566,24 @@
     if (parcel != NULL) {
         const jchar* str = env->GetStringCritical(name, 0);
         if (str) {
-            bool isValid = parcel->enforceInterface(String16(str, env->GetStringLength(name)));
+            const int32_t old_strict_policy =
+                IPCThreadState::self()->getStrictModePolicy();
+            int32_t strict_policy;
+            bool isValid = parcel->enforceInterface(
+                String16(str, env->GetStringLength(name)),
+                &strict_policy);
             env->ReleaseStringCritical(name, str);
             if (isValid) {
+                if (old_strict_policy != strict_policy) {
+                    // Need to keep the Java-level thread-local strict
+                    // mode policy in sync for the libcore
+                    // enforcements, which involves an upcall back
+                    // into Java.  (We can't modify the
+                    // Parcel.enforceInterface signature, as it's
+                    // pseudo-public, and used via AIDL
+                    // auto-generation...)
+                    set_dalvik_blockguard_policy(env, strict_policy);
+                }
                 return;     // everything was correct -> return silently
             }
         }
@@ -1611,6 +1669,14 @@
     gParcelOffsets.mOwnObject
         = env->GetFieldID(clazz, "mOwnObject", "I");
 
+    clazz = env->FindClass("android/os/StrictMode");
+    LOG_FATAL_IF(clazz == NULL, "Unable to find class android.os.StrictMode");
+    gStrictModeCallbackOffsets.mClass = (jclass) env->NewGlobalRef(clazz);
+    gStrictModeCallbackOffsets.mCallback = env->GetStaticMethodID(
+        clazz, "onBinderStrictModePolicyChange", "(I)V");
+    LOG_FATAL_IF(gStrictModeCallbackOffsets.mCallback == NULL,
+                 "Unable to find strict mode callback.");
+
     return AndroidRuntime::registerNativeMethods(
         env, kParcelPathName,
         gParcelMethods, NELEM(gParcelMethods));
diff --git a/core/jni/android_util_Process.cpp b/core/jni/android_util_Process.cpp
index 68be741..7c99271 100644
--- a/core/jni/android_util_Process.cpp
+++ b/core/jni/android_util_Process.cpp
@@ -52,9 +52,15 @@
 #endif
 
 #define POLICY_DEBUG 0
+#define GUARD_THREAD_PRIORITY 0
 
 using namespace android;
 
+#if GUARD_THREAD_PRIORITY
+Mutex gKeyCreateMutex;
+static pthread_key_t gBgKey = -1;
+#endif
+
 static void signalExceptionForPriorityError(JNIEnv* env, jobject obj, int err)
 {
     switch (err) {
@@ -264,9 +270,41 @@
     closedir(d);
 }
 
+static void android_os_Process_setCanSelfBackground(JNIEnv* env, jobject clazz, jboolean bgOk) {
+    // Establishes the calling thread as illegal to put into the background.
+    // Typically used only for the system process's main looper.
+#if GUARD_THREAD_PRIORITY
+    LOGV("Process.setCanSelfBackground(%d) : tid=%d", bgOk, androidGetTid());
+    {
+        Mutex::Autolock _l(gKeyCreateMutex);
+        if (gBgKey == -1) {
+            pthread_key_create(&gBgKey, NULL);
+        }
+    }
+
+    // inverted:  not-okay, we set a sentinel value
+    pthread_setspecific(gBgKey, (void*)(bgOk ? 0 : 0xbaad));
+#endif
+}
+
 void android_os_Process_setThreadPriority(JNIEnv* env, jobject clazz,
                                               jint pid, jint pri)
 {
+#if GUARD_THREAD_PRIORITY
+    // if we're putting the current thread into the background, check the TLS
+    // to make sure this thread isn't guarded.  If it is, raise an exception.
+    if (pri >= ANDROID_PRIORITY_BACKGROUND) {
+        if (pid == androidGetTid()) {
+            void* bgOk = pthread_getspecific(gBgKey);
+            if (bgOk == ((void*)0xbaad)) {
+                LOGE("Thread marked fg-only put self in background!");
+                jniThrowException(env, "java/lang/SecurityException", "May not put this thread into background");
+                return;
+            }
+        }
+    }
+#endif
+
     int rc = androidSetThreadPriority(pid, pri);
     if (rc != 0) {
         if (rc == INVALID_OPERATION) {
@@ -852,6 +890,7 @@
     {"getUidForName",       "(Ljava/lang/String;)I", (void*)android_os_Process_getUidForName},
     {"getGidForName",       "(Ljava/lang/String;)I", (void*)android_os_Process_getGidForName},
     {"setThreadPriority",   "(II)V", (void*)android_os_Process_setThreadPriority},
+    {"setCanSelfBackground", "(Z)V", (void*)android_os_Process_setCanSelfBackground},
     {"setThreadPriority",   "(I)V", (void*)android_os_Process_setCallingThreadPriority},
     {"getThreadPriority",   "(I)I", (void*)android_os_Process_getThreadPriority},
     {"setThreadGroup",      "(II)V", (void*)android_os_Process_setThreadGroup},
diff --git a/core/jni/android_view_InputChannel.cpp b/core/jni/android_view_InputChannel.cpp
new file mode 100644
index 0000000..4a4393a
--- /dev/null
+++ b/core/jni/android_view_InputChannel.cpp
@@ -0,0 +1,288 @@
+/*
+ * Copyright (C) 2010 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#define LOG_TAG "InputChannel-JNI"
+
+#include "JNIHelp.h"
+
+#include <android_runtime/AndroidRuntime.h>
+#include <binder/Parcel.h>
+#include <utils/Log.h>
+#include <ui/InputTransport.h>
+#include "android_view_InputChannel.h"
+#include "android_util_Binder.h"
+
+namespace android {
+
+// ----------------------------------------------------------------------------
+
+static struct {
+    jclass clazz;
+
+    jfieldID mPtr;   // native object attached to the DVM InputChannel
+    jmethodID ctor;
+} gInputChannelClassInfo;
+
+// ----------------------------------------------------------------------------
+
+class NativeInputChannel {
+public:
+    NativeInputChannel(const sp<InputChannel>& inputChannel);
+    ~NativeInputChannel();
+
+    inline sp<InputChannel> getInputChannel() { return mInputChannel; }
+
+    void setDisposeCallback(InputChannelObjDisposeCallback callback, void* data);
+    void invokeAndRemoveDisposeCallback(JNIEnv* env, jobject obj);
+
+private:
+    sp<InputChannel> mInputChannel;
+    InputChannelObjDisposeCallback mDisposeCallback;
+    void* mDisposeData;
+};
+
+// ----------------------------------------------------------------------------
+
+NativeInputChannel::NativeInputChannel(const sp<InputChannel>& inputChannel) :
+    mInputChannel(inputChannel), mDisposeCallback(NULL) {
+}
+
+NativeInputChannel::~NativeInputChannel() {
+}
+
+void NativeInputChannel::setDisposeCallback(InputChannelObjDisposeCallback callback, void* data) {
+    mDisposeCallback = callback;
+    mDisposeData = data;
+}
+
+void NativeInputChannel::invokeAndRemoveDisposeCallback(JNIEnv* env, jobject obj) {
+    if (mDisposeCallback) {
+        mDisposeCallback(env, obj, mInputChannel, mDisposeData);
+        mDisposeCallback = NULL;
+        mDisposeData = NULL;
+    }
+}
+
+// ----------------------------------------------------------------------------
+
+static NativeInputChannel* android_view_InputChannel_getNativeInputChannel(JNIEnv* env,
+        jobject inputChannelObj) {
+    jint intPtr = env->GetIntField(inputChannelObj, gInputChannelClassInfo.mPtr);
+    return reinterpret_cast<NativeInputChannel*>(intPtr);
+}
+
+static void android_view_InputChannel_setNativeInputChannel(JNIEnv* env, jobject inputChannelObj,
+        NativeInputChannel* nativeInputChannel) {
+    env->SetIntField(inputChannelObj, gInputChannelClassInfo.mPtr,
+             reinterpret_cast<jint>(nativeInputChannel));
+}
+
+sp<InputChannel> android_view_InputChannel_getInputChannel(JNIEnv* env, jobject inputChannelObj) {
+    NativeInputChannel* nativeInputChannel =
+            android_view_InputChannel_getNativeInputChannel(env, inputChannelObj);
+    return nativeInputChannel != NULL ? nativeInputChannel->getInputChannel() : NULL;
+}
+
+void android_view_InputChannel_setDisposeCallback(JNIEnv* env, jobject inputChannelObj,
+        InputChannelObjDisposeCallback callback, void* data) {
+    NativeInputChannel* nativeInputChannel =
+            android_view_InputChannel_getNativeInputChannel(env, inputChannelObj);
+    if (nativeInputChannel == NULL) {
+        LOGW("Cannot set dispose callback because input channel object has not been initialized.");
+    } else {
+        nativeInputChannel->setDisposeCallback(callback, data);
+    }
+}
+
+static jobject android_view_InputChannel_createInputChannel(JNIEnv* env,
+        NativeInputChannel* nativeInputChannel) {
+    jobject inputChannelObj = env->NewObject(gInputChannelClassInfo.clazz,
+            gInputChannelClassInfo.ctor);
+    android_view_InputChannel_setNativeInputChannel(env, inputChannelObj, nativeInputChannel);
+    return inputChannelObj;
+}
+
+static jobjectArray android_view_InputChannel_nativeOpenInputChannelPair(JNIEnv* env,
+        jclass clazz, jstring nameObj) {
+    const char* nameChars = env->GetStringUTFChars(nameObj, NULL);
+    String8 name(nameChars);
+    env->ReleaseStringUTFChars(nameObj, nameChars);
+
+    sp<InputChannel> serverChannel;
+    sp<InputChannel> clientChannel;
+    status_t result = InputChannel::openInputChannelPair(name, serverChannel, clientChannel);
+
+    if (result) {
+        LOGE("Could not open input channel pair.  status=%d", result);
+        jniThrowRuntimeException(env, "Could not open input channel pair.");
+        return NULL;
+    }
+
+    // TODO more robust error checking
+    jobject serverChannelObj = android_view_InputChannel_createInputChannel(env,
+            new NativeInputChannel(serverChannel));
+    jobject clientChannelObj = android_view_InputChannel_createInputChannel(env,
+            new NativeInputChannel(clientChannel));
+
+    jobjectArray channelPair = env->NewObjectArray(2, gInputChannelClassInfo.clazz, NULL);
+    env->SetObjectArrayElement(channelPair, 0, serverChannelObj);
+    env->SetObjectArrayElement(channelPair, 1, clientChannelObj);
+    return channelPair;
+}
+
+static void android_view_InputChannel_nativeDispose(JNIEnv* env, jobject obj, jboolean finalized) {
+    NativeInputChannel* nativeInputChannel =
+            android_view_InputChannel_getNativeInputChannel(env, obj);
+    if (nativeInputChannel) {
+        if (finalized) {
+            LOGW("Input channel object '%s' was finalized without being disposed!",
+                    nativeInputChannel->getInputChannel()->getName().string());
+        }
+
+        nativeInputChannel->invokeAndRemoveDisposeCallback(env, obj);
+
+        android_view_InputChannel_setNativeInputChannel(env, obj, NULL);
+        delete nativeInputChannel;
+    }
+}
+
+static void android_view_InputChannel_nativeTransferTo(JNIEnv* env, jobject obj,
+        jobject otherObj) {
+    if (android_view_InputChannel_getInputChannel(env, otherObj) != NULL) {
+        jniThrowException(env, "java/lang/IllegalStateException",
+                "Other object already has a native input channel.");
+        return;
+    }
+
+    NativeInputChannel* nativeInputChannel =
+            android_view_InputChannel_getNativeInputChannel(env, obj);
+    android_view_InputChannel_setNativeInputChannel(env, otherObj, nativeInputChannel);
+    android_view_InputChannel_setNativeInputChannel(env, obj, NULL);
+}
+
+static void android_view_InputChannel_nativeReadFromParcel(JNIEnv* env, jobject obj,
+        jobject parcelObj) {
+    if (android_view_InputChannel_getInputChannel(env, obj) != NULL) {
+        jniThrowException(env, "java/lang/IllegalStateException",
+                "This object already has a native input channel.");
+        return;
+    }
+
+    Parcel* parcel = parcelForJavaObject(env, parcelObj);
+    if (parcel) {
+        bool isInitialized = parcel->readInt32();
+        if (isInitialized) {
+            String8 name = parcel->readString8();
+            int32_t ashmemFd = dup(parcel->readFileDescriptor());
+            int32_t receivePipeFd = dup(parcel->readFileDescriptor());
+            int32_t sendPipeFd = dup(parcel->readFileDescriptor());
+            if (ashmemFd < 0 || receivePipeFd < 0 || sendPipeFd < 0) {
+                if (ashmemFd >= 0) ::close(ashmemFd);
+                if (receivePipeFd >= 0) ::close(receivePipeFd);
+                if (sendPipeFd >= 0) ::close(sendPipeFd);
+                jniThrowRuntimeException(env,
+                        "Could not read input channel file descriptors from parcel.");
+                return;
+            }
+
+            InputChannel* inputChannel = new InputChannel(name, ashmemFd,
+                    receivePipeFd, sendPipeFd);
+            NativeInputChannel* nativeInputChannel = new NativeInputChannel(inputChannel);
+
+            android_view_InputChannel_setNativeInputChannel(env, obj, nativeInputChannel);
+        }
+    }
+}
+
+static void android_view_InputChannel_nativeWriteToParcel(JNIEnv* env, jobject obj,
+        jobject parcelObj) {
+    Parcel* parcel = parcelForJavaObject(env, parcelObj);
+    if (parcel) {
+        NativeInputChannel* nativeInputChannel =
+                android_view_InputChannel_getNativeInputChannel(env, obj);
+        if (nativeInputChannel) {
+            sp<InputChannel> inputChannel = nativeInputChannel->getInputChannel();
+
+            parcel->writeInt32(1);
+            parcel->writeString8(inputChannel->getName());
+            parcel->writeDupFileDescriptor(inputChannel->getAshmemFd());
+            parcel->writeDupFileDescriptor(inputChannel->getReceivePipeFd());
+            parcel->writeDupFileDescriptor(inputChannel->getSendPipeFd());
+        } else {
+            parcel->writeInt32(0);
+        }
+    }
+}
+
+static jstring android_view_InputChannel_nativeGetName(JNIEnv* env, jobject obj) {
+    NativeInputChannel* nativeInputChannel =
+            android_view_InputChannel_getNativeInputChannel(env, obj);
+    if (! nativeInputChannel) {
+        return NULL;
+    }
+
+    jstring name = env->NewStringUTF(nativeInputChannel->getInputChannel()->getName().string());
+    return name;
+}
+
+// ----------------------------------------------------------------------------
+
+static JNINativeMethod gInputChannelMethods[] = {
+    /* name, signature, funcPtr */
+    { "nativeOpenInputChannelPair", "(Ljava/lang/String;)[Landroid/view/InputChannel;",
+            (void*)android_view_InputChannel_nativeOpenInputChannelPair },
+    { "nativeDispose", "(Z)V",
+            (void*)android_view_InputChannel_nativeDispose },
+    { "nativeTransferTo", "(Landroid/view/InputChannel;)V",
+            (void*)android_view_InputChannel_nativeTransferTo },
+    { "nativeReadFromParcel", "(Landroid/os/Parcel;)V",
+            (void*)android_view_InputChannel_nativeReadFromParcel },
+    { "nativeWriteToParcel", "(Landroid/os/Parcel;)V",
+            (void*)android_view_InputChannel_nativeWriteToParcel },
+    { "nativeGetName", "()Ljava/lang/String;",
+            (void*)android_view_InputChannel_nativeGetName },
+};
+
+#define FIND_CLASS(var, className) \
+        var = env->FindClass(className); \
+        LOG_FATAL_IF(! var, "Unable to find class " className); \
+        var = jclass(env->NewGlobalRef(var));
+
+#define GET_METHOD_ID(var, clazz, methodName, methodDescriptor) \
+        var = env->GetMethodID(clazz, methodName, methodDescriptor); \
+        LOG_FATAL_IF(! var, "Unable to find method " methodName);
+
+#define GET_FIELD_ID(var, clazz, fieldName, fieldDescriptor) \
+        var = env->GetFieldID(clazz, fieldName, fieldDescriptor); \
+        LOG_FATAL_IF(! var, "Unable to find field " fieldName);
+
+int register_android_view_InputChannel(JNIEnv* env) {
+    int res = jniRegisterNativeMethods(env, "android/view/InputChannel",
+            gInputChannelMethods, NELEM(gInputChannelMethods));
+    LOG_FATAL_IF(res < 0, "Unable to register native methods.");
+
+    FIND_CLASS(gInputChannelClassInfo.clazz, "android/view/InputChannel");
+
+    GET_FIELD_ID(gInputChannelClassInfo.mPtr, gInputChannelClassInfo.clazz,
+            "mPtr", "I");
+    
+    GET_METHOD_ID(gInputChannelClassInfo.ctor, gInputChannelClassInfo.clazz,
+            "<init>", "()V");
+
+    return 0;
+}
+
+} // namespace android
diff --git a/core/jni/android_view_InputChannel.h b/core/jni/android_view_InputChannel.h
new file mode 100644
index 0000000..fa2d282
--- /dev/null
+++ b/core/jni/android_view_InputChannel.h
@@ -0,0 +1,40 @@
+/*
+ * Copyright (C) 2010 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef _ANDROID_VIEW_INPUTCHANNEL_H
+#define _ANDROID_VIEW_INPUTCHANNEL_H
+
+#include "jni.h"
+
+#include <ui/InputTransport.h>
+
+namespace android {
+
+typedef void (*InputChannelObjDisposeCallback)(JNIEnv* env, jobject inputChannelObj,
+        const sp<InputChannel>& inputChannel, void* data);
+
+extern sp<InputChannel> android_view_InputChannel_getInputChannel(JNIEnv* env,
+        jobject inputChannelObj);
+
+/* Sets a callback that is invoked when the InputChannel DVM object is disposed (or finalized).
+ * This is used to automatically dispose of other native objects in the input dispatcher
+ * and input queue to prevent memory leaks. */
+extern void android_view_InputChannel_setDisposeCallback(JNIEnv* env, jobject inputChannelObj,
+        InputChannelObjDisposeCallback callback, void* data = NULL);
+
+} // namespace android
+
+#endif // _ANDROID_OS_INPUTCHANNEL_H
diff --git a/core/jni/android_view_InputQueue.cpp b/core/jni/android_view_InputQueue.cpp
new file mode 100644
index 0000000..226c797
--- /dev/null
+++ b/core/jni/android_view_InputQueue.cpp
@@ -0,0 +1,481 @@
+/*
+ * Copyright (C) 2010 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#define LOG_TAG "InputQueue-JNI"
+
+//#define LOG_NDEBUG 0
+
+// Log debug messages about the dispatch cycle.
+#define DEBUG_DISPATCH_CYCLE 0
+
+// Log debug messages about registrations.
+#define DEBUG_REGISTRATION 0
+
+
+#include "JNIHelp.h"
+
+#include <android_runtime/AndroidRuntime.h>
+#include <utils/Log.h>
+#include <utils/PollLoop.h>
+#include <utils/KeyedVector.h>
+#include <utils/threads.h>
+#include <ui/InputTransport.h>
+#include "android_os_MessageQueue.h"
+#include "android_view_InputChannel.h"
+#include "android_view_KeyEvent.h"
+#include "android_view_MotionEvent.h"
+
+namespace android {
+
+// ----------------------------------------------------------------------------
+
+static struct {
+    jclass clazz;
+
+    jmethodID dispatchKeyEvent;
+    jmethodID dispatchMotionEvent;
+} gInputQueueClassInfo;
+
+// ----------------------------------------------------------------------------
+
+class NativeInputQueue {
+public:
+    NativeInputQueue();
+    ~NativeInputQueue();
+
+    status_t registerInputChannel(JNIEnv* env, jobject inputChannelObj,
+            jobject inputHandlerObj, jobject messageQueueObj);
+
+    status_t unregisterInputChannel(JNIEnv* env, jobject inputChannelObj);
+
+    status_t finished(JNIEnv* env, jlong finishedToken, bool ignoreSpuriousFinish);
+
+private:
+    class Connection : public RefBase {
+    protected:
+        virtual ~Connection();
+
+    public:
+        enum Status {
+            // Everything is peachy.
+            STATUS_NORMAL,
+            // The input channel has been unregistered.
+            STATUS_ZOMBIE
+        };
+
+        Connection(const sp<InputChannel>& inputChannel, const sp<PollLoop>& pollLoop);
+
+        inline const char* getInputChannelName() const { return inputChannel->getName().string(); }
+
+        Status status;
+
+        sp<InputChannel> inputChannel;
+        InputConsumer inputConsumer;
+        sp<PollLoop> pollLoop;
+        jobject inputHandlerObjGlobal;
+        PreallocatedInputEventFactory inputEventFactory;
+
+        // The sequence number of the current event being dispatched.
+        // This is used as part of the finished token as a way to determine whether the finished
+        // token is still valid before sending a finished signal back to the publisher.
+        uint32_t messageSeqNum;
+
+        // True if a message has been received from the publisher but not yet finished.
+        bool messageInProgress;
+    };
+
+    Mutex mLock;
+    KeyedVector<int32_t, sp<Connection> > mConnectionsByReceiveFd;
+
+    static void handleInputChannelDisposed(JNIEnv* env,
+            jobject inputChannelObj, const sp<InputChannel>& inputChannel, void* data);
+
+    static bool handleReceiveCallback(int receiveFd, int events, void* data);
+
+    static jlong generateFinishedToken(int32_t receiveFd, int32_t messageSeqNum);
+
+    static void parseFinishedToken(jlong finishedToken,
+            int32_t* outReceiveFd, uint32_t* outMessageIndex);
+};
+
+// ----------------------------------------------------------------------------
+
+NativeInputQueue::NativeInputQueue() {
+}
+
+NativeInputQueue::~NativeInputQueue() {
+}
+
+status_t NativeInputQueue::registerInputChannel(JNIEnv* env, jobject inputChannelObj,
+        jobject inputHandlerObj, jobject messageQueueObj) {
+    sp<InputChannel> inputChannel = android_view_InputChannel_getInputChannel(env,
+            inputChannelObj);
+    if (inputChannel == NULL) {
+        LOGW("Input channel is not initialized.");
+        return BAD_VALUE;
+    }
+
+#if DEBUG_REGISTRATION
+    LOGD("channel '%s' - Registered", inputChannel->getName().string());
+#endif
+
+    sp<PollLoop> pollLoop = android_os_MessageQueue_getPollLoop(env, messageQueueObj);
+
+    int receiveFd;
+    { // acquire lock
+        AutoMutex _l(mLock);
+
+        receiveFd = inputChannel->getReceivePipeFd();
+        if (mConnectionsByReceiveFd.indexOfKey(receiveFd) >= 0) {
+            LOGW("Attempted to register already registered input channel '%s'",
+                    inputChannel->getName().string());
+            return BAD_VALUE;
+        }
+
+        sp<Connection> connection = new Connection(inputChannel, pollLoop);
+        status_t result = connection->inputConsumer.initialize();
+        if (result) {
+            LOGW("Failed to initialize input consumer for input channel '%s', status=%d",
+                    inputChannel->getName().string(), result);
+            return result;
+        }
+
+        connection->inputHandlerObjGlobal = env->NewGlobalRef(inputHandlerObj);
+
+        mConnectionsByReceiveFd.add(receiveFd, connection);
+    } // release lock
+
+    android_view_InputChannel_setDisposeCallback(env, inputChannelObj,
+            handleInputChannelDisposed, this);
+
+    pollLoop->setCallback(receiveFd, POLLIN, handleReceiveCallback, this);
+    return OK;
+}
+
+status_t NativeInputQueue::unregisterInputChannel(JNIEnv* env, jobject inputChannelObj) {
+    sp<InputChannel> inputChannel = android_view_InputChannel_getInputChannel(env,
+            inputChannelObj);
+    if (inputChannel == NULL) {
+        LOGW("Input channel is not initialized.");
+        return BAD_VALUE;
+    }
+
+#if DEBUG_REGISTRATION
+    LOGD("channel '%s' - Unregistered", inputChannel->getName().string());
+#endif
+
+    int32_t receiveFd;
+    sp<Connection> connection;
+    { // acquire lock
+        AutoMutex _l(mLock);
+
+        receiveFd = inputChannel->getReceivePipeFd();
+        ssize_t connectionIndex = mConnectionsByReceiveFd.indexOfKey(receiveFd);
+        if (connectionIndex < 0) {
+            LOGW("Attempted to unregister already unregistered input channel '%s'",
+                    inputChannel->getName().string());
+            return BAD_VALUE;
+        }
+
+        connection = mConnectionsByReceiveFd.valueAt(connectionIndex);
+        mConnectionsByReceiveFd.removeItemsAt(connectionIndex);
+
+        connection->status = Connection::STATUS_ZOMBIE;
+
+        env->DeleteGlobalRef(connection->inputHandlerObjGlobal);
+        connection->inputHandlerObjGlobal = NULL;
+    } // release lock
+
+    android_view_InputChannel_setDisposeCallback(env, inputChannelObj, NULL, NULL);
+
+    connection->pollLoop->removeCallback(receiveFd);
+    return OK;
+}
+
+status_t NativeInputQueue::finished(JNIEnv* env, jlong finishedToken, bool ignoreSpuriousFinish) {
+    int32_t receiveFd;
+    uint32_t messageSeqNum;
+    parseFinishedToken(finishedToken, &receiveFd, &messageSeqNum);
+
+    { // acquire lock
+        AutoMutex _l(mLock);
+
+        ssize_t connectionIndex = mConnectionsByReceiveFd.indexOfKey(receiveFd);
+        if (connectionIndex < 0) {
+            if (! ignoreSpuriousFinish) {
+                LOGW("Attempted to finish input on channel that is no longer registered.");
+            }
+            return DEAD_OBJECT;
+        }
+
+        sp<Connection> connection = mConnectionsByReceiveFd.valueAt(connectionIndex);
+        if (messageSeqNum != connection->messageSeqNum || ! connection->messageInProgress) {
+            if (! ignoreSpuriousFinish) {
+                LOGW("Attempted to finish input twice on channel '%s'.",
+                        connection->getInputChannelName());
+            }
+            return INVALID_OPERATION;
+        }
+
+        connection->messageInProgress = false;
+
+        status_t status = connection->inputConsumer.sendFinishedSignal();
+        if (status) {
+            LOGW("Failed to send finished signal on channel '%s'.  status=%d",
+                    connection->getInputChannelName(), status);
+            return status;
+        }
+
+#if DEBUG_DISPATCH_CYCLE
+        LOGD("channel '%s' ~ Finished event.",
+                connection->getInputChannelName());
+#endif
+    } // release lock
+
+    return OK;
+}
+
+void NativeInputQueue::handleInputChannelDisposed(JNIEnv* env,
+        jobject inputChannelObj, const sp<InputChannel>& inputChannel, void* data) {
+    LOGW("Input channel object '%s' was disposed without first being unregistered with "
+            "the input queue!", inputChannel->getName().string());
+
+    NativeInputQueue* q = static_cast<NativeInputQueue*>(data);
+    q->unregisterInputChannel(env, inputChannelObj);
+}
+
+bool NativeInputQueue::handleReceiveCallback(int receiveFd, int events, void* data) {
+    NativeInputQueue* q = static_cast<NativeInputQueue*>(data);
+    JNIEnv* env = AndroidRuntime::getJNIEnv();
+
+    sp<Connection> connection;
+    InputEvent* inputEvent;
+    jobject inputHandlerObjLocal;
+    jlong finishedToken;
+    { // acquire lock
+        AutoMutex _l(q->mLock);
+
+        ssize_t connectionIndex = q->mConnectionsByReceiveFd.indexOfKey(receiveFd);
+        if (connectionIndex < 0) {
+            LOGE("Received spurious receive callback for unknown input channel.  "
+                    "fd=%d, events=0x%x", receiveFd, events);
+            return false; // remove the callback
+        }
+
+        connection = q->mConnectionsByReceiveFd.valueAt(connectionIndex);
+        if (events & (POLLERR | POLLHUP | POLLNVAL)) {
+            LOGE("channel '%s' ~ Publisher closed input channel or an error occurred.  "
+                    "events=0x%x", connection->getInputChannelName(), events);
+            return false; // remove the callback
+        }
+
+        if (! (events & POLLIN)) {
+            LOGW("channel '%s' ~ Received spurious callback for unhandled poll event.  "
+                    "events=0x%x", connection->getInputChannelName(), events);
+            return true;
+        }
+
+        status_t status = connection->inputConsumer.receiveDispatchSignal();
+        if (status) {
+            LOGE("channel '%s' ~ Failed to receive dispatch signal.  status=%d",
+                    connection->getInputChannelName(), status);
+            return false; // remove the callback
+        }
+
+        if (connection->messageInProgress) {
+            LOGW("channel '%s' ~ Publisher sent spurious dispatch signal.",
+                    connection->getInputChannelName());
+            return true;
+        }
+
+        status = connection->inputConsumer.consume(& connection->inputEventFactory, & inputEvent);
+        if (status) {
+            LOGW("channel '%s' ~ Failed to consume input event.  status=%d",
+                    connection->getInputChannelName(), status);
+            connection->inputConsumer.sendFinishedSignal();
+            return true;
+        }
+
+        connection->messageInProgress = true;
+        connection->messageSeqNum += 1;
+
+        finishedToken = generateFinishedToken(receiveFd, connection->messageSeqNum);
+
+        inputHandlerObjLocal = env->NewLocalRef(connection->inputHandlerObjGlobal);
+    } // release lock
+
+    // Invoke the handler outside of the lock.
+    //
+    // Note: inputEvent is stored in a field of the connection object which could potentially
+    //       become disposed due to the input channel being unregistered concurrently.
+    //       For this reason, we explicitly keep the connection object alive by holding
+    //       a strong pointer to it within this scope.  We also grabbed a local reference to
+    //       the input handler object itself for the same reason.
+
+    int32_t inputEventType = inputEvent->getType();
+
+    jobject inputEventObj;
+    jmethodID dispatchMethodId;
+    switch (inputEventType) {
+    case AINPUT_EVENT_TYPE_KEY:
+#if DEBUG_DISPATCH_CYCLE
+        LOGD("channel '%s' ~ Received key event.", connection->getInputChannelName());
+#endif
+        inputEventObj = android_view_KeyEvent_fromNative(env,
+                static_cast<KeyEvent*>(inputEvent));
+        dispatchMethodId = gInputQueueClassInfo.dispatchKeyEvent;
+        break;
+
+    case AINPUT_EVENT_TYPE_MOTION:
+#if DEBUG_DISPATCH_CYCLE
+        LOGD("channel '%s' ~ Received motion event.", connection->getInputChannelName());
+#endif
+        inputEventObj = android_view_MotionEvent_fromNative(env,
+                static_cast<MotionEvent*>(inputEvent));
+        dispatchMethodId = gInputQueueClassInfo.dispatchMotionEvent;
+        break;
+
+    default:
+        assert(false); // InputConsumer should prevent this from ever happening
+        inputEventObj = NULL;
+    }
+
+    if (! inputEventObj) {
+        LOGW("channel '%s' ~ Failed to obtain DVM event object.",
+                connection->getInputChannelName());
+        env->DeleteLocalRef(inputHandlerObjLocal);
+        q->finished(env, finishedToken, false);
+        return true;
+    }
+
+#if DEBUG_DISPATCH_CYCLE
+    LOGD("Invoking input handler.");
+#endif
+    env->CallStaticVoidMethod(gInputQueueClassInfo.clazz,
+            dispatchMethodId, inputHandlerObjLocal, inputEventObj,
+            jlong(finishedToken));
+#if DEBUG_DISPATCH_CYCLE
+    LOGD("Returned from input handler.");
+#endif
+
+    if (env->ExceptionCheck()) {
+        LOGE("An exception occurred while invoking the input handler for an event.");
+        LOGE_EX(env);
+        env->ExceptionClear();
+
+        q->finished(env, finishedToken, true /*ignoreSpuriousFinish*/);
+    }
+
+    env->DeleteLocalRef(inputEventObj);
+    env->DeleteLocalRef(inputHandlerObjLocal);
+    return true;
+}
+
+jlong NativeInputQueue::generateFinishedToken(int32_t receiveFd, int32_t messageSeqNum) {
+    return (jlong(receiveFd) << 32) | jlong(messageSeqNum);
+}
+
+void NativeInputQueue::parseFinishedToken(jlong finishedToken,
+        int32_t* outReceiveFd, uint32_t* outMessageIndex) {
+    *outReceiveFd = int32_t(finishedToken >> 32);
+    *outMessageIndex = uint32_t(finishedToken & 0xffffffff);
+}
+
+// ----------------------------------------------------------------------------
+
+NativeInputQueue::Connection::Connection(const sp<InputChannel>& inputChannel, const sp<PollLoop>& pollLoop) :
+    status(STATUS_NORMAL), inputChannel(inputChannel), inputConsumer(inputChannel),
+    pollLoop(pollLoop), inputHandlerObjGlobal(NULL),
+    messageSeqNum(0), messageInProgress(false) {
+}
+
+NativeInputQueue::Connection::~Connection() {
+}
+
+// ----------------------------------------------------------------------------
+
+static NativeInputQueue gNativeInputQueue;
+
+static void android_view_InputQueue_nativeRegisterInputChannel(JNIEnv* env, jclass clazz,
+        jobject inputChannelObj, jobject inputHandlerObj, jobject messageQueueObj) {
+    status_t status = gNativeInputQueue.registerInputChannel(
+            env, inputChannelObj, inputHandlerObj, messageQueueObj);
+    if (status) {
+        jniThrowRuntimeException(env, "Failed to register input channel.  "
+                "Check logs for details.");
+    }
+}
+
+static void android_view_InputQueue_nativeUnregisterInputChannel(JNIEnv* env, jclass clazz,
+        jobject inputChannelObj) {
+    status_t status = gNativeInputQueue.unregisterInputChannel(env, inputChannelObj);
+    if (status) {
+        jniThrowRuntimeException(env, "Failed to unregister input channel.  "
+                "Check logs for details.");
+    }
+}
+
+static void android_view_InputQueue_nativeFinished(JNIEnv* env, jclass clazz,
+        jlong finishedToken) {
+    status_t status = gNativeInputQueue.finished(
+            env, finishedToken, false /*ignoreSpuriousFinish*/);
+    if (status) {
+        jniThrowRuntimeException(env, "Failed to finish input event.  "
+                "Check logs for details.");
+    }
+}
+
+// ----------------------------------------------------------------------------
+
+static JNINativeMethod gInputQueueMethods[] = {
+    /* name, signature, funcPtr */
+    { "nativeRegisterInputChannel",
+            "(Landroid/view/InputChannel;Landroid/view/InputHandler;Landroid/os/MessageQueue;)V",
+            (void*)android_view_InputQueue_nativeRegisterInputChannel },
+    { "nativeUnregisterInputChannel",
+            "(Landroid/view/InputChannel;)V",
+            (void*)android_view_InputQueue_nativeUnregisterInputChannel },
+    { "nativeFinished", "(J)V",
+            (void*)android_view_InputQueue_nativeFinished }
+};
+
+#define FIND_CLASS(var, className) \
+        var = env->FindClass(className); \
+        LOG_FATAL_IF(! var, "Unable to find class " className); \
+        var = jclass(env->NewGlobalRef(var));
+
+#define GET_STATIC_METHOD_ID(var, clazz, methodName, methodDescriptor) \
+        var = env->GetStaticMethodID(clazz, methodName, methodDescriptor); \
+        LOG_FATAL_IF(! var, "Unable to find static method " methodName);
+
+int register_android_view_InputQueue(JNIEnv* env) {
+    int res = jniRegisterNativeMethods(env, "android/view/InputQueue",
+            gInputQueueMethods, NELEM(gInputQueueMethods));
+    LOG_FATAL_IF(res < 0, "Unable to register native methods.");
+
+    FIND_CLASS(gInputQueueClassInfo.clazz, "android/view/InputQueue");
+
+    GET_STATIC_METHOD_ID(gInputQueueClassInfo.dispatchKeyEvent, gInputQueueClassInfo.clazz,
+            "dispatchKeyEvent",
+            "(Landroid/view/InputHandler;Landroid/view/KeyEvent;J)V");
+
+    GET_STATIC_METHOD_ID(gInputQueueClassInfo.dispatchMotionEvent, gInputQueueClassInfo.clazz,
+            "dispatchMotionEvent",
+            "(Landroid/view/InputHandler;Landroid/view/MotionEvent;J)V");
+    return 0;
+}
+
+} // namespace android
diff --git a/core/jni/android_view_KeyEvent.cpp b/core/jni/android_view_KeyEvent.cpp
new file mode 100644
index 0000000..7e7583c
--- /dev/null
+++ b/core/jni/android_view_KeyEvent.cpp
@@ -0,0 +1,143 @@
+/*
+ * Copyright (C) 2010 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#define LOG_TAG "KeyEvent-JNI"
+
+#include "JNIHelp.h"
+
+#include <android_runtime/AndroidRuntime.h>
+#include <utils/Log.h>
+#include <ui/Input.h>
+#include "android_view_KeyEvent.h"
+
+namespace android {
+
+// ----------------------------------------------------------------------------
+
+static struct {
+    jclass clazz;
+
+    jmethodID ctor;
+
+    jfieldID mDeviceId;
+    jfieldID mSource;
+    jfieldID mMetaState;
+    jfieldID mAction;
+    jfieldID mKeyCode;
+    jfieldID mScanCode;
+    jfieldID mRepeatCount;
+    jfieldID mFlags;
+    jfieldID mDownTime;
+    jfieldID mEventTime;
+    jfieldID mCharacters;
+} gKeyEventClassInfo;
+
+// ----------------------------------------------------------------------------
+
+jobject android_view_KeyEvent_fromNative(JNIEnv* env, const KeyEvent* event) {
+    return env->NewObject(gKeyEventClassInfo.clazz, gKeyEventClassInfo.ctor,
+            nanoseconds_to_milliseconds(event->getDownTime()),
+            nanoseconds_to_milliseconds(event->getEventTime()),
+            event->getAction(),
+            event->getKeyCode(),
+            event->getRepeatCount(),
+            event->getMetaState(),
+            event->getDeviceId(),
+            event->getScanCode(),
+            event->getFlags(),
+            event->getSource());
+}
+
+void android_view_KeyEvent_toNative(JNIEnv* env, jobject eventObj,
+        KeyEvent* event) {
+    jint deviceId = env->GetIntField(eventObj, gKeyEventClassInfo.mDeviceId);
+    jint source = env->GetIntField(eventObj, gKeyEventClassInfo.mSource);
+    jint metaState = env->GetIntField(eventObj, gKeyEventClassInfo.mMetaState);
+    jint action = env->GetIntField(eventObj, gKeyEventClassInfo.mAction);
+    jint keyCode = env->GetIntField(eventObj, gKeyEventClassInfo.mKeyCode);
+    jint scanCode = env->GetIntField(eventObj, gKeyEventClassInfo.mScanCode);
+    jint repeatCount = env->GetIntField(eventObj, gKeyEventClassInfo.mRepeatCount);
+    jint flags = env->GetIntField(eventObj, gKeyEventClassInfo.mFlags);
+    jlong downTime = env->GetLongField(eventObj, gKeyEventClassInfo.mDownTime);
+    jlong eventTime = env->GetLongField(eventObj, gKeyEventClassInfo.mEventTime);
+
+    event->initialize(deviceId, source, action, flags, keyCode, scanCode, metaState, repeatCount,
+            milliseconds_to_nanoseconds(downTime),
+            milliseconds_to_nanoseconds(eventTime));
+}
+
+static jboolean native_isSystemKey(JNIEnv* env, jobject clazz, jint keyCode) {
+    return KeyEvent::isSystemKey(keyCode);
+}
+
+static jboolean native_hasDefaultAction(JNIEnv* env, jobject clazz, jint keyCode) {
+    return KeyEvent::hasDefaultAction(keyCode);
+}
+
+// ----------------------------------------------------------------------------
+
+static const JNINativeMethod g_methods[] = {
+    { "native_isSystemKey", "(I)Z", (void*)native_isSystemKey },
+    { "native_hasDefaultAction", "(I)Z", (void*)native_hasDefaultAction },
+};
+
+#define FIND_CLASS(var, className) \
+        var = env->FindClass(className); \
+        LOG_FATAL_IF(! var, "Unable to find class " className); \
+        var = jclass(env->NewGlobalRef(var));
+
+#define GET_METHOD_ID(var, clazz, methodName, fieldDescriptor) \
+        var = env->GetMethodID(clazz, methodName, fieldDescriptor); \
+        LOG_FATAL_IF(! var, "Unable to find method" methodName);
+
+#define GET_FIELD_ID(var, clazz, fieldName, fieldDescriptor) \
+        var = env->GetFieldID(clazz, fieldName, fieldDescriptor); \
+        LOG_FATAL_IF(! var, "Unable to find field " fieldName);
+
+int register_android_view_KeyEvent(JNIEnv* env) {
+    FIND_CLASS(gKeyEventClassInfo.clazz, "android/view/KeyEvent");
+        
+    GET_METHOD_ID(gKeyEventClassInfo.ctor, gKeyEventClassInfo.clazz,
+            "<init>", "(JJIIIIIIII)V");
+
+    GET_FIELD_ID(gKeyEventClassInfo.mDeviceId, gKeyEventClassInfo.clazz,
+            "mDeviceId", "I");
+    GET_FIELD_ID(gKeyEventClassInfo.mSource, gKeyEventClassInfo.clazz,
+            "mSource", "I");
+    GET_FIELD_ID(gKeyEventClassInfo.mMetaState, gKeyEventClassInfo.clazz,
+            "mMetaState", "I");
+    GET_FIELD_ID(gKeyEventClassInfo.mAction, gKeyEventClassInfo.clazz,
+            "mAction", "I");
+    GET_FIELD_ID(gKeyEventClassInfo.mKeyCode, gKeyEventClassInfo.clazz,
+            "mKeyCode", "I");
+    GET_FIELD_ID(gKeyEventClassInfo.mScanCode, gKeyEventClassInfo.clazz,
+            "mScanCode", "I");
+    GET_FIELD_ID(gKeyEventClassInfo.mRepeatCount, gKeyEventClassInfo.clazz,
+            "mRepeatCount", "I");
+    GET_FIELD_ID(gKeyEventClassInfo.mFlags, gKeyEventClassInfo.clazz,
+            "mFlags", "I");
+    GET_FIELD_ID(gKeyEventClassInfo.mDownTime, gKeyEventClassInfo.clazz,
+            "mDownTime", "J");
+    GET_FIELD_ID(gKeyEventClassInfo.mEventTime, gKeyEventClassInfo.clazz,
+            "mEventTime", "J");
+    GET_FIELD_ID(gKeyEventClassInfo.mCharacters, gKeyEventClassInfo.clazz,
+            "mCharacters", "Ljava/lang/String;");
+
+    return AndroidRuntime::registerNativeMethods(
+        env, "android/view/KeyEvent", g_methods, NELEM(g_methods));
+}
+
+} // namespace android
diff --git a/core/jni/android_view_KeyEvent.h b/core/jni/android_view_KeyEvent.h
new file mode 100644
index 0000000..0bd410c
--- /dev/null
+++ b/core/jni/android_view_KeyEvent.h
@@ -0,0 +1,35 @@
+/*
+ * Copyright (C) 2010 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef _ANDROID_VIEW_KEYEVENT_H
+#define _ANDROID_VIEW_KEYEVENT_H
+
+#include "jni.h"
+
+namespace android {
+
+class KeyEvent;
+
+/* Obtains an instance of a DVM KeyEvent object as a copy of a native KeyEvent instance. */
+extern jobject android_view_KeyEvent_fromNative(JNIEnv* env, const KeyEvent* event);
+
+/* Copies the contents of a DVM KeyEvent object to a native KeyEvent instance. */
+extern void android_view_KeyEvent_toNative(JNIEnv* env, jobject eventObj,
+        KeyEvent* event);
+
+} // namespace android
+
+#endif // _ANDROID_OS_KEYEVENT_H
diff --git a/core/jni/android_view_MotionEvent.cpp b/core/jni/android_view_MotionEvent.cpp
new file mode 100644
index 0000000..fe247e8
--- /dev/null
+++ b/core/jni/android_view_MotionEvent.cpp
@@ -0,0 +1,302 @@
+/*
+ * Copyright (C) 2010 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#define LOG_TAG "MotionEvent-JNI"
+
+#include "JNIHelp.h"
+
+#include <android_runtime/AndroidRuntime.h>
+#include <utils/Log.h>
+#include <ui/Input.h>
+#include "android_view_MotionEvent.h"
+
+// Number of float items per entry in a DVM sample data array
+#define NUM_SAMPLE_DATA 9
+
+namespace android {
+
+// ----------------------------------------------------------------------------
+
+static struct {
+    jclass clazz;
+
+    jmethodID obtain;
+    jmethodID recycle;
+
+    jfieldID mDeviceId;
+    jfieldID mSource;
+    jfieldID mDownTimeNano;
+    jfieldID mAction;
+    jfieldID mXOffset;
+    jfieldID mYOffset;
+    jfieldID mXPrecision;
+    jfieldID mYPrecision;
+    jfieldID mEdgeFlags;
+    jfieldID mMetaState;
+    jfieldID mNumPointers;
+    jfieldID mNumSamples;
+    jfieldID mPointerIdentifiers;
+    jfieldID mDataSamples;
+    jfieldID mEventTimeNanoSamples;
+    jfieldID mLastDataSampleIndex;
+    jfieldID mLastEventTimeNanoSampleIndex;
+} gMotionEventClassInfo;
+
+// ----------------------------------------------------------------------------
+
+jobject android_view_MotionEvent_fromNative(JNIEnv* env, const MotionEvent* event) {
+    jint numPointers = jint(event->getPointerCount());
+    jint numHistoricalSamples = jint(event->getHistorySize());
+    jint numSamples = numHistoricalSamples + 1;
+
+    jobject eventObj = env->CallStaticObjectMethod(gMotionEventClassInfo.clazz,
+            gMotionEventClassInfo.obtain, numPointers, numSamples);
+    if (env->ExceptionCheck()) {
+        LOGE("An exception occurred while obtaining a motion event.");
+        LOGE_EX(env);
+        env->ExceptionClear();
+        return NULL;
+    }
+
+    env->SetIntField(eventObj, gMotionEventClassInfo.mDeviceId,
+            event->getDeviceId());
+    env->SetIntField(eventObj, gMotionEventClassInfo.mSource,
+            event->getSource());
+    env->SetLongField(eventObj, gMotionEventClassInfo.mDownTimeNano,
+            event->getDownTime());
+    env->SetIntField(eventObj, gMotionEventClassInfo.mAction,
+            event->getAction());
+    env->SetFloatField(eventObj, gMotionEventClassInfo.mXOffset,
+            event->getXOffset());
+    env->SetFloatField(eventObj, gMotionEventClassInfo.mYOffset,
+            event->getYOffset());
+    env->SetFloatField(eventObj, gMotionEventClassInfo.mXPrecision,
+            event->getXPrecision());
+    env->SetFloatField(eventObj, gMotionEventClassInfo.mYPrecision,
+            event->getYPrecision());
+    env->SetIntField(eventObj, gMotionEventClassInfo.mEdgeFlags,
+            event->getEdgeFlags());
+    env->SetIntField(eventObj, gMotionEventClassInfo.mMetaState,
+            event->getMetaState());
+    env->SetIntField(eventObj, gMotionEventClassInfo.mNumPointers,
+            numPointers);
+    env->SetIntField(eventObj, gMotionEventClassInfo.mNumSamples,
+            numSamples);
+    env->SetIntField(eventObj, gMotionEventClassInfo.mLastDataSampleIndex,
+            (numSamples - 1) * numPointers * NUM_SAMPLE_DATA);
+    env->SetIntField(eventObj, gMotionEventClassInfo.mLastEventTimeNanoSampleIndex,
+            numSamples - 1);
+
+    jintArray pointerIdentifierArray = jintArray(env->GetObjectField(eventObj,
+            gMotionEventClassInfo.mPointerIdentifiers));
+    jfloatArray dataSampleArray = jfloatArray(env->GetObjectField(eventObj,
+            gMotionEventClassInfo.mDataSamples));
+    jlongArray eventTimeNanoSampleArray = jlongArray(env->GetObjectField(eventObj,
+            gMotionEventClassInfo.mEventTimeNanoSamples));
+
+    jint* pointerIdentifiers = (jint*)env->GetPrimitiveArrayCritical(pointerIdentifierArray, NULL);
+    jfloat* dataSamples = (jfloat*)env->GetPrimitiveArrayCritical(dataSampleArray, NULL);
+    jlong* eventTimeNanoSamples = (jlong*)env->GetPrimitiveArrayCritical(
+            eventTimeNanoSampleArray, NULL);
+
+    const int32_t* srcPointerIdentifiers = event->getPointerIds();
+    jint* destPointerIdentifiers = pointerIdentifiers;
+    for (jint i = 0; i < numPointers; i++) {
+        *(destPointerIdentifiers++) = *(srcPointerIdentifiers++);
+    }
+
+    const nsecs_t* srcSampleEventTimes = event->getSampleEventTimes();
+    jlong* destEventTimeNanoSamples = eventTimeNanoSamples;
+    for (jint i = 0; i < numSamples; i++) {
+        *(destEventTimeNanoSamples++) = *(srcSampleEventTimes++);
+    }
+
+    const PointerCoords* srcSamplePointerCoords = event->getSamplePointerCoords();
+    jfloat* destDataSamples = dataSamples;
+    jint numItems = numSamples * numPointers;
+    for (jint i = 0; i < numItems; i++) {
+        *(destDataSamples++) = srcSamplePointerCoords->x;
+        *(destDataSamples++) = srcSamplePointerCoords->y;
+        *(destDataSamples++) = srcSamplePointerCoords->pressure;
+        *(destDataSamples++) = srcSamplePointerCoords->size;
+        *(destDataSamples++) = srcSamplePointerCoords->touchMajor;
+        *(destDataSamples++) = srcSamplePointerCoords->touchMinor;
+        *(destDataSamples++) = srcSamplePointerCoords->toolMajor;
+        *(destDataSamples++) = srcSamplePointerCoords->toolMinor;
+        *(destDataSamples++) = srcSamplePointerCoords->orientation;
+        srcSamplePointerCoords += 1;
+    }
+
+    env->ReleasePrimitiveArrayCritical(pointerIdentifierArray, pointerIdentifiers, 0);
+    env->ReleasePrimitiveArrayCritical(dataSampleArray, dataSamples, 0);
+    env->ReleasePrimitiveArrayCritical(eventTimeNanoSampleArray, eventTimeNanoSamples, 0);
+
+    env->DeleteLocalRef(pointerIdentifierArray);
+    env->DeleteLocalRef(dataSampleArray);
+    env->DeleteLocalRef(eventTimeNanoSampleArray);
+    return eventObj;
+}
+
+void android_view_MotionEvent_toNative(JNIEnv* env, jobject eventObj,
+        MotionEvent* event) {
+    jint deviceId = env->GetIntField(eventObj, gMotionEventClassInfo.mDeviceId);
+    jint source = env->GetIntField(eventObj, gMotionEventClassInfo.mSource);
+    jlong downTimeNano = env->GetLongField(eventObj, gMotionEventClassInfo.mDownTimeNano);
+    jint action = env->GetIntField(eventObj, gMotionEventClassInfo.mAction);
+    jfloat xOffset = env->GetFloatField(eventObj, gMotionEventClassInfo.mXOffset);
+    jfloat yOffset = env->GetFloatField(eventObj, gMotionEventClassInfo.mYOffset);
+    jfloat xPrecision = env->GetFloatField(eventObj, gMotionEventClassInfo.mXPrecision);
+    jfloat yPrecision = env->GetFloatField(eventObj, gMotionEventClassInfo.mYPrecision);
+    jint edgeFlags = env->GetIntField(eventObj, gMotionEventClassInfo.mEdgeFlags);
+    jint metaState = env->GetIntField(eventObj, gMotionEventClassInfo.mMetaState);
+    jint numPointers = env->GetIntField(eventObj, gMotionEventClassInfo.mNumPointers);
+    jint numSamples = env->GetIntField(eventObj, gMotionEventClassInfo.mNumSamples);
+    jintArray pointerIdentifierArray = jintArray(env->GetObjectField(eventObj,
+            gMotionEventClassInfo.mPointerIdentifiers));
+    jfloatArray dataSampleArray = jfloatArray(env->GetObjectField(eventObj,
+            gMotionEventClassInfo.mDataSamples));
+    jlongArray eventTimeNanoSampleArray = jlongArray(env->GetObjectField(eventObj,
+            gMotionEventClassInfo.mEventTimeNanoSamples));
+
+    LOG_FATAL_IF(numPointers == 0, "numPointers was zero");
+    LOG_FATAL_IF(numSamples == 0, "numSamples was zero");
+
+    jint* pointerIdentifiers = (jint*)env->GetPrimitiveArrayCritical(pointerIdentifierArray, NULL);
+    jfloat* dataSamples = (jfloat*)env->GetPrimitiveArrayCritical(dataSampleArray, NULL);
+    jlong* eventTimeNanoSamples = (jlong*)env->GetPrimitiveArrayCritical(
+            eventTimeNanoSampleArray, NULL);
+
+    jfloat* srcDataSamples = dataSamples;
+    jlong* srcEventTimeNanoSamples = eventTimeNanoSamples;
+
+    jlong sampleEventTime = *(srcEventTimeNanoSamples++);
+    PointerCoords samplePointerCoords[MAX_POINTERS];
+    for (jint j = 0; j < numPointers; j++) {
+        samplePointerCoords[j].x = *(srcDataSamples++);
+        samplePointerCoords[j].y = *(srcDataSamples++);
+        samplePointerCoords[j].pressure = *(srcDataSamples++);
+        samplePointerCoords[j].size = *(srcDataSamples++);
+        samplePointerCoords[j].touchMajor = *(srcDataSamples++);
+        samplePointerCoords[j].touchMinor = *(srcDataSamples++);
+        samplePointerCoords[j].toolMajor = *(srcDataSamples++);
+        samplePointerCoords[j].toolMinor = *(srcDataSamples++);
+        samplePointerCoords[j].orientation = *(srcDataSamples++);
+    }
+
+    event->initialize(deviceId, source, action, edgeFlags, metaState,
+            xOffset, yOffset, xPrecision, yPrecision, downTimeNano, sampleEventTime,
+            numPointers, pointerIdentifiers, samplePointerCoords);
+
+    for (jint i = 1; i < numSamples; i++) {
+        sampleEventTime = *(srcEventTimeNanoSamples++);
+        for (jint j = 0; j < numPointers; j++) {
+            samplePointerCoords[j].x = *(srcDataSamples++);
+            samplePointerCoords[j].y = *(srcDataSamples++);
+            samplePointerCoords[j].pressure = *(srcDataSamples++);
+            samplePointerCoords[j].size = *(srcDataSamples++);
+            samplePointerCoords[j].touchMajor = *(srcDataSamples++);
+            samplePointerCoords[j].touchMinor = *(srcDataSamples++);
+            samplePointerCoords[j].toolMajor = *(srcDataSamples++);
+            samplePointerCoords[j].toolMinor = *(srcDataSamples++);
+            samplePointerCoords[j].orientation = *(srcDataSamples++);
+        }
+        event->addSample(sampleEventTime, samplePointerCoords);
+    }
+
+    env->ReleasePrimitiveArrayCritical(pointerIdentifierArray, pointerIdentifiers, JNI_ABORT);
+    env->ReleasePrimitiveArrayCritical(dataSampleArray, dataSamples, JNI_ABORT);
+    env->ReleasePrimitiveArrayCritical(eventTimeNanoSampleArray, eventTimeNanoSamples, JNI_ABORT);
+
+    env->DeleteLocalRef(pointerIdentifierArray);
+    env->DeleteLocalRef(dataSampleArray);
+    env->DeleteLocalRef(eventTimeNanoSampleArray);
+}
+
+void android_view_MotionEvent_recycle(JNIEnv* env, jobject eventObj) {
+    env->CallVoidMethod(eventObj, gMotionEventClassInfo.recycle);
+    if (env->ExceptionCheck()) {
+        LOGW("An exception occurred while recycling a motion event.");
+        LOGW_EX(env);
+        env->ExceptionClear();
+    }
+}
+
+// ----------------------------------------------------------------------------
+
+#define FIND_CLASS(var, className) \
+        var = env->FindClass(className); \
+        LOG_FATAL_IF(! var, "Unable to find class " className); \
+        var = jclass(env->NewGlobalRef(var));
+
+#define GET_STATIC_METHOD_ID(var, clazz, methodName, fieldDescriptor) \
+        var = env->GetStaticMethodID(clazz, methodName, fieldDescriptor); \
+        LOG_FATAL_IF(! var, "Unable to find static method" methodName);
+
+#define GET_METHOD_ID(var, clazz, methodName, fieldDescriptor) \
+        var = env->GetMethodID(clazz, methodName, fieldDescriptor); \
+        LOG_FATAL_IF(! var, "Unable to find method" methodName);
+
+#define GET_FIELD_ID(var, clazz, fieldName, fieldDescriptor) \
+        var = env->GetFieldID(clazz, fieldName, fieldDescriptor); \
+        LOG_FATAL_IF(! var, "Unable to find field " fieldName);
+
+int register_android_view_MotionEvent(JNIEnv* env) {
+    FIND_CLASS(gMotionEventClassInfo.clazz, "android/view/MotionEvent");
+
+    GET_STATIC_METHOD_ID(gMotionEventClassInfo.obtain, gMotionEventClassInfo.clazz,
+            "obtain", "(II)Landroid/view/MotionEvent;");
+    GET_METHOD_ID(gMotionEventClassInfo.recycle, gMotionEventClassInfo.clazz,
+            "recycle", "()V");
+
+    GET_FIELD_ID(gMotionEventClassInfo.mDeviceId, gMotionEventClassInfo.clazz,
+            "mDeviceId", "I");
+    GET_FIELD_ID(gMotionEventClassInfo.mSource, gMotionEventClassInfo.clazz,
+            "mSource", "I");
+    GET_FIELD_ID(gMotionEventClassInfo.mDownTimeNano, gMotionEventClassInfo.clazz,
+            "mDownTimeNano", "J");
+    GET_FIELD_ID(gMotionEventClassInfo.mAction, gMotionEventClassInfo.clazz,
+            "mAction", "I");
+    GET_FIELD_ID(gMotionEventClassInfo.mXOffset, gMotionEventClassInfo.clazz,
+            "mXOffset", "F");
+    GET_FIELD_ID(gMotionEventClassInfo.mYOffset, gMotionEventClassInfo.clazz,
+            "mYOffset", "F");
+    GET_FIELD_ID(gMotionEventClassInfo.mXPrecision, gMotionEventClassInfo.clazz,
+            "mXPrecision", "F");
+    GET_FIELD_ID(gMotionEventClassInfo.mYPrecision, gMotionEventClassInfo.clazz,
+            "mYPrecision", "F");
+    GET_FIELD_ID(gMotionEventClassInfo.mEdgeFlags, gMotionEventClassInfo.clazz,
+            "mEdgeFlags", "I");
+    GET_FIELD_ID(gMotionEventClassInfo.mMetaState, gMotionEventClassInfo.clazz,
+            "mMetaState", "I");
+    GET_FIELD_ID(gMotionEventClassInfo.mNumPointers, gMotionEventClassInfo.clazz,
+            "mNumPointers", "I");
+    GET_FIELD_ID(gMotionEventClassInfo.mNumSamples, gMotionEventClassInfo.clazz,
+            "mNumSamples", "I");
+    GET_FIELD_ID(gMotionEventClassInfo.mPointerIdentifiers, gMotionEventClassInfo.clazz,
+            "mPointerIdentifiers", "[I");
+    GET_FIELD_ID(gMotionEventClassInfo.mDataSamples, gMotionEventClassInfo.clazz,
+            "mDataSamples", "[F");
+    GET_FIELD_ID(gMotionEventClassInfo.mEventTimeNanoSamples, gMotionEventClassInfo.clazz,
+            "mEventTimeNanoSamples", "[J");
+    GET_FIELD_ID(gMotionEventClassInfo.mLastDataSampleIndex, gMotionEventClassInfo.clazz,
+            "mLastDataSampleIndex", "I");
+    GET_FIELD_ID(gMotionEventClassInfo.mLastEventTimeNanoSampleIndex, gMotionEventClassInfo.clazz,
+            "mLastEventTimeNanoSampleIndex", "I");
+
+    return 0;
+}
+
+} // namespace android
diff --git a/core/jni/android_view_MotionEvent.h b/core/jni/android_view_MotionEvent.h
new file mode 100644
index 0000000..86e4bde
--- /dev/null
+++ b/core/jni/android_view_MotionEvent.h
@@ -0,0 +1,38 @@
+/*
+ * Copyright (C) 2010 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef _ANDROID_VIEW_MOTIONEVENT_H
+#define _ANDROID_VIEW_MOTIONEVENT_H
+
+#include "jni.h"
+
+namespace android {
+
+class MotionEvent;
+
+/* Obtains an instance of a DVM MotionEvent object as a copy of a native MotionEvent instance. */
+extern jobject android_view_MotionEvent_fromNative(JNIEnv* env, const MotionEvent* event);
+
+/* Copies the contents of a DVM MotionEvent object to a native MotionEvent instance. */
+extern void android_view_MotionEvent_toNative(JNIEnv* env, jobject eventObj,
+        MotionEvent* event);
+
+/* Recycles a DVM MotionEvent object. */
+extern void android_view_MotionEvent_recycle(JNIEnv* env, jobject eventObj);
+
+} // namespace android
+
+#endif // _ANDROID_OS_KEYEVENT_H
diff --git a/core/jni/android_view_Surface.cpp b/core/jni/android_view_Surface.cpp
index 788374b..c4d6d1b 100644
--- a/core/jni/android_view_Surface.cpp
+++ b/core/jni/android_view_Surface.cpp
@@ -14,20 +14,26 @@
  * limitations under the License.
  */
 
+#define LOG_TAG "Surface"
+
 #include <stdio.h>
 
 #include "android_util_Binder.h"
 
 #include <surfaceflinger/SurfaceComposerClient.h>
+#include <surfaceflinger/Surface.h>
 #include <ui/Region.h>
 #include <ui/Rect.h>
 
+#include <EGL/egl.h>
+
 #include <SkCanvas.h>
 #include <SkBitmap.h>
 #include <SkRegion.h>
 
 #include "jni.h"
 #include <android_runtime/AndroidRuntime.h>
+#include <android_runtime/android_view_Surface.h>
 #include <utils/misc.h>
 
 
@@ -174,6 +180,11 @@
     return result;
 }
 
+sp<ANativeWindow> android_Surface_getNativeWindow(
+        JNIEnv* env, jobject clazz) {
+    return getSurface(env, clazz).get();
+}
+
 static void setSurface(JNIEnv* env, jobject clazz, const sp<Surface>& surface)
 {
     Surface* const p = (Surface*)env->GetIntField(clazz, so.surface);
@@ -225,8 +236,9 @@
         doThrow(env, "java/lang/NullPointerException", NULL);
         return;
     }
-    sp<Surface> rhs = new Surface(*parcel);
-    setSurface(env, clazz, rhs);
+
+    sp<Surface> sur(Surface::readFromParcel(*parcel));
+    setSurface(env, clazz, sur);
 }
 
 static jint Surface_getIdentity(JNIEnv* env, jobject clazz)
@@ -332,7 +344,7 @@
     
     SkRegion clipReg;
     if (dirtyRegion.isRect()) { // very common case
-        const Rect& b(dirtyRegion.getBounds());
+        const Rect b(dirtyRegion.getBounds());
         clipReg.setRect(b.left, b.top, b.right, b.bottom);
     } else {
         size_t count;
@@ -585,7 +597,7 @@
      * a Surface and is necessary for returning the Surface reference to
      * the caller. At this point, we should only have a SurfaceControl.
      */
-    
+
     const sp<SurfaceControl>& surface = getSurfaceControl(env, clazz);
     const sp<SurfaceControl>& rhs = getSurfaceControl(env, other);
     if (!SurfaceControl::isSameSurface(surface, rhs)) {
@@ -604,13 +616,8 @@
         return;
     }
 
-    const sp<Surface>& control(getSurface(env, clazz));
-    sp<Surface> rhs = new Surface(*parcel);
-    if (!Surface::isSameSurface(control, rhs)) {
-        // we reassign the surface only if it's a different one
-        // otherwise we would loose our client-side state.
-        setSurface(env, clazz, rhs);
-    }
+    sp<Surface> sur(Surface::readFromParcel(*parcel));
+    setSurface(env, clazz, sur);
 }
 
 static void Surface_writeToParcel(
@@ -680,7 +687,7 @@
 
 void nativeClassInit(JNIEnv* env, jclass clazz)
 {
-    so.surface = env->GetFieldID(clazz, "mSurface", "I");
+    so.surface = env->GetFieldID(clazz, ANDROID_VIEW_SURFACE_JNI_ID, "I");
     so.surfaceControl = env->GetFieldID(clazz, "mSurfaceControl", "I");
     so.saveCount = env->GetFieldID(clazz, "mSaveCount", "I");
     so.canvas    = env->GetFieldID(clazz, "mCanvas", "Landroid/graphics/Canvas;");
@@ -721,4 +728,3 @@
 }
 
 };
-
diff --git a/core/jni/android_view_ViewRoot.cpp b/core/jni/android_view_ViewRoot.cpp
index 9d62d89..5173bb8 100644
--- a/core/jni/android_view_ViewRoot.cpp
+++ b/core/jni/android_view_ViewRoot.cpp
@@ -16,6 +16,7 @@
 
 #include <stdio.h>
 #include <assert.h>
+#include <sys/socket.h>
 
 #include <core/SkCanvas.h>
 #include <core/SkDevice.h>
@@ -24,6 +25,7 @@
 #include "GraphicsJNI.h"
 
 #include "jni.h"
+#include <nativehelper/JNIHelp.h>
 #include <android_runtime/AndroidRuntime.h>
 #include <utils/misc.h>
 
@@ -78,6 +80,7 @@
     SkGLCanvas::AbandonAllTextures();
 }
 
+
 // ----------------------------------------------------------------------------
 
 const char* const kClassPathName = "android/view/ViewRoot";
diff --git a/core/jni/com_google_android_gles_jni_EGLImpl.cpp b/core/jni/com_google_android_gles_jni_EGLImpl.cpp
index 6a8c4b9..941ed63 100644
--- a/core/jni/com_google_android_gles_jni_EGLImpl.cpp
+++ b/core/jni/com_google_android_gles_jni_EGLImpl.cpp
@@ -16,6 +16,7 @@
 */
 
 #include <android_runtime/AndroidRuntime.h>
+#include <android_runtime/android_view_Surface.h>
 #include <utils/misc.h>
 
 #include <EGL/egl.h>
@@ -95,9 +96,6 @@
     gSurface_NativePixelRefFieldID = _env->GetFieldID(gSurface_class, "mNativePixelRef", "I");
     gConfig_EGLConfigFieldID   = _env->GetFieldID(gConfig_class,  "mEGLConfig",  "I");
 
-    jclass surface_class = _env->FindClass("android/view/Surface");
-    gSurface_SurfaceFieldID = _env->GetFieldID(surface_class, "mSurface", "I");
-
     jclass bitmap_class = _env->FindClass("android/graphics/Bitmap");
     gBitmap_NativeBitmapFieldID = _env->GetFieldID(bitmap_class, "mNativeBitmap", "I");
 }
@@ -325,19 +323,20 @@
     }
     EGLDisplay dpy = getDisplay(_env, display);
     EGLContext cnf = getConfig(_env, config);
-    Surface* window = 0;
+    sp<ANativeWindow> window;
     if (native_window == NULL) {
 not_valid_surface:
         doThrow(_env, "java/lang/IllegalArgumentException",
                 "Make sure the SurfaceView or associated SurfaceHolder has a valid Surface");
         return 0;
     }
-    window = (Surface*)_env->GetIntField(native_window, gSurface_SurfaceFieldID);
+
+    window = android_Surface_getNativeWindow(_env, native_window);
     if (window == NULL)
         goto not_valid_surface;
 
     jint* base = beginNativeAttribList(_env, attrib_list);
-    EGLSurface sur = eglCreateWindowSurface(dpy, cnf, window, base);
+    EGLSurface sur = eglCreateWindowSurface(dpy, cnf, window.get(), base);
     endNativeAttributeList(_env, attrib_list, base);
     return (jint)sur;
 }
diff --git a/core/res/AndroidManifest.xml b/core/res/AndroidManifest.xml
index 2a2208f..82f822f 100644
--- a/core/res/AndroidManifest.xml
+++ b/core/res/AndroidManifest.xml
@@ -80,6 +80,10 @@
     <protected-broadcast android:name="android.bluetooth.device.action.PAIRING_REQUEST" />
     <protected-broadcast android:name="android.bluetooth.device.action.PAIRING_CANCEL" />
 
+    <protected-broadcast android:name="android.hardware.action.USB_CONNECTED" />
+    <protected-broadcast android:name="android.hardware.action.USB_DISCONNECTED" />
+    <protected-broadcast android:name="android.hardware.action.USB_STATE" />
+
     <!-- ====================================== -->
     <!-- Permissions for things that cost money -->
     <!-- ====================================== -->
@@ -436,6 +440,14 @@
         android:label="@string/permlab_flashlight"
         android:description="@string/permdesc_flashlight" />
 
+    <!-- Allows an application to access USB devices
+         @hide -->
+    <permission android:name="android.permission.ACCESS_USB"
+        android:permissionGroup="android.permission-group.HARDWARE_CONTROLS"
+        android:protectionLevel="signatureOrSystem"
+        android:label="@string/permlab_accessUsb"
+        android:description="@string/permdesc_accessUsb" />
+
     <!-- Allows access to hardware peripherals.  Intended only for hardware testing -->
     <permission android:name="android.permission.HARDWARE_TEST"
         android:permissionGroup="android.permission-group.HARDWARE_CONTROLS"
@@ -908,6 +920,13 @@
         android:description="@string/permdesc_statusBar"
         android:protectionLevel="signatureOrSystem" />
 
+    <!-- Allows an application to be the status bar.  Currently used only by SystemUI.apk
+    @hide -->
+    <permission android:name="android.permission.STATUS_BAR_SERVICE"
+        android:label="@string/permlab_statusBarService"
+        android:description="@string/permdesc_statusBarService"
+        android:protectionLevel="signature" />
+
     <!-- Allows an application to force a BACK operation on whatever is the
          top activity. -->
     <permission android:name="android.permission.FORCE_BACK"
@@ -1250,6 +1269,12 @@
                 <category android:name="android.intent.category.DEFAULT" />
             </intent-filter>
         </activity>
+        <activity android:name="com.android.internal.app.HeavyWeightSwitcherActivity"
+                android:theme="@style/Theme.Dialog"
+                android:label="@string/heavy_weight_switcher_title"
+                android:finishOnCloseSystemDialogs="true"
+                android:excludeFromRecents="true">
+        </activity>
         <activity android:name="com.android.internal.app.DisableCarModeActivity"
                 android:theme="@style/Theme.NoDisplay"
                 android:excludeFromRecents="true">
@@ -1263,9 +1288,6 @@
                 <category android:name="android.intent.category.DEFAULT" />
             </intent-filter>
         </activity>
-        <activity android:name="com.android.server.status.UsbStorageActivity"
-                android:excludeFromRecents="true">
-        </activity>
         <activity android:name="com.android.internal.app.ExternalMediaFormatActivity"
                 android:theme="@style/Theme.Dialog.Alert"
                 android:excludeFromRecents="true">
diff --git a/core/res/res/anim/priority_alert_enter.xml b/core/res/res/anim/priority_alert_enter.xml
new file mode 100644
index 0000000..c8ce23c
--- /dev/null
+++ b/core/res/res/anim/priority_alert_enter.xml
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="utf-8"?>
+<set xmlns:android="http://schemas.android.com/apk/res/android"
+        >
+    <scale
+        android:interpolator="@android:anim/overshoot_interpolator"
+        android:fromXScale="0.7" android:toXScale="1.0"
+        android:fromYScale="0.7" android:toYScale="1.0"
+        android:pivotX="50%" android:pivotY="50%"
+        android:duration="@android:integer/config_shortAnimTime" />
+    <alpha 
+        android:interpolator="@android:anim/decelerate_interpolator"
+        android:fromAlpha="0.0" android:toAlpha="1.0"
+        android:duration="@android:integer/config_shortAnimTime" />
+</set>
diff --git a/core/res/res/anim/priority_alert_exit.xml b/core/res/res/anim/priority_alert_exit.xml
new file mode 100644
index 0000000..b538cb2
--- /dev/null
+++ b/core/res/res/anim/priority_alert_exit.xml
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="utf-8"?>
+<set xmlns:android="http://schemas.android.com/apk/res/android"
+        >
+    <scale
+        android:interpolator="@android:anim/accelerate_interpolator"
+        android:fromXScale="1.0" android:toXScale="0.7"
+        android:fromYScale="1.0" android:toYScale="0.7"
+        android:pivotX="50%" android:pivotY="50%"
+        android:duration="@android:integer/config_shortAnimTime" />
+    <alpha 
+        android:interpolator="@android:anim/accelerate_interpolator"
+        android:fromAlpha="1.0" android:toAlpha="0.0"
+        android:duration="@android:integer/config_shortAnimTime" />
+</set>
diff --git a/core/res/res/drawable-hdpi/battery_charge_fill_empty.9.png b/core/res/res/drawable-hdpi/battery_charge_fill_empty.9.png
deleted file mode 100644
index c4e70a8..0000000
--- a/core/res/res/drawable-hdpi/battery_charge_fill_empty.9.png
+++ /dev/null
Binary files differ
diff --git a/core/res/res/drawable-hdpi/battery_charge_fill_full.9.png b/core/res/res/drawable-hdpi/battery_charge_fill_full.9.png
deleted file mode 100644
index ac66f5a..0000000
--- a/core/res/res/drawable-hdpi/battery_charge_fill_full.9.png
+++ /dev/null
Binary files differ
diff --git a/core/res/res/drawable-hdpi/battery_charge_fill_warning.9.png b/core/res/res/drawable-hdpi/battery_charge_fill_warning.9.png
deleted file mode 100644
index 32d99c6..0000000
--- a/core/res/res/drawable-hdpi/battery_charge_fill_warning.9.png
+++ /dev/null
Binary files differ
diff --git a/core/res/res/drawable-hdpi/presence_audio_away.png b/core/res/res/drawable-hdpi/presence_audio_away.png
new file mode 100644
index 0000000..fb5e123
--- /dev/null
+++ b/core/res/res/drawable-hdpi/presence_audio_away.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/presence_audio_busy.png b/core/res/res/drawable-hdpi/presence_audio_busy.png
new file mode 100644
index 0000000..81aeb01
--- /dev/null
+++ b/core/res/res/drawable-hdpi/presence_audio_busy.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/presence_audio_online.png b/core/res/res/drawable-hdpi/presence_audio_online.png
new file mode 100644
index 0000000..553acbb
--- /dev/null
+++ b/core/res/res/drawable-hdpi/presence_audio_online.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/presence_away.png b/core/res/res/drawable-hdpi/presence_away.png
index d4aa66b..84b00bb 100644
--- a/core/res/res/drawable-hdpi/presence_away.png
+++ b/core/res/res/drawable-hdpi/presence_away.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/presence_busy.png b/core/res/res/drawable-hdpi/presence_busy.png
index 4b27853..d77a463 100644
--- a/core/res/res/drawable-hdpi/presence_busy.png
+++ b/core/res/res/drawable-hdpi/presence_busy.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/presence_invisible.png b/core/res/res/drawable-hdpi/presence_invisible.png
index 0e27fba..0d83e70a 100644
--- a/core/res/res/drawable-hdpi/presence_invisible.png
+++ b/core/res/res/drawable-hdpi/presence_invisible.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/presence_offline.png b/core/res/res/drawable-hdpi/presence_offline.png
index e511aa4..2619e9f 100644
--- a/core/res/res/drawable-hdpi/presence_offline.png
+++ b/core/res/res/drawable-hdpi/presence_offline.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/presence_online.png b/core/res/res/drawable-hdpi/presence_online.png
index d787d2f..7e846ef 100644
--- a/core/res/res/drawable-hdpi/presence_online.png
+++ b/core/res/res/drawable-hdpi/presence_online.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/presence_video_away.png b/core/res/res/drawable-hdpi/presence_video_away.png
new file mode 100644
index 0000000..ab5493b
--- /dev/null
+++ b/core/res/res/drawable-hdpi/presence_video_away.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/presence_video_busy.png b/core/res/res/drawable-hdpi/presence_video_busy.png
new file mode 100644
index 0000000..456cdb0
--- /dev/null
+++ b/core/res/res/drawable-hdpi/presence_video_busy.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/presence_video_online.png b/core/res/res/drawable-hdpi/presence_video_online.png
new file mode 100644
index 0000000..bd9f8a4
--- /dev/null
+++ b/core/res/res/drawable-hdpi/presence_video_online.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/stat_sys_data_bluetooth.png b/core/res/res/drawable-hdpi/stat_sys_data_bluetooth.png
index 96dc085..7a8b78f 100644
--- a/core/res/res/drawable-hdpi/stat_sys_data_bluetooth.png
+++ b/core/res/res/drawable-hdpi/stat_sys_data_bluetooth.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/stat_sys_phone_call_bluetooth.png b/core/res/res/drawable-hdpi/stat_sys_phone_call_bluetooth.png
deleted file mode 100644
index 2d13237..0000000
--- a/core/res/res/drawable-hdpi/stat_sys_phone_call_bluetooth.png
+++ /dev/null
Binary files differ
diff --git a/core/res/res/drawable-hdpi/stat_sys_vp_phone_call_bluetooth.png b/core/res/res/drawable-hdpi/stat_sys_vp_phone_call_bluetooth.png
deleted file mode 100644
index 2d13237..0000000
--- a/core/res/res/drawable-hdpi/stat_sys_vp_phone_call_bluetooth.png
+++ /dev/null
Binary files differ
diff --git a/core/res/res/drawable-hdpi/status_bar_background.png b/core/res/res/drawable-hdpi/status_bar_background.png
index e6a865a..3d00cd0 100644
--- a/core/res/res/drawable-hdpi/status_bar_background.png
+++ b/core/res/res/drawable-hdpi/status_bar_background.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/status_bar_close_on.9.png b/core/res/res/drawable-hdpi/status_bar_close_on.9.png
index 5acf638..f313ffb 100644
--- a/core/res/res/drawable-hdpi/status_bar_close_on.9.png
+++ b/core/res/res/drawable-hdpi/status_bar_close_on.9.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/status_bar_header_background.9.png b/core/res/res/drawable-hdpi/status_bar_header_background.9.png
index be36ff2..37b5fef 100644
--- a/core/res/res/drawable-hdpi/status_bar_header_background.9.png
+++ b/core/res/res/drawable-hdpi/status_bar_header_background.9.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/statusbar_background.9.png b/core/res/res/drawable-hdpi/statusbar_background.9.png
index dcca695..a4be298 100644
--- a/core/res/res/drawable-hdpi/statusbar_background.9.png
+++ b/core/res/res/drawable-hdpi/statusbar_background.9.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/battery_charge_fill_empty.9.png b/core/res/res/drawable-mdpi/battery_charge_fill_empty.9.png
deleted file mode 100644
index 9ed20ba..0000000
--- a/core/res/res/drawable-mdpi/battery_charge_fill_empty.9.png
+++ /dev/null
Binary files differ
diff --git a/core/res/res/drawable-mdpi/battery_charge_fill_full.9.png b/core/res/res/drawable-mdpi/battery_charge_fill_full.9.png
deleted file mode 100644
index 8e6aaca..0000000
--- a/core/res/res/drawable-mdpi/battery_charge_fill_full.9.png
+++ /dev/null
Binary files differ
diff --git a/core/res/res/drawable-mdpi/battery_charge_fill_warning.9.png b/core/res/res/drawable-mdpi/battery_charge_fill_warning.9.png
deleted file mode 100644
index d3287db..0000000
--- a/core/res/res/drawable-mdpi/battery_charge_fill_warning.9.png
+++ /dev/null
Binary files differ
diff --git a/core/res/res/drawable-mdpi/presence_audio_away.png b/core/res/res/drawable-mdpi/presence_audio_away.png
new file mode 100644
index 0000000..db96754
--- /dev/null
+++ b/core/res/res/drawable-mdpi/presence_audio_away.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/presence_audio_busy.png b/core/res/res/drawable-mdpi/presence_audio_busy.png
new file mode 100644
index 0000000..0a29948
--- /dev/null
+++ b/core/res/res/drawable-mdpi/presence_audio_busy.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/presence_audio_online.png b/core/res/res/drawable-mdpi/presence_audio_online.png
new file mode 100644
index 0000000..df415ba
--- /dev/null
+++ b/core/res/res/drawable-mdpi/presence_audio_online.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/presence_away.png b/core/res/res/drawable-mdpi/presence_away.png
index f8120df..f98e908 100644
--- a/core/res/res/drawable-mdpi/presence_away.png
+++ b/core/res/res/drawable-mdpi/presence_away.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/presence_busy.png b/core/res/res/drawable-mdpi/presence_busy.png
index 9d7620b..933261f4 100644
--- a/core/res/res/drawable-mdpi/presence_busy.png
+++ b/core/res/res/drawable-mdpi/presence_busy.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/presence_invisible.png b/core/res/res/drawable-mdpi/presence_invisible.png
index 21399a4..8d72756 100644
--- a/core/res/res/drawable-mdpi/presence_invisible.png
+++ b/core/res/res/drawable-mdpi/presence_invisible.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/presence_offline.png b/core/res/res/drawable-mdpi/presence_offline.png
index 3941b82..fc78396 100644
--- a/core/res/res/drawable-mdpi/presence_offline.png
+++ b/core/res/res/drawable-mdpi/presence_offline.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/presence_online.png b/core/res/res/drawable-mdpi/presence_online.png
index 22d5683..943eee0 100644
--- a/core/res/res/drawable-mdpi/presence_online.png
+++ b/core/res/res/drawable-mdpi/presence_online.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/presence_video_away.png b/core/res/res/drawable-mdpi/presence_video_away.png
new file mode 100644
index 0000000..f3ec5d4
--- /dev/null
+++ b/core/res/res/drawable-mdpi/presence_video_away.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/presence_video_busy.png b/core/res/res/drawable-mdpi/presence_video_busy.png
new file mode 100644
index 0000000..7379e00
--- /dev/null
+++ b/core/res/res/drawable-mdpi/presence_video_busy.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/presence_video_online.png b/core/res/res/drawable-mdpi/presence_video_online.png
new file mode 100644
index 0000000..24ceb39
--- /dev/null
+++ b/core/res/res/drawable-mdpi/presence_video_online.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/stat_sys_phone_call_bluetooth.png b/core/res/res/drawable-mdpi/stat_sys_phone_call_bluetooth.png
deleted file mode 100644
index 7abfd19..0000000
--- a/core/res/res/drawable-mdpi/stat_sys_phone_call_bluetooth.png
+++ /dev/null
Binary files differ
diff --git a/core/res/res/drawable-mdpi/stat_sys_vp_phone_call_bluetooth.png b/core/res/res/drawable-mdpi/stat_sys_vp_phone_call_bluetooth.png
deleted file mode 100644
index 7abfd19..0000000
--- a/core/res/res/drawable-mdpi/stat_sys_vp_phone_call_bluetooth.png
+++ /dev/null
Binary files differ
diff --git a/core/res/res/drawable/battery_charge_fill.xml b/core/res/res/drawable/battery_charge_fill.xml
deleted file mode 100644
index 7f65733..0000000
--- a/core/res/res/drawable/battery_charge_fill.xml
+++ /dev/null
@@ -1,22 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2008 The Android Open Source Project
-
-     Licensed under the Apache License, Version 2.0 (the "License");
-     you may not use this file except in compliance with the License.
-     You may obtain a copy of the License at
-  
-          http://www.apache.org/licenses/LICENSE-2.0
-  
-     Unless required by applicable law or agreed to in writing, software
-     distributed under the License is distributed on an "AS IS" BASIS,
-     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-     See the License for the specific language governing permissions and
-     limitations under the License.
--->
-
-<level-list xmlns:android="http://schemas.android.com/apk/res/android">
-    <item android:maxLevel="29" android:drawable="@android:drawable/battery_charge_fill_empty" />
-    <item android:maxLevel="49" android:drawable="@android:drawable/battery_charge_fill_warning" />
-    <item android:maxLevel="100" android:drawable="@android:drawable/battery_charge_fill_full" />
-</level-list>
-
diff --git a/core/res/res/drawable/stat_sys_gps_acquiring_anim.xml b/core/res/res/drawable/stat_sys_gps_acquiring_anim.xml
deleted file mode 100644
index 954c19c..0000000
--- a/core/res/res/drawable/stat_sys_gps_acquiring_anim.xml
+++ /dev/null
@@ -1,25 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-/*
-**
-** Copyright 2008, The Android Open Source Project
-**
-** Licensed under the Apache License, Version 2.0 (the "License");
-** you may not use this file except in compliance with the License.
-** You may obtain a copy of the License at
-**
-**     http://www.apache.org/licenses/LICENSE-2.0
-**
-** Unless required by applicable law or agreed to in writing, software
-** distributed under the License is distributed on an "AS IS" BASIS,
-** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-** See the License for the specific language governing permissions and
-** limitations under the License.
-*/
--->
-<animation-list
-        xmlns:android="http://schemas.android.com/apk/res/android"
-        android:oneshot="false">
-    <item android:drawable="@drawable/stat_sys_gps_acquiring" android:duration="500" />
-    <item android:drawable="@drawable/stat_sys_gps_on" android:duration="500" />
-</animation-list>
diff --git a/core/res/res/drawable/status_bar_item_background.xml b/core/res/res/drawable/status_bar_item_background.xml
index 088389b..425a502 100644
--- a/core/res/res/drawable/status_bar_item_background.xml
+++ b/core/res/res/drawable/status_bar_item_background.xml
@@ -16,7 +16,7 @@
 
 <selector xmlns:android="http://schemas.android.com/apk/res/android">
     <item android:state_pressed="true"
-    	android:drawable="@drawable/status_bar_item_background_pressed" />
+        android:drawable="@drawable/status_bar_item_background_pressed" />
     <item android:state_focused="true" android:state_pressed="false"
         android:drawable="@drawable/status_bar_item_background_focus" />
     <item android:drawable="@drawable/status_bar_item_background_normal" />
diff --git a/core/res/res/drawable/status_icon_background.xml b/core/res/res/drawable/status_icon_background.xml
deleted file mode 100644
index 9846165..0000000
--- a/core/res/res/drawable/status_icon_background.xml
+++ /dev/null
@@ -1,24 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-/* //device/apps/common/res/drawable/status_icon_background.xml
-**
-** Copyright 2007, The Android Open Source Project
-**
-** Licensed under the Apache License, Version 2.0 (the "License"); 
-** you may not use this file except in compliance with the License. 
-** You may obtain a copy of the License at 
-**
-**     http://www.apache.org/licenses/LICENSE-2.0 
-**
-** Unless required by applicable law or agreed to in writing, software 
-** distributed under the License is distributed on an "AS IS" BASIS, 
-** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 
-** See the License for the specific language governing permissions and 
-** limitations under the License.
-*/
--->
-
-<selector xmlns:android="http://schemas.android.com/apk/res/android">
-    <item android:state_selected="true" android:drawable="@drawable/icon_highlight_rectangle" />
-    <item android:drawable="@color/transparent" />
-</selector>
diff --git a/core/res/res/layout/battery_status.xml b/core/res/res/layout/battery_status.xml
deleted file mode 100644
index 7cfec05..0000000
--- a/core/res/res/layout/battery_status.xml
+++ /dev/null
@@ -1,81 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2008 The Android Open Source Project
-
-     Licensed under the Apache License, Version 2.0 (the "License");
-     you may not use this file except in compliance with the License.
-     You may obtain a copy of the License at
-  
-          http://www.apache.org/licenses/LICENSE-2.0
-  
-     Unless required by applicable law or agreed to in writing, software
-     distributed under the License is distributed on an "AS IS" BASIS,
-     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-     See the License for the specific language governing permissions and
-     limitations under the License.
--->
-
-<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
-    android:id="@+id/frame"
-    android:layout_width="wrap_content"
-    android:layout_height="wrap_content"
-    android:orientation="vertical"
-    android:gravity="center_horizontal"
-    >
-    
-    <FrameLayout
-        android:layout_width="141px" 
-        android:layout_height="184px"
-        android:background="@drawable/battery_charge_background"
-        android:paddingTop="25px"
-        android:paddingLeft="1px"
-        >
-
-        <LinearLayout
-            android:id="@+id/meter"
-            android:layout_width="match_parent"
-            android:layout_height="match_parent"
-            android:orientation="vertical"
-            >
-
-            <ImageView
-                android:layout_width="match_parent"
-                android:layout_height="15dip"
-                />
-            <ImageView
-                android:id="@+id/spacer"
-                android:layout_width="wrap_content"
-                android:layout_height="wrap_content"
-                />
-            <ImageView
-                android:id="@+id/level"
-                android:layout_width="wrap_content"
-                android:layout_height="wrap_content"
-            />
-        
-        </LinearLayout>
-
-        <TextView android:id="@+id/level_percent"
-            android:layout_width="match_parent"
-            android:layout_height="match_parent"
-            android:textStyle="bold"
-            android:textSize="48dp"
-            android:textColor="#ffffffff"
-            android:gravity="center"
-            />
-    </FrameLayout>
-
-    <TextView android:id="@+id/status"
-        android:paddingTop="35dp"
-        android:layout_width="wrap_content"
-        android:layout_height="wrap_content"
-        android:singleLine="true"
-        android:textStyle="bold"
-        android:textSize="30dp"
-        android:textColor="#ffffffff"
-        android:gravity="center_horizontal"
-        android:text="@string/battery_status_charging"
-        />
-
-</LinearLayout>
-
-
diff --git a/core/res/res/layout/heavy_weight_switcher.xml b/core/res/res/layout/heavy_weight_switcher.xml
new file mode 100644
index 0000000..9acf009
--- /dev/null
+++ b/core/res/res/layout/heavy_weight_switcher.xml
@@ -0,0 +1,145 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2010 The Android Open Source Project
+
+     Licensed under the Apache License, Version 2.0 (the "License");
+     you may not use this file except in compliance with the License.
+     You may obtain a copy of the License at
+  
+          http://www.apache.org/licenses/LICENSE-2.0
+  
+     Unless required by applicable law or agreed to in writing, software
+     distributed under the License is distributed on an "AS IS" BASIS,
+     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     See the License for the specific language governing permissions and
+     limitations under the License.
+-->
+
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    android:orientation="vertical" android:padding="4dp"
+    android:gravity="center_horizontal"
+    android:layout_width="wrap_content" android:layout_height="wrap_content">
+
+    <TextView
+        android:layout_width="match_parent" android:layout_height="wrap_content"
+        android:layout_weight="0"
+        android:paddingBottom="8dp"
+        android:text="@string/heavy_weight_switcher_text"/>
+
+    <ImageView android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:scaleType="fitXY"
+        android:src="?android:listDivider" />
+            
+    <LinearLayout android:id="@+id/switch_old"
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:minHeight="?android:attr/listPreferredItemHeight"
+        android:orientation="horizontal"
+        android:background="@android:drawable/list_selector_background"
+        android:paddingRight="3dip"
+        android:paddingLeft="3dip"
+        android:paddingTop="5dip"
+        android:paddingBottom="14dip"
+        android:gravity="center_vertical"
+        android:focusable="true" >
+    
+        <ImageView android:id="@+id/old_app_icon"
+            android:layout_width="@android:dimen/app_icon_size"
+            android:layout_height="@android:dimen/app_icon_size"
+            android:layout_marginRight="11dip"
+            android:layout_gravity="center_vertical"
+            android:scaleType="fitCenter"/>
+    
+        <LinearLayout
+            android:orientation="vertical"
+            android:layout_width="match_parent"
+            android:layout_height="wrap_content"
+            android:duplicateParentState="true" >
+            <TextView android:id="@+id/old_app_action"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:textAppearance="?android:attr/textAppearanceMedium"
+                android:textStyle="bold"
+                android:singleLine="true"
+                android:layout_marginBottom="2dip"
+                android:duplicateParentState="true" />
+            <TextView android:id="@+id/old_app_description"
+                android:layout_marginTop="-4dip"
+                android:layout_gravity="center_vertical"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:textAppearance="?android:attr/textAppearanceSmall"
+                android:duplicateParentState="true" />
+        </LinearLayout>
+    </LinearLayout>
+
+    <ImageView android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:scaleType="fitXY"
+        android:src="?android:listDivider" />
+            
+    <LinearLayout android:id="@+id/switch_new"
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:minHeight="?android:attr/listPreferredItemHeight"
+        android:orientation="horizontal"
+        android:background="@android:drawable/list_selector_background"
+        android:paddingRight="3dip"
+        android:paddingLeft="3dip"
+        android:paddingTop="5dip"
+        android:paddingBottom="8dip"
+        android:gravity="center_vertical"
+        android:focusable="true" >
+    
+        <ImageView android:id="@+id/new_app_icon"
+            android:layout_width="@android:dimen/app_icon_size"
+            android:layout_height="@android:dimen/app_icon_size"
+            android:layout_marginRight="11dip"
+            android:layout_gravity="center_vertical"
+            android:scaleType="fitCenter"/>
+    
+        <LinearLayout
+            android:orientation="vertical"
+            android:layout_width="match_parent"
+            android:layout_height="wrap_content"
+            android:duplicateParentState="true" >
+            <TextView android:id="@+id/new_app_action"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:textAppearance="?android:attr/textAppearanceMedium"
+                android:textStyle="bold"
+                android:singleLine="true"
+                android:layout_marginBottom="2dip"
+                android:duplicateParentState="true" />
+            <TextView android:id="@+id/new_app_description"
+                android:layout_marginTop="-4dip"
+                android:layout_gravity="center_vertical"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:textAppearance="?android:attr/textAppearanceSmall"
+                android:duplicateParentState="true" />
+        </LinearLayout>
+    </LinearLayout>
+
+    <ImageView android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:scaleType="fitXY"
+        android:src="?android:listDivider" />
+
+    <TextView android:id="@+id/cancel"
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:minHeight="?android:attr/listPreferredItemHeight"
+        android:textAppearance="?android:attr/textAppearanceMedium"
+        android:background="@android:drawable/list_selector_background"
+        android:paddingRight="6dip"
+        android:paddingLeft="6dip"
+        android:paddingTop="5dip"
+        android:paddingBottom="8dip"
+        android:textStyle="bold"
+        android:singleLine="true"
+        android:gravity="center"
+        android:focusable="true"
+        android:text="@string/cancel" />
+
+</LinearLayout>
diff --git a/core/res/res/layout/keyguard_screen_tab_unlock.xml b/core/res/res/layout/keyguard_screen_tab_unlock.xml
index 200a1b2..6edbdf9 100644
--- a/core/res/res/layout/keyguard_screen_tab_unlock.xml
+++ b/core/res/res/layout/keyguard_screen_tab_unlock.xml
@@ -41,7 +41,6 @@
         android:ellipsize="marquee"
         android:gravity="right|bottom"
         android:textAppearance="?android:attr/textAppearanceMedium"
-        android:textSize="22sp"
         />
 
     <!-- "emergency calls only" shown when sim is missing or PUKd -->
@@ -65,7 +64,7 @@
         android:layout_below="@id/carrier"
         android:layout_marginTop="52dip"
         android:layout_marginLeft="20dip"
-        android:paddingBottom="8dip"
+        android:layout_marginBottom="8dip"
         >
 
         <TextView android:id="@+id/timeDisplay"
diff --git a/core/res/res/layout/keyguard_screen_tab_unlock_land.xml b/core/res/res/layout/keyguard_screen_tab_unlock_land.xml
index 23505c2..e66b492 100644
--- a/core/res/res/layout/keyguard_screen_tab_unlock_land.xml
+++ b/core/res/res/layout/keyguard_screen_tab_unlock_land.xml
@@ -46,7 +46,6 @@
             android:ellipsize="marquee"
             android:gravity="right|bottom"
             android:textAppearance="?android:attr/textAppearanceMedium"
-            android:textSize="22sp"
             />
 
         <!-- "emergency calls only" shown when sim is missing or PUKd -->
@@ -66,7 +65,7 @@
             android:layout_height="wrap_content"
             android:layout_below="@id/carrier"
             android:layout_marginTop="56dip"
-            android:paddingBottom="8dip"
+            android:layout_marginBottom="8dip"
             >
 
             <TextView android:id="@+id/timeDisplay"
diff --git a/core/res/res/layout/keyguard_screen_unlock_landscape.xml b/core/res/res/layout/keyguard_screen_unlock_landscape.xml
index b5cd442..c1b406f 100644
--- a/core/res/res/layout/keyguard_screen_unlock_landscape.xml
+++ b/core/res/res/layout/keyguard_screen_unlock_landscape.xml
@@ -58,19 +58,18 @@
             android:ellipsize="marquee"
             android:gravity="right|bottom"
             />
-
         <com.android.internal.widget.DigitalClock android:id="@+id/time"
             android:layout_width="wrap_content"
             android:layout_height="wrap_content"
             android:layout_alignParentTop="true"
             android:layout_alignParentLeft="true"
             android:layout_marginTop="8dip"
-            android:paddingBottom="8dip"
             >
 
             <TextView android:id="@+id/timeDisplay"
                 android:layout_width="wrap_content"
                 android:layout_height="wrap_content"
+                android:gravity="bottom"
                 android:singleLine="true"
                 android:ellipsize="none"
                 android:textSize="72sp"
@@ -85,9 +84,8 @@
 
             <TextView android:id="@+id/am_pm"
                 android:layout_width="wrap_content"
-                android:layout_height="wrap_content"
-                android:layout_toRightOf="@id/timeDisplay"
-                android:layout_alignBaseline="@id/timeDisplay"
+                android:layout_height="match_parent"
+                android:gravity="bottom"
                 android:singleLine="true"
                 android:ellipsize="none"
                 android:textSize="22sp"
diff --git a/core/res/res/layout/keyguard_screen_unlock_portrait.xml b/core/res/res/layout/keyguard_screen_unlock_portrait.xml
index 9ac0a47..74a0eee 100644
--- a/core/res/res/layout/keyguard_screen_unlock_portrait.xml
+++ b/core/res/res/layout/keyguard_screen_unlock_portrait.xml
@@ -55,12 +55,12 @@
             android:layout_alignParentTop="true"
             android:layout_marginTop="15dip"
             android:layout_marginLeft="20dip"
-            android:paddingBottom="8dip"
             >
 
             <TextView android:id="@+id/timeDisplay"
                 android:layout_width="wrap_content"
                 android:layout_height="wrap_content"
+                android:gravity="bottom"
                 android:singleLine="true"
                 android:ellipsize="none"
                 android:textSize="56sp"
@@ -74,9 +74,8 @@
 
             <TextView android:id="@+id/am_pm"
                 android:layout_width="wrap_content"
-                android:layout_height="wrap_content"
-                android:layout_toRightOf="@id/timeDisplay"
-                android:layout_alignBaseline="@id/timeDisplay"
+                android:layout_height="match_parent"
+                android:gravity="bottom"
                 android:singleLine="true"
                 android:ellipsize="none"
                 android:textSize="18sp"
diff --git a/core/res/res/layout/status_bar.xml b/core/res/res/layout/status_bar.xml
deleted file mode 100644
index e8d8866..0000000
--- a/core/res/res/layout/status_bar.xml
+++ /dev/null
@@ -1,103 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-/* apps/common/assets/default/default/skins/StatusBar.xml
-**
-** Copyright 2006, The Android Open Source Project
-**
-** Licensed under the Apache License, Version 2.0 (the "License"); 
-** you may not use this file except in compliance with the License. 
-** You may obtain a copy of the License at 
-**
-**     http://www.apache.org/licenses/LICENSE-2.0 
-**
-** Unless required by applicable law or agreed to in writing, software 
-** distributed under the License is distributed on an "AS IS" BASIS, 
-** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 
-** See the License for the specific language governing permissions and 
-** limitations under the License.
-*/
--->
-
-<!--    android:background="@drawable/status_bar_closed_default_background" -->
-<com.android.server.status.StatusBarView xmlns:android="http://schemas.android.com/apk/res/android" 
-    android:background="@drawable/statusbar_background"
-    android:orientation="vertical"
-    android:focusable="true"
-    android:descendantFocusability="afterDescendants"
-    >
-
-    <LinearLayout android:id="@+id/icons"
-        android:layout_width="match_parent"
-        android:layout_height="match_parent"
-        android:orientation="horizontal">
-            
-        <com.android.server.status.IconMerger android:id="@+id/notificationIcons"
-            android:layout_width="0dip"
-            android:layout_weight="1"
-            android:layout_height="match_parent"
-            android:layout_alignParentLeft="true"
-            android:paddingLeft="6dip"
-            android:gravity="center_vertical"
-            android:orientation="horizontal"/>  
-            
-        <LinearLayout android:id="@+id/statusIcons"
-            android:layout_width="wrap_content"
-            android:layout_height="match_parent"
-            android:layout_alignParentRight="true"
-            android:paddingRight="6dip"
-            android:gravity="center_vertical"
-            android:orientation="horizontal"/>    
-    </LinearLayout>
-        
-    <LinearLayout android:id="@+id/ticker"
-        android:layout_width="match_parent"
-        android:layout_height="match_parent"
-        android:paddingLeft="6dip"
-        android:animationCache="false"
-        android:orientation="horizontal" >
-        <ImageSwitcher android:id="@+id/tickerIcon"
-            android:layout_width="wrap_content"
-            android:layout_height="match_parent"
-            android:layout_marginRight="8dip"
-            >
-            <com.android.server.status.AnimatedImageView
-                android:layout_width="25dip"
-                android:layout_height="25dip"
-                />
-            <com.android.server.status.AnimatedImageView
-                android:layout_width="25dip"
-                android:layout_height="25dip"
-                />
-        </ImageSwitcher>
-        <com.android.server.status.TickerView android:id="@+id/tickerText"
-            android:layout_width="0dip"
-            android:layout_weight="1"
-            android:layout_height="wrap_content"
-            android:paddingTop="2dip"
-            android:paddingRight="10dip">
-            <TextView
-                android:layout_width="match_parent"
-                android:layout_height="wrap_content"
-                android:singleLine="true"
-                android:textColor="#ff000000" />
-            <TextView
-                android:layout_width="match_parent"
-                android:layout_height="wrap_content"
-                android:singleLine="true"
-                android:textColor="#ff000000" />
-        </com.android.server.status.TickerView>
-    </LinearLayout>
-
-    <com.android.server.status.DateView android:id="@+id/date"
-        android:layout_width="wrap_content"
-        android:layout_height="match_parent"
-        android:singleLine="true"
-        android:textSize="16sp"
-        android:textStyle="bold"
-        android:gravity="center_vertical|left"
-        android:paddingLeft="6px"
-        android:paddingRight="6px"
-        android:textColor="?android:attr/textColorPrimaryInverse"
-        android:background="@drawable/statusbar_background"
-        />
-</com.android.server.status.StatusBarView>
diff --git a/core/res/res/layout/status_bar_expanded.xml b/core/res/res/layout/status_bar_expanded.xml
deleted file mode 100644
index 30138a7..0000000
--- a/core/res/res/layout/status_bar_expanded.xml
+++ /dev/null
@@ -1,144 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-/* apps/common/assets/default/default/skins/StatusBar.xml
-**
-** Copyright 2006, The Android Open Source Project
-**
-** Licensed under the Apache License, Version 2.0 (the "License"); 
-** you may not use this file except in compliance with the License. 
-** You may obtain a copy of the License at 
-**
-**     http://www.apache.org/licenses/LICENSE-2.0 
-**
-** Unless required by applicable law or agreed to in writing, software 
-** distributed under the License is distributed on an "AS IS" BASIS, 
-** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 
-** See the License for the specific language governing permissions and 
-** limitations under the License.
-*/
--->
-
-<com.android.server.status.ExpandedView xmlns:android="http://schemas.android.com/apk/res/android"
-    android:orientation="vertical"
-    android:focusable="true"
-    android:descendantFocusability="afterDescendants"
-    >
-
-    <LinearLayout
-        android:layout_width="match_parent"
-        android:layout_height="wrap_content"
-        android:orientation="horizontal"
-        android:paddingTop="3dp"
-        android:paddingBottom="5dp"
-        android:paddingRight="3dp"
-        android:background="@drawable/status_bar_header_background"
-        >
-        <LinearLayout
-            android:layout_width="0dp"
-            android:layout_height="wrap_content"
-            android:layout_weight="1"
-            android:layout_marginTop="1dp"
-            android:layout_marginLeft="5dp"
-            android:layout_gravity="center_vertical"
-            android:paddingBottom="1dp"
-            android:orientation="vertical"
-            >
-                <TextView android:id="@+id/plmnLabel"
-                    android:layout_width="wrap_content"
-                    android:layout_height="wrap_content"
-                    android:layout_gravity="center_vertical"
-                    android:textAppearance="?android:attr/textAppearanceLarge"
-                    android:textColor="?android:attr/textColorSecondaryInverse"
-                    android:paddingLeft="4dp"
-                    />
-                <TextView android:id="@+id/spnLabel"
-                    android:layout_width="wrap_content"
-                    android:layout_height="wrap_content"
-                    android:layout_gravity="center_vertical"
-                    android:textAppearance="?android:attr/textAppearanceLarge"
-                    android:textColor="?android:attr/textColorSecondaryInverse"
-                    android:paddingLeft="4dp"
-                    />
-        </LinearLayout>
-        <TextView android:id="@+id/clear_all_button"
-            android:layout_width="wrap_content"
-            android:layout_height="wrap_content"
-            android:layout_gravity="center_vertical"
-            android:layout_marginTop="4dp"
-            android:layout_marginBottom="1dp"
-            android:textSize="14sp"
-            android:textColor="#ff000000"
-            android:text="@string/status_bar_clear_all_button"
-            style="?android:attr/buttonStyle"
-            android:paddingLeft="15dp"
-            android:paddingRight="15dp"
-            android:background="@drawable/btn_default_small"
-            />
-    </LinearLayout>
-
-    <FrameLayout
-        android:layout_width="match_parent" 
-        android:layout_height="wrap_content"
-        android:layout_weight="1"
-        >
-        <ScrollView
-            android:id="@+id/scroll"
-            android:layout_width="match_parent"
-            android:layout_height="match_parent"
-            android:fadingEdge="none"
-            >
-            <com.android.server.status.NotificationLinearLayout
-                android:id="@+id/notificationLinearLayout"
-                android:layout_width="match_parent"
-                android:layout_height="wrap_content"
-                android:orientation="vertical"
-                >
-                
-                <TextView android:id="@+id/noNotificationsTitle"
-                    android:layout_width="match_parent"
-                    android:layout_height="wrap_content"
-                    android:background="@drawable/title_bar_portrait"
-                    android:paddingLeft="5dp"
-                    android:textAppearance="@style/TextAppearance.StatusBarTitle"
-                    android:text="@string/status_bar_no_notifications_title"
-                    />
-
-                <TextView android:id="@+id/ongoingTitle"
-                    android:layout_width="match_parent"
-                    android:layout_height="wrap_content"
-                    android:background="@drawable/title_bar_portrait"
-                    android:paddingLeft="5dp"
-                    android:textAppearance="@style/TextAppearance.StatusBarTitle"
-                    android:text="@string/status_bar_ongoing_events_title"
-                    />
-                <LinearLayout android:id="@+id/ongoingItems"
-                    android:layout_width="match_parent"
-                    android:layout_height="wrap_content"
-                    android:orientation="vertical"
-                    />
-
-                <TextView android:id="@+id/latestTitle"
-                    android:layout_width="match_parent"
-                    android:layout_height="wrap_content"
-                    android:background="@drawable/title_bar_portrait"
-                    android:paddingLeft="5dp"
-                    android:textAppearance="@style/TextAppearance.StatusBarTitle"
-                    android:text="@string/status_bar_latest_events_title"
-                    />
-                <LinearLayout android:id="@+id/latestItems"
-                    android:layout_width="match_parent"
-                    android:layout_height="wrap_content"
-                    android:orientation="vertical"
-                    />
-            </com.android.server.status.NotificationLinearLayout>
-        </ScrollView>
-
-        <ImageView
-            android:layout_width="match_parent"
-            android:layout_height="match_parent"
-            android:src="@drawable/title_bar_shadow"
-            android:scaleType="fitXY"
-        />
-
-    </FrameLayout>
-</com.android.server.status.ExpandedView>
diff --git a/core/res/res/layout/status_bar_icon.xml b/core/res/res/layout/status_bar_icon.xml
deleted file mode 100644
index 0536792..0000000
--- a/core/res/res/layout/status_bar_icon.xml
+++ /dev/null
@@ -1,46 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-/* apps/common/assets/default/default/skins/StatusBar.xml
-**
-** Copyright 2006, The Android Open Source Project
-**
-** Licensed under the Apache License, Version 2.0 (the "License"); 
-** you may not use this file except in compliance with the License. 
-** You may obtain a copy of the License at 
-**
-**     http://www.apache.org/licenses/LICENSE-2.0 
-**
-** Unless required by applicable law or agreed to in writing, software 
-** distributed under the License is distributed on an "AS IS" BASIS, 
-** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 
-** See the License for the specific language governing permissions and 
-** limitations under the License.
-*/
--->
-
-<!-- The icons are a fixed size so an app can't mess everything up with bogus images -->
-<!-- TODO: the icons are hard coded to 25x25 pixels.  Their size should come froem a theme -->
-<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android" 
-    android:layout_width="25dp" 
-    android:layout_height="25dp"
-    >
-
-    <com.android.server.status.AnimatedImageView android:id="@+id/image"
-        android:layout_width="match_parent" 
-        android:layout_height="match_parent"
-        />
-
-    <TextView android:id="@+id/number"
-        android:layout_width="wrap_content" 
-        android:layout_height="wrap_content"
-        android:layout_gravity="right|bottom"
-        android:layout_marginRight="1dp"
-        android:layout_marginBottom="1dp"
-        android:textSize="10sp"
-        android:textColor="#ffffffff"
-        android:background="@drawable/ic_notification_overlay"
-        android:gravity="center"
-        android:textStyle="bold"
-        />
-
-</FrameLayout>
diff --git a/core/res/res/layout/status_bar_latest_event.xml b/core/res/res/layout/status_bar_latest_event.xml
deleted file mode 100644
index 59cc90d..0000000
--- a/core/res/res/layout/status_bar_latest_event.xml
+++ /dev/null
@@ -1,24 +0,0 @@
-<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
-    android:layout_width="match_parent"
-    android:layout_height="65sp"
-    android:orientation="vertical"
-    >
-
-    <com.android.server.status.LatestItemView android:id="@+id/content"
-            android:layout_width="match_parent"
-            android:layout_height="64sp"
-            android:background="@drawable/status_bar_item_background"
-            android:focusable="true"
-            android:clickable="true"
-            android:paddingRight="6sp"
-            >
-    </com.android.server.status.LatestItemView>
-
-    <View
-        android:layout_width="match_parent"
-        android:layout_height="1sp"
-        android:background="@drawable/divider_horizontal_bright"
-        />
-
-</LinearLayout>
-
diff --git a/core/res/res/layout/status_bar_latest_event_content.xml b/core/res/res/layout/status_bar_latest_event_content.xml
index c3aa041..c64b90e 100644
--- a/core/res/res/layout/status_bar_latest_event_content.xml
+++ b/core/res/res/layout/status_bar_latest_event_content.xml
@@ -12,22 +12,22 @@
         android:orientation="horizontal"
         android:paddingTop="3dp"
         >
-        <com.android.server.status.AnimatedImageView android:id="@+id/icon"
+        <!--com.android.server.status.AnimatedImageView android:id="@+id/icon" -->
+        <ImageView android:id="@+id/icon"
             android:layout_width="25dp"
             android:layout_height="25dp"
             android:scaleType="fitCenter"
             android:src="@drawable/arrow_down_float"/>
         <TextView android:id="@+id/title"
+            android:textAppearance="@style/TextAppearance.StatusBar.EventContent.Title"
             android:layout_width="match_parent"
             android:layout_height="wrap_content"
             android:layout_weight="1"
             android:singleLine="true"
             android:ellipsize="marquee"
             android:fadingEdge="horizontal"
-            android:textStyle="bold"
-            android:textSize="18sp"
             android:paddingLeft="4dp"
-            android:textColor="#ff000000" />
+            />
     </LinearLayout>
     <LinearLayout
         android:layout_width="match_parent"
@@ -35,23 +35,22 @@
         android:orientation="horizontal"
         >
         <TextView android:id="@+id/text"
+            android:textAppearance="@style/TextAppearance.StatusBar.EventContent"
             android:layout_width="wrap_content"
             android:layout_height="wrap_content"
             android:layout_weight="1"
-            android:textColor="#ff000000"
             android:singleLine="true"
             android:ellipsize="marquee"
             android:fadingEdge="horizontal"
-            android:textSize="14sp"
             android:paddingLeft="4dp"
             />
         <android.widget.DateTimeView android:id="@+id/time"
+            android:textAppearance="@style/TextAppearance.StatusBar.EventContent"
             android:layout_marginLeft="4dp"
             android:layout_width="wrap_content"
             android:layout_height="wrap_content"
             android:singleLine="true"
-            android:textSize="14sp"
             android:paddingRight="5dp"
-            android:textColor="#ff000000" />
+            />
     </LinearLayout>
 </LinearLayout>
diff --git a/core/res/res/layout/status_bar_tracking.xml b/core/res/res/layout/status_bar_tracking.xml
deleted file mode 100644
index c0a7a97..0000000
--- a/core/res/res/layout/status_bar_tracking.xml
+++ /dev/null
@@ -1,48 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-    Copyright (C) 2008 The Android Open Source Project
-
-    Licensed under the Apache License, Version 2.0 (the "License");
-    you may not use this file except in compliance with the License.
-    You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-    Unless required by applicable law or agreed to in writing, software
-    distributed under the License is distributed on an "AS IS" BASIS,
-    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-    See the License for the specific language governing permissions and
-    limitations under the License.
--->
-
-<com.android.server.status.TrackingView xmlns:android="http://schemas.android.com/apk/res/android"
-    android:orientation="vertical"
-    android:visibility="gone"
-    android:focusable="true"
-    android:descendantFocusability="afterDescendants"
-    android:paddingBottom="0px"
-    android:paddingLeft="0px"
-    android:paddingRight="0px"
-    >
-
-    <com.android.server.status.TrackingPatternView
-        android:layout_width="match_parent"
-        android:layout_height="wrap_content"
-        android:layout_weight="1"
-        />
-
-    <com.android.server.status.CloseDragHandle android:id="@+id/close"
-        android:layout_width="match_parent"
-        android:layout_height="wrap_content"
-        android:orientation="vertical"
-        >
-        <ImageView
-            android:layout_width="match_parent"
-            android:layout_height="wrap_content"
-            android:layout_gravity="bottom"
-            android:scaleType="fitXY"
-            android:src="@drawable/status_bar_close_on"/>
-
-    </com.android.server.status.CloseDragHandle>
-
-</com.android.server.status.TrackingView>
diff --git a/core/res/res/values/arrays.xml b/core/res/res/values/arrays.xml
index 4672c0e..aeee8af 100644
--- a/core/res/res/values/arrays.xml
+++ b/core/res/res/values/arrays.xml
@@ -117,28 +117,4 @@
         <item>3</item>
     </integer-array>
 
-    <!-- Do not translate. Defines the slots for the right-hand side icons.  That is to say, the
-         icons in the status bar that are not notifications. -->
-    <string-array name="status_bar_icon_order">
-        <item><xliff:g id="id">clock</xliff:g></item>
-        <item><xliff:g id="id">secure</xliff:g></item>
-        <item><xliff:g id="id">alarm_clock</xliff:g></item>
-        <item><xliff:g id="id">battery</xliff:g></item>
-        <item><xliff:g id="id">phone_signal</xliff:g></item>
-        <item><xliff:g id="id">phone_evdo_signal</xliff:g></item>
-        <item><xliff:g id="id">data_connection</xliff:g></item>
-        <item><xliff:g id="id">cdma_eri</xliff:g></item>
-        <item><xliff:g id="id">tty</xliff:g></item>
-        <item><xliff:g id="id">volume</xliff:g></item>
-        <item><xliff:g id="id">mute</xliff:g></item>
-        <item><xliff:g id="id">speakerphone</xliff:g></item>
-        <item><xliff:g id="id">wifi</xliff:g></item>
-        <item><xliff:g id="id">tty</xliff:g></item>
-        <item><xliff:g id="id">bluetooth</xliff:g></item>
-        <item><xliff:g id="id">gps</xliff:g></item>
-        <item><xliff:g id="id">sync_active</xliff:g></item>
-        <item><xliff:g id="id">sync_failing</xliff:g></item>
-        <item><xliff:g id="id">ime</xliff:g></item>
-    </string-array>
-
 </resources>
diff --git a/core/res/res/values/attrs.xml b/core/res/res/values/attrs.xml
old mode 100644
new mode 100755
index 6d6c47f..d16b91c
--- a/core/res/res/values/attrs.xml
+++ b/core/res/res/values/attrs.xml
@@ -916,6 +916,25 @@
         <enum name="KEYCODE_MEDIA_REWIND" value="89" />
         <enum name="KEYCODE_MEDIA_FAST_FORWARD" value="90" />
         <enum name="KEYCODE_MUTE" value="91" />
+        <enum name="KEYCODE_PAGE_UP" value="92" />
+        <enum name="KEYCODE_PAGE_DOWN" value="93" />
+        <enum name="KEYCODE_PICTSYMBOLS" value="94" />
+        <enum name="KEYCODE_SWITCH_CHARSET" value="95" />
+        <enum name="KEYCODE_BUTTON_A" value="96" />
+        <enum name="KEYCODE_BUTTON_B" value="97" />
+        <enum name="KEYCODE_BUTTON_C" value="98" />
+        <enum name="KEYCODE_BUTTON_X" value="99" />
+        <enum name="KEYCODE_BUTTON_Y" value="100" />
+        <enum name="KEYCODE_BUTTON_Z" value="101" />
+        <enum name="KEYCODE_BUTTON_L1" value="102" />
+        <enum name="KEYCODE_BUTTON_R1" value="103" />
+        <enum name="KEYCODE_BUTTON_L2" value="104" />
+        <enum name="KEYCODE_BUTTON_R2" value="105" />
+        <enum name="KEYCODE_BUTTON_THUMBL" value="106" />
+        <enum name="KEYCODE_BUTTON_THUMBR" value="107" />
+        <enum name="KEYCODE_BUTTON_START" value="108" />
+        <enum name="KEYCODE_BUTTON_SELECT" value="109" />
+        <enum name="KEYCODE_BUTTON_MODE" value="110" />
     </attr>
 
     <!-- ***************************************************************** -->
diff --git a/core/res/res/values/attrs_manifest.xml b/core/res/res/values/attrs_manifest.xml
index ed7447c..f18d14e 100644
--- a/core/res/res/values/attrs_manifest.xml
+++ b/core/res/res/values/attrs_manifest.xml
@@ -62,6 +62,22 @@
          a reference to a Drawable resource containing the image definition. -->
     <attr name="icon" format="reference" />
 
+    <!-- A Drawable resource providing an extended graphical logo for its
+         associated item. Use with the application tag (to supply a default
+         logo for all application components), or with the activity, receiver,
+         service, or instrumentation tag (to supply a specific logo for that
+         component). It may also be used with the intent-filter tag to supply
+         a logo to show to the user when an activity is being selected based
+         on a particular Intent.
+
+         <p>The given logo will be used to display to the user a graphical
+         representation of its associated component; for example as the
+         header in the Action Bar. The primary differences between an icon
+         and a logo are that logos are often wider and more detailed, and are
+         used without an accompanying text caption. This must be a reference
+         to a Drawable resource containing the image definition. -->
+    <attr name="logo" format="reference" />
+
     <!-- Name of the activity to be launched to manage application's space on
          device. The specified activity gets automatically launched when the
          application's space needs to be managed and is usually invoked 
@@ -79,6 +95,13 @@
          by applications. -->
     <attr name="allowClearUserData" format="boolean" />
 
+    <!-- Option to let applications specify that user data should
+         never be encrypted if an Encrypted File System solution
+         is enabled. Specifically, this is an "opt-out" feature, meaning
+         that, by default, user data will be encrypted if the EFS feature
+         is enabled. -->
+    <attr name="neverEncrypt" format="boolean" />
+
     <!-- Option to indicate this application is only for testing purposes.
          For example, it may expose functionality or data outside of itself
          that would cause a security hole, but is useful for testing.  This
@@ -375,6 +398,10 @@
          participate in data synchronization. -->
     <attr name="syncable" format="boolean" />
     
+    <!-- Flag declaring this activity to be 'immersive'; immersive activities
+         should not be interrupted with other activities or notifications. -->
+    <attr name="immersive" format="boolean" />
+
     <!-- Specify the order in which content providers hosted by a process
          are instantiated when that process is created.  Not needed unless
          you have providers with dependencies between each other, to make
@@ -688,6 +715,7 @@
         <attr name="theme" />
         <attr name="label" />
         <attr name="icon" />
+        <attr name="logo" />
         <attr name="description" />
         <attr name="permission" />
         <attr name="process" />
@@ -715,6 +743,16 @@
         <attr name="killAfterRestore" />
         <attr name="restoreNeedsApplication" />
         <attr name="restoreAnyVersion" />
+        <attr name="neverEncrypt" />
+        <!-- Declare that this is a heavy-weight application.  This kind of
+             application is not able to save and restore its state on demand,
+             so can not participate in the normal activity lifecycle.  It will
+             not be killed while in the background; the user must explicitly
+             quit it.  Only one such app can be running at a time; if the user
+             tries to launch a second heavy-weight app, they will be prompted
+             to quit the first before doing so.  While a heavy-weight
+             application is running, the user will be informed of this. -->
+        <attr name="heavyWeight" format="boolean" />
     </declare-styleable>
     
     <!-- The <code>permission</code> tag declares a security permission that can be
@@ -734,6 +772,7 @@
         <attr name="name" />
         <attr name="label" />
         <attr name="icon" />
+        <attr name="logo" />
         <attr name="permissionGroup" />
         <attr name="description" />
         <attr name="protectionLevel" />
@@ -758,6 +797,7 @@
         <attr name="name" />
         <attr name="label" />
         <attr name="icon" />
+        <attr name="logo" />
         <attr name="description" />
     </declare-styleable>
     
@@ -787,6 +827,7 @@
         <attr name="name" />
         <attr name="label" />
         <attr name="icon" />
+        <attr name="logo" />
     </declare-styleable>
     
     <!-- The <code>uses-permission</code> tag requests a
@@ -937,6 +978,8 @@
              screen, so that it retains the dimensions it was originally
              designed for. -->
         <attr name="largeScreens" format="boolean" />
+        <!-- Indicates whether the application supports extra large screen form-factors. -->
+        <attr name="xlargeScreens" format="boolean" />
         <!-- Indicates whether the application can resize itself to newer
              screen sizes.  This is mostly used to distinguish between old
              applications that may not be compatible with newly introduced
@@ -989,6 +1032,7 @@
         <attr name="label" />
         <attr name="description" />
         <attr name="icon" />
+        <attr name="logo" />
         <attr name="process" />
         <attr name="authorities" />
         <attr name="syncable" />
@@ -1068,6 +1112,7 @@
         <attr name="label" />
         <attr name="description" />
         <attr name="icon" />
+        <attr name="logo" />
         <attr name="permission" />
         <attr name="process" />
         <!-- Specify whether the service is enabled or not (that is, can be instantiated by the system).
@@ -1100,6 +1145,7 @@
         <attr name="label" />
         <attr name="description" />
         <attr name="icon" />
+        <attr name="logo" />
         <attr name="permission" />
         <attr name="process" />
         <!-- Specify whether the receiver is enabled or not (that is, can be instantiated by the system).
@@ -1132,6 +1178,7 @@
         <attr name="label" />
         <attr name="description" />
         <attr name="icon" />
+        <attr name="logo" />
         <attr name="launchMode" />
         <attr name="screenOrientation" />
         <attr name="configChanges" />
@@ -1157,6 +1204,7 @@
              this activity.  A value besides "unspecified" here overrides
              any value in the theme. -->
         <attr name="windowSoftInputMode" />
+        <attr name="immersive" />
     </declare-styleable>
     
     <!-- The <code>activity-alias</code> tag declares a new
@@ -1185,6 +1233,7 @@
         <attr name="label" />
         <attr name="description" />
         <attr name="icon" />
+        <attr name="logo" />
         <attr name="permission" />
         <!-- Specify whether the activity-alias is enabled or not (that is, can be instantiated by the system).
              It can also be specified for an application as a whole, in which case a value of "false"
@@ -1254,6 +1303,7 @@
          parent="AndroidManifestActivity AndroidManifestReceiver AndroidManifestService">
         <attr name="label" />
         <attr name="icon" />
+        <attr name="logo" />
         <attr name="priority" />
     </declare-styleable>
     
@@ -1360,6 +1410,7 @@
         <attr name="targetPackage" />
         <attr name="label" />
         <attr name="icon" />
+        <attr name="logo" />
         <attr name="handleProfiling" />
         <attr name="functionalTest" />
     </declare-styleable>
diff --git a/core/res/res/values/config.xml b/core/res/res/values/config.xml
index 088ab44..d565c68 100644
--- a/core/res/res/values/config.xml
+++ b/core/res/res/values/config.xml
@@ -19,7 +19,35 @@
 
 <!-- These resources are around just to allow their values to be customized
      for different hardware and product builds. -->
-<resources>
+<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+    <!-- Component to be used as the status bar service.  Must implement the IStatusBar
+         interface.  This name is in the ComponentName flattened format (package/class)  -->
+    <string name="config_statusBarComponent">com.android.systemui/com.android.systemui.statusbar.StatusBarService</string>
+
+    <!-- Do not translate. Defines the slots for the right-hand side icons.  That is to say, the
+         icons in the status bar that are not notifications. -->
+    <string-array name="config_statusBarIcons">
+       <item><xliff:g id="id">ime</xliff:g></item>
+       <item><xliff:g id="id">sync_failing</xliff:g></item>
+       <item><xliff:g id="id">sync_active</xliff:g></item>
+       <item><xliff:g id="id">gps</xliff:g></item>
+       <item><xliff:g id="id">bluetooth</xliff:g></item>
+       <item><xliff:g id="id">tty</xliff:g></item>
+       <item><xliff:g id="id">speakerphone</xliff:g></item>
+       <item><xliff:g id="id">mute</xliff:g></item>
+       <item><xliff:g id="id">volume</xliff:g></item>
+       <item><xliff:g id="id">tty</xliff:g></item>
+       <item><xliff:g id="id">wifi</xliff:g></item>
+       <item><xliff:g id="id">cdma_eri</xliff:g></item>
+       <item><xliff:g id="id">data_connection</xliff:g></item>
+       <item><xliff:g id="id">phone_evdo_signal</xliff:g></item>
+       <item><xliff:g id="id">phone_signal</xliff:g></item>
+       <item><xliff:g id="id">battery</xliff:g></item>
+       <item><xliff:g id="id">alarm_clock</xliff:g></item>
+       <item><xliff:g id="id">secure</xliff:g></item>
+       <item><xliff:g id="id">clock</xliff:g></item>
+    </string-array>
+
     <!-- Flag indicating whether the surface flinger has limited
          alpha compositing functionality in hardware.  If set, the window
          manager will disable alpha trasformation in animations where not
@@ -230,9 +258,6 @@
     <!-- Allow the menu hard key to be disabled in LockScreen on some devices -->
     <bool name="config_disableMenuKeyInLockScreen">false</bool>
 
-    <!-- Control whether status bar should distinguish HSPA data icon form UMTS data icon on devices -->
-    <bool name="config_hspa_data_distinguishable">false</bool>
-
     <!-- Array of light sensor LUX values to define our levels for auto backlight brightness support.
          The N entries of this array define N + 1 zones as follows:
 
diff --git a/core/res/res/values/dimens.xml b/core/res/res/values/dimens.xml
index 8a92757..11f3e50 100644
--- a/core/res/res/values/dimens.xml
+++ b/core/res/res/values/dimens.xml
@@ -19,15 +19,19 @@
 -->
 <resources>
     <!-- The width that is used when creating thumbnails of applications. -->
-    <dimen name="thumbnail_width">84dp</dimen>
+    <dimen name="thumbnail_width">0dp</dimen>
     <!-- The height that is used when creating thumbnails of applications. -->
-    <dimen name="thumbnail_height">63dp</dimen>
+    <dimen name="thumbnail_height">0dp</dimen>
     <!-- The standard size (both width and height) of an application icon that
          will be displayed in the app launcher and elsewhere. -->
     <dimen name="app_icon_size">48dip</dimen>
     <dimen name="toast_y_offset">64dip</dimen>
     <!-- Height of the status bar -->
     <dimen name="status_bar_height">25dip</dimen>
+    <!-- Height of the status bar -->
+    <dimen name="status_bar_icon_size">25dip</dimen>
+    <!-- Margin at the edge of the screen to ignore touch events for in the windowshade. -->
+    <dimen name="status_bar_edge_ignore">5dp</dimen>
     <!-- Size of the fastscroll hint letter -->
     <dimen name="fastscroll_overlay_size">104dp</dimen>
     <!-- Width of the fastscroll thumb -->
@@ -38,6 +42,4 @@
     <dimen name="password_keyboard_key_height">56dip</dimen>
     <!-- Default correction for the space key in the password keyboard -->
     <dimen name="password_keyboard_spacebar_vertical_correction">4dip</dimen>
-    <!-- Margin at the edge of the screen to ignore touch events for in the windowshade. -->
-    <dimen name="status_bar_edge_ignore">5dp</dimen>
 </resources>
diff --git a/core/res/res/values/public.xml b/core/res/res/values/public.xml
index 98c3a0a..bd65fee 100644
--- a/core/res/res/values/public.xml
+++ b/core/res/res/values/public.xml
@@ -869,8 +869,11 @@
   <public type="drawable" name="stat_sys_download" id="0x01080081" />
   <public type="drawable" name="stat_sys_download_done" id="0x01080082" />
   <public type="drawable" name="stat_sys_headset" id="0x01080083" />
+  <!-- @deprecated Replaced by a private asset in the phone app. -->
   <public type="drawable" name="stat_sys_phone_call" id="0x01080084" />
+  <!-- @deprecated Replaced by a private asset in the phone app. -->
   <public type="drawable" name="stat_sys_phone_call_forward" id="0x01080085" />
+  <!-- @deprecated Replaced by a private asset in the phone app. -->
   <public type="drawable" name="stat_sys_phone_call_on_hold" id="0x01080086" />
   <public type="drawable" name="stat_sys_speakerphone" id="0x01080087" />
   <public type="drawable" name="stat_sys_upload" id="0x01080088" />
@@ -1132,7 +1135,9 @@
   <public type="style" name="Widget.ProgressBar.Large.Inverse" id="0x0103005c" />
   <public type="style" name="Widget.ProgressBar.Small.Inverse" id="0x0103005d" />
 
+  <!-- @deprecated Replaced by a private asset in the phone app. -->
   <public type="drawable" name="stat_sys_vp_phone_call" id="0x010800a7" />
+  <!-- @deprecated Replaced by a private asset in the phone app. -->
   <public type="drawable" name="stat_sys_vp_phone_call_on_hold" id="0x010800a8" />
 
   <public type="anim" name="anticipate_interpolator" id="0x010a0007" />
@@ -1239,4 +1244,34 @@
     
   <public type="anim" name="cycle_interpolator" id="0x010a000c" />
 
+<!-- ===============================================================
+     Resources introduced in kraken.
+     =============================================================== -->
+     
+  <public type="attr" name="logo" id="0x010102be" />
+  <public type="attr" name="xlargeScreens" id="0x010102bf" />
+  <public type="attr" name="heavyWeight" id="0x010102c0" />
+  <public type="attr" name="immersive" id="0x010102c1" />
+  <public-padding type="attr" name="kraken_resource_pad" end="0x01010300" />
+  
+  <public-padding type="id" name="kraken_resource_pad" end="0x01020040" />
+  <public-padding type="anim" name="kraken_resource_pad" end="0x010a0020" />
+
+  <!-- presence drawables for videochat or audiochat capable contacts -->
+  <public type="drawable" name="presence_video_away" id="0x010800ac" />
+  <public type="drawable" name="presence_video_busy" id="0x010800ad" />
+  <public type="drawable" name="presence_video_online" id="0x010800ae" />
+  <public type="drawable" name="presence_audio_away" id="0x010800af" />
+  <public type="drawable" name="presence_audio_busy" id="0x010800b0" />
+  <public type="drawable" name="presence_audio_online" id="0x010800b1" />  
+  <public-padding type="drawable" name="kraken_resource_pad" end="0x01080100" />
+  
+  <public-padding type="style" name="kraken_resource_pad" end="0x01030090" />
+  <public-padding type="string" name="kraken_resource_pad" end="0x01040020" />
+  <public-padding type="integer" name="kraken_resource_pad" end="0x010e0010" />
+  <public-padding type="layout" name="kraken_resource_pad" end="0x01090020" />
+  <public-padding type="dimen" name="kraken_resource_pad" end="0x01050010" />
+  <public-padding type="color" name="kraken_resource_pad" end="0x01060020" />
+  <public-padding type="array" name="kraken_resource_pad" end="0x01070010" />
+
 </resources>
diff --git a/core/res/res/values/strings.xml b/core/res/res/values/strings.xml
index 86bfe94..62fd169 100644
--- a/core/res/res/values/strings.xml
+++ b/core/res/res/values/strings.xml
@@ -60,6 +60,10 @@
     <!-- Displayed when the user dialed an MMI code whose function
          could not be performed. This will be displayed in a toast. -->
     <string name="mmiError">Connection problem or invalid MMI code.</string>
+    <!-- Displayed when the user dialed an MMI code whose function
+         could not be performed because FDN is enabled. This will be displayed in a toast. -->
+    <string name="mmiFdnError">Operation is restricted to fixed dialing numbers only.</string>
+
     <!-- Displayed when a phone feature such as call barring was activated. -->
     <string name="serviceEnabled">Service was enabled.</string>
     <!-- Displayed in front of the list of a set of service classes
@@ -389,6 +393,11 @@
         the status bar or add and remove system icons.</string>
 
     <!-- Title of an application permission, listed so the user can choose whether they want to allow the application to do this. -->
+    <string name="permlab_statusBarService">status bar</string>
+    <!-- Description of an application permission, listed so the user can choose whether they want to allow the application to do this. -->
+    <string name="permdesc_statusBarService">Allows the application to be the status bar.</string>
+
+    <!-- Title of an application permission, listed so the user can choose whether they want to allow the application to do this. -->
     <string name="permlab_expandStatusBar">expand/collapse status bar</string>
     <!-- Description of an application permission, listed so the user can choose whether they want to allow the application to do this. -->
     <string name="permdesc_expandStatusBar">Allows application to
@@ -863,9 +872,9 @@
         the audio record path.</string>
 
     <!-- Title of an application permission, listed so the user can choose whether they want to allow the application to do this. -->
-    <string name="permlab_camera">take pictures</string>
+    <string name="permlab_camera">take pictures and videos</string>
     <!-- Description of an application permission, listed so the user can choose whether they want to allow the application to do this. -->
-    <string name="permdesc_camera">Allows application to take pictures
+    <string name="permdesc_camera">Allows application to take pictures and videos
         with the camera. This allows the application at any time to collect
         images the camera is seeing.</string>
 
@@ -930,6 +939,11 @@
         the flashlight.</string>
 
     <!-- Title of an application permission, listed so the user can choose whether they want to allow the application to do this. -->
+    <string name="permlab_accessUsb">access USB devices</string>
+    <!-- Description of an application permission, listed so the user can choose whether they want to allow the application to do this. -->
+    <string name="permdesc_accessUsb">Allows the application to access USB devices.</string>
+
+    <!-- Title of an application permission, listed so the user can choose whether they want to allow the application to do this. -->
     <string name="permlab_hardware_test">test hardware</string>
     <!-- Description of an application permission, listed so the user can choose whether they want to allow the application to do this. -->
     <string name="permdesc_hardware_test">Allows the application to control
@@ -1563,45 +1577,6 @@
     <!-- A format string for 12-hour time of day, just the hour, not the minute, with capital "AM" or "PM" (example: "3PM"). -->
     <string name="hour_cap_ampm">"<xliff:g id="hour" example="3">%-l</xliff:g><xliff:g id="ampm" example="PM">%p</xliff:g>"</string>
 
-    <!-- The text for the button in the notification window-shade that clears
-         all of the currently visible notifications. -->
-    <string name="status_bar_clear_all_button">Clear</string>
-
-    <!-- The label in the bar at the top of the status bar when there are no notifications
-         showing. -->
-    <string name="status_bar_no_notifications_title">No notifications</string>
-
-    <!-- The label for the group of notifications for ongoing events in the opened version of
-         the status bar.  An ongoing call is the prime example of this.  The MP3 music player
-         might be another example.  -->
-    <string name="status_bar_ongoing_events_title">Ongoing</string>
-
-    <!-- The label for the group of notifications for recent events in the opened version of
-         the status bar.  Recently received text messsages (SMS), emails, calendar alerts, etc. -->
-    <string name="status_bar_latest_events_title">Notifications</string>
-
-    <!-- The big percent text in the middle of the battery icon that appears when you plug in
-         the charger. -->
-    <string name="battery_status_text_percent_format"><xliff:g id="number" example="50">%d</xliff:g><xliff:g id="percent" example="%">%%</xliff:g></string>
-
-    <!-- The big percent text in the middle of the battery icon that appears when you plug in
-         the charger. This indicates the current status of the battery.  -->
-    <string name="battery_status_charging">Charging\u2026</string>
-
-    <!-- When the battery is low, this is displayed to the user in a dialog.  The title of the low battery alert. -->
-    <string name="battery_low_title">Please connect charger</string>
-
-    <!-- When the battery is low, this is displayed to the user in a dialog. The subtitle of the low battery alert. -->
-    <string name="battery_low_subtitle">The battery is getting low:</string>
-
-    <!-- A message that appears when the battery level is getting low in a dialog.  This is appened to the subtitle of the low battery alert. -->
-    <string name="battery_low_percent_format"><xliff:g id="number">%d%%</xliff:g>
-    or less remaining.</string>
-
-    <!-- When the battery is low, this is the label of the button to go to the
-         power usage activity to find out what drained the battery. -->
-    <string name="battery_low_why">Battery use</string>
-
     <!-- Title of the alert when something went wrong in the factory test. -->
     <string name="factorytest_failed">Factory test failed</string>
     <!-- Error message displayed when a non-system application tries to start a factory test. -->
@@ -1947,7 +1922,7 @@
     <string name="noApplications">No applications can perform this action.</string>
     <!-- Title of the alert when an application has crashed. -->
     <string name="aerr_title">Sorry!</string>
-    <!-- Text of the alert that is displayed when an application is not responding. -->
+    <!-- Text of the alert that is displayed when an application has crashed. -->
     <string name="aerr_application">The application <xliff:g id="application">%1$s</xliff:g>
         (process <xliff:g id="process">%2$s</xliff:g>) has stopped unexpectedly. Please try again.</string>
     <!-- Text of the alert that is displayed when an application has crashed. -->
@@ -1970,8 +1945,36 @@
     <!-- Button allowing the user to choose to wait for an application that is not responding to become responsive again. -->
     <string name="wait">Wait</string>
 
+    <!-- Text of the alert that is displayed when an application has violated StrictMode. -->
+    <string name="smv_application">The application <xliff:g id="application">%1$s</xliff:g>
+        (process <xliff:g id="process">%2$s</xliff:g>) has violated its self-enforced StrictMode policy.</string>
+    <!-- Text of the alert that is displayed when an application has violated StrictMode. -->
+    <string name="smv_process">The process <xliff:g id="process">%1$s</xliff:g> has
+      has violated its self-enforced StrictMode policy.</string>
+
+    <!-- Notification text to tell the user that a heavy-weight application is running. -->
+    <string name="heavy_weight_notification"><xliff:g id="app">%1$s</xliff:g> running</string>
+    
+    <!-- Notification details to tell the user that a heavy-weight application is running. -->
+    <string name="heavy_weight_notification_detail">Select to switch to application</string>
+    
+    <!-- Title of dialog prompting whether user wants to switch between heavy-weight apps. -->
+    <string name="heavy_weight_switcher_title">Switch applications?</string>
+    
+    <!-- Descriptive text for switching to a new heavy-weight application. -->
+    <string name="heavy_weight_switcher_text">Another application is already running
+    that must be stopped before you can start a new one.</string>
+    
+    <string name="old_app_action">Return to <xliff:g id="old_app">%1$s</xliff:g></string>
+    <string name="old_app_description">Don\'t start the new application.</string>
+    
+    <string name="new_app_action">Start <xliff:g id="old_app">%1$s</xliff:g></string>
+    <string name="new_app_description">Stop the old application without saving.</string>
+    
     <!-- Displayed in the title of the chooser for things to do with text that
-         is to be sent to another application. For example, I can send text through SMS or IM.  A dialog with those choices would be shown, and this would be the title. -->
+         is to be sent to another application. For example, I can send
+         text through SMS or IM.  A dialog with those choices would be shown,
+         and this would be the title. -->
     <string name="sendText">Select an action for text</string>
 
     <!-- Title of the dialog where the user is adjusting the phone ringer volume -->
diff --git a/core/res/res/values/styles.xml b/core/res/res/values/styles.xml
index b5fff96..02a601a 100644
--- a/core/res/res/values/styles.xml
+++ b/core/res/res/values/styles.xml
@@ -88,6 +88,13 @@
         <item name="windowExitAnimation">@anim/status_bar_exit</item>
     </style>
 
+    <!-- {@hide} -->
+    <style name="Animation.StatusBar.IntruderAlert"
+        parent="@android:style/Animation.StatusBar">
+        <item name="android:windowEnterAnimation">@anim/priority_alert_enter</item>
+        <item name="android:windowExitAnimation">@anim/priority_alert_exit</item>
+    </style>
+
     <!-- Standard animations for a translucent window or activity.  This
          style is <em>not<em> used by default for the translucent theme
          (since translucent activities are a special case that have no
@@ -187,11 +194,26 @@
 
     <!-- Status Bar Styles -->
 
-    <style name="TextAppearance.StatusBarTitle">
+    <style name="TextAppearance.StatusBar">
         <item name="android:textAppearance">?android:attr/textAppearanceSmall</item>
-        <item name="android:textStyle">bold</item>
         <item name="android:textColor">?android:attr/textColorPrimary</item>
     </style>
+    <style name="TextAppearance.StatusBar.Ticker">
+    </style>
+    <style name="TextAppearance.StatusBar.Title">
+        <item name="android:textStyle">bold</item>
+    </style>
+
+    <style name="TextAppearance.StatusBar.Icon">
+        <item name="android:textStyle">bold</item>
+    </style>
+    <style name="TextAppearance.StatusBar.EventContent">
+        <item name="android:textColor">?android:attr/textColorPrimaryInverse</item>
+    </style>
+    <style name="TextAppearance.StatusBar.EventContent.Title">
+        <item name="android:textSize">18sp</item>
+        <item name="android:textStyle">bold</item>
+    </style>
 
     <!-- Widget Styles -->
 
diff --git a/core/res/res/xml/power_profile.xml b/core/res/res/xml/power_profile.xml
index ce623e8..30312b3 100644
--- a/core/res/res/xml/power_profile.xml
+++ b/core/res/res/xml/power_profile.xml
@@ -18,6 +18,7 @@
 -->
 
 <device name="Android">
+  <!-- All values are in mAh except as noted -->
   <item name="none">0</item>
   <item name="screen.on">0.1</item>
   <item name="bluetooth.active">0.1</item>
@@ -48,4 +49,6 @@
   <array name="cpu.active">
       <value>0.2</value>
   </array>
+  <!-- This is the battery capacity in mAh -->
+  <item name="battery.capacity">1000</item>
 </device>
diff --git a/core/tests/ConnectivityManagerTest/AndroidManifest.xml b/core/tests/ConnectivityManagerTest/AndroidManifest.xml
index c318577..d298d40 100644
--- a/core/tests/ConnectivityManagerTest/AndroidManifest.xml
+++ b/core/tests/ConnectivityManagerTest/AndroidManifest.xml
@@ -24,23 +24,35 @@
     <application>
         <uses-library android:name="android.test.runner" />
         <activity android:name="ConnectivityManagerTestActivity"
-          android:label="CMTest">
+          android:label="@string/app_name">
             <intent-filter>
                 <action android:name="android.intent.action.MAIN" />
-                <category android:name="android.intent.category.TEST" />
+                <category android:name="android.intent.category.LAUNCHER" />
             </intent-filter>
         </activity>
     </application>
     <!--
     This declares that this app uses the instrumentation test runner targeting
-    the package of browserpowertest. To run the tests use the command:
-    "adb shell am instrument -w com.android.connectivitymanagertest/.ConnectivityManagerTestRunner"
+    the package of connectivitymanagertest. To run the tests use the command:
+    "adb shell am instrument -e ssid <SSID> -w
+      com.android.connectivitymanagertest/.ConnectivityManagerTestRunner",
+      the access point <SSID> should be an open AP.
     -->
     <instrumentation android:name=".ConnectivityManagerTestRunner"
         android:targetPackage="com.android.connectivitymanagertest"
         android:label="Test runner for Connectivity Manager Tests"
     />
 
+    <!--
+     To run the unit tests use the command:
+     "adb shell am instrument -w
+     com.android.connectivitymanagertest/.ConnectivityManagerUnitTestRunner"
+    -->
+    <instrumentation android:name=".ConnectivityManagerUnitTestRunner"
+        android:targetPackage="com.android.connectivitymanagertest"
+        android.label="Test runner for unit tests"
+    />
+
     <uses-permission android:name="android.permission.INTERNET" />
     <uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
     <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
diff --git a/core/tests/ConnectivityManagerTest/res/values/strings.xml b/core/tests/ConnectivityManagerTest/res/values/strings.xml
new file mode 100644
index 0000000..fb6e82f
--- /dev/null
+++ b/core/tests/ConnectivityManagerTest/res/values/strings.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources>
+    <string name="app_name">ConnectivityManagerTest</string>
+</resources>
diff --git a/core/tests/ConnectivityManagerTest/src/com/android/connectivitymanagertest/ConnectivityManagerUnitTestRunner.java b/core/tests/ConnectivityManagerTest/src/com/android/connectivitymanagertest/ConnectivityManagerUnitTestRunner.java
new file mode 100644
index 0000000..6adfc74
--- /dev/null
+++ b/core/tests/ConnectivityManagerTest/src/com/android/connectivitymanagertest/ConnectivityManagerUnitTestRunner.java
@@ -0,0 +1,47 @@
+/*
+ * Copyright (C) 2010, The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.android.connectivitymanagertest;
+
+import android.os.Bundle;
+import android.test.InstrumentationTestRunner;
+import android.test.InstrumentationTestSuite;
+import android.util.Log;
+import com.android.connectivitymanagertest.unit.WifiSoftAPTest;
+
+import junit.framework.TestSuite;
+
+/**
+ * Instrumentation Test Runner for all unit tests
+ *
+ * adb shell am instrument \
+ *     -w com.android.connectivitymanagertest/.ConnectivityManagerUnitTestRunner
+ */
+
+public class ConnectivityManagerUnitTestRunner extends InstrumentationTestRunner {
+    @Override
+    public TestSuite getAllTests() {
+        TestSuite suite = new InstrumentationTestSuite(this);
+        suite.addTestSuite(WifiSoftAPTest.class);
+        return suite;
+    }
+
+
+    @Override
+    public ClassLoader getLoader() {
+        return ConnectivityManagerUnitTestRunner.class.getClassLoader();
+    }
+}
diff --git a/core/tests/ConnectivityManagerTest/src/com/android/connectivitymanagertest/unit/WifiSoftAPTest.java b/core/tests/ConnectivityManagerTest/src/com/android/connectivitymanagertest/unit/WifiSoftAPTest.java
new file mode 100644
index 0000000..3f43e48
--- /dev/null
+++ b/core/tests/ConnectivityManagerTest/src/com/android/connectivitymanagertest/unit/WifiSoftAPTest.java
@@ -0,0 +1,86 @@
+/*
+ * Copyright (C) 2010 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.android.connectivitymanagertest.unit;
+
+import android.content.BroadcastReceiver;
+import android.content.Intent;
+import android.content.Context;
+import android.app.Instrumentation;
+import android.os.Handler;
+import android.os.Message;
+import android.net.ConnectivityManager;
+import android.net.wifi.WifiManager;
+import android.net.wifi.WifiConfiguration;
+import android.net.wifi.WifiConfiguration.KeyMgmt;
+
+import android.test.suitebuilder.annotation.LargeTest;
+import android.test.AndroidTestCase;
+
+import java.util.ArrayList;
+
+import android.util.Log;
+
+/**
+ * Test Wifi soft AP configuration
+ */
+public class WifiSoftAPTest extends AndroidTestCase {
+
+    private WifiManager mWifiManager;
+    private WifiConfiguration mWifiConfig = null;
+    private final String TAG = "WifiSoftAPTest";
+    private final int DURATION = 10000;
+
+    @Override
+    protected void setUp() throws Exception {
+        super.setUp();
+        mWifiManager = (WifiManager) getContext().getSystemService(Context.WIFI_SERVICE);
+        assertNotNull(mWifiManager);
+        assertTrue(mWifiManager.setWifiApEnabled(null, true));
+        mWifiConfig = mWifiManager.getWifiApConfiguration();
+        if (mWifiConfig != null) {
+            Log.v(TAG, "mWifiConfig is " + mWifiConfig.toString());
+        } else {
+            Log.v(TAG, "mWifiConfig is null.");
+        }
+    }
+
+    @Override
+    protected void tearDown() throws Exception {
+        Log.v(TAG, "turn off wifi tethering");
+        mWifiManager.setWifiApEnabled(null, false);
+        super.tearDown();
+    }
+
+    // Test case 1: Test the soft AP SSID with letters
+    @LargeTest
+    public void testApSsidWithAlphabet() {
+        WifiConfiguration config = new WifiConfiguration();
+        config.SSID = "abcdefghijklmnopqrstuvwxyz";
+        config.allowedKeyManagement.set(KeyMgmt.NONE);
+        mWifiConfig = config;
+        assertTrue(mWifiManager.setWifiApEnabled(mWifiConfig, true));
+        try {
+            Thread.sleep(DURATION);
+        } catch (InterruptedException e) {
+            Log.v(TAG, "exception " + e.getStackTrace());
+            assertFalse(true);
+        }
+        assertNotNull(mWifiManager.getWifiApConfiguration());
+        assertEquals("wifi AP state is not enabled", WifiManager.WIFI_AP_STATE_ENABLED,
+                     mWifiManager.getWifiApState());
+    }
+}
diff --git a/core/tests/coretests/src/android/os/HierarchicalStateMachineTest.java b/core/tests/coretests/src/android/os/HierarchicalStateMachineTest.java
index 89b3fb6..639372b2 100644
--- a/core/tests/coretests/src/android/os/HierarchicalStateMachineTest.java
+++ b/core/tests/coretests/src/android/os/HierarchicalStateMachineTest.java
@@ -74,15 +74,15 @@
                 if (isQuit(message)) {
                     mQuitCount += 1;
                     if (mQuitCount > 2) {
-                        // Returning false to actually quit
-                        return false;
+                        // Returning NOT_HANDLED to actually quit
+                        return NOT_HANDLED;
                     } else {
                         // Do NOT quit
-                        return true;
+                        return HANDLED;
                     }
                 } else  {
                     // All other message are handled
-                    return true;
+                    return HANDLED;
                 }
             }
         }
@@ -172,12 +172,18 @@
 
         class S1 extends HierarchicalState {
             @Override protected void enter() {
+                // Test that message is HSM_INIT_CMD
+                assertEquals(HSM_INIT_CMD, getCurrentMessage().what);
+
                 // Test that a transition in enter and the initial state works
                 mS1EnterCount += 1;
                 transitionTo(mS2);
                 Log.d(TAG, "S1.enter");
             }
             @Override protected void exit() {
+                // Test that message is HSM_INIT_CMD
+                assertEquals(HSM_INIT_CMD, getCurrentMessage().what);
+
                 mS1ExitCount += 1;
                 Log.d(TAG, "S1.exit");
             }
@@ -185,10 +191,16 @@
 
         class S2 extends HierarchicalState {
             @Override protected void enter() {
+                // Test that message is HSM_INIT_CMD
+                assertEquals(HSM_INIT_CMD, getCurrentMessage().what);
+
                 mS2EnterCount += 1;
                 Log.d(TAG, "S2.enter");
             }
             @Override protected void exit() {
+                // Test that message is TEST_CMD_1
+                assertEquals(TEST_CMD_1, getCurrentMessage().what);
+
                 // Test transition in exit work
                 mS2ExitCount += 1;
                 transitionTo(mS4);
@@ -196,10 +208,10 @@
             }
             @Override protected boolean processMessage(Message message) {
                 // Start a transition to S3 but it will be
-                // changed to a transition to S4
+                // changed to a transition to S4 in exit
                 transitionTo(mS3);
                 Log.d(TAG, "S2.processMessage");
-                return true;
+                return HANDLED;
             }
         }
 
@@ -264,7 +276,7 @@
         }
 
         synchronized (smEnterExitTranstionToTest) {
-            smEnterExitTranstionToTest.sendMessage(1);
+            smEnterExitTranstionToTest.sendMessage(TEST_CMD_1);
 
             try {
                 // wait for the messages to be handled
@@ -321,7 +333,7 @@
                 if (message.what == TEST_CMD_6) {
                     transitionToHaltingState();
                 }
-                return true;
+                return HANDLED;
             }
         }
 
@@ -415,7 +427,7 @@
                     assertEquals(1, mExitCount);
                     transitionToHaltingState();
                 }
-                return true;
+                return HANDLED;
             }
 
             @Override protected void exit() {
@@ -510,7 +522,7 @@
                 if (message.what == TEST_CMD_2) {
                     transitionTo(mS2);
                 }
-                return true;
+                return HANDLED;
             }
 
             @Override protected void exit() {
@@ -523,7 +535,7 @@
                 if (message.what == TEST_CMD_2) {
                     transitionToHaltingState();
                 }
-                return true;
+                return HANDLED;
             }
         }
 
@@ -612,13 +624,13 @@
                 if (message.what == TEST_CMD_2) {
                     transitionToHaltingState();
                 }
-                return true;
+                return HANDLED;
             }
         }
 
         class ChildState extends HierarchicalState {
             @Override protected boolean processMessage(Message message) {
-                return false;
+                return NOT_HANDLED;
             }
         }
 
@@ -697,20 +709,20 @@
                 if (message.what == TEST_CMD_2) {
                     transitionToHaltingState();
                 }
-                return true;
+                return HANDLED;
             }
         }
 
         class ChildState1 extends HierarchicalState {
             @Override protected boolean processMessage(Message message) {
                 transitionTo(mChildState2);
-                return true;
+                return HANDLED;
             }
         }
 
         class ChildState2 extends HierarchicalState {
             @Override protected boolean processMessage(Message message) {
-                return false;
+                return NOT_HANDLED;
             }
         }
 
@@ -794,7 +806,7 @@
                 mParentState1EnterCount += 1;
             }
             @Override protected boolean processMessage(Message message) {
-                return true;
+                return HANDLED;
             }
             @Override protected void exit() {
                 mParentState1ExitCount += 1;
@@ -822,7 +834,7 @@
                 assertEquals(0, mChildState5ExitCount);
 
                 transitionTo(mChildState2);
-                return true;
+                return HANDLED;
             }
             @Override protected void exit() {
                 mChildState1ExitCount += 1;
@@ -850,7 +862,7 @@
                 assertEquals(0, mChildState5ExitCount);
 
                 transitionTo(mChildState5);
-                return true;
+                return HANDLED;
             }
             @Override protected void exit() {
                 mChildState2ExitCount += 1;
@@ -878,7 +890,7 @@
                 assertEquals(1, mChildState5ExitCount);
 
                 transitionToHaltingState();
-                return true;
+                return HANDLED;
             }
             @Override protected void exit() {
                 mParentState2ExitCount += 1;
@@ -906,7 +918,7 @@
                 assertEquals(1, mChildState5ExitCount);
 
                 transitionTo(mChildState4);
-                return true;
+                return HANDLED;
             }
             @Override protected void exit() {
                 mChildState3ExitCount += 1;
@@ -934,7 +946,7 @@
                 assertEquals(1, mChildState5ExitCount);
 
                 transitionTo(mParentState2);
-                return true;
+                return HANDLED;
             }
             @Override protected void exit() {
                 mChildState4ExitCount += 1;
@@ -962,7 +974,7 @@
                 assertEquals(0, mChildState5ExitCount);
 
                 transitionTo(mChildState3);
-                return true;
+                return HANDLED;
             }
             @Override protected void exit() {
                 mChildState5ExitCount += 1;
@@ -1108,7 +1120,7 @@
                     mArrivalTimeMsg2 = SystemClock.elapsedRealtime();
                     transitionToHaltingState();
                 }
-                return true;
+                return HANDLED;
             }
 
             @Override protected void exit() {
@@ -1190,7 +1202,7 @@
         class S1 extends HierarchicalState {
             @Override protected boolean processMessage(Message message) {
                 transitionTo(mS2);
-                return true;
+                return HANDLED;
             }
             @Override protected void exit() {
                 sendMessage(TEST_CMD_2);
@@ -1216,7 +1228,7 @@
                 if (mMsgCount == 2) {
                     transitionToHaltingState();
                 }
-                return true;
+                return HANDLED;
             }
 
             @Override protected void exit() {
@@ -1300,7 +1312,7 @@
                 if (message.what == TEST_CMD_2) {
                     transitionToHaltingState();
                 }
-                return false;
+                return NOT_HANDLED;
             }
         }
 
@@ -1369,7 +1381,7 @@
                 if (message.what == TEST_CMD_4) {
                     transitionToHaltingState();
                 }
-                return true;
+                return HANDLED;
             }
         }
 
@@ -1563,10 +1575,10 @@
             if (message.what == CMD_1) {
                 // Transition to ourself to show that enter/exit is called
                 transitionTo(mS1);
-                return true;
+                return HANDLED;
             } else {
                 // Let parent process all other messages
-                return false;
+                return NOT_HANDLED;
             }
         }
         @Override protected void exit() {
@@ -1618,7 +1630,7 @@
                 transitionToHaltingState();
                 break;
             }
-            return true;
+            return HANDLED;
         }
         @Override protected void exit() {
             Log.d(TAG, "P2.exit");
diff --git a/core/tests/coretests/src/android/pim/vcard/VCardExporterTests.java b/core/tests/coretests/src/android/pim/vcard/VCardExporterTests.java
index 004a197..2de0464 100644
--- a/core/tests/coretests/src/android/pim/vcard/VCardExporterTests.java
+++ b/core/tests/coretests/src/android/pim/vcard/VCardExporterTests.java
@@ -275,6 +275,16 @@
         testPhoneBasicCommon(V30);
     }
 
+    public void testPhoneRefrainFormatting() {
+        mVerifier.initForExportTest(V21 | VCardConfig.FLAG_REFRAIN_PHONE_NUMBER_FORMATTING);
+        mVerifier.addInputEntry().addContentValues(Phone.CONTENT_ITEM_TYPE)
+                .put(Phone.NUMBER, "1234567890(abcdefghijklmnopqrstuvwxyz)")
+                .put(Phone.TYPE, Phone.TYPE_HOME);
+        mVerifier.addPropertyNodesVerifierElemWithEmptyName()
+                .addExpectedNode("TEL", "1234567890(abcdefghijklmnopqrstuvwxyz)",
+                        new TypeSet("HOME"));
+    }
+
     /**
      * Tests that vCard composer emits corresponding type param which we expect.
      */
diff --git a/core/tests/coretests/src/android/text/PackedIntVectorTest.java b/core/tests/coretests/src/android/text/PackedIntVectorTest.java
new file mode 100644
index 0000000..1dc683e
--- /dev/null
+++ b/core/tests/coretests/src/android/text/PackedIntVectorTest.java
@@ -0,0 +1,158 @@
+/*
+ * Copyright (C) 2007 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package android.text;
+
+import junit.framework.TestCase;
+
+/**
+ * PackedIntVectorTest tests the features of android.util.PackedIntVector.
+ */
+public class PackedIntVectorTest extends TestCase {
+ 
+    public void testBasic() throws Exception {
+        for (int width = 0; width < 10; width++) {
+            PackedIntVector p = new PackedIntVector(width);
+            int[] ins = new int[width];
+
+            for (int height = width * 2; height < width * 4; height++) {
+                assertEquals(p.width(), width);
+
+                // Test adding rows.
+
+                for (int i = 0; i < height; i++) {
+                    int at;
+
+                    if (i % 2 == 0) {
+                        at = i;
+                    } else {
+                        at = p.size() - i;
+                    }
+
+                    for (int j = 0; j < width; j++) {
+                        ins[j] = i + j;
+                    }
+
+                    if (i == height / 2) {
+                        p.insertAt(at, null);
+                    } else {
+                        p.insertAt(at, ins);
+                    }
+
+                    assertEquals(p.size(), i + 1);
+
+                    for (int j = 0; j < width; j++) {
+                        if (i == height / 2) {
+                            assertEquals(0, p.getValue(at, j));
+                        } else {
+                            assertEquals(p.getValue(at, j), i + j);
+                        }
+                    }
+                }
+
+                // Test setting values.
+
+                for (int i = 0; i < height; i++) {
+                    for (int j = 0; j < width; j++) {
+                        p.setValue(i, j, i * j);
+
+                        assertEquals(p.getValue(i, j), i * j);
+                    }
+                }
+
+                // Test offsetting values.
+
+                for (int j = 0; j < width; j++) {
+                    p.adjustValuesBelow(j * 2, j, j + 27);
+                }
+
+                for (int i = 0; i < height; i++) {
+                    for (int j = 0; j < width; j++) {
+                        int expect = i * j;
+
+                        if (i >= j * 2) {
+                            expect += j + 27;
+                        }
+
+                        assertEquals(p.getValue(i, j), expect);
+                    }
+                }
+
+                for (int j = 0; j < width; j++) {
+                    p.adjustValuesBelow(j, j, j * j + 14);
+                }
+
+                for (int i = 0; i < height; i++) {
+                    for (int j = 0; j < width; j++) {
+                        int expect = i * j;
+
+                        if (i >= j * 2) {
+                            expect += j + 27;
+                        }
+                        if (i >= j) {
+                            expect += j * j + 14;
+                        }
+
+                        assertEquals(p.getValue(i, j), expect);
+                    }
+                }
+
+                // Test undoing offsets.
+
+                for (int j = 0; j < width; j++) {
+                    p.adjustValuesBelow(j * 2, j, -(j + 27));
+                    p.adjustValuesBelow(j, j, -(j * j + 14));
+                }
+
+                for (int i = 0; i < height; i++) {
+                    for (int j = 0; j < width; j++) {
+                        assertEquals(p.getValue(i, j), i * j);
+                    }
+                }
+
+                // Test deleting rows.
+
+                while (p.size() > 0) {
+                    int osize = p.size();
+                    int del = osize / 3;
+
+                    if (del == 0) {
+                        del = 1;
+                    }
+
+                    int at = (osize - del) / 2;
+                    p.deleteAt(at, del);
+
+                    assertEquals(p.size(), osize - del);
+
+                    for (int i = 0; i < at; i++) {
+                        for (int j = 0; j < width; j++) {
+                            assertEquals(p.getValue(i, j), i * j);
+                        }
+                    }
+
+                    for (int i = at; i < p.size(); i++) {
+                        for (int j = 0; j < width; j++) {
+                            assertEquals(p.getValue(i, j), (i + height - p.size()) * j);
+                        }
+                    }
+                }
+
+                assertEquals(0, p.size());
+            }
+        }
+    }
+}
diff --git a/core/tests/coretests/src/android/text/TextUtilsTest.java b/core/tests/coretests/src/android/text/TextUtilsTest.java
index 5b427be..a5229cc 100644
--- a/core/tests/coretests/src/android/text/TextUtilsTest.java
+++ b/core/tests/coretests/src/android/text/TextUtilsTest.java
@@ -26,6 +26,8 @@
 import android.text.TextPaint;
 import android.text.TextUtils;
 import android.text.style.StyleSpan;
+import android.text.util.Rfc822Token;
+import android.text.util.Rfc822Tokenizer;
 import android.test.MoreAsserts;
 
 import com.android.common.Rfc822Validator;
@@ -269,6 +271,24 @@
         }
     }
 
+    @SmallTest
+    public void testRfc822TokenizerFullAddress() {
+        Rfc822Token[] tokens = Rfc822Tokenizer.tokenize("Foo Bar (something) <foo@google.com>");
+        assertNotNull(tokens);
+        assertEquals(1, tokens.length);
+        assertEquals("foo@google.com", tokens[0].getAddress());
+        assertEquals("Foo Bar", tokens[0].getName());
+        assertEquals("something",tokens[0].getComment());
+    }
+
+    @SmallTest
+    public void testRfc822TokenizeItemWithError() {
+        Rfc822Token[] tokens = Rfc822Tokenizer.tokenize("\"Foo Bar\\");
+        assertNotNull(tokens);
+        assertEquals(1, tokens.length);
+        assertEquals("Foo Bar", tokens[0].getAddress());
+    }
+
     @LargeTest
     public void testEllipsize() {
         CharSequence s1 = "The quick brown fox jumps over \u00FEhe lazy dog.";
diff --git a/core/tests/coretests/src/android/view/VelocityTest.java b/core/tests/coretests/src/android/view/VelocityTest.java
new file mode 100644
index 0000000..fb28e1e
--- /dev/null
+++ b/core/tests/coretests/src/android/view/VelocityTest.java
@@ -0,0 +1,285 @@
+/*
+ * Copyright (C) 2010 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.android.frameworktest.view;
+
+import junit.framework.Assert;
+
+import android.test.InstrumentationTestCase;
+import android.test.suitebuilder.annotation.MediumTest;
+import android.view.MotionEvent;
+import android.view.VelocityTracker;
+import android.view.animation.AccelerateInterpolator;
+import android.view.animation.DecelerateInterpolator;
+import android.view.animation.Interpolator;
+import android.view.animation.LinearInterpolator;
+
+/**
+ * Exercises {@link android.view.VelocityTracker} to compute correct velocity.<br>
+ * To launch this test, use :<br>
+ * <code>./development/testrunner/runtest.py framework -c com.android.frameworktest.view.VelocityTest</code>
+ */
+public class VelocityTest extends InstrumentationTestCase {
+
+    @MediumTest
+    public void testInitialCondiditions() {
+        VelocityTracker vt = VelocityTracker.obtain();
+        assertNotNull(vt);
+        vt.recycle();
+    }
+
+    /**
+     * Test that {@link android.view.VelocityTracker}.clear() clears
+     * the previous values after a call to computeCurrentVelocity()
+     */
+    @MediumTest
+    public void testClear() {
+        long t = System.currentTimeMillis();
+        VelocityTracker vt = VelocityTracker.obtain();
+        drag(vt, 100, 200, 100, 200, 10, t, 300);
+        vt.computeCurrentVelocity(1);
+        assertFalse("Velocity should not be null", vt.getXVelocity() == 0.0f);
+        assertFalse("Velocity should not be null", vt.getYVelocity() == 0.0f);
+        vt.clear();
+        vt.computeCurrentVelocity(1);
+        assertEquals(0.0f, vt.getXVelocity());
+        assertEquals(0.0f, vt.getYVelocity());
+        vt.recycle();
+    }
+
+    @MediumTest
+    public void testDragAcceleration () {
+        long t = System.currentTimeMillis();
+        VelocityTracker vt = VelocityTracker.obtain();
+        drag(vt, 100, 200, 100, 200, 15, t, 400, new AccelerateInterpolator());
+        vt.computeCurrentVelocity(1000);
+        assertGreater(250.0f, vt.getXVelocity());
+        assertGreater(250.0f, vt.getYVelocity());
+        vt.recycle();
+    }
+
+    @MediumTest
+    public void testDragDeceleration () {
+        long t = System.currentTimeMillis();
+        VelocityTracker vt = VelocityTracker.obtain();
+        drag(vt, 100, 200, 100, 200, 15, t, 400, new DecelerateInterpolator());
+        vt.computeCurrentVelocity(1000);
+        assertLower(250.0f, vt.getXVelocity());
+        assertLower(250.0f, vt.getYVelocity());
+        vt.recycle();
+    }
+
+    @MediumTest
+    public void testDragLinearHorizontal() {
+        long t = System.currentTimeMillis();
+        VelocityTracker vt = VelocityTracker.obtain();
+        // 100px in 400ms => 250px/s
+        drag(vt, 100, 200, 200, 200, 15, t, 400);
+        vt.computeCurrentVelocity(1000);
+        assertEquals(0.0f, vt.getYVelocity());
+        assertEqualFuzzy(250.0f, vt.getXVelocity(), 4f);
+        vt.recycle();
+    }
+
+    @MediumTest
+    public void testDragLinearVertical() {
+        long t = System.currentTimeMillis();
+        VelocityTracker vt = VelocityTracker.obtain();
+        // 100px in 400ms => 250px/s
+        drag(vt, 200, 200, 100, 200, 15, t, 400);
+        vt.computeCurrentVelocity(1000);
+        assertEquals(0.0f, vt.getXVelocity());
+        assertEqualFuzzy(250.0f, vt.getYVelocity(), 4f);
+        vt.recycle();
+    }
+
+    /**
+     * Test dragging with two points only
+     * (velocity must be an exact value)
+     */
+    @MediumTest
+    public void testDragWith2Points () {
+        long t = System.currentTimeMillis();
+        VelocityTracker vt = VelocityTracker.obtain();
+        // 100px, 2 steps, 100ms => 1000px/s
+        drag(vt, 100, 200, 100, 200, 2, t, 100);
+        vt.computeCurrentVelocity(1000);
+        assertEquals(1000.0f, vt.getXVelocity());
+        assertEquals(1000.0f, vt.getYVelocity());
+        vt.recycle();
+    }
+
+    /**
+     * Velocity is independent of the number of points used during
+     * the same interval
+     */
+    @MediumTest
+    public void testStabilityInNbPoints () {
+        long t = System.currentTimeMillis();
+        VelocityTracker vt = VelocityTracker.obtain();
+        drag(vt, 100, 200, 100, 200, 10, t, 400); // 10 steps over 400ms
+        vt.computeCurrentVelocity(1);
+        float firstX = vt.getXVelocity();
+        float firstY = vt.getYVelocity();
+        vt.clear();
+        drag(vt, 100, 200, 100, 200, 20, t, 400); // 20 steps over 400ms
+        vt.computeCurrentVelocity(1);
+        float secondX = vt.getXVelocity();
+        float secondY = vt.getYVelocity();
+        assertEqualFuzzy(firstX, secondX, 0.1f);
+        assertEqualFuzzy(firstY, secondY, 0.1f);
+        vt.recycle();
+    }
+
+    /**
+     * Velocity is independent of the time when the events occurs,
+     * it only depends on delays between the events.
+     */
+    @MediumTest
+    public void testStabilityInTime () {
+        long t = System.currentTimeMillis();
+        VelocityTracker vt = VelocityTracker.obtain();
+        drag(vt, 100, 200, 100, 200, 10, t, 400);
+        vt.computeCurrentVelocity(1);
+        float firstX = vt.getXVelocity();
+        float firstY = vt.getYVelocity();
+        vt.clear();
+        drag(vt, 100, 200, 100, 200, 10, t + 3600*1000, 400); // on hour later
+        vt.computeCurrentVelocity(1);
+        float secondX = vt.getXVelocity();
+        float secondY = vt.getYVelocity();
+        assertEqualFuzzy(firstX, secondX, 0.1f);
+        assertEqualFuzzy(firstY, secondY, 0.1f);
+        vt.recycle();
+    }
+
+    /**
+     * Velocity is independent of the position of the events,
+     * it only depends on their relative distance.
+     */
+    @MediumTest
+    public void testStabilityInSpace () {
+        long t = System.currentTimeMillis();
+        VelocityTracker vt = VelocityTracker.obtain();
+        drag(vt, 100, 200, 100, 200, 10, t, 400);
+        vt.computeCurrentVelocity(1);
+        float firstX = vt.getXVelocity();
+        float firstY = vt.getYVelocity();
+        vt.clear();
+        drag(vt, 200, 300, 200, 300, 10, t, 400); // 100px further
+        vt.computeCurrentVelocity(1);
+        float secondX = vt.getXVelocity();
+        float secondY = vt.getYVelocity();
+        assertEqualFuzzy(firstX, secondX, 0.1f);
+        assertEqualFuzzy(firstY, secondY, 0.1f);
+        vt.recycle();
+    }
+
+    /**
+     * Test that calls to {@link android.view.VelocityTracker}.computeCurrentVelocity()
+     * will output same values when using the same data.
+     */
+    @MediumTest
+    public void testStabilityOfComputation() {
+        long t = System.currentTimeMillis();
+        VelocityTracker vt = VelocityTracker.obtain();
+        drag(vt, 100, 200, 100, 200, 10, t, 300);
+        vt.computeCurrentVelocity(1);
+        float firstX = vt.getXVelocity();
+        float firstY = vt.getYVelocity();
+        vt.computeCurrentVelocity(1);
+        float secondX = vt.getXVelocity();
+        float secondY = vt.getYVelocity();
+        assertEquals(firstX, secondX);
+        assertEquals(firstY, secondY);
+        vt.recycle();
+    }
+
+    /**
+     * Test the units parameter of {@link android.view.VelocityTracker}.computeCurrentVelocity()
+     */
+    @MediumTest
+    public void testStabilityOfUnits() {
+        long t = System.currentTimeMillis();
+        VelocityTracker vt = VelocityTracker.obtain();
+        drag(vt, 100, 200, 100, 200, 10, t, 300);
+        vt.computeCurrentVelocity(1);
+        float firstX = vt.getXVelocity();
+        float firstY = vt.getYVelocity();
+        vt.computeCurrentVelocity(1000);
+        float secondX = vt.getXVelocity();
+        float secondY = vt.getYVelocity();
+        assertEqualFuzzy(firstX, secondX / 1000.0f, 0.1f);
+        assertEqualFuzzy(firstY, secondY / 1000.0f, 0.1f);
+        vt.recycle();
+    }
+
+    /**
+     * Simulate a drag by giving directly MotionEvents to
+     * the VelocityTracker using a linear interpolator
+     */
+    private void drag(VelocityTracker vt, int startX, int endX, int startY, int endY, int steps,
+            long startime, int duration) {
+        drag(vt, startX, endX, startY, endY, steps, startime, duration, new LinearInterpolator());
+    }
+
+    /**
+     * Simulate a drag by giving directly MotionEvents to
+     * the VelocityTracker using a given interpolator
+     */
+    private void drag(VelocityTracker vt, int startX, int endX, int startY, int endY, int steps,
+            long startime, int duration, Interpolator interpolator) {
+        addMotionEvent(vt, startX, startY, startime, MotionEvent.ACTION_DOWN);
+        float dt = duration / (float)steps;
+        int distX = endX - startX;
+        int distY = endY - startY;
+        for (int i=1; i<steps-1; i++) {
+            float ii = interpolator.getInterpolation(i / (float)steps);
+            int x = (int) (startX + distX * ii);
+            int y = (int) (startY + distY * ii);
+            long time = startime + (int) (i * dt);
+            addMotionEvent(vt, x, y, time, MotionEvent.ACTION_MOVE);
+        }
+        addMotionEvent(vt, endX, endY, startime + duration, MotionEvent.ACTION_UP);
+    }
+
+    private void addMotionEvent(VelocityTracker vt, int x, int y, long time, int action) {
+        MotionEvent me = MotionEvent.obtain(time, time, action, x, y, 0);
+        vt.addMovement(me);
+        me.recycle();
+    }
+
+    /**
+     * Float imprecision of the average computations and filtering
+     * (removing last MotionEvent for N > 3) implies that tests
+     *  accepts some approximated values.
+     */
+    private void assertEqualFuzzy(float expected, float actual, float threshold) {
+        boolean fuzzyEqual = actual >= expected - threshold && actual <= expected + threshold;
+        Assert.assertTrue("Expected: <"+expected+"> but was: <"+actual+
+                "> while accepting a variation of: <"+threshold+">", fuzzyEqual);
+    }
+
+    private void assertGreater(float minExpected, float actual) {
+        Assert.assertTrue("Expected: minimum <"+minExpected+"> but was: <"+actual+">",
+                actual > minExpected);
+    }
+
+    private void assertLower(float maxExpected, float actual) {
+        Assert.assertTrue("Expected: maximum <"+maxExpected+"> but was: <"+actual+">",
+                actual < maxExpected);
+    }
+}
diff --git a/tests/framework-tests/src/com/android/internal/http/multipart/MultipartTest.java b/core/tests/coretests/src/com/android/internal/http/multipart/MultipartTest.java
similarity index 100%
rename from tests/framework-tests/src/com/android/internal/http/multipart/MultipartTest.java
rename to core/tests/coretests/src/com/android/internal/http/multipart/MultipartTest.java
diff --git a/tests/framework-tests/src/com/android/internal/os/LoggingPrintStreamTest.java b/core/tests/coretests/src/com/android/internal/os/LoggingPrintStreamTest.java
similarity index 100%
rename from tests/framework-tests/src/com/android/internal/os/LoggingPrintStreamTest.java
rename to core/tests/coretests/src/com/android/internal/os/LoggingPrintStreamTest.java
diff --git a/data/etc/android.hardware.camera.front.xml b/data/etc/android.hardware.camera.front.xml
new file mode 100644
index 0000000..a5a6998
--- /dev/null
+++ b/data/etc/android.hardware.camera.front.xml
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2010 The Android Open Source Project
+
+     Licensed under the Apache License, Version 2.0 (the "License");
+     you may not use this file except in compliance with the License.
+     You may obtain a copy of the License at
+
+          http://www.apache.org/licenses/LICENSE-2.0
+
+     Unless required by applicable law or agreed to in writing, software
+     distributed under the License is distributed on an "AS IS" BASIS,
+     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     See the License for the specific language governing permissions and
+     limitations under the License.
+-->
+
+<!-- This is the standard set of features for a front facing camera. -->
+<permissions>
+    <feature name="android.hardware.camera.front" />
+</permissions>
diff --git a/data/etc/handheld_core_hardware.xml b/data/etc/handheld_core_hardware.xml
index 564fa84..efca4c2 100644
--- a/data/etc/handheld_core_hardware.xml
+++ b/data/etc/handheld_core_hardware.xml
@@ -35,6 +35,8 @@
     <!-- devices with an autofocus camera and/or flash must include either
          android.hardware.camera.autofocus.xml or 
          android.hardware.camera.autofocus-flash.xml -->
+    <!-- devices with a front facing camera must include
+         android.hardware.camera.front.xml -->
     <!-- devices with WiFi must also include android.hardware.wifi.xml -->
     <!-- devices with limited/gestural multitouch must also include
          android.hardware.touchscreen.multitouch.xml -->
diff --git a/docs/html/images/axis_device.png b/docs/html/images/axis_device.png
new file mode 100644
index 0000000..f1f666a
--- /dev/null
+++ b/docs/html/images/axis_device.png
Binary files differ
diff --git a/docs/html/images/axis_globe.png b/docs/html/images/axis_globe.png
new file mode 100644
index 0000000..dccb58b
--- /dev/null
+++ b/docs/html/images/axis_globe.png
Binary files differ
diff --git a/docs/html/sdk/android-2.2.jd b/docs/html/sdk/android-2.2.jd
index baae92e..495fd80 100644
--- a/docs/html/sdk/android-2.2.jd
+++ b/docs/html/sdk/android-2.2.jd
@@ -466,4 +466,4 @@
 <p>For more information about how to develop an application that displays
 and functions properly on all Android-powered devices, see <a
 href="{@docRoot}guide/practices/screens_support.html">Supporting Multiple
-Screens</a>.</p>
\ No newline at end of file
+Screens</a>.</p>
diff --git a/graphics/java/android/graphics/Color.java b/graphics/java/android/graphics/Color.java
index 5cefaa3..a50693d 100644
--- a/graphics/java/android/graphics/Color.java
+++ b/graphics/java/android/graphics/Color.java
@@ -30,7 +30,8 @@
  * (green << 8) | blue. Each component ranges between 0..255 with 0
  * meaning no contribution for that component, and 255 meaning 100%
  * contribution. Thus opaque-black would be 0xFF000000 (100% opaque but
- * no contributes from red, gree, blue, and opaque-white would be 0xFFFFFFFF
+ * no contributions from red, green, or blue), and opaque-white would be
+ * 0xFFFFFFFF
  */
 public class Color {
     public static final int BLACK       = 0xFF000000;
diff --git a/graphics/java/android/graphics/ImageFormat.java b/graphics/java/android/graphics/ImageFormat.java
index f126374..3f9f961 100644
--- a/graphics/java/android/graphics/ImageFormat.java
+++ b/graphics/java/android/graphics/ImageFormat.java
@@ -16,61 +16,84 @@
 
 package android.graphics;
 
-public class ImageFormat
-{
-    /* these constants are chosen to be binary compatible with
-     * their previous location in PixelFormat.java */
-    
-    public static final int UNKNOWN = 0;
+public class ImageFormat {
+	/*
+	 * these constants are chosen to be binary compatible with their previous
+	 * location in PixelFormat.java
+	 */
 
-    /** RGB format used for pictures encoded as RGB_565   
-     *  see {@link android.hardware.Camera.Parameters#setPictureFormat(int)}.
-     */
-    public static final int RGB_565 = 4;
+	public static final int UNKNOWN = 0;
 
-    /**
-     * YCbCr formats, used for video. These are not necessarily supported
-     * by the hardware.
-     */
-    public static final int NV16 = 0x10;
+	/**
+	 * RGB format used for pictures encoded as RGB_565 see
+	 * {@link android.hardware.Camera.Parameters#setPictureFormat(int)}.
+	 */
+	public static final int RGB_565 = 4;
 
-    
-    /** YCrCb format used for images, which uses the NV21 encoding format.   
-     *  This is the default format for camera preview images, when not
-     *  otherwise set with 
-     *  {@link android.hardware.Camera.Parameters#setPreviewFormat(int)}.
-     */
-    public static final int NV21 = 0x11;
+	/**
+	 * Planar 4:2:0 YCrCb format. This format assumes an horizontal stride of 16
+	 * pixels for all planes and an implicit vertical stride of the image
+	 * height's next multiple of two.
+	 *   y_size = stride * ALIGN(height, 2)
+	 *   c_size = ALIGN(stride/2, 16) * height
+	 *   size = y_size + c_size * 2
+	 *   cr_offset = y_size
+	 *   cb_offset = y_size + c_size
+	 * 
+	 * Whether this format is supported by the camera hardware can be determined
+	 * by
+	 * {@link android.hardware.Camera.Parameters#getSupportedPreviewFormats()}.
+	 */
+	public static final int YV12 = 0x32315659;
 
+	/**
+	 * YCbCr format, used for video. Whether this format is supported by the
+	 * camera hardware can be determined by
+	 * {@link android.hardware.Camera.Parameters#getSupportedPreviewFormats()}.
+	 */
+	public static final int NV16 = 0x10;
 
-    /** YCbCr format used for images, which uses YUYV (YUY2) encoding format.
-     *  This is an alternative format for camera preview images. Whether this
-     *  format is supported by the camera hardware can be determined by
-     *  {@link android.hardware.Camera.Parameters#getSupportedPreviewFormats()}.
-     */
-    public static final int YUY2 = 0x14;
+	/**
+	 * YCrCb format used for images, which uses the NV21 encoding format. This
+	 * is the default format for camera preview images, when not otherwise set
+	 * with {@link android.hardware.Camera.Parameters#setPreviewFormat(int)}.
+	 */
+	public static final int NV21 = 0x11;
 
-    
-    /**
-     * Encoded formats.  These are not necessarily supported by the hardware.
-     */
-    public static final int JPEG = 0x100;
+	/**
+	 * YCbCr format used for images, which uses YUYV (YUY2) encoding format.
+	 * This is an alternative format for camera preview images. Whether this
+	 * format is supported by the camera hardware can be determined by
+	 * {@link android.hardware.Camera.Parameters#getSupportedPreviewFormats()}.
+	 */
+	public static final int YUY2 = 0x14;
 
+	/**
+	 * Encoded formats. These are not necessarily supported by the hardware.
+	 */
+	public static final int JPEG = 0x100;
 
-    /**
-     * Use this function to retrieve the number of bits per pixel of
-     * an ImageFormat.
-     * @param format
-     * @return the number of bits per pixel of the given format or -1 if the
-     * format doesn't exist or is not supported.
-     */
-    public static int getBitsPerPixel(int format) {
-        switch (format) {
-            case RGB_565:   return 16;
-            case NV16:      return 16;
-            case NV21:      return 12;
-            case YUY2:      return 16;
-        }
-        return -1;
-    }
+	/**
+	 * Use this function to retrieve the number of bits per pixel of an
+	 * ImageFormat.
+	 * 
+	 * @param format
+	 * @return the number of bits per pixel of the given format or -1 if the
+	 *         format doesn't exist or is not supported.
+	 */
+	public static int getBitsPerPixel(int format) {
+		switch (format) {
+		case RGB_565:
+			return 16;
+		case NV16:
+			return 16;
+		case YUY2:
+			return 16;
+		case YV12:
+			return 12;
+		case NV21:
+			return 12;
+		}
+		return -1;
+	}
 }
diff --git a/graphics/jni/android_renderscript_RenderScript.cpp b/graphics/jni/android_renderscript_RenderScript.cpp
index d8e0393..45cc72e 100644
--- a/graphics/jni/android_renderscript_RenderScript.cpp
+++ b/graphics/jni/android_renderscript_RenderScript.cpp
@@ -185,7 +185,7 @@
 
     } else {
         jclass surface_class = _env->FindClass("android/view/Surface");
-        jfieldID surfaceFieldID = _env->GetFieldID(surface_class, "mSurface", "I");
+        jfieldID surfaceFieldID = _env->GetFieldID(surface_class, ANDROID_VIEW_SURFACE_JNI_ID, "I");
         window = (Surface*)_env->GetIntField(wnd, surfaceFieldID);
     }
 
diff --git a/include/android_runtime/AndroidRuntime.h b/include/android_runtime/AndroidRuntime.h
index 99ab2f0..97a96b2 100644
--- a/include/android_runtime/AndroidRuntime.h
+++ b/include/android_runtime/AndroidRuntime.h
@@ -87,7 +87,7 @@
     virtual void onExit(int code);
 
     /** create a new thread that is visible from Java */
-    static void createJavaThread(const char* name, void (*start)(void *),
+    static android_thread_id_t createJavaThread(const char* name, void (*start)(void *),
         void* arg);
 
     /** return a pointer to the VM running in this process */
diff --git a/include/android_runtime/android_app_NativeActivity.h b/include/android_runtime/android_app_NativeActivity.h
new file mode 100644
index 0000000..c388ba8
--- /dev/null
+++ b/include/android_runtime/android_app_NativeActivity.h
@@ -0,0 +1,149 @@
+/*
+ * Copyright (C) 2010 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef _ANDROID_APP_NATIVEACTIVITY_H
+#define _ANDROID_APP_NATIVEACTIVITY_H
+
+#include <ui/InputTransport.h>
+
+#include <android/native_activity.h>
+
+#include "jni.h"
+
+namespace android {
+
+extern void android_NativeActivity_setWindowFormat(
+        ANativeActivity* activity, int32_t format);
+
+extern void android_NativeActivity_setWindowFlags(
+        ANativeActivity* activity, int32_t values, int32_t mask);
+
+extern void android_NativeActivity_showSoftInput(
+        ANativeActivity* activity, int32_t flags);
+
+extern void android_NativeActivity_hideSoftInput(
+        ANativeActivity* activity, int32_t flags);
+
+} // namespace android
+
+
+/*
+ * NDK input queue API.
+ *
+ * Here is the event flow:
+ * 1. Event arrives in input consumer, and is returned by getEvent().
+ * 2. Application calls preDispatchEvent():
+ *    a. Event is assigned a sequence ID and enqueued in mPreDispatchingKeys.
+ *    b. Main thread picks up event, hands to input method.
+ *    c. Input method eventually returns sequence # and whether it was handled.
+ *    d. finishPreDispatch() is called to enqueue the information.
+ *    e. next getEvent() call will:
+ *       - finish any pre-dispatch events that the input method handled
+ *       - return the next pre-dispatched event that the input method didn't handle.
+ *    f. (A preDispatchEvent() call on this event will now return false).
+ * 3. Application calls finishEvent() with whether it was handled.
+ *    - If handled is true, the event is finished.
+ *    - If handled is false, the event is put on mUnhandledKeys, and:
+ *      a. Main thread receives event from consumeUnhandledEvent().
+ *      b. Java sends event through default key handler.
+ *      c. event is finished.
+ */
+struct AInputQueue : public android::InputEventFactoryInterface {
+public:
+    /* Creates a consumer associated with an input channel. */
+    explicit AInputQueue(const android::sp<android::InputChannel>& channel, int workWrite);
+
+    /* Destroys the consumer and releases its input channel. */
+    ~AInputQueue();
+
+    void attachLooper(ALooper* looper, ALooper_callbackFunc* callback, void* data);
+
+    void detachLooper();
+
+    int32_t hasEvents();
+
+    int32_t getEvent(AInputEvent** outEvent);
+
+    bool preDispatchEvent(AInputEvent* event);
+
+    void finishEvent(AInputEvent* event, bool handled);
+
+    // ----------------------------------------------------------
+
+    inline android::InputConsumer& getConsumer() { return mConsumer; }
+
+    void dispatchEvent(android::KeyEvent* event);
+
+    void finishPreDispatch(int seq, bool handled);
+
+    android::KeyEvent* consumeUnhandledEvent();
+    android::KeyEvent* consumePreDispatchingEvent(int* outSeq);
+
+    virtual android::KeyEvent* createKeyEvent();
+    virtual android::MotionEvent* createMotionEvent();
+
+    int mWorkWrite;
+
+private:
+    void doUnhandledKey(android::KeyEvent* keyEvent);
+    bool preDispatchKey(android::KeyEvent* keyEvent);
+    void wakeupDispatch();
+
+    android::InputConsumer mConsumer;
+    android::sp<android::PollLoop> mPollLoop;
+
+    int mDispatchKeyRead;
+    int mDispatchKeyWrite;
+
+    struct in_flight_event {
+        android::InputEvent* event;
+        int seq;
+        bool doFinish;
+    };
+
+    struct finish_pre_dispatch {
+        int seq;
+        bool handled;
+    };
+
+    android::Mutex mLock;
+
+    int mSeq;
+
+    // Cache of previously allocated key events.
+    android::Vector<android::KeyEvent*> mAvailKeyEvents;
+    // Cache of previously allocated motion events.
+    android::Vector<android::MotionEvent*> mAvailMotionEvents;
+
+    // All input events that are actively being processed.
+    android::Vector<in_flight_event> mInFlightEvents;
+
+    // Key events that the app didn't handle, and are pending for
+    // delivery to the activity's default key handling.
+    android::Vector<android::KeyEvent*> mUnhandledKeys;
+
+    // Keys that arrived in the Java framework and need to be
+    // dispatched to the app.
+    android::Vector<android::KeyEvent*> mDispatchingKeys;
+
+    // Key events that are pending to be pre-dispatched to the IME.
+    android::Vector<in_flight_event> mPreDispatchingKeys;
+
+    // Event sequence numbers that we have finished pre-dispatching.
+    android::Vector<finish_pre_dispatch> mFinishPreDispatches;
+};
+
+#endif // _ANDROID_APP_NATIVEACTIVITY_H
diff --git a/include/android_runtime/android_view_Surface.h b/include/android_runtime/android_view_Surface.h
new file mode 100644
index 0000000..c37932e
--- /dev/null
+++ b/include/android_runtime/android_view_Surface.h
@@ -0,0 +1,31 @@
+/*
+ * Copyright (C) 2010 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef _ANDROID_VIEW_SURFACE_H
+#define _ANDROID_VIEW_SURFACE_H
+
+#include <android/native_window.h>
+
+#include "jni.h"
+
+namespace android {
+
+extern sp<ANativeWindow> android_Surface_getNativeWindow(
+        JNIEnv* env, jobject clazz);
+
+} // namespace android
+
+#endif // _ANDROID_VIEW_SURFACE_H
diff --git a/include/binder/BinderService.h b/include/binder/BinderService.h
new file mode 100644
index 0000000..2316fef
--- /dev/null
+++ b/include/binder/BinderService.h
@@ -0,0 +1,60 @@
+/*
+ * Copyright (C) 2010 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef ANDROID_BINDER_SERVICE_H
+#define ANDROID_BINDER_SERVICE_H
+
+#include <stdint.h>
+
+#include <utils/Errors.h>
+#include <utils/String16.h>
+
+#include <binder/IServiceManager.h>
+#include <binder/IPCThreadState.h>
+#include <binder/ProcessState.h>
+#include <binder/IServiceManager.h>
+
+// ---------------------------------------------------------------------------
+namespace android {
+
+template<typename SERVICE>
+class BinderService
+{
+public:
+    static status_t publish() {
+        sp<IServiceManager> sm(defaultServiceManager());
+        return sm->addService(String16(SERVICE::getServiceName()), new SERVICE());
+    }
+
+    static void publishAndJoinThreadPool() {
+        sp<ProcessState> proc(ProcessState::self());
+        sp<IServiceManager> sm(defaultServiceManager());
+        sm->addService(String16(SERVICE::getServiceName()), new SERVICE());
+        ProcessState::self()->startThreadPool();
+        IPCThreadState::self()->joinThreadPool();
+    }
+
+    static void instantiate() { publish(); }
+
+    static status_t shutdown() {
+        return NO_ERROR;
+    }
+};
+
+
+}; // namespace android
+// ---------------------------------------------------------------------------
+#endif // ANDROID_BINDER_SERVICE_H
diff --git a/include/binder/IInterface.h b/include/binder/IInterface.h
index 273d922..5f9f69c 100644
--- a/include/binder/IInterface.h
+++ b/include/binder/IInterface.h
@@ -72,21 +72,24 @@
 // ----------------------------------------------------------------------
 
 #define DECLARE_META_INTERFACE(INTERFACE)                               \
-    static const String16 descriptor;                                   \
-    static sp<I##INTERFACE> asInterface(const sp<IBinder>& obj);        \
-    virtual const String16& getInterfaceDescriptor() const;             \
+    static const android::String16 descriptor;                          \
+    static android::sp<I##INTERFACE> asInterface(                       \
+            const android::sp<android::IBinder>& obj);                  \
+    virtual const android::String16& getInterfaceDescriptor() const;    \
     I##INTERFACE();                                                     \
     virtual ~I##INTERFACE();                                            \
 
 
 #define IMPLEMENT_META_INTERFACE(INTERFACE, NAME)                       \
-    const String16 I##INTERFACE::descriptor(NAME);                      \
-    const String16& I##INTERFACE::getInterfaceDescriptor() const {      \
+    const android::String16 I##INTERFACE::descriptor(NAME);             \
+    const android::String16&                                            \
+            I##INTERFACE::getInterfaceDescriptor() const {              \
         return I##INTERFACE::descriptor;                                \
     }                                                                   \
-    sp<I##INTERFACE> I##INTERFACE::asInterface(const sp<IBinder>& obj)  \
+    android::sp<I##INTERFACE> I##INTERFACE::asInterface(                \
+            const android::sp<android::IBinder>& obj)                   \
     {                                                                   \
-        sp<I##INTERFACE> intr;                                          \
+        android::sp<I##INTERFACE> intr;                                 \
         if (obj != NULL) {                                              \
             intr = static_cast<I##INTERFACE*>(                          \
                 obj->queryLocalInterface(                               \
diff --git a/include/binder/IPCThreadState.h b/include/binder/IPCThreadState.h
index 3ab985d..04e24d2 100644
--- a/include/binder/IPCThreadState.h
+++ b/include/binder/IPCThreadState.h
@@ -40,6 +40,9 @@
 
             int                 getCallingPid();
             int                 getCallingUid();
+
+            void                setStrictModePolicy(int32_t policy);
+            int32_t             getStrictModePolicy() const;
             
             int64_t             clearCallingIdentity();
             void                restoreCallingIdentity(int64_t token);
@@ -109,8 +112,9 @@
             status_t            mLastError;
             pid_t               mCallingPid;
             uid_t               mCallingUid;
+            int32_t             mStrictModePolicy;
 };
-    
+
 }; // namespace android
 
 // ---------------------------------------------------------------------------
diff --git a/include/binder/Parcel.h b/include/binder/Parcel.h
index 66c34b2..fd0fc1f 100644
--- a/include/binder/Parcel.h
+++ b/include/binder/Parcel.h
@@ -56,9 +56,16 @@
 
     bool                hasFileDescriptors() const;
 
+    // Writes the RPC header.
     status_t            writeInterfaceToken(const String16& interface);
-    bool                enforceInterface(const String16& interface) const;
-    bool                checkInterface(IBinder*) const;    
+
+    // Parses the RPC header, returning true if the interface name
+    // in the header matches the expected interface from the caller.
+    // If strict_policy_out is non-NULL, the RPC header's StrictMode policy
+    // mask is returned.
+    bool                enforceInterface(const String16& interface,
+                                         int32_t* strict_policy_out = NULL) const;
+    bool                checkInterface(IBinder*) const;
 
     void                freeData();
 
@@ -100,6 +107,11 @@
     
     status_t            writeObject(const flat_binder_object& val, bool nullMetaData);
 
+    // Like Parcel.java's writeNoException().  Just writes a zero int32.
+    // Currently the native implementation doesn't do any of the StrictMode
+    // stack gathering and serialization that the Java implementation does.
+    status_t            writeNoException();
+
     void                remove(size_t start, size_t amt);
     
     status_t            read(void* outData, size_t len) const;
@@ -122,7 +134,14 @@
     sp<IBinder>         readStrongBinder() const;
     wp<IBinder>         readWeakBinder() const;
     status_t            read(Flattenable& val) const;
-    
+
+    // Like Parcel.java's readExceptionCode().  Reads the first int32
+    // off of a Parcel's header, returning 0 or the negative error
+    // code on exceptions, but also deals with skipping over rich
+    // response headers.  Callers should use this to read & parse the
+    // response headers rather than doing it by hand.
+    int32_t             readExceptionCode() const;
+
     // Retrieve native_handle from the parcel. This returns a copy of the
     // parcel's native_handle (the caller takes ownership). The caller
     // must free the native_handle with native_handle_close() and 
diff --git a/include/camera/Camera.h b/include/camera/Camera.h
index ee2b30c..9974f2f 100644
--- a/include/camera/Camera.h
+++ b/include/camera/Camera.h
@@ -93,6 +93,32 @@
     CAMERA_ERROR_SERVER_DIED = 100
 };
 
+enum {
+    CAMERA_FACING_BACK = 0,
+    CAMERA_FACING_FRONT = 1 /* The camera faces to the user */
+};
+
+struct CameraInfo {
+
+    /**
+     * The direction that the camera faces to. It should be
+     * CAMERA_FACING_BACK or CAMERA_FACING_FRONT.
+     */
+    int facing;
+
+    /**
+     * The orientation of the camera image. The value is the angle that the
+     * camera image needs to be rotated clockwise so it shows correctly on
+     * the display in its natural orientation. It should be 0, 90, 180, or 270.
+     *
+     * For example, suppose a device has a naturally tall screen, but the camera
+     * sensor is mounted in landscape. If the top side of the camera sensor is
+     * aligned with the right edge of the display in natural orientation, the
+     * value should be 90.
+     */
+    int orientation;
+};
+
 class ICameraService;
 class ICamera;
 class Surface;
@@ -113,7 +139,10 @@
 public:
             // construct a camera client from an existing remote
     static  sp<Camera>  create(const sp<ICamera>& camera);
-    static  sp<Camera>  connect();
+    static  int32_t     getNumberOfCameras();
+    static  status_t    getCameraInfo(int cameraId,
+                                      struct CameraInfo* cameraInfo);
+    static  sp<Camera>  connect(int cameraId);
                         ~Camera();
             void        init();
 
diff --git a/include/camera/CameraHardwareInterface.h b/include/camera/CameraHardwareInterface.h
index d877c74..1529db7 100644
--- a/include/camera/CameraHardwareInterface.h
+++ b/include/camera/CameraHardwareInterface.h
@@ -213,8 +213,15 @@
     virtual status_t dump(int fd, const Vector<String16>& args) const = 0;
 };
 
-/** factory function to instantiate a camera hardware object */
-extern "C" sp<CameraHardwareInterface> openCameraHardware();
+/**
+ * The functions need to be provided by the camera HAL.
+ *
+ * If getNumberOfCameras() returns N, the valid cameraId for getCameraInfo()
+ * and openCameraHardware() is 0 to N-1.
+ */
+extern "C" int HAL_getNumberOfCameras();
+extern "C" void HAL_getCameraInfo(int cameraId, struct CameraInfo* cameraInfo);
+extern "C" sp<CameraHardwareInterface> HAL_openCameraHardware(int cameraId);
 
 };  // namespace android
 
diff --git a/include/camera/CameraParameters.h b/include/camera/CameraParameters.h
index 5ea83a5..e12a694 100644
--- a/include/camera/CameraParameters.h
+++ b/include/camera/CameraParameters.h
@@ -65,13 +65,15 @@
     // Supported preview frame sizes in pixels.
     // Example value: "800x600,480x320". Read only.
     static const char KEY_SUPPORTED_PREVIEW_SIZES[];
-    // The image format for preview frames.
+    // The image format for preview frames. See CAMERA_MSG_PREVIEW_FRAME in
+    // frameworks/base/include/camera/Camera.h.
     // Example value: "yuv420sp" or PIXEL_FORMAT_XXX constants. Read/write.
     static const char KEY_PREVIEW_FORMAT[];
     // Supported image formats for preview frames.
     // Example value: "yuv420sp,yuv422i-yuyv". Read only.
     static const char KEY_SUPPORTED_PREVIEW_FORMATS[];
-    // Number of preview frames per second.
+    // Number of preview frames per second. This is the target frame rate. The
+    // actual frame rate depends on the driver.
     // Example value: "15". Read/write.
     static const char KEY_PREVIEW_FRAME_RATE[];
     // Supported number of preview frames per second.
@@ -83,7 +85,8 @@
     // Supported dimensions for captured pictures in pixels.
     // Example value: "2048x1536,1024x768". Read only.
     static const char KEY_SUPPORTED_PICTURE_SIZES[];
-    // The image format for captured pictures.
+    // The image format for captured pictures. See CAMERA_MSG_COMPRESSED_IMAGE
+    // in frameworks/base/include/camera/Camera.h.
     // Example value: "jpeg" or PIXEL_FORMAT_XXX constants. Read/write.
     static const char KEY_PICTURE_FORMAT[];
     // Supported image formats for captured pictures.
@@ -119,14 +122,17 @@
     // should not set default value for this parameter.
     // Example value: "0" or "90" or "180" or "270". Write only.
     static const char KEY_ROTATION[];
-    // GPS latitude coordinate. This will be stored in JPEG EXIF header.
-    // Example value: "25.032146". Write only.
+    // GPS latitude coordinate. GPSLatitude and GPSLatitudeRef will be stored in
+    // JPEG EXIF header.
+    // Example value: "25.032146" or "-33.462809". Write only.
     static const char KEY_GPS_LATITUDE[];
-    // GPS longitude coordinate. This will be stored in JPEG EXIF header.
-    // Example value: "121.564448". Write only.
+    // GPS longitude coordinate. GPSLongitude and GPSLongitudeRef will be stored
+    // in JPEG EXIF header.
+    // Example value: "121.564448" or "-70.660286". Write only.
     static const char KEY_GPS_LONGITUDE[];
-    // GPS altitude. This will be stored in JPEG EXIF header.
-    // Example value: "21.0". Write only.
+    // GPS altitude. GPSAltitude and GPSAltitudeRef will be stored in JPEG EXIF
+    // header.
+    // Example value: "21.0" or "-5". Write only.
     static const char KEY_GPS_ALTITUDE[];
     // GPS timestamp (UTC in seconds since January 1, 1970). This should be
     // stored in JPEG EXIF header.
@@ -221,9 +227,42 @@
     // Example value: "true". Read only.
     static const char KEY_SMOOTH_ZOOM_SUPPORTED[];
 
+    // The distances (in meters) from the camera to where an object appears to
+    // be in focus. The object is sharpest at the optimal focus distance. The
+    // depth of field is the far focus distance minus near focus distance.
+    //
+    // Applications can read this parameter anytime to get the latest focus
+    // distances. If the focus mode is FOCUS_MODE_EDOF, the values may be all
+    // 0, which means focus distance is not applicable. If the focus mode is
+    // FOCUS_MODE_CONTINUOUS and autofocus has started, focus distances may
+    // change from time to time.
+    //
+    // Far focus distance > optimal focus distance > near focus distance. If
+    // the far focus distance is infinity, the value should be "Infinity" (case
+    // sensitive). The format is three float values separated by commas. The
+    // first is near focus distance. The second is optimal focus distance. The
+    // third is far focus distance.
+    // Example value: "0.95,1.9,Infinity" or "0.049,0.05,0.051". Read only.
+    static const char KEY_FOCUS_DISTANCES[];
+
+    // The image format for video frames. See CAMERA_MSG_VIDEO_FRAME in
+    // frameworks/base/include/camera/Camera.h.
+    // Example value: "yuv420sp" or PIXEL_FORMAT_XXX constants. Read only.
+    static const char KEY_VIDEO_FRAME_FORMAT[];
+
+    // Metering mode. This affects how camera determines exposure.
+    // Example value: "spot" or METERING_MODE_XXX constants. Read/write.
+    static const char KEY_METERING_MODE[];
+    // Supported metering modes.
+    // Example value: "center-weighted,frame-average,spot". Read only.
+    static const char KEY_SUPPORTED_METERING_MODES[];
+
     // Value for KEY_ZOOM_SUPPORTED or KEY_SMOOTH_ZOOM_SUPPORTED.
     static const char TRUE[];
 
+    // Value for KEY_FOCUS_DISTANCES.
+    static const char FOCUS_DISTANCE_INFINITY[];
+
     // Values for white balance settings.
     static const char WHITE_BALANCE_AUTO[];
     static const char WHITE_BALANCE_INCANDESCENT[];
@@ -309,6 +348,21 @@
     // continuously. Applications should not call
     // CameraHardwareInterface.autoFocus in this mode.
     static const char FOCUS_MODE_EDOF[];
+    // Continuous focus mode. The camera continuously tries to focus. This is
+    // ideal for shooting video or shooting photo of moving object. Continuous
+    // focus starts when CameraHardwareInterface.autoFocus is called. Focus
+    // callback will be only called once as soon as the picture is in focus.
+    static const char FOCUS_MODE_CONTINUOUS[];
+
+    // The camera determines the exposure by giving more weight to the
+    // central part of the scene.
+    static const char METERING_MODE_CENTER_WEIGHTED[];
+    // The camera determines the exposure by averaging the entire scene,
+    // giving no weighting to any particular area.
+    static const char METERING_MODE_FRAME_AVERAGE[];
+    // The camera determines the exposure by a very small area of the scene,
+    // typically the center.
+    static const char METERING_MODE_SPOT[];
 
 private:
     DefaultKeyedVector<String8,String8>    mMap;
diff --git a/include/camera/ICameraService.h b/include/camera/ICameraService.h
index 82b1283..7d70c1e 100644
--- a/include/camera/ICameraService.h
+++ b/include/camera/ICameraService.h
@@ -30,13 +30,19 @@
 {
 public:
     enum {
-        CONNECT = IBinder::FIRST_CALL_TRANSACTION,
+        GET_NUMBER_OF_CAMERAS = IBinder::FIRST_CALL_TRANSACTION,
+        GET_CAMERA_INFO,
+        CONNECT
     };
 
 public:
     DECLARE_META_INTERFACE(CameraService);
 
-    virtual sp<ICamera>     connect(const sp<ICameraClient>& cameraClient) = 0;
+    virtual int32_t         getNumberOfCameras() = 0;
+    virtual status_t        getCameraInfo(int cameraId,
+                                          struct CameraInfo* cameraInfo) = 0;
+    virtual sp<ICamera>     connect(const sp<ICameraClient>& cameraClient,
+                                    int cameraId) = 0;
 };
 
 // ----------------------------------------------------------------------------
diff --git a/include/gui/ISensorEventConnection.h b/include/gui/ISensorEventConnection.h
new file mode 100644
index 0000000..ed4e4cc
--- /dev/null
+++ b/include/gui/ISensorEventConnection.h
@@ -0,0 +1,57 @@
+/*
+ * Copyright (C) 2010 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef ANDROID_GUI_ISENSOR_EVENT_CONNECTION_H
+#define ANDROID_GUI_ISENSOR_EVENT_CONNECTION_H
+
+#include <stdint.h>
+#include <sys/types.h>
+
+#include <utils/Errors.h>
+#include <utils/RefBase.h>
+
+#include <binder/IInterface.h>
+
+namespace android {
+// ----------------------------------------------------------------------------
+
+class SensorChannel;
+
+class ISensorEventConnection : public IInterface
+{
+public:
+    DECLARE_META_INTERFACE(SensorEventConnection);
+
+    virtual sp<SensorChannel> getSensorChannel() const = 0;
+    virtual status_t enableDisable(int handle, bool enabled) = 0;
+    virtual status_t setEventRate(int handle, nsecs_t ns) = 0;
+};
+
+// ----------------------------------------------------------------------------
+
+class BnSensorEventConnection : public BnInterface<ISensorEventConnection>
+{
+public:
+    virtual status_t    onTransact( uint32_t code,
+                                    const Parcel& data,
+                                    Parcel* reply,
+                                    uint32_t flags = 0);
+};
+
+// ----------------------------------------------------------------------------
+}; // namespace android
+
+#endif // ANDROID_GUI_ISENSOR_EVENT_CONNECTION_H
diff --git a/include/gui/ISensorServer.h b/include/gui/ISensorServer.h
new file mode 100644
index 0000000..3e05076
--- /dev/null
+++ b/include/gui/ISensorServer.h
@@ -0,0 +1,57 @@
+/*
+ * Copyright (C) 2010 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef ANDROID_GUI_ISENSORSERVER_H
+#define ANDROID_GUI_ISENSORSERVER_H
+
+#include <stdint.h>
+#include <sys/types.h>
+
+#include <utils/Errors.h>
+#include <utils/RefBase.h>
+
+#include <binder/IInterface.h>
+
+namespace android {
+// ----------------------------------------------------------------------------
+
+class Sensor;
+class ISensorEventConnection;
+
+class ISensorServer : public IInterface
+{
+public:
+    DECLARE_META_INTERFACE(SensorServer);
+
+    virtual Vector<Sensor> getSensorList()= 0;
+    virtual sp<ISensorEventConnection> createSensorEventConnection() = 0;
+};
+
+// ----------------------------------------------------------------------------
+
+class BnSensorServer : public BnInterface<ISensorServer>
+{
+public:
+    virtual status_t    onTransact( uint32_t code,
+                                    const Parcel& data,
+                                    Parcel* reply,
+                                    uint32_t flags = 0);
+};
+
+// ----------------------------------------------------------------------------
+}; // namespace android
+
+#endif // ANDROID_GUI_ISENSORSERVER_H
diff --git a/include/gui/Sensor.h b/include/gui/Sensor.h
new file mode 100644
index 0000000..86a16f1
--- /dev/null
+++ b/include/gui/Sensor.h
@@ -0,0 +1,88 @@
+/*
+ * Copyright (C) 2010 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef ANDROID_GUI_SENSOR_H
+#define ANDROID_GUI_SENSOR_H
+
+#include <stdint.h>
+#include <sys/types.h>
+
+#include <utils/Errors.h>
+#include <utils/String8.h>
+#include <utils/Flattenable.h>
+
+#include <hardware/sensors.h>
+
+#include <android/sensor.h>
+
+// ----------------------------------------------------------------------------
+// Concrete types for the NDK
+struct ASensor { };
+
+// ----------------------------------------------------------------------------
+namespace android {
+// ----------------------------------------------------------------------------
+
+class Parcel;
+
+// ----------------------------------------------------------------------------
+
+class Sensor : public ASensor, public Flattenable
+{
+public:
+    enum {
+        TYPE_ACCELEROMETER  = ASENSOR_TYPE_ACCELEROMETER,
+        TYPE_MAGNETIC_FIELD = ASENSOR_TYPE_MAGNETIC_FIELD,
+        TYPE_GYROSCOPE      = ASENSOR_TYPE_GYROSCOPE,
+        TYPE_LIGHT          = ASENSOR_TYPE_LIGHT,
+        TYPE_PROXIMITY      = ASENSOR_TYPE_PROXIMITY
+    };
+
+    Sensor();
+    virtual ~Sensor();
+
+    const String8& getName() const;
+    const String8& getVendor() const;
+    int32_t getHandle() const;
+    int32_t getType() const;
+    float getMinValue() const;
+    float getMaxValue() const;
+    float getResolution() const;
+    float getPowerUsage() const;
+
+    // Flattenable interface
+    virtual size_t getFlattenedSize() const;
+    virtual size_t getFdCount() const;
+    virtual status_t flatten(void* buffer, size_t size,
+            int fds[], size_t count) const;
+    virtual status_t unflatten(void const* buffer, size_t size,
+            int fds[], size_t count);
+
+private:
+    String8 mName;
+    String8 mVendor;
+    int32_t mHandle;
+    int32_t mType;
+    float   mMinValue;
+    float   mMaxValue;
+    float   mResolution;
+    float   mPower;
+};
+
+// ----------------------------------------------------------------------------
+}; // namespace android
+
+#endif // ANDROID_GUI_SENSOR_H
diff --git a/include/gui/SensorChannel.h b/include/gui/SensorChannel.h
new file mode 100644
index 0000000..bb54618
--- /dev/null
+++ b/include/gui/SensorChannel.h
@@ -0,0 +1,53 @@
+/*
+ * Copyright (C) 2010 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef ANDROID_GUI_SENSOR_CHANNEL_H
+#define ANDROID_GUI_SENSOR_CHANNEL_H
+
+#include <stdint.h>
+#include <sys/types.h>
+
+#include <utils/Errors.h>
+#include <utils/RefBase.h>
+
+
+namespace android {
+// ----------------------------------------------------------------------------
+class Parcel;
+
+class SensorChannel : public RefBase
+{
+public:
+
+            SensorChannel();
+            SensorChannel(const Parcel& data);
+    virtual ~SensorChannel();
+
+    int getFd() const;
+    ssize_t write(void const* vaddr, size_t size);
+    ssize_t read(void* vaddr, size_t size);
+
+    status_t writeToParcel(Parcel* reply) const;
+
+private:
+    int mSendFd;
+    mutable int mReceiveFd;
+};
+
+// ----------------------------------------------------------------------------
+}; // namespace android
+
+#endif // ANDROID_GUI_SENSOR_CHANNEL_H
diff --git a/include/gui/SensorEventQueue.h b/include/gui/SensorEventQueue.h
new file mode 100644
index 0000000..d8d8128
--- /dev/null
+++ b/include/gui/SensorEventQueue.h
@@ -0,0 +1,71 @@
+/*
+ * Copyright (C) 2010 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef ANDROID_SENSOR_EVENT_QUEUE_H
+#define ANDROID_SENSOR_EVENT_QUEUE_H
+
+#include <stdint.h>
+#include <sys/types.h>
+
+#include <utils/Errors.h>
+#include <utils/RefBase.h>
+#include <utils/Timers.h>
+
+#include <gui/SensorChannel.h>
+
+// ----------------------------------------------------------------------------
+
+struct ALooper;
+struct ASensorEvent;
+
+// Concrete types for the NDK
+struct ASensorEventQueue {
+    ALooper* looper;
+};
+
+// ----------------------------------------------------------------------------
+namespace android {
+// ----------------------------------------------------------------------------
+
+class ISensorEventConnection;
+class Sensor;
+
+// ----------------------------------------------------------------------------
+
+class SensorEventQueue : public ASensorEventQueue, public RefBase
+{
+public:
+            SensorEventQueue(const sp<ISensorEventConnection>& connection);
+    virtual ~SensorEventQueue();
+    virtual void onFirstRef();
+
+    int getFd() const;
+    ssize_t write(ASensorEvent const* events, size_t numEvents);
+    ssize_t read(ASensorEvent* events, size_t numEvents);
+
+    status_t enableSensor(Sensor const* sensor) const;
+    status_t disableSensor(Sensor const* sensor) const;
+    status_t setEventRate(Sensor const* sensor, nsecs_t ns) const;
+
+private:
+    sp<ISensorEventConnection> mSensorEventConnection;
+    sp<SensorChannel> mSensorChannel;
+};
+
+// ----------------------------------------------------------------------------
+}; // namespace android
+
+#endif // ANDROID_SENSOR_EVENT_QUEUE_H
diff --git a/include/gui/SensorManager.h b/include/gui/SensorManager.h
new file mode 100644
index 0000000..0d65334
--- /dev/null
+++ b/include/gui/SensorManager.h
@@ -0,0 +1,63 @@
+/*
+ * Copyright (C) 2010 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef ANDROID_GUI_SENSOR_MANAGER_H
+#define ANDROID_GUI_SENSOR_MANAGER_H
+
+#include <stdint.h>
+#include <sys/types.h>
+
+#include <utils/Errors.h>
+#include <utils/RefBase.h>
+#include <utils/Singleton.h>
+#include <utils/Vector.h>
+
+#include <gui/SensorEventQueue.h>
+
+// ----------------------------------------------------------------------------
+// Concrete types for the NDK
+struct ASensorManager { };
+
+// ----------------------------------------------------------------------------
+namespace android {
+// ----------------------------------------------------------------------------
+
+class ISensorServer;
+class Sensor;
+class SensorEventQueue;
+
+// ----------------------------------------------------------------------------
+
+class SensorManager : public ASensorManager, public Singleton<SensorManager>
+{
+public:
+    SensorManager();
+    ~SensorManager();
+
+    ssize_t getSensorList(Sensor**) const;
+    Sensor* getDefaultSensor(int type);
+    sp<SensorEventQueue> createEventQueue();
+
+private:
+    sp<ISensorServer> mSensorServer;
+    Sensor* mSensorList;
+    Vector<Sensor> mSensors;
+};
+
+// ----------------------------------------------------------------------------
+}; // namespace android
+
+#endif // ANDROID_GUI_SENSOR_MANAGER_H
diff --git a/include/media/AudioEffect.h b/include/media/AudioEffect.h
new file mode 100644
index 0000000..e9ff8a3
--- /dev/null
+++ b/include/media/AudioEffect.h
@@ -0,0 +1,466 @@
+/*
+ * Copyright (C) 2009 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef ANDROID_AUDIOEFFECT_H
+#define ANDROID_AUDIOEFFECT_H
+
+#include <stdint.h>
+#include <sys/types.h>
+
+#include <media/IAudioFlinger.h>
+#include <media/IEffect.h>
+#include <media/IEffectClient.h>
+#include <media/EffectApi.h>
+#include <media/AudioSystem.h>
+
+#include <utils/RefBase.h>
+#include <utils/Errors.h>
+#include <binder/IInterface.h>
+
+
+namespace android {
+
+// ----------------------------------------------------------------------------
+
+class effect_param_cblk_t;
+
+// ----------------------------------------------------------------------------
+
+class AudioEffect : public RefBase
+{
+public:
+
+    /*
+     *  Static methods for effect libraries management.
+     */
+
+    /*
+     *   Loads the effect library which path is given as first argument.
+     *   This must be the full path of a dynamic library (.so) implementing one or
+     *   more effect engines and exposing the effect library interface described in
+     *   EffectApi.h. The function returns a handle on the library for use by
+     *   further call to unloadEffectLibrary() to unload the library.
+     *
+     *   Parameters:
+     *          libPath:    full path of the dynamic library file in the file system.
+     *          handle:     address where to return the library handle
+     *
+     *   Returned status (from utils/Errors.h) can be:
+     *          NO_ERROR    successful operation.
+     *          PERMISSION_DENIED could not get AudioFlinger interface or
+     *                      application does not have permission to configure audio
+     *          NO_INIT     effect factory not initialized or
+     *                      library could not be loaded or
+     *                      library does not implement required functions
+     *          BAD_VALUE   invalid libPath string or handle
+     *
+     *   Returned value:
+     *          *handle updated with library handle
+     */
+    static status_t loadEffectLibrary(const char *libPath, int *handle);
+
+    /*
+     *   Unloads the effect library which handle is given as argument.
+     *
+     *   Parameters:
+     *          handle: library handle
+     *
+     *   Returned status (from utils/Errors.h) can be:
+     *          NO_ERROR    successful operation.
+     *          PERMISSION_DENIED could not get AudioFlinger interface or
+     *                      application does not have permission to configure audio
+     *          NO_INIT     effect factory not initialized
+     *          BAD_VALUE   invalid handle
+     */
+    static status_t unloadEffectLibrary(int handle);
+
+    /*
+     *  Static methods for effects enumeration.
+     */
+
+    /*
+     * Returns the number of effects available. This method together
+     * with queryEffect() is used to enumerate all effects:
+     * The enumeration sequence is:
+     *      queryNumberEffects(&num_effects);
+     *      for (i = 0; i < num_effects; i++)
+     *          queryEffect(i,...);
+     *
+     * Parameters:
+     *      numEffects:    address where the number of effects should be returned.
+     *
+     * Returned status (from utils/Errors.h) can be:
+     *      NO_ERROR   successful operation.
+     *      PERMISSION_DENIED could not get AudioFlinger interface
+     *      NO_INIT    effect library failed to initialize
+     *      BAD_VALUE  invalid numEffects pointer
+     *
+     * Returned value
+     *   *numEffects:     updated with number of effects available
+     */
+    static status_t queryNumberEffects(uint32_t *numEffects);
+
+    /*
+     * Returns an effect descriptor during effect
+     * enumeration.
+     *
+     * Parameters:
+     *      index:      index of the queried effect.
+     *      descriptor: address where the effect descriptor should be returned.
+     *
+     * Returned status (from utils/Errors.h) can be:
+     *      NO_ERROR        successful operation.
+     *      PERMISSION_DENIED could not get AudioFlinger interface
+     *      NO_INIT         effect library failed to initialize
+     *      BAD_VALUE       invalid descriptor pointer or index
+     *      INVALID_OPERATION  effect list has changed since last execution of queryNumberEffects()
+     *
+     * Returned value
+     *   *descriptor:     updated with effect descriptor
+     */
+    static status_t queryEffect(uint32_t index, effect_descriptor_t *descriptor);
+
+
+    /*
+     * Returns the descriptor for the specified effect uuid.
+     *
+     * Parameters:
+     *      uuid:       pointer to effect uuid.
+     *      descriptor: address where the effect descriptor should be returned.
+     *
+     * Returned status (from utils/Errors.h) can be:
+     *      NO_ERROR        successful operation.
+     *      PERMISSION_DENIED could not get AudioFlinger interface
+     *      NO_INIT         effect library failed to initialize
+     *      BAD_VALUE       invalid uuid or descriptor pointers
+     *      NAME_NOT_FOUND  no effect with this uuid found
+     *
+     * Returned value
+     *   *descriptor updated with effect descriptor
+     */
+    static status_t getEffectDescriptor(effect_uuid_t *uuid, effect_descriptor_t *descriptor);
+
+
+    /*
+     * Events used by callback function (effect_callback_t).
+     */
+    enum event_type {
+        EVENT_CONTROL_STATUS_CHANGED = 0,
+        EVENT_ENABLE_STATUS_CHANGED = 1,
+        EVENT_PARAMETER_CHANGED = 2,
+        EVENT_ERROR = 3
+    };
+
+    /* Callback function notifying client application of a change in effect engine state or
+     * configuration.
+     * An effect engine can be shared by several applications but only one has the control
+     * of the engine activity and configuration at a time.
+     * The EVENT_CONTROL_STATUS_CHANGED event is received when an application loses or
+     * retrieves the control of the effect engine. Loss of control happens
+     * if another application requests the use of the engine by creating an AudioEffect for
+     * the same effect type but with a higher priority. Control is returned when the
+     * application having the control deletes its AudioEffect object.
+     * The EVENT_ENABLE_STATUS_CHANGED event is received by all applications not having the
+     * control of the effect engine when the effect is enabled or disabled.
+     * The EVENT_PARAMETER_CHANGED event is received by all applications not having the
+     * control of the effect engine when an effect parameter is changed.
+     * The EVENT_ERROR event is received when the media server process dies.
+     *
+     * Parameters:
+     *
+     * event:   type of event notified (see enum AudioEffect::event_type).
+     * user:    Pointer to context for use by the callback receiver.
+     * info:    Pointer to optional parameter according to event type:
+     *  - EVENT_CONTROL_STATUS_CHANGED:  boolean indicating if control is granted (true)
+     *  or stolen (false).
+     *  - EVENT_ENABLE_STATUS_CHANGED: boolean indicating if effect is now enabled (true)
+     *  or disabled (false).
+     *  - EVENT_PARAMETER_CHANGED: pointer to a effect_param_t structure.
+     *  - EVENT_ERROR:  status_t indicating the error (DEAD_OBJECT when media server dies).
+     */
+
+    typedef void (*effect_callback_t)(int32_t event, void* user, void *info);
+
+
+    /* Constructor.
+     * AudioEffect is the base class for creating and controlling an effect engine from
+     * the application process. Creating an AudioEffect object will create the effect engine
+     * in the AudioFlinger if no engine of the specified type exists. If one exists, this engine
+     * will be used. The application creating the AudioEffect object (or a derived class like
+     * Reverb for instance) will either receive control of the effect engine or not, depending
+     * on the priority parameter. If priority is higher than the priority used by the current
+     * effect engine owner, the control will be transfered to the new application. Otherwise
+     * control will remain to the previous application. In this case, the new application will be
+     * notified of changes in effect engine state or control ownership by the effect callback.
+     * After creating the AudioEffect, the application must call the initCheck() method and
+     * check the creation status before trying to control the effect engine (see initCheck()).
+     * If the effect is to be applied to an AudioTrack or MediaPlayer only the application
+     * must specify the audio session ID corresponding to this player.
+     */
+
+    /* Simple Constructor.
+     */
+    AudioEffect();
+
+
+    /* Constructor.
+     *
+     * Parameters:
+     *
+     * type:  type of effect created: can be null if uuid is specified. This corresponds to
+     *        the OpenSL ES interface implemented by this effect.
+     * uuid:  Uuid of effect created: can be null if type is specified. This uuid corresponds to
+     *        a particular implementation of an effect type.
+     * priority:    requested priority for effect control: the priority level corresponds to the
+     *      value of priority parameter: negative values indicate lower priorities, positive values
+     *      higher priorities, 0 being the normal priority.
+     * cbf:         optional callback function (see effect_callback_t)
+     * user:        pointer to context for use by the callback receiver.
+     * sessionID:   audio session this effect is associated to. If 0, the effect will be global to
+     *      the output mix. If not 0, the effect will be applied to all players
+     *      (AudioTrack or MediaPLayer) within the same audio session.
+     * output:  HAL audio output stream to which this effect must be attached. Leave at 0 for
+     *      automatic output selection by AudioFlinger.
+     */
+
+    AudioEffect(const effect_uuid_t *type,
+                const effect_uuid_t *uuid = NULL,
+                  int32_t priority = 0,
+                  effect_callback_t cbf = 0,
+                  void* user = 0,
+                  int sessionId = 0,
+                  audio_io_handle_t output = 0
+                  );
+
+    /* Constructor.
+     *      Same as above but with type and uuid specified by character strings
+     */
+    AudioEffect(const char *typeStr,
+                    const char *uuidStr = NULL,
+                    int32_t priority = 0,
+                    effect_callback_t cbf = 0,
+                    void* user = 0,
+                    int sessionId = 0,
+                    audio_io_handle_t output = 0
+                    );
+
+    /* Terminates the AudioEffect and unregisters it from AudioFlinger.
+     * The effect engine is also destroyed if this AudioEffect was the last controlling
+     * the engine.
+     */
+                        ~AudioEffect();
+
+    /* Initialize an uninitialized AudioEffect.
+    * Returned status (from utils/Errors.h) can be:
+    *  - NO_ERROR or ALREADY_EXISTS: successful initialization
+    *  - INVALID_OPERATION: AudioEffect is already initialized
+    *  - BAD_VALUE: invalid parameter
+    *  - NO_INIT: audio flinger or audio hardware not initialized
+    * */
+            status_t    set(const effect_uuid_t *type,
+                            const effect_uuid_t *uuid = NULL,
+                            int32_t priority = 0,
+                            effect_callback_t cbf = 0,
+                            void* user = 0,
+                            int sessionId = 0,
+                            audio_io_handle_t output = 0
+                            );
+
+    /* Result of constructing the AudioEffect. This must be checked
+     * before using any AudioEffect API.
+     * initCheck() can return:
+     *  - NO_ERROR:    the effect engine is successfully created and the application has control.
+     *  - ALREADY_EXISTS: the effect engine is successfully created but the application does not
+     *              have control.
+     *  - NO_INIT:     the effect creation failed.
+     *
+     */
+            status_t    initCheck() const;
+
+
+    /* Returns the unique effect Id for the controlled effect engine. This ID is unique
+     * system wide and is used for instance in the case of auxiliary effects to attach
+     * the effect to an AudioTrack or MediaPlayer.
+     *
+     */
+            int32_t     id() const { return mId; }
+
+    /* Returns a descriptor for the effect (see effect_descriptor_t in EffectApi.h).
+     */
+            effect_descriptor_t descriptor() const;
+
+    /* Returns effect control priority of this AudioEffect object.
+     */
+            int32_t     priority() const { return mPriority; }
+
+
+    /* Enables or disables the effect engine.
+     *
+     * Parameters:
+     *  enabled: requested enable state.
+     *
+     * Returned status (from utils/Errors.h) can be:
+     *  - NO_ERROR: successful operation
+     *  - INVALID_OPERATION: the application does not have control of the effect engine or the
+     *  effect is already in the requested state.
+     */
+    virtual status_t    setEnabled(bool enabled);
+            bool        getEnabled() const;
+
+    /* Sets a parameter value.
+     *
+     * Parameters:
+     *      param:  pointer to effect_param_t structure containing the parameter
+     *          and its value (See EffectApi.h).
+     * Returned status (from utils/Errors.h) can be:
+     *  - NO_ERROR: successful operation.
+     *  - INVALID_OPERATION: the application does not have control of the effect engine.
+     *  - BAD_VALUE: invalid parameter identifier or value.
+     *  - DEAD_OBJECT: the effect engine has been deleted.
+     */
+     virtual status_t   setParameter(effect_param_t *param);
+
+    /* Prepare a new parameter value that will be set by next call to
+     * setParameterCommit(). This method can be used to set multiple parameters
+     * in a synchronous manner or to avoid multiple binder calls for each
+     * parameter.
+     *
+     * Parameters:
+     *      param:  pointer to effect_param_t structure containing the parameter
+     *          and its value (See EffectApi.h).
+     *
+     * Returned status (from utils/Errors.h) can be:
+     *  - NO_ERROR: successful operation.
+     *  - INVALID_OPERATION: the application does not have control of the effect engine.
+     *  - NO_MEMORY: no more space available in shared memory used for deferred parameter
+     *  setting.
+     */
+     virtual status_t   setParameterDeferred(effect_param_t *param);
+
+     /* Commit all parameter values previously prepared by setParameterDeferred().
+      *
+      * Parameters:
+      *     none
+      *
+      * Returned status (from utils/Errors.h) can be:
+      *  - NO_ERROR: successful operation.
+      *  - INVALID_OPERATION: No new parameter values ready for commit.
+      *  - BAD_VALUE: invalid parameter identifier or value: there is no indication
+      *     as to which of the parameters caused this error.
+      *  - DEAD_OBJECT: the effect engine has been deleted.
+      */
+     virtual status_t   setParameterCommit();
+
+    /* Gets a parameter value.
+     *
+     * Parameters:
+     *      param:  pointer to effect_param_t structure containing the parameter
+     *          and the returned value (See EffectApi.h).
+     *
+     * Returned status (from utils/Errors.h) can be:
+     *  - NO_ERROR: successful operation.
+     *  - INVALID_OPERATION: the AudioEffect was not successfully initialized.
+     *  - BAD_VALUE: invalid parameter identifier.
+     *  - DEAD_OBJECT: the effect engine has been deleted.
+     */
+     virtual status_t   getParameter(effect_param_t *param);
+
+     /* Sends a command and receives a response to/from effect engine.
+      *     See EffectApi.h for details on effect command() function, valid command codes
+      *     and formats.
+      */
+     virtual status_t command(int32_t cmdCode,
+                              int32_t cmdSize,
+                              void *cmdData,
+                              int32_t *replySize,
+                              void *replyData);
+
+
+     /*
+      * Utility functions.
+      */
+
+     /* Converts the string passed as first argument to the effect_uuid_t
+      * pointed to by second argument
+      */
+     static status_t stringToGuid(const char *str, effect_uuid_t *guid);
+     /* Converts the effect_uuid_t pointed to by first argument to the
+      * string passed as second argument
+      */
+     static status_t guidToString(const effect_uuid_t *guid, char *str, size_t maxLen);
+
+protected:
+     volatile int32_t        mEnabled;           // enable state
+     int32_t                 mSessionId;         // audio session ID
+     int32_t                 mPriority;          // priority for effect control
+     status_t                mStatus;            // effect status
+     effect_callback_t       mCbf;               // callback function for status, control and
+                                                 // parameter changes notifications
+     void*                   mUserData;          // client context for callback function
+     effect_descriptor_t     mDescriptor;        // effect descriptor
+     int32_t                 mId;                // system wide unique effect engine instance ID
+
+private:
+
+     // Implements the IEffectClient interface
+    class EffectClient : public android::BnEffectClient,  public android::IBinder::DeathRecipient
+    {
+    public:
+
+        EffectClient(AudioEffect *effect) : mEffect(effect){}
+
+        // IEffectClient
+        virtual void controlStatusChanged(bool controlGranted) {
+            mEffect->controlStatusChanged(controlGranted);
+        }
+        virtual void enableStatusChanged(bool enabled) {
+            mEffect->enableStatusChanged(enabled);
+        }
+        virtual void commandExecuted(int cmdCode,
+                                     int cmdSize,
+                                     void *pCmdData,
+                                     int replySize,
+                                     void *pReplyData) {
+            mEffect->commandExecuted(cmdCode, cmdSize, pCmdData, replySize, pReplyData);
+        }
+
+        // IBinder::DeathRecipient
+        virtual void binderDied(const wp<IBinder>& who) {mEffect->binderDied();}
+
+    private:
+        AudioEffect *mEffect;
+    };
+
+
+    friend class EffectClient;
+
+    // IEffectClient
+    void controlStatusChanged(bool controlGranted);
+    void enableStatusChanged(bool enabled);
+    void commandExecuted(int cmdCode, int cmdSize, void *pCmdData, int replySize, void *pReplyData);
+    void binderDied();
+
+
+    sp<IEffect>             mIEffect;           // IEffect binder interface
+    sp<EffectClient>        mIEffectClient;     // IEffectClient implementation
+    sp<IMemory>             mCblkMemory;        // shared memory for deferred parameter setting
+    effect_param_cblk_t*    mCblk;              // control block for deferred parameter setting
+};
+
+
+}; // namespace android
+
+#endif // ANDROID_AUDIOEFFECT_H
diff --git a/include/media/AudioRecord.h b/include/media/AudioRecord.h
index 92bc126..38e3d44 100644
--- a/include/media/AudioRecord.h
+++ b/include/media/AudioRecord.h
@@ -100,6 +100,19 @@
 
     typedef void (*callback_t)(int event, void* user, void *info);
 
+    /* Returns the minimum frame count required for the successful creation of
+     * an AudioRecord object.
+     * Returned status (from utils/Errors.h) can be:
+     *  - NO_ERROR: successful operation
+     *  - NO_INIT: audio server or audio hardware not initialized
+     *  - BAD_VALUE: unsupported configuration
+     */
+
+     static status_t getMinFrameCount(int* frameCount,
+                                      uint32_t sampleRate,
+                                      int format,
+                                      int channelCount);
+
     /* Constructs an uninitialized AudioRecord. No connection with
      * AudioFlinger takes place.
      */
@@ -142,7 +155,8 @@
                                     uint32_t flags      = 0,
                                     callback_t cbf = 0,
                                     void* user = 0,
-                                    int notificationFrames = 0);
+                                    int notificationFrames = 0,
+                                    int sessionId = 0);
 
 
     /* Terminates the AudioRecord and unregisters it from AudioFlinger.
@@ -168,7 +182,8 @@
                             callback_t cbf = 0,
                             void* user = 0,
                             int notificationFrames = 0,
-                            bool threadCanCallJava = false);
+                            bool threadCanCallJava = false,
+                            int sessionId = 0);
 
 
     /* Result of constructing the AudioRecord. This must be checked
@@ -270,6 +285,16 @@
      */
             audio_io_handle_t    getInput();
 
+    /* returns the audio session ID associated to this AudioRecord.
+     *
+     * Parameters:
+     *  none.
+     *
+     * Returned value:
+     *  AudioRecord session ID.
+     */
+            int    getSessionId();
+
     /* obtains a buffer of "frameCount" frames. The buffer must be
      * filled entirely. If the track is stopped, obtainBuffer() returns
      * STOPPED instead of NO_ERROR as long as there are buffers availlable,
@@ -356,6 +381,7 @@
     uint32_t                mFlags;
     uint32_t                mChannels;
     audio_io_handle_t       mInput;
+    int                     mSessionId;
 };
 
 }; // namespace android
diff --git a/include/media/AudioSystem.h b/include/media/AudioSystem.h
index d0ccc505..194f23a 100644
--- a/include/media/AudioSystem.h
+++ b/include/media/AudioSystem.h
@@ -234,6 +234,8 @@
     static status_t getRenderPosition(uint32_t *halFrames, uint32_t *dspFrames, int stream = DEFAULT);
 
     static unsigned int  getInputFramesLost(audio_io_handle_t ioHandle);
+
+    static int newAudioSessionId();
     //
     // AudioPolicyService interface
     //
diff --git a/include/media/AudioTrack.h b/include/media/AudioTrack.h
index 14b30ae..ef537f4 100644
--- a/include/media/AudioTrack.h
+++ b/include/media/AudioTrack.h
@@ -102,6 +102,17 @@
 
     typedef void (*callback_t)(int event, void* user, void *info);
 
+    /* Returns the minimum frame count required for the successful creation of
+     * an AudioTrack object.
+     * Returned status (from utils/Errors.h) can be:
+     *  - NO_ERROR: successful operation
+     *  - NO_INIT: audio server or audio hardware not initialized
+     */
+
+     static status_t getMinFrameCount(int* frameCount,
+                                      int streamType      =-1,
+                                      uint32_t sampleRate = 0);
+
     /* Constructs an uninitialized AudioTrack. No connection with
      * AudioFlinger takes place.
      */
@@ -138,7 +149,8 @@
                                     uint32_t flags       = 0,
                                     callback_t cbf       = 0,
                                     void* user           = 0,
-                                    int notificationFrames = 0);
+                                    int notificationFrames = 0,
+                                    int sessionId = 0);
 
     /* Creates an audio track and registers it with AudioFlinger. With this constructor,
      * The PCM data to be rendered by AudioTrack is passed in a shared memory buffer
@@ -157,7 +169,8 @@
                                     uint32_t flags      = 0,
                                     callback_t cbf      = 0,
                                     void* user          = 0,
-                                    int notificationFrames = 0);
+                                    int notificationFrames = 0,
+                                    int sessionId = 0);
 
     /* Terminates the AudioTrack and unregisters it from AudioFlinger.
      * Also destroys all resources assotiated with the AudioTrack.
@@ -182,7 +195,8 @@
                             void* user          = 0,
                             int notificationFrames = 0,
                             const sp<IMemory>& sharedBuffer = 0,
-                            bool threadCanCallJava = false);
+                            bool threadCanCallJava = false,
+                            int sessionId = 0);
 
 
     /* Result of constructing the AudioTrack. This must be checked
@@ -239,10 +253,17 @@
 
 
     /* set volume for this track, mostly used for games' sound effects
+     * left and right volumes. Levels must be <= 1.0.
      */
-            void        setVolume(float left, float right);
+            status_t    setVolume(float left, float right);
             void        getVolume(float* left, float* right);
 
+    /* set the send level for this track. An auxiliary effect should be attached
+     * to the track with attachEffect(). Level must be <= 1.0.
+     */
+            status_t    setSendLevel(float level);
+            void        getSendLevel(float* level);
+
     /* set sample rate for this track, mostly used for games' sound effects
      */
             status_t    setSampleRate(int sampleRate);
@@ -340,6 +361,31 @@
      */
             audio_io_handle_t    getOutput();
 
+    /* returns the unique ID associated to this track.
+     *
+     * Parameters:
+     *  none.
+     *
+     * Returned value:
+     *  AudioTrack ID.
+     */
+            int    getSessionId();
+
+
+    /* Attach track auxiliary output to specified effect. Used effectId = 0
+     * to detach track from effect.
+     *
+     * Parameters:
+     *
+     * effectId:  effectId obtained from AudioEffect::id().
+     *
+     * Returned status (from utils/Errors.h) can be:
+     *  - NO_ERROR: successful operation
+     *  - INVALID_OPERATION: the effect is not an auxiliary effect.
+     *  - BAD_VALUE: The specified effect ID is invalid
+     */
+            status_t    attachAuxEffect(int effectId);
+
     /* obtains a buffer of "frameCount" frames. The buffer must be
      * filled entirely. If the track is stopped, obtainBuffer() returns
      * STOPPED instead of NO_ERROR as long as there are buffers availlable,
@@ -398,13 +444,15 @@
                                  int frameCount,
                                  uint32_t flags,
                                  const sp<IMemory>& sharedBuffer,
-                                 audio_io_handle_t output);
+                                 audio_io_handle_t output,
+                                 bool enforceFrameCount);
 
     sp<IAudioTrack>         mAudioTrack;
     sp<IMemory>             mCblkMemory;
     sp<AudioTrackThread>    mAudioTrackThread;
 
     float                   mVolume[2];
+    float                   mSendLevel;
     uint32_t                mFrameCount;
 
     audio_track_cblk_t*     mCblk;
@@ -420,7 +468,8 @@
 
     callback_t              mCbf;
     void*                   mUserData;
-    uint32_t                mNotificationFrames;
+    uint32_t                mNotificationFramesReq; // requested number of frames between each notification callback
+    uint32_t                mNotificationFramesAct; // actual number of frames between each notification callback
     sp<IMemory>             mSharedBuffer;
     int                     mLoopCount;
     uint32_t                mRemainingFrames;
@@ -429,6 +478,7 @@
     uint32_t                mNewPosition;
     uint32_t                mUpdatePeriod;
     uint32_t                mFlags;
+    int                     mSessionId;
 };
 
 
diff --git a/include/media/EffectApi.h b/include/media/EffectApi.h
new file mode 100644
index 0000000..8c120e5
--- /dev/null
+++ b/include/media/EffectApi.h
@@ -0,0 +1,796 @@
+/*
+ * Copyright (C) 2010 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef ANDROID_EFFECTAPI_H_
+#define ANDROID_EFFECTAPI_H_
+
+#include <errno.h>
+#include <stdint.h>
+#include <sys/types.h>
+
+#if __cplusplus
+extern "C" {
+#endif
+
+/////////////////////////////////////////////////
+//      Effect control interface
+/////////////////////////////////////////////////
+
+// The effect control interface is exposed by each effect engine implementation. It consists of
+// a set of functions controlling the configuration, activation and process of the engine.
+// The functions are grouped in a structure of type effect_interface_s:
+//    struct effect_interface_s {
+//        effect_process_t process;
+//        effect_command_t command;
+//    };
+
+
+// effect_interface_t: Effect control interface handle.
+// The effect_interface_t serves two purposes regarding the implementation of the effect engine:
+// - 1 it is the address of a pointer to an effect_interface_s structure where the functions
+// of the effect control API for a particular effect are located.
+// - 2 it is the address of the context of a particular effect instance.
+// A typical implementation in the effect library would define a structure as follows:
+// struct effect_module_s {
+//        const struct effect_interface_s *itfe;
+//        effect_config_t config;
+//        effect_context_t context;
+// }
+// The implementation of EffectCreate() function would then allocate a structure of this
+// type and return its address as effect_interface_t
+typedef struct effect_interface_s **effect_interface_t;
+
+
+// Effect API version 1.0
+#define EFFECT_API_VERSION 0x0100 // Format 0xMMmm MM: Major version, mm: minor version
+
+// Maximum length of character strings in structures defines by this API.
+#define EFFECT_STRING_LEN_MAX 64
+
+//
+//--- Effect descriptor structure effect_descriptor_t
+//
+
+// Unique effect ID (can be generated from the following site:
+//  http://www.itu.int/ITU-T/asn1/uuid.html)
+// This format is used for both "type" and "uuid" fields of the effect descriptor structure.
+// - When used for effect type and the engine is implementing and effect corresponding to a standard
+// OpenSL ES interface, this ID must be the one defined in OpenSLES_IID.h for that interface.
+// - When used as uuid, it should be a unique UUID for this particular implementation.
+typedef struct effect_uuid_s {
+    uint32_t timeLow;
+    uint16_t timeMid;
+    uint16_t timeHiAndVersion;
+    uint16_t clockSeq;
+    uint8_t node[6];
+} effect_uuid_t;
+
+// NULL UUID definition (matches SL_IID_NULL_)
+#define EFFECT_UUID_INITIALIZER { 0xec7178ec, 0xe5e1, 0x4432, 0xa3f4, \
+                                  { 0x46, 0x57, 0xe6, 0x79, 0x52, 0x10 } }
+static const effect_uuid_t EFFECT_UUID_NULL_ = EFFECT_UUID_INITIALIZER;
+const effect_uuid_t * const EFFECT_UUID_NULL = &EFFECT_UUID_NULL_;
+const char * const EFFECT_UUID_NULL_STR = "ec7178ec-e5e1-4432-a3f4-4657e6795210";
+
+// The effect descriptor contains necessary information to facilitate the enumeration of the effect
+// engines present in a library.
+typedef struct effect_descriptor_s {
+    effect_uuid_t type;     // UUID of to the OpenSL ES interface implemented by this effect
+    effect_uuid_t uuid;     // UUID for this particular implementation
+    uint16_t apiVersion;    // Version of the effect API implemented: matches EFFECT_API_VERSION
+    uint32_t flags;         // effect engine capabilities/requirements flags (see below)
+    uint16_t cpuLoad;       // CPU load indication (see below)
+    uint16_t memoryUsage;   // Data Memory usage (see below)
+    char    name[EFFECT_STRING_LEN_MAX];   // human readable effect name
+    char    implementor[EFFECT_STRING_LEN_MAX];    // human readable effect implementor name
+} effect_descriptor_t;
+
+// CPU load and memory usage indication: each effect implementation must provide an indication of
+// its CPU and memory usage for the audio effect framework to limit the number of effects
+// instantiated at a given time on a given platform.
+// The CPU load is expressed in 0.1 MIPS units as estimated on an ARM9E core (ARMv5TE) with 0 WS.
+// The memory usage is expressed in KB and includes only dynamically allocated memory
+
+// Definitions for flags field of effect descriptor.
+//  +---------------------------+-----------+-----------------------------------
+//  | description               | bits      | values
+//  +---------------------------+-----------+-----------------------------------
+//  | connection mode           | 0..1      | 0 insert: after track process
+//  |                           |           | 1 auxiliary: connect to track auxiliary
+//  |                           |           |  output and use send level
+//  |                           |           | 2 replace: replaces track process function;
+//  |                           |           |   must implement SRC, volume and mono to stereo.
+//  |                           |           | 3 reserved
+//  +---------------------------+-----------+-----------------------------------
+//  | insertion preference      | 2..4      | 0 none
+//  |                           |           | 1 first of the chain
+//  |                           |           | 2 last of the chain
+//  |                           |           | 3 exclusive (only effect in the insert chain)
+//  |                           |           | 4..7 reserved
+//  +---------------------------+-----------+-----------------------------------
+//  | Volume management         | 5..6      | 0 none
+//  |                           |           | 1 implements volume control
+//  |                           |           | 2 requires volume indication
+//  |                           |           | 3 reserved
+//  +---------------------------+-----------+-----------------------------------
+//  | Device indication         | 7..8      | 0 none
+//  |                           |           | 1 requires device updates
+//  |                           |           | 2..3 reserved
+//  +---------------------------+-----------+-----------------------------------
+//  | Sample input mode         | 9..10     | 0 direct: process() function or EFFECT_CMD_CONFIGURE
+//  |                           |           |   command must specify a buffer descriptor
+//  |                           |           | 1 provider: process() function uses the
+//  |                           |           |   bufferProvider indicated by the
+//  |                           |           |   EFFECT_CMD_CONFIGURE command to request input.
+//  |                           |           |   buffers.
+//  |                           |           | 2 both: both input modes are supported
+//  |                           |           | 3 reserved
+//  +---------------------------+-----------+-----------------------------------
+//  | Sample output mode        | 11..12    | 0 direct: process() function or EFFECT_CMD_CONFIGURE
+//  |                           |           |   command must specify a buffer descriptor
+//  |                           |           | 1 provider: process() function uses the
+//  |                           |           |   bufferProvider indicated by the
+//  |                           |           |   EFFECT_CMD_CONFIGURE command to request output
+//  |                           |           |   buffers.
+//  |                           |           | 2 both: both output modes are supported
+//  |                           |           | 3 reserved
+//  +---------------------------+-----------+-----------------------------------
+//  | Hardware acceleration     | 13..15    | 0 No hardware acceleration
+//  |                           |           | 1 non tunneled hw acceleration: the process() function
+//  |                           |           |   reads the samples, send them to HW accelerated
+//  |                           |           |   effect processor, reads back the processed samples
+//  |                           |           |   and returns them to the output buffer.
+//  |                           |           | 2 tunneled hw acceleration: the process() function is
+//  |                           |           |   transparent. The effect interface is only used to
+//  |                           |           |   control the effect engine. This mode is relevant for
+//  |                           |           |   global effects actually applied by the audio
+//  |                           |           |   hardware on the output stream.
+//  +---------------------------+-----------+-----------------------------------
+//  | Audio Mode indication     | 16..17    | 0 none
+//  |                           |           | 1 requires audio mode updates
+//  |                           |           | 2..3 reserved
+//  +---------------------------+-----------+-----------------------------------
+
+// Insert mode
+#define EFFECT_FLAG_TYPE_MASK           0x00000003
+#define EFFECT_FLAG_TYPE_INSERT         0x00000000
+#define EFFECT_FLAG_TYPE_AUXILIARY      0x00000001
+#define EFFECT_FLAG_TYPE_REPLACE        0x00000002
+
+// Insert preference
+#define EFFECT_FLAG_INSERT_MASK         0x0000001C
+#define EFFECT_FLAG_INSERT_ANY          0x00000000
+#define EFFECT_FLAG_INSERT_FIRST        0x00000004
+#define EFFECT_FLAG_INSERT_LAST         0x00000008
+#define EFFECT_FLAG_INSERT_EXCLUSIVE    0x0000000C
+
+
+// Volume control
+#define EFFECT_FLAG_VOLUME_MASK         0x00000060
+#define EFFECT_FLAG_VOLUME_CTRL         0x00000020
+#define EFFECT_FLAG_VOLUME_IND          0x00000040
+#define EFFECT_FLAG_VOLUME_NONE         0x00000000
+
+// Device indication
+#define EFFECT_FLAG_DEVICE_MASK         0x00000180
+#define EFFECT_FLAG_DEVICE_IND          0x00000080
+#define EFFECT_FLAG_DEVICE_NONE         0x00000000
+
+// Sample input modes
+#define EFFECT_FLAG_INPUT_MASK          0x00000600
+#define EFFECT_FLAG_INPUT_DIRECT        0x00000000
+#define EFFECT_FLAG_INPUT_PROVIDER      0x00000200
+#define EFFECT_FLAG_INPUT_BOTH          0x00000400
+
+// Sample output modes
+#define EFFECT_FLAG_OUTPUT_MASK          0x00001800
+#define EFFECT_FLAG_OUTPUT_DIRECT        0x00000000
+#define EFFECT_FLAG_OUTPUT_PROVIDER      0x00000800
+#define EFFECT_FLAG_OUTPUT_BOTH          0x00001000
+
+// Hardware acceleration mode
+#define EFFECT_FLAG_HW_ACC_MASK          0x00006000
+#define EFFECT_FLAG_HW_ACC_SIMPLE        0x00002000
+#define EFFECT_FLAG_HW_ACC_TUNNEL        0x00004000
+
+// Audio mode indication
+#define EFFECT_FLAG_AUDIO_MODE_MASK      0x00018000
+#define EFFECT_FLAG_AUDIO_MODE_IND       0x00008000
+#define EFFECT_FLAG_AUDIO_MODE_NONE      0x00000000
+
+// Forward definition of type audio_buffer_t
+typedef struct audio_buffer_s audio_buffer_t;
+
+////////////////////////////////////////////////////////////////////////////////
+//
+//    Function:       process
+//
+//    Description:    Effect process function. Takes input samples as specified
+//          (count and location) in input buffer descriptor and output processed
+//          samples as specified in output buffer descriptor. If the buffer descriptor
+//          is not specified the function must use either the buffer or the
+//          buffer provider function installed by the EFFECT_CMD_CONFIGURE command.
+//          The effect framework will call the process() function after the EFFECT_CMD_ENABLE
+//          command is received and until the EFFECT_CMD_DISABLE is received. When the engine
+//          receives the EFFECT_CMD_DISABLE command it should turn off the effect gracefully
+//          and when done indicate that it is OK to stop calling the process() function by
+//          returning the -ENODATA status.
+//
+//    NOTE: the process() function implementation should be "real-time safe" that is
+//      it should not perform blocking calls: malloc/free, sleep, read/write/open/close,
+//      pthread_cond_wait/pthread_mutex_lock...
+//
+//    Input:
+//          effect_interface_t: handle to the effect interface this function
+//              is called on.
+//          inBuffer:   buffer descriptor indicating where to read samples to process.
+//              If NULL, use the configuration passed by EFFECT_CMD_CONFIGURE command.
+//
+//          inBuffer:   buffer descriptor indicating where to write processed samples.
+//              If NULL, use the configuration passed by EFFECT_CMD_CONFIGURE command.
+//
+//    Output:
+//        returned value:    0 successful operation
+//                          -ENODATA the engine has finished the disable phase and the framework
+//                                  can stop calling process()
+//                          -EINVAL invalid interface handle or
+//                                  invalid input/output buffer description
+////////////////////////////////////////////////////////////////////////////////
+typedef int32_t (*effect_process_t)(effect_interface_t self,
+                                    audio_buffer_t *inBuffer,
+                                    audio_buffer_t *outBuffer);
+
+////////////////////////////////////////////////////////////////////////////////
+//
+//    Function:       command
+//
+//    Description:    Send a command and receive a response to/from effect engine.
+//
+//    Input:
+//          effect_interface_t: handle to the effect interface this function
+//              is called on.
+//          cmdCode:    command code: the command can be a standardized command defined in
+//              effect_command_e (see below) or a proprietary command.
+//          cmdSize:    size of command in bytes
+//          pCmdData:   pointer to command data
+//          pReplyData: pointer to reply data
+//
+//    Input/Output:
+//          replySize: maximum size of reply data as input
+//                      actual size of reply data as output
+//
+//    Output:
+//          returned value: 0       successful operation
+//                          -EINVAL invalid interface handle or
+//                                  invalid command/reply size or format according to command code
+//              The return code should be restricted to indicate problems related to the this
+//              API specification. Status related to the execution of a particular command should be
+//              indicated as part of the reply field.
+//
+//          *pReplyData updated with command response
+//
+////////////////////////////////////////////////////////////////////////////////
+typedef int32_t (*effect_command_t)(effect_interface_t self,
+                                    int32_t cmdCode,
+                                    int32_t cmdSize,
+                                    void *pCmdData,
+                                    int32_t *replySize,
+                                    void *pReplyData);
+
+
+// Effect control interface definition
+struct effect_interface_s {
+    effect_process_t process;
+    effect_command_t command;
+};
+
+
+//
+//--- Standardized command codes for command() function
+//
+enum effect_command_e {
+   EFFECT_CMD_INIT,                 // initialize effect engine
+   EFFECT_CMD_CONFIGURE,            // configure effect engine (see effect_config_t)
+   EFFECT_CMD_RESET,                // reset effect engine
+   EFFECT_CMD_ENABLE,               // enable effect process
+   EFFECT_CMD_DISABLE,              // disable effect process
+   EFFECT_CMD_SET_PARAM,            // set parameter immediately (see effect_param_t)
+   EFFECT_CMD_SET_PARAM_DEFERRED,   // set parameter deferred
+   EFFECT_CMD_SET_PARAM_COMMIT,     // commit previous set parameter deferred
+   EFFECT_CMD_GET_PARAM,            // get parameter
+   EFFECT_CMD_SET_DEVICE,           // set audio device (see audio_device_e)
+   EFFECT_CMD_SET_VOLUME,           // set volume
+   EFFECT_CMD_SET_AUDIO_MODE,       // set the audio mode (normal, ring, ...)
+   EFFECT_CMD_FIRST_PROPRIETARY = 0x10000 // first proprietary command code
+};
+
+//==================================================================================================
+// command: EFFECT_CMD_INIT
+//--------------------------------------------------------------------------------------------------
+// description:
+//  Initialize effect engine: All configurations return to default
+//--------------------------------------------------------------------------------------------------
+// command format:
+//  size: 0
+//  data: N/A
+//--------------------------------------------------------------------------------------------------
+// reply format:
+//  size: sizeof(int)
+//  data: status
+//==================================================================================================
+// command: EFFECT_CMD_CONFIGURE
+//--------------------------------------------------------------------------------------------------
+// description:
+//  Apply new audio parameters configurations for input and output buffers
+//--------------------------------------------------------------------------------------------------
+// command format:
+//  size: sizeof(effect_config_t)
+//  data: effect_config_t
+//--------------------------------------------------------------------------------------------------
+// reply format:
+//  size: sizeof(int)
+//  data: status
+//==================================================================================================
+// command: EFFECT_CMD_RESET
+//--------------------------------------------------------------------------------------------------
+// description:
+//  Reset the effect engine. Keep configuration but resets state and buffer content
+//--------------------------------------------------------------------------------------------------
+// command format:
+//  size: 0
+//  data: N/A
+//--------------------------------------------------------------------------------------------------
+// reply format:
+//  size: 0
+//  data: N/A
+//==================================================================================================
+// command: EFFECT_CMD_ENABLE
+//--------------------------------------------------------------------------------------------------
+// description:
+//  Enable the process. Called by the framework before the first call to process()
+//--------------------------------------------------------------------------------------------------
+// command format:
+//  size: 0
+//  data: N/A
+//--------------------------------------------------------------------------------------------------
+// reply format:
+//  size: sizeof(int)
+//  data: status
+//==================================================================================================
+// command: EFFECT_CMD_DISABLE
+//--------------------------------------------------------------------------------------------------
+// description:
+//  Disable the process. Called by the framework after the last call to process()
+//--------------------------------------------------------------------------------------------------
+// command format:
+//  size: 0
+//  data: N/A
+//--------------------------------------------------------------------------------------------------
+// reply format:
+//  size: sizeof(int)
+//  data: status
+//==================================================================================================
+// command: EFFECT_CMD_SET_PARAM
+//--------------------------------------------------------------------------------------------------
+// description:
+//  Set a parameter and apply it immediately
+//--------------------------------------------------------------------------------------------------
+// command format:
+//  size: sizeof(effect_param_t) + size of param and value
+//  data: effect_param_t + param + value. See effect_param_t definition below for value offset
+//--------------------------------------------------------------------------------------------------
+// reply format:
+//  size: sizeof(int)
+//  data: status
+//==================================================================================================
+// command: EFFECT_CMD_SET_PARAM_DEFERRED
+//--------------------------------------------------------------------------------------------------
+// description:
+//  Set a parameter but apply it only when receiving EFFECT_CMD_SET_PARAM_COMMIT command
+//--------------------------------------------------------------------------------------------------
+// command format:
+//  size: sizeof(effect_param_t) + size of param and value
+//  data: effect_param_t + param + value. See effect_param_t definition below for value offset
+//--------------------------------------------------------------------------------------------------
+// reply format:
+//  size: 0
+//  data: N/A
+//==================================================================================================
+// command: EFFECT_CMD_SET_PARAM_COMMIT
+//--------------------------------------------------------------------------------------------------
+// description:
+//  Apply all previously received EFFECT_CMD_SET_PARAM_DEFERRED commands
+//--------------------------------------------------------------------------------------------------
+// command format:
+//  size: 0
+//  data: N/A
+//--------------------------------------------------------------------------------------------------
+// reply format:
+//  size: sizeof(int)
+//  data: status
+//==================================================================================================
+// command: EFFECT_CMD_GET_PARAM
+//--------------------------------------------------------------------------------------------------
+// description:
+//  Get a parameter value
+//--------------------------------------------------------------------------------------------------
+// command format:
+//  size: sizeof(effect_param_t) + size of param
+//  data: effect_param_t + param
+//--------------------------------------------------------------------------------------------------
+// reply format:
+//  size: sizeof(effect_param_t) + size of param and value
+//  data: effect_param_t + param + value. See effect_param_t definition below for value offset
+//==================================================================================================
+// command: EFFECT_CMD_SET_DEVICE
+//--------------------------------------------------------------------------------------------------
+// description:
+//  Set the rendering device the audio output path is connected to. See audio_device_e for device
+//  values.
+//  The effect implementation must set EFFECT_FLAG_DEVICE_IND flag in its descriptor to receive this
+//  command when the device changes
+//--------------------------------------------------------------------------------------------------
+// command format:
+//  size: sizeof(uint32_t)
+//  data: audio_device_e
+//--------------------------------------------------------------------------------------------------
+// reply format:
+//  size: 0
+//  data: N/A
+//==================================================================================================
+// command: EFFECT_CMD_SET_VOLUME
+//--------------------------------------------------------------------------------------------------
+// description:
+//  Set and get volume. Used by audio framework to delegate volume control to effect engine.
+//  The effect implementation must set EFFECT_FLAG_VOLUME_IND or EFFECT_FLAG_VOLUME_CTRL flag in
+//  its descriptor to receive this command before every call to process() function
+//  If EFFECT_FLAG_VOLUME_CTRL flag is set in the effect descriptor, the effect engine must return
+//  the volume that should be applied before the effect is processed. The overall volume (the volume
+//  actually applied by the effect engine multiplied by the returned value) should match the value
+//  indicated in the command.
+//--------------------------------------------------------------------------------------------------
+// command format:
+//  size: n * sizeof(uint32_t)
+//  data: volume for each channel defined in effect_config_t for output buffer expressed in
+//      8.24 fixed point format
+//--------------------------------------------------------------------------------------------------
+// reply format:
+//  size: n * sizeof(uint32_t) / 0
+//  data: - if EFFECT_FLAG_VOLUME_CTRL is set in effect descriptor:
+//              volume for each channel defined in effect_config_t for output buffer expressed in
+//              8.24 fixed point format
+//        - if EFFECT_FLAG_VOLUME_CTRL is not set in effect descriptor:
+//              N/A
+//  It is legal to receive a null pointer as pReplyData in which case the effect framework has
+//  delegated volume control to another effect
+//==================================================================================================
+// command: EFFECT_CMD_SET_AUDIO_MODE
+//--------------------------------------------------------------------------------------------------
+// description:
+//  Set the audio mode. The effect implementation must set EFFECT_FLAG_AUDIO_MODE_IND flag in its
+//  descriptor to receive this command when the audio mode changes.
+//--------------------------------------------------------------------------------------------------
+// command format:
+//  size: sizeof(uint32_t)
+//  data: audio_mode_e
+//--------------------------------------------------------------------------------------------------
+// reply format:
+//  size: 0
+//  data: N/A
+//==================================================================================================
+// command: EFFECT_CMD_FIRST_PROPRIETARY
+//--------------------------------------------------------------------------------------------------
+// description:
+//  All proprietary effect commands must use command codes above this value. The size and format of
+//  command and response fields is free in this case
+//==================================================================================================
+
+
+// Audio buffer descriptor used by process(), bufferProvider() functions and buffer_config_t
+// structure. Multi-channel audio is always interleaved. The channel order is from LSB to MSB with
+// regard to the channel mask definition in audio_channels_e e.g :
+// Stereo: left, right
+// 5 point 1: front left, front right, front center, low frequency, back left, back right
+// The buffer size is expressed in frame count, a frame being composed of samples for all
+// channels at a given time. Frame size for unspecified format (AUDIO_FORMAT_OTHER) is 8 bit by
+// definition
+struct audio_buffer_s {
+    size_t   frameCount;        // number of frames in buffer
+    union {
+        void*       raw;        // raw pointer to start of buffer
+        int32_t*    s32;        // pointer to signed 32 bit data at start of buffer
+        int16_t*    s16;        // pointer to signed 16 bit data at start of buffer
+        uint8_t*    u8;         // pointer to unsigned 8 bit data at start of buffer
+    };
+};
+
+// The buffer_provider_s structure contains functions that can be used
+// by the effect engine process() function to query and release input
+// or output audio buffer.
+// The getBuffer() function is called to retrieve a buffer where data
+// should read from or written to by process() function.
+// The releaseBuffer() function MUST be called when the buffer retrieved
+// with getBuffer() is not needed anymore.
+// The process function should use the buffer provider mechanism to retrieve
+// input or output buffer if the inBuffer or outBuffer passed as argument is NULL
+// and the buffer configuration (buffer_config_t) given by the EFFECT_CMD_CONFIGURE
+// command did not specify an audio buffer.
+
+typedef int32_t (* buffer_function_t)(void *cookie, audio_buffer_t *buffer);
+
+typedef struct buffer_provider_s {
+    buffer_function_t getBuffer;       // retrieve next buffer
+    buffer_function_t releaseBuffer;   // release used buffer
+    void       *cookie;                // for use by client of buffer provider functions
+} buffer_provider_t;
+
+
+// The buffer_config_s structure specifies the input or output audio format
+// to be used by the effect engine. It is part of the effect_config_t
+// structure that defines both input and output buffer configurations and is
+// passed by the EFFECT_CMD_CONFIGURE command.
+typedef struct buffer_config_s {
+    audio_buffer_t  buffer;     // buffer for use by process() function if not passed explicitly
+    uint32_t   samplingRate;    // sampling rate
+    uint32_t   channels;        // channel mask (see audio_channels_e)
+    buffer_provider_t bufferProvider;   // buffer provider
+    uint8_t    format;          // Audio format  (see audio_format_e)
+    uint8_t    accessMode;      // read/write or accumulate in buffer (effect_buffer_access_e)
+    uint16_t   mask;            // indicates which of the above fields is valid
+} buffer_config_t;
+
+// Sample format
+enum audio_format_e {
+    SAMPLE_FORMAT_PCM_S15,   // PCM signed 16 bits
+    SAMPLE_FORMAT_PCM_U8,    // PCM unsigned 8 bits
+    SAMPLE_FORMAT_PCM_S7_24, // PCM signed 7.24 fixed point representation
+    SAMPLE_FORMAT_OTHER      // other format (e.g. compressed)
+};
+
+// Channel mask
+enum audio_channels_e {
+    CHANNEL_FRONT_LEFT = 0x1,                   // front left channel
+    CHANNEL_FRONT_RIGHT = 0x2,                  // front right channel
+    CHANNEL_FRONT_CENTER = 0x4,                // front center channel
+    CHANNEL_LOW_FREQUENCY = 0x8,               // low frequency channel
+    CHANNEL_BACK_LEFT = 0x10,                   // back left channel
+    CHANNEL_BACK_RIGHT = 0x20,                  // back right channel
+    CHANNEL_FRONT_LEFT_OF_CENTER = 0x40,       // front left of center channel
+    CHANNEL_FRONT_RIGHT_OF_CENTER = 0x80,      // front right of center channel
+    CHANNEL_BACK_CENTER = 0x100,                // back center channel
+    CHANNEL_MONO = CHANNEL_FRONT_LEFT,
+    CHANNEL_STEREO = (CHANNEL_FRONT_LEFT | CHANNEL_FRONT_RIGHT),
+    CHANNEL_QUAD = (CHANNEL_FRONT_LEFT | CHANNEL_FRONT_RIGHT |
+            CHANNEL_BACK_LEFT | CHANNEL_BACK_RIGHT),
+    CHANNEL_SURROUND = (CHANNEL_FRONT_LEFT | CHANNEL_FRONT_RIGHT |
+            CHANNEL_FRONT_CENTER | CHANNEL_BACK_CENTER),
+    CHANNEL_5POINT1 = (CHANNEL_FRONT_LEFT | CHANNEL_FRONT_RIGHT |
+            CHANNEL_FRONT_CENTER | CHANNEL_LOW_FREQUENCY | CHANNEL_BACK_LEFT | CHANNEL_BACK_RIGHT),
+    CHANNEL_7POINT1 = (CHANNEL_FRONT_LEFT | CHANNEL_FRONT_RIGHT |
+            CHANNEL_FRONT_CENTER | CHANNEL_LOW_FREQUENCY | CHANNEL_BACK_LEFT | CHANNEL_BACK_RIGHT |
+            CHANNEL_FRONT_LEFT_OF_CENTER | CHANNEL_FRONT_RIGHT_OF_CENTER),
+};
+
+// Render device
+enum audio_device_e {
+    DEVICE_EARPIECE = 0x1,                      // earpiece
+    DEVICE_SPEAKER = 0x2,                       // speaker
+    DEVICE_WIRED_HEADSET = 0x4,                 // wired headset, with microphone
+    DEVICE_WIRED_HEADPHONE = 0x8,               // wired headphone, without microphone
+    DEVICE_BLUETOOTH_SCO = 0x10,                // generic bluetooth SCO
+    DEVICE_BLUETOOTH_SCO_HEADSET = 0x20,        // bluetooth SCO headset
+    DEVICE_BLUETOOTH_SCO_CARKIT = 0x40,         // bluetooth SCO car kit
+    DEVICE_BLUETOOTH_A2DP = 0x80,               // generic bluetooth A2DP
+    DEVICE_BLUETOOTH_A2DP_HEADPHONES = 0x100,   // bluetooth A2DP headphones
+    DEVICE_BLUETOOTH_A2DP_SPEAKER = 0x200,      // bluetooth A2DP speakers
+    DEVICE_AUX_DIGITAL = 0x400,                 // digital output
+    DEVICE_EXTERNAL_SPEAKER = 0x800             // external speaker (stereo and High quality)
+};
+
+// Audio mode
+enum audio_mode_e {
+    AUDIO_MODE_NORMAL,      // phone idle
+    AUDIO_MODE_RINGTONE,    // phone ringing
+    AUDIO_MODE_IN_CALL      // phone call connected
+};
+
+// Values for "accessMode" field of buffer_config_t:
+//   overwrite, read only, accumulate (read/modify/write)
+enum effect_buffer_access_e {
+    EFFECT_BUFFER_ACCESS_WRITE,
+    EFFECT_BUFFER_ACCESS_READ,
+    EFFECT_BUFFER_ACCESS_ACCUMULATE
+
+};
+
+// Values for bit field "mask" in buffer_config_t. If a bit is set, the corresponding field
+// in buffer_config_t must be taken into account when executing the EFFECT_CMD_CONFIGURE command
+#define EFFECT_CONFIG_BUFFER    0x0001  // buffer field must be taken into account
+#define EFFECT_CONFIG_SMP_RATE  0x0002  // samplingRate field must be taken into account
+#define EFFECT_CONFIG_CHANNELS  0x0004  // channels field must be taken into account
+#define EFFECT_CONFIG_FORMAT    0x0008  // format field must be taken into account
+#define EFFECT_CONFIG_ACC_MODE  0x0010  // accessMode field must be taken into account
+#define EFFECT_CONFIG_PROVIDER  0x0020  // bufferProvider field must be taken into account
+#define EFFECT_CONFIG_ALL (EFFECT_CONFIG_BUFFER | EFFECT_CONFIG_SMP_RATE | \
+                           EFFECT_CONFIG_CHANNELS | EFFECT_CONFIG_FORMAT | \
+                           EFFECT_CONFIG_ACC_MODE | EFFECT_CONFIG_PROVIDER)
+
+
+// effect_config_s structure describes the format of the pCmdData argument of EFFECT_CMD_CONFIGURE
+// command to configure audio parameters and buffers for effect engine input and output.
+typedef struct effect_config_s {
+    buffer_config_t   inputCfg;
+    buffer_config_t   outputCfg;;
+} effect_config_t;
+
+
+// effect_param_s structure describes the format of the pCmdData argument of EFFECT_CMD_SET_PARAM
+// command and pCmdData and pReplyData of EFFECT_CMD_GET_PARAM command.
+// psize and vsize represent the actual size of parameter and value.
+//
+// NOTE: the start of value field inside the data field is always on a 32 bit boundary:
+//
+//  +-----------+
+//  | status    | sizeof(int)
+//  +-----------+
+//  | psize     | sizeof(int)
+//  +-----------+
+//  | vsize     | sizeof(int)
+//  +-----------+
+//  |           |   |           |
+//  ~ parameter ~   > psize     |
+//  |           |   |           >  ((psize - 1)/sizeof(int) + 1) * sizeof(int)
+//  +-----------+               |
+//  | padding   |               |
+//  +-----------+
+//  |           |   |
+//  ~ value     ~   > vsize
+//  |           |   |
+//  +-----------+
+
+typedef struct effect_param_s {
+    int32_t     status;     // Transaction status (unused for command, used for reply)
+    uint32_t    psize;      // Parameter size
+    uint32_t    vsize;      // Value size
+    char        data[];     // Start of Parameter + Value data
+} effect_param_t;
+
+
+/////////////////////////////////////////////////
+//      Effect library interface
+/////////////////////////////////////////////////
+
+// An effect library is required to implement and expose the following functions
+// to enable effect enumeration and instantiation. The name of these functions must be as
+// specified here as the effect framework will get the function address with dlsym():
+//
+// - effect_QueryNumberEffects_t EffectQueryNumberEffects;
+// - effect_QueryEffect_t EffectQueryEffect;
+// - effect_CreateEffect_t EffectCreate;
+// - effect_ReleaseEffect_t EffectRelease;
+
+
+////////////////////////////////////////////////////////////////////////////////
+//
+//    Function:       EffectQueryNumberEffects
+//
+//    Description:    Returns the number of different effects exposed by the
+//          library. Each effect must have a unique effect uuid (see
+//          effect_descriptor_t). This function together with EffectQueryEffect()
+//          is used to enumerate all effects present in the library.
+//
+//    Input/Output:
+//          pNumEffects:    address where the number of effects should be returned.
+//
+//    Output:
+//        returned value:    0          successful operation.
+//                          -ENODEV     library failed to initialize
+//                          -EINVAL     invalid pNumEffects
+//        *pNumEffects:     updated with number of effects in library
+//
+////////////////////////////////////////////////////////////////////////////////
+typedef int32_t (*effect_QueryNumberEffects_t)(uint32_t *pNumEffects);
+
+////////////////////////////////////////////////////////////////////////////////
+//
+//    Function:       EffectQueryEffect
+//
+//    Description:    Returns the descriptor of the effect engine which index is
+//          given as first argument.
+//          See effect_descriptor_t for details on effect descriptors.
+//          This function together with EffectQueryNumberEffects() is used to enumerate all
+//          effects present in the library. The enumeration sequence is:
+//              EffectQueryNumberEffects(&num_effects);
+//              for (i = 0; i < num_effects; i++)
+//                  EffectQueryEffect(i,...);
+//
+//    Input/Output:
+//          index:          index of the effect
+//          pDescriptor:    address where to return the effect descriptor.
+//
+//    Output:
+//        returned value:    0          successful operation.
+//                          -ENODEV     library failed to initialize
+//                          -EINVAL     invalid pDescriptor or index
+//                          -ENOSYS     effect list has changed since last execution of
+//                                      EffectQueryNumberEffects()
+//                          -ENOENT     no more effect available
+//        *pDescriptor:     updated with the effect descriptor.
+//
+////////////////////////////////////////////////////////////////////////////////
+typedef int32_t (*effect_QueryEffect_t)(uint32_t index,
+                                        effect_descriptor_t *pDescriptor);
+
+////////////////////////////////////////////////////////////////////////////////
+//
+//    Function:       EffectCreate
+//
+//    Description:    Creates an effect engine of the specified type and returns an
+//          effect control interface on this engine. The function will allocate the
+//          resources for an instance of the requested effect engine and return
+//          a handle on the effect control interface.
+//
+//    Input:
+//          uuid:    pointer to the effect uuid.
+//          sessionId:  audio session to which this effect instance will be attached. All effects
+//              created with the same session ID are connected in series and process the same signal
+//              stream. Knowing that two effects are part of the same effect chain can help the
+//              library implement some kind of optimizations.
+//          ioId:   identifies the output or input stream this effect is directed to at audio HAL.
+//              For future use especially with tunneled HW accelerated effects
+//
+//    Input/Output:
+//          pInterface:    address where to return the effect interface.
+//
+//    Output:
+//        returned value:    0          successful operation.
+//                          -ENODEV     library failed to initialize
+//                          -EINVAL     invalid pEffectUuid or pInterface
+//                          -ENOENT     no effect with this uuid found
+//        *pInterface:     updated with the effect interface handle.
+//
+////////////////////////////////////////////////////////////////////////////////
+typedef int32_t (*effect_CreateEffect_t)(effect_uuid_t *uuid,
+                                         int32_t sessionId,
+                                         int32_t ioId,
+                                         effect_interface_t *pInterface);
+
+////////////////////////////////////////////////////////////////////////////////
+//
+//    Function:       EffectRelease
+//
+//    Description:    Releases the effect engine whose handle is given as argument.
+//          All resources allocated to this particular instance of the effect are
+//          released.
+//
+//    Input:
+//          interface:    handle on the effect interface to be released.
+//
+//    Output:
+//        returned value:    0          successful operation.
+//                          -ENODEV     library failed to initialize
+//                          -EINVAL     invalid interface handle
+//
+////////////////////////////////////////////////////////////////////////////////
+typedef int32_t (*effect_ReleaseEffect_t)(effect_interface_t interface);
+
+
+#if __cplusplus
+}  // extern "C"
+#endif
+
+
+#endif /*ANDROID_EFFECTAPI_H_*/
diff --git a/include/media/EffectBassBoostApi.h b/include/media/EffectBassBoostApi.h
new file mode 100644
index 0000000..b24a5f4
--- /dev/null
+++ b/include/media/EffectBassBoostApi.h
@@ -0,0 +1,42 @@
+/*
+ * Copyright (C) 2010 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef ANDROID_EFFECTBASSBOOSTAPI_H_
+#define ANDROID_EFFECTBASSBOOSTAPI_H_
+
+#include <media/EffectApi.h>
+
+#if __cplusplus
+extern "C" {
+#endif
+
+// TODO: include OpenSLES_IID.h instead
+static const effect_uuid_t SL_IID_BASSBOOST_ = { 0x0634f220, 0xddd4, 0x11db, 0xa0fc, { 0x00, 0x02, 0xa5, 0xd5, 0xc5, 0x1b } };
+const effect_uuid_t * const SL_IID_BASSBOOST = &SL_IID_BASSBOOST_;
+
+/* enumerated parameter settings for BassBoost effect */
+typedef enum
+{
+    BASSBOOST_PARAM_STRENGTH_SUPPORTED,
+    BASSBOOST_PARAM_STRENGTH
+} t_bassboost_params;
+
+#if __cplusplus
+}  // extern "C"
+#endif
+
+
+#endif /*ANDROID_EFFECTBASSBOOSTAPI_H_*/
diff --git a/include/media/EffectEnvironmentalReverbApi.h b/include/media/EffectEnvironmentalReverbApi.h
new file mode 100644
index 0000000..d490f71
--- /dev/null
+++ b/include/media/EffectEnvironmentalReverbApi.h
@@ -0,0 +1,69 @@
+/*
+ * Copyright (C) 2010 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef ANDROID_EFFECTENVIRONMENTALREVERBAPI_H_
+#define ANDROID_EFFECTENVIRONMENTALREVERBAPI_H_
+
+#include <media/EffectApi.h>
+
+#if __cplusplus
+extern "C" {
+#endif
+
+// TODO: include OpenSLES_IID.h instead
+static const effect_uuid_t SL_IID_ENVIRONMENTALREVERB_ = { 0xc2e5d5f0, 0x94bd, 0x4763, 0x9cac, { 0x4e, 0x23, 0x4d, 0x6, 0x83, 0x9e } };
+const effect_uuid_t * const SL_IID_ENVIRONMENTALREVERB = &SL_IID_ENVIRONMENTALREVERB_;
+
+/* enumerated parameter settings for environmental reverb effect */
+typedef enum
+{
+    // Parameters below are as defined in OpenSL ES specification for environmental reverb interface
+    REVERB_PARAM_ROOM_LEVEL,            // in millibels,    range -6000 to 0
+    REVERB_PARAM_ROOM_HF_LEVEL,         // in millibels,    range -4000 to 0
+    REVERB_PARAM_DECAY_TIME,            // in milliseconds, range 100 to 20000
+    REVERB_PARAM_DECAY_HF_RATIO,        // in permilles,    range 100 to 1000
+    REVERB_PARAM_REFLECTIONS_LEVEL,     // in millibels,    range -6000 to 0
+    REVERB_PARAM_REFLECTIONS_DELAY,     // in milliseconds, range 0 to 65
+    REVERB_PARAM_REVERB_LEVEL,          // in millibels,    range -6000 to 0
+    REVERB_PARAM_REVERB_DELAY,          // in milliseconds, range 0 to 65
+    REVERB_PARAM_DIFFUSION,             // in permilles,    range 0 to 1000
+    REVERB_PARAM_DENSITY,               // in permilles,    range 0 to 1000
+    REVERB_PARAM_PROPERTIES,
+    REVERB_PARAM_BYPASS
+} t_env_reverb_params;
+
+//t_reverb_properties is equal to SLEnvironmentalReverbSettings defined in OpenSL ES specification.
+typedef struct s_reverb_properties {
+    int16_t roomLevel;
+    int16_t roomHFLevel;
+    int32_t decayTime;
+    int16_t decayHFRatio;
+    int16_t reflectionsLevel;
+    int32_t reflectionsDelay;
+    int32_t reverbDelay;
+    int16_t reverbLevel;
+    int16_t diffusion;
+    int16_t density;
+    int16_t padding;
+} t_reverb_properties;
+
+
+#if __cplusplus
+}  // extern "C"
+#endif
+
+
+#endif /*ANDROID_EFFECTENVIRONMENTALREVERBAPI_H_*/
diff --git a/include/media/EffectEqualizerApi.h b/include/media/EffectEqualizerApi.h
new file mode 100644
index 0000000..cb05b32
--- /dev/null
+++ b/include/media/EffectEqualizerApi.h
@@ -0,0 +1,49 @@
+/*
+ * Copyright (C) 2010 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef ANDROID_EFFECTEQUALIZERAPI_H_
+#define ANDROID_EFFECTEQUALIZERAPI_H_
+
+#include <media/EffectApi.h>
+
+// for the definition of SL_IID_EQUALIZER
+#include "OpenSLES.h"
+
+#if __cplusplus
+extern "C" {
+#endif
+
+/* enumerated parameters for Equalizer effect */
+typedef enum
+{
+    EQ_PARAM_NUM_BANDS,             // Gets the number of frequency bands that the equalizer supports.
+    EQ_PARAM_LEVEL_RANGE,           // Returns the minimum and maximum band levels supported.
+    EQ_PARAM_BAND_LEVEL,            // Gets/Sets the gain set for the given equalizer band.
+    EQ_PARAM_CENTER_FREQ,           // Gets the center frequency of the given band.
+    EQ_PARAM_BAND_FREQ_RANGE,       // Gets the frequency range of the given frequency band.
+    EQ_PARAM_GET_BAND,              // Gets the band that has the most effect on the given frequency.
+    EQ_PARAM_CUR_PRESET,            // Gets/Sets the current preset.
+    EQ_PARAM_GET_NUM_OF_PRESETS,    // Gets the total number of presets the equalizer supports.
+    EQ_PARAM_GET_PRESET_NAME        // Gets the preset name based on the index.
+} t_equalizer_params;
+
+
+#if __cplusplus
+}  // extern "C"
+#endif
+
+
+#endif /*ANDROID_EFFECTEQUALIZERAPI_H_*/
diff --git a/include/media/EffectPresetReverbApi.h b/include/media/EffectPresetReverbApi.h
new file mode 100644
index 0000000..34ffffe
--- /dev/null
+++ b/include/media/EffectPresetReverbApi.h
@@ -0,0 +1,54 @@
+/*
+ * Copyright (C) 2010 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef ANDROID_EFFECTPRESETREVERBAPI_H_
+#define ANDROID_EFFECTPRESETREVERBAPI_H_
+
+#include <media/EffectApi.h>
+
+#if __cplusplus
+extern "C" {
+#endif
+
+// TODO: include OpenSLES_IID.h instead
+
+static const effect_uuid_t SL_IID_PRESETREVERB_ = { 0x47382d60, 0xddd8, 0x11db, 0xbf3a, { 0x00, 0x02, 0xa5, 0xd5, 0xc5, 0x1b } };
+const effect_uuid_t * const SL_IID_PRESETREVERB = &SL_IID_PRESETREVERB_;
+
+/* enumerated parameter settings for preset reverb effect */
+typedef enum
+{
+    REVERB_PARAM_PRESET
+} t_preset_reverb_params;
+
+
+typedef enum
+{
+    REVERB_PRESET_NONE,
+    REVERB_PRESET_SMALLROOM,
+    REVERB_PRESET_MEDIUMROOM,
+    REVERB_PRESET_LARGEROOM,
+    REVERB_PRESET_MEDIUMHALL,
+    REVERB_PRESET_LARGEHALL,
+    REVERB_PRESET_PLATE
+} t_reverb_presets;
+
+#if __cplusplus
+}  // extern "C"
+#endif
+
+
+#endif /*ANDROID_EFFECTPRESETREVERBAPI_H_*/
diff --git a/include/media/EffectVirtualizerApi.h b/include/media/EffectVirtualizerApi.h
new file mode 100644
index 0000000..601c384
--- /dev/null
+++ b/include/media/EffectVirtualizerApi.h
@@ -0,0 +1,42 @@
+/*
+ * Copyright (C) 2010 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef ANDROID_EFFECTVIRTUALIZERAPI_H_
+#define ANDROID_EFFECTVIRTUALIZERAPI_H_
+
+#include <media/EffectApi.h>
+
+#if __cplusplus
+extern "C" {
+#endif
+
+// TODO: include OpenSLES_IID.h instead
+static const effect_uuid_t SL_IID_VIRTUALIZER_ = { 0x37cc2c00, 0xdddd, 0x11db, 0x8577, { 0x00, 0x02, 0xa5, 0xd5, 0xc5, 0x1b } };
+const effect_uuid_t * const SL_IID_VIRTUALIZER = &SL_IID_VIRTUALIZER_;
+
+/* enumerated parameter settings for virtualizer effect */
+typedef enum
+{
+    VIRTUALIZER_PARAM_STRENGTH_SUPPORTED,
+    VIRTUALIZER_PARAM_STRENGTH
+} t_virtualizer_params;
+
+#if __cplusplus
+}  // extern "C"
+#endif
+
+
+#endif /*ANDROID_EFFECTVIRTUALIZERAPI_H_*/
diff --git a/include/media/EffectVisualizerApi.h b/include/media/EffectVisualizerApi.h
new file mode 100644
index 0000000..1155db8
--- /dev/null
+++ b/include/media/EffectVisualizerApi.h
@@ -0,0 +1,55 @@
+/*
+ * Copyright (C) 2010 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef ANDROID_EFFECTVISUALIZERAPI_H_
+#define ANDROID_EFFECTVISUALIZERAPI_H_
+
+#include <media/EffectApi.h>
+
+#if __cplusplus
+extern "C" {
+#endif
+
+//TODO replace by openSL ES include when available
+static const effect_uuid_t SL_IID_VISUALIZATION_ =
+    { 0xe46b26a0, 0xdddd, 0x11db, 0x8afd, { 0x00, 0x02, 0xa5, 0xd5, 0xc5, 0x1b } };
+const effect_uuid_t * const SL_IID_VISUALIZATION = &SL_IID_VISUALIZATION_;
+
+#define VISUALIZER_CAPTURE_SIZE_MAX 1024  // maximum capture size in samples
+#define VISUALIZER_CAPTURE_SIZE_MIN 128   // minimum capture size in samples
+
+/* enumerated parameters for Visualizer effect */
+typedef enum
+{
+    VISU_PARAM_CAPTURE_SIZE,        // Sets the number PCM samples in the capture.
+} t_visualizer_params;
+
+/* commands */
+typedef enum
+{
+    VISU_CMD_CAPTURE = EFFECT_CMD_FIRST_PROPRIETARY, // Gets the latest PCM capture.
+}t_visualizer_cmds;
+
+// VISU_CMD_CAPTURE retrieves the latest PCM snapshot captured by the visualizer engine.
+// It returns the number of samples specified by VISU_PARAM_CAPTURE_SIZE
+// in 8 bit unsigned format (0 = 0x80)
+
+#if __cplusplus
+}  // extern "C"
+#endif
+
+
+#endif /*ANDROID_EFFECTVISUALIZERAPI_H_*/
diff --git a/include/media/EffectsFactoryApi.h b/include/media/EffectsFactoryApi.h
new file mode 100644
index 0000000..0ed1a14
--- /dev/null
+++ b/include/media/EffectsFactoryApi.h
@@ -0,0 +1,221 @@
+/*
+ * Copyright (C) 2010 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef ANDROID_EFFECTSFACTORYAPI_H_
+#define ANDROID_EFFECTSFACTORYAPI_H_
+
+#include <errno.h>
+#include <stdint.h>
+#include <sys/types.h>
+#include <media/EffectApi.h>
+
+#if __cplusplus
+extern "C" {
+#endif
+
+/////////////////////////////////////////////////
+//      Effect factory interface
+/////////////////////////////////////////////////
+
+////////////////////////////////////////////////////////////////////////////////
+//
+//    Function:       EffectQueryNumberEffects
+//
+//    Description:    Returns the number of different effects in all loaded libraries.
+//          Each effect must have a different effect uuid (see
+//          effect_descriptor_t). This function together with EffectQueryEffect()
+//          is used to enumerate all effects present in all loaded libraries.
+//          Each time EffectQueryNumberEffects() is called, the factory must
+//          reset the index of the effect descriptor returned by next call to
+//          EffectQueryEffect() to restart enumeration from the beginning.
+//
+//    Input/Output:
+//          pNumEffects:    address where the number of effects should be returned.
+//
+//    Output:
+//        returned value:    0          successful operation.
+//                          -ENODEV     factory failed to initialize
+//                          -EINVAL     invalid pNumEffects
+//        *pNumEffects:     updated with number of effects in factory
+//
+////////////////////////////////////////////////////////////////////////////////
+int EffectQueryNumberEffects(uint32_t *pNumEffects);
+
+////////////////////////////////////////////////////////////////////////////////
+//
+//    Function:       EffectQueryEffect
+//
+//    Description:    Returns a descriptor of the next available effect.
+//          See effect_descriptor_t for a details on effect descriptor.
+//          This function together with EffectQueryNumberEffects() is used to enumerate all
+//          effects present in all loaded libraries. The enumeration sequence is:
+//              EffectQueryNumberEffects(&num_effects);
+//              for (i = 0; i < num_effects; i++)
+//                  EffectQueryEffect(i,...);
+//
+//    Input/Output:
+//          pDescriptor:    address where to return the effect descriptor.
+//
+//    Output:
+//        returned value:    0          successful operation.
+//                          -ENOENT     no more effect available
+//                          -ENODEV     factory failed to initialize
+//                          -EINVAL     invalid pDescriptor
+//                          -ENOSYS     effect list has changed since last execution of EffectQueryNumberEffects()
+//        *pDescriptor:     updated with the effect descriptor.
+//
+////////////////////////////////////////////////////////////////////////////////
+int EffectQueryEffect(uint32_t index, effect_descriptor_t *pDescriptor);
+
+////////////////////////////////////////////////////////////////////////////////
+//
+//    Function:       EffectCreate
+//
+//    Description:    Creates an effect engine of the specified type and returns an
+//          effect control interface on this engine. The function will allocate the
+//          resources for an instance of the requested effect engine and return
+//          a handler on the effect control interface.
+//
+//    Input:
+//          pEffectUuid:    pointer to the effect uuid.
+//          sessionId:  audio session to which this effect instance will be attached. All effects created
+//              with the same session ID are connected in series and process the same signal stream.
+//              Knowing that two effects are part of the same effect chain can help the library implement
+//              some kind of optimizations.
+//          ioId:   identifies the output or input stream this effect is directed to at audio HAL. For future
+//              use especially with tunneled HW accelerated effects
+//
+//    Input/Output:
+//          pInterface:    address where to return the effect interface.
+//
+//    Output:
+//        returned value:    0          successful operation.
+//                          -ENODEV     factory failed to initialize
+//                          -EINVAL     invalid pEffectUuid or pInterface
+//                          -ENOENT     no effect with this uuid found
+//        *pInterface:     updated with the effect interface.
+//
+////////////////////////////////////////////////////////////////////////////////
+int EffectCreate(effect_uuid_t *pEffectUuid, int32_t sessionId, int32_t ioId, effect_interface_t *pInterface);
+
+////////////////////////////////////////////////////////////////////////////////
+//
+//    Function:       EffectRelease
+//
+//    Description:    Releases the effect engine whose handler is given as argument.
+//          All resources allocated to this particular instance of the effect are
+//          released.
+//
+//    Input:
+//          interface:    handler on the effect interface to be released.
+//
+//    Output:
+//        returned value:    0          successful operation.
+//                          -ENODEV     factory failed to initialize
+//                          -EINVAL     invalid interface handler
+//
+////////////////////////////////////////////////////////////////////////////////
+int EffectRelease(effect_interface_t interface);
+
+////////////////////////////////////////////////////////////////////////////////
+//
+//    Function:       EffectLoadLibrary
+//
+//    Description:    Loads the effect library which path is given as first argument.
+//          This must be the full path of a dynamic library (.so) implementing one or
+//          more effect engines and exposing the effect library interface described in
+//          EffectApi.h. The function returns a handle on the library for used by
+//          further call to EffectUnloadLibrary() to unload the library.
+//
+//    Input:
+//          libPath:    full path of the dynamic library file in the file system.
+//
+//          handle:     address where to return the library handle
+//
+//    Output:
+//        returned value:    0          successful operation.
+//                          -ENODEV     effect factory not initialized or
+//                                      library could not be loaded or
+//                                      library does not implement required functions
+//                          -EINVAL     invalid libPath string or handle
+//
+////////////////////////////////////////////////////////////////////////////////
+int EffectLoadLibrary(const char *libPath, int *handle);
+
+////////////////////////////////////////////////////////////////////////////////
+//
+//    Function:       EffectUnloadLibrary
+//
+//    Description:  Unloads the effect library which handle is given as argument.
+//
+//    Input:
+//          handle: library handle
+//
+//    Output:
+//        returned value:    0          successful operation.
+//                          -ENODEV     effect factory not initialized
+//                          -ENOENT     invalid handle
+//
+////////////////////////////////////////////////////////////////////////////////
+int EffectUnloadLibrary(int handle);
+
+
+
+////////////////////////////////////////////////////////////////////////////////
+//
+//    Function:       EffectGetDescriptor
+//
+//    Description:    Returns the descriptor of the effect which uuid is pointed
+//          to by first argument.
+//
+//    Input:
+//          pEffectUuid:    pointer to the effect uuid.
+//
+//    Input/Output:
+//          pDescriptor:    address where to return the effect descriptor.
+//
+//    Output:
+//        returned value:    0          successful operation.
+//                          -ENODEV     factory failed to initialize
+//                          -EINVAL     invalid pEffectUuid or pDescriptor
+//                          -ENOENT     no effect with this uuid found
+//        *pDescriptor:     updated with the effect descriptor.
+//
+////////////////////////////////////////////////////////////////////////////////
+int EffectGetDescriptor(effect_uuid_t *pEffectUuid, effect_descriptor_t *pDescriptor);
+
+////////////////////////////////////////////////////////////////////////////////
+//
+//    Function:       EffectIsNullUuid
+//
+//    Description:    Helper function to compare effect uuid to EFFECT_UUID_NULL
+//
+//    Input:
+//          pEffectUuid: pointer to effect uuid to compare to EFFECT_UUID_NULL.
+//
+//    Output:
+//        returned value:    0 if uuid is different from EFFECT_UUID_NULL.
+//                           1 if uuid is equal to EFFECT_UUID_NULL.
+//
+////////////////////////////////////////////////////////////////////////////////
+int EffectIsNullUuid(effect_uuid_t *pEffectUuid);
+
+#if __cplusplus
+}  // extern "C"
+#endif
+
+
+#endif /*ANDROID_EFFECTSFACTORYAPI_H_*/
diff --git a/include/media/IAudioFlinger.h b/include/media/IAudioFlinger.h
index c147632..5814fd6 100644
--- a/include/media/IAudioFlinger.h
+++ b/include/media/IAudioFlinger.h
@@ -27,6 +27,9 @@
 #include <media/IAudioTrack.h>
 #include <media/IAudioRecord.h>
 #include <media/IAudioFlingerClient.h>
+#include <media/EffectApi.h>
+#include <media/IEffect.h>
+#include <media/IEffectClient.h>
 #include <utils/String8.h>
 
 namespace android {
@@ -51,6 +54,7 @@
                                 uint32_t flags,
                                 const sp<IMemory>& sharedBuffer,
                                 int output,
+                                int *sessionId,
                                 status_t *status) = 0;
 
     virtual sp<IAudioRecord> openRecord(
@@ -61,6 +65,7 @@
                                 int channelCount,
                                 int frameCount,
                                 uint32_t flags,
+                                int *sessionId,
                                 status_t *status) = 0;
 
     /* query the audio hardware state. This state never changes,
@@ -134,6 +139,28 @@
     virtual status_t getRenderPosition(uint32_t *halFrames, uint32_t *dspFrames, int output) = 0;
 
     virtual unsigned int  getInputFramesLost(int ioHandle) = 0;
+
+    virtual int newAudioSessionId() = 0;
+
+    virtual status_t loadEffectLibrary(const char *libPath, int *handle) = 0;
+
+    virtual status_t unloadEffectLibrary(int handle) = 0;
+
+    virtual status_t queryNumberEffects(uint32_t *numEffects) = 0;
+
+    virtual status_t queryEffect(uint32_t index, effect_descriptor_t *pDescriptor) = 0;
+
+    virtual status_t getEffectDescriptor(effect_uuid_t *pEffectUUID, effect_descriptor_t *pDescriptor) = 0;
+
+    virtual sp<IEffect> createEffect(pid_t pid,
+                                    effect_descriptor_t *pDesc,
+                                    const sp<IEffectClient>& client,
+                                    int32_t priority,
+                                    int output,
+                                    int sessionId,
+                                    status_t *status,
+                                    int *id,
+                                    int *enabled) = 0;
 };
 
 
diff --git a/include/media/IAudioTrack.h b/include/media/IAudioTrack.h
index de6426a..47d530b 100644
--- a/include/media/IAudioTrack.h
+++ b/include/media/IAudioTrack.h
@@ -62,6 +62,11 @@
      */
     virtual void        pause() = 0;
 
+    /* Attach track auxiliary output to specified effect. Use effectId = 0
+     * to detach track from effect.
+     */
+    virtual status_t    attachAuxEffect(int effectId) = 0;
+
     /* get this tracks control block */
     virtual sp<IMemory> getCblk() const = 0;    
 };
diff --git a/include/media/IEffect.h b/include/media/IEffect.h
new file mode 100644
index 0000000..6dad393
--- /dev/null
+++ b/include/media/IEffect.h
@@ -0,0 +1,56 @@
+/*
+ * Copyright (C) 2010 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef ANDROID_IEFFECT_H
+#define ANDROID_IEFFECT_H
+
+#include <utils/RefBase.h>
+#include <binder/IInterface.h>
+#include <binder/Parcel.h>
+#include <binder/IMemory.h>
+
+namespace android {
+
+class IEffect: public IInterface
+{
+public:
+    DECLARE_META_INTERFACE(Effect);
+
+    virtual status_t enable() = 0;
+
+    virtual status_t disable() = 0;
+
+    virtual status_t command(int cmdCode, int cmdSize, void *pCmdData, int *pReplySize, void *pReplyData) = 0;
+
+    virtual void disconnect() = 0;
+
+    virtual sp<IMemory> getCblk() const = 0;
+};
+
+// ----------------------------------------------------------------------------
+
+class BnEffect: public BnInterface<IEffect>
+{
+public:
+    virtual status_t    onTransact( uint32_t code,
+                                    const Parcel& data,
+                                    Parcel* reply,
+                                    uint32_t flags = 0);
+};
+
+}; // namespace android
+
+#endif // ANDROID_IEFFECT_H
diff --git a/include/media/IEffectClient.h b/include/media/IEffectClient.h
new file mode 100644
index 0000000..d22daf8
--- /dev/null
+++ b/include/media/IEffectClient.h
@@ -0,0 +1,50 @@
+/*
+ * Copyright (C) 2010 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef ANDROID_IEFFECTCLIENT_H
+#define ANDROID_IEFFECTCLIENT_H
+
+#include <utils/RefBase.h>
+#include <binder/IInterface.h>
+#include <binder/Parcel.h>
+#include <binder/IMemory.h>
+
+namespace android {
+
+class IEffectClient: public IInterface
+{
+public:
+    DECLARE_META_INTERFACE(EffectClient);
+
+    virtual void controlStatusChanged(bool controlGranted) = 0;
+    virtual void enableStatusChanged(bool enabled) = 0;
+    virtual void commandExecuted(int cmdCode, int cmdSize, void *pCmdData, int replySize, void *pReplyData) = 0;
+};
+
+// ----------------------------------------------------------------------------
+
+class BnEffectClient: public BnInterface<IEffectClient>
+{
+public:
+    virtual status_t    onTransact( uint32_t code,
+                                    const Parcel& data,
+                                    Parcel* reply,
+                                    uint32_t flags = 0);
+};
+
+}; // namespace android
+
+#endif // ANDROID_IEFFECTCLIENT_H
diff --git a/include/media/IMediaPlayerService.h b/include/media/IMediaPlayerService.h
index 31c0991..9416ca1 100644
--- a/include/media/IMediaPlayerService.h
+++ b/include/media/IMediaPlayerService.h
@@ -40,15 +40,14 @@
 
     virtual sp<IMediaRecorder>  createMediaRecorder(pid_t pid) = 0;
     virtual sp<IMediaMetadataRetriever> createMetadataRetriever(pid_t pid) = 0;
-    virtual sp<IMediaPlayer>    create(pid_t pid, const sp<IMediaPlayerClient>& client, const char* url, const KeyedVector<String8, String8> *headers = NULL) = 0;
-    virtual sp<IMediaPlayer>    create(pid_t pid, const sp<IMediaPlayerClient>& client, int fd, int64_t offset, int64_t length) = 0;
+    virtual sp<IMediaPlayer> create(pid_t pid, const sp<IMediaPlayerClient>& client,
+            const char* url, const KeyedVector<String8, String8> *headers = NULL,
+            int audioSessionId = 0) = 0;
+    virtual sp<IMediaPlayer> create(pid_t pid, const sp<IMediaPlayerClient>& client,
+            int fd, int64_t offset, int64_t length, int audioSessionId) = 0;
     virtual sp<IMemory>         decode(const char* url, uint32_t *pSampleRate, int* pNumChannels, int* pFormat) = 0;
     virtual sp<IMemory>         decode(int fd, int64_t offset, int64_t length, uint32_t *pSampleRate, int* pNumChannels, int* pFormat) = 0;
     virtual sp<IOMX>            getOMX() = 0;
-
-    // Take a peek at currently playing audio, for visualization purposes.
-    // This returns a buffer of 16 bit mono PCM data, or NULL if no visualization buffer is currently available.
-    virtual sp<IMemory>         snoop() = 0;
 };
 
 // ----------------------------------------------------------------------------
diff --git a/include/media/IMediaRecorder.h b/include/media/IMediaRecorder.h
index 24ac82b..cfc17a5 100644
--- a/include/media/IMediaRecorder.h
+++ b/include/media/IMediaRecorder.h
@@ -24,7 +24,7 @@
 
 class ISurface;
 class ICamera;
-class IMediaPlayerClient;
+class IMediaRecorderClient;
 
 class IMediaRecorder: public IInterface
 {
@@ -43,7 +43,7 @@
     virtual	status_t		setVideoSize(int width, int height) = 0;
     virtual	status_t		setVideoFrameRate(int frames_per_second) = 0;
     virtual     status_t                setParameters(const String8& params) = 0;
-    virtual     status_t                setListener(const sp<IMediaPlayerClient>& listener) = 0;
+    virtual     status_t                setListener(const sp<IMediaRecorderClient>& listener) = 0;
     virtual	status_t		prepare() = 0;
     virtual	status_t		getMaxAmplitude(int* max) = 0;
     virtual	status_t		start() = 0;
diff --git a/include/media/IMediaRecorderClient.h b/include/media/IMediaRecorderClient.h
new file mode 100644
index 0000000..0058ef2
--- /dev/null
+++ b/include/media/IMediaRecorderClient.h
@@ -0,0 +1,48 @@
+/*
+ * Copyright (C) 2010 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef ANDROID_IMEDIARECORDERCLIENT_H
+#define ANDROID_IMEDIARECORDERCLIENT_H
+
+#include <utils/RefBase.h>
+#include <binder/IInterface.h>
+#include <binder/Parcel.h>
+
+namespace android {
+
+class IMediaRecorderClient: public IInterface
+{
+public:
+    DECLARE_META_INTERFACE(MediaRecorderClient);
+
+    virtual void notify(int msg, int ext1, int ext2) = 0;
+};
+
+// ----------------------------------------------------------------------------
+
+class BnMediaRecorderClient: public BnInterface<IMediaRecorderClient>
+{
+public:
+    virtual status_t    onTransact( uint32_t code,
+                                    const Parcel& data,
+                                    Parcel* reply,
+                                    uint32_t flags = 0);
+};
+
+}; // namespace android
+
+#endif // ANDROID_IMEDIARECORDERCLIENT_H
+
diff --git a/include/media/MediaPlayerInterface.h b/include/media/MediaPlayerInterface.h
index 9e606d9..3662983 100644
--- a/include/media/MediaPlayerInterface.h
+++ b/include/media/MediaPlayerInterface.h
@@ -39,7 +39,6 @@
 enum player_type {
     PV_PLAYER = 1,
     SONIVOX_PLAYER = 2,
-    VORBIS_PLAYER = 3,
     STAGEFRIGHT_PLAYER = 4,
     // Test players are available only in the 'test' and 'eng' builds.
     // The shared library with the test player is passed passed as an
diff --git a/include/media/MediaProfiles.h b/include/media/MediaProfiles.h
index a4eea2a..c3cd361 100644
--- a/include/media/MediaProfiles.h
+++ b/include/media/MediaProfiles.h
@@ -48,8 +48,8 @@
     static MediaProfiles* getInstance();
 
     /**
-     * Returns the value for the given param name at the given quality level,
-     * or -1 if error.
+     * Returns the value for the given param name for the given camera at
+     * the given quality level, or -1 if error.
      *
      * Supported param name are:
      * duration - the recording duration.
@@ -64,7 +64,8 @@
      * aud.hz - audio sample rate
      * aud.ch - number of audio channels
      */
-    int getCamcorderProfileParamByName(const char *name, camcorder_quality quality) const;
+    int getCamcorderProfileParamByName(const char *name, int cameraId,
+                                       camcorder_quality quality) const;
 
     /**
      * Returns the output file formats supported.
@@ -124,12 +125,7 @@
     /**
      * Returns the number of image encoding quality levels supported.
      */
-    Vector<int> getImageEncodingQualityLevels() const;
-
-    /**
-     * Returns the maximum amount of memory in bytes we can use for decoding a JPEG file.
-     */
-    int getImageDecodingMaxMemory() const;
+    Vector<int> getImageEncodingQualityLevels(int cameraId) const;
 
 private:
     MediaProfiles& operator=(const MediaProfiles&);  // Don't call me
@@ -171,7 +167,8 @@
 
     struct CamcorderProfile {
         CamcorderProfile()
-            : mFileFormat(OUTPUT_FORMAT_THREE_GPP),
+            : mCameraId(0),
+              mFileFormat(OUTPUT_FORMAT_THREE_GPP),
               mQuality(CAMCORDER_QUALITY_HIGH),
               mDuration(0),
               mVideoCodec(0),
@@ -182,6 +179,7 @@
             delete mAudioCodec;
         }
 
+        int mCameraId;
         output_format mFileFormat;
         camcorder_quality mQuality;
         int mDuration;
@@ -249,6 +247,11 @@
         int tag;
     };
 
+    struct ImageEncodingQualityLevels {
+        int mCameraId;
+        Vector<int> mLevels;
+    };
+
     // Debug
     static void logVideoCodec(const VideoCodec& codec);
     static void logAudioCodec(const AudioCodec& codec);
@@ -267,9 +270,11 @@
     static VideoDecoderCap* createVideoDecoderCap(const char **atts);
     static VideoEncoderCap* createVideoEncoderCap(const char **atts);
     static AudioEncoderCap* createAudioEncoderCap(const char **atts);
-    static CamcorderProfile* createCamcorderProfile(const char **atts);
-    static int getImageEncodingQualityLevel(const char **atts);
-    static int getImageDecodingMaxMemory(const char **atts);
+    static CamcorderProfile* createCamcorderProfile(int cameraId, const char **atts);
+    static int getCameraId(const char **atts);
+
+    ImageEncodingQualityLevels* findImageEncodingQualityLevels(int cameraId) const;
+    void addImageEncodingQualityLevel(int cameraId, const char** atts);
 
     // Customized element tag handler for parsing the xml configuration file.
     static void startElementHandler(void *userData, const char *name, const char **atts);
@@ -303,6 +308,7 @@
     static bool sIsInitialized;
     static MediaProfiles *sInstance;
     static Mutex sLock;
+    int mCurrentCameraId;
 
     Vector<CamcorderProfile*> mCamcorderProfiles;
     Vector<AudioEncoderCap*>  mAudioEncoders;
@@ -310,8 +316,7 @@
     Vector<AudioDecoderCap*>  mAudioDecoders;
     Vector<VideoDecoderCap*>  mVideoDecoders;
     Vector<output_format>     mEncoderOutputFileFormats;
-    Vector<int>               mImageEncodingQualityLevels;
-    int                       mImageDecodingMaxMemory;
+    Vector<ImageEncodingQualityLevels *>  mImageEncodingQualityLevels;
 };
 
 }; // namespace android
diff --git a/include/media/MediaRecorderBase.h b/include/media/MediaRecorderBase.h
index 5b787a7..5e9e368 100644
--- a/include/media/MediaRecorderBase.h
+++ b/include/media/MediaRecorderBase.h
@@ -41,13 +41,14 @@
     virtual status_t setOutputFile(const char *path) = 0;
     virtual status_t setOutputFile(int fd, int64_t offset, int64_t length) = 0;
     virtual status_t setParameters(const String8& params) = 0;
-    virtual status_t setListener(const sp<IMediaPlayerClient>& listener) = 0;
+    virtual status_t setListener(const sp<IMediaRecorderClient>& listener) = 0;
     virtual status_t prepare() = 0;
     virtual status_t start() = 0;
     virtual status_t stop() = 0;
     virtual status_t close() = 0;
     virtual status_t reset() = 0;
     virtual status_t getMaxAmplitude(int *max) = 0;
+    virtual status_t dump(int fd, const Vector<String16>& args) const = 0;
 
 private:
     MediaRecorderBase(const MediaRecorderBase &);
diff --git a/include/media/PVMediaRecorder.h b/include/media/PVMediaRecorder.h
index 4f17c1a..f75d80d 100644
--- a/include/media/PVMediaRecorder.h
+++ b/include/media/PVMediaRecorder.h
@@ -18,7 +18,7 @@
 #ifndef ANDROID_PVMEDIARECORDER_H
 #define ANDROID_PVMEDIARECORDER_H
 
-#include <media/IMediaPlayerClient.h>
+#include <media/IMediaRecorderClient.h>
 #include <media/MediaRecorderBase.h>
 
 namespace android {
@@ -45,13 +45,14 @@
     virtual status_t setOutputFile(const char *path);
     virtual status_t setOutputFile(int fd, int64_t offset, int64_t length);
     virtual status_t setParameters(const String8& params);
-    virtual status_t setListener(const sp<IMediaPlayerClient>& listener);
+    virtual status_t setListener(const sp<IMediaRecorderClient>& listener);
     virtual status_t prepare();
     virtual status_t start();
     virtual status_t stop();
     virtual status_t close();
     virtual status_t reset();
     virtual status_t getMaxAmplitude(int *max);
+    virtual status_t dump(int fd, const Vector<String16>& args) const;
 
 private:
     status_t doStop();
diff --git a/include/media/Visualizer.h b/include/media/Visualizer.h
new file mode 100644
index 0000000..5d51de8
--- /dev/null
+++ b/include/media/Visualizer.h
@@ -0,0 +1,160 @@
+/*
+ * Copyright (C) 2010 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef ANDROID_MEDIA_VISUALIZER_H
+#define ANDROID_MEDIA_VISUALIZER_H
+
+#include <media/AudioEffect.h>
+#include <media/EffectVisualizerApi.h>
+#include <string.h>
+
+/**
+ * The Visualizer class enables application to retrieve part of the currently playing audio for
+ * visualization purpose. It is not an audio recording interface and only returns partial and low
+ * quality audio content. However, to protect privacy of certain audio data (e.g voice mail) the use
+ * of the visualizer requires the permission android.permission.RECORD_AUDIO.
+ * The audio session ID passed to the constructor indicates which audio content should be
+ * visualized:
+ * - If the session is 0, the audio output mix is visualized
+ * - If the session is not 0, the audio from a particular MediaPlayer or AudioTrack
+ *   using this audio session is visualized
+ * Two types of representation of audio content can be captured:
+ * - Waveform data: consecutive 8-bit (unsigned) mono samples by using the getWaveForm() method
+ * - Frequency data: 8-bit magnitude FFT by using the getFft() method
+ *
+ * The length of the capture can be retrieved or specified by calling respectively
+ * getCaptureSize() and setCaptureSize() methods. Note that the size of the FFT
+ * is half of the specified capture size but both sides of the spectrum are returned yielding in a
+ * number of bytes equal to the capture size. The capture size must be a power of 2 in the range
+ * returned by getMinCaptureSize() and getMaxCaptureSize().
+ * In addition to the polling capture mode, a callback mode is also available by installing a
+ * callback function by use of the setCaptureCallBack() method. The rate at which the callback
+ * is called as well as the type of data returned is specified.
+ * Before capturing data, the Visualizer must be enabled by calling the setEnabled() method.
+ * When data capture is not needed any more, the Visualizer should be disabled.
+ */
+
+
+namespace android {
+
+// ----------------------------------------------------------------------------
+
+class Visualizer: public AudioEffect {
+public:
+
+    enum callback_flags {
+        CAPTURE_WAVEFORM = 0x00000001,  // capture callback returns a PCM wave form
+        CAPTURE_FFT = 0x00000002,       // apture callback returns a frequency representation
+        CAPTURE_CALL_JAVA = 0x00000004  // the callback thread can call java
+    };
+
+
+    /* Constructor.
+     * See AudioEffect constructor for details on parameters.
+     */
+                        Visualizer(int32_t priority = 0,
+                                   effect_callback_t cbf = 0,
+                                   void* user = 0,
+                                   int sessionId = 0);
+
+                        ~Visualizer();
+
+    virtual status_t    setEnabled(bool enabled);
+
+    // maximum capture size in samples
+    static uint32_t getMaxCaptureSize() { return VISUALIZER_CAPTURE_SIZE_MAX; }
+    // minimum capture size in samples
+    static uint32_t getMinCaptureSize() { return VISUALIZER_CAPTURE_SIZE_MIN; }
+    // maximum capture rate in millihertz
+    static uint32_t getMaxCaptureRate() { return CAPTURE_RATE_MAX; }
+
+    // callback used to return periodic PCM or FFT captures to the application. Either one or both
+    // types of data are returned (PCM and FFT) according to flags indicated when installing the
+    // callback. When a type of data is not present, the corresponding size (waveformSize or
+    // fftSize) is 0.
+    typedef void (*capture_cbk_t)(void* user,
+                                    uint32_t waveformSize,
+                                    uint8_t *waveform,
+                                    uint32_t fftSize,
+                                    uint8_t *fft,
+                                    uint32_t samplingrate);
+
+    // install a callback to receive periodic captures. The capture rate is specified in milliHertz
+    // and the capture format is according to flags  (see callback_flags).
+    status_t setCaptureCallBack(capture_cbk_t cbk, void* user, uint32_t flags, uint32_t rate);
+
+    // set the capture size capture size must be a power of two in the range
+    // [VISUALIZER_CAPTURE_SIZE_MAX. VISUALIZER_CAPTURE_SIZE_MIN]
+    // must be called when the visualizer is not enabled
+    status_t setCaptureSize(uint32_t size);
+    uint32_t getCaptureSize() { return mCaptureSize; }
+
+    // returns the capture rate indicated when installing the callback
+    uint32_t getCaptureRate() { return mCaptureRate; }
+
+    // returns the sampling rate of the audio being captured
+    uint32_t getSamplingRate() { return mSampleRate; }
+
+    // return a capture in PCM 8 bit unsigned format. The size of the capture is equal to
+    // getCaptureSize()
+    status_t getWaveForm(uint8_t *waveform);
+
+    // return a capture in FFT 8 bit signed format. The size of the capture is equal to
+    // getCaptureSize() but the length of the FFT is half of the size (both parts of the spectrum
+    // are returned
+    status_t getFft(uint8_t *fft);
+
+private:
+
+    static const uint32_t CAPTURE_RATE_MAX = 20000;
+    static const uint32_t CAPTURE_RATE_DEF = 10000;
+    static const uint32_t CAPTURE_SIZE_DEF = VISUALIZER_CAPTURE_SIZE_MAX;
+
+    /* internal class to handle the callback */
+    class CaptureThread : public Thread
+    {
+    public:
+        CaptureThread(Visualizer& receiver, uint32_t captureRate, bool bCanCallJava = false);
+
+    private:
+        friend class Visualizer;
+        virtual bool        threadLoop();
+        virtual status_t    readyToRun();
+        virtual void        onFirstRef();
+        Visualizer& mReceiver;
+        Mutex       mLock;
+        uint32_t mSleepTimeUs;
+    };
+
+    status_t doFft(uint8_t *fft, uint8_t *waveform);
+    void periodicCapture();
+    uint32_t initCaptureSize();
+
+    Mutex mLock;
+    uint32_t mCaptureRate;
+    uint32_t mCaptureSize;
+    uint32_t mSampleRate;
+    capture_cbk_t mCaptureCallBack;
+    void *mCaptureCbkUser;
+    sp<CaptureThread> mCaptureThread;
+    uint32_t mCaptureFlags;
+    void *mFftTable;
+};
+
+
+}; // namespace android
+
+#endif // ANDROID_MEDIA_VISUALIZER_H
diff --git a/include/media/mediaplayer.h b/include/media/mediaplayer.h
index 7fad1b7..4963f73 100644
--- a/include/media/mediaplayer.h
+++ b/include/media/mediaplayer.h
@@ -93,6 +93,11 @@
     // The video is too complex for the decoder: it can't decode frames fast
     // enough. Possibly only the audio plays fine at this stage.
     MEDIA_INFO_VIDEO_TRACK_LAGGING = 700,
+    // MediaPlayer is temporarily pausing playback internally in order to
+    // buffer more data.
+    MEDIA_INFO_BUFFERING_START = 701,
+    // MediaPlayer is resuming playback after filling buffers.
+    MEDIA_INFO_BUFFERING_END = 702,
     // 8xx
     // Bad interleaving means that a media has been improperly interleaved or not
     // interleaved at all, e.g has all the video samples first then all the audio
@@ -161,12 +166,13 @@
             void            notify(int msg, int ext1, int ext2);
     static  sp<IMemory>     decode(const char* url, uint32_t *pSampleRate, int* pNumChannels, int* pFormat);
     static  sp<IMemory>     decode(int fd, int64_t offset, int64_t length, uint32_t *pSampleRate, int* pNumChannels, int* pFormat);
-    static  int             snoop(short *data, int len, int kind);
             status_t        invoke(const Parcel& request, Parcel *reply);
             status_t        setMetadataFilter(const Parcel& filter);
             status_t        getMetadata(bool update_only, bool apply_filter, Parcel *metadata);
             status_t        suspend();
             status_t        resume();
+            status_t        setAudioSessionId(int sessionId);
+            int             getAudioSessionId();
 private:
             void            clear_l();
             status_t        seekTo_l(int msec);
@@ -193,6 +199,7 @@
     float                       mRightVolume;
     int                         mVideoWidth;
     int                         mVideoHeight;
+    int                         mAudioSessionId;
 };
 
 }; // namespace android
diff --git a/include/media/mediarecorder.h b/include/media/mediarecorder.h
index 9ea6c7b..b21bc4d 100644
--- a/include/media/mediarecorder.h
+++ b/include/media/mediarecorder.h
@@ -22,7 +22,7 @@
 #include <utils/threads.h>
 #include <utils/List.h>
 #include <utils/Errors.h>
-#include <media/IMediaPlayerClient.h>
+#include <media/IMediaRecorderClient.h>
 #include <media/IMediaDeathNotifier.h>
 
 namespace android {
@@ -135,7 +135,10 @@
 enum media_recorder_info_type {
     MEDIA_RECORDER_INFO_UNKNOWN                   = 1,
     MEDIA_RECORDER_INFO_MAX_DURATION_REACHED      = 800,
-    MEDIA_RECORDER_INFO_MAX_FILESIZE_REACHED      = 801
+    MEDIA_RECORDER_INFO_MAX_FILESIZE_REACHED      = 801,
+    MEDIA_RECORDER_INFO_COMPLETION_STATUS         = 802,
+    MEDIA_RECORDER_INFO_PROGRESS_FRAME_STATUS     = 803,
+    MEDIA_RECORDER_INFO_PROGRESS_TIME_STATUS      = 804,
 };
 
 // ----------------------------------------------------------------------------
@@ -146,7 +149,7 @@
     virtual void notify(int msg, int ext1, int ext2) = 0;
 };
 
-class MediaRecorder : public BnMediaPlayerClient,
+class MediaRecorder : public BnMediaRecorderClient,
                       public virtual IMediaDeathNotifier
 {
 public:
diff --git a/include/media/stagefright/AMRWriter.h b/include/media/stagefright/AMRWriter.h
index 372909a..813dd43 100644
--- a/include/media/stagefright/AMRWriter.h
+++ b/include/media/stagefright/AMRWriter.h
@@ -26,6 +26,7 @@
 namespace android {
 
 struct MediaSource;
+struct MetaData;
 
 struct AMRWriter : public MediaWriter {
     AMRWriter(const char *filename);
@@ -35,25 +36,30 @@
 
     virtual status_t addSource(const sp<MediaSource> &source);
     virtual bool reachedEOS();
-    virtual status_t start();
+    virtual status_t start(MetaData *params = NULL);
     virtual void stop();
+    virtual void pause();
 
 protected:
     virtual ~AMRWriter();
 
 private:
-    Mutex mLock;
-
     FILE *mFile;
     status_t mInitCheck;
     sp<MediaSource> mSource;
     bool mStarted;
+    volatile bool mPaused;
+    volatile bool mResumed;
     volatile bool mDone;
-    bool mReachedEOS;
+    volatile bool mReachedEOS;
     pthread_t mThread;
+    int64_t mEstimatedSizeBytes;
+    int64_t mEstimatedDurationUs;
 
     static void *ThreadWrapper(void *);
     void threadFunc();
+    bool exceedsFileSizeLimit();
+    bool exceedsFileDurationLimit();
 
     AMRWriter(const AMRWriter &);
     AMRWriter &operator=(const AMRWriter &);
diff --git a/include/media/stagefright/AudioSource.h b/include/media/stagefright/AudioSource.h
index eb00140..628200d 100644
--- a/include/media/stagefright/AudioSource.h
+++ b/include/media/stagefright/AudioSource.h
@@ -39,6 +39,9 @@
     virtual status_t stop();
     virtual sp<MetaData> getFormat();
 
+    // Returns the maximum amplitude since last call.
+    int16_t getMaxAmplitude();
+
     virtual status_t read(
             MediaBuffer **buffer, const ReadOptions *options = NULL);
 
@@ -46,13 +49,24 @@
     virtual ~AudioSource();
 
 private:
-    enum { kMaxBufferSize = 8192 };
+    enum { kMaxBufferSize = 2048 };
 
     AudioRecord *mRecord;
     status_t mInitCheck;
     bool mStarted;
+
+    bool mCollectStats;
+    bool mTrackMaxAmplitude;
+    int64_t mTotalReadTimeUs;
+    int64_t mTotalReadBytes;
+    int64_t mTotalReads;
+    int64_t mStartTimeUs;
+    int16_t mMaxAmplitude;
+
     MediaBufferGroup *mGroup;
 
+    void trackMaxAmplitude(int16_t *data, int nSamples);
+
     AudioSource(const AudioSource &);
     AudioSource &operator=(const AudioSource &);
 };
diff --git a/include/media/stagefright/CachingDataSource.h b/include/media/stagefright/CachingDataSource.h
deleted file mode 100644
index 42d50e5..0000000
--- a/include/media/stagefright/CachingDataSource.h
+++ /dev/null
@@ -1,66 +0,0 @@
-/*
- * Copyright (C) 2009 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#ifndef CACHING_DATASOURCE_H_
-
-#define CACHING_DATASOURCE_H_
-
-#include <media/stagefright/DataSource.h>
-#include <media/stagefright/MediaErrors.h>
-#include <utils/threads.h>
-
-namespace android {
-
-class CachingDataSource : public DataSource {
-public:
-    CachingDataSource(
-            const sp<DataSource> &source, size_t pageSize, int numPages);
-
-    virtual status_t initCheck() const;
-
-    virtual ssize_t readAt(off_t offset, void *data, size_t size);
-
-    virtual status_t getSize(off_t *size);
-
-    virtual uint32_t flags();
-
-protected:
-    virtual ~CachingDataSource();
-
-private:
-    struct Page {
-        Page *mPrev, *mNext;
-        off_t mOffset;
-        size_t mLength;
-        void *mData;
-    };
-
-    sp<DataSource> mSource;
-    void *mData;
-    size_t mPageSize;
-    Page *mFirst, *mLast;
-
-    Page *allocate_page();
-
-    Mutex mLock;
-
-    CachingDataSource(const CachingDataSource &);
-    CachingDataSource &operator=(const CachingDataSource &);
-};
-
-}  // namespace android
-
-#endif  // CACHING_DATASOURCE_H_
diff --git a/include/media/stagefright/CameraSource.h b/include/media/stagefright/CameraSource.h
index ea435de..3192d03 100644
--- a/include/media/stagefright/CameraSource.h
+++ b/include/media/stagefright/CameraSource.h
@@ -28,18 +28,15 @@
 
 class ICamera;
 class IMemory;
-class ISurface;
 class Camera;
 
-class CameraSource : public MediaSource {
+class CameraSource : public MediaSource, public MediaBufferObserver {
 public:
     static CameraSource *Create();
-    static CameraSource *CreateFromICamera(const sp<ICamera> &icamera);
+    static CameraSource *CreateFromCamera(const sp<Camera> &camera);
 
     virtual ~CameraSource();
 
-    void setPreviewSurface(const sp<ISurface> &surface);
-
     virtual status_t start(MetaData *params = NULL);
     virtual status_t stop();
 
@@ -48,25 +45,39 @@
     virtual status_t read(
             MediaBuffer **buffer, const ReadOptions *options = NULL);
 
+    virtual void signalBufferReturned(MediaBuffer* buffer);
+
 private:
     friend class CameraSourceListener;
 
     sp<Camera> mCamera;
-    sp<ISurface> mPreviewSurface;
+    sp<MetaData> mMeta;
 
     Mutex mLock;
     Condition mFrameAvailableCondition;
-    List<sp<IMemory> > mFrames;
+    Condition mFrameCompleteCondition;
+    List<sp<IMemory> > mFramesReceived;
+    List<sp<IMemory> > mFramesBeingEncoded;
     List<int64_t> mFrameTimes;
 
-    int mWidth, mHeight;
+    int64_t mStartTimeUs;
     int64_t mFirstFrameTimeUs;
-    int32_t mNumFrames;
+    int64_t mLastFrameTimestampUs;
+    int32_t mNumFramesReceived;
+    int32_t mNumFramesEncoded;
+    int32_t mNumFramesDropped;
+    int32_t mNumGlitches;
+    int64_t mGlitchDurationThresholdUs;
+    bool mCollectStats;
     bool mStarted;
 
     CameraSource(const sp<Camera> &camera);
 
-    void dataCallback(int32_t msgType, const sp<IMemory> &data);
+    void dataCallbackTimestamp(
+            int64_t timestampUs, int32_t msgType, const sp<IMemory> &data);
+
+    void releaseQueuedFrames();
+    void releaseOneRecordingFrame(const sp<IMemory>& frame);
 
     CameraSource(const CameraSource &);
     CameraSource &operator=(const CameraSource &);
diff --git a/include/media/stagefright/ColorConverter.h b/include/media/stagefright/ColorConverter.h
index 1e341b9..bc3f464 100644
--- a/include/media/stagefright/ColorConverter.h
+++ b/include/media/stagefright/ColorConverter.h
@@ -58,6 +58,11 @@
             const void *srcBits, size_t srcSkip,
             void *dstBits, size_t dstSkip);
 
+    void convertYUV420SemiPlanar(
+            size_t width, size_t height,
+            const void *srcBits, size_t srcSkip,
+            void *dstBits, size_t dstSkip);
+
     ColorConverter(const ColorConverter &);
     ColorConverter &operator=(const ColorConverter &);
 };
diff --git a/include/media/stagefright/HTTPDataSource.h b/include/media/stagefright/HTTPDataSource.h
deleted file mode 100644
index 0400bea..0000000
--- a/include/media/stagefright/HTTPDataSource.h
+++ /dev/null
@@ -1,103 +0,0 @@
-/*
- * Copyright (C) 2009 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#ifndef HTTP_DATASOURCE_H_
-
-#define HTTP_DATASOURCE_H_
-
-#include <media/stagefright/DataSource.h>
-#include <utils/String8.h>
-#include <utils/threads.h>
-
-namespace android {
-
-class HTTPStream;
-
-class HTTPDataSource : public DataSource {
-public:
-    HTTPDataSource(
-            const char *host, int port, const char *path,
-            const KeyedVector<String8, String8> *headers = NULL);
-
-    HTTPDataSource(
-            const char *uri,
-            const KeyedVector<String8, String8> *headers = NULL);
-
-    status_t connect();
-    void disconnect();
-
-    virtual status_t initCheck() const;
-
-    virtual ssize_t readAt(off_t offset, void *data, size_t size);
-
-    virtual status_t getSize(off_t *size);
-
-    virtual uint32_t flags();
-
-protected:
-    virtual ~HTTPDataSource();
-
-private:
-    enum {
-        kBufferSize = 64 * 1024,
-
-        // If we encounter a socket-read error we'll try reconnecting
-        // and restarting the read for at most this many times.
-        kMaxNumRetries = 3,
-    };
-
-    enum State {
-        DISCONNECTED,
-        CONNECTING,
-        CONNECTED
-    };
-
-    State mState;
-    mutable Mutex mStateLock;
-
-    String8 mHeaders;
-
-    String8 mStartingHost;
-    String8 mStartingPath;
-    int mStartingPort;
-
-    HTTPStream *mHttp;
-
-    void *mBuffer;
-    size_t mBufferLength;
-    off_t mBufferOffset;
-
-    bool mContentLengthValid;
-    unsigned long long mContentLength;
-
-    int32_t mNumRetriesLeft;
-
-    void init(const KeyedVector<String8, String8> *headers);
-
-    ssize_t sendRangeRequest(size_t offset);
-    void initHeaders(const KeyedVector<String8, String8> *overrides);
-
-    status_t connectWithRedirectsAndRange(off_t rangeStart);
-    void applyTimeoutResponse();
-
-    HTTPDataSource(const HTTPDataSource &);
-    HTTPDataSource &operator=(const HTTPDataSource &);
-};
-
-}  // namespace android
-
-#endif  // HTTP_DATASOURCE_H_
-
diff --git a/include/media/stagefright/MPEG4Writer.h b/include/media/stagefright/MPEG4Writer.h
index 6b93f19..232583a 100644
--- a/include/media/stagefright/MPEG4Writer.h
+++ b/include/media/stagefright/MPEG4Writer.h
@@ -36,9 +36,10 @@
     MPEG4Writer(int fd);
 
     virtual status_t addSource(const sp<MediaSource> &source);
-    virtual status_t start();
+    virtual status_t start(MetaData *param = NULL);
     virtual bool reachedEOS();
     virtual void stop();
+    virtual void pause();
 
     void beginBox(const char *fourcc);
     void writeInt8(int8_t x);
@@ -49,6 +50,9 @@
     void writeFourcc(const char *fourcc);
     void write(const void *data, size_t size);
     void endBox();
+    uint32_t interleaveDuration() const { return mInterleaveDurationUs; }
+    status_t setInterleaveDuration(uint32_t duration);
+    int32_t getTimeScale() const { return mTimeScale; }
 
 protected:
     virtual ~MPEG4Writer();
@@ -57,16 +61,42 @@
     class Track;
 
     FILE *mFile;
+    bool mUse32BitOffset;
+    bool mPaused;
+    bool mStarted;
     off_t mOffset;
     off_t mMdatOffset;
+    uint8_t *mMoovBoxBuffer;
+    off_t mMoovBoxBufferOffset;
+    bool  mWriteMoovBoxToMemory;
+    off_t mFreeBoxOffset;
+    bool mStreamableFile;
+    off_t mEstimatedMoovBoxSize;
+    uint32_t mInterleaveDurationUs;
+    int32_t mTimeScale;
+    int64_t mStartTimestampUs;
     Mutex mLock;
 
     List<Track *> mTracks;
 
     List<off_t> mBoxes;
 
-    off_t addSample(MediaBuffer *buffer);
-    off_t addLengthPrefixedSample(MediaBuffer *buffer);
+    void setStartTimestampUs(int64_t timeUs);
+    int64_t getStartTimestampUs();  // Not const
+    status_t startTracks(MetaData *params);
+    size_t numTracks();
+    int64_t estimateMoovBoxSize(int32_t bitRate);
+
+    void lock();
+    void unlock();
+
+    // Acquire lock before calling these methods
+    off_t addSample_l(MediaBuffer *buffer);
+    off_t addLengthPrefixedSample_l(MediaBuffer *buffer);
+
+    inline size_t write(const void *ptr, size_t size, size_t nmemb, FILE* stream);
+    bool exceedsFileSizeLimit();
+    bool exceedsFileDurationLimit();
 
     MPEG4Writer(const MPEG4Writer &);
     MPEG4Writer &operator=(const MPEG4Writer &);
diff --git a/include/media/stagefright/MediaDefs.h b/include/media/stagefright/MediaDefs.h
index 207195a..9cddab2 100644
--- a/include/media/stagefright/MediaDefs.h
+++ b/include/media/stagefright/MediaDefs.h
@@ -22,6 +22,7 @@
 
 extern const char *MEDIA_MIMETYPE_IMAGE_JPEG;
 
+extern const char *MEDIA_MIMETYPE_VIDEO_VPX;
 extern const char *MEDIA_MIMETYPE_VIDEO_AVC;
 extern const char *MEDIA_MIMETYPE_VIDEO_MPEG4;
 extern const char *MEDIA_MIMETYPE_VIDEO_H263;
@@ -38,6 +39,8 @@
 extern const char *MEDIA_MIMETYPE_CONTAINER_MPEG4;
 extern const char *MEDIA_MIMETYPE_CONTAINER_WAV;
 extern const char *MEDIA_MIMETYPE_CONTAINER_OGG;
+extern const char *MEDIA_MIMETYPE_CONTAINER_MATROSKA;
+extern const char *MEDIA_MIMETYPE_CONTAINER_MPEG2TS;
 
 }  // namespace android
 
diff --git a/include/media/stagefright/MediaSource.h b/include/media/stagefright/MediaSource.h
index 96d57e7..9cc94c8 100644
--- a/include/media/stagefright/MediaSource.h
+++ b/include/media/stagefright/MediaSource.h
@@ -20,6 +20,7 @@
 
 #include <sys/types.h>
 
+#include <media/stagefright/MediaErrors.h>
 #include <utils/RefBase.h>
 
 namespace android {
@@ -83,6 +84,13 @@
         int64_t mLatenessUs;
     };
 
+    // Causes this source to suspend pulling data from its upstream source
+    // until a subsequent read-with-seek. Currently only supported by
+    // OMXCodec.
+    virtual status_t pause() {
+        return ERROR_UNSUPPORTED;
+    }
+
 protected:
     virtual ~MediaSource();
 
diff --git a/include/media/stagefright/MediaWriter.h b/include/media/stagefright/MediaWriter.h
index b8232c6..8d3a9df 100644
--- a/include/media/stagefright/MediaWriter.h
+++ b/include/media/stagefright/MediaWriter.h
@@ -19,22 +19,41 @@
 #define MEDIA_WRITER_H_
 
 #include <utils/RefBase.h>
+#include <media/IMediaRecorderClient.h>
 
 namespace android {
 
 struct MediaSource;
+struct MetaData;
 
 struct MediaWriter : public RefBase {
-    MediaWriter() {}
+    MediaWriter()
+        : mMaxFileSizeLimitBytes(0),
+          mMaxFileDurationLimitUs(0) {
+    }
 
     virtual status_t addSource(const sp<MediaSource> &source) = 0;
     virtual bool reachedEOS() = 0;
-    virtual status_t start() = 0;
+    virtual status_t start(MetaData *params = NULL) = 0;
     virtual void stop() = 0;
+    virtual void pause() = 0;
+    virtual void setMaxFileSize(int64_t bytes) { mMaxFileSizeLimitBytes = bytes; }
+    virtual void setMaxFileDuration(int64_t durationUs) { mMaxFileDurationLimitUs = durationUs; }
+    virtual void setListener(const sp<IMediaRecorderClient>& listener) {
+        mListener = listener;
+    }
 
 protected:
     virtual ~MediaWriter() {}
+    int64_t mMaxFileSizeLimitBytes;
+    int64_t mMaxFileDurationLimitUs;
+    sp<IMediaRecorderClient> mListener;
 
+    void notify(int msg, int ext1, int ext2) {
+        if (mListener != NULL) {
+            mListener->notify(msg, ext1, ext2);
+        }
+    }
 private:
     MediaWriter(const MediaWriter &);
     MediaWriter &operator=(const MediaWriter &);
diff --git a/include/media/stagefright/MetaData.h b/include/media/stagefright/MetaData.h
index dc2bd50..cdbf483 100644
--- a/include/media/stagefright/MetaData.h
+++ b/include/media/stagefright/MetaData.h
@@ -30,10 +30,13 @@
 // The following keys map to int32_t data unless indicated otherwise.
 enum {
     kKeyMIMEType          = 'mime',  // cstring
-    kKeyWidth             = 'widt',
-    kKeyHeight            = 'heig',
-    kKeyChannelCount      = '#chn',
-    kKeySampleRate        = 'srte',
+    kKeyWidth             = 'widt',  // int32_t
+    kKeyHeight            = 'heig',  // int32_t
+    kKeyIFramesInterval   = 'ifiv',  // int32_t
+    kKeyStride            = 'strd',  // int32_t
+    kKeySliceHeight       = 'slht',  // int32_t
+    kKeyChannelCount      = '#chn',  // int32_t
+    kKeySampleRate        = 'srte',  // int32_t (also video frame rate)
     kKeyBitRate           = 'brte',  // int32_t (bps)
     kKeyESDS              = 'esds',  // raw data
     kKeyAVCC              = 'avcc',  // raw data
@@ -65,6 +68,26 @@
     kKeyDiscNumber        = 'dnum',  // cstring
     kKeyDate              = 'date',  // cstring
     kKeyWriter            = 'writ',  // cstring
+    kKeyTimeScale         = 'tmsl',  // int32_t
+
+    // video profile and level
+    kKeyVideoProfile      = 'vprf',  // int32_t
+    kKeyVideoLevel        = 'vlev',  // int32_t
+
+    // Set this key to enable authoring files in 64-bit offset
+    kKey64BitFileOffset   = 'fobt',  // int32_t (bool)
+
+    // Identify the file output format for authoring
+    // Please see <media/mediarecorder.h> for the supported
+    // file output formats.
+    kKeyFileType          = 'ftyp',  // int32_t
+
+    // Track authoring progress status
+    // kKeyTrackTimeStatus is used to track progress in elapsed time
+    // kKeyTrackFrameStatus is used to track progress in authored frames
+    kKeyTrackFrameStatus  = 'tkfm',  // int32_t
+    kKeyTrackTimeStatus   = 'tktm',  // int64_t
+
 };
 
 enum {
diff --git a/include/media/stagefright/OMXCodec.h b/include/media/stagefright/OMXCodec.h
index 1d76a1a..214f43a 100644
--- a/include/media/stagefright/OMXCodec.h
+++ b/include/media/stagefright/OMXCodec.h
@@ -27,6 +27,7 @@
 
 class MemoryDealer;
 struct OMXCodecObserver;
+struct CodecProfileLevel;
 
 struct OMXCodec : public MediaSource,
                   public MediaBufferObserver {
@@ -52,6 +53,8 @@
     virtual status_t read(
             MediaBuffer **buffer, const ReadOptions *options = NULL);
 
+    virtual status_t pause();
+
     void on_message(const omx_message &msg);
 
     // from MediaBufferObserver
@@ -98,6 +101,7 @@
         kDecoderLiesAboutNumberOfChannels     = 256,
         kInputBufferSizesAreBogus             = 512,
         kSupportsMultipleFramesPerInputBuffer = 1024,
+        kAvoidMemcopyInputRecordingFrames     = 2048,
     };
 
     struct BufferInfo {
@@ -143,6 +147,8 @@
     Mutex mLock;
     Condition mAsyncCompletion;
 
+    bool mPaused;
+
     // A list of indices into mPortStatus[kPortIndexOutput] filled with data.
     List<size_t> mFilledBuffers;
     Condition mBufferFilled;
@@ -156,8 +162,8 @@
 
     void setComponentRole();
 
-    void setAMRFormat(bool isWAMR);
-    void setAACFormat(int32_t numChannels, int32_t sampleRate);
+    void setAMRFormat(bool isWAMR, int32_t bitRate);
+    void setAACFormat(int32_t numChannels, int32_t sampleRate, int32_t bitRate);
 
     status_t setVideoPortFormatType(
             OMX_U32 portIndex,
@@ -165,10 +171,19 @@
             OMX_COLOR_FORMATTYPE colorFormat);
 
     void setVideoInputFormat(
-            const char *mime, OMX_U32 width, OMX_U32 height);
+            const char *mime, const sp<MetaData>& meta);
 
-    status_t setupMPEG4EncoderParameters();
-    status_t setupAVCEncoderParameters();
+    status_t setupBitRate(int32_t bitRate);
+    status_t setupErrorCorrectionParameters();
+    status_t setupH263EncoderParameters(const sp<MetaData>& meta);
+    status_t setupMPEG4EncoderParameters(const sp<MetaData>& meta);
+    status_t setupAVCEncoderParameters(const sp<MetaData>& meta);
+
+    // If profile/level is set in the meta data, its value in the meta
+    // data will be used; otherwise, the default value will be used.
+    status_t getVideoProfileLevel(const sp<MetaData>& meta,
+            const CodecProfileLevel& defaultProfileLevel,
+            CodecProfileLevel& profileLevel);
 
     status_t setVideoOutputFormat(
             const char *mime, OMX_U32 width, OMX_U32 height);
diff --git a/include/media/stagefright/foundation/AAtomizer.h b/include/media/stagefright/foundation/AAtomizer.h
new file mode 100644
index 0000000..5f3a678
--- /dev/null
+++ b/include/media/stagefright/foundation/AAtomizer.h
@@ -0,0 +1,51 @@
+/*
+ * Copyright (C) 2010 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef A_ATOMIZER_H_
+
+#define A_ATOMIZER_H_
+
+#include <stdint.h>
+
+#include <media/stagefright/foundation/ABase.h>
+#include <media/stagefright/foundation/AString.h>
+#include <utils/List.h>
+#include <utils/Vector.h>
+#include <utils/threads.h>
+
+namespace android {
+
+struct AAtomizer {
+    static const char *Atomize(const char *name);
+
+private:
+    static AAtomizer gAtomizer;
+
+    Mutex mLock;
+    Vector<List<AString> > mAtoms;
+
+    AAtomizer();
+
+    const char *atomize(const char *name);
+
+    static uint32_t Hash(const char *s);
+
+    DISALLOW_EVIL_CONSTRUCTORS(AAtomizer);
+};
+
+}  // namespace android
+
+#endif  // A_ATOMIZER_H_
diff --git a/include/media/stagefright/foundation/ABase.h b/include/media/stagefright/foundation/ABase.h
new file mode 100644
index 0000000..9eceea3
--- /dev/null
+++ b/include/media/stagefright/foundation/ABase.h
@@ -0,0 +1,25 @@
+/*
+ * Copyright (C) 2010 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef A_BASE_H_
+
+#define A_BASE_H_
+
+#define DISALLOW_EVIL_CONSTRUCTORS(name) \
+    name(const name &); \
+    name &operator=(const name &)
+
+#endif  // A_BASE_H_
diff --git a/include/media/stagefright/foundation/ABuffer.h b/include/media/stagefright/foundation/ABuffer.h
new file mode 100644
index 0000000..28f0aed
--- /dev/null
+++ b/include/media/stagefright/foundation/ABuffer.h
@@ -0,0 +1,71 @@
+/*
+ * Copyright (C) 2010 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef A_BUFFER_H_
+
+#define A_BUFFER_H_
+
+#include <sys/types.h>
+#include <stdint.h>
+
+#include <media/stagefright/foundation/ABase.h>
+#include <utils/RefBase.h>
+
+namespace android {
+
+struct AMessage;
+
+struct ABuffer : public RefBase {
+    ABuffer(size_t capacity);
+    ABuffer(void *data, size_t capacity);
+
+    void setFarewellMessage(const sp<AMessage> msg);
+
+    uint8_t *base() { return (uint8_t *)mData; }
+    uint8_t *data() { return (uint8_t *)mData + mRangeOffset; }
+    size_t capacity() const { return mCapacity; }
+    size_t size() const { return mRangeLength; }
+    size_t offset() const { return mRangeOffset; }
+
+    void setRange(size_t offset, size_t size);
+
+    void setInt32Data(int32_t data) { mInt32Data = data; }
+    int32_t int32Data() const { return mInt32Data; }
+
+    sp<AMessage> meta();
+
+protected:
+    virtual ~ABuffer();
+
+private:
+    sp<AMessage> mFarewell;
+    sp<AMessage> mMeta;
+
+    void *mData;
+    size_t mCapacity;
+    size_t mRangeOffset;
+    size_t mRangeLength;
+
+    int32_t mInt32Data;
+
+    bool mOwnsData;
+
+    DISALLOW_EVIL_CONSTRUCTORS(ABuffer);
+};
+
+}  // namespace android
+
+#endif  // A_BUFFER_H_
diff --git a/include/media/stagefright/foundation/ADebug.h b/include/media/stagefright/foundation/ADebug.h
new file mode 100644
index 0000000..0f986a0
--- /dev/null
+++ b/include/media/stagefright/foundation/ADebug.h
@@ -0,0 +1,105 @@
+/*
+ * Copyright (C) 2010 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef A_DEBUG_H_
+
+#define A_DEBUG_H_
+
+#include <string.h>
+
+#include <media/stagefright/foundation/ABase.h>
+#include <media/stagefright/foundation/AString.h>
+
+namespace android {
+
+enum LogType {
+    VERBOSE,
+    INFO,
+    WARNING,
+    ERROR,
+    FATAL,
+};
+
+struct Logger {
+    Logger(LogType type);
+    virtual ~Logger();
+
+    template<class T> Logger &operator<<(const T &x) {
+        mMessage.append(x);
+
+        return *this;
+    }
+
+private:
+    android::AString mMessage;
+    LogType mLogType;
+
+    DISALLOW_EVIL_CONSTRUCTORS(Logger);
+};
+
+const char *LeafName(const char *s);
+
+#undef LOG
+#define LOG(type)    Logger(type) << LeafName(__FILE__) << ":" << __LINE__ << " "
+
+#define CHECK(condition)                                \
+    do {                                                \
+        if (!(condition)) {                             \
+            LOG(FATAL) << "CHECK(" #condition ") failed.";    \
+        }                                               \
+    } while (false)
+
+#define MAKE_COMPARATOR(suffix,op)                          \
+    template<class A, class B>                              \
+    AString Compare_##suffix(const A &a, const B &b) {      \
+        AString res;                                        \
+        if (!(a op b)) {                                    \
+            res.append(a);                                  \
+            res.append(" vs. ");                            \
+            res.append(b);                                  \
+        }                                                   \
+        return res;                                         \
+    }
+
+MAKE_COMPARATOR(EQ,==)
+MAKE_COMPARATOR(NE,!=)
+MAKE_COMPARATOR(LE,<=)
+MAKE_COMPARATOR(GE,>=)
+MAKE_COMPARATOR(LT,<)
+MAKE_COMPARATOR(GT,>)
+
+#define CHECK_OP(x,y,suffix,op)                                         \
+    do {                                                                \
+        AString ___res = Compare_##suffix(x, y);                        \
+        if (!___res.empty()) {                                          \
+            LOG(FATAL) << "CHECK_" #suffix "(" #x "," #y ") failed: "   \
+                       << ___res;                                       \
+        }                                                               \
+    } while (false)
+
+#define CHECK_EQ(x,y)   CHECK_OP(x,y,EQ,==)
+#define CHECK_NE(x,y)   CHECK_OP(x,y,NE,!=)
+#define CHECK_LE(x,y)   CHECK_OP(x,y,LE,<=)
+#define CHECK_LT(x,y)   CHECK_OP(x,y,LT,<)
+#define CHECK_GE(x,y)   CHECK_OP(x,y,GE,>=)
+#define CHECK_GT(x,y)   CHECK_OP(x,y,GT,>)
+
+#define TRESPASS()      LOG(FATAL) << "Should not be here."
+
+}  // namespace android
+
+#endif  // A_DEBUG_H_
+
diff --git a/include/media/stagefright/foundation/AHandler.h b/include/media/stagefright/foundation/AHandler.h
new file mode 100644
index 0000000..b008b54
--- /dev/null
+++ b/include/media/stagefright/foundation/AHandler.h
@@ -0,0 +1,56 @@
+/*
+ * Copyright (C) 2010 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef A_HANDLER_H_
+
+#define A_HANDLER_H_
+
+#include <media/stagefright/foundation/ALooper.h>
+#include <utils/RefBase.h>
+
+namespace android {
+
+struct AMessage;
+
+struct AHandler : public RefBase {
+    AHandler()
+        : mID(0) {
+    }
+
+    ALooper::handler_id id() const {
+        return mID;
+    }
+
+    sp<ALooper> looper();
+
+protected:
+    virtual void onMessageReceived(const sp<AMessage> &msg) = 0;
+
+private:
+    friend struct ALooperRoster;
+
+    ALooper::handler_id mID;
+
+    void setID(ALooper::handler_id id) {
+        mID = id;
+    }
+
+    DISALLOW_EVIL_CONSTRUCTORS(AHandler);
+};
+
+}  // namespace android
+
+#endif  // A_HANDLER_H_
diff --git a/include/media/stagefright/foundation/AHandlerReflector.h b/include/media/stagefright/foundation/AHandlerReflector.h
new file mode 100644
index 0000000..857866a
--- /dev/null
+++ b/include/media/stagefright/foundation/AHandlerReflector.h
@@ -0,0 +1,32 @@
+#ifndef A_HANDLER_REFLECTOR_H_
+
+#define A_HANDLER_REFLECTOR_H_
+
+#include <media/stagefright/foundation/AHandler.h>
+
+namespace android {
+
+template<class T>
+struct AHandlerReflector : public AHandler {
+    AHandlerReflector(T *target)
+        : mTarget(target) {
+    }
+
+protected:
+    virtual void onMessageReceived(const sp<AMessage> &msg) {
+        sp<T> target = mTarget.promote();
+        if (target != NULL) {
+            target->onMessageReceived(msg);
+        }
+    }
+
+private:
+    wp<T> mTarget;
+
+    AHandlerReflector(const AHandlerReflector<T> &);
+    AHandlerReflector<T> &operator=(const AHandlerReflector<T> &);
+};
+
+}  // namespace android
+
+#endif  // A_HANDLER_REFLECTOR_H_
diff --git a/include/media/stagefright/foundation/ALooper.h b/include/media/stagefright/foundation/ALooper.h
new file mode 100644
index 0000000..194f1fc
--- /dev/null
+++ b/include/media/stagefright/foundation/ALooper.h
@@ -0,0 +1,78 @@
+/*
+ * Copyright (C) 2010 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef A_LOOPER_H_
+
+#define A_LOOPER_H_
+
+#include <media/stagefright/foundation/ABase.h>
+#include <utils/Errors.h>
+#include <utils/KeyedVector.h>
+#include <utils/List.h>
+#include <utils/RefBase.h>
+#include <utils/threads.h>
+
+namespace android {
+
+struct AHandler;
+struct AMessage;
+
+struct ALooper : public RefBase {
+    typedef int32_t event_id;
+    typedef int32_t handler_id;
+
+    ALooper();
+
+    handler_id registerHandler(const sp<AHandler> &handler);
+    void unregisterHandler(handler_id handlerID);
+
+    status_t start(
+            bool runOnCallingThread = false,
+            bool canCallJava = false);
+
+    status_t stop();
+
+    static int64_t GetNowUs();
+
+protected:
+    virtual ~ALooper();
+
+private:
+    friend struct ALooperRoster;
+
+    struct Event {
+        int64_t mWhenUs;
+        sp<AMessage> mMessage;
+    };
+
+    Mutex mLock;
+    Condition mQueueChangedCondition;
+
+    List<Event> mEventQueue;
+
+    struct LooperThread;
+    sp<LooperThread> mThread;
+    bool mRunningLocally;
+
+    void post(const sp<AMessage> &msg, int64_t delayUs);
+    bool loop();
+
+    DISALLOW_EVIL_CONSTRUCTORS(ALooper);
+};
+
+}  // namespace android
+
+#endif  // A_LOOPER_H_
diff --git a/include/media/stagefright/foundation/ALooperRoster.h b/include/media/stagefright/foundation/ALooperRoster.h
new file mode 100644
index 0000000..c1bd4ed
--- /dev/null
+++ b/include/media/stagefright/foundation/ALooperRoster.h
@@ -0,0 +1,54 @@
+/*
+ * Copyright (C) 2010 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef A_LOOPER_ROSTER_H_
+
+#define A_LOOPER_ROSTER_H_
+
+#include <media/stagefright/foundation/ALooper.h>
+#include <utils/KeyedVector.h>
+
+namespace android {
+
+struct ALooperRoster {
+    ALooperRoster();
+
+    ALooper::handler_id registerHandler(
+            const sp<ALooper> looper, const sp<AHandler> &handler);
+
+    void unregisterHandler(ALooper::handler_id handlerID);
+
+    void postMessage(const sp<AMessage> &msg, int64_t delayUs = 0);
+    void deliverMessage(const sp<AMessage> &msg);
+
+    sp<ALooper> findLooper(ALooper::handler_id handlerID);
+
+private:
+    struct HandlerInfo {
+        wp<ALooper> mLooper;
+        wp<AHandler> mHandler;
+    };
+
+    Mutex mLock;
+    KeyedVector<ALooper::handler_id, HandlerInfo> mHandlers;
+    ALooper::handler_id mNextHandlerID;
+
+    DISALLOW_EVIL_CONSTRUCTORS(ALooperRoster);
+};
+
+}  // namespace android
+
+#endif  // A_LOOPER_ROSTER_H_
diff --git a/include/media/stagefright/foundation/AMessage.h b/include/media/stagefright/foundation/AMessage.h
new file mode 100644
index 0000000..c674cbaf
--- /dev/null
+++ b/include/media/stagefright/foundation/AMessage.h
@@ -0,0 +1,115 @@
+/*
+ * Copyright (C) 2010 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef A_MESSAGE_H_
+
+#define A_MESSAGE_H_
+
+#include <media/stagefright/foundation/ABase.h>
+#include <media/stagefright/foundation/ALooper.h>
+#include <utils/KeyedVector.h>
+#include <utils/RefBase.h>
+
+namespace android {
+
+struct AString;
+
+struct AMessage : public RefBase {
+    AMessage(uint32_t what = 0, ALooper::handler_id target = 0);
+
+    void setWhat(uint32_t what);
+    uint32_t what() const;
+
+    void setTarget(ALooper::handler_id target);
+    ALooper::handler_id target() const;
+
+    void setInt32(const char *name, int32_t value);
+    void setInt64(const char *name, int64_t value);
+    void setSize(const char *name, size_t value);
+    void setFloat(const char *name, float value);
+    void setDouble(const char *name, double value);
+    void setPointer(const char *name, void *value);
+    void setString(const char *name, const char *s, ssize_t len = -1);
+    void setObject(const char *name, const sp<RefBase> &obj);
+    void setMessage(const char *name, const sp<AMessage> &obj);
+
+    bool findInt32(const char *name, int32_t *value) const;
+    bool findInt64(const char *name, int64_t *value) const;
+    bool findSize(const char *name, size_t *value) const;
+    bool findFloat(const char *name, float *value) const;
+    bool findDouble(const char *name, double *value) const;
+    bool findPointer(const char *name, void **value) const;
+    bool findString(const char *name, AString *value) const;
+    bool findObject(const char *name, sp<RefBase> *obj) const;
+    bool findMessage(const char *name, sp<AMessage> *obj) const;
+
+    void post(int64_t delayUs = 0);
+
+    sp<AMessage> dup() const;
+
+    AString debugString(int32_t indent = 0) const;
+
+protected:
+    virtual ~AMessage();
+
+private:
+    enum Type {
+        kTypeInt32,
+        kTypeInt64,
+        kTypeSize,
+        kTypeFloat,
+        kTypeDouble,
+        kTypePointer,
+        kTypeString,
+        kTypeObject,
+        kTypeMessage,
+    };
+
+    uint32_t mWhat;
+    ALooper::handler_id mTarget;
+
+    struct Item {
+        union {
+            int32_t int32Value;
+            int64_t int64Value;
+            size_t sizeValue;
+            float floatValue;
+            double doubleValue;
+            void *ptrValue;
+            RefBase *refValue;
+            AString *stringValue;
+        } u;
+        const char *mName;
+        Type mType;
+    };
+
+    enum {
+        kMaxNumItems = 16
+    };
+    Item mItems[kMaxNumItems];
+    size_t mNumItems;
+
+    void clear();
+    Item *allocateItem(const char *name);
+    void freeItem(Item *item);
+    const Item *findItem(const char *name, Type type) const;
+
+    DISALLOW_EVIL_CONSTRUCTORS(AMessage);
+};
+
+}  // namespace android
+
+#endif  // A_MESSAGE_H_
diff --git a/include/media/stagefright/foundation/AString.h b/include/media/stagefright/foundation/AString.h
new file mode 100644
index 0000000..55ade64
--- /dev/null
+++ b/include/media/stagefright/foundation/AString.h
@@ -0,0 +1,94 @@
+/*
+ * Copyright (C) 2010 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef A_STRING_H_
+
+#define A_STRING_H_
+
+#include <sys/types.h>
+
+namespace android {
+
+struct AString {
+    AString();
+    AString(const char *s);
+    AString(const char *s, size_t size);
+    AString(const AString &from);
+    AString(const AString &from, size_t offset, size_t n);
+    ~AString();
+
+    AString &operator=(const AString &from);
+    void setTo(const char *s);
+    void setTo(const char *s, size_t size);
+    void setTo(const AString &from, size_t offset, size_t n);
+
+    size_t size() const;
+    const char *c_str() const;
+
+    bool empty() const;
+
+    void clear();
+    void trim();
+    void erase(size_t start, size_t n);
+
+    void append(char c) { append(&c, 1); }
+    void append(const char *s);
+    void append(const char *s, size_t size);
+    void append(const AString &from);
+    void append(const AString &from, size_t offset, size_t n);
+    void append(int x);
+    void append(unsigned x);
+    void append(long x);
+    void append(unsigned long x);
+    void append(long long x);
+    void append(unsigned long long x);
+    void append(float x);
+    void append(double x);
+    void append(void *x);
+
+    void insert(const AString &from, size_t insertionPos);
+    void insert(const char *from, size_t size, size_t insertionPos);
+
+    ssize_t find(const char *substring, size_t start = 0) const;
+
+    size_t hash() const;
+
+    bool operator==(const AString &other) const;
+    bool operator<(const AString &other) const;
+    bool operator>(const AString &other) const;
+
+    int compare(const AString &other) const;
+
+    bool startsWith(const char *prefix) const;
+
+    void tolower();
+
+private:
+    static const char *kEmptyString;
+
+    char *mData;
+    size_t mSize;
+    size_t mAllocSize;
+
+    void makeMutable();
+};
+
+AString StringPrintf(const char *format, ...);
+
+}  // namespace android
+
+#endif  // A_STRING_H_
+
diff --git a/include/media/stagefright/foundation/base64.h b/include/media/stagefright/foundation/base64.h
new file mode 100644
index 0000000..e340b89
--- /dev/null
+++ b/include/media/stagefright/foundation/base64.h
@@ -0,0 +1,33 @@
+/*
+ * Copyright (C) 2010 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef BASE_64_H_
+
+#define BASE_64_H_
+
+#include <utils/RefBase.h>
+
+namespace android {
+
+struct ABuffer;
+struct AString;
+
+sp<ABuffer> decodeBase64(const AString &s);
+void encodeBase64(const void *data, size_t size, AString *out);
+
+}  // namespace android
+
+#endif  // BASE_64_H_
diff --git a/include/media/stagefright/foundation/hexdump.h b/include/media/stagefright/foundation/hexdump.h
new file mode 100644
index 0000000..f6083a9
--- /dev/null
+++ b/include/media/stagefright/foundation/hexdump.h
@@ -0,0 +1,29 @@
+/*
+ * Copyright (C) 2010 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef HEXDUMP_H_
+
+#define HEXDUMP_H_
+
+#include <sys/types.h>
+
+namespace android {
+
+void hexdump(const void *_data, size_t size);
+
+}  // namespace android
+
+#endif  // HEXDUMP_H_
diff --git a/include/private/README b/include/private/README
new file mode 100644
index 0000000..ee41492
--- /dev/null
+++ b/include/private/README
@@ -0,0 +1,4 @@
+This folder contains private include files.
+
+These include files are part of the private implementation details of
+various framework components.  Use at your peril.
diff --git a/include/private/media/AudioEffectShared.h b/include/private/media/AudioEffectShared.h
new file mode 100644
index 0000000..a3a99a4
--- /dev/null
+++ b/include/private/media/AudioEffectShared.h
@@ -0,0 +1,51 @@
+/*
+ * Copyright (C) 2010 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef ANDROID_EFFECTCBASESHARED_H
+#define ANDROID_EFFECTCBASESHARED_H
+
+#include <stdint.h>
+#include <sys/types.h>
+
+#include <utils/threads.h>
+
+namespace android {
+
+// ----------------------------------------------------------------------------
+
+// Size of buffer used to exchange parameters between application and mediaserver processes.
+#define EFFECT_PARAM_BUFFER_SIZE 1024
+
+
+// Shared memory area used to exchange parameters between application and mediaserver
+// process.
+struct effect_param_cblk_t
+{
+                Mutex       lock;
+    volatile    uint32_t    clientIndex;    // Current read/write index for application
+    volatile    uint32_t    serverIndex;    // Current read/write index for mediaserver
+                uint8_t*    buffer;         // start of parameter buffer
+
+                effect_param_cblk_t()
+                    : lock(Mutex::SHARED), clientIndex(0), serverIndex(0) {}
+};
+
+
+// ----------------------------------------------------------------------------
+
+}; // namespace android
+
+#endif // ANDROID_EFFECTCBASESHARED_H
diff --git a/include/private/media/AudioTrackShared.h b/include/private/media/AudioTrackShared.h
index 8e2db20..1510f87 100644
--- a/include/private/media/AudioTrackShared.h
+++ b/include/private/media/AudioTrackShared.h
@@ -32,6 +32,18 @@
 #define MAX_RUN_TIMEOUT_MS      1000
 #define WAIT_PERIOD_MS          10
 
+#define CBLK_UNDERRUN_MSK       0x0001
+#define CBLK_UNDERRUN_ON        0x0001  // underrun (out) or overrrun (in) indication
+#define CBLK_UNDERRUN_OFF       0x0000  // no underrun
+#define CBLK_DIRECTION_MSK      0x0002
+#define CBLK_DIRECTION_OUT      0x0002  // this cblk is for an AudioTrack
+#define CBLK_DIRECTION_IN       0x0000  // this cblk is for an AudioRecord
+#define CBLK_FORCEREADY_MSK     0x0004
+#define CBLK_FORCEREADY_ON      0x0004  // track is considered ready immediately by AudioFlinger
+#define CBLK_FORCEREADY_OFF     0x0000  // track is ready when buffer full
+#define CBLK_INVALID_MSK        0x0008
+#define CBLK_INVALID_ON         0x0008  // track buffer is invalidated by AudioFlinger: must be re-created
+#define CBLK_INVALID_OFF        0x0000
 
 struct audio_track_cblk_t
 {
@@ -44,12 +56,12 @@
     volatile    uint32_t    server;
                 uint32_t    userBase;
                 uint32_t    serverBase;
-    void*       buffers;
-    uint32_t    frameCount;
-    // Cache line boundary
-    uint32_t    loopStart;
-    uint32_t    loopEnd;
-    int         loopCount;
+                void*       buffers;
+                uint32_t    frameCount;
+                // Cache line boundary
+                uint32_t    loopStart;
+                uint32_t    loopEnd;
+                int         loopCount;
     volatile    union {
                     uint16_t    volume[2];
                     uint32_t    volumeLR;
@@ -58,15 +70,17 @@
                 // NOTE: audio_track_cblk_t::frameSize is not equal to AudioTrack::frameSize() for
                 // 8 bit PCM data: in this case,  mCblk->frameSize is based on a sample size of
                 // 16 bit because data is converted to 16 bit before being stored in buffer
-                uint32_t    frameSize;
-                uint8_t     channels;
-                uint8_t     flowControlFlag; // underrun (out) or overrrun (in) indication
-                uint8_t     out;        // out equals 1 for AudioTrack and 0 for AudioRecord
-                uint8_t     forceReady;
+
+                uint8_t     frameSize;
+                uint8_t     channelCount;
+                uint16_t    flags;
+
                 uint16_t    bufferTimeoutMs; // Maximum cumulated timeout before restarting audioflinger
                 uint16_t    waitTimeMs;      // Cumulated wait time
-                // Cache line boundary (32 bytes)
 
+                uint16_t    sendLevel;
+                uint16_t    reserved;
+                // Cache line boundary (32 bytes)
                             audio_track_cblk_t();
                 uint32_t    stepUser(uint32_t frameCount);
                 bool        stepServer(uint32_t frameCount);
diff --git a/include/private/surfaceflinger/SharedBufferStack.h b/include/private/surfaceflinger/SharedBufferStack.h
index 9b5a1e0..633b543 100644
--- a/include/private/surfaceflinger/SharedBufferStack.h
+++ b/include/private/surfaceflinger/SharedBufferStack.h
@@ -43,24 +43,9 @@
  * unless they are in use by the server, which is only the case for the last 
  * dequeue-able buffer. When these various conditions are not met, the caller
  * waits until the condition is met.
- *
- * 
- * CAVEATS:
- * 
- * In the current implementation there are several limitations:
- * - buffers must be locked in the same order they've been dequeued
- * - buffers must be enqueued in the same order they've been locked
- * - dequeue() is not reentrant
- * - no error checks are done on the condition above
  * 
  */
 
-// When changing these values, the COMPILE_TIME_ASSERT at the end of this
-// file need to be updated.
-const unsigned int NUM_LAYERS_MAX  = 31;
-const unsigned int NUM_BUFFER_MAX  = 4;
-const unsigned int NUM_DISPLAY_MAX = 4;
-
 // ----------------------------------------------------------------------------
 
 class Region;
@@ -69,7 +54,11 @@
 
 // ----------------------------------------------------------------------------
 
-// should be 128 bytes (32 longs)
+// 4 * (11 + 7 + (1 + 2*NUM_RECT_MAX) * NUM_BUFFER_MAX) * NUM_LAYERS_MAX
+// 4 * (11 + 7 + (1 + 2*7)*16) * 31
+// 1032 * 31
+// = ~27 KiB (31992)
+
 class SharedBufferStack
 {
     friend class SharedClient;
@@ -78,21 +67,38 @@
     friend class SharedBufferServer;
 
 public:
-    struct FlatRegion { // 12 bytes
-        static const unsigned int NUM_RECT_MAX = 1;
-        uint32_t    count;
-        uint16_t    rects[4*NUM_RECT_MAX];
-    };
-    
+    // When changing these values, the COMPILE_TIME_ASSERT at the end of this
+    // file need to be updated.
+    static const unsigned int NUM_LAYERS_MAX  = 31;
+    static const unsigned int NUM_BUFFER_MAX  = 16;
+    static const unsigned int NUM_BUFFER_MIN  = 2;
+    static const unsigned int NUM_DISPLAY_MAX = 4;
+
     struct Statistics { // 4 longs
         typedef int32_t usecs_t;
         usecs_t  totalTime;
         usecs_t  reserved[3];
     };
+
+    struct SmallRect {
+        uint16_t l, t, r, b;
+    };
+
+    struct FlatRegion { // 52 bytes = 4 * (1 + 2*N)
+        static const unsigned int NUM_RECT_MAX = 6;
+        uint32_t    count;
+        SmallRect   rects[NUM_RECT_MAX];
+    };
+    
+    struct BufferData {
+        FlatRegion dirtyRegion;
+        SmallRect  crop;
+    };
     
     SharedBufferStack();
     void init(int32_t identity);
     status_t setDirtyRegion(int buffer, const Region& reg);
+    status_t setCrop(int buffer, const Rect& reg);
     Region getDirtyRegion(int buffer) const;
 
     // these attributes are part of the conditions/updates
@@ -104,24 +110,25 @@
 
     // not part of the conditions
     volatile int32_t reallocMask;
+    volatile int8_t index[NUM_BUFFER_MAX];
 
     int32_t     identity;       // surface's identity (const)
-    int32_t     reserved32[9];
+    int32_t     token;          // surface's token (for debugging)
+    int32_t     reserved32[1];
     Statistics  stats;
-    FlatRegion  dirtyRegion[NUM_BUFFER_MAX];    // 12*4=48 bytes
+    int32_t     reserved;
+    BufferData  buffers[NUM_BUFFER_MAX];     // 960 bytes
 };
 
 // ----------------------------------------------------------------------------
 
-// 4 KB max
+// 32 KB max
 class SharedClient
 {
 public:
     SharedClient();
     ~SharedClient();
-
     status_t validate(size_t token) const;
-    uint32_t getIdentity(size_t token) const;
 
 private:
     friend class SharedBufferBase;
@@ -131,7 +138,7 @@
     // FIXME: this should be replaced by a lock-less primitive
     Mutex lock;
     Condition cv;
-    SharedBufferStack surfaces[ NUM_LAYERS_MAX ];
+    SharedBufferStack surfaces[ SharedBufferStack::NUM_LAYERS_MAX ];
 };
 
 // ============================================================================
@@ -139,18 +146,17 @@
 class SharedBufferBase
 {
 public:
-    SharedBufferBase(SharedClient* sharedClient, int surface, int num,
+    SharedBufferBase(SharedClient* sharedClient, int surface,
             int32_t identity);
     ~SharedBufferBase();
-    uint32_t getIdentity();
     status_t getStatus() const;
+    int32_t getIdentity() const;
     size_t getFrontBuffer() const;
     String8 dump(char const* prefix) const;
 
 protected:
     SharedClient* const mSharedClient;
     SharedBufferStack* const mSharedStack;
-    const int mNumBuffers;
     const int mIdentity;
 
     friend struct Update;
@@ -160,61 +166,22 @@
         SharedBufferStack& stack;
         inline ConditionBase(SharedBufferBase* sbc) 
             : stack(*sbc->mSharedStack) { }
+        virtual ~ConditionBase() { };
+        virtual bool operator()() const = 0;
+        virtual const char* name() const = 0;
     };
+    status_t waitForCondition(const ConditionBase& condition);
 
     struct UpdateBase {
         SharedBufferStack& stack;
         inline UpdateBase(SharedBufferBase* sbb) 
             : stack(*sbb->mSharedStack) { }
     };
-
-    template <typename T>
-    status_t waitForCondition(T condition);
-
     template <typename T>
     status_t updateCondition(T update);
 };
 
 template <typename T>
-status_t SharedBufferBase::waitForCondition(T condition) 
-{
-    const SharedBufferStack& stack( *mSharedStack );
-    SharedClient& client( *mSharedClient );
-    const nsecs_t TIMEOUT = s2ns(1);
-    Mutex::Autolock _l(client.lock);
-    while ((condition()==false) &&
-            (stack.identity == mIdentity) &&
-            (stack.status == NO_ERROR))
-    {
-        status_t err = client.cv.waitRelative(client.lock, TIMEOUT);
-        
-        // handle errors and timeouts
-        if (CC_UNLIKELY(err != NO_ERROR)) {
-            if (err == TIMED_OUT) {
-                if (condition()) {
-                    LOGE("waitForCondition(%s) timed out (identity=%d), "
-                        "but condition is true! We recovered but it "
-                        "shouldn't happen." , T::name(),
-                        stack.identity);
-                    break;
-                } else {
-                    LOGW("waitForCondition(%s) timed out "
-                        "(identity=%d, status=%d). "
-                        "CPU may be pegged. trying again.", T::name(),
-                        stack.identity, stack.status);
-                }
-            } else {
-                LOGE("waitForCondition(%s) error (%s) ",
-                        T::name(), strerror(-err));
-                return err;
-            }
-        }
-    }
-    return (stack.identity != mIdentity) ? status_t(BAD_INDEX) : stack.status;
-}
-
-
-template <typename T>
 status_t SharedBufferBase::updateCondition(T update) {
     SharedClient& client( *mSharedClient );
     Mutex::Autolock _l(client.lock);
@@ -238,13 +205,21 @@
     status_t queue(int buf);
     bool needNewBuffer(int buffer) const;
     status_t setDirtyRegion(int buffer, const Region& reg);
+    status_t setCrop(int buffer, const Rect& reg);
     
+
+    class SetBufferCountCallback {
+        friend class SharedBufferClient;
+        virtual status_t operator()(int bufferCount) const = 0;
+    protected:
+        virtual ~SetBufferCountCallback() { }
+    };
+    status_t setBufferCount(int bufferCount, const SetBufferCountCallback& ipc);
+
 private:
     friend struct Condition;
     friend struct DequeueCondition;
     friend struct LockCondition;
-    
-    int32_t computeTail() const;
 
     struct QueueUpdate : public UpdateBase {
         inline QueueUpdate(SharedBufferBase* sbb);
@@ -260,25 +235,34 @@
 
     struct DequeueCondition : public ConditionBase {
         inline DequeueCondition(SharedBufferClient* sbc);
-        inline bool operator()();
-        static inline const char* name() { return "DequeueCondition"; }
+        inline bool operator()() const;
+        inline const char* name() const { return "DequeueCondition"; }
     };
 
     struct LockCondition : public ConditionBase {
         int buf;
         inline LockCondition(SharedBufferClient* sbc, int buf);
-        inline bool operator()();
-        static inline const char* name() { return "LockCondition"; }
+        inline bool operator()() const;
+        inline const char* name() const { return "LockCondition"; }
     };
 
+    int32_t computeTail() const;
+
+    mutable RWLock mLock;
+    int mNumBuffers;
+
     int32_t tail;
+    int32_t undoDequeueTail;
+    int32_t queued_head;
     // statistics...
-    nsecs_t mDequeueTime[NUM_BUFFER_MAX];
+    nsecs_t mDequeueTime[SharedBufferStack::NUM_BUFFER_MAX];
 };
 
 // ----------------------------------------------------------------------------
 
-class SharedBufferServer : public SharedBufferBase
+class SharedBufferServer
+    : public SharedBufferBase,
+      public LightRefBase<SharedBufferServer>
 {
 public:
     SharedBufferServer(SharedClient* sharedClient, int surface, int num,
@@ -287,16 +271,74 @@
     ssize_t retireAndLock();
     status_t unlock(int buffer);
     void setStatus(status_t status);
-    status_t reallocate();
+    status_t reallocateAll();
+    status_t reallocateAllExcept(int buffer);
     status_t assertReallocate(int buffer);
     int32_t getQueuedCount() const;
-    
     Region getDirtyRegion(int buffer) const;
 
+    status_t resize(int newNumBuffers);
+
     SharedBufferStack::Statistics getStats() const;
     
 
 private:
+    friend class LightRefBase<SharedBufferServer>;
+    ~SharedBufferServer();
+
+    /*
+     * BufferList is basically a fixed-capacity sorted-vector of
+     * unsigned 5-bits ints using a 32-bits int as storage.
+     * it has efficient iterators to find items in the list and not in the list.
+     */
+    class BufferList {
+        size_t mCapacity;
+        uint32_t mList;
+    public:
+        BufferList(size_t c = SharedBufferStack::NUM_BUFFER_MAX)
+            : mCapacity(c), mList(0) { }
+        status_t add(int value);
+        status_t remove(int value);
+        uint32_t getMask() const { return mList; }
+
+        class const_iterator {
+            friend class BufferList;
+            uint32_t mask, curr;
+            const_iterator(uint32_t mask) :
+                mask(mask), curr(__builtin_clz(mask)) {
+            }
+        public:
+            inline bool operator == (const const_iterator& rhs) const {
+                return mask == rhs.mask;
+            }
+            inline bool operator != (const const_iterator& rhs) const {
+                return mask != rhs.mask;
+            }
+            inline int operator *() const { return curr; }
+            inline const const_iterator& operator ++() {
+                mask &= ~(1<<(31-curr));
+                curr = __builtin_clz(mask);
+                return *this;
+            }
+        };
+
+        inline const_iterator begin() const {
+            return const_iterator(mList);
+        }
+        inline const_iterator end() const   {
+            return const_iterator(0);
+        }
+        inline const_iterator free_begin() const {
+            uint32_t mask = (1 << (32-mCapacity)) - 1;
+            return const_iterator( ~(mList | mask) );
+        }
+    };
+
+    // this protects mNumBuffers and mBufferList
+    mutable RWLock mLock;
+    int mNumBuffers;
+    BufferList mBufferList;
+
     struct UnlockUpdate : public UpdateBase {
         const int lockedBuffer;
         inline UnlockUpdate(SharedBufferBase* sbb, int lockedBuffer);
@@ -318,8 +360,8 @@
     struct ReallocateCondition : public ConditionBase {
         int buf;
         inline ReallocateCondition(SharedBufferBase* sbb, int buf);
-        inline bool operator()();
-        static inline const char* name() { return "ReallocateCondition"; }
+        inline bool operator()() const;
+        inline const char* name() const { return "ReallocateCondition"; }
     };
 };
 
@@ -344,13 +386,12 @@
     uint8_t         connected;
     uint8_t         reserved[3];
     uint32_t        pad[7];
-    display_cblk_t  displays[NUM_DISPLAY_MAX];
+    display_cblk_t  displays[SharedBufferStack::NUM_DISPLAY_MAX];
 };
 
 // ---------------------------------------------------------------------------
 
-COMPILE_TIME_ASSERT(sizeof(SharedClient) <= 4096)
-COMPILE_TIME_ASSERT(sizeof(SharedBufferStack) == 128)
+COMPILE_TIME_ASSERT(sizeof(SharedClient) <= 32768)
 COMPILE_TIME_ASSERT(sizeof(surface_flinger_cblk_t) <= 4096)
 
 // ---------------------------------------------------------------------------
diff --git a/include/surfaceflinger/ISurface.h b/include/surfaceflinger/ISurface.h
index 472f759..ddbe03d 100644
--- a/include/surfaceflinger/ISurface.h
+++ b/include/surfaceflinger/ISurface.h
@@ -47,13 +47,30 @@
         POST_BUFFER, // one-way transaction
         CREATE_OVERLAY,
         REQUEST_BUFFER,
+        SET_BUFFER_COUNT,
     };
 
 public: 
     DECLARE_META_INTERFACE(Surface);
 
-    virtual sp<GraphicBuffer> requestBuffer(int bufferIdx, int usage) = 0; 
+    /*
+     * requests a new buffer for the given index. If w, h, or format are
+     * null the buffer is created with the parameters assigned to the
+     * surface it is bound to. Otherwise the buffer's parameters are
+     * set to those specified.
+     */
+    virtual sp<GraphicBuffer> requestBuffer(int bufferIdx,
+            uint32_t w, uint32_t h, uint32_t format, uint32_t usage) = 0;
+
+    /*
+     * sets the number of buffers dequeuable for this surface.
+     */
+    virtual status_t setBufferCount(int bufferCount) = 0;
     
+    // ------------------------------------------------------------------------
+    // Deprecated...
+    // ------------------------------------------------------------------------
+
     class BufferHeap {
     public:
         enum {
diff --git a/include/surfaceflinger/ISurfaceComposer.h b/include/surfaceflinger/ISurfaceComposer.h
index d1e7785..dd44aa5 100644
--- a/include/surfaceflinger/ISurfaceComposer.h
+++ b/include/surfaceflinger/ISurfaceComposer.h
@@ -27,7 +27,7 @@
 
 #include <ui/PixelFormat.h>
 
-#include <surfaceflinger/ISurfaceFlingerClient.h>
+#include <surfaceflinger/ISurfaceComposerClient.h>
 
 namespace android {
 // ----------------------------------------------------------------------------
@@ -85,8 +85,11 @@
     /* create connection with surface flinger, requires
      * ACCESS_SURFACE_FLINGER permission
      */
+    virtual sp<ISurfaceComposerClient> createConnection() = 0;
 
-    virtual sp<ISurfaceFlingerClient> createConnection() = 0;
+    /* create a client connection with surface flinger
+     */
+    virtual sp<ISurfaceComposerClient> createClientConnection() = 0;
 
     /* retrieve the control block */
     virtual sp<IMemoryHeap> getCblk() const = 0;
@@ -123,6 +126,7 @@
         // Java by ActivityManagerService.
         BOOT_FINISHED = IBinder::FIRST_CALL_TRANSACTION,
         CREATE_CONNECTION,
+        CREATE_CLIENT_CONNECTION,
         GET_CBLK,
         OPEN_GLOBAL_TRANSACTION,
         CLOSE_GLOBAL_TRANSACTION,
diff --git a/include/surfaceflinger/ISurfaceComposerClient.h b/include/surfaceflinger/ISurfaceComposerClient.h
new file mode 100644
index 0000000..a1e9e04
--- /dev/null
+++ b/include/surfaceflinger/ISurfaceComposerClient.h
@@ -0,0 +1,101 @@
+/*
+ * Copyright (C) 2007 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef ANDROID_SF_ISURFACE_COMPOSER_CLIENT_H
+#define ANDROID_SF_ISURFACE_COMPOSER_CLIENT_H
+
+#include <stdint.h>
+#include <sys/types.h>
+
+#include <utils/Errors.h>
+#include <utils/RefBase.h>
+
+#include <binder/IInterface.h>
+
+#include <ui/PixelFormat.h>
+
+#include <surfaceflinger/ISurface.h>
+
+namespace android {
+
+// ----------------------------------------------------------------------------
+
+class IMemoryHeap;
+
+typedef int32_t    ClientID;
+typedef int32_t    DisplayID;
+
+// ----------------------------------------------------------------------------
+
+class layer_state_t;
+
+class ISurfaceComposerClient : public IInterface
+{
+public:
+    DECLARE_META_INTERFACE(SurfaceComposerClient);
+
+    struct surface_data_t {
+        int32_t             token;
+        int32_t             identity;
+        uint32_t            width;
+        uint32_t            height;
+        uint32_t            format;
+        status_t readFromParcel(const Parcel& parcel);
+        status_t writeToParcel(Parcel* parcel) const;
+    };
+
+    virtual sp<IMemoryHeap> getControlBlock() const = 0;
+    virtual ssize_t getTokenForSurface(const sp<ISurface>& sur) const = 0;
+
+    /*
+     * Requires ACCESS_SURFACE_FLINGER permission
+     */
+    virtual sp<ISurface> createSurface( surface_data_t* data,
+                                        int pid,
+                                        const String8& name,
+                                        DisplayID display,
+                                        uint32_t w,
+                                        uint32_t h,
+                                        PixelFormat format,
+                                        uint32_t flags) = 0;
+
+    /*
+     * Requires ACCESS_SURFACE_FLINGER permission
+     */
+    virtual status_t    destroySurface(SurfaceID sid) = 0;
+
+    /*
+     * Requires ACCESS_SURFACE_FLINGER permission
+     */
+    virtual status_t    setState(int32_t count, const layer_state_t* states) = 0;
+};
+
+// ----------------------------------------------------------------------------
+
+class BnSurfaceComposerClient : public BnInterface<ISurfaceComposerClient>
+{
+public:
+    virtual status_t    onTransact( uint32_t code,
+                                    const Parcel& data,
+                                    Parcel* reply,
+                                    uint32_t flags = 0);
+};
+
+// ----------------------------------------------------------------------------
+
+}; // namespace android
+
+#endif // ANDROID_SF_ISURFACE_COMPOSER_CLIENT_H
diff --git a/include/surfaceflinger/ISurfaceFlingerClient.h b/include/surfaceflinger/ISurfaceFlingerClient.h
deleted file mode 100644
index d257645..0000000
--- a/include/surfaceflinger/ISurfaceFlingerClient.h
+++ /dev/null
@@ -1,91 +0,0 @@
-/*
- * Copyright (C) 2007 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#ifndef ANDROID_SF_ISURFACE_FLINGER_CLIENT_H
-#define ANDROID_SF_ISURFACE_FLINGER_CLIENT_H
-
-#include <stdint.h>
-#include <sys/types.h>
-
-#include <utils/Errors.h>
-#include <utils/RefBase.h>
-
-#include <binder/IInterface.h>
-
-#include <ui/PixelFormat.h>
-  
-#include <surfaceflinger/ISurface.h>
-
-namespace android {
-
-// ----------------------------------------------------------------------------
-
-class IMemoryHeap;
-
-typedef int32_t    ClientID;
-typedef int32_t    DisplayID;
-
-// ----------------------------------------------------------------------------
-
-class layer_state_t;
-
-class ISurfaceFlingerClient : public IInterface
-{
-public: 
-    DECLARE_META_INTERFACE(SurfaceFlingerClient);
-
-    struct surface_data_t {
-        int32_t             token;
-        int32_t             identity;
-        uint32_t            width;
-        uint32_t            height;
-        uint32_t            format;
-        status_t readFromParcel(const Parcel& parcel);
-        status_t writeToParcel(Parcel* parcel) const;
-    };
-    
-    virtual sp<IMemoryHeap> getControlBlock() const = 0;
-
-    virtual sp<ISurface> createSurface( surface_data_t* data,
-                                        int pid, 
-                                        const String8& name,
-                                        DisplayID display,
-                                        uint32_t w,
-                                        uint32_t h,
-                                        PixelFormat format,
-                                        uint32_t flags) = 0;
-                                    
-    virtual status_t    destroySurface(SurfaceID sid) = 0;
-
-    virtual status_t    setState(int32_t count, const layer_state_t* states) = 0;
-};
-
-// ----------------------------------------------------------------------------
-
-class BnSurfaceFlingerClient : public BnInterface<ISurfaceFlingerClient>
-{
-public:
-    virtual status_t    onTransact( uint32_t code,
-                                    const Parcel& data,
-                                    Parcel* reply,
-                                    uint32_t flags = 0);
-};
-
-// ----------------------------------------------------------------------------
-
-}; // namespace android
-
-#endif // ANDROID_SF_ISURFACE_FLINGER_CLIENT_H
diff --git a/include/surfaceflinger/Surface.h b/include/surfaceflinger/Surface.h
index 0279d84..294c867 100644
--- a/include/surfaceflinger/Surface.h
+++ b/include/surfaceflinger/Surface.h
@@ -20,6 +20,7 @@
 #include <stdint.h>
 #include <sys/types.h>
 
+#include <utils/KeyedVector.h>
 #include <utils/RefBase.h>
 #include <utils/threads.h>
 
@@ -28,12 +29,15 @@
 #include <ui/egl/android_natives.h>
 
 #include <surfaceflinger/ISurface.h>
-#include <surfaceflinger/ISurfaceFlingerClient.h>
+#include <surfaceflinger/ISurfaceComposerClient.h>
+
+#define ANDROID_VIEW_SURFACE_JNI_ID    "mNativeSurface"
 
 namespace android {
 
 // ---------------------------------------------------------------------------
 
+class GraphicBuffer;
 class GraphicBufferMapper;
 class IOMX;
 class Rect;
@@ -41,6 +45,7 @@
 class SurfaceComposerClient;
 class SharedClient;
 class SharedBufferClient;
+class SurfaceClient;
 
 // ---------------------------------------------------------------------------
 
@@ -56,7 +61,6 @@
     static bool isSameSurface(
             const sp<SurfaceControl>& lhs, const sp<SurfaceControl>& rhs);
         
-    SurfaceID   ID() const      { return mToken; }
     uint32_t    getFlags() const { return mFlags; }
     uint32_t    getIdentity() const { return mIdentity; }
 
@@ -104,7 +108,7 @@
     SurfaceControl(
             const sp<SurfaceComposerClient>& client,
             const sp<ISurface>& surface,
-            const ISurfaceFlingerClient::surface_data_t& data,
+            const ISurfaceComposerClient::surface_data_t& data,
             uint32_t w, uint32_t h, PixelFormat format, uint32_t flags);
 
     ~SurfaceControl();
@@ -128,7 +132,7 @@
 // ---------------------------------------------------------------------------
 
 class Surface 
-    : public EGLNativeBase<android_native_window_t, Surface, RefBase>
+    : public EGLNativeBase<ANativeWindow, Surface, RefBase>
 {
 public:
     struct SurfaceInfo {
@@ -141,17 +145,16 @@
         uint32_t    reserved[2];
     };
 
-    Surface(const Parcel& data);
+    static status_t writeToParcel(
+            const sp<Surface>& control, Parcel* parcel);
+
+    static sp<Surface> readFromParcel(const Parcel& data);
 
     static bool isValid(const sp<Surface>& surface) {
         return (surface != 0) && surface->isValid();
     }
 
-    static bool isSameSurface(
-            const sp<Surface>& lhs, const sp<Surface>& rhs);
-
     bool        isValid();
-    SurfaceID   ID() const          { return mToken; }
     uint32_t    getFlags() const    { return mFlags; }
     uint32_t    getIdentity() const { return mIdentity; }
 
@@ -163,44 +166,43 @@
     // setSwapRectangle() is intended to be used by GL ES clients
     void        setSwapRectangle(const Rect& r);
 
+
 private:
-    // can't be copied
-    Surface& operator = (Surface& rhs);
-    Surface(const Surface& rhs);
-
-    Surface(const sp<SurfaceControl>& control);
-    void init();
-     ~Surface();
-  
-    friend class SurfaceComposerClient;
-    friend class SurfaceControl;
-
-    
+    /*
+     * Android frameworks friends
+     * (eventually this should go away and be replaced by proper APIs)
+     */
     // camera and camcorder need access to the ISurface binder interface for preview
     friend class Camera;
     friend class MediaRecorder;
-    // mediaplayer needs access to ISurface for display
+    // MediaPlayer needs access to ISurface for display
     friend class MediaPlayer;
     friend class IOMX;
     // this is just to be able to write some unit tests
     friend class Test;
 
-    sp<SurfaceComposerClient> getClient() const;
-    sp<ISurface> getISurface() const;
+private:
+    friend class SurfaceComposerClient;
+    friend class SurfaceControl;
 
-    status_t getBufferLocked(int index, int usage);
-   
-           status_t validate() const;
+    // can't be copied
+    Surface& operator = (Surface& rhs);
+    Surface(const Surface& rhs);
 
-    inline const GraphicBufferMapper& getBufferMapper() const { return mBufferMapper; }
-    inline GraphicBufferMapper& getBufferMapper() { return mBufferMapper; }
-    
-    static int setSwapInterval(android_native_window_t* window, int interval);
-    static int dequeueBuffer(android_native_window_t* window, android_native_buffer_t** buffer);
-    static int lockBuffer(android_native_window_t* window, android_native_buffer_t* buffer);
-    static int queueBuffer(android_native_window_t* window, android_native_buffer_t* buffer);
-    static int query(android_native_window_t* window, int what, int* value);
-    static int perform(android_native_window_t* window, int operation, ...);
+    Surface(const sp<SurfaceControl>& control);
+    Surface(const Parcel& data, const sp<IBinder>& ref);
+    ~Surface();
+
+
+    /*
+     *  ANativeWindow hooks
+     */
+    static int setSwapInterval(ANativeWindow* window, int interval);
+    static int dequeueBuffer(ANativeWindow* window, android_native_buffer_t** buffer);
+    static int lockBuffer(ANativeWindow* window, android_native_buffer_t* buffer);
+    static int queueBuffer(ANativeWindow* window, android_native_buffer_t* buffer);
+    static int query(ANativeWindow* window, int what, int* value);
+    static int perform(ANativeWindow* window, int operation, ...);
 
     int dequeueBuffer(android_native_buffer_t** buffer);
     int lockBuffer(android_native_buffer_t* buffer);
@@ -208,44 +210,88 @@
     int query(int what, int* value);
     int perform(int operation, va_list args);
 
-    status_t dequeueBuffer(sp<GraphicBuffer>* buffer);
-
     void dispatch_setUsage(va_list args);
     int  dispatch_connect(va_list args);
     int  dispatch_disconnect(va_list args);
+    int  dispatch_crop(va_list args);
+    int  dispatch_set_buffer_count(va_list args);
+    int  dispatch_set_buffers_geometry(va_list args);
     
     void setUsage(uint32_t reqUsage);
     int  connect(int api);
     int  disconnect(int api);
+    int  crop(Rect const* rect);
+    int  setBufferCount(int bufferCount);
+    int  setBuffersGeometry(int w, int h, int format);
 
-    uint32_t getUsage() const;
-    int      getConnectedApi() const;
+    /*
+     *  private stuff...
+     */
+    void init();
+    status_t validate() const;
+    sp<ISurface> getISurface() const;
+
+    inline const GraphicBufferMapper& getBufferMapper() const { return mBufferMapper; }
+    inline GraphicBufferMapper& getBufferMapper() { return mBufferMapper; }
+
+    status_t getBufferLocked(int index,
+            uint32_t w, uint32_t h, uint32_t format, uint32_t usage);
+    int getBufferIndex(const sp<GraphicBuffer>& buffer) const;
+
+    int getConnectedApi() const;
     
+    bool needNewBuffer(int bufIdx,
+            uint32_t *pWidth, uint32_t *pHeight,
+            uint32_t *pFormat, uint32_t *pUsage) const;
+
+    static void cleanCachedSurfaces();
+
+    class BufferInfo {
+        uint32_t mWidth;
+        uint32_t mHeight;
+        uint32_t mFormat;
+        uint32_t mUsage;
+        mutable uint32_t mDirty;
+        enum {
+            GEOMETRY = 0x01
+        };
+    public:
+        BufferInfo();
+        void set(uint32_t w, uint32_t h, uint32_t format);
+        void set(uint32_t usage);
+        void get(uint32_t *pWidth, uint32_t *pHeight,
+                uint32_t *pFormat, uint32_t *pUsage) const;
+        bool validateBuffer(const sp<GraphicBuffer>& buffer) const;
+    };
+
     // constants
-    sp<SurfaceComposerClient>   mClient;
+    GraphicBufferMapper&        mBufferMapper;
+    SurfaceClient&              mClient;
+    SharedBufferClient*         mSharedBufferClient;
+    status_t                    mInitCheck;
     sp<ISurface>                mSurface;
-    SurfaceID                   mToken;
     uint32_t                    mIdentity;
     PixelFormat                 mFormat;
     uint32_t                    mFlags;
-    GraphicBufferMapper&        mBufferMapper;
-    SharedBufferClient*         mSharedBufferClient;
 
     // protected by mSurfaceLock
     Rect                        mSwapRectangle;
-    uint32_t                    mUsage;
     int                         mConnected;
+    Rect                        mNextBufferCrop;
+    BufferInfo                  mBufferInfo;
     
     // protected by mSurfaceLock. These are also used from lock/unlock
     // but in that case, they must be called form the same thread.
-    sp<GraphicBuffer>           mBuffers[2];
     mutable Region              mDirtyRegion;
 
     // must be used from the lock/unlock thread
     sp<GraphicBuffer>           mLockedBuffer;
     sp<GraphicBuffer>           mPostedBuffer;
     mutable Region              mOldDirtyRegion;
-    bool                        mNeedFullUpdate;
+    bool                        mReserved;
+
+    // only used from dequeueBuffer()
+    Vector< sp<GraphicBuffer> > mBuffers;
 
     // query() must be called from dequeueBuffer() thread
     uint32_t                    mWidth;
@@ -254,6 +300,10 @@
     // Inherently thread-safe
     mutable Mutex               mSurfaceLock;
     mutable Mutex               mApiLock;
+
+    // A cache of Surface objects that have been deserialized into this process.
+    static Mutex sCachedSurfacesLock;
+    static DefaultKeyedVector<wp<IBinder>, wp<Surface> > sCachedSurfaces;
 };
 
 }; // namespace android
diff --git a/include/surfaceflinger/SurfaceComposerClient.h b/include/surfaceflinger/SurfaceComposerClient.h
index 9d0f0cbe..8773d71 100644
--- a/include/surfaceflinger/SurfaceComposerClient.h
+++ b/include/surfaceflinger/SurfaceComposerClient.h
@@ -22,8 +22,9 @@
 
 #include <binder/IBinder.h>
 
-#include <utils/SortedVector.h>
 #include <utils/RefBase.h>
+#include <utils/Singleton.h>
+#include <utils/SortedVector.h>
 #include <utils/threads.h>
 
 #include <ui/PixelFormat.h>
@@ -39,8 +40,26 @@
 class SharedClient;
 class ISurfaceComposer;
 class DisplayInfo;
+class surface_flinger_cblk_t;
 
-class SurfaceComposerClient : virtual public RefBase
+// ---------------------------------------------------------------------------
+
+class ComposerService : public Singleton<ComposerService>
+{
+    // these are constants
+    sp<ISurfaceComposer> mComposerService;
+    sp<IMemoryHeap> mServerCblkMemory;
+    surface_flinger_cblk_t volatile* mServerCblk;
+    ComposerService();
+    friend class Singleton<ComposerService>;
+public:
+    static sp<ISurfaceComposer> getComposerService();
+    static surface_flinger_cblk_t const volatile * getControlBlock();
+};
+
+// ---------------------------------------------------------------------------
+
+class SurfaceComposerClient : public RefBase
 {
 public:    
                 SurfaceComposerClient();
@@ -52,10 +71,6 @@
     // Return the connection of this client
     sp<IBinder> connection() const;
     
-    // Retrieve a client for an existing connection.
-    static sp<SurfaceComposerClient>
-                clientForConnection(const sp<IBinder>& conn);
-
     // Forcibly remove connection before all references have gone away.
     void        dispose();
 
@@ -123,13 +138,6 @@
     status_t linkToComposerDeath(const sp<IBinder::DeathRecipient>& recipient,
             void* cookie = NULL, uint32_t flags = 0);
 
-private:
-    friend class Surface;
-    friend class SurfaceControl;
-    
-    SurfaceComposerClient(const sp<ISurfaceComposer>& sm, 
-            const sp<IBinder>& conn);
-
     status_t    hide(SurfaceID id);
     status_t    show(SurfaceID id, int32_t layer = -1);
     status_t    freeze(SurfaceID id);
@@ -142,32 +150,26 @@
     status_t    setMatrix(SurfaceID id, float dsdx, float dtdx, float dsdy, float dtdy);
     status_t    setPosition(SurfaceID id, int32_t x, int32_t y);
     status_t    setSize(SurfaceID id, uint32_t w, uint32_t h);
-    
-    void        signalServer();
-
     status_t    destroySurface(SurfaceID sid);
 
-    void        _init(const sp<ISurfaceComposer>& sm,
-                    const sp<ISurfaceFlingerClient>& conn);
-
-    inline layer_state_t*   _get_state_l(SurfaceID id);
-    layer_state_t*          _lockLayerState(SurfaceID id);
-    inline void             _unlockLayerState();
+private:
+    virtual void onFirstRef();
+    inline layer_state_t*   get_state_l(SurfaceID id);
+    layer_state_t*          lockLayerState(SurfaceID id);
+    inline void             unlockLayerState();
 
     mutable     Mutex                               mLock;
-                layer_state_t*                      mPrebuiltLayerState;
                 SortedVector<layer_state_t>         mStates;
                 int32_t                             mTransactionOpen;
+                layer_state_t*                      mPrebuiltLayerState;
 
                 // these don't need to be protected because they never change
                 // after assignment
                 status_t                    mStatus;
-                SharedClient*               mControl;
-                sp<IMemoryHeap>             mControlMemory;
-                sp<ISurfaceFlingerClient>   mClient;
-                sp<ISurfaceComposer>        mSignalServer;
+                sp<ISurfaceComposerClient>  mClient;
 };
 
+// ---------------------------------------------------------------------------
 }; // namespace android
 
 #endif // ANDROID_SF_SURFACE_COMPOSER_CLIENT_H
diff --git a/include/ui/EventHub.h b/include/ui/EventHub.h
index 3b18c77..5be17d3 100644
--- a/include/ui/EventHub.h
+++ b/include/ui/EventHub.h
@@ -18,6 +18,7 @@
 #ifndef _RUNTIME_EVENT_HUB_H
 #define _RUNTIME_EVENT_HUB_H
 
+#include <android/input.h>
 #include <utils/String8.h>
 #include <utils/threads.h>
 #include <utils/Log.h>
@@ -27,6 +28,31 @@
 
 #include <linux/input.h>
 
+/* These constants are not defined in linux/input.h but they are part of the multitouch
+ * input protocol. */
+
+#define ABS_MT_TOUCH_MAJOR 0x30  /* Major axis of touching ellipse */
+#define ABS_MT_TOUCH_MINOR 0x31  /* Minor axis (omit if circular) */
+#define ABS_MT_WIDTH_MAJOR 0x32  /* Major axis of approaching ellipse */
+#define ABS_MT_WIDTH_MINOR 0x33  /* Minor axis (omit if circular) */
+#define ABS_MT_ORIENTATION 0x34  /* Ellipse orientation */
+#define ABS_MT_POSITION_X 0x35   /* Center X ellipse position */
+#define ABS_MT_POSITION_Y 0x36   /* Center Y ellipse position */
+#define ABS_MT_TOOL_TYPE 0x37    /* Type of touching device (finger, pen, ...) */
+#define ABS_MT_BLOB_ID 0x38      /* Group a set of packets as a blob */
+#define ABS_MT_TRACKING_ID 0x39  /* Unique ID of initiated contact */
+#define ABS_MT_PRESSURE 0x3a     /* Pressure on contact area */
+
+#define MT_TOOL_FINGER 0 /* Identifies a finger */
+#define MT_TOOL_PEN 1    /* Identifies a pen */
+
+#define SYN_MT_REPORT 2
+
+/* Convenience constants. */
+
+#define BTN_FIRST 0x100  // first button scancode
+#define BTN_LAST 0x15f   // last button scancode
+
 struct pollfd;
 
 namespace android {
@@ -34,62 +60,127 @@
 class KeyLayoutMap;
 
 /*
- * Grand Central Station for events.  With a single call to waitEvent()
- * you can wait for:
- *  - input events from the keypad of a real device
- *  - input events and meta-events (e.g. "quit") from the simulator
- *  - synthetic events from the runtime (e.g. "URL fetch completed")
- *  - real or forged "vsync" events
- *
- * Do not instantiate this class.  Instead, call startUp().
+ * Input device classes.
  */
-class EventHub : public RefBase
-{
+enum {
+    /* The input device is a keyboard. */
+    INPUT_DEVICE_CLASS_KEYBOARD      = 0x00000001,
+
+    /* The input device is an alpha-numeric keyboard (not just a dial pad). */
+    INPUT_DEVICE_CLASS_ALPHAKEY      = 0x00000002,
+
+    /* The input device is a touchscreen (either single-touch or multi-touch). */
+    INPUT_DEVICE_CLASS_TOUCHSCREEN   = 0x00000004,
+
+    /* The input device is a trackball. */
+    INPUT_DEVICE_CLASS_TRACKBALL     = 0x00000008,
+
+    /* The input device is a multi-touch touchscreen. */
+    INPUT_DEVICE_CLASS_TOUCHSCREEN_MT= 0x00000010,
+
+    /* The input device is a directional pad. */
+    INPUT_DEVICE_CLASS_DPAD          = 0x00000020,
+
+    /* The input device is a gamepad (implies keyboard). */
+    INPUT_DEVICE_CLASS_GAMEPAD       = 0x00000040
+};
+
+/*
+ * Grand Central Station for events.
+ *
+ * The event hub aggregates input events received across all known input
+ * devices on the system, including devices that may be emulated by the simulator
+ * environment.  In addition, the event hub generates fake input events to indicate
+ * when devices are added or removed.
+ *
+ * The event hub provies a stream of input events (via the getEvent function).
+ * It also supports querying the current actual state of input devices such as identifying
+ * which keys are currently down.  Finally, the event hub keeps track of the capabilities of
+ * individual input devices, such as their class and the set of key codes that they support.
+ */
+class EventHubInterface : public virtual RefBase {
+protected:
+    EventHubInterface() { }
+    virtual ~EventHubInterface() { }
+
 public:
-    EventHub();
-    
-    status_t errorCheck() const;
-    
-    // bit fields for classes of devices.
-    enum {
-        CLASS_KEYBOARD      = 0x00000001,
-        CLASS_ALPHAKEY      = 0x00000002,
-        CLASS_TOUCHSCREEN   = 0x00000004,
-        CLASS_TRACKBALL     = 0x00000008,
-        CLASS_TOUCHSCREEN_MT= 0x00000010,
-        CLASS_DPAD          = 0x00000020
-    };
-    uint32_t getDeviceClasses(int32_t deviceId) const;
-    
-    String8 getDeviceName(int32_t deviceId) const;
-    
-    int getAbsoluteInfo(int32_t deviceId, int axis, int *outMinValue,
-            int* outMaxValue, int* outFlat, int* outFuzz) const;
-        
-    int getSwitchState(int sw) const;
-    int getSwitchState(int32_t deviceId, int sw) const;
-    
-    int getScancodeState(int key) const;
-    int getScancodeState(int32_t deviceId, int key) const;
-    
-    int getKeycodeState(int key) const;
-    int getKeycodeState(int32_t deviceId, int key) const;
-    
-    status_t scancodeToKeycode(int32_t deviceId, int scancode,
-            int32_t* outKeycode, uint32_t* outFlags) const;
-
-    // exclude a particular device from opening
-    // this can be used to ignore input devices for sensors
-    void addExcludedDevice(const char* deviceName);
-
-    // special type codes when devices are added/removed.
+    // Synthetic raw event type codes produced when devices are added or removed.
     enum {
         DEVICE_ADDED = 0x10000000,
         DEVICE_REMOVED = 0x20000000
     };
+
+    virtual uint32_t getDeviceClasses(int32_t deviceId) const = 0;
+
+    virtual String8 getDeviceName(int32_t deviceId) const = 0;
+
+    virtual int getAbsoluteInfo(int32_t deviceId, int axis, int *outMinValue,
+            int* outMaxValue, int* outFlat, int* outFuzz) const = 0;
+
+    virtual status_t scancodeToKeycode(int32_t deviceId, int scancode,
+            int32_t* outKeycode, uint32_t* outFlags) const = 0;
+
+    // exclude a particular device from opening
+    // this can be used to ignore input devices for sensors
+    virtual void addExcludedDevice(const char* deviceName) = 0;
+
+    /*
+     * Wait for the next event to become available and return it.
+     * After returning, the EventHub holds onto a wake lock until the next call to getEvent.
+     * This ensures that the device will not go to sleep while the event is being processed.
+     * If the device needs to remain awake longer than that, then the caller is responsible
+     * for taking care of it (say, by poking the power manager user activity timer).
+     */
+    virtual bool getEvent(int32_t* outDeviceId, int32_t* outType,
+            int32_t* outScancode, int32_t* outKeycode, uint32_t *outFlags,
+            int32_t* outValue, nsecs_t* outWhen) = 0;
+
+    /*
+     * Query current input state.
+     *   deviceId may be -1 to search for the device automatically, filtered by class.
+     *   deviceClasses may be -1 to ignore device class while searching.
+     */
+    virtual int32_t getScanCodeState(int32_t deviceId, int32_t deviceClasses,
+            int32_t scanCode) const = 0;
+    virtual int32_t getKeyCodeState(int32_t deviceId, int32_t deviceClasses,
+            int32_t keyCode) const = 0;
+    virtual int32_t getSwitchState(int32_t deviceId, int32_t deviceClasses,
+            int32_t sw) const = 0;
+
+    /*
+     * Examine key input devices for specific framework keycode support
+     */
+    virtual bool hasKeys(size_t numCodes, const int32_t* keyCodes,
+            uint8_t* outFlags) const = 0;
+};
+
+class EventHub : public EventHubInterface
+{
+public:
+    EventHub();
+
+    status_t errorCheck() const;
+
+    virtual uint32_t getDeviceClasses(int32_t deviceId) const;
     
-    // examine key input devices for specific framework keycode support
-    bool hasKeys(size_t numCodes, int32_t* keyCodes, uint8_t* outFlags);
+    virtual String8 getDeviceName(int32_t deviceId) const;
+    
+    virtual int getAbsoluteInfo(int32_t deviceId, int axis, int *outMinValue,
+            int* outMaxValue, int* outFlat, int* outFuzz) const;
+        
+    virtual status_t scancodeToKeycode(int32_t deviceId, int scancode,
+            int32_t* outKeycode, uint32_t* outFlags) const;
+
+    virtual void addExcludedDevice(const char* deviceName);
+
+    virtual int32_t getScanCodeState(int32_t deviceId, int32_t deviceClasses,
+            int32_t scanCode) const;
+    virtual int32_t getKeyCodeState(int32_t deviceId, int32_t deviceClasses,
+            int32_t keyCode) const;
+    virtual int32_t getSwitchState(int32_t deviceId, int32_t deviceClasses,
+            int32_t sw) const;
+
+    virtual bool hasKeys(size_t numCodes, const int32_t* keyCodes, uint8_t* outFlags) const;
 
     virtual bool getEvent(int32_t* outDeviceId, int32_t* outType,
             int32_t* outScancode, int32_t* outKeycode, uint32_t *outFlags,
@@ -126,6 +217,10 @@
     device_t* getDevice(int32_t deviceId) const;
     bool hasKeycode(device_t* device, int keycode) const;
     
+    int32_t getScanCodeStateLocked(device_t* device, int32_t scanCode) const;
+    int32_t getKeyCodeStateLocked(device_t* device, int32_t keyCode) const;
+    int32_t getSwitchStateLocked(device_t* device, int32_t sw) const;
+
     // Protect all internal state.
     mutable Mutex   mLock;
     
@@ -151,7 +246,7 @@
 
     // device ids that report particular switches.
 #ifdef EV_SW
-    int32_t         mSwitches[SW_MAX+1];
+    int32_t         mSwitches[SW_MAX + 1];
 #endif
 };
 
diff --git a/include/ui/FramebufferNativeWindow.h b/include/ui/FramebufferNativeWindow.h
index 8ea3ab9..0f4594f 100644
--- a/include/ui/FramebufferNativeWindow.h
+++ b/include/ui/FramebufferNativeWindow.h
@@ -43,7 +43,7 @@
 
 class FramebufferNativeWindow 
     : public EGLNativeBase<
-        android_native_window_t, 
+        ANativeWindow, 
         FramebufferNativeWindow, 
         LightRefBase<FramebufferNativeWindow> >
 {
@@ -59,12 +59,12 @@
 private:
     friend class LightRefBase<FramebufferNativeWindow>;    
     ~FramebufferNativeWindow(); // this class cannot be overloaded
-    static int setSwapInterval(android_native_window_t* window, int interval);
-    static int dequeueBuffer(android_native_window_t* window, android_native_buffer_t** buffer);
-    static int lockBuffer(android_native_window_t* window, android_native_buffer_t* buffer);
-    static int queueBuffer(android_native_window_t* window, android_native_buffer_t* buffer);
-    static int query(android_native_window_t* window, int what, int* value);
-    static int perform(android_native_window_t* window, int operation, ...);
+    static int setSwapInterval(ANativeWindow* window, int interval);
+    static int dequeueBuffer(ANativeWindow* window, android_native_buffer_t** buffer);
+    static int lockBuffer(ANativeWindow* window, android_native_buffer_t* buffer);
+    static int queueBuffer(ANativeWindow* window, android_native_buffer_t* buffer);
+    static int query(ANativeWindow* window, int what, int* value);
+    static int perform(ANativeWindow* window, int operation, ...);
     
     framebuffer_device_t* fbDev;
     alloc_device_t* grDev;
diff --git a/include/ui/GraphicBuffer.h b/include/ui/GraphicBuffer.h
index e72b6b3..a3e85a9 100644
--- a/include/ui/GraphicBuffer.h
+++ b/include/ui/GraphicBuffer.h
@@ -93,10 +93,8 @@
     
     void setIndex(int index);
     int getIndex() const;
-    void setVerticalStride(uint32_t vstride);
-    uint32_t getVerticalStride() const;
 
-protected:
+private:
     virtual ~GraphicBuffer();
 
     enum {
@@ -105,8 +103,12 @@
         ownData   = 2,
     };
 
-    inline const GraphicBufferMapper& getBufferMapper() const { return mBufferMapper; }
-    inline GraphicBufferMapper& getBufferMapper() { return mBufferMapper; }
+    inline const GraphicBufferMapper& getBufferMapper() const {
+        return mBufferMapper;
+    }
+    inline GraphicBufferMapper& getBufferMapper() {
+        return mBufferMapper;
+    }
     uint8_t mOwner;
 
 private:
@@ -134,7 +136,6 @@
 
     GraphicBufferMapper& mBufferMapper;
     ssize_t mInitCheck;
-    uint32_t mVStride;
     int mIndex;
 };
 
diff --git a/include/ui/GraphicBufferAllocator.h b/include/ui/GraphicBufferAllocator.h
index 741d763..54b8236 100644
--- a/include/ui/GraphicBufferAllocator.h
+++ b/include/ui/GraphicBufferAllocator.h
@@ -73,9 +73,9 @@
     struct alloc_rec_t {
         uint32_t w;
         uint32_t h;
+        uint32_t s;
         PixelFormat format;
         uint32_t usage;
-        void* vaddr;
         size_t size;
     };
     
diff --git a/include/ui/Input.h b/include/ui/Input.h
new file mode 100644
index 0000000..d9b1091
--- /dev/null
+++ b/include/ui/Input.h
@@ -0,0 +1,430 @@
+/*
+ * Copyright (C) 2010 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef _UI_INPUT_H
+#define _UI_INPUT_H
+
+/**
+ * Native input event structures.
+ */
+
+#include <android/input.h>
+#include <utils/Vector.h>
+#include <utils/Timers.h>
+
+/*
+ * Additional private constants not defined in ndk/ui/input.h.
+ */
+enum {
+    /*
+     * Private control to determine when an app is tracking a key sequence.
+     */
+    AKEY_EVENT_FLAG_START_TRACKING = 0x40000000
+};
+
+/*
+ * Maximum number of pointers supported per motion event.
+ */
+#define MAX_POINTERS 10
+
+/*
+ * Declare a concrete type for the NDK's input event forward declaration.
+ */
+struct AInputEvent {
+    virtual ~AInputEvent() { }
+};
+
+namespace android {
+
+/*
+ * A raw event as retrieved from the EventHub.
+ */
+struct RawEvent {
+    nsecs_t when;
+    int32_t deviceId;
+    int32_t type;
+    int32_t scanCode;
+    int32_t keyCode;
+    int32_t value;
+    uint32_t flags;
+};
+
+/*
+ * Flags that flow alongside events in the input dispatch system to help with certain
+ * policy decisions such as waking from device sleep.
+ */
+enum {
+    /* These flags originate in RawEvents and are generally set in the key map. */
+
+    POLICY_FLAG_WAKE = 0x00000001,
+    POLICY_FLAG_WAKE_DROPPED = 0x00000002,
+    POLICY_FLAG_SHIFT = 0x00000004,
+    POLICY_FLAG_CAPS_LOCK = 0x00000008,
+    POLICY_FLAG_ALT = 0x00000010,
+    POLICY_FLAG_ALT_GR = 0x00000020,
+    POLICY_FLAG_MENU = 0x00000040,
+    POLICY_FLAG_LAUNCHER = 0x00000080,
+
+    POLICY_FLAG_RAW_MASK = 0x0000ffff,
+
+    /* These flags are set by the input reader policy as it intercepts each event. */
+
+    // Indicates that the screen was off when the event was received and the event
+    // should wake the device.
+    POLICY_FLAG_WOKE_HERE = 0x10000000,
+
+    // Indicates that the screen was dim when the event was received and the event
+    // should brighten the device.
+    POLICY_FLAG_BRIGHT_HERE = 0x20000000,
+};
+
+/*
+ * Describes the basic configuration of input devices that are present.
+ */
+struct InputConfiguration {
+    enum {
+        TOUCHSCREEN_UNDEFINED = 0,
+        TOUCHSCREEN_NOTOUCH = 1,
+        TOUCHSCREEN_STYLUS = 2,
+        TOUCHSCREEN_FINGER = 3
+    };
+
+    enum {
+        KEYBOARD_UNDEFINED = 0,
+        KEYBOARD_NOKEYS = 1,
+        KEYBOARD_QWERTY = 2,
+        KEYBOARD_12KEY = 3
+    };
+
+    enum {
+        NAVIGATION_UNDEFINED = 0,
+        NAVIGATION_NONAV = 1,
+        NAVIGATION_DPAD = 2,
+        NAVIGATION_TRACKBALL = 3,
+        NAVIGATION_WHEEL = 4
+    };
+
+    int32_t touchScreen;
+    int32_t keyboard;
+    int32_t navigation;
+};
+
+/*
+ * Pointer coordinate data.
+ */
+struct PointerCoords {
+    float x;
+    float y;
+    float pressure;
+    float size;
+    float touchMajor;
+    float touchMinor;
+    float toolMajor;
+    float toolMinor;
+    float orientation;
+};
+
+/*
+ * Input events.
+ */
+class InputEvent : public AInputEvent {
+public:
+    virtual ~InputEvent() { }
+
+    virtual int32_t getType() const = 0;
+
+    inline int32_t getDeviceId() const { return mDeviceId; }
+
+    inline int32_t getSource() const { return mSource; }
+    
+protected:
+    void initialize(int32_t deviceId, int32_t source);
+    void initialize(const InputEvent& from);
+
+private:
+    int32_t mDeviceId;
+    int32_t mSource;
+};
+
+/*
+ * Key events.
+ */
+class KeyEvent : public InputEvent {
+public:
+    virtual ~KeyEvent() { }
+
+    virtual int32_t getType() const { return AINPUT_EVENT_TYPE_KEY; }
+
+    inline int32_t getAction() const { return mAction; }
+
+    inline int32_t getFlags() const { return mFlags; }
+
+    inline int32_t getKeyCode() const { return mKeyCode; }
+
+    inline int32_t getScanCode() const { return mScanCode; }
+
+    inline int32_t getMetaState() const { return mMetaState; }
+
+    inline int32_t getRepeatCount() const { return mRepeatCount; }
+
+    inline nsecs_t getDownTime() const { return mDownTime; }
+
+    inline nsecs_t getEventTime() const { return mEventTime; }
+
+    // Return true if this event may have a default action implementation.
+    static bool hasDefaultAction(int32_t keyCode);
+    bool hasDefaultAction() const;
+
+    // Return true if this event represents a system key.
+    static bool isSystemKey(int32_t keyCode);
+    bool isSystemKey() const;
+    
+    void initialize(
+            int32_t deviceId,
+            int32_t source,
+            int32_t action,
+            int32_t flags,
+            int32_t keyCode,
+            int32_t scanCode,
+            int32_t metaState,
+            int32_t repeatCount,
+            nsecs_t downTime,
+            nsecs_t eventTime);
+    void initialize(const KeyEvent& from);
+
+private:
+    int32_t mAction;
+    int32_t mFlags;
+    int32_t mKeyCode;
+    int32_t mScanCode;
+    int32_t mMetaState;
+    int32_t mRepeatCount;
+    nsecs_t mDownTime;
+    nsecs_t mEventTime;
+};
+
+/*
+ * Motion events.
+ */
+class MotionEvent : public InputEvent {
+public:
+    virtual ~MotionEvent() { }
+
+    virtual int32_t getType() const { return AINPUT_EVENT_TYPE_MOTION; }
+
+    inline int32_t getAction() const { return mAction; }
+
+    inline int32_t getEdgeFlags() const { return mEdgeFlags; }
+
+    inline int32_t getMetaState() const { return mMetaState; }
+
+    inline float getXOffset() const { return mXOffset; }
+
+    inline float getYOffset() const { return mYOffset; }
+
+    inline float getXPrecision() const { return mXPrecision; }
+
+    inline float getYPrecision() const { return mYPrecision; }
+
+    inline nsecs_t getDownTime() const { return mDownTime; }
+
+    inline size_t getPointerCount() const { return mPointerIds.size(); }
+
+    inline int32_t getPointerId(size_t pointerIndex) const { return mPointerIds[pointerIndex]; }
+
+    inline nsecs_t getEventTime() const { return mSampleEventTimes[getHistorySize()]; }
+
+    inline float getRawX(size_t pointerIndex) const {
+        return getCurrentPointerCoords(pointerIndex).x;
+    }
+
+    inline float getRawY(size_t pointerIndex) const {
+        return getCurrentPointerCoords(pointerIndex).y;
+    }
+
+    inline float getX(size_t pointerIndex) const {
+        return getRawX(pointerIndex) + mXOffset;
+    }
+
+    inline float getY(size_t pointerIndex) const {
+        return getRawY(pointerIndex) + mYOffset;
+    }
+
+    inline float getPressure(size_t pointerIndex) const {
+        return getCurrentPointerCoords(pointerIndex).pressure;
+    }
+
+    inline float getSize(size_t pointerIndex) const {
+        return getCurrentPointerCoords(pointerIndex).size;
+    }
+
+    inline float getTouchMajor(size_t pointerIndex) const {
+        return getCurrentPointerCoords(pointerIndex).touchMajor;
+    }
+
+    inline float getTouchMinor(size_t pointerIndex) const {
+        return getCurrentPointerCoords(pointerIndex).touchMinor;
+    }
+
+    inline float getToolMajor(size_t pointerIndex) const {
+        return getCurrentPointerCoords(pointerIndex).toolMajor;
+    }
+
+    inline float getToolMinor(size_t pointerIndex) const {
+        return getCurrentPointerCoords(pointerIndex).toolMinor;
+    }
+
+    inline float getOrientation(size_t pointerIndex) const {
+        return getCurrentPointerCoords(pointerIndex).orientation;
+    }
+
+    inline size_t getHistorySize() const { return mSampleEventTimes.size() - 1; }
+
+    inline nsecs_t getHistoricalEventTime(size_t historicalIndex) const {
+        return mSampleEventTimes[historicalIndex];
+    }
+
+    inline float getHistoricalRawX(size_t pointerIndex, size_t historicalIndex) const {
+        return getHistoricalPointerCoords(pointerIndex, historicalIndex).x;
+    }
+
+    inline float getHistoricalRawY(size_t pointerIndex, size_t historicalIndex) const {
+        return getHistoricalPointerCoords(pointerIndex, historicalIndex).y;
+    }
+
+    inline float getHistoricalX(size_t pointerIndex, size_t historicalIndex) const {
+        return getHistoricalRawX(pointerIndex, historicalIndex) + mXOffset;
+    }
+
+    inline float getHistoricalY(size_t pointerIndex, size_t historicalIndex) const {
+        return getHistoricalRawY(pointerIndex, historicalIndex) + mYOffset;
+    }
+
+    inline float getHistoricalPressure(size_t pointerIndex, size_t historicalIndex) const {
+        return getHistoricalPointerCoords(pointerIndex, historicalIndex).pressure;
+    }
+
+    inline float getHistoricalSize(size_t pointerIndex, size_t historicalIndex) const {
+        return getHistoricalPointerCoords(pointerIndex, historicalIndex).size;
+    }
+
+    inline float getHistoricalTouchMajor(size_t pointerIndex, size_t historicalIndex) const {
+        return getHistoricalPointerCoords(pointerIndex, historicalIndex).touchMajor;
+    }
+
+    inline float getHistoricalTouchMinor(size_t pointerIndex, size_t historicalIndex) const {
+        return getHistoricalPointerCoords(pointerIndex, historicalIndex).touchMinor;
+    }
+
+    inline float getHistoricalToolMajor(size_t pointerIndex, size_t historicalIndex) const {
+        return getHistoricalPointerCoords(pointerIndex, historicalIndex).toolMajor;
+    }
+
+    inline float getHistoricalToolMinor(size_t pointerIndex, size_t historicalIndex) const {
+        return getHistoricalPointerCoords(pointerIndex, historicalIndex).toolMinor;
+    }
+
+    inline float getHistoricalOrientation(size_t pointerIndex, size_t historicalIndex) const {
+        return getHistoricalPointerCoords(pointerIndex, historicalIndex).orientation;
+    }
+
+    void initialize(
+            int32_t deviceId,
+            int32_t source,
+            int32_t action,
+            int32_t edgeFlags,
+            int32_t metaState,
+            float xOffset,
+            float yOffset,
+            float xPrecision,
+            float yPrecision,
+            nsecs_t downTime,
+            nsecs_t eventTime,
+            size_t pointerCount,
+            const int32_t* pointerIds,
+            const PointerCoords* pointerCoords);
+
+    void addSample(
+            nsecs_t eventTime,
+            const PointerCoords* pointerCoords);
+
+    void offsetLocation(float xOffset, float yOffset);
+
+    // Low-level accessors.
+    inline const int32_t* getPointerIds() const { return mPointerIds.array(); }
+    inline const nsecs_t* getSampleEventTimes() const { return mSampleEventTimes.array(); }
+    inline const PointerCoords* getSamplePointerCoords() const {
+            return mSamplePointerCoords.array();
+    }
+
+private:
+    int32_t mAction;
+    int32_t mEdgeFlags;
+    int32_t mMetaState;
+    float mXOffset;
+    float mYOffset;
+    float mXPrecision;
+    float mYPrecision;
+    nsecs_t mDownTime;
+    Vector<int32_t> mPointerIds;
+    Vector<nsecs_t> mSampleEventTimes;
+    Vector<PointerCoords> mSamplePointerCoords;
+
+    inline const PointerCoords& getCurrentPointerCoords(size_t pointerIndex) const {
+        return mSamplePointerCoords[getHistorySize() * getPointerCount() + pointerIndex];
+    }
+
+    inline const PointerCoords& getHistoricalPointerCoords(
+            size_t pointerIndex, size_t historicalIndex) const {
+        return mSamplePointerCoords[historicalIndex * getPointerCount() + pointerIndex];
+    }
+};
+
+/*
+ * Input event factory.
+ */
+class InputEventFactoryInterface {
+protected:
+    virtual ~InputEventFactoryInterface() { }
+
+public:
+    InputEventFactoryInterface() { }
+
+    virtual KeyEvent* createKeyEvent() = 0;
+    virtual MotionEvent* createMotionEvent() = 0;
+};
+
+/*
+ * A simple input event factory implementation that uses a single preallocated instance
+ * of each type of input event that are reused for each request.
+ */
+class PreallocatedInputEventFactory : public InputEventFactoryInterface {
+public:
+    PreallocatedInputEventFactory() { }
+    virtual ~PreallocatedInputEventFactory() { }
+
+    virtual KeyEvent* createKeyEvent() { return & mKeyEvent; }
+    virtual MotionEvent* createMotionEvent() { return & mMotionEvent; }
+
+private:
+    KeyEvent mKeyEvent;
+    MotionEvent mMotionEvent;
+};
+
+
+} // namespace android
+
+#endif // _UI_INPUT_H
diff --git a/include/ui/InputDevice.h b/include/ui/InputDevice.h
new file mode 100644
index 0000000..3b9c70e
--- /dev/null
+++ b/include/ui/InputDevice.h
@@ -0,0 +1,353 @@
+/*
+ * Copyright (C) 2010 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef _UI_INPUT_DEVICE_H
+#define _UI_INPUT_DEVICE_H
+
+#include <ui/EventHub.h>
+#include <ui/Input.h>
+#include <utils/KeyedVector.h>
+#include <utils/threads.h>
+#include <utils/Timers.h>
+#include <utils/RefBase.h>
+#include <utils/String8.h>
+#include <utils/BitSet.h>
+
+#include <stddef.h>
+#include <unistd.h>
+
+/* Maximum pointer id value supported.
+ * (This is limited by our use of BitSet32 to track pointer assignments.) */
+#define MAX_POINTER_ID 31
+
+/* Maximum number of historical samples to average. */
+#define AVERAGING_HISTORY_SIZE 5
+
+
+namespace android {
+
+extern int32_t updateMetaState(int32_t keyCode, bool down, int32_t oldMetaState);
+extern int32_t rotateKeyCode(int32_t keyCode, int32_t orientation);
+
+
+/*
+ * An input device structure tracks the state of a single input device.
+ *
+ * This structure is only used by ReaderThread and is not intended to be shared with
+ * DispatcherThread (because that would require locking).  This works out fine because
+ * DispatcherThread is only interested in cooked event data anyways and does not need
+ * any of the low-level data from InputDevice.
+ */
+struct InputDevice {
+    struct AbsoluteAxisInfo {
+        bool valid;        // set to true if axis parameters are known, false otherwise
+
+        int32_t minValue;  // minimum value
+        int32_t maxValue;  // maximum value
+        int32_t range;     // range of values, equal to maxValue - minValue
+        int32_t flat;      // center flat position, eg. flat == 8 means center is between -8 and 8
+        int32_t fuzz;      // error tolerance, eg. fuzz == 4 means value is +/- 4 due to noise
+    };
+
+    struct VirtualKey {
+        int32_t keyCode;
+        int32_t scanCode;
+        uint32_t flags;
+
+        // computed hit box, specified in touch screen coords based on known display size
+        int32_t hitLeft;
+        int32_t hitTop;
+        int32_t hitRight;
+        int32_t hitBottom;
+
+        inline bool isHit(int32_t x, int32_t y) const {
+            return x >= hitLeft && x <= hitRight && y >= hitTop && y <= hitBottom;
+        }
+    };
+
+    struct KeyboardState {
+        struct Current {
+            int32_t metaState;
+            nsecs_t downTime; // time of most recent key down
+        } current;
+
+        void reset();
+    };
+
+    struct TrackballState {
+        struct Accumulator {
+            enum {
+                FIELD_BTN_MOUSE = 1,
+                FIELD_REL_X = 2,
+                FIELD_REL_Y = 4
+            };
+
+            uint32_t fields;
+
+            bool btnMouse;
+            int32_t relX;
+            int32_t relY;
+
+            inline void clear() {
+                fields = 0;
+            }
+
+            inline bool isDirty() {
+                return fields != 0;
+            }
+        } accumulator;
+
+        struct Current {
+            bool down;
+            nsecs_t downTime;
+        } current;
+
+        struct Precalculated {
+            float xScale;
+            float yScale;
+            float xPrecision;
+            float yPrecision;
+        } precalculated;
+
+        void reset();
+    };
+
+    struct SingleTouchScreenState {
+        struct Accumulator {
+            enum {
+                FIELD_BTN_TOUCH = 1,
+                FIELD_ABS_X = 2,
+                FIELD_ABS_Y = 4,
+                FIELD_ABS_PRESSURE = 8,
+                FIELD_ABS_TOOL_WIDTH = 16
+            };
+
+            uint32_t fields;
+
+            bool btnTouch;
+            int32_t absX;
+            int32_t absY;
+            int32_t absPressure;
+            int32_t absToolWidth;
+
+            inline void clear() {
+                fields = 0;
+            }
+
+            inline bool isDirty() {
+                return fields != 0;
+            }
+        } accumulator;
+
+        struct Current {
+            bool down;
+            int32_t x;
+            int32_t y;
+            int32_t pressure;
+            int32_t size;
+        } current;
+
+        void reset();
+    };
+
+    struct MultiTouchScreenState {
+        struct Accumulator {
+            enum {
+                FIELD_ABS_MT_POSITION_X = 1,
+                FIELD_ABS_MT_POSITION_Y = 2,
+                FIELD_ABS_MT_TOUCH_MAJOR = 4,
+                FIELD_ABS_MT_TOUCH_MINOR = 8,
+                FIELD_ABS_MT_WIDTH_MAJOR = 16,
+                FIELD_ABS_MT_WIDTH_MINOR = 32,
+                FIELD_ABS_MT_ORIENTATION = 64,
+                FIELD_ABS_MT_TRACKING_ID = 128
+            };
+
+            uint32_t pointerCount;
+            struct Pointer {
+                uint32_t fields;
+
+                int32_t absMTPositionX;
+                int32_t absMTPositionY;
+                int32_t absMTTouchMajor;
+                int32_t absMTTouchMinor;
+                int32_t absMTWidthMajor;
+                int32_t absMTWidthMinor;
+                int32_t absMTOrientation;
+                int32_t absMTTrackingId;
+
+                inline void clear() {
+                    fields = 0;
+                }
+            } pointers[MAX_POINTERS + 1]; // + 1 to remove the need for extra range checks
+
+            inline void clear() {
+                pointerCount = 0;
+                pointers[0].clear();
+            }
+
+            inline bool isDirty() {
+                return pointerCount != 0;
+            }
+        } accumulator;
+
+        void reset();
+    };
+
+    struct PointerData {
+        uint32_t id;
+        int32_t x;
+        int32_t y;
+        int32_t pressure;
+        int32_t size;
+        int32_t touchMajor;
+        int32_t touchMinor;
+        int32_t toolMajor;
+        int32_t toolMinor;
+        int32_t orientation;
+    };
+
+    struct TouchData {
+        uint32_t pointerCount;
+        PointerData pointers[MAX_POINTERS];
+        BitSet32 idBits;
+        uint32_t idToIndex[MAX_POINTER_ID + 1];
+
+        void copyFrom(const TouchData& other);
+
+        inline void clear() {
+            pointerCount = 0;
+            idBits.clear();
+        }
+    };
+
+    // common state used for both single-touch and multi-touch screens after the initial
+    // touch decoding has been performed
+    struct TouchScreenState {
+        Vector<VirtualKey> virtualKeys;
+
+        struct Parameters {
+            bool useBadTouchFilter;
+            bool useJumpyTouchFilter;
+            bool useAveragingTouchFilter;
+
+            AbsoluteAxisInfo xAxis;
+            AbsoluteAxisInfo yAxis;
+            AbsoluteAxisInfo pressureAxis;
+            AbsoluteAxisInfo sizeAxis;
+            AbsoluteAxisInfo orientationAxis;
+        } parameters;
+
+        // The touch data of the current sample being processed.
+        TouchData currentTouch;
+
+        // The touch data of the previous sample that was processed.  This is updated
+        // incrementally while the current sample is being processed.
+        TouchData lastTouch;
+
+        // The time the primary pointer last went down.
+        nsecs_t downTime;
+
+        struct CurrentVirtualKeyState {
+            enum Status {
+                STATUS_UP,
+                STATUS_DOWN,
+                STATUS_CANCELED
+            };
+
+            Status status;
+            nsecs_t downTime;
+            int32_t keyCode;
+            int32_t scanCode;
+        } currentVirtualKey;
+
+        struct AveragingTouchFilterState {
+            // Individual history tracks are stored by pointer id
+            uint32_t historyStart[MAX_POINTERS];
+            uint32_t historyEnd[MAX_POINTERS];
+            struct {
+                struct {
+                    int32_t x;
+                    int32_t y;
+                    int32_t pressure;
+                } pointers[MAX_POINTERS];
+            } historyData[AVERAGING_HISTORY_SIZE];
+        } averagingTouchFilter;
+
+        struct JumpTouchFilterState {
+            int32_t jumpyPointsDropped;
+        } jumpyTouchFilter;
+
+        struct Precalculated {
+            int32_t xOrigin;
+            float xScale;
+
+            int32_t yOrigin;
+            float yScale;
+
+            int32_t pressureOrigin;
+            float pressureScale;
+
+            int32_t sizeOrigin;
+            float sizeScale;
+
+            float orientationScale;
+        } precalculated;
+
+        void reset();
+
+        bool applyBadTouchFilter();
+        bool applyJumpyTouchFilter();
+        void applyAveragingTouchFilter();
+        void calculatePointerIds();
+
+        bool isPointInsideDisplay(int32_t x, int32_t y) const;
+        const InputDevice::VirtualKey* findVirtualKeyHit() const;
+    };
+
+    InputDevice(int32_t id, uint32_t classes, String8 name);
+
+    int32_t id;
+    uint32_t classes;
+    String8 name;
+    bool ignored;
+
+    KeyboardState keyboard;
+    TrackballState trackball;
+    TouchScreenState touchScreen;
+    union {
+        SingleTouchScreenState singleTouchScreen;
+        MultiTouchScreenState multiTouchScreen;
+    };
+
+    void reset();
+
+    inline bool isKeyboard() const { return classes & INPUT_DEVICE_CLASS_KEYBOARD; }
+    inline bool isAlphaKey() const { return classes & INPUT_DEVICE_CLASS_ALPHAKEY; }
+    inline bool isTrackball() const { return classes & INPUT_DEVICE_CLASS_TRACKBALL; }
+    inline bool isDPad() const { return classes & INPUT_DEVICE_CLASS_DPAD; }
+    inline bool isSingleTouchScreen() const { return (classes
+            & (INPUT_DEVICE_CLASS_TOUCHSCREEN | INPUT_DEVICE_CLASS_TOUCHSCREEN_MT))
+            == INPUT_DEVICE_CLASS_TOUCHSCREEN; }
+    inline bool isMultiTouchScreen() const { return classes
+            & INPUT_DEVICE_CLASS_TOUCHSCREEN_MT; }
+    inline bool isTouchScreen() const { return classes
+            & (INPUT_DEVICE_CLASS_TOUCHSCREEN | INPUT_DEVICE_CLASS_TOUCHSCREEN_MT); }
+};
+
+} // namespace android
+
+#endif // _UI_INPUT_DEVICE_H
diff --git a/include/ui/InputDispatcher.h b/include/ui/InputDispatcher.h
new file mode 100644
index 0000000..674852a
--- /dev/null
+++ b/include/ui/InputDispatcher.h
@@ -0,0 +1,648 @@
+/*
+ * Copyright (C) 2010 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef _UI_INPUT_DISPATCHER_H
+#define _UI_INPUT_DISPATCHER_H
+
+#include <ui/Input.h>
+#include <ui/InputTransport.h>
+#include <utils/KeyedVector.h>
+#include <utils/Vector.h>
+#include <utils/threads.h>
+#include <utils/Timers.h>
+#include <utils/RefBase.h>
+#include <utils/String8.h>
+#include <utils/PollLoop.h>
+#include <utils/Pool.h>
+
+#include <stddef.h>
+#include <unistd.h>
+
+
+namespace android {
+
+/*
+ * Constants used to report the outcome of input event injection.
+ */
+enum {
+    /* (INTERNAL USE ONLY) Specifies that injection is pending and its outcome is unknown. */
+    INPUT_EVENT_INJECTION_PENDING = -1,
+
+    /* Injection succeeded. */
+    INPUT_EVENT_INJECTION_SUCCEEDED = 0,
+
+    /* Injection failed because the injector did not have permission to inject
+     * into the application with input focus. */
+    INPUT_EVENT_INJECTION_PERMISSION_DENIED = 1,
+
+    /* Injection failed because there were no available input targets. */
+    INPUT_EVENT_INJECTION_FAILED = 2,
+
+    /* Injection failed due to a timeout. */
+    INPUT_EVENT_INJECTION_TIMED_OUT = 3
+};
+
+
+/*
+ * An input target specifies how an input event is to be dispatched to a particular window
+ * including the window's input channel, control flags, a timeout, and an X / Y offset to
+ * be added to input event coordinates to compensate for the absolute position of the
+ * window area.
+ */
+struct InputTarget {
+    enum {
+        /* This flag indicates that subsequent event delivery should be held until the
+         * current event is delivered to this target or a timeout occurs. */
+        FLAG_SYNC = 0x01,
+
+        /* This flag indicates that a MotionEvent with ACTION_DOWN falls outside of the area of
+         * this target and so should instead be delivered as an ACTION_OUTSIDE to this target. */
+        FLAG_OUTSIDE = 0x02,
+
+        /* This flag indicates that a KeyEvent or MotionEvent is being canceled.
+         * In the case of a key event, it should be delivered with KeyEvent.FLAG_CANCELED set.
+         * In the case of a motion event, it should be delivered as MotionEvent.ACTION_CANCEL. */
+        FLAG_CANCEL = 0x04
+    };
+
+    // The input channel to be targeted.
+    sp<InputChannel> inputChannel;
+
+    // Flags for the input target.
+    int32_t flags;
+
+    // The timeout for event delivery to this target in nanoseconds.  Or -1 if none.
+    nsecs_t timeout;
+
+    // The x and y offset to add to a MotionEvent as it is delivered.
+    // (ignored for KeyEvents)
+    float xOffset, yOffset;
+};
+
+
+/*
+ * Input dispatcher policy interface.
+ *
+ * The input reader policy is used by the input reader to interact with the Window Manager
+ * and other system components.
+ *
+ * The actual implementation is partially supported by callbacks into the DVM
+ * via JNI.  This interface is also mocked in the unit tests.
+ */
+class InputDispatcherPolicyInterface : public virtual RefBase {
+protected:
+    InputDispatcherPolicyInterface() { }
+    virtual ~InputDispatcherPolicyInterface() { }
+
+public:
+    /* Notifies the system that a configuration change has occurred. */
+    virtual void notifyConfigurationChanged(nsecs_t when) = 0;
+
+    /* Notifies the system that an input channel is unrecoverably broken. */
+    virtual void notifyInputChannelBroken(const sp<InputChannel>& inputChannel) = 0;
+
+    /* Notifies the system that an input channel is not responding.
+     * Returns true and a new timeout value if the dispatcher should keep waiting.
+     * Otherwise returns false. */
+    virtual bool notifyInputChannelANR(const sp<InputChannel>& inputChannel,
+            nsecs_t& outNewTimeout) = 0;
+
+    /* Notifies the system that an input channel recovered from ANR. */
+    virtual void notifyInputChannelRecoveredFromANR(const sp<InputChannel>& inputChannel) = 0;
+
+    /* Gets the key repeat timeout or -1 if automatic key repeating is disabled. */
+    virtual nsecs_t getKeyRepeatTimeout() = 0;
+
+    /* Waits for key event input targets to become available.
+     * If the event is being injected, injectorPid and injectorUid should specify the
+     * process id and used id of the injecting application, otherwise they should both
+     * be -1.
+     * Returns one of the INPUT_EVENT_INJECTION_XXX constants. */
+    virtual int32_t waitForKeyEventTargets(KeyEvent* keyEvent, uint32_t policyFlags,
+            int32_t injectorPid, int32_t injectorUid,
+            Vector<InputTarget>& outTargets) = 0;
+
+    /* Waits for motion event targets to become available.
+     * If the event is being injected, injectorPid and injectorUid should specify the
+     * process id and used id of the injecting application, otherwise they should both
+     * be -1.
+     * Returns one of the INPUT_EVENT_INJECTION_XXX constants. */
+    virtual int32_t waitForMotionEventTargets(MotionEvent* motionEvent, uint32_t policyFlags,
+            int32_t injectorPid, int32_t injectorUid,
+            Vector<InputTarget>& outTargets) = 0;
+};
+
+
+/* Notifies the system about input events generated by the input reader.
+ * The dispatcher is expected to be mostly asynchronous. */
+class InputDispatcherInterface : public virtual RefBase {
+protected:
+    InputDispatcherInterface() { }
+    virtual ~InputDispatcherInterface() { }
+
+public:
+    /* Runs a single iteration of the dispatch loop.
+     * Nominally processes one queued event, a timeout, or a response from an input consumer.
+     *
+     * This method should only be called on the input dispatcher thread.
+     */
+    virtual void dispatchOnce() = 0;
+
+    /* Notifies the dispatcher about new events.
+     *
+     * These methods should only be called on the input reader thread.
+     */
+    virtual void notifyConfigurationChanged(nsecs_t eventTime) = 0;
+    virtual void notifyAppSwitchComing(nsecs_t eventTime) = 0;
+    virtual void notifyKey(nsecs_t eventTime, int32_t deviceId, int32_t source,
+            uint32_t policyFlags, int32_t action, int32_t flags, int32_t keyCode,
+            int32_t scanCode, int32_t metaState, nsecs_t downTime) = 0;
+    virtual void notifyMotion(nsecs_t eventTime, int32_t deviceId, int32_t source,
+            uint32_t policyFlags, int32_t action, int32_t metaState, int32_t edgeFlags,
+            uint32_t pointerCount, const int32_t* pointerIds, const PointerCoords* pointerCoords,
+            float xPrecision, float yPrecision, nsecs_t downTime) = 0;
+
+    /* Injects an input event and optionally waits for sync.
+     * This method may block even if sync is false because it must wait for previous events
+     * to be dispatched before it can determine whether input event injection will be
+     * permitted based on the current input focus.
+     * Returns one of the INPUT_EVENT_INJECTION_XXX constants.
+     *
+     * This method may be called on any thread (usually by the input manager).
+     */
+    virtual int32_t injectInputEvent(const InputEvent* event,
+            int32_t injectorPid, int32_t injectorUid, bool sync, int32_t timeoutMillis) = 0;
+
+    /* Preempts input dispatch in progress by making pending synchronous
+     * dispatches asynchronous instead.  This method is generally called during a focus
+     * transition from one application to the next so as to enable the new application
+     * to start receiving input as soon as possible without having to wait for the
+     * old application to finish up.
+     *
+     * This method may be called on any thread (usually by the input manager).
+     */
+    virtual void preemptInputDispatch() = 0;
+
+    /* Registers or unregister input channels that may be used as targets for input events.
+     *
+     * These methods may be called on any thread (usually by the input manager).
+     */
+    virtual status_t registerInputChannel(const sp<InputChannel>& inputChannel) = 0;
+    virtual status_t unregisterInputChannel(const sp<InputChannel>& inputChannel) = 0;
+};
+
+/* Dispatches events to input targets.  Some functions of the input dispatcher, such as
+ * identifying input targets, are controlled by a separate policy object.
+ *
+ * IMPORTANT INVARIANT:
+ *     Because the policy can potentially block or cause re-entrance into the input dispatcher,
+ *     the input dispatcher never calls into the policy while holding its internal locks.
+ *     The implementation is also carefully designed to recover from scenarios such as an
+ *     input channel becoming unregistered while identifying input targets or processing timeouts.
+ *
+ *     Methods marked 'Locked' must be called with the lock acquired.
+ *
+ *     Methods marked 'LockedInterruptible' must be called with the lock acquired but
+ *     may during the course of their execution release the lock, call into the policy, and
+ *     then reacquire the lock.  The caller is responsible for recovering gracefully.
+ *
+ *     A 'LockedInterruptible' method may called a 'Locked' method, but NOT vice-versa.
+ */
+class InputDispatcher : public InputDispatcherInterface {
+protected:
+    virtual ~InputDispatcher();
+
+public:
+    explicit InputDispatcher(const sp<InputDispatcherPolicyInterface>& policy);
+
+    virtual void dispatchOnce();
+
+    virtual void notifyConfigurationChanged(nsecs_t eventTime);
+    virtual void notifyAppSwitchComing(nsecs_t eventTime);
+    virtual void notifyKey(nsecs_t eventTime, int32_t deviceId, int32_t source,
+            uint32_t policyFlags, int32_t action, int32_t flags, int32_t keyCode,
+            int32_t scanCode, int32_t metaState, nsecs_t downTime);
+    virtual void notifyMotion(nsecs_t eventTime, int32_t deviceId, int32_t source,
+            uint32_t policyFlags, int32_t action, int32_t metaState, int32_t edgeFlags,
+            uint32_t pointerCount, const int32_t* pointerIds, const PointerCoords* pointerCoords,
+            float xPrecision, float yPrecision, nsecs_t downTime);
+
+    virtual int32_t injectInputEvent(const InputEvent* event,
+            int32_t injectorPid, int32_t injectorUid, bool sync, int32_t timeoutMillis);
+
+    virtual void preemptInputDispatch();
+
+    virtual status_t registerInputChannel(const sp<InputChannel>& inputChannel);
+    virtual status_t unregisterInputChannel(const sp<InputChannel>& inputChannel);
+
+private:
+    template <typename T>
+    struct Link {
+        T* next;
+        T* prev;
+    };
+
+    struct EventEntry : Link<EventEntry> {
+        enum {
+            TYPE_SENTINEL,
+            TYPE_CONFIGURATION_CHANGED,
+            TYPE_KEY,
+            TYPE_MOTION
+        };
+
+        int32_t refCount;
+        int32_t type;
+        nsecs_t eventTime;
+
+        int32_t injectionResult; // initially INPUT_EVENT_INJECTION_PENDING
+        int32_t injectorPid;     // -1 if not injected
+        int32_t injectorUid;     // -1 if not injected
+
+        bool dispatchInProgress; // initially false, set to true while dispatching
+
+        inline bool isInjected() { return injectorPid >= 0; }
+    };
+
+    struct ConfigurationChangedEntry : EventEntry {
+    };
+
+    struct KeyEntry : EventEntry {
+        int32_t deviceId;
+        int32_t source;
+        uint32_t policyFlags;
+        int32_t action;
+        int32_t flags;
+        int32_t keyCode;
+        int32_t scanCode;
+        int32_t metaState;
+        int32_t repeatCount;
+        nsecs_t downTime;
+    };
+
+    struct MotionSample {
+        MotionSample* next;
+
+        nsecs_t eventTime;
+        PointerCoords pointerCoords[MAX_POINTERS];
+    };
+
+    struct MotionEntry : EventEntry {
+        int32_t deviceId;
+        int32_t source;
+        uint32_t policyFlags;
+        int32_t action;
+        int32_t metaState;
+        int32_t edgeFlags;
+        float xPrecision;
+        float yPrecision;
+        nsecs_t downTime;
+        uint32_t pointerCount;
+        int32_t pointerIds[MAX_POINTERS];
+
+        // Linked list of motion samples associated with this motion event.
+        MotionSample firstSample;
+        MotionSample* lastSample;
+    };
+
+    // Tracks the progress of dispatching a particular event to a particular connection.
+    struct DispatchEntry : Link<DispatchEntry> {
+        EventEntry* eventEntry; // the event to dispatch
+        int32_t targetFlags;
+        float xOffset;
+        float yOffset;
+        nsecs_t timeout;
+
+        // True if dispatch has started.
+        bool inProgress;
+
+        // For motion events:
+        //   Pointer to the first motion sample to dispatch in this cycle.
+        //   Usually NULL to indicate that the list of motion samples begins at
+        //   MotionEntry::firstSample.  Otherwise, some samples were dispatched in a previous
+        //   cycle and this pointer indicates the location of the first remainining sample
+        //   to dispatch during the current cycle.
+        MotionSample* headMotionSample;
+        //   Pointer to a motion sample to dispatch in the next cycle if the dispatcher was
+        //   unable to send all motion samples during this cycle.  On the next cycle,
+        //   headMotionSample will be initialized to tailMotionSample and tailMotionSample
+        //   will be set to NULL.
+        MotionSample* tailMotionSample;
+    };
+
+    // A command entry captures state and behavior for an action to be performed in the
+    // dispatch loop after the initial processing has taken place.  It is essentially
+    // a kind of continuation used to postpone sensitive policy interactions to a point
+    // in the dispatch loop where it is safe to release the lock (generally after finishing
+    // the critical parts of the dispatch cycle).
+    //
+    // The special thing about commands is that they can voluntarily release and reacquire
+    // the dispatcher lock at will.  Initially when the command starts running, the
+    // dispatcher lock is held.  However, if the command needs to call into the policy to
+    // do some work, it can release the lock, do the work, then reacquire the lock again
+    // before returning.
+    //
+    // This mechanism is a bit clunky but it helps to preserve the invariant that the dispatch
+    // never calls into the policy while holding its lock.
+    //
+    // Commands are implicitly 'LockedInterruptible'.
+    struct CommandEntry;
+    typedef void (InputDispatcher::*Command)(CommandEntry* commandEntry);
+
+    class Connection;
+    struct CommandEntry : Link<CommandEntry> {
+        CommandEntry();
+        ~CommandEntry();
+
+        Command command;
+
+        // parameters for the command (usage varies by command)
+        sp<Connection> connection;
+    };
+
+    // Generic queue implementation.
+    template <typename T>
+    struct Queue {
+        T head;
+        T tail;
+
+        inline Queue() {
+            head.prev = NULL;
+            head.next = & tail;
+            tail.prev = & head;
+            tail.next = NULL;
+        }
+
+        inline bool isEmpty() {
+            return head.next == & tail;
+        }
+
+        inline void enqueueAtTail(T* entry) {
+            T* last = tail.prev;
+            last->next = entry;
+            entry->prev = last;
+            entry->next = & tail;
+            tail.prev = entry;
+        }
+
+        inline void enqueueAtHead(T* entry) {
+            T* first = head.next;
+            head.next = entry;
+            entry->prev = & head;
+            entry->next = first;
+            first->prev = entry;
+        }
+
+        inline void dequeue(T* entry) {
+            entry->prev->next = entry->next;
+            entry->next->prev = entry->prev;
+        }
+
+        inline T* dequeueAtHead() {
+            T* first = head.next;
+            dequeue(first);
+            return first;
+        }
+    };
+
+    /* Allocates queue entries and performs reference counting as needed. */
+    class Allocator {
+    public:
+        Allocator();
+
+        ConfigurationChangedEntry* obtainConfigurationChangedEntry(nsecs_t eventTime);
+        KeyEntry* obtainKeyEntry(nsecs_t eventTime,
+                int32_t deviceId, int32_t source, uint32_t policyFlags, int32_t action,
+                int32_t flags, int32_t keyCode, int32_t scanCode, int32_t metaState,
+                int32_t repeatCount, nsecs_t downTime);
+        MotionEntry* obtainMotionEntry(nsecs_t eventTime,
+                int32_t deviceId, int32_t source, uint32_t policyFlags, int32_t action,
+                int32_t metaState, int32_t edgeFlags, float xPrecision, float yPrecision,
+                nsecs_t downTime, uint32_t pointerCount,
+                const int32_t* pointerIds, const PointerCoords* pointerCoords);
+        DispatchEntry* obtainDispatchEntry(EventEntry* eventEntry);
+        CommandEntry* obtainCommandEntry(Command command);
+
+        void releaseEventEntry(EventEntry* entry);
+        void releaseConfigurationChangedEntry(ConfigurationChangedEntry* entry);
+        void releaseKeyEntry(KeyEntry* entry);
+        void releaseMotionEntry(MotionEntry* entry);
+        void releaseDispatchEntry(DispatchEntry* entry);
+        void releaseCommandEntry(CommandEntry* entry);
+
+        void appendMotionSample(MotionEntry* motionEntry,
+                nsecs_t eventTime, const PointerCoords* pointerCoords);
+
+    private:
+        Pool<ConfigurationChangedEntry> mConfigurationChangeEntryPool;
+        Pool<KeyEntry> mKeyEntryPool;
+        Pool<MotionEntry> mMotionEntryPool;
+        Pool<MotionSample> mMotionSamplePool;
+        Pool<DispatchEntry> mDispatchEntryPool;
+        Pool<CommandEntry> mCommandEntryPool;
+
+        void initializeEventEntry(EventEntry* entry, int32_t type, nsecs_t eventTime);
+    };
+
+    /* Manages the dispatch state associated with a single input channel. */
+    class Connection : public RefBase {
+    protected:
+        virtual ~Connection();
+
+    public:
+        enum Status {
+            // Everything is peachy.
+            STATUS_NORMAL,
+            // An unrecoverable communication error has occurred.
+            STATUS_BROKEN,
+            // The client is not responding.
+            STATUS_NOT_RESPONDING,
+            // The input channel has been unregistered.
+            STATUS_ZOMBIE
+        };
+
+        Status status;
+        sp<InputChannel> inputChannel;
+        InputPublisher inputPublisher;
+        Queue<DispatchEntry> outboundQueue;
+        nsecs_t nextTimeoutTime; // next timeout time (LONG_LONG_MAX if none)
+
+        nsecs_t lastEventTime; // the time when the event was originally captured
+        nsecs_t lastDispatchTime; // the time when the last event was dispatched
+        nsecs_t lastANRTime; // the time when the last ANR was recorded
+
+        explicit Connection(const sp<InputChannel>& inputChannel);
+
+        inline const char* getInputChannelName() const { return inputChannel->getName().string(); }
+
+        const char* getStatusLabel() const;
+
+        // Finds a DispatchEntry in the outbound queue associated with the specified event.
+        // Returns NULL if not found.
+        DispatchEntry* findQueuedDispatchEntryForEvent(const EventEntry* eventEntry) const;
+
+        // Determine whether this connection has a pending synchronous dispatch target.
+        // Since there can only ever be at most one such target at a time, if there is one,
+        // it must be at the tail because nothing else can be enqueued after it.
+        inline bool hasPendingSyncTarget() {
+            return ! outboundQueue.isEmpty()
+                    && (outboundQueue.tail.prev->targetFlags & InputTarget::FLAG_SYNC);
+        }
+
+        // Gets the time since the current event was originally obtained from the input driver.
+        inline double getEventLatencyMillis(nsecs_t currentTime) {
+            return (currentTime - lastEventTime) / 1000000.0;
+        }
+
+        // Gets the time since the current event entered the outbound dispatch queue.
+        inline double getDispatchLatencyMillis(nsecs_t currentTime) {
+            return (currentTime - lastDispatchTime) / 1000000.0;
+        }
+
+        // Gets the time since the current event ANR was declared, if applicable.
+        inline double getANRLatencyMillis(nsecs_t currentTime) {
+            return (currentTime - lastANRTime) / 1000000.0;
+        }
+
+        status_t initialize();
+
+        void setNextTimeoutTime(nsecs_t currentTime, nsecs_t timeout);
+    };
+
+    sp<InputDispatcherPolicyInterface> mPolicy;
+
+    Mutex mLock;
+
+    Allocator mAllocator;
+    sp<PollLoop> mPollLoop;
+
+    Queue<EventEntry> mInboundQueue;
+    Queue<CommandEntry> mCommandQueue;
+
+    // All registered connections mapped by receive pipe file descriptor.
+    KeyedVector<int, sp<Connection> > mConnectionsByReceiveFd;
+
+    // Active connections are connections that have a non-empty outbound queue.
+    // We don't use a ref-counted pointer here because we explicitly abort connections
+    // during unregistration which causes the connection's outbound queue to be cleared
+    // and the connection itself to be deactivated.
+    Vector<Connection*> mActiveConnections;
+
+    // List of connections that have timed out.  Only used by dispatchOnce()
+    // We don't use a ref-counted pointer here because it is not possible for a connection
+    // to be unregistered while processing timed out connections since we hold the lock for
+    // the duration.
+    Vector<Connection*> mTimedOutConnections;
+
+    // Preallocated key and motion event objects used only to ask the input dispatcher policy
+    // for the targets of an event that is to be dispatched.
+    KeyEvent mReusableKeyEvent;
+    MotionEvent mReusableMotionEvent;
+
+    // The input targets that were most recently identified for dispatch.
+    // If there is a synchronous event dispatch in progress, the current input targets will
+    // remain unchanged until the dispatch has completed or been aborted.
+    Vector<InputTarget> mCurrentInputTargets;
+    bool mCurrentInputTargetsValid; // false while targets are being recomputed
+
+    // Event injection and synchronization.
+    Condition mInjectionResultAvailableCondition;
+    Condition mFullySynchronizedCondition;
+    bool isFullySynchronizedLocked();
+    EventEntry* createEntryFromInputEventLocked(const InputEvent* event);
+    void setInjectionResultLocked(EventEntry* entry, int32_t injectionResult);
+
+    // Key repeat tracking.
+    // XXX Move this up to the input reader instead.
+    struct KeyRepeatState {
+        KeyEntry* lastKeyEntry; // or null if no repeat
+        nsecs_t nextRepeatTime;
+    } mKeyRepeatState;
+
+    void resetKeyRepeatLocked();
+
+    // Deferred command processing.
+    bool runCommandsLockedInterruptible();
+    CommandEntry* postCommandLocked(Command command);
+
+    // Process events that have just been dequeued from the head of the input queue.
+    void processConfigurationChangedLockedInterruptible(
+            nsecs_t currentTime, ConfigurationChangedEntry* entry);
+    void processKeyLockedInterruptible(
+            nsecs_t currentTime, KeyEntry* entry, nsecs_t keyRepeatTimeout);
+    void processKeyRepeatLockedInterruptible(
+            nsecs_t currentTime, nsecs_t keyRepeatTimeout);
+    void processMotionLockedInterruptible(
+            nsecs_t currentTime, MotionEntry* entry);
+
+    // Identify input targets for an event and dispatch to them.
+    void identifyInputTargetsAndDispatchKeyLockedInterruptible(
+            nsecs_t currentTime, KeyEntry* entry);
+    void identifyInputTargetsAndDispatchMotionLockedInterruptible(
+            nsecs_t currentTime, MotionEntry* entry);
+    void dispatchEventToCurrentInputTargetsLocked(
+            nsecs_t currentTime, EventEntry* entry, bool resumeWithAppendedMotionSample);
+
+    // Manage the dispatch cycle for a single connection.
+    // These methods are deliberately not Interruptible because doing all of the work
+    // with the mutex held makes it easier to ensure that connection invariants are maintained.
+    // If needed, the methods post commands to run later once the critical bits are done.
+    void prepareDispatchCycleLocked(nsecs_t currentTime, const sp<Connection>& connection,
+            EventEntry* eventEntry, const InputTarget* inputTarget,
+            bool resumeWithAppendedMotionSample);
+    void startDispatchCycleLocked(nsecs_t currentTime, const sp<Connection>& connection);
+    void finishDispatchCycleLocked(nsecs_t currentTime, const sp<Connection>& connection);
+    void timeoutDispatchCycleLocked(nsecs_t currentTime, const sp<Connection>& connection);
+    void resumeAfterTimeoutDispatchCycleLocked(nsecs_t currentTime,
+            const sp<Connection>& connection, nsecs_t newTimeout);
+    void abortDispatchCycleLocked(nsecs_t currentTime, const sp<Connection>& connection,
+            bool broken);
+    static bool handleReceiveCallback(int receiveFd, int events, void* data);
+
+    // Add or remove a connection to the mActiveConnections vector.
+    void activateConnectionLocked(Connection* connection);
+    void deactivateConnectionLocked(Connection* connection);
+
+    // Interesting events that we might like to log or tell the framework about.
+    void onDispatchCycleStartedLocked(
+            nsecs_t currentTime, const sp<Connection>& connection);
+    void onDispatchCycleFinishedLocked(
+            nsecs_t currentTime, const sp<Connection>& connection, bool recoveredFromANR);
+    void onDispatchCycleANRLocked(
+            nsecs_t currentTime, const sp<Connection>& connection);
+    void onDispatchCycleBrokenLocked(
+            nsecs_t currentTime, const sp<Connection>& connection);
+
+    // Outbound policy interactions.
+    void doNotifyInputChannelBrokenLockedInterruptible(CommandEntry* commandEntry);
+    void doNotifyInputChannelANRLockedInterruptible(CommandEntry* commandEntry);
+    void doNotifyInputChannelRecoveredFromANRLockedInterruptible(CommandEntry* commandEntry);
+};
+
+/* Enqueues and dispatches input events, endlessly. */
+class InputDispatcherThread : public Thread {
+public:
+    explicit InputDispatcherThread(const sp<InputDispatcherInterface>& dispatcher);
+    ~InputDispatcherThread();
+
+private:
+    virtual bool threadLoop();
+
+    sp<InputDispatcherInterface> mDispatcher;
+};
+
+} // namespace android
+
+#endif // _UI_INPUT_DISPATCHER_PRIV_H
diff --git a/include/ui/InputManager.h b/include/ui/InputManager.h
new file mode 100644
index 0000000..e755238
--- /dev/null
+++ b/include/ui/InputManager.h
@@ -0,0 +1,164 @@
+/*
+ * Copyright (C) 2010 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef _UI_INPUT_MANAGER_H
+#define _UI_INPUT_MANAGER_H
+
+/**
+ * Native input manager.
+ */
+
+#include <ui/EventHub.h>
+#include <ui/Input.h>
+#include <utils/Errors.h>
+#include <utils/Vector.h>
+#include <utils/Timers.h>
+#include <utils/RefBase.h>
+#include <utils/String8.h>
+
+namespace android {
+
+class InputChannel;
+
+class InputReaderInterface;
+class InputReaderPolicyInterface;
+class InputReaderThread;
+
+class InputDispatcherInterface;
+class InputDispatcherPolicyInterface;
+class InputDispatcherThread;
+
+/*
+ * The input manager is the core of the system event processing.
+ *
+ * The input manager uses two threads.
+ *
+ * 1. The InputReaderThread (called "InputReader") reads and preprocesses raw input events,
+ *    applies policy, and posts messages to a queue managed by the DispatcherThread.
+ * 2. The InputDispatcherThread (called "InputDispatcher") thread waits for new events on the
+ *    queue and asynchronously dispatches them to applications.
+ *
+ * By design, the InputReaderThread class and InputDispatcherThread class do not share any
+ * internal state.  Moreover, all communication is done one way from the InputReaderThread
+ * into the InputDispatcherThread and never the reverse.  Both classes may interact with the
+ * InputDispatchPolicy, however.
+ *
+ * The InputManager class never makes any calls into Java itself.  Instead, the
+ * InputDispatchPolicy is responsible for performing all external interactions with the
+ * system, including calling DVM services.
+ */
+class InputManagerInterface : public virtual RefBase {
+protected:
+    InputManagerInterface() { }
+    virtual ~InputManagerInterface() { }
+
+public:
+    /* Starts the input manager threads. */
+    virtual status_t start() = 0;
+
+    /* Stops the input manager threads and waits for them to exit. */
+    virtual status_t stop() = 0;
+
+    /* Registers an input channel prior to using it as the target of an event. */
+    virtual status_t registerInputChannel(const sp<InputChannel>& inputChannel) = 0;
+
+    /* Unregisters an input channel. */
+    virtual status_t unregisterInputChannel(const sp<InputChannel>& inputChannel) = 0;
+
+    /* Injects an input event and optionally waits for sync.
+     * This method may block even if sync is false because it must wait for previous events
+     * to be dispatched before it can determine whether input event injection will be
+     * permitted based on the current input focus.
+     * Returns one of the INPUT_EVENT_INJECTION_XXX constants.
+     */
+    virtual int32_t injectInputEvent(const InputEvent* event,
+            int32_t injectorPid, int32_t injectorUid, bool sync, int32_t timeoutMillis) = 0;
+
+    /* Preempts input dispatch in progress by making pending synchronous
+     * dispatches asynchronous instead.  This method is generally called during a focus
+     * transition from one application to the next so as to enable the new application
+     * to start receiving input as soon as possible without having to wait for the
+     * old application to finish up.
+     */
+    virtual void preemptInputDispatch() = 0;
+
+    /* Gets input device configuration. */
+    virtual void getInputConfiguration(InputConfiguration* outConfiguration) const = 0;
+
+    /*
+     * Queries current input state.
+     *   deviceId may be -1 to search for the device automatically, filtered by class.
+     *   deviceClasses may be -1 to ignore device class while searching.
+     */
+    virtual int32_t getScanCodeState(int32_t deviceId, int32_t deviceClasses,
+            int32_t scanCode) const = 0;
+    virtual int32_t getKeyCodeState(int32_t deviceId, int32_t deviceClasses,
+            int32_t keyCode) const = 0;
+    virtual int32_t getSwitchState(int32_t deviceId, int32_t deviceClasses,
+            int32_t sw) const = 0;
+
+    /* Determines whether physical keys exist for the given framework-domain key codes. */
+    virtual bool hasKeys(size_t numCodes, const int32_t* keyCodes, uint8_t* outFlags) const = 0;
+};
+
+class InputManager : public InputManagerInterface {
+protected:
+    virtual ~InputManager();
+
+public:
+    InputManager(
+            const sp<EventHubInterface>& eventHub,
+            const sp<InputReaderPolicyInterface>& readerPolicy,
+            const sp<InputDispatcherPolicyInterface>& dispatcherPolicy);
+
+    // (used for testing purposes)
+    InputManager(
+            const sp<InputReaderInterface>& reader,
+            const sp<InputDispatcherInterface>& dispatcher);
+
+    virtual status_t start();
+    virtual status_t stop();
+
+    virtual status_t registerInputChannel(const sp<InputChannel>& inputChannel);
+    virtual status_t unregisterInputChannel(const sp<InputChannel>& inputChannel);
+
+    virtual int32_t injectInputEvent(const InputEvent* event,
+            int32_t injectorPid, int32_t injectorUid, bool sync, int32_t timeoutMillis);
+
+    virtual void preemptInputDispatch();
+
+    virtual void getInputConfiguration(InputConfiguration* outConfiguration) const;
+    virtual int32_t getScanCodeState(int32_t deviceId, int32_t deviceClasses,
+            int32_t scanCode) const;
+    virtual int32_t getKeyCodeState(int32_t deviceId, int32_t deviceClasses,
+            int32_t keyCode) const;
+    virtual int32_t getSwitchState(int32_t deviceId, int32_t deviceClasses,
+            int32_t sw) const;
+    virtual bool hasKeys(size_t numCodes, const int32_t* keyCodes, uint8_t* outFlags) const;
+
+private:
+    sp<InputReaderInterface> mReader;
+    sp<InputReaderThread> mReaderThread;
+
+    sp<InputDispatcherInterface> mDispatcher;
+    sp<InputDispatcherThread> mDispatcherThread;
+
+    void initialize();
+};
+
+} // namespace android
+
+#endif // _UI_INPUT_MANAGER_H
diff --git a/include/ui/InputReader.h b/include/ui/InputReader.h
new file mode 100644
index 0000000..14bea65
--- /dev/null
+++ b/include/ui/InputReader.h
@@ -0,0 +1,334 @@
+/*
+ * Copyright (C) 2010 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef _UI_INPUT_READER_H
+#define _UI_INPUT_READER_H
+
+#include <ui/EventHub.h>
+#include <ui/Input.h>
+#include <ui/InputDevice.h>
+#include <ui/InputDispatcher.h>
+#include <utils/KeyedVector.h>
+#include <utils/threads.h>
+#include <utils/Timers.h>
+#include <utils/RefBase.h>
+#include <utils/String8.h>
+#include <utils/BitSet.h>
+
+#include <stddef.h>
+#include <unistd.h>
+
+namespace android {
+
+/*
+ * Input reader policy interface.
+ *
+ * The input reader policy is used by the input reader to interact with the Window Manager
+ * and other system components.
+ *
+ * The actual implementation is partially supported by callbacks into the DVM
+ * via JNI.  This interface is also mocked in the unit tests.
+ */
+class InputReaderPolicyInterface : public virtual RefBase {
+protected:
+    InputReaderPolicyInterface() { }
+    virtual ~InputReaderPolicyInterface() { }
+
+public:
+    /* Display orientations. */
+    enum {
+        ROTATION_0 = 0,
+        ROTATION_90 = 1,
+        ROTATION_180 = 2,
+        ROTATION_270 = 3
+    };
+
+    /* Actions returned by interceptXXX methods. */
+    enum {
+        // The input dispatcher should do nothing and discard the input unless other
+        // flags are set.
+        ACTION_NONE = 0,
+
+        // The input dispatcher should dispatch the input to the application.
+        ACTION_DISPATCH = 0x00000001,
+
+        // The input dispatcher should perform special filtering in preparation for
+        // a pending app switch.
+        ACTION_APP_SWITCH_COMING = 0x00000002,
+
+        // The input dispatcher should add POLICY_FLAG_WOKE_HERE to the policy flags it
+        // passes through the dispatch pipeline.
+        ACTION_WOKE_HERE = 0x00000004,
+
+        // The input dispatcher should add POLICY_FLAG_BRIGHT_HERE to the policy flags it
+        // passes through the dispatch pipeline.
+        ACTION_BRIGHT_HERE = 0x00000008,
+    };
+
+    /* Describes a virtual key. */
+    struct VirtualKeyDefinition {
+        int32_t scanCode;
+
+        // configured position data, specified in display coords
+        int32_t centerX;
+        int32_t centerY;
+        int32_t width;
+        int32_t height;
+    };
+
+    /* Gets information about the display with the specified id.
+     * Returns true if the display info is available, false otherwise.
+     */
+    virtual bool getDisplayInfo(int32_t displayId,
+            int32_t* width, int32_t* height, int32_t* orientation) = 0;
+
+    /* Provides feedback for a virtual key down.
+     */
+    virtual void virtualKeyDownFeedback() = 0;
+
+    /* Intercepts a key event.
+     * The policy can use this method as an opportunity to perform power management functions
+     * and early event preprocessing.
+     *
+     * Returns a policy action constant such as ACTION_DISPATCH.
+     */
+    virtual int32_t interceptKey(nsecs_t when, int32_t deviceId,
+            bool down, int32_t keyCode, int32_t scanCode, uint32_t policyFlags) = 0;
+
+    /* Intercepts a trackball event.
+     * The policy can use this method as an opportunity to perform power management functions
+     * and early event preprocessing.
+     *
+     * Returns a policy action constant such as ACTION_DISPATCH.
+     */
+    virtual int32_t interceptTrackball(nsecs_t when, bool buttonChanged, bool buttonDown,
+            bool rolled) = 0;
+
+    /* Intercepts a touch event.
+     * The policy can use this method as an opportunity to perform power management functions
+     * and early event preprocessing.
+     *
+     * Returns a policy action constant such as ACTION_DISPATCH.
+     */
+    virtual int32_t interceptTouch(nsecs_t when) = 0;
+
+    /* Intercepts a switch event.
+     * The policy can use this method as an opportunity to perform power management functions
+     * and early event preprocessing.
+     *
+     * Switches are not dispatched to applications so this method should
+     * usually return ACTION_NONE.
+     */
+    virtual int32_t interceptSwitch(nsecs_t when, int32_t switchCode, int32_t switchValue) = 0;
+
+    /* Determines whether to turn on some hacks we have to improve the touch interaction with a
+     * certain device whose screen currently is not all that good.
+     */
+    virtual bool filterTouchEvents() = 0;
+
+    /* Determines whether to turn on some hacks to improve touch interaction with another device
+     * where touch coordinate data can get corrupted.
+     */
+    virtual bool filterJumpyTouchEvents() = 0;
+
+    /* Gets the configured virtual key definitions for an input device. */
+    virtual void getVirtualKeyDefinitions(const String8& deviceName,
+            Vector<VirtualKeyDefinition>& outVirtualKeyDefinitions) = 0;
+
+    /* Gets the excluded device names for the platform. */
+    virtual void getExcludedDeviceNames(Vector<String8>& outExcludedDeviceNames) = 0;
+};
+
+
+/* Processes raw input events and sends cooked event data to an input dispatcher. */
+class InputReaderInterface : public virtual RefBase {
+protected:
+    InputReaderInterface() { }
+    virtual ~InputReaderInterface() { }
+
+public:
+    /* Runs a single iteration of the processing loop.
+     * Nominally reads and processes one incoming message from the EventHub.
+     *
+     * This method should be called on the input reader thread.
+     */
+    virtual void loopOnce() = 0;
+
+    /* Gets the current virtual key.  Returns false if not down.
+     *
+     * This method may be called on any thread (usually by the input manager).
+     */
+    virtual bool getCurrentVirtualKey(int32_t* outKeyCode, int32_t* outScanCode) const = 0;
+
+    /* Gets the current input device configuration.
+     *
+     * This method may be called on any thread (usually by the input manager).
+     */
+    virtual void getCurrentInputConfiguration(InputConfiguration* outConfiguration) const = 0;
+
+    /*
+     * Query current input state.
+     *   deviceId may be -1 to search for the device automatically, filtered by class.
+     *   deviceClasses may be -1 to ignore device class while searching.
+     */
+    virtual int32_t getCurrentScanCodeState(int32_t deviceId, int32_t deviceClasses,
+            int32_t scanCode) const = 0;
+    virtual int32_t getCurrentKeyCodeState(int32_t deviceId, int32_t deviceClasses,
+            int32_t keyCode) const = 0;
+    virtual int32_t getCurrentSwitchState(int32_t deviceId, int32_t deviceClasses,
+            int32_t sw) const = 0;
+
+    /* Determine whether physical keys exist for the given framework-domain key codes. */
+    virtual bool hasKeys(size_t numCodes, const int32_t* keyCodes, uint8_t* outFlags) const = 0;
+};
+
+
+/* The input reader reads raw event data from the event hub and processes it into input events
+ * that it sends to the input dispatcher.  Some functions of the input reader, such as early
+ * event filtering in low power states, are controlled by a separate policy object.
+ *
+ * IMPORTANT INVARIANT:
+ *     Because the policy can potentially block or cause re-entrance into the input reader,
+ *     the input reader never calls into the policy while holding its internal locks.
+ */
+class InputReader : public InputReaderInterface {
+public:
+    InputReader(const sp<EventHubInterface>& eventHub,
+            const sp<InputReaderPolicyInterface>& policy,
+            const sp<InputDispatcherInterface>& dispatcher);
+    virtual ~InputReader();
+
+    virtual void loopOnce();
+
+    virtual bool getCurrentVirtualKey(int32_t* outKeyCode, int32_t* outScanCode) const;
+
+    virtual void getCurrentInputConfiguration(InputConfiguration* outConfiguration) const;
+
+    virtual int32_t getCurrentScanCodeState(int32_t deviceId, int32_t deviceClasses,
+            int32_t scanCode) const;
+    virtual int32_t getCurrentKeyCodeState(int32_t deviceId, int32_t deviceClasses,
+            int32_t keyCode) const;
+    virtual int32_t getCurrentSwitchState(int32_t deviceId, int32_t deviceClasses,
+            int32_t sw) const;
+
+    virtual bool hasKeys(size_t numCodes, const int32_t* keyCodes, uint8_t* outFlags) const;
+
+private:
+    // Lock that must be acquired while manipulating state that may be concurrently accessed
+    // from other threads by input state query methods.  It should be held for as short a
+    // time as possible.
+    //
+    // Exported state:
+    //   - global virtual key code and scan code
+    //   - device list and immutable properties of devices such as id, name, and class
+    //     (but not other internal device state)
+    mutable Mutex mExportedStateLock;
+
+    // current virtual key information (lock mExportedStateLock)
+    int32_t mExportedVirtualKeyCode;
+    int32_t mExportedVirtualScanCode;
+
+    // current input configuration (lock mExportedStateLock)
+    InputConfiguration mExportedInputConfiguration;
+
+    // combined key meta state
+    int32_t mGlobalMetaState;
+
+    sp<EventHubInterface> mEventHub;
+    sp<InputReaderPolicyInterface> mPolicy;
+    sp<InputDispatcherInterface> mDispatcher;
+
+    KeyedVector<int32_t, InputDevice*> mDevices;
+
+    // display properties needed to translate touch screen coordinates into display coordinates
+    int32_t mDisplayOrientation;
+    int32_t mDisplayWidth;
+    int32_t mDisplayHeight;
+
+    // low-level input event decoding
+    void process(const RawEvent* rawEvent);
+    void handleDeviceAdded(const RawEvent* rawEvent);
+    void handleDeviceRemoved(const RawEvent* rawEvent);
+    void handleSync(const RawEvent* rawEvent);
+    void handleKey(const RawEvent* rawEvent);
+    void handleRelativeMotion(const RawEvent* rawEvent);
+    void handleAbsoluteMotion(const RawEvent* rawEvent);
+    void handleSwitch(const RawEvent* rawEvent);
+
+    // input policy processing and dispatch
+    void onKey(nsecs_t when, InputDevice* device, bool down,
+            int32_t keyCode, int32_t scanCode, uint32_t policyFlags);
+    void onSwitch(nsecs_t when, InputDevice* device, int32_t switchCode, int32_t switchValue);
+    void onSingleTouchScreenStateChanged(nsecs_t when, InputDevice* device);
+    void onMultiTouchScreenStateChanged(nsecs_t when, InputDevice* device);
+    void onTouchScreenChanged(nsecs_t when, InputDevice* device, bool havePointerIds);
+    void onTrackballStateChanged(nsecs_t when, InputDevice* device);
+    void onConfigurationChanged(nsecs_t when);
+
+    bool applyStandardInputDispatchPolicyActions(nsecs_t when,
+            int32_t policyActions, uint32_t* policyFlags);
+
+    bool consumeVirtualKeyTouches(nsecs_t when, InputDevice* device, uint32_t policyFlags);
+    void dispatchVirtualKey(nsecs_t when, InputDevice* device, uint32_t policyFlags,
+            int32_t keyEventAction, int32_t keyEventFlags);
+    void dispatchTouches(nsecs_t when, InputDevice* device, uint32_t policyFlags);
+    void dispatchTouch(nsecs_t when, InputDevice* device, uint32_t policyFlags,
+            InputDevice::TouchData* touch, BitSet32 idBits, uint32_t changedId,
+            int32_t motionEventAction);
+
+    // display
+    void resetDisplayProperties();
+    bool refreshDisplayProperties();
+
+    // device management
+    InputDevice* getDevice(int32_t deviceId);
+    InputDevice* getNonIgnoredDevice(int32_t deviceId);
+    void addDevice(nsecs_t when, int32_t deviceId);
+    void removeDevice(nsecs_t when, InputDevice* device);
+    void configureDevice(InputDevice* device);
+    void configureDeviceForCurrentDisplaySize(InputDevice* device);
+    void configureVirtualKeys(InputDevice* device);
+    void configureAbsoluteAxisInfo(InputDevice* device, int axis, const char* name,
+            InputDevice::AbsoluteAxisInfo* out);
+    void configureExcludedDevices();
+
+    // global meta state management for all devices
+    void resetGlobalMetaState();
+    int32_t globalMetaState();
+
+    // virtual key management
+    void updateExportedVirtualKeyState();
+
+    // input configuration management
+    void updateExportedInputConfiguration();
+};
+
+
+/* Reads raw events from the event hub and processes them, endlessly. */
+class InputReaderThread : public Thread {
+public:
+    InputReaderThread(const sp<InputReaderInterface>& reader);
+    virtual ~InputReaderThread();
+
+private:
+    sp<InputReaderInterface> mReader;
+
+    virtual bool threadLoop();
+};
+
+} // namespace android
+
+#endif // _UI_INPUT_READER_H
diff --git a/include/ui/InputTransport.h b/include/ui/InputTransport.h
new file mode 100644
index 0000000..31ec701
--- /dev/null
+++ b/include/ui/InputTransport.h
@@ -0,0 +1,334 @@
+/*
+ * Copyright (C) 2010 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef _UI_INPUT_TRANSPORT_H
+#define _UI_INPUT_TRANSPORT_H
+
+/**
+ * Native input transport.
+ *
+ * Uses anonymous shared memory as a whiteboard for sending input events from an
+ * InputPublisher to an InputConsumer and ensuring appropriate synchronization.
+ * One interesting feature is that published events can be updated in place as long as they
+ * have not yet been consumed.
+ *
+ * The InputPublisher and InputConsumer only take care of transferring event data
+ * over an InputChannel and sending synchronization signals.  The InputDispatcher and InputQueue
+ * build on these abstractions to add multiplexing and queueing.
+ */
+
+#include <semaphore.h>
+#include <ui/Input.h>
+#include <utils/Errors.h>
+#include <utils/PollLoop.h>
+#include <utils/Timers.h>
+#include <utils/RefBase.h>
+#include <utils/String8.h>
+
+namespace android {
+
+/*
+ * An input channel consists of a shared memory buffer and a pair of pipes
+ * used to send input messages from an InputPublisher to an InputConsumer
+ * across processes.  Each channel has a descriptive name for debugging purposes.
+ *
+ * Each endpoint has its own InputChannel object that specifies its own file descriptors.
+ *
+ * The input channel is closed when all references to it are released.
+ */
+class InputChannel : public RefBase {
+protected:
+    virtual ~InputChannel();
+
+public:
+    InputChannel(const String8& name, int32_t ashmemFd, int32_t receivePipeFd,
+            int32_t sendPipeFd);
+
+    /* Creates a pair of input channels and their underlying shared memory buffers
+     * and pipes.
+     *
+     * Returns OK on success.
+     */
+    static status_t openInputChannelPair(const String8& name,
+            sp<InputChannel>& outServerChannel, sp<InputChannel>& outClientChannel);
+
+    inline String8 getName() const { return mName; }
+    inline int32_t getAshmemFd() const { return mAshmemFd; }
+    inline int32_t getReceivePipeFd() const { return mReceivePipeFd; }
+    inline int32_t getSendPipeFd() const { return mSendPipeFd; }
+
+    /* Sends a signal to the other endpoint.
+     *
+     * Returns OK on success.
+     * Returns DEAD_OBJECT if the channel's peer has been closed.
+     * Other errors probably indicate that the channel is broken.
+     */
+    status_t sendSignal(char signal);
+
+    /* Receives a signal send by the other endpoint.
+     * (Should only call this after poll() indicates that the receivePipeFd has available input.)
+     *
+     * Returns OK on success.
+     * Returns WOULD_BLOCK if there is no signal present.
+     * Returns DEAD_OBJECT if the channel's peer has been closed.
+     * Other errors probably indicate that the channel is broken.
+     */
+    status_t receiveSignal(char* outSignal);
+
+private:
+    String8 mName;
+    int32_t mAshmemFd;
+    int32_t mReceivePipeFd;
+    int32_t mSendPipeFd;
+};
+
+/*
+ * Private intermediate representation of input events as messages written into an
+ * ashmem buffer.
+ */
+struct InputMessage {
+    /* Semaphore count is set to 1 when the message is published.
+     * It becomes 0 transiently while the publisher updates the message.
+     * It becomes 0 permanently when the consumer consumes the message.
+     */
+    sem_t semaphore;
+
+    /* Initialized to false by the publisher.
+     * Set to true by the consumer when it consumes the message.
+     */
+    bool consumed;
+
+    int32_t type;
+
+    struct SampleData {
+        nsecs_t eventTime;
+        PointerCoords coords[0]; // variable length
+    };
+
+    int32_t deviceId;
+    int32_t source;
+
+    union {
+        struct {
+            int32_t action;
+            int32_t flags;
+            int32_t keyCode;
+            int32_t scanCode;
+            int32_t metaState;
+            int32_t repeatCount;
+            nsecs_t downTime;
+            nsecs_t eventTime;
+        } key;
+
+        struct {
+            int32_t action;
+            int32_t metaState;
+            int32_t edgeFlags;
+            nsecs_t downTime;
+            float xOffset;
+            float yOffset;
+            float xPrecision;
+            float yPrecision;
+            size_t pointerCount;
+            int32_t pointerIds[MAX_POINTERS];
+            size_t sampleCount;
+            SampleData sampleData[0]; // variable length
+        } motion;
+    };
+
+    /* Gets the number of bytes to add to step to the next SampleData object in a motion
+     * event message for a given number of pointers.
+     */
+    static inline size_t sampleDataStride(size_t pointerCount) {
+        return sizeof(InputMessage::SampleData) + pointerCount * sizeof(PointerCoords);
+    }
+
+    /* Adds the SampleData stride to the given pointer. */
+    static inline SampleData* sampleDataPtrIncrement(SampleData* ptr, size_t stride) {
+        return reinterpret_cast<InputMessage::SampleData*>(reinterpret_cast<char*>(ptr) + stride);
+    }
+};
+
+/*
+ * Publishes input events to an anonymous shared memory buffer.
+ * Uses atomic operations to coordinate shared access with a single concurrent consumer.
+ */
+class InputPublisher {
+public:
+    /* Creates a publisher associated with an input channel. */
+    explicit InputPublisher(const sp<InputChannel>& channel);
+
+    /* Destroys the publisher and releases its input channel. */
+    ~InputPublisher();
+
+    /* Gets the underlying input channel. */
+    inline sp<InputChannel> getChannel() { return mChannel; }
+
+    /* Prepares the publisher for use.  Must be called before it is used.
+     * Returns OK on success.
+     *
+     * This method implicitly calls reset(). */
+    status_t initialize();
+
+    /* Resets the publisher to its initial state and unpins its ashmem buffer.
+     * Returns OK on success.
+     *
+     * Should be called after an event has been consumed to release resources used by the
+     * publisher until the next event is ready to be published.
+     */
+    status_t reset();
+
+    /* Publishes a key event to the ashmem buffer.
+     *
+     * Returns OK on success.
+     * Returns INVALID_OPERATION if the publisher has not been reset.
+     */
+    status_t publishKeyEvent(
+            int32_t deviceId,
+            int32_t source,
+            int32_t action,
+            int32_t flags,
+            int32_t keyCode,
+            int32_t scanCode,
+            int32_t metaState,
+            int32_t repeatCount,
+            nsecs_t downTime,
+            nsecs_t eventTime);
+
+    /* Publishes a motion event to the ashmem buffer.
+     *
+     * Returns OK on success.
+     * Returns INVALID_OPERATION if the publisher has not been reset.
+     * Returns BAD_VALUE if pointerCount is less than 1 or greater than MAX_POINTERS.
+     */
+    status_t publishMotionEvent(
+            int32_t deviceId,
+            int32_t source,
+            int32_t action,
+            int32_t edgeFlags,
+            int32_t metaState,
+            float xOffset,
+            float yOffset,
+            float xPrecision,
+            float yPrecision,
+            nsecs_t downTime,
+            nsecs_t eventTime,
+            size_t pointerCount,
+            const int32_t* pointerIds,
+            const PointerCoords* pointerCoords);
+
+    /* Appends a motion sample to a motion event unless already consumed.
+     *
+     * Returns OK on success.
+     * Returns INVALID_OPERATION if the current event is not a AMOTION_EVENT_ACTION_MOVE event.
+     * Returns FAILED_TRANSACTION if the current event has already been consumed.
+     * Returns NO_MEMORY if the buffer is full and no additional samples can be added.
+     */
+    status_t appendMotionSample(
+            nsecs_t eventTime,
+            const PointerCoords* pointerCoords);
+
+    /* Sends a dispatch signal to the consumer to inform it that a new message is available.
+     *
+     * Returns OK on success.
+     * Errors probably indicate that the channel is broken.
+     */
+    status_t sendDispatchSignal();
+
+    /* Receives the finished signal from the consumer in reply to the original dispatch signal.
+     *
+     * Returns OK on success.
+     * Returns WOULD_BLOCK if there is no signal present.
+     * Other errors probably indicate that the channel is broken.
+     */
+    status_t receiveFinishedSignal();
+
+private:
+    sp<InputChannel> mChannel;
+
+    size_t mAshmemSize;
+    InputMessage* mSharedMessage;
+    bool mPinned;
+    bool mSemaphoreInitialized;
+    bool mWasDispatched;
+
+    size_t mMotionEventPointerCount;
+    InputMessage::SampleData* mMotionEventSampleDataTail;
+    size_t mMotionEventSampleDataStride;
+
+    status_t publishInputEvent(
+            int32_t type,
+            int32_t deviceId,
+            int32_t source);
+};
+
+/*
+ * Consumes input events from an anonymous shared memory buffer.
+ * Uses atomic operations to coordinate shared access with a single concurrent publisher.
+ */
+class InputConsumer {
+public:
+    /* Creates a consumer associated with an input channel. */
+    explicit InputConsumer(const sp<InputChannel>& channel);
+
+    /* Destroys the consumer and releases its input channel. */
+    ~InputConsumer();
+
+    /* Gets the underlying input channel. */
+    inline sp<InputChannel> getChannel() { return mChannel; }
+
+    /* Prepares the consumer for use.  Must be called before it is used. */
+    status_t initialize();
+
+    /* Consumes the input event in the buffer and copies its contents into
+     * an InputEvent object created using the specified factory.
+     * This operation will block if the publisher is updating the event.
+     *
+     * Returns OK on success.
+     * Returns INVALID_OPERATION if there is no currently published event.
+     * Returns NO_MEMORY if the event could not be created.
+     */
+    status_t consume(InputEventFactoryInterface* factory, InputEvent** outEvent);
+
+    /* Sends a finished signal to the publisher to inform it that the current message is
+     * finished processing.
+     *
+     * Returns OK on success.
+     * Errors probably indicate that the channel is broken.
+     */
+    status_t sendFinishedSignal();
+
+    /* Receives the dispatched signal from the publisher.
+     *
+     * Returns OK on success.
+     * Returns WOULD_BLOCK if there is no signal present.
+     * Other errors probably indicate that the channel is broken.
+     */
+    status_t receiveDispatchSignal();
+
+private:
+    sp<InputChannel> mChannel;
+
+    size_t mAshmemSize;
+    InputMessage* mSharedMessage;
+
+    void populateKeyEvent(KeyEvent* keyEvent) const;
+    void populateMotionEvent(MotionEvent* motionEvent) const;
+};
+
+} // namespace android
+
+#endif // _UI_INPUT_TRANSPORT_H
diff --git a/include/ui/KeycodeLabels.h b/include/ui/KeycodeLabels.h
old mode 100644
new mode 100755
index 571e47b..c8d6ffc
--- a/include/ui/KeycodeLabels.h
+++ b/include/ui/KeycodeLabels.h
@@ -17,6 +17,8 @@
 #ifndef _UI_KEYCODE_LABELS_H
 #define _UI_KEYCODE_LABELS_H
 
+#include <android/keycodes.h>
+
 struct KeycodeLabel {
     const char *literal;
     int value;
@@ -114,113 +116,32 @@
     { "MEDIA_REWIND", 89 },
     { "MEDIA_FAST_FORWARD", 90 },
     { "MUTE", 91 },
+    { "PAGE_UP", 92 },
+    { "PAGE_DOWN", 93 },
+    { "PICTSYMBOLS", 94 },
+    { "SWITCH_CHARSET", 95 },
+    { "BUTTON_A", 96 },
+    { "BUTTON_B", 97 },
+    { "BUTTON_C", 98 },
+    { "BUTTON_X", 99 },
+    { "BUTTON_Y", 100 },
+    { "BUTTON_Z", 101 },
+    { "BUTTON_L1", 102 },
+    { "BUTTON_R1", 103 },
+    { "BUTTON_L2", 104 },
+    { "BUTTON_R2", 105 },
+    { "BUTTON_THUMBL", 106 },
+    { "BUTTON_THUMBR", 107 },
+    { "BUTTON_START", 108 },
+    { "BUTTON_SELECT", 109 },
+    { "BUTTON_MODE", 110 },
 
-    // NOTE: If you add a new keycode here you must also add it to:
-    //   (enum KeyCode, in this file)
-    //   frameworks/base/core/java/android/view/KeyEvent.java
-    //   tools/puppet_master/PuppetMaster.nav_keys.py
-    //   frameworks/base/core/res/res/values/attrs.xml
+    // NOTE: If you add a new keycode here you must also add it to several other files.
+    //       Refer to frameworks/base/core/java/android/view/KeyEvent.java for the full list.
 
     { NULL, 0 }
 };
 
-// These constants need to match the above mappings.
-typedef enum KeyCode {
-    kKeyCodeUnknown = 0,
-
-    kKeyCodeSoftLeft = 1,
-    kKeyCodeSoftRight = 2,
-    kKeyCodeHome = 3,
-    kKeyCodeBack = 4,
-    kKeyCodeCall = 5,
-    kKeyCodeEndCall = 6,
-    kKeyCode0 = 7,
-    kKeyCode1 = 8,
-    kKeyCode2 = 9,
-    kKeyCode3 = 10,
-    kKeyCode4 = 11,
-    kKeyCode5 = 12,
-    kKeyCode6 = 13,
-    kKeyCode7 = 14,
-    kKeyCode8 = 15,
-    kKeyCode9 = 16,
-    kKeyCodeStar = 17,
-    kKeyCodePound = 18,
-    kKeyCodeDpadUp = 19,
-    kKeyCodeDpadDown = 20,
-    kKeyCodeDpadLeft = 21,
-    kKeyCodeDpadRight = 22,
-    kKeyCodeDpadCenter = 23,
-    kKeyCodeVolumeUp = 24,
-    kKeyCodeVolumeDown = 25,
-    kKeyCodePower = 26,
-    kKeyCodeCamera = 27,
-    kKeyCodeClear = 28,
-    kKeyCodeA = 29,
-    kKeyCodeB = 30,
-    kKeyCodeC = 31,
-    kKeyCodeD = 32,
-    kKeyCodeE = 33,
-    kKeyCodeF = 34,
-    kKeyCodeG = 35,
-    kKeyCodeH = 36,
-    kKeyCodeI = 37,
-    kKeyCodeJ = 38,
-    kKeyCodeK = 39,
-    kKeyCodeL = 40,
-    kKeyCodeM = 41,
-    kKeyCodeN = 42,
-    kKeyCodeO = 43,
-    kKeyCodeP = 44,
-    kKeyCodeQ = 45,
-    kKeyCodeR = 46,
-    kKeyCodeS = 47,
-    kKeyCodeT = 48,
-    kKeyCodeU = 49,
-    kKeyCodeV = 50,
-    kKeyCodeW = 51,
-    kKeyCodeX = 52,
-    kKeyCodeY = 53,
-    kKeyCodeZ = 54,
-    kKeyCodeComma = 55,
-    kKeyCodePeriod = 56,
-    kKeyCodeAltLeft = 57,
-    kKeyCodeAltRight = 58,
-    kKeyCodeShiftLeft = 59,
-    kKeyCodeShiftRight = 60,
-    kKeyCodeTab = 61,
-    kKeyCodeSpace = 62,
-    kKeyCodeSym = 63,
-    kKeyCodeExplorer = 64,
-    kKeyCodeEnvelope = 65,
-    kKeyCodeNewline = 66,
-    kKeyCodeDel = 67,
-    kKeyCodeGrave = 68,
-    kKeyCodeMinus = 69,
-    kKeyCodeEquals = 70,
-    kKeyCodeLeftBracket = 71,
-    kKeyCodeRightBracket = 72,
-    kKeyCodeBackslash = 73,
-    kKeyCodeSemicolon = 74,
-    kKeyCodeApostrophe = 75,
-    kKeyCodeSlash = 76,
-    kKeyCodeAt = 77,
-    kKeyCodeNum = 78,
-    kKeyCodeHeadSetHook = 79,
-    kKeyCodeFocus = 80,
-    kKeyCodePlus = 81,
-    kKeyCodeMenu = 82,
-    kKeyCodeNotification = 83,
-    kKeyCodeSearch = 84,
-    kKeyCodePlayPause = 85,
-    kKeyCodeStop = 86,
-    kKeyCodeNextSong = 87,
-    kKeyCodePreviousSong = 88,
-    kKeyCodeRewind = 89,
-    kKeyCodeForward = 90,
-    kKeyCodeMute = 91
-} KeyCode;
-
 static const KeycodeLabel FLAGS[] = {
     { "WAKE", 0x00000001 },
     { "WAKE_DROPPED", 0x00000002 },
diff --git a/include/ui/Rect.h b/include/ui/Rect.h
index a213c09..4e65a2d 100644
--- a/include/ui/Rect.h
+++ b/include/ui/Rect.h
@@ -20,31 +20,28 @@
 #include <utils/TypeHelpers.h>
 #include <ui/Point.h>
 
+#include <android/rect.h>
+
 namespace android {
 
-class Rect
+class Rect : public ARect
 {
 public:
-    int left;
-    int top;
-    int right;
-    int bottom;
-
-    typedef int value_type;
+    typedef int32_t value_type;
 
     // we don't provide copy-ctor and operator= on purpose
     // because we want the compiler generated versions
 
     inline Rect() {
     }
-    inline Rect(int w, int h)
-        : left(0), top(0), right(w), bottom(h) {
+    inline Rect(int32_t w, int32_t h) {
+        left = top = 0; right = w; bottom = h;
     }
-    inline Rect(int l, int t, int r, int b)
-        : left(l), top(t), right(r), bottom(b) {
+    inline Rect(int32_t l, int32_t t, int32_t r, int32_t b) {
+        left = l; top = t; right = r; bottom = b;
     }
-    inline Rect(const Point& lt, const Point& rb) 
-        : left(lt.x), top(lt.y), right(rb.x), bottom(rb.y) {
+    inline Rect(const Point& lt, const Point& rb) {
+        left = lt.x; top = lt.y; right = rb.x; bottom = rb.y;
     }
 
     void makeInvalid();
@@ -68,12 +65,12 @@
     }
 
     // rectangle's width
-    inline int width() const {
+    inline int32_t width() const {
         return right-left;
     }
     
     // rectangle's height
-    inline int height() const {
+    inline int32_t height() const {
         return bottom-top;
     }
 
@@ -136,12 +133,12 @@
     const Rect operator + (const Point& rhs) const;
     const Rect operator - (const Point& rhs) const;
 
-    void translate(int dx, int dy) { // legacy, don't use.
+    void translate(int32_t dx, int32_t dy) { // legacy, don't use.
         offsetBy(dx, dy);
     }
  
-    Rect&   offsetTo(int x, int y);
-    Rect&   offsetBy(int x, int y);
+    Rect&   offsetTo(int32_t x, int32_t y);
+    Rect&   offsetBy(int32_t x, int32_t y);
     bool    intersect(const Rect& with, Rect* result) const;
 };
 
diff --git a/include/ui/android_native_buffer.h b/include/ui/android_native_buffer.h
index 9c92af8..402843e 100644
--- a/include/ui/android_native_buffer.h
+++ b/include/ui/android_native_buffer.h
@@ -33,6 +33,15 @@
         common.version = sizeof(android_native_buffer_t);
         memset(common.reserved, 0, sizeof(common.reserved));
     }
+
+    // Implement the methods that sp<android_native_buffer_t> expects so that it
+    // can be used to automatically refcount android_native_buffer_t's.
+    void incStrong(const void* id) const {
+        common.incRef(const_cast<android_native_base_t*>(&common));
+    }
+    void decStrong(const void* id) const {
+        common.decRef(const_cast<android_native_base_t*>(&common));
+    }
 #endif
 
     struct android_native_base_t common;
diff --git a/include/ui/egl/android_natives.h b/include/ui/egl/android_natives.h
index 773fd93..ca89b06 100644
--- a/include/ui/egl/android_natives.h
+++ b/include/ui/egl/android_natives.h
@@ -22,6 +22,8 @@
 
 #include <hardware/gralloc.h>
 
+#include <android/native_window.h>
+
 #ifdef __cplusplus
 extern "C" {
 #endif
@@ -41,6 +43,14 @@
 
 struct android_native_buffer_t;
 
+typedef struct android_native_rect_t
+{
+    int32_t left;
+    int32_t top;
+    int32_t right;
+    int32_t bottom;
+} android_native_rect_t;
+
 // ---------------------------------------------------------------------------
 
 typedef struct android_native_base_t
@@ -63,15 +73,18 @@
 /* attributes queriable with query() */
 enum {
     NATIVE_WINDOW_WIDTH     = 0,
-    NATIVE_WINDOW_HEIGHT    = 1,
-    NATIVE_WINDOW_FORMAT    = 2,
+    NATIVE_WINDOW_HEIGHT,
+    NATIVE_WINDOW_FORMAT,
 };
 
 /* valid operations for the (*perform)() hook */
 enum {
     NATIVE_WINDOW_SET_USAGE  = 0,
-    NATIVE_WINDOW_CONNECT    = 1,
-    NATIVE_WINDOW_DISCONNECT = 2
+    NATIVE_WINDOW_CONNECT,
+    NATIVE_WINDOW_DISCONNECT,
+    NATIVE_WINDOW_SET_CROP,
+    NATIVE_WINDOW_SET_BUFFER_COUNT,
+    NATIVE_WINDOW_SET_BUFFERS_GEOMETRY,
 };
 
 /* parameter for NATIVE_WINDOW_[DIS]CONNECT */
@@ -79,16 +92,25 @@
     NATIVE_WINDOW_API_EGL = 1
 };
 
-typedef struct android_native_window_t 
+struct ANativeWindow 
 {
 #ifdef __cplusplus
-    android_native_window_t()
+    ANativeWindow()
         : flags(0), minSwapInterval(0), maxSwapInterval(0), xdpi(0), ydpi(0)
     {
         common.magic = ANDROID_NATIVE_WINDOW_MAGIC;
-        common.version = sizeof(android_native_window_t);
+        common.version = sizeof(ANativeWindow);
         memset(common.reserved, 0, sizeof(common.reserved));
     }
+
+    // Implement the methods that sp<ANativeWindow> expects so that it
+    // can be used to automatically refcount ANativeWindow's.
+    void incStrong(const void* id) const {
+        common.incRef(const_cast<android_native_base_t*>(&common));
+    }
+    void decStrong(const void* id) const {
+        common.decRef(const_cast<android_native_base_t*>(&common));
+    }
 #endif
     
     struct android_native_base_t common;
@@ -115,7 +137,7 @@
      * 
      * Returns 0 on success or -errno on error.
      */
-    int     (*setSwapInterval)(struct android_native_window_t* window,
+    int     (*setSwapInterval)(struct ANativeWindow* window,
                 int interval);
     
     /*
@@ -125,7 +147,7 @@
      * 
      * Returns 0 on success or -errno on error.
      */
-    int     (*dequeueBuffer)(struct android_native_window_t* window, 
+    int     (*dequeueBuffer)(struct ANativeWindow* window,
                 struct android_native_buffer_t** buffer);
 
     /*
@@ -135,7 +157,7 @@
      * 
      * Returns 0 on success or -errno on error.
      */
-    int     (*lockBuffer)(struct android_native_window_t* window,
+    int     (*lockBuffer)(struct ANativeWindow* window,
                 struct android_native_buffer_t* buffer);
    /*
     * hook called by EGL when modifications to the render buffer are done. 
@@ -145,7 +167,7 @@
     * 
     * Returns 0 on success or -errno on error.
     */
-    int     (*queueBuffer)(struct android_native_window_t* window,
+    int     (*queueBuffer)(struct ANativeWindow* window,
                 struct android_native_buffer_t* buffer);
 
     /*
@@ -153,13 +175,13 @@
      * 
      * Returns 0 on success or -errno on error.
      */
-    int     (*query)(struct android_native_window_t* window,
+    int     (*query)(struct ANativeWindow* window,
                 int what, int* value);
     
     /*
      * hook used to perform various operations on the surface.
      * (*perform)() is a generic mechanism to add functionality to
-     * android_native_window_t while keeping backward binary compatibility.
+     * ANativeWindow while keeping backward binary compatibility.
      * 
      * This hook should not be called directly, instead use the helper functions
      * defined below.
@@ -171,19 +193,25 @@
      *     NATIVE_WINDOW_SET_USAGE
      *     NATIVE_WINDOW_CONNECT
      *     NATIVE_WINDOW_DISCONNECT
+     *     NATIVE_WINDOW_SET_CROP
+     *     NATIVE_WINDOW_SET_BUFFER_COUNT
+     *     NATIVE_WINDOW_SET_BUFFERS_GEOMETRY
      *  
      */
     
-    int     (*perform)(struct android_native_window_t* window,
+    int     (*perform)(struct ANativeWindow* window,
                 int operation, ... );
     
     void* reserved_proc[3];
-} android_native_window_t;
+};
 
+// Backwards compatibility...  please switch to ANativeWindow.
+typedef struct ANativeWindow android_native_window_t;
 
 /*
- *  native_window_set_usage() sets the intended usage flags for the next
- *  buffers acquired with (*lockBuffer)() and on.
+ *  native_window_set_usage(..., usage)
+ *  Sets the intended usage flags for the next buffers
+ *  acquired with (*lockBuffer)() and on.
  *  By default (if this function is never called), a usage of
  *      GRALLOC_USAGE_HW_RENDER | GRALLOC_USAGE_HW_TEXTURE
  *  is assumed.
@@ -192,35 +220,83 @@
  */
 
 static inline int native_window_set_usage(
-        android_native_window_t* window, int usage)
+        ANativeWindow* window, int usage)
 {
     return window->perform(window, NATIVE_WINDOW_SET_USAGE, usage);
 }
 
 /*
- * native_window_connect(..., NATIVE_WINDOW_API_EGL) must be called
- * by EGL when the window is made current.
+ * native_window_connect(..., NATIVE_WINDOW_API_EGL)
+ * Must be called by EGL when the window is made current.
  * Returns -EINVAL if for some reason the window cannot be connected, which
  * can happen if it's connected to some other API.
  */
 static inline int native_window_connect(
-        android_native_window_t* window, int api)
+        ANativeWindow* window, int api)
 {
     return window->perform(window, NATIVE_WINDOW_CONNECT, api);
 }
 
 /*
- * native_window_disconnect(..., NATIVE_WINDOW_API_EGL) must be called
- * by EGL when the window is made not current.
+ * native_window_disconnect(..., NATIVE_WINDOW_API_EGL)
+ * Must be called by EGL when the window is made not current.
  * An error is returned if for instance the window wasn't connected in the
  * first place.
  */
 static inline int native_window_disconnect(
-        android_native_window_t* window, int api)
+        ANativeWindow* window, int api)
 {
     return window->perform(window, NATIVE_WINDOW_DISCONNECT, api);
 }
 
+/*
+ * native_window_set_crop(..., crop)
+ * Sets which region of the next queued buffers needs to be considered.
+ * A buffer's crop region is scaled to match the surface's size.
+ *
+ * The specified crop region applies to all buffers queued after it is called.
+ *
+ * if 'crop' is NULL, subsequently queued buffers won't be cropped.
+ *
+ * An error is returned if for instance the crop region is invalid,
+ * out of the buffer's bound or if the window is invalid.
+ */
+static inline int native_window_set_crop(
+        ANativeWindow* window,
+        android_native_rect_t const * crop)
+{
+    return window->perform(window, NATIVE_WINDOW_SET_CROP, crop);
+}
+
+/*
+ * native_window_set_buffer_count(..., count)
+ * Sets the number of buffers associated with this native window.
+ */
+static inline int native_window_set_buffer_count(
+        ANativeWindow* window,
+        size_t bufferCount)
+{
+    return window->perform(window, NATIVE_WINDOW_SET_BUFFER_COUNT, bufferCount);
+}
+
+/*
+ * native_window_set_buffers_geometry(..., int w, int h, int format)
+ * All buffers dequeued after this call will have the geometry specified.
+ * In particular, all buffers will have a fixed-size, independent form the
+ * native-window size. They will be appropriately scaled to the window-size
+ * upon composition.
+ *
+ * If all parameters are 0, the normal behavior is restored. That is,
+ * dequeued buffers following this call will be sized to the window's size.
+ *
+ */
+static inline int native_window_set_buffers_geometry(
+        ANativeWindow* window,
+        int w, int h, int format)
+{
+    return window->perform(window, NATIVE_WINDOW_SET_BUFFERS_GEOMETRY,
+            w, h, format);
+}
 
 // ---------------------------------------------------------------------------
 
@@ -263,6 +339,15 @@
 template <typename NATIVE_TYPE, typename TYPE, typename REF>
 class EGLNativeBase : public NATIVE_TYPE, public REF
 {
+public:
+    // Disambiguate between the incStrong in REF and NATIVE_TYPE
+    void incStrong(const void* id) const {
+        REF::incStrong(id);
+    }
+    void decStrong(const void* id) const {
+        REF::decStrong(id);
+    }
+
 protected:
     typedef EGLNativeBase<NATIVE_TYPE, TYPE, REF> BASE;
     EGLNativeBase() : NATIVE_TYPE(), REF() {
diff --git a/include/utils/AssetManager.h b/include/utils/AssetManager.h
index d8994e0..97694ff 100644
--- a/include/utils/AssetManager.h
+++ b/include/utils/AssetManager.h
@@ -29,6 +29,24 @@
 #include <utils/ZipFileRO.h>
 #include <utils/threads.h>
 
+/*
+ * Native-app access is via the opaque typedef struct AAssetManager in the C namespace.
+ */
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+struct AAssetManager { };
+
+#ifdef __cplusplus
+};
+#endif
+
+
+/*
+ * Now the proper C++ android-namespace definitions
+ */
+
 namespace android {
 
 class Asset;        // fwd decl for things that include Asset.h first
@@ -48,7 +66,7 @@
  * The asset hierarchy may be examined like a filesystem, using
  * AssetDir objects to peruse a single directory.
  */
-class AssetManager {
+class AssetManager : public AAssetManager {
 public:
     typedef enum CacheMode {
         CACHE_UNKNOWN = 0,
diff --git a/include/utils/BitSet.h b/include/utils/BitSet.h
new file mode 100644
index 0000000..19c8bf0
--- /dev/null
+++ b/include/utils/BitSet.h
@@ -0,0 +1,67 @@
+/*
+ * Copyright (C) 2010 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef UTILS_BITSET_H
+#define UTILS_BITSET_H
+
+#include <stdint.h>
+
+/*
+ * Contains some bit manipulation helpers.
+ */
+
+namespace android {
+
+// A simple set of 32 bits that can be individually marked or cleared.
+struct BitSet32 {
+    uint32_t value;
+
+    inline BitSet32() : value(0) { }
+    explicit inline BitSet32(uint32_t value) : value(value) { }
+
+    // Gets the value associated with a particular bit index.
+    static inline uint32_t valueForBit(uint32_t n) { return 0x80000000 >> n; }
+
+    // Clears the bit set.
+    inline void clear() { value = 0; }
+
+    // Returns true if the bit set does not contain any marked bits.
+    inline bool isEmpty() const { return ! value; }
+
+    // Returns true if the specified bit is marked.
+    inline bool hasBit(uint32_t n) const { return value & valueForBit(n); }
+
+    // Marks the specified bit.
+    inline void markBit(uint32_t n) { value |= valueForBit(n); }
+
+    // Clears the specified bit.
+    inline void clearBit(uint32_t n) { value &= ~ valueForBit(n); }
+
+    // Finds the first marked bit in the set.
+    // Result is undefined if all bits are unmarked.
+    inline uint32_t firstMarkedBit() const { return __builtin_clz(value); }
+
+    // Finds the first unmarked bit in the set.
+    // Result is undefined if all bits are marked.
+    inline uint32_t firstUnmarkedBit() const { return __builtin_clz(~ value); }
+
+    inline bool operator== (const BitSet32& other) const { return value == other.value; }
+    inline bool operator!= (const BitSet32& other) const { return value != other.value; }
+};
+
+} // namespace android
+
+#endif // UTILS_BITSET_H
diff --git a/include/utils/Buffer.h b/include/utils/Buffer.h
deleted file mode 100644
index 8e22b0f..0000000
--- a/include/utils/Buffer.h
+++ /dev/null
@@ -1,107 +0,0 @@
-/*
- * Copyright (C) 2008 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#ifndef __UTILS_BUFFER_H__
-#define __UTILS_BUFFER_H__ 1
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-
-namespace android {
-
-class Buffer
-{
-private:
-    char *buf;
-    int bufsiz;
-    int used;
-    void ensureCapacity(int len);
-
-    void
-    makeRoomFor(int len)
-    {
-        if (len + used >= bufsiz) {
-            bufsiz = (len + used) * 3/2 + 2;
-            char *blah = new char[bufsiz];
-
-            memcpy(blah, buf, used);
-            delete[] buf;
-            buf = blah;
-        }
-    }
-    
-public:
-    Buffer()
-    {
-        bufsiz = 16;
-        buf = new char[bufsiz];
-        clear();
-    }
-
-    ~Buffer()
-    {
-       delete[] buf;
-    }
-
-    void
-    clear()
-    {
-        buf[0] = '\0';
-        used = 0;
-    }
-
-    int
-    length()
-    {
-        return used;
-    }
-
-    void
-    append(const char c)
-    {
-        makeRoomFor(1);
-        buf[used] = c;
-        used++;
-        buf[used] = '\0';
-    }
-
-    void
-    append(const char *s, int len)
-    {
-        makeRoomFor(len);
-
-        memcpy(buf + used, s, len);
-        used += len;
-        buf[used] = '\0';
-    }
-
-    void
-    append(const char *s)
-    {
-        append(s, strlen(s));
-    }
-
-    char *
-    getBytes()
-    {
-        return buf;
-    }
-};
-
-}; // namespace android
-
-#endif
diff --git a/include/utils/ObbFile.h b/include/utils/ObbFile.h
new file mode 100644
index 0000000..075927c
--- /dev/null
+++ b/include/utils/ObbFile.h
@@ -0,0 +1,87 @@
+/*
+ * Copyright (C) 2010 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef OBBFILE_H_
+#define OBBFILE_H_
+
+#include <stdint.h>
+
+#include <utils/RefBase.h>
+#include <utils/String8.h>
+
+namespace android {
+
+class ObbFile : public RefBase {
+protected:
+    virtual ~ObbFile();
+
+public:
+    ObbFile();
+
+    bool readFrom(const char* filename);
+    bool readFrom(int fd);
+    bool writeTo(const char* filename);
+    bool writeTo(int fd);
+
+    const char* getFileName() const {
+        return mFileName;
+    }
+
+    const String8 getPackageName() const {
+        return mPackageName;
+    }
+
+    int32_t getVersion() const {
+        return mVersion;
+    }
+
+    void setPackageName(String8 packageName) {
+        mPackageName = packageName;
+    }
+
+    void setVersion(int32_t version) {
+        mVersion = version;
+    }
+
+    static inline uint32_t get4LE(const unsigned char* buf) {
+        return buf[0] | (buf[1] << 8) | (buf[2] << 16) | (buf[3] << 24);
+    }
+
+    static inline void put4LE(unsigned char* buf, uint32_t val) {
+        buf[0] = val & 0xFF;
+        buf[1] = (val >> 8) & 0xFF;
+        buf[2] = (val >> 16) & 0xFF;
+        buf[3] = (val >> 24) & 0xFF;
+    }
+
+private:
+    /* Package name this ObbFile is associated with */
+    String8 mPackageName;
+
+    /* Package version this ObbFile is associated with */
+    int32_t mVersion;
+
+    const char* mFileName;
+
+    size_t mFileSize;
+
+    unsigned char* mReadBuf;
+
+    bool parseObbFile(int fd);
+};
+
+}
+#endif /* OBBFILE_H_ */
diff --git a/include/utils/PollLoop.h b/include/utils/PollLoop.h
new file mode 100644
index 0000000..81230e8
--- /dev/null
+++ b/include/utils/PollLoop.h
@@ -0,0 +1,197 @@
+/*
+ * Copyright (C) 2010 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef UTILS_POLL_LOOP_H
+#define UTILS_POLL_LOOP_H
+
+#include <utils/Vector.h>
+#include <utils/threads.h>
+
+#include <sys/poll.h>
+
+#include <android/looper.h>
+
+struct ALooper : public android::RefBase {
+protected:
+    virtual ~ALooper() { }
+
+public:
+    ALooper() { }
+};
+
+namespace android {
+
+/**
+ * A basic file descriptor polling loop based on poll() with callbacks.
+ */
+class PollLoop : public ALooper {
+protected:
+    virtual ~PollLoop();
+
+public:
+    PollLoop(bool allowNonCallbacks);
+
+    /**
+     * A callback that it to be invoked when an event occurs on a file descriptor.
+     * Specifies the events that were triggered and the user data provided when the
+     * callback was set.
+     *
+     * Returns true if the callback should be kept, false if it should be removed automatically
+     * after the callback returns.
+     */
+    typedef bool (*Callback)(int fd, int events, void* data);
+
+    enum {
+        POLL_CALLBACK = ALOOPER_POLL_CALLBACK,
+        POLL_TIMEOUT = ALOOPER_POLL_TIMEOUT,
+        POLL_ERROR = ALOOPER_POLL_ERROR,
+    };
+    
+    /**
+     * Performs a single call to poll() with optional timeout in milliseconds.
+     * Invokes callbacks for all file descriptors on which an event occurred.
+     *
+     * If the timeout is zero, returns immediately without blocking.
+     * If the timeout is negative, waits indefinitely until awoken.
+     *
+     * Returns ALOOPER_POLL_CALLBACK if a callback was invoked.
+     *
+     * Returns ALOOPER_POLL_TIMEOUT if there was no data before the given
+     * timeout expired.
+     *
+     * Returns ALOPER_POLL_ERROR if an error occurred.
+     *
+     * Returns a value >= 0 containing a file descriptor if it has data
+     * and it has no callback function (requiring the caller here to handle it).
+     * In this (and only this) case outEvents and outData will contain the poll
+     * events and data associated with the fd.
+     *
+     * This method must only be called on the thread owning the PollLoop.
+     * This method blocks until either a file descriptor is signalled, a timeout occurs,
+     * or wake() is called.
+     * This method does not return until it has finished invoking the appropriate callbacks
+     * for all file descriptors that were signalled.
+     */
+    int32_t pollOnce(int timeoutMillis, int* outEvents = NULL, void** outData = NULL);
+
+    /**
+     * Wakes the loop asynchronously.
+     *
+     * This method can be called on any thread.
+     * This method returns immediately.
+     */
+    void wake();
+
+    /**
+     * Control whether this PollLoop instance allows using IDs instead
+     * of callbacks.
+     */
+    bool getAllowNonCallbacks() const;
+    
+    /**
+     * Sets the callback for a file descriptor, replacing the existing one, if any.
+     * It is an error to call this method with events == 0 or callback == NULL.
+     *
+     * Note that a callback can be invoked with the POLLERR, POLLHUP or POLLNVAL events
+     * even if it is not explicitly requested when registered.
+     *
+     * This method can be called on any thread.
+     * This method may block briefly if it needs to wake the poll loop.
+     */
+    void setCallback(int fd, int events, Callback callback, void* data = NULL);
+
+    /**
+     * Like setCallback(), but for the NDK callback function.
+     */
+    void setLooperCallback(int fd, int events, ALooper_callbackFunc* callback,
+            void* data);
+    
+    /**
+     * Removes the callback for a file descriptor, if one exists.
+     *
+     * When this method returns, it is safe to close the file descriptor since the poll loop
+     * will no longer have a reference to it.  However, it is possible for the callback to
+     * already be running or for it to run one last time if the file descriptor was already
+     * signalled.  Calling code is responsible for ensuring that this case is safely handled.
+     * For example, if the callback takes care of removing itself during its own execution either
+     * by returning false or calling this method, then it can be guaranteed to not be invoked
+     * again at any later time unless registered anew.
+     *
+     * This method can be called on any thread.
+     * This method may block briefly if it needs to wake the poll loop.
+     *
+     * Returns true if a callback was actually removed, false if none was registered.
+     */
+    bool removeCallback(int fd);
+
+    /**
+     * Set the given PollLoop to be associated with the
+     * calling thread.  There must be a 1:1 relationship between
+     * PollLoop and thread.
+     */
+    static void setForThread(const sp<PollLoop>& pollLoop);
+    
+    /**
+     * Return the PollLoop associated with the calling thread.
+     */
+    static sp<PollLoop> getForThread();
+    
+private:
+    struct RequestedCallback {
+        Callback callback;
+        ALooper_callbackFunc* looperCallback;
+        void* data;
+    };
+
+    struct PendingCallback {
+        int fd;
+        int events;
+        Callback callback;
+        ALooper_callbackFunc* looperCallback;
+        void* data;
+    };
+    
+    const bool mAllowNonCallbacks;
+    
+    Mutex mLock;
+    bool mPolling;
+    uint32_t mWaiters;
+    Condition mAwake;
+    Condition mResume;
+
+    int mWakeReadPipeFd;
+    int mWakeWritePipeFd;
+
+    Vector<struct pollfd> mRequestedFds;
+    Vector<RequestedCallback> mRequestedCallbacks;
+
+    Vector<PendingCallback> mPendingCallbacks; // used privately by pollOnce
+    Vector<PendingCallback> mPendingFds;       // used privately by pollOnce
+    size_t mPendingFdsPos;
+    
+    void openWakePipe();
+    void closeWakePipe();
+
+    void setCallbackCommon(int fd, int events, Callback callback,
+            ALooper_callbackFunc* looperCallback, void* data);
+    ssize_t getRequestIndexLocked(int fd);
+    void wakeAndLock();
+    static void threadDestructor(void *st);
+};
+
+} // namespace android
+
+#endif // UTILS_POLL_LOOP_H
diff --git a/include/utils/Pool.h b/include/utils/Pool.h
new file mode 100644
index 0000000..2ee768e
--- /dev/null
+++ b/include/utils/Pool.h
@@ -0,0 +1,71 @@
+/*
+ * Copyright (C) 2010 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef UTILS_POOL_H
+#define UTILS_POOL_H
+
+#include <utils/TypeHelpers.h>
+
+namespace android {
+
+class PoolImpl {
+public:
+    PoolImpl(size_t objSize);
+    ~PoolImpl();
+
+    void* allocImpl();
+    void freeImpl(void* obj);
+
+private:
+    size_t mObjSize;
+};
+
+/*
+ * A homogeneous typed memory pool for fixed size objects.
+ * Not intended to be thread-safe.
+ */
+template<typename T>
+class Pool : private PoolImpl {
+public:
+    /* Creates an initially empty pool. */
+    Pool() : PoolImpl(sizeof(T)) { }
+
+    /* Destroys the pool.
+     * Assumes that the pool is empty. */
+    ~Pool() { }
+
+    /* Allocates an object from the pool, growing the pool if needed. */
+    inline T* alloc() {
+        void* mem = allocImpl();
+        if (! traits<T>::has_trivial_ctor) {
+            return new (mem) T();
+        } else {
+            return static_cast<T*>(mem);
+        }
+    }
+
+    /* Frees an object from the pool. */
+    inline void free(T* obj) {
+        if (! traits<T>::has_trivial_dtor) {
+            obj->~T();
+        }
+        freeImpl(obj);
+    }
+};
+
+} // namespace android
+
+#endif // UTILS_POOL_H
diff --git a/include/utils/RefBase.h b/include/utils/RefBase.h
index bd7f28c..9c64ac0 100644
--- a/include/utils/RefBase.h
+++ b/include/utils/RefBase.h
@@ -333,9 +333,10 @@
 
 template<typename T>
 sp<T>& sp<T>::operator = (const sp<T>& other) {
-    if (other.m_ptr) other.m_ptr->incStrong(this);
+    T* otherPtr(other.m_ptr);
+    if (otherPtr) otherPtr->incStrong(this);
     if (m_ptr) m_ptr->decStrong(this);
-    m_ptr = other.m_ptr;
+    m_ptr = otherPtr;
     return *this;
 }
 
@@ -351,9 +352,10 @@
 template<typename T> template<typename U>
 sp<T>& sp<T>::operator = (const sp<U>& other)
 {
-    if (other.m_ptr) other.m_ptr->incStrong(this);
+    U* otherPtr(other.m_ptr);
+    if (otherPtr) otherPtr->incStrong(this);
     if (m_ptr) m_ptr->decStrong(this);
-    m_ptr = other.m_ptr;
+    m_ptr = otherPtr;
     return *this;
 }
 
@@ -466,10 +468,12 @@
 template<typename T>
 wp<T>& wp<T>::operator = (const wp<T>& other)
 {
-    if (other.m_ptr) other.m_refs->incWeak(this);
+    weakref_type* otherRefs(other.m_refs);
+    T* otherPtr(other.m_ptr);
+    if (otherPtr) otherRefs->incWeak(this);
     if (m_ptr) m_refs->decWeak(this);
-    m_ptr = other.m_ptr;
-    m_refs = other.m_refs;
+    m_ptr = otherPtr;
+    m_refs = otherRefs;
     return *this;
 }
 
@@ -478,8 +482,9 @@
 {
     weakref_type* newRefs =
         other != NULL ? other->createWeak(this) : 0;
+    T* otherPtr(other.m_ptr);
     if (m_ptr) m_refs->decWeak(this);
-    m_ptr = other.get();
+    m_ptr = otherPtr;
     m_refs = newRefs;
     return *this;
 }
@@ -498,10 +503,12 @@
 template<typename T> template<typename U>
 wp<T>& wp<T>::operator = (const wp<U>& other)
 {
-    if (other.m_ptr) other.m_refs->incWeak(this);
+    weakref_type* otherRefs(other.m_refs);
+    U* otherPtr(other.m_ptr);
+    if (otherPtr) otherRefs->incWeak(this);
     if (m_ptr) m_refs->decWeak(this);
-    m_ptr = other.m_ptr;
-    m_refs = other.m_refs;
+    m_ptr = otherPtr;
+    m_refs = otherRefs;
     return *this;
 }
 
@@ -510,8 +517,9 @@
 {
     weakref_type* newRefs =
         other != NULL ? other->createWeak(this) : 0;
+    U* otherPtr(other.m_ptr);
     if (m_ptr) m_refs->decWeak(this);
-    m_ptr = other.get();
+    m_ptr = otherPtr;
     m_refs = newRefs;
     return *this;
 }
diff --git a/include/utils/ResourceTypes.h b/include/utils/ResourceTypes.h
index b701ce7..c7d9ff1 100644
--- a/include/utils/ResourceTypes.h
+++ b/include/utils/ResourceTypes.h
@@ -933,6 +933,7 @@
         SCREENSIZE_SMALL = 0x01,
         SCREENSIZE_NORMAL = 0x02,
         SCREENSIZE_LARGE = 0x03,
+        SCREENSIZE_XLARGE = 0x04,
         
         // screenLayout bits for wide/long screen variation.
         MASK_SCREENLONG = 0x30,
@@ -1208,7 +1209,28 @@
             if (screenLayout || o.screenLayout) {
                 if (((screenLayout^o.screenLayout) & MASK_SCREENSIZE) != 0
                         && (requested->screenLayout & MASK_SCREENSIZE)) {
-                    return (screenLayout & MASK_SCREENSIZE);
+                    // A little backwards compatibility here: undefined is
+                    // considered equivalent to normal.  But only if the
+                    // requested size is at least normal; otherwise, small
+                    // is better than the default.
+                    int mySL = (screenLayout & MASK_SCREENSIZE);
+                    int oSL = (o.screenLayout & MASK_SCREENSIZE);
+                    int fixedMySL = mySL;
+                    int fixedOSL = oSL;
+                    if ((requested->screenLayout & MASK_SCREENSIZE) >= SCREENSIZE_NORMAL) {
+                        if (fixedMySL == 0) fixedMySL = SCREENSIZE_NORMAL;
+                        if (fixedOSL == 0) fixedOSL = SCREENSIZE_NORMAL;
+                    }
+                    // For screen size, the best match is the one that is
+                    // closest to the requested screen size, but not over
+                    // (the not over part is dealt with in match() below).
+                    if (fixedMySL == fixedOSL) {
+                        // If the two are the same, but 'this' is actually
+                        // undefined, then the other is really a better match.
+                        if (mySL == 0) return false;
+                        return true;
+                    }
+                    return fixedMySL >= fixedOSL;
                 }
                 if (((screenLayout^o.screenLayout) & MASK_SCREENLONG) != 0
                         && (requested->screenLayout & MASK_SCREENLONG)) {
@@ -1370,8 +1392,11 @@
         if (screenConfig != 0) {
             const int screenSize = screenLayout&MASK_SCREENSIZE;
             const int setScreenSize = settings.screenLayout&MASK_SCREENSIZE;
-            if (setScreenSize != 0 && screenSize != 0
-                    && screenSize != setScreenSize) {
+            // Any screen sizes for larger screens than the setting do not
+            // match.
+            if ((setScreenSize != 0 && screenSize != 0
+                    && screenSize > setScreenSize) ||
+                    (setScreenSize == 0 && screenSize != 0)) {
                 return false;
             }
             
diff --git a/include/utils/Singleton.h b/include/utils/Singleton.h
index bc7626a8..3b975b4 100644
--- a/include/utils/Singleton.h
+++ b/include/utils/Singleton.h
@@ -54,11 +54,13 @@
  * (eg: <TYPE>.cpp) to create the static instance of Singleton<>'s attributes,
  * and avoid to have a copy of them in each compilation units Singleton<TYPE>
  * is used.
+ * NOTE: we use a version of Mutex ctor that takes a parameter, because
+ * for some unknown reason using the default ctor doesn't emit the variable!
  */
 
-#define ANDROID_SINGLETON_STATIC_INSTANCE(TYPE)             \
-    template class Singleton< TYPE >;                       \
-    template< class TYPE > Mutex Singleton< TYPE >::sLock;  \
+#define ANDROID_SINGLETON_STATIC_INSTANCE(TYPE)                 \
+    template class Singleton< TYPE >;                           \
+    template<> Mutex Singleton< TYPE >::sLock(Mutex::PRIVATE);  \
     template<> TYPE* Singleton< TYPE >::sInstance(0);
 
 
diff --git a/include/utils/StopWatch.h b/include/utils/StopWatch.h
index cc0bebc..693dd3c 100644
--- a/include/utils/StopWatch.h
+++ b/include/utils/StopWatch.h
@@ -37,6 +37,8 @@
         const char* name() const;
         nsecs_t     lap();
         nsecs_t     elapsedTime() const;
+
+        void        reset();
         
 private:
     const char*     mName;
diff --git a/include/utils/String8.h b/include/utils/String8.h
index c4b18a4..0b18fe3 100644
--- a/include/utils/String8.h
+++ b/include/utils/String8.h
@@ -171,6 +171,8 @@
             status_t            append(const char* other);
             status_t            append(const char* other, size_t numChars);
 
+            status_t            appendFormat(const char* fmt, ...);
+
             // Note that this function takes O(N) time to calculate the value.
             // No cache value is stored.
             size_t              getUtf32Length() const;
diff --git a/include/utils/Vector.h b/include/utils/Vector.h
index ad59fd6..ec851bd 100644
--- a/include/utils/Vector.h
+++ b/include/utils/Vector.h
@@ -114,13 +114,19 @@
             ssize_t         appendVector(const Vector<TYPE>& vector);
 
 
+    //! insert an array at a given index
+            ssize_t         insertArrayAt(const TYPE* array, size_t index, size_t length);
+
+    //! append an array at the end of this vector
+            ssize_t         appendArray(const TYPE* array, size_t length);
+
             /*! 
              * add/insert/replace items
              */
              
     //! insert one or several items initialized with their default constructor
     inline  ssize_t         insertAt(size_t index, size_t numItems = 1);
-    //! insert on onr several items initialized from a prototype item
+    //! insert one or several items initialized from a prototype item
             ssize_t         insertAt(const TYPE& prototype_item, size_t index, size_t numItems = 1);
     //! pop the top of the stack (removes the last element). No-op if the stack's empty
     inline  void            pop();
@@ -259,6 +265,16 @@
 }
 
 template<class TYPE> inline
+ssize_t Vector<TYPE>::insertArrayAt(const TYPE* array, size_t index, size_t length) {
+    return VectorImpl::insertArrayAt(array, index, length);
+}
+
+template<class TYPE> inline
+ssize_t Vector<TYPE>::appendArray(const TYPE* array, size_t length) {
+    return VectorImpl::appendArray(array, length);
+}
+
+template<class TYPE> inline
 ssize_t Vector<TYPE>::insertAt(const TYPE& item, size_t index, size_t numItems) {
     return VectorImpl::insertAt(&item, index, numItems);
 }
diff --git a/include/utils/VectorImpl.h b/include/utils/VectorImpl.h
index 49b03f1..c4ec2ff 100644
--- a/include/utils/VectorImpl.h
+++ b/include/utils/VectorImpl.h
@@ -65,9 +65,11 @@
             size_t          capacity() const;
             ssize_t         setCapacity(size_t size);
 
-            /*! append/insert another vector */
+            /*! append/insert another vector or array */
             ssize_t         insertVectorAt(const VectorImpl& vector, size_t index);
             ssize_t         appendVector(const VectorImpl& vector);
+            ssize_t         insertArrayAt(const void* array, size_t index, size_t length);
+            ssize_t         appendArray(const void* array, size_t length);
             
             /*! add/insert/replace items */
             ssize_t         insertAt(size_t where, size_t numItems = 1);
@@ -184,6 +186,8 @@
             void            push(const void* item);
             ssize_t         insertVectorAt(const VectorImpl& vector, size_t index);
             ssize_t         appendVector(const VectorImpl& vector);
+            ssize_t         insertArrayAt(const void* array, size_t index, size_t length);
+            ssize_t         appendArray(const void* array, size_t length);
             ssize_t         insertAt(size_t where, size_t numItems = 1);
             ssize_t         insertAt(const void* item, size_t where, size_t numItems = 1);
             ssize_t         replaceAt(size_t index);
diff --git a/include/utils/ZipFileCRO.h b/include/utils/ZipFileCRO.h
index 30e0036..e38bf66 100644
--- a/include/utils/ZipFileCRO.h
+++ b/include/utils/ZipFileCRO.h
@@ -47,8 +47,8 @@
         const char* fileName);
 
 extern bool ZipFileCRO_getEntryInfo(ZipFileCRO zip, ZipEntryCRO entry,
-        int* pMethod, long* pUncompLen,
-        long* pCompLen, off_t* pOffset, long* pModWhen, long* pCrc32);
+        int* pMethod, size_t* pUncompLen,
+        size_t* pCompLen, off_t* pOffset, long* pModWhen, long* pCrc32);
 
 extern bool ZipFileCRO_uncompressEntry(ZipFileCRO zip, ZipEntryCRO entry, int fd);
 
diff --git a/include/utils/ZipFileRO.h b/include/utils/ZipFileRO.h
index 51c4f2f..97d31f4 100644
--- a/include/utils/ZipFileRO.h
+++ b/include/utils/ZipFileRO.h
@@ -58,14 +58,19 @@
 class ZipFileRO {
 public:
     ZipFileRO()
-        : mFd(-1), mFileMap(NULL), mHashTableSize(-1), mHashTable(NULL)
+        : mFd(-1), mFileName(NULL), mFileLength(-1),
+          mDirectoryMap(NULL),
+          mNumEntries(-1), mDirectoryOffset(-1),
+          mHashTableSize(-1), mHashTable(NULL)
         {}
     ~ZipFileRO() {
         free(mHashTable);
-        if (mFileMap)
-            mFileMap->release();
+        if (mDirectoryMap)
+            mDirectoryMap->release();
         if (mFd >= 0)
             close(mFd);
+        if (mFileName)
+            free(mFileName);
     }
 
     /*
@@ -118,8 +123,8 @@
      * Returns "false" if "entry" is bogus or if the data in the Zip file
      * appears to be bad.
      */
-    bool getEntryInfo(ZipEntryRO entry, int* pMethod, long* pUncompLen,
-        long* pCompLen, off_t* pOffset, long* pModWhen, long* pCrc32) const;
+    bool getEntryInfo(ZipEntryRO entry, int* pMethod, size_t* pUncompLen,
+        size_t* pCompLen, off_t* pOffset, long* pModWhen, long* pCrc32) const;
 
     /*
      * Create a new FileMap object that maps a subset of the archive.  For
@@ -155,13 +160,13 @@
      * Utility function: uncompress deflated data, buffer to buffer.
      */
     static bool inflateBuffer(void* outBuf, const void* inBuf,
-        long uncompLen, long compLen);
+        size_t uncompLen, size_t compLen);
 
     /*
      * Utility function: uncompress deflated data, buffer to fd.
      */
     static bool inflateBuffer(int fd, const void* inBuf,
-        long uncompLen, long compLen);
+        size_t uncompLen, size_t compLen);
 
     /*
      * Some basic functions for raw data manipulation.  "LE" means
@@ -179,6 +184,9 @@
     ZipFileRO(const ZipFileRO& src);
     ZipFileRO& operator=(const ZipFileRO& src);
 
+    /* locate and parse the central directory */
+    bool mapCentralDirectory(void);
+
     /* parse the archive, prepping internal structures */
     bool parseZipArchive(void);
 
@@ -203,12 +211,21 @@
     /* open Zip archive */
     int         mFd;
 
+    /* zip file name */
+    char*       mFileName;
+
+    /* length of file */
+    size_t      mFileLength;
+
     /* mapped file */
-    FileMap*    mFileMap;
+    FileMap*    mDirectoryMap;
 
     /* number of entries in the Zip archive */
     int         mNumEntries;
 
+    /* CD directory offset in the Zip archive */
+    off_t       mDirectoryOffset;
+
     /*
      * We know how many entries are in the Zip archive, so we have a
      * fixed-size hash table.  We probe for an empty slot.
diff --git a/include/utils/threads.h b/include/utils/threads.h
index 5ac0c5e..1bcfaed 100644
--- a/include/utils/threads.h
+++ b/include/utils/threads.h
@@ -295,6 +295,96 @@
 
 /*****************************************************************************/
 
+#if defined(HAVE_PTHREADS)
+
+/*
+ * Simple mutex class.  The implementation is system-dependent.
+ *
+ * The mutex must be unlocked by the thread that locked it.  They are not
+ * recursive, i.e. the same thread can't lock it multiple times.
+ */
+class RWLock {
+public:
+    enum {
+        PRIVATE = 0,
+        SHARED = 1
+    };
+
+                RWLock();
+                RWLock(const char* name);
+                RWLock(int type, const char* name = NULL);
+                ~RWLock();
+
+    status_t    readLock();
+    status_t    tryReadLock();
+    status_t    writeLock();
+    status_t    tryWriteLock();
+    void        unlock();
+
+    class AutoRLock {
+    public:
+        inline AutoRLock(RWLock& rwlock) : mLock(rwlock)  { mLock.readLock(); }
+        inline ~AutoRLock() { mLock.unlock(); }
+    private:
+        RWLock& mLock;
+    };
+
+    class AutoWLock {
+    public:
+        inline AutoWLock(RWLock& rwlock) : mLock(rwlock)  { mLock.writeLock(); }
+        inline ~AutoWLock() { mLock.unlock(); }
+    private:
+        RWLock& mLock;
+    };
+
+private:
+    // A RWLock cannot be copied
+                RWLock(const RWLock&);
+   RWLock&      operator = (const RWLock&);
+
+   pthread_rwlock_t mRWLock;
+};
+
+inline RWLock::RWLock() {
+    pthread_rwlock_init(&mRWLock, NULL);
+}
+inline RWLock::RWLock(const char* name) {
+    pthread_rwlock_init(&mRWLock, NULL);
+}
+inline RWLock::RWLock(int type, const char* name) {
+    if (type == SHARED) {
+        pthread_rwlockattr_t attr;
+        pthread_rwlockattr_init(&attr);
+        pthread_rwlockattr_setpshared(&attr, PTHREAD_PROCESS_SHARED);
+        pthread_rwlock_init(&mRWLock, &attr);
+        pthread_rwlockattr_destroy(&attr);
+    } else {
+        pthread_rwlock_init(&mRWLock, NULL);
+    }
+}
+inline RWLock::~RWLock() {
+    pthread_rwlock_destroy(&mRWLock);
+}
+inline status_t RWLock::readLock() {
+    return -pthread_rwlock_rdlock(&mRWLock);
+}
+inline status_t RWLock::tryReadLock() {
+    return -pthread_rwlock_tryrdlock(&mRWLock);
+}
+inline status_t RWLock::writeLock() {
+    return -pthread_rwlock_wrlock(&mRWLock);
+}
+inline status_t RWLock::tryWriteLock() {
+    return -pthread_rwlock_trywrlock(&mRWLock);
+}
+inline void RWLock::unlock() {
+    pthread_rwlock_unlock(&mRWLock);
+}
+
+#endif // HAVE_PTHREADS
+
+/*****************************************************************************/
+
 /*
  * Condition variable class.  The implementation is system-dependent.
  *
diff --git a/libs/audioflinger/Android.mk b/libs/audioflinger/Android.mk
deleted file mode 100644
index 870c0b8..0000000
--- a/libs/audioflinger/Android.mk
+++ /dev/null
@@ -1,130 +0,0 @@
-LOCAL_PATH:= $(call my-dir)
-
-#AUDIO_POLICY_TEST := true
-#ENABLE_AUDIO_DUMP := true
-
-include $(CLEAR_VARS)
-
-
-ifeq ($(AUDIO_POLICY_TEST),true)
-  ENABLE_AUDIO_DUMP := true
-endif
-
-
-LOCAL_SRC_FILES:= \
-    AudioHardwareGeneric.cpp \
-    AudioHardwareStub.cpp \
-    AudioHardwareInterface.cpp
-
-ifeq ($(ENABLE_AUDIO_DUMP),true)
-  LOCAL_SRC_FILES += AudioDumpInterface.cpp
-  LOCAL_CFLAGS += -DENABLE_AUDIO_DUMP
-endif
-
-LOCAL_SHARED_LIBRARIES := \
-    libcutils \
-    libutils \
-    libbinder \
-    libmedia \
-    libhardware_legacy
-
-ifeq ($(strip $(BOARD_USES_GENERIC_AUDIO)),true)
-  LOCAL_CFLAGS += -DGENERIC_AUDIO
-endif
-
-LOCAL_MODULE:= libaudiointerface
-
-ifeq ($(BOARD_HAVE_BLUETOOTH),true)
-  LOCAL_SRC_FILES += A2dpAudioInterface.cpp
-  LOCAL_SHARED_LIBRARIES += liba2dp
-  LOCAL_CFLAGS += -DWITH_BLUETOOTH -DWITH_A2DP
-  LOCAL_C_INCLUDES += $(call include-path-for, bluez)
-endif
-
-include $(BUILD_STATIC_LIBRARY)
-
-
-include $(CLEAR_VARS)
-
-LOCAL_SRC_FILES:=               \
-    AudioPolicyManagerBase.cpp
-
-LOCAL_SHARED_LIBRARIES := \
-    libcutils \
-    libutils \
-    libmedia
-
-ifeq ($(TARGET_SIMULATOR),true)
- LOCAL_LDLIBS += -ldl
-else
- LOCAL_SHARED_LIBRARIES += libdl
-endif
-
-LOCAL_MODULE:= libaudiopolicybase
-
-ifeq ($(BOARD_HAVE_BLUETOOTH),true)
-  LOCAL_CFLAGS += -DWITH_A2DP
-endif
-
-ifeq ($(AUDIO_POLICY_TEST),true)
-  LOCAL_CFLAGS += -DAUDIO_POLICY_TEST
-endif
-
-include $(BUILD_STATIC_LIBRARY)
-
-include $(CLEAR_VARS)
-
-LOCAL_SRC_FILES:=               \
-    AudioFlinger.cpp            \
-    AudioMixer.cpp.arm          \
-    AudioResampler.cpp.arm      \
-    AudioResamplerSinc.cpp.arm  \
-    AudioResamplerCubic.cpp.arm \
-    AudioPolicyService.cpp
-
-LOCAL_SHARED_LIBRARIES := \
-    libcutils \
-    libutils \
-    libbinder \
-    libmedia \
-    libhardware_legacy
-
-ifeq ($(strip $(BOARD_USES_GENERIC_AUDIO)),true)
-  LOCAL_STATIC_LIBRARIES += libaudiointerface libaudiopolicybase
-  LOCAL_CFLAGS += -DGENERIC_AUDIO
-else
-  LOCAL_SHARED_LIBRARIES += libaudio libaudiopolicy
-endif
-
-ifeq ($(TARGET_SIMULATOR),true)
- LOCAL_LDLIBS += -ldl
-else
- LOCAL_SHARED_LIBRARIES += libdl
-endif
-
-LOCAL_MODULE:= libaudioflinger
-
-ifeq ($(BOARD_HAVE_BLUETOOTH),true)
-  LOCAL_CFLAGS += -DWITH_BLUETOOTH -DWITH_A2DP
-  LOCAL_SHARED_LIBRARIES += liba2dp
-endif
-
-ifeq ($(AUDIO_POLICY_TEST),true)
-  LOCAL_CFLAGS += -DAUDIO_POLICY_TEST
-endif
-
-ifeq ($(TARGET_SIMULATOR),true)
-    ifeq ($(HOST_OS),linux)
-        LOCAL_LDLIBS += -lrt -lpthread
-    endif
-endif
-
-ifeq ($(BOARD_USE_LVMX),true)
-    LOCAL_CFLAGS += -DLVMX
-    LOCAL_C_INCLUDES += vendor/nxp
-    LOCAL_STATIC_LIBRARIES += liblifevibes
-    LOCAL_SHARED_LIBRARIES += liblvmxservice
-#    LOCAL_SHARED_LIBRARIES += liblvmxipc
-endif
-
-include $(BUILD_SHARED_LIBRARY)
diff --git a/libs/audioflinger/AudioDumpInterface.cpp b/libs/audioflinger/AudioDumpInterface.cpp
deleted file mode 100644
index a018b4c..0000000
--- a/libs/audioflinger/AudioDumpInterface.cpp
+++ /dev/null
@@ -1,531 +0,0 @@
-/* //device/servers/AudioFlinger/AudioDumpInterface.cpp
-**
-** Copyright 2008, The Android Open Source Project
-**
-** Licensed under the Apache License, Version 2.0 (the "License");
-** you may not use this file except in compliance with the License.
-** You may obtain a copy of the License at
-**
-**     http://www.apache.org/licenses/LICENSE-2.0
-**
-** Unless required by applicable law or agreed to in writing, software
-** distributed under the License is distributed on an "AS IS" BASIS,
-** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-** See the License for the specific language governing permissions and
-** limitations under the License.
-*/
-
-#define LOG_TAG "AudioFlingerDump"
-//#define LOG_NDEBUG 0
-
-#include <stdint.h>
-#include <sys/types.h>
-#include <utils/Log.h>
-
-#include <stdlib.h>
-#include <unistd.h>
-
-#include "AudioDumpInterface.h"
-
-namespace android {
-
-// ----------------------------------------------------------------------------
-
-AudioDumpInterface::AudioDumpInterface(AudioHardwareInterface* hw)
-    : mFirstHwOutput(true), mPolicyCommands(String8("")), mFileName(String8(""))
-{
-    if(hw == 0) {
-        LOGE("Dump construct hw = 0");
-    }
-    mFinalInterface = hw;
-    LOGV("Constructor %p, mFinalInterface %p", this, mFinalInterface);
-}
-
-
-AudioDumpInterface::~AudioDumpInterface()
-{
-    for (size_t i = 0; i < mOutputs.size(); i++) {
-        closeOutputStream((AudioStreamOut *)mOutputs[i]);
-    }
-    if(mFinalInterface) delete mFinalInterface;
-}
-
-
-AudioStreamOut* AudioDumpInterface::openOutputStream(
-        uint32_t devices, int *format, uint32_t *channels, uint32_t *sampleRate, status_t *status)
-{
-    AudioStreamOut* outFinal = NULL;
-    int lFormat = AudioSystem::PCM_16_BIT;
-    uint32_t lChannels = AudioSystem::CHANNEL_OUT_STEREO;
-    uint32_t lRate = 44100;
-
-
-    if (AudioSystem::isA2dpDevice((AudioSystem::audio_devices)devices) || mFirstHwOutput) {
-        outFinal = mFinalInterface->openOutputStream(devices, format, channels, sampleRate, status);
-        if (outFinal != 0) {
-            lFormat = outFinal->format();
-            lChannels = outFinal->channels();
-            lRate = outFinal->sampleRate();
-            if (!AudioSystem::isA2dpDevice((AudioSystem::audio_devices)devices)) {
-                mFirstHwOutput = false;
-            }
-        }
-    } else {
-        if (format != 0 && *format != 0) {
-            lFormat = *format;
-        } else {
-            lFormat = AudioSystem::PCM_16_BIT;
-        }
-        if (channels != 0 && *channels != 0) {
-            lChannels = *channels;
-        } else {
-            lChannels = AudioSystem::CHANNEL_OUT_STEREO;
-        }
-        if (sampleRate != 0 && *sampleRate != 0) {
-            lRate = *sampleRate;
-        } else {
-            lRate = 44100;
-        }
-        if (status) *status = NO_ERROR;
-    }
-    LOGV("openOutputStream(), outFinal %p", outFinal);
-
-    AudioStreamOutDump *dumOutput = new AudioStreamOutDump(this, mOutputs.size(), outFinal,
-            devices, lFormat, lChannels, lRate);
-    mOutputs.add(dumOutput);
-
-    return dumOutput;
-}
-
-void AudioDumpInterface::closeOutputStream(AudioStreamOut* out)
-{
-    AudioStreamOutDump *dumpOut = (AudioStreamOutDump *)out;
-
-    if (mOutputs.indexOf(dumpOut) < 0) {
-        LOGW("Attempt to close invalid output stream");
-        return;
-    }
-
-    LOGV("closeOutputStream() output %p", out);
-
-    dumpOut->standby();
-    if (dumpOut->finalStream() != NULL) {
-        mFinalInterface->closeOutputStream(dumpOut->finalStream());
-        mFirstHwOutput = true;
-    }
-
-    mOutputs.remove(dumpOut);
-    delete dumpOut;
-}
-
-AudioStreamIn* AudioDumpInterface::openInputStream(uint32_t devices, int *format, uint32_t *channels,
-        uint32_t *sampleRate, status_t *status, AudioSystem::audio_in_acoustics acoustics)
-{
-    AudioStreamIn* inFinal = NULL;
-    int lFormat = AudioSystem::PCM_16_BIT;
-    uint32_t lChannels = AudioSystem::CHANNEL_IN_MONO;
-    uint32_t lRate = 8000;
-
-
-    if (mInputs.size() == 0) {
-        inFinal = mFinalInterface->openInputStream(devices, format, channels, sampleRate, status, acoustics);
-        if (inFinal == 0) return 0;
-
-        lFormat = inFinal->format();
-        lChannels = inFinal->channels();
-        lRate = inFinal->sampleRate();
-    } else {
-        if (format != 0 && *format != 0) lFormat = *format;
-        if (channels != 0 && *channels != 0) lChannels = *channels;
-        if (sampleRate != 0 && *sampleRate != 0) lRate = *sampleRate;
-        if (status) *status = NO_ERROR;
-    }
-    LOGV("openInputStream(), inFinal %p", inFinal);
-
-    AudioStreamInDump *dumInput = new AudioStreamInDump(this, mInputs.size(), inFinal,
-            devices, lFormat, lChannels, lRate);
-    mInputs.add(dumInput);
-
-    return dumInput;
-}
-void AudioDumpInterface::closeInputStream(AudioStreamIn* in)
-{
-    AudioStreamInDump *dumpIn = (AudioStreamInDump *)in;
-
-    if (mInputs.indexOf(dumpIn) < 0) {
-        LOGW("Attempt to close invalid input stream");
-        return;
-    }
-    dumpIn->standby();
-    if (dumpIn->finalStream() != NULL) {
-        mFinalInterface->closeInputStream(dumpIn->finalStream());
-    }
-
-    mInputs.remove(dumpIn);
-    delete dumpIn;
-}
-
-
-status_t AudioDumpInterface::setParameters(const String8& keyValuePairs)
-{
-    AudioParameter param = AudioParameter(keyValuePairs);
-    String8 value;
-    int valueInt;
-    LOGV("setParameters %s", keyValuePairs.string());
-
-    if (param.get(String8("test_cmd_file_name"), value) == NO_ERROR) {
-        mFileName = value;
-        param.remove(String8("test_cmd_file_name"));
-    }
-    if (param.get(String8("test_cmd_policy"), value) == NO_ERROR) {
-        Mutex::Autolock _l(mLock);
-        param.remove(String8("test_cmd_policy"));
-        mPolicyCommands = param.toString();
-        LOGV("test_cmd_policy command %s written", mPolicyCommands.string());
-        return NO_ERROR;
-    }
-
-    if (mFinalInterface != 0 ) return mFinalInterface->setParameters(keyValuePairs);
-    return NO_ERROR;
-}
-
-String8 AudioDumpInterface::getParameters(const String8& keys)
-{
-    AudioParameter param = AudioParameter(keys);
-    AudioParameter response;
-    String8 value;
-
-//    LOGV("getParameters %s", keys.string());
-    if (param.get(String8("test_cmd_policy"), value) == NO_ERROR) {
-        Mutex::Autolock _l(mLock);
-        if (mPolicyCommands.length() != 0) {
-            response = AudioParameter(mPolicyCommands);
-            response.addInt(String8("test_cmd_policy"), 1);
-        } else {
-            response.addInt(String8("test_cmd_policy"), 0);
-        }
-        param.remove(String8("test_cmd_policy"));
-//        LOGV("test_cmd_policy command %s read", mPolicyCommands.string());
-    }
-
-    if (param.get(String8("test_cmd_file_name"), value) == NO_ERROR) {
-        response.add(String8("test_cmd_file_name"), mFileName);
-        param.remove(String8("test_cmd_file_name"));
-    }
-
-    String8 keyValuePairs = response.toString();
-
-    if (param.size() && mFinalInterface != 0 ) {
-        keyValuePairs += ";";
-        keyValuePairs += mFinalInterface->getParameters(param.toString());
-    }
-
-    return keyValuePairs;
-}
-
-
-// ----------------------------------------------------------------------------
-
-AudioStreamOutDump::AudioStreamOutDump(AudioDumpInterface *interface,
-                                        int id,
-                                        AudioStreamOut* finalStream,
-                                        uint32_t devices,
-                                        int format,
-                                        uint32_t channels,
-                                        uint32_t sampleRate)
-    : mInterface(interface), mId(id),
-      mSampleRate(sampleRate), mFormat(format), mChannels(channels), mLatency(0), mDevice(devices),
-      mBufferSize(1024), mFinalStream(finalStream), mOutFile(0), mFileCount(0)
-{
-    LOGV("AudioStreamOutDump Constructor %p, mInterface %p, mFinalStream %p", this, mInterface, mFinalStream);
-}
-
-
-AudioStreamOutDump::~AudioStreamOutDump()
-{
-    LOGV("AudioStreamOutDump destructor");
-    Close();
-}
-
-ssize_t AudioStreamOutDump::write(const void* buffer, size_t bytes)
-{
-    ssize_t ret;
-
-    if (mFinalStream) {
-        ret = mFinalStream->write(buffer, bytes);
-    } else {
-        usleep((bytes * 1000000) / frameSize() / sampleRate());
-        ret = bytes;
-    }
-    if(!mOutFile) {
-        if (mInterface->fileName() != "") {
-            char name[255];
-            sprintf(name, "%s_%d_%d.pcm", mInterface->fileName().string(), mId, ++mFileCount);
-            mOutFile = fopen(name, "wb");
-            LOGV("Opening dump file %s, fh %p", name, mOutFile);
-        }
-    }
-    if (mOutFile) {
-        fwrite(buffer, bytes, 1, mOutFile);
-    }
-    return ret;
-}
-
-status_t AudioStreamOutDump::standby()
-{
-    LOGV("AudioStreamOutDump standby(), mOutFile %p, mFinalStream %p", mOutFile, mFinalStream);
-
-    Close();
-    if (mFinalStream != 0 ) return mFinalStream->standby();
-    return NO_ERROR;
-}
-
-uint32_t AudioStreamOutDump::sampleRate() const
-{
-    if (mFinalStream != 0 ) return mFinalStream->sampleRate();
-    return mSampleRate;
-}
-
-size_t AudioStreamOutDump::bufferSize() const
-{
-    if (mFinalStream != 0 ) return mFinalStream->bufferSize();
-    return mBufferSize;
-}
-
-uint32_t AudioStreamOutDump::channels() const
-{
-    if (mFinalStream != 0 ) return mFinalStream->channels();
-    return mChannels;
-}
-int AudioStreamOutDump::format() const
-{
-    if (mFinalStream != 0 ) return mFinalStream->format();
-    return mFormat;
-}
-uint32_t AudioStreamOutDump::latency() const
-{
-    if (mFinalStream != 0 ) return mFinalStream->latency();
-    return 0;
-}
-status_t AudioStreamOutDump::setVolume(float left, float right)
-{
-    if (mFinalStream != 0 ) return mFinalStream->setVolume(left, right);
-    return NO_ERROR;
-}
-status_t AudioStreamOutDump::setParameters(const String8& keyValuePairs)
-{
-    LOGV("AudioStreamOutDump::setParameters %s", keyValuePairs.string());
-
-    if (mFinalStream != 0 ) {
-        return mFinalStream->setParameters(keyValuePairs);
-    }
-
-    AudioParameter param = AudioParameter(keyValuePairs);
-    String8 value;
-    int valueInt;
-    status_t status = NO_ERROR;
-
-    if (param.getInt(String8("set_id"), valueInt) == NO_ERROR) {
-        mId = valueInt;
-    }
-
-    if (param.getInt(String8("format"), valueInt) == NO_ERROR) {
-        if (mOutFile == 0) {
-            mFormat = valueInt;
-        } else {
-            status = INVALID_OPERATION;
-        }
-    }
-    if (param.getInt(String8("channels"), valueInt) == NO_ERROR) {
-        if (valueInt == AudioSystem::CHANNEL_OUT_STEREO || valueInt == AudioSystem::CHANNEL_OUT_MONO) {
-            mChannels = valueInt;
-        } else {
-            status = BAD_VALUE;
-        }
-    }
-    if (param.getInt(String8("sampling_rate"), valueInt) == NO_ERROR) {
-        if (valueInt > 0 && valueInt <= 48000) {
-            if (mOutFile == 0) {
-                mSampleRate = valueInt;
-            } else {
-                status = INVALID_OPERATION;
-            }
-        } else {
-            status = BAD_VALUE;
-        }
-    }
-    return status;
-}
-
-String8 AudioStreamOutDump::getParameters(const String8& keys)
-{
-    if (mFinalStream != 0 ) return mFinalStream->getParameters(keys);
-
-    AudioParameter param = AudioParameter(keys);
-    return param.toString();
-}
-
-status_t AudioStreamOutDump::dump(int fd, const Vector<String16>& args)
-{
-    if (mFinalStream != 0 ) return mFinalStream->dump(fd, args);
-    return NO_ERROR;
-}
-
-void AudioStreamOutDump::Close()
-{
-    if(mOutFile) {
-        fclose(mOutFile);
-        mOutFile = 0;
-    }
-}
-
-status_t AudioStreamOutDump::getRenderPosition(uint32_t *dspFrames)
-{
-    if (mFinalStream != 0 ) return mFinalStream->getRenderPosition(dspFrames);
-    return INVALID_OPERATION;
-}
-
-// ----------------------------------------------------------------------------
-
-AudioStreamInDump::AudioStreamInDump(AudioDumpInterface *interface,
-                                        int id,
-                                        AudioStreamIn* finalStream,
-                                        uint32_t devices,
-                                        int format,
-                                        uint32_t channels,
-                                        uint32_t sampleRate)
-    : mInterface(interface), mId(id),
-      mSampleRate(sampleRate), mFormat(format), mChannels(channels), mDevice(devices),
-      mBufferSize(1024), mFinalStream(finalStream), mInFile(0)
-{
-    LOGV("AudioStreamInDump Constructor %p, mInterface %p, mFinalStream %p", this, mInterface, mFinalStream);
-}
-
-
-AudioStreamInDump::~AudioStreamInDump()
-{
-    Close();
-}
-
-ssize_t AudioStreamInDump::read(void* buffer, ssize_t bytes)
-{
-    if (mFinalStream) {
-        return mFinalStream->read(buffer, bytes);
-    }
-
-    usleep((bytes * 1000000) / frameSize() / sampleRate());
-
-    if(!mInFile) {
-        char name[255];
-        strcpy(name, "/sdcard/music/sine440");
-        if (channels() == AudioSystem::CHANNEL_IN_MONO) {
-            strcat(name, "_mo");
-        } else {
-            strcat(name, "_st");
-        }
-        if (format() == AudioSystem::PCM_16_BIT) {
-            strcat(name, "_16b");
-        } else {
-            strcat(name, "_8b");
-        }
-        if (sampleRate() < 16000) {
-            strcat(name, "_8k");
-        } else if (sampleRate() < 32000) {
-            strcat(name, "_22k");
-        } else if (sampleRate() < 48000) {
-            strcat(name, "_44k");
-        } else {
-            strcat(name, "_48k");
-        }
-        strcat(name, ".wav");
-        mInFile = fopen(name, "rb");
-        LOGV("Opening dump file %s, fh %p", name, mInFile);
-        if (mInFile) {
-            fseek(mInFile, AUDIO_DUMP_WAVE_HDR_SIZE, SEEK_SET);
-        }
-
-    }
-    if (mInFile) {
-        ssize_t bytesRead = fread(buffer, bytes, 1, mInFile);
-        if (bytesRead != bytes) {
-            fseek(mInFile, AUDIO_DUMP_WAVE_HDR_SIZE, SEEK_SET);
-            fread((uint8_t *)buffer+bytesRead, bytes-bytesRead, 1, mInFile);
-        }
-    }
-    return bytes;
-}
-
-status_t AudioStreamInDump::standby()
-{
-    LOGV("AudioStreamInDump standby(), mInFile %p, mFinalStream %p", mInFile, mFinalStream);
-
-    Close();
-    if (mFinalStream != 0 ) return mFinalStream->standby();
-    return NO_ERROR;
-}
-
-status_t AudioStreamInDump::setGain(float gain)
-{
-    if (mFinalStream != 0 ) return mFinalStream->setGain(gain);
-    return NO_ERROR;
-}
-
-uint32_t AudioStreamInDump::sampleRate() const
-{
-    if (mFinalStream != 0 ) return mFinalStream->sampleRate();
-    return mSampleRate;
-}
-
-size_t AudioStreamInDump::bufferSize() const
-{
-    if (mFinalStream != 0 ) return mFinalStream->bufferSize();
-    return mBufferSize;
-}
-
-uint32_t AudioStreamInDump::channels() const
-{
-    if (mFinalStream != 0 ) return mFinalStream->channels();
-    return mChannels;
-}
-
-int AudioStreamInDump::format() const
-{
-    if (mFinalStream != 0 ) return mFinalStream->format();
-    return mFormat;
-}
-
-status_t AudioStreamInDump::setParameters(const String8& keyValuePairs)
-{
-    LOGV("AudioStreamInDump::setParameters()");
-    if (mFinalStream != 0 ) return mFinalStream->setParameters(keyValuePairs);
-    return NO_ERROR;
-}
-
-String8 AudioStreamInDump::getParameters(const String8& keys)
-{
-    if (mFinalStream != 0 ) return mFinalStream->getParameters(keys);
-
-    AudioParameter param = AudioParameter(keys);
-    return param.toString();
-}
-
-unsigned int AudioStreamInDump::getInputFramesLost() const
-{
-    if (mFinalStream != 0 ) return mFinalStream->getInputFramesLost();
-    return 0;
-}
-
-status_t AudioStreamInDump::dump(int fd, const Vector<String16>& args)
-{
-    if (mFinalStream != 0 ) return mFinalStream->dump(fd, args);
-    return NO_ERROR;
-}
-
-void AudioStreamInDump::Close()
-{
-    if(mInFile) {
-        fclose(mInFile);
-        mInFile = 0;
-    }
-}
-}; // namespace android
diff --git a/libs/audioflinger/AudioDumpInterface.h b/libs/audioflinger/AudioDumpInterface.h
deleted file mode 100644
index 4c62b3e..0000000
--- a/libs/audioflinger/AudioDumpInterface.h
+++ /dev/null
@@ -1,166 +0,0 @@
-/* //device/servers/AudioFlinger/AudioDumpInterface.h
-**
-** Copyright 2008, The Android Open Source Project
-**
-** Licensed under the Apache License, Version 2.0 (the "License");
-** you may not use this file except in compliance with the License.
-** You may obtain a copy of the License at
-**
-**     http://www.apache.org/licenses/LICENSE-2.0
-**
-** Unless required by applicable law or agreed to in writing, software
-** distributed under the License is distributed on an "AS IS" BASIS,
-** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-** See the License for the specific language governing permissions and
-** limitations under the License.
-*/
-
-#ifndef ANDROID_AUDIO_DUMP_INTERFACE_H
-#define ANDROID_AUDIO_DUMP_INTERFACE_H
-
-#include <stdint.h>
-#include <sys/types.h>
-#include <utils/String8.h>
-#include <utils/SortedVector.h>
-
-#include <hardware_legacy/AudioHardwareBase.h>
-
-namespace android {
-
-#define AUDIO_DUMP_WAVE_HDR_SIZE 44
-
-class AudioDumpInterface;
-
-class AudioStreamOutDump : public AudioStreamOut {
-public:
-                        AudioStreamOutDump(AudioDumpInterface *interface,
-                                            int id,
-                                            AudioStreamOut* finalStream,
-                                            uint32_t devices,
-                                            int format,
-                                            uint32_t channels,
-                                            uint32_t sampleRate);
-                        ~AudioStreamOutDump();
-
-    virtual ssize_t     write(const void* buffer, size_t bytes);
-    virtual uint32_t    sampleRate() const;
-    virtual size_t      bufferSize() const;
-    virtual uint32_t    channels() const;
-    virtual int         format() const;
-    virtual uint32_t    latency() const;
-    virtual status_t    setVolume(float left, float right);
-    virtual status_t    standby();
-    virtual status_t    setParameters(const String8& keyValuePairs);
-    virtual String8     getParameters(const String8& keys);
-    virtual status_t    dump(int fd, const Vector<String16>& args);
-    void                Close(void);
-    AudioStreamOut*     finalStream() { return mFinalStream; }
-    uint32_t            device() { return mDevice; }
-    int                 getId()  { return mId; }
-    virtual status_t    getRenderPosition(uint32_t *dspFrames);
-
-private:
-    AudioDumpInterface *mInterface;
-    int                  mId;
-    uint32_t mSampleRate;               //
-    uint32_t mFormat;                   //
-    uint32_t mChannels;                 // output configuration
-    uint32_t mLatency;                  //
-    uint32_t mDevice;                   // current device this output is routed to
-    size_t  mBufferSize;
-    AudioStreamOut      *mFinalStream;
-    FILE                *mOutFile;      // output file
-    int                 mFileCount;
-};
-
-class AudioStreamInDump : public AudioStreamIn {
-public:
-                        AudioStreamInDump(AudioDumpInterface *interface,
-                                            int id,
-                                            AudioStreamIn* finalStream,
-                                            uint32_t devices,
-                                            int format,
-                                            uint32_t channels,
-                                            uint32_t sampleRate);
-                        ~AudioStreamInDump();
-
-    virtual uint32_t    sampleRate() const;
-    virtual size_t      bufferSize() const;
-    virtual uint32_t    channels() const;
-    virtual int         format() const;
-
-    virtual status_t    setGain(float gain);
-    virtual ssize_t     read(void* buffer, ssize_t bytes);
-    virtual status_t    standby();
-    virtual status_t    setParameters(const String8& keyValuePairs);
-    virtual String8     getParameters(const String8& keys);
-    virtual unsigned int  getInputFramesLost() const;
-    virtual status_t    dump(int fd, const Vector<String16>& args);
-    void                Close(void);
-    AudioStreamIn*     finalStream() { return mFinalStream; }
-    uint32_t            device() { return mDevice; }
-
-private:
-    AudioDumpInterface *mInterface;
-    int                  mId;
-    uint32_t mSampleRate;               //
-    uint32_t mFormat;                   //
-    uint32_t mChannels;                 // output configuration
-    uint32_t mDevice;                   // current device this output is routed to
-    size_t  mBufferSize;
-    AudioStreamIn      *mFinalStream;
-    FILE                *mInFile;      // output file
-};
-
-class AudioDumpInterface : public AudioHardwareBase
-{
-
-public:
-                        AudioDumpInterface(AudioHardwareInterface* hw);
-    virtual AudioStreamOut* openOutputStream(
-                                uint32_t devices,
-                                int *format=0,
-                                uint32_t *channels=0,
-                                uint32_t *sampleRate=0,
-                                status_t *status=0);
-    virtual    void        closeOutputStream(AudioStreamOut* out);
-
-    virtual             ~AudioDumpInterface();
-
-    virtual status_t    initCheck()
-                            {return mFinalInterface->initCheck();}
-    virtual status_t    setVoiceVolume(float volume)
-                            {return mFinalInterface->setVoiceVolume(volume);}
-    virtual status_t    setMasterVolume(float volume)
-                            {return mFinalInterface->setMasterVolume(volume);}
-
-    // mic mute
-    virtual status_t    setMicMute(bool state)
-                            {return mFinalInterface->setMicMute(state);}
-    virtual status_t    getMicMute(bool* state)
-                            {return mFinalInterface->getMicMute(state);}
-
-    virtual status_t    setParameters(const String8& keyValuePairs);
-    virtual String8     getParameters(const String8& keys);
-
-    virtual AudioStreamIn* openInputStream(uint32_t devices, int *format, uint32_t *channels,
-            uint32_t *sampleRate, status_t *status, AudioSystem::audio_in_acoustics acoustics);
-    virtual    void        closeInputStream(AudioStreamIn* in);
-
-    virtual status_t    dump(int fd, const Vector<String16>& args) { return mFinalInterface->dumpState(fd, args); }
-
-            String8     fileName() const { return mFileName; }
-protected:
-
-    AudioHardwareInterface          *mFinalInterface;
-    SortedVector<AudioStreamOutDump *>    mOutputs;
-    bool                            mFirstHwOutput;
-    SortedVector<AudioStreamInDump *>    mInputs;
-    Mutex                           mLock;
-    String8                         mPolicyCommands;
-    String8                         mFileName;
-};
-
-}; // namespace android
-
-#endif // ANDROID_AUDIO_DUMP_INTERFACE_H
diff --git a/libs/audioflinger/AudioFlinger.cpp b/libs/audioflinger/AudioFlinger.cpp
deleted file mode 100644
index 2414e8d..0000000
--- a/libs/audioflinger/AudioFlinger.cpp
+++ /dev/null
@@ -1,4055 +0,0 @@
-/* //device/include/server/AudioFlinger/AudioFlinger.cpp
-**
-** Copyright 2007, The Android Open Source Project
-**
-** Licensed under the Apache License, Version 2.0 (the "License");
-** you may not use this file except in compliance with the License.
-** You may obtain a copy of the License at
-**
-**     http://www.apache.org/licenses/LICENSE-2.0
-**
-** Unless required by applicable law or agreed to in writing, software
-** distributed under the License is distributed on an "AS IS" BASIS,
-** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-** See the License for the specific language governing permissions and
-** limitations under the License.
-*/
-
-
-#define LOG_TAG "AudioFlinger"
-//#define LOG_NDEBUG 0
-
-#include <math.h>
-#include <signal.h>
-#include <sys/time.h>
-#include <sys/resource.h>
-
-#include <binder/IServiceManager.h>
-#include <utils/Log.h>
-#include <binder/Parcel.h>
-#include <binder/IPCThreadState.h>
-#include <utils/String16.h>
-#include <utils/threads.h>
-
-#include <cutils/properties.h>
-
-#include <media/AudioTrack.h>
-#include <media/AudioRecord.h>
-
-#include <private/media/AudioTrackShared.h>
-
-#include <hardware_legacy/AudioHardwareInterface.h>
-
-#include "AudioMixer.h"
-#include "AudioFlinger.h"
-
-#ifdef WITH_A2DP
-#include "A2dpAudioInterface.h"
-#endif
-
-#ifdef LVMX
-#include "lifevibes.h"
-#endif
-
-// ----------------------------------------------------------------------------
-// the sim build doesn't have gettid
-
-#ifndef HAVE_GETTID
-# define gettid getpid
-#endif
-
-// ----------------------------------------------------------------------------
-
-namespace android {
-
-static const char* kDeadlockedString = "AudioFlinger may be deadlocked\n";
-static const char* kHardwareLockedString = "Hardware lock is taken\n";
-
-//static const nsecs_t kStandbyTimeInNsecs = seconds(3);
-static const float MAX_GAIN = 4096.0f;
-
-// retry counts for buffer fill timeout
-// 50 * ~20msecs = 1 second
-static const int8_t kMaxTrackRetries = 50;
-static const int8_t kMaxTrackStartupRetries = 50;
-// allow less retry attempts on direct output thread.
-// direct outputs can be a scarce resource in audio hardware and should
-// be released as quickly as possible.
-static const int8_t kMaxTrackRetriesDirect = 2;
-
-static const int kDumpLockRetries = 50;
-static const int kDumpLockSleep = 20000;
-
-static const nsecs_t kWarningThrottle = seconds(5);
-
-
-#define AUDIOFLINGER_SECURITY_ENABLED 1
-
-// ----------------------------------------------------------------------------
-
-static bool recordingAllowed() {
-#ifndef HAVE_ANDROID_OS
-    return true;
-#endif
-#if AUDIOFLINGER_SECURITY_ENABLED
-    if (getpid() == IPCThreadState::self()->getCallingPid()) return true;
-    bool ok = checkCallingPermission(String16("android.permission.RECORD_AUDIO"));
-    if (!ok) LOGE("Request requires android.permission.RECORD_AUDIO");
-    return ok;
-#else
-    if (!checkCallingPermission(String16("android.permission.RECORD_AUDIO")))
-        LOGW("WARNING: Need to add android.permission.RECORD_AUDIO to manifest");
-    return true;
-#endif
-}
-
-static bool settingsAllowed() {
-#ifndef HAVE_ANDROID_OS
-    return true;
-#endif
-#if AUDIOFLINGER_SECURITY_ENABLED
-    if (getpid() == IPCThreadState::self()->getCallingPid()) return true;
-    bool ok = checkCallingPermission(String16("android.permission.MODIFY_AUDIO_SETTINGS"));
-    if (!ok) LOGE("Request requires android.permission.MODIFY_AUDIO_SETTINGS");
-    return ok;
-#else
-    if (!checkCallingPermission(String16("android.permission.MODIFY_AUDIO_SETTINGS")))
-        LOGW("WARNING: Need to add android.permission.MODIFY_AUDIO_SETTINGS to manifest");
-    return true;
-#endif
-}
-
-// ----------------------------------------------------------------------------
-
-AudioFlinger::AudioFlinger()
-    : BnAudioFlinger(),
-        mAudioHardware(0), mMasterVolume(1.0f), mMasterMute(false), mNextThreadId(0)
-{
-    mHardwareStatus = AUDIO_HW_IDLE;
-
-    mAudioHardware = AudioHardwareInterface::create();
-
-    mHardwareStatus = AUDIO_HW_INIT;
-    if (mAudioHardware->initCheck() == NO_ERROR) {
-        // open 16-bit output stream for s/w mixer
-
-        setMode(AudioSystem::MODE_NORMAL);
-
-        setMasterVolume(1.0f);
-        setMasterMute(false);
-    } else {
-        LOGE("Couldn't even initialize the stubbed audio hardware!");
-    }
-#ifdef LVMX
-    LifeVibes::init();
-#endif
-}
-
-AudioFlinger::~AudioFlinger()
-{
-    while (!mRecordThreads.isEmpty()) {
-        // closeInput() will remove first entry from mRecordThreads
-        closeInput(mRecordThreads.keyAt(0));
-    }
-    while (!mPlaybackThreads.isEmpty()) {
-        // closeOutput() will remove first entry from mPlaybackThreads
-        closeOutput(mPlaybackThreads.keyAt(0));
-    }
-    if (mAudioHardware) {
-        delete mAudioHardware;
-    }
-}
-
-
-
-status_t AudioFlinger::dumpClients(int fd, const Vector<String16>& args)
-{
-    const size_t SIZE = 256;
-    char buffer[SIZE];
-    String8 result;
-
-    result.append("Clients:\n");
-    for (size_t i = 0; i < mClients.size(); ++i) {
-        wp<Client> wClient = mClients.valueAt(i);
-        if (wClient != 0) {
-            sp<Client> client = wClient.promote();
-            if (client != 0) {
-                snprintf(buffer, SIZE, "  pid: %d\n", client->pid());
-                result.append(buffer);
-            }
-        }
-    }
-    write(fd, result.string(), result.size());
-    return NO_ERROR;
-}
-
-
-status_t AudioFlinger::dumpInternals(int fd, const Vector<String16>& args)
-{
-    const size_t SIZE = 256;
-    char buffer[SIZE];
-    String8 result;
-    int hardwareStatus = mHardwareStatus;
-
-    snprintf(buffer, SIZE, "Hardware status: %d\n", hardwareStatus);
-    result.append(buffer);
-    write(fd, result.string(), result.size());
-    return NO_ERROR;
-}
-
-status_t AudioFlinger::dumpPermissionDenial(int fd, const Vector<String16>& args)
-{
-    const size_t SIZE = 256;
-    char buffer[SIZE];
-    String8 result;
-    snprintf(buffer, SIZE, "Permission Denial: "
-            "can't dump AudioFlinger from pid=%d, uid=%d\n",
-            IPCThreadState::self()->getCallingPid(),
-            IPCThreadState::self()->getCallingUid());
-    result.append(buffer);
-    write(fd, result.string(), result.size());
-    return NO_ERROR;
-}
-
-static bool tryLock(Mutex& mutex)
-{
-    bool locked = false;
-    for (int i = 0; i < kDumpLockRetries; ++i) {
-        if (mutex.tryLock() == NO_ERROR) {
-            locked = true;
-            break;
-        }
-        usleep(kDumpLockSleep);
-    }
-    return locked;
-}
-
-status_t AudioFlinger::dump(int fd, const Vector<String16>& args)
-{
-    if (checkCallingPermission(String16("android.permission.DUMP")) == false) {
-        dumpPermissionDenial(fd, args);
-    } else {
-        // get state of hardware lock
-        bool hardwareLocked = tryLock(mHardwareLock);
-        if (!hardwareLocked) {
-            String8 result(kHardwareLockedString);
-            write(fd, result.string(), result.size());
-        } else {
-            mHardwareLock.unlock();
-        }
-
-        bool locked = tryLock(mLock);
-
-        // failed to lock - AudioFlinger is probably deadlocked
-        if (!locked) {
-            String8 result(kDeadlockedString);
-            write(fd, result.string(), result.size());
-        }
-
-        dumpClients(fd, args);
-        dumpInternals(fd, args);
-
-        // dump playback threads
-        for (size_t i = 0; i < mPlaybackThreads.size(); i++) {
-            mPlaybackThreads.valueAt(i)->dump(fd, args);
-        }
-
-        // dump record threads
-        for (size_t i = 0; i < mRecordThreads.size(); i++) {
-            mRecordThreads.valueAt(i)->dump(fd, args);
-        }
-
-        if (mAudioHardware) {
-            mAudioHardware->dumpState(fd, args);
-        }
-        if (locked) mLock.unlock();
-    }
-    return NO_ERROR;
-}
-
-
-// IAudioFlinger interface
-
-
-sp<IAudioTrack> AudioFlinger::createTrack(
-        pid_t pid,
-        int streamType,
-        uint32_t sampleRate,
-        int format,
-        int channelCount,
-        int frameCount,
-        uint32_t flags,
-        const sp<IMemory>& sharedBuffer,
-        int output,
-        status_t *status)
-{
-    sp<PlaybackThread::Track> track;
-    sp<TrackHandle> trackHandle;
-    sp<Client> client;
-    wp<Client> wclient;
-    status_t lStatus;
-
-    if (streamType >= AudioSystem::NUM_STREAM_TYPES) {
-        LOGE("invalid stream type");
-        lStatus = BAD_VALUE;
-        goto Exit;
-    }
-
-    {
-        Mutex::Autolock _l(mLock);
-        PlaybackThread *thread = checkPlaybackThread_l(output);
-        if (thread == NULL) {
-            LOGE("unknown output thread");
-            lStatus = BAD_VALUE;
-            goto Exit;
-        }
-
-        wclient = mClients.valueFor(pid);
-
-        if (wclient != NULL) {
-            client = wclient.promote();
-        } else {
-            client = new Client(this, pid);
-            mClients.add(pid, client);
-        }
-        track = thread->createTrack_l(client, streamType, sampleRate, format,
-                channelCount, frameCount, sharedBuffer, &lStatus);
-    }
-    if (lStatus == NO_ERROR) {
-        trackHandle = new TrackHandle(track);
-    } else {
-        // remove local strong reference to Client before deleting the Track so that the Client
-        // destructor is called by the TrackBase destructor with mLock held
-        client.clear();
-        track.clear();
-    }
-
-Exit:
-    if(status) {
-        *status = lStatus;
-    }
-    return trackHandle;
-}
-
-uint32_t AudioFlinger::sampleRate(int output) const
-{
-    Mutex::Autolock _l(mLock);
-    PlaybackThread *thread = checkPlaybackThread_l(output);
-    if (thread == NULL) {
-        LOGW("sampleRate() unknown thread %d", output);
-        return 0;
-    }
-    return thread->sampleRate();
-}
-
-int AudioFlinger::channelCount(int output) const
-{
-    Mutex::Autolock _l(mLock);
-    PlaybackThread *thread = checkPlaybackThread_l(output);
-    if (thread == NULL) {
-        LOGW("channelCount() unknown thread %d", output);
-        return 0;
-    }
-    return thread->channelCount();
-}
-
-int AudioFlinger::format(int output) const
-{
-    Mutex::Autolock _l(mLock);
-    PlaybackThread *thread = checkPlaybackThread_l(output);
-    if (thread == NULL) {
-        LOGW("format() unknown thread %d", output);
-        return 0;
-    }
-    return thread->format();
-}
-
-size_t AudioFlinger::frameCount(int output) const
-{
-    Mutex::Autolock _l(mLock);
-    PlaybackThread *thread = checkPlaybackThread_l(output);
-    if (thread == NULL) {
-        LOGW("frameCount() unknown thread %d", output);
-        return 0;
-    }
-    return thread->frameCount();
-}
-
-uint32_t AudioFlinger::latency(int output) const
-{
-    Mutex::Autolock _l(mLock);
-    PlaybackThread *thread = checkPlaybackThread_l(output);
-    if (thread == NULL) {
-        LOGW("latency() unknown thread %d", output);
-        return 0;
-    }
-    return thread->latency();
-}
-
-status_t AudioFlinger::setMasterVolume(float value)
-{
-    // check calling permissions
-    if (!settingsAllowed()) {
-        return PERMISSION_DENIED;
-    }
-
-    // when hw supports master volume, don't scale in sw mixer
-    AutoMutex lock(mHardwareLock);
-    mHardwareStatus = AUDIO_HW_SET_MASTER_VOLUME;
-    if (mAudioHardware->setMasterVolume(value) == NO_ERROR) {
-        value = 1.0f;
-    }
-    mHardwareStatus = AUDIO_HW_IDLE;
-
-    mMasterVolume = value;
-    for (uint32_t i = 0; i < mPlaybackThreads.size(); i++)
-       mPlaybackThreads.valueAt(i)->setMasterVolume(value);
-
-    return NO_ERROR;
-}
-
-status_t AudioFlinger::setMode(int mode)
-{
-    // check calling permissions
-    if (!settingsAllowed()) {
-        return PERMISSION_DENIED;
-    }
-    if ((mode < 0) || (mode >= AudioSystem::NUM_MODES)) {
-        LOGW("Illegal value: setMode(%d)", mode);
-        return BAD_VALUE;
-    }
-
-    AutoMutex lock(mHardwareLock);
-    mHardwareStatus = AUDIO_HW_SET_MODE;
-    status_t ret = mAudioHardware->setMode(mode);
-#ifdef LVMX
-    if (NO_ERROR == ret) {
-        LifeVibes::setMode(mode);
-    }
-#endif
-    mHardwareStatus = AUDIO_HW_IDLE;
-    return ret;
-}
-
-status_t AudioFlinger::setMicMute(bool state)
-{
-    // check calling permissions
-    if (!settingsAllowed()) {
-        return PERMISSION_DENIED;
-    }
-
-    AutoMutex lock(mHardwareLock);
-    mHardwareStatus = AUDIO_HW_SET_MIC_MUTE;
-    status_t ret = mAudioHardware->setMicMute(state);
-    mHardwareStatus = AUDIO_HW_IDLE;
-    return ret;
-}
-
-bool AudioFlinger::getMicMute() const
-{
-    bool state = AudioSystem::MODE_INVALID;
-    mHardwareStatus = AUDIO_HW_GET_MIC_MUTE;
-    mAudioHardware->getMicMute(&state);
-    mHardwareStatus = AUDIO_HW_IDLE;
-    return state;
-}
-
-status_t AudioFlinger::setMasterMute(bool muted)
-{
-    // check calling permissions
-    if (!settingsAllowed()) {
-        return PERMISSION_DENIED;
-    }
-
-    mMasterMute = muted;
-    for (uint32_t i = 0; i < mPlaybackThreads.size(); i++)
-       mPlaybackThreads.valueAt(i)->setMasterMute(muted);
-
-    return NO_ERROR;
-}
-
-float AudioFlinger::masterVolume() const
-{
-    return mMasterVolume;
-}
-
-bool AudioFlinger::masterMute() const
-{
-    return mMasterMute;
-}
-
-status_t AudioFlinger::setStreamVolume(int stream, float value, int output)
-{
-    // check calling permissions
-    if (!settingsAllowed()) {
-        return PERMISSION_DENIED;
-    }
-
-    if (stream < 0 || uint32_t(stream) >= AudioSystem::NUM_STREAM_TYPES) {
-        return BAD_VALUE;
-    }
-
-    AutoMutex lock(mLock);
-    PlaybackThread *thread = NULL;
-    if (output) {
-        thread = checkPlaybackThread_l(output);
-        if (thread == NULL) {
-            return BAD_VALUE;
-        }
-    }
-
-    mStreamTypes[stream].volume = value;
-
-    if (thread == NULL) {
-        for (uint32_t i = 0; i < mPlaybackThreads.size(); i++) {
-           mPlaybackThreads.valueAt(i)->setStreamVolume(stream, value);
-        }
-    } else {
-        thread->setStreamVolume(stream, value);
-    }
-
-    return NO_ERROR;
-}
-
-status_t AudioFlinger::setStreamMute(int stream, bool muted)
-{
-    // check calling permissions
-    if (!settingsAllowed()) {
-        return PERMISSION_DENIED;
-    }
-
-    if (stream < 0 || uint32_t(stream) >= AudioSystem::NUM_STREAM_TYPES ||
-        uint32_t(stream) == AudioSystem::ENFORCED_AUDIBLE) {
-        return BAD_VALUE;
-    }
-
-    mStreamTypes[stream].mute = muted;
-    for (uint32_t i = 0; i < mPlaybackThreads.size(); i++)
-       mPlaybackThreads.valueAt(i)->setStreamMute(stream, muted);
-
-    return NO_ERROR;
-}
-
-float AudioFlinger::streamVolume(int stream, int output) const
-{
-    if (stream < 0 || uint32_t(stream) >= AudioSystem::NUM_STREAM_TYPES) {
-        return 0.0f;
-    }
-
-    AutoMutex lock(mLock);
-    float volume;
-    if (output) {
-        PlaybackThread *thread = checkPlaybackThread_l(output);
-        if (thread == NULL) {
-            return 0.0f;
-        }
-        volume = thread->streamVolume(stream);
-    } else {
-        volume = mStreamTypes[stream].volume;
-    }
-
-    return volume;
-}
-
-bool AudioFlinger::streamMute(int stream) const
-{
-    if (stream < 0 || stream >= (int)AudioSystem::NUM_STREAM_TYPES) {
-        return true;
-    }
-
-    return mStreamTypes[stream].mute;
-}
-
-bool AudioFlinger::isStreamActive(int stream) const
-{
-    Mutex::Autolock _l(mLock);
-    for (uint32_t i = 0; i < mPlaybackThreads.size(); i++) {
-        if (mPlaybackThreads.valueAt(i)->isStreamActive(stream)) {
-            return true;
-        }
-    }
-    return false;
-}
-
-status_t AudioFlinger::setParameters(int ioHandle, const String8& keyValuePairs)
-{
-    status_t result;
-
-    LOGV("setParameters(): io %d, keyvalue %s, tid %d, calling tid %d",
-            ioHandle, keyValuePairs.string(), gettid(), IPCThreadState::self()->getCallingPid());
-    // check calling permissions
-    if (!settingsAllowed()) {
-        return PERMISSION_DENIED;
-    }
-
-#ifdef LVMX
-    AudioParameter param = AudioParameter(keyValuePairs);
-    LifeVibes::setParameters(ioHandle,keyValuePairs);
-    String8 key = String8(AudioParameter::keyRouting);
-    int device;
-    if (NO_ERROR != param.getInt(key, device)) {
-        device = -1;
-    }
-
-    key = String8(LifevibesTag);
-    String8 value;
-    int musicEnabled = -1;
-    if (NO_ERROR == param.get(key, value)) {
-        if (value == LifevibesEnable) {
-            musicEnabled = 1;
-        } else if (value == LifevibesDisable) {
-            musicEnabled = 0;
-        }
-    }
-#endif
-
-    // ioHandle == 0 means the parameters are global to the audio hardware interface
-    if (ioHandle == 0) {
-        AutoMutex lock(mHardwareLock);
-        mHardwareStatus = AUDIO_SET_PARAMETER;
-        result = mAudioHardware->setParameters(keyValuePairs);
-#ifdef LVMX
-        if ((NO_ERROR == result) && (musicEnabled != -1)) {
-            LifeVibes::enableMusic((bool) musicEnabled);
-        }
-#endif
-        mHardwareStatus = AUDIO_HW_IDLE;
-        return result;
-    }
-
-    // hold a strong ref on thread in case closeOutput() or closeInput() is called
-    // and the thread is exited once the lock is released
-    sp<ThreadBase> thread;
-    {
-        Mutex::Autolock _l(mLock);
-        thread = checkPlaybackThread_l(ioHandle);
-        if (thread == NULL) {
-            thread = checkRecordThread_l(ioHandle);
-        }
-    }
-    if (thread != NULL) {
-        result = thread->setParameters(keyValuePairs);
-#ifdef LVMX
-        if ((NO_ERROR == result) && (device != -1)) {
-            LifeVibes::setDevice(LifeVibes::threadIdToAudioOutputType(thread->id()), device);
-        }
-#endif
-        return result;
-    }
-    return BAD_VALUE;
-}
-
-String8 AudioFlinger::getParameters(int ioHandle, const String8& keys)
-{
-//    LOGV("getParameters() io %d, keys %s, tid %d, calling tid %d",
-//            ioHandle, keys.string(), gettid(), IPCThreadState::self()->getCallingPid());
-
-    if (ioHandle == 0) {
-        return mAudioHardware->getParameters(keys);
-    }
-
-    Mutex::Autolock _l(mLock);
-
-    PlaybackThread *playbackThread = checkPlaybackThread_l(ioHandle);
-    if (playbackThread != NULL) {
-        return playbackThread->getParameters(keys);
-    }
-    RecordThread *recordThread = checkRecordThread_l(ioHandle);
-    if (recordThread != NULL) {
-        return recordThread->getParameters(keys);
-    }
-    return String8("");
-}
-
-size_t AudioFlinger::getInputBufferSize(uint32_t sampleRate, int format, int channelCount)
-{
-    return mAudioHardware->getInputBufferSize(sampleRate, format, channelCount);
-}
-
-unsigned int AudioFlinger::getInputFramesLost(int ioHandle)
-{
-    if (ioHandle == 0) {
-        return 0;
-    }
-
-    Mutex::Autolock _l(mLock);
-
-    RecordThread *recordThread = checkRecordThread_l(ioHandle);
-    if (recordThread != NULL) {
-        return recordThread->getInputFramesLost();
-    }
-    return 0;
-}
-
-status_t AudioFlinger::setVoiceVolume(float value)
-{
-    // check calling permissions
-    if (!settingsAllowed()) {
-        return PERMISSION_DENIED;
-    }
-
-    AutoMutex lock(mHardwareLock);
-    mHardwareStatus = AUDIO_SET_VOICE_VOLUME;
-    status_t ret = mAudioHardware->setVoiceVolume(value);
-    mHardwareStatus = AUDIO_HW_IDLE;
-
-    return ret;
-}
-
-status_t AudioFlinger::getRenderPosition(uint32_t *halFrames, uint32_t *dspFrames, int output)
-{
-    status_t status;
-
-    Mutex::Autolock _l(mLock);
-
-    PlaybackThread *playbackThread = checkPlaybackThread_l(output);
-    if (playbackThread != NULL) {
-        return playbackThread->getRenderPosition(halFrames, dspFrames);
-    }
-
-    return BAD_VALUE;
-}
-
-void AudioFlinger::registerClient(const sp<IAudioFlingerClient>& client)
-{
-
-    LOGV("registerClient() %p, tid %d, calling tid %d", client.get(), gettid(), IPCThreadState::self()->getCallingPid());
-    Mutex::Autolock _l(mLock);
-
-    sp<IBinder> binder = client->asBinder();
-    if (mNotificationClients.indexOf(binder) < 0) {
-        LOGV("Adding notification client %p", binder.get());
-        binder->linkToDeath(this);
-        mNotificationClients.add(binder);
-    }
-
-    // the config change is always sent from playback or record threads to avoid deadlock
-    // with AudioSystem::gLock
-    for (size_t i = 0; i < mPlaybackThreads.size(); i++) {
-        mPlaybackThreads.valueAt(i)->sendConfigEvent(AudioSystem::OUTPUT_OPENED);
-    }
-
-    for (size_t i = 0; i < mRecordThreads.size(); i++) {
-        mRecordThreads.valueAt(i)->sendConfigEvent(AudioSystem::INPUT_OPENED);
-    }
-}
-
-void AudioFlinger::binderDied(const wp<IBinder>& who) {
-
-    LOGV("binderDied() %p, tid %d, calling tid %d", who.unsafe_get(), gettid(), IPCThreadState::self()->getCallingPid());
-    Mutex::Autolock _l(mLock);
-
-    IBinder *binder = who.unsafe_get();
-
-    if (binder != NULL) {
-        int index = mNotificationClients.indexOf(binder);
-        if (index >= 0) {
-            LOGV("Removing notification client %p", binder);
-            mNotificationClients.removeAt(index);
-        }
-    }
-}
-
-// audioConfigChanged_l() must be called with AudioFlinger::mLock held
-void AudioFlinger::audioConfigChanged_l(int event, int ioHandle, void *param2) {
-    size_t size = mNotificationClients.size();
-    for (size_t i = 0; i < size; i++) {
-        sp<IBinder> binder = mNotificationClients.itemAt(i);
-        LOGV("audioConfigChanged_l() Notifying change to client %p", binder.get());
-        sp<IAudioFlingerClient> client = interface_cast<IAudioFlingerClient> (binder);
-        client->ioConfigChanged(event, ioHandle, param2);
-    }
-}
-
-// removeClient_l() must be called with AudioFlinger::mLock held
-void AudioFlinger::removeClient_l(pid_t pid)
-{
-    LOGV("removeClient_l() pid %d, tid %d, calling tid %d", pid, gettid(), IPCThreadState::self()->getCallingPid());
-    mClients.removeItem(pid);
-}
-
-// ----------------------------------------------------------------------------
-
-AudioFlinger::ThreadBase::ThreadBase(const sp<AudioFlinger>& audioFlinger, int id)
-    :   Thread(false),
-        mAudioFlinger(audioFlinger), mSampleRate(0), mFrameCount(0), mChannelCount(0),
-        mFormat(0), mFrameSize(1), mStandby(false), mId(id), mExiting(false)
-{
-}
-
-AudioFlinger::ThreadBase::~ThreadBase()
-{
-    mParamCond.broadcast();
-    mNewParameters.clear();
-}
-
-void AudioFlinger::ThreadBase::exit()
-{
-    // keep a strong ref on ourself so that we wont get
-    // destroyed in the middle of requestExitAndWait()
-    sp <ThreadBase> strongMe = this;
-
-    LOGV("ThreadBase::exit");
-    {
-        AutoMutex lock(&mLock);
-        mExiting = true;
-        requestExit();
-        mWaitWorkCV.signal();
-    }
-    requestExitAndWait();
-}
-
-uint32_t AudioFlinger::ThreadBase::sampleRate() const
-{
-    return mSampleRate;
-}
-
-int AudioFlinger::ThreadBase::channelCount() const
-{
-    return mChannelCount;
-}
-
-int AudioFlinger::ThreadBase::format() const
-{
-    return mFormat;
-}
-
-size_t AudioFlinger::ThreadBase::frameCount() const
-{
-    return mFrameCount;
-}
-
-status_t AudioFlinger::ThreadBase::setParameters(const String8& keyValuePairs)
-{
-    status_t status;
-
-    LOGV("ThreadBase::setParameters() %s", keyValuePairs.string());
-    Mutex::Autolock _l(mLock);
-
-    mNewParameters.add(keyValuePairs);
-    mWaitWorkCV.signal();
-    // wait condition with timeout in case the thread loop has exited
-    // before the request could be processed
-    if (mParamCond.waitRelative(mLock, seconds(2)) == NO_ERROR) {
-        status = mParamStatus;
-        mWaitWorkCV.signal();
-    } else {
-        status = TIMED_OUT;
-    }
-    return status;
-}
-
-void AudioFlinger::ThreadBase::sendConfigEvent(int event, int param)
-{
-    Mutex::Autolock _l(mLock);
-    sendConfigEvent_l(event, param);
-}
-
-// sendConfigEvent_l() must be called with ThreadBase::mLock held
-void AudioFlinger::ThreadBase::sendConfigEvent_l(int event, int param)
-{
-    ConfigEvent *configEvent = new ConfigEvent();
-    configEvent->mEvent = event;
-    configEvent->mParam = param;
-    mConfigEvents.add(configEvent);
-    LOGV("sendConfigEvent() num events %d event %d, param %d", mConfigEvents.size(), event, param);
-    mWaitWorkCV.signal();
-}
-
-void AudioFlinger::ThreadBase::processConfigEvents()
-{
-    mLock.lock();
-    while(!mConfigEvents.isEmpty()) {
-        LOGV("processConfigEvents() remaining events %d", mConfigEvents.size());
-        ConfigEvent *configEvent = mConfigEvents[0];
-        mConfigEvents.removeAt(0);
-        // release mLock because audioConfigChanged() will lock AudioFlinger mLock
-        // before calling Audioflinger::audioConfigChanged_l() thus creating
-        // potential cross deadlock between AudioFlinger::mLock and mLock
-        mLock.unlock();
-        audioConfigChanged(configEvent->mEvent, configEvent->mParam);
-        delete configEvent;
-        mLock.lock();
-    }
-    mLock.unlock();
-}
-
-status_t AudioFlinger::ThreadBase::dumpBase(int fd, const Vector<String16>& args)
-{
-    const size_t SIZE = 256;
-    char buffer[SIZE];
-    String8 result;
-
-    bool locked = tryLock(mLock);
-    if (!locked) {
-        snprintf(buffer, SIZE, "thread %p maybe dead locked\n", this);
-        write(fd, buffer, strlen(buffer));
-    }
-
-    snprintf(buffer, SIZE, "standby: %d\n", mStandby);
-    result.append(buffer);
-    snprintf(buffer, SIZE, "Sample rate: %d\n", mSampleRate);
-    result.append(buffer);
-    snprintf(buffer, SIZE, "Frame count: %d\n", mFrameCount);
-    result.append(buffer);
-    snprintf(buffer, SIZE, "Channel Count: %d\n", mChannelCount);
-    result.append(buffer);
-    snprintf(buffer, SIZE, "Format: %d\n", mFormat);
-    result.append(buffer);
-    snprintf(buffer, SIZE, "Frame size: %d\n", mFrameSize);
-    result.append(buffer);
-
-    snprintf(buffer, SIZE, "\nPending setParameters commands: \n");
-    result.append(buffer);
-    result.append(" Index Command");
-    for (size_t i = 0; i < mNewParameters.size(); ++i) {
-        snprintf(buffer, SIZE, "\n %02d    ", i);
-        result.append(buffer);
-        result.append(mNewParameters[i]);
-    }
-
-    snprintf(buffer, SIZE, "\n\nPending config events: \n");
-    result.append(buffer);
-    snprintf(buffer, SIZE, " Index event param\n");
-    result.append(buffer);
-    for (size_t i = 0; i < mConfigEvents.size(); i++) {
-        snprintf(buffer, SIZE, " %02d    %02d    %d\n", i, mConfigEvents[i]->mEvent, mConfigEvents[i]->mParam);
-        result.append(buffer);
-    }
-    result.append("\n");
-
-    write(fd, result.string(), result.size());
-
-    if (locked) {
-        mLock.unlock();
-    }
-    return NO_ERROR;
-}
-
-
-// ----------------------------------------------------------------------------
-
-AudioFlinger::PlaybackThread::PlaybackThread(const sp<AudioFlinger>& audioFlinger, AudioStreamOut* output, int id)
-    :   ThreadBase(audioFlinger, id),
-        mMixBuffer(0), mSuspended(0), mBytesWritten(0), mOutput(output),
-        mLastWriteTime(0), mNumWrites(0), mNumDelayedWrites(0), mInWrite(false)
-{
-    readOutputParameters();
-
-    mMasterVolume = mAudioFlinger->masterVolume();
-    mMasterMute = mAudioFlinger->masterMute();
-
-    for (int stream = 0; stream < AudioSystem::NUM_STREAM_TYPES; stream++) {
-        mStreamTypes[stream].volume = mAudioFlinger->streamVolumeInternal(stream);
-        mStreamTypes[stream].mute = mAudioFlinger->streamMute(stream);
-    }
-    // notify client processes that a new input has been opened
-    sendConfigEvent(AudioSystem::OUTPUT_OPENED);
-}
-
-AudioFlinger::PlaybackThread::~PlaybackThread()
-{
-    delete [] mMixBuffer;
-}
-
-status_t AudioFlinger::PlaybackThread::dump(int fd, const Vector<String16>& args)
-{
-    dumpInternals(fd, args);
-    dumpTracks(fd, args);
-    return NO_ERROR;
-}
-
-status_t AudioFlinger::PlaybackThread::dumpTracks(int fd, const Vector<String16>& args)
-{
-    const size_t SIZE = 256;
-    char buffer[SIZE];
-    String8 result;
-
-    snprintf(buffer, SIZE, "Output thread %p tracks\n", this);
-    result.append(buffer);
-    result.append("   Name Clien Typ Fmt Chn Buf  S M F SRate  LeftV RighV Serv     User\n");
-    for (size_t i = 0; i < mTracks.size(); ++i) {
-        sp<Track> track = mTracks[i];
-        if (track != 0) {
-            track->dump(buffer, SIZE);
-            result.append(buffer);
-        }
-    }
-
-    snprintf(buffer, SIZE, "Output thread %p active tracks\n", this);
-    result.append(buffer);
-    result.append("   Name Clien Typ Fmt Chn Buf  S M F SRate  LeftV RighV Serv     User\n");
-    for (size_t i = 0; i < mActiveTracks.size(); ++i) {
-        wp<Track> wTrack = mActiveTracks[i];
-        if (wTrack != 0) {
-            sp<Track> track = wTrack.promote();
-            if (track != 0) {
-                track->dump(buffer, SIZE);
-                result.append(buffer);
-            }
-        }
-    }
-    write(fd, result.string(), result.size());
-    return NO_ERROR;
-}
-
-status_t AudioFlinger::PlaybackThread::dumpInternals(int fd, const Vector<String16>& args)
-{
-    const size_t SIZE = 256;
-    char buffer[SIZE];
-    String8 result;
-
-    snprintf(buffer, SIZE, "\nOutput thread %p internals\n", this);
-    result.append(buffer);
-    snprintf(buffer, SIZE, "last write occurred (msecs): %llu\n", ns2ms(systemTime() - mLastWriteTime));
-    result.append(buffer);
-    snprintf(buffer, SIZE, "total writes: %d\n", mNumWrites);
-    result.append(buffer);
-    snprintf(buffer, SIZE, "delayed writes: %d\n", mNumDelayedWrites);
-    result.append(buffer);
-    snprintf(buffer, SIZE, "blocked in write: %d\n", mInWrite);
-    result.append(buffer);
-    snprintf(buffer, SIZE, "suspend count: %d\n", mSuspended);
-    result.append(buffer);
-    write(fd, result.string(), result.size());
-
-    dumpBase(fd, args);
-
-    return NO_ERROR;
-}
-
-// Thread virtuals
-status_t AudioFlinger::PlaybackThread::readyToRun()
-{
-    if (mSampleRate == 0) {
-        LOGE("No working audio driver found.");
-        return NO_INIT;
-    }
-    LOGI("AudioFlinger's thread %p ready to run", this);
-    return NO_ERROR;
-}
-
-void AudioFlinger::PlaybackThread::onFirstRef()
-{
-    const size_t SIZE = 256;
-    char buffer[SIZE];
-
-    snprintf(buffer, SIZE, "Playback Thread %p", this);
-
-    run(buffer, ANDROID_PRIORITY_URGENT_AUDIO);
-}
-
-// PlaybackThread::createTrack_l() must be called with AudioFlinger::mLock held
-sp<AudioFlinger::PlaybackThread::Track>  AudioFlinger::PlaybackThread::createTrack_l(
-        const sp<AudioFlinger::Client>& client,
-        int streamType,
-        uint32_t sampleRate,
-        int format,
-        int channelCount,
-        int frameCount,
-        const sp<IMemory>& sharedBuffer,
-        status_t *status)
-{
-    sp<Track> track;
-    status_t lStatus;
-
-    if (mType == DIRECT) {
-        if (sampleRate != mSampleRate || format != mFormat || channelCount != mChannelCount) {
-            LOGE("createTrack_l() Bad parameter:  sampleRate %d format %d, channelCount %d for output %p",
-                 sampleRate, format, channelCount, mOutput);
-            lStatus = BAD_VALUE;
-            goto Exit;
-        }
-    } else {
-        // Resampler implementation limits input sampling rate to 2 x output sampling rate.
-        if (sampleRate > mSampleRate*2) {
-            LOGE("Sample rate out of range: %d mSampleRate %d", sampleRate, mSampleRate);
-            lStatus = BAD_VALUE;
-            goto Exit;
-        }
-    }
-
-    if (mOutput == 0) {
-        LOGE("Audio driver not initialized.");
-        lStatus = NO_INIT;
-        goto Exit;
-    }
-
-    { // scope for mLock
-        Mutex::Autolock _l(mLock);
-        track = new Track(this, client, streamType, sampleRate, format,
-                channelCount, frameCount, sharedBuffer);
-        if (track->getCblk() == NULL || track->name() < 0) {
-            lStatus = NO_MEMORY;
-            goto Exit;
-        }
-        mTracks.add(track);
-    }
-    lStatus = NO_ERROR;
-
-Exit:
-    if(status) {
-        *status = lStatus;
-    }
-    return track;
-}
-
-uint32_t AudioFlinger::PlaybackThread::latency() const
-{
-    if (mOutput) {
-        return mOutput->latency();
-    }
-    else {
-        return 0;
-    }
-}
-
-status_t AudioFlinger::PlaybackThread::setMasterVolume(float value)
-{
-#ifdef LVMX
-    int audioOutputType = LifeVibes::getMixerType(mId, mType);
-    if (LifeVibes::audioOutputTypeIsLifeVibes(audioOutputType)) {
-        LifeVibes::setMasterVolume(audioOutputType, value);
-    }
-#endif
-    mMasterVolume = value;
-    return NO_ERROR;
-}
-
-status_t AudioFlinger::PlaybackThread::setMasterMute(bool muted)
-{
-#ifdef LVMX
-    int audioOutputType = LifeVibes::getMixerType(mId, mType);
-    if (LifeVibes::audioOutputTypeIsLifeVibes(audioOutputType)) {
-        LifeVibes::setMasterMute(audioOutputType, muted);
-    }
-#endif
-    mMasterMute = muted;
-    return NO_ERROR;
-}
-
-float AudioFlinger::PlaybackThread::masterVolume() const
-{
-    return mMasterVolume;
-}
-
-bool AudioFlinger::PlaybackThread::masterMute() const
-{
-    return mMasterMute;
-}
-
-status_t AudioFlinger::PlaybackThread::setStreamVolume(int stream, float value)
-{
-#ifdef LVMX
-    int audioOutputType = LifeVibes::getMixerType(mId, mType);
-    if (LifeVibes::audioOutputTypeIsLifeVibes(audioOutputType)) {
-        LifeVibes::setStreamVolume(audioOutputType, stream, value);
-    }
-#endif
-    mStreamTypes[stream].volume = value;
-    return NO_ERROR;
-}
-
-status_t AudioFlinger::PlaybackThread::setStreamMute(int stream, bool muted)
-{
-#ifdef LVMX
-    int audioOutputType = LifeVibes::getMixerType(mId, mType);
-    if (LifeVibes::audioOutputTypeIsLifeVibes(audioOutputType)) {
-        LifeVibes::setStreamMute(audioOutputType, stream, muted);
-    }
-#endif
-    mStreamTypes[stream].mute = muted;
-    return NO_ERROR;
-}
-
-float AudioFlinger::PlaybackThread::streamVolume(int stream) const
-{
-    return mStreamTypes[stream].volume;
-}
-
-bool AudioFlinger::PlaybackThread::streamMute(int stream) const
-{
-    return mStreamTypes[stream].mute;
-}
-
-bool AudioFlinger::PlaybackThread::isStreamActive(int stream) const
-{
-    Mutex::Autolock _l(mLock);
-    size_t count = mActiveTracks.size();
-    for (size_t i = 0 ; i < count ; ++i) {
-        sp<Track> t = mActiveTracks[i].promote();
-        if (t == 0) continue;
-        Track* const track = t.get();
-        if (t->type() == stream)
-            return true;
-    }
-    return false;
-}
-
-// addTrack_l() must be called with ThreadBase::mLock held
-status_t AudioFlinger::PlaybackThread::addTrack_l(const sp<Track>& track)
-{
-    status_t status = ALREADY_EXISTS;
-
-    // set retry count for buffer fill
-    track->mRetryCount = kMaxTrackStartupRetries;
-    if (mActiveTracks.indexOf(track) < 0) {
-        // the track is newly added, make sure it fills up all its
-        // buffers before playing. This is to ensure the client will
-        // effectively get the latency it requested.
-        track->mFillingUpStatus = Track::FS_FILLING;
-        track->mResetDone = false;
-        mActiveTracks.add(track);
-        status = NO_ERROR;
-    }
-
-    LOGV("mWaitWorkCV.broadcast");
-    mWaitWorkCV.broadcast();
-
-    return status;
-}
-
-// destroyTrack_l() must be called with ThreadBase::mLock held
-void AudioFlinger::PlaybackThread::destroyTrack_l(const sp<Track>& track)
-{
-    track->mState = TrackBase::TERMINATED;
-    if (mActiveTracks.indexOf(track) < 0) {
-        mTracks.remove(track);
-        deleteTrackName_l(track->name());
-    }
-}
-
-String8 AudioFlinger::PlaybackThread::getParameters(const String8& keys)
-{
-    return mOutput->getParameters(keys);
-}
-
-void AudioFlinger::PlaybackThread::audioConfigChanged(int event, int param) {
-    AudioSystem::OutputDescriptor desc;
-    void *param2 = 0;
-
-    LOGV("PlaybackThread::audioConfigChanged, thread %p, event %d, param %d", this, event, param);
-
-    switch (event) {
-    case AudioSystem::OUTPUT_OPENED:
-    case AudioSystem::OUTPUT_CONFIG_CHANGED:
-        desc.channels = mChannelCount;
-        desc.samplingRate = mSampleRate;
-        desc.format = mFormat;
-        desc.frameCount = mFrameCount;
-        desc.latency = latency();
-        param2 = &desc;
-        break;
-
-    case AudioSystem::STREAM_CONFIG_CHANGED:
-        param2 = &param;
-    case AudioSystem::OUTPUT_CLOSED:
-    default:
-        break;
-    }
-    Mutex::Autolock _l(mAudioFlinger->mLock);
-    mAudioFlinger->audioConfigChanged_l(event, mId, param2);
-}
-
-void AudioFlinger::PlaybackThread::readOutputParameters()
-{
-    mSampleRate = mOutput->sampleRate();
-    mChannelCount = AudioSystem::popCount(mOutput->channels());
-
-    mFormat = mOutput->format();
-    mFrameSize = mOutput->frameSize();
-    mFrameCount = mOutput->bufferSize() / mFrameSize;
-
-    // FIXME - Current mixer implementation only supports stereo output: Always
-    // Allocate a stereo buffer even if HW output is mono.
-    if (mMixBuffer != NULL) delete mMixBuffer;
-    mMixBuffer = new int16_t[mFrameCount * 2];
-    memset(mMixBuffer, 0, mFrameCount * 2 * sizeof(int16_t));
-}
-
-status_t AudioFlinger::PlaybackThread::getRenderPosition(uint32_t *halFrames, uint32_t *dspFrames)
-{
-    if (halFrames == 0 || dspFrames == 0) {
-        return BAD_VALUE;
-    }
-    if (mOutput == 0) {
-        return INVALID_OPERATION;
-    }
-    *halFrames = mBytesWritten/mOutput->frameSize();
-
-    return mOutput->getRenderPosition(dspFrames);
-}
-
-// ----------------------------------------------------------------------------
-
-AudioFlinger::MixerThread::MixerThread(const sp<AudioFlinger>& audioFlinger, AudioStreamOut* output, int id)
-    :   PlaybackThread(audioFlinger, output, id),
-        mAudioMixer(0)
-{
-    mType = PlaybackThread::MIXER;
-    mAudioMixer = new AudioMixer(mFrameCount, mSampleRate);
-
-    // FIXME - Current mixer implementation only supports stereo output
-    if (mChannelCount == 1) {
-        LOGE("Invalid audio hardware channel count");
-    }
-}
-
-AudioFlinger::MixerThread::~MixerThread()
-{
-    delete mAudioMixer;
-}
-
-bool AudioFlinger::MixerThread::threadLoop()
-{
-    int16_t* curBuf = mMixBuffer;
-    Vector< sp<Track> > tracksToRemove;
-    uint32_t mixerStatus = MIXER_IDLE;
-    nsecs_t standbyTime = systemTime();
-    size_t mixBufferSize = mFrameCount * mFrameSize;
-    // FIXME: Relaxed timing because of a certain device that can't meet latency
-    // Should be reduced to 2x after the vendor fixes the driver issue
-    nsecs_t maxPeriod = seconds(mFrameCount) / mSampleRate * 3;
-    nsecs_t lastWarning = 0;
-    bool longStandbyExit = false;
-    uint32_t activeSleepTime = activeSleepTimeUs();
-    uint32_t idleSleepTime = idleSleepTimeUs();
-    uint32_t sleepTime = idleSleepTime;
-
-    while (!exitPending())
-    {
-        processConfigEvents();
-
-        mixerStatus = MIXER_IDLE;
-        { // scope for mLock
-
-            Mutex::Autolock _l(mLock);
-
-            if (checkForNewParameters_l()) {
-                mixBufferSize = mFrameCount * mFrameSize;
-                // FIXME: Relaxed timing because of a certain device that can't meet latency
-                // Should be reduced to 2x after the vendor fixes the driver issue
-                maxPeriod = seconds(mFrameCount) / mSampleRate * 3;
-                activeSleepTime = activeSleepTimeUs();
-                idleSleepTime = idleSleepTimeUs();
-            }
-
-            const SortedVector< wp<Track> >& activeTracks = mActiveTracks;
-
-            // put audio hardware into standby after short delay
-            if UNLIKELY((!activeTracks.size() && systemTime() > standbyTime) ||
-                        mSuspended) {
-                if (!mStandby) {
-                    LOGV("Audio hardware entering standby, mixer %p, mSuspended %d\n", this, mSuspended);
-                    mOutput->standby();
-                    mStandby = true;
-                    mBytesWritten = 0;
-                }
-
-                if (!activeTracks.size() && mConfigEvents.isEmpty()) {
-                    // we're about to wait, flush the binder command buffer
-                    IPCThreadState::self()->flushCommands();
-
-                    if (exitPending()) break;
-
-                    // wait until we have something to do...
-                    LOGV("MixerThread %p TID %d going to sleep\n", this, gettid());
-                    mWaitWorkCV.wait(mLock);
-                    LOGV("MixerThread %p TID %d waking up\n", this, gettid());
-
-                    if (mMasterMute == false) {
-                        char value[PROPERTY_VALUE_MAX];
-                        property_get("ro.audio.silent", value, "0");
-                        if (atoi(value)) {
-                            LOGD("Silence is golden");
-                            setMasterMute(true);
-                        }
-                    }
-
-                    standbyTime = systemTime() + kStandbyTimeInNsecs;
-                    sleepTime = idleSleepTime;
-                    continue;
-                }
-            }
-
-            mixerStatus = prepareTracks_l(activeTracks, &tracksToRemove);
-       }
-
-        if (LIKELY(mixerStatus == MIXER_TRACKS_READY)) {
-            // mix buffers...
-            mAudioMixer->process(curBuf);
-            sleepTime = 0;
-            standbyTime = systemTime() + kStandbyTimeInNsecs;
-        } else {
-            // If no tracks are ready, sleep once for the duration of an output
-            // buffer size, then write 0s to the output
-            if (sleepTime == 0) {
-                if (mixerStatus == MIXER_TRACKS_ENABLED) {
-                    sleepTime = activeSleepTime;
-                } else {
-                    sleepTime = idleSleepTime;
-                }
-            } else if (mBytesWritten != 0 ||
-                       (mixerStatus == MIXER_TRACKS_ENABLED && longStandbyExit)) {
-                memset (curBuf, 0, mixBufferSize);
-                sleepTime = 0;
-                LOGV_IF((mBytesWritten == 0 && (mixerStatus == MIXER_TRACKS_ENABLED && longStandbyExit)), "anticipated start");
-            }
-        }
-
-        if (mSuspended) {
-            sleepTime = idleSleepTime;
-        }
-        // sleepTime == 0 means we must write to audio hardware
-        if (sleepTime == 0) {
-            mLastWriteTime = systemTime();
-            mInWrite = true;
-            mBytesWritten += mixBufferSize;
-#ifdef LVMX
-            int audioOutputType = LifeVibes::getMixerType(mId, mType);
-            if (LifeVibes::audioOutputTypeIsLifeVibes(audioOutputType)) {
-               LifeVibes::process(audioOutputType, curBuf, mixBufferSize);
-            }
-#endif
-            int bytesWritten = (int)mOutput->write(curBuf, mixBufferSize);
-            if (bytesWritten < 0) mBytesWritten -= mixBufferSize;
-            mNumWrites++;
-            mInWrite = false;
-            nsecs_t now = systemTime();
-            nsecs_t delta = now - mLastWriteTime;
-            if (delta > maxPeriod) {
-                mNumDelayedWrites++;
-                if ((now - lastWarning) > kWarningThrottle) {
-                    LOGW("write blocked for %llu msecs, %d delayed writes, thread %p",
-                            ns2ms(delta), mNumDelayedWrites, this);
-                    lastWarning = now;
-                }
-                if (mStandby) {
-                    longStandbyExit = true;
-                }
-            }
-            mStandby = false;
-        } else {
-            usleep(sleepTime);
-        }
-
-        // finally let go of all our tracks, without the lock held
-        // since we can't guarantee the destructors won't acquire that
-        // same lock.
-        tracksToRemove.clear();
-    }
-
-    if (!mStandby) {
-        mOutput->standby();
-    }
-
-    LOGV("MixerThread %p exiting", this);
-    return false;
-}
-
-// prepareTracks_l() must be called with ThreadBase::mLock held
-uint32_t AudioFlinger::MixerThread::prepareTracks_l(const SortedVector< wp<Track> >& activeTracks, Vector< sp<Track> > *tracksToRemove)
-{
-
-    uint32_t mixerStatus = MIXER_IDLE;
-    // find out which tracks need to be processed
-    size_t count = activeTracks.size();
-
-    float masterVolume = mMasterVolume;
-    bool  masterMute = mMasterMute;
-
-#ifdef LVMX
-    bool tracksConnectedChanged = false;
-    bool stateChanged = false;
-
-    int audioOutputType = LifeVibes::getMixerType(mId, mType);
-    if (LifeVibes::audioOutputTypeIsLifeVibes(audioOutputType))
-    {
-        int activeTypes = 0;
-        for (size_t i=0 ; i<count ; i++) {
-            sp<Track> t = activeTracks[i].promote();
-            if (t == 0) continue;
-            Track* const track = t.get();
-            int iTracktype=track->type();
-            activeTypes |= 1<<track->type();
-        }
-        LifeVibes::computeVolumes(audioOutputType, activeTypes, tracksConnectedChanged, stateChanged, masterVolume, masterMute);
-    }
-#endif
-
-    for (size_t i=0 ; i<count ; i++) {
-        sp<Track> t = activeTracks[i].promote();
-        if (t == 0) continue;
-
-        Track* const track = t.get();
-        audio_track_cblk_t* cblk = track->cblk();
-
-        // The first time a track is added we wait
-        // for all its buffers to be filled before processing it
-        mAudioMixer->setActiveTrack(track->name());
-        if (cblk->framesReady() && (track->isReady() || track->isStopped()) &&
-                !track->isPaused() && !track->isTerminated())
-        {
-            //LOGV("track %d u=%08x, s=%08x [OK] on thread %p", track->name(), cblk->user, cblk->server, this);
-
-            // compute volume for this track
-            int16_t left, right;
-            if (track->isMuted() || masterMute || track->isPausing() ||
-                mStreamTypes[track->type()].mute) {
-                left = right = 0;
-                if (track->isPausing()) {
-                    track->setPaused();
-                }
-            } else {
-                // read original volumes with volume control
-                float typeVolume = mStreamTypes[track->type()].volume;
-#ifdef LVMX
-                bool streamMute=false;
-                // read the volume from the LivesVibes audio engine.
-                if (LifeVibes::audioOutputTypeIsLifeVibes(audioOutputType))
-                {
-                    LifeVibes::getStreamVolumes(audioOutputType, track->type(), &typeVolume, &streamMute);
-                    if (streamMute) {
-                        typeVolume = 0;
-                    }
-                }
-#endif
-                float v = masterVolume * typeVolume;
-                float v_clamped = v * cblk->volume[0];
-                if (v_clamped > MAX_GAIN) v_clamped = MAX_GAIN;
-                left = int16_t(v_clamped);
-                v_clamped = v * cblk->volume[1];
-                if (v_clamped > MAX_GAIN) v_clamped = MAX_GAIN;
-                right = int16_t(v_clamped);
-            }
-
-            // XXX: these things DON'T need to be done each time
-            mAudioMixer->setBufferProvider(track);
-            mAudioMixer->enable(AudioMixer::MIXING);
-
-            int param = AudioMixer::VOLUME;
-            if (track->mFillingUpStatus == Track::FS_FILLED) {
-                // no ramp for the first volume setting
-                track->mFillingUpStatus = Track::FS_ACTIVE;
-                if (track->mState == TrackBase::RESUMING) {
-                    track->mState = TrackBase::ACTIVE;
-                    param = AudioMixer::RAMP_VOLUME;
-                }
-            } else if (cblk->server != 0) {
-                // If the track is stopped before the first frame was mixed,
-                // do not apply ramp
-                param = AudioMixer::RAMP_VOLUME;
-            }
-#ifdef LVMX
-            if ( tracksConnectedChanged || stateChanged )
-            {
-                 // only do the ramp when the volume is changed by the user / application
-                 param = AudioMixer::VOLUME;
-            }
-#endif
-            mAudioMixer->setParameter(param, AudioMixer::VOLUME0, left);
-            mAudioMixer->setParameter(param, AudioMixer::VOLUME1, right);
-            mAudioMixer->setParameter(
-                AudioMixer::TRACK,
-                AudioMixer::FORMAT, track->format());
-            mAudioMixer->setParameter(
-                AudioMixer::TRACK,
-                AudioMixer::CHANNEL_COUNT, track->channelCount());
-            mAudioMixer->setParameter(
-                AudioMixer::RESAMPLE,
-                AudioMixer::SAMPLE_RATE,
-                int(cblk->sampleRate));
-
-            // reset retry count
-            track->mRetryCount = kMaxTrackRetries;
-            mixerStatus = MIXER_TRACKS_READY;
-        } else {
-            //LOGV("track %d u=%08x, s=%08x [NOT READY] on thread %p", track->name(), cblk->user, cblk->server, this);
-            if (track->isStopped()) {
-                track->reset();
-            }
-            if (track->isTerminated() || track->isStopped() || track->isPaused()) {
-                // We have consumed all the buffers of this track.
-                // Remove it from the list of active tracks.
-                tracksToRemove->add(track);
-                mAudioMixer->disable(AudioMixer::MIXING);
-            } else {
-                // No buffers for this track. Give it a few chances to
-                // fill a buffer, then remove it from active list.
-                if (--(track->mRetryCount) <= 0) {
-                    LOGV("BUFFER TIMEOUT: remove(%d) from active list on thread %p", track->name(), this);
-                    tracksToRemove->add(track);
-                } else if (mixerStatus != MIXER_TRACKS_READY) {
-                    mixerStatus = MIXER_TRACKS_ENABLED;
-                }
-
-                mAudioMixer->disable(AudioMixer::MIXING);
-            }
-        }
-    }
-
-    // remove all the tracks that need to be...
-    count = tracksToRemove->size();
-    if (UNLIKELY(count)) {
-        for (size_t i=0 ; i<count ; i++) {
-            const sp<Track>& track = tracksToRemove->itemAt(i);
-            mActiveTracks.remove(track);
-            if (track->isTerminated()) {
-                mTracks.remove(track);
-                deleteTrackName_l(track->mName);
-            }
-        }
-    }
-
-    return mixerStatus;
-}
-
-void AudioFlinger::MixerThread::getTracks(
-        SortedVector < sp<Track> >& tracks,
-        SortedVector < wp<Track> >& activeTracks,
-        int streamType)
-{
-    LOGV ("MixerThread::getTracks() mixer %p, mTracks.size %d, mActiveTracks.size %d", this,  mTracks.size(), mActiveTracks.size());
-    Mutex::Autolock _l(mLock);
-    size_t size = mTracks.size();
-    for (size_t i = 0; i < size; i++) {
-        sp<Track> t = mTracks[i];
-        if (t->type() == streamType) {
-            tracks.add(t);
-            int j = mActiveTracks.indexOf(t);
-            if (j >= 0) {
-                t = mActiveTracks[j].promote();
-                if (t != NULL) {
-                    activeTracks.add(t);
-                }
-            }
-        }
-    }
-
-    size = activeTracks.size();
-    for (size_t i = 0; i < size; i++) {
-        mActiveTracks.remove(activeTracks[i]);
-    }
-
-    size = tracks.size();
-    for (size_t i = 0; i < size; i++) {
-        sp<Track> t = tracks[i];
-        mTracks.remove(t);
-        deleteTrackName_l(t->name());
-    }
-}
-
-void AudioFlinger::MixerThread::putTracks(
-        SortedVector < sp<Track> >& tracks,
-        SortedVector < wp<Track> >& activeTracks)
-{
-    LOGV ("MixerThread::putTracks() mixer %p, tracks.size %d, activeTracks.size %d", this,  tracks.size(), activeTracks.size());
-    Mutex::Autolock _l(mLock);
-    size_t size = tracks.size();
-    for (size_t i = 0; i < size ; i++) {
-        sp<Track> t = tracks[i];
-        int name = getTrackName_l();
-
-        if (name < 0) return;
-
-        t->mName = name;
-        t->mThread = this;
-        mTracks.add(t);
-
-        int j = activeTracks.indexOf(t);
-        if (j >= 0) {
-            mActiveTracks.add(t);
-            // force buffer refilling and no ramp volume when the track is mixed for the first time
-            t->mFillingUpStatus = Track::FS_FILLING;
-        }
-    }
-}
-
-// getTrackName_l() must be called with ThreadBase::mLock held
-int AudioFlinger::MixerThread::getTrackName_l()
-{
-    return mAudioMixer->getTrackName();
-}
-
-// deleteTrackName_l() must be called with ThreadBase::mLock held
-void AudioFlinger::MixerThread::deleteTrackName_l(int name)
-{
-    LOGV("remove track (%d) and delete from mixer", name);
-    mAudioMixer->deleteTrackName(name);
-}
-
-// checkForNewParameters_l() must be called with ThreadBase::mLock held
-bool AudioFlinger::MixerThread::checkForNewParameters_l()
-{
-    bool reconfig = false;
-
-    while (!mNewParameters.isEmpty()) {
-        status_t status = NO_ERROR;
-        String8 keyValuePair = mNewParameters[0];
-        AudioParameter param = AudioParameter(keyValuePair);
-        int value;
-
-        if (param.getInt(String8(AudioParameter::keySamplingRate), value) == NO_ERROR) {
-            reconfig = true;
-        }
-        if (param.getInt(String8(AudioParameter::keyFormat), value) == NO_ERROR) {
-            if (value != AudioSystem::PCM_16_BIT) {
-                status = BAD_VALUE;
-            } else {
-                reconfig = true;
-            }
-        }
-        if (param.getInt(String8(AudioParameter::keyChannels), value) == NO_ERROR) {
-            if (value != AudioSystem::CHANNEL_OUT_STEREO) {
-                status = BAD_VALUE;
-            } else {
-                reconfig = true;
-            }
-        }
-        if (param.getInt(String8(AudioParameter::keyFrameCount), value) == NO_ERROR) {
-            // do not accept frame count changes if tracks are open as the track buffer
-            // size depends on frame count and correct behavior would not be garantied
-            // if frame count is changed after track creation
-            if (!mTracks.isEmpty()) {
-                status = INVALID_OPERATION;
-            } else {
-                reconfig = true;
-            }
-        }
-        if (status == NO_ERROR) {
-            status = mOutput->setParameters(keyValuePair);
-            if (!mStandby && status == INVALID_OPERATION) {
-               mOutput->standby();
-               mStandby = true;
-               mBytesWritten = 0;
-               status = mOutput->setParameters(keyValuePair);
-            }
-            if (status == NO_ERROR && reconfig) {
-                delete mAudioMixer;
-                readOutputParameters();
-                mAudioMixer = new AudioMixer(mFrameCount, mSampleRate);
-                for (size_t i = 0; i < mTracks.size() ; i++) {
-                    int name = getTrackName_l();
-                    if (name < 0) break;
-                    mTracks[i]->mName = name;
-                    // limit track sample rate to 2 x new output sample rate
-                    if (mTracks[i]->mCblk->sampleRate > 2 * sampleRate()) {
-                        mTracks[i]->mCblk->sampleRate = 2 * sampleRate();
-                    }
-                }
-                sendConfigEvent_l(AudioSystem::OUTPUT_CONFIG_CHANGED);
-            }
-        }
-
-        mNewParameters.removeAt(0);
-
-        mParamStatus = status;
-        mParamCond.signal();
-        mWaitWorkCV.wait(mLock);
-    }
-    return reconfig;
-}
-
-status_t AudioFlinger::MixerThread::dumpInternals(int fd, const Vector<String16>& args)
-{
-    const size_t SIZE = 256;
-    char buffer[SIZE];
-    String8 result;
-
-    PlaybackThread::dumpInternals(fd, args);
-
-    snprintf(buffer, SIZE, "AudioMixer tracks: %08x\n", mAudioMixer->trackNames());
-    result.append(buffer);
-    write(fd, result.string(), result.size());
-    return NO_ERROR;
-}
-
-uint32_t AudioFlinger::MixerThread::activeSleepTimeUs()
-{
-    return (uint32_t)(mOutput->latency() * 1000) / 2;
-}
-
-uint32_t AudioFlinger::MixerThread::idleSleepTimeUs()
-{
-    return (uint32_t)((mFrameCount * 1000) / mSampleRate) * 1000;
-}
-
-// ----------------------------------------------------------------------------
-AudioFlinger::DirectOutputThread::DirectOutputThread(const sp<AudioFlinger>& audioFlinger, AudioStreamOut* output, int id)
-    :   PlaybackThread(audioFlinger, output, id),
-    mLeftVolume (1.0), mRightVolume(1.0)
-{
-    mType = PlaybackThread::DIRECT;
-}
-
-AudioFlinger::DirectOutputThread::~DirectOutputThread()
-{
-}
-
-
-bool AudioFlinger::DirectOutputThread::threadLoop()
-{
-    uint32_t mixerStatus = MIXER_IDLE;
-    sp<Track> trackToRemove;
-    sp<Track> activeTrack;
-    nsecs_t standbyTime = systemTime();
-    int8_t *curBuf;
-    size_t mixBufferSize = mFrameCount*mFrameSize;
-    uint32_t activeSleepTime = activeSleepTimeUs();
-    uint32_t idleSleepTime = idleSleepTimeUs();
-    uint32_t sleepTime = idleSleepTime;
-    // use shorter standby delay as on normal output to release
-    // hardware resources as soon as possible
-    nsecs_t standbyDelay = microseconds(activeSleepTime*2);
-
-
-    while (!exitPending())
-    {
-        processConfigEvents();
-
-        mixerStatus = MIXER_IDLE;
-
-        { // scope for the mLock
-
-            Mutex::Autolock _l(mLock);
-
-            if (checkForNewParameters_l()) {
-                mixBufferSize = mFrameCount*mFrameSize;
-                activeSleepTime = activeSleepTimeUs();
-                idleSleepTime = idleSleepTimeUs();
-                standbyDelay = microseconds(activeSleepTime*2);
-            }
-
-            // put audio hardware into standby after short delay
-            if UNLIKELY((!mActiveTracks.size() && systemTime() > standbyTime) ||
-                        mSuspended) {
-                // wait until we have something to do...
-                if (!mStandby) {
-                    LOGV("Audio hardware entering standby, mixer %p\n", this);
-                    mOutput->standby();
-                    mStandby = true;
-                    mBytesWritten = 0;
-                }
-
-                if (!mActiveTracks.size() && mConfigEvents.isEmpty()) {
-                    // we're about to wait, flush the binder command buffer
-                    IPCThreadState::self()->flushCommands();
-
-                    if (exitPending()) break;
-
-                    LOGV("DirectOutputThread %p TID %d going to sleep\n", this, gettid());
-                    mWaitWorkCV.wait(mLock);
-                    LOGV("DirectOutputThread %p TID %d waking up in active mode\n", this, gettid());
-
-                    if (mMasterMute == false) {
-                        char value[PROPERTY_VALUE_MAX];
-                        property_get("ro.audio.silent", value, "0");
-                        if (atoi(value)) {
-                            LOGD("Silence is golden");
-                            setMasterMute(true);
-                        }
-                    }
-
-                    standbyTime = systemTime() + standbyDelay;
-                    sleepTime = idleSleepTime;
-                    continue;
-                }
-            }
-
-            // find out which tracks need to be processed
-            if (mActiveTracks.size() != 0) {
-                sp<Track> t = mActiveTracks[0].promote();
-                if (t == 0) continue;
-
-                Track* const track = t.get();
-                audio_track_cblk_t* cblk = track->cblk();
-
-                // The first time a track is added we wait
-                // for all its buffers to be filled before processing it
-                if (cblk->framesReady() && (track->isReady() || track->isStopped()) &&
-                        !track->isPaused() && !track->isTerminated())
-                {
-                    //LOGV("track %d u=%08x, s=%08x [OK]", track->name(), cblk->user, cblk->server);
-
-                    // compute volume for this track
-                    float left, right;
-                    if (track->isMuted() || mMasterMute || track->isPausing() ||
-                        mStreamTypes[track->type()].mute) {
-                        left = right = 0;
-                        if (track->isPausing()) {
-                            track->setPaused();
-                        }
-                    } else {
-                        float typeVolume = mStreamTypes[track->type()].volume;
-                        float v = mMasterVolume * typeVolume;
-                        float v_clamped = v * cblk->volume[0];
-                        if (v_clamped > MAX_GAIN) v_clamped = MAX_GAIN;
-                        left = v_clamped/MAX_GAIN;
-                        v_clamped = v * cblk->volume[1];
-                        if (v_clamped > MAX_GAIN) v_clamped = MAX_GAIN;
-                        right = v_clamped/MAX_GAIN;
-                    }
-
-                    if (left != mLeftVolume || right != mRightVolume) {
-                        mOutput->setVolume(left, right);
-                        left = mLeftVolume;
-                        right = mRightVolume;
-                    }
-
-                    if (track->mFillingUpStatus == Track::FS_FILLED) {
-                        track->mFillingUpStatus = Track::FS_ACTIVE;
-                        if (track->mState == TrackBase::RESUMING) {
-                            track->mState = TrackBase::ACTIVE;
-                        }
-                    }
-
-                    // reset retry count
-                    track->mRetryCount = kMaxTrackRetriesDirect;
-                    activeTrack = t;
-                    mixerStatus = MIXER_TRACKS_READY;
-                } else {
-                    //LOGV("track %d u=%08x, s=%08x [NOT READY]", track->name(), cblk->user, cblk->server);
-                    if (track->isStopped()) {
-                        track->reset();
-                    }
-                    if (track->isTerminated() || track->isStopped() || track->isPaused()) {
-                        // We have consumed all the buffers of this track.
-                        // Remove it from the list of active tracks.
-                        trackToRemove = track;
-                    } else {
-                        // No buffers for this track. Give it a few chances to
-                        // fill a buffer, then remove it from active list.
-                        if (--(track->mRetryCount) <= 0) {
-                            LOGV("BUFFER TIMEOUT: remove(%d) from active list", track->name());
-                            trackToRemove = track;
-                        } else {
-                            mixerStatus = MIXER_TRACKS_ENABLED;
-                        }
-                    }
-                }
-            }
-
-            // remove all the tracks that need to be...
-            if (UNLIKELY(trackToRemove != 0)) {
-                mActiveTracks.remove(trackToRemove);
-                if (trackToRemove->isTerminated()) {
-                    mTracks.remove(trackToRemove);
-                    deleteTrackName_l(trackToRemove->mName);
-                }
-            }
-       }
-
-        if (LIKELY(mixerStatus == MIXER_TRACKS_READY)) {
-            AudioBufferProvider::Buffer buffer;
-            size_t frameCount = mFrameCount;
-            curBuf = (int8_t *)mMixBuffer;
-            // output audio to hardware
-            while(frameCount) {
-                buffer.frameCount = frameCount;
-                activeTrack->getNextBuffer(&buffer);
-                if (UNLIKELY(buffer.raw == 0)) {
-                    memset(curBuf, 0, frameCount * mFrameSize);
-                    break;
-                }
-                memcpy(curBuf, buffer.raw, buffer.frameCount * mFrameSize);
-                frameCount -= buffer.frameCount;
-                curBuf += buffer.frameCount * mFrameSize;
-                activeTrack->releaseBuffer(&buffer);
-            }
-            sleepTime = 0;
-            standbyTime = systemTime() + standbyDelay;
-        } else {
-            if (sleepTime == 0) {
-                if (mixerStatus == MIXER_TRACKS_ENABLED) {
-                    sleepTime = activeSleepTime;
-                } else {
-                    sleepTime = idleSleepTime;
-                }
-            } else if (mBytesWritten != 0 && AudioSystem::isLinearPCM(mFormat)) {
-                memset (mMixBuffer, 0, mFrameCount * mFrameSize);
-                sleepTime = 0;
-            }
-        }
-
-        if (mSuspended) {
-            sleepTime = idleSleepTime;
-        }
-        // sleepTime == 0 means we must write to audio hardware
-        if (sleepTime == 0) {
-            mLastWriteTime = systemTime();
-            mInWrite = true;
-            mBytesWritten += mixBufferSize;
-            int bytesWritten = (int)mOutput->write(mMixBuffer, mixBufferSize);
-            if (bytesWritten < 0) mBytesWritten -= mixBufferSize;
-            mNumWrites++;
-            mInWrite = false;
-            mStandby = false;
-        } else {
-            usleep(sleepTime);
-        }
-
-        // finally let go of removed track, without the lock held
-        // since we can't guarantee the destructors won't acquire that
-        // same lock.
-        trackToRemove.clear();
-        activeTrack.clear();
-    }
-
-    if (!mStandby) {
-        mOutput->standby();
-    }
-
-    LOGV("DirectOutputThread %p exiting", this);
-    return false;
-}
-
-// getTrackName_l() must be called with ThreadBase::mLock held
-int AudioFlinger::DirectOutputThread::getTrackName_l()
-{
-    return 0;
-}
-
-// deleteTrackName_l() must be called with ThreadBase::mLock held
-void AudioFlinger::DirectOutputThread::deleteTrackName_l(int name)
-{
-}
-
-// checkForNewParameters_l() must be called with ThreadBase::mLock held
-bool AudioFlinger::DirectOutputThread::checkForNewParameters_l()
-{
-    bool reconfig = false;
-
-    while (!mNewParameters.isEmpty()) {
-        status_t status = NO_ERROR;
-        String8 keyValuePair = mNewParameters[0];
-        AudioParameter param = AudioParameter(keyValuePair);
-        int value;
-
-        if (param.getInt(String8(AudioParameter::keyFrameCount), value) == NO_ERROR) {
-            // do not accept frame count changes if tracks are open as the track buffer
-            // size depends on frame count and correct behavior would not be garantied
-            // if frame count is changed after track creation
-            if (!mTracks.isEmpty()) {
-                status = INVALID_OPERATION;
-            } else {
-                reconfig = true;
-            }
-        }
-        if (status == NO_ERROR) {
-            status = mOutput->setParameters(keyValuePair);
-            if (!mStandby && status == INVALID_OPERATION) {
-               mOutput->standby();
-               mStandby = true;
-               mBytesWritten = 0;
-               status = mOutput->setParameters(keyValuePair);
-            }
-            if (status == NO_ERROR && reconfig) {
-                readOutputParameters();
-                sendConfigEvent_l(AudioSystem::OUTPUT_CONFIG_CHANGED);
-            }
-        }
-
-        mNewParameters.removeAt(0);
-
-        mParamStatus = status;
-        mParamCond.signal();
-        mWaitWorkCV.wait(mLock);
-    }
-    return reconfig;
-}
-
-uint32_t AudioFlinger::DirectOutputThread::activeSleepTimeUs()
-{
-    uint32_t time;
-    if (AudioSystem::isLinearPCM(mFormat)) {
-        time = (uint32_t)(mOutput->latency() * 1000) / 2;
-    } else {
-        time = 10000;
-    }
-    return time;
-}
-
-uint32_t AudioFlinger::DirectOutputThread::idleSleepTimeUs()
-{
-    uint32_t time;
-    if (AudioSystem::isLinearPCM(mFormat)) {
-        time = (uint32_t)((mFrameCount * 1000) / mSampleRate) * 1000;
-    } else {
-        time = 10000;
-    }
-    return time;
-}
-
-// ----------------------------------------------------------------------------
-
-AudioFlinger::DuplicatingThread::DuplicatingThread(const sp<AudioFlinger>& audioFlinger, AudioFlinger::MixerThread* mainThread, int id)
-    :   MixerThread(audioFlinger, mainThread->getOutput(), id), mWaitTimeMs(UINT_MAX)
-{
-    mType = PlaybackThread::DUPLICATING;
-    addOutputTrack(mainThread);
-}
-
-AudioFlinger::DuplicatingThread::~DuplicatingThread()
-{
-    for (size_t i = 0; i < mOutputTracks.size(); i++) {
-        mOutputTracks[i]->destroy();
-    }
-    mOutputTracks.clear();
-}
-
-bool AudioFlinger::DuplicatingThread::threadLoop()
-{
-    int16_t* curBuf = mMixBuffer;
-    Vector< sp<Track> > tracksToRemove;
-    uint32_t mixerStatus = MIXER_IDLE;
-    nsecs_t standbyTime = systemTime();
-    size_t mixBufferSize = mFrameCount*mFrameSize;
-    SortedVector< sp<OutputTrack> > outputTracks;
-    uint32_t writeFrames = 0;
-    uint32_t activeSleepTime = activeSleepTimeUs();
-    uint32_t idleSleepTime = idleSleepTimeUs();
-    uint32_t sleepTime = idleSleepTime;
-
-    while (!exitPending())
-    {
-        processConfigEvents();
-
-        mixerStatus = MIXER_IDLE;
-        { // scope for the mLock
-
-            Mutex::Autolock _l(mLock);
-
-            if (checkForNewParameters_l()) {
-                mixBufferSize = mFrameCount*mFrameSize;
-                updateWaitTime();
-                activeSleepTime = activeSleepTimeUs();
-                idleSleepTime = idleSleepTimeUs();
-            }
-
-            const SortedVector< wp<Track> >& activeTracks = mActiveTracks;
-
-            for (size_t i = 0; i < mOutputTracks.size(); i++) {
-                outputTracks.add(mOutputTracks[i]);
-            }
-
-            // put audio hardware into standby after short delay
-            if UNLIKELY((!activeTracks.size() && systemTime() > standbyTime) ||
-                         mSuspended) {
-                if (!mStandby) {
-                    for (size_t i = 0; i < outputTracks.size(); i++) {
-                        outputTracks[i]->stop();
-                    }
-                    mStandby = true;
-                    mBytesWritten = 0;
-                }
-
-                if (!activeTracks.size() && mConfigEvents.isEmpty()) {
-                    // we're about to wait, flush the binder command buffer
-                    IPCThreadState::self()->flushCommands();
-                    outputTracks.clear();
-
-                    if (exitPending()) break;
-
-                    LOGV("DuplicatingThread %p TID %d going to sleep\n", this, gettid());
-                    mWaitWorkCV.wait(mLock);
-                    LOGV("DuplicatingThread %p TID %d waking up\n", this, gettid());
-                    if (mMasterMute == false) {
-                        char value[PROPERTY_VALUE_MAX];
-                        property_get("ro.audio.silent", value, "0");
-                        if (atoi(value)) {
-                            LOGD("Silence is golden");
-                            setMasterMute(true);
-                        }
-                    }
-
-                    standbyTime = systemTime() + kStandbyTimeInNsecs;
-                    sleepTime = idleSleepTime;
-                    continue;
-                }
-            }
-
-            mixerStatus = prepareTracks_l(activeTracks, &tracksToRemove);
-        }
-
-        if (LIKELY(mixerStatus == MIXER_TRACKS_READY)) {
-            // mix buffers...
-            if (outputsReady(outputTracks)) {
-                mAudioMixer->process(curBuf);
-            } else {
-                memset(curBuf, 0, mixBufferSize);
-            }
-            sleepTime = 0;
-            writeFrames = mFrameCount;
-        } else {
-            if (sleepTime == 0) {
-                if (mixerStatus == MIXER_TRACKS_ENABLED) {
-                    sleepTime = activeSleepTime;
-                } else {
-                    sleepTime = idleSleepTime;
-                }
-            } else if (mBytesWritten != 0) {
-                // flush remaining overflow buffers in output tracks
-                for (size_t i = 0; i < outputTracks.size(); i++) {
-                    if (outputTracks[i]->isActive()) {
-                        sleepTime = 0;
-                        writeFrames = 0;
-                        break;
-                    }
-                }
-            }
-        }
-
-        if (mSuspended) {
-            sleepTime = idleSleepTime;
-        }
-        // sleepTime == 0 means we must write to audio hardware
-        if (sleepTime == 0) {
-            standbyTime = systemTime() + kStandbyTimeInNsecs;
-            for (size_t i = 0; i < outputTracks.size(); i++) {
-                outputTracks[i]->write(curBuf, writeFrames);
-            }
-            mStandby = false;
-            mBytesWritten += mixBufferSize;
-        } else {
-            usleep(sleepTime);
-        }
-
-        // finally let go of all our tracks, without the lock held
-        // since we can't guarantee the destructors won't acquire that
-        // same lock.
-        tracksToRemove.clear();
-        outputTracks.clear();
-    }
-
-    return false;
-}
-
-void AudioFlinger::DuplicatingThread::addOutputTrack(MixerThread *thread)
-{
-    int frameCount = (3 * mFrameCount * mSampleRate) / thread->sampleRate();
-    OutputTrack *outputTrack = new OutputTrack((ThreadBase *)thread,
-                                            this,
-                                            mSampleRate,
-                                            mFormat,
-                                            mChannelCount,
-                                            frameCount);
-    if (outputTrack->cblk() != NULL) {
-        thread->setStreamVolume(AudioSystem::NUM_STREAM_TYPES, 1.0f);
-        mOutputTracks.add(outputTrack);
-        LOGV("addOutputTrack() track %p, on thread %p", outputTrack, thread);
-        updateWaitTime();
-    }
-}
-
-void AudioFlinger::DuplicatingThread::removeOutputTrack(MixerThread *thread)
-{
-    Mutex::Autolock _l(mLock);
-    for (size_t i = 0; i < mOutputTracks.size(); i++) {
-        if (mOutputTracks[i]->thread() == (ThreadBase *)thread) {
-            mOutputTracks[i]->destroy();
-            mOutputTracks.removeAt(i);
-            updateWaitTime();
-            return;
-        }
-    }
-    LOGV("removeOutputTrack(): unkonwn thread: %p", thread);
-}
-
-void AudioFlinger::DuplicatingThread::updateWaitTime()
-{
-    mWaitTimeMs = UINT_MAX;
-    for (size_t i = 0; i < mOutputTracks.size(); i++) {
-        sp<ThreadBase> strong = mOutputTracks[i]->thread().promote();
-        if (strong != NULL) {
-            uint32_t waitTimeMs = (strong->frameCount() * 2 * 1000) / strong->sampleRate();
-            if (waitTimeMs < mWaitTimeMs) {
-                mWaitTimeMs = waitTimeMs;
-            }
-        }
-    }
-}
-
-
-bool AudioFlinger::DuplicatingThread::outputsReady(SortedVector< sp<OutputTrack> > &outputTracks)
-{
-    for (size_t i = 0; i < outputTracks.size(); i++) {
-        sp <ThreadBase> thread = outputTracks[i]->thread().promote();
-        if (thread == 0) {
-            LOGW("DuplicatingThread::outputsReady() could not promote thread on output track %p", outputTracks[i].get());
-            return false;
-        }
-        PlaybackThread *playbackThread = (PlaybackThread *)thread.get();
-        if (playbackThread->standby() && !playbackThread->isSuspended()) {
-            LOGV("DuplicatingThread output track %p on thread %p Not Ready", outputTracks[i].get(), thread.get());
-            return false;
-        }
-    }
-    return true;
-}
-
-uint32_t AudioFlinger::DuplicatingThread::activeSleepTimeUs()
-{
-    return (mWaitTimeMs * 1000) / 2;
-}
-
-// ----------------------------------------------------------------------------
-
-// TrackBase constructor must be called with AudioFlinger::mLock held
-AudioFlinger::ThreadBase::TrackBase::TrackBase(
-            const wp<ThreadBase>& thread,
-            const sp<Client>& client,
-            uint32_t sampleRate,
-            int format,
-            int channelCount,
-            int frameCount,
-            uint32_t flags,
-            const sp<IMemory>& sharedBuffer)
-    :   RefBase(),
-        mThread(thread),
-        mClient(client),
-        mCblk(0),
-        mFrameCount(0),
-        mState(IDLE),
-        mClientTid(-1),
-        mFormat(format),
-        mFlags(flags & ~SYSTEM_FLAGS_MASK)
-{
-    LOGV_IF(sharedBuffer != 0, "sharedBuffer: %p, size: %d", sharedBuffer->pointer(), sharedBuffer->size());
-
-    // LOGD("Creating track with %d buffers @ %d bytes", bufferCount, bufferSize);
-   size_t size = sizeof(audio_track_cblk_t);
-   size_t bufferSize = frameCount*channelCount*sizeof(int16_t);
-   if (sharedBuffer == 0) {
-       size += bufferSize;
-   }
-
-   if (client != NULL) {
-        mCblkMemory = client->heap()->allocate(size);
-        if (mCblkMemory != 0) {
-            mCblk = static_cast<audio_track_cblk_t *>(mCblkMemory->pointer());
-            if (mCblk) { // construct the shared structure in-place.
-                new(mCblk) audio_track_cblk_t();
-                // clear all buffers
-                mCblk->frameCount = frameCount;
-                mCblk->sampleRate = sampleRate;
-                mCblk->channels = (uint8_t)channelCount;
-                if (sharedBuffer == 0) {
-                    mBuffer = (char*)mCblk + sizeof(audio_track_cblk_t);
-                    memset(mBuffer, 0, frameCount*channelCount*sizeof(int16_t));
-                    // Force underrun condition to avoid false underrun callback until first data is
-                    // written to buffer
-                    mCblk->flowControlFlag = 1;
-                } else {
-                    mBuffer = sharedBuffer->pointer();
-                }
-                mBufferEnd = (uint8_t *)mBuffer + bufferSize;
-            }
-        } else {
-            LOGE("not enough memory for AudioTrack size=%u", size);
-            client->heap()->dump("AudioTrack");
-            return;
-        }
-   } else {
-       mCblk = (audio_track_cblk_t *)(new uint8_t[size]);
-       if (mCblk) { // construct the shared structure in-place.
-           new(mCblk) audio_track_cblk_t();
-           // clear all buffers
-           mCblk->frameCount = frameCount;
-           mCblk->sampleRate = sampleRate;
-           mCblk->channels = (uint8_t)channelCount;
-           mBuffer = (char*)mCblk + sizeof(audio_track_cblk_t);
-           memset(mBuffer, 0, frameCount*channelCount*sizeof(int16_t));
-           // Force underrun condition to avoid false underrun callback until first data is
-           // written to buffer
-           mCblk->flowControlFlag = 1;
-           mBufferEnd = (uint8_t *)mBuffer + bufferSize;
-       }
-   }
-}
-
-AudioFlinger::ThreadBase::TrackBase::~TrackBase()
-{
-    if (mCblk) {
-        mCblk->~audio_track_cblk_t();   // destroy our shared-structure.
-        if (mClient == NULL) {
-            delete mCblk;
-        }
-    }
-    mCblkMemory.clear();            // and free the shared memory
-    if (mClient != NULL) {
-        Mutex::Autolock _l(mClient->audioFlinger()->mLock);
-        mClient.clear();
-    }
-}
-
-void AudioFlinger::ThreadBase::TrackBase::releaseBuffer(AudioBufferProvider::Buffer* buffer)
-{
-    buffer->raw = 0;
-    mFrameCount = buffer->frameCount;
-    step();
-    buffer->frameCount = 0;
-}
-
-bool AudioFlinger::ThreadBase::TrackBase::step() {
-    bool result;
-    audio_track_cblk_t* cblk = this->cblk();
-
-    result = cblk->stepServer(mFrameCount);
-    if (!result) {
-        LOGV("stepServer failed acquiring cblk mutex");
-        mFlags |= STEPSERVER_FAILED;
-    }
-    return result;
-}
-
-void AudioFlinger::ThreadBase::TrackBase::reset() {
-    audio_track_cblk_t* cblk = this->cblk();
-
-    cblk->user = 0;
-    cblk->server = 0;
-    cblk->userBase = 0;
-    cblk->serverBase = 0;
-    mFlags &= (uint32_t)(~SYSTEM_FLAGS_MASK);
-    LOGV("TrackBase::reset");
-}
-
-sp<IMemory> AudioFlinger::ThreadBase::TrackBase::getCblk() const
-{
-    return mCblkMemory;
-}
-
-int AudioFlinger::ThreadBase::TrackBase::sampleRate() const {
-    return (int)mCblk->sampleRate;
-}
-
-int AudioFlinger::ThreadBase::TrackBase::channelCount() const {
-    return (int)mCblk->channels;
-}
-
-void* AudioFlinger::ThreadBase::TrackBase::getBuffer(uint32_t offset, uint32_t frames) const {
-    audio_track_cblk_t* cblk = this->cblk();
-    int8_t *bufferStart = (int8_t *)mBuffer + (offset-cblk->serverBase)*cblk->frameSize;
-    int8_t *bufferEnd = bufferStart + frames * cblk->frameSize;
-
-    // Check validity of returned pointer in case the track control block would have been corrupted.
-    if (bufferStart < mBuffer || bufferStart > bufferEnd || bufferEnd > mBufferEnd ||
-        ((unsigned long)bufferStart & (unsigned long)(cblk->frameSize - 1))) {
-        LOGE("TrackBase::getBuffer buffer out of range:\n    start: %p, end %p , mBuffer %p mBufferEnd %p\n    \
-                server %d, serverBase %d, user %d, userBase %d, channels %d",
-                bufferStart, bufferEnd, mBuffer, mBufferEnd,
-                cblk->server, cblk->serverBase, cblk->user, cblk->userBase, cblk->channels);
-        return 0;
-    }
-
-    return bufferStart;
-}
-
-// ----------------------------------------------------------------------------
-
-// Track constructor must be called with AudioFlinger::mLock and ThreadBase::mLock held
-AudioFlinger::PlaybackThread::Track::Track(
-            const wp<ThreadBase>& thread,
-            const sp<Client>& client,
-            int streamType,
-            uint32_t sampleRate,
-            int format,
-            int channelCount,
-            int frameCount,
-            const sp<IMemory>& sharedBuffer)
-    :   TrackBase(thread, client, sampleRate, format, channelCount, frameCount, 0, sharedBuffer),
-    mMute(false), mSharedBuffer(sharedBuffer), mName(-1)
-{
-    if (mCblk != NULL) {
-        sp<ThreadBase> baseThread = thread.promote();
-        if (baseThread != 0) {
-            PlaybackThread *playbackThread = (PlaybackThread *)baseThread.get();
-            mName = playbackThread->getTrackName_l();
-        }
-        LOGV("Track constructor name %d, calling thread %d", mName, IPCThreadState::self()->getCallingPid());
-        if (mName < 0) {
-            LOGE("no more track names available");
-        }
-        mVolume[0] = 1.0f;
-        mVolume[1] = 1.0f;
-        mStreamType = streamType;
-        // NOTE: audio_track_cblk_t::frameSize for 8 bit PCM data is based on a sample size of
-        // 16 bit because data is converted to 16 bit before being stored in buffer by AudioTrack
-        mCblk->frameSize = AudioSystem::isLinearPCM(format) ? channelCount * sizeof(int16_t) : sizeof(int8_t);
-    }
-}
-
-AudioFlinger::PlaybackThread::Track::~Track()
-{
-    LOGV("PlaybackThread::Track destructor");
-    sp<ThreadBase> thread = mThread.promote();
-    if (thread != 0) {
-        Mutex::Autolock _l(thread->mLock);
-        mState = TERMINATED;
-    }
-}
-
-void AudioFlinger::PlaybackThread::Track::destroy()
-{
-    // NOTE: destroyTrack_l() can remove a strong reference to this Track
-    // by removing it from mTracks vector, so there is a risk that this Tracks's
-    // desctructor is called. As the destructor needs to lock mLock,
-    // we must acquire a strong reference on this Track before locking mLock
-    // here so that the destructor is called only when exiting this function.
-    // On the other hand, as long as Track::destroy() is only called by
-    // TrackHandle destructor, the TrackHandle still holds a strong ref on
-    // this Track with its member mTrack.
-    sp<Track> keep(this);
-    { // scope for mLock
-        sp<ThreadBase> thread = mThread.promote();
-        if (thread != 0) {
-            if (!isOutputTrack()) {
-                if (mState == ACTIVE || mState == RESUMING) {
-                    AudioSystem::stopOutput(thread->id(), (AudioSystem::stream_type)mStreamType);
-                }
-                AudioSystem::releaseOutput(thread->id());
-            }
-            Mutex::Autolock _l(thread->mLock);
-            PlaybackThread *playbackThread = (PlaybackThread *)thread.get();
-            playbackThread->destroyTrack_l(this);
-        }
-    }
-}
-
-void AudioFlinger::PlaybackThread::Track::dump(char* buffer, size_t size)
-{
-    snprintf(buffer, size, "  %5d %5d %3u %3u %3u %04u %1d %1d %1d %5u %5u %5u  %08x %08x\n",
-            mName - AudioMixer::TRACK0,
-            (mClient == NULL) ? getpid() : mClient->pid(),
-            mStreamType,
-            mFormat,
-            mCblk->channels,
-            mFrameCount,
-            mState,
-            mMute,
-            mFillingUpStatus,
-            mCblk->sampleRate,
-            mCblk->volume[0],
-            mCblk->volume[1],
-            mCblk->server,
-            mCblk->user);
-}
-
-status_t AudioFlinger::PlaybackThread::Track::getNextBuffer(AudioBufferProvider::Buffer* buffer)
-{
-     audio_track_cblk_t* cblk = this->cblk();
-     uint32_t framesReady;
-     uint32_t framesReq = buffer->frameCount;
-
-     // Check if last stepServer failed, try to step now
-     if (mFlags & TrackBase::STEPSERVER_FAILED) {
-         if (!step())  goto getNextBuffer_exit;
-         LOGV("stepServer recovered");
-         mFlags &= ~TrackBase::STEPSERVER_FAILED;
-     }
-
-     framesReady = cblk->framesReady();
-
-     if (LIKELY(framesReady)) {
-        uint32_t s = cblk->server;
-        uint32_t bufferEnd = cblk->serverBase + cblk->frameCount;
-
-        bufferEnd = (cblk->loopEnd < bufferEnd) ? cblk->loopEnd : bufferEnd;
-        if (framesReq > framesReady) {
-            framesReq = framesReady;
-        }
-        if (s + framesReq > bufferEnd) {
-            framesReq = bufferEnd - s;
-        }
-
-         buffer->raw = getBuffer(s, framesReq);
-         if (buffer->raw == 0) goto getNextBuffer_exit;
-
-         buffer->frameCount = framesReq;
-        return NO_ERROR;
-     }
-
-getNextBuffer_exit:
-     buffer->raw = 0;
-     buffer->frameCount = 0;
-     LOGV("getNextBuffer() no more data for track %d on thread %p", mName, mThread.unsafe_get());
-     return NOT_ENOUGH_DATA;
-}
-
-bool AudioFlinger::PlaybackThread::Track::isReady() const {
-    if (mFillingUpStatus != FS_FILLING) return true;
-
-    if (mCblk->framesReady() >= mCblk->frameCount ||
-        mCblk->forceReady) {
-        mFillingUpStatus = FS_FILLED;
-        mCblk->forceReady = 0;
-        return true;
-    }
-    return false;
-}
-
-status_t AudioFlinger::PlaybackThread::Track::start()
-{
-    status_t status = NO_ERROR;
-    LOGV("start(%d), calling thread %d", mName, IPCThreadState::self()->getCallingPid());
-    sp<ThreadBase> thread = mThread.promote();
-    if (thread != 0) {
-        Mutex::Autolock _l(thread->mLock);
-        int state = mState;
-        // here the track could be either new, or restarted
-        // in both cases "unstop" the track
-        if (mState == PAUSED) {
-            mState = TrackBase::RESUMING;
-            LOGV("PAUSED => RESUMING (%d) on thread %p", mName, this);
-        } else {
-            mState = TrackBase::ACTIVE;
-            LOGV("? => ACTIVE (%d) on thread %p", mName, this);
-        }
-
-        if (!isOutputTrack() && state != ACTIVE && state != RESUMING) {
-            thread->mLock.unlock();
-            status = AudioSystem::startOutput(thread->id(), (AudioSystem::stream_type)mStreamType);
-            thread->mLock.lock();
-        }
-        if (status == NO_ERROR) {
-            PlaybackThread *playbackThread = (PlaybackThread *)thread.get();
-            playbackThread->addTrack_l(this);
-        } else {
-            mState = state;
-        }
-    } else {
-        status = BAD_VALUE;
-    }
-    return status;
-}
-
-void AudioFlinger::PlaybackThread::Track::stop()
-{
-    LOGV("stop(%d), calling thread %d", mName, IPCThreadState::self()->getCallingPid());
-    sp<ThreadBase> thread = mThread.promote();
-    if (thread != 0) {
-        Mutex::Autolock _l(thread->mLock);
-        int state = mState;
-        if (mState > STOPPED) {
-            mState = STOPPED;
-            // If the track is not active (PAUSED and buffers full), flush buffers
-            PlaybackThread *playbackThread = (PlaybackThread *)thread.get();
-            if (playbackThread->mActiveTracks.indexOf(this) < 0) {
-                reset();
-            }
-            LOGV("(> STOPPED) => STOPPED (%d) on thread %p", mName, playbackThread);
-        }
-        if (!isOutputTrack() && (state == ACTIVE || state == RESUMING)) {
-            thread->mLock.unlock();
-            AudioSystem::stopOutput(thread->id(), (AudioSystem::stream_type)mStreamType);
-            thread->mLock.lock();
-        }
-    }
-}
-
-void AudioFlinger::PlaybackThread::Track::pause()
-{
-    LOGV("pause(%d), calling thread %d", mName, IPCThreadState::self()->getCallingPid());
-    sp<ThreadBase> thread = mThread.promote();
-    if (thread != 0) {
-        Mutex::Autolock _l(thread->mLock);
-        if (mState == ACTIVE || mState == RESUMING) {
-            mState = PAUSING;
-            LOGV("ACTIVE/RESUMING => PAUSING (%d) on thread %p", mName, thread.get());
-            if (!isOutputTrack()) {
-                thread->mLock.unlock();
-                AudioSystem::stopOutput(thread->id(), (AudioSystem::stream_type)mStreamType);
-                thread->mLock.lock();
-            }
-        }
-    }
-}
-
-void AudioFlinger::PlaybackThread::Track::flush()
-{
-    LOGV("flush(%d)", mName);
-    sp<ThreadBase> thread = mThread.promote();
-    if (thread != 0) {
-        Mutex::Autolock _l(thread->mLock);
-        if (mState != STOPPED && mState != PAUSED && mState != PAUSING) {
-            return;
-        }
-        // No point remaining in PAUSED state after a flush => go to
-        // STOPPED state
-        mState = STOPPED;
-
-        mCblk->lock.lock();
-        // NOTE: reset() will reset cblk->user and cblk->server with
-        // the risk that at the same time, the AudioMixer is trying to read
-        // data. In this case, getNextBuffer() would return a NULL pointer
-        // as audio buffer => the AudioMixer code MUST always test that pointer
-        // returned by getNextBuffer() is not NULL!
-        reset();
-        mCblk->lock.unlock();
-    }
-}
-
-void AudioFlinger::PlaybackThread::Track::reset()
-{
-    // Do not reset twice to avoid discarding data written just after a flush and before
-    // the audioflinger thread detects the track is stopped.
-    if (!mResetDone) {
-        TrackBase::reset();
-        // Force underrun condition to avoid false underrun callback until first data is
-        // written to buffer
-        mCblk->flowControlFlag = 1;
-        mCblk->forceReady = 0;
-        mFillingUpStatus = FS_FILLING;
-        mResetDone = true;
-    }
-}
-
-void AudioFlinger::PlaybackThread::Track::mute(bool muted)
-{
-    mMute = muted;
-}
-
-void AudioFlinger::PlaybackThread::Track::setVolume(float left, float right)
-{
-    mVolume[0] = left;
-    mVolume[1] = right;
-}
-
-// ----------------------------------------------------------------------------
-
-// RecordTrack constructor must be called with AudioFlinger::mLock held
-AudioFlinger::RecordThread::RecordTrack::RecordTrack(
-            const wp<ThreadBase>& thread,
-            const sp<Client>& client,
-            uint32_t sampleRate,
-            int format,
-            int channelCount,
-            int frameCount,
-            uint32_t flags)
-    :   TrackBase(thread, client, sampleRate, format,
-                  channelCount, frameCount, flags, 0),
-        mOverflow(false)
-{
-    if (mCblk != NULL) {
-       LOGV("RecordTrack constructor, size %d", (int)mBufferEnd - (int)mBuffer);
-       if (format == AudioSystem::PCM_16_BIT) {
-           mCblk->frameSize = channelCount * sizeof(int16_t);
-       } else if (format == AudioSystem::PCM_8_BIT) {
-           mCblk->frameSize = channelCount * sizeof(int8_t);
-       } else {
-           mCblk->frameSize = sizeof(int8_t);
-       }
-    }
-}
-
-AudioFlinger::RecordThread::RecordTrack::~RecordTrack()
-{
-    sp<ThreadBase> thread = mThread.promote();
-    if (thread != 0) {
-        AudioSystem::releaseInput(thread->id());
-    }
-}
-
-status_t AudioFlinger::RecordThread::RecordTrack::getNextBuffer(AudioBufferProvider::Buffer* buffer)
-{
-    audio_track_cblk_t* cblk = this->cblk();
-    uint32_t framesAvail;
-    uint32_t framesReq = buffer->frameCount;
-
-     // Check if last stepServer failed, try to step now
-    if (mFlags & TrackBase::STEPSERVER_FAILED) {
-        if (!step()) goto getNextBuffer_exit;
-        LOGV("stepServer recovered");
-        mFlags &= ~TrackBase::STEPSERVER_FAILED;
-    }
-
-    framesAvail = cblk->framesAvailable_l();
-
-    if (LIKELY(framesAvail)) {
-        uint32_t s = cblk->server;
-        uint32_t bufferEnd = cblk->serverBase + cblk->frameCount;
-
-        if (framesReq > framesAvail) {
-            framesReq = framesAvail;
-        }
-        if (s + framesReq > bufferEnd) {
-            framesReq = bufferEnd - s;
-        }
-
-        buffer->raw = getBuffer(s, framesReq);
-        if (buffer->raw == 0) goto getNextBuffer_exit;
-
-        buffer->frameCount = framesReq;
-        return NO_ERROR;
-    }
-
-getNextBuffer_exit:
-    buffer->raw = 0;
-    buffer->frameCount = 0;
-    return NOT_ENOUGH_DATA;
-}
-
-status_t AudioFlinger::RecordThread::RecordTrack::start()
-{
-    sp<ThreadBase> thread = mThread.promote();
-    if (thread != 0) {
-        RecordThread *recordThread = (RecordThread *)thread.get();
-        return recordThread->start(this);
-    } else {
-        return BAD_VALUE;
-    }
-}
-
-void AudioFlinger::RecordThread::RecordTrack::stop()
-{
-    sp<ThreadBase> thread = mThread.promote();
-    if (thread != 0) {
-        RecordThread *recordThread = (RecordThread *)thread.get();
-        recordThread->stop(this);
-        TrackBase::reset();
-        // Force overerrun condition to avoid false overrun callback until first data is
-        // read from buffer
-        mCblk->flowControlFlag = 1;
-    }
-}
-
-void AudioFlinger::RecordThread::RecordTrack::dump(char* buffer, size_t size)
-{
-    snprintf(buffer, size, "   %05d %03u %03u %04u %01d %05u  %08x %08x\n",
-            (mClient == NULL) ? getpid() : mClient->pid(),
-            mFormat,
-            mCblk->channels,
-            mFrameCount,
-            mState,
-            mCblk->sampleRate,
-            mCblk->server,
-            mCblk->user);
-}
-
-
-// ----------------------------------------------------------------------------
-
-AudioFlinger::PlaybackThread::OutputTrack::OutputTrack(
-            const wp<ThreadBase>& thread,
-            DuplicatingThread *sourceThread,
-            uint32_t sampleRate,
-            int format,
-            int channelCount,
-            int frameCount)
-    :   Track(thread, NULL, AudioSystem::NUM_STREAM_TYPES, sampleRate, format, channelCount, frameCount, NULL),
-    mActive(false), mSourceThread(sourceThread)
-{
-
-    PlaybackThread *playbackThread = (PlaybackThread *)thread.unsafe_get();
-    if (mCblk != NULL) {
-        mCblk->out = 1;
-        mCblk->buffers = (char*)mCblk + sizeof(audio_track_cblk_t);
-        mCblk->volume[0] = mCblk->volume[1] = 0x1000;
-        mOutBuffer.frameCount = 0;
-        playbackThread->mTracks.add(this);
-        LOGV("OutputTrack constructor mCblk %p, mBuffer %p, mCblk->buffers %p, mCblk->frameCount %d, mCblk->sampleRate %d, mCblk->channels %d mBufferEnd %p",
-                mCblk, mBuffer, mCblk->buffers, mCblk->frameCount, mCblk->sampleRate, mCblk->channels, mBufferEnd);
-    } else {
-        LOGW("Error creating output track on thread %p", playbackThread);
-    }
-}
-
-AudioFlinger::PlaybackThread::OutputTrack::~OutputTrack()
-{
-    clearBufferQueue();
-}
-
-status_t AudioFlinger::PlaybackThread::OutputTrack::start()
-{
-    status_t status = Track::start();
-    if (status != NO_ERROR) {
-        return status;
-    }
-
-    mActive = true;
-    mRetryCount = 127;
-    return status;
-}
-
-void AudioFlinger::PlaybackThread::OutputTrack::stop()
-{
-    Track::stop();
-    clearBufferQueue();
-    mOutBuffer.frameCount = 0;
-    mActive = false;
-}
-
-bool AudioFlinger::PlaybackThread::OutputTrack::write(int16_t* data, uint32_t frames)
-{
-    Buffer *pInBuffer;
-    Buffer inBuffer;
-    uint32_t channels = mCblk->channels;
-    bool outputBufferFull = false;
-    inBuffer.frameCount = frames;
-    inBuffer.i16 = data;
-
-    uint32_t waitTimeLeftMs = mSourceThread->waitTimeMs();
-
-    if (!mActive && frames != 0) {
-        start();
-        sp<ThreadBase> thread = mThread.promote();
-        if (thread != 0) {
-            MixerThread *mixerThread = (MixerThread *)thread.get();
-            if (mCblk->frameCount > frames){
-                if (mBufferQueue.size() < kMaxOverFlowBuffers) {
-                    uint32_t startFrames = (mCblk->frameCount - frames);
-                    pInBuffer = new Buffer;
-                    pInBuffer->mBuffer = new int16_t[startFrames * channels];
-                    pInBuffer->frameCount = startFrames;
-                    pInBuffer->i16 = pInBuffer->mBuffer;
-                    memset(pInBuffer->raw, 0, startFrames * channels * sizeof(int16_t));
-                    mBufferQueue.add(pInBuffer);
-                } else {
-                    LOGW ("OutputTrack::write() %p no more buffers in queue", this);
-                }
-            }
-        }
-    }
-
-    while (waitTimeLeftMs) {
-        // First write pending buffers, then new data
-        if (mBufferQueue.size()) {
-            pInBuffer = mBufferQueue.itemAt(0);
-        } else {
-            pInBuffer = &inBuffer;
-        }
-
-        if (pInBuffer->frameCount == 0) {
-            break;
-        }
-
-        if (mOutBuffer.frameCount == 0) {
-            mOutBuffer.frameCount = pInBuffer->frameCount;
-            nsecs_t startTime = systemTime();
-            if (obtainBuffer(&mOutBuffer, waitTimeLeftMs) == (status_t)AudioTrack::NO_MORE_BUFFERS) {
-                LOGV ("OutputTrack::write() %p thread %p no more output buffers", this, mThread.unsafe_get());
-                outputBufferFull = true;
-                break;
-            }
-            uint32_t waitTimeMs = (uint32_t)ns2ms(systemTime() - startTime);
-            if (waitTimeLeftMs >= waitTimeMs) {
-                waitTimeLeftMs -= waitTimeMs;
-            } else {
-                waitTimeLeftMs = 0;
-            }
-        }
-
-        uint32_t outFrames = pInBuffer->frameCount > mOutBuffer.frameCount ? mOutBuffer.frameCount : pInBuffer->frameCount;
-        memcpy(mOutBuffer.raw, pInBuffer->raw, outFrames * channels * sizeof(int16_t));
-        mCblk->stepUser(outFrames);
-        pInBuffer->frameCount -= outFrames;
-        pInBuffer->i16 += outFrames * channels;
-        mOutBuffer.frameCount -= outFrames;
-        mOutBuffer.i16 += outFrames * channels;
-
-        if (pInBuffer->frameCount == 0) {
-            if (mBufferQueue.size()) {
-                mBufferQueue.removeAt(0);
-                delete [] pInBuffer->mBuffer;
-                delete pInBuffer;
-                LOGV("OutputTrack::write() %p thread %p released overflow buffer %d", this, mThread.unsafe_get(), mBufferQueue.size());
-            } else {
-                break;
-            }
-        }
-    }
-
-    // If we could not write all frames, allocate a buffer and queue it for next time.
-    if (inBuffer.frameCount) {
-        sp<ThreadBase> thread = mThread.promote();
-        if (thread != 0 && !thread->standby()) {
-            if (mBufferQueue.size() < kMaxOverFlowBuffers) {
-                pInBuffer = new Buffer;
-                pInBuffer->mBuffer = new int16_t[inBuffer.frameCount * channels];
-                pInBuffer->frameCount = inBuffer.frameCount;
-                pInBuffer->i16 = pInBuffer->mBuffer;
-                memcpy(pInBuffer->raw, inBuffer.raw, inBuffer.frameCount * channels * sizeof(int16_t));
-                mBufferQueue.add(pInBuffer);
-                LOGV("OutputTrack::write() %p thread %p adding overflow buffer %d", this, mThread.unsafe_get(), mBufferQueue.size());
-            } else {
-                LOGW("OutputTrack::write() %p thread %p no more overflow buffers", mThread.unsafe_get(), this);
-            }
-        }
-    }
-
-    // Calling write() with a 0 length buffer, means that no more data will be written:
-    // If no more buffers are pending, fill output track buffer to make sure it is started
-    // by output mixer.
-    if (frames == 0 && mBufferQueue.size() == 0) {
-        if (mCblk->user < mCblk->frameCount) {
-            frames = mCblk->frameCount - mCblk->user;
-            pInBuffer = new Buffer;
-            pInBuffer->mBuffer = new int16_t[frames * channels];
-            pInBuffer->frameCount = frames;
-            pInBuffer->i16 = pInBuffer->mBuffer;
-            memset(pInBuffer->raw, 0, frames * channels * sizeof(int16_t));
-            mBufferQueue.add(pInBuffer);
-        } else if (mActive) {
-            stop();
-        }
-    }
-
-    return outputBufferFull;
-}
-
-status_t AudioFlinger::PlaybackThread::OutputTrack::obtainBuffer(AudioBufferProvider::Buffer* buffer, uint32_t waitTimeMs)
-{
-    int active;
-    status_t result;
-    audio_track_cblk_t* cblk = mCblk;
-    uint32_t framesReq = buffer->frameCount;
-
-//    LOGV("OutputTrack::obtainBuffer user %d, server %d", cblk->user, cblk->server);
-    buffer->frameCount  = 0;
-
-    uint32_t framesAvail = cblk->framesAvailable();
-
-
-    if (framesAvail == 0) {
-        Mutex::Autolock _l(cblk->lock);
-        goto start_loop_here;
-        while (framesAvail == 0) {
-            active = mActive;
-            if (UNLIKELY(!active)) {
-                LOGV("Not active and NO_MORE_BUFFERS");
-                return AudioTrack::NO_MORE_BUFFERS;
-            }
-            result = cblk->cv.waitRelative(cblk->lock, milliseconds(waitTimeMs));
-            if (result != NO_ERROR) {
-                return AudioTrack::NO_MORE_BUFFERS;
-            }
-            // read the server count again
-        start_loop_here:
-            framesAvail = cblk->framesAvailable_l();
-        }
-    }
-
-//    if (framesAvail < framesReq) {
-//        return AudioTrack::NO_MORE_BUFFERS;
-//    }
-
-    if (framesReq > framesAvail) {
-        framesReq = framesAvail;
-    }
-
-    uint32_t u = cblk->user;
-    uint32_t bufferEnd = cblk->userBase + cblk->frameCount;
-
-    if (u + framesReq > bufferEnd) {
-        framesReq = bufferEnd - u;
-    }
-
-    buffer->frameCount  = framesReq;
-    buffer->raw         = (void *)cblk->buffer(u);
-    return NO_ERROR;
-}
-
-
-void AudioFlinger::PlaybackThread::OutputTrack::clearBufferQueue()
-{
-    size_t size = mBufferQueue.size();
-    Buffer *pBuffer;
-
-    for (size_t i = 0; i < size; i++) {
-        pBuffer = mBufferQueue.itemAt(i);
-        delete [] pBuffer->mBuffer;
-        delete pBuffer;
-    }
-    mBufferQueue.clear();
-}
-
-// ----------------------------------------------------------------------------
-
-AudioFlinger::Client::Client(const sp<AudioFlinger>& audioFlinger, pid_t pid)
-    :   RefBase(),
-        mAudioFlinger(audioFlinger),
-        mMemoryDealer(new MemoryDealer(1024*1024, "AudioFlinger::Client")),
-        mPid(pid)
-{
-    // 1 MB of address space is good for 32 tracks, 8 buffers each, 4 KB/buffer
-}
-
-// Client destructor must be called with AudioFlinger::mLock held
-AudioFlinger::Client::~Client()
-{
-    mAudioFlinger->removeClient_l(mPid);
-}
-
-const sp<MemoryDealer>& AudioFlinger::Client::heap() const
-{
-    return mMemoryDealer;
-}
-
-// ----------------------------------------------------------------------------
-
-AudioFlinger::TrackHandle::TrackHandle(const sp<AudioFlinger::PlaybackThread::Track>& track)
-    : BnAudioTrack(),
-      mTrack(track)
-{
-}
-
-AudioFlinger::TrackHandle::~TrackHandle() {
-    // just stop the track on deletion, associated resources
-    // will be freed from the main thread once all pending buffers have
-    // been played. Unless it's not in the active track list, in which
-    // case we free everything now...
-    mTrack->destroy();
-}
-
-status_t AudioFlinger::TrackHandle::start() {
-    return mTrack->start();
-}
-
-void AudioFlinger::TrackHandle::stop() {
-    mTrack->stop();
-}
-
-void AudioFlinger::TrackHandle::flush() {
-    mTrack->flush();
-}
-
-void AudioFlinger::TrackHandle::mute(bool e) {
-    mTrack->mute(e);
-}
-
-void AudioFlinger::TrackHandle::pause() {
-    mTrack->pause();
-}
-
-void AudioFlinger::TrackHandle::setVolume(float left, float right) {
-    mTrack->setVolume(left, right);
-}
-
-sp<IMemory> AudioFlinger::TrackHandle::getCblk() const {
-    return mTrack->getCblk();
-}
-
-status_t AudioFlinger::TrackHandle::onTransact(
-    uint32_t code, const Parcel& data, Parcel* reply, uint32_t flags)
-{
-    return BnAudioTrack::onTransact(code, data, reply, flags);
-}
-
-// ----------------------------------------------------------------------------
-
-sp<IAudioRecord> AudioFlinger::openRecord(
-        pid_t pid,
-        int input,
-        uint32_t sampleRate,
-        int format,
-        int channelCount,
-        int frameCount,
-        uint32_t flags,
-        status_t *status)
-{
-    sp<RecordThread::RecordTrack> recordTrack;
-    sp<RecordHandle> recordHandle;
-    sp<Client> client;
-    wp<Client> wclient;
-    status_t lStatus;
-    RecordThread *thread;
-    size_t inFrameCount;
-
-    // check calling permissions
-    if (!recordingAllowed()) {
-        lStatus = PERMISSION_DENIED;
-        goto Exit;
-    }
-
-    // add client to list
-    { // scope for mLock
-        Mutex::Autolock _l(mLock);
-        thread = checkRecordThread_l(input);
-        if (thread == NULL) {
-            lStatus = BAD_VALUE;
-            goto Exit;
-        }
-
-        wclient = mClients.valueFor(pid);
-        if (wclient != NULL) {
-            client = wclient.promote();
-        } else {
-            client = new Client(this, pid);
-            mClients.add(pid, client);
-        }
-
-        // create new record track. The record track uses one track in mHardwareMixerThread by convention.
-        recordTrack = new RecordThread::RecordTrack(thread, client, sampleRate,
-                                                   format, channelCount, frameCount, flags);
-    }
-    if (recordTrack->getCblk() == NULL) {
-        // remove local strong reference to Client before deleting the RecordTrack so that the Client
-        // destructor is called by the TrackBase destructor with mLock held
-        client.clear();
-        recordTrack.clear();
-        lStatus = NO_MEMORY;
-        goto Exit;
-    }
-
-    // return to handle to client
-    recordHandle = new RecordHandle(recordTrack);
-    lStatus = NO_ERROR;
-
-Exit:
-    if (status) {
-        *status = lStatus;
-    }
-    return recordHandle;
-}
-
-// ----------------------------------------------------------------------------
-
-AudioFlinger::RecordHandle::RecordHandle(const sp<AudioFlinger::RecordThread::RecordTrack>& recordTrack)
-    : BnAudioRecord(),
-    mRecordTrack(recordTrack)
-{
-}
-
-AudioFlinger::RecordHandle::~RecordHandle() {
-    stop();
-}
-
-status_t AudioFlinger::RecordHandle::start() {
-    LOGV("RecordHandle::start()");
-    return mRecordTrack->start();
-}
-
-void AudioFlinger::RecordHandle::stop() {
-    LOGV("RecordHandle::stop()");
-    mRecordTrack->stop();
-}
-
-sp<IMemory> AudioFlinger::RecordHandle::getCblk() const {
-    return mRecordTrack->getCblk();
-}
-
-status_t AudioFlinger::RecordHandle::onTransact(
-    uint32_t code, const Parcel& data, Parcel* reply, uint32_t flags)
-{
-    return BnAudioRecord::onTransact(code, data, reply, flags);
-}
-
-// ----------------------------------------------------------------------------
-
-AudioFlinger::RecordThread::RecordThread(const sp<AudioFlinger>& audioFlinger, AudioStreamIn *input, uint32_t sampleRate, uint32_t channels, int id) :
-    ThreadBase(audioFlinger, id),
-    mInput(input), mResampler(0), mRsmpOutBuffer(0), mRsmpInBuffer(0)
-{
-    mReqChannelCount = AudioSystem::popCount(channels);
-    mReqSampleRate = sampleRate;
-    readInputParameters();
-    sendConfigEvent(AudioSystem::INPUT_OPENED);
-}
-
-
-AudioFlinger::RecordThread::~RecordThread()
-{
-    delete[] mRsmpInBuffer;
-    if (mResampler != 0) {
-        delete mResampler;
-        delete[] mRsmpOutBuffer;
-    }
-}
-
-void AudioFlinger::RecordThread::onFirstRef()
-{
-    const size_t SIZE = 256;
-    char buffer[SIZE];
-
-    snprintf(buffer, SIZE, "Record Thread %p", this);
-
-    run(buffer, PRIORITY_URGENT_AUDIO);
-}
-
-bool AudioFlinger::RecordThread::threadLoop()
-{
-    AudioBufferProvider::Buffer buffer;
-    sp<RecordTrack> activeTrack;
-
-    // start recording
-    while (!exitPending()) {
-
-        processConfigEvents();
-
-        { // scope for mLock
-            Mutex::Autolock _l(mLock);
-            checkForNewParameters_l();
-            if (mActiveTrack == 0 && mConfigEvents.isEmpty()) {
-                if (!mStandby) {
-                    mInput->standby();
-                    mStandby = true;
-                }
-
-                if (exitPending()) break;
-
-                LOGV("RecordThread: loop stopping");
-                // go to sleep
-                mWaitWorkCV.wait(mLock);
-                LOGV("RecordThread: loop starting");
-                continue;
-            }
-            if (mActiveTrack != 0) {
-                if (mActiveTrack->mState == TrackBase::PAUSING) {
-                    if (!mStandby) {
-                        mInput->standby();
-                        mStandby = true;
-                    }
-                    mActiveTrack.clear();
-                    mStartStopCond.broadcast();
-                } else if (mActiveTrack->mState == TrackBase::RESUMING) {
-                    if (mReqChannelCount != mActiveTrack->channelCount()) {
-                        mActiveTrack.clear();
-                        mStartStopCond.broadcast();
-                    } else if (mBytesRead != 0) {
-                        // record start succeeds only if first read from audio input
-                        // succeeds
-                        if (mBytesRead > 0) {
-                            mActiveTrack->mState = TrackBase::ACTIVE;
-                        } else {
-                            mActiveTrack.clear();
-                        }
-                        mStartStopCond.broadcast();
-                    }
-                    mStandby = false;
-                }
-            }
-        }
-
-        if (mActiveTrack != 0) {
-            if (mActiveTrack->mState != TrackBase::ACTIVE &&
-                mActiveTrack->mState != TrackBase::RESUMING) {
-                usleep(5000);
-                continue;
-            }
-            buffer.frameCount = mFrameCount;
-            if (LIKELY(mActiveTrack->getNextBuffer(&buffer) == NO_ERROR)) {
-                size_t framesOut = buffer.frameCount;
-                if (mResampler == 0) {
-                    // no resampling
-                    while (framesOut) {
-                        size_t framesIn = mFrameCount - mRsmpInIndex;
-                        if (framesIn) {
-                            int8_t *src = (int8_t *)mRsmpInBuffer + mRsmpInIndex * mFrameSize;
-                            int8_t *dst = buffer.i8 + (buffer.frameCount - framesOut) * mActiveTrack->mCblk->frameSize;
-                            if (framesIn > framesOut)
-                                framesIn = framesOut;
-                            mRsmpInIndex += framesIn;
-                            framesOut -= framesIn;
-                            if (mChannelCount == mReqChannelCount ||
-                                mFormat != AudioSystem::PCM_16_BIT) {
-                                memcpy(dst, src, framesIn * mFrameSize);
-                            } else {
-                                int16_t *src16 = (int16_t *)src;
-                                int16_t *dst16 = (int16_t *)dst;
-                                if (mChannelCount == 1) {
-                                    while (framesIn--) {
-                                        *dst16++ = *src16;
-                                        *dst16++ = *src16++;
-                                    }
-                                } else {
-                                    while (framesIn--) {
-                                        *dst16++ = (int16_t)(((int32_t)*src16 + (int32_t)*(src16 + 1)) >> 1);
-                                        src16 += 2;
-                                    }
-                                }
-                            }
-                        }
-                        if (framesOut && mFrameCount == mRsmpInIndex) {
-                            if (framesOut == mFrameCount &&
-                                (mChannelCount == mReqChannelCount || mFormat != AudioSystem::PCM_16_BIT)) {
-                                mBytesRead = mInput->read(buffer.raw, mInputBytes);
-                                framesOut = 0;
-                            } else {
-                                mBytesRead = mInput->read(mRsmpInBuffer, mInputBytes);
-                                mRsmpInIndex = 0;
-                            }
-                            if (mBytesRead < 0) {
-                                LOGE("Error reading audio input");
-                                if (mActiveTrack->mState == TrackBase::ACTIVE) {
-                                    // Force input into standby so that it tries to
-                                    // recover at next read attempt
-                                    mInput->standby();
-                                    usleep(5000);
-                                }
-                                mRsmpInIndex = mFrameCount;
-                                framesOut = 0;
-                                buffer.frameCount = 0;
-                            }
-                        }
-                    }
-                } else {
-                    // resampling
-
-                    memset(mRsmpOutBuffer, 0, framesOut * 2 * sizeof(int32_t));
-                    // alter output frame count as if we were expecting stereo samples
-                    if (mChannelCount == 1 && mReqChannelCount == 1) {
-                        framesOut >>= 1;
-                    }
-                    mResampler->resample(mRsmpOutBuffer, framesOut, this);
-                    // ditherAndClamp() works as long as all buffers returned by mActiveTrack->getNextBuffer()
-                    // are 32 bit aligned which should be always true.
-                    if (mChannelCount == 2 && mReqChannelCount == 1) {
-                        AudioMixer::ditherAndClamp(mRsmpOutBuffer, mRsmpOutBuffer, framesOut);
-                        // the resampler always outputs stereo samples: do post stereo to mono conversion
-                        int16_t *src = (int16_t *)mRsmpOutBuffer;
-                        int16_t *dst = buffer.i16;
-                        while (framesOut--) {
-                            *dst++ = (int16_t)(((int32_t)*src + (int32_t)*(src + 1)) >> 1);
-                            src += 2;
-                        }
-                    } else {
-                        AudioMixer::ditherAndClamp((int32_t *)buffer.raw, mRsmpOutBuffer, framesOut);
-                    }
-
-                }
-                mActiveTrack->releaseBuffer(&buffer);
-                mActiveTrack->overflow();
-            }
-            // client isn't retrieving buffers fast enough
-            else {
-                if (!mActiveTrack->setOverflow())
-                    LOGW("RecordThread: buffer overflow");
-                // Release the processor for a while before asking for a new buffer.
-                // This will give the application more chance to read from the buffer and
-                // clear the overflow.
-                usleep(5000);
-            }
-        }
-    }
-
-    if (!mStandby) {
-        mInput->standby();
-    }
-    mActiveTrack.clear();
-
-    mStartStopCond.broadcast();
-
-    LOGV("RecordThread %p exiting", this);
-    return false;
-}
-
-status_t AudioFlinger::RecordThread::start(RecordThread::RecordTrack* recordTrack)
-{
-    LOGV("RecordThread::start");
-    sp <ThreadBase> strongMe = this;
-    status_t status = NO_ERROR;
-    {
-        AutoMutex lock(&mLock);
-        if (mActiveTrack != 0) {
-            if (recordTrack != mActiveTrack.get()) {
-                status = -EBUSY;
-            } else if (mActiveTrack->mState == TrackBase::PAUSING) {
-                mActiveTrack->mState = TrackBase::ACTIVE;
-            }
-            return status;
-        }
-
-        recordTrack->mState = TrackBase::IDLE;
-        mActiveTrack = recordTrack;
-        mLock.unlock();
-        status_t status = AudioSystem::startInput(mId);
-        mLock.lock();
-        if (status != NO_ERROR) {
-            mActiveTrack.clear();
-            return status;
-        }
-        mActiveTrack->mState = TrackBase::RESUMING;
-        mRsmpInIndex = mFrameCount;
-        mBytesRead = 0;
-        // signal thread to start
-        LOGV("Signal record thread");
-        mWaitWorkCV.signal();
-        // do not wait for mStartStopCond if exiting
-        if (mExiting) {
-            mActiveTrack.clear();
-            status = INVALID_OPERATION;
-            goto startError;
-        }
-        mStartStopCond.wait(mLock);
-        if (mActiveTrack == 0) {
-            LOGV("Record failed to start");
-            status = BAD_VALUE;
-            goto startError;
-        }
-        LOGV("Record started OK");
-        return status;
-    }
-startError:
-    AudioSystem::stopInput(mId);
-    return status;
-}
-
-void AudioFlinger::RecordThread::stop(RecordThread::RecordTrack* recordTrack) {
-    LOGV("RecordThread::stop");
-    sp <ThreadBase> strongMe = this;
-    {
-        AutoMutex lock(&mLock);
-        if (mActiveTrack != 0 && recordTrack == mActiveTrack.get()) {
-            mActiveTrack->mState = TrackBase::PAUSING;
-            // do not wait for mStartStopCond if exiting
-            if (mExiting) {
-                return;
-            }
-            mStartStopCond.wait(mLock);
-            // if we have been restarted, recordTrack == mActiveTrack.get() here
-            if (mActiveTrack == 0 || recordTrack != mActiveTrack.get()) {
-                mLock.unlock();
-                AudioSystem::stopInput(mId);
-                mLock.lock();
-                LOGV("Record stopped OK");
-            }
-        }
-    }
-}
-
-status_t AudioFlinger::RecordThread::dump(int fd, const Vector<String16>& args)
-{
-    const size_t SIZE = 256;
-    char buffer[SIZE];
-    String8 result;
-    pid_t pid = 0;
-
-    snprintf(buffer, SIZE, "\nInput thread %p internals\n", this);
-    result.append(buffer);
-
-    if (mActiveTrack != 0) {
-        result.append("Active Track:\n");
-        result.append("   Clien Fmt Chn Buf  S SRate  Serv     User\n");
-        mActiveTrack->dump(buffer, SIZE);
-        result.append(buffer);
-
-        snprintf(buffer, SIZE, "In index: %d\n", mRsmpInIndex);
-        result.append(buffer);
-        snprintf(buffer, SIZE, "In size: %d\n", mInputBytes);
-        result.append(buffer);
-        snprintf(buffer, SIZE, "Resampling: %d\n", (mResampler != 0));
-        result.append(buffer);
-        snprintf(buffer, SIZE, "Out channel count: %d\n", mReqChannelCount);
-        result.append(buffer);
-        snprintf(buffer, SIZE, "Out sample rate: %d\n", mReqSampleRate);
-        result.append(buffer);
-
-
-    } else {
-        result.append("No record client\n");
-    }
-    write(fd, result.string(), result.size());
-
-    dumpBase(fd, args);
-
-    return NO_ERROR;
-}
-
-status_t AudioFlinger::RecordThread::getNextBuffer(AudioBufferProvider::Buffer* buffer)
-{
-    size_t framesReq = buffer->frameCount;
-    size_t framesReady = mFrameCount - mRsmpInIndex;
-    int channelCount;
-
-    if (framesReady == 0) {
-        mBytesRead = mInput->read(mRsmpInBuffer, mInputBytes);
-        if (mBytesRead < 0) {
-            LOGE("RecordThread::getNextBuffer() Error reading audio input");
-            if (mActiveTrack->mState == TrackBase::ACTIVE) {
-                // Force input into standby so that it tries to
-                // recover at next read attempt
-                mInput->standby();
-                usleep(5000);
-            }
-            buffer->raw = 0;
-            buffer->frameCount = 0;
-            return NOT_ENOUGH_DATA;
-        }
-        mRsmpInIndex = 0;
-        framesReady = mFrameCount;
-    }
-
-    if (framesReq > framesReady) {
-        framesReq = framesReady;
-    }
-
-    if (mChannelCount == 1 && mReqChannelCount == 2) {
-        channelCount = 1;
-    } else {
-        channelCount = 2;
-    }
-    buffer->raw = mRsmpInBuffer + mRsmpInIndex * channelCount;
-    buffer->frameCount = framesReq;
-    return NO_ERROR;
-}
-
-void AudioFlinger::RecordThread::releaseBuffer(AudioBufferProvider::Buffer* buffer)
-{
-    mRsmpInIndex += buffer->frameCount;
-    buffer->frameCount = 0;
-}
-
-bool AudioFlinger::RecordThread::checkForNewParameters_l()
-{
-    bool reconfig = false;
-
-    while (!mNewParameters.isEmpty()) {
-        status_t status = NO_ERROR;
-        String8 keyValuePair = mNewParameters[0];
-        AudioParameter param = AudioParameter(keyValuePair);
-        int value;
-        int reqFormat = mFormat;
-        int reqSamplingRate = mReqSampleRate;
-        int reqChannelCount = mReqChannelCount;
-
-        if (param.getInt(String8(AudioParameter::keySamplingRate), value) == NO_ERROR) {
-            reqSamplingRate = value;
-            reconfig = true;
-        }
-        if (param.getInt(String8(AudioParameter::keyFormat), value) == NO_ERROR) {
-            reqFormat = value;
-            reconfig = true;
-        }
-        if (param.getInt(String8(AudioParameter::keyChannels), value) == NO_ERROR) {
-            reqChannelCount = AudioSystem::popCount(value);
-            reconfig = true;
-        }
-        if (param.getInt(String8(AudioParameter::keyFrameCount), value) == NO_ERROR) {
-            // do not accept frame count changes if tracks are open as the track buffer
-            // size depends on frame count and correct behavior would not be garantied
-            // if frame count is changed after track creation
-            if (mActiveTrack != 0) {
-                status = INVALID_OPERATION;
-            } else {
-                reconfig = true;
-            }
-        }
-        if (status == NO_ERROR) {
-            status = mInput->setParameters(keyValuePair);
-            if (status == INVALID_OPERATION) {
-               mInput->standby();
-               status = mInput->setParameters(keyValuePair);
-            }
-            if (reconfig) {
-                if (status == BAD_VALUE &&
-                    reqFormat == mInput->format() && reqFormat == AudioSystem::PCM_16_BIT &&
-                    ((int)mInput->sampleRate() <= 2 * reqSamplingRate) &&
-                    (AudioSystem::popCount(mInput->channels()) < 3) && (reqChannelCount < 3)) {
-                    status = NO_ERROR;
-                }
-                if (status == NO_ERROR) {
-                    readInputParameters();
-                    sendConfigEvent_l(AudioSystem::INPUT_CONFIG_CHANGED);
-                }
-            }
-        }
-
-        mNewParameters.removeAt(0);
-
-        mParamStatus = status;
-        mParamCond.signal();
-        mWaitWorkCV.wait(mLock);
-    }
-    return reconfig;
-}
-
-String8 AudioFlinger::RecordThread::getParameters(const String8& keys)
-{
-    return mInput->getParameters(keys);
-}
-
-void AudioFlinger::RecordThread::audioConfigChanged(int event, int param) {
-    AudioSystem::OutputDescriptor desc;
-    void *param2 = 0;
-
-    switch (event) {
-    case AudioSystem::INPUT_OPENED:
-    case AudioSystem::INPUT_CONFIG_CHANGED:
-        desc.channels = mChannelCount;
-        desc.samplingRate = mSampleRate;
-        desc.format = mFormat;
-        desc.frameCount = mFrameCount;
-        desc.latency = 0;
-        param2 = &desc;
-        break;
-
-    case AudioSystem::INPUT_CLOSED:
-    default:
-        break;
-    }
-    Mutex::Autolock _l(mAudioFlinger->mLock);
-    mAudioFlinger->audioConfigChanged_l(event, mId, param2);
-}
-
-void AudioFlinger::RecordThread::readInputParameters()
-{
-    if (mRsmpInBuffer) delete mRsmpInBuffer;
-    if (mRsmpOutBuffer) delete mRsmpOutBuffer;
-    if (mResampler) delete mResampler;
-    mResampler = 0;
-
-    mSampleRate = mInput->sampleRate();
-    mChannelCount = AudioSystem::popCount(mInput->channels());
-    mFormat = mInput->format();
-    mFrameSize = mInput->frameSize();
-    mInputBytes = mInput->bufferSize();
-    mFrameCount = mInputBytes / mFrameSize;
-    mRsmpInBuffer = new int16_t[mFrameCount * mChannelCount];
-
-    if (mSampleRate != mReqSampleRate && mChannelCount < 3 && mReqChannelCount < 3)
-    {
-        int channelCount;
-         // optmization: if mono to mono, use the resampler in stereo to stereo mode to avoid
-         // stereo to mono post process as the resampler always outputs stereo.
-        if (mChannelCount == 1 && mReqChannelCount == 2) {
-            channelCount = 1;
-        } else {
-            channelCount = 2;
-        }
-        mResampler = AudioResampler::create(16, channelCount, mReqSampleRate);
-        mResampler->setSampleRate(mSampleRate);
-        mResampler->setVolume(AudioMixer::UNITY_GAIN, AudioMixer::UNITY_GAIN);
-        mRsmpOutBuffer = new int32_t[mFrameCount * 2];
-
-        // optmization: if mono to mono, alter input frame count as if we were inputing stereo samples
-        if (mChannelCount == 1 && mReqChannelCount == 1) {
-            mFrameCount >>= 1;
-        }
-
-    }
-    mRsmpInIndex = mFrameCount;
-}
-
-unsigned int AudioFlinger::RecordThread::getInputFramesLost()
-{
-    return mInput->getInputFramesLost();
-}
-
-// ----------------------------------------------------------------------------
-
-int AudioFlinger::openOutput(uint32_t *pDevices,
-                                uint32_t *pSamplingRate,
-                                uint32_t *pFormat,
-                                uint32_t *pChannels,
-                                uint32_t *pLatencyMs,
-                                uint32_t flags)
-{
-    status_t status;
-    PlaybackThread *thread = NULL;
-    mHardwareStatus = AUDIO_HW_OUTPUT_OPEN;
-    uint32_t samplingRate = pSamplingRate ? *pSamplingRate : 0;
-    uint32_t format = pFormat ? *pFormat : 0;
-    uint32_t channels = pChannels ? *pChannels : 0;
-    uint32_t latency = pLatencyMs ? *pLatencyMs : 0;
-
-    LOGV("openOutput(), Device %x, SamplingRate %d, Format %d, Channels %x, flags %x",
-            pDevices ? *pDevices : 0,
-            samplingRate,
-            format,
-            channels,
-            flags);
-
-    if (pDevices == NULL || *pDevices == 0) {
-        return 0;
-    }
-    Mutex::Autolock _l(mLock);
-
-    AudioStreamOut *output = mAudioHardware->openOutputStream(*pDevices,
-                                                             (int *)&format,
-                                                             &channels,
-                                                             &samplingRate,
-                                                             &status);
-    LOGV("openOutput() openOutputStream returned output %p, SamplingRate %d, Format %d, Channels %x, status %d",
-            output,
-            samplingRate,
-            format,
-            channels,
-            status);
-
-    mHardwareStatus = AUDIO_HW_IDLE;
-    if (output != 0) {
-        if ((flags & AudioSystem::OUTPUT_FLAG_DIRECT) ||
-            (format != AudioSystem::PCM_16_BIT) ||
-            (channels != AudioSystem::CHANNEL_OUT_STEREO)) {
-            thread = new DirectOutputThread(this, output, ++mNextThreadId);
-            LOGV("openOutput() created direct output: ID %d thread %p", mNextThreadId, thread);
-        } else {
-            thread = new MixerThread(this, output, ++mNextThreadId);
-            LOGV("openOutput() created mixer output: ID %d thread %p", mNextThreadId, thread);
-
-#ifdef LVMX
-            unsigned bitsPerSample =
-                (format == AudioSystem::PCM_16_BIT) ? 16 :
-                    ((format == AudioSystem::PCM_8_BIT) ? 8 : 0);
-            unsigned channelCount = (channels == AudioSystem::CHANNEL_OUT_STEREO) ? 2 : 1;
-            int audioOutputType = LifeVibes::threadIdToAudioOutputType(thread->id());
-
-            LifeVibes::init_aot(audioOutputType, samplingRate, bitsPerSample, channelCount);
-            LifeVibes::setDevice(audioOutputType, *pDevices);
-#endif
-
-        }
-        mPlaybackThreads.add(mNextThreadId, thread);
-
-        if (pSamplingRate) *pSamplingRate = samplingRate;
-        if (pFormat) *pFormat = format;
-        if (pChannels) *pChannels = channels;
-        if (pLatencyMs) *pLatencyMs = thread->latency();
-
-        return mNextThreadId;
-    }
-
-    return 0;
-}
-
-int AudioFlinger::openDuplicateOutput(int output1, int output2)
-{
-    Mutex::Autolock _l(mLock);
-    MixerThread *thread1 = checkMixerThread_l(output1);
-    MixerThread *thread2 = checkMixerThread_l(output2);
-
-    if (thread1 == NULL || thread2 == NULL) {
-        LOGW("openDuplicateOutput() wrong output mixer type for output %d or %d", output1, output2);
-        return 0;
-    }
-
-
-    DuplicatingThread *thread = new DuplicatingThread(this, thread1, ++mNextThreadId);
-    thread->addOutputTrack(thread2);
-    mPlaybackThreads.add(mNextThreadId, thread);
-    return mNextThreadId;
-}
-
-status_t AudioFlinger::closeOutput(int output)
-{
-    // keep strong reference on the playback thread so that
-    // it is not destroyed while exit() is executed
-    sp <PlaybackThread> thread;
-    {
-        Mutex::Autolock _l(mLock);
-        thread = checkPlaybackThread_l(output);
-        if (thread == NULL) {
-            return BAD_VALUE;
-        }
-
-        LOGV("closeOutput() %d", output);
-
-        if (thread->type() == PlaybackThread::MIXER) {
-            for (size_t i = 0; i < mPlaybackThreads.size(); i++) {
-                if (mPlaybackThreads.valueAt(i)->type() == PlaybackThread::DUPLICATING) {
-                    DuplicatingThread *dupThread = (DuplicatingThread *)mPlaybackThreads.valueAt(i).get();
-                    dupThread->removeOutputTrack((MixerThread *)thread.get());
-                }
-            }
-        }
-        void *param2 = 0;
-        audioConfigChanged_l(AudioSystem::OUTPUT_CLOSED, output, param2);
-        mPlaybackThreads.removeItem(output);
-    }
-    thread->exit();
-
-    if (thread->type() != PlaybackThread::DUPLICATING) {
-        mAudioHardware->closeOutputStream(thread->getOutput());
-    }
-    return NO_ERROR;
-}
-
-status_t AudioFlinger::suspendOutput(int output)
-{
-    Mutex::Autolock _l(mLock);
-    PlaybackThread *thread = checkPlaybackThread_l(output);
-
-    if (thread == NULL) {
-        return BAD_VALUE;
-    }
-
-    LOGV("suspendOutput() %d", output);
-    thread->suspend();
-
-    return NO_ERROR;
-}
-
-status_t AudioFlinger::restoreOutput(int output)
-{
-    Mutex::Autolock _l(mLock);
-    PlaybackThread *thread = checkPlaybackThread_l(output);
-
-    if (thread == NULL) {
-        return BAD_VALUE;
-    }
-
-    LOGV("restoreOutput() %d", output);
-
-    thread->restore();
-
-    return NO_ERROR;
-}
-
-int AudioFlinger::openInput(uint32_t *pDevices,
-                                uint32_t *pSamplingRate,
-                                uint32_t *pFormat,
-                                uint32_t *pChannels,
-                                uint32_t acoustics)
-{
-    status_t status;
-    RecordThread *thread = NULL;
-    uint32_t samplingRate = pSamplingRate ? *pSamplingRate : 0;
-    uint32_t format = pFormat ? *pFormat : 0;
-    uint32_t channels = pChannels ? *pChannels : 0;
-    uint32_t reqSamplingRate = samplingRate;
-    uint32_t reqFormat = format;
-    uint32_t reqChannels = channels;
-
-    if (pDevices == NULL || *pDevices == 0) {
-        return 0;
-    }
-    Mutex::Autolock _l(mLock);
-
-    AudioStreamIn *input = mAudioHardware->openInputStream(*pDevices,
-                                                             (int *)&format,
-                                                             &channels,
-                                                             &samplingRate,
-                                                             &status,
-                                                             (AudioSystem::audio_in_acoustics)acoustics);
-    LOGV("openInput() openInputStream returned input %p, SamplingRate %d, Format %d, Channels %x, acoustics %x, status %d",
-            input,
-            samplingRate,
-            format,
-            channels,
-            acoustics,
-            status);
-
-    // If the input could not be opened with the requested parameters and we can handle the conversion internally,
-    // try to open again with the proposed parameters. The AudioFlinger can resample the input and do mono to stereo
-    // or stereo to mono conversions on 16 bit PCM inputs.
-    if (input == 0 && status == BAD_VALUE &&
-        reqFormat == format && format == AudioSystem::PCM_16_BIT &&
-        (samplingRate <= 2 * reqSamplingRate) &&
-        (AudioSystem::popCount(channels) < 3) && (AudioSystem::popCount(reqChannels) < 3)) {
-        LOGV("openInput() reopening with proposed sampling rate and channels");
-        input = mAudioHardware->openInputStream(*pDevices,
-                                                 (int *)&format,
-                                                 &channels,
-                                                 &samplingRate,
-                                                 &status,
-                                                 (AudioSystem::audio_in_acoustics)acoustics);
-    }
-
-    if (input != 0) {
-         // Start record thread
-        thread = new RecordThread(this, input, reqSamplingRate, reqChannels, ++mNextThreadId);
-        mRecordThreads.add(mNextThreadId, thread);
-        LOGV("openInput() created record thread: ID %d thread %p", mNextThreadId, thread);
-        if (pSamplingRate) *pSamplingRate = reqSamplingRate;
-        if (pFormat) *pFormat = format;
-        if (pChannels) *pChannels = reqChannels;
-
-        input->standby();
-
-        return mNextThreadId;
-    }
-
-    return 0;
-}
-
-status_t AudioFlinger::closeInput(int input)
-{
-    // keep strong reference on the record thread so that
-    // it is not destroyed while exit() is executed
-    sp <RecordThread> thread;
-    {
-        Mutex::Autolock _l(mLock);
-        thread = checkRecordThread_l(input);
-        if (thread == NULL) {
-            return BAD_VALUE;
-        }
-
-        LOGV("closeInput() %d", input);
-        void *param2 = 0;
-        audioConfigChanged_l(AudioSystem::INPUT_CLOSED, input, param2);
-        mRecordThreads.removeItem(input);
-    }
-    thread->exit();
-
-    mAudioHardware->closeInputStream(thread->getInput());
-
-    return NO_ERROR;
-}
-
-status_t AudioFlinger::setStreamOutput(uint32_t stream, int output)
-{
-    Mutex::Autolock _l(mLock);
-    MixerThread *dstThread = checkMixerThread_l(output);
-    if (dstThread == NULL) {
-        LOGW("setStreamOutput() bad output id %d", output);
-        return BAD_VALUE;
-    }
-
-    LOGV("setStreamOutput() stream %d to output %d", stream, output);
-
-    for (size_t i = 0; i < mPlaybackThreads.size(); i++) {
-        PlaybackThread *thread = mPlaybackThreads.valueAt(i).get();
-        if (thread != dstThread &&
-            thread->type() != PlaybackThread::DIRECT) {
-            MixerThread *srcThread = (MixerThread *)thread;
-            SortedVector < sp<MixerThread::Track> > tracks;
-            SortedVector < wp<MixerThread::Track> > activeTracks;
-            srcThread->getTracks(tracks, activeTracks, stream);
-            if (tracks.size()) {
-                dstThread->putTracks(tracks, activeTracks);
-            }
-        }
-    }
-
-    dstThread->sendConfigEvent(AudioSystem::STREAM_CONFIG_CHANGED, stream);
-
-    return NO_ERROR;
-}
-
-// checkPlaybackThread_l() must be called with AudioFlinger::mLock held
-AudioFlinger::PlaybackThread *AudioFlinger::checkPlaybackThread_l(int output) const
-{
-    PlaybackThread *thread = NULL;
-    if (mPlaybackThreads.indexOfKey(output) >= 0) {
-        thread = (PlaybackThread *)mPlaybackThreads.valueFor(output).get();
-    }
-    return thread;
-}
-
-// checkMixerThread_l() must be called with AudioFlinger::mLock held
-AudioFlinger::MixerThread *AudioFlinger::checkMixerThread_l(int output) const
-{
-    PlaybackThread *thread = checkPlaybackThread_l(output);
-    if (thread != NULL) {
-        if (thread->type() == PlaybackThread::DIRECT) {
-            thread = NULL;
-        }
-    }
-    return (MixerThread *)thread;
-}
-
-// checkRecordThread_l() must be called with AudioFlinger::mLock held
-AudioFlinger::RecordThread *AudioFlinger::checkRecordThread_l(int input) const
-{
-    RecordThread *thread = NULL;
-    if (mRecordThreads.indexOfKey(input) >= 0) {
-        thread = (RecordThread *)mRecordThreads.valueFor(input).get();
-    }
-    return thread;
-}
-
-// ----------------------------------------------------------------------------
-
-status_t AudioFlinger::onTransact(
-        uint32_t code, const Parcel& data, Parcel* reply, uint32_t flags)
-{
-    return BnAudioFlinger::onTransact(code, data, reply, flags);
-}
-
-// ----------------------------------------------------------------------------
-
-void AudioFlinger::instantiate() {
-    defaultServiceManager()->addService(
-            String16("media.audio_flinger"), new AudioFlinger());
-}
-
-}; // namespace android
diff --git a/libs/audioflinger/AudioFlinger.h b/libs/audioflinger/AudioFlinger.h
deleted file mode 100644
index 739ec33..0000000
--- a/libs/audioflinger/AudioFlinger.h
+++ /dev/null
@@ -1,807 +0,0 @@
-/* //device/include/server/AudioFlinger/AudioFlinger.h
-**
-** Copyright 2007, The Android Open Source Project
-**
-** Licensed under the Apache License, Version 2.0 (the "License");
-** you may not use this file except in compliance with the License.
-** You may obtain a copy of the License at
-**
-**     http://www.apache.org/licenses/LICENSE-2.0
-**
-** Unless required by applicable law or agreed to in writing, software
-** distributed under the License is distributed on an "AS IS" BASIS,
-** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-** See the License for the specific language governing permissions and
-** limitations under the License.
-*/
-
-#ifndef ANDROID_AUDIO_FLINGER_H
-#define ANDROID_AUDIO_FLINGER_H
-
-#include <stdint.h>
-#include <sys/types.h>
-#include <limits.h>
-
-#include <media/IAudioFlinger.h>
-#include <media/IAudioFlingerClient.h>
-#include <media/IAudioTrack.h>
-#include <media/IAudioRecord.h>
-#include <media/AudioTrack.h>
-
-#include <utils/Atomic.h>
-#include <utils/Errors.h>
-#include <utils/threads.h>
-#include <binder/MemoryDealer.h>
-#include <utils/SortedVector.h>
-#include <utils/Vector.h>
-
-#include <hardware_legacy/AudioHardwareInterface.h>
-
-#include "AudioBufferProvider.h"
-
-namespace android {
-
-class audio_track_cblk_t;
-class AudioMixer;
-class AudioBuffer;
-class AudioResampler;
-
-
-// ----------------------------------------------------------------------------
-
-#define LIKELY( exp )       (__builtin_expect( (exp) != 0, true  ))
-#define UNLIKELY( exp )     (__builtin_expect( (exp) != 0, false ))
-
-
-// ----------------------------------------------------------------------------
-
-static const nsecs_t kStandbyTimeInNsecs = seconds(3);
-
-class AudioFlinger : public BnAudioFlinger, public IBinder::DeathRecipient
-{
-public:
-    static void instantiate();
-
-    virtual     status_t    dump(int fd, const Vector<String16>& args);
-
-    // IAudioFlinger interface
-    virtual sp<IAudioTrack> createTrack(
-                                pid_t pid,
-                                int streamType,
-                                uint32_t sampleRate,
-                                int format,
-                                int channelCount,
-                                int frameCount,
-                                uint32_t flags,
-                                const sp<IMemory>& sharedBuffer,
-                                int output,
-                                status_t *status);
-
-    virtual     uint32_t    sampleRate(int output) const;
-    virtual     int         channelCount(int output) const;
-    virtual     int         format(int output) const;
-    virtual     size_t      frameCount(int output) const;
-    virtual     uint32_t    latency(int output) const;
-
-    virtual     status_t    setMasterVolume(float value);
-    virtual     status_t    setMasterMute(bool muted);
-
-    virtual     float       masterVolume() const;
-    virtual     bool        masterMute() const;
-
-    virtual     status_t    setStreamVolume(int stream, float value, int output);
-    virtual     status_t    setStreamMute(int stream, bool muted);
-
-    virtual     float       streamVolume(int stream, int output) const;
-    virtual     bool        streamMute(int stream) const;
-
-    virtual     status_t    setMode(int mode);
-
-    virtual     status_t    setMicMute(bool state);
-    virtual     bool        getMicMute() const;
-
-    virtual     bool        isStreamActive(int stream) const;
-
-    virtual     status_t    setParameters(int ioHandle, const String8& keyValuePairs);
-    virtual     String8     getParameters(int ioHandle, const String8& keys);
-
-    virtual     void        registerClient(const sp<IAudioFlingerClient>& client);
-
-    virtual     size_t      getInputBufferSize(uint32_t sampleRate, int format, int channelCount);
-    virtual     unsigned int  getInputFramesLost(int ioHandle);
-
-    virtual int openOutput(uint32_t *pDevices,
-                                    uint32_t *pSamplingRate,
-                                    uint32_t *pFormat,
-                                    uint32_t *pChannels,
-                                    uint32_t *pLatencyMs,
-                                    uint32_t flags);
-
-    virtual int openDuplicateOutput(int output1, int output2);
-
-    virtual status_t closeOutput(int output);
-
-    virtual status_t suspendOutput(int output);
-
-    virtual status_t restoreOutput(int output);
-
-    virtual int openInput(uint32_t *pDevices,
-                            uint32_t *pSamplingRate,
-                            uint32_t *pFormat,
-                            uint32_t *pChannels,
-                            uint32_t acoustics);
-
-    virtual status_t closeInput(int input);
-
-    virtual status_t setStreamOutput(uint32_t stream, int output);
-
-    virtual status_t setVoiceVolume(float volume);
-
-    virtual status_t getRenderPosition(uint32_t *halFrames, uint32_t *dspFrames, int output);
-
-    // IBinder::DeathRecipient
-    virtual     void        binderDied(const wp<IBinder>& who);
-
-    enum hardware_call_state {
-        AUDIO_HW_IDLE = 0,
-        AUDIO_HW_INIT,
-        AUDIO_HW_OUTPUT_OPEN,
-        AUDIO_HW_OUTPUT_CLOSE,
-        AUDIO_HW_INPUT_OPEN,
-        AUDIO_HW_INPUT_CLOSE,
-        AUDIO_HW_STANDBY,
-        AUDIO_HW_SET_MASTER_VOLUME,
-        AUDIO_HW_GET_ROUTING,
-        AUDIO_HW_SET_ROUTING,
-        AUDIO_HW_GET_MODE,
-        AUDIO_HW_SET_MODE,
-        AUDIO_HW_GET_MIC_MUTE,
-        AUDIO_HW_SET_MIC_MUTE,
-        AUDIO_SET_VOICE_VOLUME,
-        AUDIO_SET_PARAMETER,
-    };
-
-    // record interface
-    virtual sp<IAudioRecord> openRecord(
-                                pid_t pid,
-                                int input,
-                                uint32_t sampleRate,
-                                int format,
-                                int channelCount,
-                                int frameCount,
-                                uint32_t flags,
-                                status_t *status);
-
-    virtual     status_t    onTransact(
-                                uint32_t code,
-                                const Parcel& data,
-                                Parcel* reply,
-                                uint32_t flags);
-
-private:
-                            AudioFlinger();
-    virtual                 ~AudioFlinger();
-
-
-    // Internal dump utilites.
-    status_t dumpPermissionDenial(int fd, const Vector<String16>& args);
-    status_t dumpClients(int fd, const Vector<String16>& args);
-    status_t dumpInternals(int fd, const Vector<String16>& args);
-
-    // --- Client ---
-    class Client : public RefBase {
-    public:
-                            Client(const sp<AudioFlinger>& audioFlinger, pid_t pid);
-        virtual             ~Client();
-        const sp<MemoryDealer>&     heap() const;
-        pid_t               pid() const { return mPid; }
-        sp<AudioFlinger>    audioFlinger() { return mAudioFlinger; }
-
-    private:
-                            Client(const Client&);
-                            Client& operator = (const Client&);
-        sp<AudioFlinger>    mAudioFlinger;
-        sp<MemoryDealer>    mMemoryDealer;
-        pid_t               mPid;
-    };
-
-
-    class TrackHandle;
-    class RecordHandle;
-    class RecordThread;
-    class PlaybackThread;
-    class MixerThread;
-    class DirectOutputThread;
-    class DuplicatingThread;
-    class Track;
-    class RecordTrack;
-
-    class ThreadBase : public Thread {
-    public:
-        ThreadBase (const sp<AudioFlinger>& audioFlinger, int id);
-        virtual             ~ThreadBase();
-
-        status_t dumpBase(int fd, const Vector<String16>& args);
-
-        // base for record and playback
-        class TrackBase : public AudioBufferProvider, public RefBase {
-
-        public:
-            enum track_state {
-                IDLE,
-                TERMINATED,
-                STOPPED,
-                RESUMING,
-                ACTIVE,
-                PAUSING,
-                PAUSED
-            };
-
-            enum track_flags {
-                STEPSERVER_FAILED = 0x01, //  StepServer could not acquire cblk->lock mutex
-                SYSTEM_FLAGS_MASK = 0x0000ffffUL,
-                // The upper 16 bits are used for track-specific flags.
-            };
-
-                                TrackBase(const wp<ThreadBase>& thread,
-                                        const sp<Client>& client,
-                                        uint32_t sampleRate,
-                                        int format,
-                                        int channelCount,
-                                        int frameCount,
-                                        uint32_t flags,
-                                        const sp<IMemory>& sharedBuffer);
-                                ~TrackBase();
-
-            virtual status_t    start() = 0;
-            virtual void        stop() = 0;
-                    sp<IMemory> getCblk() const;
-                    audio_track_cblk_t* cblk() const { return mCblk; }
-
-        protected:
-            friend class ThreadBase;
-            friend class RecordHandle;
-            friend class PlaybackThread;
-            friend class RecordThread;
-            friend class MixerThread;
-            friend class DirectOutputThread;
-
-                                TrackBase(const TrackBase&);
-                                TrackBase& operator = (const TrackBase&);
-
-            virtual status_t getNextBuffer(AudioBufferProvider::Buffer* buffer) = 0;
-            virtual void releaseBuffer(AudioBufferProvider::Buffer* buffer);
-
-            int format() const {
-                return mFormat;
-            }
-
-            int channelCount() const ;
-
-            int sampleRate() const;
-
-            void* getBuffer(uint32_t offset, uint32_t frames) const;
-
-            bool isStopped() const {
-                return mState == STOPPED;
-            }
-
-            bool isTerminated() const {
-                return mState == TERMINATED;
-            }
-
-            bool step();
-            void reset();
-
-            wp<ThreadBase>      mThread;
-            sp<Client>          mClient;
-            sp<IMemory>         mCblkMemory;
-            audio_track_cblk_t* mCblk;
-            void*               mBuffer;
-            void*               mBufferEnd;
-            uint32_t            mFrameCount;
-            // we don't really need a lock for these
-            int                 mState;
-            int                 mClientTid;
-            uint8_t             mFormat;
-            uint32_t            mFlags;
-        };
-
-        class ConfigEvent {
-        public:
-            ConfigEvent() : mEvent(0), mParam(0) {}
-
-            int mEvent;
-            int mParam;
-        };
-
-                    uint32_t    sampleRate() const;
-                    int         channelCount() const;
-                    int         format() const;
-                    size_t      frameCount() const;
-                    void        wakeUp()    { mWaitWorkCV.broadcast(); }
-                    void        exit();
-        virtual     bool        checkForNewParameters_l() = 0;
-        virtual     status_t    setParameters(const String8& keyValuePairs);
-        virtual     String8     getParameters(const String8& keys) = 0;
-        virtual     void        audioConfigChanged(int event, int param = 0) = 0;
-                    void        sendConfigEvent(int event, int param = 0);
-                    void        sendConfigEvent_l(int event, int param = 0);
-                    void        processConfigEvents();
-                    int         id() const { return mId;}
-                    bool        standby() { return mStandby; }
-
-        mutable     Mutex                   mLock;
-
-    protected:
-
-        friend class Track;
-        friend class TrackBase;
-        friend class PlaybackThread;
-        friend class MixerThread;
-        friend class DirectOutputThread;
-        friend class DuplicatingThread;
-        friend class RecordThread;
-        friend class RecordTrack;
-
-                    Condition               mWaitWorkCV;
-                    sp<AudioFlinger>        mAudioFlinger;
-                    uint32_t                mSampleRate;
-                    size_t                  mFrameCount;
-                    int                     mChannelCount;
-                    int                     mFormat;
-                    uint32_t                mFrameSize;
-                    Condition               mParamCond;
-                    Vector<String8>         mNewParameters;
-                    status_t                mParamStatus;
-                    Vector<ConfigEvent *>   mConfigEvents;
-                    bool                    mStandby;
-                    int                     mId;
-                    bool                    mExiting;
-    };
-
-    // --- PlaybackThread ---
-    class PlaybackThread : public ThreadBase {
-    public:
-
-        enum type {
-            MIXER,
-            DIRECT,
-            DUPLICATING
-        };
-
-        enum mixer_state {
-            MIXER_IDLE,
-            MIXER_TRACKS_ENABLED,
-            MIXER_TRACKS_READY
-        };
-
-        // playback track
-        class Track : public TrackBase {
-        public:
-                                Track(  const wp<ThreadBase>& thread,
-                                        const sp<Client>& client,
-                                        int streamType,
-                                        uint32_t sampleRate,
-                                        int format,
-                                        int channelCount,
-                                        int frameCount,
-                                        const sp<IMemory>& sharedBuffer);
-                                ~Track();
-
-                    void        dump(char* buffer, size_t size);
-            virtual status_t    start();
-            virtual void        stop();
-                    void        pause();
-
-                    void        flush();
-                    void        destroy();
-                    void        mute(bool);
-                    void        setVolume(float left, float right);
-                    int name() const {
-                        return mName;
-                    }
-
-                    int type() const {
-                        return mStreamType;
-                    }
-
-
-        protected:
-            friend class ThreadBase;
-            friend class AudioFlinger;
-            friend class TrackHandle;
-            friend class PlaybackThread;
-            friend class MixerThread;
-            friend class DirectOutputThread;
-
-                                Track(const Track&);
-                                Track& operator = (const Track&);
-
-            virtual status_t getNextBuffer(AudioBufferProvider::Buffer* buffer);
-            bool isMuted() { return mMute; }
-            bool isPausing() const {
-                return mState == PAUSING;
-            }
-            bool isPaused() const {
-                return mState == PAUSED;
-            }
-            bool isReady() const;
-            void setPaused() { mState = PAUSED; }
-            void reset();
-
-            bool isOutputTrack() const {
-                return (mStreamType == AudioSystem::NUM_STREAM_TYPES);
-            }
-
-            // we don't really need a lock for these
-            float               mVolume[2];
-            volatile bool       mMute;
-            // FILLED state is used for suppressing volume ramp at begin of playing
-            enum {FS_FILLING, FS_FILLED, FS_ACTIVE};
-            mutable uint8_t     mFillingUpStatus;
-            int8_t              mRetryCount;
-            sp<IMemory>         mSharedBuffer;
-            bool                mResetDone;
-            int                 mStreamType;
-            int                 mName;
-        };  // end of Track
-
-
-        // playback track
-        class OutputTrack : public Track {
-        public:
-
-            class Buffer: public AudioBufferProvider::Buffer {
-            public:
-                int16_t *mBuffer;
-            };
-
-                                OutputTrack(  const wp<ThreadBase>& thread,
-                                        DuplicatingThread *sourceThread,
-                                        uint32_t sampleRate,
-                                        int format,
-                                        int channelCount,
-                                        int frameCount);
-                                ~OutputTrack();
-
-            virtual status_t    start();
-            virtual void        stop();
-                    bool        write(int16_t* data, uint32_t frames);
-                    bool        bufferQueueEmpty() { return (mBufferQueue.size() == 0) ? true : false; }
-                    bool        isActive() { return mActive; }
-            wp<ThreadBase>&     thread()  { return mThread; }
-
-        private:
-
-            status_t            obtainBuffer(AudioBufferProvider::Buffer* buffer, uint32_t waitTimeMs);
-            void                clearBufferQueue();
-
-            // Maximum number of pending buffers allocated by OutputTrack::write()
-            static const uint8_t kMaxOverFlowBuffers = 10;
-
-            Vector < Buffer* >          mBufferQueue;
-            AudioBufferProvider::Buffer mOutBuffer;
-            bool                        mActive;
-            DuplicatingThread*          mSourceThread;
-        };  // end of OutputTrack
-
-        PlaybackThread (const sp<AudioFlinger>& audioFlinger, AudioStreamOut* output, int id);
-        virtual             ~PlaybackThread();
-
-        virtual     status_t    dump(int fd, const Vector<String16>& args);
-
-        // Thread virtuals
-        virtual     status_t    readyToRun();
-        virtual     void        onFirstRef();
-
-        virtual     uint32_t    latency() const;
-
-        virtual     status_t    setMasterVolume(float value);
-        virtual     status_t    setMasterMute(bool muted);
-
-        virtual     float       masterVolume() const;
-        virtual     bool        masterMute() const;
-
-        virtual     status_t    setStreamVolume(int stream, float value);
-        virtual     status_t    setStreamMute(int stream, bool muted);
-
-        virtual     float       streamVolume(int stream) const;
-        virtual     bool        streamMute(int stream) const;
-
-                    bool        isStreamActive(int stream) const;
-
-                    sp<Track>   createTrack_l(
-                                    const sp<AudioFlinger::Client>& client,
-                                    int streamType,
-                                    uint32_t sampleRate,
-                                    int format,
-                                    int channelCount,
-                                    int frameCount,
-                                    const sp<IMemory>& sharedBuffer,
-                                    status_t *status);
-
-                    AudioStreamOut* getOutput() { return mOutput; }
-
-        virtual     int         type() const { return mType; }
-                    void        suspend() { mSuspended++; }
-                    void        restore() { if (mSuspended) mSuspended--; }
-                    bool        isSuspended() { return (mSuspended != 0); }
-        virtual     String8     getParameters(const String8& keys);
-        virtual     void        audioConfigChanged(int event, int param = 0);
-        virtual     status_t    getRenderPosition(uint32_t *halFrames, uint32_t *dspFrames);
-
-        struct  stream_type_t {
-            stream_type_t()
-                :   volume(1.0f),
-                    mute(false)
-            {
-            }
-            float       volume;
-            bool        mute;
-        };
-
-    protected:
-        int                             mType;
-        int16_t*                        mMixBuffer;
-        int                             mSuspended;
-        int                             mBytesWritten;
-        bool                            mMasterMute;
-        SortedVector< wp<Track> >       mActiveTracks;
-
-        virtual int             getTrackName_l() = 0;
-        virtual void            deleteTrackName_l(int name) = 0;
-        virtual uint32_t        activeSleepTimeUs() = 0;
-        virtual uint32_t        idleSleepTimeUs() = 0;
-
-    private:
-
-        friend class AudioFlinger;
-        friend class OutputTrack;
-        friend class Track;
-        friend class TrackBase;
-        friend class MixerThread;
-        friend class DirectOutputThread;
-        friend class DuplicatingThread;
-
-        PlaybackThread(const Client&);
-        PlaybackThread& operator = (const PlaybackThread&);
-
-        status_t    addTrack_l(const sp<Track>& track);
-        void        destroyTrack_l(const sp<Track>& track);
-
-        void        readOutputParameters();
-
-        virtual status_t    dumpInternals(int fd, const Vector<String16>& args);
-        status_t    dumpTracks(int fd, const Vector<String16>& args);
-
-        SortedVector< sp<Track> >       mTracks;
-        // mStreamTypes[] uses 1 additionnal stream type internally for the OutputTrack used by DuplicatingThread
-        stream_type_t                   mStreamTypes[AudioSystem::NUM_STREAM_TYPES + 1];
-        AudioStreamOut*                 mOutput;
-        float                           mMasterVolume;
-        nsecs_t                         mLastWriteTime;
-        int                             mNumWrites;
-        int                             mNumDelayedWrites;
-        bool                            mInWrite;
-    };
-
-    class MixerThread : public PlaybackThread {
-    public:
-        MixerThread (const sp<AudioFlinger>& audioFlinger, AudioStreamOut* output, int id);
-        virtual             ~MixerThread();
-
-        // Thread virtuals
-        virtual     bool        threadLoop();
-
-                    void        getTracks(SortedVector < sp<Track> >& tracks,
-                                      SortedVector < wp<Track> >& activeTracks,
-                                      int streamType);
-                    void        putTracks(SortedVector < sp<Track> >& tracks,
-                                      SortedVector < wp<Track> >& activeTracks);
-        virtual     bool        checkForNewParameters_l();
-        virtual     status_t    dumpInternals(int fd, const Vector<String16>& args);
-
-    protected:
-                    uint32_t    prepareTracks_l(const SortedVector< wp<Track> >& activeTracks, Vector< sp<Track> > *tracksToRemove);
-        virtual     int         getTrackName_l();
-        virtual     void        deleteTrackName_l(int name);
-        virtual     uint32_t    activeSleepTimeUs();
-        virtual     uint32_t    idleSleepTimeUs();
-
-        AudioMixer*                     mAudioMixer;
-    };
-
-    class DirectOutputThread : public PlaybackThread {
-    public:
-
-        DirectOutputThread (const sp<AudioFlinger>& audioFlinger, AudioStreamOut* output, int id);
-        ~DirectOutputThread();
-
-        // Thread virtuals
-        virtual     bool        threadLoop();
-
-        virtual     bool        checkForNewParameters_l();
-
-    protected:
-        virtual     int         getTrackName_l();
-        virtual     void        deleteTrackName_l(int name);
-        virtual     uint32_t    activeSleepTimeUs();
-        virtual     uint32_t    idleSleepTimeUs();
-
-    private:
-        float mLeftVolume;
-        float mRightVolume;
-    };
-
-    class DuplicatingThread : public MixerThread {
-    public:
-        DuplicatingThread (const sp<AudioFlinger>& audioFlinger, MixerThread* mainThread, int id);
-        ~DuplicatingThread();
-
-        // Thread virtuals
-        virtual     bool        threadLoop();
-                    void        addOutputTrack(MixerThread* thread);
-                    void        removeOutputTrack(MixerThread* thread);
-                    uint32_t    waitTimeMs() { return mWaitTimeMs; }
-    protected:
-        virtual     uint32_t    activeSleepTimeUs();
-
-    private:
-                    bool        outputsReady(SortedVector< sp<OutputTrack> > &outputTracks);
-                    void        updateWaitTime();
-
-        SortedVector < sp<OutputTrack> >  mOutputTracks;
-                    uint32_t    mWaitTimeMs;
-    };
-
-              PlaybackThread *checkPlaybackThread_l(int output) const;
-              MixerThread *checkMixerThread_l(int output) const;
-              RecordThread *checkRecordThread_l(int input) const;
-              float streamVolumeInternal(int stream) const { return mStreamTypes[stream].volume; }
-              void audioConfigChanged_l(int event, int ioHandle, void *param2);
-
-    friend class AudioBuffer;
-
-    class TrackHandle : public android::BnAudioTrack {
-    public:
-                            TrackHandle(const sp<PlaybackThread::Track>& track);
-        virtual             ~TrackHandle();
-        virtual status_t    start();
-        virtual void        stop();
-        virtual void        flush();
-        virtual void        mute(bool);
-        virtual void        pause();
-        virtual void        setVolume(float left, float right);
-        virtual sp<IMemory> getCblk() const;
-        virtual status_t onTransact(
-            uint32_t code, const Parcel& data, Parcel* reply, uint32_t flags);
-    private:
-        sp<PlaybackThread::Track> mTrack;
-    };
-
-    friend class Client;
-    friend class PlaybackThread::Track;
-
-
-                void        removeClient_l(pid_t pid);
-
-
-    // record thread
-    class RecordThread : public ThreadBase, public AudioBufferProvider
-    {
-    public:
-
-        // record track
-        class RecordTrack : public TrackBase {
-        public:
-                                RecordTrack(const wp<ThreadBase>& thread,
-                                        const sp<Client>& client,
-                                        uint32_t sampleRate,
-                                        int format,
-                                        int channelCount,
-                                        int frameCount,
-                                        uint32_t flags);
-                                ~RecordTrack();
-
-            virtual status_t    start();
-            virtual void        stop();
-
-                    bool        overflow() { bool tmp = mOverflow; mOverflow = false; return tmp; }
-                    bool        setOverflow() { bool tmp = mOverflow; mOverflow = true; return tmp; }
-
-                    void        dump(char* buffer, size_t size);
-        private:
-            friend class AudioFlinger;
-            friend class RecordThread;
-
-                                RecordTrack(const RecordTrack&);
-                                RecordTrack& operator = (const RecordTrack&);
-
-            virtual status_t getNextBuffer(AudioBufferProvider::Buffer* buffer);
-
-            bool                mOverflow;
-        };
-
-
-                RecordThread(const sp<AudioFlinger>& audioFlinger,
-                        AudioStreamIn *input,
-                        uint32_t sampleRate,
-                        uint32_t channels,
-                        int id);
-                ~RecordThread();
-
-        virtual bool        threadLoop();
-        virtual status_t    readyToRun() { return NO_ERROR; }
-        virtual void        onFirstRef();
-
-                status_t    start(RecordTrack* recordTrack);
-                void        stop(RecordTrack* recordTrack);
-                status_t    dump(int fd, const Vector<String16>& args);
-                AudioStreamIn* getInput() { return mInput; }
-
-        virtual status_t    getNextBuffer(AudioBufferProvider::Buffer* buffer);
-        virtual void        releaseBuffer(AudioBufferProvider::Buffer* buffer);
-        virtual bool        checkForNewParameters_l();
-        virtual String8     getParameters(const String8& keys);
-        virtual void        audioConfigChanged(int event, int param = 0);
-                void        readInputParameters();
-        virtual unsigned int  getInputFramesLost();
-
-    private:
-                RecordThread();
-                AudioStreamIn                       *mInput;
-                sp<RecordTrack>                     mActiveTrack;
-                Condition                           mStartStopCond;
-                AudioResampler                      *mResampler;
-                int32_t                             *mRsmpOutBuffer;
-                int16_t                             *mRsmpInBuffer;
-                size_t                              mRsmpInIndex;
-                size_t                              mInputBytes;
-                int                                 mReqChannelCount;
-                uint32_t                            mReqSampleRate;
-                ssize_t                             mBytesRead;
-    };
-
-    class RecordHandle : public android::BnAudioRecord {
-    public:
-        RecordHandle(const sp<RecordThread::RecordTrack>& recordTrack);
-        virtual             ~RecordHandle();
-        virtual status_t    start();
-        virtual void        stop();
-        virtual sp<IMemory> getCblk() const;
-        virtual status_t onTransact(
-            uint32_t code, const Parcel& data, Parcel* reply, uint32_t flags);
-    private:
-        sp<RecordThread::RecordTrack> mRecordTrack;
-    };
-
-    friend class RecordThread;
-    friend class PlaybackThread;
-
-
-    mutable     Mutex                               mLock;
-
-                DefaultKeyedVector< pid_t, wp<Client> >     mClients;
-
-                mutable     Mutex                   mHardwareLock;
-                AudioHardwareInterface*             mAudioHardware;
-    mutable     int                                 mHardwareStatus;
-
-
-                DefaultKeyedVector< int, sp<PlaybackThread> >  mPlaybackThreads;
-                PlaybackThread::stream_type_t       mStreamTypes[AudioSystem::NUM_STREAM_TYPES];
-                float                               mMasterVolume;
-                bool                                mMasterMute;
-
-                DefaultKeyedVector< int, sp<RecordThread> >    mRecordThreads;
-
-                SortedVector< sp<IBinder> >         mNotificationClients;
-                int                                 mNextThreadId;
-};
-
-// ----------------------------------------------------------------------------
-
-}; // namespace android
-
-#endif // ANDROID_AUDIO_FLINGER_H
diff --git a/libs/audioflinger/AudioMixer.cpp b/libs/audioflinger/AudioMixer.cpp
deleted file mode 100644
index 19a442a..0000000
--- a/libs/audioflinger/AudioMixer.cpp
+++ /dev/null
@@ -1,915 +0,0 @@
-/* //device/include/server/AudioFlinger/AudioMixer.cpp
-**
-** Copyright 2007, The Android Open Source Project
-**
-** Licensed under the Apache License, Version 2.0 (the "License");
-** you may not use this file except in compliance with the License.
-** You may obtain a copy of the License at
-**
-**     http://www.apache.org/licenses/LICENSE-2.0
-**
-** Unless required by applicable law or agreed to in writing, software
-** distributed under the License is distributed on an "AS IS" BASIS,
-** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-** See the License for the specific language governing permissions and
-** limitations under the License.
-*/
-
-#define LOG_TAG "AudioMixer"
-//#define LOG_NDEBUG 0
-
-#include <stdint.h>
-#include <string.h>
-#include <stdlib.h>
-#include <sys/types.h>
-
-#include <utils/Errors.h>
-#include <utils/Log.h>
-
-#include "AudioMixer.h"
-
-namespace android {
-// ----------------------------------------------------------------------------
-
-static inline int16_t clamp16(int32_t sample)
-{
-    if ((sample>>15) ^ (sample>>31))
-        sample = 0x7FFF ^ (sample>>31);
-    return sample;
-}
-
-// ----------------------------------------------------------------------------
-
-AudioMixer::AudioMixer(size_t frameCount, uint32_t sampleRate)
-    :   mActiveTrack(0), mTrackNames(0), mSampleRate(sampleRate)
-{
-    mState.enabledTracks= 0;
-    mState.needsChanged = 0;
-    mState.frameCount   = frameCount;
-    mState.outputTemp   = 0;
-    mState.resampleTemp = 0;
-    mState.hook         = process__nop;
-    track_t* t = mState.tracks;
-    for (int i=0 ; i<32 ; i++) {
-        t->needs = 0;
-        t->volume[0] = UNITY_GAIN;
-        t->volume[1] = UNITY_GAIN;
-        t->volumeInc[0] = 0;
-        t->volumeInc[1] = 0;
-        t->channelCount = 2;
-        t->enabled = 0;
-        t->format = 16;
-        t->buffer.raw = 0;
-        t->bufferProvider = 0;
-        t->hook = 0;
-        t->resampler = 0;
-        t->sampleRate = mSampleRate;
-        t->in = 0;
-        t++;
-    }
-}
-
- AudioMixer::~AudioMixer()
- {
-     track_t* t = mState.tracks;
-     for (int i=0 ; i<32 ; i++) {
-         delete t->resampler;
-         t++;
-     }
-     delete [] mState.outputTemp;
-     delete [] mState.resampleTemp;
- }
-
- int AudioMixer::getTrackName()
- {
-    uint32_t names = mTrackNames;
-    uint32_t mask = 1;
-    int n = 0;
-    while (names & mask) {
-        mask <<= 1;
-        n++;
-    }
-    if (mask) {
-        LOGV("add track (%d)", n);
-        mTrackNames |= mask;
-        return TRACK0 + n;
-    }
-    return -1;
- }
-
- void AudioMixer::invalidateState(uint32_t mask)
- {
-    if (mask) {
-        mState.needsChanged |= mask;
-        mState.hook = process__validate;
-    }
- }
-
- void AudioMixer::deleteTrackName(int name)
- {
-    name -= TRACK0;
-    if (uint32_t(name) < MAX_NUM_TRACKS) {
-        LOGV("deleteTrackName(%d)", name);
-        track_t& track(mState.tracks[ name ]);
-        if (track.enabled != 0) {
-            track.enabled = 0;
-            invalidateState(1<<name);
-        }
-        if (track.resampler) {
-            // delete  the resampler
-            delete track.resampler;
-            track.resampler = 0;
-            track.sampleRate = mSampleRate;
-            invalidateState(1<<name);
-        }
-        track.volumeInc[0] = 0;
-        track.volumeInc[1] = 0;
-        mTrackNames &= ~(1<<name);
-    }
- }
-
-status_t AudioMixer::enable(int name)
-{
-    switch (name) {
-        case MIXING: {
-            if (mState.tracks[ mActiveTrack ].enabled != 1) {
-                mState.tracks[ mActiveTrack ].enabled = 1;
-                LOGV("enable(%d)", mActiveTrack);
-                invalidateState(1<<mActiveTrack);
-            }
-        } break;
-        default:
-            return NAME_NOT_FOUND;
-    }
-    return NO_ERROR;
-}
-
-status_t AudioMixer::disable(int name)
-{
-    switch (name) {
-        case MIXING: {
-            if (mState.tracks[ mActiveTrack ].enabled != 0) {
-                mState.tracks[ mActiveTrack ].enabled = 0;
-                LOGV("disable(%d)", mActiveTrack);
-                invalidateState(1<<mActiveTrack);
-            }
-        } break;
-        default:
-            return NAME_NOT_FOUND;
-    }
-    return NO_ERROR;
-}
-
-status_t AudioMixer::setActiveTrack(int track)
-{
-    if (uint32_t(track-TRACK0) >= MAX_NUM_TRACKS) {
-        return BAD_VALUE;
-    }
-    mActiveTrack = track - TRACK0;
-    return NO_ERROR;
-}
-
-status_t AudioMixer::setParameter(int target, int name, int value)
-{
-    switch (target) {
-    case TRACK:
-        if (name == CHANNEL_COUNT) {
-            if ((uint32_t(value) <= MAX_NUM_CHANNELS) && (value)) {
-                if (mState.tracks[ mActiveTrack ].channelCount != value) {
-                    mState.tracks[ mActiveTrack ].channelCount = value;
-                    LOGV("setParameter(TRACK, CHANNEL_COUNT, %d)", value);
-                    invalidateState(1<<mActiveTrack);
-                }
-                return NO_ERROR;
-            }
-        }
-        break;
-    case RESAMPLE:
-        if (name == SAMPLE_RATE) {
-            if (value > 0) {
-                track_t& track = mState.tracks[ mActiveTrack ];
-                if (track.setResampler(uint32_t(value), mSampleRate)) {
-                    LOGV("setParameter(RESAMPLE, SAMPLE_RATE, %u)",
-                            uint32_t(value));
-                    invalidateState(1<<mActiveTrack);
-                }
-                return NO_ERROR;
-            }
-        }
-        break;
-    case RAMP_VOLUME:
-    case VOLUME:
-        if ((uint32_t(name-VOLUME0) < MAX_NUM_CHANNELS)) {
-            track_t& track = mState.tracks[ mActiveTrack ];
-            if (track.volume[name-VOLUME0] != value) {
-                track.prevVolume[name-VOLUME0] = track.volume[name-VOLUME0] << 16;
-                track.volume[name-VOLUME0] = value;
-                if (target == VOLUME) {
-                    track.prevVolume[name-VOLUME0] = value << 16;
-                    track.volumeInc[name-VOLUME0] = 0;
-                } else {
-                    int32_t d = (value<<16) - track.prevVolume[name-VOLUME0];
-                    int32_t volInc = d / int32_t(mState.frameCount);
-                    track.volumeInc[name-VOLUME0] = volInc;
-                    if (volInc == 0) {
-                        track.prevVolume[name-VOLUME0] = value << 16;
-                    }
-                }
-                invalidateState(1<<mActiveTrack);
-            }
-            return NO_ERROR;
-        }
-        break;
-    }
-    return BAD_VALUE;
-}
-
-bool AudioMixer::track_t::setResampler(uint32_t value, uint32_t devSampleRate)
-{
-    if (value!=devSampleRate || resampler) {
-        if (sampleRate != value) {
-            sampleRate = value;
-            if (resampler == 0) {
-                resampler = AudioResampler::create(
-                        format, channelCount, devSampleRate);
-            }
-            return true;
-        }
-    }
-    return false;
-}
-
-bool AudioMixer::track_t::doesResample() const
-{
-    return resampler != 0;
-}
-
-inline
-void AudioMixer::track_t::adjustVolumeRamp()
-{
-    for (int i=0 ; i<2 ; i++) {
-        if (((volumeInc[i]>0) && (((prevVolume[i]+volumeInc[i])>>16) >= volume[i])) ||
-            ((volumeInc[i]<0) && (((prevVolume[i]+volumeInc[i])>>16) <= volume[i]))) {
-            volumeInc[i] = 0;
-            prevVolume[i] = volume[i]<<16;
-        }
-    }
-}
-
-
-status_t AudioMixer::setBufferProvider(AudioBufferProvider* buffer)
-{
-    mState.tracks[ mActiveTrack ].bufferProvider = buffer;
-    return NO_ERROR;
-}
-
-
-
-void AudioMixer::process(void* output)
-{
-    mState.hook(&mState, output);
-}
-
-
-void AudioMixer::process__validate(state_t* state, void* output)
-{
-    LOGW_IF(!state->needsChanged,
-        "in process__validate() but nothing's invalid");
-
-    uint32_t changed = state->needsChanged;
-    state->needsChanged = 0; // clear the validation flag
-
-    // recompute which tracks are enabled / disabled
-    uint32_t enabled = 0;
-    uint32_t disabled = 0;
-    while (changed) {
-        const int i = 31 - __builtin_clz(changed);
-        const uint32_t mask = 1<<i;
-        changed &= ~mask;
-        track_t& t = state->tracks[i];
-        (t.enabled ? enabled : disabled) |= mask;
-    }
-    state->enabledTracks &= ~disabled;
-    state->enabledTracks |=  enabled;
-
-    // compute everything we need...
-    int countActiveTracks = 0;
-    int all16BitsStereoNoResample = 1;
-    int resampling = 0;
-    int volumeRamp = 0;
-    uint32_t en = state->enabledTracks;
-    while (en) {
-        const int i = 31 - __builtin_clz(en);
-        en &= ~(1<<i);
-
-        countActiveTracks++;
-        track_t& t = state->tracks[i];
-        uint32_t n = 0;
-        n |= NEEDS_CHANNEL_1 + t.channelCount - 1;
-        n |= NEEDS_FORMAT_16;
-        n |= t.doesResample() ? NEEDS_RESAMPLE_ENABLED : NEEDS_RESAMPLE_DISABLED;
-       
-        if (t.volumeInc[0]|t.volumeInc[1]) {
-            volumeRamp = 1;
-        } else if (!t.doesResample() && t.volumeRL == 0) {
-            n |= NEEDS_MUTE_ENABLED;
-        }
-        t.needs = n;
-
-        if ((n & NEEDS_MUTE__MASK) == NEEDS_MUTE_ENABLED) {
-            t.hook = track__nop;
-        } else {
-            if ((n & NEEDS_RESAMPLE__MASK) == NEEDS_RESAMPLE_ENABLED) {
-                all16BitsStereoNoResample = 0;
-                resampling = 1;
-                t.hook = track__genericResample;
-            } else {
-                if ((n & NEEDS_CHANNEL_COUNT__MASK) == NEEDS_CHANNEL_1){
-                    t.hook = track__16BitsMono;
-                    all16BitsStereoNoResample = 0;
-                }
-                if ((n & NEEDS_CHANNEL_COUNT__MASK) == NEEDS_CHANNEL_2){
-                    t.hook = track__16BitsStereo;
-                }
-            }
-        }
-    }
-
-    // select the processing hooks
-    state->hook = process__nop;
-    if (countActiveTracks) {
-        if (resampling) {
-            if (!state->outputTemp) {
-                state->outputTemp = new int32_t[MAX_NUM_CHANNELS * state->frameCount];
-            }
-            if (!state->resampleTemp) {
-                state->resampleTemp = new int32_t[MAX_NUM_CHANNELS * state->frameCount];
-            }
-            state->hook = process__genericResampling;
-        } else {
-            if (state->outputTemp) {
-                delete [] state->outputTemp;
-                state->outputTemp = 0;
-            }
-            if (state->resampleTemp) {
-                delete [] state->resampleTemp;
-                state->resampleTemp = 0;
-            }
-            state->hook = process__genericNoResampling;
-            if (all16BitsStereoNoResample && !volumeRamp) {
-                if (countActiveTracks == 1) {
-                    state->hook = process__OneTrack16BitsStereoNoResampling;
-                }
-            }
-        }
-    }
-
-    LOGV("mixer configuration change: %d activeTracks (%08x) "
-        "all16BitsStereoNoResample=%d, resampling=%d, volumeRamp=%d",
-        countActiveTracks, state->enabledTracks,
-        all16BitsStereoNoResample, resampling, volumeRamp);
-
-   state->hook(state, output);
-
-   // Now that the volume ramp has been done, set optimal state and
-   // track hooks for subsequent mixer process
-   if (countActiveTracks) {
-       int allMuted = 1;
-       uint32_t en = state->enabledTracks;
-       while (en) {
-           const int i = 31 - __builtin_clz(en);
-           en &= ~(1<<i);
-           track_t& t = state->tracks[i];
-           if (!t.doesResample() && t.volumeRL == 0)
-           {
-               t.needs |= NEEDS_MUTE_ENABLED;
-               t.hook = track__nop;
-           } else {
-               allMuted = 0;
-           }
-       }
-       if (allMuted) {
-           state->hook = process__nop;
-       } else if (!resampling && all16BitsStereoNoResample) {
-           if (countActiveTracks == 1) {
-              state->hook = process__OneTrack16BitsStereoNoResampling;
-           }
-       }
-   }
-}
-
-static inline
-int32_t mulAdd(int16_t in, int16_t v, int32_t a)
-{
-#if defined(__arm__) && !defined(__thumb__)
-    int32_t out;
-    asm( "smlabb %[out], %[in], %[v], %[a] \n"
-         : [out]"=r"(out)
-         : [in]"%r"(in), [v]"r"(v), [a]"r"(a)
-         : );
-    return out;
-#else
-    return a + in * int32_t(v);
-#endif
-}
-
-static inline
-int32_t mul(int16_t in, int16_t v)
-{
-#if defined(__arm__) && !defined(__thumb__)
-    int32_t out;
-    asm( "smulbb %[out], %[in], %[v] \n"
-         : [out]"=r"(out)
-         : [in]"%r"(in), [v]"r"(v)
-         : );
-    return out;
-#else
-    return in * int32_t(v);
-#endif
-}
-
-static inline
-int32_t mulAddRL(int left, uint32_t inRL, uint32_t vRL, int32_t a)
-{
-#if defined(__arm__) && !defined(__thumb__)
-    int32_t out;
-    if (left) {
-        asm( "smlabb %[out], %[inRL], %[vRL], %[a] \n"
-             : [out]"=r"(out)
-             : [inRL]"%r"(inRL), [vRL]"r"(vRL), [a]"r"(a)
-             : );
-    } else {
-        asm( "smlatt %[out], %[inRL], %[vRL], %[a] \n"
-             : [out]"=r"(out)
-             : [inRL]"%r"(inRL), [vRL]"r"(vRL), [a]"r"(a)
-             : );
-    }
-    return out;
-#else
-    if (left) {
-        return a + int16_t(inRL&0xFFFF) * int16_t(vRL&0xFFFF);
-    } else {
-        return a + int16_t(inRL>>16) * int16_t(vRL>>16);
-    }
-#endif
-}
-
-static inline
-int32_t mulRL(int left, uint32_t inRL, uint32_t vRL)
-{
-#if defined(__arm__) && !defined(__thumb__)
-    int32_t out;
-    if (left) {
-        asm( "smulbb %[out], %[inRL], %[vRL] \n"
-             : [out]"=r"(out)
-             : [inRL]"%r"(inRL), [vRL]"r"(vRL)
-             : );
-    } else {
-        asm( "smultt %[out], %[inRL], %[vRL] \n"
-             : [out]"=r"(out)
-             : [inRL]"%r"(inRL), [vRL]"r"(vRL)
-             : );
-    }
-    return out;
-#else
-    if (left) {
-        return int16_t(inRL&0xFFFF) * int16_t(vRL&0xFFFF);
-    } else {
-        return int16_t(inRL>>16) * int16_t(vRL>>16);
-    }
-#endif
-}
-
-
-void AudioMixer::track__genericResample(track_t* t, int32_t* out, size_t outFrameCount, int32_t* temp)
-{
-    t->resampler->setSampleRate(t->sampleRate);
-
-    // ramp gain - resample to temp buffer and scale/mix in 2nd step
-    if UNLIKELY(t->volumeInc[0]|t->volumeInc[1]) {
-        t->resampler->setVolume(UNITY_GAIN, UNITY_GAIN);
-        memset(temp, 0, outFrameCount * MAX_NUM_CHANNELS * sizeof(int32_t));
-        t->resampler->resample(temp, outFrameCount, t->bufferProvider);
-        volumeRampStereo(t, out, outFrameCount, temp);
-    }
-
-    // constant gain
-    else {
-        t->resampler->setVolume(t->volume[0], t->volume[1]);
-        t->resampler->resample(out, outFrameCount, t->bufferProvider);
-    }
-}
-
-void AudioMixer::track__nop(track_t* t, int32_t* out, size_t outFrameCount, int32_t* temp)
-{
-}
-
-void AudioMixer::volumeRampStereo(track_t* t, int32_t* out, size_t frameCount, int32_t* temp)
-{
-    int32_t vl = t->prevVolume[0];
-    int32_t vr = t->prevVolume[1];
-    const int32_t vlInc = t->volumeInc[0];
-    const int32_t vrInc = t->volumeInc[1];
-
-    //LOGD("[0] %p: inc=%f, v0=%f, v1=%d, final=%f, count=%d",
-    //        t, vlInc/65536.0f, vl/65536.0f, t->volume[0],
-    //       (vl + vlInc*frameCount)/65536.0f, frameCount);
-   
-    // ramp volume
-    do {
-        *out++ += (vl >> 16) * (*temp++ >> 12);
-        *out++ += (vr >> 16) * (*temp++ >> 12);
-        vl += vlInc;
-        vr += vrInc;
-    } while (--frameCount);
-
-    t->prevVolume[0] = vl;
-    t->prevVolume[1] = vr;
-    t->adjustVolumeRamp();
-}
-
-void AudioMixer::track__16BitsStereo(track_t* t, int32_t* out, size_t frameCount, int32_t* temp)
-{
-    int16_t const *in = static_cast<int16_t const *>(t->in);
-
-    // ramp gain
-    if UNLIKELY(t->volumeInc[0]|t->volumeInc[1]) {
-        int32_t vl = t->prevVolume[0];
-        int32_t vr = t->prevVolume[1];
-        const int32_t vlInc = t->volumeInc[0];
-        const int32_t vrInc = t->volumeInc[1];
-
-        // LOGD("[1] %p: inc=%f, v0=%f, v1=%d, final=%f, count=%d",
-        //        t, vlInc/65536.0f, vl/65536.0f, t->volume[0],
-        //        (vl + vlInc*frameCount)/65536.0f, frameCount);
-
-        do {
-            *out++ += (vl >> 16) * (int32_t) *in++;
-            *out++ += (vr >> 16) * (int32_t) *in++;
-            vl += vlInc;
-            vr += vrInc;
-        } while (--frameCount);
-       
-        t->prevVolume[0] = vl;
-        t->prevVolume[1] = vr;
-        t->adjustVolumeRamp();
-    }
-
-    // constant gain
-    else {
-        const uint32_t vrl = t->volumeRL;
-        do {
-            uint32_t rl = *reinterpret_cast<uint32_t const *>(in);
-            in += 2;
-            out[0] = mulAddRL(1, rl, vrl, out[0]);
-            out[1] = mulAddRL(0, rl, vrl, out[1]);
-            out += 2;
-        } while (--frameCount);
-    }
-    t->in = in;
-}
-
-void AudioMixer::track__16BitsMono(track_t* t, int32_t* out, size_t frameCount, int32_t* temp)
-{
-    int16_t const *in = static_cast<int16_t const *>(t->in);
-
-    // ramp gain
-    if UNLIKELY(t->volumeInc[0]|t->volumeInc[1]) {
-        int32_t vl = t->prevVolume[0];
-        int32_t vr = t->prevVolume[1];
-        const int32_t vlInc = t->volumeInc[0];
-        const int32_t vrInc = t->volumeInc[1];
-
-        // LOGD("[2] %p: inc=%f, v0=%f, v1=%d, final=%f, count=%d",
-        //         t, vlInc/65536.0f, vl/65536.0f, t->volume[0],
-        //         (vl + vlInc*frameCount)/65536.0f, frameCount);
-
-        do {
-            int32_t l = *in++;
-            *out++ += (vl >> 16) * l;
-            *out++ += (vr >> 16) * l;
-            vl += vlInc;
-            vr += vrInc;
-        } while (--frameCount);
-       
-        t->prevVolume[0] = vl;
-        t->prevVolume[1] = vr;
-        t->adjustVolumeRamp();
-    }
-    // constant gain
-    else {
-        const int16_t vl = t->volume[0];
-        const int16_t vr = t->volume[1];
-        do {
-            int16_t l = *in++;
-            out[0] = mulAdd(l, vl, out[0]);
-            out[1] = mulAdd(l, vr, out[1]);
-            out += 2;
-        } while (--frameCount);
-    }
-    t->in = in;
-}
-
-void AudioMixer::ditherAndClamp(int32_t* out, int32_t const *sums, size_t c)
-{
-    for (size_t i=0 ; i<c ; i++) {
-        int32_t l = *sums++;
-        int32_t r = *sums++;
-        int32_t nl = l >> 12;
-        int32_t nr = r >> 12;
-        l = clamp16(nl);
-        r = clamp16(nr);
-        *out++ = (r<<16) | (l & 0xFFFF);
-    }
-}
-
-// no-op case
-void AudioMixer::process__nop(state_t* state, void* output)
-{
-    // this assumes output 16 bits stereo, no resampling
-    memset(output, 0, state->frameCount*4);
-    uint32_t en = state->enabledTracks;
-    while (en) {
-        const int i = 31 - __builtin_clz(en);
-        en &= ~(1<<i);
-        track_t& t = state->tracks[i];
-        size_t outFrames = state->frameCount;
-        while (outFrames) {
-            t.buffer.frameCount = outFrames;
-            t.bufferProvider->getNextBuffer(&t.buffer);
-            if (!t.buffer.raw) break;
-            outFrames -= t.buffer.frameCount;
-            t.bufferProvider->releaseBuffer(&t.buffer);
-        }
-    }
-}
-
-// generic code without resampling
-void AudioMixer::process__genericNoResampling(state_t* state, void* output)
-{
-    int32_t outTemp[BLOCKSIZE * MAX_NUM_CHANNELS] __attribute__((aligned(32)));
-
-    // acquire each track's buffer
-    uint32_t enabledTracks = state->enabledTracks;
-    uint32_t en = enabledTracks;
-    while (en) {
-        const int i = 31 - __builtin_clz(en);
-        en &= ~(1<<i);
-        track_t& t = state->tracks[i];
-        t.buffer.frameCount = state->frameCount;
-        t.bufferProvider->getNextBuffer(&t.buffer);
-        t.frameCount = t.buffer.frameCount;
-        t.in = t.buffer.raw;
-        // t.in == NULL can happen if the track was flushed just after having
-        // been enabled for mixing.
-        if (t.in == NULL)
-            enabledTracks &= ~(1<<i);
-    }
-
-    // this assumes output 16 bits stereo, no resampling
-    int32_t* out = static_cast<int32_t*>(output);
-    size_t numFrames = state->frameCount;
-    do {
-        memset(outTemp, 0, sizeof(outTemp));
-
-        en = enabledTracks;
-        while (en) {
-            const int i = 31 - __builtin_clz(en);
-            en &= ~(1<<i);
-            track_t& t = state->tracks[i];
-            size_t outFrames = BLOCKSIZE;
-           
-            while (outFrames) {
-                size_t inFrames = (t.frameCount > outFrames)?outFrames:t.frameCount;
-                if (inFrames) {
-                    (t.hook)(&t, outTemp + (BLOCKSIZE-outFrames)*MAX_NUM_CHANNELS, inFrames, state->resampleTemp);
-                    t.frameCount -= inFrames;
-                    outFrames -= inFrames;
-                }
-                if (t.frameCount == 0 && outFrames) {
-                    t.bufferProvider->releaseBuffer(&t.buffer);
-                    t.buffer.frameCount = numFrames - (BLOCKSIZE - outFrames);
-                    t.bufferProvider->getNextBuffer(&t.buffer);
-                    t.in = t.buffer.raw;
-                    if (t.in == NULL) {
-                        enabledTracks &= ~(1<<i);
-                        break;
-                    }
-                    t.frameCount = t.buffer.frameCount;
-                 }
-            }
-        }
-
-        ditherAndClamp(out, outTemp, BLOCKSIZE);
-        out += BLOCKSIZE;
-        numFrames -= BLOCKSIZE;
-    } while (numFrames);
-
-
-    // release each track's buffer
-    en = enabledTracks;
-    while (en) {
-        const int i = 31 - __builtin_clz(en);
-        en &= ~(1<<i);
-        track_t& t = state->tracks[i];
-        t.bufferProvider->releaseBuffer(&t.buffer);
-    }
-}
-
-// generic code with resampling
-void AudioMixer::process__genericResampling(state_t* state, void* output)
-{
-    int32_t* const outTemp = state->outputTemp;
-    const size_t size = sizeof(int32_t) * MAX_NUM_CHANNELS * state->frameCount;
-    memset(outTemp, 0, size);
-
-    int32_t* out = static_cast<int32_t*>(output);
-    size_t numFrames = state->frameCount;
-
-    uint32_t en = state->enabledTracks;
-    while (en) {
-        const int i = 31 - __builtin_clz(en);
-        en &= ~(1<<i);
-        track_t& t = state->tracks[i];
-
-        // this is a little goofy, on the resampling case we don't
-        // acquire/release the buffers because it's done by
-        // the resampler.
-        if ((t.needs & NEEDS_RESAMPLE__MASK) == NEEDS_RESAMPLE_ENABLED) {
-            (t.hook)(&t, outTemp, numFrames, state->resampleTemp);
-        } else {
-
-            size_t outFrames = numFrames;
-           
-            while (outFrames) {
-                t.buffer.frameCount = outFrames;
-                t.bufferProvider->getNextBuffer(&t.buffer);
-                t.in = t.buffer.raw;
-                // t.in == NULL can happen if the track was flushed just after having
-                // been enabled for mixing.
-                if (t.in == NULL) break;
-
-                (t.hook)(&t, outTemp + (numFrames-outFrames)*MAX_NUM_CHANNELS, t.buffer.frameCount, state->resampleTemp);
-                outFrames -= t.buffer.frameCount;
-                t.bufferProvider->releaseBuffer(&t.buffer);
-            }
-        }
-    }
-
-    ditherAndClamp(out, outTemp, numFrames);
-}
-
-// one track, 16 bits stereo without resampling is the most common case
-void AudioMixer::process__OneTrack16BitsStereoNoResampling(state_t* state, void* output)
-{
-    const int i = 31 - __builtin_clz(state->enabledTracks);
-    const track_t& t = state->tracks[i];
-
-    AudioBufferProvider::Buffer& b(t.buffer);
-   
-    int32_t* out = static_cast<int32_t*>(output);
-    size_t numFrames = state->frameCount;
-  
-    const int16_t vl = t.volume[0];
-    const int16_t vr = t.volume[1];
-    const uint32_t vrl = t.volumeRL;
-    while (numFrames) {
-        b.frameCount = numFrames;
-        t.bufferProvider->getNextBuffer(&b);
-        int16_t const *in = b.i16;
-
-        // in == NULL can happen if the track was flushed just after having
-        // been enabled for mixing.
-        if (in == NULL || ((unsigned long)in & 3)) {
-            memset(out, 0, numFrames*MAX_NUM_CHANNELS*sizeof(int16_t));
-            LOGE_IF(((unsigned long)in & 3), "process stereo track: input buffer alignment pb: buffer %p track %d, channels %d, needs %08x",
-                    in, i, t.channelCount, t.needs);
-            return;
-        }
-        size_t outFrames = b.frameCount;
-       
-        if (UNLIKELY(uint32_t(vl) > UNITY_GAIN || uint32_t(vr) > UNITY_GAIN)) {
-            // volume is boosted, so we might need to clamp even though
-            // we process only one track.
-            do {
-                uint32_t rl = *reinterpret_cast<uint32_t const *>(in);
-                in += 2;
-                int32_t l = mulRL(1, rl, vrl) >> 12;
-                int32_t r = mulRL(0, rl, vrl) >> 12;
-                // clamping...
-                l = clamp16(l);
-                r = clamp16(r);
-                *out++ = (r<<16) | (l & 0xFFFF);
-            } while (--outFrames);
-        } else {
-            do {
-                uint32_t rl = *reinterpret_cast<uint32_t const *>(in);
-                in += 2;
-                int32_t l = mulRL(1, rl, vrl) >> 12;
-                int32_t r = mulRL(0, rl, vrl) >> 12;
-                *out++ = (r<<16) | (l & 0xFFFF);
-            } while (--outFrames);
-        }
-        numFrames -= b.frameCount;
-        t.bufferProvider->releaseBuffer(&b);
-    }
-}
-
-// 2 tracks is also a common case
-void AudioMixer::process__TwoTracks16BitsStereoNoResampling(state_t* state, void* output)
-{
-    int i;
-    uint32_t en = state->enabledTracks;
-
-    i = 31 - __builtin_clz(en);
-    const track_t& t0 = state->tracks[i];
-    AudioBufferProvider::Buffer& b0(t0.buffer);
-
-    en &= ~(1<<i);
-    i = 31 - __builtin_clz(en);
-    const track_t& t1 = state->tracks[i];
-    AudioBufferProvider::Buffer& b1(t1.buffer);
-   
-    int16_t const *in0;
-    const int16_t vl0 = t0.volume[0];
-    const int16_t vr0 = t0.volume[1];
-    size_t frameCount0 = 0;
-  
-    int16_t const *in1;
-    const int16_t vl1 = t1.volume[0];
-    const int16_t vr1 = t1.volume[1];
-    size_t frameCount1 = 0;
-   
-    int32_t* out = static_cast<int32_t*>(output);
-    size_t numFrames = state->frameCount;
-    int16_t const *buff = NULL;
-
-  
-    while (numFrames) {
-   
-        if (frameCount0 == 0) {
-            b0.frameCount = numFrames;
-            t0.bufferProvider->getNextBuffer(&b0);
-            if (b0.i16 == NULL) {
-                if (buff == NULL) {
-                    buff = new int16_t[MAX_NUM_CHANNELS * state->frameCount];
-                }
-                in0 = buff;
-                b0.frameCount = numFrames;
-            } else {
-                in0 = b0.i16;
-            }
-            frameCount0 = b0.frameCount;
-        }
-        if (frameCount1 == 0) {
-            b1.frameCount = numFrames;
-            t1.bufferProvider->getNextBuffer(&b1);
-            if (b1.i16 == NULL) {
-                if (buff == NULL) {
-                    buff = new int16_t[MAX_NUM_CHANNELS * state->frameCount];
-                }
-                in1 = buff;
-                b1.frameCount = numFrames;
-               } else {
-                in1 = b1.i16;
-            }
-            frameCount1 = b1.frameCount;
-        }
-       
-        size_t outFrames = frameCount0 < frameCount1?frameCount0:frameCount1;
-
-        numFrames -= outFrames;
-        frameCount0 -= outFrames;
-        frameCount1 -= outFrames;
-       
-        do {
-            int32_t l0 = *in0++;
-            int32_t r0 = *in0++;
-            l0 = mul(l0, vl0);
-            r0 = mul(r0, vr0);
-            int32_t l = *in1++;
-            int32_t r = *in1++;
-            l = mulAdd(l, vl1, l0) >> 12;
-            r = mulAdd(r, vr1, r0) >> 12;
-            // clamping...
-            l = clamp16(l);
-            r = clamp16(r);
-            *out++ = (r<<16) | (l & 0xFFFF);
-        } while (--outFrames);
-       
-        if (frameCount0 == 0) {
-            t0.bufferProvider->releaseBuffer(&b0);
-        }
-        if (frameCount1 == 0) {
-            t1.bufferProvider->releaseBuffer(&b1);
-        }
-    }   
-       
-    if (buff != NULL) {
-        delete [] buff;       
-    }
-}
-
-// ----------------------------------------------------------------------------
-}; // namespace android
-
diff --git a/libs/audioflinger/AudioMixer.h b/libs/audioflinger/AudioMixer.h
deleted file mode 100644
index 15766cd..0000000
--- a/libs/audioflinger/AudioMixer.h
+++ /dev/null
@@ -1,193 +0,0 @@
-/* //device/include/server/AudioFlinger/AudioMixer.h
-**
-** Copyright 2007, The Android Open Source Project
-**
-** Licensed under the Apache License, Version 2.0 (the "License");
-** you may not use this file except in compliance with the License.
-** You may obtain a copy of the License at
-**
-**     http://www.apache.org/licenses/LICENSE-2.0
-**
-** Unless required by applicable law or agreed to in writing, software
-** distributed under the License is distributed on an "AS IS" BASIS,
-** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-** See the License for the specific language governing permissions and
-** limitations under the License.
-*/
-
-#ifndef ANDROID_AUDIO_MIXER_H
-#define ANDROID_AUDIO_MIXER_H
-
-#include <stdint.h>
-#include <sys/types.h>
-
-#include "AudioBufferProvider.h"
-#include "AudioResampler.h"
-
-namespace android {
-
-// ----------------------------------------------------------------------------
-
-#define LIKELY( exp )       (__builtin_expect( (exp) != 0, true  ))
-#define UNLIKELY( exp )     (__builtin_expect( (exp) != 0, false ))
-
-// ----------------------------------------------------------------------------
-
-class AudioMixer
-{
-public:
-                            AudioMixer(size_t frameCount, uint32_t sampleRate);
-
-                            ~AudioMixer();
-
-    static const uint32_t MAX_NUM_TRACKS = 32;
-    static const uint32_t MAX_NUM_CHANNELS = 2;
-
-    static const uint16_t UNITY_GAIN = 0x1000;
-
-    enum { // names
-
-        // track units (32 units)
-        TRACK0          = 0x1000,
-
-        // enable/disable
-        MIXING          = 0x2000,
-
-        // setParameter targets
-        TRACK           = 0x3000,
-        RESAMPLE        = 0x3001,
-        RAMP_VOLUME     = 0x3002, // ramp to new volume
-        VOLUME          = 0x3003, // don't ramp
-
-        // set Parameter names
-        // for target TRACK
-        CHANNEL_COUNT   = 0x4000,
-        FORMAT          = 0x4001,
-        // for TARGET RESAMPLE
-        SAMPLE_RATE     = 0x4100,
-        // for TARGET VOLUME (8 channels max)
-        VOLUME0         = 0x4200,
-        VOLUME1         = 0x4201,
-    };
-
-
-    int         getTrackName();
-    void        deleteTrackName(int name);
-
-    status_t    enable(int name);
-    status_t    disable(int name);
-
-    status_t    setActiveTrack(int track);
-    status_t    setParameter(int target, int name, int value);
-
-    status_t    setBufferProvider(AudioBufferProvider* bufferProvider);
-    void        process(void* output);
-
-    uint32_t    trackNames() const { return mTrackNames; }
-
-    static void ditherAndClamp(int32_t* out, int32_t const *sums, size_t c);
-
-private:
-
-    enum {
-        NEEDS_CHANNEL_COUNT__MASK   = 0x00000003,
-        NEEDS_FORMAT__MASK          = 0x000000F0,
-        NEEDS_MUTE__MASK            = 0x00000100,
-        NEEDS_RESAMPLE__MASK        = 0x00001000,
-    };
-
-    enum {
-        NEEDS_CHANNEL_1             = 0x00000000,
-        NEEDS_CHANNEL_2             = 0x00000001,
-
-        NEEDS_FORMAT_16             = 0x00000010,
-
-        NEEDS_MUTE_DISABLED         = 0x00000000,
-        NEEDS_MUTE_ENABLED          = 0x00000100,
-
-        NEEDS_RESAMPLE_DISABLED     = 0x00000000,
-        NEEDS_RESAMPLE_ENABLED      = 0x00001000,
-    };
-
-    static inline int32_t applyVolume(int32_t in, int32_t v) {
-        return in * v;
-    }
-
-
-    struct state_t;
-
-    typedef void (*mix_t)(state_t* state, void* output);
-
-    static const int BLOCKSIZE = 16; // 4 cache lines
-
-    struct track_t {
-        uint32_t    needs;
-
-        union {
-        int16_t     volume[2];      // [0]3.12 fixed point
-        int32_t     volumeRL;
-        };
-
-        int32_t     prevVolume[2];
-
-        int32_t     volumeInc[2];
-
-        uint16_t    frameCount;
-
-        uint8_t     channelCount : 4;
-        uint8_t     enabled      : 1;
-        uint8_t     reserved0    : 3;
-        uint8_t     format;
-
-        AudioBufferProvider*                bufferProvider;
-        mutable AudioBufferProvider::Buffer buffer;
-
-        void (*hook)(track_t* t, int32_t* output, size_t numOutFrames, int32_t* temp);
-        void const* in;             // current location in buffer
-
-        AudioResampler*     resampler;
-        uint32_t            sampleRate;
-
-        bool        setResampler(uint32_t sampleRate, uint32_t devSampleRate);
-        bool        doesResample() const;
-        void        adjustVolumeRamp();
-    };
-
-    // pad to 32-bytes to fill cache line
-    struct state_t {
-        uint32_t        enabledTracks;
-        uint32_t        needsChanged;
-        size_t          frameCount;
-        mix_t           hook;
-        int32_t         *outputTemp;
-        int32_t         *resampleTemp;
-        int32_t         reserved[2];
-        track_t         tracks[32]; __attribute__((aligned(32)));
-    };
-
-    int             mActiveTrack;
-    uint32_t        mTrackNames;
-    const uint32_t  mSampleRate;
-
-    state_t         mState __attribute__((aligned(32)));
-
-    void invalidateState(uint32_t mask);
-
-    static void track__genericResample(track_t* t, int32_t* out, size_t numFrames, int32_t* temp);
-    static void track__nop(track_t* t, int32_t* out, size_t numFrames, int32_t* temp);
-    static void volumeRampStereo(track_t* t, int32_t* out, size_t frameCount, int32_t* temp);
-    static void track__16BitsStereo(track_t* t, int32_t* out, size_t numFrames, int32_t* temp);
-    static void track__16BitsMono(track_t* t, int32_t* out, size_t numFrames, int32_t* temp);
-
-    static void process__validate(state_t* state, void* output);
-    static void process__nop(state_t* state, void* output);
-    static void process__genericNoResampling(state_t* state, void* output);
-    static void process__genericResampling(state_t* state, void* output);
-    static void process__OneTrack16BitsStereoNoResampling(state_t* state, void* output);
-    static void process__TwoTracks16BitsStereoNoResampling(state_t* state, void* output);
-};
-
-// ----------------------------------------------------------------------------
-}; // namespace android
-
-#endif // ANDROID_AUDIO_MIXER_H
diff --git a/libs/audioflinger/AudioPolicyManagerBase.cpp b/libs/audioflinger/AudioPolicyManagerBase.cpp
deleted file mode 100644
index c8b3f48..0000000
--- a/libs/audioflinger/AudioPolicyManagerBase.cpp
+++ /dev/null
@@ -1,1972 +0,0 @@
-/*
- * Copyright (C) 2009 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#define LOG_TAG "AudioPolicyManagerBase"
-//#define LOG_NDEBUG 0
-#include <utils/Log.h>
-#include <hardware_legacy/AudioPolicyManagerBase.h>
-#include <media/mediarecorder.h>
-
-namespace android {
-
-
-// ----------------------------------------------------------------------------
-// AudioPolicyInterface implementation
-// ----------------------------------------------------------------------------
-
-
-status_t AudioPolicyManagerBase::setDeviceConnectionState(AudioSystem::audio_devices device,
-                                                  AudioSystem::device_connection_state state,
-                                                  const char *device_address)
-{
-
-    LOGV("setDeviceConnectionState() device: %x, state %d, address %s", device, state, device_address);
-
-    // connect/disconnect only 1 device at a time
-    if (AudioSystem::popCount(device) != 1) return BAD_VALUE;
-
-    if (strlen(device_address) >= MAX_DEVICE_ADDRESS_LEN) {
-        LOGE("setDeviceConnectionState() invalid address: %s", device_address);
-        return BAD_VALUE;
-    }
-
-    // handle output devices
-    if (AudioSystem::isOutputDevice(device)) {
-
-#ifndef WITH_A2DP
-        if (AudioSystem::isA2dpDevice(device)) {
-            LOGE("setDeviceConnectionState() invalid device: %x", device);
-            return BAD_VALUE;
-        }
-#endif
-
-        switch (state)
-        {
-        // handle output device connection
-        case AudioSystem::DEVICE_STATE_AVAILABLE:
-            if (mAvailableOutputDevices & device) {
-                LOGW("setDeviceConnectionState() device already connected: %x", device);
-                return INVALID_OPERATION;
-            }
-            LOGV("setDeviceConnectionState() connecting device %x", device);
-
-            // register new device as available
-            mAvailableOutputDevices |= device;
-
-#ifdef WITH_A2DP
-            // handle A2DP device connection
-            if (AudioSystem::isA2dpDevice(device)) {
-                status_t status = handleA2dpConnection(device, device_address);
-                if (status != NO_ERROR) {
-                    mAvailableOutputDevices &= ~device;
-                    return status;
-                }
-            } else
-#endif
-            {
-                if (AudioSystem::isBluetoothScoDevice(device)) {
-                    LOGV("setDeviceConnectionState() BT SCO  device, address %s", device_address);
-                    // keep track of SCO device address
-                    mScoDeviceAddress = String8(device_address, MAX_DEVICE_ADDRESS_LEN);
-#ifdef WITH_A2DP
-                    if (mA2dpOutput != 0 &&
-                        mPhoneState != AudioSystem::MODE_NORMAL) {
-                        mpClientInterface->suspendOutput(mA2dpOutput);
-                    }
-#endif
-                }
-            }
-            break;
-        // handle output device disconnection
-        case AudioSystem::DEVICE_STATE_UNAVAILABLE: {
-            if (!(mAvailableOutputDevices & device)) {
-                LOGW("setDeviceConnectionState() device not connected: %x", device);
-                return INVALID_OPERATION;
-            }
-
-
-            LOGV("setDeviceConnectionState() disconnecting device %x", device);
-            // remove device from available output devices
-            mAvailableOutputDevices &= ~device;
-
-#ifdef WITH_A2DP
-            // handle A2DP device disconnection
-            if (AudioSystem::isA2dpDevice(device)) {
-                status_t status = handleA2dpDisconnection(device, device_address);
-                if (status != NO_ERROR) {
-                    mAvailableOutputDevices |= device;
-                    return status;
-                }
-            } else
-#endif
-            {
-                if (AudioSystem::isBluetoothScoDevice(device)) {
-                    mScoDeviceAddress = "";
-#ifdef WITH_A2DP
-                    if (mA2dpOutput != 0 &&
-                        mPhoneState != AudioSystem::MODE_NORMAL) {
-                        mpClientInterface->restoreOutput(mA2dpOutput);
-                    }
-#endif
-                }
-            }
-            } break;
-
-        default:
-            LOGE("setDeviceConnectionState() invalid state: %x", state);
-            return BAD_VALUE;
-        }
-
-        // request routing change if necessary
-        uint32_t newDevice = getNewDevice(mHardwareOutput, false);
-#ifdef WITH_A2DP
-        checkOutputForAllStrategies(newDevice);
-        // A2DP outputs must be closed after checkOutputForAllStrategies() is executed
-        if (state == AudioSystem::DEVICE_STATE_UNAVAILABLE && AudioSystem::isA2dpDevice(device)) {
-            closeA2dpOutputs();
-        }
-#endif
-        updateDeviceForStrategy();
-        setOutputDevice(mHardwareOutput, newDevice);
-
-        if (device == AudioSystem::DEVICE_OUT_WIRED_HEADSET) {
-            device = AudioSystem::DEVICE_IN_WIRED_HEADSET;
-        } else if (device == AudioSystem::DEVICE_OUT_BLUETOOTH_SCO ||
-                   device == AudioSystem::DEVICE_OUT_BLUETOOTH_SCO_HEADSET ||
-                   device == AudioSystem::DEVICE_OUT_BLUETOOTH_SCO_CARKIT) {
-            device = AudioSystem::DEVICE_IN_BLUETOOTH_SCO_HEADSET;
-        } else {
-            return NO_ERROR;
-        }
-    }
-    // handle input devices
-    if (AudioSystem::isInputDevice(device)) {
-
-        switch (state)
-        {
-        // handle input device connection
-        case AudioSystem::DEVICE_STATE_AVAILABLE: {
-            if (mAvailableInputDevices & device) {
-                LOGW("setDeviceConnectionState() device already connected: %d", device);
-                return INVALID_OPERATION;
-            }
-            mAvailableInputDevices |= device;
-            }
-            break;
-
-        // handle input device disconnection
-        case AudioSystem::DEVICE_STATE_UNAVAILABLE: {
-            if (!(mAvailableInputDevices & device)) {
-                LOGW("setDeviceConnectionState() device not connected: %d", device);
-                return INVALID_OPERATION;
-            }
-            mAvailableInputDevices &= ~device;
-            } break;
-
-        default:
-            LOGE("setDeviceConnectionState() invalid state: %x", state);
-            return BAD_VALUE;
-        }
-
-        audio_io_handle_t activeInput = getActiveInput();
-        if (activeInput != 0) {
-            AudioInputDescriptor *inputDesc = mInputs.valueFor(activeInput);
-            uint32_t newDevice = getDeviceForInputSource(inputDesc->mInputSource);
-            if (newDevice != inputDesc->mDevice) {
-                LOGV("setDeviceConnectionState() changing device from %x to %x for input %d",
-                        inputDesc->mDevice, newDevice, activeInput);
-                inputDesc->mDevice = newDevice;
-                AudioParameter param = AudioParameter();
-                param.addInt(String8(AudioParameter::keyRouting), (int)newDevice);
-                mpClientInterface->setParameters(activeInput, param.toString());
-            }
-        }
-
-        return NO_ERROR;
-    }
-
-    LOGW("setDeviceConnectionState() invalid device: %x", device);
-    return BAD_VALUE;
-}
-
-AudioSystem::device_connection_state AudioPolicyManagerBase::getDeviceConnectionState(AudioSystem::audio_devices device,
-                                                  const char *device_address)
-{
-    AudioSystem::device_connection_state state = AudioSystem::DEVICE_STATE_UNAVAILABLE;
-    String8 address = String8(device_address);
-    if (AudioSystem::isOutputDevice(device)) {
-        if (device & mAvailableOutputDevices) {
-#ifdef WITH_A2DP
-            if (AudioSystem::isA2dpDevice(device) &&
-                address != "" && mA2dpDeviceAddress != address) {
-                return state;
-            }
-#endif
-            if (AudioSystem::isBluetoothScoDevice(device) &&
-                address != "" && mScoDeviceAddress != address) {
-                return state;
-            }
-            state = AudioSystem::DEVICE_STATE_AVAILABLE;
-        }
-    } else if (AudioSystem::isInputDevice(device)) {
-        if (device & mAvailableInputDevices) {
-            state = AudioSystem::DEVICE_STATE_AVAILABLE;
-        }
-    }
-
-    return state;
-}
-
-void AudioPolicyManagerBase::setPhoneState(int state)
-{
-    LOGV("setPhoneState() state %d", state);
-    uint32_t newDevice = 0;
-    if (state < 0 || state >= AudioSystem::NUM_MODES) {
-        LOGW("setPhoneState() invalid state %d", state);
-        return;
-    }
-
-    if (state == mPhoneState ) {
-        LOGW("setPhoneState() setting same state %d", state);
-        return;
-    }
-
-    // if leaving call state, handle special case of active streams
-    // pertaining to sonification strategy see handleIncallSonification()
-    if (mPhoneState == AudioSystem::MODE_IN_CALL) {
-        LOGV("setPhoneState() in call state management: new state is %d", state);
-        for (int stream = 0; stream < AudioSystem::NUM_STREAM_TYPES; stream++) {
-            handleIncallSonification(stream, false, true);
-        }
-    }
-
-    // store previous phone state for management of sonification strategy below
-    int oldState = mPhoneState;
-    mPhoneState = state;
-    bool force = false;
-
-    // are we entering or starting a call
-    if ((oldState != AudioSystem::MODE_IN_CALL) && (state == AudioSystem::MODE_IN_CALL)) {
-        LOGV("  Entering call in setPhoneState()");
-        // force routing command to audio hardware when starting a call
-        // even if no device change is needed
-        force = true;
-    } else if ((oldState == AudioSystem::MODE_IN_CALL) && (state != AudioSystem::MODE_IN_CALL)) {
-        LOGV("  Exiting call in setPhoneState()");
-        // force routing command to audio hardware when exiting a call
-        // even if no device change is needed
-        force = true;
-    }
-
-    // check for device and output changes triggered by new phone state
-    newDevice = getNewDevice(mHardwareOutput, false);
-#ifdef WITH_A2DP
-    checkOutputForAllStrategies(newDevice);
-    // suspend A2DP output if a SCO device is present.
-    if (mA2dpOutput != 0 && mScoDeviceAddress != "") {
-        if (oldState == AudioSystem::MODE_NORMAL) {
-            mpClientInterface->suspendOutput(mA2dpOutput);
-        } else if (state == AudioSystem::MODE_NORMAL) {
-            mpClientInterface->restoreOutput(mA2dpOutput);
-        }
-    }
-#endif
-    updateDeviceForStrategy();
-
-    AudioOutputDescriptor *hwOutputDesc = mOutputs.valueFor(mHardwareOutput);
-
-    // force routing command to audio hardware when ending call
-    // even if no device change is needed
-    if (oldState == AudioSystem::MODE_IN_CALL && newDevice == 0) {
-        newDevice = hwOutputDesc->device();
-    }
-
-    // when changing from ring tone to in call mode, mute the ringing tone
-    // immediately and delay the route change to avoid sending the ring tone
-    // tail into the earpiece or headset.
-    int delayMs = 0;
-    if (state == AudioSystem::MODE_IN_CALL && oldState == AudioSystem::MODE_RINGTONE) {
-        // delay the device change command by twice the output latency to have some margin
-        // and be sure that audio buffers not yet affected by the mute are out when
-        // we actually apply the route change
-        delayMs = hwOutputDesc->mLatency*2;
-        setStreamMute(AudioSystem::RING, true, mHardwareOutput);
-    }
-
-    // change routing is necessary
-    setOutputDevice(mHardwareOutput, newDevice, force, delayMs);
-
-    // if entering in call state, handle special case of active streams
-    // pertaining to sonification strategy see handleIncallSonification()
-    if (state == AudioSystem::MODE_IN_CALL) {
-        LOGV("setPhoneState() in call state management: new state is %d", state);
-        // unmute the ringing tone after a sufficient delay if it was muted before
-        // setting output device above
-        if (oldState == AudioSystem::MODE_RINGTONE) {
-            setStreamMute(AudioSystem::RING, false, mHardwareOutput, MUTE_TIME_MS);
-        }
-        for (int stream = 0; stream < AudioSystem::NUM_STREAM_TYPES; stream++) {
-            handleIncallSonification(stream, true, true);
-        }
-    }
-
-    // Flag that ringtone volume must be limited to music volume until we exit MODE_RINGTONE
-    if (state == AudioSystem::MODE_RINGTONE &&
-        (hwOutputDesc->mRefCount[AudioSystem::MUSIC] ||
-        (systemTime() - mMusicStopTime) < seconds(SONIFICATION_HEADSET_MUSIC_DELAY))) {
-        mLimitRingtoneVolume = true;
-    } else {
-        mLimitRingtoneVolume = false;
-    }
-}
-
-void AudioPolicyManagerBase::setRingerMode(uint32_t mode, uint32_t mask)
-{
-    LOGV("setRingerMode() mode %x, mask %x", mode, mask);
-
-    mRingerMode = mode;
-}
-
-void AudioPolicyManagerBase::setForceUse(AudioSystem::force_use usage, AudioSystem::forced_config config)
-{
-    LOGV("setForceUse() usage %d, config %d, mPhoneState %d", usage, config, mPhoneState);
-
-    bool forceVolumeReeval = false;
-    switch(usage) {
-    case AudioSystem::FOR_COMMUNICATION:
-        if (config != AudioSystem::FORCE_SPEAKER && config != AudioSystem::FORCE_BT_SCO &&
-            config != AudioSystem::FORCE_NONE) {
-            LOGW("setForceUse() invalid config %d for FOR_COMMUNICATION", config);
-            return;
-        }
-        mForceUse[usage] = config;
-        break;
-    case AudioSystem::FOR_MEDIA:
-        if (config != AudioSystem::FORCE_HEADPHONES && config != AudioSystem::FORCE_BT_A2DP &&
-            config != AudioSystem::FORCE_WIRED_ACCESSORY && config != AudioSystem::FORCE_NONE) {
-            LOGW("setForceUse() invalid config %d for FOR_MEDIA", config);
-            return;
-        }
-        mForceUse[usage] = config;
-        break;
-    case AudioSystem::FOR_RECORD:
-        if (config != AudioSystem::FORCE_BT_SCO && config != AudioSystem::FORCE_WIRED_ACCESSORY &&
-            config != AudioSystem::FORCE_NONE) {
-            LOGW("setForceUse() invalid config %d for FOR_RECORD", config);
-            return;
-        }
-        mForceUse[usage] = config;
-        break;
-    case AudioSystem::FOR_DOCK:
-        if (config != AudioSystem::FORCE_NONE && config != AudioSystem::FORCE_BT_CAR_DOCK &&
-            config != AudioSystem::FORCE_BT_DESK_DOCK && config != AudioSystem::FORCE_WIRED_ACCESSORY) {
-            LOGW("setForceUse() invalid config %d for FOR_DOCK", config);
-        }
-        forceVolumeReeval = true;
-        mForceUse[usage] = config;
-        break;
-    default:
-        LOGW("setForceUse() invalid usage %d", usage);
-        break;
-    }
-
-    // check for device and output changes triggered by new phone state
-    uint32_t newDevice = getNewDevice(mHardwareOutput, false);
-#ifdef WITH_A2DP
-    checkOutputForAllStrategies(newDevice);
-#endif
-    updateDeviceForStrategy();
-    setOutputDevice(mHardwareOutput, newDevice);
-    if (forceVolumeReeval) {
-        applyStreamVolumes(mHardwareOutput, newDevice);
-    }
-}
-
-AudioSystem::forced_config AudioPolicyManagerBase::getForceUse(AudioSystem::force_use usage)
-{
-    return mForceUse[usage];
-}
-
-void AudioPolicyManagerBase::setSystemProperty(const char* property, const char* value)
-{
-    LOGV("setSystemProperty() property %s, value %s", property, value);
-    if (strcmp(property, "ro.camera.sound.forced") == 0) {
-        if (atoi(value)) {
-            LOGV("ENFORCED_AUDIBLE cannot be muted");
-            mStreams[AudioSystem::ENFORCED_AUDIBLE].mCanBeMuted = false;
-        } else {
-            LOGV("ENFORCED_AUDIBLE can be muted");
-            mStreams[AudioSystem::ENFORCED_AUDIBLE].mCanBeMuted = true;
-        }
-    }
-}
-
-audio_io_handle_t AudioPolicyManagerBase::getOutput(AudioSystem::stream_type stream,
-                                    uint32_t samplingRate,
-                                    uint32_t format,
-                                    uint32_t channels,
-                                    AudioSystem::output_flags flags)
-{
-    audio_io_handle_t output = 0;
-    uint32_t latency = 0;
-    routing_strategy strategy = getStrategy((AudioSystem::stream_type)stream);
-    uint32_t device = getDeviceForStrategy(strategy);
-    LOGV("getOutput() stream %d, samplingRate %d, format %d, channels %x, flags %x", stream, samplingRate, format, channels, flags);
-
-#ifdef AUDIO_POLICY_TEST
-    if (mCurOutput != 0) {
-        LOGV("getOutput() test output mCurOutput %d, samplingRate %d, format %d, channels %x, mDirectOutput %d",
-                mCurOutput, mTestSamplingRate, mTestFormat, mTestChannels, mDirectOutput);
-
-        if (mTestOutputs[mCurOutput] == 0) {
-            LOGV("getOutput() opening test output");
-            AudioOutputDescriptor *outputDesc = new AudioOutputDescriptor();
-            outputDesc->mDevice = mTestDevice;
-            outputDesc->mSamplingRate = mTestSamplingRate;
-            outputDesc->mFormat = mTestFormat;
-            outputDesc->mChannels = mTestChannels;
-            outputDesc->mLatency = mTestLatencyMs;
-            outputDesc->mFlags = (AudioSystem::output_flags)(mDirectOutput ? AudioSystem::OUTPUT_FLAG_DIRECT : 0);
-            outputDesc->mRefCount[stream] = 0;
-            mTestOutputs[mCurOutput] = mpClientInterface->openOutput(&outputDesc->mDevice,
-                                            &outputDesc->mSamplingRate,
-                                            &outputDesc->mFormat,
-                                            &outputDesc->mChannels,
-                                            &outputDesc->mLatency,
-                                            outputDesc->mFlags);
-            if (mTestOutputs[mCurOutput]) {
-                AudioParameter outputCmd = AudioParameter();
-                outputCmd.addInt(String8("set_id"),mCurOutput);
-                mpClientInterface->setParameters(mTestOutputs[mCurOutput],outputCmd.toString());
-                addOutput(mTestOutputs[mCurOutput], outputDesc);
-            }
-        }
-        return mTestOutputs[mCurOutput];
-    }
-#endif //AUDIO_POLICY_TEST
-
-    // open a direct output if required by specified parameters
-    if (needsDirectOuput(stream, samplingRate, format, channels, flags, device)) {
-
-        LOGV("getOutput() opening direct output device %x", device);
-        AudioOutputDescriptor *outputDesc = new AudioOutputDescriptor();
-        outputDesc->mDevice = device;
-        outputDesc->mSamplingRate = samplingRate;
-        outputDesc->mFormat = format;
-        outputDesc->mChannels = channels;
-        outputDesc->mLatency = 0;
-        outputDesc->mFlags = (AudioSystem::output_flags)(flags | AudioSystem::OUTPUT_FLAG_DIRECT);
-        outputDesc->mRefCount[stream] = 0;
-        output = mpClientInterface->openOutput(&outputDesc->mDevice,
-                                        &outputDesc->mSamplingRate,
-                                        &outputDesc->mFormat,
-                                        &outputDesc->mChannels,
-                                        &outputDesc->mLatency,
-                                        outputDesc->mFlags);
-
-        // only accept an output with the requeted parameters
-        if (output == 0 ||
-            (samplingRate != 0 && samplingRate != outputDesc->mSamplingRate) ||
-            (format != 0 && format != outputDesc->mFormat) ||
-            (channels != 0 && channels != outputDesc->mChannels)) {
-            LOGV("getOutput() failed opening direct output: samplingRate %d, format %d, channels %d",
-                    samplingRate, format, channels);
-            if (output != 0) {
-                mpClientInterface->closeOutput(output);
-            }
-            delete outputDesc;
-            return 0;
-        }
-        addOutput(output, outputDesc);
-        return output;
-    }
-
-    if (channels != 0 && channels != AudioSystem::CHANNEL_OUT_MONO &&
-        channels != AudioSystem::CHANNEL_OUT_STEREO) {
-        return 0;
-    }
-    // open a non direct output
-
-    // get which output is suitable for the specified stream. The actual routing change will happen
-    // when startOutput() will be called
-    uint32_t a2dpDevice = device & AudioSystem::DEVICE_OUT_ALL_A2DP;
-    if (AudioSystem::popCount((AudioSystem::audio_devices)device) == 2) {
-#ifdef WITH_A2DP
-        if (a2dpUsedForSonification() && a2dpDevice != 0) {
-            // if playing on 2 devices among which one is A2DP, use duplicated output
-            LOGV("getOutput() using duplicated output");
-            LOGW_IF((mA2dpOutput == 0), "getOutput() A2DP device in multiple %x selected but A2DP output not opened", device);
-            output = mDuplicatedOutput;
-        } else
-#endif
-        {
-            // if playing on 2 devices among which none is A2DP, use hardware output
-            output = mHardwareOutput;
-        }
-        LOGV("getOutput() using output %d for 2 devices %x", output, device);
-    } else {
-#ifdef WITH_A2DP
-        if (a2dpDevice != 0) {
-            // if playing on A2DP device, use a2dp output
-            LOGW_IF((mA2dpOutput == 0), "getOutput() A2DP device %x selected but A2DP output not opened", device);
-            output = mA2dpOutput;
-        } else
-#endif
-        {
-            // if playing on not A2DP device, use hardware output
-            output = mHardwareOutput;
-        }
-    }
-
-
-    LOGW_IF((output ==0), "getOutput() could not find output for stream %d, samplingRate %d, format %d, channels %x, flags %x",
-                stream, samplingRate, format, channels, flags);
-
-    return output;
-}
-
-status_t AudioPolicyManagerBase::startOutput(audio_io_handle_t output, AudioSystem::stream_type stream)
-{
-    LOGV("startOutput() output %d, stream %d", output, stream);
-    ssize_t index = mOutputs.indexOfKey(output);
-    if (index < 0) {
-        LOGW("startOutput() unknow output %d", output);
-        return BAD_VALUE;
-    }
-
-    AudioOutputDescriptor *outputDesc = mOutputs.valueAt(index);
-    routing_strategy strategy = getStrategy((AudioSystem::stream_type)stream);
-
-#ifdef WITH_A2DP
-    if (mA2dpOutput != 0  && !a2dpUsedForSonification() && strategy == STRATEGY_SONIFICATION) {
-        setStrategyMute(STRATEGY_MEDIA, true, mA2dpOutput);
-    }
-#endif
-
-    // incremenent usage count for this stream on the requested output:
-    // NOTE that the usage count is the same for duplicated output and hardware output which is
-    // necassary for a correct control of hardware output routing by startOutput() and stopOutput()
-    outputDesc->changeRefCount(stream, 1);
-
-    setOutputDevice(output, getNewDevice(output));
-
-    // handle special case for sonification while in call
-    if (mPhoneState == AudioSystem::MODE_IN_CALL) {
-        handleIncallSonification(stream, true, false);
-    }
-
-    // apply volume rules for current stream and device if necessary
-    checkAndSetVolume(stream, mStreams[stream].mIndexCur, output, outputDesc->device());
-
-    return NO_ERROR;
-}
-
-status_t AudioPolicyManagerBase::stopOutput(audio_io_handle_t output, AudioSystem::stream_type stream)
-{
-    LOGV("stopOutput() output %d, stream %d", output, stream);
-    ssize_t index = mOutputs.indexOfKey(output);
-    if (index < 0) {
-        LOGW("stopOutput() unknow output %d", output);
-        return BAD_VALUE;
-    }
-
-    AudioOutputDescriptor *outputDesc = mOutputs.valueAt(index);
-    routing_strategy strategy = getStrategy((AudioSystem::stream_type)stream);
-
-    // handle special case for sonification while in call
-    if (mPhoneState == AudioSystem::MODE_IN_CALL) {
-        handleIncallSonification(stream, false, false);
-    }
-
-    if (outputDesc->mRefCount[stream] > 0) {
-        // decrement usage count of this stream on the output
-        outputDesc->changeRefCount(stream, -1);
-        // store time at which the last music track was stopped - see computeVolume()
-        if (stream == AudioSystem::MUSIC) {
-            mMusicStopTime = systemTime();
-        }
-
-        setOutputDevice(output, getNewDevice(output));
-
-#ifdef WITH_A2DP
-        if (mA2dpOutput != 0 && !a2dpUsedForSonification() && strategy == STRATEGY_SONIFICATION) {
-            setStrategyMute(STRATEGY_MEDIA, false, mA2dpOutput, mOutputs.valueFor(mHardwareOutput)->mLatency*2);
-        }
-#endif
-        if (output != mHardwareOutput) {
-            setOutputDevice(mHardwareOutput, getNewDevice(mHardwareOutput), true);
-        }
-        return NO_ERROR;
-    } else {
-        LOGW("stopOutput() refcount is already 0 for output %d", output);
-        return INVALID_OPERATION;
-    }
-}
-
-void AudioPolicyManagerBase::releaseOutput(audio_io_handle_t output)
-{
-    LOGV("releaseOutput() %d", output);
-    ssize_t index = mOutputs.indexOfKey(output);
-    if (index < 0) {
-        LOGW("releaseOutput() releasing unknown output %d", output);
-        return;
-    }
-
-#ifdef AUDIO_POLICY_TEST
-    int testIndex = testOutputIndex(output);
-    if (testIndex != 0) {
-        AudioOutputDescriptor *outputDesc = mOutputs.valueAt(index);
-        if (outputDesc->refCount() == 0) {
-            mpClientInterface->closeOutput(output);
-            delete mOutputs.valueAt(index);
-            mOutputs.removeItem(output);
-            mTestOutputs[testIndex] = 0;
-        }
-        return;
-    }
-#endif //AUDIO_POLICY_TEST
-
-    if (mOutputs.valueAt(index)->mFlags & AudioSystem::OUTPUT_FLAG_DIRECT) {
-        mpClientInterface->closeOutput(output);
-        delete mOutputs.valueAt(index);
-        mOutputs.removeItem(output);
-    }
-}
-
-audio_io_handle_t AudioPolicyManagerBase::getInput(int inputSource,
-                                    uint32_t samplingRate,
-                                    uint32_t format,
-                                    uint32_t channels,
-                                    AudioSystem::audio_in_acoustics acoustics)
-{
-    audio_io_handle_t input = 0;
-    uint32_t device = getDeviceForInputSource(inputSource);
-
-    LOGV("getInput() inputSource %d, samplingRate %d, format %d, channels %x, acoustics %x", inputSource, samplingRate, format, channels, acoustics);
-
-    if (device == 0) {
-        return 0;
-    }
-
-    // adapt channel selection to input source
-    switch(inputSource) {
-    case AUDIO_SOURCE_VOICE_UPLINK:
-        channels = AudioSystem::CHANNEL_IN_VOICE_UPLINK;
-        break;
-    case AUDIO_SOURCE_VOICE_DOWNLINK:
-        channels = AudioSystem::CHANNEL_IN_VOICE_DNLINK;
-        break;
-    case AUDIO_SOURCE_VOICE_CALL:
-        channels = (AudioSystem::CHANNEL_IN_VOICE_UPLINK | AudioSystem::CHANNEL_IN_VOICE_DNLINK);
-        break;
-    default:
-        break;
-    }
-
-    AudioInputDescriptor *inputDesc = new AudioInputDescriptor();
-
-    inputDesc->mInputSource = inputSource;
-    inputDesc->mDevice = device;
-    inputDesc->mSamplingRate = samplingRate;
-    inputDesc->mFormat = format;
-    inputDesc->mChannels = channels;
-    inputDesc->mAcoustics = acoustics;
-    inputDesc->mRefCount = 0;
-    input = mpClientInterface->openInput(&inputDesc->mDevice,
-                                    &inputDesc->mSamplingRate,
-                                    &inputDesc->mFormat,
-                                    &inputDesc->mChannels,
-                                    inputDesc->mAcoustics);
-
-    // only accept input with the exact requested set of parameters
-    if (input == 0 ||
-        (samplingRate != inputDesc->mSamplingRate) ||
-        (format != inputDesc->mFormat) ||
-        (channels != inputDesc->mChannels)) {
-        LOGV("getInput() failed opening input: samplingRate %d, format %d, channels %d",
-                samplingRate, format, channels);
-        if (input != 0) {
-            mpClientInterface->closeInput(input);
-        }
-        delete inputDesc;
-        return 0;
-    }
-    mInputs.add(input, inputDesc);
-    return input;
-}
-
-status_t AudioPolicyManagerBase::startInput(audio_io_handle_t input)
-{
-    LOGV("startInput() input %d", input);
-    ssize_t index = mInputs.indexOfKey(input);
-    if (index < 0) {
-        LOGW("startInput() unknow input %d", input);
-        return BAD_VALUE;
-    }
-    AudioInputDescriptor *inputDesc = mInputs.valueAt(index);
-
-#ifdef AUDIO_POLICY_TEST
-    if (mTestInput == 0)
-#endif //AUDIO_POLICY_TEST
-    {
-        // refuse 2 active AudioRecord clients at the same time
-        if (getActiveInput() != 0) {
-            LOGW("startInput() input %d failed: other input already started", input);
-            return INVALID_OPERATION;
-        }
-    }
-
-    AudioParameter param = AudioParameter();
-    param.addInt(String8(AudioParameter::keyRouting), (int)inputDesc->mDevice);
-
-    // use Voice Recognition mode or not for this input based on input source
-    int vr_enabled = inputDesc->mInputSource == AUDIO_SOURCE_VOICE_RECOGNITION ? 1 : 0;
-    param.addInt(String8("vr_mode"), vr_enabled);
-    LOGV("AudioPolicyManager::startInput(%d), setting vr_mode to %d", inputDesc->mInputSource, vr_enabled);
-
-    mpClientInterface->setParameters(input, param.toString());
-
-    inputDesc->mRefCount = 1;
-    return NO_ERROR;
-}
-
-status_t AudioPolicyManagerBase::stopInput(audio_io_handle_t input)
-{
-    LOGV("stopInput() input %d", input);
-    ssize_t index = mInputs.indexOfKey(input);
-    if (index < 0) {
-        LOGW("stopInput() unknow input %d", input);
-        return BAD_VALUE;
-    }
-    AudioInputDescriptor *inputDesc = mInputs.valueAt(index);
-
-    if (inputDesc->mRefCount == 0) {
-        LOGW("stopInput() input %d already stopped", input);
-        return INVALID_OPERATION;
-    } else {
-        AudioParameter param = AudioParameter();
-        param.addInt(String8(AudioParameter::keyRouting), 0);
-        mpClientInterface->setParameters(input, param.toString());
-        inputDesc->mRefCount = 0;
-        return NO_ERROR;
-    }
-}
-
-void AudioPolicyManagerBase::releaseInput(audio_io_handle_t input)
-{
-    LOGV("releaseInput() %d", input);
-    ssize_t index = mInputs.indexOfKey(input);
-    if (index < 0) {
-        LOGW("releaseInput() releasing unknown input %d", input);
-        return;
-    }
-    mpClientInterface->closeInput(input);
-    delete mInputs.valueAt(index);
-    mInputs.removeItem(input);
-    LOGV("releaseInput() exit");
-}
-
-void AudioPolicyManagerBase::initStreamVolume(AudioSystem::stream_type stream,
-                                            int indexMin,
-                                            int indexMax)
-{
-    LOGV("initStreamVolume() stream %d, min %d, max %d", stream , indexMin, indexMax);
-    if (indexMin < 0 || indexMin >= indexMax) {
-        LOGW("initStreamVolume() invalid index limits for stream %d, min %d, max %d", stream , indexMin, indexMax);
-        return;
-    }
-    mStreams[stream].mIndexMin = indexMin;
-    mStreams[stream].mIndexMax = indexMax;
-}
-
-status_t AudioPolicyManagerBase::setStreamVolumeIndex(AudioSystem::stream_type stream, int index)
-{
-
-    if ((index < mStreams[stream].mIndexMin) || (index > mStreams[stream].mIndexMax)) {
-        return BAD_VALUE;
-    }
-
-    // Force max volume if stream cannot be muted
-    if (!mStreams[stream].mCanBeMuted) index = mStreams[stream].mIndexMax;
-
-    LOGV("setStreamVolumeIndex() stream %d, index %d", stream, index);
-    mStreams[stream].mIndexCur = index;
-
-    // compute and apply stream volume on all outputs according to connected device
-    status_t status = NO_ERROR;
-    for (size_t i = 0; i < mOutputs.size(); i++) {
-        status_t volStatus = checkAndSetVolume(stream, index, mOutputs.keyAt(i), mOutputs.valueAt(i)->device());
-        if (volStatus != NO_ERROR) {
-            status = volStatus;
-        }
-    }
-    return status;
-}
-
-status_t AudioPolicyManagerBase::getStreamVolumeIndex(AudioSystem::stream_type stream, int *index)
-{
-    if (index == 0) {
-        return BAD_VALUE;
-    }
-    LOGV("getStreamVolumeIndex() stream %d", stream);
-    *index =  mStreams[stream].mIndexCur;
-    return NO_ERROR;
-}
-
-status_t AudioPolicyManagerBase::dump(int fd)
-{
-    const size_t SIZE = 256;
-    char buffer[SIZE];
-    String8 result;
-
-    snprintf(buffer, SIZE, "\nAudioPolicyManager Dump: %p\n", this);
-    result.append(buffer);
-    snprintf(buffer, SIZE, " Hardware Output: %d\n", mHardwareOutput);
-    result.append(buffer);
-#ifdef WITH_A2DP
-    snprintf(buffer, SIZE, " A2DP Output: %d\n", mA2dpOutput);
-    result.append(buffer);
-    snprintf(buffer, SIZE, " Duplicated Output: %d\n", mDuplicatedOutput);
-    result.append(buffer);
-    snprintf(buffer, SIZE, " A2DP device address: %s\n", mA2dpDeviceAddress.string());
-    result.append(buffer);
-#endif
-    snprintf(buffer, SIZE, " SCO device address: %s\n", mScoDeviceAddress.string());
-    result.append(buffer);
-    snprintf(buffer, SIZE, " Output devices: %08x\n", mAvailableOutputDevices);
-    result.append(buffer);
-    snprintf(buffer, SIZE, " Input devices: %08x\n", mAvailableInputDevices);
-    result.append(buffer);
-    snprintf(buffer, SIZE, " Phone state: %d\n", mPhoneState);
-    result.append(buffer);
-    snprintf(buffer, SIZE, " Ringer mode: %d\n", mRingerMode);
-    result.append(buffer);
-    snprintf(buffer, SIZE, " Force use for communications %d\n", mForceUse[AudioSystem::FOR_COMMUNICATION]);
-    result.append(buffer);
-    snprintf(buffer, SIZE, " Force use for media %d\n", mForceUse[AudioSystem::FOR_MEDIA]);
-    result.append(buffer);
-    snprintf(buffer, SIZE, " Force use for record %d\n", mForceUse[AudioSystem::FOR_RECORD]);
-    result.append(buffer);
-    snprintf(buffer, SIZE, " Force use for dock %d\n", mForceUse[AudioSystem::FOR_DOCK]);
-    result.append(buffer);
-    write(fd, result.string(), result.size());
-
-    snprintf(buffer, SIZE, "\nOutputs dump:\n");
-    write(fd, buffer, strlen(buffer));
-    for (size_t i = 0; i < mOutputs.size(); i++) {
-        snprintf(buffer, SIZE, "- Output %d dump:\n", mOutputs.keyAt(i));
-        write(fd, buffer, strlen(buffer));
-        mOutputs.valueAt(i)->dump(fd);
-    }
-
-    snprintf(buffer, SIZE, "\nInputs dump:\n");
-    write(fd, buffer, strlen(buffer));
-    for (size_t i = 0; i < mInputs.size(); i++) {
-        snprintf(buffer, SIZE, "- Input %d dump:\n", mInputs.keyAt(i));
-        write(fd, buffer, strlen(buffer));
-        mInputs.valueAt(i)->dump(fd);
-    }
-
-    snprintf(buffer, SIZE, "\nStreams dump:\n");
-    write(fd, buffer, strlen(buffer));
-    snprintf(buffer, SIZE, " Stream  Index Min  Index Max  Index Cur  Can be muted\n");
-    write(fd, buffer, strlen(buffer));
-    for (size_t i = 0; i < AudioSystem::NUM_STREAM_TYPES; i++) {
-        snprintf(buffer, SIZE, " %02d", i);
-        mStreams[i].dump(buffer + 3, SIZE);
-        write(fd, buffer, strlen(buffer));
-    }
-
-    return NO_ERROR;
-}
-
-// ----------------------------------------------------------------------------
-// AudioPolicyManagerBase
-// ----------------------------------------------------------------------------
-
-AudioPolicyManagerBase::AudioPolicyManagerBase(AudioPolicyClientInterface *clientInterface)
-    :
-#ifdef AUDIO_POLICY_TEST
-    Thread(false),
-#endif //AUDIO_POLICY_TEST
-    mPhoneState(AudioSystem::MODE_NORMAL), mRingerMode(0), mMusicStopTime(0), mLimitRingtoneVolume(false)
-{
-    mpClientInterface = clientInterface;
-
-    for (int i = 0; i < AudioSystem::NUM_FORCE_USE; i++) {
-        mForceUse[i] = AudioSystem::FORCE_NONE;
-    }
-
-    // devices available by default are speaker, ear piece and microphone
-    mAvailableOutputDevices = AudioSystem::DEVICE_OUT_EARPIECE |
-                        AudioSystem::DEVICE_OUT_SPEAKER;
-    mAvailableInputDevices = AudioSystem::DEVICE_IN_BUILTIN_MIC;
-
-#ifdef WITH_A2DP
-    mA2dpOutput = 0;
-    mDuplicatedOutput = 0;
-    mA2dpDeviceAddress = String8("");
-#endif
-    mScoDeviceAddress = String8("");
-
-    // open hardware output
-    AudioOutputDescriptor *outputDesc = new AudioOutputDescriptor();
-    outputDesc->mDevice = (uint32_t)AudioSystem::DEVICE_OUT_SPEAKER;
-    mHardwareOutput = mpClientInterface->openOutput(&outputDesc->mDevice,
-                                    &outputDesc->mSamplingRate,
-                                    &outputDesc->mFormat,
-                                    &outputDesc->mChannels,
-                                    &outputDesc->mLatency,
-                                    outputDesc->mFlags);
-
-    if (mHardwareOutput == 0) {
-        LOGE("Failed to initialize hardware output stream, samplingRate: %d, format %d, channels %d",
-                outputDesc->mSamplingRate, outputDesc->mFormat, outputDesc->mChannels);
-    } else {
-        addOutput(mHardwareOutput, outputDesc);
-        setOutputDevice(mHardwareOutput, (uint32_t)AudioSystem::DEVICE_OUT_SPEAKER, true);
-    }
-
-    updateDeviceForStrategy();
-#ifdef AUDIO_POLICY_TEST
-    AudioParameter outputCmd = AudioParameter();
-    outputCmd.addInt(String8("set_id"), 0);
-    mpClientInterface->setParameters(mHardwareOutput, outputCmd.toString());
-
-    mTestDevice = AudioSystem::DEVICE_OUT_SPEAKER;
-    mTestSamplingRate = 44100;
-    mTestFormat = AudioSystem::PCM_16_BIT;
-    mTestChannels =  AudioSystem::CHANNEL_OUT_STEREO;
-    mTestLatencyMs = 0;
-    mCurOutput = 0;
-    mDirectOutput = false;
-    for (int i = 0; i < NUM_TEST_OUTPUTS; i++) {
-        mTestOutputs[i] = 0;
-    }
-
-    const size_t SIZE = 256;
-    char buffer[SIZE];
-    snprintf(buffer, SIZE, "AudioPolicyManagerTest");
-    run(buffer, ANDROID_PRIORITY_AUDIO);
-#endif //AUDIO_POLICY_TEST
-}
-
-AudioPolicyManagerBase::~AudioPolicyManagerBase()
-{
-#ifdef AUDIO_POLICY_TEST
-    exit();
-#endif //AUDIO_POLICY_TEST
-   for (size_t i = 0; i < mOutputs.size(); i++) {
-        mpClientInterface->closeOutput(mOutputs.keyAt(i));
-        delete mOutputs.valueAt(i);
-   }
-   mOutputs.clear();
-   for (size_t i = 0; i < mInputs.size(); i++) {
-        mpClientInterface->closeInput(mInputs.keyAt(i));
-        delete mInputs.valueAt(i);
-   }
-   mInputs.clear();
-}
-
-#ifdef AUDIO_POLICY_TEST
-bool AudioPolicyManagerBase::threadLoop()
-{
-    LOGV("entering threadLoop()");
-    while (!exitPending())
-    {
-        String8 command;
-        int valueInt;
-        String8 value;
-
-        Mutex::Autolock _l(mLock);
-        mWaitWorkCV.waitRelative(mLock, milliseconds(50));
-
-        command = mpClientInterface->getParameters(0, String8("test_cmd_policy"));
-        AudioParameter param = AudioParameter(command);
-
-        if (param.getInt(String8("test_cmd_policy"), valueInt) == NO_ERROR &&
-            valueInt != 0) {
-            LOGV("Test command %s received", command.string());
-            String8 target;
-            if (param.get(String8("target"), target) != NO_ERROR) {
-                target = "Manager";
-            }
-            if (param.getInt(String8("test_cmd_policy_output"), valueInt) == NO_ERROR) {
-                param.remove(String8("test_cmd_policy_output"));
-                mCurOutput = valueInt;
-            }
-            if (param.get(String8("test_cmd_policy_direct"), value) == NO_ERROR) {
-                param.remove(String8("test_cmd_policy_direct"));
-                if (value == "false") {
-                    mDirectOutput = false;
-                } else if (value == "true") {
-                    mDirectOutput = true;
-                }
-            }
-            if (param.getInt(String8("test_cmd_policy_input"), valueInt) == NO_ERROR) {
-                param.remove(String8("test_cmd_policy_input"));
-                mTestInput = valueInt;
-            }
-
-            if (param.get(String8("test_cmd_policy_format"), value) == NO_ERROR) {
-                param.remove(String8("test_cmd_policy_format"));
-                int format = AudioSystem::INVALID_FORMAT;
-                if (value == "PCM 16 bits") {
-                    format = AudioSystem::PCM_16_BIT;
-                } else if (value == "PCM 8 bits") {
-                    format = AudioSystem::PCM_8_BIT;
-                } else if (value == "Compressed MP3") {
-                    format = AudioSystem::MP3;
-                }
-                if (format != AudioSystem::INVALID_FORMAT) {
-                    if (target == "Manager") {
-                        mTestFormat = format;
-                    } else if (mTestOutputs[mCurOutput] != 0) {
-                        AudioParameter outputParam = AudioParameter();
-                        outputParam.addInt(String8("format"), format);
-                        mpClientInterface->setParameters(mTestOutputs[mCurOutput], outputParam.toString());
-                    }
-                }
-            }
-            if (param.get(String8("test_cmd_policy_channels"), value) == NO_ERROR) {
-                param.remove(String8("test_cmd_policy_channels"));
-                int channels = 0;
-
-                if (value == "Channels Stereo") {
-                    channels =  AudioSystem::CHANNEL_OUT_STEREO;
-                } else if (value == "Channels Mono") {
-                    channels =  AudioSystem::CHANNEL_OUT_MONO;
-                }
-                if (channels != 0) {
-                    if (target == "Manager") {
-                        mTestChannels = channels;
-                    } else if (mTestOutputs[mCurOutput] != 0) {
-                        AudioParameter outputParam = AudioParameter();
-                        outputParam.addInt(String8("channels"), channels);
-                        mpClientInterface->setParameters(mTestOutputs[mCurOutput], outputParam.toString());
-                    }
-                }
-            }
-            if (param.getInt(String8("test_cmd_policy_sampleRate"), valueInt) == NO_ERROR) {
-                param.remove(String8("test_cmd_policy_sampleRate"));
-                if (valueInt >= 0 && valueInt <= 96000) {
-                    int samplingRate = valueInt;
-                    if (target == "Manager") {
-                        mTestSamplingRate = samplingRate;
-                    } else if (mTestOutputs[mCurOutput] != 0) {
-                        AudioParameter outputParam = AudioParameter();
-                        outputParam.addInt(String8("sampling_rate"), samplingRate);
-                        mpClientInterface->setParameters(mTestOutputs[mCurOutput], outputParam.toString());
-                    }
-                }
-            }
-
-            if (param.get(String8("test_cmd_policy_reopen"), value) == NO_ERROR) {
-                param.remove(String8("test_cmd_policy_reopen"));
-
-                mpClientInterface->closeOutput(mHardwareOutput);
-                delete mOutputs.valueFor(mHardwareOutput);
-                mOutputs.removeItem(mHardwareOutput);
-
-                AudioOutputDescriptor *outputDesc = new AudioOutputDescriptor();
-                outputDesc->mDevice = (uint32_t)AudioSystem::DEVICE_OUT_SPEAKER;
-                mHardwareOutput = mpClientInterface->openOutput(&outputDesc->mDevice,
-                                                &outputDesc->mSamplingRate,
-                                                &outputDesc->mFormat,
-                                                &outputDesc->mChannels,
-                                                &outputDesc->mLatency,
-                                                outputDesc->mFlags);
-                if (mHardwareOutput == 0) {
-                    LOGE("Failed to reopen hardware output stream, samplingRate: %d, format %d, channels %d",
-                            outputDesc->mSamplingRate, outputDesc->mFormat, outputDesc->mChannels);
-                } else {
-                    AudioParameter outputCmd = AudioParameter();
-                    outputCmd.addInt(String8("set_id"), 0);
-                    mpClientInterface->setParameters(mHardwareOutput, outputCmd.toString());
-                    addOutput(mHardwareOutput, outputDesc);
-                }
-            }
-
-
-            mpClientInterface->setParameters(0, String8("test_cmd_policy="));
-        }
-    }
-    return false;
-}
-
-void AudioPolicyManagerBase::exit()
-{
-    {
-        AutoMutex _l(mLock);
-        requestExit();
-        mWaitWorkCV.signal();
-    }
-    requestExitAndWait();
-}
-
-int AudioPolicyManagerBase::testOutputIndex(audio_io_handle_t output)
-{
-    for (int i = 0; i < NUM_TEST_OUTPUTS; i++) {
-        if (output == mTestOutputs[i]) return i;
-    }
-    return 0;
-}
-#endif //AUDIO_POLICY_TEST
-
-// ---
-
-void AudioPolicyManagerBase::addOutput(audio_io_handle_t id, AudioOutputDescriptor *outputDesc)
-{
-    outputDesc->mId = id;
-    mOutputs.add(id, outputDesc);
-}
-
-
-#ifdef WITH_A2DP
-status_t AudioPolicyManagerBase::handleA2dpConnection(AudioSystem::audio_devices device,
-                                                 const char *device_address)
-{
-    // when an A2DP device is connected, open an A2DP and a duplicated output
-    LOGV("opening A2DP output for device %s", device_address);
-    AudioOutputDescriptor *outputDesc = new AudioOutputDescriptor();
-    outputDesc->mDevice = device;
-    mA2dpOutput = mpClientInterface->openOutput(&outputDesc->mDevice,
-                                            &outputDesc->mSamplingRate,
-                                            &outputDesc->mFormat,
-                                            &outputDesc->mChannels,
-                                            &outputDesc->mLatency,
-                                            outputDesc->mFlags);
-    if (mA2dpOutput) {
-        // add A2DP output descriptor
-        addOutput(mA2dpOutput, outputDesc);
-        // set initial stream volume for A2DP device
-        applyStreamVolumes(mA2dpOutput, device);
-        if (a2dpUsedForSonification()) {
-            mDuplicatedOutput = mpClientInterface->openDuplicateOutput(mA2dpOutput, mHardwareOutput);
-        }
-        if (mDuplicatedOutput != 0 ||
-            !a2dpUsedForSonification()) {
-            // If both A2DP and duplicated outputs are open, send device address to A2DP hardware
-            // interface
-            AudioParameter param;
-            param.add(String8("a2dp_sink_address"), String8(device_address));
-            mpClientInterface->setParameters(mA2dpOutput, param.toString());
-            mA2dpDeviceAddress = String8(device_address, MAX_DEVICE_ADDRESS_LEN);
-
-            if (a2dpUsedForSonification()) {
-                // add duplicated output descriptor
-                AudioOutputDescriptor *dupOutputDesc = new AudioOutputDescriptor();
-                dupOutputDesc->mOutput1 = mOutputs.valueFor(mHardwareOutput);
-                dupOutputDesc->mOutput2 = mOutputs.valueFor(mA2dpOutput);
-                dupOutputDesc->mSamplingRate = outputDesc->mSamplingRate;
-                dupOutputDesc->mFormat = outputDesc->mFormat;
-                dupOutputDesc->mChannels = outputDesc->mChannels;
-                dupOutputDesc->mLatency = outputDesc->mLatency;
-                addOutput(mDuplicatedOutput, dupOutputDesc);
-                applyStreamVolumes(mDuplicatedOutput, device);
-            }
-        } else {
-            LOGW("getOutput() could not open duplicated output for %d and %d",
-                    mHardwareOutput, mA2dpOutput);
-            mpClientInterface->closeOutput(mA2dpOutput);
-            mOutputs.removeItem(mA2dpOutput);
-            mA2dpOutput = 0;
-            delete outputDesc;
-            return NO_INIT;
-        }
-    } else {
-        LOGW("setDeviceConnectionState() could not open A2DP output for device %x", device);
-        delete outputDesc;
-        return NO_INIT;
-    }
-    AudioOutputDescriptor *hwOutputDesc = mOutputs.valueFor(mHardwareOutput);
-
-    if (mScoDeviceAddress != "") {
-        // It is normal to suspend twice if we are both in call,
-        // and have the hardware audio output routed to BT SCO
-        if (mPhoneState != AudioSystem::MODE_NORMAL) {
-            mpClientInterface->suspendOutput(mA2dpOutput);
-        }
-        if (AudioSystem::isBluetoothScoDevice((AudioSystem::audio_devices)hwOutputDesc->device())) {
-            mpClientInterface->suspendOutput(mA2dpOutput);
-        }
-    }
-
-    if (!a2dpUsedForSonification()) {
-        // mute music on A2DP output if a notification or ringtone is playing
-        uint32_t refCount = hwOutputDesc->strategyRefCount(STRATEGY_SONIFICATION);
-        for (uint32_t i = 0; i < refCount; i++) {
-            setStrategyMute(STRATEGY_MEDIA, true, mA2dpOutput);
-        }
-    }
-    return NO_ERROR;
-}
-
-status_t AudioPolicyManagerBase::handleA2dpDisconnection(AudioSystem::audio_devices device,
-                                                    const char *device_address)
-{
-    if (mA2dpOutput == 0) {
-        LOGW("setDeviceConnectionState() disconnecting A2DP and no A2DP output!");
-        return INVALID_OPERATION;
-    }
-
-    if (mA2dpDeviceAddress != device_address) {
-        LOGW("setDeviceConnectionState() disconnecting unknow A2DP sink address %s", device_address);
-        return INVALID_OPERATION;
-    }
-
-    // mute media strategy to avoid outputting sound on hardware output while music stream
-    // is switched from A2DP output and before music is paused by music application
-    setStrategyMute(STRATEGY_MEDIA, true, mHardwareOutput);
-    setStrategyMute(STRATEGY_MEDIA, false, mHardwareOutput, MUTE_TIME_MS);
-
-    if (!a2dpUsedForSonification()) {
-        // unmute music on A2DP output if a notification or ringtone is playing
-        uint32_t refCount = mOutputs.valueFor(mHardwareOutput)->strategyRefCount(STRATEGY_SONIFICATION);
-        for (uint32_t i = 0; i < refCount; i++) {
-            setStrategyMute(STRATEGY_MEDIA, false, mA2dpOutput);
-        }
-    }
-    mA2dpDeviceAddress = "";
-    return NO_ERROR;
-}
-
-void AudioPolicyManagerBase::closeA2dpOutputs()
-{
-    LOGV("setDeviceConnectionState() closing A2DP and duplicated output!");
-
-    if (mDuplicatedOutput != 0) {
-        mpClientInterface->closeOutput(mDuplicatedOutput);
-        delete mOutputs.valueFor(mDuplicatedOutput);
-        mOutputs.removeItem(mDuplicatedOutput);
-        mDuplicatedOutput = 0;
-    }
-    if (mA2dpOutput != 0) {
-        AudioParameter param;
-        param.add(String8("closing"), String8("true"));
-        mpClientInterface->setParameters(mA2dpOutput, param.toString());
-        mpClientInterface->closeOutput(mA2dpOutput);
-        delete mOutputs.valueFor(mA2dpOutput);
-        mOutputs.removeItem(mA2dpOutput);
-        mA2dpOutput = 0;
-    }
-}
-
-void AudioPolicyManagerBase::checkOutputForStrategy(routing_strategy strategy, uint32_t &newDevice)
-{
-    uint32_t prevDevice = getDeviceForStrategy(strategy);
-    uint32_t curDevice = getDeviceForStrategy(strategy, false);
-    bool a2dpWasUsed = AudioSystem::isA2dpDevice((AudioSystem::audio_devices)(prevDevice & ~AudioSystem::DEVICE_OUT_SPEAKER));
-    bool a2dpIsUsed = AudioSystem::isA2dpDevice((AudioSystem::audio_devices)(curDevice & ~AudioSystem::DEVICE_OUT_SPEAKER));
-    AudioOutputDescriptor *hwOutputDesc = mOutputs.valueFor(mHardwareOutput);
-    AudioOutputDescriptor *a2dpOutputDesc;
-
-    if (a2dpWasUsed && !a2dpIsUsed) {
-        bool dupUsed = a2dpUsedForSonification() && a2dpWasUsed && (AudioSystem::popCount(prevDevice) == 2);
-
-        if (dupUsed) {
-            LOGV("checkOutputForStrategy() moving strategy %d to duplicated", strategy);
-            a2dpOutputDesc = mOutputs.valueFor(mDuplicatedOutput);
-        } else {
-            LOGV("checkOutputForStrategy() moving strategy %d to a2dp", strategy);
-            a2dpOutputDesc = mOutputs.valueFor(mA2dpOutput);
-        }
-
-        for (int i = 0; i < (int)AudioSystem::NUM_STREAM_TYPES; i++) {
-            if (getStrategy((AudioSystem::stream_type)i) == strategy) {
-                mpClientInterface->setStreamOutput((AudioSystem::stream_type)i, mHardwareOutput);
-                int refCount = a2dpOutputDesc->mRefCount[i];
-                // in the case of duplicated output, the ref count is first incremented
-                // and then decremented on hardware output tus keeping its value
-                hwOutputDesc->changeRefCount((AudioSystem::stream_type)i, refCount);
-                a2dpOutputDesc->changeRefCount((AudioSystem::stream_type)i,-refCount);
-            }
-        }
-        // do not change newDevice if it was already set before this call by a previous call to
-        // getNewDevice() or checkOutputForStrategy() for a strategy with higher priority
-        if (newDevice == 0 && hwOutputDesc->isUsedByStrategy(strategy)) {
-            newDevice = getDeviceForStrategy(strategy, false);
-        }
-    }
-    if (a2dpIsUsed && !a2dpWasUsed) {
-        bool dupUsed = a2dpUsedForSonification() && a2dpIsUsed && (AudioSystem::popCount(curDevice) == 2);
-        audio_io_handle_t a2dpOutput;
-
-        if (dupUsed) {
-            LOGV("checkOutputForStrategy() moving strategy %d from duplicated", strategy);
-            a2dpOutputDesc = mOutputs.valueFor(mDuplicatedOutput);
-            a2dpOutput = mDuplicatedOutput;
-        } else {
-            LOGV("checkOutputForStrategy() moving strategy %d from a2dp", strategy);
-            a2dpOutputDesc = mOutputs.valueFor(mA2dpOutput);
-            a2dpOutput = mA2dpOutput;
-        }
-
-        for (int i = 0; i < (int)AudioSystem::NUM_STREAM_TYPES; i++) {
-            if (getStrategy((AudioSystem::stream_type)i) == strategy) {
-                mpClientInterface->setStreamOutput((AudioSystem::stream_type)i, a2dpOutput);
-                int refCount = hwOutputDesc->mRefCount[i];
-                // in the case of duplicated output, the ref count is first incremented
-                // and then decremented on hardware output tus keeping its value
-                a2dpOutputDesc->changeRefCount((AudioSystem::stream_type)i, refCount);
-                hwOutputDesc->changeRefCount((AudioSystem::stream_type)i,-refCount);
-            }
-        }
-    }
-}
-
-void AudioPolicyManagerBase::checkOutputForAllStrategies(uint32_t &newDevice)
-{
-    // Check strategies in order of priority so that once newDevice is set
-    // for a given strategy it is not modified by subsequent calls to
-    // checkOutputForStrategy()
-    checkOutputForStrategy(STRATEGY_PHONE, newDevice);
-    checkOutputForStrategy(STRATEGY_SONIFICATION, newDevice);
-    checkOutputForStrategy(STRATEGY_MEDIA, newDevice);
-    checkOutputForStrategy(STRATEGY_DTMF, newDevice);
-}
-
-#endif
-
-uint32_t AudioPolicyManagerBase::getNewDevice(audio_io_handle_t output, bool fromCache)
-{
-    uint32_t device = 0;
-
-    AudioOutputDescriptor *outputDesc = mOutputs.valueFor(output);
-    // check the following by order of priority to request a routing change if necessary:
-    // 1: we are in call or the strategy phone is active on the hardware output:
-    //      use device for strategy phone
-    // 2: the strategy sonification is active on the hardware output:
-    //      use device for strategy sonification
-    // 3: the strategy media is active on the hardware output:
-    //      use device for strategy media
-    // 4: the strategy DTMF is active on the hardware output:
-    //      use device for strategy DTMF
-    if (mPhoneState == AudioSystem::MODE_IN_CALL ||
-        outputDesc->isUsedByStrategy(STRATEGY_PHONE)) {
-        device = getDeviceForStrategy(STRATEGY_PHONE, fromCache);
-    } else if (outputDesc->isUsedByStrategy(STRATEGY_SONIFICATION)) {
-        device = getDeviceForStrategy(STRATEGY_SONIFICATION, fromCache);
-    } else if (outputDesc->isUsedByStrategy(STRATEGY_MEDIA)) {
-        device = getDeviceForStrategy(STRATEGY_MEDIA, fromCache);
-    } else if (outputDesc->isUsedByStrategy(STRATEGY_DTMF)) {
-        device = getDeviceForStrategy(STRATEGY_DTMF, fromCache);
-    }
-
-    LOGV("getNewDevice() selected device %x", device);
-    return device;
-}
-
-AudioPolicyManagerBase::routing_strategy AudioPolicyManagerBase::getStrategy(AudioSystem::stream_type stream)
-{
-    // stream to strategy mapping
-    switch (stream) {
-    case AudioSystem::VOICE_CALL:
-    case AudioSystem::BLUETOOTH_SCO:
-        return STRATEGY_PHONE;
-    case AudioSystem::RING:
-    case AudioSystem::NOTIFICATION:
-    case AudioSystem::ALARM:
-    case AudioSystem::ENFORCED_AUDIBLE:
-        return STRATEGY_SONIFICATION;
-    case AudioSystem::DTMF:
-        return STRATEGY_DTMF;
-    default:
-        LOGE("unknown stream type");
-    case AudioSystem::SYSTEM:
-        // NOTE: SYSTEM stream uses MEDIA strategy because muting music and switching outputs
-        // while key clicks are played produces a poor result
-    case AudioSystem::TTS:
-    case AudioSystem::MUSIC:
-        return STRATEGY_MEDIA;
-    }
-}
-
-uint32_t AudioPolicyManagerBase::getDeviceForStrategy(routing_strategy strategy, bool fromCache)
-{
-    uint32_t device = 0;
-
-    if (fromCache) {
-        LOGV("getDeviceForStrategy() from cache strategy %d, device %x", strategy, mDeviceForStrategy[strategy]);
-        return mDeviceForStrategy[strategy];
-    }
-
-    switch (strategy) {
-    case STRATEGY_DTMF:
-        if (mPhoneState != AudioSystem::MODE_IN_CALL) {
-            // when off call, DTMF strategy follows the same rules as MEDIA strategy
-            device = getDeviceForStrategy(STRATEGY_MEDIA, false);
-            break;
-        }
-        // when in call, DTMF and PHONE strategies follow the same rules
-        // FALL THROUGH
-
-    case STRATEGY_PHONE:
-        // for phone strategy, we first consider the forced use and then the available devices by order
-        // of priority
-        switch (mForceUse[AudioSystem::FOR_COMMUNICATION]) {
-        case AudioSystem::FORCE_BT_SCO:
-            if (mPhoneState != AudioSystem::MODE_IN_CALL || strategy != STRATEGY_DTMF) {
-                device = mAvailableOutputDevices & AudioSystem::DEVICE_OUT_BLUETOOTH_SCO_CARKIT;
-                if (device) break;
-            }
-            device = mAvailableOutputDevices & AudioSystem::DEVICE_OUT_BLUETOOTH_SCO_HEADSET;
-            if (device) break;
-            device = mAvailableOutputDevices & AudioSystem::DEVICE_OUT_BLUETOOTH_SCO;
-            if (device) break;
-            // if SCO device is requested but no SCO device is available, fall back to default case
-            // FALL THROUGH
-
-        default:    // FORCE_NONE
-            device = mAvailableOutputDevices & AudioSystem::DEVICE_OUT_WIRED_HEADPHONE;
-            if (device) break;
-            device = mAvailableOutputDevices & AudioSystem::DEVICE_OUT_WIRED_HEADSET;
-            if (device) break;
-#ifdef WITH_A2DP
-            // when not in a phone call, phone strategy should route STREAM_VOICE_CALL to A2DP
-            if (mPhoneState != AudioSystem::MODE_IN_CALL) {
-                device = mAvailableOutputDevices & AudioSystem::DEVICE_OUT_BLUETOOTH_A2DP;
-                if (device) break;
-                device = mAvailableOutputDevices & AudioSystem::DEVICE_OUT_BLUETOOTH_A2DP_HEADPHONES;
-                if (device) break;
-            }
-#endif
-            device = mAvailableOutputDevices & AudioSystem::DEVICE_OUT_EARPIECE;
-            if (device == 0) {
-                LOGE("getDeviceForStrategy() earpiece device not found");
-            }
-            break;
-
-        case AudioSystem::FORCE_SPEAKER:
-            if (mPhoneState != AudioSystem::MODE_IN_CALL || strategy != STRATEGY_DTMF) {
-                device = mAvailableOutputDevices & AudioSystem::DEVICE_OUT_BLUETOOTH_SCO_CARKIT;
-                if (device) break;
-            }
-#ifdef WITH_A2DP
-            // when not in a phone call, phone strategy should route STREAM_VOICE_CALL to
-            // A2DP speaker when forcing to speaker output
-            if (mPhoneState != AudioSystem::MODE_IN_CALL) {
-                device = mAvailableOutputDevices & AudioSystem::DEVICE_OUT_BLUETOOTH_A2DP_SPEAKER;
-                if (device) break;
-            }
-#endif
-            device = mAvailableOutputDevices & AudioSystem::DEVICE_OUT_SPEAKER;
-            if (device == 0) {
-                LOGE("getDeviceForStrategy() speaker device not found");
-            }
-            break;
-        }
-    break;
-
-    case STRATEGY_SONIFICATION:
-
-        // If incall, just select the STRATEGY_PHONE device: The rest of the behavior is handled by
-        // handleIncallSonification().
-        if (mPhoneState == AudioSystem::MODE_IN_CALL) {
-            device = getDeviceForStrategy(STRATEGY_PHONE, false);
-            break;
-        }
-        device = mAvailableOutputDevices & AudioSystem::DEVICE_OUT_SPEAKER;
-        if (device == 0) {
-            LOGE("getDeviceForStrategy() speaker device not found");
-        }
-        // The second device used for sonification is the same as the device used by media strategy
-        // FALL THROUGH
-
-    case STRATEGY_MEDIA: {
-        uint32_t device2 = mAvailableOutputDevices & AudioSystem::DEVICE_OUT_AUX_DIGITAL;
-        if (device2 == 0) {
-            device2 = mAvailableOutputDevices & AudioSystem::DEVICE_OUT_WIRED_HEADPHONE;
-        }
-        if (device2 == 0) {
-            device2 = mAvailableOutputDevices & AudioSystem::DEVICE_OUT_WIRED_HEADSET;
-        }
-#ifdef WITH_A2DP
-        if (mA2dpOutput != 0) {
-            if (strategy == STRATEGY_SONIFICATION && !a2dpUsedForSonification()) {
-                break;
-            }
-            if (device2 == 0) {
-                device2 = mAvailableOutputDevices & AudioSystem::DEVICE_OUT_BLUETOOTH_A2DP;
-            }
-            if (device2 == 0) {
-                device2 = mAvailableOutputDevices & AudioSystem::DEVICE_OUT_BLUETOOTH_A2DP_HEADPHONES;
-            }
-            if (device2 == 0) {
-                device2 = mAvailableOutputDevices & AudioSystem::DEVICE_OUT_BLUETOOTH_A2DP_SPEAKER;
-            }
-        }
-#endif
-        if (device2 == 0) {
-            device2 = mAvailableOutputDevices & AudioSystem::DEVICE_OUT_SPEAKER;
-        }
-
-        // device is DEVICE_OUT_SPEAKER if we come from case STRATEGY_SONIFICATION, 0 otherwise
-        device |= device2;
-        if (device == 0) {
-            LOGE("getDeviceForStrategy() speaker device not found");
-        }
-        } break;
-
-    default:
-        LOGW("getDeviceForStrategy() unknown strategy: %d", strategy);
-        break;
-    }
-
-    LOGV("getDeviceForStrategy() strategy %d, device %x", strategy, device);
-    return device;
-}
-
-void AudioPolicyManagerBase::updateDeviceForStrategy()
-{
-    for (int i = 0; i < NUM_STRATEGIES; i++) {
-        mDeviceForStrategy[i] = getDeviceForStrategy((routing_strategy)i, false);
-    }
-}
-
-void AudioPolicyManagerBase::setOutputDevice(audio_io_handle_t output, uint32_t device, bool force, int delayMs)
-{
-    LOGV("setOutputDevice() output %d device %x delayMs %d", output, device, delayMs);
-    AudioOutputDescriptor *outputDesc = mOutputs.valueFor(output);
-
-
-    if (outputDesc->isDuplicated()) {
-        setOutputDevice(outputDesc->mOutput1->mId, device, force, delayMs);
-        setOutputDevice(outputDesc->mOutput2->mId, device, force, delayMs);
-        return;
-    }
-#ifdef WITH_A2DP
-    // filter devices according to output selected
-    if (output == mA2dpOutput) {
-        device &= AudioSystem::DEVICE_OUT_ALL_A2DP;
-    } else {
-        device &= ~AudioSystem::DEVICE_OUT_ALL_A2DP;
-    }
-#endif
-
-    uint32_t prevDevice = (uint32_t)outputDesc->device();
-    // Do not change the routing if:
-    //  - the requestede device is 0
-    //  - the requested device is the same as current device and force is not specified.
-    // Doing this check here allows the caller to call setOutputDevice() without conditions
-    if ((device == 0 || device == prevDevice) && !force) {
-        LOGV("setOutputDevice() setting same device %x or null device for output %d", device, output);
-        return;
-    }
-
-    outputDesc->mDevice = device;
-    // mute media streams if both speaker and headset are selected
-    if (output == mHardwareOutput && AudioSystem::popCount(device) == 2) {
-        setStrategyMute(STRATEGY_MEDIA, true, output);
-        // wait for the PCM output buffers to empty before proceeding with the rest of the command
-        usleep(outputDesc->mLatency*2*1000);
-    }
-#ifdef WITH_A2DP
-    // suspend A2DP output if SCO device is selected
-    if (AudioSystem::isBluetoothScoDevice((AudioSystem::audio_devices)device)) {
-         if (mA2dpOutput != 0) {
-             mpClientInterface->suspendOutput(mA2dpOutput);
-         }
-    }
-#endif
-    // do the routing
-    AudioParameter param = AudioParameter();
-    param.addInt(String8(AudioParameter::keyRouting), (int)device);
-    mpClientInterface->setParameters(mHardwareOutput, param.toString(), delayMs);
-    // update stream volumes according to new device
-    applyStreamVolumes(output, device, delayMs);
-
-#ifdef WITH_A2DP
-    // if disconnecting SCO device, restore A2DP output
-    if (AudioSystem::isBluetoothScoDevice((AudioSystem::audio_devices)prevDevice)) {
-         if (mA2dpOutput != 0) {
-             LOGV("restore A2DP output");
-             mpClientInterface->restoreOutput(mA2dpOutput);
-         }
-    }
-#endif
-    // if changing from a combined headset + speaker route, unmute media streams
-    if (output == mHardwareOutput && AudioSystem::popCount(prevDevice) == 2) {
-        setStrategyMute(STRATEGY_MEDIA, false, output, delayMs);
-    }
-}
-
-uint32_t AudioPolicyManagerBase::getDeviceForInputSource(int inputSource)
-{
-    uint32_t device;
-
-    switch(inputSource) {
-    case AUDIO_SOURCE_DEFAULT:
-    case AUDIO_SOURCE_MIC:
-    case AUDIO_SOURCE_VOICE_RECOGNITION:
-        if (mForceUse[AudioSystem::FOR_RECORD] == AudioSystem::FORCE_BT_SCO &&
-            mAvailableInputDevices & AudioSystem::DEVICE_IN_BLUETOOTH_SCO_HEADSET) {
-            device = AudioSystem::DEVICE_IN_BLUETOOTH_SCO_HEADSET;
-        } else if (mAvailableInputDevices & AudioSystem::DEVICE_IN_WIRED_HEADSET) {
-            device = AudioSystem::DEVICE_IN_WIRED_HEADSET;
-        } else {
-            device = AudioSystem::DEVICE_IN_BUILTIN_MIC;
-        }
-        break;
-    case AUDIO_SOURCE_CAMCORDER:
-        if (hasBackMicrophone()) {
-            device = AudioSystem::DEVICE_IN_BACK_MIC;
-        } else {
-            device = AudioSystem::DEVICE_IN_BUILTIN_MIC;
-        }
-        break;
-    case AUDIO_SOURCE_VOICE_UPLINK:
-    case AUDIO_SOURCE_VOICE_DOWNLINK:
-    case AUDIO_SOURCE_VOICE_CALL:
-        device = AudioSystem::DEVICE_IN_VOICE_CALL;
-        break;
-    default:
-        LOGW("getInput() invalid input source %d", inputSource);
-        device = 0;
-        break;
-    }
-    LOGV("getDeviceForInputSource()input source %d, device %08x", inputSource, device);
-    return device;
-}
-
-audio_io_handle_t AudioPolicyManagerBase::getActiveInput()
-{
-    for (size_t i = 0; i < mInputs.size(); i++) {
-        if (mInputs.valueAt(i)->mRefCount > 0) {
-            return mInputs.keyAt(i);
-        }
-    }
-    return 0;
-}
-
-float AudioPolicyManagerBase::computeVolume(int stream, int index, audio_io_handle_t output, uint32_t device)
-{
-    float volume = 1.0;
-    AudioOutputDescriptor *outputDesc = mOutputs.valueFor(output);
-    StreamDescriptor &streamDesc = mStreams[stream];
-
-    if (device == 0) {
-        device = outputDesc->device();
-    }
-
-    int volInt = (100 * (index - streamDesc.mIndexMin)) / (streamDesc.mIndexMax - streamDesc.mIndexMin);
-    volume = AudioSystem::linearToLog(volInt);
-
-    // if a headset is connected, apply the following rules to ring tones and notifications
-    // to avoid sound level bursts in user's ears:
-    // - always attenuate ring tones and notifications volume by 6dB
-    // - if music is playing, always limit the volume to current music volume,
-    // with a minimum threshold at -36dB so that notification is always perceived.
-    if ((device &
-        (AudioSystem::DEVICE_OUT_BLUETOOTH_A2DP |
-        AudioSystem::DEVICE_OUT_BLUETOOTH_A2DP_HEADPHONES |
-        AudioSystem::DEVICE_OUT_WIRED_HEADSET |
-        AudioSystem::DEVICE_OUT_WIRED_HEADPHONE)) &&
-        (getStrategy((AudioSystem::stream_type)stream) == STRATEGY_SONIFICATION) &&
-        streamDesc.mCanBeMuted) {
-        volume *= SONIFICATION_HEADSET_VOLUME_FACTOR;
-        // when the phone is ringing we must consider that music could have been paused just before
-        // by the music application and behave as if music was active if the last music track was
-        // just stopped
-        if (outputDesc->mRefCount[AudioSystem::MUSIC] || mLimitRingtoneVolume) {
-            float musicVol = computeVolume(AudioSystem::MUSIC, mStreams[AudioSystem::MUSIC].mIndexCur, output, device);
-            float minVol = (musicVol > SONIFICATION_HEADSET_VOLUME_MIN) ? musicVol : SONIFICATION_HEADSET_VOLUME_MIN;
-            if (volume > minVol) {
-                volume = minVol;
-                LOGV("computeVolume limiting volume to %f musicVol %f", minVol, musicVol);
-            }
-        }
-    }
-
-    return volume;
-}
-
-status_t AudioPolicyManagerBase::checkAndSetVolume(int stream, int index, audio_io_handle_t output, uint32_t device, int delayMs, bool force)
-{
-
-    // do not change actual stream volume if the stream is muted
-    if (mOutputs.valueFor(output)->mMuteCount[stream] != 0) {
-        LOGV("checkAndSetVolume() stream %d muted count %d", stream, mOutputs.valueFor(output)->mMuteCount[stream]);
-        return NO_ERROR;
-    }
-
-    // do not change in call volume if bluetooth is connected and vice versa
-    if ((stream == AudioSystem::VOICE_CALL && mForceUse[AudioSystem::FOR_COMMUNICATION] == AudioSystem::FORCE_BT_SCO) ||
-        (stream == AudioSystem::BLUETOOTH_SCO && mForceUse[AudioSystem::FOR_COMMUNICATION] != AudioSystem::FORCE_BT_SCO)) {
-        LOGV("checkAndSetVolume() cannot set stream %d volume with force use = %d for comm",
-             stream, mForceUse[AudioSystem::FOR_COMMUNICATION]);
-        return INVALID_OPERATION;
-    }
-
-    float volume = computeVolume(stream, index, output, device);
-    // do not set volume if the float value did not change
-    if (volume != mOutputs.valueFor(output)->mCurVolume[stream] || force) {
-        mOutputs.valueFor(output)->mCurVolume[stream] = volume;
-        LOGV("setStreamVolume() for output %d stream %d, volume %f, delay %d", output, stream, volume, delayMs);
-        if (stream == AudioSystem::VOICE_CALL ||
-            stream == AudioSystem::DTMF ||
-            stream == AudioSystem::BLUETOOTH_SCO) {
-            float voiceVolume = -1.0;
-            // offset value to reflect actual hardware volume that never reaches 0
-            // 1% corresponds roughly to first step in VOICE_CALL stream volume setting (see AudioService.java)
-            volume = 0.01 + 0.99 * volume;
-            if (stream == AudioSystem::VOICE_CALL) {
-                voiceVolume = (float)index/(float)mStreams[stream].mIndexMax;
-            } else if (stream == AudioSystem::BLUETOOTH_SCO) {
-                voiceVolume = 1.0;
-            }
-            if (voiceVolume >= 0 && output == mHardwareOutput) {
-                mpClientInterface->setVoiceVolume(voiceVolume, delayMs);
-            }
-        }
-        mpClientInterface->setStreamVolume((AudioSystem::stream_type)stream, volume, output, delayMs);
-    }
-
-    return NO_ERROR;
-}
-
-void AudioPolicyManagerBase::applyStreamVolumes(audio_io_handle_t output, uint32_t device, int delayMs)
-{
-    LOGV("applyStreamVolumes() for output %d and device %x", output, device);
-
-    for (int stream = 0; stream < AudioSystem::NUM_STREAM_TYPES; stream++) {
-        checkAndSetVolume(stream, mStreams[stream].mIndexCur, output, device, delayMs);
-    }
-}
-
-void AudioPolicyManagerBase::setStrategyMute(routing_strategy strategy, bool on, audio_io_handle_t output, int delayMs)
-{
-    LOGV("setStrategyMute() strategy %d, mute %d, output %d", strategy, on, output);
-    for (int stream = 0; stream < AudioSystem::NUM_STREAM_TYPES; stream++) {
-        if (getStrategy((AudioSystem::stream_type)stream) == strategy) {
-            setStreamMute(stream, on, output, delayMs);
-        }
-    }
-}
-
-void AudioPolicyManagerBase::setStreamMute(int stream, bool on, audio_io_handle_t output, int delayMs)
-{
-    StreamDescriptor &streamDesc = mStreams[stream];
-    AudioOutputDescriptor *outputDesc = mOutputs.valueFor(output);
-
-    LOGV("setStreamMute() stream %d, mute %d, output %d, mMuteCount %d", stream, on, output, outputDesc->mMuteCount[stream]);
-
-    if (on) {
-        if (outputDesc->mMuteCount[stream] == 0) {
-            if (streamDesc.mCanBeMuted) {
-                checkAndSetVolume(stream, 0, output, outputDesc->device(), delayMs);
-            }
-        }
-        // increment mMuteCount after calling checkAndSetVolume() so that volume change is not ignored
-        outputDesc->mMuteCount[stream]++;
-    } else {
-        if (outputDesc->mMuteCount[stream] == 0) {
-            LOGW("setStreamMute() unmuting non muted stream!");
-            return;
-        }
-        if (--outputDesc->mMuteCount[stream] == 0) {
-            checkAndSetVolume(stream, streamDesc.mIndexCur, output, outputDesc->device(), delayMs);
-        }
-    }
-}
-
-void AudioPolicyManagerBase::handleIncallSonification(int stream, bool starting, bool stateChange)
-{
-    // if the stream pertains to sonification strategy and we are in call we must
-    // mute the stream if it is low visibility. If it is high visibility, we must play a tone
-    // in the device used for phone strategy and play the tone if the selected device does not
-    // interfere with the device used for phone strategy
-    // if stateChange is true, we are called from setPhoneState() and we must mute or unmute as
-    // many times as there are active tracks on the output
-
-    if (getStrategy((AudioSystem::stream_type)stream) == STRATEGY_SONIFICATION) {
-        AudioOutputDescriptor *outputDesc = mOutputs.valueFor(mHardwareOutput);
-        LOGV("handleIncallSonification() stream %d starting %d device %x stateChange %d",
-                stream, starting, outputDesc->mDevice, stateChange);
-        if (outputDesc->mRefCount[stream]) {
-            int muteCount = 1;
-            if (stateChange) {
-                muteCount = outputDesc->mRefCount[stream];
-            }
-            if (AudioSystem::isLowVisibility((AudioSystem::stream_type)stream)) {
-                LOGV("handleIncallSonification() low visibility, muteCount %d", muteCount);
-                for (int i = 0; i < muteCount; i++) {
-                    setStreamMute(stream, starting, mHardwareOutput);
-                }
-            } else {
-                LOGV("handleIncallSonification() high visibility");
-                if (outputDesc->device() & getDeviceForStrategy(STRATEGY_PHONE)) {
-                    LOGV("handleIncallSonification() high visibility muted, muteCount %d", muteCount);
-                    for (int i = 0; i < muteCount; i++) {
-                        setStreamMute(stream, starting, mHardwareOutput);
-                    }
-                }
-                if (starting) {
-                    mpClientInterface->startTone(ToneGenerator::TONE_SUP_CALL_WAITING, AudioSystem::VOICE_CALL);
-                } else {
-                    mpClientInterface->stopTone();
-                }
-            }
-        }
-    }
-}
-
-bool AudioPolicyManagerBase::needsDirectOuput(AudioSystem::stream_type stream,
-                                    uint32_t samplingRate,
-                                    uint32_t format,
-                                    uint32_t channels,
-                                    AudioSystem::output_flags flags,
-                                    uint32_t device)
-{
-   return ((flags & AudioSystem::OUTPUT_FLAG_DIRECT) ||
-          (format !=0 && !AudioSystem::isLinearPCM(format)));
-}
-
-// --- AudioOutputDescriptor class implementation
-
-AudioPolicyManagerBase::AudioOutputDescriptor::AudioOutputDescriptor()
-    : mId(0), mSamplingRate(0), mFormat(0), mChannels(0), mLatency(0),
-    mFlags((AudioSystem::output_flags)0), mDevice(0), mOutput1(0), mOutput2(0)
-{
-    // clear usage count for all stream types
-    for (int i = 0; i < AudioSystem::NUM_STREAM_TYPES; i++) {
-        mRefCount[i] = 0;
-        mCurVolume[i] = -1.0;
-        mMuteCount[i] = 0;
-    }
-}
-
-uint32_t AudioPolicyManagerBase::AudioOutputDescriptor::device()
-{
-    uint32_t device = 0;
-    if (isDuplicated()) {
-        device = mOutput1->mDevice | mOutput2->mDevice;
-    } else {
-        device = mDevice;
-    }
-    return device;
-}
-
-void AudioPolicyManagerBase::AudioOutputDescriptor::changeRefCount(AudioSystem::stream_type stream, int delta)
-{
-    // forward usage count change to attached outputs
-    if (isDuplicated()) {
-        mOutput1->changeRefCount(stream, delta);
-        mOutput2->changeRefCount(stream, delta);
-    }
-    if ((delta + (int)mRefCount[stream]) < 0) {
-        LOGW("changeRefCount() invalid delta %d for stream %d, refCount %d", delta, stream, mRefCount[stream]);
-        mRefCount[stream] = 0;
-        return;
-    }
-    mRefCount[stream] += delta;
-    LOGV("changeRefCount() stream %d, count %d", stream, mRefCount[stream]);
-}
-
-uint32_t AudioPolicyManagerBase::AudioOutputDescriptor::refCount()
-{
-    uint32_t refcount = 0;
-    for (int i = 0; i < (int)AudioSystem::NUM_STREAM_TYPES; i++) {
-        refcount += mRefCount[i];
-    }
-    return refcount;
-}
-
-uint32_t AudioPolicyManagerBase::AudioOutputDescriptor::strategyRefCount(routing_strategy strategy)
-{
-    uint32_t refCount = 0;
-    for (int i = 0; i < (int)AudioSystem::NUM_STREAM_TYPES; i++) {
-        if (getStrategy((AudioSystem::stream_type)i) == strategy) {
-            refCount += mRefCount[i];
-        }
-    }
-    return refCount;
-}
-
-
-status_t AudioPolicyManagerBase::AudioOutputDescriptor::dump(int fd)
-{
-    const size_t SIZE = 256;
-    char buffer[SIZE];
-    String8 result;
-
-    snprintf(buffer, SIZE, " Sampling rate: %d\n", mSamplingRate);
-    result.append(buffer);
-    snprintf(buffer, SIZE, " Format: %d\n", mFormat);
-    result.append(buffer);
-    snprintf(buffer, SIZE, " Channels: %08x\n", mChannels);
-    result.append(buffer);
-    snprintf(buffer, SIZE, " Latency: %d\n", mLatency);
-    result.append(buffer);
-    snprintf(buffer, SIZE, " Flags %08x\n", mFlags);
-    result.append(buffer);
-    snprintf(buffer, SIZE, " Devices %08x\n", device());
-    result.append(buffer);
-    snprintf(buffer, SIZE, " Stream volume refCount muteCount\n");
-    result.append(buffer);
-    for (int i = 0; i < AudioSystem::NUM_STREAM_TYPES; i++) {
-        snprintf(buffer, SIZE, " %02d     %.03f     %02d       %02d\n", i, mCurVolume[i], mRefCount[i], mMuteCount[i]);
-        result.append(buffer);
-    }
-    write(fd, result.string(), result.size());
-
-    return NO_ERROR;
-}
-
-// --- AudioInputDescriptor class implementation
-
-AudioPolicyManagerBase::AudioInputDescriptor::AudioInputDescriptor()
-    : mSamplingRate(0), mFormat(0), mChannels(0),
-     mAcoustics((AudioSystem::audio_in_acoustics)0), mDevice(0), mRefCount(0)
-{
-}
-
-status_t AudioPolicyManagerBase::AudioInputDescriptor::dump(int fd)
-{
-    const size_t SIZE = 256;
-    char buffer[SIZE];
-    String8 result;
-
-    snprintf(buffer, SIZE, " Sampling rate: %d\n", mSamplingRate);
-    result.append(buffer);
-    snprintf(buffer, SIZE, " Format: %d\n", mFormat);
-    result.append(buffer);
-    snprintf(buffer, SIZE, " Channels: %08x\n", mChannels);
-    result.append(buffer);
-    snprintf(buffer, SIZE, " Acoustics %08x\n", mAcoustics);
-    result.append(buffer);
-    snprintf(buffer, SIZE, " Devices %08x\n", mDevice);
-    result.append(buffer);
-    snprintf(buffer, SIZE, " Ref Count %d\n", mRefCount);
-    result.append(buffer);
-    write(fd, result.string(), result.size());
-
-    return NO_ERROR;
-}
-
-// --- StreamDescriptor class implementation
-
-void AudioPolicyManagerBase::StreamDescriptor::dump(char* buffer, size_t size)
-{
-    snprintf(buffer, size, "      %02d         %02d         %02d         %d\n",
-            mIndexMin,
-            mIndexMax,
-            mIndexCur,
-            mCanBeMuted);
-}
-
-
-}; // namespace android
diff --git a/libs/binder/IPCThreadState.cpp b/libs/binder/IPCThreadState.cpp
index 0016503..f6582e6 100644
--- a/libs/binder/IPCThreadState.cpp
+++ b/libs/binder/IPCThreadState.cpp
@@ -367,6 +367,16 @@
     return token;
 }
 
+void IPCThreadState::setStrictModePolicy(int32_t policy)
+{
+    mStrictModePolicy = policy;
+}
+
+int32_t IPCThreadState::getStrictModePolicy() const
+{
+    return mStrictModePolicy;
+}
+
 void IPCThreadState::restoreCallingIdentity(int64_t token)
 {
     mCallingUid = (int)(token>>32);
@@ -588,7 +598,8 @@
 }
 
 IPCThreadState::IPCThreadState()
-    : mProcess(ProcessState::self()), mMyThreadId(androidGetTid())
+    : mProcess(ProcessState::self()), mMyThreadId(androidGetTid()),
+      mStrictModePolicy(0)
 {
     pthread_setspecific(gTLS, this);
     clearCaller();
diff --git a/libs/binder/IPermissionController.cpp b/libs/binder/IPermissionController.cpp
index bff4c9b..e13036f 100644
--- a/libs/binder/IPermissionController.cpp
+++ b/libs/binder/IPermissionController.cpp
@@ -36,7 +36,7 @@
         : BpInterface<IPermissionController>(impl)
     {
     }
-        
+
     virtual bool checkPermission(const String16& permission, int32_t pid, int32_t uid)
     {
         Parcel data, reply;
@@ -46,7 +46,7 @@
         data.writeInt32(uid);
         remote()->transact(CHECK_PERMISSION_TRANSACTION, data, &reply);
         // fail on exception
-        if (reply.readInt32() != 0) return 0;
+        if (reply.readExceptionCode() != 0) return 0;
         return reply.readInt32() != 0;
     }
 };
@@ -66,8 +66,7 @@
             int32_t pid = data.readInt32();
             int32_t uid = data.readInt32();
             bool res = checkPermission(permission, pid, uid);
-            // write exception
-            reply->writeInt32(0);
+            reply->writeNoException();
             reply->writeInt32(res ? 1 : 0);
             return NO_ERROR;
         } break;
@@ -77,4 +76,3 @@
 }
 
 }; // namespace android
-
diff --git a/libs/binder/IServiceManager.cpp b/libs/binder/IServiceManager.cpp
index 0cf41586..1fa4c35 100644
--- a/libs/binder/IServiceManager.cpp
+++ b/libs/binder/IServiceManager.cpp
@@ -129,19 +129,19 @@
         : BpInterface<IServiceManager>(impl)
     {
     }
-        
+
     virtual sp<IBinder> getService(const String16& name) const
     {
         unsigned n;
         for (n = 0; n < 5; n++){
             sp<IBinder> svc = checkService(name);
             if (svc != NULL) return svc;
-            LOGI("Waiting for sevice %s...\n", String8(name).string());
+            LOGI("Waiting for service %s...\n", String8(name).string());
             sleep(1);
         }
         return NULL;
     }
-    
+
     virtual sp<IBinder> checkService( const String16& name) const
     {
         Parcel data, reply;
@@ -158,7 +158,7 @@
         data.writeString16(name);
         data.writeStrongBinder(service);
         status_t err = remote()->transact(ADD_SERVICE_TRANSACTION, data, &reply);
-        return err == NO_ERROR ? reply.readInt32() : err;
+        return err == NO_ERROR ? reply.readExceptionCode() : err;
     }
 
     virtual Vector<String16> listServices()
@@ -226,4 +226,3 @@
 }
 
 }; // namespace android
-
diff --git a/libs/binder/Parcel.cpp b/libs/binder/Parcel.cpp
index 00d2210..60babad 100644
--- a/libs/binder/Parcel.cpp
+++ b/libs/binder/Parcel.cpp
@@ -19,6 +19,7 @@
 
 #include <binder/Parcel.h>
 
+#include <binder/IPCThreadState.h>
 #include <binder/Binder.h>
 #include <binder/BpBinder.h>
 #include <utils/Debug.h>
@@ -47,6 +48,12 @@
 
 #define PAD_SIZE(s) (((s)+3)&~3)
 
+// Note: must be kept in sync with android/os/StrictMode.java's PENALTY_GATHER
+#define STRICT_MODE_PENALTY_GATHER 0x100
+
+// Note: must be kept in sync with android/os/Parcel.java's EX_HAS_REPLY_HEADER
+#define EX_HAS_REPLY_HEADER -128
+
 // XXX This can be made public if we want to provide
 // support for typed data.
 struct small_flat_data
@@ -436,19 +443,28 @@
     return mHasFds;
 }
 
+// Write RPC headers.  (previously just the interface token)
 status_t Parcel::writeInterfaceToken(const String16& interface)
 {
+    writeInt32(IPCThreadState::self()->getStrictModePolicy() |
+               STRICT_MODE_PENALTY_GATHER);
     // currently the interface identification token is just its name as a string
     return writeString16(interface);
 }
 
 bool Parcel::checkInterface(IBinder* binder) const
 {
-    return enforceInterface(binder->getInterfaceDescriptor()); 
+    return enforceInterface(binder->getInterfaceDescriptor());
 }
 
-bool Parcel::enforceInterface(const String16& interface) const
+bool Parcel::enforceInterface(const String16& interface,
+                              int32_t* strict_policy_out) const
 {
+    int32_t strict_policy = readInt32();
+    IPCThreadState::self()->setStrictModePolicy(strict_policy);
+    if (strict_policy_out != NULL) {
+      *strict_policy_out = strict_policy;
+    }
     const String16 str(readString16());
     if (str == interface) {
         return true;
@@ -457,7 +473,7 @@
                 String8(interface).string(), String8(str).string());
         return false;
     }
-} 
+}
 
 const size_t* Parcel::objects() const
 {
@@ -750,6 +766,11 @@
     goto restart_write;
 }
 
+status_t Parcel::writeNoException()
+{
+    return writeInt32(0);
+}
+
 void Parcel::remove(size_t start, size_t amt)
 {
     LOG_ALWAYS_FATAL("Parcel::remove() not yet implemented!");
@@ -938,6 +959,20 @@
     return val;
 }
 
+int32_t Parcel::readExceptionCode() const
+{
+  int32_t exception_code = readAligned<int32_t>();
+  if (exception_code == EX_HAS_REPLY_HEADER) {
+    int32_t header_size = readAligned<int32_t>();
+    // Skip over fat responses headers.  Not used (or propagated) in
+    // native code
+    setDataPosition(dataPosition() + header_size);
+    // And fat response headers are currently only used when there are no
+    // exceptions, so return no error:
+    return 0;
+  }
+  return exception_code;
+}
 
 native_handle* Parcel::readNativeHandle() const
 {
diff --git a/libs/camera/Camera.cpp b/libs/camera/Camera.cpp
index f19c502..0037399 100644
--- a/libs/camera/Camera.cpp
+++ b/libs/camera/Camera.cpp
@@ -92,16 +92,35 @@
 
 Camera::~Camera()
 {
-    disconnect();
+    // We don't need to call disconnect() here because if the CameraService
+    // thinks we are the owner of the hardware, it will hold a (strong)
+    // reference to us, and we can't possibly be here. We also don't want to
+    // call disconnect() here if we are in the same process as mediaserver,
+    // because we may be invoked by CameraService::Client::connect() and will
+    // deadlock if we call any method of ICamera here.
 }
 
-sp<Camera> Camera::connect()
+int32_t Camera::getNumberOfCameras()
+{
+    const sp<ICameraService>& cs = getCameraService();
+    if (cs == 0) return 0;
+    return cs->getNumberOfCameras();
+}
+
+status_t Camera::getCameraInfo(int cameraId,
+                               struct CameraInfo* cameraInfo) {
+    const sp<ICameraService>& cs = getCameraService();
+    if (cs == 0) return UNKNOWN_ERROR;
+    return cs->getCameraInfo(cameraId, cameraInfo);
+}
+
+sp<Camera> Camera::connect(int cameraId)
 {
     LOGV("connect");
     sp<Camera> c = new Camera();
     const sp<ICameraService>& cs = getCameraService();
     if (cs != 0) {
-        c->mCamera = cs->connect(c);
+        c->mCamera = cs->connect(c, cameraId);
     }
     if (c->mCamera != 0) {
         c->mCamera->asBinder()->linkToDeath(c);
diff --git a/libs/camera/CameraParameters.cpp b/libs/camera/CameraParameters.cpp
index 65fd7ac..1415493 100644
--- a/libs/camera/CameraParameters.cpp
+++ b/libs/camera/CameraParameters.cpp
@@ -69,8 +69,13 @@
 const char CameraParameters::KEY_ZOOM_RATIOS[] = "zoom-ratios";
 const char CameraParameters::KEY_ZOOM_SUPPORTED[] = "zoom-supported";
 const char CameraParameters::KEY_SMOOTH_ZOOM_SUPPORTED[] = "smooth-zoom-supported";
+const char CameraParameters::KEY_FOCUS_DISTANCES[] = "focus-distances";
+const char CameraParameters::KEY_VIDEO_FRAME_FORMAT[] = "video-frame-format";
+const char CameraParameters::KEY_METERING_MODE[] = "metering-mode";
+const char CameraParameters::KEY_SUPPORTED_METERING_MODES[] = "metering-mode-values";
 
 const char CameraParameters::TRUE[] = "true";
+const char CameraParameters::FOCUS_DISTANCE_INFINITY[] = "Infinity";
 
 // Values for white balance settings.
 const char CameraParameters::WHITE_BALANCE_AUTO[] = "auto";
@@ -137,6 +142,12 @@
 const char CameraParameters::FOCUS_MODE_MACRO[] = "macro";
 const char CameraParameters::FOCUS_MODE_FIXED[] = "fixed";
 const char CameraParameters::FOCUS_MODE_EDOF[] = "edof";
+const char CameraParameters::FOCUS_MODE_CONTINUOUS[] = "continuous";
+
+// Values for metering mode settings.
+const char CameraParameters::METERING_MODE_CENTER_WEIGHTED[] = "center-weighted";
+const char CameraParameters::METERING_MODE_FRAME_AVERAGE[] = "frame-average";
+const char CameraParameters::METERING_MODE_SPOT[] = "spot";
 
 CameraParameters::CameraParameters()
                 : mMap()
diff --git a/libs/camera/ICameraService.cpp b/libs/camera/ICameraService.cpp
index 46b5478..85f1a29 100644
--- a/libs/camera/ICameraService.cpp
+++ b/libs/camera/ICameraService.cpp
@@ -34,12 +34,34 @@
     {
     }
 
+    // get number of cameras available
+    virtual int32_t getNumberOfCameras()
+    {
+        Parcel data, reply;
+        data.writeInterfaceToken(ICameraService::getInterfaceDescriptor());
+        remote()->transact(BnCameraService::GET_NUMBER_OF_CAMERAS, data, &reply);
+        return reply.readInt32();
+    }
+
+    // get information about a camera
+    virtual status_t getCameraInfo(int cameraId,
+                                   struct CameraInfo* cameraInfo) {
+        Parcel data, reply;
+        data.writeInterfaceToken(ICameraService::getInterfaceDescriptor());
+        data.writeInt32(cameraId);
+        remote()->transact(BnCameraService::GET_CAMERA_INFO, data, &reply);
+        cameraInfo->facing = reply.readInt32();
+        cameraInfo->orientation = reply.readInt32();
+        return reply.readInt32();
+    }
+
     // connect to camera service
-    virtual sp<ICamera> connect(const sp<ICameraClient>& cameraClient)
+    virtual sp<ICamera> connect(const sp<ICameraClient>& cameraClient, int cameraId)
     {
         Parcel data, reply;
         data.writeInterfaceToken(ICameraService::getInterfaceDescriptor());
         data.writeStrongBinder(cameraClient->asBinder());
+        data.writeInt32(cameraId);
         remote()->transact(BnCameraService::CONNECT, data, &reply);
         return interface_cast<ICamera>(reply.readStrongBinder());
     }
@@ -53,10 +75,25 @@
     uint32_t code, const Parcel& data, Parcel* reply, uint32_t flags)
 {
     switch(code) {
+        case GET_NUMBER_OF_CAMERAS: {
+            CHECK_INTERFACE(ICameraService, data, reply);
+            reply->writeInt32(getNumberOfCameras());
+            return NO_ERROR;
+        } break;
+        case GET_CAMERA_INFO: {
+            CHECK_INTERFACE(ICameraService, data, reply);
+            CameraInfo cameraInfo;
+            memset(&cameraInfo, 0, sizeof(cameraInfo));
+            status_t result = getCameraInfo(data.readInt32(), &cameraInfo);
+            reply->writeInt32(cameraInfo.facing);
+            reply->writeInt32(cameraInfo.orientation);
+            reply->writeInt32(result);
+            return NO_ERROR;
+        } break;
         case CONNECT: {
             CHECK_INTERFACE(ICameraService, data, reply);
             sp<ICameraClient> cameraClient = interface_cast<ICameraClient>(data.readStrongBinder());
-            sp<ICamera> camera = connect(cameraClient);
+            sp<ICamera> camera = connect(cameraClient, data.readInt32());
             reply->writeStrongBinder(camera->asBinder());
             return NO_ERROR;
         } break;
diff --git a/libs/gui/Android.mk b/libs/gui/Android.mk
new file mode 100644
index 0000000..249558a
--- /dev/null
+++ b/libs/gui/Android.mk
@@ -0,0 +1,25 @@
+LOCAL_PATH:= $(call my-dir)
+include $(CLEAR_VARS)
+
+LOCAL_SRC_FILES:= \
+	ISensorEventConnection.cpp \
+	ISensorServer.cpp \
+	Sensor.cpp \
+	SensorChannel.cpp \
+	SensorEventQueue.cpp \
+	SensorManager.cpp
+
+LOCAL_SHARED_LIBRARIES := \
+	libcutils \
+	libutils \
+	libbinder \
+	libhardware \
+	libhardware_legacy
+
+LOCAL_MODULE:= libgui
+
+ifeq ($(TARGET_SIMULATOR),true)
+    LOCAL_LDLIBS += -lpthread
+endif
+
+include $(BUILD_SHARED_LIBRARY)
diff --git a/libs/gui/ISensorEventConnection.cpp b/libs/gui/ISensorEventConnection.cpp
new file mode 100644
index 0000000..3e9d456
--- /dev/null
+++ b/libs/gui/ISensorEventConnection.cpp
@@ -0,0 +1,108 @@
+/*
+ * Copyright (C) 2010 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include <stdint.h>
+#include <sys/types.h>
+
+#include <utils/Errors.h>
+#include <utils/RefBase.h>
+#include <utils/Timers.h>
+
+#include <binder/Parcel.h>
+#include <binder/IInterface.h>
+
+#include <gui/ISensorEventConnection.h>
+#include <gui/SensorChannel.h>
+
+namespace android {
+// ----------------------------------------------------------------------------
+
+enum {
+    GET_SENSOR_CHANNEL = IBinder::FIRST_CALL_TRANSACTION,
+    ENABLE_DISABLE,
+    SET_EVENT_RATE
+};
+
+class BpSensorEventConnection : public BpInterface<ISensorEventConnection>
+{
+public:
+    BpSensorEventConnection(const sp<IBinder>& impl)
+        : BpInterface<ISensorEventConnection>(impl)
+    {
+    }
+
+    virtual sp<SensorChannel> getSensorChannel() const
+    {
+        Parcel data, reply;
+        remote()->transact(GET_SENSOR_CHANNEL, data, &reply);
+        return new SensorChannel(reply);
+    }
+
+    virtual status_t enableDisable(int handle, bool enabled)
+    {
+        Parcel data, reply;
+        data.writeInt32(handle);
+        data.writeInt32(enabled);
+        remote()->transact(ENABLE_DISABLE, data, &reply);
+        return reply.readInt32();
+    }
+
+    virtual status_t setEventRate(int handle, nsecs_t ns)
+    {
+        Parcel data, reply;
+        data.writeInt32(handle);
+        data.writeInt64(ns);
+        remote()->transact(SET_EVENT_RATE, data, &reply);
+        return reply.readInt32();
+    }
+};
+
+IMPLEMENT_META_INTERFACE(SensorEventConnection, "android.gui.SensorEventConnection");
+
+// ----------------------------------------------------------------------------
+
+status_t BnSensorEventConnection::onTransact(
+    uint32_t code, const Parcel& data, Parcel* reply, uint32_t flags)
+{
+    switch(code) {
+        case GET_SENSOR_CHANNEL: {
+            CHECK_INTERFACE(ISensorEventConnection, data, reply);
+            sp<SensorChannel> channel(getSensorChannel());
+            channel->writeToParcel(reply);
+            return NO_ERROR;
+        } break;
+        case ENABLE_DISABLE: {
+            CHECK_INTERFACE(ISensorEventConnection, data, reply);
+            int handle = data.readInt32();
+            int enabled = data.readInt32();
+            status_t result = enableDisable(handle, enabled);
+            reply->writeInt32(result);
+            return NO_ERROR;
+        } break;
+        case SET_EVENT_RATE: {
+            CHECK_INTERFACE(ISensorEventConnection, data, reply);
+            int handle = data.readInt32();
+            int ns = data.readInt64();
+            status_t result = setEventRate(handle, ns);
+            reply->writeInt32(result);
+            return NO_ERROR;
+        } break;
+    }
+    return BBinder::onTransact(code, data, reply, flags);
+}
+
+// ----------------------------------------------------------------------------
+}; // namespace android
diff --git a/libs/gui/ISensorServer.cpp b/libs/gui/ISensorServer.cpp
new file mode 100644
index 0000000..c6177bc
--- /dev/null
+++ b/libs/gui/ISensorServer.cpp
@@ -0,0 +1,100 @@
+/*
+ * Copyright (C) 2010 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include <stdint.h>
+#include <sys/types.h>
+
+#include <utils/Errors.h>
+#include <utils/RefBase.h>
+#include <utils/Vector.h>
+#include <utils/Timers.h>
+
+#include <binder/Parcel.h>
+#include <binder/IInterface.h>
+
+#include <gui/Sensor.h>
+#include <gui/ISensorServer.h>
+#include <gui/ISensorEventConnection.h>
+
+namespace android {
+// ----------------------------------------------------------------------------
+
+enum {
+    GET_SENSOR_LIST = IBinder::FIRST_CALL_TRANSACTION,
+    CREATE_SENSOR_EVENT_CONNECTION,
+};
+
+class BpSensorServer : public BpInterface<ISensorServer>
+{
+public:
+    BpSensorServer(const sp<IBinder>& impl)
+        : BpInterface<ISensorServer>(impl)
+    {
+    }
+
+    virtual Vector<Sensor> getSensorList()
+    {
+        Parcel data, reply;
+        remote()->transact(GET_SENSOR_LIST, data, &reply);
+        Sensor s;
+        Vector<Sensor> v;
+        int32_t n = reply.readInt32();
+        v.setCapacity(n);
+        while (n--) {
+            reply.read(static_cast<Flattenable&>(s));
+            v.add(s);
+        }
+        return v;
+    }
+
+    virtual sp<ISensorEventConnection> createSensorEventConnection()
+    {
+        Parcel data, reply;
+        remote()->transact(CREATE_SENSOR_EVENT_CONNECTION, data, &reply);
+        return interface_cast<ISensorEventConnection>(reply.readStrongBinder());
+    }
+};
+
+IMPLEMENT_META_INTERFACE(SensorServer, "android.gui.SensorServer");
+
+// ----------------------------------------------------------------------
+
+status_t BnSensorServer::onTransact(
+    uint32_t code, const Parcel& data, Parcel* reply, uint32_t flags)
+{
+    switch(code) {
+        case GET_SENSOR_LIST: {
+            CHECK_INTERFACE(ISensorServer, data, reply);
+            Vector<Sensor> v(getSensorList());
+            size_t n = v.size();
+            reply->writeInt32(n);
+            for (size_t i=0 ; i<n ; i++) {
+                reply->write(static_cast<const Flattenable&>(v[i]));
+            }
+            return NO_ERROR;
+        } break;
+        case CREATE_SENSOR_EVENT_CONNECTION: {
+            CHECK_INTERFACE(ISensorServer, data, reply);
+            sp<ISensorEventConnection> connection(createSensorEventConnection());
+            reply->writeStrongBinder(connection->asBinder());
+            return NO_ERROR;
+        } break;
+    }
+    return BBinder::onTransact(code, data, reply, flags);
+}
+
+// ----------------------------------------------------------------------------
+}; // namespace android
diff --git a/libs/gui/Sensor.cpp b/libs/gui/Sensor.cpp
new file mode 100644
index 0000000..1fdd285
--- /dev/null
+++ b/libs/gui/Sensor.cpp
@@ -0,0 +1,165 @@
+/*
+ * Copyright (C) 2010 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include <stdint.h>
+#include <sys/types.h>
+
+#include <utils/Errors.h>
+#include <utils/String8.h>
+#include <utils/Flattenable.h>
+
+#include <hardware/sensors.h>
+
+#include <gui/Sensor.h>
+
+// ----------------------------------------------------------------------------
+namespace android {
+// ----------------------------------------------------------------------------
+
+Sensor::Sensor()
+    : mHandle(0), mType(0),
+      mMinValue(0), mMaxValue(0), mResolution(0),
+      mPower(0)
+{
+}
+
+Sensor::~Sensor()
+{
+}
+
+const String8& Sensor::getName() const {
+    return mName;
+}
+
+const String8& Sensor::getVendor() const {
+    return mVendor;
+}
+
+int32_t Sensor::getHandle() const {
+    return mHandle;
+}
+
+int32_t Sensor::getType() const {
+    return mType;
+}
+
+float Sensor::getMinValue() const {
+    return mMinValue;
+}
+
+float Sensor::getMaxValue() const {
+    return mMaxValue;
+}
+
+float Sensor::getResolution() const {
+    return mResolution;
+}
+
+float Sensor::getPowerUsage() const {
+    return mPower;
+}
+
+size_t Sensor::getFlattenedSize() const
+{
+    return  sizeof(int32_t) + ((mName.length() + 3) & ~3) +
+            sizeof(int32_t) + ((mVendor.length() + 3) & ~3) +
+            sizeof(int32_t) * 2 +
+            sizeof(float) * 3;
+}
+
+size_t Sensor::getFdCount() const
+{
+    return 0;
+}
+
+static inline
+size_t write(void* buffer, size_t offset, const String8& value) {
+    memcpy(static_cast<char*>(buffer) + offset, value.string(), value.length());
+    return (value.length() + 3) & ~3;
+}
+
+static inline
+size_t write(void* buffer, size_t offset, float value) {
+    *reinterpret_cast<float*>(static_cast<char*>(buffer) + offset) = value;
+    return sizeof(float);
+}
+
+static inline
+size_t write(void* buffer, size_t offset, int32_t value) {
+    *reinterpret_cast<int32_t*>(static_cast<char*>(buffer) + offset) = value;
+    return sizeof(int32_t);
+}
+
+status_t Sensor::flatten(void* buffer, size_t size,
+        int fds[], size_t count) const
+{
+    if (size < Sensor::getFlattenedSize())
+        return -ENOMEM;
+
+    size_t offset = 0;
+    offset += write(buffer, offset, int32_t(mName.length()));
+    offset += write(buffer, offset, mName);
+    offset += write(buffer, offset, int32_t(mVendor.length()));
+    offset += write(buffer, offset, mVendor);
+    offset += write(buffer, offset, mHandle);
+    offset += write(buffer, offset, mType);
+    offset += write(buffer, offset, mMinValue);
+    offset += write(buffer, offset, mMaxValue);
+    offset += write(buffer, offset, mResolution);
+    offset += write(buffer, offset, mPower);
+
+    return NO_ERROR;
+}
+
+static inline
+size_t read(void const* buffer, size_t offset, String8* value, int32_t len) {
+    value->setTo(static_cast<char const*>(buffer) + offset, len);
+    return (len + 3) & ~3;
+}
+
+static inline
+size_t read(void const* buffer, size_t offset, float* value) {
+    *value = *reinterpret_cast<float const*>(static_cast<char const*>(buffer) + offset);
+    return sizeof(float);
+}
+
+static inline
+size_t read(void const* buffer, size_t offset, int32_t* value) {
+    *value = *reinterpret_cast<int32_t const*>(static_cast<char const*>(buffer) + offset);
+    return sizeof(int32_t);
+}
+
+status_t Sensor::unflatten(void const* buffer, size_t size,
+        int fds[], size_t count)
+{
+    int32_t len;
+    size_t offset = 0;
+    offset += read(buffer, offset, &len);
+    offset += read(buffer, offset, &mName, len);
+    offset += read(buffer, offset, &len);
+    offset += read(buffer, offset, &mVendor, len);
+    offset += read(buffer, offset, &mHandle);
+    offset += read(buffer, offset, &mType);
+    offset += read(buffer, offset, &mMinValue);
+    offset += read(buffer, offset, &mMaxValue);
+    offset += read(buffer, offset, &mResolution);
+    offset += read(buffer, offset, &mPower);
+
+    return NO_ERROR;
+}
+
+// ----------------------------------------------------------------------------
+}; // namespace android
diff --git a/libs/gui/SensorChannel.cpp b/libs/gui/SensorChannel.cpp
new file mode 100644
index 0000000..147e1c2
--- /dev/null
+++ b/libs/gui/SensorChannel.cpp
@@ -0,0 +1,93 @@
+/*
+ * Copyright (C) 2010 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include <stdint.h>
+#include <sys/types.h>
+
+#include <unistd.h>
+#include <fcntl.h>
+
+#include <utils/Errors.h>
+
+#include <binder/Parcel.h>
+
+#include <gui/SensorChannel.h>
+
+namespace android {
+// ----------------------------------------------------------------------------
+
+SensorChannel::SensorChannel()
+    : mSendFd(-1), mReceiveFd(-1)
+{
+    int fds[2];
+    if (pipe(fds) == 0) {
+        mReceiveFd = fds[0];
+        mSendFd = fds[1];
+        fcntl(mReceiveFd, F_SETFL, O_NONBLOCK);
+        fcntl(mSendFd, F_SETFL, O_NONBLOCK);
+    }
+}
+
+SensorChannel::SensorChannel(const Parcel& data)
+    : mSendFd(-1), mReceiveFd(-1)
+{
+    mReceiveFd = dup(data.readFileDescriptor());
+    fcntl(mReceiveFd, F_SETFL, O_NONBLOCK);
+}
+
+SensorChannel::~SensorChannel()
+{
+    if (mSendFd >= 0)
+        close(mSendFd);
+
+    if (mReceiveFd >= 0)
+        close(mReceiveFd);
+}
+
+int SensorChannel::getFd() const
+{
+    return mReceiveFd;
+}
+
+ssize_t SensorChannel::write(void const* vaddr, size_t size)
+{
+    ssize_t len = ::write(mSendFd, vaddr, size);
+    if (len < 0)
+        return -errno;
+    return len;
+}
+
+ssize_t SensorChannel::read(void* vaddr, size_t size)
+{
+    ssize_t len = ::read(mReceiveFd, vaddr, size);
+    if (len < 0)
+        return -errno;
+    return len;
+}
+
+status_t SensorChannel::writeToParcel(Parcel* reply) const
+{
+    if (mReceiveFd < 0)
+        return -EINVAL;
+
+    status_t result = reply->writeDupFileDescriptor(mReceiveFd);
+    close(mReceiveFd);
+    mReceiveFd = -1;
+    return result;
+}
+
+// ----------------------------------------------------------------------------
+}; // namespace android
diff --git a/libs/gui/SensorEventQueue.cpp b/libs/gui/SensorEventQueue.cpp
new file mode 100644
index 0000000..f922ac4
--- /dev/null
+++ b/libs/gui/SensorEventQueue.cpp
@@ -0,0 +1,97 @@
+/*
+ * Copyright (C) 2010 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+#include <stdint.h>
+#include <sys/types.h>
+
+#include <utils/Errors.h>
+#include <utils/RefBase.h>
+
+#include <gui/Sensor.h>
+#include <gui/SensorChannel.h>
+#include <gui/SensorEventQueue.h>
+#include <gui/ISensorEventConnection.h>
+
+#include <android/sensor.h>
+
+// ----------------------------------------------------------------------------
+namespace android {
+// ----------------------------------------------------------------------------
+
+SensorEventQueue::SensorEventQueue(const sp<ISensorEventConnection>& connection)
+    : mSensorEventConnection(connection)
+{
+}
+
+SensorEventQueue::~SensorEventQueue()
+{
+}
+
+void SensorEventQueue::onFirstRef()
+{
+    mSensorChannel = mSensorEventConnection->getSensorChannel();
+}
+
+int SensorEventQueue::getFd() const
+{
+    return mSensorChannel->getFd();
+}
+
+ssize_t SensorEventQueue::write(ASensorEvent const* events, size_t numEvents)
+{
+    ssize_t size = mSensorChannel->write(events, numEvents * sizeof(events[0]));
+    if (size >= 0) {
+        if (size % sizeof(events[0])) {
+            // partial write!!! should never happen.
+            return -EINVAL;
+        }
+        // returns number of events written
+        size /= sizeof(events[0]);
+    }
+    return size;
+}
+
+ssize_t SensorEventQueue::read(ASensorEvent* events, size_t numEvents)
+{
+    ssize_t size = mSensorChannel->read(events, numEvents*sizeof(events[0]));
+    if (size >= 0) {
+        if (size % sizeof(events[0])) {
+            // partial write!!! should never happen.
+            return -EINVAL;
+        }
+        // returns number of events read
+        size /= sizeof(events[0]);
+    }
+    return size;
+}
+
+status_t SensorEventQueue::enableSensor(Sensor const* sensor) const
+{
+    return mSensorEventConnection->enableDisable(sensor->getHandle(), true);
+}
+
+status_t SensorEventQueue::disableSensor(Sensor const* sensor) const
+{
+    return mSensorEventConnection->enableDisable(sensor->getHandle(), false);
+}
+
+status_t SensorEventQueue::setEventRate(Sensor const* sensor, nsecs_t ns) const
+{
+    return mSensorEventConnection->setEventRate(sensor->getHandle(), ns);
+}
+
+// ----------------------------------------------------------------------------
+}; // namespace android
+
diff --git a/libs/gui/SensorManager.cpp b/libs/gui/SensorManager.cpp
new file mode 100644
index 0000000..cd89285
--- /dev/null
+++ b/libs/gui/SensorManager.cpp
@@ -0,0 +1,68 @@
+/*
+ * Copyright (C) 2010 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include <stdint.h>
+#include <sys/types.h>
+
+#include <utils/Errors.h>
+#include <utils/RefBase.h>
+#include <utils/Singleton.h>
+
+#include <gui/ISensorServer.h>
+#include <gui/ISensorEventConnection.h>
+#include <gui/Sensor.h>
+#include <gui/SensorManager.h>
+#include <gui/SensorEventQueue.h>
+
+// ----------------------------------------------------------------------------
+namespace android {
+// ----------------------------------------------------------------------------
+
+ANDROID_SINGLETON_STATIC_INSTANCE(SensorManager)
+
+SensorManager::SensorManager()
+    : mSensorList(0)
+{
+    mSensors = mSensorServer->getSensorList();
+    // TODO: needs implementation
+}
+
+SensorManager::~SensorManager()
+{
+    // TODO: needs implementation
+}
+
+ssize_t SensorManager::getSensorList(Sensor** list) const
+{
+    *list = mSensorList;
+    return mSensors.size();
+}
+
+Sensor* SensorManager::getDefaultSensor(int type)
+{
+    // TODO: needs implementation
+    return mSensorList;
+}
+
+sp<SensorEventQueue> SensorManager::createEventQueue()
+{
+    sp<SensorEventQueue> result = new SensorEventQueue(
+            mSensorServer->createSensorEventConnection());
+    return result;
+}
+
+// ----------------------------------------------------------------------------
+}; // namespace android
diff --git a/libs/rs/rs.spec b/libs/rs/rs.spec
index cb9937c..5ae8d01 100644
--- a/libs/rs/rs.spec
+++ b/libs/rs/rs.spec
@@ -29,7 +29,7 @@
 ContextSetSurface {
 	param uint32_t width
 	param uint32_t height
-	param android_native_window_t *sur
+	param ANativeWindow *sur
 	}
 
 ContextDump {
diff --git a/libs/rs/rsContext.cpp b/libs/rs/rsContext.cpp
index d8a9a99..596f533 100644
--- a/libs/rs/rsContext.cpp
+++ b/libs/rs/rsContext.cpp
@@ -473,7 +473,7 @@
     objDestroyOOBDestroy();
 }
 
-void Context::setSurface(uint32_t w, uint32_t h, android_native_window_t *sur)
+void Context::setSurface(uint32_t w, uint32_t h, ANativeWindow *sur)
 {
     rsAssert(mIsGraphicsContext);
 
@@ -888,7 +888,7 @@
     rsc->resume();
 }
 
-void rsi_ContextSetSurface(Context *rsc, uint32_t w, uint32_t h, android_native_window_t *sur)
+void rsi_ContextSetSurface(Context *rsc, uint32_t w, uint32_t h, ANativeWindow *sur)
 {
     rsc->setSurface(w, h, sur);
 }
diff --git a/libs/rs/rsContext.h b/libs/rs/rsContext.h
index 82c3687..709730e 100644
--- a/libs/rs/rsContext.h
+++ b/libs/rs/rsContext.h
@@ -98,7 +98,7 @@
 
     void pause();
     void resume();
-    void setSurface(uint32_t w, uint32_t h, android_native_window_t *sur);
+    void setSurface(uint32_t w, uint32_t h, ANativeWindow *sur);
     void setPriority(int32_t p);
 
     void assignName(ObjectBase *obj, const char *name, uint32_t len);
@@ -246,7 +246,7 @@
 
     static void * threadProc(void *);
 
-    android_native_window_t *mWndSurface;
+    ANativeWindow *mWndSurface;
 
     Vector<ObjectBase *> mNames;
 
diff --git a/libs/rs/rsProgram.cpp b/libs/rs/rsProgram.cpp
index 478a6dc..70e2868 100644
--- a/libs/rs/rsProgram.cpp
+++ b/libs/rs/rsProgram.cpp
@@ -195,7 +195,7 @@
 
     if (rsc->props.mLogShaders) {
         LOGV("Loading shader type %x, ID %i", type, mShaderID);
-        LOGV(mShader.string());
+        LOGV("%s", mShader.string());
     }
 
     if (mShaderID) {
diff --git a/libs/rs/rsScriptC.cpp b/libs/rs/rsScriptC.cpp
index 1f23773..f4d2451 100644
--- a/libs/rs/rsScriptC.cpp
+++ b/libs/rs/rsScriptC.cpp
@@ -159,7 +159,7 @@
         ACCchar buf[4096];
         ACCsizei len;
         accGetScriptInfoLog(s->mAccScript, sizeof(buf), &len, buf);
-        LOGE(buf);
+        LOGE("%s", buf);
         rsc->setError(RS_ERROR_BAD_SCRIPT, "Error compiling user script.");
         return;
     }
@@ -345,7 +345,7 @@
             s.append(e->getName());
             s.append("\n\n");
             if (rsc->props.mLogScripts) {
-                LOGV(s);
+                LOGV("%s", static_cast<const char*>(s));
             }
             str->append(s);
         }
@@ -372,7 +372,7 @@
             s.append(mSlotNames[ct]);
             s.append(";\n");
             if (rsc->props.mLogScripts) {
-                LOGV(s);
+                LOGV("%s", static_cast<const char*>(s));
             }
             str->append(s);
         }
diff --git a/libs/surfaceflinger/Android.mk b/libs/surfaceflinger/Android.mk
deleted file mode 100644
index 86eb78d..0000000
--- a/libs/surfaceflinger/Android.mk
+++ /dev/null
@@ -1,51 +0,0 @@
-LOCAL_PATH:= $(call my-dir)
-include $(CLEAR_VARS)
-
-LOCAL_SRC_FILES:= \
-    clz.cpp.arm \
-    DisplayHardware/DisplayHardware.cpp \
-    DisplayHardware/DisplayHardwareBase.cpp \
-    BlurFilter.cpp.arm \
-    Layer.cpp \
-    LayerBase.cpp \
-    LayerBuffer.cpp \
-    LayerBlur.cpp \
-    LayerDim.cpp \
-    MessageQueue.cpp \
-    SurfaceFlinger.cpp \
-    Tokenizer.cpp \
-    Transform.cpp
-
-LOCAL_CFLAGS:= -DLOG_TAG=\"SurfaceFlinger\"
-LOCAL_CFLAGS += -DGL_GLEXT_PROTOTYPES -DEGL_EGLEXT_PROTOTYPES
-
-ifeq ($(TARGET_BOARD_PLATFORM), msm7k)
-	LOCAL_CFLAGS += -DDIM_WITH_TEXTURE
-endif
-
-# need "-lrt" on Linux simulator to pick up clock_gettime
-ifeq ($(TARGET_SIMULATOR),true)
-	ifeq ($(HOST_OS),linux)
-		LOCAL_LDLIBS += -lrt -lpthread
-	endif
-endif
-
-LOCAL_SHARED_LIBRARIES := \
-	libcutils \
-	libpixelflinger \
-	libhardware \
-	libutils \
-	libEGL \
-	libGLESv1_CM \
-	libbinder \
-	libui \
-	libsurfaceflinger_client
-
-LOCAL_C_INCLUDES := \
-	$(call include-path-for, corecg graphics)
-
-LOCAL_C_INCLUDES += hardware/libhardware/modules/gralloc
-
-LOCAL_MODULE:= libsurfaceflinger
-
-include $(BUILD_SHARED_LIBRARY)
diff --git a/libs/surfaceflinger/Barrier.h b/libs/surfaceflinger/Barrier.h
deleted file mode 100644
index e2bcf6a..0000000
--- a/libs/surfaceflinger/Barrier.h
+++ /dev/null
@@ -1,59 +0,0 @@
-/*
- * Copyright (C) 2007 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#ifndef ANDROID_BARRIER_H
-#define ANDROID_BARRIER_H
-
-#include <stdint.h>
-#include <sys/types.h>
-#include <utils/threads.h>
-
-namespace android {
-
-class Barrier
-{
-public:
-    inline Barrier() : state(CLOSED) { }
-    inline ~Barrier() { }
-    void open() {
-        // gcc memory barrier, this makes sure all memory writes
-        // have been issued by gcc. On an SMP system we'd need a real
-        // h/w barrier.
-        asm volatile ("":::"memory");
-        Mutex::Autolock _l(lock);
-        state = OPENED;
-        cv.broadcast();
-    }
-    void close() {
-        Mutex::Autolock _l(lock);
-        state = CLOSED;
-    }
-    void wait() const {
-        Mutex::Autolock _l(lock);
-        while (state == CLOSED) {
-            cv.wait(lock);
-        }
-    }
-private:
-    enum { OPENED, CLOSED };
-    mutable     Mutex       lock;
-    mutable     Condition   cv;
-    volatile    int         state;
-};
-
-}; // namespace android
-
-#endif // ANDROID_BARRIER_H
diff --git a/libs/surfaceflinger/DisplayHardware/DisplayHardware.cpp b/libs/surfaceflinger/DisplayHardware/DisplayHardware.cpp
deleted file mode 100644
index ea68352..0000000
--- a/libs/surfaceflinger/DisplayHardware/DisplayHardware.cpp
+++ /dev/null
@@ -1,364 +0,0 @@
-/*
- * Copyright (C) 2007 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#include <stdlib.h>
-#include <stdio.h>
-#include <string.h>
-#include <math.h>
-
-#include <cutils/properties.h>
-
-#include <utils/RefBase.h>
-#include <utils/Log.h>
-
-#include <ui/PixelFormat.h>
-#include <ui/FramebufferNativeWindow.h>
-#include <ui/EGLUtils.h>
-
-#include <GLES/gl.h>
-#include <EGL/egl.h>
-#include <EGL/eglext.h>
-
-#include <pixelflinger/pixelflinger.h>
-
-#include "DisplayHardware/DisplayHardware.h"
-
-#include <hardware/copybit.h>
-#include <hardware/overlay.h>
-#include <hardware/gralloc.h>
-
-using namespace android;
-
-
-static __attribute__((noinline))
-void checkGLErrors()
-{
-    do {
-        // there could be more than one error flag
-        GLenum error = glGetError();
-        if (error == GL_NO_ERROR)
-            break;
-        LOGE("GL error 0x%04x", int(error));
-    } while(true);
-}
-
-static __attribute__((noinline))
-void checkEGLErrors(const char* token)
-{
-    EGLint error = eglGetError();
-    if (error && error != EGL_SUCCESS) {
-        LOGE("%s: EGL error 0x%04x (%s)",
-                token, int(error), EGLUtils::strerror(error));
-    }
-}
-
-/*
- * Initialize the display to the specified values.
- *
- */
-
-DisplayHardware::DisplayHardware(
-        const sp<SurfaceFlinger>& flinger,
-        uint32_t dpy)
-    : DisplayHardwareBase(flinger, dpy)
-{
-    init(dpy);
-}
-
-DisplayHardware::~DisplayHardware()
-{
-    fini();
-}
-
-float DisplayHardware::getDpiX() const          { return mDpiX; }
-float DisplayHardware::getDpiY() const          { return mDpiY; }
-float DisplayHardware::getDensity() const       { return mDensity; }
-float DisplayHardware::getRefreshRate() const   { return mRefreshRate; }
-int DisplayHardware::getWidth() const           { return mWidth; }
-int DisplayHardware::getHeight() const          { return mHeight; }
-PixelFormat DisplayHardware::getFormat() const  { return mFormat; }
-uint32_t DisplayHardware::getMaxTextureSize() const { return mMaxTextureSize; }
-uint32_t DisplayHardware::getMaxViewportDims() const { return mMaxViewportDims; }
-
-void DisplayHardware::init(uint32_t dpy)
-{
-    mNativeWindow = new FramebufferNativeWindow();
-    framebuffer_device_t const * fbDev = mNativeWindow->getDevice();
-
-    mOverlayEngine = NULL;
-    hw_module_t const* module;
-    if (hw_get_module(OVERLAY_HARDWARE_MODULE_ID, &module) == 0) {
-        overlay_control_open(module, &mOverlayEngine);
-    }
-
-    // initialize EGL
-    EGLint attribs[] = {
-            EGL_SURFACE_TYPE,   EGL_WINDOW_BIT,
-            EGL_NONE,           0,
-            EGL_NONE
-    };
-
-    // debug: disable h/w rendering
-    char property[PROPERTY_VALUE_MAX];
-    if (property_get("debug.sf.hw", property, NULL) > 0) {
-        if (atoi(property) == 0) {
-            LOGW("H/W composition disabled");
-            attribs[2] = EGL_CONFIG_CAVEAT;
-            attribs[3] = EGL_SLOW_CONFIG;
-        }
-    }
-
-    EGLint w, h, dummy;
-    EGLint numConfigs=0;
-    EGLSurface surface;
-    EGLContext context;
-    mFlags = CACHED_BUFFERS;
-
-    // TODO: all the extensions below should be queried through
-    // eglGetProcAddress().
-
-    EGLDisplay display = eglGetDisplay(EGL_DEFAULT_DISPLAY);
-    eglInitialize(display, NULL, NULL);
-    eglGetConfigs(display, NULL, 0, &numConfigs);
-
-    EGLConfig config;
-    status_t err = EGLUtils::selectConfigForNativeWindow(
-            display, attribs, mNativeWindow.get(), &config);
-    LOGE_IF(err, "couldn't find an EGLConfig matching the screen format");
-    
-    EGLint r,g,b,a;
-    eglGetConfigAttrib(display, config, EGL_RED_SIZE,   &r);
-    eglGetConfigAttrib(display, config, EGL_GREEN_SIZE, &g);
-    eglGetConfigAttrib(display, config, EGL_BLUE_SIZE,  &b);
-    eglGetConfigAttrib(display, config, EGL_ALPHA_SIZE, &a);
-
-    /*
-     * Gather EGL extensions
-     */
-
-    const char* const egl_extensions = eglQueryString(
-            display, EGL_EXTENSIONS);
-    
-    LOGI("EGL informations:");
-    LOGI("# of configs : %d", numConfigs);
-    LOGI("vendor    : %s", eglQueryString(display, EGL_VENDOR));
-    LOGI("version   : %s", eglQueryString(display, EGL_VERSION));
-    LOGI("extensions: %s", egl_extensions);
-    LOGI("Client API: %s", eglQueryString(display, EGL_CLIENT_APIS)?:"Not Supported");
-    LOGI("EGLSurface: %d-%d-%d-%d, config=%p", r, g, b, a, config);
-    
-
-    if (mNativeWindow->isUpdateOnDemand()) {
-        mFlags |= PARTIAL_UPDATES;
-    }
-    
-    if (eglGetConfigAttrib(display, config, EGL_CONFIG_CAVEAT, &dummy) == EGL_TRUE) {
-        if (dummy == EGL_SLOW_CONFIG)
-            mFlags |= SLOW_CONFIG;
-    }
-
-    /*
-     * Create our main surface
-     */
-
-    surface = eglCreateWindowSurface(display, config, mNativeWindow.get(), NULL);
-
-    if (mFlags & PARTIAL_UPDATES) {
-        // if we have partial updates, we definitely don't need to
-        // preserve the backbuffer, which may be costly.
-        eglSurfaceAttrib(display, surface,
-                EGL_SWAP_BEHAVIOR, EGL_BUFFER_DESTROYED);
-    }
-
-    if (eglQuerySurface(display, surface, EGL_SWAP_BEHAVIOR, &dummy) == EGL_TRUE) {
-        if (dummy == EGL_BUFFER_PRESERVED) {
-            mFlags |= BUFFER_PRESERVED;
-        }
-    }
-
-    eglQuerySurface(display, surface, EGL_WIDTH,  &mWidth);
-    eglQuerySurface(display, surface, EGL_HEIGHT, &mHeight);
-
-#ifdef EGL_ANDROID_swap_rectangle    
-    if (strstr(egl_extensions, "EGL_ANDROID_swap_rectangle")) {
-        if (eglSetSwapRectangleANDROID(display, surface,
-                0, 0, mWidth, mHeight) == EGL_TRUE) {
-            // This could fail if this extension is not supported by this
-            // specific surface (of config)
-            mFlags |= SWAP_RECTANGLE;
-        }
-    }
-    // when we have the choice between PARTIAL_UPDATES and SWAP_RECTANGLE
-    // choose PARTIAL_UPDATES, which should be more efficient
-    if (mFlags & PARTIAL_UPDATES)
-        mFlags &= ~SWAP_RECTANGLE;
-#endif
-    
-
-    LOGI("flags     : %08x", mFlags);
-    
-    mDpiX = mNativeWindow->xdpi;
-    mDpiY = mNativeWindow->ydpi;
-    mRefreshRate = fbDev->fps; 
-    
-    /* Read density from build-specific ro.sf.lcd_density property
-     * except if it is overridden by qemu.sf.lcd_density.
-     */
-    if (property_get("qemu.sf.lcd_density", property, NULL) <= 0) {
-        if (property_get("ro.sf.lcd_density", property, NULL) <= 0) {
-            LOGW("ro.sf.lcd_density not defined, using 160 dpi by default.");
-            strcpy(property, "160");
-        }
-    } else {
-        /* for the emulator case, reset the dpi values too */
-        mDpiX = mDpiY = atoi(property);
-    }
-    mDensity = atoi(property) * (1.0f/160.0f);
-
-
-    /*
-     * Create our OpenGL ES context
-     */
-    
-    context = eglCreateContext(display, config, NULL, NULL);
-    
-    /*
-     * Gather OpenGL ES extensions
-     */
-
-    eglMakeCurrent(display, surface, surface, context);
-    const char* const  gl_extensions = (const char*)glGetString(GL_EXTENSIONS);
-    const char* const  gl_renderer = (const char*)glGetString(GL_RENDERER);
-    LOGI("OpenGL informations:");
-    LOGI("vendor    : %s", glGetString(GL_VENDOR));
-    LOGI("renderer  : %s", gl_renderer);
-    LOGI("version   : %s", glGetString(GL_VERSION));
-    LOGI("extensions: %s", gl_extensions);
-
-    glGetIntegerv(GL_MAX_TEXTURE_SIZE, &mMaxTextureSize);
-    glGetIntegerv(GL_MAX_VIEWPORT_DIMS, &mMaxViewportDims);
-    LOGI("GL_MAX_TEXTURE_SIZE = %d", mMaxTextureSize);
-    LOGI("GL_MAX_VIEWPORT_DIMS = %d", mMaxViewportDims);
-
-#if 0
-    // for drivers that don't have proper support for flushing cached buffers
-    // on gralloc unlock, uncomment this block and test for the specific
-    // renderer substring
-    if (strstr(gl_renderer, "<some vendor string>")) {
-        LOGD("Assuming uncached graphics buffers.");
-        mFlags &= ~CACHED_BUFFERS;
-    }
-#endif
-
-    if (strstr(gl_extensions, "GL_ARB_texture_non_power_of_two")) {
-        mFlags |= NPOT_EXTENSION;
-    }
-    if (strstr(gl_extensions, "GL_OES_draw_texture")) {
-        mFlags |= DRAW_TEXTURE_EXTENSION;
-    }
-#ifdef EGL_ANDROID_image_native_buffer
-    if (strstr( gl_extensions, "GL_OES_EGL_image") &&
-        (strstr(egl_extensions, "EGL_KHR_image_base") || 
-                strstr(egl_extensions, "EGL_KHR_image")) &&
-        strstr(egl_extensions, "EGL_ANDROID_image_native_buffer")) {
-        mFlags |= DIRECT_TEXTURE;
-    }
-#else
-#warning "EGL_ANDROID_image_native_buffer not supported"
-#endif
-
-
-    // Unbind the context from this thread
-    eglMakeCurrent(display, EGL_NO_SURFACE, EGL_NO_SURFACE, EGL_NO_CONTEXT);
-
-    mDisplay = display;
-    mConfig  = config;
-    mSurface = surface;
-    mContext = context;
-    mFormat  = fbDev->format;
-    mPageFlipCount = 0;
-}
-
-/*
- * Clean up.  Throw out our local state.
- *
- * (It's entirely possible we'll never get here, since this is meant
- * for real hardware, which doesn't restart.)
- */
-
-void DisplayHardware::fini()
-{
-    eglMakeCurrent(mDisplay, EGL_NO_SURFACE, EGL_NO_SURFACE, EGL_NO_CONTEXT);
-    eglTerminate(mDisplay);
-    overlay_control_close(mOverlayEngine);
-}
-
-void DisplayHardware::releaseScreen() const
-{
-    DisplayHardwareBase::releaseScreen();
-}
-
-void DisplayHardware::acquireScreen() const
-{
-    DisplayHardwareBase::acquireScreen();
-}
-
-uint32_t DisplayHardware::getPageFlipCount() const {
-    return mPageFlipCount;
-}
-
-status_t DisplayHardware::compositionComplete() const {
-    return mNativeWindow->compositionComplete();
-}
-
-void DisplayHardware::flip(const Region& dirty) const
-{
-    checkGLErrors();
-
-    EGLDisplay dpy = mDisplay;
-    EGLSurface surface = mSurface;
-
-#ifdef EGL_ANDROID_swap_rectangle    
-    if (mFlags & SWAP_RECTANGLE) {
-        const Region newDirty(dirty.intersect(bounds()));
-        const Rect b(newDirty.getBounds());
-        eglSetSwapRectangleANDROID(dpy, surface,
-                b.left, b.top, b.width(), b.height());
-    } 
-#endif
-    
-    if (mFlags & PARTIAL_UPDATES) {
-        mNativeWindow->setUpdateRectangle(dirty.getBounds());
-    }
-    
-    mPageFlipCount++;
-    eglSwapBuffers(dpy, surface);
-    checkEGLErrors("eglSwapBuffers");
-
-    // for debugging
-    //glClearColor(1,0,0,0);
-    //glClear(GL_COLOR_BUFFER_BIT);
-}
-
-uint32_t DisplayHardware::getFlags() const
-{
-    return mFlags;
-}
-
-void DisplayHardware::makeCurrent() const
-{
-    eglMakeCurrent(mDisplay, mSurface, mSurface, mContext);
-}
diff --git a/libs/surfaceflinger/DisplayHardware/DisplayHardware.h b/libs/surfaceflinger/DisplayHardware/DisplayHardware.h
deleted file mode 100644
index df046af..0000000
--- a/libs/surfaceflinger/DisplayHardware/DisplayHardware.h
+++ /dev/null
@@ -1,118 +0,0 @@
-/*
- * Copyright (C) 2007 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#ifndef ANDROID_DISPLAY_HARDWARE_H
-#define ANDROID_DISPLAY_HARDWARE_H
-
-#include <stdlib.h>
-
-#include <ui/PixelFormat.h>
-#include <ui/Region.h>
-
-#include <GLES/gl.h>
-#include <GLES/glext.h>
-#include <EGL/egl.h>
-#include <EGL/eglext.h>
-
-#include <pixelflinger/pixelflinger.h>
-
-#include "DisplayHardware/DisplayHardwareBase.h"
-
-struct overlay_control_device_t;
-struct framebuffer_device_t;
-struct copybit_image_t;
-
-namespace android {
-
-class FramebufferNativeWindow;
-
-class DisplayHardware : public DisplayHardwareBase
-{
-public:
-    enum {
-        DIRECT_TEXTURE          = 0x00000002,
-        COPY_BITS_EXTENSION     = 0x00000008,
-        NPOT_EXTENSION          = 0x00000100,
-        DRAW_TEXTURE_EXTENSION  = 0x00000200,
-        BUFFER_PRESERVED        = 0x00010000,
-        PARTIAL_UPDATES         = 0x00020000,   // video driver feature
-        SLOW_CONFIG             = 0x00040000,   // software
-        SWAP_RECTANGLE          = 0x00080000,
-        CACHED_BUFFERS          = 0x00100000
-    };
-
-    DisplayHardware(
-            const sp<SurfaceFlinger>& flinger,
-            uint32_t displayIndex);
-
-    ~DisplayHardware();
-
-    void releaseScreen() const;
-    void acquireScreen() const;
-
-    // Flip the front and back buffers if the back buffer is "dirty".  Might
-    // be instantaneous, might involve copying the frame buffer around.
-    void flip(const Region& dirty) const;
-
-    float       getDpiX() const;
-    float       getDpiY() const;
-    float       getRefreshRate() const;
-    float       getDensity() const;
-    int         getWidth() const;
-    int         getHeight() const;
-    PixelFormat getFormat() const;
-    uint32_t    getFlags() const;
-    void        makeCurrent() const;
-    uint32_t    getMaxTextureSize() const;
-    uint32_t    getMaxViewportDims() const;
-
-    uint32_t getPageFlipCount() const;
-    EGLDisplay getEGLDisplay() const { return mDisplay; }
-    overlay_control_device_t* getOverlayEngine() const { return mOverlayEngine; }
-    
-    status_t compositionComplete() const;
-    
-    Rect bounds() const {
-        return Rect(mWidth, mHeight);
-    }
-
-private:
-    void init(uint32_t displayIndex) __attribute__((noinline));
-    void fini() __attribute__((noinline));
-
-    EGLDisplay      mDisplay;
-    EGLSurface      mSurface;
-    EGLContext      mContext;
-    EGLConfig       mConfig;
-    float           mDpiX;
-    float           mDpiY;
-    float           mRefreshRate;
-    float           mDensity;
-    int             mWidth;
-    int             mHeight;
-    PixelFormat     mFormat;
-    uint32_t        mFlags;
-    mutable uint32_t mPageFlipCount;
-    GLint           mMaxViewportDims;
-    GLint           mMaxTextureSize;
-    
-    sp<FramebufferNativeWindow> mNativeWindow;
-    overlay_control_device_t* mOverlayEngine;
-};
-
-}; // namespace android
-
-#endif // ANDROID_DISPLAY_HARDWARE_H
diff --git a/libs/surfaceflinger/Layer.cpp b/libs/surfaceflinger/Layer.cpp
deleted file mode 100644
index ce7e9aa..0000000
--- a/libs/surfaceflinger/Layer.cpp
+++ /dev/null
@@ -1,630 +0,0 @@
-/*
- * Copyright (C) 2007 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#include <stdlib.h>
-#include <stdint.h>
-#include <sys/types.h>
-
-#include <cutils/properties.h>
-#include <cutils/native_handle.h>
-
-#include <utils/Errors.h>
-#include <utils/Log.h>
-#include <utils/StopWatch.h>
-
-#include <ui/GraphicBuffer.h>
-#include <ui/PixelFormat.h>
-
-#include <surfaceflinger/Surface.h>
-
-#include "clz.h"
-#include "Layer.h"
-#include "SurfaceFlinger.h"
-#include "DisplayHardware/DisplayHardware.h"
-
-
-#define DEBUG_RESIZE    0
-
-
-namespace android {
-
-template <typename T> inline T min(T a, T b) {
-    return a<b ? a : b;
-}
-
-// ---------------------------------------------------------------------------
-
-const uint32_t Layer::typeInfo = LayerBaseClient::typeInfo | 4;
-const char* const Layer::typeID = "Layer";
-
-// ---------------------------------------------------------------------------
-
-Layer::Layer(SurfaceFlinger* flinger, DisplayID display, 
-        const sp<Client>& c, int32_t i)
-    :   LayerBaseClient(flinger, display, c, i),
-        mSecure(false),
-        mNoEGLImageForSwBuffers(false),
-        mNeedsBlending(true),
-        mNeedsDithering(false)
-{
-    // no OpenGL operation is possible here, since we might not be
-    // in the OpenGL thread.
-    mFrontBufferIndex = lcblk->getFrontBuffer();
-}
-
-Layer::~Layer()
-{
-    destroy();
-    // the actual buffers will be destroyed here
-}
-
-void Layer::destroy()
-{
-    for (size_t i=0 ; i<NUM_BUFFERS ; i++) {
-        if (mTextures[i].name != -1U) {
-            glDeleteTextures(1, &mTextures[i].name);
-            mTextures[i].name = -1U;
-        }
-        if (mTextures[i].image != EGL_NO_IMAGE_KHR) {
-            EGLDisplay dpy(mFlinger->graphicPlane(0).getEGLDisplay());
-            eglDestroyImageKHR(dpy, mTextures[i].image);
-            mTextures[i].image = EGL_NO_IMAGE_KHR;
-        }
-        Mutex::Autolock _l(mLock);
-        mBuffers[i].clear();
-        mWidth = mHeight = 0;
-    }
-    mSurface.clear();
-}
-
-sp<LayerBaseClient::Surface> Layer::createSurface() const
-{
-    return mSurface;
-}
-
-status_t Layer::ditch()
-{
-    // the layer is not on screen anymore. free as much resources as possible
-    mFreezeLock.clear();
-    destroy();
-    return NO_ERROR;
-}
-
-status_t Layer::setBuffers( uint32_t w, uint32_t h,
-                            PixelFormat format, uint32_t flags)
-{
-    // this surfaces pixel format
-    PixelFormatInfo info;
-    status_t err = getPixelFormatInfo(format, &info);
-    if (err) return err;
-
-    // the display's pixel format
-    const DisplayHardware& hw(graphicPlane(0).displayHardware());
-    uint32_t const maxSurfaceDims = min(
-            hw.getMaxTextureSize(), hw.getMaxViewportDims());
-
-    // never allow a surface larger than what our underlying GL implementation
-    // can handle.
-    if ((uint32_t(w)>maxSurfaceDims) || (uint32_t(h)>maxSurfaceDims)) {
-        return BAD_VALUE;
-    }
-
-    PixelFormatInfo displayInfo;
-    getPixelFormatInfo(hw.getFormat(), &displayInfo);
-    const uint32_t hwFlags = hw.getFlags();
-    
-    mFormat = format;
-    mWidth  = w;
-    mHeight = h;
-    mSecure = (flags & ISurfaceComposer::eSecure) ? true : false;
-    mNeedsBlending = (info.h_alpha - info.l_alpha) > 0;
-    mNoEGLImageForSwBuffers = !(hwFlags & DisplayHardware::CACHED_BUFFERS);
-
-    // we use the red index
-    int displayRedSize = displayInfo.getSize(PixelFormatInfo::INDEX_RED);
-    int layerRedsize = info.getSize(PixelFormatInfo::INDEX_RED);
-    mNeedsDithering = layerRedsize > displayRedSize;
-
-    for (size_t i=0 ; i<NUM_BUFFERS ; i++) {
-        mBuffers[i] = new GraphicBuffer();
-    }
-    mSurface = new SurfaceLayer(mFlinger, clientIndex(), this);
-    return NO_ERROR;
-}
-
-void Layer::reloadTexture(const Region& dirty)
-{
-    Mutex::Autolock _l(mLock);
-    sp<GraphicBuffer> buffer(getFrontBufferLocked());
-    if (buffer == NULL) {
-        // this situation can happen if we ran out of memory for instance.
-        // not much we can do. continue to use whatever texture was bound
-        // to this context.
-        return;
-    }
-
-    const int index = mFrontBufferIndex;
-
-    // create the new texture name if needed
-    if (UNLIKELY(mTextures[index].name == -1U)) {
-        mTextures[index].name = createTexture();
-        mTextures[index].width = 0;
-        mTextures[index].height = 0;
-    }
-
-#ifdef EGL_ANDROID_image_native_buffer
-    if (mFlags & DisplayHardware::DIRECT_TEXTURE) {
-        if (buffer->usage & GraphicBuffer::USAGE_HW_TEXTURE) {
-            if (mTextures[index].dirty) {
-                if (initializeEglImage(buffer, &mTextures[index]) != NO_ERROR) {
-                    // not sure what we can do here...
-                    mFlags &= ~DisplayHardware::DIRECT_TEXTURE;
-                    goto slowpath;
-                }
-            }
-        } else {
-            if (mHybridBuffer==0 || (mHybridBuffer->width != buffer->width ||
-                    mHybridBuffer->height != buffer->height)) {
-                mHybridBuffer.clear();
-                mHybridBuffer = new GraphicBuffer(
-                        buffer->width, buffer->height, buffer->format,
-                        GraphicBuffer::USAGE_SW_WRITE_OFTEN |
-                        GraphicBuffer::USAGE_HW_TEXTURE);
-                if (initializeEglImage(
-                        mHybridBuffer, &mTextures[0]) != NO_ERROR) {
-                    // not sure what we can do here...
-                    mFlags &= ~DisplayHardware::DIRECT_TEXTURE;
-                    mHybridBuffer.clear();
-                    goto slowpath;
-                }
-            }
-
-            GGLSurface t;
-            status_t res = buffer->lock(&t, GRALLOC_USAGE_SW_READ_OFTEN);
-            LOGE_IF(res, "error %d (%s) locking buffer %p",
-                    res, strerror(res), buffer.get());
-            if (res == NO_ERROR) {
-                Texture* const texture(&mTextures[0]);
-
-                glBindTexture(GL_TEXTURE_2D, texture->name);
-
-                sp<GraphicBuffer> buf(mHybridBuffer);
-                void* vaddr;
-                res = buf->lock(GraphicBuffer::USAGE_SW_WRITE_OFTEN, &vaddr);
-                if (res == NO_ERROR) {
-                    int bpp = 0;
-                    switch (t.format) {
-                    case HAL_PIXEL_FORMAT_RGB_565:
-                    case HAL_PIXEL_FORMAT_RGBA_4444:
-                        bpp = 2;
-                        break;
-                    case HAL_PIXEL_FORMAT_RGBA_8888:
-                    case HAL_PIXEL_FORMAT_RGBX_8888:
-                        bpp = 4;
-                        break;
-                    default:
-                        if (isSupportedYuvFormat(t.format)) {
-                            // just show the Y plane of YUV buffers
-                            bpp = 1;
-                            break;
-                        }
-                        // oops, we don't handle this format!
-                        LOGE("layer %p, texture=%d, using format %d, which is not "
-                                "supported by the GL", this, texture->name, t.format);
-                    }
-                    if (bpp) {
-                        const Rect bounds(dirty.getBounds());
-                        size_t src_stride = t.stride;
-                        size_t dst_stride = buf->stride;
-                        if (src_stride == dst_stride &&
-                            bounds.width() == t.width &&
-                            bounds.height() == t.height)
-                        {
-                            memcpy(vaddr, t.data, t.height * t.stride * bpp);
-                        } else {
-                            GLubyte const * src = t.data +
-                                (bounds.left + bounds.top * src_stride) * bpp;
-                            GLubyte * dst = (GLubyte *)vaddr +
-                                (bounds.left + bounds.top * dst_stride) * bpp;
-                            const size_t length = bounds.width() * bpp;
-                            size_t h = bounds.height();
-                            src_stride *= bpp;
-                            dst_stride *= bpp;
-                            while (h--) {
-                                memcpy(dst, src, length);
-                                dst += dst_stride;
-                                src += src_stride;
-                            }
-                        }
-                    }
-                    buf->unlock();
-                }
-                buffer->unlock();
-            }
-        }
-    } else
-#endif
-    {
-slowpath:
-        for (size_t i=0 ; i<NUM_BUFFERS ; i++) {
-            mTextures[i].image = EGL_NO_IMAGE_KHR;
-        }
-        GGLSurface t;
-        status_t res = buffer->lock(&t, GRALLOC_USAGE_SW_READ_OFTEN);
-        LOGE_IF(res, "error %d (%s) locking buffer %p",
-                res, strerror(res), buffer.get());
-        if (res == NO_ERROR) {
-            loadTexture(&mTextures[0], dirty, t);
-            buffer->unlock();
-        }
-    }
-}
-
-void Layer::onDraw(const Region& clip) const
-{
-    int index = mFrontBufferIndex;
-    if (mTextures[index].image == EGL_NO_IMAGE_KHR)
-        index = 0;
-    GLuint textureName = mTextures[index].name;
-    if (UNLIKELY(textureName == -1LU)) {
-        // the texture has not been created yet, this Layer has
-        // in fact never been drawn into. This happens frequently with
-        // SurfaceView because the WindowManager can't know when the client
-        // has drawn the first time.
-
-        // If there is nothing under us, we paint the screen in black, otherwise
-        // we just skip this update.
-
-        // figure out if there is something below us
-        Region under;
-        const SurfaceFlinger::LayerVector& drawingLayers(mFlinger->mDrawingState.layersSortedByZ);
-        const size_t count = drawingLayers.size();
-        for (size_t i=0 ; i<count ; ++i) {
-            const sp<LayerBase>& layer(drawingLayers[i]);
-            if (layer.get() == static_cast<LayerBase const*>(this))
-                break;
-            under.orSelf(layer->visibleRegionScreen);
-        }
-        // if not everything below us is covered, we plug the holes!
-        Region holes(clip.subtract(under));
-        if (!holes.isEmpty()) {
-            clearWithOpenGL(holes);
-        }
-        return;
-    }
-    drawWithOpenGL(clip, mTextures[index]);
-}
-
-sp<GraphicBuffer> Layer::requestBuffer(int index, int usage)
-{
-    sp<GraphicBuffer> buffer;
-
-    // this ensures our client doesn't go away while we're accessing
-    // the shared area.
-    sp<Client> ourClient(client.promote());
-    if (ourClient == 0) {
-        // oops, the client is already gone
-        return buffer;
-    }
-
-    /*
-     * This is called from the client's Surface::dequeue(). This can happen
-     * at any time, especially while we're in the middle of using the
-     * buffer 'index' as our front buffer.
-     * 
-     * Make sure the buffer we're resizing is not the front buffer and has been
-     * dequeued. Once this condition is asserted, we are guaranteed that this
-     * buffer cannot become the front buffer under our feet, since we're called
-     * from Surface::dequeue()
-     */
-    status_t err = lcblk->assertReallocate(index);
-    LOGE_IF(err, "assertReallocate(%d) failed (%s)", index, strerror(-err));
-    if (err != NO_ERROR) {
-        // the surface may have died
-        return buffer;
-    }
-
-    uint32_t w, h;
-    { // scope for the lock
-        Mutex::Autolock _l(mLock);
-        w = mWidth;
-        h = mHeight;
-        buffer = mBuffers[index];
-        
-        // destroy() could have been called before we get here, we log it
-        // because it's uncommon, and the code below should handle it
-        LOGW_IF(buffer==0, 
-                "mBuffers[%d] is null (mWidth=%d, mHeight=%d)",
-                index, w, h);
-        
-        mBuffers[index].clear();
-    }
-
-    const uint32_t effectiveUsage = getEffectiveUsage(usage);
-    if (buffer!=0 && buffer->getStrongCount() == 1) {
-        err = buffer->reallocate(w, h, mFormat, effectiveUsage);
-    } else {
-        // here we have to reallocate a new buffer because we could have a
-        // client in our process with a reference to it (eg: status bar),
-        // and we can't release the handle under its feet.
-        buffer.clear();
-        buffer = new GraphicBuffer(w, h, mFormat, effectiveUsage);
-        err = buffer->initCheck();
-    }
-
-    if (err || buffer->handle == 0) {
-        LOGE_IF(err || buffer->handle == 0,
-                "Layer::requestBuffer(this=%p), index=%d, w=%d, h=%d failed (%s)",
-                this, index, w, h, strerror(-err));
-    } else {
-        LOGD_IF(DEBUG_RESIZE,
-                "Layer::requestBuffer(this=%p), index=%d, w=%d, h=%d, handle=%p",
-                this, index, w, h, buffer->handle);
-    }
-
-    if (err == NO_ERROR && buffer->handle != 0) {
-        Mutex::Autolock _l(mLock);
-        if (mWidth && mHeight) {
-            // and we have new buffer
-            mBuffers[index] = buffer;
-            // texture is now dirty...
-            mTextures[index].dirty = true;
-        } else {
-            // oops we got killed while we were allocating the buffer
-            buffer.clear();
-        }
-    }
-    return buffer;
-}
-
-uint32_t Layer::getEffectiveUsage(uint32_t usage) const
-{
-    /*
-     *  buffers used for software rendering, but h/w composition
-     *  are allocated with SW_READ_OFTEN | SW_WRITE_OFTEN | HW_TEXTURE
-     *
-     *  buffers used for h/w rendering and h/w composition
-     *  are allocated with  HW_RENDER | HW_TEXTURE
-     *
-     *  buffers used with h/w rendering and either NPOT or no egl_image_ext
-     *  are allocated with SW_READ_RARELY | HW_RENDER
-     *
-     */
-
-    if (mSecure) {
-        // secure buffer, don't store it into the GPU
-        usage = GraphicBuffer::USAGE_SW_READ_OFTEN |
-                GraphicBuffer::USAGE_SW_WRITE_OFTEN;
-    } else {
-        // it's allowed to modify the usage flags here, but generally
-        // the requested flags should be honored.
-        if (mNoEGLImageForSwBuffers) {
-            if (usage & GraphicBuffer::USAGE_HW_MASK) {
-                // request EGLImage for h/w buffers only
-                usage |= GraphicBuffer::USAGE_HW_TEXTURE;
-            }
-        } else {
-            // request EGLImage for all buffers
-            usage |= GraphicBuffer::USAGE_HW_TEXTURE;
-        }
-    }
-    return usage;
-}
-
-uint32_t Layer::doTransaction(uint32_t flags)
-{
-    const Layer::State& front(drawingState());
-    const Layer::State& temp(currentState());
-
-    if ((front.requested_w != temp.requested_w) || 
-        (front.requested_h != temp.requested_h)) {
-        // the size changed, we need to ask our client to request a new buffer
-        LOGD_IF(DEBUG_RESIZE,
-                    "resize (layer=%p), requested (%dx%d), "
-                    "drawing (%d,%d), (%dx%d), (%dx%d)",
-                    this, 
-                    int(temp.requested_w), int(temp.requested_h),
-                    int(front.requested_w), int(front.requested_h),
-                    int(mBuffers[0]->getWidth()), int(mBuffers[0]->getHeight()),
-                    int(mBuffers[1]->getWidth()), int(mBuffers[1]->getHeight()));
-
-        // we're being resized and there is a freeze display request,
-        // acquire a freeze lock, so that the screen stays put
-        // until we've redrawn at the new size; this is to avoid
-        // glitches upon orientation changes.
-        if (mFlinger->hasFreezeRequest()) {
-            // if the surface is hidden, don't try to acquire the
-            // freeze lock, since hidden surfaces may never redraw
-            if (!(front.flags & ISurfaceComposer::eLayerHidden)) {
-                mFreezeLock = mFlinger->getFreezeLock();
-            }
-        }
-
-        // this will make sure LayerBase::doTransaction doesn't update
-        // the drawing state's size
-        Layer::State& editDraw(mDrawingState);
-        editDraw.requested_w = temp.requested_w;
-        editDraw.requested_h = temp.requested_h;
-
-        // record the new size, form this point on, when the client request a
-        // buffer, it'll get the new size.
-        setDrawingSize(temp.requested_w, temp.requested_h);
-
-        // all buffers need reallocation
-        lcblk->reallocate();
-    }
-
-    if (temp.sequence != front.sequence) {
-        if (temp.flags & ISurfaceComposer::eLayerHidden || temp.alpha == 0) {
-            // this surface is now hidden, so it shouldn't hold a freeze lock
-            // (it may never redraw, which is fine if it is hidden)
-            mFreezeLock.clear();
-        }
-    }
-        
-    return LayerBase::doTransaction(flags);
-}
-
-void Layer::setDrawingSize(uint32_t w, uint32_t h) {
-    Mutex::Autolock _l(mLock);
-    mWidth = w;
-    mHeight = h;
-}
-
-// ----------------------------------------------------------------------------
-// pageflip handling...
-// ----------------------------------------------------------------------------
-
-void Layer::lockPageFlip(bool& recomputeVisibleRegions)
-{
-    ssize_t buf = lcblk->retireAndLock();
-    if (buf < NO_ERROR) {
-        //LOGW("nothing to retire (%s)", strerror(-buf));
-        // NOTE: here the buffer is locked because we will used 
-        // for composition later in the loop
-        return;
-    }
-
-    // ouch, this really should never happen
-    if (uint32_t(buf)>=NUM_BUFFERS) {
-        LOGE("retireAndLock() buffer index (%d) out of range", buf);
-        mPostedDirtyRegion.clear();
-        return;
-    }
-
-    // we retired a buffer, which becomes the new front buffer
-    mFrontBufferIndex = buf;
-
-    // get the dirty region
-    sp<GraphicBuffer> newFrontBuffer(getBuffer(buf));
-    if (newFrontBuffer != NULL) {
-        // compute the posted region
-        const Region dirty(lcblk->getDirtyRegion(buf));
-        mPostedDirtyRegion = dirty.intersect( newFrontBuffer->getBounds() );
-
-        // update the layer size and release freeze-lock
-        const Layer::State& front(drawingState());
-        if (newFrontBuffer->getWidth()  == front.requested_w &&
-            newFrontBuffer->getHeight() == front.requested_h)
-        {
-            if ((front.w != front.requested_w) ||
-                (front.h != front.requested_h))
-            {
-                // Here we pretend the transaction happened by updating the
-                // current and drawing states. Drawing state is only accessed
-                // in this thread, no need to have it locked
-                Layer::State& editDraw(mDrawingState);
-                editDraw.w = editDraw.requested_w;
-                editDraw.h = editDraw.requested_h;
-
-                // We also need to update the current state so that we don't
-                // end-up doing too much work during the next transaction.
-                // NOTE: We actually don't need hold the transaction lock here
-                // because State::w and State::h are only accessed from
-                // this thread
-                Layer::State& editTemp(currentState());
-                editTemp.w = editDraw.w;
-                editTemp.h = editDraw.h;
-
-                // recompute visible region
-                recomputeVisibleRegions = true;
-            }
-
-            // we now have the correct size, unfreeze the screen
-            mFreezeLock.clear();
-        }
-    } else {
-        // this should not happen unless we ran out of memory while
-        // allocating the buffer. we're hoping that things will get back
-        // to normal the next time the app tries to draw into this buffer.
-        // meanwhile, pretend the screen didn't update.
-        mPostedDirtyRegion.clear();
-    }
-
-    if (lcblk->getQueuedCount()) {
-        // signal an event if we have more buffers waiting
-        mFlinger->signalEvent();
-    }
-
-    if (!mPostedDirtyRegion.isEmpty()) {
-        reloadTexture( mPostedDirtyRegion );
-    }
-}
-
-void Layer::unlockPageFlip(
-        const Transform& planeTransform, Region& outDirtyRegion)
-{
-    Region dirtyRegion(mPostedDirtyRegion);
-    if (!dirtyRegion.isEmpty()) {
-        mPostedDirtyRegion.clear();
-        // The dirty region is given in the layer's coordinate space
-        // transform the dirty region by the surface's transformation
-        // and the global transformation.
-        const Layer::State& s(drawingState());
-        const Transform tr(planeTransform * s.transform);
-        dirtyRegion = tr.transform(dirtyRegion);
-
-        // At this point, the dirty region is in screen space.
-        // Make sure it's constrained by the visible region (which
-        // is in screen space as well).
-        dirtyRegion.andSelf(visibleRegionScreen);
-        outDirtyRegion.orSelf(dirtyRegion);
-    }
-    if (visibleRegionScreen.isEmpty()) {
-        // an invisible layer should not hold a freeze-lock
-        // (because it may never be updated and thereore never release it)
-        mFreezeLock.clear();
-    }
-}
-
-void Layer::finishPageFlip()
-{
-    status_t err = lcblk->unlock( mFrontBufferIndex );
-    LOGE_IF(err!=NO_ERROR, 
-            "layer %p, buffer=%d wasn't locked!",
-            this, mFrontBufferIndex);
-}
-
-// ---------------------------------------------------------------------------
-
-Layer::SurfaceLayer::SurfaceLayer(const sp<SurfaceFlinger>& flinger,
-        SurfaceID id, const sp<Layer>& owner)
-    : Surface(flinger, id, owner->getIdentity(), owner)
-{
-}
-
-Layer::SurfaceLayer::~SurfaceLayer()
-{
-}
-
-sp<GraphicBuffer> Layer::SurfaceLayer::requestBuffer(int index, int usage)
-{
-    sp<GraphicBuffer> buffer;
-    sp<Layer> owner(getOwner());
-    if (owner != 0) {
-        LOGE_IF(uint32_t(index)>=NUM_BUFFERS,
-                "getBuffer() index (%d) out of range", index);
-        if (uint32_t(index) < NUM_BUFFERS) {
-            buffer = owner->requestBuffer(index, usage);
-        }
-    }
-    return buffer;
-}
-
-// ---------------------------------------------------------------------------
-
-
-}; // namespace android
diff --git a/libs/surfaceflinger/Layer.h b/libs/surfaceflinger/Layer.h
deleted file mode 100644
index 743afb4..0000000
--- a/libs/surfaceflinger/Layer.h
+++ /dev/null
@@ -1,134 +0,0 @@
-/*
- * Copyright (C) 2007 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#ifndef ANDROID_LAYER_H
-#define ANDROID_LAYER_H
-
-#include <stdint.h>
-#include <sys/types.h>
-
-#include <ui/GraphicBuffer.h>
-#include <ui/PixelFormat.h>
-#include <pixelflinger/pixelflinger.h>
-
-#include <EGL/egl.h>
-#include <EGL/eglext.h>
-#include <GLES/gl.h>
-#include <GLES/glext.h>
-
-#include "LayerBase.h"
-#include "Transform.h"
-
-namespace android {
-
-// ---------------------------------------------------------------------------
-
-class Client;
-class FreezeLock;
-
-// ---------------------------------------------------------------------------
-
-const size_t NUM_BUFFERS = 2;
-
-class Layer : public LayerBaseClient
-{
-public:    
-    static const uint32_t typeInfo;
-    static const char* const typeID;
-    virtual char const* getTypeID() const { return typeID; }
-    virtual uint32_t getTypeInfo() const { return typeInfo; }
-    
-                 Layer(SurfaceFlinger* flinger, DisplayID display,
-                         const sp<Client>& client, int32_t i);
-
-        virtual ~Layer();
-
-    status_t setBuffers(uint32_t w, uint32_t h, 
-            PixelFormat format, uint32_t flags=0);
-
-    void setDrawingSize(uint32_t w, uint32_t h);
-
-    virtual void onDraw(const Region& clip) const;
-    virtual uint32_t doTransaction(uint32_t transactionFlags);
-    virtual void lockPageFlip(bool& recomputeVisibleRegions);
-    virtual void unlockPageFlip(const Transform& planeTransform, Region& outDirtyRegion);
-    virtual void finishPageFlip();
-    virtual bool needsBlending() const      { return mNeedsBlending; }
-    virtual bool needsDithering() const     { return mNeedsDithering; }
-    virtual bool isSecure() const           { return mSecure; }
-    virtual sp<Surface> createSurface() const;
-    virtual status_t ditch();
-    
-    // only for debugging
-    inline sp<GraphicBuffer> getBuffer(int i) { return mBuffers[i]; }
-    // only for debugging
-    inline const sp<FreezeLock>&  getFreezeLock() const { return mFreezeLock; }
-    // only for debugging
-    inline PixelFormat pixelFormat() const { return mFormat; }
-    // only for debugging
-    inline int getFrontBufferIndex() const { return mFrontBufferIndex; }
-
-private:
-    inline sp<GraphicBuffer> getFrontBufferLocked() {
-        return mBuffers[mFrontBufferIndex];
-    }
- 
-    void reloadTexture(const Region& dirty);
-
-    uint32_t getEffectiveUsage(uint32_t usage) const;
-
-    sp<GraphicBuffer> requestBuffer(int index, int usage);
-    void destroy();
-
-    class SurfaceLayer : public LayerBaseClient::Surface {
-    public:
-        SurfaceLayer(const sp<SurfaceFlinger>& flinger,
-                SurfaceID id, const sp<Layer>& owner);
-        ~SurfaceLayer();
-    private:
-        virtual sp<GraphicBuffer> requestBuffer(int index, int usage);
-        sp<Layer> getOwner() const {
-            return static_cast<Layer*>(Surface::getOwner().get());
-        }
-    };
-    friend class SurfaceLayer;
-    
-    sp<Surface>             mSurface;
-
-            bool            mSecure;
-            bool            mNoEGLImageForSwBuffers;
-            int32_t         mFrontBufferIndex;
-            bool            mNeedsBlending;
-            bool            mNeedsDithering;
-            Region          mPostedDirtyRegion;
-            sp<FreezeLock>  mFreezeLock;
-            PixelFormat     mFormat;
-            
-            // protected by mLock
-            sp<GraphicBuffer> mBuffers[NUM_BUFFERS];
-            Texture         mTextures[NUM_BUFFERS];
-            sp<GraphicBuffer> mHybridBuffer;
-            uint32_t        mWidth;
-            uint32_t        mHeight;
-            
-   mutable Mutex mLock;
-};
-
-// ---------------------------------------------------------------------------
-
-}; // namespace android
-
-#endif // ANDROID_LAYER_H
diff --git a/libs/surfaceflinger/LayerBase.cpp b/libs/surfaceflinger/LayerBase.cpp
deleted file mode 100644
index a8b735e..0000000
--- a/libs/surfaceflinger/LayerBase.cpp
+++ /dev/null
@@ -1,829 +0,0 @@
-/*
- * Copyright (C) 2007 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#include <stdlib.h>
-#include <stdint.h>
-#include <sys/types.h>
-
-#include <utils/Errors.h>
-#include <utils/Log.h>
-#include <binder/IPCThreadState.h>
-#include <binder/IServiceManager.h>
-
-#include <GLES/gl.h>
-#include <GLES/glext.h>
-
-#include <hardware/hardware.h>
-
-#include "clz.h"
-#include "LayerBase.h"
-#include "SurfaceFlinger.h"
-#include "DisplayHardware/DisplayHardware.h"
-
-
-namespace android {
-
-// ---------------------------------------------------------------------------
-
-const uint32_t LayerBase::typeInfo = 1;
-const char* const LayerBase::typeID = "LayerBase";
-
-const uint32_t LayerBaseClient::typeInfo = LayerBase::typeInfo | 2;
-const char* const LayerBaseClient::typeID = "LayerBaseClient";
-
-// ---------------------------------------------------------------------------
-
-LayerBase::LayerBase(SurfaceFlinger* flinger, DisplayID display)
-    : dpy(display), contentDirty(false),
-      mFlinger(flinger),
-      mTransformed(false),
-      mUseLinearFiltering(false),
-      mOrientation(0),
-      mLeft(0), mTop(0),
-      mTransactionFlags(0),
-      mPremultipliedAlpha(true), mDebug(false),
-      mInvalidate(0)
-{
-    const DisplayHardware& hw(flinger->graphicPlane(0).displayHardware());
-    mFlags = hw.getFlags();
-}
-
-LayerBase::~LayerBase()
-{
-}
-
-void LayerBase::setName(const String8& name) {
-    mName = name;
-}
-
-String8 LayerBase::getName() const {
-    return mName;
-}
-
-const GraphicPlane& LayerBase::graphicPlane(int dpy) const
-{ 
-    return mFlinger->graphicPlane(dpy);
-}
-
-GraphicPlane& LayerBase::graphicPlane(int dpy)
-{
-    return mFlinger->graphicPlane(dpy); 
-}
-
-void LayerBase::initStates(uint32_t w, uint32_t h, uint32_t flags)
-{
-    uint32_t layerFlags = 0;
-    if (flags & ISurfaceComposer::eHidden)
-        layerFlags = ISurfaceComposer::eLayerHidden;
-
-    if (flags & ISurfaceComposer::eNonPremultiplied)
-        mPremultipliedAlpha = false;
-
-    mCurrentState.z             = 0;
-    mCurrentState.w             = w;
-    mCurrentState.h             = h;
-    mCurrentState.requested_w   = w;
-    mCurrentState.requested_h   = h;
-    mCurrentState.alpha         = 0xFF;
-    mCurrentState.flags         = layerFlags;
-    mCurrentState.sequence      = 0;
-    mCurrentState.transform.set(0, 0);
-
-    // drawing state & current state are identical
-    mDrawingState = mCurrentState;
-}
-
-void LayerBase::commitTransaction() {
-    mDrawingState = mCurrentState;
-}
-void LayerBase::forceVisibilityTransaction() {
-    // this can be called without SurfaceFlinger.mStateLock, but if we
-    // can atomically increment the sequence number, it doesn't matter.
-    android_atomic_inc(&mCurrentState.sequence);
-    requestTransaction();
-}
-bool LayerBase::requestTransaction() {
-    int32_t old = setTransactionFlags(eTransactionNeeded);
-    return ((old & eTransactionNeeded) == 0);
-}
-uint32_t LayerBase::getTransactionFlags(uint32_t flags) {
-    return android_atomic_and(~flags, &mTransactionFlags) & flags;
-}
-uint32_t LayerBase::setTransactionFlags(uint32_t flags) {
-    return android_atomic_or(flags, &mTransactionFlags);
-}
-
-bool LayerBase::setPosition(int32_t x, int32_t y) {
-    if (mCurrentState.transform.tx() == x && mCurrentState.transform.ty() == y)
-        return false;
-    mCurrentState.sequence++;
-    mCurrentState.transform.set(x, y);
-    requestTransaction();
-    return true;
-}
-bool LayerBase::setLayer(uint32_t z) {
-    if (mCurrentState.z == z)
-        return false;
-    mCurrentState.sequence++;
-    mCurrentState.z = z;
-    requestTransaction();
-    return true;
-}
-bool LayerBase::setSize(uint32_t w, uint32_t h) {
-    if (mCurrentState.requested_w == w && mCurrentState.requested_h == h)
-        return false;
-    mCurrentState.requested_w = w;
-    mCurrentState.requested_h = h;
-    requestTransaction();
-    return true;
-}
-bool LayerBase::setAlpha(uint8_t alpha) {
-    if (mCurrentState.alpha == alpha)
-        return false;
-    mCurrentState.sequence++;
-    mCurrentState.alpha = alpha;
-    requestTransaction();
-    return true;
-}
-bool LayerBase::setMatrix(const layer_state_t::matrix22_t& matrix) {
-    // TODO: check the matrix has changed
-    mCurrentState.sequence++;
-    mCurrentState.transform.set(
-            matrix.dsdx, matrix.dsdy, matrix.dtdx, matrix.dtdy);
-    requestTransaction();
-    return true;
-}
-bool LayerBase::setTransparentRegionHint(const Region& transparent) {
-    // TODO: check the region has changed
-    mCurrentState.sequence++;
-    mCurrentState.transparentRegion = transparent;
-    requestTransaction();
-    return true;
-}
-bool LayerBase::setFlags(uint8_t flags, uint8_t mask) {
-    const uint32_t newFlags = (mCurrentState.flags & ~mask) | (flags & mask);
-    if (mCurrentState.flags == newFlags)
-        return false;
-    mCurrentState.sequence++;
-    mCurrentState.flags = newFlags;
-    requestTransaction();
-    return true;
-}
-
-Rect LayerBase::visibleBounds() const
-{
-    return mTransformedBounds;
-}      
-
-void LayerBase::setVisibleRegion(const Region& visibleRegion) {
-    // always called from main thread
-    visibleRegionScreen = visibleRegion;
-}
-
-void LayerBase::setCoveredRegion(const Region& coveredRegion) {
-    // always called from main thread
-    coveredRegionScreen = coveredRegion;
-}
-
-uint32_t LayerBase::doTransaction(uint32_t flags)
-{
-    const Layer::State& front(drawingState());
-    const Layer::State& temp(currentState());
-
-    if ((front.requested_w != temp.requested_w) ||
-        (front.requested_h != temp.requested_h))  {
-        // resize the layer, set the physical size to the requested size
-        Layer::State& editTemp(currentState());
-        editTemp.w = temp.requested_w;
-        editTemp.h = temp.requested_h;
-    }
-
-    if ((front.w != temp.w) || (front.h != temp.h)) {
-        // invalidate and recompute the visible regions if needed
-        flags |= Layer::eVisibleRegion;
-    }
-
-    if (temp.sequence != front.sequence) {
-        // invalidate and recompute the visible regions if needed
-        flags |= eVisibleRegion;
-        this->contentDirty = true;
-
-        const bool linearFiltering = mUseLinearFiltering;
-        mUseLinearFiltering = false;
-        if (!(mFlags & DisplayHardware::SLOW_CONFIG)) {
-            // we may use linear filtering, if the matrix scales us
-            const uint8_t type = temp.transform.getType();
-            if (!temp.transform.preserveRects() || (type >= Transform::SCALE)) {
-                mUseLinearFiltering = true;
-            }
-        }
-    }
-
-    // Commit the transaction
-    commitTransaction();
-    return flags;
-}
-
-void LayerBase::validateVisibility(const Transform& planeTransform)
-{
-    const Layer::State& s(drawingState());
-    const Transform tr(planeTransform * s.transform);
-    const bool transformed = tr.transformed();
-   
-    uint32_t w = s.w;
-    uint32_t h = s.h;    
-    tr.transform(mVertices[0], 0, 0);
-    tr.transform(mVertices[1], 0, h);
-    tr.transform(mVertices[2], w, h);
-    tr.transform(mVertices[3], w, 0);
-    if (UNLIKELY(transformed)) {
-        // NOTE: here we could also punt if we have too many rectangles
-        // in the transparent region
-        if (tr.preserveRects()) {
-            // transform the transparent region
-            transparentRegionScreen = tr.transform(s.transparentRegion);
-        } else {
-            // transformation too complex, can't do the transparent region
-            // optimization.
-            transparentRegionScreen.clear();
-        }
-    } else {
-        transparentRegionScreen = s.transparentRegion;
-    }
-
-    // cache a few things...
-    mOrientation = tr.getOrientation();
-    mTransformedBounds = tr.makeBounds(w, h);
-    mTransformed = transformed;
-    mLeft = tr.tx();
-    mTop  = tr.ty();
-}
-
-void LayerBase::lockPageFlip(bool& recomputeVisibleRegions)
-{
-}
-
-void LayerBase::unlockPageFlip(
-        const Transform& planeTransform, Region& outDirtyRegion)
-{
-    if ((android_atomic_and(~1, &mInvalidate)&1) == 1) {
-        outDirtyRegion.orSelf(visibleRegionScreen);
-    }
-}
-
-void LayerBase::finishPageFlip()
-{
-}
-
-void LayerBase::invalidate()
-{
-    if ((android_atomic_or(1, &mInvalidate)&1) == 0) {
-        mFlinger->signalEvent();
-    }
-}
-
-void LayerBase::drawRegion(const Region& reg) const
-{
-    Region::const_iterator it = reg.begin();
-    Region::const_iterator const end = reg.end();
-    if (it != end) {
-        Rect r;
-        const DisplayHardware& hw(graphicPlane(0).displayHardware());
-        const int32_t fbWidth  = hw.getWidth();
-        const int32_t fbHeight = hw.getHeight();
-        const GLshort vertices[][2] = { { 0, 0 }, { fbWidth, 0 }, 
-                { fbWidth, fbHeight }, { 0, fbHeight }  };
-        glVertexPointer(2, GL_SHORT, 0, vertices);
-        while (it != end) {
-            const Rect& r = *it++;
-            const GLint sy = fbHeight - (r.top + r.height());
-            glScissor(r.left, sy, r.width(), r.height());
-            glDrawArrays(GL_TRIANGLE_FAN, 0, 4); 
-        }
-    }
-}
-
-void LayerBase::draw(const Region& inClip) const
-{
-    // invalidate the region we'll update
-    Region clip(inClip);  // copy-on-write, so no-op most of the time
-
-    // Remove the transparent area from the clipping region
-    const State& s = drawingState();
-    if (LIKELY(!s.transparentRegion.isEmpty())) {
-        clip.subtract(transparentRegionScreen);
-        if (clip.isEmpty()) {
-            // usually this won't happen because this should be taken care of
-            // by SurfaceFlinger::computeVisibleRegions()
-            return;
-        }        
-    }
-
-    // reset GL state
-    glEnable(GL_SCISSOR_TEST);
-
-    onDraw(clip);
-
-    /*
-    glDisable(GL_TEXTURE_2D);
-    glDisable(GL_DITHER);
-    glEnable(GL_BLEND);
-    glBlendFunc(GL_ONE, GL_ONE_MINUS_SRC_ALPHA);
-    glColor4x(0, 0x8000, 0, 0x10000);
-    drawRegion(transparentRegionScreen);
-    glDisable(GL_BLEND);
-    */
-}
-
-GLuint LayerBase::createTexture() const
-{
-    GLuint textureName = -1;
-    glGenTextures(1, &textureName);
-    glBindTexture(GL_TEXTURE_2D, textureName);
-    glTexParameterx(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
-    glTexParameterx(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
-    glTexParameterx(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
-    glTexParameterx(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
-    return textureName;
-}
-
-void LayerBase::clearWithOpenGL(const Region& clip, GLclampx red,
-                                GLclampx green, GLclampx blue,
-                                GLclampx alpha) const
-{
-    const DisplayHardware& hw(graphicPlane(0).displayHardware());
-    const uint32_t fbHeight = hw.getHeight();
-    glColor4x(red,green,blue,alpha);
-    glDisable(GL_TEXTURE_2D);
-    glDisable(GL_BLEND);
-    glDisable(GL_DITHER);
-
-    Region::const_iterator it = clip.begin();
-    Region::const_iterator const end = clip.end();
-    glEnable(GL_SCISSOR_TEST);
-    glVertexPointer(2, GL_FIXED, 0, mVertices);
-    while (it != end) {
-        const Rect& r = *it++;
-        const GLint sy = fbHeight - (r.top + r.height());
-        glScissor(r.left, sy, r.width(), r.height());
-        glDrawArrays(GL_TRIANGLE_FAN, 0, 4); 
-    }
-}
-
-void LayerBase::clearWithOpenGL(const Region& clip) const
-{
-    clearWithOpenGL(clip,0,0,0,0);
-}
-
-void LayerBase::drawWithOpenGL(const Region& clip, const Texture& texture) const
-{
-    const DisplayHardware& hw(graphicPlane(0).displayHardware());
-    const uint32_t fbHeight = hw.getHeight();
-    const State& s(drawingState());
-    
-    // bind our texture
-    validateTexture(texture.name);
-    uint32_t width  = texture.width; 
-    uint32_t height = texture.height;
-    
-    glEnable(GL_TEXTURE_2D);
-
-    if (UNLIKELY(s.alpha < 0xFF)) {
-        // We have an alpha-modulation. We need to modulate all
-        // texture components by alpha because we're always using 
-        // premultiplied alpha.
-        
-        // If the texture doesn't have an alpha channel we can
-        // use REPLACE and switch to non premultiplied alpha
-        // blending (SRCA/ONE_MINUS_SRCA).
-        
-        GLenum env, src;
-        if (needsBlending()) {
-            env = GL_MODULATE;
-            src = mPremultipliedAlpha ? GL_ONE : GL_SRC_ALPHA;
-        } else {
-            env = GL_REPLACE;
-            src = GL_SRC_ALPHA;
-        }
-        const GGLfixed alpha = (s.alpha << 16)/255;
-        glColor4x(alpha, alpha, alpha, alpha);
-        glEnable(GL_BLEND);
-        glBlendFunc(src, GL_ONE_MINUS_SRC_ALPHA);
-        glTexEnvx(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, env);
-    } else {
-        glTexEnvx(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_REPLACE);
-        glColor4x(0x10000, 0x10000, 0x10000, 0x10000);
-        if (needsBlending()) {
-            GLenum src = mPremultipliedAlpha ? GL_ONE : GL_SRC_ALPHA;
-            glEnable(GL_BLEND);
-            glBlendFunc(src, GL_ONE_MINUS_SRC_ALPHA);
-        } else {
-            glDisable(GL_BLEND);
-        }
-    }
-
-    Region::const_iterator it = clip.begin();
-    Region::const_iterator const end = clip.end();
-
-    //StopWatch watch("GL transformed");
-    const GLfixed texCoords[4][2] = {
-            { 0,        0 },
-            { 0,        0x10000 },
-            { 0x10000,  0x10000 },
-            { 0x10000,  0 }
-    };
-
-    glMatrixMode(GL_TEXTURE);
-    glLoadIdentity();
-
-    // the texture's source is rotated
-    switch (texture.transform) {
-        case HAL_TRANSFORM_ROT_90:
-            glTranslatef(0, 1, 0);
-            glRotatef(-90, 0, 0, 1);
-            break;
-        case HAL_TRANSFORM_ROT_180:
-            glTranslatef(1, 1, 0);
-            glRotatef(-180, 0, 0, 1);
-            break;
-        case HAL_TRANSFORM_ROT_270:
-            glTranslatef(1, 0, 0);
-            glRotatef(-270, 0, 0, 1);
-            break;
-    }
-
-    if (texture.NPOTAdjust) {
-        glScalef(texture.wScale, texture.hScale, 1.0f);
-    }
-
-    glEnableClientState(GL_TEXTURE_COORD_ARRAY);
-    glVertexPointer(2, GL_FIXED, 0, mVertices);
-    glTexCoordPointer(2, GL_FIXED, 0, texCoords);
-
-    while (it != end) {
-        const Rect& r = *it++;
-        const GLint sy = fbHeight - (r.top + r.height());
-        glScissor(r.left, sy, r.width(), r.height());
-        glDrawArrays(GL_TRIANGLE_FAN, 0, 4);
-    }
-    glDisableClientState(GL_TEXTURE_COORD_ARRAY);
-}
-
-void LayerBase::validateTexture(GLint textureName) const
-{
-    glBindTexture(GL_TEXTURE_2D, textureName);
-    // TODO: reload the texture if needed
-    // this is currently done in loadTexture() below
-    if (mUseLinearFiltering) {
-        glTexParameterx(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
-        glTexParameterx(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
-    } else {
-        glTexParameterx(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
-        glTexParameterx(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
-    }
-
-    if (needsDithering()) {
-        glEnable(GL_DITHER);
-    } else {
-        glDisable(GL_DITHER);
-    }
-}
-
-bool LayerBase::isSupportedYuvFormat(int format) const
-{
-    switch (format) {
-        case HAL_PIXEL_FORMAT_YCbCr_422_SP:
-        case HAL_PIXEL_FORMAT_YCbCr_420_SP:
-        case HAL_PIXEL_FORMAT_YCbCr_422_P:
-        case HAL_PIXEL_FORMAT_YCbCr_420_P:
-        case HAL_PIXEL_FORMAT_YCbCr_422_I:
-        case HAL_PIXEL_FORMAT_YCbCr_420_I:
-        case HAL_PIXEL_FORMAT_YCrCb_420_SP:
-            return true;
-    }
-    return false;
-}
-
-void LayerBase::loadTexture(Texture* texture, 
-        const Region& dirty, const GGLSurface& t) const
-{
-    if (texture->name == -1U) {
-        // uh?
-        return;
-    }
-
-    glBindTexture(GL_TEXTURE_2D, texture->name);
-
-    /*
-     * In OpenGL ES we can't specify a stride with glTexImage2D (however,
-     * GL_UNPACK_ALIGNMENT is a limited form of stride).
-     * So if the stride here isn't representable with GL_UNPACK_ALIGNMENT, we
-     * need to do something reasonable (here creating a bigger texture).
-     * 
-     * extra pixels = (((stride - width) * pixelsize) / GL_UNPACK_ALIGNMENT);
-     * 
-     * This situation doesn't happen often, but some h/w have a limitation
-     * for their framebuffer (eg: must be multiple of 8 pixels), and
-     * we need to take that into account when using these buffers as
-     * textures.
-     *
-     * This should never be a problem with POT textures
-     */
-    
-    int unpack = __builtin_ctz(t.stride * bytesPerPixel(t.format));
-    unpack = 1 << ((unpack > 3) ? 3 : unpack);
-    glPixelStorei(GL_UNPACK_ALIGNMENT, unpack);
-    
-    /*
-     * round to POT if needed 
-     */
-    if (!(mFlags & DisplayHardware::NPOT_EXTENSION)) {
-        texture->NPOTAdjust = true;
-    }
-    
-    if (texture->NPOTAdjust) {
-        // find the smallest power-of-two that will accommodate our surface
-        texture->potWidth  = 1 << (31 - clz(t.width));
-        texture->potHeight = 1 << (31 - clz(t.height));
-        if (texture->potWidth  < t.width)  texture->potWidth  <<= 1;
-        if (texture->potHeight < t.height) texture->potHeight <<= 1;
-        texture->wScale = float(t.width)  / texture->potWidth;
-        texture->hScale = float(t.height) / texture->potHeight;
-    } else {
-        texture->potWidth  = t.width;
-        texture->potHeight = t.height;
-    }
-
-    Rect bounds(dirty.bounds());
-    GLvoid* data = 0;
-    if (texture->width != t.width || texture->height != t.height) {
-        texture->width  = t.width;
-        texture->height = t.height;
-
-        // texture size changed, we need to create a new one
-        bounds.set(Rect(t.width, t.height));
-        if (t.width  == texture->potWidth &&
-            t.height == texture->potHeight) {
-            // we can do it one pass
-            data = t.data;
-        }
-
-        if (t.format == HAL_PIXEL_FORMAT_RGB_565) {
-            glTexImage2D(GL_TEXTURE_2D, 0,
-                    GL_RGB, texture->potWidth, texture->potHeight, 0,
-                    GL_RGB, GL_UNSIGNED_SHORT_5_6_5, data);
-        } else if (t.format == HAL_PIXEL_FORMAT_RGBA_4444) {
-            glTexImage2D(GL_TEXTURE_2D, 0,
-                    GL_RGBA, texture->potWidth, texture->potHeight, 0,
-                    GL_RGBA, GL_UNSIGNED_SHORT_4_4_4_4, data);
-        } else if (t.format == HAL_PIXEL_FORMAT_RGBA_8888 ||
-                   t.format == HAL_PIXEL_FORMAT_RGBX_8888) {
-            glTexImage2D(GL_TEXTURE_2D, 0,
-                    GL_RGBA, texture->potWidth, texture->potHeight, 0,
-                    GL_RGBA, GL_UNSIGNED_BYTE, data);
-        } else if (isSupportedYuvFormat(t.format)) {
-            // just show the Y plane of YUV buffers
-            glTexImage2D(GL_TEXTURE_2D, 0,
-                    GL_LUMINANCE, texture->potWidth, texture->potHeight, 0,
-                    GL_LUMINANCE, GL_UNSIGNED_BYTE, data);
-        } else {
-            // oops, we don't handle this format!
-            LOGE("layer %p, texture=%d, using format %d, which is not "
-                 "supported by the GL", this, texture->name, t.format);
-        }
-    }
-    if (!data) {
-        if (t.format == HAL_PIXEL_FORMAT_RGB_565) {
-            glTexSubImage2D(GL_TEXTURE_2D, 0,
-                    0, bounds.top, t.width, bounds.height(),
-                    GL_RGB, GL_UNSIGNED_SHORT_5_6_5,
-                    t.data + bounds.top*t.stride*2);
-        } else if (t.format == HAL_PIXEL_FORMAT_RGBA_4444) {
-            glTexSubImage2D(GL_TEXTURE_2D, 0,
-                    0, bounds.top, t.width, bounds.height(),
-                    GL_RGBA, GL_UNSIGNED_SHORT_4_4_4_4,
-                    t.data + bounds.top*t.stride*2);
-        } else if (t.format == HAL_PIXEL_FORMAT_RGBA_8888 ||
-                   t.format == HAL_PIXEL_FORMAT_RGBX_8888) {
-            glTexSubImage2D(GL_TEXTURE_2D, 0,
-                    0, bounds.top, t.width, bounds.height(),
-                    GL_RGBA, GL_UNSIGNED_BYTE,
-                    t.data + bounds.top*t.stride*4);
-        } else if (isSupportedYuvFormat(t.format)) {
-            // just show the Y plane of YUV buffers
-            glTexSubImage2D(GL_TEXTURE_2D, 0,
-                    0, bounds.top, t.width, bounds.height(),
-                    GL_LUMINANCE, GL_UNSIGNED_BYTE,
-                    t.data + bounds.top*t.stride);
-        }
-    }
-}
-
-status_t LayerBase::initializeEglImage(
-        const sp<GraphicBuffer>& buffer, Texture* texture)
-{
-    status_t err = NO_ERROR;
-
-    // we need to recreate the texture
-    EGLDisplay dpy(mFlinger->graphicPlane(0).getEGLDisplay());
-
-    // free the previous image
-    if (texture->image != EGL_NO_IMAGE_KHR) {
-        eglDestroyImageKHR(dpy, texture->image);
-        texture->image = EGL_NO_IMAGE_KHR;
-    }
-
-    // construct an EGL_NATIVE_BUFFER_ANDROID
-    android_native_buffer_t* clientBuf = buffer->getNativeBuffer();
-
-    // create the new EGLImageKHR
-    const EGLint attrs[] = {
-            EGL_IMAGE_PRESERVED_KHR,    EGL_TRUE,
-            EGL_NONE,                   EGL_NONE
-    };
-    texture->image = eglCreateImageKHR(
-            dpy, EGL_NO_CONTEXT, EGL_NATIVE_BUFFER_ANDROID,
-            (EGLClientBuffer)clientBuf, attrs);
-
-    if (texture->image != EGL_NO_IMAGE_KHR) {
-        glBindTexture(GL_TEXTURE_2D, texture->name);
-        glEGLImageTargetTexture2DOES(GL_TEXTURE_2D,
-                (GLeglImageOES)texture->image);
-        GLint error = glGetError();
-        if (UNLIKELY(error != GL_NO_ERROR)) {
-            LOGE("layer=%p, glEGLImageTargetTexture2DOES(%p) "
-                 "failed err=0x%04x",
-                 this, texture->image, error);
-            err = INVALID_OPERATION;
-        } else {
-            // Everything went okay!
-            texture->NPOTAdjust = false;
-            texture->dirty  = false;
-            texture->width  = clientBuf->width;
-            texture->height = clientBuf->height;
-        }
-    } else {
-        LOGE("layer=%p, eglCreateImageKHR() failed. err=0x%4x",
-                this, eglGetError());
-        err = INVALID_OPERATION;
-    }
-    return err;
-}
-
-
-// ---------------------------------------------------------------------------
-
-int32_t LayerBaseClient::sIdentity = 0;
-
-LayerBaseClient::LayerBaseClient(SurfaceFlinger* flinger, DisplayID display,
-        const sp<Client>& client, int32_t i)
-    : LayerBase(flinger, display), lcblk(NULL), client(client), mIndex(i),
-      mIdentity(uint32_t(android_atomic_inc(&sIdentity)))
-{
-    lcblk = new SharedBufferServer(
-            client->ctrlblk, i, NUM_BUFFERS,
-            mIdentity);
-}
-
-void LayerBaseClient::onFirstRef()
-{    
-    sp<Client> client(this->client.promote());
-    if (client != 0) {
-        client->bindLayer(this, mIndex);
-    }
-}
-
-LayerBaseClient::~LayerBaseClient()
-{
-    sp<Client> client(this->client.promote());
-    if (client != 0) {
-        client->free(mIndex);
-    }
-    delete lcblk;
-}
-
-int32_t LayerBaseClient::serverIndex() const 
-{
-    sp<Client> client(this->client.promote());
-    if (client != 0) {
-        return (client->cid<<16)|mIndex;
-    }
-    return 0xFFFF0000 | mIndex;
-}
-
-sp<LayerBaseClient::Surface> LayerBaseClient::getSurface()
-{
-    sp<Surface> s;
-    Mutex::Autolock _l(mLock);
-    s = mClientSurface.promote();
-    if (s == 0) {
-        s = createSurface();
-        mClientSurface = s;
-    }
-    return s;
-}
-
-sp<LayerBaseClient::Surface> LayerBaseClient::createSurface() const
-{
-    return new Surface(mFlinger, clientIndex(), mIdentity,
-            const_cast<LayerBaseClient *>(this));
-}
-
-// called with SurfaceFlinger::mStateLock as soon as the layer is entered
-// in the purgatory list
-void LayerBaseClient::onRemoved()
-{
-    // wake up the condition
-    lcblk->setStatus(NO_INIT);
-}
-
-// ---------------------------------------------------------------------------
-
-LayerBaseClient::Surface::Surface(
-        const sp<SurfaceFlinger>& flinger,
-        SurfaceID id, int identity, 
-        const sp<LayerBaseClient>& owner) 
-    : mFlinger(flinger), mToken(id), mIdentity(identity), mOwner(owner)
-{
-}
-
-LayerBaseClient::Surface::~Surface() 
-{
-    /*
-     * This is a good place to clean-up all client resources 
-     */
-
-    // destroy client resources
-    sp<LayerBaseClient> layer = getOwner();
-    if (layer != 0) {
-        mFlinger->destroySurface(layer);
-    }
-}
-
-sp<LayerBaseClient> LayerBaseClient::Surface::getOwner() const {
-    sp<LayerBaseClient> owner(mOwner.promote());
-    return owner;
-}
-
-status_t LayerBaseClient::Surface::onTransact(
-        uint32_t code, const Parcel& data, Parcel* reply, uint32_t flags)
-{
-    switch (code) {
-        case REGISTER_BUFFERS:
-        case UNREGISTER_BUFFERS:
-        case CREATE_OVERLAY:
-        {
-            if (!mFlinger->mAccessSurfaceFlinger.checkCalling()) {
-                IPCThreadState* ipc = IPCThreadState::self();
-                const int pid = ipc->getCallingPid();
-                const int uid = ipc->getCallingUid();
-                LOGE("Permission Denial: "
-                        "can't access SurfaceFlinger pid=%d, uid=%d", pid, uid);
-                return PERMISSION_DENIED;
-            }
-        }
-    }
-    return BnSurface::onTransact(code, data, reply, flags);
-}
-
-sp<GraphicBuffer> LayerBaseClient::Surface::requestBuffer(int index, int usage) 
-{
-    return NULL; 
-}
-
-status_t LayerBaseClient::Surface::registerBuffers(
-        const ISurface::BufferHeap& buffers) 
-{ 
-    return INVALID_OPERATION; 
-}
-
-void LayerBaseClient::Surface::postBuffer(ssize_t offset) 
-{
-}
-
-void LayerBaseClient::Surface::unregisterBuffers() 
-{
-}
-
-sp<OverlayRef> LayerBaseClient::Surface::createOverlay(
-        uint32_t w, uint32_t h, int32_t format, int32_t orientation)
-{
-    return NULL;
-};
-
-// ---------------------------------------------------------------------------
-
-}; // namespace android
diff --git a/libs/surfaceflinger/LayerBase.h b/libs/surfaceflinger/LayerBase.h
deleted file mode 100644
index 62ec839..0000000
--- a/libs/surfaceflinger/LayerBase.h
+++ /dev/null
@@ -1,389 +0,0 @@
-/*
- * Copyright (C) 2007 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#ifndef ANDROID_LAYER_BASE_H
-#define ANDROID_LAYER_BASE_H
-
-#include <stdint.h>
-#include <sys/types.h>
-
-#include <EGL/egl.h>
-#include <EGL/eglext.h>
-#include <GLES/gl.h>
-
-#include <utils/RefBase.h>
-
-#include <ui/Region.h>
-#include <ui/Overlay.h>
-
-#include <surfaceflinger/ISurfaceFlingerClient.h>
-#include <private/surfaceflinger/SharedBufferStack.h>
-#include <private/surfaceflinger/LayerState.h>
-
-#include <pixelflinger/pixelflinger.h>
-
-#include "Transform.h"
-
-namespace android {
-
-// ---------------------------------------------------------------------------
-
-class DisplayHardware;
-class Client;
-class GraphicBuffer;
-class GraphicPlane;
-class SurfaceFlinger;
-
-// ---------------------------------------------------------------------------
-
-class LayerBase : public RefBase
-{
-    // poor man's dynamic_cast below
-    template<typename T>
-    struct getTypeInfoOfAnyType {
-        static uint32_t get() { return T::typeInfo; }
-    };
-
-    template<typename T>
-    struct getTypeInfoOfAnyType<T*> {
-        static uint32_t get() { return getTypeInfoOfAnyType<T>::get(); }
-    };
-
-public:
-    static const uint32_t typeInfo;
-    static const char* const typeID;
-    virtual char const* getTypeID() const { return typeID; }
-    virtual uint32_t getTypeInfo() const { return typeInfo; }
-    
-    template<typename T>
-    static T dynamicCast(LayerBase* base) {
-        uint32_t mostDerivedInfo = base->getTypeInfo();
-        uint32_t castToInfo = getTypeInfoOfAnyType<T>::get();
-        if ((mostDerivedInfo & castToInfo) == castToInfo)
-            return static_cast<T>(base);
-        return 0;
-    }
-
-    
-    LayerBase(SurfaceFlinger* flinger, DisplayID display);
-    
-    DisplayID           dpy;
-    mutable bool        contentDirty;
-            Region      visibleRegionScreen;
-            Region      transparentRegionScreen;
-            Region      coveredRegionScreen;
-            
-            struct State {
-                uint32_t        w;
-                uint32_t        h;
-                uint32_t        requested_w;
-                uint32_t        requested_h;
-                uint32_t        z;
-                uint8_t         alpha;
-                uint8_t         flags;
-                uint8_t         reserved[2];
-                int32_t         sequence;   // changes when visible regions can change
-                uint32_t        tint;
-                Transform       transform;
-                Region          transparentRegion;
-            };
-
-            void setName(const String8& name);
-            String8 getName() const;
-
-            // modify current state
-            bool setPosition(int32_t x, int32_t y);
-            bool setLayer(uint32_t z);
-            bool setSize(uint32_t w, uint32_t h);
-            bool setAlpha(uint8_t alpha);
-            bool setMatrix(const layer_state_t::matrix22_t& matrix);
-            bool setTransparentRegionHint(const Region& opaque);
-            bool setFlags(uint8_t flags, uint8_t mask);
-            
-            void commitTransaction();
-            bool requestTransaction();
-            void forceVisibilityTransaction();
-            
-            uint32_t getTransactionFlags(uint32_t flags);
-            uint32_t setTransactionFlags(uint32_t flags);
-            
-            Rect visibleBounds() const;
-            void drawRegion(const Region& reg) const;
-
-            void invalidate();
-
-    /**
-     * draw - performs some global clipping optimizations
-     * and calls onDraw().
-     * Typically this method is not overridden, instead implement onDraw()
-     * to perform the actual drawing.  
-     */
-    virtual void draw(const Region& clip) const;
-    
-    /**
-     * onDraw - draws the surface.
-     */
-    virtual void onDraw(const Region& clip) const = 0;
-    
-    /**
-     * initStates - called just after construction
-     */
-    virtual void initStates(uint32_t w, uint32_t h, uint32_t flags);
-    
-    /**
-     * doTransaction - process the transaction. This is a good place to figure
-     * out which attributes of the surface have changed.
-     */
-    virtual uint32_t doTransaction(uint32_t transactionFlags);
-    
-    /**
-     * setVisibleRegion - called to set the new visible region. This gives
-     * a chance to update the new visible region or record the fact it changed.
-     */
-    virtual void setVisibleRegion(const Region& visibleRegion);
-    
-    /**
-     * setCoveredRegion - called when the covered region changes. The covered
-     * region corresponds to any area of the surface that is covered
-     * (transparently or not) by another surface.
-     */
-    virtual void setCoveredRegion(const Region& coveredRegion);
-
-    /**
-     * validateVisibility - cache a bunch of things
-     */
-    virtual void validateVisibility(const Transform& globalTransform);
-
-    /**
-     * lockPageFlip - called each time the screen is redrawn and returns whether
-     * the visible regions need to be recomputed (this is a fairly heavy
-     * operation, so this should be set only if needed). Typically this is used
-     * to figure out if the content or size of a surface has changed.
-     */
-    virtual void lockPageFlip(bool& recomputeVisibleRegions);
-    
-    /**
-     * unlockPageFlip - called each time the screen is redrawn. updates the
-     * final dirty region wrt the planeTransform.
-     * At this point, all visible regions, surface position and size, etc... are
-     * correct.
-     */
-    virtual void unlockPageFlip(const Transform& planeTransform, Region& outDirtyRegion);
-    
-    /**
-     * finishPageFlip - called after all surfaces have drawn.
-     */
-    virtual void finishPageFlip();
-    
-    /**
-     * needsBlending - true if this surface needs blending
-     */
-    virtual bool needsBlending() const  { return false; }
-
-    /**
-     * needsDithering - true if this surface needs dithering
-     */
-    virtual bool needsDithering() const { return false; }
-
-    /**
-     * transformed -- true is this surface needs a to be transformed
-     */
-    virtual bool transformed() const    { return mTransformed; }
-
-    /**
-     * isSecure - true if this surface is secure, that is if it prevents
-     * screenshots or VNC servers.
-     */
-    virtual bool isSecure() const       { return false; }
-
-    /** Called from the main thread, when the surface is removed from the
-     * draw list */
-    virtual status_t ditch() { return NO_ERROR; }
-
-    /** called with the state lock when the surface is removed from the
-     *  current list */
-    virtual void onRemoved() { };
-    
-    
-    enum { // flags for doTransaction()
-        eVisibleRegion      = 0x00000002,
-    };
-
-
-    inline  const State&    drawingState() const    { return mDrawingState; }
-    inline  const State&    currentState() const    { return mCurrentState; }
-    inline  State&          currentState()          { return mCurrentState; }
-
-    static int compareCurrentStateZ(
-            sp<LayerBase> const * layerA,
-            sp<LayerBase> const * layerB) {
-        return layerA[0]->currentState().z - layerB[0]->currentState().z;
-    }
-
-    int32_t  getOrientation() const { return mOrientation; }
-    int  tx() const             { return mLeft; }
-    int  ty() const             { return mTop; }
-    
-protected:
-    const GraphicPlane& graphicPlane(int dpy) const;
-          GraphicPlane& graphicPlane(int dpy);
-
-          GLuint createTexture() const;
-    
-          struct Texture {
-              Texture() : name(-1U), width(0), height(0),
-                  image(EGL_NO_IMAGE_KHR), transform(0), 
-                  NPOTAdjust(false), dirty(true) { }
-              GLuint        name;
-              GLuint        width;
-              GLuint        height;
-              GLuint        potWidth;
-              GLuint        potHeight;
-              GLfloat       wScale;
-              GLfloat       hScale;
-              EGLImageKHR   image;
-              uint32_t      transform;
-              bool          NPOTAdjust;
-              bool          dirty;
-          };
-
-          void clearWithOpenGL(const Region& clip, GLclampx r, GLclampx g,
-                               GLclampx b, GLclampx alpha) const;
-          void clearWithOpenGL(const Region& clip) const;
-          void drawWithOpenGL(const Region& clip, const Texture& texture) const;
-          void loadTexture(Texture* texture, 
-                  const Region& dirty, const GGLSurface& t) const;
-          status_t initializeEglImage(
-                  const sp<GraphicBuffer>& buffer, Texture* texture);
-
-          bool isSupportedYuvFormat(int format) const;
-          
-                sp<SurfaceFlinger> mFlinger;
-                uint32_t        mFlags;
-
-                // cached during validateVisibility()
-                bool            mTransformed;
-                bool            mUseLinearFiltering;
-                int32_t         mOrientation;
-                GLfixed         mVertices[4][2];
-                Rect            mTransformedBounds;
-                int             mLeft;
-                int             mTop;
-            
-                // these are protected by an external lock
-                State           mCurrentState;
-                State           mDrawingState;
-    volatile    int32_t         mTransactionFlags;
-
-                // don't change, don't need a lock
-                bool            mPremultipliedAlpha;
-                String8         mName;
-    mutable     bool            mDebug;
-
-
-                // atomic
-    volatile    int32_t         mInvalidate;
-                
-
-protected:
-    virtual ~LayerBase();
-
-private:
-    LayerBase(const LayerBase& rhs);
-    void validateTexture(GLint textureName) const;
-};
-
-
-// ---------------------------------------------------------------------------
-
-class LayerBaseClient : public LayerBase
-{
-public:
-    class Surface;
-   static const uint32_t typeInfo;
-    static const char* const typeID;
-    virtual char const* getTypeID() const { return typeID; }
-    virtual uint32_t getTypeInfo() const { return typeInfo; }
-
-    // lcblk is (almost) only accessed from the main SF thread, in the places
-    // where it's not, a reference to Client must be held
-    SharedBufferServer*     lcblk;
-
-    LayerBaseClient(SurfaceFlinger* flinger, DisplayID display, 
-            const sp<Client>& client, int32_t i);
-    virtual ~LayerBaseClient();
-    virtual void onFirstRef();
-
-    const wp<Client>    client;
-
-    inline  uint32_t    getIdentity() const { return mIdentity; }
-    inline  int32_t     clientIndex() const { return mIndex; }
-            int32_t     serverIndex() const;
-
-   
-            sp<Surface> getSurface();
-    virtual sp<Surface> createSurface() const;
-    
-    virtual void onRemoved();
-
-
-    class Surface : public BnSurface 
-    {
-    public:
-        int32_t getToken() const { return mToken; }
-        int32_t getIdentity() const { return mIdentity; }
-        
-    protected:
-        Surface(const sp<SurfaceFlinger>& flinger, 
-                SurfaceID id, int identity, 
-                const sp<LayerBaseClient>& owner);
-        virtual ~Surface();
-        virtual status_t onTransact(uint32_t code, const Parcel& data,
-                Parcel* reply, uint32_t flags);
-        sp<LayerBaseClient> getOwner() const;
-
-    private:
-        virtual sp<GraphicBuffer> requestBuffer(int index, int usage);
-        virtual status_t registerBuffers(const ISurface::BufferHeap& buffers); 
-        virtual void postBuffer(ssize_t offset);
-        virtual void unregisterBuffers();
-        virtual sp<OverlayRef> createOverlay(uint32_t w, uint32_t h,
-                int32_t format, int32_t orientation);
-
-    protected:
-        friend class LayerBaseClient;
-        sp<SurfaceFlinger>  mFlinger;
-        int32_t             mToken;
-        int32_t             mIdentity;
-        wp<LayerBaseClient> mOwner;
-    };
-
-    friend class Surface;
-
-private:
-                int32_t         mIndex;
-    mutable     Mutex           mLock;
-    mutable     wp<Surface>     mClientSurface;
-    // only read
-    const       uint32_t        mIdentity;
-    static      int32_t         sIdentity;
-};
-
-// ---------------------------------------------------------------------------
-
-}; // namespace android
-
-#endif // ANDROID_LAYER_BASE_H
diff --git a/libs/surfaceflinger/LayerBlur.cpp b/libs/surfaceflinger/LayerBlur.cpp
deleted file mode 100644
index 5fd7904..0000000
--- a/libs/surfaceflinger/LayerBlur.cpp
+++ /dev/null
@@ -1,265 +0,0 @@
-/*
- * Copyright (C) 2007 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#include <stdlib.h>
-#include <stdint.h>
-#include <sys/types.h>
-
-#include <utils/Errors.h>
-#include <utils/Log.h>
-
-#include <GLES/gl.h>
-#include <GLES/glext.h>
-
-#include "clz.h"
-#include "BlurFilter.h"
-#include "LayerBlur.h"
-#include "SurfaceFlinger.h"
-#include "DisplayHardware/DisplayHardware.h"
-
-namespace android {
-// ---------------------------------------------------------------------------
-
-const uint32_t LayerBlur::typeInfo = LayerBaseClient::typeInfo | 8;
-const char* const LayerBlur::typeID = "LayerBlur";
-
-// ---------------------------------------------------------------------------
-
-LayerBlur::LayerBlur(SurfaceFlinger* flinger, DisplayID display,
-        const sp<Client>& client, int32_t i)
-    : LayerBaseClient(flinger, display, client, i), mCacheDirty(true),
-          mRefreshCache(true), mCacheAge(0), mTextureName(-1U),
-          mWidthScale(1.0f), mHeightScale(1.0f),
-          mBlurFormat(GGL_PIXEL_FORMAT_RGB_565)
-{
-}
-
-LayerBlur::~LayerBlur()
-{
-    if (mTextureName != -1U) {
-        glDeleteTextures(1, &mTextureName);
-    }
-}
-
-void LayerBlur::setVisibleRegion(const Region& visibleRegion)
-{
-    LayerBaseClient::setVisibleRegion(visibleRegion);
-    if (visibleRegionScreen.isEmpty()) {
-        if (mTextureName != -1U) {
-            // We're not visible, free the texture up.
-            glBindTexture(GL_TEXTURE_2D, 0);
-            glDeleteTextures(1, &mTextureName);
-            mTextureName = -1U;
-        }
-    }
-}
-
-uint32_t LayerBlur::doTransaction(uint32_t flags)
-{
-    // we're doing a transaction, refresh the cache!
-    if (!mFlinger->isFrozen()) {
-        mRefreshCache = true;
-        mCacheDirty = true;
-        flags |= eVisibleRegion;
-        this->contentDirty = true;
-    }
-    return LayerBase::doTransaction(flags);    
-}
-
-void LayerBlur::unlockPageFlip(const Transform& planeTransform, Region& outDirtyRegion)
-{
-    // this code-path must be as tight as possible, it's called each time
-    // the screen is composited.
-    if (UNLIKELY(!visibleRegionScreen.isEmpty())) {
-        // if anything visible below us is invalidated, the cache becomes dirty
-        if (!mCacheDirty && 
-                !visibleRegionScreen.intersect(outDirtyRegion).isEmpty()) {
-            mCacheDirty = true;
-        }
-        if (mCacheDirty) {
-            if (!mFlinger->isFrozen()) {
-                // update everything below us that is visible
-                outDirtyRegion.orSelf(visibleRegionScreen);
-                nsecs_t now = systemTime();
-                if ((now - mCacheAge) >= ms2ns(500)) {
-                    mCacheAge = now;
-                    mRefreshCache = true;
-                    mCacheDirty = false;
-                } else {
-                    if (!mAutoRefreshPending) {
-                        mFlinger->signalDelayedEvent(ms2ns(500));
-                        mAutoRefreshPending = true;
-                    }
-                }
-            }
-        }
-    }
-    LayerBase::unlockPageFlip(planeTransform, outDirtyRegion);
-}
-
-void LayerBlur::onDraw(const Region& clip) const
-{
-    const DisplayHardware& hw(graphicPlane(0).displayHardware());
-    const uint32_t fbHeight = hw.getHeight();
-    int x = mTransformedBounds.left;
-    int y = mTransformedBounds.top;
-    int w = mTransformedBounds.width();
-    int h = mTransformedBounds.height();
-    GLint X = x;
-    GLint Y = fbHeight - (y + h);
-    if (X < 0) {
-        w += X;
-        X = 0;
-    }
-    if (Y < 0) {
-        h += Y;
-        Y = 0;
-    }
-    if (w<0 || h<0) {
-        // we're outside of the framebuffer
-        return;
-    }
-
-    if (mTextureName == -1U) {
-        // create the texture name the first time
-        // can't do that in the ctor, because it runs in another thread.
-        glGenTextures(1, &mTextureName);
-        glGetIntegerv(GL_IMPLEMENTATION_COLOR_READ_FORMAT_OES, &mReadFormat);
-        glGetIntegerv(GL_IMPLEMENTATION_COLOR_READ_TYPE_OES, &mReadType);
-        if (mReadFormat != GL_RGB || mReadType != GL_UNSIGNED_SHORT_5_6_5) {
-            mReadFormat = GL_RGBA;
-            mReadType = GL_UNSIGNED_BYTE;
-            mBlurFormat = GGL_PIXEL_FORMAT_RGBX_8888;
-        }
-    }
-
-    Region::const_iterator it = clip.begin();
-    Region::const_iterator const end = clip.end();
-    if (it != end) {
-        glEnable(GL_TEXTURE_2D);
-        glBindTexture(GL_TEXTURE_2D, mTextureName);
-
-        if (mRefreshCache) {
-            mRefreshCache = false;
-            mAutoRefreshPending = false;
-
-            int32_t pixelSize = 4;
-            int32_t s = w;
-            if (mReadType == GL_UNSIGNED_SHORT_5_6_5) {
-                // allocate enough memory for 4-bytes (2 pixels) aligned data
-                s = (w + 1) & ~1;
-                pixelSize = 2;
-            }
-
-            uint16_t* const pixels = (uint16_t*)malloc(s*h*pixelSize);
-
-            // This reads the frame-buffer, so a h/w GL would have to
-            // finish() its rendering first. we don't want to do that
-            // too often. Read data is 4-bytes aligned.
-            glReadPixels(X, Y, w, h, mReadFormat, mReadType, pixels);
-
-            // blur that texture.
-            GGLSurface bl;
-            bl.version = sizeof(GGLSurface);
-            bl.width = w;
-            bl.height = h;
-            bl.stride = s;
-            bl.format = mBlurFormat;
-            bl.data = (GGLubyte*)pixels;            
-            blurFilter(&bl, 8, 2);
-
-            if (mFlags & (DisplayHardware::NPOT_EXTENSION)) {
-                glTexImage2D(GL_TEXTURE_2D, 0, mReadFormat, w, h, 0,
-                        mReadFormat, mReadType, pixels);
-                mWidthScale  = 1.0f / w;
-                mHeightScale =-1.0f / h;
-                mYOffset = 0;
-            } else {
-                GLuint tw = 1 << (31 - clz(w));
-                GLuint th = 1 << (31 - clz(h));
-                if (tw < GLuint(w)) tw <<= 1;
-                if (th < GLuint(h)) th <<= 1;
-                glTexImage2D(GL_TEXTURE_2D, 0, mReadFormat, tw, th, 0,
-                        mReadFormat, mReadType, NULL);
-                glTexSubImage2D(GL_TEXTURE_2D, 0, 0, 0, w, h, 
-                        mReadFormat, mReadType, pixels);
-                mWidthScale  = 1.0f / tw;
-                mHeightScale =-1.0f / th;
-                mYOffset = th-h;
-            }
-
-            free((void*)pixels);
-        }
-
-        const State& s = drawingState();
-        if (UNLIKELY(s.alpha < 0xFF)) {
-            const GGLfixed alpha = (s.alpha << 16)/255;
-            glColor4x(0, 0, 0, alpha);
-            glEnable(GL_BLEND);
-            glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
-            glTexEnvx(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_REPLACE);
-        } else {
-            glDisable(GL_BLEND);
-        }
-
-        if (mFlags & DisplayHardware::SLOW_CONFIG) {
-            glDisable(GL_DITHER);
-        } else {
-            glEnable(GL_DITHER);
-        }
-
-        glTexEnvx(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_REPLACE);
-        glTexParameterx(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
-        glTexParameterx(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
-
-        if (UNLIKELY(transformed()
-                || !(mFlags & DisplayHardware::DRAW_TEXTURE_EXTENSION) )) {
-            // This is a very rare scenario.
-            glMatrixMode(GL_TEXTURE);
-            glLoadIdentity();
-            glScalef(mWidthScale, mHeightScale, 1);
-            glTranslatef(-x, mYOffset - y, 0);
-            glEnableClientState(GL_TEXTURE_COORD_ARRAY);
-            glVertexPointer(2, GL_FIXED, 0, mVertices);
-            glTexCoordPointer(2, GL_FIXED, 0, mVertices);
-            while (it != end) {
-                const Rect& r = *it++;
-                const GLint sy = fbHeight - (r.top + r.height());
-                glScissor(r.left, sy, r.width(), r.height());
-                glDrawArrays(GL_TRIANGLE_FAN, 0, 4); 
-            }       
-            glDisableClientState(GL_TEXTURE_COORD_ARRAY);
-        } else {
-            // NOTE: this is marginally faster with the software gl, because
-            // glReadPixels() reads the fb bottom-to-top, however we'll
-            // skip all the jaccobian computations.
-            Rect r;
-            GLint crop[4] = { 0, 0, w, h };
-            glTexParameteriv(GL_TEXTURE_2D, GL_TEXTURE_CROP_RECT_OES, crop);
-            y = fbHeight - (y + h);
-            while (it != end) {
-                const Rect& r = *it++;
-                const GLint sy = fbHeight - (r.top + r.height());
-                glScissor(r.left, sy, r.width(), r.height());
-                glDrawTexiOES(x, y, 0, w, h);
-            }
-        }
-    }
-}
-
-// ---------------------------------------------------------------------------
-
-}; // namespace android
diff --git a/libs/surfaceflinger/LayerBlur.h b/libs/surfaceflinger/LayerBlur.h
deleted file mode 100644
index 5b63dec..0000000
--- a/libs/surfaceflinger/LayerBlur.h
+++ /dev/null
@@ -1,69 +0,0 @@
-/*
- * Copyright (C) 2007 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#ifndef ANDROID_LAYER_BLUR_H
-#define ANDROID_LAYER_BLUR_H
-
-#include <stdint.h>
-#include <sys/types.h>
-
-#include <ui/Region.h>
-
-#include "LayerBase.h"
-
-namespace android {
-
-// ---------------------------------------------------------------------------
-
-class LayerBlur : public LayerBaseClient
-{
-public:    
-    static const uint32_t typeInfo;
-    static const char* const typeID;
-    virtual char const* getTypeID() const { return typeID; }
-    virtual uint32_t getTypeInfo() const { return typeInfo; }
-    
-                LayerBlur(SurfaceFlinger* flinger, DisplayID display,
-                        const sp<Client>& client, int32_t i);
-        virtual ~LayerBlur();
-
-    virtual void onDraw(const Region& clip) const;
-    virtual bool needsBlending() const  { return true; }
-    virtual bool isSecure() const       { return false; }
-
-    virtual uint32_t doTransaction(uint32_t flags);
-    virtual void setVisibleRegion(const Region& visibleRegion);
-    virtual void unlockPageFlip(const Transform& planeTransform, Region& outDirtyRegion);
-
-private:
-            bool    mCacheDirty;
-    mutable bool    mRefreshCache;
-    mutable bool    mAutoRefreshPending;
-            nsecs_t mCacheAge;
-    mutable GLuint  mTextureName;
-    mutable GLfloat mWidthScale;
-    mutable GLfloat mHeightScale;
-    mutable GLfloat mYOffset;
-    mutable GLint   mReadFormat;
-    mutable GLint   mReadType;
-    mutable uint32_t mBlurFormat;
-};
-
-// ---------------------------------------------------------------------------
-
-}; // namespace android
-
-#endif // ANDROID_LAYER_BLUR_H
diff --git a/libs/surfaceflinger/LayerBuffer.cpp b/libs/surfaceflinger/LayerBuffer.cpp
deleted file mode 100644
index 5c21593..0000000
--- a/libs/surfaceflinger/LayerBuffer.cpp
+++ /dev/null
@@ -1,727 +0,0 @@
-/*
- * Copyright (C) 2007 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#include <stdlib.h>
-#include <stdint.h>
-#include <math.h>
-#include <sys/types.h>
-
-#include <utils/Errors.h>
-#include <utils/Log.h>
-#include <utils/StopWatch.h>
-
-#include <ui/GraphicBuffer.h>
-#include <ui/PixelFormat.h>
-#include <ui/FramebufferNativeWindow.h>
-#include <ui/Rect.h>
-#include <ui/Region.h>
-
-#include <hardware/copybit.h>
-
-#include "LayerBuffer.h"
-#include "SurfaceFlinger.h"
-#include "DisplayHardware/DisplayHardware.h"
-
-namespace android {
-
-// ---------------------------------------------------------------------------
-
-const uint32_t LayerBuffer::typeInfo = LayerBaseClient::typeInfo | 0x20;
-const char* const LayerBuffer::typeID = "LayerBuffer";
-gralloc_module_t const* LayerBuffer::sGrallocModule = 0;
-
-// ---------------------------------------------------------------------------
-
-LayerBuffer::LayerBuffer(SurfaceFlinger* flinger, DisplayID display,
-        const sp<Client>& client, int32_t i)
-    : LayerBaseClient(flinger, display, client, i),
-      mNeedsBlending(false), mBlitEngine(0)
-{
-}
-
-LayerBuffer::~LayerBuffer()
-{
-    if (mBlitEngine) {
-        copybit_close(mBlitEngine);
-    }
-}
-
-void LayerBuffer::onFirstRef()
-{
-    LayerBaseClient::onFirstRef();
-    mSurface = new SurfaceLayerBuffer(mFlinger, clientIndex(),
-            const_cast<LayerBuffer *>(this));
-
-    hw_module_t const* module = (hw_module_t const*)sGrallocModule;
-    if (!module) {
-        // NOTE: technically there is a race here, but it shouldn't
-        // cause any problem since hw_get_module() always returns
-        // the same value.
-        if (hw_get_module(GRALLOC_HARDWARE_MODULE_ID, &module) == 0) {
-            sGrallocModule = (gralloc_module_t const *)module;
-        }
-    }
-
-    if (hw_get_module(COPYBIT_HARDWARE_MODULE_ID, &module) == 0) {
-        copybit_open(module, &mBlitEngine);
-    }
-}
-
-sp<LayerBaseClient::Surface> LayerBuffer::createSurface() const
-{
-    return mSurface;
-}
-
-status_t LayerBuffer::ditch()
-{
-    mSurface.clear();
-    return NO_ERROR;
-}
-
-bool LayerBuffer::needsBlending() const {
-    return mNeedsBlending;
-}
-
-void LayerBuffer::setNeedsBlending(bool blending) {
-    mNeedsBlending = blending;
-}
-
-void LayerBuffer::postBuffer(ssize_t offset)
-{
-    sp<Source> source(getSource());
-    if (source != 0)
-        source->postBuffer(offset);
-}
-
-void LayerBuffer::unregisterBuffers()
-{
-    sp<Source> source(clearSource());
-    if (source != 0)
-        source->unregisterBuffers();
-}
-
-uint32_t LayerBuffer::doTransaction(uint32_t flags)
-{
-    sp<Source> source(getSource());
-    if (source != 0)
-        source->onTransaction(flags);
-    uint32_t res = LayerBase::doTransaction(flags);
-    // we always want filtering for these surfaces
-    mUseLinearFiltering = !(mFlags & DisplayHardware::SLOW_CONFIG);
-    return res;
-}
-
-void LayerBuffer::unlockPageFlip(const Transform& planeTransform,
-        Region& outDirtyRegion)
-{
-    // this code-path must be as tight as possible, it's called each time
-    // the screen is composited.
-    sp<Source> source(getSource());
-    if (source != 0)
-        source->onVisibilityResolved(planeTransform);
-    LayerBase::unlockPageFlip(planeTransform, outDirtyRegion);    
-}
-
-void LayerBuffer::onDraw(const Region& clip) const
-{
-    sp<Source> source(getSource());
-    if (LIKELY(source != 0)) {
-        source->onDraw(clip);
-    } else {
-        clearWithOpenGL(clip);
-    }
-}
-
-bool LayerBuffer::transformed() const
-{
-    sp<Source> source(getSource());
-    if (LIKELY(source != 0))
-        return source->transformed();
-    return false;
-}
-
-void LayerBuffer::serverDestroy()
-{
-    sp<Source> source(clearSource());
-    if (source != 0) {
-        source->destroy();
-    }
-}
-
-/**
- * This creates a "buffer" source for this surface
- */
-status_t LayerBuffer::registerBuffers(const ISurface::BufferHeap& buffers)
-{
-    Mutex::Autolock _l(mLock);
-    if (mSource != 0)
-        return INVALID_OPERATION;
-
-    sp<BufferSource> source = new BufferSource(*this, buffers);
-
-    status_t result = source->getStatus();
-    if (result == NO_ERROR) {
-        mSource = source;
-    }
-    return result;
-}    
-
-/**
- * This creates an "overlay" source for this surface
- */
-sp<OverlayRef> LayerBuffer::createOverlay(uint32_t w, uint32_t h, int32_t f,
-        int32_t orientation)
-{
-    sp<OverlayRef> result;
-    Mutex::Autolock _l(mLock);
-    if (mSource != 0)
-        return result;
-
-    sp<OverlaySource> source = new OverlaySource(*this, &result, w, h, f, orientation);
-    if (result != 0) {
-        mSource = source;
-    }
-    return result;
-}
-
-sp<LayerBuffer::Source> LayerBuffer::getSource() const {
-    Mutex::Autolock _l(mLock);
-    return mSource;
-}
-
-sp<LayerBuffer::Source> LayerBuffer::clearSource() {
-    sp<Source> source;
-    Mutex::Autolock _l(mLock);
-    source = mSource;
-    mSource.clear();
-    return source;
-}
-
-// ============================================================================
-// LayerBuffer::SurfaceLayerBuffer
-// ============================================================================
-
-LayerBuffer::SurfaceLayerBuffer::SurfaceLayerBuffer(const sp<SurfaceFlinger>& flinger,
-        SurfaceID id, const sp<LayerBuffer>& owner)
-    : LayerBaseClient::Surface(flinger, id, owner->getIdentity(), owner)
-{
-}
-
-LayerBuffer::SurfaceLayerBuffer::~SurfaceLayerBuffer()
-{
-    unregisterBuffers();
-}
-
-status_t LayerBuffer::SurfaceLayerBuffer::registerBuffers(
-        const ISurface::BufferHeap& buffers)
-{
-    sp<LayerBuffer> owner(getOwner());
-    if (owner != 0)
-        return owner->registerBuffers(buffers);
-    return NO_INIT;
-}
-
-void LayerBuffer::SurfaceLayerBuffer::postBuffer(ssize_t offset)
-{
-    sp<LayerBuffer> owner(getOwner());
-    if (owner != 0)
-        owner->postBuffer(offset);
-}
-
-void LayerBuffer::SurfaceLayerBuffer::unregisterBuffers()
-{
-    sp<LayerBuffer> owner(getOwner());
-    if (owner != 0)
-        owner->unregisterBuffers();
-}
-
-sp<OverlayRef> LayerBuffer::SurfaceLayerBuffer::createOverlay(
-        uint32_t w, uint32_t h, int32_t format, int32_t orientation) {
-    sp<OverlayRef> result;
-    sp<LayerBuffer> owner(getOwner());
-    if (owner != 0)
-        result = owner->createOverlay(w, h, format, orientation);
-    return result;
-}
-
-// ============================================================================
-// LayerBuffer::Buffer
-// ============================================================================
-
-LayerBuffer::Buffer::Buffer(const ISurface::BufferHeap& buffers,
-        ssize_t offset, size_t bufferSize)
-    : mBufferHeap(buffers), mSupportsCopybit(false)
-{
-    NativeBuffer& src(mNativeBuffer);
-    src.crop.l = 0;
-    src.crop.t = 0;
-    src.crop.r = buffers.w;
-    src.crop.b = buffers.h;
-
-    src.img.w       = buffers.hor_stride ?: buffers.w;
-    src.img.h       = buffers.ver_stride ?: buffers.h;
-    src.img.format  = buffers.format;
-    src.img.base    = (void*)(intptr_t(buffers.heap->base()) + offset);
-    src.img.handle  = 0;
-
-    gralloc_module_t const * module = LayerBuffer::getGrallocModule();
-    if (module && module->perform) {
-        int err = module->perform(module,
-                GRALLOC_MODULE_PERFORM_CREATE_HANDLE_FROM_BUFFER,
-                buffers.heap->heapID(), bufferSize,
-                offset, buffers.heap->base(),
-                &src.img.handle);
-
-        // we can fail here is the passed buffer is purely software
-        mSupportsCopybit = (err == NO_ERROR);
-    }
- }
-
-LayerBuffer::Buffer::~Buffer()
-{
-    NativeBuffer& src(mNativeBuffer);
-    if (src.img.handle) {
-        native_handle_delete(src.img.handle);
-    }
-}
-
-// ============================================================================
-// LayerBuffer::Source
-// LayerBuffer::BufferSource
-// LayerBuffer::OverlaySource
-// ============================================================================
-
-LayerBuffer::Source::Source(LayerBuffer& layer)
-    : mLayer(layer)
-{    
-}
-LayerBuffer::Source::~Source() {    
-}
-void LayerBuffer::Source::onDraw(const Region& clip) const {
-}
-void LayerBuffer::Source::onTransaction(uint32_t flags) {
-}
-void LayerBuffer::Source::onVisibilityResolved(
-        const Transform& planeTransform) {
-}
-void LayerBuffer::Source::postBuffer(ssize_t offset) {
-}
-void LayerBuffer::Source::unregisterBuffers() {
-}
-bool LayerBuffer::Source::transformed() const {
-    return mLayer.mTransformed; 
-}
-
-// ---------------------------------------------------------------------------
-
-LayerBuffer::BufferSource::BufferSource(LayerBuffer& layer,
-        const ISurface::BufferHeap& buffers)
-    : Source(layer), mStatus(NO_ERROR), mBufferSize(0),
-      mUseEGLImageDirectly(true)
-{
-    if (buffers.heap == NULL) {
-        // this is allowed, but in this case, it is illegal to receive
-        // postBuffer(). The surface just erases the framebuffer with
-        // fully transparent pixels.
-        mBufferHeap = buffers;
-        mLayer.setNeedsBlending(false);
-        return;
-    }
-
-    status_t err = (buffers.heap->heapID() >= 0) ? NO_ERROR : NO_INIT;
-    if (err != NO_ERROR) {
-        LOGE("LayerBuffer::BufferSource: invalid heap (%s)", strerror(err));
-        mStatus = err;
-        return;
-    }
-    
-    PixelFormatInfo info;
-    err = getPixelFormatInfo(buffers.format, &info);
-    if (err != NO_ERROR) {
-        LOGE("LayerBuffer::BufferSource: invalid format %d (%s)",
-                buffers.format, strerror(err));
-        mStatus = err;
-        return;
-    }
-
-    if (buffers.hor_stride<0 || buffers.ver_stride<0) {
-        LOGE("LayerBuffer::BufferSource: invalid parameters "
-             "(w=%d, h=%d, xs=%d, ys=%d)", 
-             buffers.w, buffers.h, buffers.hor_stride, buffers.ver_stride);
-        mStatus = BAD_VALUE;
-        return;
-    }
-
-    mBufferHeap = buffers;
-    mLayer.setNeedsBlending((info.h_alpha - info.l_alpha) > 0);    
-    mBufferSize = info.getScanlineSize(buffers.hor_stride)*buffers.ver_stride;
-    mLayer.forceVisibilityTransaction();
-}
-
-LayerBuffer::BufferSource::~BufferSource()
-{    
-    class MessageDestroyTexture : public MessageBase {
-        SurfaceFlinger* flinger;
-        GLuint name;
-    public:
-        MessageDestroyTexture(
-                SurfaceFlinger* flinger, GLuint name)
-            : flinger(flinger), name(name) { }
-        virtual bool handler() {
-            glDeleteTextures(1, &name);
-            return true;
-        }
-    };
-
-    if (mTexture.name != -1U) {
-        // GL textures can only be destroyed from the GL thread
-        mLayer.mFlinger->mEventQueue.postMessage(
-                new MessageDestroyTexture(mLayer.mFlinger.get(), mTexture.name) );
-    }
-    if (mTexture.image != EGL_NO_IMAGE_KHR) {
-        EGLDisplay dpy(mLayer.mFlinger->graphicPlane(0).getEGLDisplay());
-        eglDestroyImageKHR(dpy, mTexture.image);
-    }
-}
-
-void LayerBuffer::BufferSource::postBuffer(ssize_t offset)
-{    
-    ISurface::BufferHeap buffers;
-    { // scope for the lock
-        Mutex::Autolock _l(mBufferSourceLock);
-        buffers = mBufferHeap;
-        if (buffers.heap != 0) {
-            const size_t memorySize = buffers.heap->getSize();
-            if ((size_t(offset) + mBufferSize) > memorySize) {
-                LOGE("LayerBuffer::BufferSource::postBuffer() "
-                     "invalid buffer (offset=%d, size=%d, heap-size=%d",
-                     int(offset), int(mBufferSize), int(memorySize));
-                return;
-            }
-        }
-    }
-
-    sp<Buffer> buffer;
-    if (buffers.heap != 0) {
-        buffer = new LayerBuffer::Buffer(buffers, offset, mBufferSize);
-        if (buffer->getStatus() != NO_ERROR)
-            buffer.clear();
-        setBuffer(buffer);
-        mLayer.invalidate();
-    }
-}
-
-void LayerBuffer::BufferSource::unregisterBuffers()
-{
-    Mutex::Autolock _l(mBufferSourceLock);
-    mBufferHeap.heap.clear();
-    mBuffer.clear();
-    mLayer.invalidate();
-}
-
-sp<LayerBuffer::Buffer> LayerBuffer::BufferSource::getBuffer() const
-{
-    Mutex::Autolock _l(mBufferSourceLock);
-    return mBuffer;
-}
-
-void LayerBuffer::BufferSource::setBuffer(const sp<LayerBuffer::Buffer>& buffer)
-{
-    Mutex::Autolock _l(mBufferSourceLock);
-    mBuffer = buffer;
-}
-
-bool LayerBuffer::BufferSource::transformed() const
-{
-    return mBufferHeap.transform ? true : Source::transformed(); 
-}
-
-void LayerBuffer::BufferSource::onDraw(const Region& clip) const 
-{
-    sp<Buffer> ourBuffer(getBuffer());
-    if (UNLIKELY(ourBuffer == 0))  {
-        // nothing to do, we don't have a buffer
-        mLayer.clearWithOpenGL(clip);
-        return;
-    }
-
-    status_t err = NO_ERROR;
-    NativeBuffer src(ourBuffer->getBuffer());
-    const Rect transformedBounds(mLayer.getTransformedBounds());
-
-    if (UNLIKELY(mTexture.name == -1LU)) {
-        mTexture.name = mLayer.createTexture();
-    }
-
-#if defined(EGL_ANDROID_image_native_buffer)
-    if (mLayer.mFlags & DisplayHardware::DIRECT_TEXTURE) {
-        err = INVALID_OPERATION;
-        if (ourBuffer->supportsCopybit()) {
-
-            // there are constraints on buffers used by the GPU and these may not
-            // be honored here. We need to change the API so the buffers
-            // are allocated with gralloc. For now disable this code-path
-#if 0
-            // First, try to use the buffer as an EGLImage directly
-            if (mUseEGLImageDirectly) {
-                // NOTE: Assume the buffer is allocated with the proper USAGE flags
-
-                sp<GraphicBuffer> buffer = new  GraphicBuffer(
-                        src.img.w, src.img.h, src.img.format,
-                        GraphicBuffer::USAGE_HW_TEXTURE,
-                        src.img.w, src.img.handle, false);
-
-                err = mLayer.initializeEglImage(buffer, &mTexture);
-                if (err != NO_ERROR) {
-                    mUseEGLImageDirectly = false;
-                }
-            }
-#endif
-
-            copybit_device_t* copybit = mLayer.mBlitEngine;
-            if (copybit && err != NO_ERROR) {
-                // create our EGLImageKHR the first time
-                err = initTempBuffer();
-                if (err == NO_ERROR) {
-                    // NOTE: Assume the buffer is allocated with the proper USAGE flags
-                    const NativeBuffer& dst(mTempBuffer);
-                    region_iterator clip(Region(Rect(dst.crop.r, dst.crop.b)));
-                    copybit->set_parameter(copybit, COPYBIT_TRANSFORM, 0);
-                    copybit->set_parameter(copybit, COPYBIT_PLANE_ALPHA, 0xFF);
-                    copybit->set_parameter(copybit, COPYBIT_DITHER, COPYBIT_ENABLE);
-                    err = copybit->stretch(copybit, &dst.img, &src.img,
-                            &dst.crop, &src.crop, &clip);
-                    if (err != NO_ERROR) {
-                        clearTempBufferImage();
-                    }
-                }
-            }
-        }
-    }
-#endif
-    else {
-        err = INVALID_OPERATION;
-    }
-
-    if (err != NO_ERROR) {
-        // slower fallback
-        GGLSurface t;
-        t.version = sizeof(GGLSurface);
-        t.width  = src.crop.r;
-        t.height = src.crop.b;
-        t.stride = src.img.w;
-        t.vstride= src.img.h;
-        t.format = src.img.format;
-        t.data = (GGLubyte*)src.img.base;
-        const Region dirty(Rect(t.width, t.height));
-        mLayer.loadTexture(&mTexture, dirty, t);
-    }
-
-    mTexture.transform = mBufferHeap.transform;
-    mLayer.drawWithOpenGL(clip, mTexture);
-}
-
-status_t LayerBuffer::BufferSource::initTempBuffer() const
-{
-    // figure out the size we need now
-    const ISurface::BufferHeap& buffers(mBufferHeap);
-    uint32_t w = mLayer.mTransformedBounds.width();
-    uint32_t h = mLayer.mTransformedBounds.height();
-    if (buffers.w * h != buffers.h * w) {
-        int t = w; w = h; h = t;
-    }
-
-    // we're in the copybit case, so make sure we can handle this blit
-    // we don't have to keep the aspect ratio here
-    copybit_device_t* copybit = mLayer.mBlitEngine;
-    const int down = copybit->get(copybit, COPYBIT_MINIFICATION_LIMIT);
-    const int up = copybit->get(copybit, COPYBIT_MAGNIFICATION_LIMIT);
-    if (buffers.w > w*down)     w = buffers.w / down;
-    else if (w > buffers.w*up)  w = buffers.w*up;
-    if (buffers.h > h*down)     h = buffers.h / down;
-    else if (h > buffers.h*up)  h = buffers.h*up;
-
-    if (mTexture.image != EGL_NO_IMAGE_KHR) {
-        // we have an EGLImage, make sure the needed size didn't change
-        if (w!=mTexture.width || h!= mTexture.height) {
-            // delete the EGLImage and texture
-            clearTempBufferImage();
-        } else {
-            // we're good, we have an EGLImageKHR and it's (still) the
-            // right size
-            return NO_ERROR;
-        }
-    }
-
-    // figure out if we need linear filtering
-    if (buffers.w * h == buffers.h * w) {
-        // same pixel area, don't use filtering
-        mLayer.mUseLinearFiltering = false;
-    }
-
-    // Allocate a temporary buffer and create the corresponding EGLImageKHR
-    // once the EGLImage has been created we don't need the
-    // graphic buffer reference anymore.
-    sp<GraphicBuffer> buffer = new GraphicBuffer(
-            w, h, HAL_PIXEL_FORMAT_RGB_565,
-            GraphicBuffer::USAGE_HW_TEXTURE |
-            GraphicBuffer::USAGE_HW_2D);
-
-    status_t err = buffer->initCheck();
-    if (err == NO_ERROR) {
-        NativeBuffer& dst(mTempBuffer);
-        dst.img.w = buffer->getStride();
-        dst.img.h = h;
-        dst.img.format = buffer->getPixelFormat();
-        dst.img.handle = (native_handle_t *)buffer->handle;
-        dst.img.base = 0;
-        dst.crop.l = 0;
-        dst.crop.t = 0;
-        dst.crop.r = w;
-        dst.crop.b = h;
-
-        err = mLayer.initializeEglImage(buffer, &mTexture);
-    }
-
-    return err;
-}
-
-void LayerBuffer::BufferSource::clearTempBufferImage() const
-{
-    // delete the image
-    EGLDisplay dpy(mLayer.mFlinger->graphicPlane(0).getEGLDisplay());
-    eglDestroyImageKHR(dpy, mTexture.image);
-
-    // and the associated texture (recreate a name)
-    glDeleteTextures(1, &mTexture.name);
-    Texture defaultTexture;
-    mTexture = defaultTexture;
-    mTexture.name = mLayer.createTexture();
-}
-
-// ---------------------------------------------------------------------------
-
-LayerBuffer::OverlaySource::OverlaySource(LayerBuffer& layer,
-        sp<OverlayRef>* overlayRef, 
-        uint32_t w, uint32_t h, int32_t format, int32_t orientation)
-    : Source(layer), mVisibilityChanged(false),
-    mOverlay(0), mOverlayHandle(0), mOverlayDevice(0), mOrientation(orientation)
-{
-    overlay_control_device_t* overlay_dev = mLayer.mFlinger->getOverlayEngine();
-    if (overlay_dev == NULL) {
-        // overlays not supported
-        return;
-    }
-
-    mOverlayDevice = overlay_dev;
-    overlay_t* overlay = overlay_dev->createOverlay(overlay_dev, w, h, format);
-    if (overlay == NULL) {
-        // couldn't create the overlay (no memory? no more overlays?)
-        return;
-    }
-
-    // enable dithering...
-    overlay_dev->setParameter(overlay_dev, overlay, 
-            OVERLAY_DITHER, OVERLAY_ENABLE);
-
-    mOverlay = overlay;
-    mWidth = overlay->w;
-    mHeight = overlay->h;
-    mFormat = overlay->format; 
-    mWidthStride = overlay->w_stride;
-    mHeightStride = overlay->h_stride;
-    mInitialized = false;
-
-    mOverlayHandle = overlay->getHandleRef(overlay);
-    
-    sp<OverlayChannel> channel = new OverlayChannel( &layer );
-
-    *overlayRef = new OverlayRef(mOverlayHandle, channel,
-            mWidth, mHeight, mFormat, mWidthStride, mHeightStride);
-    mLayer.mFlinger->signalEvent();
-}
-
-LayerBuffer::OverlaySource::~OverlaySource()
-{
-    if (mOverlay && mOverlayDevice) {
-        overlay_control_device_t* overlay_dev = mOverlayDevice;
-        overlay_dev->destroyOverlay(overlay_dev, mOverlay);
-    }
-}
-
-void LayerBuffer::OverlaySource::onDraw(const Region& clip) const
-{
-    // this would be where the color-key would be set, should we need it.
-    GLclampx red = 0;
-    GLclampx green = 0;
-    GLclampx blue = 0;
-    mLayer.clearWithOpenGL(clip, red, green, blue, 0);
-}
-
-void LayerBuffer::OverlaySource::onTransaction(uint32_t flags)
-{
-    const Layer::State& front(mLayer.drawingState());
-    const Layer::State& temp(mLayer.currentState());
-    if (temp.sequence != front.sequence) {
-        mVisibilityChanged = true;
-    }
-}
-
-void LayerBuffer::OverlaySource::onVisibilityResolved(
-        const Transform& planeTransform)
-{
-    // this code-path must be as tight as possible, it's called each time
-    // the screen is composited.
-    if (UNLIKELY(mOverlay != 0)) {
-        if (mVisibilityChanged || !mInitialized) {
-            mVisibilityChanged = false;
-            mInitialized = true;
-            const Rect bounds(mLayer.getTransformedBounds());
-            int x = bounds.left;
-            int y = bounds.top;
-            int w = bounds.width();
-            int h = bounds.height();
-            
-            // we need a lock here to protect "destroy"
-            Mutex::Autolock _l(mOverlaySourceLock);
-            if (mOverlay) {
-                overlay_control_device_t* overlay_dev = mOverlayDevice;
-                overlay_dev->setPosition(overlay_dev, mOverlay, x,y,w,h);
-                // we need to combine the layer orientation and the
-                // user-requested orientation.
-                Transform finalTransform = Transform(mOrientation) *
-                        Transform(mLayer.getOrientation());
-                overlay_dev->setParameter(overlay_dev, mOverlay,
-                        OVERLAY_TRANSFORM, finalTransform.getOrientation());
-                overlay_dev->commit(overlay_dev, mOverlay);
-            }
-        }
-    }
-}
-
-void LayerBuffer::OverlaySource::destroy()
-{
-    // we need a lock here to protect "onVisibilityResolved"
-    Mutex::Autolock _l(mOverlaySourceLock);
-    if (mOverlay && mOverlayDevice) {
-        overlay_control_device_t* overlay_dev = mOverlayDevice;
-        overlay_dev->destroyOverlay(overlay_dev, mOverlay);
-        mOverlay = 0;
-    }
-}
-
-// ---------------------------------------------------------------------------
-}; // namespace android
diff --git a/libs/surfaceflinger/LayerBuffer.h b/libs/surfaceflinger/LayerBuffer.h
deleted file mode 100644
index b176623..0000000
--- a/libs/surfaceflinger/LayerBuffer.h
+++ /dev/null
@@ -1,225 +0,0 @@
-/*
- * Copyright (C) 2007 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#ifndef ANDROID_LAYER_BUFFER_H
-#define ANDROID_LAYER_BUFFER_H
-
-#include <stdint.h>
-#include <sys/types.h>
-
-#include "LayerBase.h"
-
-struct copybit_device_t;
-
-namespace android {
-
-// ---------------------------------------------------------------------------
-
-class Buffer;
-class Region;
-class OverlayRef;
-
-// ---------------------------------------------------------------------------
-
-class LayerBuffer : public LayerBaseClient
-{
-    class Source : public LightRefBase<Source> {
-    public:
-        Source(LayerBuffer& layer);
-        virtual ~Source();
-        virtual void onDraw(const Region& clip) const;
-        virtual void onTransaction(uint32_t flags);
-        virtual void onVisibilityResolved(const Transform& planeTransform);
-        virtual void postBuffer(ssize_t offset);
-        virtual void unregisterBuffers();
-        virtual bool transformed() const;
-        virtual void destroy() { }
-    protected:
-        LayerBuffer& mLayer;
-    };
-
-public:
-    static const uint32_t typeInfo;
-    static const char* const typeID;
-    virtual char const* getTypeID() const { return typeID; }
-    virtual uint32_t getTypeInfo() const { return typeInfo; }
-
-            LayerBuffer(SurfaceFlinger* flinger, DisplayID display,
-                    const sp<Client>& client, int32_t i);
-        virtual ~LayerBuffer();
-
-    virtual void onFirstRef();
-    virtual bool needsBlending() const;
-
-    virtual sp<LayerBaseClient::Surface> createSurface() const;
-    virtual status_t ditch();
-    virtual void onDraw(const Region& clip) const;
-    virtual uint32_t doTransaction(uint32_t flags);
-    virtual void unlockPageFlip(const Transform& planeTransform, Region& outDirtyRegion);
-    virtual bool transformed() const;
-
-    status_t registerBuffers(const ISurface::BufferHeap& buffers);
-    void postBuffer(ssize_t offset);
-    void unregisterBuffers();
-    sp<OverlayRef> createOverlay(uint32_t w, uint32_t h, int32_t format,
-            int32_t orientation);
-    
-    sp<Source> getSource() const;
-    sp<Source> clearSource();
-    void setNeedsBlending(bool blending);
-    Rect getTransformedBounds() const {
-        return mTransformedBounds;
-    }
-
-    void serverDestroy();
-
-private:
-    struct NativeBuffer {
-        copybit_image_t   img;
-        copybit_rect_t    crop;
-    };
-
-    static gralloc_module_t const* sGrallocModule;
-    static gralloc_module_t const* getGrallocModule() {
-        return sGrallocModule;
-    }
-
-    class Buffer : public LightRefBase<Buffer> {
-    public:
-        Buffer(const ISurface::BufferHeap& buffers,
-                ssize_t offset, size_t bufferSize);
-        inline bool supportsCopybit() const {
-            return mSupportsCopybit;
-        }
-        inline status_t getStatus() const {
-            return mBufferHeap.heap!=0 ? NO_ERROR : NO_INIT;
-        }
-        inline const NativeBuffer& getBuffer() const {
-            return mNativeBuffer;
-        }
-    protected:
-        friend class LightRefBase<Buffer>;
-        Buffer& operator = (const Buffer& rhs);
-        Buffer(const Buffer& rhs);
-        ~Buffer();
-    private:
-        ISurface::BufferHeap    mBufferHeap;
-        NativeBuffer            mNativeBuffer;
-        bool                    mSupportsCopybit;
-    };
-
-    class BufferSource : public Source {
-    public:
-        BufferSource(LayerBuffer& layer, const ISurface::BufferHeap& buffers);
-        virtual ~BufferSource();
-
-        status_t getStatus() const { return mStatus; }
-        sp<Buffer> getBuffer() const;
-        void setBuffer(const sp<Buffer>& buffer);
-
-        virtual void onDraw(const Region& clip) const;
-        virtual void postBuffer(ssize_t offset);
-        virtual void unregisterBuffers();
-        virtual bool transformed() const;
-        virtual void destroy() { }
-    private:
-        status_t initTempBuffer() const;
-        void clearTempBufferImage() const;
-        mutable Mutex                   mBufferSourceLock;
-        sp<Buffer>                      mBuffer;
-        status_t                        mStatus;
-        ISurface::BufferHeap            mBufferHeap;
-        size_t                          mBufferSize;
-        mutable LayerBase::Texture      mTexture;
-        mutable NativeBuffer            mTempBuffer;
-        mutable bool                    mUseEGLImageDirectly;
-    };
-    
-    class OverlaySource : public Source {
-    public:
-        OverlaySource(LayerBuffer& layer,
-                sp<OverlayRef>* overlayRef, 
-                uint32_t w, uint32_t h, int32_t format, int32_t orientation);
-        virtual ~OverlaySource();
-        virtual void onDraw(const Region& clip) const;
-        virtual void onTransaction(uint32_t flags);
-        virtual void onVisibilityResolved(const Transform& planeTransform);
-        virtual void destroy();
-    private:
-
-        class OverlayChannel : public BnOverlay {
-            wp<LayerBuffer> mLayer;
-            virtual void destroy() {
-                sp<LayerBuffer> layer(mLayer.promote());
-                if (layer != 0) {
-                    layer->serverDestroy();
-                }
-            }
-        public:
-            OverlayChannel(const sp<LayerBuffer>& layer)
-                : mLayer(layer) {
-            }
-        };
-        
-        friend class OverlayChannel;
-        bool mVisibilityChanged;
-
-        overlay_t* mOverlay;        
-        overlay_handle_t mOverlayHandle;
-        overlay_control_device_t* mOverlayDevice;
-        uint32_t mWidth;
-        uint32_t mHeight;
-        int32_t mFormat;
-        int32_t mWidthStride;
-        int32_t mHeightStride;
-        int32_t mOrientation;
-        mutable Mutex mOverlaySourceLock;
-        bool mInitialized;
-    };
-
-
-    class SurfaceLayerBuffer : public LayerBaseClient::Surface
-    {
-    public:
-        SurfaceLayerBuffer(const sp<SurfaceFlinger>& flinger,
-                        SurfaceID id, const sp<LayerBuffer>& owner);
-        virtual ~SurfaceLayerBuffer();
-
-        virtual status_t registerBuffers(const ISurface::BufferHeap& buffers);
-        virtual void postBuffer(ssize_t offset);
-        virtual void unregisterBuffers();
-        
-        virtual sp<OverlayRef> createOverlay(
-                uint32_t w, uint32_t h, int32_t format, int32_t orientation);
-    private:
-        sp<LayerBuffer> getOwner() const {
-            return static_cast<LayerBuffer*>(Surface::getOwner().get());
-        }
-    };
-
-    mutable Mutex   mLock;
-    sp<Source>      mSource;
-    sp<Surface>     mSurface;
-    bool            mInvalidate;
-    bool            mNeedsBlending;
-    copybit_device_t* mBlitEngine;
-};
-
-// ---------------------------------------------------------------------------
-
-}; // namespace android
-
-#endif // ANDROID_LAYER_BUFFER_H
diff --git a/libs/surfaceflinger/LayerDim.cpp b/libs/surfaceflinger/LayerDim.cpp
deleted file mode 100644
index fd61e30..0000000
--- a/libs/surfaceflinger/LayerDim.cpp
+++ /dev/null
@@ -1,168 +0,0 @@
-/*
- * Copyright (C) 2007 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#include <stdlib.h>
-#include <stdint.h>
-#include <sys/types.h>
-
-#include <utils/Errors.h>
-#include <utils/Log.h>
-
-#include <ui/GraphicBuffer.h>
-
-#include "LayerDim.h"
-#include "SurfaceFlinger.h"
-#include "DisplayHardware/DisplayHardware.h"
-
-namespace android {
-// ---------------------------------------------------------------------------
-
-const uint32_t LayerDim::typeInfo = LayerBaseClient::typeInfo | 0x10;
-const char* const LayerDim::typeID = "LayerDim";
-
-bool LayerDim::sUseTexture;
-GLuint LayerDim::sTexId;
-EGLImageKHR LayerDim::sImage;
-int32_t LayerDim::sWidth;
-int32_t LayerDim::sHeight;
-
-// ---------------------------------------------------------------------------
-
-LayerDim::LayerDim(SurfaceFlinger* flinger, DisplayID display,
-        const sp<Client>& client, int32_t i)
-    : LayerBaseClient(flinger, display, client, i)
-{
-}
-
-void LayerDim::initDimmer(SurfaceFlinger* flinger, uint32_t w, uint32_t h)
-{
-    sTexId = -1;
-    sImage = EGL_NO_IMAGE_KHR;
-    sWidth = w;
-    sHeight = h;
-    sUseTexture = false;
-    
-#if defined(DIM_WITH_TEXTURE) && defined(EGL_ANDROID_image_native_buffer)
-
-#warning "using a texture to implement LayerDim"
-    
-    /* On some h/w like msm7K, it is faster to use a texture because the
-     * software renderer will defer to copybit, for this to work we need to
-     * use an EGLImage texture so copybit can actually make use of it.
-     * This burns a full-screen worth of graphic memory.
-     */
-
-    const DisplayHardware& hw(flinger->graphicPlane(0).displayHardware());
-    uint32_t flags = hw.getFlags();
-
-    if (LIKELY(flags & DisplayHardware::DIRECT_TEXTURE)) {
-        sp<GraphicBuffer> buffer = new GraphicBuffer(w, h, PIXEL_FORMAT_RGB_565,
-                 GraphicBuffer::USAGE_SW_WRITE_OFTEN |
-                 GraphicBuffer::USAGE_HW_TEXTURE);
-        
-        android_native_buffer_t* clientBuf = buffer->getNativeBuffer();
-
-        glGenTextures(1, &sTexId);
-        glBindTexture(GL_TEXTURE_2D, sTexId);
-
-        EGLDisplay dpy = eglGetCurrentDisplay();
-        sImage = eglCreateImageKHR(dpy, EGL_NO_CONTEXT, 
-                EGL_NATIVE_BUFFER_ANDROID, (EGLClientBuffer)clientBuf, 0);
-        if (sImage == EGL_NO_IMAGE_KHR) {
-            LOGE("eglCreateImageKHR() failed. err=0x%4x", eglGetError());
-            return;
-        }
-
-        glEGLImageTargetTexture2DOES(GL_TEXTURE_2D, (GLeglImageOES)sImage);
-        GLint error = glGetError();
-        if (error != GL_NO_ERROR) {
-            eglDestroyImageKHR(dpy, sImage);
-            LOGE("glEGLImageTargetTexture2DOES() failed. err=0x%4x", error);
-            return;
-        }
-
-        // initialize the texture with zeros
-        GGLSurface t;
-        buffer->lock(&t, GRALLOC_USAGE_SW_WRITE_OFTEN);
-        memset(t.data, 0, t.stride * t.height * 2);
-        buffer->unlock();
-        sUseTexture = true;
-    }
-#endif
-}
-
-LayerDim::~LayerDim()
-{
-}
-
-void LayerDim::onDraw(const Region& clip) const
-{
-    const State& s(drawingState());
-    Region::const_iterator it = clip.begin();
-    Region::const_iterator const end = clip.end();
-    if (s.alpha>0 && (it != end)) {
-        const DisplayHardware& hw(graphicPlane(0).displayHardware());
-        const GGLfixed alpha = (s.alpha << 16)/255;
-        const uint32_t fbHeight = hw.getHeight();
-        glDisable(GL_DITHER);
-        glEnable(GL_BLEND);
-        glBlendFunc(GL_ONE, GL_ONE_MINUS_SRC_ALPHA);
-        glColor4x(0, 0, 0, alpha);
-        
-#if defined(DIM_WITH_TEXTURE) && defined(EGL_ANDROID_image_native_buffer)
-        if (sUseTexture) {
-            glBindTexture(GL_TEXTURE_2D, sTexId);
-            glEnable(GL_TEXTURE_2D);
-            glTexEnvx(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_REPLACE);
-            const GLshort texCoords[4][2] = {
-                    { 0,  0 },
-                    { 0,  1 },
-                    { 1,  1 },
-                    { 1,  0 }
-            };
-            glMatrixMode(GL_TEXTURE);
-            glLoadIdentity();
-            glEnableClientState(GL_TEXTURE_COORD_ARRAY);
-            glTexCoordPointer(2, GL_SHORT, 0, texCoords);
-        } else
-#endif
-        {
-            glDisable(GL_TEXTURE_2D);
-        }
-
-        GLshort w = sWidth;
-        GLshort h = sHeight;
-        const GLshort vertices[4][2] = {
-                { 0, 0 },
-                { 0, h },
-                { w, h },
-                { w, 0 }
-        };
-        glVertexPointer(2, GL_SHORT, 0, vertices);
-
-        while (it != end) {
-            const Rect& r = *it++;
-            const GLint sy = fbHeight - (r.top + r.height());
-            glScissor(r.left, sy, r.width(), r.height());
-            glDrawArrays(GL_TRIANGLE_FAN, 0, 4); 
-        }
-    }
-    glDisableClientState(GL_TEXTURE_COORD_ARRAY);
-}
-
-// ---------------------------------------------------------------------------
-
-}; // namespace android
diff --git a/libs/surfaceflinger/LayerDim.h b/libs/surfaceflinger/LayerDim.h
deleted file mode 100644
index d4672a1..0000000
--- a/libs/surfaceflinger/LayerDim.h
+++ /dev/null
@@ -1,60 +0,0 @@
-/*
- * Copyright (C) 2007 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#ifndef ANDROID_LAYER_DIM_H
-#define ANDROID_LAYER_DIM_H
-
-#include <stdint.h>
-#include <sys/types.h>
-
-#include <EGL/egl.h>
-#include <EGL/eglext.h>
-
-#include "LayerBase.h"
-
-// ---------------------------------------------------------------------------
-
-namespace android {
-
-class LayerDim : public LayerBaseClient
-{
-    static bool sUseTexture;
-    static GLuint sTexId;
-    static EGLImageKHR sImage;
-    static int32_t sWidth;
-    static int32_t sHeight;
-public:    
-    static const uint32_t typeInfo;
-    static const char* const typeID;
-    virtual char const* getTypeID() const { return typeID; }
-    virtual uint32_t getTypeInfo() const { return typeInfo; }
-    
-                LayerDim(SurfaceFlinger* flinger, DisplayID display,
-                        const sp<Client>& client, int32_t i);
-        virtual ~LayerDim();
-
-    virtual void onDraw(const Region& clip) const;
-    virtual bool needsBlending() const  { return true; }
-    virtual bool isSecure() const       { return false; }
-
-    static void initDimmer(SurfaceFlinger* flinger, uint32_t w, uint32_t h);
-};
-
-// ---------------------------------------------------------------------------
-
-}; // namespace android
-
-#endif // ANDROID_LAYER_DIM_H
diff --git a/libs/surfaceflinger/MessageQueue.cpp b/libs/surfaceflinger/MessageQueue.cpp
deleted file mode 100644
index b43d801..0000000
--- a/libs/surfaceflinger/MessageQueue.cpp
+++ /dev/null
@@ -1,192 +0,0 @@
-/*
- * Copyright (C) 2009 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#include <stdint.h>
-#include <errno.h>
-#include <sys/types.h>
-
-#include <utils/threads.h>
-#include <utils/Timers.h>
-#include <utils/Log.h>
-#include <binder/IPCThreadState.h>
-
-#include "MessageQueue.h"
-
-namespace android {
-
-// ---------------------------------------------------------------------------
-
-void MessageList::insert(const sp<MessageBase>& node) 
-{
-    LIST::iterator cur(mList.begin());
-    LIST::iterator end(mList.end());
-    while (cur != end) {
-        if (*node < **cur) {
-            mList.insert(cur, node);
-            return;
-        }
-        ++cur;
-    }
-    mList.insert(++end, node);
-}
-
-void MessageList::remove(MessageList::LIST::iterator pos) 
-{
-    mList.erase(pos);
-}
-
-// ---------------------------------------------------------------------------
-
-MessageQueue::MessageQueue()
-    : mInvalidate(false)
-{
-    mInvalidateMessage = new MessageBase(INVALIDATE);
-}
-
-MessageQueue::~MessageQueue()
-{
-}
-
-MessageList::value_type MessageQueue::waitMessage(nsecs_t timeout)
-{
-    MessageList::value_type result;
-
-    bool again;
-    do {
-        const nsecs_t timeoutTime = systemTime() + timeout;
-        while (true) {
-            Mutex::Autolock _l(mLock);
-            nsecs_t now = systemTime();
-            nsecs_t nextEventTime = -1;
-
-            // invalidate messages are always handled first
-            if (mInvalidate) {
-                mInvalidate = false;
-                mInvalidateMessage->when = now;
-                result = mInvalidateMessage;
-                break;
-            }
-
-            LIST::iterator cur(mMessages.begin());
-            if (cur != mMessages.end()) {
-                result = *cur;
-            }
-            
-            if (result != 0) {
-                if (result->when <= now) {
-                    // there is a message to deliver
-                    mMessages.remove(cur);
-                    break;
-                }
-                if (timeout>=0 && timeoutTime < now) {
-                    // we timed-out, return a NULL message
-                    result = 0;
-                    break;
-                }
-                nextEventTime = result->when;
-                result = 0;
-            }
-
-            if (timeout >= 0 && nextEventTime > 0) {
-                if (nextEventTime > timeoutTime) {
-                    nextEventTime = timeoutTime;
-                }
-            }
-
-            if (nextEventTime >= 0) {
-                //LOGD("nextEventTime = %lld ms", nextEventTime);
-                if (nextEventTime > 0) {
-                    // we're about to wait, flush the binder command buffer
-                    IPCThreadState::self()->flushCommands();
-                    const nsecs_t reltime = nextEventTime - systemTime();
-                    if (reltime > 0) {
-                        mCondition.waitRelative(mLock, reltime);
-                    }
-                }
-            } else {
-                //LOGD("going to wait");
-                // we're about to wait, flush the binder command buffer
-                IPCThreadState::self()->flushCommands();
-                mCondition.wait(mLock);
-            }
-        } 
-        // here we're not holding the lock anymore
-
-        if (result == 0)
-            break;
-
-        again = result->handler();
-        if (again) {
-            // the message has been processed. release our reference to it
-            // without holding the lock.
-            result = 0;
-        }
-        
-    } while (again);
-
-    return result;
-}
-
-status_t MessageQueue::postMessage(
-        const MessageList::value_type& message, nsecs_t relTime, uint32_t flags)
-{
-    return queueMessage(message, relTime, flags);
-}
-
-status_t MessageQueue::invalidate() {
-    Mutex::Autolock _l(mLock);
-    mInvalidate = true;
-    mCondition.signal();
-    return NO_ERROR;
-}
-
-status_t MessageQueue::queueMessage(
-        const MessageList::value_type& message, nsecs_t relTime, uint32_t flags)
-{
-    Mutex::Autolock _l(mLock);
-    message->when = systemTime() + relTime;
-    mMessages.insert(message);
-    
-    //LOGD("MessageQueue::queueMessage time = %lld ms", message->when);
-    //dumpLocked(message);
-
-    mCondition.signal();
-    return NO_ERROR;
-}
-
-void MessageQueue::dump(const MessageList::value_type& message)
-{
-    Mutex::Autolock _l(mLock);
-    dumpLocked(message);
-}
-
-void MessageQueue::dumpLocked(const MessageList::value_type& message)
-{
-    LIST::const_iterator cur(mMessages.begin());
-    LIST::const_iterator end(mMessages.end());
-    int c = 0;
-    while (cur != end) {
-        const char tick = (*cur == message) ? '>' : ' ';
-        LOGD("%c %d: msg{.what=%08x, when=%lld}",
-                tick, c, (*cur)->what, (*cur)->when);
-        ++cur;
-        c++;
-    }
-}
-
-// ---------------------------------------------------------------------------
-
-}; // namespace android
diff --git a/libs/surfaceflinger/MessageQueue.h b/libs/surfaceflinger/MessageQueue.h
deleted file mode 100644
index dc8138d..0000000
--- a/libs/surfaceflinger/MessageQueue.h
+++ /dev/null
@@ -1,127 +0,0 @@
-/*
- * Copyright (C) 2009 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#ifndef ANDROID_MESSAGE_QUEUE_H
-#define ANDROID_MESSAGE_QUEUE_H
-
-#include <stdint.h>
-#include <errno.h>
-#include <sys/types.h>
-
-#include <utils/threads.h>
-#include <utils/Timers.h>
-#include <utils/List.h>
-
-
-namespace android {
-
-// ---------------------------------------------------------------------------
-
-class MessageBase;
-
-class MessageList 
-{
-    List< sp<MessageBase> > mList;
-    typedef List< sp<MessageBase> > LIST;
-public:
-    typedef sp<MessageBase> value_type;
-    inline LIST::iterator begin()                { return mList.begin(); }
-    inline LIST::const_iterator begin() const    { return mList.begin(); }
-    inline LIST::iterator end()                  { return mList.end(); }
-    inline LIST::const_iterator end() const      { return mList.end(); }
-    inline bool isEmpty() const { return mList.empty(); }
-    void insert(const sp<MessageBase>& node);
-    void remove(LIST::iterator pos);
-};
-
-// ============================================================================
-
-class MessageBase : 
-    public LightRefBase<MessageBase>
-{
-public:
-    nsecs_t     when;
-    uint32_t    what;
-    int32_t     arg0;    
-
-    MessageBase() : when(0), what(0), arg0(0) { }
-    MessageBase(uint32_t what, int32_t arg0=0)
-        : when(0), what(what), arg0(arg0) { }
-    
-    // return true if message has a handler
-    virtual bool handler() { return false; }
-    
-protected:
-    virtual ~MessageBase() { }
-
-private:
-    friend class LightRefBase<MessageBase>;
-};
-
-inline bool operator < (const MessageBase& lhs, const MessageBase& rhs) {
-    return lhs.when < rhs.when;
-}
-
-// ---------------------------------------------------------------------------
-
-class MessageQueue
-{
-    typedef List< sp<MessageBase> > LIST;
-public:
-
-    // this is a work-around the multichar constant warning. A macro would
-    // work too, but would pollute the namespace.
-    template <int a, int b, int c, int d>
-    struct WHAT {
-        static const uint32_t Value = 
-            (uint32_t(a&0xff)<<24)|(uint32_t(b&0xff)<<16)|
-            (uint32_t(c&0xff)<<8)|uint32_t(d&0xff);
-    };
-    
-    MessageQueue();
-    ~MessageQueue();
-
-    // pre-defined messages
-    enum {
-        INVALIDATE = WHAT<'_','p','d','t'>::Value
-    };
-
-    MessageList::value_type waitMessage(nsecs_t timeout = -1);
-    
-    status_t postMessage(const MessageList::value_type& message, 
-            nsecs_t reltime=0, uint32_t flags = 0);
-        
-    status_t invalidate();
-    
-    void dump(const MessageList::value_type& message);
-
-private:
-    status_t queueMessage(const MessageList::value_type& message,
-            nsecs_t reltime, uint32_t flags);
-    void dumpLocked(const MessageList::value_type& message);
-    
-    Mutex           mLock;
-    Condition       mCondition;
-    MessageList     mMessages;
-    bool            mInvalidate;
-    MessageList::value_type mInvalidateMessage;
-};
-
-// ---------------------------------------------------------------------------
-
-}; // namespace android
-
-#endif /* ANDROID_MESSAGE_QUEUE_H */
diff --git a/libs/surfaceflinger/SurfaceFlinger.cpp b/libs/surfaceflinger/SurfaceFlinger.cpp
deleted file mode 100644
index 0722fda..0000000
--- a/libs/surfaceflinger/SurfaceFlinger.cpp
+++ /dev/null
@@ -1,1940 +0,0 @@
-/*
- * Copyright (C) 2007 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#include <stdlib.h>
-#include <stdio.h>
-#include <stdint.h>
-#include <unistd.h>
-#include <fcntl.h>
-#include <errno.h>
-#include <math.h>
-#include <limits.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <sys/ioctl.h>
-
-#include <cutils/log.h>
-#include <cutils/properties.h>
-
-#include <binder/IPCThreadState.h>
-#include <binder/IServiceManager.h>
-#include <binder/MemoryHeapBase.h>
-
-#include <utils/String8.h>
-#include <utils/String16.h>
-#include <utils/StopWatch.h>
-
-#include <ui/GraphicBufferAllocator.h>
-#include <ui/PixelFormat.h>
-
-#include <pixelflinger/pixelflinger.h>
-#include <GLES/gl.h>
-
-#include "clz.h"
-#include "Layer.h"
-#include "LayerBlur.h"
-#include "LayerBuffer.h"
-#include "LayerDim.h"
-#include "SurfaceFlinger.h"
-
-#include "DisplayHardware/DisplayHardware.h"
-
-/* ideally AID_GRAPHICS would be in a semi-public header
- * or there would be a way to map a user/group name to its id
- */
-#ifndef AID_GRAPHICS
-#define AID_GRAPHICS 1003
-#endif
-
-#define DISPLAY_COUNT       1
-
-namespace android {
-
-// ---------------------------------------------------------------------------
-
-void SurfaceFlinger::instantiate() {
-    defaultServiceManager()->addService(
-            String16("SurfaceFlinger"), new SurfaceFlinger());
-}
-
-void SurfaceFlinger::shutdown() {
-    // we should unregister here, but not really because
-    // when (if) the service manager goes away, all the services
-    // it has a reference to will leave too.
-}
-
-// ---------------------------------------------------------------------------
-
-SurfaceFlinger::LayerVector::LayerVector(const SurfaceFlinger::LayerVector& rhs)
-    : lookup(rhs.lookup), layers(rhs.layers)
-{
-}
-
-ssize_t SurfaceFlinger::LayerVector::indexOf(
-        const sp<LayerBase>& key, size_t guess) const
-{
-    if (guess<size() && lookup.keyAt(guess) == key)
-        return guess;
-    const ssize_t i = lookup.indexOfKey(key);
-    if (i>=0) {
-        const size_t idx = lookup.valueAt(i);
-        LOGE_IF(layers[idx]!=key,
-            "LayerVector[%p]: layers[%d]=%p, key=%p",
-            this, int(idx), layers[idx].get(), key.get());
-        return idx;
-    }
-    return i;
-}
-
-ssize_t SurfaceFlinger::LayerVector::add(
-        const sp<LayerBase>& layer,
-        Vector< sp<LayerBase> >::compar_t cmp)
-{
-    size_t count = layers.size();
-    ssize_t l = 0;
-    ssize_t h = count-1;
-    ssize_t mid;
-    sp<LayerBase> const* a = layers.array();
-    while (l <= h) {
-        mid = l + (h - l)/2;
-        const int c = cmp(a+mid, &layer);
-        if (c == 0)     { l = mid; break; }
-        else if (c<0)   { l = mid+1; }
-        else            { h = mid-1; }
-    }
-    size_t order = l;
-    while (order<count && !cmp(&layer, a+order)) {
-        order++;
-    }
-    count = lookup.size();
-    for (size_t i=0 ; i<count ; i++) {
-        if (lookup.valueAt(i) >= order) {
-            lookup.editValueAt(i)++;
-        }
-    }
-    layers.insertAt(layer, order);
-    lookup.add(layer, order);
-    return order;
-}
-
-ssize_t SurfaceFlinger::LayerVector::remove(const sp<LayerBase>& layer)
-{
-    const ssize_t keyIndex = lookup.indexOfKey(layer);
-    if (keyIndex >= 0) {
-        const size_t index = lookup.valueAt(keyIndex);
-        LOGE_IF(layers[index]!=layer,
-                "LayerVector[%p]: layers[%u]=%p, layer=%p",
-                this, int(index), layers[index].get(), layer.get());
-        layers.removeItemsAt(index);
-        lookup.removeItemsAt(keyIndex);
-        const size_t count = lookup.size();
-        for (size_t i=0 ; i<count ; i++) {
-            if (lookup.valueAt(i) >= size_t(index)) {
-                lookup.editValueAt(i)--;
-            }
-        }
-        return index;
-    }
-    return NAME_NOT_FOUND;
-}
-
-ssize_t SurfaceFlinger::LayerVector::reorder(
-        const sp<LayerBase>& layer,
-        Vector< sp<LayerBase> >::compar_t cmp)
-{
-    // XXX: it's a little lame. but oh well...
-    ssize_t err = remove(layer);
-    if (err >=0)
-        err = add(layer, cmp);
-    return err;
-}
-
-// ---------------------------------------------------------------------------
-#if 0
-#pragma mark -
-#endif
-
-SurfaceFlinger::SurfaceFlinger()
-    :   BnSurfaceComposer(), Thread(false),
-        mTransactionFlags(0),
-        mTransactionCount(0),
-        mResizeTransationPending(false),
-        mLayersRemoved(false),
-        mBootTime(systemTime()),
-        mHardwareTest("android.permission.HARDWARE_TEST"),
-        mAccessSurfaceFlinger("android.permission.ACCESS_SURFACE_FLINGER"),
-        mDump("android.permission.DUMP"),
-        mVisibleRegionsDirty(false),
-        mDeferReleaseConsole(false),
-        mFreezeDisplay(false),
-        mFreezeCount(0),
-        mFreezeDisplayTime(0),
-        mDebugRegion(0),
-        mDebugBackground(0),
-        mDebugInSwapBuffers(0),
-        mLastSwapBufferTime(0),
-        mDebugInTransaction(0),
-        mLastTransactionTime(0),
-        mBootFinished(false),
-        mConsoleSignals(0),
-        mSecureFrameBuffer(0)
-{
-    init();
-}
-
-void SurfaceFlinger::init()
-{
-    LOGI("SurfaceFlinger is starting");
-
-    // debugging stuff...
-    char value[PROPERTY_VALUE_MAX];
-    property_get("debug.sf.showupdates", value, "0");
-    mDebugRegion = atoi(value);
-    property_get("debug.sf.showbackground", value, "0");
-    mDebugBackground = atoi(value);
-
-    LOGI_IF(mDebugRegion,           "showupdates enabled");
-    LOGI_IF(mDebugBackground,       "showbackground enabled");
-}
-
-SurfaceFlinger::~SurfaceFlinger()
-{
-    glDeleteTextures(1, &mWormholeTexName);
-}
-
-overlay_control_device_t* SurfaceFlinger::getOverlayEngine() const
-{
-    return graphicPlane(0).displayHardware().getOverlayEngine();
-}
-
-sp<IMemoryHeap> SurfaceFlinger::getCblk() const
-{
-    return mServerHeap;
-}
-
-sp<ISurfaceFlingerClient> SurfaceFlinger::createConnection()
-{
-    Mutex::Autolock _l(mStateLock);
-    uint32_t token = mTokens.acquire();
-
-    sp<Client> client = new Client(token, this);
-    if (client->ctrlblk == 0) {
-        mTokens.release(token);
-        return 0;
-    }
-    status_t err = mClientsMap.add(token, client);
-    if (err < 0) {
-        mTokens.release(token);
-        return 0;
-    }
-    sp<BClient> bclient =
-        new BClient(this, token, client->getControlBlockMemory());
-    return bclient;
-}
-
-void SurfaceFlinger::destroyConnection(ClientID cid)
-{
-    Mutex::Autolock _l(mStateLock);
-    sp<Client> client = mClientsMap.valueFor(cid);
-    if (client != 0) {
-        // free all the layers this client owns
-        Vector< wp<LayerBaseClient> > layers(client->getLayers());
-        const size_t count = layers.size();
-        for (size_t i=0 ; i<count ; i++) {
-            sp<LayerBaseClient> layer(layers[i].promote());
-            if (layer != 0) {
-                purgatorizeLayer_l(layer);
-            }
-        }
-
-        // the resources associated with this client will be freed
-        // during the next transaction, after these surfaces have been
-        // properly removed from the screen
-
-        // remove this client from our ClientID->Client mapping.
-        mClientsMap.removeItem(cid);
-
-        // and add it to the list of disconnected clients
-        mDisconnectedClients.add(client);
-
-        // request a transaction
-        setTransactionFlags(eTransactionNeeded);
-    }
-}
-
-const GraphicPlane& SurfaceFlinger::graphicPlane(int dpy) const
-{
-    LOGE_IF(uint32_t(dpy) >= DISPLAY_COUNT, "Invalid DisplayID %d", dpy);
-    const GraphicPlane& plane(mGraphicPlanes[dpy]);
-    return plane;
-}
-
-GraphicPlane& SurfaceFlinger::graphicPlane(int dpy)
-{
-    return const_cast<GraphicPlane&>(
-        const_cast<SurfaceFlinger const *>(this)->graphicPlane(dpy));
-}
-
-void SurfaceFlinger::bootFinished()
-{
-    const nsecs_t now = systemTime();
-    const nsecs_t duration = now - mBootTime;
-    LOGI("Boot is finished (%ld ms)", long(ns2ms(duration)) );  
-    mBootFinished = true;
-    property_set("ctl.stop", "bootanim");
-}
-
-void SurfaceFlinger::onFirstRef()
-{
-    run("SurfaceFlinger", PRIORITY_URGENT_DISPLAY);
-
-    // Wait for the main thread to be done with its initialization
-    mReadyToRunBarrier.wait();
-}
-
-static inline uint16_t pack565(int r, int g, int b) {
-    return (r<<11)|(g<<5)|b;
-}
-
-status_t SurfaceFlinger::readyToRun()
-{
-    LOGI(   "SurfaceFlinger's main thread ready to run. "
-            "Initializing graphics H/W...");
-
-    // we only support one display currently
-    int dpy = 0;
-
-    {
-        // initialize the main display
-        GraphicPlane& plane(graphicPlane(dpy));
-        DisplayHardware* const hw = new DisplayHardware(this, dpy);
-        plane.setDisplayHardware(hw);
-    }
-
-    // create the shared control-block
-    mServerHeap = new MemoryHeapBase(4096,
-            MemoryHeapBase::READ_ONLY, "SurfaceFlinger read-only heap");
-    LOGE_IF(mServerHeap==0, "can't create shared memory dealer");
-    
-    mServerCblk = static_cast<surface_flinger_cblk_t*>(mServerHeap->getBase());
-    LOGE_IF(mServerCblk==0, "can't get to shared control block's address");
-    
-    new(mServerCblk) surface_flinger_cblk_t;
-
-    // initialize primary screen
-    // (other display should be initialized in the same manner, but
-    // asynchronously, as they could come and go. None of this is supported
-    // yet).
-    const GraphicPlane& plane(graphicPlane(dpy));
-    const DisplayHardware& hw = plane.displayHardware();
-    const uint32_t w = hw.getWidth();
-    const uint32_t h = hw.getHeight();
-    const uint32_t f = hw.getFormat();
-    hw.makeCurrent();
-
-    // initialize the shared control block
-    mServerCblk->connected |= 1<<dpy;
-    display_cblk_t* dcblk = mServerCblk->displays + dpy;
-    memset(dcblk, 0, sizeof(display_cblk_t));
-    dcblk->w            = plane.getWidth();
-    dcblk->h            = plane.getHeight();
-    dcblk->format       = f;
-    dcblk->orientation  = ISurfaceComposer::eOrientationDefault;
-    dcblk->xdpi         = hw.getDpiX();
-    dcblk->ydpi         = hw.getDpiY();
-    dcblk->fps          = hw.getRefreshRate();
-    dcblk->density      = hw.getDensity();
-    asm volatile ("":::"memory");
-
-    // Initialize OpenGL|ES
-    glActiveTexture(GL_TEXTURE0);
-    glBindTexture(GL_TEXTURE_2D, 0);
-    glTexParameterx(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
-    glTexParameterx(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
-    glTexParameterx(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
-    glTexParameterx(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
-    glTexEnvx(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_REPLACE);
-    glPixelStorei(GL_UNPACK_ALIGNMENT, 4);
-    glPixelStorei(GL_PACK_ALIGNMENT, 4); 
-    glEnableClientState(GL_VERTEX_ARRAY);
-    glEnable(GL_SCISSOR_TEST);
-    glShadeModel(GL_FLAT);
-    glDisable(GL_DITHER);
-    glDisable(GL_CULL_FACE);
-
-    const uint16_t g0 = pack565(0x0F,0x1F,0x0F);
-    const uint16_t g1 = pack565(0x17,0x2f,0x17);
-    const uint16_t textureData[4] = { g0, g1, g1, g0 };
-    glGenTextures(1, &mWormholeTexName);
-    glBindTexture(GL_TEXTURE_2D, mWormholeTexName);
-    glTexParameterx(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
-    glTexParameterx(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
-    glTexParameterx(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_REPEAT);
-    glTexParameterx(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_REPEAT);
-    glTexImage2D(GL_TEXTURE_2D, 0, GL_RGB, 2, 2, 0,
-            GL_RGB, GL_UNSIGNED_SHORT_5_6_5, textureData);
-
-    glViewport(0, 0, w, h);
-    glMatrixMode(GL_PROJECTION);
-    glLoadIdentity();
-    glOrthof(0, w, h, 0, 0, 1);
-
-   LayerDim::initDimmer(this, w, h);
-
-    mReadyToRunBarrier.open();
-
-    /*
-     *  We're now ready to accept clients...
-     */
-
-    // start boot animation
-    property_set("ctl.start", "bootanim");
-    
-    return NO_ERROR;
-}
-
-// ----------------------------------------------------------------------------
-#if 0
-#pragma mark -
-#pragma mark Events Handler
-#endif
-
-void SurfaceFlinger::waitForEvent()
-{
-    while (true) {
-        nsecs_t timeout = -1;
-        const nsecs_t freezeDisplayTimeout = ms2ns(5000);
-        if (UNLIKELY(isFrozen())) {
-            // wait 5 seconds
-            const nsecs_t now = systemTime();
-            if (mFreezeDisplayTime == 0) {
-                mFreezeDisplayTime = now;
-            }
-            nsecs_t waitTime = freezeDisplayTimeout - (now - mFreezeDisplayTime);
-            timeout = waitTime>0 ? waitTime : 0;
-        }
-
-        MessageList::value_type msg = mEventQueue.waitMessage(timeout);
-
-        // see if we timed out
-        if (isFrozen()) {
-            const nsecs_t now = systemTime();
-            nsecs_t frozenTime = (now - mFreezeDisplayTime);
-            if (frozenTime >= freezeDisplayTimeout) {
-                // we timed out and are still frozen
-                LOGW("timeout expired mFreezeDisplay=%d, mFreezeCount=%d",
-                        mFreezeDisplay, mFreezeCount);
-                mFreezeDisplayTime = 0;
-                mFreezeCount = 0;
-                mFreezeDisplay = false;
-            }
-        }
-
-        if (msg != 0) {
-            switch (msg->what) {
-                case MessageQueue::INVALIDATE:
-                    // invalidate message, just return to the main loop
-                    return;
-            }
-        }
-    }
-}
-
-void SurfaceFlinger::signalEvent() {
-    mEventQueue.invalidate();
-}
-
-void SurfaceFlinger::signal() const {
-    // this is the IPC call
-    const_cast<SurfaceFlinger*>(this)->signalEvent();
-}
-
-void SurfaceFlinger::signalDelayedEvent(nsecs_t delay)
-{
-    mEventQueue.postMessage( new MessageBase(MessageQueue::INVALIDATE), delay);
-}
-
-// ----------------------------------------------------------------------------
-#if 0
-#pragma mark -
-#pragma mark Main loop
-#endif
-
-bool SurfaceFlinger::threadLoop()
-{
-    waitForEvent();
-
-    // check for transactions
-    if (UNLIKELY(mConsoleSignals)) {
-        handleConsoleEvents();
-    }
-
-    if (LIKELY(mTransactionCount == 0)) {
-        // if we're in a global transaction, don't do anything.
-        const uint32_t mask = eTransactionNeeded | eTraversalNeeded;
-        uint32_t transactionFlags = getTransactionFlags(mask);
-        if (LIKELY(transactionFlags)) {
-            handleTransaction(transactionFlags);
-        }
-    }
-
-    // post surfaces (if needed)
-    handlePageFlip();
-
-    const DisplayHardware& hw(graphicPlane(0).displayHardware());
-    if (LIKELY(hw.canDraw() && !isFrozen())) {
-        // repaint the framebuffer (if needed)
-        handleRepaint();
-
-        // inform the h/w that we're done compositing
-        hw.compositionComplete();
-
-        // release the clients before we flip ('cause flip might block)
-        unlockClients();
-
-        postFramebuffer();
-    } else {
-        // pretend we did the post
-        unlockClients();
-        usleep(16667); // 60 fps period
-    }
-    return true;
-}
-
-void SurfaceFlinger::postFramebuffer()
-{
-    if (!mInvalidRegion.isEmpty()) {
-        const DisplayHardware& hw(graphicPlane(0).displayHardware());
-        const nsecs_t now = systemTime();
-        mDebugInSwapBuffers = now;
-        hw.flip(mInvalidRegion);
-        mLastSwapBufferTime = systemTime() - now;
-        mDebugInSwapBuffers = 0;
-        mInvalidRegion.clear();
-    }
-}
-
-void SurfaceFlinger::handleConsoleEvents()
-{
-    // something to do with the console
-    const DisplayHardware& hw = graphicPlane(0).displayHardware();
-
-    int what = android_atomic_and(0, &mConsoleSignals);
-    if (what & eConsoleAcquired) {
-        hw.acquireScreen();
-    }
-
-    if (mDeferReleaseConsole && hw.canDraw()) {
-        // We got the release signal before the acquire signal
-        mDeferReleaseConsole = false;
-        hw.releaseScreen();
-    }
-
-    if (what & eConsoleReleased) {
-        if (hw.canDraw()) {
-            hw.releaseScreen();
-        } else {
-            mDeferReleaseConsole = true;
-        }
-    }
-
-    mDirtyRegion.set(hw.bounds());
-}
-
-void SurfaceFlinger::handleTransaction(uint32_t transactionFlags)
-{
-    Vector< sp<LayerBase> > ditchedLayers;
-
-    { // scope for the lock
-        Mutex::Autolock _l(mStateLock);
-        const nsecs_t now = systemTime();
-        mDebugInTransaction = now;
-        handleTransactionLocked(transactionFlags, ditchedLayers);
-        mLastTransactionTime = systemTime() - now;
-        mDebugInTransaction = 0;
-    }
-
-    // do this without lock held
-    const size_t count = ditchedLayers.size();
-    for (size_t i=0 ; i<count ; i++) {
-        if (ditchedLayers[i] != 0) {
-            //LOGD("ditching layer %p", ditchedLayers[i].get());
-            ditchedLayers[i]->ditch();
-        }
-    }
-}
-
-void SurfaceFlinger::handleTransactionLocked(
-        uint32_t transactionFlags, Vector< sp<LayerBase> >& ditchedLayers)
-{
-    const LayerVector& currentLayers(mCurrentState.layersSortedByZ);
-    const size_t count = currentLayers.size();
-
-    /*
-     * Traversal of the children
-     * (perform the transaction for each of them if needed)
-     */
-
-    const bool layersNeedTransaction = transactionFlags & eTraversalNeeded;
-    if (layersNeedTransaction) {
-        for (size_t i=0 ; i<count ; i++) {
-            const sp<LayerBase>& layer = currentLayers[i];
-            uint32_t trFlags = layer->getTransactionFlags(eTransactionNeeded);
-            if (!trFlags) continue;
-
-            const uint32_t flags = layer->doTransaction(0);
-            if (flags & Layer::eVisibleRegion)
-                mVisibleRegionsDirty = true;
-        }
-    }
-
-    /*
-     * Perform our own transaction if needed
-     */
-
-    if (transactionFlags & eTransactionNeeded) {
-        if (mCurrentState.orientation != mDrawingState.orientation) {
-            // the orientation has changed, recompute all visible regions
-            // and invalidate everything.
-
-            const int dpy = 0;
-            const int orientation = mCurrentState.orientation;
-            const uint32_t type = mCurrentState.orientationType;
-            GraphicPlane& plane(graphicPlane(dpy));
-            plane.setOrientation(orientation);
-
-            // update the shared control block
-            const DisplayHardware& hw(plane.displayHardware());
-            volatile display_cblk_t* dcblk = mServerCblk->displays + dpy;
-            dcblk->orientation = orientation;
-            dcblk->w = plane.getWidth();
-            dcblk->h = plane.getHeight();
-
-            mVisibleRegionsDirty = true;
-            mDirtyRegion.set(hw.bounds());
-        }
-
-        if (mCurrentState.freezeDisplay != mDrawingState.freezeDisplay) {
-            // freezing or unfreezing the display -> trigger animation if needed
-            mFreezeDisplay = mCurrentState.freezeDisplay;
-            if (mFreezeDisplay)
-                 mFreezeDisplayTime = 0;
-        }
-
-        if (currentLayers.size() > mDrawingState.layersSortedByZ.size()) {
-            // layers have been added
-            mVisibleRegionsDirty = true;
-        }
-
-        // some layers might have been removed, so
-        // we need to update the regions they're exposing.
-        if (mLayersRemoved) {
-            mLayersRemoved = false;
-            mVisibleRegionsDirty = true;
-            const LayerVector& previousLayers(mDrawingState.layersSortedByZ);
-            const size_t count = previousLayers.size();
-            for (size_t i=0 ; i<count ; i++) {
-                const sp<LayerBase>& layer(previousLayers[i]);
-                if (currentLayers.indexOf( layer ) < 0) {
-                    // this layer is not visible anymore
-                    ditchedLayers.add(layer);
-                    mDirtyRegionRemovedLayer.orSelf(layer->visibleRegionScreen);
-                }
-            }
-        }
-
-        // get rid of all resources we don't need anymore
-        // (layers and clients)
-        free_resources_l();
-    }
-
-    commitTransaction();
-}
-
-sp<FreezeLock> SurfaceFlinger::getFreezeLock() const
-{
-    return new FreezeLock(const_cast<SurfaceFlinger *>(this));
-}
-
-void SurfaceFlinger::computeVisibleRegions(
-    LayerVector& currentLayers, Region& dirtyRegion, Region& opaqueRegion)
-{
-    const GraphicPlane& plane(graphicPlane(0));
-    const Transform& planeTransform(plane.transform());
-    const DisplayHardware& hw(plane.displayHardware());
-    const Region screenRegion(hw.bounds());
-
-    Region aboveOpaqueLayers;
-    Region aboveCoveredLayers;
-    Region dirty;
-
-    bool secureFrameBuffer = false;
-
-    size_t i = currentLayers.size();
-    while (i--) {
-        const sp<LayerBase>& layer = currentLayers[i];
-        layer->validateVisibility(planeTransform);
-
-        // start with the whole surface at its current location
-        const Layer::State& s(layer->drawingState());
-
-        /*
-         * opaqueRegion: area of a surface that is fully opaque.
-         */
-        Region opaqueRegion;
-
-        /*
-         * visibleRegion: area of a surface that is visible on screen
-         * and not fully transparent. This is essentially the layer's
-         * footprint minus the opaque regions above it.
-         * Areas covered by a translucent surface are considered visible.
-         */
-        Region visibleRegion;
-
-        /*
-         * coveredRegion: area of a surface that is covered by all
-         * visible regions above it (which includes the translucent areas).
-         */
-        Region coveredRegion;
-
-
-        // handle hidden surfaces by setting the visible region to empty
-        if (LIKELY(!(s.flags & ISurfaceComposer::eLayerHidden) && s.alpha)) {
-            const bool translucent = layer->needsBlending();
-            const Rect bounds(layer->visibleBounds());
-            visibleRegion.set(bounds);
-            visibleRegion.andSelf(screenRegion);
-            if (!visibleRegion.isEmpty()) {
-                // Remove the transparent area from the visible region
-                if (translucent) {
-                    visibleRegion.subtractSelf(layer->transparentRegionScreen);
-                }
-
-                // compute the opaque region
-                const int32_t layerOrientation = layer->getOrientation();
-                if (s.alpha==255 && !translucent &&
-                        ((layerOrientation & Transform::ROT_INVALID) == false)) {
-                    // the opaque region is the layer's footprint
-                    opaqueRegion = visibleRegion;
-                }
-            }
-        }
-
-        // Clip the covered region to the visible region
-        coveredRegion = aboveCoveredLayers.intersect(visibleRegion);
-
-        // Update aboveCoveredLayers for next (lower) layer
-        aboveCoveredLayers.orSelf(visibleRegion);
-
-        // subtract the opaque region covered by the layers above us
-        visibleRegion.subtractSelf(aboveOpaqueLayers);
-
-        // compute this layer's dirty region
-        if (layer->contentDirty) {
-            // we need to invalidate the whole region
-            dirty = visibleRegion;
-            // as well, as the old visible region
-            dirty.orSelf(layer->visibleRegionScreen);
-            layer->contentDirty = false;
-        } else {
-            /* compute the exposed region:
-             *   the exposed region consists of two components:
-             *   1) what's VISIBLE now and was COVERED before
-             *   2) what's EXPOSED now less what was EXPOSED before
-             *
-             * note that (1) is conservative, we start with the whole
-             * visible region but only keep what used to be covered by
-             * something -- which mean it may have been exposed.
-             *
-             * (2) handles areas that were not covered by anything but got
-             * exposed because of a resize.
-             */
-            const Region newExposed = visibleRegion - coveredRegion;
-            const Region oldVisibleRegion = layer->visibleRegionScreen;
-            const Region oldCoveredRegion = layer->coveredRegionScreen;
-            const Region oldExposed = oldVisibleRegion - oldCoveredRegion;
-            dirty = (visibleRegion&oldCoveredRegion) | (newExposed-oldExposed);
-        }
-        dirty.subtractSelf(aboveOpaqueLayers);
-
-        // accumulate to the screen dirty region
-        dirtyRegion.orSelf(dirty);
-
-        // Update aboveOpaqueLayers for next (lower) layer
-        aboveOpaqueLayers.orSelf(opaqueRegion);
-        
-        // Store the visible region is screen space
-        layer->setVisibleRegion(visibleRegion);
-        layer->setCoveredRegion(coveredRegion);
-
-        // If a secure layer is partially visible, lock-down the screen!
-        if (layer->isSecure() && !visibleRegion.isEmpty()) {
-            secureFrameBuffer = true;
-        }
-    }
-
-    // invalidate the areas where a layer was removed
-    dirtyRegion.orSelf(mDirtyRegionRemovedLayer);
-    mDirtyRegionRemovedLayer.clear();
-
-    mSecureFrameBuffer = secureFrameBuffer;
-    opaqueRegion = aboveOpaqueLayers;
-}
-
-
-void SurfaceFlinger::commitTransaction()
-{
-    mDrawingState = mCurrentState;
-    mResizeTransationPending = false;
-    mTransactionCV.broadcast();
-}
-
-void SurfaceFlinger::handlePageFlip()
-{
-    bool visibleRegions = mVisibleRegionsDirty;
-    LayerVector& currentLayers = const_cast<LayerVector&>(mDrawingState.layersSortedByZ);
-    visibleRegions |= lockPageFlip(currentLayers);
-
-        const DisplayHardware& hw = graphicPlane(0).displayHardware();
-        const Region screenRegion(hw.bounds());
-        if (visibleRegions) {
-            Region opaqueRegion;
-            computeVisibleRegions(currentLayers, mDirtyRegion, opaqueRegion);
-            mWormholeRegion = screenRegion.subtract(opaqueRegion);
-            mVisibleRegionsDirty = false;
-        }
-
-    unlockPageFlip(currentLayers);
-    mDirtyRegion.andSelf(screenRegion);
-}
-
-bool SurfaceFlinger::lockPageFlip(const LayerVector& currentLayers)
-{
-    bool recomputeVisibleRegions = false;
-    size_t count = currentLayers.size();
-    sp<LayerBase> const* layers = currentLayers.array();
-    for (size_t i=0 ; i<count ; i++) {
-        const sp<LayerBase>& layer = layers[i];
-        layer->lockPageFlip(recomputeVisibleRegions);
-    }
-    return recomputeVisibleRegions;
-}
-
-void SurfaceFlinger::unlockPageFlip(const LayerVector& currentLayers)
-{
-    const GraphicPlane& plane(graphicPlane(0));
-    const Transform& planeTransform(plane.transform());
-    size_t count = currentLayers.size();
-    sp<LayerBase> const* layers = currentLayers.array();
-    for (size_t i=0 ; i<count ; i++) {
-        const sp<LayerBase>& layer = layers[i];
-        layer->unlockPageFlip(planeTransform, mDirtyRegion);
-    }
-}
-
-
-void SurfaceFlinger::handleRepaint()
-{
-    // compute the invalid region
-    mInvalidRegion.orSelf(mDirtyRegion);
-    if (mInvalidRegion.isEmpty()) {
-        // nothing to do
-        return;
-    }
-
-    if (UNLIKELY(mDebugRegion)) {
-        debugFlashRegions();
-    }
-
-    // set the frame buffer
-    const DisplayHardware& hw(graphicPlane(0).displayHardware());
-    glMatrixMode(GL_MODELVIEW);
-    glLoadIdentity();
-
-    uint32_t flags = hw.getFlags();
-    if ((flags & DisplayHardware::SWAP_RECTANGLE) || 
-        (flags & DisplayHardware::BUFFER_PRESERVED)) 
-    {
-        // we can redraw only what's dirty, but since SWAP_RECTANGLE only
-        // takes a rectangle, we must make sure to update that whole
-        // rectangle in that case
-        if (flags & DisplayHardware::SWAP_RECTANGLE) {
-            // FIXME: we really should be able to pass a region to
-            // SWAP_RECTANGLE so that we don't have to redraw all this.
-            mDirtyRegion.set(mInvalidRegion.bounds());
-        } else {
-            // in the BUFFER_PRESERVED case, obviously, we can update only
-            // what's needed and nothing more.
-            // NOTE: this is NOT a common case, as preserving the backbuffer
-            // is costly and usually involves copying the whole update back.
-        }
-    } else {
-        if (flags & DisplayHardware::PARTIAL_UPDATES) {
-            // We need to redraw the rectangle that will be updated
-            // (pushed to the framebuffer).
-            // This is needed because PARTIAL_UPDATES only takes one
-            // rectangle instead of a region (see DisplayHardware::flip())
-            mDirtyRegion.set(mInvalidRegion.bounds());
-        } else {
-            // we need to redraw everything (the whole screen)
-            mDirtyRegion.set(hw.bounds());
-            mInvalidRegion = mDirtyRegion;
-        }
-    }
-
-    // compose all surfaces
-    composeSurfaces(mDirtyRegion);
-
-    // clear the dirty regions
-    mDirtyRegion.clear();
-}
-
-void SurfaceFlinger::composeSurfaces(const Region& dirty)
-{
-    if (UNLIKELY(!mWormholeRegion.isEmpty())) {
-        // should never happen unless the window manager has a bug
-        // draw something...
-        drawWormhole();
-    }
-    const SurfaceFlinger& flinger(*this);
-    const LayerVector& drawingLayers(mDrawingState.layersSortedByZ);
-    const size_t count = drawingLayers.size();
-    sp<LayerBase> const* const layers = drawingLayers.array();
-    for (size_t i=0 ; i<count ; ++i) {
-        const sp<LayerBase>& layer = layers[i];
-        const Region& visibleRegion(layer->visibleRegionScreen);
-        if (!visibleRegion.isEmpty())  {
-            const Region clip(dirty.intersect(visibleRegion));
-            if (!clip.isEmpty()) {
-                layer->draw(clip);
-            }
-        }
-    }
-}
-
-void SurfaceFlinger::unlockClients()
-{
-    const LayerVector& drawingLayers(mDrawingState.layersSortedByZ);
-    const size_t count = drawingLayers.size();
-    sp<LayerBase> const* const layers = drawingLayers.array();
-    for (size_t i=0 ; i<count ; ++i) {
-        const sp<LayerBase>& layer = layers[i];
-        layer->finishPageFlip();
-    }
-}
-
-void SurfaceFlinger::debugFlashRegions()
-{
-     const DisplayHardware& hw(graphicPlane(0).displayHardware());
-     const uint32_t flags = hw.getFlags();
-
-     if (!((flags & DisplayHardware::SWAP_RECTANGLE) ||
-             (flags & DisplayHardware::BUFFER_PRESERVED))) {
-         const Region repaint((flags & DisplayHardware::PARTIAL_UPDATES) ?
-                 mDirtyRegion.bounds() : hw.bounds());
-         composeSurfaces(repaint);
-     }
-    
-    glDisable(GL_TEXTURE_2D);
-    glDisable(GL_BLEND);
-    glDisable(GL_DITHER);
-    glDisable(GL_SCISSOR_TEST);
-
-    static int toggle = 0;
-    toggle = 1 - toggle;
-    if (toggle) {
-        glColor4x(0x10000, 0, 0x10000, 0x10000);
-    } else {
-        glColor4x(0x10000, 0x10000, 0, 0x10000);
-    }
-
-    Region::const_iterator it = mDirtyRegion.begin();
-    Region::const_iterator const end = mDirtyRegion.end();
-    while (it != end) {
-        const Rect& r = *it++;
-        GLfloat vertices[][2] = {
-                { r.left,  r.top },
-                { r.left,  r.bottom },
-                { r.right, r.bottom },
-                { r.right, r.top }
-        };
-        glVertexPointer(2, GL_FLOAT, 0, vertices);
-        glDrawArrays(GL_TRIANGLE_FAN, 0, 4);
-    }
-    
-    if (mInvalidRegion.isEmpty()) {
-        mDirtyRegion.dump("mDirtyRegion");
-        mInvalidRegion.dump("mInvalidRegion");
-    }
-    hw.flip(mInvalidRegion);
-
-    if (mDebugRegion > 1)
-       usleep(mDebugRegion * 1000);
-
-    glEnable(GL_SCISSOR_TEST);
-    //mDirtyRegion.dump("mDirtyRegion");
-}
-
-void SurfaceFlinger::drawWormhole() const
-{
-    const Region region(mWormholeRegion.intersect(mDirtyRegion));
-    if (region.isEmpty())
-        return;
-
-    const DisplayHardware& hw(graphicPlane(0).displayHardware());
-    const int32_t width = hw.getWidth();
-    const int32_t height = hw.getHeight();
-
-    glDisable(GL_BLEND);
-    glDisable(GL_DITHER);
-
-    if (LIKELY(!mDebugBackground)) {
-        glClearColorx(0,0,0,0);
-        Region::const_iterator it = region.begin();
-        Region::const_iterator const end = region.end();
-        while (it != end) {
-            const Rect& r = *it++;
-            const GLint sy = height - (r.top + r.height());
-            glScissor(r.left, sy, r.width(), r.height());
-            glClear(GL_COLOR_BUFFER_BIT);
-        }
-    } else {
-        const GLshort vertices[][2] = { { 0, 0 }, { width, 0 },
-                { width, height }, { 0, height }  };
-        const GLshort tcoords[][2] = { { 0, 0 }, { 1, 0 },  { 1, 1 }, { 0, 1 } };
-        glVertexPointer(2, GL_SHORT, 0, vertices);
-        glTexCoordPointer(2, GL_SHORT, 0, tcoords);
-        glEnableClientState(GL_TEXTURE_COORD_ARRAY);
-        glEnable(GL_TEXTURE_2D);
-        glBindTexture(GL_TEXTURE_2D, mWormholeTexName);
-        glTexEnvx(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_REPLACE);
-        glMatrixMode(GL_TEXTURE);
-        glLoadIdentity();
-        glScalef(width*(1.0f/32.0f), height*(1.0f/32.0f), 1);
-        Region::const_iterator it = region.begin();
-        Region::const_iterator const end = region.end();
-        while (it != end) {
-            const Rect& r = *it++;
-            const GLint sy = height - (r.top + r.height());
-            glScissor(r.left, sy, r.width(), r.height());
-            glDrawArrays(GL_TRIANGLE_FAN, 0, 4);
-        }
-        glDisableClientState(GL_TEXTURE_COORD_ARRAY);
-    }
-}
-
-void SurfaceFlinger::debugShowFPS() const
-{
-    static int mFrameCount;
-    static int mLastFrameCount = 0;
-    static nsecs_t mLastFpsTime = 0;
-    static float mFps = 0;
-    mFrameCount++;
-    nsecs_t now = systemTime();
-    nsecs_t diff = now - mLastFpsTime;
-    if (diff > ms2ns(250)) {
-        mFps =  ((mFrameCount - mLastFrameCount) * float(s2ns(1))) / diff;
-        mLastFpsTime = now;
-        mLastFrameCount = mFrameCount;
-    }
-    // XXX: mFPS has the value we want
- }
-
-status_t SurfaceFlinger::addLayer(const sp<LayerBase>& layer)
-{
-    Mutex::Autolock _l(mStateLock);
-    addLayer_l(layer);
-    setTransactionFlags(eTransactionNeeded|eTraversalNeeded);
-    return NO_ERROR;
-}
-
-status_t SurfaceFlinger::removeLayer(const sp<LayerBase>& layer)
-{
-    Mutex::Autolock _l(mStateLock);
-    status_t err = purgatorizeLayer_l(layer);
-    if (err == NO_ERROR)
-        setTransactionFlags(eTransactionNeeded);
-    return err;
-}
-
-status_t SurfaceFlinger::invalidateLayerVisibility(const sp<LayerBase>& layer)
-{
-    layer->forceVisibilityTransaction();
-    setTransactionFlags(eTraversalNeeded);
-    return NO_ERROR;
-}
-
-status_t SurfaceFlinger::addLayer_l(const sp<LayerBase>& layer)
-{
-    if (layer == 0)
-        return BAD_VALUE;
-    ssize_t i = mCurrentState.layersSortedByZ.add(
-                layer, &LayerBase::compareCurrentStateZ);
-    sp<LayerBaseClient> lbc = LayerBase::dynamicCast< LayerBaseClient* >(layer.get());
-    if (lbc != 0) {
-        mLayerMap.add(lbc->serverIndex(), lbc);
-    }
-    return NO_ERROR;
-}
-
-status_t SurfaceFlinger::removeLayer_l(const sp<LayerBase>& layerBase)
-{
-    ssize_t index = mCurrentState.layersSortedByZ.remove(layerBase);
-    if (index >= 0) {
-        mLayersRemoved = true;
-        sp<LayerBaseClient> layer =
-            LayerBase::dynamicCast< LayerBaseClient* >(layerBase.get());
-        if (layer != 0) {
-            mLayerMap.removeItem(layer->serverIndex());
-        }
-        return NO_ERROR;
-    }
-    return status_t(index);
-}
-
-status_t SurfaceFlinger::purgatorizeLayer_l(const sp<LayerBase>& layerBase)
-{
-    // remove the layer from the main list (through a transaction).
-    ssize_t err = removeLayer_l(layerBase);
-
-    layerBase->onRemoved();
-
-    // it's possible that we don't find a layer, because it might
-    // have been destroyed already -- this is not technically an error
-    // from the user because there is a race between BClient::destroySurface(),
-    // ~BClient() and ~ISurface().
-    return (err == NAME_NOT_FOUND) ? status_t(NO_ERROR) : err;
-}
-
-
-void SurfaceFlinger::free_resources_l()
-{
-    // free resources associated with disconnected clients
-    Vector< sp<Client> >& disconnectedClients(mDisconnectedClients);
-    const size_t count = disconnectedClients.size();
-    for (size_t i=0 ; i<count ; i++) {
-        sp<Client> client = disconnectedClients[i];
-        mTokens.release(client->cid);
-    }
-    disconnectedClients.clear();
-}
-
-uint32_t SurfaceFlinger::getTransactionFlags(uint32_t flags)
-{
-    return android_atomic_and(~flags, &mTransactionFlags) & flags;
-}
-
-uint32_t SurfaceFlinger::setTransactionFlags(uint32_t flags, nsecs_t delay)
-{
-    uint32_t old = android_atomic_or(flags, &mTransactionFlags);
-    if ((old & flags)==0) { // wake the server up
-        if (delay > 0) {
-            signalDelayedEvent(delay);
-        } else {
-            signalEvent();
-        }
-    }
-    return old;
-}
-
-void SurfaceFlinger::openGlobalTransaction()
-{
-    android_atomic_inc(&mTransactionCount);
-}
-
-void SurfaceFlinger::closeGlobalTransaction()
-{
-    if (android_atomic_dec(&mTransactionCount) == 1) {
-        signalEvent();
-
-        // if there is a transaction with a resize, wait for it to 
-        // take effect before returning.
-        Mutex::Autolock _l(mStateLock);
-        while (mResizeTransationPending) {
-            status_t err = mTransactionCV.waitRelative(mStateLock, s2ns(5));
-            if (CC_UNLIKELY(err != NO_ERROR)) {
-                // just in case something goes wrong in SF, return to the
-                // called after a few seconds.
-                LOGW_IF(err == TIMED_OUT, "closeGlobalTransaction timed out!");
-                mResizeTransationPending = false;
-                break;
-            }
-        }
-    }
-}
-
-status_t SurfaceFlinger::freezeDisplay(DisplayID dpy, uint32_t flags)
-{
-    if (UNLIKELY(uint32_t(dpy) >= DISPLAY_COUNT))
-        return BAD_VALUE;
-
-    Mutex::Autolock _l(mStateLock);
-    mCurrentState.freezeDisplay = 1;
-    setTransactionFlags(eTransactionNeeded);
-
-    // flags is intended to communicate some sort of animation behavior
-    // (for instance fading)
-    return NO_ERROR;
-}
-
-status_t SurfaceFlinger::unfreezeDisplay(DisplayID dpy, uint32_t flags)
-{
-    if (UNLIKELY(uint32_t(dpy) >= DISPLAY_COUNT))
-        return BAD_VALUE;
-
-    Mutex::Autolock _l(mStateLock);
-    mCurrentState.freezeDisplay = 0;
-    setTransactionFlags(eTransactionNeeded);
-
-    // flags is intended to communicate some sort of animation behavior
-    // (for instance fading)
-    return NO_ERROR;
-}
-
-int SurfaceFlinger::setOrientation(DisplayID dpy, 
-        int orientation, uint32_t flags)
-{
-    if (UNLIKELY(uint32_t(dpy) >= DISPLAY_COUNT))
-        return BAD_VALUE;
-
-    Mutex::Autolock _l(mStateLock);
-    if (mCurrentState.orientation != orientation) {
-        if (uint32_t(orientation)<=eOrientation270 || orientation==42) {
-            mCurrentState.orientationType = flags;
-            mCurrentState.orientation = orientation;
-            setTransactionFlags(eTransactionNeeded);
-            mTransactionCV.wait(mStateLock);
-        } else {
-            orientation = BAD_VALUE;
-        }
-    }
-    return orientation;
-}
-
-sp<ISurface> SurfaceFlinger::createSurface(ClientID clientId, int pid,
-        const String8& name, ISurfaceFlingerClient::surface_data_t* params,
-        DisplayID d, uint32_t w, uint32_t h, PixelFormat format,
-        uint32_t flags)
-{
-    sp<LayerBaseClient> layer;
-    sp<LayerBaseClient::Surface> surfaceHandle;
-
-    if (int32_t(w|h) < 0) {
-        LOGE("createSurface() failed, w or h is negative (w=%d, h=%d)",
-                int(w), int(h));
-        return surfaceHandle;
-    }
-    
-    Mutex::Autolock _l(mStateLock);
-    sp<Client> client = mClientsMap.valueFor(clientId);
-    if (UNLIKELY(client == 0)) {
-        LOGE("createSurface() failed, client not found (id=%d)", clientId);
-        return surfaceHandle;
-    }
-
-    //LOGD("createSurface for pid %d (%d x %d)", pid, w, h);
-    int32_t id = client->generateId(pid);
-    if (uint32_t(id) >= NUM_LAYERS_MAX) {
-        LOGE("createSurface() failed, generateId = %d", id);
-        return surfaceHandle;
-    }
-
-    switch (flags & eFXSurfaceMask) {
-        case eFXSurfaceNormal:
-            if (UNLIKELY(flags & ePushBuffers)) {
-                layer = createPushBuffersSurfaceLocked(client, d, id,
-                        w, h, flags);
-            } else {
-                layer = createNormalSurfaceLocked(client, d, id,
-                        w, h, flags, format);
-            }
-            break;
-        case eFXSurfaceBlur:
-            layer = createBlurSurfaceLocked(client, d, id, w, h, flags);
-            break;
-        case eFXSurfaceDim:
-            layer = createDimSurfaceLocked(client, d, id, w, h, flags);
-            break;
-    }
-
-    if (layer != 0) {
-        layer->setName(name);
-        setTransactionFlags(eTransactionNeeded);
-        surfaceHandle = layer->getSurface();
-        if (surfaceHandle != 0) { 
-            params->token = surfaceHandle->getToken();
-            params->identity = surfaceHandle->getIdentity();
-            params->width = w;
-            params->height = h;
-            params->format = format;
-        }
-    }
-
-    return surfaceHandle;
-}
-
-sp<LayerBaseClient> SurfaceFlinger::createNormalSurfaceLocked(
-        const sp<Client>& client, DisplayID display,
-        int32_t id, uint32_t w, uint32_t h, uint32_t flags,
-        PixelFormat& format)
-{
-    // initialize the surfaces
-    switch (format) { // TODO: take h/w into account
-    case PIXEL_FORMAT_TRANSPARENT:
-    case PIXEL_FORMAT_TRANSLUCENT:
-        format = PIXEL_FORMAT_RGBA_8888;
-        break;
-    case PIXEL_FORMAT_OPAQUE:
-        format = PIXEL_FORMAT_RGB_565;
-        break;
-    }
-
-    sp<Layer> layer = new Layer(this, display, client, id);
-    status_t err = layer->setBuffers(w, h, format, flags);
-    if (LIKELY(err == NO_ERROR)) {
-        layer->initStates(w, h, flags);
-        addLayer_l(layer);
-    } else {
-        LOGE("createNormalSurfaceLocked() failed (%s)", strerror(-err));
-        layer.clear();
-    }
-    return layer;
-}
-
-sp<LayerBaseClient> SurfaceFlinger::createBlurSurfaceLocked(
-        const sp<Client>& client, DisplayID display,
-        int32_t id, uint32_t w, uint32_t h, uint32_t flags)
-{
-    sp<LayerBlur> layer = new LayerBlur(this, display, client, id);
-    layer->initStates(w, h, flags);
-    addLayer_l(layer);
-    return layer;
-}
-
-sp<LayerBaseClient> SurfaceFlinger::createDimSurfaceLocked(
-        const sp<Client>& client, DisplayID display,
-        int32_t id, uint32_t w, uint32_t h, uint32_t flags)
-{
-    sp<LayerDim> layer = new LayerDim(this, display, client, id);
-    layer->initStates(w, h, flags);
-    addLayer_l(layer);
-    return layer;
-}
-
-sp<LayerBaseClient> SurfaceFlinger::createPushBuffersSurfaceLocked(
-        const sp<Client>& client, DisplayID display,
-        int32_t id, uint32_t w, uint32_t h, uint32_t flags)
-{
-    sp<LayerBuffer> layer = new LayerBuffer(this, display, client, id);
-    layer->initStates(w, h, flags);
-    addLayer_l(layer);
-    return layer;
-}
-
-status_t SurfaceFlinger::removeSurface(SurfaceID index)
-{
-    /*
-     * called by the window manager, when a surface should be marked for
-     * destruction.
-     * 
-     * The surface is removed from the current and drawing lists, but placed
-     * in the purgatory queue, so it's not destroyed right-away (we need
-     * to wait for all client's references to go away first).
-     */
-
-    status_t err = NAME_NOT_FOUND;
-    Mutex::Autolock _l(mStateLock);
-    sp<LayerBaseClient> layer = getLayerUser_l(index);
-    if (layer != 0) {
-        err = purgatorizeLayer_l(layer);
-        if (err == NO_ERROR) {
-            setTransactionFlags(eTransactionNeeded);
-        }
-    }
-    return err;
-}
-
-status_t SurfaceFlinger::destroySurface(const sp<LayerBaseClient>& layer)
-{
-    // called by ~ISurface() when all references are gone
-    
-    class MessageDestroySurface : public MessageBase {
-        SurfaceFlinger* flinger;
-        sp<LayerBaseClient> layer;
-    public:
-        MessageDestroySurface(
-                SurfaceFlinger* flinger, const sp<LayerBaseClient>& layer)
-            : flinger(flinger), layer(layer) { }
-        virtual bool handler() {
-            sp<LayerBaseClient> l(layer);
-            layer.clear(); // clear it outside of the lock;
-            Mutex::Autolock _l(flinger->mStateLock);
-            /*
-             * remove the layer from the current list -- chances are that it's 
-             * not in the list anyway, because it should have been removed 
-             * already upon request of the client (eg: window manager). 
-             * However, a buggy client could have not done that.
-             * Since we know we don't have any more clients, we don't need
-             * to use the purgatory.
-             */
-            status_t err = flinger->removeLayer_l(l);
-            LOGE_IF(err<0 && err != NAME_NOT_FOUND,
-                    "error removing layer=%p (%s)", l.get(), strerror(-err));
-            return true;
-        }
-    };
-
-    mEventQueue.postMessage( new MessageDestroySurface(this, layer) );
-    return NO_ERROR;
-}
-
-status_t SurfaceFlinger::setClientState(
-        ClientID cid,
-        int32_t count,
-        const layer_state_t* states)
-{
-    Mutex::Autolock _l(mStateLock);
-    uint32_t flags = 0;
-    cid <<= 16;
-    for (int i=0 ; i<count ; i++) {
-        const layer_state_t& s = states[i];
-        sp<LayerBaseClient> layer(getLayerUser_l(s.surface | cid));
-        if (layer != 0) {
-            const uint32_t what = s.what;
-            if (what & ePositionChanged) {
-                if (layer->setPosition(s.x, s.y))
-                    flags |= eTraversalNeeded;
-            }
-            if (what & eLayerChanged) {
-                if (layer->setLayer(s.z)) {
-                    mCurrentState.layersSortedByZ.reorder(
-                            layer, &Layer::compareCurrentStateZ);
-                    // we need traversal (state changed)
-                    // AND transaction (list changed)
-                    flags |= eTransactionNeeded|eTraversalNeeded;
-                }
-            }
-            if (what & eSizeChanged) {
-                if (layer->setSize(s.w, s.h)) {
-                    flags |= eTraversalNeeded;
-                    mResizeTransationPending = true;
-                }
-            }
-            if (what & eAlphaChanged) {
-                if (layer->setAlpha(uint8_t(255.0f*s.alpha+0.5f)))
-                    flags |= eTraversalNeeded;
-            }
-            if (what & eMatrixChanged) {
-                if (layer->setMatrix(s.matrix))
-                    flags |= eTraversalNeeded;
-            }
-            if (what & eTransparentRegionChanged) {
-                if (layer->setTransparentRegionHint(s.transparentRegion))
-                    flags |= eTraversalNeeded;
-            }
-            if (what & eVisibilityChanged) {
-                if (layer->setFlags(s.flags, s.mask))
-                    flags |= eTraversalNeeded;
-            }
-        }
-    }
-    if (flags) {
-        setTransactionFlags(flags);
-    }
-    return NO_ERROR;
-}
-
-sp<LayerBaseClient> SurfaceFlinger::getLayerUser_l(SurfaceID s) const
-{
-    sp<LayerBaseClient> layer = mLayerMap.valueFor(s);
-    return layer;
-}
-
-void SurfaceFlinger::screenReleased(int dpy)
-{
-    // this may be called by a signal handler, we can't do too much in here
-    android_atomic_or(eConsoleReleased, &mConsoleSignals);
-    signalEvent();
-}
-
-void SurfaceFlinger::screenAcquired(int dpy)
-{
-    // this may be called by a signal handler, we can't do too much in here
-    android_atomic_or(eConsoleAcquired, &mConsoleSignals);
-    signalEvent();
-}
-
-status_t SurfaceFlinger::dump(int fd, const Vector<String16>& args)
-{
-    const size_t SIZE = 1024;
-    char buffer[SIZE];
-    String8 result;
-    if (!mDump.checkCalling()) {
-        snprintf(buffer, SIZE, "Permission Denial: "
-                "can't dump SurfaceFlinger from pid=%d, uid=%d\n",
-                IPCThreadState::self()->getCallingPid(),
-                IPCThreadState::self()->getCallingUid());
-        result.append(buffer);
-    } else {
-
-        // figure out if we're stuck somewhere
-        const nsecs_t now = systemTime();
-        const nsecs_t inSwapBuffers(mDebugInSwapBuffers);
-        const nsecs_t inTransaction(mDebugInTransaction);
-        nsecs_t inSwapBuffersDuration = (inSwapBuffers) ? now-inSwapBuffers : 0;
-        nsecs_t inTransactionDuration = (inTransaction) ? now-inTransaction : 0;
-
-        // Try to get the main lock, but don't insist if we can't
-        // (this would indicate SF is stuck, but we want to be able to
-        // print something in dumpsys).
-        int retry = 3;
-        while (mStateLock.tryLock()<0 && --retry>=0) {
-            usleep(1000000);
-        }
-        const bool locked(retry >= 0);
-        if (!locked) {
-            snprintf(buffer, SIZE, 
-                    "SurfaceFlinger appears to be unresponsive, "
-                    "dumping anyways (no locks held)\n");
-            result.append(buffer);
-        }
-
-        size_t s = mClientsMap.size();
-        char name[64];
-        for (size_t i=0 ; i<s ; i++) {
-            sp<Client> client = mClientsMap.valueAt(i);
-            sprintf(name, "  Client (id=0x%08x)", client->cid);
-            client->dump(name);
-        }
-        const LayerVector& currentLayers = mCurrentState.layersSortedByZ;
-        const size_t count = currentLayers.size();
-        for (size_t i=0 ; i<count ; i++) {
-            /*** LayerBase ***/
-            const sp<LayerBase>& layer = currentLayers[i];
-            const Layer::State& s = layer->drawingState();
-            snprintf(buffer, SIZE,
-                    "+ %s %p\n"
-                    "      "
-                    "z=%9d, pos=(%4d,%4d), size=(%4d,%4d), "
-                    "needsBlending=%1d, needsDithering=%1d, invalidate=%1d, "
-                    "alpha=0x%02x, flags=0x%08x, tr=[%.2f, %.2f][%.2f, %.2f]\n",
-                    layer->getTypeID(), layer.get(),
-                    s.z, layer->tx(), layer->ty(), s.w, s.h,
-                    layer->needsBlending(), layer->needsDithering(),
-                    layer->contentDirty,
-                    s.alpha, s.flags,
-                    s.transform[0][0], s.transform[0][1],
-                    s.transform[1][0], s.transform[1][1]);
-            result.append(buffer);
-            buffer[0] = 0;
-            /*** LayerBaseClient ***/
-            sp<LayerBaseClient> lbc =
-                LayerBase::dynamicCast< LayerBaseClient* >(layer.get());
-            if (lbc != 0) {
-                sp<Client> client(lbc->client.promote());
-                snprintf(buffer, SIZE,
-                        "      name=%s\n", lbc->getName().string());
-                result.append(buffer);
-                snprintf(buffer, SIZE,
-                        "      id=0x%08x, client=0x%08x, identity=%u\n",
-                        lbc->clientIndex(), client.get() ? client->cid : 0,
-                        lbc->getIdentity());
-
-                result.append(buffer);
-                buffer[0] = 0;
-            }
-            /*** Layer ***/
-            sp<Layer> l = LayerBase::dynamicCast< Layer* >(layer.get());
-            if (l != 0) {
-                SharedBufferStack::Statistics stats = l->lcblk->getStats();
-                result.append( l->lcblk->dump("      ") );
-                sp<const GraphicBuffer> buf0(l->getBuffer(0));
-                sp<const GraphicBuffer> buf1(l->getBuffer(1));
-                uint32_t w0=0, h0=0, s0=0;
-                uint32_t w1=0, h1=0, s1=0;
-                if (buf0 != 0) {
-                    w0 = buf0->getWidth();
-                    h0 = buf0->getHeight();
-                    s0 = buf0->getStride();
-                }
-                if (buf1 != 0) {
-                    w1 = buf1->getWidth();
-                    h1 = buf1->getHeight();
-                    s1 = buf1->getStride();
-                }
-                snprintf(buffer, SIZE,
-                        "      "
-                        "format=%2d, [%3ux%3u:%3u] [%3ux%3u:%3u],"
-                        " freezeLock=%p, dq-q-time=%u us\n",
-                        l->pixelFormat(),
-                        w0, h0, s0, w1, h1, s1,
-                        l->getFreezeLock().get(), stats.totalTime);
-                result.append(buffer);
-                buffer[0] = 0;
-            }
-            s.transparentRegion.dump(result, "transparentRegion");
-            layer->transparentRegionScreen.dump(result, "transparentRegionScreen");
-            layer->visibleRegionScreen.dump(result, "visibleRegionScreen");
-        }
-        mWormholeRegion.dump(result, "WormholeRegion");
-        const DisplayHardware& hw(graphicPlane(0).displayHardware());
-        snprintf(buffer, SIZE,
-                "  display frozen: %s, freezeCount=%d, orientation=%d, canDraw=%d\n",
-                mFreezeDisplay?"yes":"no", mFreezeCount,
-                mCurrentState.orientation, hw.canDraw());
-        result.append(buffer);
-        snprintf(buffer, SIZE,
-                "  last eglSwapBuffers() time: %f us\n"
-                "  last transaction time     : %f us\n",
-                mLastSwapBufferTime/1000.0, mLastTransactionTime/1000.0);
-        result.append(buffer);
-        if (inSwapBuffersDuration || !locked) {
-            snprintf(buffer, SIZE, "  eglSwapBuffers time: %f us\n",
-                    inSwapBuffersDuration/1000.0);
-            result.append(buffer);
-        }
-        if (inTransactionDuration || !locked) {
-            snprintf(buffer, SIZE, "  transaction time: %f us\n",
-                    inTransactionDuration/1000.0);
-            result.append(buffer);
-        }
-        snprintf(buffer, SIZE, "  client count: %d\n", mClientsMap.size());
-        result.append(buffer);
-        const GraphicBufferAllocator& alloc(GraphicBufferAllocator::get());
-        alloc.dump(result);
-
-        if (locked) {
-            mStateLock.unlock();
-        }
-    }
-    write(fd, result.string(), result.size());
-    return NO_ERROR;
-}
-
-status_t SurfaceFlinger::onTransact(
-    uint32_t code, const Parcel& data, Parcel* reply, uint32_t flags)
-{
-    switch (code) {
-        case CREATE_CONNECTION:
-        case OPEN_GLOBAL_TRANSACTION:
-        case CLOSE_GLOBAL_TRANSACTION:
-        case SET_ORIENTATION:
-        case FREEZE_DISPLAY:
-        case UNFREEZE_DISPLAY:
-        case BOOT_FINISHED:
-        {
-            // codes that require permission check
-            IPCThreadState* ipc = IPCThreadState::self();
-            const int pid = ipc->getCallingPid();
-            const int uid = ipc->getCallingUid();
-            if ((uid != AID_GRAPHICS) && !mAccessSurfaceFlinger.check(pid, uid)) {
-                LOGE("Permission Denial: "
-                        "can't access SurfaceFlinger pid=%d, uid=%d", pid, uid);
-                return PERMISSION_DENIED;
-            }
-        }
-    }
-    status_t err = BnSurfaceComposer::onTransact(code, data, reply, flags);
-    if (err == UNKNOWN_TRANSACTION || err == PERMISSION_DENIED) {
-        CHECK_INTERFACE(ISurfaceComposer, data, reply);
-        if (UNLIKELY(!mHardwareTest.checkCalling())) {
-            IPCThreadState* ipc = IPCThreadState::self();
-            const int pid = ipc->getCallingPid();
-            const int uid = ipc->getCallingUid();
-            LOGE("Permission Denial: "
-                    "can't access SurfaceFlinger pid=%d, uid=%d", pid, uid);
-            return PERMISSION_DENIED;
-        }
-        int n;
-        switch (code) {
-            case 1000: // SHOW_CPU, NOT SUPPORTED ANYMORE
-                return NO_ERROR;
-            case 1001:  // SHOW_FPS, NOT SUPPORTED ANYMORE
-                return NO_ERROR;
-            case 1002:  // SHOW_UPDATES
-                n = data.readInt32();
-                mDebugRegion = n ? n : (mDebugRegion ? 0 : 1);
-                return NO_ERROR;
-            case 1003:  // SHOW_BACKGROUND
-                n = data.readInt32();
-                mDebugBackground = n ? 1 : 0;
-                return NO_ERROR;
-            case 1004:{ // repaint everything
-                Mutex::Autolock _l(mStateLock);
-                const DisplayHardware& hw(graphicPlane(0).displayHardware());
-                mDirtyRegion.set(hw.bounds()); // careful that's not thread-safe
-                signalEvent();
-                return NO_ERROR;
-            }
-            case 1005:{ // force transaction
-                setTransactionFlags(eTransactionNeeded|eTraversalNeeded);
-                return NO_ERROR;
-            }
-            case 1007: // set mFreezeCount
-                mFreezeCount = data.readInt32();
-                mFreezeDisplayTime = 0;
-                return NO_ERROR;
-            case 1010:  // interrogate.
-                reply->writeInt32(0);
-                reply->writeInt32(0);
-                reply->writeInt32(mDebugRegion);
-                reply->writeInt32(mDebugBackground);
-                return NO_ERROR;
-            case 1013: {
-                Mutex::Autolock _l(mStateLock);
-                const DisplayHardware& hw(graphicPlane(0).displayHardware());
-                reply->writeInt32(hw.getPageFlipCount());
-            }
-            return NO_ERROR;
-        }
-    }
-    return err;
-}
-
-// ---------------------------------------------------------------------------
-#if 0
-#pragma mark -
-#endif
-
-Client::Client(ClientID clientID, const sp<SurfaceFlinger>& flinger)
-    : ctrlblk(0), cid(clientID), mPid(0), mBitmap(0), mFlinger(flinger)
-{
-    const int pgsize = getpagesize();
-    const int cblksize = ((sizeof(SharedClient)+(pgsize-1))&~(pgsize-1));
-
-    mCblkHeap = new MemoryHeapBase(cblksize, 0,
-            "SurfaceFlinger Client control-block");
-
-    ctrlblk = static_cast<SharedClient *>(mCblkHeap->getBase());
-    if (ctrlblk) { // construct the shared structure in-place.
-        new(ctrlblk) SharedClient;
-    }
-}
-
-Client::~Client() {
-    if (ctrlblk) {
-        ctrlblk->~SharedClient();  // destroy our shared-structure.
-    }
-}
-
-int32_t Client::generateId(int pid)
-{
-    const uint32_t i = clz( ~mBitmap );
-    if (i >= NUM_LAYERS_MAX) {
-        return NO_MEMORY;
-    }
-    mPid = pid;
-    mInUse.add(uint8_t(i));
-    mBitmap |= 1<<(31-i);
-    return i;
-}
-
-status_t Client::bindLayer(const sp<LayerBaseClient>& layer, int32_t id)
-{
-    ssize_t idx = mInUse.indexOf(id);
-    if (idx < 0)
-        return NAME_NOT_FOUND;
-    return mLayers.insertAt(layer, idx);
-}
-
-void Client::free(int32_t id)
-{
-    ssize_t idx = mInUse.remove(uint8_t(id));
-    if (idx >= 0) {
-        mBitmap &= ~(1<<(31-id));
-        mLayers.removeItemsAt(idx);
-    }
-}
-
-bool Client::isValid(int32_t i) const {
-    return (uint32_t(i)<NUM_LAYERS_MAX) && (mBitmap & (1<<(31-i)));
-}
-
-sp<LayerBaseClient> Client::getLayerUser(int32_t i) const {
-    sp<LayerBaseClient> lbc;
-    ssize_t idx = mInUse.indexOf(uint8_t(i));
-    if (idx >= 0) {
-        lbc = mLayers[idx].promote();
-        LOGE_IF(lbc==0, "getLayerUser(i=%d), idx=%d is dead", int(i), int(idx));
-    }
-    return lbc;
-}
-
-void Client::dump(const char* what)
-{
-}
-
-// ---------------------------------------------------------------------------
-#if 0
-#pragma mark -
-#endif
-
-BClient::BClient(SurfaceFlinger *flinger, ClientID cid, const sp<IMemoryHeap>& cblk)
-    : mId(cid), mFlinger(flinger), mCblk(cblk)
-{
-}
-
-BClient::~BClient() {
-    // destroy all resources attached to this client
-    mFlinger->destroyConnection(mId);
-}
-
-sp<IMemoryHeap> BClient::getControlBlock() const {
-    return mCblk;
-}
-
-sp<ISurface> BClient::createSurface(
-        ISurfaceFlingerClient::surface_data_t* params, int pid,
-        const String8& name,
-        DisplayID display, uint32_t w, uint32_t h, PixelFormat format,
-        uint32_t flags)
-{
-    return mFlinger->createSurface(mId, pid, name, params, display, w, h,
-            format, flags);
-}
-
-status_t BClient::destroySurface(SurfaceID sid)
-{
-    sid |= (mId << 16); // add the client-part to id
-    return mFlinger->removeSurface(sid);
-}
-
-status_t BClient::setState(int32_t count, const layer_state_t* states)
-{
-    return mFlinger->setClientState(mId, count, states);
-}
-
-// ---------------------------------------------------------------------------
-
-GraphicPlane::GraphicPlane()
-    : mHw(0)
-{
-}
-
-GraphicPlane::~GraphicPlane() {
-    delete mHw;
-}
-
-bool GraphicPlane::initialized() const {
-    return mHw ? true : false;
-}
-
-int GraphicPlane::getWidth() const {
-    return mWidth;
-}
-
-int GraphicPlane::getHeight() const {
-    return mHeight;
-}
-
-void GraphicPlane::setDisplayHardware(DisplayHardware *hw)
-{
-    mHw = hw;
-
-    // initialize the display orientation transform.
-    // it's a constant that should come from the display driver.
-    int displayOrientation = ISurfaceComposer::eOrientationDefault;
-    char property[PROPERTY_VALUE_MAX];
-    if (property_get("ro.sf.hwrotation", property, NULL) > 0) {
-        //displayOrientation
-        switch (atoi(property)) {
-        case 90:
-            displayOrientation = ISurfaceComposer::eOrientation90;
-            break;
-        case 270:
-            displayOrientation = ISurfaceComposer::eOrientation270;
-            break;
-        }
-    }
-
-    const float w = hw->getWidth();
-    const float h = hw->getHeight();
-    GraphicPlane::orientationToTransfrom(displayOrientation, w, h,
-            &mDisplayTransform);
-    if (displayOrientation & ISurfaceComposer::eOrientationSwapMask) {
-        mDisplayWidth = h;
-        mDisplayHeight = w;
-    } else {
-        mDisplayWidth = w;
-        mDisplayHeight = h;
-    }
-
-    setOrientation(ISurfaceComposer::eOrientationDefault);
-}
-
-status_t GraphicPlane::orientationToTransfrom(
-        int orientation, int w, int h, Transform* tr)
-{
-    uint32_t flags = 0;
-    switch (orientation) {
-    case ISurfaceComposer::eOrientationDefault:
-        flags = Transform::ROT_0;
-        break;
-    case ISurfaceComposer::eOrientation90:
-        flags = Transform::ROT_90;
-        break;
-    case ISurfaceComposer::eOrientation180:
-        flags = Transform::ROT_180;
-        break;
-    case ISurfaceComposer::eOrientation270:
-        flags = Transform::ROT_270;
-        break;
-    default:
-        return BAD_VALUE;
-    }
-    tr->set(flags, w, h);
-    return NO_ERROR;
-}
-
-status_t GraphicPlane::setOrientation(int orientation)
-{
-    // If the rotation can be handled in hardware, this is where
-    // the magic should happen.
-
-    const DisplayHardware& hw(displayHardware());
-    const float w = mDisplayWidth;
-    const float h = mDisplayHeight;
-    mWidth = int(w);
-    mHeight = int(h);
-
-    Transform orientationTransform;
-    GraphicPlane::orientationToTransfrom(orientation, w, h,
-            &orientationTransform);
-    if (orientation & ISurfaceComposer::eOrientationSwapMask) {
-        mWidth = int(h);
-        mHeight = int(w);
-    }
-
-    mOrientation = orientation;
-    mGlobalTransform = mDisplayTransform * orientationTransform;
-    return NO_ERROR;
-}
-
-const DisplayHardware& GraphicPlane::displayHardware() const {
-    return *mHw;
-}
-
-const Transform& GraphicPlane::transform() const {
-    return mGlobalTransform;
-}
-
-EGLDisplay GraphicPlane::getEGLDisplay() const {
-    return mHw->getEGLDisplay();
-}
-
-// ---------------------------------------------------------------------------
-
-}; // namespace android
diff --git a/libs/surfaceflinger/SurfaceFlinger.h b/libs/surfaceflinger/SurfaceFlinger.h
deleted file mode 100644
index d75dc15..0000000
--- a/libs/surfaceflinger/SurfaceFlinger.h
+++ /dev/null
@@ -1,420 +0,0 @@
-/*
- * Copyright (C) 2007 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#ifndef ANDROID_SURFACE_FLINGER_H
-#define ANDROID_SURFACE_FLINGER_H
-
-#include <stdint.h>
-#include <sys/types.h>
-
-#include <utils/SortedVector.h>
-#include <utils/KeyedVector.h>
-#include <utils/threads.h>
-#include <utils/Atomic.h>
-#include <utils/Errors.h>
-#include <utils/RefBase.h>
-
-#include <binder/IMemory.h>
-#include <binder/Permission.h>
-
-#include <ui/PixelFormat.h>
-#include <surfaceflinger/ISurfaceComposer.h>
-#include <surfaceflinger/ISurfaceFlingerClient.h>
-
-#include "Barrier.h"
-#include "Layer.h"
-#include "Tokenizer.h"
-
-#include "MessageQueue.h"
-
-struct copybit_device_t;
-struct overlay_device_t;
-
-namespace android {
-
-// ---------------------------------------------------------------------------
-
-class Client;
-class BClient;
-class DisplayHardware;
-class FreezeLock;
-class Layer;
-class LayerBuffer;
-
-typedef int32_t ClientID;
-
-#define LIKELY( exp )       (__builtin_expect( (exp) != 0, true  ))
-#define UNLIKELY( exp )     (__builtin_expect( (exp) != 0, false ))
-
-// ---------------------------------------------------------------------------
-
-class Client : public RefBase
-{
-public:
-            Client(ClientID cid, const sp<SurfaceFlinger>& flinger);
-            ~Client();
-
-            int32_t                 generateId(int pid);
-            void                    free(int32_t id);
-            status_t                bindLayer(const sp<LayerBaseClient>& layer, int32_t id);
-
-    inline  bool                    isValid(int32_t i) const;
-    sp<LayerBaseClient>             getLayerUser(int32_t i) const;
-    void                            dump(const char* what);
-    
-    const Vector< wp<LayerBaseClient> >& getLayers() const { 
-        return mLayers; 
-    }
-    
-    const sp<IMemoryHeap>& getControlBlockMemory() const {
-        return mCblkHeap; 
-    }
-    
-    // pointer to this client's control block
-    SharedClient*           ctrlblk;
-    ClientID                cid;
-
-    
-private:
-    int getClientPid() const { return mPid; }
-        
-    int                             mPid;
-    uint32_t                        mBitmap;
-    SortedVector<uint8_t>           mInUse;
-    Vector< wp<LayerBaseClient> >   mLayers;
-    sp<IMemoryHeap>                 mCblkHeap;
-    sp<SurfaceFlinger>              mFlinger;
-};
-
-// ---------------------------------------------------------------------------
-
-class GraphicPlane
-{
-public:
-    static status_t orientationToTransfrom(int orientation, int w, int h,
-            Transform* tr);
-
-                                GraphicPlane();
-                                ~GraphicPlane();
-
-        bool                    initialized() const;
-
-        void                    setDisplayHardware(DisplayHardware *);
-        status_t                setOrientation(int orientation);
-        int                     getOrientation() const { return mOrientation; }
-        int                     getWidth() const;
-        int                     getHeight() const;
-
-        const DisplayHardware&  displayHardware() const;
-        const Transform&        transform() const;
-        EGLDisplay              getEGLDisplay() const;
-        
-private:
-                                GraphicPlane(const GraphicPlane&);
-        GraphicPlane            operator = (const GraphicPlane&);
-
-        DisplayHardware*        mHw;
-        Transform               mGlobalTransform;
-        Transform               mDisplayTransform;
-        int                     mOrientation;
-        float                   mDisplayWidth;
-        float                   mDisplayHeight;
-        int                     mWidth;
-        int                     mHeight;
-};
-
-// ---------------------------------------------------------------------------
-
-enum {
-    eTransactionNeeded      = 0x01,
-    eTraversalNeeded        = 0x02
-};
-
-class SurfaceFlinger : public BnSurfaceComposer, protected Thread
-{
-public:
-    static void instantiate();
-    static void shutdown();
-
-                    SurfaceFlinger();
-    virtual         ~SurfaceFlinger();
-            void    init();
-
-    virtual status_t onTransact(
-        uint32_t code, const Parcel& data, Parcel* reply, uint32_t flags);
-
-    virtual status_t dump(int fd, const Vector<String16>& args);
-
-    // ISurfaceComposer interface
-    virtual sp<ISurfaceFlingerClient>   createConnection();
-    virtual sp<IMemoryHeap>             getCblk() const;
-    virtual void                        bootFinished();
-    virtual void                        openGlobalTransaction();
-    virtual void                        closeGlobalTransaction();
-    virtual status_t                    freezeDisplay(DisplayID dpy, uint32_t flags);
-    virtual status_t                    unfreezeDisplay(DisplayID dpy, uint32_t flags);
-    virtual int                         setOrientation(DisplayID dpy, int orientation, uint32_t flags);
-    virtual void                        signal() const;
-
-            void                        screenReleased(DisplayID dpy);
-            void                        screenAcquired(DisplayID dpy);
-
-            overlay_control_device_t* getOverlayEngine() const;
-
-            
-    status_t removeLayer(const sp<LayerBase>& layer);
-    status_t addLayer(const sp<LayerBase>& layer);
-    status_t invalidateLayerVisibility(const sp<LayerBase>& layer);
-    
-private:
-    friend class BClient;
-    friend class LayerBase;
-    friend class LayerBuffer;
-    friend class LayerBaseClient;
-    friend class LayerBaseClient::Surface;
-    friend class Layer;
-    friend class LayerBlur;
-    friend class LayerDim;
-
-    sp<ISurface> createSurface(ClientID client, int pid, const String8& name,
-            ISurfaceFlingerClient::surface_data_t* params,
-            DisplayID display, uint32_t w, uint32_t h, PixelFormat format,
-            uint32_t flags);
-
-    sp<LayerBaseClient> createNormalSurfaceLocked(
-            const sp<Client>& client, DisplayID display,
-            int32_t id, uint32_t w, uint32_t h, uint32_t flags,
-            PixelFormat& format);
-
-    sp<LayerBaseClient> createBlurSurfaceLocked(
-            const sp<Client>& client, DisplayID display,
-            int32_t id, uint32_t w, uint32_t h, uint32_t flags);
-
-    sp<LayerBaseClient> createDimSurfaceLocked(
-            const sp<Client>& client, DisplayID display,
-            int32_t id, uint32_t w, uint32_t h, uint32_t flags);
-
-    sp<LayerBaseClient> createPushBuffersSurfaceLocked(
-            const sp<Client>& client, DisplayID display,
-            int32_t id, uint32_t w, uint32_t h, uint32_t flags);
-
-    status_t removeSurface(SurfaceID surface_id);
-    status_t destroySurface(const sp<LayerBaseClient>& layer);
-    status_t setClientState(ClientID cid, int32_t count, const layer_state_t* states);
-
-
-    class LayerVector {
-    public:
-        inline              LayerVector() { }
-                            LayerVector(const LayerVector&);
-        inline size_t       size() const { return layers.size(); }
-        inline sp<LayerBase> const* array() const { return layers.array(); }
-        ssize_t             add(const sp<LayerBase>&, Vector< sp<LayerBase> >::compar_t);
-        ssize_t             remove(const sp<LayerBase>&);
-        ssize_t             reorder(const sp<LayerBase>&, Vector< sp<LayerBase> >::compar_t);
-        ssize_t             indexOf(const sp<LayerBase>& key, size_t guess=0) const;
-        inline sp<LayerBase> operator [] (size_t i) const { return layers[i]; }
-    private:
-        KeyedVector< sp<LayerBase> , size_t> lookup;
-        Vector< sp<LayerBase> >              layers;
-    };
-
-    struct State {
-        State() {
-            orientation = ISurfaceComposer::eOrientationDefault;
-            freezeDisplay = 0;
-        }
-        LayerVector     layersSortedByZ;
-        uint8_t         orientation;
-        uint8_t         orientationType;
-        uint8_t         freezeDisplay;
-    };
-
-    virtual bool        threadLoop();
-    virtual status_t    readyToRun();
-    virtual void        onFirstRef();
-
-public:     // hack to work around gcc 4.0.3 bug
-    const GraphicPlane&     graphicPlane(int dpy) const;
-          GraphicPlane&     graphicPlane(int dpy);
-private:
-
-            void        waitForEvent();
-public:     // hack to work around gcc 4.0.3 bug
-            void        signalEvent();
-private:
-            void        signalDelayedEvent(nsecs_t delay);
-
-            void        handleConsoleEvents();
-            void        handleTransaction(uint32_t transactionFlags);
-            void        handleTransactionLocked(
-                            uint32_t transactionFlags, 
-                            Vector< sp<LayerBase> >& ditchedLayers);
-
-            void        computeVisibleRegions(
-                            LayerVector& currentLayers,
-                            Region& dirtyRegion,
-                            Region& wormholeRegion);
-
-            void        handlePageFlip();
-            bool        lockPageFlip(const LayerVector& currentLayers);
-            void        unlockPageFlip(const LayerVector& currentLayers);
-            void        handleRepaint();
-            void        postFramebuffer();
-            void        composeSurfaces(const Region& dirty);
-            void        unlockClients();
-
-
-            void        destroyConnection(ClientID cid);
-            sp<LayerBaseClient> getLayerUser_l(SurfaceID index) const;
-            status_t    addLayer_l(const sp<LayerBase>& layer);
-            status_t    removeLayer_l(const sp<LayerBase>& layer);
-            status_t    purgatorizeLayer_l(const sp<LayerBase>& layer);
-            void        free_resources_l();
-
-            uint32_t    getTransactionFlags(uint32_t flags);
-            uint32_t    setTransactionFlags(uint32_t flags, nsecs_t delay = 0);
-            void        commitTransaction();
-
-
-            friend class FreezeLock;
-            sp<FreezeLock> getFreezeLock() const;
-            inline void incFreezeCount() {
-                if (mFreezeCount == 0)
-                    mFreezeDisplayTime = 0;
-                mFreezeCount++;
-            }
-            inline void decFreezeCount() { if (mFreezeCount > 0) mFreezeCount--; }
-            inline bool hasFreezeRequest() const { return mFreezeDisplay; }
-            inline bool isFrozen() const { 
-                return (mFreezeDisplay || mFreezeCount>0) && mBootFinished;
-            }
-
-            
-            void        debugFlashRegions();
-            void        debugShowFPS() const;
-            void        drawWormhole() const;
-           
-
-    mutable     MessageQueue    mEventQueue;
-    
-                
-                
-                // access must be protected by mStateLock
-    mutable     Mutex                   mStateLock;
-                State                   mCurrentState;
-                State                   mDrawingState;
-    volatile    int32_t                 mTransactionFlags;
-    volatile    int32_t                 mTransactionCount;
-                Condition               mTransactionCV;
-                bool                    mResizeTransationPending;
-                
-                // protected by mStateLock (but we could use another lock)
-                Tokenizer                               mTokens;
-                DefaultKeyedVector<ClientID, sp<Client> >   mClientsMap;
-                DefaultKeyedVector<SurfaceID, sp<LayerBaseClient> >   mLayerMap;
-                GraphicPlane                            mGraphicPlanes[1];
-                bool                                    mLayersRemoved;
-                Vector< sp<Client> >                    mDisconnectedClients;
-
-                // constant members (no synchronization needed for access)
-                sp<IMemoryHeap>             mServerHeap;
-                surface_flinger_cblk_t*     mServerCblk;
-                GLuint                      mWormholeTexName;
-                nsecs_t                     mBootTime;
-                Permission                  mHardwareTest;
-                Permission                  mAccessSurfaceFlinger;
-                Permission                  mDump;
-                
-                // Can only accessed from the main thread, these members
-                // don't need synchronization
-                Region                      mDirtyRegion;
-                Region                      mDirtyRegionRemovedLayer;
-                Region                      mInvalidRegion;
-                Region                      mWormholeRegion;
-                bool                        mVisibleRegionsDirty;
-                bool                        mDeferReleaseConsole;
-                bool                        mFreezeDisplay;
-                int32_t                     mFreezeCount;
-                nsecs_t                     mFreezeDisplayTime;
-
-                // don't use a lock for these, we don't care
-                int                         mDebugRegion;
-                int                         mDebugBackground;
-                volatile nsecs_t            mDebugInSwapBuffers;
-                nsecs_t                     mLastSwapBufferTime;
-                volatile nsecs_t            mDebugInTransaction;
-                nsecs_t                     mLastTransactionTime;
-                bool                        mBootFinished;
-
-                // these are thread safe
-    mutable     Barrier                     mReadyToRunBarrier;
-
-                // atomic variables
-                enum {
-                    eConsoleReleased = 1,
-                    eConsoleAcquired = 2
-                };
-   volatile     int32_t                     mConsoleSignals;
-
-   // only written in the main thread, only read in other threads
-   volatile     int32_t                     mSecureFrameBuffer;
-};
-
-// ---------------------------------------------------------------------------
-
-class FreezeLock : public LightRefBase<FreezeLock> {
-    SurfaceFlinger* mFlinger;
-public:
-    FreezeLock(SurfaceFlinger* flinger)
-        : mFlinger(flinger) {
-        mFlinger->incFreezeCount();
-    }
-    ~FreezeLock() {
-        mFlinger->decFreezeCount();
-    }
-};
-
-// ---------------------------------------------------------------------------
-
-class BClient : public BnSurfaceFlingerClient
-{
-public:
-    BClient(SurfaceFlinger *flinger, ClientID cid,
-            const sp<IMemoryHeap>& cblk);
-    ~BClient();
-
-    // ISurfaceFlingerClient interface
-    virtual sp<IMemoryHeap> getControlBlock() const;
-
-    virtual sp<ISurface> createSurface(
-            surface_data_t* params, int pid, const String8& name,
-            DisplayID display, uint32_t w, uint32_t h,PixelFormat format,
-            uint32_t flags);
-
-    virtual status_t destroySurface(SurfaceID surfaceId);
-    virtual status_t setState(int32_t count, const layer_state_t* states);
-
-private:
-    ClientID            mId;
-    SurfaceFlinger*     mFlinger;
-    sp<IMemoryHeap>     mCblk;
-};
-
-// ---------------------------------------------------------------------------
-}; // namespace android
-
-#endif // ANDROID_SURFACE_FLINGER_H
diff --git a/libs/surfaceflinger/Tokenizer.cpp b/libs/surfaceflinger/Tokenizer.cpp
deleted file mode 100644
index be3a239..0000000
--- a/libs/surfaceflinger/Tokenizer.cpp
+++ /dev/null
@@ -1,173 +0,0 @@
-/*
- * Copyright (C) 2007 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#include <stdio.h>
-
-#include "Tokenizer.h"
-
-// ----------------------------------------------------------------------------
-
-namespace android {
-
-ANDROID_BASIC_TYPES_TRAITS(Tokenizer::run_t)
-
-Tokenizer::Tokenizer()
-{
-}
-
-Tokenizer::Tokenizer(const Tokenizer& other)
-    : mRanges(other.mRanges)
-{
-}
-
-Tokenizer::~Tokenizer()
-{
-}
-
-uint32_t Tokenizer::acquire()
-{
-    if (!mRanges.size() || mRanges[0].first) {
-        _insertTokenAt(0,0);
-        return 0;
-    }
-    
-    // just extend the first run
-    const run_t& run = mRanges[0];
-    uint32_t token = run.first + run.length;
-    _insertTokenAt(token, 1);
-    return token;
-}
-
-bool Tokenizer::isAcquired(uint32_t token) const
-{
-    return (_indexOrderOf(token) >= 0);
-}
-
-status_t Tokenizer::reserve(uint32_t token)
-{
-    size_t o;
-    const ssize_t i = _indexOrderOf(token, &o);
-    if (i >= 0) {
-        return BAD_VALUE; // this token is already taken
-    }
-    ssize_t err = _insertTokenAt(token, o);
-    return (err<0) ? err : status_t(NO_ERROR);
-}
-
-status_t Tokenizer::release(uint32_t token)
-{
-    const ssize_t i = _indexOrderOf(token);
-    if (i >= 0) {
-        const run_t& run = mRanges[i];
-        if ((token >= run.first) && (token < run.first+run.length)) {
-            // token in this range, we need to split
-            run_t& run = mRanges.editItemAt(i);
-            if ((token == run.first) || (token == run.first+run.length-1)) {
-                if (token == run.first) {
-                    run.first += 1;
-                }
-                run.length -= 1;
-                if (run.length == 0) {
-                    // XXX: should we systematically remove a run that's empty?
-                    mRanges.removeItemsAt(i);
-                }
-            } else {
-                // split the run
-                run_t new_run;
-                new_run.first = token+1;
-                new_run.length = run.first+run.length - new_run.first;
-                run.length = token - run.first;
-                mRanges.insertAt(new_run, i+1);
-            }
-            return NO_ERROR;
-        }
-    }
-    return NAME_NOT_FOUND;
-}
-
-ssize_t Tokenizer::_indexOrderOf(uint32_t token, size_t* order) const
-{
-    // binary search
-    ssize_t err = NAME_NOT_FOUND;
-    ssize_t l = 0;
-    ssize_t h = mRanges.size()-1;
-    ssize_t mid;
-    const run_t* a = mRanges.array();
-    while (l <= h) {
-        mid = l + (h - l)/2;
-        const run_t* const curr = a + mid;
-        int c = 0;
-        if (token < curr->first)                        c = 1;
-        else if (token >= curr->first+curr->length)     c = -1;
-        if (c == 0) {
-            err = l = mid;
-            break;
-        } else if (c < 0) {
-            l = mid + 1;
-        } else {
-            h = mid - 1;
-        }
-    }
-    if (order) *order = l;
-    return err;
-}
-
-ssize_t Tokenizer::_insertTokenAt(uint32_t token, size_t index)
-{
-    const size_t c = mRanges.size();
-
-    if (index >= 1) {
-        // do we need to merge with the previous run?
-        run_t& p = mRanges.editItemAt(index-1);
-        if (p.first+p.length == token) {
-            p.length += 1;
-            if (index < c) {
-                const run_t& n = mRanges[index];
-                if (token+1 == n.first) {
-                    p.length += n.length;
-                    mRanges.removeItemsAt(index);
-                }
-            }
-            return index;
-        }
-    }
-    
-    if (index < c) {
-        // do we need to merge with the next run?
-        run_t& n = mRanges.editItemAt(index);
-        if (token+1 == n.first) {
-            n.first -= 1;
-            n.length += 1;
-            return index;
-        }
-    }
-
-    return mRanges.insertAt(run_t(token,1), index);
-}
-
-void Tokenizer::dump() const
-{
-    const run_t* ranges = mRanges.array();
-    const size_t c = mRanges.size();
-    printf("Tokenizer (%p, size = %d)\n", this, int(c));
-    for (size_t i=0 ; i<c ; i++) {
-        printf("%u: (%u, %u)\n", i,
-                uint32_t(ranges[i].first), uint32_t(ranges[i].length));
-    }
-}
-
-}; // namespace android
-
diff --git a/libs/surfaceflinger/Tokenizer.h b/libs/surfaceflinger/Tokenizer.h
deleted file mode 100644
index 6b3057d..0000000
--- a/libs/surfaceflinger/Tokenizer.h
+++ /dev/null
@@ -1,57 +0,0 @@
-/*
- * Copyright (C) 2007 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#ifndef ANDROID_TOKENIZER_H
-#define ANDROID_TOKENIZER_H
-
-#include <utils/Vector.h>
-#include <utils/Errors.h>
-
-// ----------------------------------------------------------------------------
-
-namespace android {
-
-class Tokenizer
-{
-public:
-                Tokenizer();
-                Tokenizer(const Tokenizer& other);
-                ~Tokenizer();
-
-    uint32_t    acquire();
-    status_t    reserve(uint32_t token);
-    status_t    release(uint32_t token);
-    bool        isAcquired(uint32_t token) const;
-
-    void dump() const;
-
-    struct run_t {
-        run_t() {};
-        run_t(uint32_t f, uint32_t l) : first(f), length(l) {}
-        uint32_t    first;
-        uint32_t    length;
-    };
-private:
-    ssize_t _indexOrderOf(uint32_t token, size_t* order=0) const;
-    ssize_t _insertTokenAt(uint32_t token, size_t index);
-    Vector<run_t>   mRanges;
-};
-
-}; // namespace android
-
-// ----------------------------------------------------------------------------
-
-#endif // ANDROID_TOKENIZER_H
diff --git a/libs/surfaceflinger/Transform.cpp b/libs/surfaceflinger/Transform.cpp
deleted file mode 100644
index 175f989..0000000
--- a/libs/surfaceflinger/Transform.cpp
+++ /dev/null
@@ -1,392 +0,0 @@
-/*
- * Copyright (C) 2007 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#include <math.h>
-
-#include <cutils/compiler.h>
-#include <utils/String8.h>
-#include <ui/Region.h>
-
-#include "Transform.h"
-
-// ---------------------------------------------------------------------------
-
-namespace android {
-
-// ---------------------------------------------------------------------------
-
-template <typename T> inline T min(T a, T b) {
-    return a<b ? a : b;
-}
-template <typename T> inline T min(T a, T b, T c) {
-    return min(a, min(b, c));
-}
-template <typename T> inline T min(T a, T b, T c, T d) {
-    return min(a, b, min(c, d));
-}
-
-template <typename T> inline T max(T a, T b) {
-    return a>b ? a : b;
-}
-template <typename T> inline T max(T a, T b, T c) {
-    return max(a, max(b, c));
-}
-template <typename T> inline T max(T a, T b, T c, T d) {
-    return max(a, b, max(c, d));
-}
-
-// ---------------------------------------------------------------------------
-
-Transform::Transform() {
-    reset();
-}
-
-Transform::Transform(const Transform&  other)
-    : mMatrix(other.mMatrix), mType(other.mType) {
-}
-
-Transform::Transform(uint32_t orientation) {
-    set(orientation, 0, 0);
-}
-
-Transform::~Transform() {
-}
-
-static const float EPSILON = 0.0f;
-
-bool Transform::isZero(float f) {
-    return fabs(f) <= EPSILON;
-}
-
-bool Transform::absIsOne(float f) {
-    return isZero(fabs(f) - 1.0f);
-}
-
-Transform Transform::operator * (const Transform& rhs) const
-{
-    if (CC_LIKELY(mType == IDENTITY))
-        return rhs;
-
-    Transform r(*this);
-    if (rhs.mType == IDENTITY)
-        return r;
-
-    // TODO: we could use mType to optimize the matrix multiply
-    const mat33& A(mMatrix);
-    const mat33& B(rhs.mMatrix);
-          mat33& D(r.mMatrix);
-    for (int i=0 ; i<3 ; i++) {
-        const float v0 = A[0][i];
-        const float v1 = A[1][i];
-        const float v2 = A[2][i];
-        D[0][i] = v0*B[0][0] + v1*B[0][1] + v2*B[0][2];
-        D[1][i] = v0*B[1][0] + v1*B[1][1] + v2*B[1][2];
-        D[2][i] = v0*B[2][0] + v1*B[2][1] + v2*B[2][2];
-    }
-    r.mType |= rhs.mType;
-
-    // TODO: we could recompute this value from r and rhs
-    r.mType &= 0xFF;
-    r.mType |= UNKNOWN_TYPE;
-    return r;
-}
-
-float const* Transform::operator [] (int i) const {
-    return mMatrix[i].v;
-}
-
-bool Transform::transformed() const {
-    return type() > TRANSLATE;
-}
-
-int Transform::tx() const {
-    return floorf(mMatrix[2][0] + 0.5f);
-}
-
-int Transform::ty() const {
-    return floorf(mMatrix[2][1] + 0.5f);
-}
-
-void Transform::reset() {
-    mType = IDENTITY;
-    for(int i=0 ; i<3 ; i++) {
-        vec3& v(mMatrix[i]);
-        for (int j=0 ; j<3 ; j++)
-            v[j] = ((i==j) ? 1.0f : 0.0f);
-    }
-}
-
-void Transform::set(float tx, float ty)
-{
-    mMatrix[2][0] = tx;
-    mMatrix[2][1] = ty;
-    mMatrix[2][2] = 1.0f;
-
-    if (isZero(tx) && isZero(ty)) {
-        mType &= ~TRANSLATE;
-    } else {
-        mType |= TRANSLATE;
-    }
-}
-
-void Transform::set(float a, float b, float c, float d)
-{
-    mat33& M(mMatrix);
-    M[0][0] = a;    M[1][0] = b;
-    M[0][1] = c;    M[1][1] = d;
-    M[0][2] = 0;    M[1][2] = 0;
-    mType = UNKNOWN_TYPE;
-}
-
-status_t Transform::set(uint32_t flags, float w, float h)
-{
-    if (flags & ROT_INVALID) {
-        // that's not allowed!
-        reset();
-        return BAD_VALUE;
-    }
-
-    mType = flags << 8;
-    float sx = (flags & FLIP_H) ? -1 : 1;
-    float sy = (flags & FLIP_V) ? -1 : 1;
-    float a=0, b=0, c=0, d=0, x=0, y=0;
-    int xmask = 0;
-
-    // computation of x,y
-    // x y
-    // 0 0  0
-    // w 0  ROT90
-    // w h  FLIPH|FLIPV
-    // 0 h  FLIPH|FLIPV|ROT90
-
-    if (flags & ROT_90) {
-        mType |= ROTATE;
-        b = -sy;
-        c = sx;
-        xmask = 1;
-    } else {
-        a = sx;
-        d = sy;
-    }
-
-    if (flags & FLIP_H) {
-        mType ^= SCALE;
-        xmask ^= 1;
-    }
-
-    if (flags & FLIP_V) {
-        mType ^= SCALE;
-        y = h;
-    }
-
-    if ((flags & ROT_180) == ROT_180) {
-        mType |= ROTATE;
-    }
-
-    if (xmask) {
-        x = w;
-    }
-
-    if (!isZero(x) || !isZero(y)) {
-        mType |= TRANSLATE;
-    }
-
-    mat33& M(mMatrix);
-    M[0][0] = a;    M[1][0] = b;    M[2][0] = x;
-    M[0][1] = c;    M[1][1] = d;    M[2][1] = y;
-    M[0][2] = 0;    M[1][2] = 0;    M[2][2] = 1;
-
-    return NO_ERROR;
-}
-
-Transform::vec2 Transform::transform(const vec2& v) const {
-    vec2 r;
-    const mat33& M(mMatrix);
-    r[0] = M[0][0]*v[0] + M[1][0]*v[1] + M[2][0];
-    r[1] = M[0][1]*v[0] + M[1][1]*v[1] + M[2][1];
-    return r;
-}
-
-Transform::vec3 Transform::transform(const vec3& v) const {
-    vec3 r;
-    const mat33& M(mMatrix);
-    r[0] = M[0][0]*v[0] + M[1][0]*v[1] + M[2][0]*v[2];
-    r[1] = M[0][1]*v[0] + M[1][1]*v[1] + M[2][1]*v[2];
-    r[2] = M[0][2]*v[0] + M[1][2]*v[1] + M[2][2]*v[2];
-    return r;
-}
-
-void Transform::transform(fixed1616* point, int x, int y) const
-{
-    const float toFixed = 65536.0f;
-    const mat33& M(mMatrix);
-    vec2 v(x, y);
-    v = transform(v);
-    point[0] = v[0] * toFixed;
-    point[1] = v[1] * toFixed;
-}
-
-Rect Transform::makeBounds(int w, int h) const
-{
-    return transform( Rect(w, h) );
-}
-
-Rect Transform::transform(const Rect& bounds) const
-{
-    Rect r;
-    vec2 lt( bounds.left,  bounds.top    );
-    vec2 rt( bounds.right, bounds.top    );
-    vec2 lb( bounds.left,  bounds.bottom );
-    vec2 rb( bounds.right, bounds.bottom );
-
-    lt = transform(lt);
-    rt = transform(rt);
-    lb = transform(lb);
-    rb = transform(rb);
-
-    r.left   = floorf(min(lt[0], rt[0], lb[0], rb[0]) + 0.5f);
-    r.top    = floorf(min(lt[1], rt[1], lb[1], rb[1]) + 0.5f);
-    r.right  = floorf(max(lt[0], rt[0], lb[0], rb[0]) + 0.5f);
-    r.bottom = floorf(max(lt[1], rt[1], lb[1], rb[1]) + 0.5f);
-
-    return r;
-}
-
-Region Transform::transform(const Region& reg) const
-{
-    Region out;
-    if (CC_UNLIKELY(transformed())) {
-        if (CC_LIKELY(preserveRects())) {
-            Region::const_iterator it = reg.begin();
-            Region::const_iterator const end = reg.end();
-            while (it != end) {
-                out.orSelf(transform(*it++));
-            }
-        } else {
-            out.set(transform(reg.bounds()));
-        }
-    } else {
-        out = reg.translate(tx(), ty());
-    }
-    return out;
-}
-
-uint32_t Transform::type() const
-{
-    if (mType & UNKNOWN_TYPE) {
-        // recompute what this transform is
-
-        const mat33& M(mMatrix);
-        const float a = M[0][0];
-        const float b = M[1][0];
-        const float c = M[0][1];
-        const float d = M[1][1];
-        const float x = M[2][0];
-        const float y = M[2][1];
-
-        bool scale = false;
-        uint32_t flags = ROT_0;
-        if (isZero(b) && isZero(c)) {
-            if (a<0)    flags |= FLIP_H;
-            if (d<0)    flags |= FLIP_V;
-            if (!absIsOne(a) || !absIsOne(d)) {
-                scale = true;
-            }
-        } else if (isZero(a) && isZero(d)) {
-            flags |= ROT_90;
-            if (b>0)    flags |= FLIP_H;
-            if (c<0)    flags |= FLIP_V;
-            if (!absIsOne(b) || !absIsOne(c)) {
-                scale = true;
-            }
-        } else {
-            flags = ROT_INVALID;
-        }
-
-        mType = flags << 8;
-        if (flags & ROT_INVALID) {
-            mType |= UNKNOWN;
-        } else {
-            if ((flags & ROT_90) || ((flags & ROT_180) == ROT_180))
-                mType |= ROTATE;
-            if (flags & FLIP_H)
-                mType ^= SCALE;
-            if (flags & FLIP_V)
-                mType ^= SCALE;
-            if (scale)
-                mType |= SCALE;
-        }
-
-        if (!isZero(x) || !isZero(y))
-            mType |= TRANSLATE;
-    }
-    return mType;
-}
-
-uint32_t Transform::getType() const {
-    return type() & 0xFF;
-}
-
-uint32_t Transform::getOrientation() const
-{
-    return (type() >> 8) & 0xFF;
-}
-
-bool Transform::preserveRects() const
-{
-    return (type() & ROT_INVALID) ? false : true;
-}
-
-void Transform::dump(const char* name) const
-{
-    type(); // updates the type
-
-    String8 flags, type;
-    const mat33& m(mMatrix);
-    uint32_t orient = mType >> 8;
-
-    if (orient&ROT_INVALID) {
-        flags.append("ROT_INVALID ");
-    } else {
-        if (orient&ROT_90) {
-            flags.append("ROT_90 ");
-        } else {
-            flags.append("ROT_0 ");
-        }
-        if (orient&FLIP_V)
-            flags.append("FLIP_V ");
-        if (orient&FLIP_H)
-            flags.append("FLIP_H ");
-    }
-
-    if (!(mType&(SCALE|ROTATE|TRANSLATE)))
-        type.append("IDENTITY ");
-    if (mType&SCALE)
-        type.append("SCALE ");
-    if (mType&ROTATE)
-        type.append("ROTATE ");
-    if (mType&TRANSLATE)
-        type.append("TRANSLATE ");
-
-    LOGD("%s 0x%08x (%s, %s)", name, mType, flags.string(), type.string());
-    LOGD("%.4f  %.4f  %.4f", m[0][0], m[1][0], m[2][0]);
-    LOGD("%.4f  %.4f  %.4f", m[0][1], m[1][1], m[2][1]);
-    LOGD("%.4f  %.4f  %.4f", m[0][2], m[1][2], m[2][2]);
-}
-
-// ---------------------------------------------------------------------------
-
-}; // namespace android
diff --git a/libs/surfaceflinger/Transform.h b/libs/surfaceflinger/Transform.h
deleted file mode 100644
index 2e5b893..0000000
--- a/libs/surfaceflinger/Transform.h
+++ /dev/null
@@ -1,128 +0,0 @@
-/*
- * Copyright (C) 2007 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#ifndef ANDROID_TRANSFORM_H
-#define ANDROID_TRANSFORM_H
-
-#include <stdint.h>
-#include <sys/types.h>
-
-#include <ui/Point.h>
-#include <ui/Rect.h>
-
-namespace android {
-
-class Region;
-
-// ---------------------------------------------------------------------------
-
-class Transform
-{
-public:
-                    Transform();
-                    Transform(const Transform&  other);
-           explicit Transform(uint32_t orientation);
-                    ~Transform();
-
-            typedef int32_t fixed1616;
-
-            // FIXME: must match OVERLAY_TRANSFORM_*, pull from hardware.h
-            enum orientation_flags {
-                ROT_0   = 0x00000000,
-                FLIP_H  = 0x00000001,
-                FLIP_V  = 0x00000002,
-                ROT_90  = 0x00000004,
-                ROT_180 = FLIP_H|FLIP_V,
-                ROT_270 = ROT_180|ROT_90,
-                ROT_INVALID = 0x80
-            };
-
-            enum type_mask {
-                IDENTITY            = 0,
-                TRANSLATE           = 0x1,
-                ROTATE              = 0x2,
-                SCALE               = 0x4,
-                UNKNOWN             = 0x8
-            };
-
-            // query the transform
-            bool        transformed() const;
-            bool        preserveRects() const;
-            uint32_t    getType() const;
-            uint32_t    getOrientation() const;
-
-            float const* operator [] (int i) const;  // returns column i
-            int     tx() const;
-            int     ty() const;
-
-            // modify the transform
-            void        reset();
-            void        set(float tx, float ty);
-            void        set(float a, float b, float c, float d);
-            status_t    set(uint32_t flags, float w, float h);
-
-            // transform data
-            Rect    makeBounds(int w, int h) const;
-            void    transform(fixed1616* point, int x, int y) const;
-            Region  transform(const Region& reg) const;
-            Transform operator * (const Transform& rhs) const;
-
-            // for debugging
-            void dump(const char* name) const;
-
-private:
-    struct vec3 {
-        float v[3];
-        inline vec3() { }
-        inline vec3(float a, float b, float c) {
-            v[0] = a; v[1] = b; v[2] = c;
-        }
-        inline float operator [] (int i) const { return v[i]; }
-        inline float& operator [] (int i) { return v[i]; }
-    };
-    struct vec2 {
-        float v[2];
-        inline vec2() { }
-        inline vec2(float a, float b) {
-            v[0] = a; v[1] = b;
-        }
-        inline float operator [] (int i) const { return v[i]; }
-        inline float& operator [] (int i) { return v[i]; }
-    };
-    struct mat33 {
-        vec3 v[3];
-        inline const vec3& operator [] (int i) const { return v[i]; }
-        inline vec3& operator [] (int i) { return v[i]; }
-    };
-
-    enum { UNKNOWN_TYPE = 0x80000000 };
-
-    // assumes the last row is < 0 , 0 , 1 >
-    vec2 transform(const vec2& v) const;
-    vec3 transform(const vec3& v) const;
-    Rect transform(const Rect& bounds) const;
-    uint32_t type() const;
-    static bool absIsOne(float f);
-    static bool isZero(float f);
-
-    mat33               mMatrix;
-    mutable uint32_t    mType;
-};
-
-// ---------------------------------------------------------------------------
-}; // namespace android
-
-#endif /* ANDROID_TRANSFORM_H */
diff --git a/libs/surfaceflinger_client/Android.mk b/libs/surfaceflinger_client/Android.mk
index fe85b34..ce3c71a 100644
--- a/libs/surfaceflinger_client/Android.mk
+++ b/libs/surfaceflinger_client/Android.mk
@@ -4,7 +4,7 @@
 LOCAL_SRC_FILES:= \
 	ISurfaceComposer.cpp \
 	ISurface.cpp \
-	ISurfaceFlingerClient.cpp \
+	ISurfaceComposerClient.cpp \
 	LayerState.cpp \
 	SharedBufferStack.cpp \
 	Surface.cpp \
diff --git a/libs/surfaceflinger_client/ISurface.cpp b/libs/surfaceflinger_client/ISurface.cpp
index bb86199..7049d9e 100644
--- a/libs/surfaceflinger_client/ISurface.cpp
+++ b/libs/surfaceflinger_client/ISurface.cpp
@@ -71,11 +71,15 @@
     {
     }
 
-    virtual sp<GraphicBuffer> requestBuffer(int bufferIdx, int usage)
+    virtual sp<GraphicBuffer> requestBuffer(int bufferIdx,
+            uint32_t w, uint32_t h, uint32_t format, uint32_t usage)
     {
         Parcel data, reply;
         data.writeInterfaceToken(ISurface::getInterfaceDescriptor());
         data.writeInt32(bufferIdx);
+        data.writeInt32(w);
+        data.writeInt32(h);
+        data.writeInt32(format);
         data.writeInt32(usage);
         remote()->transact(REQUEST_BUFFER, data, &reply);
         sp<GraphicBuffer> buffer = new GraphicBuffer();
@@ -83,6 +87,16 @@
         return buffer;
     }
 
+    virtual status_t setBufferCount(int bufferCount)
+    {
+        Parcel data, reply;
+        data.writeInterfaceToken(ISurface::getInterfaceDescriptor());
+        data.writeInt32(bufferCount);
+        remote()->transact(SET_BUFFER_COUNT, data, &reply);
+        status_t err = reply.readInt32();
+        return err;
+    }
+
     virtual status_t registerBuffers(const BufferHeap& buffers)
     {
         Parcel data, reply;
@@ -140,12 +154,22 @@
         case REQUEST_BUFFER: {
             CHECK_INTERFACE(ISurface, data, reply);
             int bufferIdx = data.readInt32();
-            int usage = data.readInt32();
-            sp<GraphicBuffer> buffer(requestBuffer(bufferIdx, usage));
+            uint32_t w = data.readInt32();
+            uint32_t h = data.readInt32();
+            uint32_t format = data.readInt32();
+            uint32_t usage = data.readInt32();
+            sp<GraphicBuffer> buffer(requestBuffer(bufferIdx, w, h, format, usage));
             if (buffer == NULL)
                 return BAD_VALUE;
             return reply->write(*buffer);
         }
+        case SET_BUFFER_COUNT: {
+            CHECK_INTERFACE(ISurface, data, reply);
+            int bufferCount = data.readInt32();
+            status_t err = setBufferCount(bufferCount);
+            reply->writeInt32(err);
+            return NO_ERROR;
+        }
         case REGISTER_BUFFERS: {
             CHECK_INTERFACE(ISurface, data, reply);
             BufferHeap buffer;
diff --git a/libs/surfaceflinger_client/ISurfaceComposer.cpp b/libs/surfaceflinger_client/ISurfaceComposer.cpp
index b6f4e24..5c111f6 100644
--- a/libs/surfaceflinger_client/ISurfaceComposer.cpp
+++ b/libs/surfaceflinger_client/ISurfaceComposer.cpp
@@ -46,13 +46,22 @@
     {
     }
 
-    virtual sp<ISurfaceFlingerClient> createConnection()
+    virtual sp<ISurfaceComposerClient> createConnection()
     {
         uint32_t n;
         Parcel data, reply;
         data.writeInterfaceToken(ISurfaceComposer::getInterfaceDescriptor());
         remote()->transact(BnSurfaceComposer::CREATE_CONNECTION, data, &reply);
-        return interface_cast<ISurfaceFlingerClient>(reply.readStrongBinder());
+        return interface_cast<ISurfaceComposerClient>(reply.readStrongBinder());
+    }
+
+    virtual sp<ISurfaceComposerClient> createClientConnection()
+    {
+        uint32_t n;
+        Parcel data, reply;
+        data.writeInterfaceToken(ISurfaceComposer::getInterfaceDescriptor());
+        remote()->transact(BnSurfaceComposer::CREATE_CLIENT_CONNECTION, data, &reply);
+        return interface_cast<ISurfaceComposerClient>(reply.readStrongBinder());
     }
 
     virtual sp<IMemoryHeap> getCblk() const
@@ -136,6 +145,11 @@
             sp<IBinder> b = createConnection()->asBinder();
             reply->writeStrongBinder(b);
         } break;
+        case CREATE_CLIENT_CONNECTION: {
+            CHECK_INTERFACE(ISurfaceComposer, data, reply);
+            sp<IBinder> b = createClientConnection()->asBinder();
+            reply->writeStrongBinder(b);
+        } break;
         case OPEN_GLOBAL_TRANSACTION: {
             CHECK_INTERFACE(ISurfaceComposer, data, reply);
             openGlobalTransaction();
diff --git a/libs/surfaceflinger_client/ISurfaceComposerClient.cpp b/libs/surfaceflinger_client/ISurfaceComposerClient.cpp
new file mode 100644
index 0000000..2cc1f8e
--- /dev/null
+++ b/libs/surfaceflinger_client/ISurfaceComposerClient.cpp
@@ -0,0 +1,231 @@
+/*
+ * Copyright (C) 2007 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+// tag as surfaceflinger
+#define LOG_TAG "SurfaceFlinger"
+
+#include <stdio.h>
+#include <stdint.h>
+#include <sys/types.h>
+
+#include <binder/Parcel.h>
+#include <binder/IMemory.h>
+#include <binder/IPCThreadState.h>
+#include <binder/IServiceManager.h>
+
+#include <ui/Point.h>
+#include <ui/Rect.h>
+
+#include <surfaceflinger/ISurface.h>
+#include <surfaceflinger/ISurfaceComposerClient.h>
+#include <private/surfaceflinger/LayerState.h>
+
+// ---------------------------------------------------------------------------
+
+/* ideally AID_GRAPHICS would be in a semi-public header
+ * or there would be a way to map a user/group name to its id
+ */
+#ifndef AID_GRAPHICS
+#define AID_GRAPHICS 1003
+#endif
+
+#define LIKELY( exp )       (__builtin_expect( (exp) != 0, true  ))
+#define UNLIKELY( exp )     (__builtin_expect( (exp) != 0, false ))
+
+// ---------------------------------------------------------------------------
+
+namespace android {
+
+enum {
+    GET_CBLK = IBinder::FIRST_CALL_TRANSACTION,
+    GET_TOKEN,
+    CREATE_SURFACE,
+    DESTROY_SURFACE,
+    SET_STATE
+};
+
+class BpSurfaceComposerClient : public BpInterface<ISurfaceComposerClient>
+{
+public:
+    BpSurfaceComposerClient(const sp<IBinder>& impl)
+        : BpInterface<ISurfaceComposerClient>(impl)
+    {
+    }
+
+    virtual sp<IMemoryHeap> getControlBlock() const
+    {
+        Parcel data, reply;
+        data.writeInterfaceToken(ISurfaceComposerClient::getInterfaceDescriptor());
+        remote()->transact(GET_CBLK, data, &reply);
+        return interface_cast<IMemoryHeap>(reply.readStrongBinder());
+    }
+
+    virtual ssize_t getTokenForSurface(const sp<ISurface>& sur) const
+    {
+        Parcel data, reply;
+        data.writeInterfaceToken(ISurfaceComposerClient::getInterfaceDescriptor());
+        data.writeStrongBinder(sur->asBinder());
+        remote()->transact(GET_TOKEN, data, &reply);
+        return reply.readInt32();
+    }
+
+    virtual sp<ISurface> createSurface( surface_data_t* params,
+                                        int pid,
+                                        const String8& name,
+                                        DisplayID display,
+                                        uint32_t w,
+                                        uint32_t h,
+                                        PixelFormat format,
+                                        uint32_t flags)
+    {
+        Parcel data, reply;
+        data.writeInterfaceToken(ISurfaceComposerClient::getInterfaceDescriptor());
+        data.writeInt32(pid);
+        data.writeString8(name);
+        data.writeInt32(display);
+        data.writeInt32(w);
+        data.writeInt32(h);
+        data.writeInt32(format);
+        data.writeInt32(flags);
+        remote()->transact(CREATE_SURFACE, data, &reply);
+        params->readFromParcel(reply);
+        return interface_cast<ISurface>(reply.readStrongBinder());
+    }
+
+    virtual status_t destroySurface(SurfaceID sid)
+    {
+        Parcel data, reply;
+        data.writeInterfaceToken(ISurfaceComposerClient::getInterfaceDescriptor());
+        data.writeInt32(sid);
+        remote()->transact(DESTROY_SURFACE, data, &reply);
+        return reply.readInt32();
+    }
+
+    virtual status_t setState(int32_t count, const layer_state_t* states)
+    {
+        Parcel data, reply;
+        data.writeInterfaceToken(ISurfaceComposerClient::getInterfaceDescriptor());
+        data.writeInt32(count);
+        for (int i=0 ; i<count ; i++)
+            states[i].write(data);
+        remote()->transact(SET_STATE, data, &reply);
+        return reply.readInt32();
+    }
+};
+
+IMPLEMENT_META_INTERFACE(SurfaceComposerClient, "android.ui.ISurfaceComposerClient");
+
+// ----------------------------------------------------------------------
+
+status_t BnSurfaceComposerClient::onTransact(
+    uint32_t code, const Parcel& data, Parcel* reply, uint32_t flags)
+{
+    // codes that don't require permission check
+
+    switch(code) {
+        case GET_CBLK: {
+            CHECK_INTERFACE(ISurfaceComposerClient, data, reply);
+            sp<IMemoryHeap> ctl(getControlBlock());
+            reply->writeStrongBinder(ctl->asBinder());
+            return NO_ERROR;
+        } break;
+        case GET_TOKEN: {
+            CHECK_INTERFACE(ISurfaceComposerClient, data, reply);
+            sp<ISurface> sur = interface_cast<ISurface>(data.readStrongBinder());
+            ssize_t token = getTokenForSurface(sur);
+            reply->writeInt32(token);
+            return NO_ERROR;
+        } break;
+    }
+
+    // these must be checked
+
+     IPCThreadState* ipc = IPCThreadState::self();
+     const int pid = ipc->getCallingPid();
+     const int uid = ipc->getCallingUid();
+     const int self_pid = getpid();
+     if (UNLIKELY(pid != self_pid && uid != AID_GRAPHICS)) {
+         // we're called from a different process, do the real check
+         if (!checkCallingPermission(
+                 String16("android.permission.ACCESS_SURFACE_FLINGER")))
+         {
+             LOGE("Permission Denial: "
+                     "can't openGlobalTransaction pid=%d, uid=%d", pid, uid);
+             return PERMISSION_DENIED;
+         }
+     }
+
+     switch(code) {
+        case CREATE_SURFACE: {
+            CHECK_INTERFACE(ISurfaceComposerClient, data, reply);
+            surface_data_t params;
+            int32_t pid = data.readInt32();
+            String8 name = data.readString8();
+            DisplayID display = data.readInt32();
+            uint32_t w = data.readInt32();
+            uint32_t h = data.readInt32();
+            PixelFormat format = data.readInt32();
+            uint32_t flags = data.readInt32();
+            sp<ISurface> s = createSurface(&params, pid, name, display, w, h,
+                    format, flags);
+            params.writeToParcel(reply);
+            reply->writeStrongBinder(s->asBinder());
+            return NO_ERROR;
+        } break;
+        case DESTROY_SURFACE: {
+            CHECK_INTERFACE(ISurfaceComposerClient, data, reply);
+            reply->writeInt32( destroySurface( data.readInt32() ) );
+            return NO_ERROR;
+        } break;
+        case SET_STATE: {
+            CHECK_INTERFACE(ISurfaceComposerClient, data, reply);
+            int32_t count = data.readInt32();
+            layer_state_t* states = new layer_state_t[count];
+            for (int i=0 ; i<count ; i++)
+                states[i].read(data);
+            status_t err = setState(count, states);
+            delete [] states;
+            reply->writeInt32(err);
+            return NO_ERROR;
+        } break;
+        default:
+            return BBinder::onTransact(code, data, reply, flags);
+    }
+}
+
+// ----------------------------------------------------------------------
+
+status_t ISurfaceComposerClient::surface_data_t::readFromParcel(const Parcel& parcel)
+{
+    token    = parcel.readInt32();
+    identity = parcel.readInt32();
+    width    = parcel.readInt32();
+    height   = parcel.readInt32();
+    format   = parcel.readInt32();
+    return NO_ERROR;
+}
+
+status_t ISurfaceComposerClient::surface_data_t::writeToParcel(Parcel* parcel) const
+{
+    parcel->writeInt32(token);
+    parcel->writeInt32(identity);
+    parcel->writeInt32(width);
+    parcel->writeInt32(height);
+    parcel->writeInt32(format);
+    return NO_ERROR;
+}
+
+}; // namespace android
diff --git a/libs/surfaceflinger_client/ISurfaceFlingerClient.cpp b/libs/surfaceflinger_client/ISurfaceFlingerClient.cpp
deleted file mode 100644
index def96d7..0000000
--- a/libs/surfaceflinger_client/ISurfaceFlingerClient.cpp
+++ /dev/null
@@ -1,214 +0,0 @@
-/*
- * Copyright (C) 2007 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-// tag as surfaceflinger
-#define LOG_TAG "SurfaceFlinger"
-
-#include <stdio.h>
-#include <stdint.h>
-#include <sys/types.h>
-
-#include <binder/Parcel.h>
-#include <binder/IMemory.h>
-#include <binder/IPCThreadState.h>
-#include <binder/IServiceManager.h>
-
-#include <ui/Point.h>
-#include <ui/Rect.h>
-
-#include <surfaceflinger/ISurface.h>
-#include <surfaceflinger/ISurfaceFlingerClient.h>
-#include <private/surfaceflinger/LayerState.h>
-
-// ---------------------------------------------------------------------------
-
-/* ideally AID_GRAPHICS would be in a semi-public header
- * or there would be a way to map a user/group name to its id
- */
-#ifndef AID_GRAPHICS
-#define AID_GRAPHICS 1003
-#endif
-
-#define LIKELY( exp )       (__builtin_expect( (exp) != 0, true  ))
-#define UNLIKELY( exp )     (__builtin_expect( (exp) != 0, false ))
-
-// ---------------------------------------------------------------------------
-
-namespace android {
-
-enum {
-    GET_CBLK = IBinder::FIRST_CALL_TRANSACTION,
-    CREATE_SURFACE,
-    DESTROY_SURFACE,
-    SET_STATE
-};
-
-class BpSurfaceFlingerClient : public BpInterface<ISurfaceFlingerClient>
-{
-public:
-    BpSurfaceFlingerClient(const sp<IBinder>& impl)
-        : BpInterface<ISurfaceFlingerClient>(impl)
-    {
-    }
-
-    virtual sp<IMemoryHeap> getControlBlock() const
-    {
-        Parcel data, reply;
-        data.writeInterfaceToken(ISurfaceFlingerClient::getInterfaceDescriptor());
-        remote()->transact(GET_CBLK, data, &reply);
-        return interface_cast<IMemoryHeap>(reply.readStrongBinder());
-    }
-
-    virtual sp<ISurface> createSurface( surface_data_t* params,
-                                        int pid,
-                                        const String8& name,
-                                        DisplayID display,
-                                        uint32_t w,
-                                        uint32_t h,
-                                        PixelFormat format,
-                                        uint32_t flags)
-    {
-        Parcel data, reply;
-        data.writeInterfaceToken(ISurfaceFlingerClient::getInterfaceDescriptor());
-        data.writeInt32(pid);
-        data.writeString8(name);
-        data.writeInt32(display);
-        data.writeInt32(w);
-        data.writeInt32(h);
-        data.writeInt32(format);
-        data.writeInt32(flags);
-        remote()->transact(CREATE_SURFACE, data, &reply);
-        params->readFromParcel(reply);
-        return interface_cast<ISurface>(reply.readStrongBinder());
-    }
-                                    
-    virtual status_t destroySurface(SurfaceID sid)
-    {
-        Parcel data, reply;
-        data.writeInterfaceToken(ISurfaceFlingerClient::getInterfaceDescriptor());
-        data.writeInt32(sid);
-        remote()->transact(DESTROY_SURFACE, data, &reply);
-        return reply.readInt32();
-    }
-
-    virtual status_t setState(int32_t count, const layer_state_t* states)
-    {
-        Parcel data, reply;
-        data.writeInterfaceToken(ISurfaceFlingerClient::getInterfaceDescriptor());
-        data.writeInt32(count);
-        for (int i=0 ; i<count ; i++)
-            states[i].write(data);
-        remote()->transact(SET_STATE, data, &reply);
-        return reply.readInt32();
-    }
-};
-
-IMPLEMENT_META_INTERFACE(SurfaceFlingerClient, "android.ui.ISurfaceFlingerClient");
-
-// ----------------------------------------------------------------------
-
-status_t BnSurfaceFlingerClient::onTransact(
-    uint32_t code, const Parcel& data, Parcel* reply, uint32_t flags)
-{
-    // codes that don't require permission check
-
-    switch(code) {
-        case GET_CBLK: {
-            CHECK_INTERFACE(ISurfaceFlingerClient, data, reply);
-            sp<IMemoryHeap> ctl(getControlBlock());
-            reply->writeStrongBinder(ctl->asBinder());
-            return NO_ERROR;
-        } break;
-    }
-
-    // these must be checked
-     
-     IPCThreadState* ipc = IPCThreadState::self();
-     const int pid = ipc->getCallingPid();
-     const int uid = ipc->getCallingUid();
-     const int self_pid = getpid();
-     if (UNLIKELY(pid != self_pid && uid != AID_GRAPHICS)) {
-         // we're called from a different process, do the real check
-         if (!checkCallingPermission(
-                 String16("android.permission.ACCESS_SURFACE_FLINGER")))
-         {
-             LOGE("Permission Denial: "
-                     "can't openGlobalTransaction pid=%d, uid=%d", pid, uid);
-             return PERMISSION_DENIED;
-         }
-     }
-   
-     switch(code) {
-        case CREATE_SURFACE: {
-            CHECK_INTERFACE(ISurfaceFlingerClient, data, reply);
-            surface_data_t params;
-            int32_t pid = data.readInt32();
-            String8 name = data.readString8();
-            DisplayID display = data.readInt32();
-            uint32_t w = data.readInt32();
-            uint32_t h = data.readInt32();
-            PixelFormat format = data.readInt32();
-            uint32_t flags = data.readInt32();
-            sp<ISurface> s = createSurface(&params, pid, name, display, w, h,
-                    format, flags);
-            params.writeToParcel(reply);
-            reply->writeStrongBinder(s->asBinder());
-            return NO_ERROR;
-        } break;
-        case DESTROY_SURFACE: {
-            CHECK_INTERFACE(ISurfaceFlingerClient, data, reply);
-            reply->writeInt32( destroySurface( data.readInt32() ) );
-            return NO_ERROR;
-        } break;
-        case SET_STATE: {
-            CHECK_INTERFACE(ISurfaceFlingerClient, data, reply);
-            int32_t count = data.readInt32();
-            layer_state_t* states = new layer_state_t[count];
-            for (int i=0 ; i<count ; i++)
-                states[i].read(data);
-            status_t err = setState(count, states);
-            delete [] states;
-            reply->writeInt32(err);
-            return NO_ERROR;
-        } break;
-        default:
-            return BBinder::onTransact(code, data, reply, flags);
-    }
-}
-
-// ----------------------------------------------------------------------
-
-status_t ISurfaceFlingerClient::surface_data_t::readFromParcel(const Parcel& parcel)
-{
-    token    = parcel.readInt32();
-    identity = parcel.readInt32();
-    width    = parcel.readInt32();
-    height   = parcel.readInt32();
-    format   = parcel.readInt32();
-    return NO_ERROR;
-}
-
-status_t ISurfaceFlingerClient::surface_data_t::writeToParcel(Parcel* parcel) const
-{
-    parcel->writeInt32(token);
-    parcel->writeInt32(identity);
-    parcel->writeInt32(width);
-    parcel->writeInt32(height);
-    parcel->writeInt32(format);
-    return NO_ERROR;
-}
-
-}; // namespace android
diff --git a/libs/surfaceflinger_client/SharedBufferStack.cpp b/libs/surfaceflinger_client/SharedBufferStack.cpp
index a17e8ac..d67a589 100644
--- a/libs/surfaceflinger_client/SharedBufferStack.cpp
+++ b/libs/surfaceflinger_client/SharedBufferStack.cpp
@@ -44,15 +44,11 @@
 
 // these functions are used by the clients
 status_t SharedClient::validate(size_t i) const {
-    if (uint32_t(i) >= uint32_t(NUM_LAYERS_MAX))
+    if (uint32_t(i) >= uint32_t(SharedBufferStack::NUM_LAYERS_MAX))
         return BAD_INDEX;
     return surfaces[i].status;
 }
 
-uint32_t SharedClient::getIdentity(size_t token) const {
-    return uint32_t(surfaces[token].identity);
-}
-
 // ----------------------------------------------------------------------------
 
 
@@ -62,24 +58,52 @@
 
 void SharedBufferStack::init(int32_t i)
 {
-    inUse = -1;
+    inUse = -2;
     status = NO_ERROR;
     identity = i;
 }
 
+status_t SharedBufferStack::setCrop(int buffer, const Rect& crop)
+{
+    if (uint32_t(buffer) >= NUM_BUFFER_MAX)
+        return BAD_INDEX;
+
+    buffers[buffer].crop.l = uint16_t(crop.left);
+    buffers[buffer].crop.t = uint16_t(crop.top);
+    buffers[buffer].crop.r = uint16_t(crop.right);
+    buffers[buffer].crop.b = uint16_t(crop.bottom);
+    return NO_ERROR;
+}
+
 status_t SharedBufferStack::setDirtyRegion(int buffer, const Region& dirty)
 {
     if (uint32_t(buffer) >= NUM_BUFFER_MAX)
         return BAD_INDEX;
 
-    // in the current implementation we only send a single rectangle
-    const Rect bounds(dirty.getBounds());
-    FlatRegion& reg(dirtyRegion[buffer]);
-    reg.count = 1;
-    reg.rects[0] = uint16_t(bounds.left);
-    reg.rects[1] = uint16_t(bounds.top);
-    reg.rects[2] = uint16_t(bounds.right);
-    reg.rects[3] = uint16_t(bounds.bottom);
+    FlatRegion& reg(buffers[buffer].dirtyRegion);
+    if (dirty.isEmpty()) {
+        reg.count = 0;
+        return NO_ERROR;
+    }
+
+    size_t count;
+    Rect const* r = dirty.getArray(&count);
+    if (count > FlatRegion::NUM_RECT_MAX) {
+        const Rect bounds(dirty.getBounds());
+        reg.count = 1;
+        reg.rects[0].l = uint16_t(bounds.left);
+        reg.rects[0].t = uint16_t(bounds.top);
+        reg.rects[0].r = uint16_t(bounds.right);
+        reg.rects[0].b = uint16_t(bounds.bottom);
+    } else {
+        reg.count = count;
+        for (size_t i=0 ; i<count ; i++) {
+            reg.rects[i].l = uint16_t(r[i].left);
+            reg.rects[i].t = uint16_t(r[i].top);
+            reg.rects[i].r = uint16_t(r[i].right);
+            reg.rects[i].b = uint16_t(r[i].bottom);
+        }
+    }
     return NO_ERROR;
 }
 
@@ -89,18 +113,37 @@
     if (uint32_t(buffer) >= NUM_BUFFER_MAX)
         return res;
 
-    const FlatRegion& reg(dirtyRegion[buffer]);
-    res.set(Rect(reg.rects[0], reg.rects[1], reg.rects[2], reg.rects[3]));
+    const FlatRegion& reg(buffers[buffer].dirtyRegion);
+    if (reg.count > FlatRegion::NUM_RECT_MAX)
+        return res;
+
+    if (reg.count == 1) {
+        const Rect r(
+                reg.rects[0].l,
+                reg.rects[0].t,
+                reg.rects[0].r,
+                reg.rects[0].b);
+        res.set(r);
+    } else {
+        for (size_t i=0 ; i<reg.count ; i++) {
+            const Rect r(
+                    reg.rects[i].l,
+                    reg.rects[i].t,
+                    reg.rects[i].r,
+                    reg.rects[i].b);
+            res.orSelf(r);
+        }
+    }
     return res;
 }
 
 // ----------------------------------------------------------------------------
 
 SharedBufferBase::SharedBufferBase(SharedClient* sharedClient,
-        int surface, int num, int32_t identity)
+        int surface, int32_t identity)
     : mSharedClient(sharedClient), 
       mSharedStack(sharedClient->surfaces + surface),
-      mNumBuffers(num), mIdentity(identity)
+      mIdentity(identity)
 {
 }
 
@@ -108,18 +151,18 @@
 {
 }
 
-uint32_t SharedBufferBase::getIdentity()
-{
-    SharedBufferStack& stack( *mSharedStack );
-    return stack.identity;
-}
-
 status_t SharedBufferBase::getStatus() const
 {
     SharedBufferStack& stack( *mSharedStack );
     return stack.status;
 }
 
+int32_t SharedBufferBase::getIdentity() const
+{
+    SharedBufferStack& stack( *mSharedStack );
+    return stack.identity;
+}
+
 size_t SharedBufferBase::getFrontBuffer() const
 {
     SharedBufferStack& stack( *mSharedStack );
@@ -132,16 +175,52 @@
     char buffer[SIZE];
     String8 result;
     SharedBufferStack& stack( *mSharedStack );
-    int tail = (mNumBuffers + stack.head - stack.available + 1) % mNumBuffers;
     snprintf(buffer, SIZE, 
-            "%s[ head=%2d, available=%2d, queued=%2d, tail=%2d ] "
-            "reallocMask=%08x, inUse=%2d, identity=%d, status=%d\n",
-            prefix, stack.head, stack.available, stack.queued, tail,
+            "%s[ head=%2d, available=%2d, queued=%2d ] "
+            "reallocMask=%08x, inUse=%2d, identity=%d, status=%d",
+            prefix, stack.head, stack.available, stack.queued,
             stack.reallocMask, stack.inUse, stack.identity, stack.status);
     result.append(buffer);
+    result.append("\n");
     return result;
 }
 
+status_t SharedBufferBase::waitForCondition(const ConditionBase& condition)
+{
+    const SharedBufferStack& stack( *mSharedStack );
+    SharedClient& client( *mSharedClient );
+    const nsecs_t TIMEOUT = s2ns(1);
+    const int identity = mIdentity;
+
+    Mutex::Autolock _l(client.lock);
+    while ((condition()==false) &&
+            (stack.identity == identity) &&
+            (stack.status == NO_ERROR))
+    {
+        status_t err = client.cv.waitRelative(client.lock, TIMEOUT);
+        // handle errors and timeouts
+        if (CC_UNLIKELY(err != NO_ERROR)) {
+            if (err == TIMED_OUT) {
+                if (condition()) {
+                    LOGE("waitForCondition(%s) timed out (identity=%d), "
+                        "but condition is true! We recovered but it "
+                        "shouldn't happen." , condition.name(), stack.identity);
+                    break;
+                } else {
+                    LOGW("waitForCondition(%s) timed out "
+                        "(identity=%d, status=%d). "
+                        "CPU may be pegged. trying again.", condition.name(),
+                        stack.identity, stack.status);
+                }
+            } else {
+                LOGE("waitForCondition(%s) error (%s) ",
+                        condition.name(), strerror(-err));
+                return err;
+            }
+        }
+    }
+    return (stack.identity != mIdentity) ? status_t(BAD_INDEX) : stack.status;
+}
 // ============================================================================
 // conditions and updates
 // ============================================================================
@@ -149,24 +228,34 @@
 SharedBufferClient::DequeueCondition::DequeueCondition(
         SharedBufferClient* sbc) : ConditionBase(sbc)  { 
 }
-bool SharedBufferClient::DequeueCondition::operator()() {
+bool SharedBufferClient::DequeueCondition::operator()() const {
     return stack.available > 0;
 }
 
 SharedBufferClient::LockCondition::LockCondition(
         SharedBufferClient* sbc, int buf) : ConditionBase(sbc), buf(buf) { 
 }
-bool SharedBufferClient::LockCondition::operator()() {
-    return (buf != stack.head || 
+bool SharedBufferClient::LockCondition::operator()() const {
+    // NOTE: if stack.head is messed up, we could crash the client
+    // or cause some drawing artifacts. This is okay, as long as it is
+    // limited to the client.
+    return (buf != stack.index[stack.head] ||
             (stack.queued > 0 && stack.inUse != buf));
 }
 
 SharedBufferServer::ReallocateCondition::ReallocateCondition(
         SharedBufferBase* sbb, int buf) : ConditionBase(sbb), buf(buf) { 
 }
-bool SharedBufferServer::ReallocateCondition::operator()() {
+bool SharedBufferServer::ReallocateCondition::operator()() const {
+    int32_t head = stack.head;
+    if (uint32_t(head) >= SharedBufferStack::NUM_BUFFER_MAX) {
+        // if stack.head is messed up, we cannot allow the server to
+        // crash (since stack.head is mapped on the client side)
+        stack.status = BAD_VALUE;
+        return false;
+    }
     // TODO: we should also check that buf has been dequeued
-    return (buf != stack.head);
+    return (buf != stack.index[head]);
 }
 
 // ----------------------------------------------------------------------------
@@ -193,8 +282,10 @@
 }
 ssize_t SharedBufferServer::UnlockUpdate::operator()() {
     if (stack.inUse != lockedBuffer) {
-        LOGE("unlocking %d, but currently locked buffer is %d",
-                lockedBuffer, stack.inUse);
+        LOGE("unlocking %d, but currently locked buffer is %d "
+             "(identity=%d, token=%d)",
+                lockedBuffer, stack.inUse,
+                stack.identity, stack.token);
         return BAD_VALUE;
     }
     android_atomic_write(-1, &stack.inUse);
@@ -206,11 +297,12 @@
     : UpdateBase(sbb), numBuffers(numBuffers) {
 }
 ssize_t SharedBufferServer::RetireUpdate::operator()() {
-    // head is only written in this function, which is single-thread.
     int32_t head = stack.head;
+    if (uint32_t(head) >= SharedBufferStack::NUM_BUFFER_MAX)
+        return BAD_VALUE;
 
     // Preventively lock the current buffer before updating queued.
-    android_atomic_write(head, &stack.inUse);
+    android_atomic_write(stack.index[head], &stack.inUse);
 
     // Decrement the number of queued buffers 
     int32_t queued;
@@ -221,16 +313,15 @@
         }
     } while (android_atomic_cmpxchg(queued, queued-1, &stack.queued));
     
-    // update the head pointer
-    head = ((head+1 >= numBuffers) ? 0 : head+1);
-
     // lock the buffer before advancing head, which automatically unlocks
     // the buffer we preventively locked upon entering this function
-    android_atomic_write(head, &stack.inUse);
 
-    // advance head
+    head = (head + 1) % numBuffers;
+    android_atomic_write(stack.index[head], &stack.inUse);
+
+    // head is only modified here, so we don't need to use cmpxchg
     android_atomic_write(head, &stack.head);
-    
+
     // now that head has moved, we can increment the number of available buffers
     android_atomic_inc(&stack.available);
     return head;
@@ -250,41 +341,31 @@
 
 SharedBufferClient::SharedBufferClient(SharedClient* sharedClient,
         int surface, int num, int32_t identity)
-    : SharedBufferBase(sharedClient, surface, num, identity), tail(0)
+    : SharedBufferBase(sharedClient, surface, identity),
+      mNumBuffers(num), tail(0), undoDequeueTail(0)
 {
+    SharedBufferStack& stack( *mSharedStack );
     tail = computeTail();
+    queued_head = stack.head;
 }
 
 int32_t SharedBufferClient::computeTail() const
 {
     SharedBufferStack& stack( *mSharedStack );
-    // we need to make sure we read available and head coherently,
-    // w.r.t RetireUpdate.
-    int32_t newTail;
-    int32_t avail;
-    int32_t head;
-    do {
-        avail = stack.available;
-        head = stack.head;
-    } while (stack.available != avail);
-    newTail = head - avail + 1;
-    if (newTail < 0) {
-        newTail += mNumBuffers;
-    } else if (newTail >= mNumBuffers) {
-        newTail -= mNumBuffers;
-    }
-    return newTail;
+    return (mNumBuffers + stack.head - stack.available + 1) % mNumBuffers;
 }
 
 ssize_t SharedBufferClient::dequeue()
 {
     SharedBufferStack& stack( *mSharedStack );
 
-    if (stack.head == tail && stack.available == 2) {
+    if (stack.head == tail && stack.available == mNumBuffers) {
         LOGW("dequeue: tail=%d, head=%d, avail=%d, queued=%d",
                 tail, stack.head, stack.available, stack.queued);
     }
-        
+
+    RWLock::AutoRLock _rd(mLock);
+
     const nsecs_t dequeueTime = systemTime(SYSTEM_TIME_THREAD);
 
     //LOGD("[%d] about to dequeue a buffer",
@@ -301,9 +382,10 @@
         LOGW("dequeue probably called from multiple threads!");
     }
 
-    int dequeued = tail;
+    undoDequeueTail = tail;
+    int dequeued = stack.index[tail];
     tail = ((tail+1 >= mNumBuffers) ? 0 : tail+1);
-    LOGD_IF(DEBUG_ATOMICS, "dequeued=%d, tail=%d, %s",
+    LOGD_IF(DEBUG_ATOMICS, "dequeued=%d, tail++=%d, %s",
             dequeued, tail, dump("").string());
 
     mDequeueTime[dequeued] = dequeueTime; 
@@ -313,16 +395,23 @@
 
 status_t SharedBufferClient::undoDequeue(int buf)
 {
+    RWLock::AutoRLock _rd(mLock);
+
+    // TODO: we can only undo the previous dequeue, we should
+    // enforce that in the api
     UndoDequeueUpdate update(this);
     status_t err = updateCondition( update );
     if (err == NO_ERROR) {
-        tail = computeTail();
+        tail = undoDequeueTail;
     }
     return err;
 }
 
 status_t SharedBufferClient::lock(int buf)
 {
+    RWLock::AutoRLock _rd(mLock);
+
+    SharedBufferStack& stack( *mSharedStack );
     LockCondition condition(this, buf);
     status_t err = waitForCondition(condition);
     return err;
@@ -330,53 +419,105 @@
 
 status_t SharedBufferClient::queue(int buf)
 {
+    RWLock::AutoRLock _rd(mLock);
+
+    SharedBufferStack& stack( *mSharedStack );
+
+    queued_head = (queued_head + 1) % mNumBuffers;
+    stack.index[queued_head] = buf;
+
     QueueUpdate update(this);
     status_t err = updateCondition( update );
     LOGD_IF(DEBUG_ATOMICS, "queued=%d, %s", buf, dump("").string());
-    SharedBufferStack& stack( *mSharedStack );
+
     const nsecs_t now = systemTime(SYSTEM_TIME_THREAD);
     stack.stats.totalTime = ns2us(now - mDequeueTime[buf]);
     return err;
 }
 
-bool SharedBufferClient::needNewBuffer(int buffer) const
+bool SharedBufferClient::needNewBuffer(int buf) const
 {
     SharedBufferStack& stack( *mSharedStack );
-    const uint32_t mask = 1<<buffer;
+    const uint32_t mask = 1<<(31-buf);
     return (android_atomic_and(~mask, &stack.reallocMask) & mask) != 0;
 }
 
-status_t SharedBufferClient::setDirtyRegion(int buffer, const Region& reg)
+status_t SharedBufferClient::setCrop(int buf, const Rect& crop)
 {
     SharedBufferStack& stack( *mSharedStack );
-    return stack.setDirtyRegion(buffer, reg);
+    return stack.setCrop(buf, crop);
+}
+
+status_t SharedBufferClient::setDirtyRegion(int buf, const Region& reg)
+{
+    SharedBufferStack& stack( *mSharedStack );
+    return stack.setDirtyRegion(buf, reg);
+}
+
+status_t SharedBufferClient::setBufferCount(
+        int bufferCount, const SetBufferCountCallback& ipc)
+{
+    SharedBufferStack& stack( *mSharedStack );
+    if (uint32_t(bufferCount) >= SharedBufferStack::NUM_BUFFER_MAX)
+        return BAD_VALUE;
+
+    if (uint32_t(bufferCount) < SharedBufferStack::NUM_BUFFER_MIN)
+        return BAD_VALUE;
+
+    RWLock::AutoWLock _wr(mLock);
+
+    status_t err = ipc(bufferCount);
+    if (err == NO_ERROR) {
+        mNumBuffers = bufferCount;
+        queued_head = (stack.head + stack.queued) % mNumBuffers;
+    }
+    return err;
 }
 
 // ----------------------------------------------------------------------------
 
 SharedBufferServer::SharedBufferServer(SharedClient* sharedClient,
         int surface, int num, int32_t identity)
-    : SharedBufferBase(sharedClient, surface, num, identity)
+    : SharedBufferBase(sharedClient, surface, identity),
+      mNumBuffers(num)
 {
     mSharedStack->init(identity);
+    mSharedStack->token = surface;
     mSharedStack->head = num-1;
     mSharedStack->available = num;
     mSharedStack->queued = 0;
     mSharedStack->reallocMask = 0;
-    memset(mSharedStack->dirtyRegion, 0, sizeof(mSharedStack->dirtyRegion));
+    memset(mSharedStack->buffers, 0, sizeof(mSharedStack->buffers));
+    for (int i=0 ; i<num ; i++) {
+        mBufferList.add(i);
+        mSharedStack->index[i] = i;
+    }
+}
+
+SharedBufferServer::~SharedBufferServer()
+{
 }
 
 ssize_t SharedBufferServer::retireAndLock()
 {
+    RWLock::AutoRLock _l(mLock);
+
     RetireUpdate update(this, mNumBuffers);
     ssize_t buf = updateCondition( update );
-    LOGD_IF(DEBUG_ATOMICS && buf>=0, "retire=%d, %s", int(buf), dump("").string());
+    if (buf >= 0) {
+        if (uint32_t(buf) >= SharedBufferStack::NUM_BUFFER_MAX)
+            return BAD_VALUE;
+        SharedBufferStack& stack( *mSharedStack );
+        buf = stack.index[buf];
+        LOGD_IF(DEBUG_ATOMICS && buf>=0, "retire=%d, %s",
+                int(buf), dump("").string());
+    }
     return buf;
 }
 
-status_t SharedBufferServer::unlock(int buffer)
+status_t SharedBufferServer::unlock(int buf)
 {
-    UnlockUpdate update(this, buffer);
+    UnlockUpdate update(this, buf);
     status_t err = updateCondition( update );
     return err;
 }
@@ -389,11 +530,25 @@
     }
 }
 
-status_t SharedBufferServer::reallocate()
+status_t SharedBufferServer::reallocateAll()
 {
+    RWLock::AutoRLock _l(mLock);
+
     SharedBufferStack& stack( *mSharedStack );
-    uint32_t mask = (1<<mNumBuffers)-1;
-    android_atomic_or(mask, &stack.reallocMask); 
+    uint32_t mask = mBufferList.getMask();
+    android_atomic_or(mask, &stack.reallocMask);
+    return NO_ERROR;
+}
+
+status_t SharedBufferServer::reallocateAllExcept(int buffer)
+{
+    RWLock::AutoRLock _l(mLock);
+
+    SharedBufferStack& stack( *mSharedStack );
+    BufferList temp(mBufferList);
+    temp.remove(buffer);
+    uint32_t mask = temp.getMask();
+    android_atomic_or(mask, &stack.reallocMask);
     return NO_ERROR;
 }
 
@@ -403,17 +558,77 @@
     return stack.queued;
 }
 
-status_t SharedBufferServer::assertReallocate(int buffer)
+status_t SharedBufferServer::assertReallocate(int buf)
 {
-    ReallocateCondition condition(this, buffer);
+    /*
+     * NOTE: it's safe to hold mLock for read while waiting for
+     * the ReallocateCondition because that condition is not updated
+     * by the thread that holds mLock for write.
+     */
+    RWLock::AutoRLock _l(mLock);
+
+    // TODO: need to validate "buf"
+    ReallocateCondition condition(this, buf);
     status_t err = waitForCondition(condition);
     return err;
 }
 
-Region SharedBufferServer::getDirtyRegion(int buffer) const
+Region SharedBufferServer::getDirtyRegion(int buf) const
 {
     SharedBufferStack& stack( *mSharedStack );
-    return stack.getDirtyRegion(buffer);
+    return stack.getDirtyRegion(buf);
+}
+
+/*
+ * NOTE: this is not thread-safe on the server-side, meaning
+ * 'head' cannot move during this operation. The client-side
+ * can safely operate an usual.
+ *
+ */
+status_t SharedBufferServer::resize(int newNumBuffers)
+{
+    if (uint32_t(newNumBuffers) >= SharedBufferStack::NUM_BUFFER_MAX)
+        return BAD_VALUE;
+
+    RWLock::AutoWLock _l(mLock);
+
+    // for now we're not supporting shrinking
+    const int numBuffers = mNumBuffers;
+    if (newNumBuffers < numBuffers)
+        return BAD_VALUE;
+
+    SharedBufferStack& stack( *mSharedStack );
+    const int extra = newNumBuffers - numBuffers;
+
+    // read the head, make sure it's valid
+    int32_t head = stack.head;
+    if (uint32_t(head) >= SharedBufferStack::NUM_BUFFER_MAX)
+        return BAD_VALUE;
+
+    int base = numBuffers;
+    int32_t avail = stack.available;
+    int tail = head - avail + 1;
+
+    if (tail >= 0) {
+        int8_t* const index = const_cast<int8_t*>(stack.index);
+        const int nb = numBuffers - head;
+        memmove(&index[head + extra], &index[head], nb);
+        base = head;
+        // move head 'extra' ahead, this doesn't impact stack.index[head];
+        stack.head = head + extra;
+    }
+    stack.available += extra;
+
+    // fill the new free space with unused buffers
+    BufferList::const_iterator curr(mBufferList.free_begin());
+    for (int i=0 ; i<extra ; i++) {
+        stack.index[base+i] = *curr;
+        mBufferList.add(*curr);
+        ++curr;
+    }
+
+    mNumBuffers = newNumBuffers;
+    return NO_ERROR;
 }
 
 SharedBufferStack::Statistics SharedBufferServer::getStats() const
@@ -422,6 +637,29 @@
     return stack.stats;
 }
 
+// ---------------------------------------------------------------------------
+status_t SharedBufferServer::BufferList::add(int value)
+{
+    if (uint32_t(value) >= mCapacity)
+        return BAD_VALUE;
+    uint32_t mask = 1<<(31-value);
+    if (mList & mask)
+        return ALREADY_EXISTS;
+    mList |= mask;
+    return NO_ERROR;
+}
+
+status_t SharedBufferServer::BufferList::remove(int value)
+{
+    if (uint32_t(value) >= mCapacity)
+        return BAD_VALUE;
+    uint32_t mask = 1<<(31-value);
+    if (!(mList & mask))
+        return NAME_NOT_FOUND;
+    mList &= ~mask;
+    return NO_ERROR;
+}
+
 
 // ---------------------------------------------------------------------------
 }; // namespace android
diff --git a/libs/surfaceflinger_client/Surface.cpp b/libs/surfaceflinger_client/Surface.cpp
index 5dd75c3..1de3a4f 100644
--- a/libs/surfaceflinger_client/Surface.cpp
+++ b/libs/surfaceflinger_client/Surface.cpp
@@ -17,8 +17,6 @@
 #define LOG_TAG "Surface"
 
 #include <stdint.h>
-#include <unistd.h>
-#include <fcntl.h>
 #include <errno.h>
 #include <sys/types.h>
 #include <sys/stat.h>
@@ -28,8 +26,6 @@
 #include <utils/CallStack.h>
 #include <utils/Log.h>
 
-#include <pixelflinger/pixelflinger.h>
-
 #include <binder/IPCThreadState.h>
 #include <binder/IMemory.h>
 
@@ -55,6 +51,8 @@
         const sp<GraphicBuffer>& src, 
         const Region& reg)
 {
+    // src and dst with, height and format must be identical. no verification
+    // is done here.
     status_t err;
     uint8_t const * src_bits = NULL;
     err = src->lock(GRALLOC_USAGE_SW_READ_OFTEN, reg.bounds(), (void**)&src_bits);
@@ -67,7 +65,6 @@
     Region::const_iterator head(reg.begin());
     Region::const_iterator tail(reg.end());
     if (head != tail && src_bits && dst_bits) {
-        // NOTE: dst and src must be the same format
         const size_t bpp = bytesPerPixel(src->format);
         const size_t dbpr = dst->stride * bpp;
         const size_t sbpr = src->stride * bpp;
@@ -107,7 +104,7 @@
 SurfaceControl::SurfaceControl(
         const sp<SurfaceComposerClient>& client, 
         const sp<ISurface>& surface,
-        const ISurfaceFlingerClient::surface_data_t& data,
+        const ISurfaceComposerClient::surface_data_t& data,
         uint32_t w, uint32_t h, PixelFormat format, uint32_t flags)
     : mClient(client), mSurface(surface),
       mToken(data.token), mIdentity(data.identity),
@@ -154,75 +151,75 @@
 }
 
 status_t SurfaceControl::setLayer(int32_t layer) {
-    const sp<SurfaceComposerClient>& client(mClient);
     status_t err = validate();
     if (err < 0) return err;
+    const sp<SurfaceComposerClient>& client(mClient);
     return client->setLayer(mToken, layer);
 }
 status_t SurfaceControl::setPosition(int32_t x, int32_t y) {
-    const sp<SurfaceComposerClient>& client(mClient);
     status_t err = validate();
     if (err < 0) return err;
+    const sp<SurfaceComposerClient>& client(mClient);
     return client->setPosition(mToken, x, y);
 }
 status_t SurfaceControl::setSize(uint32_t w, uint32_t h) {
-    const sp<SurfaceComposerClient>& client(mClient);
     status_t err = validate();
     if (err < 0) return err;
+    const sp<SurfaceComposerClient>& client(mClient);
     return client->setSize(mToken, w, h);
 }
 status_t SurfaceControl::hide() {
-    const sp<SurfaceComposerClient>& client(mClient);
     status_t err = validate();
     if (err < 0) return err;
+    const sp<SurfaceComposerClient>& client(mClient);
     return client->hide(mToken);
 }
 status_t SurfaceControl::show(int32_t layer) {
-    const sp<SurfaceComposerClient>& client(mClient);
     status_t err = validate();
     if (err < 0) return err;
+    const sp<SurfaceComposerClient>& client(mClient);
     return client->show(mToken, layer);
 }
 status_t SurfaceControl::freeze() {
-    const sp<SurfaceComposerClient>& client(mClient);
     status_t err = validate();
     if (err < 0) return err;
+    const sp<SurfaceComposerClient>& client(mClient);
     return client->freeze(mToken);
 }
 status_t SurfaceControl::unfreeze() {
-    const sp<SurfaceComposerClient>& client(mClient);
     status_t err = validate();
     if (err < 0) return err;
+    const sp<SurfaceComposerClient>& client(mClient);
     return client->unfreeze(mToken);
 }
 status_t SurfaceControl::setFlags(uint32_t flags, uint32_t mask) {
-    const sp<SurfaceComposerClient>& client(mClient);
     status_t err = validate();
     if (err < 0) return err;
+    const sp<SurfaceComposerClient>& client(mClient);
     return client->setFlags(mToken, flags, mask);
 }
 status_t SurfaceControl::setTransparentRegionHint(const Region& transparent) {
-    const sp<SurfaceComposerClient>& client(mClient);
     status_t err = validate();
     if (err < 0) return err;
+    const sp<SurfaceComposerClient>& client(mClient);
     return client->setTransparentRegionHint(mToken, transparent);
 }
 status_t SurfaceControl::setAlpha(float alpha) {
-    const sp<SurfaceComposerClient>& client(mClient);
     status_t err = validate();
     if (err < 0) return err;
+    const sp<SurfaceComposerClient>& client(mClient);
     return client->setAlpha(mToken, alpha);
 }
 status_t SurfaceControl::setMatrix(float dsdx, float dtdx, float dsdy, float dtdy) {
-    const sp<SurfaceComposerClient>& client(mClient);
     status_t err = validate();
     if (err < 0) return err;
+    const sp<SurfaceComposerClient>& client(mClient);
     return client->setMatrix(mToken, dsdx, dtdx, dsdy, dtdy);
 }
 status_t SurfaceControl::setFreezeTint(uint32_t tint) {
-    const sp<SurfaceComposerClient>& client(mClient);
     status_t err = validate();
     if (err < 0) return err;
+    const sp<SurfaceComposerClient>& client(mClient);
     return client->setFreezeTint(mToken, tint);
 }
 
@@ -233,50 +230,27 @@
                 mToken, mIdentity, mClient.get());
         return NO_INIT;
     }
-    SharedClient const* cblk = mClient->mControl;
-    if (cblk == 0) {
-        LOGE("cblk is null (surface id=%d, identity=%u)", mToken, mIdentity);
-        return NO_INIT;
-    }
-    status_t err = cblk->validate(mToken);
-    if (err != NO_ERROR) {
-        LOGE("surface (id=%d, identity=%u) is invalid, err=%d (%s)",
-                mToken, mIdentity, err, strerror(-err));
-        return err;
-    }
-    uint32_t identity = cblk->getIdentity(mToken);
-    if (mIdentity != identity) {
-        LOGE("using an invalid surface id=%d, identity=%u should be %d",
-                mToken, mIdentity, identity);
-        return NO_INIT;
-    }
     return NO_ERROR;
 }
 
 status_t SurfaceControl::writeSurfaceToParcel(
         const sp<SurfaceControl>& control, Parcel* parcel)
 {
-    uint32_t flags = 0;
-    uint32_t format = 0;
-    SurfaceID token = -1;
+    sp<ISurface> sur;
     uint32_t identity = 0;
     uint32_t width = 0;
     uint32_t height = 0;
-    sp<SurfaceComposerClient> client;
-    sp<ISurface> sur;
+    uint32_t format = 0;
+    uint32_t flags = 0;
     if (SurfaceControl::isValid(control)) {
-        token    = control->mToken;
-        identity = control->mIdentity;
-        client   = control->mClient;
         sur      = control->mSurface;
+        identity = control->mIdentity;
         width    = control->mWidth;
         height   = control->mHeight;
         format   = control->mFormat;
         flags    = control->mFlags;
     }
-    parcel->writeStrongBinder(client!=0  ? client->connection() : NULL);
-    parcel->writeStrongBinder(sur!=0     ? sur->asBinder()      : NULL);
-    parcel->writeInt32(token);
+    parcel->writeStrongBinder(sur!=0 ? sur->asBinder() : NULL);
     parcel->writeInt32(identity);
     parcel->writeInt32(width);
     parcel->writeInt32(height);
@@ -298,70 +272,180 @@
 //  Surface
 // ============================================================================
 
+class SurfaceClient : public Singleton<SurfaceClient>
+{
+    // all these attributes are constants
+    sp<ISurfaceComposer> mComposerService;
+    sp<ISurfaceComposerClient> mClient;
+    status_t mStatus;
+    SharedClient* mControl;
+    sp<IMemoryHeap> mControlMemory;
+
+    SurfaceClient()
+        : Singleton<SurfaceClient>(), mStatus(NO_INIT)
+    {
+        sp<ISurfaceComposer> sf(ComposerService::getComposerService());
+        mComposerService = sf;
+        mClient = sf->createClientConnection();
+        if (mClient != NULL) {
+            mControlMemory = mClient->getControlBlock();
+            if (mControlMemory != NULL) {
+                mControl = static_cast<SharedClient *>(
+                        mControlMemory->getBase());
+                if (mControl) {
+                    mStatus = NO_ERROR;
+                }
+            }
+        }
+    }
+    friend class Singleton<SurfaceClient>;
+public:
+    status_t initCheck() const {
+        return mStatus;
+    }
+    SharedClient* getSharedClient() const {
+        return mControl;
+    }
+    ssize_t getTokenForSurface(const sp<ISurface>& sur) const {
+        // TODO: we could cache a few tokens here to avoid an IPC
+        return mClient->getTokenForSurface(sur);
+    }
+    void signalServer() const {
+        mComposerService->signal();
+    }
+};
+
+ANDROID_SINGLETON_STATIC_INSTANCE(SurfaceClient);
+
+// ---------------------------------------------------------------------------
+
 Surface::Surface(const sp<SurfaceControl>& surface)
-    : mClient(surface->mClient), mSurface(surface->mSurface),
-      mToken(surface->mToken), mIdentity(surface->mIdentity),
+    : mBufferMapper(GraphicBufferMapper::get()),
+      mClient(SurfaceClient::getInstance()),
+      mSharedBufferClient(NULL),
+      mInitCheck(NO_INIT),
+      mSurface(surface->mSurface),
+      mIdentity(surface->mIdentity),
       mFormat(surface->mFormat), mFlags(surface->mFlags),
-      mBufferMapper(GraphicBufferMapper::get()), mSharedBufferClient(NULL),
       mWidth(surface->mWidth), mHeight(surface->mHeight)
 {
-    mSharedBufferClient = new SharedBufferClient(
-            mClient->mControl, mToken, 2, mIdentity);
-
     init();
 }
 
-Surface::Surface(const Parcel& parcel)
-    :  mBufferMapper(GraphicBufferMapper::get()), mSharedBufferClient(NULL)
+Surface::Surface(const Parcel& parcel, const sp<IBinder>& ref)
+    : mBufferMapper(GraphicBufferMapper::get()),
+      mClient(SurfaceClient::getInstance()),
+      mSharedBufferClient(NULL),
+      mInitCheck(NO_INIT)
 {
-    sp<IBinder> clientBinder = parcel.readStrongBinder();
-    mSurface    = interface_cast<ISurface>(parcel.readStrongBinder());
-    mToken      = parcel.readInt32();
+    mSurface    = interface_cast<ISurface>(ref);
     mIdentity   = parcel.readInt32();
     mWidth      = parcel.readInt32();
     mHeight     = parcel.readInt32();
     mFormat     = parcel.readInt32();
     mFlags      = parcel.readInt32();
-
-    // FIXME: what does that mean if clientBinder is NULL here?
-    if (clientBinder != NULL) {
-        mClient = SurfaceComposerClient::clientForConnection(clientBinder);
-
-        mSharedBufferClient = new SharedBufferClient(
-                mClient->mControl, mToken, 2, mIdentity);
-    }
-
     init();
 }
 
+status_t Surface::writeToParcel(
+        const sp<Surface>& surface, Parcel* parcel)
+{
+    sp<ISurface> sur;
+    uint32_t identity = 0;
+    uint32_t width = 0;
+    uint32_t height = 0;
+    uint32_t format = 0;
+    uint32_t flags = 0;
+    if (Surface::isValid(surface)) {
+        sur      = surface->mSurface;
+        identity = surface->mIdentity;
+        width    = surface->mWidth;
+        height   = surface->mHeight;
+        format   = surface->mFormat;
+        flags    = surface->mFlags;
+    }
+    parcel->writeStrongBinder(sur!=0 ? sur->asBinder() : NULL);
+    parcel->writeInt32(identity);
+    parcel->writeInt32(width);
+    parcel->writeInt32(height);
+    parcel->writeInt32(format);
+    parcel->writeInt32(flags);
+    return NO_ERROR;
+
+}
+
+
+Mutex Surface::sCachedSurfacesLock;
+DefaultKeyedVector<wp<IBinder>, wp<Surface> > Surface::sCachedSurfaces(wp<Surface>(0));
+
+sp<Surface> Surface::readFromParcel(const Parcel& data) {
+    Mutex::Autolock _l(sCachedSurfacesLock);
+    sp<IBinder> binder(data.readStrongBinder());
+    sp<Surface> surface = sCachedSurfaces.valueFor(binder).promote();
+    if (surface == 0) {
+       surface = new Surface(data, binder);
+       sCachedSurfaces.add(binder, surface);
+    } else {
+        LOGW("Reusing surface!");
+    }
+    if (surface->mSurface == 0) {
+      surface = 0;
+    }
+    cleanCachedSurfaces();
+    return surface;
+}
+
+// Remove the stale entries from the surface cache.  This should only be called
+// with sCachedSurfacesLock held.
+void Surface::cleanCachedSurfaces() {
+    for (int i = sCachedSurfaces.size()-1; i >= 0; --i) {
+        wp<Surface> s(sCachedSurfaces.valueAt(i));
+        if (s == 0 || s.promote() == 0) {
+            sCachedSurfaces.removeItemsAt(i);
+        }
+    }
+}
+
 void Surface::init()
 {
-    android_native_window_t::setSwapInterval  = setSwapInterval;
-    android_native_window_t::dequeueBuffer    = dequeueBuffer;
-    android_native_window_t::lockBuffer       = lockBuffer;
-    android_native_window_t::queueBuffer      = queueBuffer;
-    android_native_window_t::query            = query;
-    android_native_window_t::perform          = perform;
-    mSwapRectangle.makeInvalid();
+    ANativeWindow::setSwapInterval  = setSwapInterval;
+    ANativeWindow::dequeueBuffer    = dequeueBuffer;
+    ANativeWindow::lockBuffer       = lockBuffer;
+    ANativeWindow::queueBuffer      = queueBuffer;
+    ANativeWindow::query            = query;
+    ANativeWindow::perform          = perform;
+
     DisplayInfo dinfo;
     SurfaceComposerClient::getDisplayInfo(0, &dinfo);
-    const_cast<float&>(android_native_window_t::xdpi) = dinfo.xdpi;
-    const_cast<float&>(android_native_window_t::ydpi) = dinfo.ydpi;
+    const_cast<float&>(ANativeWindow::xdpi) = dinfo.xdpi;
+    const_cast<float&>(ANativeWindow::ydpi) = dinfo.ydpi;
     // FIXME: set real values here
-    const_cast<int&>(android_native_window_t::minSwapInterval) = 1;
-    const_cast<int&>(android_native_window_t::maxSwapInterval) = 1;
-    const_cast<uint32_t&>(android_native_window_t::flags) = 0;
-    // be default we request a hardware surface
-    mUsage = GRALLOC_USAGE_HW_RENDER;
+    const_cast<int&>(ANativeWindow::minSwapInterval) = 1;
+    const_cast<int&>(ANativeWindow::maxSwapInterval) = 1;
+    const_cast<uint32_t&>(ANativeWindow::flags) = 0;
+
     mConnected = 0;
-    mNeedFullUpdate = false;
+    mSwapRectangle.makeInvalid();
+    // two buffers by default
+    mBuffers.setCapacity(2);
+    mBuffers.insertAt(0, 2);
+
+    if (mSurface != 0 && mClient.initCheck() == NO_ERROR) {
+        int32_t token = mClient.getTokenForSurface(mSurface);
+        if (token >= 0) {
+            mSharedBufferClient = new SharedBufferClient(
+                    mClient.getSharedClient(), token, 2, mIdentity);
+            mInitCheck = mClient.getSharedClient()->validate(token);
+        }
+    }
 }
 
 Surface::~Surface()
 {
     // this is a client-side operation, the surface is destroyed, unmap
     // its buffers in this process.
-    for (int i=0 ; i<2 ; i++) {
+    size_t size = mBuffers.size();
+    for (size_t i=0 ; i<size ; i++) {
         if (mBuffers[i] != 0 && mBuffers[i]->handle != 0) {
             getBufferMapper().unregisterBuffer(mBuffers[i]->handle);
         }
@@ -369,93 +453,88 @@
 
     // clear all references and trigger an IPC now, to make sure things
     // happen without delay, since these resources are quite heavy.
-    mClient.clear();
+    mBuffers.clear();
     mSurface.clear();
     delete mSharedBufferClient;
     IPCThreadState::self()->flushCommands();
 }
 
-sp<SurfaceComposerClient> Surface::getClient() const {
-    return mClient;
+bool Surface::isValid() {
+    return mInitCheck == NO_ERROR;
+}
+
+status_t Surface::validate() const
+{
+    // check that we initialized ourself properly
+    if (mInitCheck != NO_ERROR) {
+        LOGE("invalid token (identity=%u)", mIdentity);
+        return mInitCheck;
+    }
+
+    // verify the identity of this surface
+    uint32_t identity = mSharedBufferClient->getIdentity();
+
+    // this is a bit of a (temporary) special case, identity==0 means that
+    // no operation are allowed from the client (eg: dequeue/queue), this
+    // is used with PUSH_BUFFER surfaces for instance
+    if (identity == 0) {
+        LOGE("[Surface] invalid operation (identity=%u)", mIdentity);
+        return INVALID_OPERATION;
+    }
+
+    if (mIdentity != identity) {
+        LOGE("[Surface] using an invalid surface, "
+                "identity=%u should be %d",
+                mIdentity, identity);
+        return NO_INIT;
+    }
+
+    // check the surface didn't become invalid
+    status_t err = mSharedBufferClient->getStatus();
+    if (err != NO_ERROR) {
+        LOGE("surface (identity=%u) is invalid, err=%d (%s)",
+                mIdentity, err, strerror(-err));
+        return err;
+    }
+
+    return NO_ERROR;
 }
 
 sp<ISurface> Surface::getISurface() const {
     return mSurface;
 }
 
-bool Surface::isValid() {
-    return mToken>=0 && mClient!=0;
-}
-
-status_t Surface::validate() const
-{
-    sp<SurfaceComposerClient> client(getClient());
-    if (mToken<0 || mClient==0) {
-        LOGE("invalid token (%d, identity=%u) or client (%p)", 
-                mToken, mIdentity, client.get());
-        return NO_INIT;
-    }
-    SharedClient const* cblk = mClient->mControl;
-    if (cblk == 0) {
-        LOGE("cblk is null (surface id=%d, identity=%u)", mToken, mIdentity);
-        return NO_INIT;
-    }
-    status_t err = cblk->validate(mToken);
-    if (err != NO_ERROR) {
-        LOGE("surface (id=%d, identity=%u) is invalid, err=%d (%s)",
-                mToken, mIdentity, err, strerror(-err));
-        return err;
-    }
-    uint32_t identity = cblk->getIdentity(mToken);
-    if (mIdentity != identity) {
-        LOGE("using an invalid surface id=%d, identity=%u should be %d",
-                mToken, mIdentity, identity);
-        return NO_INIT;
-    }
-    return NO_ERROR;
-}
-
-
-bool Surface::isSameSurface(
-        const sp<Surface>& lhs, const sp<Surface>& rhs) 
-{
-    if (lhs == 0 || rhs == 0)
-        return false;
-
-    return lhs->mSurface->asBinder() == rhs->mSurface->asBinder();
-}
-
 // ----------------------------------------------------------------------------
 
-int Surface::setSwapInterval(android_native_window_t* window, int interval) {
+int Surface::setSwapInterval(ANativeWindow* window, int interval) {
     return 0;
 }
 
-int Surface::dequeueBuffer(android_native_window_t* window, 
+int Surface::dequeueBuffer(ANativeWindow* window, 
         android_native_buffer_t** buffer) {
     Surface* self = getSelf(window);
     return self->dequeueBuffer(buffer);
 }
 
-int Surface::lockBuffer(android_native_window_t* window, 
+int Surface::lockBuffer(ANativeWindow* window, 
         android_native_buffer_t* buffer) {
     Surface* self = getSelf(window);
     return self->lockBuffer(buffer);
 }
 
-int Surface::queueBuffer(android_native_window_t* window, 
+int Surface::queueBuffer(ANativeWindow* window, 
         android_native_buffer_t* buffer) {
     Surface* self = getSelf(window);
     return self->queueBuffer(buffer);
 }
 
-int Surface::query(android_native_window_t* window, 
+int Surface::query(ANativeWindow* window, 
         int what, int* value) {
     Surface* self = getSelf(window);
     return self->query(what, value);
 }
 
-int Surface::perform(android_native_window_t* window, 
+int Surface::perform(ANativeWindow* window, 
         int operation, ...) {
     va_list args;
     va_start(args, operation);
@@ -467,21 +546,24 @@
 
 // ----------------------------------------------------------------------------
 
-status_t Surface::dequeueBuffer(sp<GraphicBuffer>* buffer) {
-    android_native_buffer_t* out;
-    status_t err = dequeueBuffer(&out);
-    if (err == NO_ERROR) {
-        *buffer = GraphicBuffer::getSelf(out);
+bool Surface::needNewBuffer(int bufIdx,
+        uint32_t *pWidth, uint32_t *pHeight,
+        uint32_t *pFormat, uint32_t *pUsage) const
+{
+    Mutex::Autolock _l(mSurfaceLock);
+
+    // Always call needNewBuffer(), since it clears the needed buffers flags
+    bool needNewBuffer = mSharedBufferClient->needNewBuffer(bufIdx);
+    bool validBuffer = mBufferInfo.validateBuffer(mBuffers[bufIdx]);
+    bool newNeewBuffer = needNewBuffer || !validBuffer;
+    if (newNeewBuffer) {
+        mBufferInfo.get(pWidth, pHeight, pFormat, pUsage);
     }
-    return err;
+    return newNeewBuffer;
 }
 
-// ----------------------------------------------------------------------------
-
-
 int Surface::dequeueBuffer(android_native_buffer_t** buffer)
 {
-    sp<SurfaceComposerClient> client(getClient());
     status_t err = validate();
     if (err != NO_ERROR)
         return err;
@@ -492,24 +574,28 @@
         return bufIdx;
     }
 
-    // below we make sure we AT LEAST have the usage flags we want
-    const uint32_t usage(getUsage());
-    const sp<GraphicBuffer>& backBuffer(mBuffers[bufIdx]);
-    if (backBuffer == 0 || 
-        ((uint32_t(backBuffer->usage) & usage) != usage) ||
-        mSharedBufferClient->needNewBuffer(bufIdx)) 
-    {
-        err = getBufferLocked(bufIdx, usage);
-        LOGE_IF(err, "getBufferLocked(%ld, %08x) failed (%s)",
-                bufIdx, usage, strerror(-err));
+    // grow the buffer array if needed
+    const size_t size = mBuffers.size();
+    const size_t needed = bufIdx+1;
+    if (size < needed) {
+        mBuffers.insertAt(size, needed-size);
+    }
+
+    uint32_t w, h, format, usage;
+    if (needNewBuffer(bufIdx, &w, &h, &format, &usage)) {
+        err = getBufferLocked(bufIdx, w, h, format, usage);
+        LOGE_IF(err, "getBufferLocked(%ld, %u, %u, %u, %08x) failed (%s)",
+                bufIdx, w, h, format, usage, strerror(-err));
         if (err == NO_ERROR) {
             // reset the width/height with the what we get from the buffer
+            const sp<GraphicBuffer>& backBuffer(mBuffers[bufIdx]);
             mWidth  = uint32_t(backBuffer->width);
             mHeight = uint32_t(backBuffer->height);
         }
     }
 
     // if we still don't have a buffer here, we probably ran out of memory
+    const sp<GraphicBuffer>& backBuffer(mBuffers[bufIdx]);
     if (!err && backBuffer==0) {
         err = NO_MEMORY;
     }
@@ -526,12 +612,11 @@
 
 int Surface::lockBuffer(android_native_buffer_t* buffer)
 {
-    sp<SurfaceComposerClient> client(getClient());
     status_t err = validate();
     if (err != NO_ERROR)
         return err;
 
-    int32_t bufIdx = GraphicBuffer::getSelf(buffer)->getIndex();
+    int32_t bufIdx = getBufferIndex(GraphicBuffer::getSelf(buffer));
     err = mSharedBufferClient->lock(bufIdx);
     LOGE_IF(err, "error locking buffer %d (%s)", bufIdx, strerror(-err));
     return err;
@@ -539,7 +624,6 @@
 
 int Surface::queueBuffer(android_native_buffer_t* buffer)
 {   
-    sp<SurfaceComposerClient> client(getClient());
     status_t err = validate();
     if (err != NO_ERROR)
         return err;
@@ -548,14 +632,15 @@
         mDirtyRegion.set(mSwapRectangle);
     }
     
-    int32_t bufIdx = GraphicBuffer::getSelf(buffer)->getIndex();
+    int32_t bufIdx = getBufferIndex(GraphicBuffer::getSelf(buffer));
+    mSharedBufferClient->setCrop(bufIdx, mNextBufferCrop);
     mSharedBufferClient->setDirtyRegion(bufIdx, mDirtyRegion);
     err = mSharedBufferClient->queue(bufIdx);
     LOGE_IF(err, "error queuing buffer %d (%s)", bufIdx, strerror(-err));
 
     if (err == NO_ERROR) {
-        // FIXME: can we avoid this IPC if we know there is one pending?
-        client->signalServer();
+        // TODO: can we avoid this IPC if we know there is one pending?
+        mClient.signalServer();
     }
     return err;
 }
@@ -578,6 +663,10 @@
 
 int Surface::perform(int operation, va_list args)
 {
+    status_t err = validate();
+    if (err != NO_ERROR)
+        return err;
+
     int res = NO_ERROR;
     switch (operation) {
     case NATIVE_WINDOW_SET_USAGE:
@@ -589,6 +678,15 @@
     case NATIVE_WINDOW_DISCONNECT:
         res = dispatch_disconnect( args );
         break;
+    case NATIVE_WINDOW_SET_CROP:
+        res = dispatch_crop( args );
+        break;
+    case NATIVE_WINDOW_SET_BUFFER_COUNT:
+        res = dispatch_set_buffer_count( args );
+        break;
+    case NATIVE_WINDOW_SET_BUFFERS_GEOMETRY:
+        res = dispatch_set_buffers_geometry( args );
+        break;
     default:
         res = NAME_NOT_FOUND;
         break;
@@ -608,12 +706,25 @@
     int api = va_arg(args, int);
     return disconnect( api );
 }
-
+int Surface::dispatch_crop(va_list args) {
+    android_native_rect_t const* rect = va_arg(args, android_native_rect_t*);
+    return crop( reinterpret_cast<Rect const*>(rect) );
+}
+int Surface::dispatch_set_buffer_count(va_list args) {
+    size_t bufferCount = va_arg(args, size_t);
+    return setBufferCount(bufferCount);
+}
+int Surface::dispatch_set_buffers_geometry(va_list args) {
+    int w = va_arg(args, int);
+    int h = va_arg(args, int);
+    int f = va_arg(args, int);
+    return setBuffersGeometry(w, h, f);
+}
 
 void Surface::setUsage(uint32_t reqUsage)
 {
     Mutex::Autolock _l(mSurfaceLock);
-    mUsage = reqUsage;
+    mBufferInfo.set(reqUsage);
 }
 
 int Surface::connect(int api)
@@ -654,19 +765,55 @@
     return err;
 }
 
-uint32_t Surface::getUsage() const
+int Surface::crop(Rect const* rect)
 {
     Mutex::Autolock _l(mSurfaceLock);
-    return mUsage;
+    // TODO: validate rect size
+    mNextBufferCrop = *rect;
+    return NO_ERROR;
 }
 
+int Surface::setBufferCount(int bufferCount)
+{
+    sp<ISurface> s(mSurface);
+    if (s == 0) return NO_INIT;
+
+    class SetBufferCountIPC : public SharedBufferClient::SetBufferCountCallback {
+        sp<ISurface> surface;
+        virtual status_t operator()(int bufferCount) const {
+            return surface->setBufferCount(bufferCount);
+        }
+    public:
+        SetBufferCountIPC(const sp<ISurface>& surface) : surface(surface) { }
+    } ipc(s);
+
+    status_t err = mSharedBufferClient->setBufferCount(bufferCount, ipc);
+    LOGE_IF(err, "ISurface::setBufferCount(%d) returned %s",
+            bufferCount, strerror(-err));
+    return err;
+}
+
+int Surface::setBuffersGeometry(int w, int h, int format)
+{
+    if (w<0 || h<0 || format<0)
+        return BAD_VALUE;
+
+    if ((w && !h) || (!w && h))
+        return BAD_VALUE;
+
+    Mutex::Autolock _l(mSurfaceLock);
+    mBufferInfo.set(w, h, format);
+    return NO_ERROR;
+}
+
+// ----------------------------------------------------------------------------
+
 int Surface::getConnectedApi() const
 {
     Mutex::Autolock _l(mSurfaceLock);
     return mConnected;
 }
 
-
 // ----------------------------------------------------------------------------
 
 status_t Surface::lock(SurfaceInfo* info, bool blocking) {
@@ -677,7 +824,7 @@
 {
     if (getConnectedApi()) {
         LOGE("Surface::lock(%p) failed. Already connected to another API",
-                (android_native_window_t*)this);
+                (ANativeWindow*)this);
         CallStack stack;
         stack.update();
         stack.dump("");
@@ -703,45 +850,47 @@
     // we're intending to do software rendering from this point
     setUsage(GRALLOC_USAGE_SW_READ_OFTEN | GRALLOC_USAGE_SW_WRITE_OFTEN);
 
-    sp<GraphicBuffer> backBuffer;
-    status_t err = dequeueBuffer(&backBuffer);
+    android_native_buffer_t* out;
+    status_t err = dequeueBuffer(&out);
     LOGE_IF(err, "dequeueBuffer failed (%s)", strerror(-err));
     if (err == NO_ERROR) {
+        sp<GraphicBuffer> backBuffer(GraphicBuffer::getSelf(out));
         err = lockBuffer(backBuffer.get());
         LOGE_IF(err, "lockBuffer (idx=%d) failed (%s)",
-                backBuffer->getIndex(), strerror(-err));
+                getBufferIndex(backBuffer), strerror(-err));
         if (err == NO_ERROR) {
-            // we handle copy-back here...
-
             const Rect bounds(backBuffer->width, backBuffer->height);
-            Region scratch(bounds);
+            const Region boundsRegion(bounds);
+            Region scratch(boundsRegion);
             Region& newDirtyRegion(dirtyIn ? *dirtyIn : scratch);
+            newDirtyRegion &= boundsRegion;
 
-            if (mNeedFullUpdate) {
-                // reset newDirtyRegion to bounds when a buffer is reallocated
-                // it would be better if this information was associated with
-                // the buffer and made available to outside of Surface.
-                // This will do for now though.
-                mNeedFullUpdate = false;
-                newDirtyRegion.set(bounds);
-            } else {
-                newDirtyRegion.andSelf(bounds);
-            }
-
+            // figure out if we can copy the frontbuffer back
             const sp<GraphicBuffer>& frontBuffer(mPostedBuffer);
-            if (frontBuffer !=0 &&
-                backBuffer->width  == frontBuffer->width && 
-                backBuffer->height == frontBuffer->height &&
-                !(mFlags & ISurfaceComposer::eDestroyBackbuffer)) 
-            {
+            const bool canCopyBack = (frontBuffer != 0 &&
+                    backBuffer->width  == frontBuffer->width &&
+                    backBuffer->height == frontBuffer->height &&
+                    backBuffer->format == frontBuffer->format &&
+                    !(mFlags & ISurfaceComposer::eDestroyBackbuffer));
+
+            // the dirty region we report to surfaceflinger is the one
+            // given by the user (as opposed to the one *we* return to the
+            // user).
+            mDirtyRegion = newDirtyRegion;
+
+            if (canCopyBack) {
+                // copy the area that is invalid and not repainted this round
                 const Region copyback(mOldDirtyRegion.subtract(newDirtyRegion));
-                if (!copyback.isEmpty() && frontBuffer!=0) {
-                    // copy front to back
+                if (!copyback.isEmpty())
                     copyBlt(backBuffer, frontBuffer, copyback);
-                }
+            } else {
+                // if we can't copy-back anything, modify the user's dirty
+                // region to make sure they redraw the whole buffer
+                newDirtyRegion = boundsRegion;
             }
 
-            mDirtyRegion = newDirtyRegion;
+            // keep track of the are of the buffer that is "clean"
+            // (ie: that will be redrawn)
             mOldDirtyRegion = newDirtyRegion;
 
             void* vaddr;
@@ -777,7 +926,7 @@
     
     err = queueBuffer(mLockedBuffer.get());
     LOGE_IF(err, "queueBuffer (idx=%d) failed (%s)",
-            mLockedBuffer->getIndex(), strerror(-err));
+            getBufferIndex(mLockedBuffer), strerror(-err));
 
     mPostedBuffer = mLockedBuffer;
     mLockedBuffer = 0;
@@ -789,7 +938,13 @@
     mSwapRectangle = r;
 }
 
-status_t Surface::getBufferLocked(int index, int usage)
+int Surface::getBufferIndex(const sp<GraphicBuffer>& buffer) const
+{
+    return buffer->getIndex();
+}
+
+status_t Surface::getBufferLocked(int index,
+        uint32_t w, uint32_t h, uint32_t format, uint32_t usage)
 {
     sp<ISurface> s(mSurface);
     if (s == 0) return NO_INIT;
@@ -797,20 +952,21 @@
     status_t err = NO_MEMORY;
 
     // free the current buffer
-    sp<GraphicBuffer>& currentBuffer(mBuffers[index]);
+    sp<GraphicBuffer>& currentBuffer(mBuffers.editItemAt(index));
     if (currentBuffer != 0) {
         getBufferMapper().unregisterBuffer(currentBuffer->handle);
         currentBuffer.clear();
     }
 
-    sp<GraphicBuffer> buffer = s->requestBuffer(index, usage);
+    sp<GraphicBuffer> buffer = s->requestBuffer(index, w, h, format, usage);
     LOGE_IF(buffer==0,
             "ISurface::getBuffer(%d, %08x) returned NULL",
             index, usage);
     if (buffer != 0) { // this should never happen by construction
         LOGE_IF(buffer->handle == NULL, 
-                "Surface (identity=%d) requestBuffer(%d, %08x) returned"
-                "a buffer with a null handle", mIdentity, index, usage);
+                "Surface (identity=%d) requestBuffer(%d, %u, %u, %u, %08x) "
+                "returned a buffer with a null handle",
+                mIdentity, index, w, h, format, usage);
         err = mSharedBufferClient->getStatus();
         LOGE_IF(err,  "Surface (identity=%d) state = %d", mIdentity, err);
         if (!err && buffer->handle != NULL) {
@@ -820,14 +976,52 @@
             if (err == NO_ERROR) {
                 currentBuffer = buffer;
                 currentBuffer->setIndex(index);
-                mNeedFullUpdate = true;
             }
         } else {
-            err = err<0 ? err : NO_MEMORY;
+            err = err<0 ? err : status_t(NO_MEMORY);
         }
     }
     return err; 
 }
 
+// ----------------------------------------------------------------------------
+Surface::BufferInfo::BufferInfo()
+    : mWidth(0), mHeight(0), mFormat(0),
+      mUsage(GRALLOC_USAGE_HW_RENDER), mDirty(0)
+{
+}
+
+void Surface::BufferInfo::set(uint32_t w, uint32_t h, uint32_t format) {
+    if ((mWidth != w) || (mHeight != h) || (mFormat != format)) {
+        mWidth = w;
+        mHeight = h;
+        mFormat = format;
+        mDirty |= GEOMETRY;
+    }
+}
+
+void Surface::BufferInfo::set(uint32_t usage) {
+    mUsage = usage;
+}
+
+void Surface::BufferInfo::get(uint32_t *pWidth, uint32_t *pHeight,
+        uint32_t *pFormat, uint32_t *pUsage) const {
+    *pWidth  = mWidth;
+    *pHeight = mHeight;
+    *pFormat = mFormat;
+    *pUsage  = mUsage;
+}
+
+bool Surface::BufferInfo::validateBuffer(const sp<GraphicBuffer>& buffer) const {
+    // make sure we AT LEAST have the usage flags we want
+    if (mDirty || buffer==0 ||
+            ((buffer->usage & mUsage) != mUsage)) {
+        mDirty = 0;
+        return false;
+    }
+    return true;
+}
+
+// ----------------------------------------------------------------------------
 }; // namespace android
 
diff --git a/libs/surfaceflinger_client/SurfaceComposerClient.cpp b/libs/surfaceflinger_client/SurfaceComposerClient.cpp
index 3117495..4096ac6 100644
--- a/libs/surfaceflinger_client/SurfaceComposerClient.cpp
+++ b/libs/surfaceflinger_client/SurfaceComposerClient.cpp
@@ -17,98 +17,137 @@
 #define LOG_TAG "SurfaceComposerClient"
 
 #include <stdint.h>
-#include <unistd.h>
-#include <fcntl.h>
-#include <errno.h>
 #include <sys/types.h>
-#include <sys/stat.h>
 
-#include <cutils/memory.h>
-
-#include <utils/Atomic.h>
 #include <utils/Errors.h>
 #include <utils/threads.h>
-#include <utils/KeyedVector.h>
+#include <utils/SortedVector.h>
 #include <utils/Log.h>
+#include <utils/Singleton.h>
 
 #include <binder/IServiceManager.h>
 #include <binder/IMemory.h>
 
 #include <ui/DisplayInfo.h>
-#include <ui/Rect.h>
 
 #include <surfaceflinger/ISurfaceComposer.h>
-#include <surfaceflinger/ISurfaceFlingerClient.h>
+#include <surfaceflinger/ISurfaceComposerClient.h>
 #include <surfaceflinger/ISurface.h>
 #include <surfaceflinger/SurfaceComposerClient.h>
 
 #include <private/surfaceflinger/LayerState.h>
 #include <private/surfaceflinger/SharedBufferStack.h>
 
-#define VERBOSE(...)	((void)0)
-//#define VERBOSE			LOGD
-
-#define LIKELY( exp )       (__builtin_expect( (exp) != 0, true  ))
-#define UNLIKELY( exp )     (__builtin_expect( (exp) != 0, false ))
 
 namespace android {
+// ---------------------------------------------------------------------------
+
+ANDROID_SINGLETON_STATIC_INSTANCE(ComposerService);
+
+ComposerService::ComposerService()
+: Singleton<ComposerService>() {
+    const String16 name("SurfaceFlinger");
+    while (getService(name, &mComposerService) != NO_ERROR) {
+        usleep(250000);
+    }
+    mServerCblkMemory = mComposerService->getCblk();
+    mServerCblk = static_cast<surface_flinger_cblk_t volatile *>(
+            mServerCblkMemory->getBase());
+}
+
+sp<ISurfaceComposer> ComposerService::getComposerService() {
+    return ComposerService::getInstance().mComposerService;
+}
+
+surface_flinger_cblk_t const volatile * ComposerService::getControlBlock() {
+    return ComposerService::getInstance().mServerCblk;
+}
+
+static inline sp<ISurfaceComposer> getComposerService() {
+    return ComposerService::getComposerService();
+}
+
+static inline surface_flinger_cblk_t const volatile * get_cblk() {
+    return ComposerService::getControlBlock();
+}
 
 // ---------------------------------------------------------------------------
 
-// Must not be holding SurfaceComposerClient::mLock when acquiring gLock here.
-static Mutex                                                gLock;
-static sp<ISurfaceComposer>                                 gSurfaceManager;
-static DefaultKeyedVector< sp<IBinder>, sp<SurfaceComposerClient> > gActiveConnections;
-static SortedVector<sp<SurfaceComposerClient> >             gOpenTransactions;
-static sp<IMemoryHeap>                                      gServerCblkMemory;
-static volatile surface_flinger_cblk_t*                     gServerCblk;
-
-static sp<ISurfaceComposer> getComposerService()
+class Composer : public Singleton<Composer>
 {
-    sp<ISurfaceComposer> sc;
-    Mutex::Autolock _l(gLock);
-    if (gSurfaceManager != 0) {
-        sc = gSurfaceManager;
-    } else {
-        // release the lock while we're waiting...
-        gLock.unlock();
+    Mutex mLock;
+    SortedVector< wp<SurfaceComposerClient> > mActiveConnections;
+    SortedVector<sp<SurfaceComposerClient> > mOpenTransactions;
 
-        sp<IBinder> binder;
-        sp<IServiceManager> sm = defaultServiceManager();
-        do {
-            binder = sm->getService(String16("SurfaceFlinger"));
-            if (binder == 0) {
-                LOGW("SurfaceFlinger not published, waiting...");
-                usleep(500000); // 0.5 s
+    Composer() : Singleton<Composer>() {
+    }
+
+    void addClientImpl(const sp<SurfaceComposerClient>& client) {
+        Mutex::Autolock _l(mLock);
+        mActiveConnections.add(client);
+    }
+
+    void removeClientImpl(const sp<SurfaceComposerClient>& client) {
+        Mutex::Autolock _l(mLock);
+        mActiveConnections.remove(client);
+    }
+
+    void openGlobalTransactionImpl()
+    {
+        Mutex::Autolock _l(mLock);
+        if (mOpenTransactions.size()) {
+            LOGE("openGlobalTransaction() called more than once. skipping.");
+            return;
+        }
+        const size_t N = mActiveConnections.size();
+        for (size_t i=0; i<N; i++) {
+            sp<SurfaceComposerClient> client(mActiveConnections[i].promote());
+            if (client != 0 && mOpenTransactions.indexOf(client) < 0) {
+                if (client->openTransaction() == NO_ERROR) {
+                    mOpenTransactions.add(client);
+                } else {
+                    LOGE("openTransaction on client %p failed", client.get());
+                    // let it go, it'll fail later when the user
+                    // tries to do something with the transaction
+                }
             }
-        } while(binder == 0);
-
-        // grab the lock again for updating gSurfaceManager
-        gLock.lock();
-        if (gSurfaceManager == 0) {
-            sc = interface_cast<ISurfaceComposer>(binder);
-            gSurfaceManager = sc;
-        } else {
-            sc = gSurfaceManager;
         }
     }
-    return sc;
-}
 
-static volatile surface_flinger_cblk_t const * get_cblk()
-{
-    if (gServerCblk == 0) {
+    void closeGlobalTransactionImpl()
+    {
+        mLock.lock();
+            SortedVector< sp<SurfaceComposerClient> > clients(mOpenTransactions);
+            mOpenTransactions.clear();
+        mLock.unlock();
+
         sp<ISurfaceComposer> sm(getComposerService());
-        Mutex::Autolock _l(gLock);
-        if (gServerCblk == 0) {
-            gServerCblkMemory = sm->getCblk();
-            LOGE_IF(gServerCblkMemory==0, "Can't get server control block");
-            gServerCblk = (surface_flinger_cblk_t *)gServerCblkMemory->getBase();
-            LOGE_IF(gServerCblk==0, "Can't get server control block address");
-        }
+        sm->openGlobalTransaction();
+            const size_t N = clients.size();
+            for (size_t i=0; i<N; i++) {
+                clients[i]->closeTransaction();
+            }
+        sm->closeGlobalTransaction();
     }
-    return gServerCblk;
-}
+
+    friend class Singleton<Composer>;
+
+public:
+    static void addClient(const sp<SurfaceComposerClient>& client) {
+        Composer::getInstance().addClientImpl(client);
+    }
+    static void removeClient(const sp<SurfaceComposerClient>& client) {
+        Composer::getInstance().removeClientImpl(client);
+    }
+    static void openGlobalTransaction() {
+        Composer::getInstance().openGlobalTransactionImpl();
+    }
+    static void closeGlobalTransaction() {
+        Composer::getInstance().closeGlobalTransactionImpl();
+    }
+};
+
+ANDROID_SINGLETON_STATIC_INSTANCE(Composer);
 
 // ---------------------------------------------------------------------------
 
@@ -120,61 +159,27 @@
 }
 
 SurfaceComposerClient::SurfaceComposerClient()
+    : mTransactionOpen(0), mPrebuiltLayerState(0), mStatus(NO_INIT)
+{
+}
+
+void SurfaceComposerClient::onFirstRef()
 {
     sp<ISurfaceComposer> sm(getComposerService());
-    if (sm == 0) {
-        _init(0, 0);
-        return;
+    if (sm != 0) {
+        sp<ISurfaceComposerClient> conn = sm->createConnection();
+        if (conn != 0) {
+            mClient = conn;
+            Composer::addClient(this);
+            mPrebuiltLayerState = new layer_state_t;
+            mStatus = NO_ERROR;
+        }
     }
-
-    _init(sm, sm->createConnection());
-
-    if (mClient != 0) {
-        Mutex::Autolock _l(gLock);
-        VERBOSE("Adding client %p to map", this);
-        gActiveConnections.add(mClient->asBinder(), this);
-    }
-}
-
-SurfaceComposerClient::SurfaceComposerClient(
-        const sp<ISurfaceComposer>& sm, const sp<IBinder>& conn)
-{
-    _init(sm, interface_cast<ISurfaceFlingerClient>(conn));
-}
-
-
-status_t SurfaceComposerClient::linkToComposerDeath(
-        const sp<IBinder::DeathRecipient>& recipient,
-        void* cookie, uint32_t flags)
-{
-    sp<ISurfaceComposer> sm(getComposerService());
-    return sm->asBinder()->linkToDeath(recipient, cookie, flags);    
-}
-
-void SurfaceComposerClient::_init(
-        const sp<ISurfaceComposer>& sm, const sp<ISurfaceFlingerClient>& conn)
-{
-    VERBOSE("Creating client %p, conn %p", this, conn.get());
-
-    mPrebuiltLayerState = 0;
-    mTransactionOpen = 0;
-    mStatus = NO_ERROR;
-    mControl = 0;
-
-    mClient = conn;
-    if (mClient == 0) {
-        mStatus = NO_INIT;
-        return;
-    }
-
-    mControlMemory = mClient->getControlBlock();
-    mSignalServer = sm;
-    mControl = static_cast<SharedClient *>(mControlMemory->getBase());
 }
 
 SurfaceComposerClient::~SurfaceComposerClient()
 {
-    VERBOSE("Destroying client %p, conn %p", this, mClient.get());
+    delete mPrebuiltLayerState;
     dispose();
 }
 
@@ -188,69 +193,31 @@
     return (mClient != 0) ? mClient->asBinder() : 0;
 }
 
-sp<SurfaceComposerClient>
-SurfaceComposerClient::clientForConnection(const sp<IBinder>& conn)
+status_t SurfaceComposerClient::linkToComposerDeath(
+        const sp<IBinder::DeathRecipient>& recipient,
+        void* cookie, uint32_t flags)
 {
-    sp<SurfaceComposerClient> client;
-
-    { // scope for lock
-        Mutex::Autolock _l(gLock);
-        client = gActiveConnections.valueFor(conn);
-    }
-
-    if (client == 0) {
-        // Need to make a new client.
-        sp<ISurfaceComposer> sm(getComposerService());
-        client = new SurfaceComposerClient(sm, conn);
-        if (client != 0 && client->initCheck() == NO_ERROR) {
-            Mutex::Autolock _l(gLock);
-            gActiveConnections.add(conn, client);
-            //LOGD("we have %d connections", gActiveConnections.size());
-        } else {
-            client.clear();
-        }
-    }
-
-    return client;
+    sp<ISurfaceComposer> sm(getComposerService());
+    return sm->asBinder()->linkToDeath(recipient, cookie, flags);
 }
 
 void SurfaceComposerClient::dispose()
 {
     // this can be called more than once.
-
-    sp<IMemoryHeap>             controlMemory;
-    sp<ISurfaceFlingerClient>   client;
-
-    {
-        Mutex::Autolock _lg(gLock);
-        Mutex::Autolock _lm(mLock);
-
-        mSignalServer = 0;
-
-        if (mClient != 0) {
-            client = mClient;
-            mClient.clear();
-
-            ssize_t i = gActiveConnections.indexOfKey(client->asBinder());
-            if (i >= 0 && gActiveConnections.valueAt(i) == this) {
-                VERBOSE("Removing client %p from map at %d", this, int(i));
-                gActiveConnections.removeItemsAt(i);
-            }
-        }
-
-        delete mPrebuiltLayerState;
-        mPrebuiltLayerState = 0;
-        controlMemory = mControlMemory;
-        mControlMemory.clear();
-        mControl = 0;
-        mStatus = NO_INIT;
+    sp<ISurfaceComposerClient> client;
+    Mutex::Autolock _lm(mLock);
+    if (mClient != 0) {
+        Composer::removeClient(this);
+        client = mClient; // hold ref while lock is held
+        mClient.clear();
     }
+    mStatus = NO_INIT;
 }
 
 status_t SurfaceComposerClient::getDisplayInfo(
         DisplayID dpy, DisplayInfo* info)
 {
-    if (uint32_t(dpy)>=NUM_DISPLAY_MAX)
+    if (uint32_t(dpy)>=SharedBufferStack::NUM_DISPLAY_MAX)
         return BAD_VALUE;
 
     volatile surface_flinger_cblk_t const * cblk = get_cblk();
@@ -268,7 +235,7 @@
 
 ssize_t SurfaceComposerClient::getDisplayWidth(DisplayID dpy)
 {
-    if (uint32_t(dpy)>=NUM_DISPLAY_MAX)
+    if (uint32_t(dpy)>=SharedBufferStack::NUM_DISPLAY_MAX)
         return BAD_VALUE;
     volatile surface_flinger_cblk_t const * cblk = get_cblk();
     volatile display_cblk_t const * dcblk = cblk->displays + dpy;
@@ -277,7 +244,7 @@
 
 ssize_t SurfaceComposerClient::getDisplayHeight(DisplayID dpy)
 {
-    if (uint32_t(dpy)>=NUM_DISPLAY_MAX)
+    if (uint32_t(dpy)>=SharedBufferStack::NUM_DISPLAY_MAX)
         return BAD_VALUE;
     volatile surface_flinger_cblk_t const * cblk = get_cblk();
     volatile display_cblk_t const * dcblk = cblk->displays + dpy;
@@ -286,7 +253,7 @@
 
 ssize_t SurfaceComposerClient::getDisplayOrientation(DisplayID dpy)
 {
-    if (uint32_t(dpy)>=NUM_DISPLAY_MAX)
+    if (uint32_t(dpy)>=SharedBufferStack::NUM_DISPLAY_MAX)
         return BAD_VALUE;
     volatile surface_flinger_cblk_t const * cblk = get_cblk();
     volatile display_cblk_t const * dcblk = cblk->displays + dpy;
@@ -305,12 +272,6 @@
     return n;
 }
 
-
-void SurfaceComposerClient::signalServer()
-{
-    mSignalServer->signal();
-}
-
 sp<SurfaceControl> SurfaceComposerClient::createSurface(
         int pid,
         DisplayID display,
@@ -327,7 +288,6 @@
 
     return SurfaceComposerClient::createSurface(pid, name, display,
             w, h, format, flags);
-
 }
 
 sp<SurfaceControl> SurfaceComposerClient::createSurface(
@@ -341,13 +301,11 @@
 {
     sp<SurfaceControl> result;
     if (mStatus == NO_ERROR) {
-        ISurfaceFlingerClient::surface_data_t data;
+        ISurfaceComposerClient::surface_data_t data;
         sp<ISurface> surface = mClient->createSurface(&data, pid, name,
                 display, w, h, format, flags);
         if (surface != 0) {
-            if (uint32_t(data.token) < NUM_LAYERS_MAX) {
-                result = new SurfaceControl(this, surface, data, w, h, format, flags);
-            }
+            result = new SurfaceControl(this, surface, data, w, h, format, flags);
         }
     }
     return result;
@@ -373,56 +331,14 @@
 
 void SurfaceComposerClient::openGlobalTransaction()
 {
-    Mutex::Autolock _l(gLock);
-
-    if (gOpenTransactions.size()) {
-        LOGE("openGlobalTransaction() called more than once. skipping.");
-        return;
-    }
-
-    const size_t N = gActiveConnections.size();
-    VERBOSE("openGlobalTransaction (%ld clients)", N);
-    for (size_t i=0; i<N; i++) {
-        sp<SurfaceComposerClient> client(gActiveConnections.valueAt(i));
-        if (gOpenTransactions.indexOf(client) < 0) {
-            if (client->openTransaction() == NO_ERROR) {
-                if (gOpenTransactions.add(client) < 0) {
-                    // Ooops!
-                    LOGE(   "Unable to add a SurfaceComposerClient "
-                            "to the global transaction set (out of memory?)");
-                    client->closeTransaction();
-                    // let it go, it'll fail later when the user
-                    // tries to do something with the transaction
-                }
-            } else {
-                LOGE("openTransaction on client %p failed", client.get());
-                // let it go, it'll fail later when the user
-                // tries to do something with the transaction
-            }
-        }
-    }
+    Composer::openGlobalTransaction();
 }
 
 void SurfaceComposerClient::closeGlobalTransaction()
 {
-    gLock.lock();
-        SortedVector< sp<SurfaceComposerClient> > clients(gOpenTransactions);
-        gOpenTransactions.clear();
-    gLock.unlock();
-
-    const size_t N = clients.size();
-    VERBOSE("closeGlobalTransaction (%ld clients)", N);
-
-    sp<ISurfaceComposer> sm(getComposerService());
-    sm->openGlobalTransaction();
-    for (size_t i=0; i<N; i++) {
-        clients[i]->closeTransaction();
-    }
-    sm->closeGlobalTransaction();
-
+    Composer::closeGlobalTransaction();
 }
 
-
 status_t SurfaceComposerClient::freezeDisplay(DisplayID dpy, uint32_t flags)
 {
     sp<ISurfaceComposer> sm(getComposerService());
@@ -447,26 +363,16 @@
     if (mStatus != NO_ERROR)
         return mStatus;
     Mutex::Autolock _l(mLock);
-    VERBOSE(   "openTransaction (client %p, mTransactionOpen=%d)",
-            this, mTransactionOpen);
     mTransactionOpen++;
-    if (mPrebuiltLayerState == 0) {
-        mPrebuiltLayerState = new layer_state_t;
-    }
     return NO_ERROR;
 }
 
-
 status_t SurfaceComposerClient::closeTransaction()
 {
     if (mStatus != NO_ERROR)
         return mStatus;
 
     Mutex::Autolock _l(mLock);
-
-    VERBOSE(   "closeTransaction (client %p, mTransactionOpen=%d)",
-            this, mTransactionOpen);
-
     if (mTransactionOpen <= 0) {
         LOGE(   "closeTransaction (client %p, mTransactionOpen=%d) "
                 "called more times than openTransaction()",
@@ -488,7 +394,7 @@
     return NO_ERROR;
 }
 
-layer_state_t* SurfaceComposerClient::_get_state_l(SurfaceID index)
+layer_state_t* SurfaceComposerClient::get_state_l(SurfaceID index)
 {
     // API usage error, do nothing.
     if (mTransactionOpen<=0) {
@@ -498,7 +404,7 @@
     }
 
     // use mPrebuiltLayerState just to find out if we already have it
-    layer_state_t& dummy = *mPrebuiltLayerState;
+    layer_state_t& dummy(*mPrebuiltLayerState);
     dummy.surface = index;
     ssize_t i = mStates.indexOf(dummy);
     if (i < 0) {
@@ -508,49 +414,49 @@
     return mStates.editArray() + i;
 }
 
-layer_state_t* SurfaceComposerClient::_lockLayerState(SurfaceID id)
+layer_state_t* SurfaceComposerClient::lockLayerState(SurfaceID id)
 {
     layer_state_t* s;
     mLock.lock();
-    s = _get_state_l(id);
+    s = get_state_l(id);
     if (!s) mLock.unlock();
     return s;
 }
 
-void SurfaceComposerClient::_unlockLayerState()
+void SurfaceComposerClient::unlockLayerState()
 {
     mLock.unlock();
 }
 
 status_t SurfaceComposerClient::setPosition(SurfaceID id, int32_t x, int32_t y)
 {
-    layer_state_t* s = _lockLayerState(id);
+    layer_state_t* s = lockLayerState(id);
     if (!s) return BAD_INDEX;
     s->what |= ISurfaceComposer::ePositionChanged;
     s->x = x;
     s->y = y;
-    _unlockLayerState();
+    unlockLayerState();
     return NO_ERROR;
 }
 
 status_t SurfaceComposerClient::setSize(SurfaceID id, uint32_t w, uint32_t h)
 {
-    layer_state_t* s = _lockLayerState(id);
+    layer_state_t* s = lockLayerState(id);
     if (!s) return BAD_INDEX;
     s->what |= ISurfaceComposer::eSizeChanged;
     s->w = w;
     s->h = h;
-    _unlockLayerState();
+    unlockLayerState();
     return NO_ERROR;
 }
 
 status_t SurfaceComposerClient::setLayer(SurfaceID id, int32_t z)
 {
-    layer_state_t* s = _lockLayerState(id);
+    layer_state_t* s = lockLayerState(id);
     if (!s) return BAD_INDEX;
     s->what |= ISurfaceComposer::eLayerChanged;
     s->z = z;
-    _unlockLayerState();
+    unlockLayerState();
     return NO_ERROR;
 }
 
@@ -579,34 +485,34 @@
 status_t SurfaceComposerClient::setFlags(SurfaceID id,
         uint32_t flags, uint32_t mask)
 {
-    layer_state_t* s = _lockLayerState(id);
+    layer_state_t* s = lockLayerState(id);
     if (!s) return BAD_INDEX;
     s->what |= ISurfaceComposer::eVisibilityChanged;
     s->flags &= ~mask;
     s->flags |= (flags & mask);
     s->mask |= mask;
-    _unlockLayerState();
+    unlockLayerState();
     return NO_ERROR;
 }
 
 status_t SurfaceComposerClient::setTransparentRegionHint(
         SurfaceID id, const Region& transparentRegion)
 {
-    layer_state_t* s = _lockLayerState(id);
+    layer_state_t* s = lockLayerState(id);
     if (!s) return BAD_INDEX;
     s->what |= ISurfaceComposer::eTransparentRegionChanged;
     s->transparentRegion = transparentRegion;
-    _unlockLayerState();
+    unlockLayerState();
     return NO_ERROR;
 }
 
 status_t SurfaceComposerClient::setAlpha(SurfaceID id, float alpha)
 {
-    layer_state_t* s = _lockLayerState(id);
+    layer_state_t* s = lockLayerState(id);
     if (!s) return BAD_INDEX;
     s->what |= ISurfaceComposer::eAlphaChanged;
     s->alpha = alpha;
-    _unlockLayerState();
+    unlockLayerState();
     return NO_ERROR;
 }
 
@@ -615,7 +521,7 @@
         float dsdx, float dtdx,
         float dsdy, float dtdy )
 {
-    layer_state_t* s = _lockLayerState(id);
+    layer_state_t* s = lockLayerState(id);
     if (!s) return BAD_INDEX;
     s->what |= ISurfaceComposer::eMatrixChanged;
     layer_state_t::matrix22_t matrix;
@@ -624,19 +530,20 @@
     matrix.dsdy = dsdy;
     matrix.dtdy = dtdy;
     s->matrix = matrix;
-    _unlockLayerState();
+    unlockLayerState();
     return NO_ERROR;
 }
 
 status_t SurfaceComposerClient::setFreezeTint(SurfaceID id, uint32_t tint)
 {
-    layer_state_t* s = _lockLayerState(id);
+    layer_state_t* s = lockLayerState(id);
     if (!s) return BAD_INDEX;
     s->what |= ISurfaceComposer::eFreezeTintChanged;
     s->tint = tint;
-    _unlockLayerState();
+    unlockLayerState();
     return NO_ERROR;
 }
 
+// ----------------------------------------------------------------------------
 }; // namespace android
 
diff --git a/libs/surfaceflinger/tests/Android.mk b/libs/surfaceflinger_client/tests/Android.mk
similarity index 100%
rename from libs/surfaceflinger/tests/Android.mk
rename to libs/surfaceflinger_client/tests/Android.mk
diff --git a/libs/surfaceflinger_client/tests/SharedBufferStack/Android.mk b/libs/surfaceflinger_client/tests/SharedBufferStack/Android.mk
new file mode 100644
index 0000000..d3dfe04
--- /dev/null
+++ b/libs/surfaceflinger_client/tests/SharedBufferStack/Android.mk
@@ -0,0 +1,17 @@
+LOCAL_PATH:= $(call my-dir)
+include $(CLEAR_VARS)
+
+LOCAL_SRC_FILES:= \
+	SharedBufferStackTest.cpp
+
+LOCAL_SHARED_LIBRARIES := \
+	libcutils \
+	libutils \
+    libui \
+    libsurfaceflinger_client
+
+LOCAL_MODULE:= test-sharedbufferstack
+
+LOCAL_MODULE_TAGS := tests
+
+include $(BUILD_EXECUTABLE)
diff --git a/libs/surfaceflinger_client/tests/SharedBufferStack/SharedBufferStackTest.cpp b/libs/surfaceflinger_client/tests/SharedBufferStack/SharedBufferStackTest.cpp
new file mode 100644
index 0000000..f409f48
--- /dev/null
+++ b/libs/surfaceflinger_client/tests/SharedBufferStack/SharedBufferStackTest.cpp
@@ -0,0 +1,279 @@
+/*
+ * Copyright (C) 2007 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#undef NDEBUG
+
+#include <assert.h>
+#include <cutils/memory.h>
+#include <cutils/log.h>
+#include <utils/Errors.h>
+#include <private/surfaceflinger/SharedBufferStack.h>
+
+using namespace android;
+
+void log(const char* prefix, int *b, size_t num);
+void test0(SharedBufferServer& s, SharedBufferClient& c, size_t num, int* list);
+
+// ----------------------------------------------------------------------------
+
+int main(int argc, char** argv)
+{
+    SharedClient client;
+    SharedBufferServer s(&client, 0, 4, 0);
+    SharedBufferClient c(&client, 0, 4, 0);
+
+    printf("basic test 0\n");
+    int list0[4] = {0, 1, 2, 3};
+    test0(s, c, 4, list0);
+
+    printf("basic test 1\n");
+    int list1[4] = {2, 1, 0, 3};
+    test0(s, c, 4, list1);
+
+    int b = c.dequeue();
+    c.lock(b);
+    c.queue(b);
+    s.retireAndLock();
+
+    printf("basic test 2\n");
+    int list2[4] = {1, 2, 3, 0};
+    test0(s, c, 4, list2);
+
+
+    printf("resize test\n");
+    class SetBufferCountIPC : public SharedBufferClient::SetBufferCountCallback {
+        SharedBufferServer& s;
+        virtual status_t operator()(int bufferCount) const {
+            return s.resize(bufferCount);
+        }
+    public:
+        SetBufferCountIPC(SharedBufferServer& s) : s(s) { }
+    } resize(s);
+
+    c.setBufferCount(6, resize);
+    int list3[6] = {3, 2, 1, 4, 5, 0};
+    test0(s, c, 6, list3);
+
+    return 0;
+}
+
+void log(const char* prefix, int *b, size_t num)
+{
+    printf("%s: ", prefix);
+    for (size_t i=0 ; i<num ; i++) {
+        printf("%d ", b[i]);
+    }
+    printf("\n");
+}
+
+// ----------------------------------------------------------------------------
+
+void test0(
+        SharedBufferServer& s,
+        SharedBufferClient& c,
+        size_t num,
+        int* list)
+{
+    status_t err;
+    int b[num], u[num], r[num];
+
+    for (size_t i=0 ; i<num ; i++) {
+        b[i] = c.dequeue();
+        assert(b[i]==list[i]);
+    }
+    log("DQ", b, num);
+
+    for (size_t i=0 ; i<num-1 ; i++) {
+        err = c.lock(b[i]);
+        assert(err==0);
+    }
+    log("LK", b, num-1);
+
+    for (size_t i=0 ; i<num-1 ; i++) {
+        err = c.queue(b[i]);
+        assert(err==0);
+    }
+    log(" Q", b, num-1);
+
+
+    for (size_t i=0 ; i<num-1 ; i++) {
+        r[i] = s.retireAndLock();
+        assert(r[i]==list[i]);
+        err = s.unlock(r[i]);
+        assert(err == 0);
+    }
+    log("RT", r, num-1);
+
+    err = c.lock(b[num-1]);
+    assert(err == 0);
+    log("LK", b+num-1, 1);
+
+    err = c.queue(b[num-1]);
+    assert(err == 0);
+    log(" Q", b+num-1, 1);
+
+    r[num-1] = s.retireAndLock();
+    assert(r[num-1]==list[num-1]);
+    err = s.unlock(r[num-1]);
+    assert(err == 0);
+    log("RT", r+num-1, 1);
+
+    // ------------------------------------
+    printf("\n");
+
+    for (size_t i=0 ; i<num ; i++) {
+        b[i] = c.dequeue();
+        assert(b[i]==list[i]);
+    }
+    log("DQ", b, num);
+
+    for (size_t i=0 ; i<num-1 ; i++) {
+        err = c.lock(b[i]);
+        assert(err==0);
+    }
+    log("LK", b, num-1);
+
+    for (size_t i=0 ; i<num-1 ; i++) {
+        u[i] = b[num-2-i];
+    }
+    u[num-1] = b[num-1];
+
+    for (size_t i=0 ; i<num-1 ; i++) {
+        err = c.queue(u[i]);
+        assert(err==0);
+    }
+    log(" Q", u, num-1);
+
+    for (size_t i=0 ; i<num-1 ; i++) {
+        r[i] = s.retireAndLock();
+        assert(r[i]==u[i]);
+        err = s.unlock(r[i]);
+        assert(err == 0);
+    }
+    log("RT", r, num-1);
+
+    err = c.lock(b[num-1]);
+    assert(err == 0);
+    log("LK", b+num-1, 1);
+
+    err = c.queue(b[num-1]);
+    assert(err == 0);
+    log(" Q", b+num-1, 1);
+
+    r[num-1] = s.retireAndLock();
+    assert(r[num-1]==list[num-1]);
+    err = s.unlock(r[num-1]);
+    assert(err == 0);
+    log("RT", r+num-1, 1);
+
+    // ------------------------------------
+    printf("\n");
+
+    for (size_t i=0 ; i<num ; i++) {
+        b[i] = c.dequeue();
+        assert(b[i]==u[i]);
+    }
+    log("DQ", b, num);
+
+    for (size_t i=0 ; i<num-1 ; i++) {
+        err = c.lock(b[i]);
+        assert(err==0);
+    }
+    log("LK", b, num-1);
+
+    for (size_t i=0 ; i<num-1 ; i++) {
+        err = c.queue(b[i]);
+        assert(err==0);
+    }
+    log(" Q", b, num-1);
+
+    for (size_t i=0 ; i<num-1 ; i++) {
+        r[i] = s.retireAndLock();
+        assert(r[i]==u[i]);
+        err = s.unlock(r[i]);
+        assert(err == 0);
+    }
+    log("RT", r, num-1);
+
+    err = c.lock(u[num-1]);
+    assert(err == 0);
+    log("LK", u+num-1, 1);
+
+    err = c.queue(u[num-1]);
+    assert(err == 0);
+    log(" Q", u+num-1, 1);
+
+    r[num-1] = s.retireAndLock();
+    assert(r[num-1]==u[num-1]);
+    err = s.unlock(r[num-1]);
+    assert(err == 0);
+    log("RT", r+num-1, 1);
+
+    // ------------------------------------
+    printf("\n");
+
+    b[0] = c.dequeue();
+    assert(b[0]==u[0]);
+    log("DQ", b, 1);
+
+    c.undoDequeue(b[0]);
+    assert(err == 0);
+    log("UDQ", b, 1);
+
+    // ------------------------------------
+    printf("\n");
+
+    for (size_t i=0 ; i<num ; i++) {
+        b[i] = c.dequeue();
+        assert(b[i]==u[i]);
+    }
+    log("DQ", b, num);
+
+    for (size_t i=0 ; i<num-1 ; i++) {
+        err = c.lock(b[i]);
+        assert(err==0);
+    }
+    log("LK", b, num-1);
+
+    for (size_t i=0 ; i<num-1 ; i++) {
+        err = c.queue(b[i]);
+        assert(err==0);
+    }
+    log(" Q", b, num-1);
+
+    for (size_t i=0 ; i<num-1 ; i++) {
+        r[i] = s.retireAndLock();
+        assert(r[i]==u[i]);
+        err = s.unlock(r[i]);
+        assert(err == 0);
+    }
+    log("RT", r, num-1);
+
+    err = c.lock(u[num-1]);
+    assert(err == 0);
+    log("LK", u+num-1, 1);
+
+    err = c.queue(u[num-1]);
+    assert(err == 0);
+    log(" Q", u+num-1, 1);
+
+    r[num-1] = s.retireAndLock();
+    assert(r[num-1]==u[num-1]);
+    err = s.unlock(r[num-1]);
+    assert(err == 0);
+    log("RT", r+num-1, 1);
+    printf("\n");
+}
diff --git a/libs/ui/Android.mk b/libs/ui/Android.mk
index f7acd97..4243bbf 100644
--- a/libs/ui/Android.mk
+++ b/libs/ui/Android.mk
@@ -11,6 +11,12 @@
 	GraphicBufferMapper.cpp \
 	KeyLayoutMap.cpp \
 	KeyCharacterMap.cpp \
+	Input.cpp \
+	InputDevice.cpp \
+	InputDispatcher.cpp \
+	InputManager.cpp \
+	InputReader.cpp \
+	InputTransport.cpp \
 	IOverlay.cpp \
 	Overlay.cpp \
 	PixelFormat.cpp \
@@ -33,3 +39,13 @@
 endif
 
 include $(BUILD_SHARED_LIBRARY)
+
+
+# Include subdirectory makefiles
+# ============================================================
+
+# If we're building with ONE_SHOT_MAKEFILE (mm, mmm), then what the framework
+# team really wants is to build the stuff defined by this makefile.
+ifeq (,$(ONE_SHOT_MAKEFILE))
+include $(call first-makefiles-under,$(LOCAL_PATH))
+endif
diff --git a/libs/ui/EventHub.cpp b/libs/ui/EventHub.cpp
index d45eaf0..33dd3732 100644
--- a/libs/ui/EventHub.cpp
+++ b/libs/ui/EventHub.cpp
@@ -54,6 +54,9 @@
  */
 #define test_bit(bit, array)    (array[bit/8] & (1<<(bit%8)))
 
+/* this macro computes the number of bytes needed to represent a bit array of the specified size */
+#define sizeof_bit_array(bits)  ((bits + 7) / 8)
+
 #define ID_MASK  0x0000ffff
 #define SEQ_MASK 0x7fff0000
 #define SEQ_SHIFT 16
@@ -155,77 +158,70 @@
     return 0;
 }
 
-int EventHub::getSwitchState(int sw) const
-{
-#ifdef EV_SW
-    if (sw >= 0 && sw <= SW_MAX) {
-        int32_t devid = mSwitches[sw];
-        if (devid != 0) {
-            return getSwitchState(devid, sw);
+int32_t EventHub::getScanCodeState(int32_t deviceId, int32_t deviceClasses,
+        int32_t scanCode) const {
+    if (scanCode >= 0 && scanCode <= KEY_MAX) {
+        AutoMutex _l(mLock);
+
+        if (deviceId == -1) {
+            for (int i = 0; i < mNumDevicesById; i++) {
+                device_t* device = mDevicesById[i].device;
+                if (device != NULL && (device->classes & deviceClasses) != 0) {
+                    int32_t result = getScanCodeStateLocked(device, scanCode);
+                    if (result >= AKEY_STATE_DOWN) {
+                        return result;
+                    }
+                }
+            }
+            return AKEY_STATE_UP;
+        } else {
+            device_t* device = getDevice(deviceId);
+            if (device != NULL) {
+                return getScanCodeStateLocked(device, scanCode);
+            }
         }
     }
-#endif
-    return -1;
+    return AKEY_STATE_UNKNOWN;
 }
 
-int EventHub::getSwitchState(int32_t deviceId, int sw) const
-{
-#ifdef EV_SW
-    AutoMutex _l(mLock);
-    device_t* device = getDevice(deviceId);
-    if (device == NULL) return -1;
-    
-    if (sw >= 0 && sw <= SW_MAX) {
-        uint8_t sw_bitmask[(SW_MAX+7)/8];
-        memset(sw_bitmask, 0, sizeof(sw_bitmask));
-        if (ioctl(mFDs[id_to_index(device->id)].fd,
-                   EVIOCGSW(sizeof(sw_bitmask)), sw_bitmask) >= 0) {
-            return test_bit(sw, sw_bitmask) ? 1 : 0;
+int32_t EventHub::getScanCodeStateLocked(device_t* device, int32_t scanCode) const {
+    uint8_t key_bitmask[sizeof_bit_array(KEY_MAX + 1)];
+    memset(key_bitmask, 0, sizeof(key_bitmask));
+    if (ioctl(mFDs[id_to_index(device->id)].fd,
+               EVIOCGKEY(sizeof(key_bitmask)), key_bitmask) >= 0) {
+        return test_bit(scanCode, key_bitmask) ? AKEY_STATE_DOWN : AKEY_STATE_UP;
+    }
+    return AKEY_STATE_UNKNOWN;
+}
+
+int32_t EventHub::getKeyCodeState(int32_t deviceId, int32_t deviceClasses,
+        int32_t keyCode) const {
+
+    if (deviceId == -1) {
+        for (int i = 0; i < mNumDevicesById; i++) {
+            device_t* device = mDevicesById[i].device;
+            if (device != NULL && (device->classes & deviceClasses) != 0) {
+                int32_t result = getKeyCodeStateLocked(device, keyCode);
+                if (result >= AKEY_STATE_DOWN) {
+                    return result;
+                }
+            }
+        }
+        return AKEY_STATE_UP;
+    } else {
+        device_t* device = getDevice(deviceId);
+        if (device != NULL) {
+            return getKeyCodeStateLocked(device, keyCode);
         }
     }
-#endif
-    
-    return -1;
+    return AKEY_STATE_UNKNOWN;
 }
 
-int EventHub::getScancodeState(int code) const
-{
-    return getScancodeState(mFirstKeyboardId, code);
-}
-
-int EventHub::getScancodeState(int32_t deviceId, int code) const
-{
-    AutoMutex _l(mLock);
-    device_t* device = getDevice(deviceId);
-    if (device == NULL) return -1;
-    
-    if (code >= 0 && code <= KEY_MAX) {
-        uint8_t key_bitmask[(KEY_MAX+7)/8];
-        memset(key_bitmask, 0, sizeof(key_bitmask));
-        if (ioctl(mFDs[id_to_index(device->id)].fd,
-                   EVIOCGKEY(sizeof(key_bitmask)), key_bitmask) >= 0) {
-            return test_bit(code, key_bitmask) ? 1 : 0;
-        }
-    }
-    
-    return -1;
-}
-
-int EventHub::getKeycodeState(int code) const
-{
-    return getKeycodeState(mFirstKeyboardId, code);
-}
-
-int EventHub::getKeycodeState(int32_t deviceId, int code) const
-{
-    AutoMutex _l(mLock);
-    device_t* device = getDevice(deviceId);
-    if (device == NULL || device->layoutMap == NULL) return -1;
-    
+int32_t EventHub::getKeyCodeStateLocked(device_t* device, int32_t keyCode) const {
     Vector<int32_t> scanCodes;
-    device->layoutMap->findScancodes(code, &scanCodes);
-    
-    uint8_t key_bitmask[(KEY_MAX+7)/8];
+    device->layoutMap->findScancodes(keyCode, &scanCodes);
+
+    uint8_t key_bitmask[sizeof_bit_array(KEY_MAX + 1)];
     memset(key_bitmask, 0, sizeof(key_bitmask));
     if (ioctl(mFDs[id_to_index(device->id)].fd,
                EVIOCGKEY(sizeof(key_bitmask)), key_bitmask) >= 0) {
@@ -239,12 +235,45 @@
             int32_t sc = scanCodes.itemAt(i);
             //LOGI("Code %d: down=%d", sc, test_bit(sc, key_bitmask));
             if (sc >= 0 && sc <= KEY_MAX && test_bit(sc, key_bitmask)) {
-                return 1;
+                return AKEY_STATE_DOWN;
             }
         }
+        return AKEY_STATE_UP;
     }
-    
-    return 0;
+    return AKEY_STATE_UNKNOWN;
+}
+
+int32_t EventHub::getSwitchState(int32_t deviceId, int32_t deviceClasses, int32_t sw) const {
+#ifdef EV_SW
+    if (sw >= 0 && sw <= SW_MAX) {
+        AutoMutex _l(mLock);
+
+        if (deviceId == -1) {
+            deviceId = mSwitches[sw];
+            if (deviceId == 0) {
+                return AKEY_STATE_UNKNOWN;
+            }
+        }
+
+        device_t* device = getDevice(deviceId);
+        if (device == NULL) {
+            return AKEY_STATE_UNKNOWN;
+        }
+
+        return getSwitchStateLocked(device, sw);
+    }
+#endif
+    return AKEY_STATE_UNKNOWN;
+}
+
+int32_t EventHub::getSwitchStateLocked(device_t* device, int32_t sw) const {
+    uint8_t sw_bitmask[sizeof_bit_array(SW_MAX + 1)];
+    memset(sw_bitmask, 0, sizeof(sw_bitmask));
+    if (ioctl(mFDs[id_to_index(device->id)].fd,
+               EVIOCGSW(sizeof(sw_bitmask)), sw_bitmask) >= 0) {
+        return test_bit(sw, sw_bitmask) ? AKEY_STATE_DOWN : AKEY_STATE_UP;
+    }
+    return AKEY_STATE_UNKNOWN;
 }
 
 status_t EventHub::scancodeToKeycode(int32_t deviceId, int scancode,
@@ -309,9 +338,6 @@
 
     status_t err;
 
-    fd_set readfds;
-    int maxFd = -1;
-    int cc;
     int i;
     int res;
     int pollres;
@@ -386,7 +412,7 @@
                             LOGV("iev.code=%d outKeycode=%d outFlags=0x%08x err=%d\n",
                                 iev.code, *outKeycode, *outFlags, err);
                             if (err != 0) {
-                                *outKeycode = 0;
+                                *outKeycode = AKEYCODE_UNKNOWN;
                                 *outFlags = 0;
                             }
                         } else {
@@ -457,7 +483,7 @@
  * Inspect the known devices to determine whether physical keys exist for the given
  * framework-domain key codes.
  */
-bool EventHub::hasKeys(size_t numCodes, int32_t* keyCodes, uint8_t* outFlags) {
+bool EventHub::hasKeys(size_t numCodes, const int32_t* keyCodes, uint8_t* outFlags) const {
     for (size_t codeIndex = 0; codeIndex < numCodes; codeIndex++) {
         outFlags[codeIndex] = 0;
 
@@ -465,7 +491,8 @@
         Vector<int32_t> scanCodes;
         for (int n = 0; (n < mFDCount) && (outFlags[codeIndex] == 0); n++) {
             if (mDevices[n]) {
-                status_t err = mDevices[n]->layoutMap->findScancodes(keyCodes[codeIndex], &scanCodes);
+                status_t err = mDevices[n]->layoutMap->findScancodes(
+                        keyCodes[codeIndex], &scanCodes);
                 if (!err) {
                     // check the possible scan codes identified by the layout map against the
                     // map of codes actually emitted by the driver
@@ -485,6 +512,26 @@
 
 // ----------------------------------------------------------------------------
 
+static bool containsNonZeroByte(const uint8_t* array, uint32_t startIndex, uint32_t endIndex) {
+    const uint8_t* end = array + endIndex;
+    array += startIndex;
+    while (array != end) {
+        if (*(array++) != 0) {
+            return true;
+        }
+    }
+    return false;
+}
+
+static const int32_t GAMEPAD_KEYCODES[] = {
+        AKEYCODE_BUTTON_A, AKEYCODE_BUTTON_B, AKEYCODE_BUTTON_C,
+        AKEYCODE_BUTTON_X, AKEYCODE_BUTTON_Y, AKEYCODE_BUTTON_Z,
+        AKEYCODE_BUTTON_L1, AKEYCODE_BUTTON_R1,
+        AKEYCODE_BUTTON_L2, AKEYCODE_BUTTON_R2,
+        AKEYCODE_BUTTON_THUMBL, AKEYCODE_BUTTON_THUMBR,
+        AKEYCODE_BUTTON_START, AKEYCODE_BUTTON_SELECT, AKEYCODE_BUTTON_MODE
+};
+
 int EventHub::open_device(const char *deviceName)
 {
     int version;
@@ -602,27 +649,27 @@
     mFDs[mFDCount].fd = fd;
     mFDs[mFDCount].events = POLLIN;
 
-    // figure out the kinds of events the device reports
+    // Figure out the kinds of events the device reports.
     
-    // See if this is a keyboard, and classify it.  Note that we only
-    // consider up through the function keys; we don't want to include
-    // ones after that (play cd etc) so we don't mistakenly consider a
-    // controller to be a keyboard.
-    uint8_t key_bitmask[(KEY_MAX+7)/8];
+    uint8_t key_bitmask[sizeof_bit_array(KEY_MAX + 1)];
     memset(key_bitmask, 0, sizeof(key_bitmask));
+
     LOGV("Getting keys...");
     if (ioctl(fd, EVIOCGBIT(EV_KEY, sizeof(key_bitmask)), key_bitmask) >= 0) {
         //LOGI("MAP\n");
-        //for (int i=0; i<((KEY_MAX+7)/8); i++) {
+        //for (int i = 0; i < sizeof(key_bitmask); i++) {
         //    LOGI("%d: 0x%02x\n", i, key_bitmask[i]);
         //}
-        for (int i=0; i<((BTN_MISC+7)/8); i++) {
-            if (key_bitmask[i] != 0) {
-                device->classes |= CLASS_KEYBOARD;
-                break;
-            }
-        }
-        if ((device->classes & CLASS_KEYBOARD) != 0) {
+
+        // See if this is a keyboard.  Ignore everything in the button range except for
+        // gamepads which are also considered keyboards.
+        if (containsNonZeroByte(key_bitmask, 0, sizeof_bit_array(BTN_MISC))
+                || containsNonZeroByte(key_bitmask, sizeof_bit_array(BTN_GAMEPAD),
+                        sizeof_bit_array(BTN_DIGI))
+                || containsNonZeroByte(key_bitmask, sizeof_bit_array(KEY_OK),
+                        sizeof_bit_array(KEY_MAX + 1))) {
+            device->classes |= INPUT_DEVICE_CLASS_KEYBOARD;
+
             device->keyBitmask = new uint8_t[sizeof(key_bitmask)];
             if (device->keyBitmask != NULL) {
                 memcpy(device->keyBitmask, key_bitmask, sizeof(key_bitmask));
@@ -634,39 +681,39 @@
         }
     }
     
-    // See if this is a trackball.
+    // See if this is a trackball (or mouse).
     if (test_bit(BTN_MOUSE, key_bitmask)) {
-        uint8_t rel_bitmask[(REL_MAX+7)/8];
+        uint8_t rel_bitmask[sizeof_bit_array(REL_MAX + 1)];
         memset(rel_bitmask, 0, sizeof(rel_bitmask));
         LOGV("Getting relative controllers...");
-        if (ioctl(fd, EVIOCGBIT(EV_REL, sizeof(rel_bitmask)), rel_bitmask) >= 0)
-        {
+        if (ioctl(fd, EVIOCGBIT(EV_REL, sizeof(rel_bitmask)), rel_bitmask) >= 0) {
             if (test_bit(REL_X, rel_bitmask) && test_bit(REL_Y, rel_bitmask)) {
-                device->classes |= CLASS_TRACKBALL;
+                device->classes |= INPUT_DEVICE_CLASS_TRACKBALL;
             }
         }
     }
-    
-    uint8_t abs_bitmask[(ABS_MAX+7)/8];
+
+    // See if this is a touch pad.
+    uint8_t abs_bitmask[sizeof_bit_array(ABS_MAX + 1)];
     memset(abs_bitmask, 0, sizeof(abs_bitmask));
     LOGV("Getting absolute controllers...");
-    ioctl(fd, EVIOCGBIT(EV_ABS, sizeof(abs_bitmask)), abs_bitmask);
-    
-    // Is this a new modern multi-touch driver?
-    if (test_bit(ABS_MT_TOUCH_MAJOR, abs_bitmask)
-            && test_bit(ABS_MT_POSITION_X, abs_bitmask)
-            && test_bit(ABS_MT_POSITION_Y, abs_bitmask)) {
-        device->classes |= CLASS_TOUCHSCREEN | CLASS_TOUCHSCREEN_MT;
-        
-    // Is this an old style single-touch driver?
-    } else if (test_bit(BTN_TOUCH, key_bitmask)
-            && test_bit(ABS_X, abs_bitmask) && test_bit(ABS_Y, abs_bitmask)) {
-        device->classes |= CLASS_TOUCHSCREEN;
+    if (ioctl(fd, EVIOCGBIT(EV_ABS, sizeof(abs_bitmask)), abs_bitmask) >= 0) {
+        // Is this a new modern multi-touch driver?
+        if (test_bit(ABS_MT_TOUCH_MAJOR, abs_bitmask)
+                && test_bit(ABS_MT_POSITION_X, abs_bitmask)
+                && test_bit(ABS_MT_POSITION_Y, abs_bitmask)) {
+            device->classes |= INPUT_DEVICE_CLASS_TOUCHSCREEN | INPUT_DEVICE_CLASS_TOUCHSCREEN_MT;
+
+        // Is this an old style single-touch driver?
+        } else if (test_bit(BTN_TOUCH, key_bitmask)
+                && test_bit(ABS_X, abs_bitmask) && test_bit(ABS_Y, abs_bitmask)) {
+            device->classes |= INPUT_DEVICE_CLASS_TOUCHSCREEN;
+        }
     }
 
 #ifdef EV_SW
     // figure out the switches this device reports
-    uint8_t sw_bitmask[(SW_MAX+7)/8];
+    uint8_t sw_bitmask[sizeof_bit_array(SW_MAX + 1)];
     memset(sw_bitmask, 0, sizeof(sw_bitmask));
     if (ioctl(fd, EVIOCGBIT(EV_SW, sizeof(sw_bitmask)), sw_bitmask) >= 0) {
         for (int i=0; i<EV_SW; i++) {
@@ -680,7 +727,7 @@
     }
 #endif
 
-    if ((device->classes&CLASS_KEYBOARD) != 0) {
+    if ((device->classes & INPUT_DEVICE_CLASS_KEYBOARD) != 0) {
         char tmpfn[sizeof(name)];
         char keylayoutFilename[300];
 
@@ -702,7 +749,10 @@
                      "%s/usr/keylayout/%s", root, "qwerty.kl");
             defaultKeymap = true;
         }
-        device->layoutMap->load(keylayoutFilename);
+        status_t status = device->layoutMap->load(keylayoutFilename);
+        if (status) {
+            LOGE("Error %d loading key layout.", status);
+        }
 
         // tell the world about the devname (the descriptive name)
         if (!mHaveFirstKeyboard && !defaultKeymap && strstr(name, "-keypad")) {
@@ -722,19 +772,27 @@
         property_set(propName, name);
 
         // 'Q' key support = cheap test of whether this is an alpha-capable kbd
-        if (hasKeycode(device, kKeyCodeQ)) {
-            device->classes |= CLASS_ALPHAKEY;
+        if (hasKeycode(device, AKEYCODE_Q)) {
+            device->classes |= INPUT_DEVICE_CLASS_ALPHAKEY;
         }
         
-        // See if this has a DPAD.
-        if (hasKeycode(device, kKeyCodeDpadUp) &&
-                hasKeycode(device, kKeyCodeDpadDown) &&
-                hasKeycode(device, kKeyCodeDpadLeft) &&
-                hasKeycode(device, kKeyCodeDpadRight) &&
-                hasKeycode(device, kKeyCodeDpadCenter)) {
-            device->classes |= CLASS_DPAD;
+        // See if this device has a DPAD.
+        if (hasKeycode(device, AKEYCODE_DPAD_UP) &&
+                hasKeycode(device, AKEYCODE_DPAD_DOWN) &&
+                hasKeycode(device, AKEYCODE_DPAD_LEFT) &&
+                hasKeycode(device, AKEYCODE_DPAD_RIGHT) &&
+                hasKeycode(device, AKEYCODE_DPAD_CENTER)) {
+            device->classes |= INPUT_DEVICE_CLASS_DPAD;
         }
         
+        // See if this device has a gamepad.
+        for (size_t i = 0; i < sizeof(GAMEPAD_KEYCODES); i++) {
+            if (hasKeycode(device, GAMEPAD_KEYCODES[i])) {
+                device->classes |= INPUT_DEVICE_CLASS_GAMEPAD;
+                break;
+            }
+        }
+
         LOGI("New keyboard: device->id=0x%x devname='%s' propName='%s' keylayout='%s'\n",
                 device->id, name, propName, keylayoutFilename);
     }
diff --git a/libs/ui/FramebufferNativeWindow.cpp b/libs/ui/FramebufferNativeWindow.cpp
index 52380a0..6f8948d 100644
--- a/libs/ui/FramebufferNativeWindow.cpp
+++ b/libs/ui/FramebufferNativeWindow.cpp
@@ -67,7 +67,7 @@
  * This implements the (main) framebuffer management. This class is used
  * mostly by SurfaceFlinger, but also by command line GL application.
  * 
- * In fact this is an implementation of android_native_window_t on top of
+ * In fact this is an implementation of ANativeWindow on top of
  * the framebuffer.
  * 
  * Currently it is pretty simple, it manages only two buffers (the front and 
@@ -117,23 +117,23 @@
         LOGE_IF(err, "fb buffer 1 allocation failed w=%d, h=%d, err=%s",
                 fbDev->width, fbDev->height, strerror(-err));
 
-        const_cast<uint32_t&>(android_native_window_t::flags) = fbDev->flags; 
-        const_cast<float&>(android_native_window_t::xdpi) = fbDev->xdpi;
-        const_cast<float&>(android_native_window_t::ydpi) = fbDev->ydpi;
-        const_cast<int&>(android_native_window_t::minSwapInterval) = 
+        const_cast<uint32_t&>(ANativeWindow::flags) = fbDev->flags; 
+        const_cast<float&>(ANativeWindow::xdpi) = fbDev->xdpi;
+        const_cast<float&>(ANativeWindow::ydpi) = fbDev->ydpi;
+        const_cast<int&>(ANativeWindow::minSwapInterval) = 
             fbDev->minSwapInterval;
-        const_cast<int&>(android_native_window_t::maxSwapInterval) = 
+        const_cast<int&>(ANativeWindow::maxSwapInterval) = 
             fbDev->maxSwapInterval;
     } else {
         LOGE("Couldn't get gralloc module");
     }
 
-    android_native_window_t::setSwapInterval = setSwapInterval;
-    android_native_window_t::dequeueBuffer = dequeueBuffer;
-    android_native_window_t::lockBuffer = lockBuffer;
-    android_native_window_t::queueBuffer = queueBuffer;
-    android_native_window_t::query = query;
-    android_native_window_t::perform = perform;
+    ANativeWindow::setSwapInterval = setSwapInterval;
+    ANativeWindow::dequeueBuffer = dequeueBuffer;
+    ANativeWindow::lockBuffer = lockBuffer;
+    ANativeWindow::queueBuffer = queueBuffer;
+    ANativeWindow::query = query;
+    ANativeWindow::perform = perform;
 }
 
 FramebufferNativeWindow::~FramebufferNativeWindow() 
@@ -168,13 +168,13 @@
 }
 
 int FramebufferNativeWindow::setSwapInterval(
-        android_native_window_t* window, int interval) 
+        ANativeWindow* window, int interval) 
 {
     framebuffer_device_t* fb = getSelf(window)->fbDev;
     return fb->setSwapInterval(fb, interval);
 }
 
-int FramebufferNativeWindow::dequeueBuffer(android_native_window_t* window, 
+int FramebufferNativeWindow::dequeueBuffer(ANativeWindow* window, 
         android_native_buffer_t** buffer)
 {
     FramebufferNativeWindow* self = getSelf(window);
@@ -196,7 +196,7 @@
     return 0;
 }
 
-int FramebufferNativeWindow::lockBuffer(android_native_window_t* window, 
+int FramebufferNativeWindow::lockBuffer(ANativeWindow* window, 
         android_native_buffer_t* buffer)
 {
     FramebufferNativeWindow* self = getSelf(window);
@@ -210,7 +210,7 @@
     return NO_ERROR;
 }
 
-int FramebufferNativeWindow::queueBuffer(android_native_window_t* window, 
+int FramebufferNativeWindow::queueBuffer(ANativeWindow* window, 
         android_native_buffer_t* buffer)
 {
     FramebufferNativeWindow* self = getSelf(window);
@@ -224,7 +224,7 @@
     return res;
 }
 
-int FramebufferNativeWindow::query(android_native_window_t* window,
+int FramebufferNativeWindow::query(ANativeWindow* window,
         int what, int* value) 
 {
     FramebufferNativeWindow* self = getSelf(window);
@@ -245,7 +245,7 @@
     return BAD_VALUE;
 }
 
-int FramebufferNativeWindow::perform(android_native_window_t* window,
+int FramebufferNativeWindow::perform(ANativeWindow* window,
         int operation, ...)
 {
     switch (operation) {
diff --git a/libs/ui/GraphicBuffer.cpp b/libs/ui/GraphicBuffer.cpp
index ba1fd9c..519c277 100644
--- a/libs/ui/GraphicBuffer.cpp
+++ b/libs/ui/GraphicBuffer.cpp
@@ -38,7 +38,7 @@
 
 GraphicBuffer::GraphicBuffer()
     : BASE(), mOwner(ownData), mBufferMapper(GraphicBufferMapper::get()),
-      mInitCheck(NO_ERROR),  mVStride(0), mIndex(-1)
+      mInitCheck(NO_ERROR), mIndex(-1)
 {
     width  = 
     height = 
@@ -51,7 +51,7 @@
 GraphicBuffer::GraphicBuffer(uint32_t w, uint32_t h, 
         PixelFormat reqFormat, uint32_t reqUsage)
     : BASE(), mOwner(ownData), mBufferMapper(GraphicBufferMapper::get()),
-      mInitCheck(NO_ERROR),  mVStride(0), mIndex(-1)
+      mInitCheck(NO_ERROR), mIndex(-1)
 {
     width  = 
     height = 
@@ -67,7 +67,7 @@
         uint32_t inStride, native_handle_t* inHandle, bool keepOwnership)
     : BASE(), mOwner(keepOwnership ? ownHandle : ownNone),
       mBufferMapper(GraphicBufferMapper::get()),
-      mInitCheck(NO_ERROR),  mVStride(0), mIndex(-1)
+      mInitCheck(NO_ERROR), mIndex(-1)
 {
     width  = w;
     height = h;
@@ -111,6 +111,9 @@
     if (mOwner != ownData)
         return INVALID_OPERATION;
 
+    if (handle && w==width && h==height && f==format && reqUsage==usage)
+        return NO_ERROR;
+
     if (handle) {
         GraphicBufferAllocator& allocator(GraphicBufferAllocator::get());
         allocator.free(handle);
@@ -122,9 +125,6 @@
 status_t GraphicBuffer::initSize(uint32_t w, uint32_t h, PixelFormat format,
         uint32_t reqUsage)
 {
-    if (format == PIXEL_FORMAT_RGBX_8888)
-        format = PIXEL_FORMAT_RGBA_8888;
-
     GraphicBufferAllocator& allocator = GraphicBufferAllocator::get();
     status_t err = allocator.alloc(w, h, format, reqUsage, &handle, &stride);
     if (err == NO_ERROR) {
@@ -132,7 +132,6 @@
         this->height = h;
         this->format = format;
         this->usage  = reqUsage;
-        mVStride = 0;
     }
     return err;
 }
@@ -173,7 +172,6 @@
         sur->height = height;
         sur->stride = stride;
         sur->format = format;
-        sur->vstride = mVStride;
         sur->data = static_cast<GGLubyte*>(vaddr);
     }
     return res;
@@ -267,14 +265,6 @@
     return mIndex;
 }
 
-void GraphicBuffer::setVerticalStride(uint32_t vstride) {
-    mVStride = vstride;
-}
-
-uint32_t GraphicBuffer::getVerticalStride() const {
-    return mVStride;
-}
-
 // ---------------------------------------------------------------------------
 
 }; // namespace android
diff --git a/libs/ui/GraphicBufferAllocator.cpp b/libs/ui/GraphicBufferAllocator.cpp
index 6ae7e74..d51664d 100644
--- a/libs/ui/GraphicBufferAllocator.cpp
+++ b/libs/ui/GraphicBufferAllocator.cpp
@@ -15,6 +15,8 @@
 ** limitations under the License.
 */
 
+#define LOG_TAG "GraphicBufferAllocator"
+
 #include <cutils/log.h>
 
 #include <utils/Singleton.h>
@@ -61,9 +63,9 @@
     const size_t c = list.size();
     for (size_t i=0 ; i<c ; i++) {
         const alloc_rec_t& rec(list.valueAt(i));
-        snprintf(buffer, SIZE, "%10p: %7.2f KiB | %4u x %4u | %2d | 0x%08x\n",
+        snprintf(buffer, SIZE, "%10p: %7.2f KiB | %4u (%4u) x %4u | %2d | 0x%08x\n",
             list.keyAt(i), rec.size/1024.0f, 
-            rec.w, rec.h, rec.format, rec.usage);
+            rec.w, rec.s, rec.h, rec.format, rec.usage);
         result.append(buffer);
         total += rec.size;
     }
@@ -71,16 +73,13 @@
     result.append(buffer);
 }
 
-static inline uint32_t clamp(uint32_t c) {
-    return c>0 ? c : 1;
-}
-
 status_t GraphicBufferAllocator::alloc(uint32_t w, uint32_t h, PixelFormat format,
         int usage, buffer_handle_t* handle, int32_t* stride)
 {
-    // make sure to not allocate a 0 x 0 buffer
-    w = clamp(w);
-    h = clamp(h);
+    // make sure to not allocate a N x 0 or 0 x N buffer, since this is
+    // allowed from an API stand-point allocate a 1x1 buffer instead.
+    if (!w || !h)
+        w = h = 1;
 
     // we have a h/w allocator and h/w buffer is requested
     status_t err; 
@@ -100,9 +99,9 @@
         alloc_rec_t rec;
         rec.w = w;
         rec.h = h;
+        rec.s = *stride;
         rec.format = format;
         rec.usage = usage;
-        rec.vaddr = 0;
         rec.size = h * stride[0] * bytesPerPixel(format);
         list.add(*handle, rec);
     } else {
diff --git a/libs/ui/Input.cpp b/libs/ui/Input.cpp
new file mode 100644
index 0000000..5253c72
--- /dev/null
+++ b/libs/ui/Input.cpp
@@ -0,0 +1,171 @@
+//
+// Copyright 2010 The Android Open Source Project
+//
+// Provides a pipe-based transport for native events in the NDK.
+//
+#define LOG_TAG "Input"
+
+//#define LOG_NDEBUG 0
+
+#include <ui/Input.h>
+
+namespace android {
+
+// class InputEvent
+
+void InputEvent::initialize(int32_t deviceId, int32_t source) {
+    mDeviceId = deviceId;
+    mSource = source;
+}
+
+void InputEvent::initialize(const InputEvent& from) {
+    mDeviceId = from.mDeviceId;
+    mSource = from.mSource;
+}
+
+// class KeyEvent
+
+bool KeyEvent::hasDefaultAction(int32_t keyCode) {
+    switch (keyCode) {
+        case AKEYCODE_HOME:
+        case AKEYCODE_BACK:
+        case AKEYCODE_CALL:
+        case AKEYCODE_ENDCALL:
+        case AKEYCODE_VOLUME_UP:
+        case AKEYCODE_VOLUME_DOWN:
+        case AKEYCODE_POWER:
+        case AKEYCODE_CAMERA:
+        case AKEYCODE_HEADSETHOOK:
+        case AKEYCODE_MENU:
+        case AKEYCODE_NOTIFICATION:
+        case AKEYCODE_FOCUS:
+        case AKEYCODE_SEARCH:
+        case AKEYCODE_MEDIA_PLAY_PAUSE:
+        case AKEYCODE_MEDIA_STOP:
+        case AKEYCODE_MEDIA_NEXT:
+        case AKEYCODE_MEDIA_PREVIOUS:
+        case AKEYCODE_MEDIA_REWIND:
+        case AKEYCODE_MEDIA_FAST_FORWARD:
+        case AKEYCODE_MUTE:
+            return true;
+    }
+    
+    return false;
+}
+
+bool KeyEvent::hasDefaultAction() const {
+    return hasDefaultAction(getKeyCode());
+}
+
+bool KeyEvent::isSystemKey(int32_t keyCode) {
+    switch (keyCode) {
+        case AKEYCODE_MENU:
+        case AKEYCODE_SOFT_RIGHT:
+        case AKEYCODE_HOME:
+        case AKEYCODE_BACK:
+        case AKEYCODE_CALL:
+        case AKEYCODE_ENDCALL:
+        case AKEYCODE_VOLUME_UP:
+        case AKEYCODE_VOLUME_DOWN:
+        case AKEYCODE_MUTE:
+        case AKEYCODE_POWER:
+        case AKEYCODE_HEADSETHOOK:
+        case AKEYCODE_MEDIA_PLAY_PAUSE:
+        case AKEYCODE_MEDIA_STOP:
+        case AKEYCODE_MEDIA_NEXT:
+        case AKEYCODE_MEDIA_PREVIOUS:
+        case AKEYCODE_MEDIA_REWIND:
+        case AKEYCODE_MEDIA_FAST_FORWARD:
+        case AKEYCODE_CAMERA:
+        case AKEYCODE_FOCUS:
+        case AKEYCODE_SEARCH:
+            return true;
+    }
+    
+    return false;
+}
+
+bool KeyEvent::isSystemKey() const {
+    return isSystemKey(getKeyCode());
+}
+
+void KeyEvent::initialize(
+        int32_t deviceId,
+        int32_t source,
+        int32_t action,
+        int32_t flags,
+        int32_t keyCode,
+        int32_t scanCode,
+        int32_t metaState,
+        int32_t repeatCount,
+        nsecs_t downTime,
+        nsecs_t eventTime) {
+    InputEvent::initialize(deviceId, source);
+    mAction = action;
+    mFlags = flags;
+    mKeyCode = keyCode;
+    mScanCode = scanCode;
+    mMetaState = metaState;
+    mRepeatCount = repeatCount;
+    mDownTime = downTime;
+    mEventTime = eventTime;
+}
+
+void KeyEvent::initialize(const KeyEvent& from) {
+    InputEvent::initialize(from);
+    mAction = from.mAction;
+    mFlags = from.mFlags;
+    mKeyCode = from.mKeyCode;
+    mScanCode = from.mScanCode;
+    mMetaState = from.mMetaState;
+    mRepeatCount = from.mRepeatCount;
+    mDownTime = from.mDownTime;
+    mEventTime = from.mEventTime;
+}
+
+// class MotionEvent
+
+void MotionEvent::initialize(
+        int32_t deviceId,
+        int32_t source,
+        int32_t action,
+        int32_t edgeFlags,
+        int32_t metaState,
+        float xOffset,
+        float yOffset,
+        float xPrecision,
+        float yPrecision,
+        nsecs_t downTime,
+        nsecs_t eventTime,
+        size_t pointerCount,
+        const int32_t* pointerIds,
+        const PointerCoords* pointerCoords) {
+    InputEvent::initialize(deviceId, source);
+    mAction = action;
+    mEdgeFlags = edgeFlags;
+    mMetaState = metaState;
+    mXOffset = xOffset;
+    mYOffset = yOffset;
+    mXPrecision = xPrecision;
+    mYPrecision = yPrecision;
+    mDownTime = downTime;
+    mPointerIds.clear();
+    mPointerIds.appendArray(pointerIds, pointerCount);
+    mSampleEventTimes.clear();
+    mSamplePointerCoords.clear();
+    addSample(eventTime, pointerCoords);
+}
+
+void MotionEvent::addSample(
+        int64_t eventTime,
+        const PointerCoords* pointerCoords) {
+    mSampleEventTimes.push(eventTime);
+    mSamplePointerCoords.appendArray(pointerCoords, getPointerCount());
+}
+
+void MotionEvent::offsetLocation(float xOffset, float yOffset) {
+    mXOffset += xOffset;
+    mYOffset += yOffset;
+}
+
+} // namespace android
diff --git a/libs/ui/InputDevice.cpp b/libs/ui/InputDevice.cpp
new file mode 100644
index 0000000..b2a4d6c
--- /dev/null
+++ b/libs/ui/InputDevice.cpp
@@ -0,0 +1,729 @@
+//
+// Copyright 2010 The Android Open Source Project
+//
+// The input reader.
+//
+#define LOG_TAG "InputDevice"
+
+//#define LOG_NDEBUG 0
+
+// Log debug messages for each raw event received from the EventHub.
+#define DEBUG_RAW_EVENTS 0
+
+// Log debug messages about touch screen filtering hacks.
+#define DEBUG_HACKS 0
+
+// Log debug messages about virtual key processing.
+#define DEBUG_VIRTUAL_KEYS 0
+
+// Log debug messages about pointers.
+#define DEBUG_POINTERS 0
+
+// Log debug messages about pointer assignment calculations.
+#define DEBUG_POINTER_ASSIGNMENT 0
+
+#include <cutils/log.h>
+#include <ui/InputDevice.h>
+
+#include <stddef.h>
+#include <unistd.h>
+#include <errno.h>
+#include <limits.h>
+
+/* Slop distance for jumpy pointer detection.
+ * The vertical range of the screen divided by this is our epsilon value. */
+#define JUMPY_EPSILON_DIVISOR 212
+
+/* Number of jumpy points to drop for touchscreens that need it. */
+#define JUMPY_TRANSITION_DROPS 3
+#define JUMPY_DROP_LIMIT 3
+
+/* Maximum squared distance for averaging.
+ * If moving farther than this, turn of averaging to avoid lag in response. */
+#define AVERAGING_DISTANCE_LIMIT (75 * 75)
+
+
+namespace android {
+
+// --- Static Functions ---
+
+template<typename T>
+inline static T abs(const T& value) {
+    return value < 0 ? - value : value;
+}
+
+template<typename T>
+inline static T min(const T& a, const T& b) {
+    return a < b ? a : b;
+}
+
+template<typename T>
+inline static void swap(T& a, T& b) {
+    T temp = a;
+    a = b;
+    b = temp;
+}
+
+
+// --- InputDevice ---
+
+InputDevice::InputDevice(int32_t id, uint32_t classes, String8 name) :
+    id(id), classes(classes), name(name), ignored(false) {
+}
+
+void InputDevice::reset() {
+    if (isKeyboard()) {
+        keyboard.reset();
+    }
+
+    if (isTrackball()) {
+        trackball.reset();
+    }
+
+    if (isMultiTouchScreen()) {
+        multiTouchScreen.reset();
+    } else if (isSingleTouchScreen()) {
+        singleTouchScreen.reset();
+    }
+
+    if (isTouchScreen()) {
+        touchScreen.reset();
+    }
+}
+
+
+// --- InputDevice::TouchData ---
+
+void InputDevice::TouchData::copyFrom(const TouchData& other) {
+    pointerCount = other.pointerCount;
+    idBits = other.idBits;
+
+    for (uint32_t i = 0; i < pointerCount; i++) {
+        pointers[i] = other.pointers[i];
+        idToIndex[i] = other.idToIndex[i];
+    }
+}
+
+
+// --- InputDevice::KeyboardState ---
+
+void InputDevice::KeyboardState::reset() {
+    current.metaState = AMETA_NONE;
+    current.downTime = 0;
+}
+
+
+// --- InputDevice::TrackballState ---
+
+void InputDevice::TrackballState::reset() {
+    accumulator.clear();
+    current.down = false;
+    current.downTime = 0;
+}
+
+
+// --- InputDevice::TouchScreenState ---
+
+void InputDevice::TouchScreenState::reset() {
+    lastTouch.clear();
+    downTime = 0;
+    currentVirtualKey.status = CurrentVirtualKeyState::STATUS_UP;
+
+    for (uint32_t i = 0; i < MAX_POINTERS; i++) {
+        averagingTouchFilter.historyStart[i] = 0;
+        averagingTouchFilter.historyEnd[i] = 0;
+    }
+
+    jumpyTouchFilter.jumpyPointsDropped = 0;
+}
+
+struct PointerDistanceHeapElement {
+    uint32_t currentPointerIndex : 8;
+    uint32_t lastPointerIndex : 8;
+    uint64_t distance : 48; // squared distance
+};
+
+void InputDevice::TouchScreenState::calculatePointerIds() {
+    uint32_t currentPointerCount = currentTouch.pointerCount;
+    uint32_t lastPointerCount = lastTouch.pointerCount;
+
+    if (currentPointerCount == 0) {
+        // No pointers to assign.
+        currentTouch.idBits.clear();
+    } else if (lastPointerCount == 0) {
+        // All pointers are new.
+        currentTouch.idBits.clear();
+        for (uint32_t i = 0; i < currentPointerCount; i++) {
+            currentTouch.pointers[i].id = i;
+            currentTouch.idToIndex[i] = i;
+            currentTouch.idBits.markBit(i);
+        }
+    } else if (currentPointerCount == 1 && lastPointerCount == 1) {
+        // Only one pointer and no change in count so it must have the same id as before.
+        uint32_t id = lastTouch.pointers[0].id;
+        currentTouch.pointers[0].id = id;
+        currentTouch.idToIndex[id] = 0;
+        currentTouch.idBits.value = BitSet32::valueForBit(id);
+    } else {
+        // General case.
+        // We build a heap of squared euclidean distances between current and last pointers
+        // associated with the current and last pointer indices.  Then, we find the best
+        // match (by distance) for each current pointer.
+        PointerDistanceHeapElement heap[MAX_POINTERS * MAX_POINTERS];
+
+        uint32_t heapSize = 0;
+        for (uint32_t currentPointerIndex = 0; currentPointerIndex < currentPointerCount;
+                currentPointerIndex++) {
+            for (uint32_t lastPointerIndex = 0; lastPointerIndex < lastPointerCount;
+                    lastPointerIndex++) {
+                int64_t deltaX = currentTouch.pointers[currentPointerIndex].x
+                        - lastTouch.pointers[lastPointerIndex].x;
+                int64_t deltaY = currentTouch.pointers[currentPointerIndex].y
+                        - lastTouch.pointers[lastPointerIndex].y;
+
+                uint64_t distance = uint64_t(deltaX * deltaX + deltaY * deltaY);
+
+                // Insert new element into the heap (sift up).
+                heap[heapSize].currentPointerIndex = currentPointerIndex;
+                heap[heapSize].lastPointerIndex = lastPointerIndex;
+                heap[heapSize].distance = distance;
+                heapSize += 1;
+            }
+        }
+
+        // Heapify
+        for (uint32_t startIndex = heapSize / 2; startIndex != 0; ) {
+            startIndex -= 1;
+            for (uint32_t parentIndex = startIndex; ;) {
+                uint32_t childIndex = parentIndex * 2 + 1;
+                if (childIndex >= heapSize) {
+                    break;
+                }
+
+                if (childIndex + 1 < heapSize
+                        && heap[childIndex + 1].distance < heap[childIndex].distance) {
+                    childIndex += 1;
+                }
+
+                if (heap[parentIndex].distance <= heap[childIndex].distance) {
+                    break;
+                }
+
+                swap(heap[parentIndex], heap[childIndex]);
+                parentIndex = childIndex;
+            }
+        }
+
+#if DEBUG_POINTER_ASSIGNMENT
+        LOGD("calculatePointerIds - initial distance min-heap: size=%d", heapSize);
+        for (size_t i = 0; i < heapSize; i++) {
+            LOGD("  heap[%d]: cur=%d, last=%d, distance=%lld",
+                    i, heap[i].currentPointerIndex, heap[i].lastPointerIndex,
+                    heap[i].distance);
+        }
+#endif
+
+        // Pull matches out by increasing order of distance.
+        // To avoid reassigning pointers that have already been matched, the loop keeps track
+        // of which last and current pointers have been matched using the matchedXXXBits variables.
+        // It also tracks the used pointer id bits.
+        BitSet32 matchedLastBits(0);
+        BitSet32 matchedCurrentBits(0);
+        BitSet32 usedIdBits(0);
+        bool first = true;
+        for (uint32_t i = min(currentPointerCount, lastPointerCount); i > 0; i--) {
+            for (;;) {
+                if (first) {
+                    // The first time through the loop, we just consume the root element of
+                    // the heap (the one with smallest distance).
+                    first = false;
+                } else {
+                    // Previous iterations consumed the root element of the heap.
+                    // Pop root element off of the heap (sift down).
+                    heapSize -= 1;
+                    assert(heapSize > 0);
+
+                    // Sift down.
+                    heap[0] = heap[heapSize];
+                    for (uint32_t parentIndex = 0; ;) {
+                        uint32_t childIndex = parentIndex * 2 + 1;
+                        if (childIndex >= heapSize) {
+                            break;
+                        }
+
+                        if (childIndex + 1 < heapSize
+                                && heap[childIndex + 1].distance < heap[childIndex].distance) {
+                            childIndex += 1;
+                        }
+
+                        if (heap[parentIndex].distance <= heap[childIndex].distance) {
+                            break;
+                        }
+
+                        swap(heap[parentIndex], heap[childIndex]);
+                        parentIndex = childIndex;
+                    }
+
+#if DEBUG_POINTER_ASSIGNMENT
+                    LOGD("calculatePointerIds - reduced distance min-heap: size=%d", heapSize);
+                    for (size_t i = 0; i < heapSize; i++) {
+                        LOGD("  heap[%d]: cur=%d, last=%d, distance=%lld",
+                                i, heap[i].currentPointerIndex, heap[i].lastPointerIndex,
+                                heap[i].distance);
+                    }
+#endif
+                }
+
+                uint32_t currentPointerIndex = heap[0].currentPointerIndex;
+                if (matchedCurrentBits.hasBit(currentPointerIndex)) continue; // already matched
+
+                uint32_t lastPointerIndex = heap[0].lastPointerIndex;
+                if (matchedLastBits.hasBit(lastPointerIndex)) continue; // already matched
+
+                matchedCurrentBits.markBit(currentPointerIndex);
+                matchedLastBits.markBit(lastPointerIndex);
+
+                uint32_t id = lastTouch.pointers[lastPointerIndex].id;
+                currentTouch.pointers[currentPointerIndex].id = id;
+                currentTouch.idToIndex[id] = currentPointerIndex;
+                usedIdBits.markBit(id);
+
+#if DEBUG_POINTER_ASSIGNMENT
+                LOGD("calculatePointerIds - matched: cur=%d, last=%d, id=%d, distance=%lld",
+                        lastPointerIndex, currentPointerIndex, id, heap[0].distance);
+#endif
+                break;
+            }
+        }
+
+        // Assign fresh ids to new pointers.
+        if (currentPointerCount > lastPointerCount) {
+            for (uint32_t i = currentPointerCount - lastPointerCount; ;) {
+                uint32_t currentPointerIndex = matchedCurrentBits.firstUnmarkedBit();
+                uint32_t id = usedIdBits.firstUnmarkedBit();
+
+                currentTouch.pointers[currentPointerIndex].id = id;
+                currentTouch.idToIndex[id] = currentPointerIndex;
+                usedIdBits.markBit(id);
+
+#if DEBUG_POINTER_ASSIGNMENT
+                LOGD("calculatePointerIds - assigned: cur=%d, id=%d",
+                        currentPointerIndex, id);
+#endif
+
+                if (--i == 0) break; // done
+                matchedCurrentBits.markBit(currentPointerIndex);
+            }
+        }
+
+        // Fix id bits.
+        currentTouch.idBits = usedIdBits;
+    }
+}
+
+/* Special hack for devices that have bad screen data: if one of the
+ * points has moved more than a screen height from the last position,
+ * then drop it. */
+bool InputDevice::TouchScreenState::applyBadTouchFilter() {
+    // This hack requires valid axis parameters.
+    if (! parameters.yAxis.valid) {
+        return false;
+    }
+
+    uint32_t pointerCount = currentTouch.pointerCount;
+
+    // Nothing to do if there are no points.
+    if (pointerCount == 0) {
+        return false;
+    }
+
+    // Don't do anything if a finger is going down or up.  We run
+    // here before assigning pointer IDs, so there isn't a good
+    // way to do per-finger matching.
+    if (pointerCount != lastTouch.pointerCount) {
+        return false;
+    }
+
+    // We consider a single movement across more than a 7/16 of
+    // the long size of the screen to be bad.  This was a magic value
+    // determined by looking at the maximum distance it is feasible
+    // to actually move in one sample.
+    int32_t maxDeltaY = parameters.yAxis.range * 7 / 16;
+
+    // XXX The original code in InputDevice.java included commented out
+    //     code for testing the X axis.  Note that when we drop a point
+    //     we don't actually restore the old X either.  Strange.
+    //     The old code also tries to track when bad points were previously
+    //     detected but it turns out that due to the placement of a "break"
+    //     at the end of the loop, we never set mDroppedBadPoint to true
+    //     so it is effectively dead code.
+    // Need to figure out if the old code is busted or just overcomplicated
+    // but working as intended.
+
+    // Look through all new points and see if any are farther than
+    // acceptable from all previous points.
+    for (uint32_t i = pointerCount; i-- > 0; ) {
+        int32_t y = currentTouch.pointers[i].y;
+        int32_t closestY = INT_MAX;
+        int32_t closestDeltaY = 0;
+
+#if DEBUG_HACKS
+        LOGD("BadTouchFilter: Looking at next point #%d: y=%d", i, y);
+#endif
+
+        for (uint32_t j = pointerCount; j-- > 0; ) {
+            int32_t lastY = lastTouch.pointers[j].y;
+            int32_t deltaY = abs(y - lastY);
+
+#if DEBUG_HACKS
+            LOGD("BadTouchFilter: Comparing with last point #%d: y=%d deltaY=%d",
+                    j, lastY, deltaY);
+#endif
+
+            if (deltaY < maxDeltaY) {
+                goto SkipSufficientlyClosePoint;
+            }
+            if (deltaY < closestDeltaY) {
+                closestDeltaY = deltaY;
+                closestY = lastY;
+            }
+        }
+
+        // Must not have found a close enough match.
+#if DEBUG_HACKS
+        LOGD("BadTouchFilter: Dropping bad point #%d: newY=%d oldY=%d deltaY=%d maxDeltaY=%d",
+                i, y, closestY, closestDeltaY, maxDeltaY);
+#endif
+
+        currentTouch.pointers[i].y = closestY;
+        return true; // XXX original code only corrects one point
+
+    SkipSufficientlyClosePoint: ;
+    }
+
+    // No change.
+    return false;
+}
+
+/* Special hack for devices that have bad screen data: drop points where
+ * the coordinate value for one axis has jumped to the other pointer's location.
+ */
+bool InputDevice::TouchScreenState::applyJumpyTouchFilter() {
+    // This hack requires valid axis parameters.
+    if (! parameters.yAxis.valid) {
+        return false;
+    }
+
+    uint32_t pointerCount = currentTouch.pointerCount;
+    if (lastTouch.pointerCount != pointerCount) {
+#if DEBUG_HACKS
+        LOGD("JumpyTouchFilter: Different pointer count %d -> %d",
+                lastTouch.pointerCount, pointerCount);
+        for (uint32_t i = 0; i < pointerCount; i++) {
+            LOGD("  Pointer %d (%d, %d)", i,
+                    currentTouch.pointers[i].x, currentTouch.pointers[i].y);
+        }
+#endif
+
+        if (jumpyTouchFilter.jumpyPointsDropped < JUMPY_TRANSITION_DROPS) {
+            if (lastTouch.pointerCount == 1 && pointerCount == 2) {
+                // Just drop the first few events going from 1 to 2 pointers.
+                // They're bad often enough that they're not worth considering.
+                currentTouch.pointerCount = 1;
+                jumpyTouchFilter.jumpyPointsDropped += 1;
+
+#if DEBUG_HACKS
+                LOGD("JumpyTouchFilter: Pointer 2 dropped");
+#endif
+                return true;
+            } else if (lastTouch.pointerCount == 2 && pointerCount == 1) {
+                // The event when we go from 2 -> 1 tends to be messed up too
+                currentTouch.pointerCount = 2;
+                currentTouch.pointers[0] = lastTouch.pointers[0];
+                currentTouch.pointers[1] = lastTouch.pointers[1];
+                jumpyTouchFilter.jumpyPointsDropped += 1;
+
+#if DEBUG_HACKS
+                for (int32_t i = 0; i < 2; i++) {
+                    LOGD("JumpyTouchFilter: Pointer %d replaced (%d, %d)", i,
+                            currentTouch.pointers[i].x, currentTouch.pointers[i].y);
+                }
+#endif
+                return true;
+            }
+        }
+        // Reset jumpy points dropped on other transitions or if limit exceeded.
+        jumpyTouchFilter.jumpyPointsDropped = 0;
+
+#if DEBUG_HACKS
+        LOGD("JumpyTouchFilter: Transition - drop limit reset");
+#endif
+        return false;
+    }
+
+    // We have the same number of pointers as last time.
+    // A 'jumpy' point is one where the coordinate value for one axis
+    // has jumped to the other pointer's location. No need to do anything
+    // else if we only have one pointer.
+    if (pointerCount < 2) {
+        return false;
+    }
+
+    if (jumpyTouchFilter.jumpyPointsDropped < JUMPY_DROP_LIMIT) {
+        int jumpyEpsilon = parameters.yAxis.range / JUMPY_EPSILON_DIVISOR;
+
+        // We only replace the single worst jumpy point as characterized by pointer distance
+        // in a single axis.
+        int32_t badPointerIndex = -1;
+        int32_t badPointerReplacementIndex = -1;
+        int32_t badPointerDistance = INT_MIN; // distance to be corrected
+
+        for (uint32_t i = pointerCount; i-- > 0; ) {
+            int32_t x = currentTouch.pointers[i].x;
+            int32_t y = currentTouch.pointers[i].y;
+
+#if DEBUG_HACKS
+            LOGD("JumpyTouchFilter: Point %d (%d, %d)", i, x, y);
+#endif
+
+            // Check if a touch point is too close to another's coordinates
+            bool dropX = false, dropY = false;
+            for (uint32_t j = 0; j < pointerCount; j++) {
+                if (i == j) {
+                    continue;
+                }
+
+                if (abs(x - currentTouch.pointers[j].x) <= jumpyEpsilon) {
+                    dropX = true;
+                    break;
+                }
+
+                if (abs(y - currentTouch.pointers[j].y) <= jumpyEpsilon) {
+                    dropY = true;
+                    break;
+                }
+            }
+            if (! dropX && ! dropY) {
+                continue; // not jumpy
+            }
+
+            // Find a replacement candidate by comparing with older points on the
+            // complementary (non-jumpy) axis.
+            int32_t distance = INT_MIN; // distance to be corrected
+            int32_t replacementIndex = -1;
+
+            if (dropX) {
+                // X looks too close.  Find an older replacement point with a close Y.
+                int32_t smallestDeltaY = INT_MAX;
+                for (uint32_t j = 0; j < pointerCount; j++) {
+                    int32_t deltaY = abs(y - lastTouch.pointers[j].y);
+                    if (deltaY < smallestDeltaY) {
+                        smallestDeltaY = deltaY;
+                        replacementIndex = j;
+                    }
+                }
+                distance = abs(x - lastTouch.pointers[replacementIndex].x);
+            } else {
+                // Y looks too close.  Find an older replacement point with a close X.
+                int32_t smallestDeltaX = INT_MAX;
+                for (uint32_t j = 0; j < pointerCount; j++) {
+                    int32_t deltaX = abs(x - lastTouch.pointers[j].x);
+                    if (deltaX < smallestDeltaX) {
+                        smallestDeltaX = deltaX;
+                        replacementIndex = j;
+                    }
+                }
+                distance = abs(y - lastTouch.pointers[replacementIndex].y);
+            }
+
+            // If replacing this pointer would correct a worse error than the previous ones
+            // considered, then use this replacement instead.
+            if (distance > badPointerDistance) {
+                badPointerIndex = i;
+                badPointerReplacementIndex = replacementIndex;
+                badPointerDistance = distance;
+            }
+        }
+
+        // Correct the jumpy pointer if one was found.
+        if (badPointerIndex >= 0) {
+#if DEBUG_HACKS
+            LOGD("JumpyTouchFilter: Replacing bad pointer %d with (%d, %d)",
+                    badPointerIndex,
+                    lastTouch.pointers[badPointerReplacementIndex].x,
+                    lastTouch.pointers[badPointerReplacementIndex].y);
+#endif
+
+            currentTouch.pointers[badPointerIndex].x =
+                    lastTouch.pointers[badPointerReplacementIndex].x;
+            currentTouch.pointers[badPointerIndex].y =
+                    lastTouch.pointers[badPointerReplacementIndex].y;
+            jumpyTouchFilter.jumpyPointsDropped += 1;
+            return true;
+        }
+    }
+
+    jumpyTouchFilter.jumpyPointsDropped = 0;
+    return false;
+}
+
+/* Special hack for devices that have bad screen data: aggregate and
+ * compute averages of the coordinate data, to reduce the amount of
+ * jitter seen by applications. */
+void InputDevice::TouchScreenState::applyAveragingTouchFilter() {
+    for (uint32_t currentIndex = 0; currentIndex < currentTouch.pointerCount; currentIndex++) {
+        uint32_t id = currentTouch.pointers[currentIndex].id;
+        int32_t x = currentTouch.pointers[currentIndex].x;
+        int32_t y = currentTouch.pointers[currentIndex].y;
+        int32_t pressure = currentTouch.pointers[currentIndex].pressure;
+
+        if (lastTouch.idBits.hasBit(id)) {
+            // Pointer was down before and is still down now.
+            // Compute average over history trace.
+            uint32_t start = averagingTouchFilter.historyStart[id];
+            uint32_t end = averagingTouchFilter.historyEnd[id];
+
+            int64_t deltaX = x - averagingTouchFilter.historyData[end].pointers[id].x;
+            int64_t deltaY = y - averagingTouchFilter.historyData[end].pointers[id].y;
+            uint64_t distance = uint64_t(deltaX * deltaX + deltaY * deltaY);
+
+#if DEBUG_HACKS
+            LOGD("AveragingTouchFilter: Pointer id %d - Distance from last sample: %lld",
+                    id, distance);
+#endif
+
+            if (distance < AVERAGING_DISTANCE_LIMIT) {
+                // Increment end index in preparation for recording new historical data.
+                end += 1;
+                if (end > AVERAGING_HISTORY_SIZE) {
+                    end = 0;
+                }
+
+                // If the end index has looped back to the start index then we have filled
+                // the historical trace up to the desired size so we drop the historical
+                // data at the start of the trace.
+                if (end == start) {
+                    start += 1;
+                    if (start > AVERAGING_HISTORY_SIZE) {
+                        start = 0;
+                    }
+                }
+
+                // Add the raw data to the historical trace.
+                averagingTouchFilter.historyStart[id] = start;
+                averagingTouchFilter.historyEnd[id] = end;
+                averagingTouchFilter.historyData[end].pointers[id].x = x;
+                averagingTouchFilter.historyData[end].pointers[id].y = y;
+                averagingTouchFilter.historyData[end].pointers[id].pressure = pressure;
+
+                // Average over all historical positions in the trace by total pressure.
+                int32_t averagedX = 0;
+                int32_t averagedY = 0;
+                int32_t totalPressure = 0;
+                for (;;) {
+                    int32_t historicalX = averagingTouchFilter.historyData[start].pointers[id].x;
+                    int32_t historicalY = averagingTouchFilter.historyData[start].pointers[id].y;
+                    int32_t historicalPressure = averagingTouchFilter.historyData[start]
+                            .pointers[id].pressure;
+
+                    averagedX += historicalX * historicalPressure;
+                    averagedY += historicalY * historicalPressure;
+                    totalPressure += historicalPressure;
+
+                    if (start == end) {
+                        break;
+                    }
+
+                    start += 1;
+                    if (start > AVERAGING_HISTORY_SIZE) {
+                        start = 0;
+                    }
+                }
+
+                averagedX /= totalPressure;
+                averagedY /= totalPressure;
+
+#if DEBUG_HACKS
+                LOGD("AveragingTouchFilter: Pointer id %d - "
+                        "totalPressure=%d, averagedX=%d, averagedY=%d", id, totalPressure,
+                        averagedX, averagedY);
+#endif
+
+                currentTouch.pointers[currentIndex].x = averagedX;
+                currentTouch.pointers[currentIndex].y = averagedY;
+            } else {
+#if DEBUG_HACKS
+                LOGD("AveragingTouchFilter: Pointer id %d - Exceeded max distance", id);
+#endif
+            }
+        } else {
+#if DEBUG_HACKS
+            LOGD("AveragingTouchFilter: Pointer id %d - Pointer went up", id);
+#endif
+        }
+
+        // Reset pointer history.
+        averagingTouchFilter.historyStart[id] = 0;
+        averagingTouchFilter.historyEnd[id] = 0;
+        averagingTouchFilter.historyData[0].pointers[id].x = x;
+        averagingTouchFilter.historyData[0].pointers[id].y = y;
+        averagingTouchFilter.historyData[0].pointers[id].pressure = pressure;
+    }
+}
+
+bool InputDevice::TouchScreenState::isPointInsideDisplay(int32_t x, int32_t y) const {
+    if (! parameters.xAxis.valid || ! parameters.yAxis.valid) {
+        // Assume all points on a touch screen without valid axis parameters are
+        // inside the display.
+        return true;
+    }
+
+    return x >= parameters.xAxis.minValue
+        && x <= parameters.xAxis.maxValue
+        && y >= parameters.yAxis.minValue
+        && y <= parameters.yAxis.maxValue;
+}
+
+const InputDevice::VirtualKey* InputDevice::TouchScreenState::findVirtualKeyHit() const {
+    int32_t x = currentTouch.pointers[0].x;
+    int32_t y = currentTouch.pointers[0].y;
+    for (size_t i = 0; i < virtualKeys.size(); i++) {
+        const InputDevice::VirtualKey& virtualKey = virtualKeys[i];
+
+#if DEBUG_VIRTUAL_KEYS
+        LOGD("VirtualKeys: Hit test (%d, %d): keyCode=%d, scanCode=%d, "
+                "left=%d, top=%d, right=%d, bottom=%d",
+                x, y,
+                virtualKey.keyCode, virtualKey.scanCode,
+                virtualKey.hitLeft, virtualKey.hitTop,
+                virtualKey.hitRight, virtualKey.hitBottom);
+#endif
+
+        if (virtualKey.isHit(x, y)) {
+            return & virtualKey;
+        }
+    }
+
+    return NULL;
+}
+
+
+// --- InputDevice::SingleTouchScreenState ---
+
+void InputDevice::SingleTouchScreenState::reset() {
+    accumulator.clear();
+    current.down = false;
+    current.x = 0;
+    current.y = 0;
+    current.pressure = 0;
+    current.size = 0;
+}
+
+
+// --- InputDevice::MultiTouchScreenState ---
+
+void InputDevice::MultiTouchScreenState::reset() {
+    accumulator.clear();
+}
+
+} // namespace android
diff --git a/libs/ui/InputDispatcher.cpp b/libs/ui/InputDispatcher.cpp
new file mode 100644
index 0000000..a438c69
--- /dev/null
+++ b/libs/ui/InputDispatcher.cpp
@@ -0,0 +1,1711 @@
+//
+// Copyright 2010 The Android Open Source Project
+//
+// The input dispatcher.
+//
+#define LOG_TAG "InputDispatcher"
+
+//#define LOG_NDEBUG 0
+
+// Log detailed debug messages about each inbound event notification to the dispatcher.
+#define DEBUG_INBOUND_EVENT_DETAILS 0
+
+// Log detailed debug messages about each outbound event processed by the dispatcher.
+#define DEBUG_OUTBOUND_EVENT_DETAILS 0
+
+// Log debug messages about batching.
+#define DEBUG_BATCHING 0
+
+// Log debug messages about the dispatch cycle.
+#define DEBUG_DISPATCH_CYCLE 0
+
+// Log debug messages about registrations.
+#define DEBUG_REGISTRATION 0
+
+// Log debug messages about performance statistics.
+#define DEBUG_PERFORMANCE_STATISTICS 0
+
+// Log debug messages about input event injection.
+#define DEBUG_INJECTION 0
+
+#include <cutils/log.h>
+#include <ui/InputDispatcher.h>
+
+#include <stddef.h>
+#include <unistd.h>
+#include <errno.h>
+#include <limits.h>
+
+namespace android {
+
+// TODO, this needs to be somewhere else, perhaps in the policy
+static inline bool isMovementKey(int32_t keyCode) {
+    return keyCode == AKEYCODE_DPAD_UP
+            || keyCode == AKEYCODE_DPAD_DOWN
+            || keyCode == AKEYCODE_DPAD_LEFT
+            || keyCode == AKEYCODE_DPAD_RIGHT;
+}
+
+static inline nsecs_t now() {
+    return systemTime(SYSTEM_TIME_MONOTONIC);
+}
+
+// --- InputDispatcher ---
+
+InputDispatcher::InputDispatcher(const sp<InputDispatcherPolicyInterface>& policy) :
+    mPolicy(policy) {
+    mPollLoop = new PollLoop(false);
+
+    mInboundQueue.head.refCount = -1;
+    mInboundQueue.head.type = EventEntry::TYPE_SENTINEL;
+    mInboundQueue.head.eventTime = LONG_LONG_MIN;
+
+    mInboundQueue.tail.refCount = -1;
+    mInboundQueue.tail.type = EventEntry::TYPE_SENTINEL;
+    mInboundQueue.tail.eventTime = LONG_LONG_MAX;
+
+    mKeyRepeatState.lastKeyEntry = NULL;
+
+    mCurrentInputTargetsValid = false;
+}
+
+InputDispatcher::~InputDispatcher() {
+    resetKeyRepeatLocked();
+
+    while (mConnectionsByReceiveFd.size() != 0) {
+        unregisterInputChannel(mConnectionsByReceiveFd.valueAt(0)->inputChannel);
+    }
+
+    for (EventEntry* entry = mInboundQueue.head.next; entry != & mInboundQueue.tail; ) {
+        EventEntry* next = entry->next;
+        mAllocator.releaseEventEntry(next);
+        entry = next;
+    }
+}
+
+void InputDispatcher::dispatchOnce() {
+    nsecs_t keyRepeatTimeout = mPolicy->getKeyRepeatTimeout();
+
+    bool skipPoll = false;
+    nsecs_t currentTime;
+    nsecs_t nextWakeupTime = LONG_LONG_MAX;
+    { // acquire lock
+        AutoMutex _l(mLock);
+        currentTime = now();
+
+        // Reset the key repeat timer whenever we disallow key events, even if the next event
+        // is not a key.  This is to ensure that we abort a key repeat if the device is just coming
+        // out of sleep.
+        // XXX we should handle resetting input state coming out of sleep more generally elsewhere
+        if (keyRepeatTimeout < 0) {
+            resetKeyRepeatLocked();
+        }
+
+        // Detect and process timeouts for all connections and determine if there are any
+        // synchronous event dispatches pending.  This step is entirely non-interruptible.
+        bool hasPendingSyncTarget = false;
+        size_t activeConnectionCount = mActiveConnections.size();
+        for (size_t i = 0; i < activeConnectionCount; i++) {
+            Connection* connection = mActiveConnections.itemAt(i);
+
+            if (connection->hasPendingSyncTarget()) {
+                hasPendingSyncTarget = true;
+            }
+
+            nsecs_t connectionTimeoutTime  = connection->nextTimeoutTime;
+            if (connectionTimeoutTime <= currentTime) {
+                mTimedOutConnections.add(connection);
+            } else if (connectionTimeoutTime < nextWakeupTime) {
+                nextWakeupTime = connectionTimeoutTime;
+            }
+        }
+
+        size_t timedOutConnectionCount = mTimedOutConnections.size();
+        for (size_t i = 0; i < timedOutConnectionCount; i++) {
+            Connection* connection = mTimedOutConnections.itemAt(i);
+            timeoutDispatchCycleLocked(currentTime, connection);
+            skipPoll = true;
+        }
+        mTimedOutConnections.clear();
+
+        // If we don't have a pending sync target, then we can begin delivering a new event.
+        // (Otherwise we wait for dispatch to complete for that target.)
+        if (! hasPendingSyncTarget) {
+            if (mInboundQueue.isEmpty()) {
+                if (mKeyRepeatState.lastKeyEntry) {
+                    if (currentTime >= mKeyRepeatState.nextRepeatTime) {
+                        processKeyRepeatLockedInterruptible(currentTime, keyRepeatTimeout);
+                        skipPoll = true;
+                    } else {
+                        if (mKeyRepeatState.nextRepeatTime < nextWakeupTime) {
+                            nextWakeupTime = mKeyRepeatState.nextRepeatTime;
+                        }
+                    }
+                }
+            } else {
+                // Inbound queue has at least one entry.
+                // Start processing it but leave it on the queue until later so that the
+                // input reader can keep appending samples onto a motion event between the
+                // time we started processing it and the time we finally enqueue dispatch
+                // entries for it.
+                EventEntry* entry = mInboundQueue.head.next;
+
+                switch (entry->type) {
+                case EventEntry::TYPE_CONFIGURATION_CHANGED: {
+                    ConfigurationChangedEntry* typedEntry =
+                            static_cast<ConfigurationChangedEntry*>(entry);
+                    processConfigurationChangedLockedInterruptible(currentTime, typedEntry);
+                    break;
+                }
+
+                case EventEntry::TYPE_KEY: {
+                    KeyEntry* typedEntry = static_cast<KeyEntry*>(entry);
+                    processKeyLockedInterruptible(currentTime, typedEntry, keyRepeatTimeout);
+                    break;
+                }
+
+                case EventEntry::TYPE_MOTION: {
+                    MotionEntry* typedEntry = static_cast<MotionEntry*>(entry);
+                    processMotionLockedInterruptible(currentTime, typedEntry);
+                    break;
+                }
+
+                default:
+                    assert(false);
+                    break;
+                }
+
+                // Dequeue and release the event entry that we just processed.
+                mInboundQueue.dequeue(entry);
+                mAllocator.releaseEventEntry(entry);
+                skipPoll = true;
+            }
+        }
+
+        // Run any deferred commands.
+        skipPoll |= runCommandsLockedInterruptible();
+
+        // Wake up synchronization waiters, if needed.
+        if (isFullySynchronizedLocked()) {
+            mFullySynchronizedCondition.broadcast();
+        }
+    } // release lock
+
+    // If we dispatched anything, don't poll just now.  Wait for the next iteration.
+    // Contents may have shifted during flight.
+    if (skipPoll) {
+        return;
+    }
+
+    // Wait for callback or timeout or wake.
+    nsecs_t timeout = nanoseconds_to_milliseconds(nextWakeupTime - currentTime);
+    int32_t timeoutMillis = timeout > INT_MAX ? -1 : timeout > 0 ? int32_t(timeout) : 0;
+    mPollLoop->pollOnce(timeoutMillis);
+}
+
+bool InputDispatcher::runCommandsLockedInterruptible() {
+    if (mCommandQueue.isEmpty()) {
+        return false;
+    }
+
+    do {
+        CommandEntry* commandEntry = mCommandQueue.dequeueAtHead();
+
+        Command command = commandEntry->command;
+        (this->*command)(commandEntry); // commands are implicitly 'LockedInterruptible'
+
+        commandEntry->connection.clear();
+        mAllocator.releaseCommandEntry(commandEntry);
+    } while (! mCommandQueue.isEmpty());
+    return true;
+}
+
+InputDispatcher::CommandEntry* InputDispatcher::postCommandLocked(Command command) {
+    CommandEntry* commandEntry = mAllocator.obtainCommandEntry(command);
+    mCommandQueue.enqueueAtTail(commandEntry);
+    return commandEntry;
+}
+
+void InputDispatcher::processConfigurationChangedLockedInterruptible(
+        nsecs_t currentTime, ConfigurationChangedEntry* entry) {
+#if DEBUG_OUTBOUND_EVENT_DETAILS
+    LOGD("processConfigurationChanged - eventTime=%lld", entry->eventTime);
+#endif
+
+    // Reset key repeating in case a keyboard device was added or removed or something.
+    resetKeyRepeatLocked();
+
+    mLock.unlock();
+
+    mPolicy->notifyConfigurationChanged(entry->eventTime);
+
+    mLock.lock();
+}
+
+void InputDispatcher::processKeyLockedInterruptible(
+        nsecs_t currentTime, KeyEntry* entry, nsecs_t keyRepeatTimeout) {
+#if DEBUG_OUTBOUND_EVENT_DETAILS
+    LOGD("processKey - eventTime=%lld, deviceId=0x%x, source=0x%x, policyFlags=0x%x, action=0x%x, "
+            "flags=0x%x, keyCode=0x%x, scanCode=0x%x, metaState=0x%x, downTime=%lld",
+            entry->eventTime, entry->deviceId, entry->source, entry->policyFlags, entry->action,
+            entry->flags, entry->keyCode, entry->scanCode, entry->metaState,
+            entry->downTime);
+#endif
+
+    if (entry->action == AKEY_EVENT_ACTION_DOWN && ! entry->isInjected()) {
+        if (mKeyRepeatState.lastKeyEntry
+                && mKeyRepeatState.lastKeyEntry->keyCode == entry->keyCode) {
+            // We have seen two identical key downs in a row which indicates that the device
+            // driver is automatically generating key repeats itself.  We take note of the
+            // repeat here, but we disable our own next key repeat timer since it is clear that
+            // we will not need to synthesize key repeats ourselves.
+            entry->repeatCount = mKeyRepeatState.lastKeyEntry->repeatCount + 1;
+            resetKeyRepeatLocked();
+            mKeyRepeatState.nextRepeatTime = LONG_LONG_MAX; // don't generate repeats ourselves
+        } else {
+            // Not a repeat.  Save key down state in case we do see a repeat later.
+            resetKeyRepeatLocked();
+            mKeyRepeatState.nextRepeatTime = entry->eventTime + keyRepeatTimeout;
+        }
+        mKeyRepeatState.lastKeyEntry = entry;
+        entry->refCount += 1;
+    } else {
+        resetKeyRepeatLocked();
+    }
+
+    identifyInputTargetsAndDispatchKeyLockedInterruptible(currentTime, entry);
+}
+
+void InputDispatcher::processKeyRepeatLockedInterruptible(
+        nsecs_t currentTime, nsecs_t keyRepeatTimeout) {
+    KeyEntry* entry = mKeyRepeatState.lastKeyEntry;
+
+    // Search the inbound queue for a key up corresponding to this device.
+    // It doesn't make sense to generate a key repeat event if the key is already up.
+    for (EventEntry* queuedEntry = mInboundQueue.head.next;
+            queuedEntry != & mInboundQueue.tail; queuedEntry = entry->next) {
+        if (queuedEntry->type == EventEntry::TYPE_KEY) {
+            KeyEntry* queuedKeyEntry = static_cast<KeyEntry*>(queuedEntry);
+            if (queuedKeyEntry->deviceId == entry->deviceId
+                    && entry->action == AKEY_EVENT_ACTION_UP) {
+                resetKeyRepeatLocked();
+                return;
+            }
+        }
+    }
+
+    // Synthesize a key repeat after the repeat timeout expired.
+    // Reuse the repeated key entry if it is otherwise unreferenced.
+    uint32_t policyFlags = entry->policyFlags & POLICY_FLAG_RAW_MASK;
+    if (entry->refCount == 1) {
+        entry->eventTime = currentTime;
+        entry->policyFlags = policyFlags;
+        entry->repeatCount += 1;
+    } else {
+        KeyEntry* newEntry = mAllocator.obtainKeyEntry(currentTime,
+                entry->deviceId, entry->source, policyFlags,
+                entry->action, entry->flags, entry->keyCode, entry->scanCode,
+                entry->metaState, entry->repeatCount + 1, entry->downTime);
+
+        mKeyRepeatState.lastKeyEntry = newEntry;
+        mAllocator.releaseKeyEntry(entry);
+
+        entry = newEntry;
+    }
+
+    if (entry->repeatCount == 1) {
+        entry->flags |= AKEY_EVENT_FLAG_LONG_PRESS;
+    }
+
+    mKeyRepeatState.nextRepeatTime = currentTime + keyRepeatTimeout;
+
+#if DEBUG_OUTBOUND_EVENT_DETAILS
+    LOGD("processKeyRepeat - eventTime=%lld, deviceId=0x%x, source=0x%x, policyFlags=0x%x, "
+            "action=0x%x, flags=0x%x, keyCode=0x%x, scanCode=0x%x, metaState=0x%x, "
+            "repeatCount=%d, downTime=%lld",
+            entry->eventTime, entry->deviceId, entry->source, entry->policyFlags,
+            entry->action, entry->flags, entry->keyCode, entry->scanCode, entry->metaState,
+            entry->repeatCount, entry->downTime);
+#endif
+
+    identifyInputTargetsAndDispatchKeyLockedInterruptible(currentTime, entry);
+}
+
+void InputDispatcher::processMotionLockedInterruptible(
+        nsecs_t currentTime, MotionEntry* entry) {
+#if DEBUG_OUTBOUND_EVENT_DETAILS
+    LOGD("processMotion - eventTime=%lld, deviceId=0x%x, source=0x%x, policyFlags=0x%x, action=0x%x, "
+            "metaState=0x%x, edgeFlags=0x%x, xPrecision=%f, yPrecision=%f, downTime=%lld",
+            entry->eventTime, entry->deviceId, entry->source, entry->policyFlags, entry->action,
+            entry->metaState, entry->edgeFlags, entry->xPrecision, entry->yPrecision,
+            entry->downTime);
+
+    // Print the most recent sample that we have available, this may change due to batching.
+    size_t sampleCount = 1;
+    MotionSample* sample = & entry->firstSample;
+    for (; sample->next != NULL; sample = sample->next) {
+        sampleCount += 1;
+    }
+    for (uint32_t i = 0; i < entry->pointerCount; i++) {
+        LOGD("  Pointer %d: id=%d, x=%f, y=%f, pressure=%f, size=%f",
+                i, entry->pointerIds[i],
+                sample->pointerCoords[i].x,
+                sample->pointerCoords[i].y,
+                sample->pointerCoords[i].pressure,
+                sample->pointerCoords[i].size);
+    }
+
+    // Keep in mind that due to batching, it is possible for the number of samples actually
+    // dispatched to change before the application finally consumed them.
+    if (entry->action == AMOTION_EVENT_ACTION_MOVE) {
+        LOGD("  ... Total movement samples currently batched %d ...", sampleCount);
+    }
+#endif
+
+    identifyInputTargetsAndDispatchMotionLockedInterruptible(currentTime, entry);
+}
+
+void InputDispatcher::identifyInputTargetsAndDispatchKeyLockedInterruptible(
+        nsecs_t currentTime, KeyEntry* entry) {
+#if DEBUG_DISPATCH_CYCLE
+    LOGD("identifyInputTargetsAndDispatchKey");
+#endif
+
+    entry->dispatchInProgress = true;
+    mCurrentInputTargetsValid = false;
+    mLock.unlock();
+
+    mReusableKeyEvent.initialize(entry->deviceId, entry->source, entry->action, entry->flags,
+            entry->keyCode, entry->scanCode, entry->metaState, entry->repeatCount,
+            entry->downTime, entry->eventTime);
+
+    mCurrentInputTargets.clear();
+    int32_t injectionResult = mPolicy->waitForKeyEventTargets(& mReusableKeyEvent,
+            entry->policyFlags, entry->injectorPid, entry->injectorUid,
+            mCurrentInputTargets);
+
+    mLock.lock();
+    mCurrentInputTargetsValid = true;
+
+    setInjectionResultLocked(entry, injectionResult);
+
+    if (injectionResult == INPUT_EVENT_INJECTION_SUCCEEDED) {
+        dispatchEventToCurrentInputTargetsLocked(currentTime, entry, false);
+    }
+}
+
+void InputDispatcher::identifyInputTargetsAndDispatchMotionLockedInterruptible(
+        nsecs_t currentTime, MotionEntry* entry) {
+#if DEBUG_DISPATCH_CYCLE
+    LOGD("identifyInputTargetsAndDispatchMotion");
+#endif
+
+    entry->dispatchInProgress = true;
+    mCurrentInputTargetsValid = false;
+    mLock.unlock();
+
+    mReusableMotionEvent.initialize(entry->deviceId, entry->source, entry->action,
+            entry->edgeFlags, entry->metaState,
+            0, 0, entry->xPrecision, entry->yPrecision,
+            entry->downTime, entry->eventTime, entry->pointerCount, entry->pointerIds,
+            entry->firstSample.pointerCoords);
+
+    mCurrentInputTargets.clear();
+    int32_t injectionResult = mPolicy->waitForMotionEventTargets(& mReusableMotionEvent,
+            entry->policyFlags, entry->injectorPid, entry->injectorUid,
+            mCurrentInputTargets);
+
+    mLock.lock();
+    mCurrentInputTargetsValid = true;
+
+    setInjectionResultLocked(entry, injectionResult);
+
+    if (injectionResult == INPUT_EVENT_INJECTION_SUCCEEDED) {
+        dispatchEventToCurrentInputTargetsLocked(currentTime, entry, false);
+    }
+}
+
+void InputDispatcher::dispatchEventToCurrentInputTargetsLocked(nsecs_t currentTime,
+        EventEntry* eventEntry, bool resumeWithAppendedMotionSample) {
+#if DEBUG_DISPATCH_CYCLE
+    LOGD("dispatchEventToCurrentInputTargets - "
+            "resumeWithAppendedMotionSample=%s",
+            resumeWithAppendedMotionSample ? "true" : "false");
+#endif
+
+    assert(eventEntry->dispatchInProgress); // should already have been set to true
+
+    for (size_t i = 0; i < mCurrentInputTargets.size(); i++) {
+        const InputTarget& inputTarget = mCurrentInputTargets.itemAt(i);
+
+        ssize_t connectionIndex = mConnectionsByReceiveFd.indexOfKey(
+                inputTarget.inputChannel->getReceivePipeFd());
+        if (connectionIndex >= 0) {
+            sp<Connection> connection = mConnectionsByReceiveFd.valueAt(connectionIndex);
+            prepareDispatchCycleLocked(currentTime, connection, eventEntry, & inputTarget,
+                    resumeWithAppendedMotionSample);
+        } else {
+            LOGW("Framework requested delivery of an input event to channel '%s' but it "
+                    "is not registered with the input dispatcher.",
+                    inputTarget.inputChannel->getName().string());
+        }
+    }
+}
+
+void InputDispatcher::prepareDispatchCycleLocked(nsecs_t currentTime,
+        const sp<Connection>& connection, EventEntry* eventEntry, const InputTarget* inputTarget,
+        bool resumeWithAppendedMotionSample) {
+#if DEBUG_DISPATCH_CYCLE
+    LOGD("channel '%s' ~ prepareDispatchCycle - flags=%d, timeout=%lldns, "
+            "xOffset=%f, yOffset=%f, resumeWithAppendedMotionSample=%s",
+            connection->getInputChannelName(), inputTarget->flags, inputTarget->timeout,
+            inputTarget->xOffset, inputTarget->yOffset,
+            resumeWithAppendedMotionSample ? "true" : "false");
+#endif
+
+    // Skip this event if the connection status is not normal.
+    // We don't want to queue outbound events at all if the connection is broken or
+    // not responding.
+    if (connection->status != Connection::STATUS_NORMAL) {
+        LOGV("channel '%s' ~ Dropping event because the channel status is %s",
+                connection->getStatusLabel());
+        return;
+    }
+
+    // Resume the dispatch cycle with a freshly appended motion sample.
+    // First we check that the last dispatch entry in the outbound queue is for the same
+    // motion event to which we appended the motion sample.  If we find such a dispatch
+    // entry, and if it is currently in progress then we try to stream the new sample.
+    bool wasEmpty = connection->outboundQueue.isEmpty();
+
+    if (! wasEmpty && resumeWithAppendedMotionSample) {
+        DispatchEntry* motionEventDispatchEntry =
+                connection->findQueuedDispatchEntryForEvent(eventEntry);
+        if (motionEventDispatchEntry) {
+            // If the dispatch entry is not in progress, then we must be busy dispatching an
+            // earlier event.  Not a problem, the motion event is on the outbound queue and will
+            // be dispatched later.
+            if (! motionEventDispatchEntry->inProgress) {
+#if DEBUG_BATCHING
+                LOGD("channel '%s' ~ Not streaming because the motion event has "
+                        "not yet been dispatched.  "
+                        "(Waiting for earlier events to be consumed.)",
+                        connection->getInputChannelName());
+#endif
+                return;
+            }
+
+            // If the dispatch entry is in progress but it already has a tail of pending
+            // motion samples, then it must mean that the shared memory buffer filled up.
+            // Not a problem, when this dispatch cycle is finished, we will eventually start
+            // a new dispatch cycle to process the tail and that tail includes the newly
+            // appended motion sample.
+            if (motionEventDispatchEntry->tailMotionSample) {
+#if DEBUG_BATCHING
+                LOGD("channel '%s' ~ Not streaming because no new samples can "
+                        "be appended to the motion event in this dispatch cycle.  "
+                        "(Waiting for next dispatch cycle to start.)",
+                        connection->getInputChannelName());
+#endif
+                return;
+            }
+
+            // The dispatch entry is in progress and is still potentially open for streaming.
+            // Try to stream the new motion sample.  This might fail if the consumer has already
+            // consumed the motion event (or if the channel is broken).
+            MotionSample* appendedMotionSample = static_cast<MotionEntry*>(eventEntry)->lastSample;
+            status_t status = connection->inputPublisher.appendMotionSample(
+                    appendedMotionSample->eventTime, appendedMotionSample->pointerCoords);
+            if (status == OK) {
+#if DEBUG_BATCHING
+                LOGD("channel '%s' ~ Successfully streamed new motion sample.",
+                        connection->getInputChannelName());
+#endif
+                return;
+            }
+
+#if DEBUG_BATCHING
+            if (status == NO_MEMORY) {
+                LOGD("channel '%s' ~ Could not append motion sample to currently "
+                        "dispatched move event because the shared memory buffer is full.  "
+                        "(Waiting for next dispatch cycle to start.)",
+                        connection->getInputChannelName());
+            } else if (status == status_t(FAILED_TRANSACTION)) {
+                LOGD("channel '%s' ~ Could not append motion sample to currently "
+                        "dispatched move event because the event has already been consumed.  "
+                        "(Waiting for next dispatch cycle to start.)",
+                        connection->getInputChannelName());
+            } else {
+                LOGD("channel '%s' ~ Could not append motion sample to currently "
+                        "dispatched move event due to an error, status=%d.  "
+                        "(Waiting for next dispatch cycle to start.)",
+                        connection->getInputChannelName(), status);
+            }
+#endif
+            // Failed to stream.  Start a new tail of pending motion samples to dispatch
+            // in the next cycle.
+            motionEventDispatchEntry->tailMotionSample = appendedMotionSample;
+            return;
+        }
+    }
+
+    // This is a new event.
+    // Enqueue a new dispatch entry onto the outbound queue for this connection.
+    DispatchEntry* dispatchEntry = mAllocator.obtainDispatchEntry(eventEntry); // increments ref
+    dispatchEntry->targetFlags = inputTarget->flags;
+    dispatchEntry->xOffset = inputTarget->xOffset;
+    dispatchEntry->yOffset = inputTarget->yOffset;
+    dispatchEntry->timeout = inputTarget->timeout;
+    dispatchEntry->inProgress = false;
+    dispatchEntry->headMotionSample = NULL;
+    dispatchEntry->tailMotionSample = NULL;
+
+    // Handle the case where we could not stream a new motion sample because the consumer has
+    // already consumed the motion event (otherwise the corresponding dispatch entry would
+    // still be in the outbound queue for this connection).  We set the head motion sample
+    // to the list starting with the newly appended motion sample.
+    if (resumeWithAppendedMotionSample) {
+#if DEBUG_BATCHING
+        LOGD("channel '%s' ~ Preparing a new dispatch cycle for additional motion samples "
+                "that cannot be streamed because the motion event has already been consumed.",
+                connection->getInputChannelName());
+#endif
+        MotionSample* appendedMotionSample = static_cast<MotionEntry*>(eventEntry)->lastSample;
+        dispatchEntry->headMotionSample = appendedMotionSample;
+    }
+
+    // Enqueue the dispatch entry.
+    connection->outboundQueue.enqueueAtTail(dispatchEntry);
+
+    // If the outbound queue was previously empty, start the dispatch cycle going.
+    if (wasEmpty) {
+        activateConnectionLocked(connection.get());
+        startDispatchCycleLocked(currentTime, connection);
+    }
+}
+
+void InputDispatcher::startDispatchCycleLocked(nsecs_t currentTime,
+        const sp<Connection>& connection) {
+#if DEBUG_DISPATCH_CYCLE
+    LOGD("channel '%s' ~ startDispatchCycle",
+            connection->getInputChannelName());
+#endif
+
+    assert(connection->status == Connection::STATUS_NORMAL);
+    assert(! connection->outboundQueue.isEmpty());
+
+    DispatchEntry* dispatchEntry = connection->outboundQueue.head.next;
+    assert(! dispatchEntry->inProgress);
+
+    // TODO throttle successive ACTION_MOVE motion events for the same device
+    //      possible implementation could set a brief poll timeout here and resume starting the
+    //      dispatch cycle when elapsed
+
+    // Publish the event.
+    status_t status;
+    switch (dispatchEntry->eventEntry->type) {
+    case EventEntry::TYPE_KEY: {
+        KeyEntry* keyEntry = static_cast<KeyEntry*>(dispatchEntry->eventEntry);
+
+        // Apply target flags.
+        int32_t action = keyEntry->action;
+        int32_t flags = keyEntry->flags;
+        if (dispatchEntry->targetFlags & InputTarget::FLAG_CANCEL) {
+            flags |= AKEY_EVENT_FLAG_CANCELED;
+        }
+
+        // Publish the key event.
+        status = connection->inputPublisher.publishKeyEvent(keyEntry->deviceId, keyEntry->source,
+                action, flags, keyEntry->keyCode, keyEntry->scanCode,
+                keyEntry->metaState, keyEntry->repeatCount, keyEntry->downTime,
+                keyEntry->eventTime);
+
+        if (status) {
+            LOGE("channel '%s' ~ Could not publish key event, "
+                    "status=%d", connection->getInputChannelName(), status);
+            abortDispatchCycleLocked(currentTime, connection, true /*broken*/);
+            return;
+        }
+        break;
+    }
+
+    case EventEntry::TYPE_MOTION: {
+        MotionEntry* motionEntry = static_cast<MotionEntry*>(dispatchEntry->eventEntry);
+
+        // Apply target flags.
+        int32_t action = motionEntry->action;
+        if (dispatchEntry->targetFlags & InputTarget::FLAG_OUTSIDE) {
+            action = AMOTION_EVENT_ACTION_OUTSIDE;
+        }
+        if (dispatchEntry->targetFlags & InputTarget::FLAG_CANCEL) {
+            action = AMOTION_EVENT_ACTION_CANCEL;
+        }
+
+        // If headMotionSample is non-NULL, then it points to the first new sample that we
+        // were unable to dispatch during the previous cycle so we resume dispatching from
+        // that point in the list of motion samples.
+        // Otherwise, we just start from the first sample of the motion event.
+        MotionSample* firstMotionSample = dispatchEntry->headMotionSample;
+        if (! firstMotionSample) {
+            firstMotionSample = & motionEntry->firstSample;
+        }
+
+        // Publish the motion event and the first motion sample.
+        status = connection->inputPublisher.publishMotionEvent(motionEntry->deviceId,
+                motionEntry->source, action, motionEntry->edgeFlags, motionEntry->metaState,
+                dispatchEntry->xOffset, dispatchEntry->yOffset,
+                motionEntry->xPrecision, motionEntry->yPrecision,
+                motionEntry->downTime, firstMotionSample->eventTime,
+                motionEntry->pointerCount, motionEntry->pointerIds,
+                firstMotionSample->pointerCoords);
+
+        if (status) {
+            LOGE("channel '%s' ~ Could not publish motion event, "
+                    "status=%d", connection->getInputChannelName(), status);
+            abortDispatchCycleLocked(currentTime, connection, true /*broken*/);
+            return;
+        }
+
+        // Append additional motion samples.
+        MotionSample* nextMotionSample = firstMotionSample->next;
+        for (; nextMotionSample != NULL; nextMotionSample = nextMotionSample->next) {
+            status = connection->inputPublisher.appendMotionSample(
+                    nextMotionSample->eventTime, nextMotionSample->pointerCoords);
+            if (status == NO_MEMORY) {
+#if DEBUG_DISPATCH_CYCLE
+                    LOGD("channel '%s' ~ Shared memory buffer full.  Some motion samples will "
+                            "be sent in the next dispatch cycle.",
+                            connection->getInputChannelName());
+#endif
+                break;
+            }
+            if (status != OK) {
+                LOGE("channel '%s' ~ Could not append motion sample "
+                        "for a reason other than out of memory, status=%d",
+                        connection->getInputChannelName(), status);
+                abortDispatchCycleLocked(currentTime, connection, true /*broken*/);
+                return;
+            }
+        }
+
+        // Remember the next motion sample that we could not dispatch, in case we ran out
+        // of space in the shared memory buffer.
+        dispatchEntry->tailMotionSample = nextMotionSample;
+        break;
+    }
+
+    default: {
+        assert(false);
+    }
+    }
+
+    // Send the dispatch signal.
+    status = connection->inputPublisher.sendDispatchSignal();
+    if (status) {
+        LOGE("channel '%s' ~ Could not send dispatch signal, status=%d",
+                connection->getInputChannelName(), status);
+        abortDispatchCycleLocked(currentTime, connection, true /*broken*/);
+        return;
+    }
+
+    // Record information about the newly started dispatch cycle.
+    dispatchEntry->inProgress = true;
+
+    connection->lastEventTime = dispatchEntry->eventEntry->eventTime;
+    connection->lastDispatchTime = currentTime;
+
+    nsecs_t timeout = dispatchEntry->timeout;
+    connection->setNextTimeoutTime(currentTime, timeout);
+
+    // Notify other system components.
+    onDispatchCycleStartedLocked(currentTime, connection);
+}
+
+void InputDispatcher::finishDispatchCycleLocked(nsecs_t currentTime,
+        const sp<Connection>& connection) {
+#if DEBUG_DISPATCH_CYCLE
+    LOGD("channel '%s' ~ finishDispatchCycle - %01.1fms since event, "
+            "%01.1fms since dispatch",
+            connection->getInputChannelName(),
+            connection->getEventLatencyMillis(currentTime),
+            connection->getDispatchLatencyMillis(currentTime));
+#endif
+
+    if (connection->status == Connection::STATUS_BROKEN
+            || connection->status == Connection::STATUS_ZOMBIE) {
+        return;
+    }
+
+    // Clear the pending timeout.
+    connection->nextTimeoutTime = LONG_LONG_MAX;
+
+    if (connection->status == Connection::STATUS_NOT_RESPONDING) {
+        // Recovering from an ANR.
+        connection->status = Connection::STATUS_NORMAL;
+
+        // Notify other system components.
+        onDispatchCycleFinishedLocked(currentTime, connection, true /*recoveredFromANR*/);
+    } else {
+        // Normal finish.  Not much to do here.
+
+        // Notify other system components.
+        onDispatchCycleFinishedLocked(currentTime, connection, false /*recoveredFromANR*/);
+    }
+
+    // Reset the publisher since the event has been consumed.
+    // We do this now so that the publisher can release some of its internal resources
+    // while waiting for the next dispatch cycle to begin.
+    status_t status = connection->inputPublisher.reset();
+    if (status) {
+        LOGE("channel '%s' ~ Could not reset publisher, status=%d",
+                connection->getInputChannelName(), status);
+        abortDispatchCycleLocked(currentTime, connection, true /*broken*/);
+        return;
+    }
+
+    // Start the next dispatch cycle for this connection.
+    while (! connection->outboundQueue.isEmpty()) {
+        DispatchEntry* dispatchEntry = connection->outboundQueue.head.next;
+        if (dispatchEntry->inProgress) {
+             // Finish or resume current event in progress.
+            if (dispatchEntry->tailMotionSample) {
+                // We have a tail of undispatched motion samples.
+                // Reuse the same DispatchEntry and start a new cycle.
+                dispatchEntry->inProgress = false;
+                dispatchEntry->headMotionSample = dispatchEntry->tailMotionSample;
+                dispatchEntry->tailMotionSample = NULL;
+                startDispatchCycleLocked(currentTime, connection);
+                return;
+            }
+            // Finished.
+            connection->outboundQueue.dequeueAtHead();
+            mAllocator.releaseDispatchEntry(dispatchEntry);
+        } else {
+            // If the head is not in progress, then we must have already dequeued the in
+            // progress event, which means we actually aborted it (due to ANR).
+            // So just start the next event for this connection.
+            startDispatchCycleLocked(currentTime, connection);
+            return;
+        }
+    }
+
+    // Outbound queue is empty, deactivate the connection.
+    deactivateConnectionLocked(connection.get());
+}
+
+void InputDispatcher::timeoutDispatchCycleLocked(nsecs_t currentTime,
+        const sp<Connection>& connection) {
+#if DEBUG_DISPATCH_CYCLE
+    LOGD("channel '%s' ~ timeoutDispatchCycle",
+            connection->getInputChannelName());
+#endif
+
+    if (connection->status != Connection::STATUS_NORMAL) {
+        return;
+    }
+
+    // Enter the not responding state.
+    connection->status = Connection::STATUS_NOT_RESPONDING;
+    connection->lastANRTime = currentTime;
+
+    // Notify other system components.
+    // This enqueues a command which will eventually either call
+    // resumeAfterTimeoutDispatchCycleLocked or abortDispatchCycleLocked.
+    onDispatchCycleANRLocked(currentTime, connection);
+}
+
+void InputDispatcher::resumeAfterTimeoutDispatchCycleLocked(nsecs_t currentTime,
+        const sp<Connection>& connection, nsecs_t newTimeout) {
+#if DEBUG_DISPATCH_CYCLE
+    LOGD("channel '%s' ~ resumeAfterTimeoutDispatchCycleLocked",
+            connection->getInputChannelName());
+#endif
+
+    if (connection->status != Connection::STATUS_NOT_RESPONDING) {
+        return;
+    }
+
+    // Resume normal dispatch.
+    connection->status = Connection::STATUS_NORMAL;
+    connection->setNextTimeoutTime(currentTime, newTimeout);
+}
+
+void InputDispatcher::abortDispatchCycleLocked(nsecs_t currentTime,
+        const sp<Connection>& connection, bool broken) {
+#if DEBUG_DISPATCH_CYCLE
+    LOGD("channel '%s' ~ abortDispatchCycle - broken=%s",
+            connection->getInputChannelName(), broken ? "true" : "false");
+#endif
+
+    // Clear the pending timeout.
+    connection->nextTimeoutTime = LONG_LONG_MAX;
+
+    // Clear the outbound queue.
+    if (! connection->outboundQueue.isEmpty()) {
+        do {
+            DispatchEntry* dispatchEntry = connection->outboundQueue.dequeueAtHead();
+            mAllocator.releaseDispatchEntry(dispatchEntry);
+        } while (! connection->outboundQueue.isEmpty());
+
+        deactivateConnectionLocked(connection.get());
+    }
+
+    // Handle the case where the connection appears to be unrecoverably broken.
+    // Ignore already broken or zombie connections.
+    if (broken) {
+        if (connection->status == Connection::STATUS_NORMAL
+                || connection->status == Connection::STATUS_NOT_RESPONDING) {
+            connection->status = Connection::STATUS_BROKEN;
+
+            // Notify other system components.
+            onDispatchCycleBrokenLocked(currentTime, connection);
+        }
+    }
+}
+
+bool InputDispatcher::handleReceiveCallback(int receiveFd, int events, void* data) {
+    InputDispatcher* d = static_cast<InputDispatcher*>(data);
+
+    { // acquire lock
+        AutoMutex _l(d->mLock);
+
+        ssize_t connectionIndex = d->mConnectionsByReceiveFd.indexOfKey(receiveFd);
+        if (connectionIndex < 0) {
+            LOGE("Received spurious receive callback for unknown input channel.  "
+                    "fd=%d, events=0x%x", receiveFd, events);
+            return false; // remove the callback
+        }
+
+        nsecs_t currentTime = now();
+
+        sp<Connection> connection = d->mConnectionsByReceiveFd.valueAt(connectionIndex);
+        if (events & (POLLERR | POLLHUP | POLLNVAL)) {
+            LOGE("channel '%s' ~ Consumer closed input channel or an error occurred.  "
+                    "events=0x%x", connection->getInputChannelName(), events);
+            d->abortDispatchCycleLocked(currentTime, connection, true /*broken*/);
+            d->runCommandsLockedInterruptible();
+            return false; // remove the callback
+        }
+
+        if (! (events & POLLIN)) {
+            LOGW("channel '%s' ~ Received spurious callback for unhandled poll event.  "
+                    "events=0x%x", connection->getInputChannelName(), events);
+            return true;
+        }
+
+        status_t status = connection->inputPublisher.receiveFinishedSignal();
+        if (status) {
+            LOGE("channel '%s' ~ Failed to receive finished signal.  status=%d",
+                    connection->getInputChannelName(), status);
+            d->abortDispatchCycleLocked(currentTime, connection, true /*broken*/);
+            d->runCommandsLockedInterruptible();
+            return false; // remove the callback
+        }
+
+        d->finishDispatchCycleLocked(currentTime, connection);
+        d->runCommandsLockedInterruptible();
+        return true;
+    } // release lock
+}
+
+void InputDispatcher::notifyConfigurationChanged(nsecs_t eventTime) {
+#if DEBUG_INBOUND_EVENT_DETAILS
+    LOGD("notifyConfigurationChanged - eventTime=%lld", eventTime);
+#endif
+
+    bool wasEmpty;
+    { // acquire lock
+        AutoMutex _l(mLock);
+
+        ConfigurationChangedEntry* newEntry = mAllocator.obtainConfigurationChangedEntry(eventTime);
+
+        wasEmpty = mInboundQueue.isEmpty();
+        mInboundQueue.enqueueAtTail(newEntry);
+    } // release lock
+
+    if (wasEmpty) {
+        mPollLoop->wake();
+    }
+}
+
+void InputDispatcher::notifyAppSwitchComing(nsecs_t eventTime) {
+#if DEBUG_INBOUND_EVENT_DETAILS
+    LOGD("notifyAppSwitchComing - eventTime=%lld", eventTime);
+#endif
+
+    // Remove movement keys from the queue from most recent to least recent, stopping at the
+    // first non-movement key.
+    // TODO: Include a detailed description of why we do this...
+
+    { // acquire lock
+        AutoMutex _l(mLock);
+
+        for (EventEntry* entry = mInboundQueue.tail.prev; entry != & mInboundQueue.head; ) {
+            EventEntry* prev = entry->prev;
+
+            if (entry->type == EventEntry::TYPE_KEY) {
+                KeyEntry* keyEntry = static_cast<KeyEntry*>(entry);
+                if (isMovementKey(keyEntry->keyCode)) {
+                    LOGV("Dropping movement key during app switch: keyCode=%d, action=%d",
+                            keyEntry->keyCode, keyEntry->action);
+                    mInboundQueue.dequeue(keyEntry);
+
+                    setInjectionResultLocked(entry, INPUT_EVENT_INJECTION_FAILED);
+
+                    mAllocator.releaseKeyEntry(keyEntry);
+                } else {
+                    // stop at last non-movement key
+                    break;
+                }
+            }
+
+            entry = prev;
+        }
+    } // release lock
+}
+
+void InputDispatcher::notifyKey(nsecs_t eventTime, int32_t deviceId, int32_t source,
+        uint32_t policyFlags, int32_t action, int32_t flags,
+        int32_t keyCode, int32_t scanCode, int32_t metaState, nsecs_t downTime) {
+#if DEBUG_INBOUND_EVENT_DETAILS
+    LOGD("notifyKey - eventTime=%lld, deviceId=0x%x, source=0x%x, policyFlags=0x%x, action=0x%x, "
+            "flags=0x%x, keyCode=0x%x, scanCode=0x%x, metaState=0x%x, downTime=%lld",
+            eventTime, deviceId, source, policyFlags, action, flags,
+            keyCode, scanCode, metaState, downTime);
+#endif
+
+    bool wasEmpty;
+    { // acquire lock
+        AutoMutex _l(mLock);
+
+        int32_t repeatCount = 0;
+        KeyEntry* newEntry = mAllocator.obtainKeyEntry(eventTime,
+                deviceId, source, policyFlags, action, flags, keyCode, scanCode,
+                metaState, repeatCount, downTime);
+
+        wasEmpty = mInboundQueue.isEmpty();
+        mInboundQueue.enqueueAtTail(newEntry);
+    } // release lock
+
+    if (wasEmpty) {
+        mPollLoop->wake();
+    }
+}
+
+void InputDispatcher::notifyMotion(nsecs_t eventTime, int32_t deviceId, int32_t source,
+        uint32_t policyFlags, int32_t action, int32_t metaState, int32_t edgeFlags,
+        uint32_t pointerCount, const int32_t* pointerIds, const PointerCoords* pointerCoords,
+        float xPrecision, float yPrecision, nsecs_t downTime) {
+#if DEBUG_INBOUND_EVENT_DETAILS
+    LOGD("notifyMotion - eventTime=%lld, deviceId=0x%x, source=0x%x, policyFlags=0x%x, "
+            "action=0x%x, metaState=0x%x, edgeFlags=0x%x, xPrecision=%f, yPrecision=%f, "
+            "downTime=%lld",
+            eventTime, deviceId, source, policyFlags, action, metaState, edgeFlags,
+            xPrecision, yPrecision, downTime);
+    for (uint32_t i = 0; i < pointerCount; i++) {
+        LOGD("  Pointer %d: id=%d, x=%f, y=%f, pressure=%f, size=%f",
+                i, pointerIds[i], pointerCoords[i].x, pointerCoords[i].y,
+                pointerCoords[i].pressure, pointerCoords[i].size);
+    }
+#endif
+
+    bool wasEmpty;
+    { // acquire lock
+        AutoMutex _l(mLock);
+
+        // Attempt batching and streaming of move events.
+        if (action == AMOTION_EVENT_ACTION_MOVE) {
+            // BATCHING CASE
+            //
+            // Try to append a move sample to the tail of the inbound queue for this device.
+            // Give up if we encounter a non-move motion event for this device since that
+            // means we cannot append any new samples until a new motion event has started.
+            for (EventEntry* entry = mInboundQueue.tail.prev;
+                    entry != & mInboundQueue.head; entry = entry->prev) {
+                if (entry->type != EventEntry::TYPE_MOTION) {
+                    // Keep looking for motion events.
+                    continue;
+                }
+
+                MotionEntry* motionEntry = static_cast<MotionEntry*>(entry);
+                if (motionEntry->deviceId != deviceId) {
+                    // Keep looking for this device.
+                    continue;
+                }
+
+                if (motionEntry->action != AMOTION_EVENT_ACTION_MOVE
+                        || motionEntry->pointerCount != pointerCount
+                        || motionEntry->isInjected()) {
+                    // Last motion event in the queue for this device is not compatible for
+                    // appending new samples.  Stop here.
+                    goto NoBatchingOrStreaming;
+                }
+
+                // The last motion event is a move and is compatible for appending.
+                // Do the batching magic.
+                mAllocator.appendMotionSample(motionEntry, eventTime, pointerCoords);
+#if DEBUG_BATCHING
+                LOGD("Appended motion sample onto batch for most recent "
+                        "motion event for this device in the inbound queue.");
+#endif
+
+                // Sanity check for special case because dispatch is interruptible.
+                // The dispatch logic is partially interruptible and releases its lock while
+                // identifying targets.  However, as soon as the targets have been identified,
+                // the dispatcher proceeds to write a dispatch entry into all relevant outbound
+                // queues and then promptly removes the motion entry from the queue.
+                //
+                // Consequently, we should never observe the case where the inbound queue contains
+                // an in-progress motion entry unless the current input targets are invalid
+                // (currently being computed).  Check for this!
+                assert(! (motionEntry->dispatchInProgress && mCurrentInputTargetsValid));
+
+                return; // done!
+            }
+
+            // STREAMING CASE
+            //
+            // There is no pending motion event (of any kind) for this device in the inbound queue.
+            // Search the outbound queues for a synchronously dispatched motion event for this
+            // device.  If found, then we append the new sample to that event and then try to
+            // push it out to all current targets.  It is possible that some targets will already
+            // have consumed the motion event.  This case is automatically handled by the
+            // logic in prepareDispatchCycleLocked by tracking where resumption takes place.
+            //
+            // The reason we look for a synchronously dispatched motion event is because we
+            // want to be sure that no other motion events have been dispatched since the move.
+            // It's also convenient because it means that the input targets are still valid.
+            // This code could be improved to support streaming of asynchronously dispatched
+            // motion events (which might be significantly more efficient) but it may become
+            // a little more complicated as a result.
+            //
+            // Note: This code crucially depends on the invariant that an outbound queue always
+            //       contains at most one synchronous event and it is always last (but it might
+            //       not be first!).
+            if (mCurrentInputTargetsValid) {
+                for (size_t i = 0; i < mActiveConnections.size(); i++) {
+                    Connection* connection = mActiveConnections.itemAt(i);
+                    if (! connection->outboundQueue.isEmpty()) {
+                        DispatchEntry* dispatchEntry = connection->outboundQueue.tail.prev;
+                        if (dispatchEntry->targetFlags & InputTarget::FLAG_SYNC) {
+                            if (dispatchEntry->eventEntry->type != EventEntry::TYPE_MOTION) {
+                                goto NoBatchingOrStreaming;
+                            }
+
+                            MotionEntry* syncedMotionEntry = static_cast<MotionEntry*>(
+                                    dispatchEntry->eventEntry);
+                            if (syncedMotionEntry->action != AMOTION_EVENT_ACTION_MOVE
+                                    || syncedMotionEntry->deviceId != deviceId
+                                    || syncedMotionEntry->pointerCount != pointerCount
+                                    || syncedMotionEntry->isInjected()) {
+                                goto NoBatchingOrStreaming;
+                            }
+
+                            // Found synced move entry.  Append sample and resume dispatch.
+                            mAllocator.appendMotionSample(syncedMotionEntry, eventTime,
+                                    pointerCoords);
+    #if DEBUG_BATCHING
+                            LOGD("Appended motion sample onto batch for most recent synchronously "
+                                    "dispatched motion event for this device in the outbound queues.");
+    #endif
+                            nsecs_t currentTime = now();
+                            dispatchEventToCurrentInputTargetsLocked(currentTime, syncedMotionEntry,
+                                    true /*resumeWithAppendedMotionSample*/);
+
+                            runCommandsLockedInterruptible();
+                            return; // done!
+                        }
+                    }
+                }
+            }
+
+NoBatchingOrStreaming:;
+        }
+
+        // Just enqueue a new motion event.
+        MotionEntry* newEntry = mAllocator.obtainMotionEntry(eventTime,
+                deviceId, source, policyFlags, action, metaState, edgeFlags,
+                xPrecision, yPrecision, downTime,
+                pointerCount, pointerIds, pointerCoords);
+
+        wasEmpty = mInboundQueue.isEmpty();
+        mInboundQueue.enqueueAtTail(newEntry);
+    } // release lock
+
+    if (wasEmpty) {
+        mPollLoop->wake();
+    }
+}
+
+int32_t InputDispatcher::injectInputEvent(const InputEvent* event,
+        int32_t injectorPid, int32_t injectorUid, bool sync, int32_t timeoutMillis) {
+#if DEBUG_INBOUND_EVENT_DETAILS
+    LOGD("injectInputEvent - eventType=%d, injectorPid=%d, injectorUid=%d, "
+            "sync=%d, timeoutMillis=%d",
+            event->getType(), injectorPid, injectorUid, sync, timeoutMillis);
+#endif
+
+    nsecs_t endTime = now() + milliseconds_to_nanoseconds(timeoutMillis);
+
+    EventEntry* injectedEntry;
+    bool wasEmpty;
+    { // acquire lock
+        AutoMutex _l(mLock);
+
+        injectedEntry = createEntryFromInputEventLocked(event);
+        injectedEntry->refCount += 1;
+        injectedEntry->injectorPid = injectorPid;
+        injectedEntry->injectorUid = injectorUid;
+
+        wasEmpty = mInboundQueue.isEmpty();
+        mInboundQueue.enqueueAtTail(injectedEntry);
+
+    } // release lock
+
+    if (wasEmpty) {
+        mPollLoop->wake();
+    }
+
+    int32_t injectionResult;
+    { // acquire lock
+        AutoMutex _l(mLock);
+
+        for (;;) {
+            injectionResult = injectedEntry->injectionResult;
+            if (injectionResult != INPUT_EVENT_INJECTION_PENDING) {
+                break;
+            }
+
+            nsecs_t remainingTimeout = endTime - now();
+            if (remainingTimeout <= 0) {
+                injectionResult = INPUT_EVENT_INJECTION_TIMED_OUT;
+                sync = false;
+                break;
+            }
+
+            mInjectionResultAvailableCondition.waitRelative(mLock, remainingTimeout);
+        }
+
+        if (sync) {
+            while (! isFullySynchronizedLocked()) {
+                nsecs_t remainingTimeout = endTime - now();
+                if (remainingTimeout <= 0) {
+                    injectionResult = INPUT_EVENT_INJECTION_TIMED_OUT;
+                    break;
+                }
+
+                mFullySynchronizedCondition.waitRelative(mLock, remainingTimeout);
+            }
+        }
+
+        mAllocator.releaseEventEntry(injectedEntry);
+    } // release lock
+
+    return injectionResult;
+}
+
+void InputDispatcher::setInjectionResultLocked(EventEntry* entry, int32_t injectionResult) {
+    if (entry->isInjected()) {
+#if DEBUG_INJECTION
+        LOGD("Setting input event injection result to %d.  "
+                "injectorPid=%d, injectorUid=%d",
+                 injectionResult, entry->injectorPid, entry->injectorUid);
+#endif
+
+        entry->injectionResult = injectionResult;
+        mInjectionResultAvailableCondition.broadcast();
+    }
+}
+
+bool InputDispatcher::isFullySynchronizedLocked() {
+    return mInboundQueue.isEmpty() && mActiveConnections.isEmpty();
+}
+
+InputDispatcher::EventEntry* InputDispatcher::createEntryFromInputEventLocked(
+        const InputEvent* event) {
+    switch (event->getType()) {
+    case AINPUT_EVENT_TYPE_KEY: {
+        const KeyEvent* keyEvent = static_cast<const KeyEvent*>(event);
+        uint32_t policyFlags = 0; // XXX consider adding a policy flag to track injected events
+
+        KeyEntry* keyEntry = mAllocator.obtainKeyEntry(keyEvent->getEventTime(),
+                keyEvent->getDeviceId(), keyEvent->getSource(), policyFlags,
+                keyEvent->getAction(), keyEvent->getFlags(),
+                keyEvent->getKeyCode(), keyEvent->getScanCode(), keyEvent->getMetaState(),
+                keyEvent->getRepeatCount(), keyEvent->getDownTime());
+        return keyEntry;
+    }
+
+    case AINPUT_EVENT_TYPE_MOTION: {
+        const MotionEvent* motionEvent = static_cast<const MotionEvent*>(event);
+        uint32_t policyFlags = 0; // XXX consider adding a policy flag to track injected events
+
+        const nsecs_t* sampleEventTimes = motionEvent->getSampleEventTimes();
+        const PointerCoords* samplePointerCoords = motionEvent->getSamplePointerCoords();
+        size_t pointerCount = motionEvent->getPointerCount();
+
+        MotionEntry* motionEntry = mAllocator.obtainMotionEntry(*sampleEventTimes,
+                motionEvent->getDeviceId(), motionEvent->getSource(), policyFlags,
+                motionEvent->getAction(), motionEvent->getMetaState(), motionEvent->getEdgeFlags(),
+                motionEvent->getXPrecision(), motionEvent->getYPrecision(),
+                motionEvent->getDownTime(), uint32_t(pointerCount),
+                motionEvent->getPointerIds(), samplePointerCoords);
+        for (size_t i = motionEvent->getHistorySize(); i > 0; i--) {
+            sampleEventTimes += 1;
+            samplePointerCoords += pointerCount;
+            mAllocator.appendMotionSample(motionEntry, *sampleEventTimes, samplePointerCoords);
+        }
+        return motionEntry;
+    }
+
+    default:
+        assert(false);
+        return NULL;
+    }
+}
+
+void InputDispatcher::resetKeyRepeatLocked() {
+    if (mKeyRepeatState.lastKeyEntry) {
+        mAllocator.releaseKeyEntry(mKeyRepeatState.lastKeyEntry);
+        mKeyRepeatState.lastKeyEntry = NULL;
+    }
+}
+
+void InputDispatcher::preemptInputDispatch() {
+#if DEBUG_DISPATCH_CYCLE
+    LOGD("preemptInputDispatch");
+#endif
+
+    bool preemptedOne = false;
+    { // acquire lock
+        AutoMutex _l(mLock);
+
+        for (size_t i = 0; i < mActiveConnections.size(); i++) {
+            Connection* connection = mActiveConnections[i];
+            if (connection->hasPendingSyncTarget()) {
+#if DEBUG_DISPATCH_CYCLE
+                LOGD("channel '%s' ~ Preempted pending synchronous dispatch",
+                        connection->getInputChannelName());
+#endif
+                connection->outboundQueue.tail.prev->targetFlags &= ~ InputTarget::FLAG_SYNC;
+                preemptedOne = true;
+            }
+        }
+    } // release lock
+
+    if (preemptedOne) {
+        // Wake up the poll loop so it can get a head start dispatching the next event.
+        mPollLoop->wake();
+    }
+}
+
+status_t InputDispatcher::registerInputChannel(const sp<InputChannel>& inputChannel) {
+#if DEBUG_REGISTRATION
+    LOGD("channel '%s' ~ registerInputChannel", inputChannel->getName().string());
+#endif
+
+    int receiveFd;
+    { // acquire lock
+        AutoMutex _l(mLock);
+
+        receiveFd = inputChannel->getReceivePipeFd();
+        if (mConnectionsByReceiveFd.indexOfKey(receiveFd) >= 0) {
+            LOGW("Attempted to register already registered input channel '%s'",
+                    inputChannel->getName().string());
+            return BAD_VALUE;
+        }
+
+        sp<Connection> connection = new Connection(inputChannel);
+        status_t status = connection->initialize();
+        if (status) {
+            LOGE("Failed to initialize input publisher for input channel '%s', status=%d",
+                    inputChannel->getName().string(), status);
+            return status;
+        }
+
+        mConnectionsByReceiveFd.add(receiveFd, connection);
+
+        runCommandsLockedInterruptible();
+    } // release lock
+
+    mPollLoop->setCallback(receiveFd, POLLIN, handleReceiveCallback, this);
+    return OK;
+}
+
+status_t InputDispatcher::unregisterInputChannel(const sp<InputChannel>& inputChannel) {
+#if DEBUG_REGISTRATION
+    LOGD("channel '%s' ~ unregisterInputChannel", inputChannel->getName().string());
+#endif
+
+    int32_t receiveFd;
+    { // acquire lock
+        AutoMutex _l(mLock);
+
+        receiveFd = inputChannel->getReceivePipeFd();
+        ssize_t connectionIndex = mConnectionsByReceiveFd.indexOfKey(receiveFd);
+        if (connectionIndex < 0) {
+            LOGW("Attempted to unregister already unregistered input channel '%s'",
+                    inputChannel->getName().string());
+            return BAD_VALUE;
+        }
+
+        sp<Connection> connection = mConnectionsByReceiveFd.valueAt(connectionIndex);
+        mConnectionsByReceiveFd.removeItemsAt(connectionIndex);
+
+        connection->status = Connection::STATUS_ZOMBIE;
+
+        nsecs_t currentTime = now();
+        abortDispatchCycleLocked(currentTime, connection, true /*broken*/);
+
+        runCommandsLockedInterruptible();
+    } // release lock
+
+    mPollLoop->removeCallback(receiveFd);
+
+    // Wake the poll loop because removing the connection may have changed the current
+    // synchronization state.
+    mPollLoop->wake();
+    return OK;
+}
+
+void InputDispatcher::activateConnectionLocked(Connection* connection) {
+    for (size_t i = 0; i < mActiveConnections.size(); i++) {
+        if (mActiveConnections.itemAt(i) == connection) {
+            return;
+        }
+    }
+    mActiveConnections.add(connection);
+}
+
+void InputDispatcher::deactivateConnectionLocked(Connection* connection) {
+    for (size_t i = 0; i < mActiveConnections.size(); i++) {
+        if (mActiveConnections.itemAt(i) == connection) {
+            mActiveConnections.removeAt(i);
+            return;
+        }
+    }
+}
+
+void InputDispatcher::onDispatchCycleStartedLocked(
+        nsecs_t currentTime, const sp<Connection>& connection) {
+}
+
+void InputDispatcher::onDispatchCycleFinishedLocked(
+        nsecs_t currentTime, const sp<Connection>& connection, bool recoveredFromANR) {
+    if (recoveredFromANR) {
+        LOGI("channel '%s' ~ Recovered from ANR.  %01.1fms since event, "
+                "%01.1fms since dispatch, %01.1fms since ANR",
+                connection->getInputChannelName(),
+                connection->getEventLatencyMillis(currentTime),
+                connection->getDispatchLatencyMillis(currentTime),
+                connection->getANRLatencyMillis(currentTime));
+
+        CommandEntry* commandEntry = postCommandLocked(
+                & InputDispatcher::doNotifyInputChannelRecoveredFromANRLockedInterruptible);
+        commandEntry->connection = connection;
+    }
+}
+
+void InputDispatcher::onDispatchCycleANRLocked(
+        nsecs_t currentTime, const sp<Connection>& connection) {
+    LOGI("channel '%s' ~ Not responding!  %01.1fms since event, %01.1fms since dispatch",
+            connection->getInputChannelName(),
+            connection->getEventLatencyMillis(currentTime),
+            connection->getDispatchLatencyMillis(currentTime));
+
+    CommandEntry* commandEntry = postCommandLocked(
+            & InputDispatcher::doNotifyInputChannelANRLockedInterruptible);
+    commandEntry->connection = connection;
+}
+
+void InputDispatcher::onDispatchCycleBrokenLocked(
+        nsecs_t currentTime, const sp<Connection>& connection) {
+    LOGE("channel '%s' ~ Channel is unrecoverably broken and will be disposed!",
+            connection->getInputChannelName());
+
+    CommandEntry* commandEntry = postCommandLocked(
+            & InputDispatcher::doNotifyInputChannelBrokenLockedInterruptible);
+    commandEntry->connection = connection;
+}
+
+void InputDispatcher::doNotifyInputChannelBrokenLockedInterruptible(
+        CommandEntry* commandEntry) {
+    sp<Connection> connection = commandEntry->connection;
+
+    if (connection->status != Connection::STATUS_ZOMBIE) {
+        mLock.unlock();
+
+        mPolicy->notifyInputChannelBroken(connection->inputChannel);
+
+        mLock.lock();
+    }
+}
+
+void InputDispatcher::doNotifyInputChannelANRLockedInterruptible(
+        CommandEntry* commandEntry) {
+    sp<Connection> connection = commandEntry->connection;
+
+    if (connection->status != Connection::STATUS_ZOMBIE) {
+        mLock.unlock();
+
+        nsecs_t newTimeout;
+        bool resume = mPolicy->notifyInputChannelANR(connection->inputChannel, newTimeout);
+
+        mLock.lock();
+
+        nsecs_t currentTime = now();
+        if (resume) {
+            resumeAfterTimeoutDispatchCycleLocked(currentTime, connection, newTimeout);
+        } else {
+            abortDispatchCycleLocked(currentTime, connection, false /*(not) broken*/);
+        }
+    }
+}
+
+void InputDispatcher::doNotifyInputChannelRecoveredFromANRLockedInterruptible(
+        CommandEntry* commandEntry) {
+    sp<Connection> connection = commandEntry->connection;
+
+    if (connection->status != Connection::STATUS_ZOMBIE) {
+        mLock.unlock();
+
+        mPolicy->notifyInputChannelRecoveredFromANR(connection->inputChannel);
+
+        mLock.lock();
+    }
+}
+
+
+// --- InputDispatcher::Allocator ---
+
+InputDispatcher::Allocator::Allocator() {
+}
+
+void InputDispatcher::Allocator::initializeEventEntry(EventEntry* entry, int32_t type,
+        nsecs_t eventTime) {
+    entry->type = type;
+    entry->refCount = 1;
+    entry->dispatchInProgress = false;
+    entry->eventTime = eventTime;
+    entry->injectionResult = INPUT_EVENT_INJECTION_PENDING;
+    entry->injectorPid = -1;
+    entry->injectorUid = -1;
+}
+
+InputDispatcher::ConfigurationChangedEntry*
+InputDispatcher::Allocator::obtainConfigurationChangedEntry(nsecs_t eventTime) {
+    ConfigurationChangedEntry* entry = mConfigurationChangeEntryPool.alloc();
+    initializeEventEntry(entry, EventEntry::TYPE_CONFIGURATION_CHANGED, eventTime);
+    return entry;
+}
+
+InputDispatcher::KeyEntry* InputDispatcher::Allocator::obtainKeyEntry(nsecs_t eventTime,
+        int32_t deviceId, int32_t source, uint32_t policyFlags, int32_t action,
+        int32_t flags, int32_t keyCode, int32_t scanCode, int32_t metaState,
+        int32_t repeatCount, nsecs_t downTime) {
+    KeyEntry* entry = mKeyEntryPool.alloc();
+    initializeEventEntry(entry, EventEntry::TYPE_KEY, eventTime);
+
+    entry->deviceId = deviceId;
+    entry->source = source;
+    entry->policyFlags = policyFlags;
+    entry->action = action;
+    entry->flags = flags;
+    entry->keyCode = keyCode;
+    entry->scanCode = scanCode;
+    entry->metaState = metaState;
+    entry->repeatCount = repeatCount;
+    entry->downTime = downTime;
+    return entry;
+}
+
+InputDispatcher::MotionEntry* InputDispatcher::Allocator::obtainMotionEntry(nsecs_t eventTime,
+        int32_t deviceId, int32_t source, uint32_t policyFlags, int32_t action,
+        int32_t metaState, int32_t edgeFlags, float xPrecision, float yPrecision,
+        nsecs_t downTime, uint32_t pointerCount,
+        const int32_t* pointerIds, const PointerCoords* pointerCoords) {
+    MotionEntry* entry = mMotionEntryPool.alloc();
+    initializeEventEntry(entry, EventEntry::TYPE_MOTION, eventTime);
+
+    entry->eventTime = eventTime;
+    entry->deviceId = deviceId;
+    entry->source = source;
+    entry->policyFlags = policyFlags;
+    entry->action = action;
+    entry->metaState = metaState;
+    entry->edgeFlags = edgeFlags;
+    entry->xPrecision = xPrecision;
+    entry->yPrecision = yPrecision;
+    entry->downTime = downTime;
+    entry->pointerCount = pointerCount;
+    entry->firstSample.eventTime = eventTime;
+    entry->firstSample.next = NULL;
+    entry->lastSample = & entry->firstSample;
+    for (uint32_t i = 0; i < pointerCount; i++) {
+        entry->pointerIds[i] = pointerIds[i];
+        entry->firstSample.pointerCoords[i] = pointerCoords[i];
+    }
+    return entry;
+}
+
+InputDispatcher::DispatchEntry* InputDispatcher::Allocator::obtainDispatchEntry(
+        EventEntry* eventEntry) {
+    DispatchEntry* entry = mDispatchEntryPool.alloc();
+    entry->eventEntry = eventEntry;
+    eventEntry->refCount += 1;
+    return entry;
+}
+
+InputDispatcher::CommandEntry* InputDispatcher::Allocator::obtainCommandEntry(Command command) {
+    CommandEntry* entry = mCommandEntryPool.alloc();
+    entry->command = command;
+    return entry;
+}
+
+void InputDispatcher::Allocator::releaseEventEntry(EventEntry* entry) {
+    switch (entry->type) {
+    case EventEntry::TYPE_CONFIGURATION_CHANGED:
+        releaseConfigurationChangedEntry(static_cast<ConfigurationChangedEntry*>(entry));
+        break;
+    case EventEntry::TYPE_KEY:
+        releaseKeyEntry(static_cast<KeyEntry*>(entry));
+        break;
+    case EventEntry::TYPE_MOTION:
+        releaseMotionEntry(static_cast<MotionEntry*>(entry));
+        break;
+    default:
+        assert(false);
+        break;
+    }
+}
+
+void InputDispatcher::Allocator::releaseConfigurationChangedEntry(
+        ConfigurationChangedEntry* entry) {
+    entry->refCount -= 1;
+    if (entry->refCount == 0) {
+        mConfigurationChangeEntryPool.free(entry);
+    } else {
+        assert(entry->refCount > 0);
+    }
+}
+
+void InputDispatcher::Allocator::releaseKeyEntry(KeyEntry* entry) {
+    entry->refCount -= 1;
+    if (entry->refCount == 0) {
+        mKeyEntryPool.free(entry);
+    } else {
+        assert(entry->refCount > 0);
+    }
+}
+
+void InputDispatcher::Allocator::releaseMotionEntry(MotionEntry* entry) {
+    entry->refCount -= 1;
+    if (entry->refCount == 0) {
+        for (MotionSample* sample = entry->firstSample.next; sample != NULL; ) {
+            MotionSample* next = sample->next;
+            mMotionSamplePool.free(sample);
+            sample = next;
+        }
+        mMotionEntryPool.free(entry);
+    } else {
+        assert(entry->refCount > 0);
+    }
+}
+
+void InputDispatcher::Allocator::releaseDispatchEntry(DispatchEntry* entry) {
+    releaseEventEntry(entry->eventEntry);
+    mDispatchEntryPool.free(entry);
+}
+
+void InputDispatcher::Allocator::releaseCommandEntry(CommandEntry* entry) {
+    mCommandEntryPool.free(entry);
+}
+
+void InputDispatcher::Allocator::appendMotionSample(MotionEntry* motionEntry,
+        nsecs_t eventTime, const PointerCoords* pointerCoords) {
+    MotionSample* sample = mMotionSamplePool.alloc();
+    sample->eventTime = eventTime;
+    uint32_t pointerCount = motionEntry->pointerCount;
+    for (uint32_t i = 0; i < pointerCount; i++) {
+        sample->pointerCoords[i] = pointerCoords[i];
+    }
+
+    sample->next = NULL;
+    motionEntry->lastSample->next = sample;
+    motionEntry->lastSample = sample;
+}
+
+// --- InputDispatcher::Connection ---
+
+InputDispatcher::Connection::Connection(const sp<InputChannel>& inputChannel) :
+        status(STATUS_NORMAL), inputChannel(inputChannel), inputPublisher(inputChannel),
+        nextTimeoutTime(LONG_LONG_MAX),
+        lastEventTime(LONG_LONG_MAX), lastDispatchTime(LONG_LONG_MAX),
+        lastANRTime(LONG_LONG_MAX) {
+}
+
+InputDispatcher::Connection::~Connection() {
+}
+
+status_t InputDispatcher::Connection::initialize() {
+    return inputPublisher.initialize();
+}
+
+void InputDispatcher::Connection::setNextTimeoutTime(nsecs_t currentTime, nsecs_t timeout) {
+    nextTimeoutTime = (timeout >= 0) ? currentTime + timeout : LONG_LONG_MAX;
+}
+
+const char* InputDispatcher::Connection::getStatusLabel() const {
+    switch (status) {
+    case STATUS_NORMAL:
+        return "NORMAL";
+
+    case STATUS_BROKEN:
+        return "BROKEN";
+
+    case STATUS_NOT_RESPONDING:
+        return "NOT_RESPONDING";
+
+    case STATUS_ZOMBIE:
+        return "ZOMBIE";
+
+    default:
+        return "UNKNOWN";
+    }
+}
+
+InputDispatcher::DispatchEntry* InputDispatcher::Connection::findQueuedDispatchEntryForEvent(
+        const EventEntry* eventEntry) const {
+    for (DispatchEntry* dispatchEntry = outboundQueue.tail.prev;
+            dispatchEntry != & outboundQueue.head; dispatchEntry = dispatchEntry->prev) {
+        if (dispatchEntry->eventEntry == eventEntry) {
+            return dispatchEntry;
+        }
+    }
+    return NULL;
+}
+
+// --- InputDispatcher::CommandEntry ---
+
+InputDispatcher::CommandEntry::CommandEntry() {
+}
+
+InputDispatcher::CommandEntry::~CommandEntry() {
+}
+
+
+// --- InputDispatcherThread ---
+
+InputDispatcherThread::InputDispatcherThread(const sp<InputDispatcherInterface>& dispatcher) :
+        Thread(/*canCallJava*/ true), mDispatcher(dispatcher) {
+}
+
+InputDispatcherThread::~InputDispatcherThread() {
+}
+
+bool InputDispatcherThread::threadLoop() {
+    mDispatcher->dispatchOnce();
+    return true;
+}
+
+} // namespace android
diff --git a/libs/ui/InputManager.cpp b/libs/ui/InputManager.cpp
new file mode 100644
index 0000000..e1d15a4
--- /dev/null
+++ b/libs/ui/InputManager.cpp
@@ -0,0 +1,114 @@
+//
+// Copyright 2010 The Android Open Source Project
+//
+// The input manager.
+//
+#define LOG_TAG "InputManager"
+
+//#define LOG_NDEBUG 0
+
+#include <cutils/log.h>
+#include <ui/InputManager.h>
+#include <ui/InputReader.h>
+#include <ui/InputDispatcher.h>
+
+namespace android {
+
+InputManager::InputManager(
+        const sp<EventHubInterface>& eventHub,
+        const sp<InputReaderPolicyInterface>& readerPolicy,
+        const sp<InputDispatcherPolicyInterface>& dispatcherPolicy) {
+    mDispatcher = new InputDispatcher(dispatcherPolicy);
+    mReader = new InputReader(eventHub, readerPolicy, mDispatcher);
+    initialize();
+}
+
+InputManager::InputManager(
+        const sp<InputReaderInterface>& reader,
+        const sp<InputDispatcherInterface>& dispatcher) :
+        mReader(reader),
+        mDispatcher(dispatcher) {
+    initialize();
+}
+
+InputManager::~InputManager() {
+    stop();
+}
+
+void InputManager::initialize() {
+    mReaderThread = new InputReaderThread(mReader);
+    mDispatcherThread = new InputDispatcherThread(mDispatcher);
+}
+
+status_t InputManager::start() {
+    status_t result = mDispatcherThread->run("InputDispatcher", PRIORITY_URGENT_DISPLAY);
+    if (result) {
+        LOGE("Could not start InputDispatcher thread due to error %d.", result);
+        return result;
+    }
+
+    result = mReaderThread->run("InputReader", PRIORITY_URGENT_DISPLAY);
+    if (result) {
+        LOGE("Could not start InputReader thread due to error %d.", result);
+
+        mDispatcherThread->requestExit();
+        return result;
+    }
+
+    return OK;
+}
+
+status_t InputManager::stop() {
+    status_t result = mReaderThread->requestExitAndWait();
+    if (result) {
+        LOGW("Could not stop InputReader thread due to error %d.", result);
+    }
+
+    result = mDispatcherThread->requestExitAndWait();
+    if (result) {
+        LOGW("Could not stop InputDispatcher thread due to error %d.", result);
+    }
+
+    return OK;
+}
+
+status_t InputManager::registerInputChannel(const sp<InputChannel>& inputChannel) {
+    return mDispatcher->registerInputChannel(inputChannel);
+}
+
+status_t InputManager::unregisterInputChannel(const sp<InputChannel>& inputChannel) {
+    return mDispatcher->unregisterInputChannel(inputChannel);
+}
+
+int32_t InputManager::injectInputEvent(const InputEvent* event,
+        int32_t injectorPid, int32_t injectorUid, bool sync, int32_t timeoutMillis) {
+    return mDispatcher->injectInputEvent(event, injectorPid, injectorUid, sync, timeoutMillis);
+}
+
+void InputManager::preemptInputDispatch() {
+    mDispatcher->preemptInputDispatch();
+}
+
+void InputManager::getInputConfiguration(InputConfiguration* outConfiguration) const {
+    mReader->getCurrentInputConfiguration(outConfiguration);
+}
+
+int32_t InputManager::getScanCodeState(int32_t deviceId, int32_t deviceClasses,
+        int32_t scanCode) const {
+    return mReader->getCurrentScanCodeState(deviceId, deviceClasses, scanCode);
+}
+
+int32_t InputManager::getKeyCodeState(int32_t deviceId, int32_t deviceClasses,
+        int32_t keyCode) const {
+    return mReader->getCurrentKeyCodeState(deviceId, deviceClasses, keyCode);
+}
+
+int32_t InputManager::getSwitchState(int32_t deviceId, int32_t deviceClasses, int32_t sw) const {
+    return mReader->getCurrentSwitchState(deviceId, deviceClasses, sw);
+}
+
+bool InputManager::hasKeys(size_t numCodes, const int32_t* keyCodes, uint8_t* outFlags) const {
+    return mReader->hasKeys(numCodes, keyCodes, outFlags);
+}
+
+} // namespace android
diff --git a/libs/ui/InputReader.cpp b/libs/ui/InputReader.cpp
new file mode 100644
index 0000000..403afe7
--- /dev/null
+++ b/libs/ui/InputReader.cpp
@@ -0,0 +1,1475 @@
+//
+// Copyright 2010 The Android Open Source Project
+//
+// The input reader.
+//
+#define LOG_TAG "InputReader"
+
+//#define LOG_NDEBUG 0
+
+// Log debug messages for each raw event received from the EventHub.
+#define DEBUG_RAW_EVENTS 0
+
+// Log debug messages about touch screen filtering hacks.
+#define DEBUG_HACKS 0
+
+// Log debug messages about virtual key processing.
+#define DEBUG_VIRTUAL_KEYS 0
+
+// Log debug messages about pointers.
+#define DEBUG_POINTERS 0
+
+// Log debug messages about pointer assignment calculations.
+#define DEBUG_POINTER_ASSIGNMENT 0
+
+#include <cutils/log.h>
+#include <ui/InputReader.h>
+
+#include <stddef.h>
+#include <unistd.h>
+#include <errno.h>
+#include <limits.h>
+#include <math.h>
+
+/** Amount that trackball needs to move in order to generate a key event. */
+#define TRACKBALL_MOVEMENT_THRESHOLD 6
+
+
+namespace android {
+
+// --- Static Functions ---
+
+template<typename T>
+inline static T abs(const T& value) {
+    return value < 0 ? - value : value;
+}
+
+template<typename T>
+inline static T min(const T& a, const T& b) {
+    return a < b ? a : b;
+}
+
+template<typename T>
+inline static void swap(T& a, T& b) {
+    T temp = a;
+    a = b;
+    b = temp;
+}
+
+
+int32_t updateMetaState(int32_t keyCode, bool down, int32_t oldMetaState) {
+    int32_t mask;
+    switch (keyCode) {
+    case AKEYCODE_ALT_LEFT:
+        mask = AMETA_ALT_LEFT_ON;
+        break;
+    case AKEYCODE_ALT_RIGHT:
+        mask = AMETA_ALT_RIGHT_ON;
+        break;
+    case AKEYCODE_SHIFT_LEFT:
+        mask = AMETA_SHIFT_LEFT_ON;
+        break;
+    case AKEYCODE_SHIFT_RIGHT:
+        mask = AMETA_SHIFT_RIGHT_ON;
+        break;
+    case AKEYCODE_SYM:
+        mask = AMETA_SYM_ON;
+        break;
+    default:
+        return oldMetaState;
+    }
+
+    int32_t newMetaState = down ? oldMetaState | mask : oldMetaState & ~ mask
+            & ~ (AMETA_ALT_ON | AMETA_SHIFT_ON);
+
+    if (newMetaState & (AMETA_ALT_LEFT_ON | AMETA_ALT_RIGHT_ON)) {
+        newMetaState |= AMETA_ALT_ON;
+    }
+
+    if (newMetaState & (AMETA_SHIFT_LEFT_ON | AMETA_SHIFT_RIGHT_ON)) {
+        newMetaState |= AMETA_SHIFT_ON;
+    }
+
+    return newMetaState;
+}
+
+static const int32_t keyCodeRotationMap[][4] = {
+        // key codes enumerated counter-clockwise with the original (unrotated) key first
+        // no rotation,        90 degree rotation,  180 degree rotation, 270 degree rotation
+        { AKEYCODE_DPAD_DOWN,   AKEYCODE_DPAD_RIGHT,  AKEYCODE_DPAD_UP,     AKEYCODE_DPAD_LEFT },
+        { AKEYCODE_DPAD_RIGHT,  AKEYCODE_DPAD_UP,     AKEYCODE_DPAD_LEFT,   AKEYCODE_DPAD_DOWN },
+        { AKEYCODE_DPAD_UP,     AKEYCODE_DPAD_LEFT,   AKEYCODE_DPAD_DOWN,   AKEYCODE_DPAD_RIGHT },
+        { AKEYCODE_DPAD_LEFT,   AKEYCODE_DPAD_DOWN,   AKEYCODE_DPAD_RIGHT,  AKEYCODE_DPAD_UP },
+};
+static const int keyCodeRotationMapSize =
+        sizeof(keyCodeRotationMap) / sizeof(keyCodeRotationMap[0]);
+
+int32_t rotateKeyCode(int32_t keyCode, int32_t orientation) {
+    if (orientation != InputReaderPolicyInterface::ROTATION_0) {
+        for (int i = 0; i < keyCodeRotationMapSize; i++) {
+            if (keyCode == keyCodeRotationMap[i][0]) {
+                return keyCodeRotationMap[i][orientation];
+            }
+        }
+    }
+    return keyCode;
+}
+
+
+// --- InputReader ---
+
+InputReader::InputReader(const sp<EventHubInterface>& eventHub,
+        const sp<InputReaderPolicyInterface>& policy,
+        const sp<InputDispatcherInterface>& dispatcher) :
+        mEventHub(eventHub), mPolicy(policy), mDispatcher(dispatcher) {
+    configureExcludedDevices();
+    resetGlobalMetaState();
+    resetDisplayProperties();
+    updateExportedVirtualKeyState();
+}
+
+InputReader::~InputReader() {
+    for (size_t i = 0; i < mDevices.size(); i++) {
+        delete mDevices.valueAt(i);
+    }
+}
+
+void InputReader::loopOnce() {
+    RawEvent rawEvent;
+    mEventHub->getEvent(& rawEvent.deviceId, & rawEvent.type, & rawEvent.scanCode,
+            & rawEvent.keyCode, & rawEvent.flags, & rawEvent.value, & rawEvent.when);
+
+    // Replace the event timestamp so it is in same timebase as java.lang.System.nanoTime()
+    // and android.os.SystemClock.uptimeMillis() as expected by the rest of the system.
+    rawEvent.when = systemTime(SYSTEM_TIME_MONOTONIC);
+
+#if DEBUG_RAW_EVENTS
+    LOGD("Input event: device=0x%x type=0x%x scancode=%d keycode=%d value=%d",
+            rawEvent.deviceId, rawEvent.type, rawEvent.scanCode, rawEvent.keyCode,
+            rawEvent.value);
+#endif
+
+    process(& rawEvent);
+}
+
+void InputReader::process(const RawEvent* rawEvent) {
+    switch (rawEvent->type) {
+    case EventHubInterface::DEVICE_ADDED:
+        handleDeviceAdded(rawEvent);
+        break;
+
+    case EventHubInterface::DEVICE_REMOVED:
+        handleDeviceRemoved(rawEvent);
+        break;
+
+    case EV_SYN:
+        handleSync(rawEvent);
+        break;
+
+    case EV_KEY:
+        handleKey(rawEvent);
+        break;
+
+    case EV_REL:
+        handleRelativeMotion(rawEvent);
+        break;
+
+    case EV_ABS:
+        handleAbsoluteMotion(rawEvent);
+        break;
+
+    case EV_SW:
+        handleSwitch(rawEvent);
+        break;
+    }
+}
+
+void InputReader::handleDeviceAdded(const RawEvent* rawEvent) {
+    InputDevice* device = getDevice(rawEvent->deviceId);
+    if (device) {
+        LOGW("Ignoring spurious device added event for deviceId %d.", rawEvent->deviceId);
+        return;
+    }
+
+    addDevice(rawEvent->when, rawEvent->deviceId);
+}
+
+void InputReader::handleDeviceRemoved(const RawEvent* rawEvent) {
+    InputDevice* device = getDevice(rawEvent->deviceId);
+    if (! device) {
+        LOGW("Ignoring spurious device removed event for deviceId %d.", rawEvent->deviceId);
+        return;
+    }
+
+    removeDevice(rawEvent->when, device);
+}
+
+void InputReader::handleSync(const RawEvent* rawEvent) {
+    InputDevice* device = getNonIgnoredDevice(rawEvent->deviceId);
+    if (! device) return;
+
+    if (rawEvent->scanCode == SYN_MT_REPORT) {
+        // MultiTouch Sync: The driver has returned all data for *one* of the pointers.
+        // We drop pointers with pressure <= 0 since that indicates they are not down.
+        if (device->isMultiTouchScreen()) {
+            uint32_t pointerIndex = device->multiTouchScreen.accumulator.pointerCount;
+
+            if (device->multiTouchScreen.accumulator.pointers[pointerIndex].fields) {
+                if (pointerIndex == MAX_POINTERS) {
+                    LOGW("MultiTouch device driver returned more than maximum of %d pointers.",
+                            MAX_POINTERS);
+                } else {
+                    pointerIndex += 1;
+                    device->multiTouchScreen.accumulator.pointerCount = pointerIndex;
+                }
+            }
+
+            device->multiTouchScreen.accumulator.pointers[pointerIndex].clear();
+        }
+    } else if (rawEvent->scanCode == SYN_REPORT) {
+        // General Sync: The driver has returned all data for the current event update.
+        if (device->isMultiTouchScreen()) {
+            if (device->multiTouchScreen.accumulator.isDirty()) {
+                onMultiTouchScreenStateChanged(rawEvent->when, device);
+                device->multiTouchScreen.accumulator.clear();
+            }
+        } else if (device->isSingleTouchScreen()) {
+            if (device->singleTouchScreen.accumulator.isDirty()) {
+                onSingleTouchScreenStateChanged(rawEvent->when, device);
+                device->singleTouchScreen.accumulator.clear();
+            }
+        }
+
+        if (device->trackball.accumulator.isDirty()) {
+            onTrackballStateChanged(rawEvent->when, device);
+            device->trackball.accumulator.clear();
+        }
+    }
+}
+
+void InputReader::handleKey(const RawEvent* rawEvent) {
+    InputDevice* device = getNonIgnoredDevice(rawEvent->deviceId);
+    if (! device) return;
+
+    bool down = rawEvent->value != 0;
+    int32_t scanCode = rawEvent->scanCode;
+
+    if (device->isSingleTouchScreen()) {
+        switch (rawEvent->scanCode) {
+        case BTN_TOUCH:
+            device->singleTouchScreen.accumulator.fields |=
+                    InputDevice::SingleTouchScreenState::Accumulator::FIELD_BTN_TOUCH;
+            device->singleTouchScreen.accumulator.btnTouch = down;
+            return;
+        }
+    }
+
+    if (device->isTrackball()) {
+        switch (rawEvent->scanCode) {
+        case BTN_MOUSE:
+            device->trackball.accumulator.fields |=
+                    InputDevice::TrackballState::Accumulator::FIELD_BTN_MOUSE;
+            device->trackball.accumulator.btnMouse = down;
+            return;
+        }
+    }
+
+    if (device->isKeyboard()) {
+        int32_t keyCode = rawEvent->keyCode;
+        onKey(rawEvent->when, device, down, keyCode, scanCode, rawEvent->flags);
+    }
+}
+
+void InputReader::handleRelativeMotion(const RawEvent* rawEvent) {
+    InputDevice* device = getNonIgnoredDevice(rawEvent->deviceId);
+    if (! device) return;
+
+    if (device->isTrackball()) {
+        switch (rawEvent->scanCode) {
+        case REL_X:
+            device->trackball.accumulator.fields |=
+                    InputDevice::TrackballState::Accumulator::FIELD_REL_X;
+            device->trackball.accumulator.relX = rawEvent->value;
+            break;
+        case REL_Y:
+            device->trackball.accumulator.fields |=
+                    InputDevice::TrackballState::Accumulator::FIELD_REL_Y;
+            device->trackball.accumulator.relY = rawEvent->value;
+            break;
+        }
+    }
+}
+
+void InputReader::handleAbsoluteMotion(const RawEvent* rawEvent) {
+    InputDevice* device = getNonIgnoredDevice(rawEvent->deviceId);
+    if (! device) return;
+
+    if (device->isMultiTouchScreen()) {
+        uint32_t pointerIndex = device->multiTouchScreen.accumulator.pointerCount;
+        InputDevice::MultiTouchScreenState::Accumulator::Pointer* pointer =
+                & device->multiTouchScreen.accumulator.pointers[pointerIndex];
+
+        switch (rawEvent->scanCode) {
+        case ABS_MT_POSITION_X:
+            pointer->fields |=
+                    InputDevice::MultiTouchScreenState::Accumulator::FIELD_ABS_MT_POSITION_X;
+            pointer->absMTPositionX = rawEvent->value;
+            break;
+        case ABS_MT_POSITION_Y:
+            pointer->fields |=
+                    InputDevice::MultiTouchScreenState::Accumulator::FIELD_ABS_MT_POSITION_Y;
+            pointer->absMTPositionY = rawEvent->value;
+            break;
+        case ABS_MT_TOUCH_MAJOR:
+            pointer->fields |=
+                    InputDevice::MultiTouchScreenState::Accumulator::FIELD_ABS_MT_TOUCH_MAJOR;
+            pointer->absMTTouchMajor = rawEvent->value;
+            break;
+        case ABS_MT_TOUCH_MINOR:
+            pointer->fields |=
+                    InputDevice::MultiTouchScreenState::Accumulator::FIELD_ABS_MT_TOUCH_MINOR;
+            pointer->absMTTouchMinor = rawEvent->value;
+            break;
+        case ABS_MT_WIDTH_MAJOR:
+            pointer->fields |=
+                    InputDevice::MultiTouchScreenState::Accumulator::FIELD_ABS_MT_WIDTH_MAJOR;
+            pointer->absMTWidthMajor = rawEvent->value;
+            break;
+        case ABS_MT_WIDTH_MINOR:
+            pointer->fields |=
+                    InputDevice::MultiTouchScreenState::Accumulator::FIELD_ABS_MT_WIDTH_MINOR;
+            pointer->absMTWidthMinor = rawEvent->value;
+            break;
+        case ABS_MT_ORIENTATION:
+            pointer->fields |=
+                    InputDevice::MultiTouchScreenState::Accumulator::FIELD_ABS_MT_ORIENTATION;
+            pointer->absMTOrientation = rawEvent->value;
+            break;
+        case ABS_MT_TRACKING_ID:
+            pointer->fields |=
+                    InputDevice::MultiTouchScreenState::Accumulator::FIELD_ABS_MT_TRACKING_ID;
+            pointer->absMTTrackingId = rawEvent->value;
+            break;
+        }
+    } else if (device->isSingleTouchScreen()) {
+        switch (rawEvent->scanCode) {
+        case ABS_X:
+            device->singleTouchScreen.accumulator.fields |=
+                    InputDevice::SingleTouchScreenState::Accumulator::FIELD_ABS_X;
+            device->singleTouchScreen.accumulator.absX = rawEvent->value;
+            break;
+        case ABS_Y:
+            device->singleTouchScreen.accumulator.fields |=
+                    InputDevice::SingleTouchScreenState::Accumulator::FIELD_ABS_Y;
+            device->singleTouchScreen.accumulator.absY = rawEvent->value;
+            break;
+        case ABS_PRESSURE:
+            device->singleTouchScreen.accumulator.fields |=
+                    InputDevice::SingleTouchScreenState::Accumulator::FIELD_ABS_PRESSURE;
+            device->singleTouchScreen.accumulator.absPressure = rawEvent->value;
+            break;
+        case ABS_TOOL_WIDTH:
+            device->singleTouchScreen.accumulator.fields |=
+                    InputDevice::SingleTouchScreenState::Accumulator::FIELD_ABS_TOOL_WIDTH;
+            device->singleTouchScreen.accumulator.absToolWidth = rawEvent->value;
+            break;
+        }
+    }
+}
+
+void InputReader::handleSwitch(const RawEvent* rawEvent) {
+    InputDevice* device = getNonIgnoredDevice(rawEvent->deviceId);
+    if (! device) return;
+
+    onSwitch(rawEvent->when, device, rawEvent->scanCode, rawEvent->value);
+}
+
+void InputReader::onKey(nsecs_t when, InputDevice* device,
+        bool down, int32_t keyCode, int32_t scanCode, uint32_t policyFlags) {
+    /* Refresh display properties so we can rotate key codes according to display orientation */
+
+    if (! refreshDisplayProperties()) {
+        return;
+    }
+
+    /* Update device state */
+
+    int32_t oldMetaState = device->keyboard.current.metaState;
+    int32_t newMetaState = updateMetaState(keyCode, down, oldMetaState);
+    if (oldMetaState != newMetaState) {
+        device->keyboard.current.metaState = newMetaState;
+        resetGlobalMetaState();
+    }
+
+    // FIXME if we send a down event about a rotated key press we should ensure that we send
+    //       a corresponding up event about the rotated key press even if the orientation
+    //       has changed in the meantime
+    keyCode = rotateKeyCode(keyCode, mDisplayOrientation);
+
+    if (down) {
+        device->keyboard.current.downTime = when;
+    }
+
+    /* Apply policy */
+
+    int32_t policyActions = mPolicy->interceptKey(when, device->id,
+            down, keyCode, scanCode, policyFlags);
+
+    if (! applyStandardInputDispatchPolicyActions(when, policyActions, & policyFlags)) {
+        return; // event dropped
+    }
+
+    /* Enqueue key event for dispatch */
+
+    int32_t keyEventAction;
+    if (down) {
+        device->keyboard.current.downTime = when;
+        keyEventAction = AKEY_EVENT_ACTION_DOWN;
+    } else {
+        keyEventAction = AKEY_EVENT_ACTION_UP;
+    }
+
+    int32_t keyEventFlags = AKEY_EVENT_FLAG_FROM_SYSTEM;
+    if (policyActions & InputReaderPolicyInterface::ACTION_WOKE_HERE) {
+        keyEventFlags = keyEventFlags | AKEY_EVENT_FLAG_WOKE_HERE;
+    }
+
+    mDispatcher->notifyKey(when, device->id, AINPUT_SOURCE_KEYBOARD, policyFlags,
+            keyEventAction, keyEventFlags, keyCode, scanCode,
+            device->keyboard.current.metaState,
+            device->keyboard.current.downTime);
+}
+
+void InputReader::onSwitch(nsecs_t when, InputDevice* device, int32_t switchCode,
+        int32_t switchValue) {
+    int32_t policyActions = mPolicy->interceptSwitch(when, switchCode, switchValue);
+
+    uint32_t policyFlags = 0;
+    applyStandardInputDispatchPolicyActions(when, policyActions, & policyFlags);
+}
+
+void InputReader::onMultiTouchScreenStateChanged(nsecs_t when,
+        InputDevice* device) {
+    static const uint32_t REQUIRED_FIELDS =
+            InputDevice::MultiTouchScreenState::Accumulator::FIELD_ABS_MT_POSITION_X
+            | InputDevice::MultiTouchScreenState::Accumulator::FIELD_ABS_MT_POSITION_Y
+            | InputDevice::MultiTouchScreenState::Accumulator::FIELD_ABS_MT_TOUCH_MAJOR
+            | InputDevice::MultiTouchScreenState::Accumulator::FIELD_ABS_MT_WIDTH_MAJOR;
+
+    /* Refresh display properties so we can map touch screen coords into display coords */
+
+    if (! refreshDisplayProperties()) {
+        return;
+    }
+
+    /* Update device state */
+
+    InputDevice::MultiTouchScreenState* in = & device->multiTouchScreen;
+    InputDevice::TouchData* out = & device->touchScreen.currentTouch;
+
+    uint32_t inCount = in->accumulator.pointerCount;
+    uint32_t outCount = 0;
+    bool havePointerIds = true;
+
+    out->clear();
+
+    for (uint32_t inIndex = 0; inIndex < inCount; inIndex++) {
+        uint32_t fields = in->accumulator.pointers[inIndex].fields;
+
+        if ((fields & REQUIRED_FIELDS) != REQUIRED_FIELDS) {
+#if DEBUG_POINTERS
+            LOGD("Pointers: Missing required multitouch pointer fields: index=%d, fields=%d",
+                    inIndex, fields);
+            continue;
+#endif
+        }
+
+        if (in->accumulator.pointers[inIndex].absMTTouchMajor <= 0) {
+            // Pointer is not down.  Drop it.
+            continue;
+        }
+
+        out->pointers[outCount].x = in->accumulator.pointers[inIndex].absMTPositionX;
+        out->pointers[outCount].y = in->accumulator.pointers[inIndex].absMTPositionY;
+
+        out->pointers[outCount].touchMajor = in->accumulator.pointers[inIndex].absMTTouchMajor;
+        out->pointers[outCount].touchMinor = (fields
+                & InputDevice::MultiTouchScreenState::Accumulator::FIELD_ABS_MT_TOUCH_MINOR) != 0
+                ? in->accumulator.pointers[inIndex].absMTTouchMinor
+                        : in->accumulator.pointers[inIndex].absMTTouchMajor;
+
+        out->pointers[outCount].toolMajor = in->accumulator.pointers[inIndex].absMTWidthMajor;
+        out->pointers[outCount].toolMinor = (fields
+                & InputDevice::MultiTouchScreenState::Accumulator::FIELD_ABS_MT_WIDTH_MINOR) != 0
+                ? in->accumulator.pointers[inIndex].absMTWidthMinor
+                        : in->accumulator.pointers[inIndex].absMTWidthMajor;
+
+        out->pointers[outCount].orientation = (fields
+                & InputDevice::MultiTouchScreenState::Accumulator::FIELD_ABS_MT_ORIENTATION) != 0
+                ? in->accumulator.pointers[inIndex].absMTOrientation : 0;
+
+        // Derive an approximation of pressure and size.
+        // FIXME assignment of pressure may be incorrect, probably better to let
+        // pressure = touch / width.  Later on we pass width to MotionEvent as a size, which
+        // isn't quite right either.  Should be using touch for that.
+        out->pointers[outCount].pressure = in->accumulator.pointers[inIndex].absMTTouchMajor;
+        out->pointers[outCount].size = in->accumulator.pointers[inIndex].absMTWidthMajor;
+
+        if (havePointerIds) {
+            if (fields & InputDevice::MultiTouchScreenState::Accumulator::
+                    FIELD_ABS_MT_TRACKING_ID) {
+                uint32_t id = uint32_t(in->accumulator.pointers[inIndex].absMTTrackingId);
+
+                if (id > MAX_POINTER_ID) {
+#if DEBUG_POINTERS
+                    LOGD("Pointers: Ignoring driver provided pointer id %d because "
+                            "it is larger than max supported id %d for optimizations",
+                            id, MAX_POINTER_ID);
+#endif
+                    havePointerIds = false;
+                }
+                else {
+                    out->pointers[outCount].id = id;
+                    out->idToIndex[id] = outCount;
+                    out->idBits.markBit(id);
+                }
+            } else {
+                havePointerIds = false;
+            }
+        }
+
+        outCount += 1;
+    }
+
+    out->pointerCount = outCount;
+
+    onTouchScreenChanged(when, device, havePointerIds);
+}
+
+void InputReader::onSingleTouchScreenStateChanged(nsecs_t when,
+        InputDevice* device) {
+    /* Refresh display properties so we can map touch screen coords into display coords */
+
+    if (! refreshDisplayProperties()) {
+        return;
+    }
+
+    /* Update device state */
+
+    InputDevice::SingleTouchScreenState* in = & device->singleTouchScreen;
+    InputDevice::TouchData* out = & device->touchScreen.currentTouch;
+
+    uint32_t fields = in->accumulator.fields;
+
+    if (fields & InputDevice::SingleTouchScreenState::Accumulator::FIELD_BTN_TOUCH) {
+        in->current.down = in->accumulator.btnTouch;
+    }
+
+    if (fields & InputDevice::SingleTouchScreenState::Accumulator::FIELD_ABS_X) {
+        in->current.x = in->accumulator.absX;
+    }
+
+    if (fields & InputDevice::SingleTouchScreenState::Accumulator::FIELD_ABS_Y) {
+        in->current.y = in->accumulator.absY;
+    }
+
+    if (fields & InputDevice::SingleTouchScreenState::Accumulator::FIELD_ABS_PRESSURE) {
+        in->current.pressure = in->accumulator.absPressure;
+    }
+
+    if (fields & InputDevice::SingleTouchScreenState::Accumulator::FIELD_ABS_TOOL_WIDTH) {
+        in->current.size = in->accumulator.absToolWidth;
+    }
+
+    out->clear();
+
+    if (in->current.down) {
+        out->pointerCount = 1;
+        out->pointers[0].id = 0;
+        out->pointers[0].x = in->current.x;
+        out->pointers[0].y = in->current.y;
+        out->pointers[0].pressure = in->current.pressure;
+        out->pointers[0].size = in->current.size;
+        out->pointers[0].touchMajor = in->current.pressure;
+        out->pointers[0].touchMinor = in->current.pressure;
+        out->pointers[0].toolMajor = in->current.size;
+        out->pointers[0].toolMinor = in->current.size;
+        out->pointers[0].orientation = 0;
+        out->idToIndex[0] = 0;
+        out->idBits.markBit(0);
+    }
+
+    onTouchScreenChanged(when, device, true);
+}
+
+void InputReader::onTouchScreenChanged(nsecs_t when,
+        InputDevice* device, bool havePointerIds) {
+    /* Apply policy */
+
+    int32_t policyActions = mPolicy->interceptTouch(when);
+
+    uint32_t policyFlags = 0;
+    if (! applyStandardInputDispatchPolicyActions(when, policyActions, & policyFlags)) {
+        device->touchScreen.lastTouch.clear();
+        return; // event dropped
+    }
+
+    /* Preprocess pointer data */
+
+    if (device->touchScreen.parameters.useBadTouchFilter) {
+        if (device->touchScreen.applyBadTouchFilter()) {
+            havePointerIds = false;
+        }
+    }
+
+    if (device->touchScreen.parameters.useJumpyTouchFilter) {
+        if (device->touchScreen.applyJumpyTouchFilter()) {
+            havePointerIds = false;
+        }
+    }
+
+    if (! havePointerIds) {
+        device->touchScreen.calculatePointerIds();
+    }
+
+    InputDevice::TouchData temp;
+    InputDevice::TouchData* savedTouch;
+    if (device->touchScreen.parameters.useAveragingTouchFilter) {
+        temp.copyFrom(device->touchScreen.currentTouch);
+        savedTouch = & temp;
+
+        device->touchScreen.applyAveragingTouchFilter();
+    } else {
+        savedTouch = & device->touchScreen.currentTouch;
+    }
+
+    /* Process virtual keys or touches */
+
+    if (! consumeVirtualKeyTouches(when, device, policyFlags)) {
+        dispatchTouches(when, device, policyFlags);
+    }
+
+    // Copy current touch to last touch in preparation for the next cycle.
+    device->touchScreen.lastTouch.copyFrom(*savedTouch);
+}
+
+bool InputReader::consumeVirtualKeyTouches(nsecs_t when,
+        InputDevice* device, uint32_t policyFlags) {
+    switch (device->touchScreen.currentVirtualKey.status) {
+    case InputDevice::TouchScreenState::CurrentVirtualKeyState::STATUS_CANCELED:
+        if (device->touchScreen.currentTouch.pointerCount == 0) {
+            // Pointer went up after virtual key canceled.
+            device->touchScreen.currentVirtualKey.status =
+                    InputDevice::TouchScreenState::CurrentVirtualKeyState::STATUS_UP;
+        }
+        return true; // consumed
+
+    case InputDevice::TouchScreenState::CurrentVirtualKeyState::STATUS_DOWN:
+        if (device->touchScreen.currentTouch.pointerCount == 0) {
+            // Pointer went up while virtual key was down.
+            device->touchScreen.currentVirtualKey.status =
+                    InputDevice::TouchScreenState::CurrentVirtualKeyState::STATUS_UP;
+#if DEBUG_VIRTUAL_KEYS
+            LOGD("VirtualKeys: Generating key up: keyCode=%d, scanCode=%d",
+                    device->touchScreen.currentVirtualKey.keyCode,
+                    device->touchScreen.currentVirtualKey.scanCode);
+#endif
+            dispatchVirtualKey(when, device, policyFlags, AKEY_EVENT_ACTION_UP,
+                    AKEY_EVENT_FLAG_FROM_SYSTEM | AKEY_EVENT_FLAG_VIRTUAL_HARD_KEY);
+            return true; // consumed
+        }
+
+        if (device->touchScreen.currentTouch.pointerCount == 1) {
+            const InputDevice::VirtualKey* virtualKey = device->touchScreen.findVirtualKeyHit();
+            if (virtualKey
+                    && virtualKey->keyCode == device->touchScreen.currentVirtualKey.keyCode) {
+                // Pointer is still within the space of the virtual key.
+                return true; // consumed
+            }
+        }
+
+        // Pointer left virtual key area or another pointer also went down.
+        // Send key cancellation.
+        device->touchScreen.currentVirtualKey.status =
+                InputDevice::TouchScreenState::CurrentVirtualKeyState::STATUS_CANCELED;
+#if DEBUG_VIRTUAL_KEYS
+        LOGD("VirtualKeys: Canceling key: keyCode=%d, scanCode=%d",
+                device->touchScreen.currentVirtualKey.keyCode,
+                device->touchScreen.currentVirtualKey.scanCode);
+#endif
+        dispatchVirtualKey(when, device, policyFlags, AKEY_EVENT_ACTION_UP,
+                AKEY_EVENT_FLAG_FROM_SYSTEM | AKEY_EVENT_FLAG_VIRTUAL_HARD_KEY
+                        | AKEY_EVENT_FLAG_CANCELED);
+        return true; // consumed
+
+    default:
+        if (device->touchScreen.currentTouch.pointerCount == 1
+                && device->touchScreen.lastTouch.pointerCount == 0) {
+            // Pointer just went down.  Check for virtual key hit.
+            const InputDevice::VirtualKey* virtualKey = device->touchScreen.findVirtualKeyHit();
+            if (virtualKey) {
+                device->touchScreen.currentVirtualKey.status =
+                        InputDevice::TouchScreenState::CurrentVirtualKeyState::STATUS_DOWN;
+                device->touchScreen.currentVirtualKey.downTime = when;
+                device->touchScreen.currentVirtualKey.keyCode = virtualKey->keyCode;
+                device->touchScreen.currentVirtualKey.scanCode = virtualKey->scanCode;
+#if DEBUG_VIRTUAL_KEYS
+                LOGD("VirtualKeys: Generating key down: keyCode=%d, scanCode=%d",
+                        device->touchScreen.currentVirtualKey.keyCode,
+                        device->touchScreen.currentVirtualKey.scanCode);
+#endif
+                dispatchVirtualKey(when, device, policyFlags, AKEY_EVENT_ACTION_DOWN,
+                        AKEY_EVENT_FLAG_FROM_SYSTEM | AKEY_EVENT_FLAG_VIRTUAL_HARD_KEY);
+                return true; // consumed
+            }
+        }
+        return false; // not consumed
+    }
+}
+
+void InputReader::dispatchVirtualKey(nsecs_t when,
+        InputDevice* device, uint32_t policyFlags,
+        int32_t keyEventAction, int32_t keyEventFlags) {
+    updateExportedVirtualKeyState();
+
+    int32_t keyCode = device->touchScreen.currentVirtualKey.keyCode;
+    int32_t scanCode = device->touchScreen.currentVirtualKey.scanCode;
+    nsecs_t downTime = device->touchScreen.currentVirtualKey.downTime;
+    int32_t metaState = globalMetaState();
+
+    if (keyEventAction == AKEY_EVENT_ACTION_DOWN) {
+        mPolicy->virtualKeyDownFeedback();
+    }
+
+    int32_t policyActions = mPolicy->interceptKey(when, device->id,
+            keyEventAction == AKEY_EVENT_ACTION_DOWN, keyCode, scanCode, policyFlags);
+
+    if (applyStandardInputDispatchPolicyActions(when, policyActions, & policyFlags)) {
+        mDispatcher->notifyKey(when, device->id, AINPUT_SOURCE_KEYBOARD, policyFlags,
+                keyEventAction, keyEventFlags, keyCode, scanCode, metaState, downTime);
+    }
+}
+
+void InputReader::dispatchTouches(nsecs_t when,
+        InputDevice* device, uint32_t policyFlags) {
+    uint32_t currentPointerCount = device->touchScreen.currentTouch.pointerCount;
+    uint32_t lastPointerCount = device->touchScreen.lastTouch.pointerCount;
+    if (currentPointerCount == 0 && lastPointerCount == 0) {
+        return; // nothing to do!
+    }
+
+    BitSet32 currentIdBits = device->touchScreen.currentTouch.idBits;
+    BitSet32 lastIdBits = device->touchScreen.lastTouch.idBits;
+
+    if (currentIdBits == lastIdBits) {
+        // No pointer id changes so this is a move event.
+        // The dispatcher takes care of batching moves so we don't have to deal with that here.
+        int32_t motionEventAction = AMOTION_EVENT_ACTION_MOVE;
+        dispatchTouch(when, device, policyFlags, & device->touchScreen.currentTouch,
+                currentIdBits, -1, motionEventAction);
+    } else {
+        // There may be pointers going up and pointers going down at the same time when pointer
+        // ids are reported by the device driver.
+        BitSet32 upIdBits(lastIdBits.value & ~ currentIdBits.value);
+        BitSet32 downIdBits(currentIdBits.value & ~ lastIdBits.value);
+        BitSet32 activeIdBits(lastIdBits.value);
+
+        while (! upIdBits.isEmpty()) {
+            uint32_t upId = upIdBits.firstMarkedBit();
+            upIdBits.clearBit(upId);
+            BitSet32 oldActiveIdBits = activeIdBits;
+            activeIdBits.clearBit(upId);
+
+            int32_t motionEventAction;
+            if (activeIdBits.isEmpty()) {
+                motionEventAction = AMOTION_EVENT_ACTION_UP;
+            } else {
+                motionEventAction = AMOTION_EVENT_ACTION_POINTER_UP;
+            }
+
+            dispatchTouch(when, device, policyFlags, & device->touchScreen.lastTouch,
+                    oldActiveIdBits, upId, motionEventAction);
+        }
+
+        while (! downIdBits.isEmpty()) {
+            uint32_t downId = downIdBits.firstMarkedBit();
+            downIdBits.clearBit(downId);
+            BitSet32 oldActiveIdBits = activeIdBits;
+            activeIdBits.markBit(downId);
+
+            int32_t motionEventAction;
+            if (oldActiveIdBits.isEmpty()) {
+                motionEventAction = AMOTION_EVENT_ACTION_DOWN;
+                device->touchScreen.downTime = when;
+            } else {
+                motionEventAction = AMOTION_EVENT_ACTION_POINTER_DOWN;
+            }
+
+            dispatchTouch(when, device, policyFlags, & device->touchScreen.currentTouch,
+                    activeIdBits, downId, motionEventAction);
+        }
+    }
+}
+
+void InputReader::dispatchTouch(nsecs_t when, InputDevice* device, uint32_t policyFlags,
+        InputDevice::TouchData* touch, BitSet32 idBits, uint32_t changedId,
+        int32_t motionEventAction) {
+    int32_t orientedWidth, orientedHeight;
+    switch (mDisplayOrientation) {
+    case InputReaderPolicyInterface::ROTATION_90:
+    case InputReaderPolicyInterface::ROTATION_270:
+        orientedWidth = mDisplayHeight;
+        orientedHeight = mDisplayWidth;
+        break;
+    default:
+        orientedWidth = mDisplayWidth;
+        orientedHeight = mDisplayHeight;
+        break;
+    }
+
+    uint32_t pointerCount = 0;
+    int32_t pointerIds[MAX_POINTERS];
+    PointerCoords pointerCoords[MAX_POINTERS];
+
+    const InputDevice::TouchScreenState::Precalculated& precalculated =
+            device->touchScreen.precalculated;
+
+    // Walk through the the active pointers and map touch screen coordinates (TouchData) into
+    // display coordinates (PointerCoords) and adjust for display orientation.
+    while (! idBits.isEmpty()) {
+        uint32_t id = idBits.firstMarkedBit();
+        idBits.clearBit(id);
+        uint32_t index = touch->idToIndex[id];
+
+        float x = float(touch->pointers[index].x
+                - precalculated.xOrigin) * precalculated.xScale;
+        float y = float(touch->pointers[index].y
+                - precalculated.yOrigin) * precalculated.yScale;
+        float pressure = float(touch->pointers[index].pressure
+                - precalculated.pressureOrigin) * precalculated.pressureScale;
+        float size = float(touch->pointers[index].size
+                - precalculated.sizeOrigin) * precalculated.sizeScale;
+
+        float orientation = float(touch->pointers[index].orientation)
+                * precalculated.orientationScale;
+
+        bool vertical = abs(orientation) <= M_PI / 8;
+
+        switch (mDisplayOrientation) {
+        case InputReaderPolicyInterface::ROTATION_90: {
+            float xTemp = x;
+            x = y;
+            y = mDisplayWidth - xTemp;
+            vertical = ! vertical;
+            break;
+        }
+        case InputReaderPolicyInterface::ROTATION_180: {
+            x = mDisplayWidth - x;
+            y = mDisplayHeight - y;
+            break;
+        }
+        case InputReaderPolicyInterface::ROTATION_270: {
+            float xTemp = x;
+            x = mDisplayHeight - y;
+            y = xTemp;
+            vertical = ! vertical;
+            break;
+        }
+        }
+
+        float touchMajor, touchMinor, toolMajor, toolMinor;
+        if (vertical) {
+            touchMajor = float(touch->pointers[index].touchMajor) * precalculated.yScale;
+            touchMinor = float(touch->pointers[index].touchMinor) * precalculated.xScale;
+            toolMajor = float(touch->pointers[index].toolMajor) * precalculated.yScale;
+            toolMinor = float(touch->pointers[index].toolMinor) * precalculated.xScale;
+        } else {
+            touchMajor = float(touch->pointers[index].touchMajor) * precalculated.xScale;
+            touchMinor = float(touch->pointers[index].touchMinor) * precalculated.yScale;
+            toolMajor = float(touch->pointers[index].toolMajor) * precalculated.xScale;
+            toolMinor = float(touch->pointers[index].toolMinor) * precalculated.yScale;
+        }
+
+        pointerIds[pointerCount] = int32_t(id);
+
+        pointerCoords[pointerCount].x = x;
+        pointerCoords[pointerCount].y = y;
+        pointerCoords[pointerCount].pressure = pressure;
+        pointerCoords[pointerCount].size = size;
+        pointerCoords[pointerCount].touchMajor = touchMajor;
+        pointerCoords[pointerCount].touchMinor = touchMinor;
+        pointerCoords[pointerCount].toolMajor = toolMajor;
+        pointerCoords[pointerCount].toolMinor = toolMinor;
+        pointerCoords[pointerCount].orientation = orientation;
+
+        if (id == changedId) {
+            motionEventAction |= pointerCount << AMOTION_EVENT_ACTION_POINTER_INDEX_SHIFT;
+        }
+
+        pointerCount += 1;
+    }
+
+    // Check edge flags by looking only at the first pointer since the flags are
+    // global to the event.
+    int32_t motionEventEdgeFlags = 0;
+    if (motionEventAction == AMOTION_EVENT_ACTION_DOWN) {
+        if (pointerCoords[0].x <= 0) {
+            motionEventEdgeFlags |= AMOTION_EVENT_EDGE_FLAG_LEFT;
+        } else if (pointerCoords[0].x >= orientedWidth) {
+            motionEventEdgeFlags |= AMOTION_EVENT_EDGE_FLAG_RIGHT;
+        }
+        if (pointerCoords[0].y <= 0) {
+            motionEventEdgeFlags |= AMOTION_EVENT_EDGE_FLAG_TOP;
+        } else if (pointerCoords[0].y >= orientedHeight) {
+            motionEventEdgeFlags |= AMOTION_EVENT_EDGE_FLAG_BOTTOM;
+        }
+    }
+
+    nsecs_t downTime = device->touchScreen.downTime;
+    mDispatcher->notifyMotion(when, device->id, AINPUT_SOURCE_TOUCHSCREEN, policyFlags,
+            motionEventAction, globalMetaState(), motionEventEdgeFlags,
+            pointerCount, pointerIds, pointerCoords,
+            0, 0, downTime);
+}
+
+void InputReader::onTrackballStateChanged(nsecs_t when,
+        InputDevice* device) {
+    static const uint32_t DELTA_FIELDS =
+            InputDevice::TrackballState::Accumulator::FIELD_REL_X
+            | InputDevice::TrackballState::Accumulator::FIELD_REL_Y;
+
+    /* Refresh display properties so we can trackball moves according to display orientation */
+
+    if (! refreshDisplayProperties()) {
+        return;
+    }
+
+    /* Update device state */
+
+    uint32_t fields = device->trackball.accumulator.fields;
+    bool downChanged = fields & InputDevice::TrackballState::Accumulator::FIELD_BTN_MOUSE;
+    bool deltaChanged = fields & DELTA_FIELDS;
+
+    bool down;
+    if (downChanged) {
+        if (device->trackball.accumulator.btnMouse) {
+            device->trackball.current.down = true;
+            device->trackball.current.downTime = when;
+            down = true;
+        } else {
+            device->trackball.current.down = false;
+            down = false;
+        }
+    } else {
+        down = device->trackball.current.down;
+    }
+
+    /* Apply policy */
+
+    int32_t policyActions = mPolicy->interceptTrackball(when, downChanged, down, deltaChanged);
+
+    uint32_t policyFlags = 0;
+    if (! applyStandardInputDispatchPolicyActions(when, policyActions, & policyFlags)) {
+        return; // event dropped
+    }
+
+    /* Enqueue motion event for dispatch */
+
+    int32_t motionEventAction;
+    if (downChanged) {
+        motionEventAction = down ? AMOTION_EVENT_ACTION_DOWN : AMOTION_EVENT_ACTION_UP;
+    } else {
+        motionEventAction = AMOTION_EVENT_ACTION_MOVE;
+    }
+
+    int32_t pointerId = 0;
+    PointerCoords pointerCoords;
+    pointerCoords.x = fields & InputDevice::TrackballState::Accumulator::FIELD_REL_X
+            ? device->trackball.accumulator.relX * device->trackball.precalculated.xScale : 0;
+    pointerCoords.y = fields & InputDevice::TrackballState::Accumulator::FIELD_REL_Y
+            ? device->trackball.accumulator.relY * device->trackball.precalculated.yScale : 0;
+    pointerCoords.pressure = 1.0f; // XXX Consider making this 1.0f if down, 0 otherwise.
+    pointerCoords.size = 0;
+    pointerCoords.touchMajor = 0;
+    pointerCoords.touchMinor = 0;
+    pointerCoords.toolMajor = 0;
+    pointerCoords.toolMinor = 0;
+    pointerCoords.orientation = 0;
+
+    float temp;
+    switch (mDisplayOrientation) {
+    case InputReaderPolicyInterface::ROTATION_90:
+        temp = pointerCoords.x;
+        pointerCoords.x = pointerCoords.y;
+        pointerCoords.y = - temp;
+        break;
+
+    case InputReaderPolicyInterface::ROTATION_180:
+        pointerCoords.x = - pointerCoords.x;
+        pointerCoords.y = - pointerCoords.y;
+        break;
+
+    case InputReaderPolicyInterface::ROTATION_270:
+        temp = pointerCoords.x;
+        pointerCoords.x = - pointerCoords.y;
+        pointerCoords.y = temp;
+        break;
+    }
+
+    mDispatcher->notifyMotion(when, device->id, AINPUT_SOURCE_TRACKBALL, policyFlags,
+            motionEventAction, globalMetaState(), AMOTION_EVENT_EDGE_FLAG_NONE,
+            1, & pointerId, & pointerCoords,
+            device->trackball.precalculated.xPrecision,
+            device->trackball.precalculated.yPrecision,
+            device->trackball.current.downTime);
+}
+
+void InputReader::onConfigurationChanged(nsecs_t when) {
+    // Reset global meta state because it depends on the list of all configured devices.
+    resetGlobalMetaState();
+
+    // Reset virtual keys, just in case.
+    updateExportedVirtualKeyState();
+
+    // Update input configuration.
+    updateExportedInputConfiguration();
+
+    // Enqueue configuration changed.
+    mDispatcher->notifyConfigurationChanged(when);
+}
+
+bool InputReader::applyStandardInputDispatchPolicyActions(nsecs_t when,
+        int32_t policyActions, uint32_t* policyFlags) {
+    if (policyActions & InputReaderPolicyInterface::ACTION_APP_SWITCH_COMING) {
+        mDispatcher->notifyAppSwitchComing(when);
+    }
+
+    if (policyActions & InputReaderPolicyInterface::ACTION_WOKE_HERE) {
+        *policyFlags |= POLICY_FLAG_WOKE_HERE;
+    }
+
+    if (policyActions & InputReaderPolicyInterface::ACTION_BRIGHT_HERE) {
+        *policyFlags |= POLICY_FLAG_BRIGHT_HERE;
+    }
+
+    return policyActions & InputReaderPolicyInterface::ACTION_DISPATCH;
+}
+
+void InputReader::resetDisplayProperties() {
+    mDisplayWidth = mDisplayHeight = -1;
+    mDisplayOrientation = -1;
+}
+
+bool InputReader::refreshDisplayProperties() {
+    int32_t newWidth, newHeight, newOrientation;
+    if (mPolicy->getDisplayInfo(0, & newWidth, & newHeight, & newOrientation)) {
+        if (newWidth != mDisplayWidth || newHeight != mDisplayHeight) {
+            LOGD("Display size changed from %dx%d to %dx%d, updating device configuration",
+                    mDisplayWidth, mDisplayHeight, newWidth, newHeight);
+
+            mDisplayWidth = newWidth;
+            mDisplayHeight = newHeight;
+
+            for (size_t i = 0; i < mDevices.size(); i++) {
+                configureDeviceForCurrentDisplaySize(mDevices.valueAt(i));
+            }
+        }
+
+        if (newOrientation != mDisplayOrientation) {
+            LOGD("Display orientation changed to %d", mDisplayOrientation);
+
+            mDisplayOrientation = newOrientation;
+        }
+        return true;
+    } else {
+        resetDisplayProperties();
+        return false;
+    }
+}
+
+InputDevice* InputReader::getDevice(int32_t deviceId) {
+    ssize_t index = mDevices.indexOfKey(deviceId);
+    return index >= 0 ? mDevices.valueAt((size_t) index) : NULL;
+}
+
+InputDevice* InputReader::getNonIgnoredDevice(int32_t deviceId) {
+    InputDevice* device = getDevice(deviceId);
+    return device && ! device->ignored ? device : NULL;
+}
+
+void InputReader::addDevice(nsecs_t when, int32_t deviceId) {
+    uint32_t classes = mEventHub->getDeviceClasses(deviceId);
+    String8 name = mEventHub->getDeviceName(deviceId);
+    InputDevice* device = new InputDevice(deviceId, classes, name);
+
+    if (classes != 0) {
+        LOGI("Device added: id=0x%x, name=%s, classes=%02x", device->id,
+                device->name.string(), device->classes);
+
+        configureDevice(device);
+    } else {
+        LOGI("Device added: id=0x%x, name=%s (ignored non-input device)", device->id,
+                device->name.string());
+
+        device->ignored = true;
+    }
+
+    device->reset();
+
+    mDevices.add(deviceId, device);
+
+    if (! device->ignored) {
+        onConfigurationChanged(when);
+    }
+}
+
+void InputReader::removeDevice(nsecs_t when, InputDevice* device) {
+    mDevices.removeItem(device->id);
+
+    if (! device->ignored) {
+        LOGI("Device removed: id=0x%x, name=%s, classes=%02x", device->id,
+                device->name.string(), device->classes);
+
+        onConfigurationChanged(when);
+    } else {
+        LOGI("Device removed: id=0x%x, name=%s (ignored non-input device)", device->id,
+                device->name.string());
+    }
+
+    delete device;
+}
+
+void InputReader::configureDevice(InputDevice* device) {
+    if (device->isMultiTouchScreen()) {
+        configureAbsoluteAxisInfo(device, ABS_MT_POSITION_X, "X",
+                & device->touchScreen.parameters.xAxis);
+        configureAbsoluteAxisInfo(device, ABS_MT_POSITION_Y, "Y",
+                & device->touchScreen.parameters.yAxis);
+        configureAbsoluteAxisInfo(device, ABS_MT_TOUCH_MAJOR, "Pressure",
+                & device->touchScreen.parameters.pressureAxis);
+        configureAbsoluteAxisInfo(device, ABS_MT_WIDTH_MAJOR, "Size",
+                & device->touchScreen.parameters.sizeAxis);
+        configureAbsoluteAxisInfo(device, ABS_MT_ORIENTATION, "Orientation",
+                & device->touchScreen.parameters.orientationAxis);
+    } else if (device->isSingleTouchScreen()) {
+        configureAbsoluteAxisInfo(device, ABS_X, "X",
+                & device->touchScreen.parameters.xAxis);
+        configureAbsoluteAxisInfo(device, ABS_Y, "Y",
+                & device->touchScreen.parameters.yAxis);
+        configureAbsoluteAxisInfo(device, ABS_PRESSURE, "Pressure",
+                & device->touchScreen.parameters.pressureAxis);
+        configureAbsoluteAxisInfo(device, ABS_TOOL_WIDTH, "Size",
+                & device->touchScreen.parameters.sizeAxis);
+        device->touchScreen.parameters.orientationAxis.valid = false;
+    }
+
+    if (device->isTouchScreen()) {
+        device->touchScreen.parameters.useBadTouchFilter =
+                mPolicy->filterTouchEvents();
+        device->touchScreen.parameters.useAveragingTouchFilter =
+                mPolicy->filterTouchEvents();
+        device->touchScreen.parameters.useJumpyTouchFilter =
+                mPolicy->filterJumpyTouchEvents();
+
+        if (device->touchScreen.parameters.pressureAxis.valid) {
+            device->touchScreen.precalculated.pressureOrigin =
+                    device->touchScreen.parameters.pressureAxis.minValue;
+            device->touchScreen.precalculated.pressureScale =
+                    1.0f / device->touchScreen.parameters.pressureAxis.range;
+        } else {
+            device->touchScreen.precalculated.pressureOrigin = 0;
+            device->touchScreen.precalculated.pressureScale = 1.0f;
+        }
+
+        if (device->touchScreen.parameters.sizeAxis.valid) {
+            device->touchScreen.precalculated.sizeOrigin =
+                    device->touchScreen.parameters.sizeAxis.minValue;
+            device->touchScreen.precalculated.sizeScale =
+                    1.0f / device->touchScreen.parameters.sizeAxis.range;
+        } else {
+            device->touchScreen.precalculated.sizeOrigin = 0;
+            device->touchScreen.precalculated.sizeScale = 1.0f;
+        }
+
+        if (device->touchScreen.parameters.orientationAxis.valid
+                && device->touchScreen.parameters.orientationAxis.maxValue > 0) {
+            device->touchScreen.precalculated.orientationScale =
+                    M_PI_4 / device->touchScreen.parameters.orientationAxis.maxValue;
+        } else {
+            device->touchScreen.precalculated.orientationScale = 0.0f;
+        }
+    }
+
+    if (device->isTrackball()) {
+        device->trackball.precalculated.xPrecision = TRACKBALL_MOVEMENT_THRESHOLD;
+        device->trackball.precalculated.yPrecision = TRACKBALL_MOVEMENT_THRESHOLD;
+        device->trackball.precalculated.xScale = 1.0f / TRACKBALL_MOVEMENT_THRESHOLD;
+        device->trackball.precalculated.yScale = 1.0f / TRACKBALL_MOVEMENT_THRESHOLD;
+    }
+
+    configureDeviceForCurrentDisplaySize(device);
+}
+
+void InputReader::configureDeviceForCurrentDisplaySize(InputDevice* device) {
+    if (device->isTouchScreen()) {
+        if (device->touchScreen.parameters.xAxis.valid
+                && device->touchScreen.parameters.yAxis.valid) {
+            device->touchScreen.precalculated.xOrigin =
+                    device->touchScreen.parameters.xAxis.minValue;
+            device->touchScreen.precalculated.yOrigin =
+                    device->touchScreen.parameters.yAxis.minValue;
+
+            if (mDisplayWidth < 0) {
+                LOGD("Skipping part of touch screen configuration since display size is unknown.");
+
+                device->touchScreen.precalculated.xScale = 1.0f;
+                device->touchScreen.precalculated.yScale = 1.0f;
+            } else {
+                LOGI("Device configured: id=0x%x, name=%s (display size was changed)", device->id,
+                        device->name.string());
+
+                device->touchScreen.precalculated.xScale =
+                        float(mDisplayWidth) / device->touchScreen.parameters.xAxis.range;
+                device->touchScreen.precalculated.yScale =
+                        float(mDisplayHeight) / device->touchScreen.parameters.yAxis.range;
+
+                configureVirtualKeys(device);
+            }
+        } else {
+            device->touchScreen.precalculated.xOrigin = 0;
+            device->touchScreen.precalculated.xScale = 1.0f;
+            device->touchScreen.precalculated.yOrigin = 0;
+            device->touchScreen.precalculated.yScale = 1.0f;
+        }
+    }
+}
+
+void InputReader::configureVirtualKeys(InputDevice* device) {
+    assert(device->touchScreen.parameters.xAxis.valid
+            && device->touchScreen.parameters.yAxis.valid);
+
+    device->touchScreen.virtualKeys.clear();
+
+    Vector<InputReaderPolicyInterface::VirtualKeyDefinition> virtualKeyDefinitions;
+    mPolicy->getVirtualKeyDefinitions(device->name, virtualKeyDefinitions);
+    if (virtualKeyDefinitions.size() == 0) {
+        return;
+    }
+
+    device->touchScreen.virtualKeys.setCapacity(virtualKeyDefinitions.size());
+
+    int32_t touchScreenLeft = device->touchScreen.parameters.xAxis.minValue;
+    int32_t touchScreenTop = device->touchScreen.parameters.yAxis.minValue;
+    int32_t touchScreenWidth = device->touchScreen.parameters.xAxis.range;
+    int32_t touchScreenHeight = device->touchScreen.parameters.yAxis.range;
+
+    for (size_t i = 0; i < virtualKeyDefinitions.size(); i++) {
+        const InputReaderPolicyInterface::VirtualKeyDefinition& virtualKeyDefinition =
+                virtualKeyDefinitions[i];
+
+        device->touchScreen.virtualKeys.add();
+        InputDevice::VirtualKey& virtualKey =
+                device->touchScreen.virtualKeys.editTop();
+
+        virtualKey.scanCode = virtualKeyDefinition.scanCode;
+        int32_t keyCode;
+        uint32_t flags;
+        if (mEventHub->scancodeToKeycode(device->id, virtualKey.scanCode,
+                & keyCode, & flags)) {
+            LOGW("  VirtualKey %d: could not obtain key code, ignoring", virtualKey.scanCode);
+            device->touchScreen.virtualKeys.pop(); // drop the key
+            continue;
+        }
+
+        virtualKey.keyCode = keyCode;
+        virtualKey.flags = flags;
+
+        // convert the key definition's display coordinates into touch coordinates for a hit box
+        int32_t halfWidth = virtualKeyDefinition.width / 2;
+        int32_t halfHeight = virtualKeyDefinition.height / 2;
+
+        virtualKey.hitLeft = (virtualKeyDefinition.centerX - halfWidth)
+                * touchScreenWidth / mDisplayWidth + touchScreenLeft;
+        virtualKey.hitRight= (virtualKeyDefinition.centerX + halfWidth)
+                * touchScreenWidth / mDisplayWidth + touchScreenLeft;
+        virtualKey.hitTop = (virtualKeyDefinition.centerY - halfHeight)
+                * touchScreenHeight / mDisplayHeight + touchScreenTop;
+        virtualKey.hitBottom = (virtualKeyDefinition.centerY + halfHeight)
+                * touchScreenHeight / mDisplayHeight + touchScreenTop;
+
+        LOGI("  VirtualKey %d: keyCode=%d hitLeft=%d hitRight=%d hitTop=%d hitBottom=%d",
+                virtualKey.scanCode, virtualKey.keyCode,
+                virtualKey.hitLeft, virtualKey.hitRight, virtualKey.hitTop, virtualKey.hitBottom);
+    }
+}
+
+void InputReader::configureAbsoluteAxisInfo(InputDevice* device,
+        int axis, const char* name, InputDevice::AbsoluteAxisInfo* out) {
+    if (! mEventHub->getAbsoluteInfo(device->id, axis,
+            & out->minValue, & out->maxValue, & out->flat, &out->fuzz)) {
+        out->range = out->maxValue - out->minValue;
+        if (out->range != 0) {
+            LOGI("  %s: min=%d max=%d flat=%d fuzz=%d",
+                    name, out->minValue, out->maxValue, out->flat, out->fuzz);
+            out->valid = true;
+            return;
+        }
+    }
+
+    out->valid = false;
+    out->minValue = 0;
+    out->maxValue = 0;
+    out->flat = 0;
+    out->fuzz = 0;
+    out->range = 0;
+    LOGI("  %s: unknown axis values, marking as invalid", name);
+}
+
+void InputReader::configureExcludedDevices() {
+    Vector<String8> excludedDeviceNames;
+    mPolicy->getExcludedDeviceNames(excludedDeviceNames);
+
+    for (size_t i = 0; i < excludedDeviceNames.size(); i++) {
+        mEventHub->addExcludedDevice(excludedDeviceNames[i]);
+    }
+}
+
+void InputReader::resetGlobalMetaState() {
+    mGlobalMetaState = -1;
+}
+
+int32_t InputReader::globalMetaState() {
+    if (mGlobalMetaState == -1) {
+        mGlobalMetaState = 0;
+        for (size_t i = 0; i < mDevices.size(); i++) {
+            InputDevice* device = mDevices.valueAt(i);
+            if (device->isKeyboard()) {
+                mGlobalMetaState |= device->keyboard.current.metaState;
+            }
+        }
+    }
+    return mGlobalMetaState;
+}
+
+void InputReader::updateExportedVirtualKeyState() {
+    int32_t keyCode = -1, scanCode = -1;
+
+    for (size_t i = 0; i < mDevices.size(); i++) {
+        InputDevice* device = mDevices.valueAt(i);
+        if (device->isTouchScreen()) {
+            if (device->touchScreen.currentVirtualKey.status
+                    == InputDevice::TouchScreenState::CurrentVirtualKeyState::STATUS_DOWN) {
+                keyCode = device->touchScreen.currentVirtualKey.keyCode;
+                scanCode = device->touchScreen.currentVirtualKey.scanCode;
+            }
+        }
+    }
+
+    { // acquire exported state lock
+        AutoMutex _l(mExportedStateLock);
+
+        mExportedVirtualKeyCode = keyCode;
+        mExportedVirtualScanCode = scanCode;
+    } // release exported state lock
+}
+
+bool InputReader::getCurrentVirtualKey(int32_t* outKeyCode, int32_t* outScanCode) const {
+    { // acquire exported state lock
+        AutoMutex _l(mExportedStateLock);
+
+        *outKeyCode = mExportedVirtualKeyCode;
+        *outScanCode = mExportedVirtualScanCode;
+        return mExportedVirtualKeyCode != -1;
+    } // release exported state lock
+}
+
+void InputReader::updateExportedInputConfiguration() {
+    int32_t touchScreenConfig = InputConfiguration::TOUCHSCREEN_NOTOUCH;
+    int32_t keyboardConfig = InputConfiguration::KEYBOARD_NOKEYS;
+    int32_t navigationConfig = InputConfiguration::NAVIGATION_NONAV;
+
+    for (size_t i = 0; i < mDevices.size(); i++) {
+        InputDevice* device = mDevices.valueAt(i);
+        int32_t deviceClasses = device->classes;
+
+        if (deviceClasses & INPUT_DEVICE_CLASS_TOUCHSCREEN) {
+            touchScreenConfig = InputConfiguration::TOUCHSCREEN_FINGER;
+        }
+        if (deviceClasses & INPUT_DEVICE_CLASS_ALPHAKEY) {
+            keyboardConfig = InputConfiguration::KEYBOARD_QWERTY;
+        }
+        if (deviceClasses & INPUT_DEVICE_CLASS_TRACKBALL) {
+            navigationConfig = InputConfiguration::NAVIGATION_TRACKBALL;
+        } else if (deviceClasses & INPUT_DEVICE_CLASS_DPAD) {
+            navigationConfig = InputConfiguration::NAVIGATION_DPAD;
+        }
+    }
+
+    { // acquire exported state lock
+        AutoMutex _l(mExportedStateLock);
+
+        mExportedInputConfiguration.touchScreen = touchScreenConfig;
+        mExportedInputConfiguration.keyboard = keyboardConfig;
+        mExportedInputConfiguration.navigation = navigationConfig;
+    } // release exported state lock
+}
+
+void InputReader::getCurrentInputConfiguration(InputConfiguration* outConfiguration) const {
+    { // acquire exported state lock
+        AutoMutex _l(mExportedStateLock);
+
+        *outConfiguration = mExportedInputConfiguration;
+    } // release exported state lock
+}
+
+int32_t InputReader::getCurrentScanCodeState(int32_t deviceId, int32_t deviceClasses,
+        int32_t scanCode) const {
+    { // acquire exported state lock
+        AutoMutex _l(mExportedStateLock);
+
+        if (mExportedVirtualScanCode == scanCode) {
+            return AKEY_STATE_VIRTUAL;
+        }
+    } // release exported state lock
+
+    return mEventHub->getScanCodeState(deviceId, deviceClasses, scanCode);
+}
+
+int32_t InputReader::getCurrentKeyCodeState(int32_t deviceId, int32_t deviceClasses,
+        int32_t keyCode) const {
+    { // acquire exported state lock
+        AutoMutex _l(mExportedStateLock);
+
+        if (mExportedVirtualKeyCode == keyCode) {
+            return AKEY_STATE_VIRTUAL;
+        }
+    } // release exported state lock
+
+    return mEventHub->getKeyCodeState(deviceId, deviceClasses, keyCode);
+}
+
+int32_t InputReader::getCurrentSwitchState(int32_t deviceId, int32_t deviceClasses,
+        int32_t sw) const {
+    return mEventHub->getSwitchState(deviceId, deviceClasses, sw);
+}
+
+bool InputReader::hasKeys(size_t numCodes, const int32_t* keyCodes, uint8_t* outFlags) const {
+    return mEventHub->hasKeys(numCodes, keyCodes, outFlags);
+}
+
+
+// --- InputReaderThread ---
+
+InputReaderThread::InputReaderThread(const sp<InputReaderInterface>& reader) :
+        Thread(/*canCallJava*/ true), mReader(reader) {
+}
+
+InputReaderThread::~InputReaderThread() {
+}
+
+bool InputReaderThread::threadLoop() {
+    mReader->loopOnce();
+    return true;
+}
+
+} // namespace android
diff --git a/libs/ui/InputTransport.cpp b/libs/ui/InputTransport.cpp
new file mode 100644
index 0000000..cf0f63e
--- /dev/null
+++ b/libs/ui/InputTransport.cpp
@@ -0,0 +1,692 @@
+//
+// Copyright 2010 The Android Open Source Project
+//
+// Provides a shared memory transport for input events.
+//
+#define LOG_TAG "InputTransport"
+
+//#define LOG_NDEBUG 0
+
+// Log debug messages about channel signalling (send signal, receive signal)
+#define DEBUG_CHANNEL_SIGNALS 0
+
+// Log debug messages whenever InputChannel objects are created/destroyed
+#define DEBUG_CHANNEL_LIFECYCLE 0
+
+// Log debug messages about transport actions (initialize, reset, publish, ...)
+#define DEBUG_TRANSPORT_ACTIONS 0
+
+
+#include <cutils/ashmem.h>
+#include <cutils/log.h>
+#include <errno.h>
+#include <fcntl.h>
+#include <sys/mman.h>
+#include <ui/InputTransport.h>
+#include <unistd.h>
+
+namespace android {
+
+// Must be at least sizeof(InputMessage) + sufficient space for pointer data
+static const int DEFAULT_MESSAGE_BUFFER_SIZE = 16384;
+
+// Signal sent by the producer to the consumer to inform it that a new message is
+// available to be consumed in the shared memory buffer.
+static const char INPUT_SIGNAL_DISPATCH = 'D';
+
+// Signal sent by the consumer to the producer to inform it that it has finished
+// consuming the most recent message.
+static const char INPUT_SIGNAL_FINISHED = 'f';
+
+
+// --- InputChannel ---
+
+InputChannel::InputChannel(const String8& name, int32_t ashmemFd, int32_t receivePipeFd,
+        int32_t sendPipeFd) :
+        mName(name), mAshmemFd(ashmemFd), mReceivePipeFd(receivePipeFd), mSendPipeFd(sendPipeFd) {
+#if DEBUG_CHANNEL_LIFECYCLE
+    LOGD("Input channel constructed: name='%s', ashmemFd=%d, receivePipeFd=%d, sendPipeFd=%d",
+            mName.string(), ashmemFd, receivePipeFd, sendPipeFd);
+#endif
+
+    int result = fcntl(mReceivePipeFd, F_SETFL, O_NONBLOCK);
+    LOG_ALWAYS_FATAL_IF(result != 0, "channel '%s' ~ Could not make receive pipe "
+            "non-blocking.  errno=%d", mName.string(), errno);
+
+    result = fcntl(mSendPipeFd, F_SETFL, O_NONBLOCK);
+    LOG_ALWAYS_FATAL_IF(result != 0, "channel '%s' ~ Could not make send pipe "
+            "non-blocking.  errno=%d", mName.string(), errno);
+}
+
+InputChannel::~InputChannel() {
+#if DEBUG_CHANNEL_LIFECYCLE
+    LOGD("Input channel destroyed: name='%s', ashmemFd=%d, receivePipeFd=%d, sendPipeFd=%d",
+            mName.string(), mAshmemFd, mReceivePipeFd, mSendPipeFd);
+#endif
+
+    ::close(mAshmemFd);
+    ::close(mReceivePipeFd);
+    ::close(mSendPipeFd);
+}
+
+status_t InputChannel::openInputChannelPair(const String8& name,
+        sp<InputChannel>& outServerChannel, sp<InputChannel>& outClientChannel) {
+    status_t result;
+
+    int serverAshmemFd = ashmem_create_region(name.string(), DEFAULT_MESSAGE_BUFFER_SIZE);
+    if (serverAshmemFd < 0) {
+        result = -errno;
+        LOGE("channel '%s' ~ Could not create shared memory region. errno=%d",
+                name.string(), errno);
+    } else {
+        result = ashmem_set_prot_region(serverAshmemFd, PROT_READ | PROT_WRITE);
+        if (result < 0) {
+            LOGE("channel '%s' ~ Error %d trying to set protection of ashmem fd %d.",
+                    name.string(), result, serverAshmemFd);
+        } else {
+            // Dup the file descriptor because the server and client input channel objects that
+            // are returned may have different lifetimes but they share the same shared memory region.
+            int clientAshmemFd;
+            clientAshmemFd = dup(serverAshmemFd);
+            if (clientAshmemFd < 0) {
+                result = -errno;
+                LOGE("channel '%s' ~ Could not dup() shared memory region fd. errno=%d",
+                        name.string(), errno);
+            } else {
+                int forward[2];
+                if (pipe(forward)) {
+                    result = -errno;
+                    LOGE("channel '%s' ~ Could not create forward pipe.  errno=%d",
+                            name.string(), errno);
+                } else {
+                    int reverse[2];
+                    if (pipe(reverse)) {
+                        result = -errno;
+                        LOGE("channel '%s' ~ Could not create reverse pipe.  errno=%d",
+                                name.string(), errno);
+                    } else {
+                        String8 serverChannelName = name;
+                        serverChannelName.append(" (server)");
+                        outServerChannel = new InputChannel(serverChannelName,
+                                serverAshmemFd, reverse[0], forward[1]);
+
+                        String8 clientChannelName = name;
+                        clientChannelName.append(" (client)");
+                        outClientChannel = new InputChannel(clientChannelName,
+                                clientAshmemFd, forward[0], reverse[1]);
+                        return OK;
+                    }
+                    ::close(forward[0]);
+                    ::close(forward[1]);
+                }
+                ::close(clientAshmemFd);
+            }
+        }
+        ::close(serverAshmemFd);
+    }
+
+    outServerChannel.clear();
+    outClientChannel.clear();
+    return result;
+}
+
+status_t InputChannel::sendSignal(char signal) {
+    ssize_t nWrite = ::write(mSendPipeFd, & signal, 1);
+
+    if (nWrite == 1) {
+#if DEBUG_CHANNEL_SIGNALS
+        LOGD("channel '%s' ~ sent signal '%c'", mName.string(), signal);
+#endif
+        return OK;
+    }
+
+#if DEBUG_CHANNEL_SIGNALS
+    LOGD("channel '%s' ~ error sending signal '%c', errno=%d", mName.string(), signal, errno);
+#endif
+    return -errno;
+}
+
+status_t InputChannel::receiveSignal(char* outSignal) {
+    ssize_t nRead = ::read(mReceivePipeFd, outSignal, 1);
+    if (nRead == 1) {
+#if DEBUG_CHANNEL_SIGNALS
+        LOGD("channel '%s' ~ received signal '%c'", mName.string(), *outSignal);
+#endif
+        return OK;
+    }
+
+    if (nRead == 0) { // check for EOF
+#if DEBUG_CHANNEL_SIGNALS
+        LOGD("channel '%s' ~ receive signal failed because peer was closed", mName.string());
+#endif
+        return DEAD_OBJECT;
+    }
+
+    if (errno == EAGAIN) {
+#if DEBUG_CHANNEL_SIGNALS
+        LOGD("channel '%s' ~ receive signal failed because no signal available", mName.string());
+#endif
+        return WOULD_BLOCK;
+    }
+
+#if DEBUG_CHANNEL_SIGNALS
+    LOGD("channel '%s' ~ receive signal failed, errno=%d", mName.string(), errno);
+#endif
+    return -errno;
+}
+
+
+// --- InputPublisher ---
+
+InputPublisher::InputPublisher(const sp<InputChannel>& channel) :
+        mChannel(channel), mSharedMessage(NULL),
+        mPinned(false), mSemaphoreInitialized(false), mWasDispatched(false),
+        mMotionEventSampleDataTail(NULL) {
+}
+
+InputPublisher::~InputPublisher() {
+    reset();
+
+    if (mSharedMessage) {
+        munmap(mSharedMessage, mAshmemSize);
+    }
+}
+
+status_t InputPublisher::initialize() {
+#if DEBUG_TRANSPORT_ACTIONS
+    LOGD("channel '%s' publisher ~ initialize",
+            mChannel->getName().string());
+#endif
+
+    int ashmemFd = mChannel->getAshmemFd();
+    int result = ashmem_get_size_region(ashmemFd);
+    if (result < 0) {
+        LOGE("channel '%s' publisher ~ Error %d getting size of ashmem fd %d.",
+                mChannel->getName().string(), result, ashmemFd);
+        return UNKNOWN_ERROR;
+    }
+    mAshmemSize = (size_t) result;
+
+    mSharedMessage = static_cast<InputMessage*>(mmap(NULL, mAshmemSize,
+            PROT_READ | PROT_WRITE, MAP_SHARED, ashmemFd, 0));
+    if (! mSharedMessage) {
+        LOGE("channel '%s' publisher ~ mmap failed on ashmem fd %d.",
+                mChannel->getName().string(), ashmemFd);
+        return NO_MEMORY;
+    }
+
+    mPinned = true;
+    mSharedMessage->consumed = false;
+
+    return reset();
+}
+
+status_t InputPublisher::reset() {
+#if DEBUG_TRANSPORT_ACTIONS
+    LOGD("channel '%s' publisher ~ reset",
+        mChannel->getName().string());
+#endif
+
+    if (mPinned) {
+        // Destroy the semaphore since we are about to unpin the memory region that contains it.
+        int result;
+        if (mSemaphoreInitialized) {
+            if (mSharedMessage->consumed) {
+                result = sem_post(& mSharedMessage->semaphore);
+                if (result < 0) {
+                    LOGE("channel '%s' publisher ~ Error %d in sem_post.",
+                            mChannel->getName().string(), errno);
+                    return UNKNOWN_ERROR;
+                }
+            }
+
+            result = sem_destroy(& mSharedMessage->semaphore);
+            if (result < 0) {
+                LOGE("channel '%s' publisher ~ Error %d in sem_destroy.",
+                        mChannel->getName().string(), errno);
+                return UNKNOWN_ERROR;
+            }
+
+            mSemaphoreInitialized = false;
+        }
+
+        // Unpin the region since we no longer care about its contents.
+        int ashmemFd = mChannel->getAshmemFd();
+        result = ashmem_unpin_region(ashmemFd, 0, 0);
+        if (result < 0) {
+            LOGE("channel '%s' publisher ~ Error %d unpinning ashmem fd %d.",
+                    mChannel->getName().string(), result, ashmemFd);
+            return UNKNOWN_ERROR;
+        }
+
+        mPinned = false;
+    }
+
+    mMotionEventSampleDataTail = NULL;
+    mWasDispatched = false;
+    return OK;
+}
+
+status_t InputPublisher::publishInputEvent(
+        int32_t type,
+        int32_t deviceId,
+        int32_t source) {
+    if (mPinned) {
+        LOGE("channel '%s' publisher ~ Attempted to publish a new event but publisher has "
+                "not yet been reset.", mChannel->getName().string());
+        return INVALID_OPERATION;
+    }
+
+    // Pin the region.
+    // We do not check for ASHMEM_NOT_PURGED because we don't care about the previous
+    // contents of the buffer so it does not matter whether it was purged in the meantime.
+    int ashmemFd = mChannel->getAshmemFd();
+    int result = ashmem_pin_region(ashmemFd, 0, 0);
+    if (result < 0) {
+        LOGE("channel '%s' publisher ~ Error %d pinning ashmem fd %d.",
+                mChannel->getName().string(), result, ashmemFd);
+        return UNKNOWN_ERROR;
+    }
+
+    mPinned = true;
+
+    result = sem_init(& mSharedMessage->semaphore, 1, 1);
+    if (result < 0) {
+        LOGE("channel '%s' publisher ~ Error %d in sem_init.",
+                mChannel->getName().string(), errno);
+        return UNKNOWN_ERROR;
+    }
+
+    mSemaphoreInitialized = true;
+
+    mSharedMessage->consumed = false;
+    mSharedMessage->type = type;
+    mSharedMessage->deviceId = deviceId;
+    mSharedMessage->source = source;
+    return OK;
+}
+
+status_t InputPublisher::publishKeyEvent(
+        int32_t deviceId,
+        int32_t source,
+        int32_t action,
+        int32_t flags,
+        int32_t keyCode,
+        int32_t scanCode,
+        int32_t metaState,
+        int32_t repeatCount,
+        nsecs_t downTime,
+        nsecs_t eventTime) {
+#if DEBUG_TRANSPORT_ACTIONS
+    LOGD("channel '%s' publisher ~ publishKeyEvent: deviceId=%d, source=%d, "
+            "action=%d, flags=%d, keyCode=%d, scanCode=%d, metaState=%d, repeatCount=%d,"
+            "downTime=%lld, eventTime=%lld",
+            mChannel->getName().string(),
+            deviceId, source, action, flags, keyCode, scanCode, metaState, repeatCount,
+            downTime, eventTime);
+#endif
+
+    status_t result = publishInputEvent(AINPUT_EVENT_TYPE_KEY, deviceId, source);
+    if (result < 0) {
+        return result;
+    }
+
+    mSharedMessage->key.action = action;
+    mSharedMessage->key.flags = flags;
+    mSharedMessage->key.keyCode = keyCode;
+    mSharedMessage->key.scanCode = scanCode;
+    mSharedMessage->key.metaState = metaState;
+    mSharedMessage->key.repeatCount = repeatCount;
+    mSharedMessage->key.downTime = downTime;
+    mSharedMessage->key.eventTime = eventTime;
+    return OK;
+}
+
+status_t InputPublisher::publishMotionEvent(
+        int32_t deviceId,
+        int32_t source,
+        int32_t action,
+        int32_t edgeFlags,
+        int32_t metaState,
+        float xOffset,
+        float yOffset,
+        float xPrecision,
+        float yPrecision,
+        nsecs_t downTime,
+        nsecs_t eventTime,
+        size_t pointerCount,
+        const int32_t* pointerIds,
+        const PointerCoords* pointerCoords) {
+#if DEBUG_TRANSPORT_ACTIONS
+    LOGD("channel '%s' publisher ~ publishMotionEvent: deviceId=%d, source=%d, "
+            "action=%d, edgeFlags=%d, metaState=%d, xOffset=%f, yOffset=%f, "
+            "xPrecision=%f, yPrecision=%f, downTime=%lld, eventTime=%lld, "
+            "pointerCount=%d",
+            mChannel->getName().string(),
+            deviceId, source, action, edgeFlags, metaState, xOffset, yOffset,
+            xPrecision, yPrecision, downTime, eventTime, pointerCount);
+#endif
+
+    if (pointerCount > MAX_POINTERS || pointerCount < 1) {
+        LOGE("channel '%s' publisher ~ Invalid number of pointers provided: %d.",
+                mChannel->getName().string(), pointerCount);
+        return BAD_VALUE;
+    }
+
+    status_t result = publishInputEvent(AINPUT_EVENT_TYPE_MOTION, deviceId, source);
+    if (result < 0) {
+        return result;
+    }
+
+    mSharedMessage->motion.action = action;
+    mSharedMessage->motion.edgeFlags = edgeFlags;
+    mSharedMessage->motion.metaState = metaState;
+    mSharedMessage->motion.xOffset = xOffset;
+    mSharedMessage->motion.yOffset = yOffset;
+    mSharedMessage->motion.xPrecision = xPrecision;
+    mSharedMessage->motion.yPrecision = yPrecision;
+    mSharedMessage->motion.downTime = downTime;
+    mSharedMessage->motion.pointerCount = pointerCount;
+
+    mSharedMessage->motion.sampleCount = 1;
+    mSharedMessage->motion.sampleData[0].eventTime = eventTime;
+
+    for (size_t i = 0; i < pointerCount; i++) {
+        mSharedMessage->motion.pointerIds[i] = pointerIds[i];
+        mSharedMessage->motion.sampleData[0].coords[i] = pointerCoords[i];
+    }
+
+    // Cache essential information about the motion event to ensure that a malicious consumer
+    // cannot confuse the publisher by modifying the contents of the shared memory buffer while
+    // it is being updated.
+    if (action == AMOTION_EVENT_ACTION_MOVE) {
+        mMotionEventPointerCount = pointerCount;
+        mMotionEventSampleDataStride = InputMessage::sampleDataStride(pointerCount);
+        mMotionEventSampleDataTail = InputMessage::sampleDataPtrIncrement(
+                mSharedMessage->motion.sampleData, mMotionEventSampleDataStride);
+    } else {
+        mMotionEventSampleDataTail = NULL;
+    }
+    return OK;
+}
+
+status_t InputPublisher::appendMotionSample(
+        nsecs_t eventTime,
+        const PointerCoords* pointerCoords) {
+#if DEBUG_TRANSPORT_ACTIONS
+    LOGD("channel '%s' publisher ~ appendMotionSample: eventTime=%lld",
+            mChannel->getName().string(), eventTime);
+#endif
+
+    if (! mPinned || ! mMotionEventSampleDataTail) {
+        LOGE("channel '%s' publisher ~ Cannot append motion sample because there is no current "
+                "AMOTION_EVENT_ACTION_MOVE event.", mChannel->getName().string());
+        return INVALID_OPERATION;
+    }
+
+    InputMessage::SampleData* newTail = InputMessage::sampleDataPtrIncrement(
+            mMotionEventSampleDataTail, mMotionEventSampleDataStride);
+    size_t newBytesUsed = reinterpret_cast<char*>(newTail) -
+            reinterpret_cast<char*>(mSharedMessage);
+
+    if (newBytesUsed > mAshmemSize) {
+#if DEBUG_TRANSPORT_ACTIONS
+        LOGD("channel '%s' publisher ~ Cannot append motion sample because the shared memory "
+                "buffer is full.  Buffer size: %d bytes, pointers: %d, samples: %d",
+                mChannel->getName().string(),
+                mAshmemSize, mMotionEventPointerCount, mSharedMessage->motion.sampleCount);
+#endif
+        return NO_MEMORY;
+    }
+
+    int result;
+    if (mWasDispatched) {
+        result = sem_trywait(& mSharedMessage->semaphore);
+        if (result < 0) {
+            if (errno == EAGAIN) {
+                // Only possible source of contention is the consumer having consumed (or being in the
+                // process of consuming) the message and left the semaphore count at 0.
+#if DEBUG_TRANSPORT_ACTIONS
+                LOGD("channel '%s' publisher ~ Cannot append motion sample because the message has "
+                        "already been consumed.", mChannel->getName().string());
+#endif
+                return FAILED_TRANSACTION;
+            } else {
+                LOGE("channel '%s' publisher ~ Error %d in sem_trywait.",
+                        mChannel->getName().string(), errno);
+                return UNKNOWN_ERROR;
+            }
+        }
+    }
+
+    mMotionEventSampleDataTail->eventTime = eventTime;
+    for (size_t i = 0; i < mMotionEventPointerCount; i++) {
+        mMotionEventSampleDataTail->coords[i] = pointerCoords[i];
+    }
+    mMotionEventSampleDataTail = newTail;
+
+    mSharedMessage->motion.sampleCount += 1;
+
+    if (mWasDispatched) {
+        result = sem_post(& mSharedMessage->semaphore);
+        if (result < 0) {
+            LOGE("channel '%s' publisher ~ Error %d in sem_post.",
+                    mChannel->getName().string(), errno);
+            return UNKNOWN_ERROR;
+        }
+    }
+    return OK;
+}
+
+status_t InputPublisher::sendDispatchSignal() {
+#if DEBUG_TRANSPORT_ACTIONS
+    LOGD("channel '%s' publisher ~ sendDispatchSignal",
+            mChannel->getName().string());
+#endif
+
+    mWasDispatched = true;
+    return mChannel->sendSignal(INPUT_SIGNAL_DISPATCH);
+}
+
+status_t InputPublisher::receiveFinishedSignal() {
+#if DEBUG_TRANSPORT_ACTIONS
+    LOGD("channel '%s' publisher ~ receiveFinishedSignal",
+            mChannel->getName().string());
+#endif
+
+    char signal;
+    status_t result = mChannel->receiveSignal(& signal);
+    if (result) {
+        return result;
+    }
+    if (signal != INPUT_SIGNAL_FINISHED) {
+        LOGE("channel '%s' publisher ~ Received unexpected signal '%c' from consumer",
+                mChannel->getName().string(), signal);
+        return UNKNOWN_ERROR;
+    }
+    return OK;
+}
+
+// --- InputConsumer ---
+
+InputConsumer::InputConsumer(const sp<InputChannel>& channel) :
+        mChannel(channel), mSharedMessage(NULL) {
+}
+
+InputConsumer::~InputConsumer() {
+    if (mSharedMessage) {
+        munmap(mSharedMessage, mAshmemSize);
+    }
+}
+
+status_t InputConsumer::initialize() {
+#if DEBUG_TRANSPORT_ACTIONS
+    LOGD("channel '%s' consumer ~ initialize",
+            mChannel->getName().string());
+#endif
+
+    int ashmemFd = mChannel->getAshmemFd();
+    int result = ashmem_get_size_region(ashmemFd);
+    if (result < 0) {
+        LOGE("channel '%s' consumer ~ Error %d getting size of ashmem fd %d.",
+                mChannel->getName().string(), result, ashmemFd);
+        return UNKNOWN_ERROR;
+    }
+
+    mAshmemSize = (size_t) result;
+
+    mSharedMessage = static_cast<InputMessage*>(mmap(NULL, mAshmemSize,
+            PROT_READ | PROT_WRITE, MAP_SHARED, ashmemFd, 0));
+    if (! mSharedMessage) {
+        LOGE("channel '%s' consumer ~ mmap failed on ashmem fd %d.",
+                mChannel->getName().string(), ashmemFd);
+        return NO_MEMORY;
+    }
+
+    return OK;
+}
+
+status_t InputConsumer::consume(InputEventFactoryInterface* factory, InputEvent** outEvent) {
+#if DEBUG_TRANSPORT_ACTIONS
+    LOGD("channel '%s' consumer ~ consume",
+            mChannel->getName().string());
+#endif
+
+    *outEvent = NULL;
+
+    int ashmemFd = mChannel->getAshmemFd();
+    int result = ashmem_pin_region(ashmemFd, 0, 0);
+    if (result != ASHMEM_NOT_PURGED) {
+        if (result == ASHMEM_WAS_PURGED) {
+            LOGE("channel '%s' consumer ~ Error %d pinning ashmem fd %d because it was purged "
+                    "which probably indicates that the publisher and consumer are out of sync.",
+                    mChannel->getName().string(), result, ashmemFd);
+            return INVALID_OPERATION;
+        }
+
+        LOGE("channel '%s' consumer ~ Error %d pinning ashmem fd %d.",
+                mChannel->getName().string(), result, ashmemFd);
+        return UNKNOWN_ERROR;
+    }
+
+    if (mSharedMessage->consumed) {
+        LOGE("channel '%s' consumer ~ The current message has already been consumed.",
+                mChannel->getName().string());
+        return INVALID_OPERATION;
+    }
+
+    // Acquire but *never release* the semaphore.  Contention on the semaphore is used to signal
+    // to the publisher that the message has been consumed (or is in the process of being
+    // consumed).  Eventually the publisher will reinitialize the semaphore for the next message.
+    result = sem_wait(& mSharedMessage->semaphore);
+    if (result < 0) {
+        LOGE("channel '%s' consumer ~ Error %d in sem_wait.",
+                mChannel->getName().string(), errno);
+        return UNKNOWN_ERROR;
+    }
+
+    mSharedMessage->consumed = true;
+
+    switch (mSharedMessage->type) {
+    case AINPUT_EVENT_TYPE_KEY: {
+        KeyEvent* keyEvent = factory->createKeyEvent();
+        if (! keyEvent) return NO_MEMORY;
+
+        populateKeyEvent(keyEvent);
+
+        *outEvent = keyEvent;
+        break;
+    }
+
+    case AINPUT_EVENT_TYPE_MOTION: {
+        MotionEvent* motionEvent = factory->createMotionEvent();
+        if (! motionEvent) return NO_MEMORY;
+
+        populateMotionEvent(motionEvent);
+
+        *outEvent = motionEvent;
+        break;
+    }
+
+    default:
+        LOGE("channel '%s' consumer ~ Received message of unknown type %d",
+                mChannel->getName().string(), mSharedMessage->type);
+        return UNKNOWN_ERROR;
+    }
+
+    return OK;
+}
+
+status_t InputConsumer::sendFinishedSignal() {
+#if DEBUG_TRANSPORT_ACTIONS
+    LOGD("channel '%s' consumer ~ sendFinishedSignal",
+            mChannel->getName().string());
+#endif
+
+    return mChannel->sendSignal(INPUT_SIGNAL_FINISHED);
+}
+
+status_t InputConsumer::receiveDispatchSignal() {
+#if DEBUG_TRANSPORT_ACTIONS
+    LOGD("channel '%s' consumer ~ receiveDispatchSignal",
+            mChannel->getName().string());
+#endif
+
+    char signal;
+    status_t result = mChannel->receiveSignal(& signal);
+    if (result) {
+        return result;
+    }
+    if (signal != INPUT_SIGNAL_DISPATCH) {
+        LOGE("channel '%s' consumer ~ Received unexpected signal '%c' from publisher",
+                mChannel->getName().string(), signal);
+        return UNKNOWN_ERROR;
+    }
+    return OK;
+}
+
+void InputConsumer::populateKeyEvent(KeyEvent* keyEvent) const {
+    keyEvent->initialize(
+            mSharedMessage->deviceId,
+            mSharedMessage->source,
+            mSharedMessage->key.action,
+            mSharedMessage->key.flags,
+            mSharedMessage->key.keyCode,
+            mSharedMessage->key.scanCode,
+            mSharedMessage->key.metaState,
+            mSharedMessage->key.repeatCount,
+            mSharedMessage->key.downTime,
+            mSharedMessage->key.eventTime);
+}
+
+void InputConsumer::populateMotionEvent(MotionEvent* motionEvent) const {
+    motionEvent->initialize(
+            mSharedMessage->deviceId,
+            mSharedMessage->source,
+            mSharedMessage->motion.action,
+            mSharedMessage->motion.edgeFlags,
+            mSharedMessage->motion.metaState,
+            mSharedMessage->motion.xOffset,
+            mSharedMessage->motion.yOffset,
+            mSharedMessage->motion.xPrecision,
+            mSharedMessage->motion.yPrecision,
+            mSharedMessage->motion.downTime,
+            mSharedMessage->motion.sampleData[0].eventTime,
+            mSharedMessage->motion.pointerCount,
+            mSharedMessage->motion.pointerIds,
+            mSharedMessage->motion.sampleData[0].coords);
+
+    size_t sampleCount = mSharedMessage->motion.sampleCount;
+    if (sampleCount > 1) {
+        InputMessage::SampleData* sampleData = mSharedMessage->motion.sampleData;
+        size_t sampleDataStride = InputMessage::sampleDataStride(
+                mSharedMessage->motion.pointerCount);
+
+        while (--sampleCount > 0) {
+            sampleData = InputMessage::sampleDataPtrIncrement(sampleData, sampleDataStride);
+            motionEvent->addSample(sampleData->eventTime, sampleData->coords);
+        }
+    }
+}
+
+} // namespace android
diff --git a/libs/ui/PixelFormat.cpp b/libs/ui/PixelFormat.cpp
index 9b41804..edf1aed 100644
--- a/libs/ui/PixelFormat.cpp
+++ b/libs/ui/PixelFormat.cpp
@@ -59,19 +59,12 @@
     // YUV format from the HAL are handled here
     switch (format) {
     case HAL_PIXEL_FORMAT_YCbCr_422_SP:
-    case HAL_PIXEL_FORMAT_YCrCb_422_SP:
-    case HAL_PIXEL_FORMAT_YCbCr_422_P:
     case HAL_PIXEL_FORMAT_YCbCr_422_I:
-    case HAL_PIXEL_FORMAT_CbYCrY_422_I:
         info->bitsPerPixel = 16;
         goto done;
-    case HAL_PIXEL_FORMAT_YCbCr_420_SP:
     case HAL_PIXEL_FORMAT_YCrCb_420_SP:
     case HAL_PIXEL_FORMAT_YCbCr_420_SP_TILED:
-    case HAL_PIXEL_FORMAT_YCrCb_420_SP_TILED:
-    case HAL_PIXEL_FORMAT_YCbCr_420_P:
-    case HAL_PIXEL_FORMAT_YCbCr_420_I:
-    case HAL_PIXEL_FORMAT_CbYCrY_420_I:
+    case HAL_PIXEL_FORMAT_YV12:
         info->bitsPerPixel = 12;
      done:
         info->format = format;
diff --git a/libs/ui/Rect.cpp b/libs/ui/Rect.cpp
index 66b9576..5694e00 100644
--- a/libs/ui/Rect.cpp
+++ b/libs/ui/Rect.cpp
@@ -18,11 +18,11 @@
 
 namespace android {
 
-static inline int min(int a, int b) {
+static inline int32_t min(int32_t a, int32_t b) {
     return (a<b) ? a : b;
 }
 
-static inline int max(int a, int b) {
+static inline int32_t max(int32_t a, int32_t b) {
     return (a>b) ? a : b;
 }
 
@@ -53,7 +53,7 @@
     return false;
 }
 
-Rect& Rect::offsetTo(int x, int y)
+Rect& Rect::offsetTo(int32_t x, int32_t y)
 {
     right -= left - x;
     bottom -= top - y;
@@ -62,7 +62,7 @@
     return *this;
 }
 
-Rect& Rect::offsetBy(int x, int y)
+Rect& Rect::offsetBy(int32_t x, int32_t y)
 {
     left += x;
     top  += y;
diff --git a/libs/ui/tests/Android.mk b/libs/ui/tests/Android.mk
index 6cc4a5a..62f824f 100644
--- a/libs/ui/tests/Android.mk
+++ b/libs/ui/tests/Android.mk
@@ -1,16 +1,50 @@
+# Build the unit tests.
 LOCAL_PATH:= $(call my-dir)
 include $(CLEAR_VARS)
 
-LOCAL_SRC_FILES:= \
-	region.cpp
+ifneq ($(TARGET_SIMULATOR),true)
 
-LOCAL_SHARED_LIBRARIES := \
+# Build the unit tests.
+test_src_files := \
+    InputChannel_test.cpp \
+    InputDispatcher_test.cpp \
+    InputPublisherAndConsumer_test.cpp
+
+shared_libraries := \
 	libcutils \
 	libutils \
-    libui
+	libEGL \
+	libbinder \
+	libpixelflinger \
+	libhardware \
+	libhardware_legacy \
+	libui \
+	libstlport
 
-LOCAL_MODULE:= test-region
+static_libraries := \
+	libgtest \
+	libgtest_main
 
-LOCAL_MODULE_TAGS := tests
+c_includes := \
+    bionic \
+    bionic/libstdc++/include \
+    external/gtest/include \
+    external/stlport/stlport
 
-include $(BUILD_EXECUTABLE)
+module_tags := eng tests
+
+$(foreach file,$(test_src_files), \
+    $(eval include $(CLEAR_VARS)) \
+    $(eval LOCAL_SHARED_LIBRARIES := $(shared_libraries)) \
+    $(eval LOCAL_STATIC_LIBRARIES := $(static_libraries)) \
+    $(eval LOCAL_C_INCLUDES := $(c_includes)) \
+    $(eval LOCAL_SRC_FILES := $(file)) \
+    $(eval LOCAL_MODULE := $(notdir $(file:%.cpp=%))) \
+    $(eval LOCAL_MODULE_TAGS := $(module_tags)) \
+    $(eval include $(BUILD_EXECUTABLE)) \
+)
+
+# Build the manual test programs.
+include $(call all-subdir-makefiles)
+
+endif
\ No newline at end of file
diff --git a/libs/ui/tests/InputChannel_test.cpp b/libs/ui/tests/InputChannel_test.cpp
new file mode 100644
index 0000000..6cec1c02
--- /dev/null
+++ b/libs/ui/tests/InputChannel_test.cpp
@@ -0,0 +1,158 @@
+//
+// Copyright 2010 The Android Open Source Project
+//
+
+#include <ui/InputTransport.h>
+#include <utils/Timers.h>
+#include <utils/StopWatch.h>
+#include <gtest/gtest.h>
+#include <unistd.h>
+#include <time.h>
+#include <sys/mman.h>
+#include <cutils/ashmem.h>
+
+#include "../../utils/tests/TestHelpers.h"
+
+namespace android {
+
+class InputChannelTest : public testing::Test {
+protected:
+    virtual void SetUp() { }
+    virtual void TearDown() { }
+};
+
+
+TEST_F(InputChannelTest, ConstructorAndDestructor_TakesOwnershipOfFileDescriptors) {
+    // Our purpose here is to verify that the input channel destructor closes the
+    // file descriptors provided to it.  One easy way is to provide it with one end
+    // of a pipe and to check for EPIPE on the other end after the channel is destroyed.
+    Pipe fakeAshmem, sendPipe, receivePipe;
+
+    sp<InputChannel> inputChannel = new InputChannel(String8("channel name"),
+            fakeAshmem.sendFd, receivePipe.receiveFd, sendPipe.sendFd);
+
+    EXPECT_STREQ("channel name", inputChannel->getName().string())
+            << "channel should have provided name";
+    EXPECT_EQ(fakeAshmem.sendFd, inputChannel->getAshmemFd())
+            << "channel should have provided ashmem fd";
+    EXPECT_EQ(receivePipe.receiveFd, inputChannel->getReceivePipeFd())
+            << "channel should have provided receive pipe fd";
+    EXPECT_EQ(sendPipe.sendFd, inputChannel->getSendPipeFd())
+            << "channel should have provided send pipe fd";
+
+    inputChannel.clear(); // destroys input channel
+
+    EXPECT_EQ(-EPIPE, fakeAshmem.readSignal())
+            << "channel should have closed ashmem fd when destroyed";
+    EXPECT_EQ(-EPIPE, receivePipe.writeSignal())
+            << "channel should have closed receive pipe fd when destroyed";
+    EXPECT_EQ(-EPIPE, sendPipe.readSignal())
+            << "channel should have closed send pipe fd when destroyed";
+
+    // clean up fds of Pipe endpoints that were closed so we don't try to close them again
+    fakeAshmem.sendFd = -1;
+    receivePipe.receiveFd = -1;
+    sendPipe.sendFd = -1;
+}
+
+TEST_F(InputChannelTest, OpenInputChannelPair_ReturnsAPairOfConnectedChannels) {
+    sp<InputChannel> serverChannel, clientChannel;
+
+    status_t result = InputChannel::openInputChannelPair(String8("channel name"),
+            serverChannel, clientChannel);
+
+    ASSERT_EQ(OK, result)
+            << "should have successfully opened a channel pair";
+
+    // Name
+    EXPECT_STREQ("channel name (server)", serverChannel->getName().string())
+            << "server channel should have suffixed name";
+    EXPECT_STREQ("channel name (client)", clientChannel->getName().string())
+            << "client channel should have suffixed name";
+
+    // Ashmem uniqueness
+    EXPECT_NE(serverChannel->getAshmemFd(), clientChannel->getAshmemFd())
+            << "server and client channel should have different ashmem fds because it was dup'd";
+
+    // Ashmem usability
+    ssize_t serverAshmemSize = ashmem_get_size_region(serverChannel->getAshmemFd());
+    ssize_t clientAshmemSize = ashmem_get_size_region(clientChannel->getAshmemFd());
+    uint32_t* serverAshmem = static_cast<uint32_t*>(mmap(NULL, serverAshmemSize,
+            PROT_READ | PROT_WRITE, MAP_SHARED, serverChannel->getAshmemFd(), 0));
+    uint32_t* clientAshmem = static_cast<uint32_t*>(mmap(NULL, clientAshmemSize,
+            PROT_READ | PROT_WRITE, MAP_SHARED, clientChannel->getAshmemFd(), 0));
+    ASSERT_TRUE(serverAshmem != NULL)
+            << "server channel ashmem should be mappable";
+    ASSERT_TRUE(clientAshmem != NULL)
+            << "client channel ashmem should be mappable";
+    *serverAshmem = 0xf00dd00d;
+    EXPECT_EQ(0xf00dd00d, *clientAshmem)
+            << "ashmem buffer should be shared by client and server";
+    munmap(serverAshmem, serverAshmemSize);
+    munmap(clientAshmem, clientAshmemSize);
+
+    // Server->Client communication
+    EXPECT_EQ(OK, serverChannel->sendSignal('S'))
+            << "server channel should be able to send signal to client channel";
+    char signal;
+    EXPECT_EQ(OK, clientChannel->receiveSignal(& signal))
+            << "client channel should be able to receive signal from server channel";
+    EXPECT_EQ('S', signal)
+            << "client channel should receive the correct signal from server channel";
+
+    // Client->Server communication
+    EXPECT_EQ(OK, clientChannel->sendSignal('c'))
+            << "client channel should be able to send signal to server channel";
+    EXPECT_EQ(OK, serverChannel->receiveSignal(& signal))
+            << "server channel should be able to receive signal from client channel";
+    EXPECT_EQ('c', signal)
+            << "server channel should receive the correct signal from client channel";
+}
+
+TEST_F(InputChannelTest, ReceiveSignal_WhenNoSignalPresent_ReturnsAnError) {
+    sp<InputChannel> serverChannel, clientChannel;
+
+    status_t result = InputChannel::openInputChannelPair(String8("channel name"),
+            serverChannel, clientChannel);
+
+    ASSERT_EQ(OK, result)
+            << "should have successfully opened a channel pair";
+
+    char signal;
+    EXPECT_EQ(WOULD_BLOCK, clientChannel->receiveSignal(& signal))
+            << "receiveSignal should have returned WOULD_BLOCK";
+}
+
+TEST_F(InputChannelTest, ReceiveSignal_WhenPeerClosed_ReturnsAnError) {
+    sp<InputChannel> serverChannel, clientChannel;
+
+    status_t result = InputChannel::openInputChannelPair(String8("channel name"),
+            serverChannel, clientChannel);
+
+    ASSERT_EQ(OK, result)
+            << "should have successfully opened a channel pair";
+
+    serverChannel.clear(); // close server channel
+
+    char signal;
+    EXPECT_EQ(DEAD_OBJECT, clientChannel->receiveSignal(& signal))
+            << "receiveSignal should have returned DEAD_OBJECT";
+}
+
+TEST_F(InputChannelTest, SendSignal_WhenPeerClosed_ReturnsAnError) {
+    sp<InputChannel> serverChannel, clientChannel;
+
+    status_t result = InputChannel::openInputChannelPair(String8("channel name"),
+            serverChannel, clientChannel);
+
+    ASSERT_EQ(OK, result)
+            << "should have successfully opened a channel pair";
+
+    serverChannel.clear(); // close server channel
+
+    EXPECT_EQ(DEAD_OBJECT, clientChannel->sendSignal('S'))
+            << "sendSignal should have returned DEAD_OBJECT";
+}
+
+
+} // namespace android
diff --git a/libs/ui/tests/InputDispatcher_test.cpp b/libs/ui/tests/InputDispatcher_test.cpp
new file mode 100644
index 0000000..1dc6e46
--- /dev/null
+++ b/libs/ui/tests/InputDispatcher_test.cpp
@@ -0,0 +1,18 @@
+//
+// Copyright 2010 The Android Open Source Project
+//
+
+#include <ui/InputDispatcher.h>
+#include <gtest/gtest.h>
+
+namespace android {
+
+class InputDispatcherTest : public testing::Test {
+public:
+};
+
+TEST_F(InputDispatcherTest, Dummy) {
+    // TODO
+}
+
+} // namespace android
diff --git a/libs/ui/tests/InputPublisherAndConsumer_test.cpp b/libs/ui/tests/InputPublisherAndConsumer_test.cpp
new file mode 100644
index 0000000..3bc21fa
--- /dev/null
+++ b/libs/ui/tests/InputPublisherAndConsumer_test.cpp
@@ -0,0 +1,469 @@
+//
+// Copyright 2010 The Android Open Source Project
+//
+
+#include <ui/InputTransport.h>
+#include <utils/Timers.h>
+#include <utils/StopWatch.h>
+#include <gtest/gtest.h>
+#include <unistd.h>
+#include <time.h>
+#include <sys/mman.h>
+#include <cutils/ashmem.h>
+
+#include "../../utils/tests/TestHelpers.h"
+
+namespace android {
+
+class InputPublisherAndConsumerTest : public testing::Test {
+protected:
+    sp<InputChannel> serverChannel, clientChannel;
+    InputPublisher* mPublisher;
+    InputConsumer* mConsumer;
+    PreallocatedInputEventFactory mEventFactory;
+
+    virtual void SetUp() {
+        status_t result = InputChannel::openInputChannelPair(String8("channel name"),
+                serverChannel, clientChannel);
+
+        mPublisher = new InputPublisher(serverChannel);
+        mConsumer = new InputConsumer(clientChannel);
+    }
+
+    virtual void TearDown() {
+        if (mPublisher) {
+            delete mPublisher;
+            mPublisher = NULL;
+        }
+
+        if (mConsumer) {
+            delete mConsumer;
+            mConsumer = NULL;
+        }
+
+        serverChannel.clear();
+        clientChannel.clear();
+    }
+
+    void Initialize();
+    void PublishAndConsumeKeyEvent();
+    void PublishAndConsumeMotionEvent(
+            size_t samplesToAppendBeforeDispatch = 0,
+            size_t samplesToAppendAfterDispatch = 0);
+};
+
+TEST_F(InputPublisherAndConsumerTest, GetChannel_ReturnsTheChannel) {
+    EXPECT_EQ(serverChannel.get(), mPublisher->getChannel().get());
+    EXPECT_EQ(clientChannel.get(), mConsumer->getChannel().get());
+}
+
+void InputPublisherAndConsumerTest::Initialize() {
+    status_t status;
+
+    status = mPublisher->initialize();
+    ASSERT_EQ(OK, status)
+            << "publisher initialize should return OK";
+
+    status = mConsumer->initialize();
+    ASSERT_EQ(OK, status)
+            << "consumer initialize should return OK";
+}
+
+void InputPublisherAndConsumerTest::PublishAndConsumeKeyEvent() {
+    status_t status;
+
+    const int32_t deviceId = 1;
+    const int32_t source = AINPUT_SOURCE_KEYBOARD;
+    const int32_t action = AKEY_EVENT_ACTION_DOWN;
+    const int32_t flags = AKEY_EVENT_FLAG_FROM_SYSTEM;
+    const int32_t keyCode = AKEYCODE_ENTER;
+    const int32_t scanCode = 13;
+    const int32_t metaState = AMETA_ALT_LEFT_ON | AMETA_ALT_ON;
+    const int32_t repeatCount = 1;
+    const nsecs_t downTime = 3;
+    const nsecs_t eventTime = 4;
+
+    status = mPublisher->publishKeyEvent(deviceId, source, action, flags,
+            keyCode, scanCode, metaState, repeatCount, downTime, eventTime);
+    ASSERT_EQ(OK, status)
+            << "publisher publishKeyEvent should return OK";
+
+    status = mPublisher->sendDispatchSignal();
+    ASSERT_EQ(OK, status)
+            << "publisher sendDispatchSignal should return OK";
+
+    status = mConsumer->receiveDispatchSignal();
+    ASSERT_EQ(OK, status)
+            << "consumer receiveDispatchSignal should return OK";
+
+    InputEvent* event;
+    status = mConsumer->consume(& mEventFactory, & event);
+    ASSERT_EQ(OK, status)
+            << "consumer consume should return OK";
+
+    ASSERT_TRUE(event != NULL)
+            << "consumer should have returned non-NULL event";
+    ASSERT_EQ(AINPUT_EVENT_TYPE_KEY, event->getType())
+            << "consumer should have returned a key event";
+
+    KeyEvent* keyEvent = static_cast<KeyEvent*>(event);
+    EXPECT_EQ(deviceId, keyEvent->getDeviceId());
+    EXPECT_EQ(source, keyEvent->getSource());
+    EXPECT_EQ(action, keyEvent->getAction());
+    EXPECT_EQ(flags, keyEvent->getFlags());
+    EXPECT_EQ(keyCode, keyEvent->getKeyCode());
+    EXPECT_EQ(scanCode, keyEvent->getScanCode());
+    EXPECT_EQ(metaState, keyEvent->getMetaState());
+    EXPECT_EQ(repeatCount, keyEvent->getRepeatCount());
+    EXPECT_EQ(downTime, keyEvent->getDownTime());
+    EXPECT_EQ(eventTime, keyEvent->getEventTime());
+
+    status = mConsumer->sendFinishedSignal();
+    ASSERT_EQ(OK, status)
+            << "consumer sendFinishedSignal should return OK";
+
+    status = mPublisher->receiveFinishedSignal();
+    ASSERT_EQ(OK, status)
+            << "publisher receiveFinishedSignal should return OK";
+
+    status = mPublisher->reset();
+    ASSERT_EQ(OK, status)
+            << "publisher reset should return OK";
+}
+
+void InputPublisherAndConsumerTest::PublishAndConsumeMotionEvent(
+        size_t samplesToAppendBeforeDispatch, size_t samplesToAppendAfterDispatch) {
+    status_t status;
+
+    const int32_t deviceId = 1;
+    const int32_t source = AINPUT_SOURCE_TOUCHSCREEN;
+    const int32_t action = AMOTION_EVENT_ACTION_MOVE;
+    const int32_t edgeFlags = AMOTION_EVENT_EDGE_FLAG_TOP;
+    const int32_t metaState = AMETA_ALT_LEFT_ON | AMETA_ALT_ON;
+    const float xOffset = -10;
+    const float yOffset = -20;
+    const float xPrecision = 0.25;
+    const float yPrecision = 0.5;
+    const nsecs_t downTime = 3;
+    const size_t pointerCount = 3;
+    const int32_t pointerIds[pointerCount] = { 2, 0, 1 };
+
+    Vector<nsecs_t> sampleEventTimes;
+    Vector<PointerCoords> samplePointerCoords;
+
+    for (size_t i = 0; i <= samplesToAppendAfterDispatch + samplesToAppendBeforeDispatch; i++) {
+        sampleEventTimes.push(i + 10);
+        for (size_t j = 0; j < pointerCount; j++) {
+            samplePointerCoords.push();
+            samplePointerCoords.editTop().x = 100 * i + j;
+            samplePointerCoords.editTop().y = 200 * i + j;
+            samplePointerCoords.editTop().pressure = 0.5 * i + j;
+            samplePointerCoords.editTop().size = 0.7 * i + j;
+            samplePointerCoords.editTop().touchMajor = 1.5 * i + j;
+            samplePointerCoords.editTop().touchMinor = 1.7 * i + j;
+            samplePointerCoords.editTop().toolMajor = 2.5 * i + j;
+            samplePointerCoords.editTop().toolMinor = 2.7 * i + j;
+            samplePointerCoords.editTop().orientation = 3.5 * i + j;
+        }
+    }
+
+    status = mPublisher->publishMotionEvent(deviceId, source, action, edgeFlags,
+            metaState, xOffset, yOffset, xPrecision, yPrecision,
+            downTime, sampleEventTimes[0], pointerCount, pointerIds, samplePointerCoords.array());
+    ASSERT_EQ(OK, status)
+            << "publisher publishMotionEvent should return OK";
+
+    for (size_t i = 0; i < samplesToAppendBeforeDispatch; i++) {
+        size_t sampleIndex = i + 1;
+        status = mPublisher->appendMotionSample(sampleEventTimes[sampleIndex],
+                samplePointerCoords.array() + sampleIndex * pointerCount);
+        ASSERT_EQ(OK, status)
+                << "publisher appendMotionEvent should return OK";
+    }
+
+    status = mPublisher->sendDispatchSignal();
+    ASSERT_EQ(OK, status)
+            << "publisher sendDispatchSignal should return OK";
+
+    for (size_t i = 0; i < samplesToAppendAfterDispatch; i++) {
+        size_t sampleIndex = i + 1 + samplesToAppendBeforeDispatch;
+        status = mPublisher->appendMotionSample(sampleEventTimes[sampleIndex],
+                samplePointerCoords.array() + sampleIndex * pointerCount);
+        ASSERT_EQ(OK, status)
+                << "publisher appendMotionEvent should return OK";
+    }
+
+    status = mConsumer->receiveDispatchSignal();
+    ASSERT_EQ(OK, status)
+            << "consumer receiveDispatchSignal should return OK";
+
+    InputEvent* event;
+    status = mConsumer->consume(& mEventFactory, & event);
+    ASSERT_EQ(OK, status)
+            << "consumer consume should return OK";
+
+    ASSERT_TRUE(event != NULL)
+            << "consumer should have returned non-NULL event";
+    ASSERT_EQ(AINPUT_EVENT_TYPE_MOTION, event->getType())
+            << "consumer should have returned a motion event";
+
+    size_t lastSampleIndex = samplesToAppendBeforeDispatch + samplesToAppendAfterDispatch;
+
+    MotionEvent* motionEvent = static_cast<MotionEvent*>(event);
+    EXPECT_EQ(deviceId, motionEvent->getDeviceId());
+    EXPECT_EQ(source, motionEvent->getSource());
+    EXPECT_EQ(action, motionEvent->getAction());
+    EXPECT_EQ(edgeFlags, motionEvent->getEdgeFlags());
+    EXPECT_EQ(metaState, motionEvent->getMetaState());
+    EXPECT_EQ(xPrecision, motionEvent->getXPrecision());
+    EXPECT_EQ(yPrecision, motionEvent->getYPrecision());
+    EXPECT_EQ(downTime, motionEvent->getDownTime());
+    EXPECT_EQ(sampleEventTimes[lastSampleIndex], motionEvent->getEventTime());
+    EXPECT_EQ(pointerCount, motionEvent->getPointerCount());
+    EXPECT_EQ(lastSampleIndex, motionEvent->getHistorySize());
+
+    for (size_t i = 0; i < pointerCount; i++) {
+        SCOPED_TRACE(i);
+        EXPECT_EQ(pointerIds[i], motionEvent->getPointerId(i));
+    }
+
+    for (size_t sampleIndex = 0; sampleIndex < lastSampleIndex; sampleIndex++) {
+        SCOPED_TRACE(sampleIndex);
+        EXPECT_EQ(sampleEventTimes[sampleIndex],
+                motionEvent->getHistoricalEventTime(sampleIndex));
+        for (size_t i = 0; i < pointerCount; i++) {
+            SCOPED_TRACE(i);
+            size_t offset = sampleIndex * pointerCount + i;
+            EXPECT_EQ(samplePointerCoords[offset].x,
+                    motionEvent->getHistoricalRawX(i, sampleIndex));
+            EXPECT_EQ(samplePointerCoords[offset].y,
+                    motionEvent->getHistoricalRawY(i, sampleIndex));
+            EXPECT_EQ(samplePointerCoords[offset].x + xOffset,
+                    motionEvent->getHistoricalX(i, sampleIndex));
+            EXPECT_EQ(samplePointerCoords[offset].y + yOffset,
+                    motionEvent->getHistoricalY(i, sampleIndex));
+            EXPECT_EQ(samplePointerCoords[offset].pressure,
+                    motionEvent->getHistoricalPressure(i, sampleIndex));
+            EXPECT_EQ(samplePointerCoords[offset].size,
+                    motionEvent->getHistoricalSize(i, sampleIndex));
+            EXPECT_EQ(samplePointerCoords[offset].touchMajor,
+                    motionEvent->getHistoricalTouchMajor(i, sampleIndex));
+            EXPECT_EQ(samplePointerCoords[offset].touchMinor,
+                    motionEvent->getHistoricalTouchMinor(i, sampleIndex));
+            EXPECT_EQ(samplePointerCoords[offset].toolMajor,
+                    motionEvent->getHistoricalToolMajor(i, sampleIndex));
+            EXPECT_EQ(samplePointerCoords[offset].toolMinor,
+                    motionEvent->getHistoricalToolMinor(i, sampleIndex));
+            EXPECT_EQ(samplePointerCoords[offset].orientation,
+                    motionEvent->getHistoricalOrientation(i, sampleIndex));
+        }
+    }
+
+    SCOPED_TRACE(lastSampleIndex);
+    EXPECT_EQ(sampleEventTimes[lastSampleIndex], motionEvent->getEventTime());
+    for (size_t i = 0; i < pointerCount; i++) {
+        SCOPED_TRACE(i);
+        size_t offset = lastSampleIndex * pointerCount + i;
+        EXPECT_EQ(samplePointerCoords[offset].x, motionEvent->getRawX(i));
+        EXPECT_EQ(samplePointerCoords[offset].y, motionEvent->getRawY(i));
+        EXPECT_EQ(samplePointerCoords[offset].x + xOffset, motionEvent->getX(i));
+        EXPECT_EQ(samplePointerCoords[offset].y + yOffset, motionEvent->getY(i));
+        EXPECT_EQ(samplePointerCoords[offset].pressure, motionEvent->getPressure(i));
+        EXPECT_EQ(samplePointerCoords[offset].size, motionEvent->getSize(i));
+        EXPECT_EQ(samplePointerCoords[offset].touchMajor, motionEvent->getTouchMajor(i));
+        EXPECT_EQ(samplePointerCoords[offset].touchMinor, motionEvent->getTouchMinor(i));
+        EXPECT_EQ(samplePointerCoords[offset].toolMajor, motionEvent->getToolMajor(i));
+        EXPECT_EQ(samplePointerCoords[offset].toolMinor, motionEvent->getToolMinor(i));
+        EXPECT_EQ(samplePointerCoords[offset].orientation, motionEvent->getOrientation(i));
+    }
+
+    status = mConsumer->sendFinishedSignal();
+    ASSERT_EQ(OK, status)
+            << "consumer sendFinishedSignal should return OK";
+
+    status = mPublisher->receiveFinishedSignal();
+    ASSERT_EQ(OK, status)
+            << "publisher receiveFinishedSignal should return OK";
+
+    status = mPublisher->reset();
+    ASSERT_EQ(OK, status)
+            << "publisher reset should return OK";
+}
+
+TEST_F(InputPublisherAndConsumerTest, PublishKeyEvent_EndToEnd) {
+    ASSERT_NO_FATAL_FAILURE(Initialize());
+    ASSERT_NO_FATAL_FAILURE(PublishAndConsumeKeyEvent());
+}
+
+TEST_F(InputPublisherAndConsumerTest, PublishKeyEvent_WhenNotReset_ReturnsError) {
+    status_t status;
+    ASSERT_NO_FATAL_FAILURE(Initialize());
+
+    status = mPublisher->publishKeyEvent(0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
+    ASSERT_EQ(OK, status)
+            << "publisher publishKeyEvent should return OK first time";
+
+    status = mPublisher->publishKeyEvent(0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
+    ASSERT_EQ(INVALID_OPERATION, status)
+            << "publisher publishKeyEvent should return INVALID_OPERATION because "
+                    "the publisher was not reset";
+}
+
+TEST_F(InputPublisherAndConsumerTest, PublishMotionEvent_EndToEnd) {
+    ASSERT_NO_FATAL_FAILURE(Initialize());
+    ASSERT_NO_FATAL_FAILURE(PublishAndConsumeMotionEvent());
+}
+
+TEST_F(InputPublisherAndConsumerTest, PublishMotionEvent_WhenNotReset_ReturnsError) {
+    status_t status;
+    ASSERT_NO_FATAL_FAILURE(Initialize());
+
+    const size_t pointerCount = 1;
+    int32_t pointerIds[pointerCount] = { 0 };
+    PointerCoords pointerCoords[pointerCount] = { { 0, 0, 0, 0, 0, 0, 0, 0, 0 } };
+
+    status = mPublisher->publishMotionEvent(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+            pointerCount, pointerIds, pointerCoords);
+    ASSERT_EQ(OK, status)
+            << "publisher publishMotionEvent should return OK";
+
+    status = mPublisher->publishMotionEvent(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+            pointerCount, pointerIds, pointerCoords);
+    ASSERT_EQ(INVALID_OPERATION, status)
+            << "publisher publishMotionEvent should return INVALID_OPERATION because ";
+                    "the publisher was not reset";
+}
+
+TEST_F(InputPublisherAndConsumerTest, PublishMotionEvent_WhenPointerCountLessThan1_ReturnsError) {
+    status_t status;
+    ASSERT_NO_FATAL_FAILURE(Initialize());
+
+    const size_t pointerCount = 0;
+    int32_t pointerIds[pointerCount];
+    PointerCoords pointerCoords[pointerCount];
+
+    status = mPublisher->publishMotionEvent(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+            pointerCount, pointerIds, pointerCoords);
+    ASSERT_EQ(BAD_VALUE, status)
+            << "publisher publishMotionEvent should return BAD_VALUE";
+}
+
+TEST_F(InputPublisherAndConsumerTest, PublishMotionEvent_WhenPointerCountGreaterThanMax_ReturnsError) {
+    status_t status;
+    ASSERT_NO_FATAL_FAILURE(Initialize());
+
+    const size_t pointerCount = MAX_POINTERS + 1;
+    int32_t pointerIds[pointerCount];
+    PointerCoords pointerCoords[pointerCount];
+
+    status = mPublisher->publishMotionEvent(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+            pointerCount, pointerIds, pointerCoords);
+    ASSERT_EQ(BAD_VALUE, status)
+            << "publisher publishMotionEvent should return BAD_VALUE";
+}
+
+TEST_F(InputPublisherAndConsumerTest, PublishMultipleEvents_EndToEnd) {
+    ASSERT_NO_FATAL_FAILURE(Initialize());
+    ASSERT_NO_FATAL_FAILURE(PublishAndConsumeMotionEvent());
+    ASSERT_NO_FATAL_FAILURE(PublishAndConsumeKeyEvent());
+    ASSERT_NO_FATAL_FAILURE(PublishAndConsumeMotionEvent());
+    ASSERT_NO_FATAL_FAILURE(PublishAndConsumeMotionEvent());
+    ASSERT_NO_FATAL_FAILURE(PublishAndConsumeKeyEvent());
+}
+
+TEST_F(InputPublisherAndConsumerTest, AppendMotionSample_WhenCalledBeforeDispatchSignal_AppendsSamples) {
+    status_t status;
+    ASSERT_NO_FATAL_FAILURE(Initialize());
+    ASSERT_NO_FATAL_FAILURE(PublishAndConsumeMotionEvent(3, 0));
+}
+
+TEST_F(InputPublisherAndConsumerTest, AppendMotionSample_WhenCalledAfterDispatchSignalAndNotConsumed_AppendsSamples) {
+    status_t status;
+    ASSERT_NO_FATAL_FAILURE(Initialize());
+    ASSERT_NO_FATAL_FAILURE(PublishAndConsumeMotionEvent(0, 4));
+}
+
+TEST_F(InputPublisherAndConsumerTest, AppendMotionSample_WhenNoMotionEventPublished_ReturnsError) {
+    status_t status;
+    ASSERT_NO_FATAL_FAILURE(Initialize());
+
+    PointerCoords pointerCoords[1];
+    status = mPublisher->appendMotionSample(0, pointerCoords);
+    ASSERT_EQ(INVALID_OPERATION, status)
+            << "publisher appendMotionSample should return INVALID_OPERATION";
+}
+
+TEST_F(InputPublisherAndConsumerTest, AppendMotionSample_WhenPublishedMotionEventIsNotAMove_ReturnsError) {
+    status_t status;
+    ASSERT_NO_FATAL_FAILURE(Initialize());
+
+    const size_t pointerCount = MAX_POINTERS;
+    int32_t pointerIds[pointerCount];
+    PointerCoords pointerCoords[pointerCount];
+
+    status = mPublisher->publishMotionEvent(0, 0, AMOTION_EVENT_ACTION_DOWN,
+            0, 0, 0, 0, 0, 0, 0, 0, pointerCount, pointerIds, pointerCoords);
+    ASSERT_EQ(OK, status);
+
+    status = mPublisher->appendMotionSample(0, pointerCoords);
+    ASSERT_EQ(INVALID_OPERATION, status)
+            << "publisher appendMotionSample should return INVALID_OPERATION";
+}
+
+TEST_F(InputPublisherAndConsumerTest, AppendMotionSample_WhenAlreadyConsumed_ReturnsError) {
+    status_t status;
+    ASSERT_NO_FATAL_FAILURE(Initialize());
+
+    const size_t pointerCount = MAX_POINTERS;
+    int32_t pointerIds[pointerCount];
+    PointerCoords pointerCoords[pointerCount];
+
+    status = mPublisher->publishMotionEvent(0, 0, AMOTION_EVENT_ACTION_MOVE,
+            0, 0, 0, 0, 0, 0, 0, 0, pointerCount, pointerIds, pointerCoords);
+    ASSERT_EQ(OK, status);
+
+    status = mPublisher->sendDispatchSignal();
+    ASSERT_EQ(OK, status);
+
+    status = mConsumer->receiveDispatchSignal();
+    ASSERT_EQ(OK, status);
+
+    InputEvent* event;
+    status = mConsumer->consume(& mEventFactory, & event);
+    ASSERT_EQ(OK, status);
+
+    status = mPublisher->appendMotionSample(0, pointerCoords);
+    ASSERT_EQ(status_t(FAILED_TRANSACTION), status)
+            << "publisher appendMotionSample should return FAILED_TRANSACTION";
+}
+
+TEST_F(InputPublisherAndConsumerTest, AppendMotionSample_WhenBufferFull_ReturnsError) {
+    status_t status;
+    ASSERT_NO_FATAL_FAILURE(Initialize());
+
+    const size_t pointerCount = MAX_POINTERS;
+    int32_t pointerIds[pointerCount];
+    PointerCoords pointerCoords[pointerCount];
+
+    status = mPublisher->publishMotionEvent(0, 0, AMOTION_EVENT_ACTION_MOVE,
+            0, 0, 0, 0, 0, 0, 0, 0, pointerCount, pointerIds, pointerCoords);
+    ASSERT_EQ(OK, status);
+
+    for (int count = 1;; count++) {
+        ASSERT_LT(count, 100000) << "should eventually reach OOM";
+
+        status = mPublisher->appendMotionSample(0, pointerCoords);
+        if (status != OK) {
+            ASSERT_GT(count, 12) << "should be able to add at least a dozen samples";
+            ASSERT_EQ(NO_MEMORY, status)
+                    << "publisher appendMotionSample should return NO_MEMORY when buffer is full";
+            break;
+        }
+    }
+
+    status = mPublisher->appendMotionSample(0, pointerCoords);
+    ASSERT_EQ(NO_MEMORY, status)
+            << "publisher appendMotionSample should return NO_MEMORY persistently until reset";
+}
+
+} // namespace android
diff --git a/libs/ui/tests/region/Android.mk b/libs/ui/tests/region/Android.mk
new file mode 100644
index 0000000..6cc4a5a
--- /dev/null
+++ b/libs/ui/tests/region/Android.mk
@@ -0,0 +1,16 @@
+LOCAL_PATH:= $(call my-dir)
+include $(CLEAR_VARS)
+
+LOCAL_SRC_FILES:= \
+	region.cpp
+
+LOCAL_SHARED_LIBRARIES := \
+	libcutils \
+	libutils \
+    libui
+
+LOCAL_MODULE:= test-region
+
+LOCAL_MODULE_TAGS := tests
+
+include $(BUILD_EXECUTABLE)
diff --git a/libs/ui/tests/region.cpp b/libs/ui/tests/region/region.cpp
similarity index 100%
rename from libs/ui/tests/region.cpp
rename to libs/ui/tests/region/region.cpp
diff --git a/libs/utils/Android.mk b/libs/utils/Android.mk
index afecdcb..8bd5823 100644
--- a/libs/utils/Android.mk
+++ b/libs/utils/Android.mk
@@ -26,6 +26,8 @@
 	Debug.cpp \
 	FileMap.cpp \
 	Flattenable.cpp \
+	ObbFile.cpp \
+	Pool.cpp \
 	RefBase.cpp \
 	ResourceTypes.cpp \
 	SharedBuffer.cpp \
@@ -39,7 +41,7 @@
 	Threads.cpp \
 	Timers.cpp \
 	VectorImpl.cpp \
-    ZipFileCRO.cpp \
+	ZipFileCRO.cpp \
 	ZipFileRO.cpp \
 	ZipUtils.cpp \
 	misc.cpp
@@ -64,6 +66,11 @@
 endif
 endif
 
+ifeq ($(HOST_OS),darwin)
+# MacOS doesn't have lseek64. However, off_t is 64-bit anyway.
+LOCAL_CFLAGS += -DOFF_T_IS_64_BIT
+endif
+
 include $(BUILD_HOST_STATIC_LIBRARY)
 
 
@@ -76,8 +83,9 @@
 # we have the common sources, plus some device-specific stuff
 LOCAL_SRC_FILES:= \
 	$(commonSources) \
-    BackupData.cpp \
-	BackupHelpers.cpp
+	BackupData.cpp \
+	BackupHelpers.cpp \
+	PollLoop.cpp
 
 ifeq ($(TARGET_OS),linux)
 LOCAL_LDLIBS += -lrt -ldl
@@ -114,3 +122,13 @@
 include $(BUILD_STATIC_LIBRARY)
 endif
 endif
+
+
+# Include subdirectory makefiles
+# ============================================================
+
+# If we're building with ONE_SHOT_MAKEFILE (mm, mmm), then what the framework
+# team really wants is to build the stuff defined by this makefile.
+ifeq (,$(ONE_SHOT_MAKEFILE))
+include $(call first-makefiles-under,$(LOCAL_PATH))
+endif
\ No newline at end of file
diff --git a/libs/utils/AssetManager.cpp b/libs/utils/AssetManager.cpp
index 5a05e6a..60a0d82 100644
--- a/libs/utils/AssetManager.cpp
+++ b/libs/utils/AssetManager.cpp
@@ -824,7 +824,7 @@
 
     // TODO: look for previously-created shared memory slice?
     int method;
-    long uncompressedLen;
+    size_t uncompressedLen;
 
     //printf("USING Zip '%s'\n", pEntry->getFileName());
 
diff --git a/libs/utils/ObbFile.cpp b/libs/utils/ObbFile.cpp
new file mode 100644
index 0000000..fe49300
--- /dev/null
+++ b/libs/utils/ObbFile.cpp
@@ -0,0 +1,296 @@
+/*
+ * Copyright (C) 2010 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include <errno.h>
+#include <fcntl.h>
+#include <stdint.h>
+#include <stdlib.h>
+#include <string.h>
+#include <unistd.h>
+
+#define LOG_TAG "ObbFile"
+#include <utils/Log.h>
+#include <utils/ObbFile.h>
+
+//#define DEBUG 1
+
+#define kFooterTagSize 8  /* last two 32-bit integers */
+
+#define kFooterMinSize 21 /* 32-bit signature version
+                           * 32-bit package version
+                           * 32-bit package name size
+                           * 1-character package name
+                           * 32-bit footer size
+                           * 32-bit footer marker
+                           */
+
+#define kMaxBufSize    32768 /* Maximum file read buffer */
+
+#define kSignature     0x01059983U /* ObbFile signature */
+
+#define kSigVersion    1 /* We only know about signature version 1 */
+
+/* offsets in version 1 of the header */
+#define kPackageVersionOffset 4
+#define kPackageNameLenOffset 8
+#define kPackageNameOffset    12
+
+/*
+ * TEMP_FAILURE_RETRY is defined by some, but not all, versions of
+ * <unistd.h>. (Alas, it is not as standard as we'd hoped!) So, if it's
+ * not already defined, then define it here.
+ */
+#ifndef TEMP_FAILURE_RETRY
+/* Used to retry syscalls that can return EINTR. */
+#define TEMP_FAILURE_RETRY(exp) ({         \
+    typeof (exp) _rc;                      \
+    do {                                   \
+        _rc = (exp);                       \
+    } while (_rc == -1 && errno == EINTR); \
+    _rc; })
+#endif
+
+/*
+ * Work around situations where off_t is 64-bit and use off64_t in
+ * situations where it's 32-bit.
+ */
+#ifdef OFF_T_IS_64_BIT
+#define my_lseek64 lseek
+typedef off_t my_off64_t;
+#else
+#define my_lseek64 lseek64
+typedef off64_t my_off64_t;
+#endif
+
+namespace android {
+
+ObbFile::ObbFile() :
+        mVersion(-1) {
+}
+
+ObbFile::~ObbFile() {
+}
+
+bool ObbFile::readFrom(const char* filename)
+{
+    int fd;
+    bool success = false;
+
+    fd = ::open(filename, O_RDONLY);
+    if (fd < 0) {
+        LOGW("couldn't open file %s: %s", filename, strerror(errno));
+        goto out;
+    }
+    success = readFrom(fd);
+    close(fd);
+
+    if (!success) {
+        LOGW("failed to read from %s (fd=%d)\n", filename, fd);
+    }
+
+out:
+    return success;
+}
+
+bool ObbFile::readFrom(int fd)
+{
+    if (fd < 0) {
+        LOGW("attempt to read from invalid fd\n");
+        return false;
+    }
+
+    return parseObbFile(fd);
+}
+
+bool ObbFile::parseObbFile(int fd)
+{
+    my_off64_t fileLength = my_lseek64(fd, 0, SEEK_END);
+
+    if (fileLength < kFooterMinSize) {
+        if (fileLength < 0) {
+            LOGW("error seeking in ObbFile: %s\n", strerror(errno));
+        } else {
+            LOGW("file is only %lld (less than %d minimum)\n", fileLength, kFooterMinSize);
+        }
+        return false;
+    }
+
+    ssize_t actual;
+    size_t footerSize;
+
+    {
+        my_lseek64(fd, fileLength - kFooterTagSize, SEEK_SET);
+
+        char *footer = new char[kFooterTagSize];
+        actual = TEMP_FAILURE_RETRY(read(fd, footer, kFooterTagSize));
+        if (actual != kFooterTagSize) {
+            LOGW("couldn't read footer signature: %s\n", strerror(errno));
+            return false;
+        }
+
+        unsigned int fileSig = get4LE((unsigned char*)footer + sizeof(int32_t));
+        if (fileSig != kSignature) {
+            LOGW("footer didn't match magic string (expected 0x%08x; got 0x%08x)\n",
+                    kSignature, fileSig);
+            return false;
+        }
+
+        footerSize = get4LE((unsigned char*)footer);
+        if (footerSize > (size_t)fileLength - kFooterTagSize
+                || footerSize > kMaxBufSize) {
+            LOGW("claimed footer size is too large (0x%08zx; file size is 0x%08llx)\n",
+                    footerSize, fileLength);
+            return false;
+        }
+
+        if (footerSize < kFooterMinSize) {
+            LOGW("claimed footer size is too small (%08zx; minimum size is 0x%x)\n",
+                    footerSize, kFooterMinSize);
+            return false;
+        }
+    }
+
+    my_off64_t fileOffset = fileLength - footerSize - kFooterTagSize;
+    if (my_lseek64(fd, fileOffset, SEEK_SET) != fileOffset) {
+        LOGW("seek %lld failed: %s\n", fileOffset, strerror(errno));
+        return false;
+    }
+
+    char* scanBuf = (char*)malloc(footerSize);
+    if (scanBuf == NULL) {
+        LOGW("couldn't allocate scanBuf: %s\n", strerror(errno));
+        return false;
+    }
+
+    actual = TEMP_FAILURE_RETRY(read(fd, scanBuf, footerSize));
+    // readAmount is guaranteed to be less than kMaxBufSize
+    if (actual != (ssize_t)footerSize) {
+        LOGI("couldn't read ObbFile footer: %s\n", strerror(errno));
+        free(scanBuf);
+        return false;
+    }
+
+#ifdef DEBUG
+    for (int i = 0; i < footerSize; ++i) {
+        LOGI("char: 0x%02x", scanBuf[i]);
+    }
+#endif
+
+    uint32_t sigVersion = get4LE((unsigned char*)scanBuf);
+    if (sigVersion != kSigVersion) {
+        LOGW("Unsupported ObbFile version %d\n", sigVersion);
+        free(scanBuf);
+        return false;
+    }
+
+    mVersion = (int32_t) get4LE((unsigned char*)scanBuf + kPackageVersionOffset);
+
+    uint32_t packageNameLen = get4LE((unsigned char*)scanBuf + kPackageNameLenOffset);
+    if (packageNameLen <= 0
+            || packageNameLen > (footerSize - kPackageNameOffset)) {
+        LOGW("bad ObbFile package name length (0x%04x; 0x%04x possible)\n",
+                packageNameLen, footerSize - kPackageNameOffset);
+        free(scanBuf);
+        return false;
+    }
+
+    char* packageName = reinterpret_cast<char*>(scanBuf + kPackageNameOffset);
+    mPackageName = String8(const_cast<char*>(packageName), packageNameLen);
+
+    free(scanBuf);
+
+#ifdef DEBUG
+    LOGI("Obb scan succeeded: packageName=%s, version=%d\n", mPackageName.string(), mVersion);
+#endif
+
+    return true;
+}
+
+bool ObbFile::writeTo(const char* filename)
+{
+    int fd;
+    bool success = false;
+
+    fd = ::open(filename, O_WRONLY);
+    if (fd < 0) {
+        goto out;
+    }
+    success = writeTo(fd);
+    close(fd);
+
+out:
+    if (!success) {
+        LOGW("failed to write to %s: %s\n", filename, strerror(errno));
+    }
+    return success;
+}
+
+bool ObbFile::writeTo(int fd)
+{
+    if (fd < 0) {
+        return false;
+    }
+
+    my_lseek64(fd, 0, SEEK_END);
+
+    if (mPackageName.size() == 0 || mVersion == -1) {
+        LOGW("tried to write uninitialized ObbFile data");
+        return false;
+    }
+
+    unsigned char intBuf[sizeof(uint32_t)+1];
+    memset(&intBuf, 0, sizeof(intBuf));
+
+    put4LE(intBuf, kSigVersion);
+    if (write(fd, &intBuf, sizeof(uint32_t)) != (ssize_t)sizeof(uint32_t)) {
+        LOGW("couldn't write signature version: %s", strerror(errno));
+        return false;
+    }
+
+    put4LE(intBuf, mVersion);
+    if (write(fd, &intBuf, sizeof(uint32_t)) != (ssize_t)sizeof(uint32_t)) {
+        LOGW("couldn't write package version");
+        return false;
+    }
+
+    size_t packageNameLen = mPackageName.size();
+    put4LE(intBuf, packageNameLen);
+    if (write(fd, &intBuf, sizeof(uint32_t)) != (ssize_t)sizeof(uint32_t)) {
+        LOGW("couldn't write package name length: %s", strerror(errno));
+        return false;
+    }
+
+    if (write(fd, mPackageName.string(), packageNameLen) != (ssize_t)packageNameLen) {
+        LOGW("couldn't write package name: %s", strerror(errno));
+        return false;
+    }
+
+    put4LE(intBuf, 3*sizeof(uint32_t) + packageNameLen);
+    if (write(fd, &intBuf, sizeof(uint32_t)) != (ssize_t)sizeof(uint32_t)) {
+        LOGW("couldn't write footer size: %s", strerror(errno));
+        return false;
+    }
+
+    put4LE(intBuf, kSignature);
+    if (write(fd, &intBuf, sizeof(uint32_t)) != (ssize_t)sizeof(uint32_t)) {
+        LOGW("couldn't write footer magic signature: %s", strerror(errno));
+        return false;
+    }
+
+    return true;
+}
+
+}
diff --git a/libs/utils/PollLoop.cpp b/libs/utils/PollLoop.cpp
new file mode 100644
index 0000000..f740fa0
--- /dev/null
+++ b/libs/utils/PollLoop.cpp
@@ -0,0 +1,364 @@
+//
+// Copyright 2010 The Android Open Source Project
+//
+// A select loop implementation.
+//
+#define LOG_TAG "PollLoop"
+
+//#define LOG_NDEBUG 0
+
+// Debugs poll and wake interactions.
+#define DEBUG_POLL_AND_WAKE 0
+
+// Debugs callback registration and invocation.
+#define DEBUG_CALLBACKS 0
+
+#include <cutils/log.h>
+#include <utils/PollLoop.h>
+
+#include <unistd.h>
+#include <fcntl.h>
+
+namespace android {
+
+static pthread_mutex_t gTLSMutex = PTHREAD_MUTEX_INITIALIZER;
+static bool gHaveTLS = false;
+static pthread_key_t gTLS = 0;
+
+PollLoop::PollLoop(bool allowNonCallbacks) :
+        mAllowNonCallbacks(allowNonCallbacks), mPolling(false),
+        mWaiters(0), mPendingFdsPos(0) {
+    openWakePipe();
+}
+
+PollLoop::~PollLoop() {
+    closeWakePipe();
+}
+
+void PollLoop::threadDestructor(void *st) {
+    PollLoop* const self = static_cast<PollLoop*>(st);
+    if (self != NULL) {
+        self->decStrong((void*)threadDestructor);
+    }
+}
+
+void PollLoop::setForThread(const sp<PollLoop>& pollLoop) {
+    sp<PollLoop> old = getForThread();
+    
+    if (pollLoop != NULL) {
+        pollLoop->incStrong((void*)threadDestructor);
+    }
+    
+    pthread_setspecific(gTLS, pollLoop.get());
+    
+    if (old != NULL) {
+        old->decStrong((void*)threadDestructor);
+    }
+}
+    
+sp<PollLoop> PollLoop::getForThread() {
+    if (!gHaveTLS) {
+        pthread_mutex_lock(&gTLSMutex);
+        if (pthread_key_create(&gTLS, threadDestructor) != 0) {
+            pthread_mutex_unlock(&gTLSMutex);
+            return NULL;
+        }
+        gHaveTLS = true;
+        pthread_mutex_unlock(&gTLSMutex);
+    }
+    
+    return (PollLoop*)pthread_getspecific(gTLS);
+}
+
+void PollLoop::openWakePipe() {
+    int wakeFds[2];
+    int result = pipe(wakeFds);
+    LOG_ALWAYS_FATAL_IF(result != 0, "Could not create wake pipe.  errno=%d", errno);
+
+    mWakeReadPipeFd = wakeFds[0];
+    mWakeWritePipeFd = wakeFds[1];
+
+    result = fcntl(mWakeReadPipeFd, F_SETFL, O_NONBLOCK);
+    LOG_ALWAYS_FATAL_IF(result != 0, "Could not make wake read pipe non-blocking.  errno=%d",
+            errno);
+
+    result = fcntl(mWakeWritePipeFd, F_SETFL, O_NONBLOCK);
+    LOG_ALWAYS_FATAL_IF(result != 0, "Could not make wake write pipe non-blocking.  errno=%d",
+            errno);
+
+    // Add the wake pipe to the head of the request list with a null callback.
+    struct pollfd requestedFd;
+    requestedFd.fd = mWakeReadPipeFd;
+    requestedFd.events = POLLIN;
+    mRequestedFds.insertAt(requestedFd, 0);
+
+    RequestedCallback requestedCallback;
+    requestedCallback.callback = NULL;
+    requestedCallback.looperCallback = NULL;
+    requestedCallback.data = NULL;
+    mRequestedCallbacks.insertAt(requestedCallback, 0);
+}
+
+void PollLoop::closeWakePipe() {
+    close(mWakeReadPipeFd);
+    close(mWakeWritePipeFd);
+
+    // Note: We don't need to remove the poll structure or callback entry because this
+    //       method is currently only called by the destructor.
+}
+
+int32_t PollLoop::pollOnce(int timeoutMillis, int* outEvents, void** outData) {
+    // If there are still pending fds from the last call, dispatch those
+    // first, to avoid an earlier fd from starving later ones.
+    const size_t pendingFdsCount = mPendingFds.size();
+    if (mPendingFdsPos < pendingFdsCount) {
+        const PendingCallback& pending = mPendingFds.itemAt(mPendingFdsPos);
+        mPendingFdsPos++;
+        if (outEvents != NULL) *outEvents = pending.events;
+        if (outData != NULL) *outData = pending.data;
+        return pending.fd;
+    }
+    
+    mLock.lock();
+    while (mWaiters != 0) {
+        mResume.wait(mLock);
+    }
+    mPolling = true;
+    mLock.unlock();
+
+    int32_t result;
+    size_t requestedCount = mRequestedFds.size();
+
+#if DEBUG_POLL_AND_WAKE
+    LOGD("%p ~ pollOnce - waiting on %d fds", this, requestedCount);
+    for (size_t i = 0; i < requestedCount; i++) {
+        LOGD("  fd %d - events %d", mRequestedFds[i].fd, mRequestedFds[i].events);
+    }
+#endif
+
+    int respondedCount = poll(mRequestedFds.editArray(), requestedCount, timeoutMillis);
+
+    if (respondedCount == 0) {
+        // Timeout
+#if DEBUG_POLL_AND_WAKE
+        LOGD("%p ~ pollOnce - timeout", this);
+#endif
+        result = POLL_TIMEOUT;
+        goto Done;
+    }
+
+    if (respondedCount < 0) {
+        // Error
+#if DEBUG_POLL_AND_WAKE
+        LOGD("%p ~ pollOnce - error, errno=%d", this, errno);
+#endif
+        if (errno != EINTR) {
+            LOGW("Poll failed with an unexpected error, errno=%d", errno);
+        }
+        result = POLL_ERROR;
+        goto Done;
+    }
+
+#if DEBUG_POLL_AND_WAKE
+    LOGD("%p ~ pollOnce - handling responses from %d fds", this, respondedCount);
+    for (size_t i = 0; i < requestedCount; i++) {
+        LOGD("  fd %d - events %d, revents %d", mRequestedFds[i].fd, mRequestedFds[i].events,
+                mRequestedFds[i].revents);
+    }
+#endif
+
+    mPendingCallbacks.clear();
+    mPendingFds.clear();
+    mPendingFdsPos = 0;
+    if (outEvents != NULL) *outEvents = 0;
+    if (outData != NULL) *outData = NULL;
+    
+    result = POLL_CALLBACK;
+    for (size_t i = 0; i < requestedCount; i++) {
+        const struct pollfd& requestedFd = mRequestedFds.itemAt(i);
+
+        short revents = requestedFd.revents;
+        if (revents) {
+            const RequestedCallback& requestedCallback = mRequestedCallbacks.itemAt(i);
+            PendingCallback pending;
+            pending.fd = requestedFd.fd;
+            pending.events = revents;
+            pending.callback = requestedCallback.callback;
+            pending.looperCallback = requestedCallback.looperCallback;
+            pending.data = requestedCallback.data;
+
+            if (pending.callback || pending.looperCallback) {
+                mPendingCallbacks.push(pending);
+            } else if (pending.fd != mWakeReadPipeFd) {
+                if (result == POLL_CALLBACK) {
+                    result = pending.fd;
+                    if (outEvents != NULL) *outEvents = pending.events;
+                    if (outData != NULL) *outData = pending.data;
+                } else {
+                    mPendingFds.push(pending);
+                }
+            } else {
+#if DEBUG_POLL_AND_WAKE
+                LOGD("%p ~ pollOnce - awoken", this);
+#endif
+                char buffer[16];
+                ssize_t nRead;
+                do {
+                    nRead = read(mWakeReadPipeFd, buffer, sizeof(buffer));
+                } while (nRead == sizeof(buffer));
+            }
+
+            respondedCount -= 1;
+            if (respondedCount == 0) {
+                break;
+            }
+        }
+    }
+
+Done:
+    mLock.lock();
+    mPolling = false;
+    if (mWaiters != 0) {
+        mAwake.broadcast();
+    }
+    mLock.unlock();
+
+    if (result == POLL_CALLBACK || result >= 0) {
+        size_t pendingCount = mPendingCallbacks.size();
+        for (size_t i = 0; i < pendingCount; i++) {
+            const PendingCallback& pendingCallback = mPendingCallbacks.itemAt(i);
+#if DEBUG_POLL_AND_WAKE || DEBUG_CALLBACKS
+            LOGD("%p ~ pollOnce - invoking callback for fd %d", this, pendingCallback.fd);
+#endif
+
+            bool keep = true;
+            if (pendingCallback.callback != NULL) {
+                keep = pendingCallback.callback(pendingCallback.fd, pendingCallback.events,
+                        pendingCallback.data);
+            } else {
+                keep = pendingCallback.looperCallback(pendingCallback.fd, pendingCallback.events,
+                        pendingCallback.data) != 0;
+            }
+            if (! keep) {
+                removeCallback(pendingCallback.fd);
+            }
+        }
+    }
+
+#if DEBUG_POLL_AND_WAKE
+    LOGD("%p ~ pollOnce - done", this);
+#endif
+    return result;
+}
+
+void PollLoop::wake() {
+#if DEBUG_POLL_AND_WAKE
+    LOGD("%p ~ wake", this);
+#endif
+
+    ssize_t nWrite = write(mWakeWritePipeFd, "W", 1);
+    if (nWrite != 1) {
+        if (errno != EAGAIN) {
+            LOGW("Could not write wake signal, errno=%d", errno);
+        }
+    }
+}
+
+bool PollLoop::getAllowNonCallbacks() const {
+    return mAllowNonCallbacks;
+}
+
+void PollLoop::setCallback(int fd, int events, Callback callback, void* data) {
+    setCallbackCommon(fd, events, callback, NULL, data);
+}
+
+void PollLoop::setLooperCallback(int fd, int events, ALooper_callbackFunc* callback,
+        void* data) {
+    setCallbackCommon(fd, events, NULL, callback, data);
+}
+
+void PollLoop::setCallbackCommon(int fd, int events, Callback callback,
+        ALooper_callbackFunc* looperCallback, void* data) {
+
+#if DEBUG_CALLBACKS
+    LOGD("%p ~ setCallback - fd=%d, events=%d", this, fd, events);
+#endif
+
+    if (! events) {
+        LOGE("Invalid attempt to set a callback with no selected poll events.");
+        removeCallback(fd);
+        return;
+    }
+
+    if (! callback && ! looperCallback && ! mAllowNonCallbacks) {
+        LOGE("Invalid attempt to set NULL callback but not allowed.");
+        removeCallback(fd);
+        return;
+    }
+    
+    wakeAndLock();
+
+    struct pollfd requestedFd;
+    requestedFd.fd = fd;
+    requestedFd.events = events;
+
+    RequestedCallback requestedCallback;
+    requestedCallback.callback = callback;
+    requestedCallback.looperCallback = looperCallback;
+    requestedCallback.data = data;
+
+    ssize_t index = getRequestIndexLocked(fd);
+    if (index < 0) {
+        mRequestedFds.push(requestedFd);
+        mRequestedCallbacks.push(requestedCallback);
+    } else {
+        mRequestedFds.replaceAt(requestedFd, size_t(index));
+        mRequestedCallbacks.replaceAt(requestedCallback, size_t(index));
+    }
+
+    mLock.unlock();
+}
+
+bool PollLoop::removeCallback(int fd) {
+#if DEBUG_CALLBACKS
+    LOGD("%p ~ removeCallback - fd=%d", this, fd);
+#endif
+
+    wakeAndLock();
+
+    ssize_t index = getRequestIndexLocked(fd);
+    if (index >= 0) {
+        mRequestedFds.removeAt(size_t(index));
+        mRequestedCallbacks.removeAt(size_t(index));
+    }
+
+    mLock.unlock();
+    return index >= 0;
+}
+
+ssize_t PollLoop::getRequestIndexLocked(int fd) {
+    size_t requestCount = mRequestedFds.size();
+
+    for (size_t i = 0; i < requestCount; i++) {
+        if (mRequestedFds.itemAt(i).fd == fd) {
+            return i;
+        }
+    }
+
+    return -1;
+}
+
+void PollLoop::wakeAndLock() {
+    mLock.lock();
+    mWaiters += 1;
+    while (mPolling) {
+        wake();
+        mAwake.wait(mLock);
+    }
+    mWaiters -= 1;
+    if (mWaiters == 0) {
+        mResume.signal();
+    }
+}
+
+} // namespace android
diff --git a/libs/utils/Pool.cpp b/libs/utils/Pool.cpp
new file mode 100644
index 0000000..8f18cb9
--- /dev/null
+++ b/libs/utils/Pool.cpp
@@ -0,0 +1,37 @@
+//
+// Copyright 2010 The Android Open Source Project
+//
+// A simple memory pool.
+//
+#define LOG_TAG "Pool"
+
+//#define LOG_NDEBUG 0
+
+#include <cutils/log.h>
+#include <utils/Pool.h>
+
+#include <stdlib.h>
+
+namespace android {
+
+// TODO Provide a real implementation of a pool.  This is just a stub for initial development.
+
+PoolImpl::PoolImpl(size_t objSize) :
+    mObjSize(objSize) {
+}
+
+PoolImpl::~PoolImpl() {
+}
+
+void* PoolImpl::allocImpl() {
+    void* ptr = malloc(mObjSize);
+    LOG_ALWAYS_FATAL_IF(ptr == NULL, "Cannot allocate new pool object.");
+    return ptr;
+}
+
+void PoolImpl::freeImpl(void* obj) {
+    LOG_ALWAYS_FATAL_IF(obj == NULL, "Caller attempted to free NULL pool object.");
+    return free(obj);
+}
+
+} // namespace android
diff --git a/libs/utils/ResourceTypes.cpp b/libs/utils/ResourceTypes.cpp
index 7e0f881..a1401ad 100644
--- a/libs/utils/ResourceTypes.cpp
+++ b/libs/utils/ResourceTypes.cpp
@@ -4178,6 +4178,9 @@
                             case ResTable_config::SCREENSIZE_LARGE:
                                 printf(" (large)");
                                 break;
+                            case ResTable_config::SCREENSIZE_XLARGE:
+                                printf(" (xlarge)");
+                                break;
                         }
                         printf(" lng=%d",
                                 type->config.screenLayout&ResTable_config::MASK_SCREENLONG);
diff --git a/libs/utils/StopWatch.cpp b/libs/utils/StopWatch.cpp
index 68a1c52..b5dda2f 100644
--- a/libs/utils/StopWatch.cpp
+++ b/libs/utils/StopWatch.cpp
@@ -30,10 +30,9 @@
 
 
 StopWatch::StopWatch(const char *name, int clock, uint32_t flags)
-    :   mName(name), mClock(clock), mFlags(flags),
-        mStartTime(0), mNumLaps(0)
+    :   mName(name), mClock(clock), mFlags(flags)
 {
-    mStartTime = systemTime(mClock);
+    reset();
 }
 
 StopWatch::~StopWatch()
@@ -72,6 +71,12 @@
     return systemTime(mClock) - mStartTime;
 }
 
+void StopWatch::reset()
+{
+    mNumLaps = 0;
+    mStartTime = systemTime(mClock);
+}
+
 
 /*****************************************************************************/
 
diff --git a/libs/utils/String8.cpp b/libs/utils/String8.cpp
index 636cd83..1c4f80c 100644
--- a/libs/utils/String8.cpp
+++ b/libs/utils/String8.cpp
@@ -301,8 +301,9 @@
 
 status_t String8::setTo(const char* other)
 {
+    const char *newString = allocFromUTF8(other, strlen(other));
     SharedBuffer::bufferFromData(mString)->release();
-    mString = allocFromUTF8(other, strlen(other));
+    mString = newString;
     if (mString) return NO_ERROR;
 
     mString = getEmptyString();
@@ -311,8 +312,9 @@
 
 status_t String8::setTo(const char* other, size_t len)
 {
+    const char *newString = allocFromUTF8(other, len);
     SharedBuffer::bufferFromData(mString)->release();
-    mString = allocFromUTF8(other, len);
+    mString = newString;
     if (mString) return NO_ERROR;
 
     mString = getEmptyString();
@@ -321,8 +323,9 @@
 
 status_t String8::setTo(const char16_t* other, size_t len)
 {
+    const char *newString = allocFromUTF16(other, len);
     SharedBuffer::bufferFromData(mString)->release();
-    mString = allocFromUTF16(other, len);
+    mString = newString;
     if (mString) return NO_ERROR;
 
     mString = getEmptyString();
@@ -331,8 +334,9 @@
 
 status_t String8::setTo(const char32_t* other, size_t len)
 {
+    const char *newString = allocFromUTF32(other, len);
     SharedBuffer::bufferFromData(mString)->release();
-    mString = allocFromUTF32(other, len);
+    mString = newString;
     if (mString) return NO_ERROR;
 
     mString = getEmptyString();
@@ -368,6 +372,27 @@
     return real_append(other, otherLen);
 }
 
+status_t String8::appendFormat(const char* fmt, ...)
+{
+    va_list ap;
+    va_start(ap, fmt);
+
+    int result = NO_ERROR;
+    int n = vsnprintf(NULL, 0, fmt, ap);
+    if (n != 0) {
+        size_t oldLength = length();
+        char* buf = lockBuffer(oldLength + n);
+        if (buf) {
+            vsnprintf(buf + oldLength, n + 1, fmt, ap);
+        } else {
+            result = NO_MEMORY;
+        }
+    }
+
+    va_end(ap);
+    return result;
+}
+
 status_t String8::real_append(const char* other, size_t otherLen)
 {
     const size_t myLen = bytes();
@@ -407,15 +432,16 @@
     if (size != this->size()) {
         SharedBuffer* buf = SharedBuffer::bufferFromData(mString)
             ->editResize(size+1);
-        if (buf) {
-            char* str = (char*)buf->data();
-            str[size] = 0;
-            mString = str;
-            return NO_ERROR;
+        if (! buf) {
+            return NO_MEMORY;
         }
+
+        char* str = (char*)buf->data();
+        str[size] = 0;
+        mString = str;
     }
-    
-    return NO_MEMORY;
+
+    return NO_ERROR;
 }
 
 ssize_t String8::find(const char* other, size_t start) const
diff --git a/libs/utils/VectorImpl.cpp b/libs/utils/VectorImpl.cpp
index 0322af7..289c826 100644
--- a/libs/utils/VectorImpl.cpp
+++ b/libs/utils/VectorImpl.cpp
@@ -108,13 +108,7 @@
 
 ssize_t VectorImpl::insertVectorAt(const VectorImpl& vector, size_t index)
 {
-    if (index > size())
-        return BAD_INDEX;
-    void* where = _grow(index, vector.size());
-    if (where) {
-        _do_copy(where, vector.arrayImpl(), vector.size());
-    }
-    return where ? index : (ssize_t)NO_MEMORY;
+    return insertArrayAt(vector.arrayImpl(), index, vector.size());
 }
 
 ssize_t VectorImpl::appendVector(const VectorImpl& vector)
@@ -122,6 +116,22 @@
     return insertVectorAt(vector, size());
 }
 
+ssize_t VectorImpl::insertArrayAt(const void* array, size_t index, size_t length)
+{
+    if (index > size())
+        return BAD_INDEX;
+    void* where = _grow(index, length);
+    if (where) {
+        _do_copy(where, array, length);
+    }
+    return where ? index : (ssize_t)NO_MEMORY;
+}
+
+ssize_t VectorImpl::appendArray(const void* array, size_t length)
+{
+    return insertArrayAt(array, size(), length);
+}
+
 ssize_t VectorImpl::insertAt(size_t index, size_t numItems)
 {
     return insertAt(0, index, numItems);
diff --git a/libs/utils/ZipFileCRO.cpp b/libs/utils/ZipFileCRO.cpp
index 45f6c8b..16b219ca 100644
--- a/libs/utils/ZipFileCRO.cpp
+++ b/libs/utils/ZipFileCRO.cpp
@@ -39,8 +39,8 @@
 }
 
 bool ZipFileCRO_getEntryInfo(ZipFileCRO zipToken, ZipEntryRO entryToken,
-        int* pMethod, long* pUncompLen,
-        long* pCompLen, off_t* pOffset, long* pModWhen, long* pCrc32) {
+        int* pMethod, size_t* pUncompLen,
+        size_t* pCompLen, off_t* pOffset, long* pModWhen, long* pCrc32) {
     ZipFileRO* zip = (ZipFileRO*)zipToken;
     ZipEntryRO entry = (ZipEntryRO)entryToken;
     return zip->getEntryInfo(entry, pMethod, pUncompLen, pCompLen, pOffset,
diff --git a/libs/utils/ZipFileRO.cpp b/libs/utils/ZipFileRO.cpp
index 6c701dd..28dc512 100644
--- a/libs/utils/ZipFileRO.cpp
+++ b/libs/utils/ZipFileRO.cpp
@@ -29,6 +29,22 @@
 #include <fcntl.h>
 #include <errno.h>
 #include <assert.h>
+#include <unistd.h>
+
+/*
+ * TEMP_FAILURE_RETRY is defined by some, but not all, versions of
+ * <unistd.h>. (Alas, it is not as standard as we'd hoped!) So, if it's
+ * not already defined, then define it here.
+ */
+#ifndef TEMP_FAILURE_RETRY
+/* Used to retry syscalls that can return EINTR. */
+#define TEMP_FAILURE_RETRY(exp) ({         \
+    typeof (exp) _rc;                      \
+    do {                                   \
+        _rc = (exp);                       \
+    } while (_rc == -1 && errno == EINTR); \
+    _rc; })
+#endif
 
 using namespace android;
 
@@ -38,6 +54,7 @@
 #define kEOCDSignature      0x06054b50
 #define kEOCDLen            22
 #define kEOCDNumEntries     8               // offset to #of entries in file
+#define kEOCDSize           12              // size of the central directory
 #define kEOCDFileOffset     16              // offset to central directory
 
 #define kMaxCommentLen      65535           // longest possible in ushort
@@ -90,9 +107,8 @@
 status_t ZipFileRO::open(const char* zipFileName)
 {
     int fd = -1;
-    off_t length;
 
-    assert(mFileMap == NULL);
+    assert(mDirectoryMap == NULL);
 
     /*
      * Open and map the specified file.
@@ -103,172 +119,240 @@
         return NAME_NOT_FOUND;
     }
 
-    length = lseek(fd, 0, SEEK_END);
-    if (length < 0) {
+    mFileLength = lseek(fd, 0, SEEK_END);
+    if (mFileLength < kEOCDLen) {
         close(fd);
         return UNKNOWN_ERROR;
     }
 
-    mFileMap = new FileMap();
-    if (mFileMap == NULL) {
-        close(fd);
-        return NO_MEMORY;
+    if (mFileName != NULL) {
+        free(mFileName);
     }
-    if (!mFileMap->create(zipFileName, fd, 0, length, true)) {
-        LOGW("Unable to map '%s': %s\n", zipFileName, strerror(errno));
-        close(fd);
-        return UNKNOWN_ERROR;
-    }
+    mFileName = strdup(zipFileName);
 
     mFd = fd;
 
     /*
-     * Got it mapped, verify it and create data structures for fast access.
+     * Find the Central Directory and store its size and number of entries.
+     */
+    if (!mapCentralDirectory()) {
+        goto bail;
+    }
+
+    /*
+     * Verify Central Directory and create data structures for fast access.
      */
     if (!parseZipArchive()) {
-        mFileMap->release();
-        mFileMap = NULL;
-        return UNKNOWN_ERROR;
+        goto bail;
     }
 
     return OK;
+
+bail:
+    free(mFileName);
+    mFileName = NULL;
+    close(fd);
+    return UNKNOWN_ERROR;
 }
 
 /*
  * Parse the Zip archive, verifying its contents and initializing internal
  * data structures.
  */
+bool ZipFileRO::mapCentralDirectory(void)
+{
+    size_t readAmount = kMaxEOCDSearch;
+    if (readAmount > (size_t) mFileLength)
+        readAmount = mFileLength;
+
+    unsigned char* scanBuf = (unsigned char*) malloc(readAmount);
+    if (scanBuf == NULL) {
+        LOGW("couldn't allocate scanBuf: %s", strerror(errno));
+        free(scanBuf);
+        return false;
+    }
+
+    /*
+     * Make sure this is a Zip archive.
+     */
+    if (lseek(mFd, 0, SEEK_SET) != 0) {
+        LOGW("seek to start failed: %s", strerror(errno));
+        free(scanBuf);
+        return false;
+    }
+
+    ssize_t actual = TEMP_FAILURE_RETRY(read(mFd, scanBuf, sizeof(int32_t)));
+    if (actual != (ssize_t) sizeof(int32_t)) {
+        LOGI("couldn't read first signature from zip archive: %s", strerror(errno));
+        free(scanBuf);
+        return false;
+    }
+
+    {
+        unsigned int header = get4LE(scanBuf);
+        if (header == kEOCDSignature) {
+            LOGI("Found Zip archive, but it looks empty\n");
+            free(scanBuf);
+            return false;
+        } else if (header != kLFHSignature) {
+            LOGV("Not a Zip archive (found 0x%08x)\n", val);
+            free(scanBuf);
+            return false;
+        }
+    }
+
+    /*
+     * Perform the traditional EOCD snipe hunt.
+     *
+     * We're searching for the End of Central Directory magic number,
+     * which appears at the start of the EOCD block.  It's followed by
+     * 18 bytes of EOCD stuff and up to 64KB of archive comment.  We
+     * need to read the last part of the file into a buffer, dig through
+     * it to find the magic number, parse some values out, and use those
+     * to determine the extent of the CD.
+     *
+     * We start by pulling in the last part of the file.
+     */
+    off_t searchStart = mFileLength - readAmount;
+
+    if (lseek(mFd, searchStart, SEEK_SET) != searchStart) {
+        LOGW("seek %ld failed: %s\n",  (long) searchStart, strerror(errno));
+        free(scanBuf);
+        return false;
+    }
+    actual = TEMP_FAILURE_RETRY(read(mFd, scanBuf, readAmount));
+    if (actual != (ssize_t) readAmount) {
+        LOGW("Zip: read %zd failed: %s\n", readAmount, strerror(errno));
+        free(scanBuf);
+        return false;
+    }
+
+    /*
+     * Scan backward for the EOCD magic.  In an archive without a trailing
+     * comment, we'll find it on the first try.  (We may want to consider
+     * doing an initial minimal read; if we don't find it, retry with a
+     * second read as above.)
+     */
+    int i;
+    for (i = readAmount - kEOCDLen; i >= 0; i--) {
+        if (scanBuf[i] == 0x50 && get4LE(&scanBuf[i]) == kEOCDSignature) {
+            LOGV("+++ Found EOCD at buf+%d\n", i);
+            break;
+        }
+    }
+    if (i < 0) {
+        LOGD("Zip: EOCD not found, %s is not zip\n", mFileName);
+        free(scanBuf);
+        return false;
+    }
+
+    off_t eocdOffset = searchStart + i;
+    const unsigned char* eocdPtr = scanBuf + i;
+
+    assert(eocdOffset < mFileLength);
+
+    /*
+     * Grab the CD offset and size, and the number of entries in the
+     * archive.  Verify that they look reasonable.
+     */
+    unsigned int numEntries = get2LE(eocdPtr + kEOCDNumEntries);
+    unsigned int dirSize = get4LE(eocdPtr + kEOCDSize);
+    unsigned int dirOffset = get4LE(eocdPtr + kEOCDFileOffset);
+
+    if ((long long) dirOffset + (long long) dirSize > (long long) eocdOffset) {
+        LOGW("bad offsets (dir %ld, size %u, eocd %ld)\n",
+            (long) dirOffset, dirSize, (long) eocdOffset);
+        free(scanBuf);
+        return false;
+    }
+    if (numEntries == 0) {
+        LOGW("empty archive?\n");
+        free(scanBuf);
+        return false;
+    }
+
+    LOGV("+++ numEntries=%d dirSize=%d dirOffset=%d\n",
+        numEntries, dirSize, dirOffset);
+
+    mDirectoryMap = new FileMap();
+    if (mDirectoryMap == NULL) {
+        LOGW("Unable to create directory map: %s", strerror(errno));
+        free(scanBuf);
+        return false;
+    }
+
+    if (!mDirectoryMap->create(mFileName, mFd, dirOffset, dirSize, true)) {
+        LOGW("Unable to map '%s' (%zd to %zd): %s\n", mFileName,
+                dirOffset, dirOffset + dirSize, strerror(errno));
+        free(scanBuf);
+        return false;
+    }
+
+    mNumEntries = numEntries;
+    mDirectoryOffset = dirOffset;
+
+    return true;
+}
+
 bool ZipFileRO::parseZipArchive(void)
 {
-#define CHECK_OFFSET(_off) {                                                \
-        if ((unsigned int) (_off) >= maxOffset) {                           \
-            LOGE("ERROR: bad offset %u (max %d): %s\n",                     \
-                (unsigned int) (_off), maxOffset, #_off);                   \
-            goto bail;                                                      \
-        }                                                                   \
-    }
-    const unsigned char* basePtr = (const unsigned char*)mFileMap->getDataPtr();
-    const unsigned char* ptr;
-    size_t length = mFileMap->getDataLength();
     bool result = false;
-    unsigned int i, numEntries, cdOffset;
-    unsigned int val;
-
-    /*
-     * The first 4 bytes of the file will either be the local header
-     * signature for the first file (kLFHSignature) or, if the archive doesn't
-     * have any files in it, the end-of-central-directory signature
-     * (kEOCDSignature).
-     */
-    val = get4LE(basePtr);
-    if (val == kEOCDSignature) {
-        LOGI("Found Zip archive, but it looks empty\n");
-        goto bail;
-    } else if (val != kLFHSignature) {
-        LOGV("Not a Zip archive (found 0x%08x)\n", val);
-        goto bail;
-    }
-
-    /*
-     * Find the EOCD.  We'll find it immediately unless they have a file
-     * comment.
-     */
-    ptr = basePtr + length - kEOCDLen;
-
-    while (ptr >= basePtr) {
-        if (*ptr == (kEOCDSignature & 0xff) && get4LE(ptr) == kEOCDSignature)
-            break;
-        ptr--;
-    }
-    if (ptr < basePtr) {
-        LOGI("Could not find end-of-central-directory in Zip\n");
-        goto bail;
-    }
-
-    /*
-     * There are two interesting items in the EOCD block: the number of
-     * entries in the file, and the file offset of the start of the
-     * central directory.
-     *
-     * (There's actually a count of the #of entries in this file, and for
-     * all files which comprise a spanned archive, but for our purposes
-     * we're only interested in the current file.  Besides, we expect the
-     * two to be equivalent for our stuff.)
-     */
-    numEntries = get2LE(ptr + kEOCDNumEntries);
-    cdOffset = get4LE(ptr + kEOCDFileOffset);
-
-    /* valid offsets are [0,EOCD] */
-    unsigned int maxOffset;
-    maxOffset = (ptr - basePtr) +1;
-
-    LOGV("+++ numEntries=%d cdOffset=%d\n", numEntries, cdOffset);
-    if (numEntries == 0 || cdOffset >= length) {
-        LOGW("Invalid entries=%d offset=%d (len=%zd)\n",
-            numEntries, cdOffset, length);
-        goto bail;
-    }
+    const unsigned char* cdPtr = (const unsigned char*) mDirectoryMap->getDataPtr();
+    size_t cdLength = mDirectoryMap->getDataLength();
+    int numEntries = mNumEntries;
 
     /*
      * Create hash table.  We have a minimum 75% load factor, possibly as
      * low as 50% after we round off to a power of 2.
      */
-    mNumEntries = numEntries;
-    mHashTableSize = roundUpPower2(1 + ((numEntries * 4) / 3));
-    mHashTable = (HashEntry*) calloc(1, sizeof(HashEntry) * mHashTableSize);
+    mHashTableSize = roundUpPower2(1 + (numEntries * 4) / 3);
+    mHashTable = (HashEntry*) calloc(mHashTableSize, sizeof(HashEntry));
 
     /*
      * Walk through the central directory, adding entries to the hash
      * table.
      */
-    ptr = basePtr + cdOffset;
-    for (i = 0; i < numEntries; i++) {
-        unsigned int fileNameLen, extraLen, commentLen, localHdrOffset;
-        const unsigned char* localHdr;
-        unsigned int hash;
-
+    const unsigned char* ptr = cdPtr;
+    for (int i = 0; i < numEntries; i++) {
         if (get4LE(ptr) != kCDESignature) {
             LOGW("Missed a central dir sig (at %d)\n", i);
             goto bail;
         }
-        if (ptr + kCDELen > basePtr + length) {
+        if (ptr + kCDELen > cdPtr + cdLength) {
             LOGW("Ran off the end (at %d)\n", i);
             goto bail;
         }
 
-        localHdrOffset = get4LE(ptr + kCDELocalOffset);
-        CHECK_OFFSET(localHdrOffset);
+        long localHdrOffset = (long) get4LE(ptr + kCDELocalOffset);
+        if (localHdrOffset >= mDirectoryOffset) {
+            LOGW("bad LFH offset %ld at entry %d\n", localHdrOffset, i);
+            goto bail;
+        }
+
+        unsigned int fileNameLen, extraLen, commentLen, hash;
+
         fileNameLen = get2LE(ptr + kCDENameLen);
         extraLen = get2LE(ptr + kCDEExtraLen);
         commentLen = get2LE(ptr + kCDECommentLen);
 
-        //LOGV("+++ %d: localHdr=%d fnl=%d el=%d cl=%d\n",
-        //    i, localHdrOffset, fileNameLen, extraLen, commentLen);
-        //LOGV(" '%.*s'\n", fileNameLen, ptr + kCDELen);
-
         /* add the CDE filename to the hash table */
         hash = computeHash((const char*)ptr + kCDELen, fileNameLen);
         addToHash((const char*)ptr + kCDELen, fileNameLen, hash);
 
-        localHdr = basePtr + localHdrOffset;
-        if (get4LE(localHdr) != kLFHSignature) {
-            LOGW("Bad offset to local header: %d (at %d)\n",
-                localHdrOffset, i);
+        ptr += kCDELen + fileNameLen + extraLen + commentLen;
+        if ((size_t)(ptr - cdPtr) > cdLength) {
+            LOGW("bad CD advance (%d vs %zd) at entry %d\n",
+                (int) (ptr - cdPtr), cdLength, i);
             goto bail;
         }
-
-        ptr += kCDELen + fileNameLen + extraLen + commentLen;
-        CHECK_OFFSET(ptr - basePtr);
     }
-
+    LOGV("+++ zip good scan %d entries\n", numEntries);
     result = true;
 
 bail:
     return result;
-#undef CHECK_OFFSET
 }
 
-
 /*
  * Simple string hash function for non-null-terminated strings.
  */
@@ -315,7 +399,7 @@
             memcmp(mHashTable[ent].name, fileName, nameLen) == 0)
         {
             /* match */
-            return (ZipEntryRO) (ent + kZipEntryAdj);
+            return (ZipEntryRO)(long)(ent + kZipEntryAdj);
         }
 
         ent = (ent + 1) & (mHashTableSize-1);
@@ -354,20 +438,24 @@
  * Returns "false" if the offsets to the fields or the contents of the fields
  * appear to be bogus.
  */
-bool ZipFileRO::getEntryInfo(ZipEntryRO entry, int* pMethod, long* pUncompLen,
-    long* pCompLen, off_t* pOffset, long* pModWhen, long* pCrc32) const
+bool ZipFileRO::getEntryInfo(ZipEntryRO entry, int* pMethod, size_t* pUncompLen,
+    size_t* pCompLen, off_t* pOffset, long* pModWhen, long* pCrc32) const
 {
-    int ent = entryToIndex(entry);
+    bool ret = false;
+
+    const int ent = entryToIndex(entry);
     if (ent < 0)
         return false;
 
+    HashEntry hashEntry = mHashTable[ent];
+
     /*
      * Recover the start of the central directory entry from the filename
-     * pointer.
+     * pointer.  The filename is the first entry past the fixed-size data,
+     * so we can just subtract back from that.
      */
-    const unsigned char* basePtr = (const unsigned char*)mFileMap->getDataPtr();
-    const unsigned char* ptr = (const unsigned char*) mHashTable[ent].name;
-    size_t zipLength = mFileMap->getDataLength();
+    const unsigned char* ptr = (const unsigned char*) hashEntry.name;
+    off_t cdOffset = mDirectoryOffset;
 
     ptr -= kCDELen;
 
@@ -380,48 +468,78 @@
     if (pCrc32 != NULL)
         *pCrc32 = get4LE(ptr + kCDECRC);
 
+    size_t compLen = get4LE(ptr + kCDECompLen);
+    if (pCompLen != NULL)
+        *pCompLen = compLen;
+    size_t uncompLen = get4LE(ptr + kCDEUncompLen);
+    if (pUncompLen != NULL)
+        *pUncompLen = uncompLen;
+
     /*
-     * We need to make sure that the lengths are not so large that somebody
-     * trying to map the compressed or uncompressed data runs off the end
-     * of the mapped region.
+     * If requested, determine the offset of the start of the data.  All we
+     * have is the offset to the Local File Header, which is variable size,
+     * so we have to read the contents of the struct to figure out where
+     * the actual data starts.
+     *
+     * We also need to make sure that the lengths are not so large that
+     * somebody trying to map the compressed or uncompressed data runs
+     * off the end of the mapped region.
+     *
+     * Note we don't verify compLen/uncompLen if they don't request the
+     * dataOffset, because dataOffset is expensive to determine.  However,
+     * if they don't have the file offset, they're not likely to be doing
+     * anything with the contents.
      */
-    unsigned long localHdrOffset = get4LE(ptr + kCDELocalOffset);
-    if (localHdrOffset + kLFHLen >= zipLength) {
-        LOGE("ERROR: bad local hdr offset in zip\n");
-        return false;
-    }
-    const unsigned char* localHdr = basePtr + localHdrOffset;
-    off_t dataOffset = localHdrOffset + kLFHLen
-        + get2LE(localHdr + kLFHNameLen) + get2LE(localHdr + kLFHExtraLen);
-    if ((unsigned long) dataOffset >= zipLength) {
-        LOGE("ERROR: bad data offset in zip\n");
-        return false;
-    }
-
-    if (pCompLen != NULL) {
-        *pCompLen = get4LE(ptr + kCDECompLen);
-        if (*pCompLen < 0 || (size_t)(dataOffset + *pCompLen) >= zipLength) {
-            LOGE("ERROR: bad compressed length in zip\n");
-            return false;
-        }
-    }
-    if (pUncompLen != NULL) {
-        *pUncompLen = get4LE(ptr + kCDEUncompLen);
-        if (*pUncompLen < 0) {
-            LOGE("ERROR: negative uncompressed length in zip\n");
-            return false;
-        }
-        if (method == kCompressStored &&
-            (size_t)(dataOffset + *pUncompLen) >= zipLength)
-        {
-            LOGE("ERROR: bad uncompressed length in zip\n");
-            return false;
-        }
-    }
-
     if (pOffset != NULL) {
+        long localHdrOffset = get4LE(ptr + kCDELocalOffset);
+        if (localHdrOffset + kLFHLen >= cdOffset) {
+            LOGE("ERROR: bad local hdr offset in zip\n");
+            return false;
+        }
+
+        unsigned char lfhBuf[kLFHLen];
+        if (lseek(mFd, localHdrOffset, SEEK_SET) != localHdrOffset) {
+            LOGW("failed seeking to lfh at offset %ld\n", localHdrOffset);
+            return false;
+        }
+        ssize_t actual =
+            TEMP_FAILURE_RETRY(read(mFd, lfhBuf, sizeof(lfhBuf)));
+        if (actual != sizeof(lfhBuf)) {
+            LOGW("failed reading lfh from offset %ld\n", localHdrOffset);
+            return false;
+        }
+
+        if (get4LE(lfhBuf) != kLFHSignature) {
+            LOGW("didn't find signature at start of lfh, offset=%ld\n",
+                localHdrOffset);
+            return false;
+        }
+
+        off_t dataOffset = localHdrOffset + kLFHLen
+            + get2LE(lfhBuf + kLFHNameLen) + get2LE(lfhBuf + kLFHExtraLen);
+        if (dataOffset >= cdOffset) {
+            LOGW("bad data offset %ld in zip\n", (long) dataOffset);
+            return false;
+        }
+
+        /* check lengths */
+        if ((off_t)(dataOffset + compLen) > cdOffset) {
+            LOGW("bad compressed length in zip (%ld + %zd > %ld)\n",
+                (long) dataOffset, compLen, (long) cdOffset);
+            return false;
+        }
+
+        if (method == kCompressStored &&
+            (off_t)(dataOffset + uncompLen) > cdOffset)
+        {
+            LOGE("ERROR: bad uncompressed length in zip (%ld + %zd > %ld)\n",
+                (long) dataOffset, uncompLen, (long) cdOffset);
+            return false;
+        }
+
         *pOffset = dataOffset;
     }
+
     return true;
 }
 
@@ -457,14 +575,14 @@
      */
 
     FileMap* newMap;
-    long compLen;
+    size_t compLen;
     off_t offset;
 
     if (!getEntryInfo(entry, NULL, NULL, &compLen, &offset, NULL, NULL))
         return NULL;
 
     newMap = new FileMap();
-    if (!newMap->create(mFileMap->getFileName(), mFd, offset, compLen, true)) {
+    if (!newMap->create(mFileName, mFd, offset, compLen, true)) {
         newMap->release();
         return NULL;
     }
@@ -480,19 +598,26 @@
  */
 bool ZipFileRO::uncompressEntry(ZipEntryRO entry, void* buffer) const
 {
-    const int kSequentialMin = 32768;
+    const size_t kSequentialMin = 32768;
     bool result = false;
     int ent = entryToIndex(entry);
     if (ent < 0)
         return -1;
 
-    const unsigned char* basePtr = (const unsigned char*)mFileMap->getDataPtr();
     int method;
-    long uncompLen, compLen;
+    size_t uncompLen, compLen;
     off_t offset;
+    const unsigned char* ptr;
 
     getEntryInfo(entry, &method, &uncompLen, &compLen, &offset, NULL, NULL);
 
+    FileMap* file = createEntryFileMap(entry);
+    if (file == NULL) {
+        goto bail;
+    }
+
+    ptr = (const unsigned char*) file->getDataPtr();
+
     /*
      * Experiment with madvise hint.  When we want to uncompress a file,
      * we pull some stuff out of the central dir entry and then hit a
@@ -507,17 +632,17 @@
      * pair of system calls are negated by a reduction in page faults.
      */
     if (compLen > kSequentialMin)
-        mFileMap->advise(FileMap::SEQUENTIAL);
+        file->advise(FileMap::SEQUENTIAL);
 
     if (method == kCompressStored) {
-        memcpy(buffer, basePtr + offset, uncompLen);
+        memcpy(buffer, ptr, uncompLen);
     } else {
-        if (!inflateBuffer(buffer, basePtr + offset, uncompLen, compLen))
+        if (!inflateBuffer(buffer, ptr, uncompLen, compLen))
             goto bail;
     }
 
     if (compLen > kSequentialMin)
-        mFileMap->advise(FileMap::NORMAL);
+        file->advise(FileMap::NORMAL);
 
     result = true;
 
@@ -537,29 +662,34 @@
     if (ent < 0)
         return -1;
 
-    const unsigned char* basePtr = (const unsigned char*)mFileMap->getDataPtr();
     int method;
-    long uncompLen, compLen;
+    size_t uncompLen, compLen;
     off_t offset;
+    const unsigned char* ptr;
 
     getEntryInfo(entry, &method, &uncompLen, &compLen, &offset, NULL, NULL);
 
-    if (method == kCompressStored) {
-        ssize_t actual;
+    const FileMap* file = createEntryFileMap(entry);
+    if (file == NULL) {
+        goto bail;
+    }
 
-        actual = write(fd, basePtr + offset, uncompLen);
+    ptr = (const unsigned char*) file->getDataPtr();
+
+    if (method == kCompressStored) {
+        ssize_t actual = write(fd, ptr, uncompLen);
         if (actual < 0) {
             LOGE("Write failed: %s\n", strerror(errno));
             goto bail;
-        } else if (actual != uncompLen) {
-            LOGE("Partial write during uncompress (%d of %ld)\n",
-                (int)actual, uncompLen);
+        } else if ((size_t) actual != uncompLen) {
+            LOGE("Partial write during uncompress (%zd of %zd)\n",
+                actual, uncompLen);
             goto bail;
         } else {
             LOGI("+++ successful write\n");
         }
     } else {
-        if (!inflateBuffer(fd, basePtr+offset, uncompLen, compLen))
+        if (!inflateBuffer(fd, ptr, uncompLen, compLen))
             goto bail;
     }
 
@@ -573,7 +703,7 @@
  * Uncompress "deflate" data from one buffer to another.
  */
 /*static*/ bool ZipFileRO::inflateBuffer(void* outBuf, const void* inBuf,
-    long uncompLen, long compLen)
+    size_t uncompLen, size_t compLen)
 {
     bool result = false;
     z_stream zstream;
@@ -582,7 +712,7 @@
     /*
      * Initialize the zlib stream struct.
      */
-	memset(&zstream, 0, sizeof(zstream));
+    memset(&zstream, 0, sizeof(zstream));
     zstream.zalloc = Z_NULL;
     zstream.zfree = Z_NULL;
     zstream.opaque = Z_NULL;
@@ -592,10 +722,10 @@
     zstream.avail_out = uncompLen;
     zstream.data_type = Z_UNKNOWN;
 
-	/*
-	 * Use the undocumented "negative window bits" feature to tell zlib
-	 * that there's no zlib header waiting for it.
-	 */
+    /*
+     * Use the undocumented "negative window bits" feature to tell zlib
+     * that there's no zlib header waiting for it.
+     */
     zerr = inflateInit2(&zstream, -MAX_WBITS);
     if (zerr != Z_OK) {
         if (zerr == Z_VERSION_ERROR) {
@@ -619,8 +749,8 @@
     }
 
     /* paranoia */
-    if ((long) zstream.total_out != uncompLen) {
-        LOGW("Size mismatch on inflated file (%ld vs %ld)\n",
+    if (zstream.total_out != uncompLen) {
+        LOGW("Size mismatch on inflated file (%ld vs %zd)\n",
             zstream.total_out, uncompLen);
         goto z_bail;
     }
@@ -638,10 +768,10 @@
  * Uncompress "deflate" data from one buffer to an open file descriptor.
  */
 /*static*/ bool ZipFileRO::inflateBuffer(int fd, const void* inBuf,
-    long uncompLen, long compLen)
+    size_t uncompLen, size_t compLen)
 {
     bool result = false;
-    const int kWriteBufSize = 32768;
+    const size_t kWriteBufSize = 32768;
     unsigned char writeBuf[kWriteBufSize];
     z_stream zstream;
     int zerr;
@@ -649,7 +779,7 @@
     /*
      * Initialize the zlib stream struct.
      */
-	memset(&zstream, 0, sizeof(zstream));
+    memset(&zstream, 0, sizeof(zstream));
     zstream.zalloc = Z_NULL;
     zstream.zfree = Z_NULL;
     zstream.opaque = Z_NULL;
@@ -659,10 +789,10 @@
     zstream.avail_out = sizeof(writeBuf);
     zstream.data_type = Z_UNKNOWN;
 
-	/*
-	 * Use the undocumented "negative window bits" feature to tell zlib
-	 * that there's no zlib header waiting for it.
-	 */
+    /*
+     * Use the undocumented "negative window bits" feature to tell zlib
+     * that there's no zlib header waiting for it.
+     */
     zerr = inflateInit2(&zstream, -MAX_WBITS);
     if (zerr != Z_OK) {
         if (zerr == Z_VERSION_ERROR) {
@@ -708,8 +838,8 @@
     assert(zerr == Z_STREAM_END);       /* other errors should've been caught */
 
     /* paranoia */
-    if ((long) zstream.total_out != uncompLen) {
-        LOGW("Size mismatch on inflated file (%ld vs %ld)\n",
+    if (zstream.total_out != uncompLen) {
+        LOGW("Size mismatch on inflated file (%ld vs %zd)\n",
             zstream.total_out, uncompLen);
         goto z_bail;
     }
diff --git a/libs/utils/tests/Android.mk b/libs/utils/tests/Android.mk
new file mode 100644
index 0000000..b9f206a
--- /dev/null
+++ b/libs/utils/tests/Android.mk
@@ -0,0 +1,44 @@
+# Build the unit tests.
+LOCAL_PATH := $(call my-dir)
+include $(CLEAR_VARS)
+
+ifneq ($(TARGET_SIMULATOR),true)
+
+# Build the unit tests.
+test_src_files := \
+	ObbFile_test.cpp \
+	PollLoop_test.cpp
+
+shared_libraries := \
+	libz \
+	liblog \
+	libcutils \
+	libutils \
+	libstlport
+
+static_libraries := \
+	libgtest \
+	libgtest_main
+
+c_includes := \
+    external/zlib \
+    external/icu4c/common \
+    bionic \
+    bionic/libstdc++/include \
+    external/gtest/include \
+    external/stlport/stlport
+
+module_tags := eng tests
+
+$(foreach file,$(test_src_files), \
+    $(eval include $(CLEAR_VARS)) \
+    $(eval LOCAL_SHARED_LIBRARIES := $(shared_libraries)) \
+    $(eval LOCAL_STATIC_LIBRARIES := $(static_libraries)) \
+    $(eval LOCAL_C_INCLUDES := $(c_includes)) \
+    $(eval LOCAL_SRC_FILES := $(file)) \
+    $(eval LOCAL_MODULE := $(notdir $(file:%.cpp=%))) \
+    $(eval LOCAL_MODULE_TAGS := $(module_tags)) \
+    $(eval include $(BUILD_EXECUTABLE)) \
+)
+
+endif
\ No newline at end of file
diff --git a/libs/utils/tests/ObbFile_test.cpp b/libs/utils/tests/ObbFile_test.cpp
new file mode 100644
index 0000000..29bb70a
--- /dev/null
+++ b/libs/utils/tests/ObbFile_test.cpp
@@ -0,0 +1,82 @@
+/*
+ * Copyright (C) 2010 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#define LOG_TAG "ObbFile_test"
+#include <utils/Log.h>
+#include <utils/ObbFile.h>
+#include <utils/RefBase.h>
+#include <utils/String8.h>
+
+#include <gtest/gtest.h>
+
+#include <fcntl.h>
+
+namespace android {
+
+#define TEST_FILENAME "/test.obb"
+
+class ObbFileTest : public testing::Test {
+protected:
+    sp<ObbFile> mObbFile;
+    char* mExternalStorage;
+    char* mFileName;
+
+    virtual void SetUp() {
+        mObbFile = new ObbFile();
+        mExternalStorage = getenv("EXTERNAL_STORAGE");
+
+        const int totalLen = strlen(mExternalStorage) + strlen(TEST_FILENAME) + 1;
+        mFileName = new char[totalLen];
+        snprintf(mFileName, totalLen, "%s%s", mExternalStorage, TEST_FILENAME);
+
+        int fd = ::open(mFileName, O_CREAT | O_TRUNC);
+        if (fd < 0) {
+            FAIL() << "Couldn't create " << mFileName << " for tests";
+        }
+    }
+
+    virtual void TearDown() {
+    }
+};
+
+TEST_F(ObbFileTest, ReadFailure) {
+    EXPECT_FALSE(mObbFile->readFrom(-1))
+            << "No failure on invalid file descriptor";
+}
+
+TEST_F(ObbFileTest, WriteThenRead) {
+    const char* packageName = "com.example.obbfile";
+    const int32_t versionNum = 1;
+
+    mObbFile->setPackageName(String8(packageName));
+    mObbFile->setVersion(versionNum);
+
+    EXPECT_TRUE(mObbFile->writeTo(mFileName))
+            << "couldn't write to fake .obb file";
+
+    mObbFile = new ObbFile();
+
+    EXPECT_TRUE(mObbFile->readFrom(mFileName))
+            << "couldn't read from fake .obb file";
+
+    EXPECT_EQ(versionNum, mObbFile->getVersion())
+            << "version didn't come out the same as it went in";
+    const char* currentPackageName = mObbFile->getPackageName().string();
+    EXPECT_STREQ(packageName, currentPackageName)
+            << "package name didn't come out the same as it went in";
+}
+
+}
diff --git a/libs/utils/tests/PollLoop_test.cpp b/libs/utils/tests/PollLoop_test.cpp
new file mode 100644
index 0000000..02f1808
--- /dev/null
+++ b/libs/utils/tests/PollLoop_test.cpp
@@ -0,0 +1,370 @@
+//
+// Copyright 2010 The Android Open Source Project
+//
+
+#include <utils/PollLoop.h>
+#include <utils/Timers.h>
+#include <utils/StopWatch.h>
+#include <gtest/gtest.h>
+#include <unistd.h>
+#include <time.h>
+
+#include "TestHelpers.h"
+
+// # of milliseconds to fudge stopwatch measurements
+#define TIMING_TOLERANCE_MS 25
+
+namespace android {
+
+class DelayedWake : public DelayedTask {
+    sp<PollLoop> mPollLoop;
+
+public:
+    DelayedWake(int delayMillis, const sp<PollLoop> pollLoop) :
+        DelayedTask(delayMillis), mPollLoop(pollLoop) {
+    }
+
+protected:
+    virtual void doTask() {
+        mPollLoop->wake();
+    }
+};
+
+class DelayedWriteSignal : public DelayedTask {
+    Pipe* mPipe;
+
+public:
+    DelayedWriteSignal(int delayMillis, Pipe* pipe) :
+        DelayedTask(delayMillis), mPipe(pipe) {
+    }
+
+protected:
+    virtual void doTask() {
+        mPipe->writeSignal();
+    }
+};
+
+class CallbackHandler {
+public:
+    void setCallback(const sp<PollLoop>& pollLoop, int fd, int events) {
+        pollLoop->setCallback(fd, events, staticHandler, this);
+    }
+
+protected:
+    virtual ~CallbackHandler() { }
+
+    virtual bool handler(int fd, int events) = 0;
+
+private:
+    static bool staticHandler(int fd, int events, void* data) {
+        return static_cast<CallbackHandler*>(data)->handler(fd, events);
+    }
+};
+
+class StubCallbackHandler : public CallbackHandler {
+public:
+    bool nextResult;
+    int callbackCount;
+
+    int fd;
+    int events;
+
+    StubCallbackHandler(bool nextResult) : nextResult(nextResult),
+            callbackCount(0), fd(-1), events(-1) {
+    }
+
+protected:
+    virtual bool handler(int fd, int events) {
+        callbackCount += 1;
+        this->fd = fd;
+        this->events = events;
+        return nextResult;
+    }
+};
+
+class PollLoopTest : public testing::Test {
+protected:
+    sp<PollLoop> mPollLoop;
+
+    virtual void SetUp() {
+        mPollLoop = new PollLoop(false);
+    }
+
+    virtual void TearDown() {
+        mPollLoop.clear();
+    }
+};
+
+
+TEST_F(PollLoopTest, PollOnce_WhenNonZeroTimeoutAndNotAwoken_WaitsForTimeoutAndReturnsFalse) {
+    StopWatch stopWatch("pollOnce");
+    int32_t result = mPollLoop->pollOnce(100);
+    int32_t elapsedMillis = ns2ms(stopWatch.elapsedTime());
+
+    EXPECT_NEAR(100, elapsedMillis, TIMING_TOLERANCE_MS)
+            << "elapsed time should approx. equal timeout";
+    EXPECT_EQ(result, PollLoop::POLL_TIMEOUT)
+            << "pollOnce result should be POLL_TIMEOUT";
+}
+
+TEST_F(PollLoopTest, PollOnce_WhenNonZeroTimeoutAndAwokenBeforeWaiting_ImmediatelyReturnsTrue) {
+    mPollLoop->wake();
+
+    StopWatch stopWatch("pollOnce");
+    int32_t result = mPollLoop->pollOnce(1000);
+    int32_t elapsedMillis = ns2ms(stopWatch.elapsedTime());
+
+    EXPECT_NEAR(0, elapsedMillis, TIMING_TOLERANCE_MS)
+            << "elapsed time should approx. zero because wake() was called before waiting";
+    EXPECT_EQ(result, PollLoop::POLL_CALLBACK)
+            << "pollOnce result should be POLL_CALLBACK because loop was awoken";
+}
+
+TEST_F(PollLoopTest, PollOnce_WhenNonZeroTimeoutAndAwokenWhileWaiting_PromptlyReturnsTrue) {
+    sp<DelayedWake> delayedWake = new DelayedWake(100, mPollLoop);
+    delayedWake->run();
+
+    StopWatch stopWatch("pollOnce");
+    int32_t result = mPollLoop->pollOnce(1000);
+    int32_t elapsedMillis = ns2ms(stopWatch.elapsedTime());
+
+    EXPECT_NEAR(100, elapsedMillis, TIMING_TOLERANCE_MS)
+            << "elapsed time should approx. equal wake delay";
+    EXPECT_EQ(result, PollLoop::POLL_CALLBACK)
+            << "pollOnce result should be POLL_CALLBACK because loop was awoken";
+}
+
+TEST_F(PollLoopTest, PollOnce_WhenZeroTimeoutAndNoRegisteredFDs_ImmediatelyReturnsFalse) {
+    StopWatch stopWatch("pollOnce");
+    int32_t result = mPollLoop->pollOnce(0);
+    int32_t elapsedMillis = ns2ms(stopWatch.elapsedTime());
+
+    EXPECT_NEAR(0, elapsedMillis, TIMING_TOLERANCE_MS)
+            << "elapsed time should be approx. zero";
+    EXPECT_EQ(result, PollLoop::POLL_TIMEOUT)
+            << "pollOnce result should be POLL_TIMEOUT";
+}
+
+TEST_F(PollLoopTest, PollOnce_WhenZeroTimeoutAndNoSignalledFDs_ImmediatelyReturnsFalse) {
+    Pipe pipe;
+    StubCallbackHandler handler(true);
+
+    handler.setCallback(mPollLoop, pipe.receiveFd, POLL_IN);
+
+    StopWatch stopWatch("pollOnce");
+    int32_t result = mPollLoop->pollOnce(0);
+    int32_t elapsedMillis = ns2ms(stopWatch.elapsedTime());
+
+    EXPECT_NEAR(0, elapsedMillis, TIMING_TOLERANCE_MS)
+            << "elapsed time should be approx. zero";
+    EXPECT_EQ(result, PollLoop::POLL_TIMEOUT)
+            << "pollOnce result should be POLL_TIMEOUT";
+    EXPECT_EQ(0, handler.callbackCount)
+            << "callback should not have been invoked because FD was not signalled";
+}
+
+TEST_F(PollLoopTest, PollOnce_WhenZeroTimeoutAndSignalledFD_ImmediatelyInvokesCallbackAndReturnsTrue) {
+    Pipe pipe;
+    StubCallbackHandler handler(true);
+
+    ASSERT_EQ(OK, pipe.writeSignal());
+    handler.setCallback(mPollLoop, pipe.receiveFd, POLL_IN);
+
+    StopWatch stopWatch("pollOnce");
+    int32_t result = mPollLoop->pollOnce(0);
+    int32_t elapsedMillis = ns2ms(stopWatch.elapsedTime());
+
+    EXPECT_NEAR(0, elapsedMillis, TIMING_TOLERANCE_MS)
+            << "elapsed time should be approx. zero";
+    EXPECT_EQ(result, PollLoop::POLL_CALLBACK)
+            << "pollOnce result should be POLL_CALLBACK because FD was signalled";
+    EXPECT_EQ(1, handler.callbackCount)
+            << "callback should be invoked exactly once";
+    EXPECT_EQ(pipe.receiveFd, handler.fd)
+            << "callback should have received pipe fd as parameter";
+    EXPECT_EQ(POLL_IN, handler.events)
+            << "callback should have received POLL_IN as events";
+}
+
+TEST_F(PollLoopTest, PollOnce_WhenNonZeroTimeoutAndNoSignalledFDs_WaitsForTimeoutAndReturnsFalse) {
+    Pipe pipe;
+    StubCallbackHandler handler(true);
+
+    handler.setCallback(mPollLoop, pipe.receiveFd, POLL_IN);
+
+    StopWatch stopWatch("pollOnce");
+    int32_t result = mPollLoop->pollOnce(100);
+    int32_t elapsedMillis = ns2ms(stopWatch.elapsedTime());
+
+    EXPECT_NEAR(100, elapsedMillis, TIMING_TOLERANCE_MS)
+            << "elapsed time should approx. equal timeout";
+    EXPECT_EQ(result, PollLoop::POLL_TIMEOUT)
+            << "pollOnce result should be POLL_TIMEOUT";
+    EXPECT_EQ(0, handler.callbackCount)
+            << "callback should not have been invoked because FD was not signalled";
+}
+
+TEST_F(PollLoopTest, PollOnce_WhenNonZeroTimeoutAndSignalledFDBeforeWaiting_ImmediatelyInvokesCallbackAndReturnsTrue) {
+    Pipe pipe;
+    StubCallbackHandler handler(true);
+
+    pipe.writeSignal();
+    handler.setCallback(mPollLoop, pipe.receiveFd, POLL_IN);
+
+    StopWatch stopWatch("pollOnce");
+    int32_t result = mPollLoop->pollOnce(100);
+    int32_t elapsedMillis = ns2ms(stopWatch.elapsedTime());
+
+    ASSERT_EQ(OK, pipe.readSignal())
+            << "signal should actually have been written";
+    EXPECT_NEAR(0, elapsedMillis, TIMING_TOLERANCE_MS)
+            << "elapsed time should be approx. zero";
+    EXPECT_EQ(result, PollLoop::POLL_CALLBACK)
+            << "pollOnce result should be POLL_CALLBACK because FD was signalled";
+    EXPECT_EQ(1, handler.callbackCount)
+            << "callback should be invoked exactly once";
+    EXPECT_EQ(pipe.receiveFd, handler.fd)
+            << "callback should have received pipe fd as parameter";
+    EXPECT_EQ(POLL_IN, handler.events)
+            << "callback should have received POLL_IN as events";
+}
+
+TEST_F(PollLoopTest, PollOnce_WhenNonZeroTimeoutAndSignalledFDWhileWaiting_PromptlyInvokesCallbackAndReturnsTrue) {
+    Pipe pipe;
+    StubCallbackHandler handler(true);
+    sp<DelayedWriteSignal> delayedWriteSignal = new DelayedWriteSignal(100, & pipe);
+
+    handler.setCallback(mPollLoop, pipe.receiveFd, POLL_IN);
+    delayedWriteSignal->run();
+
+    StopWatch stopWatch("pollOnce");
+    int32_t result = mPollLoop->pollOnce(1000);
+    int32_t elapsedMillis = ns2ms(stopWatch.elapsedTime());
+
+    ASSERT_EQ(OK, pipe.readSignal())
+            << "signal should actually have been written";
+    EXPECT_NEAR(100, elapsedMillis, TIMING_TOLERANCE_MS)
+            << "elapsed time should approx. equal signal delay";
+    EXPECT_EQ(result, PollLoop::POLL_CALLBACK)
+            << "pollOnce result should be POLL_CALLBACK because FD was signalled";
+    EXPECT_EQ(1, handler.callbackCount)
+            << "callback should be invoked exactly once";
+    EXPECT_EQ(pipe.receiveFd, handler.fd)
+            << "callback should have received pipe fd as parameter";
+    EXPECT_EQ(POLL_IN, handler.events)
+            << "callback should have received POLL_IN as events";
+}
+
+TEST_F(PollLoopTest, PollOnce_WhenCallbackAddedThenRemoved_CallbackShouldNotBeInvoked) {
+    Pipe pipe;
+    StubCallbackHandler handler(true);
+
+    handler.setCallback(mPollLoop, pipe.receiveFd, POLL_IN);
+    pipe.writeSignal(); // would cause FD to be considered signalled
+    mPollLoop->removeCallback(pipe.receiveFd);
+
+    StopWatch stopWatch("pollOnce");
+    int32_t result = mPollLoop->pollOnce(100);
+    int32_t elapsedMillis = ns2ms(stopWatch.elapsedTime());
+
+    ASSERT_EQ(OK, pipe.readSignal())
+            << "signal should actually have been written";
+    EXPECT_NEAR(100, elapsedMillis, TIMING_TOLERANCE_MS)
+            << "elapsed time should approx. equal timeout because FD was no longer registered";
+    EXPECT_EQ(result, PollLoop::POLL_TIMEOUT)
+            << "pollOnce result should be POLL_TIMEOUT";
+    EXPECT_EQ(0, handler.callbackCount)
+            << "callback should not be invoked";
+}
+
+TEST_F(PollLoopTest, PollOnce_WhenCallbackReturnsFalse_CallbackShouldNotBeInvokedAgainLater) {
+    Pipe pipe;
+    StubCallbackHandler handler(false);
+
+    handler.setCallback(mPollLoop, pipe.receiveFd, POLL_IN);
+
+    // First loop: Callback is registered and FD is signalled.
+    pipe.writeSignal();
+
+    StopWatch stopWatch("pollOnce");
+    int32_t result = mPollLoop->pollOnce(0);
+    int32_t elapsedMillis = ns2ms(stopWatch.elapsedTime());
+
+    ASSERT_EQ(OK, pipe.readSignal())
+            << "signal should actually have been written";
+    EXPECT_NEAR(0, elapsedMillis, TIMING_TOLERANCE_MS)
+            << "elapsed time should approx. equal zero because FD was already signalled";
+    EXPECT_EQ(result, PollLoop::POLL_CALLBACK)
+            << "pollOnce result should be POLL_CALLBACK because FD was signalled";
+    EXPECT_EQ(1, handler.callbackCount)
+            << "callback should be invoked";
+
+    // Second loop: Callback is no longer registered and FD is signalled.
+    pipe.writeSignal();
+
+    stopWatch.reset();
+    result = mPollLoop->pollOnce(0);
+    elapsedMillis = ns2ms(stopWatch.elapsedTime());
+
+    ASSERT_EQ(OK, pipe.readSignal())
+            << "signal should actually have been written";
+    EXPECT_NEAR(0, elapsedMillis, TIMING_TOLERANCE_MS)
+            << "elapsed time should approx. equal zero because timeout was zero";
+    EXPECT_EQ(result, PollLoop::POLL_TIMEOUT)
+            << "pollOnce result should be POLL_TIMEOUT";
+    EXPECT_EQ(1, handler.callbackCount)
+            << "callback should not be invoked this time";
+}
+
+TEST_F(PollLoopTest, RemoveCallback_WhenCallbackNotAdded_ReturnsFalse) {
+    bool result = mPollLoop->removeCallback(1);
+
+    EXPECT_FALSE(result)
+            << "removeCallback should return false because FD not registered";
+}
+
+TEST_F(PollLoopTest, RemoveCallback_WhenCallbackAddedThenRemovedTwice_ReturnsTrueFirstTimeAndReturnsFalseSecondTime) {
+    Pipe pipe;
+    StubCallbackHandler handler(false);
+    handler.setCallback(mPollLoop, pipe.receiveFd, POLL_IN);
+
+    // First time.
+    bool result = mPollLoop->removeCallback(pipe.receiveFd);
+
+    EXPECT_TRUE(result)
+            << "removeCallback should return true first time because FD was registered";
+
+    // Second time.
+    result = mPollLoop->removeCallback(pipe.receiveFd);
+
+    EXPECT_FALSE(result)
+            << "removeCallback should return false second time because FD was no longer registered";
+}
+
+TEST_F(PollLoopTest, PollOnce_WhenCallbackAddedTwice_OnlySecondCallbackShouldBeInvoked) {
+    Pipe pipe;
+    StubCallbackHandler handler1(true);
+    StubCallbackHandler handler2(true);
+
+    handler1.setCallback(mPollLoop, pipe.receiveFd, POLL_IN);
+    handler2.setCallback(mPollLoop, pipe.receiveFd, POLL_IN); // replace it
+    pipe.writeSignal(); // would cause FD to be considered signalled
+
+    StopWatch stopWatch("pollOnce");
+    int32_t result = mPollLoop->pollOnce(100);
+    int32_t elapsedMillis = ns2ms(stopWatch.elapsedTime());
+
+    ASSERT_EQ(OK, pipe.readSignal())
+            << "signal should actually have been written";
+    EXPECT_NEAR(0, elapsedMillis, TIMING_TOLERANCE_MS)
+            << "elapsed time should approx. zero because FD was already signalled";
+    EXPECT_EQ(result, PollLoop::POLL_CALLBACK)
+            << "pollOnce result should be POLL_CALLBACK because FD was signalled";
+    EXPECT_EQ(0, handler1.callbackCount)
+            << "original handler callback should not be invoked because it was replaced";
+    EXPECT_EQ(1, handler2.callbackCount)
+            << "replacement handler callback should be invoked";
+}
+
+
+} // namespace android
diff --git a/libs/utils/tests/TestHelpers.h b/libs/utils/tests/TestHelpers.h
new file mode 100644
index 0000000..d8e985e
--- /dev/null
+++ b/libs/utils/tests/TestHelpers.h
@@ -0,0 +1,79 @@
+/*
+ * Copyright (C) 2010 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef TESTHELPERS_H
+#define TESTHELPERS_H
+
+#include <utils/threads.h>
+
+namespace android {
+
+class Pipe {
+public:
+    int sendFd;
+    int receiveFd;
+
+    Pipe() {
+        int fds[2];
+        ::pipe(fds);
+
+        receiveFd = fds[0];
+        sendFd = fds[1];
+    }
+
+    ~Pipe() {
+        if (sendFd != -1) {
+            ::close(sendFd);
+        }
+
+        if (receiveFd != -1) {
+            ::close(receiveFd);
+        }
+    }
+
+    status_t writeSignal() {
+        ssize_t nWritten = ::write(sendFd, "*", 1);
+        return nWritten == 1 ? 0 : -errno;
+    }
+
+    status_t readSignal() {
+        char buf[1];
+        ssize_t nRead = ::read(receiveFd, buf, 1);
+        return nRead == 1 ? 0 : nRead == 0 ? -EPIPE : -errno;
+    }
+};
+
+class DelayedTask : public Thread {
+    int mDelayMillis;
+
+public:
+    DelayedTask(int delayMillis) : mDelayMillis(delayMillis) { }
+
+protected:
+    virtual ~DelayedTask() { }
+
+    virtual void doTask() = 0;
+
+    virtual bool threadLoop() {
+        usleep(mDelayMillis * 1000);
+        doTask();
+        return false;
+    }
+};
+
+} // namespace android
+
+#endif // TESTHELPERS_H
diff --git a/location/java/android/location/Address.java b/location/java/android/location/Address.java
index ac275c6..b152f48 100644
--- a/location/java/android/location/Address.java
+++ b/location/java/android/location/Address.java
@@ -500,7 +500,10 @@
             a.mAdminArea = in.readString();
             a.mSubAdminArea = in.readString();
             a.mLocality = in.readString();
+            a.mSubLocality = in.readString();
             a.mThoroughfare = in.readString();
+            a.mSubThoroughfare = in.readString();
+            a.mPremises = in.readString();
             a.mPostalCode = in.readString();
             a.mCountryCode = in.readString();
             a.mCountryName = in.readString();
@@ -544,7 +547,10 @@
         parcel.writeString(mAdminArea);
         parcel.writeString(mSubAdminArea);
         parcel.writeString(mLocality);
+        parcel.writeString(mSubLocality);
         parcel.writeString(mThoroughfare);
+        parcel.writeString(mSubThoroughfare);
+        parcel.writeString(mPremises);
         parcel.writeString(mPostalCode);
         parcel.writeString(mCountryCode);
         parcel.writeString(mCountryName);
diff --git a/location/java/android/location/Criteria.java b/location/java/android/location/Criteria.java
index 9d258d0..1f3fb7a 100644
--- a/location/java/android/location/Criteria.java
+++ b/location/java/android/location/Criteria.java
@@ -57,9 +57,35 @@
      */
     public static final int ACCURACY_COARSE = 2;
 
-    private int mAccuracy              = NO_REQUIREMENT;
+    /**
+     * A constant indicating a low location accuracy requirement
+     * - may be used for horizontal, altitude, speed or bearing accuracy.
+     * For horizontal and vertical position this corresponds roughly to
+     * an accuracy of greater than 500 meters.
+     */
+    public static final int ACCURACY_LOW = 1;
+
+    /**
+     * A constant indicating a medium accuracy requirement
+     * - currently used only for horizontal accuracy.
+     * For horizontal position this corresponds roughly to to an accuracy
+     * of between 100 and 500 meters.
+     */
+    public static final int ACCURACY_MEDIUM = 2;
+
+    /**
+     * a constant indicating a high accuracy requirement
+     * - may be used for horizontal, altitude, speed or bearing accuracy.
+     * For horizontal and vertical position this corresponds roughly to
+     * an accuracy of less than 100 meters.
+     */
+    public static final int ACCURACY_HIGH = 3;
+
+    private int mHorizontalAccuracy    = NO_REQUIREMENT;
+    private int mVerticalAccuracy      = NO_REQUIREMENT;
+    private int mSpeedAccuracy         = NO_REQUIREMENT;
+    private int mBearingAccuracy       = NO_REQUIREMENT;
     private int mPowerRequirement      = NO_REQUIREMENT;
-//    private int mPreferredResponseTime = NO_REQUIREMENT;
     private boolean mAltitudeRequired  = false;
     private boolean mBearingRequired   = false;
     private boolean mSpeedRequired     = false;
@@ -77,9 +103,11 @@
      * Constructs a new Criteria object that is a copy of the given criteria.
      */
     public Criteria(Criteria criteria) {
-        mAccuracy = criteria.mAccuracy;
+        mHorizontalAccuracy = criteria.mHorizontalAccuracy;
+        mVerticalAccuracy = criteria.mVerticalAccuracy;
+        mSpeedAccuracy = criteria.mSpeedAccuracy;
+        mBearingAccuracy = criteria.mBearingAccuracy;
         mPowerRequirement = criteria.mPowerRequirement;
-//        mPreferredResponseTime = criteria.mPreferredResponseTime;
         mAltitudeRequired = criteria.mAltitudeRequired;
         mBearingRequired = criteria.mBearingRequired;
         mSpeedRequired = criteria.mSpeedRequired;
@@ -87,19 +115,118 @@
     }
 
     /**
+     * Indicates the desired horizontal accuracy (latitude and longitude).
+     * Accuracy may be {@link #ACCURACY_LOW}, {@link #ACCURACY_MEDIUM},
+     * {@link #ACCURACY_HIGH} or {@link #NO_REQUIREMENT}.
+     * More accurate location may consume more power and may take longer.
+     *
+     * @throws IllegalArgumentException if accuracy is not one of the supported constants
+     */
+    public void setHorizontalAccuracy(int accuracy) {
+        if (accuracy < NO_REQUIREMENT || accuracy > ACCURACY_HIGH) {
+            throw new IllegalArgumentException("accuracy=" + accuracy);
+        }
+        mHorizontalAccuracy = accuracy;
+    }
+
+    /**
+     * Returns a constant indicating the desired horizontal accuracy (latitude and longitude).
+     * Accuracy may be {@link #ACCURACY_LOW}, {@link #ACCURACY_MEDIUM},
+     * {@link #ACCURACY_HIGH} or {@link #NO_REQUIREMENT}.
+     */
+    public int getHorizontalAccuracy() {
+        return mHorizontalAccuracy;
+    }
+
+    /**
+     * Indicates the desired vertical accuracy (altitude).
+     * Accuracy may be {@link #ACCURACY_LOW}, {@link #ACCURACY_MEDIUM},
+     * {@link #ACCURACY_HIGH} or {@link #NO_REQUIREMENT}.
+     * More accurate location may consume more power and may take longer.
+     *
+     * @throws IllegalArgumentException if accuracy is not one of the supported constants
+     */
+    public void setVerticalAccuracy(int accuracy) {
+        if (accuracy < NO_REQUIREMENT || accuracy > ACCURACY_HIGH) {
+            throw new IllegalArgumentException("accuracy=" + accuracy);
+        }
+        mVerticalAccuracy = accuracy;
+    }
+
+    /**
+     * Returns a constant indicating the desired vertical accuracy (altitude).
+     * Accuracy may be {@link #ACCURACY_LOW}, {@link #ACCURACY_HIGH},
+     * or {@link #NO_REQUIREMENT}.
+     */
+    public int getVerticalAccuracy() {
+        return mVerticalAccuracy;
+    }
+
+    /**
+     * Indicates the desired speed accuracy.
+     * Accuracy may be {@link #ACCURACY_LOW}, {@link #ACCURACY_HIGH},
+     * or {@link #NO_REQUIREMENT}.
+     * More accurate location may consume more power and may take longer.
+     *
+     * @throws IllegalArgumentException if accuracy is not one of the supported constants
+     */
+    public void setSpeedAccuracy(int accuracy) {
+        if (accuracy < NO_REQUIREMENT || accuracy > ACCURACY_HIGH) {
+            throw new IllegalArgumentException("accuracy=" + accuracy);
+        }
+        mSpeedAccuracy = accuracy;
+    }
+
+    /**
+     * Returns a constant indicating the desired speed accuracy
+     * Accuracy may be {@link #ACCURACY_LOW}, {@link #ACCURACY_HIGH},
+     * or {@link #NO_REQUIREMENT}.
+     */
+    public int getSpeedAccuracy() {
+        return mSpeedAccuracy;
+    }
+
+    /**
+     * Indicates the desired bearing accuracy.
+     * Accuracy may be {@link #ACCURACY_LOW}, {@link #ACCURACY_HIGH},
+     * or {@link #NO_REQUIREMENT}.
+     * More accurate location may consume more power and may take longer.
+     *
+     * @throws IllegalArgumentException if accuracy is not one of the supported constants
+     */
+    public void setBearingAccuracy(int accuracy) {
+        if (accuracy < NO_REQUIREMENT || accuracy > ACCURACY_HIGH) {
+            throw new IllegalArgumentException("accuracy=" + accuracy);
+        }
+        mBearingAccuracy = accuracy;
+    }
+
+    /**
+     * Returns a constant indicating the desired bearing accuracy.
+     * Accuracy may be {@link #ACCURACY_LOW}, {@link #ACCURACY_HIGH},
+     * or {@link #NO_REQUIREMENT}.
+     */
+    public int getBearingAccuracy() {
+        return mBearingAccuracy;
+    }
+
+    /**
      * Indicates the desired accuracy for latitude and longitude. Accuracy
      * may be {@link #ACCURACY_FINE} if desired location
      * is fine, else it can be {@link #ACCURACY_COARSE}.
-     * More accurate location usually consumes more power and may take
-     * longer.
+     * More accurate location may consume more power and may take longer.
      *
-     * @throws IllegalArgumentException if accuracy is negative
+     * @throws IllegalArgumentException if accuracy is not one of the supported constants
      */
     public void setAccuracy(int accuracy) {
-        if (accuracy < NO_REQUIREMENT && accuracy > ACCURACY_COARSE) {
+        if (accuracy < NO_REQUIREMENT || accuracy > ACCURACY_COARSE) {
             throw new IllegalArgumentException("accuracy=" + accuracy);
         }
-        mAccuracy = accuracy;
+        if (accuracy == ACCURACY_FINE) {
+            mHorizontalAccuracy = ACCURACY_HIGH;
+        } else {
+            mHorizontalAccuracy = ACCURACY_LOW;
+        }
     }
 
     /**
@@ -108,7 +235,11 @@
      * is fine, else it can be {@link #ACCURACY_COARSE}.
      */
     public int getAccuracy() {
-        return mAccuracy;
+        if (mHorizontalAccuracy >= ACCURACY_HIGH) {
+            return ACCURACY_FINE;
+        } else {
+            return ACCURACY_COARSE;
+        }
     }
 
     /**
@@ -131,20 +262,6 @@
         return mPowerRequirement;
     }
 
-//    /**
-//     * Indicates the preferred response time of the provider, in milliseconds.
-//     */
-//    public void setPreferredResponseTime(int time) {
-//        mPreferredResponseTime = time;
-//    }
-//
-//    /**
-//     * Returns the preferred response time of the provider, in milliseconds.
-//     */
-//    public int getPreferredResponseTime() {
-//        return mPreferredResponseTime;
-//    }
-
     /**
      * Indicates whether the provider is allowed to incur monetary cost.
      */
@@ -211,9 +328,11 @@
         new Parcelable.Creator<Criteria>() {
         public Criteria createFromParcel(Parcel in) {
             Criteria c = new Criteria();
-            c.mAccuracy = in.readInt();
+            c.mHorizontalAccuracy = in.readInt();
+            c.mVerticalAccuracy = in.readInt();
+            c.mSpeedAccuracy = in.readInt();
+            c.mBearingAccuracy = in.readInt();
             c.mPowerRequirement = in.readInt();
-//            c.mPreferredResponseTime = in.readInt();
             c.mAltitudeRequired = in.readInt() != 0;
             c.mBearingRequired = in.readInt() != 0;
             c.mSpeedRequired = in.readInt() != 0;
@@ -231,9 +350,11 @@
     }
 
     public void writeToParcel(Parcel parcel, int flags) {
-        parcel.writeInt(mAccuracy);
+        parcel.writeInt(mHorizontalAccuracy);
+        parcel.writeInt(mVerticalAccuracy);
+        parcel.writeInt(mSpeedAccuracy);
+        parcel.writeInt(mBearingAccuracy);
         parcel.writeInt(mPowerRequirement);
-//        parcel.writeInt(mPreferredResponseTime);
         parcel.writeInt(mAltitudeRequired ? 1 : 0);
         parcel.writeInt(mBearingRequired ? 1 : 0);
         parcel.writeInt(mSpeedRequired ? 1 : 0);
diff --git a/location/java/android/location/Geocoder.java b/location/java/android/location/Geocoder.java
index c325b1b..546bb9d 100644
--- a/location/java/android/location/Geocoder.java
+++ b/location/java/android/location/Geocoder.java
@@ -40,7 +40,9 @@
  *
  * The Geocoder class requires a backend service that is not included in
  * the core android framework.  The Geocoder query methods will return an
- * empty list if there no backend service in the platform.
+ * empty list if there no backend service in the platform.  Use the
+ * isImplemented() method to determine whether a Geocoder implementation
+ * exists.
  */
 public final class Geocoder {
     private static final String TAG = "Geocoder";
@@ -49,6 +51,23 @@
     private ILocationManager mService;
 
     /**
+     * Returns true if the Geocoder methods getFromLocation and
+     * getFromLocationName are implemented.  Lack of network
+     * connectivity may still cause these methods to return null or
+     * empty lists.
+     */
+    public static Boolean isImplemented() {
+        IBinder b = ServiceManager.getService(Context.LOCATION_SERVICE);
+        ILocationManager lm = ILocationManager.Stub.asInterface(b);
+        try {
+            return lm.geocoderIsImplemented();
+        } catch (RemoteException e) {
+            Log.e(TAG, "isImplemented: got RemoteException", e);
+            return false;
+        }
+    }
+
+    /**
      * Constructs a Geocoder whose responses will be localized for the
      * given Locale.
      *
diff --git a/location/java/android/location/GeocoderParams.java b/location/java/android/location/GeocoderParams.java
index 174fe3e..8b8e63b 100644
--- a/location/java/android/location/GeocoderParams.java
+++ b/location/java/android/location/GeocoderParams.java
@@ -29,8 +29,6 @@
  * as well as the Geocoder client's package name for geocoder server
  * logging.  This information is kept in a separate class to allow for
  * future expansion of the IGeocodeProvider interface.
- *
- * @hide
  */
 public class GeocoderParams implements Parcelable {
     private Locale mLocale;
diff --git a/location/java/android/location/GpsStatus.java b/location/java/android/location/GpsStatus.java
index ce69ac1..4af55a6 100644
--- a/location/java/android/location/GpsStatus.java
+++ b/location/java/android/location/GpsStatus.java
@@ -150,15 +150,17 @@
         for (i = 0; i < svCount; i++) {
             int prn = prns[i] - 1;
             int prnShift = (1 << prn);
-            GpsSatellite satellite = mSatellites[prn];
-
-            satellite.mValid = true;
-            satellite.mSnr = snrs[i];
-            satellite.mElevation = elevations[i];
-            satellite.mAzimuth = azimuths[i];
-            satellite.mHasEphemeris = ((ephemerisMask & prnShift) != 0);
-            satellite.mHasAlmanac = ((almanacMask & prnShift) != 0);
-            satellite.mUsedInFix = ((usedInFixMask & prnShift) != 0);
+            if (prn >= 0 && prn < mSatellites.length) {
+                GpsSatellite satellite = mSatellites[prn];
+    
+                satellite.mValid = true;
+                satellite.mSnr = snrs[i];
+                satellite.mElevation = elevations[i];
+                satellite.mAzimuth = azimuths[i];
+                satellite.mHasEphemeris = ((ephemerisMask & prnShift) != 0);
+                satellite.mHasAlmanac = ((almanacMask & prnShift) != 0);
+                satellite.mUsedInFix = ((usedInFixMask & prnShift) != 0);
+            }
         }
     }
 
diff --git a/location/java/android/location/ILocationManager.aidl b/location/java/android/location/ILocationManager.aidl
index 2c0399e..32d4b27 100644
--- a/location/java/android/location/ILocationManager.aidl
+++ b/location/java/android/location/ILocationManager.aidl
@@ -18,6 +18,7 @@
 
 import android.app.PendingIntent;
 import android.location.Address;
+import android.location.Criteria;
 import android.location.GeocoderParams;
 import android.location.IGeocodeProvider;
 import android.location.IGpsStatusListener;
@@ -32,13 +33,15 @@
  */
 interface ILocationManager
 {
-    List getAllProviders();
-    List getProviders(boolean enabledOnly);
+    List<String> getAllProviders();
+    List<String> getProviders(in Criteria criteria, boolean enabledOnly);
+    String getBestProvider(in Criteria criteria, boolean enabledOnly);
+    boolean providerMeetsCriteria(String provider, in Criteria criteria);
 
-    void requestLocationUpdates(String provider, long minTime, float minDistance,
-        in ILocationListener listener);
-    void requestLocationUpdatesPI(String provider, long minTime, float minDistance,
-        in PendingIntent intent);
+    void requestLocationUpdates(String provider, in Criteria criteria, long minTime, float minDistance,
+        boolean singleShot, in ILocationListener listener);
+    void requestLocationUpdatesPI(String provider, in Criteria criteria, long minTime, float minDistance,
+        boolean singleShot, in PendingIntent intent);
     void removeUpdates(in ILocationListener listener);
     void removeUpdatesPI(in PendingIntent intent);
 
@@ -64,6 +67,7 @@
     // it need not be shared with other providers.
     void reportLocation(in Location location, boolean passive);
 
+    boolean geocoderIsImplemented();
     String getFromLocation(double latitude, double longitude, int maxResults,
         in GeocoderParams params, out List<Address> addrs);
     String getFromLocationName(String locationName,
diff --git a/location/java/android/location/ILocationProvider.aidl b/location/java/android/location/ILocationProvider.aidl
index 97b283c..2b9782a 100644
--- a/location/java/android/location/ILocationProvider.aidl
+++ b/location/java/android/location/ILocationProvider.aidl
@@ -16,6 +16,7 @@
 
 package android.location;
 
+import android.location.Criteria;
 import android.location.Location;
 import android.net.NetworkInfo;
 import android.os.Bundle;
@@ -34,6 +35,7 @@
     boolean supportsSpeed();
     boolean supportsBearing();
     int getPowerRequirement();
+    boolean meetsCriteria(in Criteria criteria);
     int getAccuracy();
     void enable();
     void disable();
diff --git a/location/java/android/location/LocationManager.java b/location/java/android/location/LocationManager.java
index 9e4a16b..7d07e4b 100644
--- a/location/java/android/location/LocationManager.java
+++ b/location/java/android/location/LocationManager.java
@@ -28,8 +28,6 @@
 import com.android.internal.location.DummyLocationProvider;
 
 import java.util.ArrayList;
-import java.util.Collections;
-import java.util.Comparator;
 import java.util.HashMap;
 import java.util.List;
 
@@ -117,6 +115,37 @@
      */
     public static final String KEY_LOCATION_CHANGED = "location";
 
+    /**
+     * Broadcast intent action indicating that the GPS has either been
+     * enabled or disabled. An intent extra provides this state as a boolean,
+     * where {@code true} means enabled.
+     * @see #EXTRA_GPS_ENABLED
+     *
+     * {@hide}
+     */
+    public static final String GPS_ENABLED_CHANGE_ACTION =
+        "android.location.GPS_ENABLED_CHANGE";
+
+    /**
+     * Broadcast intent action indicating that the GPS has either started or
+     * stopped receiving GPS fixes. An intent extra provides this state as a
+     * boolean, where {@code true} means that the GPS is actively receiving fixes.
+     * @see #EXTRA_GPS_ENABLED
+     *
+     * {@hide}
+     */
+    public static final String GPS_FIX_CHANGE_ACTION =
+        "android.location.GPS_FIX_CHANGE";
+
+    /**
+     * The lookup key for a boolean that indicates whether GPS is enabled or
+     * disabled. {@code true} means GPS is enabled. Retrieve it with
+     * {@link android.content.Intent#getBooleanExtra(String,boolean)}.
+     *
+     * {@hide}
+     */
+    public static final String EXTRA_GPS_ENABLED = "enabled";
+
     // Map from LocationListeners to their associated ListenerTransport objects
     private HashMap<LocationListener,ListenerTransport> mListeners =
         new HashMap<LocationListener,ListenerTransport>();
@@ -218,15 +247,12 @@
      * factory Context.getSystemService.
      */
     public LocationManager(ILocationManager service) {
-        if (false) {
-            Log.d(TAG, "Constructor: service = " + service);
-        }
         mService = service;
     }
 
     private LocationProvider createProvider(String name, Bundle info) {
         DummyLocationProvider provider =
-            new DummyLocationProvider(name);
+            new DummyLocationProvider(name, mService);
         provider.setRequiresNetwork(info.getBoolean("network"));
         provider.setRequiresSatellite(info.getBoolean("satellite"));
         provider.setRequiresCell(info.getBoolean("cell"));
@@ -268,7 +294,7 @@
      */
     public List<String> getProviders(boolean enabledOnly) {
         try {
-            return mService.getProviders(enabledOnly);
+            return mService.getProviders(null, enabledOnly);
         } catch (RemoteException ex) {
             Log.e(TAG, "getProviders: RemoteException", ex);
         }
@@ -313,173 +339,15 @@
      * @return list of Strings containing names of the providers
      */
     public List<String> getProviders(Criteria criteria, boolean enabledOnly) {
-        List<String> goodProviders = Collections.emptyList();
-        List<String> providers = getProviders(enabledOnly);
-        for (String providerName : providers) {
-            LocationProvider provider = getProvider(providerName);
-            if (provider != null && provider.meetsCriteria(criteria)) {
-                if (goodProviders.isEmpty()) {
-                    goodProviders = new ArrayList<String>();
-                }
-                goodProviders.add(providerName);
-            }
+        if (criteria == null) {
+            throw new IllegalArgumentException("criteria==null");
         }
-        return goodProviders;
-    }
-
-    /**
-     * Returns the next looser power requirement, in the sequence:
-     *
-     * POWER_LOW -> POWER_MEDIUM -> POWER_HIGH -> NO_REQUIREMENT
-     */
-    private int nextPower(int power) {
-        switch (power) {
-        case Criteria.POWER_LOW:
-            return Criteria.POWER_MEDIUM;
-        case Criteria.POWER_MEDIUM:
-            return Criteria.POWER_HIGH;
-        case Criteria.POWER_HIGH:
-            return Criteria.NO_REQUIREMENT;
-        case Criteria.NO_REQUIREMENT:
-        default:
-            return Criteria.NO_REQUIREMENT;
+        try {
+            return mService.getProviders(criteria, enabledOnly);
+        } catch (RemoteException ex) {
+            Log.e(TAG, "getProviders: RemoteException", ex);
         }
-    }
-
-    /**
-     * Returns the next looser accuracy requirement, in the sequence:
-     *
-     * ACCURACY_FINE -> ACCURACY_APPROXIMATE-> NO_REQUIREMENT
-     */
-    private int nextAccuracy(int accuracy) {
-        if (accuracy == Criteria.ACCURACY_FINE) {
-            return Criteria.ACCURACY_COARSE;
-        } else {
-            return Criteria.NO_REQUIREMENT;
-        }
-    }
-
-    private abstract class LpComparator implements Comparator<LocationProvider> {
-
-        public int compare(int a1, int a2) {
-            if (a1 < a2) {
-                return -1;
-            } else if (a1 > a2) {
-                return 1;
-            } else {
-                return 0;
-            }
-        }
-
-        public int compare(float a1, float a2) {
-            if (a1 < a2) {
-                return -1;
-            } else if (a1 > a2) {
-                return 1;
-            } else {
-                return 0;
-            }
-        }
-    }
-
-    private class LpPowerComparator extends LpComparator {
-        public int compare(LocationProvider l1, LocationProvider l2) {
-            int a1 = l1.getPowerRequirement();
-            int a2 = l2.getPowerRequirement();
-            return compare(a1, a2); // Smaller is better
-         }
-
-         public boolean equals(LocationProvider l1, LocationProvider l2) {
-             int a1 = l1.getPowerRequirement();
-             int a2 = l2.getPowerRequirement();
-             return a1 == a2;
-         }
-    }
-
-    private class LpAccuracyComparator extends LpComparator {
-        public int compare(LocationProvider l1, LocationProvider l2) {
-            int a1 = l1.getAccuracy();
-            int a2 = l2.getAccuracy();
-            return compare(a1, a2); // Smaller is better
-         }
-
-         public boolean equals(LocationProvider l1, LocationProvider l2) {
-             int a1 = l1.getAccuracy();
-             int a2 = l2.getAccuracy();
-             return a1 == a2;
-         }
-    }
-
-    private class LpCapabilityComparator extends LpComparator {
-
-        private static final int ALTITUDE_SCORE = 4;
-        private static final int BEARING_SCORE = 4;
-        private static final int SPEED_SCORE = 4;
-
-        private int score(LocationProvider p) {
-            return (p.supportsAltitude() ? ALTITUDE_SCORE : 0) +
-                (p.supportsBearing() ? BEARING_SCORE : 0) +
-                (p.supportsSpeed() ? SPEED_SCORE : 0);
-        }
-
-        public int compare(LocationProvider l1, LocationProvider l2) {
-            int a1 = score(l1);
-            int a2 = score(l2);
-            return compare(-a1, -a2); // Bigger is better
-         }
-
-         public boolean equals(LocationProvider l1, LocationProvider l2) {
-             int a1 = score(l1);
-             int a2 = score(l2);
-             return a1 == a2;
-         }
-    }
-
-    private LocationProvider best(List<String> providerNames) {
-        List<LocationProvider> providers = new ArrayList<LocationProvider>(providerNames.size());
-        for (String name : providerNames) {
-            providers.add(getProvider(name));
-        }
-
-        if (providers.size() < 2) {
-            return providers.get(0);
-        }
-
-        // First, sort by power requirement
-        Collections.sort(providers, new LpPowerComparator());
-        int power = providers.get(0).getPowerRequirement();
-        if (power < providers.get(1).getPowerRequirement()) {
-            return providers.get(0);
-        }
-
-        int idx, size;
-
-        List<LocationProvider> tmp = new ArrayList<LocationProvider>();
-        idx = 0;
-        size = providers.size();
-        while ((idx < size) && (providers.get(idx).getPowerRequirement() == power)) {
-            tmp.add(providers.get(idx));
-            idx++;
-        }
-
-        // Next, sort by accuracy
-        Collections.sort(tmp, new LpAccuracyComparator());
-        int acc = tmp.get(0).getAccuracy();
-        if (acc < tmp.get(1).getAccuracy()) {
-            return tmp.get(0);
-        }
-
-        List<LocationProvider> tmp2 = new ArrayList<LocationProvider>();
-        idx = 0;
-        size = tmp.size();
-        while ((idx < size) && (tmp.get(idx).getAccuracy() == acc)) {
-            tmp2.add(tmp.get(idx));
-            idx++;
-        }
-
-        // Finally, sort by capability "score"
-        Collections.sort(tmp2, new LpCapabilityComparator());
-        return tmp2.get(0);
+        return null;
     }
 
     /**
@@ -505,72 +373,14 @@
      * @return name of the provider that best matches the requirements
      */
     public String getBestProvider(Criteria criteria, boolean enabledOnly) {
-        List<String> goodProviders = getProviders(criteria, enabledOnly);
-        if (!goodProviders.isEmpty()) {
-            return best(goodProviders).getName();
+        if (criteria == null) {
+            throw new IllegalArgumentException("criteria==null");
         }
-
-        // Make a copy of the criteria that we can modify
-        criteria = new Criteria(criteria);
-
-        // Loosen power requirement
-        int power = criteria.getPowerRequirement();
-        while (goodProviders.isEmpty() && (power != Criteria.NO_REQUIREMENT)) {
-            power = nextPower(power);
-            criteria.setPowerRequirement(power);
-            goodProviders = getProviders(criteria, enabledOnly);
+        try {
+            return mService.getBestProvider(criteria, enabledOnly);
+        } catch (RemoteException ex) {
+            Log.e(TAG, "getBestProvider: RemoteException", ex);
         }
-        if (!goodProviders.isEmpty()) {
-            return best(goodProviders).getName();
-        }
-
-//        // Loosen response time requirement
-//        int responseTime = criteria.getPreferredResponseTime();
-//        while (goodProviders.isEmpty() &&
-//            (responseTime != Criteria.NO_REQUIREMENT)) {
-//            responseTime += 1000;
-//            if (responseTime > 60000) {
-//                responseTime = Criteria.NO_REQUIREMENT;
-//            }
-//            criteria.setPreferredResponseTime(responseTime);
-//            goodProviders = getProviders(criteria);
-//        }
-//        if (!goodProviders.isEmpty()) {
-//            return best(goodProviders);
-//        }
-
-        // Loosen accuracy requirement
-        int accuracy = criteria.getAccuracy();
-        while (goodProviders.isEmpty() && (accuracy != Criteria.NO_REQUIREMENT)) {
-            accuracy = nextAccuracy(accuracy);
-            criteria.setAccuracy(accuracy);
-            goodProviders = getProviders(criteria, enabledOnly);
-        }
-        if (!goodProviders.isEmpty()) {
-            return best(goodProviders).getName();
-        }
-
-        // Remove bearing requirement
-        criteria.setBearingRequired(false);
-        goodProviders = getProviders(criteria, enabledOnly);
-        if (!goodProviders.isEmpty()) {
-            return best(goodProviders).getName();
-        }
-
-        // Remove speed requirement
-        criteria.setSpeedRequired(false);
-        goodProviders = getProviders(criteria, enabledOnly);
-        if (!goodProviders.isEmpty()) {
-            return best(goodProviders).getName();
-        }
-
-        // Remove altitude requirement
-        criteria.setAltitudeRequired(false);
-        goodProviders = getProviders(criteria, enabledOnly);
-        if (!goodProviders.isEmpty()) {
-            return best(goodProviders).getName();
-        }
-
         return null;
     }
 
@@ -627,7 +437,7 @@
         if (listener == null) {
             throw new IllegalArgumentException("listener==null");
         }
-        _requestLocationUpdates(provider, minTime, minDistance, listener, null);
+        _requestLocationUpdates(provider, null, minTime, minDistance, false, listener, null);
     }
 
     /**
@@ -670,10 +480,10 @@
      * each location update
      * @param looper a Looper object whose message queue will be used to
      * implement the callback mechanism.
+     * If looper is null then the callbacks will be called on the main thread.
      *
      * @throws IllegalArgumentException if provider is null or doesn't exist
      * @throws IllegalArgumentException if listener is null
-     * @throws IllegalArgumentException if looper is null
      * @throws SecurityException if no suitable permission is present for the provider.
      */
     public void requestLocationUpdates(String provider,
@@ -685,15 +495,70 @@
         if (listener == null) {
             throw new IllegalArgumentException("listener==null");
         }
-        if (looper == null) {
-            throw new IllegalArgumentException("looper==null");
-        }
-        _requestLocationUpdates(provider, minTime, minDistance, listener, looper);
+        _requestLocationUpdates(provider, null, minTime, minDistance, false, listener, looper);
     }
 
-    private void _requestLocationUpdates(String provider,
-        long minTime, float minDistance, LocationListener listener,
-        Looper looper) {
+    /**
+     * Registers the current activity to be notified periodically based on
+     * the specified criteria.  Periodically, the supplied LocationListener will
+     * be called with the current Location or with status updates.
+     *
+     * <p> It may take a while to receive the most recent location. If
+     * an immediate location is required, applications may use the
+     * {@link #getLastKnownLocation(String)} method.
+     *
+     * <p> In case the provider is disabled by the user, updates will stop,
+     * and the {@link LocationListener#onProviderDisabled(String)}
+     * method will be called. As soon as the provider is enabled again,
+     * the {@link LocationListener#onProviderEnabled(String)} method will
+     * be called and location updates will start again.
+     *
+     * <p> The frequency of notification may be controlled using the
+     * minTime and minDistance parameters. If minTime is greater than 0,
+     * the LocationManager could potentially rest for minTime milliseconds
+     * between location updates to conserve power. If minDistance is greater than 0,
+     * a location will only be broadcasted if the device moves by minDistance meters.
+     * To obtain notifications as frequently as possible, set both parameters to 0.
+     *
+     * <p> Background services should be careful about setting a sufficiently high
+     * minTime so that the device doesn't consume too much power by keeping the
+     * GPS or wireless radios on all the time. In particular, values under 60000ms
+     * are not recommended.
+     *
+     * <p> The supplied Looper is used to implement the callback mechanism.
+     *
+     * @param minTime the minimum time interval for notifications, in
+     * milliseconds. This field is only used as a hint to conserve power, and actual
+     * time between location updates may be greater or lesser than this value.
+     * @param minDistance the minimum distance interval for notifications,
+     * in meters
+     * @param criteria contains parameters for the location manager to choose the
+     * appropriate provider and parameters to compute the location
+     * @param listener a {#link LocationListener} whose
+     * {@link LocationListener#onLocationChanged} method will be called for
+     * each location update
+     * @param looper a Looper object whose message queue will be used to
+     * implement the callback mechanism.
+     * If looper is null then the callbacks will be called on the main thread.
+     *
+     * @throws IllegalArgumentException if criteria is null
+     * @throws IllegalArgumentException if listener is null
+     * @throws SecurityException if no suitable permission is present to access
+     * the location services.
+     */
+    public void requestLocationUpdates(long minTime, float minDistance,
+            Criteria criteria, LocationListener listener, Looper looper) {
+        if (criteria == null) {
+            throw new IllegalArgumentException("criteria==null");
+        }
+        if (listener == null) {
+            throw new IllegalArgumentException("listener==null");
+        }
+        _requestLocationUpdates(null, criteria, minTime, minDistance, false, listener, looper);
+    }
+
+    private void _requestLocationUpdates(String provider, Criteria criteria, long minTime,
+            float minDistance, boolean singleShot, LocationListener listener, Looper looper) {
         if (minTime < 0L) {
             minTime = 0L;
         }
@@ -708,7 +573,7 @@
                     transport = new ListenerTransport(listener, looper);
                 }
                 mListeners.put(listener, transport);
-                mService.requestLocationUpdates(provider, minTime, minDistance, transport);
+                mService.requestLocationUpdates(provider, criteria, minTime, minDistance, singleShot, transport);
             }
         } catch (RemoteException ex) {
             Log.e(TAG, "requestLocationUpdates: DeadObjectException", ex);
@@ -754,7 +619,7 @@
      * time between location updates may be greater or lesser than this value.
      * @param minDistance the minimum distance interval for notifications,
      * in meters
-     * @param intent a {#link PendingIntet} to be sent for each location update
+     * @param intent a {#link PendingIntent} to be sent for each location update
      *
      * @throws IllegalArgumentException if provider is null or doesn't exist
      * @throws IllegalArgumentException if intent is null
@@ -768,11 +633,67 @@
         if (intent == null) {
             throw new IllegalArgumentException("intent==null");
         }
-        _requestLocationUpdates(provider, minTime, minDistance, intent);
+        _requestLocationUpdates(provider, null, minTime, minDistance, false, intent);
     }
 
-    private void _requestLocationUpdates(String provider,
-            long minTime, float minDistance, PendingIntent intent) {
+    /**
+     * Registers the current activity to be notified periodically based on
+     * the specified criteria.  Periodically, the supplied PendingIntent will
+     * be broadcast with the current Location or with status updates.
+     *
+     * <p> Location updates are sent with a key of KEY_LOCATION_CHANGED and a Location value.
+     *
+     * <p> It may take a while to receive the most recent location. If
+     * an immediate location is required, applications may use the
+     * {@link #getLastKnownLocation(String)} method.
+     *
+     * <p> The frequency of notification or new locations may be controlled using the
+     * minTime and minDistance parameters. If minTime is greater than 0,
+     * the LocationManager could potentially rest for minTime milliseconds
+     * between location updates to conserve power. If minDistance is greater than 0,
+     * a location will only be broadcast if the device moves by minDistance meters.
+     * To obtain notifications as frequently as possible, set both parameters to 0.
+     *
+     * <p> Background services should be careful about setting a sufficiently high
+     * minTime so that the device doesn't consume too much power by keeping the
+     * GPS or wireless radios on all the time. In particular, values under 60000ms
+     * are not recommended.
+     *
+     * <p> In case the provider is disabled by the user, updates will stop,
+     * and an intent will be sent with an extra with key KEY_PROVIDER_ENABLED and a boolean value
+     * of false.  If the provider is re-enabled, an intent will be sent with an
+     * extra with key KEY_PROVIDER_ENABLED and a boolean value of true and location updates will
+     * start again.
+     *
+     * <p> If the provider's status changes, an intent will be sent with an extra with key
+     * KEY_STATUS_CHANGED and an integer value indicating the new status.  Any extras associated
+     * with the status update will be sent as well.
+     *
+     * @param minTime the minimum time interval for notifications, in
+     * milliseconds. This field is only used as a hint to conserve power, and actual
+     * time between location updates may be greater or lesser than this value.
+     * @param minDistance the minimum distance interval for notifications,
+     * in meters
+     * @param criteria contains parameters for the location manager to choose the
+     * appropriate provider and parameters to compute the location
+     * @param intent a {#link PendingIntent} to be sent for each location update
+     *
+     * @throws IllegalArgumentException if provider is null or doesn't exist
+     * @throws IllegalArgumentException if intent is null
+     * @throws SecurityException if no suitable permission is present for the provider.
+     */
+    public void requestLocationUpdates(long minTime, float minDistance, Criteria criteria, PendingIntent intent) {
+        if (criteria == null) {
+            throw new IllegalArgumentException("criteria==null");
+        }
+        if (intent == null) {
+            throw new IllegalArgumentException("intent==null");
+        }
+        _requestLocationUpdates(null, criteria, minTime, minDistance, false, intent);
+    }
+
+    private void _requestLocationUpdates(String provider, Criteria criteria,
+            long minTime, float minDistance, boolean singleShot, PendingIntent intent) {
         if (minTime < 0L) {
             minTime = 0L;
         }
@@ -781,13 +702,150 @@
         }
 
         try {
-            mService.requestLocationUpdatesPI(provider, minTime, minDistance, intent);
+            mService.requestLocationUpdatesPI(provider, criteria, minTime, minDistance, singleShot, intent);
         } catch (RemoteException ex) {
             Log.e(TAG, "requestLocationUpdates: RemoteException", ex);
         }
     }
 
     /**
+     * Registers the current activity to be notified periodically by
+     * the named provider.  Periodically, the supplied LocationListener will
+     * be called with the current Location or with status updates.
+     *
+     * <p> It may take a while to receive the most recent location. If
+     * an immediate location is required, applications may use the
+     * {@link #getLastKnownLocation(String)} method.
+     *
+     * <p> In case the provider is disabled by the user, updates will stop,
+     * and the {@link LocationListener#onProviderDisabled(String)}
+     * method will be called. As soon as the provider is enabled again,
+     * the {@link LocationListener#onProviderEnabled(String)} method will
+     * be called and location updates will start again.
+     *
+     * <p> The supplied Looper is used to implement the callback mechanism.
+     *
+     * @param provider the name of the provider with which to register
+     * @param listener a {#link LocationListener} whose
+     * {@link LocationListener#onLocationChanged} method will be called for
+     * each location update
+     * @param looper a Looper object whose message queue will be used to
+     * implement the callback mechanism.
+     * If looper is null then the callbacks will be called on the main thread.
+     *
+     * @throws IllegalArgumentException if provider is null or doesn't exist
+     * @throws IllegalArgumentException if listener is null
+     * @throws SecurityException if no suitable permission is present for the provider.
+     */
+    public void requestSingleUpdate(String provider, LocationListener listener, Looper looper) {
+        if (provider == null) {
+            throw new IllegalArgumentException("provider==null");
+        }
+        if (listener == null) {
+            throw new IllegalArgumentException("listener==null");
+        }
+        _requestLocationUpdates(provider, null, 0L, 0.0f, true, listener, looper);
+    }
+
+    /**
+     * Registers the current activity to be notified periodically based on
+     * the specified criteria.  Periodically, the supplied LocationListener will
+     * be called with the current Location or with status updates.
+     *
+     * <p> It may take a while to receive the most recent location. If
+     * an immediate location is required, applications may use the
+     * {@link #getLastKnownLocation(String)} method.
+     *
+     * <p> In case the provider is disabled by the user, updates will stop,
+     * and the {@link LocationListener#onProviderDisabled(String)}
+     * method will be called. As soon as the provider is enabled again,
+     * the {@link LocationListener#onProviderEnabled(String)} method will
+     * be called and location updates will start again.
+     *
+     * <p> The supplied Looper is used to implement the callback mechanism.
+     *
+     * @param criteria contains parameters for the location manager to choose the
+     * appropriate provider and parameters to compute the location
+     * @param listener a {#link LocationListener} whose
+     * {@link LocationListener#onLocationChanged} method will be called for
+     * each location update
+     * @param looper a Looper object whose message queue will be used to
+     * implement the callback mechanism.
+     * If looper is null then the callbacks will be called on the current thread.
+     *
+     * @throws IllegalArgumentException if criteria is null
+     * @throws IllegalArgumentException if listener is null
+     * @throws SecurityException if no suitable permission is present to access
+     * the location services.
+     */
+    public void requestSingleUpdate(Criteria criteria, LocationListener listener, Looper looper) {
+        if (criteria == null) {
+            throw new IllegalArgumentException("criteria==null");
+        }
+        if (listener == null) {
+            throw new IllegalArgumentException("listener==null");
+        }
+        _requestLocationUpdates(null, criteria, 0L, 0.0f, true, listener, looper);
+    }
+
+    /**
+     * Registers the current activity to be notified periodically by
+     * the named provider.  Periodically, the supplied PendingIntent will
+     * be broadcast with the current Location or with status updates.
+     *
+     * <p> Location updates are sent with a key of KEY_LOCATION_CHANGED and a Location value.
+     *
+     * <p> It may take a while to receive the most recent location. If
+     * an immediate location is required, applications may use the
+     * {@link #getLastKnownLocation(String)} method.
+     *
+     * @param provider the name of the provider with which to register
+     * @param intent a {#link PendingIntent} to be sent for the location update
+     *
+     * @throws IllegalArgumentException if provider is null or doesn't exist
+     * @throws IllegalArgumentException if intent is null
+     * @throws SecurityException if no suitable permission is present for the provider.
+     */
+    public void requestSingleUpdate(String provider, PendingIntent intent) {
+        if (provider == null) {
+            throw new IllegalArgumentException("provider==null");
+        }
+        if (intent == null) {
+            throw new IllegalArgumentException("intent==null");
+        }
+        _requestLocationUpdates(provider, null, 0L, 0.0f, true, intent);
+    }
+
+    /**
+     * Registers the current activity to be notified periodically based on
+     * the specified criteria.  Periodically, the supplied PendingIntent will
+     * be broadcast with the current Location or with status updates.
+     *
+     * <p> Location updates are sent with a key of KEY_LOCATION_CHANGED and a Location value.
+     *
+     * <p> It may take a while to receive the most recent location. If
+     * an immediate location is required, applications may use the
+     * {@link #getLastKnownLocation(String)} method.
+     *
+     * @param criteria contains parameters for the location manager to choose the
+     * appropriate provider and parameters to compute the location
+     * @param intent a {#link PendingIntent} to be sent for the location update
+     *
+     * @throws IllegalArgumentException if provider is null or doesn't exist
+     * @throws IllegalArgumentException if intent is null
+     * @throws SecurityException if no suitable permission is present for the provider.
+     */
+    public void requestSingleUpdate(Criteria criteria, PendingIntent intent) {
+        if (criteria == null) {
+            throw new IllegalArgumentException("criteria==null");
+        }
+        if (intent == null) {
+            throw new IllegalArgumentException("intent==null");
+        }
+        _requestLocationUpdates(null, criteria, 0L, 0.0f, true, intent);
+    }
+
+    /**
      * Removes any current registration for location updates of the current activity
      * with the given LocationListener.  Following this call, updates will no longer
      * occur for this listener.
diff --git a/location/java/android/location/LocationProvider.java b/location/java/android/location/LocationProvider.java
index bb3e2a5..8c16580 100644
--- a/location/java/android/location/LocationProvider.java
+++ b/location/java/android/location/LocationProvider.java
@@ -16,6 +16,9 @@
 
 package android.location;
 
+import android.os.RemoteException;
+import android.util.Log;
+
 /**
  * An abstract superclass for location providers.  A location provider
  * provides periodic reports on the geographical location of the
@@ -36,7 +39,8 @@
     // in the name of a LocationProvider.
     static final String BAD_CHARS_REGEX = "[^a-zA-Z0-9]";
 
-    private String mName;
+    private final String mName;
+    private final ILocationManager mService;
 
     public static final int OUT_OF_SERVICE = 0;
     public static final int TEMPORARILY_UNAVAILABLE = 1;
@@ -50,13 +54,13 @@
      *
      * {@hide}
      */
-    public LocationProvider(String name) {
+    public LocationProvider(String name, ILocationManager service) {
         if (name.matches(BAD_CHARS_REGEX)) {
             throw new IllegalArgumentException("name " + name +
                 " contains an illegal character");
         }
-        // Log.d(TAG, "Constructor: name = " + name);
         mName = name;
+        mService = service;
     }
 
     /**
@@ -71,29 +75,12 @@
      * false otherwise.
      */
     public boolean meetsCriteria(Criteria criteria) {
-        // We do not want to match the special passive provider based on criteria.
-        if (LocationManager.PASSIVE_PROVIDER.equals(mName)) {
+        try {
+            return mService.providerMeetsCriteria(mName, criteria);
+        } catch (RemoteException e) {
+            Log.e(TAG, "meetsCriteria: RemoteException", e);
             return false;
         }
-        if ((criteria.getAccuracy() != Criteria.NO_REQUIREMENT) && 
-            (criteria.getAccuracy() < getAccuracy())) {
-            return false;
-        }
-        int criteriaPower = criteria.getPowerRequirement();
-        if ((criteriaPower != Criteria.NO_REQUIREMENT) &&
-            (criteriaPower < getPowerRequirement())) {
-            return false;
-        }
-        if (criteria.isAltitudeRequired() && !supportsAltitude()) {
-            return false;
-        }
-        if (criteria.isSpeedRequired() && !supportsSpeed()) {
-            return false;
-        }
-        if (criteria.isBearingRequired() && !supportsBearing()) {
-            return false;
-        }
-        return true;
     }
 
     /**
diff --git a/location/java/android/location/LocationProviderInterface.java b/location/java/android/location/LocationProviderInterface.java
deleted file mode 100644
index 5ffe15c3..0000000
--- a/location/java/android/location/LocationProviderInterface.java
+++ /dev/null
@@ -1,52 +0,0 @@
-/*
- * Copyright (C) 2010 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package android.location;
-
-import android.location.Location;
-import android.net.NetworkInfo;
-import android.os.Bundle;
-
-/**
- * Location Manager's interface for location providers.
- *
- * {@hide}
- */
-public interface LocationProviderInterface {
-    String getName();
-    boolean requiresNetwork();
-    boolean requiresSatellite();
-    boolean requiresCell();
-    boolean hasMonetaryCost();
-    boolean supportsAltitude();
-    boolean supportsSpeed();
-    boolean supportsBearing();
-    int getPowerRequirement();
-    int getAccuracy();
-    boolean isEnabled();
-    void enable();
-    void disable();
-    int getStatus(Bundle extras);
-    long getStatusUpdateTime();
-    void enableLocationTracking(boolean enable);
-    String getInternalState();
-    void setMinTime(long minTime);
-    void updateNetworkState(int state, NetworkInfo info);
-    void updateLocation(Location location);
-    boolean sendExtraCommand(String command, Bundle extras);
-    void addListener(int uid);
-    void removeListener(int uid);
-}
diff --git a/location/java/android/location/provider/GeocodeProvider.java b/location/java/android/location/provider/GeocodeProvider.java
index 86376a7..9a58763 100644
--- a/location/java/android/location/provider/GeocodeProvider.java
+++ b/location/java/android/location/provider/GeocodeProvider.java
@@ -29,8 +29,6 @@
  * outside of the core android platform.
  * Geocode providers can be implemented as services and return the result of
  * {@link GeocodeProvider#getBinder()} in its getBinder() method.
- *
- * @hide
  */
 public abstract class GeocodeProvider {
 
@@ -53,7 +51,7 @@
 
     /**
      * This method is overridden to implement the
-     * {@link Geocoder#getFromLocation(double, double, int)} method.
+     * {@link android.location.Geocoder#getFromLocation(double, double, int)} method.
      * Classes implementing this method should not hold a reference to the params parameter.
      */
     public abstract String onGetFromLocation(double latitude, double longitude, int maxResults,
@@ -61,7 +59,7 @@
 
     /**
      * This method is overridden to implement the
-     * {@link Geocoder#getFromLocationName(String, int, double, double, double, double)} method.
+     * {@link android.location.Geocoder#getFromLocationName(String, int, double, double, double, double)} method.
      * Classes implementing this method should not hold a reference to the params parameter.
      */
     public abstract String onGetFromLocationName(String locationName,
diff --git a/location/java/android/location/provider/LocationProvider.java b/location/java/android/location/provider/LocationProvider.java
index 56cfb33..cf939de 100644
--- a/location/java/android/location/provider/LocationProvider.java
+++ b/location/java/android/location/provider/LocationProvider.java
@@ -18,6 +18,7 @@
 
 import android.content.Context;
 import android.net.NetworkInfo;
+import android.location.Criteria;
 import android.location.ILocationManager;
 import android.location.ILocationProvider;
 import android.location.Location;
@@ -32,8 +33,6 @@
  * outside of the core android platform.
  * Location providers can be implemented as services and return the result of
  * {@link LocationProvider#getBinder()} in its getBinder() method.
- *
- * @hide
  */
 public abstract class LocationProvider {
 
@@ -75,6 +74,10 @@
             return LocationProvider.this.onGetPowerRequirement();
         }
 
+        public boolean meetsCriteria(Criteria criteria) {
+            return LocationProvider.this.onMeetsCriteria(criteria);
+        }
+
         public int getAccuracy() {
             return LocationProvider.this.onGetAccuracy();
         }
@@ -226,6 +229,12 @@
     public abstract int onGetPowerRequirement();
 
     /**
+     * Returns true if this provider meets the given criteria,
+     * false otherwise.
+     */
+    public abstract boolean onMeetsCriteria(Criteria criteria);
+
+    /**
      * Returns a constant describing horizontal accuracy of this provider.
      * If the provider returns finer grain or exact location,
      * {@link Criteria#ACCURACY_FINE} is returned, otherwise if the
@@ -246,11 +255,11 @@
 
     /**
      * Returns a information on the status of this provider.
-     * {@link #OUT_OF_SERVICE} is returned if the provider is
+     * {@link android.location.LocationProvider#OUT_OF_SERVICE} is returned if the provider is
      * out of service, and this is not expected to change in the near
-     * future; {@link #TEMPORARILY_UNAVAILABLE} is returned if
+     * future; {@link android.location.LocationProvider#TEMPORARILY_UNAVAILABLE} is returned if
      * the provider is temporarily unavailable but is expected to be
-     * available shortly; and {@link #AVAILABLE} is returned
+     * available shortly; and {@link android.location.LocationProvider#AVAILABLE} is returned
      * if the provider is currently available.
      *
      * <p> If extras is non-null, additional status information may be
@@ -299,9 +308,9 @@
 
     /**
      * Updates the network state for the given provider. This function must
-     * be overwritten if {@link #requiresNetwork} returns true. The state is
-     * {@link #TEMPORARILY_UNAVAILABLE} (disconnected), OR {@link #AVAILABLE}
-     * (connected or connecting).
+     * be overwritten if {@link android.location.LocationProvider#requiresNetwork} returns true.
+     * The state is {@link android.location.LocationProvider#TEMPORARILY_UNAVAILABLE} (disconnected)
+     * OR {@link android.location.LocationProvider#AVAILABLE} (connected or connecting).
      *
      * @param state data state
      */
diff --git a/location/java/com/android/internal/location/DummyLocationProvider.java b/location/java/com/android/internal/location/DummyLocationProvider.java
index ff5e27b..e7b5143 100644
--- a/location/java/com/android/internal/location/DummyLocationProvider.java
+++ b/location/java/com/android/internal/location/DummyLocationProvider.java
@@ -16,6 +16,7 @@
 
 package com.android.internal.location;
 
+import android.location.ILocationManager;
 import android.location.LocationProvider;
 
 /**
@@ -41,8 +42,8 @@
     int mPowerRequirement;
     int mAccuracy;
 
-    public DummyLocationProvider(String name) {
-        super(name);
+    public DummyLocationProvider(String name, ILocationManager service) {
+        super(name, service);
     }
 
     public void setRequiresNetwork(boolean requiresNetwork) {
diff --git a/location/java/com/android/internal/location/GeocoderProxy.java b/location/java/com/android/internal/location/GeocoderProxy.java
deleted file mode 100644
index b06297b..0000000
--- a/location/java/com/android/internal/location/GeocoderProxy.java
+++ /dev/null
@@ -1,105 +0,0 @@
-/*
- * Copyright (C) 2010 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.android.internal.location;
-
-import android.content.ComponentName;
-import android.content.Context;
-import android.content.Intent;
-import android.content.ServiceConnection;
-import android.location.Address;
-import android.location.GeocoderParams;
-import android.location.IGeocodeProvider;
-import android.os.IBinder;
-import android.os.RemoteException;
-import android.os.SystemClock;
-import android.util.Log;
-
-import java.util.List;
-
-/**
- * A class for proxying IGeocodeProvider implementations.
- *
- * {@hide}
- */
-public class GeocoderProxy {
-
-    private static final String TAG = "GeocoderProxy";
-
-    private final Context mContext;
-    private final Intent mIntent;
-    private final Connection mServiceConnection = new Connection();
-    private IGeocodeProvider mProvider;
-
-    public GeocoderProxy(Context context, String serviceName) {
-        mContext = context;
-        mIntent = new Intent(serviceName);
-        mContext.bindService(mIntent, mServiceConnection, Context.BIND_AUTO_CREATE);
-    }
-
-    private class Connection implements ServiceConnection {
-        public void onServiceConnected(ComponentName className, IBinder service) {
-            Log.d(TAG, "onServiceConnected " + className);
-            synchronized (this) {
-                mProvider = IGeocodeProvider.Stub.asInterface(service);
-            }
-        }
-
-        public void onServiceDisconnected(ComponentName className) {
-            Log.d(TAG, "onServiceDisconnected " + className);
-            synchronized (this) {
-                mProvider = null;
-            }
-        }
-    }
-
-    public String getFromLocation(double latitude, double longitude, int maxResults,
-            GeocoderParams params, List<Address> addrs) {
-        IGeocodeProvider provider;
-        synchronized (mServiceConnection) {
-            provider = mProvider;
-        }
-        if (provider != null) {
-            try {
-                return provider.getFromLocation(latitude, longitude, maxResults,
-                        params, addrs);
-            } catch (RemoteException e) {
-                Log.e(TAG, "getFromLocation failed", e);
-            }
-        }
-        return "Service not Available";
-    }
-
-    public String getFromLocationName(String locationName,
-            double lowerLeftLatitude, double lowerLeftLongitude,
-            double upperRightLatitude, double upperRightLongitude, int maxResults,
-            GeocoderParams params, List<Address> addrs) {
-        IGeocodeProvider provider;
-        synchronized (mServiceConnection) {
-            provider = mProvider;
-        }
-        if (provider != null) {
-            try {
-                return provider.getFromLocationName(locationName, lowerLeftLatitude,
-                        lowerLeftLongitude, upperRightLatitude, upperRightLongitude,
-                        maxResults, params, addrs);
-            } catch (RemoteException e) {
-                Log.e(TAG, "getFromLocationName failed", e);
-            }
-        }
-        return "Service not Available";
-    }
-}
diff --git a/location/java/com/android/internal/location/GpsLocationProvider.java b/location/java/com/android/internal/location/GpsLocationProvider.java
deleted file mode 100755
index 15d692c..0000000
--- a/location/java/com/android/internal/location/GpsLocationProvider.java
+++ /dev/null
@@ -1,1471 +0,0 @@
-/*
- * Copyright (C) 2008 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.android.internal.location;
-
-import android.app.AlarmManager;
-import android.app.PendingIntent;
-import android.content.BroadcastReceiver;
-import android.content.Context;
-import android.content.Intent;
-import android.content.IntentFilter;
-import android.location.Criteria;
-import android.location.IGpsStatusListener;
-import android.location.IGpsStatusProvider;
-import android.location.ILocationManager;
-import android.location.INetInitiatedListener;
-import android.location.Location;
-import android.location.LocationManager;
-import android.location.LocationProvider;
-import android.location.LocationProviderInterface;
-import android.net.ConnectivityManager;
-import android.net.NetworkInfo;
-import android.net.SntpClient;
-import android.os.Bundle;
-import android.os.Handler;
-import android.os.IBinder;
-import android.os.Looper;
-import android.os.Message;
-import android.os.PowerManager;
-import android.os.Process;
-import android.os.RemoteException;
-import android.os.ServiceManager;
-import android.os.SystemClock;
-import android.provider.Settings;
-import android.util.Log;
-import android.util.SparseIntArray;
-
-import com.android.internal.app.IBatteryStats;
-import com.android.internal.telephony.Phone;
-import com.android.internal.location.GpsNetInitiatedHandler;
-import com.android.internal.location.GpsNetInitiatedHandler.GpsNiNotification;
-
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.IOException;
-import java.io.StringBufferInputStream;
-import java.net.InetAddress;
-import java.net.UnknownHostException;
-import java.util.ArrayList;
-import java.util.Date;
-import java.util.Properties;
-import java.util.Map.Entry;
-import java.util.concurrent.CountDownLatch;
-
-/**
- * A GPS implementation of LocationProvider used by LocationManager.
- *
- * {@hide}
- */
-public class GpsLocationProvider implements LocationProviderInterface {
-
-    private static final String TAG = "GpsLocationProvider";
-
-    private static final boolean DEBUG = false;
-    private static final boolean VERBOSE = false;
-
-    /**
-     * Broadcast intent action indicating that the GPS has either been
-     * enabled or disabled. An intent extra provides this state as a boolean,
-     * where {@code true} means enabled.
-     * @see #EXTRA_ENABLED
-     *
-     * {@hide}
-     */
-    public static final String GPS_ENABLED_CHANGE_ACTION =
-        "android.location.GPS_ENABLED_CHANGE";
-
-    /**
-     * Broadcast intent action indicating that the GPS has either started or
-     * stopped receiving GPS fixes. An intent extra provides this state as a
-     * boolean, where {@code true} means that the GPS is actively receiving fixes.
-     * @see #EXTRA_ENABLED
-     *
-     * {@hide}
-     */
-    public static final String GPS_FIX_CHANGE_ACTION =
-        "android.location.GPS_FIX_CHANGE";
-
-    /**
-     * The lookup key for a boolean that indicates whether GPS is enabled or
-     * disabled. {@code true} means GPS is enabled. Retrieve it with
-     * {@link android.content.Intent#getBooleanExtra(String,boolean)}.
-     *
-     * {@hide}
-     */
-    public static final String EXTRA_ENABLED = "enabled";
-
-    // these need to match GpsPositionMode enum in gps.h
-    private static final int GPS_POSITION_MODE_STANDALONE = 0;
-    private static final int GPS_POSITION_MODE_MS_BASED = 1;
-    private static final int GPS_POSITION_MODE_MS_ASSISTED = 2;
-
-    // these need to match GpsStatusValue defines in gps.h
-    private static final int GPS_STATUS_NONE = 0;
-    private static final int GPS_STATUS_SESSION_BEGIN = 1;
-    private static final int GPS_STATUS_SESSION_END = 2;
-    private static final int GPS_STATUS_ENGINE_ON = 3;
-    private static final int GPS_STATUS_ENGINE_OFF = 4;
-
-    // these need to match GpsApgsStatusValue defines in gps.h
-    /** AGPS status event values. */
-    private static final int GPS_REQUEST_AGPS_DATA_CONN = 1;
-    private static final int GPS_RELEASE_AGPS_DATA_CONN = 2;
-    private static final int GPS_AGPS_DATA_CONNECTED = 3;
-    private static final int GPS_AGPS_DATA_CONN_DONE = 4;
-    private static final int GPS_AGPS_DATA_CONN_FAILED = 5;
-
-    // these need to match GpsLocationFlags enum in gps.h
-    private static final int LOCATION_INVALID = 0;
-    private static final int LOCATION_HAS_LAT_LONG = 1;
-    private static final int LOCATION_HAS_ALTITUDE = 2;
-    private static final int LOCATION_HAS_SPEED = 4;
-    private static final int LOCATION_HAS_BEARING = 8;
-    private static final int LOCATION_HAS_ACCURACY = 16;
-
-// IMPORTANT - the GPS_DELETE_* symbols here must match constants in gps.h
-    private static final int GPS_DELETE_EPHEMERIS = 0x0001;
-    private static final int GPS_DELETE_ALMANAC = 0x0002;
-    private static final int GPS_DELETE_POSITION = 0x0004;
-    private static final int GPS_DELETE_TIME = 0x0008;
-    private static final int GPS_DELETE_IONO = 0x0010;
-    private static final int GPS_DELETE_UTC = 0x0020;
-    private static final int GPS_DELETE_HEALTH = 0x0040;
-    private static final int GPS_DELETE_SVDIR = 0x0080;
-    private static final int GPS_DELETE_SVSTEER = 0x0100;
-    private static final int GPS_DELETE_SADATA = 0x0200;
-    private static final int GPS_DELETE_RTI = 0x0400;
-    private static final int GPS_DELETE_CELLDB_INFO = 0x8000;
-    private static final int GPS_DELETE_ALL = 0xFFFF;
-
-    // these need to match AGpsType enum in gps.h
-    private static final int AGPS_TYPE_SUPL = 1;
-    private static final int AGPS_TYPE_C2K = 2;
-
-    // for mAGpsDataConnectionState
-    private static final int AGPS_DATA_CONNECTION_CLOSED = 0;
-    private static final int AGPS_DATA_CONNECTION_OPENING = 1;
-    private static final int AGPS_DATA_CONNECTION_OPEN = 2;
-
-    // Handler messages
-    private static final int CHECK_LOCATION = 1;
-    private static final int ENABLE = 2;
-    private static final int ENABLE_TRACKING = 3;
-    private static final int UPDATE_NETWORK_STATE = 4;
-    private static final int INJECT_NTP_TIME = 5;
-    private static final int DOWNLOAD_XTRA_DATA = 6;
-    private static final int UPDATE_LOCATION = 7;
-    private static final int ADD_LISTENER = 8;
-    private static final int REMOVE_LISTENER = 9;
-
-    private static final String PROPERTIES_FILE = "/etc/gps.conf";
-
-    private int mLocationFlags = LOCATION_INVALID;
-
-    // current status
-    private int mStatus = LocationProvider.TEMPORARILY_UNAVAILABLE;
-
-    // time for last status update
-    private long mStatusUpdateTime = SystemClock.elapsedRealtime();
-    
-    // turn off GPS fix icon if we haven't received a fix in 10 seconds
-    private static final long RECENT_FIX_TIMEOUT = 10;
-    
-    // number of fixes to receive before disabling GPS
-    private static final int MIN_FIX_COUNT = 10;
-
-    // stop trying if we do not receive a fix within 60 seconds
-    private static final int NO_FIX_TIMEOUT = 60;
-
-    // true if we are enabled
-    private volatile boolean mEnabled;
-    
-    // true if we have network connectivity
-    private boolean mNetworkAvailable;
-
-    // flags to trigger NTP or XTRA data download when network becomes available
-    // initialized to true so we do NTP and XTRA when the network comes up after booting
-    private boolean mInjectNtpTimePending = true;
-    private boolean mDownloadXtraDataPending = true;
-
-    // true if GPS is navigating
-    private boolean mNavigating;
-
-    // true if GPS engine is on
-    private boolean mEngineOn;
-    
-    // requested frequency of fixes, in seconds
-    private int mFixInterval = 1;
-
-    // number of fixes we have received since we started navigating
-    private int mFixCount;
-
-    // true if we started navigation
-    private boolean mStarted;
-
-    // for calculating time to first fix
-    private long mFixRequestTime = 0;
-    // time to first fix for most recent session
-    private int mTTFF = 0;
-    // time we received our last fix
-    private long mLastFixTime;
-
-    // properties loaded from PROPERTIES_FILE
-    private Properties mProperties;
-    private String mNtpServer;
-    private String mSuplServerHost;
-    private int mSuplServerPort;
-    private String mC2KServerHost;
-    private int mC2KServerPort;
-
-    private final Context mContext;
-    private final ILocationManager mLocationManager;
-    private Location mLocation = new Location(LocationManager.GPS_PROVIDER);
-    private Bundle mLocationExtras = new Bundle();
-    private ArrayList<Listener> mListeners = new ArrayList<Listener>();
-
-    // GpsLocationProvider's handler thread
-    private final Thread mThread;
-    // Handler for processing events in mThread.
-    private Handler mHandler;
-    // Used to signal when our main thread has initialized everything
-    private final CountDownLatch mInitializedLatch = new CountDownLatch(1);
-    // Thread for receiving events from the native code
-    private Thread mEventThread;
-
-    private String mAGpsApn;
-    private int mAGpsDataConnectionState;
-    private final ConnectivityManager mConnMgr;
-    private final GpsNetInitiatedHandler mNIHandler; 
-
-    // Wakelocks
-    private final static String WAKELOCK_KEY = "GpsLocationProvider";
-    private final PowerManager.WakeLock mWakeLock;
-
-    // Alarms
-    private final static String ALARM_WAKEUP = "com.android.internal.location.ALARM_WAKEUP";
-    private final static String ALARM_TIMEOUT = "com.android.internal.location.ALARM_TIMEOUT";
-    private final AlarmManager mAlarmManager;
-    private final PendingIntent mWakeupIntent;
-    private final PendingIntent mTimeoutIntent;
-
-    private final IBatteryStats mBatteryStats;
-    private final SparseIntArray mClientUids = new SparseIntArray();
-
-    // how often to request NTP time, in milliseconds
-    // current setting 4 hours
-    private static final long NTP_INTERVAL = 4*60*60*1000;
-    // how long to wait if we have a network error in NTP or XTRA downloading
-    // current setting - 5 minutes
-    private static final long RETRY_INTERVAL = 5*60*1000;
-
-    // to avoid injecting bad NTP time, we reject any time fixes that differ from system time
-    // by more than 5 minutes.
-    private static final long MAX_NTP_SYSTEM_TIME_OFFSET = 5*60*1000;
-
-    private final IGpsStatusProvider mGpsStatusProvider = new IGpsStatusProvider.Stub() {
-        public void addGpsStatusListener(IGpsStatusListener listener) throws RemoteException {
-            if (listener == null) {
-                throw new NullPointerException("listener is null in addGpsStatusListener");
-            }
-
-            synchronized(mListeners) {
-                IBinder binder = listener.asBinder();
-                int size = mListeners.size();
-                for (int i = 0; i < size; i++) {
-                    Listener test = mListeners.get(i);
-                    if (binder.equals(test.mListener.asBinder())) {
-                        // listener already added
-                        return;
-                    }
-                }
-
-                Listener l = new Listener(listener);
-                binder.linkToDeath(l, 0);
-                mListeners.add(l);
-            }
-        }
-
-        public void removeGpsStatusListener(IGpsStatusListener listener) {
-            if (listener == null) {
-                throw new NullPointerException("listener is null in addGpsStatusListener");
-            }
-
-            synchronized(mListeners) {
-                IBinder binder = listener.asBinder();
-                Listener l = null;
-                int size = mListeners.size();
-                for (int i = 0; i < size && l == null; i++) {
-                    Listener test = mListeners.get(i);
-                    if (binder.equals(test.mListener.asBinder())) {
-                        l = test;
-                    }
-                }
-
-                if (l != null) {
-                    mListeners.remove(l);
-                    binder.unlinkToDeath(l, 0);
-                }
-            }
-        }
-    };
-
-    public IGpsStatusProvider getGpsStatusProvider() {
-        return mGpsStatusProvider;
-    }
-
-    private final BroadcastReceiver mBroadcastReciever = new BroadcastReceiver() {
-        @Override public void onReceive(Context context, Intent intent) {
-            String action = intent.getAction();
-
-            if (action.equals(ALARM_WAKEUP)) {
-                if (DEBUG) Log.d(TAG, "ALARM_WAKEUP");
-                startNavigating();
-            } else if (action.equals(ALARM_TIMEOUT)) {
-                if (DEBUG) Log.d(TAG, "ALARM_TIMEOUT");
-                hibernate();
-            }
-        }
-    };
-
-    public static boolean isSupported() {
-        return native_is_supported();
-    }
-
-    public GpsLocationProvider(Context context, ILocationManager locationManager) {
-        mContext = context;
-        mLocationManager = locationManager;
-        mNIHandler = new GpsNetInitiatedHandler(context, this);
-
-        mLocation.setExtras(mLocationExtras);
-
-        // Create a wake lock
-        PowerManager powerManager = (PowerManager) mContext.getSystemService(Context.POWER_SERVICE);
-        mWakeLock = powerManager.newWakeLock(PowerManager.PARTIAL_WAKE_LOCK, WAKELOCK_KEY);
-
-        mAlarmManager = (AlarmManager)mContext.getSystemService(Context.ALARM_SERVICE);
-        mWakeupIntent = PendingIntent.getBroadcast(mContext, 0, new Intent(ALARM_WAKEUP), 0);
-        mTimeoutIntent = PendingIntent.getBroadcast(mContext, 0, new Intent(ALARM_TIMEOUT), 0);
-
-        mConnMgr = (ConnectivityManager)context.getSystemService(Context.CONNECTIVITY_SERVICE);
-
-        // Battery statistics service to be notified when GPS turns on or off
-        mBatteryStats = IBatteryStats.Stub.asInterface(ServiceManager.getService("batteryinfo"));
-
-        mProperties = new Properties();
-        try {
-            File file = new File(PROPERTIES_FILE);
-            FileInputStream stream = new FileInputStream(file);
-            mProperties.load(stream);
-            stream.close();
-            mNtpServer = mProperties.getProperty("NTP_SERVER", null);
-
-            mSuplServerHost = mProperties.getProperty("SUPL_HOST");
-            String portString = mProperties.getProperty("SUPL_PORT");
-            if (mSuplServerHost != null && portString != null) {
-                try {
-                    mSuplServerPort = Integer.parseInt(portString);
-                } catch (NumberFormatException e) {
-                    Log.e(TAG, "unable to parse SUPL_PORT: " + portString);
-                }
-            }
-
-            mC2KServerHost = mProperties.getProperty("C2K_HOST");
-            portString = mProperties.getProperty("C2K_PORT");
-            if (mC2KServerHost != null && portString != null) {
-                try {
-                    mC2KServerPort = Integer.parseInt(portString);
-                } catch (NumberFormatException e) {
-                    Log.e(TAG, "unable to parse C2K_PORT: " + portString);
-                }
-            }
-        } catch (IOException e) {
-            Log.w(TAG, "Could not open GPS configuration file " + PROPERTIES_FILE);
-        }
-
-        // wait until we are fully initialized before returning
-        mThread = new GpsLocationProviderThread();
-        mThread.start();
-        while (true) {
-            try {
-                mInitializedLatch.await();
-                break;
-            } catch (InterruptedException e) {
-                Thread.currentThread().interrupt();
-            }
-        }
-    }
-
-    private void initialize() {
-        // register our receiver on our thread rather than the main thread
-        IntentFilter intentFilter = new IntentFilter();
-        intentFilter.addAction(ALARM_WAKEUP);
-        intentFilter.addAction(ALARM_TIMEOUT);
-        mContext.registerReceiver(mBroadcastReciever, intentFilter);
-    }
-
-    /**
-     * Returns the name of this provider.
-     */
-    public String getName() {
-        return LocationManager.GPS_PROVIDER;
-    }
-
-    /**
-     * Returns true if the provider requires access to a
-     * data network (e.g., the Internet), false otherwise.
-     */
-    public boolean requiresNetwork() {
-        return true;
-    }
-
-    public void updateNetworkState(int state, NetworkInfo info) {
-        mHandler.removeMessages(UPDATE_NETWORK_STATE);
-        Message m = Message.obtain(mHandler, UPDATE_NETWORK_STATE);
-        m.arg1 = state;
-        m.obj = info;
-        mHandler.sendMessage(m);
-    }
-
-    private void handleUpdateNetworkState(int state, NetworkInfo info) {
-        mNetworkAvailable = (state == LocationProvider.AVAILABLE);
-
-        if (DEBUG) {
-            Log.d(TAG, "updateNetworkState " + (mNetworkAvailable ? "available" : "unavailable")
-                + " info: " + info);
-        }
-
-        if (info != null && info.getType() == ConnectivityManager.TYPE_MOBILE_SUPL
-                && mAGpsDataConnectionState == AGPS_DATA_CONNECTION_OPENING) {
-            String apnName = info.getExtraInfo();
-            if (mNetworkAvailable && apnName != null && apnName.length() > 0) {
-                mAGpsApn = apnName;
-                if (DEBUG) Log.d(TAG, "call native_agps_data_conn_open");
-                native_agps_data_conn_open(apnName);
-                mAGpsDataConnectionState = AGPS_DATA_CONNECTION_OPEN;
-            } else {
-                if (DEBUG) Log.d(TAG, "call native_agps_data_conn_failed");
-                mAGpsApn = null;
-                mAGpsDataConnectionState = AGPS_DATA_CONNECTION_CLOSED;
-                native_agps_data_conn_failed();
-            }
-        }
-
-        if (mNetworkAvailable) {
-            if (mInjectNtpTimePending) {
-                mHandler.removeMessages(INJECT_NTP_TIME);
-                mHandler.sendMessage(Message.obtain(mHandler, INJECT_NTP_TIME));
-            }
-            if (mDownloadXtraDataPending) {
-                mHandler.removeMessages(DOWNLOAD_XTRA_DATA);
-                mHandler.sendMessage(Message.obtain(mHandler, DOWNLOAD_XTRA_DATA));
-            }
-        }
-    }
-
-    private void handleInjectNtpTime() {
-        if (!mNetworkAvailable) {
-            // try again when network is up
-            mInjectNtpTimePending = true;
-            return;
-        }
-        mInjectNtpTimePending = false;
-
-        SntpClient client = new SntpClient();
-        long delay;
-
-        if (client.requestTime(mNtpServer, 10000)) {
-            long time = client.getNtpTime();
-            long timeReference = client.getNtpTimeReference();
-            int certainty = (int)(client.getRoundTripTime()/2);
-            long now = System.currentTimeMillis();
-            long systemTimeOffset = time - now;
-
-            Log.d(TAG, "NTP server returned: "
-                    + time + " (" + new Date(time)
-                    + ") reference: " + timeReference
-                    + " certainty: " + certainty
-                    + " system time offset: " + systemTimeOffset);
-
-            // sanity check NTP time and do not use if it is too far from system time
-            if (systemTimeOffset < 0) {
-                systemTimeOffset = -systemTimeOffset;
-            }
-            if (systemTimeOffset < MAX_NTP_SYSTEM_TIME_OFFSET) {
-                native_inject_time(time, timeReference, certainty);
-            } else {
-                Log.e(TAG, "NTP time differs from system time by " + systemTimeOffset
-                        + "ms.  Ignoring.");
-            }
-            delay = NTP_INTERVAL;
-        } else {
-            if (DEBUG) Log.d(TAG, "requestTime failed");
-            delay = RETRY_INTERVAL;
-        }
-
-        // send delayed message for next NTP injection
-        mHandler.removeMessages(INJECT_NTP_TIME);
-        mHandler.sendMessageDelayed(Message.obtain(mHandler, INJECT_NTP_TIME), delay);
-    }
-
-    private void handleDownloadXtraData() {
-        if (!mDownloadXtraDataPending) {
-            // try again when network is up
-            mDownloadXtraDataPending = true;
-            return;
-        }
-        mDownloadXtraDataPending = false;
-
-
-        GpsXtraDownloader xtraDownloader = new GpsXtraDownloader(mContext, mProperties);
-        byte[] data = xtraDownloader.downloadXtraData();
-        if (data != null) {
-            if (DEBUG) {
-                Log.d(TAG, "calling native_inject_xtra_data");
-            }
-            native_inject_xtra_data(data, data.length);
-        } else {
-            // try again later
-            mHandler.removeMessages(DOWNLOAD_XTRA_DATA);
-            mHandler.sendMessageDelayed(Message.obtain(mHandler, DOWNLOAD_XTRA_DATA), RETRY_INTERVAL);
-        }
-    }
-
-    /**
-     * This is called to inform us when another location provider returns a location.
-     * Someday we might use this for network location injection to aid the GPS
-     */
-    public void updateLocation(Location location) {
-        mHandler.removeMessages(UPDATE_LOCATION);
-        Message m = Message.obtain(mHandler, UPDATE_LOCATION);
-        m.obj = location;
-        mHandler.sendMessage(m);
-    }
-
-    private void handleUpdateLocation(Location location) {
-        if (location.hasAccuracy()) {
-            native_inject_location(location.getLatitude(), location.getLongitude(),
-                    location.getAccuracy());
-        }
-    }
-
-    /**
-     * Returns true if the provider requires access to a
-     * satellite-based positioning system (e.g., GPS), false
-     * otherwise.
-     */
-    public boolean requiresSatellite() {
-        return true;
-    }
-
-    /**
-     * Returns true if the provider requires access to an appropriate
-     * cellular network (e.g., to make use of cell tower IDs), false
-     * otherwise.
-     */
-    public boolean requiresCell() {
-        return false;
-    }
-
-    /**
-     * Returns true if the use of this provider may result in a
-     * monetary charge to the user, false if use is free.  It is up to
-     * each provider to give accurate information.
-     */
-    public boolean hasMonetaryCost() {
-        return false;
-    }
-
-    /**
-     * Returns true if the provider is able to provide altitude
-     * information, false otherwise.  A provider that reports altitude
-     * under most circumstances but may occassionally not report it
-     * should return true.
-     */
-    public boolean supportsAltitude() {
-        return true;
-    }
-
-    /**
-     * Returns true if the provider is able to provide speed
-     * information, false otherwise.  A provider that reports speed
-     * under most circumstances but may occassionally not report it
-     * should return true.
-     */
-    public boolean supportsSpeed() {
-        return true;
-    }
-
-    /**
-     * Returns true if the provider is able to provide bearing
-     * information, false otherwise.  A provider that reports bearing
-     * under most circumstances but may occassionally not report it
-     * should return true.
-     */
-    public boolean supportsBearing() {
-        return true;
-    }
-
-    /**
-     * Returns the power requirement for this provider.
-     *
-     * @return the power requirement for this provider, as one of the
-     * constants Criteria.POWER_REQUIREMENT_*.
-     */
-    public int getPowerRequirement() {
-        return Criteria.POWER_HIGH;
-    }
-
-    /**
-     * Returns the horizontal accuracy of this provider
-     *
-     * @return the accuracy of location from this provider, as one
-     * of the constants Criteria.ACCURACY_*.
-     */
-    public int getAccuracy() {
-        return Criteria.ACCURACY_FINE;
-    }
-
-    /**
-     * Enables this provider.  When enabled, calls to getStatus()
-     * must be handled.  Hardware may be started up
-     * when the provider is enabled.
-     */
-    public void enable() {
-        synchronized (mHandler) {
-            mHandler.removeMessages(ENABLE);
-            Message m = Message.obtain(mHandler, ENABLE);
-            m.arg1 = 1;
-            mHandler.sendMessage(m);
-        }
-    }
-
-    private void handleEnable() {
-        if (DEBUG) Log.d(TAG, "handleEnable");
-        if (mEnabled) return;
-        mEnabled = native_init();
-
-        if (mEnabled) {
-            if (mSuplServerHost != null) {
-                native_set_agps_server(AGPS_TYPE_SUPL, mSuplServerHost, mSuplServerPort);
-            }
-            if (mC2KServerHost != null) {
-                native_set_agps_server(AGPS_TYPE_C2K, mC2KServerHost, mC2KServerPort);
-            }
-
-            // run event listener thread while we are enabled
-            mEventThread = new GpsEventThread();
-            mEventThread.start();
-        } else {
-            Log.w(TAG, "Failed to enable location provider");
-        }
-    }
-
-    /**
-     * Disables this provider.  When disabled, calls to getStatus()
-     * need not be handled.  Hardware may be shut
-     * down while the provider is disabled.
-     */
-    public void disable() {
-        synchronized (mHandler) {
-            mHandler.removeMessages(ENABLE);
-            Message m = Message.obtain(mHandler, ENABLE);
-            m.arg1 = 0;
-            mHandler.sendMessage(m);
-        }
-    }
-
-    private void handleDisable() {
-        if (DEBUG) Log.d(TAG, "handleDisable");
-        if (!mEnabled) return;
-
-        mEnabled = false;
-        stopNavigating();
-        native_disable();
-
-        // make sure our event thread exits
-        if (mEventThread != null) {
-            try {
-                mEventThread.join();
-            } catch (InterruptedException e) {
-                Log.w(TAG, "InterruptedException when joining mEventThread");
-            }
-            mEventThread = null;
-        }
-
-        // do this before releasing wakelock
-        native_cleanup();
-
-        // The GpsEventThread does not wait for the GPS to shutdown
-        // so we need to report the GPS_STATUS_ENGINE_OFF event here
-        if (mNavigating) {
-            reportStatus(GPS_STATUS_SESSION_END);
-        }
-        if (mEngineOn) {
-            reportStatus(GPS_STATUS_ENGINE_OFF);
-        }
-    }
-
-    public boolean isEnabled() {
-        return mEnabled;
-    }
-
-    public int getStatus(Bundle extras) {
-        if (extras != null) {
-            extras.putInt("satellites", mSvCount);
-        }
-        return mStatus;
-    }
-
-    private void updateStatus(int status, int svCount) {
-        if (status != mStatus || svCount != mSvCount) {
-            mStatus = status;
-            mSvCount = svCount;
-            mLocationExtras.putInt("satellites", svCount);
-            mStatusUpdateTime = SystemClock.elapsedRealtime();
-        }
-    }
-
-    public long getStatusUpdateTime() {
-        return mStatusUpdateTime;
-    }
-
-    public void enableLocationTracking(boolean enable) {
-        synchronized (mHandler) {
-            mHandler.removeMessages(ENABLE_TRACKING);
-            Message m = Message.obtain(mHandler, ENABLE_TRACKING);
-            m.arg1 = (enable ? 1 : 0);
-            mHandler.sendMessage(m);
-        }
-    }
-
-    private void handleEnableLocationTracking(boolean enable) {
-        if (enable) {
-            mTTFF = 0;
-            mLastFixTime = 0;
-            startNavigating();
-        } else {
-            mAlarmManager.cancel(mWakeupIntent);
-            mAlarmManager.cancel(mTimeoutIntent);
-            stopNavigating();
-        }
-    }
-
-    public void setMinTime(long minTime) {
-        if (DEBUG) Log.d(TAG, "setMinTime " + minTime);
-        
-        if (minTime >= 0) {
-            int interval = (int)(minTime/1000);
-            if (interval < 1) {
-                interval = 1;
-            }
-            mFixInterval = interval;
-        }
-    }
-
-    public String getInternalState() {
-        return native_get_internal_state();
-    }
-
-    private final class Listener implements IBinder.DeathRecipient {
-        final IGpsStatusListener mListener;
-        
-        int mSensors = 0;
-        
-        Listener(IGpsStatusListener listener) {
-            mListener = listener;
-        }
-        
-        public void binderDied() {
-            if (DEBUG) Log.d(TAG, "GPS status listener died");
-
-            synchronized(mListeners) {
-                mListeners.remove(this);
-            }
-            if (mListener != null) {
-                mListener.asBinder().unlinkToDeath(this, 0);
-            }
-        }
-    }
-
-    public void addListener(int uid) {
-        Message m = Message.obtain(mHandler, ADD_LISTENER);
-        m.arg1 = uid;
-        mHandler.sendMessage(m);
-    }
-
-    private void handleAddListener(int uid) {
-        synchronized(mListeners) {
-            if (mClientUids.indexOfKey(uid) >= 0) {
-                // Shouldn't be here -- already have this uid.
-                Log.w(TAG, "Duplicate add listener for uid " + uid);
-                return;
-            }
-            mClientUids.put(uid, 0);
-            if (mNavigating) {
-                try {
-                    mBatteryStats.noteStartGps(uid);
-                } catch (RemoteException e) {
-                    Log.w(TAG, "RemoteException in addListener");
-                }
-            }
-        }
-    }
-
-    public void removeListener(int uid) {
-        Message m = Message.obtain(mHandler, REMOVE_LISTENER);
-        m.arg1 = uid;
-        mHandler.sendMessage(m);
-    }
-
-    private void handleRemoveListener(int uid) {
-        synchronized(mListeners) {
-            if (mClientUids.indexOfKey(uid) < 0) {
-                // Shouldn't be here -- don't have this uid.
-                Log.w(TAG, "Unneeded remove listener for uid " + uid);
-                return;
-            }
-            mClientUids.delete(uid);
-            if (mNavigating) {
-                try {
-                    mBatteryStats.noteStopGps(uid);
-                } catch (RemoteException e) {
-                    Log.w(TAG, "RemoteException in removeListener");
-                }
-            }
-        }
-    }
-
-    public boolean sendExtraCommand(String command, Bundle extras) {
-        
-        if ("delete_aiding_data".equals(command)) {
-            return deleteAidingData(extras);
-        }
-        if ("force_time_injection".equals(command)) {
-            mHandler.removeMessages(INJECT_NTP_TIME);
-            mHandler.sendMessage(Message.obtain(mHandler, INJECT_NTP_TIME));
-            return true;
-        }
-        if ("force_xtra_injection".equals(command)) {
-            if (native_supports_xtra()) {
-                xtraDownloadRequest();
-                return true;
-            }
-            return false;
-        }
-        
-        Log.w(TAG, "sendExtraCommand: unknown command " + command);
-        return false;
-    }
-
-    private boolean deleteAidingData(Bundle extras) {
-        int flags;
-
-        if (extras == null) {
-            flags = GPS_DELETE_ALL;
-        } else {
-            flags = 0;
-            if (extras.getBoolean("ephemeris")) flags |= GPS_DELETE_EPHEMERIS;
-            if (extras.getBoolean("almanac")) flags |= GPS_DELETE_ALMANAC;
-            if (extras.getBoolean("position")) flags |= GPS_DELETE_POSITION;
-            if (extras.getBoolean("time")) flags |= GPS_DELETE_TIME;
-            if (extras.getBoolean("iono")) flags |= GPS_DELETE_IONO;
-            if (extras.getBoolean("utc")) flags |= GPS_DELETE_UTC;
-            if (extras.getBoolean("health")) flags |= GPS_DELETE_HEALTH;
-            if (extras.getBoolean("svdir")) flags |= GPS_DELETE_SVDIR;
-            if (extras.getBoolean("svsteer")) flags |= GPS_DELETE_SVSTEER;
-            if (extras.getBoolean("sadata")) flags |= GPS_DELETE_SADATA;
-            if (extras.getBoolean("rti")) flags |= GPS_DELETE_RTI;
-            if (extras.getBoolean("celldb-info")) flags |= GPS_DELETE_CELLDB_INFO;
-            if (extras.getBoolean("all")) flags |= GPS_DELETE_ALL;
-        }
-
-        if (flags != 0) {
-            native_delete_aiding_data(flags);
-            return true;
-        }
-
-        return false;
-    }
-
-    private void startNavigating() {
-        if (!mStarted) {
-            if (DEBUG) Log.d(TAG, "startNavigating");
-            mStarted = true;
-            int positionMode;
-            if (Settings.Secure.getInt(mContext.getContentResolver(),
-                    Settings.Secure.ASSISTED_GPS_ENABLED, 1) != 0) {
-                positionMode = GPS_POSITION_MODE_MS_BASED;
-            } else {
-                positionMode = GPS_POSITION_MODE_STANDALONE;
-            }
-
-            if (!native_start(positionMode, false, 1)) {
-                mStarted = false;
-                Log.e(TAG, "native_start failed in startNavigating()");
-                return;
-            }
-
-            // reset SV count to zero
-            updateStatus(LocationProvider.TEMPORARILY_UNAVAILABLE, 0);
-            mFixCount = 0;
-            mFixRequestTime = System.currentTimeMillis();
-            // set timer to give up if we do not receive a fix within NO_FIX_TIMEOUT
-            // and our fix interval is not short
-            if (mFixInterval >= NO_FIX_TIMEOUT) {
-                mAlarmManager.set(AlarmManager.ELAPSED_REALTIME_WAKEUP,
-                        SystemClock.elapsedRealtime() + NO_FIX_TIMEOUT * 1000, mTimeoutIntent);
-            }
-        }
-    }
-
-    private void stopNavigating() {
-        if (DEBUG) Log.d(TAG, "stopNavigating");
-        if (mStarted) {
-            mStarted = false;
-            native_stop();
-            mTTFF = 0;
-            mLastFixTime = 0;
-            mLocationFlags = LOCATION_INVALID;
-
-            // reset SV count to zero
-            updateStatus(LocationProvider.TEMPORARILY_UNAVAILABLE, 0);
-        }
-    }
-
-    private void hibernate() {
-        // stop GPS until our next fix interval arrives
-        stopNavigating();
-        mFixCount = 0;
-        mAlarmManager.cancel(mTimeoutIntent);
-        mAlarmManager.cancel(mWakeupIntent);
-        long now = SystemClock.elapsedRealtime();
-        mAlarmManager.set(AlarmManager.ELAPSED_REALTIME_WAKEUP,
-                SystemClock.elapsedRealtime() + mFixInterval * 1000, mWakeupIntent);
-    }
-
-    /**
-     * called from native code to update our position.
-     */
-    private void reportLocation(int flags, double latitude, double longitude, double altitude,
-            float speed, float bearing, float accuracy, long timestamp) {
-        if (VERBOSE) Log.v(TAG, "reportLocation lat: " + latitude + " long: " + longitude +
-                " timestamp: " + timestamp);
-
-        mLastFixTime = System.currentTimeMillis();
-        // report time to first fix
-        if (mTTFF == 0 && (flags & LOCATION_HAS_LAT_LONG) == LOCATION_HAS_LAT_LONG) {
-            mTTFF = (int)(mLastFixTime - mFixRequestTime);
-            if (DEBUG) Log.d(TAG, "TTFF: " + mTTFF);
-
-            // notify status listeners
-            synchronized(mListeners) {
-                int size = mListeners.size();
-                for (int i = 0; i < size; i++) {
-                    Listener listener = mListeners.get(i);
-                    try {
-                        listener.mListener.onFirstFix(mTTFF); 
-                    } catch (RemoteException e) {
-                        Log.w(TAG, "RemoteException in stopNavigating");
-                        mListeners.remove(listener);
-                        // adjust for size of list changing
-                        size--;
-                    }
-                }
-            }
-        }
-
-        synchronized (mLocation) {
-            mLocationFlags = flags;
-            if ((flags & LOCATION_HAS_LAT_LONG) == LOCATION_HAS_LAT_LONG) {
-                mLocation.setLatitude(latitude);
-                mLocation.setLongitude(longitude);
-                mLocation.setTime(timestamp);
-            }
-            if ((flags & LOCATION_HAS_ALTITUDE) == LOCATION_HAS_ALTITUDE) {
-                mLocation.setAltitude(altitude);
-            } else {
-                mLocation.removeAltitude();
-            }
-            if ((flags & LOCATION_HAS_SPEED) == LOCATION_HAS_SPEED) {
-                mLocation.setSpeed(speed);
-            } else {
-                mLocation.removeSpeed();
-            }
-            if ((flags & LOCATION_HAS_BEARING) == LOCATION_HAS_BEARING) {
-                mLocation.setBearing(bearing);
-            } else {
-                mLocation.removeBearing();
-            }
-            if ((flags & LOCATION_HAS_ACCURACY) == LOCATION_HAS_ACCURACY) {
-                mLocation.setAccuracy(accuracy);
-            } else {
-                mLocation.removeAccuracy();
-            }
-
-            try {
-                mLocationManager.reportLocation(mLocation, false);
-            } catch (RemoteException e) {
-                Log.e(TAG, "RemoteException calling reportLocation");
-            }
-        }
-
-        if (mStarted && mStatus != LocationProvider.AVAILABLE) {
-            // we still want to time out if we do not receive MIN_FIX_COUNT
-            // within the time out and we are requesting infrequent fixes
-            if (mFixInterval < NO_FIX_TIMEOUT) {
-                mAlarmManager.cancel(mTimeoutIntent);
-            }
-
-            // send an intent to notify that the GPS is receiving fixes.
-            Intent intent = new Intent(GPS_FIX_CHANGE_ACTION);
-            intent.putExtra(EXTRA_ENABLED, true);
-            mContext.sendBroadcast(intent);
-            updateStatus(LocationProvider.AVAILABLE, mSvCount);
-        }
-
-        if (mFixCount++ >= MIN_FIX_COUNT && mFixInterval > 1) {
-            if (DEBUG) Log.d(TAG, "exceeded MIN_FIX_COUNT");
-            hibernate();
-        }
-   }
-
-    /**
-     * called from native code to update our status
-     */
-    private void reportStatus(int status) {
-        if (VERBOSE) Log.v(TAG, "reportStatus status: " + status);
-
-        synchronized(mListeners) {
-            boolean wasNavigating = mNavigating;
-
-            switch (status) {
-                case GPS_STATUS_SESSION_BEGIN:
-                    mNavigating = true;
-                    mEngineOn = true;
-                    break;
-                case GPS_STATUS_SESSION_END:
-                    mNavigating = false;
-                    break;
-                case GPS_STATUS_ENGINE_ON:
-                    mEngineOn = true;
-                    break;
-                case GPS_STATUS_ENGINE_OFF:
-                    mEngineOn = false;
-                    mNavigating = false;
-                    break;
-            }
-
-            // beware, the events can come out of order
-            if ((mNavigating || mEngineOn) && !mWakeLock.isHeld()) {
-                if (DEBUG) Log.d(TAG, "Acquiring wakelock");
-                 mWakeLock.acquire();
-            }
-
-            if (wasNavigating != mNavigating) {
-                int size = mListeners.size();
-                for (int i = 0; i < size; i++) {
-                    Listener listener = mListeners.get(i);
-                    try {
-                        if (mNavigating) {
-                            listener.mListener.onGpsStarted();
-                        } else {
-                            listener.mListener.onGpsStopped();
-                        }
-                    } catch (RemoteException e) {
-                        Log.w(TAG, "RemoteException in reportStatus");
-                        mListeners.remove(listener);
-                        // adjust for size of list changing
-                        size--;
-                    }
-                }
-
-                try {
-                    // update battery stats
-                    for (int i=mClientUids.size() - 1; i >= 0; i--) {
-                        int uid = mClientUids.keyAt(i);
-                        if (mNavigating) {
-                            mBatteryStats.noteStartGps(uid);
-                        } else {
-                            mBatteryStats.noteStopGps(uid);
-                        }
-                    }
-                } catch (RemoteException e) {
-                    Log.w(TAG, "RemoteException in reportStatus");
-                }
-
-                // send an intent to notify that the GPS has been enabled or disabled.
-                Intent intent = new Intent(GPS_ENABLED_CHANGE_ACTION);
-                intent.putExtra(EXTRA_ENABLED, mNavigating);
-                mContext.sendBroadcast(intent);
-            }
-
-            // beware, the events can come out of order
-            if (!mNavigating && !mEngineOn && mWakeLock.isHeld()) {
-                if (DEBUG) Log.d(TAG, "Releasing wakelock");
-                mWakeLock.release();
-            }
-        }
-    }
-
-    /**
-     * called from native code to update SV info
-     */
-    private void reportSvStatus() {
-
-        int svCount = native_read_sv_status(mSvs, mSnrs, mSvElevations, mSvAzimuths, mSvMasks);
-        
-        synchronized(mListeners) {
-            int size = mListeners.size();
-            for (int i = 0; i < size; i++) {
-                Listener listener = mListeners.get(i);
-                try {
-                    listener.mListener.onSvStatusChanged(svCount, mSvs, mSnrs, 
-                            mSvElevations, mSvAzimuths, mSvMasks[EPHEMERIS_MASK], 
-                            mSvMasks[ALMANAC_MASK], mSvMasks[USED_FOR_FIX_MASK]); 
-                } catch (RemoteException e) {
-                    Log.w(TAG, "RemoteException in reportSvInfo");
-                    mListeners.remove(listener);
-                    // adjust for size of list changing
-                    size--;
-                }
-            }
-        }
-
-        if (VERBOSE) {
-            Log.v(TAG, "SV count: " + svCount +
-                    " ephemerisMask: " + Integer.toHexString(mSvMasks[EPHEMERIS_MASK]) +
-                    " almanacMask: " + Integer.toHexString(mSvMasks[ALMANAC_MASK]));
-            for (int i = 0; i < svCount; i++) {
-                Log.v(TAG, "sv: " + mSvs[i] +
-                        " snr: " + (float)mSnrs[i]/10 +
-                        " elev: " + mSvElevations[i] +
-                        " azimuth: " + mSvAzimuths[i] +
-                        ((mSvMasks[EPHEMERIS_MASK] & (1 << (mSvs[i] - 1))) == 0 ? "  " : " E") +
-                        ((mSvMasks[ALMANAC_MASK] & (1 << (mSvs[i] - 1))) == 0 ? "  " : " A") +
-                        ((mSvMasks[USED_FOR_FIX_MASK] & (1 << (mSvs[i] - 1))) == 0 ? "" : "U"));
-            }
-        }
-
-        updateStatus(mStatus, svCount);
-
-        if (mNavigating && mStatus == LocationProvider.AVAILABLE && mLastFixTime > 0 &&
-            System.currentTimeMillis() - mLastFixTime > RECENT_FIX_TIMEOUT * 1000) {
-            // send an intent to notify that the GPS is no longer receiving fixes.
-            Intent intent = new Intent(GPS_FIX_CHANGE_ACTION);
-            intent.putExtra(EXTRA_ENABLED, false);
-            mContext.sendBroadcast(intent);
-            updateStatus(LocationProvider.TEMPORARILY_UNAVAILABLE, mSvCount);
-        }
-    }
-
-    /**
-     * called from native code to update AGPS status
-     */
-    private void reportAGpsStatus(int type, int status) {
-        switch (status) {
-            case GPS_REQUEST_AGPS_DATA_CONN:
-                 int result = mConnMgr.startUsingNetworkFeature(
-                        ConnectivityManager.TYPE_MOBILE, Phone.FEATURE_ENABLE_SUPL);
-                if (result == Phone.APN_ALREADY_ACTIVE) {
-                    if (mAGpsApn != null) {
-                        native_agps_data_conn_open(mAGpsApn);
-                        mAGpsDataConnectionState = AGPS_DATA_CONNECTION_OPEN;
-                    } else {
-                        Log.e(TAG, "mAGpsApn not set when receiving Phone.APN_ALREADY_ACTIVE");
-                        native_agps_data_conn_failed();
-                    }
-                } else if (result == Phone.APN_REQUEST_STARTED) {
-                    mAGpsDataConnectionState = AGPS_DATA_CONNECTION_OPENING;
-                } else {
-                    native_agps_data_conn_failed();
-                }
-                break;
-            case GPS_RELEASE_AGPS_DATA_CONN:
-                if (mAGpsDataConnectionState != AGPS_DATA_CONNECTION_CLOSED) {
-                    mConnMgr.stopUsingNetworkFeature(
-                            ConnectivityManager.TYPE_MOBILE, Phone.FEATURE_ENABLE_SUPL);
-                    native_agps_data_conn_closed();
-                    mAGpsDataConnectionState = AGPS_DATA_CONNECTION_CLOSED;
-                }
-                break;
-            case GPS_AGPS_DATA_CONNECTED:
-                // Log.d(TAG, "GPS_AGPS_DATA_CONNECTED");
-                break;
-            case GPS_AGPS_DATA_CONN_DONE:
-                // Log.d(TAG, "GPS_AGPS_DATA_CONN_DONE");
-                break;
-            case GPS_AGPS_DATA_CONN_FAILED:
-                // Log.d(TAG, "GPS_AGPS_DATA_CONN_FAILED");
-                break;
-        }
-    }
-
-    /**
-     * called from native code to report NMEA data received
-     */
-    private void reportNmea(int index, long timestamp) {
-        synchronized(mListeners) {
-            int size = mListeners.size();
-            if (size > 0) {
-                // don't bother creating the String if we have no listeners
-                int length = native_read_nmea(index, mNmeaBuffer, mNmeaBuffer.length);
-                String nmea = new String(mNmeaBuffer, 0, length);
-
-                for (int i = 0; i < size; i++) {
-                    Listener listener = mListeners.get(i);
-                    try {
-                        listener.mListener.onNmeaReceived(timestamp, nmea);
-                    } catch (RemoteException e) {
-                        Log.w(TAG, "RemoteException in reportNmea");
-                        mListeners.remove(listener);
-                        // adjust for size of list changing
-                        size--;
-                    }
-                }
-            }
-        }
-    }
-
-    /**
-     * called from native code to request XTRA data
-     */
-    private void xtraDownloadRequest() {
-        if (DEBUG) Log.d(TAG, "xtraDownloadRequest");
-        mHandler.removeMessages(DOWNLOAD_XTRA_DATA);
-        mHandler.sendMessage(Message.obtain(mHandler, DOWNLOAD_XTRA_DATA));
-    }
-
-    //=============================================================
-    // NI Client support
-	//=============================================================
-    private final INetInitiatedListener mNetInitiatedListener = new INetInitiatedListener.Stub() {
-    	// Sends a response for an NI reqeust to HAL.
-    	public boolean sendNiResponse(int notificationId, int userResponse)
-    	{
-        	// TODO Add Permission check
-    		
-    		StringBuilder extrasBuf = new StringBuilder();
-
-    		if (DEBUG) Log.d(TAG, "sendNiResponse, notifId: " + notificationId +
-    				", response: " + userResponse);
-    		
-    		native_send_ni_response(notificationId, userResponse);
-    		
-    		return true;
-    	}        
-    };
-        
-    public INetInitiatedListener getNetInitiatedListener() {
-        return mNetInitiatedListener;
-    }
-
-    // Called by JNI function to report an NI request.
-	@SuppressWarnings("deprecation")
-	public void reportNiNotification(
-        	int notificationId,
-        	int niType,
-        	int notifyFlags,
-        	int timeout,
-        	int defaultResponse,
-        	String requestorId,
-        	String text,
-        	int requestorIdEncoding,
-        	int textEncoding,
-        	String extras  // Encoded extra data
-        )
-	{
-		Log.i(TAG, "reportNiNotification: entered");
-		Log.i(TAG, "notificationId: " + notificationId +
-				", niType: " + niType +
-				", notifyFlags: " + notifyFlags +
-				", timeout: " + timeout +
-				", defaultResponse: " + defaultResponse);
-		
-		Log.i(TAG, "requestorId: " + requestorId +
-				", text: " + text +
-				", requestorIdEncoding: " + requestorIdEncoding +
-				", textEncoding: " + textEncoding);
-		
-		GpsNiNotification notification = new GpsNiNotification();
-		
-		notification.notificationId = notificationId;
-		notification.niType = niType;
-		notification.needNotify = (notifyFlags & GpsNetInitiatedHandler.GPS_NI_NEED_NOTIFY) != 0;
-		notification.needVerify = (notifyFlags & GpsNetInitiatedHandler.GPS_NI_NEED_VERIFY) != 0;
-		notification.privacyOverride = (notifyFlags & GpsNetInitiatedHandler.GPS_NI_PRIVACY_OVERRIDE) != 0;
-		notification.timeout = timeout;
-		notification.defaultResponse = defaultResponse;
-		notification.requestorId = requestorId;
-		notification.text = text;
-		notification.requestorIdEncoding = requestorIdEncoding;
-		notification.textEncoding = textEncoding;
-		
-		// Process extras, assuming the format is
-		// one of more lines of "key = value"
-		Bundle bundle = new Bundle();
-		
-		if (extras == null) extras = "";
-		Properties extraProp = new Properties();
-		
-		try {
-			extraProp.load(new StringBufferInputStream(extras));
-		}
-		catch (IOException e)
-		{
-			Log.e(TAG, "reportNiNotification cannot parse extras data: " + extras);
-		}
-		
-		for (Entry<Object, Object> ent : extraProp.entrySet())
-		{
-			bundle.putString((String) ent.getKey(), (String) ent.getValue());
-		}		
-		
-		notification.extras = bundle;
-		
-		mNIHandler.handleNiNotification(notification);		
-	}
-
-    // this thread is used to receive events from the native code.
-    // native_wait_for_event() will callback to us via reportLocation(), reportStatus(), etc.
-    // this is necessary because native code cannot call Java on a thread that the JVM does
-    // not know about.
-    private final class GpsEventThread extends Thread {
-
-        public GpsEventThread() {
-            super("GpsEventThread");
-        }
-
-        public void run() {
-            if (DEBUG) Log.d(TAG, "GpsEventThread starting");
-            // Exit as soon as disable() is called instead of waiting for the GPS to stop.
-            while (mEnabled) {
-                // this will wait for an event from the GPS,
-                // which will be reported via reportLocation or reportStatus
-                native_wait_for_event();
-            }
-            if (DEBUG) Log.d(TAG, "GpsEventThread exiting");
-        }
-    }
-
-    private final class ProviderHandler extends Handler {
-        @Override
-        public void handleMessage(Message msg)
-        {
-            switch (msg.what) {
-                case ENABLE:
-                    if (msg.arg1 == 1) {
-                        handleEnable();
-                    } else {
-                        handleDisable();
-                    }
-                    break;
-                case ENABLE_TRACKING:
-                    handleEnableLocationTracking(msg.arg1 == 1);
-                    break;
-                case UPDATE_NETWORK_STATE:
-                    handleUpdateNetworkState(msg.arg1, (NetworkInfo)msg.obj);
-                    break;
-                case INJECT_NTP_TIME:
-                    handleInjectNtpTime();
-                    break;
-                case DOWNLOAD_XTRA_DATA:
-                    if (native_supports_xtra()) {
-                        handleDownloadXtraData();
-                    }
-                    break;
-                case UPDATE_LOCATION:
-                    handleUpdateLocation((Location)msg.obj);
-                    break;
-                case ADD_LISTENER:
-                    handleAddListener(msg.arg1);
-                    break;
-                case REMOVE_LISTENER:
-                    handleRemoveListener(msg.arg1);
-                    break;
-            }
-        }
-    };
-
-    private final class GpsLocationProviderThread extends Thread {
-
-        public GpsLocationProviderThread() {
-            super("GpsLocationProvider");
-        }
-
-        public void run() {
-            Process.setThreadPriority(Process.THREAD_PRIORITY_BACKGROUND);
-            initialize();
-            Looper.prepare();
-            mHandler = new ProviderHandler();
-            // signal when we are initialized and ready to go
-            mInitializedLatch.countDown();
-            Looper.loop();
-        }
-    }
-
-    // for GPS SV statistics
-    private static final int MAX_SVS = 32;
-    private static final int EPHEMERIS_MASK = 0;
-    private static final int ALMANAC_MASK = 1;
-    private static final int USED_FOR_FIX_MASK = 2;
-
-    // preallocated arrays, to avoid memory allocation in reportStatus()
-    private int mSvs[] = new int[MAX_SVS];
-    private float mSnrs[] = new float[MAX_SVS];
-    private float mSvElevations[] = new float[MAX_SVS];
-    private float mSvAzimuths[] = new float[MAX_SVS];
-    private int mSvMasks[] = new int[3];
-    private int mSvCount;
-    // preallocated to avoid memory allocation in reportNmea()
-    private byte[] mNmeaBuffer = new byte[120];
-
-    static { class_init_native(); }
-    private static native void class_init_native();
-    private static native boolean native_is_supported();
-
-    private native boolean native_init();
-    private native void native_disable();
-    private native void native_cleanup();
-    private native boolean native_start(int positionMode, boolean singleFix, int fixInterval);
-    private native boolean native_stop();
-    private native void native_set_fix_frequency(int fixFrequency);
-    private native void native_delete_aiding_data(int flags);
-    private native void native_wait_for_event();
-    // returns number of SVs
-    // mask[0] is ephemeris mask and mask[1] is almanac mask
-    private native int native_read_sv_status(int[] svs, float[] snrs,
-            float[] elevations, float[] azimuths, int[] masks);
-    private native int native_read_nmea(int index, byte[] buffer, int bufferSize);
-    private native void native_inject_location(double latitude, double longitude, float accuracy);
-
-    // XTRA Support
-    private native void native_inject_time(long time, long timeReference, int uncertainty);
-    private native boolean native_supports_xtra();
-    private native void native_inject_xtra_data(byte[] data, int length);
-
-    // DEBUG Support
-    private native String native_get_internal_state();
-
-    // AGPS Support
-    private native void native_agps_data_conn_open(String apn);
-    private native void native_agps_data_conn_closed();
-    private native void native_agps_data_conn_failed();
-    private native void native_set_agps_server(int type, String hostname, int port);
-
-    // Network-initiated (NI) Support
-    private native void native_send_ni_response(int notificationId, int userResponse);
-}
diff --git a/location/java/com/android/internal/location/GpsNetInitiatedHandler.java b/location/java/com/android/internal/location/GpsNetInitiatedHandler.java
index a5466d1..d3a71b3 100755
--- a/location/java/com/android/internal/location/GpsNetInitiatedHandler.java
+++ b/location/java/com/android/internal/location/GpsNetInitiatedHandler.java
@@ -23,6 +23,7 @@
 import android.app.PendingIntent;
 import android.content.Context;
 import android.content.Intent;
+import android.location.LocationManager;
 import android.os.Bundle;
 import android.os.RemoteException;
 import android.util.Log;
@@ -81,7 +82,7 @@
     private final Context mContext;
     
     // parent gps location provider
-    private final GpsLocationProvider mGpsLocationProvider;
+    private final LocationManager mLocationManager;
     
     // configuration of notificaiton behavior
     private boolean mPlaySounds = false;
@@ -93,25 +94,25 @@
         
     public static class GpsNiNotification
     {
-    	int notificationId;
-    	int niType;
-    	boolean needNotify;
-    	boolean needVerify;
-    	boolean privacyOverride;
-    	int timeout;
-    	int defaultResponse;
-    	String requestorId;
-    	String text;
-    	int requestorIdEncoding;
-    	int textEncoding;
-    	Bundle extras;
+        public int notificationId;
+        public int niType;
+        public boolean needNotify;
+        public boolean needVerify;
+        public boolean privacyOverride;
+        public int timeout;
+        public int defaultResponse;
+        public String requestorId;
+        public String text;
+        public int requestorIdEncoding;
+        public int textEncoding;
+        public Bundle extras;
     };
     
     public static class GpsNiResponse {
-    	/* User reponse, one of the values in GpsUserResponseType */
-    	int userResponse;
-    	/* Optional extra data to pass with the user response */
-    	Bundle extras;
+        /* User reponse, one of the values in GpsUserResponseType */
+        int userResponse;
+        /* Optional extra data to pass with the user response */
+        Bundle extras;
     };
     
     /**
@@ -122,63 +123,57 @@
      */
     private Notification mNiNotification;
     
-    public GpsNetInitiatedHandler(Context context, GpsLocationProvider gpsLocationProvider) {
-    	mContext = context;       
-    	mGpsLocationProvider = gpsLocationProvider;
+    public GpsNetInitiatedHandler(Context context) {
+        mContext = context;
+        mLocationManager = (LocationManager)context.getSystemService(Context.LOCATION_SERVICE);
     }
     
     // Handles NI events from HAL
     public void handleNiNotification(GpsNiNotification notif)
     {
-    	if (DEBUG) Log.d(TAG, "handleNiNotification" + " notificationId: " + notif.notificationId 
-    			+ " requestorId: " + notif.requestorId + " text: " + notif.text);
-    	
-    	// Notify and verify with immediate pop-up
-    	if (notif.needNotify && notif.needVerify && mPopupImmediately)
-    	{
-    		// Popup the dialog box now
-    		openNiDialog(notif);
-    	}
-    	
-    	// Notify only, or delayed pop-up (change mPopupImmediately to FALSE) 
-    	if (notif.needNotify && !notif.needVerify ||
-    		notif.needNotify && notif.needVerify && !mPopupImmediately) 
-    	{
-    		// Show the notification
+        if (DEBUG) Log.d(TAG, "handleNiNotification" + " notificationId: " + notif.notificationId
+                + " requestorId: " + notif.requestorId + " text: " + notif.text);
 
-    		// if mPopupImmediately == FALSE and needVerify == TRUE, a dialog will be opened
-    		// when the user opens the notification message
-    		
-    		setNiNotification(notif);
-    	}
-    	
-    	// ACCEPT cases: 1. Notify, no verify; 2. no notify, no verify; 3. privacy override.
-    	if ( notif.needNotify && !notif.needVerify || 
-    		!notif.needNotify && !notif.needVerify || 
-    		 notif.privacyOverride)
-    	{
-    		try {
-    			mGpsLocationProvider.getNetInitiatedListener().sendNiResponse(notif.notificationId, GPS_NI_RESPONSE_ACCEPT);
-    		} 
-    		catch (RemoteException e)
-    		{
-    			Log.e(TAG, e.getMessage());
-    		}
-    	}
-    	
-    	//////////////////////////////////////////////////////////////////////////
-    	//   A note about timeout
-    	//   According to the protocol, in the need_notify and need_verify case,
-    	//   a default response should be sent when time out.
-    	//   
-    	//   In some GPS hardware, the GPS driver (under HAL) can handle the timeout case
-    	//   and this class GpsNetInitiatedHandler does not need to do anything.
-    	//   
-    	//   However, the UI should at least close the dialog when timeout. Further, 
-    	//   for more general handling, timeout response should be added to the Handler here.
-    	//    	    	
+        // Notify and verify with immediate pop-up
+        if (notif.needNotify && notif.needVerify && mPopupImmediately)
+        {
+            // Popup the dialog box now
+            openNiDialog(notif);
+        }
+
+        // Notify only, or delayed pop-up (change mPopupImmediately to FALSE)
+        if (notif.needNotify && !notif.needVerify ||
+            notif.needNotify && notif.needVerify && !mPopupImmediately)
+        {
+            // Show the notification
+
+            // if mPopupImmediately == FALSE and needVerify == TRUE, a dialog will be opened
+            // when the user opens the notification message
+
+            setNiNotification(notif);
+        }
+
+        // ACCEPT cases: 1. Notify, no verify; 2. no notify, no verify; 3. privacy override.
+        if ( notif.needNotify && !notif.needVerify ||
+            !notif.needNotify && !notif.needVerify ||
+             notif.privacyOverride)
+        {
+            mLocationManager.sendNiResponse(notif.notificationId, GPS_NI_RESPONSE_ACCEPT);
+        }
+
+        //////////////////////////////////////////////////////////////////////////
+        //   A note about timeout
+        //   According to the protocol, in the need_notify and need_verify case,
+        //   a default response should be sent when time out.
+        //
+        //   In some GPS hardware, the GPS driver (under HAL) can handle the timeout case
+        //   and this class GpsNetInitiatedHandler does not need to do anything.
+        //
+        //   However, the UI should at least close the dialog when timeout. Further,
+        //   for more general handling, timeout response should be added to the Handler here.
+        //
     }
-    
+
     // Sets the NI notification.
     private synchronized void setNiNotification(GpsNiNotification notif) {
         NotificationManager notificationManager = (NotificationManager) mContext
@@ -186,272 +181,272 @@
         if (notificationManager == null) {
             return;
         }
-      
-    	String title = getNotifTitle(notif);
-    	String message = getNotifMessage(notif);
-        
+
+        String title = getNotifTitle(notif);
+        String message = getNotifMessage(notif);
+
         if (DEBUG) Log.d(TAG, "setNiNotification, notifyId: " + notif.notificationId +
-        		", title: " + title +
-        		", message: " + message);
-        
-    	// Construct Notification
-    	if (mNiNotification == null) {
-        	mNiNotification = new Notification();
-        	mNiNotification.icon = com.android.internal.R.drawable.stat_sys_gps_on; /* Change notification icon here */
-        	mNiNotification.when = 0;
+                ", title: " + title +
+                ", message: " + message);
+
+        // Construct Notification
+        if (mNiNotification == null) {
+            mNiNotification = new Notification();
+            mNiNotification.icon = com.android.internal.R.drawable.stat_sys_gps_on; /* Change notification icon here */
+            mNiNotification.when = 0;
         }
-    	
+
         if (mPlaySounds) {
-        	mNiNotification.defaults |= Notification.DEFAULT_SOUND;
+            mNiNotification.defaults |= Notification.DEFAULT_SOUND;
         } else {
-        	mNiNotification.defaults &= ~Notification.DEFAULT_SOUND;
+            mNiNotification.defaults &= ~Notification.DEFAULT_SOUND;
         }        
-        
+
         mNiNotification.flags = Notification.FLAG_ONGOING_EVENT;
         mNiNotification.tickerText = getNotifTicker(notif);
-        
+
         // if not to popup dialog immediately, pending intent will open the dialog
-        Intent intent = !mPopupImmediately ? getDlgIntent(notif) : new Intent();    	        
+        Intent intent = !mPopupImmediately ? getDlgIntent(notif) : new Intent();
         PendingIntent pi = PendingIntent.getBroadcast(mContext, 0, intent, 0);                
         mNiNotification.setLatestEventInfo(mContext, title, message, pi);
-        
+
         if (visible) {
             notificationManager.notify(notif.notificationId, mNiNotification);
         } else {
             notificationManager.cancel(notif.notificationId);
         }
     }
-    
-    // Opens the notification dialog and waits for user input
-    private void openNiDialog(GpsNiNotification notif) 
-    {
-    	Intent intent = getDlgIntent(notif);
-    	
-    	if (DEBUG) Log.d(TAG, "openNiDialog, notifyId: " + notif.notificationId + 
-    			", requestorId: " + notif.requestorId + 
-    			", text: " + notif.text);               	
 
-    	mContext.startActivity(intent);
+    // Opens the notification dialog and waits for user input
+    private void openNiDialog(GpsNiNotification notif)
+    {
+        Intent intent = getDlgIntent(notif);
+
+        if (DEBUG) Log.d(TAG, "openNiDialog, notifyId: " + notif.notificationId +
+                ", requestorId: " + notif.requestorId +
+                ", text: " + notif.text);
+
+        mContext.startActivity(intent);
     }
-    
+
     // Construct the intent for bringing up the dialog activity, which shows the 
     // notification and takes user input
     private Intent getDlgIntent(GpsNiNotification notif)
     {
-    	Intent intent = new Intent();
-    	String title = getDialogTitle(notif);
-    	String message = getDialogMessage(notif);
-    	
-    	// directly bring up the NI activity
-    	intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
-    	intent.setClass(mContext, com.android.internal.app.NetInitiatedActivity.class);    	
+        Intent intent = new Intent();
+        String title = getDialogTitle(notif);
+        String message = getDialogMessage(notif);
 
-    	// put data in the intent
-    	intent.putExtra(NI_INTENT_KEY_NOTIF_ID, notif.notificationId);    	
-    	intent.putExtra(NI_INTENT_KEY_TITLE, title);
-    	intent.putExtra(NI_INTENT_KEY_MESSAGE, message);
-    	intent.putExtra(NI_INTENT_KEY_TIMEOUT, notif.timeout);
-    	intent.putExtra(NI_INTENT_KEY_DEFAULT_RESPONSE, notif.defaultResponse);
-    	
-    	if (DEBUG) Log.d(TAG, "generateIntent, title: " + title + ", message: " + message +
-    			", timeout: " + notif.timeout);
-    	
-    	return intent;
+        // directly bring up the NI activity
+        intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
+        intent.setClass(mContext, com.android.internal.app.NetInitiatedActivity.class);
+
+        // put data in the intent
+        intent.putExtra(NI_INTENT_KEY_NOTIF_ID, notif.notificationId);
+        intent.putExtra(NI_INTENT_KEY_TITLE, title);
+        intent.putExtra(NI_INTENT_KEY_MESSAGE, message);
+        intent.putExtra(NI_INTENT_KEY_TIMEOUT, notif.timeout);
+        intent.putExtra(NI_INTENT_KEY_DEFAULT_RESPONSE, notif.defaultResponse);
+
+        if (DEBUG) Log.d(TAG, "generateIntent, title: " + title + ", message: " + message +
+                ", timeout: " + notif.timeout);
+
+        return intent;
     }
-    
+
     // Converts a string (or Hex string) to a char array
     static byte[] stringToByteArray(String original, boolean isHex)
     {
-    	int length = isHex ? original.length() / 2 : original.length();
-    	byte[] output = new byte[length];
-    	int i;
-    	
-    	if (isHex)
-    	{
-    		for (i = 0; i < length; i++)
-    		{
-    			output[i] = (byte) Integer.parseInt(original.substring(i*2, i*2+2), 16);
-    		}
-    	}
-    	else {
-    		for (i = 0; i < length; i++)
-    		{
-    			output[i] = (byte) original.charAt(i);
-    		}
-    	}
-    	
-    	return output;
+        int length = isHex ? original.length() / 2 : original.length();
+        byte[] output = new byte[length];
+        int i;
+
+        if (isHex)
+        {
+            for (i = 0; i < length; i++)
+            {
+                output[i] = (byte) Integer.parseInt(original.substring(i*2, i*2+2), 16);
+            }
+        }
+        else {
+            for (i = 0; i < length; i++)
+            {
+                output[i] = (byte) original.charAt(i);
+            }
+        }
+
+        return output;
     }
-    
+
     /**
      * Unpacks an byte array containing 7-bit packed characters into a String.
-     * 
+     *
      * @param input a 7-bit packed char array
      * @return the unpacked String
      */
     static String decodeGSMPackedString(byte[] input)
     {
-    	final char CHAR_CR = 0x0D;
-    	int nStridx = 0;
-    	int nPckidx = 0;
-    	int num_bytes = input.length;
-    	int cPrev = 0;
-    	int cCurr = 0;
-    	byte nShift;
-    	byte nextChar;
-    	byte[] stringBuf = new byte[input.length * 2]; 
-    	String result = "";
-    	
-    	while(nPckidx < num_bytes)
-    	{
-    		nShift = (byte) (nStridx & 0x07);
-    		cCurr = input[nPckidx++];
-    		if (cCurr < 0) cCurr += 256;
+        final char CHAR_CR = 0x0D;
+        int nStridx = 0;
+        int nPckidx = 0;
+        int num_bytes = input.length;
+        int cPrev = 0;
+        int cCurr = 0;
+        byte nShift;
+        byte nextChar;
+        byte[] stringBuf = new byte[input.length * 2];
+        String result = "";
 
-    		/* A 7-bit character can be split at the most between two bytes of packed
-    		 ** data.
-    		 */
-    		nextChar = (byte) (( (cCurr << nShift) | (cPrev >> (8-nShift)) ) & 0x7F);
-    		stringBuf[nStridx++] = nextChar;
+        while(nPckidx < num_bytes)
+        {
+            nShift = (byte) (nStridx & 0x07);
+            cCurr = input[nPckidx++];
+            if (cCurr < 0) cCurr += 256;
 
-    		/* Special case where the whole of the next 7-bit character fits inside
-    		 ** the current byte of packed data.
-    		 */
-    		if(nShift == 6)
-    		{
-    			/* If the next 7-bit character is a CR (0x0D) and it is the last
-    			 ** character, then it indicates a padding character. Drop it.
-    			 */
-    			if (nPckidx == num_bytes || (cCurr >> 1) == CHAR_CR)
-    			{
-    				break;
-    			}
-    			
-    			nextChar = (byte) (cCurr >> 1); 
-    			stringBuf[nStridx++] = nextChar;
-    		}
+            /* A 7-bit character can be split at the most between two bytes of packed
+             ** data.
+             */
+            nextChar = (byte) (( (cCurr << nShift) | (cPrev >> (8-nShift)) ) & 0x7F);
+            stringBuf[nStridx++] = nextChar;
 
-    		cPrev = cCurr;
-    	}
-    	
-    	try{
-    		result = new String(stringBuf, 0, nStridx, "US-ASCII");
-    	}
-    	catch (UnsupportedEncodingException e)
-    	{
-    		Log.e(TAG, e.getMessage());
-    	}
-    	
-    	return result;
+            /* Special case where the whole of the next 7-bit character fits inside
+             ** the current byte of packed data.
+             */
+            if(nShift == 6)
+            {
+                /* If the next 7-bit character is a CR (0x0D) and it is the last
+                 ** character, then it indicates a padding character. Drop it.
+                 */
+                if (nPckidx == num_bytes || (cCurr >> 1) == CHAR_CR)
+                {
+                    break;
+                }
+
+                nextChar = (byte) (cCurr >> 1);
+                stringBuf[nStridx++] = nextChar;
+            }
+
+            cPrev = cCurr;
+        }
+
+        try {
+            result = new String(stringBuf, 0, nStridx, "US-ASCII");
+        }
+        catch (UnsupportedEncodingException e)
+        {
+            Log.e(TAG, e.getMessage());
+        }
+
+        return result;
     }
-    
+
     static String decodeUTF8String(byte[] input)
     {
-    	String decoded = "";
-    	try {
-    		decoded = new String(input, "UTF-8");
-    	}
-    	catch (UnsupportedEncodingException e)
-    	{ 
-    		Log.e(TAG, e.getMessage());
-    	} 
-		return decoded;
+        String decoded = "";
+        try {
+            decoded = new String(input, "UTF-8");
+        }
+        catch (UnsupportedEncodingException e)
+        {
+            Log.e(TAG, e.getMessage());
+        }
+        return decoded;
     }
-    
+
     static String decodeUCS2String(byte[] input)
     {
-    	String decoded = "";
-    	try {
-    		decoded = new String(input, "UTF-16");
-    	}
-    	catch (UnsupportedEncodingException e)
-    	{ 
-    		Log.e(TAG, e.getMessage());
-    	} 
-		return decoded;
+        String decoded = "";
+        try {
+            decoded = new String(input, "UTF-16");
+        }
+        catch (UnsupportedEncodingException e)
+        {
+            Log.e(TAG, e.getMessage());
+        }
+        return decoded;
     }
-    
+
     /** Decode NI string
-     * 
+     *
      * @param original   The text string to be decoded
      * @param isHex      Specifies whether the content of the string has been encoded as a Hex string. Encoding
-     *                   a string as Hex can allow zeros inside the coded text. 
+     *                   a string as Hex can allow zeros inside the coded text.
      * @param coding     Specifies the coding scheme of the string, such as GSM, UTF8, UCS2, etc. This coding scheme
-     * 					 needs to match those used passed to HAL from the native GPS driver. Decoding is done according
+     *                      needs to match those used passed to HAL from the native GPS driver. Decoding is done according
      *                   to the <code> coding </code>, after a Hex string is decoded. Generally, if the
-     *                   notification strings don't need further decoding, <code> coding </code> encoding can be 
+     *                   notification strings don't need further decoding, <code> coding </code> encoding can be
      *                   set to -1, and <code> isHex </code> can be false.
      * @return the decoded string
      */
     static private String decodeString(String original, boolean isHex, int coding)
     {
-    	String decoded = original;
-    	byte[] input = stringToByteArray(original, isHex);
+        String decoded = original;
+        byte[] input = stringToByteArray(original, isHex);
 
-    	switch (coding) {
-    	case GPS_ENC_NONE:
-    		decoded = original;
-    		break;
-    		
-    	case GPS_ENC_SUPL_GSM_DEFAULT:
-    		decoded = decodeGSMPackedString(input);
-    		break;
-    		
-    	case GPS_ENC_SUPL_UTF8:
-    		decoded = decodeUTF8String(input);
-    		break;
-    		
-    	case GPS_ENC_SUPL_UCS2:
-    		decoded = decodeUCS2String(input);
-    		break;
-    		
-    	case GPS_ENC_UNKNOWN:
-    		decoded = original;
-    		break;
-    		
-    	default:
-    		Log.e(TAG, "Unknown encoding " + coding + " for NI text " + original);
-    		break;
-    	}
-    	return decoded;
+        switch (coding) {
+        case GPS_ENC_NONE:
+            decoded = original;
+            break;
+
+        case GPS_ENC_SUPL_GSM_DEFAULT:
+            decoded = decodeGSMPackedString(input);
+            break;
+
+        case GPS_ENC_SUPL_UTF8:
+            decoded = decodeUTF8String(input);
+            break;
+
+        case GPS_ENC_SUPL_UCS2:
+            decoded = decodeUCS2String(input);
+            break;
+
+        case GPS_ENC_UNKNOWN:
+            decoded = original;
+            break;
+
+        default:
+            Log.e(TAG, "Unknown encoding " + coding + " for NI text " + original);
+            break;
+        }
+        return decoded;
     }
-    
+
     // change this to configure notification display
     static private String getNotifTicker(GpsNiNotification notif)
     {
-    	String ticker = String.format("Position request! ReqId: [%s] ClientName: [%s]",
-    			decodeString(notif.requestorId, mIsHexInput, notif.requestorIdEncoding),
-    			decodeString(notif.text, mIsHexInput, notif.textEncoding));
-    	return ticker;
+        String ticker = String.format("Position request! ReqId: [%s] ClientName: [%s]",
+                decodeString(notif.requestorId, mIsHexInput, notif.requestorIdEncoding),
+                decodeString(notif.text, mIsHexInput, notif.textEncoding));
+        return ticker;
     }
-    
+
     // change this to configure notification display
     static private String getNotifTitle(GpsNiNotification notif)
     {
-    	String title = String.format("Position Request");
-    	return title;
+        String title = String.format("Position Request");
+        return title;
     }
-    
+
     // change this to configure notification display
     static private String getNotifMessage(GpsNiNotification notif)
     {
-    	String message = String.format(
-    			"NI Request received from [%s] for client [%s]!", 
-    			decodeString(notif.requestorId, mIsHexInput, notif.requestorIdEncoding),
-    			decodeString(notif.text, mIsHexInput, notif.textEncoding));
-    	return message;
+        String message = String.format(
+                "NI Request received from [%s] for client [%s]!",
+                decodeString(notif.requestorId, mIsHexInput, notif.requestorIdEncoding),
+                decodeString(notif.text, mIsHexInput, notif.textEncoding));
+        return message;
     }       
-    
+
     // change this to configure dialog display (for verification)
     static public String getDialogTitle(GpsNiNotification notif)
     {
-    	return getNotifTitle(notif);
+        return getNotifTitle(notif);
     }
-    
+
     // change this to configure dialog display (for verification)
     static private String getDialogMessage(GpsNiNotification notif)
     {
-    	return getNotifMessage(notif);
+        return getNotifMessage(notif);
     }
-    
+
 }
diff --git a/location/java/com/android/internal/location/GpsXtraDownloader.java b/location/java/com/android/internal/location/GpsXtraDownloader.java
deleted file mode 100644
index 978bda2..0000000
--- a/location/java/com/android/internal/location/GpsXtraDownloader.java
+++ /dev/null
@@ -1,173 +0,0 @@
-/*
- * Copyright (C) 2008 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.android.internal.location;
-
-import org.apache.http.HttpEntity;
-import org.apache.http.HttpHost;
-import org.apache.http.HttpResponse;
-import org.apache.http.StatusLine;
-import org.apache.http.client.HttpClient;
-import org.apache.http.client.methods.HttpGet;
-import org.apache.http.client.methods.HttpUriRequest;
-import org.apache.http.conn.params.ConnRouteParams;
-
-import java.io.DataInputStream;
-import java.io.IOException;
-import java.util.Properties;
-import java.util.Random;
-
-import android.content.Context;
-import android.net.Proxy;
-import android.net.http.AndroidHttpClient;
-import android.util.Config;
-import android.util.Log;
-
-
-
-/**
- * A class for downloading GPS XTRA data.
- *
- * {@hide}
- */
-public class GpsXtraDownloader {
-
-    private static final String TAG = "GpsXtraDownloader";
-    
-    private Context mContext;
-    private String[] mXtraServers;
-    // to load balance our server requests
-    private int mNextServerIndex;
-
-    GpsXtraDownloader(Context context, Properties properties) {
-        mContext = context;
-
-        // read XTRA servers from the Properties object
-        int count = 0;
-        String server1 = properties.getProperty("XTRA_SERVER_1");
-        String server2 = properties.getProperty("XTRA_SERVER_2");
-        String server3 = properties.getProperty("XTRA_SERVER_3");
-        if (server1 != null) count++;
-        if (server2 != null) count++;
-        if (server3 != null) count++;
-        
-        if (count == 0) {
-            Log.e(TAG, "No XTRA servers were specified in the GPS configuration");
-            return;
-        } else {
-            mXtraServers = new String[count];
-            count = 0;
-            if (server1 != null) mXtraServers[count++] = server1;
-            if (server2 != null) mXtraServers[count++] = server2;
-            if (server3 != null) mXtraServers[count++] = server3;
-
-            // randomize first server
-            Random random = new Random();
-            mNextServerIndex = random.nextInt(count);
-        }       
-    }
-
-    byte[] downloadXtraData() {
-        String proxyHost = Proxy.getHost(mContext);
-        int proxyPort = Proxy.getPort(mContext);
-        boolean useProxy = (proxyHost != null && proxyPort != -1);
-        byte[] result = null;
-        int startIndex = mNextServerIndex;
-
-        if (mXtraServers == null) {
-            return null;
-        }
-
-        // load balance our requests among the available servers
-        while (result == null) {
-            result = doDownload(mXtraServers[mNextServerIndex], useProxy, proxyHost, proxyPort);
-            
-            // increment mNextServerIndex and wrap around if necessary
-            mNextServerIndex++;
-            if (mNextServerIndex == mXtraServers.length) {
-                mNextServerIndex = 0;
-            }
-            // break if we have tried all the servers
-            if (mNextServerIndex == startIndex) break;
-        }
-    
-        return result;
-    }
-
-    protected static byte[] doDownload(String url, boolean isProxySet, 
-            String proxyHost, int proxyPort) {
-        if (Config.LOGD) Log.d(TAG, "Downloading XTRA data from " + url);
-
-        AndroidHttpClient client = null;
-        try {
-            client = AndroidHttpClient.newInstance("Android");
-            HttpUriRequest req = new HttpGet(url);
-
-            if (isProxySet) {
-                HttpHost proxy = new HttpHost(proxyHost, proxyPort);
-                ConnRouteParams.setDefaultProxy(req.getParams(), proxy);
-            }
-
-            req.addHeader(
-                    "Accept",
-                    "*/*, application/vnd.wap.mms-message, application/vnd.wap.sic");
-
-            req.addHeader(
-                    "x-wap-profile",
-                    "http://www.openmobilealliance.org/tech/profiles/UAPROF/ccppschema-20021212#");
-
-            HttpResponse response = client.execute(req);
-            StatusLine status = response.getStatusLine();
-            if (status.getStatusCode() != 200) { // HTTP 200 is success.
-                if (Config.LOGD) Log.d(TAG, "HTTP error: " + status.getReasonPhrase());
-                return null;
-            }
-
-            HttpEntity entity = response.getEntity();
-            byte[] body = null;
-            if (entity != null) {
-                try {
-                    if (entity.getContentLength() > 0) {
-                        body = new byte[(int) entity.getContentLength()];
-                        DataInputStream dis = new DataInputStream(entity.getContent());
-                        try {
-                            dis.readFully(body);
-                        } finally {
-                            try {
-                                dis.close();
-                            } catch (IOException e) {
-                                Log.e(TAG, "Unexpected IOException.", e);
-                            }
-                        }
-                    }
-                } finally {
-                    if (entity != null) {
-                        entity.consumeContent();
-                    }
-                }
-            }
-            return body;
-        } catch (Exception e) {
-            if (Config.LOGD) Log.d(TAG, "error " + e);
-        } finally {
-            if (client != null) {
-                client.close();
-            }
-        }
-        return null;
-    }
-
-}
diff --git a/location/java/com/android/internal/location/LocationProviderProxy.java b/location/java/com/android/internal/location/LocationProviderProxy.java
deleted file mode 100644
index 31ec09a..0000000
--- a/location/java/com/android/internal/location/LocationProviderProxy.java
+++ /dev/null
@@ -1,384 +0,0 @@
-/*
- * Copyright (C) 2009 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.android.internal.location;
-
-import android.content.ComponentName;
-import android.content.Context;
-import android.content.Intent;
-import android.content.ServiceConnection;
-import android.location.ILocationProvider;
-import android.location.Location;
-import android.location.LocationProviderInterface;
-import android.net.NetworkInfo;
-import android.os.Bundle;
-import android.os.Handler;
-import android.os.IBinder;
-import android.os.RemoteException;
-import android.os.SystemClock;
-import android.util.Log;
-
-/**
- * A class for proxying location providers implemented as services.
- *
- * {@hide}
- */
-public class LocationProviderProxy implements LocationProviderInterface {
-
-    private static final String TAG = "LocationProviderProxy";
-
-    private final Context mContext;
-    private final String mName;
-    private ILocationProvider mProvider;
-    private Handler mHandler;
-    private final Connection mServiceConnection = new Connection();
-
-    // cached values set by the location manager
-    private boolean mLocationTracking = false;
-    private boolean mEnabled = false;
-    private long mMinTime = -1;
-    private int mNetworkState;
-    private NetworkInfo mNetworkInfo;
-
-    // for caching requiresNetwork, requiresSatellite, etc.
-    private DummyLocationProvider mCachedAttributes;
-
-    // constructor for proxying location providers implemented in a separate service
-    public LocationProviderProxy(Context context, String name, String serviceName,
-            Handler handler) {
-        mContext = context;
-        mName = name;
-        mHandler = handler;
-        mContext.bindService(new Intent(serviceName), mServiceConnection, Context.BIND_AUTO_CREATE);
-    }
-
-    private class Connection implements ServiceConnection {
-        public void onServiceConnected(ComponentName className, IBinder service) {
-            Log.d(TAG, "LocationProviderProxy.onServiceConnected " + className);
-            synchronized (this) {
-                mProvider = ILocationProvider.Stub.asInterface(service);
-                if (mProvider != null) {
-                    mHandler.post(mServiceConnectedTask);
-                }
-            }
-        }
-
-        public void onServiceDisconnected(ComponentName className) {
-            Log.d(TAG, "LocationProviderProxy.onServiceDisconnected " + className);
-            synchronized (this) {
-                mProvider = null;
-            }
-        }
-    }
-
-    private Runnable mServiceConnectedTask = new Runnable() {
-        public void run() {
-            ILocationProvider provider;
-            synchronized (mServiceConnection) {
-                provider = mProvider;
-                if (provider == null) {
-                    return;
-                }
-            }
-
-            if (mCachedAttributes == null) {
-                try {
-                    mCachedAttributes = new DummyLocationProvider(mName);
-                    mCachedAttributes.setRequiresNetwork(provider.requiresNetwork());
-                    mCachedAttributes.setRequiresSatellite(provider.requiresSatellite());
-                    mCachedAttributes.setRequiresCell(provider.requiresCell());
-                    mCachedAttributes.setHasMonetaryCost(provider.hasMonetaryCost());
-                    mCachedAttributes.setSupportsAltitude(provider.supportsAltitude());
-                    mCachedAttributes.setSupportsSpeed(provider.supportsSpeed());
-                    mCachedAttributes.setSupportsBearing(provider.supportsBearing());
-                    mCachedAttributes.setPowerRequirement(provider.getPowerRequirement());
-                    mCachedAttributes.setAccuracy(provider.getAccuracy());
-                } catch (RemoteException e) {
-                    mCachedAttributes = null;
-                }
-            }
-
-            // resend previous values from the location manager if the service has restarted
-            try {
-                if (mEnabled) {
-                    provider.enable();
-                }
-                if (mLocationTracking) {
-                    provider.enableLocationTracking(true);
-                }
-                if (mMinTime >= 0) {
-                    provider.setMinTime(mMinTime);
-                }
-                if (mNetworkInfo != null) {
-                    provider.updateNetworkState(mNetworkState, mNetworkInfo);
-                }
-            } catch (RemoteException e) {
-            }
-        }
-    };
-
-    public String getName() {
-        return mName;
-    }
-
-    public boolean requiresNetwork() {
-        if (mCachedAttributes != null) {
-            return mCachedAttributes.requiresNetwork();
-        } else {
-            return false;
-        }
-    }
-
-    public boolean requiresSatellite() {
-        if (mCachedAttributes != null) {
-            return mCachedAttributes.requiresSatellite();
-        } else {
-            return false;
-        }
-    }
-
-    public boolean requiresCell() {
-        if (mCachedAttributes != null) {
-            return mCachedAttributes.requiresCell();
-        } else {
-            return false;
-        }
-    }
-
-    public boolean hasMonetaryCost() {
-        if (mCachedAttributes != null) {
-            return mCachedAttributes.hasMonetaryCost();
-        } else {
-            return false;
-        }
-    }
-
-    public boolean supportsAltitude() {
-        if (mCachedAttributes != null) {
-            return mCachedAttributes.supportsAltitude();
-        } else {
-            return false;
-        }
-    }
-
-    public boolean supportsSpeed() {
-        if (mCachedAttributes != null) {
-            return mCachedAttributes.supportsSpeed();
-        } else {
-            return false;
-        }
-    }
-
-     public boolean supportsBearing() {
-        if (mCachedAttributes != null) {
-            return mCachedAttributes.supportsBearing();
-        } else {
-            return false;
-        }
-    }
-
-    public int getPowerRequirement() {
-        if (mCachedAttributes != null) {
-            return mCachedAttributes.getPowerRequirement();
-        } else {
-            return -1;
-        }
-    }
-
-    public int getAccuracy() {
-        if (mCachedAttributes != null) {
-            return mCachedAttributes.getAccuracy();
-        } else {
-            return -1;
-        }
-    }
-
-    public void enable() {
-        mEnabled = true;
-        ILocationProvider provider;
-        synchronized (mServiceConnection) {
-            provider = mProvider;
-        }
-        if (provider != null) {
-            try {
-                provider.enable();
-            } catch (RemoteException e) {
-            }
-        }
-    }
-
-    public void disable() {
-        mEnabled = false;
-        ILocationProvider provider;
-        synchronized (mServiceConnection) {
-            provider = mProvider;
-        }
-        if (provider != null) {
-            try {
-                provider.disable();
-            } catch (RemoteException e) {
-            }
-        }
-    }
-
-    public boolean isEnabled() {
-        return mEnabled;
-    }
-
-    public int getStatus(Bundle extras) {
-        ILocationProvider provider;
-        synchronized (mServiceConnection) {
-            provider = mProvider;
-        }
-        if (provider != null) {
-            try {
-                return provider.getStatus(extras);
-            } catch (RemoteException e) {
-            }
-        }
-        return 0;
-    }
-
-    public long getStatusUpdateTime() {
-         ILocationProvider provider;
-        synchronized (mServiceConnection) {
-            provider = mProvider;
-        }
-        if (provider != null) {
-            try {
-                return provider.getStatusUpdateTime();
-            } catch (RemoteException e) {
-            }
-        }
-        return 0;
-     }
-
-    public String getInternalState() {
-        try {
-            return mProvider.getInternalState();
-        } catch (RemoteException e) {
-            Log.e(TAG, "getInternalState failed", e);
-            return null;
-        }
-    }
-
-    public boolean isLocationTracking() {
-        return mLocationTracking;
-    }
-
-    public void enableLocationTracking(boolean enable) {
-        mLocationTracking = enable;
-        if (!enable) {
-            mMinTime = -1;
-        }
-        ILocationProvider provider;
-        synchronized (mServiceConnection) {
-            provider = mProvider;
-        }
-        if (provider != null) {
-            try {
-                provider.enableLocationTracking(enable);
-            } catch (RemoteException e) {
-            }
-        }
-    }
-
-    public long getMinTime() {
-        return mMinTime;
-    }
-
-    public void setMinTime(long minTime) {
-       mMinTime = minTime;
-        ILocationProvider provider;
-        synchronized (mServiceConnection) {
-            provider = mProvider;
-        }
-        if (provider != null) {
-            try {
-                provider.setMinTime(minTime);
-            } catch (RemoteException e) {
-            }
-        }
-    }
-
-    public void updateNetworkState(int state, NetworkInfo info) {
-        mNetworkState = state;
-        mNetworkInfo = info;
-        ILocationProvider provider;
-        synchronized (mServiceConnection) {
-            provider = mProvider;
-        }
-        if (provider != null) {
-            try {
-                provider.updateNetworkState(state, info);
-            } catch (RemoteException e) {
-            }
-        }
-    }
-
-    public void updateLocation(Location location) {
-        ILocationProvider provider;
-        synchronized (mServiceConnection) {
-            provider = mProvider;
-        }
-        if (provider != null) {
-            try {
-                provider.updateLocation(location);
-            } catch (RemoteException e) {
-            }
-        }
-    }
-
-    public boolean sendExtraCommand(String command, Bundle extras) {
-        ILocationProvider provider;
-        synchronized (mServiceConnection) {
-            provider = mProvider;
-        }
-        if (provider != null) {
-            try {
-                provider.sendExtraCommand(command, extras);
-            } catch (RemoteException e) {
-            }
-        }
-        return false;
-    }
-
-    public void addListener(int uid) {
-        ILocationProvider provider;
-        synchronized (mServiceConnection) {
-            provider = mProvider;
-        }
-        if (provider != null) {
-            try {
-                provider.addListener(uid);
-            } catch (RemoteException e) {
-            }
-        }
-    }
-
-    public void removeListener(int uid) {
-        ILocationProvider provider;
-        synchronized (mServiceConnection) {
-            provider = mProvider;
-        }
-        if (provider != null) {
-            try {
-                provider.removeListener(uid);
-            } catch (RemoteException e) {
-            }
-        }
-    }
-}
diff --git a/location/java/com/android/internal/location/MockProvider.java b/location/java/com/android/internal/location/MockProvider.java
deleted file mode 100644
index d912740..0000000
--- a/location/java/com/android/internal/location/MockProvider.java
+++ /dev/null
@@ -1,207 +0,0 @@
-/*
- * Copyright (C) 2009 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.android.internal.location;
-
-import android.location.ILocationManager;
-import android.location.Location;
-import android.location.LocationProvider;
-import android.location.LocationProviderInterface;
-import android.net.NetworkInfo;
-import android.os.Bundle;
-import android.os.RemoteException;
-import android.util.Log;
-import android.util.PrintWriterPrinter;
-
-import java.io.PrintWriter;
-
-/**
- * A mock location provider used by LocationManagerService to implement test providers.
- *
- * {@hide}
- */
-public class MockProvider implements LocationProviderInterface {
-    private final String mName;
-    private final ILocationManager mLocationManager;
-    private final boolean mRequiresNetwork;
-    private final boolean mRequiresSatellite;
-    private final boolean mRequiresCell;
-    private final boolean mHasMonetaryCost;
-    private final boolean mSupportsAltitude;
-    private final boolean mSupportsSpeed;
-    private final boolean mSupportsBearing;
-    private final int mPowerRequirement;
-    private final int mAccuracy;
-    private final Location mLocation;
-    private int mStatus;
-    private long mStatusUpdateTime;
-    private final Bundle mExtras = new Bundle();
-    private boolean mHasLocation;
-    private boolean mHasStatus;
-    private boolean mEnabled;
-
-    private static final String TAG = "MockProvider";
-
-    public MockProvider(String name,  ILocationManager locationManager,
-        boolean requiresNetwork, boolean requiresSatellite,
-        boolean requiresCell, boolean hasMonetaryCost, boolean supportsAltitude,
-        boolean supportsSpeed, boolean supportsBearing, int powerRequirement, int accuracy) {
-        mName = name;
-        mLocationManager = locationManager;
-        mRequiresNetwork = requiresNetwork;
-        mRequiresSatellite = requiresSatellite;
-        mRequiresCell = requiresCell;
-        mHasMonetaryCost = hasMonetaryCost;
-        mSupportsAltitude = supportsAltitude;
-        mSupportsBearing = supportsBearing;
-        mSupportsSpeed = supportsSpeed;
-        mPowerRequirement = powerRequirement;
-        mAccuracy = accuracy;
-        mLocation = new Location(name);
-    }
-
-    public String getName() {
-        return mName;
-    }
-
-    public void disable() {
-        mEnabled = false;
-    }
-
-    public void enable() {
-        mEnabled = true;
-    }
-
-    public boolean isEnabled() {
-        return mEnabled;
-    }
-
-    public int getStatus(Bundle extras) {
-        if (mHasStatus) {
-            extras.clear();
-            extras.putAll(mExtras);
-            return mStatus;
-        } else {
-            return LocationProvider.AVAILABLE;
-        }
-    }
-
-    public long getStatusUpdateTime() {
-        return mStatusUpdateTime;
-    }
-
-    public int getAccuracy() {
-        return mAccuracy;
-    }
-
-    public int getPowerRequirement() {
-        return mPowerRequirement;
-    }
-
-    public boolean hasMonetaryCost() {
-        return mHasMonetaryCost;
-    }
-
-    public boolean requiresCell() {
-        return mRequiresCell;
-    }
-
-    public boolean requiresNetwork() {
-        return mRequiresNetwork;
-    }
-
-    public boolean requiresSatellite() {
-        return mRequiresSatellite;
-    }
-
-    public boolean supportsAltitude() {
-        return mSupportsAltitude;
-    }
-
-    public boolean supportsBearing() {
-        return mSupportsBearing;
-    }
-
-    public boolean supportsSpeed() {
-        return mSupportsSpeed;
-    }
-
-    public void setLocation(Location l) {
-        mLocation.set(l);
-        mHasLocation = true;
-        try {
-            mLocationManager.reportLocation(mLocation, false);
-        } catch (RemoteException e) {
-            Log.e(TAG, "RemoteException calling reportLocation");
-        }
-    }
-
-    public void clearLocation() {
-        mHasLocation = false;
-    }
-
-    public void setStatus(int status, Bundle extras, long updateTime) {
-        mStatus = status;
-        mStatusUpdateTime = updateTime;
-        mExtras.clear();
-        if (extras != null) {
-            mExtras.putAll(extras);
-        }
-        mHasStatus = true;
-    }
-
-    public void clearStatus() {
-        mHasStatus = false;
-        mStatusUpdateTime = 0;
-    }
-
-    public String getInternalState() {
-        return null;
-    }
-
-    public void enableLocationTracking(boolean enable) {
-    }
-
-    public void setMinTime(long minTime) {
-    }
-
-    public void updateNetworkState(int state, NetworkInfo info) {
-    }
-
-    public void updateLocation(Location location) {
-    }
-
-    public boolean sendExtraCommand(String command, Bundle extras) {
-        return false;
-    }
-
-    public void addListener(int uid) {
-    }
-
-    public void removeListener(int uid) {
-    }
-
-    public void dump(PrintWriter pw, String prefix) {
-        pw.println(prefix + mName);
-        pw.println(prefix + "mHasLocation=" + mHasLocation);
-        pw.println(prefix + "mLocation:");
-        mLocation.dump(new PrintWriterPrinter(pw), prefix + "  ");
-        pw.println(prefix + "mHasStatus=" + mHasStatus);
-        pw.println(prefix + "mStatus=" + mStatus);
-        pw.println(prefix + "mStatusUpdateTime=" + mStatusUpdateTime);
-        pw.println(prefix + "mExtras=" + mExtras);
-    }
-}
diff --git a/location/java/com/android/internal/location/PassiveProvider.java b/location/java/com/android/internal/location/PassiveProvider.java
deleted file mode 100644
index ab90937..0000000
--- a/location/java/com/android/internal/location/PassiveProvider.java
+++ /dev/null
@@ -1,143 +0,0 @@
-/*
- * Copyright (C) 2010 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.android.internal.location;
-
-import android.location.ILocationManager;
-import android.location.Location;
-import android.location.LocationManager;
-import android.location.LocationProvider;
-import android.location.LocationProviderInterface;
-import android.net.NetworkInfo;
-import android.os.Bundle;
-import android.os.RemoteException;
-import android.util.Log;
-
-/**
- * A passive location provider reports locations received from other providers
- * for clients that want to listen passively without actually triggering
- * location updates.
- *
- * {@hide}
- */
-public class PassiveProvider implements LocationProviderInterface {
-
-    private static final String TAG = "PassiveProvider";
-
-    private final ILocationManager mLocationManager;
-    private boolean mTracking;
-
-    public PassiveProvider(ILocationManager locationManager) {
-        mLocationManager = locationManager;
-    }
-
-    public String getName() {
-        return LocationManager.PASSIVE_PROVIDER;
-    }
-
-    public boolean requiresNetwork() {
-        return false;
-    }
-
-    public boolean requiresSatellite() {
-        return false;
-    }
-
-    public boolean requiresCell() {
-        return false;
-    }
-
-    public boolean hasMonetaryCost() {
-        return false;
-    }
-
-    public boolean supportsAltitude() {
-        return false;
-    }
-
-    public boolean supportsSpeed() {
-        return false;
-    }
-
-    public boolean supportsBearing() {
-        return false;
-    }
-
-    public int getPowerRequirement() {
-        return -1;
-    }
-
-    public int getAccuracy() {
-        return -1;
-    }
-
-    public boolean isEnabled() {
-        return true;
-    }
-
-    public void enable() {
-    }
-
-    public void disable() {
-    }
-
-    public int getStatus(Bundle extras) {
-        if (mTracking) {
-            return LocationProvider.AVAILABLE;
-        } else {
-            return LocationProvider.TEMPORARILY_UNAVAILABLE;
-        }
-    }
-
-    public long getStatusUpdateTime() {
-        return -1;
-    }
-
-    public String getInternalState() {
-        return null;
-    }
-
-    public void enableLocationTracking(boolean enable) {
-        mTracking = enable;
-    }
-
-    public void setMinTime(long minTime) {
-    }
-
-    public void updateNetworkState(int state, NetworkInfo info) {
-    }
-
-    public void updateLocation(Location location) {
-        if (mTracking) {
-            try {
-                // pass the location back to the location manager
-                mLocationManager.reportLocation(location, true);
-            } catch (RemoteException e) {
-                Log.e(TAG, "RemoteException calling reportLocation");
-            }
-        }
-    }
-
-    public boolean sendExtraCommand(String command, Bundle extras) {
-        return false;
-    }
-
-    public void addListener(int uid) {
-    }
-
-    public void removeListener(int uid) {
-    }
-}
diff --git a/media/java/android/media/AudioEffect.java b/media/java/android/media/AudioEffect.java
new file mode 100644
index 0000000..053cc22
--- /dev/null
+++ b/media/java/android/media/AudioEffect.java
@@ -0,0 +1,1047 @@
+/*
+ * Copyright (C) 2010 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package android.media;
+
+import android.util.Log;
+import java.lang.ref.WeakReference;
+import java.io.IOException;
+import android.os.Handler;
+import android.os.Looper;
+import android.os.Message;
+import java.nio.ByteOrder;
+import java.nio.ByteBuffer;
+import java.util.UUID;
+
+/**
+ * AudioEffect is the base class for implementing audio effect control in Java
+ * applications.
+ * <p>Creating an AudioEffect object will create the effect engine in
+ * audio framework if no instance of the same effect type exists in the
+ * specified audio session. If one exists, this instance will be used.
+ * <p>The application creating the AudioEffect object (or a derived class) will either
+ * receive control of the effect engine or not depending on the priority
+ * parameter. If priority is higher than the priority used by the current effect
+ * engine owner, the control will be transfered to the new object. Otherwise
+ * control will remain with the previous object. In this case, the new
+ * application will be notified of changes in effect engine state or control
+ * ownership by the appropiate listener.
+ * <p>If the effect is to be applied to a specific AudioTrack or MediaPlayer instance,
+ * the application must specify the audio session ID of that instance when calling the AudioEffect
+ * constructor.
+ *
+ * { @hide Pending API council review }
+ */
+public class AudioEffect {
+    static {
+        System.loadLibrary("audioeffect_jni");
+        native_init();
+    }
+
+    private final static String TAG = "AudioEffect-JAVA";
+
+    /**
+     * The following UUIDs define effect types corresponding to standard audio
+     * effects whose implementation and interface conform to the OpenSL ES
+     * specification. The definitions match the corresponding interface IDs in
+     * OpenSLES_IID.h
+     */
+
+    /**
+     * UUID for environmental reverb effect
+     */
+    public static final UUID EFFECT_TYPE_ENV_REVERB = UUID
+            .fromString("c2e5d5f0-94bd-4763-9cac-4e234d06839e");
+    /**
+     * UUID for preset reverb effect
+     */
+    public static final UUID EFFECT_TYPE_PRESET_REVERB = UUID
+            .fromString("47382d60-ddd8-11db-bf3a-0002a5d5c51b");
+    /**
+     * UUID for equalizer effect
+     */
+    public static final UUID EFFECT_TYPE_EQUALIZER = UUID
+            .fromString("0bed4300-ddd6-11db-8f34-0002a5d5c51b");
+    /**
+     * UUID for bass boost effect
+     */
+    public static final UUID EFFECT_TYPE_BASS_BOOST = UUID
+            .fromString("0634f220-ddd4-11db-a0fc-0002a5d5c51b");
+    /**
+     * UUID for virtualizer effect
+     */
+    public static final UUID EFFECT_TYPE_VIRTUALIZER = UUID
+            .fromString("37cc2c00-dddd-11db-8577-0002a5d5c51b");
+
+    /**
+     * Null effect UUID. Used when the UUID for effect type of
+     */
+    public static final UUID EFFECT_TYPE_NULL = UUID
+            .fromString("ec7178ec-e5e1-4432-a3f4-4657e6795210");
+
+    /**
+     * State of an AudioEffect object that was not successfully initialized upon
+     * creation
+     */
+    public static final int STATE_UNINITIALIZED = 0;
+    /**
+     * State of an AudioEffect object that is ready to be used.
+     */
+    public static final int STATE_INITIALIZED = 1;
+
+    // to keep in sync with
+    // frameworks/base/media/jni/audioeffect/android_media_AudioEffect.cpp
+    /**
+     * Event id for engine state change notification.
+     */
+    protected static final int NATIVE_EVENT_ENABLED_STATUS = 0;
+    /**
+     * Event id for engine control ownership change notification.
+     */
+    protected static final int NATIVE_EVENT_CONTROL_STATUS = 1;
+    /**
+     * Event id for engine parameter change notification.
+     */
+    protected static final int NATIVE_EVENT_PARAMETER_CHANGED = 2;
+
+    /**
+     * Successful operation.
+     */
+    public static final int SUCCESS = 0;
+    /**
+     * Unspecified error.
+     */
+    public static final int ERROR = -1;
+    /**
+     * Internal opreation status. Not returned by any method.
+     */
+    public static final int ALREADY_EXISTS = -2;
+    /**
+     * Operation failed due to bad object initialization.
+     */
+    public static final int ERROR_NO_INIT = -3;
+    /**
+     * Operation failed due to bad parameter value.
+     */
+    public static final int ERROR_BAD_VALUE = -4;
+    /**
+     * Operation failed because it was requested in wrong state.
+     */
+    public static final int ERROR_INVALID_OPERATION = -5;
+    /**
+     * Operation failed due to lack of memory.
+     */
+    public static final int ERROR_NO_MEMORY = -6;
+    /**
+     * Operation failed due to dead remote object.
+     */
+    public static final int ERROR_DEAD_OBJECT = -7;
+
+    /**
+     * The effect descriptor contains necessary information to facilitate
+     * effects enumeration:<br>
+     * <ul>
+     *  <li>mType: UUID corresponding to the OpenSL ES interface implemented by this effect</li>
+     *  <li>mUuid: UUID for this particular implementation</li>
+     *  <li>mConnectMode: {@link #EFFECT_INSERT} or {@link #EFFECT_AUXILIARY}</li>
+     *  <li>mName: human readable effect name</li>
+     *  <li>mImplementor: human readable effect implementor name</li>
+     * </ul>
+     */
+    public static class Descriptor {
+
+        public Descriptor() {
+        }
+
+        public Descriptor(String type, String uuid, String connectMode,
+                String name, String implementor) {
+            mType = UUID.fromString(type);
+            mUuid = UUID.fromString(uuid);
+            mConnectMode = connectMode;
+            mName = name;
+            mImplementor = implementor;
+        }
+
+        public UUID mType;
+        public UUID mUuid;
+        public String mConnectMode;
+        public String mName;
+        public String mImplementor;
+    };
+
+    /**
+     * Effect connection mode is insert. Specifying an audio session ID when creating the effect
+     * will insert this effect after all players in the same audio session.
+     */
+    public static final String EFFECT_INSERT = "Insert";
+    /**
+     * Effect connection mode is auxiliary.
+     * <p>Auxiliary effects must be created on session 0 (global output mix). In order for a
+     * MediaPlayer or AudioTrack to be fed into this effect, they must be explicitely attached to
+     * this effect and a send level must be specified.
+     * <p>Use the effect ID returned by {@link #getId()} to designate this particular effect when
+     * attaching it to the MediaPlayer or AudioTrack.
+     */
+    public static final String EFFECT_AUXILIARY = "Auxiliary";
+
+    // --------------------------------------------------------------------------
+    // Member variables
+    // --------------------
+    /**
+     * Indicates the state of the AudioEffect instance
+     */
+    protected int mState = STATE_UNINITIALIZED;
+    /**
+     * Lock to synchronize access to mState
+     */
+    protected final Object mStateLock = new Object();
+    /**
+     * System wide unique effect ID
+     */
+    protected int mId;
+
+    // accessed by native methods
+    private int mNativeAudioEffect;
+    private int mJniData;
+
+    /**
+     * Effect descriptor
+     */
+    private Descriptor mDescriptor;
+
+    /**
+     * Listener for effect engine state change notifications.
+     *
+     * @see #setEnableStatusListener(OnEnableStatusChangeListener)
+     */
+    protected OnEnableStatusChangeListener mEnableStatusChangeListener = null;
+    /**
+     * Listener for effect engine control ownership change notifications.
+     *
+     * @see #setControlStatusListener(OnControlStatusChangeListener)
+     */
+    protected OnControlStatusChangeListener mControlChangeStatusListener = null;
+    /**
+     * Listener for effect engine control ownership change notifications.
+     *
+     * @see #setParameterListener(OnParameterChangeListener)
+     */
+    protected OnParameterChangeListener mParameterChangeListener = null;
+    /**
+     * Lock to protect listeners updates against event notifications
+     */
+    protected final Object mListenerLock = new Object();
+    /**
+     * Handler for events coming from the native code
+     */
+    protected NativeEventHandler mNativeEventHandler = null;
+
+    // --------------------------------------------------------------------------
+    // Constructor, Finalize
+    // --------------------
+    /**
+     * Class constructor.
+     *
+     * @param type type of effect engine created. See {@link #EFFECT_TYPE_ENV_REVERB},
+     *            {@link #EFFECT_TYPE_EQUALIZER} ... Types corresponding to
+     *            built-in effects are defined by AudioEffect class. Other types
+     *            can be specified provided they correspond an existing OpenSL
+     *            ES interface ID and the corresponsing effect is available on
+     *            the platform. If an unspecified effect type is requested, the
+     *            constructor with throw the IllegalArgumentException. This
+     *            parameter can be set to {@link #EFFECT_TYPE_NULL} in which
+     *            case only the uuid will be used to select the effect.
+     * @param uuid unique identifier of a particular effect implementation.
+     *            Must be specified if the caller wants to use a particular
+     *            implementation of an effect type. This parameter can be set to
+     *            {@link #EFFECT_TYPE_NULL} in which case only the type will
+     *            be used to select the effect.
+     * @param priority the priority level requested by the application for
+     *            controlling the effect engine. As the same effect engine can
+     *            be shared by several applications, this parameter indicates
+     *            how much the requesting application needs control of effect
+     *            parameters. The normal priority is 0, above normal is a
+     *            positive number, below normal a negative number.
+     * @param audioSession System wide unique audio session identifier. If audioSession
+     *            is not 0, the effect will be attached to the MediaPlayer or
+     *            AudioTrack in the same audio session. Otherwise, the effect
+     *            will apply to the output mix.
+     *
+     * @throws java.lang.IllegalArgumentException
+     * @throws java.lang.UnsupportedOperationException
+     * @throws java.lang.RuntimeException
+     */
+
+    public AudioEffect(UUID type, UUID uuid, int priority, int audioSession)
+            throws IllegalArgumentException, UnsupportedOperationException,
+            RuntimeException {
+        int[] id = new int[1];
+        Descriptor[] desc = new Descriptor[1];
+        // native initialization
+        int initResult = native_setup(new WeakReference<AudioEffect>(this),
+                type.toString(), uuid.toString(), priority, audioSession, id,
+                desc);
+        if (initResult != SUCCESS && initResult != ALREADY_EXISTS) {
+            Log.e(TAG, "Error code " + initResult
+                    + " when initializing AudioEffect.");
+            switch (initResult) {
+            case ERROR_BAD_VALUE:
+                throw (new IllegalArgumentException("Effect type: " + type
+                        + " not supported."));
+            case ERROR_INVALID_OPERATION:
+                throw (new UnsupportedOperationException(
+                        "Effect library not loaded"));
+            default:
+                throw (new RuntimeException(
+                        "Cannot initialize effect engine for type: " + type
+                                + "Error: " + initResult));
+            }
+        }
+        mId = id[0];
+        mDescriptor = desc[0];
+        synchronized (mStateLock) {
+            mState = STATE_INITIALIZED;
+        }
+    }
+
+    /**
+     * Releases the native AudioEffect resources. It is a good practice to
+     * release the effect engine when not in use as control can be returned to
+     * other applications or the native resources released.
+     */
+    public void release() {
+        synchronized (mStateLock) {
+            native_release();
+            mState = STATE_UNINITIALIZED;
+        }
+    }
+
+    @Override
+    protected void finalize() {
+        native_finalize();
+    }
+
+    /**
+     * Get the effect descriptor.
+     *
+     //TODO when AudioEffect class is unhidden @ see android.media.AudioEffect.Descriptor
+     * @throws IllegalStateException
+     */
+    public Descriptor getDescriptor() throws IllegalStateException {
+        checkState("getDescriptor()");
+        return mDescriptor;
+    }
+
+    // --------------------------------------------------------------------------
+    // Effects Enumeration
+    // --------------------
+
+    /**
+     * Query all effects available on the platform. Returns an array of
+     //TODO when AudioEffect class is unhidden: {@ link android.media.AudioEffect.Descriptor} objects
+     *
+     * @throws IllegalStateException
+     */
+
+    static public Descriptor[] queryEffects() {
+        return (Descriptor[]) native_query_effects();
+    }
+
+    // --------------------------------------------------------------------------
+    // Control methods
+    // --------------------
+
+    /**
+     * Enable or disable effect engine.
+     *
+     * @param enabled the requested enable state
+     * @return {@link #SUCCESS} in case of success, {@link #ERROR_INVALID_OPERATION}
+     *         or {@link #ERROR_DEAD_OBJECT} in case of failure.
+     * @throws IllegalStateException
+     */
+    public int setEnabled(boolean enabled) throws IllegalStateException {
+        checkState("setEnabled()");
+        return native_setEnabled(enabled);
+    }
+
+    /**
+     * Set effect parameter. The setParameter method is provided in several
+     * forms addressing most common parameter formats. This form is the most
+     * generic one where the parameter and its value are both specified as an
+     * array of bytes. The parameter and value type and length are therefore
+     * totally free. For standard effect defined by OpenSL ES, the parameter
+     * format and values must match the definitions in the corresponding OpenSL
+     * ES interface.
+     *
+     * @param param the identifier of the parameter to set
+     * @param value the new value for the specified parameter
+     * @return {@link #SUCCESS} in case of success, {@link #ERROR_BAD_VALUE},
+     *         {@link #ERROR_NO_MEMORY}, {@link #ERROR_INVALID_OPERATION} or
+     *         {@link #ERROR_DEAD_OBJECT} in case of failure
+     * @throws IllegalStateException
+     */
+    public int setParameter(byte[] param, byte[] value)
+            throws IllegalStateException {
+        checkState("setParameter()");
+        return native_setParameter(param.length, param, value.length, value);
+    }
+
+    /**
+     * Set effect parameter. The parameter and its value are integers.
+     *
+     * @see #setParameter(byte[], byte[])
+     */
+    public int setParameter(int param, int value) throws IllegalStateException {
+        byte[] p = intToByteArray(param);
+        byte[] v = intToByteArray(value);
+        return setParameter(p, v);
+    }
+
+    /**
+     * Set effect parameter. The parameter is an integer and the value is a
+     * short integer.
+     *
+     * @see #setParameter(byte[], byte[])
+     */
+    public int setParameter(int param, short value)
+            throws IllegalStateException {
+        byte[] p = intToByteArray(param);
+        byte[] v = shortToByteArray(value);
+        return setParameter(p, v);
+    }
+
+    /**
+     * Set effect parameter. The parameter is an integer and the value is an
+     * array of bytes.
+     *
+     * @see #setParameter(byte[], byte[])
+     */
+    public int setParameter(int param, byte[] value)
+            throws IllegalStateException {
+        byte[] p = intToByteArray(param);
+        return setParameter(p, value);
+    }
+
+    /**
+     * Set effect parameter. The parameter is an array of 1 or 2 integers and
+     * the value is also an array of 1 or 2 integers
+     *
+     * @see #setParameter(byte[], byte[])
+     */
+    public int setParameter(int[] param, int[] value)
+            throws IllegalStateException {
+        if (param.length > 2 || value.length > 2) {
+            return ERROR_BAD_VALUE;
+        }
+        byte[] p = intToByteArray(param[0]);
+        if (param.length > 1) {
+            byte[] p2 = intToByteArray(param[1]);
+            p = concatArrays(p, p2);
+        }
+        byte[] v = intToByteArray(value[0]);
+        if (value.length > 1) {
+            byte[] v2 = intToByteArray(value[1]);
+            v = concatArrays(v, v2);
+        }
+        return setParameter(p, v);
+    }
+
+    /**
+     * Set effect parameter. The parameter is an array of 1 or 2 integers and
+     * the value is an array of 1 or 2 short integers
+     *
+     * @see #setParameter(byte[], byte[])
+     */
+    public int setParameter(int[] param, short[] value)
+            throws IllegalStateException {
+        if (param.length > 2 || value.length > 2) {
+            return ERROR_BAD_VALUE;
+        }
+        byte[] p = intToByteArray(param[0]);
+        if (param.length > 1) {
+            byte[] p2 = intToByteArray(param[1]);
+            p = concatArrays(p, p2);
+        }
+
+        byte[] v = shortToByteArray(value[0]);
+        if (value.length > 1) {
+            byte[] v2 = shortToByteArray(value[1]);
+            v = concatArrays(v, v2);
+        }
+        return setParameter(p, v);
+    }
+
+    /**
+     * Set effect parameter. The parameter is an array of 1 or 2 integers and
+     * the value is an array of bytes
+     *
+     * @see #setParameter(byte[], byte[])
+     */
+    public int setParameter(int[] param, byte[] value)
+            throws IllegalStateException {
+        if (param.length > 2) {
+            return ERROR_BAD_VALUE;
+        }
+        byte[] p = intToByteArray(param[0]);
+        if (param.length > 1) {
+            byte[] p2 = intToByteArray(param[1]);
+            p = concatArrays(p, p2);
+        }
+        return setParameter(p, value);
+    }
+
+    /**
+     * Get effect parameter. The getParameter method is provided in several
+     * forms addressing most common parameter formats. This form is the most
+     * generic one where the parameter and its value are both specified as an
+     * array of bytes. The parameter and value type and length are therefore
+     * totally free.
+     *
+     * @param param the identifier of the parameter to set
+     * @param value the new value for the specified parameter
+     * @return {@link #SUCCESS} in case of success, {@link #ERROR_BAD_VALUE},
+     *         {@link #ERROR_NO_MEMORY}, {@link #ERROR_INVALID_OPERATION} or
+     *         {@link #ERROR_DEAD_OBJECT} in case of failure When called, value.length
+     *         indicates the maximum size of the returned parameters value. When
+     *         returning, value.length is updated with the actual size of the
+     *         returned value.
+     * @throws IllegalStateException
+     */
+    public int getParameter(byte[] param, byte[] value)
+            throws IllegalStateException {
+        checkState("getParameter()");
+        int[] vSize = new int[1];
+        vSize[0] = value.length;
+        int status = native_getParameter(param.length, param, vSize, value);
+        if (value.length > vSize[0]) {
+            byte[] resizedValue = new byte[vSize[0]];
+            System.arraycopy(value, 0, resizedValue, 0, vSize[0]);
+            value = resizedValue;
+        }
+        return status;
+    }
+
+    /**
+     * Get effect parameter. The parameter is an integer and the value is an
+     * array of bytes.
+     *
+     * @see #getParameter(byte[], byte[])
+     */
+    public int getParameter(int param, byte[] value)
+            throws IllegalStateException {
+        byte[] p = intToByteArray(param);
+
+        return getParameter(p, value);
+    }
+
+    /**
+     * Get effect parameter. The parameter is an integer and the value is an
+     * array of 1 or 2 integers
+     *
+     * @see #getParameter(byte[], byte[])
+     */
+    public int getParameter(int param, int[] value)
+            throws IllegalStateException {
+        if (value.length > 2) {
+            return ERROR_BAD_VALUE;
+        }
+        byte[] p = intToByteArray(param);
+
+        byte[] v = new byte[value.length * 4];
+
+        int status = getParameter(p, v);
+
+        value[0] = byteArrayToInt(v);
+        if (v.length > 4) {
+            value[1] = byteArrayToInt(v, 4);
+        }
+        return status;
+    }
+
+    /**
+     * Get effect parameter. The parameter is an integer and the value is an
+     * array of 1 or 2 short integers
+     *
+     * @see #getParameter(byte[], byte[])
+     */
+    public int getParameter(int param, short[] value)
+            throws IllegalStateException {
+        if (value.length > 2) {
+            return ERROR_BAD_VALUE;
+        }
+        byte[] p = intToByteArray(param);
+
+        byte[] v = new byte[value.length * 2];
+
+        int status = getParameter(p, v);
+
+        value[0] = byteArrayToShort(v);
+        if (v.length > 2) {
+            value[1] = byteArrayToShort(v, 2);
+        }
+        return status;
+    }
+
+    /**
+     * Get effect parameter. The parameter is an array of 1 or 2 integers and
+     * the value is also an array of 1 or 2 integers
+     *
+     * @see #getParameter(byte[], byte[])
+     */
+    public int getParameter(int[] param, int[] value)
+            throws IllegalStateException {
+        if (param.length > 2 || value.length > 2) {
+            return ERROR_BAD_VALUE;
+        }
+        byte[] p = intToByteArray(param[0]);
+        if (param.length > 1) {
+            byte[] p2 = intToByteArray(param[1]);
+            p = concatArrays(p, p2);
+        }
+        byte[] v = new byte[value.length * 4];
+
+        int status = getParameter(p, v);
+
+        value[0] = byteArrayToInt(v);
+        if (v.length > 4) {
+            value[1] = byteArrayToInt(v, 4);
+        }
+        return status;
+    }
+
+    /**
+     * Get effect parameter. The parameter is an array of 1 or 2 integers and
+     * the value is an array of 1 or 2 short integers
+     *
+     * @see #getParameter(byte[], byte[])
+     */
+    public int getParameter(int[] param, short[] value)
+            throws IllegalStateException {
+        if (param.length > 2 || value.length > 2) {
+            return ERROR_BAD_VALUE;
+        }
+        byte[] p = intToByteArray(param[0]);
+        if (param.length > 1) {
+            byte[] p2 = intToByteArray(param[1]);
+            p = concatArrays(p, p2);
+        }
+        byte[] v = new byte[value.length * 2];
+
+        int status = getParameter(p, v);
+
+        value[0] = byteArrayToShort(v);
+        if (v.length > 2) {
+            value[1] = byteArrayToShort(v, 2);
+        }
+        return status;
+    }
+
+    /**
+     * Get effect parameter. The parameter is an array of 1 or 2 integers and
+     * the value is an array of bytes
+     *
+     * @see #getParameter(byte[], byte[])
+     */
+    public int getParameter(int[] param, byte[] value)
+            throws IllegalStateException {
+        if (param.length > 2) {
+            return ERROR_BAD_VALUE;
+        }
+        byte[] p = intToByteArray(param[0]);
+        if (param.length > 1) {
+            byte[] p2 = intToByteArray(param[1]);
+            p = concatArrays(p, p2);
+        }
+
+        return getParameter(p, value);
+    }
+
+    /**
+     * Send a command to the effect engine. This method is intended to send
+     * proprietary commands to a particular effect implementation.
+     *
+     */
+    public int command(int cmdCode, byte[] command, byte[] reply)
+            throws IllegalStateException {
+        checkState("command()");
+        int[] replySize = new int[1];
+        replySize[0] = reply.length;
+
+        int status = native_command(cmdCode, command.length, command,
+                replySize, reply);
+
+        if (reply.length > replySize[0]) {
+            byte[] resizedReply = new byte[replySize[0]];
+            System.arraycopy(reply, 0, resizedReply, 0, replySize[0]);
+            reply = resizedReply;
+        }
+        return status;
+    }
+
+    // --------------------------------------------------------------------------
+    // Getters
+    // --------------------
+
+    /**
+     * Returns effect unique identifier. This system wide unique identifier can
+     * be used to attach this effect to a MediaPlayer or an AudioTrack when the
+     * effect is an auxiliary effect (Reverb)
+     *
+     * @return the effect identifier.
+     * @throws IllegalStateException
+     */
+    public int getId() throws IllegalStateException {
+        checkState("getId()");
+        return mId;
+    }
+
+    /**
+     * Returns effect engine enable state
+     *
+     * @return true if the effect is enabled, false otherwise.
+     * @throws IllegalStateException
+     */
+    public boolean getEnabled() throws IllegalStateException {
+        checkState("getEnabled()");
+        return native_getEnabled();
+    }
+
+    /**
+     * Checks if this AudioEffect object is controlling the effect engine.
+     *
+     * @return true if this instance has control of effect engine, false
+     *         otherwise.
+     * @throws IllegalStateException
+     */
+    public boolean hasControl() throws IllegalStateException {
+        checkState("hasControl()");
+        return native_hasControl();
+    }
+
+    // --------------------------------------------------------------------------
+    // Initialization / configuration
+    // --------------------
+    /**
+     * Sets the listener AudioEffect notifies when the effect engine is enabled
+     * or disabled.
+     *
+     * @param listener
+     */
+    public void setEnableStatusListener(OnEnableStatusChangeListener listener) {
+        synchronized (mListenerLock) {
+            mEnableStatusChangeListener = listener;
+        }
+        if ((listener != null) && (mNativeEventHandler == null)) {
+            createNativeEventHandler();
+        }
+    }
+
+    /**
+     * Sets the listener AudioEffect notifies when the effect engine control is
+     * taken or returned.
+     *
+     * @param listener
+     */
+    public void setControlStatusListener(OnControlStatusChangeListener listener) {
+        synchronized (mListenerLock) {
+            mControlChangeStatusListener = listener;
+        }
+        if ((listener != null) && (mNativeEventHandler == null)) {
+            createNativeEventHandler();
+        }
+    }
+
+    /**
+     * Sets the listener AudioEffect notifies when a parameter is changed.
+     *
+     * @param listener
+     */
+    public void setParameterListener(OnParameterChangeListener listener) {
+        synchronized (mListenerLock) {
+            mParameterChangeListener = listener;
+        }
+        if ((listener != null) && (mNativeEventHandler == null)) {
+            createNativeEventHandler();
+        }
+    }
+
+    // Convenience method for the creation of the native event handler
+    // It is called only when a non-null event listener is set.
+    // precondition:
+    // mNativeEventHandler is null
+    private void createNativeEventHandler() {
+        Looper looper;
+        if ((looper = Looper.myLooper()) != null) {
+            mNativeEventHandler = new NativeEventHandler(this, looper);
+        } else if ((looper = Looper.getMainLooper()) != null) {
+            mNativeEventHandler = new NativeEventHandler(this, looper);
+        } else {
+            mNativeEventHandler = null;
+        }
+    }
+
+    // ---------------------------------------------------------
+    // Interface definitions
+    // --------------------
+    /**
+     * The OnParameterChangeListener interface defines a method called by the AudioEffect
+     * when a the enabled state of the effect engine was changed by the controlling application.
+     */
+    public interface OnEnableStatusChangeListener {
+        /**
+         * Called on the listener to notify it that the effect engine has been
+         * enabled or disabled.
+         * @param effect the effect on which the interface is registered.
+         * @param enabled new effect state.
+         */
+        void onEnableStatusChange(AudioEffect effect, boolean enabled);
+    }
+
+    /**
+     * The OnControlStatusChangeListener interface defines a method called by the AudioEffect
+     * when a the control of the effect engine is gained or lost by the application
+     */
+    public interface OnControlStatusChangeListener {
+        /**
+         * Called on the listener to notify it that the effect engine control
+         * has been taken or returned.
+         * @param effect the effect on which the interface is registered.
+         * @param controlGranted true if the application has been granted control of the effect
+         * engine, false otherwise.
+         */
+        void onControlStatusChange(AudioEffect effect, boolean controlGranted);
+    }
+
+    /**
+     * The OnParameterChangeListener interface defines a method called by the AudioEffect
+     * when a parameter is changed in the effect engine by the controlling application.
+     */
+    public interface OnParameterChangeListener {
+        /**
+         * Called on the listener to notify it that a parameter value has changed.
+         * @param effect the effect on which the interface is registered.
+         * @param status status of the set parameter operation.
+         * @param param ID of the modified parameter.
+         * @param value the new parameter value.
+         */
+        void onParameterChange(AudioEffect effect, int status, byte[] param,
+                byte[] value);
+    }
+
+    // ---------------------------------------------------------
+    // Inner classes
+    // --------------------
+    /**
+     * Helper class to handle the forwarding of native events to the appropriate
+     * listeners
+     */
+    private class NativeEventHandler extends Handler {
+        private AudioEffect mAudioEffect;
+
+        public NativeEventHandler(AudioEffect ae, Looper looper) {
+            super(looper);
+            mAudioEffect = ae;
+        }
+
+        @Override
+        public void handleMessage(Message msg) {
+            if (mAudioEffect == null) {
+                return;
+            }
+            switch (msg.what) {
+            case NATIVE_EVENT_ENABLED_STATUS:
+                OnEnableStatusChangeListener enableStatusChangeListener = null;
+                synchronized (mListenerLock) {
+                    enableStatusChangeListener = mAudioEffect.mEnableStatusChangeListener;
+                }
+                if (enableStatusChangeListener != null) {
+                    enableStatusChangeListener.onEnableStatusChange(
+                            mAudioEffect, (boolean) (msg.arg1 != 0));
+                }
+                break;
+            case NATIVE_EVENT_CONTROL_STATUS:
+                OnControlStatusChangeListener controlStatusChangeListener = null;
+                synchronized (mListenerLock) {
+                    controlStatusChangeListener = mAudioEffect.mControlChangeStatusListener;
+                }
+                if (controlStatusChangeListener != null) {
+                    controlStatusChangeListener.onControlStatusChange(
+                            mAudioEffect, (boolean) (msg.arg1 != 0));
+                }
+                break;
+            case NATIVE_EVENT_PARAMETER_CHANGED:
+                OnParameterChangeListener parameterChangeListener = null;
+                synchronized (mListenerLock) {
+                    parameterChangeListener = mAudioEffect.mParameterChangeListener;
+                }
+                if (parameterChangeListener != null) {
+                    // arg1 contains offset of parameter value from start of
+                    // byte array
+                    int vOffset = msg.arg1;
+                    byte[] p = (byte[]) msg.obj;
+                    // See effect_param_t in EffectApi.h for psize and vsize
+                    // fields offsets
+                    int status = byteArrayToInt(p, 0);
+                    int psize = byteArrayToInt(p, 4);
+                    int vsize = byteArrayToInt(p, 8);
+                    byte[] param = new byte[psize];
+                    byte[] value = new byte[vsize];
+                    System.arraycopy(p, 12, param, 0, psize);
+                    System.arraycopy(p, vOffset, value, 0, vsize);
+
+                    parameterChangeListener.onParameterChange(mAudioEffect,
+                            status, param, value);
+                }
+                break;
+
+            default:
+                Log.e(TAG, "handleMessage() Unknown event type: " + msg.what);
+                break;
+            }
+        }
+    }
+
+    // ---------------------------------------------------------
+    // Java methods called from the native side
+    // --------------------
+    @SuppressWarnings("unused")
+    private static void postEventFromNative(Object effect_ref, int what,
+            int arg1, int arg2, Object obj) {
+        AudioEffect effect = (AudioEffect) ((WeakReference) effect_ref).get();
+        if (effect == null) {
+            return;
+        }
+
+        if (effect.mNativeEventHandler != null) {
+            Message m = effect.mNativeEventHandler.obtainMessage(what, arg1,
+                    arg2, obj);
+            effect.mNativeEventHandler.sendMessage(m);
+        }
+
+    }
+
+    // ---------------------------------------------------------
+    // Native methods called from the Java side
+    // --------------------
+
+    private static native final void native_init();
+
+    private native final int native_setup(Object audioeffect_this, String type,
+            String uuid, int priority, int audioSession, int[] id, Object[] desc);
+
+    private native final void native_finalize();
+
+    private native final void native_release();
+
+    private native final int native_setEnabled(boolean enabled);
+
+    private native final boolean native_getEnabled();
+
+    private native final boolean native_hasControl();
+
+    private native final int native_setParameter(int psize, byte[] param,
+            int vsize, byte[] value);
+
+    private native final int native_getParameter(int psize, byte[] param,
+            int[] vsize, byte[] value);
+
+    private native final int native_command(int cmdCode, int cmdSize,
+            byte[] cmdData, int[] repSize, byte[] repData);
+
+    private static native Object[] native_query_effects();
+
+    // ---------------------------------------------------------
+    // Utility methods
+    // ------------------
+
+    protected void checkState(String methodName) throws IllegalStateException {
+        synchronized (mStateLock) {
+            if (mState != STATE_INITIALIZED) {
+                throw (new IllegalStateException(methodName
+                        + " called on uninitialized AudioEffect."));
+            }
+        }
+    }
+
+    protected void checkStatus(int status) {
+        switch (status) {
+        case AudioEffect.SUCCESS:
+            break;
+        case AudioEffect.ERROR_BAD_VALUE:
+            throw (new IllegalArgumentException(
+                    "AudioEffect: bad parameter value"));
+        case AudioEffect.ERROR_INVALID_OPERATION:
+            throw (new UnsupportedOperationException(
+                    "AudioEffect: invalid parameter operation"));
+        default:
+            throw (new RuntimeException("AudioEffect: set/get parameter error"));
+        }
+    }
+
+    protected int byteArrayToInt(byte[] valueBuf) {
+        return byteArrayToInt(valueBuf, 0);
+
+    }
+
+    protected int byteArrayToInt(byte[] valueBuf, int offset) {
+        ByteBuffer converter = ByteBuffer.wrap(valueBuf);
+        converter.order(ByteOrder.nativeOrder());
+        return converter.getInt(offset);
+
+    }
+
+    protected byte[] intToByteArray(int value) {
+        ByteBuffer converter = ByteBuffer.allocate(4);
+        converter.order(ByteOrder.nativeOrder());
+        converter.putInt(value);
+        return converter.array();
+    }
+
+    protected short byteArrayToShort(byte[] valueBuf) {
+        return byteArrayToShort(valueBuf, 0);
+    }
+
+    protected short byteArrayToShort(byte[] valueBuf, int offset) {
+        ByteBuffer converter = ByteBuffer.wrap(valueBuf);
+        converter.order(ByteOrder.nativeOrder());
+        return converter.getShort(offset);
+
+    }
+
+    protected byte[] shortToByteArray(short value) {
+        ByteBuffer converter = ByteBuffer.allocate(2);
+        converter.order(ByteOrder.nativeOrder());
+        short sValue = (short) value;
+        converter.putShort(sValue);
+        return converter.array();
+    }
+
+    protected byte[] concatArrays(byte[]... arrays) {
+        int len = 0;
+        for (byte[] a : arrays) {
+            len += a.length;
+        }
+        byte[] b = new byte[len];
+
+        int offs = 0;
+        for (byte[] a : arrays) {
+            System.arraycopy(a, 0, b, offs, a.length);
+            offs += a.length;
+        }
+        return b;
+    }
+
+}
diff --git a/media/java/android/media/AudioService.java b/media/java/android/media/AudioService.java
index 08fc782..9212708 100644
--- a/media/java/android/media/AudioService.java
+++ b/media/java/android/media/AudioService.java
@@ -1103,16 +1103,20 @@
     private BluetoothHeadset.ServiceListener mBluetoothHeadsetServiceListener =
         new BluetoothHeadset.ServiceListener() {
         public void onServiceConnected() {
-            if (mBluetoothHeadset != null &&
-                mBluetoothHeadset.getState() == BluetoothHeadset.STATE_CONNECTED) {
-                mBluetoothHeadsetConnected = true;
+            if (mBluetoothHeadset != null) {
+                BluetoothDevice device = mBluetoothHeadset.getCurrentHeadset();
+                if (mBluetoothHeadset.getState(device) == BluetoothHeadset.STATE_CONNECTED) {
+                    mBluetoothHeadsetConnected = true;
+                }
             }
         }
         public void onServiceDisconnected() {
-            if (mBluetoothHeadset != null &&
-                mBluetoothHeadset.getState() == BluetoothHeadset.STATE_DISCONNECTED) {
-                mBluetoothHeadsetConnected = false;
-                clearAllScoClients();
+            if (mBluetoothHeadset != null) {
+                BluetoothDevice device = mBluetoothHeadset.getCurrentHeadset();
+                if (mBluetoothHeadset.getState(device) == BluetoothHeadset.STATE_DISCONNECTED) {
+                    mBluetoothHeadsetConnected = false;
+                    clearAllScoClients();
+                }
             }
         }
     };
@@ -1634,6 +1638,12 @@
 
                 case MSG_MEDIA_SERVER_STARTED:
                     Log.e(TAG, "Media server started.");
+                    // indicate to audio HAL that we start the reconfiguration phase after a media
+                    // server crash
+                    // Note that MSG_MEDIA_SERVER_STARTED message is only received when the media server
+                    // process restarts after a crash, not the first time it is started.
+                    AudioSystem.setParameters("restarting=true");
+
                     // Restore device connection states
                     Set set = mConnectedDevices.entrySet();
                     Iterator i = set.iterator();
@@ -1667,6 +1677,9 @@
 
                     // Restore ringer mode
                     setRingerModeInt(getRingerMode(), false);
+
+                    // indicate the end of reconfiguration phase to audio HAL
+                    AudioSystem.setParameters("restarting=false");
                     break;
 
                 case MSG_PLAY_SOUND_EFFECT:
diff --git a/media/java/android/media/AudioTrack.java b/media/java/android/media/AudioTrack.java
index 1e8d72f..079c41f 100644
--- a/media/java/android/media/AudioTrack.java
+++ b/media/java/android/media/AudioTrack.java
@@ -210,6 +210,10 @@
      * @see AudioFormat#ENCODING_PCM_16BIT
      */
     private int mAudioFormat = AudioFormat.ENCODING_PCM_16BIT;
+    /**
+     * Audio session ID
+     */
+    private int mSessionId = 0;
 
 
     //--------------------------------
@@ -258,6 +262,48 @@
     public AudioTrack(int streamType, int sampleRateInHz, int channelConfig, int audioFormat,
             int bufferSizeInBytes, int mode)
     throws IllegalArgumentException {
+        this(streamType, sampleRateInHz, channelConfig, audioFormat,
+                bufferSizeInBytes, mode, 0);
+    }
+
+    /**
+     * Class constructor with audio session. Use this constructor when the AudioTrack must be
+     * attached to a particular audio session. The primary use of the audio session ID is to
+     * associate audio effects to a particular instance of AudioTrack: if an audio session ID
+     * is provided when creating an AudioEffect, this effect will be applied only to audio tracks
+     * and media players in the same session and not to the output mix.
+     * When an AudioTrack is created without specifying a session, it will create its own session
+     * which can be retreived by calling the {@link #getAudioSessionId()} method.
+     * If a session ID is provided, this AudioTrack will share effects attached to this session
+     * with all other media players or audio tracks in the same session.
+     * @param streamType the type of the audio stream. See
+     *   {@link AudioManager#STREAM_VOICE_CALL}, {@link AudioManager#STREAM_SYSTEM},
+     *   {@link AudioManager#STREAM_RING}, {@link AudioManager#STREAM_MUSIC} and
+     *   {@link AudioManager#STREAM_ALARM}
+     * @param sampleRateInHz the sample rate expressed in Hertz. Examples of rates are (but
+     *   not limited to) 44100, 22050 and 11025.
+     * @param channelConfig describes the configuration of the audio channels.
+     *   See {@link AudioFormat#CHANNEL_OUT_MONO} and
+     *   {@link AudioFormat#CHANNEL_OUT_STEREO}
+     * @param audioFormat the format in which the audio data is represented.
+     *   See {@link AudioFormat#ENCODING_PCM_16BIT} and
+     *   {@link AudioFormat#ENCODING_PCM_8BIT}
+     * @param bufferSizeInBytes the total size (in bytes) of the buffer where audio data is read
+     *   from for playback. If using the AudioTrack in streaming mode, you can write data into
+     *   this buffer in smaller chunks than this size. If using the AudioTrack in static mode,
+     *   this is the maximum size of the sound that will be played for this instance.
+     *   See {@link #getMinBufferSize(int, int, int)} to determine the minimum required buffer size
+     *   for the successful creation of an AudioTrack instance in streaming mode. Using values
+     *   smaller than getMinBufferSize() will result in an initialization failure.
+     * @param mode streaming or static buffer. See {@link #MODE_STATIC} and {@link #MODE_STREAM}
+     * @param sessionId Id of audio session the AudioTrack must be attached to
+     * @throws java.lang.IllegalArgumentException
+     // FIXME: unhide.
+     * @hide
+     */
+    public AudioTrack(int streamType, int sampleRateInHz, int channelConfig, int audioFormat,
+            int bufferSizeInBytes, int mode, int sessionId)
+    throws IllegalArgumentException {
         mState = STATE_UNINITIALIZED;
         
         // remember which looper is associated with the AudioTrack instanciation
@@ -269,15 +315,23 @@
 
         audioBuffSizeCheck(bufferSizeInBytes);
 
+        if (sessionId < 0) {
+            throw (new IllegalArgumentException("Invalid audio session ID: "+sessionId));
+        }
+
+        int[] session = new int[1];
+        session[0] = sessionId;
         // native initialization
         int initResult = native_setup(new WeakReference<AudioTrack>(this),
                 mStreamType, mSampleRate, mChannels, mAudioFormat,
-                mNativeBufferSizeInBytes, mDataLoadMode);
+                mNativeBufferSizeInBytes, mDataLoadMode, session);
         if (initResult != SUCCESS) {
             loge("Error code "+initResult+" when initializing AudioTrack.");
             return; // with mState == STATE_UNINITIALIZED
         }
 
+        mSessionId = session[0];
+
         if (mDataLoadMode == MODE_STATIC) {
             mState = STATE_NO_STATIC_DATA;
         } else {
@@ -590,6 +644,17 @@
         }
     }
 
+    /**
+     * Returns the audio session ID.
+     *
+     * @return the ID of the audio session this AudioTrack belongs to.
+     // FIXME: unhide.
+     // FIXME: link to AudioEffect class when public.
+     * @hide
+     */
+    public int getAudioSessionId() {
+        return mSessionId;
+    }
 
     //--------------------------------------------------------------------------
     // Initialization / configuration
@@ -1012,7 +1077,7 @@
 
     private native final int native_setup(Object audiotrack_this,
             int streamType, int sampleRate, int nbChannels, int audioFormat,
-            int buffSizeInBytes, int mode);
+            int buffSizeInBytes, int mode, int[] sessionId);
 
     private native final void native_finalize();
 
@@ -1056,6 +1121,7 @@
     static private native final int native_get_min_buff_size(
             int sampleRateInHz, int channelConfig, int audioFormat);
 
+    private native final int native_get_session_id();
 
     //---------------------------------------------------------
     // Utility methods
diff --git a/media/java/android/media/BassBoost.java b/media/java/android/media/BassBoost.java
new file mode 100644
index 0000000..ef4ce05
--- /dev/null
+++ b/media/java/android/media/BassBoost.java
@@ -0,0 +1,213 @@
+/*
+ * Copyright (C) 2009 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package android.media;
+
+import android.app.Activity;
+import android.content.Context;
+import android.content.Intent;
+import android.os.Bundle;
+import android.util.Log;
+import java.nio.ByteOrder;
+import java.nio.ByteBuffer;
+import java.nio.CharBuffer;
+
+import android.media.AudioEffect;
+
+/**
+ * Bass boost is an audio effect to boost or amplify low frequencies of the sound. It is comparable
+ * to an simple equalizer but limited to one band amplification in the low frequency range.
+ * <p>An application creates a BassBoost object to instantiate and control a bass boost engine
+ * in the audio framework.
+ * <p>The methods, parameter types and units exposed by the BassBoost implementation are directly
+ * mapping those defined by the OpenSL ES 1.0.1 Specification (http://www.khronos.org/opensles/)
+ * for the SLBassBoostItf interface. Please refer to this specification for more details.
+ * <p>To attach the BassBoost to a particular AudioTrack or MediaPlayer, specify the audio session
+ * ID of this AudioTrack or MediaPlayer when constructing the BassBoost. If the audio session ID 0
+ * is specified, the BassBoost applies to the main audio output mix.
+ // TODO when AudioEffect is unhidden
+ // <p> See {_at_link android.media.AudioEffect} class for more details on controlling audio effects.
+ *
+ * {@hide Pending API council review}
+ */
+
+public class BassBoost extends AudioEffect {
+
+    private final static String TAG = "BassBoost";
+
+    // These constants must be synchronized with those in
+    // frameworks/base/include/media/EffectBassBoostApi.h
+    /**
+     * Is strength parameter supported by bass boost engine. Parameter ID for getParameter().
+     */
+    public static final int PARAM_STRENGTH_SUPPORTED = 0;
+    /**
+     * Bass boost effect strength. Parameter ID for
+     * {@link android.media.BassBoost.OnParameterChangeListener}
+     */
+    public static final int PARAM_STRENGTH = 1;
+
+    /**
+     * Indicates if strength parameter is supported by the bass boost engine
+     */
+    private boolean mStrengthSupported = false;
+
+    /**
+     * Registered listener for parameter changes.
+     */
+    private OnParameterChangeListener mParamListener = null;
+
+    /**
+     * Listener used internally to to receive raw parameter change event from AudioEffect super class
+     */
+    private BaseParameterListener mBaseParamListener = null;
+
+    /**
+     * Lock for access to mParamListener
+     */
+    private final Object mParamListenerLock = new Object();
+
+    /**
+     * Class constructor.
+     * @param priority the priority level requested by the application for controlling the BassBoost
+     * engine. As the same engine can be shared by several applications, this parameter indicates
+     * how much the requesting application needs control of effect parameters. The normal priority
+     * is 0, above normal is a positive number, below normal a negative number.
+     * @param audioSession  System wide unique audio session identifier. If audioSession
+     *  is not 0, the BassBoost will be attached to the MediaPlayer or AudioTrack in the
+     *  same audio session. Otherwise, the BassBoost will apply to the output mix.
+     *
+     * @throws java.lang.IllegalStateException
+     * @throws java.lang.IllegalArgumentException
+     * @throws java.lang.UnsupportedOperationException
+     * @throws java.lang.RuntimeException
+     */
+    public BassBoost(int priority, int audioSession)
+    throws IllegalStateException, IllegalArgumentException,
+           UnsupportedOperationException, RuntimeException {
+        super(EFFECT_TYPE_BASS_BOOST, EFFECT_TYPE_NULL, priority, audioSession);
+
+        short[] value = new short[1];
+        checkStatus(getParameter(PARAM_STRENGTH_SUPPORTED, value));
+        mStrengthSupported = (value[0] != 0);
+    }
+
+    /**
+     * Indicates whether setting strength is supported. If this method returns false, only one
+     * strength is supported and the setStrength() method always rounds to that value.
+     * @return true is strength parameter is supported, false otherwise
+     */
+    public boolean getStrengthSupported() {
+       return mStrengthSupported;
+    }
+
+    /**
+     * Sets the strength of the bass boost effect. If the implementation does not support per mille
+     * accuracy for setting the strength, it is allowed to round the given strength to the nearest
+     * supported value. You can use the {@link #getRoundedStrength()} method to query the
+     * (possibly rounded) value that was actually set.
+     * @param strength Strength of the effect. The valid range for strength strength is [0, 1000],
+     * where 0 per mille designates the mildest effect and 1000 per mille designates the strongest.
+     * @throws IllegalStateException
+     * @throws IllegalArgumentException
+     * @throws UnsupportedOperationException
+     */
+    public void setStrength(short strength)
+    throws IllegalStateException, IllegalArgumentException, UnsupportedOperationException {
+        checkStatus(setParameter(PARAM_STRENGTH, strength));
+    }
+
+    /**
+     * Gets the current strength of the effect.
+     * @return The strength of the effect. The valid range for strength is [0, 1000], where 0 per
+     * mille designates the mildest effect and 1000 per mille the strongest
+     * @throws IllegalStateException
+     * @throws IllegalArgumentException
+     * @throws UnsupportedOperationException
+     */
+    public short getRoundedStrength()
+    throws IllegalStateException, IllegalArgumentException, UnsupportedOperationException {
+        short[] value = new short[1];
+        checkStatus(getParameter(PARAM_STRENGTH, value));
+        return value[0];
+    }
+
+    /**
+     * The OnParameterChangeListener interface defines a method called by the BassBoost when a
+     * parameter value has changed.
+     */
+    public interface OnParameterChangeListener  {
+        /**
+         * Method called when a parameter value has changed. The method is called only if the
+         * parameter was changed by another application having the control of the same
+         * BassBoost engine.
+         * @param effect the BassBoost on which the interface is registered.
+         * @param status status of the set parameter operation.
+         // TODO when AudioEffect is unhidden
+         // See {_at_link android.media.AudioEffect#setParameter(byte[], byte[])}.
+         * @param param ID of the modified parameter. See {@link #PARAM_STRENGTH} ...
+         * @param value the new parameter value.
+         */
+        void onParameterChange(BassBoost effect, int status, int param, short value);
+    }
+
+    /**
+     * Listener used internally to receive unformatted parameter change events from AudioEffect
+     * super class.
+     */
+    private class BaseParameterListener implements AudioEffect.OnParameterChangeListener {
+        private BaseParameterListener() {
+
+        }
+        public void onParameterChange(AudioEffect effect, int status, byte[] param, byte[] value) {
+            OnParameterChangeListener l = null;
+
+            synchronized (mParamListenerLock) {
+                if (mParamListener != null) {
+                    l = mParamListener;
+                }
+            }
+            if (l != null) {
+                int p = -1;
+                short v = -1;
+
+                if (param.length == 4) {
+                    p = byteArrayToInt(param, 0);
+                }
+                if (value.length == 2) {
+                    v = byteArrayToShort(value, 0);
+                }
+                if (p != -1 && v != -1) {
+                    l.onParameterChange(BassBoost.this, status, p, v);
+                }
+            }
+        }
+    }
+
+    /**
+     * Registers an OnParameterChangeListener interface.
+     * @param listener OnParameterChangeListener interface registered
+     */
+    public void setParameterListener(OnParameterChangeListener listener) {
+        synchronized (mParamListenerLock) {
+            if (mParamListener == null) {
+                mParamListener = listener;
+                mBaseParamListener = new BaseParameterListener();
+                super.setParameterListener(mBaseParamListener);
+            }
+        }
+    }
+}
diff --git a/media/java/android/media/CamcorderProfile.java b/media/java/android/media/CamcorderProfile.java
index 64d6460..a27df57 100644
--- a/media/java/android/media/CamcorderProfile.java
+++ b/media/java/android/media/CamcorderProfile.java
@@ -119,15 +119,26 @@
     public int audioChannels;
 
     /**
-     * Returns the camcorder profile for the given quality level.
+     * Returns the camcorder profile for the default camera at the given
+     * quality level.
      * @param quality the target quality level for the camcorder profile
      */
     public static CamcorderProfile get(int quality) {
+        return get(0, quality);
+    }
+
+    /**
+     * Returns the camcorder profile for the given camera at the given
+     * quality level.
+     * @param cameraId the id for the camera
+     * @param quality the target quality level for the camcorder profile
+     */
+    public static CamcorderProfile get(int cameraId, int quality) {
         if (quality < QUALITY_LOW || quality > QUALITY_HIGH) {
             String errMessage = "Unsupported quality level: " + quality;
             throw new IllegalArgumentException(errMessage);
         }
-        return native_get_camcorder_profile(quality);
+        return native_get_camcorder_profile(cameraId, quality);
     }
 
     static {
@@ -165,5 +176,6 @@
 
     // Methods implemented by JNI
     private static native final void native_init();
-    private static native final CamcorderProfile native_get_camcorder_profile(int quality);
+    private static native final CamcorderProfile native_get_camcorder_profile(
+            int cameraId, int quality);
 }
diff --git a/media/java/android/media/CameraProfile.java b/media/java/android/media/CameraProfile.java
index f8d3935..6a0be08 100644
--- a/media/java/android/media/CameraProfile.java
+++ b/media/java/android/media/CameraProfile.java
@@ -17,6 +17,7 @@
 package android.media;
 
 import java.util.Arrays;
+import java.util.HashMap;
 
 /**
  * The CameraProfile class is used to retrieve the pre-defined still image
@@ -40,36 +41,55 @@
     /*
      * Cache the Jpeg encoding quality parameters
      */
-    private static final int[] sJpegEncodingQualityParameters;
+    private static final HashMap<Integer, int[]> sCache = new HashMap<Integer, int[]>();
 
     /**
      * Returns a pre-defined still image capture (jpeg) quality level
-     * used for the given quality level in the Camera application.
+     * used for the given quality level in the Camera application for
+     * the default camera.
      *
      * @param quality The target quality level
      */
     public static int getJpegEncodingQualityParameter(int quality) {
+        return getJpegEncodingQualityParameter(0, quality);
+    }
+
+    /**
+     * Returns a pre-defined still image capture (jpeg) quality level
+     * used for the given quality level in the Camera application for
+     * the specified camera.
+     *
+     * @param cameraId The id of the camera
+     * @param quality The target quality level
+     */
+    public static int getJpegEncodingQualityParameter(int cameraId, int quality) {
         if (quality < QUALITY_LOW || quality > QUALITY_HIGH) {
             throw new IllegalArgumentException("Unsupported quality level: " + quality);
         }
-        return sJpegEncodingQualityParameters[quality];
+        synchronized (sCache) {
+            int[] levels = sCache.get(cameraId);
+            if (levels == null) {
+                levels = getImageEncodingQualityLevels(cameraId);
+                sCache.put(cameraId, levels);
+            }
+            return levels[quality];
+        }
     }
 
     static {
         System.loadLibrary("media_jni");
         native_init();
-        sJpegEncodingQualityParameters = getImageEncodingQualityLevels();
     }
 
-    private static int[] getImageEncodingQualityLevels() {
-        int nLevels = native_get_num_image_encoding_quality_levels();
+    private static int[] getImageEncodingQualityLevels(int cameraId) {
+        int nLevels = native_get_num_image_encoding_quality_levels(cameraId);
         if (nLevels != QUALITY_HIGH + 1) {
             throw new RuntimeException("Unexpected Jpeg encoding quality levels " + nLevels);
         }
 
         int[] levels = new int[nLevels];
         for (int i = 0; i < nLevels; ++i) {
-            levels[i] = native_get_image_encoding_quality_level(i);
+            levels[i] = native_get_image_encoding_quality_level(cameraId, i);
         }
         Arrays.sort(levels);  // Lower quality level ALWAYS comes before higher one
         return levels;
@@ -77,6 +97,6 @@
 
     // Methods implemented by JNI
     private static native final void native_init();
-    private static native final int native_get_num_image_encoding_quality_levels();
-    private static native final int native_get_image_encoding_quality_level(int index);
+    private static native final int native_get_num_image_encoding_quality_levels(int cameraId);
+    private static native final int native_get_image_encoding_quality_level(int cameraId, int index);
 }
diff --git a/media/java/android/media/EnvironmentalReverb.java b/media/java/android/media/EnvironmentalReverb.java
new file mode 100644
index 0000000..88230fc
--- /dev/null
+++ b/media/java/android/media/EnvironmentalReverb.java
@@ -0,0 +1,504 @@
+/*
+ * Copyright (C) 2009 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package android.media;
+
+import android.app.Activity;
+import android.content.Context;
+import android.content.Intent;
+import android.os.Bundle;
+import android.util.Log;
+import java.nio.ByteOrder;
+import java.nio.ByteBuffer;
+
+import android.media.AudioEffect;
+
+/**
+ * A sound generated within a room travels in many directions. The listener first hears the
+ * direct sound from the source itself. Later, he or she hears discrete echoes caused by sound
+ * bouncing off nearby walls, the ceiling and the floor. As sound waves arrive after
+ * undergoing more and more reflections, individual reflections become indistinguishable and
+ * the listener hears continuous reverberation that decays over time.
+ * Reverb is vital for modeling a listener's environment. It can be used in music applications
+ * to simulate music being played back in various environments, or in games to immerse the
+ * listener within the game's environment.
+ * The EnvironmentalReverb class allows an application to control each reverb engine property in a
+ * global reverb environment and is more suitable for games. For basic control, more suitable for
+ * music applications, it is recommended to use the
+ // TODO when PresetReverb is unhidden
+ // {_at_link android.media.PresetReverb} class.
+ * <p>An application creates a EnvironmentalReverb object to instantiate and control a reverb engine
+ * in the audio framework.
+ * <p>The methods, parameter types and units exposed by the EnvironmentalReverb implementation are
+ * directly mapping those defined by the OpenSL ES 1.0.1 Specification
+ * (http://www.khronos.org/opensles/) for the SLEnvironmentalReverbItf interface.
+ * Please refer to this specification for more details.
+ * <p>The EnvironmentalReverb is an output mix auxiliary effect and should be created on
+ * Audio session 0. In order for a MediaPlayer or AudioTrack to be fed into this effect,
+ * they must be explicitely attached to it and a send level must be specified. Use the effect ID
+ * returned by getId() method to designate this particular effect when attaching it to the
+ * MediaPlayer or AudioTrack.
+ // TODO when AudioEffect is unhidden
+ // <p> See {_at_link android.media.AudioEffect} class for more details on controlling
+ * audio effects.
+ *
+ * {@hide Pending API council review}
+ */
+
+public class EnvironmentalReverb extends AudioEffect {
+
+    private final static String TAG = "EnvironmentalReverb";
+
+    // These constants must be synchronized with those in
+    // frameworks/base/include/media/EffectEnvironmentalReverbApi.h
+
+    /**
+     * Room level. Parameter ID for
+     * {@link android.media.EnvironmentalReverb.OnParameterChangeListener}
+     */
+    public static final int PARAM_ROOM_LEVEL = 0;
+    /**
+     * Room HF level. Parameter ID for OnParameterChangeListener
+     */
+    public static final int PARAM_ROOM_HF_LEVEL = 1;
+    /**
+     * Decay time. Parameter ID for OnParameterChangeListener
+     */
+    public static final int PARAM_DECAY_TIME = 2;
+    /**
+     * Decay HF ratio. Parameter ID for OnParameterChangeListener
+     */
+    public static final int PARAM_DECAY_HF_RATIO = 3;
+    /**
+     * Early reflections level. Parameter ID for OnParameterChangeListener
+     */
+    public static final int PARAM_REFLECTIONS_LEVEL = 4;
+    /**
+     * Early reflections delay. Parameter ID for OnParameterChangeListener
+     */
+    public static final int PARAM_REFLECTIONS_DELAY = 5;
+    /**
+     * Reverb level. Parameter ID for OnParameterChangeListener
+     */
+    public static final int PARAM_REVERB_LEVEL = 6;
+    /**
+     * Reverb delay. Parameter ID for OnParameterChangeListener
+     */
+    public static final int PARAM_REVERB_DELAY = 7;
+    /**
+     * Diffusion. Parameter ID for OnParameterChangeListener
+     */
+    public static final int PARAM_DIFFUSION = 8;
+    /**
+     * Density. Parameter ID for OnParameterChangeListener
+     */
+    public static final int PARAM_DENSITY = 9;
+
+    /**
+     * Registered listener for parameter changes
+     */
+    private OnParameterChangeListener mParamListener = null;
+
+    /**
+     * Listener used internally to to receive raw parameter change event from AudioEffect super
+     * class
+     */
+    private BaseParameterListener mBaseParamListener = null;
+
+    /**
+     * Lock for access to mParamListener
+     */
+    private final Object mParamListenerLock = new Object();
+
+    /**
+     * Class constructor.
+     * @param priority the priority level requested by the application for controlling the
+     * EnvironmentalReverb engine. As the same engine can be shared by several applications, this
+     * parameter indicates how much the requesting application needs control of effect parameters.
+     * The normal priority is 0, above normal is a positive number, below normal a negative number.
+     * @param audioSession  System wide unique audio session identifier. If audioSession
+     *  is not 0, the EnvironmentalReverb will be attached to the MediaPlayer or AudioTrack in the
+     *  same audio session. Otherwise, the EnvironmentalReverb will apply to the output mix.
+     *  As the EnvironmentalReverb is an auxiliary effect it is recommended to instantiate it on
+     *  audio session 0 and to attach it to the MediaPLayer auxiliary output.
+     *
+     * @throws java.lang.IllegalArgumentException
+     * @throws java.lang.UnsupportedOperationException
+     * @throws java.lang.RuntimeException
+     */
+    public EnvironmentalReverb(int priority, int audioSession)
+    throws IllegalArgumentException, UnsupportedOperationException, RuntimeException {
+        super(EFFECT_TYPE_ENV_REVERB, EFFECT_TYPE_NULL, priority, audioSession);
+        Log.e(TAG, "contructor");
+    }
+
+    /**
+     * Sets the master volume level of the environmental reverb effect.
+     * @param room Room level in millibels. The valid range is [-9000, 0].
+     * @throws IllegalStateException
+     * @throws IllegalArgumentException
+     * @throws UnsupportedOperationException
+     */
+    public void setRoomLevel(short room)
+    throws IllegalStateException, IllegalArgumentException, UnsupportedOperationException {
+        byte[] param = shortToByteArray(room);
+        checkStatus(setParameter(PARAM_ROOM_LEVEL, param));
+    }
+
+    /**
+     * Gets the master volume level of the environmental reverb effect.
+     * @return the room level in millibels.
+     * @throws IllegalStateException
+     * @throws IllegalArgumentException
+     * @throws UnsupportedOperationException
+     */
+    public short getRoomLevel()
+    throws IllegalStateException, IllegalArgumentException, UnsupportedOperationException {
+        byte[] param = new byte[2];
+        checkStatus(getParameter(PARAM_ROOM_LEVEL, param));
+        return byteArrayToShort(param);
+    }
+
+    /**
+     * Sets the volume level at 5 kHz relative to the volume level at low frequencies of the
+     * overall reverb effect.
+     * <p>This controls a low-pass filter that will reduce the level of the high-frequency.
+     * @param roomHF High frequency attenuation level in millibels. The valid range is [-9000, 0].
+     * @throws IllegalStateException
+     * @throws IllegalArgumentException
+     * @throws UnsupportedOperationException
+     */
+    public void setRoomHFLevel(short roomHF)
+    throws IllegalStateException, IllegalArgumentException, UnsupportedOperationException {
+        byte[] param = shortToByteArray(roomHF);
+        checkStatus(setParameter(PARAM_ROOM_HF_LEVEL, param));
+    }
+
+    /**
+     * Gets the room HF level.
+     * @return the room HF level in millibels.
+     * @throws IllegalStateException
+     * @throws IllegalArgumentException
+     * @throws UnsupportedOperationException
+     */
+    public short getRoomHFLevel()
+    throws IllegalStateException, IllegalArgumentException, UnsupportedOperationException {
+        byte[] param = new byte[2];
+        checkStatus(getParameter(PARAM_ROOM_HF_LEVEL, param));
+        return byteArrayToShort(param);
+    }
+
+    /**
+     * Sets the time taken for the level of reverberation to decay by 60 dB.
+     * @param decayTime Decay time in milliseconds. The valid range is [100, 20000].
+     * @throws IllegalStateException
+     * @throws IllegalArgumentException
+     * @throws UnsupportedOperationException
+     */
+    public void setDecayTime(int decayTime)
+    throws IllegalStateException, IllegalArgumentException, UnsupportedOperationException {
+        byte[] param = intToByteArray(decayTime);
+        checkStatus(setParameter(PARAM_DECAY_TIME, param));
+    }
+
+    /**
+     * Gets the decay time.
+     * @return the decay time in milliseconds.
+     * @throws IllegalStateException
+     * @throws IllegalArgumentException
+     * @throws UnsupportedOperationException
+     */
+    public int getDecayTime()
+    throws IllegalStateException, IllegalArgumentException, UnsupportedOperationException {
+        byte[] param = new byte[4];
+        checkStatus(getParameter(PARAM_DECAY_TIME, param));
+        return byteArrayToInt(param);
+    }
+
+    /**
+     * Sets the ratio of high frequency decay time (at 5 kHz) relative to the decay time at low
+     * frequencies.
+     * @param decayHFRatio High frequency decay ratio using a permille scale. The valid range is
+     * [100, 2000]. A ratio of 1000 indicates that all frequencies decay at the same rate.
+     * @throws IllegalStateException
+     * @throws IllegalArgumentException
+     * @throws UnsupportedOperationException
+     */
+    public void setDecayHFRatio(short decayHFRatio)
+    throws IllegalStateException, IllegalArgumentException, UnsupportedOperationException {
+        byte[] param = shortToByteArray(decayHFRatio);
+        checkStatus(setParameter(PARAM_DECAY_HF_RATIO, param));
+    }
+
+    /**
+     * Gets the ratio of high frequency decay time (at 5 kHz) relative to low frequencies.
+     * @return the decay HF ration. See {@link #setDecayHFRatio(short)} for units.
+     * @throws IllegalStateException
+     * @throws IllegalArgumentException
+     * @throws UnsupportedOperationException
+     */
+    public short getDecayHFRatio()
+    throws IllegalStateException, IllegalArgumentException, UnsupportedOperationException {
+        byte[] param = new byte[2];
+        checkStatus(getParameter(PARAM_DECAY_HF_RATIO, param));
+        return byteArrayToShort(param);
+    }
+
+    /**
+     * Sets the volume level of the early reflections.
+     * <p>This level is combined with the overall room level
+     * (set using {@link #setRoomLevel(short)}).
+     * @param reflectionsLevel Reflection level in millibels. The valid range is [-9000, 1000].
+     * @throws IllegalStateException
+     * @throws IllegalArgumentException
+     * @throws UnsupportedOperationException
+     */
+    public void setReflectionsLevel(short reflectionsLevel)
+    throws IllegalStateException, IllegalArgumentException, UnsupportedOperationException {
+        byte[] param = shortToByteArray(reflectionsLevel);
+        checkStatus(setParameter(PARAM_REFLECTIONS_LEVEL, param));
+    }
+
+    /**
+     * Gets the volume level of the early reflections.
+     * @return the early reflections level in millibels.
+     * @throws IllegalStateException
+     * @throws IllegalArgumentException
+     * @throws UnsupportedOperationException
+     */
+    public short getReflectionsLevel()
+    throws IllegalStateException, IllegalArgumentException, UnsupportedOperationException {
+        byte[] param = new byte[2];
+        checkStatus(getParameter(PARAM_REFLECTIONS_LEVEL, param));
+        return byteArrayToShort(param);
+    }
+
+    /**
+     * Sets the delay time for the early reflections.
+     * <p>This method sets the time between when the direct path is heard and when the first
+     * reflection is heard.
+     * @param reflectionsDelay Reflections delay in milliseconds. The valid range is [0, 300].
+     * @throws IllegalStateException
+     * @throws IllegalArgumentException
+     * @throws UnsupportedOperationException
+     */
+    public void setReflectionsDelay(int reflectionsDelay)
+    throws IllegalStateException, IllegalArgumentException, UnsupportedOperationException {
+        byte[] param = intToByteArray(reflectionsDelay);
+        checkStatus(setParameter(PARAM_REFLECTIONS_DELAY, param));
+    }
+
+    /**
+     * Gets the reflections delay.
+     * @return the early reflections delay in milliseconds.
+     * @throws IllegalStateException
+     * @throws IllegalArgumentException
+     * @throws UnsupportedOperationException
+     */
+    public int getReflectionsDelay()
+    throws IllegalStateException, IllegalArgumentException, UnsupportedOperationException {
+        byte[] param = new byte[4];
+        checkStatus(getParameter(PARAM_REFLECTIONS_DELAY, param));
+        return byteArrayToInt(param);
+    }
+
+    /**
+     * Sets the volume level of the late reverberation.
+     * <p>This level is combined with the overall room level (set using {@link #setRoomLevel(short)}).
+     * @param reverbLevel Reverb level in millibels. The valid range is [-9000, 2000].
+     * @throws IllegalStateException
+     * @throws IllegalArgumentException
+     * @throws UnsupportedOperationException
+     */
+    public void setReverbLevel(short reverbLevel)
+    throws IllegalStateException, IllegalArgumentException, UnsupportedOperationException {
+        byte[] param = shortToByteArray(reverbLevel);
+        checkStatus(setParameter(PARAM_REVERB_LEVEL, param));
+    }
+
+    /**
+     * Gets the reverb level.
+     * @return the reverb level in millibels.
+     * @throws IllegalStateException
+     * @throws IllegalArgumentException
+     * @throws UnsupportedOperationException
+     */
+    public short getReverbLevel()
+    throws IllegalStateException, IllegalArgumentException, UnsupportedOperationException {
+        byte[] param = new byte[2];
+        checkStatus(getParameter(PARAM_REVERB_LEVEL, param));
+        return byteArrayToShort(param);
+    }
+
+    /**
+     * Sets the time between the first reflection and the reverberation.
+     * @param reverbDelay Reverb delay in milliseconds. The valid range is [0, 100].
+     * @throws IllegalStateException
+     * @throws IllegalArgumentException
+     * @throws UnsupportedOperationException
+     */
+    public void setReverbDelay(int reverbDelay)
+    throws IllegalStateException, IllegalArgumentException, UnsupportedOperationException {
+        byte[] param = intToByteArray(reverbDelay);
+        checkStatus(setParameter(PARAM_REVERB_DELAY, param));
+    }
+
+    /**
+     * Gets the reverb delay.
+     * @return the reverb delay in milliseconds.
+     * @throws IllegalStateException
+     * @throws IllegalArgumentException
+     * @throws UnsupportedOperationException
+     */
+    public int getReverbDelay()
+    throws IllegalStateException, IllegalArgumentException, UnsupportedOperationException {
+        byte[] param = new byte[4];
+        checkStatus(getParameter(PARAM_REVERB_DELAY, param));
+        return byteArrayToInt(param);
+    }
+
+    /**
+     * Sets the echo density in the late reverberation decay.
+     * <p>The scale should approximately map linearly to the perceived change in reverberation.
+     * @param diffusion Diffusion specified using a permille scale. The diffusion valid range is
+     * [0, 1000]. A value of 1000 o/oo indicates a smooth reverberation decay.
+     * Values below this level give a more <i>grainy</i> character.
+     * @throws IllegalStateException
+     * @throws IllegalArgumentException
+     * @throws UnsupportedOperationException
+     */
+    public void setDiffusion(short diffusion)
+    throws IllegalStateException, IllegalArgumentException, UnsupportedOperationException {
+        byte[] param = shortToByteArray(diffusion);
+        checkStatus(setParameter(PARAM_DIFFUSION, param));
+    }
+
+    /**
+     * Gets diffusion level.
+     * @return the diffusion level. See {@link #setDiffusion(short)} for units.
+     * @throws IllegalStateException
+     * @throws IllegalArgumentException
+     * @throws UnsupportedOperationException
+     */
+    public short getDiffusion()
+    throws IllegalStateException, IllegalArgumentException, UnsupportedOperationException {
+        byte[] param = new byte[2];
+        checkStatus(getParameter(PARAM_DIFFUSION, param));
+        return byteArrayToShort(param);
+    }
+
+
+    /**
+     * Controls the modal density of the late reverberation decay.
+     * <p> The scale should approximately map linearly to the perceived change in reverberation.
+     * A lower density creates a hollow sound that is useful for simulating small reverberation
+     * spaces such as bathrooms.
+     * @param density Density specified using a permille scale. The valid range is [0, 1000].
+     * A value of 1000 o/oo indicates a natural sounding reverberation. Values below this level
+     * produce a more colored effect.
+     * @throws IllegalStateException
+     * @throws IllegalArgumentException
+     * @throws UnsupportedOperationException
+     */
+    public void setDensity(short density)
+    throws IllegalStateException, IllegalArgumentException, UnsupportedOperationException {
+        byte[] param = shortToByteArray(density);
+        checkStatus(setParameter(PARAM_DENSITY, param));
+    }
+
+    /**
+     * Gets the density level.
+     * @return the density level. See {@link #setDiffusion(short)} for units.
+     * @throws IllegalStateException
+     * @throws IllegalArgumentException
+     * @throws UnsupportedOperationException
+     */
+    public short getDensity()
+    throws IllegalStateException, IllegalArgumentException, UnsupportedOperationException {
+        byte[] param = new byte[2];
+        checkStatus(getParameter(PARAM_DENSITY, param));
+        return byteArrayToShort(param);
+    }
+
+
+    /**
+     * The OnParameterChangeListener interface defines a method called by the EnvironmentalReverb
+     * when a parameter value has changed.
+     */
+    public interface OnParameterChangeListener  {
+        /**
+         * Method called when a parameter value has changed. The method is called only if the
+         * parameter was changed by another application having the control of the same
+         * EnvironmentalReverb engine.
+         * @param effect the EnvironmentalReverb on which the interface is registered.
+         * @param status status of the set parameter operation.
+         // TODO when AudioEffect is unhidden
+         // See {_at_link android.media.AudioEffect#setParameter(byte[], byte[])}.
+         * @param param ID of the modified parameter. See {@link #PARAM_ROOM_LEVEL} ...
+         * @param value the new parameter value.
+         */
+        void onParameterChange(EnvironmentalReverb effect, int status, int param, int value);
+    }
+
+    /**
+     * Listener used internally to receive unformatted parameter change events from AudioEffect
+     * super class.
+     */
+    private class BaseParameterListener implements AudioEffect.OnParameterChangeListener {
+        private BaseParameterListener() {
+
+        }
+        public void onParameterChange(AudioEffect effect, int status, byte[] param, byte[] value) {
+            OnParameterChangeListener l = null;
+
+            synchronized (mParamListenerLock) {
+                if (mParamListener != null) {
+                    l = mParamListener;
+                }
+            }
+            if (l != null) {
+                int p = -1;
+                int v = -1;
+
+                if (param.length == 4) {
+                    p = byteArrayToInt(param, 0);
+                }
+                if (value.length == 2) {
+                    v = (int)byteArrayToShort(value, 0);
+                } else if (value.length == 4) {
+                    v = byteArrayToInt(value, 0);
+                }
+                if (p != -1 && v != -1) {
+                    l.onParameterChange(EnvironmentalReverb.this, status, p, v);
+                }
+            }
+        }
+    }
+
+    /**
+     * Registers an OnParameterChangeListener interface.
+     * @param listener OnParameterChangeListener interface registered
+     */
+    public void setParameterListener(OnParameterChangeListener listener) {
+        synchronized (mParamListenerLock) {
+            if (mParamListener == null) {
+                mParamListener = listener;
+                mBaseParamListener = new BaseParameterListener();
+                super.setParameterListener(mBaseParamListener);
+            }
+        }
+    }
+}
diff --git a/media/java/android/media/Equalizer.java b/media/java/android/media/Equalizer.java
new file mode 100644
index 0000000..082f694
--- /dev/null
+++ b/media/java/android/media/Equalizer.java
@@ -0,0 +1,443 @@
+/*
+ * Copyright (C) 2009 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package android.media;
+
+import android.app.Activity;
+import android.content.Context;
+import android.content.Intent;
+import android.os.Bundle;
+import android.util.Log;
+import java.nio.ByteOrder;
+import java.nio.ByteBuffer;
+import java.nio.CharBuffer;
+
+import android.media.AudioEffect;
+
+/**
+ * An Equalizer is used to alter the frequency response of a particular music source or of the main
+ * output mix.
+ * <p>An application creates an Equalizer object to instantiate and control an Equalizer engine
+ * in the audio framework. The application can either simply use predefined presets or have a more
+ * precise control of the gain in each frequency band controlled by the equalizer.
+ * <p>The methods, parameter types and units exposed by the Equalizer implementation are directly
+ * mapping those defined by the OpenSL ES 1.0.1 Specification (http://www.khronos.org/opensles/)
+ * for the SLEqualizerItf interface. Please refer to this specification for more details.
+ * <p>To attach the Equalizer to a particular AudioTrack or MediaPlayer, specify the audio session
+ * ID of this AudioTrack or MediaPlayer when constructing the Equalizer. If the audio session ID 0
+ * is specified, the Equalizer applies to the main audio output mix.
+ // TODO when AudioEffect is unhidden
+ // <p> See {_at_link android.media.AudioEffect} class for more details on controlling audio effects.
+ *
+ * {@hide Pending API council review}
+ */
+
+public class Equalizer extends AudioEffect {
+
+    private final static String TAG = "Equalizer";
+
+    // These constants must be synchronized with those in
+    // frameworks/base/include/media/EffectEqualizerApi.h
+    /**
+     * Number of bands. Parameter ID for {@link android.media.Equalizer.OnParameterChangeListener}
+     */
+    public static final int PARAM_NUM_BANDS = 0;
+    /**
+     * Band level range. Parameter ID for OnParameterChangeListener
+     */
+    public static final int PARAM_LEVEL_RANGE = 1;
+    /**
+     * Band level. Parameter ID for OnParameterChangeListener
+     */
+    public static final int PARAM_BAND_LEVEL = 2;
+    /**
+     * Band center frequency. Parameter ID for OnParameterChangeListener
+     */
+    public static final int PARAM_CENTER_FREQ = 3;
+    /**
+     * Band frequency range. Parameter ID for OnParameterChangeListener
+     */
+    public static final int PARAM_BAND_FREQ_RANGE = 4;
+    /**
+     * Band for a given frequency. Parameter ID for OnParameterChangeListener
+     */
+    public static final int PARAM_GET_BAND = 5;
+    /**
+     * Current preset. Parameter ID for OnParameterChangeListener
+     */
+    public static final int PARAM_CURRENT_PRESET = 6;
+    /**
+     * Request number of presets. Parameter ID for OnParameterChangeListener
+     */
+    public static final int PARAM_GET_NUM_OF_PRESETS = 7;
+    /**
+     * Request preset name. Parameter ID for OnParameterChangeListener
+     */
+    public static final int PARAM_GET_PRESET_NAME = 8;
+    /**
+     * maximum size for perset name
+     */
+    public static final int PARAM_STRING_SIZE_MAX = 32;
+
+    /**
+     * Number of presets implemented by Equalizer engine
+     */
+    private int mNumPresets;
+    /**
+     * Names of presets implemented by Equalizer engine
+     */
+    private String[] mPresetNames;
+
+    /**
+     * Registered listener for parameter changes.
+     */
+    private OnParameterChangeListener mParamListener = null;
+
+    /**
+     * Listener used internally to to receive raw parameter change event from AudioEffect super class
+     */
+    private BaseParameterListener mBaseParamListener = null;
+
+    /**
+     * Lock for access to mParamListener
+     */
+    private final Object mParamListenerLock = new Object();
+
+    /**
+     * Class constructor.
+     * @param priority the priority level requested by the application for controlling the Equalizer
+     * engine. As the same engine can be shared by several applications, this parameter indicates
+     * how much the requesting application needs control of effect parameters. The normal priority
+     * is 0, above normal is a positive number, below normal a negative number.
+     * @param audioSession  System wide unique audio session identifier. If audioSession
+     *  is not 0, the Equalizer will be attached to the MediaPlayer or AudioTrack in the
+     *  same audio session. Otherwise, the Equalizer will apply to the output mix.
+     *
+     * @throws java.lang.IllegalStateException
+     * @throws java.lang.IllegalArgumentException
+     * @throws java.lang.UnsupportedOperationException
+     * @throws java.lang.RuntimeException
+     */
+    public Equalizer(int priority, int audioSession)
+    throws IllegalStateException, IllegalArgumentException,
+           UnsupportedOperationException, RuntimeException {
+        super(EFFECT_TYPE_EQUALIZER, EFFECT_TYPE_NULL, priority, audioSession);
+
+        mNumPresets = (int)getNumberOfPresets();
+
+        if (mNumPresets != 0) {
+            mPresetNames = new String[mNumPresets];
+            byte[] value = new byte[PARAM_STRING_SIZE_MAX];
+            int[] param = new int[2];
+            param[0] = PARAM_GET_PRESET_NAME;
+            for (int i = 0; i < mNumPresets; i++) {
+                param[1] = i;
+                checkStatus(getParameter(param, value));
+                int length = 0;
+                while (value[length] != 0) length++;
+                try {
+                    mPresetNames[i] = new String(value, 0, length, "ISO-8859-1");
+                    Log.e(TAG, "preset #: "+i+" name: "+mPresetNames[i]+" length: "+length);
+                } catch (java.io.UnsupportedEncodingException e) {
+                    Log.e(TAG, "preset name decode error");
+                }
+            }
+        }
+    }
+
+    /**
+     * Gets the number of frequency bands supported by the Equalizer engine.
+     * @return the number of bands
+     * @throws IllegalStateException
+     * @throws IllegalArgumentException
+     * @throws UnsupportedOperationException
+     */
+    public short getNumberOfBands()
+    throws IllegalStateException, IllegalArgumentException, UnsupportedOperationException {
+        int[] param = new int[1];
+        param[0] = PARAM_NUM_BANDS;
+        short[] value = new short[1];
+        checkStatus(getParameter(param, value));
+        return value[0];
+    }
+
+    /**
+     * Gets the level range for use by {@link #setBandLevel(int,short)}. The level is expressed in
+     * milliBel.
+     * @return the band level range in an array of short integers. The first element is the lower
+     * limit of the range, the second element the upper limit.
+     * @throws IllegalStateException
+     * @throws IllegalArgumentException
+     * @throws UnsupportedOperationException
+     */
+    public short[] getBandLevelRange()
+    throws IllegalStateException, IllegalArgumentException, UnsupportedOperationException {
+        int[] param = new int[1];
+        int[] value = new int[2];
+        param[0] = PARAM_LEVEL_RANGE;
+        checkStatus(getParameter(param, value));
+
+        short[] result = new short[2];
+
+        result[0] = (short)value[0];
+        result[1] = (short)value[1];
+
+        return result;
+    }
+
+    /**
+     * Sets the given equalizer band to the given gain value.
+     * @param band Frequency band that will have the new gain. The numbering of the bands starts
+     * from 0 and ends at (number of bands - 1). See @see #getNumberOfBands().
+     * @param level New gain in millibels that will be set to the given band. getBandLevelRange()
+     * will define the maximum and minimum values.
+     * @throws IllegalStateException
+     * @throws IllegalArgumentException
+     * @throws UnsupportedOperationException
+     */
+    public void setBandLevel(int band, short level)
+    throws IllegalStateException, IllegalArgumentException, UnsupportedOperationException {
+        int[] param = new int[2];
+        int[] value = new int[1];
+
+        param[0] = PARAM_BAND_LEVEL;
+        param[1] = band;
+        value[0] = (int)level;
+        checkStatus(setParameter(param, value));
+    }
+
+    /**
+     * Gets the gain set for the given equalizer band.
+     * @param band Frequency band whose gain is requested. The numbering of the bands starts
+     * from 0 and ends at (number of bands - 1).
+     * @return Gain in millibels of the given band.
+     * @throws IllegalStateException
+     * @throws IllegalArgumentException
+     * @throws UnsupportedOperationException
+     */
+    public short getBandLevel(int band)
+    throws IllegalStateException, IllegalArgumentException, UnsupportedOperationException {
+        int[] param = new int[2];
+        int[] result = new int[1];
+
+        param[0] = PARAM_BAND_LEVEL;
+        param[1] = band;
+        checkStatus(getParameter(param, result));
+
+        return (short)result[0];
+    }
+
+
+    /**
+     * Gets the center frequency of the given band.
+     * @param band Frequency band whose center frequency is requested. The numbering of the bands
+     * starts from 0 and ends at (number of bands - 1).
+     * @return The center frequency in milliHertz
+     * @throws IllegalStateException
+     * @throws IllegalArgumentException
+     * @throws UnsupportedOperationException
+     */
+    public int getCenterFreq(int band)
+    throws IllegalStateException, IllegalArgumentException, UnsupportedOperationException {
+        int[] param = new int[2];
+        int[] result = new int[1];
+
+        param[0] = PARAM_CENTER_FREQ;
+        param[1] = band;
+        checkStatus(getParameter(param, result));
+
+        return result[0];
+    }
+
+    /**
+     * Gets the frequency range of the given frequency band.
+     * @param band Frequency band whose frequency range is requested. The numbering of the bands
+     * starts from 0 and ends at (number of bands - 1).
+     * @return The frequency range in millHertz in an array of integers. The first element is the
+     * lower limit of the range, the second element the upper limit.
+     * @throws IllegalStateException
+     * @throws IllegalArgumentException
+     * @throws UnsupportedOperationException
+     */
+    public int[] getBandFreqRange(int band)
+    throws IllegalStateException, IllegalArgumentException, UnsupportedOperationException {
+        int[] param = new int[2];
+        int[] result = new int[2];
+        param[0] = PARAM_BAND_FREQ_RANGE;
+        param[1] = band;
+        checkStatus(getParameter(param, result));
+
+        return result;
+    }
+
+    /**
+     * Gets the band that has the most effect on the given frequency.
+     * @param frequency Frequency in milliHertz which is to be equalized via the returned band.
+     * @return Frequency band that has most effect on the given frequency.
+     * @throws IllegalStateException
+     * @throws IllegalArgumentException
+     * @throws UnsupportedOperationException
+     */
+    public int getBand(int frequency)
+    throws IllegalStateException, IllegalArgumentException, UnsupportedOperationException {
+        int[] param = new int[2];
+        int[] result = new int[1];
+
+        param[0] = PARAM_GET_BAND;
+        param[1] = frequency;
+        checkStatus(getParameter(param, result));
+
+        return result[0];
+    }
+
+    /**
+     * Gets current preset.
+     * @return Preset that is set at the moment.
+     * @throws IllegalStateException
+     * @throws IllegalArgumentException
+     * @throws UnsupportedOperationException
+     */
+    public short getCurrentPreset()
+    throws IllegalStateException, IllegalArgumentException, UnsupportedOperationException {
+        int[] param = new int[1];
+        param[0] = PARAM_CURRENT_PRESET;
+        short[] value = new short[1];
+        checkStatus(getParameter(param, value));
+        return value[0];
+    }
+
+    /**
+     * Sets the equalizer according to the given preset.
+     * @param preset New preset that will be taken into use. The valid range is [0,
+     * number of presets-1]. See {@see #getNumberOfPresets()}.
+     * @throws IllegalStateException
+     * @throws IllegalArgumentException
+     * @throws UnsupportedOperationException
+     */
+    public void usePreset(short preset)
+    throws IllegalStateException, IllegalArgumentException, UnsupportedOperationException {
+        checkStatus(setParameter(PARAM_CURRENT_PRESET, preset));
+    }
+
+    /**
+     * Gets the total number of presets the equalizer supports. The presets will have indices
+     * [0, number of presets-1].
+     * @return The number of presets the equalizer supports.
+     * @throws IllegalStateException
+     * @throws IllegalArgumentException
+     * @throws UnsupportedOperationException
+     */
+    public short getNumberOfPresets()
+    throws IllegalStateException, IllegalArgumentException, UnsupportedOperationException {
+        int[] param = new int[1];
+        param[0] = PARAM_GET_NUM_OF_PRESETS;
+        short[] value = new short[1];
+        checkStatus(getParameter(param, value));
+        return value[0];
+    }
+
+    /**
+     * Gets the preset name based on the index.
+     * @param preset Index of the preset. The valid range is [0, number of presets-1].
+     * @return A string containing the name of the given preset.
+     * @throws IllegalStateException
+     * @throws IllegalArgumentException
+     * @throws UnsupportedOperationException
+     */
+    public String getPresetName(short preset)
+    {
+        if (preset >= 0 && preset < mNumPresets) {
+            return mPresetNames[preset];
+        } else {
+            return "";
+        }
+    }
+
+    /**
+     * The OnParameterChangeListener interface defines a method called by the Equalizer when a
+     * parameter value has changed.
+     */
+    public interface OnParameterChangeListener  {
+        /**
+         * Method called when a parameter value has changed. The method is called only if the
+         * parameter was changed by another application having the control of the same
+         * Equalizer engine.
+         * @param effect the Equalizer on which the interface is registered.
+         * @param status status of the set parameter operation.
+         // TODO when AudioEffect is unhidden
+         // See {_at_link android.media.AudioEffect#setParameter(byte[], byte[])}.
+         * @param param1 ID of the modified parameter. See {@link #PARAM_BAND_LEVEL} ...
+         * @param param2 additional parameter qualifier (e.g the band for band level parameter).
+         * @param value the new parameter value.
+         */
+        void onParameterChange(Equalizer effect, int status, int param1, int param2, int value);
+    }
+
+    /**
+     * Listener used internally to receive unformatted parameter change events from AudioEffect
+     * super class.
+     */
+    private class BaseParameterListener implements AudioEffect.OnParameterChangeListener {
+        private BaseParameterListener() {
+
+        }
+        public void onParameterChange(AudioEffect effect, int status, byte[] param, byte[] value) {
+            OnParameterChangeListener l = null;
+
+            synchronized (mParamListenerLock) {
+                if (mParamListener != null) {
+                    l = mParamListener;
+                }
+            }
+            if (l != null) {
+                int p1 = -1;
+                int p2 = -1;
+                int v = -1;
+
+                if (param.length >= 4) {
+                    p1 = byteArrayToInt(param, 0);
+                    if (param.length >= 8) {
+                        p2 = byteArrayToInt(param, 4);
+                    }
+                }
+                if (value.length == 2) {
+                    v = (int)byteArrayToShort(value, 0);;
+                } else if (value.length == 4) {
+                    v = byteArrayToInt(value, 0);
+                }
+
+                if (p1 != -1 && v != -1) {
+                    l.onParameterChange(Equalizer.this, status, p1, p2, v);
+                }
+            }
+        }
+    }
+
+    /**
+     * Registers an OnParameterChangeListener interface.
+     * @param listener OnParameterChangeListener interface registered
+     */
+    public void setParameterListener(OnParameterChangeListener listener) {
+        synchronized (mParamListenerLock) {
+            if (mParamListener == null) {
+                mParamListener = listener;
+                mBaseParamListener = new BaseParameterListener();
+                super.setParameterListener(mBaseParamListener);
+            }
+        }
+    }
+
+}
diff --git a/media/java/android/media/ExifInterface.java b/media/java/android/media/ExifInterface.java
index b26906d..74488c5 100644
--- a/media/java/android/media/ExifInterface.java
+++ b/media/java/android/media/ExifInterface.java
@@ -51,6 +51,19 @@
     public static final String TAG_GPS_LATITUDE_REF = "GPSLatitudeRef";
     /** Type is String. */
     public static final String TAG_GPS_LONGITUDE_REF = "GPSLongitudeRef";
+
+    /**
+     * The altitude (in meters) based on the reference in TAG_GPS_ALTITUDE_REF.
+     * Type is rational.
+     */
+    public static final String TAG_GPS_ALTITUDE = "GPSAltitude";
+
+    /**
+     * 0 if the altitude is above sea level. 1 if the altitude is below sea
+     * level. Type is int.
+     */
+    public static final String TAG_GPS_ALTITUDE_REF = "GPSAltitudeRef";
+
     /** Type is String. */
     public static final String TAG_GPS_TIMESTAMP = "GPSTimeStamp";
     /** Type is String. */
@@ -289,6 +302,23 @@
     }
 
     /**
+     * Return the altitude in meters. If the exif tag does not exist, return
+     * <var>defaultValue</var>.
+     *
+     * @param defaultValue the value to return if the tag is not available.
+     */
+    public double getAltitude(double defaultValue) {
+        double altitude = getAttributeDouble(TAG_GPS_ALTITUDE, -1);
+        int ref = getAttributeInt(TAG_GPS_ALTITUDE_REF, -1);
+
+        if (altitude >= 0 && ref >= 0) {
+            return (double) (altitude * ((ref == 1) ? -1 : 1));
+        } else {
+            return defaultValue;
+        }
+    }
+
+    /**
      * Returns number of milliseconds since Jan. 1, 1970, midnight.
      * Returns -1 if the date time information if not available.
      * @hide
@@ -345,14 +375,14 @@
                     / Float.parseFloat(pair[1].trim())));
 
             pair = parts[2].split("/");
-            float seconds = Float.parseFloat(pair[0].trim())
-                    / Float.parseFloat(pair[1].trim());
+            double seconds = Double.parseDouble(pair[0].trim())
+                    / Double.parseDouble(pair[1].trim());
 
-            float result = degrees + (minutes / 60F) + (seconds / (60F * 60F));
+            double result = degrees + (minutes / 60.0) + (seconds / 3600.0);
             if ((ref.equals("S") || ref.equals("W"))) {
-                return -result;
+                return (float) -result;
             }
-            return result;
+            return (float) result;
         } catch (RuntimeException ex) {
             // if for whatever reason we can't parse the lat long then return
             // null
diff --git a/media/java/android/media/MediaFile.java b/media/java/android/media/MediaFile.java
index 9d1d420..6e527d9 100644
--- a/media/java/android/media/MediaFile.java
+++ b/media/java/android/media/MediaFile.java
@@ -46,8 +46,9 @@
     public static final int FILE_TYPE_WMA     = 6;
     public static final int FILE_TYPE_OGG     = 7;
     public static final int FILE_TYPE_AAC     = 8;
+    public static final int FILE_TYPE_MKA     = 9;
     private static final int FIRST_AUDIO_FILE_TYPE = FILE_TYPE_MP3;
-    private static final int LAST_AUDIO_FILE_TYPE = FILE_TYPE_AAC;
+    private static final int LAST_AUDIO_FILE_TYPE = FILE_TYPE_MKA;
 
     // MIDI file types
     public static final int FILE_TYPE_MID     = 11;
@@ -63,8 +64,10 @@
     public static final int FILE_TYPE_3GPP2   = 24;
     public static final int FILE_TYPE_WMV     = 25;
     public static final int FILE_TYPE_ASF     = 26;
+    public static final int FILE_TYPE_MKV     = 27;
+    public static final int FILE_TYPE_MP2TS   = 28;
     private static final int FIRST_VIDEO_FILE_TYPE = FILE_TYPE_MP4;
-    private static final int LAST_VIDEO_FILE_TYPE = FILE_TYPE_ASF;
+    private static final int LAST_VIDEO_FILE_TYPE = FILE_TYPE_MP2TS;
     
     // Image file types
     public static final int FILE_TYPE_JPEG    = 31;
@@ -134,6 +137,7 @@
         addFileType("OGG", FILE_TYPE_OGG, "application/ogg");
         addFileType("OGA", FILE_TYPE_OGG, "application/ogg");
         addFileType("AAC", FILE_TYPE_AAC, "audio/aac");
+        addFileType("MKA", FILE_TYPE_MKA, "audio/x-matroska");
  
         addFileType("MID", FILE_TYPE_MID, "audio/midi");
         addFileType("MIDI", FILE_TYPE_MID, "audio/midi");
@@ -151,6 +155,10 @@
         addFileType("3GPP", FILE_TYPE_3GPP, "video/3gpp");
         addFileType("3G2", FILE_TYPE_3GPP2, "video/3gpp2");
         addFileType("3GPP2", FILE_TYPE_3GPP2, "video/3gpp2");
+        addFileType("MKV", FILE_TYPE_MKV, "video/x-matroska");
+        addFileType("WEBM", FILE_TYPE_MKV, "video/x-matroska");
+        addFileType("TS", FILE_TYPE_MP2TS, "video/mp2ts");
+
         if (isWMVEnabled()) {
             addFileType("WMV", FILE_TYPE_WMV, "video/x-ms-wmv");
             addFileType("ASF", FILE_TYPE_ASF, "video/x-ms-asf");
diff --git a/media/java/android/media/MediaPlayer.java b/media/java/android/media/MediaPlayer.java
index 38b1582..8caa07a 100644
--- a/media/java/android/media/MediaPlayer.java
+++ b/media/java/android/media/MediaPlayer.java
@@ -133,7 +133,7 @@
  *         <li>It is good programming practice to have your application
  *         register a OnErrorListener to look out for error notifications from
  *         the internal player engine.</li>
- *         <li>IlleglStateException is
+ *         <li>IllegalStateException is
  *         thrown to prevent programming errors such as calling {@link #prepare()},
  *         {@link #prepareAsync()}, or one of the overloaded <code>setDataSource
  *         </code> methods in an invalid state. </li>
@@ -423,6 +423,18 @@
  *     <td>Successful invoke of this method in a valid state transfers the
  *         object to the <em>Stopped</em> state. Calling this method in an
  *         invalid state transfers the object to the <em>Error</em> state.</p></td></tr>
+  * <tr><td>setAudioSessionId </p></td>
+ *     <td>{Idle} </p></td>
+ *     <td>{Initialized, Prepared, Started, Paused, Stopped, PlaybackCompleted,
+ *          Error} </p></td>
+ *     <td>This method must be called in idle state as the audio session ID must be known before
+ *         calling setDataSource. Calling it does not change the object state. </p></td></tr>
+ * <tr><td>getAudioSessionId </p></td>
+ *     <td>any </p></td>
+ *     <td>{} </p></td>
+ *     <td>This method can be called in any state and calling it does not change
+ *         the object state. </p></td></tr>
+ *
  * </table>
  *
  * <a name="Permissions"></a>
@@ -1159,6 +1171,38 @@
     public native Bitmap getFrameAt(int msec) throws IllegalStateException;
 
     /**
+     * Sets the audio session ID.
+     *
+     * @param sessionId: the audio session ID.
+     * The audio session ID is a system wide unique identifier for the audio stream played by
+     * this MediaPlayer instance.
+     * The primary use of the audio session ID  is to associate audio effects to a particular
+     * instance of MediaPlayer: if an audio session ID is provided when creating an audio effect,
+     * this effect will be applied only to the audio content of media players within the same
+     * audio session and not to the output mix.
+     * When created, a MediaPlayer instance automatically generates its own audio session ID.
+     * However, it is possible to force this player to be part of an already existing audio session
+     * by calling this method.
+     * This method must be called before one of the overloaded <code> setDataSource </code> methods.
+     * @throws IllegalStateException if it is called in an invalid state
+     *
+     // FIXME: unhide.
+     // FIXME: link to AudioEffect class when public.
+     * @hide
+     */
+    public native void setAudioSessionId(int sessionId)  throws IllegalArgumentException, IllegalStateException;
+
+    /**
+     * Returns the audio session ID.
+     *
+     * @return the audio session ID. {@see #setAudioSessionId(int)}.
+     * Note that the audio session ID is 0 only if a problem occured when the MediaPlayer was contructed.
+     // FIXME: unhide.
+     * @hide
+     */
+    public native int getAudioSessionId();
+
+    /**
      * @param request Parcel destinated to the media player. The
      *                Interface token must be set to the IMediaPlayer
      *                one to be routed correctly through the system.
@@ -1523,6 +1567,15 @@
      */
     public static final int MEDIA_INFO_VIDEO_TRACK_LAGGING = 700;
 
+    /** MediaPlayer is temporarily pausing playback internally in order to
+     * buffer more data.
+     */
+    public static final int MEDIA_INFO_BUFFERING_START = 701;
+
+    /** MediaPlayer is resuming playback after filling buffers.
+     */
+    public static final int MEDIA_INFO_BUFFERING_END = 702;
+
     /** Bad interleaving means that a media has been improperly interleaved or
      * not interleaved at all, e.g has all the video samples first then all the
      * audio ones. Video is playing but a lot of disk seeks may be happening.
diff --git a/media/java/android/media/PresetReverb.java b/media/java/android/media/PresetReverb.java
new file mode 100644
index 0000000..83a01a4
--- /dev/null
+++ b/media/java/android/media/PresetReverb.java
@@ -0,0 +1,219 @@
+/*
+ * Copyright (C) 2009 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package android.media;
+
+import android.app.Activity;
+import android.content.Context;
+import android.content.Intent;
+import android.os.Bundle;
+import android.util.Log;
+import java.nio.ByteOrder;
+import java.nio.ByteBuffer;
+
+import android.media.AudioEffect;
+
+/**
+ * A sound generated within a room travels in many directions. The listener first hears the
+ * direct sound from the source itself. Later, he or she hears discrete echoes caused by sound
+ * bouncing off nearby walls, the ceiling and the floor. As sound waves arrive after
+ * undergoing more and more reflections, individual reflections become indistinguishable and
+ * the listener hears continuous reverberation that decays over time.
+ * Reverb is vital for modeling a listener's environment. It can be used in music applications
+ * to simulate music being played back in various environments, or in games to immerse the
+ * listener within the game's environment.
+ * The PresetReverb class allows an application to configure the global reverb using a reverb preset.
+ * This is primarily used for adding some reverb in a music playback context. Applications
+ * requiring control over a more advanced environmental reverb are advised to use the
+ // TODO when EnvironmentalReverb is unhidden
+ // {_at_link android.media.EnvironmentalReverb} class.
+ * <p>An application creates a PresetReverb object to instantiate and control a reverb engine in the
+ * audio framework.
+ * <p>The methods, parameter types and units exposed by the PresetReverb implementation are
+ * directly mapping those defined by the OpenSL ES 1.0.1 Specification
+ * (http://www.khronos.org/opensles/) for the SLPresetReverbItf interface.
+ * Please refer to this specification for more details.
+ * <p>The PresetReverb is an output mix auxiliary effect and should be created on
+ * Audio session 0. In order for a MediaPlayer or AudioTrack to be fed into this effect,
+ * they must be explicitely attached to it and a send level must be specified. Use the effect ID
+ * returned by getId() method to designate this particular effect when attaching it to the
+ * MediaPlayer or AudioTrack.
+ // TODO when AudioEffect is unhidden
+ // <p> See {_at_link android.media.AudioEffect} class for more details on controlling audio effects.
+ *
+ * {@hide Pending API council review}
+ */
+
+public class PresetReverb extends AudioEffect {
+
+    private final static String TAG = "PresetReverb";
+
+    // These constants must be synchronized with those in
+    // frameworks/base/include/media/EffectPresetReverbApi.h
+
+    /**
+     * Preset. Parameter ID for
+     * {@link android.media.PresetReverb.OnParameterChangeListener}
+     */
+    public static final int PARAM_PRESET = 0;
+
+    /**
+     * Room level. Parameter ID for
+     * {@link android.media.PresetReverb.OnParameterChangeListener}
+     */
+    public static final int PRESET_NONE        = 0;
+    public static final int PRESET_SMALLROOM   = 1;
+    public static final int PRESET_MEDIUMROOM  = 2;
+    public static final int PRESET_LARGEROOM   = 3;
+    public static final int PRESET_MEDIUMHALL  = 4;
+    public static final int PRESET_LARGEHALL   = 5;
+    public static final int PRESET_PLATE       = 6;
+
+    /**
+     * Registered listener for parameter changes.
+     */
+    private OnParameterChangeListener mParamListener = null;
+
+    /**
+     * Listener used internally to to receive raw parameter change event from AudioEffect super class
+     */
+    private BaseParameterListener mBaseParamListener = null;
+
+    /**
+     * Lock for access to mParamListener
+     */
+    private final Object mParamListenerLock = new Object();
+
+    /**
+     * Class constructor.
+     * @param priority the priority level requested by the application for controlling the
+     * PresetReverb engine. As the same engine can be shared by several applications, this
+     * parameter indicates how much the requesting application needs control of effect parameters.
+     * The normal priority is 0, above normal is a positive number, below normal a negative number.
+     * @param audioSession  System wide unique audio session identifier. If audioSession
+     *  is not 0, the PresetReverb will be attached to the MediaPlayer or AudioTrack in the
+     *  same audio session. Otherwise, the PresetReverb will apply to the output mix.
+     *  As the PresetReverb is an auxiliary effect it is recommended to instantiate it on
+     *  audio session 0 and to attach it to the MediaPLayer auxiliary output.
+     *
+     * @throws java.lang.IllegalArgumentException
+     * @throws java.lang.UnsupportedOperationException
+     * @throws java.lang.RuntimeException
+     */
+    public PresetReverb(int priority, int audioSession)
+    throws IllegalArgumentException, UnsupportedOperationException, RuntimeException {
+        super(EFFECT_TYPE_PRESET_REVERB, EFFECT_TYPE_NULL, priority, audioSession);
+        Log.e(TAG, "contructor");
+    }
+
+    /**
+     *  Enables a preset on the reverb.
+     *  <p>The reverb PRESET_NONE disables any reverb from the current output but does not free the
+     *  resources associated with the reverb. For an application to signal to the implementation
+     *  to free the resources, it must call the release() method.
+     * @param preset This must be one of the the preset constants defined in this class.
+     * e.g. {@link #PRESET_SMALLROOM}
+     * @throws IllegalStateException
+     * @throws IllegalArgumentException
+     * @throws UnsupportedOperationException
+     */
+    public void setPreset(short preset)
+    throws IllegalStateException, IllegalArgumentException, UnsupportedOperationException {
+        checkStatus(setParameter(PARAM_PRESET, preset));
+    }
+
+    /**
+     * Gets current reverb preset.
+     * @return Preset that is set at the moment.
+     * @throws IllegalStateException
+     * @throws IllegalArgumentException
+     * @throws UnsupportedOperationException
+     */
+    public short getPreset()
+    throws IllegalStateException, IllegalArgumentException, UnsupportedOperationException {
+        int[] param = new int[1];
+        param[0] = PARAM_PRESET;
+        short[] value = new short[1];
+        checkStatus(getParameter(param, value));
+        return value[0];
+    }
+
+    /**
+     * The OnParameterChangeListener interface defines a method called by the PresetReverb
+     * when a parameter value has changed.
+     */
+    public interface OnParameterChangeListener  {
+        /**
+         * Method called when a parameter value has changed. The method is called only if the
+         * parameter was changed by another application having the control of the same
+         * PresetReverb engine.
+         * @param effect the PresetReverb on which the interface is registered.
+         * @param status status of the set parameter operation.
+         // TODO when AudioEffect is unhidden
+         // See {_at_link android.media.AudioEffect#setParameter(byte[], byte[])}.
+         * @param param ID of the modified parameter. See {@link #PARAM_PRESET} ...
+         * @param value the new parameter value.
+         */
+        void onParameterChange(PresetReverb effect, int status, int param, short value);
+    }
+
+    /**
+     * Listener used internally to receive unformatted parameter change events from AudioEffect
+     * super class.
+     */
+    private class BaseParameterListener implements AudioEffect.OnParameterChangeListener {
+        private BaseParameterListener() {
+
+        }
+        public void onParameterChange(AudioEffect effect, int status, byte[] param, byte[] value) {
+            OnParameterChangeListener l = null;
+
+            synchronized (mParamListenerLock) {
+                if (mParamListener != null) {
+                    l = mParamListener;
+                }
+            }
+            if (l != null) {
+                int p = -1;
+                short v = -1;
+
+                if (param.length == 4) {
+                    p = byteArrayToInt(param, 0);
+                }
+                if (value.length == 2) {
+                    v = byteArrayToShort(value, 0);
+                }
+                if (p != -1 && v != -1) {
+                    l.onParameterChange(PresetReverb.this, status, p, v);
+                }
+            }
+        }
+    }
+
+    /**
+     * Registers an OnParameterChangeListener interface.
+     * @param listener OnParameterChangeListener interface registered
+     */
+    public void setParameterListener(OnParameterChangeListener listener) {
+        synchronized (mParamListenerLock) {
+            if (mParamListener == null) {
+                mParamListener = listener;
+                mBaseParamListener = new BaseParameterListener();
+                super.setParameterListener(mBaseParamListener);
+            }
+        }
+    }
+}
diff --git a/media/java/android/media/Virtualizer.java b/media/java/android/media/Virtualizer.java
new file mode 100644
index 0000000..9f71297
--- /dev/null
+++ b/media/java/android/media/Virtualizer.java
@@ -0,0 +1,214 @@
+/*
+ * Copyright (C) 2009 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package android.media;
+
+import android.app.Activity;
+import android.content.Context;
+import android.content.Intent;
+import android.os.Bundle;
+import android.util.Log;
+import java.nio.ByteOrder;
+import java.nio.ByteBuffer;
+import java.nio.CharBuffer;
+
+import android.media.AudioEffect;
+
+/**
+ * An audio virtualizer is a general name for an effect to spatialize audio channels. The exact
+ * behavior of this effect is dependent on the number of audio input channels and the types and
+ * number of audio output channels of the device. For example, in the case of a stereo input and
+ * stereo headphone output, a stereo widening effect is used when this effect is turned on.
+ * <p>An application creates a Virtualizer object to instantiate and control a virtualizer engine
+ * in the audio framework.
+ * <p>The methods, parameter types and units exposed by the Virtualizer implementation are directly
+ * mapping those defined by the OpenSL ES 1.0.1 Specification (http://www.khronos.org/opensles/)
+ * for the SLVirtualizerItf interface. Please refer to this specification for more details.
+ * <p>To attach the Virtualizer to a particular AudioTrack or MediaPlayer, specify the audio session
+ * ID of this AudioTrack or MediaPlayer when constructing the Virtualizer. If the audio session ID 0
+ * is specified, the Virtualizer applies to the main audio output mix.
+ // TODO when AudioEffect is unhidden
+ // <p> See {_at_link android.media.AudioEffect} class for more details on controlling audio effects.
+ *
+ * {@hide Pending API council review}
+ */
+
+public class Virtualizer extends AudioEffect {
+
+    private final static String TAG = "Virtualizer";
+
+    // These constants must be synchronized with those in frameworks/base/include/media/EffectVirtualizerApi.h
+    /**
+     * Is strength parameter supported by virtualizer engine. Parameter ID for getParameter().
+     */
+    public static final int PARAM_STRENGTH_SUPPORTED = 0;
+    /**
+     * Virtualizer effect strength. Parameter ID for
+     * {@link android.media.Virtualizer.OnParameterChangeListener}
+     */
+    public static final int PARAM_STRENGTH = 1;
+
+    /**
+     * Indicates if strength parameter is supported by the virtualizer engine
+     */
+    private boolean mStrengthSupported = false;
+
+    /**
+     * Registered listener for parameter changes.
+     */
+    private OnParameterChangeListener mParamListener = null;
+
+    /**
+     * Listener used internally to to receive raw parameter change event from AudioEffect super class
+     */
+    private BaseParameterListener mBaseParamListener = null;
+
+    /**
+     * Lock for access to mParamListener
+     */
+    private final Object mParamListenerLock = new Object();
+
+    /**
+     * Class constructor.
+     * @param priority the priority level requested by the application for controlling the Virtualizer
+     * engine. As the same engine can be shared by several applications, this parameter indicates
+     * how much the requesting application needs control of effect parameters. The normal priority
+     * is 0, above normal is a positive number, below normal a negative number.
+     * @param audioSession  System wide unique audio session identifier. If audioSession
+     *  is not 0, the Virtualizer will be attached to the MediaPlayer or AudioTrack in the
+     *  same audio session. Otherwise, the Virtualizer will apply to the output mix.
+     *
+     * @throws java.lang.IllegalStateException
+     * @throws java.lang.IllegalArgumentException
+     * @throws java.lang.UnsupportedOperationException
+     * @throws java.lang.RuntimeException
+     */
+    public Virtualizer(int priority, int audioSession)
+    throws IllegalStateException, IllegalArgumentException,
+           UnsupportedOperationException, RuntimeException {
+        super(EFFECT_TYPE_VIRTUALIZER, EFFECT_TYPE_NULL, priority, audioSession);
+
+        short[] value = new short[1];
+        checkStatus(getParameter(PARAM_STRENGTH_SUPPORTED, value));
+        mStrengthSupported = (value[0] != 0);
+    }
+
+    /**
+     * Indicates whether setting strength is supported. If this method returns false, only one
+     * strength is supported and the setStrength() method always rounds to that value.
+     * @return true is strength parameter is supported, false otherwise
+     */
+    public boolean getStrengthSupported() {
+       return mStrengthSupported;
+    }
+
+    /**
+     * Sets the strength of the virtualizer effect. If the implementation does not support per mille
+     * accuracy for setting the strength, it is allowed to round the given strength to the nearest
+     * supported value. You can use the {@link #getRoundedStrength()} method to query the
+     * (possibly rounded) value that was actually set.
+     * @param strength Strength of the effect. The valid range for strength strength is [0, 1000],
+     * where 0 per mille designates the mildest effect and 1000 per mille designates the strongest.
+     * @throws IllegalStateException
+     * @throws IllegalArgumentException
+     * @throws UnsupportedOperationException
+     */
+    public void setStrength(short strength)
+    throws IllegalStateException, IllegalArgumentException, UnsupportedOperationException {
+        checkStatus(setParameter(PARAM_STRENGTH, strength));
+    }
+
+    /**
+     * Gets the current strength of the effect.
+     * @return The strength of the effect. The valid range for strength is [0, 1000], where 0 per
+     * mille designates the mildest effect and 1000 per mille the strongest
+     * @throws IllegalStateException
+     * @throws IllegalArgumentException
+     * @throws UnsupportedOperationException
+     */
+    public short getRoundedStrength()
+    throws IllegalStateException, IllegalArgumentException, UnsupportedOperationException {
+        short[] value = new short[1];
+        checkStatus(getParameter(PARAM_STRENGTH, value));
+        return value[0];
+    }
+
+    /**
+     * The OnParameterChangeListener interface defines a method called by the Virtualizer when a
+     * parameter value has changed.
+     */
+    public interface OnParameterChangeListener  {
+        /**
+         * Method called when a parameter value has changed. The method is called only if the
+         * parameter was changed by another application having the control of the same
+         * Virtualizer engine.
+         * @param effect the Virtualizer on which the interface is registered.
+         * @param status status of the set parameter operation.
+         // TODO when AudioEffect is unhidden
+         // See {_at_link android.media.AudioEffect#setParameter(byte[], byte[])}.
+         * @param param ID of the modified parameter. See {@link #PARAM_STRENGTH} ...
+         * @param value the new parameter value.
+         */
+        void onParameterChange(Virtualizer effect, int status, int param, short value);
+    }
+
+    /**
+     * Listener used internally to receive unformatted parameter change events from AudioEffect
+     * super class.
+     */
+    private class BaseParameterListener implements AudioEffect.OnParameterChangeListener {
+        private BaseParameterListener() {
+
+        }
+        public void onParameterChange(AudioEffect effect, int status, byte[] param, byte[] value) {
+            OnParameterChangeListener l = null;
+
+            synchronized (mParamListenerLock) {
+                if (mParamListener != null) {
+                    l = mParamListener;
+                }
+            }
+            if (l != null) {
+                int p = -1;
+                short v = -1;
+
+                if (param.length == 4) {
+                    p = byteArrayToInt(param, 0);
+                }
+                if (value.length == 2) {
+                    v = byteArrayToShort(value, 0);
+                }
+                if (p != -1 && v != -1) {
+                    l.onParameterChange(Virtualizer.this, status, p, v);
+                }
+            }
+        }
+    }
+
+    /**
+     * Registers an OnParameterChangeListener interface.
+     * @param listener OnParameterChangeListener interface registered
+     */
+    public void setParameterListener(OnParameterChangeListener listener) {
+        synchronized (mParamListenerLock) {
+            if (mParamListener == null) {
+                mParamListener = listener;
+                mBaseParamListener = new BaseParameterListener();
+                super.setParameterListener(mBaseParamListener);
+            }
+        }
+    }
+}
diff --git a/media/java/android/media/Visualizer.java b/media/java/android/media/Visualizer.java
new file mode 100755
index 0000000..cdd3cdf
--- /dev/null
+++ b/media/java/android/media/Visualizer.java
@@ -0,0 +1,510 @@
+/*
+ * Copyright (C) 2010 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package android.media;
+
+import android.util.Log;
+import java.lang.ref.WeakReference;
+import java.io.IOException;
+import android.os.Handler;
+import android.os.Looper;
+import android.os.Message;
+
+/**
+ * The Visualizer class enables application to retrieve part of the currently playing audio for
+ * visualization purpose. It is not an audio recording interface and only returns partial and low
+ * quality audio content. However, to protect privacy of certain audio data (e.g voice mail) the use
+ * of the visualizer requires the permission android.permission.RECORD_AUDIO.
+ * <p>The audio session ID passed to the constructor indicates which audio content should be
+ * visualized:<br>
+ * <ul>
+ *   <li>If the session is 0, the audio output mix is visualized</li>
+ *   <li>If the session is not 0, the audio from a particular {@link MediaPlayer} or
+ *   {@link AudioTrack}
+ *   using this audio session is visualized </li>
+ * </ul>
+ * <p>Two types of representation of audio content can be captured: <br>
+ * <ul>
+ *   <li>Waveform data: consecutive 8-bit (unsigned) mono samples by using the
+ *   {@link #getWaveForm(byte[])} method</li>
+ *   <li>Frequency data: 8-bit magnitude FFT by using the {@link #getFft(byte[])} method</li>
+ * </ul>
+ * <p>The length of the capture can be retrieved or specified by calling respectively
+ * {@link #getCaptureSize()} and {@link #setCaptureSize(int)} methods. Note that the size of the FFT
+ * is half of the specified capture size but both sides of the spectrum are returned yielding in a
+ * number of bytes equal to the capture size. The capture size must be a power of 2 in the range
+ * returned by {@link #getCaptureSizeRange()}.
+ * <p>In addition to the polling capture mode described above with {@link #getWaveForm(byte[])} and
+ *  {@link #getFft(byte[])} methods, a callback mode is also available by installing a listener by
+ *  use of the {@link #setDataCaptureListener(OnDataCaptureListener, int, boolean, boolean)} method.
+ *  The rate at which the listener capture method is called as well as the type of data returned is
+ *  specified.
+ * <p>Before capturing data, the Visualizer must be enabled by calling the
+ * {@link #setEnabled(boolean)} method.
+ * When data capture is not needed any more, the Visualizer should be disabled.
+ * <p>It is good practice to call the {@link #release()} method when the Visualizer is not used
+ * anymore to free up native resources associated to the Visualizer instance.
+ *
+ * {@hide Pending API council review}
+ */
+
+public class Visualizer {
+
+    static {
+        System.loadLibrary("audioeffect_jni");
+        native_init();
+    }
+
+    private final static String TAG = "Visualizer-JAVA";
+
+    /**
+     * State of a Visualizer object that was not successfully initialized upon creation
+     */
+    public static final int STATE_UNINITIALIZED = 0;
+    /**
+     * State of a Visualizer object that is ready to be used.
+     */
+    public static final int STATE_INITIALIZED   = 1;
+    /**
+     * State of a Visualizer object that is active.
+     */
+    public static final int STATE_ENABLED   = 2;
+
+    // to keep in sync with frameworks/base/media/jni/audioeffect/android_media_Visualizer.cpp
+    protected static final int NATIVE_EVENT_PCM_CAPTURE = 0;
+    protected static final int NATIVE_EVENT_FFT_CAPTURE = 1;
+
+    // Error codes:
+    /**
+     * Successful operation.
+     */
+    public  static final int SUCCESS              = 0;
+    /**
+     * Unspecified error.
+     */
+    public  static final int ERROR                = -1;
+    /**
+     * Internal opreation status. Not returned by any method.
+     */
+    public  static final int ALREADY_EXISTS       = -2;
+    /**
+     * Operation failed due to bad object initialization.
+     */
+    public  static final int ERROR_NO_INIT              = -3;
+    /**
+     * Operation failed due to bad parameter value.
+     */
+    public  static final int ERROR_BAD_VALUE            = -4;
+    /**
+     * Operation failed because it was requested in wrong state.
+     */
+    public  static final int ERROR_INVALID_OPERATION    = -5;
+    /**
+     * Operation failed due to lack of memory.
+     */
+    public  static final int ERROR_NO_MEMORY            = -6;
+    /**
+     * Operation failed due to dead remote object.
+     */
+    public  static final int ERROR_DEAD_OBJECT          = -7;
+
+    //--------------------------------------------------------------------------
+    // Member variables
+    //--------------------
+    /**
+     * Indicates the state of the Visualizer instance
+     */
+    protected int mState = STATE_UNINITIALIZED;
+    /**
+     * Lock to synchronize access to mState
+     */
+    protected final Object mStateLock = new Object();
+    /**
+     * System wide unique Identifier of the visualizer engine used by this Visualizer instance
+     */
+    protected int mId;
+
+    /**
+     * Lock to protect listeners updates against event notifications
+     */
+    protected final Object mListenerLock = new Object();
+    /**
+     * Handler for events coming from the native code
+     */
+    protected NativeEventHandler mNativeEventHandler = null;
+    /**
+     *  PCM and FFT capture listener registered by client
+     */
+    protected OnDataCaptureListener mCaptureListener = null;
+
+    // accessed by native methods
+    private int mNativeVisualizer;
+    private int mJniData;
+
+    //--------------------------------------------------------------------------
+    // Constructor, Finalize
+    //--------------------
+    /**
+     * Class constructor.
+     * @param audioSession  System wide unique audio session identifier. If audioSession
+     *  is not 0, the visualizer will be attached to the MediaPlayer or AudioTrack in the
+     *  same audio session. Otherwise, the Visualizer will apply to the output mix.
+     *
+     * @throws java.lang.UnsupportedOperationException
+     * @throws java.lang.RuntimeException
+     */
+
+    public Visualizer(int audioSession)
+    throws UnsupportedOperationException, RuntimeException {
+        int[] id = new int[1];
+
+        synchronized (mStateLock) {
+            mState = STATE_UNINITIALIZED;
+            // native initialization
+            int result = native_setup(new WeakReference<Visualizer>(this), audioSession, id);
+            if (result != SUCCESS && result != ALREADY_EXISTS) {
+                Log.e(TAG, "Error code "+result+" when initializing Visualizer.");
+                switch (result) {
+                case ERROR_INVALID_OPERATION:
+                    throw (new UnsupportedOperationException("Effect library not loaded"));
+                default:
+                    throw (new RuntimeException("Cannot initialize Visualizer engine, error: "
+                            +result));
+                }
+            }
+            mId = id[0];
+            if (native_getEnabled()) {
+                mState = STATE_ENABLED;
+            } else {
+                mState = STATE_INITIALIZED;
+            }
+        }
+    }
+
+    /**
+     * Releases the native Visualizer resources. It is a good practice to release the
+     * visualization engine when not in use.
+     */
+    public void release() {
+        synchronized (mStateLock) {
+            native_release();
+            mState = STATE_UNINITIALIZED;
+        }
+    }
+
+    @Override
+    protected void finalize() {
+        native_finalize();
+    }
+
+    /**
+     * Enable or disable the visualization engine.
+     * @param enabled requested enable state
+     * @return {@link #SUCCESS} in case of success,
+     * {@link #ERROR_INVALID_OPERATION} or {@link #ERROR_DEAD_OBJECT} in case of failure.
+     * @throws IllegalStateException
+     */
+    public int setEnabled(boolean enabled)
+    throws IllegalStateException {
+        synchronized (mStateLock) {
+            if ((enabled && mState != STATE_INITIALIZED) ||
+                    (!enabled && mState != STATE_ENABLED)) {
+                throw(new IllegalStateException("setEnabled() called in wrong state: "+mState));
+            }
+            int status = native_setEnabled(enabled);
+            if (status == SUCCESS) {
+                mState = enabled ? STATE_ENABLED : STATE_INITIALIZED;
+            }
+            return status;
+        }
+    }
+
+    /**
+     * Get current activation state of the visualizer.
+     * @return true if the visualizer is active, false otherwise
+     */
+    public boolean getEnabled()
+    {
+        synchronized (mStateLock) {
+            if (mState == STATE_UNINITIALIZED) {
+                throw(new IllegalStateException("getEnabled() called in wrong state: "+mState));
+            }
+            return native_getEnabled();
+        }
+    }
+
+    /**
+     * Returns the capture size range.
+     * @return the mininum capture size is returned in first array element and the maximum in second
+     * array element.
+     */
+    public static native int[] getCaptureSizeRange();
+
+    /**
+     * Returns the maximum capture rate for the callback capture method. This is the maximum value
+     * for the rate parameter of the
+     * {@link #setDataCaptureListener(OnDataCaptureListener, int, boolean, boolean)} method.
+     * @return the maximum capture rate expressed in milliHertz
+     */
+    public static native int getMaxCaptureRate();
+
+    /**
+     * Sets the capture size, i.e. the number of bytes returned by {@link #getWaveForm(byte[])} and
+     * {@link #getFft(byte[])} methods. The capture size must be a power of 2 in the range returned
+     * by {@link #getCaptureSizeRange()}.
+     * This method must not be called when the Visualizer is enabled.
+     * @param size requested capture size
+     * @return {@link #SUCCESS} in case of success,
+     * {@link #ERROR_BAD_VALUE} in case of failure.
+     * @throws IllegalStateException
+     */
+    public int setCaptureSize(int size)
+    throws IllegalStateException {
+        synchronized (mStateLock) {
+            if (mState != STATE_INITIALIZED) {
+                throw(new IllegalStateException("setCaptureSize() called in wrong state: "+mState));
+            }
+            return native_setCaptureSize(size);
+        }
+    }
+
+    /**
+     * Returns current capture size.
+     * @return the capture size in bytes.
+     */
+    public int getCaptureSize()
+    throws IllegalStateException {
+        synchronized (mStateLock) {
+            if (mState == STATE_UNINITIALIZED) {
+                throw(new IllegalStateException("getCaptureSize() called in wrong state: "+mState));
+            }
+            return native_getCaptureSize();
+        }
+    }
+
+    /**
+     * Returns the sampling rate of the captured audio.
+     * @return the sampling rate in milliHertz.
+     */
+    public int getSamplingRate()
+    throws IllegalStateException {
+        synchronized (mStateLock) {
+            if (mState == STATE_UNINITIALIZED) {
+                throw(new IllegalStateException("getSamplingRate() called in wrong state: "+mState));
+            }
+            return native_getSamplingRate();
+        }
+    }
+
+    /**
+     * Returns a waveform capture of currently playing audio content. The capture consists in
+     * a number of consecutive 8-bit (unsigned) mono PCM samples equal to the capture size returned
+     * by {@link #getCaptureSize()}.
+     * <p>This method must be called when the Visualizer is enabled.
+     * @param waveform array of bytes where the waveform should be returned
+     * @return {@link #SUCCESS} in case of success,
+     * {@link #ERROR_NO_MEMORY}, {@link #ERROR_INVALID_OPERATION} or {@link #ERROR_DEAD_OBJECT}
+     * in case of failure.
+     * @throws IllegalStateException
+     */
+    public int getWaveForm(byte[] waveform)
+    throws IllegalStateException {
+        synchronized (mStateLock) {
+            if (mState != STATE_ENABLED) {
+                throw(new IllegalStateException("getWaveForm() called in wrong state: "+mState));
+            }
+            return native_getWaveForm(waveform);
+        }
+    }
+    /**
+     * Returns a frequency capture of currently playing audio content. The capture is a 8-bit
+     * magnitude FFT. Note that the size of the FFT is half of the specified capture size but both
+     * sides of the spectrum are returned yielding in a number of bytes equal to the capture size.
+     * {@see #getCaptureSize()}.
+     * <p>This method must be called when the Visualizer is enabled.
+     * @param fft array of bytes where the FFT should be returned
+     * @return {@link #SUCCESS} in case of success,
+     * {@link #ERROR_NO_MEMORY}, {@link #ERROR_INVALID_OPERATION} or {@link #ERROR_DEAD_OBJECT}
+     * in case of failure.
+     * @throws IllegalStateException
+     */
+    public int getFft(byte[] fft)
+    throws IllegalStateException {
+        synchronized (mStateLock) {
+            if (mState != STATE_ENABLED) {
+                throw(new IllegalStateException("getFft() called in wrong state: "+mState));
+            }
+            return native_getFft(fft);
+        }
+    }
+
+    //---------------------------------------------------------
+    // Interface definitions
+    //--------------------
+    /**
+     * The OnDataCaptureListener interface defines methods called by the Visualizer to periodically
+     * update the audio visualization capture.
+     * The client application can implement this interface and register the listener with the
+     * {@link #setDataCaptureListener(OnDataCaptureListener, int, boolean, boolean)} method.
+     */
+    public interface OnDataCaptureListener  {
+        /**
+         * Method called when a new waveform capture is available.
+         * @param visualizer Visualizer object on which the listener is registered.
+         * @param waveform array of bytes containing the waveform representation.
+         * @param samplingRate sampling rate of the audio visualized.
+         */
+        void onWaveFormDataCapture(Visualizer visualizer, byte[] waveform, int samplingRate);
+
+        /**
+         * Method called when a new frequency capture is available.
+         * @param visualizer Visualizer object on which the listener is registered.
+         * @param fft array of bytes containing the frequency representation.
+         * @param samplingRate sampling rate of the audio visualized.
+         */
+        void onFftDataCapture(Visualizer visualizer, byte[] fft, int samplingRate);
+    }
+
+    /**
+     * Registers an OnDataCaptureListener interface and specifies the rate at which the capture
+     * should be updated as well as the type of capture requested.
+     * <p>Call this method with a null listener to stop receiving the capture updates.
+     * @param listener OnDataCaptureListener registered
+     * @param rate rate in milliHertz at which the capture should be updated
+     * @param waveform true if a waveform capture is requested: the onWaveFormDataCapture()
+     * method will be called on the OnDataCaptureListener interface.
+     * @param fft true if a frequency capture is requested: the onFftDataCapture() method will be
+     * called on the OnDataCaptureListener interface.
+     * @return {@link #SUCCESS} in case of success,
+     * {@link #ERROR_NO_INIT} or {@link #ERROR_BAD_VALUE} in case of failure.
+     */
+    public int setDataCaptureListener(OnDataCaptureListener listener,
+            int rate, boolean waveform, boolean fft) {
+        synchronized (mListenerLock) {
+            mCaptureListener = listener;
+        }
+        if (listener == null) {
+            // make sure capture callback is stopped in native code
+            waveform = false;
+            fft = false;
+        }
+        int status = native_setPeriodicCapture(rate, waveform, fft);
+        if (status == SUCCESS) {
+            if ((listener != null) && (mNativeEventHandler == null)) {
+                Looper looper;
+                if ((looper = Looper.myLooper()) != null) {
+                    mNativeEventHandler = new NativeEventHandler(this, looper);
+                } else if ((looper = Looper.getMainLooper()) != null) {
+                    mNativeEventHandler = new NativeEventHandler(this, looper);
+                } else {
+                    mNativeEventHandler = null;
+                    status = ERROR_NO_INIT;
+                }
+            }
+        }
+        return status;
+    }
+
+    /**
+     * Helper class to handle the forwarding of native events to the appropriate listeners
+     */
+    private class NativeEventHandler extends Handler
+    {
+        private Visualizer mVisualizer;
+
+        public NativeEventHandler(Visualizer v, Looper looper) {
+            super(looper);
+            mVisualizer = v;
+        }
+
+        @Override
+        public void handleMessage(Message msg) {
+            if (mVisualizer == null) {
+                return;
+            }
+            OnDataCaptureListener l = null;
+            synchronized (mListenerLock) {
+                l = mVisualizer.mCaptureListener;
+            }
+
+            if (l != null) {
+                byte[] data = (byte[])msg.obj;
+                int samplingRate = msg.arg1;
+                switch(msg.what) {
+                case NATIVE_EVENT_PCM_CAPTURE:
+                    l.onWaveFormDataCapture(mVisualizer, data, samplingRate);
+                    break;
+                case NATIVE_EVENT_FFT_CAPTURE:
+                    l.onFftDataCapture(mVisualizer, data, samplingRate);
+                    break;
+                default:
+                    Log.e(TAG,"Unknown native event: "+msg.what);
+                    break;
+                }
+            }
+        }
+    }
+
+    //---------------------------------------------------------
+    // Interface definitions
+    //--------------------
+
+    private static native final void native_init();
+
+    private native final int native_setup(Object audioeffect_this,
+                                          int audioSession,
+                                          int[] id);
+
+    private native final void native_finalize();
+
+    private native final void native_release();
+
+    private native final int native_setEnabled(boolean enabled);
+
+    private native final boolean native_getEnabled();
+
+    private native final int native_setCaptureSize(int size);
+
+    private native final int native_getCaptureSize();
+
+    private native final int native_getSamplingRate();
+
+    private native final int native_getWaveForm(byte[] waveform);
+
+    private native final int native_getFft(byte[] fft);
+
+    private native final int native_setPeriodicCapture(int rate, boolean waveForm, boolean fft);
+
+    //---------------------------------------------------------
+    // Java methods called from the native side
+    //--------------------
+    @SuppressWarnings("unused")
+    private static void postEventFromNative(Object effect_ref,
+            int what, int arg1, int arg2, Object obj) {
+        Visualizer visu = (Visualizer)((WeakReference)effect_ref).get();
+        if (visu == null) {
+            return;
+        }
+
+        if (visu.mNativeEventHandler != null) {
+            Message m = visu.mNativeEventHandler.obtainMessage(what, arg1, arg2, obj);
+            visu.mNativeEventHandler.sendMessage(m);
+        }
+
+    }
+
+}
+
diff --git a/media/jni/Android.mk b/media/jni/Android.mk
index a6a25cd..6eec215a 100644
--- a/media/jni/Android.mk
+++ b/media/jni/Android.mk
@@ -11,7 +11,8 @@
     android_media_MediaScanner.cpp \
     android_media_MediaMetadataRetriever.cpp \
     android_media_ResampleInputStream.cpp \
-    android_media_MediaProfiles.cpp
+    android_media_MediaProfiles.cpp \
+    android_media_AmrInputStream.cpp
 
 LOCAL_SHARED_LIBRARIES := \
     libandroid_runtime \
@@ -23,35 +24,26 @@
     libui \
     libcutils \
     libsurfaceflinger_client \
+    libstagefright \
     libcamera_client
 
 ifneq ($(BUILD_WITHOUT_PV),true)
 
-LOCAL_SRC_FILES += \
-    android_media_AmrInputStream.cpp
-
 LOCAL_SHARED_LIBRARIES += \
-    libopencore_player          \
-    libomx_amrenc_sharedlibrary
+    libopencore_player
 else
     LOCAL_CFLAGS += -DNO_OPENCORE
 endif
 
-ifeq ($(BUILD_WITH_FULL_STAGEFRIGHT),true)
-
-LOCAL_CFLAGS += -DBUILD_WITH_FULL_STAGEFRIGHT=1
-
-LOCAL_SHARED_LIBRARIES += \
-    libstagefright
-
-endif
-
 LOCAL_STATIC_LIBRARIES :=
 
 LOCAL_C_INCLUDES += \
     external/tremor/Tremor \
     frameworks/base/core/jni \
     frameworks/base/media/libmedia \
+    frameworks/base/media/libstagefright/codecs/amrnb/enc/src \
+    frameworks/base/media/libstagefright/codecs/amrnb/common \
+    frameworks/base/media/libstagefright/codecs/amrnb/common/include \
     $(PV_INCLUDES) \
     $(JNI_H_INCLUDE) \
     $(call include-path-for, corecg graphics)
@@ -65,4 +57,5 @@
 include $(BUILD_SHARED_LIBRARY)
 
 # build libsoundpool.so
-include $(LOCAL_PATH)/soundpool/Android.mk
+# build libaudioeffect_jni.so
+include $(call all-makefiles-under,$(LOCAL_PATH))
diff --git a/media/jni/android_media_AmrInputStream.cpp b/media/jni/android_media_AmrInputStream.cpp
index c4dd07e..f8aecdd 100644
--- a/media/jni/android_media_AmrInputStream.cpp
+++ b/media/jni/android_media_AmrInputStream.cpp
@@ -18,36 +18,43 @@
 #define LOG_TAG "AmrInputStream"
 #include "utils/Log.h"
 
-#include <media/mediarecorder.h>
-#include <stdio.h>
-#include <assert.h>
-#include <limits.h>
-#include <unistd.h>
-#include <fcntl.h>
-#include <utils/threads.h>
-
 #include "jni.h"
 #include "JNIHelp.h"
 #include "android_runtime/AndroidRuntime.h"
-#include "gsmamr_encoder_wrapper.h"
-
+#include "gsmamr_enc.h"
 
 // ----------------------------------------------------------------------------
 
 using namespace android;
 
 // Corresponds to max bit rate of 12.2 kbps.
-static const int aMaxOutputBufferSize = 32;
+static const int MAX_OUTPUT_BUFFER_SIZE = 32;
+static const int FRAME_DURATION_MS = 20;
+static const int SAMPLING_RATE_HZ = 8000;
+static const int SAMPLES_PER_FRAME = ((SAMPLING_RATE_HZ * FRAME_DURATION_MS) / 1000);
+static const int BYTES_PER_SAMPLE = 2;  // Assume 16-bit PCM samples
+static const int BYTES_PER_FRAME = (SAMPLES_PER_FRAME * BYTES_PER_SAMPLE);
 
-static const int SAMPLES_PER_FRAME = 8000 * 20 / 1000;
+struct GsmAmrEncoderState {
+    GsmAmrEncoderState()
+        : mEncState(NULL),
+          mSidState(NULL),
+          mLastModeUsed(0) {
+    }
 
+    ~GsmAmrEncoderState() {}
+
+    void*   mEncState;
+    void*   mSidState;
+    int32_t mLastModeUsed;
+};
 
 //
 // helper function to throw an exception
 //
 static void throwException(JNIEnv *env, const char* ex, const char* fmt, int data) {
     if (jclass cls = env->FindClass(ex)) {
-        char msg[1000];
+        char msg[128];
         sprintf(msg, fmt, data);
         env->ThrowNew(cls, msg);
         env->DeleteLocalRef(cls);
@@ -56,34 +63,21 @@
 
 static jint android_media_AmrInputStream_GsmAmrEncoderNew
         (JNIEnv *env, jclass clazz) {
-    CPvGsmAmrEncoder* gae = new CPvGsmAmrEncoder();
+    GsmAmrEncoderState* gae = new GsmAmrEncoderState();
     if (gae == NULL) {
-        throwException(env, "java/lang/IllegalStateException",
-                "new CPvGsmAmrEncoder() failed", 0);
+        throwException(env, "java/lang/RuntimeException",
+                "Out of memory", 0);
     }
     return (jint)gae;
 }
 
 static void android_media_AmrInputStream_GsmAmrEncoderInitialize
         (JNIEnv *env, jclass clazz, jint gae) {
-    // set input parameters
-    TEncodeProperties encodeProps;
-    encodeProps.iInBitsPerSample = 16;
-    encodeProps.iInSamplingRate = 8000;
-    encodeProps.iInClockRate = 1000;
-    encodeProps.iInNumChannels = 1;
-    encodeProps.iInInterleaveMode = TEncodeProperties::EINTERLEAVE_LR;
-    encodeProps.iMode = CPvGsmAmrEncoder::GSM_AMR_12_2;
-    encodeProps.iBitStreamFormat = false;
-    encodeProps.iAudioObjectType = 0;
-    encodeProps.iOutSamplingRate = encodeProps.iInSamplingRate;
-    encodeProps.iOutNumChannels = encodeProps.iInNumChannels;
-    encodeProps.iOutClockRate = encodeProps.iInClockRate;
-
-    if (int rtn = ((CPvGsmAmrEncoder*)gae)->
-            InitializeEncoder(aMaxOutputBufferSize, &encodeProps)) {
+    GsmAmrEncoderState *state = (GsmAmrEncoderState *) gae;
+    int32_t nResult = AMREncodeInit(&state->mEncState, &state->mSidState, false);
+    if (nResult != OK) {
         throwException(env, "java/lang/IllegalArgumentException",
-                "CPvGsmAmrEncoder::InitializeEncoder failed %d", rtn);
+                "GsmAmrEncoder initialization failed %d", nResult);
     }
 }
 
@@ -91,42 +85,23 @@
         (JNIEnv *env, jclass clazz,
          jint gae, jbyteArray pcm, jint pcmOffset, jbyteArray amr, jint amrOffset) {
 
-    // set up input stream
-    jbyte inBuf[SAMPLES_PER_FRAME*2];
-    TInputAudioStream in;
-    in.iSampleBuffer = (uint8*)inBuf;
+    jbyte inBuf[BYTES_PER_FRAME];
+    jbyte outBuf[MAX_OUTPUT_BUFFER_SIZE];
+
     env->GetByteArrayRegion(pcm, pcmOffset, sizeof(inBuf), inBuf);
-    in.iSampleLength = sizeof(inBuf);
-    in.iMode = CPvGsmAmrEncoder::GSM_AMR_12_2;
-    in.iStartTime = 0;
-    in.iStopTime = 0;
-
-    // set up output stream
-    jbyte outBuf[aMaxOutputBufferSize];
-    int32 sampleFrameSize[1] = { 0 };
-    TOutputAudioStream out;
-    out.iBitStreamBuffer = (uint8*)outBuf;
-    out.iNumSampleFrames = 0;
-    out.iSampleFrameSize = sampleFrameSize;
-    out.iStartTime = 0;
-    out.iStopTime = 0;
-
-    // encode
-    if (int rtn = ((CPvGsmAmrEncoder*)gae)->Encode(in, out)) {
-        throwException(env, "java/io/IOException", "CPvGsmAmrEncoder::Encode failed %d", rtn);
+    GsmAmrEncoderState *state = (GsmAmrEncoderState *) gae;
+    int32_t length = AMREncode(state->mEncState, state->mSidState,
+                                (Mode) MR122,
+                                (int16_t *) inBuf,
+                                (unsigned char *) outBuf,
+                                (Frame_Type_3GPP*) &state->mLastModeUsed,
+                                AMR_TX_WMF);
+    if (length < 0) {
+        throwException(env, "java/io/IOException",
+                "Failed to encode a frame with error code: %d", length);
         return -1;
     }
 
-    // validate one-frame assumption
-    if (out.iNumSampleFrames != 1) {
-        throwException(env, "java/io/IOException",
-                "CPvGsmAmrEncoder::Encode more than one frame returned %d", out.iNumSampleFrames);
-        return 0;
-    }
-
-    // copy result
-    int length = out.iSampleFrameSize[0];
-
     // The 1st byte of PV AMR frames are WMF (Wireless Multimedia Forum)
     // bitpacked, i.e.;
     //    [P(4) + FT(4)]. Q=1 for good frame, P=padding bit, 0
@@ -144,15 +119,15 @@
 
 static void android_media_AmrInputStream_GsmAmrEncoderCleanup
         (JNIEnv *env, jclass clazz, jint gae) {
-    if (int rtn = ((CPvGsmAmrEncoder*)gae)->CleanupEncoder()) {
-        throwException(env, "java/lang/IllegalStateException",
-                "CPvGsmAmrEncoder::CleanupEncoder failed %d", rtn);
-    }
+    GsmAmrEncoderState *state = (GsmAmrEncoderState *)gae;
+    AMREncodeExit(&state->mEncState, &state->mSidState);
+    state->mEncState = NULL;
+    state->mSidState = NULL;
 }
 
 static void android_media_AmrInputStream_GsmAmrEncoderDelete
         (JNIEnv *env, jclass clazz, jint gae) {
-    delete (CPvGsmAmrEncoder*)gae;
+    delete (GsmAmrEncoderState*)gae;
 }
 
 // ----------------------------------------------------------------------------
diff --git a/media/jni/android_media_MediaPlayer.cpp b/media/jni/android_media_MediaPlayer.cpp
index 8ed3730..aedb54a 100644
--- a/media/jni/android_media_MediaPlayer.cpp
+++ b/media/jni/android_media_MediaPlayer.cpp
@@ -292,7 +292,7 @@
     if (surface != NULL) {
         const sp<Surface> native_surface = get_surface(env, surface);
         LOGV("prepare: surface=%p (id=%d)",
-             native_surface.get(), native_surface->ID());
+             native_surface.get(), native_surface->getIdentity());
         mp->setVideoSurface(native_surface);
     }
 }
@@ -332,7 +332,7 @@
     if (surface != NULL) {
         const sp<Surface> native_surface = get_surface(env, surface);
         LOGV("prepareAsync: surface=%p (id=%d)",
-             native_surface.get(), native_surface->ID());
+             native_surface.get(), native_surface->getIdentity());
         mp->setVideoSurface(native_surface);
     }
     process_media_player_call( env, thiz, mp->prepareAsync(), "java/io/IOException", "Prepare Async failed." );
@@ -636,7 +636,7 @@
         return;
     }
 
-    fields.surface_native = env->GetFieldID(surface, "mSurface", "I");
+    fields.surface_native = env->GetFieldID(surface, ANDROID_VIEW_SURFACE_JNI_ID, "I");
     if (fields.surface_native == NULL) {
         jniThrowException(env, "java/lang/RuntimeException", "Can't find Surface.mSurface");
         return;
@@ -681,18 +681,6 @@
 }
 
 static jint
-android_media_MediaPlayer_snoop(JNIEnv* env, jobject thiz, jobject data, jint kind) {
-    jshort* ar = (jshort*)env->GetPrimitiveArrayCritical((jarray)data, 0);
-    jsize len = env->GetArrayLength((jarray)data);
-    int ret = 0;
-    if (ar) {
-        ret = MediaPlayer::snoop(ar, len, kind);
-        env->ReleasePrimitiveArrayCritical((jarray)data, ar, 0);
-    }
-    return ret;
-}
-
-static jint
 android_media_MediaPlayer_native_suspend_resume(
         JNIEnv *env, jobject thiz, jboolean isSuspend) {
     LOGV("suspend_resume(%d)", isSuspend);
@@ -705,6 +693,27 @@
     return isSuspend ? mp->suspend() : mp->resume();
 }
 
+static void android_media_MediaPlayer_set_audio_session_id(JNIEnv *env,  jobject thiz, jint sessionId) {
+    LOGV("set_session_id(): %d", sessionId);
+    sp<MediaPlayer> mp = getMediaPlayer(env, thiz);
+    if (mp == NULL ) {
+        jniThrowException(env, "java/lang/IllegalStateException", NULL);
+        return;
+    }
+    process_media_player_call( env, thiz, mp->setAudioSessionId(sessionId), NULL, NULL );
+}
+
+static jint android_media_MediaPlayer_get_audio_session_id(JNIEnv *env,  jobject thiz) {
+    LOGV("get_session_id()");
+    sp<MediaPlayer> mp = getMediaPlayer(env, thiz);
+    if (mp == NULL ) {
+        jniThrowException(env, "java/lang/IllegalStateException", NULL);
+        return 0;
+    }
+
+    return mp->getAudioSessionId();
+}
+
 // ----------------------------------------------------------------------------
 
 static JNINativeMethod gMethods[] = {
@@ -736,8 +745,9 @@
     {"native_init",         "()V",                              (void *)android_media_MediaPlayer_native_init},
     {"native_setup",        "(Ljava/lang/Object;)V",            (void *)android_media_MediaPlayer_native_setup},
     {"native_finalize",     "()V",                              (void *)android_media_MediaPlayer_native_finalize},
-    {"snoop",               "([SI)I",                           (void *)android_media_MediaPlayer_snoop},
     {"native_suspend_resume", "(Z)I",                           (void *)android_media_MediaPlayer_native_suspend_resume},
+    {"getAudioSessionId",   "()I",                              (void *)android_media_MediaPlayer_get_audio_session_id},
+    {"setAudioSessionId",   "(I)V",                             (void *)android_media_MediaPlayer_set_audio_session_id},
 };
 
 static const char* const kClassPathName = "android/media/MediaPlayer";
diff --git a/media/jni/android_media_MediaProfiles.cpp b/media/jni/android_media_MediaProfiles.cpp
index 7d7533a..cce9fd0 100644
--- a/media/jni/android_media_MediaProfiles.cpp
+++ b/media/jni/android_media_MediaProfiles.cpp
@@ -162,26 +162,26 @@
 }
 
 static jobject
-android_media_MediaProfiles_native_get_camcorder_profile(JNIEnv *env, jobject thiz, jint quality)
+android_media_MediaProfiles_native_get_camcorder_profile(JNIEnv *env, jobject thiz, jint id, jint quality)
 {
-    LOGV("native_get_camcorder_profile: %d", quality);
+    LOGV("native_get_camcorder_profile: %d %d", id, quality);
     if (quality != CAMCORDER_QUALITY_HIGH && quality != CAMCORDER_QUALITY_LOW) {
         jniThrowException(env, "java/lang/RuntimeException", "Unknown camcorder profile quality");
         return NULL;
     }
 
     camcorder_quality q = static_cast<camcorder_quality>(quality);
-    int duration         = sProfiles->getCamcorderProfileParamByName("duration", q);
-    int fileFormat       = sProfiles->getCamcorderProfileParamByName("file.format", q);
-    int videoCodec       = sProfiles->getCamcorderProfileParamByName("vid.codec",   q);
-    int videoBitRate     = sProfiles->getCamcorderProfileParamByName("vid.bps",     q);
-    int videoFrameRate   = sProfiles->getCamcorderProfileParamByName("vid.fps",     q);
-    int videoFrameWidth  = sProfiles->getCamcorderProfileParamByName("vid.width",   q);
-    int videoFrameHeight = sProfiles->getCamcorderProfileParamByName("vid.height",  q);
-    int audioCodec       = sProfiles->getCamcorderProfileParamByName("aud.codec",   q);
-    int audioBitRate     = sProfiles->getCamcorderProfileParamByName("aud.bps",     q);
-    int audioSampleRate  = sProfiles->getCamcorderProfileParamByName("aud.hz",      q);
-    int audioChannels    = sProfiles->getCamcorderProfileParamByName("aud.ch",      q);
+    int duration         = sProfiles->getCamcorderProfileParamByName("duration",    id, q);
+    int fileFormat       = sProfiles->getCamcorderProfileParamByName("file.format", id, q);
+    int videoCodec       = sProfiles->getCamcorderProfileParamByName("vid.codec",   id, q);
+    int videoBitRate     = sProfiles->getCamcorderProfileParamByName("vid.bps",     id, q);
+    int videoFrameRate   = sProfiles->getCamcorderProfileParamByName("vid.fps",     id, q);
+    int videoFrameWidth  = sProfiles->getCamcorderProfileParamByName("vid.width",   id, q);
+    int videoFrameHeight = sProfiles->getCamcorderProfileParamByName("vid.height",  id, q);
+    int audioCodec       = sProfiles->getCamcorderProfileParamByName("aud.codec",   id, q);
+    int audioBitRate     = sProfiles->getCamcorderProfileParamByName("aud.bps",     id, q);
+    int audioSampleRate  = sProfiles->getCamcorderProfileParamByName("aud.hz",      id, q);
+    int audioChannels    = sProfiles->getCamcorderProfileParamByName("aud.ch",      id, q);
 
     // Check on the values retrieved
     if (duration == -1 || fileFormat == -1 || videoCodec == -1 || audioCodec == -1 ||
@@ -253,17 +253,17 @@
 }
 
 static jint
-android_media_MediaProfiles_native_get_num_image_encoding_quality_levels(JNIEnv *env, jobject thiz)
+android_media_MediaProfiles_native_get_num_image_encoding_quality_levels(JNIEnv *env, jobject thiz, jint cameraId)
 {
     LOGV("native_get_num_image_encoding_quality_levels");
-    return sProfiles->getImageEncodingQualityLevels().size();
+    return sProfiles->getImageEncodingQualityLevels(cameraId).size();
 }
 
 static jint
-android_media_MediaProfiles_native_get_image_encoding_quality_level(JNIEnv *env, jobject thiz, jint index)
+android_media_MediaProfiles_native_get_image_encoding_quality_level(JNIEnv *env, jobject thiz, jint cameraId, jint index)
 {
     LOGV("native_get_image_encoding_quality_level");
-    Vector<int> levels = sProfiles->getImageEncodingQualityLevels();
+    Vector<int> levels = sProfiles->getImageEncodingQualityLevels(cameraId);
     if (index < 0 || index >= levels.size()) {
         jniThrowException(env, "java/lang/IllegalArgumentException", "out of array boundary");
         return -1;
@@ -287,7 +287,7 @@
 
 static JNINativeMethod gMethodsForCamcorderProfileClass[] = {
     {"native_init",                            "()V",                    (void *)android_media_MediaProfiles_native_init},
-    {"native_get_camcorder_profile",           "(I)Landroid/media/CamcorderProfile;",
+    {"native_get_camcorder_profile",           "(II)Landroid/media/CamcorderProfile;",
                                                                          (void *)android_media_MediaProfiles_native_get_camcorder_profile},
 };
 
@@ -302,8 +302,8 @@
 static JNINativeMethod gMethodsForCameraProfileClass[] = {
     {"native_init",                            "()V",                    (void *)android_media_MediaProfiles_native_init},
     {"native_get_num_image_encoding_quality_levels",
-                                               "()I",                    (void *)android_media_MediaProfiles_native_get_num_image_encoding_quality_levels},
-    {"native_get_image_encoding_quality_level","(I)I",                   (void *)android_media_MediaProfiles_native_get_image_encoding_quality_level},
+                                               "(I)I",                   (void *)android_media_MediaProfiles_native_get_num_image_encoding_quality_levels},
+    {"native_get_image_encoding_quality_level","(II)I",                   (void *)android_media_MediaProfiles_native_get_image_encoding_quality_level},
 };
 
 static const char* const kEncoderCapabilitiesClassPathName = "android/media/EncoderCapabilities";
diff --git a/media/jni/android_media_MediaRecorder.cpp b/media/jni/android_media_MediaRecorder.cpp
index 00af3a2..c113ffe 100644
--- a/media/jni/android_media_MediaRecorder.cpp
+++ b/media/jni/android_media_MediaRecorder.cpp
@@ -317,8 +317,8 @@
 
     jobject surface = env->GetObjectField(thiz, fields.surface);
     if (surface != NULL) {
-        const sp<Surface>& native_surface = get_surface(env, surface);
-        LOGI("prepare: surface=%p (id=%d)", native_surface.get(), native_surface->ID());
+        const sp<Surface> native_surface = get_surface(env, surface);
+        LOGI("prepare: surface=%p (identity=%d)", native_surface.get(), native_surface->getIdentity());
         if (process_media_recorder_call(env, mr->setPreviewSurface(native_surface), "java/lang/RuntimeException", "setPreviewSurface failed.")) {
             return;
         }
@@ -403,7 +403,7 @@
         return;
     }
 
-    fields.surface_native = env->GetFieldID(surface, "mSurface", "I");
+    fields.surface_native = env->GetFieldID(surface, ANDROID_VIEW_SURFACE_JNI_ID, "I");
     if (fields.surface_native == NULL) {
         jniThrowException(env, "java/lang/RuntimeException", "Can't find Surface.mSurface");
         return;
diff --git a/media/jni/android_media_MediaScanner.cpp b/media/jni/android_media_MediaScanner.cpp
index 2ab2445..273f1af 100644
--- a/media/jni/android_media_MediaScanner.cpp
+++ b/media/jni/android_media_MediaScanner.cpp
@@ -31,13 +31,7 @@
 #include "JNIHelp.h"
 #include "android_runtime/AndroidRuntime.h"
 
-#ifndef NO_OPENCORE
-#include "pvmediascanner.h"
-#endif
-
-#if BUILD_WITH_FULL_STAGEFRIGHT
 #include <media/stagefright/StagefrightMediaScanner.h>
-#endif
 
 // ----------------------------------------------------------------------------
 
@@ -286,25 +280,10 @@
     }
 }
 
-static MediaScanner *createMediaScanner() {
-#if BUILD_WITH_FULL_STAGEFRIGHT
-    char value[PROPERTY_VALUE_MAX];
-    if (property_get("media.stagefright.enable-scan", value, NULL)
-        && (!strcmp(value, "1") || !strcasecmp(value, "true"))) {
-        return new StagefrightMediaScanner;
-    }
-#endif
-#ifndef NO_OPENCORE
-    return new PVMediaScanner();
-#endif
-
-    return NULL;
-}
-
 static void
 android_media_MediaScanner_native_setup(JNIEnv *env, jobject thiz)
 {
-    MediaScanner *mp = createMediaScanner();
+    MediaScanner *mp = new StagefrightMediaScanner;
 
     if (mp == NULL) {
         jniThrowException(env, "java/lang/RuntimeException", "Out of memory");
diff --git a/media/jni/audioeffect/Android.mk b/media/jni/audioeffect/Android.mk
new file mode 100644
index 0000000..4c5cf71
--- /dev/null
+++ b/media/jni/audioeffect/Android.mk
@@ -0,0 +1,17 @@
+LOCAL_PATH:= $(call my-dir)
+include $(CLEAR_VARS)
+
+LOCAL_SRC_FILES:= \
+	android_media_AudioEffect.cpp \
+	android_media_Visualizer.cpp
+
+LOCAL_SHARED_LIBRARIES := \
+	libcutils \
+	libutils \
+	libandroid_runtime \
+	libnativehelper \
+	libmedia
+
+LOCAL_MODULE:= libaudioeffect_jni
+
+include $(BUILD_SHARED_LIBRARY)
diff --git a/media/jni/audioeffect/android_media_AudioEffect.cpp b/media/jni/audioeffect/android_media_AudioEffect.cpp
new file mode 100644
index 0000000..beb3dfc
--- /dev/null
+++ b/media/jni/audioeffect/android_media_AudioEffect.cpp
@@ -0,0 +1,848 @@
+/*
+ * Copyright (C) 2010 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include <stdio.h>
+
+//#define LOG_NDEBUG 0
+#define LOG_TAG "AudioEffects-JNI"
+
+#include <utils/Log.h>
+#include <nativehelper/jni.h>
+#include <nativehelper/JNIHelp.h>
+#include <android_runtime/AndroidRuntime.h>
+#include "media/AudioEffect.h"
+
+using namespace android;
+
+#define AUDIOEFFECT_SUCCESS                      0
+#define AUDIOEFFECT_ERROR                       -1
+#define AUDIOEFFECT_ERROR_ALREADY_EXISTS        -2
+#define AUDIOEFFECT_ERROR_NO_INIT               -3
+#define AUDIOEFFECT_ERROR_BAD_VALUE             -4
+#define AUDIOEFFECT_ERROR_INVALID_OPERATION     -5
+#define AUDIOEFFECT_ERROR_NO_MEMORY             -6
+#define AUDIOEFFECT_ERROR_DEAD_OBJECT           -7
+
+// ----------------------------------------------------------------------------
+static const char* const kClassPathName = "android/media/AudioEffect";
+
+struct fields_t {
+    // these fields provide access from C++ to the...
+    jclass    clazzEffect;          // AudioEffect class
+    jmethodID midPostNativeEvent;   // event post callback method
+    jfieldID  fidNativeAudioEffect; // stores in Java the native AudioEffect object
+    jfieldID  fidJniData;           // stores in Java additional resources used by the native AudioEffect
+    jclass    clazzDesc;            // AudioEffect.Descriptor class
+    jmethodID midDescCstor;         // AudioEffect.Descriptor class constructor
+};
+static fields_t fields;
+
+struct effect_callback_cookie {
+    jclass      audioEffect_class;  // AudioEffect class
+    jobject     audioEffect_ref;    // AudioEffect object instance
+ };
+
+// ----------------------------------------------------------------------------
+class AudioEffectJniStorage {
+    public:
+        effect_callback_cookie mCallbackData;
+
+    AudioEffectJniStorage() {
+    }
+
+    ~AudioEffectJniStorage() {
+    }
+
+};
+
+
+static jint translateError(int code) {
+    switch(code) {
+    case NO_ERROR:
+        return AUDIOEFFECT_SUCCESS;
+    case ALREADY_EXISTS:
+        return AUDIOEFFECT_ERROR_ALREADY_EXISTS;
+    case NO_INIT:
+        return AUDIOEFFECT_ERROR_NO_INIT;
+    case BAD_VALUE:
+        return AUDIOEFFECT_ERROR_BAD_VALUE;
+    case INVALID_OPERATION:
+        return AUDIOEFFECT_ERROR_INVALID_OPERATION;
+    case NO_MEMORY:
+        return AUDIOEFFECT_ERROR_NO_MEMORY;
+    case DEAD_OBJECT:
+        return AUDIOEFFECT_ERROR_DEAD_OBJECT;
+    default:
+        return AUDIOEFFECT_ERROR;
+    }
+}
+
+
+// ----------------------------------------------------------------------------
+static void effectCallback(int event, void* user, void *info) {
+
+    effect_param_t *p;
+    int arg1 = 0;
+    int arg2 = 0;
+    jobject obj = NULL;
+    jbyteArray array = NULL;
+    jbyte *bytes;
+    bool param;
+    size_t size;
+
+    effect_callback_cookie *callbackInfo = (effect_callback_cookie *)user;
+    JNIEnv *env = AndroidRuntime::getJNIEnv();
+
+    LOGV("effectCallback: callbackInfo %p, audioEffect_ref %p audioEffect_class %p",
+            callbackInfo,
+            callbackInfo->audioEffect_ref,
+            callbackInfo->audioEffect_class);
+
+    if (!user || !env) {
+        LOGW("effectCallback error user %p, env %p", user, env);
+        return;
+    }
+
+    switch (event) {
+    case AudioEffect::EVENT_CONTROL_STATUS_CHANGED:
+        if (info == 0) {
+            LOGW("EVENT_CONTROL_STATUS_CHANGED info == NULL");
+            goto effectCallback_Exit;
+        }
+        param = *(bool *)info;
+        arg1 = (int)param;
+        LOGV("EVENT_CONTROL_STATUS_CHANGED");
+        break;
+    case AudioEffect::EVENT_ENABLE_STATUS_CHANGED:
+        if (info == 0) {
+            LOGW("EVENT_ENABLE_STATUS_CHANGED info == NULL");
+            goto effectCallback_Exit;
+        }
+        param = *(bool *)info;
+        arg1 = (int)param;
+        LOGV("EVENT_ENABLE_STATUS_CHANGED");
+        break;
+    case AudioEffect::EVENT_PARAMETER_CHANGED:
+        if (info == 0) {
+            LOGW("EVENT_PARAMETER_CHANGED info == NULL");
+            goto effectCallback_Exit;
+        }
+        p = (effect_param_t *)info;
+        if (p->psize == 0 || p->vsize == 0) {
+            goto effectCallback_Exit;
+        }
+        // arg1 contains offset of parameter value from start of byte array
+        arg1 = sizeof(effect_param_t) + ((p->psize - 1) / sizeof(int) + 1) * sizeof(int);
+        size = arg1 + p->vsize;
+        array = env->NewByteArray(size);
+        if (array == NULL) {
+            LOGE("effectCallback: Couldn't allocate byte array for parameter data");
+            goto effectCallback_Exit;
+        }
+        bytes = env->GetByteArrayElements(array, NULL);
+        memcpy(bytes, p, size);
+        env->ReleaseByteArrayElements(array, bytes, 0);
+        obj = array;
+        LOGV("EVENT_PARAMETER_CHANGED");
+       break;
+    case AudioEffect::EVENT_ERROR:
+        LOGW("EVENT_ERROR");
+        break;
+    }
+
+    env->CallStaticVoidMethod(
+        callbackInfo->audioEffect_class,
+        fields.midPostNativeEvent,
+        callbackInfo->audioEffect_ref, event, arg1, arg2, obj);
+
+effectCallback_Exit:
+    if (array) {
+        env->DeleteLocalRef(array);
+    }
+
+    if (env->ExceptionCheck()) {
+        env->ExceptionDescribe();
+        env->ExceptionClear();
+    }
+}
+
+// ----------------------------------------------------------------------------
+// This function gets some field IDs, which in turn causes class initialization.
+// It is called from a static block in AudioEffect, which won't run until the
+// first time an instance of this class is used.
+static void
+android_media_AudioEffect_native_init(JNIEnv *env)
+{
+
+    LOGV("android_media_AudioEffect_native_init");
+
+    fields.clazzEffect = NULL;
+    fields.clazzDesc = NULL;
+
+    // Get the AudioEffect class
+    jclass clazz = env->FindClass(kClassPathName);
+    if (clazz == NULL) {
+        LOGE("Can't find %s", kClassPathName);
+        return;
+    }
+
+    fields.clazzEffect = (jclass)env->NewGlobalRef(clazz);
+
+    // Get the postEvent method
+    fields.midPostNativeEvent = env->GetStaticMethodID(
+            fields.clazzEffect,
+            "postEventFromNative", "(Ljava/lang/Object;IIILjava/lang/Object;)V");
+    if (fields.midPostNativeEvent == NULL) {
+        LOGE("Can't find AudioEffect.%s", "postEventFromNative");
+        return;
+    }
+
+    // Get the variables fields
+    //      nativeTrackInJavaObj
+    fields.fidNativeAudioEffect = env->GetFieldID(
+            fields.clazzEffect,
+            "mNativeAudioEffect", "I");
+    if (fields.fidNativeAudioEffect == NULL) {
+        LOGE("Can't find AudioEffect.%s", "mNativeAudioEffect");
+        return;
+    }
+    //      fidJniData;
+    fields.fidJniData = env->GetFieldID(
+            fields.clazzEffect,
+            "mJniData", "I");
+    if (fields.fidJniData == NULL) {
+        LOGE("Can't find AudioEffect.%s", "mJniData");
+        return;
+    }
+
+    clazz = env->FindClass("android/media/AudioEffect$Descriptor");
+    if (clazz == NULL) {
+        LOGE("Can't find android/media/AudioEffect$Descriptor class");
+        return;
+    }
+    fields.clazzDesc = (jclass)env->NewGlobalRef(clazz);
+
+    fields.midDescCstor
+            = env->GetMethodID(
+                    fields.clazzDesc,
+                    "<init>",
+                    "(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V");
+    if (fields.midDescCstor == NULL) {
+        LOGE("Can't find android/media/AudioEffect$Descriptor class constructor");
+        return;
+    }
+}
+
+
+static jint
+android_media_AudioEffect_native_setup(JNIEnv *env, jobject thiz, jobject weak_this,
+        jstring type, jstring uuid, jint priority, jint sessionId, jintArray jId, jobjectArray javadesc)
+{
+    LOGV("android_media_AudioEffect_native_setup");
+    AudioEffectJniStorage* lpJniStorage = NULL;
+    int lStatus = AUDIOEFFECT_ERROR_NO_MEMORY;
+    AudioEffect* lpAudioEffect = NULL;
+    jint* nId = NULL;
+    const char *typeStr = NULL;
+    const char *uuidStr = NULL;
+    effect_descriptor_t desc;
+    jobject jdesc;
+    char str[EFFECT_STRING_LEN_MAX];
+    jstring jdescType;
+    jstring jdescUuid;
+    jstring jdescConnect;
+    jstring jdescName;
+    jstring jdescImplementor;
+
+    if (type != NULL) {
+        typeStr = env->GetStringUTFChars(type, NULL);
+        if (typeStr == NULL) {  // Out of memory
+            jniThrowException(env, "java/lang/RuntimeException", "Out of memory");
+            goto setup_failure;
+        }
+    }
+
+    if (uuid != NULL) {
+        uuidStr = env->GetStringUTFChars(uuid, NULL);
+        if (uuidStr == NULL) {  // Out of memory
+            jniThrowException(env, "java/lang/RuntimeException", "Out of memory");
+            goto setup_failure;
+        }
+    }
+
+    if (typeStr == NULL && uuidStr == NULL) {
+        lStatus = AUDIOEFFECT_ERROR_BAD_VALUE;
+        goto setup_failure;
+    }
+
+    lpJniStorage = new AudioEffectJniStorage();
+    if (lpJniStorage == NULL) {
+        LOGE("setup: Error creating JNI Storage");
+        goto setup_failure;
+    }
+
+    lpJniStorage->mCallbackData.audioEffect_class = (jclass)env->NewGlobalRef(fields.clazzEffect);
+    // we use a weak reference so the AudioEffect object can be garbage collected.
+    lpJniStorage->mCallbackData.audioEffect_ref = env->NewGlobalRef(weak_this);
+
+    LOGV("setup: lpJniStorage: %p audioEffect_ref %p audioEffect_class %p, &mCallbackData %p",
+            lpJniStorage,
+            lpJniStorage->mCallbackData.audioEffect_ref,
+            lpJniStorage->mCallbackData.audioEffect_class,
+            &lpJniStorage->mCallbackData);
+
+    if (jId) {
+        nId = (jint *) env->GetPrimitiveArrayCritical(jId, NULL);
+        if (nId == NULL) {
+            LOGE("setup: Error retrieving id pointer");
+            lStatus = AUDIOEFFECT_ERROR_BAD_VALUE;
+            goto setup_failure;
+        }
+    } else {
+        LOGE("setup: NULL java array for id pointer");
+        lStatus = AUDIOEFFECT_ERROR_BAD_VALUE;
+        goto setup_failure;
+    }
+
+    // create the native AudioEffect object
+    lpAudioEffect = new AudioEffect(typeStr,
+                                    uuidStr,
+                                    priority,
+                                    effectCallback,
+                                    &lpJniStorage->mCallbackData,
+                                    sessionId,
+                                    0);
+    if (lpAudioEffect == NULL) {
+        LOGE("Error creating AudioEffect");
+        goto setup_failure;
+    }
+
+    lStatus = translateError(lpAudioEffect->initCheck());
+    if (lStatus != AUDIOEFFECT_SUCCESS && lStatus != AUDIOEFFECT_ERROR_ALREADY_EXISTS) {
+        LOGE("AudioEffect initCheck failed %d", lStatus);
+        goto setup_failure;
+    }
+
+    nId[0] = lpAudioEffect->id();
+
+    env->ReleasePrimitiveArrayCritical(jId, nId, 0);
+    nId = NULL;
+
+    if (typeStr) {
+        env->ReleaseStringUTFChars(type, typeStr);
+        typeStr = NULL;
+    }
+
+    if (uuidStr) {
+        env->ReleaseStringUTFChars(uuid, uuidStr);
+        uuidStr = NULL;
+    }
+
+    // get the effect descriptor
+    desc = lpAudioEffect->descriptor();
+
+    AudioEffect::guidToString(&desc.type, str, EFFECT_STRING_LEN_MAX);
+    jdescType = env->NewStringUTF(str);
+
+    AudioEffect::guidToString(&desc.uuid, str, EFFECT_STRING_LEN_MAX);
+    jdescUuid = env->NewStringUTF(str);
+
+    if ((desc.flags & EFFECT_FLAG_TYPE_MASK) == EFFECT_FLAG_TYPE_AUXILIARY) {
+        jdescConnect = env->NewStringUTF("Auxiliary");
+    } else {
+        jdescConnect = env->NewStringUTF("Insert");
+    }
+
+    jdescName = env->NewStringUTF(desc.name);
+    jdescImplementor = env->NewStringUTF(desc.implementor);
+
+    jdesc = env->NewObject(fields.clazzDesc,
+                           fields.midDescCstor,
+                           jdescType,
+                           jdescUuid,
+                           jdescConnect,
+                           jdescName,
+                           jdescImplementor);
+    env->DeleteLocalRef(jdescType);
+    env->DeleteLocalRef(jdescUuid);
+    env->DeleteLocalRef(jdescConnect);
+    env->DeleteLocalRef(jdescName);
+    env->DeleteLocalRef(jdescImplementor);
+    if (jdesc == NULL) {
+        LOGE("env->NewObject(fields.clazzDesc, fields.midDescCstor)");
+        goto setup_failure;
+    }
+
+    env->SetObjectArrayElement(javadesc, 0, jdesc);
+
+    env->SetIntField(thiz, fields.fidNativeAudioEffect, (int)lpAudioEffect);
+
+    env->SetIntField(thiz, fields.fidJniData, (int)lpJniStorage);
+
+    return AUDIOEFFECT_SUCCESS;
+
+    // failures:
+setup_failure:
+
+    if (nId != NULL) {
+        env->ReleasePrimitiveArrayCritical(jId, nId, 0);
+    }
+
+    if (lpAudioEffect) {
+        delete lpAudioEffect;
+    }
+    env->SetIntField(thiz, fields.fidNativeAudioEffect, 0);
+
+    if (lpJniStorage) {
+        delete lpJniStorage;
+    }
+    env->SetIntField(thiz, fields.fidJniData, 0);
+
+    if (uuidStr != NULL) {
+        env->ReleaseStringUTFChars(uuid, uuidStr);
+    }
+
+    if (typeStr != NULL) {
+        env->ReleaseStringUTFChars(type, typeStr);
+    }
+
+    return lStatus;
+}
+
+
+// ----------------------------------------------------------------------------
+static void android_media_AudioEffect_native_finalize(JNIEnv *env,  jobject thiz) {
+    LOGV("android_media_AudioEffect_native_finalize jobject: %x\n", (int)thiz);
+
+    // delete the AudioEffect object
+    AudioEffect* lpAudioEffect = (AudioEffect *)env->GetIntField(
+        thiz, fields.fidNativeAudioEffect);
+    if (lpAudioEffect) {
+        LOGV("deleting AudioEffect: %x\n", (int)lpAudioEffect);
+        delete lpAudioEffect;
+    }
+
+    // delete the JNI data
+    AudioEffectJniStorage* lpJniStorage = (AudioEffectJniStorage *)env->GetIntField(
+        thiz, fields.fidJniData);
+    if (lpJniStorage) {
+        LOGV("deleting pJniStorage: %x\n", (int)lpJniStorage);
+        delete lpJniStorage;
+    }
+}
+
+// ----------------------------------------------------------------------------
+static void android_media_AudioEffect_native_release(JNIEnv *env,  jobject thiz) {
+
+    // do everything a call to finalize would
+    android_media_AudioEffect_native_finalize(env, thiz);
+    // + reset the native resources in the Java object so any attempt to access
+    // them after a call to release fails.
+    env->SetIntField(thiz, fields.fidNativeAudioEffect, 0);
+    env->SetIntField(thiz, fields.fidJniData, 0);
+}
+
+static jint
+android_media_AudioEffect_native_setEnabled(JNIEnv *env, jobject thiz, jboolean enabled)
+{
+    // retrieve the AudioEffect object
+    AudioEffect* lpAudioEffect = (AudioEffect *)env->GetIntField(
+        thiz, fields.fidNativeAudioEffect);
+
+    if (lpAudioEffect == NULL) {
+        jniThrowException(env, "java/lang/IllegalStateException",
+            "Unable to retrieve AudioEffect pointer for enable()");
+        return AUDIOEFFECT_ERROR_NO_INIT;
+    }
+
+    return translateError(lpAudioEffect->setEnabled(enabled));
+}
+
+static jboolean
+android_media_AudioEffect_native_getEnabled(JNIEnv *env, jobject thiz)
+{
+    // retrieve the AudioEffect object
+    AudioEffect* lpAudioEffect = (AudioEffect *)env->GetIntField(
+        thiz, fields.fidNativeAudioEffect);
+
+    if (lpAudioEffect == NULL) {
+        jniThrowException(env, "java/lang/IllegalStateException",
+            "Unable to retrieve AudioEffect pointer for getEnabled()");
+        return false;
+    }
+
+    return (jboolean)lpAudioEffect->getEnabled();
+}
+
+
+static jboolean
+android_media_AudioEffect_native_hasControl(JNIEnv *env, jobject thiz)
+{
+    // retrieve the AudioEffect object
+    AudioEffect* lpAudioEffect = (AudioEffect *)env->GetIntField(
+        thiz, fields.fidNativeAudioEffect);
+
+    if (lpAudioEffect == NULL) {
+        jniThrowException(env, "java/lang/IllegalStateException",
+            "Unable to retrieve AudioEffect pointer for hasControl()");
+        return false;
+    }
+
+    if (lpAudioEffect->initCheck() == NO_ERROR) {
+        return true;
+    } else {
+        return false;
+    }
+}
+
+static jint android_media_AudioEffect_native_setParameter(JNIEnv *env,
+        jobject thiz, int psize, jbyteArray pJavaParam, int vsize,
+        jbyteArray pJavaValue) {
+    // retrieve the AudioEffect object
+    jbyte* lpValue = NULL;
+    jbyte* lpParam = NULL;
+    jint lStatus = AUDIOEFFECT_ERROR_BAD_VALUE;
+    effect_param_t *p;
+    int voffset;
+
+    AudioEffect* lpAudioEffect = (AudioEffect *) env->GetIntField(thiz,
+            fields.fidNativeAudioEffect);
+
+    if (lpAudioEffect == NULL) {
+        jniThrowException(env, "java/lang/IllegalStateException",
+                "Unable to retrieve AudioEffect pointer for setParameter()");
+        return AUDIOEFFECT_ERROR_NO_INIT;
+    }
+
+    if (psize == 0 || vsize == 0 || pJavaParam == NULL || pJavaValue == NULL) {
+        return AUDIOEFFECT_ERROR_BAD_VALUE;
+    }
+
+    // get the pointer for the param from the java array
+    lpParam = (jbyte *) env->GetPrimitiveArrayCritical(pJavaParam, NULL);
+    if (lpParam == NULL) {
+        LOGE("setParameter: Error retrieving param pointer");
+        goto setParameter_Exit;
+    }
+
+    // get the pointer for the value from the java array
+    lpValue = (jbyte *) env->GetPrimitiveArrayCritical(pJavaValue, NULL);
+    if (lpValue == NULL) {
+        LOGE("setParameter: Error retrieving value pointer");
+        goto setParameter_Exit;
+    }
+
+    voffset = ((psize - 1) / sizeof(int) + 1) * sizeof(int);
+    p = (effect_param_t *) malloc(sizeof(effect_param_t) + voffset + vsize);
+    memcpy(p->data, lpParam, psize);
+    p->psize = psize;
+    memcpy(p->data + voffset, lpValue, psize);
+    p->vsize = vsize;
+
+    lStatus = lpAudioEffect->setParameter(p);
+    if (lStatus == NO_ERROR) {
+        lStatus = p->status;
+    }
+
+    free(p);
+
+setParameter_Exit:
+
+    if (lpParam != NULL) {
+        env->ReleasePrimitiveArrayCritical(pJavaParam, lpParam, 0);
+    }
+    if (lpValue != NULL) {
+        env->ReleasePrimitiveArrayCritical(pJavaValue, lpValue, 0);
+    }
+    return translateError(lStatus);
+}
+
+static jint
+android_media_AudioEffect_native_getParameter(JNIEnv *env,
+        jobject thiz, int psize, jbyteArray pJavaParam,
+        jintArray pJavaValueSize, jbyteArray pJavaValue) {
+    // retrieve the AudioEffect object
+    jbyte* lpParam = NULL;
+    jbyte* lpValue = NULL;
+    jbyte* lpValueSize = NULL;
+    jint lStatus = AUDIOEFFECT_ERROR_BAD_VALUE;
+    effect_param_t *p;
+    int voffset;
+
+    AudioEffect* lpAudioEffect = (AudioEffect *) env->GetIntField(thiz,
+            fields.fidNativeAudioEffect);
+
+    if (lpAudioEffect == NULL) {
+        jniThrowException(env, "java/lang/IllegalStateException",
+                "Unable to retrieve AudioEffect pointer for getParameter()");
+        return AUDIOEFFECT_ERROR_NO_INIT;
+    }
+
+    if (psize == 0 || pJavaValueSize == NULL || pJavaParam == NULL || pJavaValue == NULL) {
+        return AUDIOEFFECT_ERROR_BAD_VALUE;
+    }
+
+    // get the pointer for the param from the java array
+    lpParam = (jbyte *) env->GetPrimitiveArrayCritical(pJavaParam, NULL);
+    if (lpParam == NULL) {
+        LOGE("getParameter: Error retrieving param pointer");
+        goto getParameter_Exit;
+    }
+
+    // get the pointer for the value from the java array
+    lpValue = (jbyte *) env->GetPrimitiveArrayCritical(pJavaValue, NULL);
+    if (lpValue == NULL) {
+        LOGE("getParameter: Error retrieving value pointer");
+        goto getParameter_Exit;
+    }
+
+    // get the pointer for the value size from the java array
+    lpValueSize = (jbyte *) env->GetPrimitiveArrayCritical(pJavaValueSize, NULL);
+    if (lpValueSize == NULL) {
+        LOGE("getParameter: Error retrieving value size pointer");
+        goto getParameter_Exit;
+    }
+
+    voffset = ((psize - 1) / sizeof(int) + 1) * sizeof(int);
+    p = (effect_param_t *) malloc(sizeof(effect_param_t) + voffset
+            + lpValueSize[0]);
+    memcpy(p->data, lpParam, psize);
+    p->psize = psize;
+    p->vsize = lpValueSize[0];
+
+    lStatus = lpAudioEffect->getParameter(p);
+    if (lStatus == NO_ERROR) {
+        lStatus = p->status;
+        if (lStatus == NO_ERROR) {
+            memcpy(lpValue, p->data + voffset, p->vsize);
+            lpValueSize[0] = p->vsize;
+        }
+    }
+
+    free(p);
+
+getParameter_Exit:
+
+    if (lpParam != NULL) {
+        env->ReleasePrimitiveArrayCritical(pJavaParam, lpParam, 0);
+    }
+    if (lpValue != NULL) {
+        env->ReleasePrimitiveArrayCritical(pJavaValue, lpValue, 0);
+    }
+    if (lpValueSize != NULL) {
+        env->ReleasePrimitiveArrayCritical(pJavaValueSize, lpValueSize, 0);
+    }
+
+    return translateError(lStatus);
+}
+
+static jint android_media_AudioEffect_native_command(JNIEnv *env, jobject thiz,
+        jint cmdCode, jint cmdSize, jbyteArray jCmdData, jintArray jReplySize,
+        jbyteArray jReplyData) {
+    jbyte* pCmdData = NULL;
+    jbyte* pReplyData = NULL;
+    jint* pReplySize = NULL;
+    jint lStatus = AUDIOEFFECT_ERROR_BAD_VALUE;
+
+    // retrieve the AudioEffect object
+    AudioEffect* lpAudioEffect = (AudioEffect *) env->GetIntField(thiz,
+            fields.fidNativeAudioEffect);
+
+    if (lpAudioEffect == NULL) {
+        jniThrowException(env, "java/lang/IllegalStateException",
+                "Unable to retrieve AudioEffect pointer for setParameter()");
+        return AUDIOEFFECT_ERROR_NO_INIT;
+    }
+
+    if ((cmdSize != 0 && jCmdData == NULL) || (jReplySize != NULL && jReplyData == NULL)) {
+        return AUDIOEFFECT_ERROR_BAD_VALUE;
+    }
+
+    // get the pointer for the command from the java array
+    if (cmdSize != 0) {
+        pCmdData = (jbyte *) env->GetPrimitiveArrayCritical(jCmdData, NULL);
+        if (pCmdData == NULL) {
+            LOGE("setParameter: Error retrieving command pointer");
+            goto command_Exit;
+        }
+    }
+
+    // get the pointer for the reply size from the java array
+    if (jReplySize != NULL) {
+        pReplySize = (jint *) env->GetPrimitiveArrayCritical(jReplySize, NULL);
+        if (pReplySize == NULL) {
+            LOGE("setParameter: Error retrieving reply pointer");
+            goto command_Exit;
+        }
+    }
+
+    // get the pointer for the reply from the java array
+    if (pReplySize != NULL && pReplySize[0] != 0 && jReplyData != NULL) {
+        pReplyData = (jbyte *) env->GetPrimitiveArrayCritical(jReplyData, NULL);
+        if (pReplyData == NULL) {
+            LOGE("setParameter: Error retrieving reply pointer");
+            goto command_Exit;
+        }
+    }
+
+    lStatus = translateError(lpAudioEffect->command(cmdCode, cmdSize, pCmdData,
+            pReplySize, pReplyData));
+
+command_Exit:
+
+    if (pCmdData != NULL) {
+        env->ReleasePrimitiveArrayCritical(jCmdData, pCmdData, 0);
+    }
+    if (pReplyData != NULL) {
+        env->ReleasePrimitiveArrayCritical(jReplyData, pReplyData, 0);
+    }
+    if (pReplySize != NULL) {
+        env->ReleasePrimitiveArrayCritical(jReplySize, pReplySize, 0);
+    }
+
+    return lStatus;
+}
+
+static jobjectArray
+android_media_AudioEffect_native_queryEffects(JNIEnv *env, jclass clazz)
+{
+    effect_descriptor_t desc;
+    char str[EFFECT_STRING_LEN_MAX];
+    uint32_t numEffects;
+    uint32_t i = 0;
+    jstring jdescType;
+    jstring jdescUuid;
+    jstring jdescConnect;
+    jstring jdescName;
+    jstring jdescImplementor;
+    jobject jdesc;
+
+    AudioEffect::queryNumberEffects(&numEffects);
+    jobjectArray ret = env->NewObjectArray(numEffects, fields.clazzDesc, NULL);
+    if (ret == NULL) {
+        return ret;
+    }
+
+    LOGV("queryEffects() numEffects: %d", numEffects);
+
+    for (i = 0; i < numEffects; i++) {
+        if (AudioEffect::queryEffect(i, &desc) != NO_ERROR) {
+            goto queryEffects_failure;
+        }
+
+        AudioEffect::guidToString(&desc.type, str, EFFECT_STRING_LEN_MAX);
+        jdescType = env->NewStringUTF(str);
+
+        AudioEffect::guidToString(&desc.uuid, str, EFFECT_STRING_LEN_MAX);
+        jdescUuid = env->NewStringUTF(str);
+
+        if ((desc.flags & EFFECT_FLAG_TYPE_MASK) == EFFECT_FLAG_TYPE_AUXILIARY) {
+            jdescConnect = env->NewStringUTF("Auxiliary");
+        } else {
+            jdescConnect = env->NewStringUTF("Insert");
+        }
+
+        jdescName = env->NewStringUTF(desc.name);
+        jdescImplementor = env->NewStringUTF(desc.implementor);
+
+        jdesc = env->NewObject(fields.clazzDesc,
+                               fields.midDescCstor,
+                               jdescType,
+                               jdescUuid,
+                               jdescConnect,
+                               jdescName,
+                               jdescImplementor);
+        env->DeleteLocalRef(jdescType);
+        env->DeleteLocalRef(jdescUuid);
+        env->DeleteLocalRef(jdescConnect);
+        env->DeleteLocalRef(jdescName);
+        env->DeleteLocalRef(jdescImplementor);
+        if (jdesc == NULL) {
+            LOGE("env->NewObject(fields.clazzDesc, fields.midDescCstor)");
+            goto queryEffects_failure;
+        }
+
+        env->SetObjectArrayElement(ret, i, jdesc);
+   }
+
+    return ret;
+
+queryEffects_failure:
+
+    if (ret != NULL) {
+        env->DeleteLocalRef(ret);
+    }
+    return NULL;
+
+}
+
+// ----------------------------------------------------------------------------
+
+// Dalvik VM type signatures
+static JNINativeMethod gMethods[] = {
+    {"native_init",          "()V",      (void *)android_media_AudioEffect_native_init},
+    {"native_setup",         "(Ljava/lang/Object;Ljava/lang/String;Ljava/lang/String;II[I[Ljava/lang/Object;)I",
+                                         (void *)android_media_AudioEffect_native_setup},
+    {"native_finalize",      "()V",      (void *)android_media_AudioEffect_native_finalize},
+    {"native_release",       "()V",      (void *)android_media_AudioEffect_native_release},
+    {"native_setEnabled",    "(Z)I",      (void *)android_media_AudioEffect_native_setEnabled},
+    {"native_getEnabled",    "()Z",      (void *)android_media_AudioEffect_native_getEnabled},
+    {"native_hasControl",    "()Z",      (void *)android_media_AudioEffect_native_hasControl},
+    {"native_setParameter",  "(I[BI[B)I",  (void *)android_media_AudioEffect_native_setParameter},
+    {"native_getParameter",  "(I[B[I[B)I",  (void *)android_media_AudioEffect_native_getParameter},
+    {"native_command",       "(II[B[I[B)I", (void *)android_media_AudioEffect_native_command},
+    {"native_query_effects", "()[Ljava/lang/Object;", (void *)android_media_AudioEffect_native_queryEffects},
+};
+
+
+// ----------------------------------------------------------------------------
+
+extern int register_android_media_visualizer(JNIEnv *env);
+
+int register_android_media_AudioEffect(JNIEnv *env)
+{
+    return AndroidRuntime::registerNativeMethods(env, kClassPathName, gMethods, NELEM(gMethods));
+}
+
+jint JNI_OnLoad(JavaVM* vm, void* reserved)
+{
+
+    JNIEnv* env = NULL;
+    jint result = -1;
+
+    if (vm->GetEnv((void**) &env, JNI_VERSION_1_4) != JNI_OK) {
+        LOGE("ERROR: GetEnv failed\n");
+        goto bail;
+    }
+    assert(env != NULL);
+
+    if (register_android_media_AudioEffect(env) < 0) {
+        LOGE("ERROR: AudioEffect native registration failed\n");
+        goto bail;
+    }
+
+    if (register_android_media_visualizer(env) < 0) {
+        LOGE("ERROR: Visualizer native registration failed\n");
+        goto bail;
+    }
+
+    /* success -- return valid version number */
+    result = JNI_VERSION_1_4;
+
+bail:
+    return result;
+}
+
diff --git a/media/jni/audioeffect/android_media_Visualizer.cpp b/media/jni/audioeffect/android_media_Visualizer.cpp
new file mode 100644
index 0000000..31119f8
--- /dev/null
+++ b/media/jni/audioeffect/android_media_Visualizer.cpp
@@ -0,0 +1,507 @@
+/*
+ * Copyright (C) 2010 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include <stdio.h>
+
+//#define LOG_NDEBUG 0
+#define LOG_TAG "visualizers-JNI"
+
+#include <utils/Log.h>
+#include <nativehelper/jni.h>
+#include <nativehelper/JNIHelp.h>
+#include <android_runtime/AndroidRuntime.h>
+#include "media/Visualizer.h"
+
+using namespace android;
+
+#define VISUALIZER_SUCCESS                      0
+#define VISUALIZER_ERROR                       -1
+#define VISUALIZER_ERROR_ALREADY_EXISTS        -2
+#define VISUALIZER_ERROR_NO_INIT               -3
+#define VISUALIZER_ERROR_BAD_VALUE             -4
+#define VISUALIZER_ERROR_INVALID_OPERATION     -5
+#define VISUALIZER_ERROR_NO_MEMORY             -6
+#define VISUALIZER_ERROR_DEAD_OBJECT           -7
+
+#define NATIVE_EVENT_PCM_CAPTURE                0
+#define NATIVE_EVENT_FFT_CAPTURE                1
+
+// ----------------------------------------------------------------------------
+static const char* const kClassPathName = "android/media/Visualizer";
+
+struct fields_t {
+    // these fields provide access from C++ to the...
+    jclass    clazzEffect;          // Visualizer class
+    jmethodID midPostNativeEvent;   // event post callback method
+    jfieldID  fidNativeVisualizer; // stores in Java the native Visualizer object
+    jfieldID  fidJniData;           // stores in Java additional resources used by the native Visualizer
+};
+static fields_t fields;
+
+struct visualizer_callback_cookie {
+    jclass      visualizer_class;  // Visualizer class
+    jobject     visualizer_ref;    // Visualizer object instance
+ };
+
+// ----------------------------------------------------------------------------
+class visualizerJniStorage {
+    public:
+        visualizer_callback_cookie mCallbackData;
+
+    visualizerJniStorage() {
+    }
+
+    ~visualizerJniStorage() {
+    }
+
+};
+
+
+static jint translateError(int code) {
+    switch(code) {
+    case NO_ERROR:
+        return VISUALIZER_SUCCESS;
+    case ALREADY_EXISTS:
+        return VISUALIZER_ERROR_ALREADY_EXISTS;
+    case NO_INIT:
+        return VISUALIZER_ERROR_NO_INIT;
+    case BAD_VALUE:
+        return VISUALIZER_ERROR_BAD_VALUE;
+    case INVALID_OPERATION:
+        return VISUALIZER_ERROR_INVALID_OPERATION;
+    case NO_MEMORY:
+        return VISUALIZER_ERROR_NO_MEMORY;
+    case DEAD_OBJECT:
+        return VISUALIZER_ERROR_DEAD_OBJECT;
+    default:
+        return VISUALIZER_ERROR;
+    }
+}
+
+
+// ----------------------------------------------------------------------------
+static void captureCallback(void* user,
+        uint32_t waveformSize,
+        uint8_t *waveform,
+        uint32_t fftSize,
+        uint8_t *fft,
+        uint32_t samplingrate) {
+
+    int arg1 = 0;
+    int arg2 = 0;
+    size_t size;
+
+    visualizer_callback_cookie *callbackInfo = (visualizer_callback_cookie *)user;
+    JNIEnv *env = AndroidRuntime::getJNIEnv();
+
+    LOGV("captureCallback: callbackInfo %p, visualizer_ref %p visualizer_class %p",
+            callbackInfo,
+            callbackInfo->visualizer_ref,
+            callbackInfo->visualizer_class);
+
+    if (!user || !env) {
+        LOGW("captureCallback error user %p, env %p", user, env);
+        return;
+    }
+
+    if (waveformSize != 0 && waveform != NULL) {
+        jbyteArray jArray = env->NewByteArray(waveformSize);
+        if (jArray != NULL) {
+            jbyte *nArray = env->GetByteArrayElements(jArray, NULL);
+            memcpy(nArray, waveform, waveformSize);
+            env->ReleaseByteArrayElements(jArray, nArray, 0);
+            env->CallStaticVoidMethod(
+                callbackInfo->visualizer_class,
+                fields.midPostNativeEvent,
+                callbackInfo->visualizer_ref,
+                NATIVE_EVENT_PCM_CAPTURE,
+                samplingrate,
+                0,
+                jArray);
+        }
+    }
+
+    if (fftSize != 0 && fft != NULL) {
+        jbyteArray jArray = env->NewByteArray(fftSize);
+        if (jArray != NULL) {
+            jbyte *nArray = env->GetByteArrayElements(jArray, NULL);
+            memcpy(nArray, fft, fftSize);
+            env->ReleaseByteArrayElements(jArray, nArray, 0);
+            env->CallStaticVoidMethod(
+                callbackInfo->visualizer_class,
+                fields.midPostNativeEvent,
+                callbackInfo->visualizer_ref,
+                NATIVE_EVENT_FFT_CAPTURE,
+                samplingrate,
+                0,
+                jArray);
+            env->DeleteLocalRef(jArray);
+        }
+    }
+
+    if (env->ExceptionCheck()) {
+        env->ExceptionDescribe();
+        env->ExceptionClear();
+    }
+}
+
+static Visualizer *getVisualizer(JNIEnv* env, jobject thiz)
+{
+    Visualizer *v = (Visualizer *)env->GetIntField(
+        thiz, fields.fidNativeVisualizer);
+    if (v == NULL) {
+        jniThrowException(env, "java/lang/IllegalStateException",
+            "Unable to retrieve Visualizer pointer");
+    }
+    return v;
+}
+
+// ----------------------------------------------------------------------------
+// This function gets some field IDs, which in turn causes class initialization.
+// It is called from a static block in Visualizer, which won't run until the
+// first time an instance of this class is used.
+static void
+android_media_visualizer_native_init(JNIEnv *env)
+{
+
+    LOGV("android_media_visualizer_native_init");
+
+    fields.clazzEffect = NULL;
+
+    // Get the Visualizer class
+    jclass clazz = env->FindClass(kClassPathName);
+    if (clazz == NULL) {
+        LOGE("Can't find %s", kClassPathName);
+        return;
+    }
+
+    fields.clazzEffect = (jclass)env->NewGlobalRef(clazz);
+
+    // Get the postEvent method
+    fields.midPostNativeEvent = env->GetStaticMethodID(
+            fields.clazzEffect,
+            "postEventFromNative", "(Ljava/lang/Object;IIILjava/lang/Object;)V");
+    if (fields.midPostNativeEvent == NULL) {
+        LOGE("Can't find Visualizer.%s", "postEventFromNative");
+        return;
+    }
+
+    // Get the variables fields
+    //      nativeTrackInJavaObj
+    fields.fidNativeVisualizer = env->GetFieldID(
+            fields.clazzEffect,
+            "mNativeVisualizer", "I");
+    if (fields.fidNativeVisualizer == NULL) {
+        LOGE("Can't find Visualizer.%s", "mNativeVisualizer");
+        return;
+    }
+    //      fidJniData;
+    fields.fidJniData = env->GetFieldID(
+            fields.clazzEffect,
+            "mJniData", "I");
+    if (fields.fidJniData == NULL) {
+        LOGE("Can't find Visualizer.%s", "mJniData");
+        return;
+    }
+
+}
+
+
+static jint
+android_media_visualizer_native_setup(JNIEnv *env, jobject thiz, jobject weak_this,
+        jint sessionId, jintArray jId)
+{
+    LOGV("android_media_visualizer_native_setup");
+    visualizerJniStorage* lpJniStorage = NULL;
+    int lStatus = VISUALIZER_ERROR_NO_MEMORY;
+    Visualizer* lpVisualizer = NULL;
+    jint* nId = NULL;
+
+    lpJniStorage = new visualizerJniStorage();
+    if (lpJniStorage == NULL) {
+        LOGE("setup: Error creating JNI Storage");
+        goto setup_failure;
+    }
+
+    lpJniStorage->mCallbackData.visualizer_class = (jclass)env->NewGlobalRef(fields.clazzEffect);
+    // we use a weak reference so the Visualizer object can be garbage collected.
+    lpJniStorage->mCallbackData.visualizer_ref = env->NewGlobalRef(weak_this);
+
+    LOGV("setup: lpJniStorage: %p visualizer_ref %p visualizer_class %p, &mCallbackData %p",
+            lpJniStorage,
+            lpJniStorage->mCallbackData.visualizer_ref,
+            lpJniStorage->mCallbackData.visualizer_class,
+            &lpJniStorage->mCallbackData);
+
+    if (jId) {
+        nId = (jint *) env->GetPrimitiveArrayCritical(jId, NULL);
+        if (nId == NULL) {
+            LOGE("setup: Error retrieving id pointer");
+            lStatus = VISUALIZER_ERROR_BAD_VALUE;
+            goto setup_failure;
+        }
+    } else {
+        LOGE("setup: NULL java array for id pointer");
+        lStatus = VISUALIZER_ERROR_BAD_VALUE;
+        goto setup_failure;
+    }
+
+    // create the native Visualizer object
+    lpVisualizer = new Visualizer(0,
+                                  NULL,
+                                  NULL,
+                                  sessionId);
+    if (lpVisualizer == NULL) {
+        LOGE("Error creating Visualizer");
+        goto setup_failure;
+    }
+
+    lStatus = translateError(lpVisualizer->initCheck());
+    if (lStatus != VISUALIZER_SUCCESS && lStatus != VISUALIZER_ERROR_ALREADY_EXISTS) {
+        LOGE("Visualizer initCheck failed %d", lStatus);
+        goto setup_failure;
+    }
+
+    nId[0] = lpVisualizer->id();
+
+    env->ReleasePrimitiveArrayCritical(jId, nId, 0);
+    nId = NULL;
+
+    env->SetIntField(thiz, fields.fidNativeVisualizer, (int)lpVisualizer);
+
+    env->SetIntField(thiz, fields.fidJniData, (int)lpJniStorage);
+
+    return VISUALIZER_SUCCESS;
+
+    // failures:
+setup_failure:
+
+    if (nId != NULL) {
+        env->ReleasePrimitiveArrayCritical(jId, nId, 0);
+    }
+
+    if (lpVisualizer) {
+        delete lpVisualizer;
+    }
+    env->SetIntField(thiz, fields.fidNativeVisualizer, 0);
+
+    if (lpJniStorage) {
+        delete lpJniStorage;
+    }
+    env->SetIntField(thiz, fields.fidJniData, 0);
+
+    return lStatus;
+}
+
+// ----------------------------------------------------------------------------
+static void android_media_visualizer_native_finalize(JNIEnv *env,  jobject thiz) {
+    LOGV("android_media_visualizer_native_finalize jobject: %x\n", (int)thiz);
+
+    // delete the Visualizer object
+    Visualizer* lpVisualizer = (Visualizer *)env->GetIntField(
+        thiz, fields.fidNativeVisualizer);
+    if (lpVisualizer) {
+        LOGV("deleting Visualizer: %x\n", (int)lpVisualizer);
+        delete lpVisualizer;
+    }
+
+    // delete the JNI data
+    visualizerJniStorage* lpJniStorage = (visualizerJniStorage *)env->GetIntField(
+        thiz, fields.fidJniData);
+    if (lpJniStorage) {
+        LOGV("deleting pJniStorage: %x\n", (int)lpJniStorage);
+        delete lpJniStorage;
+    }
+}
+
+// ----------------------------------------------------------------------------
+static void android_media_visualizer_native_release(JNIEnv *env,  jobject thiz) {
+
+    // do everything a call to finalize would
+    android_media_visualizer_native_finalize(env, thiz);
+    // + reset the native resources in the Java object so any attempt to access
+    // them after a call to release fails.
+    env->SetIntField(thiz, fields.fidNativeVisualizer, 0);
+    env->SetIntField(thiz, fields.fidJniData, 0);
+}
+
+static jint
+android_media_visualizer_native_setEnabled(JNIEnv *env, jobject thiz, jboolean enabled)
+{
+    Visualizer* lpVisualizer = getVisualizer(env, thiz);
+    if (lpVisualizer == NULL) {
+        return VISUALIZER_ERROR_NO_INIT;
+    }
+
+    return translateError(lpVisualizer->setEnabled(enabled));
+}
+
+static jboolean
+android_media_visualizer_native_getEnabled(JNIEnv *env, jobject thiz)
+{
+    Visualizer* lpVisualizer = getVisualizer(env, thiz);
+    if (lpVisualizer == NULL) {
+        return false;
+    }
+
+    return (jboolean)lpVisualizer->getEnabled();
+}
+
+static jintArray
+android_media_visualizer_native_getCaptureSizeRange(JNIEnv *env, jobject thiz)
+{
+    jintArray jRange = env->NewIntArray(2);
+    jint *nRange = env->GetIntArrayElements(jRange, NULL);
+    nRange[0] = Visualizer::getMinCaptureSize();
+    nRange[1] = Visualizer::getMaxCaptureSize();
+    LOGV("getCaptureSizeRange() min %d max %d", nRange[0], nRange[1]);
+    env->ReleaseIntArrayElements(jRange, nRange, 0);
+    return jRange;
+}
+
+static jint
+android_media_visualizer_native_getMaxCaptureRate(JNIEnv *env, jobject thiz)
+{
+    return Visualizer::getMaxCaptureRate();
+}
+
+static jint
+android_media_visualizer_native_setCaptureSize(JNIEnv *env, jobject thiz, jint size)
+{
+    Visualizer* lpVisualizer = getVisualizer(env, thiz);
+    if (lpVisualizer == NULL) {
+        return VISUALIZER_ERROR_NO_INIT;
+    }
+
+    return translateError(lpVisualizer->setCaptureSize(size));
+}
+
+static jint
+android_media_visualizer_native_getCaptureSize(JNIEnv *env, jobject thiz)
+{
+    Visualizer* lpVisualizer = getVisualizer(env, thiz);
+    if (lpVisualizer == NULL) {
+        return -1;
+    }
+    return lpVisualizer->getCaptureSize();
+}
+
+static jint
+android_media_visualizer_native_getSamplingRate(JNIEnv *env, jobject thiz)
+{
+    Visualizer* lpVisualizer = getVisualizer(env, thiz);
+    if (lpVisualizer == NULL) {
+        return -1;
+    }
+    return lpVisualizer->getSamplingRate();
+}
+
+static jint
+android_media_visualizer_native_getWaveForm(JNIEnv *env, jobject thiz, jbyteArray jWaveform)
+{
+    Visualizer* lpVisualizer = getVisualizer(env, thiz);
+    if (lpVisualizer == NULL) {
+        return VISUALIZER_ERROR_NO_INIT;
+    }
+
+    jbyte* nWaveform = (jbyte *) env->GetPrimitiveArrayCritical(jWaveform, NULL);
+    if (nWaveform == NULL) {
+        return VISUALIZER_ERROR_NO_MEMORY;
+    }
+    jint status = translateError(lpVisualizer->getWaveForm((uint8_t *)nWaveform));
+
+    env->ReleasePrimitiveArrayCritical(jWaveform, nWaveform, 0);
+
+    return status;
+}
+
+static jint
+android_media_visualizer_native_getFft(JNIEnv *env, jobject thiz, jbyteArray jFft)
+{
+    Visualizer* lpVisualizer = getVisualizer(env, thiz);
+    if (lpVisualizer == NULL) {
+        return VISUALIZER_ERROR_NO_INIT;
+    }
+
+    jbyte* nFft = (jbyte *) env->GetPrimitiveArrayCritical(jFft, NULL);
+    if (nFft == NULL) {
+        return VISUALIZER_ERROR_NO_MEMORY;
+    }
+    jint status = translateError(lpVisualizer->getFft((uint8_t *)nFft));
+
+    env->ReleasePrimitiveArrayCritical(jFft, nFft, 0);
+
+    return status;
+}
+
+static jint
+android_media_setPeriodicCapture(JNIEnv *env, jobject thiz, jint rate, jboolean jWaveform, jboolean jFft)
+{
+    Visualizer* lpVisualizer = getVisualizer(env, thiz);
+    if (lpVisualizer == NULL) {
+        return VISUALIZER_ERROR_NO_INIT;
+    }
+    visualizerJniStorage* lpJniStorage = (visualizerJniStorage *)env->GetIntField(thiz,
+            fields.fidJniData);
+    if (lpJniStorage == NULL) {
+        return VISUALIZER_ERROR_NO_INIT;
+    }
+
+    LOGV("setPeriodicCapture: rate %d, jWaveform %d jFft %d",
+            rate,
+            jWaveform,
+            jFft);
+
+    uint32_t flags = Visualizer::CAPTURE_CALL_JAVA;
+    if (jWaveform) flags |= Visualizer::CAPTURE_WAVEFORM;
+    if (jFft) flags |= Visualizer::CAPTURE_FFT;
+    Visualizer::capture_cbk_t cbk = captureCallback;
+    if (!jWaveform && !jFft) cbk = NULL;
+
+    return translateError(lpVisualizer->setCaptureCallBack(cbk,
+                                                &lpJniStorage->mCallbackData,
+                                                flags,
+                                                rate));
+}
+
+// ----------------------------------------------------------------------------
+
+// Dalvik VM type signatures
+static JNINativeMethod gMethods[] = {
+    {"native_init",            "()V",     (void *)android_media_visualizer_native_init},
+    {"native_setup",           "(Ljava/lang/Object;I[I)I",
+                                          (void *)android_media_visualizer_native_setup},
+    {"native_finalize",          "()V",   (void *)android_media_visualizer_native_finalize},
+    {"native_release",           "()V",   (void *)android_media_visualizer_native_release},
+    {"native_setEnabled",        "(Z)I",  (void *)android_media_visualizer_native_setEnabled},
+    {"native_getEnabled",        "()Z",   (void *)android_media_visualizer_native_getEnabled},
+    {"getCaptureSizeRange",      "()[I",  (void *)android_media_visualizer_native_getCaptureSizeRange},
+    {"getMaxCaptureRate",        "()I",   (void *)android_media_visualizer_native_getMaxCaptureRate},
+    {"native_setCaptureSize",    "(I)I",  (void *)android_media_visualizer_native_setCaptureSize},
+    {"native_getCaptureSize",    "()I",   (void *)android_media_visualizer_native_getCaptureSize},
+    {"native_getSamplingRate",   "()I",   (void *)android_media_visualizer_native_getSamplingRate},
+    {"native_getWaveForm",       "([B)I", (void *)android_media_visualizer_native_getWaveForm},
+    {"native_getFft",            "([B)I", (void *)android_media_visualizer_native_getFft},
+    {"native_setPeriodicCapture","(IZZ)I",(void *)android_media_setPeriodicCapture},
+};
+
+// ----------------------------------------------------------------------------
+
+int register_android_media_visualizer(JNIEnv *env)
+{
+    return AndroidRuntime::registerNativeMethods(env, kClassPathName, gMethods, NELEM(gMethods));
+}
+
diff --git a/media/libdrm/mobile2/Android.mk b/media/libdrm/mobile2/Android.mk
deleted file mode 100644
index e187139..0000000
--- a/media/libdrm/mobile2/Android.mk
+++ /dev/null
@@ -1,79 +0,0 @@
-LOCAL_PATH:= $(call my-dir)
-
-# ---------------------------------------
-# First project
-# 
-# Build DRM2 core library
-#
-# Output: libdrm2.so
-# ---------------------------------------
-include $(CLEAR_VARS)
-
-common_SRC_FILES := \
-    src/util/ustl-1.0/bktrace.cpp \
-    src/util/ustl-1.0/memblock.cpp \
-    src/util/ustl-1.0/ofstream.cpp \
-    src/util/ustl-1.0/ualgobase.cpp \
-    src/util/ustl-1.0/unew.cpp \
-    src/util/ustl-1.0/cmemlink.cpp \
-    src/util/ustl-1.0/memlink.cpp \
-    src/util/ustl-1.0/sistream.cpp \
-    src/util/ustl-1.0/ubitset.cpp \
-    src/util/ustl-1.0/ustdxept.cpp \
-    src/util/ustl-1.0/fstream.cpp \
-    src/util/ustl-1.0/mistream.cpp \
-    src/util/ustl-1.0/sostream.cpp \
-    src/util/ustl-1.0/uexception.cpp \
-    src/util/ustl-1.0/ustring.cpp \
-    src/util/xml/DomExpatAgent.cpp \
-    src/util/xml/ExpatWrapper.cpp \
-    src/util/xml/XMLDocumentImpl.cpp \
-    src/util/xml/XMLElementImpl.cpp \
-    src/util/domcore/CharacterDataImpl.cpp \
-    src/util/domcore/ElementImpl.cpp \
-    src/util/domcore/NodeListImpl.cpp \
-    src/util/domcore/DocumentImpl.cpp \
-    src/util/domcore/NodeImpl.cpp \
-    src/util/domcore/TextImpl.cpp \
-    src/util/domcore/DOMException.cpp \
-    src/util/domcore/NodeIterator.cpp \
-    src/util/crypto/DrmCrypto.cpp \
-    src/rights/RoManager.cpp \
-    src/rights/Asset.cpp \
-    src/rights/Ro.cpp \
-    src/rights/OperationPermission.cpp \
-    src/rights/Right.cpp \
-    src/rights/Constraint.cpp \
-    src/drmmanager/DrmManager.cpp \
-    src/dcf/DrmDcfCommon.cpp \
-    src/dcf/DrmDcfContainer.cpp \
-    src/dcf/DrmIStream.cpp \
-    src/dcf/DrmRawContent.cpp \
-    src/roap/RoapMessageHandler.cpp \
-    src/roap/Registration.cpp
-
-ifeq ($(TARGET_ARCH),arm)
-	LOCAL_CFLAGS += -fstrict-aliasing -fomit-frame-pointer
-endif
-
-common_CFLAGS := -W -g -DPLATFORM_ANDROID
-
-common_C_INCLUDES +=\
-    $(LOCAL_PATH)/include \
-    $(LOCAL_PATH)/src/util/ustl-1.0 \
-    external/expat/lib \
-    external/openssl    \
-    external/openssl/include
-
-LOCAL_SRC_FILES := $(common_SRC_FILES)
-LOCAL_CFLAGS += $(common_CFLAGS)
-LOCAL_C_INCLUDES += $(common_C_INCLUDES)
-
-LOCAL_SHARED_LIBRARIES := libexpat libcrypto
-LOCAL_MODULE := libdrm2 
-
-ifeq ($(TARGET_OS)-$(TARGET_ARCH),linux-x86)
-LOCAL_CFLAGS += -DUSTL_ANDROID_X86
-endif
-
-include $(BUILD_STATIC_LIBRARY)
diff --git a/media/libdrm/mobile2/include/Drm2CommonTypes.h b/media/libdrm/mobile2/include/Drm2CommonTypes.h
deleted file mode 100644
index 8ad3a731..0000000
--- a/media/libdrm/mobile2/include/Drm2CommonTypes.h
+++ /dev/null
@@ -1,28 +0,0 @@
-/*
- * Copyright (C) 2007 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-#ifndef _DRM2COMMONTYPES_H_
-#define _DRM2COMMONTYPES_H_
-#include <stdint.h>
-
-#ifdef DRM2_UT
-#define PROTECTED public
-#define PRIVATE public
-#else
-#define PROTECTED protected
-#define PRIVATE private
-#endif
-
-#endif
diff --git a/media/libdrm/mobile2/include/dcf/DrmDcfCommon.h b/media/libdrm/mobile2/include/dcf/DrmDcfCommon.h
deleted file mode 100644
index 9ca7b3f..0000000
--- a/media/libdrm/mobile2/include/dcf/DrmDcfCommon.h
+++ /dev/null
@@ -1,192 +0,0 @@
-/*
- * Copyright (C) 2007 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#ifndef __DCF_COMM_H__
-#define __DCF_COMM_H__
-
-#include <Drm2CommonTypes.h>
-#include <arpa/inet.h>
-#include <mistream.h>
-#include <ustring.h>
-
-using namespace ustl;
-
-////DCF box type list
-const uint32_t DCF_CONTAINER_BOX = uint32_t('m' << 24 | 'r' << 16 | 'd' << 8 | 'o');
-const uint32_t DCF_USER_TYPE = uint32_t('d' << 24 | 'i' << 16 | 'u' << 8 | 'u');
-const uint32_t DCF_FILE_TYPE = uint32_t('p' << 24 | 'y' << 16 | 't' << 8 | 'f');
-const uint32_t DCF_FILE_BRAND = uint32_t('f' << 24 | 'c' << 16 | 'd' << 8 | 'o');
-
-
-/**
- * The basic box class.
- */
-class Box
-{
-public:
-    /**
-     * constructor for Box, used to parse Box
-     * \param box  Box data
-     */
-    Box(const uint8_t* box);
-
-    /**
-     * copy constructor for Box
-     * \param dcfBox  Box object used to init a new Box object
-     */
-    Box(const Box& dcfBox);
-
-    /**
-     * assignment operator for Box
-     * \param other  Box object used to assign to a exist Box object
-     */
-    Box& operator=(const Box& other);
-
-    /** Destructor for Box */
-    virtual ~Box();
-
-    /**
-     * get the size of Box
-     * \param none
-     * \return
-     *   the size
-     */
-    uint64_t getSize(void) const;
-
-    /**
-     * get the type of Box
-     * \param none
-     * \return
-     *   the type
-     */
-    uint32_t getType(void) const;
-
-    /**
-     * get the user type of Box
-     * \param none
-     * \return
-     *   the user type
-     */
-    const uint8_t* getUsertype(void) const;
-
-    /**
-     * get the length of Box
-     * \param none
-     * \return
-     *   the length
-     */
-    virtual uint32_t getLen(void) const;
-PRIVATE:
-    static const uint32_t USER_TYPE_LEN = 16;
-
-    uint32_t mSize;
-    uint32_t mType;
-    uint64_t mLargeSize;
-    uint8_t* mUserType;
-    uint32_t mBoxLength;
-};
-
-/**
- * The fullBox class.
- */
-class FullBox : public Box
-{
-public:
-    /**
-     * constructor for FullBox, used to parse FullBox
-     * \param fullBox  FullBox data
-     */
-    FullBox(const uint8_t* fullBox);
-
-    /** Destructor for FullBox */
-    virtual ~FullBox(){}
-
-    /**
-     * get the version of FullBox
-     * \param none
-     * \return
-     *   the version
-     */
-    uint8_t getVersion(void) const;
-
-    /**
-     * get the flag of FullBox
-     * \param none
-     * \return
-     *   the flag
-     */
-    const uint8_t* getFlag(void) const;
-
-    /**
-     * get the length of FullBox
-     * \param none
-     * \return
-     *   the length
-     */
-    virtual uint32_t getLen(void) const;
-PRIVATE:
-    static const uint32_t FLAG_LEN = 3;
-
-    uint8_t mVersion;
-    uint8_t mFlag[FLAG_LEN];
-    uint32_t mFullBoxLength;
-};
-
-////// textal header class
-class TextualHeader
-{
-public:
-    /** default constructor of DrmInStream */
-    TextualHeader(){};
-
-    /**
-     * constructor for TextualHeader, used to parse textal header
-     * \param inData  textal header data
-     */
-    TextualHeader(const string& inData);
-
-    /**
-     * get the name of textal header
-     * \param none
-     * \return
-     *   the name
-     */
-    string getName() const;
-
-    /**
-     * get the value of textal header
-     * \param none
-     * \return
-     *   the value
-     */
-    string getValue() const;
-
-    /**
-     * get the parameter of textal header
-     * \param none
-     * \return
-     *   the parameter
-     */
-    string getParam() const;
-PRIVATE:
-    string name;
-    string value;
-    string param;
-};
-
-extern int64_t ntoh_int64(int64_t in);
-
-#endif
diff --git a/media/libdrm/mobile2/include/dcf/DrmDcfContainer.h b/media/libdrm/mobile2/include/dcf/DrmDcfContainer.h
deleted file mode 100644
index 14da450..0000000
--- a/media/libdrm/mobile2/include/dcf/DrmDcfContainer.h
+++ /dev/null
@@ -1,213 +0,0 @@
-/*
- * Copyright (C) 2007 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#ifndef __DCF_CONTAINER_H__
-#define __DCF_CONTAINER_H__
-
-#include <Drm2CommonTypes.h>
-#include <uvector.h>
-#include <dcf/DrmIStream.h>
-#include <dcf/DrmDcfCommon.h>
-
-class DrmInStream;
-
-/////////dcf container
-class DcfContainer : public FullBox
-{
-public:
-    friend class DrmInStream;
-
-    /** default constructor of DcfContainer */
-    DcfContainer(istream& inRawData):FullBox(NULL),mConStream(inRawData){}
-
-    /**
-     * constructor for DcfContainer, used to parse DCF container
-     * \param data  DCF container data
-     * \param len   DCF container data len
-     * \param off   the offset from the start of DCF container
-     */
-    DcfContainer(const uint8_t* data,istream& inRawData,uint64_t conOff);
-
-    /** Destructor for DcfContainer */
-    ~DcfContainer();
-
-    /**
-     * get the content type of one content
-     * \param none
-     * \return
-     *   the content type
-     */
-    string getContentType(void) const;
-
-    /**
-     * get the encryption method apply to content
-     * \param none
-     * \return
-     *   the encryption method
-     */
-    uint8_t getEncryptionMethod(void) const;
-
-    /**
-     * get the padding scheme apply to content
-     * \param none
-     * \return
-     *   the padding scheme
-     */
-    uint8_t getPaddingScheme(void) const;
-
-    /**
-     * get the length of plain content
-     * \param none
-     * \return
-     *   the length of plain content
-     */
-    uint64_t getPlaintextLength(void) const;
-
-    /**
-     * get the length of content ID
-     * \param none
-     * \return
-     *   the length of content ID
-     */
-    uint16_t getContentIDLength(void) const;
-
-    /**
-     * get the length of rights issuer URL
-     * \param none
-     * \return
-     *   the length of rights issuer URL
-     */
-    uint16_t getRightsIssuerURLLength(void) const;
-
-    /**
-     * get the length of textal header
-     * \param none
-     * \return
-     *   the length of textal header
-     */
-    uint16_t getTextualHeadersLength(void) const;
-
-    /**
-     * get the content ID of one content
-     * \param none
-     * \return
-     *   the content ID
-     */
-    string getContentID(void) const;
-
-    /**
-     * get the rights issuer URL
-     * \param none
-     * \return
-     *   the rights issuer URL
-     */
-    string getRightsIssuerURL(void) const;
-
-    /**
-     * get the preview method
-     * \param none
-     * \return
-     *   the preview method
-     */
-    string getPreviewMethod(void) const;
-
-    /**
-     * get the location of content
-     * \param none
-     * \return
-     *   the location of content
-     */
-    string getContentLocation(void) const;
-
-    /**
-     * get the URL of content
-     * \param none
-     * \return
-     *   the URL of content
-     */
-    string getContentURL(void) const;
-
-    /**
-     * get the customer head
-     * \param none
-     * \return
-     *   the customer head
-     */
-    vector<string> getCustomerHead(void) const;
-
-    /**
-     * get the preview element data
-     * \param none
-     * \return
-     *   the DRM Instream of preview element data
-     */
-    DrmInStream getPreviewElementData(void) const;
-
-    /**
-     * get the plain content
-     * \param none
-     * \return
-     *   the DRM Instream of plain content
-     */
-    DrmInStream getDecryptContent(uint8_t* decryptKey) const;
-
-    /**
-     * get the istream of DCF
-     * \param none
-     * \return
-     *   the istream of DCF
-     */
-    istream& getStream(void) const;
-
-PRIVATE:
-    static const uint32_t USER_DATA_FLAG = 0x01;
-
-    uint8_t mContentTypeLen;
-    string mContentType;
-    uint8_t mEncryptionMethod;
-    uint8_t mPaddingScheme;
-    uint64_t mPlaintextLength;
-    uint16_t mContentIDLength;
-    uint16_t mRightsIssuerURLLength;
-    uint16_t mTextualHeadersLength;
-    string mContentID;
-    string mRightsIssuerURL;
-    vector<TextualHeader*> mTextualHeaders;
-    bool mSilentFirst;
-    string mSlientMethod;
-    string mSilentRightsURL;
-    string mPreviewMethod;
-    string mPreviewElementURI;
-    string mPreviewRightsURL;
-    string mContentURL;
-    string mContentVersion;
-    string mContentLocation;
-    vector<string> mCustomHeader;
-    bool mHasUserData;
-    uint64_t mDataLen;
-    istream& mConStream;
-    uint64_t mDecOffset;
-
-PRIVATE:
-    // parse text header
-    bool parseTextualHeaders(const uint8_t* data, uint32_t len);
-    void copy(const DcfContainer& container);
-    DcfContainer(const DcfContainer& container):FullBox(NULL),mConStream(container.mConStream){}
-    DcfContainer& operator=(const DcfContainer& other){return *this;}
-};
-
-
-#endif
diff --git a/media/libdrm/mobile2/include/dcf/DrmIStream.h b/media/libdrm/mobile2/include/dcf/DrmIStream.h
deleted file mode 100644
index 10e264e..0000000
--- a/media/libdrm/mobile2/include/dcf/DrmIStream.h
+++ /dev/null
@@ -1,77 +0,0 @@
-/*
- * Copyright (C) 2007 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#ifndef __DRM_ISTREAM_H__
-#define __DRM_ISTREAM_H__
-
-#include <Drm2CommonTypes.h>
-#include <util/crypto/DrmCrypto.h>
-#include <dcf/DrmDcfContainer.h>
-#include <ustring.h>
-
-using namespace ustl;
-
-class DcfContainer;
-
-class DrmInStream
-{
-public:
-    /** default constructor of DrmInStream */
-    DrmInStream():mDecryptPos(0){}
-
-    /**
-     * constructor for DrmInStream, used to read DCF content
-     * \param encFile  DCF container data
-     * \param len   DCF container data len
-     * \param off   the offset from the start of DCF container
-     */
-    DrmInStream(const DcfContainer* container,uint8_t* Key);
-
-    /**
-     * get the size of DRM Instream
-     * \param none
-     * \return
-     *   the size of DRM Instream
-     */
-    uint64_t size() const;
-
-    /**
-     * read data from DRM Instream
-     * \param  data  the buffer to store read data
-     * \param  len   how much data need to read
-     * \return
-     *   the actual len of read data
-     */
-    uint64_t read(uint8_t* data,uint64_t len);
-
-PRIVATE:
-    static const uint32_t AES_IV_LEN = 16;
-    static const uint32_t AES_KEY_LEN = 16;
-    static const uint32_t AES_BLOCK_LEN = 16;
-
-    const DcfContainer* mDcfCon;
-    uint64_t mDecryptPos;
-    uint8_t mAesKey[AES_KEY_LEN];
-};
-
-
-
-#endif
-
-
-
-
-
diff --git a/media/libdrm/mobile2/include/dcf/DrmRawContent.h b/media/libdrm/mobile2/include/dcf/DrmRawContent.h
deleted file mode 100644
index 2d433af..0000000
--- a/media/libdrm/mobile2/include/dcf/DrmRawContent.h
+++ /dev/null
@@ -1,74 +0,0 @@
-/*
- * Copyright (C) 2007 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#ifndef __DRM_CONTENT_H__
-#define __DRM_CONTENT_H__
-
-#include <Drm2CommonTypes.h>
-#include <dcf/DrmDcfContainer.h>
-
-/////////////raw content
-class DrmRawContent
-{
-public:
-    /**
-     * constructor for DrmRawContent, used to parse DCF
-     * \param inRawData  input stream of raw data.
-     */
-    DrmRawContent(istream& inRawData);
-
-    /** Destructor for DrmRawContent */
-    ~DrmRawContent();
-
-    /**
-     * get DCF container
-     * \param none
-     * \return
-     *   the DCF container
-     */
-    vector<DcfContainer*> getContents(void) const;
-
-    /**
-     * get the length of DCF hash
-     * \param none
-     * \return
-     *   the length of DCF hash
-     */
-    uint32_t getDcfHashLen() const;
-
-    /**
-     * get DCF hash
-     * \param outDcfHash  the buffer to store DCF hash
-     * \return
-     *   none
-     */
-    void getDcfHash(uint8_t* outDcfHash) const;
-
-PRIVATE:
-    static const uint32_t DCF_HASH_LEN = 20;
-    static const uint32_t FIX_HEADER_LEN = 20;
-    static const uint32_t MAX_PIECE_LEN = (100 * 1024);
-
-    uint8_t mDcfHash[DCF_HASH_LEN];
-    vector<DcfContainer*> mContainer;
-
-PRIVATE:
-    bool parseDcfHeader(const uint8_t* dcfHead);
-    DrmRawContent(const DrmRawContent& rawContent){}
-    DrmRawContent& operator=(const DrmRawContent& other){return *this;}
-};
-
-#endif
diff --git a/media/libdrm/mobile2/include/drmmanager/DrmManager.h b/media/libdrm/mobile2/include/drmmanager/DrmManager.h
deleted file mode 100644
index c8bfbc1..0000000
--- a/media/libdrm/mobile2/include/drmmanager/DrmManager.h
+++ /dev/null
@@ -1,107 +0,0 @@
-/*
- * Copyright (C) 2007 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */

-#ifndef _DRMMANAGER_
-#define _DRMMANAGER_
-
-#include <Drm2CommonTypes.h>
-#include <ofstream.h>
-#include <sostream.h>
-#include <ustring.h>
-#include <sistream.h>
-#include <uvector.h>
-
-using namespace ustl;
-
-/** It should be removed after real DcfContainer is ready */
-#define DcfContainer string
-static const int16_t DRM_OK = 1;
-
-class DrmManager
-{
-public:
-    /**
-     * Error definition
-     */
-     static const int16_t DRM_MANAGER_BASE = 100;
-     static const int16_t ERR_DCFSTREAM_NOT_INITIALIZED = DRM_MANAGER_BASE+1;
-     static const int16_t ERR_WRONG_DCFDATA = DRM_MANAGER_BASE+2;
-     static const int16_t ERR_WRONG_RIGHTS = DRM_MANAGER_BASE+3;
-
-    /**
-     * Constructor for DrmManager,used to open local dcf file.
-     * @param inRawData input stream of raw data.
-     */
-    DrmManager(istream *inRawData);
-
-    /**
-     * Constructor for DrmManager,used to separate dcf file and trig message when upper
-     * application downloading one multipart message from CI.
-     * @param inRawData input stream of raw data.
-     */
-    DrmManager(istream * inRawData, string mimeType);
-
-    /** Destructor for DomExpatAgent. */
-    ~DrmManager();
-    /**
-     * Config DRM engine
-     * Fix me later
-     */
-     bool config();
-
-    /**
-     * Consume rights according to specified operation, DrmManager will check.
-     * @param operationType the type of operation.
-     * @return the operation result.
-     */
-    int16_t consumeRights(int16_t operationType);
-
-    /**
-     * Get the list of all dcf containers object reference in the dcf file.
-     * @param the vector of the dcf objects list returned.
-     * @return the operation result.
-     */
-     int16_t getListOfDcfObjects(vector<DcfContainer*> **outDcfList);
-
-    /**
-     * Open one Dcf container to read the decrypted data according to specified
-     * operation.
-     * @param oneDcfObject the reference of the DcfContainer.
-     * @param operationType the type of operation.
-     * @param decrypted data returned.
-     * @return the operation result.
-     */
-    int16_t openDecryptedContent(DcfContainer *oneDcfObject,
-                                int16_t operationType,
-                                istream *outDecryptedData);
-
-    /**
-     * Get the separated Dcf raw data from multipart message.
-     * @return the ifstream of the dcf raw data which should be stored by upper
-     * application.
-     */
-    ifstream* getOriginalMediaData(void);
-
-    /**
-     * Handle DRM2.0 push message
-     */
-    bool handlePushMsg(uint8_t* data, string mimeType);
-
-PRIVATE:
-    istream *mDcfStream; /**< the handler of dcf stream. */
-    vector<DcfContainer*> mDcfs; /**< all the dcf containers included in one dcf file. */
-};
-
-#endif //_DRMMANAGER_
diff --git a/media/libdrm/mobile2/include/rights/Asset.h b/media/libdrm/mobile2/include/rights/Asset.h
deleted file mode 100644
index 66696dd..0000000
--- a/media/libdrm/mobile2/include/rights/Asset.h
+++ /dev/null
@@ -1,132 +0,0 @@
-/*
- * Copyright (C) 2007 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-#ifndef _ASSET_H
-#define _ASSET_H
-
-#include <ustring.h>
-#include <uvector.h>
-#include <Drm2CommonTypes.h>
-#include <rights/Right.h>
-using namespace ustl;
-
-class Asset {
-public:
-    /**
-     * Constructor for asset.
-     */
-    Asset();
-
-    /**
-     * Destructor for asset.
-     */
-    ~Asset();
-
-    /**
-     * Test whether asset has parent or not.
-     * @return true/false to indicate the result.
-     */
-    bool hasParent();
-
-    /**
-     * Set id of asset.
-     * @param id the id of asset.
-     */
-    void setID(const string &id);
-
-    /**
-     * Get the id of content.
-     * @return asset id.
-     */
-    const string& getID() const;
-
-    /**
-     * Set contend id related to asset.
-     * @param id the id of content.
-     */
-    void setContentID(const string &id);
-
-    /**
-     * Get content id.
-     * @return content id.
-     */
-    const string& getContentID() const;
-
-    /**
-     * Set digest value of DCF.
-     * @param value the DCF digest value.
-     */
-    void setDCFDigest(const string &value);
-
-    /**
-     * Get the DCF digest value.
-     * @return the digest value of DCF.
-     */
-    const string& getDCFDigest() const;
-
-    /**
-     * Set encrypted key in asset.
-     * @param the encrypted key.
-     */
-    void setEncryptedKey(const string &key);
-
-    /**
-     * Get encrypted key.
-     * @return encypted key.
-     */
-    const string& getEncrytedKey() const;
-
-    /**
-     * Get cek.
-     * @return cek.
-     */
-    const char* getCek() const;
-
-    /**
-     * Set the retrieval method of key.
-     * @param rm the retrieval method of the key.
-     */
-    void setKeyRetrievalMethod(const string &rm);
-
-    /**
-     * Set parent content id for asset.
-     * @param id the parent content id.
-     */
-    void setParentContentID(const string &id);
-
-    /**
-     * Get the parent content id of the asset.
-     * @return the parent content id.
-     */
-    const string& getParentContentID() const;
-
-    /**
-     * Recover the CEK using private key.
-     */
-    void recoverCek();
-
-PRIVATE:
-    string mAssetID;
-    string mContentID;
-    string mDigestMethod;
-    string mDigestValue;
-    string mEncryptedMethod;
-    string mEncryptedKey;
-    string mRetrievalMethod;
-    string mParentContentID;
-    string mCek;
-};
-
-#endif
diff --git a/media/libdrm/mobile2/include/rights/Constraint.h b/media/libdrm/mobile2/include/rights/Constraint.h
deleted file mode 100644
index bcf5afe..0000000
--- a/media/libdrm/mobile2/include/rights/Constraint.h
+++ /dev/null
@@ -1,190 +0,0 @@
-/*
- * Copyright (C) 2007 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-#ifndef _CONSTRAINT_H
-#define _CONSTRAINT_H
-
-#include <Drm2CommonTypes.h>
-#include <ustring.h>
-#include <uvector.h>
-using namespace ustl;
-
-struct Context {
-    string id;
-    string version;
-};
-
-const int INIT_VALUE = -1;
-
-class Constraint {
-public:
-    enum MODE {NONE, MOVE, COPY}; /**< export mode type. */
-
-    /**
-     * Construtor for constraint.
-     */
-    Constraint();
-
-    /**
-     * Destructor for constraint.
-     */
-    ~Constraint();
-
-public:
-    /**
-     * Test whether constraint is valid or not
-     * @param time the specitic time to test.
-     * @return true/false to indicate the result.
-     */
-    bool isValid(long time) const;
-
-    /**
-     * Test whether constraint is unconstraint or not
-     * @return true/false to indicate the result.
-     */
-    bool isUnConstraint() const;
-
-    /**
-     * Test whether constraint is datetime related or not.
-     * @return true/false to indicate the result.
-     */
-    bool isDateTimeConstraint() const;
-
-    /**
-     * Test whether constraint contain interval or not
-     * @return true/false to indicate the result.
-     */
-    bool isIntervalConstraint() const;
-
-    /**
-     * Test whether constraint is timed count or not
-     * @return true/false to indicate the result.
-     */
-    bool isTimedCountConstraint() const;
-
-    /**
-     * Set the start time value of constraint.
-     * @param time the specific time value.
-     */
-    void setStartTime(long time);
-
-    /**
-     * Get the start time.
-     * @return value of start time.
-     */
-    long getStartTime() const;
-
-    /**
-     * Set the end time.
-     * @param time the value of end time.
-     */
-    void setEndTime(long time);
-
-    /**
-     * Get the end time.
-     * @param return the value of  end time.
-     */
-    long getEndTime() const;
-
-    /**
-     * Set the accumulated .
-     * @param time the specific time.
-     */
-    void setAccumulated(long time);
-
-    /**
-     * Get the accumulated.
-     * @return the value of accumulated
-     */
-    long getAccumulated() const;
-
-    /**
-     * Set the count.
-     * @param count the value of count.
-     */
-    void setCount(int count);
-
-    /**
-     * Get the count.
-     * @return value of count.
-     */
-    int getCount() const;
-
-    /**
-     * Set the value of timer.
-     * @param timer the value of the timer.
-     */
-    void setTimer(int timer);
-
-    /**
-     * Get the timer.
-     * @return value of time.
-     */
-    int getTimer() const;
-
-    /**
-     * Set the timedCount.
-     * @param timedCount the value of timedCount.
-     */
-    void setTimedCount(int timedCount);
-
-    /**
-     * Get the timedCount.
-     * @return the value of timedCount.
-     */
-    int getTimedCount() const;
-
-    /**
-     * Set the interval.
-     * @param interval the value of interval.
-     */
-    void setInterval(int interval);
-
-    /**
-     * Get the interval.
-     * @return the value of interval.
-     */
-    int getInterval() const;
-
-    /**
-     * set export mode.
-     * @param mode the mode type of export.
-     */
-    void setExportMode(MODE mode);
-
-    /**
-     * Get the export mode.
-     * @return the export mode.
-     */
-    MODE getExportMode() const;
-
-    /**
-     * Consume the constraint.
-     * @return true/false to indicate whether consume succesfully or not.
-     */
-    bool consume();
-
-PRIVATE:
-    int mCount; /**< the count. */
-    int mTimedCount; /**< timed count. */
-    int mTimer; /**< timer for timed count. */
-    long mStart; /**< start time. */
-    long mEnd; /**< end time. */
-    int mInterval; /**< interval. */
-    long mAccumulated; /**< accumlated. */
-    vector<Context> mSystemList; /**< system list. */
-    MODE mExport; /**< export mode. */
-};
-#endif
diff --git a/media/libdrm/mobile2/include/rights/OperationPermission.h b/media/libdrm/mobile2/include/rights/OperationPermission.h
deleted file mode 100644
index 28cba7b..0000000
--- a/media/libdrm/mobile2/include/rights/OperationPermission.h
+++ /dev/null
@@ -1,83 +0,0 @@
-/*
- * Copyright (C) 2007 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-#ifndef _OPERATIONPERMISSION_H
-#define _OPERATIONPERMISSION_H
-
-#include <Drm2CommonTypes.h>
-#include <rights/Constraint.h>
-
-class OperationPermission {
-public:
-    enum OPERATION {NONE, PLAY, DISPLAY, EXECUTE, PRINT, EXPORT, COMMON};
-
-    /**
-     * Construtor of OperationPermission.
-     */
-    OperationPermission();
-
-    /**
-     * Construtor of OperationPermission.
-     * @param type the specific operation type.
-     * @param cst the constraint related with operation permission.
-     */
-    OperationPermission(OPERATION type, Constraint* cst=NULL);
-
-    /**
-     * Destrutor of OperationPermission.
-     */
-    ~OperationPermission();
-
-    /**
-     * Set the type for operation permission.
-     * @param type the specific type.
-     */
-    void setType(OPERATION type);
-
-    /**
-     * Get the type of operation permission.
-     * @return operation type.
-     */
-    OPERATION getType() const;
-
-    /**
-     * Add constraint for operation permission.
-     * @param constraint the constraint related with operation permission.
-     */
-    void addConstraint(Constraint* constraint);
-
-    /**
-     * Add constraint for operation permission.
-     * @return constraint related with operation permission.
-     */
-    Constraint* getConstraint() const;
-
-PRIVATE:
-    OPERATION mType;
-    Constraint* mConstraint;
-
-PRIVATE:
-    /**
-     * Disable the assignment between OperationPermissions.
-     */
-    OperationPermission& operator=(const OperationPermission &op);
-
-    /**
-     * Disable copy construtor.
-     */
-    OperationPermission(const OperationPermission &op);
-};
-
-#endif
diff --git a/media/libdrm/mobile2/include/rights/Right.h b/media/libdrm/mobile2/include/rights/Right.h
deleted file mode 100644
index 347e484..0000000
--- a/media/libdrm/mobile2/include/rights/Right.h
+++ /dev/null
@@ -1,83 +0,0 @@
-/*
- * Copyright (C) 2007 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-#ifndef _RIGHT_H
-#define _RIGHT_H
-
-#include <Drm2CommonTypes.h>
-#include <uvector.h>
-#include <ustring.h>
-#include <rights/Constraint.h>
-#include <rights/OperationPermission.h>
-using namespace ustl;
-
-class Right {
-public:
-    /**
-     * Constructor for Right.
-     */
-    Right();
-
-    /**
-     * Destructor for Right.
-     */
-    ~Right();
-
-    /**
-     * Add the asset id related with right into asset name list.
-     * @param id the id of the asset.
-     */
-    void addAssetID(const string& id);
-
-    /**
-     * Add a operation permission into right's operation permission list.
-     * @param op a pointer of operation permission.
-     */
-    void addOperationPermission(OperationPermission* op);
-
-    /**
-     * Get the constraint related with operation type.
-     * @param type the specific operation type.
-     * @return NULL if not found otherwise the constraint pointer.
-     */
-    Constraint* getConstraint(OperationPermission::OPERATION type);
-
-    /**
-     * Test whether the right has specific operation type or not.
-     * @param type the specific type.
-     * @return true/false to indicate the result.
-     */
-    bool checkPermission(OperationPermission::OPERATION type);
-
-public:
-    vector<string> mAssetNameList;
-
-PRIVATE:
-    vector<OperationPermission*> mOpList;
-
-PRIVATE:
-
-    /**
-     * Disable the assignment between rights.
-     */
-    Right& operator=(const Right& right);
-
-    /**
-     * Disable copy constructor.
-     */
-    Right(const Right& right);
-   };
-
-#endif
diff --git a/media/libdrm/mobile2/include/rights/Ro.h b/media/libdrm/mobile2/include/rights/Ro.h
deleted file mode 100644
index 0bf0a97..0000000
--- a/media/libdrm/mobile2/include/rights/Ro.h
+++ /dev/null
@@ -1,214 +0,0 @@
-/*
- * Copyright (C) 2007 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#ifndef _RO_H_
-#define _RO_H_
-
-#include <rights/Asset.h>
-#include <rights/Right.h>
-#include <uvector.h>
-#include <ustring.h>
-#include <sistream.h>
-using namespace ustl;
-
-class Asset;
-class XMLDocumentImpl;
-class XMLElementImpl;
-class NodeImpl;
-
-class Ro {
-public:
-    enum ERRCODE { RO_NULL_STREAM, RO_ERR_BAD_XML, RO_OK, RO_BAD };
-
-    /**
-     * Constructor for Ro.
-     */
-    Ro();
-
-    /**
-     * Destructor for Ro.
-     */
-    ~Ro();
-
-    /**
-     * Set id for Ro.
-     * @param id the id of Ro.
-     */
-    void setRoID(string &id);
-
-    /**
-     * Get the id of Ro.
-     * @return the id of Ro.
-     */
-    const string& getRoID() const;
-
-    /**
-     * Set version for Ro.
-     */
-    void setRoVersion(string &version);
-
-    /**
-     * Add a asset into ro's asset list.
-     * @param asset the pointer of asset.
-     */
-    void addAsset(Asset* asset);
-
-    /**
-     * Add a right into ro's right list.
-     * @param right the pointer of right.
-     */
-    void addRight(Right* right);
-
-    /**
-     * Save the Ro.
-     */
-    bool save();
-
-    /**
-     * Verify the Ro.
-     */
-    bool verify();
-
-    /**
-     * Parse the ro from stream.
-     * @param roStream the input ro stream.
-     * @return RO_OK if parse successfully otherwise return error code.
-     */
-    ERRCODE parse(istringstream *roStream);
-
-    /**
-     * Check the permission of the content.
-     * @param type the operation type.
-     * @param contentID the specific contentID.
-     * @return true/false to indicate result.
-     */
-    bool checkPermission(OperationPermission::OPERATION type,
-                         const string& contentID);
-
-    /**
-     * Consume the right related to content.
-     * @param type the operation type.
-     * @param contentID the specific contentID.
-     * @return the status of consume.
-     */
-    ERRCODE consume(OperationPermission::OPERATION type,
-                    const string& contentID);
-
-    /**
-     * Get CEK of content.
-     * @param contentID the specific content id.
-     * @return "" if not found otherwise return CEK.
-     */
-    string getContentCek(const string& contentID);
-
-    /**
-     * Get Digest value of content.
-     * @param contentID the specific content id.
-     * @return "" if not found otherwise return digest value.
-     */
-    string getContentHash(const string& contentID);
-
-PRIVATE:
-    /**
-     * Handle the xml dom document.
-     * @param doc the pointer to the dom document.
-     * @return true/false to indicate the result.
-     */
-    bool handleDocument(const XMLDocumentImpl* doc);
-
-    /**
-     * Handle the xml dom node which contains <right> element.
-     * @param curNode the dom node which contains <right> element.
-     * @return true/false to indicate the result.
-     */
-    bool handleRights(const NodeImpl *curNode);
-
-    /**
-     * Handle the xml dom node which contains the <agreement> element.
-     * @param curNode the dom node which contains <agreement> element.
-     * @return true/false to indicate the result.
-     */
-    bool handleAgreement(const NodeImpl *curNode);
-
-    /**
-     * Handle the xml dom node which contains the <asset> element.
-     * @param curNode the dom node which contains <asset> element.
-     * @return true/false to indicate the result.
-     */
-    bool handleAsset(const NodeImpl *curNode);
-
-    /**
-     * Handle the xml dom node which contains the <permission> element.
-     * @param curNode the dom node which contains <permission> element.
-     * @return true/false to indicate the result.
-     */
-    bool handlePermission(const NodeImpl *curNode);
-
-    /**
-     * Get the constraint in xml dom node.
-     * @param curNode the dom node which contains constraint.
-     * @return the constraint.
-     */
-    Constraint* getConstraint(const NodeImpl *curNode);
-
-    /**
-     * Convert ISO8601 time to long.
-     * @param ts the string with ISO8601 time.
-     * @return the result value.
-     */
-    long convertISO8601DateTimeToLong(const char* ts);
-
-    /**
-     * Convert ISO8601 period to long.
-     * @param ts the string with ISO8601 period.
-     * @return the result value.
-     */
-    long convertISO8601PeriodToLong(const char* ts);
-
-    /**
-     * Load the rights related with specific contentinto content rights list.
-     * @param contentID the specific content id.
-     */
-    void loadRights(const string& contentID);
-
-    /**
-     * Free the current content rights list.
-     */
-    void freeRights();
-
-PRIVATE:
-    /**
-     * Disable the assignment between rights.
-     */
-    Ro& operator=(const Ro& ro);
-
-    /**
-     * Disable copy constructor.
-     */
-    Ro(const Ro& ro);
-
-public:
-    vector<Asset*> mAssetList;
-    vector<Right*> mRightList;
-
-PRIVATE:
-    string mRoID; /** the Ro id. */
-    string mRoVersion; /** the Ro version. */
-    XMLDocumentImpl *mDoc; /**< the xml document handle. */
-    vector<Right*> mContentRightList; /**< the right list to store the result related with specific content. */
-    Right* mProperRight; /**< the right to consume. */
-};
-#endif
diff --git a/media/libdrm/mobile2/include/rights/RoManager.h b/media/libdrm/mobile2/include/rights/RoManager.h
deleted file mode 100644
index 71e9eef..0000000
--- a/media/libdrm/mobile2/include/rights/RoManager.h
+++ /dev/null
@@ -1,92 +0,0 @@
-/*
- * Copyright (C) 2007 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-#ifndef _ROMANAGER_H
-#define _ROMANAGER_H
-
-#include <Drm2CommonTypes.h>
-#include <ustring.h>
-#include <rights/Ro.h>
-
-using namespace ustl;
-
-class RoManager {
-
-public:
-    /**
-     * Singleton instance function.
-     * @return the singleton pointer.
-     */
-    static RoManager* Instance();
-
-    /**
-     * Destructor for ExpatWrapper.
-     */
-    ~RoManager();
-
-    /**
-     * Install Ro from stream.
-     * @param roStream the input ro stream.
-     * @return the status of installaltion.
-     */
-    Ro::ERRCODE installRo(istringstream *roStream);
-
-    /**
-     * Check whether Ro in cache or not.
-     * @param roID the specific roID.
-     * @return true/false to indicate result.
-     */
-    bool checkRoInCache(const string& roID);
-
-    /**
-     * Get the ro.
-     * @param roID the specific id of ro.
-     * @return NULL if not found otherwise return ro.
-     */
-    Ro* getRo(const string& roID);
-
-    /**
-     * Get all the Ro.
-     * @return ro list.
-     */
-    vector<Ro*> getAllRo();
-
-    /**
-     * Get ro which contained rights of specific content.
-     * @param contentID the specific id of content.
-     * @return NULL if not fount otherwise the related ro.
-     */
-    Ro* getRoByContentID(const string& contentID);
-
-    /**
-     * Delete Ro by its id.
-     * @param roID the specific roID.
-     * @return true/false to indicate the result.
-     */
-    bool deleteRo(const string& roID);
-
-
-PRIVATE:
-    /**
-     * Constructor for RoManager.
-     */
-    RoManager();
-
-PRIVATE:
-    static RoManager* msInstance; /**< singleton instance pointer. */
-    vector<Ro*> mRoList; /**< the ro list. */
-};
-
-#endif
diff --git a/media/libdrm/mobile2/include/roap/Registration.h b/media/libdrm/mobile2/include/roap/Registration.h
deleted file mode 100644
index 0beed8e..0000000
--- a/media/libdrm/mobile2/include/roap/Registration.h
+++ /dev/null
@@ -1,44 +0,0 @@
-/*
- * Copyright (C) 2007 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-#ifndef _REGISTRATION_
-#define _REGISTRATION_
-
-#include <roap/RoapMessageHandler.h>
-
-class Registration : public RoapMessageHandler
-{
-public:
-    /**
-     * Constructor for Registration.
-     * @param type the address of RI.
-     */
-    Registration(string riAddres);
-
-    /**
-     * Registration with the RI.
-     * @return the result of registration.
-     */
-    int16_t registerWithRI();
-
-    /**
-     * Create one specified client message based on message template xml file.
-     * @param type the message type.     
-     * @return the pointer of the document object of the message if successful,otherwise
-     *         return NULL.
-     */
-     XMLDocumentImpl* createClientMsg(int16_t type);
-}
-#endif _REGISTRATION_
diff --git a/media/libdrm/mobile2/include/roap/RoapMessageHandler.h b/media/libdrm/mobile2/include/roap/RoapMessageHandler.h
deleted file mode 100644
index c31047f..0000000
--- a/media/libdrm/mobile2/include/roap/RoapMessageHandler.h
+++ /dev/null
@@ -1,66 +0,0 @@
-/*
- * Copyright (C) 2007 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-#ifndef _ROAPMESSAGEHADLER_
-#define _ROAPMESSAGEHADLER_
-
-#include <Drm2CommonTypes.h>
-#include <util/xml/XMLDocumentImpl.h>
-
-class RoapMessageHandler
-{
-public:
-    /**
-     * define all the client message types.
-     */
-     enum msgType {DeviceHello=1,RegistrationRequest,RORequest};
-
-    /**
-     * Constructor for DrmManager,used to open local dcf file.
-     * @param type the message type.
-     */
-     RoapMessageHandler();
-
-    /**
-     * Create one specified client message based on message template xml file.
-     * @param type the message type.     
-     * @return the pointer of the document object of the message if successful,otherwise
-     *         return NULL.
-     */
-     XMLDocumentImpl* createClientMsg(msgType type);
-
-    /**
-     * Handle received message from RI.
-     * @return true if successful, otherwise return false.
-     */
-    bool handlePeerMsg();
-
-    /**
-     * Send the client message to RI
-     */
-    int16_t send();
-
-    /**
-     * Receive message from RI and parse it 
-     * @return the pointer of the parsed document.
-     */
-    XMLDocumentImpl* receive();
-
-PROTECTED:
-    XMLDocumentImpl * mDoc;
-PRIVATE:
-    int16_t mMsgType;
-};
-#endif //_ROAPMESSAGEHADLER_
diff --git a/media/libdrm/mobile2/include/util/crypto/DrmCrypto.h b/media/libdrm/mobile2/include/util/crypto/DrmCrypto.h
deleted file mode 100644
index 10e7bc1..0000000
--- a/media/libdrm/mobile2/include/util/crypto/DrmCrypto.h
+++ /dev/null
@@ -1,211 +0,0 @@
-/*
- * Copyright (C) 2007 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#ifndef _DRMCRYPTO_H_
-#define _DRMCRYPTO_H_
-
-#include <Drm2CommonTypes.h>
-#include <openssl/aes.h>
-#include <openssl/hmac.h>
-#include <openssl/sha.h>
-#include <openssl/rsa.h>
-
-// AES encrypt mode
-typedef enum {AES_128_CBC = 0x01,AES_128_CTR = 0x02}AesMode;
-
-// aes crypto for decrypt
-class AesAgent
-{
-    public:
-        AesAgent(const AesMode method,const unsigned char* decryptedKey)
-            :mode(method),AesKey(decryptedKey){};
-
-        /**

-         * decrypt data using AES, now only support 128 bits CBC
-         * \param iv       128 bits initialization vector/counter
-         *                 prefixing the ciphertext

-         * \param encData  encrypted data

-         * \param encLen   the length of encData

-         * \param decData  the buffer to store decrypted data

-         * \param decLen   the actual length of decrypted data

-         * \return

-         *   >=   succeed, the padding length

-         *   < 0  failed

-         */
-        int32_t decContent( unsigned char* iv,
-                            const unsigned char* encData,
-                            const unsigned long encLen,
-                            unsigned char* decData);
-        static const int32_t AES_DEC_FAILED = -1;
-
-    PRIVATE:
-        static const uint32_t AES_KEY_BITS = 128;
-        const AesMode mode;
-        const unsigned char* AesKey;
-
-    PRIVATE:
-        // get the actual length of decrypt data

-        void discardPaddingByte(unsigned char* decryptedBuf,unsigned long* decryptedBufLen);

-};
-
-// Sha1 crypto for hash
-class Sha1Agent
-{
-    public:
-        /**

-         * compute hash using Sha1

-         * \param inData   the data to be hashed

-         * \param inLen    the length of inData

-         * \param outHash  the hash of inData

-         * \return   none

-         */

-        void computeHash( const unsigned char* inData,

-                          unsigned long inLen,

-                          unsigned char* outHash) const;

-

-        /**

-         * get the length of SHA1 hash

-         * \param  none

-         * \return

-         *      the length of SHA1 hash

-         */

-        unsigned long getShaLen(void) const
-        {
-            return SHA_DIGEST_LENGTH;
-        }

-};
-
-// Hmac-Sha1 crypto for MAC
-class HmacSha1Agent
-{
-    public:
-        HmacSha1Agent(const unsigned char* Key, int key_len)
-          :macKey(Key),keyLen(key_len){};
-
-        /**

-         * compute MAC using Hmac-Sha1

-         * \param inData  the data to be MAC

-         * \param inLen   the length of inData

-         * \param outMac  the MAC of inData

-         * \return   none

-         */

-        void computeMac( const unsigned char* inData,

-                         unsigned long inLen,

-                         unsigned char* outMac) const;

-

-        /**

-         * get the length of HMAC-SHA1 MAC

-         * \param  none

-         * \return

-         *      the length of HMAC-SHA1 MAC

-         */

-        unsigned long getHmacLen(void) const
-        {
-            return SHA_DIGEST_LENGTH;
-        }
-

-    PRIVATE:
-        const unsigned char* macKey;
-        const int keyLen;
-};
-
-// Rsa crypto for signature,verify signature and key transport
-class RsaAgent
-{
-    public:
-        RsaAgent(RSA& Key):rsaKey(Key)
-        {
-            rsaSize = (unsigned int)RSA_size(&Key);
-        };
-
-        // signature algorithm
-        typedef enum {RSA_PSS,RSA_SHA1}RsaAlg;
-
-        /**

-         * Do signature using RSA-PSS

-         * \param rawData  the data to be signature

-         * \param rawLen   the length of inData

-         * \param sigData  the buffer to store the signature of rawData
-         * \param sigAlg   signature algorithm

-         * \return

-         *   true   succeed

-         *   false  failed

-         */

-        bool signature( const unsigned char* rawData,

-                        const unsigned long rawLen,

-                        unsigned char* sigData,
-                        const RsaAlg sigAlg);

-

-        /**

-         * get the length of signature

-         * \param  none

-         * \return

-         *      the length of signature

-         */

-        unsigned int getSigLen(void) const
-        {
-            return rsaSize;
-        }
-
-        /**

-         * Verify signature using RSA-PSS

-         * \param sigData  the data to be verify

-         * \param sigLen   the length of sigData
-         * \param rawData  the data from which the sigData generated
-         * \param rawLen   the length of rawData
-         * \param sigAlg   signature algorithm

-         * \return

-         *   true   succeed

-         *   false  failed

-         */

-        bool sigVerify(unsigned char* sigData,
-                       unsigned long sigLen,
-                       const unsigned char* rawData,
-                       const unsigned long rawLen,
-                       const RsaAlg sigAlg);
-

-
-        /**

-         * Decrypt data using RSA

-         * \param encData  encrypted data

-         * \param encLen   the length of encData

-         * \param decData  the buffer to store decrypted data

-         * \return

-         *   -1  decrypted failed

-         *   >0  the actual length of decrypted data

-         */

-        int decrypt( const unsigned char* encData,

-                     const unsigned long encLen,

-                     unsigned char* decData);

-

-        /**

-         * get the length of decrypted data

-         * \param none

-         * \return

-         *      the length of decrypted data

-         */

-        unsigned int getDecLen(void) const
-        {
-           return rsaSize;
-        }
-

-    PRIVATE:
-        RSA& rsaKey;
-        unsigned int rsaSize;
-};
-
-
-#endif /* _DRMCRYPTO_H_ */
diff --git a/media/libdrm/mobile2/include/util/domcore/CharacterDataImpl.h b/media/libdrm/mobile2/include/util/domcore/CharacterDataImpl.h
deleted file mode 100644
index d1ab31e..0000000
--- a/media/libdrm/mobile2/include/util/domcore/CharacterDataImpl.h
+++ /dev/null
@@ -1,102 +0,0 @@
-/*
- * Copyright (C) 2007 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-#ifndef __CHARACTER_IMPL__

-#define __CHARACTER_IMPL__

-

-#include "NodeImpl.h"

-#include "DOMString.h"

-

-class CharacterDataImpl : public NodeImpl

-{

-private:

-    DOMString* charData;

-public:

-

-     /**

-      * Default Constructor for CharacterDataImpl.

-      */

-     CharacterDataImpl();

-

-     /**

-      * Constructor for CharacterDataImpl.

-      * @param data The specify character data.

-      */

-     CharacterDataImpl(const DOMString* data);

-

-    /**

-     * The character data of the node that implements this interface. The DOM

-     * implementation may not put arbitrary limits on the amount of data

-     * that may be stored in a <code>CharacterData</code> node. However,

-     * implementation limits may mean that the entirety of a node's data may

-     * not fit into a single <code>DOMString</code>. In such cases, the user

-     * may call <code>substringData</code> to retrieve the data in

-     * appropriately sized pieces.

-     * @exception DOMException

-     *   NO_MODIFICATION_ALLOWED_ERR: Raised when the node is readonly.

-     * @exception DOMException

-     *   DOMSTRING_SIZE_ERR: Raised when it would return more characters than

-     *   fit in a <code>DOMString</code> variable on the implementation

-     *   platform.

-     * @return the character data.

-     */

-    const DOMString* getData() const throw (DOMException);

-

-    /**

-     * The character data of the node that implements this interface. The DOM

-     * implementation may not put arbitrary limits on the amount of data

-     * that may be stored in a <code>CharacterData</code> node. However,

-     * implementation limits may mean that the entirety of a node's data may

-     * not fit into a single <code>DOMString</code>. In such cases, the user

-     * may call <code>substringData</code> to retrieve the data in

-     * appropriately sized pieces.

-     * @param data the specify character data.

-     * @exception DOMException

-     *   NO_MODIFICATION_ALLOWED_ERR: Raised when the node is readonly.

-     * @exception DOMException

-     *   DOMSTRING_SIZE_ERR: Raised when it would return more characters than

-     *   fit in a <code>DOMString</code> variable on the implementation

-     *   platform.

-     */

-    void setData(const DOMString* data) throw (DOMException);

-

-    /**

-     * The number of 16-bit units that are available through <code>data</code>

-     * and the <code>substringData</code> method below. This may have the

-     * value zero, i.e., <code>CharacterData</code> nodes may be empty.

-     * @return the size of characters data.

-     */

-    int getLength() const;

-

-    /**

-     * Append the string to the end of the character data of the node. Upon

-     * success, <code>data</code> provides access to the concatenation of

-     * <code>data</code> and the <code>DOMString</code> specified.

-     * @param arg The <code>DOMString</code> to append.

-     * @exception DOMException

-     *   NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly.

-     */

-    void appendData(const DOMString* arg) throw(DOMException);

-

-    /** Override getNodeValue() method in NodeImpl.h.*/

-    const DOMString* getNodeValue() const throw(DOMException);

-

-    /** Override setNodeValue() method in NodeImpl.h */

-    void setNodeValue(DOMString* nodeValue) throw(DOMException);

-

-    ~CharacterDataImpl();

-};

-#endif /*__CHARACTER_IMPL__*/

-

diff --git a/media/libdrm/mobile2/include/util/domcore/DOMException.h b/media/libdrm/mobile2/include/util/domcore/DOMException.h
deleted file mode 100644
index 416519b..0000000
--- a/media/libdrm/mobile2/include/util/domcore/DOMException.h
+++ /dev/null
@@ -1,155 +0,0 @@
-/*
- * Copyright (C) 2007 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-#ifndef __DOM_EXCEPTION__

-#define __DOM_EXCEPTION__

-

-#include <uexception.h>

-using namespace ustl;

-

-/**

- * DOM operations only raise exceptions in "exceptional" circumstances, i.e.,

- * when an operation is impossible to perform (either for logical reasons, because data is lost,

- * or because the implementation has become unstable). In general, DOM methods return specific error

- * values in ordinary processing situations, such as out-of-bound errors when using <code>NodeList</code>.

- * <p>Implementations should raise other exceptions under other circumstances. For example, implementations

- * should raise an implementation-dependent exception if a null argument is passed.

- * Some languages and object systems do not support the concept of exceptions.

- * For such systems, error conditions may be indicated using native error reporting mechanisms.

- * For some bindings, for example, methods may return error codes similar to those listed in the corresponding

- * method descriptions.

- */

-class DOMException : public exception {

-

- private:

-        short code;

- public:

-        DOMException(short code)

-        {

-            this->code = code;

-        }

- public:

-

-        enum ExceptionReason {

-           /**

-            * If index or size is negative, or greater than the allowed value

-            */

-            INDEX_SIZE_ERR = 1,

-

-            /**

-             * If the specified range of text does not fit into a DOMString

-             * @since http://www.w3.org/TR/2000/REC-DOM-Level-2-Core-20001113/core.html

-             */

-            DOMSTRING_SIZE_ERR = 2,

-            /**

-             * If any node is inserted somewhere it doesn't belong

-             * @since http://www.w3.org/TR/2000/REC-DOM-Level-2-Core-20001113/core.html

-             */

-            HIERARCHY_REQUEST_ERR = 3,

-

-            /**

-             * If a node is used in a different document than the one that created it

-             * (that doesn't support it)

-             * @since http://www.w3.org/TR/2000/REC-DOM-Level-2-Core-20001113/core.html

-             */

-            WRONG_DOCUMENT_ERR = 4,

-

-            /**

-             * If an invalid or illegal character is specified, such as in a name. See

-             * production 2 in the XML specification for the definition of a legal

-             * character, and production 5 for the definition of a legal name

-             * character.

-             * @since http://www.w3.org/TR/2000/REC-DOM-Level-2-Core-20001113/core.html

-             */

-            INVALID_CHARACTER_ERR = 5,

-

-            /**

-             * If data is specified for a node which does not support data

-             * @since http://www.w3.org/TR/2000/REC-DOM-Level-2-Core-20001113/core.html

-             */

-            NO_DATA_ALLOWED_ERR = 6,

-

-            /**

-             * If an attempt is made to modify an object where modifications are not

-             * allowed

-             * @since http://www.w3.org/TR/2000/REC-DOM-Level-2-Core-20001113/core.html

-             */

-            NO_MODIFICATION_ALLOWED_ERR = 7,

-

-            /**

-             * If an attempt is made to reference a node in a context where it does

-             * not exist

-             * @since http://www.w3.org/TR/2000/REC-DOM-Level-2-Core-20001113/core.html

-             */

-            NOT_FOUND_ERR = 8,

-

-            /**

-             * If the implementation does not support the requested type of object or

-             * operation.

-             * @since http://www.w3.org/TR/2000/REC-DOM-Level-2-Core-20001113/core.html

-             */

-            NOT_SUPPORTED_ERR = 9,

-

-            /**

-             * If an attempt is made to add an attribute that is already in use

-             * elsewhere

-             */

-            INUSE_ATTRIBUTE_ERR = 10,

-

-            /**

-             * If an attempt is made to use an object that is not, or is no longer,

-             * usable.

-             * @since http://www.w3.org/TR/2000/REC-DOM-Level-2-Core-20001113/core.html

-             */

-            INVALID_STATE_ERR = 11,

-

-            /**

-             * If an invalid or illegal string is specified.

-             * @since http://www.w3.org/TR/2000/REC-DOM-Level-2-Core-20001113/core.html

-             */

-            SYNTAX_ERR = 12,

-

-            /**

-             * If an attempt is made to modify the type of the underlying object.

-             * @since http://www.w3.org/TR/2000/REC-DOM-Level-2-Core-20001113/core.html

-             */

-            INVALID_MODIFICATION_ERR = 13,

-

-            /**

-             * If an attempt is made to create or change an object in a way which is

-             * incorrect with regard to namespaces.

-             * @see http://www.w3.org/TR/2000/REC-DOM-Level-2-Core-20001113/core.html

-             */

-            NAMESPACE_ERR = 14,

-

-            /**

-             * If a parameter or an operation is not supported by the underlying

-             * object.

-             * @since http://www.w3.org/TR/2000/REC-DOM-Level-2-Core-20001113/core.html

-             */

-            INVALID_ACCESS_ERR = 15,

-        };

-public:

-        /**

-         * Return the exception reason.

-         * @return the exception reason.

-         */

-        short getCode() const

-        {

-            return code;

-        }

-};

-#endif /*__DOMEXCEPTION__*/

-

diff --git a/media/libdrm/mobile2/include/util/domcore/DOMString.h b/media/libdrm/mobile2/include/util/domcore/DOMString.h
deleted file mode 100644
index f6f2b14..0000000
--- a/media/libdrm/mobile2/include/util/domcore/DOMString.h
+++ /dev/null
@@ -1,26 +0,0 @@
-/*
- * Copyright (C) 2007 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-#ifndef __DOM_STRING_H__

-#define __DOM_STRING_H__

-

-#include <ustring.h>

-using namespace ustl;

-typedef string DOMString;

-

-const DOMString emptyString = DOMString("");

-

-#endif /*__DOM_STRING_H_*/

-

diff --git a/media/libdrm/mobile2/include/util/domcore/DocumentImpl.h b/media/libdrm/mobile2/include/util/domcore/DocumentImpl.h
deleted file mode 100644
index b003e2a..0000000
--- a/media/libdrm/mobile2/include/util/domcore/DocumentImpl.h
+++ /dev/null
Binary files differ
diff --git a/media/libdrm/mobile2/include/util/domcore/ElementImpl.h b/media/libdrm/mobile2/include/util/domcore/ElementImpl.h
deleted file mode 100644
index 2b0bc45..0000000
--- a/media/libdrm/mobile2/include/util/domcore/ElementImpl.h
+++ /dev/null
@@ -1,147 +0,0 @@
-/*
- * Copyright (C) 2007 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */

-#ifndef __DOM_ELEMENT_IMPL__

-#define __DOM_ELEMENT_IMPL__

-#include "NodeImpl.h"

-#include "NodeListImpl.h"

-#include "NodeType.h"

-

-class ElementImpl : public NodeImpl

-{

-public:

-

-        /**

-         * The name of the element. For example, in:

-         * <pre> &lt;elementExample

-         * id="demo"&gt; ... &lt;/elementExample&gt; , </pre>

-         *  <code>tagName</code> has

-         * the value <code>"elementExample"</code>. Note that this is

-         * case-preserving in XML, as are all of the operations of the DOM. The

-         * HTML DOM returns the <code>tagName</code> of an HTML element in the

-         * canonical uppercase form, regardless of the case in the source HTML

-         * document.

-         * @return the element's tag name.

-         */

-        virtual const DOMString* getTagName() const;

-

-        /**

-         * Retrieves an attribute value by name.

-         * @param name The name of the attribute to retrieve.

-         * @return The <code>Attr</code> value as a string, or the empty string

-         *   if that attribute does not have a specified or default value.

-         */

-        virtual const DOMString* getAttribute(const DOMString* name) const;

-

-        /**

-         * Adds a new attribute. If an attribute with that name is already present

-         * in the element, its value is changed to be that of the value

-         * parameter. This value is a simple string; it is not parsed as it is

-         * being set. So any markup (such as syntax to be recognized as an

-         * entity reference) is treated as literal text, and needs to be

-         * appropriately escaped by the implementation when it is written out.

-         * In order to assign an attribute value that contains entity

-         * references, the user must create an <code>Attr</code> node plus any

-         * <code>Text</code> and <code>EntityReference</code> nodes, build the

-         * appropriate subtree, and use <code>setAttributeNode</code> to assign

-         * it as the value of an attribute.

-         * <br>To set an attribute with a qualified name and namespace URI, use

-         * the <code>setAttributeNS</code> method.

-         * @param name The name of the attribute to create or alter.

-         * @param value Value to set in string form.

-         * @exception DOMException

-         *   INVALID_CHARACTER_ERR: Raised if the specified name contains an

-         *   illegal character.

-         *   <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly.

-         */

-        virtual void setAttribute(const DOMString* name, const DOMString* value) throw (DOMException);

-

-        /**

-         * Removes an attribute by name. If the removed attribute is known to have

-         * a default value, an attribute immediately appears containing the

-         * default value as well as the corresponding namespace URI, local name,

-         * and prefix when applicable.

-         * <br>To remove an attribute by local name and namespace URI, use the

-         * <code>removeAttributeNS</code> method.

-         * @param name The name of the attribute to remove.

-         * @exception DOMException

-         *   NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly.

-         */

-        virtual void removeAttribute(const DOMString* name) throw (DOMException);

-

-        /**

-         * Returns a <code>NodeList</code> of all descendant <code>Elements</code>

-         * with a given tag name, in the order in which they are encountered in

-         * a preorder traversal of this <code>Element</code> tree.

-         * @param name The name of the tag to match on. The special value "*"

-         *   matches all tags.

-         * @return A list of matching <code>Element</code> nodes.

-         */

-        NodeListImpl* getElementsByTagName(const DOMString* name) const;

-

-        /** Override getNodeType() method in NodeImpl.h.*/

-        virtual bool hasAttributes() const;

-

-        /** Override getNodeName() method in NodeImpl.h.*/

-        const DOMString* getNodeName() const;

-

-        /** Override getNodeType() method in NodeImpl.h.*/

-        NodeType getNodeType() const;

-

-        /** Defining "click()" method*/

-        virtual void click(){}

-

-        /** Defining "blur()" method,*/

-        virtual void blur(){}

-

-        /** Defining "focus()" method*/

-        virtual void focus(){}

-

-        /** Defining "change()" method*/

-        virtual void change(){}

-

-        /** Defining "select()" method*/

-        virtual void select(){}

-

-        /** Defining "onClick()" event input,textarea,button, and anchor*/

-        virtual bool onClick(){return true;}

-

-        /** Defining "onBlur()" event,for input,textarea,button,anchor and select */

-        virtual bool onBlur(){return true;}

-

-        /** Defining "onFocus()" event,for input,textarea,button,anchor and select*/

-        virtual bool onFocus(){return true;}

-

-        /** Defining "onChange()" event,for input,textarea and select tag*/

-        virtual bool onChange(){return true;}

-

-        /** Defining "onSelect()" event,for textarea and input*/

-        virtual bool onSelect(){return true;}

-

-        /**

-         * when the end tag of one element is found,this method would be called.The basic action is call seCompleted().

-        **/

-        virtual void endElement() {}

-

-private:

-        /**

-         * Get elements whose name match on <code>name</code>,than keep they into <code>nodeList</code>.

-         * @param name   The tag name of the elements to match on.

-         * @param nodeList keep all the matched element.

-         */

-        void getElementsByTagName(const DOMString* name,NodeListImpl* nodeList) const;

-};

-#endif /*__DOM_ELEMENT_IMPL__*/

-

diff --git a/media/libdrm/mobile2/include/util/domcore/NodeImpl.h b/media/libdrm/mobile2/include/util/domcore/NodeImpl.h
deleted file mode 100644
index 10423c3..0000000
--- a/media/libdrm/mobile2/include/util/domcore/NodeImpl.h
+++ /dev/null
@@ -1,266 +0,0 @@
-/*
- * Copyright (C) 2007 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-#ifndef  __DOM_NODE_IMPL__

-#define  __DOM_NODE_IMPL__

-

-#include "DOMException.h"

-#include "NodeType.h"

-#include "DOMString.h"

-class LayoutAttr;

-class DocumentImpl;

-class NodeImpl {

-private:

-    /** The pointer to first children */

-    NodeImpl* firstChild;

-

-    /** The pointer to lastChild children */

-    NodeImpl* lastChild;

-

-    /** The pointer to previous sibling children */

-    NodeImpl* previousSibling;

-

-    /** The pointer to next sibling children */

-    NodeImpl* nextSibling;

-

-    /** The pointer to parent */

-    NodeImpl* parent;

-

-    /** Current node's document context */

-    const DocumentImpl* document;

-

-   /**

-     * Add next slibing node

-     * @param node the node to be add.

-     */

-    void appendNextSibling(NodeImpl* node);

-

-public:

-    /**

-     * Default constuctor.

-     */

-    NodeImpl(): firstChild(NULL),lastChild(NULL),previousSibling(NULL),nextSibling(NULL),parent(NULL),document(NULL) {};

-

-    /**

-     * Set <code>parentNode</code> as current node's parent.

-     *

-     * @param parentNode The specify parent node.

-     */

-    void setParent(NodeImpl* parentNode);

-

-    /**

-     * Set the node immediately following node.

-     *

-     * @param siblingNode The special node be insert after current node.

-     */

-    void setNextSibling(NodeImpl* siblingNode);

-

-    /**

-     * Returns the node immediately preceding this node.

-     *

-     * @param siblingNode The special node be insert before current node.

-     */

-    void setPreviousSibling(NodeImpl* siblingNode);

-

-    /**

-     * Set <code>childNode</code> as current node's first children. If current

-     * node have first child node,it will replace with the <code>childNode</code>.

-     *

-     * @param childNode The special node be set as the first children node of current

-     *                  node.

-     */

-    void setFirstChild(NodeImpl* childNode);

-

-    /**

-     * Set <code>childNode</code> as current node's last children. If current

-     * node have last child node,it will replace with the <code>childNode</code>.

-     *

-     * @param childNode The special node be set as the last children node of current

-     *                  node.

-     */

-    void setLastChild(NodeImpl* childNode);

-

-    /**

-     * The name of this node, depending on its type;

-     * @return the node's name.

-     */

-    virtual const DOMString* getNodeName() const = 0;

-

-    /**

-     * The value of this node, depending on its type;

-     * When it is defined to be <code>null</code>, setting it has no effect.

-     * @return the value of node.

-     * @exception DOMException

-     * DOMSTRING_SIZE_ERR: Raised when it would return more characters than

-     * fit in a <code>DOMString</code> variable on the implementation

-     * platform.

-     */

-    virtual const DOMString* getNodeValue() const throw (DOMException);

-

-    /**

-     * Set the node value.

-     * @param nodeValue the node value

-     * @exception DOMException

-     * NO_MODIFICATION_ALLOWED_ERR: Raised when the node is readonly.

-     */

-    virtual void setNodeValue(DOMString* nodeValue) throw (DOMException);

-

-    /**

-     * A code representing the type of the underlying object, as defined above.

-     * @return the node's type.

-     */

-    virtual NodeType getNodeType() const = 0;

-

-    /**

-     * Returns whether this node (if it is an element) has any attributes.

-     * @return <code>true</code> if this node has any attributes,

-     *   <code>false</code> otherwise.

-     * @since DOM Level 2

-     */

-    virtual bool hasAttributes() const;

-

-    /**

-     * The parent of this node. All nodes, except <code>Attr</code>,

-     * <code>Document</code>, <code>DocumentFragment</code>,

-     * <code>Entity</code>, and <code>Notation</code> may have a parent.

-     * However, if a node has just been created and not yet added to the

-     * tree, or if it has been removed from the tree, this is

-     * <code>NULL</code>.

-     * @return return current node's parent.

-     */

-    NodeImpl* getParentNode() const;

-

-    /**

-     * The first child of this node. If there is no such node, this returns

-     * <code>NULL</code>.

-     * @return current node  first children.

-     */

-    NodeImpl* getFirstChild() const;

-

-    /**

-     * The last child of this node. If there is no such node, this returns

-     * <code>NULL</code>.

-     * @return current  node last children.

-     */

-    NodeImpl* getLastChild() const;

-

-    /**

-     * The node immediately preceding this node. If there is no such node,

-     * this returns <code>NULL</code>.

-     * @return current node previous sibling children.

-     */

-    NodeImpl* getPreviousSibling() const;

-

-    /**

-     * The node immediately following this node. If there is no such node,

-     * this returns <code>NULL</code>.

-     * @return return current  node next sibling children.

-     */

-    NodeImpl* getNextSibling() const;

-

-    /**

-     * Inserts the node <code>newChild</code> before the existing child node

-     * <code>refChild</code>. If <code>refChild</code> is <code>NULL</code>,

-     * insert <code>newChild</code> at the end of the list of children.

-     * <br>If <code>newChild</code> is a <code>DocumentFragment</code> object,

-     * all of its children are inserted, in the same order, before

-     * <code>refChild</code>. If the <code>newChild</code> is already in the

-     * tree, it is first removed.

-     * @param newChild The node to insert.

-     * @param refChild The reference node, i.e., the node before which the

-     *   new node must be inserted.

-     * @return The node being inserted.

-     * @exception DOMException

-     *   HIERARCHY_REQUEST_ERR: Raised if this node is of a type that does not

-     *   allow children of the type of the <code>newChild</code> node, or if

-     *   the node to insert is one of this node's ancestors or this node

-     *   itself.

-     *   <br>WRONG_DOCUMENT_ERR: Raised if <code>newChild</code> was created

-     *   from a different document than the one that created this node.

-     *   <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly or

-     *   if the parent of the node being inserted is readonly.

-     *   <br>NOT_FOUND_ERR: Raised if <code>refChild</code> is not a child of

-     *   this node.

-     */

-    NodeImpl* insertBefore(NodeImpl* newChild, NodeImpl* refChild) throw (DOMException);

-

-    /**

-     * Removes the child node indicated by <code>oldChild</code> from the list

-     * of children, and returns it.

-     * @param oldChild The node being removed.

-     * @return The node removed.

-     * @exception DOMException

-     *   NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly.

-     *   <br>NOT_FOUND_ERR: Raised if <code>oldChild</code> is not a child of

-     *   this node.

-     */

-    NodeImpl* removeChild(NodeImpl* oldChild) throw (DOMException);

-

-    /**

-     * Adds the node <code>newChild</code> to the end of the list of children

-     * of this node. If the <code>newChild</code> is already in the tree, it

-     * is first removed.

-     * @param newChild The node to add.If it is a

-     *   <code>DocumentFragment</code> object, the entire contents of the

-     *   document fragment are moved into the child list of this node

-     * @return The node added.

-     * @exception DOMException

-     *   HIERARCHY_REQUEST_ERR: Raised if this node is of a type that does not

-     *   allow children of the type of the <code>newChild</code> node, or if

-     *   the node to append is one of this node's ancestors or this node

-     *   itself.

-     *   <br>WRONG_DOCUMENT_ERR: Raised if <code>newChild</code> was created

-     *   from a different document than the one that created this node.

-     *   <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly or

-     *   if the previous parent of the node being inserted is readonly.

-     */

-    NodeImpl* appendChild(NodeImpl* newChild) throw (DOMException);

-

-    /**

-     * Returns whether this node has any children.

-     * @return <code>true</code> if this node has any children,

-     *   <code>false</code> otherwise.

-     */

-    bool hasChildNodes() const;

-

-    virtual ~NodeImpl() {};

-

-    /**

-     * Get the LayoutAttr of this node

-     * @return the pointer to  LayoutAttr

-     */

-    virtual LayoutAttr* getLayoutAttr() const { return NULL;}

-

-    /**

-     * Set the LayoutAttr of this node

-     * @param attr the attributes to be set

-     * @return void

-     */

-    virtual void setLayoutAttr(LayoutAttr* attr) { return;}

-

-    /**

-     * Set document context.

-     * @param document The specify document context.

-     */

-    void setDocument(const DocumentImpl* document);

-

-    /**

-     * Get document context.

-     * @return the current node's document context.

-     */

-    const DocumentImpl* getDocument() const;

-};

-#endif  /*__DOM_NODE_IMPL__*/

-

diff --git a/media/libdrm/mobile2/include/util/domcore/NodeIterator.h b/media/libdrm/mobile2/include/util/domcore/NodeIterator.h
deleted file mode 100644
index 06fda28..0000000
--- a/media/libdrm/mobile2/include/util/domcore/NodeIterator.h
+++ /dev/null
@@ -1,74 +0,0 @@
-/*
- * Copyright (C) 2007 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-#ifndef __DOM_NODE_ITERATOR__

-#define __DOM_NODE_ITERATOR__

-class NodeImpl;

-/**

- * The Iterator is used to visit DOM_TREE.

- * <code>Attention</code>:The Iterator is not safe.

- * When the caller using the Iterator to access the tree,

- * the underlying data was modified, the next() or prev() may not return the right result.

- * means we have a <code>restriction</code>: the Iterator can only be used in the case that the tree structure will

- * not be modified before the end of iteration.

- */

-class NodeIterator {

-private:

-    NodeImpl* scopeNode;/** The specify the range of iterating */

-    NodeImpl* endNode;  /** The specify the end position of iterating */

-    NodeImpl* curNode;  /** The position of current node.*/

-

-    /**

-     * Find the specify node's next order node.

-     * @param node The specify node.

-     * @return The next order node when success.

-     *         NULL when has an error.

-     */

-    NodeImpl* findNextOrderNode(NodeImpl* node);

-

-    /**

-     * Find the specify node's previous order node.

-     * @param node The specify node.

-     * @return The previous order node when success.

-     *         NULL when has an error.

-     */

-    NodeImpl* findPreviousOrderNode(NodeImpl* node);

-public:

-    /**

-     * Construct for NodeIterator.

-     * we must specify <code>start</code> value when we want iterate the DOM_TREE.

-     * and we also can specify the <code>scope</code> if want restrict the range of iterator.

-     * (eg: restrict the range of iterating at a subtree).otherwise it will iterate the whole DOM_TREE.

-     * @param start The start position.

-     * @param scope The scope of iterating.

-     * @param end The end position of iterating.

-     */

-    NodeIterator(NodeImpl* start, NodeImpl* scope = NULL, NodeImpl* end = NULL);

-

-    /**

-     * Get next order node at current position in DOM_TREE.

-     * @return NULL On there is not node can be get.

-     *         The pointer of node On can get next node.

-     */

-    NodeImpl* next();

-

-    /**

-     * Get next order node at current position in DOM_TREE.

-     * @return NULL On there is not node can be get.

-     *         The pointer of node On can get previous node.

-     */

-    NodeImpl* prev();

-};

-#endif /*  __DOM_NODE_ITERATOR__ */

diff --git a/media/libdrm/mobile2/include/util/domcore/NodeListImpl.h b/media/libdrm/mobile2/include/util/domcore/NodeListImpl.h
deleted file mode 100644
index 07c0a6a..0000000
--- a/media/libdrm/mobile2/include/util/domcore/NodeListImpl.h
+++ /dev/null
@@ -1,48 +0,0 @@
-/*
- * Copyright (C) 2007 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-#ifndef __NODE_LIST_IMPL__

-#define __NODE_LIST_IMPL__

-

-#include "NodeImpl.h"

-#include "Vector.h"

-class NodeListImpl {

-private:

-    vector<const NodeImpl*> nodeList;

-public:

-    /**

-     *  Add a special node into list.

-     *  @param newNode specify component.

-     */

-    void append(const NodeImpl* newNode);

-

-    /**

-     * Return The special position node pointer.

-     * @param index The special position.

-     * @return The node's pointer on success.

-     *         NULL when out of list's boundary.

-     */

-    const NodeImpl* item(int index) const;

-

-    /**

-     * Return the length of list.

-     * @return the length of list.

-     */

-    int getLength() const;

-

-    ~NodeListImpl();

-};

-#endif /*__NODE_LIST_IMPL__ */

-

diff --git a/media/libdrm/mobile2/include/util/domcore/NodeType.h b/media/libdrm/mobile2/include/util/domcore/NodeType.h
deleted file mode 100644
index 0e51a63..0000000
--- a/media/libdrm/mobile2/include/util/domcore/NodeType.h
+++ /dev/null
@@ -1,68 +0,0 @@
-/*
- * Copyright (C) 2007 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-#ifndef __DOM_NODE_TYPE__

-#define __DOM_NODE_TYPE__

-enum NodeType {

-    /**

-     * The node is an <code>Element</code>.

-     */

-    ELEMENT_NODE = 1,

-    /**

-     * The node is an <code>Attr</code>.

-     */

-    ATTRIBUTE_NODE = 2,

-    /**

-     * The node is a <code>Text</code> node.

-     */

-    TEXT_NODE                 = 3,

-    /**

-     * The node type is CDATASection.

-     */

-    CDATA_SECTION_NODE        = 4,

-    /**

-     * The node type is an EntityReference.

-     */

-    ENTITY_REFERENCE_NODE     = 5,

-    /**

-     * The node type is an <code>Entity</code>.

-     */

-    ENTITY_NODE               = 6,

-    /**

-     * The node type is a ProcessingInstruction.

-     */

-    PROCESSING_INSTRUCTION_NODE = 7,

-    /**

-     * The node is a Comment

-     */

-    COMMENT_NODE              = 8,

-    /**

-     * The node is a Document.

-     */

-    DOCUMENT_NODE             = 9,

-    /**

-     * The node is a DocumentType.

-     */

-    DOCUMENT_TYPE_NODE        = 10,

-    /**

-     * The node is a DocumentFragment.

-     */

-    DOCUMENT_FRAGMENT_NODE    = 11,

-    /**

-     * The node is a Notation.

-     */

-    NOTATION_NODE             = 12,

-};

-#endif

diff --git a/media/libdrm/mobile2/include/util/domcore/TextImpl.h b/media/libdrm/mobile2/include/util/domcore/TextImpl.h
deleted file mode 100644
index fc55fcd..0000000
--- a/media/libdrm/mobile2/include/util/domcore/TextImpl.h
+++ /dev/null
@@ -1,40 +0,0 @@
-/*
- * Copyright (C) 2007 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-#ifndef __DOM_TEXT_IMPL__

-#define __DOM_TEXT_IMPL__

-#include "CharacterDataImpl.h"

-class TextImpl:public CharacterDataImpl

-{

-private:

-        const static DOMString nodeName;

-public:

-        /** Text default constructor for TextImpl.*/

-        TextImpl();

-

-        /**

-         * Constructor for TextImpl

-         * @param data The specify data to be set.

-         */

-        TextImpl(const DOMString* data);

-

-        /** Override getNodeType method in NodeImpl.h */

-        NodeType getNodeType() const;

-

-        /** Override getNodeName method in NodeImpl.h */

-        const DOMString* getNodeName() const;

-};

-#endif /*__DOM_TEXT_IMPL__*/

-

diff --git a/media/libdrm/mobile2/include/util/domcore/Vector.h b/media/libdrm/mobile2/include/util/domcore/Vector.h
deleted file mode 100644
index 8ceae3b..0000000
--- a/media/libdrm/mobile2/include/util/domcore/Vector.h
+++ /dev/null
@@ -1,21 +0,0 @@
-/*
- * Copyright (C) 2007 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-#ifndef __VECTOR_H__

-#define __VECTOR_H__

-#include <uvector.h>

-using namespace ustl;

-#endif /*__VECTOR_H__*/

-

diff --git a/media/libdrm/mobile2/include/util/domcore/stack.h b/media/libdrm/mobile2/include/util/domcore/stack.h
deleted file mode 100644
index cfcf4e5..0000000
--- a/media/libdrm/mobile2/include/util/domcore/stack.h
+++ /dev/null
@@ -1,21 +0,0 @@
-/*
- * Copyright (C) 2007 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-#ifndef __STACK_H__

-#define __STACK_H__

-#include <ustack.h>

-using namespace ustl;

-#endif /*__STACK_H__*/

-

diff --git a/media/libdrm/mobile2/include/util/xml/DomExpatAgent.h b/media/libdrm/mobile2/include/util/xml/DomExpatAgent.h
deleted file mode 100644
index 9972d5b..0000000
--- a/media/libdrm/mobile2/include/util/xml/DomExpatAgent.h
+++ /dev/null
@@ -1,104 +0,0 @@
-/*
- * Copyright (C) 2007 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */

-#ifndef _DOMEXPATAGENT_
-#define _DOMEXPATAGENT_
-
-#include <Drm2CommonTypes.h>
-#include <ofstream.h>
-#include <sostream.h>
-#include <ustring.h>
-#include <sistream.h>
-#include <util/domcore/NodeImpl.h>
-#include <util/domcore/DOMString.h>
-#include "ExpatWrapper.h"
-#include "XMLElementImpl.h"
-#include "XMLDocumentImpl.h"
-using namespace ustl;
-
-class DomExpatAgent : public ExpatWrapper {
-public:
-    /**
-     * Constructor for DomExpatAgent.
-     * @param xmlDocPtr XMLDocument pointer.
-     */
-    DomExpatAgent(XMLDocumentImpl* xmlDocPtr);
-
-    /** Destructor for DomExpatAgent. */
-    ~DomExpatAgent();
-
-    /**
-     * Generate XML DOM Document from XML source.
-     * @param <code>xmlStream</code> the XML source stream.
-     * @return ture or false to indicate whether generate successfully.
-     */
-    bool generateDocumentFromXML(istringstream *xmlStream);
-
-    /**
-     * Generate XML stream from XML DOM document.
-     * @return xml stream.
-     */
-    ostringstream* generateXMLFromDocument();
-
-    /**
-     * deal with start element in Expat.
-     */
-    virtual void startElement(const XML_Char *name,
-                              const XML_Char **atts);
-
-    /**
-     * deal with end element for Expat.
-     */
-    virtual void endElement(const XML_Char *name);
-
-    /**
-     * deal with data handler for Expat.
-     */
-    virtual void dataHandler(const XML_Char *s, int len);
-
-PRIVATE:
-    /**
-     * Push a xml element with the specific tag name into stack.
-     * @param name The name of tag.
-     * @param atts The attributes of related tag.
-     */
-    void pushTag(const DOMString *name, const XML_Char **atts);
-
-    /**
-     * Append text into top element of stack.
-     * @param text The data related to the present tag.
-     */
-    void appendText(const DOMString *text);
-
-    /**
-     * Pop the xml element with the specific tag name.
-     * @param name The name of tag.
-     */
-    void popTag(const DOMString *name);
-
-    /**
-     * Traverse the XML DOM document starting from specific element.
-     * @param root The specific element start to traverse.
-     */
-    void traverse(ElementImpl *root);
-
-PRIVATE:
-    vector<NodeImpl*> mStack; /**< the stack to manage the tag. */
-    XMLElementImpl* mTopElementPtr; /**< the top element of the stack. */
-    XMLDocumentImpl* mXMLDocumentPtr; /**< XML DOM document pointer. */
-    ostringstream mXMLostream; /**< xml output stream. */
-};
-
-#endif
diff --git a/media/libdrm/mobile2/include/util/xml/ExpatWrapper.h b/media/libdrm/mobile2/include/util/xml/ExpatWrapper.h
deleted file mode 100644
index 5a2d7fe..0000000
--- a/media/libdrm/mobile2/include/util/xml/ExpatWrapper.h
+++ /dev/null
@@ -1,81 +0,0 @@
-/*
- * Copyright (C) 2007 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */

-#ifndef _XML_H_
-#define _XML_H_
-
-#include <expat.h>
-#include <ustring.h>
-#include <Drm2CommonTypes.h>
-
-using namespace ustl;
-
-class ExpatWrapper {
-public:
-    /**
-     * Constructor for ExpatWrapper.
-     */
-    ExpatWrapper();
-
-    /**
-     * Destructor for ExpatWrapper.
-     */
-    virtual ~ExpatWrapper();
-
-    /**
-     * decode call expat to parse the xml.
-     * @param buf The buffer to be parsed.
-     * @param len The length of the buffer.
-     * @param isFinal The flag to indicate whether the buffer
-     *                is a fragment or whole xml.
-     */
-    int decode(const char* buf, int len, int isFinal);
-
-    /**
-     * virtual funtion to deal with the start element in expat, need implement by child class.
-     */
-    virtual void startElement(const XML_Char *name, const XML_Char **atts);
-
-    /**
-     * virtual funtion to deal with the end element in expat, need implement by child class.
-     */
-    virtual void endElement(const XML_Char *name);
-
-    /**
-     * virtual funtion to deal with the data handler in expat, need implement by child class.
-     */
-    virtual void dataHandler(const XML_Char *s, int len);
-
-PRIVATE:
-    /**
-     * Callback for Expat startElement.
-     */
-    static void startElementCallback(void *userData, const XML_Char *name, const XML_Char **atts);
-
-    /**
-     * Callback for Expat endElement.
-     */
-    static void endElementCallback(void *userData, const XML_Char *name);
-
-    /**
-     * Callback for Expat dataHandler.
-     */
-    static void dataHandlerCallback(void *userData, const XML_Char *s, int len);
-
-PRIVATE:
-    XML_Parser mParser; /**< The expat parser object. */
-};
-
-#endif
diff --git a/media/libdrm/mobile2/include/util/xml/XMLDocumentImpl.h b/media/libdrm/mobile2/include/util/xml/XMLDocumentImpl.h
deleted file mode 100644
index c29b87d..0000000
--- a/media/libdrm/mobile2/include/util/xml/XMLDocumentImpl.h
+++ /dev/null
@@ -1,52 +0,0 @@
-/*
- * Copyright (C) 2007 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */

-#ifndef _XMLDOCUMENTIMPL_H_
-#define _XMLDOCUMENTIMPL_H_
-
-#include <Drm2CommonTypes.h>
-#include <util/domcore/DocumentImpl.h>
-
-class XMLDocumentImpl : public DocumentImpl {
-public:
-    /** Constructor for XMLDocumentImpl. */
-    XMLDocumentImpl();
-
-    /** Destructor for XMLDocumentImpl. */
-    ~XMLDocumentImpl();
-
-    /**
-     * Get the first child element of the document.
-     * @return the first child <code>Element</code> of document.
-     */
-    virtual ElementImpl* getDocumentElement() const;
-
-    /**
-     * Create a XML element with the specific name.
-     * @param tagName The specific tag name.
-     * @return a new xml <code>Element</code>
-     * @exception DOMException
-     */
-    virtual ElementImpl* createElement(const DOMString* tagName) const throw (DOMException);
-
-    /**
-     * Create a text node with the specific data.
-     * @param data The specific data.
-     * @return a new <code>Text</code> node.
-     */
-    virtual TextImpl* createTextNode(const DOMString* data) const;
-};
-
-#endif
diff --git a/media/libdrm/mobile2/include/util/xml/XMLElementImpl.h b/media/libdrm/mobile2/include/util/xml/XMLElementImpl.h
deleted file mode 100644
index a0c95ec..0000000
--- a/media/libdrm/mobile2/include/util/xml/XMLElementImpl.h
+++ /dev/null
@@ -1,105 +0,0 @@
-/*
- * Copyright (C) 2007 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */

-#ifndef _XMLELEMENTIMPL_H_
-#define _XMLELEMENTIMPL_H_
-
-#include <Drm2CommonTypes.h>
-#include <util/domcore/ElementImpl.h>
-#include <util/domcore/DOMString.h>
-#include <umap.h>
-#include <ustring.h>
-using namespace ustl;
-
-typedef map<DOMString, DOMString> DOMStringMap;
-
-class XMLElementImpl : public ElementImpl {
-public:
-    /**
-     * Constructor for XMLElementImpl.
-     * @param tag The name of the tag.
-     */
-    XMLElementImpl(const DOMString *tag);
-
-    /** Destructor for XMLElementImpl. */
-    ~XMLElementImpl();
-
-    /**
-     * Get the attribute map of the XML element.
-     * @return <code>DOMStringMap</code>
-     */
-    const DOMStringMap* getAttributeMap() const;
-
-    /**
-     * Get the tag name of the element.
-     * return tag name.
-     */
-    virtual const DOMString* getTagName() const;
-
-    /**
-     * Set the attribute of the element.
-     * @param name The key of the attribute.
-     * @param value The value of the attribute.
-     */
-    virtual void setAttribute(const DOMString* name, const DOMString* value) throw (DOMException);
-
-    /**
-     * Remove the specific attribute.
-     * @param name The key of the attribute.
-     * @exception DOMException.
-     */
-    virtual void removeAttribute(const DOMString* name) throw (DOMException);
-
-    /**
-     * Get the specific attribute.
-     * @param name The key of the attribute.
-     * @return the value of the attribute.
-     */
-    virtual const DOMString* getAttribute(const DOMString* name) const;
-
-    /**
-     * Detect whether element has attributes or not.
-     * @return true or false to indicate the result.
-     */
-    virtual bool hasAttributes() const;
-
-    /**
-     * Find the first child node in element by its tag name.
-     * @param element the specific element to be found.
-     * @param tag the specific tag name to be searched.
-     * @return NULL if not found otherwise the child node.
-     */
-    const NodeImpl* findSoloChildNode(const char* tag) const;
-
-    /**
-     * Get the first text containted in first child of the element.
-     * @param tag the specific tag name to be searched.
-     * @return NULL if not found otherwise the text.
-     */
-    const string* getSoloText(const char* tag) const;
-
-    /**
-     * Get the first child xml element containted in the element.
-     * @param tag the specific tag name to be searched.
-     * @return NULL if not found otherwise the element.
-     */
-    const XMLElementImpl* getSoloElement(const char* tag) const;
-
-PRIVATE:
-    DOMString mTagName; /**< The tag name. */
-    DOMStringMap mAttributeMap; /** The map of attributes. */
-};
-
-#endif
diff --git a/media/libdrm/mobile2/src/dcf/DrmDcfCommon.cpp b/media/libdrm/mobile2/src/dcf/DrmDcfCommon.cpp
deleted file mode 100644
index 0f5e4ac..0000000
--- a/media/libdrm/mobile2/src/dcf/DrmDcfCommon.cpp
+++ /dev/null
@@ -1,206 +0,0 @@
-/*
- * Copyright (C) 2007 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#include <dcf/DrmDcfCommon.h>
-
-int64_t ntoh_int64(int64_t x)
-{
-    return (((int64_t)(ntohl((int32_t)((x << 32) >> 32))) << 32) | (uint32_t)ntohl(((int32_t)(x >> 32))));
-}
-
-/**
- * Class: Box
- */
-Box::Box(const uint8_t* box):mLargeSize(0),mUserType(NULL)
-{
-    if(!box)
-    {
-        return ;
-    }
-
-    const uint8_t* p = box;
-
-    /* Get the size value */
-    mSize = ntohl(*(uint32_t *)p);
-    p += sizeof(mSize);
-
-    /* Get the type value */
-    mType = *((uint32_t *)p);
-    p += sizeof(mType);
-
-    if (1 == mSize)
-    {
-        mLargeSize = ntoh_int64(*(uint64_t *)p);
-        p += sizeof(mLargeSize);
-    }
-
-    if (DCF_USER_TYPE == mType)
-    {
-        mUserType = new uint8_t[USER_TYPE_LEN];
-        memcpy(mUserType, p, USER_TYPE_LEN);
-        p += USER_TYPE_LEN;
-    }
-
-    mBoxLength = p - box;
-}
-
-Box::Box(const Box& other)
-{
-    mSize = other.mSize;
-    mType = other.mType;
-    mLargeSize = other.mLargeSize;
-    mUserType = NULL;
-
-    if(other.mUserType)
-    {
-        mUserType = new uint8_t[USER_TYPE_LEN];
-        memcpy(mUserType,other.mUserType,USER_TYPE_LEN);
-    }
-}
-
-Box& Box::operator=(const Box& other)
-{
-    if(this == &other)
-    {
-        return *this;
-    }
-
-    if(mUserType)
-    {
-        delete []mUserType;
-        mUserType = NULL;
-    }
-
-    if(other.mUserType)
-    {
-        mUserType = new uint8_t[USER_TYPE_LEN];
-        memcpy(mUserType, other.mUserType, USER_TYPE_LEN);
-    }
-
-    return *this;
-}
-
-Box::~Box()
-{
-    if(mUserType)
-    {
-        delete []mUserType;
-        mUserType = NULL;
-    }
-}
-
-uint64_t Box::getSize(void) const
-{
-    if(1 == mSize)
-    {
-        return mLargeSize;
-    }
-
-    return mSize;
-}
-
-uint32_t Box::getType(void) const
-{
-    return mType;
-}
-
-const uint8_t* Box::getUsertype(void) const
-{
-    return mUserType;
-}
-
-uint32_t Box::getLen(void) const
-{
-    return mBoxLength;
-}
-
-
-/**
- * Class: FullBox
- */
-FullBox::FullBox(const uint8_t* fullBox) : Box(fullBox)
-{
-    if(!fullBox)
-    {
-        return ;
-    }
-
-    const uint8_t* p = fullBox;
-
-    p += Box::getLen();
-
-    mVersion = *p;
-    p++;
-
-    memcpy(mFlag, p,FLAG_LEN);
-    p += FLAG_LEN;
-
-    mFullBoxLength = p - fullBox;
-}
-
-uint8_t FullBox::getVersion(void) const
-{
-    return mVersion;
-}
-
-const uint8_t* FullBox::getFlag(void) const
-{
-    return mFlag;
-}
-
-uint32_t FullBox::getLen(void) const
-{
-    return mFullBoxLength;
-}
-
-///// class TextualHeader implementation
-TextualHeader::TextualHeader(const string& inData)
-{
-    string::size_type loc1 = inData.find(":", 0);
-
-    if (loc1 != string::npos)
-    {
-        name.assign(inData, 0, loc1);
-    }
-
-    string::size_type loc2 = inData.find(";", loc1 + 1);
-
-    if (loc2 != string::npos)
-    {
-        value.assign(inData, loc1 + 1, loc2 - loc1 - 1);
-        param.assign(inData, loc2 + 1, inData.length() - loc2 - 1);
-    }
-    else
-    {
-        value.assign(inData, loc1 + 1, inData.length() - loc1 - 1);
-    }
-}
-
-string TextualHeader::getName() const
-{
-    return name;
-}
-
-string TextualHeader::getValue() const
-{
-    return value;
-}
-
-string TextualHeader::getParam() const
-{
-    return param;
-}
-
diff --git a/media/libdrm/mobile2/src/dcf/DrmDcfContainer.cpp b/media/libdrm/mobile2/src/dcf/DrmDcfContainer.cpp
deleted file mode 100644
index 517c930..0000000
--- a/media/libdrm/mobile2/src/dcf/DrmDcfContainer.cpp
+++ /dev/null
@@ -1,294 +0,0 @@
-/*
- * Copyright (C) 2007 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#include <dcf/DrmDcfContainer.h>
-
-DcfContainer::DcfContainer(const uint8_t* data,istream& inRawData,uint64_t conOff)
-                : FullBox(data),mConStream(inRawData)
-{
-    if(!data)
-    {
-        return;
-    }
-
-    const uint8_t* p = data;
-    const uint8_t* flag = this->getFlag();
-
-    if(flag[0] & USER_DATA_FLAG)
-    {
-        mHasUserData = true;
-    }
-    else
-    {
-        mHasUserData = false;
-    }
-
-    p += this->getLen();
-
-    FullBox fullBoxDiscrete(p);
-
-    p += fullBoxDiscrete.getLen();
-
-    mContentTypeLen = *p;
-    p++;
-
-    mContentType.assign((const char*)p,0,mContentTypeLen);
-    p += mContentTypeLen;
-
-    // parse common header
-    FullBox fullBoxComm(p);
-    p += fullBoxComm.getLen();
-
-    mEncryptionMethod = *p;
-    p++;
-
-    mPaddingScheme = *p;
-    p++;
-
-    mPlaintextLength = ntoh_int64(*((uint64_t *)p));
-    p += sizeof(mPlaintextLength);
-
-    mContentIDLength = ntohs(*(uint16_t *)p);
-    p += sizeof(mContentIDLength);
-
-    mRightsIssuerURLLength = ntohs(*(uint16_t *)p);
-    p += sizeof(mRightsIssuerURLLength);
-
-    mTextualHeadersLength = ntohs(*(uint16_t *)p);
-    p += sizeof(mTextualHeadersLength);
-
-    mContentID.assign((const char *)p,0,mContentIDLength);
-    p += mContentIDLength;
-
-    mRightsIssuerURL.assign((const char *)p,0,mRightsIssuerURLLength);
-    p += mRightsIssuerURLLength;
-
-    // parse textual header
-    if (mTextualHeadersLength > 0)
-    {
-        if(false == parseTextualHeaders(p,mTextualHeadersLength))
-        {
-            return;
-        }
-
-        p += mTextualHeadersLength;
-    }
-
-    ////////////// parser group id
-
-    ///parse content
-    p = data + this->getLen() + fullBoxDiscrete.getSize();
-    FullBox fullBoxContetn(p);
-    p += fullBoxContetn.getLen();
-    mDataLen = ntoh_int64(*((uint64_t *)p));
-    p += sizeof(mDataLen);
-
-    mDecOffset = conOff + (p - data);
-    p += mDataLen;
-
-    /////////////// parser user data
-}
-
-DcfContainer::~DcfContainer()
-{
-    uint32_t size = mTextualHeaders.size();
-
-    for(uint32_t i = 0; i < size; i++)
-    {
-        delete mTextualHeaders[i];
-    }
-
-    mTextualHeaders.clear();
-    mCustomHeader.clear();
-}
-
-
-string DcfContainer::getContentType(void) const
-{
-    return mContentType;
-}
-
-uint8_t DcfContainer::getEncryptionMethod(void) const
-{
-    return mEncryptionMethod;
-}
-
-uint8_t DcfContainer::getPaddingScheme(void) const
-{
-    return mPaddingScheme;
-}
-
-uint64_t DcfContainer::getPlaintextLength(void) const
-{
-    return mPlaintextLength;
-}
-
-uint16_t DcfContainer::getContentIDLength(void) const
-{
-    return mContentIDLength;
-}
-
-uint16_t DcfContainer::getRightsIssuerURLLength(void) const
-{
-    return mRightsIssuerURLLength;
-}
-
-uint16_t DcfContainer::getTextualHeadersLength(void) const
-{
-    return mTextualHeadersLength;
-}
-
-string DcfContainer::getContentID(void) const
-{
-    return mContentID;
-}
-
-string DcfContainer::getRightsIssuerURL(void) const
-{
-    return mRightsIssuerURL;
-}
-
-string DcfContainer::getPreviewMethod(void) const
-{
-    return mSlientMethod;
-}
-
-string DcfContainer::getContentLocation(void) const
-{
-    return mContentLocation;
-}
-
-string DcfContainer::getContentURL(void) const
-{
-    return mContentURL;
-}
-
-vector<string> DcfContainer::getCustomerHead(void) const
-{
-    return mCustomHeader;
-}
-
-istream& DcfContainer::getStream(void) const
-{
-    return mConStream;
-}
-
-DrmInStream DcfContainer::getPreviewElementData(void) const
-{
-     // get data based on mPreviewElementURI
-     //encryptedData = ;
-
-     DrmInStream inStream;
-     return inStream;
-}
-
-DrmInStream DcfContainer::getDecryptContent(uint8_t* decryptKey) const
-{
-    DrmInStream inStream(this,decryptKey);
-    return inStream;
-}
-
-bool DcfContainer::parseTextualHeaders(const uint8_t* data, uint32_t len)
-{
-    if(!data)
-    {
-        return false;
-    }
-
-    const uint8_t* p = data;
-
-    while (len > (uint32_t)(p - data))
-    {
-        uint32_t l = strlen((const char*)p);
-
-        string str((const char*)p, l);
-        TextualHeader* tmp = new TextualHeader(str);
-
-        if(!tmp)
-        {
-            return false;
-        }
-
-        mTextualHeaders.push_back(tmp);
-
-        p += l + 1;
-    }
-
-    uint32_t size = mTextualHeaders.size();
-    uint32_t silentpos = 0;
-    uint32_t previewpos = 0;
-
-    for( uint32_t i = 0; i < size; i++)
-    {
-        string tempStr = mTextualHeaders[i]->getName();
-
-        if(tempStr == "Silent")
-        {
-            silentpos = i;
-            mSlientMethod = mTextualHeaders[i]->getValue();
-            mSilentRightsURL = mTextualHeaders[i]->getParam();
-        }
-        else if(tempStr == "Preview")
-        {
-            previewpos = i;
-            mPreviewMethod = mTextualHeaders[i]->getValue();
-
-            if(mPreviewMethod == "instant")
-            {
-                mPreviewElementURI = mTextualHeaders[i]->getParam();
-            }
-            else
-            {
-                mPreviewRightsURL = mTextualHeaders[i]->getParam();
-            }
-        }
-        else if(tempStr == "ContentURL")
-        {
-            mContentURL = mTextualHeaders[i]->getValue();
-        }
-        else if(tempStr == "ContentVersion")
-        {
-            mContentVersion = mTextualHeaders[i]->getValue();
-        }
-        if(tempStr == "Content-Location")
-        {
-            mContentLocation = mTextualHeaders[i]->getValue();
-        }
-        else
-        {
-            string str = mTextualHeaders[i]->getName();
-            str += ":";
-            str += mTextualHeaders[i]->getValue();
-            mCustomHeader.push_back(str);
-        }
-    }
-
-    if(silentpos < previewpos)
-    {
-        mSilentFirst = true;
-    }
-    else
-    {
-        mSilentFirst = false;
-    }
-
-    return true;
-}
-
-
-
-
-
diff --git a/media/libdrm/mobile2/src/dcf/DrmIStream.cpp b/media/libdrm/mobile2/src/dcf/DrmIStream.cpp
deleted file mode 100644
index 1bcc16a..0000000
--- a/media/libdrm/mobile2/src/dcf/DrmIStream.cpp
+++ /dev/null
@@ -1,94 +0,0 @@
-/*
- * Copyright (C) 2007 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#include <dcf/DrmIStream.h>
-
-
-DrmInStream::DrmInStream(const DcfContainer* container,uint8_t* Key)
-:mDcfCon(container),mDecryptPos(0)
-{
-    memcpy(mAesKey,Key,AES_KEY_LEN);
-}
-
-uint64_t DrmInStream::size() const
-{
-    return mDcfCon->mPlaintextLength;
-}
-
-uint64_t DrmInStream::read(uint8_t* data, uint64_t len)
-{
-    if(!data)
-    {
-        return 0;
-    }
-
-    if(mDecryptPos >= mDcfCon->mPlaintextLength)
-    {
-        return 0;
-    }
-
-    uint64_t readLen = len;
-
-    // come to the end of decrypted data
-    if(mDecryptPos + len > mDcfCon->mPlaintextLength)
-    {
-        readLen = mDcfCon->mPlaintextLength - mDecryptPos;
-    }
-
-    uint64_t encLen = mDcfCon->mDataLen;
-    uint8_t* encData = new uint8_t[encLen];
-
-    if(!encData)
-    {
-        return 0;
-    }
-
-    mDcfCon->mConStream.seek(mDcfCon->mDecOffset);
-    mDcfCon->mConStream.read(encData,encLen);
-
-    uint8_t iv[AES_IV_LEN] = {0};
-
-    memcpy(iv,encData,AES_IV_LEN);
-    encLen -= AES_IV_LEN;
-
-    if(AES_128_CBC != mDcfCon->mEncryptionMethod)
-    {
-        delete []encData;
-        return 0;
-    }
-
-    AesAgent drmAesDecrypt(AES_128_CBC,mAesKey);
-    int32_t padLen = drmAesDecrypt.decContent( iv,
-                                               encData + AES_IV_LEN,
-                                               encLen,
-                                               data);
-
-    delete []encData;
-
-    if(padLen >= 0)
-    {
-        return readLen;
-    }
-    else
-    {
-        return 0;
-    }
-}
-
-
-
-
-
diff --git a/media/libdrm/mobile2/src/dcf/DrmRawContent.cpp b/media/libdrm/mobile2/src/dcf/DrmRawContent.cpp
deleted file mode 100644
index 8813e3c..0000000
--- a/media/libdrm/mobile2/src/dcf/DrmRawContent.cpp
+++ /dev/null
@@ -1,164 +0,0 @@
-/*
- * Copyright (C) 2007 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#include <dcf/DrmRawContent.h>
-
-
-DrmRawContent::DrmRawContent(istream& inRawData)
-{
-    uint32_t count = inRawData.stream_size();
-
-    if (count <= MAX_PIECE_LEN)
-    {
-        uint8_t* data = new uint8_t[count];
-
-        if(!data)
-        {
-            return;
-        }
-
-        inRawData.read(data,count);
-
-        const uint8_t* dcf = data;
-
-        //parse DCF file header
-        if(false == parseDcfHeader(dcf))
-        {
-            delete []data;
-            return;
-        }
-
-        dcf = data;
-        dcf += FIX_HEADER_LEN;
-
-        if(dcf >= (data + count))
-        {
-            return;
-        }
-
-        // parse container box
-        FullBox conFullBox(dcf);
-
-        if(DCF_CONTAINER_BOX != conFullBox.getType())
-        {
-            return;
-        }
-
-        //check whether it is multipart DCF or not
-        do
-        {
-            uint64_t size = conFullBox.getSize();
-
-            mContainer.push_back(new DcfContainer(dcf,inRawData,dcf-data));
-
-            dcf += size;
-
-            // come to the end of raw content
-            if(dcf >= (data + count))
-            {
-                break;
-            }
-
-            conFullBox = FullBox(dcf);
-        }while(DCF_CONTAINER_BOX == conFullBox.getType());
-
-        // compute DCF hash using Sha1Agent
-        Sha1Agent drmSha1Hash;
-        drmSha1Hash.computeHash(data,dcf-data,mDcfHash);
-
-        //// parse mutable box
-
-        delete []data;
-    }
-}
-
-DrmRawContent::~DrmRawContent()
-{
-    uint32_t size = mContainer.size();
-
-    for(uint32_t i = 0; i < size; i++)
-    {
-        delete mContainer[i];
-    }
-
-    mContainer.clear();
-}
-
-vector<DcfContainer*> DrmRawContent::getContents(void) const
-{
-    return mContainer;
-}
-
-uint32_t DrmRawContent::getDcfHashLen() const
-{
-    return DCF_HASH_LEN;
-}
-
-void DrmRawContent::getDcfHash(uint8_t* outDcfHash) const
-{
-    if(outDcfHash)
-    {
-        memcpy(outDcfHash,mDcfHash,DCF_HASH_LEN);
-    }
-
-    return;
-}
-
-bool DrmRawContent::parseDcfHeader(const uint8_t* dcfHead)
-{
-    if(!dcfHead)
-    {
-        return false;
-    }
-
-    if(FIX_HEADER_LEN != ntohl(*(uint32_t *)dcfHead))
-    {
-        return false;
-    }
-
-    dcfHead += 4;
-    uint32_t type = *(uint32_t *)dcfHead;
-
-    if(DCF_FILE_TYPE != type)
-    {
-        return false;
-    }
-
-    dcfHead += 4;
-    type = *(uint32_t *)dcfHead;
-
-    if(DCF_FILE_BRAND != type)
-    {
-        return false;
-    }
-
-    dcfHead += 4;
-    if(2 != ntohl(*(uint32_t *)dcfHead))
-    {
-        return false;
-    }
-
-    dcfHead += 4;
-    type = *(uint32_t *)dcfHead;
-
-    if(DCF_FILE_BRAND != type)
-    {
-        return false;
-    }
-
-    dcfHead += 4;
-    return true;
-}
diff --git a/media/libdrm/mobile2/src/drmmanager/DrmManager.cpp b/media/libdrm/mobile2/src/drmmanager/DrmManager.cpp
deleted file mode 100644
index 599526f..0000000
--- a/media/libdrm/mobile2/src/drmmanager/DrmManager.cpp
+++ /dev/null
@@ -1,67 +0,0 @@
-/*
- * Copyright (C) 2007 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-#include <drmmanager/DrmManager.h>
-#include <ustring.h>
-#include <ofstream.h>
-#include <sostream.h>
-#include <sistream.h>
-using namespace ustl;
-
-/**see DrmManager.h */
-DrmManager::DrmManager(istream * inRawData)
-{
-    mDcfStream = NULL;
-    if (inRawData != NULL)
-    {
-        mDcfStream = inRawData;
-    }
-}
-
-/**see DrmManager.h */
-DrmManager::DrmManager(istream * inRawData, string mimeType)
-{
-    mDcfStream = inRawData;
-}
-
-/**see DrmManager.h */
-int16_t DrmManager::getListOfDcfObjects(vector<DcfContainer*> **outDcfList)
-{
-    /** call dcf functions to parse the dcf file*/
-    if (NULL == mDcfStream)
-    {
-        return ERR_DCFSTREAM_NOT_INITIALIZED;
-    }
-    if (NULL == outDcfList)
-    {
-        return ERR_DCFSTREAM_NOT_INITIALIZED;
-    }
-    *outDcfList=&mDcfs;
-    return DRM_OK;
-}
-
-/**see DrmManager.h */
-int16_t DrmManager::openDecryptedContent(DcfContainer *oneDcfObject,
-                                         int16_t operationType,
-                                         istream *outDecryptedData)
-{
-    return 1;
-}
-
-/**see DrmManager.h */
-DrmManager::~DrmManager()
-{
-
-}
diff --git a/media/libdrm/mobile2/src/rights/Asset.cpp b/media/libdrm/mobile2/src/rights/Asset.cpp
deleted file mode 100644
index 120b465..0000000
--- a/media/libdrm/mobile2/src/rights/Asset.cpp
+++ /dev/null
@@ -1,110 +0,0 @@
-/*
- * Copyright (C) 2007 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#include <rights/Asset.h>
-
-/** see Asset.h */
-Asset::Asset()
-{}
-
-/** see Asset.h */
-Asset::~Asset()
-{}
-
-/** see Asset.h */
-bool Asset::hasParent()
-{
-    return false;
-}
-
-/** see Asset.h */
-void Asset::setID(const string &id)
-{
-    mAssetID = id;
-}
-
-/** see Asset.h */
-const string& Asset::getID() const
-{
-    return mAssetID;
-}
-
-/** see Asset.h */
-void Asset::setContentID(const string &id)
-{
-    mContentID = id;
-}
-
-/** see Asset.h */
-const string& Asset::getContentID() const
-{
-    return mContentID;
-}
-
-/** see Asset.h */
-void Asset::setEncryptedKey(const string &key)
-{
-    mEncryptedKey = key;
-}
-
-/** see Asset.h */
-void Asset::setDCFDigest(const string &value)
-{
-    mDigestValue = value;
-}
-
-/** see Asset.h */
-const string& Asset::getDCFDigest() const
-{
-    return mDigestValue;
-}
-
-/** see Asset.h */
-void Asset::setKeyRetrievalMethod(const string &rm)
-{
-    mRetrievalMethod = rm;
-}
-
-/** see Asset.h */
-void Asset::setParentContentID(const string &id)
-{
-    mParentContentID = id;
-}
-
-/** see Asset.h */
-const string& Asset::getEncrytedKey() const
-{
-    return mEncryptedKey;
-}
-
-/** see Asset.h */
-const char* Asset::getCek() const
-{
-    return NULL;
-}
-
-/** see Asset.h */
-void Asset::recoverCek()
-{
-//fix later.
-
-}
-
-/** see Asset.h */
-const string& Asset::getParentContentID() const
-{
-    return mParentContentID;
-}
diff --git a/media/libdrm/mobile2/src/rights/Constraint.cpp b/media/libdrm/mobile2/src/rights/Constraint.cpp
deleted file mode 100644
index 2cb4311..0000000
--- a/media/libdrm/mobile2/src/rights/Constraint.cpp
+++ /dev/null
@@ -1,210 +0,0 @@
-/*
- * Copyright (C) 2007 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#include <rights/Constraint.h>
-
-/** see Constraint.h */
-Constraint::Constraint()
-{
-    mCount = INIT_VALUE;
-    mTimedCount = INIT_VALUE;
-    mTimer = INIT_VALUE;
-    mStart = INIT_VALUE;
-    mEnd = INIT_VALUE;
-    mInterval = INIT_VALUE;
-    mAccumulated = INIT_VALUE;
-    mExport = NONE;
-}
-
-/** see Constraint.h */
-Constraint::~Constraint()
-{}
-
-/** see Constraint.h */
-bool Constraint::isUnConstraint() const
-{
-    return (mCount == INIT_VALUE && mTimedCount == INIT_VALUE &&
-            mTimer == INIT_VALUE && mStart == INIT_VALUE &&
-            mEnd == INIT_VALUE && mInterval == INIT_VALUE &&
-            mAccumulated == INIT_VALUE && mExport == NONE &&
-            mSystemList.empty());
-}
-
-/** see Constraint.h */
-bool Constraint::isDateTimeConstraint() const
-{
-    return !(mStart == INIT_VALUE && mEnd == INIT_VALUE);
-}
-
-/** see Constraint.h */
-bool Constraint::isIntervalConstraint() const
-{
-    return !(mInterval == INIT_VALUE);
-}
-
-/** see Constraint.h */
-bool Constraint::isTimedCountConstraint() const
-{
-    return !(mTimedCount == INIT_VALUE);
-}
-
-/** see Constraint.h */
-bool Constraint::isValid(long time) const
-{
-    if (isUnConstraint())
-    {
-        return true;
-    }
-
-    if (isDateTimeConstraint())
-    {
-        if (time < mStart || time > mEnd)
-        {
-            return false;
-        }
-    }
-
-    if (mInterval == 0 || mCount == 0 ||
-        mTimedCount == 0 || mAccumulated == 0)
-    {
-        return false;
-    }
-
-    return true;
-}
-
-/** see Constraint.h */
-void Constraint::setStartTime(long time)
-{
-    mStart = time;
-}
-
-/** see Constraint.h */
-long Constraint::getStartTime() const
-{
-    return mStart;
-}
-
-/** see Constraint.h */
-void Constraint::setEndTime(long time)
-{
-    mEnd = time;
-}
-
-/** see Constraint.h */
-long Constraint::getEndTime() const
-{
-    return mEnd;
-}
-
-/** see Constraint.h */
-void Constraint::setAccumulated(long time)
-{
-    mAccumulated = time;
-}
-
-/** see Constraint.h */
-long Constraint::getAccumulated() const
-{
-    return mAccumulated;
-}
-
-/** see Constraint.h */
-void Constraint::setCount(int count)
-{
-    mCount = count;
-}
-
-/** see Constraint.h */
-int Constraint::getCount() const
-{
-    return mCount;
-}
-
-/** see Constraint.h */
-void Constraint::setTimer(int timer)
-{
-    mTimer = timer;
-}
-
-/** see Constraint.h */
-int Constraint::getTimer() const
-{
-    return mTimer;
-}
-
-/** see Constraint.h */
-void Constraint::setTimedCount(int timedCount)
-{
-    mTimedCount = timedCount;
-}
-
-/** see Constraint.h */
-int Constraint::getTimedCount() const
-{
-    return mTimedCount;
-}
-
-/** see Constraint.h */
-void Constraint::setInterval(int interval)
-{
-    mInterval = interval;
-}
-
-/** see Constraint.h */
-int Constraint::getInterval() const
-{
-    return mInterval;
-}
-
-/** see Constraint.h */
-void Constraint::setExportMode(MODE mode)
-{
-    mExport = mode;
-}
-
-/** see Constraint.h */
-Constraint::MODE Constraint::getExportMode() const
-{
-    return mExport;
-}
-
-/** see Constraint.h */
-bool Constraint::consume()
-{
-    if (isUnConstraint())
-    {
-        return true;
-    }
-
-    if (mCount > 0)
-    {
-        mCount--;
-        return true;
-    }
-
-    if (mAccumulated > 0)
-    {
-        mAccumulated--;
-        return true;
-    }
-
-    if (mTimedCount > 0)
-    {
-
-    }
-    return false;
-}
diff --git a/media/libdrm/mobile2/src/rights/OperationPermission.cpp b/media/libdrm/mobile2/src/rights/OperationPermission.cpp
deleted file mode 100644
index fc75fb1..0000000
--- a/media/libdrm/mobile2/src/rights/OperationPermission.cpp
+++ /dev/null
@@ -1,60 +0,0 @@
-/*
- * Copyright (C) 2007 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#include <rights/OperationPermission.h>
-#include <rights/Constraint.h>
-
-/** see OperationPermission.h */
-OperationPermission::OperationPermission() : mConstraint(NULL)
-{
-
-}
-
-/** see OperationPermission.h */
-OperationPermission::OperationPermission(OPERATION type, Constraint *cst) : mType(type), mConstraint(cst)
-{
-
-}
-
-/** see OperationPermission.h */
-OperationPermission::~OperationPermission()
-{
-    delete mConstraint;
-}
-
-/** see OperationPermission.h */
-void OperationPermission::setType(OPERATION type)
-{
-    mType = type;
-}
-
-/** see OperationPermission.h */
-OperationPermission::OPERATION OperationPermission::getType() const
-{
-    return mType;
-}
-
-/** see OperationPermission.h */
-void OperationPermission::addConstraint(Constraint* constraint)
-{
-    mConstraint = constraint;
-}
-
-/** see OperationPermission.h */
-Constraint* OperationPermission::getConstraint() const
-{
-    return mConstraint;
-}
diff --git a/media/libdrm/mobile2/src/rights/Right.cpp b/media/libdrm/mobile2/src/rights/Right.cpp
deleted file mode 100644
index 6be9c70..0000000
--- a/media/libdrm/mobile2/src/rights/Right.cpp
+++ /dev/null
@@ -1,79 +0,0 @@
-/*
- * Copyright (C) 2007 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-#include <rights/Right.h>
-#include <rights/OperationPermission.h>
-#include <rights/Constraint.h>
-
-/** see Right.h */
-Right::Right()
-{
-
-}
-
-/** see Right.h */
-Right::~Right()
-{
-     vector<OperationPermission*>::iterator it;
-
-     for (it = mOpList.begin(); it != mOpList.end(); it++)
-     {
-        delete(*it);
-     }
-
-     mOpList.clear();
-}
-
-/** see Right.h */
-void Right::addAssetID(const string& id)
-{
-    mAssetNameList.push_back(id);
-}
-
-/** see Right.h */
-void Right::addOperationPermission(OperationPermission* op)
-{
-    mOpList.push_back(op);
-}
-
-/** see Right.h */
-bool Right::checkPermission(OperationPermission::OPERATION type)
-{
-    for (vector<OperationPermission*>::iterator it = mOpList.begin();
-             it != mOpList.end(); it++)
-    {
-        if ((*it)->getType() == type)
-        {
-            return true;
-        }
-    }
-
-    return false;
-}
-
-/** see Right.h */
-Constraint* Right::getConstraint(OperationPermission::OPERATION type)
-{
-    for (vector<OperationPermission*>::iterator it = mOpList.begin();
-             it != mOpList.end(); it++)
-    {
-        if ((*it)->getType() == type)
-        {
-            return (*it)->getConstraint();
-        }
-    }
-
-    return NULL;
-}
diff --git a/media/libdrm/mobile2/src/rights/Ro.cpp b/media/libdrm/mobile2/src/rights/Ro.cpp
deleted file mode 100644
index 8141e17..0000000
--- a/media/libdrm/mobile2/src/rights/Ro.cpp
+++ /dev/null
@@ -1,831 +0,0 @@
-/*
- * Copyright (C) 2007 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#include <rights/Ro.h>
-#include <rights/Constraint.h>
-#include <rights/OperationPermission.h>
-#include <util/xml/DomExpatAgent.h>
-#include <util/domcore/DOMString.h>
-#include <utils/Log.h>
-
-#include <uassert.h>
-#include <time.h>
-#include <ofstream.h>
-using namespace ustl;
-
-const char *STR_RO_RIGHTS = "o-ex:rights";
-const char *STR_RO_CONTEXT = "o-ex:context";
-const char *STR_RO_AGREEMENT = "o-ex:agreement";
-const char *STR_RO_ASSET = "o-ex:asset";
-const char *STR_RO_INHERIT = "o-ex:inherit";
-const char *STR_RO_DIGEST = "o-ex:digest";
-const char *STR_RO_KEYINFO = "ds:KeyInfo";
-const char *STR_RO_PERMISSION = "o-ex:permission";
-const char *STR_RO_ASSET_ID = "o-ex:id";
-const char *STR_RO_ASSET_IDREF = "o-ex:idref";
-const char *STR_RO_CONTEXT_ID = "o-dd:uid";
-const char *STR_RO_CONTEXT_VERSION = "o-dd:version";
-const char *STR_RO_DIGEST_VALUE = "ds:DigestValue";
-const char *STR_RO_CIPHER_VALUE = "xenc:CipherValue";
-const char *STR_RO_RETRIEVAL_METHOD = "ds:RetrievalMethod";
-const char *STR_RO_PLAY = "o-dd:play";
-const char *STR_RO_DISPLAY = "o-dd:display";
-const char *STR_RO_EXECUTE = "o-dd:execute";
-const char *STR_RO_PRINT = "o-dd:print";
-const char *STR_RO_EXPORT = "o-dd:export";
-const char *STR_RO_CONSTRAINT = "o-ex:constraint";
-const char *STR_RO_COUNT = "o-dd:count";
-const char *STR_RO_TIMEDCOUNT = "o-dd:timed-count";
-const char *STR_RO_TIMER = "oma-dd:timer";
-const char *STR_RO_INTERVAL = "o-dd:interval";
-const char *STR_RO_DATETIME = "o-dd:datetime";
-const char *STR_RO_START = "o-dd:start";
-const char *STR_RO_END = "o-dd:end";
-const char *STR_RO_ACCUMULATED = "o-dd:accumulated";
-const char *STR_RO_INDIVIDUAL = "o-dd:individual";
-const char *STR_RO_SYSTEM = "o-dd:system";
-
-/** see Ro.h */
-Ro::Ro()
-{
-    mDoc = new XMLDocumentImpl();
-    mProperRight = NULL;
-}
-
-/** see Ro.h */
-Ro::~Ro()
-{
-     for (vector<Right*>::iterator itr = mRightList.begin(); itr != mRightList.end(); itr++)
-     {
-        delete(*itr);
-     }
-
-     mRightList.clear();
-
-     for (vector<Asset*>::iterator ita = mAssetList.begin(); ita != mAssetList.end(); ita++)
-     {
-        delete(*ita);
-     }
-
-     mAssetList.clear();
-
-     mProperRight = NULL;
-     delete mDoc;
-
-}
-
-/** see Ro.h */
-void Ro::setRoID(string& id)
-{
-    mRoID = id;
-}
-
-/** see Ro.h */
-const string& Ro::getRoID() const
-{
-    return mRoID;
-}
-
-/** see Ro.h */
-void Ro::setRoVersion(string& version)
-{
-    mRoVersion = version;
-}
-
-/** see Ro.h */
-void Ro::addAsset(Asset* asset)
-{
-    mAssetList.push_back(asset);
-}
-
-/** see Ro.h */
-void Ro::addRight(Right* right)
-{
-    mRightList.push_back(right);
-}
-
-/** see Ro.h */
-bool Ro::save()
-{
-     LOGI("==============Ro save.=================");
-
-     return true;
-}
-
-/** see Ro.h */
-Ro::ERRCODE Ro::parse(istringstream *roStream)
-{
-    DomExpatAgent xmlAgent(mDoc);
-
-    if (NULL == roStream)
-    {
-        LOGI("NULL stream");
-        return RO_NULL_STREAM;
-    }
-
-    if (xmlAgent.generateDocumentFromXML(roStream) == false)
-    {
-        LOGI("generate xml doc error");
-        return RO_ERR_BAD_XML;
-    }
-
-    handleDocument(mDoc);
-
-    return RO_OK;
-}
-
-/** see Ro.h */
-bool Ro::handleDocument(const XMLDocumentImpl* doc)
-{
-    assert(doc != NULL);
-
-    NodeImpl* node = doc->getDocumentElement();
-
-    return handleRights(node);
-}
-
-/** see Ro.h */
-bool Ro::handleRights(const NodeImpl *curNode)
-{
-    assert(curNode != NULL);
-
-    NodeImpl *node = curNode->getFirstChild();
-
-    while (NULL != node)
-    {
-        const DOMString* name;
-
-        name = static_cast<const XMLElementImpl*>(node)->getTagName();
-
-        if (name->compare(STR_RO_CONTEXT) == 0)
-        {
-            LOGI("rights context");
-            const DOMString *token = NULL;
-            token = static_cast<const XMLElementImpl*>(node)->getSoloText(STR_RO_CONTEXT_ID);
-
-            if (token)
-            {
-                LOGI(*token);
-                mRoID = *token;
-            }
-
-            token = static_cast<const XMLElementImpl*>(node)->getSoloText(STR_RO_CONTEXT_VERSION);
-            if (token)
-            {
-                LOGI(*token);
-                mRoVersion = *token;
-            }
-        }
-
-        if (name->compare(STR_RO_AGREEMENT) == 0)
-        {
-
-            LOGI("rights agreement");
-            if (handleAgreement(node) == false)
-            {
-                return false;
-            }
-        }
-
-        node = node->getNextSibling();
-    }
-    return true;
-}
-
-/** see Ro.h */
-bool Ro::handleAgreement(const NodeImpl *curNode)
-{
-    assert(curNode != NULL);
-
-    NodeImpl *node = curNode->getFirstChild();
-
-    while (NULL != node)
-    {
-        const DOMString* name;
-
-        name = static_cast<const XMLElementImpl*>(node)->getTagName();
-
-        if (name->compare(STR_RO_ASSET) == 0)
-        {
-            // do something about asset.
-            LOGI("asset");
-
-            if (handleAsset(node) == false)
-            {
-                return false;
-            }
-        }
-
-        if (name->compare(STR_RO_PERMISSION) == 0)
-        {
-            // do something about permission.
-            LOGI("permission");
-
-            if (handlePermission(node) == false)
-            {
-                return false;
-            }
-        }
-
-        node = node->getNextSibling();
-    }
-
-    return true;
-}
-
-/** see Ro.h */
-bool Ro::handleAsset(const NodeImpl *curNode)
-{
-    assert(curNode != NULL);
-
-    Asset *asset = new Asset();
-
-    const XMLElementImpl *curElement = static_cast<const XMLElementImpl*>(curNode);
-
-    if (curElement->hasAttributes())
-    {
-        DOMString assetID(STR_RO_ASSET_ID);
-        LOGI("asset id:");
-
-        const DOMString *id = curElement->getAttribute(&assetID);
-
-        if (id)
-        {
-            asset->setID(*id);
-        }
-
-    }
-
-    NodeImpl* node = curNode->getFirstChild();
-
-    const DOMString *name = NULL;
-    const string *token = NULL;
-
-    while (NULL != node)
-    {
-        curElement = static_cast<const XMLElementImpl*>(node);
-        name = curElement->getTagName();
-
-        if (name->compare(STR_RO_CONTEXT) == 0 ||
-            name->compare(STR_RO_INHERIT) == 0)
-        {
-            LOGI("asset context");
-
-            token = curElement->getSoloText(STR_RO_CONTEXT_ID);
-            if (token)
-            {
-                LOGI(*token);
-
-                if (name->compare(STR_RO_CONTEXT) == 0)
-                {
-                    asset->setContentID(*token);
-                }
-                else
-                {
-                    //parent ID.
-                    asset->setParentContentID(*token);
-                }
-            }
-        }
-
-        if (name->compare(STR_RO_DIGEST) == 0)
-        {
-            LOGI("asset digest");
-            //digest method is fixed value:
-            //http://www.w3.org/2000/09/xmldisig#sha1
-            token = curElement->getSoloText(STR_RO_DIGEST_VALUE);
-            if (token)
-            {
-                LOGI(*token);
-                asset->setDCFDigest(*token);
-            }
-        }
-
-        if (name->compare(STR_RO_KEYINFO) == 0)
-        {
-            LOGI("asset keyinfo");
-
-            token = curElement->getSoloText(STR_RO_CIPHER_VALUE);
-            if (token)
-            {
-                LOGI(*token);
-                asset->setEncryptedKey(*token);
-            }
-
-            const XMLElementImpl *node = curElement->getSoloElement(STR_RO_RETRIEVAL_METHOD);
-
-            if (node)
-            {
-                if (node->hasAttributes())
-                {
-                    DOMString uri("URI");
-                    token = node->getAttribute(&uri);
-                    if (token)
-                    {
-                        LOGI(*token);
-                        asset->setKeyRetrievalMethod(*token);
-                    }
-                }
-            }
-        }
-
-        node = node->getNextSibling();
-    }
-
-    this->addAsset(asset);
-    return true;
-}
-
-/** see Ro.h */
-bool Ro::handlePermission(const NodeImpl *curNode)
-{
-    assert(curNode != NULL);
-
-    Right *right = new Right();
-
-    const XMLElementImpl *curElement = static_cast<const XMLElementImpl*>(curNode);
-
-    NodeImpl* node = curNode->getFirstChild();
-
-    while (NULL != node)
-    {
-        const DOMString *name = NULL;
-        NodeListImpl *nodeList = NULL;
-
-        const string *token = NULL;
-        curElement = static_cast<const XMLElementImpl*>(node);
-        name = curElement->getTagName();
-
-        if (name->compare(STR_RO_ASSET) == 0)
-        {
-            LOGI("permission asset");
-            if (curElement->hasAttributes())
-            {
-                DOMString assetID(STR_RO_ASSET_IDREF);
-                const DOMString *id = curElement->getAttribute(&assetID);
-                if (id)
-                {
-                    right->addAssetID(*id);
-                    LOGI(*id);
-                }
-            }
-        }
-
-        OperationPermission::OPERATION type = OperationPermission::NONE;
-
-        if (name->compare(STR_RO_PLAY) == 0)
-        {
-            LOGI("permission play constraint");
-            type = OperationPermission::PLAY;
-        }
-
-        if (name->compare(STR_RO_DISPLAY) == 0)
-        {
-            LOGI("permission display costraint");
-            type = OperationPermission::DISPLAY;
-        }
-
-        if (name->compare(STR_RO_EXECUTE) == 0)
-        {
-            LOGI("permission execute constraint");
-            type = OperationPermission::EXECUTE;
-        }
-
-        if (name->compare(STR_RO_EXPORT) == 0)
-        {
-            LOGI("permission export constraint");
-            type = OperationPermission::EXPORT;
-        }
-
-        if (name->compare(STR_RO_PRINT) == 0)
-        {
-            LOGI("permission print constraint");
-            type = OperationPermission::PRINT;
-        }
-
-        Constraint *cst = NULL;
-
-        if (name->compare(STR_RO_CONSTRAINT) == 0)
-        {
-            LOGI("permission common constraint");
-            type = OperationPermission::COMMON;
-        }
-
-        cst = getConstraint(curElement);
-        if (cst)
-        {
-            OperationPermission *op = new OperationPermission(type, cst);
-            right->addOperationPermission(op);
-        }
-
-        node = node->getNextSibling();
-    }
-
-    this->addRight(right);
-    return true;
-}
-
-/** see Ro.h */
-long Ro::convertISO8601DateTimeToLong(const char* ts)
-{
-    if (NULL == ts)
-    {
-        return -1;
-    }
-
-    struct tm time;
-    memset(&time, 0, sizeof(struct tm));
-
-    strptime(ts, "%FT%T%z", &time);
-
-//need timezone support:  return mktime(&time) - timezone;
-//It seems android-sooner doesn't support timezone function.
-//line below is just for building, value would be wrong if no timezone minus.
-    return mktime(&time);
-}
-
-/** see Ro.h */
-long Ro::convertISO8601PeriodToLong(const char* ts)
-{
-    if (NULL == ts)
-    {
-        return -1;
-    }
-
-    int date, hour, min, sec;
-    sscanf(ts, "P%dDT%dH%dM%dS", &date, &hour, &min, &sec);
-    LOGI("%d %d %d %d", date, hour, min, sec);
-    return (date*24*60*60 + hour*60*60 + min*60 + sec);
-}
-
-/** see Ro.h */
-Constraint* Ro::getConstraint(const NodeImpl* curNode)
-{
-    assert(curNode != NULL);
-
-    Constraint *constraint = new Constraint();
-
-    const XMLElementImpl *curElement = static_cast<const XMLElementImpl*>(curNode);
-
-    const string *name = NULL;
-    const string *token = NULL;
-
-    if ((token = curElement->getSoloText(STR_RO_COUNT)))
-    {
-        LOGI(*token);
-        constraint->setCount(atoi(token->c_str()));
-    }
-
-    if ((token = curElement->getSoloText(STR_RO_START)))
-    {
-        LOGI(*token);
-        //start Time
-        constraint->setStartTime(convertISO8601DateTimeToLong(token->c_str()));
-    }
-
-    if ((token = curElement->getSoloText(STR_RO_END)))
-    {
-        LOGI(*token);
-        //end Time
-        constraint->setEndTime(convertISO8601DateTimeToLong(token->c_str()));
-    }
-
-    if ((token = curElement->getSoloText(STR_RO_INTERVAL)))
-    {
-        LOGI(*token);
-        constraint->setInterval(atoi(token->c_str()));
-    }
-
-    if ((token = curElement->getSoloText(STR_RO_ACCUMULATED)))
-    {
-        LOGI(*token);
-        //Period
-        constraint->setAccumulated(convertISO8601PeriodToLong(token->c_str()));
-    }
-
-    if ((token = curElement->getSoloText(STR_RO_TIMEDCOUNT)))
-    {
-        LOGI(*token);
-        constraint->setTimedCount(atoi(token->c_str()));
-
-        const XMLElementImpl *node = curElement->getSoloElement(STR_RO_TIMEDCOUNT);
-
-        if (node)
-        {
-            if (node->hasAttributes())
-            {
-                DOMString timer(STR_RO_TIMER);
-                token = node->getAttribute(&timer);
-                if (token)
-                {
-                    LOGI(*token);
-                    constraint->setTimer(atoi(token->c_str()));
-                }
-            }
-        }
-
-    }
-
-    return constraint;
-}
-
-/** see Ro.h */
-void Ro::loadRights(const string& contentID)
-{
-    for (vector<Right*>::iterator it = this->mRightList.begin();
-        it != this->mRightList.end(); it++)
-    {
-        if ((*it)->mAssetNameList.empty())
-        {
-            mContentRightList.push_back(*it);
-        }
-        else
-        {
-            for (vector<Asset*>::iterator ita = this->mAssetList.begin();
-                 ita != this->mAssetList.end(); ita++)
-            {
-                for (vector<string>::iterator its = (*it)->mAssetNameList.begin();
-                     its != (*it)->mAssetNameList.end(); its++)
-                {
-                    if ((*its).compare((*ita)->getID()) == 0)
-                    {
-                        if (contentID.compare((*ita)->getContentID()) == 0)
-                        {
-                            LOGI("find content right");
-                            mContentRightList.push_back(*it);
-                        }
-                    }
-                }
-            }
-        }
-
-
-    }
-
-}
-
-/** see Ro.h */
-void Ro::freeRights()
-{
-    mContentRightList.clear();
-}
-
-/** see Ro.h */
-bool Ro::checkPermission(OperationPermission::OPERATION type,
-                                const string& contentID)
-{
-    loadRights(contentID);
-
-    for (vector<Right*>::iterator it = mContentRightList.begin(); it != mContentRightList.end(); it++)
-     {
-        if ((*it)->checkPermission(type))
-        {
-            freeRights();
-            return true;
-        }
-
-     }
-    freeRights();
-    return false;
-}
-
-/** see Ro.h */
-Ro::ERRCODE Ro::consume(OperationPermission::OPERATION type,
-                         const string& contentID)
-{
-    loadRights(contentID);
-
-    //check in mRightList
-    vector<Right*>::iterator it;
-    vector<Right*> tmpList;
-    vector<Right*> retList;
-    Constraint *constraint = NULL;
-    long ealiestEnd = -1;
-    bool hasCommonConstraint = false;
-    bool hasUnconstraint = false;
-    bool hasDateTimeConstraint = false;
-    bool hasTimedCountConstraint = false;
-    bool hasIntervalConstraint = false;
-
-
-    //apply the RO rule, if do not satisfy the constraint, .
-    //proper right select process
-
-    for (it = mContentRightList.begin(); it != mContentRightList.end(); it++)
-    {
-        if ((*it)->checkPermission(type))
-        {
-            constraint = (*it)->getConstraint(OperationPermission::COMMON);
-            if (constraint)
-            {
-                if (!constraint->isValid(time(NULL)))
-                {
-                    continue;
-                }
-
-                hasCommonConstraint = true;
-                tmpList.push_back(*it);
-            }
-
-            constraint = (*it)->getConstraint(type);
-            assert(constraint != NULL);
-
-            if (!constraint->isValid(time(NULL)))
-            {
-                continue;
-            }
-
-            if (constraint->isUnConstraint())
-            {
-                //use uncontrainted firstly.
-                hasUnconstraint = true;
-                tmpList.push_back(*it);
-                break;
-            }
-
-            if (constraint->isDateTimeConstraint())
-            {
-                //use datetime constraint in high priority.
-                //if contain multipe constraints, use the earliest expire time.
-                hasDateTimeConstraint = true;
-                tmpList.push_back(*it);
-                continue;
-            }
-
-            if (constraint->isTimedCountConstraint())
-            {
-            //illegal Operation when time counted
-                if (type == OperationPermission::PRINT ||
-                    type == OperationPermission::EXPORT)
-                {
-                    continue;
-                }
-
-                hasTimedCountConstraint = true;
-                tmpList.push_back(*it);
-                continue;
-            }
-
-            if (constraint->isIntervalConstraint())
-            {
-                hasIntervalConstraint = true;
-                tmpList.push_back(*it);
-                continue;
-            }
-
-            tmpList.push_back(*it);
-        }
-    }
-
-
-    for (it = tmpList.begin(); it != tmpList.end(); it++)
-    {
-        if (hasUnconstraint == true)
-        {
-            //delete other constraint
-            constraint = (*it)->getConstraint(type);
-            if (constraint)
-            {
-                if (constraint->isUnConstraint())
-                {
-                    retList.push_back(*it);
-                    break;
-                }
-            }
-            continue;
-        }
-
-        if (hasDateTimeConstraint == true)
-        {
-            //delete other constraint
-            constraint = (*it)->getConstraint(type);
-            if (constraint)
-            {
-                if (constraint->isDateTimeConstraint())
-                {
-                    long tt = constraint->getEndTime();
-
-                    if (ealiestEnd == -1)
-                    {
-                        ealiestEnd = tt;
-                        retList.push_back(*it);
-                    }
-                    else if (ealiestEnd > tt)
-                    {
-                        ealiestEnd = tt;
-                        retList.pop_back();
-                        retList.push_back(*it);
-                    }
-                }
-            }
-            continue;
-        }
-
-        if (hasIntervalConstraint == true)
-        {
-            //delete other constraint
-            constraint = (*it)->getConstraint(type);
-            if (constraint)
-            {
-                if (constraint->isIntervalConstraint())
-                {
-                    retList.push_back(*it);
-                }
-            }
-            continue;
-        }
-
-        if (hasTimedCountConstraint == true)
-        {
-            constraint = (*it)->getConstraint(type);
-            if (constraint)
-            {
-                if (constraint->isTimedCountConstraint())
-                {
-                    retList.push_back(*it);
-                }
-            }
-            continue;
-        }
-
-        retList.push_back(*it);
-    }
-
-    if (retList.size() == 0)
-    {
-        freeRights();
-        return RO_BAD;
-    }
-
-    LOGI("Proper right has %d", retList.size());
-
-    assert(retList.size() == 1);
-
-    mProperRight = retList[0];
-    constraint = retList[0]->getConstraint(OperationPermission::COMMON);
-    if (constraint)
-    {
-        if (constraint->consume() == false)
-        {
-            freeRights();
-            return RO_BAD;
-        }
-    }
-
-    constraint = retList[0]->getConstraint(type);
-    if (constraint)
-    {
-        if (constraint->consume() == false)
-        {
-            freeRights();
-            return RO_BAD;
-        }
-    }
-
-    //update the constraint
-    freeRights();
-    return RO_OK;
-}
-
-/** see Ro.h */
-string Ro::getContentCek(const string& contentID)
-{
-    for (vector<Asset*>::iterator it = mAssetList.begin();
-        it != mAssetList.end(); it++)
-    {
-        if (contentID.compare((*it)->getContentID()) == 0)
-        {
-            return (*it)->getCek();
-        }
-    }
-
-    return "";
-}
-
-/** see Ro.h */
-string Ro::getContentHash(const string& contentID)
-{
-    for (vector<Asset*>::iterator it = mAssetList.begin();
-        it != mAssetList.end(); it++)
-    {
-        if (contentID.compare((*it)->getContentID()) == 0)
-        {
-            return (*it)->getDCFDigest();
-        }
-    }
-
-    return "";
-}
diff --git a/media/libdrm/mobile2/src/rights/RoManager.cpp b/media/libdrm/mobile2/src/rights/RoManager.cpp
deleted file mode 100644
index a115d21..0000000
--- a/media/libdrm/mobile2/src/rights/RoManager.cpp
+++ /dev/null
@@ -1,123 +0,0 @@
-/*
- * Copyright (C) 2007 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#include <rights/RoManager.h>
-#include <rights/Asset.h>
-
-using namespace ustl;
-
-RoManager* RoManager::msInstance = NULL;
-
-/** see RoManager.h */
-RoManager* RoManager::Instance()
-{
-    if (NULL == msInstance)
-    {
-        msInstance = new RoManager();
-    }
-
-    return msInstance;
-}
-
-/** see RoManager.h */
-RoManager::RoManager()
-{
-//load the ro list from local system.
-}
-
-/** see RoManager.h */
-RoManager::~RoManager()
-{
-    msInstance = NULL;
-
-    for (vector<Ro*>::iterator it = mRoList.begin();
-         it != mRoList.end(); it++)
-    {
-        delete (*it);
-    }
-
-    mRoList.clear();
-}
-
-/** see RoManager.h */
-Ro::ERRCODE RoManager::installRo(istringstream *roStream)
-{
-    Ro *ro = new Ro();
-
-    Ro::ERRCODE ret = ro->parse(roStream);
-
-    if (Ro::RO_OK == ret)
-    {
-        ro->save();
-
-        mRoList.push_back(ro);
-    }
-
-    return ret;
-}
-
-/** see RoManager.h */
-Ro* RoManager::getRoByContentID(const string& contentID)
-{
-    for (vector<Ro*>::iterator it = mRoList.begin();
-         it != mRoList.end(); it++)
-    {
-        for (vector<Asset*>::iterator ita = (*it)->mAssetList.begin();
-             ita != (*it)->mAssetList.end(); ita++)
-        {
-            if (contentID.compare((*ita)->getContentID()) == 0)
-            {
-                return *it;
-            }
-        }
-    }
-
-    return NULL;
-}
-
-/** see RoManager.h */
-Ro* RoManager::getRo(const string& roID)
-{
-    for (vector<Ro*>::iterator it = mRoList.begin();
-         it != mRoList.end(); it++)
-    {
-        if (roID.compare((*it)->getRoID()) == 0)
-        {
-            return (*it);
-        }
-    }
-
-    return NULL;
-}
-
-/** see RoManager.h */
-vector<Ro*> RoManager::getAllRo()
-{
-    return mRoList;
-}
-
-/** see RoManager.h */
-bool RoManager::deleteRo(const string& roID)
-{
-    return true;
-}
-
-/** see RoManager.h */
-bool RoManager::checkRoInCache(const string& roID)
-{
-    return true;
-}
-
diff --git a/media/libdrm/mobile2/src/roap/Registration.cpp b/media/libdrm/mobile2/src/roap/Registration.cpp
deleted file mode 100644
index 9d6f459..0000000
--- a/media/libdrm/mobile2/src/roap/Registration.cpp
+++ /dev/null
@@ -1 +0,0 @@
-/**/
diff --git a/media/libdrm/mobile2/src/roap/RoapMessageHandler.cpp b/media/libdrm/mobile2/src/roap/RoapMessageHandler.cpp
deleted file mode 100644
index 9d190ee..0000000
--- a/media/libdrm/mobile2/src/roap/RoapMessageHandler.cpp
+++ /dev/null
@@ -1,62 +0,0 @@
-/*
- * Copyright (C) 2007 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-#include <roap/RoapMessageHandler.h>
-#include <util/xml/DomExpatAgent.h>
-#include <util/xml/XMLDocumentImpl.h>
-#include <util/domcore/NodeListImpl.h>
-#include <util/domcore/DOMString.h>
-#include <ofstream.h>
-using namespace ustl;
-
-/**see RoapMessageHandler.h */
-RoapMessageHandler::RoapMessageHandler()
-{
-    mDoc = NULL;
-}
-
-/**see RoapMessageHandler.h */
-XMLDocumentImpl* RoapMessageHandler::createClientMsg(RoapMessageHandler::msgType type)
-{
-    /* load template from files temporarily, FIX ME later */
-    string msgTemplate;
-    switch (type)
-    {
-        case RoapMessageHandler::DeviceHello:
-            msgTemplate.append("deviceHello.xml");
-            break;
-        case RoapMessageHandler::RegistrationRequest:
-            msgTemplate.append("deviceHello.xml");        
-            break;
-        case RoapMessageHandler::RORequest:
-            msgTemplate.append("deviceHello.xml");      
-            break;
-        default:
-            return NULL;
-    }
-    ifstream xmlStream(msgTemplate.c_str());
-    XMLDocumentImpl* xmlDoc = new XMLDocumentImpl();
-    DomExpatAgent domExpatAgent1(xmlDoc);
-    if (domExpatAgent1.generateDocumentFromXML(&xmlStream))
-    {
-        return xmlDoc;
-    }
-    else
-    {
-        delete(xmlDoc);
-        return NULL;
-    }
-}
-
diff --git a/media/libdrm/mobile2/src/util/crypto/DrmCrypto.cpp b/media/libdrm/mobile2/src/util/crypto/DrmCrypto.cpp
deleted file mode 100644
index fbbefb8..0000000
--- a/media/libdrm/mobile2/src/util/crypto/DrmCrypto.cpp
+++ /dev/null
@@ -1,235 +0,0 @@
-/*
- * Copyright (C) 2007 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#include <util/crypto/DrmCrypto.h>
-#include <ustring.h>
-
-using namespace ustl;
-
-void AesAgent::discardPaddingByte( unsigned char* decryptedBuf,unsigned long* decryptedBufLen)

-{

-    if(!decryptedBuf)

-    {
-        return;
-    }
-
-    int i;
-    unsigned long tmpLen = *decryptedBufLen;
-

-    // Check whether the last several bytes are padding or not

-    for ( i = 1; i < decryptedBuf[tmpLen - 1]; i++)
-    {

-        if (decryptedBuf[tmpLen - 1 - i] != decryptedBuf[tmpLen - 1])

-            break;

-    }
-
-    // They are padding bytes

-    if (i == decryptedBuf[tmpLen - 1])

-    {
-        *decryptedBufLen = tmpLen - i;
-    }
-

-    return;

-}
-
-int32_t AesAgent::decContent( unsigned char* iv,
-                              const unsigned char* encData,

-                              unsigned long encLen,

-                              unsigned char* decData)

-{
-    if(AES_128_CBC == mode)
-    {
-        AES_KEY key;
-        AES_set_decrypt_key(AesKey,AES_KEY_BITS,&key);
-
-        uint8_t *tmpBuf = new uint8_t[encLen];
-
-        AES_cbc_encrypt( encData,
-                         tmpBuf,
-                         encLen,
-                         &key,
-                         iv,
-                         AES_DECRYPT);
-
-        unsigned long tempLen = encLen;
-        discardPaddingByte(tmpBuf,&tempLen);
-
-        memcpy(decData, tmpBuf, tempLen);
-
-        delete []tmpBuf;
-        return encLen - tempLen;
-    }
-    else
-    {
-        return AES_DEC_FAILED;
-    }
-}
-
-void Sha1Agent::computeHash( const unsigned char* inData,

-                             unsigned long inLen,

-                             unsigned char* outHash) const

-{
-    EVP_Digest(inData,inLen,outHash,NULL,EVP_sha1(),NULL);
-    return;
-}
-
-void HmacSha1Agent::computeMac( const unsigned char* inData,

-                                unsigned long inLen,

-                                unsigned char* outData) const

-{
-    HMAC(EVP_sha1(),macKey,keyLen,inData,inLen,outData,NULL);
-    return;
-}
-
-bool RsaAgent::signature( const unsigned char* rawData,

-                          unsigned long rawLen,

-                          unsigned char* sigData,
-                          RsaAlg sigAlg)

-{
-    switch(sigAlg)
-    {
-        case RSA_PSS:
-            {
-                unsigned char mHash[SHA_DIGEST_LENGTH];
-                Sha1Agent sha1;
-                sha1.computeHash(rawData,rawLen,mHash);
-
-                unsigned char EM[rsaSize];
-                if( 0 == RSA_padding_add_PKCS1_PSS( &rsaKey,
-                                                    EM,
-                                                    mHash,
-                                                    EVP_sha1(),
-                                                    SHA_DIGEST_LENGTH))
-                {
-                    return false;
-                }
-
-                if(0 > RSA_private_encrypt( SHA_DIGEST_LENGTH,
-                                            EM,
-                                            sigData,
-                                            &rsaKey,
-                                            RSA_PKCS1_PADDING))
-                {
-                    return false;
-                }
-                else
-                {
-                    return true;

-                }
-            }
-            break;
-        case RSA_SHA1:
-            {
-                unsigned char mHash[SHA_DIGEST_LENGTH];
-                Sha1Agent sha1;
-                sha1.computeHash(rawData,rawLen,mHash);
-
-                if(0 != RSA_sign( NID_sha1WithRSA,
-                                  mHash,
-                                  SHA_DIGEST_LENGTH,
-                                  sigData,
-                                  &rsaSize,
-                                  &rsaKey))
-                {
-                    return true;
-                }
-                else
-                {
-                    return false;
-                }
-            }
-           break;
-        default:
-            return false;
-    }
-
-    return false;
-}
-
-bool RsaAgent::sigVerify( unsigned char* sigData,
-                          unsigned long sigLen,
-                          const unsigned char* rawData,
-                          unsigned long rawLen,
-                          RsaAlg sigAlg)

-{
-    if( sigAlg == RSA_PSS)
-    {
-        unsigned char decSigData[rsaSize];
-
-        if(0 > RSA_public_decrypt(sigLen,
-                                  sigData,
-                                  decSigData,
-                                  &rsaKey,
-                                  RSA_PKCS1_PADDING))

-        {
-            return false;
-        }
-        else
-        {
-            unsigned char mHash[SHA_DIGEST_LENGTH];
-            Sha1Agent sha1;
-            sha1.computeHash(rawData,rawLen,mHash);
-
-            if( 0 == RSA_verify_PKCS1_PSS( &rsaKey,
-                                           mHash,
-                                           EVP_sha1(),
-                                           decSigData,
-                                           -1))
-            {
-                return true;
-            }
-            else
-            {
-                return false;
-            }
-        }
-    }
-    else if(sigAlg == RSA_SHA1)
-    {
-        unsigned char mHash[SHA_DIGEST_LENGTH];
-        Sha1Agent sha1;
-        sha1.computeHash(rawData,rawLen,mHash);
-
-        if(0 != RSA_verify( NID_sha1WithRSA,
-                            mHash,
-                            SHA_DIGEST_LENGTH,
-                            sigData,
-                            sigLen,
-                            &rsaKey))
-        {
-            return true;
-        }
-        else
-        {
-            return false;
-        }
-    }
-    else
-    {
-        return false;
-    }
-}
-
-int RsaAgent::decrypt( const unsigned char* encData,
-                       unsigned long encLen,
-                       unsigned char* decData)

-{
-    return RSA_private_decrypt( encLen,
-                                encData,
-                                decData,
-                                &rsaKey,
-                                RSA_PKCS1_PADDING);
-}
diff --git a/media/libdrm/mobile2/src/util/domcore/CharacterDataImpl.cpp b/media/libdrm/mobile2/src/util/domcore/CharacterDataImpl.cpp
deleted file mode 100644
index 0fe699a..0000000
--- a/media/libdrm/mobile2/src/util/domcore/CharacterDataImpl.cpp
+++ /dev/null
@@ -1,83 +0,0 @@
-/*
- * Copyright (C) 2007 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-#include <util/domcore/CharacterDataImpl.h>

-

-/** see CharacterDataImpl.h */

-const DOMString* CharacterDataImpl::getData() const throw (DOMException)

-{

-    return charData;

-}

-

-/** see CharacterDataImpl.h */

-CharacterDataImpl::CharacterDataImpl():charData(NULL)

-{

-}

-

-/** see CharacterDataImpl.h*/

-CharacterDataImpl::CharacterDataImpl(const DOMString* data):charData(NULL)

-{

-    if (data != NULL)

-        charData = new DOMString(*data);

-}

-

-/** see CharacterDataImpl.h */

-void CharacterDataImpl::setData(const DOMString* data) throw (DOMException)

-{

-

-    if (charData != NULL)

-        delete charData;

-

-    if (data == NULL)

-        charData = NULL;

-    else

-        charData = new DOMString(*data);

-}

-

-/** see CharacterDataImpl.h */

-int CharacterDataImpl::getLength() const

-{

-    return charData != NULL ? charData->length() : 0;

-}

-

-/** see CharacterDataImpl.h */

-void CharacterDataImpl::appendData(const DOMString* arg) throw(DOMException)

-{

-    if (arg != NULL) {

-        if (charData != NULL)

-            charData->append(*arg);

-        else

-            charData = new DOMString(*arg);

-    }

-}

-

-/** see CharacterDataImpl.h */

-const DOMString* CharacterDataImpl::getNodeValue() const throw(DOMException)

-{

-    return getData();

-}

-

-/** see CharacterDataImpl.h */

-void CharacterDataImpl::setNodeValue(DOMString* nodeValue) throw(DOMException)

-{

-    setData(nodeValue);

-}

-

-/** see CharacterDataImpl.h */

-CharacterDataImpl::~CharacterDataImpl()

-{

-    delete charData;

-}

-

diff --git a/media/libdrm/mobile2/src/util/domcore/DOMException.cpp b/media/libdrm/mobile2/src/util/domcore/DOMException.cpp
deleted file mode 100644
index da9d3ce..0000000
--- a/media/libdrm/mobile2/src/util/domcore/DOMException.cpp
+++ /dev/null
@@ -1,15 +0,0 @@
-/*
- * Copyright (C) 2007 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */

diff --git a/media/libdrm/mobile2/src/util/domcore/DocumentImpl.cpp b/media/libdrm/mobile2/src/util/domcore/DocumentImpl.cpp
deleted file mode 100644
index ebf46fb..0000000
--- a/media/libdrm/mobile2/src/util/domcore/DocumentImpl.cpp
+++ /dev/null
Binary files differ
diff --git a/media/libdrm/mobile2/src/util/domcore/ElementImpl.cpp b/media/libdrm/mobile2/src/util/domcore/ElementImpl.cpp
deleted file mode 100644
index df48831..0000000
--- a/media/libdrm/mobile2/src/util/domcore/ElementImpl.cpp
+++ /dev/null
@@ -1,98 +0,0 @@
-/*
- * Copyright (C) 2007 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-#include <util/domcore/ElementImpl.h>

-

-/** see ElementImpl.h */

-NodeType ElementImpl::getNodeType() const

-{

-    return ELEMENT_NODE;

-}

-

-/** see ElementImpl.h */

-const DOMString* ElementImpl::getNodeName() const

-{

-    return getTagName();

-}

-

-/** see ElementImpl.h */

-const DOMString* ElementImpl::getTagName() const

-{

-    return NULL;

-}

-

-/** see ElementImpl.h */

-void ElementImpl::setAttribute(const DOMString* name, const DOMString* value) throw (DOMException)

-{

-

-}

-

-/** see ElementImpl.h */

-void ElementImpl::removeAttribute(const DOMString* name) throw (DOMException)

-{

-

-}

-

-/** see ElementImpl.h */

-const DOMString* ElementImpl::getAttribute(const DOMString* name) const

-{

-    return NULL;

-}

-

-/** see ElementImpl.h */

-void ElementImpl::getElementsByTagName(const DOMString* name, NodeListImpl* nodeList) const

-{

-    NodeImpl* node = getFirstChild();

-

-    if (node == NULL || name == NULL || nodeList == NULL)

-        return;

-

-    do {

-

-        if (node->getNodeType() == ELEMENT_NODE) {

-            ElementImpl* elementNode = static_cast<ElementImpl*>(node);

-            if (*elementNode->getTagName() == *name)

-               /* if current is element node and tag name is equal to <code>name</code>,put it into nodeList */

-                nodeList->append(node);

-               /*

-                * visit DOM tree recursively,

-                * get all Elements node whose tage name is equal to name.

-                */

-               elementNode->getElementsByTagName(name, nodeList);

-        }

-

-        /* set current node's next sibling node as current node.*/

-        node = node->getNextSibling();

-    } while(node != NULL);

-}

-

-/** see ElementImpl.h */

-NodeListImpl* ElementImpl::getElementsByTagName(const DOMString* name) const

-{

-    NodeListImpl* nodeList = new NodeListImpl();

-

-    if (nodeList == NULL || name == NULL)

-        return NULL;

-

-    getElementsByTagName(name,nodeList);

-

-    return nodeList;

-}

-

-/** see ElementImpl.h */

-bool ElementImpl::hasAttributes() const

-{

-    return false;

-}

diff --git a/media/libdrm/mobile2/src/util/domcore/NodeImpl.cpp b/media/libdrm/mobile2/src/util/domcore/NodeImpl.cpp
deleted file mode 100644
index 183c55e..0000000
--- a/media/libdrm/mobile2/src/util/domcore/NodeImpl.cpp
+++ /dev/null
@@ -1,239 +0,0 @@
-/*
- * Copyright (C) 2007 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-#include <util/domcore/NodeImpl.h>

-#include <util/domcore/DocumentImpl.h>

-

-/** see NodeImpl.h. */

-void NodeImpl::setParent(NodeImpl* parentNode)

-{

-    this->parent = parentNode;

-}

-

-/** see NodeImpl.h. */

-void NodeImpl::setNextSibling(NodeImpl* siblingNode)

-{

-    this->nextSibling = siblingNode;

-}

-/** see NodeImpl.h. */

-void NodeImpl::setPreviousSibling(NodeImpl* siblingNode)

-{

-    this->previousSibling = siblingNode;

-}

-

-/** see NodeImpl.h. */

-void NodeImpl::setFirstChild(NodeImpl* childNode)

-{

-    this->firstChild = childNode;

-}

-

-/** see NodeImpl.h. */

-void NodeImpl::setLastChild(NodeImpl* childNode)

-{

-    this->lastChild = childNode;

-}

-

-/** see NodeImpl.h. */

-NodeImpl* NodeImpl::getParentNode() const

-{

-    return parent;

-}

-

-/** see NodeImpl.h. */

-NodeImpl* NodeImpl::getFirstChild() const

-{

-    return firstChild;

-}

-

-/** see NodeImpl.h. */

-NodeImpl* NodeImpl::getLastChild() const

-{

-    return lastChild;

-}

-

-/** see NodeImpl.h. */

-NodeImpl* NodeImpl::getPreviousSibling() const

-{

-    return previousSibling;

-}

-

-/** see NodeImpl.h. */

-NodeImpl* NodeImpl::getNextSibling() const

-{

-    return nextSibling;

-}

-

-/** see NodeImpl.h. */

-NodeImpl* NodeImpl::insertBefore(NodeImpl* newChild, NodeImpl* refChild) throw (DOMException)

-{

-    if (newChild == NULL)
-        #if PLATFORM_ANDROID
-            return NULL;
-        #else

-            throw DOMException(DOMException::WRONG_DOCUMENT_ERR);

-        #endif

-    if (refChild == NULL || refChild->getParentNode() != this)
-        #if PLATFORM_ANDROID
-            return NULL;
-        #else

-            throw DOMException(DOMException::NOT_FOUND_ERR);
-        #endif

-

-    NodeImpl* parentNode = newChild->getParentNode();

-

-    if (parentNode != NULL)

-        parentNode->removeChild(newChild);

-

-    NodeImpl* prevSiblingNode = refChild->getPreviousSibling();

-

-    if (prevSiblingNode != NULL)

-        prevSiblingNode->appendNextSibling(newChild);

-    else

-        setFirstChild(newChild);

-

-    newChild->appendNextSibling(refChild);

-    newChild->setParent(this);

-

-    return newChild;

-}

-

-/** see NodeImpl.h. */

-NodeImpl* NodeImpl::removeChild(NodeImpl* oldChild) throw (DOMException)

-{

-

-    if (oldChild == NULL || oldChild->getParentNode() != this )
-    #if PLATFORM_ANDROID
-        return NULL;
-    #else
-        throw DOMException(DOMException::NOT_FOUND_ERR);
-    #endif

-

-    NodeImpl* parentNode = oldChild->getParentNode();

-    NodeImpl* nextSiblingNode = oldChild->getNextSibling();

-    NodeImpl* prevSiblingNode = oldChild->getPreviousSibling();

-

-    if (prevSiblingNode == NULL && nextSiblingNode != NULL) {

-        /*

-         * children's previous sibling node == NULL and next sibling node !=

-         * NULL, means the children node is the first node of its parent.

-         * so set the children's next sibling node as the first node of its parent.

-         */

-        parentNode->setFirstChild(nextSiblingNode);

-        nextSiblingNode->setPreviousSibling(NULL);

-

-    } else if (prevSiblingNode != NULL && nextSiblingNode == NULL) {

-        /*

-         * children's previous sibling node != NULL and next sibling node ==

-         * NULL, means the child node is the last node of parent.so set the

-         * last node of children's parent as children's previous sibling node.

-         */

-        prevSiblingNode->setNextSibling(NULL);

-        parentNode->setLastChild(prevSiblingNode);

-

-    } else if (prevSiblingNode != NULL && nextSiblingNode != NULL) {

-        /*

-         * children's previous sibling node != NULL and next sibling node !=

-         * NULL,means the node is neither first child nor last children of its parent.

-         */

-        prevSiblingNode->appendNextSibling(nextSiblingNode);

-

-    } else if (prevSiblingNode == NULL && nextSiblingNode == NULL) {

-        /*

-         * this means it's only one children node of its parent.

-         * so adjust the first child and last child to NULL when remove the children node.

-         */

-        this->setFirstChild(NULL);

-        this->setLastChild(NULL);

-    }

-

-    oldChild->setParent(NULL);

-    oldChild->setNextSibling(NULL);

-    oldChild->setPreviousSibling(NULL);

-

-    return oldChild;

-}

-

-/** see NodeImpl.h. */

-void NodeImpl::appendNextSibling(NodeImpl* node)

-{

-    if (node == NULL)

-        return;

-

-    setNextSibling(node);

-    node->setPreviousSibling(this);

-}

-

-/** see NodeImpl.h. */

-NodeImpl* NodeImpl::appendChild(NodeImpl* newChild) throw (DOMException)

-{

-    if (newChild == NULL)
-        #if PLATFORM_ANDROID
-            return NULL;
-        #else

-            throw DOMException(DOMException::WRONG_DOCUMENT_ERR);

-        #endif

-    /* If newChild have parent,remove it from its parent at first.*/

-    NodeImpl* parent = newChild->getParentNode();

-    if (parent != NULL)

-        parent->removeChild(newChild);

-

-    if (getFirstChild() == NULL && getLastChild() == NULL) {

-        /* There are not any nodes in current node.*/

-        setFirstChild(newChild);

-    } else if (getLastChild() != NULL) {

-        getLastChild()->appendNextSibling(newChild);

-    }

-

-    newChild->setParent(this);

-    setLastChild(newChild);

-

-

-    return newChild;

-}

-

-/** see NodeImpl.h. */

-bool NodeImpl::hasChildNodes() const

-{

-    return getFirstChild() != NULL;

-}

-

-/** see NodeImpl.h. */

-const DOMString* NodeImpl::getNodeValue() const throw (DOMException)

-{

-    return NULL;

-}

-

-/** see NodeImpl.h. */

-void NodeImpl::setNodeValue(DOMString* nodeValue) throw (DOMException)

-{

-}

-

-/** see NodeImpl.h. */

-bool NodeImpl::hasAttributes() const

-{

-    return false;

-}

-

-/** see NodeImpl.h */

-const DocumentImpl* NodeImpl::getDocument() const

-{

-    return document;

-}

-

-/** see NodeImpl.h */

-void NodeImpl::setDocument(const DocumentImpl* document)

-{

-    this->document = document;

-}

diff --git a/media/libdrm/mobile2/src/util/domcore/NodeIterator.cpp b/media/libdrm/mobile2/src/util/domcore/NodeIterator.cpp
deleted file mode 100644
index fe13669..0000000
--- a/media/libdrm/mobile2/src/util/domcore/NodeIterator.cpp
+++ /dev/null
@@ -1,101 +0,0 @@
-/*
- * Copyright (C) 2007 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-#include <util/domcore/NodeImpl.h>

-#include <util/domcore/NodeIterator.h>

-

-/** see NodeIterator.h */

-NodeIterator::NodeIterator(NodeImpl* start,NodeImpl* scope,NodeImpl* end): scopeNode(scope),endNode(end),curNode(start)

-{

-}

-

-/** see NodeIterator.h */

-NodeImpl* NodeIterator::findNextOrderNode(NodeImpl* node)

-{

-    if (node == endNode)

-        return NULL;

-

-    if (node != NULL) {

-        if (node->hasChildNodes() == true) {

-            node = node->getFirstChild();

-        }else if (node == scopeNode && node->hasChildNodes() == false) {

-            node = NULL;

-        } else if (node->getNextSibling() != NULL) {

-            node = node->getNextSibling();

-        } else {

-            while (node != scopeNode && node != NULL && node->getNextSibling() == NULL) {

-                node = node->getParentNode();

-            }

-            if (node == scopeNode)

-                node = NULL;

-            if (node != NULL)

-                node = node->getNextSibling();

-        }

-    }

-    if (node == endNode || node == scopeNode)

-        node = NULL;

-

-    return node;

-}

-

-/** see NodeIterator.h */

-NodeImpl* NodeIterator::next()

-{

-    NodeImpl* node = NULL;

-

-    node = findNextOrderNode(curNode);

-

-    if (node != NULL)

-        curNode = node;

-

-    return node;

-}

-

-/** see NodeIterator.h */

-NodeImpl* NodeIterator::prev()

-{

-    NodeImpl* node;

-

-    node = findPreviousOrderNode(curNode);

-

-    if (node != NULL)

-        curNode = node;

-

-    return node;

-}

-

-/** see NodeIterator.h */

-NodeImpl* NodeIterator::findPreviousOrderNode(NodeImpl* node)

-{

-    if (node == NULL || node == endNode)

-        return NULL;

-

-    if (node->getPreviousSibling() != NULL) {

-        node = node->getPreviousSibling();

-        while(node != NULL && node->hasChildNodes() == true)

-            node = node->getLastChild();

-    } else {

-        if (node == scopeNode)

-            node = NULL;

-        else

-            node = node->getParentNode();

-    }

-

-    if (node == scopeNode || node == endNode)

-        return NULL;

-

-    return node;

-}

-

diff --git a/media/libdrm/mobile2/src/util/domcore/NodeListImpl.cpp b/media/libdrm/mobile2/src/util/domcore/NodeListImpl.cpp
deleted file mode 100644
index 710d62d..0000000
--- a/media/libdrm/mobile2/src/util/domcore/NodeListImpl.cpp
+++ /dev/null
@@ -1,48 +0,0 @@
-/*
- * Copyright (C) 2007 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-#include <util/domcore/NodeListImpl.h>

-

-/** see NodeListImpl.h*/

-void NodeListImpl::append(const NodeImpl* newNode)

-{

-    if (newNode == NULL)

-        return;

-

-    nodeList.push_back(newNode);

-}

-

-/** see NodeListImpl.h*/

-const NodeImpl* NodeListImpl::item(int index) const

-{

-    int size = nodeList.size();

-

-    if (size == 0 || index > size - 1 || index < 0)

-        return NULL;

-

-    return nodeList.at(index);

-}

-

-/** see NodeListImpl.h*/

-int NodeListImpl::getLength() const

-{

-    return nodeList.size();

-}

-

-/** see NodeListImpl.h*/

-NodeListImpl::~NodeListImpl()

-{

-    nodeList.clear();

-}

diff --git a/media/libdrm/mobile2/src/util/domcore/TextImpl.cpp b/media/libdrm/mobile2/src/util/domcore/TextImpl.cpp
deleted file mode 100644
index 5e421d5..0000000
--- a/media/libdrm/mobile2/src/util/domcore/TextImpl.cpp
+++ /dev/null
@@ -1,41 +0,0 @@
-/*
- * Copyright (C) 2007 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-#include <util/domcore/TextImpl.h>

-

-const DOMString TextImpl::nodeName = "#TEXT";

-

-/** see TextImpl.h */

-TextImpl::TextImpl()

-{

-}

-

-/** see TextImpl.h */

-TextImpl::TextImpl(const DOMString* data):CharacterDataImpl(data)

-{

-}

-

-/** see TextImpl.h */

-NodeType TextImpl::getNodeType() const

-{

-    return TEXT_NODE;

-}

-

-/** see TextImpl.h */

-const DOMString* TextImpl::getNodeName() const

-{

-    return &nodeName;

-}

-

diff --git a/media/libdrm/mobile2/src/util/ustl-1.0/bktrace.cpp b/media/libdrm/mobile2/src/util/ustl-1.0/bktrace.cpp
deleted file mode 100644
index ae66463..0000000
--- a/media/libdrm/mobile2/src/util/ustl-1.0/bktrace.cpp
+++ /dev/null
@@ -1,160 +0,0 @@
-// This file is part of the ustl library, an STL implementation.
-//
-// Copyright (C) 2006 by Mike Sharov <msharov@users.sourceforge.net>
-// This file is free software, distributed under the MIT License.
-//
-// bktrace.cc
-//
-
-#include "bktrace.h"
-#include "sostream.h"
-#include "mistream.h"
-#include "uassert.h"
-#if linux && __GNUC__ && !defined(HAVE_ANDROID_OS)
-    #include <execinfo.h>
-#else
-    static inline int backtrace (void**, int)			{ return (0); }
-    static inline char** backtrace_symbols (void* const*, int)	{ return (NULL); }
-#endif
-#if __GNUC__ >= 3 && !PLATFORM_ANDROID
-    #include <cxxabi.h>
-#endif
-
-namespace ustl {
-
-/// Default constructor. The backtrace is obtained here.
-CBacktrace::CBacktrace (void)
-: m_Symbols (NULL),
-  m_nFrames (0),
-  m_SymbolsSize (0)
-{
-#if !PLATFORM_ANDROID
-    try {
-#endif
-	m_nFrames = backtrace (VectorBlock (m_Addresses));
-	GetSymbols();
-#if !PLATFORM_ANDROID
-    } catch (...) {}
-#endif
-}
-
-/// Copy constructor.
-CBacktrace::CBacktrace (const CBacktrace& v)
-: m_Symbols (NULL),
-  m_nFrames (0),
-  m_SymbolsSize (0)
-{
-    operator= (v);
-}
-
-/// Copy operator.
-const CBacktrace& CBacktrace::operator= (const CBacktrace& v)
-{
-    memcpy (m_Addresses, v.m_Addresses, sizeof(m_Addresses));
-    m_Symbols = strdup (v.m_Symbols);
-    m_nFrames = v.m_nFrames;
-    m_SymbolsSize = v.m_SymbolsSize;
-    return (*this);
-}
-
-/// Converts a string returned by backtrace_symbols into readable form.
-static size_t ExtractAbiName (const char* isym, char* nmbuf)
-{
-    // Prepare the demangled name, if possible
-    size_t nmSize = 0;
-    if (isym) {
-	// Copy out the name; the strings are: "file(function+0x42) [0xAddress]"
-	const char* mnStart = strchr (isym, '(');
-	if (++mnStart == (const char*)(1))
-	    mnStart = isym;
-	const char* mnEnd = strchr (isym, '+');
-	const char* isymEnd = isym + strlen (isym);
-	if (!mnEnd)
-	    mnEnd = isymEnd;
-	nmSize = min (size_t (distance (mnStart, mnEnd)), 256U);
-	memcpy (nmbuf, mnStart, nmSize);
-    }
-    nmbuf[nmSize] = 0;
-    // Demangle
-    demangle_type_name (nmbuf, 256U, &nmSize);
-    return (nmSize);
-}
-
-/// Tries to get symbol information for the addresses.
-void CBacktrace::GetSymbols (void)
-{
-    auto_ptr<char*> symbols (backtrace_symbols (m_Addresses, m_nFrames));
-    if (!symbols.get())
-	return;
-    char nmbuf [256];
-    size_t symSize = 1;
-    for (uoff_t i = 0; i < m_nFrames; ++ i)
-	symSize += ExtractAbiName (symbols.get()[i], nmbuf) + 1;
-    if (!(m_Symbols = (char*) calloc (symSize, 1)))
-	return;
-    for (uoff_t i = 0; m_SymbolsSize < symSize - 1; ++ i) {
-	size_t sz = ExtractAbiName (symbols.get()[i], nmbuf);
-	memcpy (m_Symbols + m_SymbolsSize, nmbuf, sz);
-	m_SymbolsSize += sz + 1;
-	m_Symbols [m_SymbolsSize - 1] = '\n';
-    }
-}
-
-/// Default destructor.
-CBacktrace::~CBacktrace (void)
-{
-    free_nullok (m_Symbols);
-}
-
-#if SIZE_OF_LONG == 8
-    #define ADDRESS_FMT	"%16p  "
-#else
-    #define ADDRESS_FMT	"%8p  "
-#endif
-
-/// Prints the backtrace to \p os.
-void CBacktrace::text_write (ostringstream& os) const
-{
-    const char *ss = m_Symbols, *se;
-    for (uoff_t i = 0; i < m_nFrames; ++ i) {
-	os.format (ADDRESS_FMT, m_Addresses[i]);
-	se = strchr (ss, '\n') + 1;
-	os.write (ss, distance (ss, se));
-	ss = se;
-    }
-}
-
-/// Reads the object from stream \p is.
-void CBacktrace::read (istream& is)
-{
-    assert (is.aligned (alignof (m_Addresses[0])) && "Backtrace object contains pointers and must be void* aligned");
-    is >> m_nFrames >> m_SymbolsSize;
-    free_nullok (m_Symbols);
-    m_Symbols = (char*) malloc (m_SymbolsSize + 1);
-    is.read (m_Symbols, m_SymbolsSize);
-    m_Symbols [m_SymbolsSize] = 0;
-    is.align();
-    is.read (m_Addresses, m_nFrames * sizeof(void*));
-}
-
-/// Writes the object to stream \p os.
-void CBacktrace::write (ostream& os) const
-{
-    assert (os.aligned (alignof (m_Addresses[0])) && "Backtrace object contains pointers and must be void* aligned");
-    os << m_nFrames << m_SymbolsSize;
-    os.write (m_Symbols, m_SymbolsSize);
-    os.align();
-    os.write (m_Addresses, m_nFrames * sizeof(void*));
-}
-
-/// Returns the size of the written object.
-size_t CBacktrace::stream_size (void) const
-{
-    return (Align (stream_size_of (m_nFrames) +
-		   stream_size_of (m_SymbolsSize) +
-		   m_nFrames * sizeof(void*) +
-		   m_SymbolsSize));
-}
-
-} // namespace ustl
-
diff --git a/media/libdrm/mobile2/src/util/ustl-1.0/bktrace.h b/media/libdrm/mobile2/src/util/ustl-1.0/bktrace.h
deleted file mode 100644
index 7b8c0ea..0000000
--- a/media/libdrm/mobile2/src/util/ustl-1.0/bktrace.h
+++ /dev/null
@@ -1,55 +0,0 @@
-// This file is part of the ustl library, an STL implementation.
-//
-// Copyright (C) 2006 by Mike Sharov <msharov@users.sourceforge.net>
-// This file is free software, distributed under the MIT License.
-//
-// bktrace.h
-//
-
-#ifndef BKTRACE_H_63ABB1E4388CEDD975DBE58B57DE474F
-#define BKTRACE_H_63ABB1E4388CEDD975DBE58B57DE474F
-
-#include "ulimits.h"
-
-namespace ustl {
-
-class ostringstream;
-class istream;
-class ostream;
-
-/// \class CBacktrace bktrace.h ustl.h
-///
-/// \brief Stores the backtrace from the point of construction.
-///
-/// The backtrace, or callstack, is the listing of functions called to
-/// reach the construction of this object. This is useful for debugging,
-/// to print the location of an error. To get meaningful output you'll
-/// need to use a debug build with symbols and with frame pointers. For
-/// GNU ld you will also need to link with the -rdynamic option to see
-/// actual function names instead of __gxx_personality0+0xF4800.
-///
-class CBacktrace {
-public:
-			CBacktrace (void);
-			CBacktrace (const CBacktrace& v);
-		       ~CBacktrace (void);
-    const CBacktrace&	operator= (const CBacktrace& v);
-    void		text_write (ostringstream& os) const;
-    void		read (istream& is);
-    void		write (ostream& os) const;
-    size_t		stream_size (void) const;
-private:
-    void		GetSymbols (void);
-private:
-    void*		m_Addresses [64];	///< Addresses of each function on the stack.
-    char*		m_Symbols;		///< Symbols corresponding to each address.
-    uint32_t		m_nFrames;		///< Number of addresses in m_Addresses.
-    uint32_t		m_SymbolsSize;		///< Size of m_Symbols.
-};
-
-} // namespace ustl
-
-ALIGNOF(ustl::CBacktrace, sizeof(void*))
-
-#endif
-
diff --git a/media/libdrm/mobile2/src/util/ustl-1.0/bsconf.h b/media/libdrm/mobile2/src/util/ustl-1.0/bsconf.h
deleted file mode 100644
index 79b4af1..0000000
--- a/media/libdrm/mobile2/src/util/ustl-1.0/bsconf.h
+++ /dev/null
@@ -1,173 +0,0 @@
-/* This file is part of bsconf - a configure replacement.
- *
- * This is the configuration file used by bsconf.c to specify information
- * specific to your project that it needs to substitute into files listed
- * in g_Files. Being a configuration file, this file can be used or
- * modified entirely without restriction. You should change all values
- * appropriately to the name of your project and its requirements. The
- * bsconf license does not apply to this file. It can and should be
- * treated as a template for the creation of your own configuration file.
- *
- * All substituted variable names are given without enclosing @@. For
- * example: "CC" will match "@CC@" in config.h.in and replace it with
- * "gcc" in config.h.
-*/
-
-#include "uassert.h"
-
-#define BSCONF_VERSION		0x03
-
-#define PACKAGE_NAME		"ustl"
-#define LIB_MAJOR		"1"
-#define LIB_MINOR		"0"
-#define LIB_BUILD		"0"
-
-#define PACKAGE_VERSION		LIB_MAJOR "." LIB_MINOR
-#define PACKAGE_TARNAME		PACKAGE_NAME
-#define PACKAGE_STRING		PACKAGE_NAME " " PACKAGE_VERSION
-#define PACKAGE_BUGREPORT	"Mike Sharov <msharov@users.sourceforge.net>"
-
-static cpchar_t g_Files [] = {
-    "Config.mk",
-    "config.h",
-    "ustl.spec"
-};
-
-/* Values substitute @VARNAME@ */
-static cpchar_t g_EnvVars [] = {
-    "CC",
-    "LD",
-    "CXX",
-    "CPP",
-    "HOME",
-    "CXXFLAGS",
-    "LDFLAGS",
-    "CPPFLAGS",
-    "LDFLAGS",
-    "CFLAGS"
-};
-
-/*  VARIABLE	PROGRAM		HOW TO CALL	IF NOT FOUND */
-static cpchar_t g_ProgVars [] = {
-    "CC",	"gcc",		"gcc",		"@CC@",
-    "CC",	"cc",		"cc",		"gcc",
-    "CXX",	"g++",		"g++",		"@CXX@",
-    "CXX",	"c++",		"c++",		"g++",
-    "LD",	"ld",		"ld",		"ld",
-    "AR",	"ar",		"ar",		"echo",
-    "RANLIB",	"ranlib",	"ranlib",	"touch",
-    "DOXYGEN",	"doxygen",	"doxygen",	"echo",
-    "INSTALL",	"install",	"install -c",	"cp"
-};
-
-/*   NAME               IF NOT FOUND                    IF FOUND */
-static cpchar_t	g_Headers [] = {
-    "assert.h",		"#undef HAVE_ASSERT_H",		"#define HAVE_ASSERT_H 1",
-    "ctype.h",		"#undef HAVE_CTYPE_H",		"#define HAVE_CTYPE_H 1",
-    "errno.h",		"#undef HAVE_ERRNO_H",		"#define HAVE_ERRNO_H 1",
-    "fcntl.h",		"#undef HAVE_FCNTL_H",		"#define HAVE_FCNTL_H 1",
-    "float.h",		"#undef HAVE_FLOAT_H",		"#define HAVE_FLOAT_H 1",
-    "inttypes.h",	"#undef HAVE_INTTYPES_H",	"#define HAVE_INTTYPES_H 1",
-    "limits.h",		"#undef HAVE_LIMITS_H",		"#define HAVE_LIMITS_H 1",
-    "locale.h",		"#undef HAVE_LOCALE_H",		"#define HAVE_LOCALE_H 1",
-    "malloc.h",		"#undef HAVE_MALLOC_H",		"#define HAVE_MALLOC_H 1",
-    "alloca.h",		"#undef HAVE_ALLOCA_H",		"#define HAVE_ALLOCA_H 1",
-    "memory.h",		"#undef HAVE_MEMORY_H",		"#define HAVE_MEMORY_H 1",
-    "signal.h",		"#undef HAVE_SIGNAL_H",		"#define HAVE_SIGNAL_H 1",
-    "stdarg.h",		"#undef HAVE_STDARG_H",		"#define HAVE_STDARG_H 1",
-    "stddef.h",		"#undef HAVE_STDDEF_H",		"#define HAVE_STDDEF_H 1",
-    "stdint.h",		"#undef HAVE_STDINT_H",		"#define HAVE_STDINT_H 1",
-    "stdio.h",		"#undef HAVE_STDIO_H",		"#define HAVE_STDIO_H 1",
-    "stdlib.h",		"#undef HAVE_STDLIB_H",		"#define HAVE_STDLIB_H 1",
-    "string.h",		"#undef HAVE_STRING_H",		"#define HAVE_STRING_H 1",
-    "strings.h",	"#undef HAVE_STRINGS_H",	"#define HAVE_STRINGS_H 1",
-    "sys/stat.h",	"#undef HAVE_SYS_STAT_H",	"#define HAVE_SYS_STAT_H 1",
-    "sys/types.h",	"#undef HAVE_SYS_TYPES_H",	"#define HAVE_SYS_TYPES_H 1",
-    "sys/wait.h",	"#undef HAVE_SYS_WAIT_H",	"#define HAVE_SYS_WAIT_H 1",
-    "time.h",		"#undef HAVE_TIME_H",		"#define HAVE_TIME_H 1",
-    "unistd.h",		"#undef HAVE_UNISTD_H",		"#define HAVE_UNISTD_H 1",
-    "math.h",		"#undef HAVE_MATH_H",		"#define HAVE_MATH_H 1",
-    "stdlib.h",		"#undef HAVE_STDLIB_H",		"#define HAVE_STDLIB_H 1"
-};
-
-/*   NAME               IF NOT FOUND                    IF FOUND */
-static cpchar_t g_Libs [] = {
-    "supc++",		"",				"-lsupc++",
-#if __GNUC__ >= 4
-    "gcc",		"-lgcc_s",			"-lgcc_s",
-    "gcc_eh",		"",				"",
-#elif __GNUC__ >= 3
-    "gcc",		"-lgcc_s",			"-lgcc",
-    "gcc_eh",		"-lgcc_s",			"-lgcc_eh",
-#else
-    "gcc",		"",				"-lgcc",
-    "gcc_eh",		"",				"",
-#endif
-    "SystemStubs",	"",				"-lSystemStubs", /* For MacOS 10.4+ */
-    "c",		"",				"-lc"
-};
-
-/*   NAME               IF NOT FOUND                    IF FOUND */
-static cpchar_t g_Functions [] = {
-    "atexit",		"#undef HAVE_ATEXIT",		"#define HAVE_ATEXIT 1",
-    "malloc",		"#undef HAVE_MALLOC\n",		"#define HAVE_MALLOC 1\n",
-    "memchr",		"#undef HAVE_MEMCHR",		"#define HAVE_MEMCHR 1",
-    "memmove",		"#undef HAVE_MEMMOVE",		"#define HAVE_MEMMOVE 1",
-    "memset",		"#undef HAVE_MEMSET",		"#define HAVE_MEMSET 1",
-    "ptrdiff_t",	"#undef HAVE_PTRDIFF_T",	"#define HAVE_PTRDIFF_T 1",
-    "strerror",		"#undef HAVE_STRERROR",		"#define HAVE_STRERROR 1",
-    "strsignal",	"#undef HAVE_STRSIGNAL",	"#define HAVE_STRSIGNAL 1",
-    "strtol",		"#undef HAVE_STRTOL",		"#define HAVE_STRTOL 1",
-#if __GNUC__ >= 3
-    "round",		"#undef HAVE_ROUND",		"#define HAVE_ROUND 1",
-#endif
-    "strrchr",		"#undef HAVE_STRRCHR",		"#define HAVE_STRRCHR 1",
-    "__va_copy",	"#undef HAVE_VA_COPY",		"#define HAVE_VA_COPY 1"
-};
-
-/*   NAME               WITHOUT TEXT                            WITH TEXT */
-static cpchar_t g_Components [] = {
-    "shared",		"#BUILD_SHARED\t= 1",			"BUILD_SHARED\t= 1 ",
-    "static",		"#BUILD_STATIC\t= 1",			"BUILD_STATIC\t= 1 ",
-    "debug",		"#DEBUG\t\t= 1",			"DEBUG\t\t= 1 ",
-    "bounds",		"#undef WANT_STREAM_BOUNDS_CHECKING",	"#define WANT_STREAM_BOUNDS_CHECKING 1 ",
-    "fastcopy",		"#undef WANT_UNROLLED_COPY",		"#define WANT_UNROLLED_COPY 1 ",
-#if __GNUC__ >= 3 && (__i386__ || __x86_64__) && !sun
-    "mmx",		"#undef WANT_MMX",			"#define WANT_MMX 1 ",
-#endif
-    "libstdc++",	"#define WITHOUT_LIBSTDCPP 1",		"#undef WITHOUT_LIBSTDCPP",
-    "libstdc++",	"NOLIBSTDCPP\t= -nodefaultlibs ",	"#NOLIBSTDCPP\t= -nodefaultlibs"
-};
-
-/* Parallel to g_Components */
-static SComponentInfo g_ComponentInfos [VectorSize(g_Components) / 3] = {
-    { 1, "Builds the shared library (if supported by the OS)" },
-    { 0, "Builds the static library" },
-    { 0, "Compiles the library with debugging information" },
-    { 1, "Disable runtime bounds checking on stream reads/writes" },
-    { 1, "Disable specializations for copy/fill" },
-#if __GNUC__ >= 3 && (__i386__ || __x86_64__) && !sun
-    { 1, "Disable use of MMX/SSE/3dNow! instructions" },
-#endif
-#if __GNUC__ >= 3
-    { 0, "Link with libstdc++" },
-    { 0, "" }
-#else
-    { 1, "" },
-    { 1, "" }
-#endif
-};
-
-/* Substitutes names like @PACKAGE_NAME@ with the second field */
-static cpchar_t g_CustomVars [] = {
-    "PACKAGE_NAME",		PACKAGE_NAME,
-    "PACKAGE_VERSION",		PACKAGE_VERSION,
-    "PACKAGE_TARNAME",		PACKAGE_TARNAME,
-    "PACKAGE_STRING",		PACKAGE_STRING,
-    "PACKAGE_BUGREPORT",	PACKAGE_BUGREPORT,
-    "LIBNAME",			PACKAGE_NAME,
-    "LIB_MAJOR",		LIB_MAJOR,
-    "LIB_MINOR",		LIB_MINOR,
-    "LIB_BUILD",		LIB_BUILD
-};
-
diff --git a/media/libdrm/mobile2/src/util/ustl-1.0/cmemlink.cpp b/media/libdrm/mobile2/src/util/ustl-1.0/cmemlink.cpp
deleted file mode 100644
index 7250e9f..0000000
--- a/media/libdrm/mobile2/src/util/ustl-1.0/cmemlink.cpp
+++ /dev/null
@@ -1,110 +0,0 @@
-// This file is part of the ustl library, an STL implementation.
-//
-// Copyright (C) 2005 by Mike Sharov <msharov@users.sourceforge.net>
-// This file is free software, distributed under the MIT License.
-//
-// cmemlink.cc
-//
-// See cmemlink.h for documentation.
-//
-
-#include "cmemlink.h"
-#include "ofstream.h"
-#include "strmsize.h"
-#include "ualgo.h"
-#include "uassert.h"
-
-#if PLATFORM_ANDROID
-#include <stdio.h>
-#undef CPU_HAS_MMX
-#endif
-
-namespace ustl {
-
-/// \brief Attaches the object to pointer \p p of size \p n.
-///
-/// If \p p is NULL and \p n is non-zero, bad_alloc is thrown and current
-/// state remains unchanged.
-///
-void cmemlink::link (const void* p, size_type n)
-{
-    if (!p && n)
-#if PLATFORM_ANDROID
-       printf("bad alloc\n");
-#else /* !PLATFORM_ANDROID */
-	throw bad_alloc (n);
-#endif
-    unlink();
-    relink (p, n);
-}
-
-/// Writes the object to stream \p os
-void cmemlink::write (ostream& os) const
-{
-    const written_size_type sz (size());
-    assert (sz == size() && "No support for writing memblocks larger than 4G");
-    os << sz;
-    os.write (cdata(), sz);
-    os.align (alignof (sz));
-}
-
-/// Writes the object to stream \p os
-void cmemlink::text_write (ostringstream& os) const
-{
-    os.write (begin(), readable_size());
-}
-
-/// Returns the number of bytes required to write this object to a stream.
-cmemlink::size_type cmemlink::stream_size (void) const
-{
-    const written_size_type sz (size());
-    return (Align (stream_size_of (sz) + sz, alignof(sz)));
-}
-
-/// Writes the data to file \p "filename".
-void cmemlink::write_file (const char* filename, int mode) const
-{
-    fstream f;
-    f.exceptions (fstream::allbadbits);
-    f.open (filename, fstream::out | fstream::trunc, mode);
-    f.write (cdata(), readable_size());
-    f.close();
-}
-
-/// swaps the contents with \p l
-void cmemlink::swap (cmemlink& l)
-{
-#if CPU_HAS_MMX && SIZE_OF_POINTER == 4
-    asm (
-	"movq %0, %%mm0\n\t"
-	"movq %2, %%mm1\n\t"
-	"movq %%mm0, %2\n\t"
-	"movq %%mm1, %0"
-	: "=m"(m_Data), "=m"(m_Size), "=m"(l.m_Data), "=m"(l.m_Size)
-	: 
-	: "mm0", "mm1", "st", "st(1)");
-    simd::reset_mmx();
-#elif CPU_HAS_SSE && SIZE_OF_POINTER == 8
-    asm (
-	"movups %0, %%xmm0\n\t"
-	"movups %2, %%xmm1\n\t"
-	"movups %%xmm0, %2\n\t"
-	"movups %%xmm1, %0"
-	: "=m"(m_Data), "=m"(m_Size), "=m"(l.m_Data), "=m"(l.m_Size)
-	: 
-	: "xmm0", "xmm1");
-#else
-    ::ustl::swap (m_Data, l.m_Data);
-    ::ustl::swap (m_Size, l.m_Size);
-#endif
-}
-
-/// Compares to memory block pointed by l. Size is compared first.
-bool cmemlink::operator== (const cmemlink& l) const
-{
-    return (l.m_Size == m_Size &&
-	    (l.m_Data == m_Data || 0 == memcmp (l.m_Data, m_Data, m_Size)));
-}
-
-} // namespace ustl
-
diff --git a/media/libdrm/mobile2/src/util/ustl-1.0/cmemlink.h b/media/libdrm/mobile2/src/util/ustl-1.0/cmemlink.h
deleted file mode 100644
index 46a9388..0000000
--- a/media/libdrm/mobile2/src/util/ustl-1.0/cmemlink.h
+++ /dev/null
@@ -1,101 +0,0 @@
-// This file is part of the ustl library, an STL implementation.
-//
-// Copyright (C) 2005 by Mike Sharov <msharov@users.sourceforge.net>
-// This file is free software, distributed under the MIT License.
-//
-// cmemlink.h
-//
-
-#ifndef CMEMLINK_H_7CFAB32C5C6732ED29B34EF00EA40A12
-#define CMEMLINK_H_7CFAB32C5C6732ED29B34EF00EA40A12
-
-#include "ualgobase.h"
-
-/// The ustl namespace contains all ustl classes and algorithms.
-namespace ustl {
-
-class istream;
-class ostream;
-class ostringstream;
-
-/// \class cmemlink cmemlink.h ustl.h
-/// \ingroup MemoryManagement
-///
-/// \brief A read-only pointer to a sized block of memory.
-///
-/// Use this class the way you would a const pointer to an allocated unstructured block.
-/// The pointer and block size are available through member functions and cast operator.
-///
-/// Example usage:
-///
-/// \code
-///     void* p = malloc (46721);
-///     cmemlink a, b;
-///     a.link (p, 46721);
-///     assert (a.size() == 46721));
-///     b = a;
-///     assert (b.size() == 46721));
-///     assert (b.DataAt(34) == a.DataAt(34));
-///     assert (0 == memcmp (a, b, 12));
-/// \endcode
-///
-class cmemlink {
-public:
-    typedef char		value_type;
-    typedef const value_type*	pointer;
-    typedef const value_type*	const_pointer;
-    typedef value_type		reference;
-    typedef value_type		const_reference;
-    typedef size_t		size_type;
-    typedef uint32_t		written_size_type;
-    typedef ptrdiff_t		difference_type;
-    typedef const_pointer	const_iterator;
-    typedef const_iterator	iterator;
-    typedef const cmemlink&	rcself_t;
-public:
-    inline		cmemlink (void)				: m_Data (NULL), m_Size (0) { }
-    inline		cmemlink (const void* p, size_type n)	: m_Data (const_pointer(p)), m_Size (n) { assert (p || !n); }
-    inline		cmemlink (const cmemlink& l)		: m_Data (l.m_Data), m_Size (l.m_Size) {}
-    inline virtual     ~cmemlink (void)				{}
-    void		link (const void* p, size_type n);
-			OVERLOAD_POINTER_AND_SIZE_T_V2(link, const void*)
-    inline void		link (const cmemlink& l)	{ link (l.begin(), l.size()); }
-    inline void		link (const void* first, const void* last)	{ link (first, distance (first, last)); }
-    inline void		relink (const void* p, size_type n);
-    inline virtual void	unlink (void)			{ m_Data = NULL; m_Size = 0; }
-    inline rcself_t	operator= (const cmemlink& l)	{ link (l); return (*this); }
-    bool		operator== (const cmemlink& l) const;
-    void		swap (cmemlink& l);
-    inline size_type	size (void) const		{ return (m_Size); }
-    inline size_type	max_size (void) const		{ return (size()); }
-    inline size_type	readable_size (void) const	{ return (size()); }
-    inline bool		empty (void) const		{ return (!size()); }
-   inline const_pointer	cdata (void) const		{ return (m_Data); }
-    inline iterator	begin (void) const		{ return (iterator (cdata())); }
-    inline iterator	iat (size_type i) const		{ assert (i <= size()); return (begin() + i); }
-    inline iterator	end (void) const		{ return (iat (size())); }
-    inline void		resize (size_type n)		{ m_Size = n; }
-    inline void		read (istream&)			{ assert (!"ustl::cmemlink is a read-only object."); }
-    void		write (ostream& os) const;
-    size_type		stream_size (void) const;
-    void		text_write (ostringstream& os) const;
-    void		write_file (const char* filename, int mode = 0644) const;
-private:
-    const_pointer	m_Data;		///< Pointer to the data block (const)
-    size_type		m_Size;		///< size of the data block
-};
-
-/// A fast alternative to link which can be used when relinking to the same block (i.e. when it is resized)
-inline void cmemlink::relink (const void* p, size_type n)
-{
-    m_Data = reinterpret_cast<const_pointer>(p);
-    m_Size = n;
-}
-
-/// Use with cmemlink-derived classes to link to a static array
-#define static_link(v)	link (VectorBlock(v))
-
-} // namespace ustl
-
-#endif
-
diff --git a/media/libdrm/mobile2/src/util/ustl-1.0/config.h b/media/libdrm/mobile2/src/util/ustl-1.0/config.h
deleted file mode 100644
index e6e4b7f..0000000
--- a/media/libdrm/mobile2/src/util/ustl-1.0/config.h
+++ /dev/null
@@ -1,296 +0,0 @@
-// config.h
-//
-// Autogenerated from config.h.in by bsconf.
-//
-
-#ifndef CONFIG_H_01E33670634DAAC779EE5FF41CCBB36F
-#define CONFIG_H_01E33670634DAAC779EE5FF41CCBB36F
-
-#include "uassert.h"
-
-#if PLATFORM_ANDROID
-
-#include <utils/Endian.h>
-
-// Byte order macros, converted in utypes.h
-#define USTL_LITTLE_ENDIAN	__LITTLE_ENDIAN
-#define USTL_BIG_ENDIAN		__BIG_ENDIAN
-#define USTL_BYTE_ORDER		__BYTE_ORDER
-
-#if !defined NDEBUG
-#define NDEBUG
-#endif
-#else /* !PLATFORM_ANDROID */
-// Byte order macros, converted in utypes.h
-#define USTL_LITTLE_ENDIAN	4321
-#define USTL_BIG_ENDIAN		1234
-#define USTL_BYTE_ORDER		USTL_LITTLE_ENDIAN
-#endif
-
-// Define to the one symbol short name of this package.
-#define USTL_NAME	"ustl"
-// Define to the full name and version of this package.
-#define USTL_STRING	"ustl 1.0"
-// Define to the version of this package.
-#define USTL_VERSION	0x100
-// Define to the address where bug reports for this package should be sent.
-#define USTL_BUGREPORT	"Mike Sharov <msharov@users.sourceforge.net>"
-
-/// Define to 1 if you want stream operations to throw exceptions on
-/// insufficient data or insufficient space. All these errors should
-/// be preventable in output code; the input code should verify the
-/// data in a separate step. It slows down stream operations a lot,
-/// but it's your call. By default only debug builds throw.
-///
-#undef WANT_STREAM_BOUNDS_CHECKING
-
-#if !defined(WANT_STREAM_BOUNDS_CHECKING) && !defined(NDEBUG)
-    #define WANT_STREAM_BOUNDS_CHECKING 1
-#endif
-
-/// Define to 1 if you want to build without libstdc++
-#define WITHOUT_LIBSTDCPP 1
-
-/// Define GNU extensions if unavailable.
-#ifndef __GNUC__
-    /// GCC (and some other compilers) define '__attribute__'; ustl is using this
-    /// macro to alert the compiler to flag inconsistencies in printf/scanf-like
-    /// function calls.  Just in case '__attribute__' isn't defined, make a dummy.
-    /// 
-    #ifndef __attribute__
-	#define __attribute__(p)
-    #endif
-#endif
-#if defined(__GNUC__) && __GNUC__ >= 4
-    #define DLL_EXPORT		__attribute__((visibility("default")))
-    #define DLL_LOCAL		__attribute__((visibility("hidden")))
-#else
-    #define DLL_EXPORT
-    #define DLL_LOCAL
-#endif
-#if defined(__GNUC__) && __GNUC__ >= 3 && __i386__
-    /// GCC 3+ supports the prefetch directive, which some CPUs use to improve caching
-    #define prefetch(p,rw,loc)	__builtin_prefetch(p,rw,loc)
-#else
-    #define prefetch(p,rw,loc)
-#endif
-#if !defined(__GNUC__) || __GNUC__ < 3
-    /// __alignof__ returns the recommended alignment for the type
-    #define __alignof__(v)	min(sizeof(v), sizeof(void*))
-#endif
-
-/// Define to 1 if you have the `atexit' function.
-#define HAVE_ATEXIT 1
-
-/// Define to 1 if you have the <assert.h> header file.
-#define HAVE_ASSERT_H 1
-
-/// Define to 1 if you have the <ctype.h> header file.
-#define HAVE_CTYPE_H 1
-
-/// Define to 1 if you have the <errno.h> header file.
-#define HAVE_ERRNO_H 1
-
-/// Define to 1 if you have the <fcntl.h> header file.
-#define HAVE_FCNTL_H 1
-
-/// Define to 1 if you have the <float.h> header file.
-#define HAVE_FLOAT_H 1
-
-/// Define to 1 if you have the <inttypes.h> header file.
-#define HAVE_INTTYPES_H 1
-
-/// Define to 1 if you have the <limits.h> header file.
-#define HAVE_LIMITS_H 1
-
-/// Define to 1 if you have the <locale.h> header file.
-#define HAVE_LOCALE_H 1
-
-/// Define to 1 if your system has a working `malloc' function.
-#define HAVE_MALLOC 1
-
-// Define to 1 if you have the <malloc.h> header file.
-#undef HAVE_MALLOC_H
-
-// Define to 1 if you have the <alloca.h> header file.
-#define HAVE_ALLOCA_H 1
-
-// Define to 1 if you have the `memchr' function.
-#define HAVE_MEMCHR 1
-
-// Define to 1 if you have the `memmove' function.
-#define HAVE_MEMMOVE 1
-
-// Define to 1 if you have the <memory.h> header file.
-#define HAVE_MEMORY_H 1
-
-// Define to 1 if you have the `memset' function.
-#define HAVE_MEMSET 1
-
-// Define to 1 if the system has the type `ptrdiff_t'.
-#define HAVE_PTRDIFF_T 1
-
-// Define to 1 if you have the <signal.h> header file.
-#define HAVE_SIGNAL_H 1
-
-// Define to 1 if you have the __va_copy function
-#define HAVE_VA_COPY 1
-
-// Define to 1 if `stat' has the bug that it succeeds when given the
-// zero-length file name argument.
-/* #undef HAVE_STAT_EMPTY_STRING_BUG */
-
-// Define to 1 if you have the <stdarg.h> header file.
-#define HAVE_STDARG_H 1
-
-// Define to 1 if you have the <stddef.h> header file.
-#define HAVE_STDDEF_H 1
-
-// Define to 1 if you have the <stdint.h> header file.
-#define HAVE_STDINT_H 1
-
-// Define to 1 if you have the <stdio.h> header file.
-#define HAVE_STDIO_H 1
-
-// Define to 1 if you have the <stdlib.h> header file.
-#define HAVE_STDLIB_H 1
-
-// Define to 1 if you have the `strerror' function.
-#define HAVE_STRERROR 1
-
-// Define to 1 if you have the <strings.h> header file.
-#define HAVE_STRINGS_H 1
-
-// Define to 1 if you have the <string.h> header file.
-#define HAVE_STRING_H 1
-
-// Define to 1 if you have the `strrchr' function.
-#define HAVE_STRRCHR 1
-
-// Define to 1 if you have the `strsignal' function.
-#undef HAVE_STRSIGNAL
-
-// Define to 1 if you have the `strtol' function.
-#define HAVE_STRTOL 1
-
-// Define to 1 if you have the <sys/stat.h> header file.
-#define HAVE_SYS_STAT_H 1
-
-// Define to 1 if you have the <sys/types.h> header file.
-#define HAVE_SYS_TYPES_H 1
-
-// Define to 1 if you have <sys/wait.h> that is POSIX.1 compatible.
-#define HAVE_SYS_WAIT_H 1
-
-// Define to 1 if you have the <time.h> header file.
-#define HAVE_TIME_H 1
-
-// Define to 1 if you have the <unistd.h> header file.
-#define HAVE_UNISTD_H 1
-
-// Define to 1 if you have the <math.h> header file.
-#define HAVE_MATH_H 1
-
-// Define to 1 if you have the rintf function. Will use rint otherwise.
-#undef HAVE_RINTF
-
-// STDC_HEADERS is defined to 1 on sane systems.
-#if defined(HAVE_ASSERT_H) && defined(HAVE_CTYPE_H) &&\
-    defined(HAVE_ERRNO_H) && defined(HAVE_FLOAT_H) &&\
-    defined(HAVE_LIMITS_H) && defined(HAVE_LOCALE_H) &&\
-    defined(HAVE_MATH_H) && defined(HAVE_SIGNAL_H) &&\
-    defined(HAVE_STDARG_H) && defined(HAVE_STDDEF_H) &&\
-    defined(HAVE_STDIO_H) && defined(HAVE_STDLIB_H) &&\
-    defined(HAVE_STRING_H) && defined(HAVE_TIME_H)
-#define STDC_HEADERS 1
-#endif
-
-// STDC_HEADERS is defined to 1 on unix systems.
-#if defined(HAVE_FCNTL_H) && defined(HAVE_SYS_STAT_H) && defined(HAVE_UNISTD_H)
-#define STDUNIX_HEADERS 1
-#endif
-
-// Define to 1 if `lstat' dereferences a symlink specified with a trailing slash.
-#define LSTAT_FOLLOWS_SLASHED_SYMLINK 1
-
-// Define to 1 if your compiler treats char as a separate type along with
-// signed char and unsigned char. This will create overloads for char.
-#define HAVE_THREE_CHAR_TYPES 1
-
-// Define as the return type of signal handlers (`int' or `void').
-#define RETSIGTYPE void
-
-// Define to 1 if you have 64 bit types available
-#define HAVE_INT64_T 1
-
-// Define to 1 if you have the long long type
-#undef HAVE_LONG_LONG
-
-// Define to 1 if you want unrolled specializations for fill and copy
-#define WANT_UNROLLED_COPY 1 
-
-// Define to 1 if you want to use MMX/SSE/3dNow! processor instructions
-#undef WANT_MMX
-
-// Define to byte sizes of types
-#define SIZE_OF_CHAR 1
-#define SIZE_OF_SHORT 2
-#define SIZE_OF_INT 4
-#define SIZE_OF_LONG 4
-#define SIZE_OF_LONG_LONG 8
-#define SIZE_OF_POINTER 4
-#define SIZE_OF_SIZE_T 4
-#define SIZE_OF_BOOL SIZE_OF_LONG
-#if SIZE_OF_SIZE_T == SIZE_OF_LONG
-#define SIZE_T_IS_LONG 1
-#else
-#define SIZE_T_IS_LONG 0
-#endif
-
-// Extended CPU capabilities
-#undef CPU_HAS_FPU
-#undef CPU_HAS_EXT_DEBUG
-#undef CPU_HAS_TIMESTAMPC
-#undef CPU_HAS_MSR
-#undef CPU_HAS_CMPXCHG8
-#undef CPU_HAS_APIC
-#undef CPU_HAS_SYSCALL
-#undef CPU_HAS_MTRR
-#undef CPU_HAS_CMOV
-#undef CPU_HAS_FCMOV
-#if WANT_MMX
-#undef CPU_HAS_MMX
-#undef CPU_HAS_FXSAVE
-#undef CPU_HAS_SSE 
-#undef CPU_HAS_SSE2
-#undef CPU_HAS_SSE3
-#undef CPU_HAS_EXT_3DNOW
-#undef CPU_HAS_3DNOW
-#endif
-
-// GCC vector extensions
-#if defined(CPU_HAS_MMX) || defined(CPU_HAS_SSE)
-    #define HAVE_VECTOR_EXTENSIONS 1
-#endif
-
-#if CPU_HAS_SSE && defined(__GNUC__)
-    #define __sse_align	__attribute__((aligned(16)))
-#else
-    #define __sse_align	
-#endif
-
-// Define to empty if `const' does not conform to ANSI C.
-/* #define const */
-
-// Define as `__inline' if that's what the C compiler calls it, or to nothing
-// if it is not supported.
-/* #define inline __inline */
-
-// Define to `long' if <sys/types.h> does not define.
-/* typedef long off_t; */
-
-// Define to `unsigned' if <sys/types.h> does not define.
-/* typedef long size_t; */
-
-#endif	// CONFIG_H_01E33670634DAAC779EE5FF41CCBB36F
-
diff --git a/media/libdrm/mobile2/src/util/ustl-1.0/fstream.cpp b/media/libdrm/mobile2/src/util/ustl-1.0/fstream.cpp
deleted file mode 100644
index 06b9691..0000000
--- a/media/libdrm/mobile2/src/util/ustl-1.0/fstream.cpp
+++ /dev/null
@@ -1,282 +0,0 @@
-// This file is part of the ustl library, an STL implementation.
-//
-// Copyright (C) 2005 by Mike Sharov <msharov@users.sourceforge.net>
-// This file is free software, distributed under the MIT License.
-//
-// file.cc
-//
-
-#include "fstream.h"
-#include "uassert.h"
-#include "uexception.h"
-#include "uutility.h"
-
-#include <fcntl.h>
-#include <unistd.h>
-#include <errno.h>
-#include <sys/stat.h>
-#include <sys/mman.h>
-#include <sys/ioctl.h>
-
-#if PLATFORM_ANDROID
-#include <stdio.h>
-#endif
-
-namespace ustl {
-
-/// Default constructor.
-fstream::fstream (void)
-: ios_base (),
-  m_fd (-1),
-  m_Filename ()
-{
-}
-
-/// Opens \p filename in \p mode.
-fstream::fstream (const char* filename, openmode mode)
-: ios_base (),
-  m_fd (-1),
-  m_Filename ()
-{
-    open (filename, mode);
-}
-
-/// Attaches to \p nfd of \p filename.
-fstream::fstream (int nfd, const char* filename)
-: ios_base (),
-  m_fd (-1),
-  m_Filename ()
-{
-    attach (nfd, filename);
-}
-
-/// Destructor. Closes if still open, but without throwing.
-fstream::~fstream (void) throw()
-{
-    clear (goodbit);
-    exceptions (goodbit);
-    close();
-    assert (!(rdstate() & badbit) && "close failed in the destructor! This may lead to loss of user data. Please call close() manually and either enable exceptions or check the badbit.");
-}
-
-/// Sets state \p s and throws depending on the exception setting.
-void fstream::set_and_throw (iostate s, const char* op)
-{
-    if (ios_base::set_and_throw (s))
-#if PLATFORM_ANDROID
-        printf("file_exception\n");
-#else /* !PLATFORM_ANDROID */
-	throw file_exception (op, name());
-#endif
-}
-
-/// Attaches to the given \p nfd.
-void fstream::attach (int nfd, const char* filename)
-{
-    assert (filename && "Don't do that");
-    clear (goodbit);
-    if (nfd < 0 && ios_base::set_and_throw (badbit))
-#if PLATFORM_ANDROID
-        printf("file exception\n");
-#else /* !PLATFORM_ANDROID */
-	throw file_exception ("open", filename);
-#endif
-    close();
-    m_fd = nfd;
-    m_Filename = filename;
-}
-
-/// Detaches from the current fd.
-void fstream::detach (void)
-{
-    m_fd = -1;
-    m_Filename.clear();
-}
-
-/// Converts openmode bits into libc open flags.
-/*static*/ int fstream::om_to_flags (openmode m)
-{
-    static const int s_OMFlags [nombits] = {
-	0,		// in
-	O_CREAT,	// out
-	O_APPEND,	// app
-	O_APPEND,	// ate
-	0,		// binary
-	O_TRUNC,	// trunc
-	O_NONBLOCK,	// nonblock
-	0,		// nocreate
-	O_NOCTTY	// noctty
-    };
-    int flags = (m - 1) & O_ACCMODE;	// in and out
-    for (uoff_t i = 0; i < VectorSize(s_OMFlags); ++ i)
-	if (m & (1 << i))
-	    flags |= s_OMFlags[i];
-    if (m & nocreate)
-	flags &= ~O_CREAT;
-    return (flags);
-}
-
-/// \brief Opens \p filename in the given mode.
-/// \warning The string at \p filename must exist until the object is closed.
-void fstream::open (const char* filename, openmode mode, mode_t perms)
-{
-    int nfd = ::open (filename, om_to_flags(mode), perms);
-    attach (nfd, filename);
-}
-
-/// Closes the file and throws on error.
-void fstream::close (void)
-{
-    if (m_fd >= 0 && ::close(m_fd))
-	set_and_throw (badbit | failbit, "close");
-    detach();
-}
-
-/// Moves the current file position to \p n.
-off_t fstream::seek (off_t n, seekdir whence)
-{
-    off_t p = lseek (m_fd, n, whence);
-    if (p < 0)
-	set_and_throw (failbit, "seek");
-    return (p);
-}
-
-/// Returns the current file position.
-off_t fstream::pos (void) const
-{
-    return (lseek (m_fd, 0, SEEK_CUR));
-}
-
-/// Reads \p n bytes into \p p.
-off_t fstream::read (void* p, off_t n)
-{
-    off_t br (0);
-    while (br < n && good())
-	br += readsome (advance (p, br), n - br);
-    return (br);
-}
-
-/// Reads at most \p n bytes into \p p, stopping when it feels like it.
-off_t fstream::readsome (void* p, off_t n)
-{
-    ssize_t brn;
-    do { brn = ::read (m_fd, p, n); } while (brn < 0 && errno == EINTR);
-    if (brn > 0)
-	return (brn);
-    if (brn < 0 && errno != EAGAIN)
-	set_and_throw (failbit, "read");
-    if (!brn && ios_base::set_and_throw (eofbit | failbit))
-#if PLATFORM_ANDROID
-        printf("stream_bounds_exception\n");
-#else /* !PLATFORM_ANDROID */
-        throw stream_bounds_exception ("read", name(), pos(), n, 0);
-#endif
-    return (0);
-}
-
-/// Writes \p n bytes from \p p.
-off_t fstream::write (const void* p, off_t n)
-{
-    off_t btw (n);
-    while (btw) {
-	const off_t bw (n - btw);
-	ssize_t bwn = ::write (m_fd, advance(p,bw), btw);
-	if (bwn > 0)
-	    btw -= bwn;
-	else if (!bwn) {
-	    if (ios_base::set_and_throw (eofbit | failbit))
-#if PLATFORM_ANDROID
-	      printf("stream_bounds_exception\n");
-#else /* !PLATFORM_ANDROID */
-	    throw stream_bounds_exception ("write", name(), pos() - bw, n, bw);
-#endif
-	    break;
-	} else if (errno != EINTR) {
-	    if (errno != EAGAIN)
-		set_and_throw (failbit, "write");
-	    break;
-	}
-    }
-    return (n - btw);
-}
-
-/// Returns the file size.
-off_t fstream::size (void) const
-{
-    struct stat st;
-    st.st_size = 0;
-    stat (st);
-    return (st.st_size);
-}
-
-/// Synchronizes the file's data and status with the disk.
-void fstream::sync (void)
-{
-    if (fsync (m_fd))
-	set_and_throw (failbit, "sync");
-}
-
-/// Get the stat structure.
-void fstream::stat (struct stat& rs) const
-{
-    if (fstat (m_fd, &rs))
-#if PLATFORM_ANDROID
-        printf("file_exception\n");
-#else
-	throw file_exception ("stat", name());
-#endif
-}
-
-/// Calls the given ioctl. Use IOCTLID macro to pass in both \p name and \p request.
-int fstream::ioctl (const char* rname, int request, long argument)
-{
-    int rv = ::ioctl (m_fd, request, argument);
-    if (rv < 0)
-	set_and_throw (failbit, rname);
-    return (rv);
-}
-
-/// Calls the given fcntl. Use FCNTLID macro to pass in both \p name and \p request.
-int fstream::fcntl (const char* rname, int request, long argument)
-{
-    int rv = ::fcntl (m_fd, request, argument);
-    if (rv < 0)
-	set_and_throw (failbit, rname);
-    return (rv);
-}
-
-/// Memory-maps the file and returns a link to it.
-memlink fstream::mmap (off_t n, off_t offset)
-{
-    void* result = ::mmap (NULL, n, PROT_READ | PROT_WRITE, MAP_SHARED, m_fd, offset);
-    if (result == MAP_FAILED)
-	set_and_throw (failbit, "mmap");
-    return (memlink (result, n));
-}
-
-/// Unmaps a memory-mapped area.
-void fstream::munmap (memlink& l)
-{
-    if (::munmap (l.data(), l.size()))
-	set_and_throw (failbit, "munmap");
-    l.unlink();
-}
-
-/// Synchronizes a memory-mapped area.
-void fstream::msync (memlink& l)
-{
-    if (::msync (l.data(), l.size(), MS_ASYNC | MS_INVALIDATE))
-	set_and_throw (failbit, "msync");
-}
-
-void fstream::set_nonblock (bool v)
-{
-    int curf = fcntl (FCNTLID (F_GETFL));
-    if (curf < 0) return;
-    if (v) curf |=  O_NONBLOCK;
-    else   curf &= ~O_NONBLOCK;
-    fcntl (FCNTLID (F_SETFL), curf);
-}
-
-} // namespace ustl
-
diff --git a/media/libdrm/mobile2/src/util/ustl-1.0/fstream.h b/media/libdrm/mobile2/src/util/ustl-1.0/fstream.h
deleted file mode 100644
index cf60bbd..0000000
--- a/media/libdrm/mobile2/src/util/ustl-1.0/fstream.h
+++ /dev/null
@@ -1,78 +0,0 @@
-// This file is part of the ustl library, an STL implementation.
-//
-// Copyright (C) 2005 by Mike Sharov <msharov@users.sourceforge.net>
-// This file is free software, distributed under the MIT License.
-//
-// fstream.h
-//
-
-#ifndef FSTREAM_H_056E10F70EAD416443E3B36A2D6B5FA3
-#define FSTREAM_H_056E10F70EAD416443E3B36A2D6B5FA3
-
-#include "uios.h"
-#include "ustring.h"
-
-struct stat;
-
-namespace ustl {
-
-/// \class fstream fstream.h ustl.h
-///
-/// \brief Implements file operations.
-///
-/// This is not implemented as a stream, but rather as a base for one. You
-/// should use ifstream or ofstream if you want flow operators. Otherwise
-/// this only implements functions for binary i/o.
-///
-class fstream : public ios_base {
-public:
-			fstream (void);
-    explicit		fstream (const char* filename, openmode mode = in | out);
-    explicit		fstream (int nfd, const char* filename = string::empty_string);
-		       ~fstream (void) throw();
-    void		open (const char* filename, openmode mode, mode_t perms = 0644);
-    void		attach (int nfd, const char* filename = string::empty_string);
-    void		detach (void);
-    void		close (void);
-    void		sync (void);
-    off_t		read (void* p, off_t n);
-    off_t		readsome (void* p, off_t n);
-    off_t		write (const void* p, off_t n);
-    off_t		size (void) const;
-    off_t		seek (off_t n, seekdir whence = beg);
-    off_t		pos (void) const;
-    void		stat (struct stat& rs) const;
-    int			ioctl (const char* rname, int request, long argument = 0);
-    inline int		ioctl (const char* rname, int request, int argument)	{ return (fstream::ioctl (rname, request, long(argument))); }
-    inline int		ioctl (const char* rname, int request, void* argument)	{ return (fstream::ioctl (rname, request, intptr_t(argument))); }
-    int			fcntl (const char* rname, int request, long argument = 0);
-    inline int		fcntl (const char* rname, int request, int argument)	{ return (fstream::fcntl (rname, request, long(argument))); }
-    inline int		fcntl (const char* rname, int request, void* argument)	{ return (fstream::fcntl (rname, request, intptr_t(argument))); }
-    memlink		mmap (off_t n, off_t offset = 0);
-    void		munmap (memlink& l);
-    void		msync (memlink& l);
-    void		set_nonblock (bool v = true);
-    inline int		fd (void) const		{ return (m_fd); }
-    inline bool		is_open (void) const	{ return (fd() >= 0); }
-    inline off_t	tellg (void) const	{ return (pos()); }
-    inline off_t	tellp (void) const	{ return (pos()); }
-    inline void		seekg (off_t n, seekdir whence = beg)	{ seek (n, whence); }
-    inline void		seekp (off_t n, seekdir whence = beg)	{ seek (n, whence); }
-    inline void		flush (void)		{ sync(); }
-    inline const string& name (void) const	{ return (m_Filename); }
-private:
-   DLL_LOCAL static int	om_to_flags (openmode m);
-    DLL_LOCAL void	set_and_throw (iostate s, const char* op);
-private:
-    int			m_fd;		///< Currently open file descriptor.
-    string		m_Filename;	///< Currently open filename.
-};
-
-/// Argument macro for fstream::ioctl. Use like fs.ioctl (IOCTLID (TCGETS), &ts).
-#define IOCTLID(r)	"ioctl("#r")", r
-#define FCNTLID(r)	"fcntl("#r")", r
-
-}
-
-#endif
-
diff --git a/media/libdrm/mobile2/src/util/ustl-1.0/memblock.cpp b/media/libdrm/mobile2/src/util/ustl-1.0/memblock.cpp
deleted file mode 100644
index 721433e..0000000
--- a/media/libdrm/mobile2/src/util/ustl-1.0/memblock.cpp
+++ /dev/null
@@ -1,216 +0,0 @@
-// This file is part of the ustl library, an STL implementation.
-//
-// Copyright (C) 2005 by Mike Sharov <msharov@users.sourceforge.net>
-// This file is free software, distributed under the MIT License.
-//
-// memblock.cc
-//
-//	Allocated memory block.
-//
-
-#include "fstream.h"
-#include "mistream.h"
-#include "memblock.h"
-#include "ualgo.h"
-#include "uassert.h"
-#include "umemory.h"
-
-#include <errno.h>
-
-namespace ustl {
-
-/// Allocates 0 bytes for the internal block.
-memblock::memblock (void)
-: memlink (),
-  m_Capacity (0)
-{
-}
-
-/// Allocates \p n bytes for the internal block.
-memblock::memblock (size_type n)
-: memlink (),
-  m_Capacity (0)
-{
-    resize (n);
-}
-
-/// links to \p p, \p n. Data can not be modified and will not be freed.
-memblock::memblock (const void* p, size_type n)
-: memlink (),
-  m_Capacity (0)
-{
-    assign (p, n);
-}
-
-/// Links to what \p b is linked to.
-memblock::memblock (const cmemlink& b)
-: memlink (),
-  m_Capacity (0)
-{
-    assign (b);
-}
-
-/// Links to what \p b is linked to.
-memblock::memblock (const memlink& b)
-: memlink (),
-  m_Capacity (0)
-{
-    assign (b);
-}
-
-/// Links to what \p b is linked to.
-memblock::memblock (const memblock& b)
-: memlink (),
-  m_Capacity (0)
-{
-    assign (b);
-}
-
-/// Frees internal data, if appropriate
-/// Only if the block was allocated using resize, or linked to using Manage,
-/// will it be freed. Also, Derived classes should call DestructBlock from
-/// their destructor, because upstream virtual functions are unavailable at
-/// this point and will not be called automatically.
-///
-memblock::~memblock (void)
-{
-    if (!is_linked())
-	deallocate();
-}
-
-/// resizes the block to \p newSize bytes, reallocating if necessary.
-void memblock::resize (size_type newSize, bool bExact)
-{
-    if (m_Capacity < newSize + minimumFreeCapacity())
-	reserve (newSize, bExact);
-    memlink::resize (newSize);
-}
-
-/// Frees internal data.
-void memblock::deallocate (void) throw()
-{
-    if (m_Capacity) {
-	assert (cdata() && "Internal error: space allocated, but the pointer is NULL");
-	assert (data() && "Internal error: read-only block is marked as allocated space");
-	free (data());
-    }
-    unlink();
-}
-
-/// Assumes control of the memory block \p p of size \p n.
-/// The block assigned using this function will be freed in the destructor.
-void memblock::manage (void* p, size_type n)
-{
-    assert (p || !n);
-    assert (!m_Capacity && "Already managing something. deallocate or unlink first.");
-    link (p, n);
-    m_Capacity = n;
-}
-
-/// "Instantiate" a linked block by allocating and copying the linked data.
-void memblock::copy_link (void)
-{
-    const cmemlink l (*this);
-    if (is_linked())
-	unlink();
-    assign (l);
-}
- 
-/// Copies data from \p p, \p n.
-void memblock::assign (const void* p, size_type n)
-{
-    assert ((p != (const void*) cdata() || size() == n) && "Self-assignment can not resize");
-    resize (n);
-    copy (p, n);
-}
-
-/// \brief Reallocates internal block to hold at least \p newSize bytes.
-///
-/// Additional memory may be allocated, but for efficiency it is a very
-/// good idea to call reserve before doing byte-by-byte edit operations.
-/// The block size as returned by size() is not altered. reserve will not
-/// reduce allocated memory. If you think you are wasting space, call
-/// deallocate and start over. To avoid wasting space, use the block for
-/// only one purpose, and try to get that purpose to use similar amounts
-/// of memory on each iteration.
-///
-void memblock::reserve (size_type newSize, bool bExact)
-{
-    if ((newSize += minimumFreeCapacity()) <= m_Capacity)
-	return;
-    void* oldBlock (is_linked() ? NULL : data());
-    if (!bExact)
-	newSize = Align (newSize, c_PageSize);
-    pointer newBlock = (pointer) realloc (oldBlock, newSize);
-    if (!newBlock)
-#if PLATFORM_ANDROID
-        printf("bad_alloc\n");
-#else
-	throw bad_alloc (newSize);
-#endif
-    if (!oldBlock && cdata())
-	copy_n (cdata(), min (size() + 1, newSize), newBlock);
-    link (newBlock, size());
-    m_Capacity = newSize;
-}
-
-/// Swaps the contents with \p l
-void memblock::swap (memblock& l)
-{
-    memlink::swap (l);
-    ::ustl::swap (m_Capacity, l.m_Capacity);
-}
-
-/// Shifts the data in the linked block from \p start to \p start + \p n.
-memblock::iterator memblock::insert (iterator start, size_type n)
-{
-    const uoff_t ip = start - begin();
-    assert (ip <= size());
-    resize (size() + n, false);
-    memlink::insert (iat(ip), n);
-    return (iat (ip));
-}
-
-/// Shifts the data in the linked block from \p start + \p n to \p start.
-memblock::iterator memblock::erase (iterator start, size_type n)
-{
-    const uoff_t ep = start - begin();
-    assert (ep + n <= size());
-    memlink::erase (start, n);
-    memlink::resize (size() - n);
-    return (iat (ep));
-}
-
-/// Unlinks object.
-void memblock::unlink (void)
-{
-    memlink::unlink();
-    m_Capacity = 0;
-}
-
-/// Reads the object from stream \p s
-void memblock::read (istream& is)
-{
-    written_size_type n;
-    is >> n;
-    is.verify_remaining ("read", "ustl::memblock", n);
-    resize (n);
-    is.read (data(), writable_size());
-    is.align (alignof (n));
-}
-
-/// Reads the entire file \p "filename".
-void memblock::read_file (const char* filename)
-{
-    fstream f;
-    f.exceptions (fstream::allbadbits);
-    f.open (filename, fstream::in);
-    const off_t fsize (f.size());
-    reserve (fsize);
-    f.read (data(), fsize);
-    f.close();
-    resize (fsize);
-}
-
-} // namespace ustl
-
diff --git a/media/libdrm/mobile2/src/util/ustl-1.0/memblock.h b/media/libdrm/mobile2/src/util/ustl-1.0/memblock.h
deleted file mode 100644
index d85ea0e..0000000
--- a/media/libdrm/mobile2/src/util/ustl-1.0/memblock.h
+++ /dev/null
@@ -1,74 +0,0 @@
-// This file is part of the ustl library, an STL implementation.
-//
-// Copyright (C) 2005 by Mike Sharov <msharov@users.sourceforge.net>
-// This file is free software, distributed under the MIT License.
-//
-// memblock.h
-//
-
-#ifndef MEMBLOCK_H_7ED63A891164CC43578E63664D52A196
-#define MEMBLOCK_H_7ED63A891164CC43578E63664D52A196
-
-#include "memlink.h"
-
-namespace ustl {
-
-/// \class memblock memblock.h ustl.h
-/// \ingroup MemoryManagement
-///
-/// \brief Allocated memory block.
-///
-/// Adds memory management capabilities to memlink. Uses malloc and realloc to
-/// maintain the internal pointer, but only if allocated using members of this class,
-/// or if linked to using the Manage() member function. Managed memory is automatically
-/// freed in the destructor.
-///
-class memblock : public memlink {
-public:
-    static const size_type	c_PageSize = 64;	///< The default minimum allocation unit.
-public:
-				memblock (void);
-				memblock (const void* p, size_type n);
-    explicit			memblock (size_type n);
-    explicit			memblock (const cmemlink& b);
-    explicit			memblock (const memlink& b);
-				memblock (const memblock& b);
-    virtual		       ~memblock (void);
-    virtual void		unlink (void);
-    inline void			assign (const cmemlink& l)	{ assign (l.cdata(), l.readable_size()); }
-    inline const memblock&	operator= (const cmemlink& l)	{ assign (l); return (*this); }
-    inline const memblock&	operator= (const memlink& l)	{ assign (l); return (*this); }
-    inline const memblock&	operator= (const memblock& l)	{ assign (l); return (*this); }
-    void			assign (const void* p, size_type n);
-    void			swap (memblock& l);
-    void			reserve (size_type newSize, bool bExact = true);
-    void			resize (size_type newSize, bool bExact = true);
-    iterator			insert (iterator start, size_type size);
-    iterator			erase (iterator start, size_type size);
-    inline void			clear (void)			{ resize (0); }
-    inline bool			is_linked (void) const		{ return (!m_Capacity && cdata()); }
-    inline size_type		max_size (void) const		{ return (is_linked() ? memlink::max_size() : SIZE_MAX); }
-    inline size_type		capacity (void) const		{ return (m_Capacity); }
-    inline void			manage (memlink& l)		{ manage (l.begin(), l.size()); }
-    void			deallocate (void) throw();
-    void			manage (void* p, size_type n);
-    void			copy_link (void);
-    void			read (istream& is);
-    void			read_file (const char* filename);
-protected:
-    inline virtual size_type	minimumFreeCapacity (void) const { return (0); }
-private:
-    size_type			m_Capacity;	///< Number of bytes allocated by Resize.
-};
-
-/// Reads object \p l from stream \p is
-inline istream& operator>> (istream& is, memblock& l)
-{
-    l.read (is);
-    return (is);
-}
-
-} // namespace ustl
-
-#endif
-
diff --git a/media/libdrm/mobile2/src/util/ustl-1.0/memlink.cpp b/media/libdrm/mobile2/src/util/ustl-1.0/memlink.cpp
deleted file mode 100644
index bed6601..0000000
--- a/media/libdrm/mobile2/src/util/ustl-1.0/memlink.cpp
+++ /dev/null
@@ -1,66 +0,0 @@
-// This file is part of the ustl library, an STL implementation.
-//
-// Copyright (C) 2005 by Mike Sharov <msharov@users.sourceforge.net>
-// This file is free software, distributed under the MIT License.
-//
-// memlink.cc
-//
-//	A pointer to a sized block of memory.
-//
-
-#include "mistream.h"
-#include "uassert.h"
-#include "ustdxept.h"
-
-#if PLATFORM_ANDROID
-#include <stdio.h>
-#endif
-
-namespace ustl {
-
-/// Reads the object from stream \p s
-void memlink::read (istream& is)
-{
-    written_size_type n;
-    is >> n;
-    is.verify_remaining ("read", "ustl::memlink", n);
-    if (n > size())
-#if PLATFORM_ANDROID
-        printf("length error\n");
-#else
-	throw length_error ("memlink can not increase the size of the linked storage for reading");
-#endif
-    resize (n);
-    is.read (data(), n);
-    is.align (alignof (n));
-}
-
-/// Copies data from \p p, \p n to the linked block starting at \p start.
-void memlink::copy (iterator start, const void* p, size_type n)
-{
-    assert (data() || !n);
-    assert (p || !n);
-    assert (start >= begin() && start + n <= end());
-    if (p)
-	copy_n (const_iterator(p), n, start);
-}
-
-/// Fills the linked block with the given pattern.
-/// \arg start   Offset at which to start filling the linked block
-/// \arg p       Pointer to the pattern.
-/// \arg elSize  Size of the pattern.
-/// \arg elCount Number of times to write the pattern.
-/// Total number of bytes written is \p elSize * \p elCount.
-///
-void memlink::fill (iterator start, const void* p, size_type elSize, size_type elCount)
-{
-    assert (data() || !elCount || !elSize);
-    assert (start >= begin() && start + elSize * elCount <= end());
-    if (elSize == 1)
-	fill_n (start, elCount, *reinterpret_cast<const uint8_t*>(p));
-    else while (elCount--)
-	start = copy_n (const_iterator(p), elSize, start);
-}
-
-} // namespace ustl
-
diff --git a/media/libdrm/mobile2/src/util/ustl-1.0/memlink.h b/media/libdrm/mobile2/src/util/ustl-1.0/memlink.h
deleted file mode 100644
index 25d9928..0000000
--- a/media/libdrm/mobile2/src/util/ustl-1.0/memlink.h
+++ /dev/null
@@ -1,115 +0,0 @@
-// This file is part of the ustl library, an STL implementation.
-//
-// Copyright (C) 2005 by Mike Sharov <msharov@users.sourceforge.net>
-// This file is free software, distributed under the MIT License.
-//
-// memlink.h
-
-#ifndef MEMLINK_H_798D25827C8E322D2D7E734B169FF5FC
-#define MEMLINK_H_798D25827C8E322D2D7E734B169FF5FC
-
-#include "cmemlink.h"
-#include "ualgo.h"
-#include "uassert.h"
-
-namespace ustl {
-
-/// \class memlink memlink.h ustl.h
-/// \ingroup MemoryManagement
-///
-/// \brief Wrapper for pointer to block with size.
-///
-/// Use this class the way you would a pointer to an allocated unstructured block.
-/// The pointer and block size are available through member functions and cast operator.
-///
-/// Example usage:
-/// \code
-///     void* p = malloc (46721);
-///     memlink a, b;
-///     a.link (p, 46721);
-///     assert (a.size() == 46721));
-///     b = a;
-///     assert (b.size() == 46721));
-///     assert (b.begin() + 34 == a.begin + 34);
-///     assert (0 == memcmp (a, b, 12));
-///     a.fill (673, b, 42, 67);
-///     b.erase (87, 12);
-/// \endcode
-///
-class memlink : public cmemlink {
-public:
-    typedef value_type*			pointer;
-    typedef cmemlink::pointer		const_pointer;
-    typedef cmemlink::const_iterator	const_iterator;
-    typedef pointer			iterator;
-    typedef const memlink&		rcself_t;
-public:
-    inline		memlink (void)				: cmemlink() {}
-    inline		memlink (void* p, size_type n)		: cmemlink (p, n) {}
-    inline		memlink (const void* p, size_type n)	: cmemlink (p, n) {}
-    inline		memlink (rcself_t l)			: cmemlink (l) {}
-    inline explicit	memlink (const cmemlink& l)		: cmemlink (l) {}
-    inline pointer	data (void)				{ return (const_cast<pointer>(cdata())); }
-    inline iterator	begin (void)				{ return (iterator (data())); }
-    inline iterator	iat (size_type i)			{ assert (i <= size()); return (begin() + i); }
-    inline iterator	end (void)				{ return (iat (size())); }
-    inline const_iterator	begin (void) const		{ return (cmemlink::begin()); }
-    inline const_iterator	end (void) const		{ return (cmemlink::end()); }
-    inline const_iterator	iat (size_type i) const		{ return (cmemlink::iat (i)); }
-    size_type		writable_size (void) const		{ return (size()); }
-    inline rcself_t	operator= (const cmemlink& l)		{ cmemlink::operator= (l); return (*this); }
-    inline rcself_t	operator= (rcself_t l)			{ cmemlink::operator= (l); return (*this); }
-    inline void		link (const void* p, size_type n)	{ cmemlink::link (p, n); }
-    inline void		link (void* p, size_type n)		{ cmemlink::link (p, n); }
-    inline void		link (const cmemlink& l)		{ cmemlink::link (l); }
-    inline void		link (memlink& l)			{ cmemlink::link (l); }
-			OVERLOAD_POINTER_AND_SIZE_T_V2(link, void*)
-			OVERLOAD_POINTER_AND_SIZE_T_V2(link, const void*)
-    inline void		link (const void* first, const void* last)	{ link (first, distance (first, last)); }
-    inline void		link (void* first, void* last)		{ link (first, distance (first, last)); }
-    inline void		relink (const void* p, size_type n)	{ cmemlink::relink (p, n); }
-    inline void		relink (void* p, size_type n)		{ cmemlink::relink (p, n); }
-    inline void		copy (const cmemlink& l)		{ copy (begin(), l.cdata(), l.size()); }
-    inline void		copy (const void* p, size_type n)	{ copy (begin(), p, n); }
-    void		copy (iterator offset, const void* p, size_type n);
-    inline void		swap (memlink& l)			{ cmemlink::swap (l); }
-    void		fill (iterator start, const void* p, size_type elsize, size_type elCount = 1);
-    inline void		insert (iterator start, size_type size);
-    inline void		erase (iterator start, size_type size);
-    void		read (istream& is);
-};
-
-/// Shifts the data in the linked block from \p start to \p start + \p n.
-/// The contents of the uncovered bytes is undefined.
-inline void memlink::insert (iterator start, size_type n)
-{
-    assert (data() || !n);
-    assert (cmemlink::begin() || !n);
-    assert (start >= begin() && start + n <= end());
-    rotate (start, end() - n, end());
-}
-
-/// Shifts the data in the linked block from \p start + \p n to \p start.
-/// The contents of the uncovered bytes is undefined.
-inline void memlink::erase (iterator start, size_type n)
-{
-    assert (data() || !n);
-    assert (cmemlink::begin() || !n);
-    assert (start >= begin() && start + n <= end());
-    rotate (start, start + n, end());
-}
-
-/// Reads object \p l from stream \p is
-inline istream& operator>> (istream& is, memlink& l)
-{
-    l.read (is);
-    return (is);
-}
-
-/// Use with memlink-derived classes to allocate and link to stack space.
-#define alloca_link(m,n)	(m).link (alloca (n), (n))
-
-} // namespace ustl
-
-#endif
-
diff --git a/media/libdrm/mobile2/src/util/ustl-1.0/mistream.cpp b/media/libdrm/mobile2/src/util/ustl-1.0/mistream.cpp
deleted file mode 100644
index ad998289..0000000
--- a/media/libdrm/mobile2/src/util/ustl-1.0/mistream.cpp
+++ /dev/null
@@ -1,242 +0,0 @@
-// This file is part of the ustl library, an STL implementation.
-//
-// Copyright (C) 2005 by Mike Sharov <msharov@users.sourceforge.net>
-// This file is free software, distributed under the MIT License.
-//
-// mstream.cpp
-//
-//	Helper classes to read and write packed binary streams.
-//
-
-#include "mistream.h"
-#include "sostream.h"
-#include "ualgo.h"
-#include "uassert.h"
-#include "ustring.h"
-
-#if PLATFORM_ANDROID
-#include <stdio.h>
-#endif
-
-namespace ustl {
-
-//--------------------------------------------------------------------
-
-/// \brief Constructs a stream attached to nothing.
-/// A stream attached to nothing is not usable. Call Link() functions
-/// inherited from cmemlink to attach to some memory block.
-///
-istream::istream (void)
-: cmemlink (),
-  m_Pos (0)
-{
-}
-
-/// Attaches the stream to a block at \p p of size \p n.
-istream::istream (const void* p, size_type n)
-: cmemlink (p, n),
-  m_Pos (0)
-{
-}
-
-/// Attaches to the block pointed to by \p source.
-istream::istream (const cmemlink& source)
-: cmemlink (source),
-  m_Pos (0)
-{
-}
-
-/// Attaches to the block pointed to by source of size source.pos()
-istream::istream (const ostream& source)
-: cmemlink (source.begin(), source.pos()),
-  m_Pos (0)
-{
-}
-
-/// Swaps contents with \p is
-void istream::swap (istream& is)
-{
-    cmemlink::swap (is);
-    ::ustl::swap (m_Pos, is.m_Pos);
-}
-
-/// Checks that \p n bytes are available in the stream, or else throws.
-void istream::verify_remaining (const char* op, const char* type, size_t n) const
-{
-    if (remaining() < n)
-#if PLATFORM_ANDROID
-        printf("stream bounds exception\n");
-#else
-	throw stream_bounds_exception (op, type, pos(), n, remaining());
-#endif
-}
-
-/// Reads \p n bytes into \p buffer.
-void istream::read (void* buffer, size_type n)
-{
-#ifdef WANT_STREAM_BOUNDS_CHECKING
-    verify_remaining ("read", "binary data", n);
-#else
-    assert (remaining() >= n && "Reading past end of buffer. Make sure you are reading the right format.");
-#endif
-    copy_n (ipos(), n, reinterpret_cast<value_type*>(buffer));
-    m_Pos += n;
-}
-
-/// Reads a null-terminated string into \p str.
-void istream::read_strz (string& str)
-{
-    const_iterator zp = find (ipos(), end(), string::c_Terminator);
-    if (zp == end())
-	zp = ipos();
-    const size_type strl = distance (ipos(), zp);
-    str.resize (strl);
-    copy (ipos(), zp, str.begin());
-    m_Pos += strl + 1;
-}
-
-/// Reads at most \p n bytes into \p s.
-istream::size_type istream::readsome (void* s, size_type n)
-{
-    if (remaining() < n)
-	underflow (n);
-    const size_type ntr (min (n, remaining()));
-    read (s, ntr);
-    return (ntr);
-}
-
-/// Writes all unread bytes into \p os.
-void istream::write (ostream& os) const
-{
-    os.write (ipos(), remaining());
-}
-
-/// Writes the object to stream \p os.
-void istream::text_write (ostringstream& os) const
-{
-    os.write (ipos(), remaining());
-}
-
-/// Links to \p p of size \p n
-void istream::unlink (void)
-{
-    cmemlink::unlink();
-    m_Pos = 0;
-}
-
-//--------------------------------------------------------------------
-
-/// \brief Constructs a stream attached to nothing.
-/// A stream attached to nothing is not usable. Call Link() functions
-/// inherited from memlink to attach to some memory block.
-///
-ostream::ostream (void)
-: memlink (),
-  m_Pos (0)
-{
-}
-
-/// Attaches the stream to a block at \p p of size \p n.
-ostream::ostream (void* p, size_type n)
-: memlink (p, n),
-  m_Pos (0)
-{
-}
-
-/// Attaches to the block pointed to by \p source.
-ostream::ostream (const memlink& source)
-: memlink (source),
-  m_Pos (0)
-{
-}
-
-/// Links to \p p of size \p n
-void ostream::unlink (void)
-{
-    memlink::unlink();
-    m_Pos = 0;
-}
-
-/// Checks that \p n bytes are available in the stream, or else throws.
-void ostream::verify_remaining (const char* op, const char* type, size_t n) const
-{
-    if (remaining() < n)
-#if PLATFORM_ANDROID
-        printf("stream bounds exception\n");
-#else
-	throw stream_bounds_exception (op, type, pos(), n, remaining());
-#endif
-}
-
-/// Aligns the write pointer on \p grain. The skipped bytes are zeroed.
-void ostream::align (size_type grain)
-{
-    const size_t r = pos() % grain;
-    size_t nb = grain - r;
-    if (!r) nb = 0;
-#ifdef WANT_STREAM_BOUNDS_CHECKING
-    verify_remaining ("align", "padding", nb);
-#else
-    assert (remaining() >= nb && "Buffer overrun. Check your stream size calculations.");
-#endif
-    fill_n (ipos(), nb, '\x0');
-    m_Pos += nb;
-}
-
-/// Writes \p n bytes from \p buffer.
-void ostream::write (const void* buffer, size_type n)
-{
-#ifdef WANT_STREAM_BOUNDS_CHECKING
-    verify_remaining ("write", "binary data", n);
-#else
-    assert (remaining() >= n && "Buffer overrun. Check your stream size calculations.");
-#endif
-    copy_n (const_iterator(buffer), n, ipos());
-    m_Pos += n;
-}
-
-/// Writes \p str as a null-terminated string.
-void ostream::write_strz (const char* str)
-{
-    write (str, strlen(str));
-    iwrite (string::c_Terminator);
-}
-
-/// Writes all available data from \p is.
-void ostream::read (istream& is)
-{
-    is.write (*this);
-    is.seek (is.size());
-}
-
-/// Writes all written data to \p os.
-void ostream::text_write (ostringstream& os) const
-{
-    os.write (begin(), pos());
-}
-
-/// Inserts an empty area of \p size, at \p start.
-void ostream::insert (iterator start, size_type s)
-{
-    memlink::insert (start, s);
-    m_Pos += s;
-}
-
-/// Erases an area of \p size, at \p start.
-void ostream::erase (iterator start, size_type s)
-{
-    m_Pos -= s;
-    memlink::erase (start, s);
-}
-
-/// Swaps with \p os
-void ostream::swap (ostream& os)
-{
-    memlink::swap (os);
-    ::ustl::swap (m_Pos, os.m_Pos);
-}
-
-//--------------------------------------------------------------------
-
-} // namespace ustl
-
diff --git a/media/libdrm/mobile2/src/util/ustl-1.0/mistream.h b/media/libdrm/mobile2/src/util/ustl-1.0/mistream.h
deleted file mode 100644
index 0a7aee7..0000000
--- a/media/libdrm/mobile2/src/util/ustl-1.0/mistream.h
+++ /dev/null
@@ -1,293 +0,0 @@
-// This file is part of the ustl library, an STL implementation.
-//
-// Copyright (C) 2005 by Mike Sharov <msharov@users.sourceforge.net>
-// This file is free software, distributed under the MIT License.
-//
-// mistream.h
-//
-#ifndef MISTREAM_H_103AEF1F266C04AA1A817D38705983DA
-#define MISTREAM_H_103AEF1F266C04AA1A817D38705983DA
-
-#include "memlink.h"
-#include "uexception.h"
-#include "strmsize.h"
-#include "uassert.h"
-#include "utf8.h"
-#include "uios.h"
-#ifdef WANT_STREAM_BOUNDS_CHECKING
-    #include <typeinfo>
-#endif
-
-namespace ustl {
-
-class ostream;
-class memlink;
-class string;
-
-/// \class istream mistream.h ustl.h
-/// \ingroup BinaryStreams
-///
-/// \brief Helper class to read packed binary streams.
-/// 
-/// This class contains a set of functions to read integral types from an
-/// unstructured memory block. Unpacking binary file data can be done this
-/// way, for instance. aligning the data is your responsibility, and can
-/// be accomplished by proper ordering of reads and by calling the align()
-/// function. Unaligned access is usually slower by orders of magnitude and,
-/// on some architectures, such as PowerPC, can cause your program to crash.
-/// Therefore, all read functions have asserts to check alignment.
-/// Overreading the end of the stream will also cause a crash (an assert in
-/// debug builds). Oh, and don't be intimidated by the size of the inlines
-/// here. In the assembly code the compiler will usually chop everything down
-/// to five instructions each.
-/// 
-/// Alignment rules for your objects:
-///	- Assume your writes start off 4-byte aligned.
-///	- After completion, \ref istream::align the stream to at least 4.
-///	- If data portability between 32bit and 64bit platforms is important
-///	(it often is not, in config files and the like), ensure you are always
-///	using fixed-size types and are aligning to a fixed grain. Avoid writing
-///	8-byte types, and if you do, manually align before doing so.
-///	- Non-default alignment is allowed if you plan to frequently write this
-///	object in array form and alignment would be costly. For example, an
-///	array of uint16_t-sized objects may leave the stream uint16_t aligned
-///	as long as you know about it and will default-align the stream after
-///	writing the array (note: \ref vector will already do this for you)
-/// 
-/// Example code:
-/// \code
-///	memblock b;
-///	b.read_file ("test.file");
-///	ostream is (b);
-///	is >> boolVar >> ios::talign<int>();
-///	is >> intVar >> floatVar;
-///	is.read (binaryData, binaryDataSize);
-///	is.align();
-/// \endcode
-///
-class istream : public cmemlink, public ios_base {
-public:
-			istream (void);
-			istream (const void* p, size_type n);
-    explicit		istream (const cmemlink& source);
-    explicit		istream (const ostream& source);
-    inline iterator	end (void) const			{ return (cmemlink::end()); }
-    inline void		link (const void* p, size_type n)	{ cmemlink::link (p, n); }
-    inline void		link (const cmemlink& l)		{ cmemlink::link (l.cdata(), l.readable_size()); }
-    inline void		link (const void* f, const void* l)	{ cmemlink::link (f, l); }
-			OVERLOAD_POINTER_AND_SIZE_T_V2(link, const void*)
-    inline void		relink (const void* p, size_type n)	{ cmemlink::relink (p, n); m_Pos = 0; }
-    inline void		relink (const cmemlink& l)		{ relink (l.cdata(), l.readable_size()); }
-    virtual void	unlink (void);
-    inline virtual size_type	underflow (size_type = 1)	{ return (remaining()); }
-    inline uoff_t	pos (void) const	{ return (m_Pos); }
-    inline const_iterator ipos (void) const	{ return (begin() + pos()); }
-    inline size_type	remaining (void) const	{ return (size() - pos()); }
-    inline void		seek (uoff_t newPos);
-    inline void		iseek (const_iterator newPos);
-    inline void		skip (size_type nBytes);
-    inline bool		aligned (size_type grain = c_DefaultAlignment) const;
-    void		verify_remaining (const char* op, const char* type, size_t n) const;
-    inline size_type	align_size (size_type grain = c_DefaultAlignment) const;
-    inline void		align (size_type grain = c_DefaultAlignment);
-    void		swap (istream& is);
-    void		read (void* buffer, size_type size);
-    inline void		read (memlink& buf)	{ read (buf.begin(), buf.writable_size()); }
-    void		read_strz (string& str);
-    size_type		readsome (void* s, size_type n);
-    inline void		read (istream&)			{ }
-    void		write (ostream& os) const;
-    void		text_write (ostringstream& os) const;
-    inline size_t	stream_size (void) const	{ return (remaining()); }
-    template <typename T>
-    inline void		iread (T& v);
-    inline void		ungetc (void)		{ seek (pos() - 1); }
-    inline off_t	tellg (void) const	{ return (pos()); }
-    inline void		seekg (off_t p, seekdir d = beg);
-private:
-    uoff_t		m_Pos;		///< The current read position.
-};
-
-//----------------------------------------------------------------------
-
-template <typename T, typename Stream>
-inline size_t required_stream_size (T, const Stream&) { return (1); }
-template <typename T>
-inline size_t required_stream_size (T v, const istream&) { return (stream_size_of(v)); }
-
-template <typename Stream>
-inline bool stream_at_eof (const Stream& stm)	{ return (stm.eof()); }
-template <>
-inline bool stream_at_eof (const istream&)	{ return (false); }
-
-/// \class istream_iterator
-/// \ingroup BinaryStreamIterators
-///
-/// \brief An iterator over an istream to use with uSTL algorithms.
-///
-template <typename T, typename Stream = istream>
-class istream_iterator {
-public:
-    typedef T			value_type;
-    typedef ptrdiff_t		difference_type;
-    typedef const value_type*	pointer;
-    typedef const value_type&	reference;
-    typedef size_t		size_type;
-public:
-				istream_iterator (void)		: m_pis (NULL), m_v() {}
-    explicit			istream_iterator (Stream& is)	: m_pis (&is), m_v() { Read(); }
- 				istream_iterator (const istream_iterator& i)	: m_pis (i.m_pis), m_v (i.m_v) {}
-    /// Reads and returns the next value.
-    inline const T&		operator* (void)	{ return (m_v); }
-    inline istream_iterator&	operator++ (void)	{ Read(); return (*this); }
-    inline istream_iterator&	operator-- (void)	{ m_pis->seek (m_pis->pos() - 2 * stream_size_of(m_v)); return (operator++()); }
-    inline istream_iterator	operator++ (int)	{ istream_iterator old (*this); operator++(); return (old); }
-    inline istream_iterator	operator-- (int)	{ istream_iterator old (*this); operator--(); return (old); }
-    inline istream_iterator&	operator+= (size_type n)	{ while (n--) operator++(); return (*this); }
-    inline istream_iterator&	operator-= (size_type n)	{ m_pis->seek (m_pis->pos() - (n + 1) * stream_size_of(m_v)); return (operator++()); }
-    inline istream_iterator	operator- (size_type n) const			{ istream_iterator result (*this); return (result -= n); }
-    inline difference_type	operator- (const istream_iterator& i) const	{ return (distance (i.m_pis->pos(), m_pis->pos()) / stream_size_of(m_v)); }
-    inline bool			operator== (const istream_iterator& i) const	{ return ((!m_pis && !i.m_pis) || (m_pis && i.m_pis && m_pis->pos() == i.m_pis->pos())); }
-    inline bool			operator< (const istream_iterator& i) const	{ return (!i.m_pis || (m_pis && m_pis->pos() < i.m_pis->pos())); }
-private:
-    void Read (void)
-    {
-	if (!m_pis)
-	    return;
-	const size_t rs (required_stream_size (m_v, *m_pis));
-	if (m_pis->remaining() < rs && m_pis->underflow (rs) < rs) {
-	    m_pis = NULL;
-	    return;
-	}
-	*m_pis >> m_v;
-	if (stream_at_eof (*m_pis))
-	    m_pis = NULL;
-    }
-private:
-    Stream*	m_pis;		///< The host stream.
-    T		m_v;		///< Last read value; cached to be returnable as a const reference.
-};
-
-//----------------------------------------------------------------------
-
-/// Sets the current read position to \p newPos
-inline void istream::seek (uoff_t newPos)
-{
-#ifdef WANT_STREAM_BOUNDS_CHECKING
-    if (newPos > size())
-	throw stream_bounds_exception ("seekg", "byte", pos(), newPos - pos(), size());
-#else
-    assert (newPos <= size());
-#endif
-    m_Pos = newPos;
-}
-
-/// Sets the current read position to \p newPos
-inline void istream::iseek (const_iterator newPos)
-{
-    seek (distance (begin(), newPos));
-}
-
-/// Sets the current write position to \p p based on \p d.
-inline void istream::seekg (off_t p, seekdir d)
-{
-    switch (d) {
-	case beg:	seek (p); break;
-	case cur:	seek (pos() + p); break;
-	case ios_base::end:	seek (size() - p); break;
-    }
-}
-
-/// Skips \p nBytes without reading them.
-inline void istream::skip (size_type nBytes)
-{
-    seek (pos() + nBytes);
-}
-
-/// Returns the number of bytes to skip to be aligned on \p grain.
-inline istream::size_type istream::align_size (size_type grain) const
-{
-    return (Align (pos(), grain) - pos());
-}
-
-/// Returns \c true if the read position is aligned on \p grain
-inline bool istream::aligned (size_type grain) const
-{
-    assert (uintptr_t(begin()) % grain == 0 && "Streams should be attached aligned at the maximum element grain to avoid bus errors.");
-    return (pos() % grain == 0);
-}
-
-/// aligns the read position on \p grain
-inline void istream::align (size_type grain)
-{
-    seek (Align (pos(), grain));
-}
-
-/// Reads type T from the stream via a direct pointer cast.
-template <typename T>
-inline void istream::iread (T& v)
-{
-    assert (aligned (alignof (T())));
-#ifdef WANT_STREAM_BOUNDS_CHECKING
-    verify_remaining ("read", typeid(v).name(), sizeof(T));
-#else
-    assert (remaining() >= sizeof(T));
-#endif
-    v = *reinterpret_cast<const T*>(ipos());
-    m_Pos += sizeof(T);
-}
-
-#define ISTREAM_OPERATOR(type)	\
-inline istream&	operator>> (istream& is, type& v)	{ is.iread(v); return (is); }
-
-template <typename T>
-ISTREAM_OPERATOR(T*)
-ISTREAM_OPERATOR(int8_t)
-ISTREAM_OPERATOR(uint8_t)
-ISTREAM_OPERATOR(int16_t)
-ISTREAM_OPERATOR(uint16_t)
-ISTREAM_OPERATOR(int32_t)
-ISTREAM_OPERATOR(uint32_t)
-ISTREAM_OPERATOR(float)
-ISTREAM_OPERATOR(double)
-ISTREAM_OPERATOR(wchar_t)
-#if SIZE_OF_BOOL == SIZE_OF_CHAR
-ISTREAM_OPERATOR(bool)
-#else
-inline istream&	operator>> (istream& is, bool& v)
-{ uint8_t v8; is.iread (v8); v = v8; return (is); }
-#endif
-#if HAVE_THREE_CHAR_TYPES
-ISTREAM_OPERATOR(char)
-#endif
-#if HAVE_INT64_T
-ISTREAM_OPERATOR(int64_t)
-ISTREAM_OPERATOR(uint64_t)
-#endif
-#if SIZE_OF_LONG == SIZE_OF_INT
-ISTREAM_OPERATOR(long)
-ISTREAM_OPERATOR(unsigned long)
-#endif
-#if HAVE_LONG_LONG && (!HAVE_INT64_T || SIZE_OF_LONG_LONG > 8)
-ISTREAM_OPERATOR(long long)
-ISTREAM_OPERATOR(unsigned long long)
-#endif
-
-//----------------------------------------------------------------------
-
-typedef istream_iterator<utf8subchar_t> istream_iterator_for_utf8;
-typedef utf8in_iterator<istream_iterator_for_utf8> utf8istream_iterator;
-
-/// Returns a UTF-8 adaptor reading from \p is.
-inline utf8istream_iterator utf8in (istream& is)
-{
-    istream_iterator_for_utf8 si (is);
-    return (utf8istream_iterator (si));
-}
-
-//----------------------------------------------------------------------
-
-} // namespace ustl
-
-#endif
-
diff --git a/media/libdrm/mobile2/src/util/ustl-1.0/mostream.h b/media/libdrm/mobile2/src/util/ustl-1.0/mostream.h
deleted file mode 100644
index fb04196..0000000
--- a/media/libdrm/mobile2/src/util/ustl-1.0/mostream.h
+++ /dev/null
@@ -1,260 +0,0 @@
-// This file is part of the ustl library, an STL implementation.
-//
-// Copyright (C) 2005 by Mike Sharov <msharov@users.sourceforge.net>
-// This file is free software, distributed under the MIT License.
-//
-// mostream.h
-
-#ifndef MOSTREAM_H_24A8C5397E0848216573E5670930FC9A
-#define MOSTREAM_H_24A8C5397E0848216573E5670930FC9A
-
-#include "memlink.h"
-#include "uassert.h"
-#include "uexception.h"
-#include "utf8.h"
-#include "uios.h"
-#include <typeinfo>
-
-namespace ustl {
-
-class istream;
-class string;
-
-/// \class ostream mostream.h ustl.h
-/// \ingroup BinaryStreams
-///
-/// \brief Helper class to write packed binary streams.
-///
-/// This class contains a set of functions to write integral types into an
-/// unstructured memory block. Packing binary file data can be done this
-/// way, for instance. aligning the data is your responsibility, and can
-/// be accomplished by proper ordering of writes and by calling \ref ostream::align.
-/// Unaligned access is usually slower by orders of magnitude and,
-/// on some architectures, such as PowerPC, can cause your program to crash.
-/// Therefore, all write functions have asserts to check alignment.
-/// See \ref istream documentation for rules on designing your data format.
-/// Overwriting the end of the stream will also cause a crash (an assert in
-/// debug builds). Oh, and don't be intimidated by the size of the inlines
-/// here. In the assembly code the compiler will usually chop everything down
-/// to five instructions each.
-///
-/// Example code:
-/// \code
-///     memblock b;
-///     ostream os (b);
-///     os << boolVar << ios::talign<int>();
-///     os << intVar << floatVar;
-///     os.write (binaryData, binaryDataSize);
-///     os.align();
-///     b.resize (os.pos());
-///	b.write_file ("test.file");
-/// \endcode
-///
-class ostream : public memlink, public ios_base {
-public:
-			ostream (void);
-			ostream (void* p, size_type n);
-    explicit		ostream (const memlink& source);
-    inline iterator	end (void)			{ return (memlink::end()); }
-    inline const_iterator	end (void) const	{ return (memlink::end()); }
-    inline void		seek (uoff_t newPos);
-    inline void		iseek (const_iterator newPos);
-    inline void		skip (size_type nBytes);
-    inline uoff_t	pos (void) const	{ return (m_Pos); }
-    inline iterator	ipos (void)		{ return (begin() + pos()); }
-    inline const_iterator ipos (void) const	{ return (begin() + pos()); }
-    inline size_type	remaining (void) const;
-    inline bool		aligned (size_type grain = c_DefaultAlignment) const;
-    void		verify_remaining (const char* op, const char* type, size_t n) const;
-    inline size_type	align_size (size_type grain = c_DefaultAlignment) const;
-    void		align (size_type grain = c_DefaultAlignment);
-    void		write (const void* buffer, size_type size);
-    inline void		write (const cmemlink& buf);
-    void		write_strz (const char* str);
-    void		read (istream& is);
-    inline void		write (ostream& os) const	{ os.write (begin(), pos()); }
-    void		text_write (ostringstream& os) const;
-    inline size_t	stream_size (void) const	{ return (pos()); }
-    void		insert (iterator start, size_type size);
-    void		erase (iterator start, size_type size);
-    void		swap (ostream& os);
-    template <typename T>
-    inline void		iwrite (const T& v);
-    inline virtual size_type	overflow (size_type = 1){ return (remaining()); }
-    virtual void	unlink (void);
-    inline void		link (void* p, size_type n)	{ memlink::link (p, n); }
-    inline void		link (memlink& l)		{ memlink::link (l.data(), l.writable_size()); }
-    inline void		link (void* f, void* l)		{ memlink::link (f, l); }
-			OVERLOAD_POINTER_AND_SIZE_T_V2(link, void*)
-    inline void		relink (void* p, size_type n)	{ memlink::relink (p, n); m_Pos = 0; }
-    inline void		relink (memlink& l)		{ relink (l.data(), l.writable_size()); }
-    inline void		seekp (off_t p, seekdir d = beg);
-    inline off_t	tellp (void) const		{ return (pos()); }
-protected:
-    inline void		SetPos (uoff_t newPos)		{ m_Pos = newPos; }
-private:
-    uoff_t		m_Pos;	///< Current write position.
-};
-
-//----------------------------------------------------------------------
-
-/// \class ostream_iterator mostream.h ustl.h
-/// \ingroup BinaryStreamIterators
-///
-/// \brief An iterator over an ostream to use with uSTL algorithms.
-///
-template <typename T, typename Stream = ostream>
-class ostream_iterator {
-public:
-    typedef T			value_type;
-    typedef ptrdiff_t		difference_type;
-    typedef value_type*		pointer;
-    typedef value_type&		reference;
-    typedef ostream::size_type	size_type;
-public:
-    inline explicit		ostream_iterator (Stream& os)
-				    : m_Os (os) {}
-    inline			ostream_iterator (const ostream_iterator& iter)
-				    : m_Os (iter.m_Os) {} 
-    /// Writes \p v into the stream.
-    inline ostream_iterator&	operator= (const T& v)
-				    { m_Os << v; return (*this); }
-    inline ostream_iterator&	operator* (void) { return (*this); }
-    inline ostream_iterator&	operator++ (void) { return (*this); }
-    inline ostream_iterator	operator++ (int) { return (*this); }
-    inline ostream_iterator&	operator+= (size_type n) { m_Os.skip (n); return (*this); }
-    inline bool			operator== (const ostream_iterator& i) const
-				    { return (m_Os.pos() == i.m_Os.pos()); }
-    inline bool			operator< (const ostream_iterator& i) const
-				    { return (m_Os.pos() < i.m_Os.pos()); }
-private:
-    Stream&	m_Os;
-};
-
-//----------------------------------------------------------------------
-
-typedef ostream_iterator<utf8subchar_t> ostream_iterator_for_utf8;
-typedef utf8out_iterator<ostream_iterator_for_utf8> utf8ostream_iterator;
-
-/// Returns a UTF-8 adaptor writing to \p os.
-inline utf8ostream_iterator utf8out (ostream& os)
-{
-    ostream_iterator_for_utf8 si (os);
-    return (utf8ostream_iterator (si));
-}
-
-//----------------------------------------------------------------------
-
-/// Move the write pointer to \p newPos
-inline void ostream::seek (uoff_t newPos)
-{
-#ifdef WANT_STREAM_BOUNDS_CHECKING
-    if (newPos > size())
-	throw stream_bounds_exception ("seekp", "byte", pos(), newPos - pos(), size());
-#else
-    assert (newPos <= size());
-#endif
-    SetPos (newPos);
-}
-
-/// Sets the current write position to \p newPos
-inline void ostream::iseek (const_iterator newPos)
-{
-    seek (distance (begin(), const_cast<iterator>(newPos)));
-}
-
-/// Sets the current write position to \p p based on \p d.
-inline void ostream::seekp (off_t p, seekdir d)
-{
-    switch (d) {
-	case beg:	seek (p); break;
-	case cur:	seek (pos() + p); break;
-	case ios_base::end:	seek (size() - p); break;
-    }
-}
-
-/// Skips \p nBytes without writing anything.
-inline void ostream::skip (size_type nBytes)
-{
-    seek (pos() + nBytes);
-}
-
-/// Returns number of bytes remaining in the write buffer.
-inline ostream::size_type ostream::remaining (void) const
-{
-    return (size() - pos());
-}
-
-/// Returns \c true if the write pointer is aligned on \p grain
-inline bool ostream::aligned (size_type grain) const
-{
-    assert (uintptr_t(begin()) % grain == 0 && "Streams should be attached aligned at the maximum element grain to avoid bus errors.");
-    return (pos() % grain == 0);
-}
-
-/// Returns the number of bytes to skip to be aligned on \p grain.
-inline ostream::size_type ostream::align_size (size_type grain) const
-{
-    return (Align (pos(), grain) - pos());
-}
-
-/// Writes the contents of \p buf into the stream as a raw dump.
-inline void ostream::write (const cmemlink& buf)
-{
-    write (buf.begin(), buf.size());
-}
-
-/// Writes type T into the stream via a direct pointer cast.
-template <typename T>
-inline void ostream::iwrite (const T& v)
-{
-    assert (aligned (alignof (v)));
-#ifdef WANT_STREAM_BOUNDS_CHECKING
-    verify_remaining ("write", typeid(v).name(), sizeof(T));
-#else
-    assert (remaining() >= sizeof(T));
-#endif
-    *reinterpret_cast<T*>(ipos()) = v;
-    SetPos (pos() + sizeof(T));
-}
-
-#define OSTREAM_OPERATOR(type)	\
-inline ostream&	operator<< (ostream& os, type v)	{ os.iwrite(v); return (os); }
-
-template <typename T>
-OSTREAM_OPERATOR(T*)
-OSTREAM_OPERATOR(int8_t)
-OSTREAM_OPERATOR(uint8_t)
-OSTREAM_OPERATOR(int16_t)
-OSTREAM_OPERATOR(uint16_t)
-OSTREAM_OPERATOR(int32_t)
-OSTREAM_OPERATOR(uint32_t)
-OSTREAM_OPERATOR(float)
-OSTREAM_OPERATOR(double)
-OSTREAM_OPERATOR(wchar_t)
-#if SIZE_OF_BOOL == SIZE_OF_CHAR
-OSTREAM_OPERATOR(bool)
-#else
-inline ostream&	operator<< (ostream& os, bool v)
-{ os.iwrite (uint8_t(v)); return (os); }
-#endif
-#if HAVE_THREE_CHAR_TYPES
-OSTREAM_OPERATOR(char)
-#endif
-#if HAVE_INT64_T
-OSTREAM_OPERATOR(int64_t)
-OSTREAM_OPERATOR(uint64_t)
-#endif
-#if SIZE_OF_LONG == SIZE_OF_INT
-OSTREAM_OPERATOR(long)
-OSTREAM_OPERATOR(unsigned long)
-#endif
-#if HAVE_LONG_LONG && (!HAVE_INT64_T || SIZE_OF_LONG_LONG > 8)
-OSTREAM_OPERATOR(long long)
-OSTREAM_OPERATOR(unsigned long long)
-#endif
-
-} // namespace ustl
-
-#endif
-
diff --git a/media/libdrm/mobile2/src/util/ustl-1.0/ofstream.cpp b/media/libdrm/mobile2/src/util/ustl-1.0/ofstream.cpp
deleted file mode 100644
index 0948a4d3..0000000
--- a/media/libdrm/mobile2/src/util/ustl-1.0/ofstream.cpp
+++ /dev/null
@@ -1,163 +0,0 @@
-// This file is part of the ustl library, an STL implementation.
-//
-// Copyright (C) 2005 by Mike Sharov <msharov@users.sourceforge.net>
-// This file is free software, distributed under the MIT License.
-//
-// ofstream.cc
-//
-
-#include "ofstream.h"
-#include "ustring.h"
-#include "uexception.h"
-#include <unistd.h>
-#include <errno.h>
-#include <stdio.h>
-#include <stdarg.h>
-
-namespace ustl {
-
-//----------------------------------------------------------------------
-
-ifstream cin  (STDIN_FILENO);
-ofstream cout (STDOUT_FILENO);
-ofstream cerr (STDERR_FILENO);
-
-//----------------------------------------------------------------------
-
-/// Default constructor.
-ofstream::ofstream (void)
-: ostringstream (),
-  m_File ()
-{
-    reserve (255);
-}
-
-/// Constructs a stream for writing to \p Fd.
-ofstream::ofstream (int Fd)
-: ostringstream (),
-  m_File (Fd)
-{
-    clear (m_File.rdstate());
-    reserve (255);
-}
-
-/// Constructs a stream for writing to \p filename.
-ofstream::ofstream (const char* filename, openmode mode)
-: ostringstream (),
-  m_File (filename, mode)
-{
-    clear (m_File.rdstate());
-}
-
-/// Default destructor.
-ofstream::~ofstream (void)
-{
-#if PLATFORM_ANDROID
-    flush();
-#else /* !PLATFORM_ANDROID */
-    try { flush(); } catch (...) {}
-#endif
-}
-
-/// Flushes the buffer to the file.
-void ofstream::flush (void)
-{
-    while (pos() && overflow (remaining()));
-    m_File.sync();
-    clear (m_File.rdstate());
-}
-
-/// Seeks to \p p based on \p d.
-void ofstream::seekp (off_t p, seekdir d)
-{
-    flush();
-    m_File.seekp (p, d);
-    clear (m_File.rdstate());
-}
-
-/// Called when more buffer space (\p n bytes) is needed.
-ofstream::size_type ofstream::overflow (size_type n)
-{
-    if (eof() || (n > remaining() && n < capacity() - pos()))
-	return (ostringstream::overflow (n));
-    size_type bw = m_File.write (cdata(), pos());
-    clear (m_File.rdstate());
-    erase (begin(), bw);
-    if (remaining() < n)
-	ostringstream::overflow (n);
-    return (remaining());
-}
-
-//----------------------------------------------------------------------
-
-/// Constructs a stream to read from \p Fd.
-ifstream::ifstream (int Fd)
-: istringstream (),
-  m_Buffer (255),
-  m_File (Fd)
-{
-    link (m_Buffer.data(), 0U);
-}
-
-/// Constructs a stream to read from \p filename.
-ifstream::ifstream (const char* filename, openmode mode)
-: istringstream (),
-  m_Buffer (255),
-  m_File (filename, mode)
-{
-    clear (m_File.rdstate());
-    link (m_Buffer.data(), 0U);
-}
-
-/// Reads at least \p n more bytes and returns available bytes.
-ifstream::size_type ifstream::underflow (size_type n)
-{
-    if (eof())
-	return (istringstream::underflow (n));
-
-    const ssize_t freeSpace = m_Buffer.size() - pos();
-    const ssize_t neededFreeSpace = max (n, m_Buffer.size() / 2);
-    const size_t oughtToErase = Align (max (0, neededFreeSpace - freeSpace));
-    const size_t nToErase = min (pos(), oughtToErase);
-    m_Buffer.memlink::erase (m_Buffer.begin(), nToErase);
-    const uoff_t oldPos (pos() - nToErase);
-
-    size_type br = oldPos;
-    if (m_Buffer.size() - br < n) {
-	m_Buffer.resize (br + neededFreeSpace);
-	link (m_Buffer.data(), 0U);
-    }
-    cout.flush();
-
-    while (br - oldPos < n && m_File.good())
-	br += m_File.readsome (m_Buffer.begin() + br, m_Buffer.size() - br);
-    clear (m_File.rdstate());
-
-    m_Buffer[br] = string::c_Terminator;
-    link (m_Buffer.data(), br);
-    seek (oldPos);
-    return (remaining());
-}
-
-/// Flushes the input.
-void ifstream::sync (void)
-{
-    istringstream::sync();
-    underflow (0U);
-    m_File.sync();
-    clear (m_File.rdstate());
-}
-
-/// Seeks to \p p based on \p d.
-void ifstream::seekg (off_t p, seekdir d)
-{
-    m_Buffer.clear();
-    link (m_Buffer);
-    m_File.seekg (p, d);
-    clear (m_File.rdstate());
-}
-
-//----------------------------------------------------------------------
-
-} // namespace ustl
-
diff --git a/media/libdrm/mobile2/src/util/ustl-1.0/ofstream.h b/media/libdrm/mobile2/src/util/ustl-1.0/ofstream.h
deleted file mode 100644
index 7780833..0000000
--- a/media/libdrm/mobile2/src/util/ustl-1.0/ofstream.h
+++ /dev/null
@@ -1,82 +0,0 @@
-// This file is part of the ustl library, an STL implementation.
-//
-// Copyright (C) 2005 by Mike Sharov <msharov@users.sourceforge.net>
-// This file is free software, distributed under the MIT License.
-//
-// ofstream.h
-//
-
-#ifndef FDOSTREAM_H_5E27FC3D530BF3CA04D6C73F5700EECC
-#define FDOSTREAM_H_5E27FC3D530BF3CA04D6C73F5700EECC
-
-#include "sistream.h"
-#include "sostream.h"
-#include "fstream.h"
-
-namespace ustl {
-
-/// \class ofstream fdostream.h ustl.h
-/// \ingroup DeviceStreams
-/// \brief A string stream that writes to an fd. Implements cout and cerr.
-class ofstream : public ostringstream {
-public:
-			ofstream (void);
-    explicit		ofstream (int Fd);
-    explicit		ofstream (const char* filename, openmode mode = out);
-    virtual	       ~ofstream (void);
-    inline void		open (const char* filename, openmode mode = out) { m_File.open (filename, mode); clear (m_File.rdstate()); }
-    inline void		close (void)		{ m_File.close(); clear (m_File.rdstate()); }
-    inline bool		is_open (void) const	{ return (m_File.is_open()); }
-    inline iostate	exceptions (iostate v)	{ ostringstream::exceptions(v); return (m_File.exceptions(v)); }
-    inline void		setstate (iostate v)	{ ostringstream::setstate(v); m_File.setstate(v); }
-    inline void		clear (iostate v = goodbit)	{ ostringstream::clear(v); m_File.clear(v); }
-    inline off_t	tellp (void) const		{ return (m_File.tellp() + ostringstream::tellp()); }
-    inline int		fd (void) const			{ return (m_File.fd()); }
-    inline void		stat (struct stat& rs) const	{ m_File.stat (rs); }
-    inline void		set_nonblock (bool v = true)	{ m_File.set_nonblock (v); }
-    inline int		ioctl (const char* rname, int request, long argument = 0)	{ return (m_File.ioctl (rname, request, argument)); }
-    inline int		ioctl (const char* rname, int request, int argument)		{ return (m_File.ioctl (rname, request, argument)); }
-    inline int		ioctl (const char* rname, int request, void* argument)		{ return (m_File.ioctl (rname, request, argument)); }
-    void		seekp (off_t p, seekdir d = beg);
-    void		flush (void);
-    virtual size_type	overflow (size_type n = 1);
-private:
-    fstream		m_File;
-};
-
-/// \class ifstream fdostream.h ustl.h
-/// \ingroup DeviceStreams
-/// \brief A string stream that reads from an fd. Implements cin.
-class ifstream : public istringstream {
-public:
-			ifstream (void);
-    explicit		ifstream (int Fd);
-    explicit		ifstream (const char* filename, openmode mode = in);
-    inline void		open (const char* filename, openmode mode = in)	{ m_File.open (filename, mode); clear (m_File.rdstate()); }
-    inline void		close (void)		{ m_File.close(); clear (m_File.rdstate()); }
-    inline bool		is_open (void) const	{ return (m_File.is_open()); }
-    inline iostate	exceptions (iostate v)	{ istringstream::exceptions(v); return (m_File.exceptions(v)); }
-    inline void		setstate (iostate v)	{ istringstream::setstate(v); m_File.setstate(v); }
-    inline void		clear (iostate v = goodbit)	{ istringstream::clear(v); m_File.clear(v); }
-    inline off_t	tellg (void) const		{ return (m_File.tellg() - remaining()); }
-    inline int		fd (void) const			{ return (m_File.fd()); }
-    inline void		stat (struct stat& rs) const	{ m_File.stat (rs); }
-    inline void		set_nonblock (bool v = true)	{ m_File.set_nonblock (v); }
-    inline int		ioctl (const char* rname, int request, long argument = 0)	{ return (m_File.ioctl (rname, request, argument)); }
-    inline int		ioctl (const char* rname, int request, int argument)		{ return (m_File.ioctl (rname, request, argument)); }
-    inline int		ioctl (const char* rname, int request, void* argument)		{ return (m_File.ioctl (rname, request, argument)); }
-    void		seekg (off_t p, seekdir d = beg);
-    void		sync (void);
-    virtual size_type	underflow (size_type n = 1);
-private:
-    string		m_Buffer;
-    fstream		m_File;
-};
-
-extern ofstream cout, cerr;
-extern ifstream cin;
-
-} // namespace ustl
-
-#endif
-
diff --git a/media/libdrm/mobile2/src/util/ustl-1.0/simd.h b/media/libdrm/mobile2/src/util/ustl-1.0/simd.h
deleted file mode 100644
index 950efc2..0000000
--- a/media/libdrm/mobile2/src/util/ustl-1.0/simd.h
+++ /dev/null
@@ -1,465 +0,0 @@
-// This file is part of the ustl library, an STL implementation.
-//
-// Copyright (C) 2005 by Mike Sharov <msharov@users.sourceforge.net>
-// This file is free software, distributed under the MIT License.
-//
-/// \file simd.h
-/// \brief SIMD-type algorithms, with hardware acceleration, if available.
-///
-/// All algorithms are container-based because iterator syntax is just too
-/// damn verbose and because the specializations need to be able to tell
-/// how many elements are in the container in order to choose proper SIMD
-/// instruction set (i.e.: 4 floats select SSE, while 2 floats select 3dNow!)
-/// Specializations are only for the tuple template because the container
-/// must be of a fixed and compile-time-known size for the compiler to be
-/// able to choose the specialization.
-///
-
-#ifndef SIMD_H_39BE2D970DF4BD00508CCFFB482496F9
-#define SIMD_H_39BE2D970DF4BD00508CCFFB482496F9
-
-#include "uassert.h"
-#include "ulimits.h"
-#if HAVE_MATH_H
-    #include <math.h>
-#endif
-
-#if PLATFORM_ANDROID
-#include <stdio.h>
-#undef CPU_HAS_MMX
-#endif
-
-namespace ustl {
-namespace simd {
-
-//----------------------------------------------------------------------
-// Generic algorithms
-//----------------------------------------------------------------------
-
-/// Applies \p op to each element in \p op1.
-template <typename Ctr, typename UnaryOperation>
-inline void packop (Ctr& op1, UnaryOperation op)
-{
-    foreach (typename Ctr::iterator, i, op1)
-	op (*i);
-}
-
-/// Applies \p op to each element in \p op1 and \p op2 and stores in \p op2.
-template <typename Ctr, typename BinaryOperation>
-inline void packop (const Ctr& op1, Ctr& op2, BinaryOperation op)
-{
-    assert (op2.size() <= op1.size());
-    typename Ctr::const_iterator i1 (op1.begin());
-    typename Ctr::iterator i2 (op2.begin());
-    for (; i2 != op2.end(); ++i1, ++i2)
-	*i2 = op (*i2, *i1);
-}
-
-/// Applies \p op to corresponding elements in \p op1 and \p op2 and stores in \p result.
-template <typename Ctr, typename BinaryOperation>
-inline void packop (const Ctr& op1, const Ctr& op2, Ctr& result, BinaryOperation op)
-{
-    assert (op1.size() <= op2.size() && op1.size() <= result.size());
-    passign (op1, result);
-    packop (op2, result);
-}
-
-/// Copies \p op1 into \p result.
-template <typename Ctr>
-inline void passign (const Ctr& op1, Ctr& result)
-{
-    assert (op1.size() <= result.size());
-    typename Ctr::iterator d (result.begin());
-    foreach (typename Ctr::const_iterator, s, op1)
-	*d++ = *s;
-}
-
-/// Copies \p result.size() elements from \p op1 to \p result.
-template <typename Ctr>
-inline void ipassign (typename Ctr::const_iterator op1, Ctr& result)
-{
-    foreach (typename Ctr::iterator, d, result)
-	*d = *op1++;
-}
-
-template <typename Ctr1, typename Ctr2, typename ConvertFunction>
-inline void pconvert (const Ctr1& op1, Ctr2& op2, ConvertFunction f)
-{
-    assert (op1.size() <= op2.size());
-    typename Ctr1::const_iterator i1 (op1.begin());
-    typename Ctr2::iterator i2 (op2.begin());
-    for (; i1 != op1.end(); ++i1, ++i2)
-	*i2 = f (*i1);
-}
-
-// Functionoids for SIMD operations, like saturation arithmetic, shifts, etc.
-STD_BINARY_FUNCTOR (fpadds, T, ((b > numeric_limits<T>::max() - a) ? numeric_limits<T>::max() : a + b))
-STD_BINARY_FUNCTOR (fpsubs, T, ((a < numeric_limits<T>::min() + b) ? numeric_limits<T>::min() : a - b))
-STD_BINARY_FUNCTOR (fpshl,  T, (a << b))
-STD_BINARY_FUNCTOR (fpshr,  T, (a >> b))
-STD_BINARY_FUNCTOR (fpmin,  T, (min (a, b)))
-STD_BINARY_FUNCTOR (fpmax,  T, (max (a, b)))
-STD_BINARY_FUNCTOR (fpavg,  T, ((a + b + 1) / 2))
-STD_CONVERSION_FUNCTOR (fcast, (D(a)))
-#if HAVE_MATH_H
-STD_UNARY_FUNCTOR (fpreciprocal,T, (1 / a))
-STD_UNARY_FUNCTOR (fpsqrt,	T, (reset_mmx(), T (sqrt (a))))
-STD_UNARY_FUNCTOR (fprecipsqrt,	T, (reset_mmx(), 1 / T(sqrt (a))))
-STD_UNARY_FUNCTOR (fsin,	T, (reset_mmx(), T (sin (a))))
-STD_UNARY_FUNCTOR (fcos,	T, (reset_mmx(), T (cos (a))))
-STD_UNARY_FUNCTOR (ftan,	T, (reset_mmx(), T (tan (a))))
-#if HAVE_RINTF
-STD_CONVERSION_FUNCTOR (fround, (reset_mmx(), D(rintf(a))))
-#else
-STD_CONVERSION_FUNCTOR (fround, (reset_mmx(), D(rint(a))))
-#endif
-template <> inline int32_t fround<double,int32_t>::operator()(const double& a) const { reset_mmx(); return (int32_t(rint(a))); }
-#endif
-template <> inline float fpavg<float>::operator()(const float& a, const float& b) const { return ((a + b) / 2); }
-template <> inline double fpavg<double>::operator()(const double& a, const double& b) const { return ((a + b) / 2); }
-
-#define SIMD_PACKEDOP1(name, operation)		\
-template <typename Ctr>				\
-inline void name (Ctr& op1)			\
-{						\
-    typedef typename Ctr::value_type value_t;	\
-    packop (op1, operation<value_t>());		\
-}
-#define SIMD_PACKEDOP2(name, operation)		\
-template <typename Ctr>				\
-inline void name (const Ctr& op1, Ctr& op2)	\
-{						\
-    typedef typename Ctr::value_type value_t;	\
-    packop (op1, op2, operation<value_t>());	\
-}
-#define SIMD_PACKEDOP3(name, operation)			\
-template <typename Ctr>					\
-inline void name (const Ctr& op1, const Ctr& op2, Ctr& result)	\
-{							\
-    typedef typename Ctr::value_type value_t;		\
-    packop (op1, op2, result, operation<value_t>());	\
-}
-#define SIMD_SINGLEOP1(name, operation)		\
-template <typename T>				\
-inline T name (T op)				\
-{						\
-    operation<T> obj;				\
-    return (obj(op));				\
-}
-#define SIMD_CONVERTOP(name, operation)		\
-template <typename Ctr1, typename Ctr2>		\
-inline void name (const Ctr1& op1, Ctr2& op2)	\
-{						\
-    typedef typename Ctr1::value_type value1_t;	\
-    typedef typename Ctr2::value_type value2_t;	\
-    pconvert (op1, op2, operation<value1_t, value2_t>());\
-}
-
-SIMD_PACKEDOP2 (padd, plus)
-SIMD_PACKEDOP2 (psub, minus)
-SIMD_PACKEDOP2 (pmul, multiplies)
-SIMD_PACKEDOP2 (pdiv, divides)
-SIMD_PACKEDOP2 (pand, bitwise_and)
-SIMD_PACKEDOP2 (por, bitwise_or)
-SIMD_PACKEDOP2 (pxor, bitwise_xor)
-SIMD_PACKEDOP2 (pshl, fpshl)
-SIMD_PACKEDOP2 (pshr, fpshr)
-SIMD_PACKEDOP2 (psubs, fpsubs)
-SIMD_PACKEDOP2 (pmin, fpmin)
-SIMD_PACKEDOP2 (pmax, fpmax)
-SIMD_PACKEDOP2 (pavg, fpavg)
-
-SIMD_PACKEDOP3 (padd, plus)
-SIMD_PACKEDOP3 (psub, minus)
-SIMD_PACKEDOP3 (pmul, multiplies)
-SIMD_PACKEDOP3 (pdiv, divides)
-SIMD_PACKEDOP3 (pand, bitwise_and)
-SIMD_PACKEDOP3 (por, bitwise_or)
-SIMD_PACKEDOP3 (pxor, bitwise_xor)
-SIMD_PACKEDOP3 (pshl, fpshl)
-SIMD_PACKEDOP3 (pshr, fpshr)
-SIMD_PACKEDOP3 (padds, fpadds)
-SIMD_PACKEDOP3 (psubs, fpsubs)
-SIMD_PACKEDOP3 (pmin, fpmin)
-SIMD_PACKEDOP3 (pmax, fpmax)
-SIMD_PACKEDOP3 (pavg, fpavg)
-
-#if HAVE_MATH_H
-SIMD_PACKEDOP1 (precip, fpreciprocal)
-SIMD_PACKEDOP1 (psqrt, fpsqrt)
-SIMD_PACKEDOP1 (precipsqrt, fprecipsqrt)
-SIMD_PACKEDOP1 (psin, fsin)
-SIMD_PACKEDOP1 (pcos, fcos)
-SIMD_PACKEDOP1 (ptan, ftan)
-
-SIMD_SINGLEOP1 (srecip, fpreciprocal)
-SIMD_SINGLEOP1 (ssqrt, fpsqrt)
-SIMD_SINGLEOP1 (srecipsqrt, fprecipsqrt)
-SIMD_SINGLEOP1 (ssin, fsin)
-SIMD_SINGLEOP1 (scos, fcos)
-SIMD_SINGLEOP1 (stan, ftan)
-
-SIMD_CONVERTOP (pround, fround)
-
-template <typename T> inline int32_t sround (T op) { fround<T,int32_t> obj; return (obj (op)); }
-#endif
-
-#undef SIMD_SINGLEOP1
-#undef SIMD_PACKEDOP3
-#undef SIMD_PACKEDOP2
-#undef SIMD_PACKEDOP1
-
-//----------------------------------------------------------------------
-// Vector types to cast tuple data to
-//----------------------------------------------------------------------
-
-#if HAVE_VECTOR_EXTENSIONS && __GNUC__ >= 4
-#define VECTOR_ATTRIBUTE(mode,vs)	__attribute__((vector_size(vs)))
-#else
-#define VECTOR_ATTRIBUTE(mode,vs)
-#endif
-typedef uint8_t v8qi_t VECTOR_ATTRIBUTE (V8QI,8);
-typedef uint16_t v4hi_t VECTOR_ATTRIBUTE (V4HI,8);
-typedef uint16_t v8hi_t VECTOR_ATTRIBUTE (V8HI,16);
-typedef uint32_t v2si_t VECTOR_ATTRIBUTE (V2SI,8);
-typedef uint32_t v4si_t VECTOR_ATTRIBUTE (V4SI,16);
-#if HAVE_INT64_T
-typedef uint64_t v1di_t VECTOR_ATTRIBUTE (V1DI,8);
-#endif
-typedef float v2sf_t VECTOR_ATTRIBUTE (V2SF,8);
-typedef float v4sf_t VECTOR_ATTRIBUTE (V4SF,16);
-typedef double v2df_t VECTOR_ATTRIBUTE (V2DF,16);
-#undef VECTOR_ATTRIBUTE
-
-//----------------------------------------------------------------------
-// Hardware accelerated specializations
-//----------------------------------------------------------------------
-
-#define SIMD_PKOP2_SPEC(n, type, optype)	\
-template <>					\
-inline void packop (const tuple<n,type>& oin, tuple<n,type>& oout, optype<type>)
-#define SIMD_PASSIGN_SPEC(n, type)		\
-template <>					\
-inline void passign (const tuple<n,type>& oin, tuple<n,type>& oout)
-#define SIMD_IPASSIGN_SPEC(n, type)		\
-template <>					\
-inline void ipassign (tuple<n,type>::const_iterator oin, tuple<n,type>& oout)
-#define SIMD_CONVERT_SPEC(n, type1, type2, optype)	\
-template <>					\
-inline void pconvert (const tuple<n,type1>& oin, tuple<n,type2>& oout, optype<type1,type2>)
-
-#if CPU_HAS_MMX
-#define STD_MMX_ARGS	"=m"(oout[0]) : "m"(oin[0]) : "mm0", "st", "memory"
-#define DBL_MMX_ARGS	"=m"(oout[0]), "=m"(oout[2]) : "m"(oin[0]), "m"(oin[2]) : "mm0", "mm1", "st", "st(1)", "memory"
-#define MMX_PKOP2_SPEC(n,type,optype,instruction)	\
-SIMD_PKOP2_SPEC(n,type,optype)		\
-{ asm ("movq %0, %%mm0\n\t" #instruction " %1, %%mm0\n\tmovq %%mm0, %0" : STD_MMX_ARGS); reset_mmx(); }
-#define MMX_DBL_PKOP2_SPEC(n,type,optype,instruction)	\
-SIMD_PKOP2_SPEC(n,type,optype)		\
-{ asm ("movq %0, %%mm0\n\tmovq %1, %%mm1\n\t" #instruction " %2, %%mm0\n\t" #instruction " %3, %%mm1\n\tmovq %%mm0, %0\n\tmovq %%mm1, %1" : DBL_MMX_ARGS); reset_mmx(); }
-#define MMX_PASSIGN_SPEC(n,type)	\
-SIMD_PASSIGN_SPEC(n,type)		\
-{ asm ("movq %1, %%mm0\n\tmovq %%mm0, %0" : STD_MMX_ARGS); reset_mmx(); }
-#define MMX_DBL_PASSIGN_SPEC(n,type)	\
-SIMD_PASSIGN_SPEC(n,type)		\
-{ asm ("movq %2, %%mm0\n\tmovq %3, %%mm1\n\tmovq %%mm0, %0\n\tmovq %%mm1, %1" : DBL_MMX_ARGS); reset_mmx(); }
-#define MMX_IPASSIGN_SPEC(n,type)	\
-SIMD_IPASSIGN_SPEC(n,type)		\
-{ asm ("movq %1, %%mm0\n\tmovq %%mm0, %0" : STD_MMX_ARGS); reset_mmx(); }
-#define MMX_DBL_IPASSIGN_SPEC(n,type)	\
-SIMD_IPASSIGN_SPEC(n,type)		\
-{ asm ("movq %2, %%mm0\n\tmovq %3, %%mm1\n\tmovq %%mm0, %0\n\tmovq %%mm1, %1" : DBL_MMX_ARGS); reset_mmx(); }
-
-MMX_PASSIGN_SPEC(8,uint8_t)
-MMX_PKOP2_SPEC(8,uint8_t,plus,paddb)
-MMX_PKOP2_SPEC(8,uint8_t,minus,psubb)
-MMX_PKOP2_SPEC(8,uint8_t,bitwise_and,pand)
-MMX_PKOP2_SPEC(8,uint8_t,bitwise_or,por)
-MMX_PKOP2_SPEC(8,uint8_t,bitwise_xor,pxor)
-MMX_PKOP2_SPEC(8,uint8_t,fpadds,paddusb)
-MMX_PKOP2_SPEC(8,uint8_t,fpsubs,psubusb)
-
-MMX_PASSIGN_SPEC(8,int8_t)
-MMX_PKOP2_SPEC(8,int8_t,plus,paddb)
-MMX_PKOP2_SPEC(8,int8_t,minus,psubb)
-MMX_PKOP2_SPEC(8,int8_t,bitwise_and,pand)
-MMX_PKOP2_SPEC(8,int8_t,bitwise_or,por)
-MMX_PKOP2_SPEC(8,int8_t,bitwise_xor,pxor)
-MMX_PKOP2_SPEC(8,int8_t,fpadds,paddsb)
-MMX_PKOP2_SPEC(8,int8_t,fpsubs,psubsb)
-
-MMX_PASSIGN_SPEC(4,uint16_t)
-MMX_PKOP2_SPEC(4,uint16_t,plus,paddw)
-MMX_PKOP2_SPEC(4,uint16_t,minus,psubw)
-MMX_PKOP2_SPEC(4,uint16_t,bitwise_and,pand)
-MMX_PKOP2_SPEC(4,uint16_t,bitwise_or,por)
-MMX_PKOP2_SPEC(4,uint16_t,bitwise_xor,pxor)
-/// \todo psllw does not work like other operations, it uses the first element for shift count.
-//MMX_PKOP2_SPEC(4,uint16_t,fpshl,psllw)
-//MMX_PKOP2_SPEC(4,uint16_t,fpshr,psrlw)
-MMX_PKOP2_SPEC(4,uint16_t,fpadds,paddusw)
-MMX_PKOP2_SPEC(4,uint16_t,fpsubs,psubusw)
-
-MMX_PASSIGN_SPEC(4,int16_t)
-MMX_PKOP2_SPEC(4,int16_t,plus,paddw)
-MMX_PKOP2_SPEC(4,int16_t,minus,psubw)
-MMX_PKOP2_SPEC(4,int16_t,bitwise_and,pand)
-MMX_PKOP2_SPEC(4,int16_t,bitwise_or,por)
-MMX_PKOP2_SPEC(4,int16_t,bitwise_xor,pxor)
-//MMX_PKOP2_SPEC(4,int16_t,fpshl,psllw)
-//MMX_PKOP2_SPEC(4,int16_t,fpshr,psrlw)
-MMX_PKOP2_SPEC(4,int16_t,fpadds,paddsw)
-MMX_PKOP2_SPEC(4,int16_t,fpsubs,psubsw)
-
-MMX_PASSIGN_SPEC(2,uint32_t)
-MMX_PKOP2_SPEC(2,uint32_t,plus,paddd)
-MMX_PKOP2_SPEC(2,uint32_t,minus,psubd)
-MMX_PKOP2_SPEC(2,uint32_t,bitwise_and,pand)
-MMX_PKOP2_SPEC(2,uint32_t,bitwise_or,por)
-MMX_PKOP2_SPEC(2,uint32_t,bitwise_xor,pxor)
-//MMX_PKOP2_SPEC(2,uint32_t,fpshl,pslld)
-//MMX_PKOP2_SPEC(2,uint32_t,fpshr,psrld)
-
-MMX_PASSIGN_SPEC(2,int32_t)
-MMX_PKOP2_SPEC(2,int32_t,plus,paddd)
-MMX_PKOP2_SPEC(2,int32_t,minus,psubd)
-MMX_PKOP2_SPEC(2,int32_t,bitwise_and,pand)
-MMX_PKOP2_SPEC(2,int32_t,bitwise_or,por)
-MMX_PKOP2_SPEC(2,int32_t,bitwise_xor,pxor)
-//MMX_PKOP2_SPEC(2,int32_t,fpshl,pslld)
-//MMX_PKOP2_SPEC(2,int32_t,fpshr,psrld)
-
-MMX_DBL_PKOP2_SPEC(4,uint32_t,plus,paddd)
-MMX_DBL_PKOP2_SPEC(4,uint32_t,minus,psubd)
-MMX_DBL_PKOP2_SPEC(4,uint32_t,bitwise_and,pand)
-MMX_DBL_PKOP2_SPEC(4,uint32_t,bitwise_or,por)
-MMX_DBL_PKOP2_SPEC(4,uint32_t,bitwise_xor,pxor)
-//MMX_DBL_PKOP2_SPEC(2,uint32_t,fpshl,pslld)
-//MMX_DBL_PKOP2_SPEC(2,uint32_t,fpshr,psrld)
-
-MMX_DBL_PKOP2_SPEC(4,int32_t,plus,paddd)
-MMX_DBL_PKOP2_SPEC(4,int32_t,minus,psubd)
-MMX_DBL_PKOP2_SPEC(4,int32_t,bitwise_and,pand)
-MMX_DBL_PKOP2_SPEC(4,int32_t,bitwise_or,por)
-MMX_DBL_PKOP2_SPEC(4,int32_t,bitwise_xor,pxor)
-//MMX_DBL_PKOP2_SPEC(2,int32_t,fpshl,pslld)
-//MMX_DBL_PKOP2_SPEC(2,int32_t,fpshr,psrld)
-
-#if CPU_HAS_SSE || CPU_HAS_3DNOW
-MMX_PKOP2_SPEC(8,uint8_t,fpavg,pavgb)
-MMX_PKOP2_SPEC(8,int8_t,fpavg,pavgb)
-MMX_PKOP2_SPEC(4,uint16_t,fpavg,pavgw)
-MMX_PKOP2_SPEC(4,int16_t,fpavg,pavgw)
-MMX_PKOP2_SPEC(8,uint8_t,fpmin,pminub)
-MMX_PKOP2_SPEC(8,uint8_t,fpmax,pmaxub)
-MMX_PKOP2_SPEC(4,int16_t,fpmax,pmaxsw)
-MMX_PKOP2_SPEC(4,int16_t,fpmin,pminsw)
-#endif // CPU_HAS_SSE || CPU_HAS_3DNOW
-
-#if CPU_HAS_3DNOW
-MMX_PASSIGN_SPEC(2,float)
-MMX_PKOP2_SPEC(2,float,plus,pfadd)
-MMX_PKOP2_SPEC(2,float,minus,pfsub)
-MMX_PKOP2_SPEC(2,float,multiplies,pfmul)
-MMX_PKOP2_SPEC(2,float,fpmin,pfmin)
-MMX_PKOP2_SPEC(2,float,fpmax,pfmax)
-#ifndef CPU_HAS_SSE
-MMX_DBL_PKOP2_SPEC(4,float,plus,pfadd)
-MMX_DBL_PKOP2_SPEC(4,float,minus,pfsub)
-MMX_DBL_PKOP2_SPEC(4,float,multiplies,pfmul)
-MMX_DBL_PKOP2_SPEC(4,float,fpmin,pfmin)
-MMX_DBL_PKOP2_SPEC(4,float,fpmax,pfmax)
-#endif
-#endif // CPU_HAS_3DNOW
-
-MMX_IPASSIGN_SPEC(8,uint8_t)
-MMX_IPASSIGN_SPEC(4,uint16_t)
-MMX_IPASSIGN_SPEC(2,uint32_t)
-MMX_IPASSIGN_SPEC(2,float)
-
-#ifndef CPU_HAS_SSE
-MMX_DBL_PASSIGN_SPEC(4,float)
-MMX_DBL_PASSIGN_SPEC(4,uint32_t)
-MMX_DBL_PASSIGN_SPEC(4,int32_t)
-MMX_DBL_IPASSIGN_SPEC(4,float)
-MMX_DBL_IPASSIGN_SPEC(4,uint32_t)
-MMX_DBL_IPASSIGN_SPEC(4,int32_t)
-#endif
-
-#undef MMX_IPASSIGN_SPEC
-#undef MMX_PASSIGN_SPEC
-#undef MMX_PKOP2_SPEC
-#undef STD_MMX_ARGS
-#endif // CPU_HAS_MMX
-
-#if CPU_HAS_SSE
-#define STD_SSE_ARGS	"=m"(oout[0]) : "m"(oin[0]) : "xmm0", "memory"
-#define SSE_PKOP2_SPEC(n,type,optype,instruction)	\
-SIMD_PKOP2_SPEC(n,type,optype)		\
-{ asm ("movups %0, %%xmm0\n\tmovups %1, %%xmm1\n\t" #instruction " %%xmm1, %%xmm0\n\tmovups %%xmm0, %0" : STD_SSE_ARGS);}
-#define SSE_PASSIGN_SPEC(n,type)			\
-SIMD_PASSIGN_SPEC(n,type)		\
-{ asm ("movups %1, %%xmm0\n\tmovups %%xmm0, %0" : STD_SSE_ARGS);}
-#define SSE_IPASSIGN_SPEC(n,type)	\
-SIMD_IPASSIGN_SPEC(n,type)		\
-{ asm ("movups %1, %%xmm0\n\tmovups %%xmm0, %0" : STD_SSE_ARGS);}
-SSE_PASSIGN_SPEC(4,float)
-SSE_PASSIGN_SPEC(4,int32_t)
-SSE_PASSIGN_SPEC(4,uint32_t)
-SSE_PKOP2_SPEC(4,float,plus,addps)
-SSE_PKOP2_SPEC(4,float,minus,subps)
-SSE_PKOP2_SPEC(4,float,multiplies,mulps)
-SSE_PKOP2_SPEC(4,float,divides,divps)
-SSE_PKOP2_SPEC(4,float,bitwise_and,andps)
-SSE_PKOP2_SPEC(4,float,bitwise_or,orps)
-SSE_PKOP2_SPEC(4,float,bitwise_xor,xorps)
-SSE_PKOP2_SPEC(4,float,fpmax,maxps)
-SSE_PKOP2_SPEC(4,float,fpmin,minps)
-
-SIMD_CONVERT_SPEC(4,float,int32_t,fround) {
-    asm ("cvtps2pi %2, %%mm0\n\t"
-	 "cvtps2pi %3, %%mm1\n\t"
-	 "movq %%mm0, %0\n\t"
-	 "movq %%mm1, %1"
-	 : DBL_MMX_ARGS);
-    reset_mmx();
-}
-SIMD_CONVERT_SPEC(4,int32_t,float,fround) {
-    asm ("cvtpi2ps %2, %%xmm0\n\t"
-	 "shufps $0x4E,%%xmm0,%%xmm0\n\t"
-	 "cvtpi2ps %1, %%xmm0\n\t"
-	 "movups %%xmm0, %0"
-	 : "=m"(oout[0]) : "m"(oin[0]), "m"(oin[2]) : "xmm0", "memory");
-}
-template <> inline int32_t fround<float,int32_t>::operator()(const float& a) const {
-    register int32_t rv;
-    asm ("movss %1, %%xmm0\n\t"
-	 "cvtss2si %%xmm0, %0"
-	 : "=r"(rv) : "m"(a) : "xmm0" );
-    return (rv);
-}
-template <> inline uint32_t fround<float,uint32_t>::operator()(const float& a) const {
-    register uint32_t rv;
-    asm ("movss %1, %%xmm0\n\t"
-	 "cvtss2si %%xmm0, %0"
-	 : "=r"(rv) : "m"(a) : "xmm0" );
-    return (rv);
-}
-
-SSE_IPASSIGN_SPEC(4,float)
-SSE_IPASSIGN_SPEC(4,int32_t)
-SSE_IPASSIGN_SPEC(4,uint32_t)
-
-#undef SSE_IPASSIGN_SPEC
-#undef SSE_PASSIGN_SPEC
-#undef SSE_PKOP2_SPEC
-#undef STD_SSE_ARGS
-#endif // CPU_HAS_SSE
-
-#undef SIMD_PACKEDOP_SPEC
-
-} // namespace simd
-} // namespace ustl
-
-#endif
-
diff --git a/media/libdrm/mobile2/src/util/ustl-1.0/sistream.cpp b/media/libdrm/mobile2/src/util/ustl-1.0/sistream.cpp
deleted file mode 100644
index 8a20ddf..0000000
--- a/media/libdrm/mobile2/src/util/ustl-1.0/sistream.cpp
+++ /dev/null
@@ -1,237 +0,0 @@
-// This file is part of the ustl library, an STL implementation.
-//
-// Copyright (C) 2005 by Mike Sharov <msharov@users.sourceforge.net>
-// This file is free software, distributed under the MIT License.
-//
-// sistream.cc
-//
-
-#include "sistream.h"
-#include "sostream.h"
-#include "uassert.h"
-#include "ustring.h"
-
-namespace ustl {
-
-const char ios_base::c_DefaultDelimiters [istringstream::c_MaxDelimiters] = " \t\n\r;:,.?";
-
-/// Default constructor.
-istringstream::istringstream (void)
-: istream (),
-  m_Base (0)
-{
-    set_delimiters (c_DefaultDelimiters);
-}
-
-istringstream::istringstream (const void* p, size_type n)
-: istream (),
-  m_Base (0)
-{
-    link (p, n);
-    set_delimiters (c_DefaultDelimiters);
-}
-
-istringstream::istringstream (const cmemlink& source)
-: istream (),
-  m_Base (0)
-{
-    link (source);
-    set_delimiters (c_DefaultDelimiters);
-}
-
-/// Sets delimiters to the contents of \p delimiters.
-void istringstream::set_delimiters (const char* delimiters)
-{
-    fill (VectorRange (m_Delimiters), '\0');
-    strncpy (m_Delimiters, delimiters, VectorSize(m_Delimiters)-1);
-}
-
-inline bool istringstream::is_delimiter (char c) const
-{
-    return (memchr (m_Delimiters, c, VectorSize(m_Delimiters)-1));
-}
-
-char istringstream::skip_delimiters (void)
-{
-    char c = m_Delimiters[0];
-    while (is_delimiter(c) && (remaining() || underflow()))
-	istream::iread (c);
-    return (c);
-}
-
-void istringstream::iread (int8_t& v)
-{
-    v = skip_delimiters();
-}
-
-typedef istringstream::iterator issiter_t;
-template <typename T>
-inline void str_to_num (issiter_t i, issiter_t* iend, uint8_t base, T& v)
-    { v = strtol (i, const_cast<char**>(iend), base); }
-template <> inline void str_to_num (issiter_t i, issiter_t* iend, uint8_t, double& v)
-    { v = strtod (i, const_cast<char**>(iend)); }
-#ifdef HAVE_LONG_LONG
-template <> inline void str_to_num (issiter_t i, issiter_t* iend, uint8_t base, long long& v)
-    { v = strtoll (i, const_cast<char**>(iend), base); }
-#endif
-
-template <typename T>
-inline void istringstream::read_number (T& v)
-{
-    v = 0;
-    if (skip_delimiters() == m_Delimiters[0])
-	return;
-    ungetc();
-    iterator ilast;
-    do {
-	str_to_num<T> (ipos(), &ilast, m_Base, v);
-    } while (ilast == end() && underflow());
-    skip (distance (ipos(), ilast));
-}
-
-void istringstream::iread (int32_t& v)		{ read_number (v); }
-void istringstream::iread (double& v)		{ read_number (v); } 
-#if HAVE_INT64_T
-void istringstream::iread (int64_t& v)		{ read_number (v); }
-#endif
-#if HAVE_LONG_LONG && (!HAVE_INT64_T || SIZE_OF_LONG_LONG > 8)
-void istringstream::iread (long long& v)	{ read_number (v); }
-#endif
-
-void istringstream::iread (wchar_t& v)
-{
-    if ((v = skip_delimiters()) == wchar_t(m_Delimiters[0]))
-	return;
-    size_t cs = Utf8SequenceBytes (v) - 1;
-    if (remaining() >= cs || underflow(cs) >= cs) {
-	ungetc();
-	v = *utf8in (ipos());
-	skip (cs + 1);
-    }
-}
-
-void istringstream::iread (bool& v)
-{
-    static const char tf[2][8] = { "false", "true" };
-    char c = skip_delimiters();
-    v = (c == 't' || c == '1');
-    if (c != tf[v][0])
-	return;
-    for (const char* tv = tf[v]; c == *tv && (remaining() || underflow()); ++tv)
-	istream::iread (c);
-    ungetc();
-}
-
-void istringstream::iread (string& v)
-{
-    v.clear();
-    char prevc, quoteChar = 0, c = skip_delimiters();
-    if (c == '\"' || c == '\'')
-	quoteChar = c;
-    else
-	v += c;
-    while (remaining() || underflow()) {
-	prevc = c;
-	istream::iread (c);
-	if (!quoteChar && is_delimiter(c))
-	    break;
-	if (prevc == '\\') {
-	    switch (c) {
-		case 't':	c = '\t'; break;
-		case 'n':	c = '\n'; break;
-		case 'r':	c = '\r'; break;
-		case 'b':	c = '\b'; break;
-		case 'E':	c = 27;   break; // ESC sequence
-		case '\"':	c = '\"'; break;
-		case '\'':	c = '\''; break;
-		case '\\':	c = '\\'; break;
-	    };
-	    v.end()[-1] = c;
-	} else {
-	    if (c == quoteChar)
-		break;
-	    v += c;
-	}
-    }
-}
-
-void istringstream::read (void* buffer, size_type sz)
-{
-    if (remaining() < sz && underflow(sz) < sz)
-#ifdef WANT_STREAM_BOUNDS_CHECKING
-	verify_remaining ("read", "", sz);
-#else
-	assert (remaining() >= size());
-#endif
-    istream::read (buffer, sz);
-}
-
-void istringstream::read (memlink& buf)
-{
-    if (remaining() < buf.size() && underflow(buf.size()) < buf.size())
-#ifdef WANT_STREAM_BOUNDS_CHECKING
-	verify_remaining ("read", "", buf.size());
-#else
-	assert (remaining() >= buf.size());
-#endif
-    istream::read (buf);
-}
-
-/// Reads one character from the stream.
-int istringstream::get (void)
-{
-    int8_t v = 0;
-    if (remaining() || underflow())
-	istream::iread (v);
-    return (v);
-}
-
-/// Reads characters into \p s until \p delim is found (but not stored or extracted)
-void istringstream::get (string& s, char delim)
-{
-    getline (s, delim);
-    if (!s.empty() && pos() > 0 && ipos()[-1] == delim)
-	ungetc();
-}
-
-/// Reads characters into \p p,n until \p delim is found (but not stored or extracted)
-void istringstream::get (char* p, size_type n, char delim)
-{
-    assert (p && !n && "A non-empty buffer is required by this implementation");
-    string s;
-    get (s, delim);
-    const size_t ntc (min (n - 1, s.size()));
-    memcpy (p, s.data(), ntc);
-    p[ntc] = 0;
-}
-
-/// Reads characters into \p s until \p delim is extracted (but not stored)
-void istringstream::getline (string& s, char delim)
-{
-    char oldDelim [VectorSize(m_Delimiters)];
-    copy (VectorRange (m_Delimiters), oldDelim);
-    fill (VectorRange (m_Delimiters), '\0');
-    m_Delimiters[0] = delim;
-    iread (s);
-    copy (VectorRange (oldDelim), m_Delimiters);
-}
-
-/// Reads characters into \p p,n until \p delim is extracted (but not stored)
-void istringstream::getline (char* p, size_type n, char delim)
-{
-    assert (p && !n && "A non-empty buffer is required by this implementation");
-    string s;
-    getline (s, delim);
-    const size_t ntc (min (n - 1, s.size()));
-    memcpy (p, s.data(), ntc);
-    p[ntc] = 0;
-}
-
-/// Extract until \p delim or \p n chars have been read.
-void istringstream::ignore (size_type n, char delim)
-{
-    while (n-- && (remaining() || underflow()) && get() != delim);
-}
-
-} // namespace ustl
-
diff --git a/media/libdrm/mobile2/src/util/ustl-1.0/sistream.h b/media/libdrm/mobile2/src/util/ustl-1.0/sistream.h
deleted file mode 100644
index 924f43b..0000000
--- a/media/libdrm/mobile2/src/util/ustl-1.0/sistream.h
+++ /dev/null
@@ -1,133 +0,0 @@
-// This file is part of the ustl library, an STL implementation.
-//
-// Copyright (C) 2005 by Mike Sharov <msharov@users.sourceforge.net>
-// This file is free software, distributed under the MIT License.
-//
-// sistream.h
-//
-
-#ifndef SISTREAM_H_0CCA102229A49F5D65EE852E62B27CE2
-#define SISTREAM_H_0CCA102229A49F5D65EE852E62B27CE2
-
-#include "mistream.h"
-#include "uassert.h"
-#include "ustring.h"
-
-namespace ustl {
-
-/// \class istringstream sistream.h ustl.h
-/// \ingroup TextStreams
-///
-/// \brief A stream that reads textual data from a memory block.
-///
-class istringstream : public istream {
-public:
-    static const size_type	c_MaxDelimiters = 16;	///< Maximum number of word delimiters.
-public:
-    				istringstream (void);
-				istringstream (const void* p, size_type n);
-    explicit			istringstream (const cmemlink& source);
-    void			iread (int8_t& v);
-    void			iread (int32_t& v);
-    void			iread (double& v);
-    void			iread (bool& v);
-    void			iread (wchar_t& v);
-    void			iread (string& v);
-#ifdef HAVE_INT64_T
-    void			iread (int64_t& v);
-#endif
-#if HAVE_LONG_LONG && (!HAVE_INT64_T || SIZE_OF_LONG_LONG > 8)
-    void			iread (long long& v);
-#endif
-    inline string		str (void) const	{ string s; s.link (*this); return (s); }
-    inline void			str (const string& s)	{ link (s); }
-    int				get (void);
-    inline void			get (char& c)	{ c = get(); }
-    void			get (char* p, size_type n, char delim = '\n');
-    void			get (string& s, char delim = '\n');
-    void			getline (char* p, size_type n, char delim = '\n');
-    void			getline (string& s, char delim = '\n');
-    void			ignore (size_type n, char delim = '\0');
-    inline char			peek (void)	{ int8_t v; iread (v); ungetc(); return (v); }
-    inline void			putback (char)	{ ungetc(); }
-    inline void			unget (void)	{ ungetc(); }
-    void			set_delimiters (const char* delimiters);
-    inline void			set_base (short base);
-    inline void			set_decimal_separator (char)	{ }
-    inline void			set_thousand_separator (char)	{ }
-    void			read (void* buffer, size_type size);
-    void			read (memlink& buf);
-    inline void			read_strz (string& str);
-    inline void			sync (void)	{ skip (remaining()); }
-protected:
-    char			skip_delimiters (void);
-private:
-    inline bool			is_delimiter (char c) const;
-    template <typename T> void	read_number (T& v);
-private:
-    char			m_Delimiters [c_MaxDelimiters];
-    uint8_t			m_Base;
-};
-
-/// Sets the numeric base used to read numbers.
-inline void istringstream::set_base (short base)
-{
-    m_Base = base;
-}
-
-/// Reads a null-terminated character stream. This is not allowed in this class.
-inline void istringstream::read_strz (string&)
-{
-    assert (!"Reading nul characters is not allowed from text streams");
-}
-
-/// Reads one type as another.
-template <typename RealT, typename CastT>
-inline void _cast_read (istringstream& is, RealT& v)
-{
-    CastT cv;
-    is.iread (cv);
-    v = RealT (cv);
-}
-
-inline istringstream& operator>> (istringstream& is, int8_t& v)	{ is.iread (v); return (is); }
-inline istringstream& operator>> (istringstream& is, int32_t& v){ is.iread (v); return (is); }
-inline istringstream& operator>> (istringstream& is, double& v)	{ is.iread (v); return (is); }
-inline istringstream& operator>> (istringstream& is, bool& v)	{ is.iread (v); return (is); }
-inline istringstream& operator>> (istringstream& is, wchar_t& v){ is.iread (v); return (is); }
-inline istringstream& operator>> (istringstream& is, string& v)	{ is.iread (v); return (is); }
-#if HAVE_INT64_T
-inline istringstream& operator>> (istringstream& is, int64_t& v){ is.iread (v); return (is); }
-#endif
-#if HAVE_LONG_LONG && (!HAVE_INT64_T || SIZE_OF_LONG_LONG > 8)
-inline istringstream& operator>> (istringstream& is, long long& v) { is.iread (v); return (is); }
-#endif
-
-#define ISTRSTREAM_CAST_OPERATOR(RealT, CastT)			\
-inline istringstream& operator>> (istringstream& is, RealT& v)	\
-{ _cast_read<RealT,CastT>(is, v); return (is); }
-
-ISTRSTREAM_CAST_OPERATOR (uint8_t,	int8_t)
-ISTRSTREAM_CAST_OPERATOR (int16_t,	int32_t)
-ISTRSTREAM_CAST_OPERATOR (uint16_t,	int32_t)
-ISTRSTREAM_CAST_OPERATOR (uint32_t,	int32_t)
-ISTRSTREAM_CAST_OPERATOR (float,	double)
-#if HAVE_THREE_CHAR_TYPES
-ISTRSTREAM_CAST_OPERATOR (char,		int8_t)
-#endif
-#if HAVE_INT64_T
-ISTRSTREAM_CAST_OPERATOR (uint64_t,	int64_t)
-#endif
-#if SIZE_OF_LONG == SIZE_OF_INT
-ISTRSTREAM_CAST_OPERATOR (long,		int)
-ISTRSTREAM_CAST_OPERATOR (unsigned long,int)
-#endif
-#if HAVE_LONG_LONG && (!HAVE_INT64_T || SIZE_OF_LONG_LONG > 8)
-ISTRSTREAM_CAST_OPERATOR (unsigned long long, long long)
-#endif
-#undef ISTRSTREAM_CAST_OPERATOR
-
-} // namespace ustl
-
-#endif
-
diff --git a/media/libdrm/mobile2/src/util/ustl-1.0/sostream.cpp b/media/libdrm/mobile2/src/util/ustl-1.0/sostream.cpp
deleted file mode 100644
index 96f0976..0000000
--- a/media/libdrm/mobile2/src/util/ustl-1.0/sostream.cpp
+++ /dev/null
@@ -1,193 +0,0 @@
-// This file is part of the ustl library, an STL implementation.
-//
-// Copyright (C) 2005 by Mike Sharov <msharov@users.sourceforge.net>
-// This file is free software, distributed under the MIT License.
-//
-// sostream.h
-//
-
-#include "mistream.h"	// for istream_iterator, referenced in utf8.h
-#include "sostream.h"
-#include "uassert.h"
-#include "ulimits.h"
-#include "ustring.h"
-#include <stdio.h>
-
-namespace ustl {
-
-/// Creates an output string stream linked to the given memory area.
-ostringstream::ostringstream (void* p, size_t n)
-: ostream (),
-  m_Buffer (),
-  m_Flags (0),
-  m_Width (0),
-  m_Base (10),
-  m_Precision (2)
-{
-    link (p, n);
-}
-
-/// Creates an output string stream, initializing the buffer with v.
-ostringstream::ostringstream (const string& v)
-: ostream (),
-  m_Buffer (v),
-  m_Flags (0),
-  m_Width (0),
-  m_Base (10),
-  m_Precision (2)
-{
-    ostream::link (m_Buffer);
-}
-
-/// Copies \p s to the internal buffer.
-void ostringstream::str (const string& s)
-{
-    m_Buffer = s;
-    ostream::link (m_Buffer);
-    SetPos (m_Buffer.size());
-}
-
-/// Writes a single character into the stream.
-void ostringstream::iwrite (uint8_t v)
-{
-    if (remaining() >= 1 || overflow() >= 1)
-	ostream::iwrite (v);
-}
-
-/// Writes \p buf of size \p bufSize through the internal buffer.
-void ostringstream::write_buffer (const char* buf, size_type bufSize)
-{
-    size_type btw = 0, written = 0;
-    while ((written += btw) < bufSize && (remaining() || overflow(bufSize - written)))
-	write (buf + written, btw = min (remaining(), bufSize - written));
-}
-
-/// Simple decimal encoding of \p n into \p fmt.
-inline char* ostringstream::encode_dec (char* fmt, uint32_t n) const
-{
-    do {
-	*fmt++ = '0' + n % 10;
-    } while (n /= 10);
-    return (fmt);
-}
-
-/// Generates a sprintf format string for the given type.
-void ostringstream::fmtstring (char* fmt, const char* typestr, bool bInteger) const
-{
-    *fmt++ = '%';
-    if (m_Width)
-	fmt = encode_dec (fmt, m_Width);
-    if (m_Flags & left)
-	*fmt++ = '-';
-    if (!bInteger) {
-	*fmt++ = '.';
-	fmt = encode_dec (fmt, m_Precision);
-    }
-    while (*typestr)
-	*fmt++ = *typestr++;
-    if (bInteger) {
-	if (m_Base == 16)
-	    fmt[-1] = 'X';
-	else if (m_Base == 8)
-	    fmt[-1] = 'o';
-    } else {
-	if (m_Flags & scientific)
-	    fmt[-1] = 'E';
-    }
-    *fmt = 0;
-}
-
-/// Writes \p v into the stream as utf8
-void ostringstream::iwrite (wchar_t v)
-{
-    char buffer [8];
-    *utf8out(buffer) = v;
-    write_buffer (buffer, Utf8Bytes(v));
-}
-
-/// Writes value \p v into the stream as text.
-void ostringstream::iwrite (bool v)
-{
-    static const char tf[2][8] = { "false", "true" };
-    write_buffer (tf[v], 5 - v);
-}
-
-/// Equivalent to a vsprintf on the string.
-int ostringstream::vformat (const char* fmt, va_list args)
-{
-#if HAVE_VA_COPY
-    va_list args2;
-#else
-    #define args2 args
-    #undef __va_copy
-    #define __va_copy(x,y)
-#endif
-    size_t rv, space;
-    do {
-	space = remaining();
-	__va_copy (args2, args);
-	rv = vsnprintf (ipos(), space, fmt, args2);
-	if (ssize_t(rv) < 0)
-	    rv = space;
-    } while (rv >= space && rv < overflow(rv + 1));
-    SetPos (pos() + min (rv, space));
-    return (rv);
-}
-
-/// Equivalent to a sprintf on the string.
-int ostringstream::format (const char* fmt, ...)
-{
-    va_list args;
-    va_start (args, fmt);
-    const int rv = vformat (fmt, args);
-    va_end (args);
-    return (rv);
-}
-
-/// Links to string \p l as resizable.
-void ostringstream::link (void* p, size_t n)
-{
-    assert ((p || !n) && "The output string buffer must not be read-only");
-    ostream::link (p, n);
-    m_Buffer.link (p, n);
-}
-
-/// Writes the contents of \p buffer of \p size into the stream.
-void ostringstream::write (const void* buffer, size_type sz)
-{
-    if (remaining() < sz && overflow(sz) < sz)
-	return;
-    ostream::write (buffer, sz);
-}
-
-/// Writes the contents of \p buf into the stream.
-void ostringstream::write (const cmemlink& buf)
-{
-    if (remaining() < buf.size() && overflow(buf.size()) < buf.size())
-	return;
-    ostream::write (buf);
-}
-
-/// Flushes the internal buffer by truncating it at the current position.
-void ostringstream::flush (void)
-{
-    m_Buffer.resize (pos());
-}
-
-/// Attempts to create more output space. Returns remaining().
-ostringstream::size_type ostringstream::overflow (size_type n)
-{
-    if (n > remaining()) {
-	const uoff_t oldPos (pos());
-	m_Buffer.reserve (oldPos + n, false);
-	m_Buffer.resize (oldPos + n);
-	ostream::link (m_Buffer);
-	SetPos (oldPos);
-    }
-    verify_remaining ("write", "text", n);
-    return (remaining());
-}
-
-} // namespace ustl
-
-
diff --git a/media/libdrm/mobile2/src/util/ustl-1.0/sostream.h b/media/libdrm/mobile2/src/util/ustl-1.0/sostream.h
deleted file mode 100644
index 11dc328..0000000
--- a/media/libdrm/mobile2/src/util/ustl-1.0/sostream.h
+++ /dev/null
@@ -1,158 +0,0 @@
-// This file is part of the ustl library, an STL implementation.
-//
-// Copyright (C) 2005 by Mike Sharov <msharov@users.sourceforge.net>
-// This file is free software, distributed under the MIT License.
-//
-// sostream.h
-//
-
-#ifndef SOSTREAM_H_5323DC8C26E181D43278F2F53FDCF19F
-#define SOSTREAM_H_5323DC8C26E181D43278F2F53FDCF19F
-
-#include "uassert.h"
-#include "ustring.h"
-#include "mostream.h"
-
-namespace ustl {
-
-class string;
-
-/// \class ostringstream sostream.h ustl.h
-/// \ingroup TextStreams
-///
-/// \brief This stream writes textual data into a memory block.
-///
-class ostringstream : public ostream {
-public:
-				ostringstream (const string& v = string::empty_string);
-				ostringstream (void* p, size_t n);
-    void			iwrite (uint8_t v);
-    void			iwrite (wchar_t v);
-    inline void			iwrite (int v)			{ iformat (v); }
-    inline void			iwrite (unsigned int v)		{ iformat (v); }
-    inline void			iwrite (long int v)		{ iformat (v); }
-    inline void			iwrite (unsigned long int v)	{ iformat (v); }
-    inline void			iwrite (float v)		{ iformat (v); }
-    inline void			iwrite (double v)		{ iformat (v); }
-    void			iwrite (bool v);
-    inline void			iwrite (const char* s)		{ write_buffer (s, strlen(s)); }
-    inline void			iwrite (const string& v)	{ write_buffer (v.begin(), v.size()); }
-    inline void			iwrite (fmtflags f);
-#if HAVE_LONG_LONG
-    inline void			iwrite (long long v)		{ iformat (v); }
-    inline void			iwrite (unsigned long long v)	{ iformat (v); }
-#endif
-    inline size_type		max_size (void) const		{ return (m_Buffer.max_size()); }
-    inline void			put (char c)			{ iwrite (uint8_t(c)); }
-    int				vformat (const char* fmt, va_list args);
-    int				format (const char* fmt, ...) __attribute__((__format__(__printf__, 2, 3)));
-    inline void			set_base (uint16_t b)		{ m_Base = b; }
-    inline void			set_width (uint16_t w)		{ m_Width = w; }
-    inline void			set_decimal_separator (char)	{ }
-    inline void			set_thousand_separator (char)	{ }
-    inline void			set_precision (uint16_t v)	{ m_Precision = v; }
-    void			link (void* p, size_type n);
-    inline void			link (memlink& l)		{ link (l.data(), l.writable_size()); }
-    inline const string&	str (void)			{ flush(); return (m_Buffer); }
-    void			str (const string& s);
-    void			write (const void* buffer, size_type size);
-    void			write (const cmemlink& buf);
-    inline void			write_strz (const char*)	{ assert (!"Writing nul characters into a text stream is not allowed"); }
-    void			flush (void);
-    virtual size_type		overflow (size_type n = 1);
-protected:
-    void			write_buffer (const char* buf, size_type bufSize);
-    inline void			reserve (size_type n)		{ m_Buffer.reserve (n, false); }
-    inline size_type		capacity (void) const		{ return (m_Buffer.capacity()); }
-private:
-    inline char*		encode_dec (char* fmt, uint32_t n) const;
-    void			fmtstring (char* fmt, const char* typestr, bool bInteger) const;
-    template <typename T>
-    void			iformat (T v);
-private:
-    string			m_Buffer;		///< The output buffer.
-    uint32_t			m_Flags;		///< See ios_base::fmtflags.
-    uint16_t			m_Width;		///< Field width.
-    uint8_t			m_Base;			///< Numeric base for writing numbers.
-    uint8_t			m_Precision;		///< Number of digits after the decimal separator.
-};
-
-//----------------------------------------------------------------------
-
-template <typename T>
-inline const char* printf_typestring (const T&)	{ return (""); }
-#define PRINTF_TYPESTRING_SPEC(type,str)	\
-template <> inline const char* printf_typestring (const type&)	{ return (str); }
-PRINTF_TYPESTRING_SPEC (int,		"d")
-PRINTF_TYPESTRING_SPEC (unsigned int,	"u")
-PRINTF_TYPESTRING_SPEC (long,		"ld")
-PRINTF_TYPESTRING_SPEC (unsigned long,	"lu")
-PRINTF_TYPESTRING_SPEC (float,		"f")
-PRINTF_TYPESTRING_SPEC (double,		"lf")
-#if HAVE_LONG_LONG
-PRINTF_TYPESTRING_SPEC (long long,	"lld")
-PRINTF_TYPESTRING_SPEC (unsigned long long, "llu")
-#endif
-#undef PRINTF_TYPESTRING_SPEC
-
-template <typename T>
-void ostringstream::iformat (T v)
-{
-    char fmt [16];
-    fmtstring (fmt, printf_typestring(v), numeric_limits<T>::is_integer);
-    format (fmt, v);
-}
-
-/// Sets the flag \p f in the stream.
-inline void ostringstream::iwrite (fmtflags f)
-{
-    switch (f) {
-	case oct:	set_base (8);	break;
-	case dec:	set_base (10);	break;
-	case hex:	set_base (16);	break;
-	case left:	m_Flags |= left; m_Flags &= ~right; break;
-	case right:	m_Flags |= right; m_Flags &= ~left; break;
-	default:	m_Flags |= f;	break;
-    }
-}
-
-//----------------------------------------------------------------------
-
-#define OSTRSTREAM_OPERATOR(RealT, CastT)			\
-inline ostringstream& operator<< (ostringstream& os, RealT v)	\
-{ os.iwrite ((CastT) v); return (os); }
-
-template <typename T>
-OSTRSTREAM_OPERATOR (T*,		unsigned long int)
-OSTRSTREAM_OPERATOR (const void*,	unsigned long int)
-OSTRSTREAM_OPERATOR (void*,		unsigned long int)
-OSTRSTREAM_OPERATOR (const char*,	const char*)
-OSTRSTREAM_OPERATOR (char*,		const char*)
-OSTRSTREAM_OPERATOR (uint8_t*,		const char*)
-OSTRSTREAM_OPERATOR (const uint8_t*,	const char*)
-OSTRSTREAM_OPERATOR (const string&,	const string&)
-OSTRSTREAM_OPERATOR (ios_base::fmtflags,ios_base::fmtflags)
-OSTRSTREAM_OPERATOR (int8_t,		uint8_t)
-OSTRSTREAM_OPERATOR (uint8_t,		uint8_t)
-OSTRSTREAM_OPERATOR (short int,		int)
-OSTRSTREAM_OPERATOR (unsigned short,	unsigned int)
-OSTRSTREAM_OPERATOR (int,		int)
-OSTRSTREAM_OPERATOR (unsigned int,	unsigned int)
-OSTRSTREAM_OPERATOR (long,		long)
-OSTRSTREAM_OPERATOR (unsigned long,	unsigned long)
-OSTRSTREAM_OPERATOR (float,		float)
-OSTRSTREAM_OPERATOR (double,		double)
-OSTRSTREAM_OPERATOR (bool,		bool)
-OSTRSTREAM_OPERATOR (wchar_t,		wchar_t)
-#if HAVE_THREE_CHAR_TYPES
-OSTRSTREAM_OPERATOR (char,		uint8_t)
-#endif
-#if HAVE_LONG_LONG
-OSTRSTREAM_OPERATOR (long long,		long long)
-OSTRSTREAM_OPERATOR (unsigned long long, unsigned long long)
-#endif
-
-} // namespace ustl
-
-#endif
-
diff --git a/media/libdrm/mobile2/src/util/ustl-1.0/strmsize.h b/media/libdrm/mobile2/src/util/ustl-1.0/strmsize.h
deleted file mode 100644
index 5888e15..0000000
--- a/media/libdrm/mobile2/src/util/ustl-1.0/strmsize.h
+++ /dev/null
@@ -1,135 +0,0 @@
-// This file is part of the ustl library, an STL implementation.
-//
-// Copyright (C) 2005 by Mike Sharov <msharov@users.sourceforge.net>
-// This file is free software, distributed under the MIT License.
-//
-/// \file strmsize.h
-/// \brief This file contains stream_size_of functions for basic types and *STREAMABLE macros.
-/// stream_size_of functions return the size of the object's data that is written or
-/// read from a stream.
-//
-
-#ifndef STRMSIZE_H_052FF16B2D8A608761BF10333D065073
-#define STRMSIZE_H_052FF16B2D8A608761BF10333D065073
-
-#include "uassert.h"
-
-namespace ustl {
-
-/// Returns the size of the given object. Overloads for standard types are available.
-template <typename T>
-inline size_t stream_size_of (T*)	{ return (sizeof(T*));		}
-#ifndef DOXYGEN_SHOULD_IGNORE_THIS
-inline size_t stream_size_of (int8_t)	{ return (sizeof(int8_t));	}
-inline size_t stream_size_of (uint8_t)	{ return (sizeof(uint8_t));	}
-inline size_t stream_size_of (int16_t)	{ return (sizeof(int16_t));	}
-inline size_t stream_size_of (uint16_t)	{ return (sizeof(uint16_t));	}
-inline size_t stream_size_of (int32_t)	{ return (sizeof(int32_t));	}
-inline size_t stream_size_of (uint32_t)	{ return (sizeof(uint32_t));	}
-inline size_t stream_size_of (float)	{ return (sizeof(float));	}
-inline size_t stream_size_of (double)	{ return (sizeof(double));	}
-inline size_t stream_size_of (bool)	{ return (sizeof(uint8_t));	}
-inline size_t stream_size_of (wchar_t)	{ return (sizeof(wchar_t));	}
-#if HAVE_THREE_CHAR_TYPES
-inline size_t stream_size_of (char)	{ return (sizeof(char));	}
-#endif
-#if HAVE_INT64_T
-inline size_t stream_size_of (int64_t)	{ return (sizeof(int64_t));	}
-inline size_t stream_size_of (uint64_t)	{ return (sizeof(uint64_t));	}
-#endif
-#if SIZE_OF_LONG == SIZE_OF_INT
-inline size_t stream_size_of (long v)			{ return (sizeof (v));	}
-inline size_t stream_size_of (unsigned long v)		{ return (sizeof (v));	}
-#endif
-#if HAVE_LONG_LONG && (!HAVE_INT64_T || SIZE_OF_LONG_LONG > 8)
-inline size_t stream_size_of (long long v)		{ return (sizeof (v));	}
-inline size_t stream_size_of (unsigned long long v)	{ return (sizeof (v));	}
-#endif
-#endif // DOXYGEN_SHOULD_IGNORE_THIS
-
-} // namespace ustl
-
-/// Declares that T is not written to istream/ostream.
-#define NOT_STREAMABLE(T)	\
-    namespace ustl {		\
-	inline istream& operator>> (istream& is, T&)		{ return (is); }	\
-	inline ostream& operator<< (ostream& os, const T&)	{ return (os); }	\
-	inline size_t stream_size_of (const T&)			{ return (0); }		\
-    }
-
-//
-// Extra overloads in this macro are needed because it is the one used for
-// marshalling pointers. Passing a pointer to stream_size_of creates a
-// conversion ambiguity between converting to const pointer& and converting
-// to bool; the compiler always chooses the bool conversion (because it
-// requires 1 conversion instead of 2 for the other choice). There is little
-// point in adding the overloads to other macros, since they are never used
-// for pointers.
-//
-/// Declares that T is to be written as is into binary streams.
-#define INTEGRAL_STREAMABLE(T)	\
-    namespace ustl {		\
-	inline istream& operator>> (istream& is, T& v)		{ is.iread(v);  return (is); }	\
-	inline ostream& operator<< (ostream& os, const T& v)	{ os.iwrite(v); return (os); }	\
-	inline ostream& operator<< (ostream& os, T& v)		{ os.iwrite(v); return (os); }	\
-	inline size_t stream_size_of (const T& v)		{ return (sizeof(v)); }		\
-	inline size_t stream_size_of (T& v)			{ return (sizeof(v)); }		\
-    }
-
-#ifdef NDEBUG
-    #define STD_STREAMABLE_SZCHK_BEGIN
-    #define STD_STREAMABLE_SZCHK_END
-#else
-    #define STD_STREAMABLE_SZCHK_BEGIN		\
-	assert (os.aligned (alignof (v)));	\
-	const uoff_t vStart (os.pos())
-    #define STD_STREAMABLE_SZCHK_END		\
-	if (os.pos() - vStart != v.stream_size()) \
-	    throw stream_bounds_exception ("write", typeid(v).name(), vStart, os.pos() - vStart, v.stream_size())
-#endif
-
-/// Declares that T contains read, write, and stream_size methods.
-#define STD_STREAMABLE(T)	\
-    namespace ustl {		\
-	inline istream& operator>> (istream& is, T& v)		{ assert (is.aligned (alignof (v))); v.read (is);  return (is); }	\
-	inline ostream& operator<< (ostream& os, const T& v)	{ STD_STREAMABLE_SZCHK_BEGIN; v.write (os); STD_STREAMABLE_SZCHK_END; return (os); }	\
-	inline size_t stream_size_of (const T& v)		{ return (v.stream_size()); }	\
-    }
-
-/// Declares that T is to be cast into TSUB for streaming.
-#define CAST_STREAMABLE(T,TSUB)	\
-    namespace ustl {		\
-	inline istream& operator>> (istream& is, T& v)		{ TSUB sv; is >> sv; v = (T)(sv); return (is); }	\
-	inline ostream& operator<< (ostream& os, const T& v)	{ os << TSUB(v); return (os); }			\
-	inline size_t stream_size_of (const T& v)		{ return (sizeof(TSUB(v))); }				\
-    }
-
-/// Placed into a class it declares the methods required by STD_STREAMABLE. Syntactic sugar.
-#define DECLARE_STD_STREAMABLE			\
-    public:					\
-	void	read (istream& is);		\
-	void	write (ostream& os) const;	\
-	size_t	stream_size (void) const
-
-/// Declares \p T to be writable to text streams. Reading is not implemented because you should not do it.
-#define TEXT_STREAMABLE(T)	\
-    namespace ustl {		\
-	inline ostringstream& operator<< (ostringstream& os, const T& v)	\
-	    { v.text_write (os); return (os); }	\
-    }
-
-/// Specifies that \p T is printed by using it as an index into \p Names string array.
-#define LOOKUP_TEXT_STREAMABLE(T,Names,nNames)	\
-    namespace ustl {		\
-	inline ostringstream& operator<< (ostringstream& os, const T& v)	\
-	{				\
-	    if (uoff_t(v) < (nNames))	\
-		os << Names[v];		\
-	    else			\
-		os << uoff_t(v);	\
-	    return (os);		\
-	}				\
-    }
-
-#endif
-
diff --git a/media/libdrm/mobile2/src/util/ustl-1.0/ualgo.h b/media/libdrm/mobile2/src/util/ustl-1.0/ualgo.h
deleted file mode 100644
index 47b66d0..0000000
--- a/media/libdrm/mobile2/src/util/ustl-1.0/ualgo.h
+++ /dev/null
@@ -1,677 +0,0 @@
-// This file is part of the ustl library, an STL implementation.
-//
-// Copyright (C) 2005 by Mike Sharov <msharov@users.sourceforge.net>
-// This file is free software, distributed under the MIT License.
-//
-// ualgo.h
-//
-// Implementation of STL algorithms.
-//
-// The function prototypes are copied
-// exactly from the SGI version of STL documentation along with comments about
-// their use. The code is NOT the same, though the functionality usually is.
-//
-
-#ifndef UALGO_H_711AB4214D417A51166694D47A662D6E
-#define UALGO_H_711AB4214D417A51166694D47A662D6E
-
-#include "upair.h"
-#include "ualgobase.h"
-#include "ufunction.h"
-#include "upredalgo.h"
-#include "umemory.h"
-#include <stdlib.h>	// for rand()
-
-namespace ustl {
-
-/// Swaps corresponding elements of [first, last) and [result,)
-/// \ingroup SwapAlgorithms
-///
-template <typename ForwardIterator1, typename ForwardIterator2>
-inline ForwardIterator2 swap_ranges (ForwardIterator1 first, ForwardIterator2 last, ForwardIterator2 result)
-{
-    for (; first != last; ++first, ++result)
-	iter_swap (first, result);
-    return (result);
-}
-
-/// Returns the first iterator i in the range [first, last) such that
-/// *i == value. Returns last if no such iterator exists. 
-/// \ingroup SearchingAlgorithms
-///
-template <typename InputIterator, typename EqualityComparable>
-inline InputIterator find (InputIterator first, InputIterator last, const EqualityComparable& value)
-{
-    while (first != last && !(*first == value))
-	++ first;
-    return (first);
-}
-
-/// Returns the first iterator such that *i == *(i + 1)
-/// \ingroup SearchingAlgorithms
-///
-template <typename ForwardIterator>
-ForwardIterator adjacent_find (ForwardIterator first, ForwardIterator last)
-{
-    if (first != last)
-	for (ForwardIterator prev = first; ++first != last; ++ prev)
-	    if (*prev == *first)
-		return (prev);
-    return (last);
-}
-
-/// Returns the pointer to the first pair of unequal elements.
-/// \ingroup SearchingAlgorithms
-///
-template <typename InputIterator>
-pair<InputIterator,InputIterator>
-mismatch (InputIterator first1, InputIterator last1, InputIterator first2)
-{
-    while (first1 != last1 && *first1 == *first2)
-	++ first1, ++ first2;
-    return (make_pair (first1, first2));
-}
-
-/// \brief Returns true if two ranges are equal.
-/// This is an extension, present in uSTL and SGI STL.
-/// \ingroup SearchingAlgorithms
-///
-template <typename InputIterator>
-inline bool equal (InputIterator first1, InputIterator last1, InputIterator first2)
-{
-    return (mismatch (first1, last1, first2).first == last1);
-}
-
-/// Count finds the number of elements in [first, last) that are equal
-/// to value. More precisely, the first version of count returns the
-/// number of iterators i in [first, last) such that *i == value.
-/// \ingroup SearchingAlgorithms
-///
-template <typename InputIterator, typename EqualityComparable>
-inline size_t count (InputIterator first, InputIterator last, const EqualityComparable& value)
-{
-    size_t total = 0;
-    for (; first != last; ++first)
-	if (*first == value)
-	    ++ total;
-    return (total);
-}
-
-///
-/// The first version of transform performs the operation op(*i) for each
-/// iterator i in the range [first, last), and assigns the result of that
-/// operation to *o, where o is the corresponding output iterator. That is,
-/// for each n such that 0 <= n < last - first, it performs the assignment
-/// *(result + n) = op(*(first + n)).
-/// The return value is result + (last - first).
-/// \ingroup MutatingAlgorithms
-/// \ingroup PredicateAlgorithms
-///
-template <typename InputIterator, typename OutputIterator, typename UnaryFunction>
-inline OutputIterator transform (InputIterator first, InputIterator last, OutputIterator result, UnaryFunction op)
-{
-    for (; first != last; ++result, ++first)
-	*result = op (*first);
-    return (result);
-}
-
-///
-/// The second version of transform is very similar, except that it uses a
-/// Binary Function instead of a Unary Function: it performs the operation
-/// op(*i1, *i2) for each iterator i1 in the range [first1, last1) and assigns
-/// the result to *o, where i2 is the corresponding iterator in the second
-/// input range and where o is the corresponding output iterator. That is,
-/// for each n such that 0 <= n < last1 - first1, it performs the assignment
-/// *(result + n) = op(*(first1 + n), *(first2 + n).
-/// The return value is result + (last1 - first1).
-/// \ingroup MutatingAlgorithms
-/// \ingroup PredicateAlgorithms
-///
-template <typename InputIterator1, typename InputIterator2, typename OutputIterator, typename BinaryFunction>
-inline OutputIterator transform (InputIterator1 first1, InputIterator1 last1, InputIterator2 first2, OutputIterator result, BinaryFunction op)
-{
-    for (; first1 != last1; ++result, ++first1, ++first2)
-	*result = op (*first1, *first2);
-    return (result);
-}
-
-/// Replace replaces every element in the range [first, last) equal to
-/// old_value with new_value. That is: for every iterator i,
-/// if *i == old_value then it performs the assignment *i = new_value.
-/// \ingroup MutatingAlgorithms
-///
-template <typename ForwardIterator, typename T>
-inline void replace (ForwardIterator first, ForwardIterator last, const T& old_value, const T& new_value)
-{
-    for (; first != last; ++first)
-	if (*first == old_value)
-	    *first = new_value;
-}
-
-/// Replace_copy copies elements from the range [first, last) to the range
-/// [result, result + (last-first)), except that any element equal to old_value
-/// is not copied; new_value is copied instead. More precisely, for every
-/// integer n such that 0 <= n < last-first, replace_copy performs the
-/// assignment *(result+n) = new_value if *(first+n) == old_value, and
-/// *(result+n) = *(first+n) otherwise.
-/// \ingroup MutatingAlgorithms
-///
-template <typename InputIterator, typename OutputIterator, typename T>
-inline OutputIterator replace_copy (InputIterator first, InputIterator last, OutputIterator result, const T& old_value, const T& new_value)
-{
-    for (; first != last; ++result, ++first)
-        *result = (*first == old_value) ? new_value : *first;
-}
-
-/// Generate assigns the result of invoking gen, a function object that
-/// takes no arguments, to each element in the range [first, last).
-/// \ingroup GeneratorAlgorithms
-/// \ingroup PredicateAlgorithms
-///
-template <typename ForwardIterator, typename Generator>
-inline void generate (ForwardIterator first, ForwardIterator last, Generator gen)
-{
-    for (; first != last; ++first)
-	*first = gen();
-}
-
-/// Generate_n assigns the result of invoking gen, a function object that
-/// takes no arguments, to each element in the range [first, first+n).
-/// The return value is first + n.
-/// \ingroup GeneratorAlgorithms
-/// \ingroup PredicateAlgorithms
-///
-template <typename OutputIterator, typename Generator>
-inline OutputIterator generate_n (OutputIterator first, size_t n, Generator gen)
-{
-    for (uoff_t i = 0; i != n; ++i, ++first)
-	*first = gen();
-    return (first);
-}
-
-/// \brief Reverse reverses a range.
-/// That is: for every i such that 0 <= i <= (last - first) / 2),
-/// it exchanges *(first + i) and *(last - (i + 1)).
-/// \ingroup MutatingAlgorithms
-///
-template <typename BidirectionalIterator>
-inline void reverse (BidirectionalIterator first, BidirectionalIterator last)
-{
-    for (; distance (first, --last) > 0; ++first)
-	iter_swap (first, last);
-}
-
-/// \brief Reverses [first,last) and writes it to \p output.
-/// \ingroup MutatingAlgorithms
-///
-template <typename BidirectionalIterator, typename OutputIterator>
-inline OutputIterator reverse_copy (BidirectionalIterator first, BidirectionalIterator last, OutputIterator result)
-{
-    for (; first != last; ++result)
-	*result = *--last;
-    return (result);
-}
-
-/// \brief Exchanges ranges [first, middle) and [middle, last)
-/// \ingroup MutatingAlgorithms
-///
-template <typename ForwardIterator>
-ForwardIterator rotate (ForwardIterator first, ForwardIterator middle, ForwardIterator last)
-{
-    if (first == middle || middle == last)
-	return (first);
-    reverse (first, middle);
-    reverse (middle, last);
-    for (;first != middle && middle != last; ++first)
-	iter_swap (first, --last);
-    reverse (first, (first == middle ? last : middle));
-    return (first);
-}
-
-/// Specialization for pointers, which can be treated identically.
-template <typename T>
-inline T* rotate (T* first, T* middle, T* last)
-{
-    rotate_fast (first, middle, last);
-    return (first);
-}
- 
-
-/// \brief Exchanges ranges [first, middle) and [middle, last) into \p result.
-/// \ingroup MutatingAlgorithms
-///
-template <typename ForwardIterator, typename OutputIterator>
-inline OutputIterator rotate_copy (ForwardIterator first, ForwardIterator middle, ForwardIterator last, OutputIterator result)
-{
-    return (copy (first, middle, copy (middle, last, result)));
-}
-
-/// \brief Combines two sorted ranges.
-/// \ingroup SortingAlgorithms
-///
-template <typename InputIterator1, typename InputIterator2, typename OutputIterator>
-OutputIterator merge (InputIterator1 first1, InputIterator1 last1,
-		      InputIterator2 first2, InputIterator2 last2, OutputIterator result)
-{
-    for (; first1 != last1 && first2 != last2; ++result) {
-	if (*first1 < *first2)
-	    *result = *first1++;
-	else
-	    *result = *first2++;
-    }
-    if (first1 < last1)
-	return (copy (first1, last1, result));
-    else
-	return (copy (first2, last2, result));
-}
-
-/// Combines two sorted ranges from the same container.
-/// \ingroup SortingAlgorithms
-///
-template <typename InputIterator>
-void inplace_merge (InputIterator first, InputIterator middle, InputIterator last)
-{
-    for (; middle != last; ++first) {
-	while (*first < *middle)
-	    ++ first;
-	reverse (first, middle);
-	reverse (first, ++middle);
-    }
-}
-
-/// Remove_copy copies elements that are not equal to value from the range
-/// [first, last) to a range beginning at result. The return value is the
-/// end of the resulting range. This operation is stable, meaning that the
-/// relative order of the elements that are copied is the same as in the
-/// range [first, last).
-/// \ingroup MutatingAlgorithms
-///
-template <typename InputIterator, typename OutputIterator, typename T>
-OutputIterator remove_copy (InputIterator first, InputIterator last, OutputIterator result, const T& value)
-{
-    for (; first != last; ++first) {
-	if (!(*first == value)) {
-	    *result = *first;
-	    ++ result;
-	}
-    }
-    return (result);
-}
-
-/// Remove_copy copies elements pointed to by iterators in [rfirst, rlast)
-/// from the range [first, last) to a range beginning at result. The return
-/// value is the end of the resulting range. This operation is stable, meaning
-/// that the relative order of the elements that are copied is the same as in the
-/// range [first, last). Range [rfirst, rlast) is assumed to be sorted.
-/// This algorithm is a uSTL extension.
-/// \ingroup MutatingAlgorithms
-///
-template <typename InputIterator, typename OutputIterator, typename RInputIterator>
-OutputIterator remove_copy (InputIterator first, InputIterator last, OutputIterator result, RInputIterator rfirst, RInputIterator rlast)
-{
-    for (; first != last; ++first) {
-	while (rfirst != rlast && *rfirst < first)
-	    ++ rfirst;
-	if (rfirst == rlast || first != *rfirst) {
-	    *result = *first;
-	    ++ result;
-	}
-    }
-    return (result);
-}
-
-/// Remove removes from the range [first, last) all elements that are equal to
-/// value. That is, remove returns an iterator new_last such that the range
-/// [first, new_last) contains no elements equal to value. [1] The iterators
-/// in the range [new_last, last) are all still dereferenceable, but the
-/// elements that they point to are unspecified. Remove is stable, meaning
-/// that the relative order of elements that are not equal to value is
-/// unchanged.
-/// \ingroup MutatingAlgorithms
-///
-template <typename ForwardIterator, typename T>
-inline ForwardIterator remove (ForwardIterator first, ForwardIterator last, const T& value)
-{
-    return (remove_copy (first, last, first, value));
-}
-
-/// Unique_copy copies elements from the range [first, last) to a range
-/// beginning with result, except that in a consecutive group of duplicate
-/// elements only the first one is copied. The return value is the end of
-/// the range to which the elements are copied. This behavior is similar
-/// to the Unix filter uniq.
-/// \ingroup MutatingAlgorithms
-///
-template <typename InputIterator, typename OutputIterator>
-OutputIterator unique_copy (InputIterator first, InputIterator last, OutputIterator result)
-{
-    if (first != last) {
-	*result = *first;
-	while (++first != last)
-	    if (!(*first == *result))
-		*++result = *first;
-	++ result;
-    }
-    return (result);
-}
-
-/// Every time a consecutive group of duplicate elements appears in the range
-/// [first, last), the algorithm unique removes all but the first element.
-/// That is, unique returns an iterator new_last such that the range [first,
-/// new_last) contains no two consecutive elements that are duplicates.
-/// The iterators in the range [new_last, last) are all still dereferenceable,
-/// but the elements that they point to are unspecified. Unique is stable,
-/// meaning that the relative order of elements that are not removed is
-/// unchanged.
-/// \ingroup MutatingAlgorithms
-///
-template <typename ForwardIterator>
-inline ForwardIterator unique (ForwardIterator first, ForwardIterator last)
-{
-    return (unique_copy (first, last, first));
-}
-
-/// Returns the furthermost iterator i in [first, last) such that,
-/// for every iterator j in [first, i), *j < value
-/// Assumes the range is sorted.
-/// \ingroup SearchingAlgorithms
-///
-template <typename ForwardIterator, typename LessThanComparable>
-ForwardIterator lower_bound (ForwardIterator first, ForwardIterator last, const LessThanComparable& value)
-{
-    ForwardIterator mid;
-    while (first != last) {
-	mid = advance (first, distance (first,last) / 2);
-	if (*mid < value)
-	    first = mid + 1;
-	else
-	    last = mid;
-    }
-    return (first);
-}
-
-/// Performs a binary search inside the sorted range.
-/// \ingroup SearchingAlgorithms
-///
-template <typename ForwardIterator, typename LessThanComparable>
-inline ForwardIterator binary_search (ForwardIterator first, ForwardIterator last, const LessThanComparable& value)
-{
-    ForwardIterator found = lower_bound (first, last, value);
-    return ((found == last || value < *found) ? last : found);
-}
-
-/// Returns the furthermost iterator i in [first,last) such that for
-/// every iterator j in [first,i), value < *j is false.
-/// \ingroup SearchingAlgorithms
-///
-template <typename ForwardIterator, typename LessThanComparable>
-ForwardIterator upper_bound (ForwardIterator first, ForwardIterator last, const LessThanComparable& value)
-{
-    ForwardIterator mid;
-    while (first != last) {
-	mid = advance (first, distance (first,last) / 2);
-	if (value < *mid)
-	    last = mid;
-	else
-	    first = mid + 1;
-    }
-    return (last);
-}
-
-/// Returns pair<lower_bound,upper_bound>
-/// \ingroup SearchingAlgorithms
-///
-template <typename ForwardIterator, typename LessThanComparable>
-inline pair<ForwardIterator,ForwardIterator> equal_range (ForwardIterator first, ForwardIterator last, const LessThanComparable& value)
-{
-    pair<ForwardIterator,ForwardIterator> rv;
-    rv.second = rv.first = lower_bound (first, last, value);
-    while (rv.second != last && !(value < *(rv.second)))
-	++ rv.second;
-    return (rv);
-}
-
-/// Randomly permute the elements of the container.
-/// \ingroup GeneratorAlgorithms
-///
-template <typename RandomAccessIterator>
-void random_shuffle (RandomAccessIterator first, RandomAccessIterator last)
-{
-    for (; first != last; ++ first)
-	iter_swap (first, first + (rand() % distance (first, last)));
-}
-
-/// \brief Generic compare function adaptor to pass to qsort
-/// \ingroup FunctorObjects
-template <typename ConstPointer, typename Compare>
-int qsort_adapter (const void* p1, const void* p2)
-{
-    ConstPointer i1 = reinterpret_cast<ConstPointer>(p1);
-    ConstPointer i2 = reinterpret_cast<ConstPointer>(p2);
-    Compare comp;
-    return (comp (*i1, *i2) ? -1 : (comp (*i2, *i1) ? 1 : 0));
-}
-
-/// Sorts the container
-/// \ingroup SortingAlgorithms
-/// \ingroup PredicateAlgorithms
-///
-template <typename RandomAccessIterator, typename Compare>
-void sort (RandomAccessIterator first, RandomAccessIterator last, Compare)
-{
-    typedef typename iterator_traits<RandomAccessIterator>::value_type value_type;
-    typedef typename iterator_traits<RandomAccessIterator>::const_pointer const_pointer;
-    qsort (first, distance (first, last), sizeof(value_type),
-	   &qsort_adapter<const_pointer, Compare>);
-}
-
-/// Sorts the container
-/// \ingroup SortingAlgorithms
-///
-template <typename RandomAccessIterator>
-inline void sort (RandomAccessIterator first, RandomAccessIterator last)
-{
-    typedef typename iterator_traits<RandomAccessIterator>::value_type value_type;
-    sort (first, last, less<value_type>());
-}
-
-/// Sorts the container preserving order of equal elements.
-/// \ingroup SortingAlgorithms
-/// \ingroup PredicateAlgorithms
-///
-template <typename RandomAccessIterator, typename Compare>
-void stable_sort (RandomAccessIterator first, RandomAccessIterator last, Compare comp)
-{
-    for (RandomAccessIterator j, i = first; ++i < last;) { // Insertion sort
-	for (j = i; j-- > first && !comp(*j, *i););
-	rotate (++j, i, i + 1);
-    }
-}
-
-/// Sorts the container
-/// \ingroup SortingAlgorithms
-///
-template <typename RandomAccessIterator>
-inline void stable_sort (RandomAccessIterator first, RandomAccessIterator last)
-{
-    typedef typename iterator_traits<RandomAccessIterator>::value_type value_type;
-    stable_sort (first, last, less<value_type>());
-}
-
-/// \brief Searches for the first subsequence [first2,last2) in [first1,last1)
-/// \ingroup SearchingAlgorithms
-template <typename ForwardIterator1, typename ForwardIterator2>
-inline ForwardIterator1 search (ForwardIterator1 first1, ForwardIterator1 last1, ForwardIterator2 first2, ForwardIterator2 last2)
-{
-    typedef typename iterator_traits<ForwardIterator1>::value_type value_type;
-    return (search (first1, last1, first2, last2, equal_to<value_type>()));
-}
-
-/// \brief Searches for the last subsequence [first2,last2) in [first1,last1)
-/// \ingroup SearchingAlgorithms
-template <typename ForwardIterator1, typename ForwardIterator2>
-inline ForwardIterator1 find_end (ForwardIterator1 first1, ForwardIterator1 last1, ForwardIterator2 first2, ForwardIterator2 last2)
-{
-    typedef typename iterator_traits<ForwardIterator1>::value_type value_type;
-    return (find_end (first1, last1, first2, last2, equal_to<value_type>()));
-}
-
-/// \brief Searches for the first occurence of \p count \p values in [first, last)
-/// \ingroup SearchingAlgorithms
-template <typename Iterator, typename T>
-inline Iterator search_n (Iterator first, Iterator last, size_t count, const T& value)
-{
-    typedef typename iterator_traits<Iterator>::value_type value_type;
-    return (search_n (first, last, count, value, equal_to<value_type>()));
-}
-
-/// \brief Searches [first1,last1) for the first occurrence of an element from [first2,last2)
-/// \ingroup SearchingAlgorithms
-template <typename InputIterator, typename ForwardIterator>
-inline InputIterator find_first_of (InputIterator first1, InputIterator last1, ForwardIterator first2, ForwardIterator last2)
-{
-    typedef typename iterator_traits<InputIterator>::value_type value_type;
-    return (find_first_of (first1, last1, first2, last2, equal_to<value_type>()));
-}
-
-/// \brief Returns true if [first2,last2) is a subset of [first1,last1)
-/// \ingroup ConditionAlgorithms
-/// \ingroup SetAlgorithms
-template <typename InputIterator1, typename InputIterator2>
-inline bool includes (InputIterator1 first1, InputIterator1 last1, InputIterator2 first2, InputIterator2 last2)
-{
-    typedef typename iterator_traits<InputIterator1>::value_type value_type;
-    return (includes (first1, last1, first2, last2, less<value_type>()));
-}
-
-/// \brief Merges [first1,last1) with [first2,last2)
-///
-/// Result will contain every element that is in either set. If duplicate
-/// elements are present, max(n,m) is placed in the result.
-///
-/// \ingroup SetAlgorithms
-template <typename InputIterator1, typename InputIterator2, typename OutputIterator>
-inline OutputIterator set_union (InputIterator1 first1, InputIterator1 last1, InputIterator2 first2, InputIterator2 last2, OutputIterator result)
-{
-    typedef typename iterator_traits<InputIterator1>::value_type value_type;
-    return (set_union (first1, last1, first2, last2, result, less<value_type>()));
-}
-
-/// \brief Creates a set containing elements shared by the given ranges.
-/// \ingroup SetAlgorithms
-template <typename InputIterator1, typename InputIterator2, typename OutputIterator>
-inline OutputIterator set_intersection (InputIterator1 first1, InputIterator1 last1, InputIterator2 first2, InputIterator2 last2, OutputIterator result)
-{
-    typedef typename iterator_traits<InputIterator1>::value_type value_type;
-    return (set_intersection (first1, last1, first2, last2, result, less<value_type>()));
-}
-
-/// \brief Removes from [first1,last1) elements present in [first2,last2)
-/// \ingroup SetAlgorithms
-template <typename InputIterator1, typename InputIterator2, typename OutputIterator>
-inline OutputIterator set_difference (InputIterator1 first1, InputIterator1 last1, InputIterator2 first2, InputIterator2 last2, OutputIterator result)
-{
-    typedef typename iterator_traits<InputIterator1>::value_type value_type;
-    return (set_difference (first1, last1, first2, last2, result, less<value_type>()));
-}
-
-/// \brief Performs union of sets A-B and B-A.
-/// \ingroup SetAlgorithms
-template <typename InputIterator1, typename InputIterator2, typename OutputIterator>
-inline OutputIterator set_symmetric_difference (InputIterator1 first1, InputIterator1 last1, InputIterator2 first2, InputIterator2 last2, OutputIterator result)
-{
-    typedef typename iterator_traits<InputIterator1>::value_type value_type;
-    return (set_symmetric_difference (first1, last1, first2, last2, result, less<value_type>()));
-}
-
-/// \brief Returns true if the given range is sorted.
-/// \ingroup ConditionAlgorithms
-template <typename ForwardIterator>
-inline bool is_sorted (ForwardIterator first, ForwardIterator last)
-{
-    typedef typename iterator_traits<ForwardIterator>::value_type value_type;
-    return (is_sorted (first, last, less<value_type>()));
-}
-
-/// \brief Compares two given containers like strcmp compares strings.
-/// \ingroup ConditionAlgorithms
-template <typename InputIterator1, typename InputIterator2>
-inline bool lexicographical_compare (InputIterator1 first1, InputIterator1 last1, InputIterator2 first2, InputIterator2 last2)
-{
-    typedef typename iterator_traits<InputIterator1>::value_type value_type;
-    return (lexicographical_compare (first1, last1, first2, last2, less<value_type>()));
-}
-
-/// \brief Creates the next lexicographical permutation of [first,last).
-/// Returns false if no further permutations can be created.
-/// \ingroup GeneratorAlgorithms
-template <typename BidirectionalIterator>
-inline bool next_permutation (BidirectionalIterator first, BidirectionalIterator last)
-{
-    typedef typename iterator_traits<BidirectionalIterator>::value_type value_type;
-    return (next_permutation (first, last, less<value_type>()));
-}
-
-/// \brief Creates the previous lexicographical permutation of [first,last).
-/// Returns false if no further permutations can be created.
-/// \ingroup GeneratorAlgorithms
-template <typename BidirectionalIterator>
-inline bool prev_permutation (BidirectionalIterator first, BidirectionalIterator last)
-{
-    typedef typename iterator_traits<BidirectionalIterator>::value_type value_type;
-    return (prev_permutation (first, last, less<value_type>()));
-}
-
-/// \brief Returns iterator to the max element in [first,last)
-/// \ingroup SearchingAlgorithms
-template <typename ForwardIterator>
-inline ForwardIterator max_element (ForwardIterator first, ForwardIterator last)
-{
-    typedef typename iterator_traits<ForwardIterator>::value_type value_type;
-    return (max_element (first, last, less<value_type>()));
-}
-
-/// \brief Returns iterator to the min element in [first,last)
-/// \ingroup SearchingAlgorithms
-template <typename ForwardIterator>
-inline ForwardIterator min_element (ForwardIterator first, ForwardIterator last)
-{
-    typedef typename iterator_traits<ForwardIterator>::value_type value_type;
-    return (min_element (first, last, less<value_type>()));
-}
-
-/// \brief Makes [first,middle) a part of the sorted array.
-/// Contents of [middle,last) is undefined. This implementation just calls stable_sort.
-/// \ingroup SortingAlgorithms
-template <typename RandomAccessIterator>
-inline void partial_sort (RandomAccessIterator first, RandomAccessIterator middle, RandomAccessIterator last)
-{
-    typedef typename iterator_traits<RandomAccessIterator>::value_type value_type;
-    partial_sort (first, middle, last, less<value_type>());
-}
-
-/// \brief Puts \p nth element into its sorted position.
-/// In this implementation, the entire array is sorted. I can't think of any
-/// use for it where the time gained would be useful.
-/// \ingroup SortingAlgorithms
-/// \ingroup SearchingAlgorithms
-///
-template <typename RandomAccessIterator>
-inline void nth_element (RandomAccessIterator first, RandomAccessIterator nth, RandomAccessIterator last)
-{
-    partial_sort (first, nth, last);
-}
-
-/// \brief Like partial_sort, but outputs to [result_first,result_last)
-/// \ingroup SortingAlgorithms
-template <typename InputIterator, typename RandomAccessIterator>
-inline RandomAccessIterator partial_sort_copy (InputIterator first, InputIterator last, RandomAccessIterator result_first, RandomAccessIterator result_last)
-{
-    typedef typename iterator_traits<InputIterator>::value_type value_type;
-    return (partial_sort_copy (first, last, result_first, result_last, less<value_type>()));
-}
-
-} // namespace ustl
-
-#endif
-
diff --git a/media/libdrm/mobile2/src/util/ustl-1.0/ualgobase.cpp b/media/libdrm/mobile2/src/util/ustl-1.0/ualgobase.cpp
deleted file mode 100644
index 9764cd1..0000000
--- a/media/libdrm/mobile2/src/util/ustl-1.0/ualgobase.cpp
+++ /dev/null
@@ -1,293 +0,0 @@
-// This file is part of the ustl library, an STL implementation.
-//
-// Copyright (C) 2005 by Mike Sharov <msharov@users.sourceforge.net>
-// This file is free software, distributed under the MIT License.
-//
-// ualgobase.cc
-//
-// Copy and fill optimizations are here.
-//
-
-#ifndef NDEBUG	// Optimized code here. asserts slow it down, and are checked elsewhere.
-#define NDEBUG
-#endif
-
-#include "ualgo.h"
-
-#undef CPU_HAS_MMX
-
-namespace ustl {
-
-// Generic version for implementing fill_nX_fast on non-i386 architectures.
-template <typename T> inline void stosv (T*& p, size_t n, T v)
-    { while (n--) *p++ = v; }
-
-#if defined(__i386__) || defined(__x86_64__)
-
-//----------------------------------------------------------------------
-// Copy functions
-//----------------------------------------------------------------------
-
-#if __GNUC__ >= 3
-static inline void movsb_dir_up (void) __attribute__((always_inline));
-static inline void movsb_dir_down (void) __attribute__((always_inline));
-static inline void movsb (const void*& src, size_t nBytes, void*& dest) __attribute__((always_inline));
-static inline void movsd (const void*& src, size_t nWords, void*& dest) __attribute__((always_inline));
-#endif
-
-static inline void movsb_dir_up (void) { asm volatile ("cld"); }
-static inline void movsb_dir_down (void) { asm volatile ("std"); }
-
-static inline void movsb (const void*& src, size_t nBytes, void*& dest)
-{
-    asm volatile ("rep;\n\tmovsb"
-	: "=&S"(src), "=&D"(dest), "=&c"(nBytes)
-	: "0"(src), "1"(dest), "2"(nBytes)
-	: "memory");
-}
-
-static inline void movsd (const void*& src, size_t nWords, void*& dest)
-{
-    asm volatile ("rep;\n\tmovsl"
-	: "=&S"(src), "=&D"(dest), "=&c"(nWords)
-	: "0"(src), "1"(dest), "2"(nWords)
-	: "memory");
-}
-
-template <> inline void stosv (uint8_t*& p, size_t n, uint8_t v)
-{ asm volatile ("rep;\n\tstosb" : "=&D"(p), "=c"(n) : "0"(p), "1"(n), "a"(v) : "memory"); }
-template <> inline void stosv (uint16_t*& p, size_t n, uint16_t v)
-{ asm volatile ("rep;\n\tstosw" : "=&D"(p), "=c"(n) : "0"(p), "1"(n), "a"(v) : "memory"); }
-template <> inline void stosv (uint32_t*& p, size_t n, uint32_t v)
-{ asm volatile ("rep;\n\tstosl" : "=&D"(p), "=c"(n) : "0"(p), "1"(n), "a"(v) : "memory"); }
-
-#if CPU_HAS_MMX
-#define MMX_ALIGN	16U	// Data must be aligned on this grain
-#define MMX_BS		32U	// Assembly routines copy data this many bytes at a time.
-
-static inline void simd_block_copy (const void* src, void* dest) __attribute__((always_inline));
-static inline void simd_block_store (uint8_t* dest) __attribute__((always_inline));
-static inline void simd_block_cleanup (void) __attribute__((always_inline));
-
-static inline void simd_block_copy (const void* src, void* dest)
-{
-    const char* csrc ((const char*) src);
-    char* cdest ((char*) dest);
-    #if CPU_HAS_SSE
-    asm (
-	"movaps\t%2, %%xmm0	\n\t"
-	"movaps\t%3, %%xmm1	\n\t"
-	"movntps\t%%xmm0, %0	\n\t"
-	"movntps\t%%xmm1, %1"
-	: "=m"(cdest[0]), "=m"(cdest[16])
-	: "m"(csrc[0]), "m"(csrc[16])
-	: "xmm0", "xmm1");
-    #else
-    asm (
-	"movq	%4, %%mm0	\n\t"
-	"movq	%5, %%mm1	\n\t"
-	"movq	%6, %%mm2	\n\t"
-	"movq	%7, %%mm3	\n\t"
-	"movq	%%mm0, %0	\n\t"
-	"movq	%%mm1, %1	\n\t"
-	"movq	%%mm2, %2	\n\t"
-	"movq	%%mm3, %3"
-	: "=m"(cdest[0]), "=m"(cdest[8]), "=m"(cdest[16]), "=m"(cdest[24])
-	: "m"(csrc[0]), "m"(csrc[8]), "m"(csrc[16]), "m"(csrc[24])
-	: "mm0", "mm1", "mm2", "mm3", "st", "st(1)", "st(2)", "st(3)");
-    #endif
-}
-
-static inline void simd_block_store (uint8_t* dest)
-{
-    #if CPU_HAS_SSE
-    asm volatile (
-	"movntq %%mm0, %0\n\t"
-	"movntq %%mm0, %1\n\t"
-	"movntq %%mm0, %2\n\t"
-	"movntq %%mm0, %3"
-	: "=m"(dest[0]), "=m"(dest[8]), "=m"(dest[16]), "=m"(dest[24]));
-    #else
-    asm volatile (
-	"movq %%mm0, %0	\n\t"
-	"movq %%mm0, %1	\n\t"
-	"movq %%mm0, %2	\n\t"
-	"movq %%mm0, %3"
-	: "=m"(dest[0]), "=m"(dest[8]), "=m"(dest[16]), "=m"(dest[24]));
-    #endif
-}
-
-static inline void simd_block_cleanup (void)
-{
-    #if !CPU_HAS_SSE
-	simd::reset_mmx();
-    #endif
-    asm volatile ("sfence");
-}
-
-/// The fastest optimized raw memory copy.
-void copy_n_fast (const void* src, size_t nBytes, void* dest)
-{
-    movsb_dir_up();
-    size_t nHeadBytes = Align(uintptr_t(src), MMX_ALIGN) - uintptr_t(src);
-    nHeadBytes = min (nHeadBytes, nBytes);
-    movsb (src, nHeadBytes, dest);
-    nBytes -= nHeadBytes;
-    if (!(uintptr_t(dest) % MMX_ALIGN)) {
-	const size_t nMiddleBlocks = nBytes / MMX_BS;
-	for (uoff_t i = 0; i < nMiddleBlocks; ++ i) {
-	    prefetch (advance (src, 512), 0, 0);
-	    simd_block_copy (src, dest);
-	    src = advance (src, MMX_BS);
-	    dest = advance (dest, MMX_BS);
-	}
-	simd_block_cleanup();
-	nBytes %= MMX_BS;
-    }
-    movsb (src, nBytes, dest);
-}
-#endif // CPU_HAS_MMX
-
-/// The fastest optimized backwards raw memory copy.
-void copy_backward_fast (const void* first, const void* last, void* result)
-{
-    prefetch (first, 0, 0);
-    prefetch (result, 1, 0);
-    size_t nBytes (distance (first, last));
-    movsb_dir_down();
-    size_t nHeadBytes = uintptr_t(last) % 4;
-    last = advance (last, -1);
-    result = advance (result, -1);
-    movsb (last, nHeadBytes, result);
-    nBytes -= nHeadBytes;
-    if (uintptr_t(result) % 4 == 3) {
-	const size_t nMiddleBlocks = nBytes / 4;
-	last = advance (last, -3);
-	result = advance (result, -3);
-	movsd (last, nMiddleBlocks, result);
-	nBytes %= 4;
-    }
-    movsb (last, nBytes, result);
-    movsb_dir_up();
-}
-#endif // __i386__
-
-//----------------------------------------------------------------------
-// Fill functions
-//----------------------------------------------------------------------
-
-#if CPU_HAS_MMX
-template <typename T> inline void build_block (T) {}
-template <> inline void build_block (uint8_t v)
-{
-    asm volatile (
-	"movd %0, %%mm0\n\tpunpcklbw %%mm0, %%mm0\n\tpshufw $0, %%mm0, %%mm0"
-	: : "g"(uint32_t(v)) : "mm0");
-}
-template <> inline void build_block (uint16_t v)
-{
-    asm volatile (
-	"movd %0, %%mm0\n\tpshufw $0, %%mm0, %%mm0"
-	: : "g"(uint32_t(v)) : "mm0");
-}
-template <> inline void build_block (uint32_t v)
-{
-    asm volatile (
-	"movd %0, %%mm0\n\tpunpckldq %%mm0, %%mm0"
-	: : "g"(uint32_t(v)) : "mm0");
-}
-
-static inline void simd_block_fill_loop (uint8_t*& dest, size_t count)
-{
-    prefetch (advance (dest, 512), 1, 0);
-    for (uoff_t i = 0; i < count; ++ i, dest += MMX_BS)
-	simd_block_store (dest);
-    simd_block_cleanup();
-    simd::reset_mmx();
-}
-
-template <typename T>
-inline void fill_n_fast (T* dest, size_t count, T v)
-{
-    size_t nHead = Align(uintptr_t(dest), MMX_ALIGN) - uintptr_t(dest) / sizeof(T);
-    nHead = min (nHead, count);
-    stosv (dest, nHead, v);
-    count -= nHead;
-    build_block (v);
-    simd_block_fill_loop ((uint8_t*&) dest, count * sizeof(T) / MMX_BS);
-    count %= MMX_BS;
-    stosv (dest, count, v);
-}
-
-void fill_n8_fast (uint8_t* dest, size_t count, uint8_t v)
-    { fill_n_fast (dest, count, v); }
-void fill_n16_fast (uint16_t* dest, size_t count, uint16_t v)
-    { fill_n_fast (dest, count, v); }
-void fill_n32_fast (uint32_t* dest, size_t count, uint32_t v)
-    { fill_n_fast (dest, count, v); }
-#else
-void fill_n8_fast (uint8_t* dest, size_t count, uint8_t v) { memset (dest, v, count); }
-void fill_n16_fast (uint16_t* dest, size_t count, uint16_t v) { stosv (dest, count, v); }
-void fill_n32_fast (uint32_t* dest, size_t count, uint32_t v) { stosv (dest, count, v); }
-#endif // CPU_HAS_MMX
-
-/// Exchanges ranges [first, middle) and [middle, last)
-void rotate_fast (void* first, void* middle, void* last)
-{
-#ifdef HAVE_ALLOCA_H
-    const size_t half1 (distance (first, middle)), half2 (distance (middle, last));
-    const size_t hmin (min (half1, half2));
-  if (!hmin) {
-	return;
-  }
-    void* buf = alloca (hmin);
-    if (buf) {
-	if (half2 < half1) {
-	    copy_n_fast (middle, half2, buf);
-	    copy_backward_fast (first, middle, last);
-	    copy_n_fast (buf, half2, first);
-	} else {
-	    copy_n_fast (first, half1, buf);
-	    copy_n_fast (middle, half2, first);
-	    copy_n_fast (buf, half1, advance (first, half2));
-	}
-    } else
-#else
-    if (first == middle || middle == last) {
-	return;
-    }
-#endif
-    {
-	char* f = (char*) first;
-	char* m = (char*) middle;
-	char* l = (char*) last;
-	reverse (f, m);
-	reverse (m, l);
-	while (f != m && m != l)
-	    iter_swap (f++, --l);
-	reverse (f, (f == m ? l : m));
-    }
-}
-
-#if __GNUC__ < 4
-size_t popcount (uint32_t v)
-{
-    const uint32_t w = v - ((v >> 1) & 0x55555555); // Algorithm from AMD optimization guide
-    const uint32_t x = (w & 0x33333333) + ((w >> 2) & 0x33333333);
-    return (((x + (x >> 4) & 0x0F0F0F0F) * 0x01010101) >> 24);
-}
-
-#if HAVE_INT64_T
-/// \brief Returns the number of 1s in \p v in binary.
-size_t popcount (uint64_t v)
-{
-    v -= (v >> 1) & UINT64_C(0x5555555555555555);		// Algorithm from Wikipedia
-    v = (v & UINT64_C(0x3333333333333333)) + ((v >> 2) & UINT64_C(0x3333333333333333));
-    v = (v + (v >> 4)) & UINT64_C(0x0F0F0F0F0F0F0F0F);
-    return ((v * UINT64_C(0x0101010101010101)) >> 56);
-}
-#endif	// HAVE_INT64_T
-#endif	// !__GNUC__
-
-} // namespace ustl
-
diff --git a/media/libdrm/mobile2/src/util/ustl-1.0/ualgobase.h b/media/libdrm/mobile2/src/util/ustl-1.0/ualgobase.h
deleted file mode 100644
index 38c1a72..0000000
--- a/media/libdrm/mobile2/src/util/ustl-1.0/ualgobase.h
+++ /dev/null
@@ -1,334 +0,0 @@
-// This file is part of the ustl library, an STL implementation.
-//
-// Copyright (C) 2005 by Mike Sharov <msharov@users.sourceforge.net>
-// This file is free software, distributed under the MIT License.
-//
-// ualgobase.h
-//
-// Implementation of STL algorithms.
-//
-// The function prototypes are copied
-// exactly from the SGI version of STL documentation along with comments about
-// their use. The code is NOT the same, though the functionality usually is.
-//
-
-#ifndef UALGOBASE_H_683A0BE77546133C4CE0E3622CFAA2EB
-#define UALGOBASE_H_683A0BE77546133C4CE0E3622CFAA2EB
-
-#include "uutility.h"
-#include <string.h>
-
-#if PLATFORM_ANDROID
-#include <stdio.h>
-#undef CPU_HAS_MMX
-#endif
-
-namespace ustl {
-
-/// Assigns the contents of a to b and the contents of b to a.
-/// This is used as a primitive operation by many other algorithms. 
-/// \ingroup SwapAlgorithms
-///
-template <typename Assignable> 
-inline void swap (Assignable& a, Assignable& b)
-{
-    Assignable tmp = a;
-    a = b;
-    b = tmp;
-}
-
-/// Equivalent to swap (*a, *b)
-/// \ingroup SwapAlgorithms
-///
-template <typename Iterator> 
-inline void iter_swap (Iterator a, Iterator b)
-{
-    swap (*a, *b);
-}
-
-/// Copy copies elements from the range [first, last) to the range
-/// [result, result + (last - first)). That is, it performs the assignments
-/// *result = *first, *(result + 1) = *(first + 1), and so on. [1] Generally,
-/// for every integer n from 0 to last - first, copy performs the assignment
-/// *(result + n) = *(first + n). Assignments are performed in forward order,
-/// i.e. in order of increasing n. 
-/// \ingroup MutatingAlgorithms
-///
-template <typename InputIterator, typename OutputIterator>
-inline OutputIterator copy (InputIterator first, InputIterator last, OutputIterator result)
-{
-    for (; first != last; ++result, ++first)
-	*result = *first;
-    return (result);
-}
-
-/// Copy_n copies elements from the range [first, first + n) to the range
-/// [result, result + n). That is, it performs the assignments
-/// *result = *first, *(result + 1) = *(first + 1), and so on. Generally,
-/// for every integer i from 0 up to (but not including) n, copy_n performs
-/// the assignment *(result + i) = *(first + i). Assignments are performed
-/// in forward order, i.e. in order of increasing n.
-/// \ingroup MutatingAlgorithms
-///
-template <typename InputIterator, typename OutputIterator>
-inline OutputIterator copy_n (InputIterator first, size_t count, OutputIterator result)
-{
-    for (; count; --count, ++result, ++first)
-	*result = *first;
-    return (result);
-}
-
-/// \brief Copy copies elements from the range (last, first] to result.
-/// \ingroup MutatingAlgorithms
-/// Copies elements starting at last, decrementing both last and result.
-///
-template <typename InputIterator, typename OutputIterator>
-inline OutputIterator copy_backward (InputIterator first, InputIterator last, OutputIterator result)
-{
-    while (first != last)
-	*--result = *--last;
-    return (result);
-}
-
-/// For_each applies the function object f to each element in the range
-/// [first, last); f's return value, if any, is ignored. Applications are
-/// performed in forward order, i.e. from first to last. For_each returns
-/// the function object after it has been applied to each element.
-/// \ingroup MutatingAlgorithms
-///
-template <typename InputIterator, typename UnaryFunction>
-inline UnaryFunction for_each (InputIterator first, InputIterator last, UnaryFunction f)
-{
-    for (; first != last; ++first)
-	f (*first);
-    return (f);
-}
-
-/// Fill assigns the value value to every element in the range [first, last).
-/// That is, for every iterator i in [first, last),
-/// it performs the assignment *i = value.
-/// \ingroup GeneratorAlgorithms
-///
-template <typename ForwardIterator, typename T>
-inline void fill (ForwardIterator first, ForwardIterator last, const T& value)
-{
-    for (; first != last; ++first)
-	*first = value;
-}
-
-/// Fill_n assigns the value value to every element in the range
-/// [first, first+count). That is, for every iterator i in [first, first+count),
-/// it performs the assignment *i = value. The return value is first + count.
-/// \ingroup GeneratorAlgorithms
-///
-template <typename OutputIterator, typename T>
-inline OutputIterator fill_n (OutputIterator first, size_t count, const T& value)
-{
-    for (; count; --count, ++first)
-	*first = value;
-    return (first);
-}
-
-#if CPU_HAS_MMX
-extern "C" void copy_n_fast (const void* src, size_t count, void* dest);
-#else
-inline void copy_n_fast (const void* src, size_t count, void* dest)
-{ memcpy (dest, src, count); }
-#endif
-#if __i386__ || __x86_64__
-extern "C" void copy_backward_fast (const void* first, const void* last, void* result);
-#else
-inline void copy_backward_fast (const void* first, const void* last, void* result)
-{
-    const size_t nBytes (distance (first, last));
-    memmove (advance (result, -nBytes), first, nBytes);
-}
-#endif
-extern "C" void fill_n8_fast (uint8_t* dest, size_t count, uint8_t v);
-extern "C" void fill_n16_fast (uint16_t* dest, size_t count, uint16_t v);
-extern "C" void fill_n32_fast (uint32_t* dest, size_t count, uint32_t v);
-extern "C" void rotate_fast (void* first, void* middle, void* last);
-
-#if __GNUC__ >= 4
-/// \brief Computes the number of 1 bits in a number.
-/// \ingroup ConditionAlgorithms
-inline size_t popcount (uint32_t v)	{ return (__builtin_popcount (v)); }
-#if HAVE_INT64_T
-inline size_t popcount (uint64_t v)	{ return (__builtin_popcountll (v)); }
-#endif
-#else
-size_t popcount (uint32_t v);
-#if HAVE_INT64_T
-size_t popcount (uint64_t v);
-#endif	// HAVE_INT64_T
-#endif	// __GNUC__
-
-//----------------------------------------------------------------------
-// Optimized versions for standard types
-//----------------------------------------------------------------------
-
-#if WANT_UNROLLED_COPY
-
-template <typename T>
-inline T* unrolled_copy (const T* first, size_t count, T* result)
-{
-    copy_n_fast (first, count * sizeof(T), result);
-    return (advance (result, count));
-}
-
-template <>
-inline uint8_t* copy_backward (const uint8_t* first, const uint8_t* last, uint8_t* result)
-{
-    copy_backward_fast (first, last, result);
-    return (result);
-}
-
-template <typename T>
-inline T* unrolled_fill (T* result, size_t count, T value)
-{
-    for (; count; --count, ++result)
-	*result = value;
-    return (result);
-}
-template <> inline uint8_t* unrolled_fill (uint8_t* result, size_t count, uint8_t value)
-    { fill_n8_fast (result, count, value); return (advance (result, count)); }
-template <> inline uint16_t* unrolled_fill (uint16_t* result, size_t count, uint16_t value)
-    { fill_n16_fast (result, count, value); return (advance (result, count)); }
-template <> inline uint32_t* unrolled_fill (uint32_t* result, size_t count, uint32_t value)
-    { fill_n32_fast (result, count, value); return (advance (result, count)); }
-template <> inline float* unrolled_fill (float* result, size_t count, float value)
-    { fill_n32_fast ((uint32_t*) result, count, noalias(uint32_t(),&value)); return (advance (result, count)); }
-
-#if CPU_HAS_MMX
-#define UNROLLED_COPY_SPECIALIZATION(type)						\
-template <> inline type* copy (const type* first, const type* last, type* result)	\
-{ return (unrolled_copy (first, distance (first, last), result)); }			\
-template <> inline type* copy_n (const type* first, size_t count, type* result)		\
-{ return (unrolled_copy (first, count, result)); }
-#define UNROLLED_FILL_SPECIALIZATION(type)						\
-template <> inline void fill (type* first, type* last, const type& value)		\
-{ unrolled_fill (first, distance (first, last), value); }				\
-template <> inline type* fill_n (type* first, size_t count, const type& value)		\
-{ return (unrolled_fill (first, count, value)); }
-UNROLLED_COPY_SPECIALIZATION(uint8_t)
-UNROLLED_FILL_SPECIALIZATION(uint8_t)
-UNROLLED_COPY_SPECIALIZATION(uint16_t)
-UNROLLED_FILL_SPECIALIZATION(uint16_t)
-UNROLLED_COPY_SPECIALIZATION(uint32_t)
-UNROLLED_FILL_SPECIALIZATION(uint32_t)
-UNROLLED_COPY_SPECIALIZATION(float)
-UNROLLED_FILL_SPECIALIZATION(float)
-#undef UNROLLED_FILL_SPECIALIZATION
-#undef UNROLLED_COPY_SPECIALIZATION
-#endif // WANT_UNROLLED_COPY
-#endif // CPU_HAS_MMX
-
-// Specializations for void* and char*, aliasing the above optimized versions.
-//
-// All these need duplication with const and non-const arguments, since
-// otherwise the compiler will default to the unoptimized version for
-// pointers not const in the caller's context, such as local variables.
-// These are all inline, but they sure slow down compilation... :(
-//
-#define COPY_ALIAS_FUNC(ctype, type, alias_type)			\
-template <> inline type* copy (ctype* first, ctype* last, type* result)	\
-{ return ((type*) copy ((const alias_type*) first, (const alias_type*) last, (alias_type*) result)); }
-#if WANT_UNROLLED_COPY
-#if HAVE_THREE_CHAR_TYPES
-COPY_ALIAS_FUNC(const char, char, uint8_t)
-COPY_ALIAS_FUNC(char, char, uint8_t)
-#endif
-COPY_ALIAS_FUNC(const int8_t, int8_t, uint8_t)
-COPY_ALIAS_FUNC(int8_t, int8_t, uint8_t)
-COPY_ALIAS_FUNC(uint8_t, uint8_t, uint8_t)
-COPY_ALIAS_FUNC(const int16_t, int16_t, uint16_t)
-COPY_ALIAS_FUNC(int16_t, int16_t, uint16_t)
-COPY_ALIAS_FUNC(uint16_t, uint16_t, uint16_t)
-#if CPU_HAS_MMX || (SIZE_OF_LONG > 4)
-COPY_ALIAS_FUNC(const int32_t, int32_t, uint32_t)
-COPY_ALIAS_FUNC(int32_t, int32_t, uint32_t)
-COPY_ALIAS_FUNC(uint32_t, uint32_t, uint32_t)
-#endif
-#endif
-COPY_ALIAS_FUNC(const void, void, uint8_t)
-COPY_ALIAS_FUNC(void, void, uint8_t)
-#undef COPY_ALIAS_FUNC
-#define COPY_BACKWARD_ALIAS_FUNC(ctype, type, alias_type)				\
-template <> inline type* copy_backward (ctype* first, ctype* last, type* result)	\
-{ return ((type*) copy_backward ((const alias_type*) first, (const alias_type*) last, (alias_type*) result)); }
-#if WANT_UNROLLED_COPY
-#if HAVE_THREE_CHAR_TYPES
-COPY_BACKWARD_ALIAS_FUNC(char, char, uint8_t)
-#endif
-COPY_BACKWARD_ALIAS_FUNC(uint8_t, uint8_t, uint8_t)
-COPY_BACKWARD_ALIAS_FUNC(int8_t, int8_t, uint8_t)
-COPY_BACKWARD_ALIAS_FUNC(uint16_t, uint16_t, uint8_t)
-COPY_BACKWARD_ALIAS_FUNC(const uint16_t, uint16_t, uint8_t)
-COPY_BACKWARD_ALIAS_FUNC(int16_t, int16_t, uint8_t)
-COPY_BACKWARD_ALIAS_FUNC(const int16_t, int16_t, uint8_t)
-#endif
-COPY_BACKWARD_ALIAS_FUNC(void, void, uint8_t)
-COPY_BACKWARD_ALIAS_FUNC(const void, void, uint8_t)
-#undef COPY_BACKWARD_ALIAS_FUNC
-#define FILL_ALIAS_FUNC(type, alias_type, v_type)				\
-template <> inline void fill (type* first, type* last, const v_type& value)	\
-{ fill ((alias_type*) first, (alias_type*) last, (const alias_type&) value); }
-FILL_ALIAS_FUNC(void, uint8_t, char)
-FILL_ALIAS_FUNC(void, uint8_t, uint8_t)
-#if WANT_UNROLLED_COPY
-#if HAVE_THREE_CHAR_TYPES
-FILL_ALIAS_FUNC(char, uint8_t, char)
-FILL_ALIAS_FUNC(char, uint8_t, uint8_t)
-#endif
-FILL_ALIAS_FUNC(int8_t, uint8_t, int8_t)
-FILL_ALIAS_FUNC(int16_t, uint16_t, int16_t)
-#if CPU_HAS_MMX || (SIZE_OF_LONG > 4)
-FILL_ALIAS_FUNC(int32_t, uint32_t, int32_t)
-#endif
-#endif
-#undef FILL_ALIAS_FUNC
-#define COPY_N_ALIAS_FUNC(ctype, type, alias_type)					\
-template <> inline type* copy_n (ctype* first, size_t count, type* result)	\
-{ return ((type*) copy_n ((const alias_type*) first, count, (alias_type*) result)); }
-COPY_N_ALIAS_FUNC(const void, void, uint8_t)
-COPY_N_ALIAS_FUNC(void, void, uint8_t)
-#if WANT_UNROLLED_COPY
-#if HAVE_THREE_CHAR_TYPES
-COPY_N_ALIAS_FUNC(const char, char, uint8_t)
-COPY_N_ALIAS_FUNC(char, char, uint8_t)
-#endif
-COPY_N_ALIAS_FUNC(int8_t, int8_t, uint8_t)
-COPY_N_ALIAS_FUNC(uint8_t, uint8_t, uint8_t)
-COPY_N_ALIAS_FUNC(const int8_t, int8_t, uint8_t)
-COPY_N_ALIAS_FUNC(int16_t, int16_t, uint16_t)
-COPY_N_ALIAS_FUNC(uint16_t, uint16_t, uint16_t)
-COPY_N_ALIAS_FUNC(const int16_t, int16_t, uint16_t)
-#if CPU_HAS_MMX || (SIZE_OF_LONG > 4)
-COPY_N_ALIAS_FUNC(int32_t, int32_t, uint32_t)
-COPY_N_ALIAS_FUNC(uint32_t, uint32_t, uint32_t)
-COPY_N_ALIAS_FUNC(const int32_t, int32_t, uint32_t)
-#endif
-#endif
-#undef COPY_N_ALIAS_FUNC
-#define FILL_N_ALIAS_FUNC(type, alias_type, v_type)				\
-template <> inline type* fill_n (type* first, size_t n, const v_type& value)	\
-{ return ((type*) fill_n ((alias_type*) first, n, (const alias_type&) value)); }
-FILL_N_ALIAS_FUNC(void, uint8_t, char)
-FILL_N_ALIAS_FUNC(void, uint8_t, uint8_t)
-#if WANT_UNROLLED_COPY
-#if HAVE_THREE_CHAR_TYPES
-FILL_N_ALIAS_FUNC(char, uint8_t, char)
-FILL_N_ALIAS_FUNC(char, uint8_t, uint8_t)
-#endif
-FILL_N_ALIAS_FUNC(int8_t, uint8_t, int8_t)
-FILL_N_ALIAS_FUNC(int16_t, uint16_t, int16_t)
-#if CPU_HAS_MMX || (SIZE_OF_LONG > 4)
-FILL_N_ALIAS_FUNC(int32_t, uint32_t, int32_t)
-#endif
-#endif
-#undef FILL_N_ALIAS_FUNC
-
-} // namespace ustl
-
-#endif
-
diff --git a/media/libdrm/mobile2/src/util/ustl-1.0/uassert.h b/media/libdrm/mobile2/src/util/ustl-1.0/uassert.h
deleted file mode 100644
index a9fde46..0000000
--- a/media/libdrm/mobile2/src/util/ustl-1.0/uassert.h
+++ /dev/null
@@ -1,21 +0,0 @@
-// uassert.h
-
-#ifndef UASSERT_H
-#define UASSERT_H
-
-#if PLATFORM_ANDROID
-#include <stdio.h>
-
-#undef assert
-#define assert(x) _uassert((x), #x, __FILE__, __LINE__)
-
-static void _uassert(int x, const char *xstr, const char *file, int line) {
-  if (!x) {
-    printf("assert %s failed at %s:%d\n", xstr, file, line);
-  }
-}
-#else
-#include <assert.h>
-#endif
-
-#endif
diff --git a/media/libdrm/mobile2/src/util/ustl-1.0/ubitset.cpp b/media/libdrm/mobile2/src/util/ustl-1.0/ubitset.cpp
deleted file mode 100644
index 21b5a7a..0000000
--- a/media/libdrm/mobile2/src/util/ustl-1.0/ubitset.cpp
+++ /dev/null
@@ -1,38 +0,0 @@
-// This file is part of the ustl library, an STL implementation.
-//
-// Copyright (C) 2005 by Mike Sharov <msharov@users.sourceforge.net>
-// This file is free software, distributed under the MIT License.
-//
-// ubitset.cc
-//
-
-#include "ubitset.h"
-
-namespace ustl {
-
-/// Copies bits from \p v of size \p n into \p buf as MSB "1011001..." LSB
-/// If \p buf is too small, MSB bits will be truncated.
-void convert_to_bitstring (const bitset_value_type* v, size_t n, string& buf)
-{
-    string::iterator stri = buf.end();
-    for (size_t i = 0; i < n && stri > buf.begin(); ++ i)
-	for (bitset_value_type b = 1; b && stri > buf.begin(); b <<= 1)
-	    *--stri = (v[i] & b) ? '1' : '0';
-}
-
-/// Copies bits from \p buf as MSB "1011001..." LSB into \p v of size \p n.
-void convert_from_bitstring (const string& buf, bitset_value_type* v, size_t n)
-{
-    string::const_iterator stri = buf.end();
-    for (size_t i = 0; i < n; ++ i) {
-	for (bitset_value_type b = 1; b; b <<= 1) {
-	    if (stri == buf.begin() || *--stri == '0')
-		v[i] &= ~b;
-	    else
-		v[i] |= b;
-	}
-    }
-}
-
-} // namespace ustl
-
diff --git a/media/libdrm/mobile2/src/util/ustl-1.0/ubitset.h b/media/libdrm/mobile2/src/util/ustl-1.0/ubitset.h
deleted file mode 100644
index 4f53a95..0000000
--- a/media/libdrm/mobile2/src/util/ustl-1.0/ubitset.h
+++ /dev/null
@@ -1,131 +0,0 @@
-// This file is part of the ustl library, an STL implementation.
-//
-// Copyright (C) 2005 by Mike Sharov <msharov@users.sourceforge.net>
-// This file is free software, distributed under the MIT License.
-//
-// ubitset.h
-//
-#ifndef UBITSET_H_7B6450EC1400CBA45DCE0127739F82EE
-#define UBITSET_H_7B6450EC1400CBA45DCE0127739F82EE
-
-#include "uassert.h"
-#include "ustring.h"
-#include "ufunction.h"
-
-namespace ustl {
-
-typedef uint32_t	bitset_value_type;
-
-void convert_to_bitstring (const bitset_value_type* v, size_t n, string& buf);
-void convert_from_bitstring (const string& buf, bitset_value_type* v, size_t n);
-
-/// \class bitset ubitset.h ustl.h
-/// \ingroup Sequences
-///
-/// \brief bitset is a fixed-size block of memory with addressable bits.
-///
-/// Normally used for state flags; allows setting and unsetting of individual
-/// bits as well as bitwise operations on the entire set. The interface is
-/// most like that of unsigned integers, and is intended to be used as such.
-/// If you were using begin() and end() functions in STL's bitset, you would
-/// not be able to do the same thing here, because those functions return
-/// host type iterators, not bits.
-///
-template <size_t Size>
-class bitset {
-public:
-    typedef bitset_value_type	value_type;
-    typedef value_type*		pointer;
-    typedef const value_type*	const_pointer;
-    typedef pointer		iterator;
-    typedef const_pointer	const_iterator;
-    typedef size_t		difference_type;
-    typedef size_t		size_type;
-private:
-    static const size_t s_WordBits	= BitsInType (value_type);
-    static const size_t	s_nWords	= Size / s_WordBits + ((Size % s_WordBits) != 0);
-    static const size_t	s_nBits		= s_nWords * s_WordBits;
-private:
-    inline value_type&		BitRef (uoff_t n)	{ assert (n < Size); return (m_Bits [n / s_WordBits]); }
-    inline const value_type	BitRef (uoff_t n) const	{ assert (n < Size); return (m_Bits [n / s_WordBits]); }
-    inline const value_type	Mask (uoff_t n) const	{ assert (n < Size); return (1 << (n % s_WordBits)); }
-public:
-    inline		bitset (value_type v = 0)	{ fill_n (m_Bits, s_nWords, 0); m_Bits[0] = v; }
-    inline		bitset (const string& buf)	{ convert_from_bitstring (buf, m_Bits, s_nWords); }
-    inline void		flip (uoff_t n)			{ BitRef(n) ^= Mask(n); }
-    inline void		reset (void)			{ fill_n (m_Bits, s_nWords, 0); }
-    inline void		clear (void)			{ fill_n (m_Bits, s_nWords, 0); }
-    inline void		set (void)			{ fill_n (m_Bits, s_nWords, -1); }
-    inline bitset	operator~ (void) const		{ bitset rv (*this); rv.flip(); return (rv); }
-    inline size_type	size (void) const		{ return (Size); }
-    inline size_type	capacity (void) const		{ return (s_nBits); }
-    inline const bool	test (uoff_t n) const		{ return (BitRef(n) & Mask(n)); }
-    inline const bool	operator[] (uoff_t n) const	{ return (test(n)); }
-  inline const_iterator	begin (void) const		{ return (m_Bits); }
-    inline iterator	begin (void)			{ return (m_Bits); }
-  inline const_iterator	end (void) const		{ return (m_Bits + s_nWords); }
-    inline iterator	end (void)			{ return (m_Bits + s_nWords); }
- 			/// Returns the value_type with the equivalent bits. If size() > 1, you'll get only the first BitsInType(value_type) bits.
-    inline const value_type	to_value (void) const		{ return (m_Bits[0]); }
-    			/// Flips all the bits in the set.
-    inline void		flip (void) { transform (begin(), end(), begin(), bitwise_not<value_type>()); }
-			/// Sets or clears bit \p n.
-    inline void		set (uoff_t n, bool val = true)
-			{
-			    value_type& br (BitRef (n));
-			    const value_type mask (Mask (n));
-			    const value_type bOn (br | mask), bOff (br & ~mask);
-			    br = val ? bOn : bOff;
-			}
-			// Sets the value of the bitrange \p first through \p last to the equivalent number of bits from \p v.
-    inline void		set (uoff_t first, uoff_t DebugArg(last), value_type v)
-			{
-#if !PLATFORM_ANDROID
-			    assert (size_t (distance (first, last)) <= s_WordBits && "Bit ranges must be 32 bits or smaller");
-			    assert (first / s_WordBits == last / s_WordBits && "Bit ranges can not cross dword (4 byte) boundary");
-			    assert ((v & BitMask(value_type,distance(first,last))) == v && "The value is too large to fit in the given bit range");
-#endif
-			    BitRef(first) |= v << (first % s_WordBits);
-			}
-    			/// Clears the bit \p n.
-    inline void		reset (uoff_t n)		{ set (n, false); }
-			/// Returns a string with bits MSB "001101001..." LSB.
-    inline string	to_string (void) const
-			{
-			    string rv (Size, '0');
-			    convert_to_bitstring (m_Bits, s_nWords, rv);
-			    return (rv);
-			}
-    inline value_type	at (uoff_t n) const		{ return (test(n)); }
-			/// Returns the value in bits \p first through \p last.
-    inline value_type	at (uoff_t first, uoff_t last) const
-			{
-			    assert (size_t (distance (first, last)) <= s_WordBits && "Bit ranges must be 32 bits or smaller");
-			    assert (first / s_WordBits == last / s_WordBits && "Bit ranges can not cross dword (4 byte) boundary");
-			    return ((BitRef(first) >> (first % s_WordBits)) & BitMask(value_type,distance(first, last)));
-			}
-    inline bool		any (void) const	{ value_type sum = 0; foreach (const_iterator, i, *this) sum |= *i; return (sum); }
-    inline bool		none (void) const	{ return (!any()); }
-    inline size_t	count (void) const	{ size_t sum = 0; foreach (const_iterator, i, *this) sum += popcount(*i); return (sum); }
-    inline bool		operator== (const bitset<Size>& v) const
-			    { return (s_nWords == 1 ? (m_Bits[0] == v.m_Bits[0]) : equal (begin(), end(), v.begin())); }
-    inline const bitset	operator& (const bitset<Size>& v)
-			    { bitset<Size> result; transform (begin(), end(), v.begin(), result.begin(), bitwise_and<value_type>()); return (result); }
-    inline const bitset	operator| (const bitset<Size>& v)
-			    { bitset<Size> result; transform (begin(), end(), v.begin(), result.begin(), bitwise_or<value_type>()); return (result); }
-    inline const bitset	operator^ (const bitset<Size>& v)
-			    { bitset<Size> result; transform (begin(), end(), v.begin(), result.begin(), bitwise_xor<value_type>()); return (result); }
-   inline const bitset&	operator&= (const bitset<Size>& v)
-			    { transform (begin(), end(), v.begin(), begin(), bitwise_and<value_type>()); return (*this); }
-   inline const bitset&	operator|= (const bitset<Size>& v)
-			    { transform (begin(), end(), v.begin(), begin(), bitwise_or<value_type>()); return (*this); }
-   inline const bitset&	operator^= (const bitset<Size>& v)
-			    { transform (begin(), end(), v.begin(), begin(), bitwise_xor<value_type>()); return (*this); }
-private:
-    value_type		m_Bits [s_nWords];
-};
-
-} // namespace ustl
-
-#endif
-
diff --git a/media/libdrm/mobile2/src/util/ustl-1.0/uctralgo.h b/media/libdrm/mobile2/src/util/ustl-1.0/uctralgo.h
deleted file mode 100644
index 57f637d..0000000
--- a/media/libdrm/mobile2/src/util/ustl-1.0/uctralgo.h
+++ /dev/null
@@ -1,482 +0,0 @@
-// This file is part of the ustl library, an STL implementation.
-//
-// Copyright (C) 2005 by Mike Sharov <msharov@users.sourceforge.net>
-// This file is free software, distributed under the MIT License.
-//
-// \file uctralgo.h
-//
-// \brief Implementation of STL algorithms with container shortcuts.
-//
-// The function prototypes are copied
-// exactly from the SGI version of STL documentation along with comments about
-// their use. The code is NOT the same, though the functionality usually is.
-//
-
-#ifndef UCTRALGO_H_0D1AEDFA74B09791489FE25B1EC644B0
-#define UCTRALGO_H_0D1AEDFA74B09791489FE25B1EC644B0
-
-#include "uassert.h"
-
-namespace ustl {
-
-/// Copy copies elements from the range [first, last) to the range
-/// [result, result + (last - first)). That is, it performs the assignments
-/// *result = *first, *(result + 1) = *(first + 1), and so on. [1] Generally,
-/// for every integer n from 0 to last - first, copy performs the assignment
-/// *(result + n) = *(first + n). Assignments are performed in forward order,
-/// i.e. in order of increasing n. 
-/// \ingroup MutatingAlgorithms
-///
-template <typename Container, typename OutputIterator>
-inline OutputIterator copy (const Container& ctr, OutputIterator result)
-{
-    return (copy (ctr.begin(), ctr.end(), result));
-}
-
-/// Copy_if copies elements from the range [first, last) to the range
-/// [result, result + (last - first)) if pred(*i) returns true.
-/// \ingroup MutatingAlgorithms
-///
-template <typename Container, typename OutputIterator, typename Predicate>
-inline OutputIterator copy_if (Container& ctr, OutputIterator result, Predicate pred)
-{
-    return (copy_if (ctr.begin(), ctr.end(), result, pred));
-}
-
-/// For_each applies the function object f to each element in the range
-/// [first, last); f's return value, if any, is ignored. Applications are
-/// performed in forward order, i.e. from first to last. For_each returns
-/// the function object after it has been applied to each element.
-/// \ingroup MutatingAlgorithms
-///
-template <typename Container, typename UnaryFunction>
-inline UnaryFunction for_each (Container& ctr, UnaryFunction f)
-{
-    return (for_each (ctr.begin(), ctr.end(), f));
-}
-
-/// For_each applies the function object f to each element in the range
-/// [first, last); f's return value, if any, is ignored. Applications are
-/// performed in forward order, i.e. from first to last. For_each returns
-/// the function object after it has been applied to each element.
-/// \ingroup MutatingAlgorithms
-///
-template <typename Container, typename UnaryFunction>
-inline UnaryFunction for_each (const Container& ctr, UnaryFunction f)
-{
-    return (for_each (ctr.begin(), ctr.end(), f));
-}
-
-/// Returns the first iterator i in the range [first, last) such that
-/// *i == value. Returns last if no such iterator exists. 
-/// \ingroup SearchingAlgorithms
-///
-template <typename Container, typename EqualityComparable>
-inline typename Container::const_iterator find (const Container& ctr, const EqualityComparable& value)
-{
-    return (find (ctr.begin(), ctr.end(), value));
-}
-template <typename Container, typename EqualityComparable>
-inline typename Container::iterator find (Container& ctr, const EqualityComparable& value)
-{
-    return (find (ctr.begin(), ctr.end(), value));
-}
-
-/// Returns the first iterator i in the range [first, last) such that
-/// pred(*i) is true. Returns last if no such iterator exists.
-/// \ingroup SearchingAlgorithms
-///
-template <typename Container, typename Predicate>
-inline typename Container::const_iterator find_if (const Container& ctr, Predicate pred)
-{
-    return (find_if (ctr.begin(), ctr.end(), pred));
-}
-template <typename Container, typename Predicate>
-inline typename Container::iterator find_if (Container& ctr, Predicate pred)
-{
-    return (find_if (ctr.begin(), ctr.end(), pred));
-}
-
-/// Count finds the number of elements in [first, last) that are equal
-/// to value. More precisely, the first version of count returns the
-/// number of iterators i in [first, last) such that *i == value.
-/// \ingroup ConditionAlgorithms
-///
-template <typename Container, typename EqualityComparable>
-inline size_t count (const Container& ctr, const EqualityComparable& value)
-{
-    return (count (ctr.begin(), ctr.end(), value));
-}
-
-/// Count_if finds the number of elements in [first, last) that satisfy the
-/// predicate pred. More precisely, the first version of count_if returns the
-/// number of iterators i in [first, last) such that pred(*i) is true.
-/// \ingroup ConditionAlgorithms
-///
-template <typename Container, typename Predicate>
-inline size_t count_if (const Container& ctr, Predicate pred)
-{
-    return (count_if (ctr.begin(), ctr.end(), pred));
-}
-
-/// The first version of transform performs the operation op(*i) for each
-/// iterator i in the range [first, last), and assigns the result of that
-/// operation to *o, where o is the corresponding output iterator. That is,
-/// for each n such that 0 <= n < last - first, it performs the assignment
-/// *(result + n) = op(*(first + n)).
-/// The return value is result + (last - first).
-/// \ingroup MutatingAlgorithms
-///
-template <typename Container, typename UnaryFunction>
-inline void transform (Container& ctr, UnaryFunction op)
-{
-    transform (ctr.begin(), ctr.end(), ctr.begin(), op);
-}
-
-/// The first version of transform performs the operation op(*i) for each
-/// iterator i in the range [first, last), and assigns the result of that
-/// operation to *o, where o is the corresponding output iterator. That is,
-/// for each n such that 0 <= n < last - first, it performs the assignment
-/// *(result + n) = op(*(first + n)).
-/// The return value is result + (last - first).
-/// \ingroup MutatingAlgorithms
-///
-template <typename Container, typename OutputIterator, typename UnaryFunction>
-inline OutputIterator transform (Container& ctr, OutputIterator result, UnaryFunction op)
-{
-    return (transform (ctr.begin(), ctr.end(), result, op));
-}
-
-/// The second version of transform is very similar, except that it uses a
-/// Binary Function instead of a Unary Function: it performs the operation
-/// op(*i1, *i2) for each iterator i1 in the range [first1, last1) and assigns
-/// the result to *o, where i2 is the corresponding iterator in the second
-/// input range and where o is the corresponding output iterator. That is,
-/// for each n such that 0 <= n < last1 - first1, it performs the assignment
-/// *(result + n) = op(*(first1 + n), *(first2 + n).
-/// The return value is result + (last1 - first1).
-/// \ingroup MutatingAlgorithms
-///
-template <typename Container, typename InputIterator, typename OutputIterator, typename BinaryFunction>
-inline OutputIterator transform (Container& ctr, InputIterator first, OutputIterator result, BinaryFunction op)
-{
-    return (transform (ctr.begin(), ctr.end(), first, result, op));
-}
-
-/// Replace replaces every element in the range [first, last) equal to
-/// old_value with new_value. That is: for every iterator i,
-/// if *i == old_value then it performs the assignment *i = new_value.
-/// \ingroup MutatingAlgorithms
-///
-template <typename Container, typename T>
-inline void replace (Container& ctr, const T& old_value, const T& new_value)
-{
-    replace (ctr.begin(), ctr.end(), old_value, new_value);
-}
-
-/// Replace_if replaces every element in the range [first, last) for which
-/// pred returns true with new_value. That is: for every iterator i, if
-/// pred(*i) is true then it performs the assignment *i = new_value.
-/// \ingroup MutatingAlgorithms
-///
-template <typename Container, typename Predicate, typename T>
-inline void replace_if (Container& ctr, Predicate pred, const T& new_value)
-{
-    replace_if (ctr.begin(), ctr.end(), pred, new_value);
-}
-
-/// Replace_copy copies elements from the range [first, last) to the range
-/// [result, result + (last-first)), except that any element equal to old_value
-/// is not copied; new_value is copied instead. More precisely, for every
-/// integer n such that 0 <= n < last-first, replace_copy performs the
-/// assignment *(result+n) = new_value if *(first+n) == old_value, and
-/// *(result+n) = *(first+n) otherwise.
-/// \ingroup MutatingAlgorithms
-///
-template <typename Container, typename OutputIterator, typename T>
-inline OutputIterator replace_copy (const Container& ctr, OutputIterator result, const T& old_value, const T& new_value)
-{
-    return (replace_copy (ctr.begin(), ctr.end(), result, old_value, new_value));
-}
-
-/// Replace_copy_if copies elements from the range [first, last) to the range
-/// [result, result + (last-first)), except that any element for which pred is
-/// true is not copied; new_value is copied instead. More precisely, for every
-/// integer n such that 0 <= n < last-first, replace_copy_if performs the
-/// assignment *(result+n) = new_value if pred(*(first+n)),
-/// and *(result+n) = *(first+n) otherwise.
-/// \ingroup MutatingAlgorithms
-///
-template <typename Container, typename OutputIterator, typename Predicate, typename T>
-inline OutputIterator replace_copy_if (const Container& ctr, OutputIterator result, Predicate pred, const T& new_value) 
-{
-    return (replace_copy_if (ctr.begin(), ctr.end(), result, pred, new_value));
-}
-
-/// Fill assigns the value value to every element in the range [first, last).
-/// That is, for every iterator i in [first, last),
-/// it performs the assignment *i = value.
-/// \ingroup GeneratorAlgorithms
-///
-template <typename Container, typename T>
-inline void fill (Container& ctr, const T& value)
-{
-    fill (ctr.begin(), ctr.end(), value);
-}
-
-/// Generate assigns the result of invoking gen, a function object that
-/// takes no arguments, to each element in the range [first, last).
-/// \ingroup GeneratorAlgorithms
-///
-template <typename Container, typename Generator>
-inline void generate (Container& ctr, Generator gen)
-{
-    generate (ctr.begin(), ctr.end(), gen);
-}
-
-/// Randomly permute the elements of the container.
-/// \ingroup GeneratorAlgorithms
-///
-template <typename Container>
-inline void random_shuffle (Container& ctr)
-{
-    random_shuffle (ctr.begin(), ctr.end());
-}
-
-/// Remove_copy copies elements that are not equal to value from the range
-/// [first, last) to a range beginning at result. The return value is the
-/// end of the resulting range. This operation is stable, meaning that the
-/// relative order of the elements that are copied is the same as in the
-/// range [first, last).
-/// \ingroup MutatingAlgorithms
-///
-template <typename Container, typename OutputIterator, typename T>
-inline OutputIterator remove_copy (const Container& ctr, OutputIterator result, const T& value)
-{
-    return (remove_copy (ctr.begin(), ctr.end(), result, value));
-}
-
-/// Remove_copy_if copies elements from the range [first, last) to a range
-/// beginning at result, except that elements for which pred is true are not
-/// copied. The return value is the end of the resulting range. This operation
-/// is stable, meaning that the relative order of the elements that are copied
-/// is the same as in the range [first, last).
-/// \ingroup MutatingAlgorithms
-///
-template <typename Container, typename OutputIterator, typename Predicate>
-inline OutputIterator remove_copy_if (const Container& ctr, OutputIterator result, Predicate pred)
-{
-    return (remove_copy_if (ctr.begin(), ctr.end(), result, pred));
-}
-
-/// Remove removes from the range [first, last) all elements that are equal to
-/// value. That is, remove returns an iterator new_last such that the range
-/// [first, new_last) contains no elements equal to value. Remove is stable,
-/// meaning that the relative order of elements that are not equal to value is
-/// unchanged.
-/// \ingroup MutatingAlgorithms
-///
-template <typename Container, typename T>
-inline void remove (Container& ctr, const T& value)
-{
-    ctr.erase (remove_copy (ctr.begin(), ctr.end(), ctr.begin(), value), ctr.end());
-}
-
-/// Remove removes from the range [first, last) all elements that have an iterator
-/// in range [rfirst, rlast). The range is assumed to be sorted. That is, remove
-/// returns an iterator new_last such that the range [first, new_last) contains
-/// no elements whose iterators are in [rfirst, rlast). Remove is stable,
-/// meaning that the relative order of elements that are not equal to value is
-/// unchanged. This version of the algorithm is a uSTL extension.
-/// \ingroup MutatingAlgorithms
-///
-template <typename Container, typename ForwardIterator>
-inline void remove (Container& ctr, ForwardIterator rfirst, ForwardIterator rlast)
-{
-    ctr.erase (remove_copy (ctr.begin(), ctr.end(), ctr.begin(), rfirst, rlast), ctr.end());
-}
-
-/// Remove_if removes from the range [first, last) every element x such that
-/// pred(x) is true. That is, remove_if returns an iterator new_last such that
-/// the range [first, new_last) contains no elements for which pred is true.
-/// The iterators in the range [new_last, last) are all still dereferenceable,
-/// but the elements that they point to are unspecified. Remove_if is stable,
-/// meaning that the relative order of elements that are not removed is
-/// unchanged.
-/// \ingroup MutatingAlgorithms
-///
-template <typename Container, typename Predicate>
-inline void remove_if (Container& ctr, Predicate pred)
-{
-    ctr.erase (remove_copy_if (ctr.begin(), ctr.end(), ctr.begin(), pred), ctr.end());
-}
-
-/// Unique_copy copies elements from the range [first, last) to a range
-/// beginning with result, except that in a consecutive group of duplicate
-/// elements only the first one is copied. The return value is the end of
-/// the range to which the elements are copied. This behavior is similar
-/// to the Unix filter uniq.
-/// \ingroup MutatingAlgorithms
-///
-template <typename Container, typename OutputIterator>
-inline OutputIterator unique_copy (const Container& ctr, OutputIterator result)
-{
-    return (unique_copy (ctr.begin(), ctr.end(), result));
-}
-
-/// Every time a consecutive group of duplicate elements appears in the range
-/// [first, last), the algorithm unique removes all but the first element.
-/// That is, unique returns an iterator new_last such that the range [first,
-/// new_last) contains no two consecutive elements that are duplicates.
-/// The iterators in the range [new_last, last) are all still dereferenceable,
-/// but the elements that they point to are unspecified. Unique is stable,
-/// meaning that the relative order of elements that are not removed is
-/// unchanged.
-/// \ingroup MutatingAlgorithms
-///
-template <typename Container>
-inline void unique (Container& ctr)
-{
-    ctr.erase (unique_copy (ctr.begin(), ctr.end(), ctr.begin()), ctr.end());
-}
-
-/// Every time a consecutive group of duplicate elements appears in the range
-/// [first, last), the algorithm unique removes all but the first element.
-/// That is, unique returns an iterator new_last such that the range [first,
-/// new_last) contains no two consecutive elements that are duplicates.
-/// The iterators in the range [new_last, last) are all still dereferenceable,
-/// but the elements that they point to are unspecified. Unique is stable,
-/// meaning that the relative order of elements that are not removed is
-/// unchanged.
-/// \ingroup MutatingAlgorithms
-///
-template <typename Container, typename BinaryPredicate>
-inline void unique (Container& ctr, BinaryPredicate binary_pred)
-{
-    ctr.erase (unique_copy (ctr.begin(), ctr.end(), ctr.begin(), binary_pred), ctr.end());
-}
-
-/// Reverse reverses a range.
-/// That is: for every i such that 0 <= i <= (last - first) / 2),
-/// it exchanges *(first + i) and *(last - (i + 1)).
-/// \ingroup MutatingAlgorithms
-///
-template <typename Container>
-inline void reverse (Container& ctr)
-{
-    reverse (ctr.begin(), ctr.end());
-}
-
-/// Exchanges ranges [first, middle) and [middle, last)
-/// \ingroup MutatingAlgorithms
-///
-template <typename Container>
-inline void rotate (Container& ctr, off_t offset)
-{
-    assert (size_t(offset > 0 ? offset : -offset) < ctr.size());
-    if (offset > 0)
-	rotate (ctr.begin(), ctr.end() - offset, ctr.end());
-    else
-	rotate (ctr.begin(), ctr.begin() - offset, ctr.end());
-}
-
-/// Returns the furthermost iterator i in [first, last) such that,
-/// for every iterator j in [first, i), *j < value
-/// Assumes the range is sorted.
-/// \ingroup SearchingAlgorithms
-///
-template <typename Container, typename LessThanComparable>
-inline typename Container::const_iterator lower_bound (const Container& ctr, const LessThanComparable& value)
-{
-    return (lower_bound (ctr.begin(), ctr.end(), value));
-}
-template <typename Container, typename LessThanComparable>
-inline typename Container::iterator lower_bound (Container& ctr, const LessThanComparable& value)
-{
-    return (lower_bound (ctr.begin(), ctr.end(), value));
-}
-
-/// Returns the furthermost iterator i in [first,last) such that for
-/// every iterator j in [first,i), value < *j is false.
-/// \ingroup SearchingAlgorithms
-///
-template <typename Container, typename LessThanComparable>
-inline typename Container::const_iterator upper_bound (const Container& ctr, const LessThanComparable& value)
-{
-    return (upper_bound (ctr.begin(), ctr.end(), value));
-}
-template <typename Container, typename LessThanComparable>
-inline typename Container::iterator upper_bound (Container& ctr, const LessThanComparable& value)
-{
-    return (upper_bound (ctr.begin(), ctr.end(), value));
-}
-
-/// Performs a binary search for \p value.
-/// Assumes the range is sorted.
-/// \ingroup SearchingAlgorithms
-///
-template <typename Container>
-inline typename Container::const_iterator binary_search (const Container& ctr, const typename Container::value_type& value)
-{
-    return (binary_search (ctr.begin(), ctr.end(), value));
-}
-template <typename Container>
-inline typename Container::iterator binary_search (Container& ctr, const typename Container::value_type& value)
-{
-    return (binary_search (ctr.begin(), ctr.end(), value));
-}
-
-/// Returns pair<lower_bound,upper_bound>
-/// \ingroup SearchingAlgorithms
-///
-template <typename Container, typename LessThanComparable>
-inline pair<typename Container::const_iterator,typename Container::const_iterator> equal_range (const Container& ctr, const LessThanComparable& value)
-{
-    return (equal_range (ctr.begin(), ctr.end(), value));
-}
-template <typename Container, typename LessThanComparable>
-inline pair<typename Container::iterator,typename Container::iterator> equal_range (Container& ctr, const LessThanComparable& value)
-{
-    return (equal_range (ctr.begin(), ctr.end(), value));
-}
-
-/// Sorts the container
-/// \ingroup SortingAlgorithms
-///
-template <typename Container>
-inline void sort (Container& ctr)
-{
-    sort (ctr.begin(), ctr.end());
-}
-
-/// Sorts the container
-/// \ingroup SortingAlgorithms
-///
-template <typename Container, typename Compare>
-inline void sort (Container& ctr, Compare comp)
-{
-    sort (ctr.begin(), ctr.end(), comp);
-}
-
-/// Sorts the container
-/// \ingroup SortingAlgorithms
-///
-template <typename Container>
-inline void stable_sort (Container& ctr)
-{
-    stable_sort (ctr.begin(), ctr.end());
-}
-
-/// Sorts the container
-/// \ingroup SortingAlgorithms
-///
-template <typename Container, typename Compare>
-inline void stable_sort (Container& ctr, Compare comp)
-{
-    stable_sort (ctr.begin(), ctr.end(), comp);
-}
-
-} // namespace ustl
-
-#endif
-
diff --git a/media/libdrm/mobile2/src/util/ustl-1.0/uctrstrm.h b/media/libdrm/mobile2/src/util/ustl-1.0/uctrstrm.h
deleted file mode 100644
index 39ddcdd..0000000
--- a/media/libdrm/mobile2/src/util/ustl-1.0/uctrstrm.h
+++ /dev/null
@@ -1,177 +0,0 @@
-// This file is part of the ustl library, an STL implementation.
-//
-// Copyright (C) 2005 by Mike Sharov <msharov@users.sourceforge.net>
-// This file is free software, distributed under the MIT License.
-//
-/// \file uctrstrm.h
-///
-/// \brief Serialization templates for standard containers.
-/// Because containers are templates, a single operator>> is impossible.
-/// Making virtual read/write is also impossible because not all containers
-/// contain serializable elements. Therefore, use the macros in this file.
-///
-
-#ifndef UCTRSTRM_H_75B2C3EA4980DDDC6B6DFFF767A3B7AC
-#define UCTRSTRM_H_75B2C3EA4980DDDC6B6DFFF767A3B7AC
-
-#include "mistream.h"
-#include "sostream.h"
-#include "uiosfunc.h"
-
-namespace ustl {
-
-//----------------------------------------------------------------------
-// Macros for easily declaring a container streamable.
-//----------------------------------------------------------------------
-
-/// \brief Declares container template \p type streamable.
-///
-/// Use TEMPLATE_TYPE and TEMPLATE_DECL macros to pass in templated
-/// type with commas and the template declaration.
-///
-#define STD_TEMPLATE_CTR_STREAMABLE(type, template_decl)	\
-    template_decl						\
-    inline istream& operator>> (istream& is, type& v)		\
-    { return (container_read (is, v)); } 			\
-    template_decl						\
-    inline ostream& operator<< (ostream& os, const type& v)	\
-    { return (container_write (os, v)); } 			\
-    template_decl						\
-    inline ostringstream& operator<< (ostringstream& os, const type& v)	\
-    { return (container_text_write (os, v)); }			\
-    template_decl						\
-    inline size_t stream_size_of (const type& v)		\
-    { return (container_stream_size (v)); }
-
-/// \brief Declares non-resizable container template \p type streamable.
-#define STD_TEMPLATE_NR_CTR_STREAMABLE(type, template_decl)	\
-    template_decl						\
-    inline istream& operator>> (istream& is, type& v)		\
-    { return (nr_container_read (is, v)); } 			\
-    template_decl						\
-    inline ostream& operator<< (ostream& os, const type& v)	\
-    { return (nr_container_write (os, v)); } 			\
-    template_decl						\
-    inline ostringstream& operator<< (ostringstream& os, const type& v)	\
-    { return (container_text_write (os, v)); }			\
-    template_decl						\
-    inline size_t stream_size_of (const type& v)		\
-    { return (nr_container_stream_size (v)); }
-
-//----------------------------------------------------------------------
-// Fixed size container serialization.
-//----------------------------------------------------------------------
-
-/// Reads fixed size container \p v from stream \p is.
-template <typename Container>
-inline istream& nr_container_read (istream& is, Container& v)
-{
-    foreach (typename Container::iterator, i, v)
-	is >> *i;
-    return (is);
-}
-
-/// Writes fixed size container \p v into stream \p os.
-template <typename Container>
-inline ostream& nr_container_write (ostream& os, const Container& v)
-{
-    foreach (typename Container::const_iterator, i, v)
-	os << *i;
-    return (os);
-}
-
-/// Computes the stream size of a fixed size standard container.
-template <typename Container>
-size_t nr_container_stream_size (const Container& v)
-{
-    typedef typename Container::const_iterator vciter_t;
-    typedef typename iterator_traits<vciter_t>::value_type value_type;
-    size_t s = 0;
-    if (numeric_limits<value_type>::is_integral)
-	s += v.size() * stream_size_of(value_type());
-    else
-	foreach (vciter_t, i, v)
-	    s += stream_size_of(*i);
-    return (s);
-}
-
-//----------------------------------------------------------------------
-// Resizable container serialization.
-//----------------------------------------------------------------------
-
-/// Reads container \p v from stream \p is.
-template <typename Container>
-istream& container_read (istream& is, Container& v)
-{
-    typedef typename Container::value_type value_type;
-    typedef typename Container::iterator iterator;
-    typedef typename Container::written_size_type written_size_type;
-    written_size_type n;
-    is >> n;
-    const size_t expectedSize = n * stream_size_of(value_type());
-#if !PLATFORM_ANDROID
-    is.verify_remaining ("read", typeid(v).name(), expectedSize);
-#endif
-    if (alignof(value_type()) > alignof(n))
-	is >> ios::talign<value_type>();
-    v.resize (n);
-    nr_container_read (is, v);
-    is >> ios::talign<written_size_type>();
-    return (is);
-}
-
-/// Writes the vector to stream \p os.
-template <typename Container>
-ostream& container_write (ostream& os, const Container& v)
-{
-    typedef typename Container::value_type value_type;
-    typedef typename Container::written_size_type written_size_type;
-    const written_size_type sz (v.size());
-    os << sz;
-    if (alignof(value_type()) > alignof(sz))
-	os << ios::talign<value_type>();
-    nr_container_write (os, v);
-    os << ios::talign<written_size_type>();
-    return (os);
-}
-
-/// Computes the stream size of a standard container.
-template <typename Container>
-size_t container_stream_size (const Container& v)
-{
-    typedef typename Container::value_type value_type;
-    typedef typename Container::written_size_type written_size_type;
-    const written_size_type sz (v.size());
-    size_t sizeSize = stream_size_of (sz);
-    if (alignof(value_type()) > alignof(sz))
-	sizeSize = Align (sizeSize, alignof(value_type()));
-    return (Align (sizeSize + nr_container_stream_size (v), alignof(sz)));
-}
-
-/// \brief Writes element \p v into stream \p os as text.
-/// Specialize to custom print elements.
-template <typename T>
-inline ostringstream& container_element_text_write (ostringstream& os, const T& v)
-{ return (os << v); }
-
-/// Writes container \p v into stream \p os as text.
-template <typename Container>
-ostringstream& container_text_write (ostringstream& os, const Container& v)
-{
-    typename Container::const_iterator i = v.begin();
-    os << '(';
-    while (i < v.end()) {
-	container_element_text_write (os, *i);
-	if (++i >= v.end()) break;
-	os << ',';
-    }
-    os << ')';
-    return (os);
-}
-
-//----------------------------------------------------------------------
-
-} // namespace ustl
-
-#endif
-
diff --git a/media/libdrm/mobile2/src/util/ustl-1.0/uexception.cpp b/media/libdrm/mobile2/src/util/ustl-1.0/uexception.cpp
deleted file mode 100644
index d00f219..0000000
--- a/media/libdrm/mobile2/src/util/ustl-1.0/uexception.cpp
+++ /dev/null
@@ -1,305 +0,0 @@
-// This file is part of the ustl library, an STL implementation.
-//
-// Copyright (C) 2005 by Mike Sharov <msharov@users.sourceforge.net>
-// This file is free software, distributed under the MIT License.
-//
-// uexception.cc
-//
-
-#include "uassert.h"
-#include "uexception.h"
-#include "ustring.h"
-#include "mistream.h"
-#include "sostream.h"
-#include "strmsize.h"
-#include "uspecial.h"
-#include <errno.h>
-#if __GNUC__ >= 3 && !PLATFORM_ANDROID
-    #include <cxxabi.h>
-#endif
-
-namespace ustl {
-
-//----------------------------------------------------------------------
-
-/// \brief Returns a descriptive error message. fmt="%s"
-/// Overloads of this functions must set NULL as the default fmt
-/// argument and handle that case to provide a default format string
-/// in case the user does not have a localized one. The format
-/// string should be shown in the documentation to not require
-/// translators to look through code. Also, this function must
-/// not throw anything, so you must wrap memory allocation routines
-/// (like string::format, for instance) in a try{}catch(...){} block.
-///
-void exception::info (string& msgbuf, const char*) const throw()
-{
-#if PLATFORM_ANDROID
-    msgbuf.format ("%s", what());
-#else /* !PLATFORM_ANDROID */
-    try { msgbuf.format ("%s", what()); } catch (...) { /* Ignore all exceptions */ }
-#endif
-}
-
-/// Reads the exception from stream \p is.
-void exception::read (istream& is)
-{
-    uint32_t stmSize;
-    xfmt_t fmt;
-    is >> fmt >> stmSize >> m_Backtrace;
-    assert (fmt == m_Format && "The saved exception is of a different type.");
-    assert (stmSize - exception::stream_size() <= is.remaining() && "The saved exception data is corrupt.");
-    m_Format = fmt;
-}
-
-/// Writes the exception into stream \p os as an IFF chunk.
-void exception::write (ostream& os) const
-{
-    os << m_Format << uint32_t(stream_size()) << m_Backtrace;
-}
-
-/// Writes the exception as text into stream \p os.
-void exception::text_write (ostringstream& os) const
-{
-#if !PLATFORM_ANDROID
-    try {
-#endif
-	string buf;
-	info (buf);
-	os << buf;
-#if !PLATFORM_ANDROID
-    } catch (...) {}
-#endif
-}
-
-//----------------------------------------------------------------------
-
-/// Initializes the empty object. \p nBytes is the size of the attempted allocation.
-bad_alloc::bad_alloc (size_t nBytes) throw()
-: ustl::exception(),
-  m_nBytesRequested (nBytes)
-{
-    set_format (xfmt_BadAlloc);
-}
-
-/// Returns a descriptive error message. fmt="failed to allocate %d bytes"
-void bad_alloc::info (string& msgbuf, const char* fmt) const throw()
-{
-    if (!fmt) fmt = "failed to allocate %d bytes";
-#if PLATFORM_ANDROID
-    msgbuf.format (fmt, m_nBytesRequested);
-#else /* !PLATFORM_ANDROID */
-    try { msgbuf.format (fmt, m_nBytesRequested); } catch (...) {}
-#endif
-}
-
-/// Reads the exception from stream \p is.
-void bad_alloc::read (istream& is)
-{
-    ustl::exception::read (is);
-    is >> m_nBytesRequested;
-}
-
-/// Writes the exception into stream \p os.
-void bad_alloc::write (ostream& os) const
-{
-    ustl::exception::write (os);
-    os << m_nBytesRequested;
-}
-
-/// Returns the size of the written exception.
-size_t bad_alloc::stream_size (void) const
-{
-    return (ustl::exception::stream_size() + stream_size_of(m_nBytesRequested));
-}
-
-//----------------------------------------------------------------------
-
-/// Initializes the empty object. \p operation is the function that returned the error code.
-libc_exception::libc_exception (const char* operation) throw()
-: exception(),
-  m_Errno (errno),
-  m_Operation (operation)
-{
-    set_format (xfmt_LibcException);
-}
-
-/// Copies object \p v.
-libc_exception::libc_exception (const libc_exception& v) throw()
-: exception (v),
-  m_Errno (v.m_Errno),
-  m_Operation (v.m_Operation)
-{
-}
-
-/// Copies object \p v.
-const libc_exception& libc_exception::operator= (const libc_exception& v)
-{
-    m_Errno = v.m_Errno;
-    m_Operation = v.m_Operation;
-    return (*this);
-}
-
-/// Returns a descriptive error message. fmt="%s: %m"
-void libc_exception::info (string& msgbuf, const char* fmt) const throw()
-{
-    if (!fmt) fmt = "%s: %m";
-#if PLATFORM_ANDROID
-    msgbuf.format (fmt, m_Operation, m_Errno, m_Errno);
-#else /* !PLATFORM_ANDROID */
-    try { msgbuf.format (fmt, m_Operation, m_Errno, m_Errno); } catch (...) {}
-#endif
-}
-
-/// Reads the exception from stream \p is.
-void libc_exception::read (istream& is)
-{
-    exception::read (is);
-    is >> m_Errno >> m_Operation;
-}
-
-/// Writes the exception into stream \p os.
-void libc_exception::write (ostream& os) const
-{
-    exception::write (os);
-    os << m_Errno << m_Operation;
-}
-
-/// Returns the size of the written exception.
-size_t libc_exception::stream_size (void) const
-{
-    return (exception::stream_size() +
-	    stream_size_of(m_Errno) +
-	    stream_size_of(m_Operation));
-}
-
-//----------------------------------------------------------------------
-
-/// Initializes the empty object. \p operation is the function that returned the error code.
-file_exception::file_exception (const char* operation, const char* filename) throw()
-: libc_exception (operation)
-{
-    memset (m_Filename, 0, VectorSize(m_Filename));
-    set_format (xfmt_FileException);
-    if (filename) {
-	strncpy (m_Filename, filename, VectorSize(m_Filename));
-	m_Filename [VectorSize(m_Filename) - 1] = 0;
-    }
-}
-
-/// Returns a descriptive error message. fmt="%s %s: %m"
-void file_exception::info (string& msgbuf, const char* fmt) const throw()
-{
-    if (!fmt) fmt = "%s %s: %m";
-#if PLATFORM_ANDROID
-    msgbuf.format (fmt, m_Operation, m_Filename, m_Errno, m_Errno);
-#else /* !PLATFORM_ANDROID */
-    try { msgbuf.format (fmt, m_Operation, m_Filename, m_Errno, m_Errno); } catch (...) {}
-#endif
-}
-
-/// Reads the exception from stream \p is.
-void file_exception::read (istream& is)
-{
-    libc_exception::read (is);
-    string filename;
-    is >> filename;
-    is.align (8);
-    filename.copyto (filename, VectorSize(m_Filename));
-}
-
-/// Writes the exception into stream \p os.
-void file_exception::write (ostream& os) const
-{
-    libc_exception::write (os);
-    os << string (m_Filename);
-    os.align (8);
-}
-
-/// Returns the size of the written exception.
-size_t file_exception::stream_size (void) const
-{
-    return (libc_exception::stream_size() +
-	    Align (stream_size_of (string (m_Filename)), 8));
-}
-
-//----------------------------------------------------------------------
-
-/// \brief Uses C++ ABI call, if available to demangle the contents of \p buf.
-///
-/// The result is written to \p buf, with the maximum size of \p bufSize, and
-/// is zero-terminated. The return value is \p buf.
-///
-const char* demangle_type_name (char* buf, size_t bufSize, size_t* pdmSize)
-{
-    size_t bl = strlen (buf);
-#if __GNUC__ >= 3 && !PLATFORM_ANDROID
-    char dmname [256];
-    size_t sz = VectorSize(dmname);
-    int bFailed;
-    abi::__cxa_demangle (buf, dmname, &sz, &bFailed);
-    if (!bFailed) {
-	bl = min (strlen (dmname), bufSize - 1);
-	memcpy (buf, dmname, bl);
-	buf[bl] = 0;
-    }
-#else
-    bl = min (bl, bufSize);
-#endif
-    if (pdmSize)
-	*pdmSize = bl;
-    return (buf);
-}
-
-//----------------------------------------------------------------------
-
-/// Initializes the empty object. \p operation is the function that returned the error code.
-stream_bounds_exception::stream_bounds_exception (const char* operation, const char* type, uoff_t offset, size_t expected, size_t remaining) throw()
-: libc_exception (operation),
-  m_TypeName (type),
-  m_Offset (offset),
-  m_Expected (expected),
-  m_Remaining (remaining)
-{
-    set_format (xfmt_StreamBoundsException);
-}
-
-/// Returns a descriptive error message. fmt="%s stream %s: @%u: expected %u, available %u";
-void stream_bounds_exception::info (string& msgbuf, const char* fmt) const throw()
-{
-    char typeName [256];
-    strncpy (typeName, m_TypeName, VectorSize(typeName));
-    typeName[VectorSize(typeName)-1] = 0;
-    if (!fmt) fmt = "%s stream %s: @0x%X: need %u bytes, have %u";
-#if PLATFORM_ANDROID
-    msgbuf.format (fmt, demangle_type_name (VectorBlock(typeName)), m_Operation, m_Offset, m_Expected, m_Remaining);
-#else /* !PLATFORM_ANDROID */
-    try { msgbuf.format (fmt, demangle_type_name (VectorBlock(typeName)), m_Operation, m_Offset, m_Expected, m_Remaining); } catch (...) {}
-#endif
-}
-
-/// Reads the exception from stream \p is.
-void stream_bounds_exception::read (istream& is)
-{
-    libc_exception::read (is);
-    is >> m_TypeName >> m_Offset >> m_Expected >> m_Remaining;
-}
-
-/// Writes the exception into stream \p os.
-void stream_bounds_exception::write (ostream& os) const
-{
-    libc_exception::write (os);
-    os << m_TypeName << m_Offset << m_Expected << m_Remaining;
-}
-
-/// Returns the size of the written exception.
-size_t stream_bounds_exception::stream_size (void) const
-{
-    return (libc_exception::stream_size() +
-	    stream_size_of(m_TypeName) +
-	    stream_size_of(m_Offset) +
-	    stream_size_of(m_Expected) +
-	    stream_size_of(m_Remaining));
-}
-
-} // namespace ustl
-
diff --git a/media/libdrm/mobile2/src/util/ustl-1.0/uexception.h b/media/libdrm/mobile2/src/util/ustl-1.0/uexception.h
deleted file mode 100644
index 3e9a179..0000000
--- a/media/libdrm/mobile2/src/util/ustl-1.0/uexception.h
+++ /dev/null
@@ -1,194 +0,0 @@
-// This file is part of the ustl library, an STL implementation.
-//
-// Copyright (C) 2005 by Mike Sharov <msharov@users.sourceforge.net>
-// This file is free software, distributed under the MIT License.
-//
-// uexception.h
-//
-// This file contains stuff from \<exception\>.
-// The standard C++ headers are duplicated because uSTL is intended
-// to completely replace all C++ standard library functions.
-//
-
-#ifndef UEXCEPTION_H_18DE3EF55C4F00673268F0D66546AF5D
-#define UEXCEPTION_H_18DE3EF55C4F00673268F0D66546AF5D
-
-#include "utypes.h"
-#ifndef WITHOUT_LIBSTDCPP
-    #include <exception>
-    #include <new>
-#endif
-#include "bktrace.h"
-
-#ifdef WITHOUT_LIBSTDCPP	// This code is copied from <exception>
-namespace std {
-/// If you write a replacement terminate handler, it must be of this type.
-typedef void (*terminate_handler) (void);
-/// If you write a replacement unexpected handler, it must be of this type.
-typedef void (*unexpected_handler) (void);
-/// Takes a new handler function as an argument, returns the old function.
-terminate_handler set_terminate (terminate_handler pHandler) throw();
-/// The runtime will call this function if exception handling must be
-/// abandoned for any reason.  It can also be called by the user.
-void terminate (void) __attribute__ ((__noreturn__));
-/// Takes a new handler function as an argument, returns the old function.
-unexpected_handler set_unexpected (unexpected_handler pHandler) throw();
-/// The runtime will call this function if an exception is thrown which
-/// violates the function's exception specification.
-void unexpected (void) __attribute__ ((__noreturn__));
-/// Returns true when the caught exception violates the throw specification.
-bool uncaught_exception() throw();
-} // namespace std
-#endif
-
-namespace ustl {
-
-class string;
-
-typedef uint32_t	xfmt_t;
-
-enum {
-    xfmt_Exception,
-    xfmt_BadAlloc,
-    xfmt_LibcException		= 12,
-    xfmt_FileException		= 13,
-    xfmt_StreamBoundsException	= 14
-};
-
-/// \class exception uexception.h ustl.h
-/// \ingroup Exceptions
-///
-/// \brief Base class for exceptions, equivalent to std::exception.
-///
-#ifdef WITHOUT_LIBSTDCPP
-class exception {
-#else
-class exception : public std::exception {
-#endif
-public:
-    typedef const CBacktrace& rcbktrace_t;
-public:
-    inline		exception (void) throw() : m_Format (xfmt_Exception) {}
-    inline virtual     ~exception (void) throw() {}
-    inline virtual const char* what (void) const throw() { return ("error"); }
-    virtual void	info (string& msgbuf, const char* fmt = NULL) const throw();
-    virtual void	read (istream& is);
-    virtual void	write (ostream& os) const;
-    void		text_write (ostringstream& os) const;
-    inline virtual size_t stream_size (void) const { return (sizeof(m_Format) + sizeof(uint32_t) + m_Backtrace.stream_size()); }
-    /// Format of the exception is used to lookup exception::info format string.
-    /// Another common use is the instantiation of serialized exceptions, used
-    /// by the error handler node chain to troubleshoot specific errors.
-    inline xfmt_t	format (void) const	{ return (m_Format); }
-    inline rcbktrace_t	backtrace (void) const	{ return (m_Backtrace); }
-protected:
-    inline void		set_format (xfmt_t fmt) { m_Format = fmt; }
-private:
-    CBacktrace		m_Backtrace;	///< Backtrace of the throw point.
-    xfmt_t		m_Format;	///< Format of the exception's data.
-};
-
-/// \class bad_cast uexception.h ustl.h
-/// \ingroup Exceptions
-///
-/// \brief Thrown to indicate a bad dynamic_cast usage.
-///
-class bad_cast : public exception {
-public:
-    inline explicit		bad_cast (void) throw() : exception() {}
-    inline virtual const char*	what (void) const throw() { return ("bad cast"); }
-};
-
-//----------------------------------------------------------------------
-
-/// \class bad_alloc uexception.h ustl.h
-/// \ingroup Exceptions
-///
-/// \brief Exception thrown on memory allocation failure by memblock::reserve.
-///
-#ifdef WITHOUT_LIBSTDCPP
-class bad_alloc : public exception {
-#else
-class bad_alloc : public std::bad_alloc, public exception {
-#endif
-public:
-    explicit		bad_alloc (size_t nBytes = 0) throw();
-    inline virtual const char*	what (void) const throw() { return ("memory allocation failed"); }
-    virtual void	info (string& msgbuf, const char* fmt = NULL) const throw();
-    virtual void	read (istream& is);
-    virtual void	write (ostream& os) const;
-    virtual size_t	stream_size (void) const;
-protected:
-    size_t		m_nBytesRequested;	///< Number of bytes requested by the failed allocation.
-};
-
-/// \class libc_exception uexception.h ustl.h
-/// \ingroup Exceptions
-///
-/// \brief Thrown when a libc function returns an error.
-///
-/// Contains an errno and description. This is a uSTL extension.
-///
-class libc_exception : public exception {
-public:
-    explicit		libc_exception (const char* operation) throw();
-			libc_exception (const libc_exception& v) throw();
-    const libc_exception& operator= (const libc_exception& v);
-    inline virtual const char*	what (void) const throw() { return ("libc function failed"); }
-    virtual void	info (string& msgbuf, const char* fmt = NULL) const throw();
-    virtual void	read (istream& is);
-    virtual void	write (ostream& os) const;
-    virtual size_t	stream_size (void) const;
-protected:
-    intptr_t		m_Errno;		///< Error code returned by the failed operation.
-    const char*		m_Operation;		///< Name of the failed operation.
-};
-
-/// \class file_exception uexception.h ustl.h
-/// \ingroup Exceptions
-///
-/// \brief File-related exceptions.
-///
-/// Contains the file name. This is a uSTL extension.
-///
-class file_exception : public libc_exception {
-public:
-			file_exception (const char* operation, const char* filename) throw();
-    inline virtual const char* what (void) const throw() { return ("file error"); }
-    virtual void	info (string& msgbuf, const char* fmt = NULL) const throw();
-    virtual void	read (istream& is);
-    virtual void	write (ostream& os) const;
-    virtual size_t	stream_size (void) const;
-protected:
-    char		m_Filename [PATH_MAX];	///< Name of the file causing the error.
-};
-
-/// \class stream_bounds_exception uexception.h ustl.h
-/// \ingroup Exceptions
-///
-/// \brief Stream bounds checking.
-///
-/// Only thrown in debug builds unless you say otherwise in config.h
-/// This is a uSTL extension.
-///
-class stream_bounds_exception : public libc_exception {
-public:
-			stream_bounds_exception (const char* operation, const char* type, uoff_t offset, size_t expected, size_t remaining) throw();
-    inline virtual const char*	what (void) const throw() { return ("stream bounds exception"); }
-    virtual void	info (string& msgbuf, const char* fmt = NULL) const throw();
-    virtual void	read (istream& is);
-    virtual void	write (ostream& os) const;
-    virtual size_t	stream_size (void) const;
-protected:
-    const char*		m_TypeName;
-    uoff_t		m_Offset;
-    size_t		m_Expected;
-    size_t		m_Remaining;
-};
-
-const char* demangle_type_name (char* buf, size_t bufSize, size_t* pdmSize = NULL);
-
-} // namespace ustl
-
-#endif
-
diff --git a/media/libdrm/mobile2/src/util/ustl-1.0/ufunction.h b/media/libdrm/mobile2/src/util/ustl-1.0/ufunction.h
deleted file mode 100644
index 53dc5e2..0000000
--- a/media/libdrm/mobile2/src/util/ustl-1.0/ufunction.h
+++ /dev/null
@@ -1,480 +0,0 @@
-// This file is part of the ustl library, an STL implementation.
-//
-// Copyright (C) 2005 by Mike Sharov <msharov@users.sourceforge.net>
-// This file is free software, distributed under the MIT License.
-//
-// \file ufunction.h
-//
-// \brief Implements STL standard functors.
-//
-// See STL specification and bvts for usage of these. The only
-// extension is the mem_var functors for member variable access:
-// \code
-//	f = find_if (ctr, mem_var_equal_to(&MyClass::m_Var, matchVar));
-//	f = find_if (ctr, mem_var_less(&MyClass::m_Var, matchVar));
-// \endcode
-// There are a couple of others but the syntax is much harder to grasp.
-// See bvt10.cc for more examples.
-//
-
-#ifndef UFUNCTION_H_221ABA8551801799263C927234C085F3
-#define UFUNCTION_H_221ABA8551801799263C927234C085F3
-
-namespace ustl {
-
-//----------------------------------------------------------------------
-// Standard functors
-//----------------------------------------------------------------------
-
-/// \brief void-returning function abstract interface.
-/// \ingroup FunctorObjects
-template <typename Result>
-struct void_function {
-    typedef Result	result_type;
-};
-
-/// \brief \p Result f (\p Arg) function abstract interface.
-/// \ingroup FunctorObjects
-template <typename Arg, typename Result>
-struct unary_function {
-    typedef Arg		argument_type;
-    typedef Result	result_type;
-};
-
-/// \brief \p Result f (\p Arg1, \p Arg2) function abstract interface.
-/// \ingroup FunctorObjects
-template <typename Arg1, typename Arg2, typename Result>
-struct binary_function {
-    typedef Arg1	first_argument_type;
-    typedef Arg2	second_argument_type;
-    typedef Result	result_type;
-};
-
-#ifndef DOXYGEN_SHOULD_SKIP_THIS
-
-#define STD_BINARY_FUNCTOR(name, rv, func)	\
-template <class T> struct name : public binary_function<T,T,rv> \
-{ inline rv operator()(const T& a, const T& b) const { return func; } };
-#define STD_UNARY_FUNCTOR(name, rv, func)	\
-template <class T> struct name : public unary_function<T,rv> \
-{ inline rv operator()(const T& a) const { return func; } };
-#define STD_CONVERSION_FUNCTOR(name, func)	\
-template <class S, class D> struct name : public unary_function<S,D> \
-{ inline D operator()(const S& a) const { return func; } };
-
-STD_BINARY_FUNCTOR (plus,		T,	(a + b))
-STD_BINARY_FUNCTOR (minus,		T,	(a - b))
-STD_BINARY_FUNCTOR (divides,		T,	(a / b))
-STD_BINARY_FUNCTOR (modulus,		T,	(a % b))
-STD_BINARY_FUNCTOR (multiplies,		T,	(a * b))
-STD_BINARY_FUNCTOR (logical_and,	T,	(a && b))
-STD_BINARY_FUNCTOR (logical_or,		T,	(a || b))
-STD_UNARY_FUNCTOR  (logical_not,	T,	(!a))
-STD_BINARY_FUNCTOR (bitwise_or,		T,	(a | b))
-STD_BINARY_FUNCTOR (bitwise_and,	T,	(a & b))
-STD_BINARY_FUNCTOR (bitwise_xor,	T,	(a ^ b))
-STD_UNARY_FUNCTOR  (bitwise_not,	T,	(~a))
-STD_UNARY_FUNCTOR  (negate,		T,	(-a))
-STD_BINARY_FUNCTOR (equal_to,		bool,	(a == b))
-STD_BINARY_FUNCTOR (not_equal_to,	bool,	(!(a == b)))
-STD_BINARY_FUNCTOR (greater,		bool,	(b < a))
-STD_BINARY_FUNCTOR (less,		bool,	(a < b))
-STD_BINARY_FUNCTOR (greater_equal,	bool,	(!(a < b)))
-STD_BINARY_FUNCTOR (less_equal,		bool,	(!(b < a)))
-STD_BINARY_FUNCTOR (compare,		int,	(a < b ? -1 : (b < a)))
-STD_UNARY_FUNCTOR  (identity,		T,	(a))
-
-#endif // DOXYGEN_SHOULD_SKIP_THIS
-
-/// \brief Selects and returns the first argument.
-/// \ingroup FunctorObjects
-template <class T1, class T2> struct project1st	: public binary_function<T1,T2,T1>    { inline const T1& operator()(const T1& a, const T2&) const { return (a); } };
-/// \brief Selects and returns the second argument.
-/// \ingroup FunctorObjects
-template <class T1, class T2> struct project2nd	: public binary_function<T1,T2,T2>    { inline const T2& operator()(const T1&, const T2& a) const { return (a); } };
-
-//----------------------------------------------------------------------
-// Generic function to functor converters.
-//----------------------------------------------------------------------
-
-/// \brief Wrapper object for unary function pointers.
-/// Use the \ref ptr_fun accessor to create this object.
-/// \ingroup FunctorObjects
-template <typename Arg, typename Result>
-class pointer_to_unary_function : public unary_function<Arg,Result> {
-public:
-    typedef Arg		argument_type;
-    typedef Result	result_type;
-    typedef Result	(*pfunc_t)(Arg);
-public:
-    explicit inline	pointer_to_unary_function (pfunc_t pfn) : m_pfn (pfn) {}
-    inline result_type	operator() (argument_type v) const { return (m_pfn(v)); }
-private:
-    pfunc_t		m_pfn;	///< Pointer to the wrapped function.
-};
-
-/// \brief Wrapper object for binary function pointers.
-/// Use the \ref ptr_fun accessor to create this object.
-/// \ingroup FunctorObjects
-template <typename Arg1, typename Arg2, typename Result>
-class pointer_to_binary_function : public binary_function<Arg1,Arg2,Result> {
-public:
-    typedef Arg1	first_argument_type;
-    typedef Arg2	second_argument_type;
-    typedef Result	result_type;
-    typedef Result	(*pfunc_t)(Arg1, Arg2);
-public:
-    explicit inline	pointer_to_binary_function (pfunc_t pfn) : m_pfn (pfn) {}
-    inline result_type	operator() (first_argument_type v1, second_argument_type v2) const { return (m_pfn(v1, v2)); }
-private:
-    pfunc_t		m_pfn;	///< Pointer to the wrapped function.
-};
-
-/// ptr_fun(pfn) wraps function pointer pfn into a functor class that calls it.
-/// \ingroup FunctorAccessors
-template <typename Arg, typename Result>
-inline pointer_to_unary_function<Arg,Result> ptr_fun (Result (*pfn)(Arg))
-{
-    return (pointer_to_unary_function<Arg,Result> (pfn));
-}
-
-/// ptr_fun(pfn) wraps function pointer pfn into a functor class that calls it.
-/// \ingroup FunctorAccessors
-template <typename Arg1, typename Arg2, typename Result>
-inline pointer_to_binary_function<Arg1,Arg2,Result> ptr_fun (Result (*pfn)(Arg1,Arg2))
-{
-    return (pointer_to_binary_function<Arg1,Arg2,Result> (pfn));
-}
-
-//----------------------------------------------------------------------
-// Negators.
-//----------------------------------------------------------------------
-
-/// \brief Wraps a unary function to return its logical negative.
-/// Use the \ref unary_negator accessor to create this object.
-/// \ingroup FunctorObjects
-template <class UnaryFunction>
-class unary_negate : public unary_function<typename UnaryFunction::argument_type,
-					   typename UnaryFunction::result_type> {
-public:
-    typedef typename UnaryFunction::argument_type	argument_type;
-    typedef typename UnaryFunction::result_type		result_type;
-public:
-    explicit inline unary_negate (UnaryFunction pfn) : m_pfn (pfn) {}
-    inline result_type operator() (argument_type v) const { return (!m_pfn(v)); }
-private:
-    UnaryFunction	m_pfn;
-};
-
-/// Returns the functor that negates the result of *pfn().
-/// \ingroup FunctorAccessors
-template <class UnaryFunction>
-inline unary_negate<UnaryFunction> unary_negator (UnaryFunction pfn)
-{
-    return (unary_negate<UnaryFunction>(pfn));
-}
-
-//----------------------------------------------------------------------
-// Argument binders
-//----------------------------------------------------------------------
-
-/// \brief Converts a binary function to a unary function
-/// by binding a constant value to the first argument.
-/// Use the \ref bind1st accessor to create this object.
-/// \ingroup FunctorObjects
-template <class BinaryFunction> 
-class binder1st : public unary_function<typename BinaryFunction::second_argument_type,
-					typename BinaryFunction::result_type> {
-public:
-    typedef typename BinaryFunction::first_argument_type	arg1_t;
-    typedef typename BinaryFunction::second_argument_type	arg2_t;
-    typedef typename BinaryFunction::result_type		result_t;
-public:
-    inline binder1st (const BinaryFunction& pfn, const arg1_t& v) : m_pfn (pfn), m_Value(v) {}
-    inline result_t operator()(arg2_t v2) const { return (m_pfn (m_Value, v2)); }
-protected:
-    BinaryFunction	m_pfn;
-    arg1_t		m_Value;
-};
-
-/// \brief Converts a binary function to a unary function
-/// by binding a constant value to the second argument.
-/// Use the \ref bind2nd accessor to create this object.
-/// \ingroup FunctorObjects
-template <class BinaryFunction> 
-class binder2nd : public unary_function<typename BinaryFunction::first_argument_type,
-					typename BinaryFunction::result_type> {
-public:
-    typedef typename BinaryFunction::first_argument_type	arg1_t;
-    typedef typename BinaryFunction::second_argument_type	arg2_t;
-    typedef typename BinaryFunction::result_type		result_t;
-public:
-    inline binder2nd (const BinaryFunction& pfn, const arg2_t& v) : m_pfn (pfn), m_Value(v) {}
-    inline result_t operator()(arg1_t v1) const { return (m_pfn (v1, m_Value)); }
-protected:
-    BinaryFunction	m_pfn;
-    arg2_t		m_Value;
-};
-
-/// Converts \p pfn into a unary function by binding the first argument to \p v.
-/// \ingroup FunctorAccessors
-template <typename BinaryFunction>
-inline binder1st<BinaryFunction>
-bind1st (BinaryFunction pfn, typename BinaryFunction::first_argument_type v) 
-{
-    return (binder1st<BinaryFunction> (pfn, v));
-}
-
-/// Converts \p pfn into a unary function by binding the second argument to \p v.
-/// \ingroup FunctorAccessors
-template <typename BinaryFunction>
-inline binder2nd<BinaryFunction>
-bind2nd (BinaryFunction pfn, typename BinaryFunction::second_argument_type v) 
-{
-    return (binder2nd<BinaryFunction> (pfn, v));
-}
-
-//----------------------------------------------------------------------
-// Composition adapters
-//----------------------------------------------------------------------
-
-/// \brief Chains two unary functions together.
-///
-/// When f(x) and g(x) are composed, the result is function c(x)=f(g(x)).
-/// Use the \ref compose1 accessor to create this object.
-/// This template is an extension, implemented by SGI STL and uSTL.
-/// \ingroup FunctorObjects
-///
-template <typename Operation1, typename Operation2>
-class unary_compose : public unary_function<typename Operation2::argument_type,
-					    typename Operation1::result_type> {
-public:
-    typedef typename Operation2::argument_type	arg_t;
-    typedef const arg_t&			rcarg_t;
-    typedef typename Operation1::result_type	result_t;
-public:
-    inline unary_compose (const Operation1& f, const Operation2& g) : m_f(f), m_g(g) {}
-    inline result_t operator() (rcarg_t x) const { return m_f(m_g(x)); }
-protected:
-    Operation1	m_f;	///< f(x), if c(x) = f(g(x))
-    Operation2	m_g;	///< g(x), if c(x) = f(g(x))
-};
-
-/// Creates a \ref unary_compose object whose function c(x)=f(g(x))
-/// \ingroup FunctorAccessors
-template <typename Operation1, typename Operation2>
-inline unary_compose<Operation1, Operation2>
-compose1 (const Operation1& f, const Operation2& g)
-{ return unary_compose<Operation1,Operation2>(f, g); }
-
-/// \brief Chains two unary functions through a binary function.
-///
-/// When f(x,y), g(x), and h(x) are composed, the result is function
-/// c(x)=f(g(x),h(x)). Use the \ref compose2 accessor to create this
-/// object. This template is an extension, implemented by SGI STL and uSTL.
-/// \ingroup FunctorObjects
-///
-template <typename Operation1, typename Operation2, typename Operation3>
-class binary_compose : public unary_function<typename Operation2::argument_type,
-					    typename Operation1::result_type> {
-public:
-    typedef typename Operation2::argument_type	arg_t;
-    typedef const arg_t&			rcarg_t;
-    typedef typename Operation1::result_type	result_t;
-public:
-    inline binary_compose (const Operation1& f, const Operation2& g, const Operation3& h) : m_f(f), m_g(g), m_h(h) {}
-    inline result_t operator() (rcarg_t x) const { return m_f(m_g(x), m_h(x)); }
-protected:
-    Operation1	m_f;	///< f(x,y), if c(x) = f(g(x),h(x))
-    Operation2	m_g;	///< g(x), if c(x) = f(g(x),h(x))
-    Operation3	m_h;	///< h(x), if c(x) = f(g(x),h(x))
-};
-
-/// Creates a \ref binary_compose object whose function c(x)=f(g(x),h(x))
-/// \ingroup FunctorAccessors
-template <typename Operation1, typename Operation2, typename Operation3>
-inline binary_compose<Operation1, Operation2, Operation3>
-compose2 (const Operation1& f, const Operation2& g, const Operation3& h)
-{ return binary_compose<Operation1, Operation2, Operation3> (f, g, h); }
-
-//----------------------------------------------------------------------
-// Member function adaptors
-//----------------------------------------------------------------------
-
-#ifndef DOXYGEN_SHOULD_SKIP_THIS
-
-#define MEM_FUN_T(WrapperName, ClassName, ArgType, FuncType, CallType)				\
-    template <typename Ret, class T>								\
-    class ClassName : public unary_function<ArgType,Ret> {					\
-    public:											\
-	typedef Ret (T::*func_t) FuncType;							\
-    public:											\
-	explicit inline	ClassName (func_t pf) : m_pf (pf) {}					\
-	inline Ret	operator() (ArgType p) const { return ((p CallType m_pf)()); }		\
-    private:											\
-	func_t	m_pf;										\
-    };	\
-	\
-    template <class Ret, typename T>		\
-    inline ClassName<Ret,T> WrapperName (Ret (T::*pf) FuncType)	\
-    {						\
-	return (ClassName<Ret,T> (pf));		\
-    }
-
-MEM_FUN_T(mem_fun,	mem_fun_t, 		T*,		(void),		->*)
-MEM_FUN_T(mem_fun,	const_mem_fun_t, 	const T*,	(void) const,	->*)
-MEM_FUN_T(mem_fun_ref,	mem_fun_ref_t,		T&,		(void),		.*)
-MEM_FUN_T(mem_fun_ref,	const_mem_fun_ref_t, 	const T&,	(void) const,	.*)
-
-#define EXT_MEM_FUN_T(ClassName, HostType, FuncType) \
-    template <class T, typename Ret, typename V> \
-    class ClassName : public unary_function<V,void> { \
-    public: \
-	typedef Ret (T::*func_t)(V) FuncType; \
-    public: \
-	inline		ClassName (HostType t, func_t pf) : m_t (t), m_pf (pf) {} \
-	inline Ret	operator() (V v) const { return ((m_t->*m_pf)(v)); } \
-    private: \
-	HostType	m_t; \
-	func_t		m_pf; \
-    };	\
-	\
-    template <class T, typename Ret, typename V>					\
-    inline ClassName<T,Ret,V> mem_fun (HostType p, Ret (T::*pf)(V) FuncType)	\
-    {											\
-	return (ClassName<T,Ret,V> (p, pf));						\
-    }
-
-EXT_MEM_FUN_T(ext_mem_fun_t,		T*,		)
-EXT_MEM_FUN_T(const_ext_mem_fun_t,	const T*,	const)
-
-#endif // DOXYGEN_SHOULD_SKIP_THIS
-
-//----------------------------------------------------------------------
-// Member variable adaptors (uSTL extension)
-//----------------------------------------------------------------------
-
-#ifndef DOXYGEN_SHOULD_SKIP_THIS
-
-#define MEM_VAR_T(FunctorName, ArgType, VarType, BaseClass, CallImpl)			\
-    template <typename Function, class T, typename VT>					\
-    class FunctorName##_t : public BaseClass {						\
-    public:										\
-	typedef ArgType				argument_type;				\
-	typedef typename Function::result_type	result_type;				\
-	typedef VarType				mem_var_ptr_t;				\
-    public:										\
-	inline FunctorName##_t (mem_var_ptr_t pv, Function pfn) : m_pv(pv), m_pfn(pfn) {}	\
-	inline result_type operator() CallImpl						\
-    private:										\
-	mem_var_ptr_t	m_pv;								\
-	Function	m_pfn;								\
-    };											\
-											\
-    template <typename Function, class T, typename VT>					\
-    inline FunctorName##_t<Function, T, VT>						\
-    FunctorName (VT T::*mvp, Function pfn)						\
-    {											\
-	return (FunctorName##_t<Function,T,VT> (mvp, pfn));				\
-    }
-
-#define FUNCTOR_UNARY_BASE(ArgType)	unary_function<ArgType, typename Function::result_type>
-#define FUNCTOR_BINARY_BASE(ArgType)	binary_function<ArgType, ArgType, typename Function::result_type>
-
-#define MEM_VAR_UNARY_ARGS		(argument_type p) const \
-					{ return (m_pfn(p.*m_pv)); }
-#define MEM_VAR_BINARY_ARGS		(argument_type p1, argument_type p2) const \
-					{ return (m_pfn(p1.*m_pv, p2.*m_pv)); }
-
-MEM_VAR_T(mem_var1,		T&, VT T::*,		FUNCTOR_UNARY_BASE(T&),  MEM_VAR_UNARY_ARGS)
-MEM_VAR_T(const_mem_var1, const T&, const VT T::*,	FUNCTOR_UNARY_BASE(T&),  MEM_VAR_UNARY_ARGS)
-MEM_VAR_T(mem_var2,		T&, VT T::*,		FUNCTOR_BINARY_BASE(T&), MEM_VAR_BINARY_ARGS)
-MEM_VAR_T(const_mem_var2, const T&, const VT T::*,	FUNCTOR_BINARY_BASE(T&), MEM_VAR_BINARY_ARGS)
-
-#undef MEM_VAR_UNARY_ARGS
-#undef MEM_VAR_BINARY_ARGS
-
-#endif // DOXYGEN_SHOULD_SKIP_THIS
-
-/// Returned functor passes member variable \p mvp reference of given object to equal\<VT\>.
-/// \ingroup FunctorAccessors
-template <class T, typename VT>
-inline const_mem_var1_t<binder2nd<equal_to<VT> >, T, VT>
-mem_var_equal_to (const VT T::*mvp, const VT& v)
-{
-    return (const_mem_var1_t<binder2nd<equal_to<VT> >,T,VT> (mvp, bind2nd(equal_to<VT>(), v)));
-}
-
-/// Returned functor passes member variable \p mvp reference of given object to less\<VT\>.
-/// \ingroup FunctorAccessors
-template <class T, typename VT>
-inline const_mem_var1_t<binder2nd<less<VT> >, T, VT>
-mem_var_less (const VT T::*mvp, const VT& v)
-{
-    return (const_mem_var1_t<binder2nd<less<VT> >,T,VT> (mvp, bind2nd(less<VT>(), v)));
-}
-
-/// Returned functor passes member variable \p mvp reference of given object to equal\<VT\>.
-/// \ingroup FunctorAccessors
-template <class T, typename VT>
-inline const_mem_var2_t<equal_to<VT>, T, VT>
-mem_var_equal_to (const VT T::*mvp)
-{
-    return (const_mem_var2_t<equal_to<VT>,T,VT> (mvp, equal_to<VT>()));
-}
-
-/// Returned functor passes member variable \p mvp reference of given object to less\<VT\>.
-/// \ingroup FunctorAccessors
-template <class T, typename VT>
-inline const_mem_var2_t<less<VT>, T, VT>
-mem_var_less (const VT T::*mvp)
-{
-    return (const_mem_var2_t<less<VT>,T,VT> (mvp, less<VT>()));
-}
-
-//----------------------------------------------------------------------
-// Dereference adaptors (uSTL extension)
-//----------------------------------------------------------------------
-
-#ifndef DOXYGEN_SHOULD_SKIP_THIS
-
-#define DEREFERENCER_T(ClassName, ArgType, BaseClass, CallImpl, FunctorKey)	\
-    template <typename T, typename Function>					\
-    class ClassName : public BaseClass {					\
-    public:									\
-	typedef ArgType*			argument_type;			\
-	typedef typename Function::result_type	result_type;			\
-    public:									\
-	inline			ClassName (Function pfn) : m_pfn (pfn) {}	\
-	inline result_type	operator() CallImpl				\
-    private:									\
-	Function		m_pfn;						\
-    };										\
-										\
-    template <typename T, typename Function>					\
-    inline ClassName<T,Function> _dereference (Function pfn, FunctorKey)	\
-    {										\
-	return (ClassName<T,Function> (pfn));					\
-    }
-
-#define DEREF_UNARY_ARGS		(argument_type p) const \
-					{ return (m_pfn(*p)); }
-#define DEREF_BINARY_ARGS		(argument_type p1, argument_type p2) const \
-					{ return (m_pfn(*p1, *p2)); }
-
-DEREFERENCER_T(deref1_t,	T, 		FUNCTOR_UNARY_BASE(T*),		DEREF_UNARY_ARGS,	FUNCTOR_UNARY_BASE(T))
-DEREFERENCER_T(const_deref1_t,	const T, 	FUNCTOR_UNARY_BASE(const T*),	DEREF_UNARY_ARGS,	FUNCTOR_UNARY_BASE(const T))
-DEREFERENCER_T(deref2_t,	T, 		FUNCTOR_BINARY_BASE(T*),	DEREF_BINARY_ARGS,	FUNCTOR_BINARY_BASE(T))
-DEREFERENCER_T(const_deref2_t,	const T, 	FUNCTOR_BINARY_BASE(const T*),	DEREF_BINARY_ARGS,	FUNCTOR_BINARY_BASE(const T))
-
-#define dereference(f) _dereference(f,f)
-
-#undef DEREF_UNARY_ARGS
-#undef DEREF_BINARY_ARGS
-
-#endif
-
-} // namespace ustl
-
-#endif
-
diff --git a/media/libdrm/mobile2/src/util/ustl-1.0/uheap.h b/media/libdrm/mobile2/src/util/ustl-1.0/uheap.h
deleted file mode 100644
index 9dfddaf..0000000
--- a/media/libdrm/mobile2/src/util/ustl-1.0/uheap.h
+++ /dev/null
@@ -1,153 +0,0 @@
-// This file is part of the ustl library, an STL implementation.
-//
-// Copyright (C) 2005 by Mike Sharov <msharov@users.sourceforge.net>
-// This file is free software, distributed under the MIT License.
-//
-// uheap.h
-//
-// Implementation of STL heap algorithms.
-//
-// The function prototypes are copied
-// exactly from the SGI version of STL documentation along with comments about
-// their use. The code is NOT the same, though the functionality is.
-//
-
-#ifndef UHEAP_H_574B9EAF271A1C107190B4D575A356C5
-#define UHEAP_H_574B9EAF271A1C107190B4D575A356C5
-
-#include "uvector.h"
-#include "ualgobase.h"
-
-namespace ustl {
-
-/// \brief Returns true if the given range is a heap under \p comp.
-/// A heap is a sequentially encoded binary tree where for every node
-/// comp(node,child1) is false and comp(node,child2) is false.
-/// \ingroup HeapAlgorithms
-/// \ingroup ConditionAlgorithms
-///
-template <typename RandomAccessIterator, typename Compare>
-bool is_heap (RandomAccessIterator first, RandomAccessIterator last, Compare comp)
-{
-    RandomAccessIterator iChild (first);
-    for (; ++iChild < last; ++first)
-	if (comp (*first, *iChild) || (++iChild < last && comp (*first, *iChild)))
-	    return (false);
-    return (true);
-}
-
-/// \brief make_heap turns the range [first, last) into a heap
-/// At completion, is_heap (first, last, comp) is true.
-/// The algorithm is adapted from "Classic Data Structures in C++" by Timothy Budd.
-/// \ingroup HeapAlgorithms
-/// \ingroup SortingAlgorithms
-///
-template <typename RandomAccessIterator, typename Compare>
-void make_heap (RandomAccessIterator first, RandomAccessIterator last, Compare comp)
-{
-    typedef typename iterator_traits<RandomAccessIterator>::value_type value_type;
-    const value_type v (*first);
-    uoff_t iChild, iHole = 0, iEnd (distance (first, last));
-    while ((iChild = 2 * iHole + 1) < iEnd) {
-	if (iChild + 1 < iEnd)	// Pick the greater child
-	    iChild += comp (first[iChild], first[iChild + 1]);
-	if (comp (first[iChild], v))
-	    break;		// Done when parent is greater than both children.
-	first[iHole] = first[iChild];
-	iHole = iChild;
-    }
-    if (iHole < iEnd)
-	first[iHole] = v;
-}
-
-/// \brief Inserts the *--last into the preceeding range assumed to be a heap.
-/// \ingroup HeapAlgorithms
-/// \ingroup MutatingAlgorithms
-template <typename RandomAccessIterator, typename Compare>
-void push_heap (RandomAccessIterator first, RandomAccessIterator last, Compare comp)
-{
-    if (last <= first)
-	return;
-    typedef typename iterator_traits<RandomAccessIterator>::value_type value_type;
-    const value_type v (*--last);
-    while (first < last) {
-	RandomAccessIterator iParent = first + (distance(first, last) - 1) / 2;
-	if (comp (v, *iParent))
-	    break;
-	*last = *iParent;
-	last = iParent;
-    }
-    *last = v;
-}
-
-/// Removes the largest element from the heap (*first) and places it at *(last-1)
-/// [first, last-1) is a heap after this operation.
-/// \ingroup HeapAlgorithms
-/// \ingroup MutatingAlgorithms
-template <typename RandomAccessIterator, typename Compare>
-void pop_heap (RandomAccessIterator first, RandomAccessIterator last, Compare comp)
-{
-    if (--last <= first)
-	return;
-    iter_swap (first, last);
-    make_heap (first, last, comp);
-}
-
-/// Sorts heap [first, last) in descending order according to comp.
-/// \ingroup HeapAlgorithms
-/// \ingroup SortingAlgorithms
-template <typename RandomAccessIterator, typename Compare>
-void sort_heap (RandomAccessIterator first, RandomAccessIterator last, Compare comp)
-{
-    for (; first < last; --last)
-	pop_heap (first, last, comp);
-}
-
-#define HEAP_FN_WITH_LESS(rtype, name)	\
-template <typename RandomAccessIterator>\
-inline rtype name (RandomAccessIterator first, RandomAccessIterator last)		\
-{											\
-    typedef typename iterator_traits<RandomAccessIterator>::value_type value_type;	\
-    return (name (first, last, less<value_type>()));					\
-}
-HEAP_FN_WITH_LESS (bool, is_heap)
-HEAP_FN_WITH_LESS (void, make_heap)
-HEAP_FN_WITH_LESS (void, push_heap)
-HEAP_FN_WITH_LESS (void, pop_heap)
-HEAP_FN_WITH_LESS (void, sort_heap)
-#undef HEAP_FN_WITH_LESS
-
-/// \class priority_queue uheap.h ustl.h
-/// \ingroup Sequences
-///
-/// \brief Sorted queue adapter to uSTL containers.
-///
-/// Acts just like the queue adapter, but keeps the elements sorted by priority
-/// specified by the given comparison operator.
-///
-template <typename T, typename Ctr = vector<T>, typename Comp = less<typename Ctr::value_type> >
-class priority_queue {
-public:
-    typedef Ctr					base_ctr;
-    typedef typename base_ctr::value_type	value_type;
-    typedef typename base_ctr::size_type	size_type;
-    typedef typename base_ctr::const_pointer	const_pointer;
-    typedef typename base_ctr::const_reference	reference;
-public:
-			priority_queue (const Comp& c = Comp()) : m_v(), m_c (c) {}
-			priority_queue (const_pointer f, const_pointer l, const Comp& c = Comp())
-			    : m_v (f, l), m_c (c) { make_heap (m_v.begin(), m_v.end(), m_c); }
-    inline size_type	size (void) const	{ return (m_v.size()); }
-    inline bool		empty (void) const	{ return (m_v.empty()); }
-    inline reference	top (void) const	{ return (m_v.at(0)); }
-    inline void		push (reference v)	{ m_v.push_back (v); make_heap (m_v.begin(), m_v.end(), m_c); }
-    inline void		pop (void)		{ pop_heap (m_v.begin(), m_v.end()); m_v.pop_back(); }
-private:
-    base_ctr		m_v;	///< Element container.
-    Comp		m_c;	///< Comparison functor by value.
-};
-
-} // namespace ustl
-
-#endif
-
diff --git a/media/libdrm/mobile2/src/util/ustl-1.0/uios.h b/media/libdrm/mobile2/src/util/ustl-1.0/uios.h
deleted file mode 100644
index 6153be5..0000000
--- a/media/libdrm/mobile2/src/util/ustl-1.0/uios.h
+++ /dev/null
@@ -1,107 +0,0 @@
-// This file is part of the ustl library, an STL implementation.
-//
-// Copyright (C) 2005 by Mike Sharov <msharov@users.sourceforge.net>
-// This file is free software, distributed under the MIT License.
-//
-// uios.h
-//
-// Types used by the streams for option setting.
-//
-
-#ifndef UIOS_H_630C16E316F7650E3A02E1C6611B789A
-#define UIOS_H_630C16E316F7650E3A02E1C6611B789A
-
-#include "utypes.h"
-
-namespace ustl {
-
-class file_exception;
-
-const char endl = '\n';		///< End of line character.
-const char ends = '\0';		///< End of string character.
-
-/// Defines types and constants used by all stream classes.
-class ios_base {
-public:
-    /// Used to set parameters for stringstreams
-    enum fmtflags {
-	boolalpha	= (1 << 0),	///< Boolean values printed as text.
-	dec		= (1 << 1),	///< Decimal number output.
-	fixed		= (1 << 2),	///< Fixed-point float output.
-	hex		= (1 << 3),	///< Hexadecimal number output.
-	internal	= (1 << 4),
-	left		= (1 << 5),	///< Left alignment.
-	oct		= (1 << 6),	///< Octal number output.
-	right		= (1 << 7),	///< Right alignment.
-	scientific	= (1 << 8),	///< Scientific float format.
-	showbase	= (1 << 9),	///< Add 0x or 0 prefixes on hex and octal numbers.
-	showpoint	= (1 << 10),	///< Print decimal point.
-	showpos		= (1 << 11),
-	skipws		= (1 << 12),	///< Skip whitespace when reading.
-	unitbuf		= (1 << 13),
-	uppercase	= (1 << 14),
-	adjustfield	= (1 << 15),
-	basefield	= (1 << 16),
-	floatfield	= (1 << 17)
-    };
-    /// For file-based streams, specifies fd mode.
-    enum openmode_bits {
-	in	= (1 << 0),
-	out	= (1 << 1),
-	app	= (1 << 2),
-	ate	= (1 << 3),
-	binary	= (1 << 4),
-	trunc	= (1 << 5),
-	#ifndef DOXYGEN_SHOULD_SKIP_THIS
-	nonblock= (1 << 6),
-	nocreate= (1 << 7),
-	noctty	= (1 << 8),
-	nombits	= 9
-	#endif
-    };
-    /// Seek directions, equivalent to SEEK_SET, SEEK_CUR, and SEEK_END.
-    enum seekdir {
-	beg,
-	cur,
-	end
-    };
-    /// I/O state bitmasks.
-    enum iostate_bits {
-	goodbit	= 0,
-	badbit	= (1 << 0),
-	eofbit	= (1 << 1),
-	failbit	= (1 << 2),
-	#ifndef DOXYGEN_SHOULD_SKIP_THIS
-	nbadbits = 3,
-	allbadbits = 0x7
-	#endif
-    };
-
-    typedef uint32_t		openmode;	///< Holds openmode_bits.
-    typedef uint32_t		iostate;	///< Holds iostate_bits for a file stream.
-    typedef file_exception	failure;	///< Thrown by fstream on errors.
-
-    static const char c_DefaultDelimiters [16];	///< Default word delimiters for stringstreams.
-public:
-    inline		ios_base (void)			: m_State (goodbit), m_Exceptions (goodbit) {}
-    inline iostate	rdstate (void) const		{ return (m_State); }
-    inline bool		bad (void) const		{ return (rdstate() & badbit); }
-    inline bool		good (void) const		{ return (rdstate() == goodbit); }
-    inline bool		fail (void) const		{ return (rdstate() & (badbit | failbit)); }
-    inline bool		eof (void) const		{ return (rdstate() & eofbit); }
-    inline bool		operator! (void) const		{ return (fail()); }
-    inline void		clear (iostate v = goodbit)	{ m_State = v; }
-    inline void		setstate (iostate v)		{ m_State |= v; }
-    inline iostate	exceptions (void) const		{ return (m_Exceptions); }
-    inline iostate	exceptions (iostate v)		{ return (m_Exceptions = v); }
-protected:
-    inline bool		set_and_throw (iostate v)	{ setstate(v); return (exceptions() & v); }
-private:
-    uint16_t		m_State;	///< Open state, using ios::iostate_bits.
-    uint16_t		m_Exceptions;	///< Exception flags, using ios::iostate_bits.
-};
-
-} // namespace ustl
-
-#endif
-
diff --git a/media/libdrm/mobile2/src/util/ustl-1.0/uiosfunc.h b/media/libdrm/mobile2/src/util/ustl-1.0/uiosfunc.h
deleted file mode 100644
index fe26ed1..0000000
--- a/media/libdrm/mobile2/src/util/ustl-1.0/uiosfunc.h
+++ /dev/null
@@ -1,103 +0,0 @@
-// This file is part of the ustl library, an STL implementation.
-//
-// Copyright (C) 2005 by Mike Sharov <msharov@users.sourceforge.net>
-// This file is free software, distributed under the MIT License.
-//
-// uiosfunc.h
-//
-
-#ifndef UIOSFUNC_H_730C16E316F7650E3A02E1C6611B789A
-#define UIOSFUNC_H_730C16E316F7650E3A02E1C6611B789A
-
-#include "sostream.h"
-
-namespace ustl {
-
-class ios : public ios_base {
-public:
-    /// \class align uiosfunc.h ustl.h
-    /// \ingroup StreamFunctors
-    /// \brief Stream functor to allow inline align() calls.
-    ///
-    /// Example: os << ios::align(sizeof(uint16_t));
-    ///
-    class align {
-    public:
-	inline explicit		align (size_t grain = c_DefaultAlignment) : m_Grain(grain) {}
-	inline istream&		apply (istream& is) const { is.align (m_Grain); return (is); }
-	inline ostream&		apply (ostream& os) const { os.align (m_Grain); return (os); }
-	inline size_t		stream_size (void) const  { return (m_Grain - 1); }
-    private:
-	const size_t		m_Grain;
-    };
-
-    /// \class talign uiosfunc.h ustl.h
-    /// \ingroup StreamFunctors
-    /// \brief Stream functor to allow type-based alignment.
-    template <typename T>
-    class talign : public align {
-    public:
-	inline explicit		talign (void) : align (alignof (T())) {}
-    };
-
-    /// \class skip uiosfunc.h ustl.h
-    /// \ingroup StreamFunctors
-    /// \brief Stream functor to allow inline skip() calls.
-    ///
-    /// Example: os << ios::skip(sizeof(uint16_t));
-    ///
-    class skip {
-    public:
-	inline explicit 	skip (size_t nBytes) : m_nBytes(nBytes) {}
-	inline istream&		apply (istream& is) const { is.skip (m_nBytes); return (is); }
-	inline ostream&		apply (ostream& os) const { os.skip (m_nBytes); return (os); }
-	inline size_t		stream_size (void) const  { return (m_nBytes); }
-    private:
-	const size_t		m_nBytes;
-    };
-
-    /// \class width uiosfunc.h ustl.h
-    /// \ingroup StreamFunctors
-    /// \brief Stream functor to allow inline set_width() calls.
-    ///
-    /// Example: os << ios::width(15);
-    ///
-    class width {
-    public:
-	inline explicit		width (size_t nBytes) : m_nBytes(nBytes) {}
-	inline ostringstream&	apply (ostringstream& os) const { os.set_width (m_nBytes); return (os); }
-    private:
-	const size_t		m_nBytes;
-    };
-
-    /// \class base uiosfunc.h ustl.h
-    /// \ingroup StreamFunctors
-    /// \brief Stream functor to allow inline set_base() calls.
-    ///
-    /// Example: os << ios::base(15);
-    ///
-    class base {
-    public:
-	inline explicit		base (size_t n) : m_Base(n) {}
-	inline ostringstream&	apply (ostringstream& os) const { os.set_base (m_Base); return (os); }
-    private:
-	const size_t		m_Base;
-    };
-};
-
-inline istream& operator>> (istream& is, const ios::skip& op)	{ return (op.apply (is)); }
-inline ostream& operator<< (ostream& os, const ios::skip& op)	{ return (op.apply (os)); }
-inline size_t stream_size_of (const ios::skip& op)		{ return (op.stream_size()); }
-inline istream& operator>> (istream& is, const ios::align& op)	{ return (op.apply (is)); }
-inline ostream& operator<< (ostream& os, const ios::align& op)	{ return (op.apply (os)); }
-inline size_t stream_size_of (const ios::align& op)		{ return (op.stream_size()); }
-inline ostringstream& operator<< (ostringstream& os, const ios::width& op)	{ return (op.apply (os)); }
-inline ostringstream& operator<< (ostringstream& os, const ios::base& op)	{ return (op.apply (os)); }
-
-} // namespace ustl
-
-CAST_STREAMABLE(ustl::ios::fmtflags, uint32_t)
-CAST_STREAMABLE(ustl::ios::seekdir, uint32_t)
-
-#endif
-
diff --git a/media/libdrm/mobile2/src/util/ustl-1.0/uiterator.h b/media/libdrm/mobile2/src/util/ustl-1.0/uiterator.h
deleted file mode 100644
index 48c0d2d..0000000
--- a/media/libdrm/mobile2/src/util/ustl-1.0/uiterator.h
+++ /dev/null
@@ -1,268 +0,0 @@
-// This file is part of the ustl library, an STL implementation.
-//
-// Copyright (C) 2005 by Mike Sharov <msharov@users.sourceforge.net>
-// This file is free software, distributed under the MIT License.
-//
-/// \file uiterator.h
-/// \brief Contains various iterator adapters.
-//
-
-#ifndef UITERATOR_H_5BCA176C7214A30F2069E2614D2DC226
-#define UITERATOR_H_5BCA176C7214A30F2069E2614D2DC226
-
-#include "uassert.h"
-#include "utypes.h"
-
-namespace ustl {
-
-//----------------------------------------------------------------------
-
-/// \struct iterator_traits uiterator.h ustl.h
-/// \brief Contains the type traits of \p Iterator
-///
-template <typename Iterator>
-struct iterator_traits {
-    typedef typename Iterator::value_type        value_type;
-    typedef typename Iterator::difference_type   difference_type;
-    typedef typename Iterator::pointer           pointer;
-    typedef typename Iterator::reference         reference;
-};
-
-#ifndef DOXYGEN_SHOULD_SKIP_THIS
-
-template <typename T>
-struct iterator_traits<T*> {
-    typedef T		value_type;
-    typedef ptrdiff_t	difference_type;
-    typedef const T*	const_pointer;
-    typedef T*		pointer;
-    typedef T&		reference;
-};
-
-template <typename T>
-struct iterator_traits<const T*> {
-    typedef T		value_type;
-    typedef ptrdiff_t	difference_type;
-    typedef const T*	const_pointer;
-    typedef const T*	pointer;
-    typedef const T&	reference;
-};
-
-template <>
-struct iterator_traits<void*> {
-    typedef uint8_t	value_type;
-    typedef ptrdiff_t	difference_type;
-    typedef const void*	const_pointer;
-    typedef void*	pointer;
-    typedef value_type&	reference;
-};
-
-template <>
-struct iterator_traits<const void*> {
-    typedef uint8_t		value_type;
-    typedef ptrdiff_t		difference_type;
-    typedef const void*		const_pointer;
-    typedef const void*		pointer;
-    typedef const value_type&	reference;
-};
-
-#endif
-
-//----------------------------------------------------------------------
-
-/// \class reverse_iterator uiterator.h ustl.h
-/// \ingroup IteratorAdaptors
-/// \brief Wraps \p Iterator to behave in an exactly opposite manner.
-///
-template <class Iterator>
-class reverse_iterator {
-public:
-    typedef typename iterator_traits<Iterator>::value_type	value_type;
-    typedef typename iterator_traits<Iterator>::difference_type	difference_type;
-    typedef typename iterator_traits<Iterator>::pointer		pointer;
-    typedef typename iterator_traits<Iterator>::reference	reference;
-public:
-    				reverse_iterator (void) : m_i() {}
-    explicit			reverse_iterator (Iterator iter) : m_i (iter) {}
-    inline bool			operator== (const reverse_iterator& iter) const { return (m_i == iter.m_i); }
-    inline bool			operator< (const reverse_iterator& iter) const { return (iter.m_i < m_i); }
-    inline Iterator		base (void) const { return (m_i); }
-    inline reference		operator* (void) const { Iterator prev (m_i); --prev; return (*prev); }
-    inline pointer		operator-> (void) const { return (&(operator*())); }
-    inline reverse_iterator&	operator++ (void) { -- m_i; return (*this); }
-    inline reverse_iterator&	operator-- (void) { ++ m_i; return (*this); }
-    inline reverse_iterator	operator++ (int) { reverse_iterator prev (*this); -- m_i; return (prev); }
-    inline reverse_iterator	operator-- (int) { reverse_iterator prev (*this); ++ m_i; return (prev); }
-    inline reverse_iterator&	operator+= (size_t n) { m_i -= n; return (*this); }
-    inline reverse_iterator&	operator-= (size_t n) { m_i += n; return (*this); }
-    inline reverse_iterator	operator+ (size_t n) const { return (reverse_iterator (m_i - n)); }
-    inline reverse_iterator	operator- (size_t n) const { return (reverse_iterator (m_i + n)); }
-    inline reference		operator[] (uoff_t n) const { return (*(*this + n)); }
-    inline difference_type	operator- (const reverse_iterator& i) const { return (distance (m_i, i.m_i)); }
-protected:
-    Iterator		m_i;
-};
-
-//----------------------------------------------------------------------
-
-/// \class insert_iterator uiterator.h ustl.h
-/// \ingroup IteratorAdaptors
-/// \brief Calls insert on bound container for each assignment.
-///
-template <class Container>
-class insert_iterator {
-public:
-    typedef typename Container::value_type	value_type;
-    typedef typename Container::difference_type	difference_type;
-    typedef typename Container::pointer		pointer;
-    typedef typename Container::reference	reference;
-    typedef typename Container::iterator	iterator;
-public:
-    explicit			insert_iterator (Container& ctr, iterator ip) : m_rCtr (ctr), m_ip (ip) {}
-    inline insert_iterator&	operator= (typename Container::const_reference v)
-    				    { m_ip = m_rCtr.insert (m_ip, v); return (*this); }
-    inline insert_iterator&	operator* (void)  { return (*this); }
-    inline insert_iterator&	operator++ (void) { ++ m_ip; return (*this); }
-    inline insert_iterator	operator++ (int)  { insert_iterator prev (*this); ++ m_ip; return (*this); }
-protected:
-    Container&			m_rCtr;
-    iterator			m_ip;
-};
-
-/// Returns the insert_iterator for \p ctr.
-template <class Container>
-inline insert_iterator<Container> inserter (Container& ctr, typename Container::iterator ip)
-{
-    return (insert_iterator<Container> (ctr, ip));
-}
-
-//----------------------------------------------------------------------
-
-/// \class back_insert_iterator uiterator.h ustl.h
-/// \ingroup IteratorAdaptors
-/// \brief Calls push_back on bound container for each assignment.
-///
-template <class Container>
-class back_insert_iterator {
-public:
-    typedef typename Container::value_type	value_type;
-    typedef typename Container::difference_type	difference_type;
-    typedef typename Container::pointer		pointer;
-    typedef typename Container::reference	reference;
-public:
-    explicit				back_insert_iterator (Container& ctr) : m_rCtr (ctr) {}
-    inline back_insert_iterator&	operator= (typename Container::const_reference v)
-    					    { m_rCtr.push_back (v); return (*this); }
-    inline back_insert_iterator&	operator* (void)  { return (*this); }
-    inline back_insert_iterator&	operator++ (void) { return (*this); }
-    inline back_insert_iterator		operator++ (int)  { return (*this); }
-protected:
-    Container&		m_rCtr;
-};
-
-/// Returns the back_insert_iterator for \p ctr.
-template <class Container>
-inline back_insert_iterator<Container> back_inserter (Container& ctr)
-{
-    return (back_insert_iterator<Container> (ctr));
-}
-
-//----------------------------------------------------------------------
-
-/// \class index_iterate uiterator.h ustl.h
-/// \ingroup IteratorAdaptors
-///
-/// \brief Allows iteration through an index container.
-///
-/// Converts an iterator into a container of uoff_t indexes to an
-/// iterator of iterators into another container.
-///
-template <typename RandomAccessIterator, typename IndexIterator>
-class index_iterate {
-public:
-    typedef RandomAccessIterator	value_type;
-    typedef ptrdiff_t			difference_type;
-    typedef RandomAccessIterator*	pointer;
-    typedef RandomAccessIterator	reference;
-public:
-    				index_iterate (void) : m_Base(), m_i() {}
-				index_iterate (RandomAccessIterator ibase, IndexIterator iindex) : m_Base (ibase), m_i (iindex) {}
-    inline bool			operator== (const index_iterate& i) const { return (m_i == i.m_i); }
-    inline bool			operator< (const index_iterate& i) const { return (m_i < i.m_i); }
-    inline bool			operator== (const RandomAccessIterator& i) const { return (m_Base == i); }
-    inline bool			operator< (const RandomAccessIterator& i) const { return (m_Base < i); }
-    inline IndexIterator	base (void) const { return (m_i); }
-    inline reference		operator* (void) const { return (advance(m_Base, *m_i)); }
-    inline pointer		operator-> (void) const { return (&(operator*())); }
-    inline index_iterate&	operator++ (void) { ++ m_i; return (*this); }
-    inline index_iterate&	operator-- (void) { -- m_i; return (*this); }
-    inline index_iterate	operator++ (int) { index_iterate prev (*this); ++ m_i; return (prev); }
-    inline index_iterate	operator-- (int) { index_iterate prev (*this); -- m_i; return (prev); }
-    inline index_iterate&	operator+= (size_t n) { m_i += n; return (*this); }
-    inline index_iterate&	operator-= (size_t n) { m_i -= n; return (*this); }
-    inline index_iterate	operator+ (size_t n) const { return (index_iterate (m_Base, m_i + n)); }
-    inline index_iterate	operator- (size_t n) const { return (index_iterate (m_Base, m_i - n)); }
-    inline reference		operator[] (uoff_t n) const { return (*(*this + n)); }
-    inline difference_type	operator- (const index_iterate& i) const { return (distance (m_i, i.m_i)); }
-private:
-    RandomAccessIterator	m_Base;
-    IndexIterator		m_i;
-};
-
-/// Returns an index_iterate for \p ibase over \p iindex.
-template <typename RandomAccessIterator, typename IndexIterator>
-inline index_iterate<RandomAccessIterator, IndexIterator> index_iterator (RandomAccessIterator ibase, IndexIterator iindex)
-{
-    return (index_iterate<RandomAccessIterator, IndexIterator> (ibase, iindex));
-}
-
-/// Converts the indexes in \p xc to iterators in \p ic of base \p ibase.
-template <typename IndexContainer, typename IteratorContainer>
-inline void indexv_to_iteratorv (typename IteratorContainer::value_type ibase, const IndexContainer& xc, IteratorContainer& ic)
-{
-    ic.resize (xc.size());
-    copy_n (index_iterator (ibase, xc.begin()), xc.size(), ic.begin());
-}
-
-//----------------------------------------------------------------------
-
-/// Converts the given const_iterator into an iterator.
-///
-template <typename Container>
-inline typename Container::iterator unconst (typename Container::const_iterator i, Container& ctr)
-{
-    const Container& cctr = ctr;
-    return (ctr.begin() + (i - cctr.begin()));
-}
-
-#ifndef DOXYGEN_SHOULD_SKIP_THIS
-
-#define IBYI(Iter1, Iter2, Ctr1, Ctr2)	\
-template <typename Container1, typename Container2>	\
-inline typename Container2::Iter2 ibyi (typename Container1::Iter1 idx, Ctr1& ctr1, Ctr2& ctr2)	\
-{							\
-    assert (ctr1.size() == ctr2.size());		\
-    return (ctr2.begin() + (idx - ctr1.begin()));	\
-}
-
-IBYI(const_iterator, const_iterator, const Container1, const Container2)
-IBYI(iterator, iterator, Container1, Container2)
-IBYI(const_iterator, iterator, const Container1, Container2)
-IBYI(iterator, const_iterator, Container1, const Container2)
-
-#else // DOXYGEN
-
-#error This declaration is for doxygen only; it is not compiled.
-
-/// Converts a const_iterator in one container into a const_iterator in another container.
-template <typename Container1, typename Container2>
-inline typename Container2::iterator ibyi (typename Container1::iterator idx, Container1& ctr1, Container2& ctr2) {}
-
-#endif // DOXYGEN
-
-//----------------------------------------------------------------------
-
-} // namespace ustl
-
-#endif
-
diff --git a/media/libdrm/mobile2/src/util/ustl-1.0/ulaalgo.h b/media/libdrm/mobile2/src/util/ustl-1.0/ulaalgo.h
deleted file mode 100644
index 1efc977..0000000
--- a/media/libdrm/mobile2/src/util/ustl-1.0/ulaalgo.h
+++ /dev/null
@@ -1,223 +0,0 @@
-// This file is part of the ustl library, an STL implementation.
-//
-// Copyright (C) 2005 by Mike Sharov <msharov@users.sourceforge.net>
-// This file is free software, distributed under the MIT License.
-//
-// ulaalgo.h
-//
-
-#ifndef ULAALGO_H_2E403D182E83FB596AFB800E68B255A1
-#define ULAALGO_H_2E403D182E83FB596AFB800E68B255A1
-
-#include "umatrix.h"
-#include "simd.h"
-
-namespace ustl {
-
-/// \brief Creates an identity matrix in \p m
-/// \ingroup NumericAlgorithms
-template <size_t NX, size_t NY, typename T>
-void load_identity (matrix<NX,NY,T>& m)
-{
-    fill_n (m.begin(), NX * NY, 0);
-    for (typename matrix<NX,NY,T>::iterator i = m.begin(); i < m.end(); i += NX + 1)
-	*i = 1;
-}
-
-/// \brief Multiplies two matrices
-/// \ingroup NumericAlgorithms
-template <size_t NX, size_t NY, typename T>
-matrix<NY,NY,T> operator* (const matrix<NX,NY,T>& m1, const matrix<NY,NX,T>& m2)
-{
-    matrix<NY,NY,T> mr;
-    for (uoff_t ry = 0; ry < NY; ++ ry) {
-	for (uoff_t rx = 0; rx < NY; ++ rx) {
-	    T dpv (0);
-	    for (uoff_t x = 0; x < NX; ++ x)
-		dpv += m1[ry][x] * m2[x][rx];
-	    mr[ry][rx] = dpv;
-	}
-    }
-    return (mr);
-}
-
-/// \brief Transforms vector \p t with matrix \p m
-/// \ingroup NumericAlgorithms
-template <size_t NX, size_t NY, typename T>
-tuple<NX,T> operator* (const tuple<NY,T>& t, const matrix<NX,NY,T>& m)
-{
-    tuple<NX,T> tr;
-    for (uoff_t x = 0; x < NX; ++ x) {
-	T dpv (0);
-	for (uoff_t y = 0; y < NY; ++ y)
-	    dpv += t[y] * m[y][x];
-	tr[x] = dpv;
-    }
-    return (tr);
-}
-
-/// \brief Transposes (exchanges rows and columns) matrix \p m.
-/// \ingroup NumericAlgorithms
-template <size_t N, typename T>
-void transpose (matrix<N,N,T>& m)
-{
-    for (uoff_t x = 0; x < N; ++ x)
-	for (uoff_t y = x; y < N; ++ y)
-	    swap (m[x][y], m[y][x]);
-}
-
-#if WANT_UNROLLED_COPY
-
-#if CPU_HAS_SSE
-
-#if linux // Non-linux gcc versions (BSD, Solaris) can't handle "x" constraint and provide no alternative.
-template <>
-inline void load_identity (matrix<4,4,float>& m)
-{
-    asm (
-	"movaps %4, %%xmm1		\n\t"	// 1 0 0 0
-	"movups %4, %0			\n\t"	// 1 0 0 0
-	"shufps $0xB1,%%xmm1,%%xmm1	\n\t"	// 0 1 0 0
-	"movups %%xmm1, %1		\n\t"	// 0 1 0 0
-	"shufps $0x4F,%4,%%xmm1		\n\t"	// 0 0 1 0
-	"shufps $0x1B,%4,%4		\n\t"	// 0 0 0 1
-	"movups %%xmm1, %2		\n\t"	// 0 0 1 0
-	"movups %4, %3"				// 0 0 0 1
-	: "=m"(m[0][0]), "=m"(m[1][0]), "=m"(m[2][0]), "=m"(m[3][0])
-	: "x"(1.0f)
-	: "xmm1"
-    );
-}
-#endif
-
-inline void _sse_load_matrix (const float* m)
-{
-    asm (
-	"movups %0, %%xmm4	\n\t"	// xmm4 = m[1 2 3 4]
-	"movups %1, %%xmm5	\n\t"	// xmm5 = m[1 2 3 4]
-	"movups %2, %%xmm6	\n\t"	// xmm6 = m[1 2 3 4]
-	"movups %3, %%xmm7"		// xmm7 = m[1 2 3 4]
-	: : "m"(m[0]), "m"(m[4]), "m"(m[8]), "m"(m[12])
-	: "xmm4", "xmm5", "xmm6", "xmm7"
-    );
-}
-
-inline void _sse_transform_to_vector (float* result)
-{
-    asm (
-	"movaps %%xmm0, %%xmm1		\n\t" // xmm1 = t[0 1 2 3]
-	"movaps %%xmm0, %%xmm2		\n\t" // xmm1 = t[0 1 2 3]
-	"movaps %%xmm0, %%xmm3		\n\t" // xmm1 = t[0 1 2 3]
-	"shufps $0x00, %%xmm0, %%xmm0	\n\t" // xmm0 = t[0 0 0 0]
-	"shufps $0x66, %%xmm1, %%xmm1	\n\t" // xmm1 = t[1 1 1 1]
-	"shufps $0xAA, %%xmm2, %%xmm2	\n\t" // xmm2 = t[2 2 2 2]
-	"shufps $0xFF, %%xmm3, %%xmm3	\n\t" // xmm3 = t[3 3 3 3]
-	"mulps  %%xmm4, %%xmm0		\n\t" // xmm0 = t[0 0 0 0] * m[0 1 2 3]
-	"mulps  %%xmm5, %%xmm1		\n\t" // xmm1 = t[1 1 1 1] * m[0 1 2 3]
-	"addps  %%xmm1, %%xmm0		\n\t" // xmm0 = xmm0 + xmm1
-	"mulps  %%xmm6, %%xmm2		\n\t" // xmm2 = t[2 2 2 2] * m[0 1 2 3]
-	"mulps  %%xmm7, %%xmm3		\n\t" // xmm3 = t[3 3 3 3] * m[0 1 2 3]
-	"addps  %%xmm3, %%xmm2		\n\t" // xmm2 = xmm2 + xmm3
-	"addps  %%xmm2, %%xmm0		\n\t" // xmm0 = result
-	"movups %%xmm0, %0"
-	: "=m"(result[0]) :
-	: "xmm0", "xmm1", "xmm2", "xmm3", "xmm4", "xmm5", "xmm6", "xmm7"
-    );
-}
-
-template <>
-tuple<4,float> operator* (const tuple<4,float>& t, const matrix<4,4,float>& m)
-{
-    tuple<4,float> result;
-    _sse_load_matrix (m.begin());
-    asm ("movups %0, %%xmm0" : : "m"(t[0]) : "xmm0");
-    _sse_transform_to_vector (result.begin());
-    return (result);
-}
-
-template <>
-matrix<4,4,float> operator* (const matrix<4,4,float>& m1, const matrix<4,4,float>& m2)
-{
-    matrix<4,4,float> result;
-    _sse_load_matrix (m2.begin());
-    for (uoff_t r = 0; r < 4; ++ r) { 
-	asm ("movups %0, %%xmm0" : : "m"(m1[r][0]) : "xmm0");
-	_sse_transform_to_vector (result[r]);
-    }
-    return (result);
-}
-
-#elif CPU_HAS_3DNOW
-
-/// Specialization for 4-component vector transform, the slow part of 3D graphics.
-template <>
-tuple<4,float> operator* (const tuple<4,float>& t, const matrix<4,4,float>& m)
-{
-    tuple<4,float> result;
-    // This is taken from "AMD Athlon Code Optimization Guide" from AMD. 18 cycles!
-    // If you are writing a 3D engine, you may want to copy it instead of calling it
-    // because of the femms instruction at the end, which takes 2 cycles.
-    asm (
-	"movq	   %2, %%mm0		\n\t"	//            y | x
-	"movq	   %3, %%mm1		\n\t"	//            w | z
-	"movq	   %%mm0, %%mm2		\n\t"	//            y | x
-	"movq	   %4, %%mm3		\n\t"	//      m[0][1] | m[0][0]
-	"punpckldq  %%mm0, %%mm0	\n\t"	//            x | x
-	"movq	   %6, %%mm4		\n\t"	//      m[1][1] | m[1][0]
-	"pfmul	   %%mm0, %%mm3		\n\t"	//    x*m[0][1] | x*m[0][0]
-	"punpckhdq  %%mm2, %%mm2	\n\t"	//            y | y
-	"pfmul	   %%mm2, %%mm4		\n\t"	//    y*m[1][1] | y*m[1][0]
-	"movq	   %5, %%mm5		\n\t"	//      m[0][3] | m[0][2]
-	"movq	   %7, %%mm7		\n\t"	//      m[1][3] | m[1][2]
-	"movq	   %%mm1, %%mm6		\n\t"	//            w | z
-	"pfmul	   %%mm0, %%mm5		\n\t"	//    x*m[0][3] | v0>x*m[0][2]
-	"movq	   %8, %%mm0		\n\t"	//      m[2][1] | m[2][0]
-	"punpckldq  %%mm1, %%mm1	\n\t"	//            z | z
-	"pfmul	   %%mm2, %%mm7		\n\t"	//    y*m[1][3] | y*m[1][2]
-	"movq	   %9, %%mm2		\n\t"	//      m[2][3] | m[2][2]
-	"pfmul	   %%mm1, %%mm0		\n\t"	//    z*m[2][1] | z*m[2][0]
-	"pfadd	   %%mm4, %%mm3		\n\t"	// x*m[0][1]+y*m[1][1] | x*m[0][0]+y*m[1][0]
-	"movq	   %10, %%mm4		\n\t"	//      m[3][1] | m[3][0]
-	"pfmul	   %%mm1, %%mm2		\n\t"	//    z*m[2][3] | z*m[2][2]
-	"pfadd	   %%mm7, %%mm5		\n\t"	// x*m[0][3]+y*m[1][3] | x*m[0][2]+y*m[1][2]
-	"movq	   %11, %%mm1		\n\t"	//      m[3][3] | m[3][2]
-	"punpckhdq  %%mm6, %%mm6	\n\t"	//            w | w
-	"pfadd	   %%mm0, %%mm3		\n\t"	// x*m[0][1]+y*m[1][1]+z*m[2][1] | x*m[0][0]+y*m[1][0]+z*m[2][0]
-	"pfmul	   %%mm6, %%mm4		\n\t"	//    w*m[3][1] | w*m[3][0]
-	"pfmul	   %%mm6, %%mm1		\n\t"	//    w*m[3][3] | w*m[3][2]
-	"pfadd	   %%mm2, %%mm5		\n\t"	// x*m[0][3]+y*m[1][3]+z*m[2][3] | x*m[0][2]+y*m[1][2]+z*m[2][2]
-	"pfadd	   %%mm4, %%mm3		\n\t"	// x*m[0][1]+y*m[1][1]+z*m[2][1]+w*m[3][1] | x*m[0][0]+y*m[1][0]+z*m[2][0]+w*m[3][0]
-	"movq	   %%mm3, %0		\n\t"	// store result->y | result->x
-	"pfadd	   %%mm1, %%mm5		\n\t"	// x*m[0][3]+y*m[1][3]+z*m[2][3]+w*m[3][3] | x*m[0][2]+y*m[1][2]+z*m[2][2]+w*m[3][2]
-	"movq	   %%mm5, %1"			// store result->w | result->z
-	: "=m"(result[0]), "=m"(result[2])
-	: "m"(t[0]), "m"(t[2]),
-	  "m"(m[0][0]), "m"(m[0][2]),
-	  "m"(m[1][0]), "m"(m[1][2]),
-	  "m"(m[2][0]), "m"(m[2][2]),
-	  "m"(m[3][0]), "m"(m[3][2])
-	: "mm0","mm1","mm2","mm3","mm4","mm5","mm6","mm7"
-    );
-    simd::reset_mmx();
-    return (result);
-}
-
-#else	// If no processor extensions, just unroll the multiplication
-
-/// Specialization for 4-component vector transform, the slow part of 3D graphics.
-template <>
-tuple<4,float> operator* (const tuple<4,float>& t, const matrix<4,4,float>& m)
-{
-    tuple<4,float> tr;
-    for (uoff_t i = 0; i < 4; ++ i)
-	tr[i] = t[0] * m[0][i] + t[1] * m[1][i] + t[2] * m[2][i] + t[3] * m[3][i];
-    return (tr);
-}
-
-#endif	// CPU_HAS_3DNOW
-#endif	// WANT_UNROLLED_COPY
-
-} // namespace ustl
-
-#endif
-
diff --git a/media/libdrm/mobile2/src/util/ustl-1.0/ulimits.h b/media/libdrm/mobile2/src/util/ustl-1.0/ulimits.h
deleted file mode 100644
index 85f1db1..0000000
--- a/media/libdrm/mobile2/src/util/ustl-1.0/ulimits.h
+++ /dev/null
@@ -1,108 +0,0 @@
-// This file is part of the ustl library, an STL implementation.
-//
-// Copyright (C) 2005 by Mike Sharov <msharov@users.sourceforge.net>
-// This file is free software, distributed under the MIT License.
-//
-// ulimits.h
-//
-
-#ifndef ULIMITS_H_1C2192EA3821E0811BBAF86B0F048364
-#define ULIMITS_H_1C2192EA3821E0811BBAF86B0F048364
-
-#include "utypes.h"
-#include <stdint.h>
-
-namespace ustl {
-
-// Android
-#ifndef UINTPTR_MAX
-#define UINTPTR_MAX	UINT32_MAX
-#endif
-
-#ifndef UINT32_MAX
-#define UINT32_MAX    (0xffffffff)
-#endif
-	
-/// \class numeric_limits ulimits.h ustl.h
-/// \brief Defines numeric limits for a type.
-///
-template <typename T> 
-struct numeric_limits {
-    /// Returns the minimum value for type T.
-    static inline T min (void)		{ return (T(0)); }
-    /// Returns the minimum value for type T.
-    static inline T max (void)		{ return (T(0)); }
-    static const bool is_signed = false;	///< True if the type is signed.
-    static const bool is_integer = false;	///< True if stores an exact value.
-    static const bool is_integral = false;	///< True if fixed size and cast-copyable.
-};
-
-#ifndef DOXYGEN_SHOULD_SKIP_THIS
-
-template <typename T>
-struct numeric_limits<T*> {
-    static inline T* min (void)	{ return (NULL); }
-    static inline T* max (void)	{ return (UINTPTR_MAX); }
-    static const bool is_signed = false;
-    static const bool is_integer = true;
-    static const bool is_integral = true;
-};
-
-#define _NUMERIC_LIMITS(type, minVal, maxVal, bSigned, bInteger, bIntegral)	\
-template <>							\
-struct numeric_limits<type> {					\
-    static inline type min (void)	{ return (minVal); }	\
-    static inline type max (void)	{ return (maxVal); }	\
-    static const bool is_signed = bSigned;			\
-    static const bool is_integer = bInteger;			\
-    static const bool is_integral = bIntegral;			\
-}
-
-//--------------------------------------------------------------------------------------
-//		type		min		max		signed	integer	integral
-//--------------------------------------------------------------------------------------
-_NUMERIC_LIMITS (bool,		false,		true,		false,	true,	true);
-_NUMERIC_LIMITS (char,		SCHAR_MIN,	SCHAR_MAX,	true,	true,	true);
-_NUMERIC_LIMITS (int,		INT_MIN,	INT_MAX,	true,	true,	true);
-_NUMERIC_LIMITS (short,		SHRT_MIN,	SHRT_MAX,	true,	true,	true);
-_NUMERIC_LIMITS (long,		LONG_MIN,	LONG_MAX,	true,	true,	true);
-#if HAVE_THREE_CHAR_TYPES
-_NUMERIC_LIMITS (signed char,	SCHAR_MIN,	SCHAR_MAX,	true,	true,	true);
-#endif
-_NUMERIC_LIMITS (unsigned char,	0,		UCHAR_MAX,	false,	true,	true);
-_NUMERIC_LIMITS (unsigned int,	0,		UINT_MAX,	false,	true,	true);
-_NUMERIC_LIMITS (unsigned short,0,		USHRT_MAX,	false,	true,	true);
-_NUMERIC_LIMITS (unsigned long,	0,		ULONG_MAX,	false,	true,	true);
-_NUMERIC_LIMITS (wchar_t,	0,		WCHAR_MAX,	false,	true,	true);
-_NUMERIC_LIMITS (float,		FLT_MIN,	FLT_MAX,	true,	false,	true);
-_NUMERIC_LIMITS (double,	DBL_MIN,	DBL_MAX,	true,	false,	true);
-_NUMERIC_LIMITS (long double,	LDBL_MIN,	LDBL_MAX,	true,	false,	true);
-#ifdef HAVE_LONG_LONG
-_NUMERIC_LIMITS (long long,	LLONG_MIN,	LLONG_MAX,	true,	true,	true);
-_NUMERIC_LIMITS (unsigned long long,	0,	ULLONG_MAX,	false,	true,	true);
-#endif
-//--------------------------------------------------------------------------------------
-
-#endif // DOXYGEN_SHOULD_SKIP_THIS
-
-/// Macro for defining numeric_limits specializations
-#define NUMERIC_LIMITS(type, minVal, maxVal, bSigned, bInteger, bIntegral)	\
-namespace ustl { _NUMERIC_LIMITS (type, minVal, maxVal, bSigned, bInteger, bIntegral); }
-
-/// Returns the recommended stream alignment for type \p T. Override with ALIGNOF.
-template <typename T>
-inline size_t alignof (const T&)
-{
-    if (numeric_limits<T>::is_integral)
-	return (__alignof__(T));
-    return (4);
-}
-
-#define ALIGNOF(type,grain)	\
-namespace ustl {		\
-    template <> inline size_t alignof (const type&) { return (grain); } }
-
-} // namespace ustl
-
-#endif
-
diff --git a/media/libdrm/mobile2/src/util/ustl-1.0/ulist.h b/media/libdrm/mobile2/src/util/ustl-1.0/ulist.h
deleted file mode 100644
index 842bbde..0000000
--- a/media/libdrm/mobile2/src/util/ustl-1.0/ulist.h
+++ /dev/null
@@ -1,78 +0,0 @@
-// This file is part of the ustl library, an STL implementation.
-//
-// Copyright (C) 2005 by Mike Sharov <msharov@users.sourceforge.net>
-// This file is free software, distributed under the MIT License.
-//
-// ulist.h
-//
-
-#ifndef ULIST_H_54E3B510498982C87A0A1E1932E6729D
-#define ULIST_H_54E3B510498982C87A0A1E1932E6729D
-
-#include "uvector.h"
-#include "uctralgo.h"
-
-namespace ustl {
-
-/// \class list ulist.h ustl.h
-/// \ingroup Sequences
-///
-/// \brief Linked list, defined as an alias to \ref vector.
-///
-template <typename T>
-class list : public vector<T> {
-public:
-    typedef typename vector<T>::size_type	size_type;
-    typedef typename vector<T>::iterator	iterator;
-    typedef typename vector<T>::const_iterator	const_iterator;
-    typedef typename vector<T>::reference	reference;
-    typedef typename vector<T>::const_reference	const_reference;
-public:
-    inline			list (void)			: vector<T> () {}
-    inline explicit		list (size_type n)		: vector<T> (n) {}
-    inline			list (size_type n, const T& v)	: vector<T> (n, v) {}
-    inline			list (const list<T>& v)		: vector<T> (v) {}
-    inline			list (const_iterator i1, const_iterator i2)	: vector<T> (i1, i2) {}
-    inline size_type		size (void) const		{ return (vector<T>::size()); }
-    inline iterator		begin (void)			{ return (vector<T>::begin()); }
-    inline const_iterator	begin (void) const		{ return (vector<T>::begin()); }
-    inline iterator		end (void)			{ return (vector<T>::end()); }
-    inline const_iterator	end (void) const		{ return (vector<T>::end()); }
-    inline void			push_front (const T& v)		{ insert (begin(), v); }
-    inline void			pop_front (void)		{ erase (begin()); }
-    inline const_reference	front (void) const		{ return (*begin()); }
-    inline reference		front (void)			{ return (*begin()); }
-    inline void			remove (const T& v)		{ ::ustl::remove (*this, v); }
-    inline void			unique (void)			{ ::ustl::unique (*this); }
-    inline void			sort (void)			{ ::ustl::sort (*this); }
-    void			merge (list<T>& l);
-    void			splice (iterator ip, list<T>& l, iterator first = NULL, iterator last = NULL);
-};
-
-/// Merges the contents with \p l. Assumes both lists are sorted.
-template <typename T>
-void list<T>::merge (list& l)
-{
-    list<T>::resize (size() + l.size());
-    iterator me = merge (begin(), end(), l.begin(), l.end(), begin());
-    list<T>::resize (distance (begin(), me));
-}
-
-/// Moves the range [first, last) from \p l to this list at \p ip.
-template <typename T>
-void list<T>::splice (iterator ip, list<T>& l, iterator first, iterator last)
-{
-    if (!first)
-	first = l.begin();
-    if (!last)
-	last = l.end();
-    insert (ip, first, last);
-    l.erase (first, last);
-}
-
-#define deque list ///< list has all the functionality provided by deque
-
-} // namespace ustl
-
-#endif
-
diff --git a/media/libdrm/mobile2/src/util/ustl-1.0/umap.h b/media/libdrm/mobile2/src/util/ustl-1.0/umap.h
deleted file mode 100644
index 938c507..0000000
--- a/media/libdrm/mobile2/src/util/ustl-1.0/umap.h
+++ /dev/null
@@ -1,165 +0,0 @@
-// This file is part of the ustl library, an STL implementation.
-//
-// Copyright (C) 2005 by Mike Sharov <msharov@users.sourceforge.net>
-// This file is free software, distributed under the MIT License.
-//
-// umap.h
-//
-
-#ifndef UMAP_H_45643F516E02A87A3DCEA5024052A6F5
-#define UMAP_H_45643F516E02A87A3DCEA5024052A6F5
-
-#include "uassert.h"
-#include "ufunction.h"
-#include "uvector.h"
-
-namespace ustl {
-
-/// \class map umap.h ustl.h
-/// \ingroup AssociativeContainers
-///
-/// \brief A sorted associative container of pair<K,V>
-///
-template <typename K, typename V>
-class map : public vector<pair<K,V> > {
-public:
-    typedef K						key_type;
-    typedef V						data_type;
-    typedef const K&					const_key_ref;
-    typedef const V&					const_data_ref;
-    typedef const map<K,V>&				rcself_t;
-    typedef vector<pair<K,V> >				base_class;
-    typedef typename base_class::value_type		value_type;
-    typedef typename base_class::size_type		size_type;
-    typedef typename base_class::pointer		pointer;
-    typedef typename base_class::const_pointer		const_pointer;
-    typedef typename base_class::reference		reference;
-    typedef typename base_class::const_reference	const_reference;
-    typedef typename base_class::const_iterator		const_iterator;
-    typedef typename base_class::iterator		iterator;
-    typedef typename base_class::reverse_iterator	reverse_iterator;
-    typedef typename base_class::const_reverse_iterator	const_reverse_iterator;
-    typedef pair<const_iterator,const_iterator>		const_range_t;
-    typedef pair<iterator,iterator>			range_t;
-public:
-    inline			map (void)			: vector<pair<K,V> > () {}
-    explicit inline		map (size_type n)		: vector<pair<K,V> > (n) {}
-    inline			map (rcself_t v)		: vector<pair<K,V> > (v) {}
-    inline			map (const_iterator i1, const_iterator i2) : vector<pair<K,V> >() { insert (i1, i2); }
-    inline rcself_t		operator= (rcself_t v)		{ base_class::operator= (v); return (*this); }
-    inline const_data_ref	operator[] (const_key_ref i) const;
-    data_type&			operator[] (const_key_ref i);
-    inline size_type		size (void) const		{ return (base_class::size()); }
-    inline iterator		begin (void)			{ return (base_class::begin()); }
-    inline const_iterator	begin (void) const		{ return (base_class::begin()); }
-    inline iterator		end (void)			{ return (base_class::end()); }
-    inline const_iterator	end (void) const		{ return (base_class::end()); }
-    inline void			assign (const_iterator i1, const_iterator i2)	{ clear(); insert (i1, i2); }
-    inline void			push_back (const_reference v)			{ insert (v); }
-    inline const_iterator	find (const_key_ref k) const;
-    inline iterator		find (const_key_ref k)	{ return (const_cast<iterator> (const_cast<rcself_t>(*this).find (k))); }
-    inline const_iterator	find_data (const_data_ref v, const_iterator first = NULL, const_iterator last = NULL) const;
-    inline iterator		find_data (const_data_ref v, iterator first = NULL, iterator last = NULL);
-    iterator			insert (const_reference v);
-    void			insert (const_iterator i1, const_iterator i2);
-    inline void			erase (const_key_ref k);
-    inline iterator		erase (iterator ep)	{ return (base_class::erase (ep)); }
-    inline iterator		erase (iterator ep1, iterator ep2) { return (base_class::erase (ep1, ep2)); }
-    inline void			clear (void)		{ base_class::clear(); }
-private:
-    const_iterator		lower_bound (const_key_ref k) const;
-    inline iterator		lower_bound (const_key_ref k) { return (const_cast<iterator>(const_cast<rcself_t>(*this).lower_bound (k))); }
-};
-
-template <typename K, typename V>
-typename map<K,V>::const_iterator map<K,V>::lower_bound (const_key_ref k) const
-{
-    const_iterator first (begin()), last (end());
-    while (first != last) {
-	const_iterator mid = advance (first, distance (first,last) / 2);
-	if (mid->first < k)
-	    first = advance (mid, 1);
-	else
-	    last = mid;
-    }
-    return (first);
-}
-
-/// Returns the pair<K,V> where K = \p k.
-template <typename K, typename V>
-inline typename map<K,V>::const_iterator map<K,V>::find (const_key_ref k) const
-{
-    const_iterator i = lower_bound (k);
-    return ((i < end() && k < i->first) ? end() : i);
-}
-
-/// Returns the pair<K,V> where V = \p v, occuring in range [first,last).
-template <typename K, typename V>
-inline typename map<K,V>::const_iterator map<K,V>::find_data (const_data_ref v, const_iterator first, const_iterator last) const
-{
-    if (!first) first = begin();
-    if (!last) last = end();
-    for (; first != last && first->second != v; ++first);
-    return (first);
-}
-
-/// Returns the pair<K,V> where V = \p v, occuring in range [first,last).
-template <typename K, typename V>
-inline typename map<K,V>::iterator map<K,V>::find_data (const_data_ref v, iterator first, iterator last)
-{
-    return (const_cast<iterator> (find_data (v, const_cast<const_iterator>(first), const_cast<const_iterator>(last))));
-}
-
-/// Returns data associated with key \p k.
-template <typename K, typename V>
-inline const typename map<K,V>::data_type& map<K,V>::operator[] (const_key_ref k) const
-{
-    assert (find(k) != end() && "operator[] const can not insert non-existent keys");
-    return (find(k)->second);
-}
-
-/// Returns data associated with key \p k.
-template <typename K, typename V>
-typename map<K,V>::data_type& map<K,V>::operator[] (const_key_ref k)
-{
-    iterator ip = lower_bound (k);
-    if (ip == end() || k < ip->first)
-	ip = base_class::insert (ip, make_pair (k, V()));
-    return (ip->second);
-}
-
-/// Inserts the pair into the container.
-template <typename K, typename V>
-typename map<K,V>::iterator map<K,V>::insert (const_reference v)
-{
-    iterator ip = lower_bound (v.first);
-    if (ip == end() || v.first < ip->first)
-	ip = base_class::insert (ip, v);
-    else
-	*ip = v;
-    return (ip);
-}
-
-/// Inserts elements from range [i1,i2) into the container.
-template <typename K, typename V>
-void map<K,V>::insert (const_iterator i1, const_iterator i2)
-{
-    assert (i1 <= i2);
-    reserve (size() + distance (i1, i2));
-    for (; i1 != i2; ++i1)
-	insert (*i1);
-}
-
-/// Erases the element with key value \p k.
-template <typename K, typename V>
-inline void map<K,V>::erase (const_key_ref k)
-{
-    iterator ip = find (k);
-    if (ip != end())
-	erase (ip);
-}
-
-} // namespace ustl
-
-#endif
-
diff --git a/media/libdrm/mobile2/src/util/ustl-1.0/umatrix.h b/media/libdrm/mobile2/src/util/ustl-1.0/umatrix.h
deleted file mode 100644
index e6810f1..0000000
--- a/media/libdrm/mobile2/src/util/ustl-1.0/umatrix.h
+++ /dev/null
@@ -1,80 +0,0 @@
-// This file is part of the ustl library, an STL implementation.
-//
-// Copyright (C) 2005 by Mike Sharov <msharov@users.sourceforge.net>
-// This file is free software, distributed under the MIT License.
-//
-// umatrix.h
-//
-
-#ifndef UMATRIX_H_740EBFEF554E833645E0FD72419A8185
-#define UMATRIX_H_740EBFEF554E833645E0FD72419A8185
-
-#include "utuple.h"
-
-namespace ustl {
-
-/// \class matrix umatrix.h ustl.h
-/// \ingroup Sequences
-///
-/// \brief A two-dimensional array of NX*NY elements of type T.
-///
-template <size_t NX, size_t NY, typename T>
-class matrix : public tuple<NX*NY,T> {
-public:
-    typedef tuple<NX,T>					row_type;
-    typedef tuple<NY,T>					column_type;
-    typedef tuple<NX*NY,T>				tuple_type;
-    typedef typename tuple_type::value_type		value_type;
-    typedef typename tuple_type::size_type		size_type;
-    typedef typename tuple_type::pointer		pointer;
-    typedef typename tuple_type::const_pointer		const_pointer;
-    typedef typename tuple_type::reference		reference;
-    typedef typename tuple_type::const_reference	const_reference;
-    typedef typename tuple_type::iterator		iterator;
-    typedef typename tuple_type::const_iterator		const_iterator;
-    typedef typename tuple_type::range_t		range_t;
-    typedef typename tuple_type::const_range_t		const_range_t;
-    typedef typename tuple_type::reverse_iterator	reverse_iterator;
-    typedef typename tuple_type::const_reverse_iterator	const_reverse_iterator;
-public:
-    inline			matrix (void)			{ fill_n (matrix::begin(), NX*NY, T()); }
-    inline size_type		columns (void) const		{ return (NX); }
-    inline size_type		rows (void) const		{ return (NY); }
-    inline const_iterator	at (size_type i) const		{ return (matrix::begin() + i * NX); }
-    inline iterator		at (size_type i)		{ return (matrix::begin() + i * NX); }
-    inline const_iterator	operator[] (size_type i) const	{ return (at (i)); }
-    inline iterator		operator[] (size_type i)	{ return (at (i)); }
-    inline row_type		row (size_type r) const		{ return (row_type (at (r))); }
-    inline column_type		column (size_type c) const;
-    template <typename T2>
-    inline const matrix&	operator= (const matrix<NX,NY,T2>& src)	{ tuple_type::operator= (src); return (*this); }
-    inline const matrix&	operator= (const matrix<NX,NY,T>& src)	{ tuple_type::operator= (src); return (*this); }
-    inline const matrix&	operator+= (const_reference v)		{ tuple_type::operator+= (v); return (*this); }
-    inline const matrix&	operator-= (const_reference v)		{ tuple_type::operator-= (v); return (*this); }
-    inline const matrix&	operator*= (const_reference v)		{ tuple_type::operator*= (v); return (*this); }
-    inline const matrix&	operator/= (const_reference v)		{ tuple_type::operator/= (v); return (*this); }
-    inline const matrix		operator+ (const_reference v) const
-				    { matrix result (*this); result += v; return (result); }
-    inline const matrix		operator- (const_reference v) const
-				    { matrix result (*this); result -= v; return (result); }
-    inline const matrix		operator* (const_reference v) const
-				    { matrix result (*this); result *= v; return (result); }
-    inline const matrix		operator/ (const_reference v) const
-				    { matrix result (*this); result /= v; return (result); }
-};
-
-template <size_t NX, size_t NY, typename T>
-inline typename matrix<NX,NY,T>::column_type matrix<NX,NY,T>::column (size_type c) const
-{
-    column_type result;
-    const_iterator src (matrix::begin() + c);
-    iterator dest (result.begin());
-    for (uoff_t i = 0; i < NY; ++ i, ++ dest, src += NX)
-	*dest = *src;
-    return (result);
-}
-
-} // namespace ustl
-
-#endif
-
diff --git a/media/libdrm/mobile2/src/util/ustl-1.0/umemory.h b/media/libdrm/mobile2/src/util/ustl-1.0/umemory.h
deleted file mode 100644
index 75a9005..0000000
--- a/media/libdrm/mobile2/src/util/ustl-1.0/umemory.h
+++ /dev/null
@@ -1,199 +0,0 @@
-// This file is part of the ustl library, an STL implementation.
-//
-// Copyright (C) 2005 by Mike Sharov <msharov@users.sourceforge.net>
-// This file is free software, distributed under the MIT License.
-//
-// umemory.h
-//
-
-#ifndef UMEMORY_H_4AB5B0DB5BF09140541409CC47BCD17A
-#define UMEMORY_H_4AB5B0DB5BF09140541409CC47BCD17A
-
-#include "unew.h"
-#ifdef HAVE_ALLOCA_H
-    #include <alloca.h>
-#else
-    #include <stdlib.h>
-#endif
-#include "upair.h"
-#include "uiterator.h"
-#include "ulimits.h"
-
-namespace ustl {
-
-/// \class auto_ptr umemory.h ustl.h
-/// \ingroup MemoryManagement
-///
-/// \brief A smart pointer.
-///
-/// Calls delete in the destructor; assignment transfers ownership.
-/// This class does not work with void pointers due to the absence
-/// of the required dereference operator.
-///
-template <typename T>
-class auto_ptr {
-public:
-    typedef T		value_type;
-    typedef T*		pointer;
-    typedef T&		reference;
-public:
-    /// Takes ownership of \p p.
-    inline explicit	auto_ptr (pointer p = NULL)	: m_p (p) {}
-    /// Takes ownership of pointer in \p p. \p p relinquishes ownership.
-    inline		auto_ptr (auto_ptr<T>& p)	: m_p (p.release()) {}
-    /// Deletes the owned pointer.
-    inline	       ~auto_ptr (void)			{ delete m_p; }
-    /// Returns the pointer without relinquishing ownership.
-    inline pointer	get (void) const		{ return (m_p); }
-    /// Returns the pointer and gives up ownership.
-    inline pointer	release (void)			{ pointer rv (m_p); m_p = NULL; return (rv); }
-    /// Deletes the pointer and sets it equal to \p p.
-    inline void		reset (pointer p)		{ if (p != m_p) { delete m_p; m_p = p; } }
-    /// Takes ownership of \p p.
-    inline auto_ptr<T>&	operator= (pointer p)		{ reset (p); return (*this); }
-    /// Takes ownership of pointer in \p p. \p p relinquishes ownership.
-    inline auto_ptr<T>&	operator= (auto_ptr<T>& p)	{ reset (p.release()); return (*this); }
-    inline reference	operator* (void) const		{ return (*m_p); }
-    inline pointer	operator-> (void) const		{ return (m_p); }
-    inline bool		operator== (const pointer p) const	{ return (m_p == p); }
-    inline bool		operator== (const auto_ptr<T>& p) const	{ return (m_p == p.m_p); }
-    inline bool		operator< (const auto_ptr<T>& p) const	{ return (p.m_p < m_p); }
-private:
-    pointer		m_p;
-};
-
-/// Calls the placement new on \p p.
-/// \ingroup RawStorageAlgorithms
-///
-template <typename T>
-inline void construct (T* p)
-{
-    new (p) T;
-}
-
-/// Calls the placement new on \p p.
-/// \ingroup RawStorageAlgorithms
-///
-template <typename ForwardIterator>
-inline void construct (ForwardIterator first, ForwardIterator last)
-{
-    typedef typename iterator_traits<ForwardIterator>::value_type value_type;
-    if (!numeric_limits<value_type>::is_integral) {
-	while (first < last) {
-	    construct (&*first);
-	    ++ first;
-	}
-    }
-}
-
-/// Calls the placement new on \p p.
-/// \ingroup RawStorageAlgorithms
-///
-template <typename T>
-inline void construct (T* p, const T& value)
-{
-    new (p) T (value);
-}
-
-/// Calls the destructor of \p p without calling delete.
-/// \ingroup RawStorageAlgorithms
-///
-template <typename T>
-inline void destroy (T* p) throw()
-{
-    p->~T();
-}
-
-/// Calls the destructor on elements in range [first, last) without calling delete.
-/// \ingroup RawStorageAlgorithms
-///
-template <typename ForwardIterator>
-inline void destroy (ForwardIterator first, ForwardIterator last) throw()
-{
-    typedef typename iterator_traits<ForwardIterator>::value_type value_type;
-    if (!numeric_limits<value_type>::is_integral)
-	for (; first < last; ++ first)
-	    destroy (&*first);
-}
-
-/// Casts \p p to the type of the second pointer argument.
-template <typename T> inline T* cast_to_type (void* p, const T*) { return ((T*) p); }
-
-/// \brief Creates a temporary buffer pair from \p p and \p n
-/// This is intended to be used with alloca to create temporary buffers.
-/// The size in the returned pair is set to 0 if the allocation is unsuccessful.
-/// \ingroup RawStorageAlgorithms
-///
-template <typename T>
-inline pair<T*, ptrdiff_t> make_temporary_buffer (void* p, size_t n, const T* ptype)
-{
-    return (make_pair (cast_to_type(p,ptype), ptrdiff_t(p ? n : 0)));
-}
-
-#ifdef HAVE_ALLOCA_H
-    /// \brief Allocates a temporary buffer, if possible.
-    /// \ingroup RawStorageAlgorithms
-    #define get_temporary_buffer(size, ptype)	make_temporary_buffer (alloca(size_of_elements(size, ptype)), size, ptype)
-    #define return_temporary_buffer(p)
-#else
-    #define get_temporary_buffer(size, ptype)	make_temporary_buffer (malloc(size_of_elements(size, ptype)), size, ptype)
-    #define return_temporary_buffer(p)		if (p) free (p), p = NULL
-#endif
-
-/// Copies [first, last) into result by calling copy constructors in result.
-/// \ingroup RawStorageAlgorithms
-///
-template <typename InputIterator, typename ForwardIterator>
-ForwardIterator uninitialized_copy (InputIterator first, InputIterator last, ForwardIterator result)
-{
-    while (first < last) {
-	construct (&*result, *first);
-	++ result;
-	++ first;
-    }
-    return (result);
-}
-
-/// Copies [first, first + n) into result by calling copy constructors in result.
-/// \ingroup RawStorageAlgorithms
-///
-template <typename InputIterator, typename ForwardIterator>
-ForwardIterator uninitialized_copy_n (InputIterator first, size_t n, ForwardIterator result)
-{
-    while (n--) {
-	construct (&*result, *first);
-	++ result;
-	++ first;
-    }
-    return (result);
-}
-
-/// Calls construct on all elements in [first, last) with value \p v.
-/// \ingroup RawStorageAlgorithms
-///
-template <typename ForwardIterator, typename T>
-void uninitialized_fill (ForwardIterator first, ForwardIterator last, const T& v)
-{
-    while (first < last) {
-	construct (&*first, v);
-	++ first;
-    }
-}
-
-/// Calls construct on all elements in [first, first + n) with value \p v.
-/// \ingroup RawStorageAlgorithms
-///
-template <typename ForwardIterator, typename T>
-ForwardIterator uninitialized_fill_n (ForwardIterator first, size_t n, const T& v)
-{
-    while (n--) {
-	construct (&*first, v);
-	++ first;
-    }
-    return (first);
-}
-    
-} // namespace ustl
-
-#endif
-
diff --git a/media/libdrm/mobile2/src/util/ustl-1.0/umultimap.h b/media/libdrm/mobile2/src/util/ustl-1.0/umultimap.h
deleted file mode 100644
index dd6ca48..0000000
--- a/media/libdrm/mobile2/src/util/ustl-1.0/umultimap.h
+++ /dev/null
@@ -1,121 +0,0 @@
-// This file is part of the ustl library, an STL implementation.
-//
-// Copyright (C) 2005 by Mike Sharov <msharov@users.sourceforge.net>
-// This file is free software, distributed under the MIT License.
-//
-// umultimap.h
-//
-
-#ifndef UMULTIMAP_H_45743F516E02A87A3FCEA5024052A6F5
-#define UMULTIMAP_H_45743F516E02A87A3FCEA5024052A6F5
-
-#include "uassert.h"
-#include "ufunction.h"
-#include "uvector.h"
-
-namespace ustl {
-
-/// \class multimap umultimap.h ustl.h
-/// \ingroup AssociativeContainers
-///
-/// \brief A sorted associative container that may container multiple entries for each key.
-///
-template <typename K, typename V>
-class multimap : public vector<pair<K,V> > {
-public:
-    typedef K						key_type;
-    typedef V						data_type;
-    typedef const K&					const_key_ref;
-    typedef const V&					const_data_ref;
-    typedef const multimap<K,V>&			rcself_t;
-    typedef vector<pair<K,V> >				base_class;
-    typedef typename base_class::value_type	value_type;
-    typedef typename base_class::size_type	size_type;
-    typedef typename base_class::pointer	pointer;
-    typedef typename base_class::const_pointer	const_pointer;
-    typedef typename base_class::reference	reference;
-    typedef typename base_class::const_reference	const_reference;
-    typedef typename base_class::const_iterator		const_iterator;
-    typedef typename base_class::iterator		iterator;
-    typedef typename base_class::reverse_iterator	reverse_iterator;
-    typedef typename base_class::const_reverse_iterator	const_reverse_iterator;
-    typedef pair<const_iterator,const_iterator>		const_range_t;
-    typedef pair<iterator,iterator>			range_t;
-public:
-    inline			multimap (void)		: vector<pair<K,V> > () {} 
-    explicit inline		multimap (size_type n)	: vector<pair<K,V> > (n) {} 
-    inline			multimap (rcself_t v)	: vector<pair<K,V> > (v) {} 
-    inline			multimap (const_iterator i1, const_iterator i2)	: vector<pair<K,V> > () { insert (i1, i2); } 
-    inline rcself_t		operator= (rcself_t v)	{ base_class::operator= (v); return (*this); }
-    inline size_type		size (void) const	{ return (base_class::size()); }
-    inline iterator		begin (void)		{ return (base_class::begin()); }
-    inline const_iterator	begin (void) const	{ return (base_class::begin()); }
-    inline iterator		end (void)		{ return (base_class::end()); }
-    inline const_iterator	end (void) const	{ return (base_class::end()); }
-    inline void			assign (const_iterator i1, const_iterator i2) { clear(); insert (i1, i2); }
-    inline size_type		count (const_key_ref k) const		{ return (upper_bound(k) - lower_bound(k)); }
-    inline void			push_back (const_reference v)		{ insert (v); }
-    inline const_range_t	equal_range (const_key_ref k) const	{ return (make_pair (lower_bound(k), upper_bound(k))); }
-    inline range_t		equal_range (const_key_ref k)		{ return (make_pair (const_cast<iterator>(lower_bound(k)), const_cast<iterator>(upper_bound(k)))); }
-    const_iterator		lower_bound (const_key_ref k) const;
-    const_iterator		upper_bound (const_key_ref k) const;
-    inline iterator		insert (const_reference v);
-    void			insert (const_iterator i1, const_iterator i2);
-    inline void			erase (const_key_ref k)			{ erase (const_cast<iterator>(lower_bound(k)), const_cast<iterator>(upper_bound(k))); }
-    inline iterator		erase (iterator ep)			{ return (base_class::erase (ep)); } 
-    inline iterator		erase (iterator ep1, iterator ep2)	{ return (base_class::erase (ep1, ep2)); } 
-    inline void			clear (void)				{ base_class::clear(); }
-};
-
-/// Returns an iterator to the first element with key value \p k.
-template <typename K, typename V>
-typename multimap<K,V>::const_iterator multimap<K,V>::lower_bound (const_key_ref k) const
-{
-    const_iterator first (begin()), last (end());
-    while (first != last) {
-	const_iterator mid = advance (first, distance (first,last) / 2);
-	if (mid->first < k)
-	    first = advance (mid, 1);
-	else
-	    last = mid;
-    }
-    return (first);
-}
-
-/// Returns an iterator to the first element with key value \p k.
-template <typename K, typename V>
-typename multimap<K,V>::const_iterator multimap<K,V>::upper_bound (const_key_ref k) const
-{
-    const_iterator first (begin()), last (end());
-    while (first != last) {
-	const_iterator mid = advance (first, distance (first,last) / 2);
-	if (k < mid->first)
-	    last = mid;
-	else
-	    first = advance (mid, 1);
-    }
-    return (last);
-}
-
-/// Inserts the pair into the container.
-template <typename K, typename V>
-inline typename multimap<K,V>::iterator multimap<K,V>::insert (const_reference v)
-{
-    iterator ip = const_cast<iterator> (upper_bound (v.first));
-    return (base_class::insert (ip, v));
-}
-
-/// Inserts elements from range [i1,i2) into the container.
-template <typename K, typename V>
-void multimap<K,V>::insert (const_iterator i1, const_iterator i2)
-{
-    assert (i1 <= i2);
-    reserve (size() + distance (i1, i2));
-    for (; i1 != i2; ++i1)
-	insert (*i1);
-}
-
-} // namespace ustl
-
-#endif
-
diff --git a/media/libdrm/mobile2/src/util/ustl-1.0/umultiset.h b/media/libdrm/mobile2/src/util/ustl-1.0/umultiset.h
deleted file mode 100644
index 404b877..0000000
--- a/media/libdrm/mobile2/src/util/ustl-1.0/umultiset.h
+++ /dev/null
@@ -1,106 +0,0 @@
-// This file is part of the ustl library, an STL implementation.
-//
-// Copyright (C) 2005 by Mike Sharov <msharov@users.sourceforge.net>
-// This file is free software, distributed under the MIT License.
-//
-// umultiset.h
-//
-
-#ifndef UMULTISET_H_446AEDBB7F61C6994DC228C25D5FA3A1
-#define UMULTISET_H_446AEDBB7F61C6994DC228C25D5FA3A1
-
-#include "uassert.h"
-#include "ualgo.h"
-#include "uvector.h"
-
-namespace ustl {
-
-/// \class multiset umultiset.h ustl.h
-/// \ingroup AssociativeContainers
-///
-/// \brief Multiple sorted container.
-/// Unlike set, it may contain multiple copies of each element.
-///
-template <typename T>
-class multiset : public vector<T> {
-public:
-    typedef const multiset<T>&				rcself_t;
-    typedef vector<T>					base_class;
-    typedef typename base_class::value_type		value_type;
-    typedef typename base_class::size_type		size_type;
-    typedef typename base_class::pointer		pointer;
-    typedef typename base_class::const_pointer		const_pointer;
-    typedef typename base_class::reference		reference;
-    typedef typename base_class::const_reference	const_reference;
-    typedef typename base_class::const_iterator		const_iterator;
-    typedef typename base_class::iterator		iterator;
-    typedef typename base_class::reverse_iterator	reverse_iterator;
-    typedef typename base_class::const_reverse_iterator	const_reverse_iterator;
-public:
-    inline			multiset (void)		: vector<T> () {}
-    explicit inline		multiset (size_type n)	: vector<T> (n) {}
-    inline			multiset (rcself_t v)	: vector<T> (v) {} 
-    inline			multiset (const_iterator i1, const_iterator i2) : vector<T> () { insert (i1, i2); }
-    inline rcself_t		operator= (rcself_t v)	{ base_class::operator= (v); return (*this); }
-    inline size_type		size (void) const	{ return (base_class::size()); }
-    inline iterator		begin (void)		{ return (base_class::begin()); }
-    inline const_iterator	begin (void) const	{ return (base_class::begin()); }
-    inline iterator		end (void)		{ return (base_class::end()); }
-    inline const_iterator	end (void) const	{ return (base_class::end()); }
-    inline void			assign (const_iterator i1, const_iterator i2);
-    size_type			count (const_reference v) const;
-    inline void			push_back (const_reference v)	{ insert (v); }
-    inline iterator		insert (const_reference v);
-    void			insert (const_iterator i1, const_iterator i2);
-    void			erase (const_reference v);
-    inline iterator		erase (iterator ep)	{ return (base_class::erase (ep)); }
-    inline iterator		erase (iterator ep1, iterator ep2) { return (base_class::erase (ep1, ep2)); }
-    inline void			clear (void)		{ base_class::clear(); }
-};
-
-/// Copies contents of range [i1,i2)
-template <typename T>
-inline void multiset<T>::assign (const_iterator i1, const_iterator i2)
-{
-    base_class::clear();
-    insert (i1, i2);
-}
-
-/// Returns the number of elements of value \p v.
-template <typename T>
-typename multiset<T>::size_type multiset<T>::count (const_reference v) const
-{
-    const pair<const_iterator,const_iterator> fr = equal_range (begin(), end(), v);
-    return (distance (fr.first, fr.second));
-}
-
-/// Inserts \p v.
-template <typename T>
-inline typename multiset<T>::iterator multiset<T>::insert (const_reference v)
-{
-    iterator ip = upper_bound (begin(), end(), v);
-    return (base_class::insert (ip, v));
-}
-
-/// Inserts all elements from range [i1,i2).
-template <typename T>
-void multiset<T>::insert (const_iterator i1, const_iterator i2)
-{
-    assert (i1 <= i2);
-    reserve (size() + distance (i1, i2));
-    for (; i1 < i2; ++i1)
-	push_back (*i1);
-}
-
-/// Erases all elements with value \p v.
-template <typename T>
-void multiset<T>::erase (const_reference v)
-{
-    pair<iterator,iterator> epr = equal_range (begin(), end(), v);
-    erase (epr.first, epr.second);
-}
-
-} // namespace ustl
-
-#endif
-
diff --git a/media/libdrm/mobile2/src/util/ustl-1.0/unew.cpp b/media/libdrm/mobile2/src/util/ustl-1.0/unew.cpp
deleted file mode 100644
index 084e053..0000000
--- a/media/libdrm/mobile2/src/util/ustl-1.0/unew.cpp
+++ /dev/null
@@ -1,33 +0,0 @@
-// This file is part of the ustl library, an STL implementation.
-//
-// Copyright (C) 2005 by Mike Sharov <msharov@users.sourceforge.net>
-// This file is free software, distributed under the MIT License.
-//
-// unew.cc
-//
-
-#include "unew.h"
-#include <stdlib.h>
-
-#if PLATFORM_ANDROID
-#include <stdio.h>
-#endif
-
-void* throwing_malloc (size_t n) throw (ustl::bad_alloc)
-{
-    void* p = malloc (n);
-    if (!p)
-#if PLATFORM_ANDROID
-        printf("bad alloc\n");
-#else
-	throw ustl::bad_alloc (n);
-#endif
-    return (p);
-}
-
-void free_nullok (void* p) throw()
-{
-    if (p)
-	free (p);
-}
-
diff --git a/media/libdrm/mobile2/src/util/ustl-1.0/unew.h b/media/libdrm/mobile2/src/util/ustl-1.0/unew.h
deleted file mode 100644
index c4ffb62..0000000
--- a/media/libdrm/mobile2/src/util/ustl-1.0/unew.h
+++ /dev/null
@@ -1,52 +0,0 @@
-// This file is part of the ustl library, an STL implementation.
-//
-// Copyright (C) 2005 by Mike Sharov <msharov@users.sourceforge.net>
-// This file is free software, distributed under the MIT License.
-//
-/// \file unew.h
-///
-/// \brief Same as \<new\>, but throws ustl:: exceptions.
-//
-
-#ifndef UNEW_H_11D237512B324C9C05A55DAF1BF086F1
-#define UNEW_H_11D237512B324C9C05A55DAF1BF086F1
-
-#include "uexception.h"
-
-/// Just like malloc, but throws on failure.
-void* throwing_malloc (size_t n) throw (ustl::bad_alloc);
-/// Just like free, but doesn't crash when given a NULL.
-void free_nullok (void* p) throw();
-
-#ifdef WITHOUT_LIBSTDCPP
-
-//
-// These are replaceable signatures:
-//  - normal single new and delete (no arguments, throw @c bad_alloc on error)
-//  - normal array new and delete (same)
-//  - @c nothrow single new and delete (take a @c nothrow argument, return
-//    @c NULL on error)
-//  - @c nothrow array new and delete (same)
-//
-//  Placement new and delete signatures (take a memory address argument,
-//  does nothing) may not be replaced by a user's program.
-//
-inline void* operator new (size_t n) throw (ustl::bad_alloc)	{ return (throwing_malloc (n)); }
-inline void* operator new[] (size_t n) throw (ustl::bad_alloc)	{ return (throwing_malloc (n)); }
-inline void  operator delete (void* p) throw()			{ free_nullok (p); }
-inline void  operator delete[] (void* p) throw()		{ free_nullok (p); }
-
-// Default placement versions of operator new.
-inline void* operator new (size_t, void* p) throw() { return (p); }
-inline void* operator new[] (size_t, void* p) throw() { return (p); }
-
-// Default placement versions of operator delete.
-inline void  operator delete  (void*, void*) throw() { }
-inline void  operator delete[](void*, void*) throw() { }
-
-#else
-#include <new>
-#endif	// WITHOUT_LIBSTDCPP
-
-#endif
-
diff --git a/media/libdrm/mobile2/src/util/ustl-1.0/unumeric.h b/media/libdrm/mobile2/src/util/ustl-1.0/unumeric.h
deleted file mode 100644
index 4883eb4..0000000
--- a/media/libdrm/mobile2/src/util/ustl-1.0/unumeric.h
+++ /dev/null
@@ -1,160 +0,0 @@
-// This file is part of the ustl library, an STL implementation.
-//
-// Copyright (C) 2005 by Mike Sharov <msharov@users.sourceforge.net>
-// This file is free software, distributed under the MIT License.
-//
-// unumeric.h
-//
-//	This file contains numeric algorithm templates.
-//
-
-#ifndef UNUMERIC_H_6C99D6F6363832C644A6FFF336E84E18
-#define UNUMERIC_H_6C99D6F6363832C644A6FFF336E84E18
-
-namespace ustl {
-
-/// Returns the sum of all elements in [first, last) added to \p init.
-/// \ingroup NumericAlgorithms
-///
-template <typename InputIterator, typename T>
-inline T accumulate (InputIterator first, InputIterator last, T init)
-{
-    while (first < last)
-	init += *first++;
-    return (init);
-}
-
-/// Returns the sum of all elements in [first, last) via \p op, added to \p init.
-/// \ingroup NumericAlgorithms
-///
-template <typename InputIterator, typename T, typename BinaryFunction>
-inline T accumulate (InputIterator first, InputIterator last, T init, BinaryFunction binary_op)
-{
-    while (first < last)
-	init = binary_op (init, *first++);
-    return (init);
-}
-
-/// Assigns range [value, value + (last - first)) to [first, last)
-/// \ingroup NumericAlgorithms
-///
-template <typename ForwardIterator, typename T>
-inline void iota (ForwardIterator first, ForwardIterator last, T value)
-{
-    while (first < last)
-	*first++ = value++;
-}
-
-/// Returns the sum of products of respective elements in the given ranges.
-/// \ingroup NumericAlgorithms
-///
-template <typename InputIterator1, typename InputIterator2, typename T>
-inline T inner_product (InputIterator1 first1, InputIterator1 last1, InputIterator2 first2, T init)
-{
-    while (first1 < last1)
-	init += *first1++ * *first2++;
-    return (init);
-}
-
-/// Returns the sum of products of respective elements in the given ranges.
-/// \ingroup NumericAlgorithms
-///
-template <typename InputIterator1, typename InputIterator2, typename T,
-    	  typename BinaryOperation1, typename BinaryOperation2>
-inline T inner_product
-(InputIterator1 first1, InputIterator1 last1, InputIterator2 first2, T init,
- BinaryOperation1 sumOp, BinaryOperation2 productOp)
-{
-    while (first1 < last1)
-	init = sumOp (init, productOp (*first1++, *first2++));
-    return (init);
-}
-
-/// Writes result such that result[i] = sum (first...first+i)
-/// \ingroup NumericAlgorithms
-///
-template <typename InputIterator, typename OutputIterator>
-inline OutputIterator partial_sum (InputIterator first, InputIterator last, OutputIterator result)
-{
-    if (first < last)
-	*result = *first++;
-    while (first < last)
-	*++result = *first++ + *result;
-    return (result);
-}
-
-/// Writes result such that result[i] = sumOp (first...first+i)
-/// \ingroup NumericAlgorithms
-///
-template <typename InputIterator, typename OutputIterator, typename BinaryOperation>
-inline OutputIterator partial_sum (InputIterator first, InputIterator last, OutputIterator result, BinaryOperation sumOp)
-{
-    if (first < last)
-	*result = *first++;
-    while (first < last)
-	*++result = sumOp (*first++, *result);
-    return (result);
-}
-
-/// Writes result such that result[i] = first[i] - first[i - 1]
-/// \ingroup NumericAlgorithms
-///
-template <typename InputIterator, typename OutputIterator>
-inline OutputIterator adjacent_difference (InputIterator first, InputIterator last, OutputIterator result)
-{
-    if (first < last)
-	*result++ = *first++;
-    while (first < last)
-	*result++ = *first - *(first - 1);
-    return (result);
-}
-
-/// Writes result such that result[i] = differenceOp (first[i], first[i - 1])
-/// \ingroup NumericAlgorithms
-///
-template <typename InputIterator, typename OutputIterator, typename BinaryOperation>
-inline OutputIterator adjacent_difference (InputIterator first, InputIterator last, OutputIterator result, BinaryOperation differenceOp)
-{
-    if (first < last)
-	*result++ = *first++;
-    while (first < last)
-	*result++ = differenceOp (*first, *(first - 1));
-    return (result);
-}
-
-/// \brief Returns x^n.
-/// Donald Knuth's Russian Peasant algorithm.
-/// \ingroup NumericAlgorithms
-///
-template <typename T>
-inline T power (T x, unsigned n)
-{
-    T result (n % 2 ? x : 1);
-    while (n /= 2) {
-	x *= x;
-	if (n % 2)
-	    result *= x;
-    }
-    return (result);
-}
-
-/// \brief Returns x^n, using \p op instead of multiplication.
-/// Donald Knuth's Russian Peasant algorithm.
-/// \ingroup NumericAlgorithms
-///
-template <typename T, typename BinaryOperation>
-inline T power (T x, unsigned n, BinaryOperation op)
-{
-    T result (n % 2 ? x : 1);
-    while (n /= 2) {
-	x = op (x, x);
-	if (n % 2)
-	    result = op (result, x);
-    }
-    return (result);
-}
-
-} // namespace ustl
-
-#endif
-
diff --git a/media/libdrm/mobile2/src/util/ustl-1.0/upair.h b/media/libdrm/mobile2/src/util/ustl-1.0/upair.h
deleted file mode 100644
index b4cc3b7..0000000
--- a/media/libdrm/mobile2/src/util/ustl-1.0/upair.h
+++ /dev/null
@@ -1,63 +0,0 @@
-// This file is part of the ustl library, an STL implementation.
-//
-// Copyright (C) 2005 by Mike Sharov <msharov@users.sourceforge.net>
-// This file is free software, distributed under the MIT License.
-//
-/// \file upair.h
-/// \brief Pair-related functionality.
-
-#ifndef UPAIR_H_7DC08F1B7FECF8AE6856D84C3B617A75
-#define UPAIR_H_7DC08F1B7FECF8AE6856D84C3B617A75
-
-#include "utypes.h"
-
-namespace ustl {
-
-/// \class pair upair.h ustl.h
-/// \ingroup AssociativeContainers
-///
-/// \brief Container for two values.
-///
-template <typename T1, typename T2>
-class pair {
-public:
-    typedef T1		first_type;
-    typedef T2		second_type;
-public:
-    /// Default constructor.
-    inline pair (void)				: first (T1()), second (T2()) {}
-    /// Initializes members with \p a, and \p b.
-    inline pair (const T1& a, const T2& b)	: first (a), second (b) {}
-    inline pair&	operator= (const pair<T1, T2>& p2) { first = p2.first; second = p2.second; return (*this); }
-    template <typename T3, typename T4>
-    inline pair&	operator= (const pair<T3, T4>& p2) { first = p2.first; second = p2.second; return (*this); }
-public:
-    first_type		first;
-    second_type		second;
-};
-
-/// Compares both values of \p p1 to those of \p p2.
-template <typename T1, typename T2>
-inline bool operator== (const pair<T1,T2>& p1, const pair<T1,T2>& p2)
-{
-    return (p1.first == p2.first && p1.second == p2.second);
-}
-
-/// Compares both values of \p p1 to those of \p p2.
-template <typename T1, typename T2>
-bool operator< (const pair<T1,T2>& p1, const pair<T1,T2>& p2)
-{
-    return (p1.first < p2.first || (p1.first == p2.first && p1.second < p2.second));
-}
-
-/// Returns a pair object with (a,b)
-template <typename T1, typename T2>
-inline pair<T1,T2> make_pair (const T1& a, const T2& b)
-{
-    return (pair<T1,T2> (a, b));
-}
-
-} // namespace ustl
-
-#endif
-
diff --git a/media/libdrm/mobile2/src/util/ustl-1.0/upredalgo.h b/media/libdrm/mobile2/src/util/ustl-1.0/upredalgo.h
deleted file mode 100644
index 562a3d6..0000000
--- a/media/libdrm/mobile2/src/util/ustl-1.0/upredalgo.h
+++ /dev/null
@@ -1,597 +0,0 @@
-// This file is part of the ustl library, an STL implementation.
-//
-// Copyright (C) 2005 by Mike Sharov <msharov@users.sourceforge.net>
-// This file is free software, distributed under the MIT License.
-//
-// ualgo.h
-//
-// Implementation of STL algorithms with custom predicates.
-//
-// The function prototypes are copied
-// exactly from the SGI version of STL documentation along with comments about
-// their use. The code is NOT the same, though the functionality usually is.
-//
-
-#ifndef UPREDALGO_H_2CB058AE0807A01A2F6A51BA5D5820A5
-#define UPREDALGO_H_2CB058AE0807A01A2F6A51BA5D5820A5
-
-namespace ustl {
-
-/// Copy_if copies elements from the range [first, last) to the range
-/// [result, result + (last - first)) if pred(*i) returns true.
-/// \ingroup MutatingAlgorithms
-/// \ingroup PredicateAlgorithms
-///
-template <typename InputIterator, typename OutputIterator, typename Predicate>
-inline OutputIterator copy_if (InputIterator first, InputIterator last, OutputIterator result, Predicate pred)
-{
-    for (; first != last; ++first) {
-	if (pred(*first)) {
-	    *result = *first;
-	    ++ result;
-	}
-    }
-    return (result);
-}
-
-/// Returns the first iterator i in the range [first, last) such that
-/// pred(*i) is true. Returns last if no such iterator exists.
-/// \ingroup SearchingAlgorithms
-/// \ingroup PredicateAlgorithms
-///
-template <typename InputIterator, typename Predicate>
-inline InputIterator find_if (InputIterator first, InputIterator last, Predicate pred)
-{
-    while (first != last && !pred (*first))
-	++ first;
-    return (first);
-}
-
-/// Returns the first iterator such that p(*i, *(i + 1)) == true.
-/// \ingroup SearchingAlgorithms
-/// \ingroup PredicateAlgorithms
-///
-template <typename ForwardIterator, typename BinaryPredicate>
-inline ForwardIterator adjacent_find (ForwardIterator first, ForwardIterator last, BinaryPredicate p)
-{
-    if (first != last)
-	for (ForwardIterator prev = first; ++first != last; ++ prev)
-	    if (p (*prev, *first))
-		return (prev);
-    return (last);
-}
-
-/// Returns the pointer to the first pair of unequal elements.
-/// \ingroup SearchingAlgorithms
-/// \ingroup PredicateAlgorithms
-///
-template <typename InputIterator, typename BinaryPredicate>
-inline pair<InputIterator,InputIterator>
-mismatch (InputIterator first1, InputIterator last1, InputIterator first2, BinaryPredicate comp)
-{
-    while (first1 != last1 && comp(*first1, *first2))
-	++ first1, ++ first2;
-    return (make_pair (first1, first2));
-}
-
-/// Returns true if two ranges are equal.
-/// This is an extension, present in uSTL and SGI STL.
-/// \ingroup ConditionAlgorithms
-/// \ingroup PredicateAlgorithms
-///
-template <typename InputIterator, typename BinaryPredicate>
-inline bool equal (InputIterator first1, InputIterator last1, InputIterator first2, BinaryPredicate comp)
-{
-    return (mismatch (first1, last1, first2, comp).first == last1);
-}
-
-/// Count_if finds the number of elements in [first, last) that satisfy the
-/// predicate pred. More precisely, the first version of count_if returns the
-/// number of iterators i in [first, last) such that pred(*i) is true.
-/// \ingroup ConditionAlgorithms
-/// \ingroup PredicateAlgorithms
-///
-template <typename InputIterator, typename Predicate>
-inline size_t count_if (InputIterator first, InputIterator last, Predicate pred)
-{
-    size_t total = 0;
-    for (; first != last; ++first)
-	if (pred (*first))
-	    ++ total;
-    return (total);
-}
-
-/// Replace_if replaces every element in the range [first, last) for which
-/// pred returns true with new_value. That is: for every iterator i, if
-/// pred(*i) is true then it performs the assignment *i = new_value.
-/// \ingroup MutatingAlgorithms
-/// \ingroup PredicateAlgorithms
-///
-template <typename ForwardIterator, typename Predicate, typename T>
-inline void replace_if (ForwardIterator first, ForwardIterator last, Predicate pred, const T& new_value)
-{
-    for (; first != last; ++first)
-	if (pred (*first))
-	    *first = new_value;
-}
-
-/// Replace_copy_if copies elements from the range [first, last) to the range
-/// [result, result + (last-first)), except that any element for which pred is
-/// true is not copied; new_value is copied instead. More precisely, for every
-/// integer n such that 0 <= n < last-first, replace_copy_if performs the
-/// assignment *(result+n) = new_value if pred(*(first+n)),
-/// and *(result+n) = *(first+n) otherwise.
-/// \ingroup MutatingAlgorithms
-/// \ingroup PredicateAlgorithms
-///
-template <typename InputIterator, typename OutputIterator, typename Predicate, typename T>
-inline OutputIterator replace_copy_if (InputIterator first, InputIterator last, OutputIterator result, Predicate pred, const T& new_value) 
-{
-    for (; first != last; ++result, ++first)
-        *result = pred(*first) ? new_value : *first;
-}
-
-/// Remove_copy_if copies elements from the range [first, last) to a range
-/// beginning at result, except that elements for which pred is true are not
-/// copied. The return value is the end of the resulting range. This operation
-/// is stable, meaning that the relative order of the elements that are copied
-/// is the same as in the range [first, last).
-/// \ingroup MutatingAlgorithms
-/// \ingroup PredicateAlgorithms
-///
-template <typename InputIterator, typename OutputIterator, typename Predicate>
-inline OutputIterator remove_copy_if (InputIterator first, InputIterator last, OutputIterator result, Predicate pred)
-{
-    for (; first != last; ++first)
-	if (pred (*first))
-	    *result++ = *first;
-    return (result);
-}
-
-/// Remove_if removes from the range [first, last) every element x such that
-/// pred(x) is true. That is, remove_if returns an iterator new_last such that
-/// the range [first, new_last) contains no elements for which pred is true.
-/// The iterators in the range [new_last, last) are all still dereferenceable,
-/// but the elements that they point to are unspecified. Remove_if is stable,
-/// meaning that the relative order of elements that are not removed is
-/// unchanged.
-/// \ingroup MutatingAlgorithms
-/// \ingroup PredicateAlgorithms
-///
-template <typename ForwardIterator, typename Predicate>
-inline ForwardIterator remove_if (ForwardIterator first, ForwardIterator last, Predicate pred)
-{
-    return (remove_copy_if (first, last, first, pred));
-}
-
-/// The reason there are two different versions of unique_copy is that there
-/// are two different definitions of what it means for a consecutive group of
-/// elements to be duplicates. In the first version, the test is simple
-/// equality: the elements in a range [f, l) are duplicates if, for every
-/// iterator i in the range, either i == f or else *i == *(i-1). In the second,
-/// the test is an arbitrary Binary Predicate binary_pred: the elements in
-/// [f, l) are duplicates if, for every iterator i in the range, either
-/// i == f or else binary_pred(*i, *(i-1)) is true.
-/// \ingroup MutatingAlgorithms
-/// \ingroup PredicateAlgorithms
-///
-template <typename InputIterator, typename OutputIterator, typename BinaryPredicate>
-OutputIterator unique_copy (InputIterator first, InputIterator last, OutputIterator result, BinaryPredicate binary_pred)
-{
-    if (first != last) {
-	*result = *first;
-	while (++first != last)
-	    if (!binary_pred (*first, *result))
-		*++result = *first;
-	++ result;
-    }
-    return (result);
-}
-
-/// Every time a consecutive group of duplicate elements appears in the range
-/// [first, last), the algorithm unique removes all but the first element.
-/// That is, unique returns an iterator new_last such that the range [first,
-/// new_last) contains no two consecutive elements that are duplicates.
-/// The iterators in the range [new_last, last) are all still dereferenceable,
-/// but the elements that they point to are unspecified. Unique is stable,
-/// meaning that the relative order of elements that are not removed is
-/// unchanged.
-/// \ingroup MutatingAlgorithms
-/// \ingroup PredicateAlgorithms
-///
-template <typename ForwardIterator, typename BinaryPredicate>
-inline ForwardIterator unique (ForwardIterator first, ForwardIterator last, BinaryPredicate binary_pred)
-{
-    return (unique_copy (first, last, first, binary_pred));
-}
-
-/// Returns the furthermost iterator i in [first, last) such that,
-/// for every iterator j in [first, i), comp(*j, value) is true.
-/// Assumes the range is sorted.
-/// \ingroup SearchingAlgorithms
-/// \ingroup PredicateAlgorithms
-///
-template <typename ForwardIterator, typename T, typename StrictWeakOrdering>
-ForwardIterator lower_bound (ForwardIterator first, ForwardIterator last, const T& value, StrictWeakOrdering comp)
-{
-    ForwardIterator mid;
-    while (first != last) {
-	mid = advance (first, distance (first,last) / 2);
-	if (comp (*mid, value))
-	    first = mid + 1;
-	else
-	    last = mid;
-    }
-    return (first);
-}
-
-/// Performs a binary search inside the sorted range.
-/// \ingroup SearchingAlgorithms
-/// \ingroup PredicateAlgorithms
-///
-template <typename ForwardIterator, typename T, typename StrictWeakOrdering>
-inline ForwardIterator binary_search (ForwardIterator first, ForwardIterator last, const T& value, StrictWeakOrdering comp)
-{
-    ForwardIterator found = lower_bound (first, last, value, comp);
-    return ((found == last || comp(value, *found)) ? last : found);
-}
-
-/// Returns the furthermost iterator i in [first,last) such that for
-/// every iterator j in [first,i), comp(value,*j) is false.
-/// \ingroup SearchingAlgorithms
-/// \ingroup PredicateAlgorithms
-///
-template <typename ForwardIterator, typename T, typename StrictWeakOrdering>
-ForwardIterator upper_bound (ForwardIterator first, ForwardIterator last, const T& value, StrictWeakOrdering comp)
-{
-    ForwardIterator mid;
-    while (first != last) {
-	mid = advance (first, distance (first,last) / 2);
-	if (comp (value, *mid))
-	    last = mid;
-	else
-	    first = mid + 1;
-    }
-    return (last);
-}
-
-/// Returns pair<lower_bound,upper_bound>
-/// \ingroup SearchingAlgorithms
-/// \ingroup PredicateAlgorithms
-///
-template <typename ForwardIterator, typename T, typename StrictWeakOrdering>
-inline pair<ForwardIterator,ForwardIterator> equal_range (ForwardIterator first, ForwardIterator last, const T& value, StrictWeakOrdering comp)
-{
-    pair<ForwardIterator,ForwardIterator> rv;
-    rv.second = rv.first = lower_bound (first, last, value, comp);
-    while (rv.second != last && !comp(value, *(rv.second)))
-	++ rv.second;
-    return (rv);
-}
-
-/// \brief Puts \p nth element into its sorted position.
-/// In this implementation, the entire array is sorted. The performance difference is
-/// so small and the function use is so rare, there is no need to have code for it.
-/// \ingroup SortingAlgorithms
-/// \ingroup SearchingAlgorithms
-/// \ingroup PredicateAlgorithms
-///
-template <typename RandomAccessIterator, typename Compare>
-inline void nth_element (RandomAccessIterator first, RandomAccessIterator, RandomAccessIterator last, Compare comp)
-{
-    sort (first, last, comp);
-}
-
-/// \brief Searches for the first subsequence [first2,last2) in [first1,last1)
-/// \ingroup SearchingAlgorithms
-/// \ingroup PredicateAlgorithms
-template <typename ForwardIterator1, typename ForwardIterator2, typename BinaryPredicate>
-ForwardIterator1 search (ForwardIterator1 first1, ForwardIterator1 last1, ForwardIterator2 first2, ForwardIterator2 last2, BinaryPredicate comp)
-{
-    const ForwardIterator1 slast = last1 - distance(first2, last2) + 1;
-    for (; first1 < slast; ++first1) {
-	ForwardIterator2 i = first2;
-	ForwardIterator1 j = first1;
-	for (; i != last2 && comp(*j, *i); ++i, ++j);
-	if (i == last2)
-	    return (first1);
-    }
-    return (last1);
-}
-
-/// \brief Searches for the last subsequence [first2,last2) in [first1,last1)
-/// \ingroup SearchingAlgorithms
-/// \ingroup PredicateAlgorithms
-template <typename ForwardIterator1, typename ForwardIterator2, typename BinaryPredicate>
-ForwardIterator1 find_end (ForwardIterator1 first1, ForwardIterator1 last1, ForwardIterator2 first2, ForwardIterator2 last2, BinaryPredicate comp)
-{
-    ForwardIterator1 s = last1 - distance(first2, last2);
-    for (; first1 < s; --s) {
-	ForwardIterator2 i = first2, j = s;
-	for (; i != last2 && comp(*j, *i); ++i, ++j);
-	if (i == last2)
-	    return (s);
-    }
-    return (last1);
-}
-
-/// \brief Searches for the first occurence of \p count \p values in [first, last)
-/// \ingroup SearchingAlgorithms
-/// \ingroup PredicateAlgorithms
-template <typename Iterator, typename T, typename BinaryPredicate>
-Iterator search_n (Iterator first, Iterator last, size_t count, const T& value, BinaryPredicate comp)
-{
-    size_t n = 0;
-    for (; first != last; ++first) {
-	if (!comp (*first, value))
-	    n = 0;
-	else if (++n == count)
-	    return (first - --n);
-    }
-    return (last);
-}
-
-/// \brief Searches [first1,last1) for the first occurrence of an element from [first2,last2)
-/// \ingroup SearchingAlgorithms
-/// \ingroup PredicateAlgorithms
-template <typename InputIterator, typename ForwardIterator, typename BinaryPredicate>
-InputIterator find_first_of (InputIterator first1, InputIterator last1, ForwardIterator first2, ForwardIterator last2, BinaryPredicate comp)
-{
-    for (; first1 != last1; ++first1)
-	for (ForwardIterator i = first2; i != last2; ++i)
-	    if (comp (*first1, *i))
-		return (first1);
-    return (first1);
-}
-
-/// \brief Returns true if [first2,last2) is a subset of [first1,last1)
-/// \ingroup ConditionAlgorithms
-/// \ingroup SetAlgorithms
-/// \ingroup PredicateAlgorithms
-template <typename InputIterator1, typename InputIterator2, typename StrictWeakOrdering>
-bool includes (InputIterator1 first1, InputIterator1 last1, InputIterator2 first2, InputIterator2 last2, StrictWeakOrdering comp)
-{
-    for (; (first1 != last1) & (first2 != last2); ++first1) {
-	if (comp (*first2, *first1))
-	    return (false);
-	first2 += !comp (*first1, *first2);
-    }
-    return (first2 == last2);
-}
-
-/// \brief Merges [first1,last1) with [first2,last2)
-///
-/// Result will contain every element that is in either set. If duplicate
-/// elements are present, max(n,m) is placed in the result.
-///
-/// \ingroup SetAlgorithms
-/// \ingroup PredicateAlgorithms
-template <typename InputIterator1, typename InputIterator2, typename OutputIterator, typename StrictWeakOrdering>
-OutputIterator set_union (InputIterator1 first1, InputIterator1 last1, InputIterator2 first2, InputIterator2 last2, OutputIterator result, StrictWeakOrdering comp)
-{
-    for (; (first1 != last1) & (first2 != last2); ++result) {
-	if (comp (*first2, *first1))
-	    *result = *first2++;
-	else {
-	    first2 += !comp (*first1, *first2);
-	    *result = *first1++;
-	}
-    }
-    return (copy (first2, last2, copy (first1, last1, result)));
-}
-
-/// \brief Creates a set containing elements shared by the given ranges.
-/// \ingroup SetAlgorithms
-/// \ingroup PredicateAlgorithms
-template <typename InputIterator1, typename InputIterator2, typename OutputIterator, typename StrictWeakOrdering>
-OutputIterator set_intersection (InputIterator1 first1, InputIterator1 last1, InputIterator2 first2, InputIterator2 last2, OutputIterator result, StrictWeakOrdering comp)
-{
-    while ((first1 != last1) & (first2 != last2)) {
-	bool b1ge2 = !comp (*first1, *first2), b2ge1 = !comp (*first2, *first1);
-	if (b1ge2 & b2ge1)
-	    *result++ = *first1;
-	first1 += b2ge1;
-	first2 += b1ge2;
-    }
-    return (result);
-}
-
-/// \brief Removes from [first1,last1) elements present in [first2,last2)
-/// \ingroup SetAlgorithms
-/// \ingroup PredicateAlgorithms
-template <typename InputIterator1, typename InputIterator2, typename OutputIterator, typename StrictWeakOrdering>
-OutputIterator set_difference (InputIterator1 first1, InputIterator1 last1, InputIterator2 first2, InputIterator2 last2, OutputIterator result, StrictWeakOrdering comp)
-{
-    while ((first1 != last1) & (first2 != last2)) {
-	bool b1ge2 = !comp (*first1, *first2), b2ge1 = !comp (*first2, *first1);
-	if (!b1ge2)
-	    *result++ = *first1;
-	first1 += b2ge1;
-	first2 += b1ge2;
-    }
-    return (copy (first1, last1, result));
-}
-
-/// \brief Performs union of sets A-B and B-A.
-/// \ingroup SetAlgorithms
-/// \ingroup PredicateAlgorithms
-template <typename InputIterator1, typename InputIterator2, typename OutputIterator, typename StrictWeakOrdering>
-OutputIterator set_symmetric_difference (InputIterator1 first1, InputIterator1 last1, InputIterator2 first2, InputIterator2 last2, OutputIterator result, StrictWeakOrdering comp)
-{
-    while ((first1 != last1) & (first2 != last2)) {
-	bool b1l2 = comp (*first1, *first2), b2l1 = comp (*first2, *first1);
-	if (b1l2)
-	    *result++ = *first1;
-	else if (b2l1)
-	    *result++ = *first2;
-	first1 += !b2l1;
-	first2 += !b1l2;
-    }
-    return (copy (first2, last2, copy (first1, last1, result)));
-}
-
-/// \brief Returns true if the given range is sorted.
-/// \ingroup ConditionAlgorithms
-/// \ingroup PredicateAlgorithms
-template <typename ForwardIterator, typename StrictWeakOrdering>
-bool is_sorted (ForwardIterator first, ForwardIterator last, StrictWeakOrdering comp)
-{
-    for (ForwardIterator i = first; ++i < last; ++first)
-	if (comp (*i, *first))
-	    return (false);
-    return (true);
-}
-
-/// \brief Compares two given containers like strcmp compares strings.
-/// \ingroup ConditionAlgorithms
-/// \ingroup PredicateAlgorithms
-template <typename InputIterator1, typename InputIterator2, typename BinaryPredicate>
-bool lexicographical_compare (InputIterator1 first1, InputIterator1 last1, InputIterator2 first2, InputIterator2 last2, BinaryPredicate comp)
-{
-    for (; (first1 != last1) & (first2 != last2); ++first1, ++first2) {
-	if (comp (*first1, *first2))
-	    return (true);
-	if (comp (*first2, *first1))
-	    return (false);
-    }
-    return ((first1 == last1) & (first2 != last2));
-}
-
-/// \brief Creates the next lexicographical permutation of [first,last).
-/// Returns false if no further permutations can be created.
-/// \ingroup GeneratorAlgorithms
-/// \ingroup PredicateAlgorithms
-template <typename BidirectionalIterator, typename StrictWeakOrdering>
-bool next_permutation (BidirectionalIterator first, BidirectionalIterator last, StrictWeakOrdering comp)
-{
-    if (distance (first, last) < 2)
-	return (false);
-    BidirectionalIterator i = last;
-    for (--i; i != first; ) {
-	--i;
-	if (comp (i[0], i[1])) {
-	    BidirectionalIterator j = last;
-	    while (!comp (*i, *--j));
-	    iter_swap (i, j);
-	    reverse (i + 1, last);
-	    return (true);
-	}
-    }
-    reverse (first, last);
-    return (false);
-}
-
-/// \brief Creates the previous lexicographical permutation of [first,last).
-/// Returns false if no further permutations can be created.
-/// \ingroup GeneratorAlgorithms
-/// \ingroup PredicateAlgorithms
-template <typename BidirectionalIterator, typename StrictWeakOrdering>
-bool prev_permutation (BidirectionalIterator first, BidirectionalIterator last, StrictWeakOrdering comp)
-{
-    if (distance (first, last) < 2)
-	return (false);
-    BidirectionalIterator i = last;
-    for (--i; i != first; ) {
-	--i;
-	if (comp(i[1], i[0])) {
-	    BidirectionalIterator j = last;
-	    while (!comp (*--j, *i));
-	    iter_swap (i, j);
-	    reverse (i + 1, last);
-	    return (true);
-	}
-    }
-    reverse (first, last);
-    return (false);
-}
-
-/// \brief Returns iterator to the max element in [first,last)
-/// \ingroup SearchingAlgorithms
-/// \ingroup PredicateAlgorithms
-template <typename ForwardIterator, typename BinaryPredicate>
-inline ForwardIterator max_element (ForwardIterator first, ForwardIterator last, BinaryPredicate comp)
-{
-    ForwardIterator result = first;
-    for (; first != last; ++first)
-	if (comp (*result, *first))
-	    result = first;
-    return (result);
-}
-
-/// \brief Returns iterator to the min element in [first,last)
-/// \ingroup SearchingAlgorithms
-/// \ingroup PredicateAlgorithms
-template <typename ForwardIterator, typename BinaryPredicate>
-inline ForwardIterator min_element (ForwardIterator first, ForwardIterator last, BinaryPredicate comp)
-{
-    ForwardIterator result = first;
-    for (; first != last; ++first)
-	if (comp (*first, *result))
-	    result = first;
-    return (result);
-}
-
-/// \brief Makes [first,middle) a part of the sorted array.
-/// Contents of [middle,last) is undefined. This implementation just calls stable_sort.
-/// \ingroup SortingAlgorithms
-/// \ingroup PredicateAlgorithms
-template <typename RandomAccessIterator, typename StrictWeakOrdering>
-inline void partial_sort (RandomAccessIterator first, RandomAccessIterator, RandomAccessIterator last, StrictWeakOrdering comp)
-{
-    stable_sort (first, last, comp);
-}
-
-/// \brief Like partial_sort, but outputs to [result_first,result_last)
-/// \ingroup SortingAlgorithms
-/// \ingroup PredicateAlgorithms
-template <typename InputIterator, typename RandomAccessIterator, typename StrictWeakOrdering>
-RandomAccessIterator partial_sort_copy (InputIterator first, InputIterator last, RandomAccessIterator result_first, RandomAccessIterator result_last, StrictWeakOrdering comp)
-{
-    RandomAccessIterator rend = result_first;
-    for (; first != last; ++first) {
-	RandomAccessIterator i = result_first;
-	for (; i != rend && comp (*i, *first); ++i);
-	if (i == result_last)
-	    continue;
-	rend += (rend < result_last);
-	copy_backward (i, rend - 1, rend);
-	*i = *first;
-    }
-    return (rend);
-}
-
-/// \brief Like \ref partition, but preserves equal element order.
-/// \ingroup SortingAlgorithms
-/// \ingroup PredicateAlgorithms
-template <typename ForwardIterator, typename Predicate>
-ForwardIterator stable_partition (ForwardIterator first, ForwardIterator last, Predicate pred)
-{
-    if (first == last)
-	return (first);
-    ForwardIterator l, r, m = advance (first, distance (first, last) / 2);
-    if (first == m)
-	return (pred(*first) ? last : first);
-    l = stable_partition (first, m, pred);
-    r = stable_partition (m, last, pred);
-    rotate (l, m, r);
-    return (advance (l, distance (m, r)));
-}
-
-/// \brief Splits [first,last) in two by \p pred.
-///
-/// Creates two ranges [first,middle) and [middle,last), where every element
-/// in the former is less than every element in the latter.
-/// The return value is middle.
-///
-/// \ingroup SortingAlgorithms
-/// \ingroup PredicateAlgorithms
-template <typename ForwardIterator, typename Predicate>
-inline ForwardIterator partition (ForwardIterator first, ForwardIterator last, Predicate pred)
-{
-    return (stable_partition (first, last, pred));
-}
-
-} // namespace ustl
-
-#endif
-
diff --git a/media/libdrm/mobile2/src/util/ustl-1.0/uqueue.h b/media/libdrm/mobile2/src/util/ustl-1.0/uqueue.h
deleted file mode 100644
index 99eef80..0000000
--- a/media/libdrm/mobile2/src/util/ustl-1.0/uqueue.h
+++ /dev/null
@@ -1,71 +0,0 @@
-// This file is part of the ustl library, an STL implementation.
-//
-// Copyright (C) 2005 by Mike Sharov <msharov@users.sourceforge.net>
-// This file is free software, distributed under the MIT License.
-//
-// uqueue.h
-//
-
-#ifndef UQUEUE_H_27F01FDB0D59B75277E0E5C41ABC6B5B
-#define UQUEUE_H_27F01FDB0D59B75277E0E5C41ABC6B5B
-
-namespace ustl {
-
-/// \class queue uqueue.h ustl.h
-/// \ingroup Sequences
-///
-/// \brief Queue adapter to uSTL containers.
-///
-/// The most efficient way to use this implementation is to fill the queue
-/// and the completely empty it before filling again.
-///
-template <typename Sequence>
-class queue {
-public:
-    typedef typename Sequence::value_type	value_type;
-    typedef typename Sequence::size_type	size_type;
-    typedef typename Sequence::difference_type	difference_type;
-    typedef typename Sequence::reference	reference;
-    typedef typename Sequence::const_reference	const_reference;
-    typedef typename Sequence::pointer		pointer;
-public:
-    inline			queue (void)			: m_Storage (), m_Front (0) { }
-    explicit inline		queue (const Sequence& s)	: m_Storage (s), m_Front (0) { }
-    inline size_type		size (void) const		{ return (m_Storage.size() - m_Front); }
-    inline bool			empty (void) const		{ return (!size()); }
-    inline reference		front (void)			{ return (m_Storage [m_Front]); }
-    inline const_reference	front (void) const		{ return (m_Storage [m_Front]); }
-    inline reference		back (void)			{ return (m_Storage.back()); }
-    inline const_reference	back (void) const		{ return (m_Storage.back()); }
-    inline void			push (const value_type& v);
-    inline void			pop (void);
-    inline bool			operator== (const queue& s)	{ return (m_Storage == s.m_Storage && m_Front == s.m_Front); }
-    inline bool			operator< (const queue& s)	{ return (size() < s.size()); }
-private:
-    Sequence			m_Storage;	///< Where the data actually is.
-    size_type			m_Front;	///< Index of the element returned by next pop.
-};
-
-/// Pushes \p v on the queue.
-template <class Sequence>
-inline void queue<Sequence>::push (const value_type& v)
-{
-    if (m_Front) {
-	m_Storage.erase (m_Storage.begin(), m_Front);
-	m_Front = 0;
-    }
-    m_Storage.push_back (v);
-}
-
-/// Pops the topmost element from the queue.
-template <class Sequence>
-inline void queue<Sequence>::pop (void)
-{
-    if (++m_Front >= m_Storage.size())
-	m_Storage.resize (m_Front = 0);
-}
-
-} // namespace ustl
-
-#endif
-
diff --git a/media/libdrm/mobile2/src/util/ustl-1.0/uset.h b/media/libdrm/mobile2/src/util/ustl-1.0/uset.h
deleted file mode 100644
index 958d4b0..0000000
--- a/media/libdrm/mobile2/src/util/ustl-1.0/uset.h
+++ /dev/null
@@ -1,97 +0,0 @@
-// This file is part of the ustl library, an STL implementation.
-//
-// Copyright (C) 2005 by Mike Sharov <msharov@users.sourceforge.net>
-// This file is free software, distributed under the MIT License.
-//
-// uset.h
-//
-
-#ifndef USET_H_45543F516E02A87A3FCEA5024052A6F5
-#define USET_H_45543F516E02A87A3FCEA5024052A6F5
-
-#include "uassert.h"
-#include "uvector.h"
-
-namespace ustl {
-
-/// \class set uset.h ustl.h
-/// \ingroup Sequences
-///
-/// \brief Unique sorted container. Sorted vector with all values unique.
-///
-template <typename T>
-class set : public vector<T> {
-public:
-    typedef const set<T>&			rcself_t;
-    typedef vector<T>				base_class;
-    typedef typename base_class::value_type		key_type;
-    typedef typename base_class::value_type		data_type;
-    typedef typename base_class::value_type		value_type;
-    typedef typename base_class::size_type		size_type;
-    typedef typename base_class::pointer			pointer;
-    typedef typename base_class::const_pointer		const_pointer;
-    typedef typename base_class::reference		reference;
-    typedef typename base_class::const_reference		const_reference;
-    typedef typename base_class::const_iterator		const_iterator;
-    typedef typename base_class::iterator		iterator;
-    typedef typename base_class::reverse_iterator	reverse_iterator;
-    typedef typename base_class::const_reverse_iterator	const_reverse_iterator;
-public:
-    inline			set (void)		: vector<T> () { }
-    explicit inline		set (size_type n)	: vector<T> (n) { }
-    inline			set (rcself_t v)	: vector<T> (v) { } 
-    inline			set (const_iterator i1, const_iterator i2) : vector<T> () { insert (i1, i2); }
-    inline rcself_t		operator= (rcself_t v)	{ base_class::operator= (v); return (*this); }
-    inline size_type		size (void) const	{ return (base_class::size()); }
-    inline iterator		begin (void)		{ return (base_class::begin()); }
-    inline const_iterator	begin (void) const	{ return (base_class::begin()); }
-    inline iterator		end (void)		{ return (base_class::end()); }
-    inline const_iterator	end (void) const	{ return (base_class::end()); }
-    inline void			assign (const_iterator i1, const_iterator i2)	{ clear(); insert (i1, i2); }
-    inline void			push_back (const_reference v)	{ insert (v); }
-    inline const_iterator	find (const_reference v) const	{ return (binary_search (begin(), end(), v)); }
-    inline iterator		find (const_reference v)	{ return (const_cast<iterator>(const_cast<rcself_t>(*this).find (v))); }
-    iterator			insert (const_reference v);
-    inline void			insert (const_iterator i1, const_iterator i2);
-    inline void			erase (const_reference v);
-    inline iterator		erase (iterator ep)	{ return (base_class::erase (ep)); }
-    inline iterator		erase (iterator ep1, iterator ep2) { return (base_class::erase (ep1, ep2)); }
-    inline void			clear (void)		{ base_class::clear(); }
-};
-
-/// Inserts \p v into the container, maintaining the sort order.
-template <typename T>
-typename set<T>::iterator set<T>::insert (const_reference v)
-{
-    iterator ip = lower_bound (begin(), end(), v);
-    if (ip == end() || v < *ip)
-	ip = base_class::insert (ip, v);
-    else
-	*ip = v;
-    return (ip);
-}
-
-/// Inserts the contents of range [i1,i2)
-template <typename T>
-void set<T>::insert (const_iterator i1, const_iterator i2)
-{
-    assert (i1 <= i2);
-    reserve (size() + distance (i1, i2));
-    for (; i1 < i2; ++i1)
-	push_back (*i1);
-}
-
-/// Erases the element with value \p v.
-template <typename T>
-inline void set<T>::erase (const_reference v)
-{
-    iterator ip = find (v);
-    if (ip != end())
-	erase (ip);
-}
-
-
-} // namespace ustl
-
-#endif
-
diff --git a/media/libdrm/mobile2/src/util/ustl-1.0/uspecial.h b/media/libdrm/mobile2/src/util/ustl-1.0/uspecial.h
deleted file mode 100644
index 0b87a54..0000000
--- a/media/libdrm/mobile2/src/util/ustl-1.0/uspecial.h
+++ /dev/null
@@ -1,267 +0,0 @@
-// This file is part of the ustl library, an STL implementation.
-//
-// Copyright (C) 2005 by Mike Sharov <msharov@users.sourceforge.net>
-// This file is free software, distributed under the MIT License.
-//
-// uspecial.h
-//
-// Template specializations for uSTL classes.
-//
-
-#ifndef USPECIAL_H_947ADYOU0ARE3YOU2REALLY8ARE44CE0
-#define USPECIAL_H_947ADYOU0ARE3YOU2REALLY8ARE44CE0
-
-#include "uassert.h"
-#include "uvector.h"
-#include "ustring.h"
-#include "uset.h"
-#include "umultiset.h"
-#include "ubitset.h"
-#include "ulaalgo.h"
-#include "uctralgo.h"
-#include "ufunction.h"
-#include "uctrstrm.h"
-#include "sistream.h"
-#include <ctype.h>
-
-namespace ustl {
-
-//----------------------------------------------------------------------
-// Alogrithm specializations not in use by the library code.
-//----------------------------------------------------------------------
-
-template <> inline void swap (cmemlink& a, cmemlink& b)			{ a.swap (b); }
-template <> inline void swap (memlink& a, memlink& b)			{ a.swap (b); }
-template <> inline void swap (memblock& a, memblock& b)			{ a.swap (b); }
-template <> inline void swap (string& a, string& b)			{ a.swap (b); }
-#define TEMPLATE_SWAP_PSPEC(type, template_decl)	\
-template_decl inline void swap (type& a, type& b) { a.swap (b); }
-TEMPLATE_SWAP_PSPEC (TEMPLATE_TYPE1 (vector,T),		TEMPLATE_DECL1 (T))
-TEMPLATE_SWAP_PSPEC (TEMPLATE_TYPE1 (set,T),		TEMPLATE_DECL1 (T))
-TEMPLATE_SWAP_PSPEC (TEMPLATE_TYPE1 (multiset,T),	TEMPLATE_DECL1 (T))
-TEMPLATE_SWAP_PSPEC (TEMPLATE_TYPE2 (tuple,N,T),	TEMPLATE_FULL_DECL2 (size_t,N,typename,T))
-
-//----------------------------------------------------------------------
-// Streamable definitions. Not used in the library and require streams.
-//----------------------------------------------------------------------
-
-//----{ pair }----------------------------------------------------------
-
-/// \brief Reads pair \p p from stream \p is.
-template <typename T1, typename T2>
-istream& operator>> (istream& is, pair<T1,T2>& p)
-{
-    is >> p.first;
-    is.align (alignof(T2()));
-    is >> p.second;
-    is.align (alignof(T1()));
-    return (is);
-}
-
-/// Writes pair \p p to stream \p os.
-template <typename T1, typename T2>
-ostream& operator<< (ostream& os, const pair<T1,T2>& p)
-{
-    os << p.first;
-    os.align (alignof(T2()));
-    os << p.second;
-    os.align (alignof(T1()));
-    return (os);
-}
-
-/// Writes pair \p p to stream \p os.
-template <typename T1, typename T2>
-ostringstream& operator<< (ostringstream& os, const pair<T1,T2>& p)
-{
-    os << '(' << p.first << ',' << p.second << ')';
-    return (os);
-}
-
-/// Returns the written size of the object.
-template <typename T1, typename T2>
-inline size_t stream_size_of (const pair<T1,T2>& v)
-{
-    return (Align (stream_size_of(v.first), alignof(T2())) +
-	    Align (stream_size_of(v.second), alignof(T1())));
-}
-
-/// \brief Takes a pair and returns pair.first
-/// This is an extension, available in uSTL and the SGI STL.
-template <typename Pair> struct select1st : public unary_function<Pair,typename Pair::first_type> {
-    typedef typename Pair::first_type result_type;
-    inline const result_type&	operator()(const Pair& a) const { return (a.first); }
-    inline result_type&		operator()(Pair& a) const { return (a.first); }
-};
-
-/// \brief Takes a pair and returns pair.second
-/// This is an extension, available in uSTL and the SGI STL.
-template <typename Pair> struct select2nd : public unary_function<Pair,typename Pair::second_type> {
-    typedef typename Pair::second_type result_type;
-    inline const result_type&	operator()(const Pair& a) const { return (a.second); }
-    inline result_type&		operator()(Pair& a) const { return (a.second); }
-};
-
-/// \brief Converts a const_iterator pair into an iterator pair
-/// Useful for converting pair ranges returned by equal_range, for instance.
-/// This is an extension, available in uSTL.
-template <typename Container>
-inline pair<typename Container::iterator, typename Container::iterator>
-unconst (const pair<typename Container::const_iterator, typename Container::const_iterator>& i, Container& ctr)
-{
-    assert (i.first >= ctr.begin() && i.first <= ctr.end() && "unconst algorithm must be given iterators from the argument container");
-    pair<typename Container::iterator, typename Container::iterator> result;
-    result.first = ctr.begin() + (i.first - ctr.begin());
-    result.second = ctr.begin() + (i.second - ctr.begin());
-    return (result);
-}
-
-//----{ vector }--------------------------------------------------------
-
-STD_TEMPLATE_CTR_STREAMABLE (TEMPLATE_TYPE1 (vector,T), TEMPLATE_DECL1 (T))
-
-template <typename T>
-inline size_t alignof (const vector<T>&)
-{
-    typedef typename vector<T>::written_size_type written_size_type;
-    return (alignof (written_size_type()));
-}
-
-//----{ bitset }--------------------------------------------------------
-
-/// Reads bitset \p v from stream \p is.
-template <size_t Size>
-inline istream& operator>> (istream& is, bitset<Size>& v)
-{
-    return (nr_container_read (is, v));
-}
-
-/// Writes bitset \p v into stream \p os.
-template <size_t Size>
-inline ostream& operator<< (ostream& os, const bitset<Size>& v)
-{
-    return (nr_container_write (os, v));
-}
-
-/// Writes bitset \p v into stream \p os.
-template <size_t Size>
-inline ostringstream& operator<< (ostringstream& os, const bitset<Size>& v)
-{
-    return (os << v.to_string());
-}
-
-/// Writes bitset \p v into stream \p os.
-template <size_t Size>
-istringstream& operator>> (istringstream& is, bitset<Size>& v)
-{
-    char c;
-    for (int i = Size; --i >= 0 && (is >> c).good();)
-	v.set (i, c == '1');
-    return (is);
-}
-
-/// Returns the number of bytes necessary to write this object to a stream
-template <size_t Size>
-inline size_t stream_size_of (const bitset<Size>& v)
-{
-    return (v.capacity() / CHAR_BIT);
-}
-
-//----{ tuple }---------------------------------------------------------
-
-STD_TEMPLATE_NR_CTR_STREAMABLE (
-    TEMPLATE_TYPE2 (tuple,N,T),
-    TEMPLATE_FULL_DECL2 (size_t,N,typename,T)
-)
-
-template <size_t N, typename T>
-struct numeric_limits<tuple<N,T> > {
-    typedef numeric_limits<T> value_limits;
-    static inline tuple<N,T> min (void)	{ tuple<N,T> v; fill (v, value_limits::min()); return (v); }
-    static inline tuple<N,T> max (void)	{ tuple<N,T> v; fill (v, value_limits::max()); return (v); }
-    static const bool is_signed = value_limits::is_signed;
-    static const bool is_integer = value_limits::is_integer;
-    static const bool is_integral = value_limits::is_integral;
-};
-
-template <size_t N, typename T>
-inline size_t alignof (const tuple<N,T>&) { return (alignof (T())); }
-
-template <typename T, typename IntT>
-inline ostringstream& chartype_text_write (ostringstream& os, const T& v)
-{
-    if (isprint(v))
-	os << '\'' << v << '\'';
-    else
-	os << (IntT)(v);
-    return (os);
-}
-
-template <>
-inline ostringstream& container_element_text_write (ostringstream& os, const uint8_t& v)
-{ return (chartype_text_write<uint8_t, unsigned int> (os, v)); }
-template <>
-inline ostringstream& container_element_text_write (ostringstream& os, const int8_t& v)
-{ return (chartype_text_write<int8_t, int> (os, v)); }
-
-//----{ matrix }--------------------------------------------------------
-
-/// Writes tuple \p v into stream \p os.
-template <size_t NX, size_t NY, typename T>
-ostringstream& operator<< (ostringstream& os, const matrix<NX,NY,T>& v)
-{
-    os << '(';
-    for (uoff_t row = 0; row < NY; ++ row) {
-	os << '(';
-        for (uoff_t column = 0; column < NX; ++ column) {
-	    os << v[row][column];
-	    if (column < NX - 1)
-		os << ',';
-	}
-	os << ')';
-    }
-    os << ')';
-    return (os);
-}
-
-//----------------------------------------------------------------------
-
-#ifndef DOXYGEN_SHOULD_SKIP_THIS
-#ifndef WITHOUT_LIBSTDCPP
-
-/// \todo Need a better solution to getting the hash value.
-inline hashvalue_t hash_value (const string::const_pointer& v)
-{
-    string::const_pointer first (v), last (v + strlen(v));
-    hashvalue_t h = 0;
-    // This has the bits flowing into each other from both sides of the number
-    for (; first < last; ++ first)
-	h = *first + ((h << 7) | (h >> BitsInType(hashvalue_t) - 7));
-    return (h);
-}
-
-#endif
-#endif
-
-//----------------------------------------------------------------------
-
-} // namespace ustl
-
-// This is here because there really is no other place to put it.
-#if SIZE_OF_BOOL != SIZE_OF_CHAR
-// bool is a big type on some machines (like DEC Alpha), so it's written as a byte.
-ALIGNOF(bool, sizeof(uint8_t))
-#endif
-STD_STREAMABLE(cmemlink)
-STD_STREAMABLE(istream)
-STD_STREAMABLE(ostream)
-STD_STREAMABLE(string)
-STD_STREAMABLE(exception)
-STD_STREAMABLE(CBacktrace)
-TEXT_STREAMABLE(cmemlink)
-TEXT_STREAMABLE(istream)
-TEXT_STREAMABLE(ostream)
-TEXT_STREAMABLE(exception)
-TEXT_STREAMABLE(CBacktrace)
-
-#endif
-
diff --git a/media/libdrm/mobile2/src/util/ustl-1.0/ustack.h b/media/libdrm/mobile2/src/util/ustl-1.0/ustack.h
deleted file mode 100644
index c48e3b3..0000000
--- a/media/libdrm/mobile2/src/util/ustl-1.0/ustack.h
+++ /dev/null
@@ -1,46 +0,0 @@
-// This file is part of the ustl library, an STL implementation.
-//
-// Copyright (C) 2005 by Mike Sharov <msharov@users.sourceforge.net>
-// This file is free software, distributed under the MIT License.
-//
-// ustack.h
-//
-
-#ifndef USTACK_H_5242F5635322B2EC44A9AEE73022C6E9
-#define USTACK_H_5242F5635322B2EC44A9AEE73022C6E9
-
-namespace ustl {
-
-/// \class stack ustack.h ustl.h
-/// \ingroup Sequences
-///
-/// \brief Stack adapter to uSTL containers.
-///
-template <typename Sequence>
-class stack {
-public:
-    typedef typename Sequence::value_type	value_type;
-    typedef typename Sequence::size_type	size_type;
-    typedef typename Sequence::difference_type	difference_type;
-    typedef typename Sequence::reference	reference;
-    typedef typename Sequence::const_reference	const_reference;
-    typedef typename Sequence::pointer		pointer;
-public:
-    inline			stack (void)			: m_Storage () { }
-    explicit inline		stack (const Sequence& s)	: m_Storage (s) { }
-    inline bool			empty (void) const		{ return (m_Storage.empty()); }
-    inline size_type		size (void) const		{ return (m_Storage.size()); }
-    inline reference		top (void)			{ return (m_Storage.back()); }
-    inline const_reference	top (void) const		{ return (m_Storage.back()); }
-    inline void			push (const value_type& v)	{ m_Storage.push_back (v); }
-    inline void			pop (void)			{ m_Storage.pop_back(); }
-    inline bool			operator== (const stack& s)	{ return (m_Storage == s.m_Storage); }
-    inline bool			operator< (const stack& s)	{ return (m_Storage.size() < s.m_Storage.size()); }
-private:
-    Sequence			m_Storage;	///< Where the data actually is.
-};
-
-} // namespace ustl
-
-#endif
-
diff --git a/media/libdrm/mobile2/src/util/ustl-1.0/ustdxept.cpp b/media/libdrm/mobile2/src/util/ustl-1.0/ustdxept.cpp
deleted file mode 100644
index ce731f7..0000000
--- a/media/libdrm/mobile2/src/util/ustl-1.0/ustdxept.cpp
+++ /dev/null
@@ -1,72 +0,0 @@
-// This file is part of the ustl library, an STL implementation.
-//
-// Copyright (C) 2005 by Mike Sharov <msharov@users.sourceforge.net>
-// This file is free software, distributed under the MIT License.
-//
-// ustdxept.cc
-//
-
-#include "ustdxept.h"
-#include "mistream.h"
-#include "mostream.h"
-#include "strmsize.h"
-#include "uiosfunc.h"
-#include "uspecial.h"
-
-namespace ustl {
-
-//----------------------------------------------------------------------
-
-/// \p arg contains a description of the error.
-error_message::error_message (const char* arg) throw()
-: m_Arg ()
-{
-#if PLATFORM_ANDROID
-    m_Arg = arg;
-#else /* !PLATFORM_ANDROID */
-    try { m_Arg = arg; } catch (...) {}
-#endif
-    set_format (xfmt_ErrorMessage);
-}
-
-/// Virtual destructor
-error_message::~error_message (void) throw()
-{
-}
-
-/// Returns a descriptive error message. fmt="%s: %s"
-void error_message::info (string& msgbuf, const char* fmt) const throw()
-{
-    if (!fmt) fmt = "%s: %s";
-#if PLATFORM_ANDROID
-    msgbuf.format (fmt, what(), m_Arg.cdata());
-#else /* !PLATFORM_ANDROID */
-    try { msgbuf.format (fmt, what(), m_Arg.cdata()); } catch (...) {}
-#endif
-}
-
-/// Reads the object from stream \p is.
-void error_message::read (istream& is)
-{
-    exception::read (is);
-    is >> m_Arg >> ios::align();
-}
-
-/// Writes the object to stream \p os.
-void error_message::write (ostream& os) const
-{
-    exception::write (os);
-    os << m_Arg << ios::align();
-}
-
-/// Returns the size of the written object.
-size_t error_message::stream_size (void) const
-{
-    return (exception::stream_size() + Align (stream_size_of (m_Arg)));
-}
-
-//----------------------------------------------------------------------
-
-} // namespace ustl
-
-
diff --git a/media/libdrm/mobile2/src/util/ustl-1.0/ustdxept.h b/media/libdrm/mobile2/src/util/ustl-1.0/ustdxept.h
deleted file mode 100644
index 4f50953..0000000
--- a/media/libdrm/mobile2/src/util/ustl-1.0/ustdxept.h
+++ /dev/null
@@ -1,143 +0,0 @@
-// This file is part of the ustl library, an STL implementation.
-//
-// Copyright (C) 2005 by Mike Sharov <msharov@users.sourceforge.net>
-// This file is free software, distributed under the MIT License.
-//
-// ustdxept.h
-//
-
-#ifndef USTDXEPT_H_46F7AE967738B588038F95E41158D7FF
-#define USTDXEPT_H_46F7AE967738B588038F95E41158D7FF
-
-#include "uexception.h"
-#include "ustring.h"
-
-namespace ustl {
-
-enum { 
-    xfmt_ErrorMessage = 2,
-    xfmt_LogicError = xfmt_ErrorMessage,
-    xfmt_RuntimeError = xfmt_ErrorMessage
-};
-
-/// \class logic_error ustdxept.h ustl.h
-/// \ingroup Exceptions
-///
-/// \brief Logic errors represent problems in the internal logic of the program.
-///
-class error_message : public exception {
-public:
-    explicit		error_message (const char* arg) throw();
-    virtual	       ~error_message (void) throw();
-    inline virtual const char*	what (void) const throw() { return ("error"); }
-    virtual void	info (string& msgbuf, const char* fmt = NULL) const throw();
-    virtual void	read (istream& is);
-    virtual void	write (ostream& os) const;
-    virtual size_t	stream_size (void) const;
-protected:
-    string		m_Arg;
-};
-
-/// \class logic_error ustdxept.h ustl.h
-/// \ingroup Exceptions
-///
-/// \brief Logic errors represent problems in the internal logic of the program.
-///
-class logic_error : public error_message {
-public:
-    inline explicit		logic_error (const char* arg) throw() : error_message (arg) {}
-    inline virtual const char*	what (void) const throw() { return ("logic error"); }
-};
-
-/// \class domain_error ustdxept.h ustl.h
-/// \ingroup Exceptions
-///
-/// \brief Reports domain errors ("domain" is in the mathematical sense)
-///
-class domain_error : public logic_error {
-public:
-    inline explicit		domain_error (const char* arg) throw() : logic_error (arg) {}
-    inline virtual const char*	what (void) const throw() { return ("domain error"); }
-};
-
-/// \class invalid_argument ustdxept.h ustl.h
-/// \ingroup Exceptions
-///
-/// \brief Reports an invalid argument to a function.
-///
-class invalid_argument : public logic_error {
-public:
-    inline explicit		invalid_argument (const char* arg) throw() : logic_error (arg) {}
-    inline virtual const char*	what (void) const throw() { return ("invalid argument"); }
-};
-
-/// \class length_error ustdxept.h ustl.h
-/// \ingroup Exceptions
-///
-/// \brief Reports when an object exceeds its allowed size.
-///
-class length_error : public logic_error {
-public:
-    inline explicit		length_error (const char* arg) throw() : logic_error (arg) {} 
-    inline virtual const char*	what (void) const throw() { return ("length error"); }
-};
-
-/// \class out_of_range ustdxept.h ustl.h
-/// \ingroup Exceptions
-///
-/// \brief Reports arguments with values out of allowed range.
-///
-class out_of_range : public logic_error {
-public:
-    inline explicit		out_of_range (const char* arg) throw() : logic_error (arg) {}
-    inline virtual const char*	what (void) const throw() { return ("out of range"); }
-};
-
-/// \class runtime_error ustdxept.h ustl.h
-/// \ingroup Exceptions
-///
-/// \brief Reports errors that are dependent on the data being processed.
-///
-class runtime_error : public error_message {
-public:
-    inline explicit		runtime_error (const char* arg) throw() : error_message (arg) {}
-    inline virtual const char*	what (void) const throw() { return ("runtime error"); }
-};
-
-/// \class range_error ustdxept.h ustl.h
-/// \ingroup Exceptions
-///
-/// \brief Reports data that does not fall within the permitted range.
-///
-class range_error : public runtime_error {
-public:
-    inline explicit		range_error (const char* arg) throw() : runtime_error (arg) {}
-    inline virtual const char*	what (void) const throw() { return ("range error"); }
-};
-
-/// \class overflow_error ustdxept.h ustl.h
-/// \ingroup Exceptions
-///
-/// \brief Reports arithmetic overflow.
-///
-class overflow_error : public runtime_error {
-public:
-    inline explicit		overflow_error (const char* arg) throw() : runtime_error (arg) {}
-    inline virtual const char*	what (void) const throw() { return ("overflow error"); }
-};
-
-/// \class underflow_error ustdxept.h ustl.h
-/// \ingroup Exceptions
-///
-/// \brief Reports arithmetic underflow.
-///
-class underflow_error : public runtime_error {
-public:
-    inline explicit		underflow_error (const char* arg) throw() : runtime_error (arg) {}
-    inline virtual const char*	what (void) const throw() { return ("underflow error"); }
-};
-
-} // namespace ustl
-
-#endif
-
diff --git a/media/libdrm/mobile2/src/util/ustl-1.0/ustl.tbff b/media/libdrm/mobile2/src/util/ustl-1.0/ustl.tbff
deleted file mode 100644
index b8ad374..0000000
--- a/media/libdrm/mobile2/src/util/ustl-1.0/ustl.tbff
+++ /dev/null
@@ -1,84 +0,0 @@
-<!-- ANSI Standard fixed size types -->
-<type name=int8_t format=signedIntegral size=int8_t/>
-<type name=int16_t format=signedIntegral size=int16_t/>
-<type name=int32_t format=signedIntegral size=int32_t/>
-<type name=int64_t format=signedIntegral size=int64_t/>
-<type name=uint8_t format=integral size=int8_t/>
-<type name=uint16_t format=integral size=int16_t/>
-<type name=uint32_t format=integral size=int32_t/>
-<type name=uint64_t format=integral size=int64_t/>
-<type name=float format=float size=float/>
-<type name=double format=float size=double/>
-
-<!-- Standard types of variable size, these are machine specific -->
-<type name=int_least8_t format=signedIntegral size=int8_t/>
-<type name=int_least16_t format=signedIntegral size=int16_t/>
-<type name=int_least32_t format=signedIntegral size=int32_t/>
-<type name=int_least64_t format=signedIntegral size=int64_t/>
-<type name=uint_least8_t format=integral size=int8_t/>
-<type name=uint_least16_t format=integral size=int16_t/>
-<type name=uint_least32_t format=integral size=int32_t/>
-<type name=uint_least64_t format=integral size=int64_t/>
-<type name=int_fast8_t format=signedIntegral size=int8_t/>
-<type name=int_fast16_t format=signedIntegral size=int16_t/>
-<type name=int_fast32_t format=signedIntegral size=int32_t/>
-<type name=int_fast64_t format=signedIntegral size=int64_t/>
-<type name=uint_fast8_t format=integral size=int8_t/>
-<type name=uint_fast16_t format=integral size=int16_t/>
-<type name=uint_fast32_t format=integral size=int32_t/>
-<type name=uint_fast64_t format=integral size=int64_t/>
-<type name=intptr_t format=integral size=intptr_t/>
-<type name=uintptr_t format=integral size=intptr_t/>
-<type name=intmax_t format=integral size=intmax_t/>
-<type name=uintmax_t format=integral size=intmax_t/>
-
-<!-- Standard C++ variable size types, also machine specific -->
-<type name=wchar_t format=signedIntegral size=wchar_t/>
-<type name=size_t format=integral size=size_t/>
-<type name=char format=signedIntegral size=char/>
-<type name=short format=signedIntegral size=short/>
-<type name=int format=signedIntegral size=int/>
-<type name=long format=signedIntegral size=long/>
-<type name=longlong format=signedIntegral size=longlong/>
-<type name=u_char format=signedIntegral size=char/>
-<type name=u_short format=signedIntegral size=short/>
-<type name=u_int format=signedIntegral size=int/>
-<type name=u_long format=signedIntegral size=long/>
-<type name=u_longlong format=signedIntegral size=longlong/>
-
-<!-- libc types -->
-<type name=time_t format=signedIntegral size=time_t/>
-<type name=off_t format=signedIntegral size=off_t/>
-<type name=ptrdiff_t format=signedIntegral size=ptrdiff_t/>
-<type name=dev_t format=integral size=dev_t/>
-<type name=uid_t format=integral size=uid_t/>
-<type name=gid_t format=integral size=gid_t/>
-<type name=mode_t format=integral size=mode_t/>
-<type name=nlink_t format=integral size=nlink_t/>
-<type name=pid_t format=integral size=pid_t/>
-<type name=fsid_t format=integral size=fsid_t/>
-<type name=clock_t format=integral size=clock_t/>
-<type name=id_t format=integral size=id_t/>
-<type name=key_t format=integral size=key_t/>
-<type name=blksize_t format=integral size=blksize_t/>
-
-<!-- Types within the ustl library -->
-<type name=utf8 format=integral minSize="1" maxSize="8"/>
-<type name=auto format=unstructured id="AUTO"/>
-<namespace name=ustl>
-    <type name=uoff_t extends=size_t/>
-    <type name=cmemlink_ptr_t format=pointer/>
-    <type name=memlink_ptr_t extends=cmemlink_ptr_t/>
-    <type name=memblock_ptr_t extends=memlink_ptr_t/>
-    <type name=cmemlink format=struct>
-	<var name=data_size type=size_t />
-	<var name=data format=unstructured size=data_size />
-    </type>
-    <type name=memlink extends=cmemlink />
-    <type name=memblock extends=cmemlink />
-    <type name=string extends=memblock>
-	<var name=data_size type=utf8 />
-	<var name=data format=array type=utf8 size=data_size />
-    </type>
-</namespace>
-
diff --git a/media/libdrm/mobile2/src/util/ustl-1.0/ustring.cpp b/media/libdrm/mobile2/src/util/ustl-1.0/ustring.cpp
deleted file mode 100644
index db87d34..0000000
--- a/media/libdrm/mobile2/src/util/ustl-1.0/ustring.cpp
+++ /dev/null
@@ -1,425 +0,0 @@
-// This file is part of the ustl library, an STL implementation.
-//
-// Copyright (C) 2005 by Mike Sharov <msharov@users.sourceforge.net>
-// This file is free software, distributed under the MIT License.
-//
-// ustring.cpp
-//
-//	STL basic_string equivalent functionality.
-//
-
-#include "uassert.h"
-#include "ustring.h"
-#include "mistream.h"
-#include "mostream.h"
-#include "ualgo.h"
-#include <stdio.h>	// for vsnprintf (in string::format)
-
-#include "uassert.h"
-
-namespace ustl {
-
-//----------------------------------------------------------------------
-
-const uoff_t string::npos;
-const string::size_type string::size_Terminator;
-const string::value_type string::c_Terminator;
-const char string::empty_string[string::size_Terminator] = "";
-
-typedef utf8in_iterator<string::const_iterator> utf8icstring_iterator;
-typedef utf8in_iterator<string::iterator> utf8istring_iterator;
-typedef utf8out_iterator<string::iterator> utf8ostring_iterator;
-
-//----------------------------------------------------------------------
-
-/// Creates an empty string.
-string::string (void)
-: memblock ()
-{
-    link (empty_string, 0U);
-}
-
-/// Assigns itself the value of string \p s
-string::string (const string& s)
-: memblock()
-{
-    if (s.is_linked())
-	link (s.c_str(), s.size());
-    else
-	assign (s);
-}
-
-/// Links to \p s
-string::string (const_pointer s)
-: memblock ()
-{
-    if (!s)
-	s = empty_string;
-    link (s, strlen(s));
-}
-
-/// Creates a string of length \p n filled with character \p c.
-string::string (size_type n, value_type c)
-: memblock ()
-{
-    resize (n);
-    fill_n (begin(), n, c);
-}
-
-/// Resize the string to \p n characters. New space contents is undefined.
-void string::resize (size_type n)
-{
-    memblock::resize (n);
-    at(n) = c_Terminator;
-}
-
-/// Assigns itself the value of string \p s
-void string::assign (const_pointer s)
-{
-    if (!s)
-	s = empty_string;
-    assign (s, strlen (s));
-}
-
-/// Assigns itself the value of string \p s of length \p len.
-void string::assign (const_pointer s, size_type len)
-{
-    while (len && s[len - 1] == c_Terminator)
-	-- len;
-    resize (len);
-    copy (s, len);
-}
-
-/// Appends to itself the value of string \p s of length \p len.
-void string::append (const_pointer s)
-{
-    if (!s)
-	s = empty_string;
-    append (s, strlen (s));
-}
-
-/// Appends to itself the value of string \p s of length \p len.
-void string::append (const_pointer s, size_type len)
-{
-    while (len && s[len - 1] == c_Terminator)
-	-- len;
-    resize (size() + len);
-    copy_n (s, len, end() - len);
-}
-
-/// Appends to itself \p n characters of value \p c.
-void string::append (size_type n, value_type c)
-{
-    resize (size() + n);
-    fill_n (end() - n, n, c);
-}
-
-/// Copies into itself at offset \p start, the value of string \p p of length \p n.
-string::size_type string::copyto (pointer p, size_type n, const_iterator start) const
-{
-    assert (p && n);
-    if (!start)
-	start = begin();
-    const size_type btc = min(n - size_Terminator, size());
-    copy_n (start, btc, p);
-    p[btc] = c_Terminator;
-    return (btc + size_Terminator);
-}
-
-/// Returns comparison value regarding string \p s.
-/// The return value is:
-/// \li 1 if this string is greater (by value, not length) than string \p s
-/// \li 0 if this string is equal to string \p s
-/// \li -1 if this string is less than string \p s
-///
-/*static*/ int string::compare (const_iterator first1, const_iterator last1, const_iterator first2, const_iterator last2)
-{
-    assert (first1 <= last1 && (first2 <= last2 || !last2) && "Negative ranges result in memory allocation errors.");
-    const size_type len1 = distance (first1, last1), len2 = distance (first2, last2);
-    const int rvbylen = sign (int(len1 - len2));
-    int rv = memcmp (first1, first2, min (len1, len2));
-    return (rv ? rv : rvbylen);
-}
-
-/// Returns true if this string is equal to string \p s.
-bool string::operator== (const_pointer s) const
-{
-    if (!s)
-	s = empty_string;
-    return (size() == strlen(s) && 0 == memcmp (c_str(), s, size()));
-}
-
-/// Returns the beginning of character \p i.
-string::iterator string::utf8_iat (uoff_t i)
-{
-    utf8istring_iterator cfinder (begin());
-    cfinder += i;
-    return (cfinder.base());
-}
-
-/// Inserts wide character \p c at \p ip \p n times as a UTF-8 string.
-///
-/// \p ip is a character position, not a byte position, and must fall in
-/// the 0 through length() range.
-/// The first argument is not an iterator because it is rather difficult
-/// to get one. You'd have to use ((utf8begin() + n).base()) as the first
-/// argument, which is rather ugly. Besides, then this insert would be
-/// ambiguous with the regular character insert.
-///
-void string::insert (const uoff_t ip, wchar_t c, size_type n)
-{
-    iterator ipp (utf8_iat (ip));
-    ipp = iterator (memblock::insert (memblock::iterator(ipp), n * Utf8Bytes(c)));
-    fill_n (utf8out (ipp), n, c);
-    *end() = c_Terminator;
-}
-
-/// Inserts sequence of wide characters at \p ip.
-void string::insert (const uoff_t ip, const wchar_t* first, const wchar_t* last, const size_type n)
-{
-    iterator ipp (utf8_iat (ip));
-    size_type nti = distance (first, last), bti = 0;
-    for (uoff_t i = 0; i < nti; ++ i)
-	bti += Utf8Bytes(first[i]);
-    ipp = iterator (memblock::insert (memblock::iterator(ipp), n * bti));
-    utf8ostring_iterator uout (utf8out (ipp));
-    for (uoff_t j = 0; j < n; ++ j)
-	for (uoff_t k = 0; k < nti; ++ k, ++ uout)
-	    *uout = first[k];
-    *end() = c_Terminator;
-}
-
-/// Inserts character \p c into this string at \p start.
-string::iterator string::insert (iterator start, const_reference c, size_type n)
-{
-    start = iterator (memblock::insert (memblock::iterator(start), n));
-    fill_n (start, n, c);
-    *end() = c_Terminator;
-    return (start);
-}
-
-/// Inserts \p count instances of string \p s at offset \p start.
-string::iterator string::insert (iterator start, const_pointer s, size_type n)
-{
-    if (!s)
-	s = empty_string;
-    return (insert (start, s, s + strlen(s), n));
-}
-
-/// Inserts [first,last] \p n times.
-string::iterator string::insert (iterator start, const_pointer first, const_pointer last, size_type n)
-{
-    assert (first <= last);
-    assert (begin() <= start && end() >= start);
-    assert ((first < begin() || first >= end() || size() + abs_distance(first,last) < capacity()) && "Insertion of self with autoresize is not supported");
-    start = iterator (memblock::insert (memblock::iterator(start), distance(first, last) * n));
-    fill (memblock::iterator(start), first, distance(first, last), n);
-    *end() = c_Terminator;
-    return (start);
-}
-
-/// Erases \p size bytes at \p start.
-string::iterator string::erase (iterator ep, size_type n)
-{
-    string::iterator rv = memblock::erase (memblock::iterator(ep), n);
-    *end() = c_Terminator;
-    return (rv);
-}
-
-/// Erases \p size characters at \p start.
-/// \p start is a character position, not a byte position, and must be
-/// in the 0..length() range.
-///
-void string::erase (uoff_t ep, size_type n)
-{
-    iterator first (utf8_iat(ep));
-    size_t nbytes (utf8_iat(ep + n) - first);
-    memblock::erase (first, nbytes);
-    *end() = c_Terminator;
-}
-
-/// Replaces range [\p start, \p start + \p len] with string \p s.
-void string::replace (iterator first, iterator last, const_pointer s)
-{
-    if (!s)
-	s = empty_string;
-    replace (first, last, s, s + strlen(s));
-}
-
-/// Replaces range [\p start, \p start + \p len] with \p count instances of string \p s.
-void string::replace (iterator first, iterator last, const_pointer i1, const_pointer i2, size_type n)
-{
-    assert (first <= last);
-    assert (n || distance(first, last));
-    assert (first >= begin() && first <= end() && last >= first && last <= end());
-    assert ((i1 < begin() || i1 >= end() || abs_distance(i1,i2) * n + size() < capacity()) && "Replacement by self can not autoresize");
-    const size_type bte = distance(first, last), bti = distance(i1, i2) * n;
-    if (bti < bte)
-	first = iterator (memblock::erase (memblock::iterator(first), bte - bti));
-    else if (bte < bti)
-	first = iterator (memblock::insert (memblock::iterator(first), bti - bte));
-    fill (memblock::iterator(first), i1, distance(i1, i2), n);
-    *end() = c_Terminator;
-}
-
-/// Returns the offset of the first occurence of \p c after \p pos.
-uoff_t string::find (const_reference c, uoff_t pos) const
-{
-    const_iterator found = ::ustl::find (iat(pos), end(), c);
-    return (found < end() ? distance(begin(),found) : npos);
-}
-
-/// Returns the offset of the first occurence of substring \p s of length \p n after \p pos.
-uoff_t string::find (const string& s, uoff_t pos) const
-{
-    if (s.empty() || s.size() > size() - pos)
-	return (npos);
-    const uoff_t endi = s.size() - 1;
-    const_reference endchar = s[endi];
-    uoff_t lastPos = endi;
-    while (lastPos-- && s[lastPos] != endchar);
-    const size_type skip = endi - lastPos;
-    const_iterator i = iat(pos) + endi;
-    for (; i < end() && (i = ::ustl::find (i, end(), endchar)) < end(); i += skip)
-	if (memcmp (i - endi, s.c_str(), s.size()) == 0)
-	    return (distance (begin(), i) - endi);
-    return (npos);
-}
-
-/// Returns the offset of the last occurence of character \p c before \p pos.
-uoff_t string::rfind (const_reference c, uoff_t pos) const
-{
-    for (int i = min(pos,size()-1); i >= 0; --i)
-	if (at(i) == c)
-	    return (i);
-    return (npos);
-}
-
-/// Returns the offset of the last occurence of substring \p s of size \p n before \p pos.
-uoff_t string::rfind (const string& s, uoff_t pos) const
-{
-    const_iterator d = iat(pos) - 1;
-    const_iterator sp = begin() + s.size() - 1;
-    const_iterator m = s.end() - 1;
-    for (uoff_t i = 0; d > sp && i < s.size(); -- d)
-	for (i = 0; i < s.size(); ++ i)
-	    if (m[-i] != d[-i])
-		break;
-    return (d > sp ? distance (begin(), d + 2 - s.size()) : npos);
-}
-
-/// Returns the offset of the first occurence of one of characters in \p s of size \p n after \p pos.
-uoff_t string::find_first_of (const string& s, uoff_t pos) const
-{
-    for (uoff_t i = min(pos,size()); i < size(); ++ i)
-	if (s.find (at(i)) != npos)
-	    return (i);
-    return (npos);
-}
-
-/// Returns the offset of the first occurence of one of characters not in \p s of size \p n after \p pos.
-uoff_t string::find_first_not_of (const string& s, uoff_t pos) const
-{
-    for (uoff_t i = min(pos,size()); i < size(); ++ i)
-	if (s.find (at(i)) == npos)
-	    return (i);
-    return (npos);
-}
-
-/// Returns the offset of the last occurence of one of characters in \p s of size \p n before \p pos.
-uoff_t string::find_last_of (const string& s, uoff_t pos) const
-{
-    for (int i = min(pos,size()-1); i >= 0; -- i)
-	if (s.find (at(i)) != npos)
-	    return (i);
-    return (npos);
-}
-
-/// Returns the offset of the last occurence of one of characters not in \p s of size \p n before \p pos.
-uoff_t string::find_last_not_of (const string& s, uoff_t pos) const
-{
-    for (int i = min(pos,size()-1); i >= 0; -- i)
-	if (s.find (at(i)) == npos)
-	    return (i);
-    return (npos);
-}
-
-/// Equivalent to a vsprintf on the string.
-int string::vformat (const char* fmt, va_list args)
-{
-#if HAVE_VA_COPY
-    va_list args2;
-#else
-    #define args2 args
-    #undef __va_copy
-    #define __va_copy(x,y)
-#endif
-    size_t rv = size();
-    do {
-	reserve (rv);
-	__va_copy (args2, args);
-	rv = vsnprintf (data(), memblock::capacity(), fmt, args2);
-	rv = min (rv, memblock::capacity());
-    } while (rv > capacity());
-    resize (min (rv, capacity()));
-    return (rv);
-}
-
-/// Equivalent to a sprintf on the string.
-int string::format (const char* fmt, ...)
-{
-    va_list args;
-    va_start (args, fmt);
-    const int rv = vformat (fmt, args);
-    va_end (args);
-    return (rv);
-}
-
-/// Returns the number of bytes required to write this object to a stream.
-size_t string::stream_size (void) const
-{
-    return (Utf8Bytes(size()) + size());
-}
-
-/// Reads the object from stream \p os
-void string::read (istream& is)
-{
-    char szbuf [8];
-    is >> szbuf[0];
-    size_t szsz (Utf8SequenceBytes (szbuf[0]) - 1), n = 0;
-    is.verify_remaining ("read", "ustl::string", szsz);
-    is.read (szbuf + 1, szsz);
-    n = *utf8in(szbuf);
-    is.verify_remaining ("read", "ustl::string", n);
-    resize (n);
-    is.read (data(), size());
-}
-
-/// Writes the object to stream \p os
-void string::write (ostream& os) const
-{
-    const written_size_type sz (size());
-    assert (sz == size() && "No support for writing strings larger than 4G");
-
-    char szbuf [8];
-    utf8out_iterator<char*> szout (szbuf);
-    *szout = sz;
-    size_t szsz = distance (szbuf, szout.base());
-
-    os.verify_remaining ("write", "ustl::string", szsz + sz);
-    os.write (szbuf, szsz);
-    os.write (cdata(), sz);
-}
-
-/// Returns a hash value for [first, last)
-/*static*/ hashvalue_t string::hash (const char* first, const char* last)
-{
-    hashvalue_t h = 0;
-    // This has the bits flowing into each other from both sides of the number
-    for (; first < last; ++ first)
-	h = *first + ((h << 7) | (h >> BitsInType(hashvalue_t) - 7));
-    return (h);
-}
-
-} // namespace ustl
-
diff --git a/media/libdrm/mobile2/src/util/ustl-1.0/ustring.h b/media/libdrm/mobile2/src/util/ustl-1.0/ustring.h
deleted file mode 100644
index 9ecf6e7..0000000
--- a/media/libdrm/mobile2/src/util/ustl-1.0/ustring.h
+++ /dev/null
@@ -1,263 +0,0 @@
-// This file is part of the ustl library, an STL implementation.
-//
-// Copyright (C) 2005 by Mike Sharov <msharov@users.sourceforge.net>
-// This file is free software, distributed under the MIT License.
-//
-// ustring.h
-//
-
-#ifndef USTRING_H_1249CB7A098A9010763AAC6D37B133CF
-#define USTRING_H_1249CB7A098A9010763AAC6D37B133CF
-
-#include "memblock.h"
-#include "utf8.h"
-#include <stdarg.h>	// for va_list, va_start, and va_end (in string::format)
-
-namespace ustl {
-
-/// \class string ustring.h ustl.h
-/// \ingroup Sequences
-///
-/// \brief STL basic_string&lt;char&gt; equivalent.
-///
-/// An STL container for text string manipulation.
-/// Differences from C++ standard:
-///	- string is a class, not a template. Wide characters are assumed to be
-///		encoded with utf8 at all times except when rendering or editing,
-///		where you would use a utf8 iterator.
-/// 	- format member function - you can, of course use an \ref ostringstream,
-///		which also have format functions, but most of the time this way
-///		is more convenient. Because uSTL does not implement locales,
-///		format is the only way to create localized strings.
-/// 	- const char* cast operator. It is much clearer to use this than having
-/// 		to type .c_str() every time.
-/// 	- length returns the number of _characters_, not bytes.
-///		This function is O(N), so use wisely.
-///
-class string : public memblock {
-public:
-    typedef char		value_type;
-    typedef value_type*		pointer;
-    typedef const value_type*	const_pointer;
-    typedef wchar_t		wvalue_type;
-    typedef wvalue_type*	wpointer;
-    typedef const wvalue_type*	const_wpointer;
-    typedef pointer		iterator;
-    typedef const_pointer	const_iterator;
-    typedef value_type&		reference;
-    typedef value_type		const_reference;
-    typedef ::ustl::reverse_iterator<iterator>		reverse_iterator;
-    typedef ::ustl::reverse_iterator<const_iterator>	const_reverse_iterator;
-    typedef utf8in_iterator<const_iterator>		utf8_iterator;
-public:
-    static const uoff_t npos = static_cast<uoff_t>(-1);			///< Value that means the end of string.
-    static const value_type c_Terminator = 0;				///< String terminator
-    static const size_type size_Terminator = sizeof(c_Terminator);	///< Most systems terminate strings with '\\0'
-    static const char empty_string [size_Terminator];			///< An empty string.
-public:
-				string (void);
-				string (const string& s);
-    inline			string (const string& s, uoff_t o, size_type n);
-    inline explicit		string (const cmemlink& l);
-				string (const_pointer s);
-    inline			string (const_pointer s, size_type len);
-    inline			string (const_pointer s1, const_pointer s2);
-    explicit			string (size_type n, value_type c = c_Terminator);
-    inline pointer		data (void)		{ return (string::pointer (memblock::data())); }
-    inline const_pointer	c_str (void) const	{ return (string::const_pointer (memblock::cdata())); }
-    inline size_type		max_size (void) const	{ size_type s (memblock::max_size()); return (s - !!s); }
-    inline size_type		capacity (void) const	{ size_type c (memblock::capacity()); return (c - !!c); }
-    void			resize (size_type n);
-    inline void			clear (void)		{ resize (0); }
-    inline const_iterator	begin (void) const	{ return (const_iterator (memblock::begin())); }
-    inline iterator		begin (void)		{ return (iterator (memblock::begin())); }
-    inline const_iterator	end (void) const	{ return (const_iterator (memblock::end())); }
-    inline iterator		end (void)		{ return (iterator (memblock::end())); }
-  inline const_reverse_iterator	rbegin (void) const	{ return (const_reverse_iterator (end())); }
-    inline reverse_iterator	rbegin (void)		{ return (reverse_iterator (end())); }
-  inline const_reverse_iterator	rend (void) const	{ return (const_reverse_iterator (begin())); }
-    inline reverse_iterator	rend (void)		{ return (reverse_iterator (begin())); }
-    inline utf8_iterator	utf8_begin (void) const	{ return (utf8_iterator (begin())); }
-    inline utf8_iterator	utf8_end (void) const	{ return (utf8_iterator (end())); }
-    inline const_reference	at (uoff_t pos) const	{ assert (pos <= size() && begin()); return (begin()[pos]); }
-    inline reference		at (uoff_t pos)		{ assert (pos <= size() && begin()); return (begin()[pos]); }
-    inline const_iterator	iat (uoff_t pos) const	{ return (begin() + min (pos, size())); }
-    inline iterator		iat (uoff_t pos)	{ return (begin() + min (pos, size())); }
-    inline size_type		length (void) const	{ return (distance (utf8_begin(), utf8_end())); }
-    inline void			append (const_iterator i1, const_iterator i2)	{ append (i1, distance (i1, i2)); }
-    void	   		append (const_pointer s, size_type len);
-    void	   		append (const_pointer s);
-    void			append (size_type n, const_reference c);
-    inline void			append (size_type n, wvalue_type c)		{ insert (size(), c, n); }
-    inline void			append (const_wpointer s1, const_wpointer s2)	{ insert (size(), s1, s2); }
-    inline void			append (const_wpointer s)			{ const_wpointer se (s); for (;se&&*se;++se); append (s, se); }
-    inline void			append (const string& s)			{ append (s.begin(), s.end()); }
-    inline void			append (const string& s, uoff_t o, size_type n)	{ append (s.iat(o), s.iat(o+n)); }
-    inline void			assign (const_iterator i1, const_iterator i2)	{ assign (i1, distance (i1, i2)); }
-    void	    		assign (const_pointer s, size_type len);
-    void	    		assign (const_pointer s);
-    inline void			assign (const_wpointer s1, const_wpointer s2)	{ clear(); append (s1, s2); }
-    inline void			assign (const_wpointer s1)			{ clear(); append (s1); }
-    inline void			assign (const string& s)			{ assign (s.begin(), s.end()); }
-    inline void			assign (const string& s, uoff_t o, size_type n)	{ assign (s.iat(o), s.iat(o+n)); }
-    size_type			copyto (pointer p, size_type n, const_iterator start = NULL) const;
-    inline int			compare (const string& s) const	{ return (compare (begin(), end(), s.begin(), s.end())); }
-    inline int			compare (const_pointer s) const	{ return (compare (begin(), end(), s, s + strlen(s))); }
-    static int			compare (const_iterator first1, const_iterator last1, const_iterator first2, const_iterator last2);
-    inline			operator const value_type* (void) const;
-    inline			operator value_type* (void);
-    inline const string&	operator= (const string& s)	{ assign (s.begin(), s.end()); return (*this); }
-    inline const string&	operator= (const_reference c)	{ assign (&c, 1); return (*this); }
-    inline const string&	operator= (const_pointer s)	{ assign (s); return (*this); }
-    inline const string&	operator= (const_wpointer s)	{ assign (s); return (*this); }
-    inline const string&	operator+= (const string& s)	{ append (s.begin(), s.size()); return (*this); }
-    inline const string&	operator+= (const_reference c)	{ append (1, c); return (*this); }
-    inline const string&	operator+= (const_pointer s)	{ append (s); return (*this); }
-    inline const string&	operator+= (wvalue_type c)	{ append (1, c); return (*this); }
-    inline const string&	operator+= (const_wpointer s)	{ append (s); return (*this); }
-    inline string		operator+ (const string& s) const;
-    inline bool			operator== (const string& s) const	{ return (memblock::operator== (s)); }
-    bool			operator== (const_pointer s) const;
-    inline bool			operator== (const_reference c) const	{ return (size() == 1 && c == at(0)); }
-    inline bool			operator!= (const string& s) const	{ return (!operator== (s)); }
-    inline bool			operator!= (const_pointer s) const	{ return (!operator== (s)); }
-    inline bool			operator!= (const_reference c) const	{ return (!operator== (c)); }
-    inline bool			operator< (const string& s) const	{ return (0 > compare (s)); }
-    inline bool			operator< (const_pointer s) const	{ return (0 > compare (s)); }
-    inline bool			operator< (const_reference c) const	{ return (0 > compare (begin(), end(), &c, &c + 1)); }
-    inline bool			operator> (const_pointer s) const	{ return (0 < compare (s)); }
-    void			insert (const uoff_t ip, wvalue_type c, size_type n = 1);
-    void			insert (const uoff_t ip, const_wpointer first, const_wpointer last, const size_type n = 1);
-    iterator			insert (iterator start, const_reference c, size_type n = 1);
-    iterator			insert (iterator start, const_pointer s, size_type n = 1);
-    iterator			insert (iterator start, const_pointer first, const_iterator last, size_type n = 1);
-    inline void			insert (uoff_t ip, const_pointer s, size_type nlen)		{ insert (iat(ip), s, s + nlen); }
-    inline void			insert (uoff_t ip, size_type n, value_type c)			{ insert (iat(ip), c, n); }
-    inline void			insert (uoff_t ip, const string& s, uoff_t sp, size_type slen)	{ insert (iat(ip), s.iat(sp), s.iat(sp + slen)); }
-    iterator			erase (iterator start, size_type size = 1);
-    void			erase (uoff_t start, size_type size = 1);
-    inline iterator		erase (iterator first, const_iterator last)	{ return (erase (first, size_type(distance(first,last)))); }
-				OVERLOAD_POINTER_AND_SIZE_T_V2(erase, iterator)
-    inline void			push_back (const_reference c)	{ append (1, c); }
-    inline void			push_back (wvalue_type c)	{ append (1, c); }
-    inline void			pop_back (void)			{ resize (size() - 1); }
-    void			replace (iterator first, iterator last, const_pointer s);
-    void			replace (iterator first, iterator last, const_pointer i1, const_pointer i2, size_type n = 1);
-    inline void			replace (iterator first, iterator last, const string& s)			{ replace (first, last, s.begin(), s.end()); }
-    inline void			replace (iterator first, iterator last, const_pointer s, size_type slen)	{ replace (first, last, s, s + slen); }
-    inline void			replace (iterator first, iterator last, size_type n, value_type c)		{ replace (first, last, &c, &c + 1, n); }
-    inline void			replace (uoff_t rp, size_type n, const string& s)				{ replace (iat(rp), iat(rp + n), s); }
-    inline void			replace (uoff_t rp, size_type n, const string& s, uoff_t sp, size_type slen)	{ replace (iat(rp), iat(rp + n), s.iat(sp), s.iat(sp + slen)); }
-    inline void			replace (uoff_t rp, size_type n, const_pointer s, size_type slen)		{ replace (iat(rp), iat(rp + n), s, s + slen); }
-    inline void			replace (uoff_t rp, size_type n, const_pointer s)				{ replace (iat(rp), iat(rp + n), string(s)); }
-    inline void			replace (uoff_t rp, size_type n, size_type count, value_type c)			{ replace (iat(rp), iat(rp + n), count, c); }
-    inline string		substr (uoff_t o, size_type n) const	{ return (string (*this, o, n)); }
-    uoff_t			find (const_reference c, uoff_t pos = 0) const;
-    uoff_t			find (const string& s, uoff_t pos = 0) const;
-    uoff_t			rfind (const_reference c, uoff_t pos = npos) const;
-    uoff_t			rfind (const string& s, uoff_t pos = npos) const;
-    uoff_t			find_first_of (const string& s, uoff_t pos = 0) const;
-    uoff_t			find_first_not_of (const string& s, uoff_t pos = 0) const;
-    uoff_t			find_last_of (const string& s, uoff_t pos = npos) const;
-    uoff_t			find_last_not_of (const string& s, uoff_t pos = npos) const;
-    int				vformat (const char* fmt, va_list args);
-    int				format (const char* fmt, ...) __attribute__((__format__(__printf__, 2, 3)));
-    void			read (istream&);
-    void			write (ostream& os) const;
-    size_t			stream_size (void) const;
-    static hashvalue_t		hash (const char* f1, const char* l1);
-private:
-    DLL_LOCAL iterator		utf8_iat (uoff_t i);
-protected:
-    inline virtual size_type	minimumFreeCapacity (void) const { return (size_Terminator); }
-};
-
-//----------------------------------------------------------------------
-
-/// Assigns itself the value of string \p s
-inline string::string (const cmemlink& s)
-: memblock ()
-{
-    assign (const_iterator (s.begin()), s.size());
-}
-
-/// Assigns itself a [o,o+n) substring of \p s.
-inline string::string (const string& s, uoff_t o, size_type n)
-: memblock()
-{
-    assign (s, o, n);
-}
-
-/// Copies the value of \p s of length \p len into itself.
-inline string::string (const_pointer s, size_type len)
-: memblock ()
-{
-    assign (s, len);
-}
-
-/// Copies into itself the string data between \p s1 and \p s2
-inline string::string (const_pointer s1, const_pointer s2)
-: memblock ()
-{
-    assert (s1 <= s2 && "Negative ranges result in memory allocation errors.");
-    assign (s1, s2);
-}
-
-/// Returns the pointer to the first character.
-inline string::operator const string::value_type* (void) const
-{
-    assert ((!end() || *end() == c_Terminator) && "This string is linked to data that is not 0-terminated. This may cause serious security problems. Please assign the data instead of linking.");
-    return (begin());
-}
-
-/// Returns the pointer to the first character.
-inline string::operator string::value_type* (void)
-{
-    assert ((end() && *end() == c_Terminator) && "This string is linked to data that is not 0-terminated. This may cause serious security problems. Please assign the data instead of linking.");
-    return (begin());
-}
-
-/// Concatenates itself with \p s
-inline string string::operator+ (const string& s) const
-{
-    string result (*this);
-    result += s;
-    return (result);
-}
-
-//----------------------------------------------------------------------
-// Operators needed to avoid comparing pointer to pointer
-
-#define PTR_STRING_CMP(op, impl)	\
-inline bool op (const char* s1, const string& s2) { return impl; }
-PTR_STRING_CMP (operator==, (s2 == s1))
-PTR_STRING_CMP (operator!=, (s2 != s1))
-PTR_STRING_CMP (operator<,  (s2 >  s1))
-PTR_STRING_CMP (operator<=, (s2 >= s1))
-PTR_STRING_CMP (operator>,  (s2 <  s1))
-PTR_STRING_CMP (operator>=, (s2 <= s1))
-#undef PTR_STRING_CMP
-
-//----------------------------------------------------------------------
-
-template <typename T>
-inline hashvalue_t hash_value (const T& v)
-{ return (string::hash (v.begin(), v.end())); }
-
-template <>
-inline hashvalue_t hash_value (const string::const_pointer& v)
-{ return (string::hash (v, v + strlen(v))); }
-
-template <>
-inline hashvalue_t hash_value (const string::pointer& v)
-{ return (string::hash (v, v + strlen(v))); }
-
-//----------------------------------------------------------------------
-
-} // namespace ustl
-
-// Specialization for stream alignment
-ALIGNOF (ustl::string, alignof (string::value_type()))
-
-#endif
-
diff --git a/media/libdrm/mobile2/src/util/ustl-1.0/utf8.h b/media/libdrm/mobile2/src/util/ustl-1.0/utf8.h
deleted file mode 100644
index f829e7d..0000000
--- a/media/libdrm/mobile2/src/util/ustl-1.0/utf8.h
+++ /dev/null
@@ -1,200 +0,0 @@
-// This file is part of the ustl library, an STL implementation.
-//
-// Copyright (C) 2005 by Mike Sharov <msharov@users.sourceforge.net>
-// This file is free software, distributed under the MIT License.
-//
-// utf8.h
-//
-// This file contains stream iterators that read and write UTF-8 encoded
-// characters. The encoding is defined as follows:
-//
-// U-00000000 - U-0000007F: 0xxxxxxx
-// U-00000080 - U-000007FF: 110xxxxx 10xxxxxx
-// U-00000800 - U-0000FFFF: 1110xxxx 10xxxxxx 10xxxxxx
-// U-00010000 - U-001FFFFF: 11110xxx 10xxxxxx 10xxxxxx 10xxxxxx
-// U-00200000 - U-03FFFFFF: 111110xx 10xxxxxx 10xxxxxx 10xxxxxx 10xxxxxx
-// U-04000000 - U-7FFFFFFF: 1111110x 10xxxxxx 10xxxxxx 10xxxxxx 10xxxxxx 10xxxxxx
-// U-80000000 - U-FFFFFFFF: 11111110 100000xx 10xxxxxx 10xxxxxx 10xxxxxx 10xxxxxx 10xxxxxx
-//
-// The last range in not in the UTF-8 standard because Unicode forbids
-// characters of those values. However, since ustl::string uses this code
-// to write its length, the support is here. The reason it was put here
-// in the first place, is that extra code would have been necessary to
-// flag that range as invalid.
-//
-#ifndef UTF8_H_3D7AEEEB3A88928D4D280B785F78B6F4
-#define UTF8_H_3D7AEEEB3A88928D4D280B785F78B6F4
-
-#include "uiterator.h"
-
-namespace ustl {
-
-//----------------------------------------------------------------------
-
-typedef uint8_t utf8subchar_t;	///< Type for the encoding subcharacters.
-
-//----------------------------------------------------------------------
-
-/// Returns the number of bytes required to UTF-8 encode \p v.
-inline size_t Utf8Bytes (wchar_t v)
-{
-    static const uint32_t c_Bounds[] = { 0x0000007F, 0x000007FF, 0x0000FFFF, 0x001FFFFF, 0x03FFFFFF, 0x7FFFFFFF, 0xFFFFFFFF, };
-    size_t bi = 0;
-    while (c_Bounds[bi++] < uint32_t(v));
-    return (bi);
-}
-
-/// Returns the number of bytes in a UTF-8 sequence that starts with \p c.
-inline size_t Utf8SequenceBytes (wchar_t c)	// a wchar_t to keep c in a full register
-{
-    // Count the leading bits. Header bits are 1 * nBytes followed by a 0.
-    //	0 - single byte character. Take 7 bits (0xFF >> 1)
-    //	1 - error, in the middle of the character. Take 6 bits (0xFF >> 2)
-    //	    so you will keep reading invalid entries until you hit the next character.
-    //	>2 - multibyte character. Take remaining bits, and get the next bytes.
-    // All errors are ignored, since the user can not correct them.
-    //
-    wchar_t mask = 0x80;
-    size_t nBytes = 0;
-    for (; c & mask; ++nBytes)
-	mask >>= 1;
-    return (nBytes ? nBytes : 1); // A sequence is always at least 1 byte.
-}
-
-//----------------------------------------------------------------------
-
-/// \class utf8in_iterator utf8.h ustl.h
-/// \ingroup IteratorAdaptors
-///
-/// \brief An iterator adaptor to character containers for reading UTF-8 encoded text.
-///
-/// For example, you can copy from ustl::string to ustl::vector<wchar_t> with
-/// copy (utf8in (str.begin()), utf8in (str.end()), back_inserter(wvect));
-/// There is no error handling; if the reading frame slips you'll get extra
-/// characters, one for every misaligned byte. Although it is possible to skip
-/// to the start of the next character, that would result in omitting the
-/// misformatted character and the one after it, making it very difficult to
-/// detect by the user. It is better to write some strange characters and let
-/// the user know his file is corrupted. Another problem is overflow on bad
-/// encodings (like a 0xFF on the end of a string). This is checked through
-/// the end-of-string nul character, which will always be there as long as
-/// you are using the string class.
-///
-template <typename Iterator, typename WChar = wchar_t>
-class utf8in_iterator {
-public:
-    typedef typename iterator_traits<Iterator>::value_type	value_type;
-    typedef typename iterator_traits<Iterator>::difference_type	difference_type;
-    typedef typename iterator_traits<Iterator>::pointer		pointer;
-    typedef typename iterator_traits<Iterator>::reference	reference;
-public:
-    explicit			utf8in_iterator (const Iterator& is)		: m_i (is), m_v (0) { Read(); }
-				utf8in_iterator (const utf8in_iterator& i)	: m_i (i.m_i), m_v (i.m_v) {} 
-    inline const utf8in_iterator& operator= (const utf8in_iterator& i)		{ m_i = i.m_i; m_v = i.m_v; return (*this); }
-    inline Iterator		base (void) const	{ return (m_i - (Utf8Bytes(m_v) - 1)); }
-    /// Reads and returns the next value.
-    inline WChar		operator* (void) const	{ return (m_v); }
-    inline utf8in_iterator&	operator++ (void)	{ ++m_i; Read(); return (*this); }
-    inline utf8in_iterator	operator++ (int)	{ utf8in_iterator old (*this); operator++(); return (old); }
-    inline utf8in_iterator&	operator+= (uoff_t n)	{ while (n--) operator++(); return (*this); }
-    inline utf8in_iterator	operator+ (uoff_t n)	{ utf8in_iterator v (*this); return (v += n); }
-    inline bool			operator== (const utf8in_iterator& i) const	{ return (m_i == i.m_i); }
-    inline bool			operator< (const utf8in_iterator& i) const	{ return (m_i < i.m_i); }
-    difference_type		operator- (const utf8in_iterator& i) const;
-private:
-    void			Read (void);
-private:
-    Iterator			m_i;
-    WChar			m_v;
-};
-
-/// Steps to the next character and updates current returnable value.
-template <typename Iterator, typename WChar>
-void utf8in_iterator<Iterator,WChar>::Read (void)
-{
-    const utf8subchar_t c = *m_i;
-    size_t nBytes = Utf8SequenceBytes (c);
-    m_v = c & (0xFF >> nBytes);	// First byte contains bits after the header.
-    while (--nBytes && *++m_i)	// Each subsequent byte has 6 bits.
-	m_v = (m_v << 6) | (*m_i & 0x3F);
-}
-
-/// Returns the distance in characters (as opposed to the distance in bytes).
-template <typename Iterator, typename WChar>
-typename utf8in_iterator<Iterator,WChar>::difference_type
-utf8in_iterator<Iterator,WChar>::operator- (const utf8in_iterator<Iterator,WChar>& last) const
-{
-    difference_type dist = 0;
-    for (Iterator first (last.m_i); first < m_i; ++dist)
-	first = advance (first, Utf8SequenceBytes (*first));
-    return (dist);
-}
-
-//----------------------------------------------------------------------
-
-/// \class utf8out_iterator utf8.h ustl.h
-/// \ingroup IteratorAdaptors
-///
-/// \brief An iterator adaptor to character containers for writing UTF-8 encoded text.
-///
-template <typename Iterator, typename WChar = wchar_t>
-class utf8out_iterator {
-public:
-    typedef typename iterator_traits<Iterator>::value_type	value_type;
-    typedef typename iterator_traits<Iterator>::difference_type	difference_type;
-    typedef typename iterator_traits<Iterator>::pointer		pointer;
-    typedef typename iterator_traits<Iterator>::reference	reference;
-public:
-    explicit			utf8out_iterator (const Iterator& os) : m_i (os) {}
-				utf8out_iterator (const utf8out_iterator& i) : m_i (i.m_i) {} 
-    inline const Iterator&	base (void) const { return (m_i); }
-    /// Writes \p v into the stream.
-    utf8out_iterator&		operator= (WChar v);
-    inline utf8out_iterator&	operator* (void) { return (*this); }
-    inline utf8out_iterator&	operator++ (void) { return (*this); }
-    inline utf8out_iterator	operator++ (int) { return (*this); }
-    inline bool			operator== (const utf8out_iterator& i) const { return (m_i == i.m_i); }
-    inline bool			operator< (const utf8out_iterator& i) const { return (m_i < i.m_i); }
-private:
-    Iterator			m_i;
-};
-
-/// Writes \p v into the stream.
-template <typename Iterator, typename WChar>
-utf8out_iterator<Iterator,WChar>& utf8out_iterator<Iterator,WChar>::operator= (WChar v)
-{
-    const size_t nBytes = Utf8Bytes (v);
-    if (nBytes > 1) {
-	// Write the bits 6 bits at a time, except for the first one,
-	// which may be less than 6 bits.
-	register wchar_t shift = nBytes * 6;
-	*m_i++ = ((v >> (shift -= 6)) & 0x3F) | (0xFF << (8 - nBytes));
-	while (shift)
-	    *m_i++ = ((v >> (shift -= 6)) & 0x3F) | 0x80;
-    } else	// If only one byte, there is no header.
-    	*m_i++ = v;
-    return (*this);
-}
-
-//----------------------------------------------------------------------
-
-/// Returns a UTF-8 adaptor writing to \p i. Useful in conjuction with back_insert_iterator.
-template <typename Iterator>
-inline utf8out_iterator<Iterator> utf8out (Iterator i)
-{
-    return (utf8out_iterator<Iterator> (i));
-}
-
-/// Returns a UTF-8 adaptor reading from \p i.
-template <typename Iterator>
-inline utf8in_iterator<Iterator> utf8in (Iterator i)
-{
-    return (utf8in_iterator<Iterator> (i));
-}
-
-//----------------------------------------------------------------------
-
-} // namespace ustl
-
-#endif
-
diff --git a/media/libdrm/mobile2/src/util/ustl-1.0/utuple.h b/media/libdrm/mobile2/src/util/ustl-1.0/utuple.h
deleted file mode 100644
index 8a003ab..0000000
--- a/media/libdrm/mobile2/src/util/ustl-1.0/utuple.h
+++ /dev/null
@@ -1,247 +0,0 @@
-// This file is part of the ustl library, an STL implementation.
-//
-// Copyright (C) 2005 by Mike Sharov <msharov@users.sourceforge.net>
-// This file is free software, distributed under the MIT License.
-//
-// utuple.h
-//
-
-#ifndef UTUPLE_H_7324ADEC49B397CA74A56F6050FD5A6B
-#define UTUPLE_H_7324ADEC49B397CA74A56F6050FD5A6B
-
-#include "ualgo.h"
-
-#if PLATFORM_ANDROID
-#undef CPU_HAS_MMX
-#endif
-
-namespace ustl {
-
-/// \class tuple utuple.h ustl.h
-/// \ingroup Sequences
-///
-/// \brief A fixed-size array of \p N \p Ts.
-///
-template <size_t N, typename T>
-class tuple {
-public:
-    typedef T						value_type;
-    typedef size_t					size_type;
-    typedef value_type*					pointer;
-    typedef const value_type*				const_pointer;
-    typedef value_type&					reference;
-    typedef const value_type&				const_reference;
-    typedef pointer					iterator;
-    typedef const_pointer				const_iterator;
-    typedef ::ustl::reverse_iterator<iterator>		reverse_iterator;
-    typedef ::ustl::reverse_iterator<const_iterator>	const_reverse_iterator;
-    typedef pair<iterator,iterator>			range_t;
-    typedef pair<const_iterator,const_iterator>		const_range_t;
-public:
-    template <typename T2>
-    inline			tuple (const tuple<N,T2>& t);
-    inline			tuple (const tuple<N,T>& t);
-    inline			tuple (const_pointer v);
-    inline			tuple (void)			{ for (uoff_t i = 0; i < N; ++ i) m_v[i] = T(); }
-    explicit inline		tuple (const_reference v0, const_reference v1 = T(), const_reference v2 = T(), const_reference v3 = T());
-    inline iterator		begin (void)			{ return (m_v); }
-    inline const_iterator	begin (void) const		{ return (m_v); }
-    inline iterator		end (void)			{ return (begin() + N); }
-    inline const_iterator	end (void) const		{ return (begin() + N); }
-    inline size_type		size (void) const		{ return (N); }
-    inline size_type		max_size (void) const		{ return (N); }
-    inline bool			empty (void) const		{ return (N == 0); }
-    inline const_reference	at (size_type i) const		{ return (m_v[i]); }
-    inline reference		at (size_type i)		{ return (m_v[i]); }
-    inline const_reference	operator[] (size_type i) const	{ return (m_v[i]); }
-    inline reference		operator[] (size_type i)	{ return (m_v[i]); }
-    template <typename T2>
-    inline const tuple&		operator= (const tuple<N,T2>& src);
-    inline const tuple&		operator= (const tuple<N,T>& src);
-    inline const tuple&		operator+= (const_reference v)
-				    { for (uoff_t i = 0; i < N; ++ i) m_v[i] += v; return (*this); }
-    inline const tuple&		operator-= (const_reference v)
-				    { for (uoff_t i = 0; i < N; ++ i) m_v[i] -= v; return (*this); }
-    inline const tuple&		operator*= (const_reference v)
-				    { for (uoff_t i = 0; i < N; ++ i) m_v[i] *= v; return (*this); }
-    inline const tuple&		operator/= (const_reference v)
-				    { for (uoff_t i = 0; i < N; ++ i) m_v[i] /= v; return (*this); }
-    inline const tuple		operator+ (const_reference v) const
-				    { tuple result; for (uoff_t i = 0; i < N; ++ i) result[i] = m_v[i] + v; return (result); }
-    inline const tuple		operator- (const_reference v) const
-				    { tuple result; for (uoff_t i = 0; i < N; ++ i) result[i] = m_v[i] - v; return (result); }
-    inline const tuple		operator* (const_reference v) const
-				    { tuple result; for (uoff_t i = 0; i < N; ++ i) result[i] = m_v[i] * v; return (result); }
-    inline const tuple		operator/ (const_reference v) const
-				    { tuple result; for (uoff_t i = 0; i < N; ++ i) result[i] = m_v[i] / v; return (result); }
-    inline void			swap (tuple<N,T>& v)
-				    { for (uoff_t i = 0; i < N; ++ i) ::ustl::swap (m_v[i], v.m_v[i]); }
-private:
-    T				m_v [N];
-};
-
-} // namespace ustl
-
-#include "simd.h"
-
-namespace ustl {
-
-template <size_t N, typename T>
-template <typename T2>
-inline tuple<N,T>::tuple (const tuple<N,T2>& t)
-{ simd::pconvert (t, *this, simd::fcast<T2,T>()); }
-
-template <size_t N, typename T>
-inline tuple<N,T>::tuple (const tuple<N,T>& t)
-{ simd::passign (t, *this); }
-
-template <size_t N, typename T>
-inline tuple<N,T>::tuple (const_pointer v)
-{ simd::ipassign (v, *this); }
-
-template <size_t N, typename T>
-inline tuple<N,T>::tuple (const_reference v0, const_reference v1, const_reference v2, const_reference v3)
-{
-    m_v[0] = v0;
-    if (N > 1) m_v[1] = v1;
-    if (N > 2) m_v[2] = v2;
-    if (N > 3) m_v[3] = v3;
-    if (N > 4) fill_n (m_v + 4, N - 4, T());
-}
-
-template <size_t N, typename T>
-template <typename T2>
-inline const tuple<N,T>& tuple<N,T>::operator= (const tuple<N,T2>& src)
-{ simd::pconvert (src, *this, simd::fcast<T2,T>()); return (*this); }
-
-template <size_t N, typename T>
-inline const tuple<N,T>& tuple<N,T>::operator= (const tuple<N,T>& src)
-{ simd::passign (src, *this); return (*this); }
-
-template <size_t N, typename T1, typename T2>
-inline bool operator== (const tuple<N,T1>& t1, const tuple<N,T2>& t2)
-{
-    for (uoff_t i = 0; i < N; ++ i)
-	if (t1[i] != t2[i])
-	    return (false);
-    return (true);
-}
-
-template <size_t N, typename T1, typename T2>
-inline bool operator< (const tuple<N,T1>& t1, const tuple<N,T2>& t2)
-{
-    for (uoff_t i = 0; i < N && t1[i] <= t2[i]; ++ i)
-	if (t1[i] < t2[i])
-	    return (true);
-    return (false);
-}
-
-template <size_t N, typename T1, typename T2>
-inline const tuple<N,T1>& operator+= (tuple<N,T1>& t1, const tuple<N,T2>& t2)
-    { for (uoff_t i = 0; i < N; ++ i) t1[i] = T1(t1[i] + t2[i]); return (t1); }
-
-template <size_t N, typename T1, typename T2>
-inline const tuple<N,T1>& operator-= (tuple<N,T1>& t1, const tuple<N,T2>& t2)
-    { for (uoff_t i = 0; i < N; ++ i) t1[i] = T1(t1[i] - t2[i]); return (t1); }
-
-template <size_t N, typename T1, typename T2>
-inline const tuple<N,T1>& operator*= (tuple<N,T1>& t1, const tuple<N,T2>& t2)
-    { for (uoff_t i = 0; i < N; ++ i) t1[i] = T1(t1[i] * t2[i]); return (t1); }
-
-template <size_t N, typename T1, typename T2>
-inline const tuple<N,T1>& operator/= (tuple<N,T1>& t1, const tuple<N,T2>& t2)
-    { for (uoff_t i = 0; i < N; ++ i) t1[i] = T1(t1[i] / t2[i]); return (t1); }
-
-template <size_t N, typename T1, typename T2>
-inline const tuple<N,T1> operator+ (const tuple<N,T1>& t1, const tuple<N,T2>& t2)
-{
-    tuple<N,T1> result;
-    for (uoff_t i = 0; i < N; ++ i) result[i] = T1(t1[i] + t2[i]);
-    return (result);
-}
-
-template <size_t N, typename T1, typename T2>
-inline const tuple<N,T1> operator- (const tuple<N,T1>& t1, const tuple<N,T2>& t2)
-{
-    tuple<N,T1> result;
-    for (uoff_t i = 0; i < N; ++ i) result[i] = T1(t1[i] - t2[i]);
-    return (result);
-}
-
-template <size_t N, typename T1, typename T2>
-inline const tuple<N,T1> operator* (const tuple<N,T1>& t1, const tuple<N,T2>& t2)
-{
-    tuple<N,T1> result;
-    for (uoff_t i = 0; i < N; ++ i) result[i] = T1(t1[i] * t2[i]);
-    return (result);
-}
-
-template <size_t N, typename T1, typename T2>
-inline const tuple<N,T1> operator/ (const tuple<N,T1>& t1, const tuple<N,T2>& t2)
-{
-    tuple<N,T1> result;
-    for (uoff_t i = 0; i < N; ++ i) result[i] = T1(t1[i] / t2[i]);
-    return (result);
-}
-
-#if CPU_HAS_SSE
-#define SSE_TUPLE_SPECS(n,type)		\
-template <> inline tuple<n,type>::tuple (void)	\
-{ asm ("xorps %%xmm0, %%xmm0\n\tmovups %%xmm0, %0"::"m"(m_v[0]):"xmm0","memory"); }	\
-template<> inline void tuple<n,type>::swap (tuple<n,type>& v)	\
-{ asm ("movups %0,%%xmm0\n\tmovups %1,%%xmm1\n\tmovups %%xmm0,%1\n\tmovups %%xmm1,%0"::"m"(m_v[0]),"m"(v.m_v[0]):"xmm0","xmm1","memory"); }
-SSE_TUPLE_SPECS(4,float)
-SSE_TUPLE_SPECS(4,int32_t)
-SSE_TUPLE_SPECS(4,uint32_t)
-#undef SSE_TUPLE_SPECS
-#endif
-#if CPU_HAS_MMX
-#define MMX_TUPLE_SPECS(n,type)		\
-template <> inline tuple<n,type>::tuple (void)	\
-{ asm ("pxor %%mm0, %%mm0\n\tmovq %%mm0, %0"::"m"(m_v[0]):"mm0","memory"); simd::reset_mmx(); }	\
-template<> inline void tuple<n,type>::swap (tuple<n,type>& v)	\
-{ asm ("movq %0,%%mm0\n\tmovq %1,%%mm1\n\tmovq %%mm0,%1\n\tmovq %%mm1,%0"::"m"(m_v[0]),"m"(v.m_v[0]):"mm0","mm1","memory"); simd::reset_mmx(); }
-MMX_TUPLE_SPECS(2,float)
-MMX_TUPLE_SPECS(4,int16_t)
-MMX_TUPLE_SPECS(4,uint16_t)
-MMX_TUPLE_SPECS(2,int32_t)
-MMX_TUPLE_SPECS(2,uint32_t)
-MMX_TUPLE_SPECS(8,int8_t)
-MMX_TUPLE_SPECS(8,uint8_t)
-#undef MMX_TUPLE_SPECS
-#endif
-
-#define SIMD_TUPLE_PACKOP(N,T)	\
-template <> inline const tuple<N,T>& operator+= (tuple<N,T>& t1, const tuple<N,T>& t2)	\
-    { simd::padd (t2, t1); return (t1); }						\
-template <> inline const tuple<N,T>& operator-= (tuple<N,T>& t1, const tuple<N,T>& t2)	\
-    { simd::psub (t2, t1); return (t1); }						\
-template <> inline const tuple<N,T>& operator*= (tuple<N,T>& t1, const tuple<N,T>& t2)	\
-    { simd::pmul (t2, t1); return (t1); }						\
-template <> inline const tuple<N,T>& operator/= (tuple<N,T>& t1, const tuple<N,T>& t2)	\
-    { simd::pdiv (t2, t1); return (t1); }						\
-template <> inline const tuple<N,T> operator+ (const tuple<N,T>& t1, const tuple<N,T>& t2) \
-    { tuple<N,T> result (t1); simd::padd (t2, result); return (result); }		\
-template <> inline const tuple<N,T> operator- (const tuple<N,T>& t1, const tuple<N,T>& t2) \
-    { tuple<N,T> result (t1); simd::psub (t2, result); return (result); }		\
-template <> inline const tuple<N,T> operator* (const tuple<N,T>& t1, const tuple<N,T>& t2) \
-    { tuple<N,T> result (t1); simd::pmul (t2, result); return (result); }		\
-template <> inline const tuple<N,T> operator/ (const tuple<N,T>& t1, const tuple<N,T>& t2) \
-    { tuple<N,T> result (t1); simd::pdiv (t2, result); return (result); }
-SIMD_TUPLE_PACKOP(4,float)
-SIMD_TUPLE_PACKOP(2,float)
-SIMD_TUPLE_PACKOP(2,double)
-SIMD_TUPLE_PACKOP(4,int32_t)
-SIMD_TUPLE_PACKOP(4,uint32_t)
-SIMD_TUPLE_PACKOP(4,int16_t)
-SIMD_TUPLE_PACKOP(4,uint16_t)
-SIMD_TUPLE_PACKOP(2,int32_t)
-SIMD_TUPLE_PACKOP(2,uint32_t)
-SIMD_TUPLE_PACKOP(8,int8_t)
-SIMD_TUPLE_PACKOP(8,uint8_t)
-#undef SIMD_TUPLE_PACKOP
-
-} // namespace ustl
-
-#endif
-
diff --git a/media/libdrm/mobile2/src/util/ustl-1.0/utypes.h b/media/libdrm/mobile2/src/util/ustl-1.0/utypes.h
deleted file mode 100644
index f0b0265..0000000
--- a/media/libdrm/mobile2/src/util/ustl-1.0/utypes.h
+++ /dev/null
@@ -1,69 +0,0 @@
-// This file is part of the ustl library, an STL implementation.
-//
-// Copyright (C) 2005 by Mike Sharov <msharov@users.sourceforge.net>
-// This file is free software, distributed under the MIT License.
-//
-// utypes.h
-//
-// Types used by this library.
-//
-
-#ifndef UTYPES_H_118BBB3B50B7DBF22F5460C52E515C83
-#define UTYPES_H_118BBB3B50B7DBF22F5460C52E515C83
-
-#include "config.h"
-#ifndef STDC_HEADERS
-    #error This library requires standard C and C++ headers to compile.
-#endif
-#ifndef STDUNIX_HEADERS
-    #error This library compiles only on UNIX systems.
-#endif
-#define __STDC_LIMIT_MACROS	// For WCHAR_MIN and WCHAR_MAX in stdint.
-#define __STDC_CONSTANT_MACROS	// For UINT??_C macros to avoid using L and UL suffixes on constants.
-#ifdef HAVE_STDINT_H
-    #include <stdint.h>
-#elif HAVE_INTTYPES_H
-    #include <inttypes.h>
-#else
-    #error Need standard integer types definitions, usually in stdint.h
-#endif
-#include <stddef.h>		// For ptrdiff_t, size_t
-#include <limits.h>
-#include <float.h>
-#ifdef HAVE_SYS_TYPES_H
-    #include <sys/types.h>
-#endif
-#ifndef SIZE_MAX
-    #define SIZE_MAX		UINT_MAX
-#endif
-#if sun || __sun		// Solaris defines UINTPTR_MAX as empty.
-    #undef UINTPTR_MAX
-    #define UINTPTR_MAX		ULONG_MAX
-#endif
-#ifndef WCHAR_MAX
-    #ifdef __WCHAR_MAX__
-	#define WCHAR_MAX	__WCHAR_MAX__
-    #else
-	#define WCHAR_MAX	CHAR_MAX
-    #endif
-#endif
-#ifdef HAVE_LONG_LONG
-    #ifndef LLONG_MAX
-	#define ULLONG_MAX	UINT64_C(0xFFFFFFFFFFFFFFFF)
-	#define LLONG_MAX	INT64_C(0x7FFFFFFFFFFFFFFF)
-	#define LLONG_MIN	ULLONG_MAX
-    #endif
-#endif
-#if !PLATFORM_ANDROID
-#ifndef BYTE_ORDER
-    #define LITTLE_ENDIAN	USTL_LITTLE_ENDIAN
-    #define BIG_ENDIAN		USTL_BIG_ENDIAN
-    #define BYTE_ORDER		USTL_BYTE_ORDER
-#endif
-#endif
-
-typedef size_t		uoff_t;		///< A type for storing offsets into blocks measured by size_t.
-typedef uint32_t	hashvalue_t;	///< Value type returned by the hash functions.
-
-#endif
-
diff --git a/media/libdrm/mobile2/src/util/ustl-1.0/uutility.h b/media/libdrm/mobile2/src/util/ustl-1.0/uutility.h
deleted file mode 100644
index 7b5ae64..0000000
--- a/media/libdrm/mobile2/src/util/ustl-1.0/uutility.h
+++ /dev/null
@@ -1,387 +0,0 @@
-// This file is part of the ustl library, an STL implementation.
-//
-// Copyright (C) 2005 by Mike Sharov <msharov@users.sourceforge.net>
-// This file is free software, distributed under the MIT License.
-//
-/// \file uutility.h
-///
-/// \brief Utility templates.
-///
-/// Everything in here except min(), max(), distance(), and advance()
-/// are uSTL extensions and are absent from other STL implementations.
-///
-
-#ifndef UUTILITY_H_6A58BD296269A82A4AAAA4FD19FDB3AC
-#define UUTILITY_H_6A58BD296269A82A4AAAA4FD19FDB3AC
-
-#include "uassert.h"
-#include "utypes.h"
-
-#if PLATFORM_ANDROID
-#include <stdio.h>
-#undef CPU_HAS_MMX
-#endif
-
-namespace ustl {
-
-#ifdef __GNUC__
-    /// Returns the number of elements in a static vector
-    #define VectorSize(v)	(sizeof(v) / sizeof(*v))
-#else
-    // Old compilers will not be able to evaluate *v on an empty vector.
-    // The tradeoff here is that VectorSize will not be able to measure arrays of local structs.
-    #define VectorSize(v)	(sizeof(v) / ustl::size_of_elements(1, v))
-#endif
-
-/// Expands into a ptr,size expression for the given static vector; useful as link arguments.
-#define VectorBlock(v)	(v)+0, VectorSize(v)	// +0 makes it work under gcc 2.95
-/// Expands into a begin,end expression for the given static vector; useful for algorithm arguments.
-#define VectorRange(v)	VectorBlock(v)+(v)
-
-/// Returns the number of bits in the given type
-#define BitsInType(t)	(sizeof(t) * CHAR_BIT)
-
-/// Returns the mask of type \p t with the lowest \p n bits set.
-#define BitMask(t,n)	(t(~t(0)) >> ((sizeof(t) * CHAR_BIT) - (n)))
-
-/// Argument that is used only in debug builds (as in an assert)
-#ifndef NDEBUG
-    #define DebugArg(x)	x
-#else
-    #define DebugArg(x)
-#endif
-
-/// Shorthand for container iteration.
-#define foreach(type,i,ctr)	for (type i = (ctr).begin(); i != (ctr).end(); ++ i)
-/// Shorthand for container reverse iteration.
-#define eachfor(type,i,ctr)	for (type i = (ctr).rbegin(); i != (ctr).rend(); ++ i)
-
-/// Macro for passing template types as macro arguments.
-/// \@{
-#define TEMPLATE_FULL_DECL1(d1,t1)		template <d1 t1>
-#define TEMPLATE_FULL_DECL2(d1,t1,d2,t2)	template <d1 t1, d2 t2>
-#define TEMPLATE_FULL_DECL3(d1,t1,d2,t2,d3,t3)	template <d1 t1, d2 t2, d3 t3>
-#define TEMPLATE_DECL1(t1)		TEMPLATE_FULL_DECL1(typename,t1)
-#define TEMPLATE_DECL2(t1,t2)		TEMPLATE_FULL_DECL2(typename,t1,typename,t2)
-#define TEMPLATE_DECL3(t1,t2,t3)	TEMPLATE_FULL_DECL3(typename,t1,typename,t2,typename,t3)
-#define TEMPLATE_TYPE1(type,a1)		type<a1>
-#define TEMPLATE_TYPE2(type,a1,a2)	type<a1,a2>
-#define TEMPLATE_TYPE3(type,a1,a2,a3)	type<a1,a2,a3>
-/// \@}
-
-/// Returns the minimum of \p a and \p b
-template <typename T1, typename T2>
-inline const T1 min (const T1& a, const T2& b)
-{
-    return (a < b ? a : b);
-}
-
-/// Returns the maximum of \p a and \p b
-template <typename T1, typename T2>
-inline const T1 max (const T1& a, const T2& b)
-{
-    return (b < a ? a : b);
-}
-
-/// \brief Divides \p n1 by \p n2 and rounds the result up.
-/// This is in contrast to regular division, which rounds down.
-/// Negative numbers are rounded down because they are an unusual case, supporting
-/// which would require a branch. Since this is frequently used in graphics, the
-/// speed is important.
-///
-template <typename T1, typename T2>
-inline T1 DivRU (T1 n1, T2 n2)
-{
-    return (n1 / n2 + (n1 % n2 > 0));
-}
-
-/// The alignment performed by default.
-const size_t c_DefaultAlignment = __alignof__(void*);
-
-/// \brief Rounds \p n up to be divisible by \p grain
-template <typename T>
-inline T Align (T n, size_t grain = c_DefaultAlignment)
-{
-    T a, r = n % grain;
-    if (grain == 2) return (n + r);
-    switch (grain) {
-	case 4: case 8: case 16: a = (n & ~(grain - 1)) + grain; break;
-	default:		 a = n + (grain - r);
-    };
-    return (r ? a : n);
-}
-
-/// Offsets an iterator
-template <typename T>
-inline T advance (T i, ssize_t offset)
-{
-    return (i + offset);
-}
-
-#ifndef DOXYGEN_SHOULD_SKIP_THIS
-/// Offsets a void pointer
-template <>
-inline const void* advance (const void* p, ssize_t offset)
-{
-    assert (p || !offset);
-    return (reinterpret_cast<const uint8_t*>(p) + offset);
-}
-
-/// Offsets a void pointer
-template <>
-inline void* advance (void* p, ssize_t offset)
-{
-    assert (p || !offset);
-    return (reinterpret_cast<uint8_t*>(p) + offset);
-}
-#endif
-
-/// Returns the difference \p p1 - \p p2
-template <typename T1, typename T2>
-inline ptrdiff_t distance (T1 i1, T2 i2)
-{
-    return (i2 - i1);
-}
-
-#ifndef DOXYGEN_SHOULD_SKIP_THIS
-#define UNVOID_DISTANCE(T1const,T2const)				   \
-template <> inline ptrdiff_t distance (T1const void* p1, T2const void* p2) \
-{ return ((T2const uint8_t*)(p2) - (T1const uint8_t*)(p1)); }
-UNVOID_DISTANCE(,)
-UNVOID_DISTANCE(const,const)
-UNVOID_DISTANCE(,const)
-UNVOID_DISTANCE(const,)
-#undef UNVOID_DISTANCE
-#endif
-
-/// \brief Returns the absolute value of \p v
-/// Unlike the stdlib functions, this is inline and works with all types.
-template <typename T>
-inline T absv (T v)
-{
-    return (v < 0 ? -v : v);
-}
-
-/// \brief Returns -1 for negative values, 1 for positive, and 0 for 0
-template <typename T>
-inline T sign (T v)
-{
-    return ((0 < v) - (v < 0));
-}
-
-/// Returns the absolute value of the distance i1 and i2
-template <typename T1, typename T2>
-inline size_t abs_distance (T1 i1, T2 i2)
-{
-    return (absv (distance(i1, i2)));
-}
-
-/// Returns the size of \p n elements of size \p T
-template <typename T>
-inline size_t size_of_elements (size_t n, const T*)
-{
-    return (n * sizeof(T));
-}
-
-// Defined in byteswap.h, which is usually unusable.
-#undef bswap_16
-#undef bswap_32
-#undef bswap_64
-
-#if CPU_HAS_CMPXCHG8	// If it has that, it has bswap.
-inline uint16_t bswap_16 (uint16_t v)	{ asm ("rorw $8, %w0" : "=r"(v) : "0"(v) : "cc"); return (v); }
-inline uint32_t bswap_32 (uint32_t v)	{ asm ("bswap %0" : "=r"(v) : "0"(v)); return (v); }
-#else
-inline uint16_t bswap_16 (uint16_t v)	{ return (v << 8 | v >> 8); }
-inline uint32_t bswap_32 (uint32_t v)	{ return (v << 24 | (v & 0xFF00) << 8 | (v >> 8) & 0xFF00 | v >> 24); }
-#endif
-#if HAVE_INT64_T
-inline uint64_t bswap_64 (uint64_t v)	{ return ((uint64_t(bswap_32(v)) << 32) | bswap_32(v >> 32)); }
-#endif
-
-/// \brief Swaps the byteorder of \p v.
-template <typename T>
-inline T bswap (const T& v)
-{
-    switch (BitsInType(T)) {
-	default:	return (v);
-	case 16:	return (T (bswap_16 (uint16_t (v))));
-	case 32:	return (T (bswap_32 (uint32_t (v))));
-#if HAVE_INT64_T
-	case 64:	return (T (bswap_64 (uint64_t (v))));
-#endif
-    };
-}
-
-#if USTL_BYTE_ORDER == USTL_BIG_ENDIAN
-template <typename T> inline T le_to_native (const T& v) { return (bswap (v)); }
-template <typename T> inline T be_to_native (const T& v) { return (v); }
-template <typename T> inline T native_to_le (const T& v) { return (bswap (v)); }
-template <typename T> inline T native_to_be (const T& v) { return (v); }
-#elif USTL_BYTE_ORDER == USTL_LITTLE_ENDIAN
-template <typename T> inline T le_to_native (const T& v) { return (v); }
-template <typename T> inline T be_to_native (const T& v) { return (bswap (v)); }
-template <typename T> inline T native_to_le (const T& v) { return (v); }
-template <typename T> inline T native_to_be (const T& v) { return (bswap (v)); }
-#endif // USTL_BYTE_ORDER
-
-/// Deletes \p p and sets it to NULL
-template <typename T>
-inline void Delete (T*& p)
-{
-    delete p;
-    p = NULL;
-}
-
-/// Deletes \p p as an array and sets it to NULL
-template <typename T>
-inline void DeleteVector (T*& p)
-{
-    delete [] p;
-    p = NULL;
-}
-
-/// Template of making != from ! and ==
-template <typename T>
-inline bool operator!= (const T& x, const T& y)
-{
-    return (!(x == y));
-}
-
-/// Template of making > from <
-template <typename T>
-inline bool operator> (const T& x, const T& y)
-{
-    return (y < x);
-}
-
-/// Template of making <= from < and ==
-template <typename T>
-inline bool operator<= (const T& x, const T& y)
-{
-    return (!(y < x));
-}
-
-/// Template of making >= from < and ==
-template <typename T>
-inline bool operator>= (const T& x, const T& y)
-{
-    return (!(x < y));
-}
-
-/// Packs \p s multiple times into \p b. Useful for loop unrolling.
-template <typename TSmall, typename TBig>
-inline void pack_type (TSmall s, TBig& b)
-{
-    const size_t n = sizeof(TBig) / sizeof(TSmall);
-    b = s;
-    // Calls to min are here to avoid warnings for shifts bigger than the type. min will be gone when optimized.
-    if (n < 2) return;
-    b = (b << min (BitsInType(TSmall), BitsInType(TBig))) | b;
-    if (n < 4) return;
-    b = (b << min (BitsInType(TSmall) * 2, BitsInType(TBig))) | b;
-    if (n < 8) return;
-    b = (b << min (BitsInType(TSmall) * 4, BitsInType(TBig))) | b;
-}
-
-#if __GNUC__ >= 3
-inline bool TestAndSet (int* pm) __attribute__((always_inline));
-#endif
-/// Sets the contents of \p pm to 1 and returns true if the previous value was 0.
-inline bool TestAndSet (int* pm)
-{
-#if CPU_HAS_CMPXCHG8
-    bool rv;
-    int oldVal (1);
-    asm volatile ( // cmpxchg compares to %eax and swaps if equal
-	"cmpxchgl %3, %1\n\t"
-	"sete %0"
-	: "=a" (rv), "=m" (*pm), "=r" (oldVal)
-	: "2" (oldVal), "a" (0)
-	: "memory");
-    return (rv);
-#elif __i386__ || __x86_64__
-    int oldVal (1);
-    asm volatile ("xchgl %0, %1" : "=r"(oldVal), "=m"(*pm) : "0"(oldVal), "m"(*pm) : "memory");
-    return (!oldVal);
-#elif __sparc32__	// This has not been tested
-    int rv;
-    asm volatile ("ldstub %1, %0" : "=r"(rv), "=m"(*pm) : "m"(pm));
-    return (!rv);
-#else
-    const int oldVal (*pm);
-    *pm = 1;
-    return (!oldVal);
-#endif
-}
-
-/// \brief This template is to be used for dereferencing a type-punned pointer without a warning.
-///
-/// When casting a local variable to an unrelated type through a pointer (for
-/// example, casting a float to a uint32_t without conversion), the resulting
-/// memory location can be accessed through either pointer, which violates the
-/// strict aliasing rule. While -fno-strict-aliasing option can be given to
-/// the compiler, eliminating this warning, inefficient code may result in
-/// some instances, because aliasing inhibits some optimizations. By using
-/// this template, and by ensuring the memory is accessed in one way only,
-/// efficient code can be produced without the warning. For gcc 4.1.0+.
-///
-template <typename DEST, typename SRC>
-inline DEST noalias (DEST, SRC* s)
-{
-    union UPun { SRC s; DEST d; };
-    return (((UPun*)(s))->d);
-}
-
-namespace simd {
-    /// Call after you are done using SIMD algorithms for 64 bit tuples.
-#if CPU_HAS_MMX
-    inline void reset_mmx (void) __attribute__((always_inline));
-    #define ALL_MMX_REGS_CHANGELIST "mm0","mm1","mm2","mm3","mm4","mm5","mm6","mm7","st","st(1)","st(2)","st(3)","st(4)","st(5)","st(6)","st(7)"
-    #if CPU_HAS_3DNOW
-	inline void reset_mmx (void) { asm ("femms":::ALL_MMX_REGS_CHANGELIST); }
-    #else
-	inline void reset_mmx (void) { asm ("emms":::ALL_MMX_REGS_CHANGELIST); }
-    #endif
-#else
-    inline void reset_mmx (void) {}
-#endif
-} // namespace simd
-
-/// \brief Type that is not size_t
-///
-/// Because size_t may be declared as unsigned long or unsigned int on
-/// different machines, this macro is convenient when defining overloads
-/// of size_t to use other types.
-///
-#if defined(SIZE_T_IS_LONG) && !defined(__ARM_EABI__)
-     #define NOT_SIZE_T_I_OR_L	unsigned int
-#else
-    #define NOT_SIZE_T_I_OR_L	unsigned long
-#endif
-
-/// \brief Required when you want to overload size_t and a pointer.
-///
-/// The compiler will happily cast a number to a pointer and declare
-/// that the overload is ambiguous unless you define overloads for all
-/// possible integral types that a number may represent. This behaviour,
-/// although braindead, is in the ANSI standard, and thus not a bug. If
-/// you want to change the standard, the best solution is to disallow any
-/// implicit casts to pointer from an integral type. Ironically, such an
-/// implicit cast is already detected by gcc.
-///
-#if defined(USTL_ANDROID_X86)
-#define OVERLOAD_POINTER_AND_SIZE_T_V2(name, arg1type)
-#else
-#define OVERLOAD_POINTER_AND_SIZE_T_V2(name, arg1type)						\
-    inline void	name (arg1type a1, short a2)			{ name (a1, size_t(a2)); }	\
-    inline void	name (arg1type a1, unsigned short a2)		{ name (a1, size_t(a2)); }	\
-    inline void	name (arg1type a1, int a2)			{ name (a1, size_t(a2)); }	\
-    inline void	name (arg1type a1, long a2)			{ name (a1, size_t(a2)); }	\
-    inline void	name (arg1type a1, NOT_SIZE_T_I_OR_L a2)	{ name (a1, size_t(a2)); }
-#endif
-} // namespace ustl
-
-
-#endif
-
diff --git a/media/libdrm/mobile2/src/util/ustl-1.0/uvector.h b/media/libdrm/mobile2/src/util/ustl-1.0/uvector.h
deleted file mode 100644
index ccbc45b..0000000
--- a/media/libdrm/mobile2/src/util/ustl-1.0/uvector.h
+++ /dev/null
@@ -1,277 +0,0 @@
-// This file is part of the ustl library, an STL implementation.
-//
-// Copyright (C) 2005 by Mike Sharov <msharov@users.sourceforge.net>
-// This file is free software, distributed under the MIT License.
-//
-// uvector.h
-//
-
-#ifndef UVECTOR_H_00BB13AF082BEB7829C031B265518169
-#define UVECTOR_H_00BB13AF082BEB7829C031B265518169
-
-#include "uassert.h"
-#include "memblock.h"
-#include "umemory.h"
-
-namespace ustl {
-
-/// \class vector uvector.h ustl.h
-/// \ingroup Sequences
-///
-/// \brief STL vector equivalent.
-///
-/// Provides a typed array-like interface to a managed memory block, including
-/// element access, iteration, modification, resizing, and serialization. In
-/// this design elements frequently undergo bitwise move, so don't put it in
-/// here if it doesn't support it. This mostly means having no self-pointers.
-///
-template <typename T>
-class vector {
-public:
-    typedef T				value_type;
-    typedef value_type*			pointer;
-    typedef const value_type*		const_pointer;
-    typedef value_type&			reference;
-    typedef const value_type&		const_reference;
-    typedef pointer			iterator;
-    typedef const_pointer		const_iterator;
-    typedef memblock::size_type		size_type;
-    typedef memblock::written_size_type	written_size_type;
-    typedef memblock::difference_type	difference_type;
-    typedef ::ustl::reverse_iterator<iterator>	reverse_iterator;
-    typedef ::ustl::reverse_iterator<const_iterator>	const_reverse_iterator;
-public:
-    inline			vector (void);
-    inline explicit		vector (size_type n);
-				vector (size_type n, const T& v);
-				vector (const vector<T>& v);
-				vector (const_iterator i1, const_iterator i2);
-			       ~vector (void) throw();
-    inline const vector<T>&	operator= (const vector<T>& v);
-    inline bool			operator== (const vector<T>& v)	{ return (m_Data == v.m_Data); }
-    inline			operator cmemlink (void) const	{ return (cmemlink (m_Data)); }
-    inline			operator cmemlink (void)	{ return (cmemlink (m_Data)); }
-    inline			operator memlink (void)		{ return (memlink (m_Data)); }
-    inline void			reserve (size_type n, bool bExact = true);
-    inline void			resize (size_type n, bool bExact = true);
-    inline size_type		capacity (void) const		{ return (m_Data.capacity() / sizeof(T));	}
-    inline size_type		size (void) const		{ return (m_Data.size() / sizeof(T));		}
-    inline size_type		max_size (void) const		{ return (m_Data.max_size() / sizeof(T));	}
-    inline bool			empty (void) const		{ return (m_Data.empty());			}
-    inline iterator		begin (void)			{ return (iterator (m_Data.begin()));		}
-    inline const_iterator	begin (void) const		{ return (const_iterator (m_Data.begin()));	}
-    inline iterator		end (void)			{ return (iterator (m_Data.end()));		}
-    inline const_iterator	end (void) const		{ return (const_iterator (m_Data.end()));	}
-    inline reverse_iterator		rbegin (void)		{ return (reverse_iterator (end()));		}
-    inline const_reverse_iterator	rbegin (void) const	{ return (const_reverse_iterator (end()));	}
-    inline reverse_iterator		rend (void)		{ return (reverse_iterator (begin()));		}
-    inline const_reverse_iterator	rend (void) const	{ return (const_reverse_iterator (begin()));	}
-    inline iterator		iat (size_type i)		{ assert (i <= size()); return (begin() + i); }
-    inline const_iterator	iat (size_type i) const		{ assert (i <= size()); return (begin() + i); }
-    inline reference		at (size_type i)		{ assert (i < size()); return (begin()[i]); }
-    inline const_reference	at (size_type i) const		{ assert (i < size()); return (begin()[i]); }
-    inline reference		operator[] (size_type i)	{ return (at (i)); }
-    inline const_reference	operator[] (size_type i) const	{ return (at (i)); }
-    inline reference		front (void)			{ return (at(0)); }
-    inline const_reference	front (void) const		{ return (at(0)); }
-    inline reference		back (void)			{ assert (!empty()); return (end()[-1]); }
-    inline const_reference	back (void) const		{ assert (!empty()); return (end()[-1]); }
-    inline void			push_back (const T& v = T());
-    inline void			pop_back (void)			{ m_Data.memlink::resize (m_Data.size() - sizeof(T)); }
-    inline void			clear (void)			{ m_Data.clear(); }
-    void			deallocate (void) throw();
-    inline void			assign (const_iterator i1, const_iterator i2);
-    inline void			assign (size_type n, const T& v);
-    inline void			swap (vector<T>& v)		{ m_Data.swap (v.m_Data); }
-    inline iterator		insert (iterator ip, const T& v = T());
-    inline iterator		insert (iterator ip, size_type n, const T& v);
-    inline iterator		insert (iterator ip, const_iterator i1, const_iterator i2);
-    inline iterator		erase (iterator ep, size_type n = 1);
-    inline iterator		erase (iterator ep1, iterator ep2);
-    inline void			manage (pointer p, size_type n)		{ m_Data.manage (p, n * sizeof(T)); }
-    inline bool			is_linked (void) const			{ return (m_Data.is_linked()); }
-    inline void			unlink (void)				{ m_Data.unlink(); }
-    inline void			copy_link (void)			{ m_Data.copy_link(); }
-    inline void			link (const_pointer p, size_type n)	{ m_Data.link (p, n * sizeof(T)); }
-    inline void			link (pointer p, size_type n)		{ m_Data.link (p, n * sizeof(T)); }
-    inline void			link (const vector<T>& v)		{ m_Data.link (v); }
-    inline void			link (vector<T>& v)			{ m_Data.link (v); }
-    inline void			link (const_pointer first, const_pointer last)	{ m_Data.link (first, last); }
-    inline void			link (pointer first, pointer last)		{ m_Data.link (first, last); }
-				OVERLOAD_POINTER_AND_SIZE_T_V2(link, pointer)
-				OVERLOAD_POINTER_AND_SIZE_T_V2(link, const_pointer)
-private:
-    inline iterator		insert_space (iterator ip, size_type n);
-private:
-    memblock			m_Data;	///< Raw element data, consecutively stored.
-};
-
-/// Allocates space for at least \p n elements.
-template <typename T>
-void vector<T>::reserve (size_type n, bool bExact)
-{
-    const size_type oldCapacity = capacity();
-    m_Data.reserve (n * sizeof(T), bExact);
-    if (capacity() > oldCapacity)
-	construct (begin() + oldCapacity, begin() + capacity());
-}
-
-/// Resizes the vector to contain \p n elements.
-template <typename T>
-void vector<T>::resize (size_type n, bool bExact)
-{
-    if (m_Data.capacity() < n * sizeof(T))
-	reserve (n, bExact);
-    m_Data.memlink::resize (n * sizeof(T));
-}
-
-/// Calls element destructors and frees storage.
-template <typename T>
-void vector<T>::deallocate (void) throw()
-{
-    if (!is_linked())
-	destroy (begin(), begin() + capacity());
-    m_Data.deallocate();
-}
-
-/// Initializes empty vector.
-template <typename T>
-inline vector<T>::vector (void)
-: m_Data ()
-{
-}
-
-/// Initializes a vector of size \p n.
-template <typename T>
-inline vector<T>::vector (size_type n)
-: m_Data ()
-{
-    resize (n);
-}
-
-/// Copies \p n elements from \p v.
-template <typename T>
-vector<T>::vector (size_type n, const T& v)
-: m_Data ()
-{
-    resize (n);
-    ::ustl::fill (begin(), end(), v);
-}
-
-/// Copies \p v.
-template <typename T>
-vector<T>::vector (const vector<T>& v)
-: m_Data ()
-{
-    resize (v.size());
-    ::ustl::copy (v.begin(), v.end(), begin());
-}
-
-/// Copies range [\p i1, \p i2]
-template <typename T>
-vector<T>::vector (const_iterator i1, const_iterator i2)
-: m_Data ()
-{
-    resize (distance (i1, i2));
-    ::ustl::copy (i1, i2, begin());
-}
-
-/// Destructor
-template <typename T>
-inline vector<T>::~vector (void) throw()
-{
-    if (!numeric_limits<value_type>::is_integral)
-	deallocate();
-}
-
-/// Copies the range [\p i1, \p i2]
-template <typename T>
-inline void vector<T>::assign (const_iterator i1, const_iterator i2)
-{
-    assert (i1 <= i2);
-    resize (distance (i1, i2));
-    ::ustl::copy (i1, i2, begin());
-}
-
-/// Copies \p n elements with value \p v.
-template <typename T>
-inline void vector<T>::assign (size_type n, const T& v)
-{
-    resize (n);
-    ::ustl::fill (begin(), end(), v);
-}
-
-/// Copies contents of \p v.
-template <typename T>
-inline const vector<T>& vector<T>::operator= (const vector<T>& v)
-{
-    assign (v.begin(), v.end());
-    return (*this);
-}
-
-/// Inserts \p n uninitialized elements at \p ip.
-template <typename T>
-typename vector<T>::iterator vector<T>::insert_space (iterator ip, size_type n)
-{
-    const uoff_t ipmi = distance (m_Data.begin(), memblock::iterator(ip));
-    reserve (size() + n, false);
-    return (iterator (m_Data.insert (m_Data.iat(ipmi), n * sizeof(T))));
-}
-
-/// Inserts \p n elements with value \p v at offsets \p ip.
-template <typename T>
-typename vector<T>::iterator vector<T>::insert (iterator ip, size_type n, const T& v)
-{
-    ip = insert_space (ip, n);
-    ::ustl::fill (ip, ip + n, v);
-    return (ip);
-}
-
-/// Inserts value \p v at offset \p ip.
-template <typename T>
-typename vector<T>::iterator vector<T>::insert (iterator ip, const T& v)
-{
-    *(ip = insert_space (ip, 1)) = v;
-    return (ip);
-}
-
-/// Inserts range [\p i1, \p i2] at offset \p ip.
-template <typename T>
-typename vector<T>::iterator vector<T>::insert (iterator ip, const_iterator i1, const_iterator i2)
-{
-    assert (i1 <= i2);
-    ip = insert_space (ip, distance (i1, i2));
-    ::ustl::copy (i1, i2, ip);
-    return (ip);
-}
-
-/// Removes \p count elements at offset \p ep.
-template <typename T>
-inline typename vector<T>::iterator vector<T>::erase (iterator ep, size_type n)
-{
-    return (iterator (m_Data.erase (memblock::iterator(ep), n * sizeof(T))));
-}
-
-/// Removes elements from \p ep1 to \p ep2.
-template <typename T>
-inline typename vector<T>::iterator vector<T>::erase (iterator ep1, iterator ep2)
-{
-    assert (ep1 <= ep2);
-    return (erase (ep1, distance(ep1, ep2)));
-}
-
-/// Inserts value \p v at the end of the vector.
-template <typename T>
-void vector<T>::push_back (const T& v)
-{
-    resize (size() + 1, false);
-    back() = v;
-}
-
-/// Use with vector classes to allocate and link to stack space. \p n is in elements.
-#define typed_alloca_link(m,T,n)	(m).link ((T*) alloca ((n) * sizeof(T)), (n))
-
-} // namespace ustl
-
-#endif
-
diff --git a/media/libdrm/mobile2/src/util/xml/DomExpatAgent.cpp b/media/libdrm/mobile2/src/util/xml/DomExpatAgent.cpp
deleted file mode 100644
index 4cde706..0000000
--- a/media/libdrm/mobile2/src/util/xml/DomExpatAgent.cpp
+++ /dev/null
@@ -1,228 +0,0 @@
-/*
- * Copyright (C) 2007 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */

-#include <util/xml/DomExpatAgent.h>
-#include <util/xml/XMLElementImpl.h>
-#include <ustring.h>
-#include <uios.h>
-using namespace ustl;
-
-/** see DomExpatAgent.h */
-DomExpatAgent::DomExpatAgent(XMLDocumentImpl* xmlDocPtr)
-{
-    mXMLDocumentPtr = xmlDocPtr;
-    mTopElementPtr = NULL;
-}
-
-/** see DomExpatAgent.h */
-DomExpatAgent::~DomExpatAgent()
-{
-
-}
-
-/** see DomExpatAgent.h */
-bool DomExpatAgent::generateDocumentFromXML(istringstream *xmlStream)
-{
-    char ch;
-    string content;
-
-    if (NULL == mXMLDocumentPtr || NULL == xmlStream)
-    {
-        return false;
-    }
-
-    while ((ch = xmlStream->get()) != '\0')
-    {
-        content += ch;
-    }
-
-    if (ExpatWrapper::decode(content.c_str(), content.length(), 1) == 0)
-
-    {
-        return false;
-    }
-    return true;
-}
-
-/** see DomExpatAgent.h */
-void DomExpatAgent::pushTag(const DOMString *name, const XML_Char **atts)
-{
-    ElementImpl *elementNode = mXMLDocumentPtr->createElement(name);
-
-    if (NULL == elementNode)
-    {
-        return;
-    }
-
-    if (NULL != atts)
-    {
-        while (NULL != *atts)
-        {
-            //set attributes into element node.
-            DOMString key(atts[0]), value(atts[1]);
-            elementNode->setAttribute(&key, &value);
-            atts += 2;
-        }
-    }
-
-   if (!mStack.empty())
-   {
-       mTopElementPtr->appendChild(elementNode);
-   }
-   else
-   {
-       mXMLDocumentPtr->setFirstChild(elementNode);
-   }
-
-   mTopElementPtr = (XMLElementImpl *)elementNode;
-   mStack.push_back(elementNode);
-}
-
-/** see DomExpatAgent.h */
-void DomExpatAgent::popTag(const DOMString *name)
-{
-    if (NULL == name)
-    {
-        return;
-    }
-
-    if (mTopElementPtr != NULL)
-    {
-        if (!name->compare(mTopElementPtr->getTagName()->c_str()))
-        {
-            mStack.pop_back();
-            if (!mStack.empty())
-            {
-                mTopElementPtr =(XMLElementImpl *) mStack.back();
-            }
-            else
-            {
-                mTopElementPtr = NULL;
-            }
-        }
-    }
-}
-
-/** see DomExpatAgent.h */
-void DomExpatAgent::appendText(const DOMString *text)
-{
-    if ((mTopElementPtr != NULL) && (text != NULL))
-    {
-        TextImpl *textNode = mXMLDocumentPtr->createTextNode(text);
-
-        if (NULL == textNode)
-        {
-            return;
-        }
-
-       mTopElementPtr->appendChild(textNode);
-    }
-}
-
-/** see DomExpatAgent.h */
-void DomExpatAgent::startElement(const XML_Char *name, const XML_Char **atts)
-{
-    if (name)
-    {
-        DOMString tagName(name);
-
-        pushTag(&tagName, atts);
-    }
-}
-
-/** see DomExpatAgent.h */
-void DomExpatAgent::dataHandler(const XML_Char *s, int len)
-{
-    if (s != NULL && len >= 1 && *s != '\n')
-    {
-        DOMString text;
-        text.assign((char*)s, len);
-        appendText(&text);
-    }
-}
-
-/** see DomExpatAgent.h */
-void DomExpatAgent::endElement(const XML_Char *name)
-{
-   if (name)
-   {
-       DOMString tagName(name);
-       popTag(&tagName);
-   }
-}
-
-/** see DomExpatAgent.h */
-ostringstream* DomExpatAgent::generateXMLFromDocument()
-{
-    if (NULL == mXMLDocumentPtr)
-    {
-        return NULL;
-    }
-
-    ElementImpl *root = mXMLDocumentPtr->getDocumentElement();
-
-    traverse(root);
-
-    return &mXMLostream;
-}
-
-/** see DomExpatAgent.h */
-void DomExpatAgent::traverse(ElementImpl *root)
-{
-    if (NULL == root)
-    {
-        return;
-    }
-
-    mXMLostream << "<" << *(root->getNodeName());
-
-    if (root->hasAttributes())
-    {
-        mXMLostream << endl;
-        const DOMStringMap* attrMapPtr = (static_cast<XMLElementImpl*>(root))->getAttributeMap();
-        DOMStringMap::const_reverse_iterator pos;
-
-        for (pos=attrMapPtr->rbegin(); pos != attrMapPtr->rend(); pos++)
-        {
-            mXMLostream << pos->first << "=" << "\"" << pos->second << "\"";
-
-            if (pos + 1 != attrMapPtr->rend())
-            {
-                mXMLostream << endl;
-            }
-        }
-    }
-
-    mXMLostream << ">" << endl;
-
-    NodeImpl *child = root->getFirstChild();
-
-    while (child != NULL)
-    {
-        NodeType what = child->getNodeType();
-
-        if (what == ELEMENT_NODE)
-        {
-            traverse(static_cast<ElementImpl*>(child));
-        } else if (what == TEXT_NODE)
-        {
-            mXMLostream << *(static_cast<TextImpl*>(child)->getData()) << endl;
-        }
-
-        child = child->getNextSibling();
-    }
-
-    mXMLostream << "</" << *(root->getNodeName()) << ">" << endl;
-}
diff --git a/media/libdrm/mobile2/src/util/xml/ExpatWrapper.cpp b/media/libdrm/mobile2/src/util/xml/ExpatWrapper.cpp
deleted file mode 100644
index fe99a88..0000000
--- a/media/libdrm/mobile2/src/util/xml/ExpatWrapper.cpp
+++ /dev/null
@@ -1,77 +0,0 @@
-/*
- * Copyright (C) 2007 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */

-#include <util/xml/ExpatWrapper.h>
-#include <ustring.h>
-using namespace ustl;
-
-/** see ExpatWrapper.h */
-ExpatWrapper::ExpatWrapper()
-{
-    mParser = XML_ParserCreate(NULL);
-    ::XML_SetUserData(mParser, this);
-    ::XML_SetElementHandler(mParser, startElementCallback, endElementCallback);
-    ::XML_SetCharacterDataHandler(mParser, dataHandlerCallback);
-
-}
-
-/** see ExpatWrapper.h */
-ExpatWrapper::~ExpatWrapper()
-{
-    if (mParser)
-    {
-        ::XML_ParserFree(mParser);
-    }
-}
-
-/** see ExpatWrapper.h */
-int ExpatWrapper::decode(const char* buf, int len, int isFinal)
-{
-    return ::XML_Parse(mParser, buf, len, isFinal);
-}
-
-/** see ExpatWrapper.h */
-void ExpatWrapper::startElementCallback(void *userData, const XML_Char *name,
-                                        const XML_Char **atts)
-{
-    ((ExpatWrapper *)userData)->startElement(name, atts);
-}
-
-/** see ExpatWrapper.h */
-void ExpatWrapper::endElementCallback(void *userData, const XML_Char *name)
-{
-    ((ExpatWrapper *)userData)->endElement(name);
-}
-
-/** see ExpatWrapper.h */
-void ExpatWrapper::dataHandlerCallback(void *userData, const XML_Char *s, int len)
-{
-    ((ExpatWrapper *)userData)->dataHandler(s, len);
-}
-
-/** see ExpatWrapper.h */
-void ExpatWrapper::startElement(const XML_Char *name, const XML_Char **atts)
-{
-}
-
-/** see ExpatWrapper.h */
-void ExpatWrapper::endElement(const XML_Char *name)
-{
-}
-
-/** see ExpatWrapper.h */
-void ExpatWrapper::dataHandler(const XML_Char *s, int len)
-{
-}
diff --git a/media/libdrm/mobile2/src/util/xml/XMLDocumentImpl.cpp b/media/libdrm/mobile2/src/util/xml/XMLDocumentImpl.cpp
deleted file mode 100644
index c1fbc79..0000000
--- a/media/libdrm/mobile2/src/util/xml/XMLDocumentImpl.cpp
+++ /dev/null
@@ -1,55 +0,0 @@
-/*
- * Copyright (C) 2007 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */

-#include <util/xml/XMLDocumentImpl.h>
-#include <util/xml/XMLElementImpl.h>
-
-/** see XMLDocumentImpl.h */
-XMLDocumentImpl::XMLDocumentImpl()
-{}
-
-/** see XMLDocumentImpl.h */
-XMLDocumentImpl::~XMLDocumentImpl()
-{}
-
-/** see XMLDocumentImpl.h */
-ElementImpl* XMLDocumentImpl::getDocumentElement() const
-{
-    XMLElementImpl *element = (XMLElementImpl *)(this->getFirstChild());
-    return element;
-}
-
-/** see XMLDocumentImpl.h */
-ElementImpl* XMLDocumentImpl::createElement(const DOMString* tagName) const throw (DOMException)
-{
-    if (tagName)
-    {
-        XMLElementImpl *element = new XMLElementImpl(tagName);
-        return element;
-    }
-    return NULL;
-}
-
-/** see XMLDocumentImpl.h */
-TextImpl* XMLDocumentImpl::createTextNode(const DOMString* data) const
-{
-    if (data)
-    {
-        TextImpl *text = new TextImpl(data);
-        return text;
-    }
-    return NULL;
-}
-
diff --git a/media/libdrm/mobile2/src/util/xml/XMLElementImpl.cpp b/media/libdrm/mobile2/src/util/xml/XMLElementImpl.cpp
deleted file mode 100644
index 5453902..0000000
--- a/media/libdrm/mobile2/src/util/xml/XMLElementImpl.cpp
+++ /dev/null
@@ -1,136 +0,0 @@
-/*
- * Copyright (C) 2007 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */

-#include <util/xml/XMLElementImpl.h>
-#include <util/domcore/TextImpl.h>
-
-/** see XMLElementImpl.h */
-XMLElementImpl::XMLElementImpl(const DOMString *tag)
-{
-    if (tag)
-    {
-        mTagName = *tag;
-    }
-}
-
-/** see XMLElementImpl.h */
-XMLElementImpl::~XMLElementImpl()
-{
-}
-
-/** see XMLElementImpl.h */
-const DOMString* XMLElementImpl::getTagName() const
-{
-    return &mTagName;
-}
-
-/** see XMLElementImpl.h */
-void XMLElementImpl::setAttribute(const DOMString* name, const DOMString* value)
-                                  throw (DOMException)
-{
-    if (name && value)
-    {
-        mAttributeMap[*name] = *value;
-    }
-}
-
-/** see XMLElementImpl.h */
-void XMLElementImpl::removeAttribute(const DOMString* name) throw (DOMException)
-{
-    if (name)
-    {
-       mAttributeMap.erase(*name);
-    }
-}
-
-/** see XMLElementImpl.h */
-const DOMString* XMLElementImpl::getAttribute(const DOMString* name) const
-{
-    if (name)
-    {
-        DOMStringMap::const_iterator pos = mAttributeMap.find(*name);
-
-        if (pos != mAttributeMap.end())
-        {
-           return &(pos->second);
-        }
-
-    }
-    return NULL;
-}
-
-/** see XMLElementImpl.h */
-bool XMLElementImpl::hasAttributes() const
-{
-    return !mAttributeMap.empty();
-}
-
-/** see XMLElementImpl.h */
-const DOMStringMap* XMLElementImpl::getAttributeMap() const
-{
-    return &mAttributeMap;
-}
-
-/** see XMLElementImpl.h */
-const NodeImpl* XMLElementImpl::findSoloChildNode(const char* tag) const
-{
-    if (NULL == tag)
-    {
-        return NULL;
-    }
-
-    string token;
-    NodeListImpl *nodeList = NULL;
-    const NodeImpl *childNode = NULL;
-
-    token.assign(tag);
-    nodeList = getElementsByTagName(&token);
-
-    if (nodeList->getLength() > 0)
-    {
-         childNode = nodeList->item(0);
-    }
-
-    return childNode;
-}
-
-/** see XMLElementImpl.h */
-const string* XMLElementImpl::getSoloText(const char* tag) const
-{
-    const NodeImpl *textNode = this->findSoloChildNode(tag);
-
-    if (textNode)
-    {
-        textNode = textNode->getFirstChild();
-        if (textNode)
-        {
-            return static_cast<const TextImpl*>(textNode)->getData();
-        }
-    }
-
-    return NULL;
-}
-
-/** see XMLElementImpl.h */
-const XMLElementImpl* XMLElementImpl::getSoloElement(const char* tag) const
-{
-    const NodeImpl *node = findSoloChildNode(tag);
-    if (node)
-    {
-        return static_cast<const XMLElementImpl*>(node);
-    }
-
-    return NULL;
-}
diff --git a/media/libeffects/Android.mk b/media/libeffects/Android.mk
new file mode 100644
index 0000000..fc4ceb6
--- /dev/null
+++ b/media/libeffects/Android.mk
@@ -0,0 +1,127 @@
+LOCAL_PATH:= $(call my-dir)
+
+#
+TEST_EFFECT_LIBRARIES := true
+
+# Effect factory library
+include $(CLEAR_VARS)
+
+LOCAL_SRC_FILES:= \
+	EffectsFactory.c
+
+LOCAL_SHARED_LIBRARIES := \
+	libcutils
+
+LOCAL_MODULE_PATH := $(TARGET_OUT_SHARED_LIBRARIES)
+LOCAL_MODULE:= libeffects
+
+ifeq ($(TARGET_OS)-$(TARGET_SIMULATOR),linux-true)
+LOCAL_LDLIBS += -ldl
+endif
+
+ifneq ($(TARGET_SIMULATOR),true)
+LOCAL_SHARED_LIBRARIES += libdl
+endif
+
+LOCAL_C_INCLUDES := \
+
+include $(BUILD_SHARED_LIBRARY)
+
+
+ifeq ($(TEST_EFFECT_LIBRARIES),true)
+# Test Reverb library
+include $(CLEAR_VARS)
+
+LOCAL_SRC_FILES:= \
+	EffectReverb.c.arm \
+	EffectsMath.c.arm
+LOCAL_CFLAGS+= -O2
+
+LOCAL_SHARED_LIBRARIES := \
+	libcutils
+
+LOCAL_MODULE_PATH := $(TARGET_OUT_SHARED_LIBRARIES)/soundfx
+LOCAL_MODULE:= libreverb
+
+ifeq ($(TARGET_OS)-$(TARGET_SIMULATOR),linux-true)
+LOCAL_LDLIBS += -ldl
+endif
+
+ifneq ($(TARGET_SIMULATOR),true)
+LOCAL_SHARED_LIBRARIES += libdl
+endif
+
+LOCAL_C_INCLUDES := \
+	$(call include-path-for, graphics corecg)
+
+LOCAL_PRELINK_MODULE := false
+
+include $(BUILD_SHARED_LIBRARY)
+
+# Test Equalizer library
+include $(CLEAR_VARS)
+
+LOCAL_SRC_FILES:= \
+	EffectsMath.c.arm \
+	EffectEqualizer.cpp \
+	AudioBiquadFilter.cpp.arm \
+	AudioCoefInterpolator.cpp.arm \
+	AudioPeakingFilter.cpp.arm \
+	AudioShelvingFilter.cpp.arm \
+	AudioEqualizer.cpp.arm
+
+LOCAL_CFLAGS+= -O2
+
+LOCAL_SHARED_LIBRARIES := \
+	libcutils
+
+LOCAL_MODULE_PATH := $(TARGET_OUT_SHARED_LIBRARIES)/soundfx
+LOCAL_MODULE:= libequalizer
+
+ifeq ($(TARGET_OS)-$(TARGET_SIMULATOR),linux-true)
+LOCAL_LDLIBS += -ldl
+endif
+
+ifneq ($(TARGET_SIMULATOR),true)
+LOCAL_SHARED_LIBRARIES += libdl
+endif
+
+LOCAL_C_INCLUDES := \
+	$(call include-path-for, graphics corecg) \
+	system/media/opensles/include
+
+LOCAL_PRELINK_MODULE := false
+
+include $(BUILD_SHARED_LIBRARY)
+
+endif
+
+
+# Visualizer library
+include $(CLEAR_VARS)
+
+LOCAL_SRC_FILES:= \
+	EffectVisualizer.cpp
+
+LOCAL_CFLAGS+= -O2
+
+LOCAL_SHARED_LIBRARIES := \
+	libcutils
+
+LOCAL_MODULE_PATH := $(TARGET_OUT_SHARED_LIBRARIES)/soundfx
+LOCAL_MODULE:= libvisualizer
+
+ifeq ($(TARGET_OS)-$(TARGET_SIMULATOR),linux-true)
+LOCAL_LDLIBS += -ldl
+endif
+
+ifneq ($(TARGET_SIMULATOR),true)
+LOCAL_SHARED_LIBRARIES += libdl
+endif
+
+LOCAL_C_INCLUDES := \
+	$(call include-path-for, graphics corecg)
+
+LOCAL_PRELINK_MODULE := false
+
+include $(BUILD_SHARED_LIBRARY)
diff --git a/media/libeffects/AudioBiquadFilter.cpp b/media/libeffects/AudioBiquadFilter.cpp
new file mode 100644
index 0000000..72917a3
--- /dev/null
+++ b/media/libeffects/AudioBiquadFilter.cpp
@@ -0,0 +1,260 @@
+/* //device/servers/AudioFlinger/AudioBiquadFilter.cpp
+**
+** Copyright 2009, The Android Open Source Project
+**
+** Licensed under the Apache License, Version 2.0 (the "License");
+** you may not use this file except in compliance with the License.
+** You may obtain a copy of the License at
+**
+**     http://www.apache.org/licenses/LICENSE-2.0
+**
+** Unless required by applicable law or agreed to in writing, software
+** distributed under the License is distributed on an "AS IS" BASIS,
+** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+** See the License for the specific language governing permissions and
+** limitations under the License.
+*/
+
+#include <string.h>
+#include <assert.h>
+
+#include "AudioBiquadFilter.h"
+
+#define LIKELY( exp )       (__builtin_expect( (exp) != 0, true  ))
+#define UNLIKELY( exp )     (__builtin_expect( (exp) != 0, false ))
+
+namespace android {
+
+const audio_coef_t AudioBiquadFilter::IDENTITY_COEFS[AudioBiquadFilter::NUM_COEFS] = { AUDIO_COEF_ONE, 0, 0, 0, 0 };
+
+AudioBiquadFilter::AudioBiquadFilter(int nChannels, int sampleRate) {
+    configure(nChannels, sampleRate);
+    reset();
+}
+
+void AudioBiquadFilter::configure(int nChannels, int sampleRate) {
+    assert(nChannels > 0 && nChannels <= MAX_CHANNELS);
+    assert(sampleRate > 0);
+    mNumChannels  = nChannels;
+    mMaxDelta = static_cast<int64_t>(MAX_DELTA_PER_SEC)
+                * AUDIO_COEF_ONE
+                / sampleRate;
+    clear();
+}
+
+void AudioBiquadFilter::reset() {
+    memcpy(mCoefs, IDENTITY_COEFS, sizeof(mCoefs));
+    mCoefDirtyBits = 0;
+    setState(STATE_BYPASS);
+}
+
+void AudioBiquadFilter::clear() {
+    memset(mDelays, 0, sizeof(mDelays));
+}
+
+void AudioBiquadFilter::setCoefs(const audio_coef_t coefs[NUM_COEFS], bool immediate) {
+    memcpy(mTargetCoefs, coefs, sizeof(mTargetCoefs));
+    if (mState & STATE_ENABLED_MASK) {
+        if (UNLIKELY(immediate)) {
+            memcpy(mCoefs, coefs, sizeof(mCoefs));
+            setState(STATE_NORMAL);
+        } else {
+            setState(STATE_TRANSITION_TO_NORMAL);
+        }
+    }
+}
+
+void AudioBiquadFilter::process(const audio_sample_t in[], audio_sample_t out[],
+                                int frameCount) {
+    (this->*mCurProcessFunc)(in, out, frameCount);
+}
+
+void AudioBiquadFilter::enable(bool immediate) {
+    if (UNLIKELY(immediate)) {
+        memcpy(mCoefs, mTargetCoefs, sizeof(mCoefs));
+        setState(STATE_NORMAL);
+    } else {
+        setState(STATE_TRANSITION_TO_NORMAL);
+    }
+}
+
+void AudioBiquadFilter::disable(bool immediate) {
+    if (UNLIKELY(immediate)) {
+        memcpy(mCoefs, IDENTITY_COEFS, sizeof(mCoefs));
+        setState(STATE_BYPASS);
+    } else {
+        setState(STATE_TRANSITION_TO_BYPASS);
+    }
+}
+
+void AudioBiquadFilter::setState(state_t state) {
+    switch (state) {
+    case STATE_BYPASS:
+      mCurProcessFunc = &AudioBiquadFilter::process_bypass;
+      break;
+    case STATE_TRANSITION_TO_BYPASS:
+      if (mNumChannels == 1) {
+        mCurProcessFunc = &AudioBiquadFilter::process_transition_bypass_mono;
+      } else {
+        mCurProcessFunc = &AudioBiquadFilter::process_transition_bypass_multi;
+      }
+      mCoefDirtyBits = (1 << NUM_COEFS) - 1;
+      break;
+    case STATE_TRANSITION_TO_NORMAL:
+      if (mNumChannels == 1) {
+        mCurProcessFunc = &AudioBiquadFilter::process_transition_normal_mono;
+      } else {
+        mCurProcessFunc = &AudioBiquadFilter::process_transition_normal_multi;
+      }
+      mCoefDirtyBits = (1 << NUM_COEFS) - 1;
+      break;
+    case STATE_NORMAL:
+      if (mNumChannels == 1) {
+        mCurProcessFunc = &AudioBiquadFilter::process_normal_mono;
+      } else {
+        mCurProcessFunc = &AudioBiquadFilter::process_normal_multi;
+      }
+      break;
+    }
+    mState = state;
+}
+
+bool AudioBiquadFilter::updateCoefs(const audio_coef_t coefs[NUM_COEFS],
+                                    int frameCount) {
+    int64_t maxDelta = mMaxDelta * frameCount;
+    for (int i = 0; i < NUM_COEFS; ++i) {
+        if (mCoefDirtyBits & (1<<i)) {
+            audio_coef_t diff = coefs[i] - mCoefs[i];
+            if (diff > maxDelta) {
+                mCoefs[i] += maxDelta;
+            } else if (diff < -maxDelta) {
+                mCoefs[i] -= maxDelta;
+            } else {
+                mCoefs[i] = coefs[i];
+                mCoefDirtyBits ^= (1<<i);
+            }
+        }
+    }
+    return mCoefDirtyBits == 0;
+}
+
+void AudioBiquadFilter::process_bypass(const audio_sample_t * in,
+                                       audio_sample_t * out,
+                                       int frameCount) {
+    // The common case is in-place processing, because this is what the EQ does.
+    if (UNLIKELY(in != out)) {
+        memcpy(out, in, frameCount * mNumChannels * sizeof(audio_sample_t));
+    }
+}
+
+void AudioBiquadFilter::process_normal_mono(const audio_sample_t * in,
+                                            audio_sample_t * out,
+                                            int frameCount) {
+    size_t nFrames = frameCount;
+    audio_sample_t x1 = mDelays[0][0];
+    audio_sample_t x2 = mDelays[0][1];
+    audio_sample_t y1 = mDelays[0][2];
+    audio_sample_t y2 = mDelays[0][3];
+    const audio_coef_t b0 = mCoefs[0];
+    const audio_coef_t b1 = mCoefs[1];
+    const audio_coef_t b2 = mCoefs[2];
+    const audio_coef_t a1 = mCoefs[3];
+    const audio_coef_t a2 = mCoefs[4];
+    while (nFrames-- > 0) {
+        audio_sample_t x0 = *(in++);
+        audio_coef_sample_acc_t acc;
+        acc = mul_coef_sample(b0, x0);
+        acc = mac_coef_sample(b1, x1, acc);
+        acc = mac_coef_sample(b2, x2, acc);
+        acc = mac_coef_sample(a1, y1, acc);
+        acc = mac_coef_sample(a2, y2, acc);
+        audio_sample_t y0 = coef_sample_acc_to_sample(acc);
+        y2 = y1;
+        y1 = y0;
+        x2 = x1;
+        x1 = x0;
+        (*out++) = y0;
+    }
+    mDelays[0][0] = x1;
+    mDelays[0][1] = x2;
+    mDelays[0][2] = y1;
+    mDelays[0][3] = y2;
+}
+
+void AudioBiquadFilter::process_transition_normal_mono(const audio_sample_t * in,
+                                                       audio_sample_t * out,
+                                                       int frameCount) {
+    if (updateCoefs(mTargetCoefs, frameCount)) {
+        setState(STATE_NORMAL);
+    }
+    process_normal_mono(in, out, frameCount);
+}
+
+void AudioBiquadFilter::process_transition_bypass_mono(const audio_sample_t * in,
+                                                       audio_sample_t * out,
+                                                       int frameCount)  {
+  if (updateCoefs(IDENTITY_COEFS, frameCount)) {
+      setState(STATE_NORMAL);
+  }
+  process_normal_mono(in, out, frameCount);
+}
+
+void AudioBiquadFilter::process_normal_multi(const audio_sample_t * in,
+                                             audio_sample_t * out,
+                                             int frameCount) {
+    const audio_coef_t b0 = mCoefs[0];
+    const audio_coef_t b1 = mCoefs[1];
+    const audio_coef_t b2 = mCoefs[2];
+    const audio_coef_t a1 = mCoefs[3];
+    const audio_coef_t a2 = mCoefs[4];
+    for (int ch = 0; ch < mNumChannels; ++ch) {
+        size_t nFrames = frameCount;
+        audio_sample_t x1 = mDelays[ch][0];
+        audio_sample_t x2 = mDelays[ch][1];
+        audio_sample_t y1 = mDelays[ch][2];
+        audio_sample_t y2 = mDelays[ch][3];
+        while (nFrames-- > 0) {
+            audio_sample_t x0 = *in;
+            audio_coef_sample_acc_t acc;
+            acc = mul_coef_sample(b0, x0);
+            acc = mac_coef_sample(b1, x1, acc);
+            acc = mac_coef_sample(b2, x2, acc);
+            acc = mac_coef_sample(a1, y1, acc);
+            acc = mac_coef_sample(a2, y2, acc);
+            audio_sample_t y0 = coef_sample_acc_to_sample(acc);
+            y2 = y1;
+            y1 = y0;
+            x2 = x1;
+            x1 = x0;
+            *out = y0;
+            in += mNumChannels;
+            out += mNumChannels;
+        }
+        mDelays[ch][0] = x1;
+        mDelays[ch][1] = x2;
+        mDelays[ch][2] = y1;
+        mDelays[ch][3] = y2;
+        in -= frameCount * mNumChannels - 1;
+        out -= frameCount * mNumChannels - 1;
+    }
+}
+
+void AudioBiquadFilter::process_transition_normal_multi(const audio_sample_t * in,
+                                                        audio_sample_t * out,
+                                                        int frameCount) {
+    if (updateCoefs(mTargetCoefs, frameCount)) {
+        setState(STATE_NORMAL);
+    }
+    process_normal_multi(in, out, frameCount);
+}
+
+void AudioBiquadFilter::process_transition_bypass_multi(const audio_sample_t * in,
+                                                        audio_sample_t * out,
+                                                        int frameCount)  {
+    if (updateCoefs(IDENTITY_COEFS, frameCount)) {
+        setState(STATE_NORMAL);
+    }
+    process_normal_multi(in, out, frameCount);
+}
+
+}
diff --git a/media/libeffects/AudioBiquadFilter.h b/media/libeffects/AudioBiquadFilter.h
new file mode 100644
index 0000000..2b0e2d6
--- /dev/null
+++ b/media/libeffects/AudioBiquadFilter.h
@@ -0,0 +1,180 @@
+/* //device/include/server/AudioFlinger/AudioBiquadFilter.h
+**
+** Copyright 2007, The Android Open Source Project
+**
+** Licensed under the Apache License, Version 2.0 (the "License");
+** you may not use this file except in compliance with the License.
+** You may obtain a copy of the License at
+**
+**     http://www.apache.org/licenses/LICENSE-2.0
+**
+** Unless required by applicable law or agreed to in writing, software
+** distributed under the License is distributed on an "AS IS" BASIS,
+** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+** See the License for the specific language governing permissions and
+** limitations under the License.
+*/
+
+#ifndef ANDROID_AUDIO_BIQUAD_FILTER_H
+#define ANDROID_AUDIO_BIQUAD_FILTER_H
+
+#include "AudioCommon.h"
+
+namespace android {
+// A biquad filter.
+// Implements the recursion y[n]=a0*y[n-1]+a1*y[n-2]+b0*x[n]+b1*x[n-1]+b2*x[n-2]
+// (the a0 and a1 coefficients have an opposite sign to the common convention)
+// The filter works on fixed sized blocks of data (frameCount multi-channel
+// samples, as defined during construction). An arbitrary number of interlaced
+// channels is supported.
+// Filter can operate in an enabled (active) or disabled (bypassed) states.
+// A mechanism for suppression of artifacts caused by abrupt coefficient changes
+// is implemented: normally, when the enable(), disable() and setCoefs() methods
+// are called without the immediate flag set, the filter smoothly transitions
+// from its current state to the desired state.
+class AudioBiquadFilter {
+public:
+    // Max number of channels (can be changed here, and everything should work).
+    static const int MAX_CHANNELS = 2;
+    // Number of coefficients.
+    static const int NUM_COEFS = 5;
+
+    // Constructor.
+    // nChannels    Number of input/output channels.
+    // sampleRate   Sample rate, in Hz.
+    AudioBiquadFilter(int nChannels, int sampleRate);
+
+    // Reconfiguration of the filter. Implies clear().
+    // nChannels    Number of input/output channels.
+    // sampleRate   Sample rate, in Hz.
+    void configure(int nChannels, int sampleRate);
+
+    // Resets the internal state of the filter.
+    // Coefficients are reset to identity, state becomes disabled. This change
+    // happens immediately and might cause discontinuities in the output.
+    // Delay lines are not cleared.
+    void reset();
+
+    // Clears the delay lines.
+    // This change happens immediately and might cause discontinuities in the
+    // output.
+    void clear();
+
+    // Sets the coefficients.
+    // If called when filter is disabled, will have no immediate effect, but the
+    // new coefficients will be set and used next time the filter is enabled.
+    // coefs        The new coefficients.
+    // immediate    If true, transitions to new coefficients smoothly, without
+    //              introducing discontinuities in the output. Otherwise,
+    //              transitions immediately.
+    void setCoefs(const audio_coef_t coefs[NUM_COEFS], bool immediate = false);
+
+    // Process a buffer of data. Always processes frameCount multi-channel
+    // samples. Processing can be done in-place, by passing the same buffer as
+    // both arguments.
+    // in           The input buffer. Should be of size frameCount * nChannels.
+    // out          The output buffer. Should be of size frameCount * nChannels.
+    // frameCount   Number of multi-channel samples to process.
+    void process(const audio_sample_t in[], audio_sample_t out[],
+                 int frameCount);
+
+    // Enables (activates) the filter.
+    // immediate    If true, transitions to new state smoothly, without
+    //              introducing discontinuities in the output. Otherwise,
+    //              transitions immediately.
+    void enable(bool immediate = false);
+
+    // Disables (bypasses) the filter.
+    // immediate    If true, transitions to new state smoothly, without
+    //              introducing discontinuities in the output. Otherwise,
+    //              transitions immediately.
+    void disable(bool immediate = false);
+
+private:
+    // A prototype of the actual processing function. Has the same semantics as
+    // the process() method.
+    typedef void (AudioBiquadFilter::*process_func)(const audio_sample_t[],
+                                                    audio_sample_t[],
+                                                    int frameCount);
+
+    // The maximum rate of coefficient change, measured in coefficient units per
+    // second.
+    static const audio_coef_t MAX_DELTA_PER_SEC = 2000;
+
+    // Coefficients of identity transformation.
+    static const audio_coef_t IDENTITY_COEFS[NUM_COEFS];
+
+    // Filter state.
+    enum state_t {
+        // Bypass.
+        STATE_BYPASS = 0x01,
+        // In the process of smooth transition to bypass state.
+        STATE_TRANSITION_TO_BYPASS = 0x02,
+        // In the process of smooth transition to normal (enabled) state.
+        STATE_TRANSITION_TO_NORMAL = 0x04,
+        // In normal (enabled) state.
+        STATE_NORMAL = 0x05,
+        // A bit-mask for determining whether the filter is enabled or disabled
+        // in the eyes of the client.
+        STATE_ENABLED_MASK = 0x04
+    };
+
+    // Number of channels.
+    int mNumChannels;
+    // Current state.
+    state_t mState;
+    // Maximum coefficient delta per sample.
+    audio_coef_t mMaxDelta;
+
+    // A bit-mask designating for which coefficients the current value is not
+    // necessarily identical to the target value (since we're in transition
+    // state).
+    uint32_t mCoefDirtyBits;
+    // The current coefficients.
+    audio_coef_t mCoefs[NUM_COEFS];
+    // The target coefficients. Will not be identical to mCoefs if we are in a
+    // transition state.
+    audio_coef_t mTargetCoefs[NUM_COEFS];
+
+    // The delay lines.
+    audio_sample_t mDelays[MAX_CHANNELS][4];
+
+    // Current processing function (determines according to current state and
+    // number of channels).
+    process_func mCurProcessFunc;
+
+    // Sets a new state. Updates the processing function accordingly, and sets
+    // the dirty bits if changing to a transition state.
+    void setState(state_t state);
+
+    // In a transition state, modifies the current coefs towards the passed
+    // coefs, while keeping a smooth change rate. Whenever a coef reaches its
+    // target value, the dirty bit is cleared. If all are clear, the function
+    // returns true, and we can then change to our target state.
+    bool updateCoefs(const audio_coef_t coefs[NUM_COEFS], int frameCount);
+
+    // Processing function when in disabled state.
+    void process_bypass(const audio_sample_t * in, audio_sample_t * out,
+                        int frameCount);
+    // Processing function when in normal state, mono.
+    void process_normal_mono(const audio_sample_t * in, audio_sample_t * out,
+                             int frameCount);
+    // Processing function when transitioning to normal state, mono.
+    void process_transition_normal_mono(const audio_sample_t * in,
+                                        audio_sample_t * out, int frameCount);
+    // Processing function when transitioning to bypass state, mono.
+    void process_transition_bypass_mono(const audio_sample_t * in,
+                                        audio_sample_t * out, int frameCount);
+    // Processing function when in normal state, multi-channel.
+    void process_normal_multi(const audio_sample_t * in, audio_sample_t * out,
+                              int frameCount);
+    // Processing function when transitioning to normal state, multi-channel.
+    void process_transition_normal_multi(const audio_sample_t * in,
+                                         audio_sample_t * out, int frameCount);
+    // Processing function when transitioning to bypass state, multi-channel.
+    void process_transition_bypass_multi(const audio_sample_t * in,
+                                         audio_sample_t * out, int frameCount);
+};
+}
+
+#endif // ANDROID_AUDIO_BIQUAD_FILTER_H
diff --git a/media/libeffects/AudioCoefInterpolator.cpp b/media/libeffects/AudioCoefInterpolator.cpp
new file mode 100644
index 0000000..039ab9f
--- /dev/null
+++ b/media/libeffects/AudioCoefInterpolator.cpp
@@ -0,0 +1,84 @@
+/* //device/servers/AudioFlinger/AudioCoefInterpolator.cpp
+ **
+ ** Copyright 2008, The Android Open Source Project
+ **
+ ** Licensed under the Apache License, Version 2.0 (the "License");
+ ** you may not use this file except in compliance with the License.
+ ** You may obtain a copy of the License at
+ **
+ **     http://www.apache.org/licenses/LICENSE-2.0
+ **
+ ** Unless required by applicable law or agreed to in writing, software
+ ** distributed under the License is distributed on an "AS IS" BASIS,
+ ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ ** See the License for the specific language governing permissions and
+ ** limitations under the License.
+ */
+
+#include <string.h>
+#include "AudioCoefInterpolator.h"
+
+#define LIKELY( exp )       (__builtin_expect( (exp) != 0, true  ))
+#define UNLIKELY( exp )     (__builtin_expect( (exp) != 0, false ))
+
+namespace android {
+
+AudioCoefInterpolator::AudioCoefInterpolator(size_t nInDims,
+                                             const size_t inDims[],
+                                             size_t nOutDims,
+                                             const audio_coef_t * table) {
+    mNumInDims = nInDims;
+    memcpy(mInDims, inDims, nInDims * sizeof(size_t));
+    mNumOutDims = nOutDims;
+    mTable = table;
+    // Initialize offsets array
+    size_t dim = nInDims - 1;
+    mInDimOffsets[nInDims - 1] = nOutDims;
+    while (dim-- > 0) {
+        mInDimOffsets[dim] = mInDimOffsets[dim + 1] * mInDims[dim + 1];
+    }
+}
+
+void AudioCoefInterpolator::getCoef(const int intCoord[], uint32_t fracCoord[],
+                                    audio_coef_t out[]) {
+    size_t index = 0;
+    size_t dim = mNumInDims;
+    while (dim-- > 0) {
+        if (UNLIKELY(intCoord[dim] < 0)) {
+            fracCoord[dim] = 0;
+        } else if (UNLIKELY(intCoord[dim] >= (int)mInDims[dim] - 1)) {
+            fracCoord[dim] = 0;
+            index += mInDimOffsets[dim] * (mInDims[dim] - 1);
+        } else {
+            index += mInDimOffsets[dim] * intCoord[dim];
+        }
+    }
+    getCoefRecurse(index, fracCoord, out, 0);
+}
+
+void AudioCoefInterpolator::getCoefRecurse(size_t index,
+                                           const uint32_t fracCoord[],
+                                           audio_coef_t out[], size_t dim) {
+    if (dim == mNumInDims) {
+        memcpy(out, mTable + index, mNumOutDims * sizeof(audio_coef_t));
+    } else {
+        getCoefRecurse(index, fracCoord, out, dim + 1);
+        if (LIKELY(fracCoord != 0)) {
+           audio_coef_t tempCoef[MAX_OUT_DIMS];
+           getCoefRecurse(index + mInDimOffsets[dim], fracCoord, tempCoef,
+                           dim + 1);
+            size_t d = mNumOutDims;
+            while (d-- > 0) {
+                out[d] = interp(out[d], tempCoef[d], fracCoord[dim]);
+            }
+        }
+    }
+}
+
+audio_coef_t AudioCoefInterpolator::interp(audio_coef_t lo, audio_coef_t hi,
+                                           uint32_t frac) {
+    int64_t delta = static_cast<int64_t>(hi-lo) * frac;
+    return lo + static_cast<audio_coef_t> (delta >> 32);
+}
+
+}
diff --git a/media/libeffects/AudioCoefInterpolator.h b/media/libeffects/AudioCoefInterpolator.h
new file mode 100644
index 0000000..13e5697
--- /dev/null
+++ b/media/libeffects/AudioCoefInterpolator.h
@@ -0,0 +1,98 @@
+/* //device/include/server/AudioFlinger/AudioCoefInterpolator.h
+ **
+ ** Copyright 2007, The Android Open Source Project
+ **
+ ** Licensed under the Apache License, Version 2.0 (the "License");
+ ** you may not use this file except in compliance with the License.
+ ** You may obtain a copy of the License at
+ **
+ **     http://www.apache.org/licenses/LICENSE-2.0
+ **
+ ** Unless required by applicable law or agreed to in writing, software
+ ** distributed under the License is distributed on an "AS IS" BASIS,
+ ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ ** See the License for the specific language governing permissions and
+ ** limitations under the License.
+ */
+
+#ifndef ANDROID_AUDIO_COEF_INTERPOLATOR_H
+#define ANDROID_AUDIO_COEF_INTERPOLATOR_H
+
+#include "AudioCommon.h"
+
+namespace android {
+
+// A helper class for linear interpolation of N-D -> M-D coefficient tables.
+// This class provides support for out-of-range indexes.
+// Details:
+// The purpose is efficient approximation of a N-dimensional vector to
+// M-dimensional function. The approximation is based on a table of output
+// values on a uniform grid of the input values. Values not on the grid are
+// linearly interpolated.
+// Access to values are done by specifying input values in table index units,
+// having an integer and a fractional part, e.g. retrieving a value from index
+// 1.4 will result in linear interpolation between index 1 and index 2.
+class AudioCoefInterpolator {
+public:
+    // Constructor.
+    // nInDims      Number of input dimensions (limited to MAX_IN_DIMS).
+    // inDims       An array of size nInDims with the size of the table on each
+    //              respective dimension.
+    // nOutDims     Number of output dimensions (limited to MAX_OUT_DIMS).
+    // table        The coefficient table. Should be of size:
+    //              inDims[0]*inDims[1]*...*inDims[nInDims-1]*nOutDims, where
+    //              func([i,j,k]) = table(i,j,k,:)
+    AudioCoefInterpolator(size_t nInDims, const size_t inDims[],
+                          size_t nOutDims, const audio_coef_t * table);
+
+    // Get the value of the approximated function at a given point.
+    // intCoord     The integer part of the input value. Should be an array of
+    //              size nInDims.
+    // fracCoord    The fractional part of the input value. Should be an array
+    //              of size nInDims. This value is in 32-bit precision.
+    // out          An array for the output value. Should be of size nOutDims.
+    void getCoef(const int intCoord[], uint32_t fracCoord[], audio_coef_t out[]);
+
+private:
+    // Maximum allowed number of input dimensions.
+    static const size_t MAX_IN_DIMS = 8;
+    // Maximum allowed number of output dimensions.
+    static const size_t MAX_OUT_DIMS = 8;
+
+    // Number of input dimensions.
+    size_t mNumInDims;
+    // Number of input dimensions.
+    size_t mInDims[MAX_IN_DIMS];
+    // The offset between two consecutive indexes of each dimension. This is in
+    // fact a cumulative product of mInDims (done in reverse).
+    size_t mInDimOffsets[MAX_IN_DIMS];
+    // Number of output dimensions.
+    size_t mNumOutDims;
+    // The coefficient table.
+    const audio_coef_t * mTable;
+
+    // A recursive function for getting an interpolated coefficient value.
+    // The recursion depth is the number of input dimensions.
+    // At each step, we fetch two interpolated values of the current dimension,
+    // by two recursive calls to this method for the next dimensions. We then
+    // linearly interpolate these values over the current dimension.
+    // index      The linear integer index of the value we need to interpolate.
+    // fracCoord  A vector of fractional coordinates for each of the input
+    //            dimensions.
+    // out        Where the output should be written. Needs to be of size
+    //            mNumOutDims.
+    // dim        The input dimensions we are currently interpolating. This
+    //            value will be increased on recursive calls.
+    void getCoefRecurse(size_t index, const uint32_t fracCoord[],
+                        audio_coef_t out[], size_t dim);
+
+    // Scalar interpolation of two data points.
+    // lo       The first data point.
+    // hi       The second data point.
+    // frac     A 32-bit fraction designating the weight of the second point.
+    static audio_coef_t interp(audio_coef_t lo, audio_coef_t hi, uint32_t frac);
+};
+
+}
+
+#endif // ANDROID_AUDIO_COEF_INTERPOLATOR_H
diff --git a/media/libeffects/AudioCommon.h b/media/libeffects/AudioCommon.h
new file mode 100644
index 0000000..444f93a
--- /dev/null
+++ b/media/libeffects/AudioCommon.h
@@ -0,0 +1,92 @@
+/*
+**
+** Copyright 2009, The Android Open Source Project
+**
+** Licensed under the Apache License, Version 2.0 (the "License");
+** you may not use this file except in compliance with the License.
+** You may obtain a copy of the License at
+**
+**     http://www.apache.org/licenses/LICENSE-2.0
+**
+** Unless required by applicable law or agreed to in writing, software
+** distributed under the License is distributed on an "AS IS" BASIS,
+** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+** See the License for the specific language governing permissions and
+** limitations under the License.
+*/
+
+#ifndef ANDROID_AUDIO_COMMON_H
+#define ANDROID_AUDIO_COMMON_H
+
+#include <stdint.h>
+#include <stddef.h>
+
+namespace android {
+
+// Audio coefficient type.
+typedef int32_t audio_coef_t;
+// Audio sample type.
+typedef int32_t audio_sample_t;
+// Accumulator type for coef x sample.
+typedef int64_t audio_coef_sample_acc_t;
+
+// Number of fraction bits for audio coefficient.
+static const int AUDIO_COEF_PRECISION = 24;
+// Audio coefficient with the value of 1.0
+static const audio_coef_t AUDIO_COEF_ONE = 1 << AUDIO_COEF_PRECISION;
+// Audio coefficient with the value of 0.5
+static const audio_coef_t AUDIO_COEF_HALF = 1 << (AUDIO_COEF_PRECISION - 1);
+// Number of fraction bits for audio sample.
+static const int AUDIO_SAMPLE_PRECISION = 24;
+// Audio sample with the value of 1.0
+static const audio_sample_t AUDIO_SAMPLE_ONE = 1 << AUDIO_SAMPLE_PRECISION;
+
+// TODO: These are just temporary naive implementations of the necessary
+// arithmetic operations needed for the filter. They should be moved to a more
+// generic location and implemented more efficiently.
+
+// Multiply a sample by a coefficient to return an accumulator.
+inline audio_coef_sample_acc_t mul_coef_sample(audio_coef_t x, audio_sample_t y) {
+    return ((audio_coef_sample_acc_t) (x)) * y;
+}
+
+// Multiply and accumulate sample by a coefficient to return an accumulator.
+inline audio_coef_sample_acc_t mac_coef_sample(audio_coef_t x, audio_sample_t y, audio_coef_sample_acc_t acc) {
+    return acc + ((audio_coef_sample_acc_t) (x)) * y;
+}
+
+// Convert a sample-coefficient accumulator to a sample.
+inline audio_sample_t coef_sample_acc_to_sample(audio_coef_sample_acc_t acc) {
+    if (acc < 0) {
+        acc += AUDIO_COEF_ONE - 1;
+    }
+    return (audio_sample_t) (acc >> AUDIO_COEF_PRECISION);
+}
+
+// Convert a S15 sample to audio_sample_t
+inline audio_sample_t s15_to_audio_sample_t(int16_t s15) {
+    return audio_sample_t(s15) << 9;
+}
+
+// Convert a audio_sample_t sample to S15 (no clipping)
+inline int16_t audio_sample_t_to_s15(audio_sample_t sample) {
+    return int16_t((sample + (1 << 8)) >> 9);
+}
+
+// Convert a audio_sample_t sample to S15 (with clipping)
+inline int16_t audio_sample_t_to_s15_clip(audio_sample_t sample) {
+    // TODO: optimize for targets supporting this as an atomic operation.
+    if (__builtin_expect(sample >= (0x7FFF << 9), 0)) {
+        return 0x7FFF;
+    } else if (__builtin_expect(sample <= -(0x8000 << 9), 0)) {
+        return 0x8000;
+    } else {
+        return audio_sample_t_to_s15(sample);
+    }
+}
+
+////////////////////////////////////////////////////////////////////////////////
+
+}
+
+#endif // ANDROID_AUDIO_COMMON_H
diff --git a/media/libeffects/AudioEqualizer.cpp b/media/libeffects/AudioEqualizer.cpp
new file mode 100644
index 0000000..44c9476
--- /dev/null
+++ b/media/libeffects/AudioEqualizer.cpp
@@ -0,0 +1,315 @@
+/*
+ * Copyright 2009, The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#define LOG_TAG "AudioEqualizer"
+
+#include <assert.h>
+#include <stdlib.h>
+#include <new>
+#include <utils/Log.h>
+
+#include "AudioEqualizer.h"
+#include "AudioPeakingFilter.h"
+#include "AudioShelvingFilter.h"
+#include "EffectsMath.h"
+
+namespace android {
+
+size_t AudioEqualizer::GetInstanceSize(int nBands) {
+    assert(nBands >= 2);
+    return sizeof(AudioEqualizer) +
+           sizeof(AudioShelvingFilter) * 2 +
+           sizeof(AudioPeakingFilter) * (nBands - 2);
+}
+
+AudioEqualizer * AudioEqualizer::CreateInstance(void * pMem, int nBands,
+                                                int nChannels, int sampleRate,
+                                                const PresetConfig * presets,
+                                                int nPresets) {
+    LOGV("AudioEqualizer::CreateInstance(pMem=%p, nBands=%d, nChannels=%d, "
+         "sampleRate=%d, nPresets=%d)",
+         pMem, nBands, nChannels, sampleRate, nPresets);
+    assert(nBands >= 2);
+    bool ownMem = false;
+    if (pMem == NULL) {
+        pMem = malloc(GetInstanceSize(nBands));
+        if (pMem == NULL) {
+            return NULL;
+        }
+        ownMem = true;
+    }
+    return new (pMem) AudioEqualizer(pMem, nBands, nChannels, sampleRate,
+                                     ownMem, presets, nPresets);
+}
+
+void AudioEqualizer::configure(int nChannels, int sampleRate) {
+    LOGV("AudioEqualizer::configure(nChannels=%d, sampleRate=%d)", nChannels,
+         sampleRate);
+    mpLowShelf->configure(nChannels, sampleRate);
+    for (int i = 0; i < mNumPeaking; ++i) {
+        mpPeakingFilters[i].configure(nChannels, sampleRate);
+    }
+    mpHighShelf->configure(nChannels, sampleRate);
+}
+
+void AudioEqualizer::clear() {
+    LOGV("AudioEqualizer::clear()");
+    mpLowShelf->clear();
+    for (int i = 0; i < mNumPeaking; ++i) {
+        mpPeakingFilters[i].clear();
+    }
+    mpHighShelf->clear();
+}
+
+void AudioEqualizer::free() {
+    LOGV("AudioEqualizer::free()");
+    if (mpMem != NULL) {
+        ::free(mpMem);
+    }
+}
+
+void AudioEqualizer::reset() {
+    LOGV("AudioEqualizer::reset()");
+    const int32_t bottom = Effects_log2(kMinFreq);
+    const int32_t top = Effects_log2(mSampleRate * 500);
+    const int32_t jump = (top - bottom) / (mNumPeaking + 2);
+    int32_t centerFreq = bottom + jump/2;
+
+    mpLowShelf->reset();
+    mpLowShelf->setFrequency(Effects_exp2(centerFreq));
+    centerFreq += jump;
+    for (int i = 0; i < mNumPeaking; ++i) {
+        mpPeakingFilters[i].reset();
+        mpPeakingFilters[i].setFrequency(Effects_exp2(centerFreq));
+        centerFreq += jump;
+    }
+    mpHighShelf->reset();
+    mpHighShelf->setFrequency(Effects_exp2(centerFreq));
+    commit(true);
+    mCurPreset = PRESET_CUSTOM;
+}
+
+void AudioEqualizer::setGain(int band, int32_t millibel) {
+    LOGV("AudioEqualizer::setGain(band=%d, millibel=%d)", band, millibel);
+    assert(band >= 0 && band < mNumPeaking + 2);
+    if (band == 0) {
+        mpLowShelf->setGain(millibel);
+    } else if (band == mNumPeaking + 1) {
+        mpHighShelf->setGain(millibel);
+    } else {
+        mpPeakingFilters[band - 1].setGain(millibel);
+    }
+    mCurPreset = PRESET_CUSTOM;
+}
+
+void AudioEqualizer::setFrequency(int band, uint32_t millihertz) {
+    LOGV("AudioEqualizer::setFrequency(band=%d, millihertz=%d)", band,
+         millihertz);
+    assert(band >= 0 && band < mNumPeaking + 2);
+    if (band == 0) {
+        mpLowShelf->setFrequency(millihertz);
+    } else if (band == mNumPeaking + 1) {
+        mpHighShelf->setFrequency(millihertz);
+    } else {
+        mpPeakingFilters[band - 1].setFrequency(millihertz);
+    }
+    mCurPreset = PRESET_CUSTOM;
+}
+
+void AudioEqualizer::setBandwidth(int band, uint32_t cents) {
+    LOGV("AudioEqualizer::setBandwidth(band=%d, cents=%d)", band, cents);
+    assert(band >= 0 && band < mNumPeaking + 2);
+    if (band > 0 && band < mNumPeaking + 1) {
+        mpPeakingFilters[band - 1].setBandwidth(cents);
+        mCurPreset = PRESET_CUSTOM;
+    }
+}
+
+int32_t AudioEqualizer::getGain(int band) const {
+    assert(band >= 0 && band < mNumPeaking + 2);
+    if (band == 0) {
+        return mpLowShelf->getGain();
+    } else if (band == mNumPeaking + 1) {
+        return mpHighShelf->getGain();
+    } else {
+        return mpPeakingFilters[band - 1].getGain();
+    }
+}
+
+uint32_t AudioEqualizer::getFrequency(int band) const {
+    assert(band >= 0 && band < mNumPeaking + 2);
+    if (band == 0) {
+        return mpLowShelf->getFrequency();
+    } else if (band == mNumPeaking + 1) {
+        return mpHighShelf->getFrequency();
+    } else {
+        return mpPeakingFilters[band - 1].getFrequency();
+    }
+}
+
+uint32_t AudioEqualizer::getBandwidth(int band) const {
+    assert(band >= 0 && band < mNumPeaking + 2);
+    if (band == 0 || band == mNumPeaking + 1) {
+        return 0;
+    } else {
+        return mpPeakingFilters[band - 1].getBandwidth();
+    }
+}
+
+void AudioEqualizer::getBandRange(int band, uint32_t & low,
+                                  uint32_t & high) const {
+    assert(band >= 0 && band < mNumPeaking + 2);
+    if (band == 0) {
+        low = 0;
+        high = mpLowShelf->getFrequency();
+    } else if (band == mNumPeaking + 1) {
+        low = mpHighShelf->getFrequency();
+        high = mSampleRate * 500;
+    } else {
+        mpPeakingFilters[band - 1].getBandRange(low, high);
+    }
+}
+
+const char * AudioEqualizer::getPresetName(int preset) const {
+    assert(preset < mNumPresets && preset >= PRESET_CUSTOM);
+    if (preset == PRESET_CUSTOM) {
+        return "Custom";
+    } else {
+        return mpPresets[preset].name;
+    }
+}
+
+int AudioEqualizer::getNumPresets() const {
+    return mNumPresets;
+}
+
+int AudioEqualizer::getPreset() const {
+    return mCurPreset;
+}
+
+void AudioEqualizer::setPreset(int preset) {
+    LOGV("AudioEqualizer::setPreset(preset=%d)", preset);
+    assert(preset < mNumPresets && preset >= 0);
+    const PresetConfig &presetCfg = mpPresets[preset];
+    for (int band = 0; band < (mNumPeaking + 2); ++band) {
+        const BandConfig & bandCfg = presetCfg.bandConfigs[band];
+        setGain(band, bandCfg.gain);
+        setFrequency(band, bandCfg.freq);
+        setBandwidth(band, bandCfg.bandwidth);
+    }
+    mCurPreset = preset;
+}
+
+void AudioEqualizer::commit(bool immediate) {
+    LOGV("AudioEqualizer::commit(immediate=%d)", immediate);
+    mpLowShelf->commit(immediate);
+    for (int i = 0; i < mNumPeaking; ++i) {
+        mpPeakingFilters[i].commit(immediate);
+    }
+    mpHighShelf->commit(immediate);
+}
+
+void AudioEqualizer::process(const audio_sample_t * pIn,
+                             audio_sample_t * pOut,
+                             int frameCount) {
+//    LOGV("AudioEqualizer::process(frameCount=%d)", frameCount);
+    mpLowShelf->process(pIn, pOut, frameCount);
+    for (int i = 0; i < mNumPeaking; ++i) {
+        mpPeakingFilters[i].process(pIn, pOut, frameCount);
+    }
+    mpHighShelf->process(pIn, pOut, frameCount);
+}
+
+void AudioEqualizer::enable(bool immediate) {
+    LOGV("AudioEqualizer::enable(immediate=%d)", immediate);
+    mpLowShelf->enable(immediate);
+    for (int i = 0; i < mNumPeaking; ++i) {
+        mpPeakingFilters[i].enable(immediate);
+    }
+    mpHighShelf->enable(immediate);
+}
+
+void AudioEqualizer::disable(bool immediate) {
+    LOGV("AudioEqualizer::disable(immediate=%d)", immediate);
+    mpLowShelf->disable(immediate);
+    for (int i = 0; i < mNumPeaking; ++i) {
+        mpPeakingFilters[i].disable(immediate);
+    }
+    mpHighShelf->disable(immediate);
+}
+
+int AudioEqualizer::getMostRelevantBand(uint32_t targetFreq) const {
+    // First, find the two bands that the target frequency is between.
+    uint32_t low = mpLowShelf->getFrequency();
+    if (targetFreq <= low) {
+        return 0;
+    }
+    uint32_t high = mpHighShelf->getFrequency();
+    if (targetFreq >= high) {
+        return mNumPeaking + 1;
+    }
+    int band = mNumPeaking;
+    for (int i = 0; i < mNumPeaking; ++i) {
+        uint32_t freq = mpPeakingFilters[i].getFrequency();
+        if (freq >= targetFreq) {
+            high = freq;
+            band = i;
+            break;
+        }
+        low = freq;
+    }
+    // Now, low is right below the target and high is right above. See which one
+    // is closer on a log scale.
+    low = Effects_log2(low);
+    high = Effects_log2(high);
+    targetFreq = Effects_log2(targetFreq);
+    if (high - targetFreq < targetFreq - low) {
+        return band + 1;
+    } else {
+        return band;
+    }
+}
+
+
+AudioEqualizer::AudioEqualizer(void * pMem, int nBands, int nChannels,
+                               int sampleRate, bool ownMem,
+                               const PresetConfig * presets, int nPresets)
+                               : mSampleRate(sampleRate)
+                               , mpPresets(presets)
+                               , mNumPresets(nPresets) {
+    assert(pMem != NULL);
+    assert(nPresets == 0 || nPresets > 0 && presets != NULL);
+    mpMem = ownMem ? pMem : NULL;
+
+    pMem = (char *) pMem + sizeof(AudioEqualizer);
+    mpLowShelf = new (pMem) AudioShelvingFilter(AudioShelvingFilter::kLowShelf,
+                                                nChannels, sampleRate);
+    pMem = (char *) pMem + sizeof(AudioShelvingFilter);
+    mpHighShelf = new (pMem) AudioShelvingFilter(AudioShelvingFilter::kHighShelf,
+                                                 nChannels, sampleRate);
+    pMem = (char *) pMem + sizeof(AudioShelvingFilter);
+    mNumPeaking = nBands - 2;
+    if (mNumPeaking > 0) {
+        mpPeakingFilters = reinterpret_cast<AudioPeakingFilter *>(pMem);
+        for (int i = 0; i < mNumPeaking; ++i) {
+            new (&mpPeakingFilters[i]) AudioPeakingFilter(nChannels,
+                                                          sampleRate);
+        }
+    }
+    reset();
+}
+
+}
diff --git a/media/libeffects/AudioEqualizer.h b/media/libeffects/AudioEqualizer.h
new file mode 100644
index 0000000..4028462
--- /dev/null
+++ b/media/libeffects/AudioEqualizer.h
@@ -0,0 +1,246 @@
+/*
+ * Copyright 2009, The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef AUDIOEQUALIZER_H_
+#define AUDIOEQUALIZER_H_
+
+#include "AudioCommon.h"
+
+namespace android {
+
+class AudioShelvingFilter;
+class AudioPeakingFilter;
+
+// A parametric audio equalizer. Supports an arbitrary number of bands and
+// presets.
+// The EQ is composed of a low-shelf, zero or more peaking filters and a high
+// shelf, where each band has frequency and gain controls, and the peaking
+// filters have an additional bandwidth control.
+class AudioEqualizer {
+public:
+    // Configuration of a single band.
+    struct BandConfig {
+        // Gain in millibel.
+        int32_t gain;
+        // Frequency in millihertz.
+        uint32_t freq;
+        // Bandwidth in cents (ignored on shelving filters).
+        uint32_t bandwidth;
+    };
+
+    // Preset configuration.
+    struct PresetConfig {
+        // Human-readable name.
+        const char * name;
+        // An array of size nBands where each element is a configuration for the
+        // corresponding band.
+        const BandConfig * bandConfigs;
+    };
+
+    // This value is used when requesting current preset, and EQ is not using a
+    // preset.
+    static const int PRESET_CUSTOM = -1;
+
+    // Get the required memory size for an instance of this class.
+    // nBands   Number of bands required in the instance.
+    static size_t GetInstanceSize(int nBands);
+
+    // Create an instance of this class.
+    // If succeeds, a respective call is expected to freeInstance(), regardless
+    // of who owns the context memory.
+    // pMem         A memory buffer of at least the size returned by
+    //              GetInstanceSize(), where the instance context is to be
+    //              stored. If NULL, it will be automatically allocated (using
+    //              malloc).
+    // nBands       Number of bands. Must be >= 2.
+    // nChannels    Number of input/output channels (interlaced).
+    // sampleRate   The input/output sample rate, in Hz.
+    // presets      The presets configuration. May be NULL, but in that case the
+    //              client is required not to call preset-related functions.
+    //              This array is owned by the client and is not copied. It
+    //              must be kept valid by the client as long as the instance is
+    //              alive.
+    // nPresets     Number of elements in the presets array.
+    // returns      The instance if success. NULL if pMem is NULL and allocation
+    //              failed.
+    static AudioEqualizer * CreateInstance(void * pMem, int nBands,
+                                           int nChannels,
+                                           int sampleRate,
+                                           const PresetConfig * presets,
+                                           int nPresets);
+
+    // Reconfiguration of the filter. Changes input/output format, but does not
+    // alter current parameter values. Causes reset of the delay lines.
+    // nChannels  Number of input/output channels (interlaced).
+    // sampleRate The input/output sample rate, in Hz.
+    void configure(int nChannels, int sampleRate);
+
+    // Resets the filter parameters to the following values:
+    // frequency: 0
+    // gain: 0
+    // bandwidth: 1200 cents.
+    // It also disables the filter. Does not clear the delay lines.
+    void reset();
+
+    // Clears delay lines. Does not alter parameter values.
+    void clear();
+
+    // Frees the object. Will free the memory if the object owned it, i.e. if
+    // a NULL pointer was passed to CreateInstance as pMem.
+    void free();
+
+    // Sets gain value. Actual change will only take place upon commit().
+    // This value will be remembered even if the filter is in disabled() state.
+    // band     The band to set the gain for.
+    // millibel Gain value in millibel (1/100 of decibel).
+    void setGain(int band, int32_t millibel);
+
+    // Gets gain of a certain band. This is always the last value set (or
+    // default value after reset).
+    // band     The band to get the gain for.
+    // returns  Gain value in millibel (1/100 of decibel).
+    int32_t getGain(int band) const;
+
+    // Sets cutoff frequency value. Actual change will only take place upon
+    // commit().
+    // This value will be remembered even if the filter is in disabled() state.
+    // band       The band to set the frequency for.
+    // millihertz Frequency value in mHz.
+    void setFrequency(int band, uint32_t millihertz);
+
+    // Gets frequency of a certain band. This is always the last value set (or
+    // default value after reset).
+    // band     The band to get the frequency for.
+    // returns  Frequency value in mHz.
+    uint32_t getFrequency(int band) const;
+
+    // Sets bandwidth value. Actual change will only take place upon commit().
+    // This value will be remembered even if the filter is in disabled() state.
+    // If called on the first or last band, this call is ignored.
+    // band  The band to set the frequency for.
+    // cents Bandwidth value in cents (1/1200 octave).
+    void setBandwidth(int band, uint32_t cents);
+
+    // Gets bandwidth of a certain band. This is always the last value set (or
+    // default value after reset). For the first and last bands, 0 is always
+    // returned.
+    // band     The band to get the bandwidth for.
+    // returns  Bandwidth value in cents (1/1200 octave).
+    uint32_t getBandwidth(int band) const;
+
+    // Gets lower and upper boundaries of a band.
+    // For the low shelf, the low bound is 0 and the high bound is the band
+    // frequency.
+    // For the high shelf, the low bound is the band frequency and the high
+    // bound is Nyquist.
+    // For the peaking filters, they are the gain[dB]/2 points.
+    void getBandRange(int band, uint32_t & low, uint32_t & high) const;
+
+    // Gets a human-readable name for a preset ID. Will return "Custom" if
+    // PRESET_CUSTOM is passed.
+    // preset       The preset ID. Must be less than number of presets.
+    const char * getPresetName(int preset) const;
+
+    // Gets the number of presets.
+    int getNumPresets() const;
+
+    // Gets the currently set preset ID.
+    // Will return PRESET_CUSTOM in case the EQ parameters have been modified
+    // manually since a preset was set.
+    int getPreset() const;
+
+    // Sets the current preset by ID.
+    // All the band parameters will be overridden.
+    // Change will not be applied until commit() is called.
+    // preset       The preset ID. Must be less than number of presets.
+    //              PRESET_CUSTOM is NOT a valid value here.
+    void setPreset(int preset);
+
+    // Applies all parameter changes done to this point in time.
+    // If the filter is disabled, the new parameters will take place when it is
+    // enabled again. Does not introduce artifacts, unless immediate is set.
+    // immediate    Whether to apply change abruptly (ignored if filter is
+    // disabled).
+   void commit(bool immediate = false);
+
+    // Process a buffer of input data. The input and output should contain
+    // frameCount * nChannels interlaced samples. Processing can be done
+    // in-place, by passing the same buffer as both arguments.
+    // pIn          Input buffer.
+    // pOut         Output buffer.
+    // frameCount   Number of frames to produce on each call to process().
+    void process(const audio_sample_t * pIn, audio_sample_t * pOut,
+                 int frameCount);
+
+    // Enables the filter, so it would start processing input. Does not
+    // introduce artifacts, unless immediate is set.
+    // immediate    Whether to apply change abruptly.
+    void enable(bool immediate = false);
+
+    // Disabled (bypasses) the filter. Does not introduce artifacts, unless
+    // immediate is set.
+    // immediate    Whether to apply change abruptly.
+    void disable(bool immediate = false);
+
+    // Returns the band with the maximum influence on a given frequency.
+    // Result is unaffected by whether EQ is enabled or not, or by whether
+    // changes have been committed or not.
+    // targetFreq   The target frequency, in millihertz.
+    int getMostRelevantBand(uint32_t targetFreq) const;
+
+private:
+    // Bottom frequency, in mHz.
+    static const int kMinFreq = 20000;
+    // Sample rate, in Hz.
+    int mSampleRate;
+    // Number of peaking filters. Total number of bands is +2.
+    int mNumPeaking;
+    // Preset configurations.
+    const PresetConfig * mpPresets;
+    // Number of elements in mpPresets;
+    int mNumPresets;
+    // Current preset.
+    int mCurPreset;
+
+    // Memory space to free when instance is deleted, or NULL if no memory is
+    // owned.
+    void * mpMem;
+    // The low-shelving filter.
+    AudioShelvingFilter * mpLowShelf;
+    // The high-shelving filter.
+    AudioShelvingFilter * mpHighShelf;
+    // An array of size mNumPeaking of peaking filters.
+    AudioPeakingFilter * mpPeakingFilters;
+
+    // Constructor. Resets the filter (see reset()). Must call init() doing
+    // anything else.
+    // pMem       Memory buffer for bands.
+    // nChannels  Number of input/output channels (interlaced).
+    // sampleRate The input/output sample rate, in Hz.
+    // ownMem     Whether pMem is owned by me.
+    // presets      The presets configuration. May be NULL, but in that case the
+    //              client is required not to call preset-related functions.
+    //              This array is owned by the client and is not copied. It
+    //              must be kept valid by the client as long as the instance is
+    //              alive.
+    // nPresets     Number of elements in the presets array.
+    AudioEqualizer(void * pMem, int nBands, int nChannels, int sampleRate,
+                   bool ownMem, const PresetConfig * presets, int nPresets);
+};
+
+}
+
+#endif // AUDIOEQUALIZER_H_
diff --git a/media/libeffects/AudioFormatAdapter.h b/media/libeffects/AudioFormatAdapter.h
new file mode 100644
index 0000000..d93ebe9
--- /dev/null
+++ b/media/libeffects/AudioFormatAdapter.h
@@ -0,0 +1,184 @@
+/* /android/src/frameworks/base/media/libeffects/AudioFormatAdapter.h
+**
+** Copyright 2009, The Android Open Source Project
+**
+** Licensed under the Apache License, Version 2.0 (the "License");
+** you may not use this file except in compliance with the License.
+** You may obtain a copy of the License at
+**
+**     http://www.apache.org/licenses/LICENSE-2.0
+**
+** Unless required by applicable law or agreed to in writing, software
+** distributed under the License is distributed on an "AS IS" BASIS,
+** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+** See the License for the specific language governing permissions and
+** limitations under the License.
+*/
+
+#ifndef AUDIOFORMATADAPTER_H_
+#define AUDIOFORMATADAPTER_H_
+
+#include <media/EffectApi.h>
+
+
+#define min(x,y) (((x) < (y)) ? (x) : (y))
+
+namespace android {
+
+// An adapter for an audio processor working on audio_sample_t samples with a
+// buffer override behavior to arbitrary sample formats and buffer behaviors.
+// The adapter may work on any processing class which has a processing function
+// with the following signature:
+// void process(const audio_sample_t * pIn,
+//              audio_sample_t * pOut,
+//              int frameCount);
+// It is assumed that the underlying processor works in S7.24 format and an
+// overwrite behavior.
+//
+// Usage is simple: just work with the processor normally, but instead of
+// calling its process() function directly, work with the process() function of
+// the adapter.
+// The adapter supports re-configuration to a different format on the fly.
+//
+// T        The processor class.
+// bufSize  The maximum number of samples (single channel) to process on a
+//          single call to the underlying processor. Setting this to a small
+//          number will save a little memory, but will cost function call
+//          overhead, resulting from multiple calls to the underlying process()
+//          per a single call to this class's process().
+template<class T, size_t bufSize>
+class AudioFormatAdapter {
+public:
+    // Configure the adapter.
+    // processor    The underlying audio processor.
+    // nChannels    Number of input and output channels. The adapter does not do
+    //              channel conversion - this parameter must be in sync with the
+    //              actual processor.
+    // pcmFormat    The desired input/output sample format.
+    // behavior     The desired behavior (overwrite or accumulate).
+    void configure(T & processor, int nChannels, uint8_t pcmFormat,
+                   uint32_t behavior) {
+        mpProcessor = &processor;
+        mNumChannels = nChannels;
+        mPcmFormat = pcmFormat;
+        mBehavior = behavior;
+        mMaxSamplesPerCall = bufSize / nChannels;
+    }
+
+    // Process a block of samples.
+    // pIn          A buffer of samples with the format specified on
+    //              configure().
+    // pOut         A buffer of samples with the format specified on
+    //              configure(). May be the same as pIn.
+    // numSamples   The number of multi-channel samples to process.
+    void process(const void * pIn, void * pOut, uint32_t numSamples) {
+        while (numSamples > 0) {
+            uint32_t numSamplesIter = min(numSamples, mMaxSamplesPerCall);
+            uint32_t nSamplesChannels = numSamplesIter * mNumChannels;
+            if (mPcmFormat == SAMPLE_FORMAT_PCM_S7_24) {
+                if (mBehavior == EFFECT_BUFFER_ACCESS_WRITE) {
+                    mpProcessor->process(
+                        reinterpret_cast<const audio_sample_t *> (pIn),
+                        reinterpret_cast<audio_sample_t *> (pOut),
+                        numSamplesIter);
+                } else if (mBehavior == EFFECT_BUFFER_ACCESS_ACCUMULATE) {
+                    mpProcessor->process(
+                        reinterpret_cast<const audio_sample_t *> (pIn),
+                        mBuffer, numSamplesIter);
+                    MixOutput(pOut, numSamplesIter);
+                } else {
+                    assert(false);
+                }
+                pIn = reinterpret_cast<const audio_sample_t *> (pIn)
+                        + nSamplesChannels;
+                pOut = reinterpret_cast<audio_sample_t *> (pOut)
+                        + nSamplesChannels;
+            } else {
+                ConvertInput(pIn, nSamplesChannels);
+                mpProcessor->process(mBuffer, mBuffer, numSamplesIter);
+                ConvertOutput(pOut, nSamplesChannels);
+            }
+            numSamples -= numSamplesIter;
+        }
+    }
+
+private:
+    // The underlying processor.
+    T * mpProcessor;
+    // The number of input/output channels.
+    int mNumChannels;
+    // The desired PCM format.
+    uint8_t mPcmFormat;
+    // The desired buffer behavior.
+    uint32_t mBehavior;
+    // An intermediate buffer for processing.
+    audio_sample_t mBuffer[bufSize];
+    // The buffer size, divided by the number of channels - represents the
+    // maximum number of multi-channel samples that can be stored in the
+    // intermediate buffer.
+    size_t mMaxSamplesPerCall;
+
+    // Converts a buffer of input samples to audio_sample_t format.
+    // Output is written to the intermediate buffer.
+    // pIn          The input buffer with the format designated in configure().
+    //              When function exist will point to the next unread input
+    //              sample.
+    // numSamples   The number of single-channel samples to process.
+    void ConvertInput(const void *& pIn, uint32_t numSamples) {
+        if (mPcmFormat == SAMPLE_FORMAT_PCM_S15) {
+            const int16_t * pIn16 = reinterpret_cast<const int16_t *>(pIn);
+            audio_sample_t * pOut = mBuffer;
+            while (numSamples-- > 0) {
+                *(pOut++) = s15_to_audio_sample_t(*(pIn16++));
+            }
+            pIn = pIn16;
+        } else {
+            assert(false);
+        }
+    }
+
+    // Converts audio_sample_t samples from the intermediate buffer to the
+    // output buffer, converting to the desired format and buffer behavior.
+    // pOut         The buffer to write the output to.
+    //              When function exist will point to the next output sample.
+    // numSamples   The number of single-channel samples to process.
+    void ConvertOutput(void *& pOut, uint32_t numSamples) {
+        if (mPcmFormat == SAMPLE_FORMAT_PCM_S15) {
+            const audio_sample_t * pIn = mBuffer;
+            int16_t * pOut16 = reinterpret_cast<int16_t *>(pOut);
+            if (mBehavior == EFFECT_BUFFER_ACCESS_WRITE) {
+                while (numSamples-- > 0) {
+                    *(pOut16++) = audio_sample_t_to_s15_clip(*(pIn++));
+                }
+            } else if (mBehavior == EFFECT_BUFFER_ACCESS_ACCUMULATE) {
+                while (numSamples-- > 0) {
+                    *(pOut16++) += audio_sample_t_to_s15_clip(*(pIn++));
+                }
+            } else {
+                assert(false);
+            }
+            pOut = pOut16;
+        } else {
+            assert(false);
+        }
+    }
+
+    // Accumulate data from the intermediate buffer to the output. Output is
+    // assumed to be of audio_sample_t type.
+    // pOut         The buffer to mix the output to.
+    //              When function exist will point to the next output sample.
+    // numSamples   The number of single-channel samples to process.
+    void MixOutput(void *& pOut, uint32_t numSamples) {
+        const audio_sample_t * pIn = mBuffer;
+        audio_sample_t * pOut24 = reinterpret_cast<audio_sample_t *>(pOut);
+        numSamples *= mNumChannels;
+        while (numSamples-- > 0) {
+            *(pOut24++) += *(pIn++);
+        }
+        pOut = pOut24;
+    }
+};
+
+}
+
+#endif // AUDIOFORMATADAPTER_H_
diff --git a/media/libeffects/AudioHighShelfFilterCoef.inl b/media/libeffects/AudioHighShelfFilterCoef.inl
new file mode 100644
index 0000000..ebba139
--- /dev/null
+++ b/media/libeffects/AudioHighShelfFilterCoef.inl
@@ -0,0 +1,225 @@
+13679,
+21575,
+8921,
+32315056,
+-15582015,
+26172,
+37678,
+14797,
+31891096,
+-15192527,
+51020,
+64449,
+23945,
+31322988,
+-14685186,
+101817,
+106144,
+37744,
+30562882,
+-14031372,
+208996,
+162163,
+58536,
+29548538,
+-13201017,
+442996,
+207459,
+93300,
+28200792,
+-12167331,
+971423,
+128786,
+169690,
+26422744,
+-10915428,
+2200461,
+-465686,
+394986,
+24103317,
+-9455862,
+5119991,
+-2777199,
+1147245,
+21129473,
+-7842294,
+12120379,
+-10198160,
+3631544,
+17411837,
+-6188384,
+28834234,
+-31647135,
+11337795,
+12924960,
+-4672638,
+68037766,
+-88974388,
+33477255,
+7752680,
+-3516098,
+157369944,
+-232063160,
+92282129,
+2113926,
+-2925624,
+353720112,
+-567427144,
+237164112,
+-3659993,
+-3019871,
+769091151,
+-1309871949,
+570539430,
+-9202114,
+-3779302,
+66791,
+121706,
+55888,
+30571245,
+-14038415,
+120426,
+212178,
+94820,
+29559679,
+-13209886,
+217130,
+365165,
+157610,
+28215554,
+-12178243,
+391489,
+617016,
+255010,
+26442131,
+-10928431,
+705862,
+1015147,
+398457,
+24128430,
+-9470680,
+1272682,
+1605251,
+596102,
+21161334,
+-7858153,
+2294668,
+2386833,
+848523,
+17451072,
+-6203880,
+4137327,
+3198789,
+1155536,
+12971362,
+-4685798,
+7459675,
+3470266,
+1567219,
+7804818,
+-3524761,
+13449926,
+1738911,
+2347406,
+2169089,
+-2928116,
+24250455,
+-5211241,
+4358971,
+-3605298,
+-3015671,
+43724001,
+-23849570,
+9823315,
+-9151253,
+-3769277,
+78835150,
+-66542375,
+23686373,
+-14161143,
+-5040790,
+142141173,
+-156324261,
+56024234,
+-18451275,
+-6612656,
+256283057,
+-335606326,
+126341244,
+-21970004,
+-8270755,
+16777216,
+33554432,
+16777216,
+-33554432,
+-16777216,
+16777216,
+33554432,
+16777216,
+-33554432,
+-16777216,
+16777216,
+33554432,
+16777216,
+-33554432,
+-16777216,
+16777216,
+33554432,
+16777216,
+-33554432,
+-16777216,
+16777216,
+33554432,
+16777216,
+-33554432,
+-16777216,
+16777216,
+33554432,
+16777216,
+-33554432,
+-16777216,
+16777216,
+33554432,
+16777216,
+-33554432,
+-16777216,
+16777216,
+33554432,
+16777216,
+-33554432,
+-16777216,
+16777216,
+33554432,
+16777216,
+-33554432,
+-16777216,
+16777216,
+33554432,
+16777216,
+-33554432,
+-16777216,
+16777216,
+33554432,
+16777216,
+-33554432,
+-16777216,
+16777216,
+33554432,
+16777216,
+-33554432,
+-16777216,
+16777216,
+33554432,
+16777216,
+-33554432,
+-16777216,
+16777216,
+33554432,
+16777216,
+-33554432,
+-16777216,
+16777216,
+33554432,
+16777216,
+-33554432,
+-16777216,
diff --git a/media/libeffects/AudioLowShelfFilterCoef.inl b/media/libeffects/AudioLowShelfFilterCoef.inl
new file mode 100644
index 0000000..b57deb4
--- /dev/null
+++ b/media/libeffects/AudioLowShelfFilterCoef.inl
@@ -0,0 +1,375 @@
+16212506,
+-32420574,
+16208068,
+32401411,
+-15662521,
+16356129,
+-32706246,
+16350118,
+32695525,
+-15939752,
+16464399,
+-32920670,
+16456274,
+32914686,
+-16149441,
+16546128,
+-33081289,
+16535165,
+33077955,
+-16307411,
+16608101,
+-33201422,
+16593328,
+33199569,
+-16426067,
+16655539,
+-33291174,
+16635647,
+33290147,
+-16514997,
+16692478,
+-33358171,
+16665715,
+33357608,
+-16581540,
+16722089,
+-33408149,
+16686099,
+33407850,
+-16631271,
+16746930,
+-33445409,
+16698549,
+33445267,
+-16668405,
+16769156,
+-33473168,
+16704138,
+33473133,
+-16696114,
+16790706,
+-33493827,
+16703348,
+33493886,
+-16716779,
+16813466,
+-33509166,
+16696111,
+33509342,
+-16732186,
+16839437,
+-33520498,
+16681802,
+33520852,
+-16743669,
+16870911,
+-33528765,
+16659191,
+33529424,
+-16752226,
+16910681,
+-33534607,
+16626337,
+33535807,
+-16758602,
+15667401,
+-31326224,
+15658825,
+31252161,
+-14623074,
+15945865,
+-31880007,
+15934146,
+31838205,
+-15144597,
+16157521,
+-32299091,
+16141578,
+32275604,
+-15545369,
+16318267,
+-32614903,
+16296651,
+32601755,
+-15850850,
+16440710,
+-32852157,
+16411473,
+32844820,
+-16082303,
+16534751,
+-33029985,
+16495281,
+33025910,
+-16256891,
+16608171,
+-33163043,
+16554957,
+33160803,
+-16388152,
+16667145,
+-33262468,
+16595477,
+33261275,
+-16486599,
+16716699,
+-33336671,
+16620252,
+33336105,
+-16560301,
+16761100,
+-33391976,
+16631379,
+33391836,
+-16615404,
+16804207,
+-33433103,
+16629806,
+33433341,
+-16656560,
+16849794,
+-33463551,
+16615399,
+33464251,
+-16687277,
+16901887,
+-33485857,
+16586933,
+33487271,
+-16710189,
+16965125,
+-33501781,
+16542000,
+33504415,
+-16727274,
+17045198,
+-33512384,
+16476824,
+33517183,
+-16740008,
+14635201,
+-29254376,
+14619184,
+28977711,
+-12753834,
+15157556,
+-30292825,
+15135285,
+30133938,
+-13674513,
+15561511,
+-31092298,
+15530817,
+31001860,
+-14405551,
+15872211,
+-31702342,
+15830187,
+31651218,
+-14976306,
+16111094,
+-32164834,
+16053843,
+32136101,
+-15416453,
+16295848,
+-32513802,
+16218140,
+32497757,
+-15752817,
+16440852,
+-32776179,
+16335665,
+32767326,
+-16008155,
+16557804,
+-32972907,
+16415715,
+32968179,
+-16201031,
+16656403,
+-33120052,
+16464758,
+33117802,
+-16346195,
+16745001,
+-33229805,
+16486810,
+33229247,
+-16455153,
+16831240,
+-33311306,
+16483692,
+33312252,
+-16536771,
+16922682,
+-33371278,
+16455145,
+33374070,
+-16597819,
+17027472,
+-33414465,
+16398818,
+33420110,
+-16643430,
+17155108,
+-33443875,
+16310110,
+33454398,
+-16677479,
+17317384,
+-33460760,
+16181887,
+33479933,
+-16702882,
+12792703,
+-25557388,
+12764716,
+24590507,
+-9747085,
+13706465,
+-27372621,
+13666215,
+26798296,
+-11169790,
+14439425,
+-28821830,
+14382518,
+28486469,
+-12380088,
+15018453,
+-29957273,
+14939030,
+29764018,
+-13373522,
+15472460,
+-30834757,
+15362688,
+30724568,
+-14168120,
+15828725,
+-31506123,
+15678118,
+31443928,
+-14791822,
+16111406,
+-32015988,
+15905901,
+31981391,
+-15274688,
+16341329,
+-32400984,
+16062061,
+32382398,
+-15644761,
+16536484,
+-32690238,
+16158133,
+32681354,
+-15926286,
+16712853,
+-32906337,
+16201432,
+32904128,
+-16139278,
+16885430,
+-33066336,
+16195306,
+33070090,
+-16299767,
+17069377,
+-33182599,
+16139282,
+33193711,
+-16420332,
+17281371,
+-33263294,
+16029039,
+33285785,
+-16510702,
+17541271,
+-33312390,
+15856243,
+33354359,
+-16578329,
+17874330,
+-33328902,
+15608287,
+33405430,
+-16628873,
+9881279,
+-19719268,
+9838084,
+16734303,
+-5927111,
+11264857,
+-22463447,
+11198784,
+20577584,
+-7572288,
+12460736,
+-24823046,
+12362697,
+23667359,
+-9201903,
+13459805,
+-26776851,
+13317799,
+26085683,
+-10691555,
+14276287,
+-28349256,
+14074406,
+27943899,
+-11978834,
+14936943,
+-29588248,
+14654011,
+29354533,
+-13047453,
+15473300,
+-30549299,
+15081036,
+30417203,
+-13909216,
+15917271,
+-31285788,
+15377817,
+31213972,
+-14589687,
+16299384,
+-31844320,
+15562006,
+31809683,
+-15118811,
+16648774,
+-32262999,
+15645414,
+32254329,
+-15525641,
+16994277,
+-32571090,
+15633607,
+32585895,
+-15835862,
+17366374,
+-32789019,
+15525801,
+32833003,
+-16070975,
+17799955,
+-32927834,
+15314895,
+33017107,
+-16248361,
+18338206,
+-32987318,
+14987686,
+33154246,
+-16381747,
+19038270,
+-32951545,
+14525592,
+33256392,
+-16481800,
diff --git a/media/libeffects/AudioPeakingFilter.cpp b/media/libeffects/AudioPeakingFilter.cpp
new file mode 100644
index 0000000..60fefe6
--- /dev/null
+++ b/media/libeffects/AudioPeakingFilter.cpp
@@ -0,0 +1,121 @@
+/* //device/include/server/AudioFlinger/AudioPeakingFilter.cpp
+ **
+ ** Copyright 2007, The Android Open Source Project
+ **
+ ** Licensed under the Apache License, Version 2.0 (the "License");
+ ** you may not use this file except in compliance with the License.
+ ** You may obtain a copy of the License at
+ **
+ **     http://www.apache.org/licenses/LICENSE-2.0
+ **
+ ** Unless required by applicable law or agreed to in writing, software
+ ** distributed under the License is distributed on an "AS IS" BASIS,
+ ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ ** See the License for the specific language governing permissions and
+ ** limitations under the License.
+ */
+
+#include "AudioPeakingFilter.h"
+#include "AudioCommon.h"
+#include "EffectsMath.h"
+
+#include <new>
+#include <assert.h>
+
+#define LIKELY( exp )       (__builtin_expect( (exp) != 0, true  ))
+#define UNLIKELY( exp )     (__builtin_expect( (exp) != 0, false ))
+
+namespace android {
+// Format of the coefficient table:
+// kCoefTable[freq][gain][bw][coef]
+// freq - peak frequency, in octaves below Nyquist,from -9 to -1.
+// gain - gain, in millibel, starting at -9600, jumps of 1024, to 4736 millibel.
+// bw   - bandwidth, starting at 1 cent, jumps of 1024, to 3073 cents.
+// coef - 0: b0
+//        1: b1
+//        2: b2
+//        3: -a1
+//        4: -a2
+static const size_t kInDims[3] = {9, 15, 4};
+static const audio_coef_t kCoefTable[9*15*4*5] = {
+#include "AudioPeakingFilterCoef.inl"
+};
+
+AudioCoefInterpolator AudioPeakingFilter::mCoefInterp(3, kInDims, 5, (const audio_coef_t*) kCoefTable);
+
+AudioPeakingFilter::AudioPeakingFilter(int nChannels, int sampleRate)
+        : mBiquad(nChannels, sampleRate) {
+    configure(nChannels, sampleRate);
+    reset();
+}
+
+void AudioPeakingFilter::configure(int nChannels, int sampleRate) {
+    mNiquistFreq = sampleRate * 500;
+    mFrequencyFactor = ((1ull) << 42) / mNiquistFreq;
+    mBiquad.configure(nChannels, sampleRate);
+    setFrequency(mNominalFrequency);
+    commit(true);
+}
+
+void AudioPeakingFilter::reset() {
+    setGain(0);
+    setFrequency(0);
+    setBandwidth(2400);
+    commit(true);
+}
+
+void AudioPeakingFilter::setFrequency(uint32_t millihertz) {
+    mNominalFrequency = millihertz;
+    if (UNLIKELY(millihertz > mNiquistFreq / 2)) {
+        millihertz = mNiquistFreq / 2;
+    }
+    uint32_t normFreq = static_cast<uint32_t>(
+            (static_cast<uint64_t>(millihertz) * mFrequencyFactor) >> 10);
+    if (LIKELY(normFreq > (1 << 23))) {
+        mFrequency = (Effects_log2(normFreq) - ((32-9) << 15)) << (FREQ_PRECISION_BITS - 15);
+    } else {
+        mFrequency = 0;
+    }
+}
+
+void AudioPeakingFilter::setGain(int32_t millibel) {
+    mGain = millibel + 9600;
+}
+
+void AudioPeakingFilter::setBandwidth(uint32_t cents) {
+    mBandwidth = cents - 1;
+}
+
+void AudioPeakingFilter::commit(bool immediate) {
+    audio_coef_t coefs[5];
+    int intCoord[3] = {
+        mFrequency >> FREQ_PRECISION_BITS,
+        mGain >> GAIN_PRECISION_BITS,
+        mBandwidth >> BANDWIDTH_PRECISION_BITS
+    };
+    uint32_t fracCoord[3] = {
+        mFrequency << (32 - FREQ_PRECISION_BITS),
+        static_cast<uint32_t>(mGain) << (32 - GAIN_PRECISION_BITS),
+        mBandwidth << (32 - BANDWIDTH_PRECISION_BITS)
+    };
+    mCoefInterp.getCoef(intCoord, fracCoord, coefs);
+    mBiquad.setCoefs(coefs, immediate);
+}
+
+void AudioPeakingFilter::getBandRange(uint32_t & low, uint32_t & high) const {
+    // Half bandwidth, in octaves, 15-bit precision
+    int32_t halfBW = (((mBandwidth + 1) / 2) << 15) / 1200;
+
+    low = static_cast<uint32_t>((static_cast<uint64_t>(mNominalFrequency) * Effects_exp2(-halfBW + (16 << 15))) >> 16);
+    if (UNLIKELY(halfBW >= (16 << 15))) {
+        high = mNiquistFreq;
+    } else {
+        high = static_cast<uint32_t>((static_cast<uint64_t>(mNominalFrequency) * Effects_exp2(halfBW + (16 << 15))) >> 16);
+        if (UNLIKELY(high > mNiquistFreq)) {
+            high = mNiquistFreq;
+        }
+    }
+}
+
+}
+
diff --git a/media/libeffects/AudioPeakingFilter.h b/media/libeffects/AudioPeakingFilter.h
new file mode 100644
index 0000000..d0f49c9
--- /dev/null
+++ b/media/libeffects/AudioPeakingFilter.h
@@ -0,0 +1,151 @@
+/* //device/include/server/AudioFlinger/AudioPeakingFilter.h
+**
+** Copyright 2009, The Android Open Source Project
+**
+** Licensed under the Apache License, Version 2.0 (the "License");
+** you may not use this file except in compliance with the License.
+** You may obtain a copy of the License at
+**
+**     http://www.apache.org/licenses/LICENSE-2.0
+**
+** Unless required by applicable law or agreed to in writing, software
+** distributed under the License is distributed on an "AS IS" BASIS,
+** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+** See the License for the specific language governing permissions and
+** limitations under the License.
+*/
+
+#ifndef ANDROID_AUDIO_PEAKING_FILTER_H
+#define ANDROID_AUDIO_PEAKING_FILTER_H
+
+#include "AudioBiquadFilter.h"
+#include "AudioCoefInterpolator.h"
+
+namespace android {
+
+// A peaking audio filter, with unity skirt gain, and controllable peak
+// frequency, gain and bandwidth.
+// This filter is able to suppress introduce discontinuities and other artifacts
+// in the output, even when changing parameters abruptly.
+// Parameters can be set to any value - this class will make sure to clip them
+// when they are out of supported range.
+//
+// Implementation notes:
+// This class uses an underlying biquad filter whose parameters are determined
+// using a linear interpolation from a coefficient table, using a
+// AudioCoefInterpolator.
+// All is left for this class to do is mapping between high-level parameters to
+// fractional indices into the coefficient table.
+class AudioPeakingFilter {
+public:
+    // Constructor. Resets the filter (see reset()).
+    // nChannels  Number of input/output channels (interlaced).
+    // sampleRate The input/output sample rate, in Hz.
+    AudioPeakingFilter(int nChannels, int sampleRate);
+
+    // Reconfiguration of the filter. Changes input/output format, but does not
+    // alter current parameter values. Clears delay lines.
+    // nChannels  Number of input/output channels (interlaced).
+    // sampleRate The input/output sample rate, in Hz.
+    void configure(int nChannels, int sampleRate);
+
+    // Resets the filter parameters to the following values:
+    // frequency: 0
+    // gain: 0
+    // bandwidth: 1200 cents.
+    // It also disables the filter. Does not clear the delay lines.
+    void reset();
+
+    // Clears delay lines. Does not alter parameter values.
+    void clear() { mBiquad.clear(); }
+
+    // Sets gain value. Actual change will only take place upon commit().
+    // This value will be remembered even if the filter is in disabled() state.
+    // millibel Gain value in millibel (1/100 of decibel).
+    void setGain(int32_t millibel);
+
+    // Gets the gain, in millibel, as set.
+    int32_t getGain() const { return mGain - 9600; }
+
+    // Sets bandwidth value. Actual change will only take place upon commit().
+    // This value will be remembered even if the filter is in disabled() state.
+    // cents Bandwidth value in cents (1/1200 octave).
+    void setBandwidth(uint32_t cents);
+
+    // Gets the gain, in cents, as set.
+    uint32_t getBandwidth() const { return mBandwidth + 1; }
+
+    // Sets frequency value. Actual change will only take place upon commit().
+    // This value will be remembered even if the filter is in disabled() state.
+    // millihertz Frequency value in mHz.
+    void setFrequency(uint32_t millihertz);
+
+    // Gets the frequency, in mHz, as set.
+    uint32_t getFrequency() const { return mNominalFrequency; }
+
+    // Gets gain[dB]/2 points.
+    // Results in mHz, and are computed based on the nominal values set, not on
+    // possibly rounded or truncated actual values.
+    void getBandRange(uint32_t & low, uint32_t & high) const;
+
+    // Applies all parameter changes done to this point in time.
+    // If the filter is disabled, the new parameters will take place when it is
+    // enabled again. Does not introduce artifacts, unless immediate is set.
+    // immediate    Whether to apply change abruptly (ignored if filter is
+    // disabled).
+   void commit(bool immediate = false);
+
+    // Process a buffer of input data. The input and output should contain
+    // frameCount * nChannels interlaced samples. Processing can be done
+    // in-place, by passing the same buffer as both arguments.
+    // in           Input buffer.
+    // out          Output buffer.
+    // frameCount   Number of frames to produce.
+    void process(const audio_sample_t in[], audio_sample_t out[],
+                 int frameCount) { mBiquad.process(in, out, frameCount); }
+
+    // Enables the filter, so it would start processing input. Does not
+    // introduce artifacts, unless immediate is set.
+    // immediate    Whether to apply change abruptly.
+    void enable(bool immediate = false) { mBiquad.enable(immediate); }
+
+    // Disabled (bypasses) the filter. Does not introduce artifacts, unless
+    // immediate is set.
+    // immediate    Whether to apply change abruptly.
+    void disable(bool immediate = false) { mBiquad.disable(immediate); }
+
+private:
+    // Precision for the mFrequency member.
+    static const int FREQ_PRECISION_BITS = 26;
+    // Precision for the mGain member.
+    static const int GAIN_PRECISION_BITS = 10;
+    // Precision for the mBandwidth member.
+    static const int BANDWIDTH_PRECISION_BITS = 10;
+
+    // Nyquist, in mHz.
+    uint32_t mNiquistFreq;
+    // Fractional index into the gain dimension of the coef table in
+    // GAIN_PRECISION_BITS precision.
+    int32_t mGain;
+    // Fractional index into the bandwidth dimension of the coef table in
+    // BANDWIDTH_PRECISION_BITS precision.
+    uint32_t mBandwidth;
+    // Fractional index into the frequency dimension of the coef table in
+    // FREQ_PRECISION_BITS precision.
+    uint32_t mFrequency;
+    // Nominal value of frequency, as set.
+    uint32_t mNominalFrequency;
+    // 1/Nyquist[mHz], in 42-bit precision (very small).
+    // Used for scaling the frequency.
+    uint32_t mFrequencyFactor;
+
+    // A biquad filter, used for the actual processing.
+    AudioBiquadFilter mBiquad;
+    // A coefficient interpolator, used for mapping the high level parameters to
+    // the low-level biquad coefficients.
+    static AudioCoefInterpolator mCoefInterp;
+};
+
+}
+
+#endif // ANDROID_AUDIO_PEAKING_FILTER_H
diff --git a/media/libeffects/AudioPeakingFilterCoef.inl b/media/libeffects/AudioPeakingFilterCoef.inl
new file mode 100644
index 0000000..374c6e1
--- /dev/null
+++ b/media/libeffects/AudioPeakingFilterCoef.inl
@@ -0,0 +1,2700 @@
+16769751,
+-33538871,
+16769751,
+33538871,
+-16762286,
+11468083,
+-22935566,
+11467915,
+22935566,
+-6158781,
+8532673,
+-17064763,
+8532412,
+17064763,
+-287869,
+6567366,
+-13134160,
+6567042,
+13134160,
+3642808,
+16773075,
+-33545518,
+16773075,
+33545518,
+-16768934,
+13349658,
+-26698459,
+13349304,
+26698459,
+-9921746,
+10923581,
+-21846147,
+10922977,
+21846147,
+-5069342,
+9009390,
+-18017641,
+9008590,
+18017641,
+-1240764,
+16774919,
+-33549207,
+16774919,
+33549207,
+-16772622,
+14686150,
+-29371047,
+14685450,
+29371047,
+-12594384,
+12933736,
+-25865697,
+12932448,
+25865697,
+-9088968,
+11350364,
+-22698482,
+11348545,
+22698482,
+-5921693,
+16775943,
+-33551252,
+16775941,
+33551252,
+-16774668,
+15549746,
+-31097569,
+15548408,
+31097569,
+-14320938,
+14404163,
+-28805197,
+14401577,
+28805197,
+-12028524,
+13261978,
+-26519626,
+13258147,
+26519626,
+-9742909,
+16776511,
+-33552387,
+16776508,
+33552387,
+-16775803,
+16074349,
+-32145600,
+16071856,
+32145600,
+-15368989,
+15374244,
+-30742933,
+15369268,
+30742933,
+-13966296,
+14629431,
+-29250695,
+14621814,
+29250695,
+-12474030,
+16776826,
+-33553017,
+16776822,
+33553017,
+-16776432,
+16381548,
+-32757900,
+16376968,
+32757900,
+-15981300,
+15972161,
+-31934402,
+15962842,
+31934402,
+-15157787,
+15518882,
+-31022614,
+15504316,
+31022614,
+-14245982,
+16777003,
+-33553366,
+16776995,
+33553366,
+-16776781,
+16558315,
+-33107660,
+16549969,
+33107660,
+-16331067,
+16326848,
+-32635910,
+16309677,
+32635910,
+-15859308,
+16064456,
+-32101133,
+16037281,
+32101133,
+-15324521,
+16777103,
+-33553559,
+16777088,
+33553559,
+-16776975,
+16660325,
+-33304885,
+16645187,
+33304885,
+-16528296,
+16535200,
+-33038436,
+16503858,
+33038436,
+-16261842,
+16391425,
+-32732273,
+16341464,
+32732273,
+-15955673,
+16777162,
+-33553667,
+16777136,
+33553667,
+-16777082,
+16721651,
+-33415288,
+16694267,
+33415288,
+-16638701,
+16661761,
+-33265997,
+16604862,
+33265997,
+-16489407,
+16592417,
+-33093137,
+16501343,
+33093137,
+-16316544,
+16777203,
+-33553726,
+16777155,
+33553726,
+-16777142,
+16763466,
+-33476836,
+16714001,
+33476836,
+-16700251,
+16748588,
+-33393565,
+16645605,
+33393565,
+-16616978,
+16731288,
+-33296733,
+16566071,
+33296733,
+-16520144,
+16777238,
+-33553759,
+16777152,
+33553759,
+-16777175,
+16800489,
+-33511071,
+16711212,
+33511071,
+-16734485,
+16825723,
+-33464740,
+16639647,
+33464740,
+-16688154,
+16855137,
+-33410736,
+16556228,
+33410736,
+-16634149,
+16777282,
+-33553778,
+16777127,
+33553778,
+-16777193,
+16845889,
+-33530088,
+16684830,
+33530088,
+-16753503,
+16920437,
+-33504347,
+16584541,
+33504347,
+-16727762,
+17007449,
+-33474302,
+16467484,
+33474302,
+-16697716,
+16777349,
+-33553788,
+16777070,
+33553788,
+-16777203,
+16915880,
+-33540645,
+16625396,
+33540645,
+-16764060,
+17066504,
+-33526354,
+16460481,
+33526354,
+-16749769,
+17242444,
+-33509662,
+16267849,
+33509662,
+-16733077,
+16777464,
+-33553793,
+16776961,
+33553793,
+-16777209,
+17035487,
+-33546503,
+16511647,
+33546503,
+-16769918,
+17316137,
+-33538572,
+16223067,
+33538572,
+-16761988,
+17644089,
+-33529306,
+15885848,
+33529306,
+-16752721,
+16777668,
+-33553796,
+16776760,
+33553796,
+-16777212,
+17247484,
+-33549752,
+16302900,
+33549752,
+-16773168,
+17758603,
+-33545353,
+15787381,
+33545353,
+-16768768,
+18356007,
+-33540211,
+15184835,
+33540211,
+-16763626,
+16762293,
+-33522062,
+16762293,
+33522062,
+-16747370,
+8711405,
+-17421242,
+8711149,
+17421242,
+-645338,
+5721250,
+-11441288,
+5720900,
+11441288,
+5335066,
+4082836,
+-8164655,
+4082434,
+8164655,
+8611946,
+16768936,
+-33535347,
+16768936,
+33535347,
+-16760656,
+11085056,
+-22167856,
+11084469,
+22167856,
+-5392309,
+8098223,
+-16194333,
+8097329,
+16194333,
+581664,
+6158323,
+-12314623,
+6157228,
+12314623,
+4461665,
+16772623,
+-33542719,
+16772622,
+33542719,
+-16768029,
+13058634,
+-26114055,
+13057388,
+26114055,
+-9338806,
+10523211,
+-21042742,
+10521116,
+21042742,
+-4267110,
+8576560,
+-17149081,
+8573812,
+17149081,
+-373156,
+16774670,
+-33546810,
+16774667,
+33546810,
+-16772120,
+14489725,
+-28974776,
+14487233,
+28974776,
+-12199742,
+12619509,
+-25232587,
+12614979,
+25232587,
+-8457271,
+10965151,
+-21922319,
+10958818,
+21922319,
+-5146753,
+16775805,
+-33549079,
+16775800,
+33549079,
+-16774390,
+15428102,
+-30849095,
+15423317,
+30849095,
+-14074202,
+14188157,
+-28364996,
+14178975,
+28364996,
+-11589916,
+12969900,
+-25924346,
+12956398,
+25924346,
+-9149082,
+16776437,
+-33550338,
+16776428,
+33550338,
+-16775648,
+16004216,
+-31997074,
+15995268,
+31997074,
+-15222267,
+15241233,
+-30462393,
+15223454,
+30462393,
+-13687471,
+14437070,
+-28844880,
+14409982,
+28844880,
+-12069836,
+16776789,
+-33551036,
+16776773,
+33551036,
+-16776347,
+16345158,
+-32671383,
+16328685,
+32671383,
+-15896627,
+15900462,
+-31765104,
+15867034,
+31765104,
+-14990280,
+15410846,
+-30767279,
+15358750,
+30767279,
+-13992380,
+16776990,
+-33551423,
+16776960,
+33551423,
+-16776734,
+16545156,
+-33057769,
+16515103,
+33057769,
+-16283043,
+16300504,
+-32536823,
+16238769,
+32536823,
+-15762058,
+16024071,
+-31948201,
+15926537,
+31948201,
+-15173391,
+16777109,
+-33551638,
+16777056,
+33551638,
+-16776949,
+16666542,
+-33276035,
+16611999,
+33276035,
+-16501325,
+16548270,
+-32981225,
+16435439,
+32981225,
+-16206493,
+16412621,
+-32643103,
+16232940,
+32643103,
+-15868346,
+16777189,
+-33551757,
+16777094,
+33551757,
+-16777068,
+16749778,
+-33398338,
+16651075,
+33398338,
+-16623637,
+16720233,
+-33232976,
+16515245,
+33232976,
+-16458262,
+16686059,
+-33041706,
+16358135,
+33041706,
+-16266978,
+16777261,
+-33551823,
+16777089,
+33551823,
+-16777134,
+16823703,
+-33466559,
+16645376,
+33466559,
+-16691863,
+16873974,
+-33374267,
+16502806,
+33374267,
+-16599564,
+16932398,
+-33267006,
+16337114,
+33267006,
+-16492295,
+16777348,
+-33551860,
+16777038,
+33551860,
+-16777170,
+16914465,
+-33504517,
+16592574,
+33504517,
+-16729824,
+17063236,
+-33453150,
+16392432,
+33453150,
+-16678453,
+17236595,
+-33393293,
+16159213,
+33393293,
+-16618592,
+16777483,
+-33551880,
+16776924,
+33551880,
+-16777191,
+17054436,
+-33525606,
+16473695,
+33525606,
+-16750914,
+17355321,
+-33497061,
+16144262,
+33497061,
+-16722367,
+17706453,
+-33463749,
+15759816,
+33463749,
+-16689053,
+16777713,
+-33551891,
+16776705,
+33551891,
+-16777202,
+17293646,
+-33537314,
+16246194,
+33537314,
+-16762623,
+17854571,
+-33521465,
+15669419,
+33521465,
+-16746773,
+18509706,
+-33502954,
+14995772,
+33502954,
+-16728261,
+16778120,
+-33551898,
+16776304,
+33551898,
+-16777208,
+17717639,
+-33543811,
+15828698,
+33543811,
+-16769121,
+18739501,
+-33535016,
+14798040,
+33535016,
+-16760325,
+19933534,
+-33524738,
+13593729,
+33524738,
+-16750047,
+16747397,
+-33484705,
+16747396,
+33484705,
+-16717577,
+5883112,
+-11762335,
+5882767,
+11762335,
+5011337,
+3448701,
+-6894903,
+3448279,
+6894903,
+9880236,
+2324286,
+-4646714,
+2323828,
+4646714,
+12129102,
+16760665,
+-33511232,
+16760663,
+33511232,
+-16744112,
+8276984,
+-16548106,
+8276108,
+16548106,
+224124,
+5337400,
+-10670406,
+5336221,
+10670406,
+6103596,
+3771525,
+-7539439,
+3770185,
+7539439,
+9235506,
+16768033,
+-33525963,
+16768030,
+33525963,
+-16758848,
+10689564,
+-21370649,
+10687524,
+21370649,
+-4599872,
+7666068,
+-15324466,
+7663015,
+15324466,
+1448133,
+5761266,
+-11515371,
+5757575,
+11515371,
+5258376,
+16772124,
+-33534139,
+16772118,
+33534139,
+-16767026,
+12751423,
+-25490780,
+12747036,
+25490780,
+-8721243,
+10113942,
+-20214533,
+10106682,
+20214533,
+-3443407,
+8145025,
+-16275741,
+8135620,
+16275741,
+496571,
+16774395,
+-33538675,
+16774385,
+33538675,
+-16771564,
+14280137,
+-28542819,
+14271281,
+28542819,
+-11774202,
+12292391,
+-24561476,
+12276485,
+24561476,
+-7791660,
+10572949,
+-21117532,
+10550945,
+21117532,
+-4346678,
+16775657,
+-33541192,
+16775639,
+33541192,
+-16774081,
+15299683,
+-30573051,
+15282579,
+30573051,
+-13805046,
+13964251,
+-27887539,
+13931690,
+27887539,
+-11118724,
+12672686,
+-25290241,
+12625174,
+25290241,
+-8520644,
+16776363,
+-33542588,
+16776330,
+33542588,
+-16775477,
+15935196,
+-31828699,
+15903092,
+31828699,
+-15061072,
+15112356,
+-30152153,
+15048881,
+30152153,
+-13384021,
+14253857,
+-28402950,
+14157649,
+28402950,
+-11634291,
+16776763,
+-33543362,
+16776704,
+33543362,
+-16776252,
+16319830,
+-32570615,
+16260598,
+32570615,
+-15803212,
+15851783,
+-31574208,
+15731938,
+31574208,
+-14806505,
+15339614,
+-30483871,
+15153441,
+30483871,
+-13715838,
+16777001,
+-33543791,
+16776896,
+33543791,
+-16776681,
+16557673,
+-32997208,
+16449476,
+32997208,
+-16229933,
+16326977,
+-32422299,
+16105089,
+32422299,
+-15654851,
+16067244,
+-31775024,
+15717353,
+31775024,
+-15007381,
+16777163,
+-33544029,
+16776972,
+33544029,
+-16776919,
+16722590,
+-33238660,
+16526083,
+33238660,
+-16471458,
+16664322,
+-32912610,
+16258203,
+32912610,
+-16145310,
+16597629,
+-32539419,
+15951593,
+32539419,
+-15772007,
+16777306,
+-33544162,
+16776962,
+33544162,
+-16777051,
+16869955,
+-33374105,
+16514205,
+33374105,
+-16606944,
+16969714,
+-33190996,
+16231282,
+33190996,
+-16423780,
+17084972,
+-32979442,
+15904406,
+32979442,
+-16212162,
+16777480,
+-33544235,
+16776860,
+33544235,
+-16777125,
+17051328,
+-33449703,
+16408452,
+33449703,
+-16682565,
+17347583,
+-33347437,
+16009901,
+33347437,
+-16580267,
+17691668,
+-33228659,
+15547002,
+33228659,
+-16461454,
+16777750,
+-33544275,
+16776632,
+33544275,
+-16777165,
+17331222,
+-33491780,
+16170648,
+33491780,
+-16724654,
+17931550,
+-33434840,
+15513363,
+33434840,
+-16667697,
+18630855,
+-33368512,
+14747710,
+33368512,
+-16601349,
+16778210,
+-33544298,
+16776194,
+33544298,
+-16777188,
+17809628,
+-33515162,
+15715631,
+33515162,
+-16748043,
+18929991,
+-33483514,
+14563611,
+33483514,
+-16716385,
+20237212,
+-33446587,
+13219451,
+33446587,
+-16679448,
+16779025,
+-33544310,
+16775392,
+33544310,
+-16777200,
+18657612,
+-33528145,
+14880634,
+33528145,
+-16761030,
+20699844,
+-33510571,
+12820822,
+33510571,
+-16743451,
+23084863,
+-33490047,
+10415274,
+33490047,
+-16722921,
+16717684,
+-33395091,
+16717682,
+33395091,
+-16658149,
+3567009,
+-7125006,
+3566590,
+7125006,
+9643617,
+1921926,
+-3838751,
+1921455,
+3838751,
+12933835,
+1248662,
+-2493824,
+1248170,
+2493824,
+14280384,
+16744147,
+-33447952,
+16744143,
+33447952,
+-16711074,
+5493785,
+-10973174,
+5492622,
+10973174,
+5790808,
+3173694,
+-6338342,
+3172292,
+6338342,
+10431230,
+2124754,
+-4242881,
+2123244,
+4242881,
+12529218,
+16758861,
+-33477342,
+16758855,
+33477342,
+-16740500,
+7843885,
+-15665884,
+7840892,
+15665884,
+1092439,
+4968649,
+-9921376,
+4964692,
+9921376,
+6843875,
+3478437,
+-6944043,
+3473981,
+6944043,
+9824798,
+16767035,
+-33493665,
+16767024,
+33493665,
+-16756842,
+10284421,
+-20536999,
+10277346,
+20536999,
+-3784550,
+7240254,
+-14452686,
+7229862,
+14452686,
+2307100,
+5379798,
+-10734231,
+5367379,
+10734231,
+6030039,
+16771575,
+-33502725,
+16771555,
+33502725,
+-16765913,
+12431046,
+-24816749,
+12415632,
+24816749,
+-8069462,
+9702049,
+-19355664,
+9676957,
+19355664,
+-2601790,
+7722611,
+-15394544,
+7690499,
+15394544,
+1364106,
+16774099,
+-33507752,
+16774063,
+33507752,
+-16770946,
+14062583,
+-28059903,
+14031160,
+28059903,
+-11316527,
+11962999,
+-23841519,
+11907273,
+23841519,
+-7093056,
+10188929,
+-20277142,
+10112667,
+20277142,
+-3524380,
+16775510,
+-33510541,
+16775445,
+33510541,
+-16773738,
+15175102,
+-30252637,
+15114019,
+30252637,
+-13511905,
+13753207,
+-27358123,
+13637911,
+27358123,
+-10613901,
+12400971,
+-24605416,
+12234119,
+24605416,
+-7857874,
+16776310,
+-33512088,
+16776193,
+33512088,
+-16775287,
+15888242,
+-31623221,
+15773117,
+31623221,
+-14884143,
+15028972,
+-29795608,
+14802570,
+29795608,
+-13054325,
+14142237,
+-27909578,
+13801000,
+27909578,
+-11166021,
+16776787,
+-33512946,
+16776575,
+33512946,
+-16776146,
+16345172,
+-32438302,
+16132251,
+32438302,
+-15700207,
+15905856,
+-31344484,
+15476429,
+31344484,
+-14605069,
+15428324,
+-30155514,
+14763558,
+30155514,
+-13414665,
+16777110,
+-33513422,
+16776729,
+33513422,
+-16776623,
+16668950,
+-32908744,
+16279482,
+32908744,
+-16171216,
+16555594,
+-32275015,
+15758344,
+32275015,
+-15536722,
+16428465,
+-31564284,
+15173886,
+31564284,
+-14825134,
+16777395,
+-33513686,
+16776708,
+33513686,
+-16776887,
+16961758,
+-33175594,
+16253845,
+33175594,
+-16438387,
+17158212,
+-32815329,
+15696692,
+32815329,
+-16077688,
+17382578,
+-32403880,
+15060381,
+32403880,
+-15665743,
+16777745,
+-33513832,
+16776505,
+33513832,
+-16777033,
+17323903,
+-33325470,
+16041757,
+33325470,
+-16588444,
+17911332,
+-33122874,
+15251488,
+33122874,
+-16385604,
+18589203,
+-32889086,
+14339546,
+32889086,
+-16151534,
+16778283,
+-33513913,
+16776048,
+33513913,
+-16777115,
+17883505,
+-33409180,
+15565966,
+33409180,
+-16672255,
+19078451,
+-33295944,
+14257648,
+33295944,
+-16558883,
+20465440,
+-33164510,
+12739067,
+33164510,
+-16427290,
+16779203,
+-33513958,
+16775173,
+33513958,
+-16777160,
+18840265,
+-33455789,
+14655871,
+33455789,
+-16718921,
+21075121,
+-33392715,
+12357866,
+33392715,
+-16655771,
+23677621,
+-33319266,
+9681828,
+33319266,
+-16582233,
+16780834,
+-33513983,
+16773567,
+33513983,
+-16777185,
+20536227,
+-33481696,
+12985848,
+33481696,
+-16744859,
+24614855,
+-33446630,
+8872112,
+33446630,
+-16709751,
+29373075,
+-33405721,
+4072934,
+33405721,
+-16668793,
+16658572,
+-33156710,
+16658568,
+33156710,
+-16539925,
+1995694,
+-3971702,
+1995225,
+3971702,
+12786296,
+1019334,
+-2028355,
+1018835,
+2028355,
+14739047,
+648397,
+-1290041,
+647886,
+1290041,
+15480933,
+16711208,
+-33261470,
+16711201,
+33261470,
+-16645192,
+3284873,
+-6536727,
+3283483,
+6536727,
+10208860,
+1752746,
+-3487071,
+1751198,
+3487071,
+13273272,
+1134254,
+-2255981,
+1132642,
+2255981,
+14510319,
+16740546,
+-33319859,
+16740534,
+33319859,
+-16703864,
+5119019,
+-10184853,
+5115113,
+10184853,
+6543083,
+2916766,
+-5800820,
+2912122,
+5800820,
+10948329,
+1940950,
+-3858260,
+1935979,
+3858260,
+12900288,
+16756866,
+-33352332,
+16756844,
+33352332,
+-16736493,
+7416141,
+-14750709,
+7405941,
+14750709,
+1955134,
+4618132,
+-9178604,
+4604884,
+9178604,
+7554200,
+3205731,
+-6365873,
+3190944,
+6365873,
+10380541,
+16765937,
+-33370369,
+16765897,
+33370369,
+-16754618,
+9875714,
+-19631961,
+9851238,
+19631961,
+-2949736,
+6828874,
+-13556870,
+6793592,
+13556870,
+3154751,
+5021920,
+-9953987,
+4980230,
+9953987,
+6775066,
+16770983,
+-33380381,
+16770911,
+33380381,
+-16764679,
+12107731,
+-24045066,
+12053679,
+24045066,
+-7384194,
+9304697,
+-18433704,
+9218200,
+18433704,
+-1745681,
+7330173,
+-14480925,
+7220819,
+14480925,
+2226224,
+16773804,
+-33385937,
+16773674,
+33385937,
+-16770261,
+13857067,
+-27469883,
+13745731,
+27469883,
+-10825583,
+11667230,
+-23028209,
+11472403,
+23028209,
+-6362417,
+9861509,
+-19365642,
+9597835,
+19365642,
+-2682128,
+16775405,
+-33389019,
+16775170,
+33389019,
+-16773358,
+15094166,
+-29826057,
+14876207,
+29826057,
+-13193157,
+13629575,
+-26722225,
+13221948,
+26722225,
+-10074307,
+12261304,
+-23822520,
+11676482,
+23822520,
+-7160571,
+16776358,
+-33390729,
+16775935,
+33390729,
+-16775076,
+15939973,
+-31315809,
+15527360,
+31315809,
+-14690117,
+15140254,
+-29331850,
+14333520,
+29331850,
+-12696558,
+14324552,
+-27308240,
+13115821,
+27308240,
+-10663157,
+16777004,
+-33391677,
+16776241,
+33391677,
+-16776029,
+16564519,
+-32208051,
+15799374,
+32208051,
+-15586676,
+16349720,
+-31011538,
+14811870,
+31011538,
+-14384374,
+16117884,
+-29720119,
+13746038,
+29720119,
+-13086705,
+16777574,
+-33392203,
+16776199,
+33392203,
+-16776558,
+17142623,
+-32725183,
+15740903,
+32725183,
+-16106310,
+17523746,
+-32028793,
+14660021,
+32028793,
+-15406551,
+17949452,
+-31250941,
+13452699,
+31250941,
+-14624935,
+16778273,
+-33392495,
+16775794,
+33392495,
+-16776851,
+17864511,
+-33019221,
+15314476,
+33019221,
+-16401771,
+19019582,
+-32622294,
+13760557,
+32622294,
+-16002923,
+20335886,
+-32169961,
+11989731,
+32169961,
+-15548401,
+16779350,
+-33392657,
+16774879,
+33392657,
+-16777014,
+18982972,
+-33184592,
+14362186,
+33184592,
+-16567942,
+21350554,
+-32961046,
+11769976,
+32961046,
+-16343314,
+24079688,
+-32703362,
+8781912,
+32703362,
+-16084383,
+16781190,
+-33392746,
+16773130,
+33392746,
+-16777104,
+20896303,
+-33277026,
+12541737,
+33277026,
+-16660824,
+25343199,
+-33151977,
+7969185,
+33151977,
+-16535169,
+30502384,
+-33006896,
+2664219,
+33006896,
+-16389387,
+16784451,
+-33392796,
+16769918,
+33392796,
+-16777154,
+24288258,
+-33328516,
+9201520,
+33328516,
+-16712562,
+32423187,
+-33258828,
+996567,
+33258828,
+-16642538,
+41895320,
+-33177686,
+-8557101,
+33177686,
+-16561003,
+16541595,
+-32447498,
+16541587,
+32447498,
+-16305966,
+1060925,
+-2080590,
+1060426,
+2080590,
+14655865,
+525478,
+-1030256,
+524962,
+1030256,
+15726776,
+330321,
+-647437,
+329800,
+647437,
+16117095,
+16645717,
+-32651734,
+16645703,
+32651734,
+-16514203,
+1820789,
+-3570095,
+1819248,
+3570095,
+13137179,
+924575,
+-1812018,
+922942,
+1812018,
+14929699,
+586684,
+-1149186,
+585016,
+1149186,
+15605516,
+16704036,
+-32766121,
+16704011,
+32766121,
+-16630831,
+3020875,
+-5921138,
+3016266,
+5921138,
+10740076,
+1597573,
+-3128764,
+1592487,
+3128764,
+13587156,
+1030124,
+-2015487,
+1024848,
+2015487,
+14722244,
+16736565,
+-32829909,
+16736521,
+32829909,
+-16695869,
+4762013,
+-9328185,
+4748922,
+9328185,
+7266281,
+2679566,
+-5241091,
+2664205,
+5241091,
+11433446,
+1773912,
+-3463620,
+1757564,
+3463620,
+13245740,
+16754673,
+-32865395,
+16754593,
+32865395,
+-16732050,
+7001772,
+-13700468,
+6967104,
+13700468,
+2808340,
+4293363,
+-8378312,
+4249089,
+8378312,
+8234764,
+2960061,
+-5758307,
+2911058,
+5758307,
+10906097,
+16764756,
+-32885110,
+16764611,
+32885110,
+-16752151,
+9480188,
+-18513215,
+9395722,
+18513215,
+-2098694,
+6453693,
+-12542171,
+6334194,
+12542171,
+3989330,
+4710641,
+-9103264,
+4570966,
+9103264,
+7495609,
+16770393,
+-32896054,
+16770133,
+32896054,
+-16763310,
+11816276,
+-22992949,
+11627131,
+22992949,
+-6666191,
+8975726,
+-17314789,
+8678280,
+17314789,
+-876790,
+7032408,
+-13430164,
+6660869,
+13430164,
+3083940,
+16773593,
+-32902127,
+16773124,
+32902127,
+-16769502,
+13735615,
+-26557052,
+13341720,
+26557052,
+-10300120,
+11528165,
+-21946606,
+10848400,
+21946606,
+-5599349,
+9752563,
+-18238110,
+8842853,
+18238110,
+-1818200,
+16775499,
+-32905496,
+16774654,
+32905496,
+-16772937,
+15200588,
+-29054957,
+14423589,
+29054957,
+-12846961,
+13857004,
+-25769995,
+12417855,
+25769995,
+-9497643,
+12624453,
+-22756500,
+10577873,
+22756500,
+-6425111,
+16776792,
+-32907365,
+16775267,
+32907365,
+-16774843,
+16366344,
+-30654089,
+14888294,
+30654089,
+-14477422,
+15978753,
+-28526295,
+13106406,
+28526295,
+-12307942,
+15588057,
+-26381456,
+11310242,
+26381456,
+-10121083,
+16777933,
+-32908402,
+16775183,
+32908402,
+-16775900,
+17493802,
+-31619287,
+14744943,
+31619287,
+-15461529,
+18212414,
+-30325234,
+12706927,
+30325234,
+-14142124,
+18982725,
+-28938081,
+10522286,
+28938081,
+-12727795,
+16779330,
+-32908977,
+16774372,
+32908977,
+-16776486,
+18928041,
+-32181280,
+13883707,
+32181280,
+-16034532,
+21163118,
+-31424334,
+10876855,
+31424334,
+-15262757,
+23650871,
+-30581814,
+7530076,
+30581814,
+-14403731,
+16781484,
+-32909296,
+16772543,
+32909296,
+-16776811,
+21161996,
+-32501674,
+11976424,
+32501674,
+-16361204,
+25812009,
+-32068975,
+6885234,
+32068975,
+-15920027,
+31103385,
+-31576594,
+1091831,
+31576594,
+-15418000,
+16785164,
+-32909473,
+16769043,
+32909473,
+-16776991,
+24988064,
+-32682139,
+8334356,
+32682139,
+-16545204,
+33795794,
+-32438043,
+-722252,
+32438043,
+-16296325,
+43946128,
+-32156738,
+-11159403,
+32156738,
+-16009510,
+16791687,
+-32909571,
+16762620,
+32909571,
+-16777091,
+31772521,
+-32783096,
+1652834,
+32783096,
+-16648139,
+47961229,
+-32646423,
+-14675225,
+32646423,
+-16508788,
+66751682,
+-32487785,
+-33627423,
+32487785,
+-16347043,
+16312500,
+-30141556,
+16312485,
+30141556,
+-15847769,
+547598,
+-1011354,
+547084,
+1011354,
+15682534,
+266448,
+-491849,
+265925,
+491849,
+16244843,
+166111,
+-306446,
+165584,
+306446,
+16445521,
+16516262,
+-30518049,
+16516236,
+30518049,
+-16255282,
+962487,
+-1776938,
+960857,
+1776938,
+14853872,
+474742,
+-875656,
+473062,
+875656,
+15829413,
+297520,
+-548176,
+295821,
+548176,
+16183875,
+16631492,
+-30730944,
+16631443,
+30730944,
+-16485719,
+1660146,
+-3062870,
+1655081,
+3062870,
+13461989,
+838172,
+-1543806,
+832831,
+1543806,
+15106213,
+530135,
+-974532,
+524691,
+974532,
+15722390,
+16696110,
+-30850307,
+16696022,
+30850307,
+-16614916,
+2776642,
+-5116472,
+2761387,
+5116472,
+11239187,
+1456845,
+-2676477,
+1440152,
+2676477,
+13880219,
+936151,
+-1713835,
+918891,
+1713835,
+14922174,
+16732191,
+-30916910,
+16732031,
+30916910,
+-16687006,
+4430219,
+-8145523,
+4386431,
+8145523,
+7960566,
+2467715,
+-4512857,
+2416966,
+4512857,
+11892535,
+1628113,
+-2958725,
+1574387,
+2958725,
+13574716,
+16752314,
+-30953973,
+16752025,
+30953973,
+-16727123,
+6622193,
+-12127616,
+6504644,
+12127616,
+3650379,
+4016541,
+-7285135,
+3868831,
+7285135,
+8891843,
+2762675,
+-4954883,
+2600451,
+4954883,
+11414089,
+16763575,
+-30974568,
+16763055,
+30974568,
+-16749415,
+9150431,
+-16639142,
+8859646,
+16639142,
+-1232861,
+6182181,
+-11049974,
+5778225,
+11049974,
+4816810,
+4518629,
+-7917532,
+4051247,
+7917532,
+8207341,
+16769973,
+-30986002,
+16769034,
+30986002,
+-16761791,
+11676269,
+-20964630,
+11015683,
+20964630,
+-5914736,
+8893418,
+-15489638,
+7872446,
+15489638,
+11352,
+7041383,
+-11845939,
+5780568,
+11845939,
+3955265,
+16773783,
+-30992347,
+16772092,
+30992347,
+-16768659,
+13953280,
+-24496534,
+12561577,
+24496534,
+-9737641,
+11970921,
+-19931025,
+9602265,
+19931025,
+-4795970,
+10413172,
+-16343421,
+7276820,
+16343421,
+-912775,
+16776368,
+-30995868,
+16773318,
+30995868,
+-16772470,
+16007790,
+-27021343,
+13239901,
+27021343,
+-12470475,
+15365527,
+-23700024,
+10287194,
+23700024,
+-8875505,
+14785947,
+-20702857,
+7622664,
+20702857,
+-5631395,
+16778650,
+-30997821,
+16773150,
+30997821,
+-16774583,
+18157056,
+-28659649,
+12863925,
+28659649,
+-14243764,
+19443806,
+-26476950,
+9214638,
+26476950,
+-11881228,
+20728681,
+-24297433,
+5570671,
+24297433,
+-9522136,
+16781445,
+-30998904,
+16771527,
+30998904,
+-16775756,
+20988060,
+-29656921,
+11112361,
+29656921,
+-15323204,
+25187743,
+-28317150,
+5462520,
+28317150,
+-13873047,
+29672124,
+-26886556,
+-570326,
+26886556,
+-12324582,
+16785752,
+-30999505,
+16767870,
+30999505,
+-16776406,
+25444300,
+-30240545,
+7287830,
+30240545,
+-15954914,
+34434980,
+-29452472,
+-2555854,
+29452472,
+-15101910,
+44441242,
+-28575379,
+-13511474,
+28575379,
+-14152552,
+16793112,
+-30999838,
+16760871,
+30999838,
+-16776767,
+33095506,
+-30574250,
+-2177,
+30574250,
+-16316113,
+50408034,
+-30122291,
+-17803902,
+30122291,
+-15826917,
+70153765,
+-29606811,
+-38107583,
+29606811,
+-15268966,
+16806158,
+-31000023,
+16748025,
+31000023,
+-16776967,
+46670155,
+-30762526,
+-13373037,
+30762526,
+-16519902,
+78789544,
+-30507092,
+-45768905,
+30507092,
+-16243423,
+115942747,
+-30211627,
+-83241918,
+30211627,
+-15923613,
+15872835,
+-22447559,
+15872807,
+22447559,
+-14968426,
+277754,
+-392434,
+277231,
+392434,
+16222231,
+133061,
+-187804,
+132533,
+187804,
+16511622,
+81763,
+-115256,
+81233,
+115256,
+16614220,
+16263303,
+-22999746,
+16263250,
+22999746,
+-15749337,
+494605,
+-698290,
+492927,
+698290,
+15789685,
+238776,
+-336475,
+237071,
+336475,
+16301369,
+147228,
+-207000,
+145514,
+207000,
+16484473,
+16488278,
+-23317877,
+16488181,
+23317877,
+-16199242,
+872378,
+-1229961,
+867049,
+1229961,
+15037788,
+426889,
+-599839,
+421411,
+599839,
+15928916,
+264840,
+-370629,
+259308,
+370629,
+16253068,
+16615785,
+-23498145,
+16615609,
+23498145,
+-16454179,
+1513757,
+-2129016,
+1497126,
+2129016,
+13766333,
+758261,
+-1060001,
+740806,
+1060001,
+15278149,
+475551,
+-659971,
+457789,
+659971,
+15843875,
+16687407,
+-23599332,
+16687089,
+23599332,
+-16597280,
+2557116,
+-3580647,
+2506684,
+3580647,
+11713416,
+1332007,
+-1845009,
+1277230,
+1845009,
+14167979,
+851272,
+-1163942,
+794791,
+1163942,
+15131154,
+16727486,
+-23655830,
+16726910,
+23655830,
+-16677180,
+4144749,
+-5758163,
+3998523,
+5758163,
+8633944,
+2297803,
+-3131069,
+2130198,
+3131069,
+12349216,
+1516025,
+-2019070,
+1339371,
+2019070,
+13921820,
+16749957,
+-23687282,
+16748918,
+23687282,
+-16721660,
+6342807,
+-8688774,
+5944975,
+8688774,
+4489434,
+3855722,
+-5104454,
+3363066,
+5104454,
+9558428,
+2678286,
+-3407564,
+2140738,
+3407564,
+11958192,
+16762736,
+-23704762,
+16760861,
+23704762,
+-16746380,
+9059948,
+-12106014,
+8060542,
+12106014,
+-343274,
+6231959,
+-7847669,
+4866322,
+7847669,
+5678936,
+4678573,
+-5508603,
+3111768,
+5508603,
+8986875,
+16770353,
+-23714468,
+16766970,
+23714468,
+-16760107,
+12100768,
+-15483427,
+9796104,
+15483427,
+-5119656,
+9659401,
+-11180047,
+6151573,
+11180047,
+966242,
+8066003,
+-8371376,
+3772911,
+8371376,
+4938302,
+16775520,
+-23719855,
+16769420,
+23719855,
+-16767725,
+15410647,
+-18317794,
+10494626,
+18317794,
+-9128056,
+14477439,
+-14624233,
+6204350,
+14624233,
+-3904573,
+13754127,
+-11761419,
+2879032,
+11761419,
+144058,
+16780083,
+-23722844,
+16769084,
+23722844,
+-16771951,
+19348947,
+-20387735,
+9483664,
+20387735,
+-12055395,
+21467038,
+-17637855,
+3476656,
+17637855,
+-8166478,
+23369301,
+-15168181,
+-1918253,
+15168181,
+-4673832,
+16785673,
+-23724501,
+16765839,
+23724501,
+-16774296,
+24868547,
+-21750945,
+5891934,
+21750945,
+-13983265,
+32392543,
+-19913847,
+-4230110,
+19913847,
+-11385217,
+39938641,
+-18071353,
+-14381888,
+18071353,
+-8779537,
+16794288,
+-23725421,
+16758525,
+23725421,
+-16775596,
+33739025,
+-22588636,
+-1793870,
+22588636,
+-15167940,
+50727371,
+-21448926,
+-20394010,
+21448926,
+-13556146,
+69082218,
+-20217540,
+-40490298,
+20217540,
+-11814703,
+16809008,
+-23725931,
+16744526,
+23725931,
+-16776318,
+49053594,
+-23081666,
+-16411189,
+23081666,
+-15865189,
+82824296,
+-22406908,
+-51136143,
+22406908,
+-14910937,
+121049915,
+-21643138,
+-90441895,
+21643138,
+-13830803,
+16835099,
+-23726214,
+16718835,
+23726214,
+-16776718,
+76261468,
+-23364505,
+-43219068,
+23364505,
+-16265184,
+140080603,
+-22976059,
+-107587549,
+22976059,
+-15715838,
+214348557,
+-22524014,
+-182494791,
+22524014,
+-15076550,
+15060971,
+0,
+15060916,
+0,
+-13344671,
+137715,
+0,
+137188,
+0,
+16502313,
+62494,
+0,
+61964,
+0,
+16652757,
+35499,
+0,
+34969,
+0,
+16706748,
+15779939,
+0,
+15779837,
+0,
+-14782560,
+247059,
+0,
+245356,
+0,
+16284801,
+112726,
+0,
+111009,
+0,
+16553481,
+64282,
+0,
+62560,
+0,
+16650375,
+16209124,
+0,
+16208934,
+0,
+-15640842,
+441483,
+0,
+436010,
+0,
+15899723,
+203401,
+0,
+197848,
+0,
+16375967,
+116794,
+0,
+111212,
+0,
+16549211,
+16457433,
+0,
+16457085,
+0,
+-16137302,
+783510,
+0,
+766083,
+0,
+15227623,
+367229,
+0,
+349349,
+0,
+16060638,
+213457,
+0,
+195409,
+0,
+16368349,
+16598556,
+0,
+16597923,
+0,
+-16419263,
+1374332,
+0,
+1319705,
+0,
+14083179,
+663683,
+0,
+606536,
+0,
+15506996,
+394077,
+0,
+335974,
+0,
+16047166,
+16678051,
+0,
+16676903,
+0,
+-16577738,
+2365010,
+0,
+2198183,
+0,
+12214023,
+1201479,
+0,
+1021183,
+0,
+14554554,
+739666,
+0,
+554025,
+0,
+15483525,
+16722789,
+0,
+16720714,
+0,
+-16666287,
+3953214,
+0,
+3464275,
+0,
+9359728,
+2180807,
+0,
+1624291,
+0,
+12972118,
+1423936,
+0,
+838564,
+0,
+14514716,
+16748282,
+0,
+16744535,
+0,
+-16715601,
+6353786,
+0,
+5003926,
+0,
+5419504,
+3973108,
+0,
+2314944,
+0,
+10489165,
+2837511,
+0,
+1032284,
+0,
+12907421,
+16763496,
+0,
+16756735,
+0,
+-16743015,
+9775978,
+0,
+6325602,
+0,
+675636,
+7269959,
+0,
+2584558,
+0,
+6922698,
+5878520,
+0,
+507384,
+0,
+10391313,
+16773826,
+0,
+16761629,
+0,
+-16758239,
+14526462,
+0,
+6429723,
+0,
+-4178968,
+13351086,
+0,
+1026117,
+0,
+2400012,
+12566846,
+0,
+-2579306,
+0,
+6789676,
+16782950,
+0,
+16760954,
+0,
+-16766688,
+21346996,
+0,
+3817102,
+0,
+-8386881,
+24548257,
+0,
+-5261828,
+0,
+-2509212,
+27136746,
+0,
+-12602908,
+0,
+2243378,
+16794129,
+0,
+16754463,
+0,
+-16771376,
+31942756,
+0,
+-3625011,
+0,
+-11540529,
+45048673,
+0,
+-21256423,
+0,
+-7015034,
+57646140,
+0,
+-38203817,
+0,
+-2665107,
+16811358,
+0,
+16739835,
+0,
+-16773977,
+49676415,
+0,
+-19243342,
+0,
+-13655857,
+82339984,
+0,
+-55005915,
+0,
+-10556853,
+118287496,
+0,
+-94363999,
+0,
+-7146281,
+16840799,
+0,
+16711837,
+0,
+-16775419,
+80691383,
+0,
+-48942961,
+0,
+-14971206,
+149858505,
+0,
+-120064524,
+0,
+-13016765,
+233520652,
+0,
+-206090695,
+0,
+-10652741,
+16892981,
+0,
+16660455,
+0,
+-16776220,
+136000868,
+0,
+-103472696,
+0,
+-15750956,
+271801469,
+0,
+-240442250,
+0,
+-14582003,
+446309601,
+0,
+-416452524,
+0,
+-13079862,
diff --git a/media/libeffects/AudioShelvingFilter.cpp b/media/libeffects/AudioShelvingFilter.cpp
new file mode 100644
index 0000000..b8650ba
--- /dev/null
+++ b/media/libeffects/AudioShelvingFilter.cpp
@@ -0,0 +1,109 @@
+/* /android/src/frameworks/base/libs/audioflinger/AudioShelvingFilter.cpp
+**
+** Copyright 2009, The Android Open Source Project
+**
+** Licensed under the Apache License, Version 2.0 (the "License");
+** you may not use this file except in compliance with the License.
+** You may obtain a copy of the License at
+**
+**     http://www.apache.org/licenses/LICENSE-2.0
+**
+** Unless required by applicable law or agreed to in writing, software
+** distributed under the License is distributed on an "AS IS" BASIS,
+** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+** See the License for the specific language governing permissions and
+** limitations under the License.
+*/
+
+#include "AudioShelvingFilter.h"
+#include "AudioCommon.h"
+#include "EffectsMath.h"
+
+#include <new>
+#include <assert.h>
+
+#define LIKELY( exp )       (__builtin_expect( (exp) != 0, true  ))
+#define UNLIKELY( exp )     (__builtin_expect( (exp) != 0, false ))
+
+namespace android {
+// Format of the coefficient tables:
+// kCoefTable[freq][gain][coef]
+// freq  - cutoff frequency, in octaves below Nyquist,from -10 to -6 in low
+//         shelf, -2 to 0 in high shelf.
+// gain  - gain, in millibel, starting at -9600, jumps of 1024, to 4736 millibel.
+// coef - 0: b0
+//        1: b1
+//        2: b2
+//        3: -a1
+//        4: -a2
+static const size_t kHiInDims[2] = {3, 15};
+static const audio_coef_t kHiCoefTable[3*15*5] = {
+#include "AudioHighShelfFilterCoef.inl"
+};
+static const size_t kLoInDims[2] = {5, 15};
+static const audio_coef_t kLoCoefTable[5*15*5] = {
+#include "AudioLowShelfFilterCoef.inl"
+};
+
+AudioCoefInterpolator AudioShelvingFilter::mHiCoefInterp(2, kHiInDims, 5, (const audio_coef_t*) kHiCoefTable);
+AudioCoefInterpolator AudioShelvingFilter::mLoCoefInterp(2, kLoInDims, 5, (const audio_coef_t*) kLoCoefTable);
+
+AudioShelvingFilter::AudioShelvingFilter(ShelfType type, int nChannels,
+                                         int sampleRate)
+        : mType(type),
+          mBiquad(nChannels, sampleRate)  {
+    configure(nChannels, sampleRate);
+}
+
+void AudioShelvingFilter::configure(int nChannels, int sampleRate) {
+    mNiquistFreq = sampleRate * 500;
+    mFrequencyFactor = ((1ull) << 42) / mNiquistFreq;
+    mBiquad.configure(nChannels, sampleRate);
+    setFrequency(mNominalFrequency);
+    commit(true);
+}
+
+void AudioShelvingFilter::reset() {
+    setGain(0);
+    setFrequency(mType == kLowShelf ? 0 : mNiquistFreq);
+    commit(true);
+}
+
+void AudioShelvingFilter::setFrequency(uint32_t millihertz) {
+    mNominalFrequency = millihertz;
+    if (UNLIKELY(millihertz > mNiquistFreq / 2)) {
+        millihertz = mNiquistFreq / 2;
+    }
+    uint32_t normFreq = static_cast<uint32_t>(
+            (static_cast<uint64_t>(millihertz) * mFrequencyFactor) >> 10);
+    uint32_t log2minFreq = (mType == kLowShelf ? (32-10) : (32-2));
+    if (LIKELY(normFreq > (1U << log2minFreq))) {
+        mFrequency = (Effects_log2(normFreq) - (log2minFreq << 15)) << (FREQ_PRECISION_BITS - 15);
+    } else {
+        mFrequency = 0;
+    }
+}
+
+void AudioShelvingFilter::setGain(int32_t millibel) {
+    mGain = millibel + 9600;
+}
+
+void AudioShelvingFilter::commit(bool immediate) {
+    audio_coef_t coefs[5];
+    int intCoord[2] = {
+        mFrequency >> FREQ_PRECISION_BITS,
+        mGain >> GAIN_PRECISION_BITS
+    };
+    uint32_t fracCoord[2] = {
+        mFrequency << (32 - FREQ_PRECISION_BITS),
+        static_cast<uint32_t>(mGain) << (32 - GAIN_PRECISION_BITS)
+    };
+    if (mType == kHighShelf) {
+        mHiCoefInterp.getCoef(intCoord, fracCoord, coefs);
+    } else {
+        mLoCoefInterp.getCoef(intCoord, fracCoord, coefs);
+    }
+    mBiquad.setCoefs(coefs, immediate);
+}
+
+}
diff --git a/media/libeffects/AudioShelvingFilter.h b/media/libeffects/AudioShelvingFilter.h
new file mode 100644
index 0000000..f72d793
--- /dev/null
+++ b/media/libeffects/AudioShelvingFilter.h
@@ -0,0 +1,146 @@
+/* /android/src/frameworks/base/libs/audioflinger/AudioShelvingFilter.h
+**
+** Copyright 2009, The Android Open Source Project
+**
+** Licensed under the Apache License, Version 2.0 (the "License");
+** you may not use this file except in compliance with the License.
+** You may obtain a copy of the License at
+**
+**     http://www.apache.org/licenses/LICENSE-2.0
+**
+** Unless required by applicable law or agreed to in writing, software
+** distributed under the License is distributed on an "AS IS" BASIS,
+** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+** See the License for the specific language governing permissions and
+** limitations under the License.
+*/
+
+#ifndef AUDIO_SHELVING_FILTER_H
+#define AUDIO_SHELVING_FILTER_H
+
+#include "AudioBiquadFilter.h"
+#include "AudioCoefInterpolator.h"
+
+namespace android {
+
+// A shelving audio filter, with unity skirt gain, and controllable cutoff
+// frequency and gain.
+// This filter is able to suppress introduce discontinuities and other artifacts
+// in the output, even when changing parameters abruptly.
+// Parameters can be set to any value - this class will make sure to clip them
+// when they are out of supported range.
+//
+// Implementation notes:
+// This class uses an underlying biquad filter whose parameters are determined
+// using a linear interpolation from a coefficient table, using a
+// AudioCoefInterpolator.
+// All is left for this class to do is mapping between high-level parameters to
+// fractional indices into the coefficient table.
+class AudioShelvingFilter {
+public:
+    // Shelf type
+    enum ShelfType {
+        kLowShelf,
+        kHighShelf
+    };
+
+    // Constructor. Resets the filter (see reset()).
+    // type       Type of the filter (high shelf or low shelf).
+    // nChannels  Number of input/output channels (interlaced).
+    // sampleRate The input/output sample rate, in Hz.
+    AudioShelvingFilter(ShelfType type, int nChannels, int sampleRate);
+
+    // Reconfiguration of the filter. Changes input/output format, but does not
+    // alter current parameter values. Clears delay lines.
+    // nChannels  Number of input/output channels (interlaced).
+    // sampleRate The input/output sample rate, in Hz.
+    void configure(int nChannels, int sampleRate);
+
+    // Resets the filter parameters to the following values:
+    // frequency: 0
+    // gain: 0
+    // It also disables the filter. Does not clear the delay lines.
+    void reset();
+
+    // Clears delay lines. Does not alter parameter values.
+    void clear() { mBiquad.clear(); }
+
+    // Sets gain value. Actual change will only take place upon commit().
+    // This value will be remembered even if the filter is in disabled() state.
+    // millibel Gain value in millibel (1/100 of decibel).
+    void setGain(int32_t millibel);
+
+    // Gets the gain, in millibel, as set.
+    int32_t getGain() const { return mGain - 9600; }
+
+    // Sets cutoff frequency value. Actual change will only take place upon
+    // commit().
+    // This value will be remembered even if the filter is in disabled() state.
+    // millihertz Frequency value in mHz.
+    void setFrequency(uint32_t millihertz);
+
+    // Gets the frequency, in mHz, as set.
+    uint32_t getFrequency() const { return mNominalFrequency; }
+
+    // Applies all parameter changes done to this point in time.
+    // If the filter is disabled, the new parameters will take place when it is
+    // enabled again. Does not introduce artifacts, unless immediate is set.
+    // immediate    Whether to apply change abruptly (ignored if filter is
+    // disabled).
+   void commit(bool immediate = false);
+
+    // Process a buffer of input data. The input and output should contain
+    // frameCount * nChannels interlaced samples. Processing can be done
+    // in-place, by passing the same buffer as both arguments.
+    // in   Input buffer.
+    // out  Output buffer.
+   // frameCount   Number of frames to produce.
+   void process(const audio_sample_t in[], audio_sample_t out[],
+                 int frameCount) { mBiquad.process(in, out, frameCount); }
+
+    // Enables the filter, so it would start processing input. Does not
+    // introduce artifacts, unless immediate is set.
+    // immediate    Whether to apply change abruptly.
+    void enable(bool immediate = false) { mBiquad.enable(immediate); }
+
+    // Disabled (bypasses) the filter. Does not introduce artifacts, unless
+    // immediate is set.
+    // immediate    Whether to apply change abruptly.
+    void disable(bool immediate = false) { mBiquad.disable(immediate); }
+
+private:
+    // Precision for the mFrequency member.
+    static const int FREQ_PRECISION_BITS = 26;
+    // Precision for the mGain member.
+    static const int GAIN_PRECISION_BITS = 10;
+
+    // Shelf type.
+    ShelfType mType;
+    // Nyquist, in mHz.
+    uint32_t mNiquistFreq;
+    // Fractional index into the gain dimension of the coef table in
+    // GAIN_PRECISION_BITS precision.
+    int32_t mGain;
+    // Fractional index into the frequency dimension of the coef table in
+    // FREQ_PRECISION_BITS precision.
+    uint32_t mFrequency;
+    // Nominal value of frequency, as set.
+    uint32_t mNominalFrequency;
+   // 1/Nyquist[mHz], in 42-bit precision (very small).
+    // Used for scaling the frequency.
+    uint32_t mFrequencyFactor;
+
+    // A biquad filter, used for the actual processing.
+    AudioBiquadFilter mBiquad;
+    // A coefficient interpolator, used for mapping the high level parameters to
+    // the low-level biquad coefficients. This one is used for the high shelf.
+    static AudioCoefInterpolator mHiCoefInterp;
+    // A coefficient interpolator, used for mapping the high level parameters to
+    // the low-level biquad coefficients. This one is used for the low shelf.
+    static AudioCoefInterpolator mLoCoefInterp;
+};
+
+}
+
+
+#endif // AUDIO_SHELVING_FILTER_H
diff --git a/media/libeffects/EffectEqualizer.cpp b/media/libeffects/EffectEqualizer.cpp
new file mode 100644
index 0000000..af0c411
--- /dev/null
+++ b/media/libeffects/EffectEqualizer.cpp
@@ -0,0 +1,653 @@
+/*
+ * Copyright (C) 2009 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#define LOG_TAG "Equalizer"
+#define ARRAY_SIZE(array) (sizeof array / sizeof array[0])
+//#define LOG_NDEBUG 0
+#include <cutils/log.h>
+#include <assert.h>
+#include <stdlib.h>
+#include <string.h>
+#include <new>
+#include "AudioEqualizer.h"
+#include "AudioBiquadFilter.h"
+#include "AudioFormatAdapter.h"
+#include <media/EffectEqualizerApi.h>
+
+// effect_interface_t interface implementation for equalizer effect
+extern "C" const struct effect_interface_s gEqualizerInterface;
+
+enum equalizer_state_e {
+    EQUALIZER_STATE_UNINITIALIZED,
+    EQUALIZER_STATE_INITIALIZED,
+    EQUALIZER_STATE_ACTIVE,
+};
+
+namespace android {
+namespace {
+
+// Google Graphic Equalizer UUID: e25aa840-543b-11df-98a5-0002a5d5c51b
+const effect_descriptor_t gEqualizerDescriptor = {
+        {0x0bed4300, 0xddd6, 0x11db, 0x8f34, {0x00, 0x02, 0xa5, 0xd5, 0xc5, 0x1b}}, // type
+        {0xe25aa840, 0x543b, 0x11df, 0x98a5, {0x00, 0x02, 0xa5, 0xd5, 0xc5, 0x1b}}, // uuid
+        EFFECT_API_VERSION,
+        (EFFECT_FLAG_TYPE_INSERT | EFFECT_FLAG_INSERT_LAST),
+        0, // TODO
+        1,
+        "Graphic Equalizer",
+        "Google Inc.",
+};
+
+/////////////////// BEGIN EQ PRESETS ///////////////////////////////////////////
+const int kNumBands = 5;
+const uint32_t gFreqs[kNumBands] =      { 50000, 125000, 900000, 3200000, 6300000 };
+const uint32_t gBandwidths[kNumBands] = { 0,     3600,   3600,   2400,    0       };
+
+const AudioEqualizer::BandConfig gBandsClassic[kNumBands] = {
+    { 300,  gFreqs[0], gBandwidths[0] },
+    { 400,  gFreqs[1], gBandwidths[1] },
+    { 0,    gFreqs[2], gBandwidths[2] },
+    { 200,  gFreqs[3], gBandwidths[3] },
+    { -300, gFreqs[4], gBandwidths[4] }
+};
+
+const AudioEqualizer::BandConfig gBandsJazz[kNumBands] = {
+    { -600, gFreqs[0], gBandwidths[0] },
+    { 200,  gFreqs[1], gBandwidths[1] },
+    { 400,  gFreqs[2], gBandwidths[2] },
+    { -400, gFreqs[3], gBandwidths[3] },
+    { -600, gFreqs[4], gBandwidths[4] }
+};
+
+const AudioEqualizer::BandConfig gBandsPop[kNumBands] = {
+    { 400,  gFreqs[0], gBandwidths[0] },
+    { -400, gFreqs[1], gBandwidths[1] },
+    { 300,  gFreqs[2], gBandwidths[2] },
+    { -400, gFreqs[3], gBandwidths[3] },
+    { 600,  gFreqs[4], gBandwidths[4] }
+};
+
+const AudioEqualizer::BandConfig gBandsRock[kNumBands] = {
+    { 700,  gFreqs[0], gBandwidths[0] },
+    { 400,  gFreqs[1], gBandwidths[1] },
+    { -400, gFreqs[2], gBandwidths[2] },
+    { 400,  gFreqs[3], gBandwidths[3] },
+    { 200,  gFreqs[4], gBandwidths[4] }
+};
+
+const AudioEqualizer::PresetConfig gEqualizerPresets[] = {
+    { "Classic", gBandsClassic },
+    { "Jazz",    gBandsJazz    },
+    { "Pop",     gBandsPop     },
+    { "Rock",    gBandsRock    }
+};
+
+/////////////////// END EQ PRESETS /////////////////////////////////////////////
+
+static const size_t kBufferSize = 32;
+
+typedef AudioFormatAdapter<AudioEqualizer, kBufferSize> FormatAdapter;
+
+struct EqualizerContext {
+    const struct effect_interface_s *itfe;
+    effect_config_t config;
+    FormatAdapter adapter;
+    AudioEqualizer * pEqualizer;
+    uint32_t state;
+};
+
+//--- local function prototypes
+
+int Equalizer_init(EqualizerContext *pContext);
+int Equalizer_configure(EqualizerContext *pContext, effect_config_t *pConfig);
+int Equalizer_getParameter(AudioEqualizer * pEqualizer, int32_t *pParam, size_t *pValueSize, void *pValue);
+int Equalizer_setParameter(AudioEqualizer * pEqualizer, int32_t *pParam, void *pValue);
+
+
+//
+//--- Effect Library Interface Implementation
+//
+
+extern "C" int EffectQueryNumberEffects(uint32_t *pNumEffects) {
+    *pNumEffects = 1;
+    return 0;
+} /* end EffectQueryNumberEffects */
+
+extern "C" int EffectQueryEffect(uint32_t index, effect_descriptor_t *pDescriptor) {
+    if (pDescriptor == NULL) {
+        return -EINVAL;
+    }
+    if (index > 0) {
+        return -EINVAL;
+    }
+    memcpy(pDescriptor, &gEqualizerDescriptor, sizeof(effect_descriptor_t));
+    return 0;
+} /* end EffectQueryNext */
+
+extern "C" int EffectCreate(effect_uuid_t *uuid,
+        int32_t sessionId,
+        int32_t ioId,
+        effect_interface_t *pInterface) {
+    int ret;
+    int i;
+
+    LOGV("EffectLibCreateEffect start");
+
+    if (pInterface == NULL || uuid == NULL) {
+        return -EINVAL;
+    }
+
+    if (memcmp(uuid, &gEqualizerDescriptor.uuid, sizeof(effect_uuid_t)) != 0) {
+        return -EINVAL;
+    }
+
+    EqualizerContext *pContext = new EqualizerContext;
+
+    pContext->itfe = &gEqualizerInterface;
+    pContext->pEqualizer = NULL;
+    pContext->state = EQUALIZER_STATE_UNINITIALIZED;
+
+    ret = Equalizer_init(pContext);
+    if (ret < 0) {
+        LOGW("EffectLibCreateEffect() init failed");
+        delete pContext;
+        return ret;
+    }
+
+    *pInterface = (effect_interface_t)pContext;
+    pContext->state = EQUALIZER_STATE_INITIALIZED;
+
+    LOGV("EffectLibCreateEffect %p, size %d", pContext, AudioEqualizer::GetInstanceSize(kNumBands)+sizeof(EqualizerContext));
+
+    return 0;
+
+} /* end EffectCreate */
+
+extern "C" int EffectRelease(effect_interface_t interface) {
+    EqualizerContext * pContext = (EqualizerContext *)interface;
+
+    LOGV("EffectLibReleaseEffect %p", interface);
+    if (pContext == NULL) {
+        return -EINVAL;
+    }
+
+    pContext->state = EQUALIZER_STATE_UNINITIALIZED;
+    pContext->pEqualizer->free();
+    delete pContext;
+
+    return 0;
+} /* end EffectRelease */
+
+
+//
+//--- local functions
+//
+
+#define CHECK_ARG(cond) {                     \
+    if (!(cond)) {                            \
+        LOGV("Invalid argument: "#cond);      \
+        return -EINVAL;                       \
+    }                                         \
+}
+
+//----------------------------------------------------------------------------
+// Equalizer_configure()
+//----------------------------------------------------------------------------
+// Purpose: Set input and output audio configuration.
+//
+// Inputs:
+//  pContext:   effect engine context
+//  pConfig:    pointer to effect_config_t structure holding input and output
+//      configuration parameters
+//
+// Outputs:
+//
+//----------------------------------------------------------------------------
+
+int Equalizer_configure(EqualizerContext *pContext, effect_config_t *pConfig)
+{
+    LOGV("Equalizer_configure start");
+
+    CHECK_ARG(pContext != NULL);
+    CHECK_ARG(pConfig != NULL);
+
+    CHECK_ARG(pConfig->inputCfg.samplingRate == pConfig->outputCfg.samplingRate);
+    CHECK_ARG(pConfig->inputCfg.channels == pConfig->outputCfg.channels);
+    CHECK_ARG(pConfig->inputCfg.format == pConfig->outputCfg.format);
+    CHECK_ARG((pConfig->inputCfg.channels == CHANNEL_MONO) || (pConfig->inputCfg.channels == CHANNEL_STEREO));
+    CHECK_ARG(pConfig->outputCfg.accessMode == EFFECT_BUFFER_ACCESS_WRITE
+              || pConfig->outputCfg.accessMode == EFFECT_BUFFER_ACCESS_ACCUMULATE);
+    CHECK_ARG(pConfig->inputCfg.format == SAMPLE_FORMAT_PCM_S7_24
+              || pConfig->inputCfg.format == SAMPLE_FORMAT_PCM_S15);
+
+    int channelCount;
+    if (pConfig->inputCfg.channels == CHANNEL_MONO) {
+        channelCount = 1;
+    } else {
+        channelCount = 2;
+    }
+    CHECK_ARG(channelCount <= AudioBiquadFilter::MAX_CHANNELS);
+
+    memcpy(&pContext->config, pConfig, sizeof(effect_config_t));
+
+    pContext->pEqualizer->configure(channelCount,
+                          pConfig->inputCfg.samplingRate);
+
+    pContext->adapter.configure(*pContext->pEqualizer, channelCount,
+                        pConfig->inputCfg.format,
+                        pConfig->outputCfg.accessMode);
+
+    return 0;
+}   // end Equalizer_configure
+
+
+//----------------------------------------------------------------------------
+// Equalizer_init()
+//----------------------------------------------------------------------------
+// Purpose: Initialize engine with default configuration and creates
+//     AudioEqualizer instance.
+//
+// Inputs:
+//  pContext:   effect engine context
+//
+// Outputs:
+//
+//----------------------------------------------------------------------------
+
+int Equalizer_init(EqualizerContext *pContext)
+{
+    int status;
+
+    LOGV("Equalizer_init start");
+
+    CHECK_ARG(pContext != NULL);
+
+    if (pContext->pEqualizer != NULL) {
+        pContext->pEqualizer->free();
+    }
+
+    pContext->config.inputCfg.accessMode = EFFECT_BUFFER_ACCESS_READ;
+    pContext->config.inputCfg.channels = CHANNEL_STEREO;
+    pContext->config.inputCfg.format = SAMPLE_FORMAT_PCM_S15;
+    pContext->config.inputCfg.samplingRate = 44100;
+    pContext->config.inputCfg.bufferProvider.getBuffer = NULL;
+    pContext->config.inputCfg.bufferProvider.releaseBuffer = NULL;
+    pContext->config.inputCfg.bufferProvider.cookie = NULL;
+    pContext->config.inputCfg.mask = EFFECT_CONFIG_ALL;
+    pContext->config.outputCfg.accessMode = EFFECT_BUFFER_ACCESS_ACCUMULATE;
+    pContext->config.outputCfg.channels = CHANNEL_STEREO;
+    pContext->config.outputCfg.format = SAMPLE_FORMAT_PCM_S15;
+    pContext->config.outputCfg.samplingRate = 44100;
+    pContext->config.outputCfg.bufferProvider.getBuffer = NULL;
+    pContext->config.outputCfg.bufferProvider.releaseBuffer = NULL;
+    pContext->config.outputCfg.bufferProvider.cookie = NULL;
+    pContext->config.outputCfg.mask = EFFECT_CONFIG_ALL;
+
+    pContext->pEqualizer = AudioEqualizer::CreateInstance(
+        NULL,
+        kNumBands,
+        AudioBiquadFilter::MAX_CHANNELS,
+        44100,
+        gEqualizerPresets,
+        ARRAY_SIZE(gEqualizerPresets));
+
+    for (int i = 0; i < kNumBands; ++i) {
+        pContext->pEqualizer->setFrequency(i, gFreqs[i]);
+        pContext->pEqualizer->setBandwidth(i, gBandwidths[i]);
+    }
+
+    pContext->pEqualizer->enable(true);
+
+    Equalizer_configure(pContext, &pContext->config);
+
+    return 0;
+}   // end Equalizer_init
+
+
+//----------------------------------------------------------------------------
+// Equalizer_getParameter()
+//----------------------------------------------------------------------------
+// Purpose:
+// Get a Equalizer parameter
+//
+// Inputs:
+//  pEqualizer       - handle to instance data
+//  pParam           - pointer to parameter
+//  pValue           - pointer to variable to hold retrieved value
+//  pValueSize       - pointer to value size: maximum size as input
+//
+// Outputs:
+//  *pValue updated with parameter value
+//  *pValueSize updated with actual value size
+//
+//
+// Side Effects:
+//
+//----------------------------------------------------------------------------
+
+int Equalizer_getParameter(AudioEqualizer * pEqualizer, int32_t *pParam, size_t *pValueSize, void *pValue)
+{
+    int status = 0;
+    int32_t param = *pParam++;
+    int32_t param2;
+    char *name;
+
+    switch (param) {
+    case EQ_PARAM_NUM_BANDS:
+    case EQ_PARAM_CUR_PRESET:
+    case EQ_PARAM_GET_NUM_OF_PRESETS:
+        if (*pValueSize < sizeof(int16_t)) {
+            return -EINVAL;
+        }
+        *pValueSize = sizeof(int16_t);
+        break;
+
+    case EQ_PARAM_LEVEL_RANGE:
+    case EQ_PARAM_BAND_FREQ_RANGE:
+        if (*pValueSize < 2 * sizeof(int32_t)) {
+            return -EINVAL;
+        }
+        *pValueSize = 2 * sizeof(int32_t);
+        break;
+    case EQ_PARAM_BAND_LEVEL:
+    case EQ_PARAM_GET_BAND:
+    case EQ_PARAM_CENTER_FREQ:
+        if (*pValueSize < sizeof(int32_t)) {
+            return -EINVAL;
+        }
+        *pValueSize = sizeof(int32_t);
+        break;
+
+    case EQ_PARAM_GET_PRESET_NAME:
+        break;
+
+    default:
+        return -EINVAL;
+    }
+
+    switch (param) {
+    case EQ_PARAM_NUM_BANDS:
+        *(int16_t *)pValue = kNumBands;
+        LOGV("Equalizer_getParameter() EQ_PARAM_NUM_BANDS %d", *(int16_t *)pValue);
+        break;
+
+    case EQ_PARAM_LEVEL_RANGE:
+        *(int32_t *)pValue = -9600;
+        *((int32_t *)pValue + 1) = 4800;
+        LOGV("Equalizer_getParameter() EQ_PARAM_LEVEL_RANGE min %d, max %d", *(int32_t *)pValue, *((int32_t *)pValue + 1));
+        break;
+
+    case EQ_PARAM_BAND_LEVEL:
+        param2 = *pParam;
+        if (param2 >= kNumBands) {
+            status = -EINVAL;
+            break;
+        }
+        *(int32_t *)pValue = pEqualizer->getGain(param2);
+        LOGV("Equalizer_getParameter() EQ_PARAM_BAND_LEVEL band %d, level %d", param2, *(int32_t *)pValue);
+        break;
+
+    case EQ_PARAM_CENTER_FREQ:
+        param2 = *pParam;
+        if (param2 >= kNumBands) {
+            status = -EINVAL;
+            break;
+        }
+        *(int32_t *)pValue = pEqualizer->getFrequency(param2);
+        LOGV("Equalizer_getParameter() EQ_PARAM_CENTER_FREQ band %d, frequency %d", param2, *(int32_t *)pValue);
+        break;
+
+    case EQ_PARAM_BAND_FREQ_RANGE:
+        param2 = *pParam;
+        if (param2 >= kNumBands) {
+            status = -EINVAL;
+            break;
+        }
+        pEqualizer->getBandRange(param2, *(uint32_t *)pValue, *((uint32_t *)pValue + 1));
+        LOGV("Equalizer_getParameter() EQ_PARAM_BAND_FREQ_RANGE band %d, min %d, max %d", param2, *(int32_t *)pValue, *((int32_t *)pValue + 1));
+        break;
+
+    case EQ_PARAM_GET_BAND:
+        param2 = *pParam;
+        *(int32_t *)pValue = pEqualizer->getMostRelevantBand(param2);
+        LOGV("Equalizer_getParameter() EQ_PARAM_GET_BAND frequency %d, band %d", param2, *(int32_t *)pValue);
+        break;
+
+    case EQ_PARAM_CUR_PRESET:
+        *(int16_t *)pValue = pEqualizer->getPreset();
+        LOGV("Equalizer_getParameter() EQ_PARAM_CUR_PRESET %d", *(int32_t *)pValue);
+        break;
+
+    case EQ_PARAM_GET_NUM_OF_PRESETS:
+        *(int16_t *)pValue = pEqualizer->getNumPresets();
+        LOGV("Equalizer_getParameter() EQ_PARAM_GET_NUM_OF_PRESETS %d", *(int16_t *)pValue);
+        break;
+
+    case EQ_PARAM_GET_PRESET_NAME:
+        param2 = *pParam;
+        if (param2 >= pEqualizer->getNumPresets()) {
+            status = -EINVAL;
+            break;
+        }
+        name = (char *)pValue;
+        strncpy(name, pEqualizer->getPresetName(param2), *pValueSize - 1);
+        name[*pValueSize - 1] = 0;
+        *pValueSize = strlen(name) + 1;
+        LOGV("Equalizer_getParameter() EQ_PARAM_GET_PRESET_NAME preset %d, name %s len %d", param2, gEqualizerPresets[param2].name, *pValueSize);
+        break;
+
+    default:
+        LOGV("Equalizer_getParameter() invalid param %d", param);
+        status = -EINVAL;
+        break;
+    }
+
+    return status;
+} // end Equalizer_getParameter
+
+
+//----------------------------------------------------------------------------
+// Equalizer_setParameter()
+//----------------------------------------------------------------------------
+// Purpose:
+// Set a Equalizer parameter
+//
+// Inputs:
+//  pEqualizer       - handle to instance data
+//  pParam           - pointer to parameter
+//  pValue           - pointer to value
+//
+// Outputs:
+//
+//
+// Side Effects:
+//
+//----------------------------------------------------------------------------
+
+int Equalizer_setParameter (AudioEqualizer * pEqualizer, int32_t *pParam, void *pValue)
+{
+    int status = 0;
+    int32_t preset;
+    int32_t band;
+    int32_t level;
+    int32_t param = *pParam++;
+
+
+    switch (param) {
+    case EQ_PARAM_CUR_PRESET:
+        preset = *(int16_t *)pValue;
+
+        LOGV("setParameter() EQ_PARAM_CUR_PRESET %d", preset);
+        if (preset >= pEqualizer->getNumPresets()) {
+            status = -EINVAL;
+            break;
+        }
+        pEqualizer->setPreset(preset);
+        pEqualizer->commit(true);
+        break;
+    case EQ_PARAM_BAND_LEVEL:
+        band =  *pParam;
+        level = *(int32_t *)pValue;
+        LOGV("setParameter() EQ_PARAM_BAND_LEVEL band %d, level %d", band, level);
+        if (band >= kNumBands) {
+            status = -EINVAL;
+            break;
+        }
+        pEqualizer->setGain(band, level);
+        pEqualizer->commit(true);
+       break;
+    default:
+        LOGV("setParameter() invalid param %d", param);
+        break;
+    }
+
+    return status;
+} // end Equalizer_setParameter
+
+} // namespace
+} // namespace
+
+
+//
+//--- Effect Control Interface Implementation
+//
+
+extern "C" int Equalizer_process(effect_interface_t self, audio_buffer_t *inBuffer, audio_buffer_t *outBuffer)
+{
+    android::EqualizerContext * pContext = (android::EqualizerContext *) self;
+
+    if (pContext == NULL) {
+        return -EINVAL;
+    }
+    if (inBuffer == NULL || inBuffer->raw == NULL ||
+        outBuffer == NULL || outBuffer->raw == NULL ||
+        inBuffer->frameCount != outBuffer->frameCount) {
+        return -EINVAL;
+    }
+
+    if (pContext->state == EQUALIZER_STATE_UNINITIALIZED) {
+        return -EINVAL;
+    }
+    if (pContext->state == EQUALIZER_STATE_INITIALIZED) {
+        return -ENODATA;
+    }
+
+    pContext->adapter.process(inBuffer->raw, outBuffer->raw, outBuffer->frameCount);
+
+    return 0;
+}   // end Equalizer_process
+
+extern "C" int Equalizer_command(effect_interface_t self, int cmdCode, int cmdSize,
+        void *pCmdData, int *replySize, void *pReplyData) {
+
+    android::EqualizerContext * pContext = (android::EqualizerContext *) self;
+    int retsize;
+
+    if (pContext == NULL || pContext->state == EQUALIZER_STATE_UNINITIALIZED) {
+        return -EINVAL;
+    }
+
+    android::AudioEqualizer * pEqualizer = pContext->pEqualizer;
+
+    LOGV("Equalizer_command command %d cmdSize %d",cmdCode, cmdSize);
+
+    switch (cmdCode) {
+    case EFFECT_CMD_INIT:
+        if (pReplyData == NULL || *replySize != sizeof(int)) {
+            return -EINVAL;
+        }
+        *(int *) pReplyData = Equalizer_init(pContext);
+        break;
+    case EFFECT_CMD_CONFIGURE:
+        if (pCmdData == NULL || cmdSize != sizeof(effect_config_t)
+                || pReplyData == NULL || *replySize != sizeof(int)) {
+            return -EINVAL;
+        }
+        *(int *) pReplyData = Equalizer_configure(pContext,
+                (effect_config_t *) pCmdData);
+        break;
+    case EFFECT_CMD_RESET:
+        Equalizer_configure(pContext, &pContext->config);
+        break;
+    case EFFECT_CMD_GET_PARAM: {
+        if (pCmdData == NULL || cmdSize < (int)(sizeof(effect_param_t) + sizeof(int32_t)) ||
+            pReplyData == NULL || *replySize < (int) (sizeof(effect_param_t) + sizeof(int32_t))) {
+            return -EINVAL;
+        }
+        effect_param_t *p = (effect_param_t *)pCmdData;
+        memcpy(pReplyData, pCmdData, sizeof(effect_param_t) + p->psize);
+        p = (effect_param_t *)pReplyData;
+        int voffset = ((p->psize - 1) / sizeof(int32_t) + 1) * sizeof(int32_t);
+        p->status = android::Equalizer_getParameter(pEqualizer, (int32_t *)p->data, &p->vsize,
+                p->data + voffset);
+        *replySize = sizeof(effect_param_t) + voffset + p->vsize;
+        LOGV("Equalizer_command EFFECT_CMD_GET_PARAM *pCmdData %d, *replySize %d, *pReplyData %08x %08x",
+                *(int32_t *)((char *)pCmdData + sizeof(effect_param_t)), *replySize,
+                *(int32_t *)((char *)pReplyData + sizeof(effect_param_t) + voffset),
+                *(int32_t *)((char *)pReplyData + sizeof(effect_param_t) + voffset + sizeof(int32_t)));
+
+        } break;
+    case EFFECT_CMD_SET_PARAM: {
+        LOGV("Equalizer_command EFFECT_CMD_SET_PARAM cmdSize %d pCmdData %p, *replySize %d, pReplyData %p", cmdSize, pCmdData, *replySize, pReplyData);
+        if (pCmdData == NULL || cmdSize < (int)(sizeof(effect_param_t) + sizeof(int32_t)) ||
+            pReplyData == NULL || *replySize != sizeof(int32_t)) {
+            return -EINVAL;
+        }
+        effect_param_t *p = (effect_param_t *) pCmdData;
+        *(int *)pReplyData = android::Equalizer_setParameter(pEqualizer, (int32_t *)p->data,
+                p->data + p->psize);
+        } break;
+    case EFFECT_CMD_ENABLE:
+        if (pReplyData == NULL || *replySize != sizeof(int)) {
+            return -EINVAL;
+        }
+        if (pContext->state != EQUALIZER_STATE_INITIALIZED) {
+            return -ENOSYS;
+        }
+        pContext->state = EQUALIZER_STATE_ACTIVE;
+        LOGV("EFFECT_CMD_ENABLE() OK");
+        *(int *)pReplyData = 0;
+        break;
+    case EFFECT_CMD_DISABLE:
+        if (pReplyData == NULL || *replySize != sizeof(int)) {
+            return -EINVAL;
+        }
+        if (pContext->state != EQUALIZER_STATE_ACTIVE) {
+            return -ENOSYS;
+        }
+        pContext->state = EQUALIZER_STATE_INITIALIZED;
+        LOGV("EFFECT_CMD_DISABLE() OK");
+        *(int *)pReplyData = 0;
+        break;
+    case EFFECT_CMD_SET_DEVICE:
+    case EFFECT_CMD_SET_VOLUME:
+    case EFFECT_CMD_SET_AUDIO_MODE:
+        break;
+    default:
+        LOGW("Equalizer_command invalid command %d",cmdCode);
+        return -EINVAL;
+    }
+
+    return 0;
+}
+
+// effect_interface_t interface implementation for equalizer effect
+const struct effect_interface_s gEqualizerInterface = {
+        Equalizer_process,
+        Equalizer_command
+};
+
+
diff --git a/media/libeffects/EffectReverb.c b/media/libeffects/EffectReverb.c
new file mode 100644
index 0000000..2ce7558
--- /dev/null
+++ b/media/libeffects/EffectReverb.c
@@ -0,0 +1,2135 @@
+/*
+ * Copyright (C) 2008 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#define LOG_TAG "EffectReverb"
+//#define LOG_NDEBUG 0
+#include <cutils/log.h>
+#include <stdlib.h>
+#include <string.h>
+#include <stdbool.h>
+#include "EffectReverb.h"
+#include "EffectsMath.h"
+
+// effect_interface_t interface implementation for reverb effect
+const struct effect_interface_s gReverbInterface = {
+        Reverb_Process,
+        Reverb_Command
+};
+
+// Google auxiliary environmental reverb UUID: 1f0ae2e0-4ef7-11df-bc09-0002a5d5c51b
+static const effect_descriptor_t gAuxEnvReverbDescriptor = {
+        {0xc2e5d5f0, 0x94bd, 0x4763, 0x9cac, {0x4e, 0x23, 0x4d, 0x06, 0x83, 0x9e}},
+        {0x1f0ae2e0, 0x4ef7, 0x11df, 0xbc09, {0x00, 0x02, 0xa5, 0xd5, 0xc5, 0x1b}},
+        EFFECT_API_VERSION,
+        // flags other than EFFECT_FLAG_TYPE_AUXILIARY set for test purpose
+        EFFECT_FLAG_TYPE_AUXILIARY | EFFECT_FLAG_DEVICE_IND | EFFECT_FLAG_AUDIO_MODE_IND,
+        0, // TODO
+        33,
+        "Aux Environmental Reverb",
+        "Google Inc."
+};
+
+// Google insert environmental reverb UUID: aa476040-6342-11df-91a4-0002a5d5c51b
+static const effect_descriptor_t gInsertEnvReverbDescriptor = {
+        {0xc2e5d5f0, 0x94bd, 0x4763, 0x9cac, {0x4e, 0x23, 0x4d, 0x06, 0x83, 0x9e}},
+        {0xaa476040, 0x6342, 0x11df, 0x91a4, {0x00, 0x02, 0xa5, 0xd5, 0xc5, 0x1b}},
+        EFFECT_API_VERSION,
+        EFFECT_FLAG_TYPE_INSERT | EFFECT_FLAG_INSERT_FIRST,
+        0, // TODO
+        33,
+        "Insert Environmental reverb",
+        "Google Inc."
+};
+
+// Google auxiliary preset reverb UUID: 63909320-53a6-11df-bdbd-0002a5d5c51b
+static const effect_descriptor_t gAuxPresetReverbDescriptor = {
+        {0x47382d60, 0xddd8, 0x11db, 0xbf3a, {0x00, 0x02, 0xa5, 0xd5, 0xc5, 0x1b}},
+        {0x63909320, 0x53a6, 0x11df, 0xbdbd, {0x00, 0x02, 0xa5, 0xd5, 0xc5, 0x1b}},
+        EFFECT_API_VERSION,
+        EFFECT_FLAG_TYPE_AUXILIARY,
+        0, // TODO
+        33,
+        "Aux Preset Reverb",
+        "Google Inc."
+};
+
+// Google insert preset reverb UUID: d93dc6a0-6342-11df-b128-0002a5d5c51b
+static const effect_descriptor_t gInsertPresetReverbDescriptor = {
+        {0x47382d60, 0xddd8, 0x11db, 0xbf3a, {0x00, 0x02, 0xa5, 0xd5, 0xc5, 0x1b}},
+        {0xd93dc6a0, 0x6342, 0x11df, 0xb128, {0x00, 0x02, 0xa5, 0xd5, 0xc5, 0x1b}},
+        EFFECT_API_VERSION,
+        EFFECT_FLAG_TYPE_INSERT | EFFECT_FLAG_INSERT_FIRST,
+        0, // TODO
+        33,
+        "Insert Preset Reverb",
+        "Google Inc."
+};
+
+// gDescriptors contains pointers to all defined effect descriptor in this library
+static const effect_descriptor_t * const gDescriptors[] = {
+        &gAuxEnvReverbDescriptor,
+        &gInsertEnvReverbDescriptor,
+        &gAuxPresetReverbDescriptor,
+        &gInsertPresetReverbDescriptor
+};
+
+/*----------------------------------------------------------------------------
+ * Effect API implementation
+ *--------------------------------------------------------------------------*/
+
+/*--- Effect Library Interface Implementation ---*/
+
+int EffectQueryNumberEffects(uint32_t *pNumEffects) {
+    *pNumEffects = sizeof(gDescriptors) / sizeof(const effect_descriptor_t *);
+    return 0;
+}
+
+int EffectQueryEffect(uint32_t index, effect_descriptor_t *pDescriptor) {
+    if (pDescriptor == NULL) {
+        return -EINVAL;
+    }
+    if (index >= sizeof(gDescriptors) / sizeof(const effect_descriptor_t *)) {
+        return -EINVAL;
+    }
+    memcpy(pDescriptor, gDescriptors[index],
+            sizeof(effect_descriptor_t));
+    return 0;
+}
+
+int EffectCreate(effect_uuid_t *uuid,
+        int32_t sessionId,
+        int32_t ioId,
+        effect_interface_t *pInterface) {
+    int ret;
+    int i;
+    reverb_module_t *module;
+    const effect_descriptor_t *desc;
+    int aux = 0;
+    int preset = 0;
+
+    LOGV("EffectLibCreateEffect start");
+
+    if (pInterface == NULL || uuid == NULL) {
+        return -EINVAL;
+    }
+
+    for (i = 0; gDescriptors[i] != NULL; i++) {
+        desc = gDescriptors[i];
+        if (memcmp(uuid, &desc->uuid, sizeof(effect_uuid_t))
+                == 0) {
+            break;
+        }
+    }
+
+    if (gDescriptors[i] == NULL) {
+        return -ENOENT;
+    }
+
+    module = malloc(sizeof(reverb_module_t));
+
+    module->itfe = &gReverbInterface;
+
+    module->context.mState = REVERB_STATE_UNINITIALIZED;
+
+    if (memcmp(&desc->type, SL_IID_PRESETREVERB, sizeof(effect_uuid_t)) == 0) {
+        preset = 1;
+    }
+    if ((desc->flags & EFFECT_FLAG_TYPE_MASK) == EFFECT_FLAG_TYPE_AUXILIARY) {
+        aux = 1;
+    }
+    ret = Reverb_Init(module, aux, preset);
+    if (ret < 0) {
+        LOGW("EffectLibCreateEffect() init failed");
+        free(module);
+        return ret;
+    }
+
+    *pInterface = (effect_interface_t) module;
+
+    module->context.mState = REVERB_STATE_INITIALIZED;
+
+    LOGV("EffectLibCreateEffect %p ,size %d", module, sizeof(reverb_module_t));
+
+    return 0;
+}
+
+int EffectRelease(effect_interface_t interface) {
+    reverb_module_t *pRvbModule = (reverb_module_t *)interface;
+
+    LOGV("EffectLibReleaseEffect %p", interface);
+    if (interface == NULL) {
+        return -EINVAL;
+    }
+
+    pRvbModule->context.mState = REVERB_STATE_UNINITIALIZED;
+
+    free(pRvbModule);
+    return 0;
+}
+
+
+/*--- Effect Control Interface Implementation ---*/
+
+static int Reverb_Process(effect_interface_t self, audio_buffer_t *inBuffer, audio_buffer_t *outBuffer) {
+    reverb_object_t *pReverb;
+    int16_t *pSrc, *pDst;
+    reverb_module_t *pRvbModule = (reverb_module_t *)self;
+
+    if (pRvbModule == NULL) {
+        return -EINVAL;
+    }
+
+    if (inBuffer == NULL || inBuffer->raw == NULL ||
+        outBuffer == NULL || outBuffer->raw == NULL ||
+        inBuffer->frameCount != outBuffer->frameCount) {
+        return -EINVAL;
+    }
+
+    pReverb = (reverb_object_t*) &pRvbModule->context;
+
+    if (pReverb->mState == REVERB_STATE_UNINITIALIZED) {
+        return -EINVAL;
+    }
+    if (pReverb->mState == REVERB_STATE_INITIALIZED) {
+        return -ENODATA;
+    }
+
+    //if bypassed or the preset forces the signal to be completely dry
+    if (pReverb->m_bBypass != 0) {
+        if (inBuffer->raw != outBuffer->raw) {
+            int16_t smp;
+            pSrc = inBuffer->s16;
+            pDst = outBuffer->s16;
+            size_t count = inBuffer->frameCount;
+            if (pRvbModule->config.inputCfg.channels == pRvbModule->config.outputCfg.channels) {
+                count *= 2;
+                while (count--) {
+                    *pDst++ = *pSrc++;
+                }
+            } else {
+                while (count--) {
+                    smp = *pSrc++;
+                    *pDst++ = smp;
+                    *pDst++ = smp;
+                }
+            }
+        }
+        return 0;
+    }
+
+    if (pReverb->m_nNextRoom != pReverb->m_nCurrentRoom) {
+        ReverbUpdateRoom(pReverb, true);
+    }
+
+    pSrc = inBuffer->s16;
+    pDst = outBuffer->s16;
+    size_t numSamples = outBuffer->frameCount;
+    while (numSamples) {
+        uint32_t processedSamples;
+        if (numSamples > (uint32_t) pReverb->m_nUpdatePeriodInSamples) {
+            processedSamples = (uint32_t) pReverb->m_nUpdatePeriodInSamples;
+        } else {
+            processedSamples = numSamples;
+        }
+
+        /* increment update counter */
+        pReverb->m_nUpdateCounter += (int16_t) processedSamples;
+        /* check if update counter needs to be reset */
+        if (pReverb->m_nUpdateCounter >= pReverb->m_nUpdatePeriodInSamples) {
+            /* update interval has elapsed, so reset counter */
+            pReverb->m_nUpdateCounter -= pReverb->m_nUpdatePeriodInSamples;
+            ReverbUpdateXfade(pReverb, pReverb->m_nUpdatePeriodInSamples);
+
+        } /* end if m_nUpdateCounter >= update interval */
+
+        Reverb(pReverb, processedSamples, pDst, pSrc);
+
+        numSamples -= processedSamples;
+        if (pReverb->m_Aux) {
+            pSrc += processedSamples;
+        } else {
+            pSrc += processedSamples * NUM_OUTPUT_CHANNELS;
+        }
+        pDst += processedSamples * NUM_OUTPUT_CHANNELS;
+    }
+
+    return 0;
+}
+
+
+static int Reverb_Command(effect_interface_t self, int cmdCode, int cmdSize,
+        void *pCmdData, int *replySize, void *pReplyData) {
+    reverb_module_t *pRvbModule = (reverb_module_t *) self;
+    reverb_object_t *pReverb;
+    int retsize;
+
+    if (pRvbModule == NULL ||
+            pRvbModule->context.mState == REVERB_STATE_UNINITIALIZED) {
+        return -EINVAL;
+    }
+
+    pReverb = (reverb_object_t*) &pRvbModule->context;
+
+    LOGV("Reverb_Command command %d cmdSize %d",cmdCode, cmdSize);
+
+    switch (cmdCode) {
+    case EFFECT_CMD_INIT:
+        if (pReplyData == NULL || *replySize != sizeof(int)) {
+            return -EINVAL;
+        }
+        *(int *) pReplyData = Reverb_Init(pRvbModule, pReverb->m_Aux, pReverb->m_Preset);
+        if (*(int *) pReplyData == 0) {
+            pRvbModule->context.mState = REVERB_STATE_INITIALIZED;
+        }
+        break;
+    case EFFECT_CMD_CONFIGURE:
+        if (pCmdData == NULL || cmdSize != sizeof(effect_config_t)
+                || pReplyData == NULL || *replySize != sizeof(int)) {
+            return -EINVAL;
+        }
+        *(int *) pReplyData = Reverb_Configure(pRvbModule,
+                (effect_config_t *)pCmdData, false);
+        break;
+    case EFFECT_CMD_RESET:
+        Reverb_Reset(pReverb, false);
+        break;
+    case EFFECT_CMD_GET_PARAM:
+        LOGV("Reverb_Command EFFECT_CMD_GET_PARAM pCmdData %p, *replySize %d, pReplyData: %p",pCmdData, *replySize, pReplyData);
+
+        if (pCmdData == NULL || cmdSize < (int)(sizeof(effect_param_t) + sizeof(int32_t)) ||
+            pReplyData == NULL || *replySize < (int) sizeof(effect_param_t)) {
+            return -EINVAL;
+        }
+        effect_param_t *rep = (effect_param_t *) pReplyData;
+        memcpy(pReplyData, pCmdData, sizeof(effect_param_t) + sizeof(int32_t));
+        LOGV("Reverb_Command EFFECT_CMD_GET_PARAM param %d, replySize %d",*(int32_t *)rep->data, rep->vsize);
+        rep->status = Reverb_getParameter(pReverb, *(int32_t *)rep->data, &rep->vsize,
+                rep->data + sizeof(int32_t));
+        *replySize = sizeof(effect_param_t) + sizeof(int32_t) + rep->vsize;
+        break;
+    case EFFECT_CMD_SET_PARAM:
+        LOGV("Reverb_Command EFFECT_CMD_SET_PARAM cmdSize %d pCmdData %p, *replySize %d, pReplyData %p",
+                cmdSize, pCmdData, *replySize, pReplyData);
+        if (pCmdData == NULL || (cmdSize < (int)(sizeof(effect_param_t) + sizeof(int32_t)))
+                || pReplyData == NULL || *replySize != (int)sizeof(int32_t)) {
+            return -EINVAL;
+        }
+        effect_param_t *cmd = (effect_param_t *) pCmdData;
+        *(int *)pReplyData = Reverb_setParameter(pReverb, *(int32_t *)cmd->data,
+                cmd->vsize, cmd->data + sizeof(int32_t));
+        break;
+    case EFFECT_CMD_ENABLE:
+        if (pReplyData == NULL || *replySize != sizeof(int)) {
+            return -EINVAL;
+        }
+        if (pReverb->mState != REVERB_STATE_INITIALIZED) {
+            return -ENOSYS;
+        }
+        pReverb->mState = REVERB_STATE_ACTIVE;
+        LOGV("EFFECT_CMD_ENABLE() OK");
+        *(int *)pReplyData = 0;
+        break;
+    case EFFECT_CMD_DISABLE:
+        if (pReplyData == NULL || *replySize != sizeof(int)) {
+            return -EINVAL;
+        }
+        if (pReverb->mState != REVERB_STATE_ACTIVE) {
+            return -ENOSYS;
+        }
+        pReverb->mState = REVERB_STATE_INITIALIZED;
+        LOGV("EFFECT_CMD_DISABLE() OK");
+        *(int *)pReplyData = 0;
+        break;
+    case EFFECT_CMD_SET_DEVICE:
+        if (pCmdData == NULL || cmdSize != (int)sizeof(uint32_t)) {
+            return -EINVAL;
+        }
+        LOGV("Reverb_Command EFFECT_CMD_SET_DEVICE: 0x%08x", *(uint32_t *)pCmdData);
+        break;
+    case EFFECT_CMD_SET_VOLUME: {
+        // audio output is always stereo => 2 channel volumes
+        if (pCmdData == NULL || cmdSize != (int)sizeof(uint32_t) * 2) {
+            return -EINVAL;
+        }
+        float left = (float)(*(uint32_t *)pCmdData) / (1 << 24);
+        float right = (float)(*((uint32_t *)pCmdData + 1)) / (1 << 24);
+        LOGV("Reverb_Command EFFECT_CMD_SET_VOLUME: left %f, right %f ", left, right);
+        break;
+        }
+    case EFFECT_CMD_SET_AUDIO_MODE:
+        if (pCmdData == NULL || cmdSize != (int)sizeof(uint32_t)) {
+            return -EINVAL;
+        }
+        LOGV("Reverb_Command EFFECT_CMD_SET_AUDIO_MODE: %d", *(uint32_t *)pCmdData);
+        break;
+    default:
+        LOGW("Reverb_Command invalid command %d",cmdCode);
+        return -EINVAL;
+    }
+
+    return 0;
+}
+
+
+/*----------------------------------------------------------------------------
+ * Reverb internal functions
+ *--------------------------------------------------------------------------*/
+
+/*----------------------------------------------------------------------------
+ * Reverb_Init()
+ *----------------------------------------------------------------------------
+ * Purpose:
+ * Initialize reverb context and apply default parameters
+ *
+ * Inputs:
+ *  pRvbModule    - pointer to reverb effect module
+ *  aux           - indicates if the reverb is used as auxiliary (1) or insert (0)
+ *  preset        - indicates if the reverb is used in preset (1) or environmental (0) mode
+ *
+ * Outputs:
+ *
+ * Side Effects:
+ *
+ *----------------------------------------------------------------------------
+ */
+
+int Reverb_Init(reverb_module_t *pRvbModule, int aux, int preset) {
+    int ret;
+
+    LOGV("Reverb_Init module %p, aux: %d, preset: %d", pRvbModule,aux, preset);
+
+    memset(&pRvbModule->context, 0, sizeof(reverb_object_t));
+
+    pRvbModule->context.m_Aux = (uint16_t)aux;
+    pRvbModule->context.m_Preset = (uint16_t)preset;
+
+    pRvbModule->config.inputCfg.samplingRate = 44100;
+    if (aux) {
+        pRvbModule->config.inputCfg.channels = CHANNEL_MONO;
+    } else {
+        pRvbModule->config.inputCfg.channels = CHANNEL_STEREO;
+    }
+    pRvbModule->config.inputCfg.format = SAMPLE_FORMAT_PCM_S15;
+    pRvbModule->config.inputCfg.bufferProvider.getBuffer = NULL;
+    pRvbModule->config.inputCfg.bufferProvider.releaseBuffer = NULL;
+    pRvbModule->config.inputCfg.bufferProvider.cookie = NULL;
+    pRvbModule->config.inputCfg.accessMode = EFFECT_BUFFER_ACCESS_READ;
+    pRvbModule->config.inputCfg.mask = EFFECT_CONFIG_ALL;
+    pRvbModule->config.outputCfg.samplingRate = 44100;
+    pRvbModule->config.outputCfg.channels = CHANNEL_STEREO;
+    pRvbModule->config.outputCfg.format = SAMPLE_FORMAT_PCM_S15;
+    pRvbModule->config.outputCfg.bufferProvider.getBuffer = NULL;
+    pRvbModule->config.outputCfg.bufferProvider.releaseBuffer = NULL;
+    pRvbModule->config.outputCfg.bufferProvider.cookie = NULL;
+    pRvbModule->config.outputCfg.accessMode = EFFECT_BUFFER_ACCESS_ACCUMULATE;
+    pRvbModule->config.outputCfg.mask = EFFECT_CONFIG_ALL;
+
+    ret = Reverb_Configure(pRvbModule, &pRvbModule->config, true);
+    if (ret < 0) {
+        LOGV("Reverb_Init error %d on module %p", ret, pRvbModule);
+    }
+
+    return ret;
+}
+
+/*----------------------------------------------------------------------------
+ * Reverb_Init()
+ *----------------------------------------------------------------------------
+ * Purpose:
+ *  Set input and output audio configuration.
+ *
+ * Inputs:
+ *  pRvbModule    - pointer to reverb effect module
+ *  pConfig       - pointer to effect_config_t structure containing input
+ *              and output audio parameters configuration
+ *  init          - true if called from init function
+ * Outputs:
+ *
+ * Side Effects:
+ *
+ *----------------------------------------------------------------------------
+ */
+
+int Reverb_Configure(reverb_module_t *pRvbModule, effect_config_t *pConfig,
+        bool init) {
+    reverb_object_t *pReverb = &pRvbModule->context;
+    int bufferSizeInSamples;
+    int updatePeriodInSamples;
+    int xfadePeriodInSamples;
+
+    // Check configuration compatibility with build options
+    if (pConfig->inputCfg.samplingRate
+        != pConfig->outputCfg.samplingRate
+        || pConfig->outputCfg.channels != OUTPUT_CHANNELS
+        || pConfig->inputCfg.format != SAMPLE_FORMAT_PCM_S15
+        || pConfig->outputCfg.format != SAMPLE_FORMAT_PCM_S15) {
+        LOGV("Reverb_Configure invalid config");
+        return -EINVAL;
+    }
+    if ((pReverb->m_Aux && (pConfig->inputCfg.channels != CHANNEL_MONO)) ||
+        (!pReverb->m_Aux && (pConfig->inputCfg.channels != CHANNEL_STEREO))) {
+        LOGV("Reverb_Configure invalid config");
+        return -EINVAL;
+    }
+
+    memcpy(&pRvbModule->config, pConfig, sizeof(effect_config_t));
+
+    pReverb->m_nSamplingRate = pRvbModule->config.outputCfg.samplingRate;
+
+    switch (pReverb->m_nSamplingRate) {
+    case 8000:
+        pReverb->m_nUpdatePeriodInBits = 5;
+        bufferSizeInSamples = 4096;
+        pReverb->m_nCosWT_5KHz = -23170;
+        break;
+    case 16000:
+        pReverb->m_nUpdatePeriodInBits = 6;
+        bufferSizeInSamples = 8192;
+        pReverb->m_nCosWT_5KHz = -12540;
+        break;
+    case 22050:
+        pReverb->m_nUpdatePeriodInBits = 7;
+        bufferSizeInSamples = 8192;
+        pReverb->m_nCosWT_5KHz = 4768;
+        break;
+    case 32000:
+        pReverb->m_nUpdatePeriodInBits = 7;
+        bufferSizeInSamples = 16384;
+        pReverb->m_nCosWT_5KHz = 18205;
+        break;
+    case 44100:
+        pReverb->m_nUpdatePeriodInBits = 8;
+        bufferSizeInSamples = 16384;
+        pReverb->m_nCosWT_5KHz = 24799;
+        break;
+    case 48000:
+        pReverb->m_nUpdatePeriodInBits = 8;
+        bufferSizeInSamples = 16384;
+        pReverb->m_nCosWT_5KHz = 25997;
+        break;
+    default:
+        LOGV("Reverb_Configure invalid sampling rate %d", pReverb->m_nSamplingRate);
+        return -EINVAL;
+    }
+
+    // Define a mask for circular addressing, so that array index
+    // can wraparound and stay in array boundary of 0, 1, ..., (buffer size -1)
+    // The buffer size MUST be a power of two
+    pReverb->m_nBufferMask = (int32_t) (bufferSizeInSamples - 1);
+    /* reverb parameters are updated every 2^(pReverb->m_nUpdatePeriodInBits) samples */
+    updatePeriodInSamples = (int32_t) (0x1L << pReverb->m_nUpdatePeriodInBits);
+    /*
+     calculate the update counter by bitwise ANDING with this value to
+     generate a 2^n modulo value
+     */
+    pReverb->m_nUpdatePeriodInSamples = (int32_t) updatePeriodInSamples;
+
+    xfadePeriodInSamples = (int32_t) (REVERB_XFADE_PERIOD_IN_SECONDS
+            * (double) pReverb->m_nSamplingRate);
+
+    // set xfade parameters
+    pReverb->m_nPhaseIncrement
+            = (int16_t) (65536 / ((int16_t) xfadePeriodInSamples
+                    / (int16_t) updatePeriodInSamples));
+
+    if (init) {
+        ReverbReadInPresets(pReverb);
+
+        // for debugging purposes, allow noise generator
+        pReverb->m_bUseNoise = true;
+
+        // for debugging purposes, allow bypass
+        pReverb->m_bBypass = 0;
+
+        pReverb->m_nNextRoom = 1;
+
+        pReverb->m_nNoise = (int16_t) 0xABCD;
+    }
+
+    Reverb_Reset(pReverb, init);
+
+    return 0;
+}
+
+/*----------------------------------------------------------------------------
+ * Reverb_Reset()
+ *----------------------------------------------------------------------------
+ * Purpose:
+ *  Reset internal states and clear delay lines.
+ *
+ * Inputs:
+ *  pReverb    - pointer to reverb context
+ *  init       - true if called from init function
+ *
+ * Outputs:
+ *
+ * Side Effects:
+ *
+ *----------------------------------------------------------------------------
+ */
+
+void Reverb_Reset(reverb_object_t *pReverb, bool init) {
+    int bufferSizeInSamples = (int32_t) (pReverb->m_nBufferMask + 1);
+    int maxApSamples;
+    int maxDelaySamples;
+    int maxEarlySamples;
+    int ap1In;
+    int delay0In;
+    int delay1In;
+    int32_t i;
+    uint16_t nOffset;
+
+    maxApSamples = ((int32_t) (MAX_AP_TIME * pReverb->m_nSamplingRate) >> 16);
+    maxDelaySamples = ((int32_t) (MAX_DELAY_TIME * pReverb->m_nSamplingRate)
+            >> 16);
+    maxEarlySamples = ((int32_t) (MAX_EARLY_TIME * pReverb->m_nSamplingRate)
+            >> 16);
+
+    ap1In = (AP0_IN + maxApSamples + GUARD);
+    delay0In = (ap1In + maxApSamples + GUARD);
+    delay1In = (delay0In + maxDelaySamples + GUARD);
+    // Define the max offsets for the end points of each section
+    // i.e., we don't expect a given section's taps to go beyond
+    // the following limits
+
+    pReverb->m_nEarly0in = (delay1In + maxDelaySamples + GUARD);
+    pReverb->m_nEarly1in = (pReverb->m_nEarly0in + maxEarlySamples + GUARD);
+
+    pReverb->m_sAp0.m_zApIn = AP0_IN;
+
+    pReverb->m_zD0In = delay0In;
+
+    pReverb->m_sAp1.m_zApIn = ap1In;
+
+    pReverb->m_zD1In = delay1In;
+
+    pReverb->m_zOutLpfL = 0;
+    pReverb->m_zOutLpfR = 0;
+
+    pReverb->m_nRevFbkR = 0;
+    pReverb->m_nRevFbkL = 0;
+
+    // set base index into circular buffer
+    pReverb->m_nBaseIndex = 0;
+
+    // clear the reverb delay line
+    for (i = 0; i < bufferSizeInSamples; i++) {
+        pReverb->m_nDelayLine[i] = 0;
+    }
+
+    ReverbUpdateRoom(pReverb, init);
+
+    pReverb->m_nUpdateCounter = 0;
+
+    pReverb->m_nPhase = -32768;
+
+    pReverb->m_nSin = 0;
+    pReverb->m_nCos = 0;
+    pReverb->m_nSinIncrement = 0;
+    pReverb->m_nCosIncrement = 0;
+
+    // set delay tap lengths
+    nOffset = ReverbCalculateNoise(pReverb);
+
+    pReverb->m_zD1Cross = pReverb->m_nDelay1Out - pReverb->m_nMaxExcursion
+            + nOffset;
+
+    nOffset = ReverbCalculateNoise(pReverb);
+
+    pReverb->m_zD0Cross = pReverb->m_nDelay0Out - pReverb->m_nMaxExcursion
+            - nOffset;
+
+    nOffset = ReverbCalculateNoise(pReverb);
+
+    pReverb->m_zD0Self = pReverb->m_nDelay0Out - pReverb->m_nMaxExcursion
+            - nOffset;
+
+    nOffset = ReverbCalculateNoise(pReverb);
+
+    pReverb->m_zD1Self = pReverb->m_nDelay1Out - pReverb->m_nMaxExcursion
+            + nOffset;
+}
+
+/*----------------------------------------------------------------------------
+ * Reverb_getParameter()
+ *----------------------------------------------------------------------------
+ * Purpose:
+ * Get a Reverb parameter
+ *
+ * Inputs:
+ *  pReverb       - handle to instance data
+ *  param         - parameter
+ *  pValue        - pointer to variable to hold retrieved value
+ *  pSize         - pointer to value size: maximum size as input
+ *
+ * Outputs:
+ *  *pValue updated with parameter value
+ *  *pSize updated with actual value size
+ *
+ *
+ * Side Effects:
+ *
+ *----------------------------------------------------------------------------
+ */
+int Reverb_getParameter(reverb_object_t *pReverb, int32_t param, size_t *pSize,
+        void *pValue) {
+    int32_t *pValue32;
+    int16_t *pValue16;
+    t_reverb_properties *pProperties;
+    int32_t i;
+    int32_t temp;
+    int32_t temp2;
+    size_t size;
+
+    if (pReverb->m_Preset) {
+        if (param != REVERB_PARAM_PRESET || *pSize < sizeof(int16_t)) {
+            return -EINVAL;
+        }
+        size = sizeof(int16_t);
+        pValue16 = (int16_t *)pValue;
+        // REVERB_PRESET_NONE is mapped to bypass
+        if (pReverb->m_bBypass != 0) {
+            *pValue16 = (int16_t)REVERB_PRESET_NONE;
+        } else {
+            *pValue16 = (int16_t)(pReverb->m_nNextRoom + 1);
+        }
+        LOGV("get REVERB_PARAM_PRESET, preset %d", *pValue16);
+    } else {
+        switch (param) {
+        case REVERB_PARAM_ROOM_LEVEL:
+        case REVERB_PARAM_ROOM_HF_LEVEL:
+        case REVERB_PARAM_DECAY_HF_RATIO:
+        case REVERB_PARAM_REFLECTIONS_LEVEL:
+        case REVERB_PARAM_REVERB_LEVEL:
+        case REVERB_PARAM_DIFFUSION:
+        case REVERB_PARAM_DENSITY:
+            size = sizeof(int16_t);
+            break;
+
+        case REVERB_PARAM_BYPASS:
+        case REVERB_PARAM_DECAY_TIME:
+        case REVERB_PARAM_REFLECTIONS_DELAY:
+        case REVERB_PARAM_REVERB_DELAY:
+            size = sizeof(int32_t);
+            break;
+
+        case REVERB_PARAM_PROPERTIES:
+            size = sizeof(t_reverb_properties);
+            break;
+
+        default:
+            return -EINVAL;
+        }
+
+        if (*pSize < size) {
+            return -EINVAL;
+        }
+
+        pValue32 = (int32_t *) pValue;
+        pValue16 = (int16_t *) pValue;
+        pProperties = (t_reverb_properties *) pValue;
+
+        switch (param) {
+        case REVERB_PARAM_BYPASS:
+            *pValue32 = (int32_t) pReverb->m_bBypass;
+            break;
+
+        case REVERB_PARAM_PROPERTIES:
+            pValue16 = &pProperties->roomLevel;
+            /* FALL THROUGH */
+
+        case REVERB_PARAM_ROOM_LEVEL:
+            // Convert m_nRoomLpfFwd to millibels
+            temp = (pReverb->m_nRoomLpfFwd << 15)
+                    / (32767 - pReverb->m_nRoomLpfFbk);
+            *pValue16 = Effects_Linear16ToMillibels(temp);
+
+            LOGV("get REVERB_PARAM_ROOM_LEVEL %d, gain %d, m_nRoomLpfFwd %d, m_nRoomLpfFbk %d", *pValue16, temp, pReverb->m_nRoomLpfFwd, pReverb->m_nRoomLpfFbk);
+
+            if (param == REVERB_PARAM_ROOM_LEVEL) {
+                break;
+            }
+            pValue16 = &pProperties->roomHFLevel;
+            /* FALL THROUGH */
+
+        case REVERB_PARAM_ROOM_HF_LEVEL:
+            // The ratio between linear gain at 0Hz and at 5000Hz for the room low pass is:
+            // (1 + a1) / sqrt(a1^2 + 2*C*a1 + 1) where:
+            // - a1 is minus the LP feedback gain: -pReverb->m_nRoomLpfFbk
+            // - C is cos(2piWT) @ 5000Hz: pReverb->m_nCosWT_5KHz
+
+            temp = MULT_EG1_EG1(pReverb->m_nRoomLpfFbk, pReverb->m_nRoomLpfFbk);
+            LOGV("get REVERB_PARAM_ROOM_HF_LEVEL, a1^2 %d", temp);
+            temp2 = MULT_EG1_EG1(pReverb->m_nRoomLpfFbk, pReverb->m_nCosWT_5KHz)
+                    << 1;
+            LOGV("get REVERB_PARAM_ROOM_HF_LEVEL, 2 Cos a1 %d", temp2);
+            temp = 32767 + temp - temp2;
+            LOGV("get REVERB_PARAM_ROOM_HF_LEVEL, a1^2 + 2 Cos a1 + 1 %d", temp);
+            temp = Effects_Sqrt(temp) * 181;
+            LOGV("get REVERB_PARAM_ROOM_HF_LEVEL, SQRT(a1^2 + 2 Cos a1 + 1) %d", temp);
+            temp = ((32767 - pReverb->m_nRoomLpfFbk) << 15) / temp;
+
+            LOGV("get REVERB_PARAM_ROOM_HF_LEVEL, gain %d, m_nRoomLpfFwd %d, m_nRoomLpfFbk %d", temp, pReverb->m_nRoomLpfFwd, pReverb->m_nRoomLpfFbk);
+
+            *pValue16 = Effects_Linear16ToMillibels(temp);
+
+            if (param == REVERB_PARAM_ROOM_HF_LEVEL) {
+                break;
+            }
+            pValue32 = &pProperties->decayTime;
+            /* FALL THROUGH */
+
+        case REVERB_PARAM_DECAY_TIME:
+            // Calculate reverb feedback path gain
+            temp = (pReverb->m_nRvbLpfFwd << 15) / (32767 - pReverb->m_nRvbLpfFbk);
+            temp = Effects_Linear16ToMillibels(temp);
+
+            // Calculate decay time: g = -6000 d/DT , g gain in millibels, d reverb delay, DT decay time
+            temp = (-6000 * pReverb->m_nLateDelay) / temp;
+
+            // Convert samples to ms
+            *pValue32 = (temp * 1000) / pReverb->m_nSamplingRate;
+
+            LOGV("get REVERB_PARAM_DECAY_TIME, samples %d, ms %d", temp, *pValue32);
+
+            if (param == REVERB_PARAM_DECAY_TIME) {
+                break;
+            }
+            pValue16 = &pProperties->decayHFRatio;
+            /* FALL THROUGH */
+
+        case REVERB_PARAM_DECAY_HF_RATIO:
+            // If r is the decay HF ratio  (r = REVERB_PARAM_DECAY_HF_RATIO/1000) we have:
+            //       DT_5000Hz = DT_0Hz * r
+            //  and  G_5000Hz = -6000 * d / DT_5000Hz and G_0Hz = -6000 * d / DT_0Hz in millibels so :
+            // r = G_0Hz/G_5000Hz in millibels
+            // The linear gain at 5000Hz is b0 / sqrt(a1^2 + 2*C*a1 + 1) where:
+            // - a1 is minus the LP feedback gain: -pReverb->m_nRvbLpfFbk
+            // - b0 is the LP forward gain: pReverb->m_nRvbLpfFwd
+            // - C is cos(2piWT) @ 5000Hz: pReverb->m_nCosWT_5KHz
+            if (pReverb->m_nRvbLpfFbk == 0) {
+                *pValue16 = 1000;
+                LOGV("get REVERB_PARAM_DECAY_HF_RATIO, pReverb->m_nRvbLpfFbk == 0, ratio %d", *pValue16);
+            } else {
+                temp = MULT_EG1_EG1(pReverb->m_nRvbLpfFbk, pReverb->m_nRvbLpfFbk);
+                temp2 = MULT_EG1_EG1(pReverb->m_nRvbLpfFbk, pReverb->m_nCosWT_5KHz)
+                        << 1;
+                temp = 32767 + temp - temp2;
+                temp = Effects_Sqrt(temp) * 181;
+                temp = (pReverb->m_nRvbLpfFwd << 15) / temp;
+                // The linear gain at 0Hz is b0 / (a1 + 1)
+                temp2 = (pReverb->m_nRvbLpfFwd << 15) / (32767
+                        - pReverb->m_nRvbLpfFbk);
+
+                temp = Effects_Linear16ToMillibels(temp);
+                temp2 = Effects_Linear16ToMillibels(temp2);
+                LOGV("get REVERB_PARAM_DECAY_HF_RATIO, gain 5KHz %d mB, gain DC %d mB", temp, temp2);
+
+                if (temp == 0)
+                    temp = 1;
+                temp = (int16_t) ((1000 * temp2) / temp);
+                if (temp > 1000)
+                    temp = 1000;
+
+                *pValue16 = temp;
+                LOGV("get REVERB_PARAM_DECAY_HF_RATIO, ratio %d", *pValue16);
+            }
+
+            if (param == REVERB_PARAM_DECAY_HF_RATIO) {
+                break;
+            }
+            pValue16 = &pProperties->reflectionsLevel;
+            /* FALL THROUGH */
+
+        case REVERB_PARAM_REFLECTIONS_LEVEL:
+            *pValue16 = Effects_Linear16ToMillibels(pReverb->m_nEarlyGain);
+
+            LOGV("get REVERB_PARAM_REFLECTIONS_LEVEL, %d", *pValue16);
+            if (param == REVERB_PARAM_REFLECTIONS_LEVEL) {
+                break;
+            }
+            pValue32 = &pProperties->reflectionsDelay;
+            /* FALL THROUGH */
+
+        case REVERB_PARAM_REFLECTIONS_DELAY:
+            // convert samples to ms
+            *pValue32 = (pReverb->m_nEarlyDelay * 1000) / pReverb->m_nSamplingRate;
+
+            LOGV("get REVERB_PARAM_REFLECTIONS_DELAY, samples %d, ms %d", pReverb->m_nEarlyDelay, *pValue32);
+
+            if (param == REVERB_PARAM_REFLECTIONS_DELAY) {
+                break;
+            }
+            pValue16 = &pProperties->reverbLevel;
+            /* FALL THROUGH */
+
+        case REVERB_PARAM_REVERB_LEVEL:
+            // Convert linear gain to millibels
+            *pValue16 = Effects_Linear16ToMillibels(pReverb->m_nLateGain << 2);
+
+            LOGV("get REVERB_PARAM_REVERB_LEVEL %d", *pValue16);
+
+            if (param == REVERB_PARAM_REVERB_LEVEL) {
+                break;
+            }
+            pValue32 = &pProperties->reverbDelay;
+            /* FALL THROUGH */
+
+        case REVERB_PARAM_REVERB_DELAY:
+            // convert samples to ms
+            *pValue32 = (pReverb->m_nLateDelay * 1000) / pReverb->m_nSamplingRate;
+
+            LOGV("get REVERB_PARAM_REVERB_DELAY, samples %d, ms %d", pReverb->m_nLateDelay, *pValue32);
+
+            if (param == REVERB_PARAM_REVERB_DELAY) {
+                break;
+            }
+            pValue16 = &pProperties->diffusion;
+            /* FALL THROUGH */
+
+        case REVERB_PARAM_DIFFUSION:
+            temp = (int16_t) ((1000 * (pReverb->m_sAp0.m_nApGain - AP0_GAIN_BASE))
+                    / AP0_GAIN_RANGE);
+
+            if (temp < 0)
+                temp = 0;
+            if (temp > 1000)
+                temp = 1000;
+
+            *pValue16 = temp;
+            LOGV("get REVERB_PARAM_DIFFUSION, %d, AP0 gain %d", *pValue16, pReverb->m_sAp0.m_nApGain);
+
+            if (param == REVERB_PARAM_DIFFUSION) {
+                break;
+            }
+            pValue16 = &pProperties->density;
+            /* FALL THROUGH */
+
+        case REVERB_PARAM_DENSITY:
+            // Calculate AP delay in time units
+            temp = ((pReverb->m_sAp0.m_zApOut - pReverb->m_sAp0.m_zApIn) << 16)
+                    / pReverb->m_nSamplingRate;
+
+            temp = (int16_t) ((1000 * (temp - AP0_TIME_BASE)) / AP0_TIME_RANGE);
+
+            if (temp < 0)
+                temp = 0;
+            if (temp > 1000)
+                temp = 1000;
+
+            *pValue16 = temp;
+
+            LOGV("get REVERB_PARAM_DENSITY, %d, AP0 delay smps %d", *pValue16, pReverb->m_sAp0.m_zApOut - pReverb->m_sAp0.m_zApIn);
+            break;
+
+        default:
+            break;
+        }
+    }
+
+    *pSize = size;
+
+    LOGV("Reverb_getParameter, context %p, param %d, value %d",
+            pReverb, param, *(int *)pValue);
+
+    return 0;
+} /* end Reverb_getParameter */
+
+/*----------------------------------------------------------------------------
+ * Reverb_setParameter()
+ *----------------------------------------------------------------------------
+ * Purpose:
+ * Set a Reverb parameter
+ *
+ * Inputs:
+ *  pReverb       - handle to instance data
+ *  param         - parameter
+ *  pValue        - pointer to parameter value
+ *  size          - value size
+ *
+ * Outputs:
+ *
+ *
+ * Side Effects:
+ *
+ *----------------------------------------------------------------------------
+ */
+int Reverb_setParameter(reverb_object_t *pReverb, int32_t param, size_t size,
+        void *pValue) {
+    int32_t value32;
+    int16_t value16;
+    t_reverb_properties *pProperties;
+    int32_t i;
+    int32_t temp;
+    int32_t temp2;
+    reverb_preset_t *pPreset;
+    int maxSamples;
+    int32_t averageDelay;
+    size_t paramSize;
+
+    LOGV("Reverb_setParameter, context %p, param %d, value16 %d, value32 %d",
+            pReverb, param, *(int16_t *)pValue, *(int32_t *)pValue);
+
+    if (pReverb->m_Preset) {
+        if (param != REVERB_PARAM_PRESET || size != sizeof(int16_t)) {
+            return -EINVAL;
+        }
+        value16 = *(int16_t *)pValue;
+        LOGV("set REVERB_PARAM_PRESET, preset %d", value16);
+        if (value16 < REVERB_PRESET_NONE || value16 > REVERB_PRESET_PLATE) {
+            return -EINVAL;
+        }
+        // REVERB_PRESET_NONE is mapped to bypass
+        if (value16 == REVERB_PRESET_NONE) {
+            pReverb->m_bBypass = 1;
+        } else {
+            pReverb->m_bBypass = 0;
+            pReverb->m_nNextRoom = value16 - 1;
+        }
+    } else {
+        switch (param) {
+        case REVERB_PARAM_ROOM_LEVEL:
+        case REVERB_PARAM_ROOM_HF_LEVEL:
+        case REVERB_PARAM_DECAY_HF_RATIO:
+        case REVERB_PARAM_REFLECTIONS_LEVEL:
+        case REVERB_PARAM_REVERB_LEVEL:
+        case REVERB_PARAM_DIFFUSION:
+        case REVERB_PARAM_DENSITY:
+            paramSize = sizeof(int16_t);
+            break;
+
+        case REVERB_PARAM_BYPASS:
+        case REVERB_PARAM_DECAY_TIME:
+        case REVERB_PARAM_REFLECTIONS_DELAY:
+        case REVERB_PARAM_REVERB_DELAY:
+            paramSize = sizeof(int32_t);
+            break;
+
+        case REVERB_PARAM_PROPERTIES:
+            paramSize = sizeof(t_reverb_properties);
+            break;
+
+        default:
+            return -EINVAL;
+        }
+
+        if (size != paramSize) {
+            return -EINVAL;
+        }
+
+        if (paramSize == sizeof(int16_t)) {
+            value16 = *(int16_t *) pValue;
+        } else if (paramSize == sizeof(int32_t)) {
+            value32 = *(int32_t *) pValue;
+        } else {
+            pProperties = (t_reverb_properties *) pValue;
+        }
+
+        pPreset = &pReverb->m_sPreset.m_sPreset[pReverb->m_nNextRoom];
+
+        switch (param) {
+        case REVERB_PARAM_BYPASS:
+            pReverb->m_bBypass = (uint16_t)value32;
+            break;
+
+        case REVERB_PARAM_PROPERTIES:
+            value16 = pProperties->roomLevel;
+            /* FALL THROUGH */
+
+        case REVERB_PARAM_ROOM_LEVEL:
+            // Convert millibels to linear 16 bit signed => m_nRoomLpfFwd
+            if (value16 > 0)
+                return -EINVAL;
+
+            temp = Effects_MillibelsToLinear16(value16);
+
+            pReverb->m_nRoomLpfFwd
+                    = MULT_EG1_EG1(temp, (32767 - pReverb->m_nRoomLpfFbk));
+
+            LOGV("REVERB_PARAM_ROOM_LEVEL, gain %d, new m_nRoomLpfFwd %d, m_nRoomLpfFbk %d", temp, pReverb->m_nRoomLpfFwd, pReverb->m_nRoomLpfFbk);
+            if (param == REVERB_PARAM_ROOM_LEVEL)
+                break;
+            value16 = pProperties->roomHFLevel;
+            /* FALL THROUGH */
+
+        case REVERB_PARAM_ROOM_HF_LEVEL:
+
+            // Limit to 0 , -40dB range because of low pass implementation
+            if (value16 > 0 || value16 < -4000)
+                return -EINVAL;
+            // Convert attenuation @ 5000H expressed in millibels to => m_nRoomLpfFbk
+            // m_nRoomLpfFbk is -a1 where a1 is the solution of:
+            // a1^2 + 2*(C-dG^2)/(1-dG^2)*a1 + 1 = 0 where:
+            // - C is cos(2*pi*5000/Fs) (pReverb->m_nCosWT_5KHz)
+            // - dG is G0/Gf (G0 is the linear gain at DC and Gf is the wanted gain at 5000Hz)
+
+            // Save current DC gain m_nRoomLpfFwd / (32767 - m_nRoomLpfFbk) to keep it unchanged
+            // while changing HF level
+            temp2 = (pReverb->m_nRoomLpfFwd << 15) / (32767
+                    - pReverb->m_nRoomLpfFbk);
+            if (value16 == 0) {
+                pReverb->m_nRoomLpfFbk = 0;
+            } else {
+                int32_t dG2, b, delta;
+
+                // dG^2
+                temp = Effects_MillibelsToLinear16(value16);
+                LOGV("REVERB_PARAM_ROOM_HF_LEVEL, HF gain %d", temp);
+                temp = (1 << 30) / temp;
+                LOGV("REVERB_PARAM_ROOM_HF_LEVEL, 1/ HF gain %d", temp);
+                dG2 = (int32_t) (((int64_t) temp * (int64_t) temp) >> 15);
+                LOGV("REVERB_PARAM_ROOM_HF_LEVEL, 1/ HF gain ^ 2 %d", dG2);
+                // b = 2*(C-dG^2)/(1-dG^2)
+                b = (int32_t) ((((int64_t) 1 << (15 + 1))
+                        * ((int64_t) pReverb->m_nCosWT_5KHz - (int64_t) dG2))
+                        / ((int64_t) 32767 - (int64_t) dG2));
+
+                // delta = b^2 - 4
+                delta = (int32_t) ((((int64_t) b * (int64_t) b) >> 15) - (1 << (15
+                        + 2)));
+
+                LOGV_IF(delta > (1<<30), " delta overflow %d", delta);
+
+                LOGV("REVERB_PARAM_ROOM_HF_LEVEL, dG2 %d, b %d, delta %d, m_nCosWT_5KHz %d", dG2, b, delta, pReverb->m_nCosWT_5KHz);
+                // m_nRoomLpfFbk = -a1 = - (- b + sqrt(delta)) / 2
+                pReverb->m_nRoomLpfFbk = (b - Effects_Sqrt(delta) * 181) >> 1;
+            }
+            LOGV("REVERB_PARAM_ROOM_HF_LEVEL, olg DC gain %d new m_nRoomLpfFbk %d, old m_nRoomLpfFwd %d",
+                    temp2, pReverb->m_nRoomLpfFbk, pReverb->m_nRoomLpfFwd);
+
+            pReverb->m_nRoomLpfFwd
+                    = MULT_EG1_EG1(temp2, (32767 - pReverb->m_nRoomLpfFbk));
+            LOGV("REVERB_PARAM_ROOM_HF_LEVEL, new m_nRoomLpfFwd %d", pReverb->m_nRoomLpfFwd);
+
+            if (param == REVERB_PARAM_ROOM_HF_LEVEL)
+                break;
+            value32 = pProperties->decayTime;
+            /* FALL THROUGH */
+
+        case REVERB_PARAM_DECAY_TIME:
+
+            // Convert milliseconds to => m_nRvbLpfFwd (function of m_nRvbLpfFbk)
+            // convert ms to samples
+            value32 = (value32 * pReverb->m_nSamplingRate) / 1000;
+
+            // calculate valid decay time range as a function of current reverb delay and
+            // max feed back gain. Min value <=> -40dB in one pass, Max value <=> feedback gain = -1 dB
+            // Calculate attenuation for each round in late reverb given a total attenuation of -6000 millibels.
+            // g = -6000 d/DT , g gain in millibels, d reverb delay, DT decay time
+            averageDelay = pReverb->m_nLateDelay - pReverb->m_nMaxExcursion;
+            averageDelay += ((pReverb->m_sAp0.m_zApOut - pReverb->m_sAp0.m_zApIn)
+                    + (pReverb->m_sAp1.m_zApOut - pReverb->m_sAp1.m_zApIn)) >> 1;
+
+            temp = (-6000 * averageDelay) / value32;
+            LOGV("REVERB_PARAM_DECAY_TIME, delay smps %d, DT smps %d, gain mB %d",averageDelay, value32, temp);
+            if (temp < -4000 || temp > -100)
+                return -EINVAL;
+
+            // calculate low pass gain by adding reverb input attenuation (pReverb->m_nLateGain) and substrating output
+            // xfade and sum gain (max +9dB)
+            temp -= Effects_Linear16ToMillibels(pReverb->m_nLateGain) + 900;
+            temp = Effects_MillibelsToLinear16(temp);
+
+            // DC gain (temp) = b0 / (1 + a1) = pReverb->m_nRvbLpfFwd / (32767 - pReverb->m_nRvbLpfFbk)
+            pReverb->m_nRvbLpfFwd
+                    = MULT_EG1_EG1(temp, (32767 - pReverb->m_nRvbLpfFbk));
+
+            LOGV("REVERB_PARAM_DECAY_TIME, gain %d, new m_nRvbLpfFwd %d, old m_nRvbLpfFbk %d, reverb gain %d", temp, pReverb->m_nRvbLpfFwd, pReverb->m_nRvbLpfFbk, Effects_Linear16ToMillibels(pReverb->m_nLateGain));
+
+            if (param == REVERB_PARAM_DECAY_TIME)
+                break;
+            value16 = pProperties->decayHFRatio;
+            /* FALL THROUGH */
+
+        case REVERB_PARAM_DECAY_HF_RATIO:
+
+            // We limit max value to 1000 because reverb filter is lowpass only
+            if (value16 < 100 || value16 > 1000)
+                return -EINVAL;
+            // Convert per mille to => m_nLpfFwd, m_nLpfFbk
+
+            // Save current DC gain m_nRoomLpfFwd / (32767 - m_nRoomLpfFbk) to keep it unchanged
+            // while changing HF level
+            temp2 = (pReverb->m_nRvbLpfFwd << 15) / (32767 - pReverb->m_nRvbLpfFbk);
+
+            if (value16 == 1000) {
+                pReverb->m_nRvbLpfFbk = 0;
+            } else {
+                int32_t dG2, b, delta;
+
+                temp = Effects_Linear16ToMillibels(temp2);
+                // G_5000Hz = G_DC * (1000/REVERB_PARAM_DECAY_HF_RATIO) in millibels
+
+                value32 = ((int32_t) 1000 << 15) / (int32_t) value16;
+                LOGV("REVERB_PARAM_DECAY_HF_RATIO, DC gain %d, DC gain mB %d, 1000/R %d", temp2, temp, value32);
+
+                temp = (int32_t) (((int64_t) temp * (int64_t) value32) >> 15);
+
+                if (temp < -4000) {
+                    LOGV("REVERB_PARAM_DECAY_HF_RATIO HF gain overflow %d mB", temp);
+                    temp = -4000;
+                }
+
+                temp = Effects_MillibelsToLinear16(temp);
+                LOGV("REVERB_PARAM_DECAY_HF_RATIO, HF gain %d", temp);
+                // dG^2
+                temp = (temp2 << 15) / temp;
+                dG2 = (int32_t) (((int64_t) temp * (int64_t) temp) >> 15);
+
+                // b = 2*(C-dG^2)/(1-dG^2)
+                b = (int32_t) ((((int64_t) 1 << (15 + 1))
+                        * ((int64_t) pReverb->m_nCosWT_5KHz - (int64_t) dG2))
+                        / ((int64_t) 32767 - (int64_t) dG2));
+
+                // delta = b^2 - 4
+                delta = (int32_t) ((((int64_t) b * (int64_t) b) >> 15) - (1 << (15
+                        + 2)));
+
+                // m_nRoomLpfFbk = -a1 = - (- b + sqrt(delta)) / 2
+                pReverb->m_nRvbLpfFbk = (b - Effects_Sqrt(delta) * 181) >> 1;
+
+                LOGV("REVERB_PARAM_DECAY_HF_RATIO, dG2 %d, b %d, delta %d", dG2, b, delta);
+
+            }
+
+            LOGV("REVERB_PARAM_DECAY_HF_RATIO, gain %d, m_nRvbLpfFbk %d, m_nRvbLpfFwd %d", temp2, pReverb->m_nRvbLpfFbk, pReverb->m_nRvbLpfFwd);
+
+            pReverb->m_nRvbLpfFwd
+                    = MULT_EG1_EG1(temp2, (32767 - pReverb->m_nRvbLpfFbk));
+
+            if (param == REVERB_PARAM_DECAY_HF_RATIO)
+                break;
+            value16 = pProperties->reflectionsLevel;
+            /* FALL THROUGH */
+
+        case REVERB_PARAM_REFLECTIONS_LEVEL:
+            // We limit max value to 0 because gain is limited to 0dB
+            if (value16 > 0 || value16 < -6000)
+                return -EINVAL;
+
+            // Convert millibels to linear 16 bit signed and recompute m_sEarlyL.m_nGain[i] and m_sEarlyR.m_nGain[i].
+            value16 = Effects_MillibelsToLinear16(value16);
+            for (i = 0; i < REVERB_MAX_NUM_REFLECTIONS; i++) {
+                pReverb->m_sEarlyL.m_nGain[i]
+                        = MULT_EG1_EG1(pPreset->m_sEarlyL.m_nGain[i],value16);
+                pReverb->m_sEarlyR.m_nGain[i]
+                        = MULT_EG1_EG1(pPreset->m_sEarlyR.m_nGain[i],value16);
+            }
+            pReverb->m_nEarlyGain = value16;
+            LOGV("REVERB_PARAM_REFLECTIONS_LEVEL, m_nEarlyGain %d", pReverb->m_nEarlyGain);
+
+            if (param == REVERB_PARAM_REFLECTIONS_LEVEL)
+                break;
+            value32 = pProperties->reflectionsDelay;
+            /* FALL THROUGH */
+
+        case REVERB_PARAM_REFLECTIONS_DELAY:
+            // We limit max value MAX_EARLY_TIME
+            // convert ms to time units
+            temp = (value32 * 65536) / 1000;
+            if (temp < 0 || temp > MAX_EARLY_TIME)
+                return -EINVAL;
+
+            maxSamples = (int32_t) (MAX_EARLY_TIME * pReverb->m_nSamplingRate)
+                    >> 16;
+            temp = (temp * pReverb->m_nSamplingRate) >> 16;
+            for (i = 0; i < REVERB_MAX_NUM_REFLECTIONS; i++) {
+                temp2 = temp + (((int32_t) pPreset->m_sEarlyL.m_zDelay[i]
+                        * pReverb->m_nSamplingRate) >> 16);
+                if (temp2 > maxSamples)
+                    temp2 = maxSamples;
+                pReverb->m_sEarlyL.m_zDelay[i] = pReverb->m_nEarly0in + temp2;
+                temp2 = temp + (((int32_t) pPreset->m_sEarlyR.m_zDelay[i]
+                        * pReverb->m_nSamplingRate) >> 16);
+                if (temp2 > maxSamples)
+                    temp2 = maxSamples;
+                pReverb->m_sEarlyR.m_zDelay[i] = pReverb->m_nEarly1in + temp2;
+            }
+            pReverb->m_nEarlyDelay = temp;
+
+            LOGV("REVERB_PARAM_REFLECTIONS_DELAY, m_nEarlyDelay smps %d max smp delay %d", pReverb->m_nEarlyDelay, maxSamples);
+
+            // Convert milliseconds to sample count => m_nEarlyDelay
+            if (param == REVERB_PARAM_REFLECTIONS_DELAY)
+                break;
+            value16 = pProperties->reverbLevel;
+            /* FALL THROUGH */
+
+        case REVERB_PARAM_REVERB_LEVEL:
+            // We limit max value to 0 because gain is limited to 0dB
+            if (value16 > 0 || value16 < -6000)
+                return -EINVAL;
+            // Convert millibels to linear 16 bits (gange 0 - 8191) => m_nLateGain.
+            pReverb->m_nLateGain = Effects_MillibelsToLinear16(value16) >> 2;
+
+            LOGV("REVERB_PARAM_REVERB_LEVEL, m_nLateGain %d", pReverb->m_nLateGain);
+
+            if (param == REVERB_PARAM_REVERB_LEVEL)
+                break;
+            value32 = pProperties->reverbDelay;
+            /* FALL THROUGH */
+
+        case REVERB_PARAM_REVERB_DELAY:
+            // We limit max value to MAX_DELAY_TIME
+            // convert ms to time units
+            temp = (value32 * 65536) / 1000;
+            if (temp < 0 || temp > MAX_DELAY_TIME)
+                return -EINVAL;
+
+            maxSamples = (int32_t) (MAX_DELAY_TIME * pReverb->m_nSamplingRate)
+                    >> 16;
+            temp = (temp * pReverb->m_nSamplingRate) >> 16;
+            if ((temp + pReverb->m_nMaxExcursion) > maxSamples) {
+                temp = maxSamples - pReverb->m_nMaxExcursion;
+            }
+            if (temp < pReverb->m_nMaxExcursion) {
+                temp = pReverb->m_nMaxExcursion;
+            }
+
+            temp -= pReverb->m_nLateDelay;
+            pReverb->m_nDelay0Out += temp;
+            pReverb->m_nDelay1Out += temp;
+            pReverb->m_nLateDelay += temp;
+
+            LOGV("REVERB_PARAM_REVERB_DELAY, m_nLateDelay smps %d max smp delay %d", pReverb->m_nLateDelay, maxSamples);
+
+            // Convert milliseconds to sample count => m_nDelay1Out + m_nMaxExcursion
+            if (param == REVERB_PARAM_REVERB_DELAY)
+                break;
+
+            value16 = pProperties->diffusion;
+            /* FALL THROUGH */
+
+        case REVERB_PARAM_DIFFUSION:
+            if (value16 < 0 || value16 > 1000)
+                return -EINVAL;
+
+            // Convert per mille to m_sAp0.m_nApGain, m_sAp1.m_nApGain
+            pReverb->m_sAp0.m_nApGain = AP0_GAIN_BASE + ((int32_t) value16
+                    * AP0_GAIN_RANGE) / 1000;
+            pReverb->m_sAp1.m_nApGain = AP1_GAIN_BASE + ((int32_t) value16
+                    * AP1_GAIN_RANGE) / 1000;
+
+            LOGV("REVERB_PARAM_DIFFUSION, m_sAp0.m_nApGain %d m_sAp1.m_nApGain %d", pReverb->m_sAp0.m_nApGain, pReverb->m_sAp1.m_nApGain);
+
+            if (param == REVERB_PARAM_DIFFUSION)
+                break;
+
+            value16 = pProperties->density;
+            /* FALL THROUGH */
+
+        case REVERB_PARAM_DENSITY:
+            if (value16 < 0 || value16 > 1000)
+                return -EINVAL;
+
+            // Convert per mille to m_sAp0.m_zApOut, m_sAp1.m_zApOut
+            maxSamples = (int32_t) (MAX_AP_TIME * pReverb->m_nSamplingRate) >> 16;
+
+            temp = AP0_TIME_BASE + ((int32_t) value16 * AP0_TIME_RANGE) / 1000;
+            /*lint -e{702} shift for performance */
+            temp = (temp * pReverb->m_nSamplingRate) >> 16;
+            if (temp > maxSamples)
+                temp = maxSamples;
+            pReverb->m_sAp0.m_zApOut = (uint16_t) (pReverb->m_sAp0.m_zApIn + temp);
+
+            LOGV("REVERB_PARAM_DENSITY, Ap0 delay smps %d", temp);
+
+            temp = AP1_TIME_BASE + ((int32_t) value16 * AP1_TIME_RANGE) / 1000;
+            /*lint -e{702} shift for performance */
+            temp = (temp * pReverb->m_nSamplingRate) >> 16;
+            if (temp > maxSamples)
+                temp = maxSamples;
+            pReverb->m_sAp1.m_zApOut = (uint16_t) (pReverb->m_sAp1.m_zApIn + temp);
+
+            LOGV("Ap1 delay smps %d", temp);
+
+            break;
+
+        default:
+            break;
+        }
+    }
+
+    return 0;
+} /* end Reverb_setParameter */
+
+/*----------------------------------------------------------------------------
+ * ReverbUpdateXfade
+ *----------------------------------------------------------------------------
+ * Purpose:
+ * Update the xfade parameters as required
+ *
+ * Inputs:
+ * nNumSamplesToAdd - number of samples to write to buffer
+ *
+ * Outputs:
+ *
+ *
+ * Side Effects:
+ * - xfade parameters will be changed
+ *
+ *----------------------------------------------------------------------------
+ */
+static int ReverbUpdateXfade(reverb_object_t *pReverb, int nNumSamplesToAdd) {
+    uint16_t nOffset;
+    int16_t tempCos;
+    int16_t tempSin;
+
+    if (pReverb->m_nXfadeCounter >= pReverb->m_nXfadeInterval) {
+        /* update interval has elapsed, so reset counter */
+        pReverb->m_nXfadeCounter = 0;
+
+        // Pin the sin,cos values to min / max values to ensure that the
+        // modulated taps' coefs are zero (thus no clicks)
+        if (pReverb->m_nPhaseIncrement > 0) {
+            // if phase increment > 0, then sin -> 1, cos -> 0
+            pReverb->m_nSin = 32767;
+            pReverb->m_nCos = 0;
+
+            // reset the phase to match the sin, cos values
+            pReverb->m_nPhase = 32767;
+
+            // modulate the cross taps because their tap coefs are zero
+            nOffset = ReverbCalculateNoise(pReverb);
+
+            pReverb->m_zD1Cross = pReverb->m_nDelay1Out
+                    - pReverb->m_nMaxExcursion + nOffset;
+
+            nOffset = ReverbCalculateNoise(pReverb);
+
+            pReverb->m_zD0Cross = pReverb->m_nDelay0Out
+                    - pReverb->m_nMaxExcursion - nOffset;
+        } else {
+            // if phase increment < 0, then sin -> 0, cos -> 1
+            pReverb->m_nSin = 0;
+            pReverb->m_nCos = 32767;
+
+            // reset the phase to match the sin, cos values
+            pReverb->m_nPhase = -32768;
+
+            // modulate the self taps because their tap coefs are zero
+            nOffset = ReverbCalculateNoise(pReverb);
+
+            pReverb->m_zD0Self = pReverb->m_nDelay0Out
+                    - pReverb->m_nMaxExcursion - nOffset;
+
+            nOffset = ReverbCalculateNoise(pReverb);
+
+            pReverb->m_zD1Self = pReverb->m_nDelay1Out
+                    - pReverb->m_nMaxExcursion + nOffset;
+
+        } // end if-else (pReverb->m_nPhaseIncrement > 0)
+
+        // Reverse the direction of the sin,cos so that the
+        // tap whose coef was previously increasing now decreases
+        // and vice versa
+        pReverb->m_nPhaseIncrement = -pReverb->m_nPhaseIncrement;
+
+    } // end if counter >= update interval
+
+    //compute what phase will be next time
+    pReverb->m_nPhase += pReverb->m_nPhaseIncrement;
+
+    //calculate what the new sin and cos need to reach by the next update
+    ReverbCalculateSinCos(pReverb->m_nPhase, &tempSin, &tempCos);
+
+    //calculate the per-sample increment required to get there by the next update
+    /*lint -e{702} shift for performance */
+    pReverb->m_nSinIncrement = (tempSin - pReverb->m_nSin)
+            >> pReverb->m_nUpdatePeriodInBits;
+
+    /*lint -e{702} shift for performance */
+    pReverb->m_nCosIncrement = (tempCos - pReverb->m_nCos)
+            >> pReverb->m_nUpdatePeriodInBits;
+
+    /* increment update counter */
+    pReverb->m_nXfadeCounter += (uint16_t) nNumSamplesToAdd;
+
+    return 0;
+
+} /* end ReverbUpdateXfade */
+
+/*----------------------------------------------------------------------------
+ * ReverbCalculateNoise
+ *----------------------------------------------------------------------------
+ * Purpose:
+ * Calculate a noise sample and limit its value
+ *
+ * Inputs:
+ * nMaxExcursion - noise value is limited to this value
+ * pnNoise - return new noise sample in this (not limited)
+ *
+ * Outputs:
+ * new limited noise value
+ *
+ * Side Effects:
+ * - *pnNoise noise value is updated
+ *
+ *----------------------------------------------------------------------------
+ */
+static uint16_t ReverbCalculateNoise(reverb_object_t *pReverb) {
+    int16_t nNoise = pReverb->m_nNoise;
+
+    // calculate new noise value
+    if (pReverb->m_bUseNoise) {
+        nNoise = (int16_t) (nNoise * 5 + 1);
+    } else {
+        nNoise = 0;
+    }
+
+    pReverb->m_nNoise = nNoise;
+    // return the limited noise value
+    return (pReverb->m_nMaxExcursion & nNoise);
+
+} /* end ReverbCalculateNoise */
+
+/*----------------------------------------------------------------------------
+ * ReverbCalculateSinCos
+ *----------------------------------------------------------------------------
+ * Purpose:
+ * Calculate a new sin and cosine value based on the given phase
+ *
+ * Inputs:
+ * nPhase   - phase angle
+ * pnSin    - input old value, output new value
+ * pnCos    - input old value, output new value
+ *
+ * Outputs:
+ *
+ * Side Effects:
+ * - *pnSin, *pnCos are updated
+ *
+ *----------------------------------------------------------------------------
+ */
+static int ReverbCalculateSinCos(int16_t nPhase, int16_t *pnSin, int16_t *pnCos) {
+    int32_t nTemp;
+    int32_t nNetAngle;
+
+    //  -1 <=  nPhase  < 1
+    // However, for the calculation, we need a value
+    // that ranges from -1/2 to +1/2, so divide the phase by 2
+    /*lint -e{702} shift for performance */
+    nNetAngle = nPhase >> 1;
+
+    /*
+     Implement the following
+     sin(x) = (2-4*c)*x^2 + c + x
+     cos(x) = (2-4*c)*x^2 + c - x
+
+     where  c = 1/sqrt(2)
+     using the a0 + x*(a1 + x*a2) approach
+     */
+
+    /* limit the input "angle" to be between -0.5 and +0.5 */
+    if (nNetAngle > EG1_HALF) {
+        nNetAngle = EG1_HALF;
+    } else if (nNetAngle < EG1_MINUS_HALF) {
+        nNetAngle = EG1_MINUS_HALF;
+    }
+
+    /* calculate sin */
+    nTemp = EG1_ONE + MULT_EG1_EG1(REVERB_PAN_G2, nNetAngle);
+    nTemp = REVERB_PAN_G0 + MULT_EG1_EG1(nTemp, nNetAngle);
+    *pnSin = (int16_t) SATURATE_EG1(nTemp);
+
+    /* calculate cos */
+    nTemp = -EG1_ONE + MULT_EG1_EG1(REVERB_PAN_G2, nNetAngle);
+    nTemp = REVERB_PAN_G0 + MULT_EG1_EG1(nTemp, nNetAngle);
+    *pnCos = (int16_t) SATURATE_EG1(nTemp);
+
+    return 0;
+} /* end ReverbCalculateSinCos */
+
+/*----------------------------------------------------------------------------
+ * Reverb
+ *----------------------------------------------------------------------------
+ * Purpose:
+ * apply reverb to the given signal
+ *
+ * Inputs:
+ * nNu
+ * pnSin    - input old value, output new value
+ * pnCos    - input old value, output new value
+ *
+ * Outputs:
+ * number of samples actually reverberated
+ *
+ * Side Effects:
+ *
+ *----------------------------------------------------------------------------
+ */
+static int Reverb(reverb_object_t *pReverb, int nNumSamplesToAdd,
+        short *pOutputBuffer, short *pInputBuffer) {
+    int32_t i;
+    int32_t nDelayOut0;
+    int32_t nDelayOut1;
+    uint16_t nBase;
+
+    uint32_t nAddr;
+    int32_t nTemp1;
+    int32_t nTemp2;
+    int32_t nApIn;
+    int32_t nApOut;
+
+    int32_t j;
+    int32_t nEarlyOut;
+
+    int32_t tempValue;
+
+    // get the base address
+    nBase = pReverb->m_nBaseIndex;
+
+    for (i = 0; i < nNumSamplesToAdd; i++) {
+        // ********** Left Allpass - start
+        nApIn = *pInputBuffer;
+        if (!pReverb->m_Aux) {
+            pInputBuffer++;
+        }
+        // store to early delay line
+        nAddr = CIRCULAR(nBase, pReverb->m_nEarly0in, pReverb->m_nBufferMask);
+        pReverb->m_nDelayLine[nAddr] = (short) nApIn;
+
+        // left input = (left dry * m_nLateGain) + right feedback from previous period
+
+        nApIn = SATURATE(nApIn + pReverb->m_nRevFbkR);
+        nApIn = MULT_EG1_EG1(nApIn, pReverb->m_nLateGain);
+
+        // fetch allpass delay line out
+        //nAddr = CIRCULAR(nBase, psAp0->m_zApOut, pReverb->m_nBufferMask);
+        nAddr
+                = CIRCULAR(nBase, pReverb->m_sAp0.m_zApOut, pReverb->m_nBufferMask);
+        nDelayOut0 = pReverb->m_nDelayLine[nAddr];
+
+        // calculate allpass feedforward; subtract the feedforward result
+        nTemp1 = MULT_EG1_EG1(nApIn, pReverb->m_sAp0.m_nApGain);
+        nApOut = SATURATE(nDelayOut0 - nTemp1); // allpass output
+
+        // calculate allpass feedback; add the feedback result
+        nTemp1 = MULT_EG1_EG1(nApOut, pReverb->m_sAp0.m_nApGain);
+        nTemp1 = SATURATE(nApIn + nTemp1);
+
+        // inject into allpass delay
+        nAddr
+                = CIRCULAR(nBase, pReverb->m_sAp0.m_zApIn, pReverb->m_nBufferMask);
+        pReverb->m_nDelayLine[nAddr] = (short) nTemp1;
+
+        // inject allpass output into delay line
+        nAddr = CIRCULAR(nBase, pReverb->m_zD0In, pReverb->m_nBufferMask);
+        pReverb->m_nDelayLine[nAddr] = (short) nApOut;
+
+        // ********** Left Allpass - end
+
+        // ********** Right Allpass - start
+        nApIn = (*pInputBuffer++);
+        // store to early delay line
+        nAddr = CIRCULAR(nBase, pReverb->m_nEarly1in, pReverb->m_nBufferMask);
+        pReverb->m_nDelayLine[nAddr] = (short) nApIn;
+
+        // right input = (right dry * m_nLateGain) + left feedback from previous period
+        /*lint -e{702} use shift for performance */
+        nApIn = SATURATE(nApIn + pReverb->m_nRevFbkL);
+        nApIn = MULT_EG1_EG1(nApIn, pReverb->m_nLateGain);
+
+        // fetch allpass delay line out
+        nAddr
+                = CIRCULAR(nBase, pReverb->m_sAp1.m_zApOut, pReverb->m_nBufferMask);
+        nDelayOut1 = pReverb->m_nDelayLine[nAddr];
+
+        // calculate allpass feedforward; subtract the feedforward result
+        nTemp1 = MULT_EG1_EG1(nApIn, pReverb->m_sAp1.m_nApGain);
+        nApOut = SATURATE(nDelayOut1 - nTemp1); // allpass output
+
+        // calculate allpass feedback; add the feedback result
+        nTemp1 = MULT_EG1_EG1(nApOut, pReverb->m_sAp1.m_nApGain);
+        nTemp1 = SATURATE(nApIn + nTemp1);
+
+        // inject into allpass delay
+        nAddr
+                = CIRCULAR(nBase, pReverb->m_sAp1.m_zApIn, pReverb->m_nBufferMask);
+        pReverb->m_nDelayLine[nAddr] = (short) nTemp1;
+
+        // inject allpass output into delay line
+        nAddr = CIRCULAR(nBase, pReverb->m_zD1In, pReverb->m_nBufferMask);
+        pReverb->m_nDelayLine[nAddr] = (short) nApOut;
+
+        // ********** Right Allpass - end
+
+        // ********** D0 output - start
+        // fetch delay line self out
+        nAddr = CIRCULAR(nBase, pReverb->m_zD0Self, pReverb->m_nBufferMask);
+        nDelayOut0 = pReverb->m_nDelayLine[nAddr];
+
+        // calculate delay line self out
+        nTemp1 = MULT_EG1_EG1(nDelayOut0, pReverb->m_nSin);
+
+        // fetch delay line cross out
+        nAddr = CIRCULAR(nBase, pReverb->m_zD1Cross, pReverb->m_nBufferMask);
+        nDelayOut0 = pReverb->m_nDelayLine[nAddr];
+
+        // calculate delay line self out
+        nTemp2 = MULT_EG1_EG1(nDelayOut0, pReverb->m_nCos);
+
+        // calculate unfiltered delay out
+        nDelayOut0 = SATURATE(nTemp1 + nTemp2);
+
+        // ********** D0 output - end
+
+        // ********** D1 output - start
+        // fetch delay line self out
+        nAddr = CIRCULAR(nBase, pReverb->m_zD1Self, pReverb->m_nBufferMask);
+        nDelayOut1 = pReverb->m_nDelayLine[nAddr];
+
+        // calculate delay line self out
+        nTemp1 = MULT_EG1_EG1(nDelayOut1, pReverb->m_nSin);
+
+        // fetch delay line cross out
+        nAddr = CIRCULAR(nBase, pReverb->m_zD0Cross, pReverb->m_nBufferMask);
+        nDelayOut1 = pReverb->m_nDelayLine[nAddr];
+
+        // calculate delay line self out
+        nTemp2 = MULT_EG1_EG1(nDelayOut1, pReverb->m_nCos);
+
+        // calculate unfiltered delay out
+        nDelayOut1 = SATURATE(nTemp1 + nTemp2);
+
+        // ********** D1 output - end
+
+        // ********** mixer and feedback - start
+        // sum is fedback to right input (R + L)
+        nDelayOut0 = (short) SATURATE(nDelayOut0 + nDelayOut1);
+
+        // difference is feedback to left input (R - L)
+        /*lint -e{685} lint complains that it can't saturate negative */
+        nDelayOut1 = (short) SATURATE(nDelayOut1 - nDelayOut0);
+
+        // ********** mixer and feedback - end
+
+        // calculate lowpass filter (mixer scale factor included in LPF feedforward)
+        nTemp1 = MULT_EG1_EG1(nDelayOut0, pReverb->m_nRvbLpfFwd);
+
+        nTemp2 = MULT_EG1_EG1(pReverb->m_nRevFbkL, pReverb->m_nRvbLpfFbk);
+
+        // calculate filtered delay out and simultaneously update LPF state variable
+        // filtered delay output is stored in m_nRevFbkL
+        pReverb->m_nRevFbkL = (short) SATURATE(nTemp1 + nTemp2);
+
+        // calculate lowpass filter (mixer scale factor included in LPF feedforward)
+        nTemp1 = MULT_EG1_EG1(nDelayOut1, pReverb->m_nRvbLpfFwd);
+
+        nTemp2 = MULT_EG1_EG1(pReverb->m_nRevFbkR, pReverb->m_nRvbLpfFbk);
+
+        // calculate filtered delay out and simultaneously update LPF state variable
+        // filtered delay output is stored in m_nRevFbkR
+        pReverb->m_nRevFbkR = (short) SATURATE(nTemp1 + nTemp2);
+
+        // ********** start early reflection generator, left
+        //psEarly = &(pReverb->m_sEarlyL);
+
+
+        for (j = 0; j < REVERB_MAX_NUM_REFLECTIONS; j++) {
+            // fetch delay line out
+            //nAddr = CIRCULAR(nBase, psEarly->m_zDelay[j], pReverb->m_nBufferMask);
+            nAddr
+                    = CIRCULAR(nBase, pReverb->m_sEarlyL.m_zDelay[j], pReverb->m_nBufferMask);
+
+            nTemp1 = pReverb->m_nDelayLine[nAddr];
+
+            // calculate reflection
+            //nTemp1 = MULT_EG1_EG1(nDelayOut0, psEarly->m_nGain[j]);
+            nTemp1 = MULT_EG1_EG1(nTemp1, pReverb->m_sEarlyL.m_nGain[j]);
+
+            nDelayOut0 = SATURATE(nDelayOut0 + nTemp1);
+
+        } // end for (j=0; j < REVERB_MAX_NUM_REFLECTIONS; j++)
+
+        // apply lowpass to early reflections and reverb output
+        //nTemp1 = MULT_EG1_EG1(nEarlyOut, psEarly->m_nRvbLpfFwd);
+        nTemp1 = MULT_EG1_EG1(nDelayOut0, pReverb->m_nRoomLpfFwd);
+
+        //nTemp2 = MULT_EG1_EG1(psEarly->m_zLpf, psEarly->m_nLpfFbk);
+        nTemp2 = MULT_EG1_EG1(pReverb->m_zOutLpfL, pReverb->m_nRoomLpfFbk);
+
+        // calculate filtered out and simultaneously update LPF state variable
+        // filtered output is stored in m_zOutLpfL
+        pReverb->m_zOutLpfL = (short) SATURATE(nTemp1 + nTemp2);
+
+        //sum with output buffer
+        tempValue = *pOutputBuffer;
+        *pOutputBuffer++ = (short) SATURATE(tempValue+pReverb->m_zOutLpfL);
+
+        // ********** end early reflection generator, left
+
+        // ********** start early reflection generator, right
+        //psEarly = &(pReverb->m_sEarlyR);
+
+        for (j = 0; j < REVERB_MAX_NUM_REFLECTIONS; j++) {
+            // fetch delay line out
+            nAddr
+                    = CIRCULAR(nBase, pReverb->m_sEarlyR.m_zDelay[j], pReverb->m_nBufferMask);
+            nTemp1 = pReverb->m_nDelayLine[nAddr];
+
+            // calculate reflection
+            nTemp1 = MULT_EG1_EG1(nTemp1, pReverb->m_sEarlyR.m_nGain[j]);
+
+            nDelayOut1 = SATURATE(nDelayOut1 + nTemp1);
+
+        } // end for (j=0; j < REVERB_MAX_NUM_REFLECTIONS; j++)
+
+        // apply lowpass to early reflections
+        nTemp1 = MULT_EG1_EG1(nDelayOut1, pReverb->m_nRoomLpfFwd);
+
+        nTemp2 = MULT_EG1_EG1(pReverb->m_zOutLpfR, pReverb->m_nRoomLpfFbk);
+
+        // calculate filtered out and simultaneously update LPF state variable
+        // filtered output is stored in m_zOutLpfR
+        pReverb->m_zOutLpfR = (short) SATURATE(nTemp1 + nTemp2);
+
+        //sum with output buffer
+        tempValue = *pOutputBuffer;
+        *pOutputBuffer++ = (short) SATURATE(tempValue + pReverb->m_zOutLpfR);
+
+        // ********** end early reflection generator, right
+
+        // decrement base addr for next sample period
+        nBase--;
+
+        pReverb->m_nSin += pReverb->m_nSinIncrement;
+        pReverb->m_nCos += pReverb->m_nCosIncrement;
+
+    } // end for (i=0; i < nNumSamplesToAdd; i++)
+
+    // store the most up to date version
+    pReverb->m_nBaseIndex = nBase;
+
+    return 0;
+} /* end Reverb */
+
+/*----------------------------------------------------------------------------
+ * ReverbUpdateRoom
+ *----------------------------------------------------------------------------
+ * Purpose:
+ * Update the room's preset parameters as required
+ *
+ * Inputs:
+ *
+ * Outputs:
+ *
+ *
+ * Side Effects:
+ * - reverb paramters (fbk, fwd, etc) will be changed
+ * - m_nCurrentRoom := m_nNextRoom
+ *----------------------------------------------------------------------------
+ */
+static int ReverbUpdateRoom(reverb_object_t *pReverb, bool fullUpdate) {
+    int temp;
+    int i;
+    int maxSamples;
+    int earlyDelay;
+    int earlyGain;
+
+    reverb_preset_t *pPreset =
+            &pReverb->m_sPreset.m_sPreset[pReverb->m_nNextRoom];
+
+    if (fullUpdate) {
+        pReverb->m_nRvbLpfFwd = pPreset->m_nRvbLpfFwd;
+        pReverb->m_nRvbLpfFbk = pPreset->m_nRvbLpfFbk;
+
+        pReverb->m_nEarlyGain = pPreset->m_nEarlyGain;
+        //stored as time based, convert to sample based
+        pReverb->m_nLateGain = pPreset->m_nLateGain;
+        pReverb->m_nRoomLpfFbk = pPreset->m_nRoomLpfFbk;
+        pReverb->m_nRoomLpfFwd = pPreset->m_nRoomLpfFwd;
+
+        // set the early reflections gains
+        earlyGain = pPreset->m_nEarlyGain;
+        for (i = 0; i < REVERB_MAX_NUM_REFLECTIONS; i++) {
+            pReverb->m_sEarlyL.m_nGain[i]
+                    = MULT_EG1_EG1(pPreset->m_sEarlyL.m_nGain[i],earlyGain);
+            pReverb->m_sEarlyR.m_nGain[i]
+                    = MULT_EG1_EG1(pPreset->m_sEarlyR.m_nGain[i],earlyGain);
+        }
+
+        pReverb->m_nMaxExcursion = pPreset->m_nMaxExcursion;
+
+        pReverb->m_sAp0.m_nApGain = pPreset->m_nAp0_ApGain;
+        pReverb->m_sAp1.m_nApGain = pPreset->m_nAp1_ApGain;
+
+        // set the early reflections delay
+        earlyDelay = ((int) pPreset->m_nEarlyDelay * pReverb->m_nSamplingRate)
+                >> 16;
+        pReverb->m_nEarlyDelay = earlyDelay;
+        maxSamples = (int32_t) (MAX_EARLY_TIME * pReverb->m_nSamplingRate)
+                >> 16;
+        for (i = 0; i < REVERB_MAX_NUM_REFLECTIONS; i++) {
+            //stored as time based, convert to sample based
+            temp = earlyDelay + (((int) pPreset->m_sEarlyL.m_zDelay[i]
+                    * pReverb->m_nSamplingRate) >> 16);
+            if (temp > maxSamples)
+                temp = maxSamples;
+            pReverb->m_sEarlyL.m_zDelay[i] = pReverb->m_nEarly0in + temp;
+            //stored as time based, convert to sample based
+            temp = earlyDelay + (((int) pPreset->m_sEarlyR.m_zDelay[i]
+                    * pReverb->m_nSamplingRate) >> 16);
+            if (temp > maxSamples)
+                temp = maxSamples;
+            pReverb->m_sEarlyR.m_zDelay[i] = pReverb->m_nEarly1in + temp;
+        }
+
+        maxSamples = (int32_t) (MAX_DELAY_TIME * pReverb->m_nSamplingRate)
+                >> 16;
+        //stored as time based, convert to sample based
+        /*lint -e{702} shift for performance */
+        temp = (pPreset->m_nLateDelay * pReverb->m_nSamplingRate) >> 16;
+        if ((temp + pReverb->m_nMaxExcursion) > maxSamples) {
+            temp = maxSamples - pReverb->m_nMaxExcursion;
+        }
+        temp -= pReverb->m_nLateDelay;
+        pReverb->m_nDelay0Out += temp;
+        pReverb->m_nDelay1Out += temp;
+        pReverb->m_nLateDelay += temp;
+
+        maxSamples = (int32_t) (MAX_AP_TIME * pReverb->m_nSamplingRate) >> 16;
+        //stored as time based, convert to absolute sample value
+        temp = pPreset->m_nAp0_ApOut;
+        /*lint -e{702} shift for performance */
+        temp = (temp * pReverb->m_nSamplingRate) >> 16;
+        if (temp > maxSamples)
+            temp = maxSamples;
+        pReverb->m_sAp0.m_zApOut = (uint16_t) (pReverb->m_sAp0.m_zApIn + temp);
+
+        //stored as time based, convert to absolute sample value
+        temp = pPreset->m_nAp1_ApOut;
+        /*lint -e{702} shift for performance */
+        temp = (temp * pReverb->m_nSamplingRate) >> 16;
+        if (temp > maxSamples)
+            temp = maxSamples;
+        pReverb->m_sAp1.m_zApOut = (uint16_t) (pReverb->m_sAp1.m_zApIn + temp);
+        //gpsReverbObject->m_sAp1.m_zApOut = pPreset->m_nAp1_ApOut;
+    }
+
+    //stored as time based, convert to sample based
+    temp = pPreset->m_nXfadeInterval;
+    /*lint -e{702} shift for performance */
+    temp = (temp * pReverb->m_nSamplingRate) >> 16;
+    pReverb->m_nXfadeInterval = (uint16_t) temp;
+    //gsReverbObject.m_nXfadeInterval = pPreset->m_nXfadeInterval;
+    pReverb->m_nXfadeCounter = pReverb->m_nXfadeInterval + 1; // force update on first iteration
+
+    pReverb->m_nCurrentRoom = pReverb->m_nNextRoom;
+
+    return 0;
+
+} /* end ReverbUpdateRoom */
+
+/*----------------------------------------------------------------------------
+ * ReverbReadInPresets()
+ *----------------------------------------------------------------------------
+ * Purpose: sets global reverb preset bank to defaults
+ *
+ * Inputs:
+ *
+ * Outputs:
+ *
+ *----------------------------------------------------------------------------
+ */
+static int ReverbReadInPresets(reverb_object_t *pReverb) {
+
+    int preset;
+
+    // this is for test only. OpenSL ES presets are mapped to 4 presets.
+    // REVERB_PRESET_NONE is mapped to bypass
+    for (preset = 0; preset < REVERB_NUM_PRESETS; preset++) {
+        reverb_preset_t *pPreset = &pReverb->m_sPreset.m_sPreset[preset];
+        switch (preset + 1) {
+        case REVERB_PRESET_PLATE:
+        case REVERB_PRESET_SMALLROOM:
+            pPreset->m_nRvbLpfFbk = 5077;
+            pPreset->m_nRvbLpfFwd = 11076;
+            pPreset->m_nEarlyGain = 27690;
+            pPreset->m_nEarlyDelay = 1311;
+            pPreset->m_nLateGain = 8191;
+            pPreset->m_nLateDelay = 3932;
+            pPreset->m_nRoomLpfFbk = 3692;
+            pPreset->m_nRoomLpfFwd = 20474;
+            pPreset->m_sEarlyL.m_zDelay[0] = 1376;
+            pPreset->m_sEarlyL.m_nGain[0] = 22152;
+            pPreset->m_sEarlyL.m_zDelay[1] = 1462;
+            pPreset->m_sEarlyL.m_nGain[1] = 17537;
+            pPreset->m_sEarlyL.m_zDelay[2] = 0;
+            pPreset->m_sEarlyL.m_nGain[2] = 14768;
+            pPreset->m_sEarlyL.m_zDelay[3] = 1835;
+            pPreset->m_sEarlyL.m_nGain[3] = 14307;
+            pPreset->m_sEarlyL.m_zDelay[4] = 0;
+            pPreset->m_sEarlyL.m_nGain[4] = 13384;
+            pPreset->m_sEarlyR.m_zDelay[0] = 721;
+            pPreset->m_sEarlyR.m_nGain[0] = 20306;
+            pPreset->m_sEarlyR.m_zDelay[1] = 2621;
+            pPreset->m_sEarlyR.m_nGain[1] = 17537;
+            pPreset->m_sEarlyR.m_zDelay[2] = 0;
+            pPreset->m_sEarlyR.m_nGain[2] = 14768;
+            pPreset->m_sEarlyR.m_zDelay[3] = 0;
+            pPreset->m_sEarlyR.m_nGain[3] = 16153;
+            pPreset->m_sEarlyR.m_zDelay[4] = 0;
+            pPreset->m_sEarlyR.m_nGain[4] = 13384;
+            pPreset->m_nMaxExcursion = 127;
+            pPreset->m_nXfadeInterval = 6470; //6483;
+            pPreset->m_nAp0_ApGain = 14768;
+            pPreset->m_nAp0_ApOut = 792;
+            pPreset->m_nAp1_ApGain = 14777;
+            pPreset->m_nAp1_ApOut = 1191;
+            pPreset->m_rfu4 = 0;
+            pPreset->m_rfu5 = 0;
+            pPreset->m_rfu6 = 0;
+            pPreset->m_rfu7 = 0;
+            pPreset->m_rfu8 = 0;
+            pPreset->m_rfu9 = 0;
+            pPreset->m_rfu10 = 0;
+            break;
+        case REVERB_PRESET_MEDIUMROOM:
+        case REVERB_PRESET_LARGEROOM:
+            pPreset->m_nRvbLpfFbk = 5077;
+            pPreset->m_nRvbLpfFwd = 12922;
+            pPreset->m_nEarlyGain = 27690;
+            pPreset->m_nEarlyDelay = 1311;
+            pPreset->m_nLateGain = 8191;
+            pPreset->m_nLateDelay = 3932;
+            pPreset->m_nRoomLpfFbk = 3692;
+            pPreset->m_nRoomLpfFwd = 21703;
+            pPreset->m_sEarlyL.m_zDelay[0] = 1376;
+            pPreset->m_sEarlyL.m_nGain[0] = 22152;
+            pPreset->m_sEarlyL.m_zDelay[1] = 1462;
+            pPreset->m_sEarlyL.m_nGain[1] = 17537;
+            pPreset->m_sEarlyL.m_zDelay[2] = 0;
+            pPreset->m_sEarlyL.m_nGain[2] = 14768;
+            pPreset->m_sEarlyL.m_zDelay[3] = 1835;
+            pPreset->m_sEarlyL.m_nGain[3] = 14307;
+            pPreset->m_sEarlyL.m_zDelay[4] = 0;
+            pPreset->m_sEarlyL.m_nGain[4] = 13384;
+            pPreset->m_sEarlyR.m_zDelay[0] = 721;
+            pPreset->m_sEarlyR.m_nGain[0] = 20306;
+            pPreset->m_sEarlyR.m_zDelay[1] = 2621;
+            pPreset->m_sEarlyR.m_nGain[1] = 17537;
+            pPreset->m_sEarlyR.m_zDelay[2] = 0;
+            pPreset->m_sEarlyR.m_nGain[2] = 14768;
+            pPreset->m_sEarlyR.m_zDelay[3] = 0;
+            pPreset->m_sEarlyR.m_nGain[3] = 16153;
+            pPreset->m_sEarlyR.m_zDelay[4] = 0;
+            pPreset->m_sEarlyR.m_nGain[4] = 13384;
+            pPreset->m_nMaxExcursion = 127;
+            pPreset->m_nXfadeInterval = 6449;
+            pPreset->m_nAp0_ApGain = 15691;
+            pPreset->m_nAp0_ApOut = 774;
+            pPreset->m_nAp1_ApGain = 16317;
+            pPreset->m_nAp1_ApOut = 1155;
+            pPreset->m_rfu4 = 0;
+            pPreset->m_rfu5 = 0;
+            pPreset->m_rfu6 = 0;
+            pPreset->m_rfu7 = 0;
+            pPreset->m_rfu8 = 0;
+            pPreset->m_rfu9 = 0;
+            pPreset->m_rfu10 = 0;
+            break;
+        case REVERB_PRESET_MEDIUMHALL:
+            pPreset->m_nRvbLpfFbk = 6461;
+            pPreset->m_nRvbLpfFwd = 14307;
+            pPreset->m_nEarlyGain = 27690;
+            pPreset->m_nEarlyDelay = 1311;
+            pPreset->m_nLateGain = 8191;
+            pPreset->m_nLateDelay = 3932;
+            pPreset->m_nRoomLpfFbk = 3692;
+            pPreset->m_nRoomLpfFwd = 24569;
+            pPreset->m_sEarlyL.m_zDelay[0] = 1376;
+            pPreset->m_sEarlyL.m_nGain[0] = 22152;
+            pPreset->m_sEarlyL.m_zDelay[1] = 1462;
+            pPreset->m_sEarlyL.m_nGain[1] = 17537;
+            pPreset->m_sEarlyL.m_zDelay[2] = 0;
+            pPreset->m_sEarlyL.m_nGain[2] = 14768;
+            pPreset->m_sEarlyL.m_zDelay[3] = 1835;
+            pPreset->m_sEarlyL.m_nGain[3] = 14307;
+            pPreset->m_sEarlyL.m_zDelay[4] = 0;
+            pPreset->m_sEarlyL.m_nGain[4] = 13384;
+            pPreset->m_sEarlyR.m_zDelay[0] = 721;
+            pPreset->m_sEarlyR.m_nGain[0] = 20306;
+            pPreset->m_sEarlyR.m_zDelay[1] = 2621;
+            pPreset->m_sEarlyR.m_nGain[1] = 17537;
+            pPreset->m_sEarlyR.m_zDelay[2] = 0;
+            pPreset->m_sEarlyR.m_nGain[2] = 14768;
+            pPreset->m_sEarlyR.m_zDelay[3] = 0;
+            pPreset->m_sEarlyR.m_nGain[3] = 16153;
+            pPreset->m_sEarlyR.m_zDelay[4] = 0;
+            pPreset->m_sEarlyR.m_nGain[4] = 13384;
+            pPreset->m_nMaxExcursion = 127;
+            pPreset->m_nXfadeInterval = 6391;
+            pPreset->m_nAp0_ApGain = 15230;
+            pPreset->m_nAp0_ApOut = 708;
+            pPreset->m_nAp1_ApGain = 15547;
+            pPreset->m_nAp1_ApOut = 1023;
+            pPreset->m_rfu4 = 0;
+            pPreset->m_rfu5 = 0;
+            pPreset->m_rfu6 = 0;
+            pPreset->m_rfu7 = 0;
+            pPreset->m_rfu8 = 0;
+            pPreset->m_rfu9 = 0;
+            pPreset->m_rfu10 = 0;
+            break;
+        case REVERB_PRESET_LARGEHALL:
+            pPreset->m_nRvbLpfFbk = 8307;
+            pPreset->m_nRvbLpfFwd = 14768;
+            pPreset->m_nEarlyGain = 27690;
+            pPreset->m_nEarlyDelay = 1311;
+            pPreset->m_nLateGain = 8191;
+            pPreset->m_nLateDelay = 3932;
+            pPreset->m_nRoomLpfFbk = 3692;
+            pPreset->m_nRoomLpfFwd = 24569;
+            pPreset->m_sEarlyL.m_zDelay[0] = 1376;
+            pPreset->m_sEarlyL.m_nGain[0] = 22152;
+            pPreset->m_sEarlyL.m_zDelay[1] = 2163;
+            pPreset->m_sEarlyL.m_nGain[1] = 17537;
+            pPreset->m_sEarlyL.m_zDelay[2] = 0;
+            pPreset->m_sEarlyL.m_nGain[2] = 14768;
+            pPreset->m_sEarlyL.m_zDelay[3] = 1835;
+            pPreset->m_sEarlyL.m_nGain[3] = 14307;
+            pPreset->m_sEarlyL.m_zDelay[4] = 0;
+            pPreset->m_sEarlyL.m_nGain[4] = 13384;
+            pPreset->m_sEarlyR.m_zDelay[0] = 721;
+            pPreset->m_sEarlyR.m_nGain[0] = 20306;
+            pPreset->m_sEarlyR.m_zDelay[1] = 2621;
+            pPreset->m_sEarlyR.m_nGain[1] = 17537;
+            pPreset->m_sEarlyR.m_zDelay[2] = 0;
+            pPreset->m_sEarlyR.m_nGain[2] = 14768;
+            pPreset->m_sEarlyR.m_zDelay[3] = 0;
+            pPreset->m_sEarlyR.m_nGain[3] = 16153;
+            pPreset->m_sEarlyR.m_zDelay[4] = 0;
+            pPreset->m_sEarlyR.m_nGain[4] = 13384;
+            pPreset->m_nMaxExcursion = 127;
+            pPreset->m_nXfadeInterval = 6388;
+            pPreset->m_nAp0_ApGain = 15691;
+            pPreset->m_nAp0_ApOut = 711;
+            pPreset->m_nAp1_ApGain = 16317;
+            pPreset->m_nAp1_ApOut = 1029;
+            pPreset->m_rfu4 = 0;
+            pPreset->m_rfu5 = 0;
+            pPreset->m_rfu6 = 0;
+            pPreset->m_rfu7 = 0;
+            pPreset->m_rfu8 = 0;
+            pPreset->m_rfu9 = 0;
+            pPreset->m_rfu10 = 0;
+            break;
+        }
+    }
+
+    return 0;
+}
diff --git a/media/libeffects/EffectReverb.h b/media/libeffects/EffectReverb.h
new file mode 100644
index 0000000..ee8e390
--- /dev/null
+++ b/media/libeffects/EffectReverb.h
@@ -0,0 +1,437 @@
+/*
+ * Copyright (C) 2008 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef ANDROID_EFFECTREVERB_H_
+#define ANDROID_EFFECTREVERB_H_
+
+#include <media/EffectEnvironmentalReverbApi.h>
+#include <media/EffectPresetReverbApi.h>
+
+
+/*------------------------------------
+ * defines
+ *------------------------------------
+*/
+
+/*
+CIRCULAR() calculates the array index using modulo arithmetic.
+The "trick" is that modulo arithmetic is simplified by masking
+the effective address where the mask is (2^n)-1. This only works
+if the buffer size is a power of two.
+*/
+#define CIRCULAR(base,offset,size) (uint32_t)(               \
+            (                                               \
+                ((int32_t)(base)) + ((int32_t)(offset))     \
+            )                                               \
+            & size                                          \
+                                            )
+
+#define NUM_OUTPUT_CHANNELS 2
+#define OUTPUT_CHANNELS CHANNEL_STEREO
+
+#define REVERB_BUFFER_SIZE_IN_SAMPLES_MAX   16384
+
+#define REVERB_NUM_PRESETS  REVERB_PRESET_PLATE   // REVERB_PRESET_NONE is not included
+#define REVERB_MAX_NUM_REFLECTIONS      5   // max num reflections per channel
+
+
+// xfade parameters
+#define REVERB_XFADE_PERIOD_IN_SECONDS      (double) (100.0 / 1000.0)        // xfade once every this many seconds
+
+
+/**********/
+/* the entire synth uses various flags in a bit field */
+
+/* if flag is set, synth reset has been requested */
+#define REVERB_FLAG_RESET_IS_REQUESTED          0x01    /* bit 0 */
+#define MASK_REVERB_RESET_IS_REQUESTED          0x01
+#define MASK_REVERB_RESET_IS_NOT_REQUESTED      (uint32_t)(~MASK_REVERB_RESET_IS_REQUESTED)
+
+/*
+by default, we always want to update ALL channel parameters
+when we reset the synth (e.g., during GM ON)
+*/
+#define DEFAULT_REVERB_FLAGS                    0x0
+
+/* coefficients for generating sin, cos */
+#define REVERB_PAN_G2   4294940151          /* -0.82842712474619 = 2 - 4/sqrt(2) */
+/*
+int32_t nPanG1 = +1.0 for sin
+int32_t nPanG1 = -1.0 for cos
+*/
+#define REVERB_PAN_G0   23170               /* 0.707106781186547 = 1/sqrt(2) */
+
+/*************************************************************/
+// define the input injection points
+#define GUARD               5                       // safety guard of this many samples
+
+#define MAX_AP_TIME         (int) ((20*65536)/1000)  // delay time in time units (65536th of sec)
+#define MAX_DELAY_TIME      (int) ((65*65536)/1000)  // delay time in time units
+#define MAX_EARLY_TIME      (int) ((65*65536)/1000)  // delay time in time units
+
+#define AP0_IN              0
+
+
+#define REVERB_DEFAULT_ROOM_NUMBER      1       // default preset number
+#define DEFAULT_AP0_GAIN                19400
+#define DEFAULT_AP1_GAIN                -19400
+
+#define REVERB_DEFAULT_WET              32767
+#define REVERB_DEFAULT_DRY              0
+
+#define REVERB_WET_MAX              32767
+#define REVERB_WET_MIN              0
+#define REVERB_DRY_MAX              32767
+#define REVERB_DRY_MIN              0
+
+// constants for reverb density
+// The density expressed in permilles changes the Allpass delay in a linear manner in the range defined by
+// AP0_TIME_BASE to AP0_TIME_BASE + AP0_TIME_RANGE
+#define AP0_TIME_BASE (int)((9*65536)/1000)
+#define AP0_TIME_RANGE (int)((4*65536)/1000)
+#define AP1_TIME_BASE (int)((12*65536)/1000)
+#define AP1_TIME_RANGE (int)((8*65536)/1000)
+
+// constants for reverb diffusion
+// The diffusion expressed in permilles changes the Allpass gain in a linear manner in the range defined by
+// AP0_GAIN_BASE to AP0_GAIN_BASE + AP0_GAIN_RANGE
+#define AP0_GAIN_BASE (int)(9830)
+#define AP0_GAIN_RANGE (int)(19660-9830)
+#define AP1_GAIN_BASE (int)(6553)
+#define AP1_GAIN_RANGE (int)(22936-6553)
+
+
+enum reverb_state_e {
+    REVERB_STATE_UNINITIALIZED,
+    REVERB_STATE_INITIALIZED,
+    REVERB_STATE_ACTIVE,
+};
+
+/* parameters for each allpass */
+typedef struct
+{
+    uint16_t             m_zApOut;       // delay offset for ap out
+
+    int16_t             m_nApGain;      // gain for ap
+
+    uint16_t             m_zApIn;        // delay offset for ap in
+
+} allpass_object_t;
+
+
+/* parameters for early reflections */
+typedef struct
+{
+    uint16_t            m_zDelay[REVERB_MAX_NUM_REFLECTIONS];   // delay offset for ap out
+
+    int16_t             m_nGain[REVERB_MAX_NUM_REFLECTIONS];    // gain for ap
+
+} early_reflection_object_t;
+
+//demo
+typedef struct
+{
+    int16_t             m_nRvbLpfFbk;
+    int16_t             m_nRvbLpfFwd;
+    int16_t             m_nRoomLpfFbk;
+    int16_t             m_nRoomLpfFwd;
+
+    int16_t             m_nEarlyGain;
+    int16_t             m_nEarlyDelay;
+    int16_t             m_nLateGain;
+    int16_t             m_nLateDelay;
+
+    early_reflection_object_t m_sEarlyL;
+    early_reflection_object_t m_sEarlyR;
+
+    uint16_t            m_nMaxExcursion; //28
+    int16_t             m_nXfadeInterval;
+
+    int16_t             m_nAp0_ApGain; //30
+    int16_t             m_nAp0_ApOut;
+    int16_t             m_nAp1_ApGain;
+    int16_t             m_nAp1_ApOut;
+    int16_t             m_nDiffusion;
+
+    int16_t             m_rfu4;
+    int16_t             m_rfu5;
+    int16_t             m_rfu6;
+    int16_t             m_rfu7;
+    int16_t             m_rfu8;
+    int16_t             m_rfu9;
+    int16_t             m_rfu10; //43
+
+} reverb_preset_t;
+
+typedef struct
+{
+    reverb_preset_t     m_sPreset[REVERB_NUM_PRESETS]; // array of presets(does not include REVERB_PRESET_NONE)
+
+} reverb_preset_bank_t;
+
+
+/* parameters for each reverb */
+typedef struct
+{
+    /* update counter keeps track of when synth params need updating */
+    /* only needs to be as large as REVERB_UPDATE_PERIOD_IN_SAMPLES */
+    int16_t             m_nUpdateCounter;
+
+    uint16_t             m_nBaseIndex;                                   // base index for circular buffer
+
+    // reverb delay line offsets, allpass parameters, etc:
+
+    short             m_nRevFbkR;              // combine feedback reverb right out with dry left in
+    short             m_zOutLpfL;              // left reverb output
+
+    allpass_object_t    m_sAp0;                     // allpass 0 (left channel)
+
+    uint16_t             m_zD0In;                    // delay offset for delay line D0 in
+
+    short             m_nRevFbkL;              // combine feedback reverb left out with dry right in
+    short             m_zOutLpfR;              // right reverb output
+
+    allpass_object_t    m_sAp1;                     // allpass 1 (right channel)
+
+    uint16_t             m_zD1In;                    // delay offset for delay line D1 in
+
+    // delay output taps, notice criss cross order
+    uint16_t             m_zD0Self;                  // self feeds forward d0 --> d0
+
+    uint16_t             m_zD1Cross;                 // cross feeds across d1 --> d0
+
+    uint16_t             m_zD1Self;                  // self feeds forward d1 --> d1
+
+    uint16_t             m_zD0Cross;                 // cross feeds across d0 --> d1
+
+    int16_t             m_nSin;                     // gain for self taps
+
+    int16_t             m_nCos;                     // gain for cross taps
+
+    int16_t             m_nSinIncrement;            // increment for gain
+
+    int16_t             m_nCosIncrement;            // increment for gain
+
+    int16_t             m_nRvbLpfFwd;                  // reverb feedback lpf forward gain (includes scaling for mixer)
+
+    int16_t             m_nRvbLpfFbk;                  // reverb feedback lpf feedback gain
+
+    int16_t             m_nRoomLpfFwd;                  // room lpf forward gain (includes scaling for mixer)
+
+    int16_t             m_nRoomLpfFbk;                  // room lpf feedback gain
+
+    uint16_t            m_nXfadeInterval;           // update/xfade after this many samples
+
+    uint16_t            m_nXfadeCounter;            // keep track of when to xfade
+
+    int16_t             m_nPhase;                   // -1 <= m_nPhase < 1
+                                                    // but during sin,cos calculations
+                                                    // use m_nPhase/2
+
+    int16_t             m_nPhaseIncrement;          // add this to m_nPhase each frame
+
+    int16_t             m_nNoise;                   // random noise sample
+
+    uint16_t            m_nMaxExcursion;            // the taps can excurse +/- this amount
+
+    uint16_t            m_bUseNoise;                // if TRUE, use noise as input signal
+
+    uint16_t            m_bBypass;                  // if TRUE, then bypass reverb and copy input to output
+
+    int16_t             m_nCurrentRoom;             // preset number for current room
+
+    int16_t             m_nNextRoom;                // preset number for next room
+
+    int16_t             m_nEarlyGain;               // gain for early (widen) signal
+    int16_t             m_nEarlyDelay;              // initial dealy for early (widen) signal
+    int16_t             m_nEarly0in;
+    int16_t             m_nEarly1in;
+    int16_t             m_nLateGain;               // gain for late reverb
+    int16_t             m_nLateDelay;
+
+    int16_t             m_nDiffusion;
+
+    early_reflection_object_t   m_sEarlyL;          // left channel early reflections
+    early_reflection_object_t   m_sEarlyR;          // right channel early reflections
+
+    short             m_nDelayLine[REVERB_BUFFER_SIZE_IN_SAMPLES_MAX];    // one large delay line for all reverb elements
+
+    reverb_preset_t     pPreset;
+
+    reverb_preset_bank_t  m_sPreset;
+
+    //int8_t            preset;
+    uint32_t            m_nSamplingRate;
+    int32_t             m_nUpdatePeriodInBits;
+    int32_t             m_nBufferMask;
+    int32_t             m_nUpdatePeriodInSamples;
+    int32_t             m_nDelay0Out;
+    int32_t             m_nDelay1Out;
+    int16_t             m_nCosWT_5KHz;
+
+    uint16_t            m_Aux;                // if TRUE, is connected as auxiliary effect
+    uint16_t            m_Preset;             // if TRUE, expose preset revert interface
+
+    uint32_t            mState;
+} reverb_object_t;
+
+
+
+typedef struct reverb_module_s {
+    const struct effect_interface_s *itfe;
+    effect_config_t config;
+    reverb_object_t context;
+} reverb_module_t;
+
+/*------------------------------------
+ * Effect API
+ *------------------------------------
+*/
+int EffectQueryNumberEffects(uint32_t *pNumEffects);
+int EffectQueryEffect(uint32_t index, effect_descriptor_t *pDescriptor);
+int EffectCreate(effect_uuid_t *effectUID, int32_t sessionId, int32_t ioId, effect_interface_t *pInterface);
+int EffectRelease(effect_interface_t interface);
+
+static int Reverb_Process(effect_interface_t self, audio_buffer_t *inBuffer, audio_buffer_t *outBuffer);
+static int Reverb_Command(effect_interface_t self, int cmdCode, int cmdSize, void *pCmdData, int *replySize, void *pReplyData);
+
+
+/*------------------------------------
+ * internal functions
+ *------------------------------------
+*/
+
+int Reverb_Init(reverb_module_t *pRvbModule, int aux, int preset);
+int Reverb_Configure(reverb_module_t *pRvbModule, effect_config_t *pConfig, bool init);
+void Reverb_Reset(reverb_object_t *pReverb, bool init);
+
+int Reverb_setParameter (reverb_object_t *pReverb, int32_t param, size_t size, void *pValue);
+int Reverb_getParameter(reverb_object_t *pReverb, int32_t param, size_t *pSize, void *pValue);
+
+/*----------------------------------------------------------------------------
+ * ReverbUpdateXfade
+ *----------------------------------------------------------------------------
+ * Purpose:
+ * Update the xfade parameters as required
+ *
+ * Inputs:
+ * nNumSamplesToAdd - number of samples to write to buffer
+ *
+ * Outputs:
+ *
+ *
+ * Side Effects:
+ * - xfade parameters will be changed
+ *
+ *----------------------------------------------------------------------------
+*/
+static int ReverbUpdateXfade(reverb_object_t* pReverbData, int nNumSamplesToAdd);
+
+/*----------------------------------------------------------------------------
+ * ReverbCalculateNoise
+ *----------------------------------------------------------------------------
+ * Purpose:
+ * Calculate a noise sample and limit its value
+ *
+ * Inputs:
+ * Pointer to reverb context
+ *
+ * Outputs:
+ * new limited noise value
+ *
+ * Side Effects:
+ * - pReverbData->m_nNoise value is updated
+ *
+ *----------------------------------------------------------------------------
+*/
+static uint16_t ReverbCalculateNoise(reverb_object_t *pReverbData);
+
+/*----------------------------------------------------------------------------
+ * ReverbCalculateSinCos
+ *----------------------------------------------------------------------------
+ * Purpose:
+ * Calculate a new sin and cosine value based on the given phase
+ *
+ * Inputs:
+ * nPhase   - phase angle
+ * pnSin    - input old value, output new value
+ * pnCos    - input old value, output new value
+ *
+ * Outputs:
+ *
+ * Side Effects:
+ * - *pnSin, *pnCos are updated
+ *
+ *----------------------------------------------------------------------------
+*/
+static int ReverbCalculateSinCos(int16_t nPhase, int16_t *pnSin, int16_t *pnCos);
+
+/*----------------------------------------------------------------------------
+ * Reverb
+ *----------------------------------------------------------------------------
+ * Purpose:
+ * apply reverb to the given signal
+ *
+ * Inputs:
+ * nNu
+ * pnSin    - input old value, output new value
+ * pnCos    - input old value, output new value
+ *
+ * Outputs:
+ * number of samples actually reverberated
+ *
+ * Side Effects:
+ *
+ *----------------------------------------------------------------------------
+*/
+static int Reverb(reverb_object_t* pReverbData, int nNumSamplesToAdd, short *pOutputBuffer, short *pInputBuffer);
+
+/*----------------------------------------------------------------------------
+ * ReverbReadInPresets()
+ *----------------------------------------------------------------------------
+ * Purpose: sets global reverb preset bank to defaults
+ *
+ * Inputs:
+ *
+ * Outputs:
+ *
+ *----------------------------------------------------------------------------
+*/
+static int ReverbReadInPresets(reverb_object_t* pReverbData);
+
+
+/*----------------------------------------------------------------------------
+ * ReverbUpdateRoom
+ *----------------------------------------------------------------------------
+ * Purpose:
+ * Update the room's preset parameters as required
+ *
+ * Inputs:
+ *
+ * Outputs:
+ *
+ *
+ * Side Effects:
+ * - reverb paramters (fbk, fwd, etc) will be changed
+ * - m_nCurrentRoom := m_nNextRoom
+ *----------------------------------------------------------------------------
+*/
+static int ReverbUpdateRoom(reverb_object_t* pReverbData, bool fullUpdate);
+
+
+static int ReverbComputeConstants(reverb_object_t *pReverbData, uint32_t samplingRate);
+
+#endif /*ANDROID_EFFECTREVERB_H_*/
diff --git a/media/libeffects/EffectVisualizer.cpp b/media/libeffects/EffectVisualizer.cpp
new file mode 100644
index 0000000..bcda06e
--- /dev/null
+++ b/media/libeffects/EffectVisualizer.cpp
@@ -0,0 +1,401 @@
+/*
+ * Copyright (C) 2010 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#define LOG_TAG "Visualizer"
+//#define LOG_NDEBUG 0
+#include <cutils/log.h>
+#include <assert.h>
+#include <stdlib.h>
+#include <string.h>
+#include <new>
+#include <media/EffectVisualizerApi.h>
+
+namespace android {
+
+// effect_interface_t interface implementation for visualizer effect
+extern "C" const struct effect_interface_s gVisualizerInterface;
+
+// Google Visualizer UUID: d069d9e0-8329-11df-9168-0002a5d5c51b
+const effect_descriptor_t gVisualizerDescriptor = {
+        {0xe46b26a0, 0xdddd, 0x11db, 0x8afd, {0x00, 0x02, 0xa5, 0xd5, 0xc5, 0x1b}}, // type
+        {0xd069d9e0, 0x8329, 0x11df, 0x9168, {0x00, 0x02, 0xa5, 0xd5, 0xc5, 0x1b}}, // uuid
+        EFFECT_API_VERSION,
+        (EFFECT_FLAG_TYPE_INSERT | EFFECT_FLAG_INSERT_FIRST),
+        0, // TODO
+        1,
+        "Visualizer",
+        "Google Inc.",
+};
+
+enum visualizer_state_e {
+    VISUALIZER_STATE_UNINITIALIZED,
+    VISUALIZER_STATE_INITIALIZED,
+    VISUALIZER_STATE_ACTIVE,
+};
+
+struct VisualizerContext {
+    const struct effect_interface_s *mItfe;
+    effect_config_t mConfig;
+    uint32_t mState;
+    uint32_t mCaptureIdx;
+    uint32_t mCaptureSize;
+    uint32_t mCurrentBuf;
+    uint8_t mCaptureBuf[2][VISUALIZER_CAPTURE_SIZE_MAX];
+};
+
+
+//
+//--- Local functions
+//
+
+void Visualizer_reset(VisualizerContext *pContext)
+{
+    pContext->mCaptureIdx = 0;
+    pContext->mCurrentBuf = 0;
+    memset(pContext->mCaptureBuf[0], 0, VISUALIZER_CAPTURE_SIZE_MAX);
+    memset(pContext->mCaptureBuf[1], 0, VISUALIZER_CAPTURE_SIZE_MAX);
+}
+
+//----------------------------------------------------------------------------
+// Visualizer_configure()
+//----------------------------------------------------------------------------
+// Purpose: Set input and output audio configuration.
+//
+// Inputs:
+//  pContext:   effect engine context
+//  pConfig:    pointer to effect_config_t structure holding input and output
+//      configuration parameters
+//
+// Outputs:
+//
+//----------------------------------------------------------------------------
+
+int Visualizer_configure(VisualizerContext *pContext, effect_config_t *pConfig)
+{
+    LOGV("Visualizer_configure start");
+
+    if (pConfig->inputCfg.samplingRate != pConfig->outputCfg.samplingRate) return -EINVAL;
+    if (pConfig->inputCfg.channels != pConfig->outputCfg.channels) return -EINVAL;
+    if (pConfig->inputCfg.format != pConfig->outputCfg.format) return -EINVAL;
+    if (pConfig->inputCfg.channels != CHANNEL_STEREO) return -EINVAL;
+    if (pConfig->outputCfg.accessMode != EFFECT_BUFFER_ACCESS_WRITE &&
+            pConfig->outputCfg.accessMode != EFFECT_BUFFER_ACCESS_ACCUMULATE) return -EINVAL;
+    if (pConfig->inputCfg.format != SAMPLE_FORMAT_PCM_S15) return -EINVAL;
+
+    memcpy(&pContext->mConfig, pConfig, sizeof(effect_config_t));
+
+    Visualizer_reset(pContext);
+
+    return 0;
+}
+
+
+//----------------------------------------------------------------------------
+// Visualizer_init()
+//----------------------------------------------------------------------------
+// Purpose: Initialize engine with default configuration.
+//
+// Inputs:
+//  pContext:   effect engine context
+//
+// Outputs:
+//
+//----------------------------------------------------------------------------
+
+int Visualizer_init(VisualizerContext *pContext)
+{
+    pContext->mConfig.inputCfg.accessMode = EFFECT_BUFFER_ACCESS_READ;
+    pContext->mConfig.inputCfg.channels = CHANNEL_STEREO;
+    pContext->mConfig.inputCfg.format = SAMPLE_FORMAT_PCM_S15;
+    pContext->mConfig.inputCfg.samplingRate = 44100;
+    pContext->mConfig.inputCfg.bufferProvider.getBuffer = NULL;
+    pContext->mConfig.inputCfg.bufferProvider.releaseBuffer = NULL;
+    pContext->mConfig.inputCfg.bufferProvider.cookie = NULL;
+    pContext->mConfig.inputCfg.mask = EFFECT_CONFIG_ALL;
+    pContext->mConfig.outputCfg.accessMode = EFFECT_BUFFER_ACCESS_ACCUMULATE;
+    pContext->mConfig.outputCfg.channels = CHANNEL_STEREO;
+    pContext->mConfig.outputCfg.format = SAMPLE_FORMAT_PCM_S15;
+    pContext->mConfig.outputCfg.samplingRate = 44100;
+    pContext->mConfig.outputCfg.bufferProvider.getBuffer = NULL;
+    pContext->mConfig.outputCfg.bufferProvider.releaseBuffer = NULL;
+    pContext->mConfig.outputCfg.bufferProvider.cookie = NULL;
+    pContext->mConfig.outputCfg.mask = EFFECT_CONFIG_ALL;
+
+    pContext->mCaptureSize = VISUALIZER_CAPTURE_SIZE_MAX;
+
+    Visualizer_configure(pContext, &pContext->mConfig);
+
+    return 0;
+}
+
+//
+//--- Effect Library Interface Implementation
+//
+
+extern "C" int EffectQueryNumberEffects(uint32_t *pNumEffects) {
+    *pNumEffects = 1;
+    return 0;
+}
+
+extern "C" int EffectQueryEffect(uint32_t index, effect_descriptor_t *pDescriptor) {
+    if (pDescriptor == NULL) {
+        return -EINVAL;
+    }
+    if (index > 0) {
+        return -EINVAL;
+    }
+    memcpy(pDescriptor, &gVisualizerDescriptor, sizeof(effect_descriptor_t));
+    return 0;
+}
+
+extern "C" int EffectCreate(effect_uuid_t *uuid,
+        int32_t sessionId,
+        int32_t ioId,
+        effect_interface_t *pInterface) {
+    int ret;
+    int i;
+
+    if (pInterface == NULL || uuid == NULL) {
+        return -EINVAL;
+    }
+
+    if (memcmp(uuid, &gVisualizerDescriptor.uuid, sizeof(effect_uuid_t)) != 0) {
+        return -EINVAL;
+    }
+
+    VisualizerContext *pContext = new VisualizerContext;
+
+    pContext->mItfe = &gVisualizerInterface;
+    pContext->mState = VISUALIZER_STATE_UNINITIALIZED;
+
+    ret = Visualizer_init(pContext);
+    if (ret < 0) {
+        LOGW("EffectCreate() init failed");
+        delete pContext;
+        return ret;
+    }
+
+    *pInterface = (effect_interface_t)pContext;
+
+    pContext->mState = VISUALIZER_STATE_INITIALIZED;
+
+    LOGV("EffectCreate %p", pContext);
+
+    return 0;
+
+}
+
+extern "C" int EffectRelease(effect_interface_t interface) {
+    VisualizerContext * pContext = (VisualizerContext *)interface;
+
+    LOGV("EffectRelease %p", interface);
+    if (pContext == NULL) {
+        return -EINVAL;
+    }
+    pContext->mState = VISUALIZER_STATE_UNINITIALIZED;
+    delete pContext;
+
+    return 0;
+}
+
+//
+//--- Effect Control Interface Implementation
+//
+
+static inline int16_t clamp16(int32_t sample)
+{
+    if ((sample>>15) ^ (sample>>31))
+        sample = 0x7FFF ^ (sample>>31);
+    return sample;
+}
+
+extern "C" int Visualizer_process(
+        effect_interface_t self,audio_buffer_t *inBuffer, audio_buffer_t *outBuffer)
+{
+    android::VisualizerContext * pContext = (android::VisualizerContext *)self;
+
+    if (pContext == NULL) {
+        return -EINVAL;
+    }
+    if (pContext->mState != VISUALIZER_STATE_ACTIVE) {
+        return -ENODATA;
+    }
+
+    if (inBuffer == NULL || inBuffer->raw == NULL ||
+        outBuffer == NULL || outBuffer->raw == NULL ||
+        inBuffer->frameCount != outBuffer->frameCount ||
+        inBuffer->frameCount == 0) {
+        return -EINVAL;
+    }
+
+    // all code below assumes stereo 16 bit PCM output and input
+    uint32_t captIdx;
+    uint32_t inIdx;
+    uint8_t *buf = pContext->mCaptureBuf[pContext->mCurrentBuf];
+    for (inIdx = 0, captIdx = pContext->mCaptureIdx;
+         inIdx < inBuffer->frameCount && captIdx < pContext->mCaptureSize;
+         inIdx++, captIdx++) {
+        int32_t smp = inBuffer->s16[2 * inIdx] + inBuffer->s16[2 * inIdx + 1];
+        smp = (smp + (1 << 8)) >> 9;
+        buf[captIdx] = ((uint8_t)smp)^0x80;
+    }
+    pContext->mCaptureIdx = captIdx;
+
+    // go to next buffer when buffer full
+    if (pContext->mCaptureIdx == pContext->mCaptureSize) {
+        pContext->mCurrentBuf ^= 1;
+        pContext->mCaptureIdx = 0;
+    }
+
+    if (inBuffer->raw != outBuffer->raw) {
+        if (pContext->mConfig.outputCfg.accessMode == EFFECT_BUFFER_ACCESS_ACCUMULATE) {
+            for (size_t i = 0; i < outBuffer->frameCount*2; i++) {
+                outBuffer->s16[i] = clamp16(outBuffer->s16[i] + inBuffer->s16[i]);
+            }
+        } else {
+            memcpy(outBuffer->raw, inBuffer->raw, outBuffer->frameCount * 2 * sizeof(int16_t));
+        }
+    }
+    return 0;
+}   // end Visualizer_process
+
+extern "C" int Visualizer_command(effect_interface_t self, int cmdCode, int cmdSize,
+        void *pCmdData, int *replySize, void *pReplyData) {
+
+    android::VisualizerContext * pContext = (android::VisualizerContext *)self;
+    int retsize;
+
+    if (pContext == NULL || pContext->mState == VISUALIZER_STATE_UNINITIALIZED) {
+        return -EINVAL;
+    }
+
+//    LOGV("Visualizer_command command %d cmdSize %d",cmdCode, cmdSize);
+
+    switch (cmdCode) {
+    case EFFECT_CMD_INIT:
+        if (pReplyData == NULL || *replySize != sizeof(int)) {
+            return -EINVAL;
+        }
+        *(int *) pReplyData = Visualizer_init(pContext);
+        break;
+    case EFFECT_CMD_CONFIGURE:
+        if (pCmdData == NULL || cmdSize != sizeof(effect_config_t)
+                || pReplyData == NULL || *replySize != sizeof(int)) {
+            return -EINVAL;
+        }
+        *(int *) pReplyData = Visualizer_configure(pContext,
+                (effect_config_t *) pCmdData);
+        break;
+    case EFFECT_CMD_RESET:
+        Visualizer_reset(pContext);
+        break;
+    case EFFECT_CMD_ENABLE:
+        if (pReplyData == NULL || *replySize != sizeof(int)) {
+            return -EINVAL;
+        }
+        if (pContext->mState != VISUALIZER_STATE_INITIALIZED) {
+            return -ENOSYS;
+        }
+        pContext->mState = VISUALIZER_STATE_ACTIVE;
+        LOGV("EFFECT_CMD_ENABLE() OK");
+        *(int *)pReplyData = 0;
+        break;
+    case EFFECT_CMD_DISABLE:
+        if (pReplyData == NULL || *replySize != sizeof(int)) {
+            return -EINVAL;
+        }
+        if (pContext->mState != VISUALIZER_STATE_ACTIVE) {
+            return -ENOSYS;
+        }
+        pContext->mState = VISUALIZER_STATE_INITIALIZED;
+        LOGV("EFFECT_CMD_DISABLE() OK");
+        *(int *)pReplyData = 0;
+        break;
+    case EFFECT_CMD_GET_PARAM: {
+        if (pCmdData == NULL ||
+            cmdSize != (int)(sizeof(effect_param_t) + sizeof(uint32_t)) ||
+            pReplyData == NULL ||
+            *replySize < (int)(sizeof(effect_param_t) + sizeof(uint32_t) + sizeof(uint32_t))) {
+            return -EINVAL;
+        }
+        memcpy(pReplyData, pCmdData, sizeof(effect_param_t) + sizeof(uint32_t));
+        effect_param_t *p = (effect_param_t *)pReplyData;
+        p->status = 0;
+        *replySize = sizeof(effect_param_t) + sizeof(uint32_t);
+        if (p->psize != sizeof(uint32_t) ||
+            *(uint32_t *)p->data != VISU_PARAM_CAPTURE_SIZE) {
+            p->status = -EINVAL;
+            break;
+        }
+        LOGV("get mCaptureSize = %d", pContext->mCaptureSize);
+        *((uint32_t *)p->data + 1) = pContext->mCaptureSize;
+        p->vsize = sizeof(uint32_t);
+        *replySize += sizeof(uint32_t);
+        } break;
+    case EFFECT_CMD_SET_PARAM: {
+        if (pCmdData == NULL ||
+            cmdSize != (int)(sizeof(effect_param_t) + sizeof(uint32_t) + sizeof(uint32_t)) ||
+            pReplyData == NULL || *replySize != sizeof(int32_t)) {
+            return -EINVAL;
+        }
+        *(int32_t *)pReplyData = 0;
+        effect_param_t *p = (effect_param_t *)pCmdData;
+        if (p->psize != sizeof(uint32_t) ||
+            p->vsize != sizeof(uint32_t) ||
+            *(uint32_t *)p->data != VISU_PARAM_CAPTURE_SIZE) {
+            *(int32_t *)pReplyData = -EINVAL;
+            break;;
+        }
+        pContext->mCaptureSize = *((uint32_t *)p->data + 1);
+        LOGV("set mCaptureSize = %d", pContext->mCaptureSize);
+        } break;
+    case EFFECT_CMD_SET_DEVICE:
+    case EFFECT_CMD_SET_VOLUME:
+    case EFFECT_CMD_SET_AUDIO_MODE:
+        break;
+
+
+    case VISU_CMD_CAPTURE:
+        if (pReplyData == NULL || *replySize != (int)pContext->mCaptureSize) {
+            LOGV("VISU_CMD_CAPTURE() error *replySize %d pContext->mCaptureSize %d",
+                    *replySize, pContext->mCaptureSize);
+            return -EINVAL;
+        }
+        if (pContext->mState == VISUALIZER_STATE_ACTIVE) {
+            memcpy(pReplyData,
+                   pContext->mCaptureBuf[pContext->mCurrentBuf ^ 1],
+                   pContext->mCaptureSize);
+        } else {
+            memset(pReplyData, 0x80, pContext->mCaptureSize);
+        }
+        break;
+
+    default:
+        LOGW("Visualizer_command invalid command %d",cmdCode);
+        return -EINVAL;
+    }
+
+    return 0;
+}
+
+// effect_interface_t interface implementation for visualizer effect
+const struct effect_interface_s gVisualizerInterface = {
+        Visualizer_process,
+        Visualizer_command
+};
+
+} // namespace
+
diff --git a/media/libeffects/EffectsFactory.c b/media/libeffects/EffectsFactory.c
new file mode 100644
index 0000000..edd6184
--- /dev/null
+++ b/media/libeffects/EffectsFactory.c
@@ -0,0 +1,642 @@
+/*
+ * Copyright (C) 2010 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#define LOG_TAG "EffectsFactory"
+//#define LOG_NDEBUG 0
+
+#include "EffectsFactory.h"
+#include <string.h>
+#include <stdlib.h>
+#include <dlfcn.h>
+
+
+static list_elem_t *gEffectList; // list of effect_entry_t: all currently created effects
+static list_elem_t *gLibraryList; // list of lib_entry_t: all currently loaded libraries
+static pthread_mutex_t gLibLock = PTHREAD_MUTEX_INITIALIZER; // controls access to gLibraryList
+static uint32_t gNumEffects;         // total number number of effects
+static list_elem_t *gCurLib;    // current library in enumeration process
+static list_elem_t *gCurEffect; // current effect in enumeration process
+static uint32_t gCurEffectIdx;       // current effect index in enumeration process
+
+static const char * const gEffectLibPath = "/system/lib/soundfx"; // path to built-in effect libraries
+static int gInitDone; // true is global initialization has been preformed
+static int gNextLibId; // used by loadLibrary() to allocate unique library handles
+static int gCanQueryEffect; // indicates that call to EffectQueryEffect() is valid, i.e. that the list of effects
+                          // was not modified since last call to EffectQueryNumberEffects()
+
+/////////////////////////////////////////////////
+//      Local functions prototypes
+/////////////////////////////////////////////////
+
+static int init();
+static int loadLibrary(const char *libPath, int *handle);
+static int unloadLibrary(int handle);
+static void resetEffectEnumeration();
+static uint32_t updateNumEffects();
+static int findEffect(effect_uuid_t *uuid, lib_entry_t **lib, effect_descriptor_t **desc);
+static void dumpEffectDescriptor(effect_descriptor_t *desc, char *str, size_t len);
+
+/////////////////////////////////////////////////
+//      Effect Control Interface functions
+/////////////////////////////////////////////////
+
+int Effect_Process(effect_interface_t self, audio_buffer_t *inBuffer, audio_buffer_t *outBuffer)
+{
+    int ret = init();
+    if (ret < 0) {
+        return ret;
+    }
+    effect_entry_t *fx = (effect_entry_t *)self;
+    pthread_mutex_lock(&gLibLock);
+    if (fx->lib == NULL) {
+        pthread_mutex_unlock(&gLibLock);
+        return -EPIPE;
+    }
+    pthread_mutex_lock(&fx->lib->lock);
+    pthread_mutex_unlock(&gLibLock);
+
+    ret = (*fx->subItfe)->process(fx->subItfe, inBuffer, outBuffer);
+    pthread_mutex_unlock(&fx->lib->lock);
+    return ret;
+}
+
+int Effect_Command(effect_interface_t self, int cmdCode, int cmdSize, void *pCmdData, int *replySize, void *pReplyData)
+{
+    int ret = init();
+    if (ret < 0) {
+        return ret;
+    }
+    effect_entry_t *fx = (effect_entry_t *)self;
+    pthread_mutex_lock(&gLibLock);
+    if (fx->lib == NULL) {
+        pthread_mutex_unlock(&gLibLock);
+        return -EPIPE;
+    }
+    pthread_mutex_lock(&fx->lib->lock);
+    pthread_mutex_unlock(&gLibLock);
+
+    ret = (*fx->subItfe)->command(fx->subItfe, cmdCode, cmdSize, pCmdData, replySize, pReplyData);
+    pthread_mutex_unlock(&fx->lib->lock);
+    return ret;
+}
+
+const struct effect_interface_s gInterface = {
+        Effect_Process,
+        Effect_Command
+};
+
+/////////////////////////////////////////////////
+//      Effect Factory Interface functions
+/////////////////////////////////////////////////
+
+int EffectQueryNumberEffects(uint32_t *pNumEffects)
+{
+    int ret = init();
+    if (ret < 0) {
+        return ret;
+    }
+    if (pNumEffects == NULL) {
+        return -EINVAL;
+    }
+
+    pthread_mutex_lock(&gLibLock);
+    *pNumEffects = gNumEffects;
+    gCanQueryEffect = 1;
+    pthread_mutex_unlock(&gLibLock);
+    LOGV("EffectQueryNumberEffects(): %d", *pNumEffects);
+    return ret;
+}
+
+int EffectQueryEffect(uint32_t index, effect_descriptor_t *pDescriptor)
+{
+    int ret = init();
+    if (ret < 0) {
+        return ret;
+    }
+    if (pDescriptor == NULL ||
+        index >= gNumEffects) {
+        return -EINVAL;
+    }
+    if (gCanQueryEffect == 0) {
+        return -ENOSYS;
+    }
+
+    pthread_mutex_lock(&gLibLock);
+    ret = -ENOENT;
+    if (index < gCurEffectIdx) {
+        resetEffectEnumeration();
+    }
+    while (gCurLib) {
+        if (gCurEffect) {
+            if (index == gCurEffectIdx) {
+                memcpy(pDescriptor, gCurEffect->object, sizeof(effect_descriptor_t));
+                ret = 0;
+                break;
+            } else {
+                gCurEffect = gCurEffect->next;
+                gCurEffectIdx++;
+            }
+        } else {
+            gCurLib = gCurLib->next;
+            gCurEffect = ((lib_entry_t *)gCurLib->object)->effects;
+        }
+    }
+
+#if (LOG_NDEBUG == 0)
+    char str[256];
+    dumpEffectDescriptor(pDescriptor, str, 256);
+    LOGV("EffectQueryEffect() desc:%s", str);
+#endif
+    pthread_mutex_unlock(&gLibLock);
+    return ret;
+}
+
+int EffectGetDescriptor(effect_uuid_t *uuid, effect_descriptor_t *pDescriptor)
+{
+    lib_entry_t *l = NULL;
+    effect_descriptor_t *d = NULL;
+
+    int ret = init();
+    if (ret < 0) {
+        return ret;
+    }
+    if (pDescriptor == NULL || uuid == NULL) {
+        return -EINVAL;
+    }
+    pthread_mutex_lock(&gLibLock);
+    ret = findEffect(uuid, &l, &d);
+    if (ret == 0) {
+        memcpy(pDescriptor, d, sizeof(effect_descriptor_t));
+    }
+    pthread_mutex_unlock(&gLibLock);
+    return ret;
+}
+
+int EffectCreate(effect_uuid_t *uuid, int32_t sessionId, int32_t ioId, effect_interface_t *pInterface)
+{
+    list_elem_t *e = gLibraryList;
+    lib_entry_t *l = NULL;
+    effect_descriptor_t *d = NULL;
+    effect_interface_t itfe;
+    effect_entry_t *fx;
+    int found = 0;
+    int ret;
+
+    if (uuid == NULL || pInterface == NULL) {
+        return -EINVAL;
+    }
+
+    LOGV("EffectCreate() UUID: %08X-%04X-%04X-%04X-%02X%02X%02X%02X%02X%02X\n",
+            uuid->timeLow, uuid->timeMid, uuid->timeHiAndVersion,
+            uuid->clockSeq, uuid->node[0], uuid->node[1],uuid->node[2],
+            uuid->node[3],uuid->node[4],uuid->node[5]);
+
+    ret = init();
+
+    if (ret < 0) {
+        LOGW("EffectCreate() init error: %d", ret);
+        return ret;
+    }
+
+    pthread_mutex_lock(&gLibLock);
+
+    ret = findEffect(uuid, &l, &d);
+    if (ret < 0){
+        goto exit;
+    }
+
+    // create effect in library
+    ret = l->createFx(uuid, sessionId, ioId, &itfe);
+    if (ret != 0) {
+        LOGW("EffectCreate() library %s: could not create fx %s, error %d", l->path, d->name, ret);
+        goto exit;
+    }
+
+    // add entry to effect list
+    fx = (effect_entry_t *)malloc(sizeof(effect_entry_t));
+    fx->subItfe = itfe;
+    fx->itfe = (struct effect_interface_s *)&gInterface;
+    fx->lib = l;
+
+    e = (list_elem_t *)malloc(sizeof(list_elem_t));
+    e->object = fx;
+    e->next = gEffectList;
+    gEffectList = e;
+
+    *pInterface = (effect_interface_t)fx;
+
+    LOGV("EffectCreate() created entry %p with sub itfe %p in library %s", *pInterface, itfe, l->path);
+
+exit:
+    pthread_mutex_unlock(&gLibLock);
+    return ret;
+}
+
+int EffectRelease(effect_interface_t interface)
+{
+    effect_entry_t *fx;
+    list_elem_t *e1;
+    list_elem_t *e2;
+
+    int ret = init();
+    if (ret < 0) {
+        return ret;
+    }
+
+    // remove effect from effect list
+    pthread_mutex_lock(&gLibLock);
+    e1 = gEffectList;
+    e2 = NULL;
+    while (e1) {
+        if (e1->object == interface) {
+            if (e2) {
+                e2->next = e1->next;
+            } else {
+                gEffectList = e1->next;
+            }
+            fx = (effect_entry_t *)e1->object;
+            free(e1);
+            break;
+        }
+        e2 = e1;
+        e1 = e1->next;
+    }
+    if (e1 == NULL) {
+        ret = -ENOENT;
+        goto exit;
+    }
+
+    // release effect in library
+    if (fx->lib == NULL) {
+        LOGW("EffectRelease() fx %p library already unloaded", interface);
+    } else {
+        pthread_mutex_lock(&fx->lib->lock);
+        fx->lib->releaseFx(fx->subItfe);
+        pthread_mutex_unlock(&fx->lib->lock);
+    }
+    free(fx);
+
+exit:
+    pthread_mutex_unlock(&gLibLock);
+    return ret;
+}
+
+int EffectLoadLibrary(const char *libPath, int *handle)
+{
+    int ret = init();
+    if (ret < 0) {
+        return ret;
+    }
+    if (libPath == NULL) {
+        return -EINVAL;
+    }
+
+    ret = loadLibrary(libPath, handle);
+    updateNumEffects();
+    return ret;
+}
+
+int EffectUnloadLibrary(int handle)
+{
+    int ret = init();
+    if (ret < 0) {
+        return ret;
+    }
+
+    ret = unloadLibrary(handle);
+    updateNumEffects();
+    return ret;
+}
+
+int EffectIsNullUuid(effect_uuid_t *uuid)
+{
+    if (memcmp(uuid, EFFECT_UUID_NULL, sizeof(effect_uuid_t))) {
+        return 0;
+    }
+    return 1;
+}
+
+/////////////////////////////////////////////////
+//      Local functions
+/////////////////////////////////////////////////
+
+int init() {
+    struct dirent *ent;
+    DIR *dir = NULL;
+    char libpath[PATH_MAX];
+    int hdl;
+
+    if (gInitDone) {
+        return 0;
+    }
+
+    pthread_mutex_init(&gLibLock, NULL);
+
+    // load built-in libraries
+    dir = opendir(gEffectLibPath);
+    if (dir == NULL) {
+        return -ENODEV;
+    }
+    while ((ent = readdir(dir)) != NULL) {
+        LOGV("init() reading file %s", ent->d_name);
+        if ((strlen(ent->d_name) < 3) ||
+            strncmp(ent->d_name, "lib", 3) != 0 ||
+            strncmp(ent->d_name + strlen(ent->d_name) - 3, ".so", 3) != 0) {
+            continue;
+        }
+        strcpy(libpath, gEffectLibPath);
+        strcat(libpath, "/");
+        strcat(libpath, ent->d_name);
+        if (loadLibrary(libpath, &hdl) < 0) {
+            LOGW("init() failed to load library %s",libpath);
+        }
+    }
+    closedir(dir);
+    updateNumEffects();
+    gInitDone = 1;
+    LOGV("init() done");
+    return 0;
+}
+
+
+int loadLibrary(const char *libPath, int *handle)
+{
+    void *hdl;
+    effect_QueryNumberEffects_t queryNumFx;
+    effect_QueryEffect_t queryFx;
+    effect_CreateEffect_t createFx;
+    effect_ReleaseEffect_t releaseFx;
+    uint32_t numFx;
+    uint32_t fx;
+    int ret;
+    list_elem_t *e, *descHead = NULL;
+    lib_entry_t *l;
+
+    if (handle == NULL) {
+        return -EINVAL;
+    }
+
+    *handle = 0;
+
+    hdl = dlopen(libPath, RTLD_NOW);
+    if (hdl == 0) {
+        LOGW("could open lib %s", libPath);
+        return -ENODEV;
+    }
+
+    // Check functions availability
+    queryNumFx = (effect_QueryNumberEffects_t)dlsym(hdl, "EffectQueryNumberEffects");
+    if (queryNumFx == NULL) {
+        LOGW("could not get EffectQueryNumberEffects from lib %s", libPath);
+        ret = -ENODEV;
+        goto error;
+    }
+    queryFx = (effect_QueryEffect_t)dlsym(hdl, "EffectQueryEffect");
+    if (queryFx == NULL) {
+        LOGW("could not get EffectQueryEffect from lib %s", libPath);
+        ret = -ENODEV;
+        goto error;
+    }
+    createFx = (effect_CreateEffect_t)dlsym(hdl, "EffectCreate");
+    if (createFx == NULL) {
+        LOGW("could not get EffectCreate from lib %s", libPath);
+        ret = -ENODEV;
+        goto error;
+    }
+    releaseFx = (effect_ReleaseEffect_t)dlsym(hdl, "EffectRelease");
+    if (releaseFx == NULL) {
+        LOGW("could not get EffectRelease from lib %s", libPath);
+        ret = -ENODEV;
+        goto error;
+    }
+
+    // load effect descriptors
+    ret = queryNumFx(&numFx);
+    if (ret) {
+        goto error;
+    }
+
+    for (fx = 0; fx < numFx; fx++) {
+        effect_descriptor_t *d = malloc(sizeof(effect_descriptor_t));
+        if (d == NULL) {
+            ret = -ENOMEM;
+            goto error;
+        }
+        ret = queryFx(fx, d);
+        if (ret == 0) {
+#if (LOG_NDEBUG==0)
+            char s[256];
+            dumpEffectDescriptor(d, s, 256);
+            LOGV("loadLibrary() read descriptor %p:%s",d, s);
+#endif
+            if (d->apiVersion != EFFECT_API_VERSION) {
+                LOGW("Bad API version %04x on lib %s", d->apiVersion, libPath);
+                free(d);
+                continue;
+            }
+            e = malloc(sizeof(list_elem_t));
+            if (e == NULL) {
+                free(d);
+                ret = -ENOMEM;
+                goto error;
+            }
+            e->object = d;
+            e->next = descHead;
+            descHead = e;
+        } else {
+            LOGW("Error querying effect # %d on lib %s", fx, libPath);
+        }
+    }
+
+    pthread_mutex_lock(&gLibLock);
+
+    // add entry for library in gLibraryList
+    l = malloc(sizeof(lib_entry_t));
+    l->id = ++gNextLibId;
+    l->handle = hdl;
+    strncpy(l->path, libPath, PATH_MAX);
+    l->createFx = createFx;
+    l->releaseFx = releaseFx;
+    l->effects = descHead;
+    pthread_mutex_init(&l->lock, NULL);
+
+    e = malloc(sizeof(list_elem_t));
+    e->next = gLibraryList;
+    e->object = l;
+    gLibraryList = e;
+    pthread_mutex_unlock(&gLibLock);
+    LOGV("loadLibrary() linked library %p", l);
+
+    *handle = l->id;
+
+    return 0;
+
+error:
+    LOGW("loadLibrary() error: %d on lib: %s", ret, libPath);
+    while (descHead) {
+        free(descHead->object);
+        e = descHead->next;
+        free(descHead);
+        descHead = e;;
+    }
+    dlclose(hdl);
+    return ret;
+}
+
+int unloadLibrary(int handle)
+{
+    void *hdl;
+    int ret;
+    list_elem_t *el1, *el2;
+    lib_entry_t *l;
+    effect_entry_t *fx;
+
+    pthread_mutex_lock(&gLibLock);
+    el1 = gLibraryList;
+    el2 = NULL;
+    while (el1) {
+        l = (lib_entry_t *)el1->object;
+        if (handle == l->id) {
+            if (el2) {
+                el2->next = el1->next;
+            } else {
+                gLibraryList = el1->next;
+            }
+            free(el1);
+            break;
+        }
+        el2 = el1;
+        el1 = el1->next;
+    }
+    pthread_mutex_unlock(&gLibLock);
+    if (el1 == NULL) {
+        return -ENOENT;
+    }
+
+    // clear effect descriptor list
+    el1 = l->effects;
+    while (el1) {
+        free(el1->object);
+        el2 = el1->next;
+        free(el1);
+        el1 = el2;
+    }
+
+    // disable all effects from this library
+    pthread_mutex_lock(&l->lock);
+
+    el1 = gEffectList;
+    while (el1) {
+        fx = (effect_entry_t *)el1->object;
+        if (fx->lib == l) {
+            fx->lib = NULL;
+        }
+        el1 = el1->next;
+    }
+    pthread_mutex_unlock(&l->lock);
+
+    dlclose(l->handle);
+    free(l);
+    return 0;
+}
+
+void resetEffectEnumeration()
+{
+    gCurLib = gLibraryList;
+    gCurEffect = NULL;
+    if (gCurLib) {
+        gCurEffect = ((lib_entry_t *)gCurLib->object)->effects;
+    }
+    gCurEffectIdx = 0;
+}
+
+uint32_t updateNumEffects() {
+    list_elem_t *e;
+    uint32_t cnt = 0;
+
+    resetEffectEnumeration();
+
+    e = gLibraryList;
+    while (e) {
+        lib_entry_t *l = (lib_entry_t *)e->object;
+        list_elem_t *efx = l->effects;
+        while (efx) {
+            cnt++;
+            efx = efx->next;
+        }
+        e = e->next;
+    }
+    gNumEffects = cnt;
+    gCanQueryEffect = 0;
+    return cnt;
+}
+
+int findEffect(effect_uuid_t *uuid, lib_entry_t **lib, effect_descriptor_t **desc)
+{
+    list_elem_t *e = gLibraryList;
+    lib_entry_t *l = NULL;
+    effect_descriptor_t *d = NULL;
+    int found = 0;
+    int ret = 0;
+
+    while (e && !found) {
+        l = (lib_entry_t *)e->object;
+        list_elem_t *efx = l->effects;
+        while (efx) {
+            d = (effect_descriptor_t *)efx->object;
+            if (memcmp(&d->uuid, uuid, sizeof(effect_uuid_t)) == 0) {
+                found = 1;
+                break;
+            }
+            efx = efx->next;
+        }
+        e = e->next;
+    }
+    if (!found) {
+        LOGV("findEffect() effect not found");
+        ret = -ENOENT;
+    } else {
+        LOGV("findEffect() found effect: %s in lib %s", d->name, l->path);
+        *lib = l;
+        *desc = d;
+    }
+
+    return ret;
+}
+
+void dumpEffectDescriptor(effect_descriptor_t *desc, char *str, size_t len) {
+    char s[256];
+
+    snprintf(str, len, "\nEffect Descriptor %p:\n", desc);
+    sprintf(s, "- UUID: %08X-%04X-%04X-%04X-%02X%02X%02X%02X%02X%02X\n",
+            desc->uuid.timeLow, desc->uuid.timeMid, desc->uuid.timeHiAndVersion,
+            desc->uuid.clockSeq, desc->uuid.node[0], desc->uuid.node[1],desc->uuid.node[2],
+            desc->uuid.node[3],desc->uuid.node[4],desc->uuid.node[5]);
+    strncat(str, s, len);
+    sprintf(s, "- TYPE: %08X-%04X-%04X-%04X-%02X%02X%02X%02X%02X%02X\n",
+                desc->type.timeLow, desc->type.timeMid, desc->type.timeHiAndVersion,
+                desc->type.clockSeq, desc->type.node[0], desc->type.node[1],desc->type.node[2],
+                desc->type.node[3],desc->type.node[4],desc->type.node[5]);
+    strncat(str, s, len);
+    sprintf(s, "- apiVersion: %04X\n- flags: %08X\n",
+            desc->apiVersion, desc->flags);
+    strncat(str, s, len);
+    sprintf(s, "- name: %s\n", desc->name);
+    strncat(str, s, len);
+    sprintf(s, "- implementor: %s\n", desc->implementor);
+    strncat(str, s, len);
+}
+
diff --git a/media/libeffects/EffectsFactory.h b/media/libeffects/EffectsFactory.h
new file mode 100644
index 0000000..8f543ca
--- /dev/null
+++ b/media/libeffects/EffectsFactory.h
@@ -0,0 +1,56 @@
+/*
+ * Copyright (C) 2010 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef ANDROID_EFFECTSFACTORY_H_
+#define ANDROID_EFFECTSFACTORY_H_
+
+#include <cutils/log.h>
+#include <pthread.h>
+#include <dirent.h>
+#include <media/EffectsFactoryApi.h>
+
+
+#if __cplusplus
+extern "C" {
+#endif
+
+typedef struct list_elem_s {
+    void *object;
+    struct list_elem_s *next;
+} list_elem_t;
+
+typedef struct lib_entry_s {
+    char path[PATH_MAX];
+    void *handle;
+    int id;
+    effect_CreateEffect_t createFx;
+    effect_ReleaseEffect_t releaseFx;
+    list_elem_t *effects; //list of effect_descriptor_t
+    pthread_mutex_t lock;
+} lib_entry_t;
+
+typedef struct effect_entry_s {
+    struct effect_interface_s *itfe;
+    effect_interface_t subItfe;
+    lib_entry_t *lib;
+} effect_entry_t;
+
+#if __cplusplus
+}  // extern "C"
+#endif
+
+
+#endif /*ANDROID_EFFECTSFACTORY_H_*/
diff --git a/media/libeffects/EffectsMath.c b/media/libeffects/EffectsMath.c
new file mode 100644
index 0000000..41ec662
--- /dev/null
+++ b/media/libeffects/EffectsMath.c
@@ -0,0 +1,143 @@
+/*
+ * Copyright (C) 2008 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+#define LOG_TAG "EFFECTSMATH"
+//#define LOG_NDEBUG 0
+#include <cutils/log.h>
+#include <assert.h>
+
+#include "EffectsMath.h"
+
+// gLogTab contains pre-calculated values of log2(1 + ai5*2^-1 + ai4*2^-2 + ai3*2^-3 + ai2*2^-4 + ai1*2^-5 + ai0*2^-6)
+// for integers in the range 0 to 63 (i = ai5*2^5 + ai4*2^4 + ai3*2^3 + ai2*2^2 + ai1*2^1 + ai0*2^0)
+// It is used for a better than piece wise approximation of lin to log2 conversion
+
+static const uint16_t gLogTab[] =
+{
+    0, 733, 1455, 2166,
+    2866, 3556, 4236, 4907,
+    5568, 6220, 6863, 7498,
+    8124, 8742, 9352, 9954,
+    10549, 11136, 11716, 12289,
+    12855, 13415, 13968, 14514,
+    15055, 15589, 16117, 16639,
+    17156, 17667, 18173, 18673,
+    19168, 19658, 20143, 20623,
+    21098, 21568, 22034, 22495,
+    22952, 23404, 23852, 24296,
+    24736, 25172, 25604, 26031,
+    26455, 26876, 27292, 27705,
+    28114, 28520, 28922, 29321,
+    29717, 30109, 30498, 30884,
+    31267, 31647, 32024, 32397,
+    32768
+};
+
+int32_t Effects_log2(uint32_t x) {
+    int32_t exp = 31 - __builtin_clz(x);
+    uint32_t segStart = x >> (exp - 6);
+    uint32_t i = segStart & 0x3F;
+    int32_t log = (int32_t)gLogTab[i];
+    int32_t logEnd = (int32_t)gLogTab[i+1];
+    segStart <<= exp - 6;
+
+    return (exp << 15) + log + (((x - segStart) * (logEnd - log)) >> (exp - 6));
+}
+
+// gExpTab[i] = (2^(i>>6)) << 22
+static const uint32_t gExpTab[] = {
+            4194304, 4239977, 4286147, 4332820,
+            4380002, 4427697, 4475911, 4524651,
+            4573921, 4623728, 4674077, 4724974,
+            4776426, 4828438, 4881016, 4934167,
+            4987896, 5042211, 5097117, 5152621,
+            5208729, 5265449, 5322786, 5380747,
+            5439339, 5498570, 5558445, 5618973,
+            5680159, 5742012, 5804539, 5867746,
+            5931642, 5996233, 6061528, 6127533,
+            6194258, 6261709, 6329894, 6398822,
+            6468501, 6538938, 6610143, 6682122,
+            6754886, 6828442, 6902799, 6977965,
+            7053950, 7130763, 7208412, 7286906,
+            7366255, 7446469, 7527555, 7609525,
+            7692387, 7776152, 7860829, 7946428,
+            8032959, 8120432, 8208857, 8298246,
+            8388608
+};
+
+
+uint32_t Effects_exp2(int32_t x) {
+    int32_t i = x >> 15;
+    assert(i < 32);
+    x &= (1 << 15) - 1;
+    int32_t j = x >> 9;
+    x &= (1 << 9) - 1;
+    uint32_t exp = gExpTab[j];
+    uint32_t expEnd = gExpTab[j+1];
+
+    return ((exp << 9) + (expEnd - exp) * x) >> (31 - i);
+}
+
+
+int16_t Effects_MillibelsToLinear16 (int32_t nGain)
+{
+    nGain = ((nGain + MB_TO_LIN_K1) << 15 ) / MB_TO_LIN_K2;
+    uint32_t exp2 = Effects_exp2(nGain);
+
+    if (exp2 > 32767) exp2 = 32767;
+
+    return (int16_t)exp2;
+}
+
+
+int16_t Effects_Linear16ToMillibels (int32_t nGain)
+{
+    return (int16_t)(((MB_TO_LIN_K2*Effects_log2(nGain))>>15)-MB_TO_LIN_K1);
+}
+
+
+int32_t Effects_Sqrt(int32_t in)
+{
+    int32_t tmp;
+    int32_t out = 0;
+    int32_t i;
+    int32_t j;
+
+
+    if (in == 0) return 0;
+
+    if (in >= 0x10000000)
+    {
+        out = 0x4000;
+        in -= 0x10000000;
+    }
+
+    j = 32 - __builtin_clz(in);
+
+    if (j & 1) j++;
+    j >>= 1;
+
+    for (i = j; i > 0; i--) {
+        tmp = (out << i) + (1 << ((i - 1)*2));
+        if (in >= tmp)
+        {
+            out += 1 << (i-1);
+            in -= tmp;
+        }
+    }
+
+    return out;
+}
+
diff --git a/media/libeffects/EffectsMath.h b/media/libeffects/EffectsMath.h
new file mode 100644
index 0000000..2a44399
--- /dev/null
+++ b/media/libeffects/EffectsMath.h
@@ -0,0 +1,424 @@
+/*
+ * Copyright (C) 2008 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef ANDROID_EFFECTSMATH_H_
+#define ANDROID_EFFECTSMATH_H_
+
+#include <stdint.h>
+
+#if __cplusplus
+extern "C" {
+#endif
+
+/** coefs for pan, generates sin, cos */
+#define COEFF_PAN_G2    -27146    /* -0.82842712474619 = 2 - 4/sqrt(2) */
+#define COEFF_PAN_G0    23170     /* 0.707106781186547 = 1/sqrt(2) */
+
+/*
+coefficients for approximating
+2^x = gn2toX0 + gn2toX1*x + gn2toX2*x^2 + gn2toX3*x^3
+where x is a int.frac number representing number of octaves.
+Actually, we approximate only the 2^(frac) using the power series
+and implement the 2^(int) as a shift, so that
+2^x == 2^(int.frac) == 2^(int) * 2^(fract)
+    == (gn2toX0 + gn2toX1*x + gn2toX2*x^2 + gn2toX3*x^3) << (int)
+
+The gn2toX.. were generated using a best fit for a 3rd
+order polynomial, instead of taking the coefficients from
+a truncated Taylor (or Maclaurin?) series.
+*/
+
+#define GN2_TO_X0    32768    /*    1                    */
+#define GN2_TO_X1    22833    /*    0.696807861328125    */
+#define GN2_TO_X2    7344    /*    0.22412109375        */
+#define GN2_TO_X3    2588    /*    0.0789794921875        */
+
+/*----------------------------------------------------------------------------
+ * Fixed Point Math
+ *----------------------------------------------------------------------------
+ * These macros are used for fixed point multiplies. If the processor
+ * supports fixed point multiplies, replace these macros with inline
+ * assembly code to improve performance.
+ *----------------------------------------------------------------------------
+*/
+
+/* Fixed point multiply 0.15 x 0.15 = 0.15 returned as 32-bits */
+#define FMUL_15x15(a,b) \
+    /*lint -e(704) <avoid multiply for performance>*/ \
+    (((int32_t)(a) * (int32_t)(b)) >> 15)
+
+/* Fixed point multiply 0.7 x 0.7 = 0.15 returned as 32-bits */
+#define FMUL_7x7(a,b) \
+    /*lint -e(704) <avoid multiply for performance>*/ \
+    (((int32_t)(a) * (int32_t)(b) ) << 1)
+
+/* Fixed point multiply 0.8 x 0.8 = 0.15 returned as 32-bits */
+#define FMUL_8x8(a,b) \
+    /*lint -e(704) <avoid multiply for performance>*/ \
+    (((int32_t)(a) * (int32_t)(b) ) >> 1)
+
+/* Fixed point multiply 0.8 x 1.15 = 0.15 returned as 32-bits */
+#define FMUL_8x15(a,b) \
+    /*lint -e(704) <avoid divide for performance>*/ \
+    (((int32_t)((a) << 7) * (int32_t)(b)) >> 15)
+
+/* macros for fractional phase accumulator */
+/*
+Note: changed the _U32 to _I32 on 03/14/02. This should not
+affect the phase calculations, and should allow us to reuse these
+macros for other audio sample related math.
+*/
+#define HARDWARE_BIT_WIDTH        32
+
+#define NUM_PHASE_INT_BITS        1
+#define NUM_PHASE_FRAC_BITS       15
+
+#define PHASE_FRAC_MASK           (uint32_t) ((0x1L << NUM_PHASE_FRAC_BITS) -1)
+
+#define GET_PHASE_INT_PART(x)     (uint32_t)((uint32_t)(x) >> NUM_PHASE_FRAC_BITS)
+#define GET_PHASE_FRAC_PART(x)    (uint32_t)((uint32_t)(x) & PHASE_FRAC_MASK)
+
+#define DEFAULT_PHASE_FRAC        0
+#define DEFAULT_PHASE_INT         0
+
+/*
+Linear interpolation calculates:
+output = (1-frac) * sample[n] + (frac) * sample[n+1]
+
+where conceptually    0 <= frac < 1
+
+For a fixed point implementation, frac is actually an integer value
+with an implied binary point one position to the left. The value of
+one (unity) is given by PHASE_ONE
+one half and one quarter are useful for 4-point linear interp.
+*/
+#define PHASE_ONE                (int32_t) (0x1L << NUM_PHASE_FRAC_BITS)
+
+/*
+ Multiply the signed audio sample by the unsigned fraction.
+-  a is the signed audio sample
+-  b is the unsigned fraction (cast to signed int as long as coef
+    uses (n-1) or less bits, where n == hardware bit width)
+*/
+#define MULT_AUDIO_COEF(audio,coef)         /*lint -e704 <avoid divide for performance>*/ \
+            (int32_t)(                                    \
+            (                                            \
+                ((int32_t)(audio)) * ((int32_t)(coef))    \
+            )                                            \
+            >> NUM_PHASE_FRAC_BITS                        \
+                                        )                \
+                                        /* lint +704 <restore checking>*/
+
+/* wet / dry calculation macros */
+#define NUM_WET_DRY_FRAC_BITS       7    // 15
+#define NUM_WET_DRY_INT_BITS        9    // 1
+
+/* define a 1.0 */
+#define WET_DRY_ONE                 (int32_t) ((0x1L << NUM_WET_DRY_FRAC_BITS))
+#define WET_DRY_MINUS_ONE           (int32_t) (~WET_DRY_ONE)
+#define WET_DRY_FULL_SCALE          (int32_t) (WET_DRY_ONE - 1)
+
+#define MULT_AUDIO_WET_DRY_COEF(audio,coef) /*lint -e(702) <avoid divide for performance>*/ \
+            (int32_t)(                                        \
+            (                                                \
+                ((int32_t)(audio)) * ((int32_t)(coef))        \
+            )                                                \
+            >> NUM_WET_DRY_FRAC_BITS                        \
+                                                     )
+
+/* Envelope 1 (EG1) calculation macros */
+#define    NUM_EG1_INT_BITS          1
+#define NUM_EG1_FRAC_BITS            15
+
+/* the max positive gain used in the synth for EG1 */
+/* SYNTH_FULL_SCALE_EG1_GAIN must match the value in the dls2eas
+converter, otherwise, the values we read from the .eas file are bogus. */
+#define SYNTH_FULL_SCALE_EG1_GAIN    (int32_t) ((0x1L << NUM_EG1_FRAC_BITS) -1)
+
+/* define a 1.0 */
+#define EG1_ONE                      (int32_t) ((0x1L << NUM_EG1_FRAC_BITS))
+#define EG1_MINUS_ONE                (int32_t) (~SYNTH_FULL_SCALE_EG1_GAIN)
+
+#define EG1_HALF                     (int32_t) (EG1_ONE/2)
+#define EG1_MINUS_HALF               (int32_t) (EG1_MINUS_ONE/2)
+
+/*
+We implement the EG1 using a linear gain value, which means that the
+attack segment is handled by incrementing (adding) the linear gain.
+However, EG1 treats the Decay, Sustain, and Release differently than
+the Attack portion. For Decay, Sustain, and Release, the gain is
+linear on dB scale, which is equivalent to exponential damping on
+a linear scale. Because we use a linear gain for EG1, we implement
+the Decay and Release as multiplication (instead of incrementing
+as we did for the attack segment).
+Therefore, we need the following macro to implement the multiplication
+(i.e., exponential damping) during the Decay and Release segments of
+the EG1
+*/
+#define MULT_EG1_EG1(gain,damping)        /*lint -e(704) <avoid divide for performance>*/ \
+            (int32_t)(                                        \
+            (                                                \
+                ((int32_t)(gain)) * ((int32_t)(damping))    \
+            )                                                \
+            >> NUM_EG1_FRAC_BITS                            \
+                                        )
+
+// Use the following macro specifically for the filter, when multiplying
+// the b1 coefficient. The 0 <= |b1| < 2, which therefore might overflow
+// in certain conditions because we store b1 as a 1.15 value.
+// Instead, we could store b1 as b1p (b1' == b1 "prime") where
+// b1p == b1/2, thus ensuring no potential overflow for b1p because
+// 0 <= |b1p| < 1
+// However, during the filter calculation, we must account for the fact
+// that we are using b1p instead of b1, and thereby multiply by
+// an extra factor of 2. Rather than multiply by an extra factor of 2,
+// we can instead shift the result right by one less, hence the
+// modified shift right value of (NUM_EG1_FRAC_BITS -1)
+#define MULT_EG1_EG1_X2(gain,damping)         /*lint -e(702) <avoid divide for performance>*/ \
+            (int32_t)(                                        \
+            (                                                \
+                ((int32_t)(gain)) * ((int32_t)(damping))    \
+            )                                                \
+            >> (NUM_EG1_FRAC_BITS -1)                        \
+                                        )
+
+#define SATURATE_EG1(x)        /*lint -e{734} saturation operation */                \
+    ((int32_t)(x) > SYNTH_FULL_SCALE_EG1_GAIN)    ? (SYNTH_FULL_SCALE_EG1_GAIN) :    \
+    ((int32_t)(x) < EG1_MINUS_ONE)                ? (EG1_MINUS_ONE) :    (x);
+
+
+/* use "digital cents" == "dents" instead of cents */
+/* we coudl re-use the phase frac macros, but if we do,
+we must change the phase macros to cast to _I32 instead of _U32,
+because using a _U32 cast causes problems when shifting the exponent
+for the 2^x calculation, because right shift a negative values MUST
+be sign extended, or else the 2^x calculation is wrong */
+
+/* use "digital cents" == "dents" instead of cents */
+#define NUM_DENTS_FRAC_BITS        12
+#define NUM_DENTS_INT_BITS         (HARDWARE_BIT_WIDTH - NUM_DENTS_FRAC_BITS)
+
+#define DENTS_FRAC_MASK            (int32_t) ((0x1L << NUM_DENTS_FRAC_BITS) -1)
+
+#define GET_DENTS_INT_PART(x)        /*lint -e(704) <avoid divide for performance>*/    \
+                            (int32_t)((int32_t)(x) >> NUM_DENTS_FRAC_BITS)
+
+#define GET_DENTS_FRAC_PART(x)     (int32_t)((int32_t)(x) & DENTS_FRAC_MASK)
+
+#define DENTS_ONE                  (int32_t) (0x1L << NUM_DENTS_FRAC_BITS)
+
+/* use CENTS_TO_DENTS to convert a value in cents to dents */
+#define CENTS_TO_DENTS (int32_t) (DENTS_ONE * (0x1L << NUM_EG1_FRAC_BITS) / 1200L)                            \
+
+
+/*
+For gain, the LFO generates a value that modulates in terms
+of dB. However, we use a linear gain value, so we must convert
+the LFO value in dB to a linear gain. Normally, we would use
+linear gain = 10^x, where x = LFO value in dB / 20.
+Instead, we implement 10^x using our 2^x approximation.
+because
+
+  10^x = 2^(log2(10^x)) = 2^(x * log2(10))
+
+so we need to multiply by log2(10) which is just a constant.
+Ah, but just wait -- our 2^x actually doesn't exactly implement
+2^x, but it actually assumes that the input is in cents, and within
+the 2^x approximation converts its input from cents to octaves
+by dividing its input by 1200.
+
+So, in order to convert the LFO gain value in dB to something
+that our existing 2^x approximation can use, multiply the LFO gain
+by log2(10) * 1200 / 20
+
+The divide by 20 helps convert dB to linear gain, and we might
+as well incorporate that operation into this conversion.
+Of course, we need to keep some fractional bits, so multiply
+the constant by NUM_EG1_FRAC_BITS
+*/
+
+/* use LFO_GAIN_TO_CENTS to convert the LFO gain value to cents */
+#if 0
+#define    DOUBLE_LOG2_10    (double) (3.32192809488736)    /* log2(10) */
+
+#define    DOUBLE_LFO_GAIN_TO_CENTS    (double)                \
+    (                                                        \
+                (DOUBLE_LOG2_10) *                            \
+                1200.0    /                                    \
+                20.0                                        \
+    )
+
+#define    LFO_GAIN_TO_CENTS    (int32_t)                        \
+    (                                                        \
+                DOUBLE_LFO_GAIN_TO_CENTS *                    \
+                (0x1L << NUM_EG1_FRAC_BITS)                    \
+    )
+#endif
+
+#define LFO_GAIN_TO_CENTS (int32_t) (1671981156L >> (23 - NUM_EG1_FRAC_BITS))
+
+
+#define MULT_DENTS_COEF(dents,coef)     /*lint -e704 <avoid divide for performance>*/    \
+            (int32_t)(                                    \
+            (                                            \
+                ((int32_t)(dents)) * ((int32_t)(coef))    \
+            )                                            \
+            >> NUM_DENTS_FRAC_BITS                        \
+                                        )                \
+                                        /* lint +e704 <restore checking>*/
+
+
+/* we use 16-bits in the PC per audio sample */
+#define BITS_PER_AUDIO_SAMPLE    16
+
+/* we define 1 as 1.0 - 1 LSbit */
+#define DISTORTION_ONE           (int32_t)((0x1L << (BITS_PER_AUDIO_SAMPLE-1)) -1)
+#define DISTORTION_MINUS_ONE     (int32_t)(~DISTORTION_ONE)
+
+/* drive coef is given as int.frac */
+#define NUM_DRIVE_COEF_INT_BITS  1
+#define NUM_DRIVE_COEF_FRAC_BITS 4
+
+#define MULT_AUDIO_DRIVE(audio,drive)         /*lint -e(702) <avoid divide for performance>*/ \
+            (int32_t)    (                                \
+            (                                            \
+                ((int32_t)(audio)) * ((int32_t)(drive))    \
+            )                                            \
+            >> NUM_DRIVE_COEF_FRAC_BITS                    \
+                                                )
+
+#define MULT_AUDIO_AUDIO(audio1,audio2)         /*lint -e(702) <avoid divide for performance>*/ \
+            (int32_t)    (                                    \
+            (                                                \
+                ((int32_t)(audio1)) * ((int32_t)(audio2))    \
+            )                                                \
+            >> (BITS_PER_AUDIO_SAMPLE-1)                    \
+                                                    )
+
+#define SATURATE(x)                                                            \
+    ((((int32_t)(x)) > DISTORTION_ONE)        ? (DISTORTION_ONE) :            \
+    (((int32_t)(x)) < DISTORTION_MINUS_ONE)    ? (DISTORTION_MINUS_ONE) :    ((int32_t)(x)));
+
+
+/*----------------------------------------------------------------------------
+ * Effects_log2()
+ *----------------------------------------------------------------------------
+ * Purpose:
+ * Fixed-point log2 function.
+ *
+ * Inputs:
+ * Input is interpreted as an integer (should not be 0).
+ *
+ * Outputs:
+ * Output is in 15-bit precision.
+ *
+ * Side Effects:
+ *
+ *----------------------------------------------------------------------------
+*/
+int32_t Effects_log2(uint32_t x);
+
+/*----------------------------------------------------------------------------
+ * Effects_exp2()
+ *----------------------------------------------------------------------------
+ * Purpose:
+ * Fixed-point radix-2 exponent.
+ *
+ * Inputs:
+ * Input is in 15-bit precision. Must be non-negative and less than 32.
+ *
+ * Outputs:
+ * Output is an integer.
+ *
+ * Side Effects:
+ *
+ *----------------------------------------------------------------------------
+*/
+uint32_t Effects_exp2(int32_t x);
+
+/*----------------------------------------------------------------------------
+ * Effects_MillibelsToLinear16()
+ *----------------------------------------------------------------------------
+ * Purpose:
+ * Transform gain in millibels to linear gain multiplier:
+ *
+ * mB = 2000*log(lin/32767)
+ *    => lin = 2^((mB+2000*log(32767))/2000*log(2))
+ *    => lin = Effects_exp2(((mB + K1) << 15) / K2)
+ * with:
+ *    K1 = 2000*log(32767) and K2 = 2000*log(2)
+ *
+ * Inputs:
+ * nGain - log scale value in millibels.
+ *
+ * Outputs:
+ * Returns a 16-bit linear value approximately equal to 2^(nGain/1024)
+ *
+ * Side Effects:
+ *
+ *----------------------------------------------------------------------------
+*/
+#define MB_TO_LIN_K1 9031
+#define MB_TO_LIN_K2 602
+int16_t Effects_MillibelsToLinear16 (int32_t nGain);
+
+/*----------------------------------------------------------------------------
+ * Effects_Linear16ToMillibels()
+ *----------------------------------------------------------------------------
+ * Purpose:
+ * Transform linear gain multiplier to millibels
+ *  mB = 2000*log(lin/32767)
+ *     = 2000*log(2)*log2(lin)-2000*log(32767)
+ *    => mB = K1*Effects_log2(lin) + K2
+ * with:
+ *    K1 = 2000*log(2) and K2 = -2000*log(32767)
+ *
+ * Inputs:
+ * nGain - linear multiplier ranging form 0 to 32767 (corresponding to [0 1] gain range).
+ *
+ * Outputs:
+ * Returns a 16-bit log value expressed in milllibels.
+ *
+ * Side Effects:
+ *
+ *----------------------------------------------------------------------------
+*/
+int16_t Effects_Linear16ToMillibels (int32_t nGain);
+
+/*----------------------------------------------------------------------------
+ * Effects_Sqrt()
+ *----------------------------------------------------------------------------
+ * Purpose:
+ * Returns the square root of the argument given.
+ *
+ * Inputs:
+ * in - positive number in the range 0 - 2^28
+ *
+ * Outputs:
+ * Returned value: square root of in.
+ *
+ * Side Effects:
+ *
+ *----------------------------------------------------------------------------
+*/
+int32_t Effects_Sqrt(int32_t in);
+
+#if __cplusplus
+}  // extern "C"
+#endif
+
+#endif /*ANDROID_EFFECTSMATH_H_*/
+
diff --git a/media/libmedia/Android.mk b/media/libmedia/Android.mk
index 3adabcc..977e6be 100644
--- a/media/libmedia/Android.mk
+++ b/media/libmedia/Android.mk
@@ -12,6 +12,7 @@
     mediaplayer.cpp \
     IMediaPlayerService.cpp \
     IMediaPlayerClient.cpp \
+    IMediaRecorderClient.cpp \
     IMediaPlayer.cpp \
     IMediaRecorder.cpp \
     Metadata.cpp \
@@ -26,7 +27,11 @@
     MediaScannerClient.cpp \
     autodetect.cpp \
     IMediaDeathNotifier.cpp \
-    MediaProfiles.cpp
+    MediaProfiles.cpp \
+    IEffect.cpp \
+    IEffectClient.cpp \
+    AudioEffect.cpp \
+    Visualizer.cpp
 
 LOCAL_SHARED_LIBRARIES := \
 	libui libcutils libutils libbinder libsonivox libicuuc libexpat libsurfaceflinger_client libcamera_client
diff --git a/media/libmedia/AudioEffect.cpp b/media/libmedia/AudioEffect.cpp
new file mode 100644
index 0000000..df0f73b
--- /dev/null
+++ b/media/libmedia/AudioEffect.cpp
@@ -0,0 +1,454 @@
+/*
+**
+** Copyright 2010, The Android Open Source Project
+**
+** Licensed under the Apache License, Version 2.0 (the "License");
+** you may not use this file except in compliance with the License.
+** You may obtain a copy of the License at
+**
+**     http://www.apache.org/licenses/LICENSE-2.0
+**
+** Unless required by applicable law or agreed to in writing, software
+** distributed under the License is distributed on an "AS IS" BASIS,
+** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+** See the License for the specific language governing permissions and
+** limitations under the License.
+*/
+
+
+//#define LOG_NDEBUG 0
+#define LOG_TAG "AudioEffect"
+
+#include <stdint.h>
+#include <sys/types.h>
+#include <limits.h>
+
+#include <private/media/AudioEffectShared.h>
+#include <media/AudioEffect.h>
+
+#include <utils/Log.h>
+#include <cutils/atomic.h>
+#include <binder/IPCThreadState.h>
+
+
+
+namespace android {
+
+// ---------------------------------------------------------------------------
+
+AudioEffect::AudioEffect()
+    : mStatus(NO_INIT)
+{
+}
+
+
+AudioEffect::AudioEffect(const effect_uuid_t *type,
+                const effect_uuid_t *uuid,
+                int32_t priority,
+                effect_callback_t cbf,
+                void* user,
+                int sessionId,
+                audio_io_handle_t output
+                )
+    : mStatus(NO_INIT)
+{
+    mStatus = set(type, uuid, priority, cbf, user, sessionId, output);
+}
+
+AudioEffect::AudioEffect(const char *typeStr,
+                const char *uuidStr,
+                int32_t priority,
+                effect_callback_t cbf,
+                void* user,
+                int sessionId,
+                audio_io_handle_t output
+                )
+    : mStatus(NO_INIT)
+{
+    effect_uuid_t type;
+    effect_uuid_t *pType = NULL;
+    effect_uuid_t uuid;
+    effect_uuid_t *pUuid = NULL;
+
+    LOGV("Constructor string\n - type: %s\n - uuid: %s", typeStr, uuidStr);
+
+    if (typeStr != NULL) {
+        if (stringToGuid(typeStr, &type) == NO_ERROR) {
+            pType = &type;
+        }
+    }
+
+    if (uuidStr != NULL) {
+        if (stringToGuid(uuidStr, &uuid) == NO_ERROR) {
+            pUuid = &uuid;
+        }
+    }
+
+    mStatus = set(pType, pUuid, priority, cbf, user, sessionId, output);
+}
+
+status_t AudioEffect::set(const effect_uuid_t *type,
+                const effect_uuid_t *uuid,
+                int32_t priority,
+                effect_callback_t cbf,
+                void* user,
+                int sessionId,
+                audio_io_handle_t output)
+{
+    sp<IEffect> iEffect;
+    sp<IMemory> cblk;
+    int enabled;
+
+    LOGV("set %p mUserData: %p", this, user);
+
+    if (mIEffect != 0) {
+        LOGW("Effect already in use");
+        return INVALID_OPERATION;
+    }
+
+    const sp<IAudioFlinger>& audioFlinger = AudioSystem::get_audio_flinger();
+    if (audioFlinger == 0) {
+        LOGE("set(): Could not get audioflinger");
+        return NO_INIT;
+    }
+
+    if (type == NULL && uuid == NULL) {
+        LOGW("Must specify at least type or uuid");
+        return BAD_VALUE;
+    }
+
+    mPriority = priority;
+    mCbf = cbf;
+    mUserData = user;
+    mSessionId = sessionId;
+
+    memset(&mDescriptor, 0, sizeof(effect_descriptor_t));
+    memcpy(&mDescriptor.type, EFFECT_UUID_NULL, sizeof(effect_uuid_t));
+    memcpy(&mDescriptor.uuid, EFFECT_UUID_NULL, sizeof(effect_uuid_t));
+
+    if (type != NULL) {
+        memcpy(&mDescriptor.type, type, sizeof(effect_uuid_t));
+    }
+    if (uuid != NULL) {
+        memcpy(&mDescriptor.uuid, uuid, sizeof(effect_uuid_t));
+    }
+
+    mIEffectClient = new EffectClient(this);
+
+    iEffect = audioFlinger->createEffect(getpid(), (effect_descriptor_t *)&mDescriptor,
+            mIEffectClient, priority, output, mSessionId, &mStatus, &mId, &enabled);
+
+    if (iEffect == 0 || (mStatus != NO_ERROR && mStatus != ALREADY_EXISTS)) {
+        LOGE("set(): AudioFlinger could not create effect, status: %d", mStatus);
+        return mStatus;
+    }
+
+    mEnabled = (volatile int32_t)enabled;
+
+    mIEffect = iEffect;
+    cblk = iEffect->getCblk();
+    if (cblk == 0) {
+        mStatus = NO_INIT;
+        LOGE("Could not get control block");
+        return mStatus;
+    }
+
+    mIEffect = iEffect;
+    mCblkMemory = cblk;
+    mCblk = static_cast<effect_param_cblk_t*>(cblk->pointer());
+    int bufOffset = ((sizeof(effect_param_cblk_t) - 1) / sizeof(int) + 1) * sizeof(int);
+    mCblk->buffer = (uint8_t *)mCblk + bufOffset;
+
+    iEffect->asBinder()->linkToDeath(mIEffectClient);
+    LOGV("set() %p OK effect: %s id: %d status %d enabled %d, ", this, mDescriptor.name, mId, mStatus, mEnabled);
+
+    return mStatus;
+}
+
+
+AudioEffect::~AudioEffect()
+{
+    LOGV("Destructor %p", this);
+
+    if (mStatus == NO_ERROR || mStatus == ALREADY_EXISTS) {
+        setEnabled(false);
+        if (mIEffect != NULL) {
+            mIEffect->disconnect();
+            mIEffect->asBinder()->unlinkToDeath(mIEffectClient);
+        }
+         IPCThreadState::self()->flushCommands();
+    }
+    mIEffect.clear();
+    mIEffectClient.clear();
+    mCblkMemory.clear();
+}
+
+
+status_t AudioEffect::initCheck() const
+{
+    return mStatus;
+}
+
+// -------------------------------------------------------------------------
+
+effect_descriptor_t AudioEffect::descriptor() const
+{
+    return mDescriptor;
+}
+
+bool AudioEffect::getEnabled() const
+{
+    return (mEnabled != 0);
+}
+
+status_t AudioEffect::setEnabled(bool enabled)
+{
+    if (mStatus != NO_ERROR) {
+        return INVALID_OPERATION;
+    }
+
+    if (enabled) {
+        LOGV("enable %p", this);
+        if (android_atomic_or(1, &mEnabled) == 0) {
+           return mIEffect->enable();
+        }
+    } else {
+        LOGV("disable %p", this);
+        if (android_atomic_and(~1, &mEnabled) == 1) {
+           return mIEffect->disable();
+        }
+    }
+    return INVALID_OPERATION;
+}
+
+status_t AudioEffect::command(int32_t cmdCode, int32_t cmdSize, void *cmdData, int32_t *replySize, void *replyData)
+{
+    if (mStatus != NO_ERROR && mStatus != ALREADY_EXISTS) {
+        return INVALID_OPERATION;
+    }
+
+    return mIEffect->command(cmdCode, cmdSize, cmdData, replySize, replyData);
+}
+
+
+status_t AudioEffect::setParameter(effect_param_t *param)
+{
+    if (mStatus != NO_ERROR) {
+        return INVALID_OPERATION;
+    }
+
+    if (param == NULL || param->psize == 0 || param->vsize == 0) {
+        return BAD_VALUE;
+    }
+
+    int size = sizeof(int);
+    int psize = ((param->psize - 1) / sizeof(int) + 1) * sizeof(int) + param->vsize;
+
+    LOGV("setParameter: param: %d, param2: %d", *(int *)param->data, (param->psize == 8) ? *((int *)param->data + 1): -1);
+
+    return mIEffect->command(EFFECT_CMD_SET_PARAM, sizeof (effect_param_t) + psize, param, &size, &param->status);
+}
+
+status_t AudioEffect::setParameterDeferred(effect_param_t *param)
+{
+    if (mStatus != NO_ERROR) {
+        return INVALID_OPERATION;
+    }
+
+    if (param == NULL || param->psize == 0 || param->vsize == 0) {
+        return BAD_VALUE;
+    }
+
+    Mutex::Autolock _l(mCblk->lock);
+
+    int psize = ((param->psize - 1) / sizeof(int) + 1) * sizeof(int) + param->vsize;
+    int size = ((sizeof(effect_param_t) + psize - 1) / sizeof(int) + 1) * sizeof(int);
+
+    if (mCblk->clientIndex + size > EFFECT_PARAM_BUFFER_SIZE) {
+        return NO_MEMORY;
+    }
+    int *p = (int *)(mCblk->buffer + mCblk->clientIndex);
+    *p++ = size;
+    memcpy(p, param, sizeof(effect_param_t) + psize);
+    mCblk->clientIndex += size;
+
+    return NO_ERROR;
+}
+
+status_t AudioEffect::setParameterCommit()
+{
+    if (mStatus != NO_ERROR) {
+        return INVALID_OPERATION;
+    }
+
+    Mutex::Autolock _l(mCblk->lock);
+    if (mCblk->clientIndex == 0) {
+        return INVALID_OPERATION;
+    }
+    int size = 0;
+    return mIEffect->command(EFFECT_CMD_SET_PARAM_COMMIT, 0, NULL, &size, NULL);
+}
+
+status_t AudioEffect::getParameter(effect_param_t *param)
+{
+    if (mStatus != NO_ERROR && mStatus != ALREADY_EXISTS) {
+        return INVALID_OPERATION;
+    }
+
+    if (param == NULL || param->psize == 0 || param->vsize == 0) {
+        return BAD_VALUE;
+    }
+
+    LOGV("getParameter: param: %d, param2: %d", *(int *)param->data, (param->psize == 8) ? *((int *)param->data + 1): -1);
+
+    int psize = sizeof(effect_param_t) + ((param->psize - 1) / sizeof(int) + 1) * sizeof(int) + param->vsize;
+
+    return mIEffect->command(EFFECT_CMD_GET_PARAM, sizeof(effect_param_t) + param->psize, param, &psize, param);
+}
+
+
+// -------------------------------------------------------------------------
+
+void AudioEffect::binderDied()
+{
+    LOGW("IEffect died");
+    mStatus = NO_INIT;
+    if (mCbf) {
+        status_t status = DEAD_OBJECT;
+        mCbf(EVENT_ERROR, mUserData, &status);
+    }
+    mIEffect.clear();
+}
+
+// -------------------------------------------------------------------------
+
+void AudioEffect::controlStatusChanged(bool controlGranted)
+{
+    LOGV("controlStatusChanged %p control %d callback %p mUserData %p", this, controlGranted, mCbf, mUserData);
+    if (controlGranted) {
+        if (mStatus == ALREADY_EXISTS) {
+            mStatus = NO_ERROR;
+        }
+    } else {
+        if (mStatus == NO_ERROR) {
+            mStatus = ALREADY_EXISTS;
+        }
+    }
+    if (mCbf) {
+        mCbf(EVENT_CONTROL_STATUS_CHANGED, mUserData, &controlGranted);
+    }
+}
+
+void AudioEffect::enableStatusChanged(bool enabled)
+{
+    LOGV("enableStatusChanged %p enabled %d mCbf %p", this, enabled, mCbf);
+    if (mStatus == ALREADY_EXISTS) {
+        mEnabled = enabled;
+        if (mCbf) {
+            mCbf(EVENT_ENABLE_STATUS_CHANGED, mUserData, &enabled);
+        }
+    }
+}
+
+void AudioEffect::commandExecuted(int cmdCode, int cmdSize, void *cmdData, int replySize, void *replyData)
+{
+    if (cmdData == NULL || replyData == NULL) {
+        return;
+    }
+
+    if (mCbf && cmdCode == EFFECT_CMD_SET_PARAM) {
+        effect_param_t *cmd = (effect_param_t *)cmdData;
+        cmd->status = *(int32_t *)replyData;
+        mCbf(EVENT_PARAMETER_CHANGED, mUserData, cmd);
+    }
+}
+
+// -------------------------------------------------------------------------
+
+status_t AudioEffect::loadEffectLibrary(const char *libPath, int *handle)
+{
+    const sp<IAudioFlinger>& af = AudioSystem::get_audio_flinger();
+    if (af == 0) return PERMISSION_DENIED;
+    return af->loadEffectLibrary(libPath, handle);
+}
+
+status_t AudioEffect::unloadEffectLibrary(int handle)
+{
+    const sp<IAudioFlinger>& af = AudioSystem::get_audio_flinger();
+    if (af == 0) return PERMISSION_DENIED;
+    return af->unloadEffectLibrary(handle);
+}
+
+status_t AudioEffect::queryNumberEffects(uint32_t *numEffects)
+{
+    const sp<IAudioFlinger>& af = AudioSystem::get_audio_flinger();
+    if (af == 0) return PERMISSION_DENIED;
+    return af->queryNumberEffects(numEffects);
+}
+
+status_t AudioEffect::queryEffect(uint32_t index, effect_descriptor_t *descriptor)
+{
+    const sp<IAudioFlinger>& af = AudioSystem::get_audio_flinger();
+    if (af == 0) return PERMISSION_DENIED;
+    return af->queryEffect(index, descriptor);
+}
+
+status_t AudioEffect::getEffectDescriptor(effect_uuid_t *uuid, effect_descriptor_t *descriptor)
+{
+    const sp<IAudioFlinger>& af = AudioSystem::get_audio_flinger();
+    if (af == 0) return PERMISSION_DENIED;
+    return af->getEffectDescriptor(uuid, descriptor);
+}
+
+// -------------------------------------------------------------------------
+
+status_t AudioEffect::stringToGuid(const char *str, effect_uuid_t *guid)
+{
+    if (str == NULL || guid == NULL) {
+        return BAD_VALUE;
+    }
+
+    int tmp[10];
+
+    if (sscanf(str, "%08x-%04x-%04x-%04x-%02x%02x%02x%02x%02x%02x",
+            tmp, tmp+1, tmp+2, tmp+3, tmp+4, tmp+5, tmp+6, tmp+7, tmp+8, tmp+9) < 10) {
+        return BAD_VALUE;
+    }
+    guid->timeLow = (uint32_t)tmp[0];
+    guid->timeMid = (uint16_t)tmp[1];
+    guid->timeHiAndVersion = (uint16_t)tmp[2];
+    guid->clockSeq = (uint16_t)tmp[3];
+    guid->node[0] = (uint8_t)tmp[4];
+    guid->node[1] = (uint8_t)tmp[5];
+    guid->node[2] = (uint8_t)tmp[6];
+    guid->node[3] = (uint8_t)tmp[7];
+    guid->node[4] = (uint8_t)tmp[8];
+    guid->node[5] = (uint8_t)tmp[9];
+
+    return NO_ERROR;
+}
+
+status_t AudioEffect::guidToString(const effect_uuid_t *guid, char *str, size_t maxLen)
+{
+    if (guid == NULL || str == NULL) {
+        return BAD_VALUE;
+    }
+
+    snprintf(str, maxLen, "%08x-%04x-%04x-%04x-%02x%02x%02x%02x%02x%02x",
+            guid->timeLow,
+            guid->timeMid,
+            guid->timeHiAndVersion,
+            guid->clockSeq,
+            guid->node[0],
+            guid->node[1],
+            guid->node[2],
+            guid->node[3],
+            guid->node[4],
+            guid->node[5]);
+
+    return NO_ERROR;
+}
+
+
+}; // namespace android
+
diff --git a/media/libmedia/AudioRecord.cpp b/media/libmedia/AudioRecord.cpp
index ad037d6..a6c515c 100644
--- a/media/libmedia/AudioRecord.cpp
+++ b/media/libmedia/AudioRecord.cpp
@@ -41,11 +41,43 @@
 #define UNLIKELY( exp )     (__builtin_expect( (exp) != 0, false ))
 
 namespace android {
+// ---------------------------------------------------------------------------
+
+// static
+status_t AudioRecord::getMinFrameCount(
+        int* frameCount,
+        uint32_t sampleRate,
+        int format,
+        int channelCount)
+{
+    size_t size = 0;
+    if (AudioSystem::getInputBufferSize(sampleRate, format, channelCount, &size)
+            != NO_ERROR) {
+        LOGE("AudioSystem could not query the input buffer size.");
+        return NO_INIT;
+    }
+
+    if (size == 0) {
+        LOGE("Unsupported configuration: sampleRate %d, format %d, channelCount %d",
+            sampleRate, format, channelCount);
+        return BAD_VALUE;
+    }
+
+    // We double the size of input buffer for ping pong use of record buffer.
+    size <<= 1;
+
+    if (AudioSystem::isLinearPCM(format)) {
+        size /= channelCount * (format == AudioSystem::PCM_16_BIT ? 2 : 1);
+    }
+
+    *frameCount = size;
+    return NO_ERROR;
+}
 
 // ---------------------------------------------------------------------------
 
 AudioRecord::AudioRecord()
-    : mStatus(NO_INIT)
+    : mStatus(NO_INIT), mSessionId(0)
 {
 }
 
@@ -58,11 +90,12 @@
         uint32_t flags,
         callback_t cbf,
         void* user,
-        int notificationFrames)
-    : mStatus(NO_INIT)
+        int notificationFrames,
+        int sessionId)
+    : mStatus(NO_INIT), mSessionId(0)
 {
     mStatus = set(inputSource, sampleRate, format, channels,
-            frameCount, flags, cbf, user, notificationFrames);
+            frameCount, flags, cbf, user, notificationFrames, sessionId);
 }
 
 AudioRecord::~AudioRecord()
@@ -91,7 +124,8 @@
         callback_t cbf,
         void* user,
         int notificationFrames,
-        bool threadCanCallJava)
+        bool threadCanCallJava,
+        int sessionId)
 {
 
     LOGV("set(): sampleRate %d, channels %d, frameCount %d",sampleRate, channels, frameCount);
@@ -119,6 +153,7 @@
     if (!AudioSystem::isInputChannel(channels)) {
         return BAD_VALUE;
     }
+
     int channelCount = AudioSystem::popCount(channels);
 
     audio_io_handle_t input = AudioSystem::getInput(inputSource,
@@ -129,29 +164,11 @@
     }
 
     // validate framecount
-    size_t inputBuffSizeInBytes = -1;
-    if (AudioSystem::getInputBufferSize(sampleRate, format, channelCount, &inputBuffSizeInBytes)
-            != NO_ERROR) {
-        LOGE("AudioSystem could not query the input buffer size.");
-        return NO_INIT;
+    int minFrameCount = 0;
+    status_t status = getMinFrameCount(&minFrameCount, sampleRate, format, channelCount);
+    if (status != NO_ERROR) {
+        return status;
     }
-
-    if (inputBuffSizeInBytes == 0) {
-        LOGE("Recording parameters are not supported: sampleRate %d, channelCount %d, format %d",
-            sampleRate, channelCount, format);
-        return BAD_VALUE;
-    }
-
-    int frameSizeInBytes = channelCount * (format == AudioSystem::PCM_16_BIT ? 2 : 1);
-    if (AudioSystem::isLinearPCM(format)) {
-        frameSizeInBytes = channelCount * (format == AudioSystem::PCM_16_BIT ? sizeof(int16_t) : sizeof(int8_t));
-    } else {
-        frameSizeInBytes = sizeof(int8_t);
-    }
-
-
-    // We use 2* size of input buffer for ping pong use of record buffer.
-    int minFrameCount = 2 * inputBuffSizeInBytes / frameSizeInBytes;
     LOGV("AudioRecord::set() minFrameCount = %d", minFrameCount);
 
     if (frameCount == 0) {
@@ -164,10 +181,11 @@
         notificationFrames = frameCount/2;
     }
 
-    // create the IAudioRecord
-    status_t status = openRecord(sampleRate, format, channelCount,
-                                 frameCount, flags, input);
+    mSessionId = sessionId;
 
+    // create the IAudioRecord
+    status = openRecord(sampleRate, format, channelCount,
+                        frameCount, flags, input);
     if (status != NO_ERROR) {
         return status;
     }
@@ -414,6 +432,7 @@
                                                        channelCount,
                                                        frameCount,
                                                        ((uint16_t)flags) << 16,
+                                                       &mSessionId,
                                                        &status);
     if (record == 0) {
         LOGE("AudioFlinger could not create record track, status: %d", status);
@@ -430,7 +449,7 @@
     mCblkMemory = cblk;
     mCblk = static_cast<audio_track_cblk_t*>(cblk->pointer());
     mCblk->buffers = (char*)mCblk + sizeof(audio_track_cblk_t);
-    mCblk->out = 0;
+    mCblk->flags &= ~CBLK_DIRECTION_MSK;
     mCblk->bufferTimeoutMs = MAX_RUN_TIMEOUT_MS;
     mCblk->waitTimeMs = 0;
     return NO_ERROR;
@@ -532,6 +551,11 @@
     return mInput;
 }
 
+int AudioRecord::getSessionId()
+{
+    return mSessionId;
+}
+
 // -------------------------------------------------------------------------
 
 ssize_t AudioRecord::read(void* buffer, size_t userSize)
@@ -644,10 +668,10 @@
 
     // Manage overrun callback
     if (mActive && (mCblk->framesAvailable_l() == 0)) {
-        LOGV("Overrun user: %x, server: %x, flowControlFlag %d", mCblk->user, mCblk->server, mCblk->flowControlFlag);
-        if (mCblk->flowControlFlag == 0) {
+        LOGV("Overrun user: %x, server: %x, flags %04x", mCblk->user, mCblk->server, mCblk->flags);
+        if ((mCblk->flags & CBLK_UNDERRUN_MSK) == CBLK_UNDERRUN_OFF) {
             mCbf(EVENT_OVERRUN, mUserData, 0);
-            mCblk->flowControlFlag = 1;
+            mCblk->flags |= CBLK_UNDERRUN_ON;
         }
     }
 
diff --git a/media/libmedia/AudioSystem.cpp b/media/libmedia/AudioSystem.cpp
index 5e6ce42..c77f551 100644
--- a/media/libmedia/AudioSystem.cpp
+++ b/media/libmedia/AudioSystem.cpp
@@ -364,6 +364,12 @@
     return result;
 }
 
+int AudioSystem::newAudioSessionId() {
+    const sp<IAudioFlinger>& af = AudioSystem::get_audio_flinger();
+    if (af == 0) return 0;
+    return af->newAudioSessionId();
+}
+
 // ---------------------------------------------------------------------------
 
 void AudioSystem::AudioFlingerClient::binderDied(const wp<IBinder>& who) {
diff --git a/media/libmedia/AudioTrack.cpp b/media/libmedia/AudioTrack.cpp
index cd7bcd5..0f2093a 100644
--- a/media/libmedia/AudioTrack.cpp
+++ b/media/libmedia/AudioTrack.cpp
@@ -41,6 +41,35 @@
 #define UNLIKELY( exp )     (__builtin_expect( (exp) != 0, false ))
 
 namespace android {
+// ---------------------------------------------------------------------------
+
+// static
+status_t AudioTrack::getMinFrameCount(
+        int* frameCount,
+        int streamType,
+        uint32_t sampleRate)
+{
+    int afSampleRate;
+    if (AudioSystem::getOutputSamplingRate(&afSampleRate, streamType) != NO_ERROR) {
+        return NO_INIT;
+    }
+    int afFrameCount;
+    if (AudioSystem::getOutputFrameCount(&afFrameCount, streamType) != NO_ERROR) {
+        return NO_INIT;
+    }
+    uint32_t afLatency;
+    if (AudioSystem::getOutputLatency(&afLatency, streamType) != NO_ERROR) {
+        return NO_INIT;
+    }
+
+    // Ensure that buffer depth covers at least audio hardware latency
+    uint32_t minBufCount = afLatency / ((1000 * afFrameCount) / afSampleRate);
+    if (minBufCount < 2) minBufCount = 2;
+
+    *frameCount = (sampleRate == 0) ? afFrameCount * minBufCount :
+              afFrameCount * minBufCount * sampleRate / afSampleRate;
+    return NO_ERROR;
+}
 
 // ---------------------------------------------------------------------------
 
@@ -58,11 +87,13 @@
         uint32_t flags,
         callback_t cbf,
         void* user,
-        int notificationFrames)
+        int notificationFrames,
+        int sessionId)
     : mStatus(NO_INIT)
 {
     mStatus = set(streamType, sampleRate, format, channels,
-            frameCount, flags, cbf, user, notificationFrames, 0);
+            frameCount, flags, cbf, user, notificationFrames,
+            0, false, sessionId);
 }
 
 AudioTrack::AudioTrack(
@@ -74,11 +105,13 @@
         uint32_t flags,
         callback_t cbf,
         void* user,
-        int notificationFrames)
+        int notificationFrames,
+        int sessionId)
     : mStatus(NO_INIT)
 {
     mStatus = set(streamType, sampleRate, format, channels,
-            0, flags, cbf, user, notificationFrames, sharedBuffer);
+            0, flags, cbf, user, notificationFrames,
+            sharedBuffer, false, sessionId);
 }
 
 AudioTrack::~AudioTrack()
@@ -110,7 +143,8 @@
         void* user,
         int notificationFrames,
         const sp<IMemory>& sharedBuffer,
-        bool threadCanCallJava)
+        bool threadCanCallJava,
+        int sessionId)
 {
 
     LOGV_IF(sharedBuffer != 0, "sharedBuffer: %p, size: %d", sharedBuffer->pointer(), sharedBuffer->size());
@@ -124,10 +158,6 @@
     if (AudioSystem::getOutputSamplingRate(&afSampleRate, streamType) != NO_ERROR) {
         return NO_INIT;
     }
-    int afFrameCount;
-    if (AudioSystem::getOutputFrameCount(&afFrameCount, streamType) != NO_ERROR) {
-        return NO_INIT;
-    }
     uint32_t afLatency;
     if (AudioSystem::getOutputLatency(&afLatency, streamType) != NO_ERROR) {
         return NO_INIT;
@@ -173,48 +203,16 @@
         return BAD_VALUE;
     }
 
-    if (!AudioSystem::isLinearPCM(format)) {
-        if (sharedBuffer != 0) {
-            frameCount = sharedBuffer->size();
-        }
-    } else {
-        // Ensure that buffer depth covers at least audio hardware latency
-        uint32_t minBufCount = afLatency / ((1000 * afFrameCount)/afSampleRate);
-        if (minBufCount < 2) minBufCount = 2;
-
-        int minFrameCount = (afFrameCount*sampleRate*minBufCount)/afSampleRate;
-
-        if (sharedBuffer == 0) {
-            if (frameCount == 0) {
-                frameCount = minFrameCount;
-            }
-            if (notificationFrames == 0) {
-                notificationFrames = frameCount/2;
-            }
-            // Make sure that application is notified with sufficient margin
-            // before underrun
-            if (notificationFrames > frameCount/2) {
-                notificationFrames = frameCount/2;
-            }
-            if (frameCount < minFrameCount) {
-              LOGE("Invalid buffer size: minFrameCount %d, frameCount %d", minFrameCount, frameCount);
-              return BAD_VALUE;
-            }
-        } else {
-            // Ensure that buffer alignment matches channelcount
-            if (((uint32_t)sharedBuffer->pointer() & (channelCount | 1)) != 0) {
-                LOGE("Invalid buffer alignement: address %p, channelCount %d", sharedBuffer->pointer(), channelCount);
-                return BAD_VALUE;
-            }
-            frameCount = sharedBuffer->size()/channelCount/sizeof(int16_t);
-        }
-    }
-
     mVolume[LEFT] = 1.0f;
     mVolume[RIGHT] = 1.0f;
+    mSendLevel = 0;
+    mFrameCount = frameCount;
+    mNotificationFramesReq = notificationFrames;
+    mSessionId = sessionId;
+
     // create the IAudioTrack
     status_t status = createTrack(streamType, sampleRate, format, channelCount,
-                                  frameCount, flags, sharedBuffer, output);
+                                  frameCount, flags, sharedBuffer, output, true);
 
     if (status != NO_ERROR) {
         return status;
@@ -238,10 +236,7 @@
     mMuted = false;
     mActive = 0;
     mCbf = cbf;
-    mNotificationFrames = notificationFrames;
-    mRemainingFrames = notificationFrames;
     mUserData = user;
-    mLatency = afLatency + (1000*mFrameCount) / sampleRate;
     mLoopCount = 0;
     mMarkerPosition = 0;
     mMarkerReached = false;
@@ -281,7 +276,7 @@
 
 uint32_t AudioTrack::frameCount() const
 {
-    return mFrameCount;
+    return mCblk->frameCount;
 }
 
 int AudioTrack::frameSize() const
@@ -303,6 +298,7 @@
 void AudioTrack::start()
 {
     sp<AudioTrackThread> t = mAudioTrackThread;
+    status_t status;
 
     LOGV("start %p", this);
     if (t != 0) {
@@ -325,11 +321,18 @@
             setpriority(PRIO_PROCESS, 0, THREAD_PRIORITY_AUDIO_CLIENT);
         }
 
-        status_t status = mAudioTrack->start();
+        if (mCblk->flags & CBLK_INVALID_MSK) {
+            LOGW("start() track %p invalidated, creating a new one", this);
+            // no need to clear the invalid flag as this cblk will not be used anymore
+            // force new track creation
+            status = DEAD_OBJECT;
+        } else {
+            status = mAudioTrack->start();
+        }
         if (status == DEAD_OBJECT) {
             LOGV("start() dead IAudioTrack: creating a new one");
             status = createTrack(mStreamType, mCblk->sampleRate, mFormat, mChannelCount,
-                                 mFrameCount, mFlags, mSharedBuffer, getOutput());
+                                 mFrameCount, mFlags, mSharedBuffer, getOutput(), false);
             if (status == NO_ERROR) {
                 status = mAudioTrack->start();
                 if (status == NO_ERROR) {
@@ -430,19 +433,49 @@
     return mMuted;
 }
 
-void AudioTrack::setVolume(float left, float right)
+status_t AudioTrack::setVolume(float left, float right)
 {
+    if (left > 1.0f || right > 1.0f) {
+        return BAD_VALUE;
+    }
+
     mVolume[LEFT] = left;
     mVolume[RIGHT] = right;
 
     // write must be atomic
-    mCblk->volumeLR = (int32_t(int16_t(left * 0x1000)) << 16) | int16_t(right * 0x1000);
+    mCblk->volumeLR = (uint32_t(uint16_t(right * 0x1000)) << 16) | uint16_t(left * 0x1000);
+
+    return NO_ERROR;
 }
 
 void AudioTrack::getVolume(float* left, float* right)
 {
-    *left  = mVolume[LEFT];
-    *right = mVolume[RIGHT];
+    if (left != NULL) {
+        *left  = mVolume[LEFT];
+    }
+    if (right != NULL) {
+        *right = mVolume[RIGHT];
+    }
+}
+
+status_t AudioTrack::setSendLevel(float level)
+{
+    if (level > 1.0f) {
+        return BAD_VALUE;
+    }
+
+    mSendLevel = level;
+
+    mCblk->sendLevel = uint16_t(level * 0x1000);
+
+    return NO_ERROR;
+}
+
+void AudioTrack::getSendLevel(float* level)
+{
+    if (level != NULL) {
+        *level  = mSendLevel;
+    }
 }
 
 status_t AudioTrack::setSampleRate(int rate)
@@ -479,14 +512,14 @@
     }
 
     if (loopStart >= loopEnd ||
-        loopEnd - loopStart > mFrameCount) {
-        LOGE("setLoop invalid value: loopStart %d, loopEnd %d, loopCount %d, framecount %d, user %d", loopStart, loopEnd, loopCount, mFrameCount, cblk->user);
+        loopEnd - loopStart > cblk->frameCount) {
+        LOGE("setLoop invalid value: loopStart %d, loopEnd %d, loopCount %d, framecount %d, user %d", loopStart, loopEnd, loopCount, cblk->frameCount, cblk->user);
         return BAD_VALUE;
     }
 
-    if ((mSharedBuffer != 0) && (loopEnd   > mFrameCount)) {
+    if ((mSharedBuffer != 0) && (loopEnd   > cblk->frameCount)) {
         LOGE("setLoop invalid value: loop markers beyond data: loopStart %d, loopEnd %d, framecount %d",
-            loopStart, loopEnd, mFrameCount);
+            loopStart, loopEnd, cblk->frameCount);
         return BAD_VALUE;
     }
 
@@ -566,7 +599,7 @@
     if (position > mCblk->user) return BAD_VALUE;
 
     mCblk->server = position;
-    mCblk->forceReady = 1;
+    mCblk->flags |= CBLK_FORCEREADY_ON;
 
     return NO_ERROR;
 }
@@ -586,7 +619,7 @@
 
     flush();
 
-    mCblk->stepUser(mFrameCount);
+    mCblk->stepUser(mCblk->frameCount);
 
     return NO_ERROR;
 }
@@ -597,6 +630,16 @@
             mCblk->sampleRate, mFormat, mChannels, (AudioSystem::output_flags)mFlags);
 }
 
+int AudioTrack::getSessionId()
+{
+    return mSessionId;
+}
+
+status_t AudioTrack::attachAuxEffect(int effectId)
+{
+    return mAudioTrack->attachAuxEffect(effectId);
+}
+
 // -------------------------------------------------------------------------
 
 status_t AudioTrack::createTrack(
@@ -607,7 +650,8 @@
         int frameCount,
         uint32_t flags,
         const sp<IMemory>& sharedBuffer,
-        audio_io_handle_t output)
+        audio_io_handle_t output,
+        bool enforceFrameCount)
 {
     status_t status;
     const sp<IAudioFlinger>& audioFlinger = AudioSystem::get_audio_flinger();
@@ -616,6 +660,61 @@
        return NO_INIT;
     }
 
+    int afSampleRate;
+    if (AudioSystem::getOutputSamplingRate(&afSampleRate, streamType) != NO_ERROR) {
+        return NO_INIT;
+    }
+    int afFrameCount;
+    if (AudioSystem::getOutputFrameCount(&afFrameCount, streamType) != NO_ERROR) {
+        return NO_INIT;
+    }
+    uint32_t afLatency;
+    if (AudioSystem::getOutputLatency(&afLatency, streamType) != NO_ERROR) {
+        return NO_INIT;
+    }
+
+    mNotificationFramesAct = mNotificationFramesReq;
+    if (!AudioSystem::isLinearPCM(format)) {
+        if (sharedBuffer != 0) {
+            frameCount = sharedBuffer->size();
+        }
+    } else {
+        // Ensure that buffer depth covers at least audio hardware latency
+        uint32_t minBufCount = afLatency / ((1000 * afFrameCount)/afSampleRate);
+        if (minBufCount < 2) minBufCount = 2;
+
+        int minFrameCount = (afFrameCount*sampleRate*minBufCount)/afSampleRate;
+
+        if (sharedBuffer == 0) {
+            if (frameCount == 0) {
+                frameCount = minFrameCount;
+            }
+            if (mNotificationFramesAct == 0) {
+                mNotificationFramesAct = frameCount/2;
+            }
+            // Make sure that application is notified with sufficient margin
+            // before underrun
+            if (mNotificationFramesAct > (uint32_t)frameCount/2) {
+                mNotificationFramesAct = frameCount/2;
+            }
+            if (frameCount < minFrameCount) {
+                if (enforceFrameCount) {
+                    LOGE("Invalid buffer size: minFrameCount %d, frameCount %d", minFrameCount, frameCount);
+                    return BAD_VALUE;
+                } else {
+                    frameCount = minFrameCount;
+                }
+            }
+        } else {
+            // Ensure that buffer alignment matches channelcount
+            if (((uint32_t)sharedBuffer->pointer() & (channelCount | 1)) != 0) {
+                LOGE("Invalid buffer alignement: address %p, channelCount %d", sharedBuffer->pointer(), channelCount);
+                return BAD_VALUE;
+            }
+            frameCount = sharedBuffer->size()/channelCount/sizeof(int16_t);
+        }
+    }
+
     sp<IAudioTrack> track = audioFlinger->createTrack(getpid(),
                                                       streamType,
                                                       sampleRate,
@@ -625,6 +724,7 @@
                                                       ((uint16_t)flags) << 16,
                                                       sharedBuffer,
                                                       output,
+                                                      &mSessionId,
                                                       &status);
 
     if (track == 0) {
@@ -641,20 +741,21 @@
     mCblkMemory.clear();
     mCblkMemory = cblk;
     mCblk = static_cast<audio_track_cblk_t*>(cblk->pointer());
-    mCblk->out = 1;
-    // Update buffer size in case it has been limited by AudioFlinger during track creation
-    mFrameCount = mCblk->frameCount;
+    mCblk->flags |= CBLK_DIRECTION_OUT;
     if (sharedBuffer == 0) {
         mCblk->buffers = (char*)mCblk + sizeof(audio_track_cblk_t);
     } else {
         mCblk->buffers = sharedBuffer->pointer();
          // Force buffer full condition as data is already present in shared memory
-        mCblk->stepUser(mFrameCount);
+        mCblk->stepUser(mCblk->frameCount);
     }
 
-    mCblk->volumeLR = (int32_t(int16_t(mVolume[LEFT] * 0x1000)) << 16) | int16_t(mVolume[RIGHT] * 0x1000);
+    mCblk->volumeLR = (uint32_t(uint16_t(mVolume[RIGHT] * 0x1000)) << 16) | uint16_t(mVolume[LEFT] * 0x1000);
+    mCblk->sendLevel = uint16_t(mSendLevel * 0x1000);
     mCblk->bufferTimeoutMs = MAX_STARTUP_TIMEOUT_MS;
     mCblk->waitTimeMs = 0;
+    mRemainingFrames = mNotificationFramesAct;
+    mLatency = afLatency + (1000*mCblk->frameCount) / sampleRate;
     return NO_ERROR;
 }
 
@@ -685,8 +786,15 @@
                 cblk->lock.unlock();
                 return WOULD_BLOCK;
             }
-
-            result = cblk->cv.waitRelative(cblk->lock, milliseconds(waitTimeMs));
+            if (!(cblk->flags & CBLK_INVALID_MSK)) {
+                result = cblk->cv.waitRelative(cblk->lock, milliseconds(waitTimeMs));
+            }
+            if (cblk->flags & CBLK_INVALID_MSK) {
+                LOGW("obtainBuffer() track %p invalidated, creating a new one", this);
+                // no need to clear the invalid flag as this cblk will not be used anymore
+                cblk->lock.unlock();
+                goto create_new_track;
+            }
             if (__builtin_expect(result!=NO_ERROR, false)) {
                 cblk->waitTimeMs += waitTimeMs;
                 if (cblk->waitTimeMs >= cblk->bufferTimeoutMs) {
@@ -700,8 +808,9 @@
                         result = mAudioTrack->start();
                         if (result == DEAD_OBJECT) {
                             LOGW("obtainBuffer() dead IAudioTrack: creating a new one");
+create_new_track:
                             result = createTrack(mStreamType, cblk->sampleRate, mFormat, mChannelCount,
-                                                 mFrameCount, mFlags, mSharedBuffer, getOutput());
+                                                 mFrameCount, mFlags, mSharedBuffer, getOutput(), false);
                             if (result == NO_ERROR) {
                                 cblk = mCblk;
                                 cblk->bufferTimeoutMs = MAX_RUN_TIMEOUT_MS;
@@ -826,13 +935,13 @@
 
     // Manage underrun callback
     if (mActive && (mCblk->framesReady() == 0)) {
-        LOGV("Underrun user: %x, server: %x, flowControlFlag %d", mCblk->user, mCblk->server, mCblk->flowControlFlag);
-        if (mCblk->flowControlFlag == 0) {
+        LOGV("Underrun user: %x, server: %x, flags %04x", mCblk->user, mCblk->server, mCblk->flags);
+        if ((mCblk->flags & CBLK_UNDERRUN_MSK) == CBLK_UNDERRUN_OFF) {
             mCbf(EVENT_UNDERRUN, mUserData, 0);
             if (mCblk->server == mCblk->frameCount) {
                 mCbf(EVENT_BUFFER_END, mUserData, 0);
             }
-            mCblk->flowControlFlag = 1;
+            mCblk->flags |= CBLK_UNDERRUN_ON;
             if (mSharedBuffer != 0) return false;
         }
     }
@@ -932,7 +1041,7 @@
     while (frames);
 
     if (frames == 0) {
-        mRemainingFrames = mNotificationFrames;
+        mRemainingFrames = mNotificationFramesAct;
     } else {
         mRemainingFrames = frames;
     }
@@ -949,7 +1058,7 @@
     result.append(" AudioTrack::dump\n");
     snprintf(buffer, 255, "  stream type(%d), left - right volume(%f, %f)\n", mStreamType, mVolume[0], mVolume[1]);
     result.append(buffer);
-    snprintf(buffer, 255, "  format(%d), channel count(%d), frame count(%d)\n", mFormat, mChannelCount, mFrameCount);
+    snprintf(buffer, 255, "  format(%d), channel count(%d), frame count(%d)\n", mFormat, mChannelCount, mCblk->frameCount);
     result.append(buffer);
     snprintf(buffer, 255, "  sample rate(%d), status(%d), muted(%d)\n", (mCblk == 0) ? 0 : mCblk->sampleRate, mStatus, mMuted);
     result.append(buffer);
@@ -986,7 +1095,7 @@
     : lock(Mutex::SHARED), cv(Condition::SHARED), user(0), server(0),
     userBase(0), serverBase(0), buffers(0), frameCount(0),
     loopStart(UINT_MAX), loopEnd(UINT_MAX), loopCount(0), volumeLR(0),
-    flowControlFlag(1), forceReady(0)
+    flags(0), sendLevel(0)
 {
 }
 
@@ -996,7 +1105,7 @@
 
     u += frameCount;
     // Ensure that user is never ahead of server for AudioRecord
-    if (out) {
+    if (flags & CBLK_DIRECTION_MSK) {
         // If stepServer() has been called once, switch to normal obtainBuffer() timeout period
         if (bufferTimeoutMs == MAX_STARTUP_TIMEOUT_MS-1) {
             bufferTimeoutMs = MAX_RUN_TIMEOUT_MS;
@@ -1013,7 +1122,7 @@
     this->user = u;
 
     // Clear flow control error condition as new data has been written/read to/from buffer.
-    flowControlFlag = 0;
+    flags &= ~CBLK_UNDERRUN_MSK;
 
     return u;
 }
@@ -1038,7 +1147,7 @@
     uint32_t s = this->server;
 
     s += frameCount;
-    if (out) {
+    if (flags & CBLK_DIRECTION_MSK) {
         // Mark that we have read the first buffer so that next time stepUser() is called
         // we switch to normal obtainBuffer() timeout period
         if (bufferTimeoutMs == MAX_STARTUP_TIMEOUT_MS) {
@@ -1089,7 +1198,7 @@
     uint32_t u = this->user;
     uint32_t s = this->server;
 
-    if (out) {
+    if (flags & CBLK_DIRECTION_MSK) {
         uint32_t limit = (s < loopStart) ? s : loopStart;
         return limit + frameCount - u;
     } else {
@@ -1102,7 +1211,7 @@
     uint32_t u = this->user;
     uint32_t s = this->server;
 
-    if (out) {
+    if (flags & CBLK_DIRECTION_MSK) {
         if (u < loopEnd) {
             return u - s;
         } else {
diff --git a/media/libmedia/IAudioFlinger.cpp b/media/libmedia/IAudioFlinger.cpp
index 47bcc12..7d6a5d3 100644
--- a/media/libmedia/IAudioFlinger.cpp
+++ b/media/libmedia/IAudioFlinger.cpp
@@ -62,7 +62,14 @@
     SET_STREAM_OUTPUT,
     SET_VOICE_VOLUME,
     GET_RENDER_POSITION,
-    GET_INPUT_FRAMES_LOST
+    GET_INPUT_FRAMES_LOST,
+    NEW_AUDIO_SESSION_ID,
+    LOAD_EFFECT_LIBRARY,
+    UNLOAD_EFFECT_LIBRARY,
+    QUERY_NUM_EFFECTS,
+    QUERY_EFFECT,
+    GET_EFFECT_DESCRIPTOR,
+    CREATE_EFFECT
 };
 
 class BpAudioFlinger : public BpInterface<IAudioFlinger>
@@ -83,6 +90,7 @@
                                 uint32_t flags,
                                 const sp<IMemory>& sharedBuffer,
                                 int output,
+                                int *sessionId,
                                 status_t *status)
     {
         Parcel data, reply;
@@ -97,10 +105,19 @@
         data.writeInt32(flags);
         data.writeStrongBinder(sharedBuffer->asBinder());
         data.writeInt32(output);
+        int lSessionId = 0;
+        if (sessionId != NULL) {
+            lSessionId = *sessionId;
+        }
+        data.writeInt32(lSessionId);
         status_t lStatus = remote()->transact(CREATE_TRACK, data, &reply);
         if (lStatus != NO_ERROR) {
             LOGE("createTrack error: %s", strerror(-lStatus));
         } else {
+            lSessionId = reply.readInt32();
+            if (sessionId != NULL) {
+                *sessionId = lSessionId;
+            }
             lStatus = reply.readInt32();
             track = interface_cast<IAudioTrack>(reply.readStrongBinder());
         }
@@ -118,6 +135,7 @@
                                 int channelCount,
                                 int frameCount,
                                 uint32_t flags,
+                                int *sessionId,
                                 status_t *status)
     {
         Parcel data, reply;
@@ -130,10 +148,19 @@
         data.writeInt32(channelCount);
         data.writeInt32(frameCount);
         data.writeInt32(flags);
+        int lSessionId = 0;
+        if (sessionId != NULL) {
+            lSessionId = *sessionId;
+        }
+        data.writeInt32(lSessionId);
         status_t lStatus = remote()->transact(OPEN_RECORD, data, &reply);
         if (lStatus != NO_ERROR) {
             LOGE("openRecord error: %s", strerror(-lStatus));
         } else {
+            lSessionId = reply.readInt32();
+            if (sessionId != NULL) {
+                *sessionId = lSessionId;
+            }
             lStatus = reply.readInt32();
             record = interface_cast<IAudioRecord>(reply.readStrongBinder());
         }
@@ -497,6 +524,158 @@
         remote()->transact(GET_INPUT_FRAMES_LOST, data, &reply);
         return reply.readInt32();
     }
+
+    virtual int newAudioSessionId()
+    {
+        Parcel data, reply;
+        data.writeInterfaceToken(IAudioFlinger::getInterfaceDescriptor());
+        status_t status = remote()->transact(NEW_AUDIO_SESSION_ID, data, &reply);
+        int id = 0;
+        if (status == NO_ERROR) {
+            id = reply.readInt32();
+        }
+        return id;
+    }
+
+    virtual status_t loadEffectLibrary(const char *libPath, int *handle)
+    {
+        if (libPath == NULL || handle == NULL) {
+            return BAD_VALUE;
+        }
+        *handle = 0;
+        Parcel data, reply;
+        data.writeInterfaceToken(IAudioFlinger::getInterfaceDescriptor());
+        data.writeCString(libPath);
+        status_t status = remote()->transact(LOAD_EFFECT_LIBRARY, data, &reply);
+        if (status == NO_ERROR) {
+            status = reply.readInt32();
+            if (status == NO_ERROR) {
+                *handle = reply.readInt32();
+            }
+        }
+        return status;
+    }
+
+    virtual status_t unloadEffectLibrary(int handle)
+    {
+        Parcel data, reply;
+        data.writeInterfaceToken(IAudioFlinger::getInterfaceDescriptor());
+        data.writeInt32(handle);
+        status_t status = remote()->transact(UNLOAD_EFFECT_LIBRARY, data, &reply);
+        if (status == NO_ERROR) {
+            status = reply.readInt32();
+        }
+        return status;
+    }
+
+    virtual status_t queryNumberEffects(uint32_t *numEffects)
+    {
+        Parcel data, reply;
+        data.writeInterfaceToken(IAudioFlinger::getInterfaceDescriptor());
+        status_t status = remote()->transact(QUERY_NUM_EFFECTS, data, &reply);
+        if (status != NO_ERROR) {
+            return status;
+        }
+        status = reply.readInt32();
+        if (status != NO_ERROR) {
+            return status;
+        }
+        if (numEffects) {
+            *numEffects = (uint32_t)reply.readInt32();
+        }
+        return NO_ERROR;
+    }
+
+    virtual status_t queryEffect(uint32_t index, effect_descriptor_t *pDescriptor)
+    {
+        if (pDescriptor == NULL) {
+            return BAD_VALUE;
+        }
+        Parcel data, reply;
+        data.writeInterfaceToken(IAudioFlinger::getInterfaceDescriptor());
+        data.writeInt32(index);
+        status_t status = remote()->transact(QUERY_EFFECT, data, &reply);
+        if (status != NO_ERROR) {
+            return status;
+        }
+        status = reply.readInt32();
+        if (status != NO_ERROR) {
+            return status;
+        }
+        reply.read(pDescriptor, sizeof(effect_descriptor_t));
+        return NO_ERROR;
+    }
+
+    virtual status_t getEffectDescriptor(effect_uuid_t *pUuid, effect_descriptor_t *pDescriptor)
+    {
+        if (pUuid == NULL || pDescriptor == NULL) {
+            return BAD_VALUE;
+        }
+        Parcel data, reply;
+        data.writeInterfaceToken(IAudioFlinger::getInterfaceDescriptor());
+        data.write(pUuid, sizeof(effect_uuid_t));
+        status_t status = remote()->transact(GET_EFFECT_DESCRIPTOR, data, &reply);
+        if (status != NO_ERROR) {
+            return status;
+        }
+        status = reply.readInt32();
+        if (status != NO_ERROR) {
+            return status;
+        }
+        reply.read(pDescriptor, sizeof(effect_descriptor_t));
+        return NO_ERROR;
+    }
+
+    virtual sp<IEffect> createEffect(pid_t pid,
+                                    effect_descriptor_t *pDesc,
+                                    const sp<IEffectClient>& client,
+                                    int32_t priority,
+                                    int output,
+                                    int sessionId,
+                                    status_t *status,
+                                    int *id,
+                                    int *enabled)
+    {
+        Parcel data, reply;
+        sp<IEffect> effect;
+
+        if (pDesc == NULL) {
+             return effect;
+             if (status) {
+                 *status = BAD_VALUE;
+             }
+         }
+
+        data.writeInterfaceToken(IAudioFlinger::getInterfaceDescriptor());
+        data.writeInt32(pid);
+        data.write(pDesc, sizeof(effect_descriptor_t));
+        data.writeStrongBinder(client->asBinder());
+        data.writeInt32(priority);
+        data.writeInt32(output);
+        data.writeInt32(sessionId);
+
+        status_t lStatus = remote()->transact(CREATE_EFFECT, data, &reply);
+        if (lStatus != NO_ERROR) {
+            LOGE("createEffect error: %s", strerror(-lStatus));
+        } else {
+            lStatus = reply.readInt32();
+            int tmp = reply.readInt32();
+            if (id) {
+                *id = tmp;
+            }
+            tmp = reply.readInt32();
+            if (enabled) {
+                *enabled = tmp;
+            }
+            effect = interface_cast<IEffect>(reply.readStrongBinder());
+            reply.read(pDesc, sizeof(effect_descriptor_t));
+        }
+        if (status) {
+            *status = lStatus;
+        }
+
+        return effect;
+    }
 };
 
 IMPLEMENT_META_INTERFACE(AudioFlinger, "android.media.IAudioFlinger");
@@ -518,10 +697,12 @@
             uint32_t flags = data.readInt32();
             sp<IMemory> buffer = interface_cast<IMemory>(data.readStrongBinder());
             int output = data.readInt32();
+            int sessionId = data.readInt32();
             status_t status;
             sp<IAudioTrack> track = createTrack(pid,
                     streamType, sampleRate, format,
-                    channelCount, bufferCount, flags, buffer, output, &status);
+                    channelCount, bufferCount, flags, buffer, output, &sessionId, &status);
+            reply->writeInt32(sessionId);
             reply->writeInt32(status);
             reply->writeStrongBinder(track->asBinder());
             return NO_ERROR;
@@ -535,9 +716,11 @@
             int channelCount = data.readInt32();
             size_t bufferCount = data.readInt32();
             uint32_t flags = data.readInt32();
+            int sessionId = data.readInt32();
             status_t status;
             sp<IAudioRecord> record = openRecord(pid, input,
-                    sampleRate, format, channelCount, bufferCount, flags, &status);
+                    sampleRate, format, channelCount, bufferCount, flags, &sessionId, &status);
+            reply->writeInt32(sessionId);
             reply->writeInt32(status);
             reply->writeStrongBinder(record->asBinder());
             return NO_ERROR;
@@ -768,7 +951,79 @@
             reply->writeInt32(getInputFramesLost(ioHandle));
             return NO_ERROR;
         } break;
+        case NEW_AUDIO_SESSION_ID: {
+            CHECK_INTERFACE(IAudioFlinger, data, reply);
+            reply->writeInt32(newAudioSessionId());
+            return NO_ERROR;
+        } break;
+        case LOAD_EFFECT_LIBRARY: {
+            CHECK_INTERFACE(IAudioFlinger, data, reply);
+            int handle;
+            status_t status = loadEffectLibrary(data.readCString(), &handle);
+            reply->writeInt32(status);
+            if (status == NO_ERROR) {
+                reply->writeInt32(handle);
+            }
+            return NO_ERROR;
+        }
+        case UNLOAD_EFFECT_LIBRARY: {
+            CHECK_INTERFACE(IAudioFlinger, data, reply);
+            reply->writeInt32(unloadEffectLibrary(data.readInt32()));
+            return NO_ERROR;
+        }
+        case QUERY_NUM_EFFECTS: {
+            CHECK_INTERFACE(IAudioFlinger, data, reply);
+            uint32_t numEffects;
+            status_t status = queryNumberEffects(&numEffects);
+            reply->writeInt32(status);
+            if (status == NO_ERROR) {
+                reply->writeInt32((int32_t)numEffects);
+            }
+            return NO_ERROR;
+        }
+        case QUERY_EFFECT: {
+            CHECK_INTERFACE(IAudioFlinger, data, reply);
+            effect_descriptor_t desc;
+            status_t status = queryEffect(data.readInt32(), &desc);
+            reply->writeInt32(status);
+            if (status == NO_ERROR) {
+                reply->write(&desc, sizeof(effect_descriptor_t));
+            }
+            return NO_ERROR;
+        }
+        case GET_EFFECT_DESCRIPTOR: {
+            CHECK_INTERFACE(IAudioFlinger, data, reply);
+            effect_uuid_t uuid;
+            data.read(&uuid, sizeof(effect_uuid_t));
+            effect_descriptor_t desc;
+            status_t status = getEffectDescriptor(&uuid, &desc);
+            reply->writeInt32(status);
+            if (status == NO_ERROR) {
+                reply->write(&desc, sizeof(effect_descriptor_t));
+            }
+            return NO_ERROR;
+        }
+        case CREATE_EFFECT: {
+            CHECK_INTERFACE(IAudioFlinger, data, reply);
+            pid_t pid = data.readInt32();
+            effect_descriptor_t desc;
+            data.read(&desc, sizeof(effect_descriptor_t));
+            sp<IEffectClient> client = interface_cast<IEffectClient>(data.readStrongBinder());
+            int32_t priority = data.readInt32();
+            int output = data.readInt32();
+            int sessionId = data.readInt32();
+            status_t status;
+            int id;
+            int enabled;
 
+            sp<IEffect> effect = createEffect(pid, &desc, client, priority, output, sessionId, &status, &id, &enabled);
+            reply->writeInt32(status);
+            reply->writeInt32(id);
+            reply->writeInt32(enabled);
+            reply->writeStrongBinder(effect->asBinder());
+            reply->write(&desc, sizeof(effect_descriptor_t));
+            return NO_ERROR;
+        } break;
         default:
             return BBinder::onTransact(code, data, reply, flags);
     }
diff --git a/media/libmedia/IAudioTrack.cpp b/media/libmedia/IAudioTrack.cpp
index 01ffd75..bc8ff34 100644
--- a/media/libmedia/IAudioTrack.cpp
+++ b/media/libmedia/IAudioTrack.cpp
@@ -34,7 +34,8 @@
     STOP,
     FLUSH,
     MUTE,
-    PAUSE
+    PAUSE,
+    ATTACH_AUX_EFFECT
 };
 
 class BpAudioTrack : public BpInterface<IAudioTrack>
@@ -97,7 +98,21 @@
             cblk = interface_cast<IMemory>(reply.readStrongBinder());
         }
         return cblk;
-    }    
+    }
+
+    virtual status_t attachAuxEffect(int effectId)
+    {
+        Parcel data, reply;
+        data.writeInterfaceToken(IAudioTrack::getInterfaceDescriptor());
+        data.writeInt32(effectId);
+        status_t status = remote()->transact(ATTACH_AUX_EFFECT, data, &reply);
+        if (status == NO_ERROR) {
+            status = reply.readInt32();
+        } else {
+            LOGW("attachAuxEffect() error: %s", strerror(-status));
+        }
+        return status;
+    }
 };
 
 IMPLEMENT_META_INTERFACE(AudioTrack, "android.media.IAudioTrack");
@@ -138,6 +153,11 @@
             pause();
             return NO_ERROR;
         }
+        case ATTACH_AUX_EFFECT: {
+            CHECK_INTERFACE(IAudioTrack, data, reply);
+            reply->writeInt32(attachAuxEffect(data.readInt32()));
+            return NO_ERROR;
+        } break;
         default:
             return BBinder::onTransact(code, data, reply, flags);
     }
diff --git a/media/libmedia/IEffect.cpp b/media/libmedia/IEffect.cpp
new file mode 100644
index 0000000..8e3ac71
--- /dev/null
+++ b/media/libmedia/IEffect.cpp
@@ -0,0 +1,191 @@
+/*
+**
+** Copyright 2010, The Android Open Source Project
+**
+** Licensed under the Apache License, Version 2.0 (the "License");
+** you may not use this file except in compliance with the License.
+** You may obtain a copy of the License at
+**
+**     http://www.apache.org/licenses/LICENSE-2.0
+**
+** Unless required by applicable law or agreed to in writing, software
+** distributed under the License is distributed on an "AS IS" BASIS,
+** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+** See the License for the specific language governing permissions and
+** limitations under the License.
+*/
+
+//#define LOG_NDEBUG 0
+#define LOG_TAG "IEffect"
+#include <utils/Log.h>
+#include <stdint.h>
+#include <sys/types.h>
+#include <binder/Parcel.h>
+#include <media/IEffect.h>
+
+namespace android {
+
+enum {
+    ENABLE = IBinder::FIRST_CALL_TRANSACTION,
+    DISABLE,
+    COMMAND,
+    DISCONNECT,
+    GET_CBLK
+};
+
+class BpEffect: public BpInterface<IEffect>
+{
+public:
+    BpEffect(const sp<IBinder>& impl)
+        : BpInterface<IEffect>(impl)
+    {
+    }
+
+    status_t enable()
+    {
+        LOGV("enable");
+        Parcel data, reply;
+        data.writeInterfaceToken(IEffect::getInterfaceDescriptor());
+        remote()->transact(ENABLE, data, &reply);
+        return reply.readInt32();
+    }
+
+    status_t disable()
+    {
+        LOGV("disable");
+        Parcel data, reply;
+        data.writeInterfaceToken(IEffect::getInterfaceDescriptor());
+        remote()->transact(DISABLE, data, &reply);
+        return reply.readInt32();
+    }
+
+    status_t command(int cmdCode, int cmdSize, void *pCmdData, int *pReplySize, void *pReplyData)
+    {
+        LOGV("command");
+        Parcel data, reply;
+        data.writeInterfaceToken(IEffect::getInterfaceDescriptor());
+        data.writeInt32(cmdCode);
+        int size = cmdSize;
+        if (pCmdData == NULL) {
+            size = 0;
+        }
+        data.writeInt32(size);
+        if (size) {
+            data.write(pCmdData, size);
+        }
+        if (pReplySize == NULL) {
+            size = 0;
+        } else {
+            size = *pReplySize;
+        }
+        data.writeInt32(size);
+        remote()->transact(COMMAND, data, &reply);
+        status_t status = reply.readInt32();
+        size = reply.readInt32();
+        if (size != 0 && pReplyData != NULL && pReplySize != NULL) {
+            reply.read(pReplyData, size);
+            *pReplySize = size;
+        }
+        return status;
+    }
+
+    void disconnect()
+    {
+        LOGV("disconnect");
+        Parcel data, reply;
+        data.writeInterfaceToken(IEffect::getInterfaceDescriptor());
+        remote()->transact(DISCONNECT, data, &reply);
+        return;
+    }
+
+    virtual sp<IMemory> getCblk() const
+    {
+        Parcel data, reply;
+        sp<IMemory> cblk;
+        data.writeInterfaceToken(IEffect::getInterfaceDescriptor());
+        status_t status = remote()->transact(GET_CBLK, data, &reply);
+        if (status == NO_ERROR) {
+            cblk = interface_cast<IMemory>(reply.readStrongBinder());
+        }
+        return cblk;
+    }
+ };
+
+IMPLEMENT_META_INTERFACE(Effect, "android.media.IEffect");
+
+// ----------------------------------------------------------------------
+
+status_t BnEffect::onTransact(
+    uint32_t code, const Parcel& data, Parcel* reply, uint32_t flags)
+{
+    switch(code) {
+        case ENABLE: {
+            LOGV("ENABLE");
+            CHECK_INTERFACE(IEffect, data, reply);
+            reply->writeInt32(enable());
+            return NO_ERROR;
+        } break;
+
+        case DISABLE: {
+            LOGV("DISABLE");
+            CHECK_INTERFACE(IEffect, data, reply);
+            reply->writeInt32(disable());
+            return NO_ERROR;
+        } break;
+
+        case COMMAND: {
+            LOGV("COMMAND");
+            CHECK_INTERFACE(IEffect, data, reply);
+            int cmdCode = data.readInt32();
+            int cmdSize = data.readInt32();
+            char *cmd = NULL;
+            if (cmdSize) {
+                cmd = (char *)malloc(cmdSize);
+                data.read(cmd, cmdSize);
+            }
+            int replySize = data.readInt32();
+            int replySz = replySize;
+            char *resp = NULL;
+            if (replySize) {
+                resp = (char *)malloc(replySize);
+            }
+            status_t status = command(cmdCode, cmdSize, cmd, &replySz, resp);
+            reply->writeInt32(status);
+            if (replySz < replySize) {
+                replySize = replySz;
+            }
+            reply->writeInt32(replySize);
+            if (replySize) {
+                reply->write(resp, replySize);
+            }
+            if (cmd) {
+                free(cmd);
+            }
+            if (resp) {
+                free(resp);
+            }
+            return NO_ERROR;
+        } break;
+
+        case DISCONNECT: {
+            LOGV("DISCONNECT");
+            CHECK_INTERFACE(IEffect, data, reply);
+            disconnect();
+            return NO_ERROR;
+        } break;
+
+        case GET_CBLK: {
+             CHECK_INTERFACE(IEffect, data, reply);
+             reply->writeStrongBinder(getCblk()->asBinder());
+             return NO_ERROR;
+         } break;
+
+        default:
+            return BBinder::onTransact(code, data, reply, flags);
+    }
+}
+
+// ----------------------------------------------------------------------------
+
+}; // namespace android
+
diff --git a/media/libmedia/IEffectClient.cpp b/media/libmedia/IEffectClient.cpp
new file mode 100644
index 0000000..e7659ae
--- /dev/null
+++ b/media/libmedia/IEffectClient.cpp
@@ -0,0 +1,141 @@
+/*
+**
+** Copyright 2010, The Android Open Source Project
+**
+** Licensed under the Apache License, Version 2.0 (the "License");
+** you may not use this file except in compliance with the License.
+** You may obtain a copy of the License at
+**
+**     http://www.apache.org/licenses/LICENSE-2.0
+**
+** Unless required by applicable law or agreed to in writing, software
+** distributed under the License is distributed on an "AS IS" BASIS,
+** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+** See the License for the specific language governing permissions and
+** limitations under the License.
+*/
+
+//#define LOG_NDEBUG 0
+#define LOG_TAG "IEffectClient"
+#include <utils/Log.h>
+#include <stdint.h>
+#include <sys/types.h>
+#include <media/IEffectClient.h>
+
+namespace android {
+
+enum {
+    CONTROL_STATUS_CHANGED = IBinder::FIRST_CALL_TRANSACTION,
+    ENABLE_STATUS_CHANGED,
+    COMMAND_EXECUTED
+};
+
+class BpEffectClient: public BpInterface<IEffectClient>
+{
+public:
+    BpEffectClient(const sp<IBinder>& impl)
+        : BpInterface<IEffectClient>(impl)
+    {
+    }
+
+    void controlStatusChanged(bool controlGranted)
+    {
+        LOGV("controlStatusChanged");
+        Parcel data, reply;
+        data.writeInterfaceToken(IEffectClient::getInterfaceDescriptor());
+        data.writeInt32((uint32_t)controlGranted);
+        remote()->transact(CONTROL_STATUS_CHANGED, data, &reply, IBinder::FLAG_ONEWAY);
+    }
+
+    void enableStatusChanged(bool enabled)
+    {
+        LOGV("enableStatusChanged");
+        Parcel data, reply;
+        data.writeInterfaceToken(IEffectClient::getInterfaceDescriptor());
+        data.writeInt32((uint32_t)enabled);
+        remote()->transact(ENABLE_STATUS_CHANGED, data, &reply, IBinder::FLAG_ONEWAY);
+    }
+
+    void commandExecuted(int cmdCode, int cmdSize, void *pCmdData, int replySize, void *pReplyData)
+    {
+        LOGV("commandExecuted");
+        Parcel data, reply;
+        data.writeInterfaceToken(IEffectClient::getInterfaceDescriptor());
+        data.writeInt32(cmdCode);
+        int size = cmdSize;
+        if (pCmdData == NULL) {
+            size = 0;
+        }
+        data.writeInt32(size);
+        if (size) {
+            data.write(pCmdData, size);
+        }
+        size = replySize;
+        if (pReplyData == NULL) {
+            size = 0;
+        }
+        data.writeInt32(size);
+        if (size) {
+            data.write(pReplyData, size);
+        }
+        remote()->transact(COMMAND_EXECUTED, data, &reply, IBinder::FLAG_ONEWAY);
+    }
+
+};
+
+IMPLEMENT_META_INTERFACE(EffectClient, "android.media.IEffectClient");
+
+// ----------------------------------------------------------------------
+
+status_t BnEffectClient::onTransact(
+    uint32_t code, const Parcel& data, Parcel* reply, uint32_t flags)
+{
+    switch(code) {
+        case CONTROL_STATUS_CHANGED: {
+            LOGV("CONTROL_STATUS_CHANGED");
+            CHECK_INTERFACE(IEffectClient, data, reply);
+            bool hasControl = (bool)data.readInt32();
+            controlStatusChanged(hasControl);
+            return NO_ERROR;
+        } break;
+        case ENABLE_STATUS_CHANGED: {
+            LOGV("ENABLE_STATUS_CHANGED");
+            CHECK_INTERFACE(IEffectClient, data, reply);
+            bool enabled = (bool)data.readInt32();
+            enableStatusChanged(enabled);
+            return NO_ERROR;
+        } break;
+        case COMMAND_EXECUTED: {
+            LOGV("COMMAND_EXECUTED");
+            CHECK_INTERFACE(IEffectClient, data, reply);
+            int cmdCode = data.readInt32();
+            int cmdSize = data.readInt32();
+            char *cmd = NULL;
+            if (cmdSize) {
+                cmd = (char *)malloc(cmdSize);
+                data.read(cmd, cmdSize);
+            }
+            int replySize = data.readInt32();
+            char *resp = NULL;
+            if (replySize) {
+                resp = (char *)malloc(replySize);
+                data.read(resp, replySize);
+            }
+            commandExecuted(cmdCode, cmdSize, cmd, replySize, resp);
+            if (cmd) {
+                free(cmd);
+            }
+            if (resp) {
+                free(resp);
+            }
+            return NO_ERROR;
+        } break;
+        default:
+            return BBinder::onTransact(code, data, reply, flags);
+    }
+}
+
+// ----------------------------------------------------------------------------
+
+}; // namespace android
+
diff --git a/media/libmedia/IMediaPlayerService.cpp b/media/libmedia/IMediaPlayerService.cpp
index 71c5f86..4abfa75 100644
--- a/media/libmedia/IMediaPlayerService.cpp
+++ b/media/libmedia/IMediaPlayerService.cpp
@@ -35,8 +35,7 @@
     DECODE_FD,
     CREATE_MEDIA_RECORDER,
     CREATE_METADATA_RETRIEVER,
-    GET_OMX,
-    SNOOP
+    GET_OMX
 };
 
 class BpMediaPlayerService: public BpInterface<IMediaPlayerService>
@@ -58,7 +57,7 @@
 
     virtual sp<IMediaPlayer> create(
             pid_t pid, const sp<IMediaPlayerClient>& client,
-            const char* url, const KeyedVector<String8, String8> *headers) {
+            const char* url, const KeyedVector<String8, String8> *headers, int audioSessionId) {
         Parcel data, reply;
         data.writeInterfaceToken(IMediaPlayerService::getInterfaceDescriptor());
         data.writeInt32(pid);
@@ -75,8 +74,10 @@
                 data.writeString8(headers->valueAt(i));
             }
         }
+        data.writeInt32(audioSessionId);
 
         remote()->transact(CREATE_URL, data, &reply);
+
         return interface_cast<IMediaPlayer>(reply.readStrongBinder());
     }
 
@@ -89,7 +90,8 @@
         return interface_cast<IMediaRecorder>(reply.readStrongBinder());
     }
 
-    virtual sp<IMediaPlayer> create(pid_t pid, const sp<IMediaPlayerClient>& client, int fd, int64_t offset, int64_t length)
+    virtual sp<IMediaPlayer> create(pid_t pid, const sp<IMediaPlayerClient>& client, int fd,
+            int64_t offset, int64_t length, int audioSessionId)
     {
         Parcel data, reply;
         data.writeInterfaceToken(IMediaPlayerService::getInterfaceDescriptor());
@@ -98,8 +100,11 @@
         data.writeFileDescriptor(fd);
         data.writeInt64(offset);
         data.writeInt64(length);
+        data.writeInt32(audioSessionId);
+
         remote()->transact(CREATE_FD, data, &reply);
-        return interface_cast<IMediaPlayer>(reply.readStrongBinder());
+
+        return interface_cast<IMediaPlayer>(reply.readStrongBinder());;
     }
 
     virtual sp<IMemory> decode(const char* url, uint32_t *pSampleRate, int* pNumChannels, int* pFormat)
@@ -128,14 +133,6 @@
         return interface_cast<IMemory>(reply.readStrongBinder());
     }
 
-    virtual sp<IMemory> snoop()
-    {
-        Parcel data, reply;
-        data.writeInterfaceToken(IMediaPlayerService::getInterfaceDescriptor());
-        remote()->transact(SNOOP, data, &reply);
-        return interface_cast<IMemory>(reply.readStrongBinder());
-    }
-
     virtual sp<IOMX> getOMX() {
         Parcel data, reply;
         data.writeInterfaceToken(IMediaPlayerService::getInterfaceDescriptor());
@@ -166,9 +163,10 @@
                 String8 value = data.readString8();
                 headers.add(key, value);
             }
+            int audioSessionId = data.readInt32();
 
             sp<IMediaPlayer> player = create(
-                    pid, client, url, numHeaders > 0 ? &headers : NULL);
+                    pid, client, url, numHeaders > 0 ? &headers : NULL, audioSessionId);
 
             reply->writeStrongBinder(player->asBinder());
             return NO_ERROR;
@@ -180,7 +178,9 @@
             int fd = dup(data.readFileDescriptor());
             int64_t offset = data.readInt64();
             int64_t length = data.readInt64();
-            sp<IMediaPlayer> player = create(pid, client, fd, offset, length);
+            int audioSessionId = data.readInt32();
+
+            sp<IMediaPlayer> player = create(pid, client, fd, offset, length, audioSessionId);
             reply->writeStrongBinder(player->asBinder());
             return NO_ERROR;
         } break;
@@ -212,12 +212,6 @@
             reply->writeStrongBinder(player->asBinder());
             return NO_ERROR;
         } break;
-        case SNOOP: {
-            CHECK_INTERFACE(IMediaPlayerService, data, reply);
-            sp<IMemory> snooped_audio = snoop();
-            reply->writeStrongBinder(snooped_audio->asBinder());
-            return NO_ERROR;
-        } break;
         case CREATE_MEDIA_RECORDER: {
             CHECK_INTERFACE(IMediaPlayerService, data, reply);
             pid_t pid = data.readInt32();
diff --git a/media/libmedia/IMediaRecorder.cpp b/media/libmedia/IMediaRecorder.cpp
index 2bc2a7e..9fe207c 100644
--- a/media/libmedia/IMediaRecorder.cpp
+++ b/media/libmedia/IMediaRecorder.cpp
@@ -21,7 +21,7 @@
 #include <binder/Parcel.h>
 #include <surfaceflinger/ISurface.h>
 #include <camera/ICamera.h>
-#include <media/IMediaPlayerClient.h>
+#include <media/IMediaRecorderClient.h>
 #include <media/IMediaRecorder.h>
 
 namespace android {
@@ -189,7 +189,7 @@
         return reply.readInt32();
     }
 
-    status_t setListener(const sp<IMediaPlayerClient>& listener)
+    status_t setListener(const sp<IMediaRecorderClient>& listener)
     {
         LOGV("setListener(%p)", listener.get());
         Parcel data, reply;
@@ -399,8 +399,8 @@
         case SET_LISTENER: {
             LOGV("SET_LISTENER");
             CHECK_INTERFACE(IMediaRecorder, data, reply);
-            sp<IMediaPlayerClient> listener =
-                interface_cast<IMediaPlayerClient>(data.readStrongBinder());
+            sp<IMediaRecorderClient> listener =
+                interface_cast<IMediaRecorderClient>(data.readStrongBinder());
             reply->writeInt32(setListener(listener));
             return NO_ERROR;
         } break;
diff --git a/media/libmedia/IMediaRecorderClient.cpp b/media/libmedia/IMediaRecorderClient.cpp
new file mode 100644
index 0000000..ff235c9
--- /dev/null
+++ b/media/libmedia/IMediaRecorderClient.cpp
@@ -0,0 +1,70 @@
+/*
+**
+** Copyright 2010, The Android Open Source Project
+**
+** Licensed under the Apache License, Version 2.0 (the "License");
+** you may not use this file except in compliance with the License.
+** You may obtain a copy of the License at
+**
+**     http://www.apache.org/licenses/LICENSE-2.0
+**
+** Unless required by applicable law or agreed to in writing, software
+** distributed under the License is distributed on an "AS IS" BASIS,
+** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+** See the License for the specific language governing permissions and
+** limitations under the License.
+*/
+
+#include <utils/RefBase.h>
+#include <binder/IInterface.h>
+#include <binder/Parcel.h>
+
+#include <media/IMediaRecorderClient.h>
+
+namespace android {
+
+enum {
+    NOTIFY = IBinder::FIRST_CALL_TRANSACTION,
+};
+
+class BpMediaRecorderClient: public BpInterface<IMediaRecorderClient>
+{
+public:
+    BpMediaRecorderClient(const sp<IBinder>& impl)
+        : BpInterface<IMediaRecorderClient>(impl)
+    {
+    }
+
+    virtual void notify(int msg, int ext1, int ext2)
+    {
+        Parcel data, reply;
+        data.writeInterfaceToken(IMediaRecorderClient::getInterfaceDescriptor());
+        data.writeInt32(msg);
+        data.writeInt32(ext1);
+        data.writeInt32(ext2);
+        remote()->transact(NOTIFY, data, &reply, IBinder::FLAG_ONEWAY);
+    }
+};
+
+IMPLEMENT_META_INTERFACE(MediaRecorderClient, "android.media.IMediaRecorderClient");
+
+// ----------------------------------------------------------------------
+
+status_t BnMediaRecorderClient::onTransact(
+    uint32_t code, const Parcel& data, Parcel* reply, uint32_t flags)
+{
+    switch(code) {
+        case NOTIFY: {
+            CHECK_INTERFACE(IMediaRecorderClient, data, reply);
+            int msg = data.readInt32();
+            int ext1 = data.readInt32();
+            int ext2 = data.readInt32();
+            notify(msg, ext1, ext2);
+            return NO_ERROR;
+        } break;
+        default:
+            return BBinder::onTransact(code, data, reply, flags);
+    }
+}
+
+}; // namespace android
diff --git a/media/libmedia/IOMX.cpp b/media/libmedia/IOMX.cpp
index 01b6737..f3804b8 100644
--- a/media/libmedia/IOMX.cpp
+++ b/media/libmedia/IOMX.cpp
@@ -57,7 +57,7 @@
         return NULL;
     }
 
-    jfieldID surfaceID = env->GetFieldID(surfaceClass, "mSurface", "I");
+    jfieldID surfaceID = env->GetFieldID(surfaceClass, ANDROID_VIEW_SURFACE_JNI_ID, "I");
     if (surfaceID == NULL) {
         LOGE("Can't find Surface.mSurface");
         return NULL;
diff --git a/media/libmedia/MediaProfiles.cpp b/media/libmedia/MediaProfiles.cpp
index 1263373..3869389 100644
--- a/media/libmedia/MediaProfiles.cpp
+++ b/media/libmedia/MediaProfiles.cpp
@@ -272,7 +272,7 @@
 }
 
 /*static*/ MediaProfiles::CamcorderProfile*
-MediaProfiles::createCamcorderProfile(const char **atts)
+MediaProfiles::createCamcorderProfile(int cameraId, const char **atts)
 {
     CHECK(!strcmp("quality",    atts[0]) &&
           !strcmp("fileFormat", atts[2]) &&
@@ -287,16 +287,47 @@
     CHECK(fileFormat != -1);
 
     MediaProfiles::CamcorderProfile *profile = new MediaProfiles::CamcorderProfile;
+    profile->mCameraId = cameraId;
     profile->mFileFormat = static_cast<output_format>(fileFormat);
     profile->mQuality = static_cast<camcorder_quality>(quality);
     profile->mDuration = atoi(atts[5]);
     return profile;
 }
 
-/*static*/ int
-MediaProfiles::getImageEncodingQualityLevel(const char** atts)
+MediaProfiles::ImageEncodingQualityLevels*
+MediaProfiles::findImageEncodingQualityLevels(int cameraId) const
+{
+    int n = mImageEncodingQualityLevels.size();
+    for (int i = 0; i < n; i++) {
+        ImageEncodingQualityLevels *levels = mImageEncodingQualityLevels[i];
+        if (levels->mCameraId == cameraId) {
+            return levels;
+        }
+    }
+    return NULL;
+}
+
+void MediaProfiles::addImageEncodingQualityLevel(int cameraId, const char** atts)
 {
     CHECK(!strcmp("quality", atts[0]));
+    int quality = atoi(atts[1]);
+    LOGV("%s: cameraId=%d, quality=%d\n", __func__, cameraId, quality);
+    ImageEncodingQualityLevels *levels = findImageEncodingQualityLevels(cameraId);
+
+    if (levels == NULL) {
+        levels = new ImageEncodingQualityLevels();
+        levels->mCameraId = cameraId;
+        mImageEncodingQualityLevels.add(levels);
+    }
+
+    levels->mLevels.add(quality);
+}
+
+/*static*/ int
+MediaProfiles::getCameraId(const char** atts)
+{
+    if (!atts[0]) return 0;  // default cameraId = 0
+    CHECK(!strcmp("cameraId", atts[0]));
     return atoi(atts[1]);
 }
 
@@ -322,10 +353,13 @@
         profiles->mAudioDecoders.add(createAudioDecoderCap(atts));
     } else if (strcmp("EncoderOutputFileFormat", name) == 0) {
         profiles->mEncoderOutputFileFormats.add(createEncoderOutputFileFormat(atts));
+    } else if (strcmp("CamcorderProfiles", name) == 0) {
+        profiles->mCurrentCameraId = getCameraId(atts);
     } else if (strcmp("EncoderProfile", name) == 0) {
-        profiles->mCamcorderProfiles.add(createCamcorderProfile(atts));
+        profiles->mCamcorderProfiles.add(
+            createCamcorderProfile(profiles->mCurrentCameraId, atts));
     } else if (strcmp("ImageEncoding", name) == 0) {
-        profiles->mImageEncodingQualityLevels.add(getImageEncodingQualityLevel(atts));
+        profiles->addImageEncodingQualityLevel(profiles->mCurrentCameraId, atts);
     }
 }
 
@@ -383,7 +417,8 @@
         new MediaProfiles::VideoCodec(VIDEO_ENCODER_H263, 360000, 352, 288, 20);
 
     AudioCodec *audioCodec = new AudioCodec(AUDIO_ENCODER_AMR_NB, 12200, 8000, 1);
-    CamcorderProfile *profile = new CamcorderProfile;
+    CamcorderProfile *profile = new MediaProfiles::CamcorderProfile;
+    profile->mCameraId = 0;
     profile->mFileFormat = OUTPUT_FORMAT_THREE_GPP;
     profile->mQuality = CAMCORDER_QUALITY_HIGH;
     profile->mDuration = 60;
@@ -402,6 +437,7 @@
         new MediaProfiles::AudioCodec(AUDIO_ENCODER_AMR_NB, 12200, 8000, 1);
 
     MediaProfiles::CamcorderProfile *profile = new MediaProfiles::CamcorderProfile;
+    profile->mCameraId = 0;
     profile->mFileFormat = OUTPUT_FORMAT_THREE_GPP;
     profile->mQuality = CAMCORDER_QUALITY_LOW;
     profile->mDuration = 30;
@@ -458,9 +494,12 @@
 /*static*/ void
 MediaProfiles::createDefaultImageEncodingQualityLevels(MediaProfiles *profiles)
 {
-    profiles->mImageEncodingQualityLevels.add(70);
-    profiles->mImageEncodingQualityLevels.add(80);
-    profiles->mImageEncodingQualityLevels.add(90);
+    ImageEncodingQualityLevels *levels = new ImageEncodingQualityLevels();
+    levels->mCameraId = 0;
+    levels->mLevels.add(70);
+    levels->mLevels.add(80);
+    levels->mLevels.add(90);
+    profiles->mImageEncodingQualityLevels.add(levels);
 }
 
 /*static*/ MediaProfiles*
@@ -629,19 +668,24 @@
     return decoders;  // copy out
 }
 
-int MediaProfiles::getCamcorderProfileParamByName(const char *name, camcorder_quality quality) const
+int MediaProfiles::getCamcorderProfileParamByName(const char *name,
+                                                  int cameraId,
+                                                  camcorder_quality quality) const
 {
-    LOGV("getCamcorderProfileParamByName: %s for quality %d", name, quality);
+    LOGV("getCamcorderProfileParamByName: %s for camera %d, quality %d",
+         name, cameraId, quality);
 
     int index = -1;
     for (size_t i = 0, n = mCamcorderProfiles.size(); i < n; ++i) {
-        if (mCamcorderProfiles[i]->mQuality == quality) {
+        if (mCamcorderProfiles[i]->mCameraId == cameraId &&
+            mCamcorderProfiles[i]->mQuality == quality) {
             index = i;
             break;
         }
     }
     if (index == -1) {
-        LOGE("The given camcorder profile quality %d is not found", quality);
+        LOGE("The given camcorder profile camera %d quality %d is not found",
+             cameraId, quality);
         return -1;
     }
 
@@ -657,13 +701,18 @@
     if (!strcmp("aud.ch", name)) return mCamcorderProfiles[index]->mAudioCodec->mChannels;
     if (!strcmp("aud.hz", name)) return mCamcorderProfiles[index]->mAudioCodec->mSampleRate;
 
-    LOGE("The given camcorder profile param name %s is not found", name);
+    LOGE("The given camcorder profile param id %d name %s is not found", cameraId, name);
     return -1;
 }
 
-Vector<int> MediaProfiles::getImageEncodingQualityLevels() const
+Vector<int> MediaProfiles::getImageEncodingQualityLevels(int cameraId) const
 {
-    return mImageEncodingQualityLevels;  // copy out
+    Vector<int> result;
+    ImageEncodingQualityLevels *levels = findImageEncodingQualityLevels(cameraId);
+    if (levels != NULL) {
+        result = levels->mLevels;  // copy out
+    }
+    return result;
 }
 
 MediaProfiles::~MediaProfiles()
diff --git a/media/libmedia/MediaScanner.cpp b/media/libmedia/MediaScanner.cpp
index 843a8fd..6f581d3 100644
--- a/media/libmedia/MediaScanner.cpp
+++ b/media/libmedia/MediaScanner.cpp
@@ -14,6 +14,10 @@
  * limitations under the License.
  */
 
+//#define LOG_NDEBUG 0
+#define LOG_TAG "MediaScanner"
+#include <utils/Log.h>
+
 #include <media/mediascanner.h>
 
 #include <sys/stat.h>
diff --git a/media/libmedia/Visualizer.cpp b/media/libmedia/Visualizer.cpp
new file mode 100644
index 0000000..47e96e5
--- /dev/null
+++ b/media/libmedia/Visualizer.cpp
@@ -0,0 +1,330 @@
+/*
+**
+** Copyright 2010, The Android Open Source Project
+**
+** Licensed under the Apache License, Version 2.0 (the "License");
+** you may not use this file except in compliance with the License.
+** You may obtain a copy of the License at
+**
+**     http://www.apache.org/licenses/LICENSE-2.0
+**
+** Unless required by applicable law or agreed to in writing, software
+** distributed under the License is distributed on an "AS IS" BASIS,
+** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+** See the License for the specific language governing permissions and
+** limitations under the License.
+*/
+
+
+//#define LOG_NDEBUG 0
+#define LOG_TAG "Visualizer"
+#include <utils/Log.h>
+
+#include <stdint.h>
+#include <sys/types.h>
+#include <limits.h>
+
+#include <media/Visualizer.h>
+
+extern "C" {
+#define FLOATING_POINT 1
+#include "fftwrap.h"
+}
+
+namespace android {
+
+// ---------------------------------------------------------------------------
+
+Visualizer::Visualizer (int32_t priority,
+         effect_callback_t cbf,
+         void* user,
+         int sessionId)
+    :   AudioEffect(SL_IID_VISUALIZATION, NULL, priority, cbf, user, sessionId),
+        mCaptureRate(CAPTURE_RATE_DEF),
+        mCaptureSize(CAPTURE_SIZE_DEF),
+        mSampleRate(44100000),
+        mCaptureCallBack(NULL),
+        mCaptureCbkUser(NULL)
+{
+    initCaptureSize();
+    if (mCaptureSize != 0) {
+        mFftTable = spx_fft_init(mCaptureSize);
+    } else {
+        mFftTable = NULL;
+    }
+}
+
+Visualizer::~Visualizer()
+{
+    if (mFftTable != NULL) {
+        spx_fft_destroy(mFftTable);
+    }
+}
+
+status_t Visualizer::setEnabled(bool enabled)
+{
+    Mutex::Autolock _l(mLock);
+
+    sp<CaptureThread> t = mCaptureThread;
+    if (t != 0) {
+        if (enabled) {
+            if (t->exitPending()) {
+                if (t->requestExitAndWait() == WOULD_BLOCK) {
+                    LOGE("Visualizer::enable() called from thread");
+                    return INVALID_OPERATION;
+                }
+            }
+        }
+        t->mLock.lock();
+     }
+
+    status_t status = AudioEffect::setEnabled(enabled);
+
+    if (status == NO_ERROR) {
+        if (t != 0) {
+            if (enabled) {
+                t->run("AudioTrackThread");
+            } else {
+                t->requestExit();
+            }
+        }
+    }
+
+    if (t != 0) {
+        t->mLock.unlock();
+    }
+
+    return status;
+}
+
+status_t Visualizer::setCaptureCallBack(capture_cbk_t cbk, void* user, uint32_t flags, uint32_t rate)
+{
+    if (rate > CAPTURE_RATE_MAX) {
+        return BAD_VALUE;
+    }
+    Mutex::Autolock _l(mLock);
+
+    if (mEnabled) {
+        return INVALID_OPERATION;
+    }
+
+    sp<CaptureThread> t = mCaptureThread;
+    if (t != 0) {
+        t->mLock.lock();
+    }
+    mCaptureThread.clear();
+    mCaptureCallBack = cbk;
+    mCaptureCbkUser = user;
+    mCaptureFlags = flags;
+    mCaptureRate = rate;
+
+    if (t != 0) {
+        t->mLock.unlock();
+    }
+
+    if (cbk != NULL) {
+        mCaptureThread = new CaptureThread(*this, rate, ((flags & CAPTURE_CALL_JAVA) != 0));
+        if (mCaptureThread == 0) {
+            LOGE("Could not create callback thread");
+            return NO_INIT;
+        }
+    }
+    LOGV("setCaptureCallBack() rate: %d thread %p flags 0x%08x",
+            rate, mCaptureThread.get(), mCaptureFlags);
+    return NO_ERROR;
+}
+
+status_t Visualizer::setCaptureSize(uint32_t size)
+{
+    if (size > VISUALIZER_CAPTURE_SIZE_MAX ||
+        size < VISUALIZER_CAPTURE_SIZE_MIN ||
+        AudioSystem::popCount(size) != 1) {
+        return BAD_VALUE;
+    }
+
+    Mutex::Autolock _l(mLock);
+    if (mEnabled) {
+        return INVALID_OPERATION;
+    }
+
+    uint32_t buf32[sizeof(effect_param_t) / sizeof(uint32_t) + 2];
+    effect_param_t *p = (effect_param_t *)buf32;
+
+    p->psize = sizeof(uint32_t);
+    p->vsize = sizeof(uint32_t);
+    *(int32_t *)p->data = VISU_PARAM_CAPTURE_SIZE;
+    *((int32_t *)p->data + 1)= size;
+    status_t status = setParameter(p);
+
+    LOGV("setCaptureSize size %d  status %d p->status %d", size, status, p->status);
+
+    if (status == NO_ERROR) {
+        status = p->status;
+    }
+    if (status == NO_ERROR) {
+        mCaptureSize = size;
+        if (mFftTable != NULL) {
+            spx_fft_destroy(mFftTable);
+        }
+        mFftTable = spx_fft_init(mCaptureSize);
+        LOGV("setCaptureSize size %d mFftTable %p", mCaptureSize, mFftTable);
+    }
+
+    return status;
+}
+
+status_t Visualizer::getWaveForm(uint8_t *waveform)
+{
+    if (waveform == NULL) {
+        return BAD_VALUE;
+    }
+    if (mCaptureSize == 0) {
+        return NO_INIT;
+    }
+
+    status_t status = NO_ERROR;
+    if (mEnabled) {
+        int32_t replySize = mCaptureSize;
+        status_t status = command(VISU_CMD_CAPTURE, 0, NULL, &replySize, waveform);
+        if (replySize == 0) {
+            status = NOT_ENOUGH_DATA;
+        }
+    } else {
+        memset(waveform, 0x80, mCaptureSize);
+    }
+    return status;
+}
+
+status_t Visualizer::getFft(uint8_t *fft)
+{
+    if (fft == NULL) {
+        return BAD_VALUE;
+    }
+    if (mCaptureSize == 0) {
+        return NO_INIT;
+    }
+
+    status_t status = NO_ERROR;
+    if (mEnabled) {
+        uint8_t buf[mCaptureSize];
+        status_t status = getWaveForm(buf);
+        if (status == NO_ERROR) {
+            status = doFft(fft, buf);
+        }
+    } else {
+        memset(fft, 0, mCaptureSize);
+    }
+    return status;
+}
+
+status_t Visualizer::doFft(uint8_t *fft, uint8_t *waveform)
+{
+    if (mFftTable == NULL) {
+        return NO_INIT;
+    }
+
+    float fsrc[mCaptureSize];
+    for (uint32_t i = 0; i < mCaptureSize; i++) {
+        fsrc[i] = (int16_t)(waveform[i] ^ 0x80) << 8;
+    }
+    float fdst[mCaptureSize];
+    spx_fft_float(mFftTable, fsrc, fdst);
+    for (uint32_t i = 0; i < mCaptureSize; i++) {
+        fft[i] = (uint8_t)((int32_t)fdst[i] >> 8);
+    }
+    return NO_ERROR;
+}
+
+void Visualizer::periodicCapture()
+{
+    Mutex::Autolock _l(mLock);
+    LOGV("periodicCapture() %p mCaptureCallBack %p mCaptureFlags 0x%08x",
+            this, mCaptureCallBack, mCaptureFlags);
+    if (mCaptureCallBack != NULL &&
+        (mCaptureFlags & (CAPTURE_WAVEFORM|CAPTURE_FFT)) &&
+        mCaptureSize != 0) {
+        uint8_t waveform[mCaptureSize];
+        status_t status = getWaveForm(waveform);
+        if (status != NO_ERROR) {
+            return;
+        }
+        uint8_t fft[mCaptureSize];
+        if (mCaptureFlags & CAPTURE_FFT) {
+            status = doFft(fft, waveform);
+        }
+        if (status != NO_ERROR) {
+            return;
+        }
+        uint8_t *wavePtr = NULL;
+        uint8_t *fftPtr = NULL;
+        uint32_t waveSize = 0;
+        uint32_t fftSize = 0;
+        if (mCaptureFlags & CAPTURE_WAVEFORM) {
+            wavePtr = waveform;
+            waveSize = mCaptureSize;
+        }
+        if (mCaptureFlags & CAPTURE_FFT) {
+            fftPtr = fft;
+            fftSize = mCaptureSize;
+        }
+        mCaptureCallBack(mCaptureCbkUser, waveSize, wavePtr, fftSize, fftPtr, mSampleRate);
+    }
+}
+
+uint32_t Visualizer::initCaptureSize()
+{
+    uint32_t buf32[sizeof(effect_param_t) / sizeof(uint32_t) + 2];
+    effect_param_t *p = (effect_param_t *)buf32;
+
+    p->psize = sizeof(uint32_t);
+    p->vsize = sizeof(uint32_t);
+    *(int32_t *)p->data = VISU_PARAM_CAPTURE_SIZE;
+    status_t status = getParameter(p);
+
+    if (status == NO_ERROR) {
+        status = p->status;
+    }
+
+    uint32_t size = 0;
+    if (status == NO_ERROR) {
+        size = *((int32_t *)p->data + 1);
+    }
+    mCaptureSize = size;
+
+    LOGV("initCaptureSize size %d status %d", mCaptureSize, status);
+
+    return size;
+}
+
+//-------------------------------------------------------------------------
+
+Visualizer::CaptureThread::CaptureThread(Visualizer& receiver, uint32_t captureRate, bool bCanCallJava)
+    : Thread(bCanCallJava), mReceiver(receiver)
+{
+    mSleepTimeUs = 1000000000 / captureRate;
+    LOGV("CaptureThread cstor %p captureRate %d mSleepTimeUs %d", this, captureRate, mSleepTimeUs);
+}
+
+bool Visualizer::CaptureThread::threadLoop()
+{
+    LOGV("CaptureThread %p enter", this);
+    while (!exitPending())
+    {
+        usleep(mSleepTimeUs);
+        mReceiver.periodicCapture();
+    }
+    LOGV("CaptureThread %p exiting", this);
+    return false;
+}
+
+status_t Visualizer::CaptureThread::readyToRun()
+{
+    return NO_ERROR;
+}
+
+void Visualizer::CaptureThread::onFirstRef()
+{
+}
+
+}; // namespace android
+
diff --git a/media/libmedia/mediaplayer.cpp b/media/libmedia/mediaplayer.cpp
index c6bbbcc..b43f75f 100644
--- a/media/libmedia/mediaplayer.cpp
+++ b/media/libmedia/mediaplayer.cpp
@@ -55,6 +55,7 @@
     mLeftVolume = mRightVolume = 1.0;
     mVideoWidth = mVideoHeight = 0;
     mLockThreadId = 0;
+    mAudioSessionId = AudioSystem::newAudioSessionId();
 }
 
 MediaPlayer::~MediaPlayer()
@@ -137,7 +138,7 @@
         const sp<IMediaPlayerService>& service(getMediaPlayerService());
         if (service != 0) {
             sp<IMediaPlayer> player(
-                    service->create(getpid(), this, url, headers));
+                    service->create(getpid(), this, url, headers, mAudioSessionId));
             err = setDataSource(player);
         }
     }
@@ -150,7 +151,7 @@
     status_t err = UNKNOWN_ERROR;
     const sp<IMediaPlayerService>& service(getMediaPlayerService());
     if (service != 0) {
-        sp<IMediaPlayer> player(service->create(getpid(), this, fd, offset, length));
+        sp<IMediaPlayer> player(service->create(getpid(), this, fd, offset, length, mAudioSessionId));
         err = setDataSource(player);
     }
     return err;
@@ -501,6 +502,27 @@
     return OK;
 }
 
+status_t MediaPlayer::setAudioSessionId(int sessionId)
+{
+    LOGV("MediaPlayer::setAudioSessionId(%d)", sessionId);
+    Mutex::Autolock _l(mLock);
+    if (!(mCurrentState & MEDIA_PLAYER_IDLE)) {
+        LOGE("setAudioSessionId called in state %d", mCurrentState);
+        return INVALID_OPERATION;
+    }
+    if (sessionId < 0) {
+        return BAD_VALUE;
+    }
+    mAudioSessionId = sessionId;
+    return NO_ERROR;
+}
+
+int MediaPlayer::getAudioSessionId()
+{
+    Mutex::Autolock _l(mLock);
+    return mAudioSessionId;
+}
+
 void MediaPlayer::notify(int msg, int ext1, int ext2)
 {
     LOGV("message received msg=%d, ext1=%d, ext2=%d", msg, ext1, ext2);
@@ -636,61 +658,4 @@
 
 }
 
-extern "C" {
-#define FLOATING_POINT 1
-#include "fftwrap.h"
-}
-
-static void *ffttable = NULL;
-
-// peeks at the audio data and fills 'data' with the requested kind
-// (currently kind=0 returns mono 16 bit PCM data, and kind=1 returns
-// 256 point FFT data). Return value is number of samples returned,
-// which may be 0.
-/*static*/ int MediaPlayer::snoop(short* data, int len, int kind) {
-
-    sp<IMemory> p;
-    const sp<IMediaPlayerService>& service = getMediaPlayerService();
-    if (service != 0) {
-        // Take a peek at the waveform. The returned data consists of 16 bit mono PCM data.
-        p = service->snoop();
-
-        if (p == NULL) {
-            return 0;
-        }
-
-        if (kind == 0) { // return waveform data
-            int plen = p->size();
-            len *= 2; // number of shorts -> number of bytes
-            short *src = (short*) p->pointer();
-            if (plen > len) {
-                plen = len;
-            }
-            memcpy(data, src, plen);
-            return plen / sizeof(short); // return number of samples
-        } else if (kind == 1) {
-            // TODO: use a more efficient FFT
-            // Right now this uses the speex library, which is compiled to do a float FFT
-            if (!ffttable) ffttable = spx_fft_init(512);
-            short *usrc = (short*) p->pointer();
-            float fsrc[512];
-            for (int i=0;i<512;i++)
-                fsrc[i] = usrc[i];
-            float fdst[512];
-            spx_fft_float(ffttable, fsrc, fdst);
-            if (len > 512) {
-                len = 512;
-            }
-            len /= 2; // only half the output data is valid
-            for (int i=0; i < len; i++)
-                data[i] = fdst[i];
-            return len;
-        }
-
-    } else {
-        LOGE("Unable to locate media service");
-    }
-    return 0;
-}
-
 }; // namespace android
diff --git a/media/libmediaplayerservice/Android.mk b/media/libmediaplayerservice/Android.mk
index cf97b23..8f010c9 100644
--- a/media/libmediaplayerservice/Android.mk
+++ b/media/libmediaplayerservice/Android.mk
@@ -11,21 +11,11 @@
     MediaPlayerService.cpp      \
     MetadataRetrieverClient.cpp \
     TestPlayerStub.cpp          \
-    VorbisPlayer.cpp            \
-    VorbisMetadataRetriever.cpp \
-    MidiMetadataRetriever.cpp 	\
-    MidiFile.cpp
-
-ifeq ($(BUILD_WITH_FULL_STAGEFRIGHT),true)
-
-LOCAL_SRC_FILES +=                      \
-    StagefrightPlayer.cpp               \
+    MidiMetadataRetriever.cpp   \
+    MidiFile.cpp                \
+    StagefrightPlayer.cpp       \
     StagefrightRecorder.cpp
 
-LOCAL_CFLAGS += -DBUILD_WITH_FULL_STAGEFRIGHT=1
-
-endif
-
 ifeq ($(TARGET_OS)-$(TARGET_SIMULATOR),linux-true)
 LOCAL_LDLIBS += -ldl -lpthread
 endif
@@ -37,6 +27,7 @@
 	libvorbisidec         			\
 	libsonivox            			\
 	libmedia              			\
+	libcamera_client      			\
 	libandroid_runtime    			\
 	libstagefright        			\
 	libstagefright_omx    			\
diff --git a/media/libmediaplayerservice/MediaPlayerService.cpp b/media/libmediaplayerservice/MediaPlayerService.cpp
index 3e1f4a5..5401ec0 100644
--- a/media/libmediaplayerservice/MediaPlayerService.cpp
+++ b/media/libmediaplayerservice/MediaPlayerService.cpp
@@ -56,7 +56,6 @@
 #include "MetadataRetrieverClient.h"
 
 #include "MidiFile.h"
-#include "VorbisPlayer.h"
 #include <media/PVPlayer.h>
 #include "TestPlayerStub.h"
 #include "StagefrightPlayer.h"
@@ -197,8 +196,6 @@
         {".rtttl", SONIVOX_PLAYER},
         {".rtx", SONIVOX_PLAYER},
         {".ota", SONIVOX_PLAYER},
-        {".ogg", VORBIS_PLAYER},
-        {".oga", VORBIS_PLAYER},
 #ifndef NO_OPENCORE
         {".wma", PV_PLAYER},
         {".wmv", PV_PLAYER},
@@ -228,14 +225,10 @@
 
 sp<IMediaRecorder> MediaPlayerService::createMediaRecorder(pid_t pid)
 {
-#ifndef NO_OPENCORE
     sp<MediaRecorderClient> recorder = new MediaRecorderClient(this, pid);
     wp<MediaRecorderClient> w = recorder;
     Mutex::Autolock lock(mLock);
     mMediaRecorderClients.add(w);
-#else
-    sp<MediaRecorderClient> recorder = NULL;
-#endif
     LOGV("Create new media recorder client from pid %d", pid);
     return recorder;
 }
@@ -256,11 +249,12 @@
 
 sp<IMediaPlayer> MediaPlayerService::create(
         pid_t pid, const sp<IMediaPlayerClient>& client, const char* url,
-        const KeyedVector<String8, String8> *headers)
+        const KeyedVector<String8, String8> *headers, int audioSessionId)
 {
     int32_t connId = android_atomic_inc(&mNextConnId);
-    sp<Client> c = new Client(this, pid, connId, client);
-    LOGV("Create new client(%d) from pid %d, url=%s, connId=%d", connId, pid, url, connId);
+    sp<Client> c = new Client(this, pid, connId, client, audioSessionId);
+    LOGV("Create new client(%d) from pid %d, url=%s, connId=%d, audioSessionId=%d",
+            connId, pid, url, connId, audioSessionId);
     if (NO_ERROR != c->setDataSource(url, headers))
     {
         c.clear();
@@ -273,12 +267,12 @@
 }
 
 sp<IMediaPlayer> MediaPlayerService::create(pid_t pid, const sp<IMediaPlayerClient>& client,
-        int fd, int64_t offset, int64_t length)
+        int fd, int64_t offset, int64_t length, int audioSessionId)
 {
     int32_t connId = android_atomic_inc(&mNextConnId);
-    sp<Client> c = new Client(this, pid, connId, client);
-    LOGV("Create new client(%d) from pid %d, fd=%d, offset=%lld, length=%lld",
-            connId, pid, fd, offset, length);
+    sp<Client> c = new Client(this, pid, connId, client, audioSessionId);
+    LOGV("Create new client(%d) from pid %d, fd=%d, offset=%lld, length=%lld, audioSessionId=%d",
+            connId, pid, fd, offset, length, audioSessionId);
     if (NO_ERROR != c->setDataSource(fd, offset, length)) {
         c.clear();
     } else {
@@ -517,11 +511,17 @@
             sp<Client> c = mClients[i].promote();
             if (c != 0) c->dump(fd, args);
         }
-        for (int i = 0, n = mMediaRecorderClients.size(); i < n; ++i) {
-            result.append(" MediaRecorderClient\n");
-            sp<MediaRecorderClient> c = mMediaRecorderClients[i].promote();
-            snprintf(buffer, 255, "  pid(%d)\n\n", c->mPid);
-            result.append(buffer);
+        if (mMediaRecorderClients.size() == 0) {
+                result.append(" No media recorder client\n\n");
+        } else {
+            for (int i = 0, n = mMediaRecorderClients.size(); i < n; ++i) {
+                sp<MediaRecorderClient> c = mMediaRecorderClients[i].promote();
+                snprintf(buffer, 255, " MediaRecorderClient pid(%d)\n", c->mPid);
+                result.append(buffer);
+                write(fd, result.string(), result.size());
+                result = "\n";
+                c->dump(fd, args);
+            }
         }
 
         result.append(" Files opened and/or mapped:\n");
@@ -613,7 +613,7 @@
 }
 
 MediaPlayerService::Client::Client(const sp<MediaPlayerService>& service, pid_t pid,
-        int32_t connId, const sp<IMediaPlayerClient>& client)
+        int32_t connId, const sp<IMediaPlayerClient>& client, int audioSessionId)
 {
     LOGV("Client(%d) constructor", connId);
     mPid = pid;
@@ -622,6 +622,8 @@
     mClient = client;
     mLoop = false;
     mStatus = NO_INIT;
+    mAudioSessionId = audioSessionId;
+
 #if CALLBACK_ANTAGONIZER
     LOGD("create Antagonizer");
     mAntagonizer = new Antagonizer(notify, this);
@@ -667,37 +669,9 @@
 }
 
 static player_type getDefaultPlayerType() {
-#if BUILD_WITH_FULL_STAGEFRIGHT
-    char value[PROPERTY_VALUE_MAX];
-    if (property_get("media.stagefright.enable-player", value, NULL)
-        && (!strcmp(value, "1") || !strcasecmp(value, "true"))) {
-        return STAGEFRIGHT_PLAYER;
-    }
-#endif
-
-    return PV_PLAYER;
+    return STAGEFRIGHT_PLAYER;
 }
 
-// By default we use the VORBIS_PLAYER for vorbis playback (duh!),
-// but if the magic property is set we will use our new experimental
-// stagefright code instead.
-static player_type OverrideStagefrightForVorbis(player_type player) {
-    if (player != VORBIS_PLAYER) {
-        return player;
-    }
-
-#if BUILD_WITH_FULL_STAGEFRIGHT
-    char value[PROPERTY_VALUE_MAX];
-    if (property_get("media.stagefright.enable-vorbis", value, NULL)
-        && (!strcmp(value, "1") || !strcmp(value, "true"))) {
-        return STAGEFRIGHT_PLAYER;
-    }
-#endif
-
-    return VORBIS_PLAYER;
-}
-
-
 player_type getPlayerType(int fd, int64_t offset, int64_t length)
 {
     char buf[20];
@@ -709,7 +683,7 @@
 
     // Ogg vorbis?
     if (ident == 0x5367674f) // 'OggS'
-        return OverrideStagefrightForVorbis(VORBIS_PLAYER);
+        return STAGEFRIGHT_PLAYER;
 
 #ifndef NO_OPENCORE
     if (ident == 0x75b22630) {
@@ -745,41 +719,28 @@
         return TEST_PLAYER;
     }
 
-    bool useStagefrightForHTTP = false;
-    char value[PROPERTY_VALUE_MAX];
-    if (property_get("media.stagefright.enable-http", value, NULL)
-        && (!strcmp(value, "1") || !strcasecmp(value, "true"))) {
-        useStagefrightForHTTP = true;
-    }
-
     // use MidiFile for MIDI extensions
     int lenURL = strlen(url);
     for (int i = 0; i < NELEM(FILE_EXTS); ++i) {
         int len = strlen(FILE_EXTS[i].extension);
         int start = lenURL - len;
         if (start > 0) {
-            if (!strncmp(url + start, FILE_EXTS[i].extension, len)) {
-                if (FILE_EXTS[i].playertype == VORBIS_PLAYER
-                    && !strncasecmp(url, "http://", 7)
-                    && useStagefrightForHTTP) {
-                    return STAGEFRIGHT_PLAYER;
-                }
-                return OverrideStagefrightForVorbis(FILE_EXTS[i].playertype);
+            if (!strncasecmp(url + start, FILE_EXTS[i].extension, len)) {
+                return FILE_EXTS[i].playertype;
             }
         }
     }
 
-    if (!strncasecmp(url, "http://", 7)) {
-        if (!useStagefrightForHTTP) {
+    if (!strncasecmp(url, "rtsp://", 7)) {
+        char value[PROPERTY_VALUE_MAX];
+        if (!property_get("media.stagefright.enable-rtsp", value, NULL)
+            || (strcmp(value, "1") && strcasecmp(value, "true"))) {
+            // For now, we're going to use PV for rtsp-based playback
+            // by default until we can clear up a few more issues.
             return PV_PLAYER;
         }
     }
 
-    // Use PV_PLAYER for rtsp for now
-    if (!strncasecmp(url, "rtsp://", 7)) {
-        return PV_PLAYER;
-    }
-
     return getDefaultPlayerType();
 }
 
@@ -798,16 +759,10 @@
             LOGV(" create MidiFile");
             p = new MidiFile();
             break;
-        case VORBIS_PLAYER:
-            LOGV(" create VorbisPlayer");
-            p = new VorbisPlayer();
-            break;
-#if BUILD_WITH_FULL_STAGEFRIGHT
         case STAGEFRIGHT_PLAYER:
             LOGV(" create StagefrightPlayer");
             p = new StagefrightPlayer;
             break;
-#endif
         case TEST_PLAYER:
             LOGV("Create Test Player stub");
             p = new TestPlayerStub();
@@ -870,7 +825,7 @@
         if (p == NULL) return NO_INIT;
 
         if (!p->hardwareOutput()) {
-            mAudioOutput = new AudioOutput();
+            mAudioOutput = new AudioOutput(mAudioSessionId);
             static_cast<MediaPlayerInterface*>(p.get())->setAudioSink(mAudioOutput);
         }
 
@@ -920,7 +875,7 @@
     if (p == NULL) return NO_INIT;
 
     if (!p->hardwareOutput()) {
-        mAudioOutput = new AudioOutput();
+        mAudioOutput = new AudioOutput(mAudioSessionId);
         static_cast<MediaPlayerInterface*>(p.get())->setAudioSink(mAudioOutput);
     }
 
@@ -1316,111 +1271,20 @@
     return mem;
 }
 
-/*
- * Avert your eyes, ugly hack ahead.
- * The following is to support music visualizations.
- */
-
-static const int NUMVIZBUF = 32;
-static const int VIZBUFFRAMES = 1024;
-static const int BUFTIMEMSEC = NUMVIZBUF * VIZBUFFRAMES * 1000 / 44100;
-static const int TOTALBUFTIMEMSEC = NUMVIZBUF * BUFTIMEMSEC;
-
-static bool gotMem = false;
-static sp<MemoryHeapBase> heap; 
-static sp<MemoryBase> mem[NUMVIZBUF];
-static uint64_t endTime;
-static uint64_t lastReadTime;
-static uint64_t lastWriteTime;
-static int writeIdx = 0;
-
-static void allocVizBufs() {
-    if (!gotMem) {
-        heap = new MemoryHeapBase(NUMVIZBUF * VIZBUFFRAMES * 2, 0, "snooper");
-        for (int i=0;i<NUMVIZBUF;i++) {
-            mem[i] = new MemoryBase(heap, VIZBUFFRAMES * 2 * i, VIZBUFFRAMES * 2);
-        }
-        endTime = 0;
-        gotMem = true;
-    }
-}
-
-
-/*
- * Get a buffer of audio data that is about to be played.
- * We don't synchronize this because in practice the writer
- * is ahead of the reader, and even if we did happen to catch
- * a buffer while it's being written, it's just a visualization,
- * so no harm done.
- */
-static sp<MemoryBase> getVizBuffer() {
-
-    allocVizBufs();
-
-    lastReadTime = uptimeMillis();
-
-    // if there is no recent buffer (yet), just return empty handed
-    if (lastWriteTime + TOTALBUFTIMEMSEC < lastReadTime) {
-        //LOGI("@@@@    no audio data to look at yet: %d + %d < %d", (int)lastWriteTime, TOTALBUFTIMEMSEC, (int)lastReadTime);
-        return NULL;
-    }
-
-    int timedelta = endTime - lastReadTime;
-    if (timedelta < 0) timedelta = 0;
-    int framedelta = timedelta * 44100 / 1000;
-    int headIdx = (writeIdx - framedelta) / VIZBUFFRAMES - 1;
-    while (headIdx < 0) {
-        headIdx += NUMVIZBUF;
-    }
-    return mem[headIdx];
-}
-
-// Append the data to the vizualization buffer
-static void makeVizBuffers(const char *data, int len, uint64_t time) {
-
-    allocVizBufs();
-
-    uint64_t startTime = time;
-    const int frameSize = 4; // 16 bit stereo sample is 4 bytes
-    int offset = writeIdx;
-    int maxoff = heap->getSize() / 2; // in shorts
-    short *base = (short*)heap->getBase();
-    short *src = (short*)data;
-    while (len > 0) {
-        
-        // Degrade quality by mixing to mono and clearing the lowest 3 bits.
-        // This should still be good enough for a visualization
-        base[offset++] = ((int(src[0]) + int(src[1])) >> 1) & ~0x7;
-        src += 2;
-        len -= frameSize;
-        if (offset >= maxoff) {
-            offset = 0;
-        }
-    }
-    writeIdx = offset;
-    endTime = time + (len / frameSize) / 44;
-    //LOGI("@@@ stored buffers from %d to %d", uint32_t(startTime), uint32_t(time));
-}
-
-sp<IMemory> MediaPlayerService::snoop()
-{
-    sp<MemoryBase> mem = getVizBuffer();
-    return mem;
-}
-
 
 #undef LOG_TAG
 #define LOG_TAG "AudioSink"
-MediaPlayerService::AudioOutput::AudioOutput()
+MediaPlayerService::AudioOutput::AudioOutput(int sessionId)
     : mCallback(NULL),
-      mCallbackCookie(NULL) {
+      mCallbackCookie(NULL),
+      mSessionId(sessionId) {
+    LOGV("AudioOutput(%d)", sessionId);
     mTrack = 0;
     mStreamType = AudioSystem::MUSIC;
     mLeftVolume = 1.0;
     mRightVolume = 1.0;
     mLatency = 0;
     mMsecsPerFrame = 0;
-    mNumFramesWritten = 0;
     setMinBufferCount();
 }
 
@@ -1503,7 +1367,7 @@
         bufferCount = mMinBufferCount;
 
     }
-    LOGV("open(%u, %d, %d, %d)", sampleRate, channelCount, format, bufferCount);
+    LOGV("open(%u, %d, %d, %d, %d)", sampleRate, channelCount, format, bufferCount,mSessionId);
     if (mTrack) close();
     int afSampleRate;
     int afFrameCount;
@@ -1528,14 +1392,21 @@
                 frameCount,
                 0 /* flags */,
                 CallbackWrapper,
-                this);
+                this,
+                0,
+                mSessionId);
     } else {
         t = new AudioTrack(
                 mStreamType,
                 sampleRate,
                 format,
                 (channelCount == 2) ? AudioSystem::CHANNEL_OUT_STEREO : AudioSystem::CHANNEL_OUT_MONO,
-                frameCount);
+                frameCount,
+                0,
+                NULL,
+                NULL,
+                0,
+                mSessionId);
     }
 
     if ((t == 0) || (t->initCheck() != NO_ERROR)) {
@@ -1558,30 +1429,9 @@
     if (mTrack) {
         mTrack->setVolume(mLeftVolume, mRightVolume);
         mTrack->start();
-        mTrack->getPosition(&mNumFramesWritten);
     }
 }
 
-void MediaPlayerService::AudioOutput::snoopWrite(const void* buffer, size_t size) {
-    // Only make visualization buffers if anyone recently requested visualization data
-    uint64_t now = uptimeMillis();
-    if (lastReadTime + TOTALBUFTIMEMSEC >= now) {
-        // Based on the current play counter, the number of frames written and
-        // the current real time we can calculate the approximate real start
-        // time of the buffer we're about to write.
-        uint32_t pos;
-        mTrack->getPosition(&pos);
-
-        // we're writing ahead by this many frames:
-        int ahead = mNumFramesWritten - pos;
-        //LOGI("@@@ written: %d, playpos: %d, latency: %d", mNumFramesWritten, pos, mTrack->latency());
-        // which is this many milliseconds, assuming 44100 Hz:
-        ahead /= 44;
-
-        makeVizBuffers((const char*)buffer, size, now + ahead + mTrack->latency());
-        lastWriteTime = now;
-    }
-}
 
 
 ssize_t MediaPlayerService::AudioOutput::write(const void* buffer, size_t size)
@@ -1590,9 +1440,7 @@
 
     //LOGV("write(%p, %u)", buffer, size);
     if (mTrack) {
-        snoopWrite(buffer, size);
         ssize_t ret = mTrack->write(buffer, size);
-        mNumFramesWritten += ret / 4; // assume 16 bit stereo
         return ret;
     }
     return NO_INIT;
@@ -1602,7 +1450,6 @@
 {
     LOGV("stop");
     if (mTrack) mTrack->stop();
-    lastWriteTime = 0;
 }
 
 void MediaPlayerService::AudioOutput::flush()
@@ -1615,7 +1462,6 @@
 {
     LOGV("pause");
     if (mTrack) mTrack->pause();
-    lastWriteTime = 0;
 }
 
 void MediaPlayerService::AudioOutput::close()
@@ -1651,9 +1497,6 @@
 
     buffer->size = actualSize;
 
-    if (actualSize > 0) {
-        me->snoopWrite(buffer->raw, actualSize);
-    }
 }
 
 #undef LOG_TAG
diff --git a/media/libmediaplayerservice/MediaPlayerService.h b/media/libmediaplayerservice/MediaPlayerService.h
index 2408c62..39f525e 100644
--- a/media/libmediaplayerservice/MediaPlayerService.h
+++ b/media/libmediaplayerservice/MediaPlayerService.h
@@ -65,7 +65,7 @@
     class AudioOutput : public MediaPlayerBase::AudioSink
     {
     public:
-                                AudioOutput();
+                                AudioOutput(int sessionId);
         virtual                 ~AudioOutput();
 
         virtual bool            ready() const { return mTrack != NULL; }
@@ -108,13 +108,11 @@
         float                   mRightVolume;
         float                   mMsecsPerFrame;
         uint32_t                mLatency;
+        int                     mSessionId;
 
         static bool             mIsOnEmulator;
         static int              mMinBufferCount;  // 12 for emulator; otherwise 4
 
-        public: // visualization hack support
-        uint32_t                mNumFramesWritten;
-        void                    snoopWrite(const void*, size_t);
     };
 
     class AudioCache : public MediaPlayerBase::AudioSink
@@ -185,12 +183,11 @@
     // House keeping for media player clients
     virtual sp<IMediaPlayer>    create(
             pid_t pid, const sp<IMediaPlayerClient>& client, const char* url,
-            const KeyedVector<String8, String8> *headers);
+            const KeyedVector<String8, String8> *headers, int audioSessionId);
 
-    virtual sp<IMediaPlayer>    create(pid_t pid, const sp<IMediaPlayerClient>& client, int fd, int64_t offset, int64_t length);
+    virtual sp<IMediaPlayer>    create(pid_t pid, const sp<IMediaPlayerClient>& client, int fd, int64_t offset, int64_t length, int audioSessionId);
     virtual sp<IMemory>         decode(const char* url, uint32_t *pSampleRate, int* pNumChannels, int* pFormat);
     virtual sp<IMemory>         decode(int fd, int64_t offset, int64_t length, uint32_t *pSampleRate, int* pNumChannels, int* pFormat);
-    virtual sp<IMemory>         snoop();
     virtual sp<IOMX>            getOMX();
 
     virtual status_t            dump(int fd, const Vector<String16>& args);
@@ -237,12 +234,15 @@
                 pid_t           pid() const { return mPid; }
         virtual status_t        dump(int fd, const Vector<String16>& args) const;
 
+                int             getAudioSessionId() { return mAudioSessionId; }
+
     private:
         friend class MediaPlayerService;
                                 Client( const sp<MediaPlayerService>& service,
                                         pid_t pid,
                                         int32_t connId,
-                                        const sp<IMediaPlayerClient>& client);
+                                        const sp<IMediaPlayerClient>& client,
+                                        int audioSessionId);
                                 Client();
         virtual                 ~Client();
 
@@ -271,6 +271,7 @@
                     status_t                    mStatus;
                     bool                        mLoop;
                     int32_t                     mConnId;
+                    int                         mAudioSessionId;
 
         // Metadata filters.
         media::Metadata::Filter mMetadataAllow;  // protected by mLock
diff --git a/media/libmediaplayerservice/MediaRecorderClient.cpp b/media/libmediaplayerservice/MediaRecorderClient.cpp
index c507669..fef3e6e 100644
--- a/media/libmediaplayerservice/MediaRecorderClient.cpp
+++ b/media/libmediaplayerservice/MediaRecorderClient.cpp
@@ -294,13 +294,11 @@
     LOGV("Client constructor");
     mPid = pid;
 
-#if BUILD_WITH_FULL_STAGEFRIGHT
     char value[PROPERTY_VALUE_MAX];
     if (property_get("media.stagefright.enable-record", value, NULL)
         && (!strcmp(value, "1") || !strcasecmp(value, "true"))) {
         mRecorder = new StagefrightRecorder;
     } else
-#endif
 #ifndef NO_OPENCORE
     {
         mRecorder = new PVMediaRecorder();
@@ -320,7 +318,7 @@
     release();
 }
 
-status_t MediaRecorderClient::setListener(const sp<IMediaPlayerClient>& listener)
+status_t MediaRecorderClient::setListener(const sp<IMediaRecorderClient>& listener)
 {
     LOGV("setListener");
     Mutex::Autolock lock(mLock);
@@ -331,5 +329,12 @@
     return mRecorder->setListener(listener);
 }
 
+status_t MediaRecorderClient::dump(int fd, const Vector<String16>& args) const {
+    if (mRecorder != NULL) {
+        return mRecorder->dump(fd, args);
+    }
+    return OK;
+}
+
 }; // namespace android
 
diff --git a/media/libmediaplayerservice/MediaRecorderClient.h b/media/libmediaplayerservice/MediaRecorderClient.h
index e07306b..d12e558 100644
--- a/media/libmediaplayerservice/MediaRecorderClient.h
+++ b/media/libmediaplayerservice/MediaRecorderClient.h
@@ -28,7 +28,7 @@
 class MediaRecorderClient : public BnMediaRecorder
 {
 public:
-    virtual	    status_t		setCamera(const sp<ICamera>& camera);
+    virtual     status_t        setCamera(const sp<ICamera>& camera);
     virtual     status_t        setPreviewSurface(const sp<ISurface>& surface);
     virtual     status_t        setVideoSource(int vs);
     virtual     status_t        setAudioSource(int as);
@@ -40,26 +40,27 @@
     virtual     status_t        setVideoSize(int width, int height);
     virtual     status_t        setVideoFrameRate(int frames_per_second);
     virtual     status_t        setParameters(const String8& params);
-    virtual     status_t        setListener(const sp<IMediaPlayerClient>& listener);
+    virtual     status_t        setListener(const sp<IMediaRecorderClient>& listener);
     virtual     status_t        prepare();
     virtual     status_t        getMaxAmplitude(int* max);
     virtual     status_t        start();
     virtual     status_t        stop();
-    virtual	    status_t        reset();
+    virtual     status_t        reset();
     virtual     status_t        init();
     virtual     status_t        close();
     virtual     status_t        release();
 
+    virtual     status_t        dump(int fd, const Vector<String16>& args) const;
 private:
-    friend class                 MediaPlayerService;  // for accessing private constructor
+    friend class                MediaPlayerService;  // for accessing private constructor
 
-                                 MediaRecorderClient(const sp<MediaPlayerService>& service, pid_t pid);
-    virtual 		         ~MediaRecorderClient();
+                                MediaRecorderClient(const sp<MediaPlayerService>& service, pid_t pid);
+    virtual                     ~MediaRecorderClient();
 
-    pid_t			 mPid;
-    Mutex			 mLock;
-    MediaRecorderBase            *mRecorder;
-    sp<MediaPlayerService>       mMediaPlayerService;
+    pid_t                       mPid;
+    Mutex                       mLock;
+    MediaRecorderBase           *mRecorder;
+    sp<MediaPlayerService>      mMediaPlayerService;
 };
 
 }; // namespace android
diff --git a/media/libmediaplayerservice/MetadataRetrieverClient.cpp b/media/libmediaplayerservice/MetadataRetrieverClient.cpp
index 550b84df..ca229fa 100644
--- a/media/libmediaplayerservice/MetadataRetrieverClient.cpp
+++ b/media/libmediaplayerservice/MetadataRetrieverClient.cpp
@@ -37,7 +37,6 @@
 #include <media/MediaPlayerInterface.h>
 #include <media/PVMetadataRetriever.h>
 #include <private/media/VideoFrame.h>
-#include "VorbisMetadataRetriever.h"
 #include "MidiMetadataRetriever.h"
 #include "MetadataRetrieverClient.h"
 #include "StagefrightMetadataRetriever.h"
@@ -103,30 +102,17 @@
 {
     sp<MediaMetadataRetrieverBase> p;
     switch (playerType) {
-#if BUILD_WITH_FULL_STAGEFRIGHT
         case STAGEFRIGHT_PLAYER:
         {
-            char value[PROPERTY_VALUE_MAX];
-            if (property_get("media.stagefright.enable-meta", value, NULL)
-                && (!strcmp(value, "1") || !strcasecmp(value, "true"))) {
-                LOGV("create StagefrightMetadataRetriever");
-                p = new StagefrightMetadataRetriever;
-                break;
-            }
-
-            // fall through
+            p = new StagefrightMetadataRetriever;
+            break;
         }
-#endif
 #ifndef NO_OPENCORE
         case PV_PLAYER:
             LOGV("create pv metadata retriever");
             p = new PVMetadataRetriever();
             break;
 #endif
-        case VORBIS_PLAYER:
-            LOGV("create vorbis metadata retriever");
-            p = new VorbisMetadataRetriever();
-            break;
         case SONIVOX_PLAYER:
             LOGV("create midi metadata retriever");
             p = new MidiMetadataRetriever();
diff --git a/media/libmediaplayerservice/StagefrightRecorder.cpp b/media/libmediaplayerservice/StagefrightRecorder.cpp
index 531fd11..4840391 100644
--- a/media/libmediaplayerservice/StagefrightRecorder.cpp
+++ b/media/libmediaplayerservice/StagefrightRecorder.cpp
@@ -20,6 +20,7 @@
 
 #include "StagefrightRecorder.h"
 
+#include <binder/IPCThreadState.h>
 #include <media/stagefright/AudioSource.h>
 #include <media/stagefright/AMRWriter.h>
 #include <media/stagefright/CameraSource.h>
@@ -29,17 +30,28 @@
 #include <media/stagefright/MetaData.h>
 #include <media/stagefright/OMXClient.h>
 #include <media/stagefright/OMXCodec.h>
+#include <media/MediaProfiles.h>
 #include <camera/ICamera.h>
+#include <camera/Camera.h>
+#include <camera/CameraParameters.h>
 #include <surfaceflinger/ISurface.h>
 #include <utils/Errors.h>
+#include <sys/types.h>
+#include <unistd.h>
+#include <ctype.h>
 
 namespace android {
 
-StagefrightRecorder::StagefrightRecorder() {
+StagefrightRecorder::StagefrightRecorder()
+    : mWriter(NULL),
+      mOutputFd(-1) {
+
+    LOGV("Constructor");
     reset();
 }
 
 StagefrightRecorder::~StagefrightRecorder() {
+    LOGV("Destructor");
     stop();
 
     if (mOutputFd >= 0) {
@@ -49,40 +61,103 @@
 }
 
 status_t StagefrightRecorder::init() {
+    LOGV("init");
     return OK;
 }
 
 status_t StagefrightRecorder::setAudioSource(audio_source as) {
-    mAudioSource = as;
+    LOGV("setAudioSource: %d", as);
+    if (as < AUDIO_SOURCE_DEFAULT ||
+        as >= AUDIO_SOURCE_LIST_END) {
+        LOGE("Invalid audio source: %d", as);
+        return BAD_VALUE;
+    }
+
+    if (as == AUDIO_SOURCE_DEFAULT) {
+        mAudioSource = AUDIO_SOURCE_MIC;
+    } else {
+        mAudioSource = as;
+    }
 
     return OK;
 }
 
 status_t StagefrightRecorder::setVideoSource(video_source vs) {
-    mVideoSource = vs;
+    LOGV("setVideoSource: %d", vs);
+    if (vs < VIDEO_SOURCE_DEFAULT ||
+        vs >= VIDEO_SOURCE_LIST_END) {
+        LOGE("Invalid video source: %d", vs);
+        return BAD_VALUE;
+    }
+
+    if (vs == VIDEO_SOURCE_DEFAULT) {
+        mVideoSource = VIDEO_SOURCE_CAMERA;
+    } else {
+        mVideoSource = vs;
+    }
 
     return OK;
 }
 
 status_t StagefrightRecorder::setOutputFormat(output_format of) {
-    mOutputFormat = of;
+    LOGV("setOutputFormat: %d", of);
+    if (of < OUTPUT_FORMAT_DEFAULT ||
+        of >= OUTPUT_FORMAT_LIST_END) {
+        LOGE("Invalid output format: %d", of);
+        return BAD_VALUE;
+    }
+
+    if (of == OUTPUT_FORMAT_DEFAULT) {
+        mOutputFormat = OUTPUT_FORMAT_THREE_GPP;
+    } else {
+        mOutputFormat = of;
+    }
 
     return OK;
 }
 
 status_t StagefrightRecorder::setAudioEncoder(audio_encoder ae) {
-    mAudioEncoder = ae;
+    LOGV("setAudioEncoder: %d", ae);
+    if (ae < AUDIO_ENCODER_DEFAULT ||
+        ae >= AUDIO_ENCODER_LIST_END) {
+        LOGE("Invalid audio encoder: %d", ae);
+        return BAD_VALUE;
+    }
+
+    if (ae == AUDIO_ENCODER_DEFAULT) {
+        mAudioEncoder = AUDIO_ENCODER_AMR_NB;
+    } else {
+        mAudioEncoder = ae;
+    }
 
     return OK;
 }
 
 status_t StagefrightRecorder::setVideoEncoder(video_encoder ve) {
-    mVideoEncoder = ve;
+    LOGV("setVideoEncoder: %d", ve);
+    if (ve < VIDEO_ENCODER_DEFAULT ||
+        ve >= VIDEO_ENCODER_LIST_END) {
+        LOGE("Invalid video encoder: %d", ve);
+        return BAD_VALUE;
+    }
+
+    if (ve == VIDEO_ENCODER_DEFAULT) {
+        mVideoEncoder = VIDEO_ENCODER_H263;
+    } else {
+        mVideoEncoder = ve;
+    }
 
     return OK;
 }
 
 status_t StagefrightRecorder::setVideoSize(int width, int height) {
+    LOGV("setVideoSize: %dx%d", width, height);
+    if (width <= 0 || height <= 0) {
+        LOGE("Invalid video size: %dx%d", width, height);
+        return BAD_VALUE;
+    }
+
+    // Additional check on the dimension will be performed later
     mVideoWidth = width;
     mVideoHeight = height;
 
@@ -90,35 +165,70 @@
 }
 
 status_t StagefrightRecorder::setVideoFrameRate(int frames_per_second) {
+    LOGV("setVideoFrameRate: %d", frames_per_second);
+    if (frames_per_second <= 0 || frames_per_second > 30) {
+        LOGE("Invalid video frame rate: %d", frames_per_second);
+        return BAD_VALUE;
+    }
+
+    // Additional check on the frame rate will be performed later
     mFrameRate = frames_per_second;
 
     return OK;
 }
 
 status_t StagefrightRecorder::setCamera(const sp<ICamera> &camera) {
-    mCamera = camera;
+    LOGV("setCamera");
+    if (camera == 0) {
+        LOGE("camera is NULL");
+        return BAD_VALUE;
+    }
+
+    int64_t token = IPCThreadState::self()->clearCallingIdentity();
+    mFlags &= ~FLAGS_HOT_CAMERA;
+    mCamera = Camera::create(camera);
+    if (mCamera == 0) {
+        LOGE("Unable to connect to camera");
+        IPCThreadState::self()->restoreCallingIdentity(token);
+        return -EBUSY;
+    }
+
+    LOGV("Connected to camera");
+    if (mCamera->previewEnabled()) {
+        LOGV("camera is hot");
+        mFlags |= FLAGS_HOT_CAMERA;
+    }
+    IPCThreadState::self()->restoreCallingIdentity(token);
 
     return OK;
 }
 
 status_t StagefrightRecorder::setPreviewSurface(const sp<ISurface> &surface) {
+    LOGV("setPreviewSurface: %p", surface.get());
     mPreviewSurface = surface;
 
     return OK;
 }
 
 status_t StagefrightRecorder::setOutputFile(const char *path) {
+    LOGE("setOutputFile(const char*) must not be called");
     // We don't actually support this at all, as the media_server process
     // no longer has permissions to create files.
 
-    return UNKNOWN_ERROR;
+    return -EPERM;
 }
 
 status_t StagefrightRecorder::setOutputFile(int fd, int64_t offset, int64_t length) {
+    LOGV("setOutputFile: %d, %lld, %lld", fd, offset, length);
     // These don't make any sense, do they?
     CHECK_EQ(offset, 0);
     CHECK_EQ(length, 0);
 
+    if (fd < 0) {
+        LOGE("Invalid file descriptor: %d", fd);
+        return -EBADF;
+    }
+
     if (mOutputFd >= 0) {
         ::close(mOutputFd);
     }
@@ -127,13 +237,381 @@
     return OK;
 }
 
-status_t StagefrightRecorder::setParameters(const String8 &params) {
-    mParams = params;
+// Attempt to parse an int64 literal optionally surrounded by whitespace,
+// returns true on success, false otherwise.
+static bool safe_strtoi64(const char *s, int64_t *val) {
+    char *end;
+    *val = strtoll(s, &end, 10);
 
+    if (end == s || errno == ERANGE) {
+        return false;
+    }
+
+    // Skip trailing whitespace
+    while (isspace(*end)) {
+        ++end;
+    }
+
+    // For a successful return, the string must contain nothing but a valid
+    // int64 literal optionally surrounded by whitespace.
+
+    return *end == '\0';
+}
+
+// Return true if the value is in [0, 0x007FFFFFFF]
+static bool safe_strtoi32(const char *s, int32_t *val) {
+    int64_t temp;
+    if (safe_strtoi64(s, &temp)) {
+        if (temp >= 0 && temp <= 0x007FFFFFFF) {
+            *val = static_cast<int32_t>(temp);
+            return true;
+        }
+    }
+    return false;
+}
+
+// Trim both leading and trailing whitespace from the given string.
+static void TrimString(String8 *s) {
+    size_t num_bytes = s->bytes();
+    const char *data = s->string();
+
+    size_t leading_space = 0;
+    while (leading_space < num_bytes && isspace(data[leading_space])) {
+        ++leading_space;
+    }
+
+    size_t i = num_bytes;
+    while (i > leading_space && isspace(data[i - 1])) {
+        --i;
+    }
+
+    s->setTo(String8(&data[leading_space], i - leading_space));
+}
+
+status_t StagefrightRecorder::setParamAudioSamplingRate(int32_t sampleRate) {
+    LOGV("setParamAudioSamplingRate: %d", sampleRate);
+    if (sampleRate <= 0) {
+        LOGE("Invalid audio sampling rate: %d", sampleRate);
+        return BAD_VALUE;
+    }
+
+    // Additional check on the sample rate will be performed later.
+    mSampleRate = sampleRate;
     return OK;
 }
 
-status_t StagefrightRecorder::setListener(const sp<IMediaPlayerClient> &listener) {
+status_t StagefrightRecorder::setParamAudioNumberOfChannels(int32_t channels) {
+    LOGV("setParamAudioNumberOfChannels: %d", channels);
+    if (channels <= 0 || channels >= 3) {
+        LOGE("Invalid number of audio channels: %d", channels);
+        return BAD_VALUE;
+    }
+
+    // Additional check on the number of channels will be performed later.
+    mAudioChannels = channels;
+    return OK;
+}
+
+status_t StagefrightRecorder::setParamAudioEncodingBitRate(int32_t bitRate) {
+    LOGV("setParamAudioEncodingBitRate: %d", bitRate);
+    if (bitRate <= 0) {
+        LOGE("Invalid audio encoding bit rate: %d", bitRate);
+        return BAD_VALUE;
+    }
+
+    // The target bit rate may not be exactly the same as the requested.
+    // It depends on many factors, such as rate control, and the bit rate
+    // range that a specific encoder supports. The mismatch between the
+    // the target and requested bit rate will NOT be treated as an error.
+    mAudioBitRate = bitRate;
+    return OK;
+}
+
+status_t StagefrightRecorder::setParamVideoEncodingBitRate(int32_t bitRate) {
+    LOGV("setParamVideoEncodingBitRate: %d", bitRate);
+    if (bitRate <= 0) {
+        LOGE("Invalid video encoding bit rate: %d", bitRate);
+        return BAD_VALUE;
+    }
+
+    // The target bit rate may not be exactly the same as the requested.
+    // It depends on many factors, such as rate control, and the bit rate
+    // range that a specific encoder supports. The mismatch between the
+    // the target and requested bit rate will NOT be treated as an error.
+    mVideoBitRate = bitRate;
+    return OK;
+}
+
+status_t StagefrightRecorder::setParamMaxFileDurationUs(int64_t timeUs) {
+    LOGV("setParamMaxFileDurationUs: %lld us", timeUs);
+    if (timeUs <= 1000000LL) {  // XXX: 1 second
+        LOGE("Max file duration is too short: %lld us", timeUs);
+        return BAD_VALUE;
+    }
+    mMaxFileDurationUs = timeUs;
+    return OK;
+}
+
+status_t StagefrightRecorder::setParamMaxFileSizeBytes(int64_t bytes) {
+    LOGV("setParamMaxFileSizeBytes: %lld bytes", bytes);
+    if (bytes <= 1024) {  // XXX: 1 kB
+        LOGE("Max file size is too small: %lld bytes", bytes);
+        return BAD_VALUE;
+    }
+    mMaxFileSizeBytes = bytes;
+    return OK;
+}
+
+status_t StagefrightRecorder::setParamInterleaveDuration(int32_t durationUs) {
+    LOGV("setParamInterleaveDuration: %d", durationUs);
+    if (durationUs <= 500000) {           //  500 ms
+        // If interleave duration is too small, it is very inefficient to do
+        // interleaving since the metadata overhead will count for a significant
+        // portion of the saved contents
+        LOGE("Audio/video interleave duration is too small: %d us", durationUs);
+        return BAD_VALUE;
+    } else if (durationUs >= 10000000) {  // 10 seconds
+        // If interleaving duration is too large, it can cause the recording
+        // session to use too much memory since we have to save the output
+        // data before we write them out
+        LOGE("Audio/video interleave duration is too large: %d us", durationUs);
+        return BAD_VALUE;
+    }
+    mInterleaveDurationUs = durationUs;
+    return OK;
+}
+
+// If seconds <  0, only the first frame is I frame, and rest are all P frames
+// If seconds == 0, all frames are encoded as I frames. No P frames
+// If seconds >  0, it is the time spacing (seconds) between 2 neighboring I frames
+status_t StagefrightRecorder::setParamVideoIFramesInterval(int32_t seconds) {
+    LOGV("setParamVideoIFramesInterval: %d seconds", seconds);
+    mIFramesIntervalSec = seconds;
+    return OK;
+}
+
+status_t StagefrightRecorder::setParam64BitFileOffset(bool use64Bit) {
+    LOGV("setParam64BitFileOffset: %s",
+        use64Bit? "use 64 bit file offset": "use 32 bit file offset");
+    mUse64BitFileOffset = use64Bit;
+    return OK;
+}
+
+status_t StagefrightRecorder::setParamVideoCameraId(int32_t cameraId) {
+    LOGV("setParamVideoCameraId: %d", cameraId);
+    if (cameraId < 0) {
+        return BAD_VALUE;
+    }
+    mCameraId = cameraId;
+    return OK;
+}
+
+status_t StagefrightRecorder::setParamTrackFrameStatus(int32_t nFrames) {
+    LOGV("setParamTrackFrameStatus: %d", nFrames);
+    if (nFrames <= 0) {
+        LOGE("Invalid number of frames to track: %d", nFrames);
+        return BAD_VALUE;
+    }
+    mTrackEveryNumberOfFrames = nFrames;
+    return OK;
+}
+
+status_t StagefrightRecorder::setParamTrackTimeStatus(int64_t timeDurationUs) {
+    LOGV("setParamTrackTimeStatus: %lld", timeDurationUs);
+    if (timeDurationUs < 20000) {  // Infeasible if shorter than 20 ms?
+        LOGE("Tracking time duration too short: %lld us", timeDurationUs);
+        return BAD_VALUE;
+    }
+    mTrackEveryTimeDurationUs = timeDurationUs;
+    return OK;
+}
+
+status_t StagefrightRecorder::setParamVideoEncoderProfile(int32_t profile) {
+    LOGV("setParamVideoEncoderProfile: %d", profile);
+
+    // Additional check will be done later when we load the encoder.
+    // For now, we are accepting values defined in OpenMAX IL.
+    mVideoEncoderProfile = profile;
+    return OK;
+}
+
+status_t StagefrightRecorder::setParamVideoEncoderLevel(int32_t level) {
+    LOGV("setParamVideoEncoderLevel: %d", level);
+
+    // Additional check will be done later when we load the encoder.
+    // For now, we are accepting values defined in OpenMAX IL.
+    mVideoEncoderLevel = level;
+    return OK;
+}
+
+status_t StagefrightRecorder::setParamMovieTimeScale(int32_t timeScale) {
+    LOGV("setParamMovieTimeScale: %d", timeScale);
+
+    // The range is set to be the same as the audio's time scale range
+    // since audio's time scale has a wider range.
+    if (timeScale < 600 || timeScale > 96000) {
+        LOGE("Time scale (%d) for movie is out of range [600, 96000]", timeScale);
+        return BAD_VALUE;
+    }
+    mMovieTimeScale = timeScale;
+    return OK;
+}
+
+status_t StagefrightRecorder::setParamVideoTimeScale(int32_t timeScale) {
+    LOGV("setParamVideoTimeScale: %d", timeScale);
+
+    // 60000 is chosen to make sure that each video frame from a 60-fps
+    // video has 1000 ticks.
+    if (timeScale < 600 || timeScale > 60000) {
+        LOGE("Time scale (%d) for video is out of range [600, 60000]", timeScale);
+        return BAD_VALUE;
+    }
+    mVideoTimeScale = timeScale;
+    return OK;
+}
+
+status_t StagefrightRecorder::setParamAudioTimeScale(int32_t timeScale) {
+    LOGV("setParamAudioTimeScale: %d", timeScale);
+
+    // 96000 Hz is the highest sampling rate support in AAC.
+    if (timeScale < 600 || timeScale > 96000) {
+        LOGE("Time scale (%d) for audio is out of range [600, 96000]", timeScale);
+        return BAD_VALUE;
+    }
+    mAudioTimeScale = timeScale;
+    return OK;
+}
+
+status_t StagefrightRecorder::setParameter(
+        const String8 &key, const String8 &value) {
+    LOGV("setParameter: key (%s) => value (%s)", key.string(), value.string());
+    if (key == "max-duration") {
+        int64_t max_duration_ms;
+        if (safe_strtoi64(value.string(), &max_duration_ms)) {
+            return setParamMaxFileDurationUs(1000LL * max_duration_ms);
+        }
+    } else if (key == "max-filesize") {
+        int64_t max_filesize_bytes;
+        if (safe_strtoi64(value.string(), &max_filesize_bytes)) {
+            return setParamMaxFileSizeBytes(max_filesize_bytes);
+        }
+    } else if (key == "interleave-duration-us") {
+        int32_t durationUs;
+        if (safe_strtoi32(value.string(), &durationUs)) {
+            return setParamInterleaveDuration(durationUs);
+        }
+    } else if (key == "param-movie-time-scale") {
+        int32_t timeScale;
+        if (safe_strtoi32(value.string(), &timeScale)) {
+            return setParamMovieTimeScale(timeScale);
+        }
+    } else if (key == "param-use-64bit-offset") {
+        int32_t use64BitOffset;
+        if (safe_strtoi32(value.string(), &use64BitOffset)) {
+            return setParam64BitFileOffset(use64BitOffset != 0);
+        }
+    } else if (key == "param-track-frame-status") {
+        int32_t nFrames;
+        if (safe_strtoi32(value.string(), &nFrames)) {
+            return setParamTrackFrameStatus(nFrames);
+        }
+    } else if (key == "param-track-time-status") {
+        int64_t timeDurationUs;
+        if (safe_strtoi64(value.string(), &timeDurationUs)) {
+            return setParamTrackTimeStatus(timeDurationUs);
+        }
+    } else if (key == "audio-param-sampling-rate") {
+        int32_t sampling_rate;
+        if (safe_strtoi32(value.string(), &sampling_rate)) {
+            return setParamAudioSamplingRate(sampling_rate);
+        }
+    } else if (key == "audio-param-number-of-channels") {
+        int32_t number_of_channels;
+        if (safe_strtoi32(value.string(), &number_of_channels)) {
+            return setParamAudioNumberOfChannels(number_of_channels);
+        }
+    } else if (key == "audio-param-encoding-bitrate") {
+        int32_t audio_bitrate;
+        if (safe_strtoi32(value.string(), &audio_bitrate)) {
+            return setParamAudioEncodingBitRate(audio_bitrate);
+        }
+    } else if (key == "audio-param-time-scale") {
+        int32_t timeScale;
+        if (safe_strtoi32(value.string(), &timeScale)) {
+            return setParamAudioTimeScale(timeScale);
+        }
+    } else if (key == "video-param-encoding-bitrate") {
+        int32_t video_bitrate;
+        if (safe_strtoi32(value.string(), &video_bitrate)) {
+            return setParamVideoEncodingBitRate(video_bitrate);
+        }
+    } else if (key == "video-param-i-frames-interval") {
+        int32_t seconds;
+        if (safe_strtoi32(value.string(), &seconds)) {
+            return setParamVideoIFramesInterval(seconds);
+        }
+    } else if (key == "video-param-encoder-profile") {
+        int32_t profile;
+        if (safe_strtoi32(value.string(), &profile)) {
+            return setParamVideoEncoderProfile(profile);
+        }
+    } else if (key == "video-param-encoder-level") {
+        int32_t level;
+        if (safe_strtoi32(value.string(), &level)) {
+            return setParamVideoEncoderLevel(level);
+        }
+    } else if (key == "video-param-camera-id") {
+        int32_t cameraId;
+        if (safe_strtoi32(value.string(), &cameraId)) {
+            return setParamVideoCameraId(cameraId);
+        }
+    } else if (key == "video-param-time-scale") {
+        int32_t timeScale;
+        if (safe_strtoi32(value.string(), &timeScale)) {
+            return setParamVideoTimeScale(timeScale);
+        }
+    } else {
+        LOGE("setParameter: failed to find key %s", key.string());
+    }
+    return BAD_VALUE;
+}
+
+status_t StagefrightRecorder::setParameters(const String8 &params) {
+    LOGV("setParameters: %s", params.string());
+    const char *cparams = params.string();
+    const char *key_start = cparams;
+    for (;;) {
+        const char *equal_pos = strchr(key_start, '=');
+        if (equal_pos == NULL) {
+            LOGE("Parameters %s miss a value", cparams);
+            return BAD_VALUE;
+        }
+        String8 key(key_start, equal_pos - key_start);
+        TrimString(&key);
+        if (key.length() == 0) {
+            LOGE("Parameters %s contains an empty key", cparams);
+            return BAD_VALUE;
+        }
+        const char *value_start = equal_pos + 1;
+        const char *semicolon_pos = strchr(value_start, ';');
+        String8 value;
+        if (semicolon_pos == NULL) {
+            value.setTo(value_start);
+        } else {
+            value.setTo(value_start, semicolon_pos - value_start);
+        }
+        if (setParameter(key, value) != OK) {
+            return BAD_VALUE;
+        }
+        if (semicolon_pos == NULL) {
+            break;  // Reaches the end
+        }
+        key_start = semicolon_pos + 1;
+    }
+    return OK;
+}
+
+status_t StagefrightRecorder::setListener(const sp<IMediaRecorderClient> &listener) {
     mListener = listener;
 
     return OK;
@@ -144,7 +622,10 @@
 }
 
 status_t StagefrightRecorder::start() {
+    CHECK(mOutputFd >= 0);
+
     if (mWriter != NULL) {
+        LOGE("File writer is not avaialble");
         return UNKNOWN_ERROR;
     }
 
@@ -158,40 +639,58 @@
         case OUTPUT_FORMAT_AMR_WB:
             return startAMRRecording();
 
+        case OUTPUT_FORMAT_AAC_ADIF:
+        case OUTPUT_FORMAT_AAC_ADTS:
+            return startAACRecording();
+
         default:
+            LOGE("Unsupported output file format: %d", mOutputFormat);
             return UNKNOWN_ERROR;
     }
 }
 
-sp<MediaSource> StagefrightRecorder::createAMRAudioSource() {
-    uint32_t sampleRate =
-        mAudioEncoder == AUDIO_ENCODER_AMR_NB ? 8000 : 16000;
-
+sp<MediaSource> StagefrightRecorder::createAudioSource() {
     sp<AudioSource> audioSource =
         new AudioSource(
                 mAudioSource,
-                sampleRate,
-                AudioSystem::CHANNEL_IN_MONO);
+                mSampleRate,
+                mAudioChannels);
 
     status_t err = audioSource->initCheck();
 
     if (err != OK) {
+        LOGE("audio source is not initialized");
         return NULL;
     }
 
     sp<MetaData> encMeta = new MetaData;
-    encMeta->setCString(
-            kKeyMIMEType,
-            mAudioEncoder == AUDIO_ENCODER_AMR_NB
-                ? MEDIA_MIMETYPE_AUDIO_AMR_NB : MEDIA_MIMETYPE_AUDIO_AMR_WB);
+    const char *mime;
+    switch (mAudioEncoder) {
+        case AUDIO_ENCODER_AMR_NB:
+        case AUDIO_ENCODER_DEFAULT:
+            mime = MEDIA_MIMETYPE_AUDIO_AMR_NB;
+            break;
+        case AUDIO_ENCODER_AMR_WB:
+            mime = MEDIA_MIMETYPE_AUDIO_AMR_WB;
+            break;
+        case AUDIO_ENCODER_AAC:
+            mime = MEDIA_MIMETYPE_AUDIO_AAC;
+            break;
+        default:
+            LOGE("Unknown audio encoder: %d", mAudioEncoder);
+            return NULL;
+    }
+    encMeta->setCString(kKeyMIMEType, mime);
 
     int32_t maxInputSize;
     CHECK(audioSource->getFormat()->findInt32(
                 kKeyMaxInputSize, &maxInputSize));
 
     encMeta->setInt32(kKeyMaxInputSize, maxInputSize);
-    encMeta->setInt32(kKeyChannelCount, 1);
-    encMeta->setInt32(kKeySampleRate, sampleRate);
+    encMeta->setInt32(kKeyChannelCount, mAudioChannels);
+    encMeta->setInt32(kKeySampleRate, mSampleRate);
+    encMeta->setInt32(kKeyBitRate, mAudioBitRate);
+    encMeta->setInt32(kKeyTimeScale, mAudioTimeScale);
 
     OMXClient client;
     CHECK_EQ(client.connect(), OK);
@@ -199,144 +698,485 @@
     sp<MediaSource> audioEncoder =
         OMXCodec::Create(client.interface(), encMeta,
                          true /* createEncoder */, audioSource);
+    mAudioSourceNode = audioSource;
 
     return audioEncoder;
 }
 
+status_t StagefrightRecorder::startAACRecording() {
+    CHECK(mOutputFormat == OUTPUT_FORMAT_AAC_ADIF ||
+          mOutputFormat == OUTPUT_FORMAT_AAC_ADTS);
+
+    CHECK(mAudioEncoder == AUDIO_ENCODER_AAC);
+    CHECK(mAudioSource != AUDIO_SOURCE_LIST_END);
+
+    CHECK(0 == "AACWriter is not implemented yet");
+
+    return OK;
+}
+
 status_t StagefrightRecorder::startAMRRecording() {
-    if (mAudioSource == AUDIO_SOURCE_LIST_END
-        || mVideoSource != VIDEO_SOURCE_LIST_END) {
-        return UNKNOWN_ERROR;
+    CHECK(mOutputFormat == OUTPUT_FORMAT_AMR_NB ||
+          mOutputFormat == OUTPUT_FORMAT_AMR_WB);
+
+    if (mOutputFormat == OUTPUT_FORMAT_AMR_NB) {
+        if (mAudioEncoder != AUDIO_ENCODER_DEFAULT &&
+            mAudioEncoder != AUDIO_ENCODER_AMR_NB) {
+            LOGE("Invalid encoder %d used for AMRNB recording",
+                    mAudioEncoder);
+            return BAD_VALUE;
+        }
+        if (mSampleRate != 8000) {
+            LOGE("Invalid sampling rate %d used for AMRNB recording",
+                    mSampleRate);
+            return BAD_VALUE;
+        }
+    } else {  // mOutputFormat must be OUTPUT_FORMAT_AMR_WB
+        if (mAudioEncoder != AUDIO_ENCODER_AMR_WB) {
+            LOGE("Invlaid encoder %d used for AMRWB recording",
+                    mAudioEncoder);
+            return BAD_VALUE;
+        }
+        if (mSampleRate != 16000) {
+            LOGE("Invalid sample rate %d used for AMRWB recording",
+                    mSampleRate);
+            return BAD_VALUE;
+        }
+    }
+    if (mAudioChannels != 1) {
+        LOGE("Invalid number of audio channels %d used for amr recording",
+                mAudioChannels);
+        return BAD_VALUE;
     }
 
-    if (mOutputFormat == OUTPUT_FORMAT_AMR_NB
-            && mAudioEncoder != AUDIO_ENCODER_DEFAULT
-            && mAudioEncoder != AUDIO_ENCODER_AMR_NB) {
-        return UNKNOWN_ERROR;
-    } else if (mOutputFormat == OUTPUT_FORMAT_AMR_WB
-            && mAudioEncoder != AUDIO_ENCODER_AMR_WB) {
-        return UNKNOWN_ERROR;
+    if (mAudioSource >= AUDIO_SOURCE_LIST_END) {
+        LOGE("Invalid audio source: %d", mAudioSource);
+        return BAD_VALUE;
     }
 
-    sp<MediaSource> audioEncoder = createAMRAudioSource();
+    sp<MediaSource> audioEncoder = createAudioSource();
 
     if (audioEncoder == NULL) {
         return UNKNOWN_ERROR;
     }
 
-    CHECK(mOutputFd >= 0);
     mWriter = new AMRWriter(dup(mOutputFd));
     mWriter->addSource(audioEncoder);
+
+    if (mMaxFileDurationUs != 0) {
+        mWriter->setMaxFileDuration(mMaxFileDurationUs);
+    }
+    if (mMaxFileSizeBytes != 0) {
+        mWriter->setMaxFileSize(mMaxFileSizeBytes);
+    }
+    mWriter->setListener(mListener);
     mWriter->start();
 
     return OK;
 }
 
+void StagefrightRecorder::clipVideoFrameRate() {
+    LOGV("clipVideoFrameRate: encoder %d", mVideoEncoder);
+    int minFrameRate = mEncoderProfiles->getVideoEncoderParamByName(
+                        "enc.vid.fps.min", mVideoEncoder);
+    int maxFrameRate = mEncoderProfiles->getVideoEncoderParamByName(
+                        "enc.vid.fps.max", mVideoEncoder);
+    if (mFrameRate < minFrameRate) {
+        LOGW("Intended video encoding frame rate (%d fps) is too small"
+             " and will be set to (%d fps)", mFrameRate, minFrameRate);
+        mFrameRate = minFrameRate;
+    } else if (mFrameRate > maxFrameRate) {
+        LOGW("Intended video encoding frame rate (%d fps) is too large"
+             " and will be set to (%d fps)", mFrameRate, maxFrameRate);
+        mFrameRate = maxFrameRate;
+    }
+}
+
+void StagefrightRecorder::clipVideoBitRate() {
+    LOGV("clipVideoBitRate: encoder %d", mVideoEncoder);
+    int minBitRate = mEncoderProfiles->getVideoEncoderParamByName(
+                        "enc.vid.bps.min", mVideoEncoder);
+    int maxBitRate = mEncoderProfiles->getVideoEncoderParamByName(
+                        "enc.vid.bps.max", mVideoEncoder);
+    if (mVideoBitRate < minBitRate) {
+        LOGW("Intended video encoding bit rate (%d bps) is too small"
+             " and will be set to (%d bps)", mVideoBitRate, minBitRate);
+        mVideoBitRate = minBitRate;
+    } else if (mVideoBitRate > maxBitRate) {
+        LOGW("Intended video encoding bit rate (%d bps) is too large"
+             " and will be set to (%d bps)", mVideoBitRate, maxBitRate);
+        mVideoBitRate = maxBitRate;
+    }
+}
+
+void StagefrightRecorder::clipVideoFrameWidth() {
+    LOGV("clipVideoFrameWidth: encoder %d", mVideoEncoder);
+    int minFrameWidth = mEncoderProfiles->getVideoEncoderParamByName(
+                        "enc.vid.width.min", mVideoEncoder);
+    int maxFrameWidth = mEncoderProfiles->getVideoEncoderParamByName(
+                        "enc.vid.width.max", mVideoEncoder);
+    if (mVideoWidth < minFrameWidth) {
+        LOGW("Intended video encoding frame width (%d) is too small"
+             " and will be set to (%d)", mVideoWidth, minFrameWidth);
+        mVideoWidth = minFrameWidth;
+    } else if (mVideoWidth > maxFrameWidth) {
+        LOGW("Intended video encoding frame width (%d) is too large"
+             " and will be set to (%d)", mVideoWidth, maxFrameWidth);
+        mVideoWidth = maxFrameWidth;
+    }
+}
+
+status_t StagefrightRecorder::setupCameraSource() {
+    clipVideoBitRate();
+    clipVideoFrameRate();
+    clipVideoFrameWidth();
+    clipVideoFrameHeight();
+
+    int64_t token = IPCThreadState::self()->clearCallingIdentity();
+    if (mCamera == 0) {
+        mCamera = Camera::connect(mCameraId);
+        if (mCamera == 0) {
+            LOGE("Camera connection could not be established.");
+            return -EBUSY;
+        }
+        mFlags &= ~FLAGS_HOT_CAMERA;
+        mCamera->lock();
+    }
+
+    // Set the actual video recording frame size
+    CameraParameters params(mCamera->getParameters());
+    params.setPreviewSize(mVideoWidth, mVideoHeight);
+    params.setPreviewFrameRate(mFrameRate);
+    String8 s = params.flatten();
+    CHECK_EQ(OK, mCamera->setParameters(s));
+    CameraParameters newCameraParams(mCamera->getParameters());
+
+    // Check on video frame size
+    int frameWidth = 0, frameHeight = 0;
+    newCameraParams.getPreviewSize(&frameWidth, &frameHeight);
+    if (frameWidth  < 0 || frameWidth  != mVideoWidth ||
+        frameHeight < 0 || frameHeight != mVideoHeight) {
+        LOGE("Failed to set the video frame size to %dx%d",
+                mVideoWidth, mVideoHeight);
+        IPCThreadState::self()->restoreCallingIdentity(token);
+        return UNKNOWN_ERROR;
+    }
+
+    // Check on video frame rate
+    int frameRate = newCameraParams.getPreviewFrameRate();
+    if (frameRate < 0 || (frameRate - mFrameRate) != 0) {
+        LOGE("Failed to set frame rate to %d fps. The actual "
+             "frame rate is %d", mFrameRate, frameRate);
+    }
+
+    CHECK_EQ(OK, mCamera->setPreviewDisplay(mPreviewSurface));
+    IPCThreadState::self()->restoreCallingIdentity(token);
+    return OK;
+}
+
+void StagefrightRecorder::clipVideoFrameHeight() {
+    LOGV("clipVideoFrameHeight: encoder %d", mVideoEncoder);
+    int minFrameHeight = mEncoderProfiles->getVideoEncoderParamByName(
+                        "enc.vid.height.min", mVideoEncoder);
+    int maxFrameHeight = mEncoderProfiles->getVideoEncoderParamByName(
+                        "enc.vid.height.max", mVideoEncoder);
+    if (mVideoHeight < minFrameHeight) {
+        LOGW("Intended video encoding frame height (%d) is too small"
+             " and will be set to (%d)", mVideoHeight, minFrameHeight);
+        mVideoHeight = minFrameHeight;
+    } else if (mVideoHeight > maxFrameHeight) {
+        LOGW("Intended video encoding frame height (%d) is too large"
+             " and will be set to (%d)", mVideoHeight, maxFrameHeight);
+        mVideoHeight = maxFrameHeight;
+    }
+}
+
+status_t StagefrightRecorder::setupVideoEncoder(const sp<MediaWriter>& writer) {
+    status_t err = setupCameraSource();
+    if (err != OK) return err;
+
+    sp<CameraSource> cameraSource = CameraSource::CreateFromCamera(mCamera);
+    CHECK(cameraSource != NULL);
+
+    sp<MetaData> enc_meta = new MetaData;
+    enc_meta->setInt32(kKeyBitRate, mVideoBitRate);
+    enc_meta->setInt32(kKeySampleRate, mFrameRate);
+
+    switch (mVideoEncoder) {
+        case VIDEO_ENCODER_H263:
+            enc_meta->setCString(kKeyMIMEType, MEDIA_MIMETYPE_VIDEO_H263);
+            break;
+
+        case VIDEO_ENCODER_MPEG_4_SP:
+            enc_meta->setCString(kKeyMIMEType, MEDIA_MIMETYPE_VIDEO_MPEG4);
+            break;
+
+        case VIDEO_ENCODER_H264:
+            enc_meta->setCString(kKeyMIMEType, MEDIA_MIMETYPE_VIDEO_AVC);
+            break;
+
+        default:
+            CHECK(!"Should not be here, unsupported video encoding.");
+            break;
+    }
+
+    sp<MetaData> meta = cameraSource->getFormat();
+
+    int32_t width, height, stride, sliceHeight, colorFormat;
+    CHECK(meta->findInt32(kKeyWidth, &width));
+    CHECK(meta->findInt32(kKeyHeight, &height));
+    CHECK(meta->findInt32(kKeyStride, &stride));
+    CHECK(meta->findInt32(kKeySliceHeight, &sliceHeight));
+    CHECK(meta->findInt32(kKeyColorFormat, &colorFormat));
+
+    enc_meta->setInt32(kKeyWidth, width);
+    enc_meta->setInt32(kKeyHeight, height);
+    enc_meta->setInt32(kKeyIFramesInterval, mIFramesIntervalSec);
+    enc_meta->setInt32(kKeyStride, stride);
+    enc_meta->setInt32(kKeySliceHeight, sliceHeight);
+    enc_meta->setInt32(kKeyColorFormat, colorFormat);
+    enc_meta->setInt32(kKeyTimeScale, mVideoTimeScale);
+    if (mVideoEncoderProfile != -1) {
+        enc_meta->setInt32(kKeyVideoProfile, mVideoEncoderProfile);
+    }
+    if (mVideoEncoderLevel != -1) {
+        enc_meta->setInt32(kKeyVideoLevel, mVideoEncoderLevel);
+    }
+
+    OMXClient client;
+    CHECK_EQ(client.connect(), OK);
+
+    sp<MediaSource> encoder = OMXCodec::Create(
+            client.interface(), enc_meta,
+            true /* createEncoder */, cameraSource);
+    if (encoder == NULL) {
+        return UNKNOWN_ERROR;
+    }
+
+    writer->addSource(encoder);
+    return OK;
+}
+
+status_t StagefrightRecorder::setupAudioEncoder(const sp<MediaWriter>& writer) {
+    sp<MediaSource> audioEncoder;
+    switch(mAudioEncoder) {
+        case AUDIO_ENCODER_AMR_NB:
+        case AUDIO_ENCODER_AMR_WB:
+        case AUDIO_ENCODER_AAC:
+            audioEncoder = createAudioSource();
+            break;
+        default:
+            LOGE("Unsupported audio encoder: %d", mAudioEncoder);
+            return UNKNOWN_ERROR;
+    }
+
+    if (audioEncoder == NULL) {
+        return UNKNOWN_ERROR;
+    }
+
+    writer->addSource(audioEncoder);
+    return OK;
+}
+
 status_t StagefrightRecorder::startMPEG4Recording() {
-    mWriter = new MPEG4Writer(dup(mOutputFd));
+    int32_t totalBitRate = 0;
+    status_t err = OK;
+    sp<MediaWriter> writer = new MPEG4Writer(dup(mOutputFd));
 
+    // Add audio source first if it exists
+    if (mAudioSource != AUDIO_SOURCE_LIST_END) {
+        err = setupAudioEncoder(writer);
+        if (err != OK) return err;
+        totalBitRate += mAudioBitRate;
+    }
     if (mVideoSource == VIDEO_SOURCE_DEFAULT
             || mVideoSource == VIDEO_SOURCE_CAMERA) {
-        CHECK(mCamera != NULL);
-
-        sp<CameraSource> cameraSource =
-            CameraSource::CreateFromICamera(mCamera);
-
-        CHECK(cameraSource != NULL);
-
-        cameraSource->setPreviewSurface(mPreviewSurface);
-
-        sp<MetaData> enc_meta = new MetaData;
-        switch (mVideoEncoder) {
-            case VIDEO_ENCODER_H263:
-                enc_meta->setCString(kKeyMIMEType, MEDIA_MIMETYPE_VIDEO_H263);
-                break;
-
-            case VIDEO_ENCODER_MPEG_4_SP:
-                enc_meta->setCString(kKeyMIMEType, MEDIA_MIMETYPE_VIDEO_MPEG4);
-                break;
-
-            case VIDEO_ENCODER_H264:
-                enc_meta->setCString(kKeyMIMEType, MEDIA_MIMETYPE_VIDEO_AVC);
-                break;
-
-            default:
-                CHECK(!"Should not be here, unsupported video encoding.");
-                break;
-        }
-
-        sp<MetaData> meta = cameraSource->getFormat();
-
-        int32_t width, height;
-        CHECK(meta->findInt32(kKeyWidth, &width));
-        CHECK(meta->findInt32(kKeyHeight, &height));
-
-        enc_meta->setInt32(kKeyWidth, width);
-        enc_meta->setInt32(kKeyHeight, height);
-
-        OMXClient client;
-        CHECK_EQ(client.connect(), OK);
-
-        sp<MediaSource> encoder =
-            OMXCodec::Create(
-                    client.interface(), enc_meta,
-                    true /* createEncoder */, cameraSource);
-
-        CHECK(mOutputFd >= 0);
-        mWriter->addSource(encoder);
+        err = setupVideoEncoder(writer);
+        if (err != OK) return err;
+        totalBitRate += mVideoBitRate;
     }
 
-    if (mAudioSource != AUDIO_SOURCE_LIST_END) {
-        sp<MediaSource> audioEncoder = createAMRAudioSource();
+    reinterpret_cast<MPEG4Writer *>(writer.get())->
+        setInterleaveDuration(mInterleaveDurationUs);
 
-        if (audioEncoder == NULL) {
-            return UNKNOWN_ERROR;
-        }
-
-        mWriter->addSource(audioEncoder);
+    if (mMaxFileDurationUs != 0) {
+        writer->setMaxFileDuration(mMaxFileDurationUs);
     }
+    if (mMaxFileSizeBytes != 0) {
+        writer->setMaxFileSize(mMaxFileSizeBytes);
+    }
+    sp<MetaData> meta = new MetaData;
+    meta->setInt64(kKeyTime, systemTime() / 1000);
+    meta->setInt32(kKeyFileType, mOutputFormat);
+    meta->setInt32(kKeyBitRate, totalBitRate);
+    meta->setInt32(kKey64BitFileOffset, mUse64BitFileOffset);
+    meta->setInt32(kKeyTimeScale, mMovieTimeScale);
+    if (mTrackEveryNumberOfFrames > 0) {
+        meta->setInt32(kKeyTrackFrameStatus, mTrackEveryNumberOfFrames);
+    }
+    if (mTrackEveryTimeDurationUs > 0) {
+        meta->setInt64(kKeyTrackTimeStatus, mTrackEveryTimeDurationUs);
+    }
+    writer->setListener(mListener);
+    mWriter = writer;
+    return mWriter->start(meta.get());
+}
 
-    mWriter->start();
+status_t StagefrightRecorder::pause() {
+    LOGV("pause");
+    if (mWriter == NULL) {
+        return UNKNOWN_ERROR;
+    }
+    mWriter->pause();
     return OK;
 }
 
 status_t StagefrightRecorder::stop() {
-    if (mWriter == NULL) {
-        return UNKNOWN_ERROR;
+    LOGV("stop");
+    if (mWriter != NULL) {
+        mWriter->stop();
+        mWriter.clear();
     }
 
-    mWriter->stop();
-    mWriter = NULL;
+    if (mCamera != 0) {
+        LOGV("Disconnect camera");
+        int64_t token = IPCThreadState::self()->clearCallingIdentity();
+        if ((mFlags & FLAGS_HOT_CAMERA) == 0) {
+            LOGV("Camera was cold when we started, stopping preview");
+            mCamera->stopPreview();
+        }
+        mCamera->unlock();
+        mCamera.clear();
+        IPCThreadState::self()->restoreCallingIdentity(token);
+        mFlags = 0;
+    }
 
     return OK;
 }
 
 status_t StagefrightRecorder::close() {
+    LOGV("close");
     stop();
 
     return OK;
 }
 
 status_t StagefrightRecorder::reset() {
+    LOGV("reset");
     stop();
 
+    // No audio or video source by default
     mAudioSource = AUDIO_SOURCE_LIST_END;
     mVideoSource = VIDEO_SOURCE_LIST_END;
-    mOutputFormat = OUTPUT_FORMAT_LIST_END;
-    mAudioEncoder = AUDIO_ENCODER_LIST_END;
-    mVideoEncoder = VIDEO_ENCODER_LIST_END;
-    mVideoWidth = -1;
-    mVideoHeight = -1;
-    mFrameRate = -1;
+
+    // Default parameters
+    mOutputFormat  = OUTPUT_FORMAT_THREE_GPP;
+    mAudioEncoder  = AUDIO_ENCODER_AMR_NB;
+    mVideoEncoder  = VIDEO_ENCODER_H263;
+    mVideoWidth    = 176;
+    mVideoHeight   = 144;
+    mFrameRate     = 20;
+    mVideoBitRate  = 192000;
+    mSampleRate    = 8000;
+    mAudioChannels = 1;
+    mAudioBitRate  = 12200;
+    mInterleaveDurationUs = 0;
+    mIFramesIntervalSec = 1;
+    mAudioSourceNode = 0;
+    mUse64BitFileOffset = false;
+    mMovieTimeScale  = 1000;
+    mAudioTimeScale  = 1000;
+    mVideoTimeScale  = 1000;
+    mCameraId        = 0;
+    mVideoEncoderProfile = -1;
+    mVideoEncoderLevel   = -1;
+    mMaxFileDurationUs = 0;
+    mMaxFileSizeBytes = 0;
+    mTrackEveryNumberOfFrames = 0;
+    mTrackEveryTimeDurationUs = 0;
+    mEncoderProfiles = MediaProfiles::getInstance();
+
     mOutputFd = -1;
+    mFlags = 0;
 
     return OK;
 }
 
 status_t StagefrightRecorder::getMaxAmplitude(int *max) {
-    *max = 0;
+    LOGV("getMaxAmplitude");
+
+    if (max == NULL) {
+        LOGE("Null pointer argument");
+        return BAD_VALUE;
+    }
+
+    if (mAudioSourceNode != 0) {
+        *max = mAudioSourceNode->getMaxAmplitude();
+    } else {
+        *max = 0;
+    }
 
     return OK;
 }
 
+status_t StagefrightRecorder::dump(int fd, const Vector<String16>& args) const {
+    const size_t SIZE = 256;
+    char buffer[SIZE];
+    String8 result;
+    snprintf(buffer, SIZE, "   Recorder: %p", this);
+    snprintf(buffer, SIZE, "   Output file (fd %d):\n", mOutputFd);
+    result.append(buffer);
+    snprintf(buffer, SIZE, "     File format: %d\n", mOutputFormat);
+    result.append(buffer);
+    snprintf(buffer, SIZE, "     Max file size (bytes): %lld\n", mMaxFileSizeBytes);
+    result.append(buffer);
+    snprintf(buffer, SIZE, "     Max file duration (us): %lld\n", mMaxFileDurationUs);
+    result.append(buffer);
+    snprintf(buffer, SIZE, "     File offset length (bits): %d\n", mUse64BitFileOffset? 64: 32);
+    result.append(buffer);
+    snprintf(buffer, SIZE, "     Interleave duration (us): %d\n", mInterleaveDurationUs);
+    result.append(buffer);
+    snprintf(buffer, SIZE, "     Progress notification: %d frames\n", mTrackEveryNumberOfFrames);
+    result.append(buffer);
+    snprintf(buffer, SIZE, "     Progress notification: %lld us\n", mTrackEveryTimeDurationUs);
+    result.append(buffer);
+    snprintf(buffer, SIZE, "   Audio\n");
+    result.append(buffer);
+    snprintf(buffer, SIZE, "     Source: %d\n", mAudioSource);
+    result.append(buffer);
+    snprintf(buffer, SIZE, "     Encoder: %d\n", mAudioEncoder);
+    result.append(buffer);
+    snprintf(buffer, SIZE, "     Bit rate (bps): %d\n", mAudioBitRate);
+    result.append(buffer);
+    snprintf(buffer, SIZE, "     Sampling rate (hz): %d\n", mSampleRate);
+    result.append(buffer);
+    snprintf(buffer, SIZE, "     Number of channels: %d\n", mAudioChannels);
+    result.append(buffer);
+    snprintf(buffer, SIZE, "     Max amplitude: %d\n", mAudioSourceNode == 0? 0: mAudioSourceNode->getMaxAmplitude());
+    result.append(buffer);
+    snprintf(buffer, SIZE, "   Video\n");
+    result.append(buffer);
+    snprintf(buffer, SIZE, "     Source: %d\n", mVideoSource);
+    result.append(buffer);
+    snprintf(buffer, SIZE, "     Camera Id: %d\n", mCameraId);
+    result.append(buffer);
+    snprintf(buffer, SIZE, "     Camera flags: %d\n", mFlags);
+    result.append(buffer);
+    snprintf(buffer, SIZE, "     Encoder: %d\n", mVideoEncoder);
+    result.append(buffer);
+    snprintf(buffer, SIZE, "     Encoder profile: %d\n", mVideoEncoderProfile);
+    result.append(buffer);
+    snprintf(buffer, SIZE, "     Encoder level: %d\n", mVideoEncoderLevel);
+    result.append(buffer);
+    snprintf(buffer, SIZE, "     I frames interval (s): %d\n", mIFramesIntervalSec);
+    result.append(buffer);
+    snprintf(buffer, SIZE, "     Frame size (pixels): %dx%d\n", mVideoWidth, mVideoHeight);
+    result.append(buffer);
+    snprintf(buffer, SIZE, "     Frame rate (fps): %d\n", mFrameRate);
+    result.append(buffer);
+    snprintf(buffer, SIZE, "     Bit rate (bps): %d\n", mVideoBitRate);
+    result.append(buffer);
+    ::write(fd, result.string(), result.size());
+    return OK;
+}
 }  // namespace android
diff --git a/media/libmediaplayerservice/StagefrightRecorder.h b/media/libmediaplayerservice/StagefrightRecorder.h
index 7ec412d..9ab02cd 100644
--- a/media/libmediaplayerservice/StagefrightRecorder.h
+++ b/media/libmediaplayerservice/StagefrightRecorder.h
@@ -23,8 +23,11 @@
 
 namespace android {
 
+class Camera;
 struct MediaSource;
 struct MediaWriter;
+struct AudioSource;
+class MediaProfiles;
 
 struct StagefrightRecorder : public MediaRecorderBase {
     StagefrightRecorder();
@@ -43,33 +46,90 @@
     virtual status_t setOutputFile(const char *path);
     virtual status_t setOutputFile(int fd, int64_t offset, int64_t length);
     virtual status_t setParameters(const String8& params);
-    virtual status_t setListener(const sp<IMediaPlayerClient>& listener);
+    virtual status_t setListener(const sp<IMediaRecorderClient>& listener);
     virtual status_t prepare();
     virtual status_t start();
+    virtual status_t pause();
     virtual status_t stop();
     virtual status_t close();
     virtual status_t reset();
     virtual status_t getMaxAmplitude(int *max);
+    virtual status_t dump(int fd, const Vector<String16>& args) const;
 
 private:
-    sp<ICamera> mCamera;
+    enum CameraFlags {
+        FLAGS_SET_CAMERA = 1L << 0,
+        FLAGS_HOT_CAMERA = 1L << 1,
+    };
+
+    sp<Camera> mCamera;
     sp<ISurface> mPreviewSurface;
-    sp<IMediaPlayerClient> mListener;
+    sp<IMediaRecorderClient> mListener;
     sp<MediaWriter> mWriter;
+    sp<AudioSource> mAudioSourceNode;
 
     audio_source mAudioSource;
     video_source mVideoSource;
     output_format mOutputFormat;
     audio_encoder mAudioEncoder;
     video_encoder mVideoEncoder;
-    int mVideoWidth, mVideoHeight;
-    int mFrameRate;
+    bool mUse64BitFileOffset;
+    int32_t mVideoWidth, mVideoHeight;
+    int32_t mFrameRate;
+    int32_t mVideoBitRate;
+    int32_t mAudioBitRate;
+    int32_t mAudioChannels;
+    int32_t mSampleRate;
+    int32_t mInterleaveDurationUs;
+    int32_t mIFramesIntervalSec;
+    int32_t mCameraId;
+    int32_t mVideoEncoderProfile;
+    int32_t mVideoEncoderLevel;
+    int32_t mMovieTimeScale;
+    int32_t mVideoTimeScale;
+    int32_t mAudioTimeScale;
+    int64_t mMaxFileSizeBytes;
+    int64_t mMaxFileDurationUs;
+    int32_t mTrackEveryNumberOfFrames;
+    int64_t mTrackEveryTimeDurationUs;
+
     String8 mParams;
     int mOutputFd;
+    int32_t mFlags;
+
+    MediaProfiles *mEncoderProfiles;
 
     status_t startMPEG4Recording();
     status_t startAMRRecording();
-    sp<MediaSource> createAMRAudioSource();
+    status_t startAACRecording();
+    sp<MediaSource> createAudioSource();
+    status_t setupCameraSource();
+    status_t setupAudioEncoder(const sp<MediaWriter>& writer);
+    status_t setupVideoEncoder(const sp<MediaWriter>& writer);
+
+    // Encoding parameter handling utilities
+    status_t setParameter(const String8 &key, const String8 &value);
+    status_t setParamAudioEncodingBitRate(int32_t bitRate);
+    status_t setParamAudioNumberOfChannels(int32_t channles);
+    status_t setParamAudioSamplingRate(int32_t sampleRate);
+    status_t setParamAudioTimeScale(int32_t timeScale);
+    status_t setParamVideoEncodingBitRate(int32_t bitRate);
+    status_t setParamVideoIFramesInterval(int32_t seconds);
+    status_t setParamVideoEncoderProfile(int32_t profile);
+    status_t setParamVideoEncoderLevel(int32_t level);
+    status_t setParamVideoCameraId(int32_t cameraId);
+    status_t setParamVideoTimeScale(int32_t timeScale);
+    status_t setParamTrackTimeStatus(int64_t timeDurationUs);
+    status_t setParamTrackFrameStatus(int32_t nFrames);
+    status_t setParamInterleaveDuration(int32_t durationUs);
+    status_t setParam64BitFileOffset(bool use64BitFileOffset);
+    status_t setParamMaxFileDurationUs(int64_t timeUs);
+    status_t setParamMaxFileSizeBytes(int64_t bytes);
+    status_t setParamMovieTimeScale(int32_t timeScale);
+    void clipVideoBitRate();
+    void clipVideoFrameRate();
+    void clipVideoFrameWidth();
+    void clipVideoFrameHeight();
 
     StagefrightRecorder(const StagefrightRecorder &);
     StagefrightRecorder &operator=(const StagefrightRecorder &);
diff --git a/media/libmediaplayerservice/VorbisMetadataRetriever.cpp b/media/libmediaplayerservice/VorbisMetadataRetriever.cpp
deleted file mode 100644
index eac74fc..0000000
--- a/media/libmediaplayerservice/VorbisMetadataRetriever.cpp
+++ /dev/null
@@ -1,87 +0,0 @@
-/*
-**
-** Copyright 2009, The Android Open Source Project
-**
-** Licensed under the Apache License, Version 2.0 (the "License");
-** you may not use this file except in compliance with the License.
-** You may obtain a copy of the License at
-**
-**     http://www.apache.org/licenses/LICENSE-2.0
-**
-** Unless required by applicable law or agreed to in writing, software
-** distributed under the License is distributed on an "AS IS" BASIS,
-** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-** See the License for the specific language governing permissions and
-** limitations under the License.
-*/
-
-//#define LOG_NDEBUG 0
-#define LOG_TAG "VorbisMetadataRetriever"
-#include <utils/Log.h>
-
-#include "VorbisMetadataRetriever.h"
-#include <media/mediametadataretriever.h>
-#
-
-namespace android {
-
-void VorbisMetadataRetriever::clearMetadataValues()
-{
-    LOGV("cleearMetadataValues");
-    mMetadataValues[0][0] = '\0';
-}
-
-status_t VorbisMetadataRetriever::setDataSource(const char *url)
-{
-    LOGV("setDataSource: url(%s)", url? url: "NULL pointer");
-    Mutex::Autolock lock(mLock);
-    clearMetadataValues();
-    if (mVorbisPlayer == 0) {
-        mVorbisPlayer = new VorbisPlayer();
-    }
-    // TODO: support headers in MetadataRetriever interface!
-    return mVorbisPlayer->setDataSource(url, NULL /* headers */);
-}
-
-status_t VorbisMetadataRetriever::setDataSource(int fd, int64_t offset, int64_t length)
-{
-    LOGV("setDataSource: fd(%d), offset(%lld), and length(%lld)", fd, offset, length);
-    Mutex::Autolock lock(mLock);
-    clearMetadataValues();
-    if (mVorbisPlayer == 0) {
-        mVorbisPlayer = new VorbisPlayer();
-    }
-    return mVorbisPlayer->setDataSource(fd, offset, length);
-}
-
-const char* VorbisMetadataRetriever::extractMetadata(int keyCode)
-{
-    LOGV("extractMetadata: key(%d)", keyCode);
-    Mutex::Autolock lock(mLock);
-    if (mVorbisPlayer == 0 || mVorbisPlayer->initCheck() != NO_ERROR) {
-        LOGE("no vorbis player is initialized yet");
-        return NULL;
-    }
-    switch (keyCode) {
-    case METADATA_KEY_DURATION:
-        {
-            if (mMetadataValues[0][0] == '\0') {
-                int duration = -1;
-                if (mVorbisPlayer->getDuration(&duration) != NO_ERROR) {
-                    LOGE("failed to get duration");
-                    return NULL;
-                }
-                snprintf(mMetadataValues[0], MAX_METADATA_STRING_LENGTH, "%d", duration);
-            }
-            LOGV("duration: %s ms", mMetadataValues[0]);
-            return mMetadataValues[0];
-        }
-    default:
-        LOGE("Unsupported key code (%d)", keyCode);
-        return NULL;
-    }
-    return NULL;
-}
-
-};
-
diff --git a/media/libmediaplayerservice/VorbisMetadataRetriever.h b/media/libmediaplayerservice/VorbisMetadataRetriever.h
deleted file mode 100644
index 1c57fe3..0000000
--- a/media/libmediaplayerservice/VorbisMetadataRetriever.h
+++ /dev/null
@@ -1,49 +0,0 @@
-/*
-**
-** Copyright 2009, The Android Open Source Project
-**
-** Licensed under the Apache License, Version 2.0 (the "License");
-** you may not use this file except in compliance with the License.
-** You may obtain a copy of the License at
-**
-**     http://www.apache.org/licenses/LICENSE-2.0
-**
-** Unless required by applicable law or agreed to in writing, software
-** distributed under the License is distributed on an "AS IS" BASIS,
-** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-** See the License for the specific language governing permissions and
-** limitations under the License.
-*/
-
-#ifndef ANDROID_VORBISMETADATARETRIEVER_H
-#define ANDROID_VORBISMETADATARETRIEVER_H
-
-#include <utils/threads.h>
-#include <utils/Errors.h>
-#include <media/MediaMetadataRetrieverInterface.h>
-
-#include "VorbisPlayer.h"
-
-namespace android {
-
-class VorbisMetadataRetriever : public MediaMetadataRetrieverInterface {
-public:
-                                   VorbisMetadataRetriever() {}
-                                   ~VorbisMetadataRetriever() {}
-
-    virtual status_t                setDataSource(const char *url);
-    virtual status_t                setDataSource(int fd, int64_t offset, int64_t length);
-    virtual const char*             extractMetadata(int keyCode);
-
-private:
-    static const uint32_t MAX_METADATA_STRING_LENGTH = 128;
-    void clearMetadataValues();
-
-    Mutex               mLock;
-    sp<VorbisPlayer>    mVorbisPlayer;
-    char                mMetadataValues[1][MAX_METADATA_STRING_LENGTH];
-};
-
-}; // namespace android
-
-#endif // ANDROID_VORBISMETADATARETRIEVER_H
diff --git a/media/libmediaplayerservice/VorbisPlayer.cpp b/media/libmediaplayerservice/VorbisPlayer.cpp
deleted file mode 100644
index 8181999..0000000
--- a/media/libmediaplayerservice/VorbisPlayer.cpp
+++ /dev/null
@@ -1,529 +0,0 @@
-/*
-** Copyright 2007, The Android Open Source Project
-**
-** Licensed under the Apache License, Version 2.0 (the "License");
-** you may not use this file except in compliance with the License.
-** You may obtain a copy of the License at
-**
-**     http://www.apache.org/licenses/LICENSE-2.0
-**
-** Unless required by applicable law or agreed to in writing, software
-** distributed under the License is distributed on an "AS IS" BASIS,
-** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-** See the License for the specific language governing permissions and
-** limitations under the License.
-*/
-
-//#define LOG_NDEBUG 0
-#define LOG_TAG "VorbisPlayer"
-#include "utils/Log.h"
-
-#include <stdio.h>
-#include <assert.h>
-#include <limits.h>
-#include <unistd.h>
-#include <fcntl.h>
-#include <sched.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-
-
-#include "VorbisPlayer.h"
-
-#ifdef HAVE_GETTID
-static pid_t myTid() { return gettid(); }
-#else
-static pid_t myTid() { return getpid(); }
-#endif
-
-// ----------------------------------------------------------------------------
-
-namespace android {
-
-// ----------------------------------------------------------------------------
-
-// TODO: Determine appropriate return codes
-static status_t ERROR_NOT_OPEN = -1;
-static status_t ERROR_OPEN_FAILED = -2;
-static status_t ERROR_ALLOCATE_FAILED = -4;
-static status_t ERROR_NOT_SUPPORTED = -8;
-static status_t ERROR_NOT_READY = -16;
-static status_t STATE_INIT = 0;
-static status_t STATE_ERROR = 1;
-static status_t STATE_OPEN = 2;
-
-
-VorbisPlayer::VorbisPlayer() :
-    mAudioBuffer(NULL), mPlayTime(-1), mDuration(-1), mState(STATE_ERROR),
-    mStreamType(AudioSystem::MUSIC), mLoop(false), mAndroidLoop(false),
-    mExit(false), mPaused(false), mRender(false), mRenderTid(-1)
-{
-    LOGV("constructor\n");
-    memset(&mVorbisFile, 0, sizeof mVorbisFile);
-}
-
-void VorbisPlayer::onFirstRef()
-{
-    LOGV("onFirstRef");
-    // create playback thread
-    Mutex::Autolock l(mMutex);
-    createThreadEtc(renderThread, this, "vorbis decoder", ANDROID_PRIORITY_AUDIO);
-    mCondition.wait(mMutex);
-    if (mRenderTid > 0) {
-        LOGV("render thread(%d) started", mRenderTid);
-        mState = STATE_INIT;
-    }
-}
-
-status_t VorbisPlayer::initCheck()
-{
-    if (mState != STATE_ERROR) return NO_ERROR;
-    return ERROR_NOT_READY;
-}
-
-VorbisPlayer::~VorbisPlayer() {
-    LOGV("VorbisPlayer destructor\n");
-    release();
-}
-
-status_t VorbisPlayer::setDataSource(
-        const char *uri, const KeyedVector<String8, String8> *headers) {
-    return setdatasource(uri, -1, 0, 0x7ffffffffffffffLL); // intentionally less than LONG_MAX
-}
-
-status_t VorbisPlayer::setDataSource(int fd, int64_t offset, int64_t length)
-{
-    return setdatasource(NULL, fd, offset, length);
-}
-
-size_t VorbisPlayer::vp_fread(void *buf, size_t size, size_t nmemb, void *me) {
-    VorbisPlayer *self = (VorbisPlayer*) me;
-
-    long curpos = vp_ftell(me);
-    while (nmemb != 0 && (curpos + size * nmemb) > self->mLength) {
-        nmemb--;
-    }
-    return fread(buf, size, nmemb, self->mFile);
-}
-
-int VorbisPlayer::vp_fseek(void *me, ogg_int64_t off, int whence) {
-    VorbisPlayer *self = (VorbisPlayer*) me;
-    if (whence == SEEK_SET)
-        return fseek(self->mFile, off + self->mOffset, whence);
-    else if (whence == SEEK_CUR)
-        return fseek(self->mFile, off, whence);
-    else if (whence == SEEK_END)
-        return fseek(self->mFile, self->mOffset + self->mLength + off, SEEK_SET);
-    return -1;
-}
-
-int VorbisPlayer::vp_fclose(void *me) {
-    LOGV("vp_fclose");
-    VorbisPlayer *self = (VorbisPlayer*) me;
-    int ret = fclose (self->mFile);
-    self->mFile = NULL;
-    return ret;
-}
-
-long VorbisPlayer::vp_ftell(void *me) {
-    VorbisPlayer *self = (VorbisPlayer*) me;
-    return ftell(self->mFile) - self->mOffset;
-}
-
-status_t VorbisPlayer::setdatasource(const char *path, int fd, int64_t offset, int64_t length)
-{
-    LOGV("setDataSource url=%s, fd=%d\n", path, fd);
-
-    // file still open?
-    Mutex::Autolock l(mMutex);
-    if (mState == STATE_OPEN) {
-        reset_nosync();
-    }
-
-    // open file and set paused state
-    if (path) {
-        mFile = fopen(path, "r");
-    } else {
-        mFile = fdopen(dup(fd), "r");
-    }
-    if (mFile == NULL) {
-        return ERROR_OPEN_FAILED;
-    }
-
-    struct stat sb;
-    int ret;
-    if (path) {
-        ret = stat(path, &sb);
-    } else {
-        ret = fstat(fd, &sb);
-    }
-    if (ret != 0) {
-        mState = STATE_ERROR;
-        fclose(mFile);
-        return ERROR_OPEN_FAILED;
-    }
-    if (sb.st_size > (length + offset)) {
-        mLength = length;
-    } else {
-        mLength = sb.st_size - offset;
-    }
-
-    ov_callbacks callbacks = {
-        (size_t (*)(void *, size_t, size_t, void *))  vp_fread,
-        (int (*)(void *, ogg_int64_t, int))           vp_fseek,
-        (int (*)(void *))                             vp_fclose,
-        (long (*)(void *))                            vp_ftell
-    };
-
-    mOffset = offset;
-    fseek(mFile, offset, SEEK_SET);
-
-    int result = ov_open_callbacks(this, &mVorbisFile, NULL, 0, callbacks);
-    if (result < 0) {
-        LOGE("ov_open() failed: [%d]\n", (int)result);
-        mState = STATE_ERROR;
-        fclose(mFile);
-        return ERROR_OPEN_FAILED;
-    }
-
-    // look for the android loop tag  (for ringtones)
-    char **ptr = ov_comment(&mVorbisFile,-1)->user_comments;
-    while(*ptr) {
-        // does the comment start with ANDROID_LOOP_TAG
-        if(strncmp(*ptr, ANDROID_LOOP_TAG, strlen(ANDROID_LOOP_TAG)) == 0) {
-            // read the value of the tag
-            char *val = *ptr + strlen(ANDROID_LOOP_TAG) + 1;
-            mAndroidLoop = (strncmp(val, "true", 4) == 0);
-        }
-        // we keep parsing even after finding one occurence of ANDROID_LOOP_TAG,
-        // as we could find another one  (the tag might have been appended more than once).
-        ++ptr;
-    }
-    LOGV_IF(mAndroidLoop, "looped sound");
-
-    mState = STATE_OPEN;
-    return NO_ERROR;
-}
-
-status_t VorbisPlayer::prepare()
-{
-    LOGV("prepare\n");
-    if (mState != STATE_OPEN ) {
-        return ERROR_NOT_OPEN;
-    }
-    return NO_ERROR;
-}
-
-status_t VorbisPlayer::prepareAsync() {
-    LOGV("prepareAsync\n");
-    // can't hold the lock here because of the callback
-    // it's safe because we don't change state
-    if (mState != STATE_OPEN ) {
-        sendEvent(MEDIA_ERROR);
-        return NO_ERROR;
-    }
-    sendEvent(MEDIA_PREPARED);
-    return NO_ERROR;
-}
-
-status_t VorbisPlayer::start()
-{
-    LOGV("start\n");
-    Mutex::Autolock l(mMutex);
-    if (mState != STATE_OPEN) {
-        return ERROR_NOT_OPEN;
-    }
-
-    mPaused = false;
-    mRender = true;
-
-    // wake up render thread
-    LOGV("  wakeup render thread\n");
-    mCondition.signal();
-    return NO_ERROR;
-}
-
-status_t VorbisPlayer::stop()
-{
-    LOGV("stop\n");
-    Mutex::Autolock l(mMutex);
-    if (mState != STATE_OPEN) {
-        return ERROR_NOT_OPEN;
-    }
-    mPaused = true;
-    mRender = false;
-    return NO_ERROR;
-}
-
-status_t VorbisPlayer::seekTo(int position)
-{
-    LOGV("seekTo %d\n", position);
-    Mutex::Autolock l(mMutex);
-    if (mState != STATE_OPEN) {
-        return ERROR_NOT_OPEN;
-    }
-
-    int result = ov_time_seek(&mVorbisFile, position);
-    if (result != 0) {
-        LOGE("ov_time_seek() returned %d\n", result);
-        return result;
-    }
-    sendEvent(MEDIA_SEEK_COMPLETE);
-    return NO_ERROR;
-}
-
-status_t VorbisPlayer::pause()
-{
-    LOGV("pause\n");
-    Mutex::Autolock l(mMutex);
-    if (mState != STATE_OPEN) {
-        return ERROR_NOT_OPEN;
-    }
-    mPaused = true;
-    return NO_ERROR;
-}
-
-bool VorbisPlayer::isPlaying()
-{
-    LOGV("isPlaying\n");
-    if (mState == STATE_OPEN) {
-        return mRender;
-    }
-    return false;
-}
-
-status_t VorbisPlayer::getCurrentPosition(int* position)
-{
-    LOGV("getCurrentPosition\n");
-    Mutex::Autolock l(mMutex);
-    if (mState != STATE_OPEN) {
-        LOGE("getCurrentPosition(): file not open");
-        return ERROR_NOT_OPEN;
-    }
-    *position = ov_time_tell(&mVorbisFile);
-    if (*position < 0) {
-        LOGE("getCurrentPosition(): ov_time_tell returned %d", *position);
-        return *position;
-    }
-    return NO_ERROR;
-}
-
-status_t VorbisPlayer::getDuration(int* duration)
-{
-    LOGV("getDuration\n");
-    Mutex::Autolock l(mMutex);
-    if (mState != STATE_OPEN) {
-        return ERROR_NOT_OPEN;
-    }
-
-    int ret = ov_time_total(&mVorbisFile, -1);
-    if (ret == OV_EINVAL) {
-        return -1;
-    }
-
-    *duration = ret;
-    return NO_ERROR;
-}
-
-status_t VorbisPlayer::release()
-{
-    LOGV("release\n");
-    Mutex::Autolock l(mMutex);
-    reset_nosync();
-
-    // TODO: timeout when thread won't exit
-    // wait for render thread to exit
-    if (mRenderTid > 0) {
-        mExit = true;
-        mCondition.signal();
-        mCondition.wait(mMutex);
-    }
-    return NO_ERROR;
-}
-
-status_t VorbisPlayer::reset()
-{
-    LOGV("reset\n");
-    Mutex::Autolock l(mMutex);
-    return reset_nosync();
-}
-
-// always call with lock held
-status_t VorbisPlayer::reset_nosync()
-{
-    // close file
-    if (mFile != NULL) {
-        ov_clear(&mVorbisFile); // this also closes the FILE
-        if (mFile != NULL) {
-            LOGV("OOPS! Vorbis didn't close the file");
-            fclose(mFile);
-            mFile = NULL;
-        }
-    }
-    mState = STATE_ERROR;
-
-    mPlayTime = -1;
-    mDuration = -1;
-    mLoop = false;
-    mAndroidLoop = false;
-    mPaused = false;
-    mRender = false;
-    return NO_ERROR;
-}
-
-status_t VorbisPlayer::setLooping(int loop)
-{
-    LOGV("setLooping\n");
-    Mutex::Autolock l(mMutex);
-    mLoop = (loop != 0);
-    return NO_ERROR;
-}
-
-status_t VorbisPlayer::createOutputTrack() {
-    // open audio track
-    vorbis_info *vi = ov_info(&mVorbisFile, -1);
-
-    LOGV("Create AudioTrack object: rate=%ld, channels=%d\n",
-            vi->rate, vi->channels);
-    if (mAudioSink->open(vi->rate, vi->channels, AudioSystem::PCM_16_BIT, DEFAULT_AUDIOSINK_BUFFERCOUNT) != NO_ERROR) {
-        LOGE("mAudioSink open failed");
-        return ERROR_OPEN_FAILED;
-    }
-    return NO_ERROR;
-}
-
-int VorbisPlayer::renderThread(void* p) {
-    return ((VorbisPlayer*)p)->render();
-}
-
-#define AUDIOBUFFER_SIZE 4096
-
-int VorbisPlayer::render() {
-    int result = -1;
-    int temp;
-    int current_section = 0;
-    bool audioStarted = false;
-
-    LOGV("render\n");
-
-    // allocate render buffer
-    mAudioBuffer = new char[AUDIOBUFFER_SIZE];
-    if (!mAudioBuffer) {
-        LOGE("mAudioBuffer allocate failed\n");
-        goto threadExit;
-    }
-
-    // let main thread know we're ready
-    {
-        Mutex::Autolock l(mMutex);
-        mRenderTid = myTid();
-        mCondition.signal();
-    }
-
-    while (1) {
-        long numread = 0;
-        {
-            Mutex::Autolock l(mMutex);
-
-            // pausing?
-            if (mPaused) {
-                if (mAudioSink->ready()) mAudioSink->pause();
-                mRender = false;
-                audioStarted = false;
-            }
-
-            // nothing to render, wait for client thread to wake us up
-            if (!mExit && !mRender) {
-                LOGV("render - signal wait\n");
-                mCondition.wait(mMutex);
-                LOGV("render - signal rx'd\n");
-            }
-            if (mExit) break;
-
-            // We could end up here if start() is called, and before we get a
-            // chance to run, the app calls stop() or reset(). Re-check render
-            // flag so we don't try to render in stop or reset state.
-            if (!mRender) continue;
-
-            // render vorbis data into the input buffer
-            numread = ov_read(&mVorbisFile, mAudioBuffer, AUDIOBUFFER_SIZE, &current_section);
-            if (numread == 0) {
-                // end of file, do we need to loop?
-                // ...
-                if (mLoop || mAndroidLoop) {
-                    ov_time_seek(&mVorbisFile, 0);
-                    current_section = 0;
-                    numread = ov_read(&mVorbisFile, mAudioBuffer, AUDIOBUFFER_SIZE, &current_section);
-                } else {
-                    mAudioSink->stop();
-                    audioStarted = false;
-                    mRender = false;
-                    mPaused = true;
-                    int endpos = ov_time_tell(&mVorbisFile);
-
-                    LOGV("send MEDIA_PLAYBACK_COMPLETE");
-                    sendEvent(MEDIA_PLAYBACK_COMPLETE);
-
-                    // wait until we're started again
-                    LOGV("playback complete - wait for signal");
-                    mCondition.wait(mMutex);
-                    LOGV("playback complete - signal rx'd");
-                    if (mExit) break;
-
-                    // if we're still at the end, restart from the beginning
-                    if (mState == STATE_OPEN) {
-                        int curpos = ov_time_tell(&mVorbisFile);
-                        if (curpos == endpos) {
-                            ov_time_seek(&mVorbisFile, 0);
-                        }
-                        current_section = 0;
-                        numread = ov_read(&mVorbisFile, mAudioBuffer, AUDIOBUFFER_SIZE, &current_section);
-                    }
-                }
-            }
-        }
-
-        // codec returns negative number on error
-        if (numread < 0) {
-            LOGE("Error in Vorbis decoder");
-            sendEvent(MEDIA_ERROR);
-            break;
-        }
-
-        // create audio output track if necessary
-        if (!mAudioSink->ready()) {
-            LOGV("render - create output track\n");
-            if (createOutputTrack() != NO_ERROR)
-                break;
-        }
-
-        // Write data to the audio hardware
-        if ((temp = mAudioSink->write(mAudioBuffer, numread)) < 0) {
-            LOGE("Error in writing:%d",temp);
-            result = temp;
-            break;
-        }
-
-        // start audio output if necessary
-        if (!audioStarted && !mPaused && !mExit) {
-            LOGV("render - starting audio\n");
-            mAudioSink->start();
-            audioStarted = true;
-        }
-    }
-
-threadExit:
-    mAudioSink.clear();
-    if (mAudioBuffer) {
-        delete [] mAudioBuffer;
-        mAudioBuffer = NULL;
-    }
-
-    // tell main thread goodbye
-    Mutex::Autolock l(mMutex);
-    mRenderTid = -1;
-    mCondition.signal();
-    return result;
-}
-
-} // end namespace android
diff --git a/media/libmediaplayerservice/VorbisPlayer.h b/media/libmediaplayerservice/VorbisPlayer.h
deleted file mode 100644
index 4a50835..0000000
--- a/media/libmediaplayerservice/VorbisPlayer.h
+++ /dev/null
@@ -1,94 +0,0 @@
-/*
-**
-** Copyright 2008, The Android Open Source Project
-**
-** Licensed under the Apache License, Version 2.0 (the "License");
-** you may not use this file except in compliance with the License.
-** You may obtain a copy of the License at
-**
-**     http://www.apache.org/licenses/LICENSE-2.0
-**
-** Unless required by applicable law or agreed to in writing, software
-** distributed under the License is distributed on an "AS IS" BASIS,
-** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-** See the License for the specific language governing permissions and
-** limitations under the License.
-*/
-
-#ifndef ANDROID_VORBISPLAYER_H
-#define ANDROID_VORBISPLAYER_H
-
-#include <utils/threads.h>
-
-#include <media/MediaPlayerInterface.h>
-#include <media/AudioTrack.h>
-
-#include "ivorbiscodec.h"
-#include "ivorbisfile.h"
-
-#define ANDROID_LOOP_TAG "ANDROID_LOOP"
-
-namespace android {
-
-class VorbisPlayer : public MediaPlayerInterface {
-public:
-                        VorbisPlayer();
-                        ~VorbisPlayer();
-
-    virtual void        onFirstRef();
-    virtual status_t    initCheck();
-
-    virtual status_t    setDataSource(
-            const char *uri, const KeyedVector<String8, String8> *headers);
-
-    virtual status_t    setDataSource(int fd, int64_t offset, int64_t length);
-    virtual status_t    setVideoSurface(const sp<ISurface>& surface) { return UNKNOWN_ERROR; }
-    virtual status_t    prepare();
-    virtual status_t    prepareAsync();
-    virtual status_t    start();
-    virtual status_t    stop();
-    virtual status_t    seekTo(int msec);
-    virtual status_t    pause();
-    virtual bool        isPlaying();
-    virtual status_t    getCurrentPosition(int* msec);
-    virtual status_t    getDuration(int* msec);
-    virtual status_t    release();
-    virtual status_t    reset();
-    virtual status_t    setLooping(int loop);
-    virtual player_type playerType() { return VORBIS_PLAYER; }
-    virtual status_t    invoke(const Parcel& request, Parcel *reply) {return INVALID_OPERATION;}
-
-private:
-            status_t    setdatasource(const char *path, int fd, int64_t offset, int64_t length);
-            status_t    reset_nosync();
-            status_t    createOutputTrack();
-    static  int         renderThread(void*);
-            int         render();
-
-    static  size_t      vp_fread(void *, size_t, size_t, void *);
-    static  int         vp_fseek(void *, ogg_int64_t, int);
-    static  int         vp_fclose(void *);
-    static  long        vp_ftell(void *);
-
-    Mutex               mMutex;
-    Condition           mCondition;
-    FILE*               mFile;
-    int64_t             mOffset;
-    int64_t             mLength;
-    OggVorbis_File      mVorbisFile;
-    char*               mAudioBuffer;
-    int                 mPlayTime;
-    int                 mDuration;
-    status_t            mState;
-    int                 mStreamType;
-    bool                mLoop;
-    bool                mAndroidLoop;
-    volatile bool       mExit;
-    bool                mPaused;
-    volatile bool       mRender;
-    pid_t               mRenderTid;
-};
-
-}; // namespace android
-
-#endif // ANDROID_VORBISPLAYER_H
diff --git a/media/libstagefright/AMRWriter.cpp b/media/libstagefright/AMRWriter.cpp
index bf4424b..c71743e 100644
--- a/media/libstagefright/AMRWriter.cpp
+++ b/media/libstagefright/AMRWriter.cpp
@@ -22,19 +22,24 @@
 #include <media/stagefright/MediaErrors.h>
 #include <media/stagefright/MediaSource.h>
 #include <media/stagefright/MetaData.h>
+#include <media/mediarecorder.h>
 
 namespace android {
 
 AMRWriter::AMRWriter(const char *filename)
     : mFile(fopen(filename, "wb")),
       mInitCheck(mFile != NULL ? OK : NO_INIT),
-      mStarted(false) {
+      mStarted(false),
+      mPaused(false),
+      mResumed(false) {
 }
 
 AMRWriter::AMRWriter(int fd)
     : mFile(fdopen(fd, "wb")),
       mInitCheck(mFile != NULL ? OK : NO_INIT),
-      mStarted(false) {
+      mStarted(false),
+      mPaused(false),
+      mResumed(false) {
 }
 
 AMRWriter::~AMRWriter() {
@@ -53,8 +58,6 @@
 }
 
 status_t AMRWriter::addSource(const sp<MediaSource> &source) {
-    Mutex::Autolock autoLock(mLock);
-
     if (mInitCheck != OK) {
         return mInitCheck;
     }
@@ -94,17 +97,24 @@
     return OK;
 }
 
-status_t AMRWriter::start() {
-    Mutex::Autolock autoLock(mLock);
-
+status_t AMRWriter::start(MetaData *params) {
     if (mInitCheck != OK) {
         return mInitCheck;
     }
 
-    if (mStarted || mSource == NULL) {
+    if (mSource == NULL) {
         return UNKNOWN_ERROR;
     }
 
+    if (mStarted && mPaused) {
+        mPaused = false;
+        mResumed = true;
+        return OK;
+    } else if (mStarted) {
+        // Already started, does nothing
+        return OK;
+    }
+
     status_t err = mSource->start();
 
     if (err != OK) {
@@ -126,16 +136,19 @@
     return OK;
 }
 
-void AMRWriter::stop() {
-    {
-        Mutex::Autolock autoLock(mLock);
-
-        if (!mStarted) {
-            return;
-        }
-
-        mDone = true;
+void AMRWriter::pause() {
+    if (!mStarted) {
+        return;
     }
+    mPaused = true;
+}
+
+void AMRWriter::stop() {
+    if (!mStarted) {
+        return;
+    }
+
+    mDone = true;
 
     void *dummy;
     pthread_join(mThread, &dummy);
@@ -145,6 +158,20 @@
     mStarted = false;
 }
 
+bool AMRWriter::exceedsFileSizeLimit() {
+    if (mMaxFileSizeLimitBytes == 0) {
+        return false;
+    }
+    return mEstimatedSizeBytes >= mMaxFileSizeLimitBytes;
+}
+
+bool AMRWriter::exceedsFileDurationLimit() {
+    if (mMaxFileDurationLimitUs == 0) {
+        return false;
+    }
+    return mEstimatedDurationUs >= mMaxFileDurationLimitUs;
+}
+
 // static
 void *AMRWriter::ThreadWrapper(void *me) {
     static_cast<AMRWriter *>(me)->threadFunc();
@@ -153,13 +180,13 @@
 }
 
 void AMRWriter::threadFunc() {
-    for (;;) {
-        Mutex::Autolock autoLock(mLock);
+    mEstimatedDurationUs = 0;
+    mEstimatedSizeBytes = 0;
+    bool stoppedPrematurely = true;
+    int64_t previousPausedDurationUs = 0;
+    int64_t maxTimestampUs = 0;
 
-        if (mDone) {
-            break;
-        }
-
+    while (!mDone) {
         MediaBuffer *buffer;
         status_t err = mSource->read(&buffer);
 
@@ -167,6 +194,42 @@
             break;
         }
 
+        if (mPaused) {
+            buffer->release();
+            buffer = NULL;
+            continue;
+        }
+
+        mEstimatedSizeBytes += buffer->range_length();
+        if (exceedsFileSizeLimit()) {
+            buffer->release();
+            buffer = NULL;
+            notify(MEDIA_RECORDER_EVENT_INFO, MEDIA_RECORDER_INFO_MAX_FILESIZE_REACHED, 0);
+            break;
+        }
+
+        int64_t timestampUs;
+        CHECK(buffer->meta_data()->findInt64(kKeyTime, &timestampUs));
+        if (timestampUs > mEstimatedDurationUs) {
+            mEstimatedDurationUs = timestampUs;
+        }
+        if (mResumed) {
+            previousPausedDurationUs += (timestampUs - maxTimestampUs - 20000);
+            mResumed = false;
+        }
+        timestampUs -= previousPausedDurationUs;
+        LOGV("time stamp: %lld, previous paused duration: %lld",
+                timestampUs, previousPausedDurationUs);
+        if (timestampUs > maxTimestampUs) {
+            maxTimestampUs = timestampUs;
+        }
+
+        if (exceedsFileDurationLimit()) {
+            buffer->release();
+            buffer = NULL;
+            notify(MEDIA_RECORDER_EVENT_INFO, MEDIA_RECORDER_INFO_MAX_DURATION_REACHED, 0);
+            break;
+        }
         ssize_t n = fwrite(
                 (const uint8_t *)buffer->data() + buffer->range_offset(),
                 1,
@@ -180,16 +243,26 @@
             break;
         }
 
+        // XXX: How to tell it is stopped prematurely?
+        if (stoppedPrematurely) {
+            stoppedPrematurely = false;
+        }
+
         buffer->release();
         buffer = NULL;
     }
 
-    Mutex::Autolock autoLock(mLock);
+    if (stoppedPrematurely) {
+        notify(MEDIA_RECORDER_EVENT_INFO, MEDIA_RECORDER_INFO_COMPLETION_STATUS, UNKNOWN_ERROR);
+    }
+
+    fflush(mFile);
+    fclose(mFile);
+    mFile = NULL;
     mReachedEOS = true;
 }
 
 bool AMRWriter::reachedEOS() {
-    Mutex::Autolock autoLock(mLock);
     return mReachedEOS;
 }
 
diff --git a/media/libstagefright/Android.mk b/media/libstagefright/Android.mk
index 81f995b..89bfc1f 100644
--- a/media/libstagefright/Android.mk
+++ b/media/libstagefright/Android.mk
@@ -1,51 +1,46 @@
 LOCAL_PATH:= $(call my-dir)
 include $(CLEAR_VARS)
 
-LOCAL_SRC_FILES:=                 \
-        ESDS.cpp                  \
-        MediaBuffer.cpp           \
-        MediaBufferGroup.cpp      \
-        MediaDefs.cpp             \
-        MediaSource.cpp           \
-        MetaData.cpp              \
-        OMXCodec.cpp              \
-        Utils.cpp                 \
-        OMXClient.cpp
+include frameworks/base/media/libstagefright/codecs/common/Config.mk
 
-ifeq ($(BUILD_WITH_FULL_STAGEFRIGHT),true)
-
-LOCAL_SRC_FILES +=                \
-        AMRExtractor.cpp          \
-        AMRWriter.cpp             \
-        AudioPlayer.cpp           \
-        AudioSource.cpp           \
-        AwesomePlayer.cpp         \
-        CachingDataSource.cpp     \
-        CameraSource.cpp          \
-        DataSource.cpp            \
-        FileSource.cpp            \
-        HTTPDataSource.cpp        \
-        HTTPStream.cpp            \
-        JPEGSource.cpp            \
-        MP3Extractor.cpp          \
-        MPEG4Extractor.cpp        \
-        MPEG4Writer.cpp           \
-        MediaExtractor.cpp        \
-        OggExtractor.cpp          \
-        Prefetcher.cpp            \
-        SampleIterator.cpp        \
-        SampleTable.cpp           \
-        ShoutcastSource.cpp       \
-        StagefrightMediaScanner.cpp \
-        StagefrightMetadataRetriever.cpp \
-        TimeSource.cpp            \
-        TimedEventQueue.cpp       \
-        WAVExtractor.cpp          \
+LOCAL_SRC_FILES:=                         \
+        AMRExtractor.cpp                  \
+        AMRWriter.cpp                     \
+        AudioPlayer.cpp                   \
+        AudioSource.cpp                   \
+        AwesomePlayer.cpp                 \
+        CameraSource.cpp                  \
+        DataSource.cpp                    \
+        ESDS.cpp                          \
+        FileSource.cpp                    \
+        HTTPStream.cpp                    \
+        JPEGSource.cpp                    \
+        MP3Extractor.cpp                  \
+        MPEG4Extractor.cpp                \
+        MPEG4Writer.cpp                   \
+        MediaBuffer.cpp                   \
+        MediaBufferGroup.cpp              \
+        MediaDefs.cpp                     \
+        MediaExtractor.cpp                \
+        MediaSource.cpp                   \
+        MetaData.cpp                      \
+        NuCachedSource2.cpp               \
+        NuHTTPDataSource.cpp              \
+        OMXClient.cpp                     \
+        OMXCodec.cpp                      \
+        OggExtractor.cpp                  \
+        SampleIterator.cpp                \
+        SampleTable.cpp                   \
+        ShoutcastSource.cpp               \
+        StagefrightMediaScanner.cpp       \
+        StagefrightMetadataRetriever.cpp  \
+        ThrottledSource.cpp               \
+        TimeSource.cpp                    \
+        TimedEventQueue.cpp               \
+        Utils.cpp                         \
+        WAVExtractor.cpp                  \
         string.cpp
 
-LOCAL_CFLAGS += -DBUILD_WITH_FULL_STAGEFRIGHT
-endif
-
 LOCAL_C_INCLUDES:= \
 	$(JNI_H_INCLUDE) \
         $(TOP)/external/opencore/extern_libs_v2/khronos/openmax/include \
@@ -65,24 +60,30 @@
 
 LOCAL_STATIC_LIBRARIES := \
         libstagefright_aacdec \
+        libstagefright_aacenc \
         libstagefright_amrnbdec \
         libstagefright_amrnbenc \
         libstagefright_amrwbdec \
+        libstagefright_amrwbenc \
         libstagefright_avcdec \
+        libstagefright_avcenc \
         libstagefright_m4vh263dec \
+        libstagefright_m4vh263enc \
         libstagefright_mp3dec \
-        libstagefright_vorbisdec
+        libstagefright_vorbisdec \
+        libstagefright_matroska \
+        libstagefright_vpxdec \
+        libvpx \
+        libstagefright_mpeg2ts \
+        libstagefright_httplive \
+        libstagefright_rtsp \
+        libstagefright_id3 \
 
 LOCAL_SHARED_LIBRARIES += \
         libstagefright_amrnb_common \
-        libstagefright_avc_common
-
-ifeq ($(BUILD_WITH_FULL_STAGEFRIGHT),true)
-
-LOCAL_STATIC_LIBRARIES += \
-        libstagefright_id3
-
-LOCAL_SHARED_LIBRARIES += \
+        libstagefright_enc_common \
+        libstagefright_avc_common \
+        libstagefright_foundation \
         libstagefright_color_conversion
 
 ifeq ($(TARGET_OS)-$(TARGET_SIMULATOR),linux-true)
@@ -95,8 +96,6 @@
 LOCAL_SHARED_LIBRARIES += libdl
 endif
 
-endif
-
 ifeq ($(TARGET_OS)-$(TARGET_SIMULATOR),linux-true)
         LOCAL_LDLIBS += -lpthread
 endif
diff --git a/media/libstagefright/AudioPlayer.cpp b/media/libstagefright/AudioPlayer.cpp
index bcf2463..b79ba13 100644
--- a/media/libstagefright/AudioPlayer.cpp
+++ b/media/libstagefright/AudioPlayer.cpp
@@ -87,7 +87,9 @@
                 DEFAULT_AUDIOSINK_BUFFERCOUNT,
                 &AudioPlayer::AudioSinkCallback, this);
         if (err != OK) {
-            mSource->stop();
+            if (!sourceAlreadyStarted) {
+                mSource->stop();
+            }
 
             return err;
         }
@@ -108,7 +110,9 @@
             delete mAudioTrack;
             mAudioTrack = NULL;
 
-            mSource->stop();
+            if (!sourceAlreadyStarted) {
+                mSource->stop();
+            }
 
             return err;
         }
diff --git a/media/libstagefright/AudioSource.cpp b/media/libstagefright/AudioSource.cpp
index edabaf9..6031797 100644
--- a/media/libstagefright/AudioSource.cpp
+++ b/media/libstagefright/AudioSource.cpp
@@ -14,6 +14,10 @@
  * limitations under the License.
  */
 
+//#define LOG_NDEBUG 0
+#define LOG_TAG "AudioSource"
+#include <utils/Log.h>
+
 #include <media/stagefright/AudioSource.h>
 
 #include <media/AudioRecord.h>
@@ -21,16 +25,33 @@
 #include <media/stagefright/MediaDebug.h>
 #include <media/stagefright/MediaDefs.h>
 #include <media/stagefright/MetaData.h>
+#include <cutils/properties.h>
+#include <sys/time.h>
+#include <time.h>
 
 namespace android {
 
 AudioSource::AudioSource(
         int inputSource, uint32_t sampleRate, uint32_t channels)
-    : mRecord(new AudioRecord(
-                inputSource, sampleRate, AudioSystem::PCM_16_BIT, channels)),
-      mInitCheck(mRecord->initCheck()),
-      mStarted(false),
+    : mStarted(false),
+      mCollectStats(false),
+      mTotalReadTimeUs(0),
+      mTotalReadBytes(0),
+      mTotalReads(0),
       mGroup(NULL) {
+
+    LOGV("sampleRate: %d, channels: %d", sampleRate, channels);
+    uint32_t flags = AudioRecord::RECORD_AGC_ENABLE |
+                     AudioRecord::RECORD_NS_ENABLE  |
+                     AudioRecord::RECORD_IIR_ENABLE;
+
+    mRecord = new AudioRecord(
+                inputSource, sampleRate, AudioSystem::PCM_16_BIT,
+                channels > 1? AudioSystem::CHANNEL_IN_STEREO: AudioSystem::CHANNEL_IN_MONO,
+                4 * kMaxBufferSize / sizeof(int16_t), /* Enable ping-pong buffers */
+                flags);
+
+    mInitCheck = mRecord->initCheck();
 }
 
 AudioSource::~AudioSource() {
@@ -51,6 +72,19 @@
         return UNKNOWN_ERROR;
     }
 
+    char value[PROPERTY_VALUE_MAX];
+    if (property_get("media.stagefright.record-stats", value, NULL)
+        && (!strcmp(value, "1") || !strcasecmp(value, "true"))) {
+        mCollectStats = true;
+    }
+
+    mTrackMaxAmplitude = false;
+    mMaxAmplitude = 0;
+    mStartTimeUs = 0;
+    int64_t startTimeUs;
+    if (params && params->findInt64(kKeyTime, &startTimeUs)) {
+        mStartTimeUs = startTimeUs;
+    }
     status_t err = mRecord->start();
 
     if (err == OK) {
@@ -75,6 +109,13 @@
 
     mStarted = false;
 
+    if (mCollectStats) {
+        LOGI("%lld reads: %.2f bps in %lld us",
+                mTotalReads,
+                (mTotalReadBytes * 8000000.0) / mTotalReadTimeUs,
+                mTotalReadTimeUs);
+    }
+
     return OK;
 }
 
@@ -91,19 +132,36 @@
 status_t AudioSource::read(
         MediaBuffer **out, const ReadOptions *options) {
     *out = NULL;
+    ++mTotalReads;
 
     MediaBuffer *buffer;
     CHECK_EQ(mGroup->acquire_buffer(&buffer), OK);
 
     uint32_t numFramesRecorded;
     mRecord->getPosition(&numFramesRecorded);
+    int64_t latency = mRecord->latency() * 1000;
 
-    buffer->meta_data()->setInt64(
-            kKeyTime,
-            (1000000ll * numFramesRecorded) / mRecord->getSampleRate()
-            - mRecord->latency() * 1000);
+    int64_t readTime = systemTime() / 1000;
+    if (numFramesRecorded == 0) {
+        // Initial delay
+        if (mStartTimeUs > 0) {
+            mStartTimeUs = readTime - mStartTimeUs;
+        } else {
+            mStartTimeUs += latency;
+        }
+    }
 
-    ssize_t n = mRecord->read(buffer->data(), buffer->size());
+    ssize_t n = 0;
+    if (mCollectStats) {
+        n = mRecord->read(buffer->data(), buffer->size());
+        int64_t endTime = systemTime() / 1000;
+        mTotalReadTimeUs += (endTime - readTime);
+        if (n >= 0) {
+            mTotalReadBytes += n;
+        }
+    } else {
+        n = mRecord->read(buffer->data(), buffer->size());
+    }
 
     if (n < 0) {
         buffer->release();
@@ -112,6 +170,16 @@
         return (status_t)n;
     }
 
+    if (mTrackMaxAmplitude) {
+        trackMaxAmplitude((int16_t *) buffer->data(), n >> 1);
+    }
+
+    uint32_t sampleRate = mRecord->getSampleRate();
+    int64_t timestampUs = (1000000LL * numFramesRecorded) / sampleRate + mStartTimeUs;
+    buffer->meta_data()->setInt64(kKeyTime, timestampUs);
+    LOGV("initial delay: %lld, sample rate: %d, timestamp: %lld",
+            mStartTimeUs, sampleRate, timestampUs);
+
     buffer->set_range(0, n);
 
     *out = buffer;
@@ -119,4 +187,27 @@
     return OK;
 }
 
+void AudioSource::trackMaxAmplitude(int16_t *data, int nSamples) {
+    for (int i = nSamples; i > 0; --i) {
+        int16_t value = *data++;
+        if (value < 0) {
+            value = -value;
+        }
+        if (mMaxAmplitude < value) {
+            mMaxAmplitude = value;
+        }
+    }
+}
+
+int16_t AudioSource::getMaxAmplitude() {
+    // First call activates the tracking.
+    if (!mTrackMaxAmplitude) {
+        mTrackMaxAmplitude = true;
+    }
+    int16_t value = mMaxAmplitude;
+    mMaxAmplitude = 0;
+    LOGV("max amplitude since last call: %d", value);
+    return value;
+}
+
 }  // namespace android
diff --git a/media/libstagefright/AwesomePlayer.cpp b/media/libstagefright/AwesomePlayer.cpp
index 274dad9..ffed74f 100644
--- a/media/libstagefright/AwesomePlayer.cpp
+++ b/media/libstagefright/AwesomePlayer.cpp
@@ -20,13 +20,15 @@
 
 #include <dlfcn.h>
 
+#include "include/ARTSPController.h"
 #include "include/AwesomePlayer.h"
-#include "include/Prefetcher.h"
+#include "include/LiveSource.h"
 #include "include/SoftwareRenderer.h"
+#include "include/NuCachedSource2.h"
+#include "include/ThrottledSource.h"
 
 #include <binder/IPCThreadState.h>
 #include <media/stagefright/AudioPlayer.h>
-#include <media/stagefright/CachingDataSource.h>
 #include <media/stagefright/DataSource.h>
 #include <media/stagefright/FileSource.h>
 #include <media/stagefright/MediaBuffer.h>
@@ -39,6 +41,8 @@
 
 #include <surfaceflinger/ISurface.h>
 
+#include <media/stagefright/foundation/ALooper.h>
+
 namespace android {
 
 struct AwesomeEvent : public TimedEventQueue::Event {
@@ -261,6 +265,16 @@
 
 status_t AwesomePlayer::setDataSource(
         int fd, int64_t offset, int64_t length) {
+#if 0
+    // return setDataSource("httplive://iphoned5.akamai.com.edgesuite.net/mhbarron/nasatv/nasatv_96.m3u8");
+    // return setDataSource("httplive://iphoned5.akamai.com.edgesuite.net/mhbarron/nasatv/nasatv_1500.m3u8");
+    return setDataSource("httplive://iphone.video.hsn.com/iPhone_high.m3u8");
+    // return setDataSource("httplive://iphoned5.akamai.com.edgesuite.net/mhbarron/iphonewebcast/webcast090209_all/webcast090209_all.m3u8");
+    // return setDataSource("httplive://qthttp.akamai.com.edgesuite.net/iphone_demo/Video_Content/usat/tt_062209_iphone/hi/prog_index.m3u8");
+    // return setDataSource("httplive://qthttp.akamai.com.edgesuite.net/iphone_demo/Video_Content/usat/tt_googmaps/hi/prog_index.m3u8");
+    // return setDataSource("httplive://qthttp.akamai.com.edgesuite.net/iphone_demo/Video_Content/mtv/ni_spo_25a_rt74137_clip_syn/hi/prog_index.m3u8");
+#endif
+
     Mutex::Autolock autoLock(mLock);
 
     reset_l();
@@ -340,11 +354,7 @@
 
     cancelPlayerEvents();
 
-    if (mPrefetcher != NULL) {
-        CHECK_EQ(mPrefetcher->getStrongCount(), 1);
-    }
-    mPrefetcher.clear();
-
+    mCachedSource.clear();
     mAudioTrack.clear();
     mVideoTrack.clear();
 
@@ -361,9 +371,6 @@
     }
     mAudioSource.clear();
 
-    if (mTimeSource != mAudioPlayer) {
-        delete mTimeSource;
-    }
     mTimeSource = NULL;
 
     delete mAudioPlayer;
@@ -381,6 +388,8 @@
         mVideoBuffer = NULL;
     }
 
+    mRTSPController.clear();
+
     if (mVideoSource != NULL) {
         mVideoSource->stop();
 
@@ -432,29 +441,45 @@
     }
     mBufferingEventPending = false;
 
-    int64_t durationUs;
-    {
-        Mutex::Autolock autoLock(mMiscStateLock);
-        durationUs = mDurationUs;
+    if (mCachedSource == NULL) {
+        return;
     }
 
-    if (durationUs >= 0) {
-        int64_t cachedDurationUs = mPrefetcher->getCachedDurationUs();
+    size_t lowWatermark = 400000;
+    size_t highWatermark = 1000000;
 
-        LOGV("cache holds %.2f secs worth of data.", cachedDurationUs / 1E6);
+    off_t size;
+    if (mDurationUs >= 0 && mCachedSource->getSize(&size) == OK) {
+        int64_t bitrate = size * 8000000ll / mDurationUs;  // in bits/sec
 
-        int64_t positionUs;
-        getPosition(&positionUs);
+        size_t cachedSize = mCachedSource->cachedSize();
+        int64_t cachedDurationUs = cachedSize * 8000000ll / bitrate;
 
-        cachedDurationUs += positionUs;
+        double percentage = (double)cachedDurationUs / mDurationUs;
 
-        double percentage = (double)cachedDurationUs / durationUs;
         notifyListener_l(MEDIA_BUFFERING_UPDATE, percentage * 100.0);
 
-        postBufferingEvent_l();
-    } else {
-        LOGE("Not sending buffering status because duration is unknown.");
+        lowWatermark = 2 * bitrate / 8;  // 2 secs
+        highWatermark = 10 * bitrate / 8;  // 10 secs
     }
+
+    bool eos;
+    size_t cachedDataRemaining = mCachedSource->approxDataRemaining(&eos);
+
+    if ((mFlags & PLAYING) && !eos && (cachedDataRemaining < lowWatermark)) {
+        LOGI("cache is running low (< %d) , pausing.", lowWatermark);
+        mFlags |= CACHE_UNDERRUN;
+        pause_l();
+        notifyListener_l(MEDIA_INFO, MEDIA_INFO_BUFFERING_START);
+    } else if ((mFlags & CACHE_UNDERRUN)
+            && (eos || cachedDataRemaining > highWatermark)) {
+        LOGI("cache has filled up (> %d), resuming.", highWatermark);
+        mFlags &= ~CACHE_UNDERRUN;
+        play_l();
+        notifyListener_l(MEDIA_INFO, MEDIA_INFO_BUFFERING_END);
+    }
+
+    postBufferingEvent_l();
 }
 
 void AwesomePlayer::onStreamDone() {
@@ -466,22 +491,35 @@
     }
     mStreamDoneEventPending = false;
 
-    if (mStreamDoneStatus == ERROR_END_OF_STREAM && (mFlags & LOOPING)) {
+    if (mStreamDoneStatus != ERROR_END_OF_STREAM) {
+        LOGV("MEDIA_ERROR %d", mStreamDoneStatus);
+
+        notifyListener_l(
+                MEDIA_ERROR, MEDIA_ERROR_UNKNOWN, mStreamDoneStatus);
+
+        pause_l();
+
+        mFlags |= AT_EOS;
+        return;
+    }
+
+    const bool allDone =
+        (mVideoSource == NULL || (mFlags & VIDEO_AT_EOS))
+            && (mAudioSource == NULL || (mFlags & AUDIO_AT_EOS));
+
+    if (!allDone) {
+        return;
+    }
+
+    if (mFlags & LOOPING) {
         seekTo_l(0);
 
         if (mVideoSource != NULL) {
             postVideoEvent_l();
         }
     } else {
-        if (mStreamDoneStatus == ERROR_END_OF_STREAM) {
-            LOGV("MEDIA_PLAYBACK_COMPLETE");
-            notifyListener_l(MEDIA_PLAYBACK_COMPLETE);
-        } else {
-            LOGV("MEDIA_ERROR %d", mStreamDoneStatus);
-
-            notifyListener_l(
-                    MEDIA_ERROR, MEDIA_ERROR_UNKNOWN, mStreamDoneStatus);
-        }
+        LOGV("MEDIA_PLAYBACK_COMPLETE");
+        notifyListener_l(MEDIA_PLAYBACK_COMPLETE);
 
         pause_l();
 
@@ -491,6 +529,9 @@
 
 status_t AwesomePlayer::play() {
     Mutex::Autolock autoLock(mLock);
+
+    mFlags &= ~CACHE_UNDERRUN;
+
     return play_l();
 }
 
@@ -532,7 +573,6 @@
                     return err;
                 }
 
-                delete mTimeSource;
                 mTimeSource = mAudioPlayer;
 
                 deferredAudioSeek = true;
@@ -548,7 +588,7 @@
     }
 
     if (mTimeSource == NULL && mAudioPlayer == NULL) {
-        mTimeSource = new SystemTimeSource;
+        mTimeSource = &mSystemTimeSource;
     }
 
     if (mVideoSource != NULL) {
@@ -615,6 +655,9 @@
 
 status_t AwesomePlayer::pause() {
     Mutex::Autolock autoLock(mLock);
+
+    mFlags &= ~CACHE_UNDERRUN;
+
     return pause_l();
 }
 
@@ -635,7 +678,7 @@
 }
 
 bool AwesomePlayer::isPlaying() const {
-    return mFlags & PLAYING;
+    return (mFlags & PLAYING) || (mFlags & CACHE_UNDERRUN);
 }
 
 void AwesomePlayer::setISurface(const sp<ISurface> &isurface) {
@@ -702,10 +745,15 @@
 }
 
 status_t AwesomePlayer::seekTo_l(int64_t timeUs) {
+    if (mFlags & CACHE_UNDERRUN) {
+        mFlags &= ~CACHE_UNDERRUN;
+        play_l();
+    }
+
     mSeeking = true;
     mSeekNotificationSent = false;
     mSeekTimeUs = timeUs;
-    mFlags &= ~AT_EOS;
+    mFlags &= ~(AT_EOS | AUDIO_AT_EOS | VIDEO_AT_EOS);
 
     seekAudioIfNecessary_l();
 
@@ -747,10 +795,6 @@
 void AwesomePlayer::setAudioSource(sp<MediaSource> source) {
     CHECK(source != NULL);
 
-    if (mPrefetcher != NULL) {
-        source = mPrefetcher->addSource(source);
-    }
-
     mAudioTrack = source;
 }
 
@@ -797,10 +841,6 @@
 void AwesomePlayer::setVideoSource(sp<MediaSource> source) {
     CHECK(source != NULL);
 
-    if (mPrefetcher != NULL) {
-        source = mPrefetcher->addSource(source);
-    }
-
     mVideoTrack = source;
 }
 
@@ -852,6 +892,21 @@
             mVideoBuffer->release();
             mVideoBuffer = NULL;
         }
+
+        if (mCachedSource != NULL && mAudioSource != NULL) {
+            // We're going to seek the video source first, followed by
+            // the audio source.
+            // In order to avoid jumps in the DataSource offset caused by
+            // the audio codec prefetching data from the old locations
+            // while the video codec is already reading data from the new
+            // locations, we'll "pause" the audio source, causing it to
+            // stop reading input data until a subsequent seek.
+
+            if (mAudioPlayer != NULL) {
+                mAudioPlayer->pause();
+            }
+            mAudioSource->pause();
+        }
     }
 
     if (!mVideoBuffer) {
@@ -878,6 +933,7 @@
                     continue;
                 }
 
+                mFlags |= VIDEO_AT_EOS;
                 postStreamDoneEvent_l(err);
                 return;
             }
@@ -908,6 +964,7 @@
             LOGV("seeking audio to %lld us (%.2f secs).", timeUs, timeUs / 1E6);
 
             mAudioPlayer->seekTo(timeUs);
+            mAudioPlayer->resume();
             mWatchForAudioSeekComplete = true;
             mWatchForAudioEOS = true;
         } else if (!mSeekNotificationSent) {
@@ -921,19 +978,21 @@
         mSeekNotificationSent = false;
     }
 
+    TimeSource *ts = (mFlags & AUDIO_AT_EOS) ? &mSystemTimeSource : mTimeSource;
+
     if (mFlags & FIRST_FRAME) {
         mFlags &= ~FIRST_FRAME;
 
-        mTimeSourceDeltaUs = mTimeSource->getRealTimeUs() - timeUs;
+        mTimeSourceDeltaUs = ts->getRealTimeUs() - timeUs;
     }
 
     int64_t realTimeUs, mediaTimeUs;
-    if (mAudioPlayer != NULL
+    if (!(mFlags & AUDIO_AT_EOS) && mAudioPlayer != NULL
         && mAudioPlayer->getMediaTimeMapping(&realTimeUs, &mediaTimeUs)) {
         mTimeSourceDeltaUs = realTimeUs - mediaTimeUs;
     }
 
-    int64_t nowUs = mTimeSource->getRealTimeUs() - mTimeSourceDeltaUs;
+    int64_t nowUs = ts->getRealTimeUs() - mTimeSourceDeltaUs;
 
     int64_t latenessUs = nowUs - timeUs;
 
@@ -995,10 +1054,6 @@
 }
 
 void AwesomePlayer::postBufferingEvent_l() {
-    if (mPrefetcher == NULL) {
-        return;
-    }
-
     if (mBufferingEventPending) {
         return;
     }
@@ -1038,6 +1093,8 @@
     status_t finalStatus;
     if (mWatchForAudioEOS && mAudioPlayer->reachedEOS(&finalStatus)) {
         mWatchForAudioEOS = false;
+        mFlags |= AUDIO_AT_EOS;
+        mFlags |= FIRST_FRAME;
         postStreamDoneEvent_l(finalStatus);
     }
 
@@ -1106,10 +1163,10 @@
     sp<DataSource> dataSource;
 
     if (!strncasecmp("http://", mUri.string(), 7)) {
-        mConnectingDataSource = new HTTPDataSource(mUri, &mUriHeaders);
+        mConnectingDataSource = new NuHTTPDataSource;
 
         mLock.unlock();
-        status_t err = mConnectingDataSource->connect();
+        status_t err = mConnectingDataSource->connect(mUri, &mUriHeaders);
         mLock.lock();
 
         if (err != OK) {
@@ -1119,10 +1176,46 @@
             return err;
         }
 
-        dataSource = new CachingDataSource(
-                mConnectingDataSource, 64 * 1024, 10);
-
+#if 0
+        mCachedSource = new NuCachedSource2(
+                new ThrottledSource(
+                    mConnectingDataSource, 50 * 1024 /* bytes/sec */));
+#else
+        mCachedSource = new NuCachedSource2(mConnectingDataSource);
+#endif
         mConnectingDataSource.clear();
+
+        dataSource = mCachedSource;
+    } else if (!strncasecmp(mUri.string(), "httplive://", 11)) {
+        String8 uri("http://");
+        uri.append(mUri.string() + 11);
+
+        dataSource = new LiveSource(uri.string());
+
+        mCachedSource = new NuCachedSource2(dataSource);
+        dataSource = mCachedSource;
+
+        sp<MediaExtractor> extractor =
+            MediaExtractor::Create(dataSource, MEDIA_MIMETYPE_CONTAINER_MPEG2TS);
+
+        return setDataSource_l(extractor);
+    } else if (!strncasecmp("rtsp://", mUri.string(), 7)) {
+        if (mLooper == NULL) {
+            mLooper = new ALooper;
+            mLooper->start();
+        }
+        mRTSPController = new ARTSPController(mLooper);
+        status_t err = mRTSPController->connect(mUri.string());
+
+        LOGI("ARTSPController::connect returned %d", err);
+
+        if (err != OK) {
+            mRTSPController.clear();
+            return err;
+        }
+
+        sp<MediaExtractor> extractor = mRTSPController.get();
+        return setDataSource_l(extractor);
     } else {
         dataSource = DataSource::CreateFromURI(mUri.string(), &mUriHeaders);
     }
@@ -1137,10 +1230,6 @@
         return UNKNOWN_ERROR;
     }
 
-    if (dataSource->flags() & DataSource::kWantsPrefetching) {
-        mPrefetcher = new Prefetcher;
-    }
-
     return setDataSource_l(extractor);
 }
 
@@ -1165,8 +1254,6 @@
 }
 
 void AwesomePlayer::onPrepareAsyncEvent() {
-    sp<Prefetcher> prefetcher;
-
     {
         Mutex::Autolock autoLock(mLock);
 
@@ -1202,39 +1289,6 @@
                 return;
             }
         }
-
-        prefetcher = mPrefetcher;
-    }
-
-    if (prefetcher != NULL) {
-        {
-            Mutex::Autolock autoLock(mLock);
-            if (mFlags & PREPARE_CANCELLED) {
-                LOGI("prepare was cancelled before preparing the prefetcher");
-
-                prefetcher.clear();
-                abortPrepare(UNKNOWN_ERROR);
-                return;
-            }
-        }
-
-        LOGI("calling prefetcher->prepare()");
-        status_t result =
-            prefetcher->prepare(&AwesomePlayer::ContinuePreparation, this);
-
-        prefetcher.clear();
-
-        if (result == OK) {
-            LOGI("prefetcher is done preparing");
-        } else {
-            Mutex::Autolock autoLock(mLock);
-
-            CHECK_EQ(result, -EINTR);
-
-            LOGI("prefetcher->prepare() was cancelled early.");
-            abortPrepare(UNKNOWN_ERROR);
-            return;
-        }
     }
 
     Mutex::Autolock autoLock(mLock);
diff --git a/media/libstagefright/CachingDataSource.cpp b/media/libstagefright/CachingDataSource.cpp
deleted file mode 100644
index 1ca463e..0000000
--- a/media/libstagefright/CachingDataSource.cpp
+++ /dev/null
@@ -1,165 +0,0 @@
-/*
- * Copyright (C) 2009 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#include <stdlib.h>
-#include <string.h>
-
-#include <media/stagefright/CachingDataSource.h>
-#include <media/stagefright/MediaDebug.h>
-
-namespace android {
-
-CachingDataSource::CachingDataSource(
-        const sp<DataSource> &source, size_t pageSize, int numPages)
-    : mSource(source),
-      mData(malloc(pageSize * numPages)),
-      mPageSize(pageSize),
-      mFirst(NULL),
-      mLast(NULL) {
-    for (int i = 0; i < numPages; ++i) {
-        Page *page = new Page;
-        page->mPrev = mLast;
-        page->mNext = NULL;
-
-        if (mLast == NULL) {
-            mFirst = page;
-        } else {
-            mLast->mNext = page;
-        }
-
-        mLast = page;
-
-        page->mOffset = -1;
-        page->mLength = 0;
-        page->mData = (char *)mData + mPageSize * i;
-    }
-}
-
-CachingDataSource::~CachingDataSource() {
-    Page *page = mFirst;
-    while (page != NULL) {
-        Page *next = page->mNext;
-        delete page;
-        page = next;
-    }
-    mFirst = mLast = NULL;
-
-    free(mData);
-    mData = NULL;
-}
-
-status_t CachingDataSource::initCheck() const {
-    return mSource->initCheck();
-}
-
-status_t CachingDataSource::getSize(off_t *size) {
-    return mSource->getSize(size);
-}
-
-uint32_t CachingDataSource::flags() {
-    return mSource->flags();
-}
-
-ssize_t CachingDataSource::readAt(off_t offset, void *data, size_t size) {
-    Mutex::Autolock autoLock(mLock);
-
-    size_t total = 0;
-    while (size > 0) {
-        Page *page = mFirst;
-        while (page != NULL) {
-            if (page->mOffset >= 0 && offset >= page->mOffset
-                && offset < page->mOffset + (off_t)page->mLength) {
-                break;
-            }
-            page = page->mNext;
-        }
-
-        if (page == NULL) {
-            page = allocate_page();
-            page->mOffset = offset - offset % mPageSize;
-            ssize_t n = mSource->readAt(page->mOffset, page->mData, mPageSize);
-            if (n < 0) {
-                page->mLength = 0;
-            } else {
-                page->mLength = (size_t)n;
-            }
-            mFirst->mPrev = page;
-            page->mNext = mFirst;
-            page->mPrev = NULL;
-            mFirst = page;
-
-            if (n < 0) {
-                return n;
-            }
-
-            if (offset >= page->mOffset + (off_t)page->mLength) {
-                break;
-            }
-        } else {
-            // Move "page" to the front in LRU order.
-            if (page->mNext != NULL) {
-                page->mNext->mPrev = page->mPrev;
-            } else {
-                mLast = page->mPrev;
-            }
-
-            if (page->mPrev != NULL) {
-                page->mPrev->mNext = page->mNext;
-            } else {
-                mFirst = page->mNext;
-            }
-
-            mFirst->mPrev = page;
-            page->mNext = mFirst;
-            page->mPrev = NULL;
-            mFirst = page;
-        }
-
-        size_t copy = page->mLength - (offset - page->mOffset);
-        if (copy > size) {
-            copy = size;
-        }
-        memcpy(data,(const char *)page->mData + (offset - page->mOffset),
-               copy);
-
-        total += copy;
-
-        if (page->mLength < mPageSize) {
-            // This was the final page. There is no more data beyond it.
-            break;
-        }
-
-        offset += copy;
-        size -= copy;
-        data = (char *)data + copy;
-    }
-
-    return total;
-}
-
-CachingDataSource::Page *CachingDataSource::allocate_page() {
-    // The last page is the least recently used, i.e. oldest.
-
-    Page *page = mLast;
-
-    page->mPrev->mNext = NULL;
-    mLast = page->mPrev;
-    page->mPrev = NULL;
-
-    return page;
-}
-
-}  // namespace android
diff --git a/media/libstagefright/CameraSource.cpp b/media/libstagefright/CameraSource.cpp
index 075b1e3..6f4c980 100644
--- a/media/libstagefright/CameraSource.cpp
+++ b/media/libstagefright/CameraSource.cpp
@@ -14,12 +14,12 @@
  * limitations under the License.
  */
 
-#include <sys/time.h>
+//#define LOG_NDEBUG 0
+#define LOG_TAG "CameraSource"
+#include <utils/Log.h>
 
 #include <OMX_Component.h>
-
-#include <binder/IServiceManager.h>
-#include <cutils/properties.h> // for property_get
+#include <binder/IPCThreadState.h>
 #include <media/stagefright/CameraSource.h>
 #include <media/stagefright/MediaDebug.h>
 #include <media/stagefright/MediaDefs.h>
@@ -27,46 +27,11 @@
 #include <media/stagefright/MetaData.h>
 #include <camera/Camera.h>
 #include <camera/CameraParameters.h>
-#include <ui/GraphicBuffer.h>
-#include <ui/Overlay.h>
-#include <surfaceflinger/ISurface.h>
 #include <utils/String8.h>
+#include <cutils/properties.h>
 
 namespace android {
 
-static int64_t getNowUs() {
-    struct timeval tv;
-    gettimeofday(&tv, NULL);
-
-    return (int64_t)tv.tv_usec + tv.tv_sec * 1000000;
-}
-
-struct DummySurface : public BnSurface {
-    DummySurface() {}
-
-    virtual sp<GraphicBuffer> requestBuffer(int bufferIdx, int usage) {
-        return NULL;
-    }
-
-    virtual status_t registerBuffers(const BufferHeap &buffers) {
-        return OK;
-    }
-
-    virtual void postBuffer(ssize_t offset) {}
-    virtual void unregisterBuffers() {}
-
-    virtual sp<OverlayRef> createOverlay(
-            uint32_t w, uint32_t h, int32_t format, int32_t orientation) {
-        return NULL;
-    }
-
-protected:
-    virtual ~DummySurface() {}
-
-    DummySurface(const DummySurface &);
-    DummySurface &operator=(const DummySurface &);
-};
-
 struct CameraSourceListener : public CameraListener {
     CameraSourceListener(const sp<CameraSource> &source);
 
@@ -100,22 +65,40 @@
 void CameraSourceListener::postData(int32_t msgType, const sp<IMemory> &dataPtr) {
     LOGV("postData(%d, ptr:%p, size:%d)",
          msgType, dataPtr->pointer(), dataPtr->size());
-
-    sp<CameraSource> source = mSource.promote();
-    if (source.get() != NULL) {
-        source->dataCallback(msgType, dataPtr);
-    }
 }
 
 void CameraSourceListener::postDataTimestamp(
         nsecs_t timestamp, int32_t msgType, const sp<IMemory>& dataPtr) {
-    LOGV("postDataTimestamp(%lld, %d, ptr:%p, size:%d)",
-         timestamp, msgType, dataPtr->pointer(), dataPtr->size());
+
+    sp<CameraSource> source = mSource.promote();
+    if (source.get() != NULL) {
+        source->dataCallbackTimestamp(timestamp/1000, msgType, dataPtr);
+    }
+}
+
+static int32_t getColorFormat(const char* colorFormat) {
+    if (!strcmp(colorFormat, CameraParameters::PIXEL_FORMAT_YUV422SP)) {
+       return OMX_COLOR_FormatYUV422SemiPlanar;
+    }
+
+    if (!strcmp(colorFormat, CameraParameters::PIXEL_FORMAT_YUV420SP)) {
+        return OMX_COLOR_FormatYUV420SemiPlanar;
+    }
+
+    if (!strcmp(colorFormat, CameraParameters::PIXEL_FORMAT_YUV422I)) {
+        return OMX_COLOR_FormatYCbYCr;
+    }
+
+    if (!strcmp(colorFormat, CameraParameters::PIXEL_FORMAT_RGB565)) {
+       return OMX_COLOR_Format16bitRGB565;
+    }
+
+    CHECK_EQ(0, "Unknown color format");
 }
 
 // static
 CameraSource *CameraSource::Create() {
-    sp<Camera> camera = Camera::connect();
+    sp<Camera> camera = Camera::connect(0);
 
     if (camera.get() == NULL) {
         return NULL;
@@ -125,9 +108,7 @@
 }
 
 // static
-CameraSource *CameraSource::CreateFromICamera(const sp<ICamera> &icamera) {
-    sp<Camera> camera = Camera::create(icamera);
-
+CameraSource *CameraSource::CreateFromCamera(const sp<Camera> &camera) {
     if (camera.get() == NULL) {
         return NULL;
     }
@@ -137,23 +118,50 @@
 
 CameraSource::CameraSource(const sp<Camera> &camera)
     : mCamera(camera),
-      mWidth(0),
-      mHeight(0),
       mFirstFrameTimeUs(0),
-      mNumFrames(0),
+      mLastFrameTimestampUs(0),
+      mNumFramesReceived(0),
+      mNumFramesEncoded(0),
+      mNumFramesDropped(0),
+      mNumGlitches(0),
+      mGlitchDurationThresholdUs(200000),
+      mCollectStats(false),
       mStarted(false) {
-    char value[PROPERTY_VALUE_MAX];
-    if (property_get("ro.hardware", value, NULL) && !strcmp(value, "sholes")) {
-        // The hardware encoder(s) do not support yuv420, but only YCbYCr,
-        // fortunately the camera also supports this, so we needn't transcode.
-        mCamera->setParameters(String8("preview-format=yuv422i-yuyv"));
-    }
 
+    int64_t token = IPCThreadState::self()->clearCallingIdentity();
     String8 s = mCamera->getParameters();
+    IPCThreadState::self()->restoreCallingIdentity(token);
+
     printf("params: \"%s\"\n", s.string());
 
+    int32_t width, height, stride, sliceHeight;
     CameraParameters params(s);
-    params.getPreviewSize(&mWidth, &mHeight);
+    params.getPreviewSize(&width, &height);
+
+    // Calculate glitch duraton threshold based on frame rate
+    int32_t frameRate = params.getPreviewFrameRate();
+    int64_t glitchDurationUs = (1000000LL / frameRate);
+    if (glitchDurationUs > mGlitchDurationThresholdUs) {
+        mGlitchDurationThresholdUs = glitchDurationUs;
+    }
+
+    const char *colorFormatStr = params.get(CameraParameters::KEY_VIDEO_FRAME_FORMAT);
+    CHECK(colorFormatStr != NULL);
+    int32_t colorFormat = getColorFormat(colorFormatStr);
+
+    // XXX: query camera for the stride and slice height
+    // when the capability becomes available.
+    stride = width;
+    sliceHeight = height;
+
+    mMeta = new MetaData;
+    mMeta->setCString(kKeyMIMEType, MEDIA_MIMETYPE_VIDEO_RAW);
+    mMeta->setInt32(kKeyColorFormat, colorFormat);
+    mMeta->setInt32(kKeyWidth, width);
+    mMeta->setInt32(kKeyHeight, height);
+    mMeta->setInt32(kKeyStride, stride);
+    mMeta->setInt32(kKeySliceHeight, sliceHeight);
+
 }
 
 CameraSource::~CameraSource() {
@@ -162,55 +170,99 @@
     }
 }
 
-void CameraSource::setPreviewSurface(const sp<ISurface> &surface) {
-    mPreviewSurface = surface;
-}
-
-status_t CameraSource::start(MetaData *) {
+status_t CameraSource::start(MetaData *meta) {
     CHECK(!mStarted);
 
+    char value[PROPERTY_VALUE_MAX];
+    if (property_get("media.stagefright.record-stats", value, NULL)
+        && (!strcmp(value, "1") || !strcasecmp(value, "true"))) {
+        mCollectStats = true;
+    }
+
+    mStartTimeUs = 0;
+    int64_t startTimeUs;
+    if (meta && meta->findInt64(kKeyTime, &startTimeUs)) {
+        mStartTimeUs = startTimeUs;
+    }
+
+    int64_t token = IPCThreadState::self()->clearCallingIdentity();
     mCamera->setListener(new CameraSourceListener(this));
-
-    status_t err =
-        mCamera->setPreviewDisplay(
-                mPreviewSurface != NULL ? mPreviewSurface : new DummySurface);
-    CHECK_EQ(err, OK);
-
-    mCamera->setPreviewCallbackFlags(
-            FRAME_CALLBACK_FLAG_ENABLE_MASK
-            | FRAME_CALLBACK_FLAG_COPY_OUT_MASK);
-
-    err = mCamera->startPreview();
-    CHECK_EQ(err, OK);
+    CHECK_EQ(OK, mCamera->startRecording());
+    IPCThreadState::self()->restoreCallingIdentity(token);
 
     mStarted = true;
-
     return OK;
 }
 
 status_t CameraSource::stop() {
-    CHECK(mStarted);
-
-    mCamera->stopPreview();
-
+    LOGV("stop");
+    Mutex::Autolock autoLock(mLock);
     mStarted = false;
+    mFrameAvailableCondition.signal();
 
+    int64_t token = IPCThreadState::self()->clearCallingIdentity();
+    mCamera->setListener(NULL);
+    mCamera->stopRecording();
+    releaseQueuedFrames();
+    while (!mFramesBeingEncoded.empty()) {
+        LOGI("Waiting for outstanding frames being encoded: %d",
+                mFramesBeingEncoded.size());
+        mFrameCompleteCondition.wait(mLock);
+    }
+    mCamera = NULL;
+    IPCThreadState::self()->restoreCallingIdentity(token);
+
+    if (mCollectStats) {
+        LOGI("Frames received/encoded/dropped: %d/%d/%d in %lld us",
+                mNumFramesReceived, mNumFramesEncoded, mNumFramesDropped,
+                mLastFrameTimestampUs - mFirstFrameTimeUs);
+    }
+
+    CHECK_EQ(mNumFramesReceived, mNumFramesEncoded + mNumFramesDropped);
     return OK;
 }
 
-sp<MetaData> CameraSource::getFormat() {
-    sp<MetaData> meta = new MetaData;
-    meta->setCString(kKeyMIMEType, MEDIA_MIMETYPE_VIDEO_RAW);
-    meta->setInt32(kKeyColorFormat, OMX_COLOR_FormatYUV420SemiPlanar);
-    meta->setInt32(kKeyWidth, mWidth);
-    meta->setInt32(kKeyHeight, mHeight);
+void CameraSource::releaseQueuedFrames() {
+    List<sp<IMemory> >::iterator it;
+    while (!mFramesReceived.empty()) {
+        it = mFramesReceived.begin();
+        mCamera->releaseRecordingFrame(*it);
+        mFramesReceived.erase(it);
+        ++mNumFramesDropped;
+    }
+}
 
-    return meta;
+sp<MetaData> CameraSource::getFormat() {
+    return mMeta;
+}
+
+void CameraSource::releaseOneRecordingFrame(const sp<IMemory>& frame) {
+    int64_t token = IPCThreadState::self()->clearCallingIdentity();
+    mCamera->releaseRecordingFrame(frame);
+    IPCThreadState::self()->restoreCallingIdentity(token);
+}
+
+void CameraSource::signalBufferReturned(MediaBuffer *buffer) {
+    LOGV("signalBufferReturned: %p", buffer->data());
+    for (List<sp<IMemory> >::iterator it = mFramesBeingEncoded.begin();
+         it != mFramesBeingEncoded.end(); ++it) {
+        if ((*it)->pointer() ==  buffer->data()) {
+
+            releaseOneRecordingFrame((*it));
+            mFramesBeingEncoded.erase(it);
+            ++mNumFramesEncoded;
+            buffer->setObserver(0);
+            buffer->release();
+            mFrameCompleteCondition.signal();
+            return;
+        }
+    }
+    CHECK_EQ(0, "signalBufferReturned: bogus buffer");
 }
 
 status_t CameraSource::read(
         MediaBuffer **buffer, const ReadOptions *options) {
-    CHECK(mStarted);
+    LOGV("read");
 
     *buffer = NULL;
 
@@ -224,38 +276,67 @@
 
     {
         Mutex::Autolock autoLock(mLock);
-        while (mFrames.empty()) {
+        while (mStarted && mFramesReceived.empty()) {
             mFrameAvailableCondition.wait(mLock);
         }
-
-        frame = *mFrames.begin();
-        mFrames.erase(mFrames.begin());
+        if (!mStarted) {
+            return OK;
+        }
+        frame = *mFramesReceived.begin();
+        mFramesReceived.erase(mFramesReceived.begin());
 
         frameTime = *mFrameTimes.begin();
         mFrameTimes.erase(mFrameTimes.begin());
+
+        mFramesBeingEncoded.push_back(frame);
+        *buffer = new MediaBuffer(frame->pointer(), frame->size());
+        (*buffer)->setObserver(this);
+        (*buffer)->add_ref();
+        (*buffer)->meta_data()->setInt64(kKeyTime, frameTime);
     }
-
-    *buffer = new MediaBuffer(frame->size());
-    memcpy((*buffer)->data(), frame->pointer(), frame->size());
-    (*buffer)->set_range(0, frame->size());
-
-    (*buffer)->meta_data()->clear();
-    (*buffer)->meta_data()->setInt64(kKeyTime, frameTime);
-
     return OK;
 }
 
-void CameraSource::dataCallback(int32_t msgType, const sp<IMemory> &data) {
+void CameraSource::dataCallbackTimestamp(int64_t timestampUs,
+        int32_t msgType, const sp<IMemory> &data) {
+    LOGV("dataCallbackTimestamp: timestamp %lld us", timestampUs);
     Mutex::Autolock autoLock(mLock);
-
-    int64_t nowUs = getNowUs();
-    if (mNumFrames == 0) {
-        mFirstFrameTimeUs = nowUs;
+    if (!mStarted) {
+        releaseOneRecordingFrame(data);
+        ++mNumFramesReceived;
+        ++mNumFramesDropped;
+        return;
     }
-    ++mNumFrames;
 
-    mFrames.push_back(data);
-    mFrameTimes.push_back(nowUs - mFirstFrameTimeUs);
+    if (mNumFramesReceived > 0 &&
+        timestampUs - mLastFrameTimestampUs > mGlitchDurationThresholdUs) {
+        if (mNumGlitches % 10 == 0) {  // Don't spam the log
+            LOGW("Long delay detected in video recording");
+        }
+        ++mNumGlitches;
+    }
+
+    mLastFrameTimestampUs = timestampUs;
+    if (mNumFramesReceived == 0) {
+        mFirstFrameTimeUs = timestampUs;
+        // Initial delay
+        if (mStartTimeUs > 0) {
+            if (timestampUs < mStartTimeUs) {
+                // Frame was captured before recording was started
+                // Drop it without updating the statistical data.
+                releaseOneRecordingFrame(data);
+                return;
+            }
+            mStartTimeUs = timestampUs - mStartTimeUs;
+        }
+    }
+    ++mNumFramesReceived;
+
+    mFramesReceived.push_back(data);
+    int64_t timeUs = mStartTimeUs + (timestampUs - mFirstFrameTimeUs);
+    mFrameTimes.push_back(timeUs);
+    LOGV("initial delay: %lld, current time stamp: %lld",
+        mStartTimeUs, timeUs);
     mFrameAvailableCondition.signal();
 }
 
diff --git a/media/libstagefright/DataSource.cpp b/media/libstagefright/DataSource.cpp
index a66f86b..90a596c 100644
--- a/media/libstagefright/DataSource.cpp
+++ b/media/libstagefright/DataSource.cpp
@@ -19,11 +19,14 @@
 #include "include/MPEG4Extractor.h"
 #include "include/WAVExtractor.h"
 #include "include/OggExtractor.h"
+#include "include/MPEG2TSExtractor.h"
+#include "include/NuCachedSource2.h"
+#include "include/NuHTTPDataSource.h"
 
-#include <media/stagefright/CachingDataSource.h>
+#include "matroska/MatroskaExtractor.h"
+
 #include <media/stagefright/DataSource.h>
 #include <media/stagefright/FileSource.h>
-#include <media/stagefright/HTTPDataSource.h>
 #include <media/stagefright/MediaErrors.h>
 #include <utils/String8.h>
 
@@ -94,6 +97,8 @@
     RegisterSniffer(SniffAMR);
     RegisterSniffer(SniffWAV);
     RegisterSniffer(SniffOgg);
+    RegisterSniffer(SniffMatroska);
+    RegisterSniffer(SniffMPEG2TS);
 }
 
 // static
@@ -103,11 +108,11 @@
     if (!strncasecmp("file://", uri, 7)) {
         source = new FileSource(uri + 7);
     } else if (!strncasecmp("http://", uri, 7)) {
-        sp<HTTPDataSource> httpSource = new HTTPDataSource(uri, headers);
-        if (httpSource->connect() != OK) {
+        sp<NuHTTPDataSource> httpSource = new NuHTTPDataSource;
+        if (httpSource->connect(uri, headers) != OK) {
             return NULL;
         }
-        source = new CachingDataSource(httpSource, 64 * 1024, 10);
+        source = new NuCachedSource2(httpSource);
     } else {
         // Assume it's a filename.
         source = new FileSource(uri);
diff --git a/media/libstagefright/FileSource.cpp b/media/libstagefright/FileSource.cpp
index b6f1af2..dd2579b 100644
--- a/media/libstagefright/FileSource.cpp
+++ b/media/libstagefright/FileSource.cpp
@@ -45,6 +45,10 @@
 }
 
 ssize_t FileSource::readAt(off_t offset, void *data, size_t size) {
+    if (mFile == NULL) {
+        return NO_INIT;
+    }
+
     Mutex::Autolock autoLock(mLock);
 
     if (mLength >= 0) {
@@ -67,6 +71,10 @@
 }
 
 status_t FileSource::getSize(off_t *size) {
+    if (mFile == NULL) {
+        return NO_INIT;
+    }
+
     if (mLength >= 0) {
         *size = mLength;
 
diff --git a/media/libstagefright/HTTPDataSource.cpp b/media/libstagefright/HTTPDataSource.cpp
deleted file mode 100644
index f72a6cc..0000000
--- a/media/libstagefright/HTTPDataSource.cpp
+++ /dev/null
@@ -1,457 +0,0 @@
-/*
- * Copyright (C) 2009 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-//#define LOG_NDEBUG 0
-#define LOG_TAG "HTTPDataSource"
-#include <utils/Log.h>
-
-#include "include/stagefright_string.h"
-#include "include/HTTPStream.h"
-
-#include <stdlib.h>
-
-#include <cutils/properties.h>
-#include <media/stagefright/HTTPDataSource.h>
-#include <media/stagefright/MediaDebug.h>
-
-namespace android {
-
-status_t HTTPDataSource::connectWithRedirectsAndRange(off_t rangeStart) {
-    string host = mStartingHost.string();
-    string path = mStartingPath.string();
-    int port = mStartingPort;
-
-    LOGV("Connecting to host '%s', port %d, path '%s'",
-         host.c_str(), port, path.c_str());
-
-    int numRedirectsRemaining = 5;
-    while (numRedirectsRemaining-- > 0) {
-        {
-            Mutex::Autolock autoLock(mStateLock);
-            if (mState == DISCONNECTED) {
-                return UNKNOWN_ERROR;
-            }
-        }
-
-        status_t err = mHttp->connect(host.c_str(), port);
-
-        if (err != OK) {
-            return err;
-        }
-
-        String8 request;
-        request.append("GET ");
-        request.append(path.c_str());
-        request.append(" HTTP/1.1\r\n");
-        request.append(mHeaders);
-        request.append("Host: ");
-        request.append(host.c_str());
-        request.append("\r\n");
-
-        if (rangeStart > 0) {
-            char range[128];
-            sprintf(range, "Range: bytes=%ld-\r\n", rangeStart);
-
-            request.append(range);
-        }
-
-        request.append("\r\n");
-
-        err = mHttp->send(request.string());
-
-        if (err != OK) {
-            return err;
-        }
-
-        int httpStatus;
-        err = mHttp->receive_header(&httpStatus);
-
-        if (err != OK) {
-            return err;
-        }
-
-        if (httpStatus >= 200 && httpStatus < 300) {
-            applyTimeoutResponse();
-            return OK;
-        }
-
-        if (httpStatus != 301 && httpStatus != 302) {
-            LOGE("HTTP request failed w/ http status %d", httpStatus);
-            return ERROR_IO;
-        }
-
-        string location;
-        CHECK(mHttp->find_header_value("Location", &location));
-
-        CHECK(string(location, 0, 7) == "http://");
-        location.erase(0, 7);
-        string::size_type slashPos = location.find('/');
-        if (slashPos == string::npos) {
-            slashPos = location.size();
-            location += '/';
-        }
-
-        mHttp->disconnect();
-
-        LOGV("Redirecting to %s\n", location.c_str());
-
-        host = string(location, 0, slashPos);
-
-        string::size_type colonPos = host.find(':');
-        if (colonPos != string::npos) {
-            const char *start = host.c_str() + colonPos + 1;
-            char *end;
-            long tmp = strtol(start, &end, 10);
-            CHECK(end > start && (*end == '\0'));
-
-            port = (tmp >= 0 && tmp < 65536) ? (int)tmp : 80;
-
-            host.erase(colonPos, host.size() - colonPos);
-        } else {
-            port = 80;
-        }
-
-        path = string(location, slashPos);
-
-        mStartingHost = host.c_str();
-        mStartingPath = path.c_str();
-        mStartingPort = port;
-    }
-
-    return ERROR_IO;
-}
-
-void HTTPDataSource::applyTimeoutResponse() {
-    string timeout;
-    if (mHttp->find_header_value("X-SocketTimeout", &timeout)) {
-        const char *s = timeout.c_str();
-        char *end;
-        long tmp = strtol(s, &end, 10);
-        if (end == s || *end != '\0') {
-            LOGW("Illegal X-SocketTimeout value given.");
-            return;
-        }
-
-        LOGI("overriding default timeout, new timeout is %ld seconds", tmp);
-        mHttp->setReceiveTimeout(tmp);
-    }
-}
-
-HTTPDataSource::HTTPDataSource(
-        const char *uri, const KeyedVector<String8, String8> *headers) {
-    CHECK(!strncasecmp("http://", uri, 7));
-
-    string host;
-    string path;
-    int port;
-
-    char *slash = strchr(uri + 7, '/');
-    if (slash == NULL) {
-        host = uri + 7;
-        path = "/";
-    } else {
-        host = string(uri + 7, slash - (uri + 7));
-        path = slash;
-    }
-
-    char *colon = strchr(host.c_str(), ':');
-    if (colon == NULL) {
-        port = 80;
-    } else {
-        char *end;
-        long tmp = strtol(colon + 1, &end, 10);
-        CHECK(end > colon + 1);
-        CHECK(tmp > 0 && tmp < 65536);
-        port = tmp;
-
-        host = string(host, 0, colon - host.c_str());
-    }
-
-    mStartingHost = host.c_str();
-    mStartingPath = path.c_str();
-    mStartingPort = port;
-
-    init(headers);
-}
-
-HTTPDataSource::HTTPDataSource(
-        const char *_host, int port, const char *_path,
-        const KeyedVector<String8, String8> *headers) {
-    mStartingHost = _host;
-    mStartingPath = _path;
-    mStartingPort = port;
-
-    init(headers);
-}
-
-void HTTPDataSource::init(const KeyedVector<String8, String8> *headers) {
-    mState = DISCONNECTED;
-    mHttp = new HTTPStream;
-
-    initHeaders(headers);
-
-    mBuffer = malloc(kBufferSize);
-
-    mNumRetriesLeft = kMaxNumRetries;
-}
-
-status_t HTTPDataSource::connect() {
-    {
-        Mutex::Autolock autoLock(mStateLock);
-
-        if (mState != DISCONNECTED) {
-            return ERROR_ALREADY_CONNECTED;
-        }
-
-        mState = CONNECTING;
-    }
-
-    mBufferLength = 0;
-    mBufferOffset = 0;
-    mContentLengthValid = false;
-
-    status_t err = connectWithRedirectsAndRange(0);
-
-    if (err != OK) {
-        Mutex::Autolock autoLock(mStateLock);
-
-        if (mState != CONNECTING) {
-            LOGV("connect() cancelled");
-        }
-        mState = DISCONNECTED;
-
-        return err;
-    }
-
-    string value;
-    if (mHttp->find_header_value("Content-Length", &value)) {
-        char *end;
-        mContentLength = strtoull(value.c_str(), &end, 10);
-        mContentLengthValid = true;
-    }
-
-    Mutex::Autolock autoLock(mStateLock);
-
-    if (mState != CONNECTING) {
-        // disconnect was called when we had just successfully connected.
-        LOGV("connect() cancelled (we had just succeeded connecting)");
-
-        mHttp->disconnect();
-        return UNKNOWN_ERROR;
-    }
-
-    mState = CONNECTED;
-
-    return OK;
-}
-
-void HTTPDataSource::disconnect() {
-    Mutex::Autolock autoLock(mStateLock);
-
-    if (mState == CONNECTING || mState == CONNECTED) {
-        mHttp->disconnect();
-        mState = DISCONNECTED;
-    }
-}
-
-status_t HTTPDataSource::initCheck() const {
-    Mutex::Autolock autoLock(mStateLock);
-
-    return (mState == CONNECTED) ? (status_t)OK : ERROR_NOT_CONNECTED;
-}
-
-status_t HTTPDataSource::getSize(off_t *size) {
-    *size = 0;
-
-    {
-        Mutex::Autolock autoLock(mStateLock);
-        if (mState != CONNECTED) {
-            return ERROR_NOT_CONNECTED;
-        }
-    }
-
-    if (!mContentLengthValid) {
-        return ERROR_UNSUPPORTED;
-    }
-
-    *size = mContentLength;
-
-    return OK;
-}
-
-HTTPDataSource::~HTTPDataSource() {
-    disconnect();
-
-    delete mHttp;
-    mHttp = NULL;
-
-    free(mBuffer);
-    mBuffer = NULL;
-}
-
-ssize_t HTTPDataSource::sendRangeRequest(size_t offset) {
-    status_t err = connectWithRedirectsAndRange(offset);
-
-    if (err != OK) {
-        return err;
-    }
-
-    string value;
-    if (!mHttp->find_header_value("Content-Length", &value)) {
-        return kBufferSize;
-    }
-
-    char *end;
-    unsigned long contentLength = strtoul(value.c_str(), &end, 10);
-
-    return contentLength;
-}
-
-ssize_t HTTPDataSource::readAt(off_t offset, void *data, size_t size) {
-    LOGV("readAt %ld, size %d", offset, size);
-
-rinse_repeat:
-    {
-        Mutex::Autolock autoLock(mStateLock);
-        if (mState != CONNECTED) {
-            return ERROR_NOT_CONNECTED;
-        }
-    }
-
-    if (offset >= mBufferOffset
-            && offset < (off_t)(mBufferOffset + mBufferLength)) {
-        size_t num_bytes_available = mBufferLength - (offset - mBufferOffset);
-
-        size_t copy = num_bytes_available;
-        if (copy > size) {
-            copy = size;
-        }
-
-        memcpy(data, (const char *)mBuffer + (offset - mBufferOffset), copy);
-
-        if (copy < size) {
-            LOGV("short read (1), returning %d vs. %d requested", copy, size);
-        }
-
-        return copy;
-    }
-
-    ssize_t contentLength = 0;
-    if (offset != (off_t)(mBufferOffset + mBufferLength)) {
-        LOGV("new range offset=%ld (old=%ld)",
-             offset, mBufferOffset + mBufferLength);
-
-        mHttp->disconnect();
-
-        contentLength = sendRangeRequest(offset);
-
-        if (contentLength > kBufferSize) {
-            contentLength = kBufferSize;
-        }
-    } else {
-        contentLength = kBufferSize;
-    }
-
-    mBufferOffset = offset;
-
-    if (mContentLengthValid
-            && mBufferOffset + contentLength >= (off_t)mContentLength) {
-        // If we never triggered a range request but know the content length,
-        // make sure to not read more data than there could be, otherwise
-        // we'd block indefinitely if the server doesn't close the connection.
-
-        contentLength = mContentLength - mBufferOffset;
-    }
-
-    if (contentLength <= 0) {
-        return contentLength;
-    }
-
-    ssize_t num_bytes_received = mHttp->receive(mBuffer, contentLength);
-
-    if (num_bytes_received < 0
-            || (mContentLengthValid && num_bytes_received < contentLength)) {
-        if (mNumRetriesLeft-- > 0) {
-            mHttp->disconnect();
-            mBufferLength = 0;
-            num_bytes_received = connectWithRedirectsAndRange(mBufferOffset);
-            if (num_bytes_received == OK) {
-                LOGI("retrying connection succeeded.");
-                goto rinse_repeat;
-            }
-            LOGE("retrying connection failed");
-        }
-
-        mBufferLength = 0;
-
-        return num_bytes_received;
-    }
-
-    mBufferLength = (size_t)num_bytes_received;
-
-    size_t copy = mBufferLength;
-    if (copy > size) {
-        copy = size;
-    }
-
-    memcpy(data, mBuffer, copy);
-
-    return copy;
-}
-
-void HTTPDataSource::initHeaders(
-        const KeyedVector<String8, String8> *overrides) {
-    mHeaders = String8();
-
-    mHeaders.append("User-Agent: stagefright/1.0 (Linux;Android ");
-
-#if (PROPERTY_VALUE_MAX < 8)
-#error "PROPERTY_VALUE_MAX must be at least 8"
-#endif
-
-    char value[PROPERTY_VALUE_MAX];
-    property_get("ro.build.version.release", value, "Unknown");
-    mHeaders.append(value);
-    mHeaders.append(")\r\n");
-
-    if (overrides == NULL) {
-        return;
-    }
-
-    for (size_t i = 0; i < overrides->size(); ++i) {
-        String8 line;
-        line.append(overrides->keyAt(i));
-        line.append(": ");
-        line.append(overrides->valueAt(i));
-        line.append("\r\n");
-
-        mHeaders.append(line);
-    }
-}
-
-uint32_t HTTPDataSource::flags() {
-    uint32_t f = kWantsPrefetching;
-
-    if (!strcasecmp(mStartingHost.string(), "localhost")
-            || !strcmp(mStartingHost.string(), "127.0.0.1")) {
-        f |= kStreamedFromLocalHost;
-    }
-
-    return f;
-}
-
-}  // namespace android
-
diff --git a/media/libstagefright/MP3Extractor.cpp b/media/libstagefright/MP3Extractor.cpp
index f9251e1..69c3a72 100644
--- a/media/libstagefright/MP3Extractor.cpp
+++ b/media/libstagefright/MP3Extractor.cpp
@@ -634,6 +634,7 @@
     }
 
     size_t frame_size;
+    int bitrate;
     for (;;) {
         ssize_t n = mDataSource->readAt(mCurrentPos, buffer->data(), 4);
         if (n < 4) {
@@ -646,7 +647,7 @@
         uint32_t header = U32_AT((const uint8_t *)buffer->data());
 
         if ((header & kMask) == (mFixedHeader & kMask)
-            && get_mp3_frame_size(header, &frame_size)) {
+            && get_mp3_frame_size(header, &frame_size, NULL, NULL, &bitrate)) {
             break;
         }
 
@@ -683,7 +684,7 @@
     buffer->meta_data()->setInt64(kKeyTime, mCurrentTimeUs);
 
     mCurrentPos += frame_size;
-    mCurrentTimeUs += 1152 * 1000000 / 44100;
+    mCurrentTimeUs += frame_size * 8000ll / bitrate;
 
     *out = buffer;
 
diff --git a/media/libstagefright/MPEG4Extractor.cpp b/media/libstagefright/MPEG4Extractor.cpp
index a41b2f4..0c2f1e6 100644
--- a/media/libstagefright/MPEG4Extractor.cpp
+++ b/media/libstagefright/MPEG4Extractor.cpp
@@ -428,6 +428,14 @@
         }
         chunk_size = ntoh64(chunk_size);
         data_offset += 8;
+
+        if (chunk_size < 16) {
+            // The smallest valid chunk is 16 bytes long in this case.
+            return ERROR_MALFORMED;
+        }
+    } else if (chunk_size < 8) {
+        // The smallest valid chunk is 8 bytes long.
+        return ERROR_MALFORMED;
     }
 
     char chunk[5];
@@ -1633,7 +1641,7 @@
     }
 }
 
-bool SniffMPEG4(
+static bool LegacySniffMPEG4(
         const sp<DataSource> &source, String8 *mimeType, float *confidence) {
     uint8_t header[8];
 
@@ -1657,5 +1665,83 @@
     return false;
 }
 
+static bool isCompatibleBrand(uint32_t fourcc) {
+    static const uint32_t kCompatibleBrands[] = {
+        FOURCC('i', 's', 'o', 'm'),
+        FOURCC('i', 's', 'o', '2'),
+        FOURCC('a', 'v', 'c', '1'),
+        FOURCC('3', 'g', 'p', '4'),
+        FOURCC('m', 'p', '4', '1'),
+        FOURCC('m', 'p', '4', '2'),
+    };
+
+    for (size_t i = 0;
+         i < sizeof(kCompatibleBrands) / sizeof(kCompatibleBrands[0]);
+         ++i) {
+        if (kCompatibleBrands[i] == fourcc) {
+            return true;
+        }
+    }
+
+    return false;
+}
+
+// Attempt to actually parse the 'ftyp' atom and determine if a suitable
+// compatible brand is present.
+static bool BetterSniffMPEG4(
+        const sp<DataSource> &source, String8 *mimeType, float *confidence) {
+    uint8_t header[12];
+    if (source->readAt(0, header, 12) != 12
+            || memcmp("ftyp", &header[4], 4)) {
+        return false;
+    }
+
+    size_t atomSize = U32_AT(&header[0]);
+    if (atomSize < 16 || (atomSize % 4) != 0) {
+        return false;
+    }
+
+    bool success = false;
+    if (isCompatibleBrand(U32_AT(&header[8]))) {
+        success = true;
+    } else {
+        size_t numCompatibleBrands = (atomSize - 16) / 4;
+        for (size_t i = 0; i < numCompatibleBrands; ++i) {
+            uint8_t tmp[4];
+            if (source->readAt(16 + i * 4, tmp, 4) != 4) {
+                return false;
+            }
+
+            if (isCompatibleBrand(U32_AT(&tmp[0]))) {
+                success = true;
+                break;
+            }
+        }
+    }
+
+    if (!success) {
+        return false;
+    }
+
+    *mimeType = MEDIA_MIMETYPE_CONTAINER_MPEG4;
+    *confidence = 0.3f;
+
+    return true;
+}
+
+bool SniffMPEG4(
+        const sp<DataSource> &source, String8 *mimeType, float *confidence) {
+    if (BetterSniffMPEG4(source, mimeType, confidence)) {
+        return true;
+    }
+
+    if (LegacySniffMPEG4(source, mimeType, confidence)) {
+        LOGW("Identified supported mpeg4 through LegacySniffMPEG4.");
+        return true;
+    }
+
+    return false;
+}
+
 }  // namespace android
 
diff --git a/media/libstagefright/MPEG4Writer.cpp b/media/libstagefright/MPEG4Writer.cpp
index 2cf0ddf..b7388bb 100644
--- a/media/libstagefright/MPEG4Writer.cpp
+++ b/media/libstagefright/MPEG4Writer.cpp
@@ -14,6 +14,10 @@
  * limitations under the License.
  */
 
+//#define LOG_NDEBUG 0
+#define LOG_TAG "MPEG4Writer"
+#include <utils/Log.h>
+
 #include <arpa/inet.h>
 
 #include <ctype.h>
@@ -24,62 +28,137 @@
 #include <media/stagefright/MetaData.h>
 #include <media/stagefright/MediaDebug.h>
 #include <media/stagefright/MediaDefs.h>
+#include <media/stagefright/MediaErrors.h>
 #include <media/stagefright/MediaSource.h>
 #include <media/stagefright/Utils.h>
+#include <media/mediarecorder.h>
+#include <cutils/properties.h>
+
+#include "include/ESDS.h"
 
 namespace android {
 
 class MPEG4Writer::Track {
 public:
     Track(MPEG4Writer *owner, const sp<MediaSource> &source);
+
     ~Track();
 
-    status_t start();
+    status_t start(MetaData *params);
     void stop();
+    void pause();
     bool reachedEOS();
 
     int64_t getDurationUs() const;
-    void writeTrackHeader(int32_t trackID);
+    int64_t getEstimatedTrackSizeBytes() const;
+    void writeTrackHeader(int32_t trackID, bool use32BitOffset = true);
 
 private:
     MPEG4Writer *mOwner;
     sp<MetaData> mMeta;
     sp<MediaSource> mSource;
     volatile bool mDone;
+    volatile bool mPaused;
+    volatile bool mResumed;
     int64_t mMaxTimeStampUs;
+    int64_t mEstimatedTrackSizeBytes;
+    int32_t mTimeScale;
 
     pthread_t mThread;
 
     struct SampleInfo {
         size_t size;
-        off_t offset;
-        int64_t timestamp;
+        int64_t timestampUs;
     };
-    List<SampleInfo> mSampleInfos;
+    List<SampleInfo>    mSampleInfos;
+    bool                mSamplesHaveSameSize;
+
+    List<MediaBuffer *> mChunkSamples;
+    List<off_t>         mChunkOffsets;
+
+    struct StscTableEntry {
+
+        StscTableEntry(uint32_t chunk, uint32_t samples, uint32_t id)
+            : firstChunk(chunk),
+              samplesPerChunk(samples),
+              sampleDescriptionId(id) {}
+
+        uint32_t firstChunk;
+        uint32_t samplesPerChunk;
+        uint32_t sampleDescriptionId;
+    };
+    List<StscTableEntry> mStscTableEntries;
+
+    List<int32_t> mStssTableEntries;
+    List<int64_t> mChunkDurations;
+
+    struct SttsTableEntry {
+
+        SttsTableEntry(uint32_t count, uint32_t durationUs)
+            : sampleCount(count), sampleDurationUs(durationUs) {}
+
+        uint32_t sampleCount;
+        uint32_t sampleDurationUs;
+    };
+    List<SttsTableEntry> mSttsTableEntries;
 
     void *mCodecSpecificData;
     size_t mCodecSpecificDataSize;
+    bool mGotAllCodecSpecificData;
+    bool mTrackingProgressStatus;
 
     bool mReachedEOS;
+    int64_t mStartTimestampUs;
+    int64_t mPreviousTrackTimeUs;
+    int64_t mTrackEveryTimeDurationUs;
+    int32_t mTrackEveryNumberOfFrames;
 
     static void *ThreadWrapper(void *me);
     void threadEntry();
 
+    status_t makeAVCCodecSpecificData(
+            const uint8_t *data, size_t size);
+    void writeOneChunk(bool isAvc);
+
+    // Track authoring progress status
+    void trackProgressStatus(int32_t nFrames, int64_t timeUs);
+    void initTrackingProgressStatus(MetaData *params);
+
+    // Utilities for collecting statistical data
+    void logStatisticalData(bool isAudio);
+    void findMinAvgMaxSampleDurationMs(
+            int32_t *min, int32_t *avg, int32_t *max);
+    void findMinMaxChunkDurations(int64_t *min, int64_t *max);
+
+    void getCodecSpecificDataFromInputFormatIfPossible();
+
     Track(const Track &);
     Track &operator=(const Track &);
 };
 
+#define USE_NALLEN_FOUR         1
+
 MPEG4Writer::MPEG4Writer(const char *filename)
     : mFile(fopen(filename, "wb")),
+      mUse32BitOffset(true),
+      mPaused(false),
+      mStarted(false),
       mOffset(0),
-      mMdatOffset(0) {
+      mMdatOffset(0),
+      mEstimatedMoovBoxSize(0),
+      mInterleaveDurationUs(500000) {
     CHECK(mFile != NULL);
 }
 
 MPEG4Writer::MPEG4Writer(int fd)
     : mFile(fdopen(fd, "wb")),
+      mUse32BitOffset(true),
+      mPaused(false),
+      mStarted(false),
       mOffset(0),
-      mMdatOffset(0) {
+      mMdatOffset(0),
+      mEstimatedMoovBoxSize(0),
+      mInterleaveDurationUs(500000) {
     CHECK(mFile != NULL);
 }
 
@@ -100,23 +179,10 @@
     return OK;
 }
 
-status_t MPEG4Writer::start() {
-    if (mFile == NULL) {
-        return UNKNOWN_ERROR;
-    }
-
-    beginBox("ftyp");
-      writeFourcc("isom");
-      writeInt32(0);
-      writeFourcc("isom");
-    endBox();
-
-    mMdatOffset = mOffset;
-    write("\x00\x00\x00\x01mdat????????", 16);
-
+status_t MPEG4Writer::startTracks(MetaData *params) {
     for (List<Track *>::iterator it = mTracks.begin();
          it != mTracks.end(); ++it) {
-        status_t err = (*it)->start();
+        status_t err = (*it)->start(params);
 
         if (err != OK) {
             for (List<Track *>::iterator it2 = mTracks.begin();
@@ -127,34 +193,190 @@
             return err;
         }
     }
-
     return OK;
 }
 
+int64_t MPEG4Writer::estimateMoovBoxSize(int32_t bitRate) {
+    // This implementation is highly experimental/heurisitic.
+    //
+    // Statistical analysis shows that metadata usually accounts
+    // for a small portion of the total file size, usually < 0.6%.
+    // Currently, lets set to 0.4% for now.
+
+    // The default MIN_MOOV_BOX_SIZE is set to 0.4% x 1MB,
+    // where 1MB is the common file size limit for MMS application.
+    // The default MAX _MOOV_BOX_SIZE value is based on about 4
+    // minute video recording with a bit rate about 3 Mbps, because
+    // statistics also show that most of the video captured are going
+    // to be less than 3 minutes.
+
+    // If the estimation is wrong, we will pay the price of wasting
+    // some reserved space. This should not happen so often statistically.
+    static const int32_t factor = mUse32BitOffset? 1: 2;
+    static const int64_t MIN_MOOV_BOX_SIZE = 4 * 1024;  // 4 KB
+    static const int64_t MAX_MOOV_BOX_SIZE = (180 * 3000000 * 6LL / 8000);
+    int64_t size = MIN_MOOV_BOX_SIZE;
+
+    if (mMaxFileSizeLimitBytes != 0) {
+        size = mMaxFileSizeLimitBytes * 4 / 1000;
+    } else if (mMaxFileDurationLimitUs != 0) {
+        if (bitRate <= 0) {
+            // We could not estimate the file size since bitRate is not set.
+            size = MIN_MOOV_BOX_SIZE;
+        } else {
+            size = ((mMaxFileDurationLimitUs * bitRate * 4) / 1000 / 8000000);
+        }
+    }
+    if (size < MIN_MOOV_BOX_SIZE) {
+        size = MIN_MOOV_BOX_SIZE;
+    }
+
+    // Any long duration recording will be probably end up with
+    // non-streamable mp4 file.
+    if (size > MAX_MOOV_BOX_SIZE) {
+        size = MAX_MOOV_BOX_SIZE;
+    }
+
+    LOGI("limits: %lld/%lld bytes/us, bit rate: %d bps and the estimated"
+         " moov size %lld bytes",
+         mMaxFileSizeLimitBytes, mMaxFileDurationLimitUs, bitRate, size);
+    return factor * size;
+}
+
+status_t MPEG4Writer::start(MetaData *param) {
+    if (mFile == NULL) {
+        return UNKNOWN_ERROR;
+    }
+
+    int32_t use64BitOffset;
+    if (param &&
+        param->findInt32(kKey64BitFileOffset, &use64BitOffset) &&
+        use64BitOffset) {
+        mUse32BitOffset = false;
+    }
+
+    // System property can overwrite the file offset bits parameter
+    char value[PROPERTY_VALUE_MAX];
+    if (property_get("media.stagefright.record-64bits", value, NULL)
+        && (!strcmp(value, "1") || !strcasecmp(value, "true"))) {
+        mUse32BitOffset = false;
+    }
+
+    mStartTimestampUs = -1;
+
+    if (mStarted) {
+        if (mPaused) {
+            mPaused = false;
+            return startTracks(param);
+        }
+        return OK;
+    }
+
+    if (!param ||
+        !param->findInt32(kKeyTimeScale, &mTimeScale)) {
+        mTimeScale = 1000;
+    }
+    CHECK(mTimeScale > 0);
+    LOGV("movie time scale: %d", mTimeScale);
+
+    mStreamableFile = true;
+    mWriteMoovBoxToMemory = false;
+    mMoovBoxBuffer = NULL;
+    mMoovBoxBufferOffset = 0;
+
+    beginBox("ftyp");
+      {
+        int32_t fileType;
+        if (param && param->findInt32(kKeyFileType, &fileType) &&
+            fileType != OUTPUT_FORMAT_MPEG_4) {
+            writeFourcc("3gp4");
+        } else {
+            writeFourcc("isom");
+        }
+      }
+      writeInt32(0);
+      writeFourcc("isom");
+      writeFourcc("3gp4");
+    endBox();
+
+    mFreeBoxOffset = mOffset;
+
+    if (mEstimatedMoovBoxSize == 0) {
+        int32_t bitRate = -1;
+        if (param) {
+            param->findInt32(kKeyBitRate, &bitRate);
+        }
+        mEstimatedMoovBoxSize = estimateMoovBoxSize(bitRate);
+    }
+    CHECK(mEstimatedMoovBoxSize >= 8);
+    fseeko(mFile, mFreeBoxOffset, SEEK_SET);
+    writeInt32(mEstimatedMoovBoxSize);
+    write("free", 4);
+
+    mMdatOffset = mFreeBoxOffset + mEstimatedMoovBoxSize;
+    mOffset = mMdatOffset;
+    fseeko(mFile, mMdatOffset, SEEK_SET);
+    if (mUse32BitOffset) {
+        write("????mdat", 8);
+    } else {
+        write("\x00\x00\x00\x01mdat????????", 16);
+    }
+    status_t err = startTracks(param);
+    if (err != OK) {
+        return err;
+    }
+    mStarted = true;
+    return OK;
+}
+
+void MPEG4Writer::pause() {
+    if (mFile == NULL) {
+        return;
+    }
+    mPaused = true;
+    for (List<Track *>::iterator it = mTracks.begin();
+         it != mTracks.end(); ++it) {
+        (*it)->pause();
+    }
+}
+
 void MPEG4Writer::stop() {
     if (mFile == NULL) {
         return;
     }
 
-    int64_t max_duration = 0;
+    int64_t maxDurationUs = 0;
     for (List<Track *>::iterator it = mTracks.begin();
          it != mTracks.end(); ++it) {
         (*it)->stop();
 
-        int64_t duration = (*it)->getDurationUs();
-        if (duration > max_duration) {
-            max_duration = duration;
+        int64_t durationUs = (*it)->getDurationUs();
+        if (durationUs > maxDurationUs) {
+            maxDurationUs = durationUs;
         }
     }
 
+
     // Fix up the size of the 'mdat' chunk.
-    fseek(mFile, mMdatOffset + 8, SEEK_SET);
-    int64_t size = mOffset - mMdatOffset;
-    size = hton64(size);
-    fwrite(&size, 1, 8, mFile);
-    fseek(mFile, mOffset, SEEK_SET);
+    if (mUse32BitOffset) {
+        fseeko(mFile, mMdatOffset, SEEK_SET);
+        int32_t size = htonl(static_cast<int32_t>(mOffset - mMdatOffset));
+        fwrite(&size, 1, 4, mFile);
+    } else {
+        fseeko(mFile, mMdatOffset + 8, SEEK_SET);
+        int64_t size = mOffset - mMdatOffset;
+        size = hton64(size);
+        fwrite(&size, 1, 8, mFile);
+    }
+    fseeko(mFile, mOffset, SEEK_SET);
 
     time_t now = time(NULL);
+    const off_t moovOffset = mOffset;
+    mWriteMoovBoxToMemory = true;
+    mMoovBoxBuffer = (uint8_t *) malloc(mEstimatedMoovBoxSize);
+    mMoovBoxBufferOffset = 0;
+    CHECK(mMoovBoxBuffer != NULL);
+    int32_t duration = (maxDurationUs * mTimeScale) / 1E6;
 
     beginBox("moov");
 
@@ -162,9 +384,9 @@
         writeInt32(0);             // version=0, flags=0
         writeInt32(now);           // creation time
         writeInt32(now);           // modification time
-        writeInt32(1000);          // timescale
-        writeInt32(max_duration / 1000);
-        writeInt32(0x10000);       // rate
+        writeInt32(mTimeScale);    // mvhd timescale
+        writeInt32(duration);
+        writeInt32(0x10000);       // rate: 1.0
         writeInt16(0x100);         // volume
         writeInt16(0);             // reserved
         writeInt32(0);             // reserved
@@ -190,19 +412,54 @@
       int32_t id = 1;
       for (List<Track *>::iterator it = mTracks.begin();
            it != mTracks.end(); ++it, ++id) {
-          (*it)->writeTrackHeader(id);
+          (*it)->writeTrackHeader(id, mUse32BitOffset);
       }
     endBox();  // moov
 
+    mWriteMoovBoxToMemory = false;
+    if (mStreamableFile) {
+        CHECK(mMoovBoxBufferOffset + 8 <= mEstimatedMoovBoxSize);
+
+        // Moov box
+        fseeko(mFile, mFreeBoxOffset, SEEK_SET);
+        mOffset = mFreeBoxOffset;
+        write(mMoovBoxBuffer, 1, mMoovBoxBufferOffset, mFile);
+
+        // Free box
+        fseeko(mFile, mOffset, SEEK_SET);
+        writeInt32(mEstimatedMoovBoxSize - mMoovBoxBufferOffset);
+        write("free", 4);
+
+        // Free temp memory
+        free(mMoovBoxBuffer);
+        mMoovBoxBuffer = NULL;
+        mMoovBoxBufferOffset = 0;
+    } else {
+        LOGI("The mp4 file will not be streamable.");
+    }
+
     CHECK(mBoxes.empty());
 
+    fflush(mFile);
     fclose(mFile);
     mFile = NULL;
+    mStarted = false;
 }
 
-off_t MPEG4Writer::addSample(MediaBuffer *buffer) {
-    Mutex::Autolock autoLock(mLock);
+status_t MPEG4Writer::setInterleaveDuration(uint32_t durationUs) {
+    mInterleaveDurationUs = durationUs;
+    return OK;
+}
 
+void MPEG4Writer::lock() {
+    mLock.lock();
+}
+
+void MPEG4Writer::unlock() {
+    mLock.unlock();
+}
+
+off_t MPEG4Writer::addSample_l(MediaBuffer *buffer) {
     off_t old_offset = mOffset;
 
     fwrite((const uint8_t *)buffer->data() + buffer->range_offset(),
@@ -213,31 +470,91 @@
     return old_offset;
 }
 
-off_t MPEG4Writer::addLengthPrefixedSample(MediaBuffer *buffer) {
-    Mutex::Autolock autoLock(mLock);
+static void StripStartcode(MediaBuffer *buffer) {
+    if (buffer->range_length() < 4) {
+        return;
+    }
 
+    const uint8_t *ptr =
+        (const uint8_t *)buffer->data() + buffer->range_offset();
+
+    if (!memcmp(ptr, "\x00\x00\x00\x01", 4)) {
+        buffer->set_range(
+                buffer->range_offset() + 4, buffer->range_length() - 4);
+    }
+}
+
+off_t MPEG4Writer::addLengthPrefixedSample_l(MediaBuffer *buffer) {
     off_t old_offset = mOffset;
 
     size_t length = buffer->range_length();
+
+#if USE_NALLEN_FOUR
+    uint8_t x = length >> 24;
+    fwrite(&x, 1, 1, mFile);
+    x = (length >> 16) & 0xff;
+    fwrite(&x, 1, 1, mFile);
+    x = (length >> 8) & 0xff;
+    fwrite(&x, 1, 1, mFile);
+    x = length & 0xff;
+    fwrite(&x, 1, 1, mFile);
+#else
     CHECK(length < 65536);
 
     uint8_t x = length >> 8;
     fwrite(&x, 1, 1, mFile);
     x = length & 0xff;
     fwrite(&x, 1, 1, mFile);
+#endif
 
     fwrite((const uint8_t *)buffer->data() + buffer->range_offset(),
            1, length, mFile);
 
+#if USE_NALLEN_FOUR
+    mOffset += length + 4;
+#else
     mOffset += length + 2;
+#endif
 
     return old_offset;
 }
 
+size_t MPEG4Writer::write(
+        const void *ptr, size_t size, size_t nmemb, FILE *stream) {
+
+    const size_t bytes = size * nmemb;
+    if (mWriteMoovBoxToMemory) {
+        off_t moovBoxSize = 8 + mMoovBoxBufferOffset + bytes;
+        if (moovBoxSize > mEstimatedMoovBoxSize) {
+            for (List<off_t>::iterator it = mBoxes.begin();
+                 it != mBoxes.end(); ++it) {
+                (*it) += mOffset;
+            }
+            fseeko(mFile, mOffset, SEEK_SET);
+            fwrite(mMoovBoxBuffer, 1, mMoovBoxBufferOffset, stream);
+            fwrite(ptr, size, nmemb, stream);
+            mOffset += (bytes + mMoovBoxBufferOffset);
+            free(mMoovBoxBuffer);
+            mMoovBoxBuffer = NULL;
+            mMoovBoxBufferOffset = 0;
+            mWriteMoovBoxToMemory = false;
+            mStreamableFile = false;
+        } else {
+            memcpy(mMoovBoxBuffer + mMoovBoxBufferOffset, ptr, bytes);
+            mMoovBoxBufferOffset += bytes;
+        }
+    } else {
+        fwrite(ptr, size, nmemb, stream);
+        mOffset += bytes;
+    }
+    return bytes;
+}
+
 void MPEG4Writer::beginBox(const char *fourcc) {
     CHECK_EQ(strlen(fourcc), 4);
 
-    mBoxes.push_back(mOffset);
+    mBoxes.push_back(mWriteMoovBoxToMemory?
+            mMoovBoxBufferOffset: mOffset);
 
     writeInt32(0);
     writeFourcc(fourcc);
@@ -249,51 +566,77 @@
     off_t offset = *--mBoxes.end();
     mBoxes.erase(--mBoxes.end());
 
-    fseek(mFile, offset, SEEK_SET);
-    writeInt32(mOffset - offset);
-    mOffset -= 4;
-    fseek(mFile, mOffset, SEEK_SET);
+    if (mWriteMoovBoxToMemory) {
+       int32_t x = htonl(mMoovBoxBufferOffset - offset);
+       memcpy(mMoovBoxBuffer + offset, &x, 4);
+    } else {
+        fseeko(mFile, offset, SEEK_SET);
+        writeInt32(mOffset - offset);
+        mOffset -= 4;
+        fseeko(mFile, mOffset, SEEK_SET);
+    }
 }
 
 void MPEG4Writer::writeInt8(int8_t x) {
-    fwrite(&x, 1, 1, mFile);
-    ++mOffset;
+    write(&x, 1, 1, mFile);
 }
 
 void MPEG4Writer::writeInt16(int16_t x) {
     x = htons(x);
-    fwrite(&x, 1, 2, mFile);
-    mOffset += 2;
+    write(&x, 1, 2, mFile);
 }
 
 void MPEG4Writer::writeInt32(int32_t x) {
     x = htonl(x);
-    fwrite(&x, 1, 4, mFile);
-    mOffset += 4;
+    write(&x, 1, 4, mFile);
 }
 
 void MPEG4Writer::writeInt64(int64_t x) {
     x = hton64(x);
-    fwrite(&x, 1, 8, mFile);
-    mOffset += 8;
+    write(&x, 1, 8, mFile);
 }
 
 void MPEG4Writer::writeCString(const char *s) {
     size_t n = strlen(s);
-
-    fwrite(s, 1, n + 1, mFile);
-    mOffset += n + 1;
+    write(s, 1, n + 1, mFile);
 }
 
 void MPEG4Writer::writeFourcc(const char *s) {
     CHECK_EQ(strlen(s), 4);
-    fwrite(s, 1, 4, mFile);
-    mOffset += 4;
+    write(s, 1, 4, mFile);
 }
 
 void MPEG4Writer::write(const void *data, size_t size) {
-    fwrite(data, 1, size, mFile);
-    mOffset += size;
+    write(data, 1, size, mFile);
+}
+
+bool MPEG4Writer::exceedsFileSizeLimit() {
+    // No limit
+    if (mMaxFileSizeLimitBytes == 0) {
+        return false;
+    }
+
+    int64_t nTotalBytesEstimate = static_cast<int64_t>(mEstimatedMoovBoxSize);
+    for (List<Track *>::iterator it = mTracks.begin();
+         it != mTracks.end(); ++it) {
+        nTotalBytesEstimate += (*it)->getEstimatedTrackSizeBytes();
+    }
+    return (nTotalBytesEstimate >= mMaxFileSizeLimitBytes);
+}
+
+bool MPEG4Writer::exceedsFileDurationLimit() {
+    // No limit
+    if (mMaxFileDurationLimitUs == 0) {
+        return false;
+    }
+
+    for (List<Track *>::iterator it = mTracks.begin();
+         it != mTracks.end(); ++it) {
+        if ((*it)->getDurationUs() >= mMaxFileDurationLimitUs) {
+            return true;
+        }
+    }
+    return false;
 }
 
 bool MPEG4Writer::reachedEOS() {
@@ -309,6 +652,26 @@
     return allDone;
 }
 
+void MPEG4Writer::setStartTimestampUs(int64_t timeUs) {
+    LOGI("setStartTimestampUs: %lld", timeUs);
+    CHECK(timeUs >= 0);
+    Mutex::Autolock autoLock(mLock);
+    if (mStartTimestampUs < 0 || mStartTimestampUs > timeUs) {
+        mStartTimestampUs = timeUs;
+        LOGI("Earliest track starting time: %lld", mStartTimestampUs);
+    }
+}
+
+int64_t MPEG4Writer::getStartTimestampUs() {
+    Mutex::Autolock autoLock(mLock);
+    return mStartTimestampUs;
+}
+
+size_t MPEG4Writer::numTracks() {
+    Mutex::Autolock autolock(mLock);
+    return mTracks.size();
+}
+
 ////////////////////////////////////////////////////////////////////////////////
 
 MPEG4Writer::Track::Track(
@@ -317,10 +680,52 @@
       mMeta(source->getFormat()),
       mSource(source),
       mDone(false),
+      mPaused(false),
+      mResumed(false),
       mMaxTimeStampUs(0),
+      mEstimatedTrackSizeBytes(0),
+      mSamplesHaveSameSize(true),
       mCodecSpecificData(NULL),
       mCodecSpecificDataSize(0),
+      mGotAllCodecSpecificData(false),
       mReachedEOS(false) {
+    getCodecSpecificDataFromInputFormatIfPossible();
+
+    if (!mMeta->findInt32(kKeyTimeScale, &mTimeScale)) {
+        mTimeScale = 1000;
+    }
+    CHECK(mTimeScale > 0);
+}
+
+void MPEG4Writer::Track::getCodecSpecificDataFromInputFormatIfPossible() {
+    const char *mime;
+    CHECK(mMeta->findCString(kKeyMIMEType, &mime));
+
+    if (!strcasecmp(mime, MEDIA_MIMETYPE_VIDEO_AVC)) {
+        uint32_t type;
+        const void *data;
+        size_t size;
+        if (mMeta->findData(kKeyAVCC, &type, &data, &size)) {
+            mCodecSpecificData = malloc(size);
+            mCodecSpecificDataSize = size;
+            memcpy(mCodecSpecificData, data, size);
+            mGotAllCodecSpecificData = true;
+        }
+    } else if (!strcasecmp(mime, MEDIA_MIMETYPE_VIDEO_MPEG4)
+            || !strcasecmp(mime, MEDIA_MIMETYPE_AUDIO_AAC)) {
+        uint32_t type;
+        const void *data;
+        size_t size;
+        if (mMeta->findData(kKeyESDS, &type, &data, &size)) {
+            ESDS esds(data, size);
+            if (esds.getCodecSpecificInfo(&data, &size) == OK) {
+                mCodecSpecificData = malloc(size);
+                mCodecSpecificDataSize = size;
+                memcpy(mCodecSpecificData, data, size);
+                mGotAllCodecSpecificData = true;
+            }
+        }
+    }
 }
 
 MPEG4Writer::Track::~Track() {
@@ -332,9 +737,47 @@
     }
 }
 
-status_t MPEG4Writer::Track::start() {
-    status_t err = mSource->start();
+void MPEG4Writer::Track::initTrackingProgressStatus(MetaData *params) {
+    LOGV("initTrackingProgressStatus");
+    mPreviousTrackTimeUs = -1;
+    mTrackingProgressStatus = false;
+    mTrackEveryTimeDurationUs = 0;
+    mTrackEveryNumberOfFrames = 0;
+    {
+        int64_t timeUs;
+        if (params && params->findInt64(kKeyTrackTimeStatus, &timeUs)) {
+            LOGV("Receive request to track progress status for every %lld us", timeUs);
+            mTrackEveryTimeDurationUs = timeUs;
+            mTrackingProgressStatus = true;
+        }
+    }
+    {
+        int32_t nFrames;
+        if (params && params->findInt32(kKeyTrackFrameStatus, &nFrames)) {
+            LOGV("Receive request to track progress status for every %d frames", nFrames);
+            mTrackEveryNumberOfFrames = nFrames;
+            mTrackingProgressStatus = true;
+        }
+    }
+}
 
+status_t MPEG4Writer::Track::start(MetaData *params) {
+    if (!mDone && mPaused) {
+        mPaused = false;
+        mResumed = true;
+        return OK;
+    }
+
+    int64_t startTimeUs;
+    if (params == NULL || !params->findInt64(kKeyTime, &startTimeUs)) {
+        startTimeUs = 0;
+    }
+
+    initTrackingProgressStatus(params);
+
+    sp<MetaData> meta = new MetaData;
+    meta->setInt64(kKeyTime, startTimeUs);
+    status_t err = mSource->start(meta.get());
     if (err != OK) {
         mDone = mReachedEOS = true;
         return err;
@@ -347,6 +790,7 @@
     mDone = false;
     mMaxTimeStampUs = 0;
     mReachedEOS = false;
+    mEstimatedTrackSizeBytes = 0;
 
     pthread_create(&mThread, &attr, ThreadWrapper, this);
     pthread_attr_destroy(&attr);
@@ -354,6 +798,10 @@
     return OK;
 }
 
+void MPEG4Writer::Track::pause() {
+    mPaused = true;
+}
+
 void MPEG4Writer::Track::stop() {
     if (mDone) {
         return;
@@ -380,73 +828,175 @@
     return NULL;
 }
 
+#include <ctype.h>
+static void hexdump(const void *_data, size_t size) {
+    const uint8_t *data = (const uint8_t *)_data;
+    size_t offset = 0;
+    while (offset < size) {
+        printf("0x%04x  ", offset);
+
+        size_t n = size - offset;
+        if (n > 16) {
+            n = 16;
+        }
+
+        for (size_t i = 0; i < 16; ++i) {
+            if (i == 8) {
+                printf(" ");
+            }
+
+            if (offset + i < size) {
+                printf("%02x ", data[offset + i]);
+            } else {
+                printf("   ");
+            }
+        }
+
+        printf(" ");
+
+        for (size_t i = 0; i < n; ++i) {
+            if (isprint(data[offset + i])) {
+                printf("%c", data[offset + i]);
+            } else {
+                printf(".");
+            }
+        }
+
+        printf("\n");
+
+        offset += 16;
+    }
+}
+
+
+status_t MPEG4Writer::Track::makeAVCCodecSpecificData(
+        const uint8_t *data, size_t size) {
+    // hexdump(data, size);
+
+    if (mCodecSpecificData != NULL) {
+        LOGE("Already have codec specific data");
+        return ERROR_MALFORMED;
+    }
+
+    if (size < 4 || memcmp("\x00\x00\x00\x01", data, 4)) {
+        LOGE("Must start with a start code");
+        return ERROR_MALFORMED;
+    }
+
+    size_t picParamOffset = 4;
+    while (picParamOffset + 3 < size
+            && memcmp("\x00\x00\x00\x01", &data[picParamOffset], 4)) {
+        ++picParamOffset;
+    }
+
+    if (picParamOffset + 3 >= size) {
+        LOGE("Could not find start-code for pictureParameterSet");
+        return ERROR_MALFORMED;
+    }
+
+    size_t seqParamSetLength = picParamOffset - 4;
+    size_t picParamSetLength = size - picParamOffset - 4;
+
+    mCodecSpecificDataSize =
+        6 + 1 + seqParamSetLength + 2 + picParamSetLength + 2;
+
+    mCodecSpecificData = malloc(mCodecSpecificDataSize);
+    uint8_t *header = (uint8_t *)mCodecSpecificData;
+    header[0] = 1;
+    header[1] = 0x42;  // profile
+    header[2] = 0x80;
+    header[3] = 0x1e;  // level
+
+#if USE_NALLEN_FOUR
+    header[4] = 0xfc | 3;  // length size == 4 bytes
+#else
+    header[4] = 0xfc | 1;  // length size == 2 bytes
+#endif
+
+    header[5] = 0xe0 | 1;
+    header[6] = seqParamSetLength >> 8;
+    header[7] = seqParamSetLength & 0xff;
+    memcpy(&header[8], &data[4], seqParamSetLength);
+    header += 8 + seqParamSetLength;
+    header[0] = 1;
+    header[1] = picParamSetLength >> 8;
+    header[2] = picParamSetLength & 0xff;
+    memcpy(&header[3], &data[picParamOffset + 4], picParamSetLength);
+
+    return OK;
+}
+
 void MPEG4Writer::Track::threadEntry() {
     sp<MetaData> meta = mSource->getFormat();
     const char *mime;
     meta->findCString(kKeyMIMEType, &mime);
-    bool is_mpeg4 = !strcasecmp(mime, MEDIA_MIMETYPE_VIDEO_MPEG4);
+    bool is_mpeg4 = !strcasecmp(mime, MEDIA_MIMETYPE_VIDEO_MPEG4) ||
+                    !strcasecmp(mime, MEDIA_MIMETYPE_AUDIO_AAC);
     bool is_avc = !strcasecmp(mime, MEDIA_MIMETYPE_VIDEO_AVC);
+    bool is_audio = !strncasecmp(mime, "audio/", 6);
     int32_t count = 0;
+    const int64_t interleaveDurationUs = mOwner->interleaveDuration();
+    int64_t chunkTimestampUs = 0;
+    int32_t nChunks = 0;
+    int32_t nZeroLengthFrames = 0;
+    int64_t lastTimestampUs = 0;  // Previous sample time stamp in ms
+    int64_t lastDurationUs = 0;   // Between the previous two samples in ms
+    int32_t sampleCount = 1;      // Sample count in the current stts table entry
+    uint32_t previousSampleSize = 0;  // Size of the previous sample
+    int64_t previousPausedDurationUs = 0;
+    sp<MetaData> meta_data;
 
+    status_t err = OK;
     MediaBuffer *buffer;
-    while (!mDone && mSource->read(&buffer) == OK) {
+    while (!mDone && (err = mSource->read(&buffer)) == OK) {
         if (buffer->range_length() == 0) {
             buffer->release();
             buffer = NULL;
+            ++nZeroLengthFrames;
+            continue;
+        }
 
+        // If the codec specific data has not been received yet, delay pause.
+        // After the codec specific data is received, discard what we received
+        // when the track is to be paused.
+        if (mPaused && !mResumed) {
+            buffer->release();
+            buffer = NULL;
             continue;
         }
 
         ++count;
 
-        if (is_avc && count < 3) {
-            size_t size = buffer->range_length();
+        int32_t isCodecConfig;
+        if (buffer->meta_data()->findInt32(kKeyIsCodecConfig, &isCodecConfig)
+                && isCodecConfig) {
+            CHECK(!mGotAllCodecSpecificData);
 
-            switch (count) {
-                case 1:
-                {
-                    CHECK_EQ(mCodecSpecificData, NULL);
-                    mCodecSpecificData = malloc(size + 8);
-                    uint8_t *header = (uint8_t *)mCodecSpecificData;
-                    header[0] = 1;
-                    header[1] = 0x42;  // profile
-                    header[2] = 0x80;
-                    header[3] = 0x1e;  // level
-                    header[4] = 0xfc | 3;
-                    header[5] = 0xe0 | 1;
-                    header[6] = size >> 8;
-                    header[7] = size & 0xff;
-                    memcpy(&header[8],
-                            (const uint8_t *)buffer->data() + buffer->range_offset(),
-                            size);
-
-                    mCodecSpecificDataSize = size + 8;
-                    break;
-                }
-
-                case 2:
-                {
-                    size_t offset = mCodecSpecificDataSize;
-                    mCodecSpecificDataSize += size + 3;
-                    mCodecSpecificData = realloc(mCodecSpecificData, mCodecSpecificDataSize);
-                    uint8_t *header = (uint8_t *)mCodecSpecificData;
-                    header[offset] = 1;
-                    header[offset + 1] = size >> 8;
-                    header[offset + 2] = size & 0xff;
-                    memcpy(&header[offset + 3],
-                            (const uint8_t *)buffer->data() + buffer->range_offset(),
-                            size);
-                    break;
-                }
+            if (is_avc) {
+                status_t err = makeAVCCodecSpecificData(
+                        (const uint8_t *)buffer->data()
+                            + buffer->range_offset(),
+                        buffer->range_length());
+                CHECK_EQ(OK, err);
+            } else if (is_mpeg4) {
+                mCodecSpecificDataSize = buffer->range_length();
+                mCodecSpecificData = malloc(mCodecSpecificDataSize);
+                memcpy(mCodecSpecificData,
+                        (const uint8_t *)buffer->data()
+                            + buffer->range_offset(),
+                       buffer->range_length());
             }
 
             buffer->release();
             buffer = NULL;
 
+            mGotAllCodecSpecificData = true;
             continue;
-        }
+        } else if (!mGotAllCodecSpecificData &&
+                count == 1 && is_mpeg4 && mCodecSpecificData == NULL) {
+            // The TI mpeg4 encoder does not properly set the
+            // codec-specific-data flag.
 
-        if (mCodecSpecificData == NULL && is_mpeg4) {
             const uint8_t *data =
                 (const uint8_t *)buffer->data() + buffer->range_offset();
 
@@ -474,56 +1024,385 @@
             memcpy(mCodecSpecificData, data, offset);
 
             buffer->set_range(buffer->range_offset() + offset, size - offset);
+
+            if (size == offset) {
+                buffer->release();
+                buffer = NULL;
+
+                continue;
+            }
+
+            mGotAllCodecSpecificData = true;
+        } else if (!mGotAllCodecSpecificData && is_avc && count < 3) {
+            // The TI video encoder does not flag codec specific data
+            // as such and also splits up SPS and PPS across two buffers.
+
+            const uint8_t *data =
+                (const uint8_t *)buffer->data() + buffer->range_offset();
+
+            size_t size = buffer->range_length();
+
+            CHECK(count == 2 || mCodecSpecificData == NULL);
+
+            size_t offset = mCodecSpecificDataSize;
+            mCodecSpecificDataSize += size + 4;
+            mCodecSpecificData =
+                realloc(mCodecSpecificData, mCodecSpecificDataSize);
+
+            memcpy((uint8_t *)mCodecSpecificData + offset,
+                   "\x00\x00\x00\x01", 4);
+
+            memcpy((uint8_t *)mCodecSpecificData + offset + 4, data, size);
+
+            buffer->release();
+            buffer = NULL;
+
+            if (count == 2) {
+                void *tmp = mCodecSpecificData;
+                size = mCodecSpecificDataSize;
+                mCodecSpecificData = NULL;
+                mCodecSpecificDataSize = 0;
+
+                status_t err = makeAVCCodecSpecificData(
+                        (const uint8_t *)tmp, size);
+                free(tmp);
+                tmp = NULL;
+                CHECK_EQ(OK, err);
+
+                mGotAllCodecSpecificData = true;
+            }
+
+            continue;
         }
 
-        off_t offset = is_avc ? mOwner->addLengthPrefixedSample(buffer)
-                              : mOwner->addSample(buffer);
+        if (!mGotAllCodecSpecificData) {
+            mGotAllCodecSpecificData = true;
+        }
+
+        // Make a deep copy of the MediaBuffer and Metadata and release
+        // the original as soon as we can
+        MediaBuffer *copy = new MediaBuffer(buffer->range_length());
+        memcpy(copy->data(), (uint8_t *)buffer->data() + buffer->range_offset(),
+                buffer->range_length());
+        copy->set_range(0, buffer->range_length());
+        meta_data = new MetaData(*buffer->meta_data().get());
+        buffer->release();
+        buffer = NULL;
+
+        if (is_avc) StripStartcode(copy);
 
         SampleInfo info;
-        info.size = is_avc ? buffer->range_length() + 2 : buffer->range_length();
-        info.offset = offset;
+        info.size = is_avc
+#if USE_NALLEN_FOUR
+                ? copy->range_length() + 4
+#else
+                ? copy->range_length() + 2
+#endif
+                : copy->range_length();
+
+        // Max file size or duration handling
+        mEstimatedTrackSizeBytes += info.size;
+        if (mOwner->exceedsFileSizeLimit()) {
+            mOwner->notify(MEDIA_RECORDER_EVENT_INFO, MEDIA_RECORDER_INFO_MAX_FILESIZE_REACHED, 0);
+            break;
+        }
+        if (mOwner->exceedsFileDurationLimit()) {
+            mOwner->notify(MEDIA_RECORDER_EVENT_INFO, MEDIA_RECORDER_INFO_MAX_DURATION_REACHED, 0);
+            break;
+        }
+
+
+        int32_t isSync = false;
+        meta_data->findInt32(kKeyIsSyncFrame, &isSync);
 
         int64_t timestampUs;
-        CHECK(buffer->meta_data()->findInt64(kKeyTime, &timestampUs));
+        CHECK(meta_data->findInt64(kKeyTime, &timestampUs));
 
+////////////////////////////////////////////////////////////////////////////////
+        if (mSampleInfos.empty()) {
+            mStartTimestampUs = timestampUs;
+            mOwner->setStartTimestampUs(mStartTimestampUs);
+        }
+
+        if (mResumed) {
+            previousPausedDurationUs += (timestampUs - mMaxTimeStampUs - lastDurationUs);
+            mResumed = false;
+        }
+
+        timestampUs -= previousPausedDurationUs;
+        LOGV("time stamp: %lld and previous paused duration %lld",
+                timestampUs, previousPausedDurationUs);
         if (timestampUs > mMaxTimeStampUs) {
             mMaxTimeStampUs = timestampUs;
         }
 
-        // Our timestamp is in ms.
-        info.timestamp = (timestampUs + 500) / 1000;
-
+        info.timestampUs = timestampUs;
         mSampleInfos.push_back(info);
+        if (mSampleInfos.size() > 2) {
+            if (lastDurationUs != info.timestampUs - lastTimestampUs) {
+                SttsTableEntry sttsEntry(sampleCount, lastDurationUs);
+                mSttsTableEntries.push_back(sttsEntry);
+                sampleCount = 1;
+            } else {
+                ++sampleCount;
+            }
+        }
+        if (mSamplesHaveSameSize) {
+            if (mSampleInfos.size() >= 2 && previousSampleSize != info.size) {
+                mSamplesHaveSameSize = false;
+            }
+            previousSampleSize = info.size;
+        }
+        lastDurationUs = info.timestampUs - lastTimestampUs;
+        lastTimestampUs = info.timestampUs;
 
-        buffer->release();
-        buffer = NULL;
+        if (isSync != 0) {
+            mStssTableEntries.push_back(mSampleInfos.size());
+        }
+
+        if (mTrackingProgressStatus) {
+            if (mPreviousTrackTimeUs <= 0) {
+                mPreviousTrackTimeUs = mStartTimestampUs;
+            }
+            trackProgressStatus(mSampleInfos.size(), timestampUs);
+        }
+        if (mOwner->numTracks() == 1) {
+            off_t offset = is_avc? mOwner->addLengthPrefixedSample_l(copy)
+                                 : mOwner->addSample_l(copy);
+            if (mChunkOffsets.empty()) {
+                mChunkOffsets.push_back(offset);
+            }
+            copy->release();
+            copy = NULL;
+            continue;
+        }
+
+        mChunkSamples.push_back(copy);
+        if (interleaveDurationUs == 0) {
+            StscTableEntry stscEntry(++nChunks, 1, 1);
+            mStscTableEntries.push_back(stscEntry);
+            writeOneChunk(is_avc);
+        } else {
+            if (chunkTimestampUs == 0) {
+                chunkTimestampUs = timestampUs;
+            } else {
+                if (timestampUs - chunkTimestampUs > interleaveDurationUs) {
+                    ++nChunks;
+                    mChunkDurations.push_back(timestampUs - chunkTimestampUs);
+                    if (nChunks == 1 ||  // First chunk
+                        (--(mStscTableEntries.end()))->samplesPerChunk !=
+                         mChunkSamples.size()) {
+                        StscTableEntry stscEntry(nChunks,
+                                mChunkSamples.size(), 1);
+                        mStscTableEntries.push_back(stscEntry);
+                    }
+                    writeOneChunk(is_avc);
+                    chunkTimestampUs = timestampUs;
+                }
+            }
+        }
+
     }
 
+    if (mSampleInfos.empty()) {
+        err = UNKNOWN_ERROR;
+    }
+    mOwner->notify(MEDIA_RECORDER_EVENT_INFO, MEDIA_RECORDER_INFO_COMPLETION_STATUS, err);
+
+    // Last chunk
+    if (mOwner->numTracks() == 1) {
+        StscTableEntry stscEntry(1, mSampleInfos.size(), 1);
+        mStscTableEntries.push_back(stscEntry);
+    } else if (!mChunkSamples.empty()) {
+        ++nChunks;
+        StscTableEntry stscEntry(nChunks, mChunkSamples.size(), 1);
+        mStscTableEntries.push_back(stscEntry);
+        writeOneChunk(is_avc);
+    }
+
+    // We don't really know how long the last frame lasts, since
+    // there is no frame time after it, just repeat the previous
+    // frame's duration.
+    if (mSampleInfos.size() == 1) {
+        lastDurationUs = 0;  // A single sample's duration
+    } else {
+        ++sampleCount;  // Count for the last sample
+    }
+    SttsTableEntry sttsEntry(sampleCount, lastDurationUs);
+    mSttsTableEntries.push_back(sttsEntry);
     mReachedEOS = true;
+    LOGI("Received total/0-length (%d/%d) buffers and encoded %d frames - %s",
+            count, nZeroLengthFrames, mSampleInfos.size(), is_audio? "audio": "video");
+
+    logStatisticalData(is_audio);
+}
+
+void MPEG4Writer::Track::trackProgressStatus(int32_t nFrames, int64_t timeUs) {
+    LOGV("trackProgressStatus: %d frames and %lld us", nFrames, timeUs);
+    if (mTrackEveryNumberOfFrames > 0 &&
+        nFrames % mTrackEveryNumberOfFrames == 0) {
+        LOGV("Fire frame tracking progress status at frame %d", nFrames);
+        mOwner->notify(MEDIA_RECORDER_EVENT_INFO,
+                       MEDIA_RECORDER_INFO_PROGRESS_FRAME_STATUS,
+                       nFrames);
+    }
+
+    if (mTrackEveryTimeDurationUs > 0 &&
+        timeUs - mPreviousTrackTimeUs >= mTrackEveryTimeDurationUs) {
+        LOGV("Fire time tracking progress status at %lld us", timeUs);
+        mOwner->notify(MEDIA_RECORDER_EVENT_INFO,
+                       MEDIA_RECORDER_INFO_PROGRESS_TIME_STATUS,
+                       timeUs / 1000);
+        mPreviousTrackTimeUs = timeUs;
+    }
+}
+
+void MPEG4Writer::Track::findMinAvgMaxSampleDurationMs(
+        int32_t *min, int32_t *avg, int32_t *max) {
+    CHECK(!mSampleInfos.empty());
+    int32_t avgSampleDurationMs = mMaxTimeStampUs / 1000 / mSampleInfos.size();
+    int32_t minSampleDurationMs = 0x7FFFFFFF;
+    int32_t maxSampleDurationMs = 0;
+    for (List<SttsTableEntry>::iterator it = mSttsTableEntries.begin();
+        it != mSttsTableEntries.end(); ++it) {
+        int32_t sampleDurationMs =
+            (static_cast<int32_t>(it->sampleDurationUs) + 500) / 1000;
+        if (sampleDurationMs > maxSampleDurationMs) {
+            maxSampleDurationMs = sampleDurationMs;
+        } else if (sampleDurationMs < minSampleDurationMs) {
+            minSampleDurationMs = sampleDurationMs;
+        }
+        LOGI("sample duration: %d ms", sampleDurationMs);
+    }
+    CHECK(minSampleDurationMs != 0);
+    CHECK(avgSampleDurationMs != 0);
+    CHECK(maxSampleDurationMs != 0);
+    *min = minSampleDurationMs;
+    *avg = avgSampleDurationMs;
+    *max = maxSampleDurationMs;
+}
+
+// Don't count the last duration
+void MPEG4Writer::Track::findMinMaxChunkDurations(int64_t *min, int64_t *max) {
+    int64_t duration = mOwner->interleaveDuration();
+    int64_t minChunkDuration = duration;
+    int64_t maxChunkDuration = duration;
+    if (mChunkDurations.size() > 1) {
+        for (List<int64_t>::iterator it = mChunkDurations.begin();
+            it != --mChunkDurations.end(); ++it) {
+            if (minChunkDuration > (*it)) {
+                minChunkDuration = (*it);
+            } else if (maxChunkDuration < (*it)) {
+                maxChunkDuration = (*it);
+            }
+        }
+    }
+    *min = minChunkDuration;
+    *max = maxChunkDuration;
+}
+
+void MPEG4Writer::Track::logStatisticalData(bool isAudio) {
+    if (mMaxTimeStampUs <= 0 || mSampleInfos.empty()) {
+        LOGI("nothing is recorded");
+        return;
+    }
+
+    bool collectStats = false;
+    char value[PROPERTY_VALUE_MAX];
+    if (property_get("media.stagefright.record-stats", value, NULL)
+        && (!strcmp(value, "1") || !strcasecmp(value, "true"))) {
+        collectStats = true;
+    }
+
+    if (collectStats) {
+        LOGI("%s track - duration %lld us, total %d frames",
+                isAudio? "audio": "video", mMaxTimeStampUs,
+                mSampleInfos.size());
+        int32_t min, avg, max;
+        findMinAvgMaxSampleDurationMs(&min, &avg, &max);
+        LOGI("min/avg/max sample duration (ms): %d/%d/%d", min, avg, max);
+        if (!isAudio) {
+            float avgFps = 1000.0 / avg;
+            float minFps = 1000.0 / max;
+            float maxFps = 1000.0 / min;
+            LOGI("min/avg/max frame rate (fps): %.2f/%.2f/%.2f",
+                minFps, avgFps, maxFps);
+        }
+
+        int64_t totalBytes = 0;
+        for (List<SampleInfo>::iterator it = mSampleInfos.begin();
+            it != mSampleInfos.end(); ++it) {
+            totalBytes += it->size;
+        }
+        float bitRate = (totalBytes * 8000000.0) / mMaxTimeStampUs;
+        LOGI("avg bit rate (bps): %.2f", bitRate);
+
+        int64_t duration = mOwner->interleaveDuration();
+        if (duration != 0) {  // If interleaving is enabled
+            int64_t minChunk, maxChunk;
+            findMinMaxChunkDurations(&minChunk, &maxChunk);
+            LOGI("min/avg/max chunk duration (ms): %lld/%lld/%lld",
+                minChunk, duration, maxChunk);
+        }
+    }
+}
+
+void MPEG4Writer::Track::writeOneChunk(bool isAvc) {
+    mOwner->lock();
+    for (List<MediaBuffer *>::iterator it = mChunkSamples.begin();
+         it != mChunkSamples.end(); ++it) {
+        off_t offset = isAvc? mOwner->addLengthPrefixedSample_l(*it)
+                            : mOwner->addSample_l(*it);
+        if (it == mChunkSamples.begin()) {
+            mChunkOffsets.push_back(offset);
+        }
+    }
+    mOwner->unlock();
+    while (!mChunkSamples.empty()) {
+        List<MediaBuffer *>::iterator it = mChunkSamples.begin();
+        (*it)->release();
+        (*it) = NULL;
+        mChunkSamples.erase(it);
+    }
+    mChunkSamples.clear();
 }
 
 int64_t MPEG4Writer::Track::getDurationUs() const {
     return mMaxTimeStampUs;
 }
 
-void MPEG4Writer::Track::writeTrackHeader(int32_t trackID) {
+int64_t MPEG4Writer::Track::getEstimatedTrackSizeBytes() const {
+    return mEstimatedTrackSizeBytes;
+}
+
+void MPEG4Writer::Track::writeTrackHeader(
+        int32_t trackID, bool use32BitOffset) {
     const char *mime;
     bool success = mMeta->findCString(kKeyMIMEType, &mime);
     CHECK(success);
 
     bool is_audio = !strncasecmp(mime, "audio/", 6);
+    LOGV("%s track time scale: %d",
+        is_audio? "Audio": "Video", mTimeScale);
+
 
     time_t now = time(NULL);
+    int32_t mvhdTimeScale = mOwner->getTimeScale();
+    int64_t trakDurationUs = getDurationUs();
 
     mOwner->beginBox("trak");
 
       mOwner->beginBox("tkhd");
-        mOwner->writeInt32(0);             // version=0, flags=0
+        // Flags = 7 to indicate that the track is enabled, and
+        // part of the presentation
+        mOwner->writeInt32(0x07);          // version=0, flags=7
         mOwner->writeInt32(now);           // creation time
         mOwner->writeInt32(now);           // modification time
         mOwner->writeInt32(trackID);
         mOwner->writeInt32(0);             // reserved
-        mOwner->writeInt32(getDurationUs() / 1000);
+        int32_t tkhdDuration =
+            (trakDurationUs * mvhdTimeScale + 5E5) / 1E6;
+        mOwner->writeInt32(tkhdDuration);  // in mvhd timescale
         mOwner->writeInt32(0);             // reserved
         mOwner->writeInt32(0);             // reserved
         mOwner->writeInt16(0);             // layer
@@ -550,45 +1429,64 @@
             success = success && mMeta->findInt32(kKeyHeight, &height);
             CHECK(success);
 
-            mOwner->writeInt32(width);
-            mOwner->writeInt32(height);
+            mOwner->writeInt32(width << 16);   // 32-bit fixed-point value
+            mOwner->writeInt32(height << 16);  // 32-bit fixed-point value
         }
       mOwner->endBox();  // tkhd
 
+      int64_t moovStartTimeUs = mOwner->getStartTimestampUs();
+      if (mStartTimestampUs != moovStartTimeUs) {
+        mOwner->beginBox("edts");
+          mOwner->beginBox("elst");
+            mOwner->writeInt32(0);           // version=0, flags=0: 32-bit time
+            mOwner->writeInt32(2);           // never ends with an empty list
+
+            // First elst entry: specify the starting time offset
+            int64_t offsetUs = mStartTimestampUs - moovStartTimeUs;
+            int32_t seg = (offsetUs * mvhdTimeScale + 5E5) / 1E6;
+            mOwner->writeInt32(seg);         // in mvhd timecale
+            mOwner->writeInt32(-1);          // starting time offset
+            mOwner->writeInt32(1 << 16);     // rate = 1.0
+
+            // Second elst entry: specify the track duration
+            seg = (trakDurationUs * mvhdTimeScale + 5E5) / 1E6;
+            mOwner->writeInt32(seg);         // in mvhd timescale
+            mOwner->writeInt32(0);
+            mOwner->writeInt32(1 << 16);
+          mOwner->endBox();
+        mOwner->endBox();
+      }
+
       mOwner->beginBox("mdia");
 
         mOwner->beginBox("mdhd");
           mOwner->writeInt32(0);             // version=0, flags=0
           mOwner->writeInt32(now);           // creation time
           mOwner->writeInt32(now);           // modification time
-          mOwner->writeInt32(1000);          // timescale
-          mOwner->writeInt32(getDurationUs() / 1000);
-          mOwner->writeInt16(0);             // language code XXX
+          mOwner->writeInt32(mTimeScale);    // media timescale
+          int32_t mdhdDuration = (trakDurationUs * mTimeScale + 5E5) / 1E6;
+          mOwner->writeInt32(mdhdDuration);  // use media timescale
+          // Language follows the three letter standard ISO-639-2/T
+          // 'e', 'n', 'g' for "English", for instance.
+          // Each character is packed as the difference between its ASCII value and 0x60.
+          // For "English", these are 00101, 01110, 00111.
+          // XXX: Where is the padding bit located: 0x15C7?
+          mOwner->writeInt16(0);             // language code
           mOwner->writeInt16(0);             // predefined
         mOwner->endBox();
 
         mOwner->beginBox("hdlr");
           mOwner->writeInt32(0);             // version=0, flags=0
-          mOwner->writeInt32(0);             // predefined
-          mOwner->writeFourcc(is_audio ? "soun" : "vide");
+          mOwner->writeInt32(0);             // component type: should be mhlr
+          mOwner->writeFourcc(is_audio ? "soun" : "vide");  // component subtype
           mOwner->writeInt32(0);             // reserved
           mOwner->writeInt32(0);             // reserved
           mOwner->writeInt32(0);             // reserved
-          mOwner->writeCString("");          // name
+          // Removing "r" for the name string just makes the string 4 byte aligned
+          mOwner->writeCString(is_audio ? "SoundHandle": "VideoHandle");  // name
         mOwner->endBox();
 
         mOwner->beginBox("minf");
-
-          mOwner->beginBox("dinf");
-            mOwner->beginBox("dref");
-              mOwner->writeInt32(0);  // version=0, flags=0
-              mOwner->writeInt32(1);
-              mOwner->beginBox("url ");
-                mOwner->writeInt32(1);  // version=0, flags=1
-              mOwner->endBox();  // url
-            mOwner->endBox();  // dref
-          mOwner->endBox();  // dinf
-
           if (is_audio) {
               mOwner->beginBox("smhd");
               mOwner->writeInt32(0);           // version=0, flags=0
@@ -597,14 +1495,25 @@
               mOwner->endBox();
           } else {
               mOwner->beginBox("vmhd");
-              mOwner->writeInt32(0x00000001);  // version=0, flags=1
+              mOwner->writeInt32(0x01);        // version=0, flags=1
               mOwner->writeInt16(0);           // graphics mode
               mOwner->writeInt16(0);           // opcolor
               mOwner->writeInt16(0);
               mOwner->writeInt16(0);
               mOwner->endBox();
           }
-        mOwner->endBox();  // minf
+
+          mOwner->beginBox("dinf");
+            mOwner->beginBox("dref");
+              mOwner->writeInt32(0);  // version=0, flags=0
+              mOwner->writeInt32(1);  // entry count (either url or urn)
+              // The table index here refers to the sample description index
+              // in the sample table entries.
+              mOwner->beginBox("url ");
+                mOwner->writeInt32(1);  // version=0, flags=1 (self-contained)
+              mOwner->endBox();  // url
+            mOwner->endBox();  // dref
+          mOwner->endBox();  // dinf
 
         mOwner->beginBox("stbl");
 
@@ -617,6 +1526,8 @@
                     fourcc = "samr";
                 } else if (!strcasecmp(MEDIA_MIMETYPE_AUDIO_AMR_WB, mime)) {
                     fourcc = "sawb";
+                } else if (!strcasecmp(MEDIA_MIMETYPE_AUDIO_AAC, mime)) {
+                    fourcc = "mp4a";
                 } else {
                     LOGE("Unknown mime type '%s'.", mime);
                     CHECK(!"should not be here, unknown mime type.");
@@ -625,10 +1536,12 @@
                 mOwner->beginBox(fourcc);          // audio format
                   mOwner->writeInt32(0);           // reserved
                   mOwner->writeInt16(0);           // reserved
-                  mOwner->writeInt16(0);           // data ref index
+                  mOwner->writeInt16(0x1);         // data ref index
                   mOwner->writeInt32(0);           // reserved
                   mOwner->writeInt32(0);           // reserved
-                  mOwner->writeInt16(2);           // channel count
+                  int32_t nChannels;
+                  CHECK_EQ(true, mMeta->findInt32(kKeyChannelCount, &nChannels));
+                  mOwner->writeInt16(nChannels);   // channel count
                   mOwner->writeInt16(16);          // sample size
                   mOwner->writeInt16(0);           // predefined
                   mOwner->writeInt16(0);           // reserved
@@ -638,6 +1551,38 @@
                   CHECK(success);
 
                   mOwner->writeInt32(samplerate << 16);
+                  if (!strcasecmp(MEDIA_MIMETYPE_AUDIO_AAC, mime)) {
+                    mOwner->beginBox("esds");
+
+                        mOwner->writeInt32(0);     // version=0, flags=0
+                        mOwner->writeInt8(0x03);   // ES_DescrTag
+                        mOwner->writeInt8(23 + mCodecSpecificDataSize);
+                        mOwner->writeInt16(0x0000);// ES_ID
+                        mOwner->writeInt8(0x00);
+
+                        mOwner->writeInt8(0x04);   // DecoderConfigDescrTag
+                        mOwner->writeInt8(15 + mCodecSpecificDataSize);
+                        mOwner->writeInt8(0x40);   // objectTypeIndication ISO/IEC 14492-2
+                        mOwner->writeInt8(0x15);   // streamType AudioStream
+
+                        mOwner->writeInt16(0x03);  // XXX
+                        mOwner->writeInt8(0x00);   // buffer size 24-bit
+                        mOwner->writeInt32(96000); // max bit rate
+                        mOwner->writeInt32(96000); // avg bit rate
+
+                        mOwner->writeInt8(0x05);   // DecoderSpecificInfoTag
+                        mOwner->writeInt8(mCodecSpecificDataSize);
+                        mOwner->write(mCodecSpecificData, mCodecSpecificDataSize);
+
+                        static const uint8_t kData2[] = {
+                            0x06,  // SLConfigDescriptorTag
+                            0x01,
+                            0x02
+                        };
+                        mOwner->write(kData2, sizeof(kData2));
+
+                    mOwner->endBox();  // esds
+                  }
                 mOwner->endBox();
             } else {
                 if (!strcasecmp(MEDIA_MIMETYPE_VIDEO_MPEG4, mime)) {
@@ -653,7 +1598,7 @@
 
                   mOwner->writeInt32(0);           // reserved
                   mOwner->writeInt16(0);           // reserved
-                  mOwner->writeInt16(0);           // data ref index
+                  mOwner->writeInt16(1);           // data ref index
                   mOwner->writeInt16(0);           // predefined
                   mOwner->writeInt16(0);           // reserved
                   mOwner->writeInt32(0);           // predefined
@@ -698,7 +1643,7 @@
                             0x00, 0x03, 0xe8, 0x00
                         };
                         mOwner->write(kData, sizeof(kData));
-                        
+
                         mOwner->writeInt8(0x05);  // DecoderSpecificInfoTag
 
                         mOwner->writeInt8(mCodecSpecificDataSize);
@@ -727,59 +1672,79 @@
                       mOwner->endBox();  // avcC
                   }
 
+                  mOwner->beginBox("pasp");
+                    // This is useful if the pixel is not square
+                    mOwner->writeInt32(1 << 16);  // hspacing
+                    mOwner->writeInt32(1 << 16);  // vspacing
+                  mOwner->endBox();  // pasp
                 mOwner->endBox();  // mp4v, s263 or avc1
             }
           mOwner->endBox();  // stsd
 
           mOwner->beginBox("stts");
             mOwner->writeInt32(0);  // version=0, flags=0
-            mOwner->writeInt32(mSampleInfos.size() - 1);
-
-            List<SampleInfo>::iterator it = mSampleInfos.begin();
-            int64_t last = (*it).timestamp;
-            ++it;
-            while (it != mSampleInfos.end()) {
-                mOwner->writeInt32(1);
-                mOwner->writeInt32((*it).timestamp - last);
-
-                last = (*it).timestamp;
-
-                ++it;
+            mOwner->writeInt32(mSttsTableEntries.size());
+            for (List<SttsTableEntry>::iterator it = mSttsTableEntries.begin();
+                 it != mSttsTableEntries.end(); ++it) {
+                mOwner->writeInt32(it->sampleCount);
+                int32_t dur = (it->sampleDurationUs * mTimeScale + 5E5) / 1E6;
+                mOwner->writeInt32(dur);
             }
           mOwner->endBox();  // stts
 
+          if (!is_audio) {
+            mOwner->beginBox("stss");
+              mOwner->writeInt32(0);  // version=0, flags=0
+              mOwner->writeInt32(mStssTableEntries.size());  // number of sync frames
+              for (List<int32_t>::iterator it = mStssTableEntries.begin();
+                   it != mStssTableEntries.end(); ++it) {
+                  mOwner->writeInt32(*it);
+              }
+            mOwner->endBox();  // stss
+          }
+
           mOwner->beginBox("stsz");
             mOwner->writeInt32(0);  // version=0, flags=0
-            mOwner->writeInt32(0);  // default sample size
+            if (mSamplesHaveSameSize) {
+                List<SampleInfo>::iterator it = mSampleInfos.begin();
+                mOwner->writeInt32(it->size);  // default sample size
+            } else {
+                mOwner->writeInt32(0);
+            }
             mOwner->writeInt32(mSampleInfos.size());
-            for (List<SampleInfo>::iterator it = mSampleInfos.begin();
-                 it != mSampleInfos.end(); ++it) {
-                mOwner->writeInt32((*it).size);
+            if (!mSamplesHaveSameSize) {
+                for (List<SampleInfo>::iterator it = mSampleInfos.begin();
+                     it != mSampleInfos.end(); ++it) {
+                    mOwner->writeInt32((*it).size);
+                }
             }
           mOwner->endBox();  // stsz
 
           mOwner->beginBox("stsc");
             mOwner->writeInt32(0);  // version=0, flags=0
-            mOwner->writeInt32(mSampleInfos.size());
-            int32_t n = 1;
-            for (List<SampleInfo>::iterator it = mSampleInfos.begin();
-                 it != mSampleInfos.end(); ++it, ++n) {
-                mOwner->writeInt32(n);
-                mOwner->writeInt32(1);
-                mOwner->writeInt32(1);
+            mOwner->writeInt32(mStscTableEntries.size());
+            for (List<StscTableEntry>::iterator it = mStscTableEntries.begin();
+                 it != mStscTableEntries.end(); ++it) {
+                mOwner->writeInt32(it->firstChunk);
+                mOwner->writeInt32(it->samplesPerChunk);
+                mOwner->writeInt32(it->sampleDescriptionId);
             }
           mOwner->endBox();  // stsc
-
-          mOwner->beginBox("co64");
+          mOwner->beginBox(use32BitOffset? "stco": "co64");
             mOwner->writeInt32(0);  // version=0, flags=0
-            mOwner->writeInt32(mSampleInfos.size());
-            for (List<SampleInfo>::iterator it = mSampleInfos.begin();
-                 it != mSampleInfos.end(); ++it, ++n) {
-                mOwner->writeInt64((*it).offset);
+            mOwner->writeInt32(mChunkOffsets.size());
+            for (List<off_t>::iterator it = mChunkOffsets.begin();
+                 it != mChunkOffsets.end(); ++it) {
+                if (use32BitOffset) {
+                    mOwner->writeInt32(static_cast<int32_t>(*it));
+                } else {
+                    mOwner->writeInt64((*it));
+                }
             }
-          mOwner->endBox();  // co64
+          mOwner->endBox();  // stco or co64
 
         mOwner->endBox();  // stbl
+       mOwner->endBox();  // minf
       mOwner->endBox();  // mdia
     mOwner->endBox();  // trak
 }
diff --git a/media/libstagefright/MediaDefs.cpp b/media/libstagefright/MediaDefs.cpp
index 4b3813b..39d264c 100644
--- a/media/libstagefright/MediaDefs.cpp
+++ b/media/libstagefright/MediaDefs.cpp
@@ -20,6 +20,7 @@
 
 const char *MEDIA_MIMETYPE_IMAGE_JPEG = "image/jpeg";
 
+const char *MEDIA_MIMETYPE_VIDEO_VPX = "video/x-vnd.on2.vp8";
 const char *MEDIA_MIMETYPE_VIDEO_AVC = "video/avc";
 const char *MEDIA_MIMETYPE_VIDEO_MPEG4 = "video/mp4v-es";
 const char *MEDIA_MIMETYPE_VIDEO_H263 = "video/3gpp";
@@ -36,5 +37,7 @@
 const char *MEDIA_MIMETYPE_CONTAINER_MPEG4 = "video/mpeg4";
 const char *MEDIA_MIMETYPE_CONTAINER_WAV = "audio/wav";
 const char *MEDIA_MIMETYPE_CONTAINER_OGG = "application/ogg";
+const char *MEDIA_MIMETYPE_CONTAINER_MATROSKA = "video/x-matroska";
+const char *MEDIA_MIMETYPE_CONTAINER_MPEG2TS = "video/mp2ts";
 
 }  // namespace android
diff --git a/media/libstagefright/MediaExtractor.cpp b/media/libstagefright/MediaExtractor.cpp
index 513f49c..56e6136 100644
--- a/media/libstagefright/MediaExtractor.cpp
+++ b/media/libstagefright/MediaExtractor.cpp
@@ -23,6 +23,9 @@
 #include "include/MPEG4Extractor.h"
 #include "include/WAVExtractor.h"
 #include "include/OggExtractor.h"
+#include "include/MPEG2TSExtractor.h"
+
+#include "matroska/MatroskaExtractor.h"
 
 #include <media/stagefright/DataSource.h>
 #include <media/stagefright/MediaDefs.h>
@@ -69,6 +72,10 @@
         return new WAVExtractor(source);
     } else if (!strcasecmp(mime, MEDIA_MIMETYPE_CONTAINER_OGG)) {
         return new OggExtractor(source);
+    } else if (!strcasecmp(mime, MEDIA_MIMETYPE_CONTAINER_MATROSKA)) {
+        return new MatroskaExtractor(source);
+    } else if (!strcasecmp(mime, MEDIA_MIMETYPE_CONTAINER_MPEG2TS)) {
+        return new MPEG2TSExtractor(source);
     }
 
     return NULL;
diff --git a/media/libstagefright/NuCachedSource2.cpp b/media/libstagefright/NuCachedSource2.cpp
new file mode 100644
index 0000000..c02b7f3
--- /dev/null
+++ b/media/libstagefright/NuCachedSource2.cpp
@@ -0,0 +1,471 @@
+/*
+ * Copyright (C) 2010 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#define LOG_TAG "NuCachedSource2"
+#include <utils/Log.h>
+
+#include "include/NuCachedSource2.h"
+
+#include <media/stagefright/foundation/ADebug.h>
+#include <media/stagefright/foundation/AMessage.h>
+#include <media/stagefright/MediaErrors.h>
+
+namespace android {
+
+struct PageCache {
+    PageCache(size_t pageSize);
+    ~PageCache();
+
+    struct Page {
+        void *mData;
+        size_t mSize;
+    };
+
+    Page *acquirePage();
+    void releasePage(Page *page);
+
+    void appendPage(Page *page);
+    size_t releaseFromStart(size_t maxBytes);
+
+    size_t totalSize() const {
+        return mTotalSize;
+    }
+
+    void copy(size_t from, void *data, size_t size);
+
+private:
+    size_t mPageSize;
+    size_t mTotalSize;
+
+    List<Page *> mActivePages;
+    List<Page *> mFreePages;
+
+    void freePages(List<Page *> *list);
+
+    DISALLOW_EVIL_CONSTRUCTORS(PageCache);
+};
+
+PageCache::PageCache(size_t pageSize)
+    : mPageSize(pageSize),
+      mTotalSize(0) {
+}
+
+PageCache::~PageCache() {
+    freePages(&mActivePages);
+    freePages(&mFreePages);
+}
+
+void PageCache::freePages(List<Page *> *list) {
+    List<Page *>::iterator it = list->begin();
+    while (it != list->end()) {
+        Page *page = *it;
+
+        free(page->mData);
+        delete page;
+        page = NULL;
+
+        ++it;
+    }
+}
+
+PageCache::Page *PageCache::acquirePage() {
+    if (!mFreePages.empty()) {
+        List<Page *>::iterator it = mFreePages.begin();
+        Page *page = *it;
+        mFreePages.erase(it);
+
+        return page;
+    }
+
+    Page *page = new Page;
+    page->mData = malloc(mPageSize);
+    page->mSize = 0;
+
+    return page;
+}
+
+void PageCache::releasePage(Page *page) {
+    page->mSize = 0;
+    mFreePages.push_back(page);
+}
+
+void PageCache::appendPage(Page *page) {
+    mTotalSize += page->mSize;
+    mActivePages.push_back(page);
+}
+
+size_t PageCache::releaseFromStart(size_t maxBytes) {
+    size_t bytesReleased = 0;
+
+    while (maxBytes > 0 && !mActivePages.empty()) {
+        List<Page *>::iterator it = mActivePages.begin();
+
+        Page *page = *it;
+
+        if (maxBytes < page->mSize) {
+            break;
+        }
+
+        mActivePages.erase(it);
+
+        maxBytes -= page->mSize;
+        bytesReleased += page->mSize;
+
+        releasePage(page);
+    }
+
+    mTotalSize -= bytesReleased;
+    return bytesReleased;
+}
+
+void PageCache::copy(size_t from, void *data, size_t size) {
+    LOG(VERBOSE) << "copy from " << from << " size " << size;
+
+    CHECK_LE(from + size, mTotalSize);
+
+    size_t offset = 0;
+    List<Page *>::iterator it = mActivePages.begin();
+    while (from >= offset + (*it)->mSize) {
+        offset += (*it)->mSize;
+        ++it;
+    }
+
+    size_t delta = from - offset;
+    size_t avail = (*it)->mSize - delta;
+
+    if (avail >= size) {
+        memcpy(data, (const uint8_t *)(*it)->mData + delta, size);
+        return;
+    }
+
+    memcpy(data, (const uint8_t *)(*it)->mData + delta, avail);
+    ++it;
+    data = (uint8_t *)data + avail;
+    size -= avail;
+
+    while (size > 0) {
+        size_t copy = (*it)->mSize;
+        if (copy > size) {
+            copy = size;
+        }
+        memcpy(data, (*it)->mData, copy);
+        data = (uint8_t *)data + copy;
+        size -= copy;
+        ++it;
+    }
+}
+
+////////////////////////////////////////////////////////////////////////////////
+
+NuCachedSource2::NuCachedSource2(const sp<DataSource> &source)
+    : mSource(source),
+      mReflector(new AHandlerReflector<NuCachedSource2>(this)),
+      mLooper(new ALooper),
+      mCache(new PageCache(kPageSize)),
+      mCacheOffset(0),
+      mFinalStatus(OK),
+      mLastAccessPos(0),
+      mFetching(true),
+      mLastFetchTimeUs(-1) {
+    mLooper->registerHandler(mReflector);
+    mLooper->start();
+
+    Mutex::Autolock autoLock(mLock);
+    (new AMessage(kWhatFetchMore, mReflector->id()))->post();
+}
+
+NuCachedSource2::~NuCachedSource2() {
+    mLooper->stop();
+    mLooper->unregisterHandler(mReflector->id());
+
+    delete mCache;
+    mCache = NULL;
+}
+
+status_t NuCachedSource2::initCheck() const {
+    return mSource->initCheck();
+}
+
+status_t NuCachedSource2::getSize(off_t *size) {
+    return mSource->getSize(size);
+}
+
+uint32_t NuCachedSource2::flags() {
+    return mSource->flags();
+}
+
+void NuCachedSource2::onMessageReceived(const sp<AMessage> &msg) {
+    switch (msg->what()) {
+        case kWhatFetchMore:
+        {
+            onFetch();
+            break;
+        }
+
+        case kWhatRead:
+        {
+            onRead(msg);
+            break;
+        }
+
+        default:
+            TRESPASS();
+    }
+}
+
+void NuCachedSource2::fetchInternal() {
+    LOG(VERBOSE) << "fetchInternal";
+
+    CHECK_EQ(mFinalStatus, (status_t)OK);
+
+    PageCache::Page *page = mCache->acquirePage();
+
+    ssize_t n = mSource->readAt(
+            mCacheOffset + mCache->totalSize(), page->mData, kPageSize);
+
+    Mutex::Autolock autoLock(mLock);
+
+    if (n < 0) {
+        LOG(ERROR) << "source returned error " << n;
+        mFinalStatus = n;
+        mCache->releasePage(page);
+    } else if (n == 0) {
+        LOG(INFO) << "ERROR_END_OF_STREAM";
+        mFinalStatus = ERROR_END_OF_STREAM;
+        mCache->releasePage(page);
+    } else {
+        page->mSize = n;
+        mCache->appendPage(page);
+    }
+}
+
+void NuCachedSource2::onFetch() {
+    LOG(VERBOSE) << "onFetch";
+
+    if (mFinalStatus != OK) {
+        LOG(VERBOSE) << "EOS reached, done prefetching for now";
+        mFetching = false;
+    }
+
+    bool keepAlive =
+        !mFetching
+            && mFinalStatus == OK
+            && ALooper::GetNowUs() >= mLastFetchTimeUs + kKeepAliveIntervalUs;
+
+    if (mFetching || keepAlive) {
+        if (keepAlive) {
+            LOG(INFO) << "Keep alive";
+        }
+
+        fetchInternal();
+
+        mLastFetchTimeUs = ALooper::GetNowUs();
+
+        if (mFetching && mCache->totalSize() >= kHighWaterThreshold) {
+            LOG(INFO) << "Cache full, done prefetching for now";
+            mFetching = false;
+        }
+    } else {
+        Mutex::Autolock autoLock(mLock);
+        restartPrefetcherIfNecessary_l();
+    }
+
+    (new AMessage(kWhatFetchMore, mReflector->id()))->post(
+            mFetching ? 0 : 100000ll);
+}
+
+void NuCachedSource2::onRead(const sp<AMessage> &msg) {
+    LOG(VERBOSE) << "onRead";
+
+    int64_t offset;
+    CHECK(msg->findInt64("offset", &offset));
+
+    void *data;
+    CHECK(msg->findPointer("data", &data));
+
+    size_t size;
+    CHECK(msg->findSize("size", &size));
+
+    ssize_t result = readInternal(offset, data, size);
+
+    if (result == -EAGAIN) {
+        msg->post(50000);
+        return;
+    }
+
+    Mutex::Autolock autoLock(mLock);
+
+    CHECK(mAsyncResult == NULL);
+
+    mAsyncResult = new AMessage;
+    mAsyncResult->setInt32("result", result);
+
+    mCondition.signal();
+}
+
+void NuCachedSource2::restartPrefetcherIfNecessary_l() {
+    static const size_t kGrayArea = 256 * 1024;
+
+    if (mFetching || mFinalStatus != OK) {
+        return;
+    }
+
+    if (mCacheOffset + mCache->totalSize() - mLastAccessPos
+            >= kLowWaterThreshold) {
+        return;
+    }
+
+    size_t maxBytes = mLastAccessPos - mCacheOffset;
+    if (maxBytes < kGrayArea) {
+        return;
+    }
+
+    maxBytes -= kGrayArea;
+
+    size_t actualBytes = mCache->releaseFromStart(maxBytes);
+    mCacheOffset += actualBytes;
+
+    LOG(INFO) << "restarting prefetcher, totalSize = " << mCache->totalSize();
+    mFetching = true;
+}
+
+ssize_t NuCachedSource2::readAt(off_t offset, void *data, size_t size) {
+    Mutex::Autolock autoSerializer(mSerializer);
+
+    LOG(VERBOSE) << "readAt offset " << offset << " size " << size;
+
+    Mutex::Autolock autoLock(mLock);
+
+    // If the request can be completely satisfied from the cache, do so.
+
+    if (offset >= mCacheOffset
+            && offset + size <= mCacheOffset + mCache->totalSize()) {
+        size_t delta = offset - mCacheOffset;
+        mCache->copy(delta, data, size);
+
+        mLastAccessPos = offset + size;
+
+        return size;
+    }
+
+    sp<AMessage> msg = new AMessage(kWhatRead, mReflector->id());
+    msg->setInt64("offset", offset);
+    msg->setPointer("data", data);
+    msg->setSize("size", size);
+
+    CHECK(mAsyncResult == NULL);
+    msg->post();
+
+    while (mAsyncResult == NULL) {
+        mCondition.wait(mLock);
+    }
+
+    int32_t result;
+    CHECK(mAsyncResult->findInt32("result", &result));
+
+    mAsyncResult.clear();
+
+    if (result > 0) {
+        mLastAccessPos = offset + result;
+    }
+
+    return (ssize_t)result;
+}
+
+size_t NuCachedSource2::cachedSize() {
+    Mutex::Autolock autoLock(mLock);
+    return mCacheOffset + mCache->totalSize();
+}
+
+size_t NuCachedSource2::approxDataRemaining(bool *eos) {
+    Mutex::Autolock autoLock(mLock);
+    return approxDataRemaining_l(eos);
+}
+
+size_t NuCachedSource2::approxDataRemaining_l(bool *eos) {
+    *eos = (mFinalStatus != OK);
+    off_t lastBytePosCached = mCacheOffset + mCache->totalSize();
+    if (mLastAccessPos < lastBytePosCached) {
+        return lastBytePosCached - mLastAccessPos;
+    }
+    return 0;
+}
+
+ssize_t NuCachedSource2::readInternal(off_t offset, void *data, size_t size) {
+    LOG(VERBOSE) << "readInternal offset " << offset << " size " << size;
+
+    Mutex::Autolock autoLock(mLock);
+
+    if (offset < mCacheOffset
+            || offset >= (off_t)(mCacheOffset + mCache->totalSize())) {
+        static const off_t kPadding = 32768;
+
+        // In the presence of multiple decoded streams, once of them will
+        // trigger this seek request, the other one will request data "nearby"
+        // soon, adjust the seek position so that that subsequent request
+        // does not trigger another seek.
+        off_t seekOffset = (offset > kPadding) ? offset - kPadding : 0;
+
+        seekInternal_l(seekOffset);
+    }
+
+    size_t delta = offset - mCacheOffset;
+
+    if (mFinalStatus != OK) {
+        if (delta >= mCache->totalSize()) {
+            return mFinalStatus;
+        }
+
+        size_t avail = mCache->totalSize() - delta;
+        mCache->copy(delta, data, avail);
+
+        return avail;
+    }
+
+    if (offset + size <= mCacheOffset + mCache->totalSize()) {
+        mCache->copy(delta, data, size);
+
+        return size;
+    }
+
+    LOG(VERBOSE) << "deferring read";
+
+    return -EAGAIN;
+}
+
+status_t NuCachedSource2::seekInternal_l(off_t offset) {
+    mLastAccessPos = offset;
+
+    if (offset >= mCacheOffset
+            && offset <= (off_t)(mCacheOffset + mCache->totalSize())) {
+        return OK;
+    }
+
+    LOG(INFO) << "new range: offset= " << offset;
+
+    mCacheOffset = offset;
+
+    size_t totalSize = mCache->totalSize();
+    CHECK_EQ(mCache->releaseFromStart(totalSize), totalSize);
+
+    mFinalStatus = OK;
+    mFetching = true;
+
+    return OK;
+}
+
+}  // namespace android
+
diff --git a/media/libstagefright/NuHTTPDataSource.cpp b/media/libstagefright/NuHTTPDataSource.cpp
new file mode 100644
index 0000000..ab9285d
--- /dev/null
+++ b/media/libstagefright/NuHTTPDataSource.cpp
@@ -0,0 +1,338 @@
+//#define LOG_NDEBUG 0
+#define LOG_TAG "NuHTTPDataSource"
+#include <utils/Log.h>
+
+#include "include/NuHTTPDataSource.h"
+
+#include <cutils/properties.h>
+#include <media/stagefright/MediaDebug.h>
+#include <media/stagefright/MediaErrors.h>
+
+namespace android {
+
+static bool ParseSingleUnsignedLong(
+        const char *from, unsigned long *x) {
+    char *end;
+    *x = strtoul(from, &end, 10);
+
+    if (end == from || *end != '\0') {
+        return false;
+    }
+
+    return true;
+}
+
+static bool ParseURL(
+        const char *url, String8 *host, unsigned *port, String8 *path) {
+    host->setTo("");
+    *port = 0;
+    path->setTo("");
+
+    if (strncasecmp("http://", url, 7)) {
+        return false;
+    }
+
+    const char *slashPos = strchr(&url[7], '/');
+
+    if (slashPos == NULL) {
+        host->setTo(&url[7]);
+        path->setTo("/");
+    } else {
+        host->setTo(&url[7], slashPos - &url[7]);
+        path->setTo(slashPos);
+    }
+
+    char *colonPos = strchr(host->string(), ':');
+
+    if (colonPos != NULL) {
+        unsigned long x;
+        if (!ParseSingleUnsignedLong(colonPos + 1, &x) || x >= 65536) {
+            return false;
+        }
+
+        *port = x;
+
+        size_t colonOffset = colonPos - host->string();
+        String8 tmp(host->string(), colonOffset);
+        *host = tmp;
+    } else {
+        *port = 80;
+    }
+
+    return true;
+}
+
+NuHTTPDataSource::NuHTTPDataSource()
+    : mState(DISCONNECTED),
+      mPort(0),
+      mOffset(0),
+      mContentLength(0),
+      mContentLengthValid(false) {
+}
+
+NuHTTPDataSource::~NuHTTPDataSource() {
+}
+
+status_t NuHTTPDataSource::connect(
+        const char *uri,
+        const KeyedVector<String8, String8> *overrides,
+        off_t offset) {
+    String8 headers;
+    MakeFullHeaders(overrides, &headers);
+
+    return connect(uri, headers, offset);
+}
+
+status_t NuHTTPDataSource::connect(
+        const char *uri,
+        const String8 &headers,
+        off_t offset) {
+    String8 host, path;
+    unsigned port;
+    if (!ParseURL(uri, &host, &port, &path)) {
+        return ERROR_MALFORMED;
+    }
+
+    return connect(host, port, path, headers, offset);
+}
+
+status_t NuHTTPDataSource::connect(
+        const char *host, unsigned port, const char *path,
+        const String8 &headers,
+        off_t offset) {
+    LOGI("connect to %s:%u%s @%ld", host, port, path, offset);
+
+    bool needsToReconnect = true;
+
+    if (mState == CONNECTED && host == mHost && port == mPort
+            && offset == mOffset) {
+        if (mContentLengthValid && mOffset == mContentLength) {
+            LOGI("Didn't have to reconnect, old one's still good.");
+            needsToReconnect = false;
+        }
+    }
+
+    mHost = host;
+    mPort = port;
+    mPath = path;
+    mHeaders = headers;
+
+    status_t err = OK;
+
+    mState = CONNECTING;
+
+    if (needsToReconnect) {
+        mHTTP.disconnect();
+        err = mHTTP.connect(host, port);
+    }
+
+    if (err != OK) {
+        mState = DISCONNECTED;
+    } else if (mState != CONNECTING) {
+        err = UNKNOWN_ERROR;
+    } else {
+        mState = CONNECTED;
+
+        mOffset = offset;
+        mContentLength = 0;
+        mContentLengthValid = false;
+
+        String8 request("GET ");
+        request.append(mPath);
+        request.append(" HTTP/1.1\r\n");
+        request.append("Host: ");
+        request.append(mHost);
+        request.append("\r\n");
+
+        if (offset != 0) {
+            char rangeHeader[128];
+            sprintf(rangeHeader, "Range: bytes=%ld-\r\n", offset);
+            request.append(rangeHeader);
+        }
+
+        request.append(mHeaders);
+        request.append("\r\n");
+
+        int httpStatus;
+        if ((err = mHTTP.send(request.string(), request.size())) != OK
+                || (err = mHTTP.receive_header(&httpStatus)) != OK) {
+            mHTTP.disconnect();
+            mState = DISCONNECTED;
+            return err;
+        }
+
+        if (httpStatus == 302) {
+            string value;
+            CHECK(mHTTP.find_header_value("Location", &value));
+
+            mState = DISCONNECTED;
+
+            mHTTP.disconnect();
+
+            return connect(value.c_str(), headers, offset);
+        }
+
+        if (httpStatus < 200 || httpStatus >= 300) {
+            mState = DISCONNECTED;
+            mHTTP.disconnect();
+
+            return ERROR_IO;
+        }
+
+        applyTimeoutResponse();
+
+        if (offset == 0) {
+            string value;
+            unsigned long x;
+            if (mHTTP.find_header_value(string("Content-Length"), &value)
+                    && ParseSingleUnsignedLong(value.c_str(), &x)) {
+                mContentLength = (off_t)x;
+                mContentLengthValid = true;
+            }
+        } else {
+            string value;
+            unsigned long x;
+            if (mHTTP.find_header_value(string("Content-Range"), &value)) {
+                const char *slashPos = strchr(value.c_str(), '/');
+                if (slashPos != NULL
+                        && ParseSingleUnsignedLong(slashPos + 1, &x)) {
+                    mContentLength = x;
+                    mContentLengthValid = true;
+                }
+            }
+        }
+    }
+
+    return err;
+}
+
+void NuHTTPDataSource::disconnect() {
+    if (mState == CONNECTING || mState == CONNECTED) {
+        mHTTP.disconnect();
+    }
+    mState = DISCONNECTED;
+}
+
+status_t NuHTTPDataSource::initCheck() const {
+    return mState == CONNECTED ? OK : NO_INIT;
+}
+
+ssize_t NuHTTPDataSource::readAt(off_t offset, void *data, size_t size) {
+    LOGV("readAt offset %ld, size %d", offset, size);
+
+    Mutex::Autolock autoLock(mLock);
+
+    if (offset != mOffset) {
+        String8 host = mHost;
+        String8 path = mPath;
+        String8 headers = mHeaders;
+        status_t err = connect(host, mPort, path, headers, offset);
+
+        if (err != OK) {
+            return err;
+        }
+    }
+
+    if (mContentLengthValid) {
+        size_t avail =
+            (offset >= mContentLength) ? 0 : mContentLength - offset;
+
+        if (size > avail) {
+            size = avail;
+        }
+    }
+
+    size_t numBytesRead = 0;
+    while (numBytesRead < size) {
+        ssize_t n =
+            mHTTP.receive((uint8_t *)data + numBytesRead, size - numBytesRead);
+
+        if (n < 0) {
+            return n;
+        }
+
+        numBytesRead += (size_t)n;
+
+        if (n == 0) {
+            if (mContentLengthValid) {
+                // We know the content length and made sure not to read beyond
+                // it and yet the server closed the connection on us.
+                return ERROR_IO;
+            }
+
+            break;
+        }
+    }
+
+    mOffset += numBytesRead;
+
+    return numBytesRead;
+}
+
+status_t NuHTTPDataSource::getSize(off_t *size) {
+    *size = 0;
+
+    if (mState != CONNECTED) {
+        return ERROR_IO;
+    }
+
+    if (mContentLengthValid) {
+        *size = mContentLength;
+        return OK;
+    }
+
+    return ERROR_UNSUPPORTED;
+}
+
+uint32_t NuHTTPDataSource::flags() {
+    return kWantsPrefetching;
+}
+
+// static
+void NuHTTPDataSource::MakeFullHeaders(
+        const KeyedVector<String8, String8> *overrides, String8 *headers) {
+    headers->setTo("");
+
+    headers->append("User-Agent: stagefright/1.1 (Linux;Android ");
+
+#if (PROPERTY_VALUE_MAX < 8)
+#error "PROPERTY_VALUE_MAX must be at least 8"
+#endif
+
+    char value[PROPERTY_VALUE_MAX];
+    property_get("ro.build.version.release", value, "Unknown");
+    headers->append(value);
+    headers->append(")\r\n");
+
+    if (overrides == NULL) {
+        return;
+    }
+
+    for (size_t i = 0; i < overrides->size(); ++i) {
+        String8 line;
+        line.append(overrides->keyAt(i));
+        line.append(": ");
+        line.append(overrides->valueAt(i));
+        line.append("\r\n");
+
+        headers->append(line);
+    }
+}
+
+void NuHTTPDataSource::applyTimeoutResponse() {
+    string timeout;
+    if (mHTTP.find_header_value("X-SocketTimeout", &timeout)) {
+        const char *s = timeout.c_str();
+        char *end;
+        long tmp = strtol(s, &end, 10);
+        if (end == s || *end != '\0') {
+            LOGW("Illegal X-SocketTimeout value given.");
+            return;
+        }
+
+        LOGI("overriding default timeout, new timeout is %ld seconds", tmp);
+        mHTTP.setReceiveTimeout(tmp);
+    }
+}
+
+}  // namespace android
diff --git a/media/libstagefright/OMXCodec.cpp b/media/libstagefright/OMXCodec.cpp
index 69da7ef..7762bf4 100644
--- a/media/libstagefright/OMXCodec.cpp
+++ b/media/libstagefright/OMXCodec.cpp
@@ -19,13 +19,18 @@
 #include <utils/Log.h>
 
 #include "include/AACDecoder.h"
+#include "include/AACEncoder.h"
 #include "include/AMRNBDecoder.h"
 #include "include/AMRNBEncoder.h"
 #include "include/AMRWBDecoder.h"
+#include "include/AMRWBEncoder.h"
 #include "include/AVCDecoder.h"
+#include "include/AVCEncoder.h"
 #include "include/M4vH263Decoder.h"
+#include "include/M4vH263Encoder.h"
 #include "include/MP3Decoder.h"
 #include "include/VorbisDecoder.h"
+#include "include/VPXDecoder.h"
 
 #include "include/ESDS.h"
 
@@ -60,6 +65,11 @@
     return new name(source); \
 }
 
+#define FACTORY_CREATE_ENCODER(name) \
+static sp<MediaSource> Make##name(const sp<MediaSource> &source, const sp<MetaData> &meta) { \
+    return new name(source, meta); \
+}
+
 #define FACTORY_REF(name) { #name, Make##name },
 
 FACTORY_CREATE(MP3Decoder)
@@ -69,7 +79,37 @@
 FACTORY_CREATE(AVCDecoder)
 FACTORY_CREATE(M4vH263Decoder)
 FACTORY_CREATE(VorbisDecoder)
-FACTORY_CREATE(AMRNBEncoder)
+FACTORY_CREATE(VPXDecoder)
+FACTORY_CREATE_ENCODER(AMRNBEncoder)
+FACTORY_CREATE_ENCODER(AMRWBEncoder)
+FACTORY_CREATE_ENCODER(AACEncoder)
+FACTORY_CREATE_ENCODER(AVCEncoder)
+FACTORY_CREATE_ENCODER(M4vH263Encoder)
+
+static sp<MediaSource> InstantiateSoftwareEncoder(
+        const char *name, const sp<MediaSource> &source,
+        const sp<MetaData> &meta) {
+    struct FactoryInfo {
+        const char *name;
+        sp<MediaSource> (*CreateFunc)(const sp<MediaSource> &, const sp<MetaData> &);
+    };
+
+    static const FactoryInfo kFactoryInfo[] = {
+        FACTORY_REF(AMRNBEncoder)
+        FACTORY_REF(AMRWBEncoder)
+        FACTORY_REF(AACEncoder)
+        FACTORY_REF(AVCEncoder)
+        FACTORY_REF(M4vH263Encoder)
+    };
+    for (size_t i = 0;
+         i < sizeof(kFactoryInfo) / sizeof(kFactoryInfo[0]); ++i) {
+        if (!strcmp(name, kFactoryInfo[i].name)) {
+            return (*kFactoryInfo[i].CreateFunc)(source, meta);
+        }
+    }
+
+    return NULL;
+}
 
 static sp<MediaSource> InstantiateSoftwareCodec(
         const char *name, const sp<MediaSource> &source) {
@@ -86,7 +126,7 @@
         FACTORY_REF(AVCDecoder)
         FACTORY_REF(M4vH263Decoder)
         FACTORY_REF(VorbisDecoder)
-        FACTORY_REF(AMRNBEncoder)
+        FACTORY_REF(VPXDecoder)
     };
     for (size_t i = 0;
          i < sizeof(kFactoryInfo) / sizeof(kFactoryInfo[0]); ++i) {
@@ -115,34 +155,47 @@
     { MEDIA_MIMETYPE_AUDIO_AAC, "OMX.TI.AAC.decode" },
     { MEDIA_MIMETYPE_AUDIO_AAC, "AACDecoder" },
 //    { MEDIA_MIMETYPE_AUDIO_AAC, "OMX.PV.aacdec" },
+    { MEDIA_MIMETYPE_VIDEO_MPEG4, "OMX.qcom.7x30.video.decoder.mpeg4" },
     { MEDIA_MIMETYPE_VIDEO_MPEG4, "OMX.qcom.video.decoder.mpeg4" },
     { MEDIA_MIMETYPE_VIDEO_MPEG4, "OMX.TI.Video.Decoder" },
     { MEDIA_MIMETYPE_VIDEO_MPEG4, "M4vH263Decoder" },
 //    { MEDIA_MIMETYPE_VIDEO_MPEG4, "OMX.PV.mpeg4dec" },
+    { MEDIA_MIMETYPE_VIDEO_H263, "OMX.qcom.7x30.video.decoder.h263" },
     { MEDIA_MIMETYPE_VIDEO_H263, "OMX.qcom.video.decoder.h263" },
     { MEDIA_MIMETYPE_VIDEO_H263, "M4vH263Decoder" },
 //    { MEDIA_MIMETYPE_VIDEO_H263, "OMX.PV.h263dec" },
+    { MEDIA_MIMETYPE_VIDEO_AVC, "OMX.qcom.7x30.video.decoder.avc" },
     { MEDIA_MIMETYPE_VIDEO_AVC, "OMX.qcom.video.decoder.avc" },
     { MEDIA_MIMETYPE_VIDEO_AVC, "OMX.TI.Video.Decoder" },
     { MEDIA_MIMETYPE_VIDEO_AVC, "AVCDecoder" },
 //    { MEDIA_MIMETYPE_VIDEO_AVC, "OMX.PV.avcdec" },
     { MEDIA_MIMETYPE_AUDIO_VORBIS, "VorbisDecoder" },
+    { MEDIA_MIMETYPE_VIDEO_VPX, "VPXDecoder" },
 };
 
 static const CodecInfo kEncoderInfo[] = {
     { MEDIA_MIMETYPE_AUDIO_AMR_NB, "OMX.TI.AMR.encode" },
     { MEDIA_MIMETYPE_AUDIO_AMR_NB, "AMRNBEncoder" },
     { MEDIA_MIMETYPE_AUDIO_AMR_WB, "OMX.TI.WBAMR.encode" },
+    { MEDIA_MIMETYPE_AUDIO_AMR_WB, "AMRWBEncoder" },
     { MEDIA_MIMETYPE_AUDIO_AAC, "OMX.TI.AAC.encode" },
-    { MEDIA_MIMETYPE_AUDIO_AAC, "OMX.PV.aacenc" },
+    { MEDIA_MIMETYPE_AUDIO_AAC, "AACEncoder" },
+//    { MEDIA_MIMETYPE_AUDIO_AAC, "OMX.PV.aacenc" },
+    { MEDIA_MIMETYPE_VIDEO_MPEG4, "OMX.qcom.7x30.video.encoder.mpeg4" },
     { MEDIA_MIMETYPE_VIDEO_MPEG4, "OMX.qcom.video.encoder.mpeg4" },
     { MEDIA_MIMETYPE_VIDEO_MPEG4, "OMX.TI.Video.encoder" },
-    { MEDIA_MIMETYPE_VIDEO_MPEG4, "OMX.PV.mpeg4enc" },
+    { MEDIA_MIMETYPE_VIDEO_MPEG4, "M4vH263Encoder" },
+//    { MEDIA_MIMETYPE_VIDEO_MPEG4, "OMX.PV.mpeg4enc" },
+    { MEDIA_MIMETYPE_VIDEO_H263, "OMX.qcom.7x30.video.encoder.h263" },
     { MEDIA_MIMETYPE_VIDEO_H263, "OMX.qcom.video.encoder.h263" },
     { MEDIA_MIMETYPE_VIDEO_H263, "OMX.TI.Video.encoder" },
-    { MEDIA_MIMETYPE_VIDEO_H263, "OMX.PV.h263enc" },
+    { MEDIA_MIMETYPE_VIDEO_H263, "M4vH263Encoder" },
+//    { MEDIA_MIMETYPE_VIDEO_H263, "OMX.PV.h263enc" },
+    { MEDIA_MIMETYPE_VIDEO_AVC, "OMX.qcom.7x30.video.encoder.avc" },
+    { MEDIA_MIMETYPE_VIDEO_AVC, "OMX.qcom.video.encoder.avc" },
     { MEDIA_MIMETYPE_VIDEO_AVC, "OMX.TI.Video.encoder" },
-    { MEDIA_MIMETYPE_VIDEO_AVC, "OMX.PV.avcenc" },
+    { MEDIA_MIMETYPE_VIDEO_AVC, "AVCEncoder" },
+//    { MEDIA_MIMETYPE_VIDEO_AVC, "OMX.PV.avcenc" },
 };
 
 #undef OPTIONAL
@@ -296,10 +349,17 @@
         quirks |= kRequiresAllocateBufferOnInputPorts;
         quirks |= kRequiresAllocateBufferOnOutputPorts;
     }
+    if (!strncmp(componentName, "OMX.qcom.7x30.video.encoder.", 28)) {
+    }
     if (!strncmp(componentName, "OMX.qcom.video.decoder.", 23)) {
         quirks |= kRequiresAllocateBufferOnOutputPorts;
         quirks |= kDefersOutputBufferAllocation;
     }
+    if (!strncmp(componentName, "OMX.qcom.7x30.video.decoder.", 28)) {
+        quirks |= kRequiresAllocateBufferOnInputPorts;
+        quirks |= kRequiresAllocateBufferOnOutputPorts;
+        quirks |= kDefersOutputBufferAllocation;
+    }
 
     if (!strncmp(componentName, "OMX.TI.", 7)) {
         // Apparently I must not use OMX_UseBuffer on either input or
@@ -309,6 +369,9 @@
 
         quirks |= kRequiresAllocateBufferOnInputPorts;
         quirks |= kRequiresAllocateBufferOnOutputPorts;
+        if (!strncmp(componentName, "OMX.TI.Video.encoder", 20)) {
+            quirks |= kAvoidMemcopyInputRecordingFrames;
+        }
     }
 
     if (!strcmp(componentName, "OMX.TI.Video.Decoder")) {
@@ -384,8 +447,8 @@
     for (size_t i = 0; i < matchingCodecs.size(); ++i) {
         componentName = matchingCodecs[i].string();
 
-#if BUILD_WITH_FULL_STAGEFRIGHT
-        sp<MediaSource> softwareCodec =
+        sp<MediaSource> softwareCodec = createEncoder?
+            InstantiateSoftwareEncoder(componentName, source, meta):
             InstantiateSoftwareCodec(componentName, source);
 
         if (softwareCodec != NULL) {
@@ -393,7 +456,6 @@
 
             return softwareCodec;
         }
-#endif
 
         LOGV("Attempting to allocate OMX node '%s'", componentName);
 
@@ -496,11 +558,12 @@
             size -= length;
         }
 
-        LOGV("AVC profile = %d (%s), level = %d",
-             (int)profile, AVCProfileToString(profile), (int)level / 10);
+        CODEC_LOGV(
+                "AVC profile = %d (%s), level = %d",
+                (int)profile, AVCProfileToString(profile), level);
 
         if (!strcmp(mComponentName, "OMX.TI.Video.Decoder")
-            && (profile != kAVCProfileBaseline || level > 39)) {
+            && (profile != kAVCProfileBaseline || level > 30)) {
             // This stream exceeds the decoder's capabilities. The decoder
             // does not handle this gracefully and would clobber the heap
             // and wreak havoc instead...
@@ -510,28 +573,33 @@
         }
     }
 
+    int32_t bitRate = 0;
+    if (mIsEncoder) {
+        CHECK(meta->findInt32(kKeyBitRate, &bitRate));
+    }
     if (!strcasecmp(MEDIA_MIMETYPE_AUDIO_AMR_NB, mMIME)) {
-        setAMRFormat(false /* isWAMR */);
+        setAMRFormat(false /* isWAMR */, bitRate);
     }
     if (!strcasecmp(MEDIA_MIMETYPE_AUDIO_AMR_WB, mMIME)) {
-        setAMRFormat(true /* isWAMR */);
+        setAMRFormat(true /* isWAMR */, bitRate);
     }
     if (!strcasecmp(MEDIA_MIMETYPE_AUDIO_AAC, mMIME)) {
         int32_t numChannels, sampleRate;
         CHECK(meta->findInt32(kKeyChannelCount, &numChannels));
         CHECK(meta->findInt32(kKeySampleRate, &sampleRate));
 
-        setAACFormat(numChannels, sampleRate);
+        setAACFormat(numChannels, sampleRate, bitRate);
     }
+
     if (!strncasecmp(mMIME, "video/", 6)) {
-        int32_t width, height;
-        bool success = meta->findInt32(kKeyWidth, &width);
-        success = success && meta->findInt32(kKeyHeight, &height);
-        CHECK(success);
 
         if (mIsEncoder) {
-            setVideoInputFormat(mMIME, width, height);
+            setVideoInputFormat(mMIME, meta);
         } else {
+            int32_t width, height;
+            bool success = meta->findInt32(kKeyWidth, &width);
+            success = success && meta->findInt32(kKeyHeight, &height);
+            CHECK(success);
             status_t err = setVideoOutputFormat(
                     mMIME, width, height);
 
@@ -570,7 +638,8 @@
     }
 
     if (!strcmp(mComponentName, "OMX.TI.AMR.encode")
-        || !strcmp(mComponentName, "OMX.TI.WBAMR.encode")) {
+        || !strcmp(mComponentName, "OMX.TI.WBAMR.encode")
+        || !strcmp(mComponentName, "OMX.TI.AAC.encode")) {
         setMinBufferSize(kPortIndexOutput, 8192);  // XXX
     }
 
@@ -683,6 +752,7 @@
         case OMX_COLOR_FormatCbYCrY:
             return width * height * 2;
 
+        case OMX_COLOR_FormatYUV420Planar:
         case OMX_COLOR_FormatYUV420SemiPlanar:
             return (width * height * 3) / 2;
 
@@ -693,8 +763,17 @@
 }
 
 void OMXCodec::setVideoInputFormat(
-        const char *mime, OMX_U32 width, OMX_U32 height) {
-    CODEC_LOGV("setVideoInputFormat width=%ld, height=%ld", width, height);
+        const char *mime, const sp<MetaData>& meta) {
+
+    int32_t width, height, frameRate, bitRate, stride, sliceHeight;
+    bool success = meta->findInt32(kKeyWidth, &width);
+    success = success && meta->findInt32(kKeyHeight, &height);
+    success = success && meta->findInt32(kKeySampleRate, &frameRate);
+    success = success && meta->findInt32(kKeyBitRate, &bitRate);
+    success = success && meta->findInt32(kKeyStride, &stride);
+    success = success && meta->findInt32(kKeySliceHeight, &sliceHeight);
+    CHECK(success);
+    CHECK(stride != 0);
 
     OMX_VIDEO_CODINGTYPE compressionFormat = OMX_VIDEO_CodingUnused;
     if (!strcasecmp(MEDIA_MIMETYPE_VIDEO_AVC, mime)) {
@@ -713,38 +792,15 @@
         colorFormat = OMX_COLOR_FormatYCbYCr;
     }
 
+    status_t err;
+    OMX_PARAM_PORTDEFINITIONTYPE def;
+    OMX_VIDEO_PORTDEFINITIONTYPE *video_def = &def.format.video;
+
+    //////////////////////// Input port /////////////////////////
     CHECK_EQ(setVideoPortFormatType(
             kPortIndexInput, OMX_VIDEO_CodingUnused,
             colorFormat), OK);
 
-    CHECK_EQ(setVideoPortFormatType(
-            kPortIndexOutput, compressionFormat, OMX_COLOR_FormatUnused),
-            OK);
-
-    OMX_PARAM_PORTDEFINITIONTYPE def;
-    InitOMXParams(&def);
-    def.nPortIndex = kPortIndexOutput;
-
-    OMX_VIDEO_PORTDEFINITIONTYPE *video_def = &def.format.video;
-
-    status_t err = mOMX->getParameter(
-            mNode, OMX_IndexParamPortDefinition, &def, sizeof(def));
-
-    CHECK_EQ(err, OK);
-    CHECK_EQ(def.eDomain, OMX_PortDomainVideo);
-
-    video_def->nFrameWidth = width;
-    video_def->nFrameHeight = height;
-
-    video_def->eCompressionFormat = compressionFormat;
-    video_def->eColorFormat = OMX_COLOR_FormatUnused;
-
-    err = mOMX->setParameter(
-            mNode, OMX_IndexParamPortDefinition, &def, sizeof(def));
-    CHECK_EQ(err, OK);
-
-    ////////////////////////////////////////////////////////////////////////////
-
     InitOMXParams(&def);
     def.nPortIndex = kPortIndexInput;
 
@@ -752,35 +808,62 @@
             mNode, OMX_IndexParamPortDefinition, &def, sizeof(def));
     CHECK_EQ(err, OK);
 
-    def.nBufferSize = getFrameSize(colorFormat, width, height);
-    CODEC_LOGV("Setting nBufferSize = %ld", def.nBufferSize);
+    def.nBufferSize = getFrameSize(colorFormat,
+            stride > 0? stride: -stride, sliceHeight);
 
     CHECK_EQ(def.eDomain, OMX_PortDomainVideo);
 
     video_def->nFrameWidth = width;
     video_def->nFrameHeight = height;
+    video_def->nStride = stride;
+    video_def->nSliceHeight = sliceHeight;
+    video_def->xFramerate = (frameRate << 16);  // Q16 format
     video_def->eCompressionFormat = OMX_VIDEO_CodingUnused;
     video_def->eColorFormat = colorFormat;
 
-    video_def->xFramerate = 24 << 16;  // XXX crucial!
-
     err = mOMX->setParameter(
             mNode, OMX_IndexParamPortDefinition, &def, sizeof(def));
     CHECK_EQ(err, OK);
 
+    //////////////////////// Output port /////////////////////////
+    CHECK_EQ(setVideoPortFormatType(
+            kPortIndexOutput, compressionFormat, OMX_COLOR_FormatUnused),
+            OK);
+    InitOMXParams(&def);
+    def.nPortIndex = kPortIndexOutput;
+
+    err = mOMX->getParameter(
+            mNode, OMX_IndexParamPortDefinition, &def, sizeof(def));
+
+    CHECK_EQ(err, OK);
+    CHECK_EQ(def.eDomain, OMX_PortDomainVideo);
+
+    video_def->nFrameWidth = width;
+    video_def->nFrameHeight = height;
+    video_def->xFramerate = 0;      // No need for output port
+    video_def->nBitrate = bitRate;  // Q16 format
+    video_def->eCompressionFormat = compressionFormat;
+    video_def->eColorFormat = OMX_COLOR_FormatUnused;
+
+    err = mOMX->setParameter(
+            mNode, OMX_IndexParamPortDefinition, &def, sizeof(def));
+    CHECK_EQ(err, OK);
+
+    /////////////////// Codec-specific ////////////////////////
     switch (compressionFormat) {
         case OMX_VIDEO_CodingMPEG4:
         {
-            CHECK_EQ(setupMPEG4EncoderParameters(), OK);
+            CHECK_EQ(setupMPEG4EncoderParameters(meta), OK);
             break;
         }
 
         case OMX_VIDEO_CodingH263:
+            CHECK_EQ(setupH263EncoderParameters(meta), OK);
             break;
 
         case OMX_VIDEO_CodingAVC:
         {
-            CHECK_EQ(setupAVCEncoderParameters(), OK);
+            CHECK_EQ(setupAVCEncoderParameters(meta), OK);
             break;
         }
 
@@ -790,7 +873,159 @@
     }
 }
 
-status_t OMXCodec::setupMPEG4EncoderParameters() {
+static OMX_U32 setPFramesSpacing(int32_t iFramesInterval, int32_t frameRate) {
+    if (iFramesInterval < 0) {
+        return 0xFFFFFFFF;
+    } else if (iFramesInterval == 0) {
+        return 0;
+    }
+    OMX_U32 ret = frameRate * iFramesInterval;
+    CHECK(ret > 1);
+    return ret;
+}
+
+status_t OMXCodec::setupErrorCorrectionParameters() {
+    OMX_VIDEO_PARAM_ERRORCORRECTIONTYPE errorCorrectionType;
+    InitOMXParams(&errorCorrectionType);
+    errorCorrectionType.nPortIndex = kPortIndexOutput;
+
+    status_t err = mOMX->getParameter(
+            mNode, OMX_IndexParamVideoErrorCorrection,
+            &errorCorrectionType, sizeof(errorCorrectionType));
+    CHECK_EQ(err, OK);
+
+    errorCorrectionType.bEnableHEC = OMX_FALSE;
+    errorCorrectionType.bEnableResync = OMX_TRUE;
+    errorCorrectionType.nResynchMarkerSpacing = 256;
+    errorCorrectionType.bEnableDataPartitioning = OMX_FALSE;
+    errorCorrectionType.bEnableRVLC = OMX_FALSE;
+
+    err = mOMX->setParameter(
+            mNode, OMX_IndexParamVideoErrorCorrection,
+            &errorCorrectionType, sizeof(errorCorrectionType));
+    CHECK_EQ(err, OK);
+    return OK;
+}
+
+status_t OMXCodec::setupBitRate(int32_t bitRate) {
+    OMX_VIDEO_PARAM_BITRATETYPE bitrateType;
+    InitOMXParams(&bitrateType);
+    bitrateType.nPortIndex = kPortIndexOutput;
+
+    status_t err = mOMX->getParameter(
+            mNode, OMX_IndexParamVideoBitrate,
+            &bitrateType, sizeof(bitrateType));
+    CHECK_EQ(err, OK);
+
+    bitrateType.eControlRate = OMX_Video_ControlRateVariable;
+    bitrateType.nTargetBitrate = bitRate;
+
+    err = mOMX->setParameter(
+            mNode, OMX_IndexParamVideoBitrate,
+            &bitrateType, sizeof(bitrateType));
+    CHECK_EQ(err, OK);
+    return OK;
+}
+
+status_t OMXCodec::getVideoProfileLevel(
+        const sp<MetaData>& meta,
+        const CodecProfileLevel& defaultProfileLevel,
+        CodecProfileLevel &profileLevel) {
+    CODEC_LOGV("Default profile: %ld, level %ld",
+            defaultProfileLevel.mProfile, defaultProfileLevel.mLevel);
+
+    // Are the default profile and level overwriten?
+    int32_t profile, level;
+    if (!meta->findInt32(kKeyVideoProfile, &profile)) {
+        profile = defaultProfileLevel.mProfile;
+    }
+    if (!meta->findInt32(kKeyVideoLevel, &level)) {
+        level = defaultProfileLevel.mLevel;
+    }
+    CODEC_LOGV("Target profile: %d, level: %d", profile, level);
+
+    // Are the target profile and level supported by the encoder?
+    OMX_VIDEO_PARAM_PROFILELEVELTYPE param;
+    InitOMXParams(&param);
+    param.nPortIndex = kPortIndexOutput;
+    for (param.nProfileIndex = 0;; ++param.nProfileIndex) {
+        status_t err = mOMX->getParameter(
+                mNode, OMX_IndexParamVideoProfileLevelQuerySupported,
+                &param, sizeof(param));
+
+        if (err != OK) return err;
+
+        int32_t supportedProfile = static_cast<int32_t>(param.eProfile);
+        int32_t supportedLevel = static_cast<int32_t>(param.eLevel);
+        CODEC_LOGV("Supported profile: %d, level %d",
+            supportedProfile, supportedLevel);
+
+        if (profile == supportedProfile &&
+            level == supportedLevel) {
+            profileLevel.mProfile = profile;
+            profileLevel.mLevel = level;
+            return OK;
+        }
+    }
+
+    CODEC_LOGE("Target profile (%d) and level (%d) is not supported",
+            profile, level);
+    return BAD_VALUE;
+}
+
+status_t OMXCodec::setupH263EncoderParameters(const sp<MetaData>& meta) {
+    int32_t iFramesInterval, frameRate, bitRate;
+    bool success = meta->findInt32(kKeyBitRate, &bitRate);
+    success = success && meta->findInt32(kKeySampleRate, &frameRate);
+    success = success && meta->findInt32(kKeyIFramesInterval, &iFramesInterval);
+    CHECK(success);
+    OMX_VIDEO_PARAM_H263TYPE h263type;
+    InitOMXParams(&h263type);
+    h263type.nPortIndex = kPortIndexOutput;
+
+    status_t err = mOMX->getParameter(
+            mNode, OMX_IndexParamVideoH263, &h263type, sizeof(h263type));
+    CHECK_EQ(err, OK);
+
+    h263type.nAllowedPictureTypes =
+        OMX_VIDEO_PictureTypeI | OMX_VIDEO_PictureTypeP;
+
+    h263type.nPFrames = setPFramesSpacing(iFramesInterval, frameRate);
+    if (h263type.nPFrames == 0) {
+        h263type.nAllowedPictureTypes = OMX_VIDEO_PictureTypeI;
+    }
+    h263type.nBFrames = 0;
+
+    // Check profile and level parameters
+    CodecProfileLevel defaultProfileLevel, profileLevel;
+    defaultProfileLevel.mProfile = OMX_VIDEO_H263ProfileBaseline;
+    defaultProfileLevel.mLevel = OMX_VIDEO_H263Level45;
+    err = getVideoProfileLevel(meta, defaultProfileLevel, profileLevel);
+    if (err != OK) return err;
+    h263type.eProfile = static_cast<OMX_VIDEO_H263PROFILETYPE>(profileLevel.mProfile);
+    h263type.eLevel = static_cast<OMX_VIDEO_H263LEVELTYPE>(profileLevel.mLevel);
+
+    h263type.bPLUSPTYPEAllowed = OMX_FALSE;
+    h263type.bForceRoundingTypeToZero = OMX_FALSE;
+    h263type.nPictureHeaderRepetition = 0;
+    h263type.nGOBHeaderInterval = 0;
+
+    err = mOMX->setParameter(
+            mNode, OMX_IndexParamVideoH263, &h263type, sizeof(h263type));
+    CHECK_EQ(err, OK);
+
+    CHECK_EQ(setupBitRate(bitRate), OK);
+    CHECK_EQ(setupErrorCorrectionParameters(), OK);
+
+    return OK;
+}
+
+status_t OMXCodec::setupMPEG4EncoderParameters(const sp<MetaData>& meta) {
+    int32_t iFramesInterval, frameRate, bitRate;
+    bool success = meta->findInt32(kKeyBitRate, &bitRate);
+    success = success && meta->findInt32(kKeySampleRate, &frameRate);
+    success = success && meta->findInt32(kKeyIFramesInterval, &iFramesInterval);
+    CHECK(success);
     OMX_VIDEO_PARAM_MPEG4TYPE mpeg4type;
     InitOMXParams(&mpeg4type);
     mpeg4type.nPortIndex = kPortIndexOutput;
@@ -806,9 +1041,11 @@
     mpeg4type.nAllowedPictureTypes =
         OMX_VIDEO_PictureTypeI | OMX_VIDEO_PictureTypeP;
 
-    mpeg4type.nPFrames = 23;
+    mpeg4type.nPFrames = setPFramesSpacing(iFramesInterval, frameRate);
+    if (mpeg4type.nPFrames == 0) {
+        mpeg4type.nAllowedPictureTypes = OMX_VIDEO_PictureTypeI;
+    }
     mpeg4type.nBFrames = 0;
-
     mpeg4type.nIDCVLCThreshold = 0;
     mpeg4type.bACPred = OMX_TRUE;
     mpeg4type.nMaxPacketSize = 256;
@@ -816,58 +1053,32 @@
     mpeg4type.nHeaderExtension = 0;
     mpeg4type.bReversibleVLC = OMX_FALSE;
 
-    mpeg4type.eProfile = OMX_VIDEO_MPEG4ProfileCore;
-    mpeg4type.eLevel = OMX_VIDEO_MPEG4Level2;
+    // Check profile and level parameters
+    CodecProfileLevel defaultProfileLevel, profileLevel;
+    defaultProfileLevel.mProfile = OMX_VIDEO_MPEG4ProfileSimple;
+    defaultProfileLevel.mLevel = OMX_VIDEO_MPEG4Level2;
+    err = getVideoProfileLevel(meta, defaultProfileLevel, profileLevel);
+    if (err != OK) return err;
+    mpeg4type.eProfile = static_cast<OMX_VIDEO_MPEG4PROFILETYPE>(profileLevel.mProfile);
+    mpeg4type.eLevel = static_cast<OMX_VIDEO_MPEG4LEVELTYPE>(profileLevel.mLevel);
 
     err = mOMX->setParameter(
             mNode, OMX_IndexParamVideoMpeg4, &mpeg4type, sizeof(mpeg4type));
     CHECK_EQ(err, OK);
 
-    // ----------------
-
-    OMX_VIDEO_PARAM_BITRATETYPE bitrateType;
-    InitOMXParams(&bitrateType);
-    bitrateType.nPortIndex = kPortIndexOutput;
-
-    err = mOMX->getParameter(
-            mNode, OMX_IndexParamVideoBitrate,
-            &bitrateType, sizeof(bitrateType));
-    CHECK_EQ(err, OK);
-
-    bitrateType.eControlRate = OMX_Video_ControlRateVariable;
-    bitrateType.nTargetBitrate = 1000000;
-
-    err = mOMX->setParameter(
-            mNode, OMX_IndexParamVideoBitrate,
-            &bitrateType, sizeof(bitrateType));
-    CHECK_EQ(err, OK);
-
-    // ----------------
-
-    OMX_VIDEO_PARAM_ERRORCORRECTIONTYPE errorCorrectionType;
-    InitOMXParams(&errorCorrectionType);
-    errorCorrectionType.nPortIndex = kPortIndexOutput;
-
-    err = mOMX->getParameter(
-            mNode, OMX_IndexParamVideoErrorCorrection,
-            &errorCorrectionType, sizeof(errorCorrectionType));
-    CHECK_EQ(err, OK);
-
-    errorCorrectionType.bEnableHEC = OMX_FALSE;
-    errorCorrectionType.bEnableResync = OMX_TRUE;
-    errorCorrectionType.nResynchMarkerSpacing = 256;
-    errorCorrectionType.bEnableDataPartitioning = OMX_FALSE;
-    errorCorrectionType.bEnableRVLC = OMX_FALSE;
-
-    err = mOMX->setParameter(
-            mNode, OMX_IndexParamVideoErrorCorrection,
-            &errorCorrectionType, sizeof(errorCorrectionType));
-    CHECK_EQ(err, OK);
+    CHECK_EQ(setupBitRate(bitRate), OK);
+    CHECK_EQ(setupErrorCorrectionParameters(), OK);
 
     return OK;
 }
 
-status_t OMXCodec::setupAVCEncoderParameters() {
+status_t OMXCodec::setupAVCEncoderParameters(const sp<MetaData>& meta) {
+    int32_t iFramesInterval, frameRate, bitRate;
+    bool success = meta->findInt32(kKeyBitRate, &bitRate);
+    success = success && meta->findInt32(kKeySampleRate, &frameRate);
+    success = success && meta->findInt32(kKeyIFramesInterval, &iFramesInterval);
+    CHECK(success);
+
     OMX_VIDEO_PARAM_AVCTYPE h264type;
     InitOMXParams(&h264type);
     h264type.nPortIndex = kPortIndexOutput;
@@ -880,47 +1091,51 @@
         OMX_VIDEO_PictureTypeI | OMX_VIDEO_PictureTypeP;
 
     h264type.nSliceHeaderSpacing = 0;
-    h264type.nBFrames = 0;
-    h264type.bUseHadamard = OMX_TRUE;
-    h264type.nRefFrames = 1;
-    h264type.nRefIdx10ActiveMinus1 = 0;
-    h264type.nRefIdx11ActiveMinus1 = 0;
+    h264type.nBFrames = 0;   // No B frames support yet
+    h264type.nPFrames = setPFramesSpacing(iFramesInterval, frameRate);
+    if (h264type.nPFrames == 0) {
+        h264type.nAllowedPictureTypes = OMX_VIDEO_PictureTypeI;
+    }
+
+    // Check profile and level parameters
+    CodecProfileLevel defaultProfileLevel, profileLevel;
+    defaultProfileLevel.mProfile = h264type.eProfile;
+    defaultProfileLevel.mLevel = h264type.eLevel;
+    err = getVideoProfileLevel(meta, defaultProfileLevel, profileLevel);
+    if (err != OK) return err;
+    h264type.eProfile = static_cast<OMX_VIDEO_AVCPROFILETYPE>(profileLevel.mProfile);
+    h264type.eLevel = static_cast<OMX_VIDEO_AVCLEVELTYPE>(profileLevel.mLevel);
+
+    if (h264type.eProfile == OMX_VIDEO_AVCProfileBaseline) {
+        h264type.bUseHadamard = OMX_TRUE;
+        h264type.nRefFrames = 1;
+        h264type.nRefIdx10ActiveMinus1 = 0;
+        h264type.nRefIdx11ActiveMinus1 = 0;
+        h264type.bEntropyCodingCABAC = OMX_FALSE;
+        h264type.bWeightedPPrediction = OMX_FALSE;
+        h264type.bconstIpred = OMX_FALSE;
+        h264type.bDirect8x8Inference = OMX_FALSE;
+        h264type.bDirectSpatialTemporal = OMX_FALSE;
+        h264type.nCabacInitIdc = 0;
+    }
+
+    if (h264type.nBFrames != 0) {
+        h264type.nAllowedPictureTypes |= OMX_VIDEO_PictureTypeB;
+    }
+
     h264type.bEnableUEP = OMX_FALSE;
     h264type.bEnableFMO = OMX_FALSE;
     h264type.bEnableASO = OMX_FALSE;
     h264type.bEnableRS = OMX_FALSE;
-    h264type.eProfile = OMX_VIDEO_AVCProfileBaseline;
-    h264type.eLevel = OMX_VIDEO_AVCLevel1b;
     h264type.bFrameMBsOnly = OMX_TRUE;
     h264type.bMBAFF = OMX_FALSE;
-    h264type.bEntropyCodingCABAC = OMX_FALSE;
-    h264type.bWeightedPPrediction = OMX_FALSE;
-    h264type.bconstIpred = OMX_FALSE;
-    h264type.bDirect8x8Inference = OMX_FALSE;
-    h264type.bDirectSpatialTemporal = OMX_FALSE;
-    h264type.nCabacInitIdc = 0;
     h264type.eLoopFilterMode = OMX_VIDEO_AVCLoopFilterEnable;
 
     err = mOMX->setParameter(
             mNode, OMX_IndexParamVideoAvc, &h264type, sizeof(h264type));
     CHECK_EQ(err, OK);
 
-    OMX_VIDEO_PARAM_BITRATETYPE bitrateType;
-    InitOMXParams(&bitrateType);
-    bitrateType.nPortIndex = kPortIndexOutput;
-
-    err = mOMX->getParameter(
-            mNode, OMX_IndexParamVideoBitrate,
-            &bitrateType, sizeof(bitrateType));
-    CHECK_EQ(err, OK);
-
-    bitrateType.eControlRate = OMX_Video_ControlRateVariable;
-    bitrateType.nTargetBitrate = 1000000;
-
-    err = mOMX->setParameter(
-            mNode, OMX_IndexParamVideoBitrate,
-            &bitrateType, sizeof(bitrateType));
-    CHECK_EQ(err, OK);
+    CHECK_EQ(setupBitRate(bitRate), OK);
 
     return OK;
 }
@@ -1057,7 +1272,8 @@
       mNoMoreOutputData(false),
       mOutputPortSettingsHaveChanged(false),
       mSeekTimeUs(-1),
-      mLeftOverBuffer(NULL) {
+      mLeftOverBuffer(NULL),
+      mPaused(false) {
     mPortStatus[kPortIndexInput] = ENABLED;
     mPortStatus[kPortIndexOutput] = ENABLED;
 
@@ -1647,6 +1863,9 @@
                     CODEC_LOGV("Finished flushing both ports, now continuing from"
                          " seek-time.");
 
+                    // We implicitly resume pulling on our upstream source.
+                    mPaused = false;
+
                     drainInputBuffers();
                     fillOutputBuffers();
                 }
@@ -1946,6 +2165,10 @@
         return;
     }
 
+    if (mPaused) {
+        return;
+    }
+
     status_t err;
 
     bool signalEOS = false;
@@ -2004,9 +2227,15 @@
             break;
         }
 
-        memcpy((uint8_t *)info->mData + offset,
-               (const uint8_t *)srcBuffer->data() + srcBuffer->range_offset(),
-               srcBuffer->range_length());
+        if (mIsEncoder && (mQuirks & kAvoidMemcopyInputRecordingFrames)) {
+            CHECK(mOMXLivesLocally && offset == 0);
+            OMX_BUFFERHEADERTYPE *header = (OMX_BUFFERHEADERTYPE *) info->mBuffer;
+            header->pBuffer = (OMX_U8 *) srcBuffer->data() + srcBuffer->range_offset();
+        } else {
+            memcpy((uint8_t *)info->mData + offset,
+                    (const uint8_t *)srcBuffer->data() + srcBuffer->range_offset(),
+                    srcBuffer->range_length());
+        }
 
         int64_t lastBufferTimeUs;
         CHECK(srcBuffer->meta_data()->findInt64(kKeyTime, &lastBufferTimeUs));
@@ -2128,11 +2357,24 @@
 
 void OMXCodec::setRawAudioFormat(
         OMX_U32 portIndex, int32_t sampleRate, int32_t numChannels) {
+
+    // port definition
+    OMX_PARAM_PORTDEFINITIONTYPE def;
+    InitOMXParams(&def);
+    def.nPortIndex = portIndex;
+    status_t err = mOMX->getParameter(
+            mNode, OMX_IndexParamPortDefinition, &def, sizeof(def));
+    CHECK_EQ(err, OK);
+    def.format.audio.eEncoding = OMX_AUDIO_CodingPCM;
+    CHECK_EQ(mOMX->setParameter(mNode, OMX_IndexParamPortDefinition,
+            &def, sizeof(def)), OK);
+
+    // pcm param
     OMX_AUDIO_PARAM_PCMMODETYPE pcmParams;
     InitOMXParams(&pcmParams);
     pcmParams.nPortIndex = portIndex;
 
-    status_t err = mOMX->getParameter(
+    err = mOMX->getParameter(
             mNode, OMX_IndexParamAudioPcm, &pcmParams, sizeof(pcmParams));
 
     CHECK_EQ(err, OK);
@@ -2159,7 +2401,51 @@
     CHECK_EQ(err, OK);
 }
 
-void OMXCodec::setAMRFormat(bool isWAMR) {
+static OMX_AUDIO_AMRBANDMODETYPE pickModeFromBitRate(bool isAMRWB, int32_t bps) {
+    if (isAMRWB) {
+        if (bps <= 6600) {
+            return OMX_AUDIO_AMRBandModeWB0;
+        } else if (bps <= 8850) {
+            return OMX_AUDIO_AMRBandModeWB1;
+        } else if (bps <= 12650) {
+            return OMX_AUDIO_AMRBandModeWB2;
+        } else if (bps <= 14250) {
+            return OMX_AUDIO_AMRBandModeWB3;
+        } else if (bps <= 15850) {
+            return OMX_AUDIO_AMRBandModeWB4;
+        } else if (bps <= 18250) {
+            return OMX_AUDIO_AMRBandModeWB5;
+        } else if (bps <= 19850) {
+            return OMX_AUDIO_AMRBandModeWB6;
+        } else if (bps <= 23050) {
+            return OMX_AUDIO_AMRBandModeWB7;
+        }
+
+        // 23850 bps
+        return OMX_AUDIO_AMRBandModeWB8;
+    } else {  // AMRNB
+        if (bps <= 4750) {
+            return OMX_AUDIO_AMRBandModeNB0;
+        } else if (bps <= 5150) {
+            return OMX_AUDIO_AMRBandModeNB1;
+        } else if (bps <= 5900) {
+            return OMX_AUDIO_AMRBandModeNB2;
+        } else if (bps <= 6700) {
+            return OMX_AUDIO_AMRBandModeNB3;
+        } else if (bps <= 7400) {
+            return OMX_AUDIO_AMRBandModeNB4;
+        } else if (bps <= 7950) {
+            return OMX_AUDIO_AMRBandModeNB5;
+        } else if (bps <= 10200) {
+            return OMX_AUDIO_AMRBandModeNB6;
+        }
+
+        // 12200 bps
+        return OMX_AUDIO_AMRBandModeNB7;
+    }
+}
+
+void OMXCodec::setAMRFormat(bool isWAMR, int32_t bitRate) {
     OMX_U32 portIndex = mIsEncoder ? kPortIndexOutput : kPortIndexInput;
 
     OMX_AUDIO_PARAM_AMRTYPE def;
@@ -2172,9 +2458,8 @@
     CHECK_EQ(err, OK);
 
     def.eAMRFrameFormat = OMX_AUDIO_AMRFrameFormatFSF;
-    def.eAMRBandMode =
-        isWAMR ? OMX_AUDIO_AMRBandModeWB0 : OMX_AUDIO_AMRBandModeNB0;
 
+    def.eAMRBandMode = pickModeFromBitRate(isWAMR, bitRate);
     err = mOMX->setParameter(mNode, OMX_IndexParamAudioAmr, &def, sizeof(def));
     CHECK_EQ(err, OK);
 
@@ -2191,9 +2476,61 @@
     }
 }
 
-void OMXCodec::setAACFormat(int32_t numChannels, int32_t sampleRate) {
+void OMXCodec::setAACFormat(int32_t numChannels, int32_t sampleRate, int32_t bitRate) {
+    CHECK(numChannels == 1 || numChannels == 2);
     if (mIsEncoder) {
+        //////////////// input port ////////////////////
         setRawAudioFormat(kPortIndexInput, sampleRate, numChannels);
+
+        //////////////// output port ////////////////////
+        // format
+        OMX_AUDIO_PARAM_PORTFORMATTYPE format;
+        format.nPortIndex = kPortIndexOutput;
+        format.nIndex = 0;
+        status_t err = OMX_ErrorNone;
+        while (OMX_ErrorNone == err) {
+            CHECK_EQ(mOMX->getParameter(mNode, OMX_IndexParamAudioPortFormat,
+                    &format, sizeof(format)), OK);
+            if (format.eEncoding == OMX_AUDIO_CodingAAC) {
+                break;
+            }
+            format.nIndex++;
+        }
+        CHECK_EQ(OK, err);
+        CHECK_EQ(mOMX->setParameter(mNode, OMX_IndexParamAudioPortFormat,
+                &format, sizeof(format)), OK);
+
+        // port definition
+        OMX_PARAM_PORTDEFINITIONTYPE def;
+        InitOMXParams(&def);
+        def.nPortIndex = kPortIndexOutput;
+        CHECK_EQ(mOMX->getParameter(mNode, OMX_IndexParamPortDefinition,
+                &def, sizeof(def)), OK);
+        def.format.audio.bFlagErrorConcealment = OMX_TRUE;
+        def.format.audio.eEncoding = OMX_AUDIO_CodingAAC;
+        CHECK_EQ(mOMX->setParameter(mNode, OMX_IndexParamPortDefinition,
+                &def, sizeof(def)), OK);
+
+        // profile
+        OMX_AUDIO_PARAM_AACPROFILETYPE profile;
+        InitOMXParams(&profile);
+        profile.nPortIndex = kPortIndexOutput;
+        CHECK_EQ(mOMX->getParameter(mNode, OMX_IndexParamAudioAac,
+                &profile, sizeof(profile)), OK);
+        profile.nChannels = numChannels;
+        profile.eChannelMode = (numChannels == 1?
+                OMX_AUDIO_ChannelModeMono: OMX_AUDIO_ChannelModeStereo);
+        profile.nSampleRate = sampleRate;
+        profile.nBitRate = bitRate;
+        profile.nAudioBandWidth = 0;
+        profile.nFrameLength = 0;
+        profile.nAACtools = OMX_AUDIO_AACToolAll;
+        profile.nAACERtools = OMX_AUDIO_AACERNone;
+        profile.eAACProfile = OMX_AUDIO_AACObjectLC;
+        profile.eAACStreamFormat = OMX_AUDIO_AACStreamFormatMP4FF;
+        CHECK_EQ(mOMX->setParameter(mNode, OMX_IndexParamAudioAac,
+                &profile, sizeof(profile)), OK);
+
     } else {
         OMX_AUDIO_PARAM_AACPROFILETYPE profile;
         InitOMXParams(&profile);
@@ -2328,7 +2665,7 @@
     mCodecSpecificDataIndex = 0;
 }
 
-status_t OMXCodec::start(MetaData *) {
+status_t OMXCodec::start(MetaData *meta) {
     Mutex::Autolock autoLock(mLock);
 
     if (mState != LOADED) {
@@ -2339,6 +2676,14 @@
     if (mQuirks & kWantsNALFragments) {
         params->setInt32(kKeyWantsNALFragments, true);
     }
+    if (meta) {
+        int64_t startTimeUs = 0;
+        int64_t timeUs;
+        if (meta->findInt64(kKeyTime, &timeUs)) {
+            startTimeUs = timeUs;
+        }
+        params->setInt64(kKeyTime, startTimeUs);
+    }
     status_t err = mSource->start(params.get());
 
     if (err != OK) {
@@ -2352,6 +2697,7 @@
     mOutputPortSettingsHaveChanged = false;
     mSeekTimeUs = -1;
     mFilledBuffers.clear();
+    mPaused = false;
 
     return init();
 }
@@ -2458,6 +2804,7 @@
             // There's no reason to trigger the code below, there's
             // nothing to flush yet.
             seeking = false;
+            mPaused = false;
         }
 
         drainInputBuffers();
@@ -2870,6 +3217,12 @@
 void OMXCodec::initOutputFormat(const sp<MetaData> &inputFormat) {
     mOutputFormat = new MetaData;
     mOutputFormat->setCString(kKeyDecoderComponent, mComponentName);
+    if (mIsEncoder) {
+        int32_t timeScale;
+        if (inputFormat->findInt32(kKeyTimeScale, &timeScale)) {
+            mOutputFormat->setInt32(kKeyTimeScale, timeScale);
+        }
+    }
 
     OMX_PARAM_PORTDEFINITIONTYPE def;
     InitOMXParams(&def);
@@ -2962,6 +3315,13 @@
             } else if (audio_def->eEncoding == OMX_AUDIO_CodingAAC) {
                 mOutputFormat->setCString(
                         kKeyMIMEType, MEDIA_MIMETYPE_AUDIO_AAC);
+                int32_t numChannels, sampleRate, bitRate;
+                inputFormat->findInt32(kKeyChannelCount, &numChannels);
+                inputFormat->findInt32(kKeySampleRate, &sampleRate);
+                inputFormat->findInt32(kKeyBitRate, &bitRate);
+                mOutputFormat->setInt32(kKeyChannelCount, numChannels);
+                mOutputFormat->setInt32(kKeySampleRate, sampleRate);
+                mOutputFormat->setInt32(kKeyBitRate, bitRate);
             } else {
                 CHECK(!"Should not be here. Unknown audio encoding.");
             }
@@ -3011,6 +3371,14 @@
     }
 }
 
+status_t OMXCodec::pause() {
+    Mutex::Autolock autoLock(mLock);
+
+    mPaused = true;
+
+    return OK;
+}
+
 ////////////////////////////////////////////////////////////////////////////////
 
 status_t QueryCodecs(
diff --git a/media/libstagefright/OggExtractor.cpp b/media/libstagefright/OggExtractor.cpp
index d0d1b14..6013b6f 100644
--- a/media/libstagefright/OggExtractor.cpp
+++ b/media/libstagefright/OggExtractor.cpp
@@ -76,7 +76,9 @@
     status_t seekToOffset(off_t offset);
     status_t readNextPacket(MediaBuffer **buffer);
 
-    void init();
+    status_t init();
+
+    sp<MetaData> getFileMetaData() { return mFileMeta; }
 
 private:
     struct Page {
@@ -100,13 +102,17 @@
     vorbis_comment mVc;
 
     sp<MetaData> mMeta;
+    sp<MetaData> mFileMeta;
 
     ssize_t readPage(off_t offset, Page *page);
     status_t findNextPage(off_t startOffset, off_t *pageOffset);
 
-    void verifyHeader(
+    status_t verifyHeader(
             MediaBuffer *buffer, uint8_t type);
 
+    void parseFileMetaData();
+    void extractAlbumArt(const void *data, size_t size);
+
     MyVorbisExtractor(const MyVorbisExtractor &);
     MyVorbisExtractor &operator=(const MyVorbisExtractor &);
 };
@@ -188,9 +194,14 @@
       mNextLaceIndex(0),
       mFirstDataOffset(-1) {
     mCurrentPage.mNumSegments = 0;
+
+    vorbis_info_init(&mVi);
+    vorbis_comment_init(&mVc);
 }
 
 MyVorbisExtractor::~MyVorbisExtractor() {
+    vorbis_comment_clear(&mVc);
+    vorbis_info_clear(&mVi);
 }
 
 sp<MetaData> MyVorbisExtractor::getFormat() const {
@@ -297,6 +308,7 @@
         totalSize += page->mLace[i];
     }
 
+#if 0
     String8 tmp;
     for (size_t i = 0; i < page->mNumSegments; ++i) {
         char x[32];
@@ -306,6 +318,7 @@
     }
 
     LOGV("%c %s", page->mFlags & 1 ? '+' : ' ', tmp.string());
+#endif
 
     return sizeof(header) + page->mNumSegments + totalSize;
 }
@@ -421,47 +434,60 @@
     }
 }
 
-void MyVorbisExtractor::init() {
-    vorbis_info_init(&mVi);
-
-    vorbis_comment mVc;
-
+status_t MyVorbisExtractor::init() {
     mMeta = new MetaData;
     mMeta->setCString(kKeyMIMEType, MEDIA_MIMETYPE_AUDIO_VORBIS);
 
     MediaBuffer *packet;
-    CHECK_EQ(readNextPacket(&packet), OK);
+    status_t err;
+    if ((err = readNextPacket(&packet)) != OK) {
+        return err;
+    }
     LOGV("read packet of size %d\n", packet->range_length());
-    verifyHeader(packet, 1);
+    err = verifyHeader(packet, 1);
     packet->release();
     packet = NULL;
+    if (err != OK) {
+        return err;
+    }
 
-    CHECK_EQ(readNextPacket(&packet), OK);
+    if ((err = readNextPacket(&packet)) != OK) {
+        return err;
+    }
     LOGV("read packet of size %d\n", packet->range_length());
-    verifyHeader(packet, 3);
+    err = verifyHeader(packet, 3);
     packet->release();
     packet = NULL;
+    if (err != OK) {
+        return err;
+    }
 
-    CHECK_EQ(readNextPacket(&packet), OK);
+    if ((err = readNextPacket(&packet)) != OK) {
+        return err;
+    }
     LOGV("read packet of size %d\n", packet->range_length());
-    verifyHeader(packet, 5);
+    err = verifyHeader(packet, 5);
     packet->release();
     packet = NULL;
+    if (err != OK) {
+        return err;
+    }
 
     mFirstDataOffset = mOffset + mCurrentPageSize;
+
+    return OK;
 }
 
-void MyVorbisExtractor::verifyHeader(
+status_t MyVorbisExtractor::verifyHeader(
         MediaBuffer *buffer, uint8_t type) {
     const uint8_t *data =
         (const uint8_t *)buffer->data() + buffer->range_offset();
 
     size_t size = buffer->range_length();
 
-    CHECK(size >= 7);
-
-    CHECK_EQ(data[0], type);
-    CHECK(!memcmp(&data[1], "vorbis", 6));
+    if (size < 7 || data[0] != type || memcmp(&data[1], "vorbis", 6)) {
+        return ERROR_MALFORMED;
+    }
 
     ogg_buffer buf;
     buf.data = (uint8_t *)data;
@@ -508,18 +534,26 @@
 
         case 3:
         {
-            CHECK_EQ(0, _vorbis_unpack_comment(&mVc, &bits));
+            if (0 != _vorbis_unpack_comment(&mVc, &bits)) {
+                return ERROR_MALFORMED;
+            }
+
+            parseFileMetaData();
             break;
         }
 
         case 5:
         {
-            CHECK_EQ(0, _vorbis_unpack_books(&mVi, &bits));
+            if (0 != _vorbis_unpack_books(&mVi, &bits)) {
+                return ERROR_MALFORMED;
+            }
 
             mMeta->setData(kKeyVorbisBooks, 0, data, size);
             break;
         }
     }
+
+    return OK;
 }
 
 uint64_t MyVorbisExtractor::approxBitrate() {
@@ -530,6 +564,192 @@
     return (mVi.bitrate_lower + mVi.bitrate_upper) / 2;
 }
 
+void MyVorbisExtractor::parseFileMetaData() {
+    mFileMeta = new MetaData;
+    mFileMeta->setCString(kKeyMIMEType, MEDIA_MIMETYPE_CONTAINER_OGG);
+
+    struct {
+        const char *const mTag;
+        uint32_t mKey;
+    } kMap[] = {
+        { "TITLE", kKeyTitle },
+        { "ARTIST", kKeyArtist },
+        { "ALBUM", kKeyAlbum },
+        { "COMPOSER", kKeyComposer },
+        { "GENRE", kKeyGenre },
+        { "AUTHOR", kKeyAuthor },
+        { "TRACKNUMBER", kKeyCDTrackNumber },
+        { "DISCNUMBER", kKeyDiscNumber },
+        { "DATE", kKeyDate },
+        { "LYRICIST", kKeyWriter },
+        { "METADATA_BLOCK_PICTURE", kKeyAlbumArt },
+    };
+
+    for (int i = 0; i < mVc.comments; ++i) {
+        const char *comment = mVc.user_comments[i];
+
+        for (size_t j = 0; j < sizeof(kMap) / sizeof(kMap[0]); ++j) {
+            size_t tagLen = strlen(kMap[j].mTag);
+            if (!strncasecmp(kMap[j].mTag, comment, tagLen)
+                    && comment[tagLen] == '=') {
+                if (kMap[j].mKey == kKeyAlbumArt) {
+                    extractAlbumArt(
+                            &comment[tagLen + 1],
+                            mVc.comment_lengths[i] - tagLen - 1);
+                } else {
+                    mFileMeta->setCString(kMap[j].mKey, &comment[tagLen + 1]);
+                }
+            }
+        }
+
+    }
+
+#if 0
+    for (int i = 0; i < mVc.comments; ++i) {
+        LOGI("comment #%d: '%s'", i + 1, mVc.user_comments[i]);
+    }
+#endif
+}
+
+// The returned buffer should be free()d.
+static uint8_t *DecodeBase64(const char *s, size_t size, size_t *outSize) {
+    *outSize = 0;
+
+    if ((size % 4) != 0) {
+        return NULL;
+    }
+
+    size_t n = size;
+    size_t padding = 0;
+    if (n >= 1 && s[n - 1] == '=') {
+        padding = 1;
+
+        if (n >= 2 && s[n - 2] == '=') {
+            padding = 2;
+        }
+    }
+
+    size_t outLen = 3 * size / 4 - padding;
+
+    *outSize = outLen;
+
+    void *buffer = malloc(outLen);
+
+    uint8_t *out = (uint8_t *)buffer;
+    size_t j = 0;
+    uint32_t accum = 0;
+    for (size_t i = 0; i < n; ++i) {
+        char c = s[i];
+        unsigned value;
+        if (c >= 'A' && c <= 'Z') {
+            value = c - 'A';
+        } else if (c >= 'a' && c <= 'z') {
+            value = 26 + c - 'a';
+        } else if (c >= '0' && c <= '9') {
+            value = 52 + c - '0';
+        } else if (c == '+') {
+            value = 62;
+        } else if (c == '/') {
+            value = 63;
+        } else if (c != '=') {
+            return NULL;
+        } else {
+            if (i < n - padding) {
+                return NULL;
+            }
+
+            value = 0;
+        }
+
+        accum = (accum << 6) | value;
+
+        if (((i + 1) % 4) == 0) {
+            out[j++] = (accum >> 16);
+
+            if (j < outLen) { out[j++] = (accum >> 8) & 0xff; }
+            if (j < outLen) { out[j++] = accum & 0xff; }
+
+            accum = 0;
+        }
+    }
+
+    return (uint8_t *)buffer;
+}
+
+void MyVorbisExtractor::extractAlbumArt(const void *data, size_t size) {
+    LOGV("extractAlbumArt from '%s'", (const char *)data);
+
+    size_t flacSize;
+    uint8_t *flac = DecodeBase64((const char *)data, size, &flacSize);
+
+    if (flac == NULL) {
+        LOGE("malformed base64 encoded data.");
+        return;
+    }
+
+    LOGV("got flac of size %d", flacSize);
+
+    uint32_t picType;
+    uint32_t typeLen;
+    uint32_t descLen;
+    uint32_t dataLen;
+    char type[128];
+
+    if (flacSize < 8) {
+        goto exit;
+    }
+
+    picType = U32_AT(flac);
+
+    if (picType != 3) {
+        // This is not a front cover.
+        goto exit;
+    }
+
+    typeLen = U32_AT(&flac[4]);
+    if (typeLen + 1 > sizeof(type)) {
+        goto exit;
+    }
+
+    if (flacSize < 8 + typeLen) {
+        goto exit;
+    }
+
+    memcpy(type, &flac[8], typeLen);
+    type[typeLen] = '\0';
+
+    LOGV("picType = %d, type = '%s'", picType, type);
+
+    if (!strcmp(type, "-->")) {
+        // This is not inline cover art, but an external url instead.
+        goto exit;
+    }
+
+    descLen = U32_AT(&flac[8 + typeLen]);
+
+    if (flacSize < 32 + typeLen + descLen) {
+        goto exit;
+    }
+
+    dataLen = U32_AT(&flac[8 + typeLen + 4 + descLen + 16]);
+
+    if (flacSize < 32 + typeLen + descLen + dataLen) {
+        goto exit;
+    }
+
+    LOGV("got image data, %d trailing bytes",
+         flacSize - 32 - typeLen - descLen - dataLen);
+
+    mFileMeta->setData(
+            kKeyAlbumArt, 0, &flac[8 + typeLen + 4 + descLen + 20], dataLen);
+
+    mFileMeta->setCString(kKeyAlbumArtMIME, type);
+
+exit:
+    free(flac);
+    flac = NULL;
+}
+
 ////////////////////////////////////////////////////////////////////////////////
 
 OggExtractor::OggExtractor(const sp<DataSource> &source)
@@ -537,10 +757,11 @@
       mInitCheck(NO_INIT),
       mImpl(NULL) {
     mImpl = new MyVorbisExtractor(mDataSource);
-    CHECK_EQ(mImpl->seekToOffset(0), OK);
-    mImpl->init();
+    mInitCheck = mImpl->seekToOffset(0);
 
-    mInitCheck = OK;
+    if (mInitCheck == OK) {
+        mInitCheck = mImpl->init();
+    }
 }
 
 OggExtractor::~OggExtractor() {
@@ -570,15 +791,7 @@
 }
 
 sp<MetaData> OggExtractor::getMetaData() {
-    sp<MetaData> meta = new MetaData;
-
-    if (mInitCheck != OK) {
-        return meta;
-    }
-
-    meta->setCString(kKeyMIMEType, MEDIA_MIMETYPE_CONTAINER_OGG);
-
-    return meta;
+    return mImpl->getFileMetaData();
 }
 
 bool SniffOgg(
diff --git a/media/libstagefright/Prefetcher.cpp b/media/libstagefright/Prefetcher.cpp
deleted file mode 100644
index 650a9f9..0000000
--- a/media/libstagefright/Prefetcher.cpp
+++ /dev/null
@@ -1,476 +0,0 @@
-/*
- * Copyright (C) 2010 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#define LOG_TAG "Prefetcher"
-//#define LOG_NDEBUG 0
-#include <utils/Log.h>
-
-#include "include/Prefetcher.h"
-
-#include <media/stagefright/MediaBuffer.h>
-#include <media/stagefright/MediaDebug.h>
-#include <media/stagefright/MediaErrors.h>
-#include <media/stagefright/MediaSource.h>
-#include <media/stagefright/MetaData.h>
-#include <utils/List.h>
-
-namespace android {
-
-struct PrefetchedSource : public MediaSource {
-    PrefetchedSource(
-            size_t index,
-            const sp<MediaSource> &source);
-
-    virtual status_t start(MetaData *params);
-    virtual status_t stop();
-
-    virtual status_t read(
-            MediaBuffer **buffer, const ReadOptions *options);
-
-    virtual sp<MetaData> getFormat();
-
-protected:
-    virtual ~PrefetchedSource();
-
-private:
-    friend struct Prefetcher;
-
-    Mutex mLock;
-    Condition mCondition;
-
-    sp<MediaSource> mSource;
-    size_t mIndex;
-    bool mStarted;
-    bool mReachedEOS;
-    status_t mFinalStatus;
-    int64_t mSeekTimeUs;
-    int64_t mCacheDurationUs;
-    size_t mCacheSizeBytes;
-    bool mPrefetcherStopped;
-    bool mCurrentlyPrefetching;
-
-    List<MediaBuffer *> mCachedBuffers;
-
-    // Returns true iff source is currently caching.
-    bool getCacheDurationUs(int64_t *durationUs, size_t *totalSize = NULL);
-
-    void updateCacheDuration_l();
-    void clearCache_l();
-
-    void cacheMore();
-    void onPrefetcherStopped();
-
-    PrefetchedSource(const PrefetchedSource &);
-    PrefetchedSource &operator=(const PrefetchedSource &);
-};
-
-Prefetcher::Prefetcher()
-    : mDone(false),
-      mThreadExited(false) {
-    startThread();
-}
-
-Prefetcher::~Prefetcher() {
-    stopThread();
-}
-
-sp<MediaSource> Prefetcher::addSource(const sp<MediaSource> &source) {
-    Mutex::Autolock autoLock(mLock);
-
-    sp<PrefetchedSource> psource =
-        new PrefetchedSource(mSources.size(), source);
-
-    mSources.add(psource);
-
-    return psource;
-}
-
-void Prefetcher::startThread() {
-    mThreadExited = false;
-    mDone = false;
-
-    int res = androidCreateThreadEtc(
-            ThreadWrapper, this, "Prefetcher",
-            ANDROID_PRIORITY_DEFAULT, 0, &mThread);
-
-    CHECK_EQ(res, 1);
-}
-
-void Prefetcher::stopThread() {
-    Mutex::Autolock autoLock(mLock);
-
-    while (!mThreadExited) {
-        mDone = true;
-        mCondition.signal();
-        mCondition.wait(mLock);
-    }
-}
-
-// static
-int Prefetcher::ThreadWrapper(void *me) {
-    static_cast<Prefetcher *>(me)->threadFunc();
-
-    return 0;
-}
-
-// Cache at most 1 min for each source.
-static int64_t kMaxCacheDurationUs = 60 * 1000000ll;
-
-// At the same time cache at most 5MB per source.
-static size_t kMaxCacheSizeBytes = 5 * 1024 * 1024;
-
-// If the amount of cached data drops below this,
-// fill the cache up to the max duration again.
-static int64_t kLowWaterDurationUs = 5000000ll;
-
-void Prefetcher::threadFunc() {
-    bool fillingCache = false;
-
-    for (;;) {
-        sp<PrefetchedSource> minSource;
-        int64_t minCacheDurationUs = -1;
-
-        {
-            Mutex::Autolock autoLock(mLock);
-            if (mDone) {
-                break;
-            }
-
-            mCondition.waitRelative(
-                    mLock, fillingCache ? 1ll : 1000000000ll);
-
-
-            ssize_t minIndex = -1;
-            for (size_t i = 0; i < mSources.size(); ++i) {
-                sp<PrefetchedSource> source = mSources[i].promote();
-
-                if (source == NULL) {
-                    continue;
-                }
-
-                int64_t cacheDurationUs;
-                size_t cacheSizeBytes;
-                if (!source->getCacheDurationUs(&cacheDurationUs, &cacheSizeBytes)) {
-                    continue;
-                }
-
-                if (cacheSizeBytes > kMaxCacheSizeBytes) {
-                    LOGI("max cache size reached");
-                    continue;
-                }
-
-                if (mSources.size() > 1 && cacheDurationUs >= kMaxCacheDurationUs) {
-                    LOGI("max duration reached, size = %d bytes", cacheSizeBytes);
-                    continue;
-                }
-
-                if (minIndex < 0 || cacheDurationUs < minCacheDurationUs) {
-                    minCacheDurationUs = cacheDurationUs;
-                    minIndex = i;
-                    minSource = source;
-                }
-            }
-
-            if (minIndex < 0) {
-                if (fillingCache) {
-                    LOGV("[%p] done filling the cache, above high water mark.",
-                         this);
-                    fillingCache = false;
-                }
-                continue;
-            }
-        }
-
-        if (!fillingCache && minCacheDurationUs < kLowWaterDurationUs) {
-            LOGI("[%p] cache below low water mark, filling cache.", this);
-            fillingCache = true;
-        }
-
-        if (fillingCache) {
-            // Make sure not to hold the lock while calling into the source.
-            // The lock guards the list of sources, not the individual sources
-            // themselves.
-            minSource->cacheMore();
-        }
-    }
-
-    Mutex::Autolock autoLock(mLock);
-    for (size_t i = 0; i < mSources.size(); ++i) {
-        sp<PrefetchedSource> source = mSources[i].promote();
-
-        if (source == NULL) {
-            continue;
-        }
-
-        source->onPrefetcherStopped();
-    }
-
-    mThreadExited = true;
-    mCondition.signal();
-}
-
-int64_t Prefetcher::getCachedDurationUs(bool *noMoreData) {
-    Mutex::Autolock autoLock(mLock);
-
-    int64_t minCacheDurationUs = -1;
-    ssize_t minIndex = -1;
-    bool anySourceActive = false;
-    for (size_t i = 0; i < mSources.size(); ++i) {
-        int64_t cacheDurationUs;
-        sp<PrefetchedSource> source = mSources[i].promote();
-        if (source == NULL) {
-            continue;
-        }
-
-        if (source->getCacheDurationUs(&cacheDurationUs)) {
-            anySourceActive = true;
-        }
-
-        if (minIndex < 0 || cacheDurationUs < minCacheDurationUs) {
-            minCacheDurationUs = cacheDurationUs;
-            minIndex = i;
-        }
-    }
-
-    if (noMoreData) {
-        *noMoreData = !anySourceActive;
-    }
-
-    return minCacheDurationUs < 0 ? 0 : minCacheDurationUs;
-}
-
-status_t Prefetcher::prepare(
-        bool (*continueFunc)(void *cookie), void *cookie) {
-    // Fill the cache.
-
-    int64_t duration;
-    bool noMoreData;
-    do {
-        usleep(100000);
-
-        if (continueFunc && !(*continueFunc)(cookie)) {
-            return -EINTR;
-        }
-
-        duration = getCachedDurationUs(&noMoreData);
-    } while (!noMoreData && duration < 2000000ll);
-
-    return OK;
-}
-
-////////////////////////////////////////////////////////////////////////////////
-
-PrefetchedSource::PrefetchedSource(
-        size_t index,
-        const sp<MediaSource> &source)
-    : mSource(source),
-      mIndex(index),
-      mStarted(false),
-      mReachedEOS(false),
-      mSeekTimeUs(0),
-      mCacheDurationUs(0),
-      mCacheSizeBytes(0),
-      mPrefetcherStopped(false),
-      mCurrentlyPrefetching(false) {
-}
-
-PrefetchedSource::~PrefetchedSource() {
-    if (mStarted) {
-        stop();
-    }
-}
-
-status_t PrefetchedSource::start(MetaData *params) {
-    CHECK(!mStarted);
-
-    Mutex::Autolock autoLock(mLock);
-
-    status_t err = mSource->start(params);
-
-    if (err != OK) {
-        return err;
-    }
-
-    mStarted = true;
-
-    return OK;
-}
-
-status_t PrefetchedSource::stop() {
-    CHECK(mStarted);
-
-    Mutex::Autolock autoLock(mLock);
-
-    while (mCurrentlyPrefetching) {
-        mCondition.wait(mLock);
-    }
-
-    clearCache_l();
-
-    status_t err = mSource->stop();
-
-    mStarted = false;
-
-    return err;
-}
-
-status_t PrefetchedSource::read(
-        MediaBuffer **out, const ReadOptions *options) {
-    *out = NULL;
-
-    Mutex::Autolock autoLock(mLock);
-
-    CHECK(mStarted);
-
-    int64_t seekTimeUs;
-    if (options && options->getSeekTo(&seekTimeUs)) {
-        CHECK(seekTimeUs >= 0);
-
-        clearCache_l();
-
-        mReachedEOS = false;
-        mSeekTimeUs = seekTimeUs;
-    }
-
-    while (!mPrefetcherStopped && !mReachedEOS && mCachedBuffers.empty()) {
-        mCondition.wait(mLock);
-    }
-
-    if (mCachedBuffers.empty()) {
-        return mReachedEOS ? mFinalStatus : ERROR_END_OF_STREAM;
-    }
-
-    *out = *mCachedBuffers.begin();
-    mCachedBuffers.erase(mCachedBuffers.begin());
-    updateCacheDuration_l();
-    mCacheSizeBytes -= (*out)->size();
-
-    return OK;
-}
-
-sp<MetaData> PrefetchedSource::getFormat() {
-    return mSource->getFormat();
-}
-
-bool PrefetchedSource::getCacheDurationUs(
-        int64_t *durationUs, size_t *totalSize) {
-    Mutex::Autolock autoLock(mLock);
-
-    *durationUs = mCacheDurationUs;
-    if (totalSize != NULL) {
-        *totalSize = mCacheSizeBytes;
-    }
-
-    if (!mStarted || mReachedEOS) {
-        return false;
-    }
-
-    return true;
-}
-
-void PrefetchedSource::cacheMore() {
-    MediaSource::ReadOptions options;
-
-    Mutex::Autolock autoLock(mLock);
-
-    if (!mStarted) {
-        return;
-    }
-
-    mCurrentlyPrefetching = true;
-
-    if (mSeekTimeUs >= 0) {
-        options.setSeekTo(mSeekTimeUs);
-        mSeekTimeUs = -1;
-    }
-
-    // Ensure our object does not go away while we're not holding
-    // the lock.
-    sp<PrefetchedSource> me = this;
-
-    mLock.unlock();
-    MediaBuffer *buffer;
-    status_t err = mSource->read(&buffer, &options);
-    mLock.lock();
-
-    if (err != OK) {
-        mCurrentlyPrefetching = false;
-        mReachedEOS = true;
-        mFinalStatus = err;
-        mCondition.signal();
-
-        return;
-    }
-
-    CHECK(buffer != NULL);
-
-    MediaBuffer *copy = new MediaBuffer(buffer->range_length());
-    memcpy(copy->data(),
-           (const uint8_t *)buffer->data() + buffer->range_offset(),
-           buffer->range_length());
-
-    sp<MetaData> from = buffer->meta_data();
-    sp<MetaData> to = copy->meta_data();
-
-    int64_t timeUs;
-    if (from->findInt64(kKeyTime, &timeUs)) {
-        to->setInt64(kKeyTime, timeUs);
-    }
-
-    buffer->release();
-    buffer = NULL;
-
-    mCachedBuffers.push_back(copy);
-    updateCacheDuration_l();
-    mCacheSizeBytes += copy->size();
-
-    mCurrentlyPrefetching = false;
-    mCondition.signal();
-}
-
-void PrefetchedSource::updateCacheDuration_l() {
-    if (mCachedBuffers.size() < 2) {
-        mCacheDurationUs = 0;
-    } else {
-        int64_t firstTimeUs, lastTimeUs;
-        CHECK((*mCachedBuffers.begin())->meta_data()->findInt64(
-                    kKeyTime, &firstTimeUs));
-        CHECK((*--mCachedBuffers.end())->meta_data()->findInt64(
-                    kKeyTime, &lastTimeUs));
-
-        mCacheDurationUs = lastTimeUs - firstTimeUs;
-    }
-}
-
-void PrefetchedSource::clearCache_l() {
-    List<MediaBuffer *>::iterator it = mCachedBuffers.begin();
-    while (it != mCachedBuffers.end()) {
-        (*it)->release();
-
-        it = mCachedBuffers.erase(it);
-    }
-
-    updateCacheDuration_l();
-    mCacheSizeBytes = 0;
-}
-
-void PrefetchedSource::onPrefetcherStopped() {
-    Mutex::Autolock autoLock(mLock);
-    mPrefetcherStopped = true;
-    mCondition.signal();
-}
-
-}  // namespace android
diff --git a/media/libstagefright/StagefrightMediaScanner.cpp b/media/libstagefright/StagefrightMediaScanner.cpp
index 03287dd1..1629e9f 100644
--- a/media/libstagefright/StagefrightMediaScanner.cpp
+++ b/media/libstagefright/StagefrightMediaScanner.cpp
@@ -26,10 +26,6 @@
 // Sonivox includes
 #include <libsonivox/eas.h>
 
-// Ogg Vorbis includes
-#include <Tremolo/ivorbiscodec.h>
-#include <Tremolo/ivorbisfile.h>
-
 namespace android {
 
 StagefrightMediaScanner::StagefrightMediaScanner()
@@ -42,7 +38,8 @@
     static const char *kValidExtensions[] = {
         ".mp3", ".mp4", ".m4a", ".3gp", ".3gpp", ".3g2", ".3gpp2",
         ".mpeg", ".ogg", ".mid", ".smf", ".imy", ".wma", ".aac",
-        ".wav", ".amr", ".midi", ".xmf", ".rtttl", ".rtx", ".ota"
+        ".wav", ".amr", ".midi", ".xmf", ".rtttl", ".rtx", ".ota",
+        ".mkv", ".mka", ".webm", ".ts"
     };
     static const size_t kNumValidExtensions =
         sizeof(kValidExtensions) / sizeof(kValidExtensions[0]);
@@ -102,48 +99,6 @@
     return OK;
 }
 
-static status_t HandleOGG(
-        const char *filename, MediaScannerClient *client) {
-    int duration;
-
-    FILE *file = fopen(filename,"r");
-    if (!file)
-        return UNKNOWN_ERROR;
-
-    OggVorbis_File vf;
-    if (ov_open(file, &vf, NULL, 0) < 0) {
-        return UNKNOWN_ERROR;
-    }
-
-    char **ptr=ov_comment(&vf,-1)->user_comments;
-    while(*ptr){
-        char *val = strstr(*ptr, "=");
-        if (val) {
-            int keylen = val++ - *ptr;
-            char key[keylen + 1];
-            strncpy(key, *ptr, keylen);
-            key[keylen] = 0;
-            if (!client->addStringTag(key, val)) goto failure;
-        }
-        ++ptr;
-    }
-
-    // Duration
-    duration = ov_time_total(&vf, -1);
-    if (duration > 0) {
-        char buffer[20];
-        sprintf(buffer, "%d", duration);
-        if (!client->addStringTag("duration", buffer)) goto failure;
-    }
-
-    ov_clear(&vf); // this also closes the FILE
-    return OK;
-
-failure:
-    ov_clear(&vf); // this also closes the FILE
-    return UNKNOWN_ERROR;
-}
-
 status_t StagefrightMediaScanner::processFile(
         const char *path, const char *mimeType,
         MediaScannerClient &client) {
@@ -175,10 +130,6 @@
         return HandleMIDI(path, &client);
     }
 
-    if (!strcasecmp(extension, ".ogg")) {
-        return HandleOGG(path, &client);
-    }
-
     if (mRetriever->setDataSource(path) == OK
             && mRetriever->setMode(
                 METADATA_MODE_METADATA_RETRIEVAL_ONLY) == OK) {
diff --git a/media/libstagefright/StagefrightMetadataRetriever.cpp b/media/libstagefright/StagefrightMetadataRetriever.cpp
index 258be74..9d89c20 100644
--- a/media/libstagefright/StagefrightMetadataRetriever.cpp
+++ b/media/libstagefright/StagefrightMetadataRetriever.cpp
@@ -378,6 +378,24 @@
     // The duration value is a string representing the duration in ms.
     sprintf(tmp, "%lld", (maxDurationUs + 500) / 1000);
     mMetaData.add(METADATA_KEY_DURATION, String8(tmp));
+
+    if (numTracks == 1) {
+        const char *fileMIME;
+        CHECK(meta->findCString(kKeyMIMEType, &fileMIME));
+
+        if (!strcasecmp(fileMIME, "video/x-matroska")) {
+            sp<MetaData> trackMeta = mExtractor->getTrackMetaData(0);
+            const char *trackMIME;
+            CHECK(trackMeta->findCString(kKeyMIMEType, &trackMIME));
+
+            if (!strncasecmp("audio/", trackMIME, 6)) {
+                // The matroska file only contains a single audio track,
+                // rewrite its mime type.
+                mMetaData.add(
+                        METADATA_KEY_MIMETYPE, String8("audio/x-matroska"));
+            }
+        }
+    }
 }
 
 
diff --git a/media/libstagefright/ThrottledSource.cpp b/media/libstagefright/ThrottledSource.cpp
new file mode 100644
index 0000000..4711f7c6
--- /dev/null
+++ b/media/libstagefright/ThrottledSource.cpp
@@ -0,0 +1,84 @@
+/*
+ * Copyright (C) 2010 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include "include/ThrottledSource.h"
+
+#include <media/stagefright/MediaDebug.h>
+
+namespace android {
+
+static int64_t getNowUs() {
+    struct timeval tv;
+    gettimeofday(&tv, NULL);
+
+    return (int64_t)tv.tv_usec + tv.tv_sec * 1000000ll;
+}
+
+ThrottledSource::ThrottledSource(
+        const sp<DataSource> &source,
+        int32_t bandwidthLimitBytesPerSecond)
+    : mSource(source),
+      mBandwidthLimitBytesPerSecond(bandwidthLimitBytesPerSecond),
+      mStartTimeUs(-1),
+      mTotalTransferred(0) {
+    CHECK(mBandwidthLimitBytesPerSecond > 0);
+}
+
+status_t ThrottledSource::initCheck() const {
+    return mSource->initCheck();
+}
+
+ssize_t ThrottledSource::readAt(off_t offset, void *data, size_t size) {
+    Mutex::Autolock autoLock(mLock);
+
+    ssize_t n = mSource->readAt(offset, data, size);
+
+    if (n <= 0) {
+        return n;
+    }
+
+    mTotalTransferred += n;
+
+    int64_t nowUs = getNowUs();
+
+    if (mStartTimeUs < 0) {
+        mStartTimeUs = nowUs;
+    }
+
+    // How long would it have taken to transfer everything we ever
+    // transferred given the limited bandwidth.
+    int64_t durationUs =
+        mTotalTransferred * 1000000ll / mBandwidthLimitBytesPerSecond;
+
+    int64_t whenUs = mStartTimeUs + durationUs;
+
+    if (whenUs > nowUs) {
+        usleep(whenUs - nowUs);
+    }
+
+    return n;
+}
+
+status_t ThrottledSource::getSize(off_t *size) {
+    return mSource->getSize(size);
+}
+
+uint32_t ThrottledSource::flags() {
+    return mSource->flags();
+}
+
+}  // namespace android
+
diff --git a/media/libstagefright/codecs/aacdec/AACDecoder.cpp b/media/libstagefright/codecs/aacdec/AACDecoder.cpp
index 2bc4448..f3b281f 100644
--- a/media/libstagefright/codecs/aacdec/AACDecoder.cpp
+++ b/media/libstagefright/codecs/aacdec/AACDecoder.cpp
@@ -15,6 +15,7 @@
  */
 
 #include "AACDecoder.h"
+#define LOG_TAG "AACDecoder"
 
 #include "../../include/ESDS.h"
 
@@ -36,26 +37,33 @@
       mAnchorTimeUs(0),
       mNumSamplesOutput(0),
       mInputBuffer(NULL) {
-}
 
-AACDecoder::~AACDecoder() {
-    if (mStarted) {
-        stop();
+    sp<MetaData> srcFormat = mSource->getFormat();
+
+    int32_t sampleRate;
+    CHECK(srcFormat->findInt32(kKeySampleRate, &sampleRate));
+
+    mMeta = new MetaData;
+    mMeta->setCString(kKeyMIMEType, MEDIA_MIMETYPE_AUDIO_RAW);
+
+    // We'll always output stereo, regardless of how many channels are
+    // present in the input due to decoder limitations.
+    mMeta->setInt32(kKeyChannelCount, 2);
+    mMeta->setInt32(kKeySampleRate, sampleRate);
+
+    int64_t durationUs;
+    if (srcFormat->findInt64(kKeyDuration, &durationUs)) {
+        mMeta->setInt64(kKeyDuration, durationUs);
     }
+    mMeta->setCString(kKeyDecoderComponent, "AACDecoder");
 
-    delete mConfig;
-    mConfig = NULL;
+    mInitCheck = initCheck();
 }
 
-status_t AACDecoder::start(MetaData *params) {
-    CHECK(!mStarted);
-
-    mBufferGroup = new MediaBufferGroup;
-    mBufferGroup->add_buffer(new MediaBuffer(2048 * 2));
-
+status_t AACDecoder::initCheck() {
+    memset(mConfig, 0, sizeof(tPVMP4AudioDecoderExternal));
     mConfig->outputFormat = OUTPUTFORMAT_16PCM_INTERLEAVED;
-    mConfig->aacPlusUpsamplingFactor = 0;
-    mConfig->aacPlusEnabled = false;
+    mConfig->aacPlusEnabled = 1;
 
     // The software decoder doesn't properly support mono output on
     // AACplus files. Always output stereo.
@@ -64,8 +72,11 @@
     UInt32 memRequirements = PVMP4AudioDecoderGetMemRequirements();
     mDecoderBuf = malloc(memRequirements);
 
-    CHECK_EQ(PVMP4AudioDecoderInitLibrary(mConfig, mDecoderBuf),
-             MP4AUDEC_SUCCESS);
+    status_t err = PVMP4AudioDecoderInitLibrary(mConfig, mDecoderBuf);
+    if (err != MP4AUDEC_SUCCESS) {
+        LOGE("Failed to initialize MP4 audio decoder");
+        return UNKNOWN_ERROR;
+    }
 
     uint32_t type;
     const void *data;
@@ -83,18 +94,38 @@
         mConfig->pInputBuffer = (UChar *)codec_specific_data;
         mConfig->inputBufferCurrentLength = codec_specific_data_size;
         mConfig->inputBufferMaxLength = 0;
-        mConfig->inputBufferUsedLength = 0;
-        mConfig->remainderBits = 0;
-
-        mConfig->pOutputBuffer = NULL;
-        mConfig->pOutputBuffer_plus = NULL;
-        mConfig->repositionFlag = false;
 
         if (PVMP4AudioDecoderConfig(mConfig, mDecoderBuf)
                 != MP4AUDEC_SUCCESS) {
             return ERROR_UNSUPPORTED;
         }
+
+        // Check on the sampling rate to see whether it is changed.
+        int32_t sampleRate;
+        CHECK(mMeta->findInt32(kKeySampleRate, &sampleRate));
+        if (mConfig->samplingRate != sampleRate) {
+            mMeta->setInt32(kKeySampleRate, mConfig->samplingRate);
+            LOGW("Sample rate was %d, but now is %d",
+                    sampleRate, mConfig->samplingRate);
+        }
     }
+    return OK;
+}
+
+AACDecoder::~AACDecoder() {
+    if (mStarted) {
+        stop();
+    }
+
+    delete mConfig;
+    mConfig = NULL;
+}
+
+status_t AACDecoder::start(MetaData *params) {
+    CHECK(!mStarted);
+
+    mBufferGroup = new MediaBufferGroup;
+    mBufferGroup->add_buffer(new MediaBuffer(4096 * 2));
 
     mSource->start();
 
@@ -127,28 +158,7 @@
 }
 
 sp<MetaData> AACDecoder::getFormat() {
-    sp<MetaData> srcFormat = mSource->getFormat();
-
-    int32_t sampleRate;
-    CHECK(srcFormat->findInt32(kKeySampleRate, &sampleRate));
-
-    sp<MetaData> meta = new MetaData;
-    meta->setCString(kKeyMIMEType, MEDIA_MIMETYPE_AUDIO_RAW);
-
-    // We'll always output stereo, regardless of how many channels are
-    // present in the input due to decoder limitations.
-    meta->setInt32(kKeyChannelCount, 2);
-
-    meta->setInt32(kKeySampleRate, sampleRate);
-
-    int64_t durationUs;
-    if (srcFormat->findInt64(kKeyDuration, &durationUs)) {
-        meta->setInt64(kKeyDuration, durationUs);
-    }
-
-    meta->setCString(kKeyDecoderComponent, "AACDecoder");
-
-    return meta;
+    return mMeta;
 }
 
 status_t AACDecoder::read(
@@ -200,13 +210,19 @@
     mConfig->remainderBits = 0;
 
     mConfig->pOutputBuffer = static_cast<Int16 *>(buffer->data());
-    mConfig->pOutputBuffer_plus = NULL;
+    mConfig->pOutputBuffer_plus = &mConfig->pOutputBuffer[2048];
     mConfig->repositionFlag = false;
 
     Int decoderErr = PVMP4AudioDecodeFrame(mConfig, mDecoderBuf);
 
     size_t numOutBytes =
         mConfig->frameLength * sizeof(int16_t) * mConfig->desiredChannels;
+    if (mConfig->aacPlusUpsamplingFactor == 2) {
+        if (mConfig->desiredChannels == 1) {
+            memcpy(&mConfig->pOutputBuffer[1024], &mConfig->pOutputBuffer[2048], numOutBytes * 2);
+        }
+        numOutBytes *= 2;
+    }
 
     if (decoderErr != MP4AUDEC_SUCCESS) {
         LOGW("AAC decoder returned error %d, substituting silence", decoderErr);
diff --git a/media/libstagefright/codecs/aacenc/AACEncoder.cpp b/media/libstagefright/codecs/aacenc/AACEncoder.cpp
new file mode 100644
index 0000000..2317de6
--- /dev/null
+++ b/media/libstagefright/codecs/aacenc/AACEncoder.cpp
@@ -0,0 +1,297 @@
+/*
+ * Copyright (C) 2010 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+//#define LOG_NDEBUG 0
+#define LOG_TAG "AACEncoder"
+#include <utils/Log.h>
+
+#include "AACEncoder.h"
+#include "voAAC.h"
+#include "cmnMemory.h"
+
+#include <media/stagefright/MediaBufferGroup.h>
+#include <media/stagefright/MediaDebug.h>
+#include <media/stagefright/MediaDefs.h>
+#include <media/stagefright/MediaErrors.h>
+#include <media/stagefright/MetaData.h>
+
+namespace android {
+
+AACEncoder::AACEncoder(const sp<MediaSource> &source, const sp<MetaData> &meta)
+    : mSource(source),
+      mMeta(meta),
+      mStarted(false),
+      mBufferGroup(NULL),
+      mInputBuffer(NULL),
+      mEncoderHandle(NULL),
+      mApiHandle(NULL),
+      mMemOperator(NULL) {
+}
+
+status_t AACEncoder::initCheck() {
+    CHECK(mApiHandle == NULL && mEncoderHandle == NULL);
+    CHECK(mMeta->findInt32(kKeySampleRate, &mSampleRate));
+    CHECK(mMeta->findInt32(kKeyChannelCount, &mChannels));
+    CHECK(mMeta->findInt32(kKeyBitRate, &mBitRate));
+
+    mApiHandle = new VO_AUDIO_CODECAPI;
+    CHECK(mApiHandle);
+
+    if (VO_ERR_NONE != voGetAACEncAPI(mApiHandle)) {
+        LOGE("Failed to get api handle");
+        return UNKNOWN_ERROR;
+    }
+
+    mMemOperator = new VO_MEM_OPERATOR;
+    CHECK(mMemOperator != NULL);
+    mMemOperator->Alloc = cmnMemAlloc;
+    mMemOperator->Copy = cmnMemCopy;
+    mMemOperator->Free = cmnMemFree;
+    mMemOperator->Set = cmnMemSet;
+    mMemOperator->Check = cmnMemCheck;
+
+    VO_CODEC_INIT_USERDATA userData;
+    memset(&userData, 0, sizeof(userData));
+    userData.memflag = VO_IMF_USERMEMOPERATOR;
+    userData.memData = (VO_PTR) mMemOperator;
+    if (VO_ERR_NONE != mApiHandle->Init(&mEncoderHandle, VO_AUDIO_CodingAAC, &userData)) {
+        LOGE("Failed to init AAC encoder");
+        return UNKNOWN_ERROR;
+    }
+    if (OK != setAudioSpecificConfigData()) {
+        LOGE("Failed to configure AAC encoder");
+        return UNKNOWN_ERROR;
+    }
+
+    // Configure AAC encoder$
+    AACENC_PARAM params;
+    memset(&params, 0, sizeof(params));
+    params.sampleRate = mSampleRate;
+    params.bitRate = mBitRate;
+    params.nChannels = mChannels;
+    params.adtsUsed = 0;  // For MP4 file, don't use adts format$
+    if (VO_ERR_NONE != mApiHandle->SetParam(mEncoderHandle, VO_PID_AAC_ENCPARAM,  &params)) {
+        LOGE("Failed to set AAC encoder parameters");
+        return UNKNOWN_ERROR;
+    }
+
+    return OK;
+}
+
+static status_t getSampleRateTableIndex(int32_t sampleRate, int32_t &index) {
+    static const int32_t kSampleRateTable[] = {
+        96000, 88200, 64000, 48000, 44100, 32000,
+        24000, 22050, 16000, 12000, 11025, 8000
+    };
+    const int32_t tableSize = sizeof(kSampleRateTable) / sizeof(kSampleRateTable[0]);
+    for (int32_t i = 0; i < tableSize; ++i) {
+        if (sampleRate == kSampleRateTable[i]) {
+            index = i;
+            return OK;
+        }
+    }
+
+    LOGE("Sampling rate %d bps is not supported", sampleRate);
+    return UNKNOWN_ERROR;
+}
+
+status_t AACEncoder::setAudioSpecificConfigData() {
+    LOGV("setAudioSpecificConfigData: %d hz, %d bps, and %d channels",
+         mSampleRate, mBitRate, mChannels);
+
+    int32_t index;
+    CHECK_EQ(OK, getSampleRateTableIndex(mSampleRate, index));
+    if (mChannels > 2 || mChannels <= 0) {
+        LOGE("Unsupported number of channels(%d)", mChannels);
+        return UNKNOWN_ERROR;
+    }
+
+    // OMX_AUDIO_AACObjectLC
+    mAudioSpecificConfigData[0] = ((0x02 << 3) | (index >> 1));
+    mAudioSpecificConfigData[1] = ((index & 0x01) << 7) | (mChannels << 3);
+    return OK;
+}
+
+AACEncoder::~AACEncoder() {
+    if (mStarted) {
+        stop();
+    }
+}
+
+status_t AACEncoder::start(MetaData *params) {
+    if (mStarted) {
+        LOGW("Call start() when encoder already started");
+        return OK;
+    }
+
+    mBufferGroup = new MediaBufferGroup;
+    mBufferGroup->add_buffer(new MediaBuffer(2048));
+
+    CHECK_EQ(OK, initCheck());
+
+    mNumInputSamples = 0;
+    mAnchorTimeUs = 0;
+    mFrameCount = 0;
+    mSource->start(params);
+
+    mStarted = true;
+
+    return OK;
+}
+
+status_t AACEncoder::stop() {
+    if (!mStarted) {
+        LOGW("Call stop() when encoder has not started");
+        return OK;
+    }
+
+    if (mInputBuffer) {
+        mInputBuffer->release();
+        mInputBuffer = NULL;
+    }
+
+    delete mBufferGroup;
+    mBufferGroup = NULL;
+
+    mSource->stop();
+
+    if (mEncoderHandle) {
+        CHECK_EQ(VO_ERR_NONE, mApiHandle->Uninit(mEncoderHandle));
+        mEncoderHandle = NULL;
+    }
+    delete mApiHandle;
+    mApiHandle = NULL;
+
+    mStarted = false;
+
+    return OK;
+}
+
+sp<MetaData> AACEncoder::getFormat() {
+    sp<MetaData> srcFormat = mSource->getFormat();
+
+    mMeta->setCString(kKeyMIMEType, MEDIA_MIMETYPE_AUDIO_AAC);
+
+    int64_t durationUs;
+    if (srcFormat->findInt64(kKeyDuration, &durationUs)) {
+        mMeta->setInt64(kKeyDuration, durationUs);
+    }
+
+    mMeta->setCString(kKeyDecoderComponent, "AACEncoder");
+
+    return mMeta;
+}
+
+status_t AACEncoder::read(
+        MediaBuffer **out, const ReadOptions *options) {
+    status_t err;
+
+    *out = NULL;
+
+    int64_t seekTimeUs;
+    CHECK(options == NULL || !options->getSeekTo(&seekTimeUs));
+
+    MediaBuffer *buffer;
+    CHECK_EQ(mBufferGroup->acquire_buffer(&buffer), OK);
+    uint8_t *outPtr = (uint8_t *)buffer->data();
+
+    if (mFrameCount == 0) {
+        memcpy(outPtr, mAudioSpecificConfigData, 2);
+        buffer->set_range(0, 2);
+        buffer->meta_data()->setInt32(kKeyIsCodecConfig, true);
+        *out = buffer;
+        ++mFrameCount;
+        return OK;
+    } else if (mFrameCount == 1) {
+        buffer->meta_data()->setInt32(kKeyIsCodecConfig, false);
+    }
+
+    while (mNumInputSamples < kNumSamplesPerFrame) {
+        if (mInputBuffer == NULL) {
+            if (mSource->read(&mInputBuffer, options) != OK) {
+                if (mNumInputSamples == 0) {
+                    return ERROR_END_OF_STREAM;
+                }
+                memset(&mInputFrame[mNumInputSamples],
+                       0,
+                       sizeof(int16_t) * (kNumSamplesPerFrame - mNumInputSamples));
+                mNumInputSamples = 0;
+                break;
+            }
+
+            size_t align = mInputBuffer->range_length() % sizeof(int16_t);
+            CHECK_EQ(align, 0);
+
+            int64_t timeUs;
+            if (mInputBuffer->meta_data()->findInt64(kKeyTime, &timeUs)) {
+                mAnchorTimeUs = timeUs;
+            }
+        }
+        size_t copy =
+            (kNumSamplesPerFrame - mNumInputSamples) * sizeof(int16_t);
+
+        if (copy > mInputBuffer->range_length()) {
+            copy = mInputBuffer->range_length();
+        }
+
+        memcpy(&mInputFrame[mNumInputSamples],
+               (const uint8_t *) mInputBuffer->data()
+                    + mInputBuffer->range_offset(),
+               copy);
+
+        mInputBuffer->set_range(
+               mInputBuffer->range_offset() + copy,
+               mInputBuffer->range_length() - copy);
+
+        if (mInputBuffer->range_length() == 0) {
+            mInputBuffer->release();
+            mInputBuffer = NULL;
+        }
+        mNumInputSamples += copy / sizeof(int16_t);
+        if (mNumInputSamples >= kNumSamplesPerFrame) {
+            mNumInputSamples %= kNumSamplesPerFrame;
+            break;
+        }
+    }
+
+    VO_CODECBUFFER inputData;
+    memset(&inputData, 0, sizeof(inputData));
+    inputData.Buffer = (unsigned char*) mInputFrame;
+    inputData.Length = kNumSamplesPerFrame * sizeof(int16_t);
+    CHECK(VO_ERR_NONE == mApiHandle->SetInputData(mEncoderHandle,&inputData));
+
+    VO_CODECBUFFER outputData;
+    memset(&outputData, 0, sizeof(outputData));
+    VO_AUDIO_OUTPUTINFO outputInfo;
+    memset(&outputInfo, 0, sizeof(outputInfo));
+
+    VO_U32 ret = VO_ERR_NONE;
+    outputData.Buffer = outPtr;
+    outputData.Length = buffer->size();
+    ret = mApiHandle->GetOutputData(mEncoderHandle, &outputData, &outputInfo);
+    CHECK(ret == VO_ERR_NONE || ret == VO_ERR_INPUT_BUFFER_SMALL);
+    CHECK(outputData.Length != 0);
+    buffer->set_range(0, outputData.Length);
+
+    int64_t timestampUs = ((mFrameCount - 1) * 1000000LL * kNumSamplesPerFrame) / mSampleRate;
+    ++mFrameCount;
+    buffer->meta_data()->setInt64(kKeyTime, timestampUs);
+
+    *out = buffer;
+    return OK;
+}
+
+}  // namespace android
diff --git a/media/libstagefright/codecs/aacenc/Android.mk b/media/libstagefright/codecs/aacenc/Android.mk
new file mode 100644
index 0000000..cda4f9d
--- /dev/null
+++ b/media/libstagefright/codecs/aacenc/Android.mk
@@ -0,0 +1,87 @@
+LOCAL_PATH := $(call my-dir)
+include $(CLEAR_VARS)
+include frameworks/base/media/libstagefright/codecs/common/Config.mk
+
+LOCAL_PRELINK_MODULE := false
+
+LOCAL_SRC_FILES := basic_op/basicop2.c basic_op/oper_32b.c
+
+LOCAL_SRC_FILES += \
+	AACEncoder.cpp \
+	src/aac_rom.c \
+	src/aacenc.c \
+	src/aacenc_core.c \
+	src/adj_thr.c \
+	src/band_nrg.c \
+	src/bit_cnt.c \
+	src/bitbuffer.c \
+	src/bitenc.c \
+	src/block_switch.c \
+	src/channel_map.c \
+	src/dyn_bits.c \
+	src/grp_data.c \
+	src/interface.c \
+	src/line_pe.c \
+	src/ms_stereo.c \
+	src/pre_echo_control.c \
+	src/psy_configuration.c \
+	src/psy_main.c \
+	src/qc_main.c \
+	src/quantize.c \
+	src/sf_estim.c \
+	src/spreading.c \
+	src/stat_bits.c \
+	src/tns.c \
+	src/transform.c \
+	src/memalign.c
+
+ifeq ($(VOTT), v5)
+LOCAL_SRC_FILES += \
+	src/asm/ARMV5E/AutoCorrelation_v5.s \
+	src/asm/ARMV5E/band_nrg_v5.s \
+	src/asm/ARMV5E/CalcWindowEnergy_v5.s \
+	src/asm/ARMV5E/PrePostMDCT_v5.s \
+	src/asm/ARMV5E/R4R8First_v5.s \
+	src/asm/ARMV5E/Radix4FFT_v5.s
+endif
+
+ifeq ($(VOTT), v7)
+LOCAL_SRC_FILES += \
+	src/asm/ARMV5E/AutoCorrelation_v5.s \
+	src/asm/ARMV5E/band_nrg_v5.s \
+	src/asm/ARMV5E/CalcWindowEnergy_v5.s \
+	src/asm/ARMV7/PrePostMDCT_v7.s \
+	src/asm/ARMV7/R4R8First_v7.s \
+	src/asm/ARMV7/Radix4FFT_v7.s
+endif
+
+LOCAL_MODULE := libstagefright_aacenc
+
+LOCAL_ARM_MODE := arm
+
+LOCAL_STATIC_LIBRARIES := 
+
+LOCAL_SHARED_LIBRARIES :=
+
+LOCAL_C_INCLUDES := \
+	frameworks/base/media/libstagefright/include \
+	frameworks/base/media/libstagefright/codecs/common/include \
+	frameworks/base/include \
+	$(LOCAL_PATH)/src \
+	$(LOCAL_PATH)/inc \
+	$(LOCAL_PATH)/basic_op
+
+LOCAL_CFLAGS := $(VO_CFLAGS)
+
+ifeq ($(VOTT), v5)
+LOCAL_CFLAGS += -DARMV5E -DARM_INASM -DARMV5_INASM
+LOCAL_C_INCLUDES += $(LOCAL_PATH)/src/asm/ARMV5E
+endif
+
+ifeq ($(VOTT), v7)
+LOCAL_CFLAGS += -DARMV5E -DARMV7Neon -DARM_INASM -DARMV5_INASM
+LOCAL_C_INCLUDES += $(LOCAL_PATH)/src/asm/ARMV5E
+LOCAL_C_INCLUDES += $(LOCAL_PATH)/src/asm/ARMV7
+endif
+
+include $(BUILD_STATIC_LIBRARY)
diff --git a/media/libstagefright/codecs/aacenc/SampleCode/AAC_E_SAMPLES.c b/media/libstagefright/codecs/aacenc/SampleCode/AAC_E_SAMPLES.c
new file mode 100644
index 0000000..64d012d
--- /dev/null
+++ b/media/libstagefright/codecs/aacenc/SampleCode/AAC_E_SAMPLES.c
@@ -0,0 +1,283 @@
+/*

+ ** Copyright 2003-2010, VisualOn, Inc.

+ **

+ ** Licensed under the Apache License, Version 2.0 (the "License");

+ ** you may not use this file except in compliance with the License.

+ ** You may obtain a copy of the License at

+ **

+ **     http://www.apache.org/licenses/LICENSE-2.0

+ **

+ ** Unless required by applicable law or agreed to in writing, software

+ ** distributed under the License is distributed on an "AS IS" BASIS,

+ ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

+ ** See the License for the specific language governing permissions and

+ ** limitations under the License.

+ */

+/*******************************************************************************

+	File:		AAC_E_SAMPLES.h

+

+	Content:	sample code for AAC encoder

+

+*******************************************************************************/

+

+#include		<dlfcn.h>

+#include		<stdio.h>

+#include		<stdlib.h>

+#include		<string.h>

+#include		<time.h>

+#include		"voAAC.h"

+#include		"cmnMemory.h"

+

+#define  VO_AAC_E_OUTPUT	  1

+#define READ_SIZE	(1024*8)	

+unsigned char outBuf[1024*8];

+unsigned char inBuf[READ_SIZE];

+

+const char* HelpString = 

+"VisualOn AAC encoder Usage:\n"

+"voAACEncTest -if <inputfile.pcm> -of <outputfile.aac> -sr <samplerate> -ch <channel> -br <bitrate> -adts <adts> \n"

+"-if input file name \n"

+"-of output file name \n"

+"-sr input pcm samplerate, default 44100 \n"

+"-ch input pcm channel, default 2 channel \n"

+"-br encoded aac bitrate, default 64000 * (samplerate/100)*channel/441(480)\n"

+"-adts add or no adts header, default add adts header\n"

+"For example: \n"

+"./voAACEncTest -if raw.pcm -of raw.aac -sr 44100 -ch 2 -br 128000\n";

+

+static int parsecmdline(int argc, char **argv,char  **input_filename, char  **output_filename, AACENC_PARAM *param)

+{

+	// notice that:

+	// bitRate/nChannels > 8000

+	// bitRate/nChannels < 160000 

+	// bitRate/nChannels < sampleRate*6

+	param->adtsUsed = 1;

+	param->bitRate = 0;

+	param->nChannels = 2;

+	param->sampleRate = 44100;

+

+	if(argc < 5 || argc > 13)

+	{

+		return -1;

+	}

+

+	argc--;

+	argv++;

+	while (argc > 0)

+	{

+		if (!strcmp(*argv, "-if"))

+		{

+			argv++;

+			argc--;

+			*input_filename = *argv; 

+		}

+		else if (!strcmp(*argv, "-of"))

+		{

+			argv++;

+			argc--;

+			*output_filename = *argv;

+		}

+		else if (!strcmp(*argv, "-sr"))

+		{

+			argv++;

+			argc--;

+			param->sampleRate = atoi(*argv);

+		}

+		else if (!strcmp(*argv, "-ch"))

+		{

+			argv++;

+			argc--;

+			param->nChannels = atoi(*argv);

+		}

+		else if (!strcmp(*argv, "-br"))

+		{

+			argv++;

+			argc--;

+			param->bitRate = atoi(*argv);

+		}

+		else if(!strcmp(*argv, "-adts"))

+		{

+			argv++;

+			argc--;

+			param->adtsUsed = atoi(*argv);

+		}

+		else

+		{

+			return -1;

+		}

+

+		argv++;

+		argc--;

+	}

+

+	if(param->bitRate == 0)

+	{

+		int scale = 441;

+		if(param->sampleRate%8000 == 0)

+			scale = 480;

+		param->bitRate = 640*param->nChannels*param->sampleRate/scale;

+	}

+

+	return 0;

+}

+

+int ReadFile2Buf(FILE* infile,unsigned char* dest,int readSize)

+{

+	int readBytes = 0;

+	readBytes = fread(dest, 1, readSize, infile);

+	return readBytes;

+}

+

+typedef int (VO_API * VOGETAUDIODECAPI) (VO_AUDIO_CODECAPI * pDecHandle);

+

+int main(int argc, char **argv)

+{

+	FILE						*infile, *outfile;

+	int							t1, t2;

+	VO_AUDIO_CODECAPI			AudioAPI;

+	VO_MEM_OPERATOR				moper;

+	VO_CODEC_INIT_USERDATA		useData;

+	VO_HANDLE					hCodec;

+	VO_CODECBUFFER				inData;

+	VO_CODECBUFFER				outData;

+	VO_AUDIO_OUTPUTINFO			outInfo;

+    int							firstWrite = 1;

+	int							eofFile = 0;

+	int							*info=(int*)inBuf;

+	int							bytesLeft, nRead;

+	int							EncoderdFrame = 0;

+	int							total = 0;

+	int							isOutput = 1;

+	int							returnCode;

+	AACENC_PARAM				aacpara;

+	void						*handle;

+	void						*pfunc;

+	VOGETAUDIODECAPI			pGetAPI;

+	const char					*infileName = NULL;

+    const char					*outfileName = NULL;

+

+	returnCode = parsecmdline(argc,argv, &infileName, &outfileName, &aacpara);

+	if(returnCode)

+	{

+		printf("%s", HelpString);

+		return 0;

+	}

+

+	/* open input file */

+	infile = fopen(infileName, "rb");

+	if (!infile) {

+		printf("Open input file fail...");

+		return -1;

+	}

+

+	/* open output file */

+	if(isOutput)

+	{

+		outfile = fopen(outfileName, "wb"); 

+		if (!outfile) {

+			printf("Open output file fail...");

+			return -1;

+		}

+	}

+	// set memory operators;

+	moper.Alloc = cmnMemAlloc;

+	moper.Copy = cmnMemCopy;

+	moper.Free = cmnMemFree;

+	moper.Set = cmnMemSet;

+	moper.Check = cmnMemCheck;

+	useData.memflag = VO_IMF_USERMEMOPERATOR;

+	useData.memData = (VO_PTR)(&moper);

+	// open encoder dll;

+	handle = dlopen("/data/local/tmp/libvoAACEncv7.so", RTLD_NOW);

+	if(handle == 0)

+	{

+		printf("open dll error......");

+		return -1;

+	}

+	// Get API;

+	pfunc = dlsym(handle, "voGetAACEncAPI");	

+	if(pfunc == 0)

+	{

+		printf("open function error......");

+		return -1;

+	}

+	pGetAPI = (VOGETAUDIODECAPI)pfunc;

+	returnCode  = pGetAPI(&AudioAPI);

+	if(returnCode)

+		return -1;

+

+

+//#######################################   Init Encoding Section   #########################################

+	returnCode = AudioAPI.Init(&hCodec, VO_AUDIO_CodingAAC, &useData);

+	if(returnCode < 0)

+	{

+		printf("#### VOI_Error2:fail to initialize the Encoderr###\n");

+		return -1;

+	}

+

+	returnCode = AudioAPI.SetParam(hCodec, VO_PID_AAC_ENCPARAM, &aacpara);	

+	

+	inData.Buffer = inBuf;

+	bytesLeft = ReadFile2Buf(infile,inData.Buffer,READ_SIZE);

+

+//#######################################    Encoding Section   #########################################

+	

+	do {

+

+		inData.Length    = bytesLeft;

+		outData.Buffer   = outBuf;

+		outData.Length = 1024*8;

+

+		t1 = clock();

+		

+		returnCode = AudioAPI.SetInputData(hCodec,&inData);

+		

+		do {

+			outData.Buffer   = outBuf;

+			outData.Length = 1024*8;

+

+			returnCode = AudioAPI.GetOutputData(hCodec,&outData, &outInfo);

+

+			if(returnCode == 0)

+				EncoderdFrame++;

+			if(returnCode == VO_ERR_LICENSE_ERROR)

+				break;

+

+#if VO_AAC_E_OUTPUT

+			if (isOutput && returnCode == 0)

+			{

+				fwrite(outData.Buffer, 1, outData.Length, outfile);

+			}

+#endif

+		} while(returnCode != (VO_ERR_INPUT_BUFFER_SMALL));

+

+		if(returnCode == VO_ERR_LICENSE_ERROR)

+			break;

+

+		t2 = clock();

+		total += t2 - t1;

+

+		if (!eofFile) {

+			nRead = ReadFile2Buf(infile, inBuf,READ_SIZE);

+			bytesLeft = nRead;

+			inData.Buffer = inBuf;

+			if (feof(infile))

+				eofFile = 1;

+		}

+

+	} while (!eofFile && returnCode);

+

+

+//################################################  End Encoding Section  #######################################################

+	returnCode = AudioAPI.Uninit(hCodec);

+

+	fclose(infile);

+	if (outfile)

+    {

+        fclose(outfile);

+    }

+	dlclose(handle);

+	return 0;

+}

+

+

diff --git a/media/libstagefright/codecs/aacenc/SampleCode/Android.mk b/media/libstagefright/codecs/aacenc/SampleCode/Android.mk
new file mode 100644
index 0000000..52c9c07
--- /dev/null
+++ b/media/libstagefright/codecs/aacenc/SampleCode/Android.mk
@@ -0,0 +1,24 @@
+LOCAL_PATH := $(call my-dir)
+include $(CLEAR_VARS)
+
+LOCAL_SRC_FILES := 	AAC_E_SAMPLES.c
+	
+LOCAL_SRC_FILES += 	\
+	../../../Common/cmnMemory.c 
+
+LOCAL_MODULE := TestvoAACEnc
+
+LOCAL_ARM_MODE := arm
+
+LOCAL_STATIC_LIBRARIES := 
+
+LOCAL_SHARED_LIBRARIES := libvoAACEnc
+
+LOCAL_C_INCLUDES := \
+	$(LOCAL_PATH)/ \
+	$(LOCAL_PATH)/../../../Common \
+	$(LOCAL_PATH)/../../../Include \
+
+LOCAL_CFLAGS := $(VO_CFLAGS)
+	
+include $(BUILD_EXECUTABLE)
diff --git a/media/libstagefright/codecs/aacenc/SampleCode/eclair/Makefile b/media/libstagefright/codecs/aacenc/SampleCode/eclair/Makefile
new file mode 100644
index 0000000..22c5dc1
--- /dev/null
+++ b/media/libstagefright/codecs/aacenc/SampleCode/eclair/Makefile
@@ -0,0 +1,55 @@
+#/*

+#** Copyright 2003-2010, VisualOn, Inc.

+#**

+#** Licensed under the Apache License, Version 2.0 (the "License");

+#** you may not use this file except in compliance with the License.

+#** You may obtain a copy of the License at

+#**

+#**     http://www.apache.org/licenses/LICENSE-2.0

+#**

+#** Unless required by applicable law or agreed to in writing, software

+#** distributed under the License is distributed on an "AS IS" BASIS,

+#** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

+#** See the License for the specific language governing permissions and

+#** limitations under the License.

+#*/

+

+# target6

+# available: pc, v4(armv4), v5(armv5), v5x(armv5 xscale), v6(armv6), v7(cortex-a8 neon)

+VOTT:= v7

+

+

+# module type

+# please specify the type of your module: lib or exe

+VOMT:= exe

+

+

+# module macros

+# please append the additional macro definitions here for your module if necessary. 

+# e.g. -DVISUALON, macro VISUALON defined for your module 

+VOMM:= #ARMV5E

+

+

+

+# please specify the name of your module

+VOTARGET:= voAACEncTestv7

+

+

+# please modify here to be sure to see the g1.mk

+include ../../../../Tools/eclair.mk 

+

+# dependent libraries.

+VODEPLIBS:=-ldl

+

+# module source

+# please modify here to be sure to see the ms.mk which specifies all source info of your module

+include ../ms.mk

+

+

+# please specify where is the voRelease on your PC, relative path is suggested

+VORELDIR:=../../../../../Release/

+

+

+# please modify here to be sure to see the doit.mk

+include ../../../../Tools/doit.mk 

+

diff --git a/media/libstagefright/codecs/aacenc/SampleCode/ms.mk b/media/libstagefright/codecs/aacenc/SampleCode/ms.mk
new file mode 100644
index 0000000..771a569
--- /dev/null
+++ b/media/libstagefright/codecs/aacenc/SampleCode/ms.mk
@@ -0,0 +1,23 @@
+#/*

+#** Copyright 2003-2010, VisualOn, Inc.

+#**

+#** Licensed under the Apache License, Version 2.0 (the "License");

+#** you may not use this file except in compliance with the License.

+#** You may obtain a copy of the License at

+#**

+#**     http://www.apache.org/licenses/LICENSE-2.0

+#**

+#** Unless required by applicable law or agreed to in writing, software

+#** distributed under the License is distributed on an "AS IS" BASIS,

+#** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

+#** See the License for the specific language governing permissions and

+#** limitations under the License.

+#*/

+

+# please list all objects needed by your target here

+OBJS:=AAC_E_SAMPLES.o	cmnMemory.o

+			

+# please list all directories that all source files relative with your module(.h .c .cpp) locate 

+VOSRCDIR:=../ ../../../../include  ../../../../Common

+					

+				

diff --git a/media/libstagefright/codecs/aacenc/Tools/doit.mk b/media/libstagefright/codecs/aacenc/Tools/doit.mk
new file mode 100644
index 0000000..dea0b0a
--- /dev/null
+++ b/media/libstagefright/codecs/aacenc/Tools/doit.mk
@@ -0,0 +1,133 @@
+#/*
+# ** Copyright 2003-2010, VisualOn, Inc.
+# **
+# ** Licensed under the Apache License, Version 2.0 (the "License");
+# ** you may not use this file except in compliance with the License.
+# ** You may obtain a copy of the License at
+# **
+# **     http://www.apache.org/licenses/LICENSE-2.0
+# **
+# ** Unless required by applicable law or agreed to in writing, software
+# ** distributed under the License is distributed on an "AS IS" BASIS,
+# ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# ** See the License for the specific language governing permissions and
+# ** limitations under the License.
+# */
+
+VERBOSE:=@
+
+
+VOMT ?= lib
+
+ifeq ($(VOMT), lib)
+LIB_STATIC=$(VOTARGET).a
+LIB_DYNAMIC=$(VOTARGET).so
+endif
+
+ifeq ($(VOMT), exe)
+TARGET=$(VOTARGET)
+endif
+
+CFLAGS=$(VOCFLAGS) $(addprefix -I, $(VOSRCDIR)) 
+CPPFLAGS=$(VOCPPFLAGS) $(addprefix -I, $(VOSRCDIR)) 
+ifneq ($(VOTT), pc)
+ASFLAGS=$(VOASFLAGS) $(addprefix -I, $(VOSRCDIR)) 
+endif
+
+LDFLAGS:=$(VOLDFLAGS)
+VOTEDEPS+=$(VODEPLIBS)
+VOTLDEPS+=$(VODEPLIBS)
+VOSTCLIBS ?=
+
+vpath %.c $(VOSRCDIR)
+vpath %.cpp $(VOSRCDIR)
+ifneq ($(VOTT), pc)
+vpath %.s $(VOSRCDIR)
+endif
+
+ifeq ($(VOTT), pc)
+BLTDIRS=$(VORELDIR)/Linux/static
+BLTDIRD=$(VORELDIR)/Linux/shared
+else
+BLTDIRS=$(VORELDIR)/Google/$(VONJ)/lib/$(VOTT)
+BLTDIRD=$(VORELDIR)/Google/$(VONJ)/so/$(VOTT)
+endif
+
+
+.PRECIOUS: $(OBJDIR)/%.o
+
+ifeq ($(VOMT), lib)
+all: mkdirs $(LIB_STATIC) $(LIB_DYNAMIC)
+mkdirs: $(OBJDIR) $(BLTDIRS) $(BLTDIRD)
+else
+all: mkdirs $(TARGET)
+mkdirs: $(OBJDIR)
+endif
+
+$(OBJDIR):
+	@if test ! -d $@; then \
+		mkdir -p $@; \
+	fi;
+
+ifeq ($(VOMT), lib)
+$(BLTDIRS):
+	@if test ! -d $@; then \
+		mkdir -p $@; \
+	fi;
+$(BLTDIRD):
+	@if test ! -d $@; then \
+		mkdir -p $@; \
+	fi;
+endif
+
+
+ifeq ($(VOMT), lib)
+$(LIB_STATIC):$(OBJS)
+	$(AR) cr $@ $(OBJDIR)/*.o $(VOSTCLIBS)
+	$(RANLIB) $@
+ifneq ($(VODBG), yes)
+	#$(STRIP) $@
+endif
+
+$(LIB_DYNAMIC):$(OBJS)
+	$(GG) $(LDFLAGS) -o $@ $(OBJDIR)/*.o -Wl,--whole-archive $(VOSTCLIBS) -Wl,--no-whole-archive $(VOTLDEPS) 
+ifneq ($(VODBG), yes)
+		$(STRIP) $@
+endif
+
+else
+
+$(TARGET):$(OBJS)
+	$(GG) $(LDFLAGS) -o $@ $(OBJDIR)/*.o -Wl,--whole-archive $(VOSTCLIBS) -Wl,--no-whole-archive $(VOTEDEPS)
+ifneq ($(VODBG), yes)
+	$(STRIP) $@
+endif
+
+endif
+
+
+.SUFFIXES: .c .cpp .s .o
+.c.o:
+	$(VERBOSE) $(CC) $(CFLAGS) -o $(OBJDIR)/$@ -c $<
+#%.c:$(OBJDIR)/%.o
+#	$(VERBOSE) $(CC) $(CFLAGS) -o $@ -c $<
+.cpp.o:
+	$(VERBOSE) $(GG) $(CPPFLAGS) -o $(OBJDIR)/$@ -c $<
+ifneq ($(VOTT), pc)
+.s.o:
+	$(VERBOSE) $(AS) $(ASFLAGS) -o $(OBJDIR)/$@ $<
+endif
+
+
+.PHONY: clean devel
+clean:
+ifeq ($(VOMT), lib)
+	-rm -fr $(OBJDIR) .*.sw* $(VOTARGET).*
+else
+	-rm -fr $(OBJDIR) .*.sw* $(VOTARGET)
+endif
+
+devel:
+	cp -a $(LIB_STATIC) $(BLTDIRS)
+	cp -a $(LIB_DYNAMIC) $(BLTDIRD)
+
diff --git a/media/libstagefright/codecs/aacenc/Tools/eclair.mk b/media/libstagefright/codecs/aacenc/Tools/eclair.mk
new file mode 100644
index 0000000..1688361
--- /dev/null
+++ b/media/libstagefright/codecs/aacenc/Tools/eclair.mk
@@ -0,0 +1,172 @@
+#/*
+# ** Copyright 2003-2010, VisualOn, Inc.
+# **
+# ** Licensed under the Apache License, Version 2.0 (the "License");
+# ** you may not use this file except in compliance with the License.
+# ** You may obtain a copy of the License at
+# **
+# **     http://www.apache.org/licenses/LICENSE-2.0
+# **
+# ** Unless required by applicable law or agreed to in writing, software
+# ** distributed under the License is distributed on an "AS IS" BASIS,
+# ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# ** See the License for the specific language governing permissions and
+# ** limitations under the License.
+# */
+
+# special macro definitions for building 
+VOPREDEF=-DLINUX -D_LINUX 
+
+VOPRJ ?= 
+VONJ ?= eclair
+VOTT ?= v6
+# control the version to release out
+# available: eva(evaluation), rel(release)
+VOVER=
+ifeq ($(VOVER), eva)
+VOPREDEF+=-D__VOVER_EVA__
+endif
+
+# for debug or not: yes for debug, any other for release
+VODBG?=ye
+
+# for detecting memory leak
+VODML=
+ifeq ($(VODML), yes)
+VOPREDEF+=-DDMEMLEAK
+endif
+
+VOPREDEF+=-D__VOTT_ARM__ -D__VONJ_ECLAIR__
+TCROOTPATH:=/opt/eclair
+GCCVER:=4.4.0
+TCPATH:=$(TCROOTPATH)/prebuilt/linux-x86/toolchain/arm-eabi-$(GCCVER)
+CCTPRE:=$(TCPATH)/bin/arm-eabi-
+AS:=$(CCTPRE)as
+AR:=$(CCTPRE)ar
+NM:=$(CCTPRE)nm
+CC:=$(CCTPRE)gcc
+GG:=$(CCTPRE)g++
+LD:=$(CCTPRE)ld
+SIZE:=$(CCTPRE)size
+STRIP:=$(CCTPRE)strip
+RANLIB:=$(CCTPRE)ranlib
+OBJCOPY:=$(CCTPRE)objcopy
+OBJDUMP:=$(CCTPRE)objdump
+READELF:=$(CCTPRE)readelf
+STRINGS:=$(CCTPRE)strings
+
+# target product dependcy
+# available: dream, generic
+VOTP:=sapphire-open
+CCTLIB:=$(TCROOTPATH)/out/target/product/$(VOTP)/obj/lib
+CCTINC:=-I$(TCROOTPATH)/system/core/include \
+	-I$(TCROOTPATH)/hardware/libhardware/include \
+	-I$(TCROOTPATH)/hardware/ril/include \
+	-I$(TCROOTPATH)/hardware/libhardware_legacy/include \
+	-I$(TCROOTPATH)/dalvik/libnativehelper/include \
+	-I$(TCROOTPATH)/dalvik/libnativehelper/include/nativehelper \
+	-I$(TCROOTPATH)/frameworks/base/include \
+	-I$(TCROOTPATH)/frameworks/base/core/jni \
+	-I$(TCROOTPATH)/frameworks/base/libs/audioflinger \
+	-I$(TCROOTPATH)/external/skia/include \
+	-I$(TCROOTPATH)/out/target/product/$(VOTP)/obj/include \
+	-I$(TCROOTPATH)/bionic/libc/arch-arm/include \
+	-I$(TCROOTPATH)/bionic/libc/include \
+	-I$(TCROOTPATH)/bionic/libstdc++/include \
+	-I$(TCROOTPATH)/bionic/libc/kernel/common \
+	-I$(TCROOTPATH)/bionic/libc/kernel/arch-arm \
+	-I$(TCROOTPATH)/bionic/libm/include \
+	-I$(TCROOTPATH)/bionic/libm/include/arm \
+	-I$(TCROOTPATH)/bionic/libthread_db/include \
+	-I$(TCROOTPATH)/bionic/libm/arm \
+	-I$(TCROOTPATH)/bionic/libm \
+	-I$(TCROOTPATH)/frameworks/base/include/android_runtime 
+	#-I$(TCROOTPATH)/out/target/product/$(VOTP)/obj/SHARED_LIBRARIES/libm_intermediates
+
+CCTCFLAGS:=-msoft-float -mthumb-interwork -fno-exceptions -ffunction-sections -funwind-tables -fstack-protector -fno-short-enums -fmessage-length=0 -finline-functions -finline-limit=600 -fno-inline-functions-called-once -fgcse-after-reload -frerun-cse-after-loop -frename-registers -fstrict-aliasing -funswitch-loops
+#-fwide-exec-charset=charset=UTF-32 
+
+# for target exe
+TELDFLAGS:=-nostdlib -Bdynamic -Wl,-T,$(TCROOTPATH)/build/core/armelf.x -Wl,-dynamic-linker,/system/bin/linker -Wl,--gc-sections -Wl,-z,nocopyreloc -Wl,--no-undefined -Wl,-rpath-link=$(CCTLIB) -L$(CCTLIB) 
+
+VOTEDEPS:=$(CCTLIB)/crtbegin_dynamic.o $(CCTLIB)/crtend_android.o $(TCPATH)/lib/gcc/arm-eabi/$(GCCVER)/interwork/libgcc.a -lc -lm
+
+# for target lib
+TLLDFLAGS:=-nostdlib -Wl,-T,$(TCROOTPATH)/build/core/armelf.xsc -Wl,--gc-sections -Wl,-shared,-Bsymbolic -L$(CCTLIB) -Wl,--no-whole-archive -Wl,--no-undefined $(TCPATH)/lib/gcc/arm-eabi/$(GCCVER)/interwork/libgcc.a 
+
+VOTLDEPS:=-lm -lc
+
+
+ifeq ($(VOTT), v4)
+VOCFLAGS:=-mtune=arm9tdmi -march=armv4t
+VOASFLAGS:=-march=armv4t -mfpu=softfpa
+endif
+
+ifeq ($(VOTT), v5)
+VOCFLAGS:=-march=armv5te
+VOASFLAGS:=-march=armv5te -mfpu=vfp
+endif
+
+ifeq ($(VOTT), v5x)
+VOCFLAGS:=-march=armv5te -mtune=xscale
+VOASFLAGS:=-march=armv5te -mfpu=vfp
+endif
+
+ifeq ($(VOTT), v6)
+#VOCFLAGS:=-march=armv6 -mtune=arm1136jf-s 
+#VOASFLAGS:=-march=armv6
+VOCFLAGS:=-march=armv6j -mtune=arm1136jf-s -mfpu=vfp -mfloat-abi=softfp -mapcs -mtpcs-leaf-frame -mlong-calls
+VOASFLAGS:=-march=armv6j -mcpu=arm1136jf-s -mfpu=arm1136jf-s -mfloat-abi=softfp -mapcs-float -mapcs-reentrant
+endif
+
+#
+# global link options
+VOLDFLAGS:=-Wl,-x,-X,--as-needed
+
+
+ifeq ($(VOTT), v7)
+VOCFLAGS+=-march=armv7-a -mtune=cortex-a8 -mfpu=neon -mfloat-abi=softfp
+VOASFLAGS+=-march=armv7-a -mcpu=cortex-a8 -mfpu=neon -mfloat-abi=softfp
+VOLDFLAGS+=-Wl,--fix-cortex-a8
+endif
+
+#global compiling options for ARM target
+ifneq ($(VOTT), pc)
+VOASFLAGS+=--strip-local-absolute -R
+endif 
+
+
+ifeq ($(VODBG), yes)
+VOCFLAGS+=-D_DEBUG -g
+else
+VOCFLAGS+=-DNDEBUG -O3
+endif
+
+VOCFLAGS+=$(VOPREDEF) $(VOMM) -Wall -fsigned-char -fomit-frame-pointer -fno-leading-underscore -fpic -fPIC -pipe -ftracer -fforce-addr -fno-bounds-check #-fvisibility=hidden #-fvisibility-inlines-hidden ##-ftree-loop-linear  -mthumb -nostdinc  -dD -fprefetch-loop-arrays
+
+
+ifneq ($(VOTT), pc)
+VOCFLAGS+=$(CCTCFLAGS) $(CCTINC)
+VOCPPFLAGS:=-fno-rtti $(VOCFLAGS)
+
+ifeq ($(VOMT), exe)
+VOLDFLAGS+=$(TELDFLAGS)
+endif
+
+ifeq ($(VOMT), lib)
+VOLDFLAGS+=$(TLLDFLAGS)
+endif
+else
+VOCPPFLAGS:=$(VOCFLAGS)
+ifeq ($(VOMT), lib)
+VOLDFLAGS+=-shared
+endif
+endif
+
+ifeq ($(VODBG), yes)
+#VOLDFLAGS:=
+endif
+
+# where to place object files 
+OBJDIR=obj
+
diff --git a/media/libstagefright/codecs/aacenc/basic_op/basic_op.h b/media/libstagefright/codecs/aacenc/basic_op/basic_op.h
new file mode 100644
index 0000000..5457f33
--- /dev/null
+++ b/media/libstagefright/codecs/aacenc/basic_op/basic_op.h
@@ -0,0 +1,1166 @@
+/*

+ ** Copyright 2003-2010, VisualOn, Inc.

+ **

+ ** Licensed under the Apache License, Version 2.0 (the "License");

+ ** you may not use this file except in compliance with the License.

+ ** You may obtain a copy of the License at

+ **

+ **     http://www.apache.org/licenses/LICENSE-2.0

+ **

+ ** Unless required by applicable law or agreed to in writing, software

+ ** distributed under the License is distributed on an "AS IS" BASIS,

+ ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

+ ** See the License for the specific language governing permissions and

+ ** limitations under the License.

+ */

+/*******************************************************************************

+	File:		basicop2.h

+

+	Content:	Constants , Globals and Basic arithmetic operators.

+

+*******************************************************************************/
+
+#ifndef __BASIC_OP_H
+#define __BASIC_OP_H

+
+#include "typedef.h"
+
+#define MAX_32 (Word32)0x7fffffffL
+#define MIN_32 (Word32)0x80000000L
+
+#define MAX_16 (Word16)0x7fff
+#define MIN_16 (Word16)0x8000
+#define ABS(a)	((a) >= 0) ? (a) : (-(a))

+

+/* Short abs,           1   */

+#define abs_s(x)       ((Word16)(((x) != MIN_16) ? (((x) >= 0) ? (x) : (-(x))) : MAX_16))

+

+/* 16 bit var1 -> MSB,     2 */

+#define L_deposit_h(x) (((Word32)(x)) << 16)

+

+

+/* 16 bit var1 -> LSB,     2 */

+#define L_deposit_l(x) ((Word32)(x))

+

+

+/* Long abs,              3  */

+#define L_abs(x) (((x) != MIN_32) ? (((x) >= 0) ? (x) : (-(x))) : MAX_32)

+

+

+/* Short negate,        1   */

+#define negate(var1) ((Word16)(((var1) == MIN_16) ? MAX_16 : (-(var1))))

+

+

+/* Long negate,     2 */

+#define L_negate(L_var1) (((L_var1) == (MIN_32)) ? (MAX_32) : (-(L_var1)))

+

+

+#define MULHIGH(A,B) (int)(((Word64)(A)*(Word64)(B)) >> 32)

+#define fixmul(a, b) (int)((((Word64)(a)*(Word64)(b)) >> 32) << 1)

+

+

+#if  (SATRUATE_IS_INLINE)

+__inline Word16 saturate(Word32 L_var1);

+#else

+Word16 saturate(Word32 L_var1);

+#endif

+

+/* Short shift left,    1   */

+#if (SHL_IS_INLINE)

+__inline Word16 shl (Word16 var1, Word16 var2);

+#else

+Word16 shl (Word16 var1, Word16 var2);

+#endif

+

+/* Short shift right,   1   */

+#if (SHR_IS_INLINE)

+__inline Word16 shr (Word16 var1, Word16 var2);

+#else

+Word16 shr (Word16 var1, Word16 var2);

+#endif

+

+#if (L_MULT_IS_INLINE)

+__inline Word32 L_mult(Word16 var1, Word16 var2);

+#else

+Word32 L_mult(Word16 var1, Word16 var2);

+#endif

+

+/* Msu,  1  */

+#if (L_MSU_IS_INLINE)

+__inline Word32 L_msu (Word32 L_var3, Word16 var1, Word16 var2);

+#else

+Word32 L_msu (Word32 L_var3, Word16 var1, Word16 var2);

+#endif

+    

+/* Long sub,        2 */

+#if (L_SUB_IS_INLINE)

+__inline Word32 L_sub(Word32 L_var1, Word32 L_var2);

+#else

+Word32 L_sub(Word32 L_var1, Word32 L_var2);

+#endif

+

+/* Long shift left, 2 */

+#if (L_SHL_IS_INLINE)

+__inline Word32 L_shl (Word32 L_var1, Word16 var2);

+#else

+Word32 L_shl (Word32 L_var1, Word16 var2);

+#endif

+

+/* Long shift right, 2*/

+#if (L_SHR_IS_INLINE)

+__inline Word32 L_shr (Word32 L_var1, Word16 var2);

+#else

+Word32 L_shr (Word32 L_var1, Word16 var2);

+#endif

+

+/* Short add,           1   */

+#if (ADD_IS_INLINE)

+__inline Word16 add (Word16 var1, Word16 var2);

+#else

+Word16 add (Word16 var1, Word16 var2);

+#endif

+    

+/* Short sub,           1   */

+#if (SUB_IS_INLINE)

+__inline Word16 sub(Word16 var1, Word16 var2);

+#else

+Word16 sub(Word16 var1, Word16 var2);

+#endif

+

+/* Short division,       18  */

+#if (DIV_S_IS_INLINE)

+__inline Word16 div_s (Word16 var1, Word16 var2);

+#else

+Word16 div_s (Word16 var1, Word16 var2);

+#endif

+

+/* Short mult,          1   */

+#if (MULT_IS_INLINE)

+__inline Word16 mult (Word16 var1, Word16 var2);

+#else

+Word16 mult (Word16 var1, Word16 var2);

+#endif

+

+/* Short norm,           15  */

+#if (NORM_S_IS_INLINE)

+__inline Word16 norm_s (Word16 var1);

+#else

+Word16 norm_s (Word16 var1);

+#endif

+

+/* Long norm,            30  */

+#if (NORM_L_IS_INLINE)

+__inline Word16 norm_l (Word32 L_var1);

+#else

+Word16 norm_l (Word32 L_var1);

+#endif

+

+/* Round,               1   */

+#if (ROUND_IS_INLINE)

+__inline Word16 round16(Word32 L_var1);

+#else

+Word16 round16(Word32 L_var1);

+#endif

+

+/* Mac,  1  */

+#if (L_MAC_IS_INLINE)

+__inline Word32 L_mac (Word32 L_var3, Word16 var1, Word16 var2);

+#else

+Word32 L_mac (Word32 L_var3, Word16 var1, Word16 var2);

+#endif

+

+#if (L_ADD_IS_INLINE)

+__inline Word32 L_add (Word32 L_var1, Word32 L_var2);

+#else

+Word32 L_add (Word32 L_var1, Word32 L_var2);

+#endif

+

+/* Extract high,        1   */

+#if (EXTRACT_H_IS_INLINE)

+__inline Word16 extract_h (Word32 L_var1);

+#else

+Word16 extract_h (Word32 L_var1);

+#endif

+

+/* Extract low,         1   */

+#if (EXTRACT_L_IS_INLINE)

+__inline Word16 extract_l(Word32 L_var1);

+#else

+Word16 extract_l(Word32 L_var1);

+#endif

+

+/* Mult with round, 2 */

+#if (MULT_R_IS_INLINE)

+__inline Word16 mult_r(Word16 var1, Word16 var2);

+#else

+Word16 mult_r(Word16 var1, Word16 var2);

+#endif

+

+/* Shift right with round, 2           */

+#if (SHR_R_IS_INLINE)

+__inline Word16 shr_r (Word16 var1, Word16 var2);

+#else

+Word16 shr_r (Word16 var1, Word16 var2);

+#endif

+

+/* Mac with rounding,2 */

+#if (MAC_R_IS_INLINE)

+__inline Word16 mac_r (Word32 L_var3, Word16 var1, Word16 var2);

+#else

+Word16 mac_r (Word32 L_var3, Word16 var1, Word16 var2);

+#endif

+

+/* Msu with rounding,2 */

+#if (MSU_R_IS_INLINE)

+__inline Word16 msu_r (Word32 L_var3, Word16 var1, Word16 var2);

+#else

+Word16 msu_r (Word32 L_var3, Word16 var1, Word16 var2);

+#endif

+

+/* Long shift right with round,  3             */

+#if (L_SHR_R_IS_INLINE)

+__inline Word32 L_shr_r (Word32 L_var1, Word16 var2);

+#else

+Word32 L_shr_r (Word32 L_var1, Word16 var2);

+#endif

+

+#if ARMV4_INASM

+__inline Word32 ASM_L_shr(Word32 L_var1, Word16 var2)

+{

+	Word32 result; 

+	asm volatile( 

+		"MOV %[result], %[L_var1], ASR %[var2] \n" 

+		:[result]"=r"(result)

+		:[L_var1]"r"(L_var1), [var2]"r"(var2)

+		); 

+	return result;	

+}

+ 

+__inline Word32 ASM_L_shl(Word32 L_var1, Word16 var2)

+{

+	Word32 result; 

+	asm volatile( 

+		"MOV	r2, %[L_var1] \n"

+		"MOV	r3, #0x7fffffff\n"

+		"MOV	%[result], %[L_var1], ASL %[var2] \n" 

+		"TEQ	r2, %[result], ASR %[var2]\n"

+		"EORNE  %[result],r3,r2,ASR#31\n"

+		:[result]"+r"(result)

+		:[L_var1]"r"(L_var1), [var2]"r"(var2)

+		:"r2", "r3"

+		); 

+	return result;	

+}

+

+__inline Word32 ASM_shr(Word32 L_var1, Word16 var2)

+{

+	Word32 result; 

+	asm volatile( 

+		"CMP	%[var2], #15\n"

+		"MOVGE  %[var2], #15\n"

+		"MOV	%[result], %[L_var1], ASR %[var2]\n"

+		:[result]"=r"(result)

+		:[L_var1]"r"(L_var1), [var2]"r"(var2) 

+		); 

+	return result;	

+} 

+

+__inline Word32 ASM_shl(Word32 L_var1, Word16 var2)

+{

+	Word32 result; 

+	asm volatile( 

+		"CMP	%[var2], #16\n"

+		"MOVGE  %[var2], #16\n"

+		"MOV    %[result], %[L_var1], ASL %[var2]\n"

+		"MOV    r3, #1\n"

+        "MOV    r2, %[result], ASR #15\n"

+        "RSB    r3,r3,r3,LSL #15 \n"

+        "TEQ    r2, %[result], ASR #31 \n"

+        "EORNE  %[result], r3, %[result],ASR #31"

+		:[result]"+r"(result)

+		:[L_var1]"r"(L_var1), [var2]"r"(var2)

+		:"r2", "r3"

+		); 

+	return result;	

+} 

+#endif

+

+/*___________________________________________________________________________

+ |                                                                           |

+ |   definitions for inline basic arithmetic operators                       |

+ |___________________________________________________________________________|

+*/

+#if (SATRUATE_IS_INLINE)

+__inline Word16 saturate(Word32 L_var1)

+{

+#if ARMV5TE_SAT

+	Word16 result;

+	asm volatile (

+		"MOV	%[result], %[L_var1]\n"

+		"MOV	r3, #1\n"

+		"MOV	r2,%[L_var1],ASR#15\n"

+		"RSB	r3, r3, r3, LSL #15\n"

+		"TEQ	r2,%[L_var1],ASR#31\n"	

+		"EORNE	%[result],r3,%[L_var1],ASR#31\n"

+		:[result]"+r"(result)

+		:[L_var1]"r"(L_var1)

+		:"r2", "r3"			

+	);

+

+	return result;

+#else

+    Word16 var_out;

+    

+    //var_out = (L_var1 > (Word32)0X00007fffL) ? (MAX_16) : ((L_var1 < (Word32)0xffff8000L) ? (MIN_16) : ((Word16)L_var1));

+

+    if (L_var1 > 0X00007fffL)

+    {

+        var_out = MAX_16;

+    }

+    else if (L_var1 < (Word32) 0xffff8000L)

+    {

+        var_out = MIN_16;

+    }

+    else

+    {

+        var_out = extract_l(L_var1);

+    }

+

+    return (var_out);

+#endif

+}

+#endif

+

+/* Short shift left,    1   */

+#if (SHL_IS_INLINE)

+__inline Word16 shl (Word16 var1, Word16 var2)

+{

+#if ARMV5TE_SHL

+	if(var2>=0)

+	{

+		return ASM_shl( var1, var2);

+	}

+	else

+	{

+		return ASM_shr( var1, -var2);

+	}

+#else

+    Word16 var_out;

+    Word32 result;

+

+    if (var2 < 0)

+    {

+        var_out = shr (var1, (Word16)-var2);

+    }

+    else

+    {

+        result = (Word32) var1 *((Word32) 1 << var2);

+

+        if ((var2 > 15 && var1 != 0) || (result != (Word32) ((Word16) result)))

+        {

+            var_out = (Word16)((var1 > 0) ? MAX_16 : MIN_16);

+        }

+        else

+        {

+            var_out = extract_l(result);

+        }

+    }

+    return (var_out);

+#endif

+}

+#endif

+

+/* Short shift right,   1   */

+#if (SHR_IS_INLINE)

+__inline Word16 shr (Word16 var1, Word16 var2)

+{

+#if ARMV5TE_SHR

+	if(var2>=0)

+	{

+		return  ASM_shr( var1, var2);

+	}

+	else

+	{

+		return  ASM_shl( var1, -var2);

+	}

+#else

+    Word16 var_out;

+

+    if (var2 < 0)

+    {

+        var_out = shl (var1, (Word16)-var2);

+    }

+    else

+    {

+        if (var2 >= 15)

+        {

+            var_out = (Word16)((var1 < 0) ? -1 : 0);

+        }

+        else

+        {

+            if (var1 < 0)

+            {

+                var_out = (Word16)(~((~var1) >> var2));

+            }

+            else

+            {

+                var_out = (Word16)(var1 >> var2);

+            }

+        }

+    }

+

+    return (var_out);

+#endif

+}

+#endif

+

+

+#if (L_MULT_IS_INLINE)

+__inline Word32 L_mult(Word16 var1, Word16 var2)

+{

+#if ARMV5TE_L_MULT

+	Word32 result; 

+	asm volatile( 

+		"SMULBB %[result], %[var1], %[var2] \n" 

+		"QADD %[result], %[result], %[result] \n" 

+		:[result]"+r"(result)

+		:[var1]"r"(var1), [var2]"r"(var2)

+		); 

+	return result;

+#else

+    Word32 L_var_out;

+

+    L_var_out = (Word32) var1 *(Word32) var2;

+

+    if (L_var_out != (Word32) 0x40000000L)

+    {

+        L_var_out <<= 1;

+    }

+    else

+    {

+        L_var_out = MAX_32;

+    }

+    return (L_var_out);

+#endif

+}

+#endif

+

+#if (L_MSU_IS_INLINE)

+__inline Word32 L_msu (Word32 L_var3, Word16 var1, Word16 var2)

+{

+#if ARMV5TE_L_MSU

+	Word32 result; 

+	asm volatile( 

+		"SMULBB %[result], %[var1], %[var2] \n" 

+		"QADD %[result], %[result], %[result] \n"

+		"QSUB %[result], %[L_var3], %[result]\n"

+		:[result]"+r"(result)

+		:[L_var3]"r"(L_var3), [var1]"r"(var1), [var2]"r"(var2)

+		); 

+	return result;

+#else

+    Word32 L_var_out;

+    Word32 L_product;

+

+    L_product = L_mult(var1, var2);

+    L_var_out = L_sub(L_var3, L_product);

+    return (L_var_out);

+#endif

+}

+#endif

+

+#if (L_SUB_IS_INLINE)

+__inline Word32 L_sub(Word32 L_var1, Word32 L_var2)

+{

+#if ARMV5TE_L_SUB

+	Word32 result; 

+	asm volatile( 

+		"QSUB %[result], %[L_var1], %[L_var2]\n"

+		:[result]"+r"(result)

+		:[L_var1]"r"(L_var1), [L_var2]"r"(L_var2)

+		); 

+	return result;

+#else

+    Word32 L_var_out;

+

+    L_var_out = L_var1 - L_var2;

+

+    if (((L_var1 ^ L_var2) & MIN_32) != 0)

+    {

+        if ((L_var_out ^ L_var1) & MIN_32)

+        {

+            L_var_out = (L_var1 < 0L) ? MIN_32 : MAX_32;

+        }

+    }

+

+    return (L_var_out);

+#endif

+}

+#endif

+

+#if (L_SHL_IS_INLINE)

+__inline Word32 L_shl(Word32 L_var1, Word16 var2)

+{

+#if ARMV5TE_L_SHL

+    if(var2>=0)

+    {

+        return  ASM_L_shl( L_var1, var2);

+    }

+    else

+    {

+        return  ASM_L_shr( L_var1, -var2);

+    }

+#else

+    Word32 L_var_out = 0L;

+

+    if (var2 <= 0)

+    {

+        L_var1 = L_shr(L_var1, (Word16)-var2);

+    }

+    else

+    {

+        for (; var2 > 0; var2--)

+        {

+            if (L_var1 > (Word32) 0X3fffffffL)

+            {

+                return MAX_32;

+            }

+            else

+            {

+                if (L_var1 < (Word32) 0xc0000000L)

+                {

+                    return MIN_32;

+                }

+            }

+            L_var1 <<= 1;

+            L_var_out = L_var1;

+        }

+    }

+    return (L_var1);

+#endif

+}

+#endif

+

+#if (L_SHR_IS_INLINE)

+__inline Word32 L_shr (Word32 L_var1, Word16 var2)

+{

+#if ARMV5TE_L_SHR

+	if(var2>=0)

+	{

+		return ASM_L_shr( L_var1, var2);

+	}

+	else

+	{

+		return ASM_L_shl( L_var1, -var2);

+	}

+#else

+    Word32 L_var_out;

+

+    if (var2 < 0)

+    {

+        L_var_out = L_shl (L_var1, (Word16)-var2);

+    }

+    else

+    {

+        if (var2 >= 31)

+        {

+            L_var_out = (L_var1 < 0L) ? -1 : 0;

+        }

+        else

+        {

+            if (L_var1 < 0)

+            {

+                L_var_out = ~((~L_var1) >> var2);

+            }

+            else

+            {

+                L_var_out = L_var1 >> var2;

+            }

+        }

+    }

+    return (L_var_out);

+#endif

+}

+#endif

+

+/* Short add,           1   */

+#if (ADD_IS_INLINE)

+__inline Word16 add (Word16 var1, Word16 var2)

+{

+#if ARMV5TE_ADD

+	Word32 result; 

+	asm volatile( 

+		"ADD  %[result], %[var1], %[var2] \n" 

+		"MOV  r3, #0x1\n"

+		"MOV  r2, %[result], ASR #15\n"

+		"RSB  r3, r3, r3, LSL, #15\n"

+		"TEQ  r2, %[result], ASR #31\n"

+		"EORNE %[result], r3, %[result], ASR #31"

+		:[result]"+r"(result)

+		:[var1]"r"(var1), [var2]"r"(var2)

+		:"r2", "r3"

+		); 

+	return result;

+#else

+    Word16 var_out;

+    Word32 L_sum;

+

+    L_sum = (Word32) var1 + var2;

+    var_out = saturate(L_sum);

+

+    return (var_out);

+#endif

+}

+#endif

+

+/* Short sub,           1   */

+#if (SUB_IS_INLINE)

+__inline Word16 sub(Word16 var1, Word16 var2)

+{

+#if ARMV5TE_SUB

+	Word32 result; 

+	asm volatile( 

+		"MOV   r3, #1\n"

+		"SUB   %[result], %[var1], %[var2] \n"		

+		"RSB   r3,r3,r3,LSL#15\n"

+		"MOV   r2, %[var1], ASR #15 \n" 

+		"TEQ   r2, %[var1], ASR #31 \n"

+		"EORNE %[result], r3, %[result], ASR #31 \n"

+		:[result]"+r"(result)

+		:[var1]"r"(var1), [var2]"r"(var2)

+		:"r2", "r3"

+		); 

+	return result;

+#else

+    Word16 var_out;

+    Word32 L_diff;

+

+    L_diff = (Word32) var1 - var2;

+    var_out = saturate(L_diff);

+   

+    return (var_out);

+#endif

+}

+#endif

+

+/* Short division,       18  */

+#if (DIV_S_IS_INLINE)

+__inline Word16 div_s (Word16 var1, Word16 var2)

+{

+    Word16 var_out = 0;

+    Word16 iteration;

+    Word32 L_num;

+    Word32 L_denom;

+

+    var_out = MAX_16;

+    if (var1!= var2)//var1!= var2

+    {

+    	var_out = 0;

+    	L_num = (Word32) var1;

+    

+    	L_denom = (Word32) var2;

+    	

+		//return (L_num<<15)/var2;

+

+    	for (iteration = 0; iteration < 15; iteration++)

+    	{

+    		var_out <<= 1;

+    		L_num <<= 1;

+    		

+    		if (L_num >= L_denom)

+    		{

+    			L_num -= L_denom;

+    			var_out++;

+    		}

+    	}

+    }

+    return (var_out);

+}

+#endif

+

+/* Short mult,          1   */

+#if (MULT_IS_INLINE)

+__inline Word16 mult (Word16 var1, Word16 var2)

+{

+#if ARMV5TE_MULT

+	Word32 result; 

+	asm volatile( 

+		"SMULBB r2, %[var1], %[var2] \n"

+		"MOV	r3, #1\n"

+		"MOV	%[result], r2, ASR #15\n"

+		"RSB	r3, r3, r3, LSL #15\n"

+		"MOV	r2, %[result], ASR #15\n"

+		"TEQ	r2, %[result], ASR #31\n"

+		"EORNE  %[result], r3, %[result], ASR #31 \n"

+		:[result]"+r"(result)

+		:[var1]"r"(var1), [var2]"r"(var2)

+		:"r2", "r3"

+		); 

+	return result;

+#else

+    Word16 var_out;

+    Word32 L_product;

+

+    L_product = (Word32) var1 *(Word32) var2;

+    L_product = (L_product & (Word32) 0xffff8000L) >> 15;

+    if (L_product & (Word32) 0x00010000L)

+        L_product = L_product | (Word32) 0xffff0000L;

+    var_out = saturate(L_product);

+

+    return (var_out);

+#endif

+}

+#endif

+

+

+/* Short norm,           15  */

+#if (NORM_S_IS_INLINE)

+__inline Word16 norm_s (Word16 var1)

+{

+#if ARMV5TE_NORM_S

+	Word16 result; 

+	asm volatile( 

+		"MOV   r2,%[var1] \n"

+		"CMP   r2, #0\n"

+		"RSBLT %[var1], %[var1], #0 \n"

+		"CLZNE %[result], %[var1]\n"

+		"SUBNE %[result], %[result], #17\n"

+		"MOVEQ %[result], #0\n"

+		"CMP   r2, #-1\n"

+		"MOVEQ %[result], #15\n" 

+		:[result]"+r"(result)

+		:[var1]"r"(var1)

+		:"r2"

+		); 

+	return result;

+#else

+    Word16 var_out;

+

+    if (var1 == 0)

+    {

+        var_out = 0;

+    }

+    else

+    {

+        if (var1 == -1)

+        {

+            var_out = 15;

+        }

+        else

+        {

+            if (var1 < 0)

+            {

+                var1 = (Word16)~var1;

+            }

+            for (var_out = 0; var1 < 0x4000; var_out++)

+            {

+                var1 <<= 1;

+            }

+        }

+    }

+    return (var_out);

+#endif

+}

+#endif

+

+/* Long norm,            30  */

+#if (NORM_L_IS_INLINE)

+__inline Word16 norm_l (Word32 L_var1)

+{

+#if ARMV5TE_NORM_L

+	Word16 result; 

+	asm volatile( 

+		"CMP    %[L_var1], #0\n"

+		"CLZNE  %[result], %[L_var1]\n"

+		"SUBNE  %[result], %[result], #1\n" 

+		"MOVEQ  %[result], #0\n"

+		:[result]"+r"(result)

+		:[L_var1]"r"(L_var1)

+		); 

+	return result;

+#else

+    //Word16 var_out;

+

+    //if (L_var1 == 0)

+    //{

+    //    var_out = 0;

+    //}

+    //else

+    //{

+    //    if (L_var1 == (Word32) 0xffffffffL)

+    //    {

+    //        var_out = 31;

+    //    }

+    //    else

+    //    {

+    //        if (L_var1 < 0)

+    //        {

+    //            L_var1 = ~L_var1;

+    //        }

+    //        for (var_out = 0; L_var1 < (Word32) 0x40000000L; var_out++)

+    //        {

+    //            L_var1 <<= 1;

+    //        }

+    //    }

+    //}

+    //return (var_out);

+  Word16 a16;

+  Word16 r = 0 ;       

+

+   

+  if ( L_var1 < 0 ) {

+    L_var1 = ~L_var1; 

+  }

+

+  if (0 == (L_var1 & 0x7fff8000)) {

+    a16 = extract_l(L_var1);

+    r += 16;

+       

+    if (0 == (a16 & 0x7f80)) {

+      r += 8;

+         

+      if (0 == (a16 & 0x0078)) {

+        r += 4;

+           

+        if (0 == (a16 & 0x0006)) {

+          r += 2;

+             

+          if (0 == (a16 & 0x0001)) {

+            r += 1;

+          }

+        }

+        else {

+             

+          if (0 == (a16 & 0x0004)) {

+            r += 1;

+          }

+        }

+      }

+      else {

+           

+        if (0 == (a16 & 0x0060)) {

+          r += 2;

+             

+          if (0 == (a16 & 0x0010)) {

+            r += 1;

+          }

+        }

+        else {

+             

+          if (0 == (a16 & 0x0040)) {

+            r += 1;

+          }

+        }

+      }

+    } 

+    else { 

+         

+      if (0 == (a16 & 0x7800)) {

+        r += 4;

+           

+        if (0 == (a16 & 0x0600)) {

+          r += 2;

+             

+          if (0 == (a16 & 0x0100)) {

+            r += 1;

+          }

+        }

+        else {

+             

+          if (0 == (a16 & 0x0400)) {

+            r += 1;

+          }

+        }

+      }

+      else {

+           

+        if (0 == (a16 & 0x6000)) {

+          r += 2;

+             

+          if (0 == (a16 & 0x1000)) {

+            r += 1;

+          }

+        }

+        else {

+             

+          if (0 == (a16 & 0x4000)) {

+            r += 1;

+          }

+        }

+      }

+    }

+  }

+  else {

+    a16 = extract_h(L_var1);

+       

+    if (0 == (a16 & 0x7f80)) {

+      r += 8;

+         

+      if (0 == (a16 & 0x0078)) {

+        r += 4 ;

+           

+        if (0 == (a16 & 0x0006)) {

+          r += 2;

+             

+          if (0 == (a16 & 0x0001)) {

+            r += 1;

+          }

+        }

+        else {

+             

+          if (0 == (a16 & 0x0004)) {

+            r += 1;

+          }

+        }

+      }

+      else {

+           

+        if (0 == (a16 & 0x0060)) {

+          r += 2;

+             

+          if (0 == (a16 & 0x0010)) {

+            r += 1;

+          }

+        }

+        else {

+             

+          if (0 == (a16 & 0x0040)) {

+            r += 1;

+          }

+        }

+      }

+    }

+    else {

+         

+      if (0 == (a16 & 0x7800)) {

+        r += 4;

+           

+        if (0 == (a16 & 0x0600)) {

+          r += 2;

+             

+          if (0 == (a16 & 0x0100)) {

+            r += 1;

+          }

+        }

+        else {

+             

+          if (0 == (a16 & 0x0400)) {

+            r += 1;

+          }

+        }

+      }

+      else {

+           

+        if (0 == (a16 & 0x6000)) {

+          r += 2;

+             

+          if (0 == (a16 & 0x1000)) {

+            r += 1;

+          }

+        }

+        else {

+             

+          if (0 == (a16 & 0x4000)) {

+            return 1;

+          }

+        }

+      }

+    }

+  }

+  

+  return r ;

+#endif

+}

+#endif

+

+/* Round,               1   */

+#if (ROUND_IS_INLINE)

+__inline Word16 round16(Word32 L_var1)

+{

+#if ARMV5TE_ROUND

+	Word16 result; 

+	asm volatile( 

+		"MOV   r1,#0x00008000\n"

+		"QADD  %[result], %[L_var1], r1\n"

+		"MOV   %[result], %[result], ASR #16 \n" 

+		:[result]"+r"(result)

+		:[L_var1]"r"(L_var1)

+		:"r1"

+		); 

+	return result;

+#else   

+    Word16 var_out;

+    Word32 L_rounded;

+

+    L_rounded = L_add (L_var1, (Word32) 0x00008000L);

+    var_out = extract_h (L_rounded);

+    return (var_out);

+#endif

+}

+#endif

+

+/* Mac,  1  */

+#if (L_MAC_IS_INLINE)

+__inline Word32 L_mac (Word32 L_var3, Word16 var1, Word16 var2)

+{

+#if ARMV5TE_L_MAC

+	Word32 result; 

+	asm volatile( 

+		"SMULBB %[result], %[var1], %[var2]\n"

+		"QADD	%[result], %[result], %[result]\n"

+		"QADD   %[result], %[result], %[L_var3]\n"

+		:[result]"+r"(result)

+		: [L_var3]"r"(L_var3), [var1]"r"(var1), [var2]"r"(var2)

+		); 

+	return result;

+#else

+    Word32 L_var_out;

+    Word32 L_product;

+

+    L_product = L_mult(var1, var2);

+    L_var_out = L_add (L_var3, L_product);

+    return (L_var_out);

+#endif

+}

+#endif

+

+#if (L_ADD_IS_INLINE)

+__inline Word32 L_add (Word32 L_var1, Word32 L_var2)

+{

+#if ARMV5TE_L_ADD

+	Word32 result; 

+	asm volatile( 

+		"QADD %[result], %[L_var1], %[L_var2]\n"

+		:[result]"+r"(result)

+		:[L_var1]"r"(L_var1), [L_var2]"r"(L_var2)

+		); 

+	return result;

+#else

+    Word32 L_var_out;

+

+    L_var_out = L_var1 + L_var2;

+    if (((L_var1 ^ L_var2) & MIN_32) == 0)

+    {

+        if ((L_var_out ^ L_var1) & MIN_32)

+        {

+            L_var_out = (L_var1 < 0) ? MIN_32 : MAX_32;

+        }

+    }

+    return (L_var_out);

+#endif

+}

+#endif

+

+

+

+#if (MULT_R_IS_INLINE)

+__inline Word16 mult_r (Word16 var1, Word16 var2)

+{

+    Word16 var_out;

+    Word32 L_product_arr;

+

+    L_product_arr = (Word32)var1 *(Word32)var2;       /* product */

+    L_product_arr += (Word32)0x00004000L;      /* round */

+    L_product_arr >>= 15;       /* shift */

+

+    var_out = saturate(L_product_arr);

+

+    return (var_out);

+}

+#endif

+

+#if (SHR_R_IS_INLINE)

+__inline Word16 shr_r (Word16 var1, Word16 var2)

+{

+    Word16 var_out;

+

+    if (var2 > 15)

+    {

+        var_out = 0;

+    }

+    else

+    {

+        var_out = shr(var1, var2);

+

+        if (var2 > 0)

+        {

+            if ((var1 & ((Word16) 1 << (var2 - 1))) != 0)

+            {

+                var_out++;

+            }

+        }

+    }

+

+    return (var_out);

+}

+#endif

+

+#if (MAC_R_IS_INLINE)

+__inline Word16 mac_r (Word32 L_var3, Word16 var1, Word16 var2)

+{

+    Word16 var_out;

+

+    L_var3 = L_mac (L_var3, var1, var2);

+    var_out = (Word16)((L_var3 + 0x8000L) >> 16);

+

+    return (var_out);

+}

+#endif

+

+#if (MSU_R_IS_INLINE)

+__inline Word16 msu_r (Word32 L_var3, Word16 var1, Word16 var2)

+{

+    Word16 var_out;

+

+    L_var3 = L_msu (L_var3, var1, var2);

+    var_out = (Word16)((L_var3 + 0x8000L) >> 16);

+    

+    return (var_out);

+}

+#endif

+

+#if (L_SHR_R_IS_INLINE)

+__inline Word32 L_shr_r (Word32 L_var1, Word16 var2)

+{

+    Word32 L_var_out;

+

+    if (var2 > 31)

+    {

+        L_var_out = 0;

+    }

+    else

+    {

+        L_var_out = L_shr(L_var1, var2);

+

+        if (var2 > 0)

+        {

+            if ((L_var1 & ((Word32) 1 << (var2 - 1))) != 0)

+            {

+                L_var_out++;

+            }

+        }

+    }

+

+    return (L_var_out);

+}

+#endif

+

+#if (EXTRACT_H_IS_INLINE)

+__inline Word16 extract_h (Word32 L_var1)

+{

+    Word16 var_out;

+

+    var_out = (Word16) (L_var1 >> 16);

+

+    return (var_out);

+}

+#endif

+

+#if (EXTRACT_L_IS_INLINE)

+__inline Word16 extract_l(Word32 L_var1)

+{

+	return (Word16) L_var1;

+}

+#endif

+

+#endif
diff --git a/media/libstagefright/codecs/aacenc/basic_op/basicop2.c b/media/libstagefright/codecs/aacenc/basic_op/basicop2.c
new file mode 100644
index 0000000..a0d5dba
--- /dev/null
+++ b/media/libstagefright/codecs/aacenc/basic_op/basicop2.c
@@ -0,0 +1,1624 @@
+/*

+ ** Copyright 2003-2010, VisualOn, Inc.

+ **

+ ** Licensed under the Apache License, Version 2.0 (the "License");

+ ** you may not use this file except in compliance with the License.

+ ** You may obtain a copy of the License at

+ **

+ **     http://www.apache.org/licenses/LICENSE-2.0

+ **

+ ** Unless required by applicable law or agreed to in writing, software

+ ** distributed under the License is distributed on an "AS IS" BASIS,

+ ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

+ ** See the License for the specific language governing permissions and

+ ** limitations under the License.

+ */

+/*******************************************************************************

+	File:		basicop2.c

+

+	Content:	Basic arithmetic operators. 

+

+*******************************************************************************/
+
+#include "typedef.h"
+#include "basic_op.h"

+

+

+/*___________________________________________________________________________

+ |                                                                           |

+ |   Functions                                                               |

+ |___________________________________________________________________________|

+*/

+

+/*___________________________________________________________________________

+ |                                                                           |

+ |   Function Name : saturate                                                |

+ |                                                                           |

+ |   Purpose :                                                               |

+ |                                                                           |

+ |    Limit the 32 bit input to the range of a 16 bit word.                  |

+ |                                                                           |

+ |   Inputs :                                                                |

+ |                                                                           |

+ |    L_var1                                                                 |

+ |             32 bit long signed integer (Word32) whose value falls in the  |

+ |             range : 0x8000 0000 <= L_var1 <= 0x7fff ffff.                 |

+ |                                                                           |

+ |   Outputs :                                                               |

+ |                                                                           |

+ |    none                                                                   |

+ |                                                                           |

+ |   Return Value :                                                          |

+ |                                                                           |

+ |    var_out                                                                |

+ |             16 bit short signed integer (Word16) whose value falls in the |

+ |             range : 0xffff 8000 <= var_out <= 0x0000 7fff.                |

+ |___________________________________________________________________________|

+*/

+

+#if (!SATRUATE_IS_INLINE)

+Word16 saturate(Word32 L_var1)

+{

+    Word16 var_out;

+

+    if (L_var1 > 0X00007fffL)

+    {

+        var_out = MAX_16;

+    }

+    else if (L_var1 < (Word32) 0xffff8000L)

+    {

+        var_out = MIN_16;

+    }

+    else

+    {

+        var_out = extract_l(L_var1);

+    }

+

+    return (var_out);

+}

+#endif

+

+/*___________________________________________________________________________

+ |                                                                           |

+ |   Function Name : add                                                     |

+ |                                                                           |

+ |   Purpose :                                                               |

+ |                                                                           |

+ |    Performs the addition (var1+var2) with overflow control and saturation;|

+ |    the 16 bit result is set at +32767 when overflow occurs or at -32768   |

+ |    when underflow occurs.                                                 |

+ |                                                                           |

+ |   Complexity weight : 1                                                   |

+ |                                                                           |

+ |   Inputs :                                                                |

+ |                                                                           |

+ |    var1                                                                   |

+ |             16 bit short signed integer (Word16) whose value falls in the |

+ |             range : 0xffff 8000 <= var1 <= 0x0000 7fff.                   |

+ |                                                                           |

+ |    var2                                                                   |

+ |             16 bit short signed integer (Word16) whose value falls in the |

+ |             range : 0xffff 8000 <= var1 <= 0x0000 7fff.                   |

+ |                                                                           |

+ |   Outputs :                                                               |

+ |                                                                           |

+ |    none                                                                   |

+ |                                                                           |

+ |   Return Value :                                                          |

+ |                                                                           |

+ |    var_out                                                                |

+ |             16 bit short signed integer (Word16) whose value falls in the |

+ |             range : 0xffff 8000 <= var_out <= 0x0000 7fff.                |

+ |___________________________________________________________________________|

+*/

+

+#if (!ADD_IS_INLINE)

+Word16 add (Word16 var1, Word16 var2)

+{

+    Word16 var_out;

+    Word32 L_sum;

+

+    L_sum = (Word32)var1 + (Word32)var2;

+    var_out = saturate(L_sum);

+

+    return (var_out);

+}

+#endif

+

+/*___________________________________________________________________________

+ |                                                                           |

+ |   Function Name : sub                                                     |

+ |                                                                           |

+ |   Purpose :                                                               |

+ |                                                                           |

+ |    Performs the subtraction (var1+var2) with overflow control and satu-   |

+ |    ration; the 16 bit result is set at +32767 when overflow occurs or at  |

+ |    -32768 when underflow occurs.                                          |

+ |                                                                           |

+ |   Complexity weight : 1                                                   |

+ |                                                                           |

+ |   Inputs :                                                                |

+ |                                                                           |

+ |    var1                                                                   |

+ |             16 bit short signed integer (Word16) whose value falls in the |

+ |             range : 0xffff 8000 <= var1 <= 0x0000 7fff.                   |

+ |                                                                           |

+ |    var2                                                                   |

+ |             16 bit short signed integer (Word16) whose value falls in the |

+ |             range : 0xffff 8000 <= var1 <= 0x0000 7fff.                   |

+ |                                                                           |

+ |   Outputs :                                                               |

+ |                                                                           |

+ |    none                                                                   |

+ |                                                                           |

+ |   Return Value :                                                          |

+ |                                                                           |

+ |    var_out                                                                |

+ |             16 bit short signed integer (Word16) whose value falls in the |

+ |             range : 0xffff 8000 <= var_out <= 0x0000 7fff.                |

+ |___________________________________________________________________________|

+*/

+#if (!SUB_IS_INLINE)

+Word16 sub(Word16 var1, Word16 var2)

+{

+    Word16 var_out;

+    Word32 L_diff;

+

+    L_diff = (Word32) var1 - var2;

+    var_out = saturate(L_diff);

+

+    return (var_out);

+}

+#endif

+

+/*___________________________________________________________________________

+ |                                                                           |

+ |   Function Name : abs_s                                                   |

+ |                                                                           |

+ |   Purpose :                                                               |

+ |                                                                           |

+ |    Absolute value of var1; abs_s(-32768) = 32767.                         |

+ |                                                                           |

+ |   Complexity weight : 1                                                   |

+ |                                                                           |

+ |   Inputs :                                                                |

+ |                                                                           |

+ |    var1                                                                   |

+ |             16 bit short signed integer (Word16) whose value falls in the |

+ |             range : 0xffff 8000 <= var1 <= 0x0000 7fff.                   |

+ |                                                                           |

+ |   Outputs :                                                               |

+ |                                                                           |

+ |    none                                                                   |

+ |                                                                           |

+ |   Return Value :                                                          |

+ |                                                                           |

+ |    var_out                                                                |

+ |             16 bit short signed integer (Word16) whose value falls in the |

+ |             range : 0x0000 0000 <= var_out <= 0x0000 7fff.                |

+ |___________________________________________________________________________|

+*/

+//Word16 abs_s (Word16 var1)

+//{

+//    Word16 var_out;

+//

+//    if (var1 == MIN_16)

+//    {

+//        var_out = MAX_16;

+//    }

+//    else

+//    {

+//        if (var1 < 0)

+//        {

+//            var_out = (Word16)-var1;

+//        }

+//        else

+//        {

+//            var_out = var1;

+//        }

+//    }

+//

+//    return (var_out);

+//}

+

+

+/*___________________________________________________________________________

+ |                                                                           |

+ |   Function Name : shl                                                     |

+ |                                                                           |

+ |   Purpose :                                                               |

+ |                                                                           |

+ |   Arithmetically shift the 16 bit input var1 left var2 positions.Zero fill|

+ |   the var2 LSB of the result. If var2 is negative, arithmetically shift   |

+ |   var1 right by -var2 with sign extension. Saturate the result in case of |

+ |   underflows or overflows.                                                |

+ |                                                                           |

+ |   Complexity weight : 1                                                   |

+ |                                                                           |

+ |   Inputs :                                                                |

+ |                                                                           |

+ |    var1                                                                   |

+ |             16 bit short signed integer (Word16) whose value falls in the |

+ |             range : 0xffff 8000 <= var1 <= 0x0000 7fff.                   |

+ |                                                                           |

+ |    var2                                                                   |

+ |             16 bit short signed integer (Word16) whose value falls in the |

+ |             range : 0xffff 8000 <= var1 <= 0x0000 7fff.                   |

+ |                                                                           |

+ |   Outputs :                                                               |

+ |                                                                           |

+ |    none                                                                   |

+ |                                                                           |

+ |   Return Value :                                                          |

+ |                                                                           |

+ |    var_out                                                                |

+ |             16 bit short signed integer (Word16) whose value falls in the |

+ |             range : 0xffff 8000 <= var_out <= 0x0000 7fff.                |

+ |___________________________________________________________________________|

+*/

+

+#if (!SHL_IS_INLINE)

+Word16 shl (Word16 var1, Word16 var2)

+{

+    Word16 var_out;

+    Word32 result;

+

+    if (var2 < 0)

+    {

+        if (var2 < -16)

+            var2 = -16;

+        var_out = shr (var1, (Word16)-var2);

+    }

+    else

+    {

+        result = (Word32) var1 *((Word32) 1 << var2);

+

+        if ((var2 > 15 && var1 != 0) || (result != (Word32) ((Word16) result)))

+        {

+            //Overflow = 1;

+            var_out = (Word16)((var1 > 0) ? MAX_16 : MIN_16);

+        }

+        else

+        {

+            var_out = extract_l(result);

+        }

+    }

+

+    return (var_out);

+}

+#endif

+// end

+

+/*___________________________________________________________________________

+ |                                                                           |

+ |   Function Name : shr                                                     |

+ |                                                                           |

+ |   Purpose :                                                               |

+ |                                                                           |

+ |   Arithmetically shift the 16 bit input var1 right var2 positions with    |

+ |   sign extension. If var2 is negative, arithmetically shift var1 left by  |

+ |   -var2 with sign extension. Saturate the result in case of underflows or |

+ |   overflows.                                                              |

+ |                                                                           |

+ |   Complexity weight : 1                                                   |

+ |                                                                           |

+ |   Inputs :                                                                |

+ |                                                                           |

+ |    var1                                                                   |

+ |             16 bit short signed integer (Word16) whose value falls in the |

+ |             range : 0xffff 8000 <= var1 <= 0x0000 7fff.                   |

+ |                                                                           |

+ |    var2                                                                   |

+ |             16 bit short signed integer (Word16) whose value falls in the |

+ |             range : 0xffff 8000 <= var1 <= 0x0000 7fff.                   |

+ |                                                                           |

+ |   Outputs :                                                               |

+ |                                                                           |

+ |    none                                                                   |

+ |                                                                           |

+ |   Return Value :                                                          |

+ |                                                                           |

+ |    var_out                                                                |

+ |             16 bit short signed integer (Word16) whose value falls in the |

+ |             range : 0xffff 8000 <= var_out <= 0x0000 7fff.                |

+ |___________________________________________________________________________|

+*/

+

+#if (!SHR_IS_INLINE)

+Word16 shr (Word16 var1, Word16 var2)

+{

+    Word16 var_out;

+

+    if (var2 < 0)

+    {

+        if (var2 < -16)

+            var2 = -16;

+        var_out = shl (var1, (Word16)-var2);

+    }

+    else

+    {

+        if (var2 >= 15)

+        {

+            var_out = (Word16)((var1 < 0) ? -1 : 0);

+        }

+        else

+        {

+            if (var1 < 0)

+            {

+                var_out = (Word16)(~((~var1) >> var2));

+            }

+            else

+            {

+                var_out = (Word16)(var1 >> var2);

+            }

+        }

+    }

+

+    return (var_out);

+}

+#endif

+

+

+/*___________________________________________________________________________

+ |                                                                           |

+ |   Function Name : mult                                                    |

+ |                                                                           |

+ |   Purpose :                                                               |

+ |                                                                           |

+ |    Performs the multiplication of var1 by var2 and gives a 16 bit result  |

+ |    which is scaled i.e.:                                                  |

+ |             mult(var1,var2) = extract_l(L_shr((var1 times var2),15)) and  |

+ |             mult(-32768,-32768) = 32767.                                  |

+ |                                                                           |

+ |   Complexity weight : 1                                                   |

+ |                                                                           |

+ |   Inputs :                                                                |

+ |                                                                           |

+ |    var1                                                                   |

+ |             16 bit short signed integer (Word16) whose value falls in the |

+ |             range : 0xffff 8000 <= var1 <= 0x0000 7fff.                   |

+ |                                                                           |

+ |    var2                                                                   |

+ |             16 bit short signed integer (Word16) whose value falls in the |

+ |             range : 0xffff 8000 <= var1 <= 0x0000 7fff.                   |

+ |                                                                           |

+ |   Outputs :                                                               |

+ |                                                                           |

+ |    none                                                                   |

+ |                                                                           |

+ |   Return Value :                                                          |

+ |                                                                           |

+ |    var_out                                                                |

+ |             16 bit short signed integer (Word16) whose value falls in the |

+ |             range : 0xffff 8000 <= var_out <= 0x0000 7fff.                |

+ |___________________________________________________________________________|

+*/

+#if (!MULT_IS_INLINE)

+Word16 mult (Word16 var1, Word16 var2)

+{

+    Word16 var_out;

+    Word32 L_product;

+

+    L_product = (Word32) var1 *(Word32) var2;

+

+    L_product = (L_product & (Word32) 0xffff8000L) >> 15;

+

+    if (L_product & (Word32) 0x00010000L)

+        L_product = L_product | (Word32) 0xffff0000L;

+

+    var_out = saturate(L_product);

+

+    return (var_out);

+}

+#endif

+

+/*___________________________________________________________________________

+ |                                                                           |

+ |   Function Name : L_mult                                                  |

+ |                                                                           |

+ |   Purpose :                                                               |

+ |                                                                           |

+ |   L_mult is the 32 bit result of the multiplication of var1 times var2    |

+ |   with one shift left i.e.:                                               |

+ |        L_mult(var1,var2) = L_shl((var1 times var2),1) and                 |

+ |        L_mult(-32768,-32768) = 2147483647.                                |

+ |                                                                           |

+ |   Complexity weight : 1                                                   |

+ |                                                                           |

+ |   Inputs :                                                                |

+ |                                                                           |

+ |    var1                                                                   |

+ |             16 bit short signed integer (Word16) whose value falls in the |

+ |             range : 0xffff 8000 <= var1 <= 0x0000 7fff.                   |

+ |                                                                           |

+ |    var2                                                                   |

+ |             16 bit short signed integer (Word16) whose value falls in the |

+ |             range : 0xffff 8000 <= var1 <= 0x0000 7fff.                   |

+ |                                                                           |

+ |   Outputs :                                                               |

+ |                                                                           |

+ |    none                                                                   |

+ |                                                                           |

+ |   Return Value :                                                          |

+ |                                                                           |

+ |    L_var_out                                                              |

+ |             32 bit long signed integer (Word32) whose value falls in the  |

+ |             range : 0x8000 0000 <= L_var_out <= 0x7fff ffff.              |

+ |___________________________________________________________________________|

+*/

+

+#if (!L_MULT_IS_INLINE)

+Word32 L_mult(Word16 var1, Word16 var2)

+{

+    Word32 L_var_out;

+

+    L_var_out = (Word32) var1 *(Word32) var2;

+

+    if (L_var_out != (Word32) 0x40000000L)

+    {

+        L_var_out <<= 1;

+    }

+    else

+    {

+        L_var_out = MAX_32;

+    }

+        

+    return (L_var_out);

+}

+#endif

+// end

+

+/*___________________________________________________________________________

+ |                                                                           |

+ |   Function Name : negate                                                  |

+ |                                                                           |

+ |   Purpose :                                                               |

+ |                                                                           |

+ |   Negate var1 with saturation, saturate in the case where input is -32768:|

+ |                negate(var1) = sub(0,var1).                                |

+ |                                                                           |

+ |   Complexity weight : 1                                                   |

+ |                                                                           |

+ |   Inputs :                                                                |

+ |                                                                           |

+ |    var1                                                                   |

+ |             16 bit short signed integer (Word16) whose value falls in the |

+ |             range : 0xffff 8000 <= var1 <= 0x0000 7fff.                   |

+ |                                                                           |

+ |   Outputs :                                                               |

+ |                                                                           |

+ |    none                                                                   |

+ |                                                                           |

+ |   Return Value :                                                          |

+ |                                                                           |

+ |    var_out                                                                |

+ |             16 bit short signed integer (Word16) whose value falls in the |

+ |             range : 0xffff 8000 <= var_out <= 0x0000 7fff.                |

+ |___________________________________________________________________________|

+*/

+//Word16 negate (Word16 var1)

+//{

+//    Word16 var_out;

+//

+//    var_out = (Word16)((var1 == MIN_16) ? MAX_16 : -var1);

+//

+//    return (var_out);

+//}

+

+

+/*___________________________________________________________________________

+ |                                                                           |

+ |   Function Name : extract_h                                               |

+ |                                                                           |

+ |   Purpose :                                                               |

+ |                                                                           |

+ |   Return the 16 MSB of L_var1.                                            |

+ |                                                                           |

+ |   Complexity weight : 1                                                   |

+ |                                                                           |

+ |   Inputs :                                                                |

+ |                                                                           |

+ |    L_var1                                                                 |

+ |             32 bit long signed integer (Word32 ) whose value falls in the |

+ |             range : 0x8000 0000 <= L_var1 <= 0x7fff ffff.                 |

+ |                                                                           |

+ |   Outputs :                                                               |

+ |                                                                           |

+ |    none                                                                   |

+ |                                                                           |

+ |   Return Value :                                                          |

+ |                                                                           |

+ |    var_out                                                                |

+ |             16 bit short signed integer (Word16) whose value falls in the |

+ |             range : 0xffff 8000 <= var_out <= 0x0000 7fff.                |

+ |___________________________________________________________________________|

+*/

+#if (!EXTRACT_H_IS_INLINE)

+Word16 extract_h (Word32 L_var1)

+{

+    Word16 var_out;

+

+    var_out = (Word16) (L_var1 >> 16);

+

+    return (var_out);

+}

+#endif

+

+/*___________________________________________________________________________

+ |                                                                           |

+ |   Function Name : extract_l                                               |

+ |                                                                           |

+ |   Purpose :                                                               |

+ |                                                                           |

+ |   Return the 16 LSB of L_var1.                                            |

+ |                                                                           |

+ |   Complexity weight : 1                                                   |

+ |                                                                           |

+ |   Inputs :                                                                |

+ |                                                                           |

+ |    L_var1                                                                 |

+ |             32 bit long signed integer (Word32 ) whose value falls in the |

+ |             range : 0x8000 0000 <= L_var1 <= 0x7fff ffff.                 |

+ |                                                                           |

+ |   Outputs :                                                               |

+ |                                                                           |

+ |    none                                                                   |

+ |                                                                           |

+ |   Return Value :                                                          |

+ |                                                                           |

+ |    var_out                                                                |

+ |             16 bit short signed integer (Word16) whose value falls in the |

+ |             range : 0xffff 8000 <= var_out <= 0x0000 7fff.                |

+ |___________________________________________________________________________|

+*/

+#if (!EXTRACT_L_IS_INLINE)

+Word16 extract_l(Word32 L_var1)

+{

+    Word16 var_out;

+

+    var_out = (Word16) L_var1;

+

+    return (var_out);

+}

+#endif

+

+/*___________________________________________________________________________

+ |                                                                           |

+ |   Function Name : round                                                   |

+ |                                                                           |

+ |   Purpose :                                                               |

+ |                                                                           |

+ |   Round the lower 16 bits of the 32 bit input number into the MS 16 bits  |

+ |   with saturation. Shift the resulting bits right by 16 and return the 16 |

+ |   bit number:                                                             |

+ |               round(L_var1) = extract_h(L_add(L_var1,32768))              |

+ |                                                                           |

+ |   Complexity weight : 1                                                   |

+ |                                                                           |

+ |   Inputs :                                                                |

+ |                                                                           |

+ |    L_var1                                                                 |

+ |             32 bit long signed integer (Word32 ) whose value falls in the |

+ |             range : 0x8000 0000 <= L_var1 <= 0x7fff ffff.                 |

+ |                                                                           |

+ |   Outputs :                                                               |

+ |                                                                           |

+ |    none                                                                   |

+ |                                                                           |

+ |   Return Value :                                                          |

+ |                                                                           |

+ |    var_out                                                                |

+ |             16 bit short signed integer (Word16) whose value falls in the |

+ |             range : 0xffff 8000 <= var_out <= 0x0000 7fff.                |

+ |___________________________________________________________________________|

+*/

+

+#if (!ROUND_IS_INLINE)

+Word16 round16(Word32 L_var1)

+{

+    Word16 var_out;

+    Word32 L_rounded;

+

+    L_rounded = L_add (L_var1, (Word32) 0x00008000L);

+    var_out = extract_h (L_rounded);

+

+    return (var_out);

+}

+#endif

+// end

+

+/*___________________________________________________________________________

+ |                                                                           |

+ |   Function Name : L_mac                                                   |

+ |                                                                           |

+ |   Purpose :                                                               |

+ |                                                                           |

+ |   Multiply var1 by var2 and shift the result left by 1. Add the 32 bit    |

+ |   result to L_var3 with saturation, return a 32 bit result:               |

+ |        L_mac(L_var3,var1,var2) = L_add(L_var3,L_mult(var1,var2)).         |

+ |                                                                           |

+ |   Complexity weight : 1                                                   |

+ |                                                                           |

+ |   Inputs :                                                                |

+ |                                                                           |

+ |    L_var3   32 bit long signed integer (Word32) whose value falls in the  |

+ |             range : 0x8000 0000 <= L_var3 <= 0x7fff ffff.                 |

+ |                                                                           |

+ |    var1                                                                   |

+ |             16 bit short signed integer (Word16) whose value falls in the |

+ |             range : 0xffff 8000 <= var1 <= 0x0000 7fff.                   |

+ |                                                                           |

+ |    var2                                                                   |

+ |             16 bit short signed integer (Word16) whose value falls in the |

+ |             range : 0xffff 8000 <= var1 <= 0x0000 7fff.                   |

+ |                                                                           |

+ |   Outputs :                                                               |

+ |                                                                           |

+ |    none                                                                   |

+ |                                                                           |

+ |   Return Value :                                                          |

+ |                                                                           |

+ |    L_var_out                                                              |

+ |             32 bit long signed integer (Word32) whose value falls in the  |

+ |             range : 0x8000 0000 <= L_var_out <= 0x7fff ffff.              |

+ |___________________________________________________________________________|

+*/

+#if (!L_MSU_IS_INLINE)

+Word32 L_mac (Word32 L_var3, Word16 var1, Word16 var2)

+{

+    Word32 L_var_out;

+    Word32 L_product;

+

+    L_product = L_mult(var1, var2);

+    L_var_out = L_add (L_var3, L_product);

+

+    return (L_var_out);

+}

+#endif

+

+/*___________________________________________________________________________

+ |                                                                           |

+ |   Function Name : L_msu                                                   |

+ |                                                                           |

+ |   Purpose :                                                               |

+ |                                                                           |

+ |   Multiply var1 by var2 and shift the result left by 1. Subtract the 32   |

+ |   bit result to L_var3 with saturation, return a 32 bit result:           |

+ |        L_msu(L_var3,var1,var2) = L_sub(L_var3,L_mult(var1,var2)).         |

+ |                                                                           |

+ |   Complexity weight : 1                                                   |

+ |                                                                           |

+ |   Inputs :                                                                |

+ |                                                                           |

+ |    L_var3   32 bit long signed integer (Word32) whose value falls in the  |

+ |             range : 0x8000 0000 <= L_var3 <= 0x7fff ffff.                 |

+ |                                                                           |

+ |    var1                                                                   |

+ |             16 bit short signed integer (Word16) whose value falls in the |

+ |             range : 0xffff 8000 <= var1 <= 0x0000 7fff.                   |

+ |                                                                           |

+ |    var2                                                                   |

+ |             16 bit short signed integer (Word16) whose value falls in the |

+ |             range : 0xffff 8000 <= var1 <= 0x0000 7fff.                   |

+ |                                                                           |

+ |   Outputs :                                                               |

+ |                                                                           |

+ |    none                                                                   |

+ |                                                                           |

+ |   Return Value :                                                          |

+ |                                                                           |

+ |    L_var_out                                                              |

+ |             32 bit long signed integer (Word32) whose value falls in the  |

+ |             range : 0x8000 0000 <= L_var_out <= 0x7fff ffff.              |

+ |___________________________________________________________________________|

+*/

+

+#if (!L_MSU_IS_INLINE)

+Word32 L_msu (Word32 L_var3, Word16 var1, Word16 var2)

+{

+    Word32 L_var_out;

+    Word32 L_product;

+

+    L_product = L_mult(var1, var2);

+    L_var_out = L_sub (L_var3, L_product);

+

+    return (L_var_out);

+}

+#endif

+

+

+/*___________________________________________________________________________

+ |                                                                           |

+ |   Function Name : L_add                                                   |

+ |                                                                           |

+ |   Purpose :                                                               |

+ |                                                                           |

+ |   32 bits addition of the two 32 bits variables (L_var1+L_var2) with      |

+ |   overflow control and saturation; the result is set at +2147483647 when  |

+ |   overflow occurs or at -2147483648 when underflow occurs.                |

+ |                                                                           |

+ |   Complexity weight : 2                                                   |

+ |                                                                           |

+ |   Inputs :                                                                |

+ |                                                                           |

+ |    L_var1   32 bit long signed integer (Word32) whose value falls in the  |

+ |             range : 0x8000 0000 <= L_var3 <= 0x7fff ffff.                 |

+ |                                                                           |

+ |    L_var2   32 bit long signed integer (Word32) whose value falls in the  |

+ |             range : 0x8000 0000 <= L_var3 <= 0x7fff ffff.                 |

+ |                                                                           |

+ |   Outputs :                                                               |

+ |                                                                           |

+ |    none                                                                   |

+ |                                                                           |

+ |   Return Value :                                                          |

+ |                                                                           |

+ |    L_var_out                                                              |

+ |             32 bit long signed integer (Word32) whose value falls in the  |

+ |             range : 0x8000 0000 <= L_var_out <= 0x7fff ffff.              |

+ |___________________________________________________________________________|

+*/

+#if (!L_ADD_IS_INLINE)

+Word32 L_add (Word32 L_var1, Word32 L_var2)

+{

+    Word32 L_var_out;

+

+    L_var_out = L_var1 + L_var2;

+

+    if (((L_var1 ^ L_var2) & MIN_32) == 0)

+    {

+        if ((L_var_out ^ L_var1) & MIN_32)

+        {

+            L_var_out = (L_var1 < 0) ? MIN_32 : MAX_32;

+            //Overflow = 1;

+        }

+    }

+

+    return (L_var_out);

+}

+#endif

+

+/*___________________________________________________________________________

+ |                                                                           |

+ |   Function Name : L_sub                                                   |

+ |                                                                           |

+ |   Purpose :                                                               |

+ |                                                                           |

+ |   32 bits subtraction of the two 32 bits variables (L_var1-L_var2) with   |

+ |   overflow control and saturation; the result is set at +2147483647 when  |

+ |   overflow occurs or at -2147483648 when underflow occurs.                |

+ |                                                                           |

+ |   Complexity weight : 2                                                   |

+ |                                                                           |

+ |   Inputs :                                                                |

+ |                                                                           |

+ |    L_var1   32 bit long signed integer (Word32) whose value falls in the  |

+ |             range : 0x8000 0000 <= L_var3 <= 0x7fff ffff.                 |

+ |                                                                           |

+ |    L_var2   32 bit long signed integer (Word32) whose value falls in the  |

+ |             range : 0x8000 0000 <= L_var3 <= 0x7fff ffff.                 |

+ |                                                                           |

+ |   Outputs :                                                               |

+ |                                                                           |

+ |    none                                                                   |

+ |                                                                           |

+ |   Return Value :                                                          |

+ |                                                                           |

+ |    L_var_out                                                              |

+ |             32 bit long signed integer (Word32) whose value falls in the  |

+ |             range : 0x8000 0000 <= L_var_out <= 0x7fff ffff.              |

+ |___________________________________________________________________________|

+*/

+#if (!L_SUB_IS_INLINE)

+Word32 L_sub(Word32 L_var1, Word32 L_var2)

+{

+    Word32 L_var_out;

+

+    L_var_out = L_var1 - L_var2;

+

+    if (((L_var1 ^ L_var2) & MIN_32) != 0)

+    {

+        if ((L_var_out ^ L_var1) & MIN_32)

+        {

+            L_var_out = (L_var1 < 0L) ? MIN_32 : MAX_32;

+            //Overflow = 1;

+        }

+    }

+

+    return (L_var_out);

+}

+#endif

+

+

+/*___________________________________________________________________________

+ |                                                                           |

+ |   Function Name : L_negate                                                |

+ |                                                                           |

+ |   Purpose :                                                               |

+ |                                                                           |

+ |   Negate the 32 bit variable L_var1 with saturation; saturate in the case |

+ |   where input is -2147483648 (0x8000 0000).                               |

+ |                                                                           |

+ |   Complexity weight : 2                                                   |

+ |                                                                           |

+ |   Inputs :                                                                |

+ |                                                                           |

+ |    L_var1   32 bit long signed integer (Word32) whose value falls in the  |

+ |             range : 0x8000 0000 <= L_var3 <= 0x7fff ffff.                 |

+ |                                                                           |

+ |   Outputs :                                                               |

+ |                                                                           |

+ |    none                                                                   |

+ |                                                                           |

+ |   Return Value :                                                          |

+ |                                                                           |

+ |    L_var_out                                                              |

+ |             32 bit long signed integer (Word32) whose value falls in the  |

+ |             range : 0x8000 0000 <= L_var_out <= 0x7fff ffff.              |

+ |___________________________________________________________________________|

+*/

+//Word32 L_negate (Word32 L_var1)

+//{

+//    Word32 L_var_out;

+//

+//    L_var_out = (L_var1 == MIN_32) ? MAX_32 : -L_var1;

+//

+//    return (L_var_out);

+//}

+

+

+/*___________________________________________________________________________

+ |                                                                           |

+ |   Function Name : mult_r                                                  |

+ |                                                                           |

+ |   Purpose :                                                               |

+ |                                                                           |

+ |   Same as mult with rounding, i.e.:                                       |

+ |     mult_r(var1,var2) = extract_l(L_shr(((var1 * var2) + 16384),15)) and  |

+ |     mult_r(-32768,-32768) = 32767.                                        |

+ |                                                                           |

+ |   Complexity weight : 2                                                   |

+ |                                                                           |

+ |   Inputs :                                                                |

+ |                                                                           |

+ |    var1                                                                   |

+ |             16 bit short signed integer (Word16) whose value falls in the |

+ |             range : 0xffff 8000 <= var1 <= 0x0000 7fff.                   |

+ |                                                                           |

+ |    var2                                                                   |

+ |             16 bit short signed integer (Word16) whose value falls in the |

+ |             range : 0xffff 8000 <= var1 <= 0x0000 7fff.                   |

+ |                                                                           |

+ |   Outputs :                                                               |

+ |                                                                           |

+ |    none                                                                   |

+ |                                                                           |

+ |   Return Value :                                                          |

+ |                                                                           |

+ |    var_out                                                                |

+ |             16 bit short signed integer (Word16) whose value falls in the |

+ |             range : 0xffff 8000 <= var_out <= 0x0000 7fff.                |

+ |___________________________________________________________________________|

+*/

+#if (!MULT_R_IS_INLINE)

+Word16 mult_r (Word16 var1, Word16 var2)

+{

+    Word16 var_out;

+    Word32 L_product_arr;

+

+    L_product_arr = (Word32) var1 *(Word32) var2;       /* product */

+    L_product_arr += (Word32) 0x00004000L;      /* round */

+    L_product_arr &= (Word32) 0xffff8000L;

+    L_product_arr >>= 15;       /* shift */

+

+    if (L_product_arr & (Word32) 0x00010000L)   /* sign extend when necessary */

+    {

+        L_product_arr |= (Word32) 0xffff0000L;

+    }

+    var_out = saturate(L_product_arr);

+

+    return (var_out);

+}

+#endif

+

+/*___________________________________________________________________________

+ |                                                                           |

+ |   Function Name : L_shl                                                   |

+ |                                                                           |

+ |   Purpose :                                                               |

+ |                                                                           |

+ |   Arithmetically shift the 32 bit input L_var1 left var2 positions. Zero  |

+ |   fill the var2 LSB of the result. If var2 is negative, arithmetically    |

+ |   shift L_var1 right by -var2 with sign extension. Saturate the result in |

+ |   case of underflows or overflows.                                        |

+ |                                                                           |

+ |   Complexity weight : 2                                                   |

+ |                                                                           |

+ |   Inputs :                                                                |

+ |                                                                           |

+ |    L_var1   32 bit long signed integer (Word32) whose value falls in the  |

+ |             range : 0x8000 0000 <= L_var3 <= 0x7fff ffff.                 |

+ |                                                                           |

+ |    var2                                                                   |

+ |             16 bit short signed integer (Word16) whose value falls in the |

+ |             range : 0xffff 8000 <= var1 <= 0x0000 7fff.                   |

+ |                                                                           |

+ |   Outputs :                                                               |

+ |                                                                           |

+ |    none                                                                   |

+ |                                                                           |

+ |   Return Value :                                                          |

+ |                                                                           |

+ |    L_var_out                                                              |

+ |             32 bit long signed integer (Word32) whose value falls in the  |

+ |             range : 0x8000 0000 <= L_var_out <= 0x7fff ffff.              |

+ |___________________________________________________________________________|

+*/

+

+#if (!L_SHL_IS_INLINE)

+Word32 L_shl (Word32 L_var1, Word16 var2)

+{

+    Word32 L_var_out = 0L;

+

+    if (var2 <= 0)

+    {

+        L_var1 = L_shr(L_var1, (Word16)-var2);

+    }

+    else

+    {

+        for (; var2 > 0; var2--)

+        {

+            if (L_var1 > (Word32) 0X3fffffffL)

+            {

+                return MAX_32;

+            }

+            else

+            {

+                if (L_var1 < (Word32) 0xc0000000L)

+                {

+                    return MIN_32;

+                }

+            }

+            L_var1 <<= 1;

+        }

+    }

+    return (L_var1);

+}

+#endif

+

+/*___________________________________________________________________________

+ |                                                                           |

+ |   Function Name : L_shr                                                   |

+ |                                                                           |

+ |   Purpose :                                                               |

+ |                                                                           |

+ |   Arithmetically shift the 32 bit input L_var1 right var2 positions with  |

+ |   sign extension. If var2 is negative, arithmetically shift L_var1 left   |

+ |   by -var2 and zero fill the -var2 LSB of the result. Saturate the result |

+ |   in case of underflows or overflows.                                     |

+ |                                                                           |

+ |   Complexity weight : 2                                                   |

+ |                                                                           |

+ |   Inputs :                                                                |

+ |                                                                           |

+ |    L_var1   32 bit long signed integer (Word32) whose value falls in the  |

+ |             range : 0x8000 0000 <= L_var3 <= 0x7fff ffff.                 |

+ |                                                                           |

+ |    var2                                                                   |

+ |             16 bit short signed integer (Word16) whose value falls in the |

+ |             range : 0xffff 8000 <= var1 <= 0x0000 7fff.                   |

+ |                                                                           |

+ |   Outputs :                                                               |

+ |                                                                           |

+ |    none                                                                   |

+ |                                                                           |

+ |   Return Value :                                                          |

+ |                                                                           |

+ |    L_var_out                                                              |

+ |             32 bit long signed integer (Word32) whose value falls in the  |

+ |             range : 0x8000 0000 <= L_var_out <= 0x7fff ffff.              |

+ |___________________________________________________________________________|

+*/

+

+#if (!L_SHR_IS_INLINE)

+Word32 L_shr (Word32 L_var1, Word16 var2)

+{

+    Word32 L_var_out;

+

+    if (var2 < 0)

+    {

+        L_var_out = L_shl (L_var1, (Word16)-var2);

+    }

+    else

+    {

+        if (var2 >= 31)

+        {

+            L_var_out = (L_var1 < 0L) ? -1 : 0;

+        }

+        else

+        {

+            if (L_var1 < 0)

+            {

+                L_var_out = ~((~L_var1) >> var2);

+            }

+            else

+            {

+                L_var_out = L_var1 >> var2;

+            }

+        }

+    }

+    return (L_var_out);

+}

+#endif

+

+/*___________________________________________________________________________

+ |                                                                           |

+ |   Function Name : shr_r                                                   |

+ |                                                                           |

+ |   Purpose :                                                               |

+ |                                                                           |

+ |   Same as shr(var1,var2) but with rounding. Saturate the result in case of|

+ |   underflows or overflows :                                               |

+ |    - If var2 is greater than zero :                                       |

+ |          if (sub(shl(shr(var1,var2),1),shr(var1,sub(var2,1))))            |

+ |          is equal to zero                                                 |

+ |                     then                                                  |

+ |                     shr_r(var1,var2) = shr(var1,var2)                     |

+ |                     else                                                  |

+ |                     shr_r(var1,var2) = add(shr(var1,var2),1)              |

+ |    - If var2 is less than or equal to zero :                              |

+ |                     shr_r(var1,var2) = shr(var1,var2).                    |

+ |                                                                           |

+ |   Complexity weight : 2                                                   |

+ |                                                                           |

+ |   Inputs :                                                                |

+ |                                                                           |

+ |    var1                                                                   |

+ |             16 bit short signed integer (Word16) whose value falls in the |

+ |             range : 0xffff 8000 <= var1 <= 0x0000 7fff.                   |

+ |                                                                           |

+ |    var2                                                                   |

+ |             16 bit short signed integer (Word16) whose value falls in the |

+ |             range : 0xffff 8000 <= var1 <= 0x0000 7fff.                   |

+ |                                                                           |

+ |   Outputs :                                                               |

+ |                                                                           |

+ |    none                                                                   |

+ |                                                                           |

+ |   Return Value :                                                          |

+ |                                                                           |

+ |    var_out                                                                |

+ |             16 bit short signed integer (Word16) whose value falls in the |

+ |             range : 0xffff 8000 <= var_out <= 0x0000 7fff.                |

+ |___________________________________________________________________________|

+*/

+#if (!SHR_R_IS_INLINE)

+Word16 shr_r (Word16 var1, Word16 var2)

+{

+    Word16 var_out;

+

+    if (var2 > 15)

+    {

+        var_out = 0;

+    }

+    else

+    {

+        var_out = shr (var1, var2);

+

+        if (var2 > 0)

+        {

+            if ((var1 & ((Word16) 1 << (var2 - 1))) != 0)

+            {

+                var_out++;

+            }

+        }

+    }

+

+    return (var_out);

+}

+#endif

+

+/*___________________________________________________________________________

+ |                                                                           |

+ |   Function Name : mac_r                                                   |

+ |                                                                           |

+ |   Purpose :                                                               |

+ |                                                                           |

+ |   Multiply var1 by var2 and shift the result left by 1. Add the 32 bit    |

+ |   result to L_var3 with saturation. Round the LS 16 bits of the result    |

+ |   into the MS 16 bits with saturation and shift the result right by 16.   |

+ |   Return a 16 bit result.                                                 |

+ |            mac_r(L_var3,var1,var2) = round(L_mac(L_var3,var1,var2))       |

+ |                                                                           |

+ |   Complexity weight : 2                                                   |

+ |                                                                           |

+ |   Inputs :                                                                |

+ |                                                                           |

+ |    L_var3   32 bit long signed integer (Word32) whose value falls in the  |

+ |             range : 0x8000 0000 <= L_var3 <= 0x7fff ffff.                 |

+ |                                                                           |

+ |    var1                                                                   |

+ |             16 bit short signed integer (Word16) whose value falls in the |

+ |             range : 0xffff 8000 <= var1 <= 0x0000 7fff.                   |

+ |                                                                           |

+ |    var2                                                                   |

+ |             16 bit short signed integer (Word16) whose value falls in the |

+ |             range : 0xffff 8000 <= var1 <= 0x0000 7fff.                   |

+ |                                                                           |

+ |   Outputs :                                                               |

+ |                                                                           |

+ |    none                                                                   |

+ |                                                                           |

+ |   Return Value :                                                          |

+ |                                                                           |

+ |    var_out                                                                |

+ |             16 bit short signed integer (Word16) whose value falls in the |

+ |             range : 0x0000 8000 <= L_var_out <= 0x0000 7fff.              |

+ |___________________________________________________________________________|

+*/

+#if (!MAC_R_IS_INLINE)

+Word16 mac_r (Word32 L_var3, Word16 var1, Word16 var2)

+{

+    Word16 var_out;

+

+    L_var3 = L_mac (L_var3, var1, var2);

+    L_var3 = L_add (L_var3, (Word32) 0x00008000L);

+    var_out = extract_h (L_var3);

+

+    return (var_out);

+}

+#endif

+

+/*___________________________________________________________________________

+ |                                                                           |

+ |   Function Name : msu_r                                                   |

+ |                                                                           |

+ |   Purpose :                                                               |

+ |                                                                           |

+ |   Multiply var1 by var2 and shift the result left by 1. Subtract the 32   |

+ |   bit result to L_var3 with saturation. Round the LS 16 bits of the res-  |

+ |   ult into the MS 16 bits with saturation and shift the result right by   |

+ |   16. Return a 16 bit result.                                             |

+ |            msu_r(L_var3,var1,var2) = round(L_msu(L_var3,var1,var2))       |

+ |                                                                           |

+ |   Complexity weight : 2                                                   |

+ |                                                                           |

+ |   Inputs :                                                                |

+ |                                                                           |

+ |    L_var3   32 bit long signed integer (Word32) whose value falls in the  |

+ |             range : 0x8000 0000 <= L_var3 <= 0x7fff ffff.                 |

+ |                                                                           |

+ |    var1                                                                   |

+ |             16 bit short signed integer (Word16) whose value falls in the |

+ |             range : 0xffff 8000 <= var1 <= 0x0000 7fff.                   |

+ |                                                                           |

+ |    var2                                                                   |

+ |             16 bit short signed integer (Word16) whose value falls in the |

+ |             range : 0xffff 8000 <= var1 <= 0x0000 7fff.                   |

+ |                                                                           |

+ |   Outputs :                                                               |

+ |                                                                           |

+ |    none                                                                   |

+ |                                                                           |

+ |   Return Value :                                                          |

+ |                                                                           |

+ |    var_out                                                                |

+ |             16 bit short signed integer (Word16) whose value falls in the |

+ |             range : 0x0000 8000 <= L_var_out <= 0x0000 7fff.              |

+ |___________________________________________________________________________|

+*/

+#if (!MSU_R_IS_INLINE)

+Word16 msu_r (Word32 L_var3, Word16 var1, Word16 var2)

+{

+    Word16 var_out;

+

+    L_var3 = L_msu (L_var3, var1, var2);

+    L_var3 = L_add (L_var3, (Word32) 0x00008000L);

+    var_out = extract_h (L_var3);

+

+    return (var_out);

+}

+#endif

+

+/*___________________________________________________________________________

+ |                                                                           |

+ |   Function Name : L_deposit_h                                             |

+ |                                                                           |

+ |   Purpose :                                                               |

+ |                                                                           |

+ |   Deposit the 16 bit var1 into the 16 MS bits of the 32 bit output. The   |

+ |   16 LS bits of the output are zeroed.                                    |

+ |                                                                           |

+ |   Complexity weight : 2                                                   |

+ |                                                                           |

+ |   Inputs :                                                                |

+ |                                                                           |

+ |    var1                                                                   |

+ |             16 bit short signed integer (Word16) whose value falls in the |

+ |             range : 0xffff 8000 <= var1 <= 0x0000 7fff.                   |

+ |                                                                           |

+ |   Outputs :                                                               |

+ |                                                                           |

+ |    none                                                                   |

+ |                                                                           |

+ |   Return Value :                                                          |

+ |                                                                           |

+ |    L_var_out                                                              |

+ |             32 bit long signed integer (Word32) whose value falls in the  |

+ |             range : 0x8000 0000 <= var_out <= 0x7fff 0000.                |

+ |___________________________________________________________________________|

+*/

+//Word32 L_deposit_h (Word16 var1)

+//{

+//    Word32 L_var_out;

+//

+//    L_var_out = (Word32) var1 << 16;

+//

+//    return (L_var_out);

+//}

+

+

+/*___________________________________________________________________________

+ |                                                                           |

+ |   Function Name : L_deposit_l                                             |

+ |                                                                           |

+ |   Purpose :                                                               |

+ |                                                                           |

+ |   Deposit the 16 bit var1 into the 16 LS bits of the 32 bit output. The   |

+ |   16 MS bits of the output are sign extended.                             |

+ |                                                                           |

+ |   Complexity weight : 2                                                   |

+ |                                                                           |

+ |   Inputs :                                                                |

+ |                                                                           |

+ |    var1                                                                   |

+ |             16 bit short signed integer (Word16) whose value falls in the |

+ |             range : 0xffff 8000 <= var1 <= 0x0000 7fff.                   |

+ |                                                                           |

+ |   Outputs :                                                               |

+ |                                                                           |

+ |    none                                                                   |

+ |                                                                           |

+ |   Return Value :                                                          |

+ |                                                                           |

+ |    L_var_out                                                              |

+ |             32 bit long signed integer (Word32) whose value falls in the  |

+ |             range : 0xFFFF 8000 <= var_out <= 0x0000 7fff.                |

+ |___________________________________________________________________________|

+*/

+//Word32 L_deposit_l (Word16 var1)

+//{

+//    Word32 L_var_out;

+//

+//    L_var_out = (Word32) var1;

+//

+//    return (L_var_out);

+//}

+

+

+/*___________________________________________________________________________

+ |                                                                           |

+ |   Function Name : L_shr_r                                                 |

+ |                                                                           |

+ |   Purpose :                                                               |

+ |                                                                           |

+ |   Same as L_shr(L_var1,var2) but with rounding. Saturate the result in    |

+ |   case of underflows or overflows :                                       |

+ |    - If var2 is greater than zero :                                       |

+ |          if (L_sub(L_shl(L_shr(L_var1,var2),1),L_shr(L_var1,sub(var2,1))))|

+ |          is equal to zero                                                 |

+ |                     then                                                  |

+ |                     L_shr_r(L_var1,var2) = L_shr(L_var1,var2)             |

+ |                     else                                                  |

+ |                     L_shr_r(L_var1,var2) = L_add(L_shr(L_var1,var2),1)    |

+ |    - If var2 is less than or equal to zero :                              |

+ |                     L_shr_r(L_var1,var2) = L_shr(L_var1,var2).            |

+ |                                                                           |

+ |   Complexity weight : 3                                                   |

+ |                                                                           |

+ |   Inputs :                                                                |

+ |                                                                           |

+ |    L_var1                                                                 |

+ |             32 bit long signed integer (Word32) whose value falls in the  |

+ |             range : 0x8000 0000 <= var1 <= 0x7fff ffff.                   |

+ |                                                                           |

+ |    var2                                                                   |

+ |             16 bit short signed integer (Word16) whose value falls in the |

+ |             range : 0xffff 8000 <= var1 <= 0x0000 7fff.                   |

+ |                                                                           |

+ |   Outputs :                                                               |

+ |                                                                           |

+ |    none                                                                   |

+ |                                                                           |

+ |   Return Value :                                                          |

+ |                                                                           |

+ |    L_var_out                                                              |

+ |             32 bit long signed integer (Word32) whose value falls in the  |

+ |             range : 0x8000 0000 <= var_out <= 0x7fff ffff.                |

+ |___________________________________________________________________________|

+*/

+#if (!L_SHR_R_IS_INLINE)

+Word32 L_shr_r (Word32 L_var1, Word16 var2)

+{

+    Word32 L_var_out;

+

+    if (var2 > 31)

+    {

+        L_var_out = 0;

+    }

+    else

+    {

+        L_var_out = L_shr (L_var1, var2);

+

+        if (var2 > 0)

+        {

+            if ((L_var1 & ((Word32) 1 << (var2 - 1))) != 0)

+            {

+                L_var_out++;

+            }

+        }

+    }

+

+    return (L_var_out);

+}

+#endif

+

+/*___________________________________________________________________________

+ |                                                                           |

+ |   Function Name : L_abs                                                   |

+ |                                                                           |

+ |   Purpose :                                                               |

+ |                                                                           |

+ |    Absolute value of L_var1; Saturate in case where the input is          |

+ |                                                               -214783648  |

+ |                                                                           |

+ |   Complexity weight : 3                                                   |

+ |                                                                           |

+ |   Inputs :                                                                |

+ |                                                                           |

+ |    L_var1                                                                 |

+ |             32 bit long signed integer (Word32) whose value falls in the  |

+ |             range : 0x8000 0000 <= var1 <= 0x7fff ffff.                   |

+ |                                                                           |

+ |   Outputs :                                                               |

+ |                                                                           |

+ |    none                                                                   |

+ |                                                                           |

+ |   Return Value :                                                          |

+ |                                                                           |

+ |    L_var_out                                                              |

+ |             32 bit long signed integer (Word32) whose value falls in the  |

+ |             range : 0x0000 0000 <= var_out <= 0x7fff ffff.                |

+ |___________________________________________________________________________|

+*/

+//Word32 L_abs (Word32 L_var1)

+//{

+//    Word32 L_var_out;

+//

+//    if (L_var1 == MIN_32)

+//    {

+//        L_var_out = MAX_32;

+//    }

+//    else

+//    {

+//        if (L_var1 < 0)

+//        {

+//            L_var_out = -L_var1;

+//        }

+//        else

+//        {

+//            L_var_out = L_var1;

+//        }

+//    }

+//

+//    return (L_var_out);

+//}

+

+/*___________________________________________________________________________

+ |                                                                           |

+ |   Function Name : norm_s                                                  |

+ |                                                                           |

+ |   Purpose :                                                               |

+ |                                                                           |

+ |   Produces the number of left shift needed to normalize the 16 bit varia- |

+ |   ble var1 for positive values on the interval with minimum of 16384 and  |

+ |   maximum of 32767, and for negative values on the interval with minimum  |

+ |   of -32768 and maximum of -16384; in order to normalize the result, the  |

+ |   following operation must be done :                                      |

+ |                    norm_var1 = shl(var1,norm_s(var1)).                    |

+ |                                                                           |

+ |   Complexity weight : 15                                                  |

+ |                                                                           |

+ |   Inputs :                                                                |

+ |                                                                           |

+ |    var1                                                                   |

+ |             16 bit short signed integer (Word16) whose value falls in the |

+ |             range : 0xffff 8000 <= var1 <= 0x0000 7fff.                   |

+ |                                                                           |

+ |   Outputs :                                                               |

+ |                                                                           |

+ |    none                                                                   |

+ |                                                                           |

+ |   Return Value :                                                          |

+ |                                                                           |

+ |    var_out                                                                |

+ |             16 bit short signed integer (Word16) whose value falls in the |

+ |             range : 0x0000 0000 <= var_out <= 0x0000 000f.                |

+ |___________________________________________________________________________|

+*/

+

+#if (!NORM_S_IS_INLINE)

+Word16 norm_s (Word16 var1)

+{

+    Word16 var_out;

+

+    if (var1 == 0)

+    {

+        var_out = 0;

+    }

+    else

+    {

+        if (var1 == -1)

+        {

+            var_out = 15;

+        }

+        else

+        {

+            if (var1 < 0)

+            {

+                var1 = (Word16)~var1;

+            }

+            for (var_out = 0; var1 < 0x4000; var_out++)

+            {

+                var1 <<= 1;

+            }

+        }

+    }

+

+    return (var_out);

+}

+#endif

+

+/*___________________________________________________________________________

+ |                                                                           |

+ |   Function Name : div_s                                                   |

+ |                                                                           |

+ |   Purpose :                                                               |

+ |                                                                           |

+ |   Produces a result which is the fractional integer division of var1  by  |

+ |   var2; var1 and var2 must be positive and var2 must be greater or equal  |

+ |   to var1; the result is positive (leading bit equal to 0) and truncated  |

+ |   to 16 bits.                                                             |

+ |   If var1 = var2 then div(var1,var2) = 32767.                             |

+ |                                                                           |

+ |   Complexity weight : 18                                                  |

+ |                                                                           |

+ |   Inputs :                                                                |

+ |                                                                           |

+ |    var1                                                                   |

+ |             16 bit short signed integer (Word16) whose value falls in the |

+ |             range : 0x0000 0000 <= var1 <= var2 and var2 != 0.            |

+ |                                                                           |

+ |    var2                                                                   |

+ |             16 bit short signed integer (Word16) whose value falls in the |

+ |             range : var1 <= var2 <= 0x0000 7fff and var2 != 0.            |

+ |                                                                           |

+ |   Outputs :                                                               |

+ |                                                                           |

+ |    none                                                                   |

+ |                                                                           |

+ |   Return Value :                                                          |

+ |                                                                           |

+ |    var_out                                                                |

+ |             16 bit short signed integer (Word16) whose value falls in the |

+ |             range : 0x0000 0000 <= var_out <= 0x0000 7fff.                |

+ |             It's a Q15 value (point between b15 and b14).                 |

+ |___________________________________________________________________________|

+*/

+

+#if (!DIV_S_IS_INLINE)

+Word16 div_s (Word16 var1, Word16 var2)

+{

+    Word16 var_out = 0;

+    Word16 iteration;

+    Word32 L_num;

+    Word32 L_denom;

+

+    if (var1 == 0)

+    {

+        var_out = 0;

+    }

+    else

+    {

+        if (var1 == var2)

+        {

+            var_out = MAX_16;

+        }

+        else

+        {

+            L_num = L_deposit_l (var1);

+            L_denom = L_deposit_l (var2);

+

+            for (iteration = 0; iteration < 15; iteration++)

+            {

+                var_out <<= 1;

+                L_num <<= 1;

+

+                if (L_num >= L_denom)

+                {

+                    L_num = L_sub(L_num, L_denom);

+                    var_out = add (var_out, 1);

+                }

+            }

+        }

+    }

+

+    return (var_out);

+}

+#endif

+

+/*___________________________________________________________________________

+ |                                                                           |

+ |   Function Name : norm_l                                                  |

+ |                                                                           |

+ |   Purpose :                                                               |

+ |                                                                           |

+ |   Produces the number of left shifts needed to normalize the 32 bit varia-|

+ |   ble L_var1 for positive values on the interval with minimum of          |

+ |   1073741824 and maximum of 2147483647, and for negative values on the in-|

+ |   terval with minimum of -2147483648 and maximum of -1073741824; in order |

+ |   to normalize the result, the following operation must be done :         |

+ |                   norm_L_var1 = L_shl(L_var1,norm_l(L_var1)).             |

+ |                                                                           |

+ |   Complexity weight : 30                                                  |

+ |                                                                           |

+ |   Inputs :                                                                |

+ |                                                                           |

+ |    L_var1                                                                 |

+ |             32 bit long signed integer (Word32) whose value falls in the  |

+ |             range : 0x8000 0000 <= var1 <= 0x7fff ffff.                   |

+ |                                                                           |

+ |   Outputs :                                                               |

+ |                                                                           |

+ |    none                                                                   |

+ |                                                                           |

+ |   Return Value :                                                          |

+ |                                                                           |

+ |    var_out                                                                |

+ |             16 bit short signed integer (Word16) whose value falls in the |

+ |             range : 0x0000 0000 <= var_out <= 0x0000 001f.                |

+ |___________________________________________________________________________|

+*/

+

+#if (!NORM_L_IS_INLINE)

+Word16 norm_l (Word32 L_var1)

+{

+    Word16 var_out;

+

+    if (L_var1 == 0)

+    {

+        var_out = 0;

+    }

+    else

+    {

+        if (L_var1 == (Word32) 0xffffffffL)

+        {

+            var_out = 31;

+        }

+        else

+        {

+            if (L_var1 < 0)

+            {

+                L_var1 = ~L_var1;

+            }

+            for (var_out = 0; L_var1 < (Word32) 0x40000000L; var_out++)

+            {

+                L_var1 <<= 1;

+            }

+        }

+    }

+

+    return (var_out);

+}

+#endif

+
diff --git a/media/libstagefright/codecs/aacenc/basic_op/oper_32b.c b/media/libstagefright/codecs/aacenc/basic_op/oper_32b.c
new file mode 100644
index 0000000..906a9df
--- /dev/null
+++ b/media/libstagefright/codecs/aacenc/basic_op/oper_32b.c
@@ -0,0 +1,361 @@
+/*

+ ** Copyright 2003-2010, VisualOn, Inc.

+ **

+ ** Licensed under the Apache License, Version 2.0 (the "License");

+ ** you may not use this file except in compliance with the License.

+ ** You may obtain a copy of the License at

+ **

+ **     http://www.apache.org/licenses/LICENSE-2.0

+ **

+ ** Unless required by applicable law or agreed to in writing, software

+ ** distributed under the License is distributed on an "AS IS" BASIS,

+ ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

+ ** See the License for the specific language governing permissions and

+ ** limitations under the License.

+ */

+/*******************************************************************************

+	File:		oper_32b.c

+

+	Content:	  This file contains operations in double precision.
+ 

+*******************************************************************************/
+
+#include "typedef.h"
+#include "basic_op.h"
+#include "oper_32b.h"
+
+/*****************************************************************************
+ *                                                                           *
+ *  Function L_Extract()                                                     *
+ *                                                                           *
+ *  Extract from a 32 bit integer two 16 bit DPF.                            *
+ *                                                                           *
+ *  Arguments:                                                               *
+ *                                                                           *
+ *   L_32      : 32 bit integer.                                             *
+ *               0x8000 0000 <= L_32 <= 0x7fff ffff.                         *
+ *   hi        : b16 to b31 of L_32                                          *
+ *   lo        : (L_32 - hi<<16)>>1                                          *
+ *****************************************************************************
+*/
+
+void L_Extract (Word32 L_32, Word16 *hi, Word16 *lo)
+{
+    *hi = extract_h (L_32);
+    *lo = extract_l (L_msu (L_shr (L_32, 1), *hi, 16384));
+    return;
+}
+
+/*****************************************************************************
+ *                                                                           *
+ *  Function L_Comp()                                                        *
+ *                                                                           *
+ *  Compose from two 16 bit DPF a 32 bit integer.                            *
+ *                                                                           *
+ *     L_32 = hi<<16 + lo<<1                                                 *
+ *                                                                           *
+ *  Arguments:                                                               *
+ *                                                                           *
+ *   hi        msb                                                           *
+ *   lo        lsf (with sign)                                               *
+ *                                                                           *
+ *   Return Value :                                                          *
+ *                                                                           *
+ *             32 bit long signed integer (Word32) whose value falls in the  *
+ *             range : 0x8000 0000 <= L_32 <= 0x7fff fff0.                   *
+ *                                                                           *
+ *****************************************************************************
+*/
+
+Word32 L_Comp (Word16 hi, Word16 lo)
+{
+    Word32 L_32;
+
+    L_32 = L_deposit_h (hi);
+    return (L_mac (L_32, lo, 1));       /* = hi<<16 + lo<<1 */
+}
+
+/*****************************************************************************
+ * Function Mpy_32()                                                         *
+ *                                                                           *
+ *   Multiply two 32 bit integers (DPF). The result is divided by 2**31      *
+ *                                                                           *
+ *   L_32 = (hi1*hi2)<<1 + ( (hi1*lo2)>>15 + (lo1*hi2)>>15 )<<1              *
+ *                                                                           *
+ *   This operation can also be viewed as the multiplication of two Q31      *
+ *   number and the result is also in Q31.                                   *
+ *                                                                           *
+ * Arguments:                                                                *
+ *                                                                           *
+ *  hi1         hi part of first number                                      *
+ *  lo1         lo part of first number                                      *
+ *  hi2         hi part of second number                                     *
+ *  lo2         lo part of second number                                     *
+ *                                                                           *
+ *****************************************************************************
+*/
+
+Word32 Mpy_32 (Word16 hi1, Word16 lo1, Word16 hi2, Word16 lo2)
+{
+    Word32 L_32;
+
+    L_32 = L_mult (hi1, hi2);
+    L_32 = L_mac (L_32, mult (hi1, lo2), 1);
+    L_32 = L_mac (L_32, mult (lo1, hi2), 1);
+
+    return (L_32);
+}
+
+/*****************************************************************************
+ * Function Mpy_32_16()                                                      *
+ *                                                                           *
+ *   Multiply a 16 bit integer by a 32 bit (DPF). The result is divided      *
+ *   by 2**15                                                                *
+ *                                                                           *
+ *                                                                           *
+ *   L_32 = (hi1*lo2)<<1 + ((lo1*lo2)>>15)<<1                                *
+ *                                                                           *
+ * Arguments:                                                                *
+ *                                                                           *
+ *  hi          hi part of 32 bit number.                                    *
+ *  lo          lo part of 32 bit number.                                    *
+ *  n           16 bit number.                                               *
+ *                                                                           *
+ *****************************************************************************
+*/
+
+Word32 Mpy_32_16 (Word16 hi, Word16 lo, Word16 n)
+{
+    Word32 L_32;
+
+    L_32 = L_mult (hi, n);
+    L_32 = L_mac (L_32, mult (lo, n), 1);
+
+    return (L_32);
+}
+
+/*****************************************************************************
+ *                                                                           *
+ *   Function Name : Div_32                                                  *
+ *                                                                           *
+ *   Purpose :                                                               *
+ *             Fractional integer division of two 32 bit numbers.            *
+ *             L_num / L_denom.                                              *
+ *             L_num and L_denom must be positive and L_num < L_denom.       *
+ *             L_denom = denom_hi<<16 + denom_lo<<1                          *
+ *             denom_hi is a normalize number.                               *
+ *                                                                           *
+ *   Inputs :                                                                *
+ *                                                                           *
+ *    L_num                                                                  *
+ *             32 bit long signed integer (Word32) whose value falls in the  *
+ *             range : 0x0000 0000 < L_num < L_denom                         *
+ *                                                                           *
+ *    L_denom = denom_hi<<16 + denom_lo<<1      (DPF)                        *
+ *                                                                           *
+ *       denom_hi                                                            *
+ *             16 bit positive normalized integer whose value falls in the   *
+ *             range : 0x4000 < hi < 0x7fff                                  *
+ *       denom_lo                                                            *
+ *             16 bit positive integer whose value falls in the              *
+ *             range : 0 < lo < 0x7fff                                       *
+ *                                                                           *
+ *   Return Value :                                                          *
+ *                                                                           *
+ *    L_div                                                                  *
+ *             32 bit long signed integer (Word32) whose value falls in the  *
+ *             range : 0x0000 0000 <= L_div <= 0x7fff ffff.                  *
+ *                                                                           *
+ *  Algorithm:                                                               *
+ *                                                                           *
+ *  - find = 1/L_denom.                                                      *
+ *      First approximation: approx = 1 / denom_hi                           *
+ *      1/L_denom = approx * (2.0 - L_denom * approx )                       *
+ *                                                                           *
+ *  -  result = L_num * (1/L_denom)                                          *
+ *****************************************************************************
+*/
+
+Word32 Div_32 (Word32 L_num, Word32 denom)
+{
+    Word16 approx;
+    Word32 L_32;
+    /* First approximation: 1 / L_denom = 1/denom_hi */
+
+    approx = div_s ((Word16) 0x3fff, denom >> 16);
+
+    /* 1/L_denom = approx * (2.0 - L_denom * approx) */
+
+    L_32 = L_mpy_ls (denom, approx);
+
+    L_32 = L_sub ((Word32) 0x7fffffffL, L_32);
+
+	L_32 = L_mpy_ls (L_32, approx);
+    /* L_num * (1/L_denom) */
+
+	L_32 = MULHIGH(L_32, L_num);
+    L_32 = L_shl (L_32, 3);
+
+    return (L_32);
+}
+

+/*!

+ 

+  \brief  calculates the log dualis times 4 of argument 

+          iLog4(x) = (Word32)(4 * log(value)/log(2.0))

+

+  \return ilog4 value

+ 

+*/

+Word16 iLog4(Word32 value)

+{

+  Word16 iLog4;

+

+  if(value != 0){

+    Word32 tmp;

+    Word16 tmp16;

+    iLog4 = norm_l(value);

+    tmp = (value << iLog4);

+    tmp16 = round16(tmp);

+    tmp = L_mult(tmp16, tmp16);

+    tmp16 = round16(tmp);

+    tmp = L_mult(tmp16, tmp16);

+    tmp16 = round16(tmp);

+

+    iLog4 = (-(iLog4 << 2) - norm_s(tmp16)) - 1;

+  }

+  else {

+    iLog4 = -128; /* -(INT_BITS*4); */                                          

+  }

+

+  return iLog4;

+}

+

+#define step(shift) \

+    if ((0x40000000l >> shift) + root <= value)       \

+    {                                                 \

+        value -= (0x40000000l >> shift) + root;       \

+        root = (root >> 1) | (0x40000000l >> shift);  \

+    } else {                                          \

+        root = root >> 1;                             \

+    }

+

+Word32 rsqrt(Word32 value,     /*!< Operand to square root (0.0 ... 1) */

+             Word32 accuracy)  /*!< Number of valid bits that will be calculated */

+{

+    Word32 root = 0;

+	Word32 scale;

+

+	if(value < 0)

+		return 0;

+

+	scale = norm_l(value);

+	if(scale & 1) scale--;

+

+	value <<= scale;

+

+	step( 0); step( 2); step( 4); step( 6);

+    step( 8); step(10); step(12); step(14);

+    step(16); step(18); step(20); step(22);

+    step(24); step(26); step(28); step(30);

+

+    scale >>= 1;

+	if (root < value)

+        ++root;

+

+	root >>= scale;

+    return root* 46334;

+}

+

+static const Word32 pow2Table[POW2_TABLE_SIZE] = {

+0x7fffffff, 0x7fa765ad, 0x7f4f08ae, 0x7ef6e8da, 

+0x7e9f0606, 0x7e476009, 0x7deff6b6, 0x7d98c9e6, 

+0x7d41d96e, 0x7ceb2523, 0x7c94acde, 0x7c3e7073, 

+0x7be86fb9, 0x7b92aa88, 0x7b3d20b6, 0x7ae7d21a, 

+0x7a92be8b, 0x7a3de5df, 0x79e947ef, 0x7994e492, 

+0x7940bb9e, 0x78ecccec, 0x78991854, 0x78459dac, 

+0x77f25cce, 0x779f5591, 0x774c87cc, 0x76f9f359, 

+0x76a7980f, 0x765575c8, 0x76038c5b, 0x75b1dba2, 

+0x75606374, 0x750f23ab, 0x74be1c20, 0x746d4cac, 

+0x741cb528, 0x73cc556d, 0x737c2d55, 0x732c3cba, 

+0x72dc8374, 0x728d015d, 0x723db650, 0x71eea226, 

+0x719fc4b9, 0x71511de4, 0x7102ad80, 0x70b47368, 

+0x70666f76, 0x7018a185, 0x6fcb096f, 0x6f7da710, 

+0x6f307a41, 0x6ee382de, 0x6e96c0c3, 0x6e4a33c9, 

+0x6dfddbcc, 0x6db1b8a8, 0x6d65ca38, 0x6d1a1057, 

+0x6cce8ae1, 0x6c8339b2, 0x6c381ca6, 0x6bed3398, 

+0x6ba27e66, 0x6b57fce9, 0x6b0daeff, 0x6ac39485, 

+0x6a79ad56, 0x6a2ff94f, 0x69e6784d, 0x699d2a2c, 

+0x69540ec9, 0x690b2601, 0x68c26fb1, 0x6879ebb6, 

+0x683199ed, 0x67e97a34, 0x67a18c68, 0x6759d065, 

+0x6712460b, 0x66caed35, 0x6683c5c3, 0x663ccf92, 

+0x65f60a80, 0x65af766a, 0x6569132f, 0x6522e0ad, 

+0x64dcdec3, 0x64970d4f, 0x64516c2e, 0x640bfb41, 

+0x63c6ba64, 0x6381a978, 0x633cc85b, 0x62f816eb, 

+0x62b39509, 0x626f4292, 0x622b1f66, 0x61e72b65, 

+0x61a3666d, 0x615fd05f, 0x611c6919, 0x60d9307b, 

+0x60962665, 0x60534ab7, 0x60109d51, 0x5fce1e12, 

+0x5f8bccdb, 0x5f49a98c, 0x5f07b405, 0x5ec5ec26, 

+0x5e8451d0, 0x5e42e4e3, 0x5e01a540, 0x5dc092c7, 

+0x5d7fad59, 0x5d3ef4d7, 0x5cfe6923, 0x5cbe0a1c, 

+0x5c7dd7a4, 0x5c3dd19c, 0x5bfdf7e5, 0x5bbe4a61, 

+0x5b7ec8f2, 0x5b3f7377, 0x5b0049d4, 0x5ac14bea, 

+0x5a82799a, 0x5a43d2c6, 0x5a055751, 0x59c7071c, 

+0x5988e209, 0x594ae7fb, 0x590d18d3, 0x58cf7474, 

+0x5891fac1, 0x5854ab9b, 0x581786e6, 0x57da8c83, 

+0x579dbc57, 0x57611642, 0x57249a29, 0x56e847ef, 

+0x56ac1f75, 0x567020a0, 0x56344b52, 0x55f89f70, 

+0x55bd1cdb, 0x5581c378, 0x55469329, 0x550b8bd4, 

+0x54d0ad5b, 0x5495f7a1, 0x545b6a8b, 0x542105fd, 

+0x53e6c9db, 0x53acb607, 0x5372ca68, 0x533906e0, 

+0x52ff6b55, 0x52c5f7aa, 0x528cabc3, 0x52538786, 

+0x521a8ad7, 0x51e1b59a, 0x51a907b4, 0x5170810b, 

+0x51382182, 0x50ffe8fe, 0x50c7d765, 0x508fec9c, 

+0x50582888, 0x50208b0e, 0x4fe91413, 0x4fb1c37c, 

+0x4f7a9930, 0x4f439514, 0x4f0cb70c, 0x4ed5ff00, 

+0x4e9f6cd4, 0x4e69006e, 0x4e32b9b4, 0x4dfc988c, 

+0x4dc69cdd, 0x4d90c68b, 0x4d5b157e, 0x4d25899c, 

+0x4cf022ca, 0x4cbae0ef, 0x4c85c3f1, 0x4c50cbb8, 

+0x4c1bf829, 0x4be7492b, 0x4bb2bea5, 0x4b7e587d, 

+0x4b4a169c, 0x4b15f8e6, 0x4ae1ff43, 0x4aae299b, 

+0x4a7a77d5, 0x4a46e9d6, 0x4a137f88, 0x49e038d0, 

+0x49ad1598, 0x497a15c4, 0x4947393f, 0x49147fee, 

+0x48e1e9ba, 0x48af768a, 0x487d2646, 0x484af8d6, 

+0x4818ee22, 0x47e70611, 0x47b5408c, 0x47839d7b, 

+0x47521cc6, 0x4720be55, 0x46ef8210, 0x46be67e0, 

+0x468d6fae, 0x465c9961, 0x462be4e2, 0x45fb521a, 

+0x45cae0f2, 0x459a9152, 0x456a6323, 0x453a564d, 

+0x450a6abb, 0x44daa054, 0x44aaf702, 0x447b6ead, 

+0x444c0740, 0x441cc0a3, 0x43ed9ac0, 0x43be9580, 

+0x438fb0cb, 0x4360ec8d, 0x433248ae, 0x4303c517, 

+0x42d561b4, 0x42a71e6c, 0x4278fb2b, 0x424af7da, 

+0x421d1462, 0x41ef50ae, 0x41c1aca8, 0x41942839, 

+0x4166c34c, 0x41397dcc, 0x410c57a2, 0x40df50b8, 

+0x40b268fa, 0x4085a051, 0x4058f6a8, 0x402c6be9 

+};

+

+/*!

+ 

+  \brief calculates 2 ^ (x/y) for x<=0, y > 0, x <= 32768 * y 

+  

+  avoids integer division

+  

+  \return 

+*/

+Word32 pow2_xy(Word32 x, Word32 y)

+{

+  Word32 iPart;

+  Word32 fPart;

+  Word32 res;

+  Word32 tmp, tmp2;

+  Word32 shift, shift2;

+

+  tmp2 = -x;

+  iPart = tmp2 / y;

+  fPart = tmp2 - iPart*y;

+  iPart = min(iPart,INT_BITS-1);

+

+  res = pow2Table[(POW2_TABLE_SIZE*fPart)/y] >> iPart; 

+ 

+  return(res);

+}
\ No newline at end of file
diff --git a/media/libstagefright/codecs/aacenc/basic_op/oper_32b.h b/media/libstagefright/codecs/aacenc/basic_op/oper_32b.h
new file mode 100644
index 0000000..4119bc3
--- /dev/null
+++ b/media/libstagefright/codecs/aacenc/basic_op/oper_32b.h
@@ -0,0 +1,89 @@
+/*

+ ** Copyright 2003-2010, VisualOn, Inc.

+ **

+ ** Licensed under the Apache License, Version 2.0 (the "License");

+ ** you may not use this file except in compliance with the License.

+ ** You may obtain a copy of the License at

+ **

+ **     http://www.apache.org/licenses/LICENSE-2.0

+ **

+ ** Unless required by applicable law or agreed to in writing, software

+ ** distributed under the License is distributed on an "AS IS" BASIS,

+ ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

+ ** See the License for the specific language governing permissions and

+ ** limitations under the License.

+ */

+/*******************************************************************************

+	File:		oper_32b.h

+

+	Content:	Double precision operations

+

+*******************************************************************************/
+
+#ifndef __OPER_32b_H
+#define __OPER_32b_H
+

+#include "typedef.h"

+
+#ifdef __cplusplus
+extern "C" {
+#endif
+

+#define POW2_TABLE_BITS 8

+#define POW2_TABLE_SIZE (1<<POW2_TABLE_BITS)

+
+void L_Extract (Word32 L_32, Word16 *hi, Word16 *lo);
+Word32 L_Comp (Word16 hi, Word16 lo);
+Word32 Mpy_32 (Word16 hi1, Word16 lo1, Word16 hi2, Word16 lo2);
+Word32 Mpy_32_16 (Word16 hi, Word16 lo, Word16 n);
+Word32 Div_32 (Word32 L_num, Word32 denom);
+Word16 iLog4(Word32 value);

+Word32 rsqrt(Word32 value,  Word32 accuracy);

+Word32 pow2_xy(Word32 x, Word32 y);

+

+__inline Word32 L_mpy_ls(Word32 L_var2, Word16 var1)

+{

+    unsigned short swLow1;

+    Word16 swHigh1;

+    Word32 l_var_out;

+

+    swLow1 = (unsigned short)(L_var2);

+    swHigh1 = (Word16)(L_var2 >> 16);

+

+    l_var_out = (long)swLow1 * (long)var1 >> 15;

+    

+    l_var_out += swHigh1 * var1 << 1;

+    

+    return(l_var_out);

+}

+

+__inline Word32 L_mpy_wx(Word32 L_var2, Word16 var1)

+{

+#if ARMV5TE_L_MPY_LS

+	Word32 result; 

+	asm volatile( 

+		"SMULWB  %[result], %[L_var2], %[var1] \n" 

+		:[result]"+r"(result)

+		:[L_var2]"r"(L_var2), [var1]"r"(var1)

+		); 

+	return result;

+#else

+    unsigned short swLow1;

+    Word16 swHigh1;

+    Word32 l_var_out;

+

+    swLow1 = (unsigned short)(L_var2);

+    swHigh1 = (Word16)(L_var2 >> 16);

+

+    l_var_out = (long)swLow1 * (long)var1 >> 16;    

+    l_var_out += swHigh1 * var1;

+    

+    return(l_var_out);

+#endif

+}

+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
diff --git a/media/libstagefright/codecs/aacenc/basic_op/typedef.h b/media/libstagefright/codecs/aacenc/basic_op/typedef.h
new file mode 100644
index 0000000..d3a626a
--- /dev/null
+++ b/media/libstagefright/codecs/aacenc/basic_op/typedef.h
@@ -0,0 +1,63 @@
+/*

+ ** Copyright 2003-2010, VisualOn, Inc.

+ **

+ ** Licensed under the Apache License, Version 2.0 (the "License");

+ ** you may not use this file except in compliance with the License.

+ ** You may obtain a copy of the License at

+ **

+ **     http://www.apache.org/licenses/LICENSE-2.0

+ **

+ ** Unless required by applicable law or agreed to in writing, software

+ ** distributed under the License is distributed on an "AS IS" BASIS,

+ ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

+ ** See the License for the specific language governing permissions and

+ ** limitations under the License.

+ */

+/*******************************************************************************

+	File:		typedef.h

+

+	Content:	type defined for defferent paltform

+

+*******************************************************************************/
+
+#ifndef typedef_h
+#define typedef_h "$Id $"
+
+#undef ORIGINAL_TYPEDEF_H /* define to get "original" ETSI version
+                             of typedef.h                           */
+
+#ifdef ORIGINAL_TYPEDEF_H
+/*
+ * this is the original code from the ETSI file typedef.h
+ */
+   
+#if defined(__BORLANDC__) || defined(__WATCOMC__) || defined(_MSC_VER) || defined(__ZTC__)
+typedef signed char Word8;
+typedef short Word16;
+typedef long Word32;
+typedef int Flag;
+
+#elif defined(__sun)
+typedef signed char Word8;
+typedef short Word16;
+typedef long Word32;
+typedef int Flag;
+
+#elif defined(__unix__) || defined(__unix)
+typedef signed char Word8;
+typedef short Word16;
+typedef int Word32;
+typedef int Flag;
+
+#endif
+#else /* not original typedef.h */
+
+/*
+ * use (improved) type definition file typdefs.h and add a "Flag" type
+ */

+#include "typedefs.h"
+typedef int Flag;
+
+#endif
+
+#endif
diff --git a/media/libstagefright/codecs/aacenc/basic_op/typedefs.h b/media/libstagefright/codecs/aacenc/basic_op/typedefs.h
new file mode 100644
index 0000000..7d16fca
--- /dev/null
+++ b/media/libstagefright/codecs/aacenc/basic_op/typedefs.h
@@ -0,0 +1,179 @@
+/*

+ ** Copyright 2003-2010, VisualOn, Inc.

+ **

+ ** Licensed under the Apache License, Version 2.0 (the "License");

+ ** you may not use this file except in compliance with the License.

+ ** You may obtain a copy of the License at

+ **

+ **     http://www.apache.org/licenses/LICENSE-2.0

+ **

+ ** Unless required by applicable law or agreed to in writing, software

+ ** distributed under the License is distributed on an "AS IS" BASIS,

+ ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

+ ** See the License for the specific language governing permissions and

+ ** limitations under the License.

+ */

+/*******************************************************************************

+	File:		typedefs.h

+

+	Content:	type defined or const defined

+

+*******************************************************************************/
+
+#ifndef typedefs_h
+#define typedefs_h "$Id $"
+
+#ifndef CHAR_BIT

+#define CHAR_BIT      8         /* number of bits in a char */

+#endif

+

+#ifndef VOAAC_SHRT_MAX

+#define VOAAC_SHRT_MAX    (32767)        /* maximum (signed) short value */

+#endif

+
+#ifndef VOAAC_SHRT_MIN

+#define VOAAC_SHRT_MIN    (-32768)        /* minimum (signed) short value */

+#endif

+
+/* Define NULL pointer value */

+#ifndef NULL

+#ifdef __cplusplus

+#define NULL    0

+#else

+#define NULL    ((void *)0)

+#endif

+#endif
+
+#ifndef assert
+#define assert(_Expression)     ((void)0)
+#endif
+

+#ifdef LINUX

+#define __inline static __inline__

+#endif

+
+#define INT_BITS   32
+/*
+********************************************************************************
+*                         DEFINITION OF CONSTANTS 
+********************************************************************************
+*/
+/*
+ ********* define char type
+ */
+typedef char Char;
+
+/*
+ ********* define 8 bit signed/unsigned types & constants
+ */
+typedef signed char Word8;
+typedef unsigned char UWord8;
+/*
+ ********* define 16 bit signed/unsigned types & constants
+ */
+typedef short Word16;
+typedef unsigned short UWord16;
+
+/*
+ ********* define 32 bit signed/unsigned types & constants
+ */
+typedef long Word32;
+typedef unsigned long UWord32;
+
+

+

+#ifdef LINUX
+typedef long long Word64;
+typedef unsigned long long UWord64;
+#else
+typedef __int64 Word64;

+typedef unsigned __int64 UWord64;
+#endif
+
+#ifndef min

+#define min(a,b) ( a < b ? a : b)

+#endif

+

+#ifndef max

+#define max(a,b) ( a > b ? a : b)

+#endif

+

+#ifdef ARM_INASM

+#ifdef ARMV5_INASM

+#define ARMV5E_INASM	1

+#endif

+#define ARMV4_INASM		1

+#endif

+
+#if ARMV4_INASM

+	#define ARMV5TE_SAT           1

+    #define ARMV5TE_ADD           1

+    #define ARMV5TE_SUB           1

+	#define ARMV5TE_SHL           1

+    #define ARMV5TE_SHR           1

+	#define ARMV5TE_L_SHL         1

+    #define ARMV5TE_L_SHR         1

+#endif//ARMV4

+#if ARMV5E_INASM

+    #define ARMV5TE_L_ADD         1

+    #define ARMV5TE_L_SUB         1

+    #define ARMV5TE_L_MULT        1

+    #define ARMV5TE_L_MAC         1

+    #define ARMV5TE_L_MSU         1

+   

+    

+    #define ARMV5TE_DIV_S         1

+    #define ARMV5TE_ROUND         1

+    #define ARMV5TE_MULT          1

+    

+    #define ARMV5TE_NORM_S        1

+    #define ARMV5TE_NORM_L        1

+	#define ARMV5TE_L_MPY_LS	  1

+#endif
+

+//basic operation functions optimization flags

+#define SATRUATE_IS_INLINE              1   //define saturate as inline function

+#define SHL_IS_INLINE                   1  //define shl as inline function

+#define SHR_IS_INLINE                   1   //define shr as inline function

+#define L_MULT_IS_INLINE                1   //define L_mult as inline function

+#define L_MSU_IS_INLINE                 1   //define L_msu as inline function

+#define L_SUB_IS_INLINE                 1   //define L_sub as inline function

+#define L_SHL_IS_INLINE                 1   //define L_shl as inline function

+#define L_SHR_IS_INLINE                 1   //define L_shr as inline function

+#define ADD_IS_INLINE                   1   //define add as inline function //add, inline is the best

+#define SUB_IS_INLINE                   1   //define sub as inline function //sub, inline is the best

+#define DIV_S_IS_INLINE                 1   //define div_s as inline function

+#define MULT_IS_INLINE                  1   //define mult as inline function

+#define NORM_S_IS_INLINE                1   //define norm_s as inline function

+#define NORM_L_IS_INLINE                1   //define norm_l as inline function

+#define ROUND_IS_INLINE                 1   //define round as inline function

+#define L_MAC_IS_INLINE                 1   //define L_mac as inline function

+#define L_ADD_IS_INLINE                 1   //define L_add as inline function

+#define EXTRACT_H_IS_INLINE             1   //define extract_h as inline function 

+#define EXTRACT_L_IS_INLINE             1   //define extract_l as inline function        //???

+#define MULT_R_IS_INLINE                1   //define mult_r as inline function

+#define SHR_R_IS_INLINE                 1   //define shr_r as inline function

+#define MAC_R_IS_INLINE                 1   //define mac_r as inline function

+#define MSU_R_IS_INLINE                 1   //define msu_r as inline function

+#define L_SHR_R_IS_INLINE               1   //define L_shr_r as inline function

+

+#define PREFIX				voAACEnc

+#define LINK0(x, y, z)		LINK1(x,y,z)

+#define LINK1(x,y,z)		x##y##z

+#define ADD_PREFIX(func)	LINK0(PREFIX, _, func)

+

+#define  L_Extract		ADD_PREFIX(L_Extract)

+#define  L_Comp			ADD_PREFIX(L_Comp)

+#define  Mpy_32			ADD_PREFIX(Mpy_32)

+#define  Mpy_32_16		ADD_PREFIX(Mpy_32_16)

+#define  Div_32			ADD_PREFIX(Div_32)

+#define  iLog4			ADD_PREFIX(iLog4)

+#define  rsqrt			ADD_PREFIX(rsqrt)

+#define  pow2_xy		ADD_PREFIX(pow2_xy)

+#define  L_mpy_ls		ADD_PREFIX(L_mpy_ls)

+#define  L_mpy_wx		ADD_PREFIX(L_mpy_wx)

+

+#define mem_malloc		ADD_PREFIX(mem_malloc)

+#define mem_free		ADD_PREFIX(mem_free)

+

+#endif
diff --git a/media/libstagefright/codecs/aacenc/build/eclair/ARMV5E/Makefile b/media/libstagefright/codecs/aacenc/build/eclair/ARMV5E/Makefile
new file mode 100644
index 0000000..b4f63af
--- /dev/null
+++ b/media/libstagefright/codecs/aacenc/build/eclair/ARMV5E/Makefile
@@ -0,0 +1,55 @@
+#/*

+#** Copyright 2003-2010, VisualOn, Inc.

+#**

+#** Licensed under the Apache License, Version 2.0 (the "License");

+#** you may not use this file except in compliance with the License.

+#** You may obtain a copy of the License at

+#**

+#**     http://www.apache.org/licenses/LICENSE-2.0

+#**

+#** Unless required by applicable law or agreed to in writing, software

+#** distributed under the License is distributed on an "AS IS" BASIS,

+#** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

+#** See the License for the specific language governing permissions and

+#** limitations under the License.

+#*/

+

+# target6

+# available: pc, v4(armv4), v5(armv5), v5x(armv5 xscale), v6(armv6), v7(cortex-a8 neon)

+VOTT:= v5

+

+

+# module type

+# please specify the type of your module: lib or exe

+VOMT:= lib

+

+

+# module macros

+# please append the additional macro definitions here for your module if necessary. 

+# e.g. -DVISUALON, macro VISUALON defined for your module 

+VOMM:= -DARMV5E -DARM_INASM -DARMV5_INASM 

+

+

+

+# please specify the name of your module

+VOTARGET:=libvoAACEncv5

+

+

+# please modify here to be sure to see the g1.mk

+include ../../../../../Tools/eclair.mk 

+

+# dependent libraries.

+VODEPLIBS:=#-ldl -lstdc++ 

+

+# module source

+# please modify here to be sure to see the ms.mk which specifies all source info of your module

+include ../../ms.mk

+

+

+# please specify where is the voRelease on your PC, relative path is suggested

+VORELDIR:=../../../../../../Release

+

+

+# please modify here to be sure to see the doit.mk

+include ../../../../../Tools/doit.mk 

+

diff --git a/media/libstagefright/codecs/aacenc/build/eclair/ARMV7/Makefile b/media/libstagefright/codecs/aacenc/build/eclair/ARMV7/Makefile
new file mode 100644
index 0000000..cdce2c1
--- /dev/null
+++ b/media/libstagefright/codecs/aacenc/build/eclair/ARMV7/Makefile
@@ -0,0 +1,55 @@
+#/*

+#** Copyright 2003-2010, VisualOn, Inc.

+#**

+#** Licensed under the Apache License, Version 2.0 (the "License");

+#** you may not use this file except in compliance with the License.

+#** You may obtain a copy of the License at

+#**

+#**     http://www.apache.org/licenses/LICENSE-2.0

+#**

+#** Unless required by applicable law or agreed to in writing, software

+#** distributed under the License is distributed on an "AS IS" BASIS,

+#** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

+#** See the License for the specific language governing permissions and

+#** limitations under the License.

+#*/

+

+# target6

+# available: pc, v4(armv4), v5(armv5), v5x(armv5 xscale), v6(armv6), v7(cortex-a8 neon)

+VOTT:= v7

+

+

+# module type

+# please specify the type of your module: lib or exe

+VOMT:= lib

+

+

+# module macros

+# please append the additional macro definitions here for your module if necessary. 

+# e.g. -DVISUALON, macro VISUALON defined for your module 

+VOMM:= -DARMV5E -DARMV7Neon -DARM_INASM -DARMV5_INASM 

+

+

+

+# please specify the name of your module

+VOTARGET:=libvoAACEncv7

+

+

+# please modify here to be sure to see the g1.mk

+include ../../../../../Tools/eclair.mk 

+

+# dependent libraries.

+VODEPLIBS:=#-ldl -lstdc++ 

+

+# module source

+# please modify here to be sure to see the ms.mk which specifies all source info of your module

+include ../../ms.mk

+

+

+# please specify where is the voRelease on your PC, relative path is suggested

+VORELDIR:=../../../../../../Release

+

+

+# please modify here to be sure to see the doit.mk

+include ../../../../../Tools/doit.mk  

+

diff --git a/media/libstagefright/codecs/aacenc/build/eclair/makefile b/media/libstagefright/codecs/aacenc/build/eclair/makefile
new file mode 100644
index 0000000..6bb3c13
--- /dev/null
+++ b/media/libstagefright/codecs/aacenc/build/eclair/makefile
@@ -0,0 +1,40 @@
+#/*
+#** Copyright 2003-2010, VisualOn, Inc.
+#**
+#** Licensed under the Apache License, Version 2.0 (the "License");
+#** you may not use this file except in compliance with the License.
+#** You may obtain a copy of the License at
+#**
+#**     http://www.apache.org/licenses/LICENSE-2.0
+#**
+#** Unless required by applicable law or agreed to in writing, software
+#** distributed under the License is distributed on an "AS IS" BASIS,
+#** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+#** See the License for the specific language governing permissions and
+#** limitations under the License.
+#*/
+
+# Just acting as Father Makefile of Modules
+# please keep the name 'makefile' unchanged
+ 
+# Module Subdirs
+VOMSD:=$(dir $(shell find . -name 'Makefile'))
+
+all:
+	for dir in $(VOMSD); \
+		do \
+			$(MAKE) -C $$dir; \
+		done
+
+.PHONY:clean devel
+clean:
+	for dir in $(VOMSD); \
+		do \
+			$(MAKE) -C $$dir clean; \
+		done
+
+devel:
+	for dir in $(VOMSD); \
+		do \
+			$(MAKE) -C $$dir devel; \
+		done
diff --git a/media/libstagefright/codecs/aacenc/build/ms.mk b/media/libstagefright/codecs/aacenc/build/ms.mk
new file mode 100644
index 0000000..b67efbc
--- /dev/null
+++ b/media/libstagefright/codecs/aacenc/build/ms.mk
@@ -0,0 +1,42 @@
+#/*

+#** Copyright 2003-2010, VisualOn, Inc.

+#**

+#** Licensed under the Apache License, Version 2.0 (the "License");

+#** you may not use this file except in compliance with the License.

+#** You may obtain a copy of the License at

+#**

+#**     http://www.apache.org/licenses/LICENSE-2.0

+#**

+#** Unless required by applicable law or agreed to in writing, software

+#** distributed under the License is distributed on an "AS IS" BASIS,

+#** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

+#** See the License for the specific language governing permissions and

+#** limitations under the License.

+#*/

+

+

+# please list all objects needed by your target here

+OBJS:=basicop2.o oper_32b.o aac_rom.o aacenc.o aacenc_core.o adj_thr.o \

+			band_nrg.o bit_cnt.o bitbuffer.o bitenc.o block_switch.o channel_map.o \

+			dyn_bits.o grp_data.o interface.o line_pe.o memalign.o ms_stereo.o \

+			pre_echo_control.o psy_configuration.o psy_main.o qc_main.o quantize.o sf_estim.o \

+			spreading.o stat_bits.o tns.o transform.o

+			

+# please list all directories that all source files relative with your module(.h .c .cpp) locate 

+VOSRCDIR:=../../../src \

+					../../../inc \

+					../../../basic_op\

+					../../../../../Include 

+					

+ifeq ($(VOTT), v5)

+OBJS+= AutoCorrelation_v5.o band_nrg_v5.o CalcWindowEnergy_v5.o \

+				PrePostMDCT_v5.o R4R8First_v5.o Radix4FFT_v5.o

+VOSRCDIR+= ../../../src/asm/ARMV5E/

+endif	

+

+ifeq ($(VOTT), v7)

+OBJS+= AutoCorrelation_v5.o band_nrg_v5.o CalcWindowEnergy_v5.o \

+			 PrePostMDCT_v7.o R4R8First_v7.o Radix4FFT_v7.o

+VOSRCDIR+= ../../../src/asm/ARMV5E/

+VOSRCDIR+= ../../../src/asm/ARMV7/

+endif		
\ No newline at end of file
diff --git a/media/libstagefright/codecs/aacenc/doc/voAACEncoderSDK.pdf b/media/libstagefright/codecs/aacenc/doc/voAACEncoderSDK.pdf
new file mode 100644
index 0000000..874d0f7
--- /dev/null
+++ b/media/libstagefright/codecs/aacenc/doc/voAACEncoderSDK.pdf
Binary files differ
diff --git a/media/libstagefright/codecs/aacenc/inc/aac_rom.h b/media/libstagefright/codecs/aacenc/inc/aac_rom.h
new file mode 100644
index 0000000..b0429fc
--- /dev/null
+++ b/media/libstagefright/codecs/aacenc/inc/aac_rom.h
@@ -0,0 +1,117 @@
+/*

+ ** Copyright 2003-2010, VisualOn, Inc.

+ **

+ ** Licensed under the Apache License, Version 2.0 (the "License");

+ ** you may not use this file except in compliance with the License.

+ ** You may obtain a copy of the License at

+ **

+ **     http://www.apache.org/licenses/LICENSE-2.0

+ **

+ ** Unless required by applicable law or agreed to in writing, software

+ ** distributed under the License is distributed on an "AS IS" BASIS,

+ ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

+ ** See the License for the specific language governing permissions and

+ ** limitations under the License.

+ */

+/*******************************************************************************

+	File:		aac_rom.h

+

+	Content:	constant tables 

+

+*******************************************************************************/
+
+#ifndef ROM_H
+#define ROM_H
+

+#include "config.h"
+#include "psy_const.h"
+#include "tns_param.h"
+
+/*
+  mdct
+*/
+extern const int ShortWindowSine[FRAME_LEN_SHORT/2];
+extern const int LongWindowKBD[FRAME_LEN_LONG/2];

+

+extern const unsigned char bitrevTab[17 + 129];

+extern const int cossintab[128 + 1024];

+

+#if defined (ARMV5E) && !defined (ARMV7Neon)

+extern const int twidTab64[(4*6 + 16*6)/2];

+extern const int twidTab512[(8*6 + 32*6 + 128*6)/2];

+#else

+extern const int twidTab64[4*6 + 16*6];

+extern const int twidTab512[8*6 + 32*6 + 128*6];
+#endif
+
+/*
+  form factor
+*/
+extern const Word32 formfac_sqrttable[96];
+
+/*
+  quantizer
+*/
+extern const Word32 mTab_3_4[512];
+extern const Word32 mTab_4_3[512];
+/*! $2^{-\frac{n}{16}}$ table */
+extern const Word16 pow2tominusNover16[17] ;
+
+extern Word32 specExpMantTableComb_enc[4][14];
+extern const UWord8 specExpTableComb_enc[4][14];
+
+extern const Word16 quantBorders[4][4];
+//extern const Word16 quantRecon[3][4];

+extern const Word16 quantRecon[4][3];
+
+/*
+  huffman
+*/
+extern const UWord16 huff_ltab1_2[3][3][3][3];
+extern const UWord16 huff_ltab3_4[3][3][3][3];
+extern const UWord16 huff_ltab5_6[9][9];
+extern const UWord16 huff_ltab7_8[8][8];
+extern const UWord16 huff_ltab9_10[13][13];
+extern const UWord16 huff_ltab11[17][17];
+extern const UWord16 huff_ltabscf[121];
+extern const UWord16 huff_ctab1[3][3][3][3];
+extern const UWord16 huff_ctab2[3][3][3][3];
+extern const UWord16 huff_ctab3[3][3][3][3];
+extern const UWord16 huff_ctab4[3][3][3][3];
+extern const UWord16 huff_ctab5[9][9];
+extern const UWord16 huff_ctab6[9][9];
+extern const UWord16 huff_ctab7[8][8];
+extern const UWord16 huff_ctab8[8][8];
+extern const UWord16 huff_ctab9[13][13];
+extern const UWord16 huff_ctab10[13][13];
+extern const UWord16 huff_ctab11[17][17];
+extern const UWord32 huff_ctabscf[121];
+
+
+
+/*
+  misc
+*/
+extern const int sampRateTab[NUM_SAMPLE_RATES];

+extern const int BandwithCoefTab[8][NUM_SAMPLE_RATES];

+extern const int rates[8];

+extern const UWord8 sfBandTotalShort[NUM_SAMPLE_RATES];

+extern const UWord8 sfBandTotalLong[NUM_SAMPLE_RATES];

+extern const int sfBandTabShortOffset[NUM_SAMPLE_RATES];

+extern const short sfBandTabShort[76];

+extern const int sfBandTabLongOffset[NUM_SAMPLE_RATES];

+extern const short sfBandTabLong[325];

+
+extern const Word32 m_log2_table[INT_BITS];
+
+/*
+  TNS
+*/
+extern const Word32 tnsCoeff3[8];

+extern const Word32 tnsCoeff3Borders[8];

+extern const Word32 tnsCoeff4[16];

+extern const Word32 tnsCoeff4Borders[16];

+extern const Word32 invSBF[24];

+extern const Word16 sideInfoTabLong[MAX_SFB_LONG + 1];

+extern const Word16 sideInfoTabShort[MAX_SFB_SHORT + 1];
+#endif
diff --git a/media/libstagefright/codecs/aacenc/inc/aacenc_core.h b/media/libstagefright/codecs/aacenc/inc/aacenc_core.h
new file mode 100644
index 0000000..faa1d20
--- /dev/null
+++ b/media/libstagefright/codecs/aacenc/inc/aacenc_core.h
@@ -0,0 +1,117 @@
+/*

+ ** Copyright 2003-2010, VisualOn, Inc.

+ **

+ ** Licensed under the Apache License, Version 2.0 (the "License");

+ ** you may not use this file except in compliance with the License.

+ ** You may obtain a copy of the License at

+ **

+ **     http://www.apache.org/licenses/LICENSE-2.0

+ **

+ ** Unless required by applicable law or agreed to in writing, software

+ ** distributed under the License is distributed on an "AS IS" BASIS,

+ ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

+ ** See the License for the specific language governing permissions and

+ ** limitations under the License.

+ */

+/*******************************************************************************

+	File:		aacenc_core.h

+

+	Content:	aac encoder interface functions

+

+*******************************************************************************/
+
+#ifndef _aacenc_core_h_
+#define _aacenc_core_h_
+
+

+#include "typedef.h"
+#include "config.h"

+#include "bitenc.h"

+

+#include "psy_configuration.h"

+#include "psy_main.h"

+#include "qc_main.h"

+#include "psy_main.h"

+/*-------------------------- defines --------------------------------------*/
+
+
+/*-------------------- structure definitions ------------------------------*/
+typedef  struct {
+  Word32   sampleRate;            /* audio file sample rate */
+  Word32   bitRate;               /* encoder bit rate in bits/sec */
+  Word16   nChannelsIn;           /* number of channels on input (1,2) */
+  Word16   nChannelsOut;          /* number of channels on output (1,2) */
+  Word16   bandWidth;             /* targeted audio bandwidth in Hz */

+  Word16   adtsUsed;			  /* whether write adts header */
+} AACENC_CONFIG;
+

+

+typedef struct {

+	

+  AACENC_CONFIG config;     /* Word16 size: 8 */

+

+  ELEMENT_INFO elInfo;      /* Word16 size: 4 */

+

+  QC_STATE qcKernel;        /* Word16 size: 6 + 5(PADDING) + 7(ELEMENT_BITS) + 54(ADJ_THR_STATE) = 72 */

+  QC_OUT   qcOut;           /* Word16 size: MAX_CHANNELS*920(QC_OUT_CHANNEL) + 5(QC_OUT_ELEMENT) + 7 = 932 / 1852 */

+

+  PSY_OUT    psyOut;        /* Word16 size: MAX_CHANNELS*186 + 2 = 188 / 374 */

+  PSY_KERNEL psyKernel;     /* Word16 size:  2587 / 4491 */

+

+  struct BITSTREAMENCODER_INIT bseInit; /* Word16 size: 6 */

+  struct BIT_BUF  bitStream;            /* Word16 size: 8 */

+  HANDLE_BIT_BUF  hBitStream;

+  int			  initOK;

+

+  short			*intbuf;

+  short			*encbuf;

+  short			*inbuf;

+  int			enclen;

+  int			inlen;

+  int			intlen;

+  int			uselength;

+

+  void			*hCheck;

+  VO_MEM_OPERATOR *voMemop;

+  VO_MEM_OPERATOR voMemoprator;

+

+}AAC_ENCODER; /* Word16 size: 3809 / 6851 */

+

+/*-----------------------------------------------------------------------------
+
+functionname: AacInitDefaultConfig
+description:  gives reasonable default configuration
+returns:      ---
+
+------------------------------------------------------------------------------*/
+void AacInitDefaultConfig(AACENC_CONFIG *config);
+
+/*---------------------------------------------------------------------------
+
+functionname:AacEncOpen
+description: allocate and initialize a new encoder instance
+returns:     AACENC_OK if success
+
+---------------------------------------------------------------------------*/
+
+Word16  AacEncOpen (AAC_ENCODER				*hAacEnc,       /* pointer to an encoder handle, initialized on return */
+                    const  AACENC_CONFIG     config);        /* pre-initialized config struct */
+
+Word16 AacEncEncode(AAC_ENCODER		   *hAacEnc,
+                    Word16             *timeSignal,
+                    const UWord8       *ancBytes,      /*!< pointer to ancillary data bytes */
+                    Word16             *numAncBytes,   /*!< number of ancillary Data Bytes, send as fill element  */
+                    UWord8             *outBytes,      /*!< pointer to output buffer            */
+                    Word32             *numOutBytes    /*!< number of bytes in output buffer */
+                    );
+
+/*---------------------------------------------------------------------------
+
+functionname:AacEncClose
+description: deallocate an encoder instance
+
+---------------------------------------------------------------------------*/
+
+void AacEncClose (AAC_ENCODER* hAacEnc, VO_MEM_OPERATOR *pMemOP); /* an encoder handle */
+
+#endif /* _aacenc_h_ */
diff --git a/media/libstagefright/codecs/aacenc/inc/adj_thr.h b/media/libstagefright/codecs/aacenc/inc/adj_thr.h
new file mode 100644
index 0000000..4057cbe
--- /dev/null
+++ b/media/libstagefright/codecs/aacenc/inc/adj_thr.h
@@ -0,0 +1,57 @@
+/*

+ ** Copyright 2003-2010, VisualOn, Inc.

+ **

+ ** Licensed under the Apache License, Version 2.0 (the "License");

+ ** you may not use this file except in compliance with the License.

+ ** You may obtain a copy of the License at

+ **

+ **     http://www.apache.org/licenses/LICENSE-2.0

+ **

+ ** Unless required by applicable law or agreed to in writing, software

+ ** distributed under the License is distributed on an "AS IS" BASIS,

+ ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

+ ** See the License for the specific language governing permissions and

+ ** limitations under the License.

+ */

+/*******************************************************************************

+	File:		adj_thr.h

+

+	Content:	Threshold compensation function 

+

+*******************************************************************************/
+
+#ifndef __ADJ_THR_H
+#define __ADJ_THR_H
+
+#include "adj_thr_data.h"
+#include "qc_data.h"
+#include "interface.h"
+
+Word16 bits2pe(const Word16 bits);
+
+Word32 AdjThrNew(ADJ_THR_STATE** phAdjThr,
+                 Word32 nElements);
+
+void AdjThrDelete(ADJ_THR_STATE *hAdjThr);
+
+void AdjThrInit(ADJ_THR_STATE *hAdjThr,
+                const Word32 peMean,
+                Word32 chBitrate);
+
+void AdjustThresholds(ADJ_THR_STATE *adjThrState,
+                      ATS_ELEMENT* AdjThrStateElement,
+                      PSY_OUT_CHANNEL psyOutChannel[MAX_CHANNELS],
+                      PSY_OUT_ELEMENT *psyOutElement,
+                      Word16 *chBitDistribution,
+                      Word16 logSfbEnergy[MAX_CHANNELS][MAX_GROUPED_SFB],
+                      Word16 sfbNRelevantLines[MAX_CHANNELS][MAX_GROUPED_SFB],                      
+                      QC_OUT_ELEMENT* qcOE,
+					  ELEMENT_BITS* elBits,
+					  const Word16 nChannels,
+                      const Word16 maxBitFac);
+
+void AdjThrUpdate(ATS_ELEMENT *AdjThrStateElement,
+                  const Word16 dynBitsUsed);
+
+
+#endif
diff --git a/media/libstagefright/codecs/aacenc/inc/adj_thr_data.h b/media/libstagefright/codecs/aacenc/inc/adj_thr_data.h
new file mode 100644
index 0000000..25dd437
--- /dev/null
+++ b/media/libstagefright/codecs/aacenc/inc/adj_thr_data.h
@@ -0,0 +1,69 @@
+/*

+ ** Copyright 2003-2010, VisualOn, Inc.

+ **

+ ** Licensed under the Apache License, Version 2.0 (the "License");

+ ** you may not use this file except in compliance with the License.

+ ** You may obtain a copy of the License at

+ **

+ **     http://www.apache.org/licenses/LICENSE-2.0

+ **

+ ** Unless required by applicable law or agreed to in writing, software

+ ** distributed under the License is distributed on an "AS IS" BASIS,

+ ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

+ ** See the License for the specific language governing permissions and

+ ** limitations under the License.

+ */

+/*******************************************************************************

+	File:		adj_thr_data.h

+

+	Content:	Threshold compensation parameter 

+

+*******************************************************************************/
+
+#ifndef __ADJ_THR_DATA_H
+#define __ADJ_THR_DATA_H
+
+#include "typedef.h"

+#include "psy_const.h"
+#include "line_pe.h"
+
+typedef struct {
+   Word16 clipSaveLow, clipSaveHigh;
+   Word16 minBitSave, maxBitSave;
+   Word16 clipSpendLow, clipSpendHigh;
+   Word16 minBitSpend, maxBitSpend;
+} BRES_PARAM;
+
+typedef struct {
+   UWord8 modifyMinSnr;
+   Word16 startSfbL, startSfbS;
+} AH_PARAM;
+
+typedef struct {
+  Word32 maxRed;
+  Word32 startRatio, maxRatio;
+  Word32 redRatioFac;
+  Word32 redOffs;
+} MINSNR_ADAPT_PARAM;
+
+typedef struct {
+  /* parameters for bitreservoir control */
+  Word16 peMin, peMax;
+  /* constant offset to pe               */
+  Word16  peOffset;
+  /* avoid hole parameters               */
+  AH_PARAM ahParam;
+  /* paramters for adaptation of minSnr */
+  MINSNR_ADAPT_PARAM minSnrAdaptParam;
+  /* values for correction of pe */
+  Word16 peLast;
+  Word16 dynBitsLast;
+  Word16 peCorrectionFactor;
+} ATS_ELEMENT;
+
+typedef struct {
+  BRES_PARAM   bresParamLong, bresParamShort; /* Word16 size: 2*8 */
+  ATS_ELEMENT  adjThrStateElem;               /* Word16 size: 19 */
+} ADJ_THR_STATE;
+
+#endif
diff --git a/media/libstagefright/codecs/aacenc/inc/band_nrg.h b/media/libstagefright/codecs/aacenc/inc/band_nrg.h
new file mode 100644
index 0000000..68509da
--- /dev/null
+++ b/media/libstagefright/codecs/aacenc/inc/band_nrg.h
@@ -0,0 +1,46 @@
+/*

+ ** Copyright 2003-2010, VisualOn, Inc.

+ **

+ ** Licensed under the Apache License, Version 2.0 (the "License");

+ ** you may not use this file except in compliance with the License.

+ ** You may obtain a copy of the License at

+ **

+ **     http://www.apache.org/licenses/LICENSE-2.0

+ **

+ ** Unless required by applicable law or agreed to in writing, software

+ ** distributed under the License is distributed on an "AS IS" BASIS,

+ ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

+ ** See the License for the specific language governing permissions and

+ ** limitations under the License.

+ */

+/*******************************************************************************

+	File:		band_nrg.h

+

+	Content:	Band/Line energy calculations functions

+

+*******************************************************************************/
+
+
+#ifndef _BAND_NRG_H
+#define _BAND_NRG_H
+
+#include "typedef.h"
+
+
+void CalcBandEnergy(const Word32 *mdctSpectrum,
+                    const Word16 *bandOffset,
+                    const Word16  numBands,
+                    Word32       *bandEnergy,
+                    Word32       *bandEnergySum);
+
+
+void CalcBandEnergyMS(const Word32 *mdctSpectrumLeft,
+                      const Word32 *mdctSpectrumRight,
+                      const Word16 *bandOffset,
+                      const Word16  numBands,
+                      Word32       *bandEnergyMid,
+                      Word32       *bandEnergyMidSum,
+                      Word32       *bandEnergySide,
+                      Word32       *bandEnergySideSum);
+
+#endif
diff --git a/media/libstagefright/codecs/aacenc/inc/bit_cnt.h b/media/libstagefright/codecs/aacenc/inc/bit_cnt.h
new file mode 100644
index 0000000..808319e
--- /dev/null
+++ b/media/libstagefright/codecs/aacenc/inc/bit_cnt.h
@@ -0,0 +1,106 @@
+/*

+ ** Copyright 2003-2010, VisualOn, Inc.

+ **

+ ** Licensed under the Apache License, Version 2.0 (the "License");

+ ** you may not use this file except in compliance with the License.

+ ** You may obtain a copy of the License at

+ **

+ **     http://www.apache.org/licenses/LICENSE-2.0

+ **

+ ** Unless required by applicable law or agreed to in writing, software

+ ** distributed under the License is distributed on an "AS IS" BASIS,

+ ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

+ ** See the License for the specific language governing permissions and

+ ** limitations under the License.

+ */

+/*******************************************************************************

+	File:		bit_cnt.h

+

+	Content:	Huffman Bitcounter & coder structure and functions

+

+*******************************************************************************/
+
+#ifndef __BITCOUNT_H
+#define __BITCOUNT_H
+
+#include "bitbuffer.h"

+#include "basic_op.h"
+#define INVALID_BITCOUNT (MAX_16/4)
+
+/*
+  code book number table
+*/
+
+enum codeBookNo{
+  CODE_BOOK_ZERO_NO=               0,
+  CODE_BOOK_1_NO=                  1,
+  CODE_BOOK_2_NO=                  2,
+  CODE_BOOK_3_NO=                  3,
+  CODE_BOOK_4_NO=                  4,
+  CODE_BOOK_5_NO=                  5,
+  CODE_BOOK_6_NO=                  6,
+  CODE_BOOK_7_NO=                  7,
+  CODE_BOOK_8_NO=                  8,
+  CODE_BOOK_9_NO=                  9,
+  CODE_BOOK_10_NO=                10,
+  CODE_BOOK_ESC_NO=               11,
+  CODE_BOOK_RES_NO=               12,
+  CODE_BOOK_PNS_NO=               13
+};
+
+/*
+  code book index table
+*/
+
+enum codeBookNdx{
+  CODE_BOOK_ZERO_NDX=0,
+  CODE_BOOK_1_NDX,
+  CODE_BOOK_2_NDX,
+  CODE_BOOK_3_NDX,
+  CODE_BOOK_4_NDX,
+  CODE_BOOK_5_NDX,
+  CODE_BOOK_6_NDX,
+  CODE_BOOK_7_NDX,
+  CODE_BOOK_8_NDX,
+  CODE_BOOK_9_NDX,
+  CODE_BOOK_10_NDX,
+  CODE_BOOK_ESC_NDX,
+  CODE_BOOK_RES_NDX,
+  CODE_BOOK_PNS_NDX,
+  NUMBER_OF_CODE_BOOKS
+};
+
+/*
+  code book lav table
+*/
+
+enum codeBookLav{
+  CODE_BOOK_ZERO_LAV=0,
+  CODE_BOOK_1_LAV=1,
+  CODE_BOOK_2_LAV=1,
+  CODE_BOOK_3_LAV=2,
+  CODE_BOOK_4_LAV=2,
+  CODE_BOOK_5_LAV=4,
+  CODE_BOOK_6_LAV=4,
+  CODE_BOOK_7_LAV=7,
+  CODE_BOOK_8_LAV=7,
+  CODE_BOOK_9_LAV=12,
+  CODE_BOOK_10_LAV=12,
+  CODE_BOOK_ESC_LAV=16,
+  CODE_BOOK_SCF_LAV=60,
+  CODE_BOOK_PNS_LAV=60
+};
+
+Word16 bitCount(const Word16 *aQuantSpectrum,
+                const Word16  noOfSpecLines,
+                Word16        maxVal,
+                Word16       *bitCountLut);
+
+Word16 codeValues(Word16 *values, Word16 width, Word16 codeBook, HANDLE_BIT_BUF hBitstream);
+
+Word16 bitCountScalefactorDelta(Word16 delta);
+Word16 codeScalefactorDelta(Word16 scalefactor, HANDLE_BIT_BUF hBitstream);
+
+
+
+#endif
diff --git a/media/libstagefright/codecs/aacenc/inc/bitbuffer.h b/media/libstagefright/codecs/aacenc/inc/bitbuffer.h
new file mode 100644
index 0000000..cb850c9
--- /dev/null
+++ b/media/libstagefright/codecs/aacenc/inc/bitbuffer.h
@@ -0,0 +1,89 @@
+/*

+ ** Copyright 2003-2010, VisualOn, Inc.

+ **

+ ** Licensed under the Apache License, Version 2.0 (the "License");

+ ** you may not use this file except in compliance with the License.

+ ** You may obtain a copy of the License at

+ **

+ **     http://www.apache.org/licenses/LICENSE-2.0

+ **

+ ** Unless required by applicable law or agreed to in writing, software

+ ** distributed under the License is distributed on an "AS IS" BASIS,

+ ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

+ ** See the License for the specific language governing permissions and

+ ** limitations under the License.

+ */

+/*******************************************************************************

+	File:		bitbuffer.h

+

+	Content:	Bit Buffer Management structure and functions

+

+*******************************************************************************/
+
+#ifndef BITBUFFER_H
+#define BITBUFFER_H
+
+#include "typedef.h"
+
+
+enum direction
+{
+  forwardDirection,
+  backwardDirection
+};
+
+
+/*!
+   The pointer 'pReadNext' points to the next available word, where bits can be read from. The pointer
+   'pWriteNext' points to the next available word, where bits can be written to. The pointer pBitBufBase
+   points to the start of the bitstream buffer and the pointer pBitBufEnd points to the end of the bitstream
+   buffer. The two pointers are used as lower-bound respectively upper-bound address for the modulo addressing
+   mode.
+
+   The element cntBits contains the currently available bits in the bit buffer. It will be incremented when
+   bits are written to the bitstream buffer and decremented when bits are read from the bitstream buffer.
+*/
+struct BIT_BUF
+{
+  UWord8 *pBitBufBase;          /*!< pointer points to first position in bitstream buffer */
+  UWord8 *pBitBufEnd;           /*!< pointer points to last position in bitstream buffer */
+
+  UWord8 *pWriteNext;           /*!< pointer points to next available word in bitstream buffer to write */
+
+  UWord32 cache;
+
+  Word16  wBitPos;              /*!< 31<=wBitPos<=0*/
+  Word16  cntBits;              /*!< number of available bits in the bitstream buffer
+                                     write bits to bitstream buffer  => increment cntBits
+                                     read bits from bitstream buffer => decrement cntBits */
+  Word16  size;                 /*!< size of bitbuffer in bits */
+  Word16  isValid;              /*!< indicates whether the instance has been initialized */
+}; /* size Word16: 8 */
+
+/*! Define pointer to bit buffer structure */
+typedef struct BIT_BUF *HANDLE_BIT_BUF;
+
+
+HANDLE_BIT_BUF CreateBitBuffer(HANDLE_BIT_BUF hBitBuf,
+                               UWord8 *pBitBufBase,
+                               Word16  bitBufSize);
+
+
+void DeleteBitBuffer(HANDLE_BIT_BUF *hBitBuf);
+
+
+Word16 GetBitsAvail(HANDLE_BIT_BUF hBitBuf);
+
+
+Word16 WriteBits(HANDLE_BIT_BUF hBitBuf,
+                 Word32 writeValue,
+                 Word16 noBitsToWrite);
+
+void ResetBitBuf(HANDLE_BIT_BUF hBitBuf,
+                 UWord8 *pBitBufBase,
+                 Word16  bitBufSize);
+
+#define GetNrBitsAvailable(hBitBuf) ( (hBitBuf)->cntBits)
+#define GetNrBitsRead(hBitBuf)       ((hBitBuf)->size-(hBitBuf)->cntBits)
+
+#endif /* BITBUFFER_H */
diff --git a/media/libstagefright/codecs/aacenc/inc/bitenc.h b/media/libstagefright/codecs/aacenc/inc/bitenc.h
new file mode 100644
index 0000000..1151057
--- /dev/null
+++ b/media/libstagefright/codecs/aacenc/inc/bitenc.h
@@ -0,0 +1,50 @@
+/*

+ ** Copyright 2003-2010, VisualOn, Inc.

+ **

+ ** Licensed under the Apache License, Version 2.0 (the "License");

+ ** you may not use this file except in compliance with the License.

+ ** You may obtain a copy of the License at

+ **

+ **     http://www.apache.org/licenses/LICENSE-2.0

+ **

+ ** Unless required by applicable law or agreed to in writing, software

+ ** distributed under the License is distributed on an "AS IS" BASIS,

+ ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

+ ** See the License for the specific language governing permissions and

+ ** limitations under the License.

+ */

+/*******************************************************************************

+	File:		bitenc.h

+

+	Content:	Bitstream encoder structure and functions

+

+*******************************************************************************/
+
+#ifndef _BITENC_H
+#define _BITENC_H
+
+#include "qc_data.h"
+#include "tns.h"
+#include "channel_map.h"
+#include "interface.h"  
+
+struct BITSTREAMENCODER_INIT
+{
+  Word16 nChannels;
+  Word32 bitrate;
+  Word32 sampleRate;
+  Word16 profile;
+};
+
+
+
+Word16 WriteBitstream (HANDLE_BIT_BUF hBitstream,
+                       ELEMENT_INFO elInfo,
+                       QC_OUT *qcOut,
+                       PSY_OUT *psyOut,
+                       Word16 *globUsedBits,

+                       const UWord8 *ancBytes,

+					   Word16 samplerate
+                       );
+
+#endif /* _BITENC_H */
diff --git a/media/libstagefright/codecs/aacenc/inc/block_switch.h b/media/libstagefright/codecs/aacenc/inc/block_switch.h
new file mode 100644
index 0000000..3e35819
--- /dev/null
+++ b/media/libstagefright/codecs/aacenc/inc/block_switch.h
@@ -0,0 +1,72 @@
+/*

+ ** Copyright 2003-2010, VisualOn, Inc.

+ **

+ ** Licensed under the Apache License, Version 2.0 (the "License");

+ ** you may not use this file except in compliance with the License.

+ ** You may obtain a copy of the License at

+ **

+ **     http://www.apache.org/licenses/LICENSE-2.0

+ **

+ ** Unless required by applicable law or agreed to in writing, software

+ ** distributed under the License is distributed on an "AS IS" BASIS,

+ ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

+ ** See the License for the specific language governing permissions and

+ ** limitations under the License.

+ */

+/*******************************************************************************

+	File:		block_switch.h

+

+	Content:	Block switching structure and functions

+

+*******************************************************************************/
+
+#ifndef _BLOCK_SWITCH_H
+#define _BLOCK_SWITCH_H
+
+#include "typedef.h"
+
+
+/****************** Defines ******************************/
+#define BLOCK_SWITCHING_IIR_LEN 2                                           /* Length of HighPass-FIR-Filter for Attack-Detection */
+#define BLOCK_SWITCH_WINDOWS TRANS_FAC                                      /* number of windows for energy calculation */
+#define BLOCK_SWITCH_WINDOW_LEN FRAME_LEN_SHORT                             /* minimal granularity of energy calculation */
+
+
+
+/****************** Structures ***************************/
+typedef struct{
+  Word32 invAttackRatio;
+  Word16 windowSequence;
+  Word16 nextwindowSequence;
+  Flag attack;
+  Flag lastattack;
+  Word16 attackIndex;
+  Word16 lastAttackIndex;
+  Word16 noOfGroups;
+  Word16 groupLen[TRANS_FAC];
+  Word32 windowNrg[2][BLOCK_SWITCH_WINDOWS];     /* time signal energy in Subwindows (last and current) */
+  Word32 windowNrgF[2][BLOCK_SWITCH_WINDOWS];    /* filtered time signal energy in segments (last and current) */
+  Word32 iirStates[BLOCK_SWITCHING_IIR_LEN];     /* filter delay-line */
+  Word32 maxWindowNrg;                           /* max energy in subwindows */
+  Word32 accWindowNrg;                           /* recursively accumulated windowNrgF */
+}BLOCK_SWITCHING_CONTROL;
+
+
+
+
+
+Word16 InitBlockSwitching(BLOCK_SWITCHING_CONTROL *blockSwitchingControl,
+                          const Word32 bitRate, const Word16 nChannels);
+
+Word16 BlockSwitching(BLOCK_SWITCHING_CONTROL *blockSwitchingControl,
+                      Word16 *timeSignal,
+					  Word32  sampleRate,
+                      Word16 chIncrement);
+
+Word16 SyncBlockSwitching(BLOCK_SWITCHING_CONTROL *blockSwitchingControlLeft,
+                          BLOCK_SWITCHING_CONTROL *blockSwitchingControlRight,
+                          const Word16 noOfChannels);
+
+
+
+#endif  /* #ifndef _BLOCK_SWITCH_H */
diff --git a/media/libstagefright/codecs/aacenc/inc/channel_map.h b/media/libstagefright/codecs/aacenc/inc/channel_map.h
new file mode 100644
index 0000000..e3aa8dc
--- /dev/null
+++ b/media/libstagefright/codecs/aacenc/inc/channel_map.h
@@ -0,0 +1,37 @@
+/*

+ ** Copyright 2003-2010, VisualOn, Inc.

+ **

+ ** Licensed under the Apache License, Version 2.0 (the "License");

+ ** you may not use this file except in compliance with the License.

+ ** You may obtain a copy of the License at

+ **

+ **     http://www.apache.org/licenses/LICENSE-2.0

+ **

+ ** Unless required by applicable law or agreed to in writing, software

+ ** distributed under the License is distributed on an "AS IS" BASIS,

+ ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

+ ** See the License for the specific language governing permissions and

+ ** limitations under the License.

+ */

+/*******************************************************************************

+	File:		channel_map.h

+

+	Content:	channel mapping functions

+

+*******************************************************************************/
+
+#ifndef _CHANNEL_MAP_H
+#define _CHANNEL_MAP_H
+
+#include "psy_const.h"
+#include "qc_data.h"
+
+Word16 InitElementInfo (Word16 nChannels, ELEMENT_INFO* elInfo);
+
+Word16 InitElementBits(ELEMENT_BITS *elementBits,
+                       ELEMENT_INFO elInfo,
+                       Word32 bitrateTot,
+                       Word16 averageBitsTot,
+                       Word16 staticBitsTot);
+
+#endif /* CHANNEL_MAP_H */
diff --git a/media/libstagefright/codecs/aacenc/inc/config.h b/media/libstagefright/codecs/aacenc/inc/config.h
new file mode 100644
index 0000000..6211c8f
--- /dev/null
+++ b/media/libstagefright/codecs/aacenc/inc/config.h
@@ -0,0 +1,36 @@
+/*

+ ** Copyright 2003-2010, VisualOn, Inc.

+ **

+ ** Licensed under the Apache License, Version 2.0 (the "License");

+ ** you may not use this file except in compliance with the License.

+ ** You may obtain a copy of the License at

+ **

+ **     http://www.apache.org/licenses/LICENSE-2.0

+ **

+ ** Unless required by applicable law or agreed to in writing, software

+ ** distributed under the License is distributed on an "AS IS" BASIS,

+ ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

+ ** See the License for the specific language governing permissions and

+ ** limitations under the License.

+ */

+/*******************************************************************************

+	File:		config.h

+

+	Content:	aac encoder parameter

+

+*******************************************************************************/

+

+#ifndef _AACENC_CONFIG_H_

+#define _AACENC_CONFIG_H_

+

+#define MAX_CHANNELS        2

+

+#define AACENC_BLOCKSIZE    1024   /*! encoder only takes BLOCKSIZE samples at a time */

+#define AACENC_TRANS_FAC    8      /*! encoder short long ratio */

+

+

+#define MAXBITS_COEF		6144
+#define MINBITS_COEF		744

+

+

+#endif
\ No newline at end of file
diff --git a/media/libstagefright/codecs/aacenc/inc/dyn_bits.h b/media/libstagefright/codecs/aacenc/inc/dyn_bits.h
new file mode 100644
index 0000000..0468fa2
--- /dev/null
+++ b/media/libstagefright/codecs/aacenc/inc/dyn_bits.h
@@ -0,0 +1,82 @@
+/*

+ ** Copyright 2003-2010, VisualOn, Inc.

+ **

+ ** Licensed under the Apache License, Version 2.0 (the "License");

+ ** you may not use this file except in compliance with the License.

+ ** You may obtain a copy of the License at

+ **

+ **     http://www.apache.org/licenses/LICENSE-2.0

+ **

+ ** Unless required by applicable law or agreed to in writing, software

+ ** distributed under the License is distributed on an "AS IS" BASIS,

+ ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

+ ** See the License for the specific language governing permissions and

+ ** limitations under the License.

+ */

+/*******************************************************************************

+	File:		dyn_bits.h

+

+	Content:	Noiseless coder module structure and functions

+

+*******************************************************************************/
+
+#ifndef __DYN_BITS_H
+#define __DYN_BITS_H
+
+#include "psy_const.h"
+#include "tns.h"
+#include "bit_cnt.h"
+
+
+
+#define MAX_SECTIONS          MAX_GROUPED_SFB
+#define SECT_ESC_VAL_LONG    31
+#define SECT_ESC_VAL_SHORT    7
+#define CODE_BOOK_BITS        4
+#define SECT_BITS_LONG        5
+#define SECT_BITS_SHORT       3
+
+typedef struct
+{
+  Word16 codeBook;
+  Word16 sfbStart;
+  Word16 sfbCnt;
+  Word16 sectionBits;
+}
+SECTION_INFO;
+
+
+
+
+typedef struct
+{
+  Word16 blockType;
+  Word16 noOfGroups;
+  Word16 sfbCnt;
+  Word16 maxSfbPerGroup;
+  Word16 sfbPerGroup;
+  Word16 noOfSections;
+  SECTION_INFO sectionInfo[MAX_SECTIONS];
+  Word16 sideInfoBits;             /* sectioning bits       */
+  Word16 huffmanBits;              /* huffman    coded bits */
+  Word16 scalefacBits;             /* scalefac   coded bits */
+  Word16 firstScf;                 /* first scf to be coded */
+  Word16 bitLookUp[MAX_SFB_LONG*(CODE_BOOK_ESC_NDX+1)];
+  Word16 mergeGainLookUp[MAX_SFB_LONG];
+}
+SECTION_DATA; /*  Word16 size: 10 + 60(MAX_SECTIONS)*4(SECTION_INFO) + 51(MAX_SFB_LONG)*12(CODE_BOOK_ESC_NDX+1) + 51(MAX_SFB_LONG) = 913 */
+
+
+Word16 BCInit(void);
+
+Word16 dynBitCount(const Word16 *quantSpectrum,
+                   const UWord16 *maxValueInSfb,
+                   const Word16 *scalefac,
+                   const Word16 blockType,
+                   const Word16 sfbCnt,
+                   const Word16 maxSfbPerGroup,
+                   const Word16 sfbPerGroup,
+                   const Word16 *sfbOffset,
+                   SECTION_DATA *sectionData);
+
+#endif
diff --git a/media/libstagefright/codecs/aacenc/inc/grp_data.h b/media/libstagefright/codecs/aacenc/inc/grp_data.h
new file mode 100644
index 0000000..9666577
--- /dev/null
+++ b/media/libstagefright/codecs/aacenc/inc/grp_data.h
@@ -0,0 +1,44 @@
+/*

+ ** Copyright 2003-2010, VisualOn, Inc.

+ **

+ ** Licensed under the Apache License, Version 2.0 (the "License");

+ ** you may not use this file except in compliance with the License.

+ ** You may obtain a copy of the License at

+ **

+ **     http://www.apache.org/licenses/LICENSE-2.0

+ **

+ ** Unless required by applicable law or agreed to in writing, software

+ ** distributed under the License is distributed on an "AS IS" BASIS,

+ ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

+ ** See the License for the specific language governing permissions and

+ ** limitations under the License.

+ */

+/*******************************************************************************

+	File:		grp_data.h

+

+	Content:	Short block grouping function

+

+*******************************************************************************/
+
+#ifndef __GRP_DATA_H__
+#define __GRP_DATA_H__
+#include "psy_data.h"
+#include "typedefs.h"
+
+void
+groupShortData(Word32        *mdctSpectrum,
+               Word32        *tmpSpectrum,
+               SFB_THRESHOLD *sfbThreshold,
+               SFB_ENERGY    *sfbEnergy,
+               SFB_ENERGY    *sfbEnergyMS,
+               SFB_ENERGY    *sfbSpreadedEnergy,
+               const Word16   sfbCnt,
+               const Word16  *sfbOffset,
+               const Word16  *sfbMinSnr,
+               Word16        *groupedSfbOffset,
+               Word16        *maxSfbPerGroup,
+               Word16        *groupedSfbMinSnr,
+               const Word16   noOfGroups,
+               const Word16  *groupLen);
+
+#endif /* _INTERFACE_H */
diff --git a/media/libstagefright/codecs/aacenc/inc/interface.h b/media/libstagefright/codecs/aacenc/inc/interface.h
new file mode 100644
index 0000000..b84334a
--- /dev/null
+++ b/media/libstagefright/codecs/aacenc/inc/interface.h
@@ -0,0 +1,106 @@
+/*

+ ** Copyright 2003-2010, VisualOn, Inc.

+ **

+ ** Licensed under the Apache License, Version 2.0 (the "License");

+ ** you may not use this file except in compliance with the License.

+ ** You may obtain a copy of the License at

+ **

+ **     http://www.apache.org/licenses/LICENSE-2.0

+ **

+ ** Unless required by applicable law or agreed to in writing, software

+ ** distributed under the License is distributed on an "AS IS" BASIS,

+ ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

+ ** See the License for the specific language governing permissions and

+ ** limitations under the License.

+ */

+/*******************************************************************************

+	File:		interface.h

+

+	Content:	psychoaccoustic/quantizer structures and interface

+

+*******************************************************************************/
+
+#ifndef _INTERFACE_H
+#define _INTERFACE_H
+
+#include "config.h"

+#include "psy_const.h"
+#include "psy_data.h"
+#include "typedefs.h"
+
+
+enum
+{
+  MS_NONE = 0,
+  MS_SOME = 1,
+  MS_ALL  = 2
+};
+
+enum
+{
+  MS_ON = 1
+};
+
+struct TOOLSINFO {
+  Word16 msDigest;
+  Word16 msMask[MAX_GROUPED_SFB];
+};
+
+
+typedef struct {
+  Word16  sfbCnt;
+  Word16  sfbPerGroup;
+  Word16  maxSfbPerGroup;
+  Word16  windowSequence;
+  Word16  windowShape;
+  Word16  groupingMask;
+  Word16  sfbOffsets[MAX_GROUPED_SFB+1];
+  Word16  mdctScale; 
+  Word32 *sfbEnergy; 
+  Word32 *sfbSpreadedEnergy;
+  Word32 *sfbThreshold;       
+  Word32 *mdctSpectrum;        
+  Word32  sfbEnSumLR;
+  Word32  sfbEnSumMS;
+  Word32 sfbDist[MAX_GROUPED_SFB];
+  Word32 sfbDistNew[MAX_GROUPED_SFB];
+  Word16  sfbMinSnr[MAX_GROUPED_SFB];
+  Word16 minSfMaxQuant[MAX_GROUPED_SFB];
+  Word16 minScfCalculated[MAX_GROUPED_SFB];
+  Word16 prevScfLast[MAX_GROUPED_SFB];
+  Word16 prevScfNext[MAX_GROUPED_SFB];
+  Word16 deltaPeLast[MAX_GROUPED_SFB];
+  TNS_INFO tnsInfo;
+} PSY_OUT_CHANNEL; /* Word16 size: 14 + 60(MAX_GROUPED_SFB) + 112(TNS_INFO) = 186 */
+
+typedef struct {
+  struct TOOLSINFO toolsInfo;
+  Word16 groupedSfbOffset[MAX_CHANNELS][MAX_GROUPED_SFB+1];  /* plus one for last dummy offset ! */
+  Word16 groupedSfbMinSnr[MAX_CHANNELS][MAX_GROUPED_SFB];
+} PSY_OUT_ELEMENT;
+
+typedef struct {
+  /* information shared by both channels  */
+  PSY_OUT_ELEMENT  psyOutElement;
+  /* information specific to each channel */
+  PSY_OUT_CHANNEL  psyOutChannel[MAX_CHANNELS];
+}PSY_OUT;
+
+void BuildInterface(Word32                 *mdctSpectrum,
+                    const Word16            mdctScale,
+                    SFB_THRESHOLD          *sfbThreshold,
+                    SFB_ENERGY             *sfbEnergy,
+                    SFB_ENERGY             *sfbSpreadedEnergy,
+                    const SFB_ENERGY_SUM    sfbEnergySumLR,
+                    const SFB_ENERGY_SUM    sfbEnergySumMS,
+                    const Word16            windowSequence,
+                    const Word16            windowShape,
+                    const Word16            sfbCnt,
+                    const Word16           *sfbOffset,
+                    const Word16            maxSfbPerGroup,
+                    const Word16           *groupedSfbMinSnr,
+                    const Word16            noOfGroups,
+                    const Word16           *groupLen,
+                    PSY_OUT_CHANNEL        *psyOutCh);
+
+#endif /* _INTERFACE_H */
diff --git a/media/libstagefright/codecs/aacenc/inc/line_pe.h b/media/libstagefright/codecs/aacenc/inc/line_pe.h
new file mode 100644
index 0000000..fed938b
--- /dev/null
+++ b/media/libstagefright/codecs/aacenc/inc/line_pe.h
@@ -0,0 +1,75 @@
+/*

+ ** Copyright 2003-2010, VisualOn, Inc.

+ **

+ ** Licensed under the Apache License, Version 2.0 (the "License");

+ ** you may not use this file except in compliance with the License.

+ ** You may obtain a copy of the License at

+ **

+ **     http://www.apache.org/licenses/LICENSE-2.0

+ **

+ ** Unless required by applicable law or agreed to in writing, software

+ ** distributed under the License is distributed on an "AS IS" BASIS,

+ ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

+ ** See the License for the specific language governing permissions and

+ ** limitations under the License.

+ */

+/*******************************************************************************

+	File:		line_pe.h

+

+	Content:	Perceptual entropie module structure and functions

+

+*******************************************************************************/
+
+#ifndef __LINE_PE_H
+#define __LINE_PE_H
+
+
+#include "psy_const.h" 
+#include "interface.h" 
+
+
+typedef struct {
+   Word16 sfbLdEnergy[MAX_GROUPED_SFB];     /* 4*log(sfbEnergy)/log(2) */
+   Word16 sfbNLines4[MAX_GROUPED_SFB];      /* 4*number of relevant lines in sfb */
+   Word16 sfbPe[MAX_GROUPED_SFB];           /* pe for each sfb */
+   Word16 sfbConstPart[MAX_GROUPED_SFB];    /* constant part for each sfb */
+   Word16 sfbNActiveLines[MAX_GROUPED_SFB]; /* number of active lines in sfb */
+   Word16 pe;                               /* sum of sfbPe */
+   Word16 constPart;                        /* sum of sfbConstPart */
+   Word16 nActiveLines;                     /* sum of sfbNActiveLines */
+} PE_CHANNEL_DATA; /* size Word16: 303 */
+
+
+typedef struct {
+   PE_CHANNEL_DATA peChannelData[MAX_CHANNELS];
+   Word16 pe;
+   Word16 constPart;
+   Word16 nActiveLines;
+   Word16 offset;
+   Word16 ahFlag[MAX_CHANNELS][MAX_GROUPED_SFB];
+   Word32 thrExp[MAX_CHANNELS][MAX_GROUPED_SFB];
+   Word32 sfbPeFactors[MAX_CHANNELS][MAX_GROUPED_SFB];
+} PE_DATA; /* size Word16: 303 + 4 + 120 + 240 = 667 */
+
+
+
+
+void prepareSfbPe(PE_DATA *peData,
+                  PSY_OUT_CHANNEL  psyOutChannel[MAX_CHANNELS],
+                  Word16 logSfbEnergy[MAX_CHANNELS][MAX_GROUPED_SFB],
+                  Word16 sfbNRelevantLines[MAX_CHANNELS][MAX_GROUPED_SFB],
+                  const Word16 nChannels,
+                  const Word16 peOffset);
+
+
+
+
+
+void calcSfbPe(PE_DATA *peData,
+               PSY_OUT_CHANNEL psyOutChannel[MAX_CHANNELS],
+               const Word16 nChannels);
+
+
+
+
+#endif 
diff --git a/media/libstagefright/codecs/aacenc/inc/memalign.h b/media/libstagefright/codecs/aacenc/inc/memalign.h
new file mode 100644
index 0000000..3b302a7
--- /dev/null
+++ b/media/libstagefright/codecs/aacenc/inc/memalign.h
@@ -0,0 +1,35 @@
+/*

+ ** Copyright 2003-2010, VisualOn, Inc.

+ **

+ ** Licensed under the Apache License, Version 2.0 (the "License");

+ ** you may not use this file except in compliance with the License.

+ ** You may obtain a copy of the License at

+ **

+ **     http://www.apache.org/licenses/LICENSE-2.0

+ **

+ ** Unless required by applicable law or agreed to in writing, software

+ ** distributed under the License is distributed on an "AS IS" BASIS,

+ ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

+ ** See the License for the specific language governing permissions and

+ ** limitations under the License.

+ */

+/*******************************************************************************

+	File:		memalign.h

+

+	Content:	Memory alloc alignments functions

+

+*******************************************************************************/

+

+#ifndef __VO_AACENC_MEM_ALIGN_H__

+#define __VO_AACENC_MEM_ALIGN_H__

+

+#include "voMem.h"

+#include "typedef.h"

+

+extern void *mem_malloc(VO_MEM_OPERATOR *pMemop, unsigned int size, unsigned char alignment, unsigned int CodecID);

+extern void mem_free(VO_MEM_OPERATOR *pMemop, void *mem_ptr, unsigned int CodecID);

+

+#endif	/* __VO_MEM_ALIGN_H__ */

+

+

+

diff --git a/media/libstagefright/codecs/aacenc/inc/ms_stereo.h b/media/libstagefright/codecs/aacenc/inc/ms_stereo.h
new file mode 100644
index 0000000..6d43dec8
--- /dev/null
+++ b/media/libstagefright/codecs/aacenc/inc/ms_stereo.h
@@ -0,0 +1,45 @@
+/*

+ ** Copyright 2003-2010, VisualOn, Inc.

+ **

+ ** Licensed under the Apache License, Version 2.0 (the "License");

+ ** you may not use this file except in compliance with the License.

+ ** You may obtain a copy of the License at

+ **

+ **     http://www.apache.org/licenses/LICENSE-2.0

+ **

+ ** Unless required by applicable law or agreed to in writing, software

+ ** distributed under the License is distributed on an "AS IS" BASIS,

+ ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

+ ** See the License for the specific language governing permissions and

+ ** limitations under the License.

+ */

+/*******************************************************************************

+	File:		ms_stereo.h

+

+	Content:	Declaration MS stereo processing structure and functions

+

+*******************************************************************************/
+
+#ifndef __MS_STEREO_H__
+#define __MS_STEREO_H__
+#include "typedef.h"
+
+void MsStereoProcessing(Word32       *sfbEnergyLeft,
+                        Word32       *sfbEnergyRight,
+                        const Word32 *sfbEnergyMid,
+                        const Word32 *sfbEnergySide,
+                        Word32       *mdctSpectrumLeft,
+                        Word32       *mdctSpectrumRight,
+                        Word32       *sfbThresholdLeft,
+                        Word32       *sfbThresholdRight,
+                        Word32       *sfbSpreadedEnLeft,
+                        Word32       *sfbSpreadedEnRight,
+                        Word16       *msDigest,
+                        Word16       *msMask,
+                        const Word16  sfbCnt,
+                        const Word16  sfbPerGroup,
+                        const Word16  maxSfbPerGroup,
+                        const Word16 *sfbOffset);
+
+
+#endif
diff --git a/media/libstagefright/codecs/aacenc/inc/pre_echo_control.h b/media/libstagefright/codecs/aacenc/inc/pre_echo_control.h
new file mode 100644
index 0000000..35f36e8
--- /dev/null
+++ b/media/libstagefright/codecs/aacenc/inc/pre_echo_control.h
@@ -0,0 +1,42 @@
+/*

+ ** Copyright 2003-2010, VisualOn, Inc.

+ **

+ ** Licensed under the Apache License, Version 2.0 (the "License");

+ ** you may not use this file except in compliance with the License.

+ ** You may obtain a copy of the License at

+ **

+ **     http://www.apache.org/licenses/LICENSE-2.0

+ **

+ ** Unless required by applicable law or agreed to in writing, software

+ ** distributed under the License is distributed on an "AS IS" BASIS,

+ ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

+ ** See the License for the specific language governing permissions and

+ ** limitations under the License.

+ */

+/*******************************************************************************

+	File:		pre_echo_control.h

+

+	Content:	Pre echo control functions

+

+*******************************************************************************/
+
+#ifndef __PRE_ECHO_CONTROL_H
+#define __PRE_ECHO_CONTROL_H
+
+#include "typedefs.h"
+
+void InitPreEchoControl(Word32 *pbThresholdnm1,
+                        Word16  numPb,
+                        Word32 *pbThresholdQuiet);
+
+
+void PreEchoControl(Word32 *pbThresholdNm1,
+                    Word16  numPb,
+                    Word32  maxAllowedIncreaseFactor,
+                    Word16  minRemainingThresholdFactor,
+                    Word32 *pbThreshold,
+                    Word16  mdctScale,
+                    Word16  mdctScalenm1);
+
+#endif
+
diff --git a/media/libstagefright/codecs/aacenc/inc/psy_configuration.h b/media/libstagefright/codecs/aacenc/inc/psy_configuration.h
new file mode 100644
index 0000000..53cf25b
--- /dev/null
+++ b/media/libstagefright/codecs/aacenc/inc/psy_configuration.h
@@ -0,0 +1,107 @@
+/*

+ ** Copyright 2003-2010, VisualOn, Inc.

+ **

+ ** Licensed under the Apache License, Version 2.0 (the "License");

+ ** you may not use this file except in compliance with the License.

+ ** You may obtain a copy of the License at

+ **

+ **     http://www.apache.org/licenses/LICENSE-2.0

+ **

+ ** Unless required by applicable law or agreed to in writing, software

+ ** distributed under the License is distributed on an "AS IS" BASIS,

+ ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

+ ** See the License for the specific language governing permissions and

+ ** limitations under the License.

+ */

+/*******************************************************************************

+	File:		psy_configuration.h

+

+	Content:	Psychoaccoustic configuration structure and functions

+

+*******************************************************************************/
+
+#ifndef _PSY_CONFIGURATION_H
+#define _PSY_CONFIGURATION_H
+

+#include "typedefs.h"
+#include "psy_const.h"
+#include "tns.h"
+
+typedef struct{
+
+  Word16 sfbCnt;
+  Word16 sfbActive;   /* number of sf bands containing energy after lowpass */
+  Word16 *sfbOffset;
+
+  Word32 sfbThresholdQuiet[MAX_SFB_LONG];
+
+  Word16 maxAllowedIncreaseFactor;   /* preecho control */
+  Word16 minRemainingThresholdFactor;
+
+  Word16 lowpassLine;

+  Word16 sampRateIdx;
+  Word32 clipEnergy;                 /* for level dependend tmn */
+
+  Word16 ratio;
+  Word16 sfbMaskLowFactor[MAX_SFB_LONG];
+  Word16 sfbMaskHighFactor[MAX_SFB_LONG];
+
+  Word16 sfbMaskLowFactorSprEn[MAX_SFB_LONG];
+  Word16 sfbMaskHighFactorSprEn[MAX_SFB_LONG];
+
+
+  Word16 sfbMinSnr[MAX_SFB_LONG];       /* minimum snr (formerly known as bmax) */
+
+  TNS_CONFIG tnsConf;
+
+}PSY_CONFIGURATION_LONG; /*Word16 size: 8 + 52 + 102 + 51 + 51 + 51 + 51 + 47 = 515 */
+
+
+typedef struct{
+
+  Word16 sfbCnt;
+  Word16 sfbActive;   /* number of sf bands containing energy after lowpass */
+  Word16 *sfbOffset;
+
+  Word32 sfbThresholdQuiet[MAX_SFB_SHORT];
+
+  Word16 maxAllowedIncreaseFactor;   /* preecho control */
+  Word16 minRemainingThresholdFactor;
+
+  Word16 lowpassLine;

+  Word16 sampRateIdx;
+  Word32 clipEnergy;                 /* for level dependend tmn */
+
+  Word16 ratio;
+  Word16 sfbMaskLowFactor[MAX_SFB_SHORT];
+  Word16 sfbMaskHighFactor[MAX_SFB_SHORT];
+
+  Word16 sfbMaskLowFactorSprEn[MAX_SFB_SHORT];
+  Word16 sfbMaskHighFactorSprEn[MAX_SFB_SHORT];
+
+
+  Word16 sfbMinSnr[MAX_SFB_SHORT];       /* minimum snr (formerly known as bmax) */
+
+  TNS_CONFIG tnsConf;
+
+}PSY_CONFIGURATION_SHORT; /*Word16 size: 8 + 16 + 16 + 16 + 16 + 16 + 16 + 16 + 47 = 167 */
+

+

+/* Returns the sample rate index */

+Word32 GetSRIndex(Word32 sampleRate);

+
+
+Word16 InitPsyConfigurationLong(Word32 bitrate,
+                                Word32 samplerate,
+                                Word16 bandwidth,
+                                PSY_CONFIGURATION_LONG *psyConf);
+
+Word16 InitPsyConfigurationShort(Word32 bitrate,
+                                 Word32 samplerate,
+                                 Word16 bandwidth,
+                                 PSY_CONFIGURATION_SHORT *psyConf);
+
+#endif /* _PSY_CONFIGURATION_H */
+
+
+
diff --git a/media/libstagefright/codecs/aacenc/inc/psy_const.h b/media/libstagefright/codecs/aacenc/inc/psy_const.h
new file mode 100644
index 0000000..5455ab1
--- /dev/null
+++ b/media/libstagefright/codecs/aacenc/inc/psy_const.h
@@ -0,0 +1,80 @@
+/*

+ ** Copyright 2003-2010, VisualOn, Inc.

+ **

+ ** Licensed under the Apache License, Version 2.0 (the "License");

+ ** you may not use this file except in compliance with the License.

+ ** You may obtain a copy of the License at

+ **

+ **     http://www.apache.org/licenses/LICENSE-2.0

+ **

+ ** Unless required by applicable law or agreed to in writing, software

+ ** distributed under the License is distributed on an "AS IS" BASIS,

+ ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

+ ** See the License for the specific language governing permissions and

+ ** limitations under the License.

+ */

+/*******************************************************************************

+	File:		psy_const.h

+

+	Content:	Global psychoacoustic constants structures

+

+*******************************************************************************/
+
+#ifndef _PSYCONST_H
+#define _PSYCONST_H
+
+#include "config.h"

+
+#define TRUE  1
+#define FALSE 0
+
+#define FRAME_LEN_LONG    AACENC_BLOCKSIZE
+#define TRANS_FAC         8
+#define FRAME_LEN_SHORT   (FRAME_LEN_LONG/TRANS_FAC)

+

+
+
+/* Block types */
+enum
+{
+  LONG_WINDOW = 0,
+  START_WINDOW,
+  SHORT_WINDOW,
+  STOP_WINDOW
+};
+
+/* Window shapes */
+enum
+{
+  SINE_WINDOW = 0,
+  KBD_WINDOW  = 1
+};
+
+/*
+  MS stuff
+*/
+enum
+{
+  SI_MS_MASK_NONE = 0,
+  SI_MS_MASK_SOME = 1,
+  SI_MS_MASK_ALL  = 2
+};
+
+#define MAX_NO_OF_GROUPS 4
+#define MAX_SFB_SHORT   15  /* 15 for a memory optimized implementation, maybe 16 for convenient debugging */
+#define MAX_SFB_LONG    51  /* 51 for a memory optimized implementation, maybe 64 for convenient debugging */
+#define MAX_SFB         (MAX_SFB_SHORT > MAX_SFB_LONG ? MAX_SFB_SHORT : MAX_SFB_LONG)   /* = MAX_SFB_LONG */
+#define MAX_GROUPED_SFB (MAX_NO_OF_GROUPS*MAX_SFB_SHORT > MAX_SFB_LONG ? \
+                         MAX_NO_OF_GROUPS*MAX_SFB_SHORT : MAX_SFB_LONG)
+
+#define BLOCK_SWITCHING_OFFSET		   (1*1024+3*128+64+128)
+#define BLOCK_SWITCHING_DATA_SIZE          FRAME_LEN_LONG
+										    
+#define TRANSFORM_OFFSET_LONG    0
+#define TRANSFORM_OFFSET_SHORT   448
+
+#define LOG_NORM_PCM          -15
+

+#define NUM_SAMPLE_RATES	12
+
+#endif /* _PSYCONST_H */
diff --git a/media/libstagefright/codecs/aacenc/inc/psy_data.h b/media/libstagefright/codecs/aacenc/inc/psy_data.h
new file mode 100644
index 0000000..1412d53
--- /dev/null
+++ b/media/libstagefright/codecs/aacenc/inc/psy_data.h
@@ -0,0 +1,66 @@
+/*

+ ** Copyright 2003-2010, VisualOn, Inc.

+ **

+ ** Licensed under the Apache License, Version 2.0 (the "License");

+ ** you may not use this file except in compliance with the License.

+ ** You may obtain a copy of the License at

+ **

+ **     http://www.apache.org/licenses/LICENSE-2.0

+ **

+ ** Unless required by applicable law or agreed to in writing, software

+ ** distributed under the License is distributed on an "AS IS" BASIS,

+ ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

+ ** See the License for the specific language governing permissions and

+ ** limitations under the License.

+ */

+/*******************************************************************************

+	File:		psy_data.h

+

+	Content:	Psychoacoustic data and structures

+

+*******************************************************************************/
+
+#ifndef _PSY_DATA_H
+#define _PSY_DATA_H
+
+#include "block_switch.h"
+#include "tns.h"
+
+/*
+  the structs can be implemented as unions
+*/
+
+typedef struct{
+  Word32 sfbLong[MAX_GROUPED_SFB];
+  Word32 sfbShort[TRANS_FAC][MAX_SFB_SHORT];
+}SFB_THRESHOLD; /* Word16 size: 260 */
+
+typedef struct{
+  Word32 sfbLong[MAX_GROUPED_SFB];
+  Word32 sfbShort[TRANS_FAC][MAX_SFB_SHORT];
+}SFB_ENERGY; /* Word16 size: 260 */
+
+typedef struct{
+  Word32 sfbLong;
+  Word32 sfbShort[TRANS_FAC];
+}SFB_ENERGY_SUM; /* Word16 size: 18 */
+
+
+typedef struct{
+  BLOCK_SWITCHING_CONTROL   blockSwitchingControl;          /* block switching */
+  Word16                    *mdctDelayBuffer;               /* mdct delay buffer [BLOCK_SWITCHING_OFFSET]*/
+  Word32                    sfbThresholdnm1[MAX_SFB];       /* PreEchoControl */
+  Word16                    mdctScalenm1;                   /* scale of last block's mdct (PreEchoControl) */
+
+  SFB_THRESHOLD             sfbThreshold;                   /* adapt           */
+  SFB_ENERGY                sfbEnergy;                      /* sfb Energy      */
+  SFB_ENERGY                sfbEnergyMS;
+  SFB_ENERGY_SUM            sfbEnergySum;
+  SFB_ENERGY_SUM            sfbEnergySumMS;
+  SFB_ENERGY                sfbSpreadedEnergy;
+
+  Word32                    *mdctSpectrum;                  /* mdct spectrum [FRAME_LEN_LONG] */
+  Word16                    mdctScale;                      /* scale of mdct   */
+}PSY_DATA; /* Word16 size: 4 + 87 + 102 + 360 + 360 + 360 + 18 + 18 + 360 = 1669 */
+
+#endif /* _PSY_DATA_H */
diff --git a/media/libstagefright/codecs/aacenc/inc/psy_main.h b/media/libstagefright/codecs/aacenc/inc/psy_main.h
new file mode 100644
index 0000000..ab0b8b1
--- /dev/null
+++ b/media/libstagefright/codecs/aacenc/inc/psy_main.h
@@ -0,0 +1,69 @@
+/*

+ ** Copyright 2003-2010, VisualOn, Inc.

+ **

+ ** Licensed under the Apache License, Version 2.0 (the "License");

+ ** you may not use this file except in compliance with the License.

+ ** You may obtain a copy of the License at

+ **

+ **     http://www.apache.org/licenses/LICENSE-2.0

+ **

+ ** Unless required by applicable law or agreed to in writing, software

+ ** distributed under the License is distributed on an "AS IS" BASIS,

+ ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

+ ** See the License for the specific language governing permissions and

+ ** limitations under the License.

+ */

+/*******************************************************************************

+	File:		psy_main.h

+

+	Content:	Psychoacoustic major function block

+

+*******************************************************************************/
+
+#ifndef _PSYMAIN_H
+#define _PSYMAIN_H
+
+#include "psy_configuration.h"
+#include "qc_data.h"
+#include "memalign.h"
+
+/*
+  psy kernel
+*/
+typedef struct  {
+  PSY_CONFIGURATION_LONG  psyConfLong;           /* Word16 size: 515 */
+  PSY_CONFIGURATION_SHORT psyConfShort;          /* Word16 size: 167 */
+  PSY_DATA                psyData[MAX_CHANNELS]; /* Word16 size: MAX_CHANNELS*1669*/
+  TNS_DATA                tnsData[MAX_CHANNELS]; /* Word16 size: MAX_CHANNELS*235 */
+  Word32*                 pScratchTns;

+  Word16				  sampleRateIdx;
+}PSY_KERNEL; /* Word16 size: 2587 / 4491 */
+
+
+Word16 PsyNew( PSY_KERNEL  *hPsy, Word32 nChan, VO_MEM_OPERATOR *pMemOP);
+Word16 PsyDelete( PSY_KERNEL  *hPsy, VO_MEM_OPERATOR *pMemOP);
+
+Word16 PsyOutNew( PSY_OUT *hPsyOut, VO_MEM_OPERATOR *pMemOP);
+Word16 PsyOutDelete( PSY_OUT *hPsyOut, VO_MEM_OPERATOR *pMemOP);
+
+Word16 psyMainInit( PSY_KERNEL *hPsy,
+                    Word32 sampleRate,
+                    Word32 bitRate,
+                    Word16 channels,
+                    Word16 tnsMask,
+                    Word16 bandwidth);
+
+
+Word16 psyMain(Word16                   nChannels,   /*!< total number of channels */              
+               ELEMENT_INFO             *elemInfo,
+               Word16                   *timeSignal, /*!< interleaved time signal */ 
+               PSY_DATA                 psyData[MAX_CHANNELS],
+               TNS_DATA                 tnsData[MAX_CHANNELS],
+               PSY_CONFIGURATION_LONG*  psyConfLong,
+               PSY_CONFIGURATION_SHORT* psyConfShort,
+               PSY_OUT_CHANNEL          psyOutChannel[MAX_CHANNELS],
+               PSY_OUT_ELEMENT          *psyOutElement,
+               Word32                   *pScratchTns,
+			   Word32					sampleRate);
+
+#endif /* _PSYMAIN_H */
diff --git a/media/libstagefright/codecs/aacenc/inc/qc_data.h b/media/libstagefright/codecs/aacenc/inc/qc_data.h
new file mode 100644
index 0000000..81d4051
--- /dev/null
+++ b/media/libstagefright/codecs/aacenc/inc/qc_data.h
@@ -0,0 +1,143 @@
+/*

+ ** Copyright 2003-2010, VisualOn, Inc.

+ **

+ ** Licensed under the Apache License, Version 2.0 (the "License");

+ ** you may not use this file except in compliance with the License.

+ ** You may obtain a copy of the License at

+ **

+ **     http://www.apache.org/licenses/LICENSE-2.0

+ **

+ ** Unless required by applicable law or agreed to in writing, software

+ ** distributed under the License is distributed on an "AS IS" BASIS,

+ ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

+ ** See the License for the specific language governing permissions and

+ ** limitations under the License.

+ */

+/*******************************************************************************

+	File:		qc_data.h

+

+	Content:	Quantizing & coding structures

+

+*******************************************************************************/
+
+#ifndef _QC_DATA_H
+#define _QC_DATA_H
+
+#include "psy_const.h"
+#include "dyn_bits.h"
+#include "adj_thr_data.h"
+
+
+#define MAX_MODES 10
+
+typedef enum {
+  MODE_INVALID = 0,
+  MODE_1,        /* mono      */
+  MODE_1_1,      /* dual mono */
+  MODE_2         /* stereo    */
+} ENCODER_MODE;
+
+typedef enum {
+  ID_SCE=0,     /* Single Channel Element   */
+  ID_CPE=1,     /* Channel Pair Element     */
+  ID_CCE=2,     /* Coupling Channel Element */
+  ID_LFE=3,     /* LFE Channel Element      */
+  ID_DSE=4,     /* current one DSE element for ancillary is supported */
+  ID_PCE=5,
+  ID_FIL=6,
+  ID_END=7
+}ELEMENT_TYPE;
+
+typedef struct {
+  ELEMENT_TYPE elType;
+  Word16 instanceTag;
+  Word16 nChannelsInEl;
+  Word16 ChannelIndex[MAX_CHANNELS];
+} ELEMENT_INFO;
+
+typedef struct {
+  Word32 paddingRest;
+} PADDING;
+
+
+/* Quantizing & coding stage */
+
+struct QC_INIT{
+  ELEMENT_INFO *elInfo;
+  Word16 maxBits;     /* maximum number of bits in reservoir  */
+  Word16 averageBits; /* average number of bits we should use */
+  Word16 bitRes;
+  Word16 meanPe;
+  Word32 chBitrate;
+  Word16 maxBitFac;
+  Word32 bitrate;
+
+  PADDING padding;
+};
+
+typedef struct
+{
+  Word16          *quantSpec;       /* [FRAME_LEN_LONG];                            */
+  UWord16         *maxValueInSfb;   /* [MAX_GROUPED_SFB];                           */
+  Word16          *scf;             /* [MAX_GROUPED_SFB];                           */
+  Word16          globalGain;
+  Word16          mdctScale;
+  Word16          groupingMask;
+  SECTION_DATA    sectionData;
+  Word16          windowShape;
+} QC_OUT_CHANNEL;
+
+typedef struct
+{
+  Word16		  adtsUsed;

+  Word16          staticBitsUsed; /* for verification purposes */
+  Word16          dynBitsUsed;    /* for verification purposes */
+  Word16          pe;
+  Word16          ancBitsUsed;
+  Word16          fillBits;
+} QC_OUT_ELEMENT;
+
+typedef struct
+{
+  QC_OUT_CHANNEL  qcChannel[MAX_CHANNELS];
+  QC_OUT_ELEMENT  qcElement;
+  Word16          totStaticBitsUsed; /* for verification purposes */
+  Word16          totDynBitsUsed;    /* for verification purposes */
+  Word16          totAncBitsUsed;    /* for verification purposes */
+  Word16          totFillBits;
+  Word16          alignBits;
+  Word16          bitResTot;
+  Word16          averageBitsTot;
+} QC_OUT;
+
+typedef struct {
+  Word32 chBitrate;
+  Word16 averageBits;               /* brutto -> look ancillary.h */
+  Word16 maxBits;
+  Word16 bitResLevel;
+  Word16 maxBitResBits;
+  Word16 relativeBits;            /* Bits relative to total Bits scaled down by 2 */
+} ELEMENT_BITS;
+
+typedef struct
+{
+  /* this is basically struct QC_INIT */
+  Word16 averageBitsTot;
+  Word16 maxBitsTot;
+  Word16 globStatBits;
+  Word16 nChannels;
+  Word16 bitResTot;
+
+  Word16 maxBitFac;
+
+  PADDING   padding;
+
+  ELEMENT_BITS  elementBits;
+  ADJ_THR_STATE adjThr;
+
+  Word16 logSfbFormFactor[MAX_CHANNELS][MAX_GROUPED_SFB];
+  Word16 sfbNRelevantLines[MAX_CHANNELS][MAX_GROUPED_SFB];
+  Word16 logSfbEnergy[MAX_CHANNELS][MAX_GROUPED_SFB];
+} QC_STATE;
+
+#endif /* _QC_DATA_H */
diff --git a/media/libstagefright/codecs/aacenc/inc/qc_main.h b/media/libstagefright/codecs/aacenc/inc/qc_main.h
new file mode 100644
index 0000000..e1138b2
--- /dev/null
+++ b/media/libstagefright/codecs/aacenc/inc/qc_main.h
@@ -0,0 +1,64 @@
+/*

+ ** Copyright 2003-2010, VisualOn, Inc.

+ **

+ ** Licensed under the Apache License, Version 2.0 (the "License");

+ ** you may not use this file except in compliance with the License.

+ ** You may obtain a copy of the License at

+ **

+ **     http://www.apache.org/licenses/LICENSE-2.0

+ **

+ ** Unless required by applicable law or agreed to in writing, software

+ ** distributed under the License is distributed on an "AS IS" BASIS,

+ ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

+ ** See the License for the specific language governing permissions and

+ ** limitations under the License.

+ */

+/*******************************************************************************

+	File:		qc_main.h

+

+	Content:	Quantizing & coding functions

+

+*******************************************************************************/
+
+#ifndef _QC_MAIN_H
+#define _QC_MAIN_H
+
+#include "qc_data.h"
+#include "interface.h"
+#include "memalign.h"
+
+/* Quantizing & coding stage */
+
+Word16 QCOutNew(QC_OUT *hQC, Word16 nChannels, VO_MEM_OPERATOR *pMemOP);
+
+void QCOutDelete(QC_OUT *hQC, VO_MEM_OPERATOR *pMemOP);
+
+Word16 QCNew(QC_STATE *hQC, VO_MEM_OPERATOR *pMemOP);
+
+Word16 QCInit(QC_STATE *hQC, 
+              struct QC_INIT *init);
+
+void QCDelete(QC_STATE *hQC, VO_MEM_OPERATOR *pMemOP);
+
+
+Word16 QCMain(QC_STATE *hQC,
+              ELEMENT_BITS* elBits,
+              ATS_ELEMENT* adjThrStateElement,
+              PSY_OUT_CHANNEL psyOutChannel[MAX_CHANNELS], /* may be modified in-place */
+              PSY_OUT_ELEMENT* psyOutElement,
+              QC_OUT_CHANNEL  qcOutChannel[MAX_CHANNELS],   /* out                      */
+              QC_OUT_ELEMENT* qcOutElement,
+              Word16 nChannels,
+			  Word16 ancillaryDataBytes);     /* returns error code       */
+
+void updateBitres(QC_STATE* qcKernel,
+                  QC_OUT* qcOut);
+
+Word16 FinalizeBitConsumption(QC_STATE *hQC,
+                              QC_OUT* qcOut);
+
+Word16 AdjustBitrate(QC_STATE *hQC,
+                     Word32 bitRate,
+                     Word32 sampleRate);
+
+#endif /* _QC_MAIN_H */
diff --git a/media/libstagefright/codecs/aacenc/inc/quantize.h b/media/libstagefright/codecs/aacenc/inc/quantize.h
new file mode 100644
index 0000000..88a95e1
--- /dev/null
+++ b/media/libstagefright/codecs/aacenc/inc/quantize.h
@@ -0,0 +1,42 @@
+/*

+ ** Copyright 2003-2010, VisualOn, Inc.

+ **

+ ** Licensed under the Apache License, Version 2.0 (the "License");

+ ** you may not use this file except in compliance with the License.

+ ** You may obtain a copy of the License at

+ **

+ **     http://www.apache.org/licenses/LICENSE-2.0

+ **

+ ** Unless required by applicable law or agreed to in writing, software

+ ** distributed under the License is distributed on an "AS IS" BASIS,

+ ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

+ ** See the License for the specific language governing permissions and

+ ** limitations under the License.

+ */

+/*******************************************************************************

+	File:		quantize.h

+

+	Content:	Quantization functions

+

+*******************************************************************************/
+
+#ifndef _QUANTIZE_H_
+#define _QUANTIZE_H_
+#include "typedefs.h"
+
+/* quantizing */
+
+#define MAX_QUANT 8191
+
+void QuantizeSpectrum(Word16 sfbCnt, 
+                      Word16 maxSfbPerGroup,
+                      Word16 sfbPerGroup,
+                      Word16 *sfbOffset, Word32 *mdctSpectrum,
+                      Word16 globalGain, Word16 *scalefactors,
+                      Word16 *quantizedSpectrum);
+
+Word32 calcSfbDist(const Word32 *spec,
+                   Word16  sfbWidth,
+                   Word16  gain);
+
+#endif /* _QUANTIZE_H_ */
diff --git a/media/libstagefright/codecs/aacenc/inc/sf_estim.h b/media/libstagefright/codecs/aacenc/inc/sf_estim.h
new file mode 100644
index 0000000..b25ec3c
--- /dev/null
+++ b/media/libstagefright/codecs/aacenc/inc/sf_estim.h
@@ -0,0 +1,46 @@
+/*

+ ** Copyright 2003-2010, VisualOn, Inc.

+ **

+ ** Licensed under the Apache License, Version 2.0 (the "License");

+ ** you may not use this file except in compliance with the License.

+ ** You may obtain a copy of the License at

+ **

+ **     http://www.apache.org/licenses/LICENSE-2.0

+ **

+ ** Unless required by applicable law or agreed to in writing, software

+ ** distributed under the License is distributed on an "AS IS" BASIS,

+ ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

+ ** See the License for the specific language governing permissions and

+ ** limitations under the License.

+ */

+/*******************************************************************************

+	File:		sf_estim.h

+

+	Content:	Scale factor estimation functions

+

+*******************************************************************************/
+
+#ifndef __SF_ESTIM_H__
+#define __SF_ESTIM_H__
+/*
+   Scale factor estimation 
+ */
+#include "psy_const.h"
+#include "interface.h"
+#include "qc_data.h"
+
+void
+CalcFormFactor(Word16          logSfbFormFactor[MAX_CHANNELS][MAX_GROUPED_SFB],
+               Word16          sfbNRelevantLines[MAX_CHANNELS][MAX_GROUPED_SFB],
+               Word16          logSfbEnergy[MAX_CHANNELS][MAX_GROUPED_SFB],
+               PSY_OUT_CHANNEL psyOutChannel[MAX_CHANNELS],
+               const Word16    nChannels);
+
+void
+EstimateScaleFactors(PSY_OUT_CHANNEL psyOutChannel[MAX_CHANNELS],
+                     QC_OUT_CHANNEL  qcOutChannel[MAX_CHANNELS],
+                     Word16          logSfbEnergy[MAX_CHANNELS][MAX_GROUPED_SFB],
+                     Word16          logSfbFormFactor[MAX_CHANNELS][MAX_GROUPED_SFB],
+                     Word16          sfbNRelevantLines[MAX_CHANNELS][MAX_GROUPED_SFB],
+                     const Word16    nChannels);
+#endif
\ No newline at end of file
diff --git a/media/libstagefright/codecs/aacenc/inc/spreading.h b/media/libstagefright/codecs/aacenc/inc/spreading.h
new file mode 100644
index 0000000..29cf63d
--- /dev/null
+++ b/media/libstagefright/codecs/aacenc/inc/spreading.h
@@ -0,0 +1,33 @@
+/*

+ ** Copyright 2003-2010, VisualOn, Inc.

+ **

+ ** Licensed under the Apache License, Version 2.0 (the "License");

+ ** you may not use this file except in compliance with the License.

+ ** You may obtain a copy of the License at

+ **

+ **     http://www.apache.org/licenses/LICENSE-2.0

+ **

+ ** Unless required by applicable law or agreed to in writing, software

+ ** distributed under the License is distributed on an "AS IS" BASIS,

+ ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

+ ** See the License for the specific language governing permissions and

+ ** limitations under the License.

+ */

+/*******************************************************************************

+	File:		spreading.h

+

+	Content:	Spreading of energy functions

+

+*******************************************************************************/
+
+#ifndef _SPREADING_H
+#define _SPREADING_H
+#include "typedefs.h"
+

+
+void SpreadingMax(const Word16 pbCnt,
+                  const Word16 *maskLowFactor,
+                  const Word16 *maskHighFactor,
+                  Word32       *pbSpreadedEnergy);
+
+#endif /* #ifndef _SPREADING_H */
diff --git a/media/libstagefright/codecs/aacenc/inc/stat_bits.h b/media/libstagefright/codecs/aacenc/inc/stat_bits.h
new file mode 100644
index 0000000..6e90b9c
--- /dev/null
+++ b/media/libstagefright/codecs/aacenc/inc/stat_bits.h
@@ -0,0 +1,34 @@
+/*

+ ** Copyright 2003-2010, VisualOn, Inc.

+ **

+ ** Licensed under the Apache License, Version 2.0 (the "License");

+ ** you may not use this file except in compliance with the License.

+ ** You may obtain a copy of the License at

+ **

+ **     http://www.apache.org/licenses/LICENSE-2.0

+ **

+ ** Unless required by applicable law or agreed to in writing, software

+ ** distributed under the License is distributed on an "AS IS" BASIS,

+ ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

+ ** See the License for the specific language governing permissions and

+ ** limitations under the License.

+ */

+/*******************************************************************************

+	File:		stat_bits.h

+

+	Content:	Static bit counter functions

+

+*******************************************************************************/
+
+#ifndef __STAT_BITS_H
+#define __STAT_BITS_H
+
+#include "psy_const.h"
+#include "interface.h"
+
+Word16 countStaticBitdemand(PSY_OUT_CHANNEL psyOutChannel[MAX_CHANNELS],
+                            PSY_OUT_ELEMENT *psyOutElement,
+                            Word16 nChannels, 

+							Word16 adtsUsed);
+
+#endif /* __STAT_BITS_H */
diff --git a/media/libstagefright/codecs/aacenc/inc/tns.h b/media/libstagefright/codecs/aacenc/inc/tns.h
new file mode 100644
index 0000000..9ffcce9
--- /dev/null
+++ b/media/libstagefright/codecs/aacenc/inc/tns.h
@@ -0,0 +1,108 @@
+/*

+ ** Copyright 2003-2010, VisualOn, Inc.

+ **

+ ** Licensed under the Apache License, Version 2.0 (the "License");

+ ** you may not use this file except in compliance with the License.

+ ** You may obtain a copy of the License at

+ **

+ **     http://www.apache.org/licenses/LICENSE-2.0

+ **

+ ** Unless required by applicable law or agreed to in writing, software

+ ** distributed under the License is distributed on an "AS IS" BASIS,

+ ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

+ ** See the License for the specific language governing permissions and

+ ** limitations under the License.

+ */

+/*******************************************************************************

+	File:		tns.h

+

+	Content:	TNS structures

+

+*******************************************************************************/
+
+#ifndef _TNS_H
+#define _TNS_H
+

+#include "typedef.h"
+#include "psy_const.h"
+
+
+
+#define TNS_MAX_ORDER 12
+#define TNS_MAX_ORDER_SHORT 5
+
+#define FILTER_DIRECTION    0
+
+typedef struct{ /*stuff that is tabulated dependent on bitrate etc. */
+  Word16     threshOn;                /* min. prediction gain for using tns TABUL * 100*/
+  Word32     lpcStartFreq;            /* lowest freq for lpc TABUL*/
+  Word32     lpcStopFreq;             /* TABUL */
+  Word32     tnsTimeResolution;
+}TNS_CONFIG_TABULATED;
+
+
+typedef struct {   /*assigned at InitTime*/
+  Word16 tnsActive;
+  Word16 tnsMaxSfb;
+
+  Word16 maxOrder;                /* max. order of tns filter */
+  Word16 tnsStartFreq;            /* lowest freq. for tns filtering */
+  Word16 coefRes;
+
+  TNS_CONFIG_TABULATED confTab;
+
+  Word32 acfWindow[TNS_MAX_ORDER+1];
+
+  Word16 tnsStartBand;
+  Word16 tnsStartLine;
+
+  Word16 tnsStopBand;
+  Word16 tnsStopLine;
+
+  Word16 lpcStartBand;
+  Word16 lpcStartLine;
+
+  Word16 lpcStopBand;
+  Word16 lpcStopLine;
+
+  Word16 tnsRatioPatchLowestCb;
+  Word16 tnsModifyBeginCb;
+
+  Word16 threshold; /* min. prediction gain for using tns TABUL * 100 */
+
+}TNS_CONFIG;
+
+
+typedef struct {
+  Word16 tnsActive;
+  Word32 parcor[TNS_MAX_ORDER];
+  Word16 predictionGain;
+} TNS_SUBBLOCK_INFO; /* Word16 size: 26 */
+
+typedef struct{
+  TNS_SUBBLOCK_INFO subBlockInfo[TRANS_FAC];
+} TNS_DATA_SHORT;
+
+typedef struct{
+  TNS_SUBBLOCK_INFO subBlockInfo;
+} TNS_DATA_LONG;
+
+typedef struct{
+  TNS_DATA_LONG tnsLong;
+  TNS_DATA_SHORT tnsShort;
+}TNS_DATA_RAW;
+
+typedef struct{
+  Word16 numOfSubblocks;
+  TNS_DATA_RAW dataRaw;
+}TNS_DATA; /* Word16 size: 1 + 8*26 + 26 = 235 */
+
+typedef struct{
+  Word16 tnsActive[TRANS_FAC];
+  Word16 coefRes[TRANS_FAC];
+  Word16 length[TRANS_FAC];
+  Word16 order[TRANS_FAC];
+  Word16 coef[TRANS_FAC*TNS_MAX_ORDER_SHORT];
+}TNS_INFO; /* Word16 size: 72 */
+
+#endif /* _TNS_H */
diff --git a/media/libstagefright/codecs/aacenc/inc/tns_func.h b/media/libstagefright/codecs/aacenc/inc/tns_func.h
new file mode 100644
index 0000000..58b75b6
--- /dev/null
+++ b/media/libstagefright/codecs/aacenc/inc/tns_func.h
@@ -0,0 +1,75 @@
+/*

+ ** Copyright 2003-2010, VisualOn, Inc.

+ **

+ ** Licensed under the Apache License, Version 2.0 (the "License");

+ ** you may not use this file except in compliance with the License.

+ ** You may obtain a copy of the License at

+ **

+ **     http://www.apache.org/licenses/LICENSE-2.0

+ **

+ ** Unless required by applicable law or agreed to in writing, software

+ ** distributed under the License is distributed on an "AS IS" BASIS,

+ ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

+ ** See the License for the specific language governing permissions and

+ ** limitations under the License.

+ */

+/*******************************************************************************

+	File:		tns_func.h

+

+	Content:	TNS functions

+

+*******************************************************************************/
+
+/*
+   Temporal noise shaping
+ */
+#ifndef _TNS_FUNC_H
+#define _TNS_FUNC_H

+#include "typedef.h"
+#include "psy_configuration.h"
+
+Word16 InitTnsConfigurationLong(Word32 bitrate,
+                                Word32 samplerate,
+                                Word16 channels,
+                                TNS_CONFIG *tnsConfig,
+                                PSY_CONFIGURATION_LONG *psyConfig,
+                                Word16 active);
+
+Word16 InitTnsConfigurationShort(Word32 bitrate,
+                                 Word32 samplerate,
+                                 Word16 channels,
+                                 TNS_CONFIG *tnsConfig,
+                                 PSY_CONFIGURATION_SHORT *psyConfig,
+                                 Word16 active);
+
+Word32 TnsDetect(TNS_DATA* tnsData,
+                 TNS_CONFIG tC,
+                 Word32* pScratchTns,
+                 const Word16 sfbOffset[],
+                 Word32* spectrum,
+                 Word16 subBlockNumber,
+                 Word16 blockType,
+                 Word32 * sfbEnergy);
+
+void TnsSync(TNS_DATA *tnsDataDest,
+             const TNS_DATA *tnsDataSrc,
+             const TNS_CONFIG tC,
+             const Word16 subBlockNumber,
+             const Word16 blockType);
+
+Word16 TnsEncode(TNS_INFO* tnsInfo,
+                 TNS_DATA* tnsData,
+                 Word16 numOfSfb,
+                 TNS_CONFIG tC,
+                 Word16 lowPassLine,
+                 Word32* spectrum,
+                 Word16 subBlockNumber,
+                 Word16 blockType);
+
+void ApplyTnsMultTableToRatios(Word16 startCb,
+                               Word16 stopCb,
+                               TNS_SUBBLOCK_INFO subInfo,
+                               Word32 *thresholds);
+
+
+#endif /* _TNS_FUNC_H */
diff --git a/media/libstagefright/codecs/aacenc/inc/tns_param.h b/media/libstagefright/codecs/aacenc/inc/tns_param.h
new file mode 100644
index 0000000..26266ac
--- /dev/null
+++ b/media/libstagefright/codecs/aacenc/inc/tns_param.h
@@ -0,0 +1,52 @@
+/*

+ ** Copyright 2003-2010, VisualOn, Inc.

+ **

+ ** Licensed under the Apache License, Version 2.0 (the "License");

+ ** you may not use this file except in compliance with the License.

+ ** You may obtain a copy of the License at

+ **

+ **     http://www.apache.org/licenses/LICENSE-2.0

+ **

+ ** Unless required by applicable law or agreed to in writing, software

+ ** distributed under the License is distributed on an "AS IS" BASIS,

+ ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

+ ** See the License for the specific language governing permissions and

+ ** limitations under the License.

+ */

+/*******************************************************************************

+	File:		tns_param.h

+

+	Content:	TNS parameters

+

+*******************************************************************************/
+
+/*
+   TNS parameters
+ */
+#ifndef _TNS_PARAM_H
+#define _TNS_PARAM_H
+
+#include "tns.h"
+
+typedef struct{
+  Word32 samplingRate;
+  Word16 maxBandLong;
+  Word16 maxBandShort;
+}TNS_MAX_TAB_ENTRY;
+
+typedef struct{
+    Word32 bitRateFrom;
+    Word32 bitRateTo;
+    const TNS_CONFIG_TABULATED *paramMono_Long;  /* contains TNS parameters */
+    const TNS_CONFIG_TABULATED *paramMono_Short;
+    const TNS_CONFIG_TABULATED *paramStereo_Long;
+    const TNS_CONFIG_TABULATED *paramStereo_Short;
+}TNS_INFO_TAB;
+
+
+void GetTnsParam(TNS_CONFIG_TABULATED *tnsConfigTab, 
+                 Word32 bitRate, Word16 channels, Word16 blockType);
+
+void GetTnsMaxBands(Word32 samplingRate, Word16 blockType, Word16* tnsMaxSfb);
+
+#endif /* _TNS_PARAM_H */
diff --git a/media/libstagefright/codecs/aacenc/inc/transform.h b/media/libstagefright/codecs/aacenc/inc/transform.h
new file mode 100644
index 0000000..2666914
--- /dev/null
+++ b/media/libstagefright/codecs/aacenc/inc/transform.h
@@ -0,0 +1,36 @@
+/*

+ ** Copyright 2003-2010, VisualOn, Inc.

+ **

+ ** Licensed under the Apache License, Version 2.0 (the "License");

+ ** you may not use this file except in compliance with the License.

+ ** You may obtain a copy of the License at

+ **

+ **     http://www.apache.org/licenses/LICENSE-2.0

+ **

+ ** Unless required by applicable law or agreed to in writing, software

+ ** distributed under the License is distributed on an "AS IS" BASIS,

+ ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

+ ** See the License for the specific language governing permissions and

+ ** limitations under the License.

+ */

+/*******************************************************************************

+	File:		transform.h

+

+	Content:	MDCT Transform functions

+

+*******************************************************************************/
+
+#ifndef  __TRANSFORM_H__
+#define __TRANSFORM_H__
+
+#include "typedef.h"
+                  
+void Transform_Real(Word16 *mdctDelayBuffer,
+                    Word16 *timeSignal,
+                    Word16 chIncrement,     /*! channel increment */
+                    Word32 *realOut,
+                    Word16 *mdctScale,
+                    Word16 windowSequence
+                    );
+
+#endif
\ No newline at end of file
diff --git a/media/libstagefright/codecs/aacenc/patent_disclaimer.txt b/media/libstagefright/codecs/aacenc/patent_disclaimer.txt
new file mode 100644
index 0000000..b4bf11d
--- /dev/null
+++ b/media/libstagefright/codecs/aacenc/patent_disclaimer.txt
@@ -0,0 +1,9 @@
+
+THIS IS NOT A GRANT OF PATENT RIGHTS.
+
+Google makes no representation or warranty that the codecs for which
+source code is made available hereunder are unencumbered by
+third-party patents.  Those intending to use this source code in
+hardware or software products are advised that implementations of
+these codecs, including in open source software or shareware, may
+require patent licenses from the relevant patent holders.
diff --git a/media/libstagefright/codecs/aacenc/src/aac_rom.c b/media/libstagefright/codecs/aacenc/src/aac_rom.c
new file mode 100644
index 0000000..2ce0352
--- /dev/null
+++ b/media/libstagefright/codecs/aacenc/src/aac_rom.c
@@ -0,0 +1,2363 @@
+/*

+ ** Copyright 2003-2010, VisualOn, Inc.

+ **

+ ** Licensed under the Apache License, Version 2.0 (the "License");

+ ** you may not use this file except in compliance with the License.

+ ** You may obtain a copy of the License at

+ **

+ **     http://www.apache.org/licenses/LICENSE-2.0

+ **

+ ** Unless required by applicable law or agreed to in writing, software

+ ** distributed under the License is distributed on an "AS IS" BASIS,

+ ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

+ ** See the License for the specific language governing permissions and

+ ** limitations under the License.

+ */

+/*******************************************************************************

+	File:		aac_rom.c

+

+	Content:	constant tables

+

+*******************************************************************************/
+
+#include "aac_rom.h"

+

+#if defined (ARMV5E) && !defined (ARMV7Neon)

+

+/* 

+ *  Q30 for 128 and 1024 

+ *

+ * for (i = 0; i < num/4; i++) {

+ *   angle = (i + 0.125) * M_PI / num;

+ *   x = cos(angle) * (1 << 30);

+ *   x = sin(angle) * (1 << 30);

+ * 

+ *   angle = (num/2 - 1 - i + 0.125) * M_PI / num;

+ *   x = cos(angle) * (1 << 30);

+ *   x = sin(angle) * (1 << 30);

+ * }

+ */

+const int cossintab[128 + 1024] = {

+	/* 128 */

+	0x3fffec43, 0x003243f1, 0x015fd4d2, 0x3ffc38d1, 0x3ff9c13a, 0x01c454f5, 0x02f1b755, 0x3feea776, 

+	0x3fe9b8a9, 0x03562038, 0x0483259d, 0x3fd73a4a, 0x3fcfd50b, 0x04e767c5, 0x0613e1c5, 0x3fb5f4ea, 

+	0x3fac1a5b, 0x0677edbb, 0x07a3adff, 0x3f8adc77, 0x3f7e8e1e, 0x08077457, 0x09324ca7, 0x3f55f796, 

+	0x3f473759, 0x0995bdfd, 0x0abf8043, 0x3f174e70, 0x3f061e95, 0x0b228d42, 0x0c4b0b94, 0x3eceeaad, 

+	0x3ebb4ddb, 0x0cada4f5, 0x0dd4b19a, 0x3e7cd778, 0x3e66d0b4, 0x0e36c82a, 0x0f5c35a3, 0x3e212179, 

+	0x3e08b42a, 0x0fbdba40, 0x10e15b4e, 0x3dbbd6d4, 0x3da106bd, 0x11423ef0, 0x1263e699, 0x3d4d0728, 

+	0x3d2fd86c, 0x12c41a4f, 0x13e39be9, 0x3cd4c38b, 0x3cb53aaa, 0x144310dd, 0x15604013, 0x3c531e88, 

+	0x3c314060, 0x15bee78c, 0x16d99864, 0x3bc82c1f, 0x3ba3fde7, 0x173763c9, 0x184f6aab, 0x3b3401bb, 

+	0x3b0d8909, 0x18ac4b87, 0x19c17d44, 0x3a96b636, 0x3a6df8f8, 0x1a1d6544, 0x1b2f971e, 0x39f061d2, 

+	0x39c5664f, 0x1b8a7815, 0x1c997fc4, 0x39411e33, 0x3913eb0e, 0x1cf34baf, 0x1dfeff67, 0x38890663, 

+	0x3859a292, 0x1e57a86d, 0x1f5fdee6, 0x37c836c2, 0x3796a996, 0x1fb7575c, 0x20bbe7d8, 0x36fecd0e, 

+	0x36cb1e2a, 0x21122240, 0x2212e492, 0x362ce855, 0x35f71fb1, 0x2267d3a0, 0x2364a02e, 0x3552a8f4, 

+	0x351acedd, 0x23b836ca, 0x24b0e699, 0x34703095, 0x34364da6, 0x250317df, 0x25f78497, 0x3385a222, 

+	0x3349bf48, 0x264843d9, 0x273847c8, 0x329321c7, 0x32554840, 0x27878893, 0x2872feb6, 0x3198d4ea, 

+	0x31590e3e, 0x28c0b4d2, 0x29a778db, 0x3096e223, 0x30553828, 0x29f3984c, 0x2ad586a3, 0x2f8d713a, 

+	0x2f49ee0f, 0x2b2003ac, 0x2bfcf97c, 0x2e7cab1c, 0x2e37592c, 0x2c45c8a0, 0x2d1da3d5, 0x2d64b9da, 

+	/* 1024 */

+	0x3fffffb1, 0x0006487f, 0x002bfb74, 0x3ffff0e3, 0x3fffe705, 0x00388c6e, 0x005e3f4c, 0x3fffba9b, 

+	0x3fffa6de, 0x006ad03b, 0x009082ea, 0x3fff5cd8, 0x3fff3f3c, 0x009d13c5, 0x00c2c62f, 0x3ffed79b, 

+	0x3ffeb021, 0x00cf56ef, 0x00f508fc, 0x3ffe2ae5, 0x3ffdf98c, 0x01019998, 0x01274b31, 0x3ffd56b5, 

+	0x3ffd1b7e, 0x0133dba3, 0x01598cb1, 0x3ffc5b0c, 0x3ffc15f7, 0x01661cf0, 0x018bcd5b, 0x3ffb37ec, 

+	0x3ffae8f9, 0x01985d60, 0x01be0d11, 0x3ff9ed53, 0x3ff99483, 0x01ca9cd4, 0x01f04bb4, 0x3ff87b44, 

+	0x3ff81896, 0x01fcdb2e, 0x02228924, 0x3ff6e1bf, 0x3ff67534, 0x022f184d, 0x0254c544, 0x3ff520c5, 

+	0x3ff4aa5d, 0x02615414, 0x0286fff3, 0x3ff33858, 0x3ff2b813, 0x02938e62, 0x02b93914, 0x3ff12878, 

+	0x3ff09e56, 0x02c5c71a, 0x02eb7086, 0x3feef126, 0x3fee5d28, 0x02f7fe1c, 0x031da62b, 0x3fec9265, 

+	0x3febf48b, 0x032a3349, 0x034fd9e5, 0x3fea0c35, 0x3fe96480, 0x035c6682, 0x03820b93, 0x3fe75e98, 

+	0x3fe6ad08, 0x038e97a9, 0x03b43b17, 0x3fe48990, 0x3fe3ce26, 0x03c0c69e, 0x03e66852, 0x3fe18d1f, 

+	0x3fe0c7da, 0x03f2f342, 0x04189326, 0x3fde6945, 0x3fdd9a27, 0x04251d77, 0x044abb73, 0x3fdb1e06, 

+	0x3fda450f, 0x0457451d, 0x047ce11a, 0x3fd7ab64, 0x3fd6c894, 0x04896a16, 0x04af03fc, 0x3fd4115f, 

+	0x3fd324b7, 0x04bb8c42, 0x04e123fa, 0x3fd04ffc, 0x3fcf597c, 0x04edab83, 0x051340f6, 0x3fcc673b, 

+	0x3fcb66e4, 0x051fc7b9, 0x05455ad1, 0x3fc8571f, 0x3fc74cf3, 0x0551e0c7, 0x0577716b, 0x3fc41fac, 

+	0x3fc30baa, 0x0583f68c, 0x05a984a6, 0x3fbfc0e3, 0x3fbea30c, 0x05b608eb, 0x05db9463, 0x3fbb3ac7, 

+	0x3fba131b, 0x05e817c3, 0x060da083, 0x3fb68d5b, 0x3fb55bdc, 0x061a22f7, 0x063fa8e7, 0x3fb1b8a2, 

+	0x3fb07d50, 0x064c2a67, 0x0671ad71, 0x3facbc9f, 0x3fab777b, 0x067e2df5, 0x06a3ae00, 0x3fa79954, 

+	0x3fa64a5f, 0x06b02d81, 0x06d5aa77, 0x3fa24ec6, 0x3fa0f600, 0x06e228ee, 0x0707a2b7, 0x3f9cdcf7, 

+	0x3f9b7a62, 0x0714201b, 0x073996a1, 0x3f9743eb, 0x3f95d787, 0x074612eb, 0x076b8616, 0x3f9183a5, 

+	0x3f900d72, 0x0778013d, 0x079d70f7, 0x3f8b9c28, 0x3f8a1c29, 0x07a9eaf5, 0x07cf5726, 0x3f858d79, 

+	0x3f8403ae, 0x07dbcff2, 0x08013883, 0x3f7f579b, 0x3f7dc405, 0x080db016, 0x083314f1, 0x3f78fa92, 

+	0x3f775d31, 0x083f8b43, 0x0864ec4f, 0x3f727661, 0x3f70cf38, 0x08716159, 0x0896be80, 0x3f6bcb0e, 

+	0x3f6a1a1c, 0x08a3323a, 0x08c88b65, 0x3f64f89b, 0x3f633de2, 0x08d4fdc6, 0x08fa52de, 0x3f5dff0e, 

+	0x3f5c3a8f, 0x0906c3e0, 0x092c14ce, 0x3f56de6a, 0x3f551026, 0x09388469, 0x095dd116, 0x3f4f96b4, 

+	0x3f4dbeac, 0x096a3f42, 0x098f8796, 0x3f4827f0, 0x3f464626, 0x099bf44c, 0x09c13831, 0x3f409223, 

+	0x3f3ea697, 0x09cda368, 0x09f2e2c7, 0x3f38d552, 0x3f36e006, 0x09ff4c78, 0x0a24873a, 0x3f30f181, 

+	0x3f2ef276, 0x0a30ef5e, 0x0a56256c, 0x3f28e6b6, 0x3f26ddec, 0x0a628bfa, 0x0a87bd3d, 0x3f20b4f5, 

+	0x3f1ea26e, 0x0a94222f, 0x0ab94e8f, 0x3f185c43, 0x3f164001, 0x0ac5b1dc, 0x0aead944, 0x3f0fdca5, 

+	0x3f0db6a9, 0x0af73ae5, 0x0b1c5d3d, 0x3f073621, 0x3f05066d, 0x0b28bd2a, 0x0b4dda5c, 0x3efe68bc, 

+	0x3efc2f50, 0x0b5a388d, 0x0b7f5081, 0x3ef5747b, 0x3ef3315a, 0x0b8bacf0, 0x0bb0bf8f, 0x3eec5965, 

+	0x3eea0c8e, 0x0bbd1a33, 0x0be22766, 0x3ee3177e, 0x3ee0c0f4, 0x0bee8038, 0x0c1387e9, 0x3ed9aecc, 

+	0x3ed74e91, 0x0c1fdee1, 0x0c44e0f9, 0x3ed01f55, 0x3ecdb56a, 0x0c513610, 0x0c763278, 0x3ec66920, 

+	0x3ec3f585, 0x0c8285a5, 0x0ca77c47, 0x3ebc8c31, 0x3eba0ee9, 0x0cb3cd84, 0x0cd8be47, 0x3eb2888f, 

+	0x3eb0019c, 0x0ce50d8c, 0x0d09f85b, 0x3ea85e41, 0x3ea5cda3, 0x0d1645a0, 0x0d3b2a64, 0x3e9e0d4c, 

+	0x3e9b7306, 0x0d4775a1, 0x0d6c5443, 0x3e9395b7, 0x3e90f1ca, 0x0d789d71, 0x0d9d75db, 0x3e88f788, 

+	0x3e8649f5, 0x0da9bcf2, 0x0dce8f0d, 0x3e7e32c6, 0x3e7b7b90, 0x0ddad406, 0x0dff9fba, 0x3e734778, 

+	0x3e70869f, 0x0e0be28e, 0x0e30a7c5, 0x3e6835a4, 0x3e656b2b, 0x0e3ce86b, 0x0e61a70f, 0x3e5cfd51, 

+	0x3e5a2939, 0x0e6de580, 0x0e929d7a, 0x3e519e86, 0x3e4ec0d1, 0x0e9ed9af, 0x0ec38ae8, 0x3e46194a, 

+	0x3e4331fa, 0x0ecfc4d9, 0x0ef46f3b, 0x3e3a6da4, 0x3e377cbb, 0x0f00a6df, 0x0f254a53, 0x3e2e9b9c, 

+	0x3e2ba11b, 0x0f317fa5, 0x0f561c15, 0x3e22a338, 0x3e1f9f21, 0x0f624f0c, 0x0f86e460, 0x3e168480, 

+	0x3e1376d5, 0x0f9314f5, 0x0fb7a317, 0x3e0a3f7b, 0x3e07283f, 0x0fc3d143, 0x0fe8581d, 0x3dfdd432, 

+	0x3dfab365, 0x0ff483d7, 0x10190352, 0x3df142ab, 0x3dee1851, 0x10252c94, 0x1049a49a, 0x3de48aef, 

+	0x3de15708, 0x1055cb5b, 0x107a3bd5, 0x3dd7ad05, 0x3dd46f94, 0x1086600e, 0x10aac8e6, 0x3dcaa8f5, 

+	0x3dc761fc, 0x10b6ea90, 0x10db4baf, 0x3dbd7ec7, 0x3dba2e48, 0x10e76ac3, 0x110bc413, 0x3db02e84, 

+	0x3dacd481, 0x1117e088, 0x113c31f3, 0x3da2b834, 0x3d9f54af, 0x11484bc2, 0x116c9531, 0x3d951bde, 

+	0x3d91aed9, 0x1178ac53, 0x119cedaf, 0x3d87598c, 0x3d83e309, 0x11a9021d, 0x11cd3b50, 0x3d797145, 

+	0x3d75f147, 0x11d94d02, 0x11fd7df6, 0x3d6b6313, 0x3d67d99b, 0x12098ce5, 0x122db583, 0x3d5d2efe, 

+	0x3d599c0e, 0x1239c1a7, 0x125de1da, 0x3d4ed50f, 0x3d4b38aa, 0x1269eb2b, 0x128e02dc, 0x3d40554e, 

+	0x3d3caf76, 0x129a0954, 0x12be186c, 0x3d31afc5, 0x3d2e007c, 0x12ca1c03, 0x12ee226c, 0x3d22e47c, 

+	0x3d1f2bc5, 0x12fa231b, 0x131e20c0, 0x3d13f37e, 0x3d10315a, 0x132a1e7e, 0x134e1348, 0x3d04dcd2, 

+	0x3d011145, 0x135a0e0e, 0x137df9e7, 0x3cf5a082, 0x3cf1cb8e, 0x1389f1af, 0x13add481, 0x3ce63e98, 

+	0x3ce2603f, 0x13b9c943, 0x13dda2f7, 0x3cd6b71e, 0x3cd2cf62, 0x13e994ab, 0x140d652c, 0x3cc70a1c, 

+	0x3cc318ff, 0x141953cb, 0x143d1b02, 0x3cb7379c, 0x3cb33d22, 0x14490685, 0x146cc45c, 0x3ca73fa9, 

+	0x3ca33bd3, 0x1478acbc, 0x149c611d, 0x3c97224c, 0x3c93151d, 0x14a84652, 0x14cbf127, 0x3c86df8e, 

+	0x3c82c909, 0x14d7d32a, 0x14fb745e, 0x3c76777b, 0x3c7257a2, 0x15075327, 0x152aeaa3, 0x3c65ea1c, 

+	0x3c61c0f1, 0x1536c62b, 0x155a53d9, 0x3c55377b, 0x3c510501, 0x15662c18, 0x1589afe3, 0x3c445fa2, 

+	0x3c4023dd, 0x159584d3, 0x15b8fea4, 0x3c33629d, 0x3c2f1d8e, 0x15c4d03e, 0x15e83fff, 0x3c224075, 

+	0x3c1df21f, 0x15f40e3a, 0x161773d6, 0x3c10f935, 0x3c0ca19b, 0x16233eac, 0x16469a0d, 0x3bff8ce8, 

+	0x3bfb2c0c, 0x16526176, 0x1675b286, 0x3bedfb99, 0x3be9917e, 0x1681767c, 0x16a4bd25, 0x3bdc4552, 

+	0x3bd7d1fa, 0x16b07d9f, 0x16d3b9cc, 0x3bca6a1d, 0x3bc5ed8d, 0x16df76c3, 0x1702a85e, 0x3bb86a08, 

+	0x3bb3e440, 0x170e61cc, 0x173188be, 0x3ba6451b, 0x3ba1b620, 0x173d3e9b, 0x17605ad0, 0x3b93fb63, 

+	0x3b8f6337, 0x176c0d15, 0x178f1e76, 0x3b818ceb, 0x3b7ceb90, 0x179acd1c, 0x17bdd394, 0x3b6ef9be, 

+	0x3b6a4f38, 0x17c97e93, 0x17ec7a0d, 0x3b5c41e8, 0x3b578e39, 0x17f8215e, 0x181b11c4, 0x3b496574, 

+	0x3b44a8a0, 0x1826b561, 0x18499a9d, 0x3b36646e, 0x3b319e77, 0x18553a7d, 0x1878147a, 0x3b233ee1, 

+	0x3b1e6fca, 0x1883b097, 0x18a67f3f, 0x3b0ff4d9, 0x3b0b1ca6, 0x18b21791, 0x18d4dad0, 0x3afc8663, 

+	0x3af7a516, 0x18e06f50, 0x1903270f, 0x3ae8f38b, 0x3ae40926, 0x190eb7b7, 0x193163e1, 0x3ad53c5b, 

+	0x3ad048e3, 0x193cf0a9, 0x195f9128, 0x3ac160e1, 0x3abc6458, 0x196b1a09, 0x198daec8, 0x3aad6129, 

+	0x3aa85b92, 0x199933bb, 0x19bbbca6, 0x3a993d3e, 0x3a942e9d, 0x19c73da3, 0x19e9baa3, 0x3a84f52f, 

+	0x3a7fdd86, 0x19f537a4, 0x1a17a8a5, 0x3a708906, 0x3a6b6859, 0x1a2321a2, 0x1a45868e, 0x3a5bf8d1, 

+	0x3a56cf23, 0x1a50fb81, 0x1a735442, 0x3a47449c, 0x3a4211f0, 0x1a7ec524, 0x1aa111a6, 0x3a326c74, 

+	0x3a2d30cd, 0x1aac7e6f, 0x1acebe9d, 0x3a1d7066, 0x3a182bc8, 0x1ada2746, 0x1afc5b0a, 0x3a08507f, 

+	0x3a0302ed, 0x1b07bf8c, 0x1b29e6d2, 0x39f30ccc, 0x39edb649, 0x1b354727, 0x1b5761d8, 0x39dda55a, 

+	0x39d845e9, 0x1b62bdf8, 0x1b84cc01, 0x39c81a36, 0x39c2b1da, 0x1b9023e5, 0x1bb22530, 0x39b26b6d, 

+	0x39acfa2b, 0x1bbd78d2, 0x1bdf6d4a, 0x399c990d, 0x39971ee7, 0x1beabca1, 0x1c0ca432, 0x3986a324, 

+	0x3981201e, 0x1c17ef39, 0x1c39c9cd, 0x397089bf, 0x396afddc, 0x1c45107c, 0x1c66ddfe, 0x395a4ceb, 

+	0x3954b82e, 0x1c72204f, 0x1c93e0ab, 0x3943ecb6, 0x393e4f23, 0x1c9f1e96, 0x1cc0d1b6, 0x392d692f, 

+	0x3927c2c9, 0x1ccc0b35, 0x1cedb106, 0x3916c262, 0x3911132d, 0x1cf8e611, 0x1d1a7e7d, 0x38fff85e, 

+	0x38fa405e, 0x1d25af0d, 0x1d473a00, 0x38e90b31, 0x38e34a69, 0x1d52660f, 0x1d73e374, 0x38d1fae9, 

+	0x38cc315d, 0x1d7f0afb, 0x1da07abc, 0x38bac795, 0x38b4f547, 0x1dab9db5, 0x1dccffbf, 0x38a37142, 

+	0x389d9637, 0x1dd81e21, 0x1df9725f, 0x388bf7ff, 0x3886143b, 0x1e048c24, 0x1e25d282, 0x38745bdb, 

+	0x386e6f60, 0x1e30e7a4, 0x1e52200c, 0x385c9ce3, 0x3856a7b6, 0x1e5d3084, 0x1e7e5ae2, 0x3844bb28, 

+	0x383ebd4c, 0x1e8966a8, 0x1eaa82e9, 0x382cb6b7, 0x3826b030, 0x1eb589f7, 0x1ed69805, 0x38148f9f, 

+	0x380e8071, 0x1ee19a54, 0x1f029a1c, 0x37fc45ef, 0x37f62e1d, 0x1f0d97a5, 0x1f2e8911, 0x37e3d9b7, 

+	0x37ddb945, 0x1f3981ce, 0x1f5a64cb, 0x37cb4b04, 0x37c521f6, 0x1f6558b5, 0x1f862d2d, 0x37b299e7, 

+	0x37ac6841, 0x1f911c3d, 0x1fb1e21d, 0x3799c66f, 0x37938c34, 0x1fbccc4d, 0x1fdd8381, 0x3780d0aa, 

+	0x377a8ddf, 0x1fe868c8, 0x2009113c, 0x3767b8a9, 0x37616d51, 0x2013f196, 0x20348b35, 0x374e7e7b, 

+	0x37482a9a, 0x203f6699, 0x205ff14f, 0x3735222f, 0x372ec5c9, 0x206ac7b8, 0x208b4372, 0x371ba3d4, 

+	0x37153eee, 0x209614d9, 0x20b68181, 0x3702037c, 0x36fb9618, 0x20c14ddf, 0x20e1ab63, 0x36e84135, 

+	0x36e1cb58, 0x20ec72b1, 0x210cc0fc, 0x36ce5d10, 0x36c7debd, 0x21178334, 0x2137c232, 0x36b4571b, 

+	0x36add058, 0x21427f4d, 0x2162aeea, 0x369a2f69, 0x3693a038, 0x216d66e2, 0x218d870b, 0x367fe608, 

+	0x36794e6e, 0x219839d8, 0x21b84a79, 0x36657b08, 0x365edb09, 0x21c2f815, 0x21e2f91a, 0x364aee7b, 

+	0x3644461b, 0x21eda17f, 0x220d92d4, 0x36304070, 0x36298fb4, 0x221835fb, 0x2238178d, 0x361570f8, 

+	0x360eb7e3, 0x2242b56f, 0x22628729, 0x35fa8023, 0x35f3beba, 0x226d1fc1, 0x228ce191, 0x35df6e03, 

+	0x35d8a449, 0x229774d7, 0x22b726a8, 0x35c43aa7, 0x35bd68a1, 0x22c1b496, 0x22e15655, 0x35a8e621, 

+	0x35a20bd3, 0x22ebdee5, 0x230b707e, 0x358d7081, 0x35868def, 0x2315f3a8, 0x23357509, 0x3571d9d9, 

+	0x356aef08, 0x233ff2c8, 0x235f63dc, 0x35562239, 0x354f2f2c, 0x2369dc29, 0x23893cdd, 0x353a49b2, 

+	0x35334e6f, 0x2393afb2, 0x23b2fff3, 0x351e5056, 0x35174ce0, 0x23bd6d48, 0x23dcad03, 0x35023636, 

+	0x34fb2a92, 0x23e714d3, 0x240643f4, 0x34e5fb63, 0x34dee795, 0x2410a639, 0x242fc4ad, 0x34c99fef, 

+	0x34c283fb, 0x243a215f, 0x24592f13, 0x34ad23eb, 0x34a5ffd5, 0x2463862c, 0x2482830d, 0x34908768, 

+	0x34895b36, 0x248cd487, 0x24abc082, 0x3473ca79, 0x346c962f, 0x24b60c57, 0x24d4e757, 0x3456ed2f, 

+	0x344fb0d1, 0x24df2d81, 0x24fdf775, 0x3439ef9c, 0x3432ab2e, 0x250837ed, 0x2526f0c1, 0x341cd1d2, 

+	0x34158559, 0x25312b81, 0x254fd323, 0x33ff93e2, 0x33f83f62, 0x255a0823, 0x25789e80, 0x33e235df, 

+	0x33dad95e, 0x2582cdbc, 0x25a152c0, 0x33c4b7db, 0x33bd535c, 0x25ab7c30, 0x25c9efca, 0x33a719e8, 

+	0x339fad70, 0x25d41369, 0x25f27584, 0x33895c18, 0x3381e7ac, 0x25fc934b, 0x261ae3d6, 0x336b7e7e, 

+	0x33640223, 0x2624fbbf, 0x26433aa7, 0x334d812d, 0x3345fce6, 0x264d4cac, 0x266b79dd, 0x332f6435, 

+	0x3327d808, 0x267585f8, 0x2693a161, 0x331127ab, 0x3309939c, 0x269da78b, 0x26bbb119, 0x32f2cba1, 

+	0x32eb2fb5, 0x26c5b14c, 0x26e3a8ec, 0x32d45029, 0x32ccac64, 0x26eda322, 0x270b88c2, 0x32b5b557, 

+	0x32ae09be, 0x27157cf5, 0x27335082, 0x3296fb3d, 0x328f47d5, 0x273d3eac, 0x275b0014, 0x327821ee, 

+	0x327066bc, 0x2764e82f, 0x27829760, 0x3259297d, 0x32516686, 0x278c7965, 0x27aa164c, 0x323a11fe, 

+	0x32324746, 0x27b3f235, 0x27d17cc1, 0x321adb83, 0x3213090f, 0x27db5288, 0x27f8caa5, 0x31fb8620, 

+	0x31f3abf5, 0x28029a45, 0x281fffe2, 0x31dc11e8, 0x31d4300b, 0x2829c954, 0x28471c5e, 0x31bc7eee, 

+	0x31b49564, 0x2850df9d, 0x286e2002, 0x319ccd46, 0x3194dc14, 0x2877dd07, 0x28950ab6, 0x317cfd04, 

+	0x3175042e, 0x289ec17a, 0x28bbdc61, 0x315d0e3b, 0x31550dc6, 0x28c58cdf, 0x28e294eb, 0x313d00ff, 

+	0x3134f8f1, 0x28ec3f1e, 0x2909343e, 0x311cd564, 0x3114c5c0, 0x2912d81f, 0x292fba40, 0x30fc8b7d, 

+	0x30f47449, 0x293957c9, 0x295626da, 0x30dc235e, 0x30d404a0, 0x295fbe06, 0x297c79f5, 0x30bb9d1c, 

+	0x30b376d8, 0x29860abd, 0x29a2b378, 0x309af8ca, 0x3092cb05, 0x29ac3dd7, 0x29c8d34d, 0x307a367c, 

+	0x3072013c, 0x29d2573c, 0x29eed95b, 0x30595648, 0x30511991, 0x29f856d5, 0x2a14c58b, 0x30385840, 

+	0x30301418, 0x2a1e3c8a, 0x2a3a97c7, 0x30173c7a, 0x300ef0e5, 0x2a440844, 0x2a604ff5, 0x2ff6030a, 

+	0x2fedb00d, 0x2a69b9ec, 0x2a85ee00, 0x2fd4ac04, 0x2fcc51a5, 0x2a8f516b, 0x2aab71d0, 0x2fb3377c, 

+	0x2faad5c1, 0x2ab4cea9, 0x2ad0db4e, 0x2f91a589, 0x2f893c75, 0x2ada318e, 0x2af62a63, 0x2f6ff63d, 

+	0x2f6785d7, 0x2aff7a05, 0x2b1b5ef8, 0x2f4e29af, 0x2f45b1fb, 0x2b24a7f6, 0x2b4078f5, 0x2f2c3ff2, 

+	0x2f23c0f6, 0x2b49bb4a, 0x2b657844, 0x2f0a391d, 0x2f01b2de, 0x2b6eb3ea, 0x2b8a5cce, 0x2ee81543, 

+	0x2edf87c6, 0x2b9391c0, 0x2baf267d, 0x2ec5d479, 0x2ebd3fc4, 0x2bb854b4, 0x2bd3d53a, 0x2ea376d6, 

+	0x2e9adaee, 0x2bdcfcb0, 0x2bf868ed, 0x2e80fc6e, 0x2e785958, 0x2c01899e, 0x2c1ce181, 0x2e5e6556, 

+	0x2e55bb17, 0x2c25fb66, 0x2c413edf, 0x2e3bb1a4, 0x2e330042, 0x2c4a51f3, 0x2c6580f1, 0x2e18e16d, 

+	0x2e1028ed, 0x2c6e8d2e, 0x2c89a79f, 0x2df5f4c7, 0x2ded352f, 0x2c92ad01, 0x2cadb2d5, 0x2dd2ebc7, 

+	0x2dca251c, 0x2cb6b155, 0x2cd1a27b, 0x2dafc683, 0x2da6f8ca, 0x2cda9a14, 0x2cf5767c, 0x2d8c8510, 

+	0x2d83b04f, 0x2cfe6728, 0x2d192ec1, 0x2d692784, 0x2d604bc0, 0x2d22187a, 0x2d3ccb34, 0x2d45adf6

+};

+

+

+const int twidTab512[(8*6 + 32*6 + 128*6)/2] = {

+	0x40000000, 0x40000000, 0x40000000, 0x3b20187d, 

+	0x3ec50c7c, 0x3536238e, 0x2d412d41, 0x3b20187d, 

+	0x187d3b20, 0x187d3b20, 0x3536238e, 0xf3843ec5, 

+	0x00004000, 0x2d412d41, 0xd2bf2d41, 0xe7833b20, 

+	0x238e3536, 0xc13b0c7c, 0xd2bf2d41, 0x187d3b20, 

+	0xc4e0e783, 0xc4e0187d, 0x0c7c3ec5, 0xdc72caca, 

+

+	0x40000000, 0x40000000, 0x40000000, 0x3fb10645, 

+	0x3fec0323, 0x3f4e0964, 0x3ec50c7c, 0x3fb10645, 

+	0x3d3e1294, 0x3d3e1294, 0x3f4e0964, 0x39da1b5d, 

+	0x3b20187d, 0x3ec50c7c, 0x3536238e, 0x38711e2b, 

+	0x3e140f8c, 0x2f6b2afa, 0x3536238e, 0x3d3e1294, 

+	0x28993179, 0x31792899, 0x3c42158f, 0x20e736e5, 

+	0x2d412d41, 0x3b20187d, 0x187d3b20, 0x28993179, 

+	0x39da1b5d, 0x0f8c3e14, 0x238e3536, 0x38711e2b, 

+	0x06453fb1, 0x1e2b3871, 0x36e520e7, 0xfcdd3fec, 

+	0x187d3b20, 0x3536238e, 0xf3843ec5, 0x12943d3e, 

+	0x3367261f, 0xea713c42, 0x0c7c3ec5, 0x31792899, 

+	0xe1d53871, 0x06453fb1, 0x2f6b2afa, 0xd9e13367, 

+	0x00004000, 0x2d412d41, 0xd2bf2d41, 0xf9bb3fb1, 

+	0x2afa2f6b, 0xcc99261f, 0xf3843ec5, 0x28993179, 

+	0xc78f1e2b, 0xed6c3d3e, 0x261f3367, 0xc3be158f, 

+	0xe7833b20, 0x238e3536, 0xc13b0c7c, 0xe1d53871, 

+	0x20e736e5, 0xc0140323, 0xdc723536, 0x1e2b3871, 

+	0xc04ff9bb, 0xd7673179, 0x1b5d39da, 0xc1ecf074, 

+	0xd2bf2d41, 0x187d3b20, 0xc4e0e783, 0xce872899, 

+	0x158f3c42, 0xc91bdf19, 0xcaca238e, 0x12943d3e, 

+	0xce87d767, 0xc78f1e2b, 0x0f8c3e14, 0xd506d095, 

+	0xc4e0187d, 0x0c7c3ec5, 0xdc72caca, 0xc2c21294, 

+	0x09643f4e, 0xe4a3c626, 0xc13b0c7c, 0x06453fb1, 

+	0xed6cc2c2, 0xc04f0645, 0x03233fec, 0xf69cc0b2, 

+

+	0x40000000, 0x40000000, 0x40000000, 0x3ffb0192, 

+	0x3ffe00c9, 0x3ff4025b, 0x3fec0323, 0x3ffb0192, 

+	0x3fd304b5, 0x3fd304b5, 0x3ff4025b, 0x3f9c070d, 

+	0x3fb10645, 0x3fec0323, 0x3f4e0964, 0x3f8407d5, 

+	0x3fe103ec, 0x3eeb0bb6, 0x3f4e0964, 0x3fd304b5, 

+	0x3e710e05, 0x3f0e0af1, 0x3fc3057d, 0x3de2104f, 

+	0x3ec50c7c, 0x3fb10645, 0x3d3e1294, 0x3e710e05, 

+	0x3f9c070d, 0x3c8414d1, 0x3e140f8c, 0x3f8407d5, 

+	0x3bb61708, 0x3dae1111, 0x3f6a089c, 0x3ad21937, 

+	0x3d3e1294, 0x3f4e0964, 0x39da1b5d, 0x3cc51413, 

+	0x3f2f0a2a, 0x38cf1d79, 0x3c42158f, 0x3f0e0af1, 

+	0x37af1f8b, 0x3bb61708, 0x3eeb0bb6, 0x367c2192, 

+	0x3b20187d, 0x3ec50c7c, 0x3536238e, 0x3a8219ef, 

+	0x3e9c0d41, 0x33de257d, 0x39da1b5d, 0x3e710e05, 

+	0x3274275f, 0x392a1cc6, 0x3e440ec9, 0x30f82934, 

+	0x38711e2b, 0x3e140f8c, 0x2f6b2afa, 0x37af1f8b, 

+	0x3de2104f, 0x2dce2cb2, 0x36e520e7, 0x3dae1111, 

+	0x2c212e5a, 0x3612223d, 0x3d7711d3, 0x2a652ff1, 

+	0x3536238e, 0x3d3e1294, 0x28993179, 0x345324da, 

+	0x3d021354, 0x26c032ee, 0x3367261f, 0x3cc51413, 

+	0x24da3453, 0x3274275f, 0x3c8414d1, 0x22e635a5, 

+	0x31792899, 0x3c42158f, 0x20e736e5, 0x307629cd, 

+	0x3bfd164c, 0x1edc3811, 0x2f6b2afa, 0x3bb61708, 

+	0x1cc6392a, 0x2e5a2c21, 0x3b6c17c3, 0x1aa63a2f, 

+	0x2d412d41, 0x3b20187d, 0x187d3b20, 0x2c212e5a, 

+	0x3ad21937, 0x164c3bfd, 0x2afa2f6b, 0x3a8219ef, 

+	0x14133cc5, 0x29cd3076, 0x3a2f1aa6, 0x11d33d77, 

+	0x28993179, 0x39da1b5d, 0x0f8c3e14, 0x275f3274, 

+	0x39831c12, 0x0d413e9c, 0x261f3367, 0x392a1cc6, 

+	0x0af13f0e, 0x24da3453, 0x38cf1d79, 0x089c3f6a, 

+	0x238e3536, 0x38711e2b, 0x06453fb1, 0x223d3612, 

+	0x38111edc, 0x03ec3fe1, 0x20e736e5, 0x37af1f8b, 

+	0x01923ffb, 0x1f8b37af, 0x374b2039, 0xff373ffe, 

+	0x1e2b3871, 0x36e520e7, 0xfcdd3fec, 0x1cc6392a, 

+	0x367c2192, 0xfa833fc3, 0x1b5d39da, 0x3612223d, 

+	0xf82b3f84, 0x19ef3a82, 0x35a522e6, 0xf5d63f2f, 

+	0x187d3b20, 0x3536238e, 0xf3843ec5, 0x17083bb6, 

+	0x34c62434, 0xf1373e44, 0x158f3c42, 0x345324da, 

+	0xeeef3dae, 0x14133cc5, 0x33de257d, 0xecac3d02, 

+	0x12943d3e, 0x3367261f, 0xea713c42, 0x11113dae, 

+	0x32ee26c0, 0xe83d3b6c, 0x0f8c3e14, 0x3274275f, 

+	0xe6113a82, 0x0e053e71, 0x31f727fd, 0xe3ee3983, 

+	0x0c7c3ec5, 0x31792899, 0xe1d53871, 0x0af13f0e, 

+	0x30f82934, 0xdfc7374b, 0x09643f4e, 0x307629cd, 

+	0xddc33612, 0x07d53f84, 0x2ff12a65, 0xdbcc34c6, 

+	0x06453fb1, 0x2f6b2afa, 0xd9e13367, 0x04b53fd3, 

+	0x2ee32b8e, 0xd80331f7, 0x03233fec, 0x2e5a2c21, 

+	0xd6333076, 0x01923ffb, 0x2dce2cb2, 0xd4722ee3, 

+	0x00004000, 0x2d412d41, 0xd2bf2d41, 0xfe6e3ffb, 

+	0x2cb22dce, 0xd11d2b8e, 0xfcdd3fec, 0x2c212e5a, 

+	0xcf8a29cd, 0xfb4b3fd3, 0x2b8e2ee3, 0xce0927fd, 

+	0xf9bb3fb1, 0x2afa2f6b, 0xcc99261f, 0xf82b3f84, 

+	0x2a652ff1, 0xcb3a2434, 0xf69c3f4e, 0x29cd3076, 

+	0xc9ee223d, 0xf50f3f0e, 0x293430f8, 0xc8b52039, 

+	0xf3843ec5, 0x28993179, 0xc78f1e2b, 0xf1fb3e71, 

+	0x27fd31f7, 0xc67d1c12, 0xf0743e14, 0x275f3274, 

+	0xc57e19ef, 0xeeef3dae, 0x26c032ee, 0xc49417c3, 

+	0xed6c3d3e, 0x261f3367, 0xc3be158f, 0xebed3cc5, 

+	0x257d33de, 0xc2fe1354, 0xea713c42, 0x24da3453, 

+	0xc2521111, 0xe8f83bb6, 0x243434c6, 0xc1bc0ec9, 

+	0xe7833b20, 0x238e3536, 0xc13b0c7c, 0xe6113a82, 

+	0x22e635a5, 0xc0d10a2a, 0xe4a339da, 0x223d3612, 

+	0xc07c07d5, 0xe33a392a, 0x2192367c, 0xc03d057d, 

+	0xe1d53871, 0x20e736e5, 0xc0140323, 0xe07537af, 

+	0x2039374b, 0xc00200c9, 0xdf1936e5, 0x1f8b37af, 

+	0xc005fe6e, 0xddc33612, 0x1edc3811, 0xc01ffc14, 

+	0xdc723536, 0x1e2b3871, 0xc04ff9bb, 0xdb263453, 

+	0x1d7938cf, 0xc096f764, 0xd9e13367, 0x1cc6392a, 

+	0xc0f2f50f, 0xd8a13274, 0x1c123983, 0xc164f2bf, 

+	0xd7673179, 0x1b5d39da, 0xc1ecf074, 0xd6333076, 

+	0x1aa63a2f, 0xc289ee2d, 0xd5062f6b, 0x19ef3a82, 

+	0xc33bebed, 0xd3df2e5a, 0x19373ad2, 0xc403e9b4, 

+	0xd2bf2d41, 0x187d3b20, 0xc4e0e783, 0xd1a62c21, 

+	0x17c33b6c, 0xc5d1e55a, 0xd0952afa, 0x17083bb6, 

+	0xc6d6e33a, 0xcf8a29cd, 0x164c3bfd, 0xc7efe124, 

+	0xce872899, 0x158f3c42, 0xc91bdf19, 0xcd8c275f, 

+	0x14d13c84, 0xca5bdd1a, 0xcc99261f, 0x14133cc5, 

+	0xcbaddb26, 0xcbad24da, 0x13543d02, 0xcd12d940, 

+	0xcaca238e, 0x12943d3e, 0xce87d767, 0xc9ee223d, 

+	0x11d33d77, 0xd00fd59b, 0xc91b20e7, 0x11113dae, 

+	0xd1a6d3df, 0xc8511f8b, 0x104f3de2, 0xd34ed232, 

+	0xc78f1e2b, 0x0f8c3e14, 0xd506d095, 0xc6d61cc6, 

+	0x0ec93e44, 0xd6cccf08, 0xc6261b5d, 0x0e053e71, 

+	0xd8a1cd8c, 0xc57e19ef, 0x0d413e9c, 0xda83cc22, 

+	0xc4e0187d, 0x0c7c3ec5, 0xdc72caca, 0xc44a1708, 

+	0x0bb63eeb, 0xde6ec984, 0xc3be158f, 0x0af13f0e, 

+	0xe075c851, 0xc33b1413, 0x0a2a3f2f, 0xe287c731, 

+	0xc2c21294, 0x09643f4e, 0xe4a3c626, 0xc2521111, 

+	0x089c3f6a, 0xe6c9c52e, 0xc1ec0f8c, 0x07d53f84, 

+	0xe8f8c44a, 0xc18f0e05, 0x070d3f9c, 0xeb2fc37c, 

+	0xc13b0c7c, 0x06453fb1, 0xed6cc2c2, 0xc0f20af1, 

+	0x057d3fc3, 0xefb1c21e, 0xc0b20964, 0x04b53fd3, 

+	0xf1fbc18f, 0xc07c07d5, 0x03ec3fe1, 0xf44ac115, 

+	0xc04f0645, 0x03233fec, 0xf69cc0b2, 0xc02d04b5, 

+	0x025b3ff4, 0xf8f3c064, 0xc0140323, 0x01923ffb, 

+	0xfb4bc02d, 0xc0050192, 0x00c93ffe, 0xfda5c00c	

+};

+

+const int twidTab64[(4*6 + 16*6)/2] = {

+	0x40000000, 0x40000000, 0x40000000, 0x2d412d41, 

+	0x3b20187d, 0x187d3b20, 0x00004000, 0x2d412d41, 

+	0xd2bf2d41, 0xd2bf2d41, 0x187d3b20, 0xc4e0e783, 

+

+	0x40000000, 0x40000000, 0x40000000, 0x3ec50c7c, 

+	0x3fb10645, 0x3d3e1294, 0x3b20187d, 0x3ec50c7c, 

+	0x3536238e, 0x3536238e, 0x3d3e1294, 0x28993179, 

+	0x2d412d41, 0x3b20187d, 0x187d3b20, 0x238e3536, 

+	0x38711e2b, 0x06453fb1, 0x187d3b20, 0x3536238e, 

+	0xf3843ec5, 0x0c7c3ec5, 0x31792899, 0xe1d53871, 

+	0x00004000, 0x2d412d41, 0xd2bf2d41, 0xf3843ec5, 

+	0x28993179, 0xc78f1e2b, 0xe7833b20, 0x238e3536, 

+	0xc13b0c7c, 0xdc723536, 0x1e2b3871, 0xc04ff9bb, 

+	0xd2bf2d41, 0x187d3b20, 0xc4e0e783, 0xcaca238e, 

+	0x12943d3e, 0xce87d767, 0xc4e0187d, 0x0c7c3ec5, 

+	0xdc72caca, 0xc13b0c7c, 0x06453fb1, 0xed6cc2c2 

+};

+

+#elif defined ARMV7Neon

+/* 

+ *  Q29 for 128 and 1024 

+ *

+ * for (i = 0; i < num/4; i++) {

+ *   angle = (i + 0.125) * M_PI / num;

+ *   x = cos(angle) * (1 << 29);

+ *   x = sin(angle) * (1 << 29);

+ * 

+ *   angle = (num/2 - 1 - i + 0.125) * M_PI / num;

+ *   x = cos(angle) * (1 << 29);

+ *   x = sin(angle) * (1 << 29);

+ * }

+ */

+const int cossintab[128 + 1024] = {

+	/* 128 */

+	0x1ffff621, 0x001921f9, 0x00afea69, 0x1ffe1c68, 0x1ffce09d, 0x00e22a7a, 0x0178dbaa, 0x1ff753bb, 
+	0x1ff4dc55, 0x01ab101c, 0x024192cf, 0x1feb9d25, 0x1fe7ea85, 0x0273b3e2, 0x0309f0e2, 0x1fdafa75, 
+	0x1fd60d2e, 0x033bf6dd, 0x03d1d700, 0x1fc56e3b, 0x1fbf470f, 0x0403ba2b, 0x04992653, 0x1faafbcb, 
+	0x1fa39bac, 0x04cadefe, 0x055fc022, 0x1f8ba738, 0x1f830f4a, 0x059146a1, 0x062585ca, 0x1f677557, 
+	0x1f5da6ed, 0x0656d27a, 0x06ea58cd, 0x1f3e6bbc, 0x1f33685a, 0x071b6415, 0x07ae1ad2, 0x1f1090bd, 
+	0x1f045a15, 0x07dedd20, 0x0870ada7, 0x1eddeb6a, 0x1ed0835f, 0x08a11f78, 0x0931f34d, 0x1ea68394, 
+	0x1e97ec36, 0x09620d27, 0x09f1cdf5, 0x1e6a61c5, 0x1e5a9d55, 0x0a21886e, 0x0ab02009, 0x1e298f44, 
+	0x1e18a030, 0x0adf73c6, 0x0b6ccc32, 0x1de4160f, 0x1dd1fef4, 0x0b9bb1e5, 0x0c27b555, 0x1d9a00de, 
+	0x1d86c484, 0x0c5625c3, 0x0ce0bea2, 0x1d4b5b1b, 0x1d36fc7c, 0x0d0eb2a2, 0x0d97cb8f, 0x1cf830e9, 
+	0x1ce2b328, 0x0dc53c0a, 0x0e4cbfe2, 0x1ca08f1a, 0x1c89f587, 0x0e79a5d7, 0x0eff7fb3, 0x1c448331, 
+	0x1c2cd149, 0x0f2bd437, 0x0fafef73, 0x1be41b61, 0x1bcb54cb, 0x0fdbabae, 0x105df3ec, 0x1b7f6687, 
+	0x1b658f15, 0x10891120, 0x11097249, 0x1b16742a, 0x1afb8fd9, 0x1133e9d0, 0x11b25017, 0x1aa9547a, 
+	0x1a8d676e, 0x11dc1b65, 0x1258734d, 0x1a38184a, 0x1a1b26d3, 0x12818bef, 0x12fbc24b, 0x19c2d111, 
+	0x19a4dfa4, 0x132421ec, 0x139c23e4, 0x194990e4, 0x192aa420, 0x13c3c44a, 0x14397f5b, 0x18cc6a75, 
+	0x18ac871f, 0x14605a69, 0x14d3bc6d, 0x184b7112, 0x182a9c14, 0x14f9cc26, 0x156ac352, 0x17c6b89d, 
+	0x17a4f708, 0x159001d6, 0x15fe7cbe, 0x173e558e, 0x171bac96, 0x1622e450, 0x168ed1eb, 0x16b25ced,

+	/* 1024 */

+	0x1fffffd9, 0x0003243f, 0x0015fdba, 0x1ffff872, 0x1ffff382, 0x001c4637, 0x002f1fa6, 0x1fffdd4d, 

+	0x1fffd36f, 0x0035681d, 0x00484175, 0x1fffae6c, 0x1fff9f9e, 0x004e89e3, 0x00616318, 0x1fff6bce, 

+	0x1fff5811, 0x0067ab77, 0x007a847e, 0x1fff1572, 0x1ffefcc6, 0x0080cccc, 0x0093a599, 0x1ffeab5b, 

+	0x1ffe8dbf, 0x0099edd2, 0x00acc658, 0x1ffe2d86, 0x1ffe0afc, 0x00b30e78, 0x00c5e6ad, 0x1ffd9bf6, 

+	0x1ffd747c, 0x00cc2eb0, 0x00df0688, 0x1ffcf6aa, 0x1ffcca41, 0x00e54e6a, 0x00f825da, 0x1ffc3da2, 

+	0x1ffc0c4b, 0x00fe6d97, 0x01114492, 0x1ffb70e0, 0x1ffb3a9a, 0x01178c27, 0x012a62a2, 0x1ffa9063, 

+	0x1ffa552e, 0x0130aa0a, 0x01437ffa, 0x1ff99c2c, 0x1ff95c09, 0x0149c731, 0x015c9c8a, 0x1ff8943c, 

+	0x1ff84f2b, 0x0162e38d, 0x0175b843, 0x1ff77893, 0x1ff72e94, 0x017bff0e, 0x018ed316, 0x1ff64932, 

+	0x1ff5fa46, 0x019519a5, 0x01a7ecf2, 0x1ff5061b, 0x1ff4b240, 0x01ae3341, 0x01c105c9, 0x1ff3af4c, 

+	0x1ff35684, 0x01c74bd5, 0x01da1d8c, 0x1ff244c8, 0x1ff1e713, 0x01e0634f, 0x01f33429, 0x1ff0c68f, 

+	0x1ff063ed, 0x01f979a1, 0x020c4993, 0x1fef34a3, 0x1feecd14, 0x02128ebb, 0x02255db9, 0x1fed8f03, 

+	0x1fed2287, 0x022ba28f, 0x023e708d, 0x1febd5b2, 0x1feb644a, 0x0244b50b, 0x025781fe, 0x1fea08b0, 

+	0x1fe9925c, 0x025dc621, 0x027091fd, 0x1fe827fe, 0x1fe7acbe, 0x0276d5c1, 0x0289a07b, 0x1fe6339d, 

+	0x1fe5b372, 0x028fe3dd, 0x02a2ad69, 0x1fe42b90, 0x1fe3a679, 0x02a8f063, 0x02bbb8b6, 0x1fe20fd6, 

+	0x1fe185d5, 0x02c1fb46, 0x02d4c253, 0x1fdfe071, 0x1fdf5186, 0x02db0475, 0x02edca32, 0x1fdd9d64, 

+	0x1fdd098e, 0x02f40be2, 0x0306d042, 0x1fdb46ae, 0x1fdaadee, 0x030d117c, 0x031fd474, 0x1fd8dc51, 

+	0x1fd83ea8, 0x03261534, 0x0338d6b8, 0x1fd65e4f, 0x1fd5bbbd, 0x033f16fb, 0x0351d700, 0x1fd3ccaa, 

+	0x1fd32530, 0x035816c1, 0x036ad53c, 0x1fd12763, 0x1fd07b00, 0x03711477, 0x0383d15c, 0x1fce6e7c, 

+	0x1fcdbd31, 0x038a100e, 0x039ccb51, 0x1fcba1f5, 0x1fcaebc3, 0x03a30975, 0x03b5c30b, 0x1fc8c1d2, 

+	0x1fc806b9, 0x03bc009f, 0x03ceb87c, 0x1fc5ce14, 0x1fc50e14, 0x03d4f57a, 0x03e7ab93, 0x1fc2c6bd, 

+	0x1fc201d7, 0x03ede7f9, 0x04009c42, 0x1fbfabcd, 0x1fbee202, 0x0406d80b, 0x04198a78, 0x1fbc7d49, 

+	0x1fbbae99, 0x041fc5a1, 0x04327628, 0x1fb93b31, 0x1fb8679c, 0x0438b0ac, 0x044b5f40, 0x1fb5e587, 

+	0x1fb50d0e, 0x0451991d, 0x046445b2, 0x1fb27c4e, 0x1fb19ef1, 0x046a7ee3, 0x047d296f, 0x1faeff87, 

+	0x1fae1d47, 0x048361f0, 0x04960a67, 0x1fab6f35, 0x1faa8813, 0x049c4235, 0x04aee88b, 0x1fa7cb5a, 

+	0x1fa6df56, 0x04b51fa1, 0x04c7c3cb, 0x1fa413f8, 0x1fa32313, 0x04cdfa26, 0x04e09c18, 0x1fa04912, 

+	0x1f9f534c, 0x04e6d1b4, 0x04f97163, 0x1f9c6aa9, 0x1f9b7003, 0x04ffa63c, 0x0512439d, 0x1f9878c1, 

+	0x1f97793b, 0x051877af, 0x052b12b6, 0x1f94735b, 0x1f936ef6, 0x053145fd, 0x0543de9e, 0x1f905a7a, 

+	0x1f8f5137, 0x054a1117, 0x055ca748, 0x1f8c2e21, 0x1f8b2000, 0x0562d8ee, 0x05756ca2, 0x1f87ee52, 

+	0x1f86db55, 0x057b9d73, 0x058e2e9f, 0x1f839b10, 0x1f828336, 0x05945e95, 0x05a6ed2e, 0x1f7f345e, 

+	0x1f7e17a8, 0x05ad1c47, 0x05bfa840, 0x1f7aba3e, 0x1f7998ad, 0x05c5d678, 0x05d85fc7, 0x1f762cb2, 

+	0x1f750647, 0x05de8d19, 0x05f113b3, 0x1f718bbf, 0x1f70607a, 0x05f7401c, 0x0609c3f5, 0x1f6cd766, 

+	0x1f6ba748, 0x060fef71, 0x0622707d, 0x1f680fab, 0x1f66dab5, 0x06289b08, 0x063b193c, 0x1f633490, 

+	0x1f61fac3, 0x064142d3, 0x0653be23, 0x1f5e4619, 0x1f5d0775, 0x0659e6c2, 0x066c5f24, 0x1f594448, 

+	0x1f5800ce, 0x067286c6, 0x0684fc2e, 0x1f542f21, 0x1f52e6d2, 0x068b22d0, 0x069d9532, 0x1f4f06a6, 

+	0x1f4db983, 0x06a3bad0, 0x06b62a22, 0x1f49cadc, 0x1f4878e5, 0x06bc4eb9, 0x06cebaee, 0x1f447bc4, 

+	0x1f4324fb, 0x06d4de79, 0x06e74786, 0x1f3f1963, 0x1f3dbdc8, 0x06ed6a03, 0x06ffcfdd, 0x1f39a3bc, 

+	0x1f384350, 0x0705f147, 0x071853e3, 0x1f341ad2, 0x1f32b595, 0x071e7436, 0x0730d388, 0x1f2e7ea9, 

+	0x1f2d149d, 0x0736f2c0, 0x07494ebd, 0x1f28cf43, 0x1f276069, 0x074f6cd7, 0x0761c574, 0x1f230ca5, 

+	0x1f2198fd, 0x0767e26c, 0x077a379d, 0x1f1d36d2, 0x1f1bbe5d, 0x07805370, 0x0792a52a, 0x1f174dce, 

+	0x1f15d08d, 0x0798bfd3, 0x07ab0e0a, 0x1f11519c, 0x1f0fcf91, 0x07b12786, 0x07c37230, 0x1f0b4240, 

+	0x1f09bb6b, 0x07c98a7a, 0x07dbd18c, 0x1f051fbe, 0x1f03941f, 0x07e1e8a1, 0x07f42c0e, 0x1efeea19, 

+	0x1efd59b3, 0x07fa41eb, 0x080c81a9, 0x1ef8a155, 0x1ef70c28, 0x0812964a, 0x0824d24d, 0x1ef24577, 

+	0x1ef0ab84, 0x082ae5ad, 0x083d1dea, 0x1eebd682, 0x1eea37ca, 0x08433007, 0x08556473, 0x1ee5547a, 

+	0x1ee3b0fe, 0x085b7548, 0x086da5d8, 0x1edebf64, 0x1edd1724, 0x0873b562, 0x0885e209, 0x1ed81742, 

+	0x1ed66a41, 0x088bf044, 0x089e18f9, 0x1ed15c1a, 0x1ecfaa57, 0x08a425e1, 0x08b64a98, 0x1eca8def, 

+	0x1ec8d76c, 0x08bc562a, 0x08ce76d8, 0x1ec3acc6, 0x1ec1f184, 0x08d4810f, 0x08e69da8, 0x1ebcb8a3, 

+	0x1ebaf8a3, 0x08eca681, 0x08febefb, 0x1eb5b18a, 0x1eb3eccd, 0x0904c673, 0x0916dac2, 0x1eae977f, 

+	0x1eacce07, 0x091ce0d4, 0x092ef0ed, 0x1ea76a87, 0x1ea59c55, 0x0934f596, 0x0947016e, 0x1ea02aa7, 

+	0x1e9e57bb, 0x094d04aa, 0x095f0c36, 0x1e98d7e2, 0x1e97003e, 0x09650e01, 0x09771136, 0x1e91723e, 

+	0x1e8f95e3, 0x097d118d, 0x098f1060, 0x1e89f9bf, 0x1e8818ad, 0x09950f3f, 0x09a709a4, 0x1e826e69, 

+	0x1e8088a2, 0x09ad0707, 0x09befcf4, 0x1e7ad041, 0x1e78e5c7, 0x09c4f8d8, 0x09d6ea40, 0x1e731f4c, 

+	0x1e71301f, 0x09dce4a1, 0x09eed17b, 0x1e6b5b8f, 0x1e6967b1, 0x09f4ca56, 0x0a06b296, 0x1e63850e, 

+	0x1e618c80, 0x0a0ca9e6, 0x0a1e8d81, 0x1e5b9bce, 0x1e599e91, 0x0a248343, 0x0a36622e, 0x1e539fd4, 

+	0x1e519dea, 0x0a3c565e, 0x0a4e308f, 0x1e4b9126, 0x1e498a8e, 0x0a542329, 0x0a65f894, 0x1e436fc7, 

+	0x1e416485, 0x0a6be995, 0x0a7dba2f, 0x1e3b3bbd, 0x1e392bd1, 0x0a83a993, 0x0a957551, 0x1e32f50e, 

+	0x1e30e079, 0x0a9b6315, 0x0aad29ec, 0x1e2a9bbd, 0x1e288281, 0x0ab3160c, 0x0ac4d7f1, 0x1e222fd1, 

+	0x1e2011ee, 0x0acac26a, 0x0adc7f52, 0x1e19b14f, 0x1e178ec7, 0x0ae2681f, 0x0af41fff, 0x1e11203b, 

+	0x1e0ef910, 0x0afa071d, 0x0b0bb9eb, 0x1e087c9b, 0x1e0650ce, 0x0b119f56, 0x0b234d07, 0x1dffc674, 

+	0x1dfd9606, 0x0b2930bb, 0x0b3ad943, 0x1df6fdcc, 0x1df4c8bf, 0x0b40bb3e, 0x0b525e92, 0x1dee22a9, 

+	0x1debe8fd, 0x0b583ecf, 0x0b69dce6, 0x1de5350f, 0x1de2f6c6, 0x0b6fbb62, 0x0b81542f, 0x1ddc3504, 

+	0x1dd9f220, 0x0b8730e6, 0x0b98c45f, 0x1dd3228e, 0x1dd0db10, 0x0b9e9f4d, 0x0bb02d68, 0x1dc9fdb2, 

+	0x1dc7b19b, 0x0bb6068a, 0x0bc78f3b, 0x1dc0c676, 0x1dbe75c8, 0x0bcd668e, 0x0bdee9ca, 0x1db77cdf, 

+	0x1db5279c, 0x0be4bf4a, 0x0bf63d07, 0x1dae20f4, 0x1dabc71d, 0x0bfc10af, 0x0c0d88e2, 0x1da4b2ba, 

+	0x1da25450, 0x0c135ab0, 0x0c24cd4e, 0x1d9b3237, 0x1d98cf3b, 0x0c2a9d3e, 0x0c3c0a3d, 0x1d919f70, 

+	0x1d8f37e5, 0x0c41d84b, 0x0c533fa0, 0x1d87fa6d, 0x1d858e53, 0x0c590bc9, 0x0c6a6d68, 0x1d7e4332, 

+	0x1d7bd28b, 0x0c7037a8, 0x0c819388, 0x1d7479c5, 0x1d720493, 0x0c875bdb, 0x0c98b1f0, 0x1d6a9e2e, 

+	0x1d682472, 0x0c9e7854, 0x0cafc894, 0x1d60b070, 0x1d5e322c, 0x0cb58d04, 0x0cc6d764, 0x1d56b094, 

+	0x1d542dc9, 0x0ccc99de, 0x0cddde53, 0x1d4c9e9f, 0x1d4a174f, 0x0ce39ed2, 0x0cf4dd52, 0x1d427a97, 

+	0x1d3feec3, 0x0cfa9bd2, 0x0d0bd452, 0x1d384483, 0x1d35b42d, 0x0d1190d1, 0x0d22c347, 0x1d2dfc68, 

+	0x1d2b6791, 0x0d287dc1, 0x0d39aa21, 0x1d23a24e, 0x1d2108f8, 0x0d3f6292, 0x0d5088d3, 0x1d19363a, 

+	0x1d169867, 0x0d563f38, 0x0d675f4e, 0x1d0eb833, 0x1d0c15e4, 0x0d6d13a3, 0x0d7e2d85, 0x1d04283f, 

+	0x1d018176, 0x0d83dfc6, 0x0d94f369, 0x1cf98666, 0x1cf6db24, 0x0d9aa393, 0x0dabb0ec, 0x1ceed2ad, 

+	0x1cec22f4, 0x0db15efc, 0x0dc26600, 0x1ce40d1b, 0x1ce158ed, 0x0dc811f3, 0x0dd91298, 0x1cd935b7, 

+	0x1cd67d15, 0x0ddebc69, 0x0defb6a5, 0x1cce4c87, 0x1ccb8f74, 0x0df55e51, 0x0e065219, 0x1cc35192, 

+	0x1cc0900f, 0x0e0bf79c, 0x0e1ce4e6, 0x1cb844df, 0x1cb57eee, 0x0e22883e, 0x0e336eff, 0x1cad2675, 

+	0x1caa5c17, 0x0e391027, 0x0e49f055, 0x1ca1f65b, 0x1c9f2792, 0x0e4f8f4b, 0x0e6068db, 0x1c96b497, 

+	0x1c93e165, 0x0e66059a, 0x0e76d883, 0x1c8b6131, 0x1c888997, 0x0e7c7308, 0x0e8d3f3e, 0x1c7ffc2f, 

+	0x1c7d202f, 0x0e92d787, 0x0ea39d00, 0x1c748599, 0x1c71a535, 0x0ea93308, 0x0eb9f1ba, 0x1c68fd75, 

+	0x1c6618ae, 0x0ebf857d, 0x0ed03d5e, 0x1c5d63ca, 0x1c5a7aa4, 0x0ed5ceda, 0x0ee67fdf, 0x1c51b8a1, 

+	0x1c4ecb1c, 0x0eec0f10, 0x0efcb92f, 0x1c45fc00, 0x1c430a1d, 0x0f024612, 0x0f12e941, 0x1c3a2ded, 

+	0x1c3737b0, 0x0f1873d2, 0x0f291006, 0x1c2e4e72, 0x1c2b53db, 0x0f2e9842, 0x0f3f2d71, 0x1c225d94, 

+	0x1c1f5ea6, 0x0f44b354, 0x0f554175, 0x1c165b5b, 0x1c135818, 0x0f5ac4fc, 0x0f6b4c03, 0x1c0a47cf, 

+	0x1c074038, 0x0f70cd2a, 0x0f814d0e, 0x1bfe22f8, 0x1bfb170f, 0x0f86cbd3, 0x0f974489, 0x1bf1ecdb, 

+	0x1beedca2, 0x0f9cc0e7, 0x0fad3265, 0x1be5a582, 0x1be290fb, 0x0fb2ac5a, 0x0fc31697, 0x1bd94cf4, 

+	0x1bd63421, 0x0fc88e1e, 0x0fd8f10f, 0x1bcce337, 0x1bc9c61a, 0x0fde6626, 0x0feec1c0, 0x1bc06855, 

+	0x1bbd46f0, 0x0ff43464, 0x1004889e, 0x1bb3dc55, 0x1bb0b6a9, 0x1009f8cb, 0x101a459a, 0x1ba73f3d, 

+	0x1ba4154d, 0x101fb34d, 0x102ff8a8, 0x1b9a9117, 0x1b9762e4, 0x103563dc, 0x1045a1b9, 0x1b8dd1ea, 

+	0x1b8a9f77, 0x104b0a6c, 0x105b40c1, 0x1b8101be, 0x1b7dcb0c, 0x1060a6ef, 0x1070d5b1, 0x1b74209b, 

+	0x1b70e5ac, 0x10763958, 0x1086607e, 0x1b672e88, 0x1b63ef5f, 0x108bc19a, 0x109be119, 0x1b5a2b8e, 

+	0x1b56e82c, 0x10a13fa6, 0x10b15775, 0x1b4d17b4, 0x1b49d01c, 0x10b6b371, 0x10c6c385, 0x1b3ff304, 

+	0x1b3ca737, 0x10cc1cec, 0x10dc253c, 0x1b32bd84, 0x1b2f6d85, 0x10e17c0b, 0x10f17c8d, 0x1b25773d, 

+	0x1b22230e, 0x10f6d0c0, 0x1106c96a, 0x1b182038, 0x1b14c7da, 0x110c1afe, 0x111c0bc6, 0x1b0ab87c, 

+	0x1b075bf1, 0x11215ab8, 0x11314395, 0x1afd4012, 0x1af9df5d, 0x11368fe1, 0x114670c8, 0x1aefb702, 

+	0x1aec5225, 0x114bba6b, 0x115b9354, 0x1ae21d54, 0x1adeb451, 0x1160da4b, 0x1170ab2a, 0x1ad47311, 

+	0x1ad105e9, 0x1175ef72, 0x1185b83f, 0x1ac6b841, 0x1ac346f8, 0x118af9d4, 0x119aba84, 0x1ab8ecec, 

+	0x1ab57784, 0x119ff964, 0x11afb1ee, 0x1aab111c, 0x1aa79796, 0x11b4ee14, 0x11c49e6f, 0x1a9d24d9, 

+	0x1a99a737, 0x11c9d7d9, 0x11d97ff9, 0x1a8f282b, 0x1a8ba670, 0x11deb6a4, 0x11ee5682, 0x1a811b1b, 

+	0x1a7d9549, 0x11f38a6a, 0x120321fa, 0x1a72fdb2, 0x1a6f73ca, 0x1208531c, 0x1217e256, 0x1a64cff8, 

+	0x1a6141fd, 0x121d10af, 0x122c9789, 0x1a5691f5, 0x1a52ffeb, 0x1231c316, 0x12414186, 0x1a4843b4, 

+	0x1a44ad9b, 0x12466a44, 0x1255e041, 0x1a39e53d, 0x1a364b17, 0x125b062b, 0x126a73ac, 0x1a2b7698, 

+	0x1a27d868, 0x126f96c1, 0x127efbbb, 0x1a1cf7ce, 0x1a195597, 0x12841bf6, 0x12937861, 0x1a0e68e9, 

+	0x1a0ac2ac, 0x129895c0, 0x12a7e991, 0x19ffc9f1, 0x19fc1fb1, 0x12ad0412, 0x12bc4f40, 0x19f11af0, 

+	0x19ed6caf, 0x12c166de, 0x12d0a960, 0x19e25bee, 0x19dea9ae, 0x12d5be18, 0x12e4f7e5, 0x19d38cf4, 

+	0x19cfd6b8, 0x12ea09b4, 0x12f93ac2, 0x19c4ae0c, 0x19c0f3d6, 0x12fe49a6, 0x130d71eb, 0x19b5bf3f, 

+	0x19b20111, 0x13127de0, 0x13219d53, 0x19a6c096, 0x19a2fe73, 0x1326a656, 0x1335bcef, 0x1997b21b, 

+	0x1993ec04, 0x133ac2fc, 0x1349d0b0, 0x198893d6, 0x1984c9ce, 0x134ed3c5, 0x135dd88c, 0x197965d0, 

+	0x197597da, 0x1362d8a6, 0x1371d476, 0x196a2815, 0x19665632, 0x1376d191, 0x1385c461, 0x195adaab, 

+	0x195704df, 0x138abe7b, 0x1399a841, 0x194b7d9e, 0x1947a3eb, 0x139e9f56, 0x13ad800a, 0x193c10f7, 

+	0x1938335e, 0x13b27417, 0x13c14bb0, 0x192c94bf, 0x1928b343, 0x13c63cb2, 0x13d50b26, 0x191d08ff, 

+	0x191923a3, 0x13d9f91b, 0x13e8be60, 0x190d6dc1, 0x19098488, 0x13eda944, 0x13fc6553, 0x18fdc310, 

+	0x18f9d5fa, 0x14014d23, 0x140ffff1, 0x18ee08f4, 0x18ea1805, 0x1414e4aa, 0x14238e2f, 0x18de3f77, 

+	0x18da4ab2, 0x14286fce, 0x14371001, 0x18ce66a3, 0x18ca6e0a, 0x143bee83, 0x144a855b, 0x18be7e82, 

+	0x18ba8217, 0x144f60bd, 0x145dee30, 0x18ae871e, 0x18aa86e3, 0x1462c670, 0x14714a76, 0x189e8080, 

+	0x189a7c78, 0x14761f8f, 0x14849a1f, 0x188e6ab2, 0x188a62e0, 0x14896c0f, 0x1497dd20, 0x187e45be, 

+	0x187a3a25, 0x149cabe4, 0x14ab136d, 0x186e11af, 0x186a0250, 0x14afdf03, 0x14be3cfa, 0x185dce8e, 

+	0x1859bb6c, 0x14c3055e, 0x14d159bc, 0x184d7c65, 0x18496583, 0x14d61eeb, 0x14e469a6, 0x183d1b3e, 

+	0x1839009e, 0x14e92b9e, 0x14f76cad, 0x182cab24, 0x18288cc8, 0x14fc2b6a, 0x150a62c6, 0x181c2c20, 

+	0x18180a0c, 0x150f1e45, 0x151d4be3, 0x180b9e3d, 0x18077873, 0x15220422, 0x153027fb, 0x17fb0185, 

+	0x17f6d807, 0x1534dcf6, 0x1542f700, 0x17ea5602, 0x17e628d3, 0x1547a8b5, 0x1555b8e8, 0x17d99bbe, 

+	0x17d56ae0, 0x155a6754, 0x15686da7, 0x17c8d2c4, 0x17c49e3b, 0x156d18c7, 0x157b1532, 0x17b7fb1f, 

+	0x17b3c2ec, 0x157fbd03, 0x158daf7c, 0x17a714d7, 0x17a2d8fe, 0x159253fb, 0x15a03c7a, 0x17961ff9, 

+	0x1791e07b, 0x15a4dda5, 0x15b2bc22, 0x17851c8e, 0x1780d96f, 0x15b759f5, 0x15c52e67, 0x17740aa1, 

+	0x176fc3e3, 0x15c9c8e0, 0x15d7933f, 0x1762ea3d, 0x175e9fe2, 0x15dc2a5a, 0x15e9ea9d, 0x1751bb6b, 

+	0x174d6d77, 0x15ee7e58, 0x15fc3477, 0x17407e37, 0x173c2cac, 0x1600c4cf, 0x160e70c1, 0x172f32ab, 

+	0x172add8c, 0x1612fdb3, 0x16209f70, 0x171dd8d2, 0x17198021, 0x162528fa, 0x1632c078, 0x170c70b7, 

+	0x17081477, 0x16374697, 0x1644d3d0, 0x16fafa64, 0x16f69a97, 0x16495680, 0x1656d96a, 0x16e975e4, 

+	0x16e5128e, 0x165b58aa, 0x1668d13e, 0x16d7e341, 0x16d37c65, 0x166d4d0a, 0x167abb3e, 0x16c64288, 

+	0x16c1d827, 0x167f3394, 0x168c9760, 0x16b493c2, 0x16b025e0, 0x16910c3d, 0x169e659a, 0x16a2d6fb

+};

+

+const int twidTab512[8*6 + 32*6 + 128*6] = {

+	0x20000000, 0x00000000, 0x1d906bcf, 0x0c3ef153, 0x16a09e66, 0x16a09e66, 0x0c3ef153, 0x1d906bcf, 
+	0x20000000, 0x00000000, 0x1f6297d0, 0x063e2e0f, 0x1d906bcf, 0x0c3ef153, 0x1a9b6629, 0x11c73b3a, 
+	0x20000000, 0x00000000, 0x1a9b6629, 0x11c73b3a, 0x0c3ef153, 0x1d906bcf, 0xf9c1d1f1, 0x1f6297d0, 
+	0x00000000, 0x20000000, 0xf3c10ead, 0x1d906bcf, 0xe95f619a, 0x16a09e66, 0xe26f9431, 0x0c3ef153, 
+	0x16a09e66, 0x16a09e66, 0x11c73b3a, 0x1a9b6629, 0x0c3ef153, 0x1d906bcf, 0x063e2e0f, 0x1f6297d0, 
+	0xe95f619a, 0x16a09e66, 0xe09d6830, 0x063e2e0f, 0xe26f9431, 0xf3c10ead, 0xee38c4c6, 0xe56499d7, 
+
+	0x20000000, 0x00000000, 0x1fd88da4, 0x0322f4d8, 0x1f6297d0, 0x063e2e0f, 0x1e9f4157, 0x094a0317, 
+	0x20000000, 0x00000000, 0x1ff621e3, 0x0191f65f, 0x1fd88da4, 0x0322f4d8, 0x1fa7557f, 0x04b2041c, 
+	0x20000000, 0x00000000, 0x1fa7557f, 0x04b2041c, 0x1e9f4157, 0x094a0317, 0x1ced7af4, 0x0dae8805, 
+	0x1d906bcf, 0x0c3ef153, 0x1c38b2f2, 0x0f15ae9c, 0x1a9b6629, 0x11c73b3a, 0x18bc806b, 0x144cf325, 
+	0x1f6297d0, 0x063e2e0f, 0x1f0a7efc, 0x07c67e5f, 0x1e9f4157, 0x094a0317, 0x1e212105, 0x0ac7cd3b, 
+	0x1a9b6629, 0x11c73b3a, 0x17b5df22, 0x157d6935, 0x144cf325, 0x18bc806b, 0x10738799, 0x1b728345, 
+	0x16a09e66, 0x16a09e66, 0x144cf325, 0x18bc806b, 0x11c73b3a, 0x1a9b6629, 0x0f15ae9c, 0x1c38b2f2, 
+	0x1d906bcf, 0x0c3ef153, 0x1ced7af4, 0x0dae8805, 0x1c38b2f2, 0x0f15ae9c, 0x1b728345, 0x10738799, 
+	0x0c3ef153, 0x1d906bcf, 0x07c67e5f, 0x1f0a7efc, 0x0322f4d8, 0x1fd88da4, 0xfe6e09a1, 0x1ff621e3, 
+	0x0c3ef153, 0x1d906bcf, 0x094a0317, 0x1e9f4157, 0x063e2e0f, 0x1f6297d0, 0x0322f4d8, 0x1fd88da4, 
+	0x1a9b6629, 0x11c73b3a, 0x19b3e048, 0x130ff7fd, 0x18bc806b, 0x144cf325, 0x17b5df22, 0x157d6935, 
+	0xf9c1d1f1, 0x1f6297d0, 0xf53832c5, 0x1e212105, 0xf0ea5164, 0x1c38b2f2, 0xecf00803, 0x19b3e048, 
+	0x00000000, 0x20000000, 0xfcdd0b28, 0x1fd88da4, 0xf9c1d1f1, 0x1f6297d0, 0xf6b5fce9, 0x1e9f4157, 
+	0x16a09e66, 0x16a09e66, 0x157d6935, 0x17b5df22, 0x144cf325, 0x18bc806b, 0x130ff7fd, 0x19b3e048, 
+	0xe95f619a, 0x16a09e66, 0xe64c1fb8, 0x130ff7fd, 0xe3c74d0e, 0x0f15ae9c, 0xe1dedefb, 0x0ac7cd3b, 
+	0xf3c10ead, 0x1d906bcf, 0xf0ea5164, 0x1c38b2f2, 0xee38c4c6, 0x1a9b6629, 0xebb30cdb, 0x18bc806b, 
+	0x11c73b3a, 0x1a9b6629, 0x10738799, 0x1b728345, 0x0f15ae9c, 0x1c38b2f2, 0x0dae8805, 0x1ced7af4, 
+	0xe09d6830, 0x063e2e0f, 0xe009de1d, 0x0191f65f, 0xe027725c, 0xfcdd0b28, 0xe0f58104, 0xf83981a1, 
+	0xe95f619a, 0x16a09e66, 0xe7437f95, 0x144cf325, 0xe56499d7, 0x11c73b3a, 0xe3c74d0e, 0x0f15ae9c, 
+	0x0c3ef153, 0x1d906bcf, 0x0ac7cd3b, 0x1e212105, 0x094a0317, 0x1e9f4157, 0x07c67e5f, 0x1f0a7efc, 
+	0xe26f9431, 0xf3c10ead, 0xe48d7cbb, 0xef8c7867, 0xe7437f95, 0xebb30cdb, 0xea8296cb, 0xe84a20de, 
+	0xe26f9431, 0x0c3ef153, 0xe160bea9, 0x094a0317, 0xe09d6830, 0x063e2e0f, 0xe027725c, 0x0322f4d8, 
+	0x063e2e0f, 0x1f6297d0, 0x04b2041c, 0x1fa7557f, 0x0322f4d8, 0x1fd88da4, 0x0191f65f, 0x1ff621e3, 
+	0xee38c4c6, 0xe56499d7, 0xf25177fb, 0xe312850c, 0xf6b5fce9, 0xe160bea9, 0xfb4dfbe4, 0xe058aa81, 
+
+	0x20000000, 0x00000000, 0x1ffd8861, 0x00c90ab0, 0x1ff621e3, 0x0191f65f, 0x1fe9cdad, 0x025aa412, 
+	0x20000000, 0x00000000, 0x1fff6217, 0x00648748, 0x1ffd8861, 0x00c90ab0, 0x1ffa72f0, 0x012d8657, 
+	0x20000000, 0x00000000, 0x1ffa72f0, 0x012d8657, 0x1fe9cdad, 0x025aa412, 0x1fce15fd, 0x0386f0b9, 
+	0x1fd88da4, 0x0322f4d8, 0x1fc26471, 0x03eac9cb, 0x1fa7557f, 0x04b2041c, 0x1f8764fa, 0x05788511, 
+	0x1ff621e3, 0x0191f65f, 0x1ff09566, 0x01f656e8, 0x1fe9cdad, 0x025aa412, 0x1fe1cafd, 0x02beda01, 
+	0x1fa7557f, 0x04b2041c, 0x1f7599a4, 0x05db7678, 0x1f38f3ac, 0x0702e09b, 0x1ef178a4, 0x0827dc07, 
+	0x1f6297d0, 0x063e2e0f, 0x1f38f3ac, 0x0702e09b, 0x1f0a7efc, 0x07c67e5f, 0x1ed740e7, 0x0888e931, 
+	0x1fd88da4, 0x0322f4d8, 0x1fce15fd, 0x0386f0b9, 0x1fc26471, 0x03eac9cb, 0x1fb57972, 0x044e7c34, 
+	0x1e9f4157, 0x094a0317, 0x1e426a4b, 0x0a68f121, 0x1ddb13b7, 0x0b844298, 0x1d696174, 0x0c9b9532, 
+	0x1e9f4157, 0x094a0317, 0x1e6288ec, 0x0a09ae4a, 0x1e212105, 0x0ac7cd3b, 0x1ddb13b7, 0x0b844298, 
+	0x1fa7557f, 0x04b2041c, 0x1f97f925, 0x05155dac, 0x1f8764fa, 0x05788511, 0x1f7599a4, 0x05db7678, 
+	0x1ced7af4, 0x0dae8805, 0x1c678b35, 0x0ebcbbae, 0x1bd7c0ac, 0x0fc5d26e, 0x1b3e4d3f, 0x10c9704d, 
+	0x1d906bcf, 0x0c3ef153, 0x1d4134d1, 0x0cf7bca2, 0x1ced7af4, 0x0dae8805, 0x1c954b21, 0x0e63374d, 
+	0x1f6297d0, 0x063e2e0f, 0x1f4e603b, 0x06a0a809, 0x1f38f3ac, 0x0702e09b, 0x1f2252f7, 0x0764d3f9, 
+	0x1a9b6629, 0x11c73b3a, 0x19ef43ef, 0x12bedb26, 0x193a224a, 0x13affa29, 0x187c4010, 0x149a449c, 
+	0x1c38b2f2, 0x0f15ae9c, 0x1bd7c0ac, 0x0fc5d26e, 0x1b728345, 0x10738799, 0x1b090a58, 0x111eb354, 
+	0x1f0a7efc, 0x07c67e5f, 0x1ef178a4, 0x0827dc07, 0x1ed740e7, 0x0888e931, 0x1ebbd8c9, 0x08e9a220, 
+	0x17b5df22, 0x157d6935, 0x16e74455, 0x16591926, 0x1610b755, 0x172d0838, 0x15328293, 0x17f8ece3, 
+	0x1a9b6629, 0x11c73b3a, 0x1a29a7a0, 0x126d054d, 0x19b3e048, 0x130ff7fd, 0x193a224a, 0x13affa29, 
+	0x1e9f4157, 0x094a0317, 0x1e817bab, 0x09aa0861, 0x1e6288ec, 0x0a09ae4a, 0x1e426a4b, 0x0a68f121, 
+	0x144cf325, 0x18bc806b, 0x136058b1, 0x19777ef5, 0x126d054d, 0x1a29a7a0, 0x11734d64, 0x1ad2bc9e, 
+	0x18bc806b, 0x144cf325, 0x183b0e0c, 0x14e6cabc, 0x17b5df22, 0x157d6935, 0x172d0838, 0x1610b755, 
+	0x1e212105, 0x0ac7cd3b, 0x1dfeae62, 0x0b263eef, 0x1ddb13b7, 0x0b844298, 0x1db65262, 0x0be1d499, 
+	0x10738799, 0x1b728345, 0x0f6e0ca9, 0x1c08c426, 0x0e63374d, 0x1c954b21, 0x0d536416, 0x1d17e774, 
+	0x16a09e66, 0x16a09e66, 0x1610b755, 0x172d0838, 0x157d6935, 0x17b5df22, 0x14e6cabc, 0x183b0e0c, 
+	0x1d906bcf, 0x0c3ef153, 0x1d696174, 0x0c9b9532, 0x1d4134d1, 0x0cf7bca2, 0x1d17e774, 0x0d536416, 
+	0x0c3ef153, 0x1d906bcf, 0x0b263eef, 0x1dfeae62, 0x0a09ae4a, 0x1e6288ec, 0x08e9a220, 0x1ebbd8c9, 
+	0x144cf325, 0x18bc806b, 0x13affa29, 0x193a224a, 0x130ff7fd, 0x19b3e048, 0x126d054d, 0x1a29a7a0, 
+	0x1ced7af4, 0x0dae8805, 0x1cc1f0f4, 0x0e0924ec, 0x1c954b21, 0x0e63374d, 0x1c678b35, 0x0ebcbbae, 
+	0x07c67e5f, 0x1f0a7efc, 0x06a0a809, 0x1f4e603b, 0x05788511, 0x1f8764fa, 0x044e7c34, 0x1fb57972, 
+	0x11c73b3a, 0x1a9b6629, 0x111eb354, 0x1b090a58, 0x10738799, 0x1b728345, 0x0fc5d26e, 0x1bd7c0ac, 
+	0x1c38b2f2, 0x0f15ae9c, 0x1c08c426, 0x0f6e0ca9, 0x1bd7c0ac, 0x0fc5d26e, 0x1ba5aa67, 0x101cfc87, 
+	0x0322f4d8, 0x1fd88da4, 0x01f656e8, 0x1ff09566, 0x00c90ab0, 0x1ffd8861, 0xff9b78b8, 0x1fff6217, 
+	0x0f15ae9c, 0x1c38b2f2, 0x0e63374d, 0x1c954b21, 0x0dae8805, 0x1ced7af4, 0x0cf7bca2, 0x1d4134d1, 
+	0x1b728345, 0x10738799, 0x1b3e4d3f, 0x10c9704d, 0x1b090a58, 0x111eb354, 0x1ad2bc9e, 0x11734d64, 
+	0xfe6e09a1, 0x1ff621e3, 0xfd4125ff, 0x1fe1cafd, 0xfc153635, 0x1fc26471, 0xfaeaa254, 0x1f97f925, 
+	0x0c3ef153, 0x1d906bcf, 0x0b844298, 0x1ddb13b7, 0x0ac7cd3b, 0x1e212105, 0x0a09ae4a, 0x1e6288ec, 
+	0x1a9b6629, 0x11c73b3a, 0x1a63091b, 0x121a7999, 0x1a29a7a0, 0x126d054d, 0x19ef43ef, 0x12bedb26, 
+	0xf9c1d1f1, 0x1f6297d0, 0xf89b2c07, 0x1f2252f7, 0xf77716cf, 0x1ed740e7, 0xf655f79f, 0x1e817bab, 
+	0x094a0317, 0x1e9f4157, 0x0888e931, 0x1ed740e7, 0x07c67e5f, 0x1f0a7efc, 0x0702e09b, 0x1f38f3ac, 
+	0x19b3e048, 0x130ff7fd, 0x19777ef5, 0x136058b1, 0x193a224a, 0x13affa29, 0x18fbcca4, 0x13fed953, 
+	0xf53832c5, 0x1e212105, 0xf41e2b67, 0x1db65262, 0xf308435e, 0x1d4134d1, 0xf1f6db14, 0x1cc1f0f4, 
+	0x063e2e0f, 0x1f6297d0, 0x05788511, 0x1f8764fa, 0x04b2041c, 0x1fa7557f, 0x03eac9cb, 0x1fc26471, 
+	0x18bc806b, 0x144cf325, 0x187c4010, 0x149a449c, 0x183b0e0c, 0x14e6cabc, 0x17f8ece3, 0x15328293, 
+	0xf0ea5164, 0x1c38b2f2, 0xefe30379, 0x1ba5aa67, 0xeee14cac, 0x1b090a58, 0xede58667, 0x1a63091b, 
+	0x0322f4d8, 0x1fd88da4, 0x025aa412, 0x1fe9cdad, 0x0191f65f, 0x1ff621e3, 0x00c90ab0, 0x1ffd8861, 
+	0x17b5df22, 0x157d6935, 0x1771e75f, 0x15c77bbe, 0x172d0838, 0x1610b755, 0x16e74455, 0x16591926, 
+	0xecf00803, 0x19b3e048, 0xec0126ad, 0x18fbcca4, 0xeb193544, 0x183b0e0c, 0xea388442, 0x1771e75f, 
+	0x00000000, 0x20000000, 0xff36f550, 0x1ffd8861, 0xfe6e09a1, 0x1ff621e3, 0xfda55bee, 0x1fe9cdad, 
+	0x16a09e66, 0x16a09e66, 0x16591926, 0x16e74455, 0x1610b755, 0x172d0838, 0x15c77bbe, 0x1771e75f, 
+	0xe95f619a, 0x16a09e66, 0xe88e18a1, 0x15c77bbe, 0xe7c4f1f4, 0x14e6cabc, 0xe704335c, 0x13fed953, 
+	0xfcdd0b28, 0x1fd88da4, 0xfc153635, 0x1fc26471, 0xfb4dfbe4, 0x1fa7557f, 0xfa877aef, 0x1f8764fa, 
+	0x157d6935, 0x17b5df22, 0x15328293, 0x17f8ece3, 0x14e6cabc, 0x183b0e0c, 0x149a449c, 0x187c4010, 
+	0xe64c1fb8, 0x130ff7fd, 0xe59cf6e5, 0x121a7999, 0xe4f6f5a8, 0x111eb354, 0xe45a5599, 0x101cfc87, 
+	0xf9c1d1f1, 0x1f6297d0, 0xf8fd1f65, 0x1f38f3ac, 0xf83981a1, 0x1f0a7efc, 0xf77716cf, 0x1ed740e7, 
+	0x144cf325, 0x18bc806b, 0x13fed953, 0x18fbcca4, 0x13affa29, 0x193a224a, 0x136058b1, 0x19777ef5, 
+	0xe3c74d0e, 0x0f15ae9c, 0xe33e0f0c, 0x0e0924ec, 0xe2becb2f, 0x0cf7bca2, 0xe249ad9e, 0x0be1d499, 
+	0xf6b5fce9, 0x1e9f4157, 0xf5f651b6, 0x1e6288ec, 0xf53832c5, 0x1e212105, 0xf47bbd68, 0x1ddb13b7, 
+	0x130ff7fd, 0x19b3e048, 0x12bedb26, 0x19ef43ef, 0x126d054d, 0x1a29a7a0, 0x121a7999, 0x1a63091b, 
+	0xe1dedefb, 0x0ac7cd3b, 0xe17e8455, 0x09aa0861, 0xe128bf19, 0x0888e931, 0xe0ddad09, 0x0764d3f9, 
+	0xf3c10ead, 0x1d906bcf, 0xf308435e, 0x1d4134d1, 0xf25177fb, 0x1ced7af4, 0xf19cc8b3, 0x1c954b21, 
+	0x11c73b3a, 0x1a9b6629, 0x11734d64, 0x1ad2bc9e, 0x111eb354, 0x1b090a58, 0x10c9704d, 0x1b3e4d3f, 
+	0xe09d6830, 0x063e2e0f, 0xe06806db, 0x05155dac, 0xe03d9b8f, 0x03eac9cb, 0xe01e3503, 0x02beda01, 
+	0xf0ea5164, 0x1c38b2f2, 0xf03a2d92, 0x1bd7c0ac, 0xef8c7867, 0x1b728345, 0xeee14cac, 0x1b090a58, 
+	0x10738799, 0x1b728345, 0x101cfc87, 0x1ba5aa67, 0x0fc5d26e, 0x1bd7c0ac, 0x0f6e0ca9, 0x1c08c426, 
+	0xe009de1d, 0x0191f65f, 0xe0009de9, 0x00648748, 0xe002779f, 0xff36f550, 0xe00f6a9a, 0xfe09a918, 
+	0xee38c4c6, 0x1a9b6629, 0xed92fab3, 0x1a29a7a0, 0xecf00803, 0x19b3e048, 0xec5005d7, 0x193a224a, 
+	0x0f15ae9c, 0x1c38b2f2, 0x0ebcbbae, 0x1c678b35, 0x0e63374d, 0x1c954b21, 0x0e0924ec, 0x1cc1f0f4, 
+	0xe027725c, 0xfcdd0b28, 0xe04a868e, 0xfbb183cc, 0xe0789b06, 0xfa877aef, 0xe0b19fc5, 0xf95f57f7, 
+	0xebb30cdb, 0x18bc806b, 0xeb193544, 0x183b0e0c, 0xea8296cb, 0x17b5df22, 0xe9ef48ab, 0x172d0838, 
+	0x0dae8805, 0x1ced7af4, 0x0d536416, 0x1d17e774, 0x0cf7bca2, 0x1d4134d1, 0x0c9b9532, 0x1d696174, 
+	0xe0f58104, 0xf83981a1, 0xe1442737, 0xf7165de0, 0xe19d7714, 0xf5f651b6, 0xe201519e, 0xf4d9c111, 
+	0xe95f619a, 0x16a09e66, 0xe8d2f7c8, 0x1610b755, 0xe84a20de, 0x157d6935, 0xe7c4f1f4, 0x14e6cabc, 
+	0x0c3ef153, 0x1d906bcf, 0x0be1d499, 0x1db65262, 0x0b844298, 0x1ddb13b7, 0x0b263eef, 0x1dfeae62, 
+	0xe26f9431, 0xf3c10ead, 0xe2e8188c, 0xf2ac9bea, 0xe36ab4df, 0xf19cc8b3, 0xe3f73bda, 0xf091f357, 
+	0xe7437f95, 0x144cf325, 0xe6c5ddb6, 0x13affa29, 0xe64c1fb8, 0x130ff7fd, 0xe5d65860, 0x126d054d, 
+	0x0ac7cd3b, 0x1e212105, 0x0a68f121, 0x1e426a4b, 0x0a09ae4a, 0x1e6288ec, 0x09aa0861, 0x1e817bab, 
+	0xe48d7cbb, 0xef8c7867, 0xe52d4362, 0xee8cb29c, 0xe5d65860, 0xed92fab3, 0xe688810b, 0xec9fa74f, 
+	0xe56499d7, 0x11c73b3a, 0xe4f6f5a8, 0x111eb354, 0xe48d7cbb, 0x10738799, 0xe4283f54, 0x0fc5d26e, 
+	0x094a0317, 0x1e9f4157, 0x08e9a220, 0x1ebbd8c9, 0x0888e931, 0x1ed740e7, 0x0827dc07, 0x1ef178a4, 
+	0xe7437f95, 0xebb30cdb, 0xe807131d, 0xeacd7d6d, 0xe8d2f7c8, 0xe9ef48ab, 0xe9a6e6da, 0xe918bbab, 
+	0xe3c74d0e, 0x0f15ae9c, 0xe36ab4df, 0x0e63374d, 0xe312850c, 0x0dae8805, 0xe2becb2f, 0x0cf7bca2, 
+	0x07c67e5f, 0x1f0a7efc, 0x0764d3f9, 0x1f2252f7, 0x0702e09b, 0x1f38f3ac, 0x06a0a809, 0x1f4e603b, 
+	0xea8296cb, 0xe84a20de, 0xeb65bb64, 0xe783bff0, 0xec5005d7, 0xe6c5ddb6, 0xed4124da, 0xe610bc11, 
+	0xe26f9431, 0x0c3ef153, 0xe224ec49, 0x0b844298, 0xe1dedefb, 0x0ac7cd3b, 0xe19d7714, 0x0a09ae4a, 
+	0x063e2e0f, 0x1f6297d0, 0x05db7678, 0x1f7599a4, 0x05788511, 0x1f8764fa, 0x05155dac, 0x1f97f925, 
+	0xee38c4c6, 0xe56499d7, 0xef368fb3, 0xe4c1b2c1, 0xf03a2d92, 0xe4283f54, 0xf1434452, 0xe39874cb, 
+	0xe160bea9, 0x094a0317, 0xe128bf19, 0x0888e931, 0xe0f58104, 0x07c67e5f, 0xe0c70c54, 0x0702e09b, 
+	0x04b2041c, 0x1fa7557f, 0x044e7c34, 0x1fb57972, 0x03eac9cb, 0x1fc26471, 0x0386f0b9, 0x1fce15fd, 
+	0xf25177fb, 0xe312850c, 0xf3646ace, 0xe2969e8c, 0xf47bbd68, 0xe224ec49, 0xf5970edf, 0xe1bd95b5, 
+	0xe09d6830, 0x063e2e0f, 0xe0789b06, 0x05788511, 0xe058aa81, 0x04b2041c, 0xe03d9b8f, 0x03eac9cb, 
+	0x0322f4d8, 0x1fd88da4, 0x02beda01, 0x1fe1cafd, 0x025aa412, 0x1fe9cdad, 0x01f656e8, 0x1ff09566, 
+	0xf6b5fce9, 0xe160bea9, 0xf7d823f9, 0xe10e875c, 0xf8fd1f65, 0xe0c70c54, 0xfa248988, 0xe08a665c, 
+	0xe027725c, 0x0322f4d8, 0xe0163253, 0x025aa412, 0xe009de1d, 0x0191f65f, 0xe002779f, 0x00c90ab0, 
+	0x0191f65f, 0x1ff621e3, 0x012d8657, 0x1ffa72f0, 0x00c90ab0, 0x1ffd8861, 0x00648748, 0x1fff6217, 
+	0xfb4dfbe4, 0xe058aa81, 0xfc790f47, 0xe031ea03, 0xfda55bee, 0xe0163253, 0xfed279a9, 0xe0058d10

+};

+

+const int twidTab64[4*6 + 16*6] = {

+	0x20000000, 0x00000000, 0x16a09e66, 0x16a09e66, 0x00000000, 0x20000000, 0xe95f619a, 0x16a09e66, 
+	0x20000000, 0x00000000, 0x1d906bcf, 0x0c3ef153, 0x16a09e66, 0x16a09e66, 0x0c3ef153, 0x1d906bcf, 
+	0x20000000, 0x00000000, 0x0c3ef153, 0x1d906bcf, 0xe95f619a, 0x16a09e66, 0xe26f9431, 0xf3c10ead, 
+
+	0x20000000, 0x00000000, 0x1f6297d0, 0x063e2e0f, 0x1d906bcf, 0x0c3ef153, 0x1a9b6629, 0x11c73b3a, 
+	0x20000000, 0x00000000, 0x1fd88da4, 0x0322f4d8, 0x1f6297d0, 0x063e2e0f, 0x1e9f4157, 0x094a0317, 
+	0x20000000, 0x00000000, 0x1e9f4157, 0x094a0317, 0x1a9b6629, 0x11c73b3a, 0x144cf325, 0x18bc806b, 
+	0x16a09e66, 0x16a09e66, 0x11c73b3a, 0x1a9b6629, 0x0c3ef153, 0x1d906bcf, 0x063e2e0f, 0x1f6297d0, 
+	0x1d906bcf, 0x0c3ef153, 0x1c38b2f2, 0x0f15ae9c, 0x1a9b6629, 0x11c73b3a, 0x18bc806b, 0x144cf325, 
+	0x0c3ef153, 0x1d906bcf, 0x0322f4d8, 0x1fd88da4, 0xf9c1d1f1, 0x1f6297d0, 0xf0ea5164, 0x1c38b2f2, 
+	0x00000000, 0x20000000, 0xf9c1d1f1, 0x1f6297d0, 0xf3c10ead, 0x1d906bcf, 0xee38c4c6, 0x1a9b6629, 
+	0x16a09e66, 0x16a09e66, 0x144cf325, 0x18bc806b, 0x11c73b3a, 0x1a9b6629, 0x0f15ae9c, 0x1c38b2f2, 
+	0xe95f619a, 0x16a09e66, 0xe3c74d0e, 0x0f15ae9c, 0xe09d6830, 0x063e2e0f, 0xe027725c, 0xfcdd0b28, 
+	0xe95f619a, 0x16a09e66, 0xe56499d7, 0x11c73b3a, 0xe26f9431, 0x0c3ef153, 0xe09d6830, 0x063e2e0f, 
+	0x0c3ef153, 0x1d906bcf, 0x094a0317, 0x1e9f4157, 0x063e2e0f, 0x1f6297d0, 0x0322f4d8, 0x1fd88da4, 
+	0xe26f9431, 0xf3c10ead, 0xe7437f95, 0xebb30cdb, 0xee38c4c6, 0xe56499d7, 0xf6b5fce9, 0xe160bea9

+};

+

+#else
+
+/* 

+ *  Q30 for 128 and 1024 

+ *

+ * for (i = 0; i < num/4; i++) {

+ *   angle = (i + 0.125) * M_PI / num;

+ *   x = cos(angle) * (1 << 30);

+ *   x = sin(angle) * (1 << 30);

+ * 

+ *   angle = (num/2 - 1 - i + 0.125) * M_PI / num;

+ *   x = cos(angle) * (1 << 30);

+ *   x = sin(angle) * (1 << 30);

+ * }

+ */

+const int cossintab[128 + 1024] = {

+	/* 128 */

+	0x3fffec43, 0x003243f1, 0x015fd4d2, 0x3ffc38d1, 0x3ff9c13a, 0x01c454f5, 0x02f1b755, 0x3feea776, 

+	0x3fe9b8a9, 0x03562038, 0x0483259d, 0x3fd73a4a, 0x3fcfd50b, 0x04e767c5, 0x0613e1c5, 0x3fb5f4ea, 

+	0x3fac1a5b, 0x0677edbb, 0x07a3adff, 0x3f8adc77, 0x3f7e8e1e, 0x08077457, 0x09324ca7, 0x3f55f796, 

+	0x3f473759, 0x0995bdfd, 0x0abf8043, 0x3f174e70, 0x3f061e95, 0x0b228d42, 0x0c4b0b94, 0x3eceeaad, 

+	0x3ebb4ddb, 0x0cada4f5, 0x0dd4b19a, 0x3e7cd778, 0x3e66d0b4, 0x0e36c82a, 0x0f5c35a3, 0x3e212179, 

+	0x3e08b42a, 0x0fbdba40, 0x10e15b4e, 0x3dbbd6d4, 0x3da106bd, 0x11423ef0, 0x1263e699, 0x3d4d0728, 

+	0x3d2fd86c, 0x12c41a4f, 0x13e39be9, 0x3cd4c38b, 0x3cb53aaa, 0x144310dd, 0x15604013, 0x3c531e88, 

+	0x3c314060, 0x15bee78c, 0x16d99864, 0x3bc82c1f, 0x3ba3fde7, 0x173763c9, 0x184f6aab, 0x3b3401bb, 

+	0x3b0d8909, 0x18ac4b87, 0x19c17d44, 0x3a96b636, 0x3a6df8f8, 0x1a1d6544, 0x1b2f971e, 0x39f061d2, 

+	0x39c5664f, 0x1b8a7815, 0x1c997fc4, 0x39411e33, 0x3913eb0e, 0x1cf34baf, 0x1dfeff67, 0x38890663, 

+	0x3859a292, 0x1e57a86d, 0x1f5fdee6, 0x37c836c2, 0x3796a996, 0x1fb7575c, 0x20bbe7d8, 0x36fecd0e, 

+	0x36cb1e2a, 0x21122240, 0x2212e492, 0x362ce855, 0x35f71fb1, 0x2267d3a0, 0x2364a02e, 0x3552a8f4, 

+	0x351acedd, 0x23b836ca, 0x24b0e699, 0x34703095, 0x34364da6, 0x250317df, 0x25f78497, 0x3385a222, 

+	0x3349bf48, 0x264843d9, 0x273847c8, 0x329321c7, 0x32554840, 0x27878893, 0x2872feb6, 0x3198d4ea, 

+	0x31590e3e, 0x28c0b4d2, 0x29a778db, 0x3096e223, 0x30553828, 0x29f3984c, 0x2ad586a3, 0x2f8d713a, 

+	0x2f49ee0f, 0x2b2003ac, 0x2bfcf97c, 0x2e7cab1c, 0x2e37592c, 0x2c45c8a0, 0x2d1da3d5, 0x2d64b9da, 

+	/* 1024 */

+	0x3fffffb1, 0x0006487f, 0x002bfb74, 0x3ffff0e3, 0x3fffe705, 0x00388c6e, 0x005e3f4c, 0x3fffba9b, 

+	0x3fffa6de, 0x006ad03b, 0x009082ea, 0x3fff5cd8, 0x3fff3f3c, 0x009d13c5, 0x00c2c62f, 0x3ffed79b, 

+	0x3ffeb021, 0x00cf56ef, 0x00f508fc, 0x3ffe2ae5, 0x3ffdf98c, 0x01019998, 0x01274b31, 0x3ffd56b5, 

+	0x3ffd1b7e, 0x0133dba3, 0x01598cb1, 0x3ffc5b0c, 0x3ffc15f7, 0x01661cf0, 0x018bcd5b, 0x3ffb37ec, 

+	0x3ffae8f9, 0x01985d60, 0x01be0d11, 0x3ff9ed53, 0x3ff99483, 0x01ca9cd4, 0x01f04bb4, 0x3ff87b44, 

+	0x3ff81896, 0x01fcdb2e, 0x02228924, 0x3ff6e1bf, 0x3ff67534, 0x022f184d, 0x0254c544, 0x3ff520c5, 

+	0x3ff4aa5d, 0x02615414, 0x0286fff3, 0x3ff33858, 0x3ff2b813, 0x02938e62, 0x02b93914, 0x3ff12878, 

+	0x3ff09e56, 0x02c5c71a, 0x02eb7086, 0x3feef126, 0x3fee5d28, 0x02f7fe1c, 0x031da62b, 0x3fec9265, 

+	0x3febf48b, 0x032a3349, 0x034fd9e5, 0x3fea0c35, 0x3fe96480, 0x035c6682, 0x03820b93, 0x3fe75e98, 

+	0x3fe6ad08, 0x038e97a9, 0x03b43b17, 0x3fe48990, 0x3fe3ce26, 0x03c0c69e, 0x03e66852, 0x3fe18d1f, 

+	0x3fe0c7da, 0x03f2f342, 0x04189326, 0x3fde6945, 0x3fdd9a27, 0x04251d77, 0x044abb73, 0x3fdb1e06, 

+	0x3fda450f, 0x0457451d, 0x047ce11a, 0x3fd7ab64, 0x3fd6c894, 0x04896a16, 0x04af03fc, 0x3fd4115f, 

+	0x3fd324b7, 0x04bb8c42, 0x04e123fa, 0x3fd04ffc, 0x3fcf597c, 0x04edab83, 0x051340f6, 0x3fcc673b, 

+	0x3fcb66e4, 0x051fc7b9, 0x05455ad1, 0x3fc8571f, 0x3fc74cf3, 0x0551e0c7, 0x0577716b, 0x3fc41fac, 

+	0x3fc30baa, 0x0583f68c, 0x05a984a6, 0x3fbfc0e3, 0x3fbea30c, 0x05b608eb, 0x05db9463, 0x3fbb3ac7, 

+	0x3fba131b, 0x05e817c3, 0x060da083, 0x3fb68d5b, 0x3fb55bdc, 0x061a22f7, 0x063fa8e7, 0x3fb1b8a2, 

+	0x3fb07d50, 0x064c2a67, 0x0671ad71, 0x3facbc9f, 0x3fab777b, 0x067e2df5, 0x06a3ae00, 0x3fa79954, 

+	0x3fa64a5f, 0x06b02d81, 0x06d5aa77, 0x3fa24ec6, 0x3fa0f600, 0x06e228ee, 0x0707a2b7, 0x3f9cdcf7, 

+	0x3f9b7a62, 0x0714201b, 0x073996a1, 0x3f9743eb, 0x3f95d787, 0x074612eb, 0x076b8616, 0x3f9183a5, 

+	0x3f900d72, 0x0778013d, 0x079d70f7, 0x3f8b9c28, 0x3f8a1c29, 0x07a9eaf5, 0x07cf5726, 0x3f858d79, 

+	0x3f8403ae, 0x07dbcff2, 0x08013883, 0x3f7f579b, 0x3f7dc405, 0x080db016, 0x083314f1, 0x3f78fa92, 

+	0x3f775d31, 0x083f8b43, 0x0864ec4f, 0x3f727661, 0x3f70cf38, 0x08716159, 0x0896be80, 0x3f6bcb0e, 

+	0x3f6a1a1c, 0x08a3323a, 0x08c88b65, 0x3f64f89b, 0x3f633de2, 0x08d4fdc6, 0x08fa52de, 0x3f5dff0e, 

+	0x3f5c3a8f, 0x0906c3e0, 0x092c14ce, 0x3f56de6a, 0x3f551026, 0x09388469, 0x095dd116, 0x3f4f96b4, 

+	0x3f4dbeac, 0x096a3f42, 0x098f8796, 0x3f4827f0, 0x3f464626, 0x099bf44c, 0x09c13831, 0x3f409223, 

+	0x3f3ea697, 0x09cda368, 0x09f2e2c7, 0x3f38d552, 0x3f36e006, 0x09ff4c78, 0x0a24873a, 0x3f30f181, 

+	0x3f2ef276, 0x0a30ef5e, 0x0a56256c, 0x3f28e6b6, 0x3f26ddec, 0x0a628bfa, 0x0a87bd3d, 0x3f20b4f5, 

+	0x3f1ea26e, 0x0a94222f, 0x0ab94e8f, 0x3f185c43, 0x3f164001, 0x0ac5b1dc, 0x0aead944, 0x3f0fdca5, 

+	0x3f0db6a9, 0x0af73ae5, 0x0b1c5d3d, 0x3f073621, 0x3f05066d, 0x0b28bd2a, 0x0b4dda5c, 0x3efe68bc, 

+	0x3efc2f50, 0x0b5a388d, 0x0b7f5081, 0x3ef5747b, 0x3ef3315a, 0x0b8bacf0, 0x0bb0bf8f, 0x3eec5965, 

+	0x3eea0c8e, 0x0bbd1a33, 0x0be22766, 0x3ee3177e, 0x3ee0c0f4, 0x0bee8038, 0x0c1387e9, 0x3ed9aecc, 

+	0x3ed74e91, 0x0c1fdee1, 0x0c44e0f9, 0x3ed01f55, 0x3ecdb56a, 0x0c513610, 0x0c763278, 0x3ec66920, 

+	0x3ec3f585, 0x0c8285a5, 0x0ca77c47, 0x3ebc8c31, 0x3eba0ee9, 0x0cb3cd84, 0x0cd8be47, 0x3eb2888f, 

+	0x3eb0019c, 0x0ce50d8c, 0x0d09f85b, 0x3ea85e41, 0x3ea5cda3, 0x0d1645a0, 0x0d3b2a64, 0x3e9e0d4c, 

+	0x3e9b7306, 0x0d4775a1, 0x0d6c5443, 0x3e9395b7, 0x3e90f1ca, 0x0d789d71, 0x0d9d75db, 0x3e88f788, 

+	0x3e8649f5, 0x0da9bcf2, 0x0dce8f0d, 0x3e7e32c6, 0x3e7b7b90, 0x0ddad406, 0x0dff9fba, 0x3e734778, 

+	0x3e70869f, 0x0e0be28e, 0x0e30a7c5, 0x3e6835a4, 0x3e656b2b, 0x0e3ce86b, 0x0e61a70f, 0x3e5cfd51, 

+	0x3e5a2939, 0x0e6de580, 0x0e929d7a, 0x3e519e86, 0x3e4ec0d1, 0x0e9ed9af, 0x0ec38ae8, 0x3e46194a, 

+	0x3e4331fa, 0x0ecfc4d9, 0x0ef46f3b, 0x3e3a6da4, 0x3e377cbb, 0x0f00a6df, 0x0f254a53, 0x3e2e9b9c, 

+	0x3e2ba11b, 0x0f317fa5, 0x0f561c15, 0x3e22a338, 0x3e1f9f21, 0x0f624f0c, 0x0f86e460, 0x3e168480, 

+	0x3e1376d5, 0x0f9314f5, 0x0fb7a317, 0x3e0a3f7b, 0x3e07283f, 0x0fc3d143, 0x0fe8581d, 0x3dfdd432, 

+	0x3dfab365, 0x0ff483d7, 0x10190352, 0x3df142ab, 0x3dee1851, 0x10252c94, 0x1049a49a, 0x3de48aef, 

+	0x3de15708, 0x1055cb5b, 0x107a3bd5, 0x3dd7ad05, 0x3dd46f94, 0x1086600e, 0x10aac8e6, 0x3dcaa8f5, 

+	0x3dc761fc, 0x10b6ea90, 0x10db4baf, 0x3dbd7ec7, 0x3dba2e48, 0x10e76ac3, 0x110bc413, 0x3db02e84, 

+	0x3dacd481, 0x1117e088, 0x113c31f3, 0x3da2b834, 0x3d9f54af, 0x11484bc2, 0x116c9531, 0x3d951bde, 

+	0x3d91aed9, 0x1178ac53, 0x119cedaf, 0x3d87598c, 0x3d83e309, 0x11a9021d, 0x11cd3b50, 0x3d797145, 

+	0x3d75f147, 0x11d94d02, 0x11fd7df6, 0x3d6b6313, 0x3d67d99b, 0x12098ce5, 0x122db583, 0x3d5d2efe, 

+	0x3d599c0e, 0x1239c1a7, 0x125de1da, 0x3d4ed50f, 0x3d4b38aa, 0x1269eb2b, 0x128e02dc, 0x3d40554e, 

+	0x3d3caf76, 0x129a0954, 0x12be186c, 0x3d31afc5, 0x3d2e007c, 0x12ca1c03, 0x12ee226c, 0x3d22e47c, 

+	0x3d1f2bc5, 0x12fa231b, 0x131e20c0, 0x3d13f37e, 0x3d10315a, 0x132a1e7e, 0x134e1348, 0x3d04dcd2, 

+	0x3d011145, 0x135a0e0e, 0x137df9e7, 0x3cf5a082, 0x3cf1cb8e, 0x1389f1af, 0x13add481, 0x3ce63e98, 

+	0x3ce2603f, 0x13b9c943, 0x13dda2f7, 0x3cd6b71e, 0x3cd2cf62, 0x13e994ab, 0x140d652c, 0x3cc70a1c, 

+	0x3cc318ff, 0x141953cb, 0x143d1b02, 0x3cb7379c, 0x3cb33d22, 0x14490685, 0x146cc45c, 0x3ca73fa9, 

+	0x3ca33bd3, 0x1478acbc, 0x149c611d, 0x3c97224c, 0x3c93151d, 0x14a84652, 0x14cbf127, 0x3c86df8e, 

+	0x3c82c909, 0x14d7d32a, 0x14fb745e, 0x3c76777b, 0x3c7257a2, 0x15075327, 0x152aeaa3, 0x3c65ea1c, 

+	0x3c61c0f1, 0x1536c62b, 0x155a53d9, 0x3c55377b, 0x3c510501, 0x15662c18, 0x1589afe3, 0x3c445fa2, 

+	0x3c4023dd, 0x159584d3, 0x15b8fea4, 0x3c33629d, 0x3c2f1d8e, 0x15c4d03e, 0x15e83fff, 0x3c224075, 

+	0x3c1df21f, 0x15f40e3a, 0x161773d6, 0x3c10f935, 0x3c0ca19b, 0x16233eac, 0x16469a0d, 0x3bff8ce8, 

+	0x3bfb2c0c, 0x16526176, 0x1675b286, 0x3bedfb99, 0x3be9917e, 0x1681767c, 0x16a4bd25, 0x3bdc4552, 

+	0x3bd7d1fa, 0x16b07d9f, 0x16d3b9cc, 0x3bca6a1d, 0x3bc5ed8d, 0x16df76c3, 0x1702a85e, 0x3bb86a08, 

+	0x3bb3e440, 0x170e61cc, 0x173188be, 0x3ba6451b, 0x3ba1b620, 0x173d3e9b, 0x17605ad0, 0x3b93fb63, 

+	0x3b8f6337, 0x176c0d15, 0x178f1e76, 0x3b818ceb, 0x3b7ceb90, 0x179acd1c, 0x17bdd394, 0x3b6ef9be, 

+	0x3b6a4f38, 0x17c97e93, 0x17ec7a0d, 0x3b5c41e8, 0x3b578e39, 0x17f8215e, 0x181b11c4, 0x3b496574, 

+	0x3b44a8a0, 0x1826b561, 0x18499a9d, 0x3b36646e, 0x3b319e77, 0x18553a7d, 0x1878147a, 0x3b233ee1, 

+	0x3b1e6fca, 0x1883b097, 0x18a67f3f, 0x3b0ff4d9, 0x3b0b1ca6, 0x18b21791, 0x18d4dad0, 0x3afc8663, 

+	0x3af7a516, 0x18e06f50, 0x1903270f, 0x3ae8f38b, 0x3ae40926, 0x190eb7b7, 0x193163e1, 0x3ad53c5b, 

+	0x3ad048e3, 0x193cf0a9, 0x195f9128, 0x3ac160e1, 0x3abc6458, 0x196b1a09, 0x198daec8, 0x3aad6129, 

+	0x3aa85b92, 0x199933bb, 0x19bbbca6, 0x3a993d3e, 0x3a942e9d, 0x19c73da3, 0x19e9baa3, 0x3a84f52f, 

+	0x3a7fdd86, 0x19f537a4, 0x1a17a8a5, 0x3a708906, 0x3a6b6859, 0x1a2321a2, 0x1a45868e, 0x3a5bf8d1, 

+	0x3a56cf23, 0x1a50fb81, 0x1a735442, 0x3a47449c, 0x3a4211f0, 0x1a7ec524, 0x1aa111a6, 0x3a326c74, 

+	0x3a2d30cd, 0x1aac7e6f, 0x1acebe9d, 0x3a1d7066, 0x3a182bc8, 0x1ada2746, 0x1afc5b0a, 0x3a08507f, 

+	0x3a0302ed, 0x1b07bf8c, 0x1b29e6d2, 0x39f30ccc, 0x39edb649, 0x1b354727, 0x1b5761d8, 0x39dda55a, 

+	0x39d845e9, 0x1b62bdf8, 0x1b84cc01, 0x39c81a36, 0x39c2b1da, 0x1b9023e5, 0x1bb22530, 0x39b26b6d, 

+	0x39acfa2b, 0x1bbd78d2, 0x1bdf6d4a, 0x399c990d, 0x39971ee7, 0x1beabca1, 0x1c0ca432, 0x3986a324, 

+	0x3981201e, 0x1c17ef39, 0x1c39c9cd, 0x397089bf, 0x396afddc, 0x1c45107c, 0x1c66ddfe, 0x395a4ceb, 

+	0x3954b82e, 0x1c72204f, 0x1c93e0ab, 0x3943ecb6, 0x393e4f23, 0x1c9f1e96, 0x1cc0d1b6, 0x392d692f, 

+	0x3927c2c9, 0x1ccc0b35, 0x1cedb106, 0x3916c262, 0x3911132d, 0x1cf8e611, 0x1d1a7e7d, 0x38fff85e, 

+	0x38fa405e, 0x1d25af0d, 0x1d473a00, 0x38e90b31, 0x38e34a69, 0x1d52660f, 0x1d73e374, 0x38d1fae9, 

+	0x38cc315d, 0x1d7f0afb, 0x1da07abc, 0x38bac795, 0x38b4f547, 0x1dab9db5, 0x1dccffbf, 0x38a37142, 

+	0x389d9637, 0x1dd81e21, 0x1df9725f, 0x388bf7ff, 0x3886143b, 0x1e048c24, 0x1e25d282, 0x38745bdb, 

+	0x386e6f60, 0x1e30e7a4, 0x1e52200c, 0x385c9ce3, 0x3856a7b6, 0x1e5d3084, 0x1e7e5ae2, 0x3844bb28, 

+	0x383ebd4c, 0x1e8966a8, 0x1eaa82e9, 0x382cb6b7, 0x3826b030, 0x1eb589f7, 0x1ed69805, 0x38148f9f, 

+	0x380e8071, 0x1ee19a54, 0x1f029a1c, 0x37fc45ef, 0x37f62e1d, 0x1f0d97a5, 0x1f2e8911, 0x37e3d9b7, 

+	0x37ddb945, 0x1f3981ce, 0x1f5a64cb, 0x37cb4b04, 0x37c521f6, 0x1f6558b5, 0x1f862d2d, 0x37b299e7, 

+	0x37ac6841, 0x1f911c3d, 0x1fb1e21d, 0x3799c66f, 0x37938c34, 0x1fbccc4d, 0x1fdd8381, 0x3780d0aa, 

+	0x377a8ddf, 0x1fe868c8, 0x2009113c, 0x3767b8a9, 0x37616d51, 0x2013f196, 0x20348b35, 0x374e7e7b, 

+	0x37482a9a, 0x203f6699, 0x205ff14f, 0x3735222f, 0x372ec5c9, 0x206ac7b8, 0x208b4372, 0x371ba3d4, 

+	0x37153eee, 0x209614d9, 0x20b68181, 0x3702037c, 0x36fb9618, 0x20c14ddf, 0x20e1ab63, 0x36e84135, 

+	0x36e1cb58, 0x20ec72b1, 0x210cc0fc, 0x36ce5d10, 0x36c7debd, 0x21178334, 0x2137c232, 0x36b4571b, 

+	0x36add058, 0x21427f4d, 0x2162aeea, 0x369a2f69, 0x3693a038, 0x216d66e2, 0x218d870b, 0x367fe608, 

+	0x36794e6e, 0x219839d8, 0x21b84a79, 0x36657b08, 0x365edb09, 0x21c2f815, 0x21e2f91a, 0x364aee7b, 

+	0x3644461b, 0x21eda17f, 0x220d92d4, 0x36304070, 0x36298fb4, 0x221835fb, 0x2238178d, 0x361570f8, 

+	0x360eb7e3, 0x2242b56f, 0x22628729, 0x35fa8023, 0x35f3beba, 0x226d1fc1, 0x228ce191, 0x35df6e03, 

+	0x35d8a449, 0x229774d7, 0x22b726a8, 0x35c43aa7, 0x35bd68a1, 0x22c1b496, 0x22e15655, 0x35a8e621, 

+	0x35a20bd3, 0x22ebdee5, 0x230b707e, 0x358d7081, 0x35868def, 0x2315f3a8, 0x23357509, 0x3571d9d9, 

+	0x356aef08, 0x233ff2c8, 0x235f63dc, 0x35562239, 0x354f2f2c, 0x2369dc29, 0x23893cdd, 0x353a49b2, 

+	0x35334e6f, 0x2393afb2, 0x23b2fff3, 0x351e5056, 0x35174ce0, 0x23bd6d48, 0x23dcad03, 0x35023636, 

+	0x34fb2a92, 0x23e714d3, 0x240643f4, 0x34e5fb63, 0x34dee795, 0x2410a639, 0x242fc4ad, 0x34c99fef, 

+	0x34c283fb, 0x243a215f, 0x24592f13, 0x34ad23eb, 0x34a5ffd5, 0x2463862c, 0x2482830d, 0x34908768, 

+	0x34895b36, 0x248cd487, 0x24abc082, 0x3473ca79, 0x346c962f, 0x24b60c57, 0x24d4e757, 0x3456ed2f, 

+	0x344fb0d1, 0x24df2d81, 0x24fdf775, 0x3439ef9c, 0x3432ab2e, 0x250837ed, 0x2526f0c1, 0x341cd1d2, 

+	0x34158559, 0x25312b81, 0x254fd323, 0x33ff93e2, 0x33f83f62, 0x255a0823, 0x25789e80, 0x33e235df, 

+	0x33dad95e, 0x2582cdbc, 0x25a152c0, 0x33c4b7db, 0x33bd535c, 0x25ab7c30, 0x25c9efca, 0x33a719e8, 

+	0x339fad70, 0x25d41369, 0x25f27584, 0x33895c18, 0x3381e7ac, 0x25fc934b, 0x261ae3d6, 0x336b7e7e, 

+	0x33640223, 0x2624fbbf, 0x26433aa7, 0x334d812d, 0x3345fce6, 0x264d4cac, 0x266b79dd, 0x332f6435, 

+	0x3327d808, 0x267585f8, 0x2693a161, 0x331127ab, 0x3309939c, 0x269da78b, 0x26bbb119, 0x32f2cba1, 

+	0x32eb2fb5, 0x26c5b14c, 0x26e3a8ec, 0x32d45029, 0x32ccac64, 0x26eda322, 0x270b88c2, 0x32b5b557, 

+	0x32ae09be, 0x27157cf5, 0x27335082, 0x3296fb3d, 0x328f47d5, 0x273d3eac, 0x275b0014, 0x327821ee, 

+	0x327066bc, 0x2764e82f, 0x27829760, 0x3259297d, 0x32516686, 0x278c7965, 0x27aa164c, 0x323a11fe, 

+	0x32324746, 0x27b3f235, 0x27d17cc1, 0x321adb83, 0x3213090f, 0x27db5288, 0x27f8caa5, 0x31fb8620, 

+	0x31f3abf5, 0x28029a45, 0x281fffe2, 0x31dc11e8, 0x31d4300b, 0x2829c954, 0x28471c5e, 0x31bc7eee, 

+	0x31b49564, 0x2850df9d, 0x286e2002, 0x319ccd46, 0x3194dc14, 0x2877dd07, 0x28950ab6, 0x317cfd04, 

+	0x3175042e, 0x289ec17a, 0x28bbdc61, 0x315d0e3b, 0x31550dc6, 0x28c58cdf, 0x28e294eb, 0x313d00ff, 

+	0x3134f8f1, 0x28ec3f1e, 0x2909343e, 0x311cd564, 0x3114c5c0, 0x2912d81f, 0x292fba40, 0x30fc8b7d, 

+	0x30f47449, 0x293957c9, 0x295626da, 0x30dc235e, 0x30d404a0, 0x295fbe06, 0x297c79f5, 0x30bb9d1c, 

+	0x30b376d8, 0x29860abd, 0x29a2b378, 0x309af8ca, 0x3092cb05, 0x29ac3dd7, 0x29c8d34d, 0x307a367c, 

+	0x3072013c, 0x29d2573c, 0x29eed95b, 0x30595648, 0x30511991, 0x29f856d5, 0x2a14c58b, 0x30385840, 

+	0x30301418, 0x2a1e3c8a, 0x2a3a97c7, 0x30173c7a, 0x300ef0e5, 0x2a440844, 0x2a604ff5, 0x2ff6030a, 

+	0x2fedb00d, 0x2a69b9ec, 0x2a85ee00, 0x2fd4ac04, 0x2fcc51a5, 0x2a8f516b, 0x2aab71d0, 0x2fb3377c, 

+	0x2faad5c1, 0x2ab4cea9, 0x2ad0db4e, 0x2f91a589, 0x2f893c75, 0x2ada318e, 0x2af62a63, 0x2f6ff63d, 

+	0x2f6785d7, 0x2aff7a05, 0x2b1b5ef8, 0x2f4e29af, 0x2f45b1fb, 0x2b24a7f6, 0x2b4078f5, 0x2f2c3ff2, 

+	0x2f23c0f6, 0x2b49bb4a, 0x2b657844, 0x2f0a391d, 0x2f01b2de, 0x2b6eb3ea, 0x2b8a5cce, 0x2ee81543, 

+	0x2edf87c6, 0x2b9391c0, 0x2baf267d, 0x2ec5d479, 0x2ebd3fc4, 0x2bb854b4, 0x2bd3d53a, 0x2ea376d6, 

+	0x2e9adaee, 0x2bdcfcb0, 0x2bf868ed, 0x2e80fc6e, 0x2e785958, 0x2c01899e, 0x2c1ce181, 0x2e5e6556, 

+	0x2e55bb17, 0x2c25fb66, 0x2c413edf, 0x2e3bb1a4, 0x2e330042, 0x2c4a51f3, 0x2c6580f1, 0x2e18e16d, 

+	0x2e1028ed, 0x2c6e8d2e, 0x2c89a79f, 0x2df5f4c7, 0x2ded352f, 0x2c92ad01, 0x2cadb2d5, 0x2dd2ebc7, 

+	0x2dca251c, 0x2cb6b155, 0x2cd1a27b, 0x2dafc683, 0x2da6f8ca, 0x2cda9a14, 0x2cf5767c, 0x2d8c8510, 

+	0x2d83b04f, 0x2cfe6728, 0x2d192ec1, 0x2d692784, 0x2d604bc0, 0x2d22187a, 0x2d3ccb34, 0x2d45adf6

+};
+
+const int twidTab512[8*6 + 32*6 + 128*6] = {

+	0x40000000, 0x00000000, 0x40000000, 0x00000000, 0x40000000, 0x00000000, 0x3b20d79e, 0x187de2a6, 

+	0x3ec52f9f, 0x0c7c5c1e, 0x3536cc52, 0x238e7673, 0x2d413ccc, 0x2d413ccc, 0x3b20d79e, 0x187de2a6, 

+	0x187de2a6, 0x3b20d79e, 0x187de2a6, 0x3b20d79e, 0x3536cc52, 0x238e7673, 0xf383a3e2, 0x3ec52f9f, 

+	0x00000000, 0x40000000, 0x2d413ccc, 0x2d413ccc, 0xd2bec334, 0x2d413ccc, 0xe7821d5a, 0x3b20d79e, 

+	0x238e7673, 0x3536cc52, 0xc13ad061, 0x0c7c5c1e, 0xd2bec334, 0x2d413ccc, 0x187de2a6, 0x3b20d79e, 

+	0xc4df2862, 0xe7821d5a, 0xc4df2862, 0x187de2a6, 0x0c7c5c1e, 0x3ec52f9f, 0xdc71898d, 0xcac933ae, 

+

+	0x40000000, 0x00000000, 0x40000000, 0x00000000, 0x40000000, 0x00000000, 0x3fb11b47, 0x0645e9af, 

+	0x3fec43c6, 0x0323ecbe, 0x3f4eaafe, 0x09640837, 0x3ec52f9f, 0x0c7c5c1e, 0x3fb11b47, 0x0645e9af, 

+	0x3d3e82ad, 0x1294062e, 0x3d3e82ad, 0x1294062e, 0x3f4eaafe, 0x09640837, 0x39daf5e8, 0x1b5d1009, 

+	0x3b20d79e, 0x187de2a6, 0x3ec52f9f, 0x0c7c5c1e, 0x3536cc52, 0x238e7673, 0x387165e3, 0x1e2b5d38, 

+	0x3e14fdf7, 0x0f8cfcbd, 0x2f6bbe44, 0x2afad269, 0x3536cc52, 0x238e7673, 0x3d3e82ad, 0x1294062e, 

+	0x2899e64a, 0x317900d6, 0x317900d6, 0x2899e64a, 0x3c424209, 0x158f9a75, 0x20e70f32, 0x36e5068a, 

+	0x2d413ccc, 0x2d413ccc, 0x3b20d79e, 0x187de2a6, 0x187de2a6, 0x3b20d79e, 0x2899e64a, 0x317900d6, 

+	0x39daf5e8, 0x1b5d1009, 0x0f8cfcbd, 0x3e14fdf7, 0x238e7673, 0x3536cc52, 0x387165e3, 0x1e2b5d38, 

+	0x0645e9af, 0x3fb11b47, 0x1e2b5d38, 0x387165e3, 0x36e5068a, 0x20e70f32, 0xfcdc1342, 0x3fec43c6, 

+	0x187de2a6, 0x3b20d79e, 0x3536cc52, 0x238e7673, 0xf383a3e2, 0x3ec52f9f, 0x1294062e, 0x3d3e82ad, 

+	0x3367c08f, 0x261feff9, 0xea70658b, 0x3c424209, 0x0c7c5c1e, 0x3ec52f9f, 0x317900d6, 0x2899e64a, 

+	0xe1d4a2c8, 0x387165e3, 0x0645e9af, 0x3fb11b47, 0x2f6bbe44, 0x2afad269, 0xd9e01007, 0x3367c08f, 

+	0x00000000, 0x40000000, 0x2d413ccc, 0x2d413ccc, 0xd2bec334, 0x2d413ccc, 0xf9ba1651, 0x3fb11b47, 

+	0x2afad269, 0x2f6bbe44, 0xcc983f71, 0x261feff9, 0xf383a3e2, 0x3ec52f9f, 0x2899e64a, 0x317900d6, 

+	0xc78e9a1d, 0x1e2b5d38, 0xed6bf9d2, 0x3d3e82ad, 0x261feff9, 0x3367c08f, 0xc3bdbdf7, 0x158f9a75, 

+	0xe7821d5a, 0x3b20d79e, 0x238e7673, 0x3536cc52, 0xc13ad061, 0x0c7c5c1e, 0xe1d4a2c8, 0x387165e3, 

+	0x20e70f32, 0x36e5068a, 0xc013bc3a, 0x0323ecbe, 0xdc71898d, 0x3536cc52, 0x1e2b5d38, 0x387165e3, 

+	0xc04ee4b9, 0xf9ba1651, 0xd76619b6, 0x317900d6, 0x1b5d1009, 0x39daf5e8, 0xc1eb0209, 0xf0730343, 

+	0xd2bec334, 0x2d413ccc, 0x187de2a6, 0x3b20d79e, 0xc4df2862, 0xe7821d5a, 0xce86ff2a, 0x2899e64a, 

+	0x158f9a75, 0x3c424209, 0xc91af976, 0xdf18f0ce, 0xcac933ae, 0x238e7673, 0x1294062e, 0x3d3e82ad, 

+	0xce86ff2a, 0xd76619b6, 0xc78e9a1d, 0x1e2b5d38, 0x0f8cfcbd, 0x3e14fdf7, 0xd5052d97, 0xd09441bc, 

+	0xc4df2862, 0x187de2a6, 0x0c7c5c1e, 0x3ec52f9f, 0xdc71898d, 0xcac933ae, 0xc2c17d53, 0x1294062e, 

+	0x09640837, 0x3f4eaafe, 0xe4a2eff7, 0xc6250a18, 0xc13ad061, 0x0c7c5c1e, 0x0645e9af, 0x3fb11b47, 

+	0xed6bf9d2, 0xc2c17d53, 0xc04ee4b9, 0x0645e9af, 0x0323ecbe, 0x3fec43c6, 0xf69bf7c9, 0xc0b15502, 

+

+	0x40000000, 0x00000000, 0x40000000, 0x00000000, 0x40000000, 0x00000000, 0x3ffb10c1, 0x0192155f, 

+	0x3ffec42d, 0x00c90e8f, 0x3ff4e5df, 0x025b0cae, 0x3fec43c6, 0x0323ecbe, 0x3ffb10c1, 0x0192155f, 

+	0x3fd39b5a, 0x04b54824, 0x3fd39b5a, 0x04b54824, 0x3ff4e5df, 0x025b0cae, 0x3f9c2bfa, 0x070de171, 

+	0x3fb11b47, 0x0645e9af, 0x3fec43c6, 0x0323ecbe, 0x3f4eaafe, 0x09640837, 0x3f84c8e1, 0x07d59395, 

+	0x3fe12acb, 0x03ecadcf, 0x3eeb3347, 0x0bb6ecef, 0x3f4eaafe, 0x09640837, 0x3fd39b5a, 0x04b54824, 

+	0x3e71e758, 0x0e05c135, 0x3f0ec9f4, 0x0af10a22, 0x3fc395f9, 0x057db402, 0x3de2f147, 0x104fb80e, 

+	0x3ec52f9f, 0x0c7c5c1e, 0x3fb11b47, 0x0645e9af, 0x3d3e82ad, 0x1294062e, 0x3e71e758, 0x0e05c135, 

+	0x3f9c2bfa, 0x070de171, 0x3c84d496, 0x14d1e242, 0x3e14fdf7, 0x0f8cfcbd, 0x3f84c8e1, 0x07d59395, 

+	0x3bb6276d, 0x17088530, 0x3dae81ce, 0x1111d262, 0x3f6af2e3, 0x089cf867, 0x3ad2c2e7, 0x19372a63, 

+	0x3d3e82ad, 0x1294062e, 0x3f4eaafe, 0x09640837, 0x39daf5e8, 0x1b5d1009, 0x3cc511d8, 0x14135c94, 

+	0x3f2ff249, 0x0a2abb58, 0x38cf1669, 0x1d79775b, 0x3c424209, 0x158f9a75, 0x3f0ec9f4, 0x0af10a22, 

+	0x37af8158, 0x1f8ba4db, 0x3bb6276d, 0x17088530, 0x3eeb3347, 0x0bb6ecef, 0x367c9a7d, 0x2192e09a, 

+	0x3b20d79e, 0x187de2a6, 0x3ec52f9f, 0x0c7c5c1e, 0x3536cc52, 0x238e7673, 0x3a8269a2, 0x19ef7943, 

+	0x3e9cc076, 0x0d415012, 0x33de87de, 0x257db64b, 0x39daf5e8, 0x1b5d1009, 0x3e71e758, 0x0e05c135, 

+	0x32744493, 0x275ff452, 0x392a9642, 0x1cc66e99, 0x3e44a5ee, 0x0ec9a7f2, 0x30f8801f, 0x29348937, 

+	0x387165e3, 0x1e2b5d38, 0x3e14fdf7, 0x0f8cfcbd, 0x2f6bbe44, 0x2afad269, 0x37af8158, 0x1f8ba4db, 

+	0x3de2f147, 0x104fb80e, 0x2dce88a9, 0x2cb2324b, 0x36e5068a, 0x20e70f32, 0x3dae81ce, 0x1111d262, 

+	0x2c216eaa, 0x2e5a106f, 0x361214b0, 0x223d66a8, 0x3d77b191, 0x11d3443f, 0x2a650525, 0x2ff1d9c6, 

+	0x3536cc52, 0x238e7673, 0x3d3e82ad, 0x1294062e, 0x2899e64a, 0x317900d6, 0x34534f40, 0x24da0a99, 

+	0x3d02f756, 0x135410c2, 0x26c0b162, 0x32eefde9, 0x3367c08f, 0x261feff9, 0x3cc511d8, 0x14135c94, 

+	0x24da0a99, 0x34534f40, 0x32744493, 0x275ff452, 0x3c84d496, 0x14d1e242, 0x22e69ac7, 0x35a5793c, 

+	0x317900d6, 0x2899e64a, 0x3c424209, 0x158f9a75, 0x20e70f32, 0x36e5068a, 0x30761c17, 0x29cd9577, 

+	0x3bfd5cc4, 0x164c7ddd, 0x1edc1952, 0x3811884c, 0x2f6bbe44, 0x2afad269, 0x3bb6276d, 0x17088530, 

+	0x1cc66e99, 0x392a9642, 0x2e5a106f, 0x2c216eaa, 0x3b6ca4c4, 0x17c3a931, 0x1aa6c82b, 0x3a2fcee8, 

+	0x2d413ccc, 0x2d413ccc, 0x3b20d79e, 0x187de2a6, 0x187de2a6, 0x3b20d79e, 0x2c216eaa, 0x2e5a106f, 

+	0x3ad2c2e7, 0x19372a63, 0x164c7ddd, 0x3bfd5cc4, 0x2afad269, 0x2f6bbe44, 0x3a8269a2, 0x19ef7943, 

+	0x14135c94, 0x3cc511d8, 0x29cd9577, 0x30761c17, 0x3a2fcee8, 0x1aa6c82b, 0x11d3443f, 0x3d77b191, 

+	0x2899e64a, 0x317900d6, 0x39daf5e8, 0x1b5d1009, 0x0f8cfcbd, 0x3e14fdf7, 0x275ff452, 0x32744493, 

+	0x3983e1e7, 0x1c1249d8, 0x0d415012, 0x3e9cc076, 0x261feff9, 0x3367c08f, 0x392a9642, 0x1cc66e99, 

+	0x0af10a22, 0x3f0ec9f4, 0x24da0a99, 0x34534f40, 0x38cf1669, 0x1d79775b, 0x089cf867, 0x3f6af2e3, 

+	0x238e7673, 0x3536cc52, 0x387165e3, 0x1e2b5d38, 0x0645e9af, 0x3fb11b47, 0x223d66a8, 0x361214b0, 

+	0x3811884c, 0x1edc1952, 0x03ecadcf, 0x3fe12acb, 0x20e70f32, 0x36e5068a, 0x37af8158, 0x1f8ba4db, 

+	0x0192155f, 0x3ffb10c1, 0x1f8ba4db, 0x37af8158, 0x374b54ce, 0x2039f90e, 0xff36f171, 0x3ffec42d, 

+	0x1e2b5d38, 0x387165e3, 0x36e5068a, 0x20e70f32, 0xfcdc1342, 0x3fec43c6, 0x1cc66e99, 0x392a9642, 

+	0x367c9a7d, 0x2192e09a, 0xfa824bfe, 0x3fc395f9, 0x1b5d1009, 0x39daf5e8, 0x361214b0, 0x223d66a8, 

+	0xf82a6c6b, 0x3f84c8e1, 0x19ef7943, 0x3a8269a2, 0x35a5793c, 0x22e69ac7, 0xf5d544a8, 0x3f2ff249, 

+	0x187de2a6, 0x3b20d79e, 0x3536cc52, 0x238e7673, 0xf383a3e2, 0x3ec52f9f, 0x17088530, 0x3bb6276d, 

+	0x34c61236, 0x2434f332, 0xf136580e, 0x3e44a5ee, 0x158f9a75, 0x3c424209, 0x34534f40, 0x24da0a99, 

+	0xeeee2d9e, 0x3dae81ce, 0x14135c94, 0x3cc511d8, 0x33de87de, 0x257db64b, 0xecabef3e, 0x3d02f756, 

+	0x1294062e, 0x3d3e82ad, 0x3367c08f, 0x261feff9, 0xea70658b, 0x3c424209, 0x1111d262, 0x3dae81ce, 

+	0x32eefde9, 0x26c0b162, 0xe83c56cf, 0x3b6ca4c4, 0x0f8cfcbd, 0x3e14fdf7, 0x32744493, 0x275ff452, 

+	0xe61086bd, 0x3a8269a2, 0x0e05c135, 0x3e71e758, 0x31f79947, 0x27fdb2a6, 0xe3edb628, 0x3983e1e7, 

+	0x0c7c5c1e, 0x3ec52f9f, 0x317900d6, 0x2899e64a, 0xe1d4a2c8, 0x387165e3, 0x0af10a22, 0x3f0ec9f4, 

+	0x30f8801f, 0x29348937, 0xdfc606f2, 0x374b54ce, 0x09640837, 0x3f4eaafe, 0x30761c17, 0x29cd9577, 

+	0xddc29958, 0x361214b0, 0x07d59395, 0x3f84c8e1, 0x2ff1d9c6, 0x2a650525, 0xdbcb0cce, 0x34c61236, 

+	0x0645e9af, 0x3fb11b47, 0x2f6bbe44, 0x2afad269, 0xd9e01007, 0x3367c08f, 0x04b54824, 0x3fd39b5a, 

+	0x2ee3cebe, 0x2b8ef77c, 0xd8024d5a, 0x31f79947, 0x0323ecbe, 0x3fec43c6, 0x2e5a106f, 0x2c216eaa, 

+	0xd6326a89, 0x30761c17, 0x0192155f, 0x3ffb10c1, 0x2dce88a9, 0x2cb2324b, 0xd4710884, 0x2ee3cebe, 

+	0x00000000, 0x40000000, 0x2d413ccc, 0x2d413ccc, 0xd2bec334, 0x2d413ccc, 0xfe6deaa1, 0x3ffb10c1, 

+	0x2cb2324b, 0x2dce88a9, 0xd11c3142, 0x2b8ef77c, 0xfcdc1342, 0x3fec43c6, 0x2c216eaa, 0x2e5a106f, 

+	0xcf89e3e9, 0x29cd9577, 0xfb4ab7dc, 0x3fd39b5a, 0x2b8ef77c, 0x2ee3cebe, 0xce0866b9, 0x27fdb2a6, 

+	0xf9ba1651, 0x3fb11b47, 0x2afad269, 0x2f6bbe44, 0xcc983f71, 0x261feff9, 0xf82a6c6b, 0x3f84c8e1, 

+	0x2a650525, 0x2ff1d9c6, 0xcb39edca, 0x2434f332, 0xf69bf7c9, 0x3f4eaafe, 0x29cd9577, 0x30761c17, 

+	0xc9edeb50, 0x223d66a8, 0xf50ef5de, 0x3f0ec9f4, 0x29348937, 0x30f8801f, 0xc8b4ab32, 0x2039f90e, 

+	0xf383a3e2, 0x3ec52f9f, 0x2899e64a, 0x317900d6, 0xc78e9a1d, 0x1e2b5d38, 0xf1fa3ecb, 0x3e71e758, 

+	0x27fdb2a6, 0x31f79947, 0xc67c1e19, 0x1c1249d8, 0xf0730343, 0x3e14fdf7, 0x275ff452, 0x32744493, 

+	0xc57d965e, 0x19ef7943, 0xeeee2d9e, 0x3dae81ce, 0x26c0b162, 0x32eefde9, 0xc4935b3c, 0x17c3a931, 

+	0xed6bf9d2, 0x3d3e82ad, 0x261feff9, 0x3367c08f, 0xc3bdbdf7, 0x158f9a75, 0xebeca36c, 0x3cc511d8, 

+	0x257db64b, 0x33de87de, 0xc2fd08aa, 0x135410c2, 0xea70658b, 0x3c424209, 0x24da0a99, 0x34534f40, 

+	0xc2517e32, 0x1111d262, 0xe8f77ad0, 0x3bb6276d, 0x2434f332, 0x34c61236, 0xc1bb5a12, 0x0ec9a7f2, 

+	0xe7821d5a, 0x3b20d79e, 0x238e7673, 0x3536cc52, 0xc13ad061, 0x0c7c5c1e, 0xe61086bd, 0x3a8269a2, 

+	0x22e69ac7, 0x35a5793c, 0xc0d00db7, 0x0a2abb58, 0xe4a2eff7, 0x39daf5e8, 0x223d66a8, 0x361214b0, 

+	0xc07b371f, 0x07d59395, 0xe3399167, 0x392a9642, 0x2192e09a, 0x367c9a7d, 0xc03c6a07, 0x057db402, 

+	0xe1d4a2c8, 0x387165e3, 0x20e70f32, 0x36e5068a, 0xc013bc3a, 0x0323ecbe, 0xe0745b25, 0x37af8158, 

+	0x2039f90e, 0x374b54ce, 0xc0013bd3, 0x00c90e8f, 0xdf18f0ce, 0x36e5068a, 0x1f8ba4db, 0x37af8158, 

+	0xc004ef3f, 0xfe6deaa1, 0xddc29958, 0x361214b0, 0x1edc1952, 0x3811884c, 0xc01ed535, 0xfc135231, 

+	0xdc71898d, 0x3536cc52, 0x1e2b5d38, 0x387165e3, 0xc04ee4b9, 0xf9ba1651, 0xdb25f567, 0x34534f40, 

+	0x1d79775b, 0x38cf1669, 0xc0950d1d, 0xf7630799, 0xd9e01007, 0x3367c08f, 0x1cc66e99, 0x392a9642, 

+	0xc0f1360c, 0xf50ef5de, 0xd8a00bae, 0x32744493, 0x1c1249d8, 0x3983e1e7, 0xc1633f8a, 0xf2beafee, 

+	0xd76619b6, 0x317900d6, 0x1b5d1009, 0x39daf5e8, 0xc1eb0209, 0xf0730343, 0xd6326a89, 0x30761c17, 

+	0x1aa6c82b, 0x3a2fcee8, 0xc2884e6f, 0xee2cbbc1, 0xd5052d97, 0x2f6bbe44, 0x19ef7943, 0x3a8269a2, 

+	0xc33aee28, 0xebeca36c, 0xd3de9156, 0x2e5a106f, 0x19372a63, 0x3ad2c2e7, 0xc402a33c, 0xe9b38223, 

+	0xd2bec334, 0x2d413ccc, 0x187de2a6, 0x3b20d79e, 0xc4df2862, 0xe7821d5a, 0xd1a5ef91, 0x2c216eaa, 

+	0x17c3a931, 0x3b6ca4c4, 0xc5d03118, 0xe55937d5, 0xd09441bc, 0x2afad269, 0x17088530, 0x3bb6276d, 

+	0xc6d569be, 0xe3399167, 0xcf89e3e9, 0x29cd9577, 0x164c7ddd, 0x3bfd5cc4, 0xc7ee77b4, 0xe123e6ae, 

+	0xce86ff2a, 0x2899e64a, 0x158f9a75, 0x3c424209, 0xc91af976, 0xdf18f0ce, 0xcd8bbb6d, 0x275ff452, 

+	0x14d1e242, 0x3c84d496, 0xca5a86c4, 0xdd196539, 0xcc983f71, 0x261feff9, 0x14135c94, 0x3cc511d8, 

+	0xcbacb0c0, 0xdb25f567, 0xcbacb0c0, 0x24da0a99, 0x135410c2, 0x3d02f756, 0xcd110217, 0xd93f4e9e, 

+	0xcac933ae, 0x238e7673, 0x1294062e, 0x3d3e82ad, 0xce86ff2a, 0xd76619b6, 0xc9edeb50, 0x223d66a8, 

+	0x11d3443f, 0x3d77b191, 0xd00e263a, 0xd59afadb, 0xc91af976, 0x20e70f32, 0x1111d262, 0x3dae81ce, 

+	0xd1a5ef91, 0xd3de9156, 0xc8507ea8, 0x1f8ba4db, 0x104fb80e, 0x3de2f147, 0xd34dcdb5, 0xd2317757, 

+	0xc78e9a1d, 0x1e2b5d38, 0x0f8cfcbd, 0x3e14fdf7, 0xd5052d97, 0xd09441bc, 0xc6d569be, 0x1cc66e99, 

+	0x0ec9a7f2, 0x3e44a5ee, 0xd6cb76c9, 0xcf077fe1, 0xc6250a18, 0x1b5d1009, 0x0e05c135, 0x3e71e758, 

+	0xd8a00bae, 0xcd8bbb6d, 0xc57d965e, 0x19ef7943, 0x0d415012, 0x3e9cc076, 0xda8249b5, 0xcc217822, 

+	0xc4df2862, 0x187de2a6, 0x0c7c5c1e, 0x3ec52f9f, 0xdc71898d, 0xcac933ae, 0xc449d893, 0x17088530, 

+	0x0bb6ecef, 0x3eeb3347, 0xde6d1f66, 0xc9836583, 0xc3bdbdf7, 0x158f9a75, 0x0af10a22, 0x3f0ec9f4, 

+	0xe0745b25, 0xc8507ea8, 0xc33aee28, 0x14135c94, 0x0a2abb58, 0x3f2ff249, 0xe28688a5, 0xc730e997, 

+	0xc2c17d53, 0x1294062e, 0x09640837, 0x3f4eaafe, 0xe4a2eff7, 0xc6250a18, 0xc2517e32, 0x1111d262, 

+	0x089cf867, 0x3f6af2e3, 0xe6c8d59d, 0xc52d3d19, 0xc1eb0209, 0x0f8cfcbd, 0x07d59395, 0x3f84c8e1, 

+	0xe8f77ad0, 0xc449d893, 0xc18e18a8, 0x0e05c135, 0x070de171, 0x3f9c2bfa, 0xeb2e1dbe, 0xc37b2b6a, 

+	0xc13ad061, 0x0c7c5c1e, 0x0645e9af, 0x3fb11b47, 0xed6bf9d2, 0xc2c17d53, 0xc0f1360c, 0x0af10a22, 

+	0x057db402, 0x3fc395f9, 0xefb047f2, 0xc21d0eb9, 0xc0b15502, 0x09640837, 0x04b54824, 0x3fd39b5a, 

+	0xf1fa3ecb, 0xc18e18a8, 0xc07b371f, 0x07d59395, 0x03ecadcf, 0x3fe12acb, 0xf4491311, 0xc114ccb9, 

+	0xc04ee4b9, 0x0645e9af, 0x0323ecbe, 0x3fec43c6, 0xf69bf7c9, 0xc0b15502, 0xc02c64a6, 0x04b54824, 

+	0x025b0cae, 0x3ff4e5df, 0xf8f21e8f, 0xc063d406, 0xc013bc3a, 0x0323ecbe, 0x0192155f, 0x3ffb10c1, 

+	0xfb4ab7dc, 0xc02c64a6, 0xc004ef3f, 0x0192155f, 0x00c90e8f, 0x3ffec42d, 0xfda4f352, 0xc00b1a21

+};

+

+const int twidTab64[4*6 + 16*6] = {

+	0x40000000, 0x00000000, 0x40000000, 0x00000000, 0x40000000, 0x00000000, 0x2d413ccc, 0x2d413ccc, 

+	0x3b20d79e, 0x187de2a6, 0x187de2a6, 0x3b20d79e, 0x00000000, 0x40000000, 0x2d413ccc, 0x2d413ccc, 

+	0xd2bec334, 0x2d413ccc, 0xd2bec334, 0x2d413ccc, 0x187de2a6, 0x3b20d79e, 0xc4df2862, 0xe7821d5a, 

+

+	0x40000000, 0x00000000, 0x40000000, 0x00000000, 0x40000000, 0x00000000, 0x3ec52f9f, 0x0c7c5c1e, 

+	0x3fb11b47, 0x0645e9af, 0x3d3e82ad, 0x1294062e, 0x3b20d79e, 0x187de2a6, 0x3ec52f9f, 0x0c7c5c1e, 

+	0x3536cc52, 0x238e7673, 0x3536cc52, 0x238e7673, 0x3d3e82ad, 0x1294062e, 0x2899e64a, 0x317900d6, 

+	0x2d413ccc, 0x2d413ccc, 0x3b20d79e, 0x187de2a6, 0x187de2a6, 0x3b20d79e, 0x238e7673, 0x3536cc52, 

+	0x387165e3, 0x1e2b5d38, 0x0645e9af, 0x3fb11b47, 0x187de2a6, 0x3b20d79e, 0x3536cc52, 0x238e7673, 

+	0xf383a3e2, 0x3ec52f9f, 0x0c7c5c1e, 0x3ec52f9f, 0x317900d6, 0x2899e64a, 0xe1d4a2c8, 0x387165e3, 

+	0x00000000, 0x40000000, 0x2d413ccc, 0x2d413ccc, 0xd2bec334, 0x2d413ccc, 0xf383a3e2, 0x3ec52f9f, 

+	0x2899e64a, 0x317900d6, 0xc78e9a1d, 0x1e2b5d38, 0xe7821d5a, 0x3b20d79e, 0x238e7673, 0x3536cc52, 

+	0xc13ad061, 0x0c7c5c1e, 0xdc71898d, 0x3536cc52, 0x1e2b5d38, 0x387165e3, 0xc04ee4b9, 0xf9ba1651, 

+	0xd2bec334, 0x2d413ccc, 0x187de2a6, 0x3b20d79e, 0xc4df2862, 0xe7821d5a, 0xcac933ae, 0x238e7673, 

+	0x1294062e, 0x3d3e82ad, 0xce86ff2a, 0xd76619b6, 0xc4df2862, 0x187de2a6, 0x0c7c5c1e, 0x3ec52f9f, 

+	0xdc71898d, 0xcac933ae, 0xc13ad061, 0x0c7c5c1e, 0x0645e9af, 0x3fb11b47, 0xed6bf9d2, 0xc2c17d53 

+};

+#endif  //ARMV5E

+

+const int ShortWindowSine[FRAME_LEN_SHORT/2] ={  

+	0x00c97fff, 0x025b7ffa, 0x03ed7ff1, 0x057f7fe2, 0x07117fce, 0x08a27fb5, 0x0a337f98, 0x0bc47f75, 

+	0x0d547f4e, 0x0ee47f22, 0x10737ef0, 0x12017eba, 0x138f7e7f, 0x151c7e3f, 0x16a87dfb, 0x18337db1, 

+	0x19be7d63, 0x1b477d0f, 0x1cd07cb7, 0x1e577c5a, 0x1fdd7bf9, 0x21627b92, 0x22e57b27, 0x24677ab7, 

+	0x25e87a42, 0x276879c9, 0x28e5794a, 0x2a6278c8, 0x2bdc7840, 0x2d5577b4, 0x2ecc7723, 0x3042768e, 

+	0x31b575f4, 0x33277556, 0x349774b3, 0x3604740b, 0x3770735f, 0x38d972af, 0x3a4071fa, 0x3ba57141, 

+	0x3d087083, 0x3e686fc2, 0x3fc66efb, 0x41216e31, 0x427a6d62, 0x43d16c8f, 0x45246bb8, 0x46756add, 

+	0x47c469fd, 0x490f691a, 0x4a586832, 0x4b9e6747, 0x4ce16657, 0x4e216564, 0x4f5e646c, 0x50986371, 

+	0x51cf6272, 0x5303616f, 0x54336068, 0x55605f5e, 0x568a5e50, 0x57b15d3e, 0x58d45c29, 0x59f45b10

+};
+
+const int LongWindowKBD[FRAME_LEN_LONG/2]={  
+	0x000a7fff, 0x000e7fff, 0x00127fff, 0x00157fff, 0x00197fff, 0x001c7fff, 0x00207fff, 0x00237fff, 

+	0x00267fff, 0x002a7fff, 0x002d7fff, 0x00307fff, 0x00347fff, 0x00387fff, 0x003b7fff, 0x003f7fff, 

+	0x00437fff, 0x00477fff, 0x004b7fff, 0x004f7fff, 0x00537fff, 0x00577fff, 0x005b7fff, 0x00607fff, 

+	0x00647fff, 0x00697fff, 0x006d7fff, 0x00727fff, 0x00777fff, 0x007c7fff, 0x00817fff, 0x00867fff, 

+	0x008b7fff, 0x00917fff, 0x00967fff, 0x009c7fff, 0x00a17fff, 0x00a77fff, 0x00ad7fff, 0x00b37fff, 

+	0x00b97fff, 0x00bf7fff, 0x00c67fff, 0x00cc7fff, 0x00d37fff, 0x00da7fff, 0x00e07fff, 0x00e77fff, 

+	0x00ee7fff, 0x00f57fff, 0x00fd7fff, 0x01047fff, 0x010c7fff, 0x01137fff, 0x011b7fff, 0x01237fff, 

+	0x012b7fff, 0x01337fff, 0x013c7ffe, 0x01447ffe, 0x014d7ffe, 0x01567ffe, 0x015f7ffe, 0x01687ffe, 

+	0x01717ffe, 0x017a7ffe, 0x01837ffe, 0x018d7ffe, 0x01977ffd, 0x01a17ffd, 0x01ab7ffd, 0x01b57ffd, 

+	0x01bf7ffd, 0x01ca7ffd, 0x01d47ffd, 0x01df7ffc, 0x01ea7ffc, 0x01f57ffc, 0x02007ffc, 0x020c7ffc, 

+	0x02177ffc, 0x02237ffb, 0x022f7ffb, 0x023b7ffb, 0x02477ffb, 0x02537ffb, 0x02607ffa, 0x026d7ffa, 

+	0x027a7ffa, 0x02877ffa, 0x02947ff9, 0x02a17ff9, 0x02af7ff9, 0x02bc7ff9, 0x02ca7ff8, 0x02d87ff8, 

+	0x02e77ff8, 0x02f57ff7, 0x03047ff7, 0x03127ff7, 0x03217ff6, 0x03317ff6, 0x03407ff5, 0x034f7ff5, 

+	0x035f7ff5, 0x036f7ff4, 0x037f7ff4, 0x038f7ff3, 0x03a07ff3, 0x03b07ff2, 0x03c17ff2, 0x03d27ff1, 

+	0x03e37ff1, 0x03f57ff0, 0x04067ff0, 0x04187fef, 0x042a7fef, 0x043c7fee, 0x044f7fed, 0x04617fed, 

+	0x04747fec, 0x04877feb, 0x049a7feb, 0x04ae7fea, 0x04c17fe9, 0x04d57fe9, 0x04e97fe8, 0x04fd7fe7, 

+	0x05127fe6, 0x05277fe5, 0x053b7fe5, 0x05507fe4, 0x05667fe3, 0x057b7fe2, 0x05917fe1, 0x05a77fe0, 

+	0x05bd7fdf, 0x05d37fde, 0x05ea7fdd, 0x06017fdc, 0x06187fdb, 0x062f7fda, 0x06467fd9, 0x065e7fd7, 

+	0x06767fd6, 0x068e7fd5, 0x06a67fd4, 0x06bf7fd2, 0x06d87fd1, 0x06f17fd0, 0x070a7fce, 0x07237fcd, 

+	0x073d7fcc, 0x07577fca, 0x07717fc9, 0x078c7fc7, 0x07a67fc5, 0x07c17fc4, 0x07dc7fc2, 0x07f77fc0, 

+	0x08137fbf, 0x082f7fbd, 0x084b7fbb, 0x08677fb9, 0x08847fb7, 0x08a07fb6, 0x08bd7fb4, 0x08da7fb2, 

+	0x08f87faf, 0x09167fad, 0x09347fab, 0x09527fa9, 0x09707fa7, 0x098f7fa5, 0x09ae7fa2, 0x09cd7fa0, 

+	0x09ec7f9d, 0x0a0c7f9b, 0x0a2c7f98, 0x0a4c7f96, 0x0a6c7f93, 0x0a8d7f91, 0x0aae7f8e, 0x0acf7f8b, 

+	0x0af07f88, 0x0b127f85, 0x0b337f82, 0x0b557f7f, 0x0b787f7c, 0x0b9a7f79, 0x0bbd7f76, 0x0be07f73, 

+	0x0c047f6f, 0x0c277f6c, 0x0c4b7f69, 0x0c6f7f65, 0x0c937f61, 0x0cb87f5e, 0x0cdd7f5a, 0x0d027f56, 

+	0x0d277f53, 0x0d4d7f4f, 0x0d737f4b, 0x0d997f47, 0x0dbf7f43, 0x0de67f3e, 0x0e0c7f3a, 0x0e347f36, 

+	0x0e5b7f31, 0x0e837f2d, 0x0eaa7f28, 0x0ed37f24, 0x0efb7f1f, 0x0f237f1a, 0x0f4c7f15, 0x0f757f10, 

+	0x0f9f7f0b, 0x0fc87f06, 0x0ff27f01, 0x101c7efb, 0x10477ef6, 0x10717ef0, 0x109c7eeb, 0x10c87ee5, 

+	0x10f37edf, 0x111f7eda, 0x114a7ed4, 0x11777ece, 0x11a37ec7, 0x11d07ec1, 0x11fd7ebb, 0x122a7eb4, 

+	0x12577eae, 0x12857ea7, 0x12b37ea0, 0x12e17e9a, 0x130f7e93, 0x133e7e8c, 0x136d7e84, 0x139c7e7d, 

+	0x13cc7e76, 0x13fb7e6e, 0x142b7e67, 0x145b7e5f, 0x148c7e57, 0x14bc7e4f, 0x14ed7e47, 0x151e7e3f, 

+	0x15507e37, 0x15817e2e, 0x15b37e26, 0x15e57e1d, 0x16187e14, 0x164a7e0b, 0x167d7e02, 0x16b07df9, 

+	0x16e47df0, 0x17177de6, 0x174b7ddd, 0x177f7dd3, 0x17b37dc9, 0x17e87dbf, 0x181d7db5, 0x18527dab, 

+	0x18877da1, 0x18bc7d96, 0x18f27d8c, 0x19287d81, 0x195e7d76, 0x19957d6b, 0x19cb7d60, 0x1a027d54, 

+	0x1a397d49, 0x1a717d3d, 0x1aa87d31, 0x1ae07d26, 0x1b187d19, 0x1b507d0d, 0x1b897d01, 0x1bc27cf4, 

+	0x1bfb7ce8, 0x1c347cdb, 0x1c6d7cce, 0x1ca77cc1, 0x1ce17cb3, 0x1d1b7ca6, 0x1d557c98, 0x1d8f7c8a, 

+	0x1dca7c7c, 0x1e057c6e, 0x1e407c60, 0x1e7b7c51, 0x1eb77c43, 0x1ef37c34, 0x1f2f7c25, 0x1f6b7c16, 

+	0x1fa77c06, 0x1fe47bf7, 0x20217be7, 0x205e7bd7, 0x209b7bc7, 0x20d87bb7, 0x21167ba6, 0x21547b96, 

+	0x21927b85, 0x21d07b74, 0x220e7b63, 0x224d7b52, 0x228c7b40, 0x22cb7b2e, 0x230a7b1c, 0x23497b0a, 

+	0x23897af8, 0x23c87ae6, 0x24087ad3, 0x24487ac0, 0x24897aad, 0x24c97a9a, 0x250a7a86, 0x254b7a73, 

+	0x258c7a5f, 0x25cd7a4b, 0x260e7a36, 0x26507a22, 0x26917a0d, 0x26d379f8, 0x271579e3, 0x275779ce, 

+	0x279a79b8, 0x27dc79a3, 0x281f798d, 0x28627977, 0x28a57960, 0x28e8794a, 0x292b7933, 0x296f791c, 

+	0x29b27905, 0x29f678ed, 0x2a3a78d6, 0x2a7e78be, 0x2ac278a6, 0x2b07788d, 0x2b4b7875, 0x2b90785c, 

+	0x2bd47843, 0x2c19782a, 0x2c5e7810, 0x2ca477f7, 0x2ce977dd, 0x2d2e77c3, 0x2d7477a8, 0x2dba778e, 

+	0x2dff7773, 0x2e457758, 0x2e8b773d, 0x2ed27721, 0x2f187706, 0x2f5e76ea, 0x2fa576cd, 0x2fec76b1, 

+	0x30327694, 0x30797677, 0x30c0765a, 0x3107763d, 0x314e761f, 0x31967601, 0x31dd75e3, 0x322575c5, 

+	0x326c75a6, 0x32b47588, 0x32fc7569, 0x33447549, 0x338c752a, 0x33d4750a, 0x341c74ea, 0x346474ca, 

+	0x34ac74a9, 0x34f57488, 0x353d7467, 0x35857446, 0x35ce7424, 0x36177403, 0x365f73e1, 0x36a873be, 

+	0x36f1739c, 0x373a7379, 0x37837356, 0x37cc7333, 0x3815730f, 0x385e72ec, 0x38a772c8, 0x38f172a3, 

+	0x393a727f, 0x3983725a, 0x39cd7235, 0x3a167210, 0x3a6071ea, 0x3aa971c4, 0x3af3719e, 0x3b3c7178, 

+	0x3b867151, 0x3bd0712b, 0x3c197104, 0x3c6370dc, 0x3cad70b5, 0x3cf7708d, 0x3d407065, 0x3d8a703c, 

+	0x3dd47014, 0x3e1e6feb, 0x3e686fc2, 0x3eb16f98, 0x3efb6f6f, 0x3f456f45, 0x3f8f6f1b, 0x3fd96ef0, 

+	0x40236ec6, 0x406d6e9b, 0x40b66e70, 0x41006e44, 0x414a6e19, 0x41946ded, 0x41de6dc1, 0x42286d94, 

+	0x42716d68, 0x42bb6d3b, 0x43056d0d, 0x434f6ce0, 0x43986cb2, 0x43e26c84, 0x442c6c56, 0x44756c28, 

+	0x44bf6bf9, 0x45086bca, 0x45526b9b, 0x459b6b6b, 0x45e56b3c, 0x462e6b0c, 0x46786adb, 0x46c16aab, 

+	0x470a6a7a, 0x47536a49, 0x479c6a18, 0x47e569e7, 0x482e69b5, 0x48776983, 0x48c06951, 0x4909691e, 

+	0x495268ec, 0x499b68b9, 0x49e36885, 0x4a2c6852, 0x4a74681e, 0x4abd67ea, 0x4b0567b6, 0x4b4d6782, 

+	0x4b95674d, 0x4bde6718, 0x4c2666e3, 0x4c6d66ae, 0x4cb56678, 0x4cfd6642, 0x4d45660c, 0x4d8c65d6, 

+	0x4dd4659f, 0x4e1b6568, 0x4e626531, 0x4ea964fa, 0x4ef064c3, 0x4f37648b, 0x4f7e6453, 0x4fc5641b, 

+	0x500b63e2, 0x505263aa, 0x50986371, 0x50df6338, 0x512562fe, 0x516b62c5, 0x51b1628b, 0x51f66251, 

+	0x523c6217, 0x528161dc, 0x52c761a2, 0x530c6167, 0x5351612c, 0x539660f1, 0x53db60b5, 0x54206079, 

+	0x5464603d, 0x54a96001, 0x54ed5fc5, 0x55315f88, 0x55755f4b, 0x55b95f0e, 0x55fc5ed1, 0x56405e94, 

+	0x56835e56, 0x56c75e18, 0x570a5dda, 0x574d5d9c, 0x578f5d5e, 0x57d25d1f, 0x58145ce0, 0x58565ca1, 

+	0x58995c62, 0x58da5c23, 0x591c5be3, 0x595e5ba4, 0x599f5b64, 0x59e05b24, 0x5a215ae3, 0x5a625aa3
+};
+
+
+/*
+  form factor
+*/
+/* sqrt(((i+(1<<(FF_SQRT_BITS-2)+0.5)/2^31) */
+const Word32 formfac_sqrttable[96] = {
+  0x000407f8, 0x000417b9, 0x0004273f, 0x0004368c, 0x000445a1, 0x00045483, 0x00046332, 0x000471b0,
+  0x00048000, 0x00048e22, 0x00049c1a, 0x0004a9e7, 0x0004b78c, 0x0004c50a, 0x0004d263, 0x0004df96,
+  0x0004eca7, 0x0004f995, 0x00050662, 0x0005130e, 0x00051f9c, 0x00052c0a, 0x0005385b, 0x00054490,
+  0x000550a8, 0x00055ca5, 0x00056888, 0x00057450, 0x00058000, 0x00058b96, 0x00059715, 0x0005a27c,
+  0x0005adcc, 0x0005b906, 0x0005c42b, 0x0005cf39, 0x0005da33, 0x0005e519, 0x0005efea, 0x0005faa8,
+  0x00060552, 0x00060fea, 0x00061a70, 0x000624e3, 0x00062f45, 0x00063996, 0x000643d5, 0x00064e04,
+  0x00065823, 0x00066231, 0x00066c30, 0x0006761f, 0x00068000, 0x000689d1, 0x00069393, 0x00069d47,
+  0x0006a6ed, 0x0006b085, 0x0006ba10, 0x0006c38d, 0x0006ccfc, 0x0006d65f, 0x0006dfb5, 0x0006e8fe,
+  0x0006f23b, 0x0006fb6c, 0x00070490, 0x00070da9, 0x000716b6, 0x00071fb8, 0x000728ae, 0x00073199,
+  0x00073a79, 0x0007434e, 0x00074c19, 0x000754d9, 0x00075d8e, 0x0007663a, 0x00076edb, 0x00077772,
+  0x00078000, 0x00078883, 0x000790fd, 0x0007996e, 0x0007a1d5, 0x0007aa33, 0x0007b288, 0x0007bad4,
+  0x0007c318, 0x0007cb52, 0x0007d384, 0x0007dbad, 0x0007e3ce, 0x0007ebe6, 0x0007f3f6, 0x0007fbfe
+};
+
+
+
+/*!
+  \name    quantizer and inverse quantizer tables
+
+  \brief   these tables are used for the non
+           linear quantizer and inverse quantizer
+           
+*/
+const Word32 mTab_3_4[512] = {
+	0x4c1bf829, 0x4c3880de, 0x4c550603, 0x4c71879c, 
+	0x4c8e05aa, 0x4caa8030, 0x4cc6f72f, 0x4ce36aab, 
+	0x4cffdaa4, 0x4d1c471d, 0x4d38b019, 0x4d55159a, 
+	0x4d7177a1, 0x4d8dd631, 0x4daa314b, 0x4dc688f3, 
+	0x4de2dd2a, 0x4dff2df2, 0x4e1b7b4d, 0x4e37c53d, 
+	0x4e540bc5, 0x4e704ee6, 0x4e8c8ea3, 0x4ea8cafd, 
+	0x4ec503f7, 0x4ee13992, 0x4efd6bd0, 0x4f199ab4, 
+	0x4f35c640, 0x4f51ee75, 0x4f6e1356, 0x4f8a34e4, 
+	0x4fa65321, 0x4fc26e10, 0x4fde85b2, 0x4ffa9a0a, 
+	0x5016ab18, 0x5032b8e0, 0x504ec362, 0x506acaa1, 
+	0x5086cea0, 0x50a2cf5e, 0x50becce0, 0x50dac725, 
+	0x50f6be31, 0x5112b205, 0x512ea2a3, 0x514a900d, 
+	0x51667a45, 0x5182614c, 0x519e4524, 0x51ba25cf, 
+	0x51d60350, 0x51f1dda7, 0x520db4d6, 0x522988e0, 
+	0x524559c6, 0x52612789, 0x527cf22d, 0x5298b9b1, 
+	0x52b47e19, 0x52d03f65, 0x52ebfd98, 0x5307b8b4, 
+	0x532370b9, 0x533f25aa, 0x535ad789, 0x53768656, 
+	0x53923215, 0x53addac6, 0x53c9806b, 0x53e52306, 
+	0x5400c298, 0x541c5f24, 0x5437f8ab, 0x54538f2e, 
+	0x546f22af, 0x548ab330, 0x54a640b3, 0x54c1cb38, 
+	0x54dd52c2, 0x54f8d753, 0x551458eb, 0x552fd78d, 
+	0x554b5339, 0x5566cbf3, 0x558241bb, 0x559db492, 
+	0x55b9247b, 0x55d49177, 0x55effb87, 0x560b62ad, 
+	0x5626c6eb, 0x56422842, 0x565d86b4, 0x5678e242, 
+	0x56943aee, 0x56af90b9, 0x56cae3a4, 0x56e633b2, 
+	0x570180e4, 0x571ccb3b, 0x573812b8, 0x5753575e, 
+	0x576e992e, 0x5789d829, 0x57a51450, 0x57c04da6, 
+	0x57db842b, 0x57f6b7e1, 0x5811e8c9, 0x582d16e6, 
+	0x58484238, 0x58636ac0, 0x587e9081, 0x5899b37c, 
+	0x58b4d3b1, 0x58cff123, 0x58eb0bd3, 0x590623c2, 
+	0x592138f2, 0x593c4b63, 0x59575b19, 0x59726812, 
+	0x598d7253, 0x59a879da, 0x59c37eab, 0x59de80c6, 
+	0x59f9802d, 0x5a147ce0, 0x5a2f76e2, 0x5a4a6e34, 
+	0x5a6562d6, 0x5a8054cb, 0x5a9b4414, 0x5ab630b2, 
+	0x5ad11aa6, 0x5aec01f1, 0x5b06e696, 0x5b21c895, 
+	0x5b3ca7ef, 0x5b5784a6, 0x5b725ebc, 0x5b8d3631, 
+	0x5ba80b06, 0x5bc2dd3e, 0x5bddacd9, 0x5bf879d8, 
+	0x5c13443d, 0x5c2e0c09, 0x5c48d13e, 0x5c6393dc, 
+	0x5c7e53e5, 0x5c99115a, 0x5cb3cc3c, 0x5cce848d, 
+	0x5ce93a4e, 0x5d03ed80, 0x5d1e9e24, 0x5d394c3b, 
+	0x5d53f7c7, 0x5d6ea0c9, 0x5d894742, 0x5da3eb33, 
+	0x5dbe8c9e, 0x5dd92b84, 0x5df3c7e5, 0x5e0e61c3, 
+	0x5e28f920, 0x5e438dfc, 0x5e5e2059, 0x5e78b037, 
+	0x5e933d99, 0x5eadc87e, 0x5ec850e9, 0x5ee2d6da, 
+	0x5efd5a53, 0x5f17db54, 0x5f3259e0, 0x5f4cd5f6, 
+	0x5f674f99, 0x5f81c6c8, 0x5f9c3b87, 0x5fb6add4, 
+	0x5fd11db3, 0x5feb8b23, 0x6005f626, 0x60205ebd, 
+	0x603ac4e9, 0x605528ac, 0x606f8a05, 0x6089e8f7, 
+	0x60a44583, 0x60be9fa9, 0x60d8f76b, 0x60f34cca, 
+	0x610d9fc7, 0x6127f062, 0x61423e9e, 0x615c8a7a, 
+	0x6176d3f9, 0x61911b1b, 0x61ab5fe1, 0x61c5a24d, 
+	0x61dfe25f, 0x61fa2018, 0x62145b7a, 0x622e9485, 
+	0x6248cb3b, 0x6262ff9d, 0x627d31ab, 0x62976167, 
+	0x62b18ed1, 0x62cbb9eb, 0x62e5e2b6, 0x63000933, 
+	0x631a2d62, 0x63344f45, 0x634e6edd, 0x63688c2b, 
+	0x6382a730, 0x639cbfec, 0x63b6d661, 0x63d0ea90, 
+	0x63eafc7a, 0x64050c1f, 0x641f1982, 0x643924a2, 
+	0x64532d80, 0x646d341f, 0x6487387e, 0x64a13a9e, 
+	0x64bb3a81, 0x64d53828, 0x64ef3393, 0x65092cc4, 
+	0x652323bb, 0x653d1879, 0x65570b00, 0x6570fb50, 
+	0x658ae96b, 0x65a4d550, 0x65bebf01, 0x65d8a680, 
+	0x65f28bcc, 0x660c6ee8, 0x66264fd3, 0x66402e8f, 
+	0x665a0b1c, 0x6673e57d, 0x668dbdb0, 0x66a793b8, 
+	0x66c16795, 0x66db3949, 0x66f508d4, 0x670ed636, 
+	0x6728a172, 0x67426a87, 0x675c3177, 0x6775f643, 
+	0x678fb8eb, 0x67a97971, 0x67c337d5, 0x67dcf418, 
+	0x67f6ae3b, 0x6810663f, 0x682a1c25, 0x6843cfed, 
+	0x685d8199, 0x68773129, 0x6890de9f, 0x68aa89fa, 
+	0x68c4333d, 0x68ddda67, 0x68f77f7a, 0x69112277, 
+	0x692ac35e, 0x69446230, 0x695dfeee, 0x6977999a, 
+	0x69913232, 0x69aac8ba, 0x69c45d31, 0x69ddef98, 
+	0x69f77ff0, 0x6a110e3a, 0x6a2a9a77, 0x6a4424a8, 
+	0x6a5daccc, 0x6a7732e6, 0x6a90b6f6, 0x6aaa38fd, 
+	0x6ac3b8fb, 0x6add36f2, 0x6af6b2e2, 0x6b102ccd, 
+	0x6b29a4b2, 0x6b431a92, 0x6b5c8e6f, 0x6b76004a, 
+	0x6b8f7022, 0x6ba8ddf9, 0x6bc249d0, 0x6bdbb3a7, 
+	0x6bf51b80, 0x6c0e815a, 0x6c27e537, 0x6c414718, 
+	0x6c5aa6fd, 0x6c7404e7, 0x6c8d60d7, 0x6ca6bace, 
+	0x6cc012cc, 0x6cd968d2, 0x6cf2bce1, 0x6d0c0ef9, 
+	0x6d255f1d, 0x6d3ead4b, 0x6d57f985, 0x6d7143cc, 
+	0x6d8a8c21, 0x6da3d283, 0x6dbd16f5, 0x6dd65976, 
+	0x6def9a08, 0x6e08d8ab, 0x6e221560, 0x6e3b5027, 
+	0x6e548902, 0x6e6dbff1, 0x6e86f4f5, 0x6ea0280e, 
+	0x6eb9593e, 0x6ed28885, 0x6eebb5e3, 0x6f04e15a, 
+	0x6f1e0aea, 0x6f373294, 0x6f505859, 0x6f697c39, 
+	0x6f829e35, 0x6f9bbe4e, 0x6fb4dc85, 0x6fcdf8d9, 
+	0x6fe7134d, 0x70002be0, 0x70194293, 0x70325767, 
+	0x704b6a5d, 0x70647b76, 0x707d8ab1, 0x70969811, 
+	0x70afa394, 0x70c8ad3d, 0x70e1b50c, 0x70fabb01, 
+	0x7113bf1d, 0x712cc161, 0x7145c1ce, 0x715ec064, 
+	0x7177bd24, 0x7190b80f, 0x71a9b124, 0x71c2a866, 
+	0x71db9dd4, 0x71f49170, 0x720d8339, 0x72267331, 
+	0x723f6159, 0x72584db0, 0x72713838, 0x728a20f1, 
+	0x72a307db, 0x72bbecf9, 0x72d4d049, 0x72edb1ce, 
+	0x73069187, 0x731f6f75, 0x73384b98, 0x735125f3, 
+	0x7369fe84, 0x7382d54d, 0x739baa4e, 0x73b47d89, 
+	0x73cd4efd, 0x73e61eab, 0x73feec94, 0x7417b8b8, 
+	0x74308319, 0x74494bb6, 0x74621291, 0x747ad7aa, 
+	0x74939b02, 0x74ac5c98, 0x74c51c6f, 0x74ddda86, 
+	0x74f696de, 0x750f5178, 0x75280a54, 0x7540c174, 
+	0x755976d7, 0x75722a7e, 0x758adc69, 0x75a38c9b, 
+	0x75bc3b12, 0x75d4e7cf, 0x75ed92d4, 0x76063c21, 
+	0x761ee3b6, 0x76378994, 0x76502dbc, 0x7668d02e, 
+	0x768170eb, 0x769a0ff3, 0x76b2ad47, 0x76cb48e7, 
+	0x76e3e2d5, 0x76fc7b10, 0x7715119a, 0x772da673, 
+	0x7746399b, 0x775ecb13, 0x77775adc, 0x778fe8f6, 
+	0x77a87561, 0x77c1001f, 0x77d98930, 0x77f21095, 
+	0x780a964d, 0x78231a5b, 0x783b9cbd, 0x78541d75, 
+	0x786c9c84, 0x788519e9, 0x789d95a6, 0x78b60fbb, 
+	0x78ce8828, 0x78e6feef, 0x78ff740f, 0x7917e78a, 
+	0x7930595f, 0x7948c990, 0x7961381d, 0x7979a506, 
+	0x7992104c, 0x79aa79f0, 0x79c2e1f1, 0x79db4852, 
+	0x79f3ad11, 0x7a0c1031, 0x7a2471b0, 0x7a3cd191, 
+	0x7a552fd3, 0x7a6d8c76, 0x7a85e77d, 0x7a9e40e6, 
+	0x7ab698b2, 0x7aceeee3, 0x7ae74378, 0x7aff9673, 
+	0x7b17e7d2, 0x7b303799, 0x7b4885c5, 0x7b60d259, 
+	0x7b791d55, 0x7b9166b9, 0x7ba9ae86, 0x7bc1f4bc, 
+	0x7bda395c, 0x7bf27c66, 0x7c0abddb, 0x7c22fdbb, 
+	0x7c3b3c07, 0x7c5378c0, 0x7c6bb3e5, 0x7c83ed78, 
+	0x7c9c2579, 0x7cb45be9, 0x7ccc90c7, 0x7ce4c414, 
+	0x7cfcf5d2, 0x7d152600, 0x7d2d549f, 0x7d4581b0, 
+	0x7d5dad32, 0x7d75d727, 0x7d8dff8f, 0x7da6266a, 
+	0x7dbe4bba, 0x7dd66f7d, 0x7dee91b6, 0x7e06b264, 
+	0x7e1ed188, 0x7e36ef22, 0x7e4f0b34, 0x7e6725bd, 
+	0x7e7f3ebd, 0x7e975636, 0x7eaf6c28, 0x7ec78093, 
+	0x7edf9378, 0x7ef7a4d7, 0x7f0fb4b1, 0x7f27c307, 
+	0x7f3fcfd8, 0x7f57db25, 0x7f6fe4ef, 0x7f87ed36, 
+	0x7f9ff3fb, 0x7fb7f93e, 0x7fcffcff, 0x7fe7ff40
+};
+
+const Word32 mTab_4_3[512]={
+	0x32cbfd4a, 0x32eddd70, 0x330fc339, 0x3331aea3, 
+	0x33539fac, 0x33759652, 0x33979294, 0x33b99470, 
+	0x33db9be4, 0x33fda8ed, 0x341fbb8b, 0x3441d3bb, 
+	0x3463f17c, 0x348614cc, 0x34a83da8, 0x34ca6c10, 
+	0x34eca001, 0x350ed979, 0x35311877, 0x35535cfa, 
+	0x3575a6fe, 0x3597f683, 0x35ba4b87, 0x35dca607, 
+	0x35ff0603, 0x36216b78, 0x3643d665, 0x366646c7, 
+	0x3688bc9e, 0x36ab37e8, 0x36cdb8a2, 0x36f03ecb, 
+	0x3712ca62, 0x37355b64, 0x3757f1d1, 0x377a8da5, 
+	0x379d2ee0, 0x37bfd580, 0x37e28184, 0x380532e8, 
+	0x3827e9ad, 0x384aa5d0, 0x386d674f, 0x38902e2a, 
+	0x38b2fa5d, 0x38d5cbe9, 0x38f8a2ca, 0x391b7eff, 
+	0x393e6088, 0x39614761, 0x3984338a, 0x39a72501, 
+	0x39ca1bc4, 0x39ed17d1, 0x3a101928, 0x3a331fc6, 
+	0x3a562baa, 0x3a793cd2, 0x3a9c533d, 0x3abf6ee9, 
+	0x3ae28fd5, 0x3b05b5ff, 0x3b28e165, 0x3b4c1206, 
+	0x3b6f47e0, 0x3b9282f2, 0x3bb5c33a, 0x3bd908b7, 
+	0x3bfc5368, 0x3c1fa349, 0x3c42f85b, 0x3c66529c, 
+	0x3c89b209, 0x3cad16a2, 0x3cd08065, 0x3cf3ef51, 
+	0x3d176364, 0x3d3adc9c, 0x3d5e5af8, 0x3d81de77, 
+	0x3da56717, 0x3dc8f4d6, 0x3dec87b4, 0x3e101fae, 
+	0x3e33bcc3, 0x3e575ef2, 0x3e7b063a, 0x3e9eb298, 
+	0x3ec2640c, 0x3ee61a93, 0x3f09d62d, 0x3f2d96d8, 
+	0x3f515c93, 0x3f75275b, 0x3f98f731, 0x3fbccc11, 
+	0x3fe0a5fc, 0x400484ef, 0x402868ea, 0x404c51e9, 
+	0x40703fee, 0x409432f5, 0x40b82afd, 0x40dc2806, 
+	0x41002a0d, 0x41243111, 0x41483d12, 0x416c4e0d, 
+	0x41906401, 0x41b47eed, 0x41d89ecf, 0x41fcc3a7, 
+	0x4220ed72, 0x42451c30, 0x42694fde, 0x428d887d, 
+	0x42b1c609, 0x42d60883, 0x42fa4fe8, 0x431e9c37, 
+	0x4342ed70, 0x43674390, 0x438b9e96, 0x43affe82, 
+	0x43d46351, 0x43f8cd03, 0x441d3b95, 0x4441af08, 
+	0x44662758, 0x448aa487, 0x44af2690, 0x44d3ad75, 
+	0x44f83933, 0x451cc9c8, 0x45415f35, 0x4565f977, 
+	0x458a988d, 0x45af3c76, 0x45d3e531, 0x45f892bc, 
+	0x461d4516, 0x4641fc3e, 0x4666b832, 0x468b78f2, 
+	0x46b03e7c, 0x46d508cf, 0x46f9d7e9, 0x471eabca, 
+	0x47438470, 0x476861d9, 0x478d4406, 0x47b22af3, 
+	0x47d716a1, 0x47fc070e, 0x4820fc39, 0x4845f620, 
+	0x486af4c3, 0x488ff820, 0x48b50035, 0x48da0d03, 
+	0x48ff1e87, 0x492434c0, 0x49494fad, 0x496e6f4d, 
+	0x4993939f, 0x49b8bca2, 0x49ddea54, 0x4a031cb4, 
+	0x4a2853c1, 0x4a4d8f7a, 0x4a72cfde, 0x4a9814eb, 
+	0x4abd5ea1, 0x4ae2acfd, 0x4b080000, 0x4b2d57a8, 
+	0x4b52b3f3, 0x4b7814e1, 0x4b9d7a70, 0x4bc2e49f, 
+	0x4be8536e, 0x4c0dc6db, 0x4c333ee4, 0x4c58bb89, 
+	0x4c7e3cc9, 0x4ca3c2a2, 0x4cc94d14, 0x4ceedc1c, 
+	0x4d146fbb, 0x4d3a07ef, 0x4d5fa4b6, 0x4d854611, 
+	0x4daaebfd, 0x4dd09679, 0x4df64585, 0x4e1bf91f, 
+	0x4e41b146, 0x4e676dfa, 0x4e8d2f38, 0x4eb2f501, 
+	0x4ed8bf52, 0x4efe8e2b, 0x4f24618a, 0x4f4a3970, 
+	0x4f7015d9, 0x4f95f6c6, 0x4fbbdc36, 0x4fe1c626, 
+	0x5007b497, 0x502da787, 0x50539ef5, 0x50799ae1, 
+	0x509f9b48, 0x50c5a02a, 0x50eba985, 0x5111b75a, 
+	0x5137c9a6, 0x515de069, 0x5183fba2, 0x51aa1b4f, 
+	0x51d03f70, 0x51f66803, 0x521c9508, 0x5242c67d, 
+	0x5268fc62, 0x528f36b5, 0x52b57575, 0x52dbb8a2, 
+	0x5302003a, 0x53284c3c, 0x534e9ca8, 0x5374f17c, 
+	0x539b4ab7, 0x53c1a858, 0x53e80a5f, 0x540e70ca, 
+	0x5434db98, 0x545b4ac8, 0x5481be5a, 0x54a8364b, 
+	0x54ceb29c, 0x54f5334c, 0x551bb858, 0x554241c1, 
+	0x5568cf85, 0x558f61a3, 0x55b5f81b, 0x55dc92eb, 
+	0x56033212, 0x5629d590, 0x56507d63, 0x5677298a, 
+	0x569dda05, 0x56c48ed3, 0x56eb47f2, 0x57120562, 
+	0x5738c721, 0x575f8d2f, 0x5786578a, 0x57ad2633, 
+	0x57d3f927, 0x57fad066, 0x5821abef, 0x58488bc0, 
+	0x586f6fda, 0x5896583b, 0x58bd44e2, 0x58e435ce, 
+	0x590b2aff, 0x59322473, 0x59592229, 0x59802420, 
+	0x59a72a59, 0x59ce34d0, 0x59f54387, 0x5a1c567b, 
+	0x5a436dac, 0x5a6a8919, 0x5a91a8c1, 0x5ab8cca3, 
+	0x5adff4be, 0x5b072111, 0x5b2e519c, 0x5b55865e, 
+	0x5b7cbf54, 0x5ba3fc80, 0x5bcb3ddf, 0x5bf28371, 
+	0x5c19cd35, 0x5c411b2a, 0x5c686d4f, 0x5c8fc3a4, 
+	0x5cb71e27, 0x5cde7cd7, 0x5d05dfb4, 0x5d2d46bd, 
+	0x5d54b1f0, 0x5d7c214e, 0x5da394d4, 0x5dcb0c83, 
+	0x5df28859, 0x5e1a0856, 0x5e418c78, 0x5e6914be, 
+	0x5e90a129, 0x5eb831b7, 0x5edfc667, 0x5f075f38, 
+	0x5f2efc29, 0x5f569d3a, 0x5f7e426a, 0x5fa5ebb7, 
+	0x5fcd9921, 0x5ff54aa8, 0x601d004a, 0x6044ba06, 
+	0x606c77dc, 0x609439ca, 0x60bbffd0, 0x60e3c9ee, 
+	0x610b9821, 0x61336a6a, 0x615b40c8, 0x61831b39, 
+	0x61aaf9bd, 0x61d2dc53, 0x61fac2fa, 0x6222adb2, 
+	0x624a9c79, 0x62728f4f, 0x629a8633, 0x62c28123, 
+	0x62ea8020, 0x63128329, 0x633a8a3c, 0x63629559, 
+	0x638aa47f, 0x63b2b7ad, 0x63dacee2, 0x6402ea1e, 
+	0x642b0960, 0x64532ca6, 0x647b53f1, 0x64a37f3f, 
+	0x64cbae8f, 0x64f3e1e2, 0x651c1935, 0x65445488, 
+	0x656c93db, 0x6594d72c, 0x65bd1e7b, 0x65e569c7, 
+	0x660db90f, 0x66360c53, 0x665e6391, 0x6686bec9, 
+	0x66af1dfa, 0x66d78123, 0x66ffe844, 0x6728535b, 
+	0x6750c268, 0x6779356b, 0x67a1ac62, 0x67ca274c, 
+	0x67f2a629, 0x681b28f9, 0x6843afb9, 0x686c3a6a, 
+	0x6894c90b, 0x68bd5b9b, 0x68e5f219, 0x690e8c84, 
+	0x69372add, 0x695fcd21, 0x69887350, 0x69b11d6a, 
+	0x69d9cb6d, 0x6a027d5a, 0x6a2b332f, 0x6a53eceb, 
+	0x6a7caa8d, 0x6aa56c16, 0x6ace3184, 0x6af6fad6, 
+	0x6b1fc80c, 0x6b489925, 0x6b716e20, 0x6b9a46fd, 
+	0x6bc323bb, 0x6bec0458, 0x6c14e8d5, 0x6c3dd130, 
+	0x6c66bd69, 0x6c8fad80, 0x6cb8a172, 0x6ce19940, 
+	0x6d0a94e9, 0x6d33946d, 0x6d5c97ca, 0x6d859eff, 
+	0x6daeaa0d, 0x6dd7b8f1, 0x6e00cbad, 0x6e29e23e, 
+	0x6e52fca4, 0x6e7c1adf, 0x6ea53cee, 0x6ece62cf, 
+	0x6ef78c83, 0x6f20ba09, 0x6f49eb5f, 0x6f732085, 
+	0x6f9c597b, 0x6fc59640, 0x6feed6d3, 0x70181b33, 
+	0x70416360, 0x706aaf59, 0x7093ff1d, 0x70bd52ab, 
+	0x70e6aa04, 0x71100525, 0x7139640f, 0x7162c6c1, 
+	0x718c2d3a, 0x71b5977a, 0x71df057f, 0x72087749, 
+	0x7231ecd8, 0x725b662a, 0x7284e33f, 0x72ae6417, 
+	0x72d7e8b0, 0x7301710a, 0x732afd24, 0x73548cfe, 
+	0x737e2097, 0x73a7b7ee, 0x73d15303, 0x73faf1d5, 
+	0x74249462, 0x744e3aac, 0x7477e4b0, 0x74a1926e, 
+	0x74cb43e6, 0x74f4f917, 0x751eb201, 0x75486ea1, 
+	0x75722ef9, 0x759bf307, 0x75c5baca, 0x75ef8642, 
+	0x7619556f, 0x7643284f, 0x766cfee2, 0x7696d928, 
+	0x76c0b71f, 0x76ea98c7, 0x77147e20, 0x773e6728, 
+	0x776853df, 0x77924445, 0x77bc3858, 0x77e63019, 
+	0x78102b85, 0x783a2a9e, 0x78642d62, 0x788e33d1, 
+	0x78b83de9, 0x78e24bab, 0x790c5d15, 0x79367228, 
+	0x79608ae1, 0x798aa742, 0x79b4c748, 0x79deeaf4, 
+	0x7a091245, 0x7a333d3a, 0x7a5d6bd2, 0x7a879e0e, 
+	0x7ab1d3ec, 0x7adc0d6b, 0x7b064a8c, 0x7b308b4d, 
+	0x7b5acfae, 0x7b8517ae, 0x7baf634c, 0x7bd9b289, 
+	0x7c040563, 0x7c2e5bda, 0x7c58b5ec, 0x7c83139b, 
+	0x7cad74e4, 0x7cd7d9c7, 0x7d024244, 0x7d2cae5a, 
+	0x7d571e09, 0x7d81914f, 0x7dac082d, 0x7dd682a1, 
+	0x7e0100ac, 0x7e2b824b, 0x7e560780, 0x7e809048, 
+	0x7eab1ca5, 0x7ed5ac94, 0x7f004015, 0x7f2ad729, 
+	0x7f5571cd, 0x7f801003, 0x7faab1c8, 0x7fd5571d
+};
+
+

+const Word32 invSBF[24] = {

+  0x3FFD34FC, 0x2D3F8000, 0x24F18C7E, 0x1FFE9A7E, 

+  0x1C9DF10C, 0x1A1F851A, 0x182FE994, 0x169FC000, 

+  0x15542AAA, 0x143C31C2, 0x134B1B6C, 0x127920BE, 

+  0x11BF2FCC, 0x111A749E, 0x1085FC42, 0x0FFFA7BE, 

+  0x0F855818, 0x0F14EE56, 0x0EAE6A78, 0x0E4EF886, 

+  0x0DF69880, 0x0DA49568, 0x0D578542, 0x0D101D0C

+};

+
+const Word16 pow2tominusNover16[17] = {
+  0x7fff, 0x7a93, 0x7560, 0x7066,
+  0x6ba2, 0x6712, 0x62b4, 0x5e84,
+  0x5a82, 0x56ac, 0x52ff, 0x4f7b,
+  0x4c1c, 0x48e2, 0x45cb, 0x42d5,
+  0x4000
+};

+

+const Word16 sideInfoTabLong[MAX_SFB_LONG + 1] = {

+  9, 9, 9, 9, 9, 9, 9, 9, 9, 

+  9, 9, 9, 9, 9, 9, 9, 9, 9, 

+  9, 9, 9, 9, 9, 9, 9, 9, 9, 

+  9, 9, 9, 9, 14, 14, 14, 14, 

+  14, 14, 14, 14, 14, 14, 14, 

+  14, 14, 14, 14, 14, 14, 14, 

+  14, 14, 14

+};

+

+const Word16 sideInfoTabShort[MAX_SFB_SHORT + 1] = {

+  7, 7, 7, 7, 7, 7, 7, 10, 10, 

+  10, 10, 10, 10, 10, 13, 13

+};
+
+Word32 specExpMantTableComb_enc[4][14] =
+{
+  {0x40000000,  0x50a28be6,  0x6597fa95,  0x40000000, 
+   0x50a28be6,  0x6597fa95,  0x40000000,  0x50a28be6, 
+   0x6597fa95,  0x40000000,  0x50a28be6,  0x6597fa95, 
+   0x40000000,  0x50a28be6}, 
+
+  {0x4c1bf829,  0x5fe4435e,  0x78d0df9c,  0x4c1bf829, 
+   0x5fe4435e,  0x78d0df9c,  0x4c1bf829,  0x5fe4435e, 
+   0x78d0df9c,  0x4c1bf829,  0x5fe4435e,  0x78d0df9c, 
+   0x4c1bf829,  0x5fe4435e}, 
+
+  {0x5a82799a,  0x7208f81d,  0x47d66b0f,  0x5a82799a, 
+   0x7208f81d,  0x47d66b0f,  0x5a82799a,  0x7208f81d, 
+   0x47d66b0f,  0x5a82799a,  0x7208f81d,  0x47d66b0f, 
+   0x5a82799a,  0x7208f81d}, 
+
+  {0x6ba27e65,  0x43ce3e4b,  0x556e0424,  0x6ba27e65, 
+   0x43ce3e4b,  0x556e0424,  0x6ba27e65,  0x43ce3e4b, 
+   0x556e0424,  0x6ba27e65,  0x43ce3e4b,  0x556e0424, 
+   0x6ba27e65,  0x43ce3e4b}
+};
+
+const  UWord8 specExpTableComb_enc[4][14] =
+{
+  {1, 2, 3, 5, 6, 7, 9, 10, 11, 13, 14, 15, 17, 18},
+  {1, 2, 3, 5, 6, 7, 9, 10, 11, 13, 14, 15, 17, 18},
+  {1, 2, 4, 5, 6, 8, 9, 10, 12, 13, 14, 16, 17, 18},
+  {1, 3, 4, 5, 7, 8, 9, 11, 12, 13, 15, 16, 17, 19}
+};
+
+const Word16 quantBorders[4][4] = {

+  /* pow(1.0-0.4054, 4/3)/16 * pow(2, (0..3)/4) */

+  {0x0400, 0x0ee7, 0x1c86, 0x2c0d},

+  /* pow(2.0-0.4054, 4/3)/16 * pow(2, (0..3)/4) */

+  {0x04c2, 0x11b9, 0x21eb, 0x3463},

+  /* pow(3.0-0.4054, 4/3)/16 * pow(2, (0..3)/4) */

+  {0x05a8, 0x1514, 0x2856, 0x3e4c},

+  /* pow(4.0-0.4054, 4/3)/16 * pow(2, (0..3)/4) */

+  {0x06ba, 0x1911, 0x2ff8, 0x4a16},

+};

+
+const Word16 quantRecon[4][3] = {

+  {0x0800, 0x1429, 0x229d},

+  {0x0983, 0x17f9, 0x292a},

+  {0x0b50, 0x1c82, 0x30f4},

+  {0x0d74, 0x21e7, 0x3a37},

+};
+
+const int sampRateTab[NUM_SAMPLE_RATES] = {

+    96000, 88200, 64000, 48000, 44100, 32000, 

+	24000, 22050, 16000, 12000, 11025,  8000

+};
+
+
+const int	rates[8] = {		

+	160, 240, 320, 400, 480, 560, 640, 0

+};

+
+const int BandwithCoefTab[8][NUM_SAMPLE_RATES] = {
+	{ 7000,  7000,  4666,  3500,  3500,  2800,  2800,  2800,  2800,  2000,  2000,  2000},
+	{12000, 12000,  8000,  6000,  6000,  6000,  4000,  4000,  4000,  3000,  3000,  3000},
+	{18000, 18000, 12000,  9000,  9000,  9000,  7000,  7000,  7000,  5000,  5000,  5000},
+	{20000, 20000, 16000, 12000, 12000, 12000,  9000,  9000,  9000,  6000,  6000,  6000},
+	{20000, 20000, 18666, 14000, 14000, 14000, 10000, 10000, 10000,  7000,  7000,  7000},
+	{20000, 20000, 20000, 16000, 16000, 16000, 12000, 12000, 12000,  8000,  8000,  8000},
+	{20000, 20000, 20000, 20000, 20000, 20000, 15000, 15000, 15000, 10000, 10000, 10000},
+	{20000, 20000, 20000, 20000, 20000, 20000, 20000, 20000, 20000, 20000, 20000, 20000}
+};
+
+
+/* total number of scale factor bands in one window */

+const UWord8 sfBandTotalShort[NUM_SAMPLE_RATES] = {

+    12, 12, 12, 14, 14, 14, 15, 15, 15, 15, 15, 15

+};

+

+const UWord8 sfBandTotalLong[NUM_SAMPLE_RATES] = {

+    41, 41, 47, 49, 49, 51, 47, 47, 43, 43, 43, 40

+};

+

+/* scale factor band tables */

+const int sfBandTabShortOffset[NUM_SAMPLE_RATES] = {0, 0, 0, 13, 13, 13, 28, 28, 44, 44, 44, 60};

+

+const short sfBandTabShort[76] = {

+	/* short block 64, 88, 96 kHz [13]  */

+	0,   4,   8,  12,  16,  20,  24,  32,  40,  48,  64,  92, 128,

+

+	/* short block 32, 44, 48 kHz [15]  */

+	0,   4,   8,  12,  16,  20,  28,  36,  44,  56,  68,  80,  96, 112, 128,

+

+	/* short block 22, 24 kHz [16]  */

+	0,   4,   8,  12,  16,  20,  24,  28,  36,  44,  52,  64,  76,  92, 108, 128,

+

+	/* short block 11, 12, 16 kHz [16] */

+	0,   4,   8,  12,  16,  20,  24,  28,  32,  40,  48,  60,  72,  88, 108, 128,

+

+	/* short block 8 kHz [16] */

+	0,   4,   8,  12,  16,  20,  24,  28,  36,  44,  52,  60,  72,  88, 108, 128

+};

+

+const int sfBandTabLongOffset[NUM_SAMPLE_RATES] = {0, 0, 42, 90, 90, 140, 192, 192, 240, 240, 240, 284};

+

+const short sfBandTabLong[325] = {

+	/* long block 88, 96 kHz [42]  */

+	  0,   4,   8,  12,  16,  20,  24,  28,  32,  36,  40,  44,  48,   52,

+	 56,  64,  72,  80,  88,  96, 108, 120, 132, 144, 156, 172, 188,  212,

+	240, 276, 320, 384, 448, 512, 576, 640, 704, 768, 832, 896, 960, 1024,

+

+	/* long block 64 kHz [48]  */

+	  0,   4,   8,  12,  16,  20,  24,  28,  32,  36,  40,  44,  48,  52,  56,   64,

+	 72,  80,  88, 100, 112, 124, 140, 156, 172, 192, 216, 240, 268, 304, 344,  384,

+	424, 464, 504, 544, 584, 624, 664, 704, 744, 784, 824, 864, 904, 944, 984, 1024,

+

+	/* long block 44, 48 kHz [50] */

+	  0,   4,   8,  12,  16,  20,  24,  28,  32,  36,  40,  48,  56,  64,  72,   80,  88,

+	 96, 108, 120, 132, 144, 160, 176, 196, 216, 240, 264, 292, 320, 352, 384,  416, 448,

+	480, 512, 544, 576, 608, 640, 672, 704, 736, 768, 800, 832, 864, 896, 928, 1024,

+

+	/* long block 32 kHz [52] */

+	  0,   4,   8,  12,  16,  20,  24,  28,  32,  36,  40,  48,  56,  64,  72,   80,  88,  96,

+	108, 120, 132, 144, 160, 176, 196, 216, 240, 264, 292, 320, 352, 384, 416,  448, 480, 512,

+	544, 576, 608, 640, 672, 704, 736, 768, 800, 832, 864, 896, 928, 960, 992, 1024,

+

+	/* long block 22, 24 kHz [48] */

+	  0,   4,   8,  12,  16,  20,  24,  28,  32,  36,  40,  44,  52,  60,  68,   76,

+	 84,  92, 100, 108, 116, 124, 136, 148, 160, 172, 188, 204, 220, 240, 260,  284,

+	308, 336, 364, 396, 432, 468, 508, 552, 600, 652, 704, 768, 832, 896, 960, 1024,

+

+	/* long block 11, 12, 16 kHz [44] */

+	  0,   8,  16,  24,  32,  40,  48,  56,  64,  72,  80,  88, 100,  112, 124,

+	136, 148, 160, 172, 184, 196, 212, 228, 244, 260, 280, 300, 320,  344, 368,

+	396, 424, 456, 492, 532, 572, 616, 664, 716, 772, 832, 896, 960, 1024,

+

+	/* long block 8 kHz [41]  */

+	  0,  12,  24,  36,  48,  60,  72,  84,  96, 108, 120, 132,  144, 156,

+	172, 188, 204, 220, 236, 252, 268, 288, 308, 328, 348, 372,  396, 420,

+	448, 476, 508, 544, 580, 620, 664, 712, 764, 820, 880, 944, 1024

+};

+
+/*
+  these tables are used only for counting and 
+  are stored in packed format
+*/
+const UWord16 huff_ltab1_2[3][3][3][3]=
+{
+  {
+    {
+      {0x0b09,0x0907,0x0b09},
+      {0x0a08,0x0706,0x0a08},
+      {0x0b09,0x0908,0x0b09}
+    },
+    {
+      {0x0a08,0x0706,0x0a07},
+      {0x0706,0x0505,0x0706},
+      {0x0907,0x0706,0x0a08}
+    },
+    {
+      {0x0b09,0x0907,0x0b08},
+      {0x0908,0x0706,0x0908},
+      {0x0b09,0x0907,0x0b09}
+    }
+  },
+  {
+    {
+      {0x0908,0x0706,0x0907},
+      {0x0706,0x0505,0x0706},
+      {0x0907,0x0706,0x0908}
+    },
+    {
+      {0x0706,0x0505,0x0706},
+      {0x0505,0x0103,0x0505},
+      {0x0706,0x0505,0x0706}
+    },
+    {
+      {0x0908,0x0706,0x0907},
+      {0x0706,0x0505,0x0706},
+      {0x0908,0x0706,0x0908}
+    }
+  },
+  {
+    {
+      {0x0b09,0x0907,0x0b09},
+      {0x0908,0x0706,0x0908},
+      {0x0b08,0x0907,0x0b09}
+    },
+    {
+      {0x0a08,0x0706,0x0907},
+      {0x0706,0x0504,0x0706},
+      {0x0908,0x0706,0x0a07}
+    },
+    {
+      {0x0b09,0x0907,0x0b09},
+      {0x0a07,0x0706,0x0908},
+      {0x0b09,0x0907,0x0b09}
+    }
+  }
+};
+
+
+const UWord16 huff_ltab3_4[3][3][3][3]=
+{
+  {
+    {
+      {0x0104,0x0405,0x0808},
+      {0x0405,0x0504,0x0808},
+      {0x0909,0x0908,0x0a0b}
+    },
+    {
+      {0x0405,0x0605,0x0908},
+      {0x0605,0x0604,0x0908},
+      {0x0908,0x0907,0x0a0a}
+    },
+    {
+      {0x0909,0x0a08,0x0d0b},
+      {0x0908,0x0908,0x0b0a},
+      {0x0b0b,0x0a0a,0x0c0b}
+    }
+  },
+  {
+    {
+      {0x0404,0x0605,0x0a08},
+      {0x0604,0x0704,0x0a08},
+      {0x0a08,0x0a08,0x0c0a}
+    },
+    {
+      {0x0504,0x0704,0x0b08},
+      {0x0604,0x0704,0x0a07},
+      {0x0908,0x0907,0x0b09}
+    },
+    {
+      {0x0908,0x0a08,0x0d0a},
+      {0x0807,0x0907,0x0c09},
+      {0x0a0a,0x0b09,0x0c0a}
+    }
+  },
+  {
+    {
+      {0x0808,0x0a08,0x0f0b},
+      {0x0908,0x0b07,0x0f0a},
+      {0x0d0b,0x0e0a,0x100c}
+    },
+    {
+      {0x0808,0x0a07,0x0e0a},
+      {0x0907,0x0a07,0x0e09},
+      {0x0c0a,0x0c09,0x0f0b}
+    },
+    {
+      {0x0b0b,0x0c0a,0x100c},
+      {0x0a0a,0x0b09,0x0f0b},
+      {0x0c0b,0x0c0a,0x0f0b}
+    }
+  }
+};
+
+const UWord16 huff_ltab5_6[9][9]=
+{
+  {0x0d0b,0x0c0a,0x0b09,0x0b09,0x0a09,0x0b09,0x0b09,0x0c0a,0x0d0b},
+  {0x0c0a,0x0b09,0x0a08,0x0907,0x0807,0x0907,0x0a08,0x0b09,0x0c0a},
+  {0x0c09,0x0a08,0x0906,0x0806,0x0706,0x0806,0x0906,0x0a08,0x0b09},
+  {0x0b09,0x0907,0x0806,0x0504,0x0404,0x0504,0x0806,0x0907,0x0b09},
+  {0x0a09,0x0807,0x0706,0x0404,0x0104,0x0404,0x0706,0x0807,0x0b09},
+  {0x0b09,0x0907,0x0806,0x0504,0x0404,0x0504,0x0806,0x0907,0x0b09},
+  {0x0b09,0x0a08,0x0906,0x0806,0x0706,0x0806,0x0906,0x0a08,0x0b09},
+  {0x0c0a,0x0b09,0x0a08,0x0907,0x0807,0x0907,0x0a07,0x0b08,0x0c0a},
+  {0x0d0b,0x0c0a,0x0c09,0x0b09,0x0a09,0x0a09,0x0b09,0x0c0a,0x0d0b}
+};
+
+const UWord16 huff_ltab7_8[8][8]=
+{
+  {0x0105,0x0304,0x0605,0x0706,0x0807,0x0908,0x0a09,0x0b0a},
+  {0x0304,0x0403,0x0604,0x0705,0x0806,0x0807,0x0907,0x0908},
+  {0x0605,0x0604,0x0704,0x0805,0x0806,0x0907,0x0907,0x0a08},
+  {0x0706,0x0705,0x0805,0x0806,0x0906,0x0907,0x0a08,0x0a08},
+  {0x0807,0x0806,0x0906,0x0906,0x0a07,0x0a07,0x0a08,0x0b09},
+  {0x0908,0x0807,0x0906,0x0907,0x0a07,0x0a08,0x0b08,0x0b0a},
+  {0x0a09,0x0907,0x0907,0x0a08,0x0a08,0x0b08,0x0c09,0x0c09},
+  {0x0b0a,0x0a08,0x0a08,0x0a08,0x0b09,0x0b09,0x0c09,0x0c0a}
+};
+
+const UWord16 huff_ltab9_10[13][13]=
+{
+  {0x0106,0x0305,0x0606,0x0806,0x0907,0x0a08,0x0a09,0x0b0a,0x0b0a,0x0c0a,0x0c0b,0x0d0b,0x0d0c},
+  {0x0305,0x0404,0x0604,0x0705,0x0806,0x0807,0x0907,0x0a08,0x0a08,0x0a09,0x0b0a,0x0c0a,0x0c0b},
+  {0x0606,0x0604,0x0705,0x0805,0x0806,0x0906,0x0a07,0x0a08,0x0a08,0x0b09,0x0c09,0x0c0a,0x0c0a},
+  {0x0806,0x0705,0x0805,0x0905,0x0906,0x0a07,0x0a07,0x0b08,0x0b08,0x0b09,0x0c09,0x0c0a,0x0d0a},
+  {0x0907,0x0806,0x0906,0x0906,0x0a06,0x0a07,0x0b07,0x0b08,0x0b08,0x0c09,0x0c09,0x0c0a,0x0d0a},
+  {0x0a08,0x0907,0x0906,0x0a07,0x0b07,0x0b07,0x0b08,0x0c08,0x0b08,0x0c09,0x0c0a,0x0d0a,0x0d0b},
+  {0x0b09,0x0907,0x0a07,0x0b07,0x0b07,0x0b08,0x0c08,0x0c09,0x0c09,0x0c09,0x0d0a,0x0d0a,0x0d0b},
+  {0x0b09,0x0a08,0x0a08,0x0b08,0x0b08,0x0c08,0x0c09,0x0d09,0x0d09,0x0d0a,0x0d0a,0x0d0b,0x0d0b},
+  {0x0b09,0x0a08,0x0a08,0x0b08,0x0b08,0x0b08,0x0c09,0x0c09,0x0d0a,0x0d0a,0x0e0a,0x0d0b,0x0e0b},
+  {0x0b0a,0x0a09,0x0b09,0x0b09,0x0c09,0x0c09,0x0c09,0x0c0a,0x0d0a,0x0d0a,0x0e0b,0x0e0b,0x0e0c},
+  {0x0c0a,0x0b09,0x0b09,0x0c09,0x0c09,0x0c0a,0x0d0a,0x0d0a,0x0d0a,0x0e0b,0x0e0b,0x0e0b,0x0f0c},
+  {0x0c0b,0x0b0a,0x0c09,0x0c0a,0x0c0a,0x0d0a,0x0d0a,0x0d0a,0x0d0b,0x0e0b,0x0e0b,0x0f0b,0x0f0c},
+  {0x0d0b,0x0c0a,0x0c0a,0x0c0a,0x0d0a,0x0d0a,0x0d0a,0x0d0b,0x0e0b,0x0e0c,0x0e0c,0x0e0c,0x0f0c}
+};
+
+const UWord16 huff_ltab11[17][17]=
+{
+  {0x0004,0x0005,0x0006,0x0007,0x0008,0x0008,0x0009,0x000a,0x000a,0x000a,0x000b,0x000b,0x000c,0x000b,0x000c,0x000c,0x000a},
+  {0x0005,0x0004,0x0005,0x0006,0x0007,0x0007,0x0008,0x0008,0x0009,0x0009,0x0009,0x000a,0x000a,0x000a,0x000a,0x000b,0x0008},
+  {0x0006,0x0005,0x0005,0x0006,0x0007,0x0007,0x0008,0x0008,0x0008,0x0009,0x0009,0x0009,0x000a,0x000a,0x000a,0x000a,0x0008},
+  {0x0007,0x0006,0x0006,0x0006,0x0007,0x0007,0x0008,0x0008,0x0008,0x0009,0x0009,0x0009,0x000a,0x000a,0x000a,0x000a,0x0008},
+  {0x0008,0x0007,0x0007,0x0007,0x0007,0x0008,0x0008,0x0008,0x0008,0x0009,0x0009,0x0009,0x000a,0x000a,0x000a,0x000a,0x0008},
+  {0x0008,0x0007,0x0007,0x0007,0x0007,0x0008,0x0008,0x0008,0x0009,0x0009,0x0009,0x0009,0x000a,0x000a,0x000a,0x000a,0x0008},
+  {0x0009,0x0008,0x0008,0x0008,0x0008,0x0008,0x0008,0x0008,0x0009,0x0009,0x0009,0x000a,0x000a,0x000a,0x000a,0x000a,0x0008},
+  {0x0009,0x0008,0x0008,0x0008,0x0008,0x0008,0x0008,0x0009,0x0009,0x0009,0x000a,0x000a,0x000a,0x000a,0x000a,0x000a,0x0008},
+  {0x000a,0x0009,0x0008,0x0008,0x0009,0x0009,0x0009,0x0009,0x0009,0x000a,0x000a,0x000a,0x000a,0x000a,0x000a,0x000b,0x0008},
+  {0x000a,0x0009,0x0009,0x0009,0x0009,0x0009,0x0009,0x0009,0x000a,0x000a,0x000a,0x000a,0x000a,0x000a,0x000b,0x000b,0x0008},
+  {0x000b,0x0009,0x0009,0x0009,0x0009,0x0009,0x0009,0x000a,0x000a,0x000a,0x000a,0x000a,0x000b,0x000a,0x000b,0x000b,0x0008},
+  {0x000b,0x000a,0x0009,0x0009,0x000a,0x0009,0x000a,0x000a,0x000a,0x000a,0x000a,0x000b,0x000b,0x000b,0x000b,0x000b,0x0008},
+  {0x000b,0x000a,0x000a,0x000a,0x000a,0x000a,0x000a,0x000a,0x000a,0x000a,0x000a,0x000b,0x000b,0x000b,0x000b,0x000b,0x0009},
+  {0x000b,0x000a,0x0009,0x0009,0x000a,0x000a,0x000a,0x000a,0x000a,0x000a,0x000b,0x000b,0x000b,0x000b,0x000b,0x000b,0x0009},
+  {0x000b,0x000a,0x000a,0x000a,0x000a,0x000a,0x000a,0x000a,0x000a,0x000a,0x000b,0x000b,0x000b,0x000b,0x000b,0x000b,0x0009},
+  {0x000c,0x000a,0x000a,0x000a,0x000a,0x000a,0x000a,0x000a,0x000b,0x000b,0x000b,0x000b,0x000b,0x000b,0x000c,0x000c,0x0009},
+  {0x0009,0x0008,0x0008,0x0008,0x0008,0x0008,0x0008,0x0008,0x0008,0x0008,0x0008,0x0008,0x0008,0x0008,0x0008,0x0009,0x0005}
+};
+
+const UWord16 huff_ltabscf[121]=
+{
+  0x0012,
+  0x0012,
+  0x0012,
+  0x0012,
+  0x0013,
+  0x0013,
+  0x0013,
+  0x0013,
+  0x0013,
+  0x0013,
+  0x0013,
+  0x0013,
+  0x0013,
+  0x0013,
+  0x0013,
+  0x0013,
+  0x0013,
+  0x0013,
+  0x0013,
+  0x0012,
+  0x0013,
+  0x0012,
+  0x0011,
+  0x0011,
+  0x0010,
+  0x0011,
+  0x0010,
+  0x0010,
+  0x0010,
+  0x0010,
+  0x000f,
+  0x000f,
+  0x000e,
+  0x000e,
+  0x000e,
+  0x000e,
+  0x000e,
+  0x000e,
+  0x000d,
+  0x000d,
+  0x000c,
+  0x000c,
+  0x000c,
+  0x000b,
+  0x000c,
+  0x000b,
+  0x000a,
+  0x000a,
+  0x000a,
+  0x0009,
+  0x0009,
+  0x0008,
+  0x0008,
+  0x0008,
+  0x0007,
+  0x0006,
+  0x0006,
+  0x0005,
+  0x0004,
+  0x0003,
+  0x0001,
+  0x0004,
+  0x0004,
+  0x0005,
+  0x0006,
+  0x0006,
+  0x0007,
+  0x0007,
+  0x0008,
+  0x0008,
+  0x0009,
+  0x0009,
+  0x000a,
+  0x000a,
+  0x000a,
+  0x000b,
+  0x000b,
+  0x000b,
+  0x000b,
+  0x000c,
+  0x000c,
+  0x000d,
+  0x000d,
+  0x000d,
+  0x000e,
+  0x000e,
+  0x0010,
+  0x000f,
+  0x0010,
+  0x000f,
+  0x0012,
+  0x0013,
+  0x0013,
+  0x0013,
+  0x0013,
+  0x0013,
+  0x0013,
+  0x0013,
+  0x0013,
+  0x0013,
+  0x0013,
+  0x0013,
+  0x0013,
+  0x0013,
+  0x0013,
+  0x0013,
+  0x0013,
+  0x0013,
+  0x0013,
+  0x0013,
+  0x0013,
+  0x0013,
+  0x0013,
+  0x0013,
+  0x0013,
+  0x0013,
+  0x0013,
+  0x0013,
+  0x0013,
+  0x0013,
+  0x0013
+};
+
+
+const UWord16 huff_ctab1[3][3][3][3]=
+{
+  {
+    {
+      {0x07f8,0x01f1,0x07fd},
+      {0x03f5,0x0068,0x03f0},
+      {0x07f7,0x01ec,0x07f5}
+    },
+    {
+      {0x03f1,0x0072,0x03f4},
+      {0x0074,0x0011,0x0076},
+      {0x01eb,0x006c,0x03f6}
+    },
+    {
+      {0x07fc,0x01e1,0x07f1},
+      {0x01f0,0x0061,0x01f6},
+      {0x07f2,0x01ea,0x07fb}
+    }
+  },
+  {
+    {
+      {0x01f2,0x0069,0x01ed},
+      {0x0077,0x0017,0x006f},
+      {0x01e6,0x0064,0x01e5}
+    },
+    {
+      {0x0067,0x0015,0x0062},
+      {0x0012,0x0000,0x0014},
+      {0x0065,0x0016,0x006d}
+    },
+    {
+      {0x01e9,0x0063,0x01e4},
+      {0x006b,0x0013,0x0071},
+      {0x01e3,0x0070,0x01f3}
+    }
+  },
+  {
+    {
+      {0x07fe,0x01e7,0x07f3},
+      {0x01ef,0x0060,0x01ee},
+      {0x07f0,0x01e2,0x07fa}
+    },
+    {
+      {0x03f3,0x006a,0x01e8},
+      {0x0075,0x0010,0x0073},
+      {0x01f4,0x006e,0x03f7}
+    },
+    {
+      {0x07f6,0x01e0,0x07f9},
+      {0x03f2,0x0066,0x01f5},
+      {0x07ff,0x01f7,0x07f4}
+    }
+  }
+};
+
+const UWord16 huff_ctab2[3][3][3][3]=
+{
+  {
+    {
+      {0x01f3,0x006f,0x01fd},
+      {0x00eb,0x0023,0x00ea},
+      {0x01f7,0x00e8,0x01fa}
+    },
+    {
+      {0x00f2,0x002d,0x0070},
+      {0x0020,0x0006,0x002b},
+      {0x006e,0x0028,0x00e9}
+    },
+    {
+      {0x01f9,0x0066,0x00f8},
+      {0x00e7,0x001b,0x00f1},
+      {0x01f4,0x006b,0x01f5}
+    }
+  },
+  {
+    {
+      {0x00ec,0x002a,0x006c},
+      {0x002c,0x000a,0x0027},
+      {0x0067,0x001a,0x00f5}
+    },
+    {
+      {0x0024,0x0008,0x001f},
+      {0x0009,0x0000,0x0007},
+      {0x001d,0x000b,0x0030}
+    },
+    {
+      {0x00ef,0x001c,0x0064},
+      {0x001e,0x000c,0x0029},
+      {0x00f3,0x002f,0x00f0}
+    }
+  },
+  {
+    {
+      {0x01fc,0x0071,0x01f2},
+      {0x00f4,0x0021,0x00e6},
+      {0x00f7,0x0068,0x01f8}
+    },
+    {
+      {0x00ee,0x0022,0x0065},
+      {0x0031,0x0002,0x0026},
+      {0x00ed,0x0025,0x006a}
+    },
+    {
+      {0x01fb,0x0072,0x01fe},
+      {0x0069,0x002e,0x00f6},
+      {0x01ff,0x006d,0x01f6}
+    }
+  }
+};
+
+const UWord16 huff_ctab3[3][3][3][3]=
+{
+  {
+    {
+      {0x0000,0x0009,0x00ef},
+      {0x000b,0x0019,0x00f0},
+      {0x01eb,0x01e6,0x03f2}
+    },
+    {
+      {0x000a,0x0035,0x01ef},
+      {0x0034,0x0037,0x01e9},
+      {0x01ed,0x01e7,0x03f3}
+    },
+    {
+      {0x01ee,0x03ed,0x1ffa},
+      {0x01ec,0x01f2,0x07f9},
+      {0x07f8,0x03f8,0x0ff8}
+    }
+  },
+  {
+    {
+      {0x0008,0x0038,0x03f6},
+      {0x0036,0x0075,0x03f1},
+      {0x03eb,0x03ec,0x0ff4}
+    },
+    {
+      {0x0018,0x0076,0x07f4},
+      {0x0039,0x0074,0x03ef},
+      {0x01f3,0x01f4,0x07f6}
+    },
+    {
+      {0x01e8,0x03ea,0x1ffc},
+      {0x00f2,0x01f1,0x0ffb},
+      {0x03f5,0x07f3,0x0ffc}
+    }
+  },
+  {
+    {
+      {0x00ee,0x03f7,0x7ffe},
+      {0x01f0,0x07f5,0x7ffd},
+      {0x1ffb,0x3ffa,0xffff}
+    },
+    {
+      {0x00f1,0x03f0,0x3ffc},
+      {0x01ea,0x03ee,0x3ffb},
+      {0x0ff6,0x0ffa,0x7ffc}
+    },
+    {
+      {0x07f2,0x0ff5,0xfffe},
+      {0x03f4,0x07f7,0x7ffb},
+      {0x0ff7,0x0ff9,0x7ffa}
+    }
+  }
+};
+
+const UWord16 huff_ctab4[3][3][3][3]=
+{
+  {
+    {
+      {0x0007,0x0016,0x00f6},
+      {0x0018,0x0008,0x00ef},
+      {0x01ef,0x00f3,0x07f8}
+    },
+    {
+      {0x0019,0x0017,0x00ed},
+      {0x0015,0x0001,0x00e2},
+      {0x00f0,0x0070,0x03f0}
+    },
+    {
+      {0x01ee,0x00f1,0x07fa},
+      {0x00ee,0x00e4,0x03f2},
+      {0x07f6,0x03ef,0x07fd}
+    }
+  },
+  {
+    {
+      {0x0005,0x0014,0x00f2},
+      {0x0009,0x0004,0x00e5},
+      {0x00f4,0x00e8,0x03f4}
+    },
+    {
+      {0x0006,0x0002,0x00e7},
+      {0x0003,0x0000,0x006b},
+      {0x00e3,0x0069,0x01f3}
+    },
+    {
+      {0x00eb,0x00e6,0x03f6},
+      {0x006e,0x006a,0x01f4},
+      {0x03ec,0x01f0,0x03f9}
+    }
+  },
+  {
+    {
+      {0x00f5,0x00ec,0x07fb},
+      {0x00ea,0x006f,0x03f7},
+      {0x07f9,0x03f3,0x0fff}
+    },
+    {
+      {0x00e9,0x006d,0x03f8},
+      {0x006c,0x0068,0x01f5},
+      {0x03ee,0x01f2,0x07f4}
+    },
+    {
+      {0x07f7,0x03f1,0x0ffe},
+      {0x03ed,0x01f1,0x07f5},
+      {0x07fe,0x03f5,0x07fc}
+    }
+  }
+};
+const UWord16 huff_ctab5[9][9]=
+{
+  {0x1fff,0x0ff7,0x07f4,0x07e8,0x03f1,0x07ee,0x07f9,0x0ff8,0x1ffd},
+  {0x0ffd,0x07f1,0x03e8,0x01e8,0x00f0,0x01ec,0x03ee,0x07f2,0x0ffa},
+  {0x0ff4,0x03ef,0x01f2,0x00e8,0x0070,0x00ec,0x01f0,0x03ea,0x07f3},
+  {0x07eb,0x01eb,0x00ea,0x001a,0x0008,0x0019,0x00ee,0x01ef,0x07ed},
+  {0x03f0,0x00f2,0x0073,0x000b,0x0000,0x000a,0x0071,0x00f3,0x07e9},
+  {0x07ef,0x01ee,0x00ef,0x0018,0x0009,0x001b,0x00eb,0x01e9,0x07ec},
+  {0x07f6,0x03eb,0x01f3,0x00ed,0x0072,0x00e9,0x01f1,0x03ed,0x07f7},
+  {0x0ff6,0x07f0,0x03e9,0x01ed,0x00f1,0x01ea,0x03ec,0x07f8,0x0ff9},
+  {0x1ffc,0x0ffc,0x0ff5,0x07ea,0x03f3,0x03f2,0x07f5,0x0ffb,0x1ffe}
+};
+
+const UWord16 huff_ctab6[9][9]=
+{
+  {0x07fe,0x03fd,0x01f1,0x01eb,0x01f4,0x01ea,0x01f0,0x03fc,0x07fd},
+  {0x03f6,0x01e5,0x00ea,0x006c,0x0071,0x0068,0x00f0,0x01e6,0x03f7},
+  {0x01f3,0x00ef,0x0032,0x0027,0x0028,0x0026,0x0031,0x00eb,0x01f7},
+  {0x01e8,0x006f,0x002e,0x0008,0x0004,0x0006,0x0029,0x006b,0x01ee},
+  {0x01ef,0x0072,0x002d,0x0002,0x0000,0x0003,0x002f,0x0073,0x01fa},
+  {0x01e7,0x006e,0x002b,0x0007,0x0001,0x0005,0x002c,0x006d,0x01ec},
+  {0x01f9,0x00ee,0x0030,0x0024,0x002a,0x0025,0x0033,0x00ec,0x01f2},
+  {0x03f8,0x01e4,0x00ed,0x006a,0x0070,0x0069,0x0074,0x00f1,0x03fa},
+  {0x07ff,0x03f9,0x01f6,0x01ed,0x01f8,0x01e9,0x01f5,0x03fb,0x07fc}
+};
+
+const UWord16 huff_ctab7[8][8]=
+{
+  {0x0000,0x0005,0x0037,0x0074,0x00f2,0x01eb,0x03ed,0x07f7},
+  {0x0004,0x000c,0x0035,0x0071,0x00ec,0x00ee,0x01ee,0x01f5},
+  {0x0036,0x0034,0x0072,0x00ea,0x00f1,0x01e9,0x01f3,0x03f5},
+  {0x0073,0x0070,0x00eb,0x00f0,0x01f1,0x01f0,0x03ec,0x03fa},
+  {0x00f3,0x00ed,0x01e8,0x01ef,0x03ef,0x03f1,0x03f9,0x07fb},
+  {0x01ed,0x00ef,0x01ea,0x01f2,0x03f3,0x03f8,0x07f9,0x07fc},
+  {0x03ee,0x01ec,0x01f4,0x03f4,0x03f7,0x07f8,0x0ffd,0x0ffe},
+  {0x07f6,0x03f0,0x03f2,0x03f6,0x07fa,0x07fd,0x0ffc,0x0fff}
+};
+
+const UWord16 huff_ctab8[8][8]=
+{
+  {0x000e,0x0005,0x0010,0x0030,0x006f,0x00f1,0x01fa,0x03fe},
+  {0x0003,0x0000,0x0004,0x0012,0x002c,0x006a,0x0075,0x00f8},
+  {0x000f,0x0002,0x0006,0x0014,0x002e,0x0069,0x0072,0x00f5},
+  {0x002f,0x0011,0x0013,0x002a,0x0032,0x006c,0x00ec,0x00fa},
+  {0x0071,0x002b,0x002d,0x0031,0x006d,0x0070,0x00f2,0x01f9},
+  {0x00ef,0x0068,0x0033,0x006b,0x006e,0x00ee,0x00f9,0x03fc},
+  {0x01f8,0x0074,0x0073,0x00ed,0x00f0,0x00f6,0x01f6,0x01fd},
+  {0x03fd,0x00f3,0x00f4,0x00f7,0x01f7,0x01fb,0x01fc,0x03ff}
+};
+
+const UWord16 huff_ctab9[13][13]=
+{
+  {0x0000,0x0005,0x0037,0x00e7,0x01de,0x03ce,0x03d9,0x07c8,0x07cd,0x0fc8,0x0fdd,0x1fe4,0x1fec},
+  {0x0004,0x000c,0x0035,0x0072,0x00ea,0x00ed,0x01e2,0x03d1,0x03d3,0x03e0,0x07d8,0x0fcf,0x0fd5},
+  {0x0036,0x0034,0x0071,0x00e8,0x00ec,0x01e1,0x03cf,0x03dd,0x03db,0x07d0,0x0fc7,0x0fd4,0x0fe4},
+  {0x00e6,0x0070,0x00e9,0x01dd,0x01e3,0x03d2,0x03dc,0x07cc,0x07ca,0x07de,0x0fd8,0x0fea,0x1fdb},
+  {0x01df,0x00eb,0x01dc,0x01e6,0x03d5,0x03de,0x07cb,0x07dd,0x07dc,0x0fcd,0x0fe2,0x0fe7,0x1fe1},
+  {0x03d0,0x01e0,0x01e4,0x03d6,0x07c5,0x07d1,0x07db,0x0fd2,0x07e0,0x0fd9,0x0feb,0x1fe3,0x1fe9},
+  {0x07c4,0x01e5,0x03d7,0x07c6,0x07cf,0x07da,0x0fcb,0x0fda,0x0fe3,0x0fe9,0x1fe6,0x1ff3,0x1ff7},
+  {0x07d3,0x03d8,0x03e1,0x07d4,0x07d9,0x0fd3,0x0fde,0x1fdd,0x1fd9,0x1fe2,0x1fea,0x1ff1,0x1ff6},
+  {0x07d2,0x03d4,0x03da,0x07c7,0x07d7,0x07e2,0x0fce,0x0fdb,0x1fd8,0x1fee,0x3ff0,0x1ff4,0x3ff2},
+  {0x07e1,0x03df,0x07c9,0x07d6,0x0fca,0x0fd0,0x0fe5,0x0fe6,0x1feb,0x1fef,0x3ff3,0x3ff4,0x3ff5},
+  {0x0fe0,0x07ce,0x07d5,0x0fc6,0x0fd1,0x0fe1,0x1fe0,0x1fe8,0x1ff0,0x3ff1,0x3ff8,0x3ff6,0x7ffc},
+  {0x0fe8,0x07df,0x0fc9,0x0fd7,0x0fdc,0x1fdc,0x1fdf,0x1fed,0x1ff5,0x3ff9,0x3ffb,0x7ffd,0x7ffe},
+  {0x1fe7,0x0fcc,0x0fd6,0x0fdf,0x1fde,0x1fda,0x1fe5,0x1ff2,0x3ffa,0x3ff7,0x3ffc,0x3ffd,0x7fff}
+};
+
+const UWord16 huff_ctab10[13][13]=
+{
+  {0x0022,0x0008,0x001d,0x0026,0x005f,0x00d3,0x01cf,0x03d0,0x03d7,0x03ed,0x07f0,0x07f6,0x0ffd},
+  {0x0007,0x0000,0x0001,0x0009,0x0020,0x0054,0x0060,0x00d5,0x00dc,0x01d4,0x03cd,0x03de,0x07e7},
+  {0x001c,0x0002,0x0006,0x000c,0x001e,0x0028,0x005b,0x00cd,0x00d9,0x01ce,0x01dc,0x03d9,0x03f1},
+  {0x0025,0x000b,0x000a,0x000d,0x0024,0x0057,0x0061,0x00cc,0x00dd,0x01cc,0x01de,0x03d3,0x03e7},
+  {0x005d,0x0021,0x001f,0x0023,0x0027,0x0059,0x0064,0x00d8,0x00df,0x01d2,0x01e2,0x03dd,0x03ee},
+  {0x00d1,0x0055,0x0029,0x0056,0x0058,0x0062,0x00ce,0x00e0,0x00e2,0x01da,0x03d4,0x03e3,0x07eb},
+  {0x01c9,0x005e,0x005a,0x005c,0x0063,0x00ca,0x00da,0x01c7,0x01ca,0x01e0,0x03db,0x03e8,0x07ec},
+  {0x01e3,0x00d2,0x00cb,0x00d0,0x00d7,0x00db,0x01c6,0x01d5,0x01d8,0x03ca,0x03da,0x07ea,0x07f1},
+  {0x01e1,0x00d4,0x00cf,0x00d6,0x00de,0x00e1,0x01d0,0x01d6,0x03d1,0x03d5,0x03f2,0x07ee,0x07fb},
+  {0x03e9,0x01cd,0x01c8,0x01cb,0x01d1,0x01d7,0x01df,0x03cf,0x03e0,0x03ef,0x07e6,0x07f8,0x0ffa},
+  {0x03eb,0x01dd,0x01d3,0x01d9,0x01db,0x03d2,0x03cc,0x03dc,0x03ea,0x07ed,0x07f3,0x07f9,0x0ff9},
+  {0x07f2,0x03ce,0x01e4,0x03cb,0x03d8,0x03d6,0x03e2,0x03e5,0x07e8,0x07f4,0x07f5,0x07f7,0x0ffb},
+  {0x07fa,0x03ec,0x03df,0x03e1,0x03e4,0x03e6,0x03f0,0x07e9,0x07ef,0x0ff8,0x0ffe,0x0ffc,0x0fff}
+};
+
+const UWord16 huff_ctab11[17][17]=
+{
+  {0x0000,0x0006,0x0019,0x003d,0x009c,0x00c6,0x01a7,0x0390,0x03c2,0x03df,0x07e6,0x07f3,0x0ffb,0x07ec,0x0ffa,0x0ffe,0x038e},
+  {0x0005,0x0001,0x0008,0x0014,0x0037,0x0042,0x0092,0x00af,0x0191,0x01a5,0x01b5,0x039e,0x03c0,0x03a2,0x03cd,0x07d6,0x00ae},
+  {0x0017,0x0007,0x0009,0x0018,0x0039,0x0040,0x008e,0x00a3,0x00b8,0x0199,0x01ac,0x01c1,0x03b1,0x0396,0x03be,0x03ca,0x009d},
+  {0x003c,0x0015,0x0016,0x001a,0x003b,0x0044,0x0091,0x00a5,0x00be,0x0196,0x01ae,0x01b9,0x03a1,0x0391,0x03a5,0x03d5,0x0094},
+  {0x009a,0x0036,0x0038,0x003a,0x0041,0x008c,0x009b,0x00b0,0x00c3,0x019e,0x01ab,0x01bc,0x039f,0x038f,0x03a9,0x03cf,0x0093},
+  {0x00bf,0x003e,0x003f,0x0043,0x0045,0x009e,0x00a7,0x00b9,0x0194,0x01a2,0x01ba,0x01c3,0x03a6,0x03a7,0x03bb,0x03d4,0x009f},
+  {0x01a0,0x008f,0x008d,0x0090,0x0098,0x00a6,0x00b6,0x00c4,0x019f,0x01af,0x01bf,0x0399,0x03bf,0x03b4,0x03c9,0x03e7,0x00a8},
+  {0x01b6,0x00ab,0x00a4,0x00aa,0x00b2,0x00c2,0x00c5,0x0198,0x01a4,0x01b8,0x038c,0x03a4,0x03c4,0x03c6,0x03dd,0x03e8,0x00ad},
+  {0x03af,0x0192,0x00bd,0x00bc,0x018e,0x0197,0x019a,0x01a3,0x01b1,0x038d,0x0398,0x03b7,0x03d3,0x03d1,0x03db,0x07dd,0x00b4},
+  {0x03de,0x01a9,0x019b,0x019c,0x01a1,0x01aa,0x01ad,0x01b3,0x038b,0x03b2,0x03b8,0x03ce,0x03e1,0x03e0,0x07d2,0x07e5,0x00b7},
+  {0x07e3,0x01bb,0x01a8,0x01a6,0x01b0,0x01b2,0x01b7,0x039b,0x039a,0x03ba,0x03b5,0x03d6,0x07d7,0x03e4,0x07d8,0x07ea,0x00ba},
+  {0x07e8,0x03a0,0x01bd,0x01b4,0x038a,0x01c4,0x0392,0x03aa,0x03b0,0x03bc,0x03d7,0x07d4,0x07dc,0x07db,0x07d5,0x07f0,0x00c1},
+  {0x07fb,0x03c8,0x03a3,0x0395,0x039d,0x03ac,0x03ae,0x03c5,0x03d8,0x03e2,0x03e6,0x07e4,0x07e7,0x07e0,0x07e9,0x07f7,0x0190},
+  {0x07f2,0x0393,0x01be,0x01c0,0x0394,0x0397,0x03ad,0x03c3,0x03c1,0x03d2,0x07da,0x07d9,0x07df,0x07eb,0x07f4,0x07fa,0x0195},
+  {0x07f8,0x03bd,0x039c,0x03ab,0x03a8,0x03b3,0x03b9,0x03d0,0x03e3,0x03e5,0x07e2,0x07de,0x07ed,0x07f1,0x07f9,0x07fc,0x0193},
+  {0x0ffd,0x03dc,0x03b6,0x03c7,0x03cc,0x03cb,0x03d9,0x03da,0x07d3,0x07e1,0x07ee,0x07ef,0x07f5,0x07f6,0x0ffc,0x0fff,0x019d},
+  {0x01c2,0x00b5,0x00a1,0x0096,0x0097,0x0095,0x0099,0x00a0,0x00a2,0x00ac,0x00a9,0x00b1,0x00b3,0x00bb,0x00c0,0x018f,0x0004}
+};
+
+const UWord32 huff_ctabscf[121]=
+{
+  0x0003ffe8,
+  0x0003ffe6,
+  0x0003ffe7,
+  0x0003ffe5,
+  0x0007fff5,
+  0x0007fff1,
+  0x0007ffed,
+  0x0007fff6,
+  0x0007ffee,
+  0x0007ffef,
+  0x0007fff0,
+  0x0007fffc,
+  0x0007fffd,
+  0x0007ffff,
+  0x0007fffe,
+  0x0007fff7,
+  0x0007fff8,
+  0x0007fffb,
+  0x0007fff9,
+  0x0003ffe4,
+  0x0007fffa,
+  0x0003ffe3,
+  0x0001ffef,
+  0x0001fff0,
+  0x0000fff5,
+  0x0001ffee,
+  0x0000fff2,
+  0x0000fff3,
+  0x0000fff4,
+  0x0000fff1,
+  0x00007ff6,
+  0x00007ff7,
+  0x00003ff9,
+  0x00003ff5,
+  0x00003ff7,
+  0x00003ff3,
+  0x00003ff6,
+  0x00003ff2,
+  0x00001ff7,
+  0x00001ff5,
+  0x00000ff9,
+  0x00000ff7,
+  0x00000ff6,
+  0x000007f9,
+  0x00000ff4,
+  0x000007f8,
+  0x000003f9,
+  0x000003f7,
+  0x000003f5,
+  0x000001f8,
+  0x000001f7,
+  0x000000fa,
+  0x000000f8,
+  0x000000f6,
+  0x00000079,
+  0x0000003a,
+  0x00000038,
+  0x0000001a,
+  0x0000000b,
+  0x00000004,
+  0x00000000,
+  0x0000000a,
+  0x0000000c,
+  0x0000001b,
+  0x00000039,
+  0x0000003b,
+  0x00000078,
+  0x0000007a,
+  0x000000f7,
+  0x000000f9,
+  0x000001f6,
+  0x000001f9,
+  0x000003f4,
+  0x000003f6,
+  0x000003f8,
+  0x000007f5,
+  0x000007f4,
+  0x000007f6,
+  0x000007f7,
+  0x00000ff5,
+  0x00000ff8,
+  0x00001ff4,
+  0x00001ff6,
+  0x00001ff8,
+  0x00003ff8,
+  0x00003ff4,
+  0x0000fff0,
+  0x00007ff4,
+  0x0000fff6,
+  0x00007ff5,
+  0x0003ffe2,
+  0x0007ffd9,
+  0x0007ffda,
+  0x0007ffdb,
+  0x0007ffdc,
+  0x0007ffdd,
+  0x0007ffde,
+  0x0007ffd8,
+  0x0007ffd2,
+  0x0007ffd3,
+  0x0007ffd4,
+  0x0007ffd5,
+  0x0007ffd6,
+  0x0007fff2,
+  0x0007ffdf,
+  0x0007ffe7,
+  0x0007ffe8,
+  0x0007ffe9,
+  0x0007ffea,
+  0x0007ffeb,
+  0x0007ffe6,
+  0x0007ffe0,
+  0x0007ffe1,
+  0x0007ffe2,
+  0x0007ffe3,
+  0x0007ffe4,
+  0x0007ffe5,
+  0x0007ffd7,
+  0x0007ffec,
+  0x0007fff4,
+  0x0007fff3
+};
+
+const Word32 m_log2_table[INT_BITS] = {
+  0x00000000,0x4ae00d00,0x2934f080,0x15c01a3f, 
+  0x0b31fb80,0x05aeb4e0,0x02dcf2d0,0x016fe50c, 
+  0x00b84e23,0x005c3e10,0x002e24ca,0x001713d6,
+  0x000b8a47,0x0005c53b,0x0002e2a3,0x00017153,
+  0x0000b8aa,0x00005c55,0x00002e2b,0x00001715,
+  0x00000b8b,0x000005c5,0x000002e3,0x00000171, 
+  0x000000b9,0x0000005c,0x0000002e,0x00000017,
+  0x0000000c,0x00000006,0x00000003,0x00000001
+};
+
+
+/*
+  3 bit resolution
+*/
+const Word32 tnsCoeff3[8] =
+{
+  0x81f1d1d4,
+  0x9126147c,
+  0xadb922f7,
+  0xd438af09,
+  0x00000000,
+  0x37898087,
+  0x64130dfa,
+  0x7cca6ffb,
+};
+
+const Word32 tnsCoeff3Borders[8] =
+{
+  0x80000000,  /* -4 */
+  0x87b826de,  /* -3 */
+  0x9df24153,  /* -2 */
+  0xbfffffe5,  /* -1 */
+  0xe9c5e578,  /*  0 */
+  0x1c7b90f0,  /*  1 */
+  0x4fce83aa,  /*  2 */
+  0x7352f2c4,  /*  3 */
+};
+
+
+/*
+  4 bit resolution
+*/
+
+const Word32 tnsCoeff4[16] =
+{
+  0x808bc84b,
+  0x84e2e57d,
+  0x8d6b49fb,
+  0x99da9207,
+  0xa9c45707,
+  0xbc9dde78,
+  0xd1c2d4fc,
+  0xe87ae539,
+  0x00000000,
+  0x1a9cd9c0,
+  0x340ff23b,
+  0x4b3c8bf7,
+  0x5f1f5e80,
+  0x6ed9eb84,
+  0x79bc3880,
+  0x7f4c7e89
+};
+
+const Word32 tnsCoeff4Borders[16]=
+{
+  0x80000000,  /* -8 */
+  0x822defef,  /* -7 */
+  0x88a4bfe5,  /* -6 */
+  0x932c159c,  /* -5 */
+  0xa16827c1,  /* -4 */
+  0xb2dcde26,  /* -3 */
+  0xc6f20b91,  /* -2 */
+  0xdcf89c64,  /* -1 */
+  0xf4308ce1,  /*  0 */
+  0x0d613054,  /*  1 */
+  0x278dde80,  /*  2 */
+  0x4000001b,  /*  3 */
+  0x55a6127c,  /*  4 */
+  0x678dde8f,  /*  5 */
+  0x74ef0ed8,  /*  6 */
+  0x7d33f0db   /*  7 */
+};
+
+
+const unsigned char bitrevTab[17 + 129] = 

+{

+/* 64 */

+0x01, 0x08, 0x02, 0x04, 0x03, 0x0c, 0x05, 0x0a, 0x07, 0x0e, 0x0b, 0x0d, 0x00, 0x06, 0x09, 0x0f,

+0x00,

+

+/* 512 */

+0x01, 0x40, 0x02, 0x20, 0x03, 0x60, 0x04, 0x10, 0x05, 0x50, 0x06, 0x30, 0x07, 0x70, 0x09, 0x48,

+0x0a, 0x28, 0x0b, 0x68, 0x0c, 0x18, 0x0d, 0x58, 0x0e, 0x38, 0x0f, 0x78, 0x11, 0x44, 0x12, 0x24,

+0x13, 0x64, 0x15, 0x54, 0x16, 0x34, 0x17, 0x74, 0x19, 0x4c, 0x1a, 0x2c, 0x1b, 0x6c, 0x1d, 0x5c,

+0x1e, 0x3c, 0x1f, 0x7c, 0x21, 0x42, 0x23, 0x62, 0x25, 0x52, 0x26, 0x32, 0x27, 0x72, 0x29, 0x4a,

+0x2b, 0x6a, 0x2d, 0x5a, 0x2e, 0x3a, 0x2f, 0x7a, 0x31, 0x46, 0x33, 0x66, 0x35, 0x56, 0x37, 0x76,

+0x39, 0x4e, 0x3b, 0x6e, 0x3d, 0x5e, 0x3f, 0x7e, 0x43, 0x61, 0x45, 0x51, 0x47, 0x71, 0x4b, 0x69,

+0x4d, 0x59, 0x4f, 0x79, 0x53, 0x65, 0x57, 0x75, 0x5b, 0x6d, 0x5f, 0x7d, 0x67, 0x73, 0x6f, 0x7b,

+0x00, 0x08, 0x14, 0x1c, 0x22, 0x2a, 0x36, 0x3e, 0x41, 0x49, 0x55, 0x5d, 0x63, 0x6b, 0x77, 0x7f,

+0x00,

+};
\ No newline at end of file
diff --git a/media/libstagefright/codecs/aacenc/src/aacenc.c b/media/libstagefright/codecs/aacenc/src/aacenc.c
new file mode 100644
index 0000000..552ae41
--- /dev/null
+++ b/media/libstagefright/codecs/aacenc/src/aacenc.c
@@ -0,0 +1,495 @@
+/*

+ ** Copyright 2003-2010, VisualOn, Inc.

+ **

+ ** Licensed under the Apache License, Version 2.0 (the "License");

+ ** you may not use this file except in compliance with the License.

+ ** You may obtain a copy of the License at

+ **

+ **     http://www.apache.org/licenses/LICENSE-2.0

+ **

+ ** Unless required by applicable law or agreed to in writing, software

+ ** distributed under the License is distributed on an "AS IS" BASIS,

+ ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

+ ** See the License for the specific language governing permissions and

+ ** limitations under the License.

+ */

+/*******************************************************************************

+	File:		aacenc.c

+

+	Content:	aac encoder interface functions

+

+*******************************************************************************/

+

+#include "voAAC.h"

+#include "typedef.h"

+#include "aacenc_core.h"

+#include "aac_rom.h"

+#include "cmnMemory.h"

+#include "memalign.h"

+

+/**

+* Init the audio codec module and return codec handle

+* \param phCodec [OUT] Return the video codec handle

+* \param vType	[IN] The codec type if the module support multi codec.

+* \param pUserData	[IN] The init param. It is memory operator or alloced memory

+* \retval VO_ERR_NONE Succeeded.

+*/

+VO_U32 VO_API voAACEncInit(VO_HANDLE * phCodec,VO_AUDIO_CODINGTYPE vType, VO_CODEC_INIT_USERDATA *pUserData)

+{

+	AAC_ENCODER*hAacEnc;

+	AACENC_CONFIG config;

+	int error;

+

+#ifdef USE_DEAULT_MEM

+	VO_MEM_OPERATOR voMemoprator;

+#endif

+	VO_MEM_OPERATOR *pMemOP;

+	int interMem;

+

+	interMem = 0;

+	error = 0;

+	

+	/* init the memory operator */

+	if(pUserData == NULL || pUserData->memflag != VO_IMF_USERMEMOPERATOR || pUserData->memData == NULL )

+	{

+#ifdef USE_DEAULT_MEM

+		voMemoprator.Alloc = cmnMemAlloc;

+		voMemoprator.Copy = cmnMemCopy;

+		voMemoprator.Free = cmnMemFree;

+		voMemoprator.Set = cmnMemSet;

+		voMemoprator.Check = cmnMemCheck;

+

+		interMem = 1;

+

+		pMemOP = &voMemoprator;

+#else

+		*phCodec = NULL;

+		return VO_ERR_INVALID_ARG;

+#endif

+	}

+	else

+	{

+		pMemOP = (VO_MEM_OPERATOR *)pUserData->memData;

+	}

+

+	/* init the aac encoder handle */

+	hAacEnc = (AAC_ENCODER*)mem_malloc(pMemOP, sizeof(AAC_ENCODER), 32, VO_INDEX_ENC_AAC);

+	if(NULL == hAacEnc)

+	{

+		error = 1;

+	}

+

+	if(!error)

+	{

+		/* init the aac encoder intra memory */

+		hAacEnc->intbuf = (short *)mem_malloc(pMemOP, AACENC_BLOCKSIZE*MAX_CHANNELS*sizeof(short), 32, VO_INDEX_ENC_AAC);

+		if(NULL == hAacEnc->intbuf)

+		{

+			error = 1;

+		}

+	}

+

+	if (!error) {
+		/* init the aac encoder psychoacoustic */
+		error = (PsyNew(&hAacEnc->psyKernel, MAX_CHANNELS, pMemOP) ||
+			PsyOutNew(&hAacEnc->psyOut, pMemOP));
+	}

+

+	if (!error) {
+		/* init the aac encoder quantization elements */
+		error = QCOutNew(&hAacEnc->qcOut,MAX_CHANNELS, pMemOP);
+	}

+

+	if (!error) {
+		/* init the aac encoder quantization state */
+		error = QCNew(&hAacEnc->qcKernel, pMemOP);
+	}
+
+	/* uninit the aac encoder if error is nozero */
+	if(error)
+	{
+		AacEncClose(hAacEnc, pMemOP);
+		if(hAacEnc)
+		{
+			mem_free(pMemOP, hAacEnc, VO_INDEX_ENC_AAC);
+			hAacEnc = NULL;
+		}		
+		*phCodec = NULL;
+		return VO_ERR_OUTOF_MEMORY;
+	}

+

+	/* init the aac encoder memory operator  */

+#ifdef USE_DEAULT_MEM

+	if(interMem)

+	{

+		hAacEnc->voMemoprator.Alloc = cmnMemAlloc;

+		hAacEnc->voMemoprator.Copy = cmnMemCopy;

+		hAacEnc->voMemoprator.Free = cmnMemFree;

+		hAacEnc->voMemoprator.Set = cmnMemSet;

+		hAacEnc->voMemoprator.Check = cmnMemCheck;

+

+		pMemOP = &hAacEnc->voMemoprator;

+	}

+#endif

+	/* init the aac encoder default parameter  */

+	if(hAacEnc->initOK == 0)

+	{

+		 AACENC_CONFIG config;

+		 config.adtsUsed = 1;

+		 config.bitRate = 128000;

+		 config.nChannelsIn = 2;

+		 config.nChannelsOut = 2;

+		 config.sampleRate = 44100;

+		 config.bandWidth = 20000;

+

+		 AacEncOpen(hAacEnc, config);

+	}

+

+	hAacEnc->voMemop = pMemOP;

+

+	*phCodec = hAacEnc;

+

+	return VO_ERR_NONE;

+}

+

+/**

+* Set input audio data.

+* \param hCodec [IN]] The Codec Handle which was created by Init function.

+* \param pInput [IN] The input buffer param.

+* \param pOutBuffer [OUT] The output buffer info.

+* \retval VO_ERR_NONE Succeeded.

+*/

+VO_U32 VO_API voAACEncSetInputData(VO_HANDLE hCodec, VO_CODECBUFFER * pInput)

+{

+	AAC_ENCODER *hAacEnc;

+	int  length;

+

+	if(NULL == hCodec || NULL == pInput || NULL == pInput->Buffer)

+	{

+		return VO_ERR_INVALID_ARG;

+	}

+	

+	hAacEnc = (AAC_ENCODER *)hCodec;

+	

+	/* init input pcm buffer and length*/

+	hAacEnc->inbuf = (short *)pInput->Buffer;

+	hAacEnc->inlen = pInput->Length / sizeof(short);

+	hAacEnc->uselength = 0;

+

+	hAacEnc->encbuf = hAacEnc->inbuf;

+	hAacEnc->enclen = hAacEnc->inlen;

+	

+	/* rebuild intra pcm buffer and length*/

+	if(hAacEnc->intlen)

+	{

+		length = min(hAacEnc->config.nChannelsIn*AACENC_BLOCKSIZE - hAacEnc->intlen, hAacEnc->inlen);

+		hAacEnc->voMemop->Copy(VO_INDEX_ENC_AAC, hAacEnc->intbuf + hAacEnc->intlen, 

+			hAacEnc->inbuf, length*sizeof(short));

+

+		hAacEnc->encbuf = hAacEnc->intbuf;

+		hAacEnc->enclen = hAacEnc->intlen + length;

+

+		hAacEnc->inbuf += length;

+		hAacEnc->inlen -= length;

+	}

+	

+	return VO_ERR_NONE;

+}

+

+/**

+* Get the outut audio data

+* \param hCodec [IN]] The Codec Handle which was created by Init function.

+* \param pOutBuffer [OUT] The output audio data

+* \param pOutInfo [OUT] The dec module filled audio format and used the input size.

+*						 pOutInfo->InputUsed is total used the input size.

+* \retval  VO_ERR_NONE Succeeded.

+*			VO_ERR_INPUT_BUFFER_SMALL. The input was finished or the input data was not enought.

+*/

+VO_U32 VO_API voAACEncGetOutputData(VO_HANDLE hCodec, VO_CODECBUFFER * pOutput, VO_AUDIO_OUTPUTINFO * pOutInfo)

+{

+	AAC_ENCODER* hAacEnc = (AAC_ENCODER*)hCodec;

+	Word16 numAncDataBytes=0;

+	Word32  inbuflen;

+	int ret, length;

+	if(NULL == hAacEnc)

+		return VO_ERR_INVALID_ARG;

+

+	 inbuflen = AACENC_BLOCKSIZE*hAacEnc->config.nChannelsIn;

+

+	 /* check the input pcm buffer and length*/

+	 if(NULL == hAacEnc->encbuf || hAacEnc->enclen < inbuflen)

+	 {

+		length = hAacEnc->enclen;		

+		if(hAacEnc->intlen == 0)

+		{	

+			hAacEnc->voMemop->Copy(VO_INDEX_ENC_AAC, hAacEnc->intbuf, 

+				hAacEnc->encbuf, length*sizeof(short));		

+			hAacEnc->uselength += length*sizeof(short);

+		}

+		else

+		{

+			hAacEnc->uselength += (length - hAacEnc->intlen)*sizeof(short);

+		}

+

+		hAacEnc->intlen = length;

+

+		pOutput->Length = 0;

+		if(pOutInfo)

+			pOutInfo->InputUsed = hAacEnc->uselength;

+		return VO_ERR_INPUT_BUFFER_SMALL;	

+	 }

+

+	 /* check the output aac buffer and length*/

+	 if(NULL == pOutput || NULL == pOutput->Buffer || pOutput->Length < (6144/8)*hAacEnc->config.nChannelsOut/(sizeof(Word32)))

+		 return VO_ERR_OUTPUT_BUFFER_SMALL;

+

+	 /* aac encoder core function */

+	 AacEncEncode( hAacEnc,

+			(Word16*)hAacEnc->encbuf,

+			NULL,

+			&numAncDataBytes,

+			pOutput->Buffer,

+			&pOutput->Length);

+

+	 /* update the input pcm buffer and length*/

+	 if(hAacEnc->intlen)

+	 {

+		length = inbuflen - hAacEnc->intlen;		

+		hAacEnc->encbuf = hAacEnc->inbuf;

+		hAacEnc->enclen = hAacEnc->inlen;

+		hAacEnc->uselength += length*sizeof(short);

+		hAacEnc->intlen = 0;

+	 }

+	 else

+	 {

+		 hAacEnc->encbuf = hAacEnc->encbuf + inbuflen;

+		 hAacEnc->enclen = hAacEnc->enclen - inbuflen;

+		 hAacEnc->uselength += inbuflen*sizeof(short);

+	 }	 

+

+	 /* update the output aac information */

+	if(pOutInfo)

+	{

+		pOutInfo->Format.Channels = hAacEnc->config.nChannelsOut;

+		pOutInfo->Format.SampleRate = hAacEnc->config.sampleRate;

+		pOutInfo->Format.SampleBits = 16;

+		pOutInfo->InputUsed = hAacEnc->uselength;

+	}

+

+	 return VO_ERR_NONE;

+}

+

+/**

+* Uninit the Codec.

+* \param hCodec [IN]] The Codec Handle which was created by Init function.

+* \retval VO_ERR_NONE Succeeded.

+*/

+VO_U32 VO_API voAACEncUninit(VO_HANDLE hCodec)

+{

+	AAC_ENCODER* hAacEnc = (AAC_ENCODER*)hCodec;

+	

+	if(NULL != hAacEnc)

+	{

+		/* close the aac encoder */

+		AacEncClose(hAacEnc, hAacEnc->voMemop);

+

+		/* free the aac encoder handle*/

+		mem_free(hAacEnc->voMemop, hAacEnc, VO_INDEX_ENC_AAC);

+		hAacEnc = NULL;

+	}	

+

+	return VO_ERR_NONE;

+}

+

+/**

+* Set the param for special target.

+* \param hCodec [IN]] The Codec Handle which was created by Init function.

+* \param uParamID [IN] The param ID.

+* \param pData [IN] The param value depend on the ID>

+* \retval VO_ERR_NONE Succeeded.

+*/

+VO_U32 VO_API voAACEncSetParam(VO_HANDLE hCodec, VO_S32 uParamID, VO_PTR pData)

+{

+	AACENC_CONFIG config;

+	AACENC_PARAM* pAAC_param;

+	VO_AUDIO_FORMAT *pWAV_Format;

+	AAC_ENCODER* hAacEnc = (AAC_ENCODER*)hCodec;

+	int ret, i, bitrate, tmp;

+	int SampleRateIdx;

+

+	if(NULL == hAacEnc)

+		return VO_ERR_INVALID_ARG;

+	

+	switch(uParamID)

+	{

+	case VO_PID_AAC_ENCPARAM:  /* init aac encoder parameter*/

+		AacInitDefaultConfig(&config);

+		if(pData == NULL)

+			return VO_ERR_INVALID_ARG;

+		pAAC_param = (AACENC_PARAM*)pData;

+		config.adtsUsed = pAAC_param->adtsUsed;

+		config.bitRate = pAAC_param->bitRate;

+		config.nChannelsIn = pAAC_param->nChannels;

+		config.nChannelsOut = pAAC_param->nChannels;

+		config.sampleRate = pAAC_param->sampleRate;

+

+		/* check the channel */

+		if(config.nChannelsIn< 1  || config.nChannelsIn > MAX_CHANNELS  ||

+             config.nChannelsOut < 1 || config.nChannelsOut > MAX_CHANNELS || config.nChannelsIn < config.nChannelsOut)

+			 return VO_ERR_AUDIO_UNSCHANNEL;

+

+		/* check the samplerate */

+		ret = -1;

+		for(i = 0; i < NUM_SAMPLE_RATES; i++)

+		{

+			if(config.sampleRate == sampRateTab[i])

+			{

+				ret = 0;

+				break;

+			}

+		}

+		if(ret < 0)

+			return VO_ERR_AUDIO_UNSSAMPLERATE;

+

+		SampleRateIdx = i;

+

+		tmp = 441;

+		if(config.sampleRate%8000 == 0) 

+			tmp =480;

+		/* check the bitrate */

+		if(config.bitRate!=0 && (config.bitRate/config.nChannelsOut < 4000) ||

+           (config.bitRate/config.nChannelsOut > 160000) || 

+		   (config.bitRate > config.sampleRate*6*config.nChannelsOut))

+		{

+			config.bitRate = 640*config.sampleRate/tmp*config.nChannelsOut;

+

+			if(config.bitRate/config.nChannelsOut < 4000)

+				config.bitRate = 4000 * config.nChannelsOut;

+			else if(config.bitRate > config.sampleRate*6*config.nChannelsOut)

+				config.bitRate = config.sampleRate*6*config.nChannelsOut;

+			else if(config.bitRate/config.nChannelsOut > 160000)

+				config.bitRate = config.nChannelsOut*160000;

+		}

+

+		/* check the bandwidth */

+		bitrate = config.bitRate / config.nChannelsOut;

+		bitrate = bitrate * tmp / config.sampleRate;

+

+		for (i = 0; rates[i]; i++)

+		{

+			if (rates[i] >= bitrate)

+				break;

+		}

+

+		config.bandWidth = BandwithCoefTab[i][SampleRateIdx];

+

+		/* init aac encoder core */

+		ret = AacEncOpen(hAacEnc, config);

+		if(ret) 

+			return VO_ERR_AUDIO_UNSFEATURE;

+		break;

+	case VO_PID_AUDIO_FORMAT:	/* init pcm channel and samplerate*/

+		AacInitDefaultConfig(&config);

+		if(pData == NULL)

+			return VO_ERR_INVALID_ARG;

+		pWAV_Format = (VO_AUDIO_FORMAT*)pData;

+		config.adtsUsed = 1;

+		config.nChannelsIn = pWAV_Format->Channels;

+		config.nChannelsOut = pWAV_Format->Channels;

+		config.sampleRate = pWAV_Format->SampleRate;

+

+		/* check the channel */

+		if(config.nChannelsIn< 1  || config.nChannelsIn > MAX_CHANNELS  ||

+             config.nChannelsOut < 1 || config.nChannelsOut > MAX_CHANNELS || config.nChannelsIn < config.nChannelsOut)

+			 return VO_ERR_AUDIO_UNSCHANNEL;

+

+		/* check the samplebits */

+		if(pWAV_Format->SampleBits != 16)

+		{

+			return VO_ERR_AUDIO_UNSFEATURE;

+		}

+

+		/* check the samplerate */

+		ret = -1;

+		for(i = 0; i < NUM_SAMPLE_RATES; i++)

+		{

+			if(config.sampleRate == sampRateTab[i])

+			{

+				ret = 0;

+				break;

+			}

+		}

+		if(ret < 0)

+			return VO_ERR_AUDIO_UNSSAMPLERATE;

+

+		SampleRateIdx = i;

+

+		/* update the bitrates */

+		tmp = 441;

+		if(config.sampleRate%8000 == 0) 

+			tmp =480;

+

+		config.bitRate = 640*config.sampleRate/tmp*config.nChannelsOut;

+

+		if(config.bitRate/config.nChannelsOut < 4000)

+			config.bitRate = 4000 * config.nChannelsOut;

+		else if(config.bitRate > config.sampleRate*6*config.nChannelsOut)

+			config.bitRate = config.sampleRate*6*config.nChannelsOut;

+		else if(config.bitRate/config.nChannelsOut > 160000)

+			config.bitRate = config.nChannelsOut*160000;

+

+		/* check the bandwidth */

+		bitrate = config.bitRate / config.nChannelsOut;

+		bitrate = bitrate * tmp / config.sampleRate;

+

+		for (i = 0; rates[i]; i++)

+		{

+			if (rates[i] >= bitrate)

+				break;

+		}

+

+		config.bandWidth = BandwithCoefTab[i][SampleRateIdx];

+		

+		/* init aac encoder core */

+		ret = AacEncOpen(hAacEnc, config);

+		if(ret) 

+			return VO_ERR_AUDIO_UNSFEATURE;

+		break;

+	default:

+		return VO_ERR_WRONG_PARAM_ID;

+	}

+

+	return VO_ERR_NONE;

+}

+

+/**

+* Get the param for special target.

+* \param hCodec [IN]] The Codec Handle which was created by Init function.

+* \param uParamID [IN] The param ID.

+* \param pData [IN] The param value depend on the ID>

+* \retval VO_ERR_NONE Succeeded.

+*/

+VO_U32 VO_API voAACEncGetParam(VO_HANDLE hCodec, VO_S32 uParamID, VO_PTR pData)

+{

+	return VO_ERR_NONE;

+}

+

+/**

+ * Get audio codec API interface

+ * \param pEncHandle [out] Return the AAC Encoder handle.

+ * \retval VO_ERR_OK Succeeded.

+ */

+VO_S32 VO_API voGetAACEncAPI(VO_AUDIO_CODECAPI * pDecHandle)

+{

+	if(pDecHandle == NULL)

+		return VO_ERR_INVALID_ARG;

+		

+	pDecHandle->Init = voAACEncInit;

+	pDecHandle->SetInputData = voAACEncSetInputData;

+	pDecHandle->GetOutputData = voAACEncGetOutputData;

+	pDecHandle->SetParam = voAACEncSetParam;

+	pDecHandle->GetParam = voAACEncGetParam;

+	pDecHandle->Uninit = voAACEncUninit;

+

+	return VO_ERR_NONE;

+}
\ No newline at end of file
diff --git a/media/libstagefright/codecs/aacenc/src/aacenc_core.c b/media/libstagefright/codecs/aacenc/src/aacenc_core.c
new file mode 100644
index 0000000..616475c
--- /dev/null
+++ b/media/libstagefright/codecs/aacenc/src/aacenc_core.c
@@ -0,0 +1,239 @@
+/*

+ ** Copyright 2003-2010, VisualOn, Inc.

+ **

+ ** Licensed under the Apache License, Version 2.0 (the "License");

+ ** you may not use this file except in compliance with the License.

+ ** You may obtain a copy of the License at

+ **

+ **     http://www.apache.org/licenses/LICENSE-2.0

+ **

+ ** Unless required by applicable law or agreed to in writing, software

+ ** distributed under the License is distributed on an "AS IS" BASIS,

+ ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

+ ** See the License for the specific language governing permissions and

+ ** limitations under the License.

+ */

+/*******************************************************************************

+	File:		aacenc_core.c

+

+	Content:	aac encoder core functions

+

+*******************************************************************************/
+
+#include "typedef.h"
+#include "aacenc_core.h"
+#include "bitenc.h"
+
+#include "psy_configuration.h"
+#include "psy_main.h"
+#include "qc_main.h"
+#include "psy_main.h"
+#include "channel_map.h"
+#include "aac_rom.h"
+
+/********************************************************************************
+*
+* function name: AacInitDefaultConfig
+* description:  gives reasonable default configuration
+*
+**********************************************************************************/
+void AacInitDefaultConfig(AACENC_CONFIG *config)
+{
+  /* default configurations */
+  config->adtsUsed        = 1;
+  config->nChannelsIn     = 2;
+  config->nChannelsOut    = 2;
+  config->bitRate         = 128000;                      
+  config->bandWidth       = 0;                           
+}
+
+/********************************************************************************
+*
+* function name: AacEncOpen
+* description:  allocate and initialize a new encoder instance
+* returns:      0 if success
+*
+**********************************************************************************/
+Word16  AacEncOpen(  AAC_ENCODER*      hAacEnc,        /* pointer to an encoder handle, initialized on return */
+                     const  AACENC_CONFIG     config   /* pre-initialized config struct */
+                     )
+{
+  Word32 i;

+  Word32 error = 0;
+  Word16 profile = 1;

+
+  ELEMENT_INFO *elInfo = NULL;
+   
+  if (hAacEnc==0) {
+    error=1;                                  
+  }
+   
+  if (!error) {
+    hAacEnc->config = config;
+  }
+
+  if (!error) {
+    error = InitElementInfo (config.nChannelsOut,
+                             &hAacEnc->elInfo);
+  }
+

+  if (!error) {
+    elInfo = &hAacEnc->elInfo;
+  }
+
+  if (!error) {
+    /* use or not tns tool for long and short block */
+	 Word16 tnsMask=3;      
+
+	/* init encoder psychoacoustic */
+    error = psyMainInit(&hAacEnc->psyKernel,
+                        config.sampleRate,
+                        config.bitRate,
+                        elInfo->nChannelsInEl,
+                        tnsMask,
+                        hAacEnc->config.bandWidth);
+  }
+
+ /* use or not adts header */
+  if(!error) {

+	  hAacEnc->qcOut.qcElement.adtsUsed = config.adtsUsed;

+  }
+
+  /* init encoder quantization */
+  if (!error) {
+    struct QC_INIT qcInit;
+
+    /*qcInit.channelMapping = &hAacEnc->channelMapping;*/
+    qcInit.elInfo = &hAacEnc->elInfo;
+
+    qcInit.maxBits = (Word16) (MAXBITS_COEF*elInfo->nChannelsInEl);
+    qcInit.bitRes = qcInit.maxBits;                                      
+    qcInit.averageBits = (Word16) ((config.bitRate * FRAME_LEN_LONG) / config.sampleRate);
+
+    qcInit.padding.paddingRest = config.sampleRate;                          
+
+    qcInit.meanPe = (Word16) ((10 * FRAME_LEN_LONG * hAacEnc->config.bandWidth) /
+                                              (config.sampleRate>>1));
+
+    qcInit.maxBitFac = (Word16) ((100 * (MAXBITS_COEF-MINBITS_COEF)* elInfo->nChannelsInEl)/
+                                                 (qcInit.averageBits?qcInit.averageBits:1));
+
+    qcInit.bitrate = config.bitRate;                                     
+
+    error = QCInit(&hAacEnc->qcKernel, &qcInit);
+  }
+
+  /* init bitstream encoder */
+  if (!error) {
+    hAacEnc->bseInit.nChannels   = elInfo->nChannelsInEl;                
+    hAacEnc->bseInit.bitrate     = config.bitRate;                       
+    hAacEnc->bseInit.sampleRate  = config.sampleRate;                    
+    hAacEnc->bseInit.profile     = profile;                              
+  }
+
+  return error;
+}
+
+/********************************************************************************
+*
+* function name: AacEncEncode
+* description:  encode pcm to aac data core function
+* returns:      0 if success
+*
+**********************************************************************************/
+Word16 AacEncEncode(AAC_ENCODER *aacEnc,		/*!< an encoder handle */
+                    Word16 *timeSignal,         /*!< BLOCKSIZE*nChannels audio samples, interleaved */
+                    const UWord8 *ancBytes,     /*!< pointer to ancillary data bytes */
+                    Word16 *numAncBytes,		/*!< number of ancillary Data Bytes */
+                    UWord8 *outBytes,           /*!< pointer to output buffer (must be large MINBITS_COEF/8*MAX_CHANNELS bytes) */
+                    Word32 *numOutBytes         /*!< number of bytes in output buffer after processing */
+                    )
+{
+  ELEMENT_INFO *elInfo = &aacEnc->elInfo;
+  Word16 globUsedBits;
+  Word16 ancDataBytes, ancDataBytesLeft;
+  
+  ancDataBytes = ancDataBytesLeft = *numAncBytes;                          
+
+  /* init output aac data buffer and length */
+  aacEnc->hBitStream = CreateBitBuffer(&aacEnc->bitStream, outBytes, *numOutBytes);
+
+  /* psychoacoustic process */
+  psyMain(aacEnc->config.nChannelsOut,    
+          elInfo,
+          timeSignal,
+          &aacEnc->psyKernel.psyData[elInfo->ChannelIndex[0]],
+          &aacEnc->psyKernel.tnsData[elInfo->ChannelIndex[0]],
+          &aacEnc->psyKernel.psyConfLong,
+          &aacEnc->psyKernel.psyConfShort,
+          &aacEnc->psyOut.psyOutChannel[elInfo->ChannelIndex[0]],
+          &aacEnc->psyOut.psyOutElement,
+          aacEnc->psyKernel.pScratchTns,
+		  aacEnc->config.sampleRate);
+
+  /* adjust bitrate and frame length */
+  AdjustBitrate(&aacEnc->qcKernel,
+                aacEnc->config.bitRate,
+                aacEnc->config.sampleRate);
+    
+  /* quantization and coding process */
+  QCMain(&aacEnc->qcKernel,         
+         &aacEnc->qcKernel.elementBits,
+         &aacEnc->qcKernel.adjThr.adjThrStateElem,
+         &aacEnc->psyOut.psyOutChannel[elInfo->ChannelIndex[0]],
+         &aacEnc->psyOut.psyOutElement,
+         &aacEnc->qcOut.qcChannel[elInfo->ChannelIndex[0]],
+         &aacEnc->qcOut.qcElement,
+         elInfo->nChannelsInEl,
+		 min(ancDataBytesLeft,ancDataBytes));
+
+  ancDataBytesLeft = ancDataBytesLeft - ancDataBytes;
+
+  globUsedBits = FinalizeBitConsumption(&aacEnc->qcKernel,
+                         &aacEnc->qcOut);
+
+  /* write bitstream process */
+  WriteBitstream(aacEnc->hBitStream,				 
+                 *elInfo,
+                 &aacEnc->qcOut,
+                 &aacEnc->psyOut,
+                 &globUsedBits,				 
+                 ancBytes,

+				 aacEnc->psyKernel.sampleRateIdx);
+
+  updateBitres(&aacEnc->qcKernel,
+               &aacEnc->qcOut);
+
+  /* write out the bitstream */
+  *numOutBytes = GetBitsAvail(aacEnc->hBitStream) >> 3;

+
+  return 0;
+}
+
+
+/********************************************************************************
+*
+* function name:AacEncClose
+* description: deallocate an encoder instance
+*
+**********************************************************************************/
+void AacEncClose (AAC_ENCODER* hAacEnc, VO_MEM_OPERATOR *pMemOP)
+{
+  if (hAacEnc) {  
+    QCDelete(&hAacEnc->qcKernel, pMemOP);
+
+    QCOutDelete(&hAacEnc->qcOut, pMemOP);
+
+    PsyDelete(&hAacEnc->psyKernel, pMemOP);
+
+    PsyOutDelete(&hAacEnc->psyOut, pMemOP);
+
+    DeleteBitBuffer(&hAacEnc->hBitStream);
+
+	if(hAacEnc->intbuf)
+	{
+		mem_free(pMemOP, hAacEnc->intbuf, VO_INDEX_ENC_AAC);
+		hAacEnc->intbuf = NULL;
+	}
+  }
+}
diff --git a/media/libstagefright/codecs/aacenc/src/adj_thr.c b/media/libstagefright/codecs/aacenc/src/adj_thr.c
new file mode 100644
index 0000000..0dbd216
--- /dev/null
+++ b/media/libstagefright/codecs/aacenc/src/adj_thr.c
@@ -0,0 +1,1223 @@
+/*

+ ** Copyright 2003-2010, VisualOn, Inc.

+ **

+ ** Licensed under the Apache License, Version 2.0 (the "License");

+ ** you may not use this file except in compliance with the License.

+ ** You may obtain a copy of the License at

+ **

+ **     http://www.apache.org/licenses/LICENSE-2.0

+ **

+ ** Unless required by applicable law or agreed to in writing, software

+ ** distributed under the License is distributed on an "AS IS" BASIS,

+ ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

+ ** See the License for the specific language governing permissions and

+ ** limitations under the License.

+ */

+/*******************************************************************************

+	File:		adj_thr.c

+

+	Content:	Threshold compensation functions

+

+*******************************************************************************/
+
+#include "basic_op.h"

+#include "oper_32b.h"
+#include "adj_thr_data.h"
+#include "adj_thr.h"
+#include "qc_data.h"
+#include "line_pe.h"
+
+
+#define  minSnrLimit    0x6666 /* 1 dB */
+#define  PEBITS_COEF	0x170a /* 0.18*(1 << 15)*/

+

+#define  HOLE_THR_LONG	0x2873	/* 0.316*(1 << 15) */

+#define  HOLE_THR_SHORT 0x4000  /* 0.5  *(1 << 15) */

+

+#define  MS_THRSPREAD_COEF 0x7333  /* 0.9 * (1 << 15) */

+

+#define	 MIN_SNR_COEF	   0x651f  /* 3.16* (1 << (15 - 2)) */

+
+/* values for avoid hole flag */
+enum _avoid_hole_state {
+  NO_AH              =0,
+  AH_INACTIVE        =1,
+  AH_ACTIVE          =2
+};
+
+/********************************************************************************
+*
+* function name:bits2pe
+* description: convert from bits to pe
+*			   pe = 1.18*desiredBits
+*
+**********************************************************************************/
+Word16 bits2pe(const Word16 bits) {
+  return (bits + ((PEBITS_COEF * bits) >> 15));
+}
+
+/********************************************************************************
+*
+* function name:calcThreshExp
+* description: loudness calculation (threshold to the power of redExp)
+*			   thr(n)^0.25
+*
+**********************************************************************************/
+static void calcThreshExp(Word32 thrExp[MAX_CHANNELS][MAX_GROUPED_SFB],
+                          PSY_OUT_CHANNEL psyOutChannel[MAX_CHANNELS],
+                          const Word16 nChannels)
+{
+  Word16 ch, sfb, sfbGrp;

+  Word32 *pthrExp, *psfbThre;
+  for (ch=0; ch<nChannels; ch++) {
+    PSY_OUT_CHANNEL *psyOutChan = &psyOutChannel[ch];

+	 for(sfbGrp = 0; sfbGrp < psyOutChan->sfbCnt; sfbGrp+= psyOutChan->sfbPerGroup)	 

+	  pthrExp = &(thrExp[ch][sfbGrp]);

+	  psfbThre = psyOutChan->sfbThreshold + sfbGrp;

+	  for (sfb=0; sfb<psyOutChan->maxSfbPerGroup; sfb++) {
+		*pthrExp = rsqrt(rsqrt(*psfbThre,INT_BITS),INT_BITS);

+		pthrExp++; psfbThre++;
+      }
+  }
+}
+
+/********************************************************************************
+*
+* function name:adaptMinSnr
+* description: reduce minSnr requirements for bands with relative low energies
+*
+**********************************************************************************/
+static void adaptMinSnr(PSY_OUT_CHANNEL     psyOutChannel[MAX_CHANNELS],
+                        Word16              logSfbEnergy[MAX_CHANNELS][MAX_GROUPED_SFB],
+                        MINSNR_ADAPT_PARAM *msaParam,
+                        const Word16        nChannels)
+{
+  Word16 ch, sfb, sfbOffs, shift;
+  Word32 nSfb, avgEn;
+  Word16 log_avgEn = 0;
+  Word32 startRatio_x_avgEn = 0;
+                                                                           
+
+  for (ch=0; ch<nChannels; ch++) {
+    PSY_OUT_CHANNEL* psyOutChan = &psyOutChannel[ch];
+
+    /* calc average energy per scalefactor band */
+    avgEn = 0;                                                           
+    nSfb = 0;                                                            
+    for (sfbOffs=0; sfbOffs<psyOutChan->sfbCnt; sfbOffs+=psyOutChan->sfbPerGroup) {
+      for (sfb=0; sfb<psyOutChan->maxSfbPerGroup; sfb++) {
+        avgEn = L_add(avgEn, psyOutChan->sfbEnergy[sfbOffs+sfb]);
+        nSfb = nSfb + 1;
+      }
+    }
+     
+    if (nSfb > 0) {
+	  avgEn = avgEn / nSfb;

+
+      log_avgEn = iLog4(avgEn);
+      startRatio_x_avgEn = fixmul(msaParam->startRatio, avgEn);
+    }
+
+    
+    /* reduce minSnr requirement by minSnr^minSnrRed dependent on avgEn/sfbEn */
+    for (sfbOffs=0; sfbOffs<psyOutChan->sfbCnt; sfbOffs+=psyOutChan->sfbPerGroup) {
+      for (sfb=0; sfb<psyOutChan->maxSfbPerGroup; sfb++) {
+        if (psyOutChan->sfbEnergy[sfbOffs+sfb] < startRatio_x_avgEn) {
+          Word16 dbRatio, minSnrRed;
+          Word32 snrRed;
+          Word16 newMinSnr;
+          
+          dbRatio = log_avgEn - logSfbEnergy[ch][sfbOffs+sfb];
+          dbRatio = dbRatio + (dbRatio << 1);
+
+          minSnrRed = 110 - ((dbRatio + (dbRatio << 1)) >> 2);
+          minSnrRed = max(minSnrRed, 20); /* 110: (0.375(redOffs)+1)*80,  
+                                               3: 0.00375(redRatioFac)*80
+                                               20: 0.25(maxRed) * 80 */
+
+          snrRed = minSnrRed * iLog4((psyOutChan->sfbMinSnr[sfbOffs+sfb] << 16)); 
+          /* 
+             snrRedI si now scaled by 80 (minSnrRed) and 4 (ffr_iLog4)
+          */
+        
+          newMinSnr = round16(pow2_xy(snrRed,80*4));
+         
+          psyOutChan->sfbMinSnr[sfbOffs+sfb] = min(newMinSnr, minSnrLimit);
+        }
+      }
+    }
+  }
+
+}
+
+
+/********************************************************************************
+*
+* function name:initAvoidHoleFlag
+* description: determine bands where avoid hole is not necessary resp. possible
+*
+**********************************************************************************/
+static void initAvoidHoleFlag(Word16 ahFlag[MAX_CHANNELS][MAX_GROUPED_SFB],
+                              PSY_OUT_CHANNEL  psyOutChannel[MAX_CHANNELS],
+                              PSY_OUT_ELEMENT* psyOutElement,
+                              const Word16 nChannels,
+                              AH_PARAM *ahParam)
+{
+  Word16 ch, sfb, sfbGrp, shift;
+  Word32 threshold;
+  Word32* psfbSpreadEn;
+
+  for (ch=0; ch<nChannels; ch++) {
+    PSY_OUT_CHANNEL *psyOutChan = &psyOutChannel[ch];
+     
+    if (psyOutChan->windowSequence != SHORT_WINDOW) {
+      for(sfbGrp = 0;sfbGrp < psyOutChan->sfbCnt;sfbGrp+= psyOutChan->sfbPerGroup){
+         psfbSpreadEn = psyOutChan->sfbSpreadedEnergy + sfbGrp;

+		 for (sfb=0; sfb<psyOutChan->maxSfbPerGroup; sfb++) {
+			*psfbSpreadEn = *psfbSpreadEn >> 1;  /* 0.5 */

+			++psfbSpreadEn;
+        }
+      }
+    }
+    else {
+      for(sfbGrp = 0;sfbGrp < psyOutChan->sfbCnt;sfbGrp+= psyOutChan->sfbPerGroup){

+		psfbSpreadEn = psyOutChan->sfbSpreadedEnergy + sfbGrp;
+        for (sfb=0; sfb<psyOutChan->maxSfbPerGroup; sfb++) {
+          *psfbSpreadEn = (*psfbSpreadEn >> 1) + (*psfbSpreadEn >> 3);  /* 0.63 */

+		  ++psfbSpreadEn;
+        }
+      }
+    }
+  }
+
+  /* increase minSnr for local peaks, decrease it for valleys */
+  if (ahParam->modifyMinSnr) {
+    for(ch=0; ch<nChannels; ch++) {
+      PSY_OUT_CHANNEL *psyOutChan = &psyOutChannel[ch];
+         
+      if (psyOutChan->windowSequence != SHORT_WINDOW)
+        threshold = HOLE_THR_LONG;
+      else
+        threshold = HOLE_THR_SHORT;
+
+      for(sfbGrp = 0;sfbGrp < psyOutChan->sfbCnt;sfbGrp+= psyOutChan->sfbPerGroup){
+        Word16 *psfbMinSnr = psyOutChan->sfbMinSnr + sfbGrp;

+		for (sfb=0; sfb<psyOutChan->maxSfbPerGroup; sfb++) {
+          Word32 sfbEn, sfbEnm1, sfbEnp1, avgEn;
+             
+          if (sfb > 0)
+            sfbEnm1 = psyOutChan->sfbEnergy[sfbGrp+sfb-1];
+          else
+            sfbEnm1 = psyOutChan->sfbEnergy[sfbGrp];
+             
+          if (sfb < (psyOutChan->maxSfbPerGroup-1))
+            sfbEnp1 = psyOutChan->sfbEnergy[sfbGrp+sfb+1];
+          else
+            sfbEnp1 = psyOutChan->sfbEnergy[sfbGrp+sfb];
+          avgEn = (sfbEnm1 + sfbEnp1) >> 1;
+          sfbEn = psyOutChan->sfbEnergy[sfbGrp+sfb];                             
+             
+          if (sfbEn > avgEn && avgEn > 0) {
+            Word32 tmpMinSnr;
+            shift = norm_l(sfbEn);

+			tmpMinSnr = Div_32(L_mpy_ls(avgEn, minSnrLimit) << shift, sfbEn << shift );
+            tmpMinSnr = max(tmpMinSnr, HOLE_THR_LONG);                  
+            tmpMinSnr = max(tmpMinSnr, threshold);
+            *psfbMinSnr = min(*psfbMinSnr, tmpMinSnr);
+          }
+          /* valley ? */
+             
+          if ((sfbEn < (avgEn >> 1)) && (sfbEn > 0)) {
+            Word32 tmpMinSnr;
+            Word32 minSnrEn = L_mpy_wx(avgEn, *psfbMinSnr);                 
+             
+            if(minSnrEn < sfbEn) {

+			  shift = norm_l(sfbEn);
+              tmpMinSnr = Div_32( minSnrEn << shift, sfbEn<<shift);
+            }
+            else {
+              tmpMinSnr = MAX_16;                                             
+            }
+            tmpMinSnr = min(minSnrLimit, tmpMinSnr);
+
+            *psfbMinSnr =
+              (min((tmpMinSnr >>  2), mult(*psfbMinSnr, MIN_SNR_COEF)) << 2);
+          }

+		  psfbMinSnr++;
+        }
+      }
+    }
+  }
+
+  /* stereo: adapt the minimum requirements sfbMinSnr of mid and
+     side channels */
+   
+  if (nChannels == 2) {
+    PSY_OUT_CHANNEL *psyOutChanM = &psyOutChannel[0];
+    PSY_OUT_CHANNEL *psyOutChanS = &psyOutChannel[1];
+    for (sfb=0; sfb<psyOutChanM->sfbCnt; sfb++) {
+      if (psyOutElement->toolsInfo.msMask[sfb]) {
+        Word32 sfbEnM = psyOutChanM->sfbEnergy[sfb];
+        Word32 sfbEnS = psyOutChanS->sfbEnergy[sfb];
+        Word32 maxSfbEn = max(sfbEnM, sfbEnS);
+        Word32 maxThr = L_mpy_wx(maxSfbEn, psyOutChanM->sfbMinSnr[sfb]) >> 1;        
+         
+        if(maxThr >= sfbEnM) {
+          psyOutChanM->sfbMinSnr[sfb] = MAX_16;                                          
+        }
+        else {
+          shift = norm_l(sfbEnM); 

+		  psyOutChanM->sfbMinSnr[sfb] = min(max(psyOutChanM->sfbMinSnr[sfb], 

+			  round16(Div_32(maxThr<<shift, sfbEnM << shift))), minSnrLimit);
+        }
+         
+        if(maxThr >= sfbEnS) {
+          psyOutChanS->sfbMinSnr[sfb] = MAX_16;
+        }
+        else {

+		  shift = norm_l(sfbEnS);
+          psyOutChanS->sfbMinSnr[sfb] = min(max(psyOutChanS->sfbMinSnr[sfb], 

+			  round16(Div_32(maxThr << shift, sfbEnS << shift))), minSnrLimit);
+        }
+
+         
+        if (sfbEnM > psyOutChanM->sfbSpreadedEnergy[sfb])
+          psyOutChanS->sfbSpreadedEnergy[sfb] = L_mpy_ls(sfbEnS, MS_THRSPREAD_COEF);
+         
+        if (sfbEnS > psyOutChanS->sfbSpreadedEnergy[sfb])
+          psyOutChanM->sfbSpreadedEnergy[sfb] = L_mpy_ls(sfbEnM, MS_THRSPREAD_COEF);
+      }
+    }
+  }
+
+
+  /* init ahFlag (0: no ah necessary, 1: ah possible, 2: ah active */
+  for(ch=0; ch<nChannels; ch++) {
+    PSY_OUT_CHANNEL *psyOutChan = &psyOutChannel[ch];
+    for(sfbGrp = 0;sfbGrp < psyOutChan->sfbCnt;sfbGrp+= psyOutChan->sfbPerGroup){
+      Word16 *pahFlag = ahFlag[ch] + sfbGrp;

+	  for (sfb=0; sfb<psyOutChan->maxSfbPerGroup; sfb++) {
+               
+        if ((psyOutChan->sfbSpreadedEnergy[sfbGrp+sfb] > psyOutChan->sfbEnergy[sfbGrp+sfb]) ||
+            (psyOutChan->sfbEnergy[sfbGrp+sfb] <= psyOutChan->sfbThreshold[sfbGrp+sfb]) ||
+            (psyOutChan->sfbMinSnr[sfbGrp+sfb] == MAX_16)) {
+          *pahFlag++ = NO_AH;
+        }
+        else {
+          *pahFlag++ = AH_INACTIVE;
+        }
+      }
+      for (sfb=psyOutChan->maxSfbPerGroup; sfb<psyOutChan->sfbPerGroup; sfb++) {
+        *pahFlag++ = NO_AH;                                                          
+      }
+    }
+  }
+}
+
+/********************************************************************************
+*
+* function name:calcPeNoAH
+* description: sum the pe data only for bands where avoid hole is inactive
+*
+**********************************************************************************/
+static void calcPeNoAH(Word16          *pe,
+                       Word16          *constPart,
+                       Word16          *nActiveLines,
+                       PE_DATA         *peData,
+                       Word16           ahFlag[MAX_CHANNELS][MAX_GROUPED_SFB],
+                       PSY_OUT_CHANNEL  psyOutChannel[MAX_CHANNELS],
+                       const Word16     nChannels)
+{
+  Word16 ch, sfb, sfbGrp;

+  int ipe, iconstPart, inActiveLines;
+
+  ipe = 0;                                                       
+  iconstPart = 0;                                                
+  inActiveLines = 0;                                             
+  for(ch=0; ch<nChannels; ch++) {
+    PSY_OUT_CHANNEL *psyOutChan = &psyOutChannel[ch];
+    PE_CHANNEL_DATA *peChanData = &peData->peChannelData[ch];
+    for(sfbGrp = 0;sfbGrp < psyOutChan->sfbCnt;sfbGrp+= psyOutChan->sfbPerGroup){
+      for (sfb=0; sfb<psyOutChan->maxSfbPerGroup; sfb++) {
+         
+        if (ahFlag[ch][sfbGrp+sfb] < AH_ACTIVE) {
+          ipe = ipe + peChanData->sfbPe[sfbGrp+sfb];
+          iconstPart = iconstPart + peChanData->sfbConstPart[sfbGrp+sfb];
+          inActiveLines = inActiveLines + peChanData->sfbNActiveLines[sfbGrp+sfb];
+        }
+      }
+    }
+  }

+
+  *pe = saturate(ipe);                                                       
+  *constPart = saturate(iconstPart);                                                
+  *nActiveLines = saturate(inActiveLines);  
+}
+
+/********************************************************************************
+*
+* function name:reduceThresholds
+* description: apply reduction formula
+*
+**********************************************************************************/
+static void reduceThresholds(PSY_OUT_CHANNEL  psyOutChannel[MAX_CHANNELS],
+                             Word16           ahFlag[MAX_CHANNELS][MAX_GROUPED_SFB],
+                             Word32           thrExp[MAX_CHANNELS][MAX_GROUPED_SFB],
+                             const Word16     nChannels,
+                             const Word32     redVal)
+{
+  Word32 sfbThrReduced;
+  Word32 *psfbEn, *psfbThr;     

+  Word16 ch, sfb, sfbGrp;

+
+  for(ch=0; ch<nChannels; ch++) {
+    PSY_OUT_CHANNEL *psyOutChan = &psyOutChannel[ch];
+    for(sfbGrp=0; sfbGrp<psyOutChan->sfbCnt; sfbGrp+=psyOutChan->sfbPerGroup) {
+ 	  psfbEn  = psyOutChan->sfbEnergy + sfbGrp;                                      

+      psfbThr = psyOutChan->sfbThreshold + sfbGrp;

+	  for (sfb=0; sfb<psyOutChan->maxSfbPerGroup; sfb++) {
+         
+        if (*psfbEn > *psfbThr) {
+          /* threshold reduction formula */
+          Word32 tmp = thrExp[ch][sfbGrp+sfb] + redVal;
+          tmp = fixmul(tmp, tmp);
+          sfbThrReduced = fixmul(tmp, tmp);
+          /* avoid holes */
+          tmp = L_mpy_ls(*psfbEn, psyOutChan->sfbMinSnr[sfbGrp+sfb]);
+             
+          if ((sfbThrReduced > tmp) && 
+              (ahFlag[ch][sfbGrp+sfb] != NO_AH)){
+            sfbThrReduced = max(tmp, *psfbThr);
+            ahFlag[ch][sfbGrp+sfb] = AH_ACTIVE;                                          
+          }
+		  *psfbThr = sfbThrReduced;
+        }

+

+		psfbEn++;  psfbThr++;
+      }
+    }
+  }
+}
+
+
+/********************************************************************************
+*
+* function name:correctThresh
+* description: if pe difference deltaPe between desired pe and real pe is small enough,
+*             the difference can be distributed among the scale factor bands.
+*
+**********************************************************************************/
+static void correctThresh(PSY_OUT_CHANNEL  psyOutChannel[MAX_CHANNELS],
+                          Word16           ahFlag[MAX_CHANNELS][MAX_GROUPED_SFB],
+                          PE_DATA          *peData,
+                          Word32           thrExp[MAX_CHANNELS][MAX_GROUPED_SFB],
+                          const Word32     redVal,
+                          const Word16     nChannels,
+                          const Word32     deltaPe)
+{
+  Word16 ch, sfb, sfbGrp,shift;
+  PSY_OUT_CHANNEL *psyOutChan;
+  PE_CHANNEL_DATA *peChanData;
+  Word32 deltaSfbPe;
+  Word32 normFactor;

+  Word32 *psfbPeFactors;

+  Word16 *psfbNActiveLines, *pahFlag;
+  Word32 sfbEn, sfbThr;
+  Word32 sfbThrReduced;
+
+  /* for each sfb calc relative factors for pe changes */
+  normFactor = 1;                                                                        
+  for(ch=0; ch<nChannels; ch++) {
+    psyOutChan = &psyOutChannel[ch];
+    peChanData = &peData->peChannelData[ch];
+    for(sfbGrp = 0;sfbGrp < psyOutChan->sfbCnt;sfbGrp+= psyOutChan->sfbPerGroup){
+      psfbPeFactors = peData->sfbPeFactors[ch] + sfbGrp;

+	  psfbNActiveLines = peChanData->sfbNActiveLines + sfbGrp;

+	  pahFlag = ahFlag[ch] + sfbGrp;

+	  for (sfb=0; sfb<psyOutChan->maxSfbPerGroup; sfb++) {
+        Word32 redThrExp = thrExp[ch][sfbGrp+sfb] + redVal;
+             
+        if (((*pahFlag < AH_ACTIVE) || (deltaPe > 0)) && (redThrExp > 0) ) {
+            
+          *psfbPeFactors = (*psfbNActiveLines) * (0x7fffffff / redThrExp);
+          normFactor = L_add(normFactor, *psfbPeFactors);
+        }
+        else {
+          *psfbPeFactors = 0;                                              
+        }

+		psfbPeFactors++; 

+		pahFlag++; psfbNActiveLines++;
+      }
+    }
+  }
+
+ 
+  /* calculate new thresholds */
+  for(ch=0; ch<nChannels; ch++) {
+    psyOutChan = &psyOutChannel[ch];
+    peChanData = &peData->peChannelData[ch];
+    for(sfbGrp = 0;sfbGrp < psyOutChan->sfbCnt;sfbGrp+= psyOutChan->sfbPerGroup){
+      psfbPeFactors = peData->sfbPeFactors[ch] + sfbGrp;

+	  psfbNActiveLines = peChanData->sfbNActiveLines + sfbGrp;

+	  pahFlag = ahFlag[ch] + sfbGrp;

+	  for (sfb=0; sfb<psyOutChan->maxSfbPerGroup; sfb++) {
+        /* pe difference for this sfb */
+        deltaSfbPe = *psfbPeFactors * deltaPe;
+
+		/* thr3(n) = thr2(n)*2^deltaSfbPe/b(n) */         
+        if (*psfbNActiveLines > 0) {
+          /* new threshold */
+          Word32 thrFactor;
+          sfbEn  = psyOutChan->sfbEnergy[sfbGrp+sfb];
+          sfbThr = psyOutChan->sfbThreshold[sfbGrp+sfb];
+
+           if(deltaSfbPe >= 0){
+            /*
+              reduce threshold
+            */
+            thrFactor = pow2_xy(L_negate(deltaSfbPe), (normFactor* (*psfbNActiveLines)));
+              
+            sfbThrReduced = L_mpy_ls(sfbThr, round16(thrFactor));
+          }
+          else {
+            /*
+              increase threshold
+            */
+            thrFactor = pow2_xy(deltaSfbPe, (normFactor * (*psfbNActiveLines)));
+              
+             
+            if(thrFactor > sfbThr) {
+              shift = norm_l(thrFactor);

+			  sfbThrReduced = Div_32( sfbThr << shift, thrFactor<<shift );
+            }
+            else {
+              sfbThrReduced = MAX_32;                                                                            
+            }
+
+          }
+            
+          /* avoid hole */
+          sfbEn = L_mpy_ls(sfbEn, psyOutChan->sfbMinSnr[sfbGrp+sfb]);
+             
+          if ((sfbThrReduced > sfbEn) &&
+              (*pahFlag == AH_INACTIVE)) {
+            sfbThrReduced = max(sfbEn, sfbThr);
+            *pahFlag = AH_ACTIVE;                                                                  
+          }
+
+          psyOutChan->sfbThreshold[sfbGrp+sfb] = sfbThrReduced;  
+        }

+

+		pahFlag++; psfbNActiveLines++; psfbPeFactors++;
+      }
+    }
+  }
+}
+
+
+/********************************************************************************
+*
+* function name:reduceMinSnr
+* description: if the desired pe can not be reached, reduce pe by reducing minSnr
+*
+**********************************************************************************/
+static void reduceMinSnr(PSY_OUT_CHANNEL  psyOutChannel[MAX_CHANNELS], 
+                         PE_DATA         *peData, 
+                         Word16           ahFlag[MAX_CHANNELS][MAX_GROUPED_SFB],
+                         const Word16     nChannels,
+                         const Word16     desiredPe)
+{
+  Word16 ch, sfb, sfbSubWin;
+  Word16 deltaPe;
+
+  /* start at highest freq down to 0 */
+  sfbSubWin = psyOutChannel[0].maxSfbPerGroup;                                                 
+  while (peData->pe > desiredPe && sfbSubWin > 0) {
+       
+    sfbSubWin = sfbSubWin - 1;
+    /* loop over all subwindows */
+    for (sfb=sfbSubWin; sfb<psyOutChannel[0].sfbCnt;
+        sfb+=psyOutChannel[0].sfbPerGroup) {
+      /* loop over all channels */
+		PE_CHANNEL_DATA* peChan = peData->peChannelData;

+		PSY_OUT_CHANNEL* psyOutCh = psyOutChannel;

+		for (ch=0; ch<nChannels; ch++) {           
+        if (ahFlag[ch][sfb] != NO_AH &&
+            psyOutCh->sfbMinSnr[sfb] < minSnrLimit) {
+          psyOutCh->sfbMinSnr[sfb] = minSnrLimit;                                      
+          psyOutCh->sfbThreshold[sfb] =
+            L_mpy_ls(psyOutCh->sfbEnergy[sfb], psyOutCh->sfbMinSnr[sfb]);
+
+          /* calc new pe */
+          deltaPe = ((peChan->sfbNLines4[sfb] + (peChan->sfbNLines4[sfb] >> 1)) >> 2) -
+              peChan->sfbPe[sfb];
+          peData->pe = peData->pe + deltaPe;
+          peChan->pe = peChan->pe + deltaPe;		  
+        }

+		peChan += 1; psyOutCh += 1;
+      }
+      /* stop if enough has been saved */
+       
+      if (peData->pe <= desiredPe)
+        break;
+    }
+  }
+}
+
+/********************************************************************************
+*
+* function name:allowMoreHoles
+* description: if the desired pe can not be reached, some more scalefactor bands  
+*              have to be quantized to zero
+*
+**********************************************************************************/
+static void allowMoreHoles(PSY_OUT_CHANNEL  psyOutChannel[MAX_CHANNELS], 
+                           PSY_OUT_ELEMENT *psyOutElement,
+                           PE_DATA         *peData, 
+                           Word16           ahFlag[MAX_CHANNELS][MAX_GROUPED_SFB],
+                           const AH_PARAM  *ahParam,
+                           const Word16     nChannels,
+                           const Word16     desiredPe)
+{
+  Word16 ch, sfb;
+  Word16 actPe, shift;
+
+  actPe = peData->pe;                                                                    
+
+  /* for MS allow hole in the channel with less energy */
+     
+  if (nChannels==2 &&
+      psyOutChannel[0].windowSequence==psyOutChannel[1].windowSequence) {
+    PSY_OUT_CHANNEL *psyOutChanL = &psyOutChannel[0];
+    PSY_OUT_CHANNEL *psyOutChanR = &psyOutChannel[1];
+    for (sfb=0; sfb<psyOutChanL->sfbCnt; sfb++) {
+      Word32 minEn;
+       
+      if (psyOutElement->toolsInfo.msMask[sfb]) {
+        /* allow hole in side channel ? */
+        minEn = L_mpy_ls(psyOutChanL->sfbEnergy[sfb], (minSnrLimit * psyOutChanL->sfbMinSnr[sfb]) >> 16);
+           
+        if (ahFlag[1][sfb] != NO_AH &&
+            minEn > psyOutChanR->sfbEnergy[sfb]) {
+          ahFlag[1][sfb] = NO_AH;                                                                
+          psyOutChanR->sfbThreshold[sfb] = L_add(psyOutChanR->sfbEnergy[sfb], psyOutChanR->sfbEnergy[sfb]);
+          actPe = actPe - peData->peChannelData[1].sfbPe[sfb];
+        }
+        /* allow hole in mid channel ? */
+        else {
+        minEn = L_mpy_ls(psyOutChanR->sfbEnergy[sfb], (minSnrLimit * psyOutChanR->sfbMinSnr[sfb]) >> 16);
+             
+          if (ahFlag[0][sfb]!= NO_AH &&
+              minEn > psyOutChanL->sfbEnergy[sfb]) {
+            ahFlag[0][sfb] = NO_AH;                                                              
+            psyOutChanL->sfbThreshold[sfb] = L_add(psyOutChanL->sfbEnergy[sfb], psyOutChanL->sfbEnergy[sfb]);
+            actPe = actPe - peData->peChannelData[0].sfbPe[sfb];
+          }
+        }
+         
+        if (actPe < desiredPe)
+          break;
+      }
+    }
+  }
+
+  /* subsequently erase bands */   
+  if (actPe > desiredPe) {
+    Word16 startSfb[2];
+    Word32 avgEn, minEn;
+    Word16 ahCnt;
+    Word16 enIdx;
+    Word16 enDiff;
+    Word32 en[4];
+    Word16 minSfb, maxSfb;
+    Flag   done;
+
+    /* do not go below startSfb */
+    for (ch=0; ch<nChannels; ch++) {
+         
+      if (psyOutChannel[ch].windowSequence != SHORT_WINDOW)
+        startSfb[ch] = ahParam->startSfbL;
+      else
+        startSfb[ch] = ahParam->startSfbS;
+    }
+
+    avgEn = 0;                                                           
+    minEn = MAX_32;                                                      
+    ahCnt = 0;                                                           
+    for (ch=0; ch<nChannels; ch++) {
+      PSY_OUT_CHANNEL *psyOutChan = &psyOutChannel[ch];
+      for (sfb=startSfb[ch]; sfb<psyOutChan->sfbCnt; sfb++) {
+           
+        if ((ahFlag[ch][sfb] != NO_AH) &&
+            (psyOutChan->sfbEnergy[sfb] > psyOutChan->sfbThreshold[sfb])) {
+          minEn = min(minEn, psyOutChan->sfbEnergy[sfb]);
+          avgEn = L_add(avgEn, psyOutChan->sfbEnergy[sfb]);
+          ahCnt++;
+        }
+      }
+    }
+     
+    if(ahCnt) {
+      Word32 iahCnt;
+      shift = norm_l(ahCnt);

+	  iahCnt = Div_32( 1 << shift, ahCnt << shift );
+      avgEn = fixmul(avgEn, iahCnt);
+    }
+
+    enDiff = iLog4(avgEn) - iLog4(minEn);
+    /* calc some energy borders between minEn and avgEn */
+    for (enIdx=0; enIdx<4; enIdx++) {
+      Word32 enFac;
+      enFac = ((6-(enIdx << 1)) * enDiff);
+      en[enIdx] = fixmul(avgEn, pow2_xy(L_negate(enFac),7*4));
+    }
+
+    /* start with lowest energy border at highest sfb */
+    maxSfb = psyOutChannel[0].sfbCnt - 1;
+    minSfb = startSfb[0];                                                                
+     
+    if (nChannels == 2) {
+      maxSfb = max(maxSfb, (psyOutChannel[1].sfbCnt - 1));
+      minSfb = min(minSfb, startSfb[1]);
+    }
+
+    sfb = maxSfb;                                                                        
+    enIdx = 0;                                                                           
+    done = 0;                                                                            
+    while (!done) {
+       
+      for (ch=0; ch<nChannels; ch++) {
+        PSY_OUT_CHANNEL *psyOutChan = &psyOutChannel[ch];
+           
+        if (sfb>=startSfb[ch] && sfb<psyOutChan->sfbCnt) {
+          /* sfb energy below border ? */
+             
+          if (ahFlag[ch][sfb] != NO_AH && psyOutChan->sfbEnergy[sfb] < en[enIdx]){
+            /* allow hole */
+            ahFlag[ch][sfb] = NO_AH;                                                     
+            psyOutChan->sfbThreshold[sfb] = L_add(psyOutChan->sfbEnergy[sfb], psyOutChan->sfbEnergy[sfb]);
+            actPe = actPe - peData->peChannelData[ch].sfbPe[sfb];
+          }
+           
+          if (actPe < desiredPe) {
+            done = 1;                                                                    
+            break;
+          }
+        }
+      }
+      sfb = sfb - 1;
+       
+      if (sfb < minSfb) {
+        /* restart with next energy border */
+        sfb = maxSfb;                                                                    
+        enIdx = enIdx + 1;
+         
+        if (enIdx - 4 >= 0)
+          done = 1;                                                                      
+      }
+    }
+  }
+}
+
+/********************************************************************************
+*
+* function name:adaptThresholdsToPe
+* description: two guesses for the reduction value and one final correction of the
+*              thresholds
+*
+**********************************************************************************/
+static void adaptThresholdsToPe(PSY_OUT_CHANNEL     psyOutChannel[MAX_CHANNELS],
+                                PSY_OUT_ELEMENT    *psyOutElement,
+                                Word16              logSfbEnergy[MAX_CHANNELS][MAX_GROUPED_SFB],
+                                PE_DATA            *peData,
+                                const Word16        nChannels,
+                                const Word16        desiredPe,
+                                AH_PARAM           *ahParam,
+                                MINSNR_ADAPT_PARAM *msaParam)
+{
+  Word16 noRedPe, redPe, redPeNoAH;
+  Word16 constPart, constPartNoAH;
+  Word16 nActiveLines, nActiveLinesNoAH;
+  Word16 desiredPeNoAH;
+  Word32 redVal, avgThrExp;
+  Word32 iter;
+
+  calcThreshExp(peData->thrExp, psyOutChannel, nChannels);
+
+  adaptMinSnr(psyOutChannel, logSfbEnergy, msaParam, nChannels);
+
+  initAvoidHoleFlag(peData->ahFlag, psyOutChannel, psyOutElement, nChannels, ahParam);
+
+  noRedPe = peData->pe;                                                          
+  constPart = peData->constPart;                                                 
+  nActiveLines = peData->nActiveLines;       
+
+  /* first guess of reduction value t^0.25 = 2^((a-pen)/4*b) */
+  avgThrExp = pow2_xy((constPart - noRedPe), (nActiveLines << 2));
+  
+  /* r1 = 2^((a-per)/4*b) - t^0.25 */
+  redVal = pow2_xy((constPart - desiredPe), (nActiveLines << 2)) - avgThrExp;
+
+  /* reduce thresholds */
+  reduceThresholds(psyOutChannel, peData->ahFlag, peData->thrExp, nChannels, redVal);
+
+  /* pe after first guess */
+  calcSfbPe(peData, psyOutChannel, nChannels);
+  redPe = peData->pe;                                                            
+
+  iter = 0;                                                                      
+  do {
+    /* pe for bands where avoid hole is inactive */
+    calcPeNoAH(&redPeNoAH, &constPartNoAH, &nActiveLinesNoAH,
+               peData, peData->ahFlag, psyOutChannel, nChannels);
+
+    desiredPeNoAH = desiredPe -(redPe - redPeNoAH);
+     
+    if (desiredPeNoAH < 0) {
+      desiredPeNoAH = 0;                                                         
+    }
+
+    /* second guess */
+     
+    if (nActiveLinesNoAH > 0) {
+		
+		avgThrExp = pow2_xy((constPartNoAH - redPeNoAH), (nActiveLinesNoAH << 2));
+		
+		redVal = (redVal + pow2_xy((constPartNoAH - desiredPeNoAH), (nActiveLinesNoAH << 2))) - avgThrExp;
+		
+		/* reduce thresholds */
+		reduceThresholds(psyOutChannel, peData->ahFlag, peData->thrExp, nChannels, redVal);
+    }
+
+    calcSfbPe(peData, psyOutChannel, nChannels);
+    redPe = peData->pe;                                                          
+
+    iter = iter+1;
+       
+  } while ((20 * abs_s(redPe - desiredPe) > desiredPe) && (iter < 2));
+
+   
+  if ((100 * redPe < 115 * desiredPe)) {
+    correctThresh(psyOutChannel, peData->ahFlag, peData, peData->thrExp, redVal,
+                  nChannels, desiredPe - redPe);
+  }
+  else {
+    Word16 desiredPe105 = (105 * desiredPe) / 100;
+    reduceMinSnr(psyOutChannel, peData, peData->ahFlag,
+                 nChannels, desiredPe105);
+    allowMoreHoles(psyOutChannel, psyOutElement, peData, peData->ahFlag,
+                   ahParam, nChannels, desiredPe105);
+  }
+}
+
+
+/*****************************************************************************
+*
+* function name: calcBitSave
+* description:  Calculates percentage of bit save, see figure below
+* returns:
+* input:        parameters and bitres-fullness
+* output:       percentage of bit save
+*
+*****************************************************************************/
+static Word16 calcBitSave(Word16 fillLevel,
+                          const Word16 clipLow,
+                          const Word16 clipHigh,
+                          const Word16 minBitSave,
+                          const Word16 maxBitSave)
+{
+  Word16 bitsave = 0;
+
+  fillLevel = max(fillLevel, clipLow);
+  fillLevel = min(fillLevel, clipHigh);
+
+  if(clipHigh-clipLow)

+  bitsave = (maxBitSave - (((maxBitSave-minBitSave)*(fillLevel-clipLow))/
+                              (clipHigh-clipLow)));
+
+  return (bitsave);
+}
+
+
+
+/*****************************************************************************
+*
+* function name: calcBitSpend
+* description:  Calculates percentage of bit spend, see figure below
+* returns:
+* input:        parameters and bitres-fullness
+* output:       percentage of bit spend
+*
+*****************************************************************************/
+static Word16 calcBitSpend(Word16 fillLevel,
+                           const Word16 clipLow,
+                           const Word16 clipHigh,
+                           const Word16 minBitSpend,
+                           const Word16 maxBitSpend)
+{
+  Word16 bitspend = 1;
+
+  fillLevel = max(fillLevel, clipLow);
+  fillLevel = min(fillLevel, clipHigh);
+
+  if(clipHigh-clipLow)

+  bitspend = (minBitSpend + ((maxBitSpend - minBitSpend)*(fillLevel - clipLow) /
+                                (clipHigh-clipLow)));
+                            
+  return (bitspend);
+}
+
+
+/*****************************************************************************
+*
+* function name: adjustPeMinMax()
+* description:  adjusts peMin and peMax parameters over time
+* returns:
+* input:        current pe, peMin, peMax
+* output:       adjusted peMin/peMax
+*
+*****************************************************************************/
+static void adjustPeMinMax(const Word16 currPe,
+                           Word16      *peMin,
+                           Word16      *peMax)
+{
+  Word16 minFacHi, maxFacHi, minFacLo, maxFacLo;
+  Word16 diff;
+  Word16 minDiff = extract_l(currPe / 6);
+  minFacHi = 30;                                                         
+  maxFacHi = 100;                                                        
+  minFacLo = 14;                                                         
+  maxFacLo = 7;                                                          
+
+  diff = currPe - *peMax ;
+   
+  if (diff > 0) {
+    *peMin = *peMin + ((diff * minFacHi) / 100);
+    *peMax = *peMax + ((diff * maxFacHi) / 100);
+  } else {
+    diff = *peMin - currPe;
+     
+    if (diff > 0) {
+      *peMin = *peMin - ((diff * minFacLo) / 100);
+      *peMax = *peMax - ((diff * maxFacLo) / 100);
+    } else {
+      *peMin = *peMin + ((currPe - *peMin) * minFacHi / 100);
+      *peMax = *peMax - ((*peMax - currPe) * maxFacLo / 100);
+    }
+  }
+
+   
+  if ((*peMax - *peMin) < minDiff) {
+    Word16 partLo, partHi;
+
+    partLo = max(0, (currPe - *peMin));
+    partHi = max(0, (*peMax - currPe));
+
+    *peMax = currPe + ((partHi * minDiff) / (partLo + partHi));
+    *peMin = currPe - ((partLo * minDiff) / (partLo + partHi));
+    *peMin = max(0, *peMin);
+  }
+}
+
+
+/*****************************************************************************
+*
+* function name: BitresCalcBitFac
+* description:  calculates factor of spending bits for one frame
+*                1.0 : take all frame dynpart bits
+*                >1.0 : take all frame dynpart bits + bitres
+*                <1.0 : put bits in bitreservoir
+*  returns:      BitFac*100
+*  input:        bitres-fullness, pe, blockType, parameter-settings
+*  output:
+*
+*****************************************************************************/
+static Word16 bitresCalcBitFac( const Word16   bitresBits,
+                                const Word16   maxBitresBits,
+                                const Word16   pe,
+                                const Word16   windowSequence,
+                                const Word16   avgBits,
+                                const Word16   maxBitFac,
+                                ADJ_THR_STATE *AdjThr,
+                                ATS_ELEMENT   *adjThrChan)
+{
+  BRES_PARAM *bresParam;
+  Word16 pex;
+  Word16 fillLevel;
+  Word16 bitSave, bitSpend, bitresFac;
+
+  fillLevel = extract_l((100* bitresBits) / maxBitresBits);
+
+  if (windowSequence != SHORT_WINDOW)
+    bresParam = &(AdjThr->bresParamLong);
+  else
+    bresParam = &(AdjThr->bresParamShort);
+
+  pex = max(pe, adjThrChan->peMin);
+  pex = min(pex,adjThrChan->peMax);
+
+  bitSave = calcBitSave(fillLevel,
+                        bresParam->clipSaveLow, bresParam->clipSaveHigh,
+                        bresParam->minBitSave, bresParam->maxBitSave);
+
+  bitSpend = calcBitSpend(fillLevel,
+                          bresParam->clipSpendLow, bresParam->clipSpendHigh,
+                          bresParam->minBitSpend, bresParam->maxBitSpend);
+
+  if(adjThrChan->peMax != adjThrChan->peMin)

+	bitresFac = (100 - bitSave) + extract_l(((bitSpend + bitSave) * (pex - adjThrChan->peMin)) /
+                    (adjThrChan->peMax - adjThrChan->peMin));
+  else
+	bitresFac = 0x7fff;
+               
+  bitresFac = min(bitresFac,
+                    (100-30 + extract_l((100 * bitresBits) / avgBits)));
+
+  bitresFac = min(bitresFac, maxBitFac);
+
+  adjustPeMinMax(pe, &adjThrChan->peMin, &adjThrChan->peMax);
+
+  return bitresFac;
+}
+
+/*****************************************************************************
+*
+* function name: AdjThrInit
+* description:  init thresholds parameter
+*
+*****************************************************************************/
+void AdjThrInit(ADJ_THR_STATE *hAdjThr,
+                const Word32   meanPe,
+                Word32         chBitrate)
+{
+  ATS_ELEMENT* atsElem = &hAdjThr->adjThrStateElem;
+  MINSNR_ADAPT_PARAM *msaParam = &atsElem->minSnrAdaptParam;
+
+  /* common for all elements: */
+  /* parameters for bitres control */
+  hAdjThr->bresParamLong.clipSaveLow   =  20;                    
+  hAdjThr->bresParamLong.clipSaveHigh  =  95;                    
+  hAdjThr->bresParamLong.minBitSave    =  -5;                    
+  hAdjThr->bresParamLong.maxBitSave    =  30;                    
+  hAdjThr->bresParamLong.clipSpendLow  =  20;                    
+  hAdjThr->bresParamLong.clipSpendHigh =  95;                    
+  hAdjThr->bresParamLong.minBitSpend   = -10;                    
+  hAdjThr->bresParamLong.maxBitSpend   =  40;                    
+
+  hAdjThr->bresParamShort.clipSaveLow   =  20;                   
+  hAdjThr->bresParamShort.clipSaveHigh  =  75;                   
+  hAdjThr->bresParamShort.minBitSave    =   0;                   
+  hAdjThr->bresParamShort.maxBitSave    =  20;                   
+  hAdjThr->bresParamShort.clipSpendLow  =  20;                   
+  hAdjThr->bresParamShort.clipSpendHigh =  75;                   
+  hAdjThr->bresParamShort.minBitSpend   = -5;                    
+  hAdjThr->bresParamShort.maxBitSpend   =  50;                   
+
+  /* specific for each element: */
+
+  /* parameters for bitres control */
+  atsElem->peMin = extract_l(((80*meanPe) / 100));
+  atsElem->peMax = extract_l(((120*meanPe) / 100));
+
+  /* additional pe offset to correct pe2bits for low bitrates */
+  atsElem->peOffset = 0;                             
+  if (chBitrate < 32000) {
+    atsElem->peOffset = max(50, (100 - extract_l((100 * chBitrate) / 32000)));
+  }
+
+  /* avoid hole parameters */
+  if (chBitrate > 20000) {
+    atsElem->ahParam.modifyMinSnr = TRUE;
+    atsElem->ahParam.startSfbL = 15;
+    atsElem->ahParam.startSfbS = 3;
+  }
+  else {
+    atsElem->ahParam.modifyMinSnr = FALSE;
+    atsElem->ahParam.startSfbL = 0;
+    atsElem->ahParam.startSfbS = 0;
+  }
+
+  /* minSnr adaptation */
+  /* maximum reduction of minSnr goes down to minSnr^maxRed */
+  msaParam->maxRed = 0x20000000;     /* *0.25f /                        
+  /* start adaptation of minSnr for avgEn/sfbEn > startRatio */
+  msaParam->startRatio = 0x0ccccccd; /* 10 */                        
+  /* maximum minSnr reduction to minSnr^maxRed is reached for
+     avgEn/sfbEn >= maxRatio */
+  msaParam->maxRatio =  0x0020c49c; /* 1000 */                         
+  /* helper variables to interpolate minSnr reduction for
+     avgEn/sfbEn between startRatio and maxRatio */
+
+  msaParam->redRatioFac = 0xfb333333; /* -0.75/20 */         
+
+  msaParam->redOffs = 0x30000000;  /* msaParam->redRatioFac * 10*log10(msaParam->startRatio) */  
+
+       
+  /* pe correction */
+  atsElem->peLast = 0;                                                 
+  atsElem->dynBitsLast = 0;                                            
+  atsElem->peCorrectionFactor = 100; /* 1.0 */                         
+
+}
+
+/*****************************************************************************
+*
+* function name: calcPeCorrection
+* description:  calculates the desired perceptual entropy factor
+*				It is between 0.85 and 1.15
+*
+*****************************************************************************/
+static void calcPeCorrection(Word16 *correctionFac,
+                             const Word16 peAct,
+                             const Word16 peLast, 
+                             const Word16 bitsLast) 
+{
+  Word32 peAct100 = 100 * peAct;
+  Word32 peLast100 = 100 * peLast;
+  Word16 peBitsLast = bits2pe(bitsLast);
+           
+  if ((bitsLast > 0) &&
+      (peAct100 < (150 * peLast)) &&  (peAct100 > (70 * peLast)) &&
+      ((120 * peBitsLast) > peLast100 ) && (( 65 * peBitsLast) < peLast100))
+    {
+      Word16 newFac = (100 * peLast) / peBitsLast;
+      /* dead zone */
+       
+      if (newFac < 100) {
+        newFac = min(((110 * newFac) / 100), 100);
+        newFac = max(newFac, 85);
+      }
+      else {
+        newFac = max(((90 * newFac) / 100), 100);
+        newFac = min(newFac, 115);
+      }
+         
+      if ((newFac > 100 && *correctionFac < 100) ||
+          (newFac < 100 && *correctionFac > 100)) {
+        *correctionFac = 100;                                                    
+      }
+      /* faster adaptation towards 1.0, slower in the other direction */
+             
+      if ((*correctionFac < 100 && newFac < *correctionFac) ||
+          (*correctionFac > 100 && newFac > *correctionFac))
+        *correctionFac = (85 * *correctionFac + 15 * newFac) / 100;
+      else
+        *correctionFac = (70 * *correctionFac + 30 * newFac) / 100;
+      *correctionFac = min(*correctionFac, 115);
+      *correctionFac = max(*correctionFac, 85);
+    }
+  else {
+    *correctionFac = 100;                                                        
+  }
+}
+
+/********************************************************************************
+*
+* function name: AdjustThresholds
+* description:  Adjust thresholds to the desired bitrate
+*
+**********************************************************************************/
+void AdjustThresholds(ADJ_THR_STATE   *adjThrState,
+                      ATS_ELEMENT     *AdjThrStateElement,
+                      PSY_OUT_CHANNEL  psyOutChannel[MAX_CHANNELS],
+                      PSY_OUT_ELEMENT *psyOutElement,
+                      Word16          *chBitDistribution,
+                      Word16           logSfbEnergy[MAX_CHANNELS][MAX_GROUPED_SFB],
+                      Word16           sfbNRelevantLines[MAX_CHANNELS][MAX_GROUPED_SFB],                      
+                      QC_OUT_ELEMENT  *qcOE,
+					  ELEMENT_BITS	  *elBits,
+					  const Word16     nChannels,
+                      const Word16     maxBitFac)
+{
+  PE_DATA peData;  
+  Word16 noRedPe, grantedPe, grantedPeCorr;
+  Word16 curWindowSequence;
+  Word16 bitFactor;
+  Word16 avgBits = (elBits->averageBits - (qcOE->staticBitsUsed + qcOE->ancBitsUsed));
+  Word16 bitresBits = elBits->bitResLevel; 
+  Word16 maxBitresBits = elBits->maxBits;
+  Word16 sideInfoBits = (qcOE->staticBitsUsed + qcOE->ancBitsUsed);
+  Word16 ch;
+   
+  prepareSfbPe(&peData, psyOutChannel, logSfbEnergy, sfbNRelevantLines, nChannels, AdjThrStateElement->peOffset);
+   
+  /* pe without reduction */
+  calcSfbPe(&peData, psyOutChannel, nChannels);
+  noRedPe = peData.pe;                                                   
+
+
+  curWindowSequence = LONG_WINDOW;                                       
+   
+  if (nChannels == 2) {
+       
+    if ((psyOutChannel[0].windowSequence == SHORT_WINDOW) ||
+        (psyOutChannel[1].windowSequence == SHORT_WINDOW)) {
+      curWindowSequence = SHORT_WINDOW;                                  
+    }
+  }
+  else {
+    curWindowSequence = psyOutChannel[0].windowSequence;                 
+  }
+
+
+  /* bit factor */
+  bitFactor = bitresCalcBitFac(bitresBits, maxBitresBits, noRedPe+5*sideInfoBits,
+                               curWindowSequence, avgBits, maxBitFac,
+                               adjThrState,
+                               AdjThrStateElement);
+
+  /* desired pe */
+  grantedPe = ((bitFactor * bits2pe(avgBits)) / 100);
+
+  /* correction of pe value */
+  calcPeCorrection(&(AdjThrStateElement->peCorrectionFactor), 
+                   min(grantedPe, noRedPe),
+                   AdjThrStateElement->peLast, 
+                   AdjThrStateElement->dynBitsLast);
+  grantedPeCorr = (grantedPe * AdjThrStateElement->peCorrectionFactor) / 100;
+
+     
+  if (grantedPeCorr < noRedPe && noRedPe > peData.offset) {
+    /* calc threshold necessary for desired pe */
+    adaptThresholdsToPe(psyOutChannel,
+                        psyOutElement,
+                        logSfbEnergy,
+                        &peData,
+                        nChannels,
+                        grantedPeCorr,
+                        &AdjThrStateElement->ahParam,
+                        &AdjThrStateElement->minSnrAdaptParam);
+  }
+
+  /* calculate relative distribution */
+  for (ch=0; ch<nChannels; ch++) {
+    Word16 peOffsDiff = peData.pe - peData.offset;
+    chBitDistribution[ch] = 200;                                                 
+     
+    if (peOffsDiff > 0) {
+      Word32 temp = 1000 - (nChannels * 200);
+      chBitDistribution[ch] = chBitDistribution[ch] +

+		  (temp * peData.peChannelData[ch].pe) / peOffsDiff;
+    }
+  }
+
+  /* store pe */
+  qcOE->pe = noRedPe;                                                            
+
+  /* update last pe */
+  AdjThrStateElement->peLast = grantedPe;                                        
+}
+
+/********************************************************************************
+*
+* function name: AdjThrUpdate
+* description:  save dynBitsUsed for correction of bits2pe relation
+*
+**********************************************************************************/
+void AdjThrUpdate(ATS_ELEMENT *AdjThrStateElement,
+                  const Word16 dynBitsUsed)
+{
+  AdjThrStateElement->dynBitsLast = dynBitsUsed;                                 
+}
+
+
diff --git a/media/libstagefright/codecs/aacenc/src/asm/ARMV5E/AutoCorrelation_v5.s b/media/libstagefright/codecs/aacenc/src/asm/ARMV5E/AutoCorrelation_v5.s
new file mode 100644
index 0000000..48edd4f
--- /dev/null
+++ b/media/libstagefright/codecs/aacenc/src/asm/ARMV5E/AutoCorrelation_v5.s
@@ -0,0 +1,167 @@
+@/*

+@ ** Copyright 2003-2010, VisualOn, Inc.

+@ **

+@ ** Licensed under the Apache License, Version 2.0 (the "License");

+@ ** you may not use this file except in compliance with the License.

+@ ** You may obtain a copy of the License at

+@ **

+@ **     http://www.apache.org/licenses/LICENSE-2.0

+@ **

+@ ** Unless required by applicable law or agreed to in writing, software

+@ ** distributed under the License is distributed on an "AS IS" BASIS,

+@ ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

+@ ** See the License for the specific language governing permissions and

+@ ** limitations under the License.

+@ */

+

+@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@

+@	File:		AutoCorrelation_v5.s

+@

+@	Content:	AutoCorrelation function armv5 assemble

+@

+@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@

+

+

+	.section .text	

+	.global	AutoCorrelation

+

+AutoCorrelation:

+	stmdb     sp!, {r4 - r11, lr}

+

+  sub     r13, r13, #20                     

+

+  mov     r5, r0                            

+  mov     r7, r1                            

+  mov     r9, r3                            

+  mov     r2, r2, lsl #16                      

+  mov     r0, #0          

+  mov     r4, r2, asr #16                   

+  mov     r8, #0                            

+  cmp     r4, #0                            

+  ble     L136        

+	

+	cmp     r4, #8 

+	mov		  r2, #0 

+  blt     L133   

+

+	sub     r12, r4, #8                

+L132:  

+  ldr     r6, [r5, r2]  

+	add		  r2, r2, #4

+	smulbb  r3, r6, r6

+	ldr     r1, [r5, r2] 

+	smultt	r10, r6, r6

+	mov		  r3, r3, asr #9

+	smulbb	r6, r1, r1

+	mov		  r10, r10, asr #9

+	qadd	  r0, r0, r3

+	smultt	r11, r1, r1

+	add     r2, r2, #4

+	qadd	  r0, r0, r10

+	mov		  r6, r6, asr #9

+	mov		  r11, r11, asr #9

+	ldr		  r1, [r5, r2]

+	qadd	  r0, r0, r6

+	smulbb	r10, r1, r1

+	smultt	r6, r1, r1

+	qadd	  r0, r0, r11

+	mov		  r10, r10, asr #9

+	mov		  r6, r6, asr #9

+	qadd	  r0, r0, r10

+	add     r2, r2, #4

+	add     r8, r8, #6

+

+	qadd	  r0, r0, r6

+	cmp     r8, r12                            

+  blt     L132	                  

+L133:                         

+  ldrsh   r6, [r5, r2]                      

+  mul     r10, r6, r6   

+	add     r2, r2, #2                     

+  mov     r1, r10, asr #9                    

+  qadd    r0, r0, r1

+L134:                         

+  add     r8, r8, #1                        

+  cmp     r8, r4                            

+  blt     L133                            

+L135:                        

+L136:                         

+  str     r0, [r7, #0]                      

+  cmp     r0, #0                            

+  beq     L1320                           

+L137:                         

+  mov     r2, r9, lsl #16                   

+	mov     r8, #1                                

+  mov     r2, r2, asr #16                   

+  cmp     r2, #1                            

+  ble     L1319                           

+L138:                        

+L139:                         

+  sub     r4, r4, #1                        

+  mov     r14, #0                           

+  mov     r3, #0                            

+  cmp     r4, #0                            

+  ble     L1317                           

+L1310:                       

+  cmp     r4, #6                            

+  addlt   r6, r5, r8, lsl #1                

+  blt     L1314                           

+L1311:                        

+  add     r6, r5, r8, lsl #1                

+  sub     r12, r4, #6                       

+  str     r8, [r13, #8]                     

+  str     r7, [r13, #4]                     

+L1312:                        

+  mov     r1, r3, lsl #1                    

+  ldrsh   r7, [r6, r1]                      

+  ldrsh   r10, [r5, r1]  

+  add     r8, r1, r6 

+	add     r9, r5, r1                       

+	mul     r7, r10, r7

+  ldrsh   r1, [r8, #2] 

+	ldrsh   r10, [r8, #4]   

+  add     r7, r14, r7, asr #9  	                                             

+  ldrsh   r0, [r9, #2]                          

+  ldrsh   r11, [r9, #4]                   

+  mul     r1, r0, r1                        

+  ldrsh   r14, [r8, #6]                     

+  mul     r10, r11, r10          

+	add     r7, r7, r1, asr #9            

+  ldrsh   r8, [r8, #8] 

+	add     r3, r3, #5

+	ldrsh   r11, [r9, #6]                  

+  ldrsh   r1, [r9, #8]                      

+  mul     r14, r11, r14                     

+  add     r7, r7, r10, asr #9       

+  mul     r1, r1, r8                             

+  add     r14, r7, r14, asr #9              

+	cmp     r3, r12 

+  add     r14, r14, r1, asr #9              

+  ble     L1312                           

+L1313:                        

+  ldr     r8, [r13, #8]                     

+  ldr     r7, [r13, #4]                     

+L1314:                        

+L1315:                        

+  mov     r12, r3, lsl #1                   

+  ldrsh   r9, [r6, r12]                     

+  ldrsh   r12, [r5, r12]                    

+  add     r3, r3, #1                        

+  cmp     r3, r4                            

+  mul     r12, r12, r9                      

+  add     r14, r14, r12, asr #9             

+  blt     L1315                           

+L1316:                        

+L1317:                        

+  str     r14, [r7, +r8, lsl #2]            

+  add     r8, r8, #1                        

+  cmp     r8, r2                            

+  blt     L139   

+	                         

+L1319:

+L1320:

+	add     r13, r13, #20                    

+	ldmia   sp!, {r4 - r11, pc}

+

+	@ENDP  @ |AutoCorrelation|

+	.end

diff --git a/media/libstagefright/codecs/aacenc/src/asm/ARMV5E/CalcWindowEnergy_v5.s b/media/libstagefright/codecs/aacenc/src/asm/ARMV5E/CalcWindowEnergy_v5.s
new file mode 100644
index 0000000..7997e98
--- /dev/null
+++ b/media/libstagefright/codecs/aacenc/src/asm/ARMV5E/CalcWindowEnergy_v5.s
@@ -0,0 +1,112 @@
+@/*

+@ ** Copyright 2003-2010, VisualOn, Inc.

+@ **

+@ ** Licensed under the Apache License, Version 2.0 (the "License");

+@ ** you may not use this file except in compliance with the License.

+@ ** You may obtain a copy of the License at

+@ **

+@ **     http://www.apache.org/licenses/LICENSE-2.0

+@ **

+@ ** Unless required by applicable law or agreed to in writing, software

+@ ** distributed under the License is distributed on an "AS IS" BASIS,

+@ ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

+@ ** See the License for the specific language governing permissions and

+@ ** limitations under the License.

+@ */

+

+@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@

+@	File:		CalcWindowEnergy_v5.s

+@

+@	Content:	CalcWindowEnergy function armv5 assemble

+@

+@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@

+

+	.section .text

+	

+	.global	CalcWindowEnergy

+

+CalcWindowEnergy:

+	stmdb   sp!, {r4 - r11, lr}

+	sub     r13, r13, #20 

+

+  mov     r3, r3, lsl #16                         

+	ldr     r10, [r0, #168]                    @ states0 = blockSwitchingControl->iirStates[0];

+  mov     r3, r3, asr #16 

+	ldr     r11, [r0, #172]                    @ states1 = blockSwitchingControl->iirStates[1];

+

+	mov     r2, r2, lsl #16

+	ldr     r12, hiPassCoeff                   @ Coeff0 = hiPassCoeff[0];      

+  mov     r2, r2, asr #16

+	ldr     r14, hiPassCoeff + 4			         @ Coeff1 = hiPassCoeff[1];

+	

+	mov			r8, #0							               @ w=0

+	mov			r5, #0							               @ wOffset = 0;

+	

+BLOCK_BEGIN:

+	mov			r6, #0                             @ accuUE = 0; 

+	mov			r7, #0								             @ accuFE = 0; 

+	mov			r4, #0							               @ i=0

+		                   

+	str			r8, [r13, #4]	

+	str			r0, [r13, #8]	

+	str			r3, [r13, #12]

+	

+ENERGY_BEG:	

+	mov     r9, r5, lsl #1  

+	ldrsh   r9, [r1, r9]											@ tempUnfiltered = timeSignal[tidx];

+

+	add			r5, r5, r2												@ tidx = tidx + chIncrement;

+	

+	smulwb	r3, r14, r9												@ accu1 = L_mpy_ls(Coeff1, tempUnfiltered);	

+	smull		r0, r8, r12, r11									@ accu2 = fixmul( Coeff0, states1 );

+	

+	mov			r3, r3, lsl #1

+	mov			r8, r8, lsl #1

+

+	sub			r0, r3, r10												@ accu3 = accu1 - states0;	

+	sub			r8,	r0, r8												@ out = accu3 - accu2;

+

+	mov		  r10, r3														@ states0 = accu1;

+	mov		  r11, r8														@ states1 = out;  

+	

+	mul		  r3, r9, r9	

+	mov     r8, r8, asr #16

+	

+	add		  r4, r4, #1

+	add     r6, r6, r3, asr #7

+

+	mul		  r9, r8, r8	

+	ldr		  r3, [r13, #12]

+

+	add		  r7, r7, r9, asr #7

+		

+	cmp     r4, r3                            

+  blt     ENERGY_BEG       

+	

+	ldr		  r0, [r13, #8]

+	ldr		  r8, [r13, #4]

+	

+ENERGY_END:

+	add		  r4, r0, r8, lsl #2

+

+	str     r6, [r4, #72]         

+	add		  r8, r8, #1	           

+  str     r7, [r4, #136]                   

+

+	cmp		  r8, #8

+	blt		  BLOCK_BEGIN                  	                        

+

+BLOCK_END:

+	str     r10, [r0, #168]                    

+  str     r11, [r0, #172]                    

+  mov     r0, #1            

+	                

+  add     r13, r13, #20   

+	ldmia   sp!, {r4 - r11, pc}                  

+

+hiPassCoeff:

+	.word 0xbec8b439

+	.word	0x609d4952

+		

+	@ENDP

+	.end

diff --git a/media/libstagefright/codecs/aacenc/src/asm/ARMV5E/PrePostMDCT_v5.s b/media/libstagefright/codecs/aacenc/src/asm/ARMV5E/PrePostMDCT_v5.s
new file mode 100644
index 0000000..d4d3edb
--- /dev/null
+++ b/media/libstagefright/codecs/aacenc/src/asm/ARMV5E/PrePostMDCT_v5.s
@@ -0,0 +1,131 @@
+@/*

+@ ** Copyright 2003-2010, VisualOn, Inc.

+@ **

+@ ** Licensed under the Apache License, Version 2.0 (the "License");

+@ ** you may not use this file except in compliance with the License.

+@ ** You may obtain a copy of the License at

+@ **

+@ **     http://www.apache.org/licenses/LICENSE-2.0

+@ **

+@ ** Unless required by applicable law or agreed to in writing, software

+@ ** distributed under the License is distributed on an "AS IS" BASIS,

+@ ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

+@ ** See the License for the specific language governing permissions and

+@ ** limitations under the License.

+@ */

+

+@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@

+@	File:		PrePostMDCT_v5.s

+@

+@	Content:	premdct and postmdct function armv5 assemble

+@

+@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@

+

+	.section .text

+	.global	PreMDCT

+

+PreMDCT:

+	stmdb       sp!, {r4 - r11, lr}

+	

+	add         r9, r0, r1, lsl #2

+	sub         r3, r9, #8

+

+	movs        r1, r1, asr #2

+	beq         PreMDCT_END

+	

+PreMDCT_LOOP:

+	ldr					r8, [r2], #4

+	ldr					r9, [r2], #4

+	

+	ldrd				r4, [r0]

+	ldrd				r6, [r3]

+	

+	smull				r14, r11, r4, r8					@ MULHIGH(tr1, cosa)

+	smull    			r10, r12, r7, r8					@ MULHIGH(ti1, cosa)

+		

+	smull				r14, r8, r7, r9						@ MULHIGH(ti1, sina)

+	smull				r7, r10, r4, r9						@ MULHIGH(tr1, sina)	

+		

+	add					r11, r11, r8						@ MULHIGH(cosa, tr1) + MULHIGH(sina, ti1)@	

+	sub					r7, r12, r10						@ MULHIGH(ti1, cosa) - MULHIGH(tr1, sina)

+	

+	ldr					r8, [r2], #4

+	ldr					r9, [r2], #4

+	

+	smull				r14, r4, r6, r8						@ MULHIGH(tr2, cosa)

+	smull    			r10, r12, r5, r8					@ MULHIGH(ti2, cosa)

+		

+	smull				r14, r8, r5, r9						@ MULHIGH(ti2, sina)

+	smull				r5, r10, r6, r9						@ MULHIGH(tr2, sina)

+	

+	add					r8, r8, r4

+	sub					r9, r12, r10

+	

+	mov					r6, r11		

+

+	strd				r6, [r0]	

+	strd				r8, [r3]

+	

+	subs				r1, r1, #1

+	sub					r3, r3, #8

+	add 				r0, r0, #8

+	bne					PreMDCT_LOOP

+

+PreMDCT_END:

+	ldmia       sp!, {r4 - r11, pc}

+	@ENDP  @ |PreMDCT|

+	

+	.section .text

+	.global	PostMDCT

+

+PostMDCT:

+	stmdb       sp!, {r4 - r11, lr}

+	

+	add         r9, r0, r1, lsl #2

+	sub         r3, r9, #8

+

+	movs        r1, r1, asr #2

+	beq         PostMDCT_END

+	

+PostMDCT_LOOP:

+	ldr					r8, [r2], #4					

+	ldr					r9, [r2], #4

+	

+	ldrd				r4, [r0]

+	ldrd				r6, [r3]

+	

+	smull				r14, r11, r4, r8					@ MULHIGH(tr1, cosa)

+	smull    			r10, r12, r5, r8					@ MULHIGH(ti1, cosa)

+		

+	smull				r14, r8, r5, r9						@ MULHIGH(ti1, sina)

+	smull				r5, r10, r4, r9						@ MULHIGH(tr1, sina)	

+		

+	add					r4, r11, r8							@ MULHIGH(cosa, tr1) + MULHIGH(sina, ti1)@	

+	sub					r11, r10, r12						@ MULHIGH(ti1, cosa) - MULHIGH(tr1, sina)@

+	

+	ldr					r8, [r2], #4						@

+	ldr					r9, [r2], #4

+	

+	smull				r14, r5, r6, r8						@ MULHIGH(tr2, cosa)

+	smull    			r10, r12, r7, r8					@ MULHIGH(ti2, cosa)

+		

+	smull				r14, r8, r7, r9						@ MULHIGH(ti2, sina)

+	smull				r7, r10, r6, r9						@ MULHIGH(tr2, sina)

+	

+	add					r6, r8, r5							@ MULHIGH(cosb, tr2) + MULHIGH(sinb, ti2)@

+	sub					r5, r10, r12						@ MULHIGH(sinb, tr2) - MULHIGH(cosb, ti2)@

+	

+	mov					r7, r11				

+

+	strd				r4, [r0]

+	strd				r6, [r3]

+	

+	subs				r1, r1, #1

+	sub					r3, r3, #8

+	add 				r0, r0, #8

+	bne					PostMDCT_LOOP

+

+PostMDCT_END:

+	ldmia       sp!, {r4 - r11, pc}

+	@ENDP  @ |PostMDCT|

+	.end
\ No newline at end of file
diff --git a/media/libstagefright/codecs/aacenc/src/asm/ARMV5E/R4R8First_v5.s b/media/libstagefright/codecs/aacenc/src/asm/ARMV5E/R4R8First_v5.s
new file mode 100644
index 0000000..370daf4
--- /dev/null
+++ b/media/libstagefright/codecs/aacenc/src/asm/ARMV5E/R4R8First_v5.s
@@ -0,0 +1,252 @@
+@/*

+@ ** Copyright 2003-2010, VisualOn, Inc.

+@ **

+@ ** Licensed under the Apache License, Version 2.0 (the "License");

+@ ** you may not use this file except in compliance with the License.

+@ ** You may obtain a copy of the License at

+@ **

+@ **     http://www.apache.org/licenses/LICENSE-2.0

+@ **

+@ ** Unless required by applicable law or agreed to in writing, software

+@ ** distributed under the License is distributed on an "AS IS" BASIS,

+@ ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

+@ ** See the License for the specific language governing permissions and

+@ ** limitations under the License.

+@ */

+

+@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@

+@	File:		R4R8First_v5.s

+@

+@	Content:	Radix8First and Radix4First function armv5 assemble

+@

+@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@

+

+	.section .text

+	.global	Radix4First

+

+Radix4First:

+	stmdb       sp!, {r4 - r11, lr}

+	

+	movs				r10, r1

+	mov					r11, r0

+	beq					Radix4First_END

+		

+Radix4First_LOOP:

+	ldrd				r0, [r11]

+	ldrd				r2, [r11, #8]

+	ldrd				r4, [r11, #16]

+	ldrd				r6, [r11, #24]

+	

+	add					r8, r0, r2

+	add					r9, r1, r3

+	

+	sub					r0, r0, r2

+	sub					r1, r1, r3

+	

+	add					r2, r4, r6

+	add					r3, r5, r7

+	

+	sub					r4, r4, r6

+	sub					r5, r5, r7

+	

+	add					r6, r8, r2

+	add					r7, r9, r3

+	

+	sub					r8, r8, r2

+	sub					r9, r9, r3

+	

+	add					r2, r0, r5

+	sub					r3, r1, r4

+	

+	sub					r0, r0, r5

+	add					r1, r1, r4

+	

+	strd				r6, [r11]

+	strd				r2, [r11, #8]

+	strd				r8, [r11, #16]

+	strd				r0, [r11, #24]

+	

+	subs				r10, r10, #1

+	add					r11, r11, #32

+	bne					Radix4First_LOOP

+

+Radix4First_END:

+	ldmia       sp!, {r4 - r11, pc}

+	@ENDP  @ |Radix4First|

+	

+	.section .text

+	.global	Radix8First

+

+Radix8First:

+	stmdb       sp!, {r4 - r11, lr}

+	sub         sp, sp, #0x24

+	

+	mov				  r12, r1

+	mov					r14, r0

+	cmp					r12, #0

+	beq					Radix8First_END

+	

+Radix8First_LOOP:

+	ldrd				r0, [r14]		

+	ldrd				r2, [r14, #8]

+	ldrd				r4, [r14, #16]

+	ldrd				r6, [r14, #24]

+	

+	add					r8, r0, r2					@ r0 = buf[0] + buf[2]@

+	add					r9, r1, r3					@ i0 = buf[1] + buf[3]@

+	

+	sub					r0, r0, r2					@ r1 = buf[0] - buf[2]@

+	sub					r1, r1, r3					@ i1 = buf[1] - buf[3]@

+	

+	add					r2, r4, r6					@	r2 = buf[4] + buf[6]@

+	add					r3, r5, r7					@ i2 = buf[5] + buf[7]@

+	

+	sub					r4, r4, r6					@	r3 = buf[4] - buf[6]@

+	sub					r5, r5, r7					@ i3 = buf[5] - buf[7]@

+	

+	add					r6, r8, r2					@ r4 = (r0 + r2) >> 1@

+	add					r7, r9, r3					@ i4 = (i0 + i2) >> 1@

+	

+	sub					r8, r8, r2					@	r5 = (r0 - r2) >> 1@

+	sub					r9, r9, r3					@ i5 = (i0 - i2) >> 1@

+	

+	sub					r2, r0, r5					@ r6 = (r1 - i3) >> 1@

+	add					r3, r1, r4					@ i6 = (i1 + r3) >> 1@

+	

+	add					r0, r0, r5					@ r7 = (r1 + i3) >> 1@

+	sub					r1, r1, r4					@ i7 = (i1 - r3) >> 1@

+	

+	mov					r6, r6, asr #1			@

+	mov					r7, r7, asr #1			@

+	

+	mov					r8, r8, asr #1

+	mov					r9, r9, asr #1

+	

+	mov					r2, r2, asr #1

+	mov					r3, r3, asr #1

+	

+	mov					r0, r0, asr #1

+	mov					r1, r1, asr #1	

+	

+	str					r6, [sp]

+	str					r7, [sp, #4]

+	

+	str					r8, [sp, #8]

+	str					r9, [sp, #12]

+	

+	str					r2, [sp, #16]

+	str					r3, [sp, #20]	

+	

+	str					r0, [sp, #24]

+	str					r1, [sp, #28]	

+	

+	ldrd				r2, [r14, #32]		

+	ldrd				r4, [r14, #40]

+	ldrd				r6, [r14, #48]

+	ldrd				r8, [r14, #56]

+	

+	add					r0, r2, r4					@ r0 = buf[ 8] + buf[10]@

+	add					r1, r3, r5					@ i0 = buf[ 9] + buf[11]@

+	

+	sub					r2, r2, r4					@ r1 = buf[ 8] - buf[10]@

+	sub					r3, r3, r5					@ i1 = buf[ 9] - buf[11]@

+	

+	add					r4, r6, r8					@ r2 = buf[12] + buf[14]@

+	add					r5, r7, r9					@ i2 = buf[13] + buf[15]@

+	

+	sub					r6, r6, r8					@ r3 = buf[12] - buf[14]@

+	sub					r7, r7, r9					@	i3 = buf[13] - buf[15]@

+	

+	add					r8, r0, r4					@ t0 = (r0 + r2)

+	add					r9, r1, r5					@ t1 = (i0 + i2)

+	

+	sub					r0, r0, r4					@ t2 = (r0 - r2)

+	sub					r1, r1, r5					@ t3 = (i0 - i2)

+	

+	mov					r8, r8, asr #1

+	ldr					r4, [sp]

+	

+	mov					r9, r9, asr #1

+	ldr					r5, [sp, #4]

+	

+	mov					r0, r0, asr #1		

+	mov					r1, r1, asr #1

+	

+	add					r10, r4, r8					@ buf[ 0] = r4 + t0@

+	add					r11, r5, r9					@ buf[ 1] = i4 + t1@

+	

+	sub					r4,  r4, r8					@ buf[ 8] = r4 - t0@

+	sub					r5,  r5, r9					@	buf[ 9] = i4 - t1@

+	

+ 	strd				r10, [r14]

+ 	strd				r4,  [r14, #32]

+ 	

+ 	ldr					r10, [sp, #8]

+ 	ldr					r11, [sp, #12]

+ 	

+ 	add					r4, r10, r1					@ buf[ 4] = r5 + t3@

+ 	sub					r5, r11, r0					@	buf[ 5] = i5 - t2@

+ 	

+ 	sub					r10, r10, r1				@ buf[12] = r5 - t3@

+ 	add					r11, r11, r0				@ buf[13] = i5 + t2@

+ 	

+ 	strd				r4,  [r14, #16]

+ 	strd				r10, [r14, #48]

+ 	

+ 	sub					r0, r2, r7					@ r0 = r1 - i3@

+ 	add					r1, r3, r6					@ i0 = i1 + r3@

+ 

+  ldr					r11, DATATab

+ 	

+ 	add					r2, r2, r7					@ r2 = r1 + i3@

+ 	sub					r3, r3, r6					@ i2 = i1 - r3@

+ 	

+	sub					r4, r0, r1					@ r0 - i0

+	add					r5, r0, r1					@ r0 + i0

+	

+	sub					r0, r2, r3					@ r2 - i2

+	add					r1, r2, r3					@ r2 + i2

+	

+	smull				r8, r6, r4, r11								

+	smull				r9, r7, r5, r11								

+	

+	ldr					r2, [sp, #16]

+	ldr					r3, [sp, #20]

+	

+	smull				r8, r4, r0, r11								

+	smull				r9, r5, r1, r11								

+	

+	ldr					r10, [sp, #24]

+	ldr					r11, [sp, #28]

+	

+	sub					r8, r2, r6

+	sub					r9, r3, r7

+	

+	add					r2, r2, r6

+	add					r3, r3, r7

+	

+	add					r6, r10, r5

+	sub					r7, r11, r4

+	

+	sub					r0, r10, r5

+	add					r1, r11, r4

+	

+	strd				r6, [r14, #8]

+	strd				r8, [r14, #24]

+	strd				r0, [r14, #40]

+	strd				r2, [r14, #56]

+	

+	subs				r12, r12, #1

+	add					r14, r14, #64

+	

+	bne					Radix8First_LOOP

+	

+Radix8First_END:

+	add         sp, sp, #0x24

+	ldmia       sp!, {r4 - r11, pc}

+	

+DATATab:

+	.word       0x5a82799a

+	

+	@ENDP  @ |Radix8First|

+	.end
\ No newline at end of file
diff --git a/media/libstagefright/codecs/aacenc/src/asm/ARMV5E/Radix4FFT_v5.s b/media/libstagefright/codecs/aacenc/src/asm/ARMV5E/Radix4FFT_v5.s
new file mode 100644
index 0000000..db8e5d8
--- /dev/null
+++ b/media/libstagefright/codecs/aacenc/src/asm/ARMV5E/Radix4FFT_v5.s
@@ -0,0 +1,169 @@
+@/*

+@ ** Copyright 2003-2010, VisualOn, Inc.

+@ **

+@ ** Licensed under the Apache License, Version 2.0 (the "License");

+@ ** you may not use this file except in compliance with the License.

+@ ** You may obtain a copy of the License at

+@ **

+@ **     http://www.apache.org/licenses/LICENSE-2.0

+@ **

+@ ** Unless required by applicable law or agreed to in writing, software

+@ ** distributed under the License is distributed on an "AS IS" BASIS,

+@ ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

+@ ** See the License for the specific language governing permissions and

+@ ** limitations under the License.

+@ */

+

+@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@

+@	File:		Radix4FFT_v5.s

+@

+@	Content:	Radix4FFT armv5 assemble

+@

+@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@

+	.section .text

+	.global	Radix4FFT

+

+Radix4FFT:

+	stmdb     sp!, {r4 - r11, lr}

+	sub       sp, sp, #32                     

+

+	mov			r1, r1, asr #2

+	cmp     r1, #0       

+	beq     Radix4FFT_END                            

+                       

+Radix4FFT_LOOP1:          

+	mov     r14, r0          							@ xptr = buf@          

+	mov		r10, r1 												@ i = num@

+	mov     r9, r2, lsl #3  							@ step = 2*bgn@

+	cmp     r10, #0  

+	str		r0, [sp] 

+	str		r1, [sp, #4]      

+	str		r2, [sp, #8]

+	str		r3, [sp, #12]  

+	beq     Radix4FFT_LOOP1_END                            	    

+     

+Radix4FFT_LOOP2:                       

+	mov     r12, r3				        				@ csptr = twidTab@

+	mov		r11, r2												@ j = bgn

+	cmp     r11, #0        

+	str		r10, [sp, #16]

+	beq     Radix4FFT_LOOP2_END                         

+	 

+Radix4FFT_LOOP3:                          

+	str			r11, [sp, #20]	 

+	

+	ldrd		r0, [r14, #0]									@ r0 = xptr[0]@ r1 = xptr[1]@

+	add			r14, r14, r9 	 								@ xptr += step@

+	

+	ldrd		r10,	[r14, #0]  					 			@ r2 = xptr[0]@ r3 = xptr[1]@	

+	ldr			r8, [r12], #4									@ cosxsinx = csptr[0]@

+	

+	smulwt	r4, r10, r8										@ L_mpy_wx(cosx, t0)

+	smulwt	r3, r11, r8										@ L_mpy_wx(cosx, t1)

+	

+	smlawb	r2, r11, r8, r4								@ r2 = L_mpy_wx(cosx, t0) + L_mpy_wx(sinx, t1)@

+	smulwb	r5, r10, r8										@ L_mpy_wx(sinx, t0)

+	

+	mov			r10, r0, asr #2								@ t0 = r0 >> 2@

+	mov			r11, r1, asr #2								@	t1 = r1 >> 2@

+		

+	sub			r3, r3, r5										@ r3 = L_mpy_wx(cosx, t1) - L_mpy_wx(sinx, t0)@

+	add     r14, r14, r9 	 								@ xptr += step@

+	

+	sub			r0, r10, r2										@ r0 = t0 - r2@

+	sub			r1, r11, r3									  @ r1 = t1 - r3@

+	

+	add			r2, r10, r2										@ r2 = t0 + r2@

+	add			r3, r11, r3										@ r3 = t1 + r3@

+	

+	str			r2, [sp, #24]

+	str			r3, [sp, #28]

+	

+	ldrd		r10, [r14, #0]								@ r4 = xptr[0]@ r5 = xptr[1]@

+	ldr			r8, [r12], #4									@ cosxsinx = csptr[1]@

+	

+	smulwt	r6, r10, r8										@ L_mpy_wx(cosx, t0)

+	smulwt	r5, r11, r8										@ L_mpy_wx(cosx, t1)

+	

+	smlawb	r4, r11, r8, r6								@ r4 = L_mpy_wx(cosx, t0) + L_mpy_wx(sinx, t1)@

+	smulwb	r7, r10, r8										@ L_mpy_wx(sinx, t0)

+	

+	add			r14, r14, r9									@ xptr += step@

+	sub			r5, r5, r7										@ r5 = L_mpy_wx(cosx, t1) - L_mpy_wx(sinx, t0)@

+		

+	ldrd		r10, [r14]										@ r6 = xptr[0]@ r7 = xptr[1]@

+	ldr			r8, [r12], #4									@ cosxsinx = csptr[1]@

+	

+	smulwt	r2, r10, r8										@ L_mpy_wx(cosx, t0)

+	smulwt	r7, r11, r8										@ L_mpy_wx(cosx, t1)

+	

+	smlawb	r6, r11, r8, r2								@ r4 = L_mpy_wx(cosx, t0) + L_mpy_wx(sinx, t1)@

+	smulwb	r3, r10, r8										@ L_mpy_wx(sinx, t0)

+	

+	mov			r10, r4												@ t0 = r4@

+	mov			r11, r5												@ t1 = r5@	

+	

+	sub			r7, r7, r3										@ r5 = L_mpy_wx(cosx, t1) - L_mpy_wx(sinx, t0)@

+	

+

+	add			r4,  r10, r6									@	r4 = t0 + r6@	

+	sub			r5, r7, r11										@ r5 = r7 - t1@

+	

+	sub			r6, r10, r6										@ r6 = t0 - r6@

+	add			r7, r7, r11										@ r7 = r7 + t1@

+	

+	ldr			r2, [sp, #24]

+	ldr			r3, [sp, #28]

+	

+	add			r10, r0, r5										@ xptr[0] = r0 + r5@

+	add			r11, r1, r6										@ xptr[0] = r1 + r6

+	

+	strd		r10, [r14]										

+	sub			r14, r14, r9									@ xptr -= step@

+	

+	sub			r10, r2, r4										@	xptr[0] = r2 - r4@

+	sub			r11, r3, r7										@ xptr[1] = r3 - r7@

+	

+	strd		r10, [r14]				

+	sub			r14, r14, r9									@ xptr -= step@

+	

+	sub			r10, r0, r5										@ xptr[0] = r0 - r5@

+	sub			r11, r1, r6										@ xptr[0] = r1 - r6

+	

+	strd		r10, [r14]										

+	sub			r14, r14, r9									@ xptr -= step@

+	

+	add			r10, r2, r4										@	xptr[0] = r2 - r4@

+	add			r11, r3, r7										@ xptr[1] = r3 - r7@

+	

+	strd		r10, [r14]				

+	add			r14, r14, #8									@ xptr += 2@

+	

+	ldr			r11, [sp, #20]

+	subs		r11, r11, #1

+	bne			Radix4FFT_LOOP3	

+	 

+Radix4FFT_LOOP2_END:           

+	ldr			r10, [sp, #16]

+	ldr			r3, [sp, #12]

+	ldr			r2, [sp, #8]

+	rsb			r8, r9, r9, lsl #2   

+	sub			r10, r10, #1

+	add			r14, r14, r8		      

+	cmp			r10, #0  

+	bhi     Radix4FFT_LOOP2           

+                        

+Radix4FFT_LOOP1_END:               

+	ldr     r0, [sp]    

+	ldr		r1, [sp, #4]

+	add     r3, r3, r8, asr #1

+	mov     r2, r2, lsl #2 

+	movs    r1, r1, asr #2 

+	bne     Radix4FFT_LOOP1          

+                        

+Radix4FFT_END:                        

+	add     sp, sp, #32                  

+	ldmia   sp!, {r4 - r11, pc}

+		

+	@ENDP  @ |Radix4FFT|

+	.end
\ No newline at end of file
diff --git a/media/libstagefright/codecs/aacenc/src/asm/ARMV5E/band_nrg_v5.s b/media/libstagefright/codecs/aacenc/src/asm/ARMV5E/band_nrg_v5.s
new file mode 100644
index 0000000..a463dfd
--- /dev/null
+++ b/media/libstagefright/codecs/aacenc/src/asm/ARMV5E/band_nrg_v5.s
@@ -0,0 +1,204 @@
+@/*

+@ ** Copyright 2003-2010, VisualOn, Inc.

+@ **

+@ ** Licensed under the Apache License, Version 2.0 (the "License");

+@ ** you may not use this file except in compliance with the License.

+@ ** You may obtain a copy of the License at

+@ **

+@ **     http://www.apache.org/licenses/LICENSE-2.0

+@ **

+@ ** Unless required by applicable law or agreed to in writing, software

+@ ** distributed under the License is distributed on an "AS IS" BASIS,

+@ ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

+@ ** See the License for the specific language governing permissions and

+@ ** limitations under the License.

+@ */

+

+@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@

+@	File:		band_nrg_v5.s

+@

+@	Content:	CalcBandEnergy and CalcBandEnergyMS function armv5 assemble

+@

+@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@

+

+	.section .text

+

+	.global	CalcBandEnergy

+

+CalcBandEnergy:

+	stmdb   sp!, {r4 - r11, lr}	

+                   

+  mov     r2, r2, lsl #16                   

+	ldr     r12, [r13, #36]

+	mov			r9, #0

+  mov     r5, r2, asr #16    

+	mov			r4, #0               

+  cmp     r5, #0	

+	ble     L212 

+

+L22:

+  mov     r2, r4, lsl #1                    

+  ldrsh   r10, [r1, r2]                     

+  add     r11, r1, r2                       

+  ldrsh   r2, [r11, #2]    

+	mov     r14, #0                 

+  cmp     r10, r2                           

+  bge     L28 

+	

+L23:

+	ldr     r11, [r0, +r10, lsl #2]	

+  add     r10, r10, #1    

+	ldr     r6, [r0, +r10, lsl #2]	

+	smull   r11, r7, r11, r11

+	add     r10, r10, #1 

+	smull	  r6, r8, r6, r6

+	ldr     r11, [r0, +r10, lsl #2]

+	qadd	  r14, r14, r7

+	add     r10, r10, #1

+	smull	  r11, r7, r11, r11

+	ldr     r6, [r0, +r10, lsl #2]

+	qadd	  r14, r14, r8

+	smull	  r6, r8, r6, r6

+  add     r10, r10, #1 

+	qadd	  r14, r14, r7

+	cmp     r10, r2

+	qadd	  r14, r14, r8

+	blt     L23   

+

+L28:	

+	qadd	  r14, r14, r14

+	str     r14, [r3, +r4, lsl #2]

+	add     r4, r4, #1 

+	qadd	  r9, r9, r14

+	cmp     r4, r5                          

+

+  blt     L22       	

+

+L212:	

+	str     r9, [r12, #0]                     

+	ldmia   sp!, {r4 - r11, pc}

+	

+	@ENDP  ; |CalcBandEnergy|

+	

+	.global	CalcBandEnergyMS

+

+CalcBandEnergyMS:

+	stmdb   sp!, {r4 - r11, lr}

+	sub     r13, r13, #24

+	

+	mov     r12, #0 

+  mov     r3, r3, lsl #16  

+  mov     r14, #0 

+	mov     r3, r3, asr #16      

+	cmp     r3, #0          

+	mov		  r4, #0                  

+  ble     L315    

+	

+L32:	

+	mov		  r5, r4, lsl #1

+	mov		  r6, #0

+	ldrsh   r10, [r2, r5]

+	add     r5, r2, r5

+	mov		  r7, #0

+	ldrsh	  r11, [r5, #2]                        

+	cmp     r10, r11                          

+  bge     L39    

+

+	str		  r3, [r13, #4]

+	str		  r4, [r13, #8]

+	str		  r12, [r13, #12]

+	str		  r14, [r13, #16]

+

+L33:	

+	ldr     r8, [r0, +r10, lsl #2]                    

+	ldr     r9, [r1, +r10, lsl #2]

+	mov		  r8, r8, asr #1

+	add		  r10, r10, #1

+	mov		  r9, r9, asr #1

+

+	ldr     r12, [r0, +r10, lsl #2]          

+	add		  r5, r8, r9	          

+	ldr     r14, [r1, +r10, lsl #2]

+	sub		  r8, r8, r9

+

+	smull   r5, r3, r5, r5 

+	mov		  r12, r12, asr #1

+	smull   r8, r4, r8, r8 

+	mov		  r14, r14, asr #1

+

+	qadd	  r6, r6, r3

+	add		  r5, r12, r14

+	qadd	  r7, r7, r4

+	sub		  r8, r12, r14

+

+	smull   r5, r3, r5, r5 

+	add		  r10, r10, #1

+	smull   r8, r4, r8, r8 

+		

+	qadd	  r6, r6, r3

+	qadd	  r7, r7, r4

+

+	ldr     r8, [r0, +r10, lsl #2]                    

+	ldr     r9, [r1, +r10, lsl #2]

+	mov		  r8, r8, asr #1

+	add		  r10, r10, #1

+	mov		  r9, r9, asr #1

+

+	ldr     r12, [r0, +r10, lsl #2]          

+	add		  r5, r8, r9	          

+	ldr     r14, [r1, +r10, lsl #2]

+	sub		  r8, r8, r9

+

+	smull   r5, r3, r5, r5 

+	mov		  r12, r12, asr #1

+	smull   r8, r4, r8, r8 

+	mov		  r14, r14, asr #1

+

+	qadd	  r6, r6, r3

+	add		  r5, r12, r14

+	qadd	  r7, r7, r4

+	sub		  r8, r12, r14

+

+	smull   r5, r3, r5, r5 

+	add		  r10, r10, #1

+	smull   r8, r4, r8, r8 

+		

+	qadd	  r6, r6, r3

+	qadd	  r7, r7, r4

+

+	cmp     r10, r11

+	

+	blt		  L33

+

+	ldr		  r3, [r13, #4]

+	ldr		  r4, [r13, #8]	

+	ldr		  r12, [r13, #12]

+	ldr		  r14, [r13, #16]

+L39:	

+	qadd	  r6, r6, r6

+	qadd	  r7, r7, r7	

+	

+	ldr		  r8, [r13, #60]

+	ldr		  r9, [r13, #68]

+

+	qadd	  r12, r12, r6

+	qadd	  r14, r14, r7

+	

+	str		  r6, [r8, +r4, lsl #2]       

+	str     r7, [r9, +r4, lsl #2]    

+	

+	add		  r4, r4, #1

+	cmp		  r4, r3

+	blt     L32            

+

+L315:

+	ldr		  r8, [r13, #64]

+	ldr		  r9, [r13, #72]

+	str		  r12, [r8, #0]

+	str		  r14, [r9, #0]

+

+	add     r13, r13, #24

+	ldmia   sp!, {r4 - r11, pc}

+	@ENDP  ; |CalcBandEnergyMS|

+

+	.end

diff --git a/media/libstagefright/codecs/aacenc/src/asm/ARMV7/PrePostMDCT_v7.s b/media/libstagefright/codecs/aacenc/src/asm/ARMV7/PrePostMDCT_v7.s
new file mode 100644
index 0000000..bf7dcbad
--- /dev/null
+++ b/media/libstagefright/codecs/aacenc/src/asm/ARMV7/PrePostMDCT_v7.s
@@ -0,0 +1,135 @@
+@/*

+@ ** Copyright 2003-2010, VisualOn, Inc.

+@ **

+@ ** Licensed under the Apache License, Version 2.0 (the "License");

+@ ** you may not use this file except in compliance with the License.

+@ ** You may obtain a copy of the License at

+@ **

+@ **     http://www.apache.org/licenses/LICENSE-2.0

+@ **

+@ ** Unless required by applicable law or agreed to in writing, software

+@ ** distributed under the License is distributed on an "AS IS" BASIS,

+@ ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

+@ ** See the License for the specific language governing permissions and

+@ ** limitations under the License.

+@ */

+

+@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@

+@	File:		PrePostMDCT_v7.s

+@

+@	Content:	premdct and postmdct function armv7 assemble

+@

+@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@

+

+	.section .text

+	.global	PreMDCT

+

+PreMDCT:

+	stmdb     sp!, {r4 - r11, lr}

+	

+	add         r9, r0, r1, lsl #2

+	sub         r3, r9, #32

+

+	movs        r1, r1, asr #2

+	beq         PreMDCT_END	

+	

+PreMDCT_LOOP:

+	VLD4.I32			{d0, d2, d4, d6}, [r2]!				@ cosa = *csptr++@ sina = *csptr++@

+	VLD4.I32			{d1, d3, d5, d7}, [r2]!				@ cosb = *csptr++@ sinb = *csptr++@

+	VLD2.I32			{d8, d9, d10, d11}, [r0]			@ tr1 = *(buf0 + 0)@ ti2 = *(buf0 + 1)@

+	VLD2.I32			{d13, d15}, [r3]!					@ tr2 = *(buf1 - 1)@ ti1 = *(buf1 + 0)@

+	VLD2.I32			{d12, d14}, [r3]!					@ tr2 = *(buf1 - 1)@ ti1 = *(buf1 + 0)@

+		

+	VREV64.32			Q8, Q7	

+	VREV64.32			Q9, Q6

+

+	

+	VQDMULH.S32		Q10, Q0, Q4								@ MULHIGH(cosa, tr1)

+	VQDMULH.S32		Q11, Q1, Q8								@ MULHIGH(sina, ti1)

+	VQDMULH.S32		Q12, Q0, Q8								@ MULHIGH(cosa, ti1)

+	VQDMULH.S32		Q13, Q1, Q4								@ MULHIGH(sina, tr1)

+		

+	VADD.S32			Q0, Q10, Q11						@ *buf0++ = MULHIGH(cosa, tr1) + MULHIGH(sina, ti1)@

+	VSUB.S32			Q1, Q12, Q13						@ *buf0++ = MULHIGH(cosa, ti1) - MULHIGH(sina, tr1)@

+	

+	VST2.I32			{d0, d1, d2, d3}, [r0]!

+	sub						r3, r3, #32

+	

+	VQDMULH.S32		Q10, Q2, Q9										@ MULHIGH(cosb, tr2)

+	VQDMULH.S32		Q11, Q3, Q5										@ MULHIGH(sinb, ti2)

+	VQDMULH.S32		Q12, Q2, Q5										@ MULHIGH(cosb, ti2)

+	VQDMULH.S32		Q13, Q3, Q9										@ MULHIGH(sinb, tr2)

+		

+	VADD.S32			Q0, Q10, Q11									@ MULHIGH(cosa, tr2) + MULHIGH(sina, ti2)@

+	VSUB.S32			Q1, Q12, Q13									@ MULHIGH(cosa, ti2) - MULHIGH(sina, tr2)@

+	

+	VREV64.32			Q3, Q1

+	VREV64.32			Q2, Q0

+		

+	VST2.I32		{d5, d7}, [r3]!	

+	VST2.I32		{d4, d6}, [r3]! 

+	

+	subs     		r1, r1, #4

+	sub		  		r3, r3, #64	

+	bne       	PreMDCT_LOOP

+	

+PreMDCT_END:

+	ldmia     sp!, {r4 - r11, pc}

+	@ENDP  @ |PreMDCT|

+

+	.section .text

+	.global	PostMDCT

+

+PostMDCT:

+	stmdb     sp!, {r4 - r11, lr}

+	

+	add         r9, r0, r1, lsl #2

+	sub         r3, r9, #32

+

+	movs        r1, r1, asr #2

+	beq         PostMDCT_END

+	

+PostMDCT_LOOP:

+	VLD4.I32			{d0, d2, d4, d6}, [r2]!				@ cosa = *csptr++@ sina = *csptr++@

+	VLD4.I32			{d1, d3, d5, d7}, [r2]!				@ cosb = *csptr++@ sinb = *csptr++@

+	VLD2.I32			{d8, d9, d10, d11}, [r0]			@ tr1 = *(zbuf1 + 0)@ ti1 = *(zbuf1 + 1)@

+	VLD2.I32			{d13, d15}, [r3]!							@ tr2 = *(zbuf2 - 1)@ ti2 = *(zbuf2 + 0)@

+	VLD2.I32			{d12, d14}, [r3]!							@ tr2 = *(zbuf2 - 1)@ ti2 = *(zbuf2 + 0)@	

+

+	VREV64.32			Q8, Q6	

+	VREV64.32			Q9, Q7			

+	

+	VQDMULH.S32		Q10, Q0, Q4										@ MULHIGH(cosa, tr1)

+	VQDMULH.S32		Q11, Q1, Q5										@ MULHIGH(sina, ti1)

+	VQDMULH.S32		Q12, Q0, Q5										@ MULHIGH(cosa, ti1)

+	VQDMULH.S32		Q13, Q1, Q4										@ MULHIGH(sina, tr1)

+		

+	VADD.S32			Q0, Q10, Q11									@ *buf0++ = MULHIGH(cosa, tr1) + MULHIGH(sina, ti1)@

+	VSUB.S32			Q5, Q13, Q12									@ *buf1-- = MULHIGH(sina, tr1) - MULHIGH(cosa, ti1)@

+	

+	VQDMULH.S32		Q10, Q2, Q8										@ MULHIGH(cosb, tr2)

+	VQDMULH.S32		Q11, Q3, Q9										@ MULHIGH(sinb, ti2)

+	VQDMULH.S32		Q12, Q2, Q9										@ MULHIGH(cosb, ti2)

+	VQDMULH.S32		Q13, Q3, Q8										@ MULHIGH(sinb, tr2)

+		

+	VADD.S32			Q4, Q10, Q11									@ *buf1-- = MULHIGH(cosa, tr2) + MULHIGH(sina, ti2)@

+	VSUB.S32			Q1, Q13, Q12									@ *buf0++ = MULHIGH(sina, tr2) - MULHIGH(cosa, ti2)@	

+	

+	VREV64.32			Q2, Q4

+	VREV64.32			Q3, Q5	

+	

+	sub						r3, r3, #32	

+	VST2.I32			{d0, d1, d2, d3}, [r0]!

+		

+	VST2.I32			{d5, d7}, [r3]!	

+	VST2.I32			{d4, d6}, [r3]! 

+	

+	subs     			r1, r1, #4

+	sub		  			r3, r3, #64		

+	bne       	PostMDCT_LOOP

+

+PostMDCT_END:

+	ldmia     sp!, {r4 - r11, pc}

+

+	@ENDP  		@ |PostMDCT|

+	.end
\ No newline at end of file
diff --git a/media/libstagefright/codecs/aacenc/src/asm/ARMV7/R4R8First_v7.s b/media/libstagefright/codecs/aacenc/src/asm/ARMV7/R4R8First_v7.s
new file mode 100644
index 0000000..99ee68b
--- /dev/null
+++ b/media/libstagefright/codecs/aacenc/src/asm/ARMV7/R4R8First_v7.s
@@ -0,0 +1,146 @@
+@/*

+@ ** Copyright 2003-2010, VisualOn, Inc.

+@ **

+@ ** Licensed under the Apache License, Version 2.0 (the "License");

+@ ** you may not use this file except in compliance with the License.

+@ ** You may obtain a copy of the License at

+@ **

+@ **     http://www.apache.org/licenses/LICENSE-2.0

+@ **

+@ ** Unless required by applicable law or agreed to in writing, software

+@ ** distributed under the License is distributed on an "AS IS" BASIS,

+@ ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

+@ ** See the License for the specific language governing permissions and

+@ ** limitations under the License.

+@ */

+

+@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@

+@	File:		R4R8First_v7.s

+@

+@	Content:	Radix8First and Radix4First function armv7 assemble

+@

+@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@

+

+	.section .text

+	.global	Radix8First

+

+Radix8First:

+	stmdb     		sp!, {r4 - r11, lr}

+

+	ldr       		r3, SQRT1_2

+	cmp       		r1, #0

+	

+	VDUP.I32  		Q15, r3	

+	beq       		Radix8First_END

+	

+Radix8First_LOOP:

+	VLD1.I32			{d0, d1, d2, d3},	[r0]!

+	VLD1.I32			{d8, d9, d10, d11},	[r0]!

+		

+	VADD.S32			d4, d0, d1		@ r0 = buf[0] + buf[2]@i0 = buf[1] + buf[3]@

+	VSUB.S32			d5, d0, d1		@ r1 = buf[0] - buf[2]@i1 = buf[1] - buf[3]@	

+	VSUB.S32			d7, d2, d3		@ r2 = buf[4] - buf[6]@i2 = buf[5] - buf[7]@	

+	VADD.S32			d6, d2, d3		@ r3 = buf[4] + buf[6]@i3 = buf[5] + buf[7]@

+	VREV64.I32			d7, d7	

+	

+	VADD.S32			Q0, Q2, Q3		@ r4 = (r0 + r2)@i4 = (i0 + i2)@i6 = (i1 + r3)@r7 = (r1 + i3)

+	VSUB.S32			Q1, Q2, Q3		@ r5 = (r0 - r2)@i5 = (i0 - i2)@r6 = (r1 - i3)@i7 = (i1 - r3)@

+

+	VREV64.I32			d3, d3	

+

+	VADD.S32			d4, d8, d9		@ r0 = buf[ 8] + buf[10]@i0 = buf[ 9] + buf[11]@

+	VSUB.S32			d7, d10, d11	@ r1 = buf[12] - buf[14]@i1 = buf[13] - buf[15]@	

+	VADD.S32			d6, d10, d11	@ r2 = buf[12] + buf[14]@i2 = buf[13] + buf[15]@

+	VREV64.I32			d7, d7	

+	VSUB.S32			d5, d8, d9		@ r3 = buf[ 8] - buf[10]@i3 = buf[ 9] - buf[11]@

+	

+	VTRN.32				d1, d3	

+	

+	VADD.S32			Q4, Q2, Q3		@ t0 = (r0 + r2) >> 1@t1 = (i0 + i2) >> 1@i0 = i1 + r3@r2 = r1 + i3@

+	VSUB.S32			Q5, Q2, Q3		@ t2 = (r0 - r2) >> 1@t3 = (i0 - i2) >> 1@r0 = r1 - i3@i2 = i1 - r3@

+	

+	VREV64.I32			d3, d3

+	

+	VSHR.S32			d8, d8, #1		 

+	VSHR.S32			Q0, Q0, #1

+	VREV64.I32			d10, d10

+	VTRN.32				d11, d9

+	VSHR.S32			Q1, Q1, #1

+	VSHR.S32			d10, d10, #1

+	VREV64.I32			d9, d9

+	

+	sub       			r0, r0, #0x40

+	

+	VADD.S32			d12, d0, d8

+	VSUB.S32			d16, d0, d8	

+	VADD.S32			d14, d2, d10

+	VSUB.S32			d18, d2, d10

+	

+	VSUB.S32			d4, d11, d9

+	VADD.S32			d5, d11, d9

+	

+	VREV64.I32			d18, d18

+	

+	VQDMULH.S32			Q3, Q2, Q15

+	VTRN.32				d14, d18

+	VTRN.32				d6, d7

+	VREV64.I32			d18, d18	

+	

+	VSUB.S32			d15, d3, d6

+	VREV64.I32			d7, d7

+	VADD.S32			d19, d3, d6

+	VADD.S32			d13, d1, d7

+	VSUB.S32			d17, d1, d7

+	

+	VREV64.I32			d17, d17

+	VTRN.32				d13, d17

+	VREV64.I32			d17, d17

+	

+	subs       			r1, r1, #1	

+	

+	VST1.I32			{d12, d13, d14, d15}, [r0]!

+	VST1.I32			{d16, d17, d18, d19}, [r0]!	

+	bne       			Radix8First_LOOP

+	

+Radix8First_END:

+	ldmia     sp!, {r4 - r11, pc}	

+SQRT1_2:

+	.word      0x2d413ccd

+	

+	@ENDP  @ |Radix8First|

+	

+	.section .text

+	.global	Radix4First

+

+Radix4First:

+	stmdb     	sp!, {r4 - r11, lr}

+

+	cmp       	r1, #0

+	beq       	Radix4First_END

+	

+Radix4First_LOOP:

+	VLD1.I32			{d0, d1, d2, d3}, [r0]					

+	

+	VADD.S32			d4, d0, d1							@ r0 = buf[0] + buf[2]@ r1 = buf[1] + buf[3]@		

+	VSUB.S32			d5, d0, d1							@ r2 = buf[0] - buf[2]@ r3 = buf[1] - buf[3]@

+	VSUB.S32			d7, d2, d3							@ r4 = buf[4] + buf[6]@ r5 = buf[5] + buf[7]@

+	VADD.S32			d6, d2, d3							@ r6 = buf[4] - buf[6]@ r7 = buf[5] - buf[7]@

+	

+	VREV64.I32		d7, d7									@ 

+	

+	VADD.S32			Q4, Q2, Q3

+	VSUB.S32			Q5, Q2, Q3

+	

+	VREV64.I32		d11, d11

+	VTRN.32				d9, d11

+	subs       		r1, r1, #1	

+	VREV64.I32		d11, d11

+	VST1.I32			{d8, d9, d10, d11}, [r0]!

+

+	bne       		Radix4First_LOOP

+	

+Radix4First_END:

+	ldmia    		sp!, {r4 - r11, pc}

+

+	@ENDP  @ |Radix4First|

+	.end
\ No newline at end of file
diff --git a/media/libstagefright/codecs/aacenc/src/asm/ARMV7/Radix4FFT_v7.s b/media/libstagefright/codecs/aacenc/src/asm/ARMV7/Radix4FFT_v7.s
new file mode 100644
index 0000000..e1a8438
--- /dev/null
+++ b/media/libstagefright/codecs/aacenc/src/asm/ARMV7/Radix4FFT_v7.s
@@ -0,0 +1,143 @@
+@/*

+@ ** Copyright 2003-2010, VisualOn, Inc.

+@ **

+@ ** Licensed under the Apache License, Version 2.0 (the "License");

+@ ** you may not use this file except in compliance with the License.

+@ ** You may obtain a copy of the License at

+@ **

+@ **     http://www.apache.org/licenses/LICENSE-2.0

+@ **

+@ ** Unless required by applicable law or agreed to in writing, software

+@ ** distributed under the License is distributed on an "AS IS" BASIS,

+@ ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

+@ ** See the License for the specific language governing permissions and

+@ ** limitations under the License.

+@ */

+

+@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@

+@	File:		Radix4FFT_v7.s

+@

+@	Content:	Radix4FFT armv7 assemble

+@

+@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@

+

+	.section .text

+	.global	Radix4FFT

+

+Radix4FFT:

+	stmdb    sp!, {r4 - r11, lr}

+

+	mov			r1, r1, asr #2

+	cmp     	r1, #0                            

+	beq     	Radix4FFT_END                            

+                        

+Radix4FFT_LOOP1:                         

+	mov     	r5, r2, lsl #1  

+	mov     	r8, r0          

+	mov     	r7, r1  

+	mov     	r5, r5, lsl #2   

+	cmp     	r1, #0          

+	rsbeq   	r12, r5, r5, lsl #2 

+	beq     	Radix4FFT_LOOP1_END              

+                         

+	rsb     	r12, r5, r5, lsl #2   

+	 

+Radix4FFT_LOOP2:                        

+	mov     	r6, r3 

+	mov     	r4, r2  

+	cmp     	r2, #0        

+	beq     	Radix4FFT_LOOP2_END         

+  

+Radix4FFT_LOOP3:                          

+	@r0 = xptr[0]@

+	@r1 = xptr[1]@

+	VLD2.I32			{D0, D1, D2, D3}, [r8]				

+	VLD2.I32			{D28, D29, D30, D31}, [r6]!		@ cosx = csptr[0]@ sinx = csptr[1]@

+	

+	add					r8, r8, r5										@ xptr += step@	

+	VLD2.I32			{D4, D5, D6,D7}, [r8]					@ r2 = xptr[0]@ r3 = xptr[1]@

+	

+	VQDMULH.S32		Q10, Q2, Q14									@ MULHIGH(cosx, t0)

+	VQDMULH.S32		Q11, Q3, Q15									@ MULHIGH(sinx, t1)

+	VQDMULH.S32		Q12, Q3, Q14									@ MULHIGH(cosx, t1)

+	VQDMULH.S32		Q13, Q2, Q15									@ MULHIGH(sinx, t0)

+		

+	VADD.S32			Q2, Q10, Q11									@ MULHIGH(cosx, t0) + MULHIGH(sinx, t1)

+	VSUB.S32			Q3, Q12, Q13									@ MULHIGH(cosx, t1) - MULHIGH(sinx, t0)

+	

+	add					r8, r8, r5										@ xptr += step@

+	VSHR.S32			Q10, Q0, #2										@ t0 = r0 >> 2@

+	VSHR.S32			Q11, Q1, #2										@ t1 = r1 >> 2@

+	

+	VSUB.S32			Q0,	Q10, Q2										@ r0 = t0 - r2@

+	VSUB.S32			Q1,	Q11, Q3										@ r1 = t1 - r3@

+	VADD.S32			Q2, Q10, Q2										@ r2 = t0 + r2@

+	VADD.S32			Q3, Q11, Q3										@ r3 = t1 + r3@

+		

+	VLD2.I32			{D8, D9, D10, D11}, [r8]	

+	VLD2.I32			{D28, D29, D30, D31}, [r6]!	

+	add						r8, r8, r5

+

+	VQDMULH.S32		Q10, Q4, Q14									@ MULHIGH(cosx, t0)

+	VQDMULH.S32		Q11, Q5, Q15									@ MULHIGH(sinx, t1)

+	VQDMULH.S32		Q12, Q5, Q14									@ MULHIGH(cosx, t1)

+	VQDMULH.S32		Q13, Q4, Q15									@ MULHIGH(sinx, t0)

+		

+	VADD.S32			Q8, Q10, Q11									@ MULHIGH(cosx, t0) + MULHIGH(sinx, t1)

+	VSUB.S32			Q9, Q12, Q13									@ MULHIGH(cosx, t1) - MULHIGH(sinx, t0)	

+	

+	VLD2.I32		{D12, D13, D14, D15}, [r8]	

+	VLD2.I32		{D28, D29, D30, D31}, [r6]!

+	

+	VQDMULH.S32		Q10, Q6, Q14									@ MULHIGH(cosx, t0)

+	VQDMULH.S32		Q11, Q7, Q15									@ MULHIGH(sinx, t1)

+	VQDMULH.S32		Q12, Q7, Q14									@ MULHIGH(cosx, t1)

+	VQDMULH.S32		Q13, Q6, Q15									@ MULHIGH(sinx, t0)

+		

+	VADD.S32			Q6, Q10, Q11									@ MULHIGH(cosx, t0) + MULHIGH(sinx, t1)

+	VSUB.S32			Q7, Q12, Q13									@ MULHIGH(cosx, t1) - MULHIGH(sinx, t0)		

+	

+	VADD.S32			Q4, Q8, Q6										@ r4 = t0 + r6@

+	VSUB.S32			Q5, Q7, Q9										@ r5 = r7 - t1@

+	VSUB.S32			Q6, Q8, Q6										@ r6 = t0 - r6@

+	VADD.S32			Q7, Q7, Q9										@ r7 = r7 + t1@

+	

+	VADD.S32			Q8, Q0, Q5										@ xptr[0] = r0 + r5@

+	VADD.S32			Q9, Q1, Q6										@ xptr[1] = r1 + r6@

+	VST2.I32			{D16, D17, D18, D19}, [r8]

+	

+	VSUB.S32			Q10, Q2, Q4										@ xptr[0] = r2 - r4@

+	sub					r8, r8, r5										@ xptr -= step@

+	VSUB.S32			Q11, Q3, Q7										@ xptr[1] = r3 - r7@

+	VST2.I32			{D20, D21, D22, D23}, [r8]

+		

+	VSUB.S32			Q8, Q0, Q5										@ xptr[0] = r0 - r5@

+	sub					r8, r8, r5										@ xptr -= step@

+	VSUB.S32			Q9, Q1, Q6										@ xptr[1] = r1 - r6@

+	VST2.I32			{D16, D17, D18, D19}, [r8]

+		

+	VADD.S32			Q10, Q2, Q4										@ xptr[0] = r2 + r4@

+	sub					r8, r8, r5										@ xptr -= step@

+	VADD.S32			Q11, Q3, Q7										@ xptr[1] = r3 + r7@

+	VST2.I32			{D20, D21, D22, D23}, [r8]!

+		

+	subs    			r4, r4, #4 

+	bne     			Radix4FFT_LOOP3 

+	                         

+Radix4FFT_LOOP2_END:                         

+	add     			r8, r8, r12    

+	sub    				r7, r7, #1     

+	cmp					r7, #0

+	bhi     			Radix4FFT_LOOP2           

+                        

+Radix4FFT_LOOP1_END:                        

+	add     			r3, r12, r3    

+	mov     			r2, r2, lsl #2 

+	movs    			r1, r1, asr #2 

+	bne     			Radix4FFT_LOOP1          

+                        

+Radix4FFT_END:        

+	ldmia   			sp!, {r4 - r11, pc}

+		

+	@ENDP  @ |Radix4FFT|

+	.end
\ No newline at end of file
diff --git a/media/libstagefright/codecs/aacenc/src/band_nrg.c b/media/libstagefright/codecs/aacenc/src/band_nrg.c
new file mode 100644
index 0000000..666c4ca
--- /dev/null
+++ b/media/libstagefright/codecs/aacenc/src/band_nrg.c
@@ -0,0 +1,102 @@
+/*

+ ** Copyright 2003-2010, VisualOn, Inc.

+ **

+ ** Licensed under the Apache License, Version 2.0 (the "License");

+ ** you may not use this file except in compliance with the License.

+ ** You may obtain a copy of the License at

+ **

+ **     http://www.apache.org/licenses/LICENSE-2.0

+ **

+ ** Unless required by applicable law or agreed to in writing, software

+ ** distributed under the License is distributed on an "AS IS" BASIS,

+ ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

+ ** See the License for the specific language governing permissions and

+ ** limitations under the License.

+ */

+/*******************************************************************************

+	File:		band_nrg.c

+

+	Content:	Band/Line energy calculations functions

+

+*******************************************************************************/
+
+#include "basic_op.h"

+#include "band_nrg.h"
+
+#ifndef ARMV5E

+/********************************************************************************
+*
+* function name: CalcBandEnergy
+* description:   Calc sfb-bandwise mdct-energies for left and right channel
+*
+**********************************************************************************/

+void CalcBandEnergy(const Word32 *mdctSpectrum,
+                    const Word16 *bandOffset,
+                    const Word16  numBands,
+                    Word32       *bandEnergy,
+                    Word32       *bandEnergySum)
+{
+  Word32 i, j;
+  Word32 accuSum = 0;                                            
+
+  for (i=0; i<numBands; i++) {
+    Word32 accu = 0;                                             
+    for (j=bandOffset[i]; j<bandOffset[i+1]; j++)
+      accu = L_add(accu, MULHIGH(mdctSpectrum[j], mdctSpectrum[j]));

+

+	accu = L_add(accu, accu);
+    accuSum = L_add(accuSum, accu);
+    bandEnergy[i] = accu;                                        
+  }
+  *bandEnergySum = accuSum;                                      
+}
+
+/********************************************************************************
+*
+* function name: CalcBandEnergyMS
+* description:   Calc sfb-bandwise mdct-energies for left add or minus right channel
+*
+**********************************************************************************/
+void CalcBandEnergyMS(const Word32 *mdctSpectrumLeft,
+                      const Word32 *mdctSpectrumRight,
+                      const Word16 *bandOffset,
+                      const Word16  numBands,
+                      Word32       *bandEnergyMid,
+                      Word32       *bandEnergyMidSum,
+                      Word32       *bandEnergySide,
+                      Word32       *bandEnergySideSum)
+{
+
+  Word32 i, j;
+  Word32 accuMidSum = 0;        
+  Word32 accuSideSum = 0;                                          
+ 
+
+  for(i=0; i<numBands; i++) {
+    Word32 accuMid = 0;
+    Word32 accuSide = 0;                                           
+    for (j=bandOffset[i]; j<bandOffset[i+1]; j++) {
+      Word32 specm, specs; 
+      Word32 l, r;
+
+      l = mdctSpectrumLeft[j] >> 1;
+      r = mdctSpectrumRight[j] >> 1;
+      specm = l + r;
+      specs = l - r;
+      accuMid = L_add(accuMid, MULHIGH(specm, specm));
+      accuSide = L_add(accuSide, MULHIGH(specs, specs));
+    }
+    

+	accuMid = L_add(accuMid, accuMid);

+	accuSide = L_add(accuSide, accuSide);

+	bandEnergyMid[i] = accuMid;                                  
+    accuMidSum = L_add(accuMidSum, accuMid);
+    bandEnergySide[i] = accuSide;                                
+    accuSideSum = L_add(accuSideSum, accuSide);
+    
+  }
+  *bandEnergyMidSum = accuMidSum;                                
+  *bandEnergySideSum = accuSideSum;                              
+}
+
+#endif
\ No newline at end of file
diff --git a/media/libstagefright/codecs/aacenc/src/bit_cnt.c b/media/libstagefright/codecs/aacenc/src/bit_cnt.c
new file mode 100644
index 0000000..24837e8
--- /dev/null
+++ b/media/libstagefright/codecs/aacenc/src/bit_cnt.c
@@ -0,0 +1,885 @@
+/*

+ ** Copyright 2003-2010, VisualOn, Inc.

+ **

+ ** Licensed under the Apache License, Version 2.0 (the "License");

+ ** you may not use this file except in compliance with the License.

+ ** You may obtain a copy of the License at

+ **

+ **     http://www.apache.org/licenses/LICENSE-2.0

+ **

+ ** Unless required by applicable law or agreed to in writing, software

+ ** distributed under the License is distributed on an "AS IS" BASIS,

+ ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

+ ** See the License for the specific language governing permissions and

+ ** limitations under the License.

+ */

+/*******************************************************************************

+	File:		bit_cnt.c

+

+	Content:	Huffman Bitcounter & coder functions

+

+*******************************************************************************/
+
+#include "bit_cnt.h"
+#include "aac_rom.h"
+
+#define HI_LTAB(a) (a>>8)
+#define LO_LTAB(a) (a & 0xff)
+
+#define EXPAND(a)  ((((Word32)(a&0xff00)) << 8)|(Word32)(a&0xff)) 
+
+
+/*****************************************************************************
+*
+* function name: count1_2_3_4_5_6_7_8_9_10_11
+* description:  counts tables 1-11 
+* returns:      
+* input:        quantized spectrum
+* output:       bitCount for tables 1-11
+*
+*****************************************************************************/
+
+static void count1_2_3_4_5_6_7_8_9_10_11(const Word16 *values,
+                                         const Word16  width,
+                                         Word16       *bitCount)
+{
+  Word32 t0,t1,t2,t3,i;
+  Word32 bc1_2,bc3_4,bc5_6,bc7_8,bc9_10;
+  Word16 bc11,sc;

+  
+  bc1_2=0;                               
+  bc3_4=0;                               
+  bc5_6=0;                               
+  bc7_8=0;                               
+  bc9_10=0;                              
+  bc11=0;                                
+  sc=0;                                  
+
+  for(i=0;i<width;i+=4){
+    
+    t0= values[i+0];                     
+    t1= values[i+1];                     
+    t2= values[i+2];                     
+    t3= values[i+3];                     
+  
+    /* 1,2 */
+
+    bc1_2 = bc1_2 + EXPAND(huff_ltab1_2[t0+1][t1+1][t2+1][t3+1]);              
+
+    /* 5,6 */
+    bc5_6 = bc5_6 + EXPAND(huff_ltab5_6[t0+4][t1+4]);                          
+    bc5_6 = bc5_6 + EXPAND(huff_ltab5_6[t2+4][t3+4]);                          
+
+    t0=ABS(t0);
+    t1=ABS(t1);
+    t2=ABS(t2);
+    t3=ABS(t3);
+
+    
+    bc3_4 = bc3_4 + EXPAND(huff_ltab3_4[t0][t1][t2][t3]);                      
+    
+    bc7_8 = bc7_8 + EXPAND(huff_ltab7_8[t0][t1]);                              
+    bc7_8 = bc7_8 + EXPAND(huff_ltab7_8[t2][t3]);                              
+    
+    bc9_10 = bc9_10 + EXPAND(huff_ltab9_10[t0][t1]);                           
+    bc9_10 = bc9_10 + EXPAND(huff_ltab9_10[t2][t3]);                           
+    
+    bc11 = bc11 + huff_ltab11[t0][t1];
+    bc11 = bc11 + huff_ltab11[t2][t3];
+   
+           
+    sc = sc + (t0>0) + (t1>0) + (t2>0) + (t3>0);
+  }
+  
+  bitCount[1]=extract_h(bc1_2);
+  bitCount[2]=extract_l(bc1_2);
+  bitCount[3]=extract_h(bc3_4) + sc;
+  bitCount[4]=extract_l(bc3_4) + sc;
+  bitCount[5]=extract_h(bc5_6);
+  bitCount[6]=extract_l(bc5_6);
+  bitCount[7]=extract_h(bc7_8) + sc;
+  bitCount[8]=extract_l(bc7_8) + sc;
+  bitCount[9]=extract_h(bc9_10) + sc;
+  bitCount[10]=extract_l(bc9_10) + sc;
+  bitCount[11]=bc11 + sc;
+}
+
+
+/*****************************************************************************
+*
+* function name: count3_4_5_6_7_8_9_10_11
+* description:  counts tables 3-11 
+* returns:      
+* input:        quantized spectrum
+* output:       bitCount for tables 3-11
+*
+*****************************************************************************/
+
+static void count3_4_5_6_7_8_9_10_11(const Word16 *values,
+                                     const Word16  width,
+                                     Word16       *bitCount)
+{
+  Word32 t0,t1,t2,t3, i;
+  Word32 bc3_4,bc5_6,bc7_8,bc9_10;
+  Word16 bc11,sc;
+    
+  bc3_4=0;                               
+  bc5_6=0;                               
+  bc7_8=0;                               
+  bc9_10=0;                              
+  bc11=0;                                
+  sc=0;                                  
+
+  for(i=0;i<width;i+=4){
+
+    t0= values[i+0];                     
+    t1= values[i+1];                     
+    t2= values[i+2];                     
+    t3= values[i+3];                     
+    
+    /*
+      5,6
+    */
+    bc5_6 = bc5_6 + EXPAND(huff_ltab5_6[t0+4][t1+4]);                          
+    bc5_6 = bc5_6 + EXPAND(huff_ltab5_6[t2+4][t3+4]);                          
+
+    t0=ABS(t0);
+    t1=ABS(t1);
+    t2=ABS(t2);
+    t3=ABS(t3);
+
+
+    bc3_4 = bc3_4 + EXPAND(huff_ltab3_4[t0][t1][t2][t3]);                      
+                                                                                                                
+    bc7_8 = bc7_8 + EXPAND(huff_ltab7_8[t0][t1]);                              
+    bc7_8 = bc7_8 + EXPAND(huff_ltab7_8[t2][t3]);                              
+    
+    bc9_10 = bc9_10 + EXPAND(huff_ltab9_10[t0][t1]);                           
+    bc9_10 = bc9_10 + EXPAND(huff_ltab9_10[t2][t3]);                           
+                                                                                                                
+    bc11 = bc11 + huff_ltab11[t0][t1];
+    bc11 = bc11 + huff_ltab11[t2][t3];
+
+           
+    sc = sc + (t0>0) + (t1>0) + (t2>0) + (t3>0);   
+  }

+  
+  bitCount[1]=INVALID_BITCOUNT;                          
+  bitCount[2]=INVALID_BITCOUNT;                          
+  bitCount[3]=extract_h(bc3_4) + sc;
+  bitCount[4]=extract_l(bc3_4) + sc;
+  bitCount[5]=extract_h(bc5_6);
+  bitCount[6]=extract_l(bc5_6);
+  bitCount[7]=extract_h(bc7_8) + sc;
+  bitCount[8]=extract_l(bc7_8) + sc;
+  bitCount[9]=extract_h(bc9_10) + sc;
+  bitCount[10]=extract_l(bc9_10) + sc;
+  bitCount[11]=bc11 + sc;
+  
+}
+
+
+
+/*****************************************************************************
+*
+* function name: count5_6_7_8_9_10_11
+* description:  counts tables 5-11 
+* returns:      
+* input:        quantized spectrum
+* output:       bitCount for tables 5-11
+*
+*****************************************************************************/
+static void count5_6_7_8_9_10_11(const Word16 *values,
+                                 const Word16  width,
+                                 Word16       *bitCount)
+{
+
+  Word32 t0,t1,i;
+  Word32 bc5_6,bc7_8,bc9_10;
+  Word16 bc11,sc;

+
+  bc5_6=0;                               
+  bc7_8=0;                               
+  bc9_10=0;                              
+  bc11=0;                                
+  sc=0;                                  
+
+  for(i=0;i<width;i+=2){
+
+    t0 = values[i+0];                    
+    t1 = values[i+1];                    
+
+    bc5_6 = bc5_6 + EXPAND(huff_ltab5_6[t0+4][t1+4]);                  
+
+    t0=ABS(t0);
+    t1=ABS(t1);
+     
+    bc7_8 = bc7_8 + EXPAND(huff_ltab7_8[t0][t1]);                      
+    bc9_10 = bc9_10 + EXPAND(huff_ltab9_10[t0][t1]);                   
+    bc11 = bc11 + huff_ltab11[t0][t1];
+    
+       
+    sc = sc + (t0>0) + (t1>0);
+  }
+  bitCount[1]=INVALID_BITCOUNT;                          
+  bitCount[2]=INVALID_BITCOUNT;                          
+  bitCount[3]=INVALID_BITCOUNT;                          
+  bitCount[4]=INVALID_BITCOUNT;                          
+  bitCount[5]=extract_h(bc5_6);
+  bitCount[6]=extract_l(bc5_6);
+  bitCount[7]=extract_h(bc7_8) + sc;
+  bitCount[8]=extract_l(bc7_8) + sc;
+  bitCount[9]=extract_h(bc9_10) + sc;
+  bitCount[10]=extract_l(bc9_10) + sc;
+  bitCount[11]=bc11 + sc;
+  
+}
+
+
+/*****************************************************************************
+*
+* function name: count7_8_9_10_11
+* description:  counts tables 7-11 
+* returns:      
+* input:        quantized spectrum
+* output:       bitCount for tables 7-11
+*
+*****************************************************************************/
+
+static void count7_8_9_10_11(const Word16 *values,
+                             const Word16  width,
+                             Word16       *bitCount)
+{
+  Word32 t0,t1, i;
+  Word32 bc7_8,bc9_10;
+  Word16 bc11,sc;
+    
+  bc7_8=0;                       
+  bc9_10=0;                      
+  bc11=0;                        
+  sc=0;                          
+
+  for(i=0;i<width;i+=2){
+
+    t0=ABS(values[i+0]);
+    t1=ABS(values[i+1]);
+
+    bc7_8 = bc7_8 + EXPAND(huff_ltab7_8[t0][t1]);                      
+    bc9_10 = bc9_10 + EXPAND(huff_ltab9_10[t0][t1]);                   
+    bc11 = bc11 + huff_ltab11[t0][t1];
+   
+       
+    sc = sc + (t0>0) + (t1>0);
+  }
+  bitCount[1]=INVALID_BITCOUNT;                  
+  bitCount[2]=INVALID_BITCOUNT;                  
+  bitCount[3]=INVALID_BITCOUNT;                  
+  bitCount[4]=INVALID_BITCOUNT;                  
+  bitCount[5]=INVALID_BITCOUNT;                  
+  bitCount[6]=INVALID_BITCOUNT;                  
+  bitCount[7]=extract_h(bc7_8) + sc;
+  bitCount[8]=extract_l(bc7_8) + sc;
+  bitCount[9]=extract_h(bc9_10) + sc;
+  bitCount[10]=extract_l(bc9_10) + sc;
+  bitCount[11]=bc11 + sc;
+  
+}
+
+/*****************************************************************************
+*
+* function name: count9_10_11
+* description:  counts tables 9-11 
+* returns:      
+* input:        quantized spectrum
+* output:       bitCount for tables 9-11
+*
+*****************************************************************************/
+static void count9_10_11(const Word16 *values,

+                         const Word16  width,

+                         Word16       *bitCount)

+{

+

+  Word32 t0,t1,i;  

+  Word32 bc9_10;

+  Word16 bc11,sc;

+

+  bc9_10=0;                              

+  bc11=0;                                

+  sc=0;                                  

+

+  for(i=0;i<width;i+=2){

+

+    t0=ABS(values[i+0]);

+    t1=ABS(values[i+1]);

+    

+

+    bc9_10 += EXPAND(huff_ltab9_10[t0][t1]);           

+    bc11 = bc11 + huff_ltab11[t0][t1];

+

+       

+    sc = sc + (t0>0) + (t1>0);

+  }

+  bitCount[1]=INVALID_BITCOUNT;          

+  bitCount[2]=INVALID_BITCOUNT;          

+  bitCount[3]=INVALID_BITCOUNT;          

+  bitCount[4]=INVALID_BITCOUNT;          

+  bitCount[5]=INVALID_BITCOUNT;          

+  bitCount[6]=INVALID_BITCOUNT;          

+  bitCount[7]=INVALID_BITCOUNT;          

+  bitCount[8]=INVALID_BITCOUNT;          

+  bitCount[9]=extract_h(bc9_10) + sc;

+  bitCount[10]=extract_l(bc9_10) + sc;

+  bitCount[11]=bc11 + sc;

+  

+}
+ 
+/*****************************************************************************
+*
+* function name: count11
+* description:  counts table 11 
+* returns:      
+* input:        quantized spectrum
+* output:       bitCount for table 11
+*
+*****************************************************************************/
+ static void count11(const Word16 *values,

+                    const Word16  width,

+                    Word16        *bitCount)

+{

+  Word32 t0,t1,i;

+  Word16 bc11,sc;  

+

+  bc11=0;                        

+  sc=0;                          

+  for(i=0;i<width;i+=2){

+    t0=ABS(values[i+0]);

+    t1=ABS(values[i+1]);

+    bc11 = bc11 + huff_ltab11[t0][t1];

+

+       

+    sc = sc + (t0>0) + (t1>0);

+  }

+

+  bitCount[1]=INVALID_BITCOUNT;                  

+  bitCount[2]=INVALID_BITCOUNT;                  

+  bitCount[3]=INVALID_BITCOUNT;                  

+  bitCount[4]=INVALID_BITCOUNT;                  

+  bitCount[5]=INVALID_BITCOUNT;                  

+  bitCount[6]=INVALID_BITCOUNT;                  

+  bitCount[7]=INVALID_BITCOUNT;                  

+  bitCount[8]=INVALID_BITCOUNT;                  

+  bitCount[9]=INVALID_BITCOUNT;                  

+  bitCount[10]=INVALID_BITCOUNT;                 

+  bitCount[11]=bc11 + sc;

+}
+
+/*****************************************************************************
+*
+* function name: countEsc
+* description:  counts table 11 (with Esc) 
+* returns:      
+* input:        quantized spectrum
+* output:       bitCount for tables 11 (with Esc)
+*
+*****************************************************************************/
+
+static void countEsc(const Word16 *values,

+                     const Word16  width,

+                     Word16       *bitCount)

+{

+  Word32 t0,t1,t00,t01,i;

+  Word16 bc11,ec,sc;  

+

+  bc11=0;                                

+  sc=0;                                  

+  ec=0;                                  

+  for(i=0;i<width;i+=2){

+    t0=ABS(values[i+0]);

+    t1=ABS(values[i+1]);

+    

+       

+    sc = sc + (t0>0) + (t1>0);

+

+    t00 = min(t0,16);

+    t01 = min(t1,16);

+    bc11 = bc11 + huff_ltab11[t00][t01];

+    

+     

+    if(t0 >= 16){

+      ec = ec + 5;

+      while(sub(t0=(t0 >> 1), 16) >= 0) {

+        ec = ec + 2;

+      }

+    }

+    

+     

+    if(t1 >= 16){

+      ec = ec + 5;

+      while(sub(t1=(t1 >> 1), 16) >= 0) {

+        ec = ec + 2;

+      }

+    }

+  }

+  bitCount[1]=INVALID_BITCOUNT;          

+  bitCount[2]=INVALID_BITCOUNT;          

+  bitCount[3]=INVALID_BITCOUNT;          

+  bitCount[4]=INVALID_BITCOUNT;          

+  bitCount[5]=INVALID_BITCOUNT;          

+  bitCount[6]=INVALID_BITCOUNT;          

+  bitCount[7]=INVALID_BITCOUNT;          

+  bitCount[8]=INVALID_BITCOUNT;          

+  bitCount[9]=INVALID_BITCOUNT;          

+  bitCount[10]=INVALID_BITCOUNT;         

+  bitCount[11]=bc11 + sc + ec;

+}
+
+
+typedef void (*COUNT_FUNCTION)(const Word16 *values,
+                               const Word16  width,
+                               Word16       *bitCount);
+
+static COUNT_FUNCTION countFuncTable[CODE_BOOK_ESC_LAV+1] =
+  {
+
+    count1_2_3_4_5_6_7_8_9_10_11,  /* 0  */
+    count1_2_3_4_5_6_7_8_9_10_11,  /* 1  */
+    count3_4_5_6_7_8_9_10_11,      /* 2  */
+    count5_6_7_8_9_10_11,          /* 3  */
+    count5_6_7_8_9_10_11,          /* 4  */
+    count7_8_9_10_11,              /* 5  */
+    count7_8_9_10_11,              /* 6  */
+    count7_8_9_10_11,              /* 7  */
+    count9_10_11,                  /* 8  */
+    count9_10_11,                  /* 9  */
+    count9_10_11,                  /* 10 */
+    count9_10_11,                  /* 11 */
+    count9_10_11,                  /* 12 */
+    count11,                       /* 13 */
+    count11,                       /* 14 */
+    count11,                       /* 15 */
+    countEsc                       /* 16 */
+  };
+
+/*****************************************************************************
+*
+* function name: bitCount
+* description:  count bits 
+*
+*****************************************************************************/
+Word16 bitCount(const Word16 *values,
+                const Word16  width,
+                Word16        maxVal,
+                Word16       *bitCount)
+{
+  /*
+    check if we can use codebook 0
+  */
+     
+  if(maxVal == 0)
+    bitCount[0] = 0;
+  else
+    bitCount[0] = INVALID_BITCOUNT;
+
+  maxVal = min(maxVal, CODE_BOOK_ESC_LAV);
+  countFuncTable[maxVal](values,width,bitCount);
+
+  return(0);
+}
+
+/*****************************************************************************
+*
+* function name: codeValues
+* description:  write huffum bits 
+*
+*****************************************************************************/
+Word16 codeValues(Word16 *values, Word16 width, Word16 codeBook, HANDLE_BIT_BUF hBitstream)

+{

+

+  Word32 i, t0, t1, t2, t3, t00, t01;

+  Word16 codeWord, codeLength;

+  Word16 sign, signLength;

+

+   

+  switch (codeBook) {

+    case CODE_BOOK_ZERO_NO:

+      break;

+

+    case CODE_BOOK_1_NO:

+      for(i=0; i<width; i+=4) {

+        t0         = values[i+0];                                        

+        t1         = values[i+1];                                        

+        t2         = values[i+2];                                        

+        t3         = values[i+3];                                        

+        codeWord   = huff_ctab1[t0+1][t1+1][t2+1][t3+1];                 

+        codeLength = HI_LTAB(huff_ltab1_2[t0+1][t1+1][t2+1][t3+1]);      

+        WriteBits(hBitstream, codeWord, codeLength);        

+      }

+      break;

+

+    case CODE_BOOK_2_NO:

+      for(i=0; i<width; i+=4) {

+        t0         = values[i+0];                                        

+        t1         = values[i+1];                                        

+        t2         = values[i+2];                                        

+        t3         = values[i+3];                                        

+        codeWord   = huff_ctab2[t0+1][t1+1][t2+1][t3+1];                 

+        codeLength = LO_LTAB(huff_ltab1_2[t0+1][t1+1][t2+1][t3+1]);      

+        WriteBits(hBitstream,codeWord,codeLength);

+      }

+      break;

+

+    case CODE_BOOK_3_NO:

+      for(i=0; i<width; i+=4) {

+        sign=0;                                                          

+        signLength=0;                                                    

+        t0 = values[i+0];                                                

+         

+        if(t0 != 0){

+          signLength = signLength + 1;

+          sign = sign << 1; 

+           

+          if(t0 < 0){

+            sign|=1;                                                     

+            t0=-t0;

+          }

+        }

+        t1 = values[i+1];                                                

+         

+        if(t1 != 0){

+          signLength = signLength + 1;

+          sign = sign << 1; 

+           

+          if(t1 < 0){

+            sign|=1;                                                     

+            t1=-t1;

+          }

+        }

+        t2 = values[i+2];                                                

+         

+        if(t2 != 0){

+          signLength = signLength + 1;

+          sign = sign << 1; 

+           

+          if(t2 < 0){

+            sign|=1;                                                     

+            t2=-t2;

+          }

+        }

+        t3 = values[i+3];                                                

+        if(t3 != 0){

+          signLength = signLength + 1;

+          sign = sign << 1; 

+           

+          if(t3 < 0){

+            sign|=1;                                                     

+            t3=-t3;

+          }

+        }

+

+        codeWord   = huff_ctab3[t0][t1][t2][t3];                         

+        codeLength = HI_LTAB(huff_ltab3_4[t0][t1][t2][t3]);              

+        WriteBits(hBitstream,codeWord,codeLength);

+        WriteBits(hBitstream,sign,signLength);

+      }

+      break;

+

+    case CODE_BOOK_4_NO:

+      for(i=0; i<width; i+=4) {

+        sign=0;                                                          

+        signLength=0;                                                    

+        t0 = values[i+0];                                                

+         

+        if(t0 != 0){                                                             

+          signLength = signLength + 1;

+          sign = sign << 1; 

+          if(t0 < 0){                                                            

+            sign|=1;                                                     

+            t0=-t0;                                                          

+          }

+        }                                                                        

+        t1 = values[i+1];                                                

+         

+        if(t1 != 0){                                                             

+          signLength = signLength + 1;

+          sign = sign << 1; 

+           

+          if(t1 < 0){                                                            

+            sign|=1;                                                     

+            t1=-t1;                                                          

+          }                                                                      

+        }                                                                        

+        t2 = values[i+2];                                                

+         

+        if(t2 != 0){                                                    

+          signLength = signLength + 1;

+          sign = sign << 1; 

+           

+          if(t2 < 0){                                                   

+            sign|=1;                                                     

+            t2=-t2;                                                 

+          }                                                             

+        }                                                               

+        t3 = values[i+3];                                                

+         

+        if(t3 != 0){                                                    

+          signLength = signLength + 1;

+          sign = sign << 1; 

+           

+          if(t3 < 0){                                                   

+            sign|=1;                                                     

+            t3=-t3;                                                 

+          }                                                             

+        }                                                               

+        codeWord   = huff_ctab4[t0][t1][t2][t3];                         

+        codeLength = LO_LTAB(huff_ltab3_4[t0][t1][t2][t3]);              

+        WriteBits(hBitstream,codeWord,codeLength);                      

+        WriteBits(hBitstream,sign,signLength);                          

+      }                                                                 

+      break;                                                            

+                                                                        

+    case CODE_BOOK_5_NO:                                                

+      for(i=0; i<width; i+=2) {                                         

+        t0         = values[i+0];                                         

+        t1         = values[i+1];                                        

+        codeWord   = huff_ctab5[t0+4][t1+4];                             

+        codeLength = HI_LTAB(huff_ltab5_6[t0+4][t1+4]);                  

+        WriteBits(hBitstream,codeWord,codeLength);

+      }

+      break;

+

+    case CODE_BOOK_6_NO:

+      for(i=0; i<width; i+=2) {

+        t0         = values[i+0];                                        

+        t1         = values[i+1];                                        

+        codeWord   = huff_ctab6[t0+4][t1+4];                             

+        codeLength = LO_LTAB(huff_ltab5_6[t0+4][t1+4]);                  

+        WriteBits(hBitstream,codeWord,codeLength);

+      }

+      break;

+

+    case CODE_BOOK_7_NO:

+      for(i=0; i<width; i+=2){

+        sign=0;                                                          

+        signLength=0;                                                    

+        t0 = values[i+0];                                                

+         

+        if(t0 != 0){

+          signLength = signLength + 1;

+          sign = sign << 1; 

+           

+          if(t0 < 0){

+            sign|=1;                                                     

+            t0=-t0;

+          }

+        }

+

+        t1 = values[i+1];                                                

+         

+        if(t1 != 0){

+          signLength = signLength + 1;

+          sign = sign << 1; 

+           

+          if(t1 < 0){

+            sign|=1;                                                     

+            t1=-t1;

+          }

+        }

+        codeWord   = huff_ctab7[t0][t1];                                 

+        codeLength = HI_LTAB(huff_ltab7_8[t0][t1]);                      

+        WriteBits(hBitstream,codeWord,codeLength);

+        WriteBits(hBitstream,sign,signLength);

+      }

+      break;

+

+    case CODE_BOOK_8_NO:

+      for(i=0; i<width; i+=2) {

+        sign=0;                                                          

+        signLength=0;                                                    

+        t0 = values[i+0];                                                

+                                                                           

+        if(t0 != 0){                                                             

+          signLength = signLength + 1;                                       

+          sign = sign << 1;                                                   

+                                                                           

+          if(t0 < 0){                                                            

+            sign|=1;                                                     

+            t0=-t0;                                                        

+          }                                                                      

+        }                                                                        

+                                                                                 

+        t1 = values[i+1];                                                

+                                                                           

+        if(t1 != 0){                                                             

+          signLength = signLength + 1;                                       

+          sign = sign << 1;                                                   

+                                                                           

+          if(t1 < 0){                                                            

+            sign|=1;                                                     

+            t1=-t1;                                                        

+          }                                                                      

+        }                                                                        

+        codeWord   = huff_ctab8[t0][t1];                                 

+        codeLength = LO_LTAB(huff_ltab7_8[t0][t1]);                      

+        WriteBits(hBitstream,codeWord,codeLength);

+        WriteBits(hBitstream,sign,signLength);

+      }

+      break;

+

+    case CODE_BOOK_9_NO:

+      for(i=0; i<width; i+=2) {

+        sign=0;                                                          

+        signLength=0;                                                    

+        t0 = values[i+0];                                                

+                                                                           

+        if(t0 != 0){                                                             

+          signLength = signLength + 1;                                       

+          sign = sign << 1;                                                   

+                                                                           

+          if(t0 < 0){                                                            

+            sign|=1;                                                     

+            t0=-t0;                                                        

+          }                                                                      

+        }                                                                        

+                                                                                 

+        t1 = values[i+1];                                                

+                                                                           

+        if(t1 != 0){                                                             

+          signLength = signLength + 1;                                       

+          sign = sign << 1;                                                   

+                                                                           

+          if(t1 < 0){                                                            

+            sign|=1;                                                     

+            t1=-t1;                                                        

+          }                                                                      

+        }                                                                        

+        codeWord   = huff_ctab9[t0][t1];                                 

+        codeLength = HI_LTAB(huff_ltab9_10[t0][t1]);                     

+        WriteBits(hBitstream,codeWord,codeLength);

+        WriteBits(hBitstream,sign,signLength);

+      }

+      break;

+

+    case CODE_BOOK_10_NO:

+      for(i=0; i<width; i+=2) {

+        sign=0;                                                          

+        signLength=0;                                                    

+        t0 = values[i+0];                                                

+                                                                           

+        if(t0 != 0){                                                             

+          signLength = signLength + 1;                                       

+          sign = sign << 1;                                                   

+                                                                           

+          if(t0 < 0){                                                            

+            sign|=1;                                                     

+            t0=-t0;                                                        

+          }                                                                      

+        }                                                                        

+                                                                                 

+        t1 = values[i+1];                                                

+                                                                           

+        if(t1 != 0){                                                             

+          signLength = signLength + 1;                                       

+          sign = sign << 1;                                                   

+                                                                           

+          if(t1 < 0){                                                            

+            sign|=1;                                                     

+            t1=-t1;                                                        

+          }                                                                      

+        }                                                                        

+        codeWord   = huff_ctab10[t0][t1];                                

+        codeLength = LO_LTAB(huff_ltab9_10[t0][t1]);                     

+        WriteBits(hBitstream,codeWord,codeLength);

+        WriteBits(hBitstream,sign,signLength);

+      }

+      break;

+

+    case CODE_BOOK_ESC_NO:

+      for(i=0; i<width; i+=2) {

+        sign=0;                                                  

+        signLength=0;                                            

+        t0 = values[i+0];                                        

+                                                                   

+        if(t0 != 0){                                                     

+          signLength = signLength + 1;                               

+          sign = sign << 1;                                           

+                                                                   

+          if(t0 < 0){                                                    

+            sign|=1;                                             

+            t0=-t0;                                                

+          }                                                              

+        }                                                                

+                                                                         

+        t1 = values[i+1];                                        

+                                                                   

+        if(t1 != 0){                                                     

+          signLength = signLength + 1;                               

+          sign = sign << 1;                                           

+                                                                   

+          if(t1 < 0){                                                    

+            sign|=1;                                             

+            t1=-t1;                                                

+          }                                                              

+        }                                                                

+        t00 = min(t0,16);

+        t01 = min(t1,16);

+

+        codeWord   = huff_ctab11[t00][t01];                      

+        codeLength = huff_ltab11[t00][t01];                      

+        WriteBits(hBitstream,codeWord,codeLength);

+        WriteBits(hBitstream,sign,signLength);

+         

+        if(t0 >= 16){

+          Word16 n, p;

+          n=0;                                                   

+          p=t0;                                                  

+          while(sub(p=(p >> 1), 16) >= 0){

+             

+            WriteBits(hBitstream,1,1);

+            n = n + 1;

+          }

+          WriteBits(hBitstream,0,1);

+          n = n + 4;

+          WriteBits(hBitstream,(t0 - (1 << n)),n);

+        }

+         

+        if(t1 >= 16){

+          Word16 n, p;

+          n=0;                                                   

+          p=t1;                                                  

+          while(sub(p=(p >> 1), 16) >= 0){

+             

+            WriteBits(hBitstream,1,1);

+            n = n + 1;

+          }

+          WriteBits(hBitstream,0,1);

+          n = n + 4;

+          WriteBits(hBitstream,(t1 - (1 << n)),n);

+        }

+      }

+      break;

+

+    default:

+      break;

+  }

+  return(0);

+}
+
+Word16 bitCountScalefactorDelta(Word16 delta)
+{
+  return(huff_ltabscf[delta+CODE_BOOK_SCF_LAV]);
+}
+
+Word16 codeScalefactorDelta(Word16 delta, HANDLE_BIT_BUF hBitstream)
+{
+  Word32 codeWord; 
+  Word16 codeLength;
+  
+   
+  if(delta > CODE_BOOK_SCF_LAV || delta < -CODE_BOOK_SCF_LAV)
+    return(1);
+  
+  codeWord   = huff_ctabscf[delta + CODE_BOOK_SCF_LAV];            
+  codeLength = huff_ltabscf[delta + CODE_BOOK_SCF_LAV];            
+  WriteBits(hBitstream,codeWord,codeLength);
+  return(0);
+}
diff --git a/media/libstagefright/codecs/aacenc/src/bitbuffer.c b/media/libstagefright/codecs/aacenc/src/bitbuffer.c
new file mode 100644
index 0000000..3248f0b
--- /dev/null
+++ b/media/libstagefright/codecs/aacenc/src/bitbuffer.c
@@ -0,0 +1,172 @@
+/*

+ ** Copyright 2003-2010, VisualOn, Inc.

+ **

+ ** Licensed under the Apache License, Version 2.0 (the "License");

+ ** you may not use this file except in compliance with the License.

+ ** You may obtain a copy of the License at

+ **

+ **     http://www.apache.org/licenses/LICENSE-2.0

+ **

+ ** Unless required by applicable law or agreed to in writing, software

+ ** distributed under the License is distributed on an "AS IS" BASIS,

+ ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

+ ** See the License for the specific language governing permissions and

+ ** limitations under the License.

+ */

+/*******************************************************************************

+	File:		bitbuffer.c

+

+	Content:	Bit Buffer Management functions

+

+*******************************************************************************/
+
+#include "bitbuffer.h"
+
+/*****************************************************************************
+*
+* function name: updateBitBufWordPtr
+* description:  update Bit Buffer pointer
+*
+*****************************************************************************/
+static void updateBitBufWordPtr(HANDLE_BIT_BUF hBitBuf,
+                                UWord8 **pBitBufWord,
+                                Word16   cnt)
+{
+  *pBitBufWord += cnt;                                                                  
+
+                                                                                        
+  if(*pBitBufWord > hBitBuf->pBitBufEnd) {
+    *pBitBufWord -= (hBitBuf->pBitBufEnd - hBitBuf->pBitBufBase + 1);                   
+  }
+                                                                                        
+  if(*pBitBufWord < hBitBuf->pBitBufBase) {
+    *pBitBufWord += (hBitBuf->pBitBufEnd - hBitBuf->pBitBufBase + 1);                   
+  }
+}
+
+
+/*****************************************************************************
+*
+* function name: CreateBitBuffer
+* description:  create and init Bit Buffer Management
+*
+*****************************************************************************/
+HANDLE_BIT_BUF CreateBitBuffer(HANDLE_BIT_BUF hBitBuf,
+                               UWord8 *pBitBufBase,
+                               Word16  bitBufSize)
+{
+  assert(bitBufSize*8 <= 32768);
+
+  hBitBuf->pBitBufBase = pBitBufBase;                                                    
+  hBitBuf->pBitBufEnd  = pBitBufBase + bitBufSize - 1;                                  
+
+  hBitBuf->pWriteNext  = pBitBufBase;                                                    
+
+  hBitBuf->cache       = 0;
+  
+  hBitBuf->wBitPos     = 0;                                                              
+  hBitBuf->cntBits     = 0;   
+  
+  hBitBuf->size        = (bitBufSize << 3);                                             
+  hBitBuf->isValid     = 1;                                                              
+
+  return hBitBuf;
+}
+
+/*****************************************************************************
+*
+* function name: DeleteBitBuffer
+* description:  uninit Bit Buffer Management
+*
+*****************************************************************************/
+void DeleteBitBuffer(HANDLE_BIT_BUF *hBitBuf)
+{
+  if(*hBitBuf)

+	(*hBitBuf)->isValid = 0;                                                               
+  *hBitBuf = NULL;                                                                       
+}
+
+/*****************************************************************************
+*
+* function name: ResetBitBuf
+* description:  reset Bit Buffer Management
+*
+*****************************************************************************/
+void ResetBitBuf(HANDLE_BIT_BUF hBitBuf,
+                 UWord8 *pBitBufBase,
+                 Word16  bitBufSize)
+{
+  hBitBuf->pBitBufBase = pBitBufBase;                                                    
+  hBitBuf->pBitBufEnd  = pBitBufBase + bitBufSize - 1;                                  
+
+                                                 
+  hBitBuf->pWriteNext  = pBitBufBase;                                                    
+
+  hBitBuf->wBitPos     = 0;    
+  hBitBuf->cntBits     = 0;    
+  
+  hBitBuf->cache	   = 0;
+}
+
+/*****************************************************************************
+*
+* function name: CopyBitBuf
+* description:  copy Bit Buffer Management
+*
+*****************************************************************************/
+void CopyBitBuf(HANDLE_BIT_BUF hBitBufSrc,
+                HANDLE_BIT_BUF hBitBufDst)
+{
+  *hBitBufDst = *hBitBufSrc;                                                             
+}
+
+/*****************************************************************************
+*
+* function name: GetBitsAvail
+* description:  get available bits
+*
+*****************************************************************************/
+Word16 GetBitsAvail(HANDLE_BIT_BUF hBitBuf)
+{
+  return hBitBuf->cntBits;
+}
+
+/*****************************************************************************
+*
+* function name: WriteBits
+* description:  write bits to the buffer
+*
+*****************************************************************************/
+Word16 WriteBits(HANDLE_BIT_BUF hBitBuf,
+                 Word32 writeValue,
+                 Word16 noBitsToWrite)
+{
+  Word16 wBitPos;
+
+  assert(noBitsToWrite <= (Word16)sizeof(Word32)*8);
+
+  if(noBitsToWrite == 0)
+	  return noBitsToWrite;
+
+  hBitBuf->cntBits += noBitsToWrite;   
+
+  wBitPos = hBitBuf->wBitPos;
+  wBitPos += noBitsToWrite;
+  writeValue <<= 32 - wBitPos;	
+  writeValue |= hBitBuf->cache;
+  
+  while (wBitPos >= 8) 
+  {
+	  UWord8 tmp;
+	  tmp = (UWord8)((writeValue >> 24) & 0xFF);
+	  
+	  *hBitBuf->pWriteNext++ = tmp;		
+	  writeValue <<= 8;
+	  wBitPos -= 8;
+  }
+  
+  hBitBuf->wBitPos = wBitPos;
+  hBitBuf->cache = writeValue;
+                                                                                     
+  return noBitsToWrite;
+}
diff --git a/media/libstagefright/codecs/aacenc/src/bitenc.c b/media/libstagefright/codecs/aacenc/src/bitenc.c
new file mode 100644
index 0000000..588c2da1
--- /dev/null
+++ b/media/libstagefright/codecs/aacenc/src/bitenc.c
@@ -0,0 +1,690 @@
+/*

+ ** Copyright 2003-2010, VisualOn, Inc.

+ **

+ ** Licensed under the Apache License, Version 2.0 (the "License");

+ ** you may not use this file except in compliance with the License.

+ ** You may obtain a copy of the License at

+ **

+ **     http://www.apache.org/licenses/LICENSE-2.0

+ **

+ ** Unless required by applicable law or agreed to in writing, software

+ ** distributed under the License is distributed on an "AS IS" BASIS,

+ ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

+ ** See the License for the specific language governing permissions and

+ ** limitations under the License.

+ */

+/*******************************************************************************

+	File:		bitenc.c

+

+	Content:	Bitstream encoder functions

+

+*******************************************************************************/
+
+#include "bitenc.h"
+#include "bit_cnt.h"
+#include "dyn_bits.h"
+#include "qc_data.h"
+#include "interface.h"
+
+
+static const  Word16 globalGainOffset = 100;
+static const  Word16 icsReservedBit   = 0;
+
+
+/*****************************************************************************
+*
+* function name: encodeSpectralData
+* description:  encode spectral data
+* returns:      spectral bits used
+*
+*****************************************************************************/
+static Word32 encodeSpectralData(Word16             *sfbOffset,
+                                 SECTION_DATA       *sectionData,
+                                 Word16             *quantSpectrum,
+                                 HANDLE_BIT_BUF      hBitStream)
+{
+  Word16 i,sfb;
+  Word16 dbgVal;
+  SECTION_INFO* psectioninfo;
+  dbgVal = GetBitsAvail(hBitStream);                                     
+
+  for(i=0; i<sectionData->noOfSections; i++) {
+    psectioninfo = &(sectionData->sectionInfo[i]);

+	/*
+       huffencode spectral data for this section
+    */
+    for(sfb=psectioninfo->sfbStart;
+        sfb<psectioninfo->sfbStart+psectioninfo->sfbCnt;
+        sfb++) {
+      codeValues(quantSpectrum+sfbOffset[sfb],
+                 sfbOffset[sfb+1] - sfbOffset[sfb],
+                 psectioninfo->codeBook,
+                 hBitStream);
+    }
+  }
+
+  return(GetBitsAvail(hBitStream)-dbgVal);
+}
+
+/*****************************************************************************
+*
+* function name:encodeGlobalGain
+* description: encodes Global Gain (common scale factor)
+* returns:     none
+*
+*****************************************************************************/
+static void encodeGlobalGain(Word16 globalGain,
+                             Word16 logNorm,
+                             Word16 scalefac,
+                             HANDLE_BIT_BUF hBitStream)
+{
+  WriteBits(hBitStream, ((globalGain - scalefac) + globalGainOffset-(logNorm << 2)), 8);
+}
+
+
+/*****************************************************************************
+*
+* function name:encodeIcsInfo
+* description: encodes Ics Info
+* returns:     none
+*
+*****************************************************************************/
+
+static void encodeIcsInfo(Word16 blockType,
+                          Word16 windowShape,
+                          Word16 groupingMask,
+                          SECTION_DATA *sectionData,
+                          HANDLE_BIT_BUF  hBitStream)
+{
+  WriteBits(hBitStream,icsReservedBit,1);
+  WriteBits(hBitStream,blockType,2);
+  WriteBits(hBitStream,windowShape,1);
+
+   
+  switch(blockType){
+    case LONG_WINDOW:
+    case START_WINDOW:
+    case STOP_WINDOW:
+      WriteBits(hBitStream,sectionData->maxSfbPerGroup,6);
+
+      /* No predictor data present */
+      WriteBits(hBitStream, 0, 1);
+      break;
+
+    case SHORT_WINDOW:
+      WriteBits(hBitStream,sectionData->maxSfbPerGroup,4);
+
+      /*
+      Write grouping bits
+      */
+      WriteBits(hBitStream,groupingMask,TRANS_FAC-1);
+      break;
+  }
+}
+
+/*****************************************************************************
+*
+* function name: encodeSectionData
+* description:  encode section data (common Huffman codebooks for adjacent
+*               SFB's)
+* returns:      none
+*
+*****************************************************************************/
+static Word32 encodeSectionData(SECTION_DATA *sectionData,
+                                HANDLE_BIT_BUF hBitStream)
+{
+  Word16 sectEscapeVal=0,sectLenBits=0;
+  Word16 sectLen;
+  Word16 i;
+  Word16 dbgVal=GetBitsAvail(hBitStream);
+       
+
+   
+  switch(sectionData->blockType)
+  {
+    case LONG_WINDOW:
+    case START_WINDOW:
+    case STOP_WINDOW:
+      sectEscapeVal = SECT_ESC_VAL_LONG;                 
+      sectLenBits   = SECT_BITS_LONG;                    
+      break;
+
+    case SHORT_WINDOW:
+      sectEscapeVal = SECT_ESC_VAL_SHORT;                
+      sectLenBits   = SECT_BITS_SHORT;                   
+      break;
+  }
+
+  for(i=0;i<sectionData->noOfSections;i++) {
+    WriteBits(hBitStream,sectionData->sectionInfo[i].codeBook,4);
+    sectLen = sectionData->sectionInfo[i].sfbCnt;        
+
+    while(sectLen >= sectEscapeVal) {
+       
+      WriteBits(hBitStream,sectEscapeVal,sectLenBits);
+      sectLen = sectLen - sectEscapeVal;
+    }
+    WriteBits(hBitStream,sectLen,sectLenBits);
+  }
+  return(GetBitsAvail(hBitStream)-dbgVal);
+}
+
+/*****************************************************************************
+*
+* function name: encodeScaleFactorData
+* description:  encode DPCM coded scale factors
+* returns:      none
+*
+*****************************************************************************/
+static Word32 encodeScaleFactorData(UWord16        *maxValueInSfb,
+                                    SECTION_DATA   *sectionData,
+                                    Word16         *scalefac,
+                                    HANDLE_BIT_BUF  hBitStream)
+{
+  Word16 i,j,lastValScf,deltaScf;
+  Word16 dbgVal = GetBitsAvail(hBitStream);
+  SECTION_INFO* psectioninfo; 
+
+  lastValScf=scalefac[sectionData->firstScf];                    
+
+  for(i=0;i<sectionData->noOfSections;i++){
+    psectioninfo = &(sectionData->sectionInfo[i]); 
+    if (psectioninfo->codeBook != CODE_BOOK_ZERO_NO){
+      for (j=psectioninfo->sfbStart;
+           j<psectioninfo->sfbStart+psectioninfo->sfbCnt; j++){
+         
+        if(maxValueInSfb[j] == 0) {
+          deltaScf = 0;                                          
+        }
+        else {
+          deltaScf = lastValScf - scalefac[j];
+          lastValScf = scalefac[j];                              
+        }
+         
+        if(codeScalefactorDelta(deltaScf,hBitStream)){
+          return(1);
+        }
+      }
+    }
+
+  }
+  return(GetBitsAvail(hBitStream)-dbgVal);
+}
+
+/*****************************************************************************
+*
+* function name:encodeMsInfo
+* description: encodes MS-Stereo Info
+* returns:     none
+*
+*****************************************************************************/
+static void encodeMSInfo(Word16          sfbCnt,
+                         Word16          grpSfb,
+                         Word16          maxSfb,
+                         Word16          msDigest,
+                         Word16         *jsFlags,
+                         HANDLE_BIT_BUF  hBitStream)
+{
+  Word16 sfb, sfbOff;
+
+   
+  switch(msDigest)
+  {
+    case MS_NONE:
+      WriteBits(hBitStream,SI_MS_MASK_NONE,2);
+      break;
+
+    case MS_ALL:
+      WriteBits(hBitStream,SI_MS_MASK_ALL,2);
+      break;
+
+    case MS_SOME:
+      WriteBits(hBitStream,SI_MS_MASK_SOME,2);
+      for(sfbOff = 0; sfbOff < sfbCnt; sfbOff+=grpSfb) {
+        for(sfb=0; sfb<maxSfb; sfb++) {
+             
+          if(jsFlags[sfbOff+sfb] & MS_ON) {
+            WriteBits(hBitStream,1,1);
+          }
+          else{
+            WriteBits(hBitStream,0,1);
+          }
+        }
+      }
+      break;
+  }
+
+}
+
+/*****************************************************************************
+*
+* function name: encodeTnsData
+* description:  encode TNS data (filter order, coeffs, ..)
+* returns:      none
+*
+*****************************************************************************/
+static void encodeTnsData(TNS_INFO tnsInfo,
+                          Word16 blockType,
+                          HANDLE_BIT_BUF hBitStream) {
+  Word16 i,k;
+  Flag tnsPresent;
+  Word16 numOfWindows;
+  Word16 coefBits;
+  Flag isShort;
+
+       
+  if (blockType==2) {
+    isShort = 1;
+    numOfWindows = TRANS_FAC;
+  }
+  else {
+    isShort = 0;
+    numOfWindows = 1;
+  }
+
+  tnsPresent=0;                                                  
+  for (i=0; i<numOfWindows; i++) {
+     
+    if (tnsInfo.tnsActive[i]) {
+      tnsPresent=1;                                              
+    }
+  }
+   
+  if (tnsPresent==0) {
+    WriteBits(hBitStream,0,1);
+  }
+  else{ /* there is data to be written*/
+    WriteBits(hBitStream,1,1); /*data_present */
+    for (i=0; i<numOfWindows; i++) {
+       
+      WriteBits(hBitStream,tnsInfo.tnsActive[i],(isShort?1:2));
+       
+      if (tnsInfo.tnsActive[i]) {
+         
+        WriteBits(hBitStream,((tnsInfo.coefRes[i] - 4)==0?1:0),1);
+         
+        WriteBits(hBitStream,tnsInfo.length[i],(isShort?4:6));
+         
+        WriteBits(hBitStream,tnsInfo.order[i],(isShort?3:5));
+         
+        if (tnsInfo.order[i]){
+          WriteBits(hBitStream, FILTER_DIRECTION, 1);
+           
+          if(tnsInfo.coefRes[i] == 4) {
+            coefBits = 3;                                                
+            for(k=0; k<tnsInfo.order[i]; k++) {
+                 
+              if (tnsInfo.coef[i*TNS_MAX_ORDER_SHORT+k] > 3 ||
+                  tnsInfo.coef[i*TNS_MAX_ORDER_SHORT+k] < -4) {
+                coefBits = 4;                                            
+                break;
+              }
+            }
+          }
+          else {
+            coefBits = 2;                                                
+            for(k=0; k<tnsInfo.order[i]; k++) {
+                 
+              if (tnsInfo.coef[i*TNS_MAX_ORDER_SHORT+k] > 1 ||
+                  tnsInfo.coef[i*TNS_MAX_ORDER_SHORT+k] < -2) {
+                coefBits = 3;                                            
+                break;
+              }
+            }
+          }
+          WriteBits(hBitStream, tnsInfo.coefRes[i] - coefBits, 1); /*coef_compres*/
+          for (k=0; k<tnsInfo.order[i]; k++ ) {
+            static const Word16 rmask[] = {0,1,3,7,15};
+             
+            WriteBits(hBitStream,tnsInfo.coef[i*TNS_MAX_ORDER_SHORT+k] & rmask[coefBits],coefBits);
+          }
+        }
+      }
+    }
+  }
+
+}
+
+/*****************************************************************************
+*
+* function name: encodeGainControlData
+* description:  unsupported
+* returns:      none
+*
+*****************************************************************************/
+static void encodeGainControlData(HANDLE_BIT_BUF hBitStream)
+{
+  WriteBits(hBitStream,0,1);
+}
+
+/*****************************************************************************
+*
+* function name: encodePulseData
+* description:  not supported yet (dummy)
+* returns:      none
+*
+*****************************************************************************/
+static void encodePulseData(HANDLE_BIT_BUF hBitStream)
+{
+  WriteBits(hBitStream,0,1);
+}
+
+
+/*****************************************************************************
+*
+* function name: WriteIndividualChannelStream
+* description:  management of write process of individual channel stream
+* returns:      none
+*
+*****************************************************************************/
+static void
+writeIndividualChannelStream(Flag   commonWindow,
+                             Word16 mdctScale,
+                             Word16 windowShape,
+                             Word16 groupingMask,
+                             Word16 *sfbOffset,
+                             Word16 scf[],
+                             UWord16 *maxValueInSfb,
+                             Word16 globalGain,
+                             Word16 quantSpec[],
+                             SECTION_DATA *sectionData,
+                             HANDLE_BIT_BUF hBitStream,
+                             TNS_INFO tnsInfo)
+{
+  Word16 logNorm;
+
+  logNorm = LOG_NORM_PCM - (mdctScale + 1);
+
+  encodeGlobalGain(globalGain, logNorm,scf[sectionData->firstScf], hBitStream);
+
+   
+  if(!commonWindow) {
+    encodeIcsInfo(sectionData->blockType, windowShape, groupingMask, sectionData, hBitStream);
+  }
+
+  encodeSectionData(sectionData, hBitStream);
+
+  encodeScaleFactorData(maxValueInSfb,
+                        sectionData,
+                        scf,
+                        hBitStream);
+
+  encodePulseData(hBitStream);
+
+  encodeTnsData(tnsInfo, sectionData->blockType, hBitStream);
+
+  encodeGainControlData(hBitStream);
+
+  encodeSpectralData(sfbOffset,
+                     sectionData,
+                     quantSpec,
+                     hBitStream);
+
+}
+
+/*****************************************************************************
+*
+* function name: writeSingleChannelElement
+* description:  write single channel element to bitstream
+* returns:      none
+*
+*****************************************************************************/
+static Word16 writeSingleChannelElement(Word16 instanceTag,
+                                        Word16 *sfbOffset,
+                                        QC_OUT_CHANNEL* qcOutChannel,
+                                        HANDLE_BIT_BUF hBitStream,
+                                        TNS_INFO tnsInfo)
+{
+  WriteBits(hBitStream,ID_SCE,3);
+  WriteBits(hBitStream,instanceTag,4);
+  writeIndividualChannelStream(0,
+                               qcOutChannel->mdctScale,
+                               qcOutChannel->windowShape,
+                               qcOutChannel->groupingMask,
+                               sfbOffset,
+                               qcOutChannel->scf,
+                               qcOutChannel->maxValueInSfb,
+                               qcOutChannel->globalGain,
+                               qcOutChannel->quantSpec,
+                               &(qcOutChannel->sectionData),
+                               hBitStream,
+                               tnsInfo
+                               );
+  return(0);
+}
+
+
+
+/*****************************************************************************
+*
+* function name: writeChannelPairElement
+* description:
+* returns:      none
+*
+*****************************************************************************/
+static Word16 writeChannelPairElement(Word16 instanceTag,
+                                      Word16 msDigest,
+                                      Word16 msFlags[MAX_GROUPED_SFB],
+                                      Word16 *sfbOffset[2],
+                                      QC_OUT_CHANNEL qcOutChannel[2],
+                                      HANDLE_BIT_BUF hBitStream,
+                                      TNS_INFO tnsInfo[2])
+{
+  WriteBits(hBitStream,ID_CPE,3);
+  WriteBits(hBitStream,instanceTag,4);
+  WriteBits(hBitStream,1,1); /* common window */
+
+  encodeIcsInfo(qcOutChannel[0].sectionData.blockType,
+                qcOutChannel[0].windowShape,
+                qcOutChannel[0].groupingMask,
+                &(qcOutChannel[0].sectionData),
+                hBitStream);
+
+  encodeMSInfo(qcOutChannel[0].sectionData.sfbCnt,
+               qcOutChannel[0].sectionData.sfbPerGroup,
+               qcOutChannel[0].sectionData.maxSfbPerGroup,
+               msDigest,
+               msFlags,
+               hBitStream);
+
+  writeIndividualChannelStream(1,
+                               qcOutChannel[0].mdctScale,
+                               qcOutChannel[0].windowShape,
+                               qcOutChannel[0].groupingMask,
+                               sfbOffset[0],
+                               qcOutChannel[0].scf,
+                               qcOutChannel[0].maxValueInSfb,
+                               qcOutChannel[0].globalGain,
+                               qcOutChannel[0].quantSpec,
+                               &(qcOutChannel[0].sectionData),
+                               hBitStream,
+                               tnsInfo[0]);
+
+  writeIndividualChannelStream(1,
+                               qcOutChannel[1].mdctScale,
+                               qcOutChannel[1].windowShape,
+                               qcOutChannel[1].groupingMask,
+                               sfbOffset[1],
+                               qcOutChannel[1].scf,
+                               qcOutChannel[1].maxValueInSfb,
+                               qcOutChannel[1].globalGain,
+                               qcOutChannel[1].quantSpec,
+                               &(qcOutChannel[1].sectionData),
+                               hBitStream,
+                               tnsInfo[1]);
+
+  return(0);
+}
+
+
+
+/*****************************************************************************
+*
+* function name: writeFillElement
+* description:  write fill elements to bitstream
+* returns:      none
+*
+*****************************************************************************/
+static void writeFillElement( const UWord8 *ancBytes,
+                              Word16 totFillBits,
+                              HANDLE_BIT_BUF hBitStream)
+{
+  Word16 i;
+  Word16 cnt,esc_count;
+
+  /*
+    Write fill Element(s):
+    amount of a fill element can be 7+X*8 Bits, X element of [0..270]
+  */
+    
+  while(totFillBits >= (3+4)) {
+    cnt = min(((totFillBits - (3+4)) >> 3), ((1<<4)-1));
+
+    WriteBits(hBitStream,ID_FIL,3);
+    WriteBits(hBitStream,cnt,4);
+
+    totFillBits = totFillBits - (3+4);
+
+     
+    if ((cnt == (1<<4)-1)) {
+
+      esc_count = min( ((totFillBits >> 3) - ((1<<4)-1)), (1<<8)-1);
+      WriteBits(hBitStream,esc_count,8);
+      totFillBits = (totFillBits - 8);
+      cnt = cnt + (esc_count - 1);
+    }
+
+    for(i=0;i<cnt;i++) {
+       
+      if(ancBytes)
+        WriteBits(hBitStream, *ancBytes++,8);
+      else
+        WriteBits(hBitStream,0,8);
+      totFillBits = totFillBits - 8;
+    }
+  }
+}
+

+/*****************************************************************************
+*
+* function name: WriteBitStream
+* description:  main function of write bitsteam process
+* returns:      0 if success
+*
+*****************************************************************************/
+Word16 WriteBitstream (HANDLE_BIT_BUF hBitStream,
+                       ELEMENT_INFO elInfo,
+                       QC_OUT *qcOut,
+                       PSY_OUT *psyOut,
+                       Word16 *globUsedBits,					   
+                       const UWord8 *ancBytes,

+					   Word16 sampindex
+                       ) /* returns error code */
+{
+  Word16 bitMarkUp;
+  Word16 elementUsedBits;
+  Word16 frameBits=0;

+

+  /*   struct bitbuffer bsWriteCopy; */

+  bitMarkUp = GetBitsAvail(hBitStream); 

+  if(qcOut->qcElement.adtsUsed)  /*  write adts header*/

+  {

+	  WriteBits(hBitStream, 0xFFF, 12); /* 12 bit Syncword */

+	  WriteBits(hBitStream, 1, 1); /* ID == 0 for MPEG4 AAC, 1 for MPEG2 AAC */

+	  WriteBits(hBitStream, 0, 2); /* layer == 0 */

+	  WriteBits(hBitStream, 1, 1); /* protection absent */

+	  WriteBits(hBitStream, 1, 2); /* profile */

+	  WriteBits(hBitStream, sampindex, 4); /* sampling rate */

+	  WriteBits(hBitStream, 0, 1); /* private bit */

+	  WriteBits(hBitStream, elInfo.nChannelsInEl, 3); /* ch. config (must be > 0) */

+								   /* simply using numChannels only works for

+									6 channels or less, else a channel

+									configuration should be written */

+	  WriteBits(hBitStream, 0, 1); /* original/copy */

+	  WriteBits(hBitStream, 0, 1); /* home */	  

+	  

+	  /* Variable ADTS header */

+	  WriteBits(hBitStream, 0, 1); /* copyr. id. bit */

+	  WriteBits(hBitStream, 0, 1); /* copyr. id. start */

+	  WriteBits(hBitStream, *globUsedBits >> 3, 13);

+	  WriteBits(hBitStream, 0x7FF, 11); /* buffer fullness (0x7FF for VBR) */

+	  WriteBits(hBitStream, 0, 2); /* raw data blocks (0+1=1) */  

+  }

+
+  *globUsedBits=0;                                               
+
+  {
+
+    Word16 *sfbOffset[2];
+    TNS_INFO tnsInfo[2];
+    elementUsedBits = 0;                                         
+
+    switch (elInfo.elType) {
+
+      case ID_SCE:      /* single channel */
+        sfbOffset[0] = psyOut->psyOutChannel[elInfo.ChannelIndex[0]].sfbOffsets;
+        tnsInfo[0] = psyOut->psyOutChannel[elInfo.ChannelIndex[0]].tnsInfo;
+
+        writeSingleChannelElement(elInfo.instanceTag,
+                                  sfbOffset[0],
+                                  &qcOut->qcChannel[elInfo.ChannelIndex[0]],
+                                  hBitStream,
+                                  tnsInfo[0]);
+        break;
+
+      case ID_CPE:     /* channel pair */
+        {
+          Word16 msDigest;
+          Word16 *msFlags = psyOut->psyOutElement.toolsInfo.msMask;
+          msDigest = psyOut->psyOutElement.toolsInfo.msDigest;                        
+          sfbOffset[0] =
+            psyOut->psyOutChannel[elInfo.ChannelIndex[0]].sfbOffsets;
+          sfbOffset[1] =
+            psyOut->psyOutChannel[elInfo.ChannelIndex[1]].sfbOffsets;
+
+          tnsInfo[0]=
+            psyOut->psyOutChannel[elInfo.ChannelIndex[0]].tnsInfo;
+          tnsInfo[1]=
+            psyOut->psyOutChannel[elInfo.ChannelIndex[1]].tnsInfo;
+          writeChannelPairElement(elInfo.instanceTag,
+                                  msDigest,
+                                  msFlags,
+                                  sfbOffset,
+                                  &qcOut->qcChannel[elInfo.ChannelIndex[0]],
+                                  hBitStream,
+                                  tnsInfo);
+        }
+        break;
+
+      default:
+        return(1);
+
+      }   /* switch */
+
+    elementUsedBits = elementUsedBits - bitMarkUp;
+    bitMarkUp = GetBitsAvail(hBitStream);
+    frameBits = frameBits + elementUsedBits + bitMarkUp;
+
+  }
+
+  writeFillElement(NULL,
+                   qcOut->totFillBits, 
+                   hBitStream);
+
+  WriteBits(hBitStream,ID_END,3);
+
+  /* byte alignement */
+  WriteBits(hBitStream,0, (8 - (hBitStream->cntBits & 7)) & 7);          
+  
+  *globUsedBits = *globUsedBits- bitMarkUp;
+  bitMarkUp = GetBitsAvail(hBitStream);                                  
+  *globUsedBits = *globUsedBits + bitMarkUp;
+  frameBits = frameBits + *globUsedBits;
+
+   
+  if (frameBits !=  (qcOut->totStaticBitsUsed+qcOut->totDynBitsUsed + qcOut->totAncBitsUsed +
+                     qcOut->totFillBits + qcOut->alignBits)) {
+    return(-1);
+  }
+  return(0);
+}
diff --git a/media/libstagefright/codecs/aacenc/src/block_switch.c b/media/libstagefright/codecs/aacenc/src/block_switch.c
new file mode 100644
index 0000000..c0054f7
--- /dev/null
+++ b/media/libstagefright/codecs/aacenc/src/block_switch.c
@@ -0,0 +1,431 @@
+/*

+ ** Copyright 2003-2010, VisualOn, Inc.

+ **

+ ** Licensed under the Apache License, Version 2.0 (the "License");

+ ** you may not use this file except in compliance with the License.

+ ** You may obtain a copy of the License at

+ **

+ **     http://www.apache.org/licenses/LICENSE-2.0

+ **

+ ** Unless required by applicable law or agreed to in writing, software

+ ** distributed under the License is distributed on an "AS IS" BASIS,

+ ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

+ ** See the License for the specific language governing permissions and

+ ** limitations under the License.

+ */

+/*******************************************************************************

+	File:		block_switch.c

+

+	Content:	Block switching functions

+

+*******************************************************************************/
+
+#include "typedef.h"

+#include "basic_op.h"

+#include "oper_32b.h"
+#include "psy_const.h"
+#include "block_switch.h"
+
+
+#define ENERGY_SHIFT (8 - 1)
+
+/**************** internal function prototypes ***********/
+static Word16
+IIRFilter(const Word16 in, const Word32 coeff[], Word32 states[]);
+
+static Word32
+SrchMaxWithIndex(const Word32 *in, Word16 *index, Word16 n);
+
+
+Word32
+CalcWindowEnergy(BLOCK_SWITCHING_CONTROL *blockSwitchingControl,
+                 Word16 *timeSignal,
+                 Word16 chIncrement,
+                 Word16 windowLen);
+
+
+
+/****************** Constants *****************************/
+
+
+/*
+  IIR high pass coeffs
+*/
+Word32 hiPassCoeff[BLOCK_SWITCHING_IIR_LEN] = {
+  0xbec8b439, 0x609d4952  /* -0.5095f, 0.7548f */ 
+};
+
+static const Word32 accWindowNrgFac = 0x26666666;                   /* factor for accumulating filtered window energies 0.3 */
+static const Word32 oneMinusAccWindowNrgFac = 0x5999999a;			/* 0.7 */
+static const Word32 invAttackRatioHighBr = 0x0ccccccd;              /* inverted lower ratio limit for attacks 0.1*/
+static const Word32 invAttackRatioLowBr =  0x072b020c;              /* 0.056 */
+static const Word32 minAttackNrg = 0x00001e84;                      /* minimum energy for attacks 1e+6 */
+
+
+/****************** Routines ****************************/
+
+
+/*****************************************************************************
+*
+* function name: InitBlockSwitching
+* description:  init Block Switching parameter.
+* returns:      TRUE if success
+*
+**********************************************************************************/
+Word16 InitBlockSwitching(BLOCK_SWITCHING_CONTROL *blockSwitchingControl,
+                          const Word32 bitRate, const Word16 nChannels)
+{
+  /* select attackRatio */
+           
+  if ((sub(nChannels,1)==0 && L_sub(bitRate, 24000) > 0) || 
+      (sub(nChannels,1)>0 && bitRate > (nChannels * 16000))) {
+    blockSwitchingControl->invAttackRatio = invAttackRatioHighBr;
+  }
+  else  {
+    blockSwitchingControl->invAttackRatio = invAttackRatioLowBr;
+  }
+
+  return(TRUE);
+}
+
+static Word16 suggestedGroupingTable[TRANS_FAC][MAX_NO_OF_GROUPS] = {
+  /* Attack in Window 0 */ {1,  3,  3,  1},
+  /* Attack in Window 1 */ {1,  1,  3,  3},
+  /* Attack in Window 2 */ {2,  1,  3,  2},
+  /* Attack in Window 3 */ {3,  1,  3,  1},
+  /* Attack in Window 4 */ {3,  1,  1,  3},
+  /* Attack in Window 5 */ {3,  2,  1,  2},
+  /* Attack in Window 6 */ {3,  3,  1,  1},
+  /* Attack in Window 7 */ {3,  3,  1,  1}
+};
+
+/*****************************************************************************
+*
+* function name: BlockSwitching
+* description:  detect this frame whether there is an attack
+* returns:      TRUE if success
+*
+**********************************************************************************/
+Word16 BlockSwitching(BLOCK_SWITCHING_CONTROL *blockSwitchingControl,
+                      Word16 *timeSignal,
+					  Word32 sampleRate,
+                      Word16 chIncrement)
+{
+  Word32 i, w;
+  Word32 enM1, enMax;
+
+  /* Reset grouping info */
+  for (i=0; i<TRANS_FAC; i++) {
+    blockSwitchingControl->groupLen[i] = 0;                                      
+  }
+
+
+  /* Search for position and amplitude of attack in last frame (1 windows delay) */
+  blockSwitchingControl->maxWindowNrg = SrchMaxWithIndex( &blockSwitchingControl->windowNrg[0][BLOCK_SWITCH_WINDOWS-1],
+                                                          &blockSwitchingControl->attackIndex,
+                                                          BLOCK_SWITCH_WINDOWS);
+
+  blockSwitchingControl->attackIndex = blockSwitchingControl->lastAttackIndex;   
+
+  /* Set grouping info */
+  blockSwitchingControl->noOfGroups = MAX_NO_OF_GROUPS;                          
+
+  for (i=0; i<MAX_NO_OF_GROUPS; i++) {
+    blockSwitchingControl->groupLen[i] = suggestedGroupingTable[blockSwitchingControl->attackIndex][i];  
+  }

+	
+  /* if the samplerate is less than 16000, it should be all the short block, avoid pre&post echo */
+  if(sampleRate >= 16000) {
+	  /* Save current window energy as last window energy */
+	  for (w=0; w<BLOCK_SWITCH_WINDOWS; w++) {
+		  blockSwitchingControl->windowNrg[0][w] = blockSwitchingControl->windowNrg[1][w];             
+		  blockSwitchingControl->windowNrgF[0][w] = blockSwitchingControl->windowNrgF[1][w];           
+	  }
+
+
+	  /* Calculate unfiltered and filtered energies in subwindows and combine to segments */
+	  CalcWindowEnergy(blockSwitchingControl, timeSignal, chIncrement, BLOCK_SWITCH_WINDOW_LEN);
+
+	  /* reset attack */
+	  blockSwitchingControl->attack = FALSE;                                         
+
+	  enMax = 0;                                                                     
+	  enM1 = blockSwitchingControl->windowNrgF[0][BLOCK_SWITCH_WINDOWS-1];           
+
+	  for (w=0; w<BLOCK_SWITCH_WINDOWS; w++) {
+		  Word32 enM1_Tmp, accWindowNrg_Tmp, windowNrgF_Tmp;
+		  Word16 enM1_Shf, accWindowNrg_Shf, windowNrgF_Shf;
+
+		  accWindowNrg_Shf = norm_l(blockSwitchingControl->accWindowNrg);
+		  enM1_Shf = norm_l(enM1);
+		  windowNrgF_Shf = norm_l(blockSwitchingControl->windowNrgF[1][w]);
+
+		  accWindowNrg_Tmp = blockSwitchingControl->accWindowNrg << accWindowNrg_Shf;
+		  enM1_Tmp = enM1 << enM1_Shf;
+		  windowNrgF_Tmp = blockSwitchingControl->windowNrgF[1][w] << windowNrgF_Shf;
+
+		  /* a sliding average of the previous energies */
+		  blockSwitchingControl->accWindowNrg = (fixmul(oneMinusAccWindowNrgFac, accWindowNrg_Tmp) >> accWindowNrg_Shf) +
+			  (fixmul(accWindowNrgFac, enM1_Tmp) >> enM1_Shf);
+
+
+		  /* if the energy with the ratio is bigger than the average, and the attack and short block  */
+		  if ((fixmul(windowNrgF_Tmp, blockSwitchingControl->invAttackRatio) >> windowNrgF_Shf) >
+			  blockSwitchingControl->accWindowNrg ) {
+				  blockSwitchingControl->attack = TRUE;                                      
+				  blockSwitchingControl->lastAttackIndex = w;                                
+		  }
+		  enM1 = blockSwitchingControl->windowNrgF[1][w];                              
+		  enMax = max(enMax, enM1);
+	  }
+
+	  if (enMax < minAttackNrg) {
+		  blockSwitchingControl->attack = FALSE;                                       
+	  }
+  }
+  else
+  {
+	  blockSwitchingControl->attack = TRUE;
+  }
+
+  /* Check if attack spreads over frame border */     
+  if ((!blockSwitchingControl->attack) && (blockSwitchingControl->lastattack)) {
+     
+    if (blockSwitchingControl->attackIndex == TRANS_FAC-1) {
+      blockSwitchingControl->attack = TRUE;                                      
+    }
+
+    blockSwitchingControl->lastattack = FALSE;                                   
+  }
+  else {
+    blockSwitchingControl->lastattack = blockSwitchingControl->attack;           
+  }
+
+  blockSwitchingControl->windowSequence =  blockSwitchingControl->nextwindowSequence;    
+
+     
+  if (blockSwitchingControl->attack) {
+    blockSwitchingControl->nextwindowSequence = SHORT_WINDOW;
+  }
+  else {
+    blockSwitchingControl->nextwindowSequence = LONG_WINDOW;
+  }
+
+  /* update short block group */ 
+  if (blockSwitchingControl->nextwindowSequence == SHORT_WINDOW) {
+     
+    if (blockSwitchingControl->windowSequence== LONG_WINDOW) {
+      blockSwitchingControl->windowSequence = START_WINDOW;                      
+    }
+     
+    if (blockSwitchingControl->windowSequence == STOP_WINDOW) {
+      blockSwitchingControl->windowSequence = SHORT_WINDOW;                      
+      blockSwitchingControl->noOfGroups = 3;                                     
+      blockSwitchingControl->groupLen[0] = 3;                                    
+      blockSwitchingControl->groupLen[1] = 3;                                    
+      blockSwitchingControl->groupLen[2] = 2;                                    
+    }
+  }
+
+  /* update block type */  
+  if (blockSwitchingControl->nextwindowSequence == LONG_WINDOW) {
+     
+    if (blockSwitchingControl->windowSequence == SHORT_WINDOW) {
+      blockSwitchingControl->nextwindowSequence = STOP_WINDOW;                   
+    }
+  }
+
+  return(TRUE);
+}
+
+
+/*****************************************************************************
+*
+* function name: SrchMaxWithIndex
+* description:  search for the biggest value in an array
+* returns:      the max value
+*
+**********************************************************************************/
+static Word32 SrchMaxWithIndex(const Word32 in[], Word16 *index, Word16 n)
+{
+  Word32 max;
+  Word32 i, idx;
+
+  /* Search maximum value in array and return index and value */
+  max = 0;                                                       
+  idx = 0;                                                       
+
+  for (i = 0; i < n; i++) {
+     
+    if (in[i+1]  > max) {
+      max = in[i+1];                                             
+      idx = i;                                                   
+    }
+  }
+  *index = idx;                                                  
+
+  return(max);
+}
+
+/*****************************************************************************
+*
+* function name: CalcWindowEnergy
+* description:  calculate the energy before iir-filter and after irr-filter
+* returns:      TRUE if success
+*
+**********************************************************************************/
+#ifndef ARMV5E

+Word32 CalcWindowEnergy(BLOCK_SWITCHING_CONTROL *blockSwitchingControl,
+                        Word16 *timeSignal,
+                        Word16 chIncrement,
+                        Word16 windowLen)
+{
+  Word32 w, i, wOffset, tidx, ch;
+  Word32 accuUE, accuFE;
+  Word32 tempUnfiltered;
+  Word32 tempFiltered;

+  Word32 states0, states1;

+  Word32 Coeff0, Coeff1;

+

+
+  states0 = blockSwitchingControl->iirStates[0];

+  states1 = blockSwitchingControl->iirStates[1];

+  Coeff0 = hiPassCoeff[0];

+  Coeff1 = hiPassCoeff[1];
+  tidx = 0;                                                   
+  for (w=0; w < BLOCK_SWITCH_WINDOWS; w++) {
+
+    accuUE = 0;                                                  
+    accuFE = 0;                                                  
+
+    for(i=0; i<windowLen; i++) {
+	  Word32 accu1, accu2, accu3;

+	  Word32 out;

+	  tempUnfiltered = timeSignal[tidx];
+      tidx = tidx + chIncrement;
+

+	  accu1 = L_mpy_ls(Coeff1, tempUnfiltered);

+	  accu2 = fixmul( Coeff0, states1 );

+	  accu3 = accu1 - states0;

+	  out = accu3 - accu2;

+

+	  states0 = accu1;             

+	  states1 = out;               

+

+      tempFiltered = extract_h(out);	  
+      accuUE += (tempUnfiltered * tempUnfiltered) >> ENERGY_SHIFT;
+      accuFE += (tempFiltered * tempFiltered) >> ENERGY_SHIFT;
+    }
+
+    blockSwitchingControl->windowNrg[1][w] = accuUE;             
+    blockSwitchingControl->windowNrgF[1][w] = accuFE;            
+
+  }

+

+  blockSwitchingControl->iirStates[0] = states0;

+  blockSwitchingControl->iirStates[1] = states1;
+
+  return(TRUE);
+}
+#endif
+
+/*****************************************************************************
+*
+* function name: IIRFilter
+* description:  calculate the iir-filter for an array
+* returns:      the result after iir-filter
+*
+**********************************************************************************/
+static Word16 IIRFilter(const Word16 in, const Word32 coeff[], Word32 states[])
+{
+  Word32 accu1, accu2, accu3;
+  Word32 out;
+
+  accu1 = L_mpy_ls(coeff[1], in);
+  accu3 = accu1 - states[0];
+  accu2 = fixmul( coeff[0], states[1] );
+  out = accu3 - accu2;
+
+  states[0] = accu1;             
+  states[1] = out;               
+
+  return round16(out);
+}
+
+
+static Word16 synchronizedBlockTypeTable[4][4] = {
+  /*                 LONG_WINDOW   START_WINDOW  SHORT_WINDOW  STOP_WINDOW */
+  /* LONG_WINDOW  */{LONG_WINDOW,  START_WINDOW, SHORT_WINDOW, STOP_WINDOW},
+  /* START_WINDOW */{START_WINDOW, START_WINDOW, SHORT_WINDOW, SHORT_WINDOW},
+  /* SHORT_WINDOW */{SHORT_WINDOW, SHORT_WINDOW, SHORT_WINDOW, SHORT_WINDOW},
+  /* STOP_WINDOW  */{STOP_WINDOW,  SHORT_WINDOW, SHORT_WINDOW, STOP_WINDOW}
+};
+
+
+/*****************************************************************************
+*
+* function name: SyncBlockSwitching
+* description:  update block type and group value
+* returns:      TRUE if success
+*
+**********************************************************************************/
+Word16 SyncBlockSwitching(BLOCK_SWITCHING_CONTROL *blockSwitchingControlLeft,
+                          BLOCK_SWITCHING_CONTROL *blockSwitchingControlRight,
+                          const Word16 nChannels)
+{
+  Word16 i;
+  Word16 patchType = LONG_WINDOW;                
+
+   
+  if (nChannels == 1) { /* Mono */
+    if (blockSwitchingControlLeft->windowSequence != SHORT_WINDOW) {
+      blockSwitchingControlLeft->noOfGroups = 1;                         
+      blockSwitchingControlLeft->groupLen[0] = 1;                        
+
+      for (i=1; i<TRANS_FAC; i++) {
+        blockSwitchingControlLeft->groupLen[i] = 0;                      
+      }
+    }
+  }
+  else { /* Stereo common Window */
+    patchType = synchronizedBlockTypeTable[patchType][blockSwitchingControlLeft->windowSequence];        
+    patchType = synchronizedBlockTypeTable[patchType][blockSwitchingControlRight->windowSequence];       
+
+    /* Set synchronized Blocktype */
+    blockSwitchingControlLeft->windowSequence = patchType;               
+    blockSwitchingControlRight->windowSequence = patchType;              
+
+    /* Synchronize grouping info */     
+    if(patchType != SHORT_WINDOW) { /* Long Blocks */
+      /* Set grouping info */
+      blockSwitchingControlLeft->noOfGroups = 1;                         
+      blockSwitchingControlRight->noOfGroups = 1;                        
+      blockSwitchingControlLeft->groupLen[0] = 1;                        
+      blockSwitchingControlRight->groupLen[0] = 1;                       
+
+      for (i=1; i<TRANS_FAC; i++) {
+        blockSwitchingControlLeft->groupLen[i] = 0;                      
+        blockSwitchingControlRight->groupLen[i] = 0;                     
+      }
+    }
+    else {
+       
+      if (blockSwitchingControlLeft->maxWindowNrg > blockSwitchingControlRight->maxWindowNrg) {
+        /* Left Channel wins */
+        blockSwitchingControlRight->noOfGroups = blockSwitchingControlLeft->noOfGroups;          
+        for (i=0; i<TRANS_FAC; i++) {
+          blockSwitchingControlRight->groupLen[i] = blockSwitchingControlLeft->groupLen[i];      
+        }
+      }
+      else {
+        /* Right Channel wins */
+        blockSwitchingControlLeft->noOfGroups = blockSwitchingControlRight->noOfGroups;          
+        for (i=0; i<TRANS_FAC; i++) {
+          blockSwitchingControlLeft->groupLen[i] = blockSwitchingControlRight->groupLen[i];      
+        }
+      }
+    }
+  } /*endif Mono or Stereo */
+
+  return(TRUE);
+}
diff --git a/media/libstagefright/codecs/aacenc/src/channel_map.c b/media/libstagefright/codecs/aacenc/src/channel_map.c
new file mode 100644
index 0000000..247293b
--- /dev/null
+++ b/media/libstagefright/codecs/aacenc/src/channel_map.c
@@ -0,0 +1,123 @@
+/*

+ ** Copyright 2003-2010, VisualOn, Inc.

+ **

+ ** Licensed under the Apache License, Version 2.0 (the "License");

+ ** you may not use this file except in compliance with the License.

+ ** You may obtain a copy of the License at

+ **

+ **     http://www.apache.org/licenses/LICENSE-2.0

+ **

+ ** Unless required by applicable law or agreed to in writing, software

+ ** distributed under the License is distributed on an "AS IS" BASIS,

+ ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

+ ** See the License for the specific language governing permissions and

+ ** limitations under the License.

+ */

+/*******************************************************************************

+	File:		channel_map.c

+

+	Content:	channel mapping functions

+

+*******************************************************************************/
+
+#include "channel_map.h"
+#include "bitenc.h"
+#include "psy_const.h"
+#include "qc_data.h"
+
+static const Word16 maxChannelBits = MAXBITS_COEF;
+
+static Word16 initElement(ELEMENT_INFO* elInfo, ELEMENT_TYPE elType)
+{
+  Word16 error=0;                                    
+
+  elInfo->elType=elType;                             
+
+  switch(elInfo->elType) {
+
+    case ID_SCE:
+      elInfo->nChannelsInEl=1;                       
+
+      elInfo->ChannelIndex[0]=0;                     
+
+      elInfo->instanceTag=0;                         
+      break;
+
+    case ID_CPE:
+
+      elInfo->nChannelsInEl=2;                        
+
+      elInfo->ChannelIndex[0]=0;                      
+      elInfo->ChannelIndex[1]=1;                      
+
+      elInfo->instanceTag=0;                    
+      break;
+
+    default:
+      error=1;                                  
+  }
+
+  return error;
+}
+
+
+Word16 InitElementInfo (Word16 nChannels, ELEMENT_INFO* elInfo)
+{
+  Word16 error;
+  error = 0;                                        
+
+  switch(nChannels) {
+
+    case 1: 
+      initElement(elInfo, ID_SCE);
+      break;
+
+    case 2:
+      initElement(elInfo, ID_CPE);
+      break;
+
+    default:
+      error=4;                                         
+  }
+
+  return error;
+}
+
+
+Word16 InitElementBits(ELEMENT_BITS *elementBits,
+                       ELEMENT_INFO elInfo,
+                       Word32 bitrateTot,
+                       Word16 averageBitsTot,
+                       Word16 staticBitsTot)
+{
+  Word16 error;
+  error = 0;                                    
+
+   switch(elInfo.nChannelsInEl) {
+    case 1:
+      elementBits->chBitrate = bitrateTot;                     
+      elementBits->averageBits = averageBitsTot - staticBitsTot;
+      elementBits->maxBits = maxChannelBits;                   
+
+      elementBits->maxBitResBits = maxChannelBits - averageBitsTot;
+      elementBits->maxBitResBits = elementBits->maxBitResBits - (elementBits->maxBitResBits & 7); 
+      elementBits->bitResLevel = elementBits->maxBitResBits;   
+      elementBits->relativeBits  = 0x4000; /* 1.0f/2 */        
+      break;
+
+    case 2:
+      elementBits->chBitrate   = bitrateTot >> 1;
+      elementBits->averageBits = averageBitsTot - staticBitsTot;
+      elementBits->maxBits     = maxChannelBits << 1;
+
+      elementBits->maxBitResBits = (maxChannelBits << 1) - averageBitsTot;
+      elementBits->maxBitResBits = elementBits->maxBitResBits - (elementBits->maxBitResBits & 7);   
+      elementBits->bitResLevel = elementBits->maxBitResBits;     
+      elementBits->relativeBits = 0x4000; /* 1.0f/2 */           
+      break;
+
+    default:
+      error = 1;                                                 
+  }
+  return error;
+}
diff --git a/media/libstagefright/codecs/aacenc/src/dyn_bits.c b/media/libstagefright/codecs/aacenc/src/dyn_bits.c
new file mode 100644
index 0000000..3deacca
--- /dev/null
+++ b/media/libstagefright/codecs/aacenc/src/dyn_bits.c
@@ -0,0 +1,545 @@
+/*

+ ** Copyright 2003-2010, VisualOn, Inc.

+ **

+ ** Licensed under the Apache License, Version 2.0 (the "License");

+ ** you may not use this file except in compliance with the License.

+ ** You may obtain a copy of the License at

+ **

+ **     http://www.apache.org/licenses/LICENSE-2.0

+ **

+ ** Unless required by applicable law or agreed to in writing, software

+ ** distributed under the License is distributed on an "AS IS" BASIS,

+ ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

+ ** See the License for the specific language governing permissions and

+ ** limitations under the License.

+ */

+/*******************************************************************************

+	File:		dyn_bits.c

+

+	Content:	Noiseless coder module functions

+

+*******************************************************************************/
+
+#include "aac_rom.h"
+#include "dyn_bits.h"
+#include "bit_cnt.h"
+#include "psy_const.h"
+
+
+/*****************************************************************************
+*
+* function name: buildBitLookUp
+* description:  count bits using all possible tables
+*
+*****************************************************************************/
+static void
+buildBitLookUp(const Word16 *quantSpectrum,
+               const Word16 maxSfb,
+               const Word16 *sfbOffset,
+               const UWord16 *sfbMax,
+               Word16 bitLookUp[MAX_SFB_LONG][CODE_BOOK_ESC_NDX + 1],
+               SECTION_INFO * sectionInfo)
+{
+  Word32 i;
+
+  for (i=0; i<maxSfb; i++) {
+    Word16 sfbWidth, maxVal;
+
+    sectionInfo[i].sfbCnt = 1;                                   
+    sectionInfo[i].sfbStart = i;                                 
+    sectionInfo[i].sectionBits = INVALID_BITCOUNT;               
+    sectionInfo[i].codeBook = -1;                                
+    sfbWidth = sfbOffset[i + 1] - sfbOffset[i];              
+    maxVal = sfbMax[i];                                          
+    bitCount(quantSpectrum + sfbOffset[i], sfbWidth, maxVal, bitLookUp[i]);
+  }
+}
+
+
+/*****************************************************************************
+*
+* function name: findBestBook
+* description:  essential helper functions
+*
+*****************************************************************************/
+static Word16
+findBestBook(const Word16 *bc, Word16 *book)
+{
+  Word32 minBits, j;
+  minBits = INVALID_BITCOUNT;                                    
+
+  for (j=0; j<=CODE_BOOK_ESC_NDX; j++) {
+     
+    if (bc[j] < minBits) {
+      minBits = bc[j];                                           
+      *book = j;                                                 
+    }
+  }
+  return extract_l(minBits);
+}
+
+static Word16
+findMinMergeBits(const Word16 *bc1, const Word16 *bc2)
+{
+  Word32 minBits, j, sum;
+  minBits = INVALID_BITCOUNT;                                    
+
+  for (j=0; j<=CODE_BOOK_ESC_NDX; j++) {
+    sum = bc1[j] + bc2[j];
+    if (sum < minBits) {
+      minBits = sum;                                             
+    }
+  }
+  return extract_l(minBits);
+}
+
+static void
+mergeBitLookUp(Word16 *bc1, const Word16 *bc2)
+{
+  Word32 j;
+
+  for (j=0; j<=CODE_BOOK_ESC_NDX; j++) {
+    bc1[j] = min(bc1[j] + bc2[j], INVALID_BITCOUNT);
+  }
+}
+
+static Word16
+findMaxMerge(const Word16 mergeGainLookUp[MAX_SFB_LONG],
+             const SECTION_INFO *sectionInfo,
+             const Word16 maxSfb, Word16 *maxNdx)
+{
+  Word32 i, maxMergeGain;
+  maxMergeGain = 0;                                              
+
+  for (i=0; i+sectionInfo[i].sfbCnt < maxSfb; i += sectionInfo[i].sfbCnt) {
+     
+    if (mergeGainLookUp[i] > maxMergeGain) {
+      maxMergeGain = mergeGainLookUp[i];                         
+      *maxNdx = i;                                               
+    }
+  }
+  return extract_l(maxMergeGain);
+}
+
+
+
+static Word16
+CalcMergeGain(const SECTION_INFO *sectionInfo,
+              Word16 bitLookUp[MAX_SFB_LONG][CODE_BOOK_ESC_NDX + 1],
+              const Word16 *sideInfoTab,
+              const Word16 ndx1,
+              const Word16 ndx2)
+{
+  Word32 SplitBits;
+  Word32 MergeBits;
+  Word32 MergeGain;
+
+  /*
+    Bit amount for splitted sections
+  */
+  SplitBits = sectionInfo[ndx1].sectionBits + sectionInfo[ndx2].sectionBits;
+
+  MergeBits = sideInfoTab[sectionInfo[ndx1].sfbCnt + sectionInfo[ndx2].sfbCnt] +
+                  findMinMergeBits(bitLookUp[ndx1], bitLookUp[ndx2]);
+  MergeGain = (SplitBits - MergeBits);
+
+  return extract_l(MergeGain);
+}
+
+/*
+  sectioning Stage 0:find minimum codbooks
+*/
+
+static void
+gmStage0(SECTION_INFO * sectionInfo,
+         Word16 bitLookUp[MAX_SFB_LONG][CODE_BOOK_ESC_NDX + 1],
+         const Word16 maxSfb)
+{
+  Word32 i;
+
+  for (i=0; i<maxSfb; i++) {
+    /* Side-Info bits will be calculated in Stage 1!  */
+     
+    if (sectionInfo[i].sectionBits == INVALID_BITCOUNT) {
+      sectionInfo[i].sectionBits = findBestBook(bitLookUp[i], &(sectionInfo[i].codeBook));
+    }
+  }
+}
+
+/*
+  sectioning Stage 1:merge all connected regions with the same code book and
+  calculate side info
+*/
+
+static void
+gmStage1(SECTION_INFO * sectionInfo,
+         Word16 bitLookUp[MAX_SFB_LONG][CODE_BOOK_ESC_NDX + 1],
+         const Word16 maxSfb,
+         const Word16 *sideInfoTab)
+{
+  SECTION_INFO * sectionInfo_s;

+  SECTION_INFO * sectionInfo_e;

+  Word32 mergeStart, mergeEnd;
+  mergeStart = 0;                                                        
+
+  do {
+
+    sectionInfo_s = sectionInfo + mergeStart;

+	for (mergeEnd=mergeStart+1; mergeEnd<maxSfb; mergeEnd++) {
+      sectionInfo_e = sectionInfo + mergeEnd; 
+      if (sectionInfo_s->codeBook != sectionInfo_e->codeBook)
+        break;
+      sectionInfo_s->sfbCnt += 1;
+      sectionInfo_s->sectionBits += sectionInfo_e->sectionBits;
+
+      mergeBitLookUp(bitLookUp[mergeStart], bitLookUp[mergeEnd]);
+    }
+
+    sectionInfo_s->sectionBits += sideInfoTab[sectionInfo_s->sfbCnt];
+    sectionInfo[mergeEnd - 1].sfbStart = sectionInfo_s->sfbStart;      /* speed up prev search */  
+
+    mergeStart = mergeEnd;                                               
+
+     
+  } while (mergeStart - maxSfb < 0);
+}
+
+/*
+  sectioning Stage 2:greedy merge algorithm, merge connected sections with
+  maximum bit gain until no more gain is possible
+*/
+static void
+gmStage2(SECTION_INFO *sectionInfo,
+         Word16 mergeGainLookUp[MAX_SFB_LONG],
+         Word16 bitLookUp[MAX_SFB_LONG][CODE_BOOK_ESC_NDX + 1],
+         const Word16 maxSfb,
+         const Word16 *sideInfoTab)
+{
+  Word16 i;
+
+  for (i=0; i+sectionInfo[i].sfbCnt<maxSfb; i+=sectionInfo[i].sfbCnt) {
+    mergeGainLookUp[i] = CalcMergeGain(sectionInfo,
+                                       bitLookUp,
+                                       sideInfoTab,
+                                       i,
+                                       (i + sectionInfo[i].sfbCnt));
+  }
+
+  while (TRUE) {
+    Word16 maxMergeGain, maxNdx, maxNdxNext, maxNdxLast;
+
+    maxMergeGain = findMaxMerge(mergeGainLookUp, sectionInfo, maxSfb, &maxNdx);
+
+     
+    if (maxMergeGain <= 0)
+      break;
+
+
+    maxNdxNext = maxNdx + sectionInfo[maxNdx].sfbCnt;
+
+    sectionInfo[maxNdx].sfbCnt = sectionInfo[maxNdx].sfbCnt + sectionInfo[maxNdxNext].sfbCnt;
+    sectionInfo[maxNdx].sectionBits = sectionInfo[maxNdx].sectionBits +
+                                          (sectionInfo[maxNdxNext].sectionBits - maxMergeGain);
+
+
+    mergeBitLookUp(bitLookUp[maxNdx], bitLookUp[maxNdxNext]);
+
+     
+    if (maxNdx != 0) {
+      maxNdxLast = sectionInfo[maxNdx - 1].sfbStart;
+      mergeGainLookUp[maxNdxLast] = CalcMergeGain(sectionInfo,
+                                                  bitLookUp,
+                                                  sideInfoTab,
+                                                  maxNdxLast,
+                                                  maxNdx);
+    }
+    maxNdxNext = maxNdx + sectionInfo[maxNdx].sfbCnt;
+
+    sectionInfo[maxNdxNext - 1].sfbStart = sectionInfo[maxNdx].sfbStart;             
+
+     
+    if (maxNdxNext - maxSfb < 0) {
+      mergeGainLookUp[maxNdx] = CalcMergeGain(sectionInfo,
+                                              bitLookUp,
+                                              sideInfoTab,
+                                              maxNdx,
+                                              maxNdxNext);
+    }
+  }
+}
+
+/*
+  count bits used by the noiseless coder
+*/
+static void
+noiselessCounter(SECTION_DATA *sectionData,
+                 Word16 mergeGainLookUp[MAX_SFB_LONG],
+                 Word16 bitLookUp[MAX_SFB_LONG][CODE_BOOK_ESC_NDX + 1],
+                 const Word16 *quantSpectrum,
+                 const UWord16 *maxValueInSfb,
+                 const Word16 *sfbOffset,
+                 const Word32 blockType)
+{
+  Word32 grpNdx, i;
+  Word16 *sideInfoTab = NULL;
+  SECTION_INFO *sectionInfo;
+
+  /*
+    use appropriate side info table
+  */   
+  switch (blockType)
+  {
+    case LONG_WINDOW:
+    case START_WINDOW:
+    case STOP_WINDOW:
+      sideInfoTab = sideInfoTabLong;
+      break;
+    case SHORT_WINDOW:
+      sideInfoTab = sideInfoTabShort;
+      break;
+  }
+
+
+  sectionData->noOfSections = 0;                                         
+  sectionData->huffmanBits = 0;                                          
+  sectionData->sideInfoBits = 0;                                         
+
+   
+  if (sectionData->maxSfbPerGroup == 0)
+    return;
+
+  /*
+    loop trough groups
+  */
+  for (grpNdx=0; grpNdx<sectionData->sfbCnt; grpNdx+=sectionData->sfbPerGroup) {
+
+    sectionInfo = sectionData->sectionInfo + sectionData->noOfSections;
+
+    buildBitLookUp(quantSpectrum,
+                   sectionData->maxSfbPerGroup,
+                   sfbOffset + grpNdx,
+                   maxValueInSfb + grpNdx,
+                   bitLookUp,
+                   sectionInfo);
+
+    /*
+       0.Stage
+    */
+    gmStage0(sectionInfo, bitLookUp, sectionData->maxSfbPerGroup);
+
+    /*
+       1.Stage
+    */
+    gmStage1(sectionInfo, bitLookUp, sectionData->maxSfbPerGroup, sideInfoTab);
+
+
+    /*
+       2.Stage
+    */
+    gmStage2(sectionInfo,
+             mergeGainLookUp,
+             bitLookUp,
+             sectionData->maxSfbPerGroup,
+             sideInfoTab);
+
+
+    /*
+       compress output, calculate total huff and side bits
+    */
+    for (i=0; i<sectionData->maxSfbPerGroup; i+=sectionInfo[i].sfbCnt) {
+      findBestBook(bitLookUp[i], &(sectionInfo[i].codeBook));
+      sectionInfo[i].sfbStart = sectionInfo[i].sfbStart + grpNdx;
+
+      sectionData->huffmanBits = (sectionData->huffmanBits +
+                                     (sectionInfo[i].sectionBits - sideInfoTab[sectionInfo[i].sfbCnt]));
+      sectionData->sideInfoBits = (sectionData->sideInfoBits + sideInfoTab[sectionInfo[i].sfbCnt]);
+      sectionData->sectionInfo[sectionData->noOfSections] = sectionInfo[i];             
+      sectionData->noOfSections = sectionData->noOfSections + 1;
+    }
+  }
+}
+
+
+/*******************************************************************************
+*
+* functionname: scfCount
+* returns     : ---
+* description : count bits used by scalefactors.
+*
+********************************************************************************/
+static void scfCount(const Word16 *scalefacGain,
+                     const UWord16 *maxValueInSfb,
+                     SECTION_DATA * sectionData)
+
+{
+  SECTION_INFO *psectionInfo;

+  SECTION_INFO *psectionInfom;

+

+  /* counter */
+  Word32 i = 0; /* section counter */
+  Word32 j = 0; /* sfb counter */
+  Word32 k = 0; /* current section auxiliary counter */
+  Word32 m = 0; /* other section auxiliary counter */
+  Word32 n = 0; /* other sfb auxiliary counter */
+
+  /* further variables */
+  Word32 lastValScf     = 0;
+  Word32 deltaScf       = 0;
+  Flag found            = 0;
+  Word32 scfSkipCounter = 0;           
+         
+
+  sectionData->scalefacBits = 0;                                 
+
+   
+  if (scalefacGain == NULL) {
+    return;
+  }
+
+  lastValScf = 0;                                                
+  sectionData->firstScf = 0;        

+  
+  psectionInfo = sectionData->sectionInfo;
+  for (i=0; i<sectionData->noOfSections; i++) {
+     
+    if (psectionInfo->codeBook != CODE_BOOK_ZERO_NO) {
+      sectionData->firstScf = psectionInfo->sfbStart;      
+      lastValScf = scalefacGain[sectionData->firstScf];                  
+      break;
+    }

+	psectionInfo += 1;
+  }

+
+  psectionInfo = sectionData->sectionInfo;
+  for (i=0; i<sectionData->noOfSections; i++, psectionInfo += 1) {
+       
+    if (psectionInfo->codeBook != CODE_BOOK_ZERO_NO
+        && psectionInfo->codeBook != CODE_BOOK_PNS_NO) {
+      for (j = psectionInfo->sfbStart;
+           j < (psectionInfo->sfbStart + psectionInfo->sfbCnt); j++) {
+        /* check if we can repeat the last value to save bits */
+         
+        if (maxValueInSfb[j] == 0) {
+          found = 0;                                                     
+           
+          if (scfSkipCounter == 0) {
+            /* end of section */
+             
+            if (j - ((psectionInfo->sfbStart + psectionInfo->sfbCnt) - 1) == 0) {
+              found = 0;                                                 
+            }
+            else {
+              for (k = j + 1; k < psectionInfo->sfbStart + psectionInfo->sfbCnt; k++) {
+                 
+                if (maxValueInSfb[k] != 0) {
+                  int tmp = L_abs(scalefacGain[k] - lastValScf);
+				  found = 1;                                             
+                   
+                  if ( tmp < CODE_BOOK_SCF_LAV) {
+                    /* save bits */
+                    deltaScf = 0;                                        
+                  }
+                  else {
+                    /* do not save bits */
+                    deltaScf = lastValScf - scalefacGain[j];
+                    lastValScf = scalefacGain[j];                        
+                    scfSkipCounter = 0;                                  
+                  }
+                  break;
+                }
+                /* count scalefactor skip */
+                scfSkipCounter = scfSkipCounter + 1;
+              }
+            }
+			

+			psectionInfom = psectionInfo + 1;
+            /* search for the next maxValueInSfb[] != 0 in all other sections */
+            for (m = i + 1; (m < sectionData->noOfSections) && (found == 0); m++) {
+                 
+              if ((psectionInfom->codeBook != CODE_BOOK_ZERO_NO) &&
+                  (psectionInfom->codeBook != CODE_BOOK_PNS_NO)) {
+                for (n = psectionInfom->sfbStart;
+                     n < (psectionInfom->sfbStart + psectionInfom->sfbCnt); n++) {
+                   
+                  if (maxValueInSfb[n] != 0) {
+                    found = 1;                                           
+                     
+                    if ( (abs_s(scalefacGain[n] - lastValScf) < CODE_BOOK_SCF_LAV)) {
+                      deltaScf = 0;                                      
+                    }
+                    else {
+                      deltaScf = (lastValScf - scalefacGain[j]);
+                      lastValScf = scalefacGain[j];                      
+                      scfSkipCounter = 0;                                
+                    }
+                    break;
+                  }
+                  /* count scalefactor skip */
+                  scfSkipCounter = scfSkipCounter + 1;
+                }
+              }

+

+			  psectionInfom += 1;
+            }
+             
+            if (found == 0) {
+              deltaScf = 0;                                              
+              scfSkipCounter = 0;                                        
+            }
+          }
+          else {
+            deltaScf = 0;                                                
+            scfSkipCounter = scfSkipCounter - 1;
+          }

+        }
+        else {
+          deltaScf = lastValScf - scalefacGain[j];
+          lastValScf = scalefacGain[j];                                  
+        }
+        sectionData->scalefacBits += bitCountScalefactorDelta(deltaScf);
+      }
+    }
+  }
+}
+
+
+typedef Word16 (*lookUpTable)[CODE_BOOK_ESC_NDX + 1];
+
+
+Word16
+dynBitCount(const Word16  *quantSpectrum,
+            const UWord16 *maxValueInSfb,
+            const Word16  *scalefac,
+            const Word16   blockType,
+            const Word16   sfbCnt,
+            const Word16   maxSfbPerGroup,
+            const Word16   sfbPerGroup,
+            const Word16  *sfbOffset,
+            SECTION_DATA  *sectionData)
+{
+  sectionData->blockType      = blockType;                       
+  sectionData->sfbCnt         = sfbCnt;                          
+  sectionData->sfbPerGroup    = sfbPerGroup;           
+  if(sfbPerGroup)
+	sectionData->noOfGroups   = sfbCnt/sfbPerGroup; 
+  else
+	sectionData->noOfGroups   = 0x7fff;
+  sectionData->maxSfbPerGroup = maxSfbPerGroup;                  
+
+  noiselessCounter(sectionData,
+                   sectionData->mergeGainLookUp,
+                   (lookUpTable)sectionData->bitLookUp,
+                   quantSpectrum,
+                   maxValueInSfb,
+                   sfbOffset,
+                   blockType);
+
+  scfCount(scalefac,
+           maxValueInSfb,
+           sectionData);
+
+
+  return (sectionData->huffmanBits + sectionData->sideInfoBits + 

+	      sectionData->scalefacBits);
+}
+
diff --git a/media/libstagefright/codecs/aacenc/src/grp_data.c b/media/libstagefright/codecs/aacenc/src/grp_data.c
new file mode 100644
index 0000000..08d9a76
--- /dev/null
+++ b/media/libstagefright/codecs/aacenc/src/grp_data.c
@@ -0,0 +1,188 @@
+/*

+ ** Copyright 2003-2010, VisualOn, Inc.

+ **

+ ** Licensed under the Apache License, Version 2.0 (the "License");

+ ** you may not use this file except in compliance with the License.

+ ** You may obtain a copy of the License at

+ **

+ **     http://www.apache.org/licenses/LICENSE-2.0

+ **

+ ** Unless required by applicable law or agreed to in writing, software

+ ** distributed under the License is distributed on an "AS IS" BASIS,

+ ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

+ ** See the License for the specific language governing permissions and

+ ** limitations under the License.

+ */

+/*******************************************************************************

+	File:		grp_data.c

+

+	Content:	Short block grouping function

+

+*******************************************************************************/
+
+#include "basic_op.h"

+#include "psy_const.h"
+#include "interface.h"
+#include "grp_data.h"
+
+/*****************************************************************************
+*
+* function name: groupShortData
+* description:  group short data for next quantization and coding
+*
+**********************************************************************************/
+void
+groupShortData(Word32        *mdctSpectrum,
+               Word32        *tmpSpectrum,
+               SFB_THRESHOLD *sfbThreshold,
+               SFB_ENERGY    *sfbEnergy,
+               SFB_ENERGY    *sfbEnergyMS,
+               SFB_ENERGY    *sfbSpreadedEnergy,
+               const Word16   sfbCnt,
+               const Word16  *sfbOffset,
+               const Word16  *sfbMinSnr,
+               Word16        *groupedSfbOffset,
+               Word16        *maxSfbPerGroup,
+               Word16        *groupedSfbMinSnr,
+               const Word16   noOfGroups,
+               const Word16  *groupLen)
+{
+  Word32 i, j;
+  Word32 line;
+  Word32 sfb;
+  Word32 grp;
+  Word32 wnd;
+  Word32 offset;
+  Word32 highestSfb;
+
+  /* for short: regroup and  */
+  /* cumulate energies und thresholds group-wise . */
+  
+  /* calculate sfbCnt */
+  highestSfb = 0;                                        
+  for (wnd=0; wnd<TRANS_FAC; wnd++) {
+    for (sfb=sfbCnt - 1; sfb>=highestSfb; sfb--) {
+      for (line=(sfbOffset[sfb + 1] - 1); line>=sfbOffset[sfb]; line--) {
+        
+        if (mdctSpectrum[wnd*FRAME_LEN_SHORT+line] != 0) break; 
+      }
+      
+      if (line >= sfbOffset[sfb]) break;
+    }
+    highestSfb = max(highestSfb, sfb);
+  }
+  
+  if (highestSfb < 0) {
+    highestSfb = 0;                                      
+  }
+  *maxSfbPerGroup = highestSfb + 1;
+
+  /* calculate sfbOffset */
+  i = 0;                                                 
+  offset = 0;                                            
+  for (grp = 0; grp < noOfGroups; grp++) {
+    for (sfb = 0; sfb < sfbCnt; sfb++) {
+      groupedSfbOffset[i] = offset + sfbOffset[sfb] * groupLen[grp];
+      i += 1;
+    }
+    offset += groupLen[grp] * FRAME_LEN_SHORT;
+  }
+  groupedSfbOffset[i] = FRAME_LEN_LONG;                  
+  i += 1;
+
+  /* calculate minSnr */
+  i = 0;                                                 
+  offset = 0;                                            
+  for (grp = 0; grp < noOfGroups; grp++) {
+    for (sfb = 0; sfb < sfbCnt; sfb++) {
+      groupedSfbMinSnr[i] = sfbMinSnr[sfb];              
+      i += 1;
+    }
+    offset += groupLen[grp] * FRAME_LEN_SHORT;
+  }
+
+
+  /* sum up sfbThresholds */
+  wnd = 0;                                                       
+  i = 0;                                                         
+  for (grp = 0; grp < noOfGroups; grp++) {
+    for (sfb = 0; sfb < sfbCnt; sfb++) {
+      Word32 thresh = sfbThreshold->sfbShort[wnd][sfb];          
+      for (j=1; j<groupLen[grp]; j++) {
+        thresh = L_add(thresh, sfbThreshold->sfbShort[wnd+j][sfb]);
+      }
+      sfbThreshold->sfbLong[i] = thresh;                         
+      i += 1;
+    }
+    wnd += groupLen[grp];
+  }
+
+  /* sum up sfbEnergies left/right */
+  wnd = 0;                                                       
+  i = 0;                                                         
+  for (grp = 0; grp < noOfGroups; grp++) {
+    for (sfb = 0; sfb < sfbCnt; sfb++) {
+      Word32 energy = sfbEnergy->sfbShort[wnd][sfb];             
+      for (j=1; j<groupLen[grp]; j++) {
+        energy = L_add(energy, sfbEnergy->sfbShort[wnd+j][sfb]);
+      }
+      sfbEnergy->sfbLong[i] = energy;                            
+      i += 1;
+    }
+    wnd += groupLen[grp];
+  }
+
+  /* sum up sfbEnergies mid/side */
+  wnd = 0;                                                       
+  i = 0;                                                         
+  for (grp = 0; grp < noOfGroups; grp++) {
+    for (sfb = 0; sfb < sfbCnt; sfb++) {
+      Word32 energy = sfbEnergyMS->sfbShort[wnd][sfb];           
+      for (j=1; j<groupLen[grp]; j++) {
+        energy = L_add(energy, sfbEnergyMS->sfbShort[wnd+j][sfb]);
+      }
+      sfbEnergyMS->sfbLong[i] = energy;                          
+      i += 1;
+    }
+    wnd += groupLen[grp];
+  }
+
+  /* sum up sfbSpreadedEnergies */
+  wnd = 0;                                                       
+  i = 0;                                                         
+  for (grp = 0; grp < noOfGroups; grp++) {
+    for (sfb = 0; sfb < sfbCnt; sfb++) {
+      Word32 energy = sfbSpreadedEnergy->sfbShort[wnd][sfb];     
+      for (j=1; j<groupLen[grp]; j++) {
+        energy = L_add(energy, sfbSpreadedEnergy->sfbShort[wnd+j][sfb]);
+      }
+      sfbSpreadedEnergy->sfbLong[i] = energy;                    
+      i += 1;
+    }
+    wnd += groupLen[grp];
+  }
+
+  /* re-group spectrum */
+  wnd = 0;                                                       
+  i = 0;                                                         
+  for (grp = 0; grp < noOfGroups; grp++) {
+    for (sfb = 0; sfb < sfbCnt; sfb++) {
+      for (j = 0; j < groupLen[grp]; j++) {
+        Word16 lineOffset = FRAME_LEN_SHORT * (wnd + j);
+        for (line = lineOffset + sfbOffset[sfb]; line < lineOffset + sfbOffset[sfb+1]; line++) {
+          tmpSpectrum[i] = mdctSpectrum[line];                   
+          i = i + 1;
+        }
+      }
+    }
+    wnd += groupLen[grp];
+  }
+
+  for(i=0;i<FRAME_LEN_LONG;i+=4) {
+    mdctSpectrum[i] = tmpSpectrum[i];  

+	mdctSpectrum[i+1] = tmpSpectrum[i+1];  

+	mdctSpectrum[i+2] = tmpSpectrum[i+2];  

+	mdctSpectrum[i+3] = tmpSpectrum[i+3];  	
+  }
+}
+
diff --git a/media/libstagefright/codecs/aacenc/src/interface.c b/media/libstagefright/codecs/aacenc/src/interface.c
new file mode 100644
index 0000000..304b1d4
--- /dev/null
+++ b/media/libstagefright/codecs/aacenc/src/interface.c
@@ -0,0 +1,112 @@
+/*

+ ** Copyright 2003-2010, VisualOn, Inc.

+ **

+ ** Licensed under the Apache License, Version 2.0 (the "License");

+ ** you may not use this file except in compliance with the License.

+ ** You may obtain a copy of the License at

+ **

+ **     http://www.apache.org/licenses/LICENSE-2.0

+ **

+ ** Unless required by applicable law or agreed to in writing, software

+ ** distributed under the License is distributed on an "AS IS" BASIS,

+ ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

+ ** See the License for the specific language governing permissions and

+ ** limitations under the License.

+ */

+/*******************************************************************************

+	File:		interface.c

+

+	Content:	Interface psychoaccoustic/quantizer functions

+

+*******************************************************************************/
+
+#include "basic_op.h"

+#include "oper_32b.h"

+#include "psy_const.h"
+#include "interface.h"
+
+/*****************************************************************************
+*
+* function name: BuildInterface
+* description:  update output parameter
+*
+**********************************************************************************/
+void BuildInterface(Word32                  *groupedMdctSpectrum,
+                    const Word16             mdctScale,
+                    SFB_THRESHOLD           *groupedSfbThreshold,
+                    SFB_ENERGY              *groupedSfbEnergy,
+                    SFB_ENERGY              *groupedSfbSpreadedEnergy,
+                    const SFB_ENERGY_SUM     sfbEnergySumLR,
+                    const SFB_ENERGY_SUM     sfbEnergySumMS,
+                    const Word16             windowSequence,
+                    const Word16             windowShape,
+                    const Word16             groupedSfbCnt,
+                    const Word16            *groupedSfbOffset,
+                    const Word16             maxSfbPerGroup,
+                    const Word16            *groupedSfbMinSnr,
+                    const Word16             noOfGroups,
+                    const Word16            *groupLen,
+                    PSY_OUT_CHANNEL         *psyOutCh)
+{
+  Word32 j;
+  Word32 grp; 
+  Word32 mask;

+  Word16 *tmpV;
+
+  /*
+  copy values to psyOut
+  */
+  psyOutCh->maxSfbPerGroup    = maxSfbPerGroup;                             
+  psyOutCh->sfbCnt            = groupedSfbCnt;   
+  if(noOfGroups)
+	psyOutCh->sfbPerGroup     = groupedSfbCnt/ noOfGroups;
+  else
+	psyOutCh->sfbPerGroup     = 0x7fff;
+  psyOutCh->windowSequence    = windowSequence;                             
+  psyOutCh->windowShape       = windowShape;                                
+  psyOutCh->mdctScale         = mdctScale;                                  
+  psyOutCh->mdctSpectrum      = groupedMdctSpectrum;
+  psyOutCh->sfbEnergy         = groupedSfbEnergy->sfbLong;
+  psyOutCh->sfbThreshold      = groupedSfbThreshold->sfbLong;
+  psyOutCh->sfbSpreadedEnergy = groupedSfbSpreadedEnergy->sfbLong;
+  
+  tmpV = psyOutCh->sfbOffsets;

+  for(j=0; j<groupedSfbCnt + 1; j++) {
+      *tmpV++ = groupedSfbOffset[j];
+  }
+  

+  tmpV = psyOutCh->sfbMinSnr;
+  for(j=0;j<groupedSfbCnt; j++) {
+	  *tmpV++ =   groupedSfbMinSnr[j];
+  }
+  
+  /* generate grouping mask */
+  mask = 0;                                                                      
+  for (grp = 0; grp < noOfGroups; grp++) {
+    mask = mask << 1;
+    for (j=1; j<groupLen[grp]; j++) {
+      mask = mask << 1;
+      mask |= 1;                                                                 
+    }
+  }
+  psyOutCh->groupingMask = mask; 
+  
+  if (windowSequence != SHORT_WINDOW) {
+    psyOutCh->sfbEnSumLR =  sfbEnergySumLR.sfbLong;                              
+    psyOutCh->sfbEnSumMS =  sfbEnergySumMS.sfbLong;                              
+  }
+  else {
+    Word32 i;
+    Word32 accuSumMS=0;
+    Word32 accuSumLR=0;        

+	Word32 *pSumMS = sfbEnergySumMS.sfbShort;

+	Word32 *pSumLR = sfbEnergySumLR.sfbShort;
+
+    for (i=TRANS_FAC; i; i--) {
+      accuSumLR = L_add(accuSumLR, *pSumLR); pSumLR++;
+      accuSumMS = L_add(accuSumMS, *pSumMS); pSumMS++;
+    }
+    psyOutCh->sfbEnSumMS = accuSumMS;                                            
+    psyOutCh->sfbEnSumLR = accuSumLR;                                            
+  }
+}
diff --git a/media/libstagefright/codecs/aacenc/src/line_pe.c b/media/libstagefright/codecs/aacenc/src/line_pe.c
new file mode 100644
index 0000000..da57647
--- /dev/null
+++ b/media/libstagefright/codecs/aacenc/src/line_pe.c
@@ -0,0 +1,145 @@
+/*

+ ** Copyright 2003-2010, VisualOn, Inc.

+ **

+ ** Licensed under the Apache License, Version 2.0 (the "License");

+ ** you may not use this file except in compliance with the License.

+ ** You may obtain a copy of the License at

+ **

+ **     http://www.apache.org/licenses/LICENSE-2.0

+ **

+ ** Unless required by applicable law or agreed to in writing, software

+ ** distributed under the License is distributed on an "AS IS" BASIS,

+ ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

+ ** See the License for the specific language governing permissions and

+ ** limitations under the License.

+ */

+/*******************************************************************************

+	File:		line_pe.c

+

+	Content:	Perceptual entropie module functions

+

+*******************************************************************************/

+
+#include "basic_op.h"

+#include "oper_32b.h"
+#include "typedef.h"
+#include "line_pe.h"
+
+
+static const Word16  C1_I = 12;    /* log(8.0)/log(2) *4         */
+static const Word32  C2_I = 10830; /* log(2.5)/log(2) * 1024 * 4 * 2 */
+static const Word16  C3_I = 573;   /* (1-C2/C1) *1024            */
+
+
+/*****************************************************************************
+*
+* function name: prepareSfbPe
+* description:  constants that do not change during successive pe calculations
+*
+**********************************************************************************/
+void prepareSfbPe(PE_DATA *peData,
+                  PSY_OUT_CHANNEL  psyOutChannel[MAX_CHANNELS],
+                  Word16 logSfbEnergy[MAX_CHANNELS][MAX_GROUPED_SFB],
+                  Word16 sfbNRelevantLines[MAX_CHANNELS][MAX_GROUPED_SFB],
+                  const Word16 nChannels,
+                  const Word16 peOffset)
+{
+  Word32 sfbGrp, sfb;
+  Word32 ch;     
+
+  for(ch=0; ch<nChannels; ch++) {
+    PSY_OUT_CHANNEL *psyOutChan = &psyOutChannel[ch];
+    PE_CHANNEL_DATA *peChanData=&peData->peChannelData[ch];
+    for(sfbGrp=0;sfbGrp<psyOutChan->sfbCnt; sfbGrp+=psyOutChan->sfbPerGroup){
+      for (sfb=0; sfb<psyOutChan->maxSfbPerGroup; sfb++) {
+	    peChanData->sfbNLines4[sfbGrp+sfb] = sfbNRelevantLines[ch][sfbGrp+sfb];          
+        sfbNRelevantLines[ch][sfbGrp+sfb] = sfbNRelevantLines[ch][sfbGrp+sfb] >> 2;    
+	    peChanData->sfbLdEnergy[sfbGrp+sfb] = logSfbEnergy[ch][sfbGrp+sfb];              
+      }
+    }
+  }
+  peData->offset = peOffset;                                                             
+}
+
+
+/*****************************************************************************
+*
+* function name: calcSfbPe
+* description:  constPart is sfbPe without the threshold part n*ld(thr) or n*C3*ld(thr)
+*
+**********************************************************************************/
+void calcSfbPe(PE_DATA *peData,
+               PSY_OUT_CHANNEL psyOutChannel[MAX_CHANNELS],
+               const Word16 nChannels)
+{
+  Word32 ch;
+  Word32 sfbGrp, sfb;
+  Word32 nLines4;
+  Word32 ldThr, ldRatio;

+  Word32 pe, constPart, nActiveLines;
+
+  peData->pe = peData->offset;                                           
+  peData->constPart = 0;                                                 
+  peData->nActiveLines = 0;                                              
+  for(ch=0; ch<nChannels; ch++) {
+    PSY_OUT_CHANNEL *psyOutChan = &psyOutChannel[ch];
+    PE_CHANNEL_DATA *peChanData = &peData->peChannelData[ch];
+    const Word32 *sfbEnergy = psyOutChan->sfbEnergy;
+    const Word32 *sfbThreshold = psyOutChan->sfbThreshold;
+
+    pe = 0;                                                  
+    constPart = 0;                                           
+    nActiveLines = 0;                                        
+
+    for(sfbGrp=0; sfbGrp<psyOutChan->sfbCnt; sfbGrp+=psyOutChan->sfbPerGroup) {
+      for (sfb=0; sfb<psyOutChan->maxSfbPerGroup; sfb++) {
+        Word32 nrg = sfbEnergy[sfbGrp+sfb];                             
+        Word32 thres = sfbThreshold[sfbGrp+sfb];                           
+        Word32 sfbLDEn = peChanData->sfbLdEnergy[sfbGrp+sfb];

+
+        if (nrg > thres) {
+          ldThr = iLog4(thres);
+
+          ldRatio = sfbLDEn - ldThr;
+
+          nLines4 = peChanData->sfbNLines4[sfbGrp+sfb];                    
+           
+          /* sfbPe = nl*log2(en/thr)*/
+		  if (ldRatio >= C1_I) {
+            peChanData->sfbPe[sfbGrp+sfb] = (nLines4*ldRatio + 8) >> 4;
+            peChanData->sfbConstPart[sfbGrp+sfb] = ((nLines4*sfbLDEn)) >> 4;
+          }
+          else {
+		  /* sfbPe = nl*(c2 + c3*log2(en/thr))*/
+            peChanData->sfbPe[sfbGrp+sfb] = extract_l((L_mpy_wx(

+                    (C2_I + C3_I * ldRatio * 2) << 4, nLines4) + 4) >> 3);

+            peChanData->sfbConstPart[sfbGrp+sfb] = extract_l(( L_mpy_wx(

+                    (C2_I + C3_I * sfbLDEn * 2) << 4, nLines4) + 4) >> 3);

+            nLines4 = (nLines4 * C3_I + (1024<<1)) >> 10;
+          }
+          peChanData->sfbNActiveLines[sfbGrp+sfb] = nLines4 >> 2;
+        }
+        else {
+          peChanData->sfbPe[sfbGrp+sfb] = 0;                             
+          peChanData->sfbConstPart[sfbGrp+sfb] = 0;                      
+          peChanData->sfbNActiveLines[sfbGrp+sfb] = 0;                   
+        }
+        pe = pe + peChanData->sfbPe[sfbGrp+sfb];
+        constPart = constPart + peChanData->sfbConstPart[sfbGrp+sfb];
+        nActiveLines = nActiveLines + peChanData->sfbNActiveLines[sfbGrp+sfb];
+      }
+    }
+	

+	peChanData->pe = saturate(pe);                                                  

+    peChanData->constPart = saturate(constPart);                                           

+    peChanData->nActiveLines = saturate(nActiveLines);                                        

+
+    
+	pe += peData->pe;
+	peData->pe = saturate(pe); 
+    constPart += peData->constPart;
+	peData->constPart = saturate(constPart); 
+    nActiveLines += peData->nActiveLines;
+	peData->nActiveLines = saturate(nActiveLines);
+  } 
+}
diff --git a/media/libstagefright/codecs/aacenc/src/memalign.c b/media/libstagefright/codecs/aacenc/src/memalign.c
new file mode 100644
index 0000000..7d203527
--- /dev/null
+++ b/media/libstagefright/codecs/aacenc/src/memalign.c
@@ -0,0 +1,107 @@
+/*
+ ** Copyright 2003-2010, VisualOn, Inc.
+ **
+ ** Licensed under the Apache License, Version 2.0 (the "License");
+ ** you may not use this file except in compliance with the License.
+ ** You may obtain a copy of the License at
+ **
+ **     http://www.apache.org/licenses/LICENSE-2.0
+ **
+ ** Unless required by applicable law or agreed to in writing, software
+ ** distributed under the License is distributed on an "AS IS" BASIS,
+ ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ ** See the License for the specific language governing permissions and
+ ** limitations under the License.
+ */
+
+/*******************************************************************************
+	File:		mem_align.c
+
+	Content:	Memory alloc alignments functions
+
+*******************************************************************************/
+
+
+#include	"memalign.h"
+
+/*****************************************************************************
+*
+* function name: mem_malloc
+* description:  malloc the alignments memory 
+* returns:      the point of the memory
+*
+**********************************************************************************/
+void *
+mem_malloc(VO_MEM_OPERATOR *pMemop, unsigned int size, unsigned char alignment, unsigned int CodecID)
+{
+	int ret;
+	unsigned char *mem_ptr;
+	VO_MEM_INFO MemInfo;
+
+	if (!alignment) {
+
+		MemInfo.Flag = 0;
+		MemInfo.Size = size + 1;
+		ret = pMemop->Alloc(CodecID, &MemInfo);
+		if(ret != 0)
+			return 0;
+		mem_ptr = (unsigned char *)MemInfo.VBuffer;
+
+		pMemop->Set(CodecID, mem_ptr, 0, size + 1);
+
+		*mem_ptr = (unsigned char)1;
+
+		return ((void *)(mem_ptr+1));
+	} else {
+		unsigned char *tmp;
+
+		MemInfo.Flag = 0;
+		MemInfo.Size = size + alignment;
+		ret = pMemop->Alloc(CodecID, &MemInfo);
+		if(ret != 0)
+			return 0;
+
+		tmp = (unsigned char *)MemInfo.VBuffer;
+
+		pMemop->Set(CodecID, tmp, 0, size + alignment);
+
+		mem_ptr =
+			(unsigned char *) ((unsigned int) (tmp + alignment - 1) &
+					(~((unsigned int) (alignment - 1))));
+
+		if (mem_ptr == tmp)
+			mem_ptr += alignment;
+
+		*(mem_ptr - 1) = (unsigned char) (mem_ptr - tmp);
+
+		return ((void *)mem_ptr);
+	}
+
+	return(0);
+}
+
+
+/*****************************************************************************
+*
+* function name: mem_free
+* description:  free the memory
+*
+*******************************************************************************/
+void
+mem_free(VO_MEM_OPERATOR *pMemop, void *mem_ptr, unsigned int CodecID)
+{
+
+	unsigned char *ptr;
+
+	if (mem_ptr == 0)
+		return;
+
+	ptr = mem_ptr;
+
+	ptr -= *(ptr - 1);
+
+	pMemop->Free(CodecID, ptr);
+}
+
+
+
diff --git a/media/libstagefright/codecs/aacenc/src/ms_stereo.c b/media/libstagefright/codecs/aacenc/src/ms_stereo.c
new file mode 100644
index 0000000..c83d07b
--- /dev/null
+++ b/media/libstagefright/codecs/aacenc/src/ms_stereo.c
@@ -0,0 +1,139 @@
+/*

+ ** Copyright 2003-2010, VisualOn, Inc.

+ **

+ ** Licensed under the Apache License, Version 2.0 (the "License");

+ ** you may not use this file except in compliance with the License.

+ ** You may obtain a copy of the License at

+ **

+ **     http://www.apache.org/licenses/LICENSE-2.0

+ **

+ ** Unless required by applicable law or agreed to in writing, software

+ ** distributed under the License is distributed on an "AS IS" BASIS,

+ ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

+ ** See the License for the specific language governing permissions and

+ ** limitations under the License.

+ */

+/*******************************************************************************

+	File:		ms_stereo.c

+

+	Content:	MS stereo processing function

+

+*******************************************************************************/
+
+#include "basic_op.h"

+#include "oper_32b.h"
+#include "psy_const.h"
+#include "ms_stereo.h"
+
+
+/********************************************************************************
+*
+* function name: MsStereoProcessing
+* description:  detect use ms stereo or not
+*				if ((min(thrLn, thrRn)*min(thrLn, thrRn))/(enMn*enSn)) 
+*				>= ((thrLn *thrRn)/(enLn*enRn)) then ms stereo
+*
+**********************************************************************************/
+void MsStereoProcessing(Word32       *sfbEnergyLeft,
+                        Word32       *sfbEnergyRight,
+                        const Word32 *sfbEnergyMid,
+                        const Word32 *sfbEnergySide,
+                        Word32       *mdctSpectrumLeft,
+                        Word32       *mdctSpectrumRight,
+                        Word32       *sfbThresholdLeft,
+                        Word32       *sfbThresholdRight,
+                        Word32       *sfbSpreadedEnLeft,
+                        Word32       *sfbSpreadedEnRight,
+                        Word16       *msDigest,
+                        Word16       *msMask,
+                        const Word16  sfbCnt,
+                        const Word16  sfbPerGroup,
+                        const Word16  maxSfbPerGroup,
+                        const Word16 *sfbOffset) {
+  Word32 temp;
+  Word32 sfb,sfboffs, j; 
+  Word32 msMaskTrueSomewhere = 0;
+  Word32 msMaskFalseSomewhere = 0;
+
+  for (sfb=0; sfb<sfbCnt; sfb+=sfbPerGroup) {
+    for (sfboffs=0;sfboffs<maxSfbPerGroup;sfboffs++) {
+
+      Word32 temp;
+      Word32 pnlr,pnms;
+      Word32 minThreshold;
+      Word32 thrL, thrR, nrgL, nrgR;
+      Word32 idx, shift;
+
+      idx = sfb + sfboffs;                                                                       
+
+      thrL = sfbThresholdLeft[idx];                                                                 
+      thrR = sfbThresholdRight[idx];                                                                
+      nrgL = sfbEnergyLeft[idx];                                                                    
+      nrgR = sfbEnergyRight[idx];                                                                   
+
+      minThreshold = min(thrL, thrR);
+
+      nrgL = max(nrgL,thrL) + 1;
+      shift = norm_l(nrgL);

+	  nrgL = Div_32(thrL << shift, nrgL << shift);
+      nrgR = max(nrgR,thrR) + 1;
+      shift = norm_l(nrgR);

+	  nrgR = Div_32(thrR << shift, nrgR << shift);
+
+	  pnlr = fixmul(nrgL, nrgR);
+
+      nrgL = sfbEnergyMid[idx];                                                                     
+      nrgR = sfbEnergySide[idx];                                                                    
+
+      nrgL = max(nrgL,minThreshold) + 1;
+      shift = norm_l(nrgL);

+	  nrgL = Div_32(minThreshold << shift, nrgL << shift);
+
+      nrgR = max(nrgR,minThreshold) + 1;
+      shift = norm_l(nrgR);

+	  nrgR = Div_32(minThreshold << shift, nrgR << shift);
+
+      pnms = fixmul(nrgL, nrgR);
+
+      temp = (pnlr + 1) / ((pnms >> 8) + 1);
+
+      temp = pnms - pnlr;                                                                     
+      if( temp > 0 ){
+
+        msMask[idx] = 1;                                                                            
+        msMaskTrueSomewhere = 1;                                                                    
+
+        for (j=sfbOffset[idx]; j<sfbOffset[idx+1]; j++) {
+          Word32 left, right;
+          left  = (mdctSpectrumLeft[j] >>  1);
+          right = (mdctSpectrumRight[j] >> 1);
+          mdctSpectrumLeft[j] =  left + right;                                               
+          mdctSpectrumRight[j] =  left - right;                                              
+        }
+        
+        sfbThresholdLeft[idx] = minThreshold;                                                       
+        sfbThresholdRight[idx] = minThreshold;                                                      
+        sfbEnergyLeft[idx] = sfbEnergyMid[idx];                                                     
+        sfbEnergyRight[idx] = sfbEnergySide[idx];                                                   
+
+        sfbSpreadedEnRight[idx] = min(sfbSpreadedEnLeft[idx],sfbSpreadedEnRight[idx]) >> 1;  
+        sfbSpreadedEnLeft[idx] = sfbSpreadedEnRight[idx];                                           
+        
+      }
+      else {
+        msMask[idx]  = 0;                                                                           
+        msMaskFalseSomewhere = 1;                                                                   
+      }
+    }                                                                                               
+    if ( msMaskTrueSomewhere ) {                                                                    
+      if(msMaskFalseSomewhere ) {
+        *msDigest = SI_MS_MASK_SOME;                                                                
+      } else {
+        *msDigest = SI_MS_MASK_ALL;                                                                 
+      }
+    } else {
+      *msDigest = SI_MS_MASK_NONE;                                                                  
+    }
+  }
+
+}
diff --git a/media/libstagefright/codecs/aacenc/src/pre_echo_control.c b/media/libstagefright/codecs/aacenc/src/pre_echo_control.c
new file mode 100644
index 0000000..f59216e
--- /dev/null
+++ b/media/libstagefright/codecs/aacenc/src/pre_echo_control.c
@@ -0,0 +1,113 @@
+/*

+ ** Copyright 2003-2010, VisualOn, Inc.

+ **

+ ** Licensed under the Apache License, Version 2.0 (the "License");

+ ** you may not use this file except in compliance with the License.

+ ** You may obtain a copy of the License at

+ **

+ **     http://www.apache.org/licenses/LICENSE-2.0

+ **

+ ** Unless required by applicable law or agreed to in writing, software

+ ** distributed under the License is distributed on an "AS IS" BASIS,

+ ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

+ ** See the License for the specific language governing permissions and

+ ** limitations under the License.

+ */

+/*******************************************************************************

+	File:		pre_echo_control.c

+

+	Content:	Pre echo control functions

+

+*******************************************************************************/
+
+#include "basic_op.h"

+#include "oper_32b.h"

+
+#include "oper_32b.h"
+#include "pre_echo_control.h"
+
+
+/*****************************************************************************
+*
+* function name:InitPreEchoControl 
+* description: init pre echo control parameter
+*
+*****************************************************************************/
+void InitPreEchoControl(Word32 *pbThresholdNm1,
+                        Word16  numPb,
+                        Word32 *pbThresholdQuiet)
+{
+  Word16 pb;
+
+  for(pb=0; pb<numPb; pb++) {
+    pbThresholdNm1[pb] = pbThresholdQuiet[pb];                                   
+  }
+}
+
+/*****************************************************************************
+*
+* function name:PreEchoControl 
+* description: update shreshold to avoid pre echo
+*			   thr(n) = max(rpmin*thrq(n), min(thrq(n), rpelev*thrq1(n)))
+*
+*
+*****************************************************************************/
+void PreEchoControl(Word32 *pbThresholdNm1,
+                    Word16  numPb,
+                    Word32  maxAllowedIncreaseFactor,
+                    Word16  minRemainingThresholdFactor,
+                    Word32 *pbThreshold,
+                    Word16  mdctScale,
+                    Word16  mdctScalenm1)
+{
+  Word32 i;
+  Word32 tmpThreshold1, tmpThreshold2;
+  Word32 scaling;
+
+  /* maxAllowedIncreaseFactor is hard coded to 2 */
+  (void)maxAllowedIncreaseFactor;
+
+  scaling = ((mdctScale - mdctScalenm1) << 1);
+   
+  if ( scaling > 0 ) {
+    for(i = 0; i < numPb; i++) {
+      tmpThreshold1 = pbThresholdNm1[i] >> (scaling-1);
+      tmpThreshold2 = L_mpy_ls(pbThreshold[i], minRemainingThresholdFactor);
+
+      /* copy thresholds to internal memory */
+      pbThresholdNm1[i] = pbThreshold[i];                                        
+
+       
+      if(pbThreshold[i] > tmpThreshold1) {
+        pbThreshold[i] = tmpThreshold1;                                          
+      }
+       
+      if(tmpThreshold2 > pbThreshold[i]) {
+        pbThreshold[i] = tmpThreshold2;                                          
+      }
+
+    }
+  }
+  else {
+    scaling = -scaling;
+    for(i = 0; i < numPb; i++) {
+
+      tmpThreshold1 = pbThresholdNm1[i] << 1;
+      tmpThreshold2 = L_mpy_ls(pbThreshold[i], minRemainingThresholdFactor);
+
+      /* copy thresholds to internal memory */
+      pbThresholdNm1[i] = pbThreshold[i];                                        
+
+       
+      if(((pbThreshold[i] >> scaling) > tmpThreshold1)) {
+        pbThreshold[i] = tmpThreshold1 << scaling;
+      }
+       
+      if(tmpThreshold2 > pbThreshold[i]) {
+        pbThreshold[i] = tmpThreshold2;                                          
+      }
+
+    }
+  }
+}
+
diff --git a/media/libstagefright/codecs/aacenc/src/psy_configuration.c b/media/libstagefright/codecs/aacenc/src/psy_configuration.c
new file mode 100644
index 0000000..586e00f
--- /dev/null
+++ b/media/libstagefright/codecs/aacenc/src/psy_configuration.c
@@ -0,0 +1,505 @@
+/*

+ ** Copyright 2003-2010, VisualOn, Inc.

+ **

+ ** Licensed under the Apache License, Version 2.0 (the "License");

+ ** you may not use this file except in compliance with the License.

+ ** You may obtain a copy of the License at

+ **

+ **     http://www.apache.org/licenses/LICENSE-2.0

+ **

+ ** Unless required by applicable law or agreed to in writing, software

+ ** distributed under the License is distributed on an "AS IS" BASIS,

+ ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

+ ** See the License for the specific language governing permissions and

+ ** limitations under the License.

+ */

+/*******************************************************************************

+	File:		psy_configuration.c

+

+	Content:	Psychoaccoustic configuration functions

+

+*******************************************************************************/
+
+#include "basic_op.h"

+#include "oper_32b.h"
+#include "psy_configuration.h"
+#include "adj_thr.h"
+#include "aac_rom.h"
+
+
+
+#define BARC_SCALE	100 /* integer barc values are scaled with 100 */
+#define LOG2_1000	301 /* log2*1000 */

+#define PI2_1000	1571 /* pi/2*1000*/

+#define ATAN_COEF1	3560 /* 1000/0.280872f*/

+#define ATAN_COEF2	281 /* 1000*0.280872f*/

+
+
+typedef struct{
+  Word32 sampleRate;
+  const UWord8 *paramLong;
+  const UWord8 *paramShort;
+}SFB_INFO_TAB;
+
+static const Word16 ABS_LEV = 20;
+static const Word16 BARC_THR_QUIET[] = {15, 10,  7,  2,  0,  0,  0,  0,  0,  0,
+                                         0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+                                         3,  5, 10, 20, 30};
+
+
+
+static const Word16 max_bark = 24; /* maximum bark-value */
+static const Word16 maskLow  = 30; /* in 1dB/bark */
+static const Word16 maskHigh = 15; /* in 1*dB/bark */
+static const Word16 c_ratio  = 0x0029; /* pow(10.0f, -(29.0f/10.0f)) */
+
+static const Word16 maskLowSprEnLong = 30;       /* in 1dB/bark */
+static const Word16 maskHighSprEnLong = 20;      /* in 1dB/bark */
+static const Word16 maskHighSprEnLongLowBr = 15; /* in 1dB/bark */
+static const Word16 maskLowSprEnShort = 20;      /* in 1dB/bark */
+static const Word16 maskHighSprEnShort = 15;     /* in 1dB/bark */

+static const Word16 c_minRemainingThresholdFactor = 0x0148;    /* 0.01 *(1 << 15)*/

+static const Word32 c_maxsnr = 0x66666666;		 /* upper limit is -1 dB */

+static const Word32 c_minsnr = 0x00624dd3;		 /* lower limit is -25 dB */

+

+static const Word32 c_maxClipEnergyLong = 0x77359400;  /* 2.0e9f*/

+static const Word32 c_maxClipEnergyShort = 0x01dcd650; /* 2.0e9f/(AACENC_TRANS_FAC*AACENC_TRANS_FAC)*/

+

+

+Word32 GetSRIndex(Word32 sampleRate)

+{

+    if (92017 <= sampleRate) return 0;

+    if (75132 <= sampleRate) return 1;

+    if (55426 <= sampleRate) return 2;

+    if (46009 <= sampleRate) return 3;

+    if (37566 <= sampleRate) return 4;

+    if (27713 <= sampleRate) return 5;

+    if (23004 <= sampleRate) return 6;

+    if (18783 <= sampleRate) return 7;

+    if (13856 <= sampleRate) return 8;

+    if (11502 <= sampleRate) return 9;

+    if (9391 <= sampleRate) return 10;

+

+    return 11;

+}
+
+
+/*********************************************************************************
+*
+* function name: atan_1000
+* description:  calculates 1000*atan(x/1000)
+*               based on atan approx for x > 0				
+*				atan(x) = x/((float)1.0f+(float)0.280872f*x*x)  if x < 1

+*						= pi/2 - x/((float)0.280872f +x*x)	    if x >= 1

+* return:       1000*atan(x/1000)
+*
+**********************************************************************************/
+static Word16 atan_1000(Word32 val) 
+{
+  Word32 y;
+
+   
+  if(L_sub(val, 1000) < 0) {
+    y = extract_l(((1000 * val) / (1000 + ((val * val) / ATAN_COEF1))));
+  }
+  else {
+    y = PI2_1000 - ((1000 * val) / (ATAN_COEF2 + ((val * val) / 1000)));
+  }
+
+  return extract_l(y);
+}
+
+
+/*****************************************************************************
+*
+* function name: BarcLineValue
+* description:  Calculates barc value for one frequency line
+* returns:      barc value of line * BARC_SCALE
+* input:        number of lines in transform, index of line to check, Fs
+* output:
+*
+*****************************************************************************/
+static Word16 BarcLineValue(Word16 noOfLines, Word16 fftLine, Word32 samplingFreq)
+{
+  Word32 center_freq, temp, bvalFFTLine;
+
+  /* center frequency of fft line */
+  center_freq = (fftLine * samplingFreq) / (noOfLines << 1);
+  temp =  atan_1000((center_freq << 2) / (3*10));
+  bvalFFTLine = 
+    (26600 * atan_1000((center_freq*76) / 100) + 7*temp*temp) / (2*1000*1000 / BARC_SCALE);
+  
+  return saturate(bvalFFTLine);
+}
+
+/*****************************************************************************
+*
+* function name: initThrQuiet
+* description:  init thredhold in quiet
+*
+*****************************************************************************/
+static void initThrQuiet(Word16  numPb,
+                         Word16 *pbOffset,
+                         Word16 *pbBarcVal,
+                         Word32 *pbThresholdQuiet) {
+  Word16 i;
+  Word16 barcThrQuiet;
+
+  for(i=0; i<numPb; i++) {
+    Word16 bv1, bv2;
+
+     
+    if (i>0)
+      bv1 = (pbBarcVal[i] + pbBarcVal[i-1]) >> 1;
+    else
+      bv1 = pbBarcVal[i] >> 1;
+
+     
+    if (i < (numPb - 1))
+      bv2 = (pbBarcVal[i] + pbBarcVal[i+1]) >> 1;
+    else {
+      bv2 = pbBarcVal[i];                                        
+    }
+
+    bv1 = min((bv1 / BARC_SCALE), max_bark);
+    bv2 = min((bv2 / BARC_SCALE), max_bark);
+
+    barcThrQuiet = min(BARC_THR_QUIET[bv1], BARC_THR_QUIET[bv2]);
+
+    
+    /*
+      we calculate 
+      pow(10.0f,(float)(barcThrQuiet - ABS_LEV)*0.1)*(float)ABS_LOW*(pbOffset[i+1] - pbOffset[i]);
+    */
+
+    pbThresholdQuiet[i] = pow2_xy((((barcThrQuiet - ABS_LEV) * 100) +
+                          LOG2_1000*(14+2*LOG_NORM_PCM)), LOG2_1000) * (pbOffset[i+1] - pbOffset[i]);
+  }
+}
+
+
+/*****************************************************************************
+*
+* function name: initSpreading
+* description:  init energy spreading parameter
+*
+*****************************************************************************/
+static void initSpreading(Word16  numPb,
+                          Word16 *pbBarcValue,
+                          Word16 *pbMaskLoFactor,
+                          Word16 *pbMaskHiFactor,
+                          Word16 *pbMaskLoFactorSprEn,
+                          Word16 *pbMaskHiFactorSprEn,
+                          const Word32 bitrate,
+                          const Word16 blockType)
+{
+  Word16 i;
+  Word16 maskLowSprEn, maskHighSprEn;
+
+   
+  if (sub(blockType, SHORT_WINDOW) != 0) {
+    maskLowSprEn = maskLowSprEnLong;                                     
+       
+    if (bitrate > 22000)
+      maskHighSprEn = maskHighSprEnLong;
+    else
+      maskHighSprEn = maskHighSprEnLongLowBr;
+  }
+  else {
+    maskLowSprEn = maskLowSprEnShort;            
+    maskHighSprEn = maskHighSprEnShort;          
+  }
+
+  for(i=0; i<numPb; i++) {
+     
+    if (i > 0) {
+      Word32 dbVal;
+      Word16 dbark = pbBarcValue[i] - pbBarcValue[i-1];
+
+      /*
+        we calulate pow(10.0f, -0.1*dbVal/BARC_SCALE) 
+      */
+      dbVal = (maskHigh * dbark);
+      pbMaskHiFactor[i] = round16(pow2_xy(L_negate(dbVal), (Word32)LOG2_1000));             /* 0.301 log10(2) */
+       
+      dbVal = (maskLow * dbark);
+      pbMaskLoFactor[i-1] = round16(pow2_xy(L_negate(dbVal),(Word32)LOG2_1000)); 
+       
+      
+      dbVal = (maskHighSprEn * dbark);
+      pbMaskHiFactorSprEn[i] =  round16(pow2_xy(L_negate(dbVal),(Word32)LOG2_1000)); 
+      dbVal = (maskLowSprEn * dbark);
+      pbMaskLoFactorSprEn[i-1] = round16(pow2_xy(L_negate(dbVal),(Word32)LOG2_1000));
+    }
+    else {
+      pbMaskHiFactor[i] = 0;                     
+      pbMaskLoFactor[numPb-1] = 0;               
+
+      pbMaskHiFactorSprEn[i] = 0;                
+      pbMaskLoFactorSprEn[numPb-1] = 0;          
+    }
+  }
+
+}
+
+
+/*****************************************************************************
+*
+* function name: initBarcValues
+* description:  init bark value
+*
+*****************************************************************************/
+static void initBarcValues(Word16  numPb,
+                           Word16 *pbOffset,
+                           Word16  numLines,
+                           Word32  samplingFrequency,
+                           Word16 *pbBval)
+{
+  Word16 i;
+  Word16 pbBval0, pbBval1;
+
+  pbBval0 = 0;                                       
+
+  for(i=0; i<numPb; i++){
+    pbBval1 = BarcLineValue(numLines, pbOffset[i+1], samplingFrequency);
+    pbBval[i] = (pbBval0 + pbBval1) >> 1;
+    pbBval0 = pbBval1;                              
+  }
+}
+
+
+/*****************************************************************************
+*
+* function name: initMinSnr
+* description:  calculate min snr parameter
+*				minSnr(n) = 1/(2^sfbPemin(n)/w(n) - 1.5)

+*
+*****************************************************************************/
+static void initMinSnr(const Word32  bitrate,
+                       const Word32  samplerate,
+                       const Word16  numLines,
+                       const Word16 *sfbOffset,
+                       const Word16 *pbBarcVal,
+                       const Word16  sfbActive,
+                       Word16       *sfbMinSnr)
+{
+  Word16 sfb;
+  Word16 barcWidth;
+  Word16 pePerWindow;
+  Word32 pePart;
+  Word32 snr;
+  Word16 pbVal0, pbVal1, shift;
+
+  /* relative number of active barks */
+
+
+  pePerWindow = bits2pe(extract_l((bitrate * numLines) / samplerate));
+
+  pbVal0 = 0;                                                    
+
+  for (sfb=0; sfb<sfbActive; sfb++) {
+
+    pbVal1 = (pbBarcVal[sfb] << 1) - pbVal0;
+    barcWidth = pbVal1 - pbVal0;
+    pbVal0 = pbVal1;                                             
+
+    /* allow at least 2.4% of pe for each active barc */

+	pePart = ((pePerWindow * 24) * (max_bark * barcWidth)) /
+        (pbBarcVal[sfbActive-1] * (sfbOffset[sfb+1] - sfbOffset[sfb]));
+   
+      
+    pePart = min(pePart, 8400); 
+    pePart = max(pePart, 1400);
+
+    /* minSnr(n) = 1/(2^sfbPemin(n)/w(n) - 1.5)*/

+	/* we add an offset of 2^16 to the pow functions */
+	/* 0xc000 = 1.5*(1 << 15)*/

+      
+    snr = pow2_xy((pePart - 16*1000),1000) - 0x0000c000;
+      
+    if(snr > 0x00008000)

+	{

+		shift = norm_l(snr);

+		snr = Div_32(0x00008000 << shift, snr << shift);  
+	}
+	else
+	{
+		snr = 0x7fffffff;
+	}
+      
+    /* upper limit is -1 dB */
+    snr = min(snr, c_maxsnr);
+    /* lower limit is -25 dB */
+    snr = max(snr, c_minsnr);
+    sfbMinSnr[sfb] = round16(snr);
+  }
+
+}
+
+/*****************************************************************************
+*
+* function name: InitPsyConfigurationLong
+* description:  init long block psychoacoustic configuration
+*
+*****************************************************************************/
+Word16 InitPsyConfigurationLong(Word32 bitrate,
+                                Word32 samplerate,
+                                Word16 bandwidth,
+                                PSY_CONFIGURATION_LONG *psyConf)
+{
+  Word32 samplerateindex;

+  Word16 sfbBarcVal[MAX_SFB_LONG];

+  Word16 sfb;
+
+  /*
+    init sfb table
+  */

+  samplerateindex = GetSRIndex(samplerate);  

+  psyConf->sfbCnt = sfBandTotalLong[samplerateindex];

+  psyConf->sfbOffset = sfBandTabLong + sfBandTabLongOffset[samplerateindex];

+  psyConf->sampRateIdx = samplerateindex;
+
+  /*
+    calculate barc values for each pb
+  */
+  initBarcValues(psyConf->sfbCnt,
+                 psyConf->sfbOffset,
+                 psyConf->sfbOffset[psyConf->sfbCnt],
+                 samplerate,
+                 sfbBarcVal);
+
+  /*
+    init thresholds in quiet
+  */
+  initThrQuiet(psyConf->sfbCnt,
+               psyConf->sfbOffset,
+               sfbBarcVal,
+               psyConf->sfbThresholdQuiet);
+
+  /*
+    calculate spreading function
+  */
+  initSpreading(psyConf->sfbCnt,
+                sfbBarcVal,
+                psyConf->sfbMaskLowFactor,
+                psyConf->sfbMaskHighFactor,
+                psyConf->sfbMaskLowFactorSprEn,
+                psyConf->sfbMaskHighFactorSprEn,
+                bitrate,
+                LONG_WINDOW);
+
+  /*
+    init ratio
+  */
+  psyConf->ratio = c_ratio;      
+
+  psyConf->maxAllowedIncreaseFactor = 2;              
+  psyConf->minRemainingThresholdFactor = c_minRemainingThresholdFactor;    /* 0.01 *(1 << 15)*/  
+
+  psyConf->clipEnergy = c_maxClipEnergyLong;                   
+  psyConf->lowpassLine = extract_l((bandwidth<<1) * FRAME_LEN_LONG / samplerate);
+
+  for (sfb = 0; sfb < psyConf->sfbCnt; sfb++) {
+    if (sub(psyConf->sfbOffset[sfb], psyConf->lowpassLine) >= 0)
+      break;
+  }
+  psyConf->sfbActive = sfb;                 
+
+  /*
+    calculate minSnr
+  */
+  initMinSnr(bitrate,
+             samplerate,
+             psyConf->sfbOffset[psyConf->sfbCnt],
+             psyConf->sfbOffset,
+             sfbBarcVal,
+             psyConf->sfbActive,
+             psyConf->sfbMinSnr);
+
+
+  return(0);
+}
+
+/*****************************************************************************
+*
+* function name: InitPsyConfigurationShort
+* description:  init short block psychoacoustic configuration
+*
+*****************************************************************************/
+Word16 InitPsyConfigurationShort(Word32 bitrate,
+                                 Word32 samplerate,
+                                 Word16 bandwidth,
+                                 PSY_CONFIGURATION_SHORT *psyConf) 

+{
+  Word32 samplerateindex;
+  Word16 sfbBarcVal[MAX_SFB_SHORT];
+  Word16 sfb;
+  /*
+    init sfb table
+  */
+  samplerateindex = GetSRIndex(samplerate);  

+  psyConf->sfbCnt = sfBandTotalShort[samplerateindex];

+  psyConf->sfbOffset = sfBandTabShort + sfBandTabShortOffset[samplerateindex];
+  psyConf->sampRateIdx = samplerateindex;
+  /*
+    calculate barc values for each pb
+  */
+  initBarcValues(psyConf->sfbCnt,
+                 psyConf->sfbOffset,
+                 psyConf->sfbOffset[psyConf->sfbCnt],
+                 samplerate,
+                 sfbBarcVal);
+
+  /*
+    init thresholds in quiet
+  */
+  initThrQuiet(psyConf->sfbCnt,
+               psyConf->sfbOffset,
+               sfbBarcVal,
+               psyConf->sfbThresholdQuiet);
+
+  /*
+    calculate spreading function
+  */
+  initSpreading(psyConf->sfbCnt,
+                sfbBarcVal,
+                psyConf->sfbMaskLowFactor,
+                psyConf->sfbMaskHighFactor,
+                psyConf->sfbMaskLowFactorSprEn,
+                psyConf->sfbMaskHighFactorSprEn,
+                bitrate,
+                SHORT_WINDOW);
+
+  /*
+    init ratio
+  */
+  psyConf->ratio = c_ratio;                                                      
+
+  psyConf->maxAllowedIncreaseFactor = 2;                                         
+  psyConf->minRemainingThresholdFactor = c_minRemainingThresholdFactor;                            	 
+
+  psyConf->clipEnergy = c_maxClipEnergyShort;                                    
+
+  psyConf->lowpassLine = extract_l(((bandwidth << 1) * FRAME_LEN_SHORT) / samplerate);
+ 
+  for (sfb = 0; sfb < psyConf->sfbCnt; sfb++) {
+     
+    if (psyConf->sfbOffset[sfb] >= psyConf->lowpassLine)
+      break;
+  }
+  psyConf->sfbActive = sfb;                                                      
+
+  /*
+    calculate minSnr
+  */
+  initMinSnr(bitrate,
+             samplerate,
+             psyConf->sfbOffset[psyConf->sfbCnt],
+             psyConf->sfbOffset,
+             sfbBarcVal,
+             psyConf->sfbActive,
+             psyConf->sfbMinSnr);
+
+  return(0);
+}
+
diff --git a/media/libstagefright/codecs/aacenc/src/psy_main.c b/media/libstagefright/codecs/aacenc/src/psy_main.c
new file mode 100644
index 0000000..8746a72
--- /dev/null
+++ b/media/libstagefright/codecs/aacenc/src/psy_main.c
@@ -0,0 +1,810 @@
+/*

+ ** Copyright 2003-2010, VisualOn, Inc.

+ **

+ ** Licensed under the Apache License, Version 2.0 (the "License");

+ ** you may not use this file except in compliance with the License.

+ ** You may obtain a copy of the License at

+ **

+ **     http://www.apache.org/licenses/LICENSE-2.0

+ **

+ ** Unless required by applicable law or agreed to in writing, software

+ ** distributed under the License is distributed on an "AS IS" BASIS,

+ ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

+ ** See the License for the specific language governing permissions and

+ ** limitations under the License.

+ */

+/*******************************************************************************

+	File:		psy_main.c

+

+	Content:	Psychoacoustic major functions

+

+*******************************************************************************/
+
+#include "typedef.h"

+#include "basic_op.h"

+#include "oper_32b.h"
+#include "psy_const.h"
+#include "block_switch.h"
+#include "transform.h"
+#include "spreading.h"
+#include "pre_echo_control.h"
+#include "band_nrg.h"
+#include "psy_configuration.h"
+#include "psy_data.h"
+#include "ms_stereo.h"
+#include "interface.h"
+#include "psy_main.h"
+#include "grp_data.h"
+#include "tns_func.h"
+#include "memalign.h"
+
+/*                                    long       start       short       stop */
+static Word16 blockType2windowShape[] = {KBD_WINDOW,SINE_WINDOW,SINE_WINDOW,KBD_WINDOW};
+
+/*
+  forward definitions
+*/
+static Word16 advancePsychLong(PSY_DATA* psyData,
+                               TNS_DATA* tnsData,
+                               PSY_CONFIGURATION_LONG *hPsyConfLong,
+                               PSY_OUT_CHANNEL* psyOutChannel,
+                               Word32 *pScratchTns,
+                               const TNS_DATA *tnsData2,
+                               const Word16 ch);
+
+static Word16 advancePsychLongMS (PSY_DATA  psyData[MAX_CHANNELS],
+                                  const PSY_CONFIGURATION_LONG *hPsyConfLong);
+
+static Word16 advancePsychShort(PSY_DATA* psyData,
+                                TNS_DATA* tnsData,
+                                const PSY_CONFIGURATION_SHORT *hPsyConfShort,
+                                PSY_OUT_CHANNEL* psyOutChannel,
+                                Word32 *pScratchTns,
+                                const TNS_DATA *tnsData2,
+                                const Word16 ch);
+
+static Word16 advancePsychShortMS (PSY_DATA  psyData[MAX_CHANNELS],
+                                   const PSY_CONFIGURATION_SHORT *hPsyConfShort);
+
+
+/*****************************************************************************
+*
+* function name: PsyNew
+* description:  allocates memory for psychoacoustic
+* returns:      an error code
+* input:        pointer to a psych handle
+*
+*****************************************************************************/
+Word16 PsyNew(PSY_KERNEL *hPsy, Word32 nChan, VO_MEM_OPERATOR *pMemOP)
+{
+  Word16 i;

+  Word32 *mdctSpectrum;

+  Word32 *scratchTNS;

+  Word16 *mdctDelayBuffer;

+  

+  mdctSpectrum = (Word32 *)mem_malloc(pMemOP, nChan * FRAME_LEN_LONG * sizeof(Word32), 32, VO_INDEX_ENC_AAC);

+  if(NULL == mdctSpectrum)

+	  return 1;

+

+  scratchTNS = (Word32 *)mem_malloc(pMemOP, nChan * FRAME_LEN_LONG * sizeof(Word32), 32, VO_INDEX_ENC_AAC);

+  if(NULL == scratchTNS)

+  {

+	  return 1;

+  }

+

+  mdctDelayBuffer = (Word16 *)mem_malloc(pMemOP, nChan * BLOCK_SWITCHING_OFFSET * sizeof(Word16), 32, VO_INDEX_ENC_AAC);

+  if(NULL == mdctDelayBuffer)

+  {

+	  return 1;
+  }

+

+  for (i=0; i<nChan; i++){
+    hPsy->psyData[i].mdctDelayBuffer = mdctDelayBuffer + i*BLOCK_SWITCHING_OFFSET;      
+    hPsy->psyData[i].mdctSpectrum = mdctSpectrum + i*FRAME_LEN_LONG;
+  }
+
+  hPsy->pScratchTns = scratchTNS;
+
+  return 0;
+}
+
+
+/*****************************************************************************
+*
+* function name: PsyDelete
+* description:  allocates memory for psychoacoustic
+* returns:      an error code
+*
+*****************************************************************************/
+Word16 PsyDelete(PSY_KERNEL  *hPsy, VO_MEM_OPERATOR *pMemOP)
+{
+  Word32 nch;

+

+  if(hPsy)

+  {

+	if(hPsy->psyData[0].mdctDelayBuffer)

+		mem_free(pMemOP, hPsy->psyData[0].mdctDelayBuffer, VO_INDEX_ENC_AAC);

+      

+    if(hPsy->psyData[0].mdctSpectrum)

+		mem_free(pMemOP, hPsy->psyData[0].mdctSpectrum, VO_INDEX_ENC_AAC);

+

+    for (nch=0; nch<MAX_CHANNELS; nch++){

+	  hPsy->psyData[nch].mdctDelayBuffer = NULL;      

+	  hPsy->psyData[nch].mdctSpectrum = NULL;

+	}

+

+	if(hPsy->pScratchTns)

+	{

+		mem_free(pMemOP, hPsy->pScratchTns, VO_INDEX_ENC_AAC);

+		hPsy->pScratchTns = NULL;

+	}

+  }

+
+  return 0;
+}
+
+
+/*****************************************************************************
+*
+* function name: PsyOutNew
+* description:  allocates memory for psyOut struc
+* returns:      an error code
+* input:        pointer to a psych handle
+*
+*****************************************************************************/
+Word16 PsyOutNew(PSY_OUT *hPsyOut, VO_MEM_OPERATOR *pMemOP)
+{
+  pMemOP->Set(VO_INDEX_ENC_AAC, hPsyOut, 0, sizeof(PSY_OUT));
+  /*
+    alloc some more stuff, tbd
+  */
+  return 0;
+}
+
+/*****************************************************************************
+*
+* function name: PsyOutDelete
+* description:  allocates memory for psychoacoustic
+* returns:      an error code
+*
+*****************************************************************************/
+Word16 PsyOutDelete(PSY_OUT *hPsyOut, VO_MEM_OPERATOR *pMemOP)
+{
+  hPsyOut=NULL;
+  return 0;
+}
+
+
+/*****************************************************************************
+*
+* function name: psyMainInit
+* description:  initializes psychoacoustic
+* returns:      an error code
+*
+*****************************************************************************/
+
+Word16 psyMainInit(PSY_KERNEL *hPsy,
+                   Word32 sampleRate,
+                   Word32 bitRate,
+                   Word16 channels,
+                   Word16 tnsMask,
+                   Word16 bandwidth)
+{
+  Word16 ch, err;
+  Word32 channelBitRate = bitRate/channels;
+
+  err = InitPsyConfigurationLong(channelBitRate,
+                                 sampleRate,
+                                 bandwidth,
+                                 &(hPsy->psyConfLong));

+

+  if (!err) {
+      hPsy->sampleRateIdx = hPsy->psyConfLong.sampRateIdx;

+	  err = InitTnsConfigurationLong(bitRate, sampleRate, channels,
+                                   &hPsy->psyConfLong.tnsConf, &hPsy->psyConfLong, tnsMask&2);
+  }
+
+  if (!err)
+    err = InitPsyConfigurationShort(channelBitRate,
+                                    sampleRate,
+                                    bandwidth,
+                                    &hPsy->psyConfShort);
+  if (!err) {
+    err = InitTnsConfigurationShort(bitRate, sampleRate, channels,
+                                    &hPsy->psyConfShort.tnsConf, &hPsy->psyConfShort, tnsMask&1);
+  }
+
+  if (!err)
+    for(ch=0;ch < channels;ch++){
+  
+      InitBlockSwitching(&hPsy->psyData[ch].blockSwitchingControl,
+                         bitRate, channels);
+
+      InitPreEchoControl(hPsy->psyData[ch].sfbThresholdnm1,
+                         hPsy->psyConfLong.sfbCnt,
+                         hPsy->psyConfLong.sfbThresholdQuiet);
+      hPsy->psyData[ch].mdctScalenm1 = 0;                                
+    }
+
+	return(err);
+}
+
+/*****************************************************************************
+*
+* function name: psyMain
+* description:  psychoacoustic main function
+* returns:      an error code
+*
+*    This function assumes that enough input data is in the modulo buffer.
+*
+*****************************************************************************/
+
+Word16 psyMain(Word16                   nChannels,
+               ELEMENT_INFO            *elemInfo,
+               Word16                  *timeSignal, 
+               PSY_DATA                 psyData[MAX_CHANNELS],
+               TNS_DATA                 tnsData[MAX_CHANNELS],
+               PSY_CONFIGURATION_LONG  *hPsyConfLong,
+               PSY_CONFIGURATION_SHORT *hPsyConfShort,
+               PSY_OUT_CHANNEL          psyOutChannel[MAX_CHANNELS],
+               PSY_OUT_ELEMENT         *psyOutElement,
+               Word32                  *pScratchTns,
+			   Word32				   sampleRate)
+{
+  Word16 maxSfbPerGroup[MAX_CHANNELS];
+  Word16 mdctScalingArray[MAX_CHANNELS];
+
+  Word16 ch;   /* counts through channels          */
+  Word16 sfb;  /* counts through scalefactor bands */
+  Word16 line; /* counts through lines             */
+  Word16 channels;
+  Word16 maxScale;
+
+  channels = elemInfo->nChannelsInEl;                            
+  maxScale = 0;                                                  
+
+  /* block switching */

+  for(ch = 0; ch < channels; ch++) {
+    BlockSwitching(&psyData[ch].blockSwitchingControl,
+                   timeSignal+elemInfo->ChannelIndex[ch],
+				   sampleRate,
+                   nChannels);
+  }
+
+  /* synch left and right block type */
+  SyncBlockSwitching(&psyData[0].blockSwitchingControl,
+                     &psyData[1].blockSwitchingControl,
+                     channels);
+
+  /* transform
+     and get maxScale (max mdctScaling) for all channels */
+  for(ch=0; ch<channels; ch++) {
+    Transform_Real(psyData[ch].mdctDelayBuffer,
+                   timeSignal+elemInfo->ChannelIndex[ch],
+                   nChannels,
+                   psyData[ch].mdctSpectrum,
+                   &(mdctScalingArray[ch]),
+                   psyData[ch].blockSwitchingControl.windowSequence);
+    maxScale = max(maxScale, mdctScalingArray[ch]);
+  }
+
+  /* common scaling for all channels */
+  for (ch=0; ch<channels; ch++) {
+    Word16 scaleDiff = maxScale - mdctScalingArray[ch];
+     
+    if (scaleDiff > 0) {
+      Word32 *Spectrum = psyData[ch].mdctSpectrum;
+	  for(line=0; line<FRAME_LEN_LONG; line++) {
+        *Spectrum = (*Spectrum) >> scaleDiff;
+		Spectrum++;
+      }
+    }
+    psyData[ch].mdctScale = maxScale;                                    
+  }
+
+  for (ch=0; ch<channels; ch++) {
+     
+    if(psyData[ch].blockSwitchingControl.windowSequence != SHORT_WINDOW) {
+      /* update long block parameter */
+	  advancePsychLong(&psyData[ch],
+                       &tnsData[ch],
+                       hPsyConfLong,
+                       &psyOutChannel[ch],
+                       pScratchTns,
+                       &tnsData[1 - ch],
+                       ch);
+
+      /* determine maxSfb */
+      for (sfb=hPsyConfLong->sfbCnt-1; sfb>=0; sfb--) {
+        for (line=hPsyConfLong->sfbOffset[sfb+1] - 1; line>=hPsyConfLong->sfbOffset[sfb]; line--) {
+           
+          if (psyData[ch].mdctSpectrum[line] != 0) break;
+        }
+        if (line >= hPsyConfLong->sfbOffset[sfb]) break;
+      }
+      maxSfbPerGroup[ch] = sfb + 1;
+
+      /* Calc bandwise energies for mid and side channel
+         Do it only if 2 channels exist */
+       
+      if (ch == 1)
+        advancePsychLongMS(psyData, hPsyConfLong);
+    }
+    else {
+      advancePsychShort(&psyData[ch],
+                        &tnsData[ch],
+                        hPsyConfShort,
+                        &psyOutChannel[ch],
+                        pScratchTns,
+                        &tnsData[1 - ch],
+                        ch);
+
+      /* Calc bandwise energies for mid and side channel
+         Do it only if 2 channels exist */
+       
+      if (ch == 1)
+        advancePsychShortMS (psyData, hPsyConfShort);
+    }
+  }
+
+  /* group short data */
+  for(ch=0; ch<channels; ch++) {
+     
+    if (psyData[ch].blockSwitchingControl.windowSequence == SHORT_WINDOW) {
+      groupShortData(psyData[ch].mdctSpectrum,
+                     pScratchTns,
+                     &psyData[ch].sfbThreshold,
+                     &psyData[ch].sfbEnergy,
+                     &psyData[ch].sfbEnergyMS,
+                     &psyData[ch].sfbSpreadedEnergy,
+                     hPsyConfShort->sfbCnt,
+                     hPsyConfShort->sfbOffset,
+                     hPsyConfShort->sfbMinSnr,
+                     psyOutElement->groupedSfbOffset[ch],
+                     &maxSfbPerGroup[ch],
+                     psyOutElement->groupedSfbMinSnr[ch],
+                     psyData[ch].blockSwitchingControl.noOfGroups,
+                     psyData[ch].blockSwitchingControl.groupLen);
+    }
+  }
+
+
+#if (MAX_CHANNELS>1)
+  /*
+    stereo Processing
+  */
+  if (channels == 2) {
+    psyOutElement->toolsInfo.msDigest = MS_NONE;                 
+    maxSfbPerGroup[0] = maxSfbPerGroup[1] = max(maxSfbPerGroup[0], maxSfbPerGroup[1]);
+
+     
+    if (psyData[0].blockSwitchingControl.windowSequence != SHORT_WINDOW)
+      MsStereoProcessing(psyData[0].sfbEnergy.sfbLong,
+                         psyData[1].sfbEnergy.sfbLong,
+                         psyData[0].sfbEnergyMS.sfbLong,
+                         psyData[1].sfbEnergyMS.sfbLong,
+                         psyData[0].mdctSpectrum,
+                         psyData[1].mdctSpectrum,
+                         psyData[0].sfbThreshold.sfbLong,
+                         psyData[1].sfbThreshold.sfbLong,
+                         psyData[0].sfbSpreadedEnergy.sfbLong,
+                         psyData[1].sfbSpreadedEnergy.sfbLong,
+                         (Word16*)&psyOutElement->toolsInfo.msDigest,
+                         (Word16*)psyOutElement->toolsInfo.msMask,
+                         hPsyConfLong->sfbCnt,
+                         hPsyConfLong->sfbCnt,
+                         maxSfbPerGroup[0],
+                         (const Word16*)hPsyConfLong->sfbOffset);
+      else
+        MsStereoProcessing(psyData[0].sfbEnergy.sfbLong,
+                           psyData[1].sfbEnergy.sfbLong,
+                           psyData[0].sfbEnergyMS.sfbLong,
+                           psyData[1].sfbEnergyMS.sfbLong,
+                           psyData[0].mdctSpectrum,
+                           psyData[1].mdctSpectrum,
+                           psyData[0].sfbThreshold.sfbLong,
+                           psyData[1].sfbThreshold.sfbLong,
+                           psyData[0].sfbSpreadedEnergy.sfbLong,
+                           psyData[1].sfbSpreadedEnergy.sfbLong,
+                           (Word16*)&psyOutElement->toolsInfo.msDigest,
+                           (Word16*)psyOutElement->toolsInfo.msMask,
+                           psyData[0].blockSwitchingControl.noOfGroups*hPsyConfShort->sfbCnt,
+                           hPsyConfShort->sfbCnt,
+                           maxSfbPerGroup[0],
+                           (const Word16*)psyOutElement->groupedSfbOffset[0]);
+  }
+
+#endif /* (MAX_CHANNELS>1) */
+
+  /*
+    build output
+  */
+  for(ch=0;ch<channels;ch++) {
+     
+    if (psyData[ch].blockSwitchingControl.windowSequence != SHORT_WINDOW)
+      BuildInterface(psyData[ch].mdctSpectrum,
+                     psyData[ch].mdctScale,
+                     &psyData[ch].sfbThreshold,
+                     &psyData[ch].sfbEnergy,
+                     &psyData[ch].sfbSpreadedEnergy,
+                     psyData[ch].sfbEnergySum,
+                     psyData[ch].sfbEnergySumMS,
+                     psyData[ch].blockSwitchingControl.windowSequence,
+                     blockType2windowShape[psyData[ch].blockSwitchingControl.windowSequence],
+                     hPsyConfLong->sfbCnt,
+                     hPsyConfLong->sfbOffset,
+                     maxSfbPerGroup[ch],
+                     hPsyConfLong->sfbMinSnr,
+                     psyData[ch].blockSwitchingControl.noOfGroups,
+                     psyData[ch].blockSwitchingControl.groupLen,
+                     &psyOutChannel[ch]);
+    else
+      BuildInterface(psyData[ch].mdctSpectrum,
+                     psyData[ch].mdctScale,
+                     &psyData[ch].sfbThreshold,
+                     &psyData[ch].sfbEnergy,
+                     &psyData[ch].sfbSpreadedEnergy,
+                     psyData[ch].sfbEnergySum,
+                     psyData[ch].sfbEnergySumMS,
+                     SHORT_WINDOW,
+                     SINE_WINDOW,
+                     psyData[0].blockSwitchingControl.noOfGroups*hPsyConfShort->sfbCnt,
+                     psyOutElement->groupedSfbOffset[ch],
+                     maxSfbPerGroup[ch],
+                     psyOutElement->groupedSfbMinSnr[ch],
+                     psyData[ch].blockSwitchingControl.noOfGroups,
+                     psyData[ch].blockSwitchingControl.groupLen,
+                     &psyOutChannel[ch]);
+  }
+
+  return(0); /* no error */
+}
+
+/*****************************************************************************
+*
+* function name: advancePsychLong
+* description:  psychoacoustic for long blocks
+*
+*****************************************************************************/
+
+static Word16 advancePsychLong(PSY_DATA* psyData,
+                               TNS_DATA* tnsData,
+                               PSY_CONFIGURATION_LONG *hPsyConfLong,
+                               PSY_OUT_CHANNEL* psyOutChannel,
+                               Word32 *pScratchTns,
+                               const TNS_DATA* tnsData2,
+                               const Word16 ch)
+{
+  Word32 i;
+  Word32 normEnergyShift = (psyData->mdctScale + 1) << 1; /* in reference code, mdct spectrum must be multipied with 2, so +1 */
+  Word32 clipEnergy = hPsyConfLong->clipEnergy >> normEnergyShift;

+  Word32 *data0, *data1, tdata;
+
+  /* low pass */
+  data0 = psyData->mdctSpectrum + hPsyConfLong->lowpassLine;

+  for(i=hPsyConfLong->lowpassLine; i<FRAME_LEN_LONG; i++) {
+    *data0++ = 0;                                
+  }
+
+  /* Calc sfb-bandwise mdct-energies for left and right channel */
+  CalcBandEnergy( psyData->mdctSpectrum,
+                  hPsyConfLong->sfbOffset,
+                  hPsyConfLong->sfbActive,
+                  psyData->sfbEnergy.sfbLong,
+                  &psyData->sfbEnergySum.sfbLong);
+
+  /*
+    TNS detect
+  */
+  TnsDetect(tnsData,
+            hPsyConfLong->tnsConf,
+            pScratchTns,
+            (const Word16*)hPsyConfLong->sfbOffset,
+            psyData->mdctSpectrum,
+            0,
+            psyData->blockSwitchingControl.windowSequence,
+            psyData->sfbEnergy.sfbLong);
+
+  /*  TnsSync */   
+  if (ch == 1) {
+    TnsSync(tnsData,
+            tnsData2,
+            hPsyConfLong->tnsConf,
+            0,
+            psyData->blockSwitchingControl.windowSequence);
+  }
+
+  /*  Tns Encoder */ 
+  TnsEncode(&psyOutChannel->tnsInfo,
+            tnsData,
+            hPsyConfLong->sfbCnt,
+            hPsyConfLong->tnsConf,
+            hPsyConfLong->lowpassLine,
+            psyData->mdctSpectrum,
+            0,
+            psyData->blockSwitchingControl.windowSequence);
+
+  /* first part of threshold calculation */
+  data0 = psyData->sfbEnergy.sfbLong;

+  data1 = psyData->sfbThreshold.sfbLong;

+  for (i=hPsyConfLong->sfbCnt; i; i--) {
+    tdata = L_mpy_ls(*data0++, hPsyConfLong->ratio);
+    *data1++ = min(tdata, clipEnergy);

+  }
+
+  /* Calc sfb-bandwise mdct-energies for left and right channel again */   
+  if (tnsData->dataRaw.tnsLong.subBlockInfo.tnsActive!=0) {
+    Word16 tnsStartBand = hPsyConfLong->tnsConf.tnsStartBand;                            
+    CalcBandEnergy( psyData->mdctSpectrum,
+                    hPsyConfLong->sfbOffset+tnsStartBand,
+                    hPsyConfLong->sfbActive - tnsStartBand,
+                    psyData->sfbEnergy.sfbLong+tnsStartBand,
+                    &psyData->sfbEnergySum.sfbLong);
+    

+	data0 = psyData->sfbEnergy.sfbLong;

+	tdata = psyData->sfbEnergySum.sfbLong;

+	for (i=0; i<tnsStartBand; i++)
+      tdata += *data0++;

+

+	psyData->sfbEnergySum.sfbLong = tdata;
+  }
+
+
+  /* spreading energy */
+  SpreadingMax(hPsyConfLong->sfbCnt,
+               hPsyConfLong->sfbMaskLowFactor,
+               hPsyConfLong->sfbMaskHighFactor,
+               psyData->sfbThreshold.sfbLong);
+
+  /* threshold in quiet */
+  data0 = psyData->sfbThreshold.sfbLong;

+  data1 = hPsyConfLong->sfbThresholdQuiet;

+  for (i=hPsyConfLong->sfbCnt; i; i--)
+  {

+	  *data0 = max(*data0, (*data1 >> normEnergyShift));

+	  data0++; data1++;

+  }
+
+  /* preecho control */   
+  if (psyData->blockSwitchingControl.windowSequence == STOP_WINDOW) {
+    data0 = psyData->sfbThresholdnm1;

+	for (i=hPsyConfLong->sfbCnt; i; i--) {

+      *data0++ = MAX_32;                              

+    }

+    psyData->mdctScalenm1 = 0;                                           
+  }
+
+  PreEchoControl( psyData->sfbThresholdnm1,
+                  hPsyConfLong->sfbCnt,
+                  hPsyConfLong->maxAllowedIncreaseFactor,
+                  hPsyConfLong->minRemainingThresholdFactor,
+                  psyData->sfbThreshold.sfbLong,
+                  psyData->mdctScale,
+                  psyData->mdctScalenm1);
+  psyData->mdctScalenm1 = psyData->mdctScale;                            
+
+   
+  if (psyData->blockSwitchingControl.windowSequence== START_WINDOW) {
+    data0 = psyData->sfbThresholdnm1;

+	for (i=hPsyConfLong->sfbCnt; i; i--) {
+      *data0++ = MAX_32;                              
+    }
+    psyData->mdctScalenm1 = 0;                                           
+  }
+
+  /* apply tns mult table on cb thresholds */
+  ApplyTnsMultTableToRatios(hPsyConfLong->tnsConf.tnsRatioPatchLowestCb,
+                            hPsyConfLong->tnsConf.tnsStartBand,
+                            tnsData->dataRaw.tnsLong.subBlockInfo,
+                            psyData->sfbThreshold.sfbLong);
+
+
+  /* spreaded energy */
+  data0 = psyData->sfbSpreadedEnergy.sfbLong;

+  data1 = psyData->sfbEnergy.sfbLong;

+  for (i=hPsyConfLong->sfbCnt; i; i--) {
+    //psyData->sfbSpreadedEnergy.sfbLong[i] = psyData->sfbEnergy.sfbLong[i];       

+	  *data0++ = *data1++;
+  }
+
+  /* spreading energy */
+  SpreadingMax(hPsyConfLong->sfbCnt,
+               hPsyConfLong->sfbMaskLowFactorSprEn, 
+               hPsyConfLong->sfbMaskHighFactorSprEn,
+               psyData->sfbSpreadedEnergy.sfbLong);
+
+  return 0;
+}
+
+/*****************************************************************************
+*
+* function name: advancePsychLongMS
+* description:   update mdct-energies for left add or minus right channel 
+*				for long block
+*
+*****************************************************************************/
+static Word16 advancePsychLongMS (PSY_DATA psyData[MAX_CHANNELS],
+                                  const PSY_CONFIGURATION_LONG *hPsyConfLong)
+{
+  CalcBandEnergyMS(psyData[0].mdctSpectrum,
+                   psyData[1].mdctSpectrum,
+                   hPsyConfLong->sfbOffset,
+                   hPsyConfLong->sfbActive,
+                   psyData[0].sfbEnergyMS.sfbLong,
+                   &psyData[0].sfbEnergySumMS.sfbLong,
+                   psyData[1].sfbEnergyMS.sfbLong,
+                   &psyData[1].sfbEnergySumMS.sfbLong);
+
+  return 0;
+}
+
+
+/*****************************************************************************
+*
+* function name: advancePsychShort
+* description:  psychoacoustic for short blocks
+*
+*****************************************************************************/
+
+static Word16 advancePsychShort(PSY_DATA* psyData,
+                                TNS_DATA* tnsData,
+                                const PSY_CONFIGURATION_SHORT *hPsyConfShort,
+                                PSY_OUT_CHANNEL* psyOutChannel,
+                                Word32 *pScratchTns,
+                                const TNS_DATA *tnsData2,
+                                const Word16 ch)
+{
+  Word32 w;
+  Word32 normEnergyShift = (psyData->mdctScale + 1) << 1; /* in reference code, mdct spectrum must be multipied with 2, so +1 */
+  Word32 clipEnergy = hPsyConfShort->clipEnergy >> normEnergyShift;
+  Word32 wOffset = 0;     

+  Word32 *data0, *data1;
+
+  for(w = 0; w < TRANS_FAC; w++) {
+    Word32 i, tdata;
+
+    /* low pass */
+    data0 = psyData->mdctSpectrum + wOffset + hPsyConfShort->lowpassLine;

+	for(i=hPsyConfShort->lowpassLine; i<FRAME_LEN_SHORT; i++){
+      *data0++ = 0;                                      
+    }
+
+    /* Calc sfb-bandwise mdct-energies for left and right channel */
+    CalcBandEnergy( psyData->mdctSpectrum+wOffset,
+                    hPsyConfShort->sfbOffset,
+                    hPsyConfShort->sfbActive,
+                    psyData->sfbEnergy.sfbShort[w],
+                    &psyData->sfbEnergySum.sfbShort[w]);
+    /*
+       TNS
+    */
+    TnsDetect(tnsData,
+              hPsyConfShort->tnsConf,
+              pScratchTns,
+              (const Word16*)hPsyConfShort->sfbOffset,
+              psyData->mdctSpectrum+wOffset,
+              w,
+              psyData->blockSwitchingControl.windowSequence,
+              psyData->sfbEnergy.sfbShort[w]);
+
+    /*  TnsSync */
+    if (ch == 1) {
+      TnsSync(tnsData,
+              tnsData2,
+              hPsyConfShort->tnsConf,
+              w,
+              psyData->blockSwitchingControl.windowSequence);
+    }
+
+    TnsEncode(&psyOutChannel->tnsInfo,
+              tnsData,
+              hPsyConfShort->sfbCnt,
+              hPsyConfShort->tnsConf,
+              hPsyConfShort->lowpassLine,
+              psyData->mdctSpectrum+wOffset,
+              w,
+              psyData->blockSwitchingControl.windowSequence);
+
+    /* first part of threshold calculation */
+    data0 = psyData->sfbThreshold.sfbShort[w];

+	data1 = psyData->sfbEnergy.sfbShort[w];

+	for (i=hPsyConfShort->sfbCnt; i; i--) {
+      tdata = L_mpy_ls(*data1++, hPsyConfShort->ratio);
+      *data0++ = min(tdata, clipEnergy);

+    }
+
+    /* Calc sfb-bandwise mdct-energies for left and right channel again */     
+    if (tnsData->dataRaw.tnsShort.subBlockInfo[w].tnsActive != 0) {
+      Word16 tnsStartBand = hPsyConfShort->tnsConf.tnsStartBand;                            
+      CalcBandEnergy( psyData->mdctSpectrum+wOffset,
+                      hPsyConfShort->sfbOffset+tnsStartBand,
+                      (hPsyConfShort->sfbActive - tnsStartBand),
+                      psyData->sfbEnergy.sfbShort[w]+tnsStartBand,
+                      &psyData->sfbEnergySum.sfbShort[w]);

+
+      tdata = psyData->sfbEnergySum.sfbShort[w];

+	  data0 = psyData->sfbEnergy.sfbShort[w];

+	  for (i=tnsStartBand; i; i--)
+        tdata += *data0++;

+

+	  psyData->sfbEnergySum.sfbShort[w] = tdata;
+    }
+
+    /* spreading */
+    SpreadingMax(hPsyConfShort->sfbCnt,
+                 hPsyConfShort->sfbMaskLowFactor,
+                 hPsyConfShort->sfbMaskHighFactor,
+                 psyData->sfbThreshold.sfbShort[w]);
+
+
+    /* threshold in quiet */
+    data0 = psyData->sfbThreshold.sfbShort[w];

+	data1 = hPsyConfShort->sfbThresholdQuiet;

+	for (i=hPsyConfShort->sfbCnt; i; i--)
+    {

+		*data0 = max(*data0, (*data1 >> normEnergyShift));

+

+		data0++; data1++;

+	}

+
+
+    /* preecho */     
+    PreEchoControl( psyData->sfbThresholdnm1,
+                    hPsyConfShort->sfbCnt,
+                    hPsyConfShort->maxAllowedIncreaseFactor,
+                    hPsyConfShort->minRemainingThresholdFactor,
+                    psyData->sfbThreshold.sfbShort[w],
+                    psyData->mdctScale,
+                    w==0 ? psyData->mdctScalenm1 : psyData->mdctScale);
+
+    /* apply tns mult table on cb thresholds */
+    ApplyTnsMultTableToRatios( hPsyConfShort->tnsConf.tnsRatioPatchLowestCb,
+                               hPsyConfShort->tnsConf.tnsStartBand,
+                               tnsData->dataRaw.tnsShort.subBlockInfo[w],
+                               psyData->sfbThreshold.sfbShort[w]);
+
+    /* spreaded energy */
+    data0 = psyData->sfbSpreadedEnergy.sfbShort[w];

+	data1 = psyData->sfbEnergy.sfbShort[w];

+	for (i=hPsyConfShort->sfbCnt; i; i--) {
+	  *data0++ = *data1++;
+    }
+    SpreadingMax(hPsyConfShort->sfbCnt,
+                 hPsyConfShort->sfbMaskLowFactorSprEn, 
+                 hPsyConfShort->sfbMaskHighFactorSprEn,
+                 psyData->sfbSpreadedEnergy.sfbShort[w]);
+
+    wOffset += FRAME_LEN_SHORT;
+  } /* for TRANS_FAC */
+
+  psyData->mdctScalenm1 = psyData->mdctScale;              
+
+  return 0;
+}
+
+/*****************************************************************************
+*
+* function name: advancePsychShortMS
+* description:   update mdct-energies for left add or minus right channel 
+*				for short block
+*
+*****************************************************************************/
+static Word16 advancePsychShortMS (PSY_DATA psyData[MAX_CHANNELS],
+                                   const PSY_CONFIGURATION_SHORT *hPsyConfShort)
+{
+  Word32 w, wOffset;
+  wOffset = 0;                                   
+  for(w=0; w<TRANS_FAC; w++) {
+    CalcBandEnergyMS(psyData[0].mdctSpectrum+wOffset,
+                     psyData[1].mdctSpectrum+wOffset,
+                     hPsyConfShort->sfbOffset,
+                     hPsyConfShort->sfbActive,
+                     psyData[0].sfbEnergyMS.sfbShort[w],
+                     &psyData[0].sfbEnergySumMS.sfbShort[w],
+                     psyData[1].sfbEnergyMS.sfbShort[w],
+                     &psyData[1].sfbEnergySumMS.sfbShort[w]);
+    wOffset += FRAME_LEN_SHORT;
+  }
+
+  return 0;
+}
diff --git a/media/libstagefright/codecs/aacenc/src/qc_main.c b/media/libstagefright/codecs/aacenc/src/qc_main.c
new file mode 100644
index 0000000..a568020
--- /dev/null
+++ b/media/libstagefright/codecs/aacenc/src/qc_main.c
@@ -0,0 +1,580 @@
+/*

+ ** Copyright 2003-2010, VisualOn, Inc.

+ **

+ ** Licensed under the Apache License, Version 2.0 (the "License");

+ ** you may not use this file except in compliance with the License.

+ ** You may obtain a copy of the License at

+ **

+ **     http://www.apache.org/licenses/LICENSE-2.0

+ **

+ ** Unless required by applicable law or agreed to in writing, software

+ ** distributed under the License is distributed on an "AS IS" BASIS,

+ ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

+ ** See the License for the specific language governing permissions and

+ ** limitations under the License.

+ */

+/*******************************************************************************

+	File:		qc_main.c

+

+	Content:	Quantizing & coding functions

+

+*******************************************************************************/
+
+#include "basic_op.h"

+#include "oper_32b.h"

+#include "qc_main.h"
+#include "quantize.h"
+#include "interface.h"
+#include "adj_thr.h"
+#include "sf_estim.h"
+#include "stat_bits.h"
+#include "bit_cnt.h"
+#include "dyn_bits.h"
+#include "channel_map.h"
+#include "memalign.h"
+
+
+typedef enum{
+  FRAME_LEN_BYTES_MODULO =  1,
+  FRAME_LEN_BYTES_INT    =  2
+}FRAME_LEN_RESULT_MODE;
+
+static const Word16 maxFillElemBits = 7 + 270*8;
+
+/* forward declarations */
+
+static Word16 calcMaxValueInSfb(Word16 sfbCnt,
+                                Word16 maxSfbPerGroup,
+                                Word16 sfbPerGroup,
+                                Word16 sfbOffset[MAX_GROUPED_SFB],
+                                Word16 quantSpectrum[FRAME_LEN_LONG],
+                                UWord16 maxValue[MAX_GROUPED_SFB]);
+
+
+/*****************************************************************************
+*
+* function name: calcFrameLen
+* description: estimate the frame length according the bitrates
+*
+*****************************************************************************/
+static Word16 calcFrameLen(Word32 bitRate,
+                           Word32 sampleRate,
+                           FRAME_LEN_RESULT_MODE mode)
+{
+
+  Word32 result;
+  Word32 quot;
+
+  result = (FRAME_LEN_LONG >> 3) * bitRate;
+  quot = result / sampleRate;
+
+   
+  if (mode == FRAME_LEN_BYTES_MODULO) {
+    result -= quot * sampleRate;
+  }
+  else { /* FRAME_LEN_BYTES_INT */
+    result = quot;                                      
+  }
+
+  return result;
+}
+
+/*****************************************************************************
+*
+*  function name:framePadding
+*  description: Calculates if padding is needed for actual frame
+*  returns: paddingOn or not 
+*
+*****************************************************************************/
+static Word16 framePadding(Word32 bitRate,
+                           Word32 sampleRate,
+                           Word32 *paddingRest)
+{
+  Word16 paddingOn;
+  Word16 difference;
+
+  paddingOn = 0;                                                 
+
+  difference = calcFrameLen( bitRate,
+                             sampleRate,
+                             FRAME_LEN_BYTES_MODULO );
+  *paddingRest = *paddingRest - difference;
+
+   
+  if (*paddingRest <= 0 ) {
+    paddingOn = 1;                                               
+    *paddingRest = *paddingRest + sampleRate;
+  }
+
+  return paddingOn;
+}
+
+
+/*********************************************************************************
+*
+* function name: QCOutNew
+* description: init qcout parameter
+* returns:     0 if success
+*
+**********************************************************************************/
+
+Word16 QCOutNew(QC_OUT *hQC, Word16 nChannels, VO_MEM_OPERATOR *pMemOP)
+{
+  Word32 i;

+  Word16 *quantSpec;

+  Word16 *scf;

+  UWord16 *maxValueInSfb;	
+	

+  quantSpec = (Word16 *)mem_malloc(pMemOP, nChannels * FRAME_LEN_LONG * sizeof(Word16), 32, VO_INDEX_ENC_AAC);

+  if(NULL == quantSpec)

+	  return 1;
+  scf = (Word16 *)mem_malloc(pMemOP, nChannels * MAX_GROUPED_SFB * sizeof(Word16), 32, VO_INDEX_ENC_AAC);     

+  if(NULL == scf)

+  {

+	  return 1;

+  }
+  maxValueInSfb = (UWord16 *)mem_malloc(pMemOP, nChannels * MAX_GROUPED_SFB * sizeof(UWord16), 32, VO_INDEX_ENC_AAC);

+  if(NULL == maxValueInSfb)

+  {

+	  return 1;

+  }

+

+  for (i=0; i<nChannels; i++) {
+    hQC->qcChannel[i].quantSpec = quantSpec + i*FRAME_LEN_LONG;
+    
+    hQC->qcChannel[i].maxValueInSfb = maxValueInSfb + i*MAX_GROUPED_SFB;
+    
+    hQC->qcChannel[i].scf = scf + i*MAX_GROUPED_SFB;
+  }
+ 
+  return 0;
+}
+
+
+/*********************************************************************************
+*
+* function name: QCOutDelete
+* description: unint qcout parameter
+* returns:      0 if success
+*
+**********************************************************************************/
+void QCOutDelete(QC_OUT* hQC, VO_MEM_OPERATOR *pMemOP)
+{
+   Word32 i;

+   if(hQC)

+   {

+      if(hQC->qcChannel[0].quantSpec);

+		 mem_free(pMemOP, hQC->qcChannel[0].quantSpec, VO_INDEX_ENC_AAC);

+    

+      if(hQC->qcChannel[0].maxValueInSfb)

+		  mem_free(pMemOP, hQC->qcChannel[0].maxValueInSfb, VO_INDEX_ENC_AAC);

+    

+	  if(hQC->qcChannel[0].scf)

+		  mem_free(pMemOP, hQC->qcChannel[0].scf, VO_INDEX_ENC_AAC);

+

+	  for (i=0; i<MAX_CHANNELS; i++) {

+		  hQC->qcChannel[i].quantSpec = NULL;

+		  

+		  hQC->qcChannel[i].maxValueInSfb = NULL;

+		  

+		  hQC->qcChannel[i].scf = NULL;

+	  }

+   } 
+}
+
+/*********************************************************************************
+*
+* function name: QCNew
+* description: set QC to zero
+* returns:     0 if success
+*
+**********************************************************************************/
+Word16 QCNew(QC_STATE *hQC, VO_MEM_OPERATOR *pMemOP)
+{
+  pMemOP->Set(VO_INDEX_ENC_AAC, hQC,0,sizeof(QC_STATE));
+
+  return (0);
+}
+
+/*********************************************************************************
+*
+* function name: QCDelete
+* description: unint qcout parameter
+*
+**********************************************************************************/
+void QCDelete(QC_STATE *hQC, VO_MEM_OPERATOR *pMemOP)
+{
+ 
+  /* 
+     nothing to do
+  */
+  hQC=NULL;
+}
+
+/*********************************************************************************
+*
+* function name: QCInit
+* description: init QD parameter
+* returns:     0 if success
+*
+**********************************************************************************/
+Word16 QCInit(QC_STATE *hQC,
+              struct QC_INIT *init)
+{
+  hQC->nChannels       = init->elInfo->nChannelsInEl;              
+  hQC->maxBitsTot      = init->maxBits;                            
+  hQC->bitResTot       = sub(init->bitRes, init->averageBits);
+  hQC->averageBitsTot  = init->averageBits;                        
+  hQC->maxBitFac       = init->maxBitFac;                          
+
+  hQC->padding.paddingRest = init->padding.paddingRest;            
+
+  hQC->globStatBits    = 3;                          /* for ID_END */ 
+
+  /* channel elements init */
+  InitElementBits(&hQC->elementBits,
+                  *init->elInfo,
+                  init->bitrate,
+                  init->averageBits,
+                  hQC->globStatBits);
+
+  /* threshold parameter init */
+  AdjThrInit(&hQC->adjThr,
+             init->meanPe,
+             hQC->elementBits.chBitrate);
+
+  return 0;
+}
+
+
+/*********************************************************************************
+* 
+* function name: QCMain
+* description:  quantization and coding the spectrum
+* returns:      0 if success
+*
+**********************************************************************************/
+Word16 QCMain(QC_STATE* hQC,              
+              ELEMENT_BITS* elBits,
+              ATS_ELEMENT* adjThrStateElement,
+              PSY_OUT_CHANNEL  psyOutChannel[MAX_CHANNELS],  /* may be modified in-place */
+              PSY_OUT_ELEMENT* psyOutElement,
+              QC_OUT_CHANNEL  qcOutChannel[MAX_CHANNELS],    /* out                      */
+              QC_OUT_ELEMENT* qcOutElement,
+              Word16 nChannels,
+			  Word16 ancillaryDataBytes)      
+{
+  Word16 maxChDynBits[MAX_CHANNELS];
+  Word16 chBitDistribution[MAX_CHANNELS];  
+  Word32 ch;
+   
+  if (elBits->bitResLevel < 0) {
+    return -1;
+  }
+   
+  if (elBits->bitResLevel > elBits->maxBitResBits) {
+    return -1;
+  }
+
+  qcOutElement->staticBitsUsed = countStaticBitdemand(psyOutChannel,
+                                                      psyOutElement,
+                                                      nChannels, 

+													  qcOutElement->adtsUsed);
+
+   
+  if (ancillaryDataBytes) {
+    qcOutElement->ancBitsUsed = 7 + (ancillaryDataBytes << 3);
+     
+    if (ancillaryDataBytes >= 15)
+      qcOutElement->ancBitsUsed = qcOutElement->ancBitsUsed + 8;
+  }
+  else {
+    qcOutElement->ancBitsUsed = 0; 
+  }
+
+  CalcFormFactor(hQC->logSfbFormFactor, hQC->sfbNRelevantLines, hQC->logSfbEnergy, psyOutChannel, nChannels);
+
+  /*adjust thresholds for the desired bitrate */
+  AdjustThresholds(&hQC->adjThr,
+                   adjThrStateElement,
+                   psyOutChannel,
+                   psyOutElement,
+                   chBitDistribution,
+                   hQC->logSfbEnergy,
+                   hQC->sfbNRelevantLines,                   
+                   qcOutElement,
+				   elBits,
+				   nChannels,
+				   hQC->maxBitFac);
+
+  /*estimate scale factors */
+  EstimateScaleFactors(psyOutChannel,
+                       qcOutChannel,
+                       hQC->logSfbEnergy,
+                       hQC->logSfbFormFactor,
+                       hQC->sfbNRelevantLines,
+                       nChannels);
+
+  /* condition to prevent empty bitreservoir */
+  for (ch = 0; ch < nChannels; ch++) {
+    Word32 maxDynBits;
+    maxDynBits = elBits->averageBits + elBits->bitResLevel - 7; /* -7 bec. of align bits */
+    maxDynBits = maxDynBits - qcOutElement->staticBitsUsed + qcOutElement->ancBitsUsed;
+    maxChDynBits[ch] = extract_l(chBitDistribution[ch] * maxDynBits / 1000);
+  }
+
+  qcOutElement->dynBitsUsed = 0;                                         
+  for (ch = 0; ch < nChannels; ch++) {
+    Word32 chDynBits;
+    Flag   constraintsFulfilled;
+    Word32 iter;
+    iter = 0;                                                          
+    do {
+      constraintsFulfilled = 1;                                        
+
+      QuantizeSpectrum(psyOutChannel[ch].sfbCnt,
+                       psyOutChannel[ch].maxSfbPerGroup,
+                       psyOutChannel[ch].sfbPerGroup,
+                       psyOutChannel[ch].sfbOffsets,
+                       psyOutChannel[ch].mdctSpectrum,
+                       qcOutChannel[ch].globalGain,
+                       qcOutChannel[ch].scf,
+                       qcOutChannel[ch].quantSpec);
+       
+      if (calcMaxValueInSfb(psyOutChannel[ch].sfbCnt,
+                            psyOutChannel[ch].maxSfbPerGroup,
+                            psyOutChannel[ch].sfbPerGroup,
+                            psyOutChannel[ch].sfbOffsets,
+                            qcOutChannel[ch].quantSpec,
+                            qcOutChannel[ch].maxValueInSfb) > MAX_QUANT) {
+        constraintsFulfilled = 0;                                        
+      }
+
+      chDynBits = dynBitCount(qcOutChannel[ch].quantSpec,
+                              qcOutChannel[ch].maxValueInSfb,
+                              qcOutChannel[ch].scf,
+                              psyOutChannel[ch].windowSequence,
+                              psyOutChannel[ch].sfbCnt,
+                              psyOutChannel[ch].maxSfbPerGroup,
+                              psyOutChannel[ch].sfbPerGroup,
+                              psyOutChannel[ch].sfbOffsets,
+                              &qcOutChannel[ch].sectionData);
+       
+      if (chDynBits >= maxChDynBits[ch]) {
+        constraintsFulfilled = 0;                                        
+      }
+       
+      if (!constraintsFulfilled) {
+        qcOutChannel[ch].globalGain = qcOutChannel[ch].globalGain + 1;
+      }
+
+      iter = iter + 1;
+       
+    } while(!constraintsFulfilled);
+
+    qcOutElement->dynBitsUsed = qcOutElement->dynBitsUsed + chDynBits;
+
+    qcOutChannel[ch].mdctScale    = psyOutChannel[ch].mdctScale;         
+    qcOutChannel[ch].groupingMask = psyOutChannel[ch].groupingMask;      
+    qcOutChannel[ch].windowShape  = psyOutChannel[ch].windowShape;       
+  }
+
+  /* save dynBitsUsed for correction of bits2pe relation */
+  AdjThrUpdate(adjThrStateElement, qcOutElement->dynBitsUsed);
+
+  {
+    Word16 bitResSpace = elBits->maxBitResBits - elBits->bitResLevel;
+    Word16 deltaBitRes = elBits->averageBits -
+                        (qcOutElement->staticBitsUsed +
+                         qcOutElement->dynBitsUsed + qcOutElement->ancBitsUsed);
+
+    qcOutElement->fillBits = max(0, (deltaBitRes - bitResSpace));
+  }
+
+  return 0; /* OK */
+}
+
+
+/*********************************************************************************
+*
+* function name: calcMaxValueInSfb
+* description:  search the max Spectrum in one sfb
+*
+**********************************************************************************/
+static Word16 calcMaxValueInSfb(Word16 sfbCnt,
+                                Word16 maxSfbPerGroup,
+                                Word16 sfbPerGroup,
+                                Word16 sfbOffset[MAX_GROUPED_SFB],
+                                Word16 quantSpectrum[FRAME_LEN_LONG],
+                                UWord16 maxValue[MAX_GROUPED_SFB])
+{
+  Word16 sfbOffs, sfb;
+  Word16 maxValueAll;
+
+  maxValueAll = 0;                                       
+
+  for(sfbOffs=0;sfbOffs<sfbCnt;sfbOffs+=sfbPerGroup) {
+    for (sfb = 0; sfb < maxSfbPerGroup; sfb++) {
+      Word16 line;
+      Word16 maxThisSfb;
+      maxThisSfb = 0;                                    
+
+      for (line = sfbOffset[sfbOffs+sfb]; line < sfbOffset[sfbOffs+sfb+1]; line++) {
+        Word16 absVal;
+        absVal = abs_s(quantSpectrum[line]);
+        maxThisSfb = max(maxThisSfb, absVal);
+      }
+
+      maxValue[sfbOffs+sfb] = maxThisSfb;                
+      maxValueAll = max(maxValueAll, maxThisSfb);
+    }
+  }
+  return maxValueAll;
+}
+
+
+/*********************************************************************************
+*
+* function name: updateBitres
+* description: update bitreservoir
+*
+**********************************************************************************/
+void updateBitres(QC_STATE* qcKernel,
+                  QC_OUT*   qcOut)
+                  
+{
+  ELEMENT_BITS *elBits;
+ 
+  qcKernel->bitResTot = 0;                               
+
+  elBits = &qcKernel->elementBits;
+
+   
+  if (elBits->averageBits > 0) {
+    /* constant bitrate */
+    Word16 bitsUsed;
+    bitsUsed = (qcOut->qcElement.staticBitsUsed + qcOut->qcElement.dynBitsUsed) +
+                   (qcOut->qcElement.ancBitsUsed + qcOut->qcElement.fillBits);
+    elBits->bitResLevel = elBits->bitResLevel + (elBits->averageBits - bitsUsed);
+    qcKernel->bitResTot = qcKernel->bitResTot + elBits->bitResLevel;
+  }
+  else {
+    /* variable bitrate */
+    elBits->bitResLevel = elBits->maxBits;           
+    qcKernel->bitResTot = qcKernel->maxBitsTot;      
+  }
+}
+
+/*********************************************************************************
+*
+* function name: FinalizeBitConsumption
+* description: count bits used
+*
+**********************************************************************************/
+Word16 FinalizeBitConsumption(QC_STATE *qcKernel,
+                              QC_OUT* qcOut)
+{
+  Word32 nFullFillElem;

+  Word32 totFillBits;

+  Word16 diffBits;  
+  Word16 bitsUsed;
+
+  totFillBits = 0;                                       
+
+  qcOut->totStaticBitsUsed = qcKernel->globStatBits;     
+  qcOut->totStaticBitsUsed += qcOut->qcElement.staticBitsUsed;
+  qcOut->totDynBitsUsed    = qcOut->qcElement.dynBitsUsed;
+  qcOut->totAncBitsUsed    = qcOut->qcElement.ancBitsUsed;
+  qcOut->totFillBits       = qcOut->qcElement.fillBits;
+   
+  if (qcOut->qcElement.fillBits) {
+    totFillBits += qcOut->qcElement.fillBits;
+  }
+
+  nFullFillElem = (max((qcOut->totFillBits - 1), 0) / maxFillElemBits) * maxFillElemBits;

+  
+  qcOut->totFillBits = qcOut->totFillBits - nFullFillElem;
+
+  /* check fill elements */
+   
+  if (qcOut->totFillBits > 0) {
+    /* minimum Fillelement contains 7 (TAG + byte cnt) bits */
+    qcOut->totFillBits = max(7, qcOut->totFillBits);
+    /* fill element size equals n*8 + 7 */
+    qcOut->totFillBits = qcOut->totFillBits + ((8 - ((qcOut->totFillBits - 7) & 0x0007)) & 0x0007);     
+  }
+
+  qcOut->totFillBits = qcOut->totFillBits + nFullFillElem;
+
+  /* now distribute extra fillbits and alignbits over channel elements */
+  qcOut->alignBits = 7 - ((qcOut->totDynBitsUsed + qcOut->totStaticBitsUsed +
+                           qcOut->totAncBitsUsed + qcOut->totFillBits - 1) & 0x0007);             
+
+     
+  if ( (qcOut->alignBits + qcOut->totFillBits - totFillBits == 8) &&
+       (qcOut->totFillBits > 8))
+    qcOut->totFillBits = qcOut->totFillBits - 8;
+
+   
+  diffBits = qcOut->alignBits + qcOut->totFillBits - totFillBits;
+   
+  if(diffBits>=0) {
+    qcOut->qcElement.fillBits += diffBits;
+  }
+
+  bitsUsed = qcOut->totDynBitsUsed + qcOut->totStaticBitsUsed + qcOut->totAncBitsUsed;
+  bitsUsed = bitsUsed + qcOut->totFillBits + qcOut->alignBits;
+   
+  if (bitsUsed > qcKernel->maxBitsTot) {
+    return -1;
+  }
+  return bitsUsed;
+}
+
+
+/*********************************************************************************
+*
+* function name: AdjustBitrate
+* description:  adjusts framelength via padding on a frame to frame basis,
+*               to achieve a bitrate that demands a non byte aligned
+*               framelength
+* return:       errorcode
+*
+**********************************************************************************/
+Word16 AdjustBitrate(QC_STATE        *hQC,
+                     Word32           bitRate,    /* total bitrate */
+                     Word32           sampleRate) /* output sampling rate */
+{
+  Word16 paddingOn;
+  Word16 frameLen;
+  Word16 codeBits;
+  Word16 codeBitsLast;
+
+  /* Do we need a extra padding byte? */
+  paddingOn = framePadding(bitRate,
+                           sampleRate,
+                           &hQC->padding.paddingRest);
+
+  /* frame length */
+  frameLen = paddingOn + calcFrameLen(bitRate,
+                                      sampleRate,
+                                      FRAME_LEN_BYTES_INT);
+
+  frameLen = frameLen << 3;
+  codeBitsLast = hQC->averageBitsTot - hQC->globStatBits;
+  codeBits     = frameLen - hQC->globStatBits;
+
+  /* calculate bits for every channel element */   
+  if (codeBits != codeBitsLast) {
+    Word16 totalBits = 0;                                       
+
+    hQC->elementBits.averageBits = (hQC->elementBits.relativeBits * codeBits) >> 16; /* relativeBits was scaled down by 2 */
+    totalBits += hQC->elementBits.averageBits;
+
+    hQC->elementBits.averageBits = hQC->elementBits.averageBits + (codeBits - totalBits);
+  }
+
+  hQC->averageBitsTot = frameLen;                        
+
+  return 0;
+}
diff --git a/media/libstagefright/codecs/aacenc/src/quantize.c b/media/libstagefright/codecs/aacenc/src/quantize.c
new file mode 100644
index 0000000..205f167
--- /dev/null
+++ b/media/libstagefright/codecs/aacenc/src/quantize.c
@@ -0,0 +1,445 @@
+/*

+ ** Copyright 2003-2010, VisualOn, Inc.

+ **

+ ** Licensed under the Apache License, Version 2.0 (the "License");

+ ** you may not use this file except in compliance with the License.

+ ** You may obtain a copy of the License at

+ **

+ **     http://www.apache.org/licenses/LICENSE-2.0

+ **

+ ** Unless required by applicable law or agreed to in writing, software

+ ** distributed under the License is distributed on an "AS IS" BASIS,

+ ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

+ ** See the License for the specific language governing permissions and

+ ** limitations under the License.

+ */

+/*******************************************************************************

+	File:		quantize.c

+

+	Content:	quantization functions

+

+*******************************************************************************/
+
+#include "typedef.h"

+#include "basic_op.h"

+#include "oper_32b.h"
+#include "quantize.h"
+#include "aac_rom.h"
+
+#define MANT_DIGITS 9
+#define MANT_SIZE   (1<<MANT_DIGITS)
+
+static const Word32 XROUND = 0x33e425af; /* final rounding constant (-0.0946f+ 0.5f) */
+
+
+/*****************************************************************************
+*
+* function name:pow34 
+* description: calculate $x^{\frac{3}{4}}, for 0.5 < x < 1.0$.  
+*
+*****************************************************************************/
+__inline Word32 pow34(Word32 x)
+{
+  /* index table using MANT_DIGITS bits, but mask out the sign bit and the MSB
+     which is always one */   
+  return mTab_3_4[(x >> (INT_BITS-2-MANT_DIGITS)) & (MANT_SIZE-1)];
+}
+
+
+/*****************************************************************************
+*
+* function name:quantizeSingleLine 
+* description: quantizes spectrum  
+*              quaSpectrum = mdctSpectrum^3/4*2^(-(3/16)*gain)    
+*
+*****************************************************************************/
+static Word16 quantizeSingleLine(const Word16 gain, const Word32 absSpectrum)
+{
+  Word32 e, minusFinalExp, finalShift;
+  Word32 x;
+  Word16 qua = 0;                        
+
+   
+  if (absSpectrum) {
+    e = norm_l(absSpectrum);
+    x = pow34(absSpectrum << e);
+
+    /* calculate the final fractional exponent times 16 (was 3*(4*e + gain) + (INT_BITS-1)*16) */
+    minusFinalExp = (e << 2) + gain;
+    minusFinalExp = (minusFinalExp << 1) + minusFinalExp;
+    minusFinalExp = minusFinalExp + ((INT_BITS-1) << 4);
+
+    /* separate the exponent into a shift, and a multiply */
+    finalShift = minusFinalExp >> 4;
+     
+    if (finalShift < INT_BITS) {
+      x = L_mpy_wx(x, pow2tominusNover16[minusFinalExp & 15]);
+
+      x += XROUND >> (INT_BITS - finalShift);
+
+      /* shift and quantize */

+	  finalShift--;

+

+	  if(finalShift >= 0)

+		  x >>= finalShift;

+	  else

+		  x <<= (-finalShift);

+		

+	  qua = saturate(x);
+    }
+  }
+
+  return qua;
+}
+
+/*****************************************************************************
+*
+* function name:quantizeLines 
+* description: quantizes spectrum lines  
+*              quaSpectrum = mdctSpectrum^3/4*2^(-(3/16)*gain)    
+*  input: global gain, number of lines to process, spectral data         
+*  output: quantized spectrum
+*
+*****************************************************************************/
+static void quantizeLines(const Word16 gain,
+                          const Word16 noOfLines,
+                          const Word32 *mdctSpectrum,
+                          Word16 *quaSpectrum)
+{
+  Word32 line;
+  Word32 m = gain&3;
+  Word32 g = (gain >> 2) + 4;

+  Word32 mdctSpeL;

+  Word16 *pquat;
+    /* gain&3 */

+

+  pquat = quantBorders[m];

+

+  g += 16;

+  

+  if(g >= 0)

+  {

+	for (line=0; line<noOfLines; line++) {
+	  Word32 qua;
+	  qua = 0;                                                     
+    

+	  mdctSpeL = mdctSpectrum[line];

+	
+	  if (mdctSpeL) {
+		Word32 sa;
+		Word32 saShft;
+
+        sa = L_abs(mdctSpeL);
+        //saShft = L_shr(sa, 16 + g);

+	    saShft = sa >> g;
+
+        if (saShft > pquat[0]) {
+         
+          if (saShft < pquat[1]) {
+             
+            qua = mdctSpeL>0 ? 1 : -1;
+		  }
+          else {
+           
+            if (saShft < pquat[2]) {
+               
+              qua = mdctSpeL>0 ? 2 : -2;
+			}
+            else {
+             
+              if (saShft < pquat[3]) {
+                 
+                qua = mdctSpeL>0 ? 3 : -3;
+			  }
+              else {
+                qua = quantizeSingleLine(gain, sa);
+                /* adjust the sign. Since 0 < qua < 1, this cannot overflow. */
+               
+                if (mdctSpeL < 0)
+                  qua = -qua;
+			  }
+			}
+		  }
+		}
+	  }
+      quaSpectrum[line] = qua ;                                    
+	}

+  }

+  else

+  {

+	for (line=0; line<noOfLines; line++) {

+	  Word32 qua;

+	  qua = 0;                                                     

+    

+	  mdctSpeL = mdctSpectrum[line];

+	

+	  if (mdctSpeL) {

+		Word32 sa;

+		Word32 saShft;

+

+        sa = L_abs(mdctSpeL);

+        saShft = sa << g;

+

+        if (saShft > pquat[0]) {

+         

+          if (saShft < pquat[1]) {

+             

+            qua = mdctSpeL>0 ? 1 : -1;

+		  }

+          else {

+           

+            if (saShft < pquat[2]) {

+               

+              qua = mdctSpeL>0 ? 2 : -2;

+			}

+            else {

+             

+              if (saShft < pquat[3]) {

+                 

+                qua = mdctSpeL>0 ? 3 : -3;

+			  }

+              else {

+                qua = quantizeSingleLine(gain, sa);

+                /* adjust the sign. Since 0 < qua < 1, this cannot overflow. */

+               

+                if (mdctSpeL < 0)

+                  qua = -qua;

+			  }

+			}

+		  }

+		}

+	  }

+      quaSpectrum[line] = qua ;                                    

+	}	  

+  }
+
+}
+
+
+/*****************************************************************************
+*
+* function name:iquantizeLines 
+* description: iquantizes spectrum lines without sign
+*              mdctSpectrum = iquaSpectrum^4/3 *2^(0.25*gain) 
+* input: global gain, number of lines to process,quantized spectrum        
+* output: spectral data
+*
+*****************************************************************************/
+static void iquantizeLines(const Word16 gain,
+                           const Word16 noOfLines,
+                           const Word16 *quantSpectrum,
+                           Word32 *mdctSpectrum)
+{
+  Word32   iquantizermod;
+  Word32   iquantizershift;
+  Word32   line;
+
+  iquantizermod = gain & 3;                              
+  iquantizershift = gain >> 2;
+
+  for (line=0; line<noOfLines; line++) {
+     
+    if( quantSpectrum[line] != 0 ) {
+      Word32 accu;
+      Word32 ex;
+	  Word32 tabIndex;
+      Word32 specExp;
+      Word32 s,t;
+
+      accu = quantSpectrum[line];
+
+      ex = norm_l(accu);
+      accu = accu << ex;
+      specExp = INT_BITS-1 - ex;
+
+      tabIndex = (accu >> (INT_BITS-2-MANT_DIGITS)) & (~MANT_SIZE);        
+
+      /* calculate "mantissa" ^4/3 */
+      s = mTab_4_3[tabIndex];                                                    
+
+      /* get approperiate exponent multiplier for specExp^3/4 combined with scfMod */
+      t = specExpMantTableComb_enc[iquantizermod][specExp];                      
+
+      /* multiply "mantissa" ^4/3 with exponent multiplier */
+      accu = MULHIGH(s, t);
+
+      /* get approperiate exponent shifter */
+      specExp = specExpTableComb_enc[iquantizermod][specExp];                    
+
+      specExp += iquantizershift + 1;

+	  if(specExp >= 0)

+		  mdctSpectrum[line] = accu << specExp;

+	  else

+		  mdctSpectrum[line] = accu >> (-specExp);
+    }
+    else {
+      mdctSpectrum[line] = 0;                                                    
+    }
+  }
+}
+
+/*****************************************************************************
+*
+* function name: QuantizeSpectrum
+* description: quantizes the entire spectrum
+* returns:
+* input: number of scalefactor bands to be quantized, ...
+* output: quantized spectrum
+*
+*****************************************************************************/
+void QuantizeSpectrum(Word16 sfbCnt,
+                      Word16 maxSfbPerGroup,
+                      Word16 sfbPerGroup,
+                      Word16 *sfbOffset,
+                      Word32 *mdctSpectrum,
+                      Word16 globalGain,
+                      Word16 *scalefactors,
+                      Word16 *quantizedSpectrum)
+{
+  Word32 sfbOffs, sfb;
+
+  for(sfbOffs=0;sfbOffs<sfbCnt;sfbOffs+=sfbPerGroup) {
+    Word32 sfbNext ;
+    for (sfb = 0; sfb < maxSfbPerGroup; sfb = sfbNext) {
+      Word16 scalefactor = scalefactors[sfbOffs+sfb];                          
+      /* coalesce sfbs with the same scalefactor */
+      for (sfbNext = sfb+1;
+           sfbNext < maxSfbPerGroup && scalefactor == scalefactors[sfbOffs+sfbNext];
+           sfbNext++) ;
+
+      quantizeLines(globalGain - scalefactor,
+                    sfbOffset[sfbOffs+sfbNext] - sfbOffset[sfbOffs+sfb],
+                    mdctSpectrum + sfbOffset[sfbOffs+sfb],
+                    quantizedSpectrum + sfbOffset[sfbOffs+sfb]);
+    }
+  }
+}
+
+
+/*****************************************************************************
+*
+* function name:calcSfbDist 
+* description: quantizes and requantizes lines to calculate distortion
+* input:  number of lines to be quantized, ...
+* output: distortion
+*
+*****************************************************************************/
+Word32 calcSfbDist(const Word32 *spec,
+                   Word16  sfbWidth,
+                   Word16  gain)
+{
+  Word32 line;
+  Word32 dist;
+  Word32 m = gain&3;
+  Word32 g = (gain >> 2) + 4;

+  Word32 g2 = (g << 1) + 1;

+  Word16 *pquat, *repquat;

+    /* gain&3 */
+

+  pquat = quantBorders[m];

+  repquat = quantRecon[m];
+	

+  dist = 0;  

+  g += 16;

+  if(g2 < 0 && g >= 0)

+  {	  
+	  g2 = -g2;

+	  for(line=0; line<sfbWidth; line++) {		  
+		  if (spec[line]) {			  
+			  Word32 diff;
+			  Word32 distSingle;
+			  Word32 sa;
+			  Word32 saShft;
+			  sa = L_abs(spec[line]);
+			  //saShft = round16(L_shr(sa, g));
+			  //saShft = L_shr(sa, 16+g);

+			  saShft = sa >> g;

+
+			  if (saShft < pquat[0]) {

+				  distSingle = (saShft * saShft) >> g2;

+			  }

+			  else {

+				  

+				  if (saShft < pquat[1]) {

+					  diff = saShft - repquat[0];

+					  distSingle = (diff * diff) >> g2;

+				  }

+				  else {

+					  

+					  if (saShft < pquat[2]) {

+						  diff = saShft - repquat[1];

+						  distSingle = (diff * diff) >> g2;

+					  }

+					  else {

+						  

+						  if (saShft < pquat[3]) {

+							  diff = saShft - repquat[2];

+							  distSingle = (diff * diff) >> g2;

+						  }

+						  else {

+							  Word16 qua = quantizeSingleLine(gain, sa);

+							  Word32 iqval, diff32;

+							  /* now that we have quantized x, re-quantize it. */

+							  iquantizeLines(gain, 1, &qua, &iqval);

+							  diff32 = sa - iqval;

+							  distSingle = fixmul(diff32, diff32);

+						  }

+					  }

+				  }

+			  }

+			  

+			  dist = L_add(dist, distSingle);

+		  }
+	  }

+  }

+  else

+  {

+	  for(line=0; line<sfbWidth; line++) {		  

+		  if (spec[line]) {			  

+			  Word32 diff;

+			  Word32 distSingle;

+			  Word32 sa;

+			  Word32 saShft;

+			  sa = L_abs(spec[line]);

+			  //saShft = round16(L_shr(sa, g));

+			  saShft = L_shr(sa, g);

+

+			  if (saShft < pquat[0]) {

+				  distSingle = L_shl((saShft * saShft), g2);

+			  }

+			  else {

+				  

+				  if (saShft < pquat[1]) {

+					  diff = saShft - repquat[0];

+					  distSingle = L_shl((diff * diff), g2);

+				  }

+				  else {

+					  

+					  if (saShft < pquat[2]) {

+						  diff = saShft - repquat[1];

+						  distSingle = L_shl((diff * diff), g2);

+					  }

+					  else {

+						  

+						  if (saShft < pquat[3]) {

+							  diff = saShft - repquat[2];

+							  distSingle = L_shl((diff * diff), g2);

+						  }

+						  else {

+							  Word16 qua = quantizeSingleLine(gain, sa);

+							  Word32 iqval, diff32;

+							  /* now that we have quantized x, re-quantize it. */

+							  iquantizeLines(gain, 1, &qua, &iqval);

+							  diff32 = sa - iqval;

+							  distSingle = fixmul(diff32, diff32);

+						  }

+					  }

+				  }

+			  }

+			  dist = L_add(dist, distSingle);

+		  }

+	  }	  

+  }
+
+  return dist;
+}
diff --git a/media/libstagefright/codecs/aacenc/src/sf_estim.c b/media/libstagefright/codecs/aacenc/src/sf_estim.c
new file mode 100644
index 0000000..d34b365
--- /dev/null
+++ b/media/libstagefright/codecs/aacenc/src/sf_estim.c
@@ -0,0 +1,882 @@
+/*

+ ** Copyright 2003-2010, VisualOn, Inc.

+ **

+ ** Licensed under the Apache License, Version 2.0 (the "License");

+ ** you may not use this file except in compliance with the License.

+ ** You may obtain a copy of the License at

+ **

+ **     http://www.apache.org/licenses/LICENSE-2.0

+ **

+ ** Unless required by applicable law or agreed to in writing, software

+ ** distributed under the License is distributed on an "AS IS" BASIS,

+ ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

+ ** See the License for the specific language governing permissions and

+ ** limitations under the License.

+ */

+/*******************************************************************************

+	File:		sf_estim.c

+

+	Content:	Scale factor estimation functions

+

+*******************************************************************************/
+
+#include "basic_op.h"

+#include "oper_32b.h"
+#include "sf_estim.h"
+#include "quantize.h"
+#include "bit_cnt.h"
+#include "aac_rom.h"
+
+static const Word16 MAX_SCF_DELTA = 60;
+
+/*!
+constants reference in comments 
+
+ C0 = 6.75f;
+ C1 = -69.33295f;   -16/3*log(MAX_QUANT+0.5-logCon)/log(2) 
+ C2 = 4.0f;
+ C3 = 2.66666666f;
+ 
+  PE_C1 = 3.0f;        log(8.0)/log(2) 
+  PE_C2 = 1.3219281f;  log(2.5)/log(2) 
+  PE_C3 = 0.5593573f;  1-C2/C1 
+  
+*/
+
+#define FF_SQRT_BITS                    7
+#define FF_SQRT_TABLE_SIZE              (1<<FF_SQRT_BITS - 1<<(FF_SQRT_BITS-2))
+#define COEF08_31		0x66666666		/* 0.8*(1 << 31) */

+#define PE_C1_8			24				/* PE_C1*8 */

+#define PE_C2_16		21				/* PE_C2*8/PE_C3 */

+#define PE_SCALE		0x059a			/* 0.7 * (1 << (15 - 1 - 3))*/

+

+#define SCALE_ESTIMATE_COEF	0x5555		/* (8.8585/(4*log2(10))) * (1 << 15)*/

+
+/*********************************************************************************
+*
+* function name: formfac_sqrt
+* description:  calculates sqrt(x)/256 
+*
+**********************************************************************************/
+__inline Word32 formfac_sqrt(Word32 x)
+{
+	Word32 y;
+	Word32 preshift, postshift;
+	
+	
+	if (x==0) return 0;
+	preshift  = norm_l(x) - (INT_BITS-1-FF_SQRT_BITS);
+	postshift = preshift >> 1;
+	preshift  = postshift << 1;
+	postshift = postshift + 8;	  /* sqrt/256 */
+	if(preshift >= 0)

+		y = x << preshift;        /* now 1/4 <= y < 1 */

+	else

+		y = x >> (-preshift);

+	y = formfac_sqrttable[y-32];

+	

+	if(postshift >= 0)

+		y = y >> postshift;

+	else

+		y = y << (-postshift);

+	

+	return y;
+}
+
+
+/*********************************************************************************
+*
+* function name: CalcFormFactorChannel
+* description:  calculate the form factor one channel
+*				ffac(n) = sqrt(abs(X(k)) + sqrt(abs(X(k+1)) + ....
+*
+**********************************************************************************/
+static void
+CalcFormFactorChannel(Word16 *logSfbFormFactor,
+                      Word16 *sfbNRelevantLines,
+                      Word16 *logSfbEnergy,
+                      PSY_OUT_CHANNEL *psyOutChan)
+{
+	Word32 sfbw, sfbw1;

+	Word32 i, j;
+	Word32 sfbOffs, sfb, shift;
+	

+	sfbw = sfbw1 = 0;

+	for (sfbOffs=0; sfbOffs<psyOutChan->sfbCnt; sfbOffs+=psyOutChan->sfbPerGroup){
+		for (sfb=0; sfb<psyOutChan->maxSfbPerGroup; sfb++) {
+			i = sfbOffs+sfb;      
+			
+			if (psyOutChan->sfbEnergy[i] > psyOutChan->sfbThreshold[i]) {
+				Word32 accu, avgFormFactor,iSfbWidth;

+				Word32 *mdctSpec;
+				sfbw = psyOutChan->sfbOffsets[i+1] - psyOutChan->sfbOffsets[i];

+				iSfbWidth = invSBF[(sfbw >> 2) - 1];

+				mdctSpec = psyOutChan->mdctSpectrum + psyOutChan->sfbOffsets[i];
+				accu = 0;                                                                       
+				/* calc sum of sqrt(spec) */
+				for (j=sfbw; j; j--) {

+					accu += formfac_sqrt(L_abs(*mdctSpec)); mdctSpec++;

+				}
+				logSfbFormFactor[i] = iLog4(accu);
+				logSfbEnergy[i] = iLog4(psyOutChan->sfbEnergy[i]);
+				avgFormFactor = fixmul(rsqrt(psyOutChan->sfbEnergy[i],INT_BITS), iSfbWidth);
+				avgFormFactor = rsqrt((Word32)avgFormFactor,INT_BITS) >> 10;
+				/* result is multiplied by 4 */
+				if(avgFormFactor)
+					sfbNRelevantLines[i] = accu / avgFormFactor;
+				else
+					sfbNRelevantLines[i] = 0x7fff;
+			}
+			else {
+				/* set number of lines to zero */
+				sfbNRelevantLines[i] = 0;                                                       
+			}
+		}
+	}
+}
+
+/*********************************************************************************
+*
+* function name: improveScf
+* description:  find better scalefactor with analysis by synthesis
+*
+**********************************************************************************/
+static Word16 improveScf(Word32 *spec, 
+                         Word16  sfbWidth, 
+                         Word32  thresh, 
+                         Word16  scf,
+                         Word16  minScf,
+                         Word32 *dist, 
+                         Word16 *minScfCalculated)
+{
+	Word32 cnt;
+	Word32 sfbDist;
+	Word32 scfBest;
+	Word32 thresh125 = L_add(thresh, (thresh >> 2));
+	
+	scfBest = scf;                                                       
+	
+	/* calc real distortion */
+	sfbDist = calcSfbDist(spec, sfbWidth, scf);
+	*minScfCalculated = scf;     

+	if(!sfbDist)

+	  return scfBest;
+	
+	if (sfbDist > thresh125) {
+		Word32 scfEstimated;
+		Word32 sfbDistBest;
+		scfEstimated = scf;                                               
+		sfbDistBest = sfbDist;                                            
+		
+		cnt = 0;                                                          
+		while (sfbDist > thresh125 && (cnt < 3)) {
+			
+			scf = scf + 1;
+			sfbDist = calcSfbDist(spec, sfbWidth, scf);
+			
+			if (sfbDist < sfbDistBest) {
+				scfBest = scf;                                              
+				sfbDistBest = sfbDist;                                      
+			}
+			cnt = cnt + 1;
+		}
+		cnt = 0;                                                          
+		scf = scfEstimated;                                               
+		sfbDist = sfbDistBest;                                            
+		while ((sfbDist > thresh125) && (cnt < 1) && (scf > minScf)) {
+			
+			scf = scf - 1;
+			sfbDist = calcSfbDist(spec, sfbWidth, scf);
+			
+			if (sfbDist < sfbDistBest) {
+				scfBest = scf;                                              
+				sfbDistBest = sfbDist;                                      
+			}
+			*minScfCalculated = scf;                                       
+			cnt = cnt + 1;
+		}

+		*dist = sfbDistBest;                                              
+	}
+	else {
+		Word32 sfbDistBest; 
+		Word32 sfbDistAllowed;
+		Word32 thresh08 = fixmul(COEF08_31, thresh);
+		sfbDistBest = sfbDist;                                            
+		
+		if (sfbDist < thresh08)
+			sfbDistAllowed = sfbDist;
+		else
+			sfbDistAllowed = thresh08;
+		for (cnt=0; cnt<3; cnt++) {
+			scf = scf + 1;
+			sfbDist = calcSfbDist(spec, sfbWidth, scf);
+			
+			if (fixmul(COEF08_31,sfbDist) < sfbDistAllowed) {
+				*minScfCalculated = scfBest + 1;
+				scfBest = scf;                                              
+				sfbDistBest = sfbDist;                                      
+			}
+		}
+		*dist = sfbDistBest;                                              
+	}
+	
+	/* return best scalefactor */
+	return scfBest;
+}
+
+/*********************************************************************************
+*
+* function name: countSingleScfBits
+* description:  count single scf bits in huffum
+*
+**********************************************************************************/
+static Word16 countSingleScfBits(Word16 scf, Word16 scfLeft, Word16 scfRight)
+{
+	Word16 scfBits;
+	
+	scfBits = bitCountScalefactorDelta(scfLeft - scf) +
+		bitCountScalefactorDelta(scf - scfRight);
+	
+	return scfBits;
+}
+
+/*********************************************************************************
+*
+* function name: calcSingleSpecPe
+* description:  ldRatio = log2(en(n)) - 0,375*scfGain(n)
+*				nbits = 0.7*nLines*ldRation for ldRation >= c1
+*				nbits = 0.7*nLines*(c2 + c3*ldRatio) for ldRation < c1 
+*
+**********************************************************************************/
+static Word16 calcSingleSpecPe(Word16 scf, Word16 sfbConstPePart, Word16 nLines)
+{
+	Word32 specPe;
+	Word32 ldRatio;
+	Word32 scf3;
+	
+	ldRatio = sfbConstPePart << 3; /*  (sfbConstPePart -0.375*scf)*8 */
+	scf3 = scf + scf + scf;
+	ldRatio = ldRatio - scf3;
+    
+	if (ldRatio < PE_C1_8) {
+		/* 21 : 2*8*PE_C2, 2*PE_C3 ~ 1*/ 
+		ldRatio = (ldRatio + PE_C2_16) >> 1;
+	}
+	specPe = nLines * ldRatio;
+	specPe = (specPe * PE_SCALE) >> 14;
+	
+	return saturate(specPe);
+}
+
+
+/*********************************************************************************
+*
+* function name: countScfBitsDiff
+* description:  count different scf bits used
+*
+**********************************************************************************/
+static Word16 countScfBitsDiff(Word16 *scfOld, Word16 *scfNew, 
+                               Word16 sfbCnt, Word16 startSfb, Word16 stopSfb)
+{
+	Word32 scfBitsDiff;
+	Word32 sfb, sfbLast;
+	Word32 sfbPrev, sfbNext;
+	
+	scfBitsDiff = 0;                                                      
+	sfb = 0;                                                              
+	
+	/* search for first relevant sfb */
+	sfbLast = startSfb;                                                   
+	while (sfbLast < stopSfb && scfOld[sfbLast] == VOAAC_SHRT_MIN) {
+		
+		sfbLast = sfbLast + 1;
+	}
+	/* search for previous relevant sfb and count diff */
+	sfbPrev = startSfb - 1;
+	while ((sfbPrev>=0) && scfOld[sfbPrev] == VOAAC_SHRT_MIN) {
+		
+		sfbPrev = sfbPrev - 1;
+	}
+	
+	if (sfbPrev>=0) {
+		scfBitsDiff += bitCountScalefactorDelta(scfNew[sfbPrev] - scfNew[sfbLast]) -
+			bitCountScalefactorDelta(scfOld[sfbPrev] - scfOld[sfbLast]);
+	}
+	/* now loop through all sfbs and count diffs of relevant sfbs */
+	for (sfb=sfbLast+1; sfb<stopSfb; sfb++) {
+		
+		if (scfOld[sfb] != VOAAC_SHRT_MIN) {
+			scfBitsDiff += bitCountScalefactorDelta(scfNew[sfbLast] - scfNew[sfb]) -
+				bitCountScalefactorDelta(scfOld[sfbLast] - scfOld[sfb]);
+			sfbLast = sfb;                                                    
+		}
+	}
+	/* search for next relevant sfb and count diff */
+	sfbNext = stopSfb;                                                    
+	while (sfbNext < sfbCnt && scfOld[sfbNext] == VOAAC_SHRT_MIN) {
+		
+		sfbNext = sfbNext + 1;
+	}
+	
+	if (sfbNext < sfbCnt)
+		scfBitsDiff += bitCountScalefactorDelta(scfNew[sfbLast] - scfNew[sfbNext]) -
+		bitCountScalefactorDelta(scfOld[sfbLast] - scfOld[sfbNext]);
+	
+	return saturate(scfBitsDiff);
+}
+
+static Word16 calcSpecPeDiff(Word16 *scfOld,
+                             Word16 *scfNew,
+                             Word16 *sfbConstPePart,
+                             Word16 *logSfbEnergy,
+                             Word16 *logSfbFormFactor,
+                             Word16 *sfbNRelevantLines,
+                             Word16 startSfb, 
+                             Word16 stopSfb)
+{
+	Word32 specPeDiff;
+	Word32 sfb;
+	
+	specPeDiff = 0;                                                       
+	
+	/* loop through all sfbs and count pe difference */
+	for (sfb=startSfb; sfb<stopSfb; sfb++) {
+		
+		
+		if (scfOld[sfb] != VOAAC_SHRT_MIN) {
+			Word32 ldRatioOld, ldRatioNew;
+			Word32 scf3;
+			
+			
+			if (sfbConstPePart[sfb] == MIN_16) {
+				sfbConstPePart[sfb] = ((logSfbEnergy[sfb] -
+					logSfbFormFactor[sfb]) + 11-8*4+3) >> 2;
+			}
+			
+			
+			ldRatioOld = sfbConstPePart[sfb] << 3;
+			scf3 = scfOld[sfb] + scfOld[sfb] + scfOld[sfb];
+			ldRatioOld = ldRatioOld - scf3;
+			ldRatioNew = sfbConstPePart[sfb] << 3;
+			scf3 = scfNew[sfb] + scfNew[sfb] + scfNew[sfb];
+			ldRatioNew = ldRatioNew - scf3;
+			
+			if (ldRatioOld < PE_C1_8) {
+				/* 21 : 2*8*PE_C2, 2*PE_C3 ~ 1*/
+				ldRatioOld = (ldRatioOld + PE_C2_16) >> 1;
+			}
+			
+			if (ldRatioNew < PE_C1_8) {
+				/* 21 : 2*8*PE_C2, 2*PE_C3 ~ 1*/
+				ldRatioNew = (ldRatioNew + PE_C2_16) >> 1;
+			}
+			
+			specPeDiff +=  sfbNRelevantLines[sfb] * (ldRatioNew - ldRatioOld);
+		}
+	}
+	
+	specPeDiff = (specPeDiff * PE_SCALE) >> 14;
+	
+	return saturate(specPeDiff);
+}
+
+
+/*********************************************************************************
+*
+* function name: assimilateSingleScf
+* description:  searched for single scalefactor bands, where the number of bits gained
+*				by using a smaller scfgain(n) is greater than the estimated increased
+*				bit demand
+*
+**********************************************************************************/
+static void assimilateSingleScf(PSY_OUT_CHANNEL *psyOutChan,
+                                Word16 *scf, 
+                                Word16 *minScf,
+                                Word32 *sfbDist, 
+                                Word16 *sfbConstPePart,
+                                Word16 *logSfbEnergy,
+                                Word16 *logSfbFormFactor,
+                                Word16 *sfbNRelevantLines,
+                                Word16 *minScfCalculated,
+                                Flag    restartOnSuccess)
+{
+	Word32 sfbLast, sfbAct, sfbNext, scfAct, scfMin;
+	Word16 *scfLast, *scfNext;
+	Word32 sfbPeOld, sfbPeNew;
+	Word32 sfbDistNew;
+	Word32 j;
+	Flag   success;
+	Word16 deltaPe, deltaPeNew, deltaPeTmp;
+	Word16 *prevScfLast = psyOutChan->prevScfLast;
+	Word16 *prevScfNext = psyOutChan->prevScfNext;
+	Word16 *deltaPeLast = psyOutChan->deltaPeLast;
+	Flag   updateMinScfCalculated;
+	
+	success = 0;                                                                  
+	deltaPe = 0;                                                                  
+	
+	for(j=0;j<psyOutChan->sfbCnt;j++){
+		prevScfLast[j] = MAX_16;                                                    
+		prevScfNext[j] = MAX_16;                                                    
+		deltaPeLast[j] = MAX_16;                                                    
+	}

+	
+	sfbLast = -1;                                                                 
+	sfbAct = -1;                                                                  
+	sfbNext = -1;                                                                 
+	scfLast = 0;
+	scfNext = 0;
+	scfMin = MAX_16;                                                              
+	do {
+		/* search for new relevant sfb */
+		sfbNext = sfbNext + 1;
+		while (sfbNext < psyOutChan->sfbCnt && scf[sfbNext] == MIN_16) {
+			
+			sfbNext = sfbNext + 1;
+		}
+		
+		if ((sfbLast>=0) && (sfbAct>=0) && sfbNext < psyOutChan->sfbCnt) {
+			/* relevant scfs to the left and to the right */
+			scfAct  = scf[sfbAct];                                                    
+			scfLast = scf + sfbLast;
+			scfNext = scf + sfbNext;
+			scfMin  = min(*scfLast, *scfNext);
+		}
+		else {
+			
+			if (sfbLast == -1 && (sfbAct>=0) && sfbNext < psyOutChan->sfbCnt) {
+				/* first relevant scf */
+				scfAct  = scf[sfbAct];                                                  
+				scfLast = &scfAct;
+				scfNext = scf + sfbNext;
+				scfMin  = *scfNext;                                                     
+			}
+			else {
+				
+				if ((sfbLast>=0) && (sfbAct>=0) && sfbNext == psyOutChan->sfbCnt) {
+					/* last relevant scf */
+					scfAct  = scf[sfbAct];                                                
+					scfLast = scf + sfbLast;
+					scfNext = &scfAct;
+					scfMin  = *scfLast;                                                   
+				}
+			}
+		}
+		
+		if (sfbAct>=0)
+			scfMin = max(scfMin, minScf[sfbAct]);
+		
+		if ((sfbAct >= 0) && 
+			(sfbLast>=0 || sfbNext < psyOutChan->sfbCnt) && 
+			scfAct > scfMin && 
+			(*scfLast != prevScfLast[sfbAct] || 
+			*scfNext != prevScfNext[sfbAct] || 
+			deltaPe < deltaPeLast[sfbAct])) {
+			success = 0;                                                              
+			
+			/* estimate required bits for actual scf */			
+			if (sfbConstPePart[sfbAct] == MIN_16) {
+				sfbConstPePart[sfbAct] = logSfbEnergy[sfbAct] -
+					logSfbFormFactor[sfbAct] + 11-8*4; /* 4*log2(6.75) - 32 */
+				
+				if (sfbConstPePart[sfbAct] < 0)
+					sfbConstPePart[sfbAct] = sfbConstPePart[sfbAct] + 3;
+				sfbConstPePart[sfbAct] = sfbConstPePart[sfbAct] >> 2;
+			}
+			
+			sfbPeOld = calcSingleSpecPe(scfAct, sfbConstPePart[sfbAct], sfbNRelevantLines[sfbAct]) +
+				countSingleScfBits(scfAct, *scfLast, *scfNext);
+			deltaPeNew = deltaPe;                                                     
+			updateMinScfCalculated = 1;                                               
+			do {
+				scfAct = scfAct - 1;
+				/* check only if the same check was not done before */
+				
+				if (scfAct < minScfCalculated[sfbAct]) {
+					sfbPeNew = calcSingleSpecPe(scfAct, sfbConstPePart[sfbAct], sfbNRelevantLines[sfbAct]) +
+						countSingleScfBits(scfAct, *scfLast, *scfNext);
+					/* use new scf if no increase in pe and 
+					quantization error is smaller */
+					deltaPeTmp = deltaPe + sfbPeNew - sfbPeOld;
+					
+					if (deltaPeTmp < 10) {
+						sfbDistNew = calcSfbDist(psyOutChan->mdctSpectrum+
+							psyOutChan->sfbOffsets[sfbAct],
+							(psyOutChan->sfbOffsets[sfbAct+1] - psyOutChan->sfbOffsets[sfbAct]),
+							scfAct);
+						if (sfbDistNew < sfbDist[sfbAct]) {
+							/* success, replace scf by new one */
+							scf[sfbAct] = scfAct;                                     
+							sfbDist[sfbAct] = sfbDistNew;                             
+							deltaPeNew = deltaPeTmp;                                  
+							success = 1;                                              
+						}
+						/* mark as already checked */
+						
+						if (updateMinScfCalculated) {
+							minScfCalculated[sfbAct] = scfAct;                        
+						}
+					}
+					else {
+						updateMinScfCalculated = 0;                                 
+					}
+				}
+				
+			} while (scfAct > scfMin);
+			deltaPe = deltaPeNew;                                             
+			/* save parameters to avoid multiple computations of the same sfb */
+			prevScfLast[sfbAct] = *scfLast;                                   
+			prevScfNext[sfbAct] = *scfNext;                                   
+			deltaPeLast[sfbAct] = deltaPe;                                    
+		}
+		
+		if (success && restartOnSuccess) {
+			/* start again at first sfb */
+			sfbLast = -1;                                                     
+			sfbAct  = -1;                                                     
+			sfbNext = -1;                                                     
+			scfLast = 0;
+			scfNext = 0;
+			scfMin  = MAX_16;                                                 
+			success = 0;                                                      
+		}
+		else {
+			/* shift sfbs for next band */
+			sfbLast = sfbAct;                                                 
+			sfbAct  = sfbNext;                                                
+		}
+		
+  } while (sfbNext < psyOutChan->sfbCnt);
+}
+
+
+/*********************************************************************************
+*
+* function name: assimilateMultipleScf
+* description:  scalefactor difference reduction
+*
+**********************************************************************************/
+static void assimilateMultipleScf(PSY_OUT_CHANNEL *psyOutChan,
+                                  Word16 *scf, 
+                                  Word16 *minScf,
+                                  Word32 *sfbDist, 
+                                  Word16 *sfbConstPePart,
+                                  Word16 *logSfbEnergy,
+                                  Word16 *logSfbFormFactor,
+                                  Word16 *sfbNRelevantLines)
+{
+	Word32 sfb, startSfb, stopSfb, scfMin, scfMax, scfAct;
+	Flag   possibleRegionFound;
+	Word32 deltaScfBits;
+	Word32 deltaSpecPe;
+	Word32 deltaPe, deltaPeNew;
+	Word32 sfbCnt;
+	Word32 *sfbDistNew = psyOutChan->sfbDistNew;
+	Word16 *scfTmp = psyOutChan->prevScfLast;
+
+	deltaPe = 0;                                                          
+	sfbCnt = psyOutChan->sfbCnt;                                          
+	
+	/* calc min and max scalfactors */
+	scfMin = MAX_16;                                                      
+	scfMax = MIN_16;                                                      
+	for (sfb=0; sfb<sfbCnt; sfb++) {
+		
+		if (scf[sfb] != MIN_16) {
+			scfMin = min(scfMin, scf[sfb]);
+			scfMax = max(scfMax, scf[sfb]);
+		}
+	}
+	
+	if (scfMax !=  MIN_16) {
+		
+		scfAct = scfMax;                                             
+		
+		do {
+			scfAct = scfAct - 1;
+			for (sfb=0; sfb<sfbCnt; sfb++) {
+				scfTmp[sfb] = scf[sfb];                                         
+			}
+			stopSfb = 0;                                                      
+			do {
+				sfb = stopSfb;                                                  
+				
+				while (sfb < sfbCnt && (scf[sfb] == MIN_16 || scf[sfb] <= scfAct)) {
+					sfb = sfb + 1;
+				}
+				startSfb = sfb;                                                 
+				sfb = sfb + 1;
+				
+				while (sfb < sfbCnt && (scf[sfb] == MIN_16 || scf[sfb] > scfAct)) {
+					sfb = sfb + 1;
+				}
+				stopSfb = sfb;                                                  
+				
+				possibleRegionFound = 0;                                        
+				
+				if (startSfb < sfbCnt) {
+					possibleRegionFound = 1;                                      
+					for (sfb=startSfb; sfb<stopSfb; sfb++) {
+						
+						if (scf[sfb]!=MIN_16) {
+							
+							if (scfAct < minScf[sfb]) {
+								possibleRegionFound = 0;                                
+								break;
+							}
+						}
+					}
+				}
+				
+				
+				if (possibleRegionFound) { /* region found */
+					
+					/* replace scfs in region by scfAct */
+					for (sfb=startSfb; sfb<stopSfb; sfb++) {
+						
+						if (scfTmp[sfb]!=MIN_16)
+							scfTmp[sfb] = scfAct;                                     
+					}
+					
+					/* estimate change in bit demand for new scfs */
+					deltaScfBits = countScfBitsDiff(scf,scfTmp,sfbCnt,startSfb,stopSfb);
+					deltaSpecPe = calcSpecPeDiff(scf, scfTmp, sfbConstPePart,
+						logSfbEnergy, logSfbFormFactor, sfbNRelevantLines, 
+						startSfb, stopSfb);
+					deltaPeNew = deltaPe + deltaScfBits + deltaSpecPe;
+					
+					
+					if (deltaPeNew < 10) {
+						Word32 distOldSum, distNewSum;
+						
+						/* quantize and calc sum of new distortion */
+						distOldSum = 0;                                                     
+						distNewSum = 0;                                                     
+						for (sfb=startSfb; sfb<stopSfb; sfb++) {
+							
+							if (scfTmp[sfb] != MIN_16) {
+								distOldSum = L_add(distOldSum, sfbDist[sfb]);
+								
+								sfbDistNew[sfb] = calcSfbDist(psyOutChan->mdctSpectrum +
+									psyOutChan->sfbOffsets[sfb], 
+									(psyOutChan->sfbOffsets[sfb+1] - psyOutChan->sfbOffsets[sfb]),
+									scfAct);
+								
+								
+								if (sfbDistNew[sfb] > psyOutChan->sfbThreshold[sfb]) {
+									distNewSum = distOldSum << 1;
+									break;
+								}
+								distNewSum = L_add(distNewSum, sfbDistNew[sfb]);
+							}
+						}
+						
+						if (distNewSum < distOldSum) {
+							deltaPe = deltaPeNew;                                             
+							for (sfb=startSfb; sfb<stopSfb; sfb++) {
+								
+								if (scf[sfb]!=MIN_16) {
+									scf[sfb] = scfAct;                                            
+									sfbDist[sfb] = sfbDistNew[sfb];                               
+								}
+							}
+						}
+					}
+				}        
+			} while (stopSfb <= sfbCnt);      
+		} while (scfAct > scfMin);
+	}
+}
+
+/*********************************************************************************
+*
+* function name: EstimateScaleFactorsChannel
+* description:  estimate scale factors for one channel
+*
+**********************************************************************************/
+static void
+EstimateScaleFactorsChannel(PSY_OUT_CHANNEL *psyOutChan,
+                            Word16          *scf,
+                            Word16          *globalGain,
+                            Word16          *logSfbEnergy,
+                            Word16          *logSfbFormFactor,
+                            Word16          *sfbNRelevantLines)
+{
+	Word32 i, j;
+	Word32 thresh, energy;
+	Word32 energyPart, thresholdPart;
+	Word32 scfInt, minScf, maxScf, maxAllowedScf, lastSf;
+	Word32 maxSpec;
+	Word32 *sfbDist = psyOutChan->sfbDist;
+	Word16 *minSfMaxQuant = psyOutChan->minSfMaxQuant;
+	Word16 *minScfCalculated = psyOutChan->minScfCalculated;
+	
+	
+	for (i=0; i<psyOutChan->sfbCnt; i++) {
+		Word32 sbfwith, sbfStart;

+		Word32 *mdctSpec;
+		thresh = psyOutChan->sfbThreshold[i];                                       
+		energy = psyOutChan->sfbEnergy[i];                                          
+		

+		sbfStart = psyOutChan->sfbOffsets[i];

+		sbfwith = psyOutChan->sfbOffsets[i+1] - sbfStart;

+		mdctSpec = psyOutChan->mdctSpectrum+sbfStart;

+		
+		maxSpec = 0;                                                                
+		/* maximum of spectrum */
+		for (j=sbfwith; j; j-- ) {

+			Word32 absSpec = L_abs(*mdctSpec); mdctSpec++;

+			maxSpec |= absSpec;                                                       

+		}
+		
+		/* scfs without energy or with thresh>energy are marked with MIN_16 */
+		scf[i] = MIN_16;                                                            
+		minSfMaxQuant[i] = MIN_16;    
+		
+		if ((maxSpec > 0) && (energy > thresh)) {
+			
+			energyPart = logSfbFormFactor[i];                                         
+			thresholdPart = iLog4(thresh);  
+			/* -20 = 4*log2(6.75) - 32 */

+			scfInt = ((thresholdPart - energyPart - 20) * SCALE_ESTIMATE_COEF) >> 15;
+			
+			minSfMaxQuant[i] = iLog4(maxSpec) - 68; /* 68  -16/3*log(MAX_QUANT+0.5-logCon)/log(2) + 1 */
+			
+			
+			if (minSfMaxQuant[i] > scfInt) {
+				scfInt = minSfMaxQuant[i];                                              
+			}
+			
+			/* find better scalefactor with analysis by synthesis */
+			scfInt = improveScf(psyOutChan->mdctSpectrum+sbfStart,

+				sbfwith,

+				thresh, scfInt, minSfMaxQuant[i], 

+				&sfbDist[i], &minScfCalculated[i]);
+			
+			scf[i] = scfInt;                                                          
+		}
+	}
+	
+	
+	/* scalefactor differece reduction  */
+	{
+		Word16 sfbConstPePart[MAX_GROUPED_SFB];
+		for(i=0;i<psyOutChan->sfbCnt;i++) {
+			sfbConstPePart[i] = MIN_16;                                               
+		}
+		
+		assimilateSingleScf(psyOutChan, scf, 
+			minSfMaxQuant, sfbDist, sfbConstPePart, logSfbEnergy,
+			logSfbFormFactor, sfbNRelevantLines, minScfCalculated, 1);
+		
+		assimilateMultipleScf(psyOutChan, scf, 
+			minSfMaxQuant, sfbDist, sfbConstPePart, logSfbEnergy,
+			logSfbFormFactor, sfbNRelevantLines);
+	}
+
+	/* get max scalefac for global gain */
+	maxScf = MIN_16;                                                              
+	minScf = MAX_16;                                                              
+	for (i=0; i<psyOutChan->sfbCnt; i++) {
+		
+		if (maxScf < scf[i]) {
+			maxScf = scf[i];                                                          
+		}
+		
+		if ((scf[i] != MIN_16) && (minScf > scf[i])) {
+			minScf = scf[i];                                                          
+		}
+	}
+	/* limit scf delta */
+	maxAllowedScf = minScf + MAX_SCF_DELTA;
+	for(i=0; i<psyOutChan->sfbCnt; i++) {
+		
+		if ((scf[i] != MIN_16) && (maxAllowedScf < scf[i])) {
+			scf[i] = maxAllowedScf;                                                   
+		}
+	}
+	/* new maxScf if any scf has been limited */
+	
+	if (maxAllowedScf < maxScf) {
+		maxScf = maxAllowedScf;                                                     
+	}
+	
+	/* calc loop scalefactors */
+	
+	if (maxScf > MIN_16) {
+		*globalGain = maxScf;                                                       
+		lastSf = 0;                                                                 
+		
+		for(i=0; i<psyOutChan->sfbCnt; i++) {
+			
+			if (scf[i] == MIN_16) {
+				scf[i] = lastSf;                                                        
+				/* set band explicitely to zero */
+				for (j=psyOutChan->sfbOffsets[i]; j<psyOutChan->sfbOffsets[i+1]; j++) {
+					psyOutChan->mdctSpectrum[j] = 0;                                      
+				}
+			}
+			else {
+				scf[i] = maxScf - scf[i];
+				lastSf = scf[i];                                                        
+			}
+		}
+	}
+	else{
+		*globalGain = 0;                                                            
+		/* set spectrum explicitely to zero */
+		for(i=0; i<psyOutChan->sfbCnt; i++) {
+			scf[i] = 0;                                                               
+			for (j=psyOutChan->sfbOffsets[i]; j<psyOutChan->sfbOffsets[i+1]; j++) {
+				psyOutChan->mdctSpectrum[j] = 0;                                        
+			}
+		}
+	}
+}
+
+/*********************************************************************************
+*
+* function name: CalcFormFactor
+* description:  estimate Form factors for all channel
+*
+**********************************************************************************/
+void
+CalcFormFactor(Word16 logSfbFormFactor[MAX_CHANNELS][MAX_GROUPED_SFB],
+               Word16 sfbNRelevantLines[MAX_CHANNELS][MAX_GROUPED_SFB],
+               Word16 logSfbEnergy[MAX_CHANNELS][MAX_GROUPED_SFB],
+               PSY_OUT_CHANNEL psyOutChannel[MAX_CHANNELS],
+               const Word16 nChannels)
+{
+	Word16 j;
+	
+	for (j=0; j<nChannels; j++) {
+		CalcFormFactorChannel(logSfbFormFactor[j], sfbNRelevantLines[j], logSfbEnergy[j], &psyOutChannel[j]);
+	}
+}
+
+/*********************************************************************************
+*
+* function name: EstimateScaleFactors
+* description:  estimate scale factors for all channel
+*
+**********************************************************************************/
+void
+EstimateScaleFactors(PSY_OUT_CHANNEL psyOutChannel[MAX_CHANNELS],
+                     QC_OUT_CHANNEL  qcOutChannel[MAX_CHANNELS],
+                     Word16          logSfbEnergy[MAX_CHANNELS][MAX_GROUPED_SFB],
+                     Word16          logSfbFormFactor[MAX_CHANNELS][MAX_GROUPED_SFB],
+                     Word16          sfbNRelevantLines[MAX_CHANNELS][MAX_GROUPED_SFB],
+                     const Word16    nChannels)
+{
+	Word16 j;
+	
+	for (j=0; j<nChannels; j++) {
+		EstimateScaleFactorsChannel(&psyOutChannel[j],
+			qcOutChannel[j].scf,
+			&(qcOutChannel[j].globalGain),
+			logSfbEnergy[j],
+			logSfbFormFactor[j],
+			sfbNRelevantLines[j]);
+	}
+}
+
diff --git a/media/libstagefright/codecs/aacenc/src/spreading.c b/media/libstagefright/codecs/aacenc/src/spreading.c
new file mode 100644
index 0000000..e6fc7da
--- /dev/null
+++ b/media/libstagefright/codecs/aacenc/src/spreading.c
@@ -0,0 +1,52 @@
+/*

+ ** Copyright 2003-2010, VisualOn, Inc.

+ **

+ ** Licensed under the Apache License, Version 2.0 (the "License");

+ ** you may not use this file except in compliance with the License.

+ ** You may obtain a copy of the License at

+ **

+ **     http://www.apache.org/licenses/LICENSE-2.0

+ **

+ ** Unless required by applicable law or agreed to in writing, software

+ ** distributed under the License is distributed on an "AS IS" BASIS,

+ ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

+ ** See the License for the specific language governing permissions and

+ ** limitations under the License.

+ */

+/*******************************************************************************

+	File:		spreading.c

+

+	Content:	Spreading of energy function

+

+*******************************************************************************/

+

+#include "basic_op.h"

+#include "oper_32b.h"

+#include "spreading.h"

+

+/*********************************************************************************
+*
+* function name: SpreadingMax
+* description:  spreading the energy
+*				 higher frequencies thr(n) = max(thr(n), sh(n)*thr(n-1))
+*				 lower frequencies  thr(n) = max(thr(n), sl(n)*thr(n+1))
+*
+**********************************************************************************/

+void SpreadingMax(const Word16 pbCnt,

+                  const Word16 *maskLowFactor,

+                  const Word16 *maskHighFactor,

+                  Word32       *pbSpreadedEnergy)

+{

+  Word32 i;

+

+  /* slope to higher frequencies */

+  for (i=1; i<pbCnt; i++) {

+    pbSpreadedEnergy[i] = max(pbSpreadedEnergy[i],

+                                L_mpy_ls(pbSpreadedEnergy[i-1], maskHighFactor[i]));

+  }

+  /* slope to lower frequencies */

+  for (i=pbCnt - 2; i>=0; i--) {

+    pbSpreadedEnergy[i] = max(pbSpreadedEnergy[i],

+                                L_mpy_ls(pbSpreadedEnergy[i+1], maskLowFactor[i]));

+  }

+}

diff --git a/media/libstagefright/codecs/aacenc/src/stat_bits.c b/media/libstagefright/codecs/aacenc/src/stat_bits.c
new file mode 100644
index 0000000..556104e
--- /dev/null
+++ b/media/libstagefright/codecs/aacenc/src/stat_bits.c
@@ -0,0 +1,237 @@
+/*

+ ** Copyright 2003-2010, VisualOn, Inc.

+ **

+ ** Licensed under the Apache License, Version 2.0 (the "License");

+ ** you may not use this file except in compliance with the License.

+ ** You may obtain a copy of the License at

+ **

+ **     http://www.apache.org/licenses/LICENSE-2.0

+ **

+ ** Unless required by applicable law or agreed to in writing, software

+ ** distributed under the License is distributed on an "AS IS" BASIS,

+ ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

+ ** See the License for the specific language governing permissions and

+ ** limitations under the License.

+ */

+/*******************************************************************************

+	File:		stat_bits.c

+

+	Content:	Static bit counter functions

+

+*******************************************************************************/
+
+#include "stat_bits.h"
+#include "bitenc.h"
+#include "tns.h"
+
+
+typedef enum {
+  SI_ID_BITS                =(3),
+  SI_FILL_COUNT_BITS        =(4),
+  SI_FILL_ESC_COUNT_BITS    =(8),
+  SI_FILL_EXTENTION_BITS    =(4),
+  SI_FILL_NIBBLE_BITS       =(4),
+  SI_SCE_BITS               =(4),
+  SI_CPE_BITS               =(5),
+  SI_CPE_MS_MASK_BITS       =(2) ,
+  SI_ICS_INFO_BITS_LONG     =(1+2+1+6+1),
+  SI_ICS_INFO_BITS_SHORT    =(1+2+1+4+7),
+  SI_ICS_BITS               =(8+1+1+1)
+} SI_BITS;
+
+
+/*********************************************************************************
+*
+* function name: countMsMaskBits
+* description:   count ms stereo bits demand
+*
+**********************************************************************************/
+static Word16 countMsMaskBits(Word16   sfbCnt,
+                              Word16   sfbPerGroup,
+                              Word16   maxSfbPerGroup,
+                              struct TOOLSINFO *toolsInfo)
+{
+  Word16 msBits, sfbOff, sfb;
+  msBits = 0;                                            
+
+   
+  switch(toolsInfo->msDigest) {
+    case MS_NONE:
+    case MS_ALL:
+      break;
+
+    case MS_SOME:
+      for(sfbOff=0; sfbOff<sfbCnt; sfbOff+=sfbPerGroup)
+        for(sfb=0; sfb<maxSfbPerGroup; sfb++)
+          msBits += 1;
+      break;
+  }
+  return(msBits);
+}
+
+/*********************************************************************************
+*
+* function name: tnsCount
+* description:   count tns bit demand  core function
+*
+**********************************************************************************/
+static Word16 tnsCount(TNS_INFO *tnsInfo, Word16 blockType)
+{
+
+  Word32 i, k;
+  Flag tnsPresent;
+  Word32 numOfWindows;
+  Word32 count;
+  Word32 coefBits;

+  Word16 *ptcoef;
+
+  count = 0;       

+  
+  if (blockType == 2)
+    numOfWindows = 8;
+  else
+    numOfWindows = 1;
+  tnsPresent = 0;                                        
+
+  for (i=0; i<numOfWindows; i++) {
+     
+    if (tnsInfo->tnsActive[i]!=0) {
+      tnsPresent = 1;                                    
+    }
+  }
+   
+  if (tnsPresent) {
+    /* there is data to be written*/
+    /*count += 1; */
+    for (i=0; i<numOfWindows; i++) {
+       
+      if (blockType == 2)
+        count += 1;
+      else
+        count += 2;
+       
+      if (tnsInfo->tnsActive[i]) {
+        count += 1;
+         
+        if (blockType == 2) {
+          count += 4;
+          count += 3;
+        }
+        else {
+          count += 6;
+          count += 5;
+        }
+         
+        if (tnsInfo->order[i]) {
+          count += 1; /*direction*/
+          count += 1; /*coef_compression */	
+           
+          if (tnsInfo->coefRes[i] == 4) {
+            ptcoef = tnsInfo->coef + i*TNS_MAX_ORDER_SHORT;

+			coefBits = 3;                                        
+            for(k=0; k<tnsInfo->order[i]; k++) {
+                 
+              if ((ptcoef[k] > 3) || (ptcoef[k] < -4)) {
+                coefBits = 4;                                    
+                break;
+              }
+            }
+          }
+          else {
+            coefBits = 2;                                        
+            ptcoef = tnsInfo->coef + i*TNS_MAX_ORDER_SHORT;

+			for(k=0; k<tnsInfo->order[i]; k++) {
+                 
+              if ((ptcoef[k] > 1) || (ptcoef[k] < -2)) {
+                coefBits = 3;                                    
+                break;
+              }
+            }
+          }
+          for (k=0; k<tnsInfo->order[i]; k++ ) {
+            count += coefBits;
+          }
+        }
+      }
+    }
+  }

+  
+  return count;
+}
+
+/**********************************************************************************
+*
+* function name: countTnsBits
+* description:   count tns bit demand  
+*
+**********************************************************************************/
+static Word16 countTnsBits(TNS_INFO *tnsInfo,Word16 blockType)
+{
+  return(tnsCount(tnsInfo, blockType));
+}
+
+/*********************************************************************************
+*
+* function name: countStaticBitdemand
+* description:   count static bit demand include tns  
+*
+**********************************************************************************/
+Word16 countStaticBitdemand(PSY_OUT_CHANNEL psyOutChannel[MAX_CHANNELS],
+                            PSY_OUT_ELEMENT *psyOutElement,
+                            Word16 channels, 

+							Word16 adtsUsed)
+{
+  Word32 statBits;
+  Word32 ch;
+  
+  statBits = 0;                                                  

+

+  /* if adts used, add 56 bits */
+  if(adtsUsed) statBits += 56;
+
+   
+  switch (channels) {
+    case 1:
+      statBits += SI_ID_BITS+SI_SCE_BITS+SI_ICS_BITS;
+      statBits += countTnsBits(&(psyOutChannel[0].tnsInfo),
+                               psyOutChannel[0].windowSequence);
+       
+      switch(psyOutChannel[0].windowSequence){
+        case LONG_WINDOW:
+        case START_WINDOW:
+        case STOP_WINDOW:
+          statBits += SI_ICS_INFO_BITS_LONG;
+          break;
+        case SHORT_WINDOW:
+          statBits += SI_ICS_INFO_BITS_SHORT;
+          break;
+      }
+      break;
+    case 2:
+      statBits += SI_ID_BITS+SI_CPE_BITS+2*SI_ICS_BITS;
+
+      statBits += SI_CPE_MS_MASK_BITS;
+      statBits += countMsMaskBits(psyOutChannel[0].sfbCnt,
+								  psyOutChannel[0].sfbPerGroup,
+								  psyOutChannel[0].maxSfbPerGroup,
+								  &psyOutElement->toolsInfo);
+       
+      switch (psyOutChannel[0].windowSequence) {
+        case LONG_WINDOW:
+        case START_WINDOW:
+        case STOP_WINDOW:
+          statBits += SI_ICS_INFO_BITS_LONG;
+          break;
+        case SHORT_WINDOW:
+          statBits += SI_ICS_INFO_BITS_SHORT;
+          break;
+      }
+      for(ch=0; ch<2; ch++)
+        statBits += countTnsBits(&(psyOutChannel[ch].tnsInfo),
+                                 psyOutChannel[ch].windowSequence);
+      break;
+  }
+
+  return statBits;
+}
+
diff --git a/media/libstagefright/codecs/aacenc/src/tns.c b/media/libstagefright/codecs/aacenc/src/tns.c
new file mode 100644
index 0000000..96d890e
--- /dev/null
+++ b/media/libstagefright/codecs/aacenc/src/tns.c
@@ -0,0 +1,932 @@
+/*

+ ** Copyright 2003-2010, VisualOn, Inc.

+ **

+ ** Licensed under the Apache License, Version 2.0 (the "License");

+ ** you may not use this file except in compliance with the License.

+ ** You may obtain a copy of the License at

+ **

+ **     http://www.apache.org/licenses/LICENSE-2.0

+ **

+ ** Unless required by applicable law or agreed to in writing, software

+ ** distributed under the License is distributed on an "AS IS" BASIS,

+ ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

+ ** See the License for the specific language governing permissions and

+ ** limitations under the License.

+ */

+/*******************************************************************************

+	File:		tns.c

+

+	Content:	Definition TNS tools functions

+

+*******************************************************************************/
+
+#include "basic_op.h"

+#include "oper_32b.h"

+#include "assert.h"
+#include "aac_rom.h"
+#include "psy_const.h"
+#include "tns.h"
+#include "tns_param.h"
+#include "psy_configuration.h"
+#include "tns_func.h"
+
+#define TNS_MODIFY_BEGIN         2600  /* Hz */
+#define RATIO_PATCH_LOWER_BORDER 380   /* Hz */
+#define TNS_GAIN_THRESH			 141   /* 1.41*100 */

+#define NORM_COEF				 0x028f5c28

+
+static const Word32 TNS_PARCOR_THRESH = 0x0ccccccd; /* 0.1*(1 << 31) */

+/* Limit bands to > 2.0 kHz */

+static unsigned short tnsMinBandNumberLong[12] =

+{ 11, 12, 15, 16, 17, 20, 25, 26, 24, 28, 30, 31 };

+static unsigned short tnsMinBandNumberShort[12] =

+{ 2, 2, 2, 3, 3, 4, 6, 6, 8, 10, 10, 12 };

+

+/**************************************/

+/* Main/Low Profile TNS Parameters    */

+/**************************************/

+static unsigned short tnsMaxBandsLongMainLow[12] =

+{ 31, 31, 34, 40, 42, 51, 46, 46, 42, 42, 42, 39 };

+

+static unsigned short tnsMaxBandsShortMainLow[12] =

+{ 9, 9, 10, 14, 14, 14, 14, 14, 14, 14, 14, 14 };
+
+
+static void CalcWeightedSpectrum(const Word32 spectrum[],
+                                 Word16 weightedSpectrum[],
+                                 Word32* sfbEnergy,
+                                 const Word16* sfbOffset, Word16 lpcStartLine,
+                                 Word16 lpcStopLine, Word16 lpcStartBand,Word16 lpcStopBand,
+                                 Word32 *pWork32);
+
+
+
+void AutoCorrelation(const Word16 input[], Word32 corr[],
+                            Word16 samples, Word16 corrCoeff);
+static Word16 AutoToParcor(Word32 workBuffer[], Word32 reflCoeff[], Word16 numOfCoeff);
+
+static Word16 CalcTnsFilter(const Word16* signal, const Word32 window[], Word16 numOfLines,
+                                              Word16 tnsOrder, Word32 parcor[]);
+
+
+static void Parcor2Index(const Word32 parcor[], Word16 index[], Word16 order,
+                         Word16 bitsPerCoeff);
+
+static void Index2Parcor(const Word16 index[], Word32 parcor[], Word16 order,
+                         Word16 bitsPerCoeff);
+
+
+
+static void AnalysisFilterLattice(const Word32 signal[], Word16 numOfLines,
+                                  const Word32 parCoeff[], Word16 order,
+                                  Word32 output[]);
+
+
+/**
+*
+* function name: FreqToBandWithRounding
+* description:  Retrieve index of nearest band border
+* returnt:		index
+*
+*/
+static Word16 FreqToBandWithRounding(Word32 freq,                   /*!< frequency in Hertz */
+                                     Word32 fs,                     /*!< Sampling frequency in Hertz */
+                                     Word16 numOfBands,             /*!< total number of bands */
+                                     const Word16 *bandStartOffset) /*!< table of band borders */
+{
+  Word32 lineNumber, band;
+  Word32 temp, shift;
+
+  /*  assert(freq >= 0);  */
+  shift = norm_l(fs);
+  lineNumber = (extract_l(fixmul((bandStartOffset[numOfBands] << 2),Div_32(freq << shift,fs << shift))) + 1) >> 1;
+ 
+  /* freq > fs/2 */
+  temp = lineNumber - bandStartOffset[numOfBands] ;                                            
+  if (temp >= 0)
+    return numOfBands;
+
+  /* find band the line number lies in */
+  for (band=0; band<numOfBands; band++) {
+    temp = bandStartOffset[band + 1] - lineNumber;                                           
+    if (temp > 0) break;
+  }
+
+  temp = (lineNumber - bandStartOffset[band]);
+  temp = (temp - (bandStartOffset[band + 1] - lineNumber));                                   
+  if ( temp > 0 )
+  {
+    band = band + 1;
+  }
+
+  return extract_l(band);
+}
+
+
+/**
+*
+* function name: InitTnsConfigurationLong
+* description:  Fill TNS_CONFIG structure with sensible content for long blocks
+* returns:		0 if success
+*
+*/
+Word16 InitTnsConfigurationLong(Word32 bitRate,          /*!< bitrate */
+                                Word32 sampleRate,          /*!< Sampling frequency */
+                                Word16 channels,            /*!< number of channels */
+                                TNS_CONFIG *tC,             /*!< TNS Config struct (modified) */
+                                PSY_CONFIGURATION_LONG *pC, /*!< psy config struct */
+                                Word16 active)              /*!< tns active flag */
+{
+
+  Word32 bitratePerChannel;
+  tC->maxOrder     = TNS_MAX_ORDER;                                           
+  tC->tnsStartFreq = 1275;
+  tC->coefRes      = 4;                                                                                 
+  
+  /* to avoid integer division */
+  if ( sub(channels,2) == 0 ) { 
+    bitratePerChannel = bitRate >> 1;    
+  }
+  else {
+    bitratePerChannel = bitRate;                                                                    
+  }
+
+  tC->tnsMaxSfb = tnsMaxBandsLongMainLow[pC->sampRateIdx];
+
+  tC->tnsActive = active;                                                                           
+
+  /* now calc band and line borders */
+  tC->tnsStopBand = min(pC->sfbCnt, tC->tnsMaxSfb);
+  tC->tnsStopLine = pC->sfbOffset[tC->tnsStopBand];                                                 
+
+  tC->tnsStartBand = FreqToBandWithRounding(tC->tnsStartFreq, sampleRate,
+                                            pC->sfbCnt, (const Word16*)pC->sfbOffset);
+
+  tC->tnsModifyBeginCb = FreqToBandWithRounding(TNS_MODIFY_BEGIN,
+                                                sampleRate,
+                                                pC->sfbCnt,
+                                                (const Word16*)pC->sfbOffset);
+
+  tC->tnsRatioPatchLowestCb = FreqToBandWithRounding(RATIO_PATCH_LOWER_BORDER,
+                                                     sampleRate,
+                                                     pC->sfbCnt,
+                                                     (const Word16*)pC->sfbOffset);
+
+
+  tC->tnsStartLine = pC->sfbOffset[tC->tnsStartBand];                                                                                                             
+
+  tC->lpcStopBand = tnsMaxBandsLongMainLow[pC->sampRateIdx];
+  tC->lpcStopBand = min(tC->lpcStopBand, pC->sfbActive);
+
+  tC->lpcStopLine = pC->sfbOffset[tC->lpcStopBand];   

+  

+  tC->lpcStartBand = tnsMinBandNumberLong[pC->sampRateIdx];
+
+  tC->lpcStartLine = pC->sfbOffset[tC->lpcStartBand];                                               
+
+  tC->threshold = TNS_GAIN_THRESH;                                                             
+
+
+  return(0);
+}
+
+/**
+*
+* function name: InitTnsConfigurationShort
+* description:  Fill TNS_CONFIG structure with sensible content for short blocks
+* returns:		0 if success
+*
+*/
+Word16 InitTnsConfigurationShort(Word32 bitRate,              /*!< bitrate */
+                                 Word32 sampleRate,           /*!< Sampling frequency */
+                                 Word16 channels,             /*!< number of channels */
+                                 TNS_CONFIG *tC,              /*!< TNS Config struct (modified) */
+                                 PSY_CONFIGURATION_SHORT *pC, /*!< psy config struct */
+                                 Word16 active)               /*!< tns active flag */
+{
+  Word32 bitratePerChannel;
+  tC->maxOrder     = TNS_MAX_ORDER_SHORT;
+  tC->tnsStartFreq = 2750;
+  tC->coefRes      = 3;                                                                                 
+  
+  /* to avoid integer division */
+  if ( sub(channels,2) == 0 ) {
+    bitratePerChannel = L_shr(bitRate,1);    
+  }
+  else {
+    bitratePerChannel = bitRate;                                                                    
+  }
+
+  tC->tnsMaxSfb = tnsMaxBandsShortMainLow[pC->sampRateIdx];
+
+  tC->tnsActive = active;                                                                           
+
+  /* now calc band and line borders */
+  tC->tnsStopBand = min(pC->sfbCnt, tC->tnsMaxSfb);
+  tC->tnsStopLine = pC->sfbOffset[tC->tnsStopBand];                                                 
+
+  tC->tnsStartBand=FreqToBandWithRounding(tC->tnsStartFreq, sampleRate,
+                                          pC->sfbCnt, (const Word16*)pC->sfbOffset);
+
+  tC->tnsModifyBeginCb = FreqToBandWithRounding(TNS_MODIFY_BEGIN,
+                                                sampleRate,
+                                                pC->sfbCnt,
+                                                (const Word16*)pC->sfbOffset);
+
+  tC->tnsRatioPatchLowestCb = FreqToBandWithRounding(RATIO_PATCH_LOWER_BORDER,
+                                                     sampleRate,
+                                                     pC->sfbCnt,
+                                                     (const Word16*)pC->sfbOffset);
+
+
+  tC->tnsStartLine = pC->sfbOffset[tC->tnsStartBand];                                               
+
+  tC->lpcStopBand = tnsMaxBandsShortMainLow[pC->sampRateIdx];

+
+  tC->lpcStopBand = min(tC->lpcStopBand, pC->sfbActive);
+
+  tC->lpcStopLine = pC->sfbOffset[tC->lpcStopBand];                                                 
+
+  tC->lpcStartBand = tnsMinBandNumberShort[pC->sampRateIdx];

+
+  tC->lpcStartLine = pC->sfbOffset[tC->lpcStartBand];                                               
+
+  tC->threshold = TNS_GAIN_THRESH;                                                             
+
+  return(0);
+}
+
+/**
+*
+* function name: TnsDetect
+* description:  Calculate TNS filter and decide on TNS usage 
+* returns:		0 if success
+*
+*/
+Word32 TnsDetect(TNS_DATA* tnsData,        /*!< tns data structure (modified) */
+                 TNS_CONFIG tC,            /*!< tns config structure */
+                 Word32* pScratchTns,      /*!< pointer to scratch space */
+                 const Word16 sfbOffset[], /*!< scalefactor size and table */
+                 Word32* spectrum,         /*!< spectral data */
+                 Word16 subBlockNumber,    /*!< subblock num */
+                 Word16 blockType,         /*!< blocktype (long or short) */
+                 Word32 * sfbEnergy)       /*!< sfb-wise energy */
+{
+
+  Word32  predictionGain;
+  Word32  temp;
+  Word32* pWork32 = &pScratchTns[subBlockNumber >> 8];
+  Word16* pWeightedSpectrum = (Word16 *)&pScratchTns[subBlockNumber >> 8];
+
+                                                                                                    
+  if (tC.tnsActive) {
+    CalcWeightedSpectrum(spectrum,
+                         pWeightedSpectrum,
+                         sfbEnergy,
+                         sfbOffset,
+                         tC.lpcStartLine,
+                         tC.lpcStopLine,
+                         tC.lpcStartBand,
+                         tC.lpcStopBand,
+                         pWork32);
+
+    temp = blockType - SHORT_WINDOW;                                                          
+    if ( temp != 0 ) {
+        predictionGain = CalcTnsFilter( &pWeightedSpectrum[tC.lpcStartLine],
+                                        tC.acfWindow,
+                                        tC.lpcStopLine - tC.lpcStartLine,
+                                        tC.maxOrder,
+                                        tnsData->dataRaw.tnsLong.subBlockInfo.parcor);
+
+
+        temp = predictionGain - tC.threshold;                                                  
+        if ( temp > 0 ) {
+          tnsData->dataRaw.tnsLong.subBlockInfo.tnsActive = 1;                                      
+        }
+        else {
+          tnsData->dataRaw.tnsLong.subBlockInfo.tnsActive = 0;                                      
+        }
+
+        tnsData->dataRaw.tnsLong.subBlockInfo.predictionGain = predictionGain;                      
+    }
+    else{
+
+        predictionGain = CalcTnsFilter( &pWeightedSpectrum[tC.lpcStartLine],
+                                        tC.acfWindow,
+                                        tC.lpcStopLine - tC.lpcStartLine,
+                                        tC.maxOrder,
+                                        tnsData->dataRaw.tnsShort.subBlockInfo[subBlockNumber].parcor);
+
+        temp = predictionGain - tC.threshold;                                                 
+        if ( temp > 0 ) {
+          tnsData->dataRaw.tnsShort.subBlockInfo[subBlockNumber].tnsActive = 1;                     
+        }
+        else {
+          tnsData->dataRaw.tnsShort.subBlockInfo[subBlockNumber].tnsActive = 0;                     
+        }
+
+        tnsData->dataRaw.tnsShort.subBlockInfo[subBlockNumber].predictionGain = predictionGain;     
+    }
+
+  }
+  else{
+
+    temp = blockType - SHORT_WINDOW;                                                          
+    if ( temp != 0 ) {
+        tnsData->dataRaw.tnsLong.subBlockInfo.tnsActive = 0;                                        
+        tnsData->dataRaw.tnsLong.subBlockInfo.predictionGain = 0;                                   
+    }
+    else {
+        tnsData->dataRaw.tnsShort.subBlockInfo[subBlockNumber].tnsActive = 0;                       
+        tnsData->dataRaw.tnsShort.subBlockInfo[subBlockNumber].predictionGain = 0;                  
+    }
+  }
+
+  return(0);
+}
+
+
+/*****************************************************************************
+*
+* function name: TnsSync
+* description: update tns parameter
+*
+*****************************************************************************/
+void TnsSync(TNS_DATA *tnsDataDest,
+             const TNS_DATA *tnsDataSrc,
+             const TNS_CONFIG tC,
+             const Word16 subBlockNumber,
+             const Word16 blockType)
+{
+   TNS_SUBBLOCK_INFO *sbInfoDest;
+   const TNS_SUBBLOCK_INFO *sbInfoSrc;
+   Word32 i, temp;
+
+   temp =  blockType - SHORT_WINDOW;                                                           
+   if ( temp != 0 ) {
+      sbInfoDest = &tnsDataDest->dataRaw.tnsLong.subBlockInfo;                                      
+      sbInfoSrc  = &tnsDataSrc->dataRaw.tnsLong.subBlockInfo;                                       
+   }
+   else {
+      sbInfoDest = &tnsDataDest->dataRaw.tnsShort.subBlockInfo[subBlockNumber];                     
+      sbInfoSrc  = &tnsDataSrc->dataRaw.tnsShort.subBlockInfo[subBlockNumber];                      
+   }
+
+   if (100*abs_s(sbInfoDest->predictionGain - sbInfoSrc->predictionGain) <
+       (3 * sbInfoDest->predictionGain)) {
+      sbInfoDest->tnsActive = sbInfoSrc->tnsActive;                                                 
+      for ( i=0; i< tC.maxOrder; i++) {
+        sbInfoDest->parcor[i] = sbInfoSrc->parcor[i];                                               
+      }
+   }
+}
+
+/*****************************************************************************
+*
+* function name: TnsEncode
+* description: do TNS filtering
+* returns:     0 if success
+*
+*****************************************************************************/
+Word16 TnsEncode(TNS_INFO* tnsInfo,     /*!< tns info structure (modified) */
+                 TNS_DATA* tnsData,     /*!< tns data structure (modified) */
+                 Word16 numOfSfb,       /*!< number of scale factor bands */
+                 TNS_CONFIG tC,         /*!< tns config structure */
+                 Word16 lowPassLine,    /*!< lowpass line */
+                 Word32* spectrum,      /*!< spectral data (modified) */
+                 Word16 subBlockNumber, /*!< subblock num */
+                 Word16 blockType)      /*!< blocktype (long or short) */
+{
+  Word32 i;
+  Word32 temp_s;
+  Word32 temp;

+  TNS_SUBBLOCK_INFO *psubBlockInfo;
+
+  temp_s = blockType - SHORT_WINDOW;                                                             
+  if ( temp_s != 0) {                                                                               
+    psubBlockInfo = &tnsData->dataRaw.tnsLong.subBlockInfo;

+	if (psubBlockInfo->tnsActive == 0) {
+      tnsInfo->tnsActive[subBlockNumber] = 0;                                                       
+      return(0);
+    }
+    else {
+
+      Parcor2Index(psubBlockInfo->parcor,
+                   tnsInfo->coef,
+                   tC.maxOrder,
+                   tC.coefRes);
+
+      Index2Parcor(tnsInfo->coef,
+                   psubBlockInfo->parcor,
+                   tC.maxOrder,
+                   tC.coefRes);
+
+      for (i=tC.maxOrder - 1; i>=0; i--)  {
+        temp = psubBlockInfo->parcor[i] - TNS_PARCOR_THRESH;         
+        if ( temp > 0 )
+          break;
+        temp = psubBlockInfo->parcor[i] + TNS_PARCOR_THRESH;         
+        if ( temp < 0 )
+          break;
+      }
+      tnsInfo->order[subBlockNumber] = i + 1;                                                    
+
+
+      tnsInfo->tnsActive[subBlockNumber] = 1;                                                       
+      for (i=subBlockNumber+1; i<TRANS_FAC; i++) {
+        tnsInfo->tnsActive[i] = 0;                                                                  
+      }
+      tnsInfo->coefRes[subBlockNumber] = tC.coefRes;                                                
+      tnsInfo->length[subBlockNumber] = numOfSfb - tC.tnsStartBand;                                 
+
+
+      AnalysisFilterLattice(&(spectrum[tC.tnsStartLine]),
+                            (min(tC.tnsStopLine,lowPassLine) - tC.tnsStartLine),
+                            psubBlockInfo->parcor,
+                            tnsInfo->order[subBlockNumber],
+                            &(spectrum[tC.tnsStartLine]));
+
+    }
+  }     /* if (blockType!=SHORT_WINDOW) */
+  else /*short block*/ {                                                                            
+    psubBlockInfo = &tnsData->dataRaw.tnsShort.subBlockInfo[subBlockNumber];

+	if (psubBlockInfo->tnsActive == 0) {
+      tnsInfo->tnsActive[subBlockNumber] = 0;                                                       
+      return(0);
+    }
+    else {
+
+      Parcor2Index(psubBlockInfo->parcor,
+                   &tnsInfo->coef[subBlockNumber*TNS_MAX_ORDER_SHORT],
+                   tC.maxOrder,
+                   tC.coefRes);
+
+      Index2Parcor(&tnsInfo->coef[subBlockNumber*TNS_MAX_ORDER_SHORT],
+                   psubBlockInfo->parcor,
+                   tC.maxOrder,
+                   tC.coefRes);
+      for (i=(tC.maxOrder - 1); i>=0; i--)  {
+        temp = psubBlockInfo->parcor[i] - TNS_PARCOR_THRESH;    
+         if ( temp > 0 )
+          break;
+
+        temp = psubBlockInfo->parcor[i] + TNS_PARCOR_THRESH;    
+        if ( temp < 0 )
+          break;
+      }
+      tnsInfo->order[subBlockNumber] = i + 1;                                                    
+
+      tnsInfo->tnsActive[subBlockNumber] = 1;                                                       
+      tnsInfo->coefRes[subBlockNumber] = tC.coefRes;                                                
+      tnsInfo->length[subBlockNumber] = numOfSfb - tC.tnsStartBand;                             
+
+
+      AnalysisFilterLattice(&(spectrum[tC.tnsStartLine]), (tC.tnsStopLine - tC.tnsStartLine),
+                 psubBlockInfo->parcor,
+                 tnsInfo->order[subBlockNumber],
+                 &(spectrum[tC.tnsStartLine]));
+
+    }
+  }
+
+  return(0);
+}
+
+
+/*****************************************************************************
+*
+* function name: m_pow2_cordic
+* description: Iterative power function
+*
+*	Calculates pow(2.0,x-1.0*(scale+1)) with INT_BITS bit precision
+*	using modified cordic algorithm
+* returns:     the result of pow2
+*
+*****************************************************************************/
+static Word32 m_pow2_cordic(Word32 x, Word16 scale)
+{
+  Word32 k;
+
+  Word32 accu_y = 0x40000000;                                                                     
+  accu_y = L_shr(accu_y,scale);
+
+  for(k=1; k<INT_BITS; k++) {
+    const Word32 z = m_log2_table[k];                                                             
+
+    while(L_sub(x,z) >= 0) {
+       
+      x = L_sub(x, z);
+      accu_y = L_add(accu_y, (accu_y >> k));
+    }
+  }
+  return(accu_y);
+}
+
+
+/*****************************************************************************
+*
+* function name: CalcWeightedSpectrum
+* description: Calculate weighted spectrum for LPC calculation
+*
+*****************************************************************************/
+static void CalcWeightedSpectrum(const Word32  spectrum[],         /*!< input spectrum */
+                                 Word16        weightedSpectrum[],
+                                 Word32       *sfbEnergy,          /*!< sfb energies */
+                                 const Word16 *sfbOffset,
+                                 Word16        lpcStartLine,
+                                 Word16        lpcStopLine,
+                                 Word16        lpcStartBand,
+                                 Word16        lpcStopBand,
+                                 Word32       *pWork32)
+{
+    #define INT_BITS_SCAL 1<<(INT_BITS/2)
+
+    Word32 i, sfb, shift;
+    Word32 maxShift;
+    Word32 tmp_s, tmp2_s;
+    Word32 tmp, tmp2;
+    Word32 maxWS;
+    Word32 tnsSfbMean[MAX_SFB];    /* length [lpcStopBand-lpcStartBand] should be sufficient here */
+
+    maxWS = 0;                                                                                   
+  
+    /* calc 1.0*2^-INT_BITS/2/sqrt(en) */
+    for( sfb = lpcStartBand; sfb < lpcStopBand; sfb++) {
+
+      tmp2 = sfbEnergy[sfb] - 2;                                                            
+      if( tmp2 > 0) {
+        tmp = rsqrt(sfbEnergy[sfb], INT_BITS);
+		if(tmp > INT_BITS_SCAL) 

+		{

+			shift =  norm_l(tmp);

+			tmp = Div_32( INT_BITS_SCAL << shift, tmp << shift ); 
+		}
+		else
+		{
+			tmp = 0x7fffffff; 
+		}
+      }
+      else {
+        tmp = 0x7fffffff;                                                                           
+      } 
+      tnsSfbMean[sfb] = tmp;                                                                        
+    }
+
+    /* spread normalized values from sfbs to lines */
+    sfb = lpcStartBand;                                                                             
+    tmp = tnsSfbMean[sfb];                                                                          
+    for ( i=lpcStartLine; i<lpcStopLine; i++){
+      tmp_s = sfbOffset[sfb + 1] - i;                                                      
+      if ( tmp_s == 0 ) {
+        sfb = sfb + 1;
+        tmp2_s = sfb + 1 - lpcStopBand;                                                       
+        if (tmp2_s <= 0) {
+          tmp = tnsSfbMean[sfb];                                                                    
+        }
+      }
+      pWork32[i] = tmp;                                                                    
+    }
+    /*filter down*/
+    for (i=(lpcStopLine - 2); i>=lpcStartLine; i--){
+        pWork32[i] = (pWork32[i] + pWork32[i + 1]) >> 1;
+    }
+    /* filter up */
+    for (i=(lpcStartLine + 1); i<lpcStopLine; i++){
+       pWork32[i] = (pWork32[i] + pWork32[i - 1]) >> 1;
+    }
+
+    /* weight and normalize */
+    for (i=lpcStartLine; i<lpcStopLine; i++){
+      pWork32[i] = MULHIGH(pWork32[i], spectrum[i]);                               
+      maxWS |= L_abs(pWork32[i]);                                                          
+    }
+    maxShift = norm_l(maxWS);
+

+	maxShift = 16 - maxShift;

+    if(maxShift >= 0)

+	{

+		for (i=lpcStartLine; i<lpcStopLine; i++){

+			weightedSpectrum[i] = pWork32[i] >> maxShift;

+		}

+    }

+	else

+	{

+		maxShift = -maxShift;

+		for (i=lpcStartLine; i<lpcStopLine; i++){

+			weightedSpectrum[i] = saturate(pWork32[i] << maxShift);

+		}

+	}
+}
+
+
+
+
+/*****************************************************************************
+*
+* function name: CalcTnsFilter
+* description:  LPC calculation for one TNS filter
+* returns:      prediction gain
+* input:        signal spectrum, acf window, no. of spectral lines,
+*                max. TNS order, ptr. to reflection ocefficients
+* output:       reflection coefficients
+*(half) window size must be larger than tnsOrder !!*
+******************************************************************************/
+
+static Word16 CalcTnsFilter(const Word16 *signal,
+                            const Word32 window[],
+                            Word16 numOfLines,
+                            Word16 tnsOrder,
+                            Word32 parcor[])
+{
+  Word32 parcorWorkBuffer[2*TNS_MAX_ORDER+1];
+  Word32 predictionGain;
+  Word32 i;
+  Word32 tnsOrderPlus1 = tnsOrder + 1;
+
+  assert(tnsOrder <= TNS_MAX_ORDER);      /* remove asserts later? (btg) */
+
+  for(i=0;i<tnsOrder;i++) {
+    parcor[i] = 0;                               
+  }
+
+  AutoCorrelation(signal, parcorWorkBuffer, numOfLines, tnsOrderPlus1);
+
+  /* early return if signal is very low: signal prediction off, with zero parcor coeffs */
+  if (parcorWorkBuffer[0] == 0)
+    return 0;
+
+  predictionGain = AutoToParcor(parcorWorkBuffer, parcor, tnsOrder);
+
+  return(predictionGain);
+}
+
+/*****************************************************************************
+*
+* function name: AutoCorrelation
+* description:  calc. autocorrelation (acf)
+* returns:      -
+* input:        input values, no. of input values, no. of acf values
+* output:       acf values
+*
+*****************************************************************************/
+#ifndef ARMV5E

+void AutoCorrelation(const Word16		 input[],
+                            Word32       corr[],
+                            Word16       samples,
+                            Word16       corrCoeff) {
+  Word32 i, j, isamples;
+  Word32 accu;
+  Word32 scf;
+
+  scf = 10 - 1;                                                                                      
+

+  isamples = samples;
+  /* calc first corrCoef:  R[0] = sum { t[i] * t[i] } ; i = 0..N-1 */
+  accu = 0;                                                                                      
+  for(j=0; j<isamples; j++) {
+    accu = L_add(accu, ((input[j] * input[j]) >> scf));

+  }
+  corr[0] = accu;                                                                                
+
+  /* early termination if all corr coeffs are likely going to be zero */
+  if(corr[0] == 0) return ;
+
+  /* calc all other corrCoef:  R[j] = sum { t[i] * t[i+j] } ; i = 0..(N-j-1), j=1..p */
+  for(i=1; i<corrCoeff; i++) {
+    isamples = isamples - 1;
+    accu = 0;                                                                                    
+    for(j=0; j<isamples; j++) {
+      accu = L_add(accu, ((input[j] * input[j+i]) >> scf));

+    }
+    corr[i] = accu;                                                                              
+  }
+}    
+#endif
+
+/*****************************************************************************
+*
+* function name: AutoToParcor
+* description:  conversion autocorrelation to reflection coefficients
+* returns:      prediction gain
+* input:        <order+1> input values, no. of output values (=order),
+*               ptr. to workbuffer (required size: 2*order)
+* output:       <order> reflection coefficients
+*
+*****************************************************************************/
+static Word16 AutoToParcor(Word32 workBuffer[], Word32 reflCoeff[], Word16 numOfCoeff) {
+
+  Word32 i, j, shift;
+  Word32 *pWorkBuffer; /* temp pointer */
+  Word32 predictionGain = 0;
+  Word32 num, denom;
+  Word32 temp, workBuffer0;
+   
+
+  num = workBuffer[0];                                                                           
+  temp = workBuffer[numOfCoeff];                                                                 
+
+  for(i=0; i<numOfCoeff-1; i++) {
+    workBuffer[i + numOfCoeff] = workBuffer[i + 1];                                        
+  }
+  workBuffer[i + numOfCoeff] = temp;                                                                           
+  
+  for(i=0; i<numOfCoeff; i++) {
+    Word32 refc;
+
+     
+    if (workBuffer[0] < L_abs(workBuffer[i + numOfCoeff])) {
+      return 0 ;
+    }
+	shift = norm_l(workBuffer[0]);

+	workBuffer0 = Div_32(1 << shift, workBuffer[0] << shift);
+    /* calculate refc = -workBuffer[numOfCoeff+i] / workBuffer[0]; -1 <= refc < 1 */
+	refc = L_negate(fixmul(workBuffer[numOfCoeff + i], workBuffer0));
+
+    reflCoeff[i] = refc;                                                                           
+
+    pWorkBuffer = &(workBuffer[numOfCoeff]);                                                        
+
+    for(j=i; j<numOfCoeff; j++) {
+      Word32 accu1, accu2;
+      accu1 = L_add(pWorkBuffer[j], fixmul(refc, workBuffer[j - i]));
+      accu2 = L_add(workBuffer[j - i], fixmul(refc, pWorkBuffer[j]));
+      pWorkBuffer[j] = accu1;                                                                       
+      workBuffer[j - i] = accu2;                                                                 
+    }
+  }
+
+  denom = MULHIGH(workBuffer[0], NORM_COEF);
+   
+  if (denom != 0) {
+    Word32 temp;

+	shift = norm_l(denom);

+	temp = Div_32(1 << shift, denom << shift);
+    predictionGain = fixmul(num, temp);
+  }
+
+  return extract_l(predictionGain);
+}
+
+
+
+static Word16 Search3(Word32 parcor)
+{
+  Word32 index = 0;
+  Word32 i;
+  Word32 temp;
+   
+  for (i=0;i<8;i++) {
+    temp = L_sub( parcor, tnsCoeff3Borders[i]);                                                     
+    if (temp > 0)
+      index=i;                                                                                      
+  }
+  return extract_l(index - 4);
+}
+
+static Word16 Search4(Word32 parcor)
+{
+  Word32 index = 0;
+  Word32 i;
+  Word32 temp;
+   
+
+  for (i=0;i<16;i++) {
+    temp = L_sub(parcor, tnsCoeff4Borders[i]);                                                      
+    if (temp > 0)
+      index=i;                                                                                      
+  }
+  return extract_l(index - 8);
+}
+
+
+
+/*****************************************************************************
+*
+* functionname: Parcor2Index
+* description:  quantization index for reflection coefficients
+*
+*****************************************************************************/
+static void Parcor2Index(const Word32 parcor[],   /*!< parcor coefficients */
+                         Word16 index[],          /*!< quantized coeff indices */
+                         Word16 order,            /*!< filter order */
+                         Word16 bitsPerCoeff) {   /*!< quantizer resolution */
+  Word32 i;
+  Word32 temp;
+
+  for(i=0; i<order; i++) {
+    temp = bitsPerCoeff - 3;                                                                    
+    if (temp == 0) {
+      index[i] = Search3(parcor[i]);                                                                
+    } 
+    else {
+      index[i] = Search4(parcor[i]);                                                                
+    }
+  }
+}
+
+/*****************************************************************************
+*
+* functionname: Index2Parcor
+* description:  Inverse quantization for reflection coefficients
+*
+*****************************************************************************/
+static void Index2Parcor(const Word16 index[],  /*!< quantized values */
+                         Word32 parcor[],       /*!< ptr. to reflection coefficients (output) */
+                         Word16 order,          /*!< no. of coefficients */
+                         Word16 bitsPerCoeff)   /*!< quantizer resolution */
+{
+  Word32 i;
+  Word32 temp;
+
+  for (i=0; i<order; i++) {
+    temp = bitsPerCoeff - 4;                                                                     
+    if ( temp == 0 ) {
+        parcor[i] = tnsCoeff4[index[i] + 8];                                                     
+    }
+    else {
+        parcor[i] = tnsCoeff3[index[i] + 4];                                                  
+    }
+  }
+}
+
+/*****************************************************************************
+*
+* functionname: FIRLattice
+* description:  in place lattice filtering of spectral data
+* returns:		pointer to modified data
+*
+*****************************************************************************/
+static Word32 FIRLattice(Word16 order,           /*!< filter order */
+                         Word32 x,               /*!< spectral data */
+                         Word32 *state_par,      /*!< filter states */
+                         const Word32 *coef_par) /*!< filter coefficients */
+{
+   Word32 i;
+   Word32 accu,tmp,tmpSave;
+
+   x = x >> 1;
+   tmpSave = x;                                                                                     
+
+   for (i=0; i<(order - 1); i++) {
+
+     tmp = L_add(fixmul(coef_par[i], x), state_par[i]);
+     x   = L_add(fixmul(coef_par[i], state_par[i]), x);
+
+     state_par[i] = tmpSave;                                                                        
+     tmpSave = tmp;                                                                                 
+  }
+
+  /* last stage: only need half operations */
+  accu = fixmul(state_par[order - 1], coef_par[(order - 1)]);
+  state_par[(order - 1)] = tmpSave;                                                                
+
+  x = L_add(accu, x);
+  x = L_add(x, x);
+
+  return x;
+}
+
+/*****************************************************************************
+*
+* functionname: AnalysisFilterLattice
+* description:  filters spectral lines with TNS filter
+*
+*****************************************************************************/
+static void AnalysisFilterLattice(const  Word32 signal[],  /*!< input spectrum */
+                                  Word16 numOfLines,       /*!< no. of lines */
+                                  const  Word32 parCoeff[],/*!< PARC coefficients */
+                                  Word16 order,            /*!< filter order */
+                                  Word32 output[])         /*!< filtered signal values */
+{
+
+  Word32 state_par[TNS_MAX_ORDER];
+  Word32 j;
+
+  for ( j=0; j<TNS_MAX_ORDER; j++ ) {
+    state_par[j] = 0;                                                                               
+  }
+
+  for(j=0; j<numOfLines; j++) {
+    output[j] = FIRLattice(order,signal[j],state_par,parCoeff);                                     
+  }
+}
+
+/*****************************************************************************
+*
+* functionname: ApplyTnsMultTableToRatios
+* description:  Change thresholds according to tns
+*
+*****************************************************************************/
+void ApplyTnsMultTableToRatios(Word16 startCb,
+                               Word16 stopCb,
+                               TNS_SUBBLOCK_INFO subInfo, /*!< TNS subblock info */
+                               Word32 *thresholds)        /*!< thresholds (modified) */
+{
+  Word32 i;                                                                                         
+  if (subInfo.tnsActive) {
+    for(i=startCb; i<stopCb; i++) {
+      /* thresholds[i] * 0.25 */
+      thresholds[i] = (thresholds[i] >> 2);                                                      
+    }
+  }
+}
diff --git a/media/libstagefright/codecs/aacenc/src/transform.c b/media/libstagefright/codecs/aacenc/src/transform.c
new file mode 100644
index 0000000..af17b5a
--- /dev/null
+++ b/media/libstagefright/codecs/aacenc/src/transform.c
@@ -0,0 +1,672 @@
+/*

+ ** Copyright 2003-2010, VisualOn, Inc.

+ **

+ ** Licensed under the Apache License, Version 2.0 (the "License");

+ ** you may not use this file except in compliance with the License.

+ ** You may obtain a copy of the License at

+ **

+ **     http://www.apache.org/licenses/LICENSE-2.0

+ **

+ ** Unless required by applicable law or agreed to in writing, software

+ ** distributed under the License is distributed on an "AS IS" BASIS,

+ ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

+ ** See the License for the specific language governing permissions and

+ ** limitations under the License.

+ */

+/*******************************************************************************

+	File:		transform.c

+

+	Content:	MDCT Transform functionss

+

+*******************************************************************************/
+
+#include "basic_op.h"

+#include "psy_const.h"
+#include "transform.h"
+#include "aac_rom.h"
+

+

+#define LS_TRANS ((FRAME_LEN_LONG-FRAME_LEN_SHORT)/2) /* 448 */

+#define SQRT1_2 0x5a82799a	/* sqrt(1/2) in Q31 */

+#define swap2(p0,p1) \

+	t = p0; t1 = *(&(p0)+1);	\

+	p0 = p1; *(&(p0)+1) = *(&(p1)+1);	\

+	p1 = t; *(&(p1)+1) = t1	

+
+/*********************************************************************************
+*
+* function name: Shuffle
+* description:  Shuffle points prepared function for fft
+*
+**********************************************************************************/
+static void Shuffle(int *buf, int num, const unsigned char* bitTab)

+{

+    int *part0, *part1;

+	int i, j;

+	int t, t1;

+

+	part0 = buf;

+    part1 = buf + num;

+	

+	while ((i = *bitTab++) != 0) {

+        j = *bitTab++;

+

+        swap2(part0[4*i+0], part0[4*j+0]);	

+        swap2(part0[4*i+2], part1[4*j+0]);	

+        swap2(part1[4*i+0], part0[4*j+2]);	

+        swap2(part1[4*i+2], part1[4*j+2]);	

+    }

+

+    do {

+        swap2(part0[4*i+2], part1[4*i+0]);	

+    } while ((i = *bitTab++) != 0);

+}

+

+#if !defined(ARMV5E) && !defined(ARMV7Neon)

+
+/*****************************************************************************
+*
+* function name: Radix4First
+* description:  Radix 4 point prepared function for fft
+*
+**********************************************************************************/

+static void Radix4First(int *buf, int num)

+{

+    int r0, r1, r2, r3;

+	int r4, r5, r6, r7;

+	

+	for (; num != 0; num--) 

+	{

+		r0 = buf[0] + buf[2];

+		r1 = buf[1] + buf[3];

+		r2 = buf[0] - buf[2];

+		r3 = buf[1] - buf[3];

+		r4 = buf[4] + buf[6];

+		r5 = buf[5] + buf[7];

+		r6 = buf[4] - buf[6];

+		r7 = buf[5] - buf[7];

+

+		buf[0] = r0 + r4;

+		buf[1] = r1 + r5;

+		buf[4] = r0 - r4;

+		buf[5] = r1 - r5;

+		buf[2] = r2 + r7;

+		buf[3] = r3 - r6;

+		buf[6] = r2 - r7;

+		buf[7] = r3 + r6;

+

+		buf += 8;

+	}

+}

+

+/*****************************************************************************
+*
+* function name: Radix8First
+* description:  Radix 8 point prepared function for fft
+*
+**********************************************************************************/

+static void Radix8First(int *buf, int num)

+{

+   int r0, r1, r2, r3;

+   int i0, i1, i2, i3;

+   int r4, r5, r6, r7;

+   int i4, i5, i6, i7;

+   int t0, t1, t2, t3;

+

+	for ( ; num != 0; num--) 

+	{

+		r0 = buf[0] + buf[2];

+		i0 = buf[1] + buf[3];

+		r1 = buf[0] - buf[2];

+		i1 = buf[1] - buf[3];

+		r2 = buf[4] + buf[6];

+		i2 = buf[5] + buf[7];

+		r3 = buf[4] - buf[6];

+		i3 = buf[5] - buf[7];

+

+		r4 = (r0 + r2) >> 1;

+		i4 = (i0 + i2) >> 1;

+		r5 = (r0 - r2) >> 1;

+		i5 = (i0 - i2) >> 1;

+		r6 = (r1 - i3) >> 1;

+		i6 = (i1 + r3) >> 1;

+		r7 = (r1 + i3) >> 1;

+		i7 = (i1 - r3) >> 1;

+

+		r0 = buf[ 8] + buf[10];

+		i0 = buf[ 9] + buf[11];

+		r1 = buf[ 8] - buf[10];

+		i1 = buf[ 9] - buf[11];

+		r2 = buf[12] + buf[14];

+		i2 = buf[13] + buf[15];

+		r3 = buf[12] - buf[14];

+		i3 = buf[13] - buf[15];

+

+		t0 = (r0 + r2) >> 1;

+		t1 = (i0 + i2) >> 1;

+		t2 = (r0 - r2) >> 1;

+		t3 = (i0 - i2) >> 1;

+

+		buf[ 0] = r4 + t0;

+		buf[ 1] = i4 + t1;

+		buf[ 8] = r4 - t0;

+		buf[ 9] = i4 - t1;

+		buf[ 4] = r5 + t3;

+		buf[ 5] = i5 - t2;

+		buf[12] = r5 - t3;

+		buf[13] = i5 + t2;

+

+		r0 = r1 - i3;

+		i0 = i1 + r3;

+		r2 = r1 + i3;

+		i2 = i1 - r3;

+

+		t0 = MULHIGH(SQRT1_2, r0 - i0);

+		t1 = MULHIGH(SQRT1_2, r0 + i0);

+		t2 = MULHIGH(SQRT1_2, r2 - i2);

+		t3 = MULHIGH(SQRT1_2, r2 + i2);

+

+		buf[ 6] = r6 - t0;

+		buf[ 7] = i6 - t1;

+		buf[14] = r6 + t0;

+		buf[15] = i6 + t1;

+		buf[ 2] = r7 + t3;

+		buf[ 3] = i7 - t2;

+		buf[10] = r7 - t3;

+		buf[11] = i7 + t2;

+

+		buf += 16;

+	}

+}

+

+/*****************************************************************************
+*
+* function name: Radix4FFT
+* description:  Radix 4 point fft core function
+*
+**********************************************************************************/

+static void Radix4FFT(int *buf, int num, int bgn, int *twidTab)

+{

+	int r0, r1, r2, r3;

+	int r4, r5, r6, r7;

+	int t0, t1;

+	int sinx, cosx;

+	int i, j, step;

+	int *xptr, *csptr;

+

+	for (num >>= 2; num != 0; num >>= 2) 

+	{

+		step = 2*bgn;

+		xptr = buf;

+

+    	for (i = num; i != 0; i--) 

+		{

+			csptr = twidTab;

+

+			for (j = bgn; j != 0; j--) 

+			{

+				r0 = xptr[0];

+				r1 = xptr[1];

+				xptr += step;

+				

+				t0 = xptr[0];

+				t1 = xptr[1];				

+				cosx = csptr[0];

+				sinx = csptr[1];

+				r2 = MULHIGH(cosx, t0) + MULHIGH(sinx, t1);		/* cos*br + sin*bi */

+				r3 = MULHIGH(cosx, t1) - MULHIGH(sinx, t0);		/* cos*bi - sin*br */

+				xptr += step;

+

+				t0 = r0 >> 2;

+				t1 = r1 >> 2;

+				r0 = t0 - r2;

+				r1 = t1 - r3;

+				r2 = t0 + r2;

+				r3 = t1 + r3;

+				

+				t0 = xptr[0];

+				t1 = xptr[1];

+				cosx = csptr[2];

+				sinx = csptr[3];

+				r4 = MULHIGH(cosx, t0) + MULHIGH(sinx, t1);		/* cos*cr + sin*ci */

+				r5 = MULHIGH(cosx, t1) - MULHIGH(sinx, t0);		/* cos*ci - sin*cr */

+				xptr += step;

+				

+				t0 = xptr[0];

+				t1 = xptr[1];

+				cosx = csptr[4];

+				sinx = csptr[5];

+				r6 = MULHIGH(cosx, t0) + MULHIGH(sinx, t1);		/* cos*cr + sin*ci */

+				r7 = MULHIGH(cosx, t1) - MULHIGH(sinx, t0);		/* cos*ci - sin*cr */

+				csptr += 6;

+

+				t0 = r4;

+				t1 = r5;

+				r4 = t0 + r6;

+				r5 = r7 - t1;

+				r6 = t0 - r6;

+				r7 = r7 + t1;

+

+				xptr[0] = r0 + r5;

+				xptr[1] = r1 + r6;

+				xptr -= step;

+

+				xptr[0] = r2 - r4;

+				xptr[1] = r3 - r7;

+				xptr -= step;

+

+				xptr[0] = r0 - r5;

+				xptr[1] = r1 - r6;

+				xptr -= step;

+

+				xptr[0] = r2 + r4;

+				xptr[1] = r3 + r7;

+				xptr += 2;

+			}

+			xptr += 3*step;

+		}

+		twidTab += 3*step;

+		bgn <<= 2;

+	}

+}

+

+/*********************************************************************************
+*
+* function name: PreMDCT
+* description:  prepare MDCT process for next FFT compute
+*
+**********************************************************************************/

+static void PreMDCT(int *buf0, int num, const int *csptr)

+{

+	int i;

+	int tr1, ti1, tr2, ti2;

+	int cosa, sina, cosb, sinb;

+	int *buf1;

+	

+	buf1 = buf0 + num - 1;

+

+	for(i = num >> 2; i != 0; i--)

+	{

+		cosa = *csptr++;	

+		sina = *csptr++;	

+		cosb = *csptr++;	

+		sinb = *csptr++;		

+

+		tr1 = *(buf0 + 0);

+		ti2 = *(buf0 + 1);

+		tr2 = *(buf1 - 1);

+		ti1 = *(buf1 + 0);

+		

+		*buf0++ = MULHIGH(cosa, tr1) + MULHIGH(sina, ti1);

+		*buf0++ = MULHIGH(cosa, ti1) - MULHIGH(sina, tr1);		

+		

+		*buf1-- = MULHIGH(cosb, ti2) - MULHIGH(sinb, tr2);		

+		*buf1-- = MULHIGH(cosb, tr2) + MULHIGH(sinb, ti2);

+	}

+}

+

+/*********************************************************************************
+*
+* function name: PostMDCT
+* description:   post MDCT process after next FFT for MDCT
+*
+**********************************************************************************/

+static void PostMDCT(int *buf0, int num, const int *csptr)

+{

+	int i;

+	int tr1, ti1, tr2, ti2;

+	int cosa, sina, cosb, sinb;

+	int *buf1;

+

+	buf1 = buf0 + num - 1;

+	

+	for(i = num >> 2; i != 0; i--)

+	{

+		cosa = *csptr++;	

+		sina = *csptr++;	

+		cosb = *csptr++;	

+		sinb = *csptr++;

+

+		tr1 = *(buf0 + 0);

+		ti1 = *(buf0 + 1);

+		ti2 = *(buf1 + 0);

+		tr2 = *(buf1 - 1);

+

+		*buf0++ = MULHIGH(cosa, tr1) + MULHIGH(sina, ti1);

+		*buf1-- = MULHIGH(sina, tr1) - MULHIGH(cosa, ti1);		

+		

+		*buf0++ = MULHIGH(sinb, tr2) - MULHIGH(cosb, ti2);

+		*buf1-- = MULHIGH(cosb, tr2) + MULHIGH(sinb, ti2);	

+	}

+}

+#endif

+

+

+/**********************************************************************************
+*
+* function name: Mdct_Long
+* description:  the long block mdct, include long_start block, end_long block
+*
+**********************************************************************************/

+void Mdct_Long(int *buf)

+{

+	PreMDCT(buf, 1024, cossintab + 128);

+

+	Shuffle(buf, 512, bitrevTab + 17);

+	Radix8First(buf, 512 >> 3);						

+	Radix4FFT(buf, 512 >> 3, 8, (int *)twidTab512);

+

+	PostMDCT(buf, 1024, cossintab + 128);	

+}

+

+

+/**********************************************************************************
+*
+* function name: Mdct_Short
+* description:  the short block mdct 
+*
+**********************************************************************************/

+void Mdct_Short(int *buf)

+{

+	PreMDCT(buf, 128, cossintab);

+

+	Shuffle(buf, 64, bitrevTab);

+	Radix4First(buf, 64 >> 2);						

+	Radix4FFT(buf, 64 >> 2, 4, (int *)twidTab64);	

+

+	PostMDCT(buf, 128, cossintab);	

+}

+
+
+/*****************************************************************************
+*
+* function name: shiftMdctDelayBuffer
+* description:    the mdct delay buffer has a size of 1600,
+*  so the calculation of LONG,STOP must be  spilt in two 
+*  passes with 1024 samples and a mid shift,
+*  the SHORT transforms can be completed in the delay buffer,
+*  and afterwards a shift
+*
+**********************************************************************************/
+static void shiftMdctDelayBuffer(Word16 *mdctDelayBuffer, /*! start of mdct delay buffer */
+								 Word16 *timeSignal,      /*! pointer to new time signal samples, interleaved */
+								 Word16 chIncrement       /*! number of channels */
+								 )
+{
+	Word32 i;
+	Word16 *srBuf = mdctDelayBuffer;
+	Word16 *dsBuf = mdctDelayBuffer+FRAME_LEN_LONG;
+
+	for(i = 0; i < BLOCK_SWITCHING_OFFSET-FRAME_LEN_LONG; i+= 8)
+	{
+		*srBuf++ = *dsBuf++;	 *srBuf++ = *dsBuf++;
+		*srBuf++ = *dsBuf++;	 *srBuf++ = *dsBuf++;
+		*srBuf++ = *dsBuf++;	 *srBuf++ = *dsBuf++;
+		*srBuf++ = *dsBuf++;	 *srBuf++ = *dsBuf++;
+	}
+
+	srBuf = mdctDelayBuffer + BLOCK_SWITCHING_OFFSET-FRAME_LEN_LONG;
+	dsBuf = timeSignal;
+
+	for(i=0; i<FRAME_LEN_LONG; i+=8)
+	{   
+		*srBuf++ = *dsBuf; dsBuf += chIncrement;
+		*srBuf++ = *dsBuf; dsBuf += chIncrement;
+		*srBuf++ = *dsBuf; dsBuf += chIncrement;
+		*srBuf++ = *dsBuf; dsBuf += chIncrement;
+		*srBuf++ = *dsBuf; dsBuf += chIncrement;
+		*srBuf++ = *dsBuf; dsBuf += chIncrement;
+		*srBuf++ = *dsBuf; dsBuf += chIncrement;
+		*srBuf++ = *dsBuf; dsBuf += chIncrement;
+	}
+}

+

+

+/*****************************************************************************
+*
+* function name: getScalefactorOfShortVectorStride
+* description:  Calculate max possible scale factor for input vector of shorts
+* returns:      Maximum scale factor
+*
+**********************************************************************************/

+static Word16 getScalefactorOfShortVectorStride(const Word16 *vector, /*!< Pointer to input vector */

+												Word16 len,           /*!< Length of input vector */

+												Word16 stride)        /*!< Stride of input vector */

+{

+	Word16 maxVal = 0;

+	Word16 absVal;

+	Word16 i;

+

+	for(i=0; i<len; i++){

+		absVal = abs_s(vector[i*stride]);

+		maxVal |= absVal;

+	}

+

+	return( maxVal ? norm_s(maxVal) : 15);

+}

+
+
+/*****************************************************************************
+*
+* function name: Transform_Real
+* description:  Calculate transform filter for input vector of shorts
+* returns:      TRUE if success
+*
+**********************************************************************************/
+void Transform_Real(Word16 *mdctDelayBuffer,
+                    Word16 *timeSignal,
+                    Word16 chIncrement,
+                    Word32 *realOut,
+                    Word16 *mdctScale,
+                    Word16 blockType
+                    )
+{
+	Word32 i,w;
+	Word32 timeSignalSample;
+	Word32 ws1,ws2;
+	Word16 *dctIn0, *dctIn1;

+	Word32 *outData0, *outData1;

+	Word32 *winPtr;
+
+	Word32 delayBufferSf,timeSignalSf,minSf;
+	Word32 headRoom=0;
+	
+	switch(blockType){
+		
+		
+	case LONG_WINDOW:
+		/*
+		we access BLOCK_SWITCHING_OFFSET (1600 ) delay buffer samples + 448 new timeSignal samples
+		and get the biggest scale factor for next calculate more precise
+		*/
+		delayBufferSf = getScalefactorOfShortVectorStride(mdctDelayBuffer,BLOCK_SWITCHING_OFFSET,1);
+		timeSignalSf  = getScalefactorOfShortVectorStride(timeSignal,2*FRAME_LEN_LONG-BLOCK_SWITCHING_OFFSET,chIncrement);
+		minSf = min(delayBufferSf,timeSignalSf);
+		minSf = min(minSf,14);
+		
+		dctIn0 = mdctDelayBuffer;
+		dctIn1 = mdctDelayBuffer + FRAME_LEN_LONG - 1;
+		outData0 = realOut + FRAME_LEN_LONG/2;
+		
+		/* add windows and pre add for mdct to last buffer*/
+		winPtr = (int *)LongWindowKBD;
+		for(i=0;i<FRAME_LEN_LONG/2;i++){
+			timeSignalSample = (*dctIn0++) << minSf; 
+			ws1 = timeSignalSample * (*winPtr >> 16);
+			timeSignalSample = (*dctIn1--) << minSf;
+			ws2 = timeSignalSample * (*winPtr & 0xffff);
+			winPtr ++;
+			/* shift 2 to avoid overflow next */
+			*outData0++ = (ws1 >> 2) - (ws2 >> 2);
+		}
+		
+		shiftMdctDelayBuffer(mdctDelayBuffer,timeSignal,chIncrement);
+		
+		/* add windows and pre add for mdct to new buffer*/
+		dctIn0 = mdctDelayBuffer;
+		dctIn1 = mdctDelayBuffer + FRAME_LEN_LONG - 1;
+		outData0 = realOut + FRAME_LEN_LONG/2 - 1; 
+		winPtr = (int *)LongWindowKBD;
+		for(i=0;i<FRAME_LEN_LONG/2;i++){    
+			timeSignalSample = (*dctIn0++) << minSf;
+			ws1 = timeSignalSample * (*winPtr & 0xffff);
+			timeSignalSample = (*dctIn1--) << minSf;
+			ws2 = timeSignalSample * (*winPtr >> 16);
+			winPtr++;
+			/* shift 2 to avoid overflow next */
+			*outData0-- = -((ws1 >> 2) + (ws2 >> 2)); 
+		}
+
+		Mdct_Long(realOut);

+		/* update scale factor */

+		minSf = 14 - minSf;
+		*mdctScale=minSf; 
+		break;
+		
+	case START_WINDOW:
+		/*
+		we access BLOCK_SWITCHING_OFFSET (1600 ) delay buffer samples + no timeSignal samples
+		and get the biggest scale factor for next calculate more precise
+		*/
+		minSf = getScalefactorOfShortVectorStride(mdctDelayBuffer,BLOCK_SWITCHING_OFFSET,1);
+		minSf = min(minSf,14);
+
+		dctIn0 = mdctDelayBuffer;
+		dctIn1 = mdctDelayBuffer + FRAME_LEN_LONG - 1;
+		outData0 = realOut + FRAME_LEN_LONG/2; 		
+		winPtr = (int *)LongWindowKBD;
+
+		/* add windows and pre add for mdct to last buffer*/
+		for(i=0;i<FRAME_LEN_LONG/2;i++){
+			timeSignalSample = (*dctIn0++) << minSf;
+			ws1 = timeSignalSample * (*winPtr >> 16);
+			timeSignalSample = (*dctIn1--) << minSf;
+			ws2 = timeSignalSample * (*winPtr & 0xffff);
+			winPtr ++;
+			*outData0++ = (ws1 >> 2) - (ws2 >> 2);  /* shift 2 to avoid overflow next */

+		}
+		
+		shiftMdctDelayBuffer(mdctDelayBuffer,timeSignal,chIncrement);
+		
+		outData0 = realOut + FRAME_LEN_LONG/2 - 1; 
+		for(i=0;i<LS_TRANS;i++){
+			*outData0-- = -mdctDelayBuffer[i] << (15 - 2 + minSf);  
+		}
+		
+		/* add windows and pre add for mdct to new buffer*/
+		dctIn0 = mdctDelayBuffer + LS_TRANS;
+		dctIn1 = mdctDelayBuffer + FRAME_LEN_LONG - 1 - LS_TRANS;
+		outData0 = realOut + FRAME_LEN_LONG/2 - 1 -LS_TRANS; 
+		winPtr = (int *)ShortWindowSine;
+		for(i=0;i<FRAME_LEN_SHORT/2;i++){
+			timeSignalSample= (*dctIn0++) << minSf;
+			ws1 = timeSignalSample * (*winPtr & 0xffff);
+			timeSignalSample= (*dctIn1--) << minSf;
+			ws2 = timeSignalSample * (*winPtr >> 16);
+			winPtr++;
+			*outData0-- =  -((ws1 >> 2) + (ws2 >> 2));  /* shift 2 to avoid overflow next */

+		}
+
+		Mdct_Long(realOut);
+		/* update scale factor */
+		minSf = 14 - minSf;
+		*mdctScale= minSf;
+		break;
+		
+	case STOP_WINDOW:
+		/*
+		we access BLOCK_SWITCHING_OFFSET-LS_TRANS (1600-448 ) delay buffer samples + 448 new timeSignal samples
+		and get the biggest scale factor for next calculate more precise
+		*/
+		delayBufferSf = getScalefactorOfShortVectorStride(mdctDelayBuffer+LS_TRANS,BLOCK_SWITCHING_OFFSET-LS_TRANS,1);
+		timeSignalSf  = getScalefactorOfShortVectorStride(timeSignal,2*FRAME_LEN_LONG-BLOCK_SWITCHING_OFFSET,chIncrement);
+		minSf = min(delayBufferSf,timeSignalSf);    
+		minSf = min(minSf,13);
+		
+		outData0 = realOut + FRAME_LEN_LONG/2;
+		dctIn1 = mdctDelayBuffer + FRAME_LEN_LONG - 1;
+		for(i=0;i<LS_TRANS;i++){
+			*outData0++ = -(*dctIn1--) << (15 - 2 + minSf);    
+		}
+		
+		/* add windows and pre add for mdct to last buffer*/
+		dctIn0 = mdctDelayBuffer + LS_TRANS;
+		dctIn1 = mdctDelayBuffer + FRAME_LEN_LONG - 1 - LS_TRANS;
+		outData0 = realOut + FRAME_LEN_LONG/2 + LS_TRANS; 
+		winPtr = (int *)ShortWindowSine;
+		for(i=0;i<FRAME_LEN_SHORT/2;i++){
+			timeSignalSample = (*dctIn0++) << minSf;
+			ws1 = timeSignalSample * (*winPtr >> 16);
+			timeSignalSample= (*dctIn1--) << minSf;
+			ws2 = timeSignalSample * (*winPtr & 0xffff);
+			winPtr++;
+			*outData0++ = (ws1 >> 2) - (ws2 >> 2);  /* shift 2 to avoid overflow next */

+		}
+		
+		shiftMdctDelayBuffer(mdctDelayBuffer,timeSignal,chIncrement);
+		
+		/* add windows and pre add for mdct to new buffer*/
+		dctIn0 = mdctDelayBuffer;
+		dctIn1 = mdctDelayBuffer + FRAME_LEN_LONG - 1;
+		outData0 = realOut + FRAME_LEN_LONG/2 - 1; 
+		winPtr = (int *)LongWindowKBD;
+		for(i=0;i<FRAME_LEN_LONG/2;i++){
+			timeSignalSample= (*dctIn0++) << minSf;
+			ws1 = timeSignalSample *(*winPtr & 0xffff);
+			timeSignalSample= (*dctIn1--) << minSf;
+			ws2 = timeSignalSample * (*winPtr >> 16);
+			*outData0-- =  -((ws1 >> 2) + (ws2 >> 2));  /* shift 2 to avoid overflow next */

+			winPtr++;

+		}
+		
+		Mdct_Long(realOut);
+		minSf = 14 - minSf;
+		*mdctScale= minSf; /* update scale factor */
+		break;
+		
+	case SHORT_WINDOW:
+		/*
+		we access BLOCK_SWITCHING_OFFSET (1600 ) delay buffer samples + no new timeSignal samples
+		and get the biggest scale factor for next calculate more precise
+		*/		
+		minSf = getScalefactorOfShortVectorStride(mdctDelayBuffer+TRANSFORM_OFFSET_SHORT,9*FRAME_LEN_SHORT,1);
+		minSf = min(minSf,10);
+		
+		
+		for(w=0;w<TRANS_FAC;w++){
+			dctIn0 = mdctDelayBuffer+w*FRAME_LEN_SHORT+TRANSFORM_OFFSET_SHORT;
+			dctIn1 = mdctDelayBuffer+w*FRAME_LEN_SHORT+TRANSFORM_OFFSET_SHORT + FRAME_LEN_SHORT-1;
+			outData0 = realOut + FRAME_LEN_SHORT/2; 
+			outData1 = realOut + FRAME_LEN_SHORT/2 - 1; 
+
+			winPtr = (int *)ShortWindowSine;
+			for(i=0;i<FRAME_LEN_SHORT/2;i++){
+				timeSignalSample= *dctIn0 << minSf;
+				ws1 = timeSignalSample * (*winPtr >> 16);
+				timeSignalSample= *dctIn1 << minSf;
+				ws2 = timeSignalSample * (*winPtr & 0xffff);
+				*outData0++ = (ws1 >> 2) - (ws2 >> 2);  /* shift 2 to avoid overflow next */

+				
+				timeSignalSample= *(dctIn0 + FRAME_LEN_SHORT) << minSf;
+				ws1 = timeSignalSample * (*winPtr & 0xffff);
+				timeSignalSample= *(dctIn1 + FRAME_LEN_SHORT) << minSf;
+				ws2 = timeSignalSample * (*winPtr >> 16);
+				*outData1-- =  -((ws1 >> 2) + (ws2 >> 2));  /* shift 2 to avoid overflow next */

+

+				winPtr++;

+				dctIn0++;

+				dctIn1--;

+			}
+
+			Mdct_Short(realOut);
+			realOut += FRAME_LEN_SHORT;
+		}
+		

+		minSf = 11 - minSf;
+		*mdctScale = minSf; /* update scale factor */
+		
+		shiftMdctDelayBuffer(mdctDelayBuffer,timeSignal,chIncrement);
+		break;
+  }
+}
+
diff --git a/media/libstagefright/codecs/amrnb/enc/AMRNBEncoder.cpp b/media/libstagefright/codecs/amrnb/enc/AMRNBEncoder.cpp
index f349671..4c02fe9 100644
--- a/media/libstagefright/codecs/amrnb/enc/AMRNBEncoder.cpp
+++ b/media/libstagefright/codecs/amrnb/enc/AMRNBEncoder.cpp
@@ -29,8 +29,9 @@
 static const int32_t kNumSamplesPerFrame = 160;
 static const int32_t kSampleRate = 8000;
 
-AMRNBEncoder::AMRNBEncoder(const sp<MediaSource> &source)
+AMRNBEncoder::AMRNBEncoder(const sp<MediaSource> &source, const sp<MetaData> &meta)
     : mSource(source),
+      mMeta(meta),
       mStarted(false),
       mBufferGroup(NULL),
       mEncState(NULL),
@@ -69,7 +70,10 @@
 }
 
 status_t AMRNBEncoder::start(MetaData *params) {
-    CHECK(!mStarted);
+    if (mStarted) {
+        LOGW("Call start() when encoder already started");
+        return OK;
+    }
 
     mBufferGroup = new MediaBufferGroup;
     mBufferGroup->add_buffer(new MediaBuffer(32));
@@ -78,7 +82,7 @@
                 &mEncState, &mSidState, false /* dtx_enable */),
              0);
 
-    mSource->start();
+    mSource->start(params);
 
     mAnchorTimeUs = 0;
     mNumFramesOutput = 0;
@@ -96,7 +100,10 @@
 }
 
 status_t AMRNBEncoder::stop() {
-    CHECK(mStarted);
+    if (!mStarted) {
+        LOGW("Call stop() when encoder has not started.");
+        return OK;
+    }
 
     if (mInputBuffer) {
         mInputBuffer->release();
@@ -119,28 +126,16 @@
 sp<MetaData> AMRNBEncoder::getFormat() {
     sp<MetaData> srcFormat = mSource->getFormat();
 
-    int32_t numChannels;
-    int32_t sampleRate;
-
-    CHECK(srcFormat->findInt32(kKeyChannelCount, &numChannels));
-    CHECK_EQ(numChannels, 1);
-
-    CHECK(srcFormat->findInt32(kKeySampleRate, &sampleRate));
-    CHECK_EQ(sampleRate, kSampleRate);
-
-    sp<MetaData> meta = new MetaData;
-    meta->setCString(kKeyMIMEType, MEDIA_MIMETYPE_AUDIO_AMR_NB);
-    meta->setInt32(kKeyChannelCount, numChannels);
-    meta->setInt32(kKeySampleRate, sampleRate);
+    mMeta->setCString(kKeyMIMEType, MEDIA_MIMETYPE_AUDIO_AMR_NB);
 
     int64_t durationUs;
     if (srcFormat->findInt64(kKeyDuration, &durationUs)) {
-        meta->setInt64(kKeyDuration, durationUs);
+        mMeta->setInt64(kKeyDuration, durationUs);
     }
 
-    meta->setCString(kKeyDecoderComponent, "AMRNBEncoder");
+    mMeta->setCString(kKeyDecoderComponent, "AMRNBEncoder");
 
-    return meta;
+    return mMeta;
 }
 
 status_t AMRNBEncoder::read(
diff --git a/media/libstagefright/codecs/amrwbenc/AMRWBEncoder.cpp b/media/libstagefright/codecs/amrwbenc/AMRWBEncoder.cpp
new file mode 100644
index 0000000..4257c6a
--- /dev/null
+++ b/media/libstagefright/codecs/amrwbenc/AMRWBEncoder.cpp
@@ -0,0 +1,287 @@
+/*
+ * Copyright (C) 2010 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+//#define LOG_NDEBUG 0
+#define LOG_TAG "AMRWBEncoder"
+#include <utils/Log.h>
+
+#include "AMRWBEncoder.h"
+#include "voAMRWB.h"
+#include "cmnMemory.h"
+
+#include <media/stagefright/MediaBufferGroup.h>
+#include <media/stagefright/MediaDebug.h>
+#include <media/stagefright/MediaDefs.h>
+#include <media/stagefright/MediaErrors.h>
+#include <media/stagefright/MetaData.h>
+
+namespace android {
+
+static const int32_t kNumSamplesPerFrame = 320;
+static const int32_t kBitsPerSample = 16;
+static const int32_t kInputBufferSize = (kBitsPerSample / 8) * kNumSamplesPerFrame;
+static const int32_t kSampleRate = 16000;
+static const int32_t kNumChannels = 1;
+
+AMRWBEncoder::AMRWBEncoder(const sp<MediaSource> &source, const sp<MetaData> &meta)
+    : mSource(source),
+      mMeta(meta),
+      mStarted(false),
+      mBufferGroup(NULL),
+      mInputBuffer(NULL),
+      mEncoderHandle(NULL),
+      mApiHandle(NULL),
+      mMemOperator(NULL),
+      mAnchorTimeUs(0),
+      mNumFramesOutput(0),
+      mNumInputSamples(0) {
+}
+
+static VOAMRWBMODE pickModeFromBitRate(int32_t bps) {
+    CHECK(bps >= 0);
+    if (bps <= 6600) {
+        return VOAMRWB_MD66;
+    } else if (bps <= 8850) {
+        return VOAMRWB_MD885;
+    } else if (bps <= 12650) {
+        return VOAMRWB_MD1265;
+    } else if (bps <= 14250) {
+        return VOAMRWB_MD1425;
+    } else if (bps <= 15850) {
+        return VOAMRWB_MD1585;
+    } else if (bps <= 18250) {
+        return VOAMRWB_MD1825;
+    } else if (bps <= 19850) {
+        return VOAMRWB_MD1985;
+    } else if (bps <= 23050) {
+        return VOAMRWB_MD2305;
+    }
+    return VOAMRWB_MD2385;
+}
+
+status_t AMRWBEncoder::initCheck() {
+    CHECK(mApiHandle == NULL && mEncoderHandle == NULL);
+    CHECK(mMeta->findInt32(kKeyBitRate, &mBitRate));
+
+    mApiHandle = new VO_AUDIO_CODECAPI;
+    CHECK(mApiHandle);
+
+    if (VO_ERR_NONE != voGetAMRWBEncAPI(mApiHandle)) {
+        LOGE("Failed to get api handle");
+        return UNKNOWN_ERROR;
+    }
+
+    mMemOperator = new VO_MEM_OPERATOR;
+    CHECK(mMemOperator != NULL);
+    mMemOperator->Alloc = cmnMemAlloc;
+    mMemOperator->Copy = cmnMemCopy;
+    mMemOperator->Free = cmnMemFree;
+    mMemOperator->Set = cmnMemSet;
+    mMemOperator->Check = cmnMemCheck;
+
+    VO_CODEC_INIT_USERDATA userData;
+    memset(&userData, 0, sizeof(userData));
+    userData.memflag = VO_IMF_USERMEMOPERATOR;
+    userData.memData = (VO_PTR) mMemOperator;
+    if (VO_ERR_NONE != mApiHandle->Init(&mEncoderHandle, VO_AUDIO_CodingAMRWB, &userData)) {
+        LOGE("Failed to init AMRWB encoder");
+        return UNKNOWN_ERROR;
+    }
+
+    // Configure AMRWB encoder$
+    VOAMRWBMODE mode = pickModeFromBitRate(mBitRate);
+    if (VO_ERR_NONE != mApiHandle->SetParam(mEncoderHandle, VO_PID_AMRWB_MODE,  &mode)) {
+        LOGE("Failed to set AMRWB encoder mode to %d", mode);
+        return UNKNOWN_ERROR;
+    }
+
+    VOAMRWBFRAMETYPE type = VOAMRWB_RFC3267;
+    if (VO_ERR_NONE != mApiHandle->SetParam(mEncoderHandle, VO_PID_AMRWB_FRAMETYPE, &type)) {
+        LOGE("Failed to set AMRWB encoder frame type to %d", type);
+        return UNKNOWN_ERROR;
+    }
+
+    return OK;
+}
+
+AMRWBEncoder::~AMRWBEncoder() {
+    if (mStarted) {
+        stop();
+    }
+}
+
+status_t AMRWBEncoder::start(MetaData *params) {
+    if (mStarted) {
+        LOGW("Call start() when encoder already started");
+        return OK;
+    }
+
+    mBufferGroup = new MediaBufferGroup;
+
+    // The largest buffer size is header + 477 bits
+    mBufferGroup->add_buffer(new MediaBuffer(1024));
+
+    CHECK_EQ(OK, initCheck());
+
+    mNumFramesOutput = 0;
+    mSource->start(params);
+
+    mStarted = true;
+
+    return OK;
+}
+
+status_t AMRWBEncoder::stop() {
+    if (!mStarted) {
+        LOGW("Call stop() when encoder has not started");
+        return OK;
+    }
+
+    if (mInputBuffer) {
+        mInputBuffer->release();
+        mInputBuffer = NULL;
+    }
+
+    delete mBufferGroup;
+    mBufferGroup = NULL;
+
+
+    CHECK_EQ(VO_ERR_NONE, mApiHandle->Uninit(mEncoderHandle));
+    mEncoderHandle = NULL;
+
+    delete mApiHandle;
+    mApiHandle = NULL;
+
+    delete mMemOperator;
+    mMemOperator;
+
+    mStarted = false;
+
+    mSource->stop();
+    return OK;
+}
+
+sp<MetaData> AMRWBEncoder::getFormat() {
+    sp<MetaData> srcFormat = mSource->getFormat();
+
+    mMeta->setCString(kKeyMIMEType, MEDIA_MIMETYPE_AUDIO_AMR_WB);
+
+    int64_t durationUs;
+    if (srcFormat->findInt64(kKeyDuration, &durationUs)) {
+        mMeta->setInt64(kKeyDuration, durationUs);
+    }
+
+    mMeta->setCString(kKeyDecoderComponent, "AMRWBEncoder");
+
+    return mMeta;
+}
+
+status_t AMRWBEncoder::read(
+        MediaBuffer **out, const ReadOptions *options) {
+    status_t err;
+
+    *out = NULL;
+
+    int64_t seekTimeUs;
+    CHECK(options == NULL || !options->getSeekTo(&seekTimeUs));
+
+    while (mNumInputSamples < kNumSamplesPerFrame) {
+        if (mInputBuffer == NULL) {
+            err = mSource->read(&mInputBuffer, options);
+
+            if (err != OK) {
+                if (mNumInputSamples == 0) {
+                    return ERROR_END_OF_STREAM;
+                }
+                memset(&mInputFrame[mNumInputSamples],
+                       0,
+                       sizeof(int16_t)
+                            * (kNumSamplesPerFrame - mNumInputSamples));
+                mNumInputSamples = 0;
+                break;
+            }
+
+            size_t align = mInputBuffer->range_length() % sizeof(int16_t);
+            CHECK_EQ(align, 0);
+
+            int64_t timeUs;
+            if (mInputBuffer->meta_data()->findInt64(kKeyTime, &timeUs)) {
+                mAnchorTimeUs = timeUs;
+            }
+        }
+
+        size_t copy =
+            (kNumSamplesPerFrame - mNumInputSamples) * sizeof(int16_t);
+
+        if (copy > mInputBuffer->range_length()) {
+            copy = mInputBuffer->range_length();
+        }
+
+        memcpy(&mInputFrame[mNumInputSamples],
+               (const uint8_t *)mInputBuffer->data()
+                    + mInputBuffer->range_offset(),
+               copy);
+
+        mInputBuffer->set_range(
+                mInputBuffer->range_offset() + copy,
+                mInputBuffer->range_length() - copy);
+
+        if (mInputBuffer->range_length() == 0) {
+            mInputBuffer->release();
+            mInputBuffer = NULL;
+        }
+
+        mNumInputSamples += copy / sizeof(int16_t);
+        if (mNumInputSamples >= kNumSamplesPerFrame) {
+            mNumInputSamples %= kNumSamplesPerFrame;
+            break;  // Get a whole input frame 640 bytes
+        }
+    }
+
+    VO_CODECBUFFER inputData;
+    memset(&inputData, 0, sizeof(inputData));
+    inputData.Buffer = (unsigned char*) mInputFrame;
+    inputData.Length = kInputBufferSize;
+    CHECK(VO_ERR_NONE == mApiHandle->SetInputData(mEncoderHandle,&inputData));
+
+    MediaBuffer *buffer;
+    CHECK_EQ(mBufferGroup->acquire_buffer(&buffer), OK);
+    uint8_t *outPtr = (uint8_t *)buffer->data();
+
+    VO_CODECBUFFER outputData;
+    memset(&outputData, 0, sizeof(outputData));
+    VO_AUDIO_OUTPUTINFO outputInfo;
+    memset(&outputInfo, 0, sizeof(outputInfo));
+
+    VO_U32 ret = VO_ERR_NONE;
+    outputData.Buffer = outPtr;
+    outputData.Length = buffer->size();
+    ret = mApiHandle->GetOutputData(mEncoderHandle, &outputData, &outputInfo);
+    CHECK(ret == VO_ERR_NONE || ret == VO_ERR_INPUT_BUFFER_SMALL);
+
+    buffer->set_range(0, outputData.Length);
+    ++mNumFramesOutput;
+
+    // XXX: fix timestamp calculation
+    int64_t timestampUs = mNumFramesOutput * 20000LL;
+
+    buffer->meta_data()->setInt64(kKeyTime, timestampUs);
+
+    *out = buffer;
+    return OK;
+}
+
+}  // namespace android
diff --git a/media/libstagefright/codecs/amrwbenc/Android.mk b/media/libstagefright/codecs/amrwbenc/Android.mk
new file mode 100644
index 0000000..4293287
--- /dev/null
+++ b/media/libstagefright/codecs/amrwbenc/Android.mk
@@ -0,0 +1,120 @@
+LOCAL_PATH := $(call my-dir)
+include $(CLEAR_VARS)
+include frameworks/base/media/libstagefright/codecs/common/Config.mk
+
+LOCAL_PRELINK_MODULE := false
+ 	
+LOCAL_SRC_FILES := \
+	AMRWBEncoder.cpp \
+	src/autocorr.c \
+	src/az_isp.c \
+	src/bits.c \
+	src/c2t64fx.c \
+	src/c4t64fx.c \
+	src/convolve.c \
+	src/cor_h_x.c \
+	src/decim54.c \
+	src/deemph.c \
+	src/dtx.c \
+	src/g_pitch.c \
+	src/gpclip.c \
+	src/homing.c \
+	src/hp400.c \
+	src/hp50.c \
+	src/hp6k.c \
+	src/hp_wsp.c \
+	src/int_lpc.c \
+	src/isp_az.c \
+	src/isp_isf.c \
+	src/lag_wind.c \
+	src/levinson.c \
+	src/log2.c \
+	src/lp_dec2.c \
+	src/math_op.c \
+	src/oper_32b.c \
+	src/p_med_ol.c \
+	src/pit_shrp.c \
+	src/pitch_f4.c \
+	src/pred_lt4.c \
+	src/preemph.c \
+	src/q_gain2.c \
+	src/q_pulse.c \
+	src/qisf_ns.c \
+	src/qpisf_2s.c \
+	src/random.c \
+	src/residu.c \
+	src/scale.c \
+	src/stream.c \
+	src/syn_filt.c \
+	src/updt_tar.c \
+	src/util.c \
+	src/voAMRWBEnc.c \
+	src/voicefac.c \
+	src/wb_vad.c \
+	src/weight_a.c \
+	src/mem_align.c
+
+
+ifeq ($(VOTT), v5)
+LOCAL_SRC_FILES += \
+	src/asm/ARMV5E/convolve_opt.s \
+	src/asm/ARMV5E/cor_h_vec_opt.s \
+	src/asm/ARMV5E/Deemph_32_opt.s \
+	src/asm/ARMV5E/Dot_p_opt.s \
+	src/asm/ARMV5E/Filt_6k_7k_opt.s \
+	src/asm/ARMV5E/Norm_Corr_opt.s \
+	src/asm/ARMV5E/pred_lt4_1_opt.s \
+	src/asm/ARMV5E/residu_asm_opt.s \
+	src/asm/ARMV5E/scale_sig_opt.s \
+	src/asm/ARMV5E/Syn_filt_32_opt.s \
+	src/asm/ARMV5E/syn_filt_opt.s
+
+endif
+
+ifeq ($(VOTT), v7)
+LOCAL_SRC_FILES += \
+	src/asm/ARMV7/convolve_neon.s \
+	src/asm/ARMV7/cor_h_vec_neon.s \
+	src/asm/ARMV7/Deemph_32_neon.s \
+	src/asm/ARMV7/Dot_p_neon.s \
+	src/asm/ARMV7/Filt_6k_7k_neon.s \
+	src/asm/ARMV7/Norm_Corr_neon.s \
+	src/asm/ARMV7/pred_lt4_1_neon.s \
+	src/asm/ARMV7/residu_asm_neon.s \
+	src/asm/ARMV7/scale_sig_neon.s \
+	src/asm/ARMV7/Syn_filt_32_neon.s \
+	src/asm/ARMV7/syn_filt_neon.s
+
+endif
+
+LOCAL_MODULE := libstagefright_amrwbenc
+
+LOCAL_ARM_MODE := arm
+
+LOCAL_STATIC_LIBRARIES := 
+
+LOCAL_SHARED_LIBRARIES :=
+
+LOCAL_C_INCLUDES := \
+	frameworks/base/media/libstagefright/include \
+	frameworks/base/media/libstagefright/codecs/common/include \
+	frameworks/base/include \
+	$(LOCAL_PATH)/src \
+	$(LOCAL_PATH)/inc
+
+LOCAL_CFLAGS := $(VO_CFLAGS)
+
+ifeq ($(VOTT), v5)
+LOCAL_CFLAGS += -DARM -DASM_OPT
+LOCAL_C_INCLUDES += $(LOCAL_PATH)/src/asm/ARMV5E
+endif
+
+ifeq ($(VOTT), v7)
+LOCAL_CFLAGS += -DARM -DARMV7 -DASM_OPT
+LOCAL_C_INCLUDES += $(LOCAL_PATH)/src/asm/ARMV5E
+LOCAL_C_INCLUDES += $(LOCAL_PATH)/src/asm/ARMV7
+endif
+
+include $(BUILD_STATIC_LIBRARY)
+
+
diff --git a/media/libstagefright/codecs/amrwbenc/SampleCode/AMRWB_E_SAMPLE.c b/media/libstagefright/codecs/amrwbenc/SampleCode/AMRWB_E_SAMPLE.c
new file mode 100644
index 0000000..792d3cc
--- /dev/null
+++ b/media/libstagefright/codecs/amrwbenc/SampleCode/AMRWB_E_SAMPLE.c
@@ -0,0 +1,364 @@
+/*

+ ** Copyright 2003-2010, VisualOn, Inc.

+ **

+ ** Licensed under the Apache License, Version 2.0 (the "License");

+ ** you may not use this file except in compliance with the License.

+ ** You may obtain a copy of the License at

+ **

+ **     http://www.apache.org/licenses/LICENSE-2.0

+ **

+ ** Unless required by applicable law or agreed to in writing, software

+ ** distributed under the License is distributed on an "AS IS" BASIS,

+ ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

+ ** See the License for the specific language governing permissions and

+ ** limitations under the License.

+ */

+

+

+#ifdef LINUX

+#include <dlfcn.h>

+#endif

+

+#include      <stdio.h>

+#include      <stdlib.h>

+#include      <time.h>

+#include      "voAMRWB.h"

+#include      "cmnMemory.h"

+

+#define VOAMRWB_RFC3267_HEADER_INFO "#!AMR-WB\n"

+

+#define  INPUT_SIZE   640

+#define  OUTPUT_SIZE  1024

+unsigned char  InputBuf[INPUT_SIZE];

+unsigned char  OutputBuf[OUTPUT_SIZE];

+

+void usage (void) {

+	printf ("AMR_WB Encoder HELP   Displays this text\n");

+	printf ("\n");

+	printf ("Usage:\n");

+	printf ("AMRWBEnc [options] Input_file output_file \n");

+	printf ("\n");

+	printf ("Options +M* +F* +DTX \n");

+	printf ("Support \n");

+	printf ("Options +M* for seting compression bitrate mode, default is 23.85kbps\n");

+	printf (" +M0 = 6.6kbps \n");

+	printf (" +M1 = 8.85kbps \n");

+	printf (" +M2 = 12.65kbps \n");

+	printf (" +M3 = 14.25kbps \n");

+	printf (" +M4 = 15.58kbps \n");

+	printf (" +M5 = 18.25kbps \n");

+	printf (" +M6 = 19.85kbps \n");

+	printf (" +M7 = 23.05kbps \n");

+	printf (" +M8 = 23.85kbps \n");

+	printf ("\n");

+	printf ("Options +F* for setting output frame Type, default is RFC3267 \n");

+	printf ("+F0 for AMR_WB Defualt bit extern short data frame type \n");

+	printf ("+F1 for AMR_WB_ITU bit extern short data frame type \n");

+	printf ("+F2 for RFC3267\n ");

+	printf ("\n");

+	printf ("Options +DTX enable DTX mode, default is disable.\n");

+	printf ("File names, input raw PCM data, and output is AMR_WB bit-stream file.\n");

+	printf ("\n");

+}

+

+int  GetNextBuf(FILE* inFile,unsigned char* dst,int size)

+{

+	int size2 = (int)fread(dst, sizeof(signed char), size,inFile);

+	return size2;

+}

+

+typedef int (VO_API * VOGETAUDIOENCAPI) (VO_AUDIO_CODECAPI * pEncHandle);

+

+int encode(

+		   int mode, 

+		   short   allow_dtx,

+		   VOAMRWBFRAMETYPE frameType,

+		   const char* srcfile, 

+		   const char* dstfile

+		   )

+{

+	int			ret = 0;

+	int         returnCode;

+	FILE		*fsrc = NULL;

+	FILE		*fdst = NULL;

+	int         framenum = 0;

+	int         eofFile = 0;

+	int         size1 = 0;

+	int         Relens;

+

+	VO_AUDIO_CODECAPI       AudioAPI;

+	VO_MEM_OPERATOR         moper;

+	VO_CODEC_INIT_USERDATA  useData;

+	VO_HANDLE               hCodec;

+	VO_CODECBUFFER          inData;

+	VO_CODECBUFFER          outData;

+	VO_AUDIO_OUTPUTINFO     outFormat;

+

+	unsigned char *inBuf = InputBuf;

+	unsigned char *outBuf = OutputBuf;

+

+

+#ifdef LINUX

+	void  *handle = NULL;

+	void  *pfunc;

+	VOGETAUDIOENCAPI pGetAPI;

+#endif

+

+	clock_t   start, finish;

+	double    duration = 0.0;

+

+	if ((fsrc = fopen (srcfile, "rb")) == NULL)

+	{

+		ret = -1;

+		goto safe_exit;

+	}

+

+	if ((fdst = fopen (dstfile, "wb")) == NULL)

+	{

+		ret = -1;

+		goto safe_exit;

+	}

+

+	moper.Alloc = cmnMemAlloc;

+	moper.Copy = cmnMemCopy;

+	moper.Free = cmnMemFree;

+	moper.Set = cmnMemSet;

+	moper.Check = cmnMemCheck;

+

+	useData.memflag = VO_IMF_USERMEMOPERATOR;

+	useData.memData = (VO_PTR)(&moper);

+

+#ifdef LINUX

+	handle = dlopen("/data/local/tmp/voAMRWBEnc.so", RTLD_NOW);

+	if(handle == 0)

+	{

+		printf("open dll error......");

+		return -1;

+	}

+

+	pfunc = dlsym(handle, "voGetAMRWBEncAPI");	

+	if(pfunc == 0)

+	{

+		printf("open function error......");

+		return -1;

+	}

+

+	pGetAPI = (VOGETAUDIOENCAPI)pfunc;

+

+	returnCode  = pGetAPI(&AudioAPI);

+	if(returnCode)

+	{

+		printf("get APIs error......");

+		return -1;

+	}

+#else

+	ret = voGetAMRWBEncAPI(&AudioAPI);

+	if(ret)

+	{

+		ret = -1;

+		printf("get APIs error......");

+		goto safe_exit;

+	}

+#endif 

+

+	//#######################################   Init Encoding Section   #########################################

+	ret = AudioAPI.Init(&hCodec, VO_AUDIO_CodingAMRWB, &useData);

+

+	if(ret)

+	{

+		ret = -1;

+		printf("APIs init error......");

+		goto safe_exit;

+	}

+

+	Relens = GetNextBuf(fsrc,InputBuf,INPUT_SIZE);

+	if(Relens!=INPUT_SIZE && !feof(fsrc))

+	{

+		ret = -1; //Invalid magic number

+		printf("get next buffer error......");

+		goto safe_exit;

+	}

+

+	//###################################### set encode Mode ##################################################

+	ret = AudioAPI.SetParam(hCodec, VO_PID_AMRWB_FRAMETYPE, &frameType);

+	ret = AudioAPI.SetParam(hCodec, VO_PID_AMRWB_MODE, &mode);

+	ret = AudioAPI.SetParam(hCodec, VO_PID_AMRWB_DTX, &allow_dtx);

+

+	if(frameType == VOAMRWB_RFC3267)

+	{

+		/* write RFC3267 Header info to indicate single channel AMR file storage format */

+		size1 = (int)strlen(VOAMRWB_RFC3267_HEADER_INFO);

+		memcpy(outBuf, VOAMRWB_RFC3267_HEADER_INFO, size1);

+		outBuf += size1;

+	}

+

+	//#######################################   Encoding Section   #########################################

+	printf(" \n ---------------- Running -------------------------\n ");

+

+	do{

+		inData.Buffer = (unsigned char *)inBuf;

+		inData.Length = Relens;

+		outData.Buffer = outBuf;

+

+		start = clock();

+

+		/* decode one amr block */

+		returnCode = AudioAPI.SetInputData(hCodec,&inData);

+

+		do {

+			returnCode = AudioAPI.GetOutputData(hCodec,&outData, &outFormat);

+			if(returnCode == 0)

+			{

+				framenum++;

+				printf(" Frames processed: %hd\r", framenum);

+				if(framenum == 1)

+				{

+					fwrite(OutputBuf, 1, outData.Length + size1, fdst);

+					fflush(fdst);	

+				}

+				else

+				{

+					fwrite(outData.Buffer, 1, outData.Length, fdst);

+					fflush(fdst);

+				}

+			}

+			else if(returnCode == VO_ERR_LICENSE_ERROR)

+			{

+		        printf("Encoder time reach upper limit......");

+		        goto safe_exit;

+			}

+		} while(returnCode != VO_ERR_INPUT_BUFFER_SMALL);

+

+		finish = clock();

+		duration += finish - start;

+

+		if (!eofFile) {

+			Relens = GetNextBuf(fsrc, InputBuf, INPUT_SIZE);

+			inBuf = InputBuf;

+			if (feof(fsrc) && Relens == 0)

+				eofFile = 1;

+		}

+	} while (!eofFile && returnCode);

+	//#######################################   End Encoding Section   #########################################

+

+safe_exit:

+	returnCode = AudioAPI.Uninit(hCodec);

+

+	printf( "\n%2.5f seconds\n", (double)duration/CLOCKS_PER_SEC);

+

+	if (fsrc)

+		fclose(fsrc);

+	if (fdst)

+		fclose(fdst);

+

+#ifdef LINUX

+	dlclose(handle);

+#endif

+

+	return ret;

+}

+

+int main(int argc, char **argv)  // for gcc compiler;

+{

+	int     mode, r;

+	int     arg, filename=0;

+	char    *inFileName = NULL;

+	char    *outFileName = NULL;

+	short   allow_dtx;

+	VOAMRWBFRAMETYPE frameType;

+

+	printf("\n");

+	printf("************************Adaptive Multi-Rate Wide Band Encoder (AMR-WB)*******************************\n");

+	printf("***********************************DEFINITIONS:*******************************************************\n");

+	printf("AMR-WB encoder scheme is based on the principle of Algebraic Code Excited Linear Prediction algorithm\n");

+	printf("The AMR-WB encoder compression MONO liner PCM speech input data at 16kHz sampling rate\n");

+	printf("to one of nine data rate modes-6.60, 8.85, 12.65, 14.25, 15.85, 18.25, 19.25, 23.05 and 23.85kbps.\n");

+	printf("The encoder supports output format AMRWB ITU, AMRWB RFC3267.\n");

+	printf("\n");

+

+	/*Encoder Default setting */

+	mode = VOAMRWB_MD2385;

+	allow_dtx = 0;

+	frameType = VOAMRWB_RFC3267;

+

+	if(argc < 3){

+		usage();

+		return 0;

+	}else{

+		for (arg = 1; arg < argc; arg++) {

+			if (argv [arg] [0] == '+') {

+				if(argv[arg][1] == 'M')

+				{

+					switch(argv[arg][2])

+					{

+					case '0': mode = VOAMRWB_MD66;

+						break;

+					case '1': mode = VOAMRWB_MD885;

+						break;

+					case '2': mode = VOAMRWB_MD1265;

+						break;

+					case '3': mode = VOAMRWB_MD1425;

+						break;

+					case '4': mode = VOAMRWB_MD1585;

+						break;

+					case '5': mode = VOAMRWB_MD1825;

+						break;

+					case '6': mode = VOAMRWB_MD1985;

+						break;

+					case '7': mode = VOAMRWB_MD2305;

+						break;

+					case '8': mode = VOAMRWB_MD2385;

+						break;

+					default:

+						usage();

+						printf ("Invalid parameter '%s'.\n", argv [arg]);

+						break;

+					}

+				}else if(argv[arg][1] == 'F')

+				{

+					switch(argv[arg][2])

+					{

+					case '0': frameType = VOAMRWB_DEFAULT;

+						break;

+					case '1': frameType = VOAMRWB_ITU;

+						break;

+					case '2': frameType = VOAMRWB_RFC3267 ;

+						break; 

+					default:

+						usage();

+						printf ("Invalid parameter '%s'.\n", argv [arg]);

+						break;

+

+

+					}

+				}else if(strcmp (argv[arg], "+DTX") == 0)

+				{

+					allow_dtx = 1;

+				}

+

+			} else {

+				switch (filename) {

+						case 0: 

+							inFileName  = argv[arg];

+							break;

+						case 1: 

+							outFileName = argv[arg]; 

+							break;

+						default:

+							usage ();

+							fprintf (stderr, "Invalid parameter '%s'.\n", argv [arg]);

+							return 0;

+				}

+				filename++;

+			}

+		}

+	}

+

+	r = encode(mode, allow_dtx, frameType, inFileName, outFileName);

+	if(r)

+	{

+		fprintf(stderr, "error: %d\n", r);

+	}

+	return r;

+}

+

diff --git a/media/libstagefright/codecs/amrwbenc/SampleCode/Android.mk b/media/libstagefright/codecs/amrwbenc/SampleCode/Android.mk
new file mode 100644
index 0000000..7edb166
--- /dev/null
+++ b/media/libstagefright/codecs/amrwbenc/SampleCode/Android.mk
@@ -0,0 +1,27 @@
+LOCAL_PATH := $(call my-dir)
+include $(CLEAR_VARS)
+
+LOCAL_SRC_FILES := 	AMRWB_E_SAMPLE.c
+	
+LOCAL_SRC_FILES += 	\
+	../../../Common/cmnMemory.c 
+
+LOCAL_MODULE := TestvoAMRWBEnc
+
+LOCAL_ARM_MODE := arm
+
+LOCAL_STATIC_LIBRARIES := 
+
+LOCAL_SHARED_LIBRARIES := libvoAMRWBEnc
+
+LOCAL_C_INCLUDES := \
+	$(LOCAL_PATH)/ \
+	$(LOCAL_PATH)/../../../Common \
+	$(LOCAL_PATH)/../../../Include \
+
+LOCAL_CFLAGS := $(VO_CFLAGS)
+	
+include $(BUILD_EXECUTABLE)
+
+
+
diff --git a/media/libstagefright/codecs/amrwbenc/SampleCode/eclair/Makefile b/media/libstagefright/codecs/amrwbenc/SampleCode/eclair/Makefile
new file mode 100644
index 0000000..55b876a
--- /dev/null
+++ b/media/libstagefright/codecs/amrwbenc/SampleCode/eclair/Makefile
@@ -0,0 +1,56 @@
+#/*

+# ** Copyright 2003-2010, VisualOn, Inc.

+# **

+# ** Licensed under the Apache License, Version 2.0 (the "License");

+# ** you may not use this file except in compliance with the License.

+# ** You may obtain a copy of the License at

+# **

+# **     http://www.apache.org/licenses/LICENSE-2.0

+# **

+# ** Unless required by applicable law or agreed to in writing, software

+# ** distributed under the License is distributed on an "AS IS" BASIS,

+# ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

+# ** See the License for the specific language governing permissions and

+# ** limitations under the License.

+# */

+

+# target6

+# available: pc, v4(armv4), v5(armv5), v5x(armv5 xscale), v6(armv6), v7(cortex-a8 neon)

+VOTT:= v6

+

+

+# module type

+# please specify the type of your module: lib or exe

+VOMT:= exe

+

+

+# module macros

+# please append the additional macro definitions here for your module if necessary. 

+# e.g. -DVISUALON, macro VISUALON defined for your module 

+VOMM:= #ARMV5E

+

+

+

+# please specify the name of your module

+VOTARGET:= voAMRWBEnc_Test

+

+

+# please modify here to be sure to see the g1.mk

+include ../../../../Tools/eclair.mk 

+

+# dependent libraries.

+VODEPLIBS:=-ldl

+

+

+# module source

+# please modify here to be sure to see the ms.mk which specifies all source info of your module

+include ../ms.mk

+

+

+# please specify where is the voRelease on your PC, relative path is suggested

+VORELDIR:=../

+

+

+# please modify here to be sure to see the doit.mk

+include ../../../../Tools/doit.mk 

+

diff --git a/media/libstagefright/codecs/amrwbenc/SampleCode/ms.mk b/media/libstagefright/codecs/amrwbenc/SampleCode/ms.mk
new file mode 100644
index 0000000..74e8913
--- /dev/null
+++ b/media/libstagefright/codecs/amrwbenc/SampleCode/ms.mk
@@ -0,0 +1,24 @@
+#/*

+# ** Copyright 2003-2010, VisualOn, Inc.

+# **

+# ** Licensed under the Apache License, Version 2.0 (the "License");

+# ** you may not use this file except in compliance with the License.

+# ** You may obtain a copy of the License at

+# **

+# **     http://www.apache.org/licenses/LICENSE-2.0

+# **

+# ** Unless required by applicable law or agreed to in writing, software

+# ** distributed under the License is distributed on an "AS IS" BASIS,

+# ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

+# ** See the License for the specific language governing permissions and

+# ** limitations under the License.

+# */

+# please list all objects needed by your target here

+OBJS:=AMRWB_E_SAMPLE.o cmnMemory.o

+			

+# please list all directories that all source files relative with your module(.h .c .cpp) locate 

+VOSRCDIR:=../ \

+          ../../../../Common \

+	  ../../../../Include

+					

+				

diff --git a/media/libstagefright/codecs/amrwbenc/build/eclair/ARMV5E/Makefile b/media/libstagefright/codecs/amrwbenc/build/eclair/ARMV5E/Makefile
new file mode 100644
index 0000000..58fda29
--- /dev/null
+++ b/media/libstagefright/codecs/amrwbenc/build/eclair/ARMV5E/Makefile
@@ -0,0 +1,53 @@
+#/*

+# ** Copyright 2003-2010, VisualOn, Inc.

+# **

+# ** Licensed under the Apache License, Version 2.0 (the "License");

+# ** you may not use this file except in compliance with the License.

+# ** You may obtain a copy of the License at

+# **

+# **     http://www.apache.org/licenses/LICENSE-2.0

+# **

+# ** Unless required by applicable law or agreed to in writing, software

+# ** distributed under the License is distributed on an "AS IS" BASIS,

+# ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

+# ** See the License for the specific language governing permissions and

+# ** limitations under the License.

+# */

+

+# target type

+# available: pc, v4(armv4), v5(armv5), v5x(armv5 xscale), v6(armv6), v7(cortex-a8 neon)

+VOTT:= v5

+

+

+# module type

+# please specify the type of your module: lib or exe

+VOMT:= lib

+

+

+# module macros

+# please append the additional macro definitions here for your module if necessary. 

+ifeq ($(VOTT), v5)

+VOMM:=-DARM -DASM_OPT

+endif

+

+# please specify the name of your module

+VOTARGET:= libvoAMRWBEncv5

+

+

+# please modify here to be sure to see the g1.mk

+include ../../../../../Tools/eclair.mk 

+

+# dependent libraries.

+VODEPLIBS:=-ldl -lstdc++ -lcutils

+

+# module source

+# please modify here to be sure to see the ms.mk which specifies all source info of your module

+include ../ms.mk

+

+

+# please specify where is the voRelease on your PC, relative path is suggested

+VORELDIR:=../../../../../../Release

+

+# please modify here to be sure to see the doit.mk

+include ../../../../../Tools/doit.mk 

+

diff --git a/media/libstagefright/codecs/amrwbenc/build/eclair/ARMV7/Makefile b/media/libstagefright/codecs/amrwbenc/build/eclair/ARMV7/Makefile
new file mode 100644
index 0000000..5686411
--- /dev/null
+++ b/media/libstagefright/codecs/amrwbenc/build/eclair/ARMV7/Makefile
@@ -0,0 +1,53 @@
+#/*

+# ** Copyright 2003-2010, VisualOn, Inc.

+# **

+# ** Licensed under the Apache License, Version 2.0 (the "License");

+# ** you may not use this file except in compliance with the License.

+# ** You may obtain a copy of the License at

+# **

+# **     http://www.apache.org/licenses/LICENSE-2.0

+# **

+# ** Unless required by applicable law or agreed to in writing, software

+# ** distributed under the License is distributed on an "AS IS" BASIS,

+# ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

+# ** See the License for the specific language governing permissions and

+# ** limitations under the License.

+# */

+

+# target type

+# available: pc, v4(armv4), v5(armv5), v5x(armv5 xscale), v6(armv6), v7(cortex-a8 neon)

+VOTT:= v7

+

+

+# module type

+# please specify the type of your module: lib or exe

+VOMT:= lib

+

+

+# module macros

+# please append the additional macro definitions here for your module if necessary. 

+ifeq ($(VOTT), v7)

+VOMM:=-DARM -DARMV7 -DASM_OPT

+endif

+

+# please specify the name of your module

+VOTARGET:= libvoAMRWBEncv7

+

+

+# please modify here to be sure to see the g1.mk

+include ../../../../../Tools/eclair.mk 

+

+# dependent libraries.

+VODEPLIBS:=-ldl -lstdc++ -lcutils

+

+# module source

+# please modify here to be sure to see the ms.mk which specifies all source info of your module

+include ../ms.mk

+

+

+# please specify where is the voRelease on your PC, relative path is suggested

+VORELDIR:=../../../../../../Release

+

+# please modify here to be sure to see the doit.mk

+include ../../../../../Tools/doit.mk 

+

diff --git a/media/libstagefright/codecs/amrwbenc/build/eclair/makefile b/media/libstagefright/codecs/amrwbenc/build/eclair/makefile
new file mode 100644
index 0000000..3473a1a
--- /dev/null
+++ b/media/libstagefright/codecs/amrwbenc/build/eclair/makefile
@@ -0,0 +1,39 @@
+#/*
+# ** Copyright 2003-2010, VisualOn, Inc.
+# **
+# ** Licensed under the Apache License, Version 2.0 (the "License");
+# ** you may not use this file except in compliance with the License.
+# ** You may obtain a copy of the License at
+# **
+# **     http://www.apache.org/licenses/LICENSE-2.0
+# **
+# ** Unless required by applicable law or agreed to in writing, software
+# ** distributed under the License is distributed on an "AS IS" BASIS,
+# ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# ** See the License for the specific language governing permissions and
+# ** limitations under the License.
+# */
+# Just acting as Father Makefile of Modules
+# please keep the name 'makefile' unchanged
+ 
+# Module Subdirs
+VOMSD:=$(dir $(shell find . -name 'Makefile'))
+
+all:
+	for dir in $(VOMSD); \
+		do \
+			$(MAKE) -C $$dir; \
+		done
+
+.PHONY:clean devel
+clean:
+	for dir in $(VOMSD); \
+		do \
+			$(MAKE) -C $$dir clean; \
+		done
+
+devel:
+	for dir in $(VOMSD); \
+		do \
+			$(MAKE) -C $$dir devel; \
+		done
diff --git a/media/libstagefright/codecs/amrwbenc/build/eclair/ms.mk b/media/libstagefright/codecs/amrwbenc/build/eclair/ms.mk
new file mode 100644
index 0000000..bd6620c
--- /dev/null
+++ b/media/libstagefright/codecs/amrwbenc/build/eclair/ms.mk
@@ -0,0 +1,43 @@
+#/*

+# ** Copyright 2003-2010, VisualOn, Inc.

+# **

+# ** Licensed under the Apache License, Version 2.0 (the "License");

+# ** you may not use this file except in compliance with the License.

+# ** You may obtain a copy of the License at

+# **

+# **     http://www.apache.org/licenses/LICENSE-2.0

+# **

+# ** Unless required by applicable law or agreed to in writing, software

+# ** distributed under the License is distributed on an "AS IS" BASIS,

+# ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

+# ** See the License for the specific language governing permissions and

+# ** limitations under the License.

+# */

+# please list all directories that all source files relative with your module(.h .c .cpp) locate 

+VOSRCDIR:=../../../inc \

+          ../../../src \

+	  ../../../../../Include 

+

+# please list all objects needed by your target here

+OBJS:= autocorr.o az_isp.o bits.o c2t64fx.o c4t64fx.o convolve.o cor_h_x.o decim54.o \

+       deemph.o dtx.o g_pitch.o gpclip.o homing.o hp400.o hp50.o hp6k.o hp_wsp.o \

+       int_lpc.o isp_az.o isp_isf.o lag_wind.o levinson.o log2.o lp_dec2.o math_op.o mem_align.o \

+       oper_32b.o p_med_ol.o pit_shrp.o pitch_f4.o pred_lt4.o preemph.o q_gain2.o q_pulse.o \

+       qisf_ns.o qpisf_2s.o random.o residu.o scale.o stream.o syn_filt.o updt_tar.o util.o \

+       voAMRWBEnc.o voicefac.o wb_vad.o weight_a.o

+			

+

+ifeq ($(VOTT), v5)

+OBJS += cor_h_vec_opt.o Deemph_32_opt.o Dot_p_opt.o Filt_6k_7k_opt.o residu_asm_opt.o \

+       scale_sig_opt.o Syn_filt_32_opt.o syn_filt_opt.o pred_lt4_1_opt.o convolve_opt.o \

+       Norm_Corr_opt.o

+VOSRCDIR+= ../../../src/asm/ARMV5E

+endif

+

+ifeq ($(VOTT), v7)

+OBJS+= cor_h_vec_neon.o Deemph_32_neon.o Dot_p_neon.o Filt_6k_7k_neon.o residu_asm_neon.o \

+       scale_sig_neon.o Syn_filt_32_neon.o syn_filt_neon.o pred_lt4_1_neon.o convolve_neon.o \

+       Norm_Corr_neon.o

+VOSRCDIR+= ../../../src/asm/ARMV7

+endif

+

diff --git a/media/libstagefright/codecs/amrwbenc/doc/voAMRWBEncoderSDK.pdf b/media/libstagefright/codecs/amrwbenc/doc/voAMRWBEncoderSDK.pdf
new file mode 100644
index 0000000..5bade44
--- /dev/null
+++ b/media/libstagefright/codecs/amrwbenc/doc/voAMRWBEncoderSDK.pdf
Binary files differ
diff --git a/media/libstagefright/codecs/amrwbenc/inc/acelp.h b/media/libstagefright/codecs/amrwbenc/inc/acelp.h
new file mode 100644
index 0000000..4cb38a1
--- /dev/null
+++ b/media/libstagefright/codecs/amrwbenc/inc/acelp.h
@@ -0,0 +1,521 @@
+/*

+ ** Copyright 2003-2010, VisualOn, Inc.

+ **

+ ** Licensed under the Apache License, Version 2.0 (the "License");

+ ** you may not use this file except in compliance with the License.

+ ** You may obtain a copy of the License at

+ **

+ **     http://www.apache.org/licenses/LICENSE-2.0

+ **

+ ** Unless required by applicable law or agreed to in writing, software

+ ** distributed under the License is distributed on an "AS IS" BASIS,

+ ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

+ ** See the License for the specific language governing permissions and

+ ** limitations under the License.

+ */

+

+

+/*--------------------------------------------------------------------------*

+ *                         ACELP.H                                          *

+ *--------------------------------------------------------------------------*

+ *       Function			 			             *

+ *--------------------------------------------------------------------------*/

+#ifndef __ACELP_H__

+#define __ACELP_H__

+

+#include "typedef.h"

+#include "cod_main.h"

+

+/*-----------------------------------------------------------------*

+ *                        LPC prototypes                           *

+ *-----------------------------------------------------------------*/

+

+Word16 median5(Word16 x[]);

+

+void Autocorr(

+		Word16 x[],                           /* (i)    : Input signal                      */

+		Word16 m,                             /* (i)    : LPC order                         */

+		Word16 r_h[],                         /* (o)    : Autocorrelations  (msb)           */

+		Word16 r_l[]                          /* (o)    : Autocorrelations  (lsb)           */

+	     );

+

+void Lag_window(

+		Word16 r_h[],                         /* (i/o)   : Autocorrelations  (msb)          */

+		Word16 r_l[]                          /* (i/o)   : Autocorrelations  (lsb)          */

+	       );

+

+void Init_Levinson(

+		Word16 * mem                          /* output  :static memory (18 words) */

+		);

+

+void Levinson(

+		Word16 Rh[],                          /* (i)     : Rh[M+1] Vector of autocorrelations (msb) */

+		Word16 Rl[],                          /* (i)     : Rl[M+1] Vector of autocorrelations (lsb) */

+		Word16 A[],                           /* (o) Q12 : A[M]    LPC coefficients  (m = 16)       */

+		Word16 rc[],                          /* (o) Q15 : rc[M]   Reflection coefficients.         */

+		Word16 * mem                          /* (i/o)   :static memory (18 words)                  */

+	     );

+

+void Az_isp(

+		Word16 a[],                           /* (i) Q12 : predictor coefficients                 */

+		Word16 isp[],                         /* (o) Q15 : Immittance spectral pairs              */

+		Word16 old_isp[]                      /* (i)     : old isp[] (in case not found M roots)  */

+	   );

+

+void Isp_Az(

+		Word16 isp[],                         /* (i) Q15 : Immittance spectral pairs            */

+		Word16 a[],                           /* (o) Q12 : predictor coefficients (order = M)   */

+		Word16 m,

+		Word16 adaptive_scaling               /* (i) 0   : adaptive scaling disabled */

+		/*     1   : adaptive scaling enabled  */

+	   );

+

+void Isp_isf(

+		Word16 isp[],                         /* (i) Q15 : isp[m] (range: -1<=val<1)                */

+		Word16 isf[],                         /* (o) Q15 : isf[m] normalized (range: 0.0<=val<=0.5) */

+		Word16 m                              /* (i)     : LPC order                                */

+	    );

+

+void Isf_isp(

+		Word16 isf[],                         /* (i) Q15 : isf[m] normalized (range: 0.0<=val<=0.5) */

+		Word16 isp[],                         /* (o) Q15 : isp[m] (range: -1<=val<1)                */

+		Word16 m                              /* (i)     : LPC order                                */

+	    );

+

+void Int_isp(

+		Word16 isp_old[],                     /* input : isps from past frame              */

+		Word16 isp_new[],                     /* input : isps from present frame           */

+		Word16 frac[],                        /* input : fraction for 3 first subfr (Q15)  */

+		Word16 Az[]                           /* output: LP coefficients in 4 subframes    */

+	    );

+

+void Weight_a(

+		Word16 a[],                           /* (i) Q12 : a[m+1]  LPC coefficients             */

+		Word16 ap[],                          /* (o) Q12 : Spectral expanded LPC coefficients   */

+		Word16 gamma,                         /* (i) Q15 : Spectral expansion factor.           */

+		Word16 m                              /* (i)     : LPC order.                           */

+	     );

+

+

+/*-----------------------------------------------------------------*

+ *                        isf quantizers                           *

+ *-----------------------------------------------------------------*/

+

+void Qpisf_2s_46b(

+		Word16 * isf1,                        /* (i) Q15 : ISF in the frequency domain (0..0.5) */

+		Word16 * isf_q,                       /* (o) Q15 : quantized ISF               (0..0.5) */

+		Word16 * past_isfq,                   /* (io)Q15 : past ISF quantizer                   */

+		Word16 * indice,                      /* (o)     : quantization indices                 */

+		Word16 nb_surv                        /* (i)     : number of survivor (1, 2, 3 or 4)    */

+		);

+

+void Qpisf_2s_36b(

+		Word16 * isf1,                        /* (i) Q15 : ISF in the frequency domain (0..0.5) */

+		Word16 * isf_q,                       /* (o) Q15 : quantized ISF               (0..0.5) */

+		Word16 * past_isfq,                   /* (io)Q15 : past ISF quantizer                   */

+		Word16 * indice,                      /* (o)     : quantization indices                 */

+		Word16 nb_surv                        /* (i)     : number of survivor (1, 2, 3 or 4)    */

+		);

+

+void Dpisf_2s_46b(

+		Word16 * indice,                      /* input:  quantization indices                       */

+		Word16 * isf_q,                       /* output: quantized ISF in frequency domain (0..0.5) */

+		Word16 * past_isfq,                   /* i/0   : past ISF quantizer                    */

+		Word16 * isfold,                      /* input : past quantized ISF                    */

+		Word16 * isf_buf,                     /* input : isf buffer                                                        */

+		Word16 bfi,                           /* input : Bad frame indicator                   */

+		Word16 enc_dec

+		);

+

+void Dpisf_2s_36b(

+		Word16 * indice,                      /* input:  quantization indices                       */

+		Word16 * isf_q,                       /* output: quantized ISF in frequency domain (0..0.5) */

+		Word16 * past_isfq,                   /* i/0   : past ISF quantizer                    */

+		Word16 * isfold,                      /* input : past quantized ISF                    */

+		Word16 * isf_buf,                     /* input : isf buffer                                                        */

+		Word16 bfi,                           /* input : Bad frame indicator                   */

+		Word16 enc_dec

+		);

+

+void Qisf_ns(

+		Word16 * isf1,                        /* input : ISF in the frequency domain (0..0.5) */

+		Word16 * isf_q,                       /* output: quantized ISF                        */

+		Word16 * indice                       /* output: quantization indices                 */

+	    );

+

+void Disf_ns(

+		Word16 * indice,                      /* input:  quantization indices                  */

+		Word16 * isf_q                        /* input : ISF in the frequency domain (0..0.5)  */

+	    );

+

+Word16 Sub_VQ(                             /* output: return quantization index     */

+		Word16 * x,                           /* input : ISF residual vector           */

+		Word16 * dico,                        /* input : quantization codebook         */

+		Word16 dim,                           /* input : dimention of vector           */

+		Word16 dico_size,                     /* input : size of quantization codebook */

+		Word32 * distance                     /* output: error of quantization         */

+	     );

+

+void Reorder_isf(

+		Word16 * isf,                         /* (i/o) Q15: ISF in the frequency domain (0..0.5) */

+		Word16 min_dist,                      /* (i) Q15  : minimum distance to keep             */

+		Word16 n                              /* (i)      : number of ISF                        */

+		);

+

+/*-----------------------------------------------------------------*

+ *                       filter prototypes                         *

+ *-----------------------------------------------------------------*/

+

+void Init_Decim_12k8(

+		Word16 mem[]                          /* output: memory (2*NB_COEF_DOWN) set to zeros */

+		);

+void Decim_12k8(

+		Word16 sig16k[],                      /* input:  signal to downsampling  */

+		Word16 lg,                            /* input:  length of input         */

+		Word16 sig12k8[],                     /* output: decimated signal        */

+		Word16 mem[]                          /* in/out: memory (2*NB_COEF_DOWN) */

+	       );

+

+void Init_HP50_12k8(Word16 mem[]);

+void HP50_12k8(

+		Word16 signal[],                      /* input/output signal */

+		Word16 lg,                            /* lenght of signal    */

+		Word16 mem[]                          /* filter memory [6]   */

+	      );

+void Init_HP400_12k8(Word16 mem[]);

+void HP400_12k8(

+		Word16 signal[],                      /* input/output signal */

+		Word16 lg,                            /* lenght of signal    */

+		Word16 mem[]                          /* filter memory [6]   */

+	       );

+

+void Init_Filt_6k_7k(Word16 mem[]);

+void Filt_6k_7k(

+		Word16 signal[],                      /* input:  signal                  */

+		Word16 lg,                            /* input:  length of input         */

+		Word16 mem[]                          /* in/out: memory (size=30)        */

+	       );

+void Filt_6k_7k_asm(

+		Word16 signal[],                      /* input:  signal                  */

+		Word16 lg,                            /* input:  length of input         */

+		Word16 mem[]                          /* in/out: memory (size=30)        */

+	       );

+

+void LP_Decim2(

+		Word16 x[],                           /* in/out: signal to process         */

+		Word16 l,                             /* input : size of filtering         */

+		Word16 mem[]                          /* in/out: memory (size=3)           */

+	      );

+

+void Preemph(

+		Word16 x[],                           /* (i/o)   : input signal overwritten by the output */

+		Word16 mu,                            /* (i) Q15 : preemphasis coefficient                */

+		Word16 lg,                            /* (i)     : lenght of filtering                    */

+		Word16 * mem                          /* (i/o)   : memory (x[-1])                         */

+	    );

+void Preemph2(

+		Word16 x[],                           /* (i/o)   : input signal overwritten by the output */

+		Word16 mu,                            /* (i) Q15 : preemphasis coefficient                */

+		Word16 lg,                            /* (i)     : lenght of filtering                    */

+		Word16 * mem                          /* (i/o)   : memory (x[-1])                         */

+	     );

+void Deemph(

+		Word16 x[],                           /* (i/o)   : input signal overwritten by the output */

+		Word16 mu,                            /* (i) Q15 : deemphasis factor                      */

+		Word16 L,                             /* (i)     : vector size                            */

+		Word16 * mem                          /* (i/o)   : memory (y[-1])                         */

+	   );

+void Deemph2(

+		Word16 x[],                           /* (i/o)   : input signal overwritten by the output */

+		Word16 mu,                            /* (i) Q15 : deemphasis factor                      */

+		Word16 L,                             /* (i)     : vector size                            */

+		Word16 * mem                          /* (i/o)   : memory (y[-1])                         */

+	    );

+void Deemph_32(

+		Word16 x_hi[],                        /* (i)     : input signal (bit31..16) */

+		Word16 x_lo[],                        /* (i)     : input signal (bit15..4)  */

+		Word16 y[],                           /* (o)     : output signal (x16)      */

+		Word16 mu,                            /* (i) Q15 : deemphasis factor        */

+		Word16 L,                             /* (i)     : vector size              */

+		Word16 * mem                          /* (i/o)   : memory (y[-1])           */

+	      );

+

+void Deemph_32_asm(

+		Word16 x_hi[],                        /* (i)     : input signal (bit31..16) */

+		Word16 x_lo[],                        /* (i)     : input signal (bit15..4)  */

+		Word16 y[],                           /* (o)     : output signal (x16)      */

+		Word16 * mem                          /* (i/o)   : memory (y[-1])           */

+	      );

+

+void Convolve(

+		Word16 x[],                           /* (i)     : input vector                              */

+		Word16 h[],                           /* (i) Q15    : impulse response                       */

+		Word16 y[],                           /* (o) 12 bits: output vector                          */

+		Word16 L                              /* (i)     : vector size                               */

+	     );

+

+void Convolve_asm(

+		Word16 x[],                           /* (i)     : input vector                              */

+		Word16 h[],                           /* (i) Q15    : impulse response                       */

+		Word16 y[],                           /* (o) 12 bits: output vector                          */

+		Word16 L                              /* (i)     : vector size                               */

+	     );

+

+void Residu(

+		Word16 a[],                           /* (i) Q12 : prediction coefficients                     */

+		Word16 x[],                           /* (i)     : speech (values x[-m..-1] are needed         */

+		Word16 y[],                           /* (o)     : residual signal                             */

+		Word16 lg                             /* (i)     : size of filtering                           */

+		);

+

+void Residu_opt(

+		Word16 a[],                           /* (i) Q12 : prediction coefficients                     */

+		Word16 x[],                           /* (i)     : speech (values x[-m..-1] are needed         */

+		Word16 y[],                           /* (o)     : residual signal                             */

+		Word16 lg                             /* (i)     : size of filtering                           */

+		);

+

+void Syn_filt(

+	Word16 a[],                           /* (i) Q12 : a[m+1] prediction coefficients           */

+	Word16 x[],                           /* (i)     : input signal                             */

+	Word16 y[],                           /* (o)     : output signal                            */

+	Word16 lg,                            /* (i)     : size of filtering                        */

+	Word16 mem[],                         /* (i/o)   : memory associated with this filtering.   */

+	Word16 update                         /* (i)     : 0=no update, 1=update of memory.         */

+	);

+

+void Syn_filt_asm(

+	Word16 a[],                           /* (i) Q12 : a[m+1] prediction coefficients           */

+	Word16 x[],                           /* (i)     : input signal                             */

+	Word16 y[],                           /* (o)     : output signal                            */

+	Word16 mem[]                          /* (i/o)   : memory associated with this filtering.   */

+	);

+

+void Syn_filt_32(

+	Word16 a[],                           /* (i) Q12 : a[m+1] prediction coefficients */

+	Word16 m,                             /* (i)     : order of LP filter             */

+	Word16 exc[],                         /* (i) Qnew: excitation (exc[i] >> Qnew)    */

+	Word16 Qnew,                          /* (i)     : exc scaling = 0(min) to 8(max) */

+	Word16 sig_hi[],                      /* (o) /16 : synthesis high                 */

+	Word16 sig_lo[],                      /* (o) /16 : synthesis low                  */

+	Word16 lg                             /* (i)     : size of filtering              */

+	);

+

+void Syn_filt_32_asm(

+	Word16 a[],                           /* (i) Q12 : a[m+1] prediction coefficients */

+	Word16 m,                             /* (i)     : order of LP filter             */

+	Word16 exc[],                         /* (i) Qnew: excitation (exc[i] >> Qnew)    */

+	Word16 Qnew,                          /* (i)     : exc scaling = 0(min) to 8(max) */

+	Word16 sig_hi[],                      /* (o) /16 : synthesis high                 */

+	Word16 sig_lo[],                      /* (o) /16 : synthesis low                  */

+	Word16 lg                             /* (i)     : size of filtering              */

+	);

+/*-----------------------------------------------------------------*

+ *                       pitch prototypes                          *

+ *-----------------------------------------------------------------*/

+

+Word16 Pitch_ol(                           /* output: open loop pitch lag                        */

+     Word16 signal[],                      /* input : signal used to compute the open loop pitch */

+/* signal[-pit_max] to signal[-1] should be known */

+     Word16 pit_min,                       /* input : minimum pitch lag                          */

+     Word16 pit_max,                       /* input : maximum pitch lag                          */

+     Word16 L_frame                        /* input : length of frame to compute pitch           */

+);

+

+Word16 Pitch_med_ol(                       /* output: open loop pitch lag                        */

+     Word16 wsp[],                         /* input : signal used to compute the open loop pitch */

+                                           /* wsp[-pit_max] to wsp[-1] should be known   */

+     Coder_State *st,                      /* i/o : global codec structure */

+     Word16 L_frame                        /* input : length of frame to compute pitch           */

+);

+

+Word16 Med_olag(                           /* output : median of  5 previous open-loop lags       */

+     Word16 prev_ol_lag,                   /* input  : previous open-loop lag                     */

+     Word16 old_ol_lag[5]

+);

+

+void Init_Hp_wsp(Word16 mem[]);

+void scale_mem_Hp_wsp(Word16 mem[], Word16 exp);

+void Hp_wsp(

+     Word16 wsp[],                         /* i   : wsp[]  signal       */

+     Word16 hp_wsp[],                      /* o   : hypass wsp[]        */

+     Word16 lg,                            /* i   : lenght of signal    */

+     Word16 mem[]                          /* i/o : filter memory [9]   */

+);

+

+Word16 Pitch_fr4(                          /* (o)     : pitch period.                         */

+     Word16 exc[],                         /* (i)     : excitation buffer                     */

+     Word16 xn[],                          /* (i)     : target vector                         */

+     Word16 h[],                           /* (i) Q15 : impulse response of synth/wgt filters */

+     Word16 t0_min,                        /* (i)     : minimum value in the searched range.  */

+     Word16 t0_max,                        /* (i)     : maximum value in the searched range.  */

+     Word16 * pit_frac,                    /* (o)     : chosen fraction (0, 1, 2 or 3).       */

+     Word16 i_subfr,                       /* (i)     : indicator for first subframe.         */

+     Word16 t0_fr2,                        /* (i)     : minimum value for resolution 1/2      */

+     Word16 t0_fr1,                        /* (i)     : minimum value for resolution 1        */

+     Word16 L_subfr                        /* (i)     : Length of subframe                    */

+);

+void Pred_lt4(

+     Word16 exc[],                         /* in/out: excitation buffer */

+     Word16 T0,                            /* input : integer pitch lag */

+     Word16 frac,                          /* input : fraction of lag   */

+     Word16 L_subfr                        /* input : subframe size     */

+);

+

+void pred_lt4_asm(

+     Word16 exc[],                         /* in/out: excitation buffer */

+     Word16 T0,                            /* input : integer pitch lag */

+     Word16 frac,                          /* input : fraction of lag   */

+     Word16 L_subfr                        /* input : subframe size     */

+);

+

+/*-----------------------------------------------------------------*

+ *                       gain prototypes                           *

+ *-----------------------------------------------------------------*/

+

+Word16 G_pitch(                            /* (o) Q14 : Gain of pitch lag saturated to 1.2   */

+     Word16 xn[],                          /* (i)     : Pitch target.                        */

+     Word16 y1[],                          /* (i)     : filtered adaptive codebook.          */

+     Word16 g_coeff[],                     /* : Correlations need for gain quantization. */

+     Word16 L_subfr                        /* : Length of subframe.                  */

+);

+void Init_Q_gain2(

+     Word16 * mem                          /* output  :static memory (2 words)      */

+);

+Word16 Q_gain2(                            /* Return index of quantization.        */

+     Word16 xn[],                          /* (i) Q_xn:Target vector.               */

+     Word16 y1[],                          /* (i) Q_xn:Adaptive codebook.           */

+     Word16 Q_xn,                          /* (i)     :xn and y1 format             */

+     Word16 y2[],                          /* (i) Q9  :Filtered innovative vector.  */

+     Word16 code[],                        /* (i) Q9  :Innovative vector.           */

+     Word16 g_coeff[],                     /* (i)     :Correlations <xn y1> <y1 y1> */

+/* Compute in G_pitch().        */

+     Word16 L_subfr,                       /* (i)     :Subframe lenght.             */

+     Word16 nbits,                         /* (i)     : number of bits (6 or 7)     */

+     Word16 * gain_pit,                    /* (i/o)Q14:Pitch gain.                  */

+     Word32 * gain_cod,                    /* (o) Q16 :Code gain.                   */

+     Word16 gp_clip,                       /* (i)     : Gp Clipping flag            */

+     Word16 * mem                          /* (i/o)   :static memory (2 words)      */

+);

+

+void Init_D_gain2(

+     Word16 * mem                          /* output  :static memory (4 words)      */

+);

+void D_gain2(

+     Word16 index,                         /* (i)     :index of quantization.       */

+     Word16 nbits,                         /* (i)     : number of bits (6 or 7)     */

+     Word16 code[],                        /* (i) Q9  :Innovative vector.           */

+     Word16 L_subfr,                       /* (i)     :Subframe lenght.             */

+     Word16 * gain_pit,                    /* (o) Q14 :Pitch gain.                  */

+     Word32 * gain_cod,                    /* (o) Q16 :Code gain.                   */

+     Word16 bfi,                           /* (i)     :bad frame indicator          */

+     Word16 prev_bfi,                      /* (i) : Previous BF indicator      */

+     Word16 state,                         /* (i) : State of BFH               */

+     Word16 unusable_frame,                /* (i) : UF indicator            */

+     Word16 vad_hist,                      /* (i)         :number of non-speech frames  */

+     Word16 * mem                          /* (i/o)   :static memory (4 words)      */

+);

+

+/*-----------------------------------------------------------------*

+ *                       acelp prototypes                          *

+ *-----------------------------------------------------------------*/

+

+void cor_h_x(

+     Word16 h[],                           /* (i) Q12 : impulse response of weighted synthesis filter */

+     Word16 x[],                           /* (i) Q0  : target vector                                 */

+     Word16 dn[]                           /* (o) <12bit : correlation between target and h[]         */

+);

+void ACELP_2t64_fx(

+     Word16 dn[],                          /* (i) <12b : correlation between target x[] and H[]      */

+     Word16 cn[],                          /* (i) <12b : residual after long term prediction         */

+     Word16 H[],                           /* (i) Q12: impulse response of weighted synthesis filter */

+     Word16 code[],                        /* (o) Q9 : algebraic (fixed) codebook excitation         */

+     Word16 y[],                           /* (o) Q9 : filtered fixed codebook excitation            */

+     Word16 * index                        /* (o) : index (12): 5+1+5+1 = 11 bits.                     */

+);

+

+void ACELP_4t64_fx(

+     Word16 dn[],                          /* (i) <12b : correlation between target x[] and H[]      */

+     Word16 cn[],                          /* (i) <12b : residual after long term prediction         */

+     Word16 H[],                           /* (i) Q12: impulse response of weighted synthesis filter */

+     Word16 code[],                        /* (o) Q9 : algebraic (fixed) codebook excitation         */

+     Word16 y[],                           /* (o) Q9 : filtered fixed codebook excitation            */

+     Word16 nbbits,                        /* (i) : 20, 36, 44, 52, 64, 72 or 88 bits                */

+     Word16 ser_size,                      /* (i) : bit rate                                         */

+     Word16 _index[]                       /* (o) : index (20): 5+5+5+5 = 20 bits.                   */

+					   /* (o) : index (36): 9+9+9+9 = 36 bits.                   */

+					   /* (o) : index (44): 13+9+13+9 = 44 bits.                 */

+					   /* (o) : index (52): 13+13+13+13 = 52 bits.               */

+					   /* (o) : index (64): 2+2+2+2+14+14+14+14 = 64 bits.       */

+					   /* (o) : index (72): 10+2+10+2+10+14+10+14 = 72 bits.     */

+					   /* (o) : index (88): 11+11+11+11+11+11+11+11 = 88 bits.   */

+);

+

+void Pit_shrp(

+     Word16 * x,                           /* in/out: impulse response (or algebraic code) */

+     Word16 pit_lag,                       /* input : pitch lag                            */

+     Word16 sharp,                         /* input : pitch sharpening factor (Q15)        */

+     Word16 L_subfr                        /* input : subframe size                        */

+);

+

+

+/*-----------------------------------------------------------------*

+ *                        others prototypes                        *

+ *-----------------------------------------------------------------*/

+

+void Copy(

+     Word16 x[],                           /* (i)   : input vector   */

+     Word16 y[],                           /* (o)   : output vector  */

+     Word16 L                              /* (i)   : vector length  */

+);

+void Set_zero(

+     Word16 x[],                           /* (o)    : vector to clear     */

+     Word16 L                              /* (i)    : length of vector    */

+);

+void Updt_tar(

+     Word16 * x,                           /* (i) Q0  : old target (for pitch search)     */

+     Word16 * x2,                          /* (o) Q0  : new target (for codebook search)  */

+     Word16 * y,                           /* (i) Q0  : filtered adaptive codebook vector */

+     Word16 gain,                          /* (i) Q14 : adaptive codebook gain            */

+     Word16 L                              /* (i)     : subframe size                     */

+);

+Word16 voice_factor(                       /* (o) Q15 : factor (-1=unvoiced to 1=voiced) */

+     Word16 exc[],                         /* (i) Q_exc: pitch excitation                */

+     Word16 Q_exc,                         /* (i)     : exc format                       */

+     Word16 gain_pit,                      /* (i) Q14 : gain of pitch                    */

+     Word16 code[],                        /* (i) Q9  : Fixed codebook excitation        */

+     Word16 gain_code,                     /* (i) Q0  : gain of code                     */

+     Word16 L_subfr                        /* (i)     : subframe length                  */

+);

+void Scale_sig(

+     Word16 x[],                           /* (i/o) : signal to scale               */

+     Word16 lg,                            /* (i)   : size of x[]                   */

+     Word16 exp                            /* (i)   : exponent: x = round(x << exp) */

+);

+

+void Scale_sig_opt(

+     Word16 x[],                           /* (i/o) : signal to scale               */

+     Word16 lg,                            /* (i)   : size of x[]                   */

+     Word16 exp                            /* (i)   : exponent: x = round(x << exp) */

+);

+

+Word16 Random(Word16 * seed);

+

+void Init_gp_clip(

+     Word16 mem[]                          /* (o) : memory of gain of pitch clipping algorithm */

+);

+Word16 Gp_clip(

+     Word16 mem[]                          /* (i/o) : memory of gain of pitch clipping algorithm */

+);

+void Gp_clip_test_isf(

+     Word16 isf[],                         /* (i)   : isf values (in frequency domain)           */

+     Word16 mem[]                          /* (i/o) : memory of gain of pitch clipping algorithm */

+);

+void Gp_clip_test_gain_pit(

+     Word16 gain_pit,                      /* (i)   : gain of quantized pitch                    */

+     Word16 mem[]                          /* (i/o) : memory of gain of pitch clipping algorithm */

+);

+

+

+#endif   //__ACELP_H__

+

diff --git a/media/libstagefright/codecs/amrwbenc/inc/basic_op.h b/media/libstagefright/codecs/amrwbenc/inc/basic_op.h
new file mode 100644
index 0000000..6a2f860
--- /dev/null
+++ b/media/libstagefright/codecs/amrwbenc/inc/basic_op.h
@@ -0,0 +1,1094 @@
+/*

+ ** Copyright 2003-2010, VisualOn, Inc.

+ **

+ ** Licensed under the Apache License, Version 2.0 (the "License");

+ ** you may not use this file except in compliance with the License.

+ ** You may obtain a copy of the License at

+ **

+ **     http://www.apache.org/licenses/LICENSE-2.0

+ **

+ ** Unless required by applicable law or agreed to in writing, software

+ ** distributed under the License is distributed on an "AS IS" BASIS,

+ ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

+ ** See the License for the specific language governing permissions and

+ ** limitations under the License.

+ */

+

+

+#ifndef __BASIC_OP_H__

+#define __BASIC_OP_H__

+

+#include <stdio.h>

+#include <stdlib.h>

+#include "typedef.h"

+

+#define MAX_32 (Word32)0x7fffffffL

+#define MIN_32 (Word32)0x80000000L

+

+#define MAX_16 (Word16)+32767	/* 0x7fff */

+#define MIN_16 (Word16)-32768	/* 0x8000 */

+

+

+#ifdef LINUX

+#define  static_vo  static __inline__

+#else

+#define  static_vo  static __inline

+#endif 

+

+#define saturate(L_var1) (((L_var1) > 0X00007fffL) ? (MAX_16): (((L_var1) < (Word32) 0xffff8000L) ? (MIN_16): ((L_var1) & 0xffff)))

+

+#define abs_s(x)       ((Word16)(((x) != MIN_16) ? (((x) >= 0) ? (x) : (-(x))) : MAX_16))  /* Short abs,           1   */

+#define L_deposit_h(x) (((Word32)(x)) << 16)                                               /* 16 bit var1 -> MSB,     2 */

+#define L_deposit_l(x) ((Word32)(x))                                                       /* 16 bit var1 -> LSB,     2 */

+#define L_abs(x) (((x) != MIN_32) ? (((x) >= 0) ? (x) : (-(x))) : MAX_32)                  /* Long abs,              3*/

+#define negate(var1) ((Word16)(((var1) == MIN_16) ? MAX_16 : (-(var1))))                   /* Short negate,        1*/

+#define L_negate(L_var1) (((L_var1) == (MIN_32)) ? (MAX_32) : (-(L_var1)))                 /* Long negate,     2*/

+

+

+#define extract_h(a)			((Word16)(a >> 16))

+#define extract_l(x)            	(Word16)((x))

+#define add1(a,b)			(a + b)

+#define vo_L_msu(a,b,c)			( a - (( b * c ) << 1) )

+#define vo_mult32(a, b)         ((a) * (b))

+#define vo_mult(a,b)			(( a * b ) >> 15 )

+#define	vo_L_mult(a,b)	    		(((a) * (b)) << 1)

+#define vo_shr_r(var1, var2)   		((var1+((Word16)(1L<<(var2-1))))>>var2)

+#define vo_sub(a,b)			(a - b)

+#define vo_L_deposit_h(a)		((Word32)((a) << 16))

+#define vo_round(a)			((a + 0x00008000) >> 16)

+#define vo_extract_l(a)			((Word16)(a))

+#define vo_L_add(a,b)			(a + b)

+#define vo_L_sub(a,b)			(a - b)

+#define vo_mult_r(a,b)			((( a * b ) + 0x4000 ) >> 15 )

+#define vo_negate(a)		        (-a)

+#define vo_L_shr_r(L_var1, var2)        ((L_var1+((Word32)(1L<<(var2-1))))>>var2)

+

+

+/*___________________________________________________________________________

+|                                                                           |

+|   Prototypes for basic arithmetic operators                               |

+|___________________________________________________________________________|

+*/

+static_vo Word16 add (Word16 var1, Word16 var2);				/* Short add,1 */

+static_vo Word16 sub (Word16 var1, Word16 var2);				/* Short sub,1 */

+static_vo Word16 shl (Word16 var1, Word16 var2);                                /* Short shift left,    1   */

+static_vo Word16 shr (Word16 var1, Word16 var2);                                /* Short shift right,   1   */

+static_vo Word16 mult (Word16 var1, Word16 var2);                               /* Short mult,          1   */

+static_vo Word32 L_mult (Word16 var1, Word16 var2);                             /* Long mult,           1   */

+static_vo Word16 voround (Word32 L_var1);                                       /* Round,               1   */

+static_vo Word32 L_mac (Word32 L_var3, Word16 var1, Word16 var2);            	/* Mac,  1  */

+static_vo Word32 L_msu (Word32 L_var3, Word16 var1, Word16 var2);   		/* Msu,  1  */

+static_vo Word32 L_add (Word32 L_var1, Word32 L_var2);   		 	/* Long add,        2 */

+static_vo Word32 L_sub (Word32 L_var1, Word32 L_var2);   			/* Long sub,        2 */

+static_vo Word16 mult_r (Word16 var1, Word16 var2);      		 	/* Mult with round, 2 */

+static_vo Word32 L_shl2(Word32 L_var1, Word16 var2);             		/* var2 > 0*/

+static_vo Word32 L_shl (Word32 L_var1, Word16 var2);    	 	 	/* Long shift left, 2 */

+static_vo Word32 L_shr (Word32 L_var1, Word16 var2);    	 	 	/* Long shift right, 2*/

+static_vo Word32 L_shr_r (Word32 L_var1, Word16 var2); 				/* Long shift right with round,  3   */

+static_vo Word16 norm_s (Word16 var1);             				/* Short norm,           15  */

+static_vo Word16 div_s (Word16 var1, Word16 var2); 				/* Short division,       18  */

+static_vo Word16 norm_l (Word32 L_var1);           				/* Long norm,            30  */   

+

+/*___________________________________________________________________________

+|                                                                           |

+|   Functions                                                               |

+|___________________________________________________________________________|

+*/

+/*___________________________________________________________________________

+|                                                                           |

+|   Function Name : add                                                     |

+|                                                                           |

+|   Purpose :                                                               |

+|                                                                           |

+|    Performs the addition (var1+var2) with overflow control and saturation;|

+|    the 16 bit result is set at +32767 when overflow occurs or at -32768   |

+|    when underflow occurs.                                                 |

+|                                                                           |

+|   Complexity weight : 1                                                   |

+|                                                                           |

+|   Inputs :                                                                |

+|                                                                           |

+|    var1                                                                   |

+|             16 bit short signed integer (Word16) whose value falls in the |

+|             range : 0xffff 8000 <= var1 <= 0x0000 7fff.                   |

+|                                                                           |

+|    var2                                                                   |

+|             16 bit short signed integer (Word16) whose value falls in the |

+|             range : 0xffff 8000 <= var1 <= 0x0000 7fff.                   |

+|                                                                           |

+|   Outputs :                                                               |

+|                                                                           |

+|    none                                                                   |

+|                                                                           |

+|   Return Value :                                                          |

+|                                                                           |

+|    var_out                                                                |

+|             16 bit short signed integer (Word16) whose value falls in the |

+|             range : 0xffff 8000 <= var_out <= 0x0000 7fff.                |

+|___________________________________________________________________________|

+*/

+static_vo Word16 add (Word16 var1, Word16 var2)

+{

+	Word16 var_out;

+	Word32 L_sum;

+	L_sum = (Word32) var1 + var2;

+	var_out = saturate (L_sum);

+	return (var_out);

+}

+

+/*___________________________________________________________________________

+|                                                                           |

+|   Function Name : sub                                                     |

+|                                                                           |

+|   Purpose :                                                               |

+|                                                                           |

+|    Performs the subtraction (var1+var2) with overflow control and satu-   |

+|    ration; the 16 bit result is set at +32767 when overflow occurs or at  |

+|    -32768 when underflow occurs.                                          |

+|                                                                           |

+|   Complexity weight : 1                                                   |

+|                                                                           |

+|   Inputs :                                                                |

+|                                                                           |

+|    var1                                                                   |

+|             16 bit short signed integer (Word16) whose value falls in the |

+|             range : 0xffff 8000 <= var1 <= 0x0000 7fff.                   |

+|                                                                           |

+|    var2                                                                   |

+|             16 bit short signed integer (Word16) whose value falls in the |

+|             range : 0xffff 8000 <= var1 <= 0x0000 7fff.                   |

+|                                                                           |

+|   Outputs :                                                               |

+|                                                                           |

+|    none                                                                   |

+|                                                                           |

+|   Return Value :                                                          |

+|                                                                           |

+|    var_out                                                                |

+|             16 bit short signed integer (Word16) whose value falls in the |

+|             range : 0xffff 8000 <= var_out <= 0x0000 7fff.                |

+|___________________________________________________________________________|

+*/

+

+static_vo Word16 sub (Word16 var1, Word16 var2)

+{

+	Word16 var_out;

+	Word32 L_diff;

+	L_diff = (Word32) var1 - var2;

+	var_out = saturate (L_diff);

+	return (var_out);

+}

+

+/*___________________________________________________________________________

+|                                                                           |

+|   Function Name : shl                                                     |

+|                                                                           |

+|   Purpose :                                                               |

+|                                                                           |

+|   Arithmetically shift the 16 bit input var1 left var2 positions.Zero fill|

+|   the var2 LSB of the result. If var2 is negative, arithmetically shift   |

+|   var1 right by -var2 with sign extension. Saturate the result in case of |

+|   underflows or overflows.                                                |

+|                                                                           |

+|   Complexity weight : 1                                                   |

+|                                                                           |

+|   Inputs :                                                                |

+|                                                                           |

+|    var1                                                                   |

+|             16 bit short signed integer (Word16) whose value falls in the |

+|             range : 0xffff 8000 <= var1 <= 0x0000 7fff.                   |

+|                                                                           |

+|    var2                                                                   |

+|             16 bit short signed integer (Word16) whose value falls in the |

+|             range : 0xffff 8000 <= var1 <= 0x0000 7fff.                   |

+|                                                                           |

+|   Outputs :                                                               |

+|                                                                           |

+|    none                                                                   |

+|                                                                           |

+|   Return Value :                                                          |

+|                                                                           |

+|    var_out                                                                |

+|             16 bit short signed integer (Word16) whose value falls in the |

+|             range : 0xffff 8000 <= var_out <= 0x0000 7fff.                |

+|___________________________________________________________________________|

+*/

+

+static_vo Word16 shl (Word16 var1, Word16 var2)

+{

+	Word16 var_out;

+	Word32 result;

+	if (var2 < 0)

+	{

+		if (var2 < -16)

+			var2 = -16;

+		var_out = var1 >> ((Word16)-var2);

+	}

+	else

+	{

+		result = (Word32) var1 *((Word32) 1 << var2);

+		if ((var2 > 15 && var1 != 0) || (result != (Word32) ((Word16) result)))

+		{

+			var_out = (Word16)((var1 > 0) ? MAX_16 : MIN_16);

+		}

+		else

+		{

+			var_out = extract_l (result);

+		}

+	}

+	return (var_out);

+}

+

+/*___________________________________________________________________________

+|                                                                           |

+|   Function Name : shr                                                     |

+|                                                                           |

+|   Purpose :                                                               |

+|                                                                           |

+|   Arithmetically shift the 16 bit input var1 right var2 positions with    |

+|   sign extension. If var2 is negative, arithmetically shift var1 left by  |

+|   -var2 with sign extension. Saturate the result in case of underflows or |

+|   overflows.                                                              |

+|                                                                           |

+|   Complexity weight : 1                                                   |

+|                                                                           |

+|   Inputs :                                                                |

+|                                                                           |

+|    var1                                                                   |

+|             16 bit short signed integer (Word16) whose value falls in the |

+|             range : 0xffff 8000 <= var1 <= 0x0000 7fff.                   |

+|                                                                           |

+|    var2                                                                   |

+|             16 bit short signed integer (Word16) whose value falls in the |

+|             range : 0xffff 8000 <= var1 <= 0x0000 7fff.                   |

+|                                                                           |

+|   Outputs :                                                               |

+|                                                                           |

+|    none                                                                   |

+|                                                                           |

+|   Return Value :                                                          |

+|                                                                           |

+|    var_out                                                                |

+|             16 bit short signed integer (Word16) whose value falls in the |

+|             range : 0xffff 8000 <= var_out <= 0x0000 7fff.                |

+|___________________________________________________________________________|

+*/

+

+static_vo Word16 shr (Word16 var1, Word16 var2)

+{

+	Word16 var_out;

+	if (var2 < 0)

+	{

+		if (var2 < -16)

+			var2 = -16;

+		var_out = shl(var1, (Word16)-var2);

+	}

+	else

+	{

+		if (var2 >= 15)

+		{

+			var_out = (Word16)((var1 < 0) ? -1 : 0);

+		}

+		else

+		{

+			if (var1 < 0)

+			{

+				var_out = (Word16)(~((~var1) >> var2));

+			}

+			else

+			{

+				var_out = (Word16)(var1 >> var2);

+			}

+		}

+	}

+	return (var_out);

+}

+

+/*___________________________________________________________________________

+|                                                                           |

+|   Function Name : mult                                                    |

+|                                                                           |

+|   Purpose :                                                               |

+|                                                                           |

+|    Performs the multiplication of var1 by var2 and gives a 16 bit result  |

+|    which is scaled i.e.:                                                  |

+|             mult(var1,var2) = extract_l(L_shr((var1 times var2),15)) and  |

+|             mult(-32768,-32768) = 32767.                                  |

+|                                                                           |

+|   Complexity weight : 1                                                   |

+|                                                                           |

+|   Inputs :                                                                |

+|                                                                           |

+|    var1                                                                   |

+|             16 bit short signed integer (Word16) whose value falls in the |

+|             range : 0xffff 8000 <= var1 <= 0x0000 7fff.                   |

+|                                                                           |

+|    var2                                                                   |

+|             16 bit short signed integer (Word16) whose value falls in the |

+|             range : 0xffff 8000 <= var1 <= 0x0000 7fff.                   |

+|                                                                           |

+|   Outputs :                                                               |

+|                                                                           |

+|    none                                                                   |

+|                                                                           |

+|   Return Value :                                                          |

+|                                                                           |

+|    var_out                                                                |

+|             16 bit short signed integer (Word16) whose value falls in the |

+|             range : 0xffff 8000 <= var_out <= 0x0000 7fff.                |

+|___________________________________________________________________________|

+*/

+

+static_vo Word16 mult (Word16 var1, Word16 var2)

+{

+	Word16 var_out;

+	Word32 L_product;

+	L_product = (Word32) var1 *(Word32) var2;

+	L_product = (L_product & (Word32) 0xffff8000L) >> 15;

+	if (L_product & (Word32) 0x00010000L)

+		L_product = L_product | (Word32) 0xffff0000L;

+	var_out = saturate (L_product);

+	return (var_out);

+}

+

+/*___________________________________________________________________________

+|                                                                           |

+|   Function Name : L_mult                                                  |

+|                                                                           |

+|   Purpose :                                                               |

+|                                                                           |

+|   L_mult is the 32 bit result of the multiplication of var1 times var2    |

+|   with one shift left i.e.:                                               |

+|        L_mult(var1,var2) = L_shl((var1 times var2),1) and                   |

+|        L_mult(-32768,-32768) = 2147483647.                                |

+|                                                                           |

+|   Complexity weight : 1                                                   |

+|                                                                           |

+|   Inputs :                                                                |

+|                                                                           |

+|    var1                                                                   |

+|             16 bit short signed integer (Word16) whose value falls in the |

+|             range : 0xffff 8000 <= var1 <= 0x0000 7fff.                   |

+|                                                                           |

+|    var2                                                                   |

+|             16 bit short signed integer (Word16) whose value falls in the |

+|             range : 0xffff 8000 <= var1 <= 0x0000 7fff.                   |

+|                                                                           |

+|   Outputs :                                                               |

+|                                                                           |

+|    none                                                                   |

+|                                                                           |

+|   Return Value :                                                          |

+|                                                                           |

+|    L_var_out                                                              |

+|             32 bit long signed integer (Word32) whose value falls in the  |

+|             range : 0x8000 0000 <= L_var_out <= 0x7fff ffff.              |

+|___________________________________________________________________________|

+*/

+

+static_vo Word32 L_mult (Word16 var1, Word16 var2)

+{

+	Word32 L_var_out;

+	L_var_out = (Word32) var1 *(Word32) var2;

+	if (L_var_out != (Word32) 0x40000000L)

+	{

+		L_var_out *= 2;

+	}

+	else

+	{

+		L_var_out = MAX_32;

+	}

+	return (L_var_out);

+}

+

+/*___________________________________________________________________________

+|                                                                           |

+|   Function Name : round                                                   |

+|                                                                           |

+|   Purpose :                                                               |

+|                                                                           |

+|   Round the lower 16 bits of the 32 bit input number into the MS 16 bits  |

+|   with saturation. Shift the resulting bits right by 16 and return the 16 |

+|   bit number:                                                             |

+|               round(L_var1) = extract_h(L_add(L_var1,32768))              |

+|                                                                           |

+|   Complexity weight : 1                                                   |

+|                                                                           |

+|   Inputs :                                                                |

+|                                                                           |

+|    L_var1                                                                 |

+|             32 bit long signed integer (Word32 ) whose value falls in the |

+|             range : 0x8000 0000 <= L_var1 <= 0x7fff ffff.                 |

+|                                                                           |

+|   Outputs :                                                               |

+|                                                                           |

+|    none                                                                   |

+|                                                                           |

+|   Return Value :                                                          |

+|                                                                           |

+|    var_out                                                                |

+|             16 bit short signed integer (Word16) whose value falls in the |

+|             range : 0xffff 8000 <= var_out <= 0x0000 7fff.                |

+|___________________________________________________________________________|

+*/

+

+static_vo Word16 voround (Word32 L_var1)

+{

+	Word16 var_out;

+	Word32 L_rounded;

+	L_rounded = L_add (L_var1, (Word32) 0x00008000L);

+	var_out = extract_h (L_rounded);

+	return (var_out);

+}

+

+/*___________________________________________________________________________

+|                                                                           |

+|   Function Name : L_mac                                                   |

+|                                                                           |

+|   Purpose :                                                               |

+|                                                                           |

+|   Multiply var1 by var2 and shift the result left by 1. Add the 32 bit    |

+|   result to L_var3 with saturation, return a 32 bit result:               |

+|        L_mac(L_var3,var1,var2) = L_add(L_var3,L_mult(var1,var2)).         |

+|                                                                           |

+|   Complexity weight : 1                                                   |

+|                                                                           |

+|   Inputs :                                                                |

+|                                                                           |

+|    L_var3   32 bit long signed integer (Word32) whose value falls in the  |

+|             range : 0x8000 0000 <= L_var3 <= 0x7fff ffff.                 |

+|                                                                           |

+|    var1                                                                   |

+|             16 bit short signed integer (Word16) whose value falls in the |

+|             range : 0xffff 8000 <= var1 <= 0x0000 7fff.                   |

+|                                                                           |

+|    var2                                                                   |

+|             16 bit short signed integer (Word16) whose value falls in the |

+|             range : 0xffff 8000 <= var1 <= 0x0000 7fff.                   |

+|                                                                           |

+|   Outputs :                                                               |

+|                                                                           |

+|    none                                                                   |

+|                                                                           |

+|   Return Value :                                                          |

+|                                                                           |

+|    L_var_out                                                              |

+|             32 bit long signed integer (Word32) whose value falls in the  |

+|             range : 0x8000 0000 <= L_var_out <= 0x7fff ffff.              |

+|___________________________________________________________________________|

+*/

+

+static_vo Word32 L_mac (Word32 L_var3, Word16 var1, Word16 var2)

+{

+	Word32 L_var_out;

+	Word32 L_product;

+	L_product = ((var1 * var2) << 1);

+	L_var_out = L_add (L_var3, L_product);

+	return (L_var_out);

+}

+

+/*___________________________________________________________________________

+|                                                                           |

+|   Function Name : L_msu                                                   |

+|                                                                           |

+|   Purpose :                                                               |

+|                                                                           |

+|   Multiply var1 by var2 and shift the result left by 1. Subtract the 32   |

+|   bit result to L_var3 with saturation, return a 32 bit result:           |

+|        L_msu(L_var3,var1,var2) = L_sub(L_var3,L_mult(var1,var2)).         |

+|                                                                           |

+|   Complexity weight : 1                                                   |

+|                                                                           |

+|   Inputs :                                                                |

+|                                                                           |

+|    L_var3   32 bit long signed integer (Word32) whose value falls in the  |

+|             range : 0x8000 0000 <= L_var3 <= 0x7fff ffff.                 |

+|                                                                           |

+|    var1                                                                   |

+|             16 bit short signed integer (Word16) whose value falls in the |

+|             range : 0xffff 8000 <= var1 <= 0x0000 7fff.                   |

+|                                                                           |

+|    var2                                                                   |

+|             16 bit short signed integer (Word16) whose value falls in the |

+|             range : 0xffff 8000 <= var1 <= 0x0000 7fff.                   |

+|                                                                           |

+|   Outputs :                                                               |

+|                                                                           |

+|    none                                                                   |

+|                                                                           |

+|   Return Value :                                                          |

+|                                                                           |

+|    L_var_out                                                              |

+|             32 bit long signed integer (Word32) whose value falls in the  |

+|             range : 0x8000 0000 <= L_var_out <= 0x7fff ffff.              |

+|___________________________________________________________________________|

+*/

+

+static_vo Word32 L_msu (Word32 L_var3, Word16 var1, Word16 var2)

+{

+	Word32 L_var_out;

+	Word32 L_product;

+	L_product = (var1 * var2)<<1;

+	L_var_out = L_sub (L_var3, L_product);

+	return (L_var_out);

+}

+

+/*___________________________________________________________________________

+|                                                                           |

+|   Function Name : L_add                                                   |

+|                                                                           |

+|   Purpose :                                                               |

+|                                                                           |

+|   32 bits addition of the two 32 bits variables (L_var1+L_var2) with      |

+|   overflow control and saturation; the result is set at +2147483647 when  |

+|   overflow occurs or at -2147483648 when underflow occurs.                |

+|                                                                           |

+|   Complexity weight : 2                                                   |

+|                                                                           |

+|   Inputs :                                                                |

+|                                                                           |

+|    L_var1   32 bit long signed integer (Word32) whose value falls in the  |

+|             range : 0x8000 0000 <= L_var3 <= 0x7fff ffff.                 |

+|                                                                           |

+|    L_var2   32 bit long signed integer (Word32) whose value falls in the  |

+|             range : 0x8000 0000 <= L_var3 <= 0x7fff ffff.                 |

+|                                                                           |

+|   Outputs :                                                               |

+|                                                                           |

+|    none                                                                   |

+|                                                                           |

+|   Return Value :                                                          |

+|                                                                           |

+|    L_var_out                                                              |

+|             32 bit long signed integer (Word32) whose value falls in the  |

+|             range : 0x8000 0000 <= L_var_out <= 0x7fff ffff.              |

+|___________________________________________________________________________|

+*/

+

+static_vo Word32 L_add (Word32 L_var1, Word32 L_var2)

+{

+	Word32 L_var_out;

+	L_var_out = L_var1 + L_var2;

+	if (((L_var1 ^ L_var2) & MIN_32) == 0)

+	{

+		if ((L_var_out ^ L_var1) & MIN_32)

+		{

+			L_var_out = (L_var1 < 0) ? MIN_32 : MAX_32;

+		}

+	}

+	return (L_var_out);

+}

+

+/*___________________________________________________________________________

+|                                                                           |

+|   Function Name : L_sub                                                   |

+|                                                                           |

+|   Purpose :                                                               |

+|                                                                           |

+|   32 bits subtraction of the two 32 bits variables (L_var1-L_var2) with   |

+|   overflow control and saturation; the result is set at +2147483647 when  |

+|   overflow occurs or at -2147483648 when underflow occurs.                |

+|                                                                           |

+|   Complexity weight : 2                                                   |

+|                                                                           |

+|   Inputs :                                                                |

+|                                                                           |

+|    L_var1   32 bit long signed integer (Word32) whose value falls in the  |

+|             range : 0x8000 0000 <= L_var3 <= 0x7fff ffff.                 |

+|                                                                           |

+|    L_var2   32 bit long signed integer (Word32) whose value falls in the  |

+|             range : 0x8000 0000 <= L_var3 <= 0x7fff ffff.                 |

+|                                                                           |

+|   Outputs :                                                               |

+|                                                                           |

+|    none                                                                   |

+|                                                                           |

+|   Return Value :                                                          |

+|                                                                           |

+|    L_var_out                                                              |

+|             32 bit long signed integer (Word32) whose value falls in the  |

+|             range : 0x8000 0000 <= L_var_out <= 0x7fff ffff.              |

+|___________________________________________________________________________|

+*/

+

+static_vo Word32 L_sub (Word32 L_var1, Word32 L_var2)

+{

+	Word32 L_var_out;

+	L_var_out = L_var1 - L_var2;

+	if (((L_var1 ^ L_var2) & MIN_32) != 0)

+	{

+		if ((L_var_out ^ L_var1) & MIN_32)

+		{

+			L_var_out = (L_var1 < 0L) ? MIN_32 : MAX_32;

+		}

+	}

+	return (L_var_out);

+}

+

+

+/*___________________________________________________________________________

+|                                                                           |

+|   Function Name : mult_r                                                  |

+|                                                                           |

+|   Purpose :                                                               |

+|                                                                           |

+|   Same as mult with rounding, i.e.:                                       |

+|     mult_r(var1,var2) = extract_l(L_shr(((var1 * var2) + 16384),15)) and  |

+|     mult_r(-32768,-32768) = 32767.                                        |

+|                                                                           |

+|   Complexity weight : 2                                                   |

+|                                                                           |

+|   Inputs :                                                                |

+|                                                                           |

+|    var1                                                                   |

+|             16 bit short signed integer (Word16) whose value falls in the |

+|             range : 0xffff 8000 <= var1 <= 0x0000 7fff.                   |

+|                                                                           |

+|    var2                                                                   |

+|             16 bit short signed integer (Word16) whose value falls in the |

+|             range : 0xffff 8000 <= var1 <= 0x0000 7fff.                   |

+|                                                                           |

+|   Outputs :                                                               |

+|                                                                           |

+|    none                                                                   |

+|                                                                           |

+|   Return Value :                                                          |

+|                                                                           |

+|    var_out                                                                |

+|             16 bit short signed integer (Word16) whose value falls in the |

+|             range : 0xffff 8000 <= var_out <= 0x0000 7fff.                |

+|___________________________________________________________________________|

+*/

+

+static_vo Word16 mult_r (Word16 var1, Word16 var2)

+{

+	Word16 var_out;

+	Word32 L_product_arr;

+	L_product_arr = (Word32) var1 *(Word32) var2;       /* product */

+	L_product_arr += (Word32) 0x00004000L;      /* round */

+	L_product_arr &= (Word32) 0xffff8000L;

+	L_product_arr >>= 15;       /* shift */

+	if (L_product_arr & (Word32) 0x00010000L)   /* sign extend when necessary */

+	{

+		L_product_arr |= (Word32) 0xffff0000L;

+	}

+	var_out = saturate (L_product_arr);

+	return (var_out);

+}

+

+/*___________________________________________________________________________

+|                                                                           |

+|   Function Name : L_shl                                                   |

+|                                                                           |

+|   Purpose :                                                               |

+|                                                                           |

+|   Arithmetically shift the 32 bit input L_var1 left var2 positions. Zero  |

+|   fill the var2 LSB of the result. If var2 is negative, arithmetically    |

+|   shift L_var1 right by -var2 with sign extension. Saturate the result in |

+|   case of underflows or overflows.                                        |

+|                                                                           |

+|   Complexity weight : 2                                                   |

+|                                                                           |

+|   Inputs :                                                                |

+|                                                                           |

+|    L_var1   32 bit long signed integer (Word32) whose value falls in the  |

+|             range : 0x8000 0000 <= L_var3 <= 0x7fff ffff.                 |

+|                                                                           |

+|    var2                                                                   |

+|             16 bit short signed integer (Word16) whose value falls in the |

+|             range : 0xffff 8000 <= var1 <= 0x0000 7fff.                   |

+|                                                                           |

+|   Outputs :                                                               |

+|                                                                           |

+|    none                                                                   |

+|                                                                           |

+|   Return Value :                                                          |

+|                                                                           |

+|    L_var_out                                                              |

+|             32 bit long signed integer (Word32) whose value falls in the  |

+|             range : 0x8000 0000 <= L_var_out <= 0x7fff ffff.              |

+|___________________________________________________________________________|

+*/

+

+static_vo Word32 L_shl (Word32 L_var1, Word16 var2)

+{

+	Word32 L_var_out = 0L;

+	if (var2 <= 0)

+	{

+		if (var2 < -32)

+			var2 = -32;

+		L_var_out = (L_var1 >> (Word16)-var2);

+	}

+	else

+	{

+		for (; var2 > 0; var2--)

+		{

+			if (L_var1 > (Word32) 0X3fffffffL)

+			{

+				L_var_out = MAX_32;

+				break;

+			}

+			else

+			{

+				if (L_var1 < (Word32) 0xc0000000L)

+				{

+					//Overflow = 1;

+					L_var_out = MIN_32;

+					break;

+				}

+			}

+			L_var1 *= 2;

+			L_var_out = L_var1;

+		}

+	}

+	return (L_var_out);

+}

+

+static_vo Word32 L_shl2(Word32 L_var1, Word16 var2)

+{

+	Word32 L_var_out = 0L;

+

+	for (; var2 > 0; var2--)

+	{

+		if (L_var1 > (Word32) 0X3fffffffL)

+		{

+			L_var_out = MAX_32;

+			break;

+		}

+		else

+		{

+			if (L_var1 < (Word32) 0xc0000000L)

+			{

+				L_var_out = MIN_32;

+				break;

+			}

+		}

+		L_var1 <<=1 ;

+		L_var_out = L_var1;

+	}

+	return (L_var_out);

+}

+

+/*___________________________________________________________________________

+|                                                                           |

+|   Function Name : L_shr                                                   |

+|                                                                           |

+|   Purpose :                                                               |

+|                                                                           |

+|   Arithmetically shift the 32 bit input L_var1 right var2 positions with  |

+|   sign extension. If var2 is negative, arithmetically shift L_var1 left   |

+|   by -var2 and zero fill the -var2 LSB of the result. Saturate the result |

+|   in case of underflows or overflows.                                     |

+|                                                                           |

+|   Complexity weight : 2                                                   |

+|                                                                           |

+|   Inputs :                                                                |

+|                                                                           |

+|    L_var1   32 bit long signed integer (Word32) whose value falls in the  |

+|             range : 0x8000 0000 <= L_var3 <= 0x7fff ffff.                 |

+|                                                                           |

+|    var2                                                                   |

+|             16 bit short signed integer (Word16) whose value falls in the |

+|             range : 0xffff 8000 <= var1 <= 0x0000 7fff.                   |

+|                                                                           |

+|   Outputs :                                                               |

+|                                                                           |

+|    none                                                                   |

+|                                                                           |

+|   Return Value :                                                          |

+|                                                                           |

+|    L_var_out                                                              |

+|             32 bit long signed integer (Word32) whose value falls in the  |

+|             range : 0x8000 0000 <= L_var_out <= 0x7fff ffff.              |

+|___________________________________________________________________________|

+*/

+

+static_vo Word32 L_shr (Word32 L_var1, Word16 var2)

+{

+	Word32 L_var_out;

+	if (var2 < 0)

+	{

+		if (var2 < -32)

+			var2 = -32;

+		L_var_out = L_shl2(L_var1, (Word16)-var2);

+	}

+	else

+	{

+		if (var2 >= 31)

+		{

+			L_var_out = (L_var1 < 0L) ? -1 : 0;

+		}

+		else

+		{

+			if (L_var1 < 0)

+			{

+				L_var_out = ~((~L_var1) >> var2);

+			}

+			else

+			{

+				L_var_out = L_var1 >> var2;

+			}

+		}

+	}

+	return (L_var_out);

+}

+

+/*___________________________________________________________________________

+|                                                                           |

+|   Function Name : L_shr_r                                                 |

+|                                                                           |

+|   Purpose :                                                               |

+|                                                                           |

+|   Same as L_shr(L_var1,var2) but with rounding. Saturate the result in    |

+|   case of underflows or overflows :                                       |

+|    - If var2 is greater than zero :                                       |

+|          if (L_sub(L_shl(L_shr(L_var1,var2),1),L_shr(L_var1,sub(var2,1))))|

+|          is equal to zero                                                 |

+|                     then                                                  |

+|                     L_shr_r(L_var1,var2) = L_shr(L_var1,var2)             |

+|                     else                                                  |

+|                     L_shr_r(L_var1,var2) = L_add(L_shr(L_var1,var2),1)    |

+|    - If var2 is less than or equal to zero :                              |

+|                     L_shr_r(L_var1,var2) = L_shr(L_var1,var2).            |

+|                                                                           |

+|   Complexity weight : 3                                                   |

+|                                                                           |

+|   Inputs :                                                                |

+|                                                                           |

+|    L_var1                                                                 |

+|             32 bit long signed integer (Word32) whose value falls in the  |

+|             range : 0x8000 0000 <= var1 <= 0x7fff ffff.                   |

+|                                                                           |

+|    var2                                                                   |

+|             16 bit short signed integer (Word16) whose value falls in the |

+|             range : 0xffff 8000 <= var1 <= 0x0000 7fff.                   |

+|                                                                           |

+|   Outputs :                                                               |

+|                                                                           |

+|    none                                                                   |

+|                                                                           |

+|   Return Value :                                                          |

+|                                                                           |

+|    L_var_out                                                              |

+|             32 bit long signed integer (Word32) whose value falls in the  |

+|             range : 0x8000 0000 <= var_out <= 0x7fff ffff.                |

+|___________________________________________________________________________|

+*/

+

+static_vo Word32 L_shr_r (Word32 L_var1, Word16 var2)

+{

+	Word32 L_var_out;

+	if (var2 > 31)

+	{

+		L_var_out = 0;

+	}

+	else

+	{

+		L_var_out = L_shr (L_var1, var2);

+		if (var2 > 0)

+		{

+			if ((L_var1 & ((Word32) 1 << (var2 - 1))) != 0)

+			{

+				L_var_out++;

+			}

+		}

+	}

+	return (L_var_out);

+}

+

+/*___________________________________________________________________________

+|                                                                           |

+|   Function Name : norm_s                                                  |

+|                                                                           |

+|   Purpose :                                                               |

+|                                                                           |

+|   Produces the number of left shift needed to normalize the 16 bit varia- |

+|   ble var1 for positive values on the interval with minimum of 16384 and  |

+|   maximum of 32767, and for negative values on the interval with minimum  |

+|   of -32768 and maximum of -16384; in order to normalize the result, the  |

+|   following operation must be done :                                      |

+|                    norm_var1 = shl(var1,norm_s(var1)).                    |

+|                                                                           |

+|   Complexity weight : 15                                                  |

+|                                                                           |

+|   Inputs :                                                                |

+|                                                                           |

+|    var1                                                                   |

+|             16 bit short signed integer (Word16) whose value falls in the |

+|             range : 0xffff 8000 <= var1 <= 0x0000 7fff.                   |

+|                                                                           |

+|   Outputs :                                                               |

+|                                                                           |

+|    none                                                                   |

+|                                                                           |

+|   Return Value :                                                          |

+|                                                                           |

+|    var_out                                                                |

+|             16 bit short signed integer (Word16) whose value falls in the |

+|             range : 0x0000 0000 <= var_out <= 0x0000 000f.                |

+|___________________________________________________________________________|

+*/

+

+static_vo Word16 norm_s (Word16 var1)

+{

+	Word16 var_out = 0;

+	if (var1 == 0)

+	{

+		var_out = 0;

+	}

+	else

+	{

+		if (var1 == -1)

+		{

+			var_out = 15;

+		}

+		else

+		{

+			if (var1 < 0)

+			{

+				var1 = (Word16)~var1;

+			}

+			for (var_out = 0; var1 < 0x4000; var_out++)

+			{

+				var1 <<= 1;

+			}

+		}

+	}

+	return (var_out);

+}

+

+/*___________________________________________________________________________

+|                                                                           |

+|   Function Name : div_s                                                   |

+|                                                                           |

+|   Purpose :                                                               |

+|                                                                           |

+|   Produces a result which is the fractional integer division of var1  by  |

+|   var2; var1 and var2 must be positive and var2 must be greater or equal  |

+|   to var1; the result is positive (leading bit equal to 0) and truncated  |

+|   to 16 bits.                                                             |

+|   If var1 = var2 then div(var1,var2) = 32767.                             |

+|                                                                           |

+|   Complexity weight : 18                                                  |

+|                                                                           |

+|   Inputs :                                                                |

+|                                                                           |

+|    var1                                                                   |

+|             16 bit short signed integer (Word16) whose value falls in the |

+|             range : 0x0000 0000 <= var1 <= var2 and var2 != 0.            |

+|                                                                           |

+|    var2                                                                   |

+|             16 bit short signed integer (Word16) whose value falls in the |

+|             range : var1 <= var2 <= 0x0000 7fff and var2 != 0.            |

+|                                                                           |

+|   Outputs :                                                               |

+|                                                                           |

+|    none                                                                   |

+|                                                                           |

+|   Return Value :                                                          |

+|                                                                           |

+|    var_out                                                                |

+|             16 bit short signed integer (Word16) whose value falls in the |

+|             range : 0x0000 0000 <= var_out <= 0x0000 7fff.                |

+|             It's a Q15 value (point between b15 and b14).                 |

+|___________________________________________________________________________|

+*/

+

+static_vo Word16 div_s (Word16 var1, Word16 var2)

+{

+	Word16 var_out = 0;

+	Word16 iteration;

+	Word32 L_num;

+	Word32 L_denom;

+	if ((var1 < 0) || (var2 < 0))

+	{

+		var_out = MAX_16;

+		return var_out;

+	}

+	if (var2 == 0)

+	{

+		var_out = MAX_16;

+		return var_out;

+	}

+	if (var1 == 0)

+	{

+		var_out = 0;

+	}

+	else

+	{

+		if (var1 == var2)

+		{

+			var_out = MAX_16;

+		}

+		else

+		{

+			L_num = L_deposit_l (var1);

+			L_denom = L_deposit_l(var2);

+			for (iteration = 0; iteration < 15; iteration++)

+			{

+				var_out <<= 1;

+				L_num <<= 1;

+				if (L_num >= L_denom)

+				{

+					L_num -= L_denom;      

+					var_out += 1;          

+				}

+			}

+		}

+	}

+	return (var_out);

+}

+

+/*___________________________________________________________________________

+|                                                                           |

+|   Function Name : norm_l                                                  |

+|                                                                           |

+|   Purpose :                                                               |

+|                                                                           |

+|   Produces the number of left shifts needed to normalize the 32 bit varia-|

+|   ble L_var1 for positive values on the interval with minimum of          |

+|   1073741824 and maximum of 2147483647, and for negative values on the in-|

+|   terval with minimum of -2147483648 and maximum of -1073741824; in order |

+|   to normalize the result, the following operation must be done :         |

+|                   norm_L_var1 = L_shl(L_var1,norm_l(L_var1)).             |

+|                                                                           |

+|   Complexity weight : 30                                                  |

+|                                                                           |

+|   Inputs :                                                                |

+|                                                                           |

+|    L_var1                                                                 |

+|             32 bit long signed integer (Word32) whose value falls in the  |

+|             range : 0x8000 0000 <= var1 <= 0x7fff ffff.                   |

+|                                                                           |

+|   Outputs :                                                               |

+|                                                                           |

+|    none                                                                   |

+|                                                                           |

+|   Return Value :                                                          |

+|                                                                           |

+|    var_out                                                                |

+|             16 bit short signed integer (Word16) whose value falls in the |

+|             range : 0x0000 0000 <= var_out <= 0x0000 001f.                |

+|___________________________________________________________________________|

+*/

+

+static_vo Word16 norm_l (Word32 L_var1)

+{

+	Word16 var_out = 0;

+	if (L_var1 != 0)

+	{

+		var_out = 31;

+		if (L_var1 != (Word32) 0xffffffffL)

+		{

+			L_var1 ^= (L_var1 >>31);

+			for (var_out = 0; L_var1 < (Word32) 0x40000000L; var_out++)

+			{

+				L_var1 <<= 1;

+			}

+		}

+	}

+	return (var_out);

+}

+

+#endif //__BASIC_OP_H__

+

diff --git a/media/libstagefright/codecs/amrwbenc/inc/bits.h b/media/libstagefright/codecs/amrwbenc/inc/bits.h
new file mode 100644
index 0000000..77146de
--- /dev/null
+++ b/media/libstagefright/codecs/amrwbenc/inc/bits.h
@@ -0,0 +1,92 @@
+/*

+ ** Copyright 2003-2010, VisualOn, Inc.

+ **

+ ** Licensed under the Apache License, Version 2.0 (the "License");

+ ** you may not use this file except in compliance with the License.

+ ** You may obtain a copy of the License at

+ **

+ **     http://www.apache.org/licenses/LICENSE-2.0

+ **

+ ** Unless required by applicable law or agreed to in writing, software

+ ** distributed under the License is distributed on an "AS IS" BASIS,

+ ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

+ ** See the License for the specific language governing permissions and

+ ** limitations under the License.

+ */

+

+

+/*--------------------------------------------------------------------------*

+*                         BITS.H                                           *

+*--------------------------------------------------------------------------*

+*       Number of bits for different modes			           *

+*--------------------------------------------------------------------------*/

+

+#ifndef __BITS_H__

+#define __BITS_H__

+

+#include <stdio.h>

+#include "typedef.h"

+#include "cnst.h"

+#include "cod_main.h"

+

+#define NBBITS_7k     132                  /* 6.60k  */

+#define NBBITS_9k     177                  /* 8.85k  */

+#define NBBITS_12k    253                  /* 12.65k */

+#define NBBITS_14k    285                  /* 14.25k */

+#define NBBITS_16k    317                  /* 15.85k */

+#define NBBITS_18k    365                  /* 18.25k */

+#define NBBITS_20k    397                  /* 19.85k */

+#define NBBITS_23k    461                  /* 23.05k */

+#define NBBITS_24k    477                  /* 23.85k */

+

+#define NBBITS_SID    35

+#define NB_BITS_MAX   NBBITS_24k

+

+#define BIT_0     (Word16)-127

+#define BIT_1     (Word16)127

+#define BIT_0_ITU (Word16)0x007F

+#define BIT_1_ITU (Word16)0x0081

+

+#define SIZE_MAX1  (3+NB_BITS_MAX)          /* serial size max */

+#define TX_FRAME_TYPE (Word16)0x6b21

+#define RX_FRAME_TYPE (Word16)0x6b20

+

+static const Word16 nb_of_bits[NUM_OF_MODES] = {

+	NBBITS_7k,

+	NBBITS_9k,

+	NBBITS_12k,

+	NBBITS_14k,

+	NBBITS_16k,

+	NBBITS_18k,

+	NBBITS_20k,

+	NBBITS_23k,

+	NBBITS_24k,

+	NBBITS_SID

+};

+

+/*typedef struct

+{

+Word16 sid_update_counter;

+Word16 sid_handover_debt;

+Word16 prev_ft;

+} TX_State;

+*/

+

+//typedef struct

+//{

+//	Word16 prev_ft;

+//	Word16 prev_mode;

+//} RX_State;

+

+int PackBits(Word16 prms[], Word16 coding_mode, Word16 mode, Coder_State *st);

+

+

+void Parm_serial(

+		Word16 value,                         /* input : parameter value */

+		Word16 no_of_bits,                    /* input : number of bits  */

+		Word16 ** prms

+		);

+

+

+#endif  //__BITS_H__

+

diff --git a/media/libstagefright/codecs/amrwbenc/inc/cnst.h b/media/libstagefright/codecs/amrwbenc/inc/cnst.h
new file mode 100644
index 0000000..ffdbd88
--- /dev/null
+++ b/media/libstagefright/codecs/amrwbenc/inc/cnst.h
@@ -0,0 +1,81 @@
+/*

+ ** Copyright 2003-2010, VisualOn, Inc.

+ **

+ ** Licensed under the Apache License, Version 2.0 (the "License");

+ ** you may not use this file except in compliance with the License.

+ ** You may obtain a copy of the License at

+ **

+ **     http://www.apache.org/licenses/LICENSE-2.0

+ **

+ ** Unless required by applicable law or agreed to in writing, software

+ ** distributed under the License is distributed on an "AS IS" BASIS,

+ ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

+ ** See the License for the specific language governing permissions and

+ ** limitations under the License.

+ */

+

+

+/*--------------------------------------------------------------------------*

+ *                         CNST.H                                           *

+ *--------------------------------------------------------------------------*

+ *       Codec constant parameters (coder and decoder)                      *

+ *--------------------------------------------------------------------------*/

+

+#ifndef __CNST_H__

+#define __CNST_H__

+

+#define L_FRAME16k   320                   /* Frame size at 16kHz                        */

+#define L_FRAME      256                   /* Frame size                                 */

+#define L_SUBFR16k   80                    /* Subframe size at 16kHz                     */

+

+#define L_SUBFR      64                    /* Subframe size                              */

+#define NB_SUBFR     4                     /* Number of subframe per frame               */

+

+#define L_NEXT       64                    /* Overhead in LP analysis                    */

+#define L_WINDOW     384                   /* window size in LP analysis                 */

+#define L_TOTAL      384                   /* Total size of speech buffer.               */

+#define M            16                    /* Order of LP filter                         */

+#define M16k         20

+

+#define L_FILT16k    15                    /* Delay of down-sampling filter              */

+#define L_FILT       12                    /* Delay of up-sampling filter                */

+

+#define GP_CLIP      15565                 /* Pitch gain clipping = 0.95 Q14             */

+#define PIT_SHARP    27853                 /* pitch sharpening factor = 0.85 Q15         */

+

+#define PIT_MIN      34                    /* Minimum pitch lag with resolution 1/4      */

+#define PIT_FR2      128                   /* Minimum pitch lag with resolution 1/2      */

+#define PIT_FR1_9b   160                   /* Minimum pitch lag with resolution 1        */

+#define PIT_FR1_8b   92                    /* Minimum pitch lag with resolution 1        */

+#define PIT_MAX      231                   /* Maximum pitch lag                          */

+#define L_INTERPOL   (16+1)                /* Length of filter for interpolation         */

+

+#define OPL_DECIM    2                     /* Decimation in open-loop pitch analysis     */

+

+#define PREEMPH_FAC  22282                 /* preemphasis factor (0.68 in Q15)           */

+#define GAMMA1       30147                 /* Weighting factor (numerator) (0.92 in Q15) */

+#define TILT_FAC     22282                 /* tilt factor (denominator) (0.68 in Q15)    */

+

+#define Q_MAX        8                     /* scaling max for signal (see syn_filt_32)   */

+

+#define RANDOM_INITSEED  21845             /* own random init value                      */

+

+#define L_MEANBUF        3

+#define ONE_PER_MEANBUF 10923

+

+#define MODE_7k       0

+#define MODE_9k       1

+#define MODE_12k      2

+#define MODE_14k      3

+#define MODE_16k      4

+#define MODE_18k      5

+#define MODE_20k      6

+#define MODE_23k      7

+#define MODE_24k      8

+#define MRDTX         9

+#define NUM_OF_MODES  10                   /* see bits.h for bits definition             */

+

+#define EHF_MASK (Word16)0x0008            /* homing frame pattern                       */

+

+#endif //__CNST_H__

+

diff --git a/media/libstagefright/codecs/amrwbenc/inc/cod_main.h b/media/libstagefright/codecs/amrwbenc/inc/cod_main.h
new file mode 100644
index 0000000..1fd5787
--- /dev/null
+++ b/media/libstagefright/codecs/amrwbenc/inc/cod_main.h
@@ -0,0 +1,103 @@
+/*

+ ** Copyright 2003-2010, VisualOn, Inc.

+ **

+ ** Licensed under the Apache License, Version 2.0 (the "License");

+ ** you may not use this file except in compliance with the License.

+ ** You may obtain a copy of the License at

+ **

+ **     http://www.apache.org/licenses/LICENSE-2.0

+ **

+ ** Unless required by applicable law or agreed to in writing, software

+ ** distributed under the License is distributed on an "AS IS" BASIS,

+ ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

+ ** See the License for the specific language governing permissions and

+ ** limitations under the License.

+ */

+

+

+/*--------------------------------------------------------------------------*

+ *                         COD_MAIN.H                                       *

+ *--------------------------------------------------------------------------*

+ *       Static memory in the encoder				            *

+ *--------------------------------------------------------------------------*/

+#ifndef __COD_MAIN_H__

+#define __COD_MAIN_H__

+

+#include "cnst.h"                          /* coder constant parameters */

+

+#include "wb_vad.h"

+#include "dtx.h"

+#include "stream.h"

+#include "voAMRWB.h"

+

+typedef struct

+{

+    Word16 mem_decim[2 * L_FILT16k];       /* speech decimated filter memory */

+    Word16 mem_sig_in[6];                  /* hp50 filter memory */

+    Word16 mem_preemph;                    /* speech preemph filter memory */

+    Word16 old_speech[L_TOTAL - L_FRAME];  /* old speech vector at 12.8kHz */

+    Word16 old_wsp[PIT_MAX / OPL_DECIM];   /* old decimated weighted speech vector */

+    Word16 old_exc[PIT_MAX + L_INTERPOL];  /* old excitation vector */

+    Word16 mem_levinson[M + 2];            /* levinson routine memory */

+    Word16 ispold[M];                      /* old isp (immittance spectral pairs) */

+    Word16 ispold_q[M];                    /* quantized old isp */

+    Word16 past_isfq[M];                   /* past isf quantizer */

+    Word16 mem_wsp;                        /* wsp vector memory */

+    Word16 mem_decim2[3];                  /* wsp decimation filter memory */

+    Word16 mem_w0;                         /* target vector memory */

+    Word16 mem_syn[M];                     /* synthesis memory */

+    Word16 tilt_code;                      /* tilt of code */

+    Word16 old_wsp_max;                    /* old wsp maximum value */

+    Word16 old_wsp_shift;                  /* old wsp shift */

+    Word16 Q_old;                          /* old scaling factor */

+    Word16 Q_max[2];                       /* old maximum scaling factor */

+    Word16 gp_clip[2];                     /* gain of pitch clipping memory */

+    Word16 qua_gain[4];                    /* gain quantizer memory */

+

+    Word16 old_T0_med;

+    Word16 ol_gain;

+    Word16 ada_w;

+    Word16 ol_wght_flg;

+    Word16 old_ol_lag[5];

+    Word16 hp_wsp_mem[9];

+    Word16 old_hp_wsp[L_FRAME / OPL_DECIM + (PIT_MAX / OPL_DECIM)];

+    VadVars *vadSt;

+    dtx_encState *dtx_encSt;

+    Word16 first_frame;

+    Word16 isfold[M];                      /* old isf (frequency domain) */

+    Word32 L_gc_thres;                     /* threshold for noise enhancer */

+    Word16 mem_syn_hi[M];                  /* modified synthesis memory (MSB) */

+    Word16 mem_syn_lo[M];                  /* modified synthesis memory (LSB) */

+    Word16 mem_deemph;                     /* speech deemph filter memory */

+    Word16 mem_sig_out[6];                 /* hp50 filter memory for synthesis */

+    Word16 mem_hp400[6];                   /* hp400 filter memory for synthesis */

+    Word16 mem_oversamp[2 * L_FILT];       /* synthesis oversampled filter memory */

+    Word16 mem_syn_hf[M];                  /* HF synthesis memory */

+    Word16 mem_hf[2 * L_FILT16k];          /* HF band-pass filter memory */

+    Word16 mem_hf2[2 * L_FILT16k];         /* HF band-pass filter memory */

+    Word16 seed2;                          /* random memory for HF generation */

+    Word16 vad_hist;

+    Word16 gain_alpha;

+    /*  TX_State structure  */

+	Word16 sid_update_counter;

+    Word16 sid_handover_debt;

+    Word16 prev_ft;

+	Word16 allow_dtx;

+	/*some input/output buffer parameters */

+	unsigned char       *inputStream;

+	int			        inputSize;

+	VOAMRWBMODE  		mode;

+	VOAMRWBFRAMETYPE	frameType;

+	unsigned short      *outputStream;

+	int			        outputSize;

+	FrameStream         *stream;

+	VO_MEM_OPERATOR     *pvoMemop;

+	VO_MEM_OPERATOR     voMemoprator;

+	VO_PTR              hCheck;

+} Coder_State;

+

+typedef void* HAMRENC;

+

+#endif  //__COD_MAIN_H__

+

+

diff --git a/media/libstagefright/codecs/amrwbenc/inc/dtx.h b/media/libstagefright/codecs/amrwbenc/inc/dtx.h
new file mode 100644
index 0000000..e52c2d0
--- /dev/null
+++ b/media/libstagefright/codecs/amrwbenc/inc/dtx.h
@@ -0,0 +1,115 @@
+/*

+ ** Copyright 2003-2010, VisualOn, Inc.

+ **

+ ** Licensed under the Apache License, Version 2.0 (the "License");

+ ** you may not use this file except in compliance with the License.

+ ** You may obtain a copy of the License at

+ **

+ **     http://www.apache.org/licenses/LICENSE-2.0

+ **

+ ** Unless required by applicable law or agreed to in writing, software

+ ** distributed under the License is distributed on an "AS IS" BASIS,

+ ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

+ ** See the License for the specific language governing permissions and

+ ** limitations under the License.

+ */

+

+

+/*--------------------------------------------------------------------------*

+ *                         DTX.H					    *

+ *--------------------------------------------------------------------------*

+ *       Static memory, constants and frametypes for the DTX 		    *

+ *--------------------------------------------------------------------------*/

+

+#ifndef __DTX_H__

+#define __DTX_H__

+

+#define DTX_MAX_EMPTY_THRESH 50

+#define DTX_HIST_SIZE 8

+#define DTX_HIST_SIZE_MIN_ONE 7

+#define DTX_ELAPSED_FRAMES_THRESH (24 + 7 -1)

+#define DTX_HANG_CONST 7                   /* yields eight frames of SP HANGOVER  */

+#define INV_MED_THRESH 14564

+#define ISF_GAP  128                       /* 50 */

+#define ONE_MINUS_ISF_GAP 16384 - ISF_GAP

+#define ISF_GAP   128

+#define ISF_DITH_GAP   448

+#define ISF_FACTOR_LOW 256

+#define ISF_FACTOR_STEP 2

+#define GAIN_THR 180

+#define GAIN_FACTOR 75

+

+typedef struct

+{

+    Word16 isf_hist[M * DTX_HIST_SIZE];

+    Word16 log_en_hist[DTX_HIST_SIZE];

+    Word16 hist_ptr;

+    Word16 log_en_index;

+    Word16 cng_seed;

+    /* DTX handler stuff */

+    Word16 dtxHangoverCount;

+    Word16 decAnaElapsedCount;

+    Word32 D[28];

+    Word32 sumD[DTX_HIST_SIZE];

+} dtx_encState;

+

+#define SPEECH 0

+#define DTX 1

+#define DTX_MUTE 2

+

+#define TX_SPEECH 0

+#define TX_SID_FIRST 1

+#define TX_SID_UPDATE 2

+#define TX_NO_DATA 3

+

+#define RX_SPEECH_GOOD 0

+#define RX_SPEECH_PROBABLY_DEGRADED 1

+#define RX_SPEECH_LOST 2

+#define RX_SPEECH_BAD 3

+#define RX_SID_FIRST 4

+#define RX_SID_UPDATE 5

+#define RX_SID_BAD 6

+#define RX_NO_DATA 7

+

+/*****************************************************************************

+ *

+ * DEFINITION OF DATA TYPES

+ *****************************************************************************/

+

+Word16 dtx_enc_init(dtx_encState ** st, Word16 isf_init[], VO_MEM_OPERATOR *pMemOP);

+Word16 dtx_enc_reset(dtx_encState * st, Word16 isf_init[]);

+void dtx_enc_exit(dtx_encState ** st, VO_MEM_OPERATOR *pMemOP);

+

+Word16 dtx_enc(

+     dtx_encState * st,                    /* i/o : State struct                                         */

+     Word16 isf[M],                        /* o   : CN ISF vector                                        */

+     Word16 * exc2,                        /* o   : CN excitation                                        */

+     Word16 ** prms

+);

+

+Word16 dtx_buffer(

+     dtx_encState * st,                    /* i/o : State struct                    */

+     Word16 isf_new[],                     /* i   : isf vector                      */

+     Word32 enr,                           /* i   : residual energy (in L_FRAME)    */

+     Word16 codec_mode

+);

+

+void tx_dtx_handler(dtx_encState * st,     /* i/o : State struct           */

+     Word16 vad_flag,                      /* i   : vad decision           */

+     Word16 * usedMode                     /* i/o : mode changed or not    */

+);

+

+void Qisf_ns(

+     Word16 * isf1,                        /* input : ISF in the frequency domain (0..0.5) */

+     Word16 * isf_q,                       /* output: quantized ISF                        */

+     Word16 * indice                       /* output: quantization indices                 */

+);

+

+

+void Disf_ns(

+     Word16 * indice,                      /* input:  quantization indices                  */

+     Word16 * isf_q                        /* input : ISF in the frequency domain (0..0.5)  */

+);

+

+#endif  //__DTX_H__

+

diff --git a/media/libstagefright/codecs/amrwbenc/inc/grid100.tab b/media/libstagefright/codecs/amrwbenc/inc/grid100.tab
new file mode 100644
index 0000000..efee18d
--- /dev/null
+++ b/media/libstagefright/codecs/amrwbenc/inc/grid100.tab
@@ -0,0 +1,53 @@
+/*

+ ** Copyright 2003-2010, VisualOn, Inc.

+ **

+ ** Licensed under the Apache License, Version 2.0 (the "License");

+ ** you may not use this file except in compliance with the License.

+ ** You may obtain a copy of the License at

+ **

+ **     http://www.apache.org/licenses/LICENSE-2.0

+ **

+ ** Unless required by applicable law or agreed to in writing, software

+ ** distributed under the License is distributed on an "AS IS" BASIS,

+ ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

+ ** See the License for the specific language governing permissions and

+ ** limitations under the License.

+ */

+

+

+

+/*-------------------------------------------------------------*

+ *  Table for az_isp()                                         *

+ *                                                             *

+ * Vector grid[] is in Q15                                     *

+ *                                                             *

+ * grid[0] = 1.0;                                              *

+ * grid[grid_points+1] = -1.0;                                 *

+ * for (i = 1; i < grid_points; i++)                           *

+ *   grid[i] = cos((6.283185307*i)/(2.0*grid_points));         *

+ *                                                             *

+ *-------------------------------------------------------------*/

+

+/* Version 101 points */

+

+#define   GRID_POINTS     100

+

+const Word16 vogrid[GRID_POINTS+1] ={

+    32767,     32751,     32703,     32622,     32509,     32364,

+    32187,     31978,     31738,     31466,     31164,     30830,

+    30466,     30072,     29649,     29196,     28714,     28204,

+    27666,     27101,     26509,     25891,     25248,     24579,

+    23886,     23170,     22431,     21669,     20887,     20083,

+    19260,     18418,     17557,     16680,     15786,     14876,

+    13951,     13013,     12062,     11099,     10125,      9141,

+     8149,      7148,      6140,      5126,      4106,      3083,

+     2057,      1029,         0,     -1029,     -2057,     -3083,

+    -4106,     -5126,     -6140,     -7148,     -8149,     -9141,

+   -10125,    -11099,    -12062,    -13013,    -13951,    -14876,

+   -15786,    -16680,    -17557,    -18418,    -19260,    -20083,

+   -20887,    -21669,    -22431,    -23170,    -23886,    -24579,

+   -25248,    -25891,    -26509,    -27101,    -27666,    -28204,

+   -28714,    -29196,    -29649,    -30072,    -30466,    -30830,

+   -31164,    -31466,    -31738,    -31978,    -32187,    -32364,

+   -32509,    -32622,    -32703,    -32751,    -32760};

+

diff --git a/media/libstagefright/codecs/amrwbenc/inc/ham_wind.tab b/media/libstagefright/codecs/amrwbenc/inc/ham_wind.tab
new file mode 100644
index 0000000..91f8690
--- /dev/null
+++ b/media/libstagefright/codecs/amrwbenc/inc/ham_wind.tab
@@ -0,0 +1,73 @@
+/*

+ ** Copyright 2003-2010, VisualOn, Inc.

+ **

+ ** Licensed under the Apache License, Version 2.0 (the "License");

+ ** you may not use this file except in compliance with the License.

+ ** You may obtain a copy of the License at

+ **

+ **     http://www.apache.org/licenses/LICENSE-2.0

+ **

+ ** Unless required by applicable law or agreed to in writing, software

+ ** distributed under the License is distributed on an "AS IS" BASIS,

+ ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

+ ** See the License for the specific language governing permissions and

+ ** limitations under the License.

+ */

+

+

+/* Hamming_cos window for LPC analysis.                 */

+/*   Create with function hamm_cos(window,384-128,128)  */

+

+#define L_WINDOW 384

+

+const Word16 vo_window[L_WINDOW] = {

+    2621,    2622,    2626,    2632,    2640,    2650,    2662,    2677,

+    2694,    2714,    2735,    2759,    2785,    2814,    2844,    2877,

+    2912,    2949,    2989,    3031,    3075,    3121,    3169,    3220,

+    3273,    3328,    3385,    3444,    3506,    3569,    3635,    3703,

+    3773,    3845,    3919,    3996,    4074,    4155,    4237,    4321,

+    4408,    4496,    4587,    4680,    4774,    4870,    4969,    5069,

+    5171,    5275,    5381,    5489,    5599,    5710,    5824,    5939,

+    6056,    6174,    6295,    6417,    6541,    6666,    6793,    6922,

+    7052,    7185,    7318,    7453,    7590,    7728,    7868,    8009,

+    8152,    8296,    8442,    8589,    8737,    8887,    9038,    9191,

+    9344,    9499,    9655,    9813,    9971,   10131,   10292,   10454,

+   10617,   10781,   10946,   11113,   11280,   11448,   11617,   11787,

+   11958,   12130,   12303,   12476,   12650,   12825,   13001,   13178,

+   13355,   13533,   13711,   13890,   14070,   14250,   14431,   14612,

+   14793,   14975,   15158,   15341,   15524,   15708,   15891,   16076,

+   16260,   16445,   16629,   16814,   16999,   17185,   17370,   17555,

+   17740,   17926,   18111,   18296,   18481,   18666,   18851,   19036,

+   19221,   19405,   19589,   19773,   19956,   20139,   20322,   20504,

+   20686,   20867,   21048,   21229,   21408,   21588,   21767,   21945,

+   22122,   22299,   22475,   22651,   22825,   22999,   23172,   23344,

+   23516,   23686,   23856,   24025,   24192,   24359,   24525,   24689,

+   24853,   25016,   25177,   25337,   25496,   25654,   25811,   25967,

+   26121,   26274,   26426,   26576,   26725,   26873,   27019,   27164,

+   27308,   27450,   27590,   27729,   27867,   28003,   28137,   28270,

+   28401,   28531,   28659,   28785,   28910,   29033,   29154,   29274,

+   29391,   29507,   29622,   29734,   29845,   29953,   30060,   30165,

+   30268,   30370,   30469,   30566,   30662,   30755,   30847,   30936,

+   31024,   31109,   31193,   31274,   31354,   31431,   31506,   31579,

+   31651,   31719,   31786,   31851,   31914,   31974,   32032,   32088,

+   32142,   32194,   32243,   32291,   32336,   32379,   32419,   32458,

+   32494,   32528,   32560,   32589,   32617,   32642,   32664,   32685,

+   32703,   32719,   32733,   32744,   32753,   32760,   32764,   32767,

+   32767,   32765,   32757,   32745,   32727,   32705,   32678,   32646,

+   32609,   32567,   32520,   32468,   32411,   32349,   32283,   32211,

+   32135,   32054,   31968,   31877,   31781,   31681,   31575,   31465,

+   31351,   31231,   31107,   30978,   30844,   30706,   30563,   30415,

+   30263,   30106,   29945,   29779,   29609,   29434,   29255,   29071,

+   28883,   28691,   28494,   28293,   28087,   27878,   27664,   27446,

+   27224,   26997,   26767,   26533,   26294,   26052,   25806,   25555,

+   25301,   25043,   24782,   24516,   24247,   23974,   23698,   23418,

+   23134,   22847,   22557,   22263,   21965,   21665,   21361,   21054,

+   20743,   20430,   20113,   19794,   19471,   19146,   18817,   18486,

+   18152,   17815,   17476,   17134,   16789,   16442,   16092,   15740,

+   15385,   15028,   14669,   14308,   13944,   13579,   13211,   12841,

+   12470,   12096,   11721,   11344,   10965,   10584,   10202,    9819,

+    9433,    9047,    8659,    8270,    7879,    7488,    7095,    6701,

+    6306,    5910,    5514,    5116,    4718,    4319,    3919,    3519,

+    3118,    2716,    2315,    1913,    1510,    1108,     705,     302};

+

+

diff --git a/media/libstagefright/codecs/amrwbenc/inc/homing.tab b/media/libstagefright/codecs/amrwbenc/inc/homing.tab
new file mode 100644
index 0000000..2963da7a
--- /dev/null
+++ b/media/libstagefright/codecs/amrwbenc/inc/homing.tab
@@ -0,0 +1,123 @@
+

+/*

+ ** Copyright 2003-2010, VisualOn, Inc.

+ **

+ ** Licensed under the Apache License, Version 2.0 (the "License");

+ ** you may not use this file except in compliance with the License.

+ ** You may obtain a copy of the License at

+ **

+ **     http://www.apache.org/licenses/LICENSE-2.0

+ **

+ ** Unless required by applicable law or agreed to in writing, software

+ ** distributed under the License is distributed on an "AS IS" BASIS,

+ ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

+ ** See the License for the specific language governing permissions and

+ ** limitations under the License.

+ */

+

+

+

+#define DHF_PARMS_MAX 32               /* homing frame pattern  */

+#define NUM_OF_SPMODES 9

+

+#define PRML 15

+#define PRMN_7k NBBITS_7k/PRML + 1

+#define PRMN_9k NBBITS_9k/PRML + 1

+#define PRMN_12k NBBITS_12k/PRML + 1

+#define PRMN_14k NBBITS_14k/PRML + 1

+#define PRMN_16k NBBITS_16k/PRML + 1

+#define PRMN_18k NBBITS_18k/PRML + 1

+#define PRMN_20k NBBITS_20k/PRML + 1

+#define PRMN_23k NBBITS_23k/PRML + 1

+#define PRMN_24k NBBITS_24k/PRML + 1

+

+static const Word16 dfh_M7k[PRMN_7k] =

+{

+  3168, 29954, 29213, 16121, 

+	64, 13440, 30624, 16430, 

+ 19008

+};

+

+static const Word16 dfh_M9k[PRMN_9k] =

+{

+   3168, 31665,  9943, 9123, 

+  15599,  4358, 20248, 2048, 

+  17040, 27787, 16816, 13888

+};

+

+static const Word16 dfh_M12k[PRMN_12k] =

+{

+  3168, 31665,  9943,  9128, 

+  3647,  8129, 30930, 27926, 

+ 18880, 12319,   496,  1042, 

+  4061, 20446, 25629, 28069, 

+ 13948

+};

+

+static const Word16 dfh_M14k[PRMN_14k] =

+{

+    3168, 31665,  9943,  9131, 

+   24815,   655, 26616, 26764, 

+    7238, 19136,  6144,    88, 

+	4158, 25733, 30567, 30494, 

+	221, 20321, 17823

+};

+

+static const Word16 dfh_M16k[PRMN_16k] =

+{

+    3168, 31665,  9943,  9131, 

+   24815,   700,  3824,  7271, 

+   26400,  9528,  6594, 26112, 

+     108,  2068, 12867, 16317, 

+   23035, 24632,  7528,  1752, 

+    6759, 24576

+};

+

+static const Word16 dfh_M18k[PRMN_18k] =

+{

+     3168, 31665,  9943,  9135, 

+	14787, 14423, 30477, 24927, 

+	25345, 30154,   916,  5728, 

+	18978,  2048,   528, 16449, 

+	 2436,  3581, 23527, 29479, 

+	 8237, 16810, 27091, 19052, 

+	    0

+};

+

+static const Word16 dfh_M20k[PRMN_20k] =

+{

+     3168, 31665,  9943,  9129, 

+	 8637, 31807, 24646,   736, 

+	28643,  2977,  2566, 25564, 

+	12930, 13960,  2048,   834, 

+	 3270,  4100, 26920, 16237, 

+	31227, 17667, 15059, 20589, 

+	30249, 29123, 0

+};

+

+static const Word16 dfh_M23k[PRMN_23k] =

+{

+	 3168, 31665,  9943,  9132, 

+	16748,  3202, 28179, 16317, 

+	30590, 15857, 19960,  8818, 

+	21711, 21538,  4260, 16690, 

+	20224,  3666,  4194,  9497, 

+	16320, 15388,  5755, 31551, 

+	14080,  3574, 15932,    50, 

+	23392, 26053, 31216

+};

+

+static const Word16 dfh_M24k[PRMN_24k] =

+{

+	 3168, 31665,  9943,  9134, 

+	24776,  5857, 18475, 28535, 

+	29662, 14321, 16725,  4396, 

+	29353, 10003, 17068, 20504, 

+	  720,     0,  8465, 12581, 

+	28863, 24774,  9709, 26043, 

+	 7941, 27649, 13965, 15236, 

+	18026, 22047, 16681,  3968

+};

+

+

+

diff --git a/media/libstagefright/codecs/amrwbenc/inc/isp_isf.tab b/media/libstagefright/codecs/amrwbenc/inc/isp_isf.tab
new file mode 100644
index 0000000..ff20e38
--- /dev/null
+++ b/media/libstagefright/codecs/amrwbenc/inc/isp_isf.tab
@@ -0,0 +1,62 @@
+/*

+ ** Copyright 2003-2010, VisualOn, Inc.

+ **

+ ** Licensed under the Apache License, Version 2.0 (the "License");

+ ** you may not use this file except in compliance with the License.

+ ** You may obtain a copy of the License at

+ **

+ **     http://www.apache.org/licenses/LICENSE-2.0

+ **

+ ** Unless required by applicable law or agreed to in writing, software

+ ** distributed under the License is distributed on an "AS IS" BASIS,

+ ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

+ ** See the License for the specific language governing permissions and

+ ** limitations under the License.

+ */

+

+

+/*-----------------------------------------------------*

+ | Tables for function Isf_isp() and Isp_isf()         |

+ *-----------------------------------------------------*/

+

+/* table of cos(x) in Q15 */

+

+const static Word16 table[129] = {

+  32767,

+  32758,  32729,  32679,  32610,  32522,  32413,  32286,  32138,

+  31972,  31786,  31581,  31357,  31114,  30853,  30572,  30274,

+  29957,  29622,  29269,  28899,  28511,  28106,  27684,  27246,

+  26791,  26320,  25833,  25330,  24812,  24279,  23732,  23170,

+  22595,  22006,  21403,  20788,  20160,  19520,  18868,  18205,

+  17531,  16846,  16151,  15447,  14733,  14010,  13279,  12540,

+  11793,  11039,  10279,   9512,   8740,   7962,   7180,   6393,

+   5602,   4808,   4011,   3212,   2411,   1608,    804,      0,

+   -804,  -1608,  -2411,  -3212,  -4011,  -4808,  -5602,  -6393,

+  -7180,  -7962,  -8740,  -9512, -10279, -11039, -11793, -12540,

+ -13279, -14010, -14733, -15447, -16151, -16846, -17531, -18205,

+ -18868, -19520, -20160, -20788, -21403, -22006, -22595, -23170,

+ -23732, -24279, -24812, -25330, -25833, -26320, -26791, -27246,

+ -27684, -28106, -28511, -28899, -29269, -29622, -29957, -30274,

+ -30572, -30853, -31114, -31357, -31581, -31786, -31972, -32138,

+ -32286, -32413, -32522, -32610, -32679, -32729, -32758, -32768};

+

+/* slope in Q11 used to compute y = acos(x) */

+

+const static Word16 slope[128] = { 

+ -26214, -9039, -5243, -3799, -2979, -2405, -2064, -1771,

+ -1579, -1409, -1279, -1170, -1079, -1004, -933, -880,

+ -827, -783, -743, -708, -676, -647, -621, -599,

+ -576, -557, -538, -521, -506, -492, -479, -466,

+ -456, -445, -435, -426, -417, -410, -402, -395,

+ -389, -383, -377, -372, -367, -363, -359, -355,

+ -351, -348, -345, -342, -340, -337, -335, -333,

+ -331, -330, -329, -328, -327, -326, -326, -326,

+ -326, -326, -326, -327, -328, -329, -330, -331,

+ -333, -335, -337, -340, -342, -345, -348, -351,

+ -355, -359, -363, -367, -372, -377, -383, -389,

+ -395, -402, -410, -417, -426, -435, -445, -456,

+ -466, -479, -492, -506, -521, -538, -557, -576,

+ -599, -621, -647, -676, -708, -743, -783, -827,

+ -880, -933, -1004, -1079, -1170, -1279, -1409, -1579,

+ -1771, -2064, -2405, -2979, -3799, -5243, -9039, -26214};

+

diff --git a/media/libstagefright/codecs/amrwbenc/inc/lag_wind.tab b/media/libstagefright/codecs/amrwbenc/inc/lag_wind.tab
new file mode 100644
index 0000000..4175d66
--- /dev/null
+++ b/media/libstagefright/codecs/amrwbenc/inc/lag_wind.tab
@@ -0,0 +1,81 @@
+/*

+ ** Copyright 2003-2010, VisualOn, Inc.

+ **

+ ** Licensed under the Apache License, Version 2.0 (the "License");

+ ** you may not use this file except in compliance with the License.

+ ** You may obtain a copy of the License at

+ **

+ **     http://www.apache.org/licenses/LICENSE-2.0

+ **

+ ** Unless required by applicable law or agreed to in writing, software

+ ** distributed under the License is distributed on an "AS IS" BASIS,

+ ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

+ ** See the License for the specific language governing permissions and

+ ** limitations under the License.

+ */

+

+

+/*-----------------------------------------------------*

+ | Table of lag_window for autocorrelation.            |

+ | noise floor = 1.0001   = (0.9999  on r[1] ..r[16])  |

+ | Bandwidth expansion = 60 Hz                         |

+ | Sampling frequency  = 12800 Hz                      |

+ |                                                     |

+ | Special double precision format. See "math_op.c"    |

+ |                                                     |

+ | lag_wind[0] =  1.00000000    (not stored)           |

+ | lag_wind[1] =  0.99946642                           |

+ | lag_wind[2] =  0.99816680                           |

+ | lag_wind[3] =  0.99600452                           |

+ | lag_wind[4] =  0.99298513                           |

+ | lag_wind[5] =  0.98911655                           |

+ | lag_wind[6] =  0.98440880                           |

+ | lag_wind[7] =  0.97887397                           |

+ | lag_wind[8] =  0.97252619                           |

+ | lag_wind[9] =  0.96538186                           |

+ | lag_wind[10]=  0.95745903                           |

+ | lag_wind[11]=  0.94877797                           |

+ | lag_wind[12]=  0.93936038                           |

+ | lag_wind[13]=  0.92922986                           |

+ | lag_wind[14]=  0.91841155                           |

+ | lag_wind[15]=  0.90693212                           |

+ | lag_wind[16]=  0.89481968                           |

+ ------------------------------------------------------*/

+

+#define M 16

+

+static Word16 volag_h[M] = {

+      32750,

+      32707,

+      32637,

+      32538,

+      32411,

+      32257,

+      32075,

+      31867,

+      31633,

+      31374,

+      31089,

+      30780,

+      30449,

+      30094,

+      29718,

+      29321};

+

+static Word16 volag_l[M] = {

+      16896,

+      30464,

+       2496,

+       4480,

+      12160,

+       3520,

+      24320,

+      24192,

+      20736,

+        576,

+      18240,

+      31488,

+        128,

+      16704,

+      11520,

+      14784};

diff --git a/media/libstagefright/codecs/amrwbenc/inc/log2.h b/media/libstagefright/codecs/amrwbenc/inc/log2.h
new file mode 100644
index 0000000..91bdbec
--- /dev/null
+++ b/media/libstagefright/codecs/amrwbenc/inc/log2.h
@@ -0,0 +1,62 @@
+

+/*

+ ** Copyright 2003-2010, VisualOn, Inc.

+ **

+ ** Licensed under the Apache License, Version 2.0 (the "License");

+ ** you may not use this file except in compliance with the License.

+ ** You may obtain a copy of the License at

+ **

+ **     http://www.apache.org/licenses/LICENSE-2.0

+ **

+ ** Unless required by applicable law or agreed to in writing, software

+ ** distributed under the License is distributed on an "AS IS" BASIS,

+ ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

+ ** See the License for the specific language governing permissions and

+ ** limitations under the License.

+ */

+

+

+/********************************************************************************

+*

+*      File             : log2.h

+*      Purpose          : Computes log2(L_x)

+*

+********************************************************************************

+*/

+#ifndef __LOG2_H__

+#define __LOG2_H__

+ 

+/*

+********************************************************************************

+*                         INCLUDE FILES

+********************************************************************************

+*/

+#include "typedef.h"

+ 

+/*

+********************************************************************************

+*                         DEFINITION OF DATA TYPES

+********************************************************************************

+*/

+ 

+/*

+********************************************************************************

+*                         DECLARATION OF PROTOTYPES

+********************************************************************************

+*/

+void Log2 (

+		Word32 L_x,        /* (i) : input value                                 */

+		Word16 *exponent,  /* (o) : Integer part of Log2.   (range: 0<=val<=30) */

+		Word16 *fraction   /* (o) : Fractional part of Log2. (range: 0<=val<1)*/

+	  );

+

+void Log2_norm (

+		Word32 L_x,         /* (i) : input value (normalized)                    */

+		Word16 exp,         /* (i) : norm_l (L_x)                                */

+		Word16 *exponent,   /* (o) : Integer part of Log2.   (range: 0<=val<=30) */

+		Word16 *fraction    /* (o) : Fractional part of Log2. (range: 0<=val<1)  */

+	       );

+

+#endif  //__LOG2_H__

+

+

diff --git a/media/libstagefright/codecs/amrwbenc/inc/log2_tab.h b/media/libstagefright/codecs/amrwbenc/inc/log2_tab.h
new file mode 100644
index 0000000..7761ae6
--- /dev/null
+++ b/media/libstagefright/codecs/amrwbenc/inc/log2_tab.h
@@ -0,0 +1,35 @@
+

+/*

+ ** Copyright 2003-2010, VisualOn, Inc.

+ **

+ ** Licensed under the Apache License, Version 2.0 (the "License");

+ ** you may not use this file except in compliance with the License.

+ ** You may obtain a copy of the License at

+ **

+ **     http://www.apache.org/licenses/LICENSE-2.0

+ **

+ ** Unless required by applicable law or agreed to in writing, software

+ ** distributed under the License is distributed on an "AS IS" BASIS,

+ ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

+ ** See the License for the specific language governing permissions and

+ ** limitations under the License.

+ */

+

+

+

+/*******************************************************************************

+*

+*      File             : log2.tab

+*      Purpose          : Table for routine Log2().

+*      $Id $

+*

+********************************************************************************

+*/

+static const Word16 table[33] =

+{

+    0, 1455, 2866, 4236, 5568, 6863, 8124, 9352, 10549, 11716,

+    12855, 13967, 15054, 16117, 17156, 18172, 19167, 20142, 21097, 22033,

+    22951, 23852, 24735, 25603, 26455, 27291, 28113, 28922, 29716, 30497,

+    31266, 32023, 32767

+};

+

diff --git a/media/libstagefright/codecs/amrwbenc/inc/main.h b/media/libstagefright/codecs/amrwbenc/inc/main.h
new file mode 100644
index 0000000..d7e7c67
--- /dev/null
+++ b/media/libstagefright/codecs/amrwbenc/inc/main.h
@@ -0,0 +1,45 @@
+

+/*

+ ** Copyright 2003-2010, VisualOn, Inc.

+ **

+ ** Licensed under the Apache License, Version 2.0 (the "License");

+ ** you may not use this file except in compliance with the License.

+ ** You may obtain a copy of the License at

+ **

+ **     http://www.apache.org/licenses/LICENSE-2.0

+ **

+ ** Unless required by applicable law or agreed to in writing, software

+ ** distributed under the License is distributed on an "AS IS" BASIS,

+ ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

+ ** See the License for the specific language governing permissions and

+ ** limitations under the License.

+ */

+

+

+/*--------------------------------------------------------------------------*

+ *                         MAIN.H	                                    *

+ *--------------------------------------------------------------------------*

+ *       Main functions							    *

+ *--------------------------------------------------------------------------*/

+

+#ifndef __MAIN_H__

+#define __MAIN_H__

+

+void coder(

+     Word16 * mode,                        /* input :  used mode                             */

+     Word16 speech16k[],                   /* input :  320 new speech samples (at 16 kHz)    */

+     Word16 prms[],                        /* output:  output parameters           */

+     Word16 * ser_size,                    /* output:  bit rate of the used mode   */

+     void *spe_state,                      /* i/o   :  State structure                       */

+     Word16 allow_dtx                      /* input :  DTX ON/OFF                            */

+);

+

+

+

+void Reset_encoder(void *st, Word16 reset_all);

+

+

+Word16 encoder_homing_frame_test(Word16 input_frame[]);

+

+#endif //__MAIN_H__

+

diff --git a/media/libstagefright/codecs/amrwbenc/inc/math_op.h b/media/libstagefright/codecs/amrwbenc/inc/math_op.h
new file mode 100644
index 0000000..25e29f7
--- /dev/null
+++ b/media/libstagefright/codecs/amrwbenc/inc/math_op.h
@@ -0,0 +1,55 @@
+/*

+ ** Copyright 2003-2010, VisualOn, Inc.

+ **

+ ** Licensed under the Apache License, Version 2.0 (the "License");

+ ** you may not use this file except in compliance with the License.

+ ** You may obtain a copy of the License at

+ **

+ **     http://www.apache.org/licenses/LICENSE-2.0

+ **

+ ** Unless required by applicable law or agreed to in writing, software

+ ** distributed under the License is distributed on an "AS IS" BASIS,

+ ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

+ ** See the License for the specific language governing permissions and

+ ** limitations under the License.

+ */

+

+

+/*--------------------------------------------------------------------------*

+ *                         MATH_OP.H	                                    *

+ *--------------------------------------------------------------------------*

+ *       Mathematical operations					    *

+ *--------------------------------------------------------------------------*/

+

+#ifndef __MATH_OP_H__

+#define __MATH_OP_H__

+

+Word32 Isqrt(                              /* (o) Q31 : output value (range: 0<=val<1)         */

+		Word32 L_x                            /* (i) Q0  : input value  (range: 0<=val<=7fffffff) */

+	    );

+

+void Isqrt_n(

+		Word32 * frac,                        /* (i/o) Q31: normalized value (1.0 < frac <= 0.5) */

+		Word16 * exp                          /* (i/o)    : exponent (value = frac x 2^exponent) */

+	    );

+

+Word32 Pow2(                               /* (o) Q0  : result       (range: 0<=val<=0x7fffffff) */

+		Word16 exponant,                      /* (i) Q0  : Integer part.      (range: 0<=val<=30)   */

+		Word16 fraction                       /* (i) Q15 : Fractionnal part.  (range: 0.0<=val<1.0) */

+	   );

+

+Word32 Dot_product12(                      /* (o) Q31: normalized result (1 < val <= -1) */

+		Word16 x[],                           /* (i) 12bits: x vector                       */

+		Word16 y[],                           /* (i) 12bits: y vector                       */

+		Word16 lg,                            /* (i)    : vector length                     */

+		Word16 * exp                          /* (o)    : exponent of result (0..+30)       */

+		);

+

+Word32 Dot_product12_asm(                      /* (o) Q31: normalized result (1 < val <= -1) */

+		Word16 x[],                           /* (i) 12bits: x vector                       */

+		Word16 y[],                           /* (i) 12bits: y vector                       */

+		Word16 lg,                            /* (i)    : vector length                     */

+		Word16 * exp                          /* (o)    : exponent of result (0..+30)       */

+		);

+#endif //__MATH_OP_H__

+

diff --git a/media/libstagefright/codecs/amrwbenc/inc/mem_align.h b/media/libstagefright/codecs/amrwbenc/inc/mem_align.h
new file mode 100644
index 0000000..d6ddec3
--- /dev/null
+++ b/media/libstagefright/codecs/amrwbenc/inc/mem_align.h
@@ -0,0 +1,35 @@
+/*

+ ** Copyright 2003-2010, VisualOn, Inc.

+ **

+ ** Licensed under the Apache License, Version 2.0 (the "License");

+ ** you may not use this file except in compliance with the License.

+ ** You may obtain a copy of the License at

+ **

+ **     http://www.apache.org/licenses/LICENSE-2.0

+ **

+ ** Unless required by applicable law or agreed to in writing, software

+ ** distributed under the License is distributed on an "AS IS" BASIS,

+ ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

+ ** See the License for the specific language governing permissions and

+ ** limitations under the License.

+ */

+/*******************************************************************************

+	File:		mem_align.h

+

+	Content:	Memory alloc alignments functions

+

+*******************************************************************************/

+

+#ifndef __VO_MEM_ALIGN_H__

+#define __VO_MEM_ALIGN_H__

+

+#include "voMem.h"

+#include "typedef.h"

+

+extern void *mem_malloc(VO_MEM_OPERATOR *pMemop, unsigned int size, unsigned char alignment, unsigned int CodecID);

+extern void mem_free(VO_MEM_OPERATOR *pMemop, void *mem_ptr, unsigned int CodecID);

+

+#endif	/* __VO_MEM_ALIGN_H__ */

+

+

+

diff --git a/media/libstagefright/codecs/amrwbenc/inc/mime_io.tab b/media/libstagefright/codecs/amrwbenc/inc/mime_io.tab
new file mode 100644
index 0000000..ffc86a1
--- /dev/null
+++ b/media/libstagefright/codecs/amrwbenc/inc/mime_io.tab
@@ -0,0 +1,368 @@
+

+/*

+ ** Copyright 2003-2010, VisualOn, Inc.

+ **

+ ** Licensed under the Apache License, Version 2.0 (the "License");

+ ** you may not use this file except in compliance with the License.

+ ** You may obtain a copy of the License at

+ **

+ **     http://www.apache.org/licenses/LICENSE-2.0

+ **

+ ** Unless required by applicable law or agreed to in writing, software

+ ** distributed under the License is distributed on an "AS IS" BASIS,

+ ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

+ ** See the License for the specific language governing permissions and

+ ** limitations under the License.

+ */

+

+#include <stdio.h>

+#include "typedef.h"

+

+static UWord8 toc_byte[16] = {0x04, 0x0C, 0x14, 0x1C, 0x24, 0x2C, 0x34, 0x3C,

+                              0x44, 0x4C, 0x54, 0x5C, 0x64, 0x6C, 0x74, 0x7C};

+

+/* number of speech bits for all modes */

+static Word16 unpacked_size[16] = {132,  177, 253, 285, 317, 365, 397, 461,

+                                   477,   35,   0,   0,   0,   0,   0,   0};

+

+/* size of packed frame for each mode, excluding TOC byte */

+static Word16 packed_size[16] = {17, 23, 32, 36, 40, 46, 50, 58,

+                                 60,  5,  0,  0,  0,  0,  0,  0};

+

+/* number of unused speech bits in packed format for each mode */

+static Word16 unused_size[16] = {4, 7, 3, 3, 3, 3, 3, 3, 3, 0, 0, 0, 0, 0, 0, 0};

+

+/* sorting tables for all modes */

+

+static Word16 sort_660[132] = {

+     0,   5,   6,   7,  61,  84, 107, 130,  62,  85,

+     8,   4,  37,  38,  39,  40,  58,  81, 104, 127,

+    60,  83, 106, 129, 108, 131, 128,  41,  42,  80,

+   126,   1,   3,  57, 103,  82, 105,  59,   2,  63,

+   109, 110,  86,  19,  22,  23,  64,  87,  18,  20,

+    21,  17,  13,  88,  43,  89,  65, 111,  14,  24,

+    25,  26,  27,  28,  15,  16,  44,  90,  66, 112,

+     9,  11,  10,  12,  67, 113,  29,  30,  31,  32,

+    34,  33,  35,  36,  45,  51,  68,  74,  91,  97,

+   114, 120,  46,  69,  92, 115,  52,  75,  98, 121,

+    47,  70,  93, 116,  53,  76,  99, 122,  48,  71,

+    94, 117,  54,  77, 100, 123,  49,  72,  95, 118,

+    55,  78, 101, 124,  50,  73,  96, 119,  56,  79,

+   102, 125

+};

+

+static Word16 sort_885[177] = {

+     0,   4,   6,   7,   5,   3,  47,  48,  49, 112,

+   113, 114,  75, 106, 140, 171,  80, 111, 145, 176,

+    77, 108, 142, 173,  78, 109, 143, 174,  79, 110,

+   144, 175,  76, 107, 141, 172,  50, 115,  51,   2,

+     1,  81, 116, 146,  19,  21,  12,  17,  18,  20,

+    16,  25,  13,  10,  14,  24,  23,  22,  26,   8,

+    15,  52, 117,  31,  82, 147,   9,  33,  11,  83,

+   148,  53, 118,  28,  27,  84, 149,  34,  35,  29,

+    46,  32,  30,  54, 119,  37,  36,  39,  38,  40,

+    85, 150,  41,  42,  43,  44,  45,  55,  60,  65,

+    70,  86,  91,  96, 101, 120, 125, 130, 135, 151,

+   156, 161, 166,  56,  87, 121, 152,  61,  92, 126,

+   157,  66,  97, 131, 162,  71, 102, 136, 167,  57,

+    88, 122, 153,  62,  93, 127, 158,  67,  98, 132,

+   163,  72, 103, 137, 168,  58,  89, 123, 154,  63,

+    94, 128, 159,  68,  99, 133, 164,  73, 104, 138,

+   169,  59,  90, 124, 155,  64,  95, 129, 160,  69,

+   100, 134, 165,  74, 105, 139, 170

+};

+

+static Word16 sort_1265[253] = {

+     0,   4,   6,  93, 143, 196, 246,   7,   5,   3,

+    47,  48,  49,  50,  51, 150, 151, 152, 153, 154,

+    94, 144, 197, 247,  99, 149, 202, 252,  96, 146,

+   199, 249,  97, 147, 200, 250, 100, 203,  98, 148,

+   201, 251,  95, 145, 198, 248,  52,   2,   1, 101,

+   204, 155,  19,  21,  12,  17,  18,  20,  16,  25,

+    13,  10,  14,  24,  23,  22,  26,   8,  15,  53,

+   156,  31, 102, 205,   9,  33,  11, 103, 206,  54,

+   157,  28,  27, 104, 207,  34,  35,  29,  46,  32,

+    30,  55, 158,  37,  36,  39,  38,  40, 105, 208,

+    41,  42,  43,  44,  45,  56, 106, 159, 209,  57,

+    66,  75,  84, 107, 116, 125, 134, 160, 169, 178,

+   187, 210, 219, 228, 237,  58, 108, 161, 211,  62,

+   112, 165, 215,  67, 117, 170, 220,  71, 121, 174,

+   224,  76, 126, 179, 229,  80, 130, 183, 233,  85,

+   135, 188, 238,  89, 139, 192, 242,  59, 109, 162,

+   212,  63, 113, 166, 216,  68, 118, 171, 221,  72,

+   122, 175, 225,  77, 127, 180, 230,  81, 131, 184,

+   234,  86, 136, 189, 239,  90, 140, 193, 243,  60,

+   110, 163, 213,  64, 114, 167, 217,  69, 119, 172,

+   222,  73, 123, 176, 226,  78, 128, 181, 231,  82,

+   132, 185, 235,  87, 137, 190, 240,  91, 141, 194,

+   244,  61, 111, 164, 214,  65, 115, 168, 218,  70,

+   120, 173, 223,  74, 124, 177, 227,  79, 129, 182,

+   232,  83, 133, 186, 236,  88, 138, 191, 241,  92,

+   142, 195, 245                         

+};

+

+static Word16 sort_1425[285] = {

+     0,   4,   6, 101, 159, 220, 278,   7,   5,   3,

+    47,  48,  49,  50,  51, 166, 167, 168, 169, 170,

+   102, 160, 221, 279, 107, 165, 226, 284, 104, 162,

+   223, 281, 105, 163, 224, 282, 108, 227, 106, 164,

+   225, 283, 103, 161, 222, 280,  52,   2,   1, 109,

+   228, 171,  19,  21,  12,  17,  18,  20,  16,  25,

+    13,  10,  14,  24,  23,  22,  26,   8,  15,  53,

+   172,  31, 110, 229,   9,  33,  11, 111, 230,  54,

+   173,  28,  27, 112, 231,  34,  35,  29,  46,  32,

+    30,  55, 174,  37,  36,  39,  38,  40, 113, 232,

+    41,  42,  43,  44,  45,  56, 114, 175, 233,  62,

+   120, 181, 239,  75, 133, 194, 252,  57, 115, 176,

+   234,  63, 121, 182, 240,  70, 128, 189, 247,  76,

+   134, 195, 253,  83, 141, 202, 260,  92, 150, 211,

+   269,  84, 142, 203, 261,  93, 151, 212, 270,  85,

+   143, 204, 262,  94, 152, 213, 271,  86, 144, 205,

+   263,  95, 153, 214, 272,  64, 122, 183, 241,  77,

+   135, 196, 254,  65, 123, 184, 242,  78, 136, 197,

+   255,  87, 145, 206, 264,  96, 154, 215, 273,  58,

+   116, 177, 235,  66, 124, 185, 243,  71, 129, 190,

+   248,  79, 137, 198, 256,  88, 146, 207, 265,  97,

+   155, 216, 274,  59, 117, 178, 236,  67, 125, 186,

+   244,  72, 130, 191, 249,  80, 138, 199, 257,  89,

+   147, 208, 266,  98, 156, 217, 275,  60, 118, 179,

+   237,  68, 126, 187, 245,  73, 131, 192, 250,  81,

+   139, 200, 258,  90, 148, 209, 267,  99, 157, 218,

+   276,  61, 119, 180, 238,  69, 127, 188, 246,  74,

+   132, 193, 251,  82, 140, 201, 259,  91, 149, 210,

+   268, 100, 158, 219, 277

+};

+

+static Word16 sort_1585[317] = {

+     0,   4,   6, 109, 175, 244, 310,   7,   5,   3,

+    47,  48,  49,  50,  51, 182, 183, 184, 185, 186,

+   110, 176, 245, 311, 115, 181, 250, 316, 112, 178,

+   247, 313, 113, 179, 248, 314, 116, 251, 114, 180,

+   249, 315, 111, 177, 246, 312,  52,   2,   1, 117,

+   252, 187,  19,  21,  12,  17,  18,  20,  16,  25,

+    13,  10,  14,  24,  23,  22,  26,   8,  15,  53,

+   188,  31, 118, 253,   9,  33,  11, 119, 254,  54,

+   189,  28,  27, 120, 255,  34,  35,  29,  46,  32,

+    30,  55, 190,  37,  36,  39,  38,  40, 121, 256,

+    41,  42,  43,  44,  45,  56, 122, 191, 257,  63,

+   129, 198, 264,  76, 142, 211, 277,  89, 155, 224,

+   290, 102, 168, 237, 303,  57, 123, 192, 258,  70,

+   136, 205, 271,  83, 149, 218, 284,  96, 162, 231,

+   297,  62, 128, 197, 263,  75, 141, 210, 276,  88,

+   154, 223, 289, 101, 167, 236, 302,  58, 124, 193,

+   259,  71, 137, 206, 272,  84, 150, 219, 285,  97,

+   163, 232, 298,  59, 125, 194, 260,  64, 130, 199,

+   265,  67, 133, 202, 268,  72, 138, 207, 273,  77,

+   143, 212, 278,  80, 146, 215, 281,  85, 151, 220,

+   286,  90, 156, 225, 291,  93, 159, 228, 294,  98,

+   164, 233, 299, 103, 169, 238, 304, 106, 172, 241,

+   307,  60, 126, 195, 261,  65, 131, 200, 266,  68,

+   134, 203, 269,  73, 139, 208, 274,  78, 144, 213,

+   279,  81, 147, 216, 282,  86, 152, 221, 287,  91,

+   157, 226, 292,  94, 160, 229, 295,  99, 165, 234,

+   300, 104, 170, 239, 305, 107, 173, 242, 308,  61,

+   127, 196, 262,  66, 132, 201, 267,  69, 135, 204,

+   270,  74, 140, 209, 275,  79, 145, 214, 280,  82,

+   148, 217, 283,  87, 153, 222, 288,  92, 158, 227,

+   293,  95, 161, 230, 296, 100, 166, 235, 301, 105,

+   171, 240, 306, 108, 174, 243, 309

+};

+

+static Word16 sort_1825[365] = {

+     0,   4,   6, 121, 199, 280, 358,   7,   5,   3,

+    47,  48,  49,  50,  51, 206, 207, 208, 209, 210,

+   122, 200, 281, 359, 127, 205, 286, 364, 124, 202,

+   283, 361, 125, 203, 284, 362, 128, 287, 126, 204,

+   285, 363, 123, 201, 282, 360,  52,   2,   1, 129,

+   288, 211,  19,  21,  12,  17,  18,  20,  16,  25,

+    13,  10,  14,  24,  23,  22,  26,   8,  15,  53,

+   212,  31, 130, 289,   9,  33,  11, 131, 290,  54,

+   213,  28,  27, 132, 291,  34,  35,  29,  46,  32,

+    30,  55, 214,  37,  36,  39,  38,  40, 133, 292,

+    41,  42,  43,  44,  45,  56, 134, 215, 293, 198,

+   299, 136, 120, 138,  60, 279,  58,  62, 357, 139,

+   140, 295, 156,  57, 219, 297,  63, 217, 137, 170,

+   300, 222,  64, 106,  61,  78, 294,  92, 142, 141,

+   135, 221, 296, 301, 343,  59, 298, 184, 329, 315,

+   220, 216, 265, 251, 218, 237, 352, 223, 157,  86,

+   171,  87, 164, 351, 111, 302,  65, 178, 115, 323,

+    72, 192, 101, 179,  93,  73, 193, 151, 337, 309,

+   143, 274,  69, 324, 165, 150,  97, 338, 110, 310,

+   330, 273,  68, 107, 175, 245, 114,  79, 113, 189,

+   246, 259, 174,  71, 185,  96, 344, 100, 322,  83,

+   334, 316, 333, 252, 161, 348, 147,  82, 269, 232,

+   260, 308, 353, 347, 163, 231, 306, 320, 188, 270,

+   146, 177, 266, 350, 256,  85, 149, 116, 191, 160,

+   238, 258, 336, 305, 255,  88, 224,  99, 339, 230,

+   228, 227, 272, 242, 241, 319, 233, 311, 102,  74,

+   180, 275,  66, 194, 152, 325, 172, 247, 244, 261,

+   117, 158, 166, 354,  75, 144, 108, 312,  94, 186,

+   303,  80, 234,  89, 195, 112, 340, 181, 345, 317,

+   326, 276, 239, 167, 118, 313,  70, 355, 327, 253,

+   190, 176, 271, 104,  98, 153, 103,  90,  76, 267,

+   277, 248, 225, 262, 182,  84, 154, 235, 335, 168,

+   331, 196, 341, 249, 162, 307, 148, 349, 263, 321,

+   257, 243, 229, 356, 159, 119,  67, 187, 173, 145,

+   240,  77, 304, 332, 314, 342, 109, 254,  81, 278,

+   105,  91, 346, 318, 183, 250, 197, 328,  95, 155,

+   169, 268, 226, 236, 264                 

+};

+

+static Word16 sort_1985[397] = {

+     0,   4,   6, 129, 215, 304, 390,   7,   5,   3,

+    47,  48,  49,  50,  51, 222, 223, 224, 225, 226,

+   130, 216, 305, 391, 135, 221, 310, 396, 132, 218,

+   307, 393, 133, 219, 308, 394, 136, 311, 134, 220,

+   309, 395, 131, 217, 306, 392,  52,   2,   1, 137,

+   312, 227,  19,  21,  12,  17,  18,  20,  16,  25,

+    13,  10,  14,  24,  23,  22,  26,   8,  15,  53,

+   228,  31, 138, 313,   9,  33,  11, 139, 314,  54,

+   229,  28,  27, 140, 315,  34,  35,  29,  46,  32,

+    30,  55, 230,  37,  36,  39,  38,  40, 141, 316,

+    41,  42,  43,  44,  45,  56, 142, 231, 317,  63,

+    73,  92, 340,  82, 324, 149, 353, 159, 334, 165,

+   338, 178, 163, 254,  77, 168, 257, 153, 343,  57,

+   248, 238,  79, 252, 166,  67,  80, 201, 101, 267,

+   143, 164, 341, 255, 339, 187, 376, 318,  78, 328,

+   362, 115, 232, 242, 253, 290, 276,  62,  58, 158,

+    68,  93, 179, 319, 148, 169, 154,  72, 385, 329,

+   333, 344, 102,  83, 144, 233, 323, 124, 243, 192,

+   354, 237,  64, 247, 202, 209, 150, 116, 335, 268,

+   239, 299, 188, 196, 298,  94, 195, 258, 123, 363,

+   384, 109, 325, 371, 170, 370,  84, 110, 295, 180,

+    74, 210, 191, 106, 291, 205, 367, 381, 377, 206,

+   355, 122, 119, 120, 383, 160, 105, 108, 277, 380,

+   294, 284, 285, 345, 208, 269, 249, 366, 386, 300,

+   297, 259, 125, 369, 197,  97, 194, 286, 211, 281,

+   280, 183, 372,  87, 155, 283,  59, 348, 327, 184,

+    76, 111, 330, 203, 349,  69,  98, 152, 145, 189,

+    66, 320, 337, 173, 358, 251, 198, 174, 263, 262,

+   126, 241, 193,  88, 388, 117,  95, 387, 112, 359,

+   287, 244, 103, 272, 301, 171, 162, 234, 273, 127,

+   373, 181, 292,  85, 378, 302, 121, 107, 364, 346,

+   356, 212, 278, 213,  65, 382, 288, 207, 113, 175,

+    99, 296, 374, 368, 199, 260, 185, 336, 331, 161,

+   270, 264, 250, 240,  75, 350, 151,  60,  89, 321,

+   156, 274, 360, 326,  70, 282, 167, 146, 352,  81,

+    91, 389, 266, 245, 177, 235, 190, 256, 204, 342,

+   128, 118, 303, 104, 379, 182, 114, 375, 200,  96,

+   293, 172, 214, 365, 279,  86, 289, 351, 347, 357,

+   261, 186, 176, 271,  90, 100, 147, 322, 275, 361,

+    71, 332,  61, 265, 157, 246, 236         

+};

+

+static Word16 sort_2305[461] = {

+     0,   4,   6, 145, 247, 352, 454,   7,   5,   3,

+    47,  48,  49,  50,  51, 254, 255, 256, 257, 258,

+   146, 248, 353, 455, 151, 253, 358, 460, 148, 250,

+   355, 457, 149, 251, 356, 458, 152, 359, 150, 252,

+   357, 459, 147, 249, 354, 456,  52,   2,   1, 153,

+   360, 259,  19,  21,  12,  17,  18,  20,  16,  25,

+    13,  10,  14,  24,  23,  22,  26,   8,  15,  53,

+   260,  31, 154, 361,   9,  33,  11, 155, 362,  54,

+   261,  28,  27, 156, 363,  34,  35,  29,  46,  32,

+    30,  55, 262,  37,  36,  39,  38,  40, 157, 364,

+    41,  42,  43,  44,  45,  56, 158, 263, 365, 181,

+   192, 170,  79,  57, 399,  90, 159, 297, 377, 366,

+   275,  68, 183, 388, 286, 194, 299, 92 ,  70, 182,

+   401, 172,  59,  91,  58, 400, 368, 161,  81, 160,

+   264, 171,  80, 389, 390, 378, 379, 193, 298,  69,

+   266, 265, 367, 277, 288, 276, 287, 184,  60, 195,

+    82,  93,  71, 369, 402, 173, 162, 444, 300, 391,

+    98,  76, 278,  61, 267, 374, 135, 411, 167, 102,

+   380, 200,  87, 178,  65,  94, 204, 124,  72, 342,

+   189, 305, 381, 396, 433, 301, 226, 407, 289, 237,

+   113, 215, 185, 128, 309, 403, 116, 320, 196, 331,

+   370, 422, 174,  64, 392,  83, 425, 219, 134, 188,

+   432, 112, 427, 139, 279, 163, 436, 208, 447, 218,

+   236, 229,  97, 294, 385, 230, 166, 268, 177, 443,

+   225, 426, 101, 272, 138, 127, 290, 117, 347, 199,

+   414,  95, 140, 240, 410, 395, 209, 129, 283, 346,

+   105, 241, 437,  86, 308, 448, 203, 345, 186, 107,

+   220, 415, 334, 319, 106, 313, 118, 123,  73, 207,

+   421, 214, 384, 373, 438,  62, 371, 341,  75, 449,

+   168, 323, 164, 242, 416, 324, 304, 197, 335, 404,

+   271,  63, 191, 325,  96, 169, 231, 280, 312, 187,

+   406,  84, 201, 100,  67, 382, 175, 336, 202, 330,

+   269, 393, 376, 383, 293, 307, 409, 179, 285, 314,

+   302, 372, 398, 190, 180,  89,  99, 103, 232,  78,

+    88,  77, 136, 387, 165, 198, 394, 125, 176, 428,

+    74, 375, 238, 227,  66, 273, 282, 141, 306, 412,

+   114,  85, 130, 348, 119, 291, 296, 386, 233, 397,

+   303, 405, 284, 445, 423, 221, 210, 205, 450, 108,

+   274, 434, 216, 343, 337, 142, 243, 321, 408, 451,

+   310, 292, 120, 109, 281, 439, 270, 429, 332, 295,

+   418, 211, 315, 222, 326, 131, 430, 244, 327, 349,

+   417, 316, 143, 338, 440, 234, 110, 212, 452, 245,

+   121, 419, 350, 223, 132, 441, 328, 413, 317, 339,

+   126, 104, 137, 446, 344, 239, 435, 115, 333, 206,

+   322, 217, 228, 424, 453, 311, 351, 111, 442, 224,

+   213, 122, 431, 340, 235, 246, 133, 144, 420, 329,

+   318

+};

+

+static Word16 sort_2385[477] = {

+     0,   4,   6, 145, 251, 360, 466,   7,   5,   3,

+    47,  48,  49,  50,  51, 262, 263, 264, 265, 266,

+   146, 252, 361, 467, 151, 257, 366, 472, 148, 254,

+   363, 469, 149, 255, 364, 470, 156, 371, 150, 256,

+   365, 471, 147, 253, 362, 468,  52,   2,   1, 157,

+   372, 267,  19,  21,  12,  17,  18,  20,  16,  25,

+    13,  10,  14,  24,  23,  22,  26,   8,  15,  53,

+   268,  31, 152, 153, 154, 155, 258, 259, 260, 261,

+   367, 368, 369, 370, 473, 474, 475, 476, 158, 373,

+     9,  33,  11, 159, 374,  54, 269,  28,  27, 160,

+   375,  34,  35,  29,  46,  32,  30,  55, 270, 37,

+    36,  39,  38,  40, 161, 376,  41,  42,  43,  44,

+    45,  56, 162, 271, 377, 185, 196, 174,  79,  57,

+   411,  90, 163, 305, 389, 378, 283,  68, 187, 400,

+   294, 198, 307,  92,  70, 186, 413, 176,  59,  91,

+    58, 412, 380, 165,  81, 164, 272, 175,  80, 401,

+   402, 390, 391, 197, 306,  69, 274, 273, 379, 285,

+   296, 284, 295, 188,  60, 199,  82,  93,  71, 381,

+   414, 177, 166, 456, 308, 403,  98,  76, 286,  61,

+   275, 386, 135, 423, 171, 102, 392, 204,  87, 182,

+    65,  94, 208, 124,  72, 350, 193, 313, 393, 408,

+   445, 309, 230, 419, 297, 241, 113, 219, 189, 128,

+   317, 415, 116, 328, 200, 339, 382, 434, 178,  64,

+   404,  83, 437, 223, 134, 192, 444, 112, 439, 139,

+   287, 167, 448, 212, 459, 222, 240, 233,  97, 302,

+   397, 234, 170, 276, 181, 455, 229, 438, 101, 280,

+   138, 127, 298, 117, 355, 203, 426,  95, 140, 244,

+   422, 407, 213, 129, 291, 354, 105, 245, 449,  86,

+   316, 460, 207, 353, 190, 107, 224, 427, 342, 327,

+   106, 321, 118, 123,  73, 211, 433, 218, 396, 385,

+   450,  62, 383, 349,  75, 461, 172, 331, 168, 246,

+   428, 332, 312, 201, 343, 416, 279,  63, 195, 333,

+    96, 173, 235, 288, 320, 191, 418,  84, 205, 100,

+    67, 394, 179, 344, 206, 338, 277, 405, 388, 395,

+   301, 315, 421, 183, 293, 322, 310, 384, 410, 194,

+   184,  89,  99, 103, 236,  78,  88,  77, 136, 399,

+   169, 202, 406, 125, 180, 440,  74, 387, 242, 231,

+    66, 281, 290, 141, 314, 424, 114,  85, 130, 356,

+   119, 299, 304, 398, 237, 409, 311, 417, 292, 457,

+   435, 225, 214, 209, 462, 108, 282, 446, 220, 351,

+   345, 142, 247, 329, 420, 463, 318, 300, 120, 109,

+   289, 451, 278, 441, 340, 303, 430, 215, 323, 226,

+   334, 131, 442, 248, 335, 357, 429, 324, 143, 346,

+   452, 238, 110, 216, 464, 249, 121, 431, 358, 227,

+   132, 453, 336, 425, 325, 347, 126, 104, 137, 458,

+   352, 243, 447, 115, 341, 210, 330, 221, 232, 436,

+   465, 319, 359, 111, 454, 228, 217, 122, 443, 348,

+   239, 250, 133, 144, 432, 337, 326         

+};

+

+static Word16 sort_SID[35] = {

+    0,  1,  2,  3,  4,  5,  6,  7,  8,  9,

+   10, 11, 12, 13, 14, 15, 16, 17, 18, 19,

+   20, 21, 22, 23, 24, 25, 26, 27, 28, 29,

+   30, 31, 32, 33, 34

+};

+

+/* pointer table for bit sorting tables */

+static Word16 *sort_ptr[16] = { sort_660, sort_885, sort_1265, sort_1425, sort_1585, sort_1825, sort_1985, sort_2305,

+                               sort_2385, sort_SID,      NULL,      NULL,      NULL,      NULL,      NULL,      NULL};

+

+

+

+

diff --git a/media/libstagefright/codecs/amrwbenc/inc/oper_32b.h b/media/libstagefright/codecs/amrwbenc/inc/oper_32b.h
new file mode 100644
index 0000000..4159d84
--- /dev/null
+++ b/media/libstagefright/codecs/amrwbenc/inc/oper_32b.h
@@ -0,0 +1,31 @@
+/*

+ ** Copyright 2003-2010, VisualOn, Inc.

+ **

+ ** Licensed under the Apache License, Version 2.0 (the "License");

+ ** you may not use this file except in compliance with the License.

+ ** You may obtain a copy of the License at

+ **

+ **     http://www.apache.org/licenses/LICENSE-2.0

+ **

+ ** Unless required by applicable law or agreed to in writing, software

+ ** distributed under the License is distributed on an "AS IS" BASIS,

+ ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

+ ** See the License for the specific language governing permissions and

+ ** limitations under the License.

+ */

+

+

+/* Double precision operations */

+/* $Id$ */

+

+#ifndef __OPER_32B_H__

+#define __OPER_32B_H__

+

+void VO_L_Extract (Word32 L_32, Word16 *hi, Word16 *lo);

+Word32 L_Comp (Word16 hi, Word16 lo);

+Word32 Mpy_32 (Word16 hi1, Word16 lo1, Word16 hi2, Word16 lo2);

+Word32 Mpy_32_16 (Word16 hi, Word16 lo, Word16 n);

+Word32 Div_32 (Word32 L_num, Word16 denom_hi, Word16 denom_lo);

+

+#endif //__OPER_32B_H__

+

diff --git a/media/libstagefright/codecs/amrwbenc/inc/p_med_o.h b/media/libstagefright/codecs/amrwbenc/inc/p_med_o.h
new file mode 100644
index 0000000..27c4c7e
--- /dev/null
+++ b/media/libstagefright/codecs/amrwbenc/inc/p_med_o.h
@@ -0,0 +1,52 @@
+/*

+ ** Copyright 2003-2010, VisualOn, Inc.

+ **

+ ** Licensed under the Apache License, Version 2.0 (the "License");

+ ** you may not use this file except in compliance with the License.

+ ** You may obtain a copy of the License at

+ **

+ **     http://www.apache.org/licenses/LICENSE-2.0

+ **

+ ** Unless required by applicable law or agreed to in writing, software

+ ** distributed under the License is distributed on an "AS IS" BASIS,

+ ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

+ ** See the License for the specific language governing permissions and

+ ** limitations under the License.

+ */

+

+/*--------------------------------------------------------------------------*

+ *                         P_MED_O.H                                        *

+ *--------------------------------------------------------------------------*

+ *       Median open-loop lag search				            *

+ *--------------------------------------------------------------------------*/

+

+#ifndef __P_MED_O_H__

+#define __P_MED_O_H__

+

+Word16 Pitch_med_ol(                       /* output: open loop pitch lag                        */

+		Word16 wsp[],                         /* input : signal used to compute the open loop pitch */

+		/* wsp[-pit_max] to wsp[-1] should be known   */

+		Word16 L_min,                         /* input : minimum pitch lag                          */

+		Word16 L_max,                         /* input : maximum pitch lag                          */

+		Word16 L_frame,                       /* input : length of frame to compute pitch           */

+		Word16 L_0,                           /* input : old_ open-loop pitch                       */

+		Word16 * gain,                        /* output: normalize correlation of hp_wsp for the Lag */

+		Word16 * hp_wsp_mem,                  /* i:o   : memory of the hypass filter for hp_wsp[] (lg=9)   */

+		Word16 * old_hp_wsp,                  /* i:o   : hypass wsp[]                               */

+		Word16 wght_flg                       /* input : is weighting function used                 */

+		);

+

+Word16 Med_olag(                           /* output : median of  5 previous open-loop lags       */

+		Word16 prev_ol_lag,                   /* input  : previous open-loop lag                     */

+		Word16 old_ol_lag[5]

+	       );

+

+void Hp_wsp(

+		Word16 wsp[],                         /* i   : wsp[]  signal       */

+		Word16 hp_wsp[],                      /* o   : hypass wsp[]        */

+		Word16 lg,                            /* i   : lenght of signal    */

+		Word16 mem[]                          /* i/o : filter memory [9]   */

+	   );

+

+#endif  //__P_MED_O_H__

+

diff --git a/media/libstagefright/codecs/amrwbenc/inc/p_med_ol.tab b/media/libstagefright/codecs/amrwbenc/inc/p_med_ol.tab
new file mode 100644
index 0000000..14bd1d5
--- /dev/null
+++ b/media/libstagefright/codecs/amrwbenc/inc/p_med_ol.tab
@@ -0,0 +1,47 @@
+

+/*

+ ** Copyright 2003-2010, VisualOn, Inc.

+ **

+ ** Licensed under the Apache License, Version 2.0 (the "License");

+ ** you may not use this file except in compliance with the License.

+ ** You may obtain a copy of the License at

+ **

+ **     http://www.apache.org/licenses/LICENSE-2.0

+ **

+ ** Unless required by applicable law or agreed to in writing, software

+ ** distributed under the License is distributed on an "AS IS" BASIS,

+ ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

+ ** See the License for the specific language governing permissions and

+ ** limitations under the License.

+ */

+

+

+/*-----------------------------------------------------*

+ | Table for function Pitch_med_ol()				   |

+ *-----------------------------------------------------*/

+

+ static Word16 corrweight[199]= {

+

+ 10772, 10794, 10816, 10839, 10862, 10885, 10908, 10932, 10955, 10980,

+ 11004, 11029, 11054, 11079, 11105, 11131, 11157, 11183, 11210, 11238,

+ 11265, 11293, 11322, 11350, 11379, 11409, 11439, 11469, 11500, 11531,

+ 11563, 11595, 11628, 11661, 11694, 11728, 11763, 11798, 11834, 11870,

+ 11907, 11945, 11983, 12022, 12061, 12101, 12142, 12184, 12226, 12270,

+ 12314, 12358, 12404, 12451, 12498, 12547, 12596, 12647, 12699, 12751,

+ 12805, 12861, 12917, 12975, 13034, 13095, 13157, 13221, 13286, 13353,

+ 13422, 13493, 13566, 13641, 13719, 13798, 13880, 13965, 14053, 14143,

+ 14237, 14334, 14435, 14539, 14648, 14761, 14879, 15002, 15130, 15265,

+ 15406, 15554, 15710, 15874, 16056, 16384, 16384, 16384, 16384, 16384,

+ 16384, 16384, 16056, 15874, 15710, 15554, 15406, 15265, 15130, 15002,

+ 14879, 14761, 14648, 14539, 14435, 14334, 14237, 14143, 14053, 13965,

+ 13880, 13798, 13719, 13641, 13566, 13493, 13422, 13353, 13286, 13221,

+ 13157, 13095, 13034, 12975, 12917, 12861, 12805, 12751, 12699, 12647,

+ 12596, 12547, 12498, 12451, 12404, 12358, 12314, 12270, 12226, 12184,

+ 12142, 12101, 12061, 12022, 11983, 11945, 11907, 11870, 11834, 11798,

+ 11763, 11728, 11694, 11661, 11628, 11595, 11563, 11531, 11500, 11469,

+ 11439, 11409, 11379, 11350, 11322, 11293, 11265, 11238, 11210, 11183,

+ 11157, 11131, 11105, 11079, 11054, 11029, 11004, 10980, 10955, 10932,

+ 10908, 10885, 10862, 10839, 10816, 10794, 10772, 10750, 10728};

+

+

+

diff --git a/media/libstagefright/codecs/amrwbenc/inc/q_gain2.tab b/media/libstagefright/codecs/amrwbenc/inc/q_gain2.tab
new file mode 100644
index 0000000..1a0deee
--- /dev/null
+++ b/media/libstagefright/codecs/amrwbenc/inc/q_gain2.tab
@@ -0,0 +1,228 @@
+

+/*

+ ** Copyright 2003-2010, VisualOn, Inc.

+ **

+ ** Licensed under the Apache License, Version 2.0 (the "License");

+ ** you may not use this file except in compliance with the License.

+ ** You may obtain a copy of the License at

+ **

+ **     http://www.apache.org/licenses/LICENSE-2.0

+ **

+ ** Unless required by applicable law or agreed to in writing, software

+ ** distributed under the License is distributed on an "AS IS" BASIS,

+ ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

+ ** See the License for the specific language governing permissions and

+ ** limitations under the License.

+ */

+

+

+/*------------------------------------------------------*

+ * Tables for function q_gain2()                        *

+ *                                                      *

+ *  g_pitch(Q14),  g_code(Q11)                          *

+ *                                                      *

+ * pitch gain are ordered in table to reduce complexity *

+ * during quantization of gains.                        *

+ *------------------------------------------------------*/

+

+#define nb_qua_gain6b  64     /* Number of quantization level */

+#define nb_qua_gain7b  128    /* Number of quantization level */

+

+

+static Word16 t_qua_gain6b[64*2] = {

+   1566,  1332,

+   1577,  3557,

+   3071,  6490,

+   4193, 10163,

+   4496,  2534,

+   5019,  4488,

+   5586, 15614,

+   5725,  1422,

+   6453,   580,

+   6724,  6831,

+   7657,  3527,

+   8072,  2099,

+   8232,  5319,

+   8827,  8775,

+   9740,  2868,

+   9856,  1465,

+  10087, 12488,

+  10241,  4453,

+  10859,  6618,

+  11321,  3587,

+  11417,  1800,

+  11643,  2428,

+  11718,   988,

+  12312,  5093,

+  12523,  8413,

+  12574, 26214,

+  12601,  3396,

+  13172,  1623,

+  13285,  2423,

+  13418,  6087,

+  13459, 12810,

+  13656,  3607,

+  14111,  4521,

+  14144,  1229,

+  14425,  1871,

+  14431,  7234,

+  14445,  2834,

+  14628, 10036,

+  14860, 17496,

+  15161,  3629,

+  15209,  5819,

+  15299,  2256,

+  15518,  4722,

+  15663,  1060,

+  15759,  7972,

+  15939, 11964,

+  16020,  2996,

+  16086,  1707,

+  16521,  4254,

+  16576,  6224,

+  16894,  2380,

+  16906,   681,

+  17213,  8406,

+  17610,  3418,

+  17895,  5269,

+  18168, 11748,

+  18230,  1575,

+  18607, 32767,

+  18728, 21684,

+  19137,  2543,

+  19422,  6577,

+  19446,  4097,

+  19450,  9056,

+  20371, 14885};

+

+static Word16 t_qua_gain7b[128*2] = {

+    204,   441,

+    464,  1977,

+    869,  1077,

+   1072,  3062,

+   1281,  4759,

+   1647,  1539,

+   1845,  7020,

+   1853,   634,

+   1995,  2336,

+   2351, 15400,

+   2661,  1165,

+   2702,  3900,

+   2710, 10133,

+   3195,  1752,

+   3498,  2624,

+   3663,   849,

+   3984,  5697,

+   4214,  3399,

+   4415,  1304,

+   4695,  2056,

+   5376,  4558,

+   5386,   676,

+   5518, 23554,

+   5567,  7794,

+   5644,  3061,

+   5672,  1513,

+   5957,  2338,

+   6533,  1060,

+   6804,  5998,

+   6820,  1767,

+   6937,  3837,

+   7277,   414,

+   7305,  2665,

+   7466, 11304,

+   7942,   794,

+   8007,  1982,

+   8007,  1366,

+   8326,  3105,

+   8336,  4810,

+   8708,  7954,

+   8989,  2279,

+   9031,  1055,

+   9247,  3568,

+   9283,  1631,

+   9654,  6311,

+   9811,  2605,

+  10120,   683,

+  10143,  4179,

+  10245,  1946,

+  10335,  1218,

+  10468,  9960,

+  10651,  3000,

+  10951,  1530,

+  10969,  5290,

+  11203,  2305,

+  11325,  3562,

+  11771,  6754,

+  11839,  1849,

+  11941,  4495,

+  11954,  1298,

+  11975, 15223,

+  11977,   883,

+  11986,  2842,

+  12438,  2141,

+  12593,  3665,

+  12636,  8367,

+  12658,  1594,

+  12886,  2628,

+  12984,  4942,

+  13146,  1115,

+  13224,   524,

+  13341,  3163,

+  13399,  1923,

+  13549,  5961,

+  13606,  1401,

+  13655,  2399,

+  13782,  3909,

+  13868, 10923,

+  14226,  1723,

+  14232,  2939,

+  14278,  7528,

+  14439,  4598,

+  14451,   984,

+  14458,  2265,

+  14792,  1403,

+  14818,  3445,

+  14899,  5709,

+  15017, 15362,

+  15048,  1946,

+  15069,  2655,

+  15405,  9591,

+  15405,  4079,

+  15570,  7183,

+  15687,  2286,

+  15691,  1624,

+  15699,  3068,

+  15772,  5149,

+  15868,  1205,

+  15970,   696,

+  16249,  3584,

+  16338,  1917,

+  16424,  2560,

+  16483,  4438,

+  16529,  6410,

+  16620, 11966,

+  16839,  8780,

+  17030,  3050,

+  17033, 18325,

+  17092,  1568,

+  17123,  5197,

+  17351,  2113,

+  17374,   980,

+  17566, 26214,

+  17609,  3912,

+  17639, 32767,

+  18151,  7871,

+  18197,  2516,

+  18202,  5649,

+  18679,  3283,

+  18930,  1370,

+  19271, 13757,

+  19317,  4120,

+  19460,  1973,

+  19654, 10018,

+  19764,  6792,

+  19912,  5135,

+  20040,  2841,

+  21234, 19833};

+

+

diff --git a/media/libstagefright/codecs/amrwbenc/inc/q_pulse.h b/media/libstagefright/codecs/amrwbenc/inc/q_pulse.h
new file mode 100644
index 0000000..baf5525
--- /dev/null
+++ b/media/libstagefright/codecs/amrwbenc/inc/q_pulse.h
@@ -0,0 +1,66 @@
+

+/*

+ ** Copyright 2003-2010, VisualOn, Inc.

+ **

+ ** Licensed under the Apache License, Version 2.0 (the "License");

+ ** you may not use this file except in compliance with the License.

+ ** You may obtain a copy of the License at

+ **

+ **     http://www.apache.org/licenses/LICENSE-2.0

+ **

+ ** Unless required by applicable law or agreed to in writing, software

+ ** distributed under the License is distributed on an "AS IS" BASIS,

+ ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

+ ** See the License for the specific language governing permissions and

+ ** limitations under the License.

+ */

+

+

+/*--------------------------------------------------------------------------*

+ *                         Q_PULSE.H                                        *

+ *--------------------------------------------------------------------------*

+ * Coding and decoding of algebraic codebook			            *

+ *--------------------------------------------------------------------------*/

+

+#ifndef  __Q_PULSE_H__

+#define  __Q_PULSE_H__

+

+#include "typedef.h"

+

+Word32 quant_1p_N1(                        /* (o) return (N+1) bits           */

+		Word16 pos,                           /* (i) position of the pulse       */

+		Word16 N);                            /* (i) number of bits for position */

+

+Word32 quant_2p_2N1(                       /* (o) return (2*N)+1 bits         */

+		Word16 pos1,                          /* (i) position of the pulse 1     */

+		Word16 pos2,                          /* (i) position of the pulse 2     */

+		Word16 N);                            /* (i) number of bits for position */

+

+Word32 quant_3p_3N1(                       /* (o) return (3*N)+1 bits         */

+		Word16 pos1,                          /* (i) position of the pulse 1     */

+		Word16 pos2,                          /* (i) position of the pulse 2     */

+		Word16 pos3,                          /* (i) position of the pulse 3     */

+		Word16 N);                            /* (i) number of bits for position */

+

+Word32 quant_4p_4N1(                       /* (o) return (4*N)+1 bits         */

+		Word16 pos1,                          /* (i) position of the pulse 1     */

+		Word16 pos2,                          /* (i) position of the pulse 2     */

+		Word16 pos3,                          /* (i) position of the pulse 3     */

+		Word16 pos4,                          /* (i) position of the pulse 4     */

+		Word16 N);                            /* (i) number of bits for position */

+

+Word32 quant_4p_4N(                        /* (o) return 4*N bits             */

+		Word16 pos[],                         /* (i) position of the pulse 1..4  */

+		Word16 N);                            /* (i) number of bits for position */

+

+Word32 quant_5p_5N(                        /* (o) return 5*N bits             */

+		Word16 pos[],                         /* (i) position of the pulse 1..5  */

+		Word16 N);                            /* (i) number of bits for position */

+

+Word32 quant_6p_6N_2(                      /* (o) return (6*N)-2 bits         */

+		Word16 pos[],                         /* (i) position of the pulse 1..6  */

+		Word16 N);                            /* (i) number of bits for position */

+

+

+#endif //__Q_PULSE_H__

+

diff --git a/media/libstagefright/codecs/amrwbenc/inc/qisf_ns.tab b/media/libstagefright/codecs/amrwbenc/inc/qisf_ns.tab
new file mode 100644
index 0000000..52f0daf
--- /dev/null
+++ b/media/libstagefright/codecs/amrwbenc/inc/qisf_ns.tab
@@ -0,0 +1,347 @@
+

+/*

+ ** Copyright 2003-2010, VisualOn, Inc.

+ **

+ ** Licensed under the Apache License, Version 2.0 (the "License");

+ ** you may not use this file except in compliance with the License.

+ ** You may obtain a copy of the License at

+ **

+ **     http://www.apache.org/licenses/LICENSE-2.0

+ **

+ ** Unless required by applicable law or agreed to in writing, software

+ ** distributed under the License is distributed on an "AS IS" BASIS,

+ ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

+ ** See the License for the specific language governing permissions and

+ ** limitations under the License.

+ */

+

+

+/*-------------------------------------------------------------------*

+ *                         qisf_ns.h

+ *-------------------------------------------------------------------*

+ * Quantization tables for split by 5 VQ of ISFs for a background noise database

+ * Version whith no prediction

+ *-------------------------------------------------------------------*/

+

+#define ORDER   16            /* order of linear prediction filter */

+#define ISF_GAP 128

+

+#define SIZE_BK_NOISE1  64

+#define SIZE_BK_NOISE2  64

+#define SIZE_BK_NOISE3  64

+#define SIZE_BK_NOISE4  32

+#define SIZE_BK_NOISE5  32

+

+

+/* means of ISFs */

+ static Word16 mean_isf_noise[ORDER] = {

+

+   478,  1100,  2213,  3267,  4219,  5222,  6198,  7240,

+  8229,  9153, 10098, 11108, 12144, 13184, 14165,  3803};

+

+

+/* 28 bits */

+/*-------------------------------------------------------------------*

+ *  isf codebooks:  split-by-5 VQ                                    *

+ *                                                                   *

+ *  codebook   vector dimension    number of vectors                 *

+ *  ~~~~~~~~   ~~~~~~~~~~~~~~~~    ~~~~~~~~~~~~~~~~~                 *

+ *     1            2                  64                            *

+ *     2            3                  64                            *

+ *     3            3                  64                            *

+ *     4            4                  32                            *

+ *     5            4                  32                            *

+ *-------------------------------------------------------------------*/

+

+/*------------------------------------------------*

+ * 1st split:   isf0 to isf1

+ *------------------------------------------------*/

+

+

+ static Word16 dico1_isf_noise[SIZE_BK_NOISE1*2] = {

+

+  -269,  -673,

+  -222,  -537,

+  -233,  -430,

+  -138,  -451,

+  -212,  -331,

+  -192,  -241,

+   -87,  -231,

+  -191,  -128,

+   -70,  -106,

+  -164,    -6,

+    74,  -179,

+    27,   -33,

+  -102,    74,

+  -162,   115,

+   -94,   172,

+    -6,   130,

+  -143,   234,

+    14,   218,

+   -65,   270,

+    88,   182,

+  -124,   341,

+   -44,   381,

+    38,   335,

+   117,   274,

+  -112,   454,

+    74,   431,

+    -5,   488,

+   175,   384,

+   -83,   561,

+   122,   529,

+    21,   601,

+   229,   481,

+   231,   303,

+   226,   608,

+   300,   372,

+   210,   187,

+   306,   265,

+   328,   473,

+   382,   331,

+   371,   132,

+   139,    58,

+   365,    21,

+   250,   -82,

+   443,   218,

+   483,   110,

+   426,   415,

+   579,   222,

+   518,   333,

+   573,   448,

+   455,   529,

+   685,   329,

+   332,   580,

+   595,   593,

+   468,   645,

+   762,   517,

+   326,   709,

+   485,   793,

+   130,   684,

+   671,   737,

+   354,   876,

+    88,   806,

+   -65,   706,

+   -35,  1016,

+   266,  1123};

+

+

+/*------------------------------------------------*

+ * 2nd split:   isf2 to isf4

+ *------------------------------------------------*/

+

+ static Word16 dico2_isf_noise[SIZE_BK_NOISE2*3] = {

+

+  -824,  -884,  -949,

+  -805,  -456,  -418,

+  -442,  -438,  -541,

+  -217,  -578,  -793,

+  -168,  -444,  -582,

+  -287,  -492,  -274,

+  -552,  -297,  -300,

+  -163,  -333,  -358,

+  -370,  -232,  -232,

+  -175,  -358,  -159,

+  -381,   -21,  -357,

+  -184,  -159,  -162,

+   -53,  -191,  -280,

+    18,  -267,  -215,

+  -138,    61,  -283,

+    71,   -95,  -294,

+    13,  -156,  -546,

+     0,   -83,   -79,

+    44,    97,  -316,

+   178,   -52,  -213,

+   222,  -261,  -422,

+   237,  -118,   -44,

+   141,   145,  -132,

+   363,    81,  -287,

+   213,    65,    34,

+  -107,    94,    -5,

+    91,   -29,   126,

+  -355,    51,   -41,

+  -219,   -76,   145,

+   -63,   100,   244,

+  -719,    44,    27,

+  -572,  -124,   155,

+  -423,   133,   315,

+  -917,    71,   224,

+  -268,   318,   131,

+   -93,  -190,   420,

+   -97,   122,   491,

+   -79,   317,   355,

+   130,   100,   325,

+    86,  -293,   210,

+   133,   258,   161,

+   176,   -73,   465,

+   195,   300,   384,

+   348,    22,   221,

+   376,   183,   409,

+   377,   286,   202,

+   242,   213,   659,

+   257,   565,   248,

+   344,   408,   -76,

+   405,   440,   509,

+   612,   385,   379,

+   536,   607,   216,

+   -56,   582,   192,

+   100,   517,   567,

+  -365,   448,   445,

+   728,   347,    10,

+   505,   357,   759,

+   636,   582,   658,

+   335,   517,   852,

+   378,   809,   572,

+  -195,   878,   829,

+   529,   707,   987,

+   918,   726,   392,

+  1250,   997,  1063};

+

+/*------------------------------------------------*

+ * 3rd split:   isf5 to isf7

+ *------------------------------------------------*/

+

+ static Word16 dico3_isf_noise[SIZE_BK_NOISE3*3] = {

+

+  -805,  -838,  -774,

+  -522,  -627,  -828,

+  -477,  -486,  -603,

+  -295,  -481,  -634,

+  -366,  -384,  -393,

+  -186,  -414,  -396,

+  -237,  -394,  -106,

+  -252,  -202,  -275,

+   -61,  -177,  -442,

+   -84,  -198,  -199,

+  -179,  -125,   -31,

+   -72,   -47,  -163,

+  -298,  -220,   215,

+   -64,  -168,   251,

+  -133,   156,   -59,

+   -30,    -2,   127,

+    54,    66,   -61,

+  -233,    21,   251,

+   209,   -50,    32,

+    33,   194,   136,

+  -117,   -18,   475,

+   202,    46,   309,

+   256,   185,    53,

+    35,   200,   390,

+   200,   263,   242,

+  -216,   302,   294,

+   128,   358,     0,

+    19,   431,   287,

+   224,   447,   280,

+   367,   165,   213,

+   397,   314,   319,

+   383,   379,    75,

+   277,   325,   462,

+   394,   505,   334,

+   251,    98,  -213,

+   450,   153,   448,

+   565,   226,    76,

+   470,   383,   502,

+   635,   390,   278,

+   237,   135,   620,

+   342,   401,   649,

+   331,   551,   518,

+   130,   418,   592,

+   531,   306,   737,

+   729,   389,   580,

+   497,   557,   699,

+   296,   383,   874,

+   283,   624,   759,

+   126,   622,   476,

+   559,   595,   472,

+   382,   770,   616,

+   719,   613,   745,

+   540,   639,   928,

+   517,   826,   801,

+   684,   811,   604,

+   752,   786,   857,

+   933,   661,   350,

+   694,   450,  1061,

+   562,   911,  1051,

+   824,   813,  1104,

+   758,  1047,   882,

+  1140,   917,   889,

+  1039,  1246,  1426,

+  1483,  1666,  1876};

+

+/*------------------------------------------------*

+ * 4th split:   isf8 to isf11

+ *------------------------------------------------*/

+

+ static Word16 dico4_isf_noise[SIZE_BK_NOISE4*4] = {

+

+  -776,  -854,  -891,  -920,

+  -552,  -610,  -663,  -741,

+  -321,  -370,  -476,  -565,

+   274,  -160,  -456,   201,

+   265,    67,  -160,  -306,

+    -8,  -210,    79,   272,

+   163,   236,   307,   308,

+   578,   317,    64,   298,

+    -9,   197,   342,   620,

+   343,   232,   314,   622,

+   173,   149,   548,   527,

+   356,   370,   481,   376,

+   135,   444,   488,   556,

+   391,   471,   487,   653,

+   228,   424,   576,   835,

+   422,   372,   722,   682,

+   295,   673,   693,   635,

+   539,   596,   590,   449,

+   475,   618,   659,   818,

+   735,   517,   491,   673,

+   602,   346,   257,   877,

+   625,   635,   849,   720,

+   727,   818,   698,   595,

+   653,   481,   690,  1139,

+   814,   762,   704,   908,

+   507,   747,   898,   936,

+   848,   855,   924,   785,

+   646,  1037,   882,   795,

+   772,   845,  1024,  1151,

+  1133,   983,   818,   921,

+   940,  1068,  1252,  1302,

+  1588,  1767,  1718,  1513};

+

+/*------------------------------------------------*

+ * 5th split:   isf12 to isf15

+ *------------------------------------------------*/

+

+ static Word16 dico5_isf_noise[SIZE_BK_NOISE5*4] = {

+  -810,  -879,  -945,  -254,

+   248,   184,   671,   128,

+   288,   703,   918,    99,

+   658,   558,   662,   219,

+   552,   585,   910,   208,

+   559,   804,   759,   119,

+   606,   774,   921,  -139,

+   782,   761,   748,   208,

+   756,   708,   983,    56,

+   544,   864,  1010,   152,

+   737,   698,   987,   299,

+   771,   924,   879,   103,

+   536,   785,   961,   405,

+   667,   916,   801,   328,

+   738,   705,   773,   439,

+   823,   871,   992,   355,

+   640,  1004,  1052,   369,

+   724,   822,   949,   597,

+   415,   655,   729,   482,

+  1009,   896,   793,   363,

+   908,   803,   687,   -25,

+  1016,   838,  1011,   189,

+   947,  1112,   942,   222,

+   914,  1049,   981,   527,

+   956,   987,  1011,  -120,

+   781,  1049,  1121,    92,

+  1178,  1053,   884,    47,

+  1123,  1059,  1182,   118,

+   933,   972,  1277,   357,

+  1109,   918,  1101,   503,

+  1039,  1286,  1220,   317,

+  1351,  1207,  1010,   326};

+

diff --git a/media/libstagefright/codecs/amrwbenc/inc/qpisf_2s.tab b/media/libstagefright/codecs/amrwbenc/inc/qpisf_2s.tab
new file mode 100644
index 0000000..4d869a4
--- /dev/null
+++ b/media/libstagefright/codecs/amrwbenc/inc/qpisf_2s.tab
@@ -0,0 +1,1360 @@
+/*

+ ** Copyright 2003-2010, VisualOn, Inc.

+ **

+ ** Licensed under the Apache License, Version 2.0 (the "License");

+ ** you may not use this file except in compliance with the License.

+ ** You may obtain a copy of the License at

+ **

+ **     http://www.apache.org/licenses/LICENSE-2.0

+ **

+ ** Unless required by applicable law or agreed to in writing, software

+ ** distributed under the License is distributed on an "AS IS" BASIS,

+ ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

+ ** See the License for the specific language governing permissions and

+ ** limitations under the License.

+ */

+

+

+/*-------------------------------------------------------------------*

+ *                         qpisf_2s.h

+ *-------------------------------------------------------------------*

+ * Quantization tables for two-stage of ISFs (split by 2 in 1st stage)

+ * Version whith prediction MU = 0.25

+ *-------------------------------------------------------------------*/

+

+#define ORDER   16            /* order of linear prediction filter */

+#define ISF_GAP 128           /* 50 Hz */

+#define N_SURV  4

+

+#define SIZE_BK1  256

+#define SIZE_BK2  256

+#define SIZE_BK21 64

+#define SIZE_BK22 128

+#define SIZE_BK23 128

+#define SIZE_BK24 32

+#define SIZE_BK25 32

+

+#define SIZE_BK21_36b 128

+#define SIZE_BK22_36b 128

+#define SIZE_BK23_36b 64

+

+/* means of ISFs */

+static Word16 mean_isf[ORDER] = {

+

+   738,  1326,  2336,  3578,  4596,  5662,  6711,  7730,

+  8750,  9753, 10705, 11728, 12833, 13971, 15043,  4037};

+

+/* 46 bits */

+/*-------------------------------------------------------------------*

+ *  isf codebooks:  two-stage VQ with split-by-5 in 2nd stage        *

+ *                                                                   *

+ *  codebook   vector dimension    number of vectors                 *

+ *  ~~~~~~~~   ~~~~~~~~~~~~~~~~    ~~~~~~~~~~~~~~~~~                 *

+ *     1_1            9                  256                         *

+ *     1_2            7                  256                         *

+ *     2_1            3                  64                          *

+ *     2_2            3                  128                         *

+ *     2_3            3                  128                         *

+ *     2_4            3                  32                          *

+ *     2_5            4                  32                          *

+ *-------------------------------------------------------------------*/

+

+/*------------------------------------------------*

+ * 1st stage codebook; 1st split:   isf0 to isf8

+ *------------------------------------------------*/

+

+static Word16 dico1_isf[SIZE_BK1*9] = {

+

+   579,  1081,  1035,   390,     3,  -263,  -198,   -82,    38,

+    18,   -68,   -12,   313,   761,   405,   249,   111,   -76,

+   740,  1263,  1292,  1006,   997,  1019,  1017,   976,   923,

+   -91,   827,   948,   648,   613,   535,   522,   490,   421,

+    41,   -44,  -281,  -472,   652,   534,   193,   135,   -90,

+    41,  -121,  -356,   -60,   663,   307,    61,   -48,  -344,

+   557,   946,  1049,   867,   846,   990,  1112,  1262,  1241,

+  -118,  -204,   328,   512,   870,   793,   610,   402,   186,

+   156,   293,    74,  -338,  -475,  -897,  -594,  -161,  -497,

+   226,   131,  -138,   307,   169,  -271,  -164,  -387,  -624,

+    62,   -32,   -61,  -252,  -541,  -828, -1027,  -523,  -662,

+   102,   -61,   141,   112,  -270,  -251,  -541,    25,  -150,

+     6,  -132,  -356,  -686,   -96,  -322,  -522,   -31,  -326,

+   -36,  -209,  -521,  -229,   307,  -132,    -5,   -99,  -384,

+    60,   -51,  -237,  -668,  -973,  -407,  -708,   -75,  -172,

+    26,  -138,  -266,   111,  -302,    43,  -278,  -356,  -359,

+   570,   822,   496,  -154,  -312,   -92,   137,   279,   371,

+  -146,   368,   409,    68,     6,    77,   167,   202,   162,

+   633,   898,   996,   756,   662,   683,   783,   909,   996,

+  -103,   294,   607,   415,   483,   462,   480,   431,   408,

+  -120,  -338,  -612,  -524,   584,   331,    92,   433,   276,

+  -178,  -293,  -154,   -41,   269,   100,    -9,   213,   160,

+   830,   736,   278,   820,  1254,   686,   712,  1039,   473,

+  -218,  -304,   463,   454,   397,   273,   202,   286,   273,

+  -232,     7,     6,  -388,  -472,  -427,  -378,  -167,  -100,

+  -294,  -183,   134,   -47,   101,   -88,   -84,  -117,    -3,

+    57,    17,  -202,  -634,  -989, -1119,  -533,   176,   -36,

+   120,   -28,    23,   111,  -319,   318,   -22,   -77,   266,

+  -271,  -464,  -434,  -658,  -640,  -385,  -385,   -99,   -69,

+  -198,  -259,  -266,   -44,   -39,  -139,  -137,   171,    66,

+     9,  -145,  -377,  -846, -1000,  -111,  -325,   342,   135,

+   -81,  -286,  -380,   192,   -57,   307,    76,   -24,  -140,

+   677,   702,   247,    56,   249,   141,  -105,  -236,   -99,

+    36,   -39,   -69,   348,   198,   -93,   322,    91,   -72,

+   503,   885,  1508,  1307,  1282,  1172,  1119,  1209,  1061,

+   416,   719,   989,  1227,  1001,  1052,   954,   741,  1044,

+  -127,  -376,  -657,   139,   623,   223,   501,   306,   220,

+  -113,  -384,  -796,   504,   438,    85,   213,   -83,  -194,

+   585,  1132,  1233,  1091,  1247,  1433,  1512,  1448,  1314,

+  -174,  -422,     7,  1155,  1089,  1182,  1003,   945,   806,

+     8,  -126,  -317,  -103,  -351,  -695,   -98,  -268,  -537,

+    33,  -103,  -290,   167,   -39,  -407,    44,  -208,  -375,

+   104,   -23,   -64,  -291,  -637,  -851, -1084,   -61,  -112,

+   -75,  -306,  -434,   218,  -148,  -354,  -680,  -133,  -216,

+  -121,  -377,  -718,   -97,  -130,  -361,  -156,  -379,  -599,

+   -56,  -254,  -586,   235,   157,  -214,    11,  -260,  -149,

+  -124,  -267,  -397,  -580,  -593,  -527,  -805,  -385,   346,

+  -193,  -440,  -708,  -351,  -141,  -255,  -499,  -147,  -185,

+   448,   660,   494,   208,   509,   461,   338,   291,   149,

+  -223,    88,   335,   159,   212,   191,   286,   308,   205,

+   -31,   469,   803,   659,   619,   658,   843,   987,  1113,

+  -171,  -242,   514,   362,   295,   524,   552,   694,   585,

+   -64,  -308,  -448,   -21,   284,   786,   446,   289,    92,

+  -218,  -390,    -7,   169,   206,   330,   352,   408,   358,

+   -36,   702,   959,   859,   861,  1115,  1269,  1357,  1305,

+  -133,  -341,   -65,   678,   417,   440,   486,   518,   780,

+    33,   -44,  -191,  -344,  -461,  -755,  -201,   217,   -31,

+  -353,  -547,   -44,   123,   -61,   -68,   -79,    29,    60,

+    73,   -57,  -406,  -766, -1243, -1203,   240,   400,   165,

+   -73,  -282,  -601,  -213,  -171,  -375,   332,    35,  -103,

+   -29,  -207,  -553,  -476,  -638,  -908,   172,   -22,  -135,

+  -192,  -239,  -164,  -103,  -111,   -47,   153,   125,   110,

+    -1,  -203,  -570, -1030, -1424,  -535,   155,     1,   147,

+  -333,  -653,  -865,  -197,  -158,   -21,   -44,    95,   108,

+   389,   588,   490,    33,  -237,  -524,  -628,  -136,  -260,

+    40,  -177,  -462,   453,   862,   380,   131,  -130,  -405,

+   842,  1678,  1841,  1549,  1474,  1256,  1082,   905,   742,

+   370,  1216,  1768,  1633,  1212,   636,    22,  -330,    71,

+   -76,  -281,  -741,  -742,   898,   619,   277,    71,  -222,

+   -32,  -265,  -556,   -25,   994,   682,   305,   126,  -165,

+    73,   738,   893,   968,   993,  1768,  2273,  1840,  1391,

+   -69,  -349,  -585,   234,  1158,   903,   626,   510,   251,

+    -1,   -99,  -272,  -210,  -603,  -351,  -540,  -811,  -383,

+   -16,  -230,  -504,   410,   149,  -205,  -343,  -651,  -639,

+   103,    -9,  -227,  -205,  -562,  -781, -1079, -1208,  -156,

+   143,    63,  -135,   -67,  -317,  -602,  -784, -1154,  -640,

+  -144,  -391,  -674,  -622,  -200,  -254,  -660,  -947,  -395,

+   -40,  -250,  -625,    27,   543,    94,  -131,  -386,  -673,

+  -123,  -371,  -757,  -451,  -564,  -614,  -415,  -711,   -35,

+  -116,  -309,  -593,  -268,   239,   -33,  -338,  -650,  -135,

+    94,   251,   554,    57,  -312,  -423,  -154,   -57,   235,

+  -268,   -71,   381,   114,   -44,   -87,   125,   173,   133,

+  1513,  1714,  1238,   534,   276,   315,   461,   459,   508,

+  -131,   -19,  1149,   670,   486,   356,   309,   369,   296,

+  -223,  -501,  -899,  -722,   -70,     6,   131,   310,   394,

+   -99,  -303,  -517,   249,    64,   -53,   135,   -11,   453,

+  -147,  -399,  -730,  -401,   817,   738,   802,   749,   575,

+  -154,  -435,  -739,   800,   593,   366,   529,   318,   326,

+  -224,    45,   -39,  -387,  -515,  -518,  -608,  -384,  -321,

+  -315,  -377,   143,  -101,  -113,  -377,  -177,  -144,   -12,

+   117,    40,  -239,  -651, -1051,  -581,  -737,  -990,  -328,

+    26,   -50,  -157,   -23,  -453,  -283,  -531,  -546,   192,

+  -252,  -501,  -743,  -589,  -627,  -499,  -328,  -118,   -72,

+  -324,  -494,  -244,  -306,  -144,  -177,  -262,  -135,   -78,

+   -36,  -234,  -519,  -961, -1290,  -314,  -479,  -371,   -45,

+   -95,  -292,  -535,    -8,  -300,   112,  -164,  -277,   198,

+   -99,  -128,   880,   836,   579,   351,    23,   -95,  -217,

+   -27,  -258,   124,  1011,   597,   425,   144,     7,   -73,

+   421,  1293,  1640,  1623,  1742,  1617,  1499,  1284,  1006,

+   -95,   752,  1680,  1569,  1618,  1436,  1200,   980,   712,

+   -69,  -300,  -683,  -435,  1132,   899,   504,   332,   109,

+   -74,  -323,  -637,   563,  1074,   608,   371,   105,   -49,

+   -78,   831,  1194,  1110,  1378,  1481,  1492,  1365,  1217,

+  -259,  -121,  1440,  1334,  1628,  1490,  1438,  1223,   933,

+   -82,  -306,  -613,  -222,  -378,  -675,  -545,  -671,  -845,

+    53,  -124,  -347,   422,    52,  -125,  -270,  -529,     9,

+    79,   -89,  -320,  -662,  -999, -1199, -1243,  -676,  -297,

+   -68,  -273,  -611,   137,  -146,  -397,  -627,  -845,  -220,

+  -112,  -346,  -797,  -826,   234,  -132,  -188,  -278,  -522,

+  -159,  -405,  -734,  -419,   293,    74,  -167,  -167,   184,

+  -153,  -437,  -833, -1080,  -336,  -472,  -561,  -340,  -253,

+  -169,  -423,  -820,  -904,  -131,   -19,  -346,  -604,    31,

+    33,   -31,   312,    62,  -148,    49,   -59,   564,   486,

+  -306,  -333,   194,   -44,    67,    72,   147,   205,   243,

+  -207,   -49,  1360,   983,   969,   991,  1014,  1110,   973,

+  -211,  -172,   883,   627,   711,   674,   705,   798,   746,

+   -88,  -325,  -763,  -974,   687,   908,   514,   382,   172,

+  -292,  -612,  -805,    63,   131,   270,   259,   352,   348,

+  -235,   -84,   955,   818,  1120,  1289,  1559,  1480,  1285,

+  -180,  -461,  -614,   657,   691,   745,   854,   783,   713,

+   -97,  -309,  -477,  -614,  -777,  -734,  -768,  -526,  -472,

+  -344,  -476,   -35,  -169,    49,   -77,  -150,  -240,  -141,

+   -52,  -268,  -639,  -919, -1278, -1113,  -342,  -333,  -151,

+   -68,  -242,  -585,   -73,  -209,  -478,  -159,  -429,   133,

+  -197,  -499, -1005, -1268,  -272,  -224,  -105,   -67,    17,

+  -363,  -618,  -414,  -116,   -62,    20,    10,   116,   108,

+  -195,  -475,  -906, -1260,  -891,  -441,  -277,  -142,   -28,

+  -226,  -519,  -950,  -700,  -275,  -266,  -116,  -105,    82,

+   404,   511,   520,   327,    17,  -194,  -333,  -536,  -586,

+  -114,  -130,   276,   237,   204,   342,   135,   -16,  -111,

+   670,  1208,  1168,   860,   742,   601,   528,   403,   309,

+   397,   621,   966,   752,   579,   398,   400,   329,   252,

+   191,   180,  -137,  -467,   272,   106,   -95,    17,  -192,

+   -80,  -290,  -626,   194,   598,   196,    21,  -281,    77,

+   510,   864,  1108,   807,   939,   902,   925,   717,   481,

+   137,   367,   534,   764,   670,   382,   296,   153,    84,

+   303,   497,   144,   -85,  -125,  -539,  -482,  -464,  -764,

+   233,   347,    68,  -147,   169,  -210,  -242,  -226,  -482,

+   307,   422,   154,  -175,  -386,  -722,  -724,  -904, -1015,

+   309,   308,   160,   -60,  -470,  -420,  -598,  -791,  -219,

+    68,   121,  -137,  -560,  -146,  -446,  -515,  -494,  -729,

+   130,    53,  -227,    46,   474,    32,  -161,  -192,  -490,

+   213,   164,   -71,  -465,  -876,  -161,  -456,  -587,   -48,

+   218,   117,    39,   177,  -194,   -88,  -226,  -418,    50,

+   210,   547,   569,   279,   121,   -44,   -50,    10,   -84,

+    58,   140,   182,    -5,   267,   117,   106,   211,   198,

+   539,   835,   913,   719,   617,   544,   591,   565,   642,

+   153,   559,   872,   460,   222,   108,   188,   180,   183,

+   158,   119,   284,  -153,  -271,   229,    87,   110,   -57,

+  -183,    82,   118,    21,    13,    40,   118,   191,   185,

+   162,   889,   654,   108,   -34,   244,   488,   561,   532,

+   163,    56,   609,   341,    50,   329,    68,   266,   218,

+   100,   206,    18,  -304,  -107,  -436,  -487,   -65,  -306,

+   -86,   154,   134,   -30,   -45,   -73,  -104,   -80,   -96,

+   245,   330,    10,  -440,  -849, -1082,    79,    40,  -265,

+   196,   372,   272,  -181,  -493,  -389,   275,    80,   -59,

+     2,   -12,  -246,  -505,  -100,  -436,    21,  -187,  -431,

+  -221,   -48,    36,  -271,  -186,  -147,  -109,    26,    71,

+   213,   140,    72,  -351,  -620,   -84,  -363,    69,    46,

+    91,   167,    -3,   -95,   -99,  -105,   -48,   114,   147,

+   259,   249,   172,   607,   406,    52,    59,  -189,  -320,

+   115,   -85,   -54,   574,   128,   226,   -59,  -253,   130,

+   -62,  1033,  1308,  1035,  1127,  1098,  1029,   961,   823,

+    39,   364,   757,   940,   728,   660,   659,   583,   770,

+  -115,  -338,  -760,  -471,   394,    37,   441,   178,     6,

+   -57,  -305,  -525,   796,   453,   188,    -4,  -114,   248,

+    71,   444,   797,   731,  1096,  1157,  1222,  1029,   811,

+   135,   359,   551,   425,   749,   815,   874,   704,   502,

+   132,   247,     0,  -206,  -449,  -750,  -258,  -514,  -633,

+   248,   249,    91,   121,  -195,  -499,   -90,  -282,  -435,

+    78,    20,  -277,  -623,  -983, -1224,  -415,  -458,  -639,

+   347,   509,   208,  -179,  -464,  -728,   -76,  -237,  -486,

+  -103,  -343,  -756,  -713,  -265,  -609,  -191,  -398,  -636,

+  -121,  -383,  -749,   567,   252,   -36,  -354,  -417,   -50,

+   204,   100,  -149,  -650, -1081,   -47,    -7,  -263,   111,

+   -46,  -180,  -267,  -324,  -562,  -394,  -692,   398,   292,

+   482,   670,   683,   624,   442,   165,   116,    36,  -149,

+   108,   247,   291,   247,   355,   122,   109,   224,   296,

+   -14,   945,   990,   801,   755,   815,   847,   913,   892,

+   292,   349,   725,   482,   388,   329,   429,   620,   667,

+   -34,   197,   213,  -127,    84,   494,   620,   575,   375,

+   126,   207,   172,   167,   362,   202,   296,   395,   455,

+    -6,   250,   539,   467,   636,   801,  1149,  1287,  1118,

+    27,   240,   369,   280,   440,   411,   634,   892,   953,

+   159,   170,   -58,  -395,  -797,  -690,    77,  -211,  -334,

+    -5,   -28,   -13,   -74,  -335,  -603,   300,    88,  -205,

+    82,   -33,  -364,  -698, -1203, -1153,   110,  -146,  -289,

+   113,     1,  -243,  -588,  -994,  -496,   414,   160,    42,

+   -56,  -247,  -440,  -693,  -996,  -479,    11,  -178,  -357,

+  -151,  -353,  -327,  -211,  -340,   141,    65,   425,   453,

+    34,  -169,  -455,  -932, -1215,   138,   499,   256,   324,

+    68,   139,   -15,  -547,  -478,    17,   306,   502,   481,

+   -32,  -134,   445,   129,  -143,  -244,  -503,  -507,  -599,

+    61,  -140,  -345,   496,   458,    -2,    20,  -227,  -514,

+   394,  1765,  1666,  1339,  1117,   806,   642,   479,   380,

+   215,   519,   920,  1053,  1090,   791,   528,   290,   155,

+   -54,  -233,  -647,  -602,   639,   294,    -2,  -167,  -442,

+   -78,  -315,  -791,  -113,   820,   403,   158,  -116,  -356,

+   529,  1851,  2003,  1228,   622,   -41,  -416,   344,   819,

+  -105,  -379,  -236,  1224,   893,   749,   568,   356,   214,

+   -17,  -199,  -144,    50,  -283,  -247,  -578,  -846, -1087,

+    69,   -11,  -381,  -206,   209,  -284,  -387,  -416,  -716,

+    39,    -5,  -145,  -374,  -682,  -909, -1074, -1169, -1066,

+   287,   226,    67,  -221,  -662,  -171,  -421,  -642,  -707,

+  -132,  -348,  -538,  -448,   -20,    -4,  -354,  -748,  -933,

+     4,   -75,  -289,  -598,   317,    52,  -208,  -297,  -559,

+   -88,  -264,  -358,  -589,  -631,  -248,  -523,  -822, -1071,

+    70,    -8,    54,  -314,  -515,    92,  -146,  -274,  -493,

+   199,    62,   391,   158,  -141,    71,  -219,  -203,  -207,

+   152,    40,   329,   162,   -29,    48,  -149,   108,   127,

+   635,  1058,   883,   492,   372,   312,   317,   274,   241,

+   267,   722,  1256,   882,   625,   248,     8,   -81,   -60,

+   -58,  -138,  -291,  -600,   -12,    -2,   -39,   147,   117,

+  -107,  -345,  -513,   459,    76,    92,  -272,   388,   262,

+   362,   516,   203,  -409,  -716,  -831,  -331,   185,   209,

+  -117,  -391,  -298,   671,   292,   538,   257,   166,   -38,

+  -102,  -319,  -194,  -283,  -573,  -262,  -579,  -219,  -444,

+  -235,    78,    11,  -168,  -101,  -229,  -263,  -321,  -123,

+    70,    50,  -170,  -599,  -996,  -588,  -263,  -516,  -455,

+   394,   363,   229,  -136,  -538,    21,  -183,  -348,  -201,

+  -124,  -368,  -640,  -879,  -847,  -209,  -409,  -494,  -515,

+  -127,  -341,  -541,  -425,  -510,   -10,  -252,  -473,  -291,

+    84,   -69,  -201,  -676,  -868,   103,  -311,  -132,  -320,

+     5,  -173,  -188,  -297,  -628,   197,   -57,     7,   -11,

+    49,  -160,    56,   558,   111,    33,  -311,  -440,  -463,

+    -1,  -246,  -307,   862,   453,   139,  -170,  -355,  -232,

+   279,   966,  1642,  1478,  1463,  1123,   795,   525,   339,

+  -197,   -38,  1702,  1331,  1252,   950,   692,   504,   426,

+  -108,  -344,  -861, -1172,   444,   354,    88,   -46,  -220,

+   -53,  -321,  -494,  1113,   744,   364,   198,   -34,   -75,

+   457,   955,  1177,  1214,  1427,  1457,  1345,   917,   539,

+   -69,   199,   897,  1140,  1343,  1183,   977,   742,   522,

+   122,    44,  -269,    27,  -155,  -562,  -307,  -590,  -773,

+   154,    42,  -160,   252,  -129,  -305,  -471,  -733,  -371,

+   135,   185,   -82,  -416,  -722,  -913,  -504,  -743,  -880,

+   149,   214,   -84,  -329,  -680,  -835,  -426,  -661,   -81,

+  -128,  -380,  -735,  -998,  -337,    17,  -182,  -467,  -697,

+   -84,  -290,  -510,  -592,    13,   440,   154,   -38,  -279,

+    70,   -61,  -246,  -727, -1047,   -80,  -381,  -535,  -704,

+   178,    -2,  -146,  -670,  -938,   482,   138,    63,    65,

+   -11,    15,   772,   443,   142,   -20,  -209,  -126,  -161,

+   -32,  -249,    95,   552,   124,    30,  -343,    82,   -86,

+   148,   751,  1515,  1105,   867,   606,   474,   448,   399,

+  -163,  -257,   899,  1097,   906,   751,   502,   390,   294,

+   -51,  -258,  -447,  -806,  -368,   763,   464,   364,   183,

+  -166,  -374,  -367,    87,    35,   399,   418,   856,   833,

+  -205,  -310,   588,   778,   785,  1065,  1118,  1245,  1157,

+  -173,  -312,   107,   345,   400,   790,   870,  1113,  1001,

+    -7,  -120,  -387,  -410,  -614,  -943,  -226,  -384,  -491,

+  -203,  -288,   -51,  -331,   -90,  -178,  -408,  -573,  -338,

+    56,   -29,  -273,  -627, -1041,  -798,  -247,  -467,   148,

+    66,    -2,  -205,  -205,  -575,  -349,   -57,  -352,   -58,

+   -45,  -225,  -471,  -924,  -497,    77,   -32,    44,  -135,

+  -277,  -491,  -497,  -502,  -424,  -202,  -137,    77,    96,

+    26,  -179,  -469, -1008, -1260,   262,   -35,  -132,  -259,

+   -66,  -232,  -447,  -533,  -789,  -191,  -100,  -267,   364};

+

+/*------------------------------------------------*

+ * 1st stage codebook; 2nd split:   isf9 to isf15

+ *------------------------------------------------*/

+

+static Word16 dico2_isf[SIZE_BK2*7] = {

+

+  1357,  1313,  1136,   784,   438,   181,   145,

+   636,   648,   667,   568,   442,   217,   362,

+   427,   440,   674,   524,   332,   117,  -417,

+   121,   295,   468,   465,   230,    44,  -221,

+  -147,  -240,   149,    80,   390,   278,   106,

+  -418,  -556,   552,   511,   235,   144,   -95,

+    43,   193,   274,   150,    67,    34,  -273,

+   -43,  -126,   171,   416,   282,    63,  -354,

+  -372,   -86,  -344,  -108,   -94,  -182,   -89,

+  -600,  -840,  -200,   465,   258,   -11,  -253,

+   -48,   329,    97,  -290,  -543,  -795,  -354,

+  -570,  -117,   187,    10,  -133,  -416,   -76,

+  -618,  -129,  -247,  -371,    45,   -76,   277,

+ -1022, -1079,   126,   474,   254,   127,    52,

+  -281,    76,  -167,  -361,  -283,  -551,  -283,

+  -119,   -52,    -1,   134,   -32,  -204,  -415,

+  1064,   827,   637,   684,   464,   209,    12,

+   482,   416,   449,   371,   335,   294,   194,

+   719,   576,   365,   135,   113,    91,  -199,

+   298,   176,   493,   366,   194,   163,    36,

+   -35,  -236,  -259,   -36,    -4,    99,   152,

+   -98,  -306,   -27,   228,    90,   111,   -86,

+    91,    13,  -211,  -258,  -106,    86,   -64,

+    73,   -35,   -57,   -31,   162,    35,  -192,

+  -109,  -335,  -629,   -66,   -61,  -128,   322,

+  -495,  -669,  -728,   193,    31,  -220,   122,

+   324,    95,   -89,   -91,  -409,  -710,  -154,

+     0,  -234,    92,    33,  -343,  -609,  -220,

+  -343,  -408,  -476,  -655,  -153,    82,   222,

+  -490,  -745,  -255,    49,   -48,   135,  -127,

+   119,   -67,  -328,  -390,  -272,  -545,   -56,

+   -57,  -130,   -10,    -7,  -164,   -47,   -22,

+   984,  1064,   961,   568,   210,   -27,    16,

+   811,   691,   754,   514,   224,   -35,   166,

+   662,   704,   618,   386,    57,  -211,  -257,

+   510,   359,   418,   393,    91,  -144,   -18,

+  -193,   -31,   -27,   223,    89,  -143,    24,

+  -112,   -98,   471,   319,   185,     3,   175,

+   252,   146,   -47,   272,    48,  -211,  -234,

+   146,    69,   203,   364,    68,   -52,    51,

+  -259,  -478,  -697,  -349,  -758,  -501,    63,

+  -501,  -769,  -289,    79,  -311,  -497,  -106,

+   251,    53,  -235,  -469,  -895,  -884,   145,

+  -416,  -551,   140,  -133,  -523,  -775,    44,

+  -326,  -423,  -713,  -497,   -86,  -431,    99,

+  -757,  -772,  -160,   -76,   -46,   -32,   379,

+    85,   -35,  -200,  -401,  -663, -1040,  -247,

+  -180,  -330,   -92,  -376,    27,  -183,  -110,

+  1279,  1086,   781,   502,   324,   164,   157,

+   682,   466,   449,   277,   146,    28,   409,

+   635,   472,   390,   107,  -232,  -538,  -139,

+   196,   396,   332,   213,   209,   -29,   -81,

+   150,   -95,  -312,    76,   -77,  -320,   -50,

+    46,     9,    47,   175,   139,    30,   384,

+   218,   206,   -24,  -250,   -96,  -276,  -183,

+    26,   119,    38,    14,    -4,  -133,   -52,

+  -477,  -614,  -987,  -715,  -631,  -813,   200,

+  -744, -1009, -1065,  -745,  -631,  -171,    18,

+  -137,  -251,  -483,  -613,  -980, -1203,    12,

+  -605,  -767,  -562,  -686, -1088,  -515,    58,

+  -202,  -428,  -782, -1072,   -96,  -234,  -179,

+  -480,  -709, -1070,  -897,  -131,   -92,   321,

+  -145,  -193,  -512,  -729,  -572,  -765,  -210,

+  -331,  -585,  -525,  -631,  -281,  -208,  -303,

+  1165,  1104,   939,   828,   716,   426,   155,

+     6,  -109,   820,   778,   415,   113,   -27,

+   381,   339,   314,   265,   121,    -9,  -474,

+  -373,    47,   584,   442,    99,  -231,  -113,

+  -496,   -38,  -285,   262,   305,   170,     4,

+  -587,  -556,    69,    66,   471,   354,    13,

+  -138,    70,   -18,   106,    67,   167,  -302,

+  -445,  -141,   185,   191,   151,    83,  -133,

+  -257,  -521,  -720,  -198,   134,   -46,  -182,

+  -819, -1168,  -777,   512,   359,    95,  -113,

+   137,    -2,   -74,  -138,  -401,  -114,  -371,

+  -242,  -466,   204,   223,   -31,  -212,  -192,

+  -532,  -637,  -466,  -686,   256,   277,  -139,

+ -1141, -1244,  -381,   -75,   -54,    14,    88,

+  -311,   115,  -143,  -499,  -343,   124,  -416,

+  -616,  -147,  -135,    43,    -4,   121,  -369,

+   835,   783,   641,   390,   355,   350,    64,

+    72,   194,   443,   467,   436,   219,   372,

+   464,   369,   192,     4,  -156,   -72,  -226,

+    57,   206,   303,   205,   188,   101,   265,

+   -40,  -205,  -488,  -184,   276,    64,   -26,

+  -217,  -433,  -297,   137,   328,   308,  -289,

+   378,    81,  -308,  -465,    57,   -37,   227,

+  -100,    24,   -36,  -151,   199,     8,   143,

+  -426,  -697, -1059,  -133,   388,   161,   321,

+  -644, -1023, -1271,    39,    66,  -123,    70,

+   372,   177,  -173,  -556,  -553,  -304,  -189,

+  -117,  -369,  -425,  -122,  -462,  -152,   -73,

+  -649,  -850, -1189,  -767,   497,   360,   222,

+  -798, -1139, -1455,  -190,   430,   234,   179,

+    42,   -94,  -405,  -692,    38,  -202,  -246,

+  -169,  -366,  -290,   -88,   -64,    32,  -292,

+  1010,   923,   938,   710,   465,   230,   342,

+   217,   300,  1054,   675,    68,  -458,  -179,

+    78,   453,   316,    18,  -237,  -496,  -243,

+   167,    21,   424,   215,   -91,  -303,  -170,

+  -290,   -81,   -70,   -67,    40,    54,   -59,

+  -353,  -427,   -90,    53,    94,     9,    54,

+   -28,   318,   283,    15,  -240,   -58,    79,

+   -75,  -121,   229,    35,    58,     6,  -133,

+  -351,  -514,  -744,  -834,  -705,  -137,   164,

+ -1124, -1388, -1055,  -230,   -73,    40,    36,

+  -163,  -233,  -532,  -785, -1170,  -697,    96,

+  -788,  -959,  -246,  -430,  -624,  -165,    -8,

+  -856,  -540,  -630,  -907,  -337,   -70,    76,

+  -937, -1042,  -659,  -733,  -208,   199,   -26,

+  -523,    78,   -98,  -501,  -869,  -890,   -81,

+  -624,  -703,   -45,  -348,   -25,    87,  -186,

+  1005,   823,   546,   249,    90,   -22,   207,

+   298,   397,   381,   319,   200,    62,   303,

+   473,   379,   133,  -247,  -632,  -441,    75,

+   284,   208,   391,   115,   -25,    44,    95,

+   -72,    79,   -95,   -63,  -129,  -293,   203,

+  -164,  -349,   115,   122,    69,    -1,   378,

+   348,   170,    99,    58,  -179,  -302,   188,

+  -190,    -2,   150,    23,   -51,   -11,   216,

+  -615,  -863, -1090, -1427,  -802,   -48,    -6,

+  -961, -1276, -1548,  -727,   -58,    56,   223,

+  -124,  -255,  -561,  -988, -1277,  -148,   -82,

+  -480,  -660,  -891, -1191, -1339,  -325,    20,

+  -621,  -917, -1296, -1350,   264,   289,    50,

+  -844, -1022, -1345, -1329,  -293,    46,   278,

+  -260,  -468,  -829, -1176,  -533,  -560,   -78,

+  -215,  -484,  -822, -1233,  -791,    15,  -138,

+  1301,  1317,  1262,  1048,   716,   357,   -64,

+   578,   824,   925,   802,   630,   362,   102,

+   470,   925,   767,   514,   327,   190,  -112,

+   225,   492,   495,   437,   598,   384,   -45,

+    43,    82,   -42,   175,   519,   342,   -64,

+  -304,  -154,   159,   576,   403,   221,   327,

+   214,   244,   122,   -62,   312,    92,  -160,

+   218,   208,   310,   268,   306,   323,  -199,

+  -285,  -269,   -79,  -124,  -143,  -153,   236,

+  -205,  -384,  -426,   344,    59,  -185,  -184,

+  -272,   247,   126,  -210,  -518,  -468,    78,

+   -99,  -120,   502,   160,  -280,  -557,   304,

+  -423,   -17,  -283,  -443,   215,   212,  -140,

+  -564,  -684,  -228,   510,   361,   130,   323,

+  -428,   335,    98,   -65,    36,  -215,  -246,

+  -362,    51,   364,   -16,  -234,   150,  -165,

+   914,   883,   751,   653,   676,   464,  -153,

+   631,   545,   535,   720,   596,   360,   -81,

+   783,   712,   512,   439,   341,   251,  -391,

+   497,   417,   249,   372,   295,   173,  -193,

+   128,  -110,  -385,    93,    39,   173,  -231,

+   216,   -59,  -253,   462,   389,   154,    69,

+   455,   270,    -4,  -337,   -49,   233,  -322,

+   307,   143,    53,   218,   128,   236,  -156,

+   -37,  -186,  -240,  -411,  -110,     9,   399,

+  -140,  -365,  -628,   258,   380,   214,   277,

+   131,   454,   177,  -285,  -520,   108,  -214,

+    77,  -141,   201,  -123,  -490,  -131,    60,

+   -14,  -194,  -521,  -741,   273,   362,   -33,

+  -362,  -566,  -287,  -228,   161,   237,   317,

+  -269,   195,   -75,  -375,  -204,    11,    77,

+  -128,  -264,  -156,  -223,  -475,   265,    27,

+  1238,  1147,   916,   689,   432,   210,  -280,

+   800,   664,   879,   726,   411,   160,  -164,

+   454,   686,   536,   275,   147,    46,   111,

+   303,   486,   512,   355,   241,   181,   -69,

+    79,    92,    29,   147,   233,    52,    17,

+  -171,   289,   131,   439,   271,     3,   -10,

+   413,   241,   144,   174,   155,    -2,    14,

+    58,   217,   247,   219,   149,   175,   -18,

+   228,    -8,  -240,  -206,  -513,  -191,   202,

+   -96,  -272,  -454,    33,  -300,  -575,    46,

+   -10,  -108,  -246,  -347,  -770,  -535,     9,

+  -326,  -430,   -61,  -321,  -704,  -299,   201,

+    -1,  -280,  -603,  -419,  -185,    18,   -36,

+  -516,  -522,  -379,  -291,  -181,   -97,    27,

+  -159,  -313,  -525,  -224,  -510,  -831,  -197,

+  -292,  -459,   -59,  -310,  -562,  -143,  -351,

+  1066,   912,   631,   389,   207,    86,  -224,

+   596,   512,   596,   505,   314,   122,   -48,

+   787,   861,   441,   -93,  -303,    33,  -190,

+   257,   469,   337,    51,    15,   298,   -93,

+   295,    73,  -119,    25,    36,    23,   108,

+   -28,    -3,   -32,   114,    21,   185,   107,

+   482,   305,    15,  -279,  -319,    52,    96,

+   226,    46,   115,    72,  -136,   133,  -125,

+    18,  -207,  -559,  -590,  -503,  -482,   321,

+  -571,  -789,  -951,  -172,  -441,  -538,   113,

+   181,    14,  -310,  -641, -1001,  -202,   159,

+  -136,  -393,  -433,  -513,  -911,  -144,   -22,

+    72,  -265,  -706,  -954,  -159,    53,   332,

+  -338,  -591,  -852,  -383,  -395,    56,    44,

+    43,  -158,  -464,  -897,  -631,  -157,  -294,

+  -161,  -128,  -328,  -573,  -483,  -125,    11,

+  1017,   906,  1051,  1005,   679,   341,  -102,

+   359,   334,  1567,  1314,   723,   105,    10,

+   -65,   726,   529,   301,   220,    43,  -273,

+  -510,   436,   719,   566,   358,   179,   114,

+  -560,   298,   133,  -120,   342,   225,    14,

+  -899,  -101,   217,   617,   400,   146,   -58,

+   -41,   352,    82,  -196,    39,   121,  -167,

+  -212,    59,   447,   284,   423,   250,  -169,

+  -371,  -484,  -596,    30,   -41,   249,    22,

+  -372,  -650,  -794,   477,   445,   216,   -79,

+  -352,   275,    17,  -443,  -929,    92,    19,

+  -699,  -696,   431,   264,   -49,  -310,   182,

+  -978,  -217,  -430,  -400,   101,   261,    72,

+  -929,  -889,  -357,   -13,   463,   378,   236,

+  -826,    56,    30,  -299,  -360,  -128,   -51,

+  -878,  -299,  -111,    75,    65,    36,     3,

+   817,   368,   -25,   354,   697,   591,  -173,

+   309,   212,   222,   751,   484,   140,   -56,

+   593,   379,    70,    -8,   258,   180,   110,

+   165,   -46,   255,   297,   219,   273,   105,

+   160,   -70,  -358,  -181,   379,   330,   319,

+  -238,  -369,  -198,   740,   580,   319,  -143,

+   201,   109,  -202,  -456,   328,   276,  -141,

+   203,   170,   111,    42,   207,   360,   188,

+  -345,  -399,  -513,  -233,   650,   422,    81,

+  -635,  -961, -1220,   463,   539,   204,   209,

+   202,   -25,  -194,  -498,  -787,   193,  -143,

+  -449,  -538,   195,  -106,  -331,    68,    62,

+  -228,  -477,  -840,  -576,   317,   128,   283,

+  -671,  -937,  -807,  -114,   391,   335,   -62,

+   246,     2,  -314,  -679,  -303,   180,   -88,

+  -107,  -272,    90,  -198,   -28,   290,  -112,

+   885,  1149,  1021,   712,   496,   281,   -83,

+   269,   492,   787,   643,   347,    70,   124,

+   336,   636,   499,    92,  -229,  -179,   191,

+    26,   402,   564,   340,   149,   -11,   135,

+  -440,   561,   470,   204,   -72,  -186,   140,

+  -720,    14,   355,   229,    68,  -133,   465,

+   110,   310,   103,    12,   106,    29,   158,

+  -178,   113,   161,   142,   121,   115,    27,

+  -651,  -414,  -645,  -152,  -164,   -13,  -429,

+  -639,  -944,  -681,  -104,   -81,    52,  -189,

+  -663,  -164,  -316,  -683,  -954,  -205,   -83,

+  -609,  -669,  -172,  -517,  -694,   283,   -80,

+  -646,  -152,  -383,  -678,  -246,   -40,  -143,

+  -747,  -796,  -745,  -390,   -98,    43,   275,

+  -599,  -199,  -398,  -433,  -436,  -538,    31,

+ -1107,  -568,  -376,  -265,  -126,   -21,     1,

+   847,   573,   308,   392,   305,   101,    55,

+   273,   293,   201,   267,   346,   201,   123,

+   727,   480,   226,     2,   -65,  -138,   164,

+   273,   208,   173,   292,    12,   253,   174,

+   340,   207,   180,    88,   116,    46,   475,

+  -460,  -166,   -30,    13,   110,   173,   396,

+   137,    88,    43,  -137,   -94,    34,   284,

+    96,   -14,   226,    40,    63,    70,   130,

+  -467,  -735, -1012, -1174,  -307,   305,   -67,

+  -612,  -920, -1146,  -567,    -8,    92,   -25,

+  -182,  -271,  -492,  -754,  -857,   287,   -75,

+  -494,  -787,  -689,  -683,  -709,   137,  -326,

+  -288,  -550,  -903, -1105,   334,   321,   -62,

+  -354,  -653,  -834,  -445,     1,   377,  -152,

+  -162,  -306,  -608,  -937,  -297,   247,  -192,

+  -234,  -477,  -244,  -488,  -266,   342,  -332};

+

+/*---------------------------------------------------*

+ * 2nd stage codebook; 1st split:   isf2_0 to isf2_2

+ *---------------------------------------------------*/

+

+

+static Word16 dico21_isf[SIZE_BK21*3] = {

+

+   329,   409,   249,

+   -33,   505,   160,

+   -29,   -14,   582,

+  -262,   127,   354,

+   145,   237,   175,

+  -152,   245,   122,

+    27,    42,   340,

+   -84,   -93,   311,

+   285,   222,  -156,

+    47,   -43,  -504,

+   234,   121,   385,

+   104,  -317,    45,

+   176,   195,     8,

+   104,   -59,   -94,

+   177,    53,   192,

+   -34,  -127,   152,

+   570,   277,   -34,

+   -67,  -329,  -639,

+  -157,  -272,   462,

+  -177,  -462,   198,

+   322,   179,   115,

+  -386,   171,    19,

+    19,   -12,   195,

+  -120,  -252,   201,

+   304,    36,  -336,

+  -128,  -221,  -380,

+   171,  -185,   296,

+  -242,  -312,    23,

+   198,    39,    16,

+    -3,  -177,  -111,

+   111,   -93,    76,

+   -92,  -223,     4,

+   177,   406,   -44,

+  -168,   380,  -149,

+    -4,   273,   331,

+  -420,   513,   277,

+    21,   247,    47,

+   -58,   131,    -2,

+    -3,   134,   180,

+  -145,    40,   175,

+   189,    74,  -145,

+   -27,   -45,  -325,

+   370,  -114,   -21,

+   -83,  -415,  -173,

+    77,    95,   -51,

+   -40,   -30,   -67,

+    71,    88,    86,

+   -35,   -98,    14,

+    69,   197,  -334,

+  -196,    79,  -231,

+  -348,  -137,   218,

+  -352,   -89,   -85,

+    47,   201,  -130,

+  -165,    37,   -15,

+   -43,     3,    86,

+  -161,  -108,    79,

+    83,    21,  -237,

+   -81,  -149,  -238,

+   150,  -186,  -251,

+  -186,  -249,  -162,

+   -19,    66,  -139,

+   -26,   -50,  -181,

+    24,    11,     0,

+  -130,  -105,   -98};

+

+

+

+/*---------------------------------------------------*

+ * 2nd stage codebook; 2nd split:   isf2_3 to isf2_5

+ *---------------------------------------------------*/

+

+

+static Word16 dico22_isf[SIZE_BK22*3] = {

+

+  -127,   310,    42,

+  -242,   197,     5,

+  -151,    84,   -17,

+  -214,   127,  -149,

+  -247,  -131,   159,

+  -268,  -267,   -95,

+  -217,     1,   -79,

+  -271,   -80,  -185,

+   -45,   436,   159,

+   165,   199,   391,

+   -33,    81,   187,

+   -66,   -42,   355,

+  -298,   -57,   343,

+  -108,  -537,   226,

+  -144,   -23,   193,

+   176,  -402,    87,

+    53,   296,    25,

+   -84,   253,  -104,

+   -58,   105,  -126,

+  -169,   174,  -314,

+   -48,    44,  -294,

+  -164,  -417,  -242,

+  -139,     3,  -194,

+  -155,  -207,  -211,

+   119,   322,   213,

+   333,    50,   380,

+   237,   247,    -2,

+   466,   -16,   201,

+   238,  -255,  -107,

+    67,  -440,  -149,

+   122,   -88,  -139,

+    88,  -247,   -73,

+   -41,   231,   167,

+   -62,   155,    16,

+   -65,    16,    77,

+   -68,    -2,   -63,

+  -151,  -300,   160,

+   -18,  -333,    54,

+   -56,   -94,     5,

+     2,  -190,    14,

+    92,   148,   209,

+   108,     9,   272,

+   108,    35,   110,

+   142,   -85,   145,

+    47,  -157,   279,

+     3,  -320,   246,

+    43,   -72,    68,

+    86,  -217,   135,

+    36,   140,    79,

+    56,   175,   -49,

+    26,    45,     3,

+    73,    55,  -101,

+   109,  -183,  -242,

+    -4,  -283,  -242,

+    48,   -68,   -48,

+    -6,  -153,  -122,

+   161,   196,    96,

+   232,    80,   190,

+   165,    97,    11,

+   258,   -31,    71,

+   267,   -77,   -91,

+   311,  -209,    87,

+   152,   -14,   -22,

+   150,  -149,     9,

+  -324,   557,   187,

+  -384,   307,    46,

+  -251,    27,    77,

+  -365,    77,   -52,

+  -482,   -84,   160,

+  -424,  -515,   -64,

+  -294,  -120,    -4,

+  -476,  -116,  -109,

+   -97,   318,   365,

+   106,   627,   445,

+  -190,   120,   287,

+  -146,    65,   619,

+  -427,   242,   363,

+  -361,  -371,   432,

+  -347,   102,   168,

+  -629,   195,   -14,

+   -65,   476,   -47,

+  -297,   320,  -168,

+   -55,   356,  -264,

+  -391,    82,  -286,

+   -51,   -31,  -556,

+  -178,  -399,  -586,

+  -205,   -49,  -360,

+  -343,  -238,  -337,

+   220,   457,    58,

+   561,   467,   259,

+   340,   270,  -168,

+   450,    77,  -280,

+    60,   167,  -413,

+   133,  -252,  -492,

+   216,   157,  -290,

+   282,     0,  -495,

+  -226,   293,   183,

+  -157,   135,   122,

+  -158,   -59,    39,

+  -133,  -118,   -97,

+  -332,  -309,   113,

+  -160,  -425,    -6,

+  -149,  -211,    24,

+   -80,  -277,   -90,

+   -11,   125,   338,

+   130,   -71,   465,

+     5,   -45,   184,

+   237,   -95,   253,

+  -139,  -197,   297,

+   -19,  -300,   511,

+   -63,  -152,   139,

+   250,  -289,   336,

+   124,   339,  -150,

+    34,   176,  -208,

+   171,   166,  -116,

+    94,    38,  -229,

+    75,   -65,  -339,

+   -78,  -205,  -385,

+     0,   -30,  -163,

+   -56,  -110,  -242,

+   321,   244,   194,

+   505,   238,    -1,

+   317,   116,    65,

+   309,    88,   -74,

+   452,   -51,   -50,

+   334,  -217,  -290,

+   211,    41,  -152,

+   238,   -55,  -260};

+

+

+/*---------------------------------------------------*

+ * 2nd stage codebook; 3rd split:   isf2_6 to isf2_8

+ *---------------------------------------------------*/

+

+

+static Word16 dico23_isf[SIZE_BK23*3] = {

+

+   -10,   151,   359,

+   136,   298,   223,

+   255,  -104,   290,

+   423,     6,   183,

+  -270,  -269,   -98,

+   -52,   -82,    13,

+   -82,  -274,   -97,

+    90,  -246,   -72,

+  -299,   -70,   421,

+   -88,   365,   430,

+   187,  -318,   381,

+   380,    37,   488,

+  -373,  -316,    79,

+  -308,  -101,     5,

+  -135,  -451,     8,

+    72,  -421,  -154,

+   180,   170,  -121,

+    62,   177,   -40,

+   326,    80,  -105,

+   248,   263,    -5,

+  -168,  -181,  -221,

+    -2,   -23,  -158,

+   -14,  -149,  -121,

+   119,   -91,  -147,

+   119,   332,  -153,

+    49,   303,    34,

+   442,   -55,   -69,

+   217,   454,    58,

+  -359,  -187,  -375,

+   -42,    50,  -274,

+    -8,  -267,  -249,

+    85,   -86,  -346,

+   -77,   -40,   345,

+    89,   134,   219,

+   156,   -80,   160,

+   108,    40,   116,

+  -158,  -206,    29,

+     5,   -32,   175,

+   -65,  -158,   146,

+    55,   -78,    73,

+  -114,  -222,   353,

+   -47,    81,   211,

+    49,  -151,   268,

+   105,     4,   302,

+  -263,  -132,   183,

+  -151,   -28,   201,

+  -177,  -307,   166,

+   101,  -221,   130,

+    74,    58,   -98,

+    32,    44,    13,

+   194,    30,  -142,

+   170,    96,     8,

+  -136,  -119,   -91,

+   -65,     8,   -55,

+     3,  -188,    12,

+    45,   -63,   -49,

+   149,   -21,   -19,

+    24,   144,    95,

+   254,   -22,    60,

+   161,   196,    96,

+  -158,   -61,    48,

+   -70,    33,    82,

+   -23,  -321,    58,

+   155,  -147,     5,

+  -364,   328,    77,

+   -21,   453,   173,

+  -108,    82,   630,

+   367,   263,   208,

+  -300,   -62,  -176,

+  -205,   143,  -158,

+  -169,  -410,  -264,

+   257,  -269,  -100,

+  -636,   289,    -2,

+  -292,   627,   173,

+  -382,  -363,   387,

+   248,   524,   447,

+  -521,  -111,  -107,

+  -395,   118,  -274,

+  -343,  -680,  -125,

+  -172,  -447,  -663,

+    75,   148,  -367,

+   -79,   263,   -94,

+   249,   148,  -286,

+   380,   271,  -162,

+  -142,    -4,  -186,

+   -57,   111,  -125,

+   -35,  -108,  -254,

+   100,    29,  -242,

+   -80,   303,  -264,

+   -78,   464,   -57,

+   248,   -22,  -494,

+   661,   662,    44,

+  -193,   -40,  -330,

+  -178,   145,  -337,

+   -90,  -199,  -400,

+   -40,   -23,  -498,

+  -192,   114,   315,

+   -41,   244,   190,

+    88,   -97,   485,

+   241,    80,   212,

+  -246,    40,    87,

+  -156,   147,   134,

+    -2,  -334,   239,

+   308,  -203,   110,

+  -459,   251,   422,

+  -218,   310,   228,

+   -86,  -346,   654,

+   184,   175,   425,

+  -481,   -63,   169,

+  -349,   117,   188,

+  -125,  -560,   310,

+   158,  -416,    94,

+    46,   171,  -192,

+   -63,   157,    14,

+   256,   -35,  -271,

+   322,   123,    53,

+  -214,     4,   -76,

+  -156,    86,   -18,

+   128,  -197,  -232,

+   265,   -90,   -98,

+  -308,   332,  -145,

+  -131,   308,    58,

+   509,    59,  -339,

+   562,   196,   -14,

+  -378,   100,   -47,

+  -234,   202,     1,

+   104,  -270,  -493,

+   319,  -210,  -325};

+

+

+/*---------------------------------------------------*

+ * 2nd stage codebook; 4th split:   isf2_9 to isf2_11

+ *---------------------------------------------------*/

+

+static Word16 dico24_isf[SIZE_BK24*3] = {

+

+   -79,   -89,    -4,

+  -171,    77,  -211,

+   160,  -193,    98,

+   120,  -103,   323,

+    32,   -22,  -129,

+    72,    78,  -268,

+   182,   -76,   -66,

+   309,    99,  -145,

+  -229,  -157,   -84,

+  -383,    98,   -71,

+   -90,  -352,    12,

+  -284,  -178,   178,

+   -65,  -125,  -166,

+   -87,  -175,  -351,

+    42,  -198,   -48,

+   154,  -140,  -243,

+   -77,    18,   108,

+   -39,   355,    91,

+    87,     8,   155,

+    -4,   158,   239,

+   128,    95,   -54,

+     7,   246,  -124,

+   258,    15,    89,

+   206,   216,    98,

+  -201,     9,    18,

+  -312,   233,   204,

+   -39,  -174,   155,

+  -144,    -9,   284,

+   -57,    70,   -69,

+  -157,   187,    18,

+    54,   -30,    23,

+    24,   135,    55};

+

+

+/*---------------------------------------------------*

+ * 2nd stage codebook; 5th split:   isf2_12 to isf2_15

+ *---------------------------------------------------*/

+

+static Word16 dico25_isf[SIZE_BK25*4] = {

+

+   169,   142,  -119,   115,

+   206,   -20,    94,   226,

+  -106,   313,   -21,    16,

+   -62,   161,    71,   255,

+   -89,   101,  -185,   125,

+    72,   -30,  -201,   344,

+  -258,    33,    -8,    81,

+  -104,  -154,    72,   296,

+   144,   -68,  -268,   -25,

+    81,   -78,   -87,   106,

+    22,   155,  -186,  -119,

+   -46,   -28,    27,    91,

+  -114,   -37,  -175,   -33,

+   -94,  -222,  -189,   122,

+  -132,  -119,  -191,  -270,

+  -172,  -173,    18,   -43,

+   279,   135,   -42,  -128,

+   187,   -86,   229,  -138,

+   159,   240,   140,    46,

+    69,    25,   227,    77,

+    21,   115,    13,     8,

+    68,  -248,   126,    81,

+  -150,   137,   207,    -9,

+  -154,  -133,   289,    67,

+   143,   -37,   -86,  -326,

+   180,   -32,    19,   -23,

+    26,   168,   116,  -233,

+   -32,   -26,   118,   -78,

+     3,    -8,   -45,  -115,

+    57,  -215,   -54,   -83,

+  -209,   112,   -22,  -167,

+   -91,  -151,   168,  -262};

+

+

+

+       /* 36 bit */

+/*-------------------------------------------------------------------*

+ *  isf codebooks:  two-stage VQ with split-by-3 in 2nd stage        *

+ *                1st stage is kept the same as the 46 bit quantizer *

+ *                                                                   *

+ *  codebook   vector dimension    number of vectors                 *

+ *  ~~~~~~~~   ~~~~~~~~~~~~~~~~    ~~~~~~~~~~~~~~~~~                 *

+ *     1_1            9                  256                         *

+ *     1_2            7                  256                         *

+ *     2_1            5                  128                         *

+ *     2_2            4                  128                         *

+ *     2_3            7                  64                          *

+ *-------------------------------------------------------------------*/

+

+static Word16 dico21_isf_36b[SIZE_BK21_36b*5] = {

+

+   -52,   -96,   212,   315,   -73,

+    82,  -204,   363,   136,  -197,

+  -126,  -331,   183,   218,   143,

+   -49,   -41,   557,   230,    72,

+     2,   -73,   163,   377,   221,

+   133,   111,   278,   215,  -110,

+  -102,   -20,   284,   113,   273,

+    84,   319,   290,    18,    85,

+   -25,    -5,   125,   132,  -204,

+   -38,    -5,   286,    -9,  -356,

+  -140,  -256,    92,   117,  -189,

+  -144,   191,   313,    51,   -98,

+   167,   -10,    44,   247,    36,

+   381,   197,   238,    74,     6,

+    38,  -408,    29,    -3,   -85,

+    92,   266,   157,   -25,  -200,

+   161,  -121,    70,    84,  -140,

+   -16,   -86,   112,   -94,  -189,

+  -269,  -270,   351,   107,   -24,

+   -68,   -67,   492,  -103,  -155,

+   -53,  -131,    62,   122,    10,

+   135,    84,   283,   -55,  -120,

+   -12,  -219,   331,   -81,   167,

+   220,  -136,   147,  -172,   -42,

+   140,   -95,  -109,   -88,  -194,

+     0,    -2,    -4,   -33,  -381,

+   -66,  -217,   152,  -186,  -402,

+   244,   108,   156,  -140,  -395,

+   113,  -136,  -196,   110,   -24,

+   214,   118,    11,   -64,  -131,

+  -110,  -286,    -6,  -332,    16,

+    94,    97,    79,  -291,  -205,

+    -5,   -39,   -20,   252,   -96,

+    76,   174,   101,   163,    61,

+   -69,  -239,   -55,   399,     6,

+  -115,   319,   164,   275,   196,

+   -15,    36,   -47,   331,   121,

+   226,   209,   271,   325,   184,

+    13,   -80,  -218,   471,   353,

+   288,   378,    16,   -51,   251,

+   174,   116,    52,   149,  -279,

+   235,   276,    39,   120,   -48,

+     0,  -108,  -108,   241,  -339,

+   -93,   534,    45,    33,   -87,

+   194,   149,   -71,   405,   -44,

+   409,   370,    81,  -186,  -154,

+    25,  -102,  -448,   124,  -173,

+    22,   408,  -110,  -310,  -214,

+   -26,    23,   -83,   114,    14,

+  -110,   164,    52,   223,   -82,

+    37,   -25,  -263,   306,   -15,

+  -466,   415,   292,   165,   -18,

+    29,   -19,  -171,   155,   182,

+   179,   144,   -27,   231,   258,

+  -103,  -247,  -396,   238,   113,

+   375,  -154,  -109,    -4,   156,

+    98,    85,  -292,    -5,  -124,

+   116,   139,  -116,   -98,  -294,

+   -14,   -83,  -278,  -117,  -378,

+   106,    33,  -106,  -344,  -484,

+   119,    17,  -412,   138,   166,

+   384,   101,  -204,    88,  -156,

+  -121,  -284,  -300,    -1,  -166,

+   280,    33,  -152,  -313,   -81,

+   -37,    22,   229,   153,    37,

+   -60,   -83,   236,    -8,   -41,

+  -169,  -228,   126,   -20,   363,

+  -235,    17,   364,  -156,   156,

+   -25,   -30,    72,   144,   156,

+   153,   -26,   256,    97,   144,

+   -21,   -37,    48,   -65,   250,

+    63,    77,   273,  -128,   124,

+  -129,   -26,    40,     9,  -115,

+    -6,    82,    38,   -90,  -182,

+  -336,   -13,    28,   158,    91,

+   -30,   241,   137,  -170,   -17,

+   146,    14,   -11,    33,    61,

+   192,   197,    54,   -84,    85,

+    23,  -200,   -78,   -29,   140,

+   122,   237,   106,  -341,   136,

+   -57,  -142,   -85,   -16,   -74,

+   -59,   -90,    -8,  -187,   -20,

+  -211,  -267,   216,  -179,  -110,

+   -50,    -7,   220,  -267,   -70,

+   -57,   -42,   -17,   -15,    71,

+    32,    21,    63,  -137,    33,

+  -137,  -175,   104,   -68,    97,

+   -67,   -43,   133,  -301,   221,

+  -116,  -200,   -81,   -92,  -272,

+   -64,   -41,   -54,  -244,  -220,

+  -287,  -242,   -50,   -87,   -89,

+  -245,   236,   102,  -166,  -295,

+    66,    24,  -162,   -71,    95,

+    66,   136,   -90,  -220,   -36,

+   -98,  -161,  -222,  -188,    29,

+   -18,    18,   -19,  -415,     9,

+    49,    61,   100,    39,   -56,

+  -111,    82,   135,   -31,    52,

+   -90,  -153,   -93,   189,   182,

+  -214,   295,   119,   -74,   284,

+     2,   137,    37,    47,   182,

+    92,   117,   184,   -53,   373,

+   -21,   -14,   -35,   136,   391,

+   146,   129,  -164,   -28,   333,

+    92,    80,   -84,   100,  -134,

+    -8,   217,   -32,     3,   -47,

+  -151,   251,  -215,   142,    92,

+  -224,   310,  -172,  -275,    98,

+   159,   155,  -177,   112,    53,

+   205,    27,     8,  -240,   192,

+   169,   120,  -319,  -201,   106,

+    11,    36,   -86,  -237,   455,

+  -109,  -154,  -163,   174,   -55,

+   -38,    32,  -101,   -78,   -59,

+  -205,  -321,   -97,    69,    79,

+  -310,    44,    18,  -185,    34,

+  -115,   -20,  -148,   -39,   203,

+   -29,   154,   -30,  -158,   166,

+   -45,  -131,  -317,   -24,   363,

+  -165,  -205,  -112,  -222,   265,

+   -32,   -44,  -150,    54,  -193,

+    -6,   -38,  -255,  -169,  -115,

+  -266,    87,  -189,   -36,  -169,

+   -60,   -87,  -266,  -436,  -170,

+   -68,   -81,  -278,    24,    38,

+   -23,   -19,  -155,  -256,   141,

+   -61,  -226,  -565,  -175,    71,

+     9,   -29,  -237,  -515,   263};

+

+static Word16 dico22_isf_36b[SIZE_BK22_36b*4] = {

+

+  -298,    -6,    95,    31,

+  -213,   -87,  -122,   261,

+     4,   -49,   208,    14,

+  -129,  -110,    30,   118,

+  -214,   258,   110,  -235,

+   -41,   -18,  -126,   120,

+   103,    65,   127,   -37,

+   126,   -36,   -24,    25,

+  -138,   -67,  -278,  -186,

+  -164,  -194,  -201,    78,

+  -211,   -87,   -51,  -221,

+  -174,   -79,   -94,   -39,

+    23,    -6,  -157,  -240,

+    22,  -110,  -153,   -68,

+   148,    -5,    -2,  -149,

+    -1,  -135,   -39,  -179,

+    68,   360,  -117,   -15,

+   137,    47,  -278,   146,

+   136,   260,   135,    65,

+    61,   116,   -45,    97,

+   231,   379,    87,  -120,

+   338,   177,  -272,     3,

+   266,   156,    28,   -69,

+   260,    84,   -85,    86,

+  -266,   154,  -256,  -182,

+   -17,   -65,  -304,    -6,

+   -40,   175,  -151,  -180,

+   -27,    27,   -87,   -63,

+   121,   114,  -166,  -469,

+   159,   -66,  -323,  -231,

+   214,   152,  -141,  -212,

+   137,    36,  -184,   -51,

+  -282,  -237,    40,    10,

+   -48,  -235,   -37,   251,

+   -54,  -323,   136,    29,

+   -88,  -174,   213,   198,

+  -390,    99,   -63,  -375,

+   107,  -169,  -164,   424,

+    69,  -111,   141,  -167,

+    74,  -129,    65,   144,

+  -353,  -207,  -205,  -109,

+  -160,  -386,  -355,    98,

+  -176,  -493,   -20,  -143,

+  -252,  -432,    -2,   216,

+   -90,  -174,  -168,  -411,

+    13,  -284,  -229,  -160,

+   -87,  -279,    34,  -251,

+   -75,  -263,   -58,   -42,

+   420,    53,  -211,  -358,

+   384,   -35,  -374,   396,

+    68,  -228,   323,    -2,

+   167,  -307,   192,   194,

+   459,   329,    -5,  -332,

+   375,    79,    -7,   313,

+   282,  -124,   200,   -92,

+   271,  -162,   -70,   180,

+  -157,  -298,  -514,  -309,

+    58,  -163,  -546,    18,

+   124,  -364,   167,  -238,

+    83,  -411,  -117,    96,

+   140,  -112,  -388,  -624,

+   259,  -133,  -317,    41,

+   163,  -130,   -64,  -334,

+   226,  -165,  -124,  -110,

+  -466,   -61,     6,   229,

+  -153,   205,  -145,   242,

+  -159,    48,   195,   148,

+   -58,    28,    31,   279,

+  -303,   185,   279,    -4,

+   -61,   197,    59,    86,

+  -114,   123,   168,   -52,

+    35,    36,   100,   126,

+  -407,   102,   -77,   -40,

+  -338,    -1,  -342,   156,

+  -179,   105,   -34,   -97,

+  -185,    84,   -35,   108,

+  -133,   107,   -91,  -357,

+  -180,    54,  -229,    24,

+   -44,    47,    47,  -182,

+   -66,    13,    45,     4,

+  -339,   251,    64,   226,

+   -42,   101,  -350,   275,

+   -99,   398,   142,   121,

+   111,    12,  -102,   260,

+     0,   505,   260,   -94,

+   161,   285,   -96,   224,

+    -4,   206,   314,    33,

+   167,   139,    88,   204,

+  -235,   316,   -60,   -25,

+    -8,  -150,  -312,   201,

+   -36,   292,    61,  -104,

+   -40,   174,  -162,    42,

+   -21,   402,   -29,  -351,

+    21,   152,  -360,   -93,

+    57,   191,   212,  -196,

+    76,   158,   -21,   -69,

+  -328,  -185,   331,   119,

+   -53,   285,    56,   337,

+  -107,   -24,   405,    29,

+   -18,   137,   272,   277,

+  -255,    22,   173,  -191,

+   295,   322,   325,   302,

+    21,   -27,   332,  -178,

+   119,    13,   271,   129,

+  -455,  -180,   116,  -191,

+  -227,    62,  -148,   524,

+  -176,  -287,   282,  -157,

+  -243,    13,   199,   430,

+   -59,   -49,   115,  -365,

+    72,  -172,  -137,    93,

+  -138,  -126,   141,   -84,

+     5,  -124,    38,   -20,

+  -258,   311,   601,   213,

+    94,   130,   -61,   502,

+    -1,  -157,   485,   313,

+   146,   -74,   158,   345,

+   276,   135,   280,   -57,

+   490,   252,    99,    43,

+   267,   -74,   429,   105,

+   278,   -23,   119,    94,

+  -542,   488,   257,  -115,

+   -84,  -244,  -438,   478,

+  -113,  -545,   387,   101,

+   -95,  -306,   111,   498,

+    95,   166,    22,  -301,

+   420,   -15,   -58,   -78,

+   270,    29,   122,  -282,

+   160,  -240,    50,   -38};

+

+static Word16 dico23_isf_36b[SIZE_BK23_36b*7] = {

+

+    81,   -18,    68,   -27,  -122,  -280,    -4,

+    45,  -177,   209,   -30,  -136,   -74,   131,

+   -44,   101,   -75,   -88,   -48,  -137,   -54,

+  -245,   -28,    63,   -18,  -112,  -103,    58,

+   -79,    -6,   220,   -65,   114,   -35,   -50,

+   109,   -65,   143,  -114,   129,    76,   125,

+   166,    90,   -61,  -242,   186,   -74,   -43,

+   -46,   -92,    49,  -227,    24,  -155,    39,

+    67,    85,    99,   -42,    53,  -184,  -281,

+   142,  -122,     0,    21,  -142,   -15,   -17,

+   223,    92,   -21,   -48,   -82,   -14,  -167,

+    51,   -37,  -243,   -30,   -90,    18,   -56,

+    54,   105,    74,    86,    69,    13,  -101,

+   196,    72,   -89,    43,    65,    19,    39,

+   121,    34,   131,   -82,    25,   213,  -156,

+   101,  -102,  -136,   -21,    57,   214,    22,

+    36,  -124,   205,   204,    58,  -156,   -83,

+    83,  -117,   137,   137,    85,   116,    44,

+   -92,  -148,   -68,    11,  -102,  -197,  -220,

+   -76,  -185,   -58,   132,   -26,  -183,    85,

+    -7,   -31,    -2,    23,   205,  -151,    10,

+   -27,   -37,    -5,   -18,   292,   131,     1,

+   117,  -168,     9,   -93,    80,   -59,  -125,

+  -182,  -244,    98,   -24,   135,   -22,    94,

+   221,    97,   106,    42,    43,  -160,    83,

+    25,   -64,   -21,     6,    14,   -15,   154,

+   126,    15,  -140,   150,   -10,  -207,  -114,

+    79,   -63,  -211,   -70,   -28,  -217,   165,

+    46,    38,   -22,   281,   132,   -62,   109,

+   112,    54,  -112,   -93,   208,    27,   296,

+   115,    10,  -147,    41,   216,    42,  -276,

+    50,  -115,  -254,   167,   117,    -2,    61,

+    17,   144,    34,   -72,  -186,  -150,   272,

+   -29,   -66,   -89,   -95,  -149,   129,   251,

+   122,     0,   -50,  -234,   -91,    36,    26,

+  -105,  -102,   -88,  -121,  -236,    -7,   -11,

+  -204,   109,     5,  -191,   105,   -15,   163,

+   -80,    32,   -24,  -209,    41,   294,    70,

+  -106,   -94,  -204,  -118,   120,   -50,   -37,

+   -82,  -241,    46,  -131,   -29,   150,   -55,

+    33,   155,   120,   -89,    -8,     7,    62,

+   213,    82,    61,    18,  -161,   144,   152,

+    30,   131,    65,   -87,  -255,   -17,  -107,

+    -8,    85,   -64,    51,  -162,   223,   -53,

+  -134,   261,    69,   -56,   218,    72,  -111,

+     2,   155,  -113,   -87,    49,    85,   -28,

+  -163,    42,    -1,  -196,     7,    39,  -245,

+    14,  -137,   -79,    11,  -160,   202,  -293,

+   -94,    33,   208,   100,    56,   -44,   326,

+   -78,   -41,   232,    13,  -142,   227,    80,

+   -16,   -87,   201,    33,  -133,    15,  -183,

+   -58,  -192,   -47,   184,  -128,   133,    99,

+  -205,    11,  -155,    78,    52,    72,   141,

+  -246,    26,    99,   151,    59,   115,   -64,

+   -79,   -47,   -16,   -14,     6,    47,   -43,

+   -72,  -178,   -27,   162,   112,    43,  -174,

+  -175,   238,   186,    71,   -54,  -188,   -76,

+  -225,   233,    39,   -39,  -158,   122,    44,

+   -26,    43,    84,   130,   -93,   -51,    22,

+     3,    92,  -150,   136,  -182,   -57,    97,

+  -131,   179,   -78,    80,    91,  -165,    90,

+    -2,   148,    15,   130,    65,   175,   117,

+  -138,   114,  -137,   132,     3,   -10,  -186,

+   140,    -4,   -37,   254,   -62,    92,  -109};

+

+

diff --git a/media/libstagefright/codecs/amrwbenc/inc/stream.h b/media/libstagefright/codecs/amrwbenc/inc/stream.h
new file mode 100644
index 0000000..edbc13a
--- /dev/null
+++ b/media/libstagefright/codecs/amrwbenc/inc/stream.h
@@ -0,0 +1,47 @@
+

+/*

+ ** Copyright 2003-2010, VisualOn, Inc.

+ **

+ ** Licensed under the Apache License, Version 2.0 (the "License");

+ ** you may not use this file except in compliance with the License.

+ ** You may obtain a copy of the License at

+ **

+ **     http://www.apache.org/licenses/LICENSE-2.0

+ **

+ ** Unless required by applicable law or agreed to in writing, software

+ ** distributed under the License is distributed on an "AS IS" BASIS,

+ ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

+ ** See the License for the specific language governing permissions and

+ ** limitations under the License.

+ */

+

+

+/***********************************************************************

+File:		stream.h

+

+Contains:       VOME API Buffer Operator Implement Header

+

+************************************************************************/

+#ifndef __STREAM_H__

+#define __STREAM_H__

+

+#include "voMem.h"

+#define Frame_Maxsize  1024 * 2  //Work Buffer 10K 

+#define Frame_MaxByte  640        //AMR_WB Encoder one frame 320 samples = 640 Bytes

+#define MIN(a,b)	 ((a) < (b)? (a) : (b))

+

+typedef struct{

+	unsigned char *set_ptr;

+	unsigned char *frame_ptr;

+	unsigned char *frame_ptr_bk;

+	int  set_len;

+	int  framebuffer_len; 

+	int  frame_storelen;

+	int  used_len;

+}FrameStream;

+

+void voAWB_UpdateFrameBuffer(FrameStream *stream, VO_MEM_OPERATOR *pMemOP);

+void voAWB_InitFrameBuffer(FrameStream *stream);

+void voAWB_FlushFrameBuffer(FrameStream *stream);

+#endif //__STREAM_H__

+

diff --git a/media/libstagefright/codecs/amrwbenc/inc/typedef.h b/media/libstagefright/codecs/amrwbenc/inc/typedef.h
new file mode 100644
index 0000000..aa8c098
--- /dev/null
+++ b/media/libstagefright/codecs/amrwbenc/inc/typedef.h
@@ -0,0 +1,65 @@
+/*

+ ** Copyright 2003-2010, VisualOn, Inc.

+ **

+ ** Licensed under the Apache License, Version 2.0 (the "License");

+ ** you may not use this file except in compliance with the License.

+ ** You may obtain a copy of the License at

+ **

+ **     http://www.apache.org/licenses/LICENSE-2.0

+ **

+ ** Unless required by applicable law or agreed to in writing, software

+ ** distributed under the License is distributed on an "AS IS" BASIS,

+ ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

+ ** See the License for the specific language governing permissions and

+ ** limitations under the License.

+ */

+

+/***********************************************************************

+*

+*      File             : typedef.c

+*      Purpose          : Basic types.

+*

+************************************************************************/

+

+#ifndef __TYPEDEF_H__

+#define __TYPEDEF_H__

+

+#undef ORIGINAL_TYPEDEF_H /* define to get "original" ETSI version

+                             of typedef.h                           */

+

+#ifdef ORIGINAL_TYPEDEF_H

+/*

+ * this is the original code from the ETSI file typedef.h

+ */

+   

+#if defined(__BORLANDC__) || defined(__WATCOMC__) || defined(_MSC_VER) || defined(__ZTC__)

+typedef signed char Word8;

+typedef short Word16;

+typedef long Word32;

+typedef int Flag;

+

+#elif defined(__sun)

+typedef signed char Word8;

+typedef short Word16;

+typedef long Word32;

+typedef int Flag;

+

+#elif defined(__unix__) || defined(__unix)

+typedef signed char Word8;

+typedef short Word16;

+typedef int Word32;

+typedef int Flag;

+

+#endif

+#else /* not original typedef.h */

+

+/*

+ * use (improved) type definition file typdefs.h and add a "Flag" type

+ */

+#include "typedefs.h"

+typedef int Flag;

+

+#endif

+

+#endif  //__TYPEDEF_H__

+

diff --git a/media/libstagefright/codecs/amrwbenc/inc/typedefs.h b/media/libstagefright/codecs/amrwbenc/inc/typedefs.h
new file mode 100644
index 0000000..28b657e
--- /dev/null
+++ b/media/libstagefright/codecs/amrwbenc/inc/typedefs.h
@@ -0,0 +1,211 @@
+/*

+ ** Copyright 2003-2010, VisualOn, Inc.

+ **

+ ** Licensed under the Apache License, Version 2.0 (the "License");

+ ** you may not use this file except in compliance with the License.

+ ** You may obtain a copy of the License at

+ **

+ **     http://www.apache.org/licenses/LICENSE-2.0

+ **

+ ** Unless required by applicable law or agreed to in writing, software

+ ** distributed under the License is distributed on an "AS IS" BASIS,

+ ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

+ ** See the License for the specific language governing permissions and

+ ** limitations under the License.

+ */

+

+/*

+*

+*      File             : typedefs.h

+*      Description      : Definition of platform independent data

+*                         types and constants

+*

+*

+*      The following platform independent data types and corresponding

+*      preprocessor (#define) constants are defined:

+*

+*        defined type  meaning           corresponding constants

+*        ----------------------------------------------------------

+*        Char          character         (none)

+*        Bool          boolean           true, false

+*        Word8         8-bit signed      minWord8,   maxWord8

+*        UWord8        8-bit unsigned    minUWord8,  maxUWord8

+*        Word16        16-bit signed     minWord16,  maxWord16

+*        UWord16       16-bit unsigned   minUWord16, maxUWord16

+*        Word32        32-bit signed     minWord32,  maxWord32

+*        UWord32       32-bit unsigned   minUWord32, maxUWord32

+*        Float         floating point    minFloat,   maxFloat

+*

+*

+*      The following compile switches are #defined:

+*

+*        PLATFORM      string indicating platform progam is compiled on

+*                      possible values: "OSF", "PC", "SUN"

+*

+*        OSF           only defined if the current platform is an Alpha

+*        PC            only defined if the current platform is a PC

+*        SUN           only defined if the current platform is a Sun

+*        

+*        LSBFIRST      is defined if the byte order on this platform is

+*                      "least significant byte first" -> defined on DEC Alpha

+*                      and PC, undefined on Sun

+*

+********************************************************************************

+*/

+

+#ifndef __TYPEDEFS_H__

+#define __TYPEDEFS_H__

+

+/*

+********************************************************************************

+*                         INCLUDE FILES

+********************************************************************************

+*/

+#include <float.h>

+#include <limits.h>

+

+

+

+/*

+********************************************************************************

+*                         DEFINITION OF CONSTANTS 

+********************************************************************************

+*/

+/*

+ ********* define char type

+ */

+typedef char Char;

+

+/*

+ ********* define 8 bit signed/unsigned types & constants

+ */

+#if SCHAR_MAX == 127

+typedef signed char Word8;

+#define minWord8  SCHAR_MIN

+#define maxWord8  SCHAR_MAX

+

+typedef unsigned char UWord8;

+#define minUWord8 0

+#define maxUWord8 UCHAR_MAX

+#else

+#error cannot find 8-bit type

+#endif

+

+

+/*

+ ********* define 16 bit signed/unsigned types & constants

+ */

+#if INT_MAX == 32767

+typedef int Word16;

+#define minWord16     INT_MIN

+#define maxWord16     INT_MAX

+typedef unsigned int UWord16;

+#define minUWord16    0

+#define maxUWord16    UINT_MAX

+#elif SHRT_MAX == 32767

+typedef short Word16;

+#define minWord16     SHRT_MIN

+#define maxWord16     SHRT_MAX

+typedef unsigned short UWord16;

+#define minUWord16    0

+#define maxUWord16    USHRT_MAX

+#else

+#error cannot find 16-bit type

+#endif

+

+

+/*

+ ********* define 32 bit signed/unsigned types & constants

+ */

+#if INT_MAX == 2147483647

+typedef int Word32;

+#define minWord32     INT_MIN

+#define maxWord32     INT_MAX

+typedef unsigned int UWord32;

+#define minUWord32    0

+#define maxUWord32    UINT_MAX

+#elif LONG_MAX == 2147483647

+typedef long Word32;

+#define minWord32     LONG_MIN

+#define maxWord32     LONG_MAX

+typedef unsigned long UWord32;

+#define minUWord32    0

+#define maxUWord32    ULONG_MAX

+#else

+#error cannot find 32-bit type

+#endif

+

+/*

+ ********* define floating point type & constants

+ */

+/* use "#if 0" below if Float should be double;

+   use "#if 1" below if Float should be float

+ */

+#if 0

+typedef float Float;

+#define maxFloat      FLT_MAX

+#define minFloat      FLT_MIN

+#else

+typedef double Float;

+#define maxFloat      DBL_MAX

+#define minFloat      DBL_MIN

+#endif

+

+/*

+ ********* define complex type

+ */

+typedef struct {

+  Float r;  /* real      part */

+  Float i;  /* imaginary part */

+} CPX;

+

+/*

+ ********* define boolean type

+ */

+typedef int Bool;

+#define false 0

+#define true 1

+

+/* ******Avoid function multiple definition****** */

+#define     Autocorr         voAWB_Autocorr

+#define     Convolve         voAWB_Convolve

+#define     cor_h_x          voAWB_cor_h_x

+#define     dtx_enc_init     voAWB_dtx_enc_init

+#define     dtx_enc_reset    voAWB_dtx_enc_reset

+#define     dtx_enc_exit     voAWB_dtx_enc_exit

+#define     dtx_enc          voAWB_dtx_enc

+#define     dtx_buffer       voAWB_dtx_buffer

+#define     tx_dtx_handler   voAWB_tx_dtx_handler

+#define     G_pitch          voAWB_G_pitch

+#define     Isp_Az           voAWB_Isp_Az

+#define     Lag_window       voAWB_Lag_window

+#define     Log2_norm        voAWB_Log2_norm

+#define     Log2             voAWB_Log2

+#define     Pow2             voAWB_Pow2

+#define     L_Comp           voAWB_L_Comp

+#define     Mpy_32           voAWB_Mpy_32

+#define     Mpy_32_16        voAWB_Mpy_32_16

+#define     Div_32           voAWB_Div_32

+#define     Pit_shrp         voAWB_Pit_shrp

+#define     Qisf_ns          voAWB_Qisf_ns

+#define     Disf_ns          voAWB_Disf_ns

+#define     Residu           voAWB_Residu

+#define     Syn_filt         voAWB_Syn_filt

+#define     Set_zero         voAWB_Set_zero

+#define     Copy             voAWB_Copy

+#define     voice_factor     voAWB_voice_factor

+#define     Syn_filt_32      voAWB_Syn_filt_32

+#define     Isf_isp          voAWB_Isf_isp

+#define     Levinson         voAWB_Levinson

+#define     median5          voAWB_median5           

+#define     Pred_lt4         voAWB_Pred_lt4

+#define     Reorder_isf      voAWB_Reorder_isf

+#define     Dpisf_2s_36b     voAWB_Dpisf_2s_36b

+#define     Dpisf_2s_46b     voAWB_Dpisf_2s_46b

+#define     Dot_product12    voAWB_Dot_product12

+#define     mem_malloc       voAWB_mem_malloc

+#define     mem_free         voAWB_mem_free

+/******************************************************/

+

+#endif  //#define __TYPEDEFS_H__

+

diff --git a/media/libstagefright/codecs/amrwbenc/inc/wb_vad.h b/media/libstagefright/codecs/amrwbenc/inc/wb_vad.h
new file mode 100644
index 0000000..b733afe
--- /dev/null
+++ b/media/libstagefright/codecs/amrwbenc/inc/wb_vad.h
@@ -0,0 +1,78 @@
+/*

+ ** Copyright 2003-2010, VisualOn, Inc.

+ **

+ ** Licensed under the Apache License, Version 2.0 (the "License");

+ ** you may not use this file except in compliance with the License.

+ ** You may obtain a copy of the License at

+ **

+ **     http://www.apache.org/licenses/LICENSE-2.0

+ **

+ ** Unless required by applicable law or agreed to in writing, software

+ ** distributed under the License is distributed on an "AS IS" BASIS,

+ ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

+ ** See the License for the specific language governing permissions and

+ ** limitations under the License.

+ */

+

+

+/*-------------------------------------------------------------------*

+ *                         WB_VAD.H                                  *

+ *-------------------------------------------------------------------*

+ * Functions and static memory for Voice Activity Detection.         *

+ *-------------------------------------------------------------------*/

+

+#ifndef __WB_VAD_H__

+#define __WB_VAD_H__

+

+/******************************************************************************

+ *                         INCLUDE FILES

+ ******************************************************************************/

+#include "typedef.h"

+#include "wb_vad_c.h"

+#include "voMem.h"

+

+/******************************************************************************

+ *                         DEFINITION OF DATA TYPES

+ ******************************************************************************/

+

+typedef struct

+{

+	Word16 bckr_est[COMPLEN];              /* background noise estimate                */

+	Word16 ave_level[COMPLEN];             /* averaged input components for stationary */

+	/* estimation                               */

+	Word16 old_level[COMPLEN];             /* input levels of the previous frame       */

+	Word16 sub_level[COMPLEN];             /* input levels calculated at the end of a frame (lookahead)  */

+	Word16 a_data5[F_5TH_CNT][2];          /* memory for the filter bank               */

+	Word16 a_data3[F_3TH_CNT];             /* memory for the filter bank               */

+

+	Word16 burst_count;                    /* counts length of a speech burst          */

+	Word16 hang_count;                     /* hangover counter                         */

+	Word16 stat_count;                     /* stationary counter                       */

+

+	/* Note that each of the following two variables holds 15 flags. Each flag reserves 1 bit of the

+	 * variable. The newest flag is in the bit 15 (assuming that LSB is bit 1 and MSB is bit 16). */

+	Word16 vadreg;                         /* flags for intermediate VAD decisions     */

+	Word16 tone_flag;                      /* tone detection flags                     */

+

+	Word16 sp_est_cnt;                     /* counter for speech level estimation      */

+	Word16 sp_max;                         /* maximum level                            */

+	Word16 sp_max_cnt;                     /* counts frames that contains speech       */

+	Word16 speech_level;                   /* estimated speech level                   */

+	Word32 prev_pow_sum;                   /* power of previous frame                  */

+

+} VadVars;

+

+/********************************************************************************

+ *

+ * DECLARATION OF PROTOTYPES

+ ********************************************************************************/

+

+Word16 wb_vad_init(VadVars ** st, VO_MEM_OPERATOR *pMemOP);

+Word16 wb_vad_reset(VadVars * st);

+void wb_vad_exit(VadVars ** st, VO_MEM_OPERATOR *pMemOP);

+void wb_vad_tone_detection(VadVars * st, Word16 p_gain);

+Word16 wb_vad(VadVars * st, Word16 in_buf[]);

+

+#endif  //__WB_VAD_H__

+

+

diff --git a/media/libstagefright/codecs/amrwbenc/inc/wb_vad_c.h b/media/libstagefright/codecs/amrwbenc/inc/wb_vad_c.h
new file mode 100644
index 0000000..39ef506
--- /dev/null
+++ b/media/libstagefright/codecs/amrwbenc/inc/wb_vad_c.h
@@ -0,0 +1,109 @@
+/*

+ ** Copyright 2003-2010, VisualOn, Inc.

+ **

+ ** Licensed under the Apache License, Version 2.0 (the "License");

+ ** you may not use this file except in compliance with the License.

+ ** You may obtain a copy of the License at

+ **

+ **     http://www.apache.org/licenses/LICENSE-2.0

+ **

+ ** Unless required by applicable law or agreed to in writing, software

+ ** distributed under the License is distributed on an "AS IS" BASIS,

+ ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

+ ** See the License for the specific language governing permissions and

+ ** limitations under the License.

+ */

+

+

+/*-------------------------------------------------------------------*

+ *                         WB_VAD_C.H				     *

+ *-------------------------------------------------------------------*

+ * Constants for Voice Activity Detection.			     *

+ *-------------------------------------------------------------------*/

+

+#ifndef __WB_VAD_C_H__

+#define __WB_VAD_C_H__

+

+#define FRAME_LEN 256                      /* Length (samples) of the input frame          */

+#define COMPLEN 12                         /* Number of sub-bands used by VAD              */

+

+#define UNIRSHFT 7                         /* = log2(MAX_16/UNITY), UNITY = 256      */

+#define SCALE 128                          /* (UNITY*UNITY)/512 */

+

+#define TONE_THR (Word16)(0.65*MAX_16)     /* Threshold for tone detection   */

+

+/* constants for speech level estimation */

+#define SP_EST_COUNT 80

+#define SP_ACTIVITY_COUNT 25

+#define ALPHA_SP_UP (Word16)((1.0 - 0.85)*MAX_16)

+#define ALPHA_SP_DOWN (Word16)((1.0 - 0.85)*MAX_16)

+

+#define NOM_LEVEL 2050                     /* about -26 dBov Q15 */

+#define SPEECH_LEVEL_INIT NOM_LEVEL        /* initial speech level */

+#define MIN_SPEECH_LEVEL1  (Word16)(NOM_LEVEL * 0.063)  /* NOM_LEVEL -24 dB */

+#define MIN_SPEECH_LEVEL2  (Word16)(NOM_LEVEL * 0.2)    /* NOM_LEVEL -14 dB */

+#define MIN_SPEECH_SNR 4096                /* 0 dB, lowest SNR estimation, Q12 */

+

+/* Time constants for background spectrum update */

+#define ALPHA_UP1   (Word16)((1.0 - 0.95)*MAX_16)       /* Normal update, upwards:   */

+#define ALPHA_DOWN1 (Word16)((1.0 - 0.936)*MAX_16)      /* Normal update, downwards  */

+#define ALPHA_UP2   (Word16)((1.0 - 0.985)*MAX_16)      /* Forced update, upwards    */

+#define ALPHA_DOWN2 (Word16)((1.0 - 0.943)*MAX_16)      /* Forced update, downwards  */

+#define ALPHA3      (Word16)((1.0 - 0.95)*MAX_16)       /* Update downwards          */

+#define ALPHA4      (Word16)((1.0 - 0.9)*MAX_16)        /* For stationary estimation */

+#define ALPHA5      (Word16)((1.0 - 0.5)*MAX_16)        /* For stationary estimation */

+

+/* Constants for VAD threshold */

+#define THR_MIN  (Word16)(1.6*SCALE)       /* Minimum threshold               */

+#define THR_HIGH (Word16)(6*SCALE)         /* Highest threshold               */

+#define THR_LOW (Word16)(1.7*SCALE)        /* Lowest threshold               */

+#define NO_P1 31744                        /* ilog2(1), Noise level for highest threshold */

+#define NO_P2 19786                        /* ilog2(0.1*MAX_16), Noise level for lowest threshold */

+#define NO_SLOPE (Word16)(MAX_16*(float)(THR_LOW-THR_HIGH)/(float)(NO_P2-NO_P1))

+

+#define SP_CH_MIN (Word16)(-0.75*SCALE)

+#define SP_CH_MAX (Word16)(0.75*SCALE)

+#define SP_P1 22527                        /* ilog2(NOM_LEVEL/4) */

+#define SP_P2 17832                        /* ilog2(NOM_LEVEL*4) */

+#define SP_SLOPE (Word16)(MAX_16*(float)(SP_CH_MAX-SP_CH_MIN)/(float)(SP_P2-SP_P1))

+

+/* Constants for hangover length */

+#define HANG_HIGH  12                      /* longest hangover               */

+#define HANG_LOW  2                        /* shortest hangover               */

+#define HANG_P1 THR_LOW                    /* threshold for longest hangover */

+#define HANG_P2 (Word16)(4*SCALE)          /* threshold for shortest hangover */

+#define HANG_SLOPE (Word16)(MAX_16*(float)(HANG_LOW-HANG_HIGH)/(float)(HANG_P2-HANG_P1))

+

+/* Constants for burst length */

+#define BURST_HIGH 8                       /* longest burst length         */

+#define BURST_LOW 3                        /* shortest burst length        */

+#define BURST_P1 THR_HIGH                  /* threshold for longest burst */

+#define BURST_P2 THR_LOW                   /* threshold for shortest burst */

+#define BURST_SLOPE (Word16)(MAX_16*(float)(BURST_LOW-BURST_HIGH)/(float)(BURST_P2-BURST_P1))

+

+/* Parameters for background spectrum recovery function */

+#define STAT_COUNT 20                      /* threshold of stationary detection counter         */

+

+#define STAT_THR_LEVEL 184                 /* Threshold level for stationarity detection        */

+#define STAT_THR 1000                      /* Threshold for stationarity detection              */

+

+/* Limits for background noise estimate */

+#define NOISE_MIN 40                       /* minimum */

+#define NOISE_MAX 20000                    /* maximum */

+#define NOISE_INIT 150                     /* initial */

+

+/* Thresholds for signal power (now calculated on 2 frames) */

+#define VAD_POW_LOW (Word32)30000L         /* If input power is lower than this, VAD is set to 0 */

+#define POW_TONE_THR (Word32)686080L       /* If input power is lower,tone detection flag is ignored */

+

+/* Constants for the filter bank */

+#define COEFF3   13363                     /* coefficient for the 3rd order filter     */

+#define COEFF5_1 21955                     /* 1st coefficient the for 5th order filter */

+#define COEFF5_2 6390                      /* 2nd coefficient the for 5th order filter */

+#define F_5TH_CNT 5                        /* number of 5th order filters */

+#define F_3TH_CNT 6                        /* number of 3th order filters */

+

+#endif   //__WB_VAD_C_H__

+

+

+

diff --git a/media/libstagefright/codecs/amrwbenc/patent_disclaimer.txt b/media/libstagefright/codecs/amrwbenc/patent_disclaimer.txt
new file mode 100644
index 0000000..b4bf11d
--- /dev/null
+++ b/media/libstagefright/codecs/amrwbenc/patent_disclaimer.txt
@@ -0,0 +1,9 @@
+
+THIS IS NOT A GRANT OF PATENT RIGHTS.
+
+Google makes no representation or warranty that the codecs for which
+source code is made available hereunder are unencumbered by
+third-party patents.  Those intending to use this source code in
+hardware or software products are advised that implementations of
+these codecs, including in open source software or shareware, may
+require patent licenses from the relevant patent holders.
diff --git a/media/libstagefright/codecs/amrwbenc/src/asm/ARMV5E/Deemph_32_opt.s b/media/libstagefright/codecs/amrwbenc/src/asm/ARMV5E/Deemph_32_opt.s
new file mode 100644
index 0000000..0eb5e9f
--- /dev/null
+++ b/media/libstagefright/codecs/amrwbenc/src/asm/ARMV5E/Deemph_32_opt.s
@@ -0,0 +1,104 @@
+@/*

+@ ** Copyright 2003-2010, VisualOn, Inc.

+@ **

+@ ** Licensed under the Apache License, Version 2.0 (the "License");

+@ ** you may not use this file except in compliance with the License.

+@ ** You may obtain a copy of the License at

+@ **

+@ **     http://www.apache.org/licenses/LICENSE-2.0

+@ **

+@ ** Unless required by applicable law or agreed to in writing, software

+@ ** distributed under the License is distributed on an "AS IS" BASIS,

+@ ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

+@ ** See the License for the specific language governing permissions and

+@ ** limitations under the License.

+@ */

+

+@void Deemph_32(

+@     Word16 x_hi[],                        /* (i)     : input signal (bit31..16) */

+@     Word16 x_lo[],                        /* (i)     : input signal (bit15..4)  */

+@     Word16 y[],                           /* (o)     : output signal (x16)      */

+@     Word16 mu,                            /* (i) Q15 : deemphasis factor        */

+@     Word16 L,                             /* (i)     : vector size              */

+@     Word16 * mem                          /* (i/o)   : memory (y[-1])           */

+@     )

+

+@x_hi     RN      R0

+@x_lo     RN      R1

+@y[]      RN      R2

+@*mem     RN      R3

+

+           .section  .text

+           .global   Deemph_32_asm

+	   

+Deemph_32_asm:

+

+           STMFD   	r13!, {r4 - r12, r14} 

+	   MOV          r4, #2                   @i=0

+	   LDRSH        r6, [r0], #2             @load x_hi[0]

+	   LDRSH        r7, [r1], #2             @load x_lo[0]

+	   LDR          r5, =22282               @r5---mu

+	   MOV          r11, #0x8000

+

+           @y[0]

+	   MOV          r10, r6, LSL #16         @L_tmp = x_hi[0]<<16

+	   MOV          r8,  r5, ASR #1          @fac = mu >> 1

+	   LDR          r5,  [r3]

+	   ADD          r12, r10, r7, LSL #4     @L_tmp += x_lo[0] << 4

+	   MOV          r10, r12, LSL #3         @L_tmp <<= 3

+	   MUL          r9, r5, r8

+	   LDRSH        r6, [r0], #2             @load x_hi[1] 

+	   QDADD        r10, r10, r9

+	   LDRSH        r7, [r1], #2             @load x_lo[1]  

+	   MOV          r12, r10, LSL #1         @L_tmp = L_mac(L_tmp, *mem, fac)

+	   QADD         r10, r12, r11

+	   MOV          r14, r10, ASR #16        @y[0] = round(L_tmp)

+

+

+	   MOV          r10, r6, LSL #16

+	   ADD          r12, r10, r7, LSL #4

+           STRH         r14, [r2], #2            @update y[0]

+	   MOV          r10, r12, LSL #3

+	   MUL          r9, r14, r8

+	   QDADD        r10, r10, r9

+	   MOV          r12, r10, LSL #1

+	   QADD         r10, r12, r11

+	   MOV          r14, r10, ASR #16        @y[1] = round(L_tmp)

+

+LOOP:

+           LDRSH        r6, [r0], #2             @load x_hi[]

+	   LDRSH        r7, [r1], #2

+	   STRH         r14, [r2], #2

+	   MOV          r10, r6, LSL #16

+	   ADD          r12, r10, r7, LSL #4

+	   MUL          r9, r14, r8

+	   MOV          r10, r12, LSL #3

+	   QDADD        r10, r10, r9

+           LDRSH        r6, [r0], #2             @load x_hi[]

+	   MOV          r12, r10, LSL #1

+	   QADD         r10, r12, r11

+	   LDRSH        r7, [r1], #2

+	   MOV          r14, r10, ASR #16

+

+	   MOV          r10, r6, LSL #16

+	   ADD          r12, r10, r7, LSL #4

+	   STRH         r14, [r2], #2

+	   MUL          r9, r14, r8

+	   MOV          r10, r12, LSL #3

+	   QDADD        r10, r10, r9

+           ADD          r4, r4, #2

+	   MOV          r12, r10, LSL #1

+	   QADD         r10, r12, r11

+           CMP          r4, #64

+	   MOV          r14, r10, ASR #16

+

+           BLT          LOOP

+           STR          r14, [r3]

+           STRH         r14, [r2]	   

+

+           LDMFD   	r13!, {r4 - r12, r15} 

+

+	   @ENDP

+	   .END

+

+

diff --git a/media/libstagefright/codecs/amrwbenc/src/asm/ARMV5E/Dot_p_opt.s b/media/libstagefright/codecs/amrwbenc/src/asm/ARMV5E/Dot_p_opt.s
new file mode 100644
index 0000000..0383269
--- /dev/null
+++ b/media/libstagefright/codecs/amrwbenc/src/asm/ARMV5E/Dot_p_opt.s
@@ -0,0 +1,80 @@
+@/*

+@ ** Copyright 2003-2010, VisualOn, Inc.

+@ **

+@ ** Licensed under the Apache License, Version 2.0 (the "License");

+@ ** you may not use this file except in compliance with the License.

+@ ** You may obtain a copy of the License at

+@ **

+@ **     http://www.apache.org/licenses/LICENSE-2.0

+@ **

+@ ** Unless required by applicable law or agreed to in writing, software

+@ ** distributed under the License is distributed on an "AS IS" BASIS,

+@ ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

+@ ** See the License for the specific language governing permissions and

+@ ** limitations under the License.

+@ */

+@

+@Word32 Dot_product12(                      /* (o) Q31: normalized result (1 < val <= -1) */

+@       Word16 x[],                           /* (i) 12bits: x vector                       */

+@       Word16 y[],                           /* (i) 12bits: y vector                       */

+@       Word16 lg,                            /* (i)    : vector length                     */

+@       Word16 * exp                          /* (o)    : exponent of result (0..+30)       */

+@)

+@****************************************************************

+@  x[]   ---  r0

+@  y[]   ---  r1

+@  lg    ---  r2

+@  *exp  ---  r3

+

+          .section  .text

+ 	  .global   Dot_product12_asm

+

+Dot_product12_asm:

+

+          STMFD   	    r13!, {r4 - r12, r14} 

+          MOV               r4, #0                                 @ L_sum = 0

+          MOV               r5, #0                                 @ i = 0

+

+LOOP:

+          LDR           r6, [r0], #4

+          LDR           r7, [r1], #4

+          LDR           r8, [r0], #4

+          SMLABB        r4, r6, r7, r4

+          LDR           r9, [r1], #4

+	  SMLATT        r4, r6, r7, r4 

+

+	  LDR           r6, [r0], #4

+	  SMLABB        r4, r8, r9, r4

+

+	  LDR           r7, [r1], #4

+	  SMLATT        r4, r8, r9, r4	  

+	  LDR           r8, [r0], #4

+

+	  SMLABB        r4, r6, r7, r4

+	  LDR           r9, [r1], #4

+	  SMLATT        r4, r6, r7, r4

+	  ADD           r5, r5, #8

+	  SMLABB        r4, r8, r9, r4

+	  CMP           r5, r2

+	  SMLATT        r4, r8, r9, r4

+	  BLT           LOOP

+              

+          MOV           r12, r4, LSL #1

+          ADD           r12, r12, #1                         @ L_sum = (L_sum << 1)  + 1

+	  MOV           r4, r12

+

+          CMP           r12, #0

+	  RSBLT         r4, r12, #0

+          CLZ           r10, r4

+          SUB           r10, r10, #1                         @ sft = norm_l(L_sum)

+          MOV           r0, r12, LSL r10                     @ L_sum = L_sum << sft

+          RSB           r11, r10, #30                        @ *exp = 30 - sft

+          STRH          r11, [r3]                     

+

+Dot_product12_end:

+		     

+          LDMFD   	    r13!, {r4 - r12, r15} 

+          @ENDFUNC

+          .END

+ 

+

diff --git a/media/libstagefright/codecs/amrwbenc/src/asm/ARMV5E/Filt_6k_7k_opt.s b/media/libstagefright/codecs/amrwbenc/src/asm/ARMV5E/Filt_6k_7k_opt.s
new file mode 100644
index 0000000..e6ebd73
--- /dev/null
+++ b/media/libstagefright/codecs/amrwbenc/src/asm/ARMV5E/Filt_6k_7k_opt.s
@@ -0,0 +1,185 @@
+@/*

+@ ** Copyright 2003-2010, VisualOn, Inc.

+@ **

+@ ** Licensed under the Apache License, Version 2.0 (the "License");

+@ ** you may not use this file except in compliance with the License.

+@ ** You may obtain a copy of the License at

+@ **

+@ **     http://www.apache.org/licenses/LICENSE-2.0

+@ **

+@ ** Unless required by applicable law or agreed to in writing, software

+@ ** distributed under the License is distributed on an "AS IS" BASIS,

+@ ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

+@ ** See the License for the specific language governing permissions and

+@ ** limitations under the License.

+@ */

+

+@**********************************************************************/

+@void Filt_6k_7k(

+@     Word16 signal[],                      /* input:  signal                  */

+@     Word16 lg,                            /* input:  length of input         */

+@     Word16 mem[]                          /* in/out: memory (size=30)        */

+@)

+@******************************************************************

+@ r0    ---  signal[]

+@ r1    ---  lg

+@ r2    ---  mem[] 

+

+          .section  .text

+          .global  Filt_6k_7k_asm

+          .extern  voAWB_Copy

+          .extern  fir_6k_7k

+

+Filt_6k_7k_asm:

+

+          STMFD   		r13!, {r4 - r12, r14} 

+          SUB    		r13, r13, #240              @ x[L_SUBFR16k + (L_FIR - 1)]

+          MOV     		r8, r0                      @ copy signal[] address

+          MOV     		r4, r1                      @ copy lg address

+          MOV     		r5, r2                      @ copy mem[] address

+

+          MOV     		r1, r13

+          MOV     		r0, r2

+          MOV     		r2, #30                     @ L_FIR - 1

+          BL      		voAWB_Copy                   @ memcpy(x, mem, (L_FIR - 1)<<1)

+

+          LDR     		r10, Lable1                 @ get fir_7k address     

+

+          MOV           	r14, #0  

+          MOV                   r3, r8                      @ change myMemCopy to Copy, due to Copy will change r3 content

+          ADD     	    	r6, r13, #60                @ get x[L_FIR - 1] address

+          MOV           	r7, r3                      @ get signal[i]

+LOOP1:

+          LDRSH         	r8,  [r7], #2

+          LDRSH         	r9,  [r7], #2

+          MOV           	r8, r8, ASR #2

+          MOV           	r9, r9, ASR #2

+          LDRSH         	r11, [r7], #2

+          LDRSH         	r12, [r7], #2

+          MOV           	r11, r11, ASR #2

+          MOV           	r12, r12, ASR #2

+          STRH          	r8, [r6], #2

+          STRH          	r9, [r6], #2

+          STRH          	r11, [r6], #2

+          STRH          	r12, [r6], #2

+          LDRSH         	r8,  [r7], #2

+          LDRSH         	r9,  [r7], #2

+          MOV           	r8, r8, ASR #2

+          MOV           	r9, r9, ASR #2

+          LDRSH         	r11, [r7], #2

+          LDRSH         	r12, [r7], #2

+          MOV           	r11, r11, ASR #2

+          MOV           	r12, r12, ASR #2

+          STRH          	r8, [r6], #2

+          STRH          	r9, [r6], #2

+          STRH          	r11, [r6], #2

+          STRH          	r12, [r6], #2

+          ADD           	r14, r14, #8

+          CMP           	r14, #80

+          BLT           	LOOP1          

+

+

+          STR     		r5, [sp, #-4]               @ PUSH  r5 to stack

+

+          @ not use registers: r4, r10, r12, r14, r5

+          MOV     		r4, r13 

+          MOV     		r5, #0                      @ i = 0              

+LOOP2:

+          LDR           	r0, [r10]

+

+          LDRSH  	        r1, [r4]                   @ load x[i]

+          LDRSH   	        r2, [r4, #60]              @ load x[i + 30]

+          LDRSH                 r6, [r4, #2]               @ load x[i + 1]

+          LDRSH                 r7, [r4, #58]              @ load x[i + 29]

+          ADD                   r1, r1, r2                 @ x[i] + x[i + 30]

+          ADD                   r6, r6, r7                 @ x[i + 1] + x[i + 29]

+          LDRSH                 r8, [r4, #4]               @ load x[i + 2]

+          LDRSH                 r9, [r4, #56]              @ load x[i + 28]

+

+          SMULBB                r14, r1, r0                @ (x[i] + x[i + 30]) * fir_7k[0]

+          ADD                   r8, r8, r9                 @ x[i + 2] + x[i + 28]

+          SMLABT                r14, r6, r0, r14           @ (x[i + 1] + x[i + 29]) * fir_7k[1]

+

+          LDR                   r0, [r10, #4]

+          LDRSH                 r1, [r4, #6]               @ load x[i+3]

+          LDRSH                 r2, [r4, #54]              @ load x[i+27]

+          LDRSH                 r6, [r4, #8]               @ load x[i+4]

+          LDRSH                 r7, [r4, #52]              @ load x[i+26]

+          ADD                   r1, r1, r2                 @ x[i+3] + x[i+27]

+          ADD                   r6, r6, r7                 @ x[i+4] + x[i+26]

+          SMLABB                r14, r8, r0, r14           @ (x[i + 2] + x[i + 28]) * fir_7k[2]

+          LDRSH                 r8, [r4, #10]              @ load x[i+5]

+          LDRSH                 r9, [r4, #50]              @ load x[i+25]

+          SMLABT                r14, r1, r0, r14           @ (x[i+3] + x[i+27]) * fir_7k[3]

+          ADD                   r8, r8, r9                 @ x[i+5] + x[i+25] 

+ 

+          LDR                   r0, [r10, #8]

+          LDRSH                 r1, [r4, #12]              @ x[i+6]

+          LDRSH                 r2, [r4, #48]              @ x[i+24]

+          SMLABB                r14, r6, r0, r14           @ (x[i+4] + x[i+26]) * fir_7k[4]

+          LDRSH                 r6, [r4, #14]              @ x[i+7] 

+          LDRSH                 r7, [r4, #46]              @ x[i+23]

+          SMLABT                r14, r8, r0, r14           @ (x[i+5] + x[i+25]) * fir_7k[5]

+          LDR                   r0, [r10, #12]

+          ADD                   r1, r1, r2                 @ (x[i+6] + x[i+24])

+          ADD                   r6, r6, r7                 @ (x[i+7] + x[i+23])

+          SMLABB                r14, r1, r0, r14           @ (x[i+6] + x[i+24]) * fir_7k[6]

+          LDRSH                 r8, [r4, #16]              @ x[i+8]

+          LDRSH                 r9, [r4, #44]              @ x[i+22] 

+          SMLABT                r14, r6, r0, r14           @ (x[i+7] + x[i+23]) * fir_7k[7]  

+          LDR                   r0, [r10, #16]

+          LDRSH                 r1, [r4, #18]              @ x[i+9]

+          LDRSH                 r2, [r4, #42]              @ x[i+21]

+          LDRSH                 r6, [r4, #20]              @ x[i+10]

+          LDRSH                 r7, [r4, #40]              @ x[i+20]

+          ADD                   r8, r8, r9                 @ (x[i+8] + x[i+22])

+          ADD                   r1, r1, r2                 @ (x[i+9] + x[i+21])

+          ADD                   r6, r6, r7                 @ (x[i+10] + x[i+20])

+          SMLABB                r14, r8, r0, r14           @ (x[i+8] + x[i+22]) * fir_7k[8]

+          LDRSH                 r8, [r4, #22]              @ x[i+11]

+          LDRSH                 r9, [r4, #38]              @ x[i+19]

+          SMLABT                r14, r1, r0, r14           @ (x[i+9] + x[i+21]) * fir_7k[9]

+          LDR                   r0, [r10, #20]

+          LDRSH                 r1, [r4, #24]              @ x[i+12]

+          LDRSH                 r2, [r4, #36]              @ x[i+18]

+          SMLABB                r14, r6, r0, r14           @ (x[i+10] + x[i+20]) * fir_7k[10]

+          LDRSH                 r6, [r4, #26]              @ x[i+13]

+          ADD                   r8, r8, r9                 @ (x[i+11] + x[i+19])  

+          LDRSH                 r7, [r4, #34]              @ x[i+17]

+          SMLABT                r14, r8, r0, r14           @ (x[i+11] + x[i+19]) * fir_7k[11]

+          LDR                   r0, [r10, #24]

+          ADD                   r1, r1, r2                 @ x[i+12] + x[i+18]

+          LDRSH                 r8, [r4, #28]              @ x[i+14]

+          SMLABB                r14, r1, r0, r14           @ (x[i+12] + x[i+18]) * fir_7k[12]

+          ADD                   r6, r6, r7                 @ (x[i+13] + x[i+17])

+          LDRSH                 r9, [r4, #32]              @ x[i+16] 

+          SMLABT                r14, r6, r0, r14           @ (x[i+13] + x[i+17]) * fir_7k[13]

+          LDR                   r0, [r10, #28]         

+          ADD                   r8, r8, r9                 @ (x[i+14] + x[i+16])

+          LDRSH                 r1, [r4, #30]              @ x[i+15]

+          SMLABB                r14, r8, r0, r14           @ (x[i+14] + x[i+16]) * fir_7k[14]

+          SMLABT                r14, r1, r0, r14           @ x[i+15] * fir_7k[15]                              

+

+          ADD     		r5, r5, #1

+          ADD     		r14, r14, #0x4000

+          ADD     		r4, r4, #2                

+          MOV     		r1, r14, ASR #15

+          CMP     		r5, #80

+          STRH    		r1, [r3], #2               @signal[i] = (L_tmp + 0x4000) >> 15

+          BLT     		LOOP2      

+           

+          LDR     		r1, [sp, #-4]               @mem address

+          ADD     		r0, r13, #160               @x + lg

+          MOV     		r2, #30

+          BL      		voAWB_Copy

+                    

+Filt_6k_7k_end:

+          ADD     		r13, r13, #240  

+          LDMFD   		r13!, {r4 - r12, r15} 

+ 

+Lable1:

+          .word   		fir_6k_7k

+          @ENDFUNC

+          .END

+

+

diff --git a/media/libstagefright/codecs/amrwbenc/src/asm/ARMV5E/Norm_Corr_opt.s b/media/libstagefright/codecs/amrwbenc/src/asm/ARMV5E/Norm_Corr_opt.s
new file mode 100644
index 0000000..b440a31
--- /dev/null
+++ b/media/libstagefright/codecs/amrwbenc/src/asm/ARMV5E/Norm_Corr_opt.s
@@ -0,0 +1,231 @@
+@/*
+@ ** Copyright 2003-2010, VisualOn, Inc.
+@ **
+@ ** Licensed under the Apache License, Version 2.0 (the "License");
+@ ** you may not use this file except in compliance with the License.
+@ ** You may obtain a copy of the License at
+@ **
+@ **     http://www.apache.org/licenses/LICENSE-2.0
+@ **
+@ ** Unless required by applicable law or agreed to in writing, software
+@ ** distributed under the License is distributed on an "AS IS" BASIS,
+@ ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+@ ** See the License for the specific language governing permissions and
+@ ** limitations under the License.
+@ */
+
+@static void Norm_Corr (Word16 exc[],                    /* (i)     : excitation buffer          */
+@                       Word16 xn[],                     /* (i)     : target vector              */
+@                       Word16 h[],                      /* (i) Q15 : impulse response of synth/wgt filters */
+@                       Word16 L_subfr,                  /* (i)     : sub-frame length */
+@                       Word16 t_min,                    /* (i)     : minimum value of pitch lag.   */
+@                       Word16 t_max,                    /* (i)     : maximum value of pitch lag.   */
+@                       Word16 corr_norm[])              /* (o) Q15 : normalized correlation    */
+@
+
+@ r0 --- exc[]
+@ r1 --- xn[]
+@ r2 --- h[]
+@ r3 --- L_subfr
+@ r4 --- t_min
+@ r5 --- t_max
+@ r6 --- corr_norm[]
+
+
+	.section  .text 
+        .global   Norm_corr_asm 
+        .extern   Convolve_asm
+        .extern   Isqrt_n
+@******************************
+@ constant
+@******************************
+.equ         EXC           ,   0
+.equ         XN            ,   4
+.equ         H             ,   8
+.equ         L_SUBFR       ,   12
+.equ         voSTACK       ,   172
+.equ         T_MIN         ,   212
+.equ         T_MAX         ,   216
+.equ         CORR_NORM     ,   220
+                  
+Norm_corr_asm:
+
+        STMFD      r13!, {r4 - r12, r14}  
+        SUB        r13, r13, #voSTACK
+  
+        ADD        r8, r13, #20                 @get the excf[L_SUBFR]
+        LDR        r4, [r13, #T_MIN]            @get t_min
+        RSB        r11, r4, #0                  @k = -t_min
+        ADD        r5, r0, r11, LSL #1          @get the &exc[k]   
+        
+        @transfer Convolve function
+        STMFD       sp!, {r0 - r3}
+        MOV         r0, r5
+        MOV         r1, r2
+        MOV         r2, r8                       @r2 --- excf[]
+        BL          Convolve_asm
+        LDMFD       sp!, {r0 - r3}
+
+        @ r8 --- excf[]
+
+	MOV         r14, r1                       @copy xn[] address                      
+        MOV         r5, #64
+        MOV         r6, #0                       @L_tmp = 0
+        MOV         r7, #1
+
+LOOP1:
+        LDR         r9,  [r14], #4
+	LDR         r10, [r14], #4
+	LDR         r11, [r14], #4
+	LDR         r12, [r14], #4
+	SMLABB      r6, r9, r9, r6               @L_tmp += (xn[i] * xn[i])
+	SMLATT      r6, r9, r9, r6               @L_tmp += (xn[i+1] * xn[i+1])
+        SMLABB      r6, r10, r10, r6
+	SMLATT      r6, r10, r10, r6
+	SMLABB      r6, r11, r11, r6
+        SMLATT      r6, r11, r11, r6
+        SMLABB      r6, r12, r12, r6
+        SMLATT      r6, r12, r12, r6
+        SUBS        r5, r5, #8
+        BNE         LOOP1
+
+	ADD         r9, r7, r6, LSL #1           @L_tmp = (L_tmp << 1) + 1
+	CLZ         r7, r9
+	SUB         r6, r7, #1                   @exp = norm_l(L_tmp)
+        RSB         r7, r6, #32                  @exp = 32 - exp
+	MOV         r6, r7, ASR #1         
+	RSB         r7, r6, #0                   @scale = -(exp >> 1)
+	
+        @loop for every possible period
+	@for(t = t_min@ t <= t_max@ t++)
+	@r7 --- scale r4 --- t_min r8 --- excf[]
+
+LOOPFOR:	
+        MOV         r5, #0                       @L_tmp  = 0
+	MOV         r6, #0                       @L_tmp1 = 0
+	MOV         r9, #64  
+	MOV         r12, r1                      @copy of xn[]
+	ADD         r14, r13, #20                @copy of excf[]
+	MOV         r8, #0x8000
+        	
+LOOPi:
+	LDR         r11, [r14], #4               @load excf[i], excf[i+1]
+        LDR         r10, [r12], #4               @load xn[i], xn[i+1]
+	SMLABB      r6, r11, r11, r6             @L_tmp1 += excf[i] * excf[i]
+	SMLATT      r6, r11, r11, r6             @L_tmp1 += excf[i+1] * excf[i+1]
+        SMLABB      r5, r10, r11, r5             @L_tmp += xn[i] * excf[i]
+	SMLATT      r5, r10, r11, r5             @L_tmp += xn[i+1] * excf[i+1]
+	LDR         r11, [r14], #4               @load excf[i+2], excf[i+3]
+	LDR         r10, [r12], #4               @load xn[i+2], xn[i+3]
+        SMLABB      r6, r11, r11, r6
+	SMLATT      r6, r11, r11, r6
+	SMLABB      r5, r10, r11, r5
+	SMLATT      r5, r10, r11, r5
+	SUBS        r9, r9, #4
+        BNE         LOOPi
+
+	@r5 --- L_tmp, r6 --- L_tmp1
+	MOV         r10, #1
+	ADD         r5, r10, r5, LSL #1          @L_tmp = (L_tmp << 1) + 1
+	ADD         r6, r10, r6, LSL #1          @L_tmp1 = (L_tmp1 << 1) + 1
+ 
+	CLZ         r10, r5        
+	CMP         r5, #0
+	RSBLT       r11, r5, #0
+	CLZLT       r10, r11
+	SUB         r10, r10, #1                 @exp = norm_l(L_tmp)
+     
+	MOV         r5, r5, LSL r10              @L_tmp = (L_tmp << exp)
+	RSB         r10, r10, #30                @exp_corr = 30 - exp
+	MOV         r11, r5, ASR #16             @corr = extract_h(L_tmp)
+
+	CLZ         r5, r6
+	SUB         r5, r5, #1
+	MOV         r6, r6, LSL r5               @L_tmp = (L_tmp1 << exp)
+	RSB         r5, r5, #30                  @exp_norm = 30 - exp
+
+	@r10 --- exp_corr, r11 --- corr
+	@r6  --- L_tmp, r5 --- exp_norm
+
+	@Isqrt_n(&L_tmp, &exp_norm)
+
+	MOV         r14, r0
+	MOV         r12, r1 
+
+        STMFD       sp!, {r0 - r4, r7 - r12, r14}
+	ADD         r1, sp, #4
+	ADD         r0, sp, #0
+	STR         r6, [sp]
+	STRH        r5, [sp, #4]
+	BL          Isqrt_n
+	LDR         r6, [sp]
+	LDRSH       r5, [sp, #4]
+        LDMFD       sp!, {r0 - r4, r7 - r12, r14}
+	MOV         r0, r14
+	MOV         r1, r12
+
+
+	MOV         r6, r6, ASR #16              @norm = extract_h(L_tmp)
+	MUL         r12, r6, r11
+	ADD         r12, r12, r12                @L_tmp = vo_L_mult(corr, norm)
+  
+	ADD         r6, r10, r5
+	ADD         r6, r6, r7                   @exp_corr + exp_norm + scale
+
+        CMP         r6, #0
+        RSBLT       r6, r6, #0
+	MOVLT       r12, r12, ASR r6
+        MOVGT       r12, r12, LSL r6             @L_tmp = L_shl(L_tmp, exp_corr + exp_norm + scale)
+
+        ADD         r12, r12, r8
+        MOV         r12, r12, ASR #16            @vo_round(L_tmp)
+
+        LDR         r5, [r13, #CORR_NORM]        @ get corr_norm address
+	LDR         r6, [r13, #T_MAX]            @ get t_max
+	ADD         r10, r5, r4, LSL #1          @ get corr_norm[t] address
+	STRH        r12, [r10]                   @ corr_norm[t] = vo_round(L_tmp)
+
+	CMP         r4, r6
+	BEQ         Norm_corr_asm_end
+ 
+	ADD         r4, r4, #1                   @ t_min ++
+        
+	RSB         r5, r4, #0                   @ k
+
+	MOV         r6, #63                      @ i = 63
+	MOV         r8, r0                       @ exc[]
+	MOV         r9, r2                       @ h[]
+	ADD         r10, r13, #20                @ excf[]
+
+	ADD         r8, r8, r5, LSL #1           @ exc[k] address
+	ADD         r9, r9, r6, LSL #1           @ h[i] address
+	ADD         r10, r10, r6, LSL #1         @ excf[i] address
+	LDRSH       r11, [r8]                    @ tmp = exc[k]
+
+LOOPK:
+        LDRSH       r8, [r9], #-2                @ load h[i]
+	LDRSH       r12, [r10, #-2]              @ load excf[i - 1]
+	MUL         r14, r11, r8
+	MOV         r8, r14, ASR #15
+	ADD         r14, r8, r12
+	STRH        r14, [r10], #-2
+	SUBS        r6, r6, #1
+	BGT         LOOPK
+
+	LDRSH       r8, [r9]                     @ load h[0]
+	MUL         r14, r11, r8
+        LDR         r6, [r13, #T_MAX]            @ get t_max
+	MOV         r8, r14, ASR #15
+	STRH        r8, [r10]                    
+
+	CMP         r4, r6
+	BLE         LOOPFOR
+
+Norm_corr_asm_end: 
+        
+        ADD            r13, r13, #voSTACK      
+        LDMFD          r13!, {r4 - r12, r15}
+    
+        .END
+
+
diff --git a/media/libstagefright/codecs/amrwbenc/src/asm/ARMV5E/Syn_filt_32_opt.s b/media/libstagefright/codecs/amrwbenc/src/asm/ARMV5E/Syn_filt_32_opt.s
new file mode 100644
index 0000000..6416634
--- /dev/null
+++ b/media/libstagefright/codecs/amrwbenc/src/asm/ARMV5E/Syn_filt_32_opt.s
@@ -0,0 +1,226 @@
+@/*

+@ ** Copyright 2003-2010, VisualOn, Inc.

+@ **

+@ ** Licensed under the Apache License, Version 2.0 (the "License");

+@ ** you may not use this file except in compliance with the License.

+@ ** You may obtain a copy of the License at

+@ **

+@ **     http://www.apache.org/licenses/LICENSE-2.0

+@ **

+@ ** Unless required by applicable law or agreed to in writing, software

+@ ** distributed under the License is distributed on an "AS IS" BASIS,

+@ ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

+@ ** See the License for the specific language governing permissions and

+@ ** limitations under the License.

+@ */

+@

+@void Syn_filt_32(

+@     Word16 a[],                           /* (i) Q12 : a[m+1] prediction coefficients */

+@     Word16 m,                             /* (i)     : order of LP filter             */

+@     Word16 exc[],                         /* (i) Qnew: excitation (exc[i] >> Qnew)    */

+@     Word16 Qnew,                          /* (i)     : exc scaling = 0(min) to 8(max) */

+@     Word16 sig_hi[],                      /* (o) /16 : synthesis high                 */

+@     Word16 sig_lo[],                      /* (o) /16 : synthesis low                  */

+@     Word16 lg                             /* (i)     : size of filtering              */

+@)

+@***************************************************************

+@

+@ a[]      --- r0

+@ m        --- r1

+@ exc[]    --- r2

+@ Qnew     --- r3

+@ sig_hi[] --- r4

+@ sig_lo[] --- r5

+@ lg       --- r6

+

+          .section  .text

+          .global  Syn_filt_32_asm

+

+Syn_filt_32_asm:

+

+          STMFD   	r13!, {r4 - r12, r14} 

+          LDR           r4,  [r13, #40]                  @ get sig_hi[] address

+          LDR           r5,  [r13, #44]                  @ get sig_lo[] address

+

+          LDRSH         r6,  [r0]                        @ load Aq[0]

+          ADD           r7,  r3, #4                      @ 4 + Q_new

+          MOV           r3, r6, ASR r7                   @ a0 = Aq[0] >> (4 + Q_new)

+

+          LDR           r14, =0xffff

+          LDRSH         r6, [r0, #2]                     @ load Aq[1]

+          LDRSH         r7, [r0, #4]                     @ load Aq[2]

+          LDRSH         r8, [r0, #6]                     @ load Aq[3]

+          LDRSH         r9, [r0, #8]                     @ load Aq[4]

+          AND           r6, r6, r14

+          AND           r8, r8, r14

+          ORR           r10, r6, r7, LSL #16             @ Aq[2] -- Aq[1]

+          ORR           r11, r8, r9, LSL #16             @ Aq[4] -- Aq[3]

+          STR           r10, [r13, #-4]                  

+          STR           r11, [r13, #-8]

+

+          LDRSH         r6, [r0, #10]                    @ load Aq[5]

+          LDRSH         r7, [r0, #12]                    @ load Aq[6]

+          LDRSH         r8, [r0, #14]                    @ load Aq[7]

+          LDRSH         r9, [r0, #16]                    @ load Aq[8]

+          AND           r6, r6, r14

+          AND           r8, r8, r14

+          ORR           r10, r6, r7, LSL #16             @ Aq[6] -- Aq[5]

+          ORR           r11, r8, r9, LSL #16             @ Aq[8] -- Aq[7]

+          STR           r10, [r13, #-12]

+          STR           r11, [r13, #-16]

+

+          LDRSH         r6, [r0, #18]                    @ load Aq[9]

+          LDRSH         r7, [r0, #20]                    @ load Aq[10]

+          LDRSH         r8, [r0, #22]                    @ load Aq[11]

+          LDRSH         r9, [r0, #24]                    @ load Aq[12]

+          AND           r6, r6, r14 

+          AND           r8, r8, r14

+          ORR           r10, r6, r7, LSL #16             @ Aq[10] -- Aq[9]

+          ORR           r11, r8, r9, LSL #16             @ Aq[12] -- Aq[11]

+          STR           r10, [r13, #-20]

+          STR           r11, [r13, #-24]  

+

+          LDRSH         r6, [r0, #26]                    @ load Aq[13]

+          LDRSH         r7, [r0, #28]                    @ load Aq[14]

+          LDRSH         r8, [r0, #30]                    @ load Aq[15]

+          LDRSH         r9, [r0, #32]                    @ load Aq[16]

+          AND           r6, r6, r14

+          AND           r8, r8, r14

+          ORR           r10, r6, r7, LSL #16             @ Aq[14] -- Aq[13]

+          ORR           r11, r8, r9, LSL #16             @ Aq[16] -- Aq[15]

+          STR           r10, [r13, #-28]

+          STR           r11, [r13, #-32]

+          

+          MOV           r8, #0                           @ i = 0

+              

+LOOP:            

+          LDRSH         r6, [r5, #-2]                    @ load sig_lo[i-1]

+          LDRSH         r7, [r5, #-4]                    @ load sig_lo[i-2]

+

+          LDR           r11, [r13, #-4]                  @ Aq[2] -- Aq[1]        

+          LDRSH         r9, [r5, #-6]                    @ load sig_lo[i-3]

+          LDRSH         r10, [r5, #-8]                   @ load sig_lo[i-4]

+

+          SMULBB        r12, r6, r11                     @ sig_lo[i-1] * Aq[1]

+

+          LDRSH         r6, [r5, #-10]                   @ load sig_lo[i-5]

+          SMLABT        r12, r7, r11, r12                @ sig_lo[i-2] * Aq[2]

+          LDR           r11, [r13, #-8]                  @ Aq[4] -- Aq[3]

+          LDRSH         r7, [r5, #-12]                   @ load sig_lo[i-6]

+          SMLABB        r12, r9, r11, r12                @ sig_lo[i-3] * Aq[3]

+          LDRSH         r9, [r5, #-14]                   @ load sig_lo[i-7]

+          SMLABT        r12, r10, r11, r12               @ sig_lo[i-4] * Aq[4]

+          LDR           r11, [r13, #-12]                 @ Aq[6] -- Aq[5]

+          LDRSH         r10, [r5, #-16]                  @ load sig_lo[i-8]

+          SMLABB        r12, r6, r11, r12                @ sig_lo[i-5] * Aq[5]

+          LDRSH         r6,  [r5, #-18]                  @ load sig_lo[i-9]

+          SMLABT        r12, r7, r11, r12                @ sig_lo[i-6] * Aq[6]

+          LDR           r11, [r13, #-16]                 @ Aq[8] -- Aq[7]

+          LDRSH         r7,  [r5, #-20]                  @ load sig_lo[i-10]

+          SMLABB        r12, r9, r11, r12                @ sig_lo[i-7] * Aq[7]

+          LDRSH         r9, [r5, #-22]                   @ load sig_lo[i-11]

+          SMLABT        r12, r10, r11, r12               @ sig_lo[i-8] * Aq[8]

+          LDR           r11, [r13, #-20]                 @ Aq[10] -- Aq[9]

+          LDRSH         r10,[r5, #-24]                   @ load sig_lo[i-12]

+          SMLABB        r12, r6, r11, r12                @ sig_lo[i-9] * Aq[9]

+          LDRSH         r6, [r5, #-26]                   @ load sig_lo[i-13]

+          SMLABT        r12, r7, r11, r12                @ sig_lo[i-10] * Aq[10]

+          LDR           r11, [r13, #-24]                 @ Aq[12] -- Aq[11]

+          LDRSH         r7, [r5, #-28]                   @ load sig_lo[i-14]

+          SMLABB        r12, r9, r11, r12                @ sig_lo[i-11] * Aq[11]

+          LDRSH         r9, [r5, #-30]                   @ load sig_lo[i-15]

+          SMLABT        r12, r10, r11, r12               @ sig_lo[i-12] * Aq[12]

+

+          LDR           r11, [r13, #-28]                 @ Aq[14] -- Aq[13]

+          LDRSH         r10, [r5, #-32]                  @ load sig_lo[i-16]

+          SMLABB        r12, r6, r11, r12                @ sig_lo[i-13] * Aq[13]

+          SMLABT        r12, r7, r11, r12                @ sig_lo[i-14] * Aq[14]

+ 

+          LDR           r11, [r13, #-32]                 @ Aq[16] -- Aq[15]

+          LDRSH         r6, [r2],#2                      @ load exc[i] 

+          SMLABB        r12, r9, r11, r12                @ sig_lo[i-15] * Aq[15]

+          SMLABT        r12, r10, r11, r12               @ sig_lo[i-16] * Aq[16]

+          MUL           r7, r6, r3                       @ exc[i] * a0 

+          RSB           r14, r12, #0                     @ L_tmp

+          MOV           r14, r14, ASR #11                @ L_tmp >>= 11

+          ADD           r14, r14, r7, LSL #1             @ L_tmp += (exc[i] * a0) << 1

+

+

+          LDRSH         r6, [r4, #-2]                    @ load sig_hi[i-1]

+          LDRSH         r7, [r4, #-4]                    @ load sig_hi[i-2]

+

+          LDR           r11, [r13, #-4]                  @ Aq[2] -- Aq[1]        

+          LDRSH         r9, [r4, #-6]                    @ load sig_hi[i-3]

+          LDRSH         r10, [r4, #-8]                   @ load sig_hi[i-4]

+          SMULBB        r12, r6, r11                     @ sig_hi[i-1] * Aq[1]

+          LDRSH         r6, [r4, #-10]                   @ load sig_hi[i-5]

+	  SMLABT        r12, r7, r11, r12                @ sig_hi[i-2] * Aq[2]

+

+          LDR           r11, [r13, #-8]                  @ Aq[4] -- Aq[3]

+          LDRSH         r7, [r4, #-12]                   @ load sig_hi[i-6]

+

+          SMLABB        r12, r9, r11, r12                @ sig_hi[i-3] * Aq[3]

+	  LDRSH         r9, [r4, #-14]                   @ load sig_hi[i-7]

+

+	  SMLABT        r12, r10, r11, r12               @ sig_hi[i-4] * Aq[4]

+

+          LDR           r11, [r13, #-12]                 @ Aq[6] -- Aq[5]

+          LDRSH         r10, [r4, #-16]                  @ load sig_hi[i-8]

+

+	  SMLABB        r12, r6, r11, r12                @ sig_hi[i-5] * Aq[5]

+

+	  LDRSH         r6,  [r4, #-18]                  @ load sig_hi[i-9]

+	  SMLABT        r12, r7, r11, r12                @ sig_hi[i-6] * Aq[6]

+

+          LDR           r11, [r13, #-16]                 @ Aq[8] -- Aq[7]

+          LDRSH         r7,  [r4, #-20]                  @ load sig_hi[i-10]

+

+	  SMLABB        r12, r9, r11, r12                @ sig_hi[i-7] * Aq[7]

+

+	  LDRSH         r9, [r4, #-22]                   @ load sig_hi[i-11]

+

+	  SMLABT        r12, r10, r11, r12               @ sig_hi[i-8] * Aq[8]

+

+          LDR           r11, [r13, #-20]                 @ Aq[10] -- Aq[9]

+          LDRSH         r10,[r4, #-24]                   @ load sig_hi[i-12]

+

+	  SMLABB        r12, r6, r11, r12                @ sig_hi[i-9] * Aq[9]

+          LDRSH         r6, [r4, #-26]                   @ load sig_hi[i-13]

+          SMLABT        r12, r7, r11, r12                @ sig_hi[i-10] * Aq[10]

+

+          LDR           r11, [r13, #-24]                 @ Aq[12] -- Aq[11]

+          LDRSH         r7, [r4, #-28]                   @ load sig_hi[i-14]

+          SMLABB        r12, r9, r11, r12                @ sig_hi[i-11] * Aq[11]

+          LDRSH         r9, [r4, #-30]                   @ load sig_hi[i-15]

+          SMLABT        r12, r10, r11, r12               @ sig_hi[i-12] * Aq[12]

+

+          LDR           r11, [r13, #-28]                 @ Aq[14] -- Aq[13]

+          LDRSH         r10, [r4, #-32]                  @ load sig_hi[i-16]

+          SMLABB        r12, r6, r11, r12                @ sig_hi[i-13] * Aq[13]

+          SMLABT        r12, r7, r11, r12                @ sig_hi[i-14] * Aq[14]

+ 

+          LDR           r11, [r13, #-32]                 @ Aq[16] -- Aq[15]

+          SMLABB        r12, r9, r11, r12                @ sig_hi[i-15] * Aq[15]

+          SMLABT        r12, r10, r11, r12               @ sig_hi[i-16] * Aq[16]       

+          ADD           r6, r12, r12                     @ r12 << 1

+          SUB           r14, r14, r6                     

+          MOV           r14, r14, LSL #3                 @ L_tmp <<=3

+  

+          MOV           r7, r14, ASR #16                 @ L_tmp >> 16

+

+          MOV           r14, r14, ASR #4                 @ L_tmp >>=4

+          STRH          r7, [r4], #2                         @ sig_hi[i] = L_tmp >> 16

+          SUB           r9, r14, r7, LSL #12             @ sig_lo[i] = L_tmp - (sig_hi[i] << 12)

+

+          ADD           r8, r8, #1

+          STRH          r9, [r5], #2   

+          CMP           r8, #64

+          BLT           LOOP                            

+         

+Syn_filt_32_end:

+		     

+          LDMFD   	    r13!, {r4 - r12, r15} 

+          @ENDFUNC

+          .END

+ 

+

diff --git a/media/libstagefright/codecs/amrwbenc/src/asm/ARMV5E/convolve_opt.s b/media/libstagefright/codecs/amrwbenc/src/asm/ARMV5E/convolve_opt.s
new file mode 100644
index 0000000..0228bda
--- /dev/null
+++ b/media/libstagefright/codecs/amrwbenc/src/asm/ARMV5E/convolve_opt.s
@@ -0,0 +1,186 @@
+@/*
+@ ** Copyright 2003-2010, VisualOn, Inc.
+@ **
+@ ** Licensed under the Apache License, Version 2.0 (the "License");
+@ ** you may not use this file except in compliance with the License.
+@ ** You may obtain a copy of the License at
+@ **
+@ **     http://www.apache.org/licenses/LICENSE-2.0
+@ **
+@ ** Unless required by applicable law or agreed to in writing, software
+@ ** distributed under the License is distributed on an "AS IS" BASIS,
+@ ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+@ ** See the License for the specific language governing permissions and
+@ ** limitations under the License.
+@ */
+
+
+@*void Convolve (
+@*    Word16 x[],        /* (i)     : input vector                           */
+@*    Word16 h[],        /* (i)     : impulse response                       */
+@*    Word16 y[],        /* (o)     : output vector                          */
+@*    Word16 L           /* (i)     : vector size                            */
+@*)
+@  r0 --- x[]
+@  r1 --- h[]
+@  r2 --- y[]
+@  r3 --- L
+
+	.section  .text
+        .global   Convolve_asm 
+
+Convolve_asm:
+
+        STMFD          r13!, {r4 - r12, r14}  
+        MOV            r3,  #0                           @ n
+	MOV            r11, #0x8000
+        
+LOOP: 
+        ADD            r4, r1, r3, LSL #1                @ tmpH address
+        ADD            r5, r3, #1                        @ i = n + 1
+        MOV            r6, r0                            @ tmpX = x
+        LDRSH          r9,  [r6], #2                     @ *tmpX++
+        LDRSH          r10, [r4], #-2                    @ *tmpH--
+        SUB            r5, r5, #1
+        MUL            r8,  r9, r10 
+
+LOOP1:                    
+        CMP            r5, #0
+        BLE            L1
+	LDRSH          r9,  [r6], #2                     @ *tmpX++
+	LDRSH          r10, [r4], #-2                    @ *tmpH--
+	LDRSH          r12, [r6], #2                     @ *tmpX++
+	LDRSH          r14, [r4], #-2                    @ *tmpH--
+	MLA            r8, r9, r10, r8
+	MLA            r8, r12, r14, r8
+	LDRSH          r9,  [r6], #2                     @ *tmpX++
+	LDRSH          r10, [r4], #-2                    @ *tmpH--
+	LDRSH          r12, [r6], #2                     @ *tmpX++
+	LDRSH          r14, [r4], #-2                    @ *tmpH--
+	MLA            r8, r9, r10, r8
+        SUBS           r5, r5, #4 
+	MLA            r8, r12, r14, r8
+    
+        B              LOOP1  
+
+L1:                  
+
+        ADD            r5, r11, r8, LSL #1
+        MOV            r5, r5, LSR #16                   @extract_h(s)
+        ADD            r3, r3, #1
+        STRH           r5, [r2], #2                      @y[n]
+
+
+        ADD            r4, r1, r3, LSL #1                @tmpH address
+        ADD            r5, r3, #1
+        MOV            r6, r0
+        LDRSH          r9,  [r6], #2                     @ *tmpX++
+        LDRSH          r10, [r4], #-2                     
+        LDRSH          r12, [r6], #2
+        LDRSH          r14, [r4], #-2
+
+        MUL            r8, r9, r10
+        SUB            r5, r5, #2
+        MLA            r8, r12, r14, r8
+        
+LOOP2:
+        CMP            r5, #0
+        BLE            L2
+	LDRSH          r9,  [r6], #2                     @ *tmpX++
+	LDRSH          r10, [r4], #-2                    @ *tmpH--
+	LDRSH          r12, [r6], #2                     @ *tmpX++
+	LDRSH          r14, [r4], #-2                    @ *tmpH--
+	MLA            r8, r9, r10, r8
+	MLA            r8, r12, r14, r8
+	LDRSH          r9,  [r6], #2                     @ *tmpX++
+	LDRSH          r10, [r4], #-2                    @ *tmpH--
+	LDRSH          r12, [r6], #2                     @ *tmpX++
+	LDRSH          r14, [r4], #-2                    @ *tmpH--
+	MLA            r8, r9, r10, r8
+        SUBS           r5, r5, #4 
+	MLA            r8, r12, r14, r8
+        B              LOOP2
+
+L2:
+        ADD            r8, r11, r8, LSL #1
+        MOV            r8, r8, LSR #16                   @extract_h(s)
+        ADD            r3, r3, #1  
+        STRH           r8, [r2], #2                      @y[n]
+
+        ADD            r4, r1, r3, LSL #1
+        ADD            r5, r3, #1
+        MOV            r6, r0
+        LDRSH          r9,  [r6], #2
+        LDRSH          r10, [r4], #-2
+        LDRSH          r12, [r6], #2
+        LDRSH          r14, [r4], #-2
+        MUL            r8, r9, r10
+        LDRSH          r9,  [r6], #2
+        LDRSH          r10, [r4], #-2
+        MLA            r8, r12, r14, r8 
+        SUB            r5, r5, #3
+        MLA            r8, r9, r10, r8
+
+LOOP3:
+        CMP            r5, #0
+        BLE            L3
+	LDRSH          r9,  [r6], #2                     @ *tmpX++
+	LDRSH          r10, [r4], #-2                    @ *tmpH--
+	LDRSH          r12, [r6], #2                     @ *tmpX++
+	LDRSH          r14, [r4], #-2                    @ *tmpH--
+	MLA            r8, r9, r10, r8
+	MLA            r8, r12, r14, r8
+	LDRSH          r9,  [r6], #2                     @ *tmpX++
+	LDRSH          r10, [r4], #-2                    @ *tmpH--
+	LDRSH          r12, [r6], #2                     @ *tmpX++
+	LDRSH          r14, [r4], #-2                    @ *tmpH--
+	MLA            r8, r9, r10, r8
+        SUBS           r5, r5, #4 
+	MLA            r8, r12, r14, r8 
+        B              LOOP3   
+
+L3:
+        ADD            r8, r11, r8, LSL #1
+        MOV            r8, r8, LSR #16                   @extract_h(s)
+        ADD            r3, r3, #1
+        STRH           r8, [r2], #2                      @y[n]
+
+        ADD            r5, r3, #1                        @ i = n + 1
+        ADD            r4, r1, r3, LSL #1                @ tmpH address
+        MOV            r6, r0
+        MOV            r8, #0
+
+LOOP4:                    
+        CMP            r5, #0
+        BLE            L4
+	LDRSH          r9,  [r6], #2                     @ *tmpX++
+	LDRSH          r10, [r4], #-2                    @ *tmpH--
+	LDRSH          r12, [r6], #2                     @ *tmpX++
+	LDRSH          r14, [r4], #-2                    @ *tmpH--
+	MLA            r8, r9, r10, r8
+	MLA            r8, r12, r14, r8
+	LDRSH          r9,  [r6], #2                     @ *tmpX++
+	LDRSH          r10, [r4], #-2                    @ *tmpH--
+	LDRSH          r12, [r6], #2                     @ *tmpX++
+	LDRSH          r14, [r4], #-2                    @ *tmpH--
+	MLA            r8, r9, r10, r8
+        SUBS           r5, r5, #4 
+	MLA            r8, r12, r14, r8        
+        B              LOOP4    
+L4:                  
+        ADD            r5, r11, r8, LSL #1
+        MOV            r5, r5, LSR #16                   @extract_h(s)
+        ADD            r3, r3, #1
+        STRH           r5, [r2], #2                      @y[n]
+        
+        CMP            r3, #64
+        BLT            LOOP
+                
+Convolve_asm_end: 
+ 
+        LDMFD      r13!, {r4 - r12, r15}
+    
+        @ENDFUNC
+        .END
+
+
diff --git a/media/libstagefright/codecs/amrwbenc/src/asm/ARMV5E/cor_h_vec_opt.s b/media/libstagefright/codecs/amrwbenc/src/asm/ARMV5E/cor_h_vec_opt.s
new file mode 100644
index 0000000..441b984
--- /dev/null
+++ b/media/libstagefright/codecs/amrwbenc/src/asm/ARMV5E/cor_h_vec_opt.s
@@ -0,0 +1,151 @@
+@/*

+@ ** Copyright 2003-2010, VisualOn, Inc.

+@ **

+@ ** Licensed under the Apache License, Version 2.0 (the "License");

+@ ** you may not use this file except in compliance with the License.

+@ ** You may obtain a copy of the License at

+@ **

+@ **     http://www.apache.org/licenses/LICENSE-2.0

+@ **

+@ ** Unless required by applicable law or agreed to in writing, software

+@ ** distributed under the License is distributed on an "AS IS" BASIS,

+@ ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

+@ ** See the License for the specific language governing permissions and

+@ ** limitations under the License.

+@ */

+@static void cor_h_vec_012(

+@		Word16 h[],                           /* (i) scaled impulse response                 */

+@		Word16 vec[],                         /* (i) scaled vector (/8) to correlate with h[] */

+@		Word16 track,                         /* (i) track to use                            */

+@		Word16 sign[],                        /* (i) sign vector                             */

+@		Word16 rrixix[][NB_POS],              /* (i) correlation of h[x] with h[x]      */

+@		Word16 cor_1[],                       /* (o) result of correlation (NB_POS elements) */

+@		Word16 cor_2[]                        /* (o) result of correlation (NB_POS elements) */

+@)

+@r0 ---- h[]

+@r1 ---- vec[]

+@r2 ---- track

+@r3 ---- sign[]

+@r4 ---- rrixix[][NB_POS]

+@r5 ---- cor_1[]

+@r6 ---- cor_2[]

+

+

+          .section  .text

+	  .global  cor_h_vec_012_asm

+

+cor_h_vec_012_asm:

+

+         STMFD         r13!, {r4 - r12, r14}

+	 LDR           r4, [r13, #40]                    @load rrixix[][NB_POS]

+	 ADD           r7, r4, r2, LSL #5                @r7 --- p0 = rrixix[track]

+         MOV           r4, #0                            @i=0

+

+	 @r0 --- h[], r1 --- vec[],  r2 --- pos

+	 @r3 --- sign[], r4 --- i, r7 --- p0

+LOOPi:

+         MOV           r5, #0                            @L_sum1 = 0

+         MOV           r6, #0                            @L_sum2 = 0

+         ADD           r9, r1, r2, LSL #1                @p2 = &vec[pos]

+         MOV           r10, r0                           @p1 = h

+         RSB           r11, r2, #62                      @j=62-pos

+

+LOOPj1:

+	 LDRSH         r12, [r10], #2  

+	 LDRSH         r8,  [r9], #2

+	 LDRSH         r14, [r9]

+	 SUBS          r11, r11, #1

+         MLA           r5, r12, r8, r5

+         MLA           r6, r12, r14, r6	 

+	 BGE           LOOPj1

+

+	 LDRSH         r12, [r10], #2                     @*p1++

+	 MOV           r6, r6, LSL #2                     @L_sum2 = (L_sum2 << 2)

+         MLA           r5, r12, r14, r5

+         MOV           r14, #0x8000

+         MOV           r5, r5, LSL #2                     @L_sum1 = (L_sum1 << 2)

+         ADD           r10, r6, r14         

+         ADD           r9, r5, r14

+         MOV           r5, r9, ASR #16

+         MOV           r6, r10, ASR #16

+         ADD           r9, r3, r2, LSL #1                 @address of sign[pos]

+         ADD           r8, r7, #32

+         LDRSH         r10, [r9], #2                 	  @sign[pos]

+	 LDRSH         r11, [r9]                          @sign[pos + 1]

+	 MUL           r12, r5, r10

+	 MUL           r14, r6, r11

+	 MOV           r5, r12, ASR #15

+	 MOV           r6, r14, ASR #15

+	 LDR           r9,  [r13, #44]                   

+	 LDR           r12, [r13, #48]

+         LDRSH         r10, [r7], #2                      @*p0++

+	 LDRSH         r11, [r8]                          @*p3++

+         ADD           r9, r9, r4, LSL #1

+	 ADD           r12, r12, r4, LSL #1

+	 ADD           r5, r5, r10

+	 ADD           r6, r6, r11

+	 STRH          r5, [r9]

+	 STRH          r6, [r12]

+

+         ADD           r2, r2, #4

+ 

+         MOV           r5, #0                            @L_sum1 = 0

+	 MOV           r6, #0                            @L_sum2 = 0

+	 ADD           r9, r1, r2, LSL #1                @p2 = &vec[pos]

+	 MOV           r10, r0                           @p1 = h

+	 RSB           r11, r2, #62                      @j=62-pos

+	 ADD           r4, r4, #1                        @i++

+

+LOOPj2:

+	 LDRSH         r12, [r10], #2  

+	 LDRSH         r8,  [r9], #2

+	 LDRSH         r14, [r9]

+	 SUBS          r11, r11, #1

+         MLA           r5, r12, r8, r5

+         MLA           r6, r12, r14, r6	 

+	 BGE           LOOPj2

+

+	 LDRSH         r12, [r10], #2                     @*p1++

+	 MOV           r6, r6, LSL #2                     @L_sum2 = (L_sum2 << 2)

+         MLA           r5, r12, r14, r5

+         MOV           r14, #0x8000

+         MOV           r5, r5, LSL #2                     @L_sum1 = (L_sum1 << 2)

+         ADD           r10, r6, r14        

+         ADD           r9, r5, r14

+

+         MOV           r5, r9, ASR #16

+         MOV           r6, r10, ASR #16

+         ADD           r9, r3, r2, LSL #1                 @address of sign[pos]

+         ADD           r8, r7, #32

+         LDRSH         r10, [r9], #2                 	  @sign[pos]

+	 LDRSH         r11, [r9]                          @sign[pos + 1]

+	 MUL           r12, r5, r10

+	 MUL           r14, r6, r11

+	 MOV           r5, r12, ASR #15

+	 MOV           r6, r14, ASR #15

+	 LDR           r9,  [r13, #44]                   

+	 LDR           r12, [r13, #48]

+         LDRSH         r10, [r7], #2                      @*p0++

+	 LDRSH         r11, [r8]                          @*p3++

+         ADD           r9, r9, r4, LSL #1

+	 ADD           r12, r12, r4, LSL #1

+	 ADD           r5, r5, r10

+	 ADD           r6, r6, r11

+	 STRH          r5, [r9]

+	 STRH          r6, [r12]

+	 ADD           r4, r4, #1                         @i+1

+	 ADD           r2, r2, #4                         @pos += STEP

+	 CMP           r4, #16

+	 

+	 BLT           LOOPi

+         

+the_end:

+         LDMFD         r13!, {r4 - r12, r15}

+      

+         @ENDFUNC

+         .END	 

+        

+	

+	  

+

+

diff --git a/media/libstagefright/codecs/amrwbenc/src/asm/ARMV5E/pred_lt4_1_opt.s b/media/libstagefright/codecs/amrwbenc/src/asm/ARMV5E/pred_lt4_1_opt.s
new file mode 100644
index 0000000..d5dd8f0
--- /dev/null
+++ b/media/libstagefright/codecs/amrwbenc/src/asm/ARMV5E/pred_lt4_1_opt.s
@@ -0,0 +1,460 @@
+@/*

+@ ** Copyright 2003-2010, VisualOn, Inc.

+@ **

+@ ** Licensed under the Apache License, Version 2.0 (the "License");

+@ ** you may not use this file except in compliance with the License.

+@ ** You may obtain a copy of the License at

+@ **

+@ **     http://www.apache.org/licenses/LICENSE-2.0

+@ **

+@ ** Unless required by applicable law or agreed to in writing, software

+@ ** distributed under the License is distributed on an "AS IS" BASIS,

+@ ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

+@ ** See the License for the specific language governing permissions and

+@ ** limitations under the License.

+@ */

+@

+@void Pred_lt4(

+@		  Word16 exc[],                         /* in/out: excitation buffer */

+@		  Word16 T0,                            /* input : integer pitch lag */

+@		  Word16 frac,                          /* input : fraction of lag   */

+@		  Word16 L_subfr                        /* input : subframe size     */

+@	      )

+

+@******************************

+@       ARM Register

+@******************************

+@ r0  ---  exc[]

+@ r1  ---  T0

+@ r2  ---  frac

+@ r3  ---  L_subfr

+

+         .section  .text

+	 .global   pred_lt4_asm

+	 .extern   inter4_2

+

+pred_lt4_asm:

+

+         STMFD     r13!, {r4 - r12, r14} 

+         RSB       r4, r1, #0                         @-T0

+         RSB       r2, r2, #0                         @frac = -frac

+         ADD       r5, r0, r4, LSL #1                 @x = exc - T0

+         CMP       r2, #0

+         ADDLT     r2, r2, #4                         @frac += UP_SAMP

+         SUBLT     r5, r5, #2                         @x--

+         SUB       r5, r5, #30                        @x -= 15

+         RSB       r4, r2, #3                         @k = 3 - frac

+         LDR       r6, Table

+	 MOV       r8, r4, LSL #6                    

+         @MOV       r7, #0                             @j = 0

+         ADD       r8, r6, r8                         @ptr2 = &(inter4_2[k][0])

+

+	 MOV       r1, r5

+	 MOV       r5, #0x8000

+	 MOV       r14, #21

+@ used register

+         @r0 --- exc[]  r1 --- x  r7 --- j  r8 --- ptr2  r5 --- 0x8000

+THREE_LOOP:

+

+         @MOV       r1, r5                             @ptr1 = x

+	 MOV       r2, r8                             @ptr = ptr2

+         LDR       r3, [r2], #4                       @h[0], h[1]

+	 LDRSH     r4, [r1], #2                       @x[0]

+	 LDRSH     r6, [r1], #2                       @x[1]

+	 LDRSH     r9, [r1], #2                       @x[2]

+

+	 SMULBB    r10, r4, r3                        @x[0] * h[0]                  

+	 SMULBB    r11, r6, r3                        @x[1] * h[0]

+	 SMULBB    r12, r9, r3                        @x[2] * h[0]

+

+         LDRSH     r4, [r1], #2                       @x[3]

+	 SMLABT    r10, r6, r3, r10                   @x[1] * h[1]

+         SMLABT    r11, r9, r3, r11                   @x[2] * h[1]

+	 SMLABT    r12, r4, r3, r12                   @x[3] * h[1]

+

+	 LDR       r3, [r2], #4                       @h[2], h[3]

+	 LDRSH     r6, [r1], #2                       @x[4]

+	 SMLABB    r10, r9, r3, r10                   @x[2] * h[2]

+         SMLABB    r11, r4, r3, r11                   @x[3] * h[2]

+         SMLABB    r12, r6, r3, r12                   @x[4] * h[2]

+

+         LDRSH     r9, [r1], #2                       @x[5]

+         SMLABT    r10, r4, r3, r10                   @x[3] * h[3]

+         SMLABT    r11, r6, r3, r11                   @x[4] * h[3]

+         SMLABT    r12, r9, r3, r12                   @x[5] * h[3]

+

+         LDR       r3, [r2], #4                       @h[4], h[5]

+         LDRSH     r4, [r1], #2                       @x[6]

+         SMLABB    r10, r6, r3, r10                   @x[4] * h[4]

+         SMLABB    r11, r9, r3, r11                   @x[5] * h[4]

+         SMLABB    r12, r4, r3, r12                   @x[6] * h[4]

+

+	 LDRSH     r6, [r1], #2                       @x[7]

+	 SMLABT    r10, r9, r3, r10                   @x[5] * h[5]

+	 SMLABT    r11, r4, r3, r11                   @x[6] * h[5]

+	 SMLABT    r12, r6, r3, r12                   @x[7] * h[5]

+

+         LDR       r3, [r2], #4                       @h[6], h[7]

+	 LDRSH     r9, [r1], #2                       @x[8]

+	 SMLABB    r10, r4, r3, r10                   @x[6] * h[6]

+	 SMLABB    r11, r6, r3, r11                   @x[7] * h[6]

+	 SMLABB    r12, r9, r3, r12                   @x[8] * h[6]

+

+	 LDRSH     r4, [r1], #2                       @x[9]

+	 SMLABT    r10, r6, r3, r10                   @x[7] * h[7]

+	 SMLABT    r11, r9, r3, r11                   @x[8] * h[7]

+	 SMLABT    r12, r4, r3, r12                   @x[9] * h[7]

+

+	 LDR       r3, [r2], #4                       @h[8], h[9]

+	 LDRSH     r6, [r1], #2                       @x[10]

+	 SMLABB    r10, r9, r3, r10                   @x[8] * h[8]

+	 SMLABB    r11, r4, r3, r11                   @x[9] * h[8]

+	 SMLABB    r12, r6, r3, r12                   @x[10] * h[8]

+

+	 LDRSH     r9, [r1], #2                       @x[11]

+	 SMLABT    r10, r4, r3, r10                   @x[9] * h[9]

+	 SMLABT    r11, r6, r3, r11                   @x[10] * h[9]

+	 SMLABT    r12, r9, r3, r12                   @x[11] * h[9]

+

+         LDR       r3, [r2], #4                       @h[10], h[11]

+	 LDRSH     r4, [r1], #2                       @x[12]

+         SMLABB    r10, r6, r3, r10                   @x[10] * h[10]

+	 SMLABB    r11, r9, r3, r11                   @x[11] * h[10]

+	 SMLABB    r12, r4, r3, r12                   @x[12] * h[10]

+

+	 LDRSH     r6, [r1], #2                       @x[13]

+	 SMLABT    r10, r9, r3, r10                   @x[11] * h[11]

+	 SMLABT    r11, r4, r3, r11                   @x[12] * h[11]

+	 SMLABT    r12, r6, r3, r12                   @x[13] * h[11]

+

+	 LDR       r3, [r2], #4                       @h[12], h[13]

+	 LDRSH     r9, [r1], #2                       @x[14]

+	 SMLABB    r10, r4, r3, r10                   @x[12] * h[12]

+	 SMLABB    r11, r6, r3, r11                   @x[13] * h[12]

+	 SMLABB    r12, r9, r3, r12                   @x[14] * h[12]

+

+	 LDRSH     r4, [r1], #2                       @x[15]

+	 SMLABT    r10, r6, r3, r10                   @x[13] * h[13]

+	 SMLABT    r11, r9, r3, r11                   @x[14] * h[13]

+	 SMLABT    r12, r4, r3, r12                   @x[15] * h[13]

+

+	 LDR       r3, [r2], #4                       @h[14], h[15]

+	 LDRSH     r6, [r1], #2                       @x[16]

+	 SMLABB    r10, r9, r3, r10                   @x[14] * h[14]

+	 SMLABB    r11, r4, r3, r11                   @x[15] * h[14]

+	 SMLABB    r12, r6, r3, r12                   @x[16] * h[14]

+

+	 LDRSH     r9, [r1], #2                       @x[17]

+         SMLABT    r10, r4, r3, r10                   @x[15] * h[15]

+	 SMLABT    r11, r6, r3, r11                   @x[16] * h[15]

+	 SMLABT    r12, r9, r3, r12                   @x[17] * h[15]

+

+	 LDR       r3, [r2], #4                       @h[16], h[17]

+	 LDRSH     r4, [r1], #2                       @x[18]

+	 SMLABB    r10, r6, r3, r10                   @x[16] * h[16]

+	 SMLABB    r11, r9, r3, r11                   @x[17] * h[16]

+	 SMLABB    r12, r4, r3, r12                   @x[18] * h[16]

+

+         LDRSH     r6, [r1], #2                       @x[19]

+	 SMLABT    r10, r9, r3, r10                   @x[17] * h[17]

+	 SMLABT    r11, r4, r3, r11                   @x[18] * h[17]

+	 SMLABT    r12, r6, r3, r12                   @x[19] * h[17]

+

+	 LDR       r3, [r2], #4                       @h[18], h[19]

+         LDRSH     r9, [r1], #2                       @x[20]

+	 SMLABB    r10, r4, r3, r10                   @x[18] * h[18]

+	 SMLABB    r11, r6, r3, r11                   @x[19] * h[18]

+	 SMLABB    r12, r9, r3, r12                   @x[20] * h[18]

+

+	 LDRSH     r4, [r1], #2                       @x[21]

+	 SMLABT    r10, r6, r3, r10                   @x[19] * h[19]

+	 SMLABT    r11, r9, r3, r11                   @x[20] * h[19]

+	 SMLABT    r12, r4, r3, r12                   @x[21] * h[19]

+

+	 LDR       r3, [r2], #4                       @h[20], h[21]

+	 LDRSH     r6, [r1], #2                       @x[22]

+	 SMLABB    r10, r9, r3, r10                   @x[20] * h[20]

+	 SMLABB    r11, r4, r3, r11                   @x[21] * h[20]

+	 SMLABB    r12, r6, r3, r12                   @x[22] * h[20]

+

+	 LDRSH     r9, [r1], #2                       @x[23]

+	 SMLABT    r10, r4, r3, r10                   @x[21] * h[21]

+	 SMLABT    r11, r6, r3, r11                   @x[22] * h[21]

+	 SMLABT    r12, r9, r3, r12                   @x[23] * h[21]

+

+	 LDR       r3, [r2], #4                       @h[22], h[23]

+	 LDRSH     r4, [r1], #2                       @x[24]

+	 SMLABB    r10, r6, r3, r10                   @x[22] * h[22]

+	 SMLABB    r11, r9, r3, r11                   @x[23] * h[22]

+	 SMLABB    r12, r4, r3, r12                   @x[24] * h[22]

+

+         LDRSH     r6, [r1], #2                       @x[25]

+	 SMLABT    r10, r9, r3, r10                   @x[23] * h[23]

+	 SMLABT    r11, r4, r3, r11                   @x[24] * h[23]

+	 SMLABT    r12, r6, r3, r12                   @x[25] * h[23]

+

+	 LDR       r3, [r2], #4                       @h[24], h[25]

+         LDRSH     r9, [r1], #2                       @x[26]

+	 SMLABB    r10, r4, r3, r10                   @x[24] * h[24]

+	 SMLABB    r11, r6, r3, r11                   @x[25] * h[24]

+	 SMLABB    r12, r9, r3, r12                   @x[26] * h[24]

+

+	 LDRSH     r4, [r1], #2                       @x[27]

+	 SMLABT    r10, r6, r3, r10                   @x[25] * h[25]

+	 SMLABT    r11, r9, r3, r11                   @x[26] * h[25]

+	 SMLABT    r12, r4, r3, r12                   @x[27] * h[25]

+

+	 LDR       r3, [r2], #4                       @h[26], h[27]

+	 LDRSH     r6, [r1], #2                       @x[28]

+	 SMLABB    r10, r9, r3, r10                   @x[26] * h[26]

+	 SMLABB    r11, r4, r3, r11                   @x[27] * h[26]

+	 SMLABB    r12, r6, r3, r12                   @x[28] * h[26]

+

+	 LDRSH     r9, [r1], #2                       @x[29]

+	 SMLABT    r10, r4, r3, r10                   @x[27] * h[27]

+	 SMLABT    r11, r6, r3, r11                   @x[28] * h[27]

+	 SMLABT    r12, r9, r3, r12                   @x[29] * h[27]

+

+	 LDR       r3, [r2], #4                       @h[28], h[29]

+	 LDRSH     r4, [r1], #2                       @x[30]

+	 SMLABB    r10, r6, r3, r10                   @x[28] * h[28]

+	 SMLABB    r11, r9, r3, r11                   @x[29] * h[28]

+	 SMLABB    r12, r4, r3, r12                   @x[30] * h[28]

+

+         LDRSH     r6, [r1], #2                       @x[31]

+	 SMLABT    r10, r9, r3, r10                   @x[29] * h[29]

+	 SMLABT    r11, r4, r3, r11                   @x[30] * h[29]

+	 SMLABT    r12, r6, r3, r12                   @x[31] * h[29]

+

+	 LDR       r3, [r2], #4                       @h[30], h[31]

+         LDRSH     r9, [r1], #2                       @x[32]

+	 SMLABB    r10, r4, r3, r10                   @x[30] * h[30]

+	 SMLABB    r11, r6, r3, r11                   @x[31] * h[30]

+	 SMLABB    r12, r9, r3, r12                   @x[32] * h[30]

+

+	 LDRSH     r4, [r1], #-60                     @x[33]

+	 SMLABT    r10, r6, r3, r10                   @x[31] * h[31]

+	 SMLABT    r11, r9, r3, r11                   @x[32] * h[31]

+	 SMLABT    r12, r4, r3, r12                   @x[33] * h[31]

+

+	 @SSAT      r10, #32, r10, LSL #2

+	 @SSAT      r11, #32, r11, LSL #2

+	 @SSAT      r12, #32, r12, LSL #2

+

+	 MOV       r10, r10, LSL #1

+	 MOV       r11, r11, LSL #1

+	 MOV       r12, r12, LSL #1

+

+	 QADD      r10, r10, r10

+	 QADD      r11, r11, r11

+	 QADD      r12, r12, r12

+

+	 QADD      r10, r10, r5

+	 QADD      r11, r11, r5

+	 QADD      r12, r12, r5

+

+	 SUBS      r14, r14, #1

+

+	 MOV       r10, r10, ASR #16

+	 MOV       r11, r11, ASR #16

+	 MOV       r12, r12, ASR #16

+

+	 STRH      r10, [r0], #2

+	 STRH      r11, [r0], #2

+	 STRH      r12, [r0], #2

+	 BNE       THREE_LOOP

+

+	 MOV       r2, r8                             @ptr = ptr2

+

+Last2LOOP:

+

+         LDR       r3, [r2], #4                       @h[0], h[1]

+	 LDRSH     r4, [r1], #2                       @x[0]

+	 LDRSH     r6, [r1], #2                       @x[1]

+	 LDRSH     r9, [r1], #2                       @x[2]

+

+	 SMULBB    r10, r4, r3                        @x[0] * h[0]

+	 SMULBB    r11, r6, r3                        @x[1] * h[0]

+

+	 SMLABT    r10, r6, r3, r10                   @x[1] * h[1]

+	 SMLABT    r11, r9, r3, r11                   @x[2] * h[1]

+

+	 LDR       r3, [r2], #4                       @h[2], h[3]

+	 LDRSH     r4, [r1], #2                       @x[3]

+         LDRSH     r6, [r1], #2                       @x[4]

+

+	 SMLABB    r10, r9, r3, r10                   @x[2] * h[2]

+         SMLABB    r11, r4, r3, r11                   @x[3] * h[2]

+      

+	 SMLABT    r10, r4, r3, r10                   @x[3] * h[3]

+	 SMLABT    r11, r6, r3, r11                   @x[4] * h[3]

+

+	 LDR       r3, [r2], #4                       @h[4], h[5]

+	 LDRSH     r9, [r1], #2                       @x[5]

+	 LDRSH     r4, [r1], #2                       @x[6]

+

+	 SMLABB    r10, r6, r3, r10                   @x[4] * h[4]

+	 SMLABB    r11, r9, r3, r11                   @x[5] * h[4]

+

+	 SMLABT    r10, r9, r3, r10                   @x[5] * h[5]

+	 SMLABT    r11, r4, r3, r11                   @x[6] * h[5]

+

+	 LDR       r3, [r2], #4                       @h[6], h[7]

+	 LDRSH     r6, [r1], #2                       @x[7]

+	 LDRSH     r9, [r1], #2                       @x[8]

+

+	 SMLABB    r10, r4, r3, r10                   @x[6] * h[6]

+	 SMLABB    r11, r6, r3, r11                   @x[7] * h[6]

+

+	 SMLABT    r10, r6, r3, r10                   @x[7] * h[7]

+	 SMLABT    r11, r9, r3, r11                   @x[8] * h[7]

+

+	 LDR       r3, [r2], #4                       @h[8], h[9]

+	 LDRSH     r4, [r1], #2                       @x[9]

+	 LDRSH     r6, [r1], #2                       @x[10]

+

+	 SMLABB    r10, r9, r3, r10                   @x[8] * h[8]

+	 SMLABB    r11, r4, r3, r11                   @x[9] * h[8]

+

+	 SMLABT    r10, r4, r3, r10                   @x[9] * h[9]

+	 SMLABT    r11, r6, r3, r11                   @x[10] * h[9]

+

+	 LDR       r3, [r2], #4                       @h[10], h[11]

+	 LDRSH     r9, [r1], #2                       @x[11]

+	 LDRSH     r4, [r1], #2                       @x[12]

+

+	 SMLABB    r10, r6, r3, r10                   @x[10] * h[10]

+	 SMLABB    r11, r9, r3, r11                   @x[11] * h[10]

+

+	 SMLABT    r10, r9, r3, r10                   @x[11] * h[11]

+	 SMLABT    r11, r4, r3, r11                   @x[12] * h[11]

+

+	 LDR       r3, [r2], #4                       @h[12], h[13]

+	 LDRSH     r6, [r1], #2                       @x[13]

+	 LDRSH     r9, [r1], #2                       @x[14]

+

+	 SMLABB    r10, r4, r3, r10                   @x[12] * h[12]

+	 SMLABB    r11, r6, r3, r11                   @x[13] * h[12]

+

+	 SMLABT    r10, r6, r3, r10                   @x[13] * h[13]

+	 SMLABT    r11, r9, r3, r11                   @x[14] * h[13]

+

+	 LDR       r3, [r2], #4                       @h[14], h[15]

+	 LDRSH     r4, [r1], #2                       @x[15]

+	 LDRSH     r6, [r1], #2                       @x[16]

+

+	 SMLABB    r10, r9, r3, r10                   @x[14] * h[14]

+	 SMLABB    r11, r4, r3, r11                   @x[15] * h[14]

+

+	 SMLABT    r10, r4, r3, r10                   @x[15] * h[15]

+	 SMLABT    r11, r6, r3, r11                   @x[16] * h[15]

+

+	 LDR       r3, [r2], #4                       @h[16], h[17]

+	 LDRSH     r9, [r1], #2                       @x[17]

+	 LDRSH     r4, [r1], #2                       @x[18]

+

+	 SMLABB    r10, r6, r3, r10                   @x[16] * h[16]

+	 SMLABB    r11, r9, r3, r11                   @x[17] * h[16]

+

+	 SMLABT    r10, r9, r3, r10                   @x[17] * h[17]

+	 SMLABT    r11, r4, r3, r11                   @x[18] * h[17]

+

+	 LDR       r3, [r2], #4                       @h[18], h[19]

+	 LDRSH     r6, [r1], #2                       @x[19]

+	 LDRSH     r9, [r1], #2                       @x[20]

+

+	 SMLABB    r10, r4, r3, r10                   @x[18] * h[18]

+	 SMLABB    r11, r6, r3, r11                   @x[19] * h[18]

+

+	 SMLABT    r10, r6, r3, r10                   @x[19] * h[19]

+	 SMLABT    r11, r9, r3, r11                   @x[20] * h[19]

+

+	 LDR       r3, [r2], #4                       @h[20], h[21]

+	 LDRSH     r4, [r1], #2                       @x[21]

+	 LDRSH     r6, [r1], #2                       @x[22]

+

+	 SMLABB    r10, r9, r3, r10                   @x[20] * h[20]

+	 SMLABB    r11, r4, r3, r11                   @x[21] * h[20]

+

+	 SMLABT    r10, r4, r3, r10                   @x[21] * h[21]

+	 SMLABT    r11, r6, r3, r11                   @x[22] * h[21]

+

+	 LDR       r3, [r2], #4                       @h[22], h[23]

+	 LDRSH     r9, [r1], #2                       @x[23]

+	 LDRSH     r4, [r1], #2                       @x[24]

+

+	 SMLABB    r10, r6, r3, r10                   @x[22] * h[22]

+	 SMLABB    r11, r9, r3, r11                   @x[23] * h[22]

+

+	 SMLABT    r10, r9, r3, r10                   @x[23] * h[23]

+	 SMLABT    r11, r4, r3, r11                   @x[24] * h[23]

+

+	 LDR       r3, [r2], #4                       @h[24], h[25]

+	 LDRSH     r6, [r1], #2                       @x[25]

+	 LDRSH     r9, [r1], #2                       @x[26]

+

+	 SMLABB    r10, r4, r3, r10                   @x[24] * h[24]

+	 SMLABB    r11, r6, r3, r11                   @x[25] * h[24]

+

+	 SMLABT    r10, r6, r3, r10                   @x[25] * h[25]

+	 SMLABT    r11, r9, r3, r11                   @x[26] * h[25]

+

+	 LDR       r3, [r2], #4                       @h[26], h[27]

+	 LDRSH     r4, [r1], #2                       @x[27]

+	 LDRSH     r6, [r1], #2                       @x[28]

+

+	 SMLABB    r10, r9, r3, r10                   @x[26] * h[26]

+	 SMLABB    r11, r4, r3, r11                   @x[27] * h[26]

+

+	 SMLABT    r10, r4, r3, r10                   @x[27] * h[27]

+	 SMLABT    r11, r6, r3, r11                   @x[28] * h[27]

+

+	 LDR       r3, [r2], #4                       @h[28], h[29]

+	 LDRSH     r9, [r1], #2                       @x[29]

+	 LDRSH     r4, [r1], #2                       @x[30]

+

+	 SMLABB    r10, r6, r3, r10                   @x[28] * h[28]

+	 SMLABB    r11, r9, r3, r11                   @x[29] * h[28]

+

+	 SMLABT    r10, r9, r3, r10                   @x[29] * h[29]

+	 SMLABT    r11, r4, r3, r11                   @x[30] * h[29]

+

+	 LDR       r3, [r2], #4                       @h[30], h[31]

+	 LDRSH     r6, [r1], #2                       @x[31]

+	 LDRSH     r9, [r1], #2                       @x[32]

+

+	 SMLABB    r10, r4, r3, r10                   @x[30] * h[30]

+	 SMLABB    r11, r6, r3, r11                   @x[31] * h[30]

+

+	 SMLABT    r10, r6, r3, r10                   @x[31] * h[31]

+	 SMLABT    r11, r9, r3, r11                   @x[32] * h[31]

+

+	 @SSAT      r10, #32, r10, LSL #2

+	 @SSAT      r11, #32, r11, LSL #2

+	 MOV       r10, r10, LSL #1

+	 MOV       r11, r11, LSL #1

+

+	 QADD      r10, r10, r10

+	 QADD      r11, r11, r11 

+

+	 QADD      r10, r10, r5

+	 QADD      r11, r11, r5

+

+	 MOV       r10, r10, ASR #16

+	 MOV       r11, r11, ASR #16

+

+	 STRH      r10, [r0], #2

+	 STRH      r11, [r0], #2

+

+

+pred_lt4_end:

+         LDMFD     r13!, {r4 - r12, r15}

+

+Table:

+         .word       inter4_2

+	 @ENDFUNC

+	 .END

+

+

+

+

diff --git a/media/libstagefright/codecs/amrwbenc/src/asm/ARMV5E/residu_asm_opt.s b/media/libstagefright/codecs/amrwbenc/src/asm/ARMV5E/residu_asm_opt.s
new file mode 100644
index 0000000..060d9c7
--- /dev/null
+++ b/media/libstagefright/codecs/amrwbenc/src/asm/ARMV5E/residu_asm_opt.s
@@ -0,0 +1,228 @@
+@/*

+@ ** Copyright 2003-2010, VisualOn, Inc.

+@ **

+@ ** Licensed under the Apache License, Version 2.0 (the "License");

+@ ** you may not use this file except in compliance with the License.

+@ ** You may obtain a copy of the License at

+@ **

+@ **     http://www.apache.org/licenses/LICENSE-2.0

+@ **

+@ ** Unless required by applicable law or agreed to in writing, software

+@ ** distributed under the License is distributed on an "AS IS" BASIS,

+@ ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

+@ ** See the License for the specific language governing permissions and

+@ ** limitations under the License.

+@ */

+@

+@void Residu(

+@	    Word16 a[],                           /* (i) Q12 : prediction coefficients */

+@	    Word16 x[],                           /* (i)     : speech (values x[-m..-1] are needed */

+@	    Word16 y[],                           /* (o) x2  : residual signal       */

+@	    Word16 lg                             /* (i)     : size of filtering     */

+@	   )

+@a[] --- r0

+@x[] --- r1

+@y[] --- r2

+@lg  --- r3

+

+        .section  .text

+	.global   Residu_opt

+

+Residu_opt:

+

+        STMFD   r13!, {r4 - r12, r14}

+

+        LDRH    r5, [r0], #2

+        LDRH    r6, [r0], #2

+        ORR     r5, r6, r5, LSL #16                  @r5 --- a0, a1	

+

+        LDRH    r6, [r0], #2

+	LDRH    r7, [r0], #2

+	ORR     r6, r7, r6, LSL #16                  @r6 --- a2, a3

+	

+        LDRH    r7, [r0], #2

+	LDRH    r8, [r0], #2

+	ORR     r7, r8, r7, LSL #16                  @r7 --- a4, a5

+

+	LDRH    r8, [r0], #2

+	LDRH    r9, [r0], #2

+	ORR     r8, r9, r8, LSL #16                  @r8 --- a6, a7

+

+	LDRH    r9, [r0], #2

+	LDRH    r10, [r0], #2

+	ORR     r9, r10, r9, LSL #16                 @r9 --- a8, a9

+

+	LDRH    r10, [r0], #2

+	LDRH    r11, [r0], #2

+	ORR     r10, r11, r10, LSL #16               @r10 --- a10, a11

+

+        LDRH    r11, [r0], #2

+	LDRH    r12, [r0], #2

+	ORR     r11, r12, r11, LSL #16               @r11 --- a12, a13

+	

+	LDRH    r12, [r0], #2

+	LDRH    r4, [r0], #2

+	ORR     r12, r4, r12, LSL #16                @r12 --- a14, a15

+	

+

+	STMFD   r13!, {r8 - r12}                     @store r8-r12 

+	LDRH    r4, [r0], #2                         @load a16

+        MOV     r14, r3, ASR #2                      @one loop get 4 outputs

+	ADD     r1, r1, #4

+	MOV     r0, r2

+	ORR     r14, r4, r14, LSL #16                @r14 --- loopnum, a16

+

+residu_loop:

+

+        LDR     r10, [r1], #-4                       @r10  --- x[3], x[2]

+	LDR     r2,  [r1], #-4                       @r2   --- x[1], x[0]

+

+	SMULTB  r3, r5, r2                           @i1(0)  --- r3 = x[0] * a0

+        SMULTT  r4, r5, r2                           @i2(0)  --- r4 = x[1] * a0	

+	SMULTB  r11, r5, r10                         @i3(0)  --- r11 = x[2] * a0

+	SMULTT  r12, r5, r10                         @i4(0)  --- r12 = x[3] * a0

+

+        SMLABB  r4, r5, r2, r4                       @i2(1)  --- r4 += x[0] * a1

+        SMLABT  r11, r5, r2, r11                     @i3(1)  --- r11 += x[1] * a0

+        SMLABB  r12, r5, r10, r12                    @i4(1)  --- r12 += x[2] * a1

+

+	SMLATB  r11, r6, r2, r11                     @i3(2)  --- r11 += x[0] * a2

+	SMLATT  r12, r6, r2, r12                     @i4(2)  --- r12 += x[1] * a2

+	SMLABB  r12, r6, r2, r12                     @i4(3)  --- r12 += x[0] * a3                 

+	

+	LDR     r2, [r1], #-4                        @r2 ---- x[-1], x[-2]

+

+	SMLABT  r3, r5, r2, r3                       @i1(1) --- r3 += x[-1] * a1

+	SMLATT  r4, r6, r2, r4                       @i2(2) --- r4 += x[-1] * a2

+	SMLABT  r11, r6, r2, r11                     @i3(3) --- r11 += x[-1] * a3

+	SMLATT  r12, r7, r2, r12                     @i4(4) --- r12 += x[-1] * a4

+        SMLATB  r3, r6, r2, r3                       @i1(2) --- r3 += x[-2] * a2	

+

+	SMLABB	r4, r6, r2, r4				@ i2	(3)

+	SMLATB  r11,r7, r2, r11				@ i3	(4)

+	SMLABB	r12,r7, r2, r12				@ i4	(5)

+	

+	LDR	r2,[r1],#-4

+	SMLABT	r3, r6, r2, r3				@ i1	(3)

+	SMLATT	r4, r7, r2, r4				@ i2	(4)

+	SMLABT	r11,r7, r2, r11				@ i3	(5)

+	SMLATT	r12,r8, r2, r12				@ i4	(6)

+	SMLATB	r3, r7, r2, r3				@ i1	(4)

+	SMLABB	r4, r7, r2, r4				@ i2	(5)

+	SMLATB	r11,r8, r2, r11				@ i3	(6)

+	SMLABB	r12,r8, r2, r12				@ i4	(7)

+		

+	LDR	r2,[r1],#-4

+	SMLABT	r3, r7, r2, r3				@ i1	(5)

+	SMLATT	r4, r8, r2, r4				@ i2	(6)

+	SMLABT	r11,r8, r2, r11				@ i3	(7)

+	SMLATT	r12,r9, r2, r12				@ i4	(8)

+	SMLATB	r3, r8, r2, r3				@ i1	(6)

+	SMLABB	r4, r8, r2, r4				@ i2	(7)

+	SMLATB	r11,r9, r2, r11				@ i3	(8)

+	SMLABB	r12,r9, r2, r12				@ i4	(9)

+	LDR	r10, [r13, #8]				@ [ a10 | a11]

+	

+	LDR	r2,[r1],#-4

+	SMLABT	r3, r8, r2, r3				@ i1	(7)

+	SMLATT	r4, r9, r2, r4				@ i2	(8)

+	SMLABT	r11,r9, r2, r11				@ i3	(9)

+	SMLATT	r12,r10, r2, r12			@ i4	(10)

+	SMLATB	r3, r9, r2, r3				@ i1	(8)

+	SMLABB	r4, r9, r2, r4				@ i2	(9)

+	SMLATB	r11,r10, r2, r11			@ i3	(10)

+	SMLABB	r12,r10, r2, r12			@ i4	(11)

+	LDR	r8, [r13, #12]				@ [ a12 | a13 ]

+		

+	LDR	r2,[r1],#-4

+	SMLABT	r3, r9, r2, r3				@ i1	(9)

+	SMLATT	r4, r10, r2, r4				@ i2	(10)

+	SMLABT	r11,r10, r2, r11			@ i3	(11)

+	SMLATT	r12,r8, r2, r12				@ i4	(12)

+	SMLATB	r3, r10, r2, r3				@ i1	(10)

+	SMLABB	r4, r10, r2, r4				@ i2	(11)

+	SMLATB	r11,r8, r2, r11				@ i3	(12)

+	SMLABB	r12,r8, r2, r12				@ i4	(13)

+	LDR	r9, [r13, #16]				@ [ a14 | a15 ]

+	

+	LDR	r2,[r1],#-4

+	SMLABT	r3, r10, r2, r3				@ i1	(11)

+	SMLATT	r4, r8, r2, r4				@ i2	(12)

+	SMLABT	r11,r8, r2, r11				@ i3	(13)

+	SMLATT	r12,r9, r2, r12				@ i4	(14)

+	SMLATB	r3, r8, r2, r3				@ i1	(12)

+	SMLABB	r4, r8, r2, r4				@ i2	(13)

+	SMLATB	r11,r9, r2, r11				@ i3	(14)

+	SMLABB	r12,r9, r2, r12				@ i4	(15)

+	

+

+	LDR	r2,[r1],#-4

+	SMLABT	r3, r8, r2, r3				@ i1	(13)

+	SMLATT	r4, r9, r2, r4				@ i2	(14)

+	SMLABT	r11,r9, r2, r11				@ i3	(15)

+	SMLABT	r12,r14, r2, r12			@ i4	(16)

+	SMLATB	r3, r9, r2, r3				@ i1	(14)

+	SMLABB	r4, r9, r2, r4				@ i2	(15)

+	SMLABB	r11,r14, r2, r11			@ i3	(16)

+	LDR		r8, [r13]					@ [ a6 | a7 ]

+			

+        LDR     r2,[r1],#44         		@ Change

+	SMLABT	r3, r9, r2, r3

+	SMLABB	r3, r14, r2, r3

+	SMLABT	r4, r14, r2, r4

+	LDR		r9, [r13, #4]				@ [ a8 | a9 ]

+	

+

+	QADD	r3,r3,r3					

+	QADD	r4,r4,r4					

+	QADD	r11,r11,r11					

+	QADD	r12,r12,r12					

+		

+	QADD	r3,r3,r3					

+	QADD	r4,r4,r4					

+	QADD	r11,r11,r11					

+	QADD	r12,r12,r12					

+	

+	QADD	r3,r3,r3					

+	QADD	r4,r4,r4					

+	QADD	r11,r11,r11					

+	QADD	r12,r12,r12					

+	

+	QADD	r3,r3,r3					

+	QADD	r4,r4,r4					

+	QADD	r11,r11,r11					

+	QADD	r12,r12,r12					

+	

+	MOV	r2,#32768	

+	

+	QDADD	r3,r2,r3					

+	QDADD	r4,r2,r4					

+	QDADD	r11,r2,r11					

+	QDADD	r12,r2,r12					

+		

+	

+	MOV	r3,r3,asr #16

+	MOV	r4,r4,asr #16

+	MOV	r11,r11,asr #16

+	MOV	r12,r12,asr #16

+	

+	STRH	r3,[r0],#2

+	STRH	r4,[r0],#2

+	STRH	r11,[r0],#2

+	STRH	r12,[r0],#2

+	

+	MOV	r2,r14,asr #16

+	SUB	r14, r14, #0x10000

+	SUBS	r2,r2,#1

+	BNE	residu_loop	

+end:

+	LDMFD	r13!, {r8 -r12}	

+	LDMFD	r13!, {r4 -r12,pc}

+

+        @ENDFUNC

+        .END	 

+        

+	

+	  

+

+

diff --git a/media/libstagefright/codecs/amrwbenc/src/asm/ARMV5E/scale_sig_opt.s b/media/libstagefright/codecs/amrwbenc/src/asm/ARMV5E/scale_sig_opt.s
new file mode 100644
index 0000000..aa9f464
--- /dev/null
+++ b/media/libstagefright/codecs/amrwbenc/src/asm/ARMV5E/scale_sig_opt.s
@@ -0,0 +1,75 @@
+@/*

+@ ** Copyright 2003-2010, VisualOn, Inc.

+@ **

+@ ** Licensed under the Apache License, Version 2.0 (the "License");

+@ ** you may not use this file except in compliance with the License.

+@ ** You may obtain a copy of the License at

+@ **

+@ **     http://www.apache.org/licenses/LICENSE-2.0

+@ **

+@ ** Unless required by applicable law or agreed to in writing, software

+@ ** distributed under the License is distributed on an "AS IS" BASIS,

+@ ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

+@ ** See the License for the specific language governing permissions and

+@ ** limitations under the License.

+@ */

+@

+@void Scale_sig(

+@	       Word16 x[],                           /* (i/o) : signal to scale               */

+@	       Word16 lg,                            /* (i)   : size of x[]                   */

+@	       Word16 exp                            /* (i)   : exponent: x = round(x << exp) */

+@	       )

+@

+@r0 --- x[]

+@r1 --- lg

+@r2 --- exp

+

+          .section  .text

+	  .global   Scale_sig_opt

+

+Scale_sig_opt:

+

+         STMFD         r13!, {r4 - r12, r14}

+	 SUB           r3, r1, #1                  @i = lg - 1

+         CMP           r2, #0                      @Compare exp and 0

+	 RSB           r7, r2, #0                  @exp = -exp

+	 ADD           r10, r2, #16                @16 + exp

+         ADD           r4, r0, r3, LSL #1          @x[i] address

+	 MOV           r8, #0x7fffffff

+	 MOV           r9, #0x8000

+	 BLE           LOOP2

+	 

+LOOP1:

+

+         LDRSH          r5, [r4]                    @load x[i]

+         MOV           r12, r5, LSL r10

+	 TEQ           r5, r12, ASR r10

+	 EORNE         r12, r8, r5, ASR #31

+	 SUBS          r3, r3, #1

+	 QADD          r11, r12, r9

+	 MOV           r12, r11, ASR #16

+	 STRH          r12, [r4], #-2

+	 BGE           LOOP1

+         BL            The_end

+

+LOOP2:

+

+         LDRSH          r5, [r4]                   @load x[i]

+	 MOV           r6, r5, LSL #16            @L_tmp = x[i] << 16

+	 MOV           r5, r6, ASR r7             @L_tmp >>= exp

+	 QADD          r11, r5, r9

+	 MOV           r12, r11, ASR #16

+	 SUBS          r3, r3, #1

+	 STRH          r12, [r4], #-2

+	 BGE           LOOP2

+

+The_end:

+         LDMFD         r13!, {r4 - r12, r15}

+     

+         @ENDFUNC

+         .END	 

+        

+	

+	  

+

+

diff --git a/media/libstagefright/codecs/amrwbenc/src/asm/ARMV5E/syn_filt_opt.s b/media/libstagefright/codecs/amrwbenc/src/asm/ARMV5E/syn_filt_opt.s
new file mode 100644
index 0000000..e05e9e0
--- /dev/null
+++ b/media/libstagefright/codecs/amrwbenc/src/asm/ARMV5E/syn_filt_opt.s
@@ -0,0 +1,238 @@
+@/*

+@ ** Copyright 2003-2010, VisualOn, Inc.

+@ **

+@ ** Licensed under the Apache License, Version 2.0 (the "License");

+@ ** you may not use this file except in compliance with the License.

+@ ** You may obtain a copy of the License at

+@ **

+@ **     http://www.apache.org/licenses/LICENSE-2.0

+@ **

+@ ** Unless required by applicable law or agreed to in writing, software

+@ ** distributed under the License is distributed on an "AS IS" BASIS,

+@ ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

+@ ** See the License for the specific language governing permissions and

+@ ** limitations under the License.

+@ */

+@**********************************************************************/

+@void Syn_filt(

+@     Word16 a[],                           /* (i) Q12 : a[m+1] prediction coefficients           */

+@     Word16 x[],                           /* (i)     : input signal                             */

+@     Word16 y[],                           /* (o)     : output signal                            */

+@     Word16 mem[],                         /* (i/o)   : memory associated with this filtering.   */

+@)

+@***********************************************************************

+@ a[]    ---   r0

+@ x[]    ---   r1

+@ y[]    ---   r2

+@ mem[]  ---   r3

+@ m ---  16  lg --- 80  update --- 1

+

+          .section  .text

+	  .global   Syn_filt_asm

+          .extern   voAWB_Copy

+

+Syn_filt_asm:

+

+          STMFD   	r13!, {r4 - r12, r14} 

+          SUB           r13, r13, #700                   @ y_buf[L_FRAME16k + M16k]

+   

+          MOV           r4, r3                           @ copy mem[] address

+          MOV           r5, r13                          @ copy yy = y_buf address

+

+          @ for(i = 0@ i < m@ i++)

+          @{

+          @    *yy++ = mem[i]@

+          @} 

+

+          LDRH          r6,  [r4], #2          

+          LDRH          r7,  [r4], #2

+          LDRH          r8,  [r4], #2

+          LDRH          r9,  [r4], #2

+          LDRH          r10, [r4], #2

+          LDRH          r11, [r4], #2

+          LDRH          r12, [r4], #2

+          LDRH          r14, [r4], #2

+

+          STRH          r6,  [r5], #2

+          STRH          r7,  [r5], #2

+          STRH          r8,  [r5], #2

+          STRH          r9,  [r5], #2

+          STRH          r10, [r5], #2

+          STRH          r11, [r5], #2

+          STRH          r12, [r5], #2

+          STRH          r14, [r5], #2

+

+          LDRH          r6,  [r4], #2          

+          LDRH          r7,  [r4], #2

+          LDRH          r8,  [r4], #2

+          LDRH          r9,  [r4], #2

+          LDRH          r10, [r4], #2

+          LDRH          r11, [r4], #2

+          LDRH          r12, [r4], #2

+          LDRH          r14, [r4], #2

+

+          STRH          r6,  [r5], #2

+          STRH          r7,  [r5], #2

+          STRH          r8,  [r5], #2

+          STRH          r9,  [r5], #2

+          STRH          r10, [r5], #2

+          STRH          r11, [r5], #2

+          STRH          r12, [r5], #2

+          STRH          r14, [r5], #2

+

+          LDRSH         r5, [r0]                         @ load a[0]

+          MOV           r8, #0                           @ i = 0

+          MOV           r5, r5, ASR #1                   @ a0 = a[0] >> 1

+          @MOV           r4, r13

+          @ load all a[]

+

+          LDR           r14, =0xffff

+          LDRSH         r6, [r0, #2]                     @ load a[1]

+          LDRSH         r7, [r0, #4]                     @ load a[2]

+          LDRSH         r9, [r0, #6]                     @ load a[3]

+          LDRSH         r11,[r0, #8]                     @ load a[4]

+          AND           r6, r6, r14

+          AND           r9, r9, r14          

+          ORR           r10, r6, r7, LSL #16             @ -a[2] -- -a[1]

+          ORR           r12, r9, r11, LSL #16            @ -a[4] -- -a[3]

+          STR           r10, [r13, #-4]

+          STR           r12, [r13, #-8]

+          

+          LDRSH         r6, [r0, #10]                    @ load a[5]

+          LDRSH         r7, [r0, #12]                    @ load a[6]

+          LDRSH         r9, [r0, #14]                    @ load a[7]

+          LDRSH         r11,[r0, #16]                    @ load a[8]

+          AND           r6, r6, r14

+          AND           r9, r9, r14          

+          ORR           r10, r6, r7, LSL #16             @ -a[6] -- -a[5]

+          ORR           r12, r9, r11, LSL #16            @ -a[8] -- -a[7]

+          STR           r10, [r13, #-12]

+          STR           r12, [r13, #-16]          

+           

+          LDRSH         r6, [r0, #18]                    @ load a[9]

+          LDRSH         r7, [r0, #20]                    @ load a[10]

+          LDRSH         r9, [r0, #22]                    @ load a[11]

+          LDRSH         r11,[r0, #24]                    @ load a[12]

+          AND           r6, r6, r14

+          AND           r9, r9, r14          

+          ORR           r10, r6, r7, LSL #16             @ -a[10] -- -a[9]

+          ORR           r12, r9, r11, LSL #16            @ -a[12] -- -a[11]

+          STR           r10, [r13, #-20]

+          STR           r12, [r13, #-24]    

+

+          LDRSH         r6, [r0, #26]                    @ load a[13]

+          LDRSH         r7, [r0, #28]                    @ load a[14]

+          LDRSH         r9, [r0, #30]                    @ load a[15]

+          LDRSH         r11,[r0, #32]                    @ load a[16]

+          AND           r6, r6, r14

+          AND           r9, r9, r14          

+          ORR           r10, r6, r7, LSL #16             @ -a[14] -- -a[13]

+          ORR           r12, r9, r11, LSL #16            @ -a[16] -- -a[15]

+          STR           r10, [r13, #-28]

+          STR           r12, [r13, #-32]                

+                     

+          ADD           r4, r13, #32

+LOOP:

+          LDRSH         r6,  [r1], #2                    @ load x[i]

+          ADD           r10, r4, r8, LSL #1              @ temp_p = yy + i

+

+          MUL           r0, r5, r6                      @ L_tmp = x[i] * a0

+          @ for(j = 1@ j <= m, j+=8)

+          LDR           r7,  [r13, #-4]                  @ -a[2]  -a[1]

+          LDRSH         r9,  [r10, #-2]                  @ *(temp_p - 1)

+          LDRSH         r12, [r10, #-4]                  @ *(temp_p - 2)

+

+

+          SMULBB        r14, r9, r7                      @ -a[1] * (*(temp_p -1))

+

+          LDRSH         r6,  [r10, #-6]                  @ *(temp_p - 3)

+

+          SMLABT        r14, r12, r7, r14                @ -a[2] * (*(temp_p - 2))

+

+          LDR           r7,  [r13, #-8]                  @ -a[4] -a[3]

+          LDRSH         r11, [r10, #-8]                  @ *(temp_p - 4)

+

+          SMLABB        r14, r6, r7, r14                 @ -a[3] * (*(temp_p -3))

+

+          LDRSH         r9,  [r10, #-10]                 @ *(temp_p - 5)

+   

+          SMLABT        r14, r11, r7, r14                @ -a[4] * (*(temp_p -4))        

+

+          LDR           r7,  [r13, #-12]                 @ -a[6]  -a[5]

+          LDRSH         r12, [r10, #-12]                 @ *(temp_p - 6)

+

+          SMLABB        r14, r9, r7, r14                 @ -a[5] * (*(temp_p -5))

+

+          LDRSH         r6,  [r10, #-14]                 @ *(temp_p - 7)

+

+          SMLABT        r14, r12, r7, r14                @ -a[6] * (*(temp_p - 6))

+

+          LDR           r7,  [r13, #-16]                 @ -a[8] -a[7]

+          LDRSH         r11, [r10, #-16]                 @ *(temp_p - 8)

+         

+          SMLABB        r14, r6, r7, r14                 @ -a[7] * (*(temp_p -7))

+

+          LDRSH         r9,  [r10, #-18]                 @ *(temp_p - 9)

+

+          SMLABT        r14, r11, r7, r14                @ -a[8] * (*(temp_p -8))          

+ 

+          LDR           r7,  [r13, #-20]                 @ -a[10]  -a[9]

+          LDRSH         r12, [r10, #-20]                 @ *(temp_p - 10)

+

+          SMLABB        r14, r9, r7, r14                 @ -a[9] * (*(temp_p -9))

+

+          LDRSH         r6,  [r10, #-22]                 @ *(temp_p - 11)

+

+          SMLABT        r14, r12, r7, r14                @ -a[10] * (*(temp_p - 10))

+

+          LDR           r7,  [r13, #-24]                 @ -a[12] -a[11]

+          LDRSH         r11, [r10, #-24]                 @ *(temp_p - 12)

+

+          SMLABB        r14, r6, r7, r14                 @ -a[11] * (*(temp_p -11))

+

+          LDRSH         r9,  [r10, #-26]                 @ *(temp_p - 13)

+

+          SMLABT        r14, r11, r7, r14                @ -a[12] * (*(temp_p -12))           

+

+          LDR           r7,  [r13, #-28]                 @ -a[14] -a[13]

+          LDRSH         r12, [r10, #-28]                 @ *(temp_p - 14)

+ 

+          SMLABB        r14, r9, r7, r14                 @ -a[13] * (*(temp_p -13))

+

+          LDRSH         r6,  [r10, #-30]                 @ *(temp_p - 15)

+

+          SMLABT        r14, r12, r7, r14                @ -a[14] * (*(temp_p - 14))

+

+          LDR           r7,  [r13, #-32]                 @ -a[16] -a[15]

+          LDRSH         r11, [r10, #-32]                 @ *(temp_p - 16)

+

+          SMLABB        r14, r6, r7, r14                 @ -a[15] * (*(temp_p -15))

+

+          SMLABT        r14, r11, r7, r14                @ -a[16] * (*(temp_p -16))

+

+          RSB           r14, r14, r0

+                                  

+          MOV           r7, r14, LSL #4                  @ L_tmp <<=4

+          ADD           r8, r8, #1

+          ADD           r14, r7, #0x8000                 

+          MOV           r7, r14, ASR #16                 @ (L_tmp + 0x8000) >> 16

+          CMP           r8, #80

+          STRH          r7, [r10]                        @ yy[i]

+          STRH          r7, [r2], #2                     @ y[i]

+          BLT           LOOP

+ 

+          @ update mem[]

+          ADD           r5, r13, #160                    @ yy[64] address

+          MOV           r1, r3

+          MOV           r0, r5

+          MOV           r2, #16

+          BL            voAWB_Copy          

+

+Syn_filt_asm_end:

+ 

+          ADD           r13, r13, #700		     

+          LDMFD   	r13!, {r4 - r12, r15} 

+          @ENDFUNC

+          .END

+ 

+

diff --git a/media/libstagefright/codecs/amrwbenc/src/asm/ARMV7/Deemph_32_neon.s b/media/libstagefright/codecs/amrwbenc/src/asm/ARMV7/Deemph_32_neon.s
new file mode 100644
index 0000000..acb60c3
--- /dev/null
+++ b/media/libstagefright/codecs/amrwbenc/src/asm/ARMV7/Deemph_32_neon.s
@@ -0,0 +1,102 @@
+@/*

+@ ** Copyright 2003-2010, VisualOn, Inc.

+@ **

+@ ** Licensed under the Apache License, Version 2.0 (the "License");

+@ ** you may not use this file except in compliance with the License.

+@ ** You may obtain a copy of the License at

+@ **

+@ **     http://www.apache.org/licenses/LICENSE-2.0

+@ **

+@ ** Unless required by applicable law or agreed to in writing, software

+@ ** distributed under the License is distributed on an "AS IS" BASIS,

+@ ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

+@ ** See the License for the specific language governing permissions and

+@ ** limitations under the License.

+@ */

+@

+@void Deemph_32(

+@     Word16 x_hi[],                        /* (i)     : input signal (bit31..16) */

+@     Word16 x_lo[],                        /* (i)     : input signal (bit15..4)  */

+@     Word16 y[],                           /* (o)     : output signal (x16)      */

+@     Word16 mu,                            /* (i) Q15 : deemphasis factor        */

+@     Word16 L,                             /* (i)     : vector size              */

+@     Word16 * mem                          /* (i/o)   : memory (y[-1])           */

+@     )

+

+@x_hi     RN      R0

+@x_lo     RN      R1

+@y[]      RN      R2

+@*mem     RN      R3

+

+           .section  .text

+           .global   Deemph_32_asm

+	   

+Deemph_32_asm:

+

+           STMFD   	r13!, {r4 - r12, r14} 

+	   MOV          r4, #2                   @i=0

+	   LDRSH        r6, [r0], #2             @load x_hi[0]

+	   LDRSH        r7, [r1], #2             @load x_lo[0]

+	   LDR          r5, =22282               @r5---mu

+	   MOV          r11, #0x8000

+

+           @y[0]

+	   MOV          r10, r6, LSL #16         @L_tmp = x_hi[0]<<16

+	   MOV          r8,  r5, ASR #1          @fac = mu >> 1

+	   LDR          r5,  [r3]

+	   ADD          r12, r10, r7, LSL #4     @L_tmp += x_lo[0] << 4

+	   MOV          r10, r12, LSL #3         @L_tmp <<= 3

+	   MUL          r9, r5, r8

+	   LDRSH        r6, [r0], #2             @load x_hi[1] 

+	   QDADD        r10, r10, r9

+	   LDRSH        r7, [r1], #2             @load x_lo[1]  

+	   MOV          r12, r10, LSL #1         @L_tmp = L_mac(L_tmp, *mem, fac)

+	   QADD         r10, r12, r11

+	   MOV          r14, r10, ASR #16        @y[0] = round(L_tmp)

+

+

+	   MOV          r10, r6, LSL #16

+	   ADD          r12, r10, r7, LSL #4

+           STRH         r14, [r2], #2            @update y[0]

+	   MOV          r10, r12, LSL #3

+	   MUL          r9, r14, r8

+	   QDADD        r10, r10, r9

+	   MOV          r12, r10, LSL #1

+	   QADD         r10, r12, r11

+	   MOV          r14, r10, ASR #16        @y[1] = round(L_tmp)

+

+LOOP:

+           LDRSH        r6, [r0], #2             @load x_hi[]

+	   LDRSH        r7, [r1], #2

+	   STRH         r14, [r2], #2

+	   MOV          r10, r6, LSL #16

+	   ADD          r12, r10, r7, LSL #4

+	   MUL          r9, r14, r8

+	   MOV          r10, r12, LSL #3

+	   QDADD        r10, r10, r9

+           LDRSH        r6, [r0], #2             @load x_hi[]

+	   MOV          r12, r10, LSL #1

+	   QADD         r10, r12, r11

+	   LDRSH        r7, [r1], #2

+	   MOV          r14, r10, ASR #16

+

+	   MOV          r10, r6, LSL #16

+	   ADD          r12, r10, r7, LSL #4

+	   STRH         r14, [r2], #2

+	   MUL          r9, r14, r8

+	   MOV          r10, r12, LSL #3

+	   QDADD        r10, r10, r9

+           ADD          r4, r4, #2

+	   MOV          r12, r10, LSL #1

+	   QADD         r10, r12, r11

+           CMP          r4, #64

+	   MOV          r14, r10, ASR #16

+

+           BLT          LOOP

+           STR          r14, [r3]

+           STRH         r14, [r2]	   

+

+           LDMFD   	r13!, {r4 - r12, r15} 

+

+	   .END

+

diff --git a/media/libstagefright/codecs/amrwbenc/src/asm/ARMV7/Dot_p_neon.s b/media/libstagefright/codecs/amrwbenc/src/asm/ARMV7/Dot_p_neon.s
new file mode 100644
index 0000000..07ca344
--- /dev/null
+++ b/media/libstagefright/codecs/amrwbenc/src/asm/ARMV7/Dot_p_neon.s
@@ -0,0 +1,127 @@
+@/*

+@ ** Copyright 2003-2010, VisualOn, Inc.

+@ **

+@ ** Licensed under the Apache License, Version 2.0 (the "License");

+@ ** you may not use this file except in compliance with the License.

+@ ** You may obtain a copy of the License at

+@ **

+@ **     http://www.apache.org/licenses/LICENSE-2.0

+@ **

+@ ** Unless required by applicable law or agreed to in writing, software

+@ ** distributed under the License is distributed on an "AS IS" BASIS,

+@ ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

+@ ** See the License for the specific language governing permissions and

+@ ** limitations under the License.

+@ */

+@

+@**********************************************************************/

+@Word32 Dot_product12(                      /* (o) Q31: normalized result (1 < val <= -1) */

+@       Word16 x[],                           /* (i) 12bits: x vector                       */

+@       Word16 y[],                           /* (i) 12bits: y vector                       */

+@       Word16 lg,                            /* (i)    : vector length                     */

+@       Word16 * exp                          /* (o)    : exponent of result (0..+30)       */

+@)

+@************************************************************************

+@  x[]   ---  r0

+@  y[]   ---  r1

+@  lg    ---  r2

+@  *exp  ---  r3

+

+          .section   .text

+          .global    Dot_product12_asm

+

+Dot_product12_asm:

+

+          STMFD   	    r13!, {r4 - r12, r14}

+	  CMP               r0, r1

+	  BEQ               LOOP_EQ

+

+          VLD1.S16          {Q0, Q1}, [r0]!               @load 16 Word16 x[]

+          VLD1.S16          {Q2, Q3}, [r0]!               @load 16 Word16 x[]

+          VLD1.S16          {Q4, Q5}, [r0]!               @load 16 Word16 x[]

+          VLD1.S16          {Q6, Q7}, [r0]!               @load 16 Word16 x[]

+	  VLD1.S16          {Q8, Q9}, [r1]!               @load 16 Word16 y[]

+	  VLD1.S16          {Q10, Q11}, [r1]!             @load 16 Word16 y[]

+	  VLD1.S16          {Q12, Q13}, [r1]!             @load 16 Word16 y[]

+

+          VMULL.S16         Q15, D16, D0

+          VMLAL.S16         Q15, D17, D1               

+          VMLAL.S16         Q15, D18, D2

+          VMLAL.S16         Q15, D19, D3

+	  VLD1.S16          {Q0, Q1}, [r1]!               @load 16 Word16 y[]   

+          VMLAL.S16         Q15, D20, D4       

+          VMLAL.S16         Q15, D21, D5

+          VMLAL.S16         Q15, D22, D6

+          VMLAL.S16         Q15, D23, D7                                       

+          VMLAL.S16         Q15, D24, D8

+          VMLAL.S16         Q15, D25, D9

+          VMLAL.S16         Q15, D26, D10

+          VMLAL.S16         Q15, D27, D11

+          VMLAL.S16         Q15, D0, D12

+          VMLAL.S16         Q15, D1, D13

+          VMLAL.S16         Q15, D2, D14

+          VMLAL.S16         Q15, D3, D15

+

+          CMP               r2, #64

+          BEQ               Lable1

+          VLD1.S16          {Q0, Q1}, [r0]!               @load 16 Word16 x[]  

+	  VLD1.S16          {Q2, Q3}, [r1]! 

+          VMLAL.S16         Q15, D4, D0             

+          VMLAL.S16         Q15, D5, D1

+          VMLAL.S16         Q15, D6, D2

+          VMLAL.S16         Q15, D7, D3

+	  BL                Lable1

+

+LOOP_EQ:

+          VLD1.S16          {Q0, Q1}, [r0]!

+	  VLD1.S16          {Q2, Q3}, [r0]!

+	  VLD1.S16          {Q4, Q5}, [r0]!

+	  VLD1.S16          {Q6, Q7}, [r0]!

+	  VMULL.S16         Q15, D0, D0

+	  VMLAL.S16         Q15, D1, D1

+	  VMLAL.S16         Q15, D2, D2

+	  VMLAL.S16         Q15, D3, D3

+	  VMLAL.S16         Q15, D4, D4

+	  VMLAL.S16         Q15, D5, D5

+	  VMLAL.S16         Q15, D6, D6

+	  VMLAL.S16         Q15, D7, D7

+	  VMLAL.S16         Q15, D8, D8

+	  VMLAL.S16         Q15, D9, D9

+	  VMLAL.S16         Q15, D10, D10

+	  VMLAL.S16         Q15, D11, D11

+	  VMLAL.S16         Q15, D12, D12

+	  VMLAL.S16         Q15, D13, D13

+	  VMLAL.S16         Q15, D14, D14

+	  VMLAL.S16         Q15, D15, D15

+

+	  CMP               r2, #64

+	  BEQ               Lable1

+	  VLD1.S16          {Q0, Q1}, [r0]!

+	  VMLAL.S16         Q15, D0, D0

+	  VMLAL.S16         Q15, D1, D1

+	  VMLAL.S16         Q15, D2, D2

+	  VMLAL.S16         Q15, D3, D3

+

+Lable1: 

+

+          VQADD.S32         D30, D30, D31

+          VPADD.S32         D30, D30, D30

+          VMOV.S32          r12, D30[0]        

+

+	  ADD               r12, r12, r12

+          ADD               r12, r12, #1                         @ L_sum = (L_sum << 1)  + 1

+	  MOV               r4, r12

+	  CMP               r12, #0

+	  RSBLT             r4, r12, #0

+          CLZ               r10, r4

+          SUB               r10, r10, #1                         @ sft = norm_l(L_sum)

+          MOV               r0, r12, LSL r10                     @ L_sum = L_sum << sft

+          RSB               r11, r10, #30                        @ *exp = 30 - sft

+          STRH              r11, [r3]                     

+

+Dot_product12_end:

+		     

+          LDMFD   	    r13!, {r4 - r12, r15} 

+

+          .END

+

diff --git a/media/libstagefright/codecs/amrwbenc/src/asm/ARMV7/Filt_6k_7k_neon.s b/media/libstagefright/codecs/amrwbenc/src/asm/ARMV7/Filt_6k_7k_neon.s
new file mode 100644
index 0000000..1880024
--- /dev/null
+++ b/media/libstagefright/codecs/amrwbenc/src/asm/ARMV7/Filt_6k_7k_neon.s
@@ -0,0 +1,228 @@
+@/*

+@ ** Copyright 2003-2010, VisualOn, Inc.

+@ **

+@ ** Licensed under the Apache License, Version 2.0 (the "License");

+@ ** you may not use this file except in compliance with the License.

+@ ** You may obtain a copy of the License at

+@ **

+@ **     http://www.apache.org/licenses/LICENSE-2.0

+@ **

+@ ** Unless required by applicable law or agreed to in writing, software

+@ ** distributed under the License is distributed on an "AS IS" BASIS,

+@ ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

+@ ** See the License for the specific language governing permissions and

+@ ** limitations under the License.

+@ */

+@                             

+@**********************************************************************/

+@void Filt_6k_7k(

+@     Word16 signal[],                      /* input:  signal                  */

+@     Word16 lg,                            /* input:  length of input         */

+@     Word16 mem[]                          /* in/out: memory (size=30)        */

+@)

+@***********************************************************************

+@ r0    ---  signal[]

+@ r1    ---  lg

+@ r2    ---  mem[] 

+

+          .section  .text

+          .global   Filt_6k_7k_asm

+          .extern   fir_6k_7k

+

+Filt_6k_7k_asm:

+

+          STMFD   		r13!, {r0 - r12, r14} 

+          SUB    		r13, r13, #240              @ x[L_SUBFR16k + (L_FIR - 1)]

+          MOV     		r8, r0                      @ copy signal[] address

+          MOV     		r5, r2                      @ copy mem[] address

+

+          MOV     		r0, r2

+          MOV     		r1, r13

+

+	  VLD1.S16              {D0, D1, D2, D3}, [r0]!

+	  VLD1.S16              {D4, D5, D6, D7}, [r0]!

+

+	  VST1.S16              {D0, D1, D2, D3}, [r1]!

+	  VST1.S16              {D4, D5, D6}, [r1]!

+	  VST1.S16              D7[0], [r1]!

+	  VST1.S16              D7[1], [r1]!

+

+

+

+          LDR     		r10, Lable1                 @ get fir_7k address     

+          MOV                   r3, r8                      @ change myMemCopy to Copy, due to Copy will change r3 content

+          ADD     	    	r6, r13, #60                @ get x[L_FIR - 1] address

+          MOV           	r7, r3                      @ get signal[i]

+          @for (i = lg - 1@ i >= 0@ i--)

+          @{

+          @     x[i + L_FIR - 1] = signal[i] >> 2@

+          @}

+	  VLD1.S16              {Q0, Q1}, [r7]!		    @ signal[0]  ~ signal[15]

+	  VLD1.S16              {Q2, Q3}, [r7]!             @ signal[16] ~ signal[31]

+          VLD1.S16              {Q4, Q5}, [r7]!             @ signal[32] ~ signal[47]

+	  VLD1.S16              {Q6, Q7}, [r7]!             @ signal[48] ~ signal[63]

+	  VLD1.S16              {Q8, Q9}, [r7]!             @ signal[64] ~ signal[79]

+	  VSHR.S16              Q10, Q0, #2

+          VSHR.S16              Q11, Q1, #2

+          VSHR.S16              Q12, Q2, #2

+	  VSHR.S16              Q13, Q3, #2

+	  VST1.S16              {Q10, Q11}, [r6]!

+	  VSHR.S16              Q0,  Q4, #2

+	  VSHR.S16              Q1,  Q5, #2

+	  VSHR.S16              Q10, Q6, #2

+	  VSHR.S16              Q11, Q7, #2

+	  VSHR.S16              Q2,  Q8, #2

+	  VSHR.S16              Q3,  Q9, #2

+	  VST1.S16              {Q12, Q13}, [r6]!

+	  VST1.S16              {Q0, Q1}, [r6]!

+	  VST1.S16              {Q10, Q11}, [r6]!

+	  VST1.S16              {Q2, Q3}, [r6]!

+

+	  MOV                   r12, r5

+          @STR     		r5, [sp, #-4]               @ PUSH  r5 to stack

+          @ not use registers: r4, r10, r12, r14, r5

+          MOV     		r4, r13 

+          MOV     		r5, #0                      @ i = 0    

+         

+          @ r4 --- x[i], r10 ---- fir_6k_7k

+          VLD1.S16              {Q0, Q1}, [r10]!           @fir_6k_7k[0]  ~ fir_6k_7k[15]

+	  VLD1.S16              {Q2, Q3}, [r10]!           @fir_6k_7k[16] ~ fir_6k_7k[31]

+          VMOV.S16              D7[3], r5                        @set fir_6k_7K = 0

+

+	  VLD1.S16              {Q4, Q5}, [r4]!            @x[0]  ~ x[15]

+	  VLD1.S16              {Q6, Q7}, [r4]!            @x[16] ~ X[31]

+	  VLD1.S16              {Q8}, [r4]! 

+          VMOV.S16              Q15, #0	  

+          

+LOOP_6K7K:

+

+          VMULL.S16             Q9,D8,D0[0]                 

+          VMULL.S16             Q10,D9,D1[0] 

+          VMULL.S16             Q11,D9,D0[0]                 

+          VMULL.S16             Q12,D10,D1[0]

+          VEXT.8                Q4,Q4,Q5,#2

+          VMLAL.S16             Q9,D10,D2[0]

+          VMLAL.S16             Q10,D11,D3[0]

+          VMLAL.S16             Q11,D11,D2[0]

+          VMLAL.S16             Q12,D12,D3[0]    

+          VEXT.8                Q5,Q5,Q6,#2

+          VMLAL.S16             Q9,D12,D4[0]

+          VMLAL.S16             Q10,D13,D5[0]

+          VMLAL.S16             Q11,D13,D4[0]

+          VMLAL.S16             Q12,D14,D5[0]

+          VEXT.8                Q6,Q6,Q7,#2

+          VMLAL.S16             Q9,D14,D6[0]

+          VMLAL.S16             Q10,D15,D7[0]

+          VMLAL.S16             Q11,D15,D6[0]

+	  VMLAL.S16             Q12,D16,D7[0]

+	  VEXT.8  		Q7,Q7,Q8,#2 

+

+	  VMLAL.S16 		Q9,D8,D0[1]                

+	  VMLAL.S16     	Q10,D9,D1[1]

+	  VEXT.8 		Q8,Q8,Q15,#2 

+	  VMLAL.S16 		Q11,D9,D0[1]                

+	  VMLAL.S16 		Q12,D10,D1[1]

+	  VEXT.8  		Q4,Q4,Q5,#2

+	  VMLAL.S16 		Q9,D10,D2[1]

+	  VMLAL.S16 		Q10,D11,D3[1]

+	  VMLAL.S16 		Q11,D11,D2[1]

+	  VMLAL.S16 		Q12,D12,D3[1]    

+	  VEXT.8  		Q5,Q5,Q6,#2

+	  VMLAL.S16 		Q9,D12,D4[1]

+	  VMLAL.S16 		Q10,D13,D5[1]

+	  VMLAL.S16 		Q11,D13,D4[1]

+	  VMLAL.S16 		Q12,D14,D5[1]

+	  VEXT.8  		Q6,Q6,Q7,#2

+	  VMLAL.S16 		Q9,D14,D6[1]

+	  VMLAL.S16 		Q10,D15,D7[1]

+	  VMLAL.S16 		Q11,D15,D6[1]

+	  VMLAL.S16 		Q12,D16,D7[1]

+	  VEXT.8  		Q7,Q7,Q8,#2 

+

+	  VMLAL.S16 		Q9,D8,D0[2]           

+	  VMLAL.S16 		Q10,D9,D1[2]

+	  VEXT.8 		Q8,Q8,Q15,#2 

+	  VMLAL.S16 		Q11,D9,D0[2]           

+	  VMLAL.S16 		Q12,D10,D1[2]

+	  VEXT.8  		Q4,Q4,Q5,#2

+	  VMLAL.S16 		Q9,D10,D2[2]

+	  VMLAL.S16 		Q10,D11,D3[2]

+	  VMLAL.S16 		Q11,D11,D2[2]

+	  VMLAL.S16 		Q12,D12,D3[2]    

+	  VEXT.8  		Q5,Q5,Q6,#2

+	  VMLAL.S16 		Q9,D12,D4[2]

+	  VMLAL.S16 		Q10,D13,D5[2]

+	  VMLAL.S16 		Q11,D13,D4[2]

+	  VMLAL.S16 		Q12,D14,D5[2]

+	  VEXT.8  		Q6,Q6,Q7,#2

+	  VMLAL.S16 		Q9,D14,D6[2]

+	  VMLAL.S16 		Q10,D15,D7[2]

+	  VMLAL.S16 		Q11,D15,D6[2]

+	  VMLAL.S16 		Q12,D16,D7[2]

+	  VEXT.8  		Q7,Q7,Q8,#2 

+

+	  VMLAL.S16 		Q9,D8,D0[3]              

+	  VMLAL.S16 		Q10,D9,D1[3]

+	  VEXT.8 		Q8,Q8,Q15,#2 

+	  VMLAL.S16 		Q11,D9,D0[3]              

+	  VMLAL.S16 		Q12,D10,D1[3]

+	  VEXT.8  		Q4,Q4,Q5,#2

+	  VMLAL.S16 		Q9,D10,D2[3]

+	  VMLAL.S16 		Q10,D11,D3[3]

+	  VMLAL.S16 		Q11,D11,D2[3]

+	  VMLAL.S16 		Q12,D12,D3[3]    

+	  VEXT.8  		Q5,Q5,Q6,#2

+	  VMLAL.S16 		Q9,D12,D4[3]

+	  VMLAL.S16 		Q10,D13,D5[3]

+	  VMLAL.S16 		Q11,D13,D4[3]

+	  VMLAL.S16 		Q12,D14,D5[3]

+	  VEXT.8  		Q6,Q6,Q7,#2

+	  VMLAL.S16 		Q9,D14,D6[3]

+	  VMLAL.S16 		Q10,D15,D7[3]

+	  VMLAL.S16 		Q11,D15,D6[3]

+	  VMLAL.S16 		Q12,D16,D7[3]

+	  VEXT.8 		Q7,Q7,Q8,#2     

+

+	  VMOV.S16  		D8,D9

+	  VEXT.8 		Q8,Q8,Q15,#2 

+	  VMOV.S16  		D9,D10

+	  VADD.S32  		Q9,Q9,Q10

+	  VMOV.S16  		D10,D11

+	  VMOV.S16  		D11,D12

+	  VADD.S32  		Q11,Q11,Q12

+	  VMOV.S16  		D12,D13

+	  VQRSHRN.S32 		D28,Q9,#15

+	  VMOV.S16  		D13,D14

+	  VMOV.S16  		D14,D15

+	  VQRSHRN.S32 		D29,Q11,#15

+	  VMOV.S16  		D15,D16

+

+	  VLD1.S16  		{Q8},[r4]!

+	  ADD                   r5, r5, #8

+	  CMP   		r5, #80

+	  VST1.S16  		{D28,D29},[r3]!

+	  BLT     		LOOP_6K7K

+

+          ADD     		r0, r13, #160               @x + lg

+	  MOV                   r1, r12

+	  @LDR     		r1, [sp, #-4]               @mem address

+

+	  VLD1.S16              {D0, D1, D2, D3}, [r0]!

+	  VLD1.S16              {D4, D5, D6, D7}, [r0]!

+

+	  VST1.S16              {D0, D1, D2, D3}, [r1]!

+	  VST1.S16              {D4, D5, D6}, [r1]!

+	  VST1.S16              D7[0], [r1]!

+	  VST1.S16              D7[1], [r1]!

+                    

+Filt_6k_7k_end:

+

+          ADD     		r13, r13, #240  

+          LDMFD   		r13!, {r0 - r12, r15} 

+ 

+Lable1:

+          .word   		fir_6k_7k

+          @ENDFUNC

+          .END

+

+

diff --git a/media/libstagefright/codecs/amrwbenc/src/asm/ARMV7/Norm_Corr_neon.s b/media/libstagefright/codecs/amrwbenc/src/asm/ARMV7/Norm_Corr_neon.s
new file mode 100644
index 0000000..60e9ade
--- /dev/null
+++ b/media/libstagefright/codecs/amrwbenc/src/asm/ARMV7/Norm_Corr_neon.s
@@ -0,0 +1,270 @@
+@/*
+@ ** Copyright 2003-2010, VisualOn, Inc.
+@ **
+@ ** Licensed under the Apache License, Version 2.0 (the "License");
+@ ** you may not use this file except in compliance with the License.
+@ ** You may obtain a copy of the License at
+@ **
+@ **     http://www.apache.org/licenses/LICENSE-2.0
+@ **
+@ ** Unless required by applicable law or agreed to in writing, software
+@ ** distributed under the License is distributed on an "AS IS" BASIS,
+@ ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+@ ** See the License for the specific language governing permissions and
+@ ** limitations under the License.
+@ */
+@
+@static void Norm_Corr (Word16 exc[],                    /* (i)     : excitation buffer          */
+@                       Word16 xn[],                     /* (i)     : target vector              */
+@                       Word16 h[],                      /* (i) Q15 : impulse response of synth/wgt filters */
+@                       Word16 L_subfr,                  /* (i)     : sub-frame length */
+@                       Word16 t_min,                    /* (i)     : minimum value of pitch lag.   */
+@                       Word16 t_max,                    /* (i)     : maximum value of pitch lag.   */
+@                       Word16 corr_norm[])              /* (o) Q15 : normalized correlation    */
+@
+
+@ r0 --- exc[]
+@ r1 --- xn[]
+@ r2 --- h[]
+@ r3 --- L_subfr
+@ r4 --- t_min
+@ r5 --- t_max
+@ r6 --- corr_norm[]
+
+
+	.section  .text
+        .global    Norm_corr_asm 
+        .extern    Convolve_asm
+        .extern    Isqrt_n
+@******************************
+@ constant
+@******************************
+.equ    EXC               , 0
+.equ    XN                , 4
+.equ    H                 , 8
+.equ    L_SUBFR           , 12
+.equ    voSTACK           , 172
+.equ    T_MIN             , 212
+.equ    T_MAX             , 216
+.equ    CORR_NORM         , 220
+                  
+Norm_corr_asm:
+
+        STMFD          r13!, {r4 - r12, r14}  
+        SUB            r13, r13, #voSTACK
+  
+        ADD            r8, r13, #20                 @get the excf[L_SUBFR]
+        LDR            r4, [r13, #T_MIN]            @get t_min
+        RSB            r11, r4, #0                  @k = -t_min
+        ADD            r5, r0, r11, LSL #1          @get the &exc[k]   
+        
+        @transfer Convolve function
+        STMFD          sp!, {r0 - r3}
+        MOV            r0, r5
+        MOV            r1, r2
+        MOV            r2, r8                       @r2 --- excf[]
+        BL             Convolve_asm
+        LDMFD          sp!, {r0 - r3}
+
+        @ r8 --- excf[]
+
+	MOV            r14, r1                       @copy xn[] address                      
+        MOV            r7, #1
+	VLD1.S16       {Q0, Q1}, [r14]!
+	VLD1.S16       {Q2, Q3}, [r14]!
+	VLD1.S16       {Q4, Q5}, [r14]!
+	VLD1.S16       {Q6, Q7}, [r14]!
+
+        VMULL.S16      Q10, D0, D0
+        VMLAL.S16      Q10, D1, D1
+        VMLAL.S16      Q10, D2, D2
+        VMLAL.S16      Q10, D3, D3
+        VMLAL.S16      Q10, D4, D4
+        VMLAL.S16      Q10, D5, D5
+        VMLAL.S16      Q10, D6, D6
+        VMLAL.S16      Q10, D7, D7
+        VMLAL.S16      Q10, D8, D8
+        VMLAL.S16      Q10, D9, D9
+	VMLAL.S16      Q10, D10, D10
+	VMLAL.S16      Q10, D11, D11
+	VMLAL.S16      Q10, D12, D12
+	VMLAL.S16      Q10, D13, D13
+	VMLAL.S16      Q10, D14, D14
+	VMLAL.S16      Q10, D15, D15
+
+        VQADD.S32      D20, D20, D21
+        VMOV.S32       r9,  D20[0]
+        VMOV.S32       r10, D20[1]
+        QADD           r6, r9, r10 
+	QADD           r6, r6, r6
+        QADD           r9, r6, r7                   @L_tmp = (L_tmp << 1) + 1;
+	CLZ            r7, r9
+	SUB            r6, r7, #1                   @exp = norm_l(L_tmp)
+        RSB            r7, r6, #32                  @exp = 32 - exp
+	MOV            r6, r7, ASR #1         
+	RSB            r7, r6, #0                   @scale = -(exp >> 1)
+	
+        @loop for every possible period
+	@for(t = t_min@ t <= t_max@ t++)
+	@r7 --- scale r4 --- t_min r8 --- excf[]
+
+LOOPFOR:	
+	ADD            r14, r13, #20                @copy of excf[]
+	MOV            r12, r1                      @copy of xn[]
+	MOV            r8, #0x8000
+
+        VLD1.S16       {Q0, Q1}, [r14]!                 @ load 16 excf[]
+        VLD1.S16       {Q2, Q3}, [r14]!                 @ load 16 excf[]       
+        VLD1.S16       {Q4, Q5}, [r12]!                 @ load 16 x[]
+	VLD1.S16       {Q6, Q7}, [r12]!                 @ load 16 x[]
+        VMULL.S16    Q10, D0, D0                      @L_tmp1 += excf[] * excf[]
+        VMULL.S16    Q11, D0, D8                      @L_tmp  += x[] * excf[]                   
+        VMLAL.S16    Q10, D1, D1
+        VMLAL.S16    Q11, D1, D9
+        VMLAL.S16    Q10, D2, D2
+        VMLAL.S16    Q11, D2, D10        
+        VMLAL.S16    Q10, D3, D3
+        VMLAL.S16    Q11, D3, D11
+        VMLAL.S16    Q10, D4, D4
+        VMLAL.S16    Q11, D4, D12
+        VMLAL.S16    Q10, D5, D5
+        VMLAL.S16    Q11, D5, D13
+        VMLAL.S16    Q10, D6, D6
+        VMLAL.S16    Q11, D6, D14
+        VMLAL.S16    Q10, D7, D7
+        VMLAL.S16    Q11, D7, D15
+
+	VLD1.S16       {Q0, Q1}, [r14]!                 @ load 16 excf[]
+        VLD1.S16       {Q2, Q3}, [r14]!                 @ load 16 excf[]
+        VLD1.S16       {Q4, Q5}, [r12]!                 @ load 16 x[]
+        VLD1.S16       {Q6, Q7}, [r12]!                 @ load 16 x[]
+        VMLAL.S16    Q10, D0, D0
+        VMLAL.S16    Q11, D0, D8
+        VMLAL.S16    Q10, D1, D1
+        VMLAL.S16    Q11, D1, D9
+        VMLAL.S16    Q10, D2, D2
+        VMLAL.S16    Q11, D2, D10        
+        VMLAL.S16    Q10, D3, D3
+        VMLAL.S16    Q11, D3, D11
+        VMLAL.S16    Q10, D4, D4
+        VMLAL.S16    Q11, D4, D12
+        VMLAL.S16    Q10, D5, D5
+        VMLAL.S16    Q11, D5, D13
+        VMLAL.S16    Q10, D6, D6
+        VMLAL.S16    Q11, D6, D14
+        VMLAL.S16    Q10, D7, D7
+        VMLAL.S16    Q11, D7, D15
+
+        VQADD.S32      D20, D20, D21
+        VQADD.S32      D22, D22, D23
+
+	VPADD.S32      D20, D20, D20                   @D20[0] --- L_tmp1 << 1
+	VPADD.S32      D22, D22, D22                   @D22[0] --- L_tmp << 1
+
+	VMOV.S32       r6, D20[0]
+        VMOV.S32       r5, D22[0]	
+
+	@r5 --- L_tmp, r6 --- L_tmp1
+	MOV            r10, #1
+	ADD            r5, r10, r5, LSL #1                     @L_tmp = (L_tmp << 1) + 1
+	ADD            r6, r10, r6, LSL #1                     @L_tmp1 = (L_tmp1 << 1) + 1
+ 
+	CLZ            r10, r5        
+	CMP            r5, #0
+	RSBLT          r11, r5, #0
+	CLZLT          r10, r11
+	SUB            r10, r10, #1                 @exp = norm_l(L_tmp)
+     
+	MOV            r5, r5, LSL r10              @L_tmp = (L_tmp << exp)
+	RSB            r10, r10, #30                @exp_corr = 30 - exp
+	MOV            r11, r5, ASR #16             @corr = extract_h(L_tmp)
+
+	CLZ            r5, r6
+	SUB            r5, r5, #1
+	MOV            r6, r6, LSL r5               @L_tmp = (L_tmp1 << exp)
+	RSB            r5, r5, #30                  @exp_norm = 30 - exp
+
+	@r10 --- exp_corr, r11 --- corr
+	@r6  --- L_tmp, r5 --- exp_norm
+
+	@Isqrt_n(&L_tmp, &exp_norm)
+
+	MOV            r14, r0
+	MOV            r12, r1 
+
+        STMFD          sp!, {r0 - r4, r7 - r12, r14}
+	ADD            r1, sp, #4
+	ADD            r0, sp, #0
+	STR            r6, [sp]
+	STRH           r5, [sp, #4]
+	BL             Isqrt_n
+	LDR            r6, [sp]
+	LDRSH          r5, [sp, #4]
+        LDMFD          sp!, {r0 - r4, r7 - r12, r14}
+	MOV            r0, r14
+	MOV            r1, r12
+
+
+	MOV            r6, r6, ASR #16              @norm = extract_h(L_tmp)
+	MUL            r12, r6, r11
+	ADD            r12, r12, r12                @L_tmp = vo_L_mult(corr, norm)
+  
+	ADD            r6, r10, r5
+	ADD            r6, r6, r7                   @exp_corr + exp_norm + scale
+
+        CMP            r6, #0
+        RSBLT          r6, r6, #0
+	MOVLT          r12, r12, ASR r6
+        MOVGT          r12, r12, LSL r6             @L_tmp = L_shl(L_tmp, exp_corr + exp_norm + scale)
+
+        ADD            r12, r12, r8
+        MOV            r12, r12, ASR #16            @vo_round(L_tmp)
+
+        LDR            r5, [r13, #CORR_NORM]        @ get corr_norm address
+	LDR            r6, [r13, #T_MAX]            @ get t_max
+	ADD            r10, r5, r4, LSL #1          @ get corr_norm[t] address
+	STRH           r12, [r10]                   @ corr_norm[t] = vo_round(L_tmp)
+
+	CMP            r4, r6
+	BEQ            Norm_corr_asm_end
+ 
+	ADD            r4, r4, #1                   @ t_min ++ 
+	RSB            r5, r4, #0                   @ k
+
+	MOV            r6, #63                      @ i = 63
+	MOV            r8, r0                       @ exc[]
+	MOV            r9, r2                       @ h[]
+	ADD            r10, r13, #20                @ excf[]
+
+	ADD            r8, r8, r5, LSL #1           @ exc[k] address
+	ADD            r9, r9, r6, LSL #1           @ h[i] address
+	ADD            r10, r10, r6, LSL #1         @ excf[i] address
+	LDRSH          r11, [r8]                    @ tmp = exc[k]
+
+LOOPK:
+        LDRSH          r8, [r9], #-2                @ load h[i]
+	LDRSH          r12, [r10, #-2]              @ load excf[i - 1]
+	MUL            r14, r11, r8
+	MOV            r8, r14, ASR #15
+	ADD            r14, r8, r12
+	STRH           r14, [r10], #-2
+	SUBS           r6, r6, #1
+	BGT            LOOPK
+
+	LDRSH          r8, [r9]                     @ load h[0]
+	MUL            r14, r11, r8
+        LDR            r6, [r13, #T_MAX]            @ get t_max
+	MOV            r8, r14, ASR #15
+	STRH           r8, [r10]                    
+
+	CMP            r4, r6
+	BLE            LOOPFOR
+
+Norm_corr_asm_end: 
+        
+        ADD            r13, r13, #voSTACK      
+        LDMFD          r13!, {r4 - r12, r15}
+    
+        .END
+
+
diff --git a/media/libstagefright/codecs/amrwbenc/src/asm/ARMV7/Syn_filt_32_neon.s b/media/libstagefright/codecs/amrwbenc/src/asm/ARMV7/Syn_filt_32_neon.s
new file mode 100644
index 0000000..cb1764f
--- /dev/null
+++ b/media/libstagefright/codecs/amrwbenc/src/asm/ARMV7/Syn_filt_32_neon.s
@@ -0,0 +1,133 @@
+@/*

+@ ** Copyright 2003-2010, VisualOn, Inc.

+@ **

+@ ** Licensed under the Apache License, Version 2.0 (the "License");

+@ ** you may not use this file except in compliance with the License.

+@ ** You may obtain a copy of the License at

+@ **

+@ **     http://www.apache.org/licenses/LICENSE-2.0

+@ **

+@ ** Unless required by applicable law or agreed to in writing, software

+@ ** distributed under the License is distributed on an "AS IS" BASIS,

+@ ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

+@ ** See the License for the specific language governing permissions and

+@ ** limitations under the License.

+@ */

+@

+@**********************************************************************/

+@void Syn_filt_32(

+@     Word16 a[],                           /* (i) Q12 : a[m+1] prediction coefficients */

+@     Word16 m,                             /* (i)     : order of LP filter             */

+@     Word16 exc[],                         /* (i) Qnew: excitation (exc[i] >> Qnew)    */

+@     Word16 Qnew,                          /* (i)     : exc scaling = 0(min) to 8(max) */

+@     Word16 sig_hi[],                      /* (o) /16 : synthesis high                 */

+@     Word16 sig_lo[],                      /* (o) /16 : synthesis low                  */

+@     Word16 lg                             /* (i)     : size of filtering              */

+@)

+@***********************************************************************

+@ a[]      --- r0

+@ m        --- r1

+@ exc[]    --- r2

+@ Qnew     --- r3

+@ sig_hi[] --- r4

+@ sig_lo[] --- r5

+@ lg       --- r6

+

+          .section  .text 

+          .global   Syn_filt_32_asm

+

+Syn_filt_32_asm:

+

+          STMFD   	r13!, {r4 - r12, r14} 

+          LDR           r4,  [r13, #40]                  @ get sig_hi[] address

+          LDR           r5,  [r13, #44]                  @ get sig_lo[] address

+

+          LDRSH         r6,  [r0], #2                    @ load Aq[0]

+          ADD           r7,  r3, #4                      @ 4 + Q_new

+          MOV           r3, r6, ASR r7                   @ a0 = Aq[0] >> (4 + Q_new)

+

+	  SUB           r10, r4, #32                     @ sig_hi[-16] address

+	  SUB           r11, r5, #32                     @ sig_lo[-16] address

+

+	  VLD1.S16      {D0, D1, D2, D3}, [r0]!          @a[1] ~ a[16] 

+  

+          MOV           r8, #0                           @ i = 0

+

+	  VLD1.S16      {D4, D5, D6, D7}, [r10]!         @ sig_hi[-16] ~ sig_hi[-1]

+          VREV64.16     D0, D0

+          VREV64.16     D1, D1

+	  VLD1.S16      {D8, D9, D10, D11}, [r11]!       @ sig_lo[-16] ~ sig_lo[-1]

+          VREV64.16     D2, D2

+          VREV64.16     D3, D3	

+          VDUP.S32      Q15, r8

+              

+SYN_LOOP:

+

+          LDRSH         r6, [r2], #2                     @exc[i]

+	  @L_tmp = L_msu(L_tmp, sig_lo[i - j], a[j])@

+	  VMULL.S16     Q10, D8, D3

+	  VEXT.8        D8, D8, D9, #2

+	  VMLAL.S16     Q10, D9, D2

+	  VMLAL.S16     Q10, D10, D1

+	  VMLAL.S16     Q10, D11, D0

+

+	  VEXT.8        D9, D9, D10, #2

+	  VEXT.8        D10, D10, D11, #2

+	  

+	  VPADD.S32     D28, D20, D21

+          MUL           r12, r6, r3                      @exc[i] * a0

+	  VPADD.S32     D29, D28, D28

+	  VDUP.S32      Q10, D29[0]                      @result1

+          

+	  VMULL.S16     Q11, D4, D3

+	  VMLAL.S16     Q11, D5, D2

+          VSUB.S32      Q10, Q15, Q10

+	  @L_tmp = L_msu(L_tmp, sig_hi[i - j], a[j])@

+

+	  VMLAL.S16     Q11, D6, D1

+	  VEXT.8        D4, D4, D5, #2

+	  VMLAL.S16     Q11, D7, D0

+

+

+	  VEXT.8        D5, D5, D6, #2

+	  VEXT.8        D6, D6, D7, #2

+

+	  VPADD.S32     D28, D22, D23

+          VPADD.S32     D29, D28, D28

+          MOV           r14, r12, LSL #1                 @exc[i] * a0 << 1

+          VDUP.S32      Q11, D29[0]                      @result2

+

+

+

+	  VSHR.S32      Q10, Q10, #11                    @result1 >>= 11

+	  VSHL.S32      Q11, Q11, #1                     @result2 <<= 1

+	  VDUP.S32      Q12, r14                         

+	  VADD.S32      Q12, Q12, Q10                    @L_tmp = L_tmp - (result1 >>= 11) - (result2 <<= 1)

+	  VSUB.S32      Q12, Q12, Q11

+

+	  VSHL.S32      Q12, Q12, #3                     @L_tmp <<= 3

+

+

+	  VSHRN.S32     D20, Q12, #16                    @sig_hi[i] = L_tmp >> 16@

+	  VMOV.S16      r10, D20[0]

+	  VSHR.S32      Q12, Q12, #4                     @L_tmp >>= 4

+	  VEXT.8        D7, D7, D20, #2

+	  STRH          r10, [r4], #2                    @store sig_hi[i]

+          VMOV.S32      r11, D24[0]                      @r11 --- L_tmp >>= 4

+	  ADD           r8, r8, #1

+	  SUB           r12, r11, r10, LSL #12

+	  @MOV           r11, r12, ASR #16                @sig_lo[i]

+	  VDUP.S16      D21, r12

+	  VEXT.8        D11, D11, D21, #2

+	  STRH          r12, [r5], #2                    @stroe sig_lo[i]

+

+          CMP           r8, #64

+          BLT           SYN_LOOP                          

+         

+Syn_filt_32_end:

+		     

+          LDMFD   	    r13!, {r4 - r12, r15} 

+          @ENDFUNC

+          .END

+ 

+

diff --git a/media/libstagefright/codecs/amrwbenc/src/asm/ARMV7/convolve_neon.s b/media/libstagefright/codecs/amrwbenc/src/asm/ARMV7/convolve_neon.s
new file mode 100644
index 0000000..189e33b
--- /dev/null
+++ b/media/libstagefright/codecs/amrwbenc/src/asm/ARMV7/convolve_neon.s
@@ -0,0 +1,178 @@
+@/*
+@ ** Copyright 2003-2010, VisualOn, Inc.
+@ **
+@ ** Licensed under the Apache License, Version 2.0 (the "License");
+@ ** you may not use this file except in compliance with the License.
+@ ** You may obtain a copy of the License at
+@ **
+@ **     http://www.apache.org/licenses/LICENSE-2.0
+@ **
+@ ** Unless required by applicable law or agreed to in writing, software
+@ ** distributed under the License is distributed on an "AS IS" BASIS,
+@ ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+@ ** See the License for the specific language governing permissions and
+@ ** limitations under the License.
+@ */
+@
+@*void Convolve (
+@*    Word16 x[],        /* (i)     : input vector                           */
+@*    Word16 h[],        /* (i)     : impulse response                       */
+@*    Word16 y[],        /* (o)     : output vector                          */
+@*    Word16 L           /* (i)     : vector size                            */
+@*)
+@ 
+@ r0 --- x[]
+@ r1 --- h[]
+@ r2 --- y[]
+@ r3 --- L
+
+	.section  .text 
+        .global   Convolve_asm 
+
+Convolve_asm:
+
+        STMFD          r13!, {r4 - r12, r14}  
+        MOV            r3,  #0                        
+	MOV            r11, #0x8000
+        
+LOOP: 
+        @MOV            r8, #0                            @ s = 0
+        ADD            r4, r1, r3, LSL #1                @ tmpH address
+        ADD            r5, r3, #1                        @ i = n + 1
+        MOV            r6, r0
+        LDRSH          r9,  [r6], #2                     @ *tmpX++
+        LDRSH          r10, [r4]                         @ *tmpH--
+        SUB            r5, r5, #1
+        VMOV.S32       Q10, #0 
+        MUL            r8,  r9, r10 
+
+LOOP1:                    
+        CMP            r5, #0
+        BLE            L1
+        SUB            r4, r4, #8
+        MOV            r9, r4
+        VLD1.S16       D0, [r6]!   
+        VLD1.S16       D1, [r9]!
+        VREV64.16      D1, D1
+        SUBS           r5, r5, #4  
+        VMLAL.S16      Q10, D0, D1         
+        B              LOOP1    
+L1:                  
+        VADD.S32       D20, D20, D21
+        VPADD.S32      D20, D20, D20
+        VMOV.S32       r5, D20[0]
+        ADD            r5, r5, r8
+        ADD            r5, r11, r5, LSL #1
+        MOV            r5, r5, LSR #16                   @extract_h(s)
+        ADD            r3, r3, #1
+        STRH           r5, [r2], #2                      @y[n]
+
+
+        @MOV            r8, #0
+        ADD            r4, r1, r3, LSL #1                @tmpH address
+        ADD            r5, r3, #1
+        MOV            r6, r0
+        LDRSH          r9,  [r6], #2                     @ *tmpX++
+        LDRSH          r10, [r4], #-2                     
+        LDRSH          r12, [r6], #2
+        LDRSH          r14, [r4]
+
+        MUL            r8, r9, r10
+        SUB            r5, r5, #2
+        MLA            r8, r12, r14, r8
+        
+        VMOV.S32       Q10, #0
+LOOP2:
+        CMP            r5, #0
+        BLE            L2
+        SUB            r4, r4, #8
+        MOV            r9, r4
+        VLD1.S16       D0, [r6]!   
+        VLD1.S16       D1, [r9]!
+        SUBS           r5, r5, #4
+        VREV64.16      D1, D1
+        VMLAL.S16      Q10, D0, D1 
+        B              LOOP2
+L2:
+        VADD.S32       D20, D20, D21
+        VPADD.S32      D20, D20, D20
+        VMOV.S32       r5, D20[0]
+        ADD            r8, r8, r5
+        ADD            r8, r11, r8, LSL #1
+        MOV            r8, r8, LSR #16                   @extract_h(s)
+        ADD            r3, r3, #1  
+        STRH           r8, [r2], #2                      @y[n]
+
+
+        @MOV            r8, #0
+        ADD            r4, r1, r3, LSL #1
+        ADD            r5, r3, #1
+        MOV            r6, r0
+        LDRSH          r9,  [r6], #2
+        LDRSH          r10, [r4], #-2
+        LDRSH          r12, [r6], #2
+        LDRSH          r14, [r4], #-2
+        MUL            r8, r9, r10
+        LDRSH          r9,  [r6], #2
+        LDRSH          r10, [r4]
+        MLA            r8, r12, r14, r8 
+        SUB            r5, r5, #3
+        MLA            r8, r9, r10, r8
+
+        VMOV.S32       Q10, #0
+LOOP3:
+        CMP            r5, #0
+        BLE            L3
+        SUB            r4, r4, #8
+        MOV            r9, r4
+        VLD1.S16       D0, [r6]!   
+        VLD1.S16       D1, [r9]!
+        VREV64.16      D1, D1
+        SUBS           r5, r5, #4
+        VMLAL.S16      Q10, D0, D1 
+        B              LOOP3   
+
+L3:
+        VADD.S32       D20, D20, D21
+        VPADD.S32      D20, D20, D20
+        VMOV.S32       r5, D20[0]
+        ADD            r8, r8, r5
+        ADD            r8, r11, r8, LSL #1
+        MOV            r8, r8, LSR #16                   @extract_h(s)
+        ADD            r3, r3, #1
+        STRH           r8, [r2], #2                      @y[n]
+
+        ADD            r5, r3, #1                        @ i = n + 1
+        ADD            r4, r1, r5, LSL #1                @ tmpH address
+        MOV            r6, r0
+        VMOV.S32       Q10, #0
+LOOP4:                    
+        CMP            r5, #0
+        BLE            L4
+        SUB            r4, r4, #8
+        MOV            r9, r4
+        VLD1.S16       D0, [r6]!   
+        VLD1.S16       D1, [r9]!
+        VREV64.16      D1, D1
+        SUBS           r5, r5, #4  
+        VMLAL.S16      Q10, D0, D1         
+        B              LOOP4    
+L4:                  
+        VADD.S32       D20, D20, D21
+        VPADD.S32      D20, D20, D20
+        VMOV.S32       r5,  D20[0]
+        ADD            r5, r11, r5, LSL #1
+        MOV            r5, r5, LSR #16                   @extract_h(s)
+        ADD            r3, r3, #1
+        STRH           r5, [r2], #2                      @y[n]
+        
+        CMP            r3, #64
+        BLT            LOOP
+                
+Convolve_asm_end: 
+ 
+        LDMFD      r13!, {r4 - r12, r15}
+    
+        @ENDFUNC
+        .END
+
diff --git a/media/libstagefright/codecs/amrwbenc/src/asm/ARMV7/cor_h_vec_neon.s b/media/libstagefright/codecs/amrwbenc/src/asm/ARMV7/cor_h_vec_neon.s
new file mode 100644
index 0000000..2e339db
--- /dev/null
+++ b/media/libstagefright/codecs/amrwbenc/src/asm/ARMV7/cor_h_vec_neon.s
@@ -0,0 +1,151 @@
+@/*

+@ ** Copyright 2003-2010, VisualOn, Inc.

+@ **

+@ ** Licensed under the Apache License, Version 2.0 (the "License");

+@ ** you may not use this file except in compliance with the License.

+@ ** You may obtain a copy of the License at

+@ **

+@ **     http://www.apache.org/licenses/LICENSE-2.0

+@ **

+@ ** Unless required by applicable law or agreed to in writing, software

+@ ** distributed under the License is distributed on an "AS IS" BASIS,

+@ ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

+@ ** See the License for the specific language governing permissions and

+@ ** limitations under the License.

+@ */

+@

+@static void cor_h_vec_012(

+@		Word16 h[],                           /* (i) scaled impulse response                 */

+@		Word16 vec[],                         /* (i) scaled vector (/8) to correlate with h[] */

+@		Word16 track,                         /* (i) track to use                            */

+@		Word16 sign[],                        /* (i) sign vector                             */

+@		Word16 rrixix[][NB_POS],              /* (i) correlation of h[x] with h[x]      */

+@		Word16 cor_1[],                       /* (o) result of correlation (NB_POS elements) */

+@		Word16 cor_2[]                        /* (o) result of correlation (NB_POS elements) */

+@)

+@r0 ---- h[]

+@r1 ---- vec[]

+@r2 ---- track

+@r3 ---- sign[]

+@r4 ---- rrixix[][NB_POS]

+@r5 ---- cor_1[]

+@r6 ---- cor_2[]

+

+              .section .text 

+	      .global  cor_h_vec_012_asm

+

+cor_h_vec_012_asm:

+

+             STMFD         r13!, {r4 - r12, r14}

+	     LDR           r4, [r13, #40]                    @load rrixix[][NB_POS]

+	     ADD           r7, r4, r2, LSL #5                @r7 --- p0 = rrixix[track]

+             MOV           r4, #0                            @i=0

+

+	     @r0 --- h[], r1 --- vec[],  r2 --- pos

+	     @r3 --- sign[], r4 --- i, r7 --- p0

+

+LOOPi:

+             MOV           r5, #0                            @L_sum1 = 0

+	     MOV           r6, #0                            @L_sum2 = 0

+	     ADD           r9, r1, r2, LSL #1                @p2 = &vec[pos]

+	     MOV           r10, r0                           @p1 = h

+	     RSB           r11, r2, #62                      @j=62-pos

+

+LOOPj1:

+	     LDRSH         r12, [r10], #2  

+	     LDRSH         r8,  [r9], #2

+	     LDRSH         r14, [r9]

+	     SUBS          r11, r11, #1

+             MLA           r5, r12, r8, r5

+             MLA           r6, r12, r14, r6	 

+	     BGE           LOOPj1

+

+	     LDRSH         r12, [r10], #2                     @*p1++

+	     MOV           r6, r6, LSL #2                     @L_sum2 = (L_sum2 << 2)

+             MLA           r5, r12, r14, r5

+             MOV           r14, #0x8000

+             MOV           r5, r5, LSL #2                     @L_sum1 = (L_sum1 << 2)

+             ADD           r10, r6, r14         

+             ADD           r9, r5, r14

+             MOV           r5, r9, ASR #16

+             MOV           r6, r10, ASR #16

+             ADD           r9, r3, r2, LSL #1                 @address of sign[pos]

+             ADD           r8, r7, #32

+             LDRSH         r10, [r9], #2                 	  @sign[pos]

+	     LDRSH         r11, [r9]                          @sign[pos + 1]

+	     MUL           r12, r5, r10

+	     MUL           r14, r6, r11

+	     MOV           r5, r12, ASR #15

+	     MOV           r6, r14, ASR #15

+	     LDR           r9,  [r13, #44]                   

+	     LDR           r12, [r13, #48]

+             LDRSH         r10, [r7], #2                      @*p0++

+	     LDRSH         r11, [r8]                          @*p3++

+             ADD           r9, r9, r4, LSL #1

+	     ADD           r12, r12, r4, LSL #1

+	     ADD           r5, r5, r10

+	     ADD           r6, r6, r11

+	     STRH          r5, [r9]

+	     STRH          r6, [r12]

+

+             ADD           r2, r2, #4

+ 

+             MOV           r5, #0                            @L_sum1 = 0

+	     MOV           r6, #0                            @L_sum2 = 0

+	     ADD           r9, r1, r2, LSL #1                @p2 = &vec[pos]

+	     MOV           r10, r0                           @p1 = h

+	     RSB           r11, r2, #62                      @j=62-pos

+	     ADD           r4, r4, #1                        @i++

+

+LOOPj2:

+	     LDRSH         r12, [r10], #2  

+	     LDRSH         r8,  [r9], #2

+	     LDRSH         r14, [r9]

+	     SUBS          r11, r11, #1

+             MLA           r5, r12, r8, r5

+             MLA           r6, r12, r14, r6	 

+	     BGE           LOOPj2

+

+	     LDRSH         r12, [r10], #2                     @*p1++

+	     MOV           r6, r6, LSL #2                     @L_sum2 = (L_sum2 << 2)

+             MLA           r5, r12, r14, r5

+             MOV           r14, #0x8000

+             MOV           r5, r5, LSL #2                     @L_sum1 = (L_sum1 << 2)

+             ADD           r10, r6, r14        

+             ADD           r9, r5, r14

+

+             MOV           r5, r9, ASR #16

+             MOV           r6, r10, ASR #16

+             ADD           r9, r3, r2, LSL #1                 @address of sign[pos]

+             ADD           r8, r7, #32

+             LDRSH         r10, [r9], #2                 	  @sign[pos]

+	     LDRSH         r11, [r9]                          @sign[pos + 1]

+	     MUL           r12, r5, r10

+	     MUL           r14, r6, r11

+	     MOV           r5, r12, ASR #15

+	     MOV           r6, r14, ASR #15

+	     LDR           r9,  [r13, #44]                   

+	     LDR           r12, [r13, #48]

+             LDRSH         r10, [r7], #2                      @*p0++

+	     LDRSH         r11, [r8]                          @*p3++

+             ADD           r9, r9, r4, LSL #1

+	     ADD           r12, r12, r4, LSL #1

+	     ADD           r5, r5, r10

+	     ADD           r6, r6, r11

+	     STRH          r5, [r9]

+	     STRH          r6, [r12]

+	     ADD           r4, r4, #1                         @i+1

+	     ADD           r2, r2, #4                         @pos += STEP

+	     CMP           r4, #16

+	     

+	     BLT           LOOPi

+         

+the_end:

+             LDMFD         r13!, {r4 - r12, r15}

+             

+	     .END	 

+        

+	

+	  

+

+

diff --git a/media/libstagefright/codecs/amrwbenc/src/asm/ARMV7/pred_lt4_1_neon.s b/media/libstagefright/codecs/amrwbenc/src/asm/ARMV7/pred_lt4_1_neon.s
new file mode 100644
index 0000000..3b8853f
--- /dev/null
+++ b/media/libstagefright/codecs/amrwbenc/src/asm/ARMV7/pred_lt4_1_neon.s
@@ -0,0 +1,100 @@
+@/*

+@ ** Copyright 2003-2010, VisualOn, Inc.

+@ **

+@ ** Licensed under the Apache License, Version 2.0 (the "License");

+@ ** you may not use this file except in compliance with the License.

+@ ** You may obtain a copy of the License at

+@ **

+@ **     http://www.apache.org/licenses/LICENSE-2.0

+@ **

+@ ** Unless required by applicable law or agreed to in writing, software

+@ ** distributed under the License is distributed on an "AS IS" BASIS,

+@ ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

+@ ** See the License for the specific language governing permissions and

+@ ** limitations under the License.

+@ */

+@

+@void Pred_lt4(

+@     Word16 exc[],                         /* in/out: excitation buffer */

+@     Word16 T0,                            /* input : integer pitch lag */

+@     Word16 frac,                          /* input : fraction of lag   */

+@     Word16 L_subfr                        /* input : subframe size     */

+@)

+@***********************************************************************

+@ r0    ---  exc[]

+@ r1    ---  T0

+@ r2    ---  frac

+@ r3    ---  L_subfr

+ 

+          .section  .text 

+          .global   pred_lt4_asm

+          .extern   inter4_2

+

+pred_lt4_asm:

+

+          STMFD   	r13!, {r4 - r12, r14} 

+          SUB           r4, r0, r1, LSL #1                        @ x = exc - T0

+          RSB           r2, r2, #0                                @ frac = - frac

+          SUB           r4, r4, #30                               @ x -= L_INTERPOL2 - 1

+          CMP           r2, #0

+          ADDLT         r2, r2, #4                                @ frac += UP_SAMP

+          SUBLT         r4, r4, #2                                @ x--

+

+          LDR           r11, Lable1

+          RSB           r2, r2, #3                                @ k = UP_SAMP - 1 - frac

+          MOV           r8, #0                                    @ j = 0

+	  ADD           r11, r11, r2, LSL #6                      @ get inter4_2[k][]

+

+	  VLD1.S16      {Q0, Q1}, [r11]!

+	  VLD1.S16      {Q2, Q3}, [r11]!

+          

+	  MOV           r6, #0x8000 

+

+          VLD1.S16      {Q4, Q5}, [r4]!                           @load 16 x[]

+          VLD1.S16      {Q6, Q7}, [r4]!                           @load 16 x[]

+

+LOOP:

+          VQDMULL.S16   Q15, D8, D0

+          VQDMLAL.S16   Q15, D9, D1

+          VQDMLAL.S16   Q15, D10, D2

+          VQDMLAL.S16   Q15, D11, D3

+        

+          VQDMLAL.S16   Q15, D12, D4

+          VQDMLAL.S16   Q15, D13, D5

+          VQDMLAL.S16   Q15, D14, D6

+          VQDMLAL.S16   Q15, D15, D7

+

+          LDRSH         r12, [r4], #2                

+          

+          VEXT.S16      D8, D8, D9, #1

+          VEXT.S16      D9, D9, D10, #1

+          VEXT.S16      D10, D10, D11, #1

+          VEXT.S16      D11, D11, D12, #1

+          VDUP.S16      D24, r12

+          VEXT.S16      D12, D12, D13, #1

+          VEXT.S16      D13, D13, D14, #1

+     

+          VQADD.S32     D30, D30, D31

+	  MOV           r11, #0x8000          

+          VPADD.S32     D30, D30, D30

+          ADD           r8, r8, #1

+          VMOV.S32      r12, D30[0]

+          VEXT.S16      D14, D14, D15, #1          

+

+          QADD          r1, r12, r12                              @ L_sum = (L_sum << 2)

+          VEXT.S16      D15, D15, D24, #1

+          QADD          r5, r1, r6                         

+          MOV           r1, r5, ASR #16

+          CMP           r8, r3

+          STRH          r1, [r0], #2                              @ exc[j] = (L_sum + 0x8000) >> 16

+          BLT           LOOP

+                    

+pred_lt4_end:

+		     

+          LDMFD   	r13!, {r4 - r12, r15} 

+ 

+Lable1:

+          .word   	inter4_2

+          @ENDFUNC

+          .END

+

diff --git a/media/libstagefright/codecs/amrwbenc/src/asm/ARMV7/residu_asm_neon.s b/media/libstagefright/codecs/amrwbenc/src/asm/ARMV7/residu_asm_neon.s
new file mode 100644
index 0000000..b9e6b23
--- /dev/null
+++ b/media/libstagefright/codecs/amrwbenc/src/asm/ARMV7/residu_asm_neon.s
@@ -0,0 +1,127 @@
+@/*
+@ ** Copyright 2003-2010, VisualOn, Inc.
+@ **
+@ ** Licensed under the Apache License, Version 2.0 (the "License");
+@ ** you may not use this file except in compliance with the License.
+@ ** You may obtain a copy of the License at
+@ **
+@ **     http://www.apache.org/licenses/LICENSE-2.0
+@ **
+@ ** Unless required by applicable law or agreed to in writing, software
+@ ** distributed under the License is distributed on an "AS IS" BASIS,
+@ ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+@ ** See the License for the specific language governing permissions and
+@ ** limitations under the License.
+@ */
+@
+@void Residu (
+@    Word16 a[], /* (i)     : prediction coefficients                      */
+@    Word16 x[], /* (i)     : speech signal                                */
+@    Word16 y[], /* (o)     : residual signal                              */
+@    Word16 lg   /* (i)     : size of filtering                            */
+@)
+@a[]        RN     r0
+@x[]        RN     r1
+@y[]        RN     r2
+@lg         RN     r3
+
+	.section   .text
+        .global    Residu_opt 
+
+Residu_opt:
+
+        STMFD          r13!, {r4 - r12, r14} 
+        SUB            r7, r3, #4                       @i = lg - 4
+        
+        VLD1.S16       {D0, D1, D2, D3}, [r0]!              @get all a[]  
+	VLD1.S16       {D4}, [r0]!
+        VMOV.S32       Q8,  #0x8000
+        
+LOOP1:
+        ADD            r9, r1, r7, LSL #1               @copy the address
+        ADD            r10, r2, r7, LSL #1
+        MOV            r8, r9
+        VLD1.S16       D5, [r8]!                       @get x[i], x[i+1], x[i+2], x[i+3]
+        VQDMULL.S16    Q10, D5, D0[0]                  @finish the first L_mult
+
+        SUB            r8, r9, #2                       @get the x[i-1] address
+        VLD1.S16       D5, [r8]! 
+        VQDMLAL.S16    Q10, D5, D0[1]
+
+        SUB            r8, r9, #4                       @load the x[i-2] address
+        VLD1.S16       D5, [r8]!
+        VQDMLAL.S16    Q10, D5, D0[2]
+
+        SUB            r8, r9, #6                       @load the x[i-3] address
+        VLD1.S16       D5, [r8]!     
+        VQDMLAL.S16    Q10, D5, D0[3]                    
+
+        SUB            r8, r9, #8                       @load the x[i-4] address
+        VLD1.S16       D5, [r8]!     
+        VQDMLAL.S16    Q10, D5, D1[0]  
+
+        SUB            r8, r9, #10                      @load the x[i-5] address
+        VLD1.S16       D5, [r8]!     
+        VQDMLAL.S16    Q10, D5, D1[1] 
+
+        SUB            r8, r9, #12                      @load the x[i-6] address
+        VLD1.S16       D5, [r8]!     
+        VQDMLAL.S16    Q10, D5, D1[2]  
+
+        SUB            r8, r9, #14                      @load the x[i-7] address
+        VLD1.S16       D5, [r8]!     
+        VQDMLAL.S16    Q10, D5, D1[3]  
+
+        SUB            r8, r9, #16                      @load the x[i-8] address
+        VLD1.S16       D5, [r8]!     
+        VQDMLAL.S16    Q10, D5, D2[0]  
+
+        SUB            r8, r9, #18                      @load the x[i-9] address
+        VLD1.S16       D5, [r8]!     
+        VQDMLAL.S16    Q10, D5, D2[1]         
+           
+        SUB            r8, r9, #20                      @load the x[i-10] address
+        VLD1.S16       D5, [r8]!     
+        VQDMLAL.S16    Q10, D5, D2[2]  
+
+	SUB            r8, r9, #22                      @load the x[i-11] address
+	VLD1.S16       D5, [r8]!
+	VQDMLAL.S16    Q10, D5, D2[3]
+
+	SUB            r8, r9, #24                      @load the x[i-12] address
+	VLD1.S16       D5, [r8]!
+	VQDMLAL.S16    Q10, D5, D3[0]
+
+	SUB            r8, r9, #26                      @load the x[i-13] address
+	VLD1.S16       D5, [r8]!
+	VQDMLAL.S16    Q10, D5, D3[1]
+
+	SUB            r8, r9, #28                      @load the x[i-14] address
+	VLD1.S16       D5, [r8]!
+	VQDMLAL.S16    Q10, D5, D3[2]
+
+	SUB            r8, r9, #30                      @load the x[i-15] address
+	VLD1.S16       D5, [r8]!
+	VQDMLAL.S16    Q10, D5, D3[3]
+
+	SUB            r8, r9, #32                      @load the x[i-16] address
+	VLD1.S16       D5, [r8]!
+	VQDMLAL.S16    Q10, D5, D4[0]
+
+        SUB            r7, r7, #4                       @i-=4
+        VQSHL.S32      Q10, Q10, #4
+        VQADD.S32      Q10, Q10, Q8
+        VSHRN.S32      D5, Q10, #16
+        VST1.S16       D5, [r10]!
+        CMP            r7,  #0
+
+        BGE            LOOP1
+
+Residu_asm_end: 
+ 
+        LDMFD      r13!, {r4 - r12, r15}
+    
+        @ENDFUNC
+        .END
+
+
diff --git a/media/libstagefright/codecs/amrwbenc/src/asm/ARMV7/scale_sig_neon.s b/media/libstagefright/codecs/amrwbenc/src/asm/ARMV7/scale_sig_neon.s
new file mode 100644
index 0000000..14957d8
--- /dev/null
+++ b/media/libstagefright/codecs/amrwbenc/src/asm/ARMV7/scale_sig_neon.s
@@ -0,0 +1,138 @@
+@/*

+@ ** Copyright 2003-2010, VisualOn, Inc.

+@ **

+@ ** Licensed under the Apache License, Version 2.0 (the "License");

+@ ** you may not use this file except in compliance with the License.

+@ ** You may obtain a copy of the License at

+@ **

+@ **     http://www.apache.org/licenses/LICENSE-2.0

+@ **

+@ ** Unless required by applicable law or agreed to in writing, software

+@ ** distributed under the License is distributed on an "AS IS" BASIS,

+@ ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

+@ ** See the License for the specific language governing permissions and

+@ ** limitations under the License.

+@ */

+@                   

+@**********************************************************************/

+@void Scale_sig(

+@               Word16 x[],                           /* (i/o) : signal to scale               */

+@               Word16 lg,                            /* (i)   : size of x[]                   */

+@               Word16 exp                            /* (i)   : exponent: x = round(x << exp) */

+@)

+@***********************************************************************

+@  x[]   ---  r0

+@  lg    ---  r1

+@  exp   ---  r2

+

+          .section  .text 

+          .global   Scale_sig_opt

+

+Scale_sig_opt:

+

+          STMFD   	r13!, {r4 - r12, r14} 

+          MOV           r4, #4

+          VMOV.S32      Q15, #0x8000       

+          VDUP.S32      Q14, r2  

+          MOV           r5, r0                          @ copy x[] address    

+          CMP           r1, #64

+          MOVEQ         r4, #1

+          BEQ           LOOP

+	  CMP           r1, #128

+	  MOVEQ         r4, #2

+	  BEQ           LOOP

+          CMP           r1, #256

+          BEQ           LOOP

+	  CMP           r1, #80

+	  MOVEQ         r4, #1

+	  BEQ           LOOP1

+

+LOOP1:

+          VLD1.S16      {Q0, Q1}, [r5]!                 @load 16 Word16 x[]     

+          VSHLL.S16     Q10, D0, #16

+          VSHLL.S16     Q11, D1, #16

+          VSHLL.S16     Q12, D2, #16

+          VSHLL.S16     Q13, D3, #16

+          VSHL.S32      Q10, Q10, Q14

+          VSHL.S32      Q11, Q11, Q14

+          VSHL.S32      Q12, Q12, Q14

+          VSHL.S32      Q13, Q13, Q14

+          VADDHN.S32    D16, Q10, Q15

+          VADDHN.S32    D17, Q11, Q15

+          VADDHN.S32    D18, Q12, Q15

+          VADDHN.S32    D19, Q13, Q15

+          VST1.S16      {Q8, Q9}, [r0]!                 @store 16 Word16 x[]

+

+LOOP:                

+          VLD1.S16      {Q0, Q1}, [r5]!                 @load 16 Word16 x[]

+          VLD1.S16      {Q2, Q3}, [r5]!                 @load 16 Word16 x[]

+          VLD1.S16      {Q4, Q5}, [r5]!                 @load 16 Word16 x[]

+          VLD1.S16      {Q6, Q7}, [r5]!                 @load 16 Word16 x[]

+

+          VSHLL.S16     Q8, D0, #16

+          VSHLL.S16     Q9, D1, #16

+          VSHLL.S16     Q10, D2, #16

+          VSHLL.S16     Q11, D3, #16     

+          VSHL.S32      Q8, Q8, Q14

+          VSHL.S32      Q9, Q9, Q14

+          VSHL.S32      Q10, Q10, Q14

+          VSHL.S32      Q11, Q11, Q14

+          VADDHN.S32    D16, Q8, Q15

+          VADDHN.S32    D17, Q9, Q15

+          VADDHN.S32    D18, Q10, Q15

+          VADDHN.S32    D19, Q11, Q15

+          VST1.S16      {Q8, Q9}, [r0]!                 @store 16 Word16 x[]

+

+   

+          VSHLL.S16     Q12, D4, #16

+          VSHLL.S16     Q13, D5, #16

+          VSHLL.S16     Q10, D6, #16

+          VSHLL.S16     Q11, D7, #16

+          VSHL.S32      Q12, Q12, Q14

+          VSHL.S32      Q13, Q13, Q14

+          VSHL.S32      Q10, Q10, Q14

+          VSHL.S32      Q11, Q11, Q14

+          VADDHN.S32    D16, Q12, Q15

+          VADDHN.S32    D17, Q13, Q15

+          VADDHN.S32    D18, Q10, Q15

+          VADDHN.S32    D19, Q11, Q15

+          VST1.S16      {Q8, Q9}, [r0]!                 @store 16 Word16 x[]

+

+          VSHLL.S16     Q10, D8, #16

+          VSHLL.S16     Q11, D9, #16

+          VSHLL.S16     Q12, D10, #16

+          VSHLL.S16     Q13, D11, #16

+          VSHL.S32      Q10, Q10, Q14

+          VSHL.S32      Q11, Q11, Q14

+          VSHL.S32      Q12, Q12, Q14

+          VSHL.S32      Q13, Q13, Q14

+          VADDHN.S32    D16, Q10, Q15

+          VADDHN.S32    D17, Q11, Q15

+          VADDHN.S32    D18, Q12, Q15

+          VADDHN.S32    D19, Q13, Q15

+          VST1.S16      {Q8, Q9}, [r0]!                 @store 16 Word16 x[]

+

+          VSHLL.S16     Q10, D12, #16   

+          VSHLL.S16     Q11, D13, #16

+          VSHLL.S16     Q12, D14, #16

+          VSHLL.S16     Q13, D15, #16

+          VSHL.S32      Q10, Q10, Q14

+          VSHL.S32      Q11, Q11, Q14

+          VSHL.S32      Q12, Q12, Q14

+          VSHL.S32      Q13, Q13, Q14

+          VADDHN.S32    D16, Q10, Q15

+          VADDHN.S32    D17, Q11, Q15

+          VADDHN.S32    D18, Q12, Q15

+          VADDHN.S32    D19, Q13, Q15 

+          VST1.S16      {Q8, Q9}, [r0]!                 @store 16 Word16 x[]  

+          SUBS          r4, r4, #1

+          BGT           LOOP     

+                

+                          

+Scale_sig_asm_end:

+

+          LDMFD   	r13!, {r4 - r12, r15} 

+          @ENDFUNC

+          .END

+ 

+

diff --git a/media/libstagefright/codecs/amrwbenc/src/asm/ARMV7/syn_filt_neon.s b/media/libstagefright/codecs/amrwbenc/src/asm/ARMV7/syn_filt_neon.s
new file mode 100644
index 0000000..dc3d4a8
--- /dev/null
+++ b/media/libstagefright/codecs/amrwbenc/src/asm/ARMV7/syn_filt_neon.s
@@ -0,0 +1,106 @@
+@/*

+@ ** Copyright 2003-2010, VisualOn, Inc.

+@ **

+@ ** Licensed under the Apache License, Version 2.0 (the "License");

+@ ** you may not use this file except in compliance with the License.

+@ ** You may obtain a copy of the License at

+@ **

+@ **     http://www.apache.org/licenses/LICENSE-2.0

+@ **

+@ ** Unless required by applicable law or agreed to in writing, software

+@ ** distributed under the License is distributed on an "AS IS" BASIS,

+@ ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

+@ ** See the License for the specific language governing permissions and

+@ ** limitations under the License.

+@ */

+@

+@void Syn_filt(

+@     Word16 a[],                           /* (i) Q12 : a[m+1] prediction coefficients           */

+@     Word16 x[],                           /* (i)     : input signal                             */

+@     Word16 y[],                           /* (o)     : output signal                            */

+@     Word16 mem[],                         /* (i/o)   : memory associated with this filtering.   */

+@)

+@***********************************************************************

+@ a[]    ---   r0

+@ x[]    ---   r1

+@ y[]    ---   r2

+@ mem[]  ---   r3

+@ m ---  16  lg --- 80  update --- 1

+

+          .section  .text 

+          .global   Syn_filt_asm

+

+Syn_filt_asm:

+

+          STMFD   	r13!, {r4 - r12, r14} 

+          SUB           r13, r13, #700                   @ y_buf[L_FRAME16k + M16k]

+   

+          MOV           r4, r3                           @ copy mem[] address

+          MOV           r5, r13                          @ copy yy = y_buf address

+

+          @ for(i = 0@ i < m@ i++)

+          @{

+          @    *yy++ = mem[i]@

+          @} 

+          VLD1.S16      {D0, D1, D2, D3}, [r4]!          @load 16 mems

+	  VST1.S16      {D0, D1, D2, D3}, [r5]!          @store 16 mem[] to *yy

+

+          LDRSH         r5, [r0], #2                     @ load a[0]

+          MOV           r8, #0                           @ i = 0

+          MOV           r5, r5, ASR #1                   @ a0 = a[0] >> 1

+          VMOV.S16      D8[0], r5

+          @ load all a[]

+          VLD1.S16      {D0, D1, D2, D3}, [r0]!          @ load a[1] ~ a[16]

+	  VREV64.16     D0, D0

+	  VREV64.16     D1, D1

+	  VREV64.16     D2, D2

+	  VREV64.16     D3, D3 

+	  MOV           r8, #0                           @ loop times

+	  MOV           r10, r13                         @ temp = y_buf

+	  ADD           r4, r13, #32                     @ yy[i] address

+

+          VLD1.S16      {D4, D5, D6, D7}, [r10]!         @ first 16 temp_p

+

+SYN_LOOP:

+

+          LDRSH         r6, [r1], #2                     @ load x[i]

+	  MUL           r12, r6, r5                      @ L_tmp = x[i] * a0

+	  ADD           r10, r4, r8, LSL #1              @ y[i], yy[i] address

+

+	  VDUP.S32      Q10, r12

+	  VMULL.S16     Q5, D3, D4                    

+          VMLAL.S16     Q5, D2, D5

+          VMLAL.S16     Q5, D1, D6

+          VMLAL.S16     Q5, D0, D7

+          VEXT.8        D4, D4, D5, #2

+          VEXT.8        D5, D5, D6, #2

+          VEXT.8        D6, D6, D7, #2

+          VPADD.S32     D12, D10, D11

+          ADD           r8, r8, #1

+          VPADD.S32     D10, D12, D12

+

+	  VDUP.S32      Q7, D10[0]

+

+	  VSUB.S32      Q9, Q10, Q7

+          VQRSHRN.S32   D20, Q9, #12   

+          VMOV.S16      r9, D20[0]

+          VEXT.8        D7, D7, D20, #2

+          CMP           r8, #80

+          STRH          r9, [r10]                        @ yy[i]

+          STRH          r9, [r2], #2                     @ y[i]          	         

+	  

+          BLT           SYN_LOOP

+ 

+          @ update mem[]

+          ADD           r5, r13, #160                    @ yy[64] address

+	  VLD1.S16      {D0, D1, D2, D3}, [r5]!

+	  VST1.S16      {D0, D1, D2, D3}, [r3]!              

+

+Syn_filt_asm_end:

+ 

+          ADD           r13, r13, #700		     

+          LDMFD   	r13!, {r4 - r12, r15} 

+          @ENDFUNC

+          .END

+ 

+

diff --git a/media/libstagefright/codecs/amrwbenc/src/autocorr.c b/media/libstagefright/codecs/amrwbenc/src/autocorr.c
new file mode 100644
index 0000000..33ed670
--- /dev/null
+++ b/media/libstagefright/codecs/amrwbenc/src/autocorr.c
@@ -0,0 +1,127 @@
+/*

+ ** Copyright 2003-2010, VisualOn, Inc.

+ **

+ ** Licensed under the Apache License, Version 2.0 (the "License");

+ ** you may not use this file except in compliance with the License.

+ ** You may obtain a copy of the License at

+ **

+ **     http://www.apache.org/licenses/LICENSE-2.0

+ **

+ ** Unless required by applicable law or agreed to in writing, software

+ ** distributed under the License is distributed on an "AS IS" BASIS,

+ ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

+ ** See the License for the specific language governing permissions and

+ ** limitations under the License.

+ */

+

+

+/***********************************************************************

+*       File: autocorr.c                                               *

+*                                                                      *

+*       Description:Compute autocorrelations of signal with windowing  *

+*                                                                      *

+************************************************************************/

+

+#include "typedef.h"

+#include "basic_op.h"

+#include "oper_32b.h"

+#include "acelp.h"

+#include "ham_wind.tab"

+

+void Autocorr(

+		Word16 x[],                           /* (i)    : Input signal                      */

+		Word16 m,                             /* (i)    : LPC order                         */

+		Word16 r_h[],                         /* (o) Q15: Autocorrelations  (msb)           */

+		Word16 r_l[]                          /* (o)    : Autocorrelations  (lsb)           */

+	     )

+{

+	Word32 i, norm, shift;

+	Word16 y[L_WINDOW];

+	Word32 L_sum, L_sum1, L_tmp, F_LEN;

+	Word16 *p1,*p2,*p3;

+	const Word16 *p4;

+	/* Windowing of signal */

+	p1 = x;

+	p4 = vo_window;

+	p3 = y;

+

+	for (i = 0; i < L_WINDOW; i+=4)

+	{

+		*p3++ = vo_mult_r((*p1++), (*p4++));

+		*p3++ = vo_mult_r((*p1++), (*p4++));

+		*p3++ = vo_mult_r((*p1++), (*p4++));

+		*p3++ = vo_mult_r((*p1++), (*p4++));

+	}

+

+	/* calculate energy of signal */

+	L_sum = vo_L_deposit_h(16);               /* sqrt(256), avoid overflow after rounding */

+	for (i = 0; i < L_WINDOW; i++)

+	{

+		L_tmp = vo_L_mult(y[i], y[i]);

+		L_tmp = (L_tmp >> 8);

+		L_sum += L_tmp;

+	}

+

+	/* scale signal to avoid overflow in autocorrelation */

+	norm = norm_l(L_sum);

+	shift = 4 - (norm >> 1);

+	if(shift > 0)

+	{

+		p1 = y;

+		for (i = 0; i < L_WINDOW; i+=4)

+		{

+			*p1 = vo_shr_r(*p1, shift); 

+			p1++;

+			*p1 = vo_shr_r(*p1, shift); 

+			p1++;

+			*p1 = vo_shr_r(*p1, shift);

+			p1++;

+			*p1 = vo_shr_r(*p1, shift); 

+			p1++;

+		}

+	}

+

+	/* Compute and normalize r[0] */

+	L_sum = 1; 

+	for (i = 0; i < L_WINDOW; i+=4)

+	{

+		L_sum += vo_L_mult(y[i], y[i]);

+		L_sum += vo_L_mult(y[i+1], y[i+1]);

+		L_sum += vo_L_mult(y[i+2], y[i+2]);

+		L_sum += vo_L_mult(y[i+3], y[i+3]);

+	}

+

+	norm = norm_l(L_sum);

+	L_sum = (L_sum << norm);

+

+	r_h[0] = L_sum >> 16;

+	r_l[0] = (L_sum & 0xffff)>>1;

+

+	/* Compute r[1] to r[m] */

+	for (i = 1; i <= 8; i++)

+	{

+		L_sum1 = 0;

+		L_sum = 0;

+		F_LEN = (Word32)(L_WINDOW - 2*i);

+		p1 = y;

+		p2 = y + (2*i)-1;

+		do{

+			L_sum1 += *p1 * *p2++;

+			L_sum += *p1++ * *p2;

+		}while(--F_LEN!=0);

+

+		L_sum1 += *p1 * *p2++;

+

+		L_sum1 = L_sum1<<norm;

+		L_sum = L_sum<<norm;

+

+		r_h[(2*i)-1] = L_sum1 >> 15;

+		r_l[(2*i)-1] = L_sum1 & 0x00007fff;

+		r_h[(2*i)] = L_sum >> 15;

+		r_l[(2*i)] = L_sum & 0x00007fff;

+	}

+	return;

+}

+

+

+

diff --git a/media/libstagefright/codecs/amrwbenc/src/az_isp.c b/media/libstagefright/codecs/amrwbenc/src/az_isp.c
new file mode 100644
index 0000000..8259f91
--- /dev/null
+++ b/media/libstagefright/codecs/amrwbenc/src/az_isp.c
@@ -0,0 +1,268 @@
+/*

+ ** Copyright 2003-2010, VisualOn, Inc.

+ **

+ ** Licensed under the Apache License, Version 2.0 (the "License");

+ ** you may not use this file except in compliance with the License.

+ ** You may obtain a copy of the License at

+ **

+ **     http://www.apache.org/licenses/LICENSE-2.0

+ **

+ ** Unless required by applicable law or agreed to in writing, software

+ ** distributed under the License is distributed on an "AS IS" BASIS,

+ ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

+ ** See the License for the specific language governing permissions and

+ ** limitations under the License.

+ */

+

+/***********************************************************************

+*  File: az_isp.c

+*

+*  Description:

+*-----------------------------------------------------------------------*

+* Compute the ISPs from  the LPC coefficients  (order=M)                *

+*-----------------------------------------------------------------------*

+*                                                                       *

+* The ISPs are the roots of the two polynomials F1(z) and F2(z)         *

+* defined as                                                            *

+*               F1(z) = A(z) + z^-m A(z^-1)                             *

+*  and          F2(z) = A(z) - z^-m A(z^-1)                             *

+*                                                                       *

+* For a even order m=2n, F1(z) has M/2 conjugate roots on the unit      *

+* circle and F2(z) has M/2-1 conjugate roots on the unit circle in      *

+* addition to two roots at 0 and pi.                                    *

+*                                                                       *

+* For a 16th order LP analysis, F1(z) and F2(z) can be written as       *

+*                                                                       *

+*   F1(z) = (1 + a[M])   PRODUCT  (1 - 2 cos(w_i) z^-1 + z^-2 )         *

+*                        i=0,2,4,6,8,10,12,14                           *

+*                                                                       *

+*   F2(z) = (1 - a[M]) (1 - z^-2) PRODUCT (1 - 2 cos(w_i) z^-1 + z^-2 ) *

+*                                 i=1,3,5,7,9,11,13                     *

+*                                                                       *

+* The ISPs are the M-1 frequencies w_i, i=0...M-2 plus the last         *

+* predictor coefficient a[M].                                           *

+*-----------------------------------------------------------------------*

+

+************************************************************************/

+

+#include "typedef.h"

+#include "basic_op.h"

+#include "oper_32b.h"

+#include "stdio.h"

+#include "grid100.tab"

+

+#define M   16

+#define NC  (M/2)

+

+/* local function */

+static __inline Word16 Chebps2(Word16 x, Word16 f[], Word32 n);

+

+void Az_isp(

+		Word16 a[],                           /* (i) Q12 : predictor coefficients                 */

+		Word16 isp[],                         /* (o) Q15 : Immittance spectral pairs              */

+		Word16 old_isp[]                      /* (i)     : old isp[] (in case not found M roots)  */

+	   )

+{

+	Word32 i, j, nf, ip, order;

+	Word16 xlow, ylow, xhigh, yhigh, xmid, ymid, xint;

+	Word16 x, y, sign, exp;

+	Word16 *coef;

+	Word16 f1[NC + 1], f2[NC];

+	Word32 t0;

+	/*-------------------------------------------------------------*

+	 * find the sum and diff polynomials F1(z) and F2(z)           *

+	 *      F1(z) = [A(z) + z^M A(z^-1)]                           *

+	 *      F2(z) = [A(z) - z^M A(z^-1)]/(1-z^-2)                  *

+	 *                                                             *

+	 * for (i=0; i<NC; i++)                                        *

+	 * {                                                           *

+	 *   f1[i] = a[i] + a[M-i];                                    *

+	 *   f2[i] = a[i] - a[M-i];                                    *

+	 * }                                                           *

+	 * f1[NC] = 2.0*a[NC];                                         *

+	 *                                                             *

+	 * for (i=2; i<NC; i++)            Divide by (1-z^-2)          *

+	 *   f2[i] += f2[i-2];                                         *

+	 *-------------------------------------------------------------*/

+	for (i = 0; i < NC; i++)

+	{

+		t0 = a[i] << 15;

+		f1[i] = vo_round(t0 + (a[M - i] << 15));        /* =(a[i]+a[M-i])/2 */

+		f2[i] = vo_round(t0 - (a[M - i] << 15));        /* =(a[i]-a[M-i])/2 */

+	}

+	f1[NC] = a[NC];                        

+	for (i = 2; i < NC; i++)               /* Divide by (1-z^-2) */

+		f2[i] = add1(f2[i], f2[i - 2]);     

+

+	/*---------------------------------------------------------------------*

+	 * Find the ISPs (roots of F1(z) and F2(z) ) using the                 *

+	 * Chebyshev polynomial evaluation.                                    *

+	 * The roots of F1(z) and F2(z) are alternatively searched.            *

+	 * We start by finding the first root of F1(z) then we switch          *

+	 * to F2(z) then back to F1(z) and so on until all roots are found.    *

+	 *                                                                     *

+	 *  - Evaluate Chebyshev pol. at grid points and check for sign change.*

+	 *  - If sign change track the root by subdividing the interval        *

+	 *    2 times and ckecking sign change.                                *

+	 *---------------------------------------------------------------------*/

+	nf = 0;                                  /* number of found frequencies */

+	ip = 0;                                  /* indicator for f1 or f2      */

+	coef = f1;                             

+	order = NC;                            

+	xlow = vogrid[0];                        

+	ylow = Chebps2(xlow, coef, order);

+	j = 0;

+	while ((nf < M - 1) && (j < GRID_POINTS))

+	{

+		j ++;

+		xhigh = xlow;                     

+		yhigh = ylow;                      

+		xlow = vogrid[j];                    

+		ylow = Chebps2(xlow, coef, order);

+		if ((ylow * yhigh) <= (Word32) 0)

+		{

+			/* divide 2 times the interval */

+			for (i = 0; i < 2; i++)

+			{

+				xmid = (xlow >> 1) + (xhigh >> 1);        /* xmid = (xlow + xhigh)/2 */

+				ymid = Chebps2(xmid, coef, order);

+				if ((ylow * ymid) <= (Word32) 0)

+				{

+					yhigh = ymid;         

+					xhigh = xmid;          

+				} else

+				{

+					ylow = ymid;           

+					xlow = xmid;          

+				}

+			}

+			/*-------------------------------------------------------------*

+			 * Linear interpolation                                        *

+			 *    xint = xlow - ylow*(xhigh-xlow)/(yhigh-ylow);            *

+			 *-------------------------------------------------------------*/

+			x = xhigh - xlow;

+			y = yhigh - ylow;

+			if (y == 0)

+			{

+				xint = xlow;               

+			} else

+			{

+				sign = y;                 

+				y = abs_s(y);

+				exp = norm_s(y);

+				y = y << exp;

+				y = div_s((Word16) 16383, y);

+				t0 = x * y;

+				t0 = (t0 >> (19 - exp));

+				y = vo_extract_l(t0);         /* y= (xhigh-xlow)/(yhigh-ylow) in Q11 */

+				if (sign < 0)

+					y = -y;

+				t0 = ylow * y;      /* result in Q26 */

+				t0 = (t0 >> 10);        /* result in Q15 */

+				xint = vo_sub(xlow, vo_extract_l(t0));        /* xint = xlow - ylow*y */

+			}

+			isp[nf] = xint;                

+			xlow = xint;                   

+			nf++;                          

+			if (ip == 0)

+			{

+				ip = 1;                    

+				coef = f2;                

+				order = NC - 1;           

+			} else

+			{

+				ip = 0;                   

+				coef = f1;                 

+				order = NC;              

+			}

+			ylow = Chebps2(xlow, coef, order);

+		}

+	}

+	/* Check if M-1 roots found */

+	if(nf < M - 1)

+	{

+		for (i = 0; i < M; i++)

+		{

+			isp[i] = old_isp[i];          

+		}

+	} else

+	{

+		isp[M - 1] = a[M] << 3;                      /* From Q12 to Q15 with saturation */

+	}

+	return;

+}

+

+/*--------------------------------------------------------------*

+* function  Chebps2:                                           *

+*           ~~~~~~~                                            *

+*    Evaluates the Chebishev polynomial series                 *

+*--------------------------------------------------------------*

+*                                                              *

+*  The polynomial order is                                     *

+*     n = M/2   (M is the prediction order)                    *

+*  The polynomial is given by                                  *

+*    C(x) = f(0)T_n(x) + f(1)T_n-1(x) + ... +f(n-1)T_1(x) + f(n)/2 *

+* Arguments:                                                   *

+*  x:     input value of evaluation; x = cos(frequency) in Q15 *

+*  f[]:   coefficients of the pol.                      in Q11 *

+*  n:     order of the pol.                                    *

+*                                                              *

+* The value of C(x) is returned. (Satured to +-1.99 in Q14)    *

+*                                                              *

+*--------------------------------------------------------------*/

+

+static __inline Word16 Chebps2(Word16 x, Word16 f[], Word32 n)

+{

+	Word32 i, cheb;

+	Word16 b0_h, b0_l, b1_h, b1_l, b2_h, b2_l;

+	Word32 t0;

+

+	/* Note: All computation are done in Q24. */

+

+	t0 = f[0] << 13;

+	b2_h = t0 >> 16;

+	b2_l = (t0 & 0xffff)>>1;

+

+	t0 = ((b2_h * x)<<1) + (((b2_l * x)>>15)<<1);

+	t0 <<= 1;

+	t0 += (f[1] << 13);						/* + f[1] in Q24        */

+

+	b1_h = t0 >> 16;

+	b1_l = (t0 & 0xffff) >> 1;

+

+	for (i = 2; i < n; i++)

+	{

+		t0 = ((b1_h * x)<<1) + (((b1_l * x)>>15)<<1);

+

+		t0 += (b2_h * (-16384))<<1;

+		t0 += (f[i] << 12);

+		t0 <<= 1;

+		t0 -= (b2_l << 1);					/* t0 = 2.0*x*b1 - b2 + f[i]; */

+

+		b0_h = t0 >> 16;

+		b0_l = (t0 & 0xffff) >> 1;

+

+		b2_l = b1_l;                         /* b2 = b1; */

+		b2_h = b1_h;                       

+		b1_l = b0_l;                         /* b1 = b0; */

+		b1_h = b0_h;                       

+	}

+

+	t0 = ((b1_h * x)<<1) + (((b1_l * x)>>15)<<1);

+	t0 += (b2_h * (-32768))<<1;				/* t0 = x*b1 - b2          */

+	t0 -= (b2_l << 1);

+	t0 += (f[n] << 12);						/* t0 = x*b1 - b2 + f[i]/2 */

+

+	t0 = L_shl2(t0, 6);                     /* Q24 to Q30 with saturation */

+

+	cheb = extract_h(t0);                  /* Result in Q14              */

+

+	if (cheb == -32768)

+	{

+		cheb = -32767;                     /* to avoid saturation in Az_isp */

+	}

+	return (cheb);

+}

+

+

+

diff --git a/media/libstagefright/codecs/amrwbenc/src/bits.c b/media/libstagefright/codecs/amrwbenc/src/bits.c
new file mode 100644
index 0000000..90d1a00
--- /dev/null
+++ b/media/libstagefright/codecs/amrwbenc/src/bits.c
@@ -0,0 +1,210 @@
+/*

+ ** Copyright 2003-2010, VisualOn, Inc.

+ **

+ ** Licensed under the Apache License, Version 2.0 (the "License");

+ ** you may not use this file except in compliance with the License.

+ ** You may obtain a copy of the License at

+ **

+ **     http://www.apache.org/licenses/LICENSE-2.0

+ **

+ ** Unless required by applicable law or agreed to in writing, software

+ ** distributed under the License is distributed on an "AS IS" BASIS,

+ ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

+ ** See the License for the specific language governing permissions and

+ ** limitations under the License.

+ */

+

+/***********************************************************************

+       File: bits.c

+

+	   Description: Performs bit stream manipulation

+

+************************************************************************/

+

+#include <stdlib.h>

+#include <stdio.h>

+#include "typedef.h"

+#include "basic_op.h"

+#include "cnst.h"

+#include "bits.h"

+#include "acelp.h"

+#include "dtx.h"

+#include "mime_io.tab"

+

+

+int PackBits(Word16 prms[],             /*  i: analysis parameters */

+			 Word16 coding_mode,        /*  i: coding bit-stream ratio mode */

+			 Word16 mode,               /*  i: coding bit-stream ratio mode*/ 

+			 Coder_State *st            /*i/o: coder global parameters struct */           

+			 )

+{

+	Word16 i, frame_type;

+	UWord8 temp;

+	UWord8 *stream_ptr;

+	Word16 bitstreamformat = st->frameType;

+

+	unsigned short* dataOut = st->outputStream;

+

+	if (coding_mode == MRDTX)

+	{	   

+		st->sid_update_counter--;

+

+		if (st->prev_ft == TX_SPEECH)

+		{

+			frame_type = TX_SID_FIRST;

+			st->sid_update_counter = 3;

+		} else

+		{

+			if ((st->sid_handover_debt > 0) && (st->sid_update_counter > 2))

+			{

+				/* ensure extra updates are  properly delayed after a possible SID_FIRST */

+				frame_type = TX_SID_UPDATE;

+				st->sid_handover_debt--;

+			} else

+			{

+				if (st->sid_update_counter == 0)

+				{

+					frame_type = TX_SID_UPDATE;

+					st->sid_update_counter = 8;

+				} else

+				{

+					frame_type = TX_NO_DATA;

+				}

+			}

+		}

+	} else

+	{

+		st->sid_update_counter = 8;

+		frame_type = TX_SPEECH;

+	}

+	st->prev_ft = frame_type;

+

+	if(bitstreamformat == 0)				/* default file format */

+	{

+		*(dataOut) = TX_FRAME_TYPE;

+		*(dataOut + 1) = frame_type;

+		*(dataOut + 2) = mode;

+		for (i = 0; i < nb_of_bits[coding_mode]; i++)

+		{

+			*(dataOut + 3 + i) = prms[i];

+		}

+		return  (3 + nb_of_bits[coding_mode])<<1;

+	} else

+	{

+		if (bitstreamformat == 1)		/* ITU file format */

+		{  						

+			*(dataOut) = 0x6b21;

+			if(frame_type != TX_NO_DATA && frame_type != TX_SID_FIRST)

+			{

+				*(dataOut + 1) = nb_of_bits[coding_mode];

+				for (i = 0; i < nb_of_bits[coding_mode]; i++)

+				{

+					if(prms[i] == BIT_0){

+						*(dataOut + 2 + i) = BIT_0_ITU;	 			

+					}

+					else{

+						*(dataOut + 2 + i) = BIT_1_ITU;

+					}

+				}

+				return (2 + nb_of_bits[coding_mode])<<1;   

+			} else

+			{

+				*(dataOut + 1) = 0;

+				return 2<<1;	   

+			}

+		} else							/* MIME/storage file format */

+		{

+#define MRSID 9

+			/* change mode index in case of SID frame */

+			if (coding_mode == MRDTX)

+			{

+				coding_mode = MRSID;

+				if (frame_type == TX_SID_FIRST)

+				{

+					for (i = 0; i < NBBITS_SID; i++)	prms[i] = BIT_0;

+				}

+			}

+			/* -> force NO_DATA frame */

+			if (coding_mode < 0 || coding_mode > 15 || (coding_mode > MRSID && coding_mode < 14))

+			{

+				coding_mode = 15;

+			}

+			/* mark empty frames between SID updates as NO_DATA frames */

+			if (coding_mode == MRSID && frame_type == TX_NO_DATA)

+			{

+				coding_mode = 15;

+			}

+			/* set pointer for packed frame, note that we handle data as bytes */

+			stream_ptr = (UWord8*)dataOut;

+			/* insert table of contents (ToC) byte at the beginning of the packet */

+			*stream_ptr = toc_byte[coding_mode];

+			stream_ptr++;

+			temp = 0;

+			/* sort and pack AMR-WB speech or SID bits */

+			for (i = 1; i < unpacked_size[coding_mode] + 1; i++)

+			{

+				if (prms[sort_ptr[coding_mode][i-1]] == BIT_1)

+				{

+					temp++;

+				}

+				if (i&0x7)

+				{

+					temp <<= 1;

+				}

+				else

+				{

+					*stream_ptr = temp;

+					stream_ptr++;

+					temp = 0;

+				}

+			}

+			/* insert SID type indication and speech mode in case of SID frame */

+			if (coding_mode == MRSID)

+			{

+				if (frame_type == TX_SID_UPDATE)

+				{

+					temp++;

+				}

+				temp <<= 4;

+				temp += mode & 0x000F;

+			}

+			/* insert unused bits (zeros) at the tail of the last byte */

+			if (unused_size[coding_mode])

+			{

+				temp <<= (unused_size[coding_mode] - 1);

+			}

+			*stream_ptr = temp;

+			/* write packed frame into file (1 byte added to cover ToC entry) */

+			return (1 + packed_size[coding_mode]);

+		}

+	}

+}

+

+/*-----------------------------------------------------*

+* Parm_serial -> convert parameters to serial stream  *

+*-----------------------------------------------------*/

+

+void Parm_serial(

+		Word16 value,                         /* input : parameter value */

+		Word16 no_of_bits,                    /* input : number of bits  */

+		Word16 ** prms

+		)

+{

+	Word16 i, bit;

+	*prms += no_of_bits;                  

+	for (i = 0; i < no_of_bits; i++)

+	{

+		bit = (Word16) (value & 0x0001);    /* get lsb */

+		if (bit == 0)

+			*--(*prms) = BIT_0;

+		else

+			*--(*prms) = BIT_1;

+		value >>= 1;          

+	}

+	*prms += no_of_bits;                  

+	return;

+}

+

+

+

+

diff --git a/media/libstagefright/codecs/amrwbenc/src/c2t64fx.c b/media/libstagefright/codecs/amrwbenc/src/c2t64fx.c
new file mode 100644
index 0000000..39fc4c5
--- /dev/null
+++ b/media/libstagefright/codecs/amrwbenc/src/c2t64fx.c
@@ -0,0 +1,297 @@
+/*

+ ** Copyright 2003-2010, VisualOn, Inc.

+ **

+ ** Licensed under the Apache License, Version 2.0 (the "License");

+ ** you may not use this file except in compliance with the License.

+ ** You may obtain a copy of the License at

+ **

+ **     http://www.apache.org/licenses/LICENSE-2.0

+ **

+ ** Unless required by applicable law or agreed to in writing, software

+ ** distributed under the License is distributed on an "AS IS" BASIS,

+ ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

+ ** See the License for the specific language governing permissions and

+ ** limitations under the License.

+ */

+

+/************************************************************************

+*      File: c2t64fx.c                                                  *

+*                                                                       *

+*	   Description:Performs algebraic codebook search for 6.60kbits mode*

+*                                                                       *

+*************************************************************************/

+

+#include "typedef.h"

+#include "basic_op.h"

+#include "math_op.h"

+#include "acelp.h"

+#include "cnst.h"

+

+#define NB_TRACK  2

+#define STEP      2

+#define NB_POS    32

+#define MSIZE     1024

+

+/*************************************************************************

+* Function:  ACELP_2t64_fx()                                             *

+*                                                                        *

+* 12 bits algebraic codebook.                                            *

+* 2 tracks x 32 positions per track = 64 samples.                        *

+*                                                                        *

+* 12 bits --> 2 pulses in a frame of 64 samples.                         *

+*                                                                        *

+* All pulses can have two (2) possible amplitudes: +1 or -1.             *

+* Each pulse can have 32 possible positions.                             *

+**************************************************************************/

+

+void ACELP_2t64_fx(

+		Word16 dn[],                          /* (i) <12b : correlation between target x[] and H[]      */

+		Word16 cn[],                          /* (i) <12b : residual after long term prediction         */

+		Word16 H[],                           /* (i) Q12: impulse response of weighted synthesis filter */

+		Word16 code[],                        /* (o) Q9 : algebraic (fixed) codebook excitation         */

+		Word16 y[],                           /* (o) Q9 : filtered fixed codebook excitation            */

+		Word16 * index                        /* (o) : index (12): 5+1+5+1 = 11 bits.                   */

+		)

+{

+	Word32 i, j, k, i0, i1, ix, iy, pos, pos2;

+	Word16 ps, psk, ps1, ps2, alpk, alp1, alp2, sq;

+	Word16 alp, val, exp, k_cn, k_dn;

+	Word16 *p0, *p1, *p2, *psign;

+	Word16 *h, *h_inv, *ptr_h1, *ptr_h2, *ptr_hf;

+

+	Word16 sign[L_SUBFR], vec[L_SUBFR], dn2[L_SUBFR];

+	Word16 h_buf[4 * L_SUBFR] = {0};

+	Word16 rrixix[NB_TRACK][NB_POS];

+	Word16 rrixiy[MSIZE];

+	Word32 s, cor;

+

+	/*----------------------------------------------------------------*

+	 * Find sign for each pulse position.                             *

+	 *----------------------------------------------------------------*/

+	alp = 8192;                              /* alp = 2.0 (Q12) */

+

+	/* calculate energy for normalization of cn[] and dn[] */

+	/* set k_cn = 32..32767 (ener_cn = 2^30..256-0) */

+#ifdef ASM_OPT             /* asm optimization branch */

+	s = Dot_product12_asm(cn, cn, L_SUBFR, &exp);

+#else

+	s = Dot_product12(cn, cn, L_SUBFR, &exp);

+#endif

+

+	Isqrt_n(&s, &exp);

+	s = L_shl(s, add1(exp, 5));             

+	k_cn = vo_round(s);

+

+	/* set k_dn = 32..512 (ener_dn = 2^30..2^22) */

+#ifdef ASM_OPT                  /* asm optimization branch */

+	s = Dot_product12_asm(dn, dn, L_SUBFR, &exp);

+#else

+	s = Dot_product12(dn, dn, L_SUBFR, &exp);

+#endif

+

+	Isqrt_n(&s, &exp);

+	k_dn = vo_round(L_shl(s, (exp + 8)));    /* k_dn = 256..4096 */

+	k_dn = vo_mult_r(alp, k_dn);              /* alp in Q12 */

+

+	/* mix normalized cn[] and dn[] */

+	p0 = cn;

+	p1 = dn;

+	p2 = dn2;

+

+	for (i = 0; i < L_SUBFR/4; i++)

+	{

+		s = (k_cn* (*p0++))+(k_dn * (*p1++));

+		*p2++ = s >> 7;

+		s = (k_cn* (*p0++))+(k_dn * (*p1++));

+		*p2++ = s >> 7;

+		s = (k_cn* (*p0++))+(k_dn * (*p1++));

+		*p2++ = s >> 7;

+		s = (k_cn* (*p0++))+(k_dn * (*p1++));

+		*p2++ = s >> 7; 

+	}

+

+	/* set sign according to dn2[] = k_cn*cn[] + k_dn*dn[]    */

+	for (i = 0; i < L_SUBFR; i ++)

+	{

+		val = dn[i];                   

+		ps = dn2[i];                   

+		if (ps >= 0)

+		{

+			sign[i] = 32767;             /* sign = +1 (Q12) */

+			vec[i] = -32768;           

+		} else

+		{

+			sign[i] = -32768;            /* sign = -1 (Q12) */

+			vec[i] = 32767;            

+			dn[i] = -val;

+		}

+	}

+	/*------------------------------------------------------------*

+	 * Compute h_inv[i].                                          *

+	 *------------------------------------------------------------*/

+	/* impulse response buffer for fast computation */

+	h = h_buf + L_SUBFR;                             

+	h_inv = h + (L_SUBFR<<1);         

+

+	for (i = 0; i < L_SUBFR; i++)

+	{

+		h[i] = H[i];                       

+		h_inv[i] = vo_negate(h[i]);           

+	}

+

+	/*------------------------------------------------------------*

+	 * Compute rrixix[][] needed for the codebook search.         *

+	 * Result is multiplied by 0.5                                *

+	 *------------------------------------------------------------*/

+	/* Init pointers to last position of rrixix[] */

+	p0 = &rrixix[0][NB_POS - 1];           

+	p1 = &rrixix[1][NB_POS - 1];           

+

+	ptr_h1 = h;                            

+	cor = 0x00010000L;                          /* for rounding */

+	for (i = 0; i < NB_POS; i++)

+	{

+		cor += ((*ptr_h1) * (*ptr_h1) << 1);

+		ptr_h1++;

+		*p1-- = (extract_h(cor) >> 1);            

+		cor += ((*ptr_h1) * (*ptr_h1) << 1);

+		ptr_h1++;

+		*p0-- = (extract_h(cor) >> 1);            

+	}

+

+	/*------------------------------------------------------------*

+	 * Compute rrixiy[][] needed for the codebook search.         *

+	 *------------------------------------------------------------*/

+	pos = MSIZE - 1;                       

+	pos2 = MSIZE - 2;                      

+	ptr_hf = h + 1;                        

+

+	for (k = 0; k < NB_POS; k++)

+	{

+		p1 = &rrixiy[pos];                 

+		p0 = &rrixiy[pos2];                

+		cor = 0x00008000L;                        /* for rounding */

+		ptr_h1 = h;                        

+		ptr_h2 = ptr_hf;                   

+

+		for (i = (k + 1); i < NB_POS; i++)

+		{

+			cor += ((*ptr_h1) * (*ptr_h2))<<1;

+			ptr_h1++;

+			ptr_h2++;

+			*p1 = extract_h(cor);          

+			cor += ((*ptr_h1) * (*ptr_h2))<<1;

+			ptr_h1++;

+			ptr_h2++;

+			*p0 = extract_h(cor);         

+

+			p1 -= (NB_POS + 1);

+			p0 -= (NB_POS + 1);

+		}

+		cor += ((*ptr_h1) * (*ptr_h2))<<1;

+		ptr_h1++;

+		ptr_h2++;

+		*p1 = extract_h(cor);              

+

+		pos -= NB_POS;

+		pos2--;

+		ptr_hf += STEP;

+	}

+

+	/*------------------------------------------------------------*

+	 * Modification of rrixiy[][] to take signs into account.     *

+	 *------------------------------------------------------------*/

+	p0 = rrixiy;                          

+	for (i = 0; i < L_SUBFR; i += STEP)

+	{

+		psign = sign;                      

+		if (psign[i] < 0)

+		{

+			psign = vec;                   

+		}

+		for (j = 1; j < L_SUBFR; j += STEP)

+		{

+			*p0 = vo_mult(*p0, psign[j]);     

+			p0++;

+		}

+	}

+	/*-------------------------------------------------------------------*

+	 * search 2 pulses:                                                  *

+	 * ~@~~~~~~~~~~~~~~                                                  *

+	 * 32 pos x 32 pos = 1024 tests (all combinaisons is tested)         *

+	 *-------------------------------------------------------------------*/

+	p0 = rrixix[0];                        

+	p1 = rrixix[1];                        

+	p2 = rrixiy;                          

+

+	psk = -1;                              

+	alpk = 1;                              

+	ix = 0;                                

+	iy = 1;                                

+

+	for (i0 = 0; i0 < L_SUBFR; i0 += STEP)

+	{

+		ps1 = dn[i0];                      

+		alp1 = (*p0++);                    

+		pos = -1;                          

+		for (i1 = 1; i1 < L_SUBFR; i1 += STEP)

+		{

+			ps2 = add1(ps1, dn[i1]);

+			alp2 = add1(alp1, add1(*p1++, *p2++));

+			sq = vo_mult(ps2, ps2);

+			s = vo_L_mult(alpk, sq) - ((psk * alp2)<<1);

+			if (s > 0)

+			{

+				psk = sq;                  

+				alpk = alp2;               

+				pos = i1;                  

+			}

+		}

+		p1 -= NB_POS;

+		if (pos >= 0)

+		{

+			ix = i0;                      

+			iy = pos;                      

+		}

+	}

+	/*-------------------------------------------------------------------*

+	 * Build the codeword, the filtered codeword and index of codevector.*

+	 *-------------------------------------------------------------------*/

+

+	for (i = 0; i < L_SUBFR; i++)

+	{

+		code[i] = 0;                       

+	}

+

+	i0 = (ix >> 1);                       /* pos of pulse 1 (0..31) */

+	i1 = (iy >> 1);                       /* pos of pulse 2 (0..31) */

+	if (sign[ix] > 0)

+	{

+		code[ix] = 512;                     /* codeword in Q9 format */

+		p0 = h - ix;                       

+	} else

+	{

+		code[ix] = -512;                   

+		i0 += NB_POS;                      

+		p0 = h_inv - ix;                   

+	}

+	if (sign[iy] > 0)

+	{

+		code[iy] = 512;                    

+		p1 = h - iy;                       

+	} else

+	{

+		code[iy] = -512;                   

+		i1 += NB_POS;                      

+		p1 = h_inv - iy;                   

+	}

+	*index = add1((i0 << 6), i1);          

+	for (i = 0; i < L_SUBFR; i++)

+	{

+		y[i] = vo_shr_r(add1((*p0++), (*p1++)), 3);

+	}

+	return;

+}

+

+

+

diff --git a/media/libstagefright/codecs/amrwbenc/src/c4t64fx.c b/media/libstagefright/codecs/amrwbenc/src/c4t64fx.c
new file mode 100644
index 0000000..27ba95d
--- /dev/null
+++ b/media/libstagefright/codecs/amrwbenc/src/c4t64fx.c
@@ -0,0 +1,1043 @@
+/*

+ ** Copyright 2003-2010, VisualOn, Inc.

+ **

+ ** Licensed under the Apache License, Version 2.0 (the "License");

+ ** you may not use this file except in compliance with the License.

+ ** You may obtain a copy of the License at

+ **

+ **     http://www.apache.org/licenses/LICENSE-2.0

+ **

+ ** Unless required by applicable law or agreed to in writing, software

+ ** distributed under the License is distributed on an "AS IS" BASIS,

+ ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

+ ** See the License for the specific language governing permissions and

+ ** limitations under the License.

+ */

+

+/***********************************************************************

+*      File: c4t64fx.c                                                 *

+*                                                                      *

+*	   Description:Performs algebraic codebook search for higher modes *

+*                                                                      *

+************************************************************************/

+

+/************************************************************************

+* Function: ACELP_4t64_fx()                                             *

+*                                                                       *

+* 20, 36, 44, 52, 64, 72, 88 bits algebraic codebook.                   *

+* 4 tracks x 16 positions per track = 64 samples.                       *

+*                                                                       *

+* 20 bits --> 4 pulses in a frame of 64 samples.                        *

+* 36 bits --> 8 pulses in a frame of 64 samples.                        *

+* 44 bits --> 10 pulses in a frame of 64 samples.                       *

+* 52 bits --> 12 pulses in a frame of 64 samples.                       *

+* 64 bits --> 16 pulses in a frame of 64 samples.                       *

+* 72 bits --> 18 pulses in a frame of 64 samples.                       *

+* 88 bits --> 24 pulses in a frame of 64 samples.                       *

+*                                                                       *

+* All pulses can have two (2) possible amplitudes: +1 or -1.            *

+* Each pulse can have sixteen (16) possible positions.                  *

+*************************************************************************/

+

+#include "typedef.h"

+#include "basic_op.h"

+#include "math_op.h"

+#include "acelp.h"

+#include "cnst.h"

+

+#include "q_pulse.h"

+

+static Word16 tipos[36] = {

+	0, 1, 2, 3,                            /* starting point &ipos[0], 1st iter */

+	1, 2, 3, 0,                            /* starting point &ipos[4], 2nd iter */

+	2, 3, 0, 1,                            /* starting point &ipos[8], 3rd iter */

+	3, 0, 1, 2,                            /* starting point &ipos[12], 4th iter */

+	0, 1, 2, 3,

+	1, 2, 3, 0,

+	2, 3, 0, 1,

+	3, 0, 1, 2,

+	0, 1, 2, 3};                           /* end point for 24 pulses &ipos[35], 4th iter */

+

+#define NB_PULSE_MAX  24

+

+#define L_SUBFR   64

+#define NB_TRACK  4

+#define STEP      4

+#define NB_POS    16

+#define MSIZE     256

+#define NB_MAX    8

+#define NPMAXPT   ((NB_PULSE_MAX+NB_TRACK-1)/NB_TRACK)

+

+/* Private functions */

+void cor_h_vec_012(

+		Word16 h[],                           /* (i) scaled impulse response                 */

+		Word16 vec[],                         /* (i) scaled vector (/8) to correlate with h[] */

+		Word16 track,                         /* (i) track to use                            */

+		Word16 sign[],                        /* (i) sign vector                             */

+		Word16 rrixix[][NB_POS],              /* (i) correlation of h[x] with h[x]      */

+		Word16 cor_1[],                       /* (o) result of correlation (NB_POS elements) */

+		Word16 cor_2[]                        /* (o) result of correlation (NB_POS elements) */

+		);

+

+void cor_h_vec_012_asm(

+		Word16 h[],                           /* (i) scaled impulse response                 */

+		Word16 vec[],                         /* (i) scaled vector (/8) to correlate with h[] */

+		Word16 track,                         /* (i) track to use                            */

+		Word16 sign[],                        /* (i) sign vector                             */

+		Word16 rrixix[][NB_POS],              /* (i) correlation of h[x] with h[x]      */

+		Word16 cor_1[],                       /* (o) result of correlation (NB_POS elements) */

+		Word16 cor_2[]                        /* (o) result of correlation (NB_POS elements) */

+		);

+

+void cor_h_vec_30(

+		Word16 h[],                           /* (i) scaled impulse response                 */

+		Word16 vec[],                         /* (i) scaled vector (/8) to correlate with h[] */

+		Word16 track,                         /* (i) track to use                            */

+		Word16 sign[],                        /* (i) sign vector                             */

+		Word16 rrixix[][NB_POS],              /* (i) correlation of h[x] with h[x]      */

+		Word16 cor_1[],                       /* (o) result of correlation (NB_POS elements) */

+		Word16 cor_2[]                        /* (o) result of correlation (NB_POS elements) */

+		);

+

+void search_ixiy(

+		Word16 nb_pos_ix,                     /* (i) nb of pos for pulse 1 (1..8)       */

+		Word16 track_x,                       /* (i) track of pulse 1                   */

+		Word16 track_y,                       /* (i) track of pulse 2                   */

+		Word16 * ps,                          /* (i/o) correlation of all fixed pulses  */

+		Word16 * alp,                         /* (i/o) energy of all fixed pulses       */

+		Word16 * ix,                          /* (o) position of pulse 1                */

+		Word16 * iy,                          /* (o) position of pulse 2                */

+		Word16 dn[],                          /* (i) corr. between target and h[]       */

+		Word16 dn2[],                         /* (i) vector of selected positions       */

+		Word16 cor_x[],                       /* (i) corr. of pulse 1 with fixed pulses */

+		Word16 cor_y[],                       /* (i) corr. of pulse 2 with fixed pulses */

+		Word16 rrixiy[][MSIZE]                /* (i) corr. of pulse 1 with pulse 2   */

+		);

+

+

+void ACELP_4t64_fx(

+		Word16 dn[],                          /* (i) <12b : correlation between target x[] and H[]      */

+		Word16 cn[],                          /* (i) <12b : residual after long term prediction         */

+		Word16 H[],                           /* (i) Q12: impulse response of weighted synthesis filter */

+		Word16 code[],                        /* (o) Q9 : algebraic (fixed) codebook excitation         */

+		Word16 y[],                           /* (o) Q9 : filtered fixed codebook excitation            */

+		Word16 nbbits,                        /* (i) : 20, 36, 44, 52, 64, 72 or 88 bits                */

+		Word16 ser_size,                      /* (i) : bit rate                                         */

+		Word16 _index[]                       /* (o) : index (20): 5+5+5+5 = 20 bits.                   */

+		/* (o) : index (36): 9+9+9+9 = 36 bits.                   */

+		/* (o) : index (44): 13+9+13+9 = 44 bits.                 */

+		/* (o) : index (52): 13+13+13+13 = 52 bits.               */

+		/* (o) : index (64): 2+2+2+2+14+14+14+14 = 64 bits.       */

+		/* (o) : index (72): 10+2+10+2+10+14+10+14 = 72 bits.     */

+		/* (o) : index (88): 11+11+11+11+11+11+11+11 = 88 bits.   */

+		)

+{

+	Word32 i, j, k;

+	Word16 st, ix, iy, pos, index, track, nb_pulse, nbiter, j_temp;

+	Word16 psk, ps, alpk, alp, val, k_cn, k_dn, exp;

+	Word16 *p0, *p1, *p2, *p3, *psign;

+	Word16 *h, *h_inv, *ptr_h1, *ptr_h2, *ptr_hf, h_shift;

+	Word32 s, cor, L_tmp, L_index;

+	Word16 dn2[L_SUBFR], sign[L_SUBFR], vec[L_SUBFR];

+	Word16 ind[NPMAXPT * NB_TRACK];

+	Word16 codvec[NB_PULSE_MAX], nbpos[10];

+	Word16 cor_x[NB_POS], cor_y[NB_POS], pos_max[NB_TRACK];

+	Word16 h_buf[4 * L_SUBFR];

+	Word16 rrixix[NB_TRACK][NB_POS], rrixiy[NB_TRACK][MSIZE];

+	Word16 ipos[NB_PULSE_MAX];

+

+	switch (nbbits)

+	{

+		case 20:                               /* 20 bits, 4 pulses, 4 tracks */

+			nbiter = 4;                          /* 4x16x16=1024 loop */

+			alp = 8192;                          /* alp = 2.0 (Q12) */

+			nb_pulse = 4;                      

+			nbpos[0] = 4;                      

+			nbpos[1] = 8;                      

+			break;

+		case 36:                               /* 36 bits, 8 pulses, 4 tracks */

+			nbiter = 4;                          /* 4x20x16=1280 loop */

+			alp = 4096;                          /* alp = 1.0 (Q12) */

+			nb_pulse = 8;                      

+			nbpos[0] = 4;                      

+			nbpos[1] = 8;                      

+			nbpos[2] = 8;                      

+			break;

+		case 44:                               /* 44 bits, 10 pulses, 4 tracks */

+			nbiter = 4;                          /* 4x26x16=1664 loop */

+			alp = 4096;                          /* alp = 1.0 (Q12) */

+			nb_pulse = 10;                     

+			nbpos[0] = 4;                      

+			nbpos[1] = 6;                      

+			nbpos[2] = 8;                      

+			nbpos[3] = 8;                      

+			break;

+		case 52:                               /* 52 bits, 12 pulses, 4 tracks */

+			nbiter = 4;                          /* 4x26x16=1664 loop */

+			alp = 4096;                          /* alp = 1.0 (Q12) */

+			nb_pulse = 12;                     

+			nbpos[0] = 4;                      

+			nbpos[1] = 6;                      

+			nbpos[2] = 8;                      

+			nbpos[3] = 8;                      

+			break;

+		case 64:                               /* 64 bits, 16 pulses, 4 tracks */

+			nbiter = 3;                          /* 3x36x16=1728 loop */

+			alp = 3277;                          /* alp = 0.8 (Q12) */

+			nb_pulse = 16;                     

+			nbpos[0] = 4;                      

+			nbpos[1] = 4;                      

+			nbpos[2] = 6;                      

+			nbpos[3] = 6;                      

+			nbpos[4] = 8;                      

+			nbpos[5] = 8;                      

+			break;

+		case 72:                               /* 72 bits, 18 pulses, 4 tracks */

+			nbiter = 3;                          /* 3x35x16=1680 loop */

+			alp = 3072;                          /* alp = 0.75 (Q12) */

+			nb_pulse = 18;                     

+			nbpos[0] = 2;                      

+			nbpos[1] = 3;                      

+			nbpos[2] = 4;                      

+			nbpos[3] = 5;                      

+			nbpos[4] = 6;                      

+			nbpos[5] = 7;                      

+			nbpos[6] = 8;                      

+			break;

+		case 88:                               /* 88 bits, 24 pulses, 4 tracks */

+			if(ser_size > 462)

+				nbiter = 1;

+			else

+				nbiter = 2;                    /* 2x53x16=1696 loop */

+

+			alp = 2048;                          /* alp = 0.5 (Q12) */

+			nb_pulse = 24;                     

+			nbpos[0] = 2;                      

+			nbpos[1] = 2;                      

+			nbpos[2] = 3;                      

+			nbpos[3] = 4;                      

+			nbpos[4] = 5;                      

+			nbpos[5] = 6;                      

+			nbpos[6] = 7;                      

+			nbpos[7] = 8;                      

+			nbpos[8] = 8;                      

+			nbpos[9] = 8;                      

+			break;

+		default:

+			nbiter = 0;

+			alp = 0;

+			nb_pulse = 0;

+	}

+

+	for (i = 0; i < nb_pulse; i++)

+	{

+		codvec[i] = i;                     

+	}

+

+	/*----------------------------------------------------------------*

+	 * Find sign for each pulse position.                             *

+	 *----------------------------------------------------------------*/

+	/* calculate energy for normalization of cn[] and dn[] */

+	/* set k_cn = 32..32767 (ener_cn = 2^30..256-0) */

+#ifdef ASM_OPT                  /* asm optimization branch */

+	s = Dot_product12_asm(cn, cn, L_SUBFR, &exp);

+#else

+	s = Dot_product12(cn, cn, L_SUBFR, &exp);

+#endif

+

+	Isqrt_n(&s, &exp);

+	s = L_shl(s, (exp + 5)); 

+	k_cn = extract_h(L_add(s, 0x8000));

+

+	/* set k_dn = 32..512 (ener_dn = 2^30..2^22) */

+#ifdef ASM_OPT                      /* asm optimization branch */

+	s = Dot_product12_asm(dn, dn, L_SUBFR, &exp);

+#else

+	s = Dot_product12(dn, dn, L_SUBFR, &exp);

+#endif

+

+	Isqrt_n(&s, &exp);

+	k_dn = (L_shl(s, (exp + 5 + 3)) + 0x8000) >> 16;    /* k_dn = 256..4096 */

+	k_dn = vo_mult_r(alp, k_dn);              /* alp in Q12 */

+

+	/* mix normalized cn[] and dn[] */

+	p0 = cn;

+	p1 = dn;

+	p2 = dn2;

+

+	for (i = 0; i < L_SUBFR/4; i++)

+	{

+		s = (k_cn* (*p0++))+(k_dn * (*p1++));

+		*p2++ = s >> 7;

+		s = (k_cn* (*p0++))+(k_dn * (*p1++));

+		*p2++ = s >> 7;

+		s = (k_cn* (*p0++))+(k_dn * (*p1++));

+		*p2++ = s >> 7;

+		s = (k_cn* (*p0++))+(k_dn * (*p1++));

+		*p2++ = s >> 7; 

+	}

+

+	/* set sign according to dn2[] = k_cn*cn[] + k_dn*dn[]    */

+	for(i = 0; i < L_SUBFR; i++)

+	{

+		val = dn[i];                   

+		ps = dn2[i];                   

+		if (ps >= 0)

+		{

+			sign[i] = 32767;             /* sign = +1 (Q12) */

+			vec[i] = -32768;           

+		} else

+		{

+			sign[i] = -32768;            /* sign = -1 (Q12) */

+			vec[i] = 32767;            

+			dn[i] = -val;

+			dn2[i] = -ps;

+		}

+	}

+	/*----------------------------------------------------------------*

+	 * Select NB_MAX position per track according to max of dn2[].    *

+	 *----------------------------------------------------------------*/

+	pos = 0;

+	for (i = 0; i < NB_TRACK; i++)

+	{

+		for (k = 0; k < NB_MAX; k++)

+		{

+			ps = -1;                       

+			for (j = i; j < L_SUBFR; j += STEP)

+			{

+				if(dn2[j] > ps)

+				{

+					ps = dn2[j];          

+					pos = j;               

+				}

+			}

+			dn2[pos] = (k - NB_MAX);     /* dn2 < 0 when position is selected */

+			if (k == 0)

+			{

+				pos_max[i] = pos;          

+			}

+		}

+	}

+

+	/*--------------------------------------------------------------*

+	 * Scale h[] to avoid overflow and to get maximum of precision  *

+	 * on correlation.                                              *

+	 *                                                              *

+	 * Maximum of h[] (h[0]) is fixed to 2048 (MAX16 / 16).         *

+	 *  ==> This allow addition of 16 pulses without saturation.    *

+	 *                                                              *

+	 * Energy worst case (on resonant impulse response),            *

+	 * - energy of h[] is approximately MAX/16.                     *

+	 * - During search, the energy is divided by 8 to avoid         *

+	 *   overflow on "alp". (energy of h[] = MAX/128).              *

+	 *  ==> "alp" worst case detected is 22854 on sinusoidal wave.  *

+	 *--------------------------------------------------------------*/

+

+	/* impulse response buffer for fast computation */

+

+	h = h_buf;                             

+	h_inv = h_buf + (2 * L_SUBFR);   

+	L_tmp = 0;

+	for (i = 0; i < L_SUBFR; i++)

+	{

+		*h++ = 0;                          

+		*h_inv++ = 0;   

+		L_tmp += (H[i] * H[i]) << 1;

+	}

+	/* scale h[] down (/2) when energy of h[] is high with many pulses used */

+	val = extract_h(L_tmp);

+	h_shift = 0;                           

+

+	if ((nb_pulse >= 12) && (val > 1024))

+	{

+		h_shift = 1;                       

+	}

+	p0 = H;

+	p1 = h;

+	p2 = h_inv;

+

+	for (i = 0; i < L_SUBFR/4; i++)

+	{

+		*p1 = *p0++ >> h_shift;         

+		*p2++ = -(*p1++);  

+		*p1 = *p0++ >> h_shift;         

+		*p2++ = -(*p1++); 

+		*p1 = *p0++ >> h_shift;         

+		*p2++ = -(*p1++); 

+		*p1 = *p0++ >> h_shift;         

+		*p2++ = -(*p1++); 

+	}

+

+	/*------------------------------------------------------------*

+	 * Compute rrixix[][] needed for the codebook search.         *

+	 * This algorithm compute impulse response energy of all      *

+	 * positions (16) in each track (4).       Total = 4x16 = 64. *

+	 *------------------------------------------------------------*/

+

+	/* storage order --> i3i3, i2i2, i1i1, i0i0 */

+

+	/* Init pointers to last position of rrixix[] */

+	p0 = &rrixix[0][NB_POS - 1];           

+	p1 = &rrixix[1][NB_POS - 1];           

+	p2 = &rrixix[2][NB_POS - 1];           

+	p3 = &rrixix[3][NB_POS - 1];           

+

+	ptr_h1 = h;                            

+	cor = 0x00008000L;                             /* for rounding */

+	for (i = 0; i < NB_POS; i++)

+	{

+		cor += vo_L_mult((*ptr_h1), (*ptr_h1));

+		ptr_h1++;

+		*p3-- = extract_h(cor);            

+		cor += vo_L_mult((*ptr_h1), (*ptr_h1));

+		ptr_h1++;

+		*p2-- = extract_h(cor);            

+		cor += vo_L_mult((*ptr_h1), (*ptr_h1));

+		ptr_h1++;

+		*p1-- = extract_h(cor);            

+		cor += vo_L_mult((*ptr_h1), (*ptr_h1));

+		ptr_h1++;

+		*p0-- = extract_h(cor);            

+	}

+

+	/*------------------------------------------------------------*

+	 * Compute rrixiy[][] needed for the codebook search.         *

+	 * This algorithm compute correlation between 2 pulses        *

+	 * (2 impulses responses) in 4 possible adjacents tracks.     *

+	 * (track 0-1, 1-2, 2-3 and 3-0).     Total = 4x16x16 = 1024. *

+	 *------------------------------------------------------------*/

+

+	/* storage order --> i2i3, i1i2, i0i1, i3i0 */

+

+	pos = MSIZE - 1;                       

+	ptr_hf = h + 1;                        

+

+	for (k = 0; k < NB_POS; k++)

+	{

+		p3 = &rrixiy[2][pos];              

+		p2 = &rrixiy[1][pos];              

+		p1 = &rrixiy[0][pos];              

+		p0 = &rrixiy[3][pos - NB_POS];     

+

+		cor = 0x00008000L;                   /* for rounding */

+		ptr_h1 = h;                        

+		ptr_h2 = ptr_hf;                   

+

+		for (i = k + 1; i < NB_POS; i++)

+		{

+			cor += vo_L_mult((*ptr_h1), (*ptr_h2));

+			ptr_h1++;

+			ptr_h2++;

+			*p3 = extract_h(cor);          

+			cor += vo_L_mult((*ptr_h1), (*ptr_h2));

+			ptr_h1++;

+			ptr_h2++;

+			*p2 = extract_h(cor);          

+			cor += vo_L_mult((*ptr_h1), (*ptr_h2));

+			ptr_h1++;

+			ptr_h2++;

+			*p1 = extract_h(cor);          

+			cor += vo_L_mult((*ptr_h1), (*ptr_h2));

+			ptr_h1++;

+			ptr_h2++;

+			*p0 = extract_h(cor);         

+

+			p3 -= (NB_POS + 1);

+			p2 -= (NB_POS + 1);

+			p1 -= (NB_POS + 1);

+			p0 -= (NB_POS + 1);

+		}

+		cor += vo_L_mult((*ptr_h1), (*ptr_h2));

+		ptr_h1++;

+		ptr_h2++;

+		*p3 = extract_h(cor);              

+		cor += vo_L_mult((*ptr_h1), (*ptr_h2));

+		ptr_h1++;

+		ptr_h2++;

+		*p2 = extract_h(cor);              

+		cor += vo_L_mult((*ptr_h1), (*ptr_h2));

+		ptr_h1++;

+		ptr_h2++;

+		*p1 = extract_h(cor);              

+

+		pos -= NB_POS;

+		ptr_hf += STEP;

+	}

+

+	/* storage order --> i3i0, i2i3, i1i2, i0i1 */

+

+	pos = MSIZE - 1;                       

+	ptr_hf = h + 3;                        

+

+	for (k = 0; k < NB_POS; k++)

+	{

+		p3 = &rrixiy[3][pos];              

+		p2 = &rrixiy[2][pos - 1];          

+		p1 = &rrixiy[1][pos - 1];          

+		p0 = &rrixiy[0][pos - 1];          

+

+		cor = 0x00008000L;								/* for rounding */

+		ptr_h1 = h;                        

+		ptr_h2 = ptr_hf;                   

+

+		for (i = k + 1; i < NB_POS; i++)

+		{

+			cor += vo_L_mult((*ptr_h1), (*ptr_h2));

+			ptr_h1++;

+			ptr_h2++;

+			*p3 = extract_h(cor);          

+			cor += vo_L_mult((*ptr_h1), (*ptr_h2));

+			ptr_h1++;

+			ptr_h2++;

+			*p2 = extract_h(cor);          

+			cor += vo_L_mult((*ptr_h1), (*ptr_h2));

+			ptr_h1++;

+			ptr_h2++;

+			*p1 = extract_h(cor);          

+			cor += vo_L_mult((*ptr_h1), (*ptr_h2));

+			ptr_h1++;

+			ptr_h2++;

+			*p0 = extract_h(cor);          

+

+			p3 -= (NB_POS + 1);

+			p2 -= (NB_POS + 1);

+			p1 -= (NB_POS + 1);

+			p0 -= (NB_POS + 1);

+		}

+		cor += vo_L_mult((*ptr_h1), (*ptr_h2));

+		ptr_h1++;

+		ptr_h2++;

+		*p3 = extract_h(cor);              

+

+		pos--;

+		ptr_hf += STEP;

+	}

+

+	/*------------------------------------------------------------*

+	 * Modification of rrixiy[][] to take signs into account.     *

+	 *------------------------------------------------------------*/

+

+	p0 = &rrixiy[0][0];                    

+

+	for (k = 0; k < NB_TRACK; k++)

+	{

+		j_temp = (k + 1)&0x03;

+		for (i = k; i < L_SUBFR; i += STEP)

+		{

+			psign = sign;                  

+			if (psign[i] < 0)

+			{

+				psign = vec;               

+			}

+			j = j_temp;

+			for (; j < L_SUBFR; j += STEP)

+			{

+				*p0 = vo_mult(*p0, psign[j]);    

+				p0++;

+			}

+		}

+	}

+

+	/*-------------------------------------------------------------------*

+	 *                       Deep first search                           *

+	 *-------------------------------------------------------------------*/

+

+	psk = -1;                              

+	alpk = 1;                              

+

+	for (k = 0; k < nbiter; k++)

+	{

+		j_temp = k<<2;

+		for (i = 0; i < nb_pulse; i++)

+			ipos[i] = tipos[j_temp + i];

+

+		if(nbbits == 20)

+		{

+			pos = 0;                       

+			ps = 0;                        

+			alp = 0;                       

+			for (i = 0; i < L_SUBFR; i++)

+			{

+				vec[i] = 0;                

+			}

+		} else if ((nbbits == 36) || (nbbits == 44))

+		{

+			/* first stage: fix 2 pulses */

+			pos = 2;

+

+			ix = ind[0] = pos_max[ipos[0]];

+			iy = ind[1] = pos_max[ipos[1]];

+			ps = dn[ix] + dn[iy];

+			i = ix >> 2;                /* ix / STEP */

+			j = iy >> 2;                /* iy / STEP */

+			s = rrixix[ipos[0]][i] << 13;

+			s += rrixix[ipos[1]][j] << 13;

+			i = (i << 4) + j;         /* (ix/STEP)*NB_POS + (iy/STEP) */

+			s += rrixiy[ipos[0]][i] << 14;

+			alp = (s + 0x8000) >> 16;

+			if (sign[ix] < 0)

+				p0 = h_inv - ix;

+			else

+				p0 = h - ix;

+			if (sign[iy] < 0)

+				p1 = h_inv - iy;

+			else

+				p1 = h - iy;

+

+			for (i = 0; i < L_SUBFR; i++)

+			{

+				vec[i] = (*p0++) + (*p1++);

+			}

+

+			if(nbbits == 44)

+			{

+				ipos[8] = 0;               

+				ipos[9] = 1;               

+			}

+		} else

+		{

+			/* first stage: fix 4 pulses */

+			pos = 4;

+

+			ix = ind[0] = pos_max[ipos[0]];  

+			iy = ind[1] = pos_max[ipos[1]];  

+			i = ind[2] = pos_max[ipos[2]];   

+			j = ind[3] = pos_max[ipos[3]];   

+			ps = add1(add1(add1(dn[ix], dn[iy]), dn[i]), dn[j]);

+

+			if (sign[ix] < 0)

+				p0 = h_inv - ix;

+			else

+				p0 = h - ix;

+

+			if (sign[iy] < 0)

+				p1 = h_inv - iy;

+			else

+				p1 = h - iy;

+

+			if (sign[i] < 0)

+				p2 = h_inv - i;

+			else

+				p2 = h - i;

+

+			if (sign[j] < 0)

+				p3 = h_inv - j;

+			else

+				p3 = h - j;

+

+			L_tmp = 0L;

+			for(i = 0; i < L_SUBFR; i++)

+			{

+				vec[i]  = add1(add1(add1(*p0++, *p1++), *p2++), *p3++);

+				L_tmp  += (vec[i] * vec[i]) << 1;

+			}

+

+			alp = ((L_tmp >> 3) + 0x8000) >> 16;

+

+			if(nbbits == 72)

+			{

+				ipos[16] = 0;              

+				ipos[17] = 1;              

+			}

+		}

+

+		/* other stages of 2 pulses */

+

+		for (j = pos, st = 0; j < nb_pulse; j += 2, st++)

+		{

+			/*--------------------------------------------------*

+			 * Calculate correlation of all possible positions  *

+			 * of the next 2 pulses with previous fixed pulses. *

+			 * Each pulse can have 16 possible positions.       *

+			 *--------------------------------------------------*/

+			if(ipos[j] == 3)

+			{

+				cor_h_vec_30(h, vec, ipos[j], sign, rrixix, cor_x, cor_y);

+			}

+			else

+			{

+#ifdef ASM_OPT                 /* asm optimization branch */

+				cor_h_vec_012_asm(h, vec, ipos[j], sign, rrixix, cor_x, cor_y);

+#else

+				cor_h_vec_012(h, vec, ipos[j], sign, rrixix, cor_x, cor_y);

+#endif

+			}

+			/*--------------------------------------------------*

+			 * Find best positions of 2 pulses.                 *

+			 *--------------------------------------------------*/

+			search_ixiy(nbpos[st], ipos[j], ipos[j + 1], &ps, &alp,

+					&ix, &iy, dn, dn2, cor_x, cor_y, rrixiy);

+

+			ind[j] = ix;                   

+			ind[j + 1] = iy;               

+

+			if (sign[ix] < 0)

+				p0 = h_inv - ix;

+			else

+				p0 = h - ix;

+			if (sign[iy] < 0)

+				p1 = h_inv - iy;

+			else

+				p1 = h - iy;

+

+			for (i = 0; i < L_SUBFR; i+=4)

+			{

+				vec[i]   += add1((*p0++), (*p1++));       

+				vec[i+1] += add1((*p0++), (*p1++));        

+				vec[i+2] += add1((*p0++), (*p1++));        

+				vec[i+3] += add1((*p0++), (*p1++));      

+			}

+		}

+		/* memorise the best codevector */

+		ps = vo_mult(ps, ps);

+		s = vo_L_msu(vo_L_mult(alpk, ps), psk, alp);

+		if (s > 0)

+		{

+			psk = ps;                      

+			alpk = alp;                    

+			for (i = 0; i < nb_pulse; i++)

+			{

+				codvec[i] = ind[i];        

+			}

+			for (i = 0; i < L_SUBFR; i++)

+			{

+				y[i] = vec[i];             

+			}

+		}

+	}

+	/*-------------------------------------------------------------------*

+	 * Build the codeword, the filtered codeword and index of codevector.*

+	 *-------------------------------------------------------------------*/

+	for (i = 0; i < NPMAXPT * NB_TRACK; i++)

+	{

+		ind[i] = -1;                       

+	}

+	for (i = 0; i < L_SUBFR; i++)

+	{

+		code[i] = 0;                       

+		y[i] = vo_shr_r(y[i], 3);               /* Q12 to Q9 */

+	}

+	val = (512 >> h_shift);               /* codeword in Q9 format */

+	for (k = 0; k < nb_pulse; k++)

+	{

+		i = codvec[k];                       /* read pulse position */

+		j = sign[i];                         /* read sign           */

+		index = i >> 2;                 /* index = pos of pulse (0..15) */

+		track = (Word16) (i & 0x03);         /* track = i % NB_TRACK (0..3)  */

+

+		if (j > 0)

+		{

+			code[i] += val;   

+			codvec[k] += 128;  

+		} else

+		{

+			code[i] -= val;   

+			index += NB_POS;    

+		}

+

+		i = (Word16)((vo_L_mult(track, NPMAXPT) >> 1));

+

+		while (ind[i] >= 0)

+		{

+			i += 1;

+		}

+		ind[i] = index;                    

+	}

+

+	k = 0;                                 

+	/* Build index of codevector */

+	if(nbbits == 20)

+	{

+		for (track = 0; track < NB_TRACK; track++)

+		{

+			_index[track] = (Word16)(quant_1p_N1(ind[k], 4));

+			k += NPMAXPT;

+		}

+	} else if(nbbits == 36)

+	{

+		for (track = 0; track < NB_TRACK; track++)

+		{

+			_index[track] = (Word16)(quant_2p_2N1(ind[k], ind[k + 1], 4));

+			k += NPMAXPT;

+		}

+	} else if(nbbits == 44)

+	{

+		for (track = 0; track < NB_TRACK - 2; track++)

+		{

+			_index[track] = (Word16)(quant_3p_3N1(ind[k], ind[k + 1], ind[k + 2], 4));

+			k += NPMAXPT;

+		}

+		for (track = 2; track < NB_TRACK; track++)

+		{

+			_index[track] = (Word16)(quant_2p_2N1(ind[k], ind[k + 1], 4));

+			k += NPMAXPT;

+		}

+	} else if(nbbits == 52)

+	{

+		for (track = 0; track < NB_TRACK; track++)

+		{

+			_index[track] = (Word16)(quant_3p_3N1(ind[k], ind[k + 1], ind[k + 2], 4));

+			k += NPMAXPT;

+		}

+	} else if(nbbits == 64)

+	{

+		for (track = 0; track < NB_TRACK; track++)

+		{

+			L_index = quant_4p_4N(&ind[k], 4);

+			_index[track] = (Word16)((L_index >> 14) & 3);

+			_index[track + NB_TRACK] = (Word16)(L_index & 0x3FFF);

+			k += NPMAXPT;

+		}

+	} else if(nbbits == 72)

+	{

+		for (track = 0; track < NB_TRACK - 2; track++)

+		{

+			L_index = quant_5p_5N(&ind[k], 4);

+			_index[track] = (Word16)((L_index >> 10) & 0x03FF);

+			_index[track + NB_TRACK] = (Word16)(L_index & 0x03FF);

+			k += NPMAXPT;

+		}

+		for (track = 2; track < NB_TRACK; track++)

+		{

+			L_index = quant_4p_4N(&ind[k], 4);

+			_index[track] = (Word16)((L_index >> 14) & 3);

+			_index[track + NB_TRACK] = (Word16)(L_index & 0x3FFF);

+			k += NPMAXPT;

+		}

+	} else if(nbbits == 88)

+	{

+		for (track = 0; track < NB_TRACK; track++)

+		{

+			L_index = quant_6p_6N_2(&ind[k], 4);

+			_index[track] = (Word16)((L_index >> 11) & 0x07FF);

+			_index[track + NB_TRACK] = (Word16)(L_index & 0x07FF);

+			k += NPMAXPT;

+		}

+	}

+	return;

+}

+

+

+/*-------------------------------------------------------------------*

+ * Function  cor_h_vec()                                             *

+ * ~~~~~~~~~~~~~~~~~~~~~                                             *

+ * Compute correlations of h[] with vec[] for the specified track.   *

+ *-------------------------------------------------------------------*/

+void cor_h_vec_30(

+		Word16 h[],                           /* (i) scaled impulse response                 */

+		Word16 vec[],                         /* (i) scaled vector (/8) to correlate with h[] */

+		Word16 track,                         /* (i) track to use                            */

+		Word16 sign[],                        /* (i) sign vector                             */

+		Word16 rrixix[][NB_POS],              /* (i) correlation of h[x] with h[x]      */

+		Word16 cor_1[],                       /* (o) result of correlation (NB_POS elements) */

+		Word16 cor_2[]                        /* (o) result of correlation (NB_POS elements) */

+		)

+{

+	Word32 i, j, pos, corr;

+	Word16 *p0, *p1, *p2,*p3,*cor_x,*cor_y;

+	Word32 L_sum1,L_sum2;

+	cor_x = cor_1;

+	cor_y = cor_2;

+	p0 = rrixix[track];

+	p3 = rrixix[0];

+	pos = track;

+

+	for (i = 0; i < NB_POS; i+=2)

+	{

+		L_sum1 = L_sum2 = 0L;

+		p1 = h;

+		p2 = &vec[pos];

+		for (j=pos;j < L_SUBFR; j++)

+		{

+			L_sum1 += *p1 * *p2;		

+			p2-=3;

+			L_sum2 += *p1++ * *p2;		

+			p2+=4;

+		}

+		p2-=3;

+		L_sum2 += *p1++ * *p2++;	

+		L_sum2 += *p1++ * *p2++;	

+		L_sum2 += *p1++ * *p2++;	

+

+		L_sum1 = (L_sum1 << 2);

+		L_sum2 = (L_sum2 << 2);

+

+		corr = vo_round(L_sum1);	

+		*cor_x++ = vo_mult(corr, sign[pos]) + (*p0++);

+		corr = vo_round(L_sum2);

+		*cor_y++ = vo_mult(corr, sign[pos-3]) + (*p3++);

+		pos += STEP;

+

+		L_sum1 = L_sum2 = 0L;

+		p1 = h;

+		p2 = &vec[pos];

+		for (j=pos;j < L_SUBFR; j++)

+		{

+			L_sum1 += *p1 * *p2;		

+			p2-=3;

+			L_sum2 += *p1++ * *p2;		

+			p2+=4;

+		}

+		p2-=3;

+		L_sum2 += *p1++ * *p2++;	

+		L_sum2 += *p1++ * *p2++;	

+		L_sum2 += *p1++ * *p2++;	

+

+		L_sum1 = (L_sum1 << 2);

+		L_sum2 = (L_sum2 << 2);

+

+		corr = vo_round(L_sum1);	

+		*cor_x++ = vo_mult(corr, sign[pos]) + (*p0++);

+		corr = vo_round(L_sum2);

+		*cor_y++ = vo_mult(corr, sign[pos-3]) + (*p3++);

+		pos += STEP;

+	}

+	return;

+}

+

+void cor_h_vec_012(

+		Word16 h[],                           /* (i) scaled impulse response                 */

+		Word16 vec[],                         /* (i) scaled vector (/8) to correlate with h[] */

+		Word16 track,                         /* (i) track to use                            */

+		Word16 sign[],                        /* (i) sign vector                             */

+		Word16 rrixix[][NB_POS],              /* (i) correlation of h[x] with h[x]      */

+		Word16 cor_1[],                       /* (o) result of correlation (NB_POS elements) */

+		Word16 cor_2[]                        /* (o) result of correlation (NB_POS elements) */

+		)

+{

+	Word32 i, j, pos, corr;

+	Word16 *p0, *p1, *p2,*p3,*cor_x,*cor_y;

+	Word32 L_sum1,L_sum2;

+	cor_x = cor_1;

+	cor_y = cor_2;

+	p0 = rrixix[track];

+	p3 = rrixix[track+1];

+	pos = track;

+

+	for (i = 0; i < NB_POS; i+=2)

+	{

+		L_sum1 = L_sum2 = 0L;

+		p1 = h;

+		p2 = &vec[pos];

+		for (j=62-pos ;j >= 0; j--)

+		{

+			L_sum1 += *p1 * *p2++;

+			L_sum2 += *p1++ * *p2;

+		}

+		L_sum1 += *p1 * *p2;

+		L_sum1 = (L_sum1 << 2);

+		L_sum2 = (L_sum2 << 2);

+

+		corr = (L_sum1 + 0x8000) >> 16;

+		cor_x[i] = vo_mult(corr, sign[pos]) + (*p0++);

+		corr = (L_sum2 + 0x8000) >> 16;

+		cor_y[i] = vo_mult(corr, sign[pos + 1]) + (*p3++);

+		pos += STEP;

+

+		L_sum1 = L_sum2 = 0L;

+		p1 = h;

+		p2 = &vec[pos];

+		for (j= 62-pos;j >= 0; j--)

+		{

+			L_sum1 += *p1 * *p2++;

+			L_sum2 += *p1++ * *p2;

+		}

+		L_sum1 += *p1 * *p2;

+		L_sum1 = (L_sum1 << 2);

+		L_sum2 = (L_sum2 << 2);

+

+		corr = (L_sum1 + 0x8000) >> 16;

+		cor_x[i+1] = vo_mult(corr, sign[pos]) + (*p0++);

+		corr = (L_sum2 + 0x8000) >> 16;

+		cor_y[i+1] = vo_mult(corr, sign[pos + 1]) + (*p3++);

+		pos += STEP;

+	}

+	return;

+}

+

+/*-------------------------------------------------------------------*

+ * Function  search_ixiy()                                           *

+ * ~~~~~~~~~~~~~~~~~~~~~~~                                           *

+ * Find the best positions of 2 pulses in a subframe.                *

+ *-------------------------------------------------------------------*/

+

+void search_ixiy(

+		Word16 nb_pos_ix,                     /* (i) nb of pos for pulse 1 (1..8)       */

+		Word16 track_x,                       /* (i) track of pulse 1                   */

+		Word16 track_y,                       /* (i) track of pulse 2                   */

+		Word16 * ps,                          /* (i/o) correlation of all fixed pulses  */

+		Word16 * alp,                         /* (i/o) energy of all fixed pulses       */

+		Word16 * ix,                          /* (o) position of pulse 1                */

+		Word16 * iy,                          /* (o) position of pulse 2                */

+		Word16 dn[],                          /* (i) corr. between target and h[]       */

+		Word16 dn2[],                         /* (i) vector of selected positions       */

+		Word16 cor_x[],                       /* (i) corr. of pulse 1 with fixed pulses */

+		Word16 cor_y[],                       /* (i) corr. of pulse 2 with fixed pulses */

+		Word16 rrixiy[][MSIZE]                /* (i) corr. of pulse 1 with pulse 2   */

+		)

+{

+	Word32 x, y, pos, thres_ix;

+	Word16 ps1, ps2, sq, sqk;

+	Word16 alp_16, alpk;

+	Word16 *p0, *p1, *p2;

+	Word32 s, alp0, alp1, alp2;

+

+	p0 = cor_x;                            

+	p1 = cor_y;                            

+	p2 = rrixiy[track_x];                  

+

+	thres_ix = nb_pos_ix - NB_MAX;

+

+	alp0 = L_deposit_h(*alp);

+	alp0 = (alp0 + 0x00008000L);       /* for rounding */

+

+	sqk = -1;                              

+	alpk = 1;                              

+

+	for (x = track_x; x < L_SUBFR; x += STEP)

+	{

+		ps1 = *ps + dn[x];

+		alp1 = alp0 + ((*p0++)<<13);

+

+		if (dn2[x] < thres_ix)

+		{

+			pos = -1;

+			for (y = track_y; y < L_SUBFR; y += STEP)

+			{

+				ps2 = add1(ps1, dn[y]);

+

+				alp2 = alp1 + ((*p1++)<<13);

+				alp2 = alp2 + ((*p2++)<<14);

+				alp_16 = extract_h(alp2);

+				sq = vo_mult(ps2, ps2);

+				s = vo_L_mult(alpk, sq) - ((sqk * alp_16)<<1);

+

+				if (s > 0)

+				{

+					sqk = sq;              

+					alpk = alp_16;         

+					pos = y;               

+				}

+			}

+			p1 -= NB_POS;

+

+			if (pos >= 0)

+			{

+				*ix = x;                   

+				*iy = pos;                 

+			}

+		} else

+		{

+			p2 += NB_POS;

+		}

+	}

+

+	*ps = add1(*ps, add1(dn[*ix], dn[*iy])); 

+	*alp = alpk;                           

+

+	return;

+}

+

+

+

+

diff --git a/media/libstagefright/codecs/amrwbenc/src/cmnMemory.c b/media/libstagefright/codecs/amrwbenc/src/cmnMemory.c
new file mode 100644
index 0000000..c17264c
--- /dev/null
+++ b/media/libstagefright/codecs/amrwbenc/src/cmnMemory.c
@@ -0,0 +1,73 @@
+/*

+ ** Copyright 2003-2010, VisualOn, Inc.

+ **

+ ** Licensed under the Apache License, Version 2.0 (the "License");

+ ** you may not use this file except in compliance with the License.

+ ** You may obtain a copy of the License at

+ **

+ **     http://www.apache.org/licenses/LICENSE-2.0

+ **

+ ** Unless required by applicable law or agreed to in writing, software

+ ** distributed under the License is distributed on an "AS IS" BASIS,

+ ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

+ ** See the License for the specific language governing permissions and

+ ** limitations under the License.

+ */

+/*******************************************************************************

+	File:		cmnMemory.c

+

+	Content:	sample code for memory operator implementation

+

+*******************************************************************************/

+#include "cmnMemory.h"

+

+#include <malloc.h>

+#if defined LINUX

+#include <string.h>

+#endif

+

+//VO_MEM_OPERATOR		g_memOP;

+

+VO_U32 cmnMemAlloc (VO_S32 uID,  VO_MEM_INFO * pMemInfo)

+{

+	if (!pMemInfo)

+		return VO_ERR_INVALID_ARG;

+

+	pMemInfo->VBuffer = malloc (pMemInfo->Size);

+	return 0;

+}

+

+VO_U32 cmnMemFree (VO_S32 uID, VO_PTR pMem)

+{

+	free (pMem);

+	return 0;

+}

+

+VO_U32	cmnMemSet (VO_S32 uID, VO_PTR pBuff, VO_U8 uValue, VO_U32 uSize)

+{

+	memset (pBuff, uValue, uSize);

+	return 0;

+}

+

+VO_U32	cmnMemCopy (VO_S32 uID, VO_PTR pDest, VO_PTR pSource, VO_U32 uSize)

+{

+	memcpy (pDest, pSource, uSize);

+	return 0;

+}

+

+VO_U32	cmnMemCheck (VO_S32 uID, VO_PTR pBuffer, VO_U32 uSize)

+{

+	return 0;

+}

+

+VO_S32 cmnMemCompare (VO_S32 uID, VO_PTR pBuffer1, VO_PTR pBuffer2, VO_U32 uSize)

+{

+	return memcmp(pBuffer1, pBuffer2, uSize);

+}

+

+VO_U32	cmnMemMove (VO_S32 uID, VO_PTR pDest, VO_PTR pSource, VO_U32 uSize)

+{

+	memmove (pDest, pSource, uSize);

+	return 0;

+}

+

diff --git a/media/libstagefright/codecs/amrwbenc/src/convolve.c b/media/libstagefright/codecs/amrwbenc/src/convolve.c
new file mode 100644
index 0000000..66c74d6
--- /dev/null
+++ b/media/libstagefright/codecs/amrwbenc/src/convolve.c
@@ -0,0 +1,109 @@
+/*

+ ** Copyright 2003-2010, VisualOn, Inc.

+ **

+ ** Licensed under the Apache License, Version 2.0 (the "License");

+ ** you may not use this file except in compliance with the License.

+ ** You may obtain a copy of the License at

+ **

+ **     http://www.apache.org/licenses/LICENSE-2.0

+ **

+ ** Unless required by applicable law or agreed to in writing, software

+ ** distributed under the License is distributed on an "AS IS" BASIS,

+ ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

+ ** See the License for the specific language governing permissions and

+ ** limitations under the License.

+ */

+

+/***********************************************************************

+       File: convolve.c

+

+	   Description:Perform the convolution between two vectors x[] and h[]

+	               and write the result in the vector y[]

+

+************************************************************************/

+

+#include "typedef.h"

+#include "basic_op.h"

+

+void Convolve (

+		Word16 x[],        /* (i)     : input vector                           */

+		Word16 h[],        /* (i)     : impulse response                       */

+		Word16 y[],        /* (o)     : output vector                          */

+		Word16 L           /* (i)     : vector size                            */

+	      )

+{

+	Word32  i, n;

+	Word16 *tmpH,*tmpX;

+	Word32 s;

+	for (n = 0; n < 64;)

+	{

+		tmpH = h+n;

+		tmpX = x;

+		i=n+1;

+		s = vo_mult32((*tmpX++), (*tmpH--));i--;

+		while(i>0)

+		{

+			s += vo_mult32((*tmpX++), (*tmpH--));

+			s += vo_mult32((*tmpX++), (*tmpH--));

+			s += vo_mult32((*tmpX++), (*tmpH--));

+			s += vo_mult32((*tmpX++), (*tmpH--));

+			i -= 4;

+		}

+		y[n] = ((s<<1) + 0x8000)>>16;   

+		n++;

+

+		tmpH = h+n;

+		tmpX = x;

+		i=n+1;

+		s =  vo_mult32((*tmpX++), (*tmpH--));i--;

+		s += vo_mult32((*tmpX++), (*tmpH--));i--;

+

+		while(i>0)

+		{

+			s += vo_mult32((*tmpX++), (*tmpH--));

+			s += vo_mult32((*tmpX++), (*tmpH--));

+			s += vo_mult32((*tmpX++), (*tmpH--));

+			s += vo_mult32((*tmpX++), (*tmpH--));

+			i -= 4;

+		}

+		y[n] = ((s<<1) + 0x8000)>>16;    

+		n++;

+

+		tmpH = h+n;

+		tmpX = x;

+		i=n+1;

+		s =  vo_mult32((*tmpX++), (*tmpH--));i--;

+		s += vo_mult32((*tmpX++), (*tmpH--));i--;

+		s += vo_mult32((*tmpX++), (*tmpH--));i--;

+

+		while(i>0)

+		{

+			s += vo_mult32((*tmpX++), (*tmpH--));

+			s += vo_mult32((*tmpX++), (*tmpH--));

+			s += vo_mult32((*tmpX++), (*tmpH--));

+			s += vo_mult32((*tmpX++), (*tmpH--));

+			i -= 4;

+		}

+		y[n] = ((s<<1) + 0x8000)>>16;   

+		n++;

+

+		s = 0;

+		tmpH = h+n;

+		tmpX = x;

+		i=n+1;

+		while(i>0)

+		{

+			s += vo_mult32((*tmpX++), (*tmpH--));

+			s += vo_mult32((*tmpX++), (*tmpH--));

+			s += vo_mult32((*tmpX++), (*tmpH--));

+			s += vo_mult32((*tmpX++), (*tmpH--));

+			i -= 4;

+		}

+		y[n] = ((s<<1) + 0x8000)>>16;   

+		n++;        

+	}

+	return;

+}

+

+

+

diff --git a/media/libstagefright/codecs/amrwbenc/src/cor_h_x.c b/media/libstagefright/codecs/amrwbenc/src/cor_h_x.c
new file mode 100644
index 0000000..3c2e9d5
--- /dev/null
+++ b/media/libstagefright/codecs/amrwbenc/src/cor_h_x.c
@@ -0,0 +1,127 @@
+/*

+ ** Copyright 2003-2010, VisualOn, Inc.

+ **

+ ** Licensed under the Apache License, Version 2.0 (the "License");

+ ** you may not use this file except in compliance with the License.

+ ** You may obtain a copy of the License at

+ **

+ **     http://www.apache.org/licenses/LICENSE-2.0

+ **

+ ** Unless required by applicable law or agreed to in writing, software

+ ** distributed under the License is distributed on an "AS IS" BASIS,

+ ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

+ ** See the License for the specific language governing permissions and

+ ** limitations under the License.

+ */

+

+/***********************************************************************

+*       File: cor_h_x.c                                                *

+*                                                                      *

+*	   Description:Compute correlation between target "x[]" and "h[]"  *

+*	               Designed for codebook search (24 pulses, 4 tracks,  * 

+*				   4 pulses per track, 16 positions in each track) to  *

+*				   avoid saturation.                                   *

+*                                                                      *

+************************************************************************/

+

+#include "typedef.h"

+#include "basic_op.h"

+#include "math_op.h"

+

+#define L_SUBFR   64

+#define NB_TRACK  4

+#define STEP      4

+

+void cor_h_x(

+		Word16 h[],                           /* (i) Q12 : impulse response of weighted synthesis filter */

+		Word16 x[],                           /* (i) Q0  : target vector                                 */

+		Word16 dn[]                           /* (o) <12bit : correlation between target and h[]         */

+	    )

+{

+	Word32 i, j;

+	Word32 L_tmp, y32[L_SUBFR], L_tot;

+	Word16 *p1, *p2;

+	Word32 *p3;

+	Word32 L_max, L_max1, L_max2, L_max3;

+	/* first keep the result on 32 bits and find absolute maximum */

+	L_tot  = 1;                            

+	L_max  = 0; 

+	L_max1 = 0;

+	L_max2 = 0;

+	L_max3 = 0;

+	for (i = 0; i < L_SUBFR; i += STEP)

+	{

+		L_tmp = 1;                                    /* 1 -> to avoid null dn[] */

+		p1 = &x[i];

+		p2 = &h[0];

+		for (j = i; j < L_SUBFR; j++)

+			L_tmp += vo_L_mult(*p1++, *p2++);

+

+		y32[i] = L_tmp;               

+		L_tmp = (L_tmp > 0)? L_tmp:-L_tmp;

+		if(L_tmp > L_max)

+		{

+			L_max = L_tmp;             

+		}

+

+		L_tmp = 1L;

+		p1 = &x[i+1];

+		p2 = &h[0];

+		for (j = i+1; j < L_SUBFR; j++)

+			L_tmp += vo_L_mult(*p1++, *p2++);

+

+		y32[i+1] = L_tmp;               

+		L_tmp = (L_tmp > 0)? L_tmp:-L_tmp;

+		if(L_tmp > L_max1)

+		{

+			L_max1 = L_tmp;             

+		}

+

+		L_tmp = 1;

+		p1 = &x[i+2];

+		p2 = &h[0];

+		for (j = i+2; j < L_SUBFR; j++)

+			L_tmp += vo_L_mult(*p1++, *p2++);

+

+		y32[i+2] = L_tmp;               

+		L_tmp = (L_tmp > 0)? L_tmp:-L_tmp;

+		if(L_tmp > L_max2)

+		{

+			L_max2 = L_tmp;             

+		}

+

+		L_tmp = 1;

+		p1 = &x[i+3];

+		p2 = &h[0];

+		for (j = i+3; j < L_SUBFR; j++)

+			L_tmp += vo_L_mult(*p1++, *p2++);

+

+		y32[i+3] = L_tmp;               

+		L_tmp = (L_tmp > 0)? L_tmp:-L_tmp;

+		if(L_tmp > L_max3)

+		{

+			L_max3 = L_tmp;             

+		}

+	}

+	/* tot += 3*max / 8 */

+	L_max = ((L_max + L_max1 + L_max2 + L_max3) >> 2);

+	L_tot = vo_L_add(L_tot, L_max);       /* +max/4 */

+	L_tot = vo_L_add(L_tot, (L_max >> 1));  /* +max/8 */

+

+	/* Find the number of right shifts to do on y32[] so that    */

+	/* 6.0 x sumation of max of dn[] in each track not saturate. */

+	j = norm_l(L_tot) - 4;             /* 4 -> 16 x tot */

+	p1 = dn;

+	p3 = y32;

+	for (i = 0; i < L_SUBFR; i+=4)

+	{

+		*p1++ = vo_round(L_shl(*p3++, j));

+		*p1++ = vo_round(L_shl(*p3++, j));

+		*p1++ = vo_round(L_shl(*p3++, j));

+		*p1++ = vo_round(L_shl(*p3++, j));

+	}

+	return;

+}

+

+

+

diff --git a/media/libstagefright/codecs/amrwbenc/src/decim54.c b/media/libstagefright/codecs/amrwbenc/src/decim54.c
new file mode 100644
index 0000000..429a7d6
--- /dev/null
+++ b/media/libstagefright/codecs/amrwbenc/src/decim54.c
@@ -0,0 +1,146 @@
+/*

+ ** Copyright 2003-2010, VisualOn, Inc.

+ **

+ ** Licensed under the Apache License, Version 2.0 (the "License");

+ ** you may not use this file except in compliance with the License.

+ ** You may obtain a copy of the License at

+ **

+ **     http://www.apache.org/licenses/LICENSE-2.0

+ **

+ ** Unless required by applicable law or agreed to in writing, software

+ ** distributed under the License is distributed on an "AS IS" BASIS,

+ ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

+ ** See the License for the specific language governing permissions and

+ ** limitations under the License.

+ */

+

+/***********************************************************************

+*      File: decim54.c                                                 *

+*                                                                      *

+*	   Description:Decimation of 16kHz signal to 12.8kHz           *

+*                                                                      *

+************************************************************************/

+

+#include "typedef.h"

+#include "basic_op.h"

+#include "acelp.h"

+#include "cnst.h"

+

+#define FAC5   5

+#define DOWN_FAC  26215                    /* 4/5 in Q15 */

+

+#define NB_COEF_DOWN  15

+

+/* Local functions */

+static void Down_samp(

+		Word16 * sig,                         /* input:  signal to downsampling  */

+		Word16 * sig_d,                       /* output: downsampled signal      */

+		Word16 L_frame_d                      /* input:  length of output        */

+		);

+

+/* 1/5 resolution interpolation filter  (in Q14)  */

+/* -1.5dB @ 6kHz, -6dB @ 6.4kHz, -10dB @ 6.6kHz, -20dB @ 6.9kHz, -25dB @ 7kHz, -55dB @ 8kHz */

+

+static Word16 fir_down1[4][30] =

+{

+	{-5, 24, -50, 54, 0, -128, 294, -408, 344, 0, -647, 1505, -2379, 3034, 13107, 3034, -2379, 1505, -647, 0, 344, -408,

+	294, -128, 0, 54, -50, 24, -5, 0},

+

+	{-6, 19, -26, 0, 77, -188, 270, -233, 0, 434, -964, 1366, -1293, 0, 12254, 6575, -2746, 1030, 0, -507, 601, -441,

+	198, 0, -95, 99, -58, 18, 0, -1},

+

+	{-3, 9, 0, -41, 111, -170, 153, 0, -295, 649, -888, 770, 0, -1997, 9894, 9894, -1997, 0, 770, -888, 649, -295, 0,

+	153, -170, 111, -41, 0, 9, -3},

+

+	{-1, 0, 18, -58, 99, -95, 0, 198, -441, 601, -507, 0, 1030, -2746, 6575, 12254, 0, -1293, 1366, -964, 434, 0,

+	-233, 270, -188, 77, 0, -26, 19, -6}

+};

+

+void Init_Decim_12k8(

+		Word16 mem[]                          /* output: memory (2*NB_COEF_DOWN) set to zeros */

+		)

+{

+	Set_zero(mem, 2 * NB_COEF_DOWN);

+	return;

+}

+

+void Decim_12k8(

+		Word16 sig16k[],                      /* input:  signal to downsampling  */

+		Word16 lg,                            /* input:  length of input         */

+		Word16 sig12k8[],                     /* output: decimated signal        */

+		Word16 mem[]                          /* in/out: memory (2*NB_COEF_DOWN) */

+	       )

+{

+	Word16 lg_down;

+	Word16 signal[L_FRAME16k + (2 * NB_COEF_DOWN)];

+

+	Copy(mem, signal, 2 * NB_COEF_DOWN);

+

+	Copy(sig16k, signal + (2 * NB_COEF_DOWN), lg);

+

+	lg_down = (lg * DOWN_FAC)>>15;

+

+	Down_samp(signal + NB_COEF_DOWN, sig12k8, lg_down);

+

+	Copy(signal + lg, mem, 2 * NB_COEF_DOWN);

+

+	return;

+}

+

+static void Down_samp(

+		Word16 * sig,                         /* input:  signal to downsampling  */

+		Word16 * sig_d,                       /* output: downsampled signal      */

+		Word16 L_frame_d                      /* input:  length of output        */

+		)

+{

+	Word32 i, j, frac, pos;

+	Word16 *x, *y;

+	Word32 L_sum;

+

+	pos = 0;                                 /* position is in Q2 -> 1/4 resolution  */

+	for (j = 0; j < L_frame_d; j++)

+	{

+		i = (pos >> 2);                   /* integer part     */

+		frac = pos & 3;                   /* fractional part */

+		x = sig + i - NB_COEF_DOWN + 1;

+		y = (Word16 *)(fir_down1 + frac);

+

+		L_sum = vo_mult32((*x++),(*y++));

+		L_sum += vo_mult32((*x++),(*y++));

+		L_sum += vo_mult32((*x++),(*y++));

+		L_sum += vo_mult32((*x++),(*y++));

+		L_sum += vo_mult32((*x++),(*y++));

+		L_sum += vo_mult32((*x++),(*y++));

+		L_sum += vo_mult32((*x++),(*y++));

+		L_sum += vo_mult32((*x++),(*y++));

+		L_sum += vo_mult32((*x++),(*y++));

+		L_sum += vo_mult32((*x++),(*y++));

+		L_sum += vo_mult32((*x++),(*y++));

+		L_sum += vo_mult32((*x++),(*y++));

+		L_sum += vo_mult32((*x++),(*y++));

+		L_sum += vo_mult32((*x++),(*y++));

+		L_sum += vo_mult32((*x++),(*y++));

+		L_sum += vo_mult32((*x++),(*y++));

+		L_sum += vo_mult32((*x++),(*y++));

+		L_sum += vo_mult32((*x++),(*y++));

+		L_sum += vo_mult32((*x++),(*y++));

+		L_sum += vo_mult32((*x++),(*y++));

+		L_sum += vo_mult32((*x++),(*y++));

+		L_sum += vo_mult32((*x++),(*y++));

+		L_sum += vo_mult32((*x++),(*y++));

+		L_sum += vo_mult32((*x++),(*y++));

+		L_sum += vo_mult32((*x++),(*y++));

+		L_sum += vo_mult32((*x++),(*y++));

+		L_sum += vo_mult32((*x++),(*y++));

+		L_sum += vo_mult32((*x++),(*y++));

+		L_sum += vo_mult32((*x++),(*y++));

+		L_sum += vo_mult32((*x),(*y));

+

+		L_sum = L_shl2(L_sum, 2);              

+		sig_d[j] = extract_h(L_add(L_sum, 0x8000)); 

+		pos += FAC5;              /* pos + 5/4 */

+	}

+	return;

+}

+

+

diff --git a/media/libstagefright/codecs/amrwbenc/src/deemph.c b/media/libstagefright/codecs/amrwbenc/src/deemph.c
new file mode 100644
index 0000000..6ad528d
--- /dev/null
+++ b/media/libstagefright/codecs/amrwbenc/src/deemph.c
@@ -0,0 +1,117 @@
+/*

+ ** Copyright 2003-2010, VisualOn, Inc.

+ **

+ ** Licensed under the Apache License, Version 2.0 (the "License");

+ ** you may not use this file except in compliance with the License.

+ ** You may obtain a copy of the License at

+ **

+ **     http://www.apache.org/licenses/LICENSE-2.0

+ **

+ ** Unless required by applicable law or agreed to in writing, software

+ ** distributed under the License is distributed on an "AS IS" BASIS,

+ ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

+ ** See the License for the specific language governing permissions and

+ ** limitations under the License.

+ */

+

+/***********************************************************************

+*       File: deemph.c                                                 *

+*                                                                      *

+*	   Description:filtering through 1/(1-mu z^ -1)                    *

+*	               Deemph2 --> signal is divided by 2                  *

+*				   Deemph_32 --> for 32 bits signal.                   *

+*                                                                      *

+************************************************************************/

+

+#include "typedef.h"

+#include "basic_op.h"

+#include "math_op.h"

+

+void Deemph(

+		Word16 x[],                           /* (i/o)   : input signal overwritten by the output */

+		Word16 mu,                            /* (i) Q15 : deemphasis factor                      */

+		Word16 L,                             /* (i)     : vector size                            */

+		Word16 * mem                          /* (i/o)   : memory (y[-1])                         */

+	   )

+{

+	Word32 i;

+	Word32 L_tmp;

+

+	L_tmp = L_deposit_h(x[0]);

+	L_tmp = L_mac(L_tmp, *mem, mu);

+	x[0] = vo_round(L_tmp);                   

+

+	for (i = 1; i < L; i++)

+	{

+		L_tmp = L_deposit_h(x[i]);

+		L_tmp = L_mac(L_tmp, x[i - 1], mu);

+		x[i] = voround(L_tmp);               

+	}

+

+	*mem = x[L - 1];                       

+

+	return;

+}

+

+

+void Deemph2(

+		Word16 x[],                           /* (i/o)   : input signal overwritten by the output */

+		Word16 mu,                            /* (i) Q15 : deemphasis factor                      */

+		Word16 L,                             /* (i)     : vector size                            */

+		Word16 * mem                          /* (i/o)   : memory (y[-1])                         */

+	    )

+{

+	Word32 i;

+	Word32 L_tmp;

+	L_tmp = x[0] << 15;

+	L_tmp += ((*mem) * mu)<<1;

+	x[0] = (L_tmp + 0x8000)>>16;                   

+	for (i = 1; i < L; i++)

+	{

+		L_tmp = x[i] << 15;

+		L_tmp += (x[i - 1] * mu)<<1;

+		x[i] = (L_tmp + 0x8000)>>16;               

+	}

+	*mem = x[L - 1];                       

+	return;

+}

+

+

+void Deemph_32(

+		Word16 x_hi[],                        /* (i)     : input signal (bit31..16) */

+		Word16 x_lo[],                        /* (i)     : input signal (bit15..4)  */

+		Word16 y[],                           /* (o)     : output signal (x16)      */

+		Word16 mu,                            /* (i) Q15 : deemphasis factor        */

+		Word16 L,                             /* (i)     : vector size              */

+		Word16 * mem                          /* (i/o)   : memory (y[-1])           */

+	      )

+{

+	Word16 fac;

+	Word32 i, L_tmp;

+

+	fac = mu >> 1;                                /* Q15 --> Q14 */

+

+	L_tmp = L_deposit_h(x_hi[0]);

+	L_tmp += (x_lo[0] * 8)<<1;

+	L_tmp = (L_tmp << 3);

+	L_tmp += ((*mem) * fac)<<1;

+	L_tmp = (L_tmp << 1);               

+	y[0] = (L_tmp + 0x8000)>>16;                  

+

+	for (i = 1; i < L; i++)

+	{

+		L_tmp = L_deposit_h(x_hi[i]);

+		L_tmp += (x_lo[i] * 8)<<1;

+		L_tmp = (L_tmp << 3);

+		L_tmp += (y[i - 1] * fac)<<1;

+		L_tmp = (L_tmp << 1);           

+		y[i] = (L_tmp + 0x8000)>>16;               

+	}

+

+	*mem = y[L - 1];                       

+

+	return;

+}

+

+

+

diff --git a/media/libstagefright/codecs/amrwbenc/src/dtx.c b/media/libstagefright/codecs/amrwbenc/src/dtx.c
new file mode 100644
index 0000000..02921eb
--- /dev/null
+++ b/media/libstagefright/codecs/amrwbenc/src/dtx.c
@@ -0,0 +1,605 @@
+/*

+ ** Copyright 2003-2010, VisualOn, Inc.

+ **

+ ** Licensed under the Apache License, Version 2.0 (the "License");

+ ** you may not use this file except in compliance with the License.

+ ** You may obtain a copy of the License at

+ **

+ **     http://www.apache.org/licenses/LICENSE-2.0

+ **

+ ** Unless required by applicable law or agreed to in writing, software

+ ** distributed under the License is distributed on an "AS IS" BASIS,

+ ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

+ ** See the License for the specific language governing permissions and

+ ** limitations under the License.

+ */

+

+/***********************************************************************

+*       File: dtx.c                                                    *

+*                                                                      *

+*	    Description:DTX functions                                  *

+*                                                                      *

+************************************************************************/

+

+#include <stdio.h>

+#include <stdlib.h>

+#include "typedef.h"

+#include "basic_op.h"

+#include "oper_32b.h"

+#include "math_op.h"

+#include "cnst.h"

+#include "acelp.h"                         /* prototype of functions    */

+#include "bits.h"

+#include "dtx.h"

+#include "log2.h"

+#include "mem_align.h"

+

+static void aver_isf_history(

+		Word16 isf_old[],

+		Word16 indices[],

+		Word32 isf_aver[]

+		);

+

+static void find_frame_indices(

+		Word16 isf_old_tx[],

+		Word16 indices[],

+		dtx_encState * st

+		);

+

+static Word16 dithering_control(

+		dtx_encState * st

+		);

+

+/* excitation energy adjustment depending on speech coder mode used, Q7 */

+static Word16 en_adjust[9] =

+{

+	230,                                   /* mode0 = 7k  :  -5.4dB  */

+	179,                                   /* mode1 = 9k  :  -4.2dB  */

+	141,                                   /* mode2 = 12k :  -3.3dB  */

+	128,                                   /* mode3 = 14k :  -3.0dB  */

+	122,                                   /* mode4 = 16k :  -2.85dB */

+	115,                                   /* mode5 = 18k :  -2.7dB  */

+	115,                                   /* mode6 = 20k :  -2.7dB  */

+	115,                                   /* mode7 = 23k :  -2.7dB  */

+	115                                    /* mode8 = 24k :  -2.7dB  */

+};

+

+/**************************************************************************

+*

+* Function    : dtx_enc_init

+*

+**************************************************************************/

+Word16 dtx_enc_init(dtx_encState ** st, Word16 isf_init[], VO_MEM_OPERATOR *pMemOP)

+{

+	dtx_encState *s;

+

+	if (st == (dtx_encState **) NULL)

+	{

+		fprintf(stderr, "dtx_enc_init: invalid parameter\n");

+		return -1;

+	}

+	*st = NULL;

+

+	/* allocate memory */

+	if ((s = (dtx_encState *)mem_malloc(pMemOP, sizeof(dtx_encState), 32, VO_INDEX_ENC_AMRWB)) == NULL)

+	{

+		fprintf(stderr, "dtx_enc_init: can not malloc state structure\n");

+		return -1;

+	}

+	dtx_enc_reset(s, isf_init);

+	*st = s;

+	return 0;

+}

+

+/**************************************************************************

+*

+* Function    : dtx_enc_reset

+*

+**************************************************************************/

+Word16 dtx_enc_reset(dtx_encState * st, Word16 isf_init[])

+{

+	Word32 i;

+

+	if (st == (dtx_encState *) NULL)

+	{

+		fprintf(stderr, "dtx_enc_reset: invalid parameter\n");

+		return -1;

+	}

+	st->hist_ptr = 0;                      

+	st->log_en_index = 0;                  

+

+	/* Init isf_hist[] */

+	for (i = 0; i < DTX_HIST_SIZE; i++)

+	{

+		Copy(isf_init, &st->isf_hist[i * M], M);

+	}

+	st->cng_seed = RANDOM_INITSEED;       

+

+	/* Reset energy history */

+	Set_zero(st->log_en_hist, DTX_HIST_SIZE);

+

+	st->dtxHangoverCount = DTX_HANG_CONST; 

+	st->decAnaElapsedCount = 32767;        

+

+	for (i = 0; i < 28; i++)

+	{

+		st->D[i] = 0;                      

+	}

+

+	for (i = 0; i < DTX_HIST_SIZE - 1; i++)

+	{

+		st->sumD[i] = 0;                   

+	}

+

+	return 1;

+}

+

+/**************************************************************************

+*

+* Function    : dtx_enc_exit

+*

+**************************************************************************/

+void dtx_enc_exit(dtx_encState ** st, VO_MEM_OPERATOR *pMemOP)

+{

+	if (st == NULL || *st == NULL)

+		return;

+	/* deallocate memory */

+	mem_free(pMemOP, *st, VO_INDEX_ENC_AMRWB);

+	*st = NULL;

+	return;

+}

+

+

+/**************************************************************************

+*

+* Function    : dtx_enc

+*

+**************************************************************************/

+Word16 dtx_enc(

+		dtx_encState * st,                    /* i/o : State struct                                         */

+		Word16 isf[M],                        /* o   : CN ISF vector                                        */

+		Word16 * exc2,                        /* o   : CN excitation                                        */

+		Word16 ** prms

+	      )

+{

+	Word32 i, j;

+	Word16 indice[7];

+	Word16 log_en, gain, level, exp, exp0, tmp;

+	Word16 log_en_int_e, log_en_int_m;

+	Word32 L_isf[M], ener32, level32;

+	Word16 isf_order[3];

+	Word16 CN_dith;

+

+	/* VOX mode computation of SID parameters */

+	log_en = 0;

+	for (i = 0; i < M; i++)

+	{

+		L_isf[i] = 0;

+	}

+	/* average energy and isf */

+	for (i = 0; i < DTX_HIST_SIZE; i++)

+	{

+		/* Division by DTX_HIST_SIZE = 8 has been done in dtx_buffer. log_en is in Q10 */

+		log_en = add(log_en, st->log_en_hist[i]);

+

+	}

+	find_frame_indices(st->isf_hist, isf_order, st);

+	aver_isf_history(st->isf_hist, isf_order, L_isf);

+

+	for (j = 0; j < M; j++)

+	{

+		isf[j] = (Word16)(L_isf[j] >> 3);  /* divide by 8 */

+	}

+

+	/* quantize logarithmic energy to 6 bits (-6 : 66 dB) which corresponds to -2:22 in log2(E).  */

+	/* st->log_en_index = (short)( (log_en + 2.0) * 2.625 ); */

+

+	/* increase dynamics to 7 bits (Q8) */

+	log_en = (log_en >> 2);

+

+	/* Add 2 in Q8 = 512 to get log2(E) between 0:24 */

+	log_en = add(log_en, 512);

+

+	/* Multiply by 2.625 to get full 6 bit range. 2.625 = 21504 in Q13. The result is in Q6 */

+	log_en = mult(log_en, 21504);

+

+	/* Quantize Energy */

+	st->log_en_index = shr(log_en, 6);

+

+	if(st->log_en_index > 63)

+	{

+		st->log_en_index = 63;

+	}

+	if (st->log_en_index < 0)

+	{

+		st->log_en_index = 0;

+	}

+	/* Quantize ISFs */

+	Qisf_ns(isf, isf, indice);

+

+

+	Parm_serial(indice[0], 6, prms);

+	Parm_serial(indice[1], 6, prms);

+	Parm_serial(indice[2], 6, prms);

+	Parm_serial(indice[3], 5, prms);

+	Parm_serial(indice[4], 5, prms);

+

+	Parm_serial((st->log_en_index), 6, prms);

+

+	CN_dith = dithering_control(st);

+	Parm_serial(CN_dith, 1, prms);

+

+	/* level = (float)( pow( 2.0f, (float)st->log_en_index / 2.625 - 2.0 ) );    */

+	/* log2(E) in Q9 (log2(E) lies in between -2:22) */

+	log_en = shl(st->log_en_index, 15 - 6);

+

+	/* Divide by 2.625; log_en will be between 0:24  */

+	log_en = mult(log_en, 12483);

+	/* the result corresponds to log2(gain) in Q10 */

+

+	/* Find integer part  */

+	log_en_int_e = (log_en >> 10);

+

+	/* Find fractional part */

+	log_en_int_m = (Word16) (log_en & 0x3ff);

+	log_en_int_m = shl(log_en_int_m, 5);

+

+	/* Subtract 2 from log_en in Q9, i.e divide the gain by 2 (energy by 4) */

+	/* Add 16 in order to have the result of pow2 in Q16 */

+	log_en_int_e = add(log_en_int_e, 16 - 1);

+

+	level32 = Pow2(log_en_int_e, log_en_int_m); /* Q16 */

+	exp0 = norm_l(level32);

+	level32 = (level32 << exp0);        /* level in Q31 */

+	exp0 = (15 - exp0);

+	level = extract_h(level32);            /* level in Q15 */

+

+	/* generate white noise vector */

+	for (i = 0; i < L_FRAME; i++)

+	{

+		exc2[i] = (Random(&(st->cng_seed)) >> 4);

+	}

+

+	/* gain = level / sqrt(ener) * sqrt(L_FRAME) */

+

+	/* energy of generated excitation */

+	ener32 = Dot_product12(exc2, exc2, L_FRAME, &exp);

+

+	Isqrt_n(&ener32, &exp);

+

+	gain = extract_h(ener32);

+

+	gain = mult(level, gain);              /* gain in Q15 */

+

+	exp = add(exp0, exp);

+

+	/* Multiply by sqrt(L_FRAME)=16, i.e. shift left by 4 */

+	exp += 4;

+

+	for (i = 0; i < L_FRAME; i++)

+	{

+		tmp = mult(exc2[i], gain);         /* Q0 * Q15 */

+		exc2[i] = shl(tmp, exp); 

+	}

+

+	return 0;

+}

+

+/**************************************************************************

+*

+* Function    : dtx_buffer Purpose     : handles the DTX buffer

+*

+**************************************************************************/

+Word16 dtx_buffer(

+		dtx_encState * st,                    /* i/o : State struct                    */

+		Word16 isf_new[],                     /* i   : isf vector                      */

+		Word32 enr,                           /* i   : residual energy (in L_FRAME)    */

+		Word16 codec_mode

+		)

+{

+	Word16 log_en;

+

+	Word16 log_en_e;

+	Word16 log_en_m;

+	st->hist_ptr = add(st->hist_ptr, 1); 

+	if(st->hist_ptr == DTX_HIST_SIZE)

+	{

+		st->hist_ptr = 0;

+	}

+	/* copy lsp vector into buffer */

+	Copy(isf_new, &st->isf_hist[st->hist_ptr * M], M);

+

+	/* log_en = (float)log10(enr*0.0059322)/(float)log10(2.0f);  */

+	Log2(enr, &log_en_e, &log_en_m);

+

+	/* convert exponent and mantissa to Word16 Q7. Q7 is used to simplify averaging in dtx_enc */

+	log_en = shl(log_en_e, 7);             /* Q7 */

+	log_en = add(log_en, shr(log_en_m, 15 - 7));

+

+	/* Find energy per sample by multiplying with 0.0059322, i.e subtract log2(1/0.0059322) = 7.39722 The

+	 * constant 0.0059322 takes into account windowings and analysis length from autocorrelation

+	 * computations; 7.39722 in Q7 = 947  */

+	/* Subtract 3 dB = 0.99658 in log2(E) = 127 in Q7. */

+	/* log_en = sub( log_en, 947 + en_adjust[codec_mode] ); */

+

+	/* Find energy per sample (divide by L_FRAME=256), i.e subtract log2(256) = 8.0  (1024 in Q7) */

+	/* Subtract 3 dB = 0.99658 in log2(E) = 127 in Q7. */

+

+	log_en = sub(log_en, add(1024, en_adjust[codec_mode]));

+

+	/* Insert into the buffer */

+	st->log_en_hist[st->hist_ptr] = log_en;

+	return 0;

+}

+

+/**************************************************************************

+*

+* Function    : tx_dtx_handler Purpose     : adds extra speech hangover

+*                                            to analyze speech on

+*                                            the decoding side.

+**************************************************************************/

+void tx_dtx_handler(dtx_encState * st,     /* i/o : State struct           */

+		Word16 vad_flag,                      /* i   : vad decision           */

+		Word16 * usedMode                     /* i/o : mode changed or not    */

+		)

+{

+

+	/* this state machine is in synch with the GSMEFR txDtx machine      */

+	st->decAnaElapsedCount = add(st->decAnaElapsedCount, 1); 

+

+	if (vad_flag != 0)

+	{

+		st->dtxHangoverCount = DTX_HANG_CONST;

+	} else

+	{                                      /* non-speech */

+		if (st->dtxHangoverCount == 0)

+		{                                  /* out of decoder analysis hangover  */

+			st->decAnaElapsedCount = 0;    

+			*usedMode = MRDTX;            

+		} else

+		{                                  /* in possible analysis hangover */

+			st->dtxHangoverCount = sub(st->dtxHangoverCount, 1);

+

+			/* decAnaElapsedCount + dtxHangoverCount < DTX_ELAPSED_FRAMES_THRESH */

+			if (sub(add(st->decAnaElapsedCount, st->dtxHangoverCount),

+						DTX_ELAPSED_FRAMES_THRESH) < 0)

+			{

+				*usedMode = MRDTX;

+				/* if short time since decoder update, do not add extra HO */

+			}

+			/* else override VAD and stay in speech mode *usedMode and add extra hangover */

+		}

+	}

+

+	return;

+}

+

+

+

+static void aver_isf_history(

+		Word16 isf_old[],

+		Word16 indices[],

+		Word32 isf_aver[]

+		)

+{

+	Word32 i, j, k;

+	Word16 isf_tmp[2 * M];

+	Word32 L_tmp;

+

+	/* Memorize in isf_tmp[][] the ISF vectors to be replaced by */

+	/* the median ISF vector prior to the averaging               */

+	for (k = 0; k < 2; k++)

+	{

+		if ((indices[k] + 1) != 0)

+		{

+			for (i = 0; i < M; i++)

+			{

+				isf_tmp[k * M + i] = isf_old[indices[k] * M + i];      

+				isf_old[indices[k] * M + i] = isf_old[indices[2] * M + i];    

+			}

+		}

+	}

+

+	/* Perform the ISF averaging */

+	for (j = 0; j < M; j++)

+	{

+		L_tmp = 0;                      

+

+		for (i = 0; i < DTX_HIST_SIZE; i++)

+		{

+			L_tmp = L_add(L_tmp, L_deposit_l(isf_old[i * M + j]));

+		}

+		isf_aver[j] = L_tmp;              

+	}

+

+	/* Retrieve from isf_tmp[][] the ISF vectors saved prior to averaging */

+	for (k = 0; k < 2; k++)

+	{

+		if ((indices[k] + 1) != 0)

+		{

+			for (i = 0; i < M; i++)

+			{

+				isf_old[indices[k] * M + i] = isf_tmp[k * M + i];

+			}

+		}

+	}

+

+	return;

+}

+

+static void find_frame_indices(

+		Word16 isf_old_tx[],

+		Word16 indices[],

+		dtx_encState * st

+		)

+{

+	Word32 L_tmp, summin, summax, summax2nd;

+	Word16 i, j, tmp;

+	Word16 ptr;

+

+	/* Remove the effect of the oldest frame from the column */

+	/* sum sumD[0..DTX_HIST_SIZE-1]. sumD[DTX_HIST_SIZE] is    */

+	/* not updated since it will be removed later.           */

+

+	tmp = DTX_HIST_SIZE_MIN_ONE;           

+	j = -1;                                

+	for (i = 0; i < DTX_HIST_SIZE_MIN_ONE; i++)

+	{

+		j = add(j, tmp);

+		st->sumD[i] = L_sub(st->sumD[i], st->D[j]);     

+		tmp = sub(tmp, 1);

+	}

+

+	/* Shift the column sum sumD. The element sumD[DTX_HIST_SIZE-1]    */

+	/* corresponding to the oldest frame is removed. The sum of     */

+	/* the distances between the latest isf and other isfs, */

+	/* i.e. the element sumD[0], will be computed during this call. */

+	/* Hence this element is initialized to zero.                   */

+

+	for (i = DTX_HIST_SIZE_MIN_ONE; i > 0; i--)

+	{

+		st->sumD[i] = st->sumD[i - 1];     

+	}

+	st->sumD[0] = 0;                       

+

+	/* Remove the oldest frame from the distance matrix.           */

+	/* Note that the distance matrix is replaced by a one-         */

+	/* dimensional array to save static memory.                    */

+

+	tmp = 0;                               

+	for (i = 27; i >= 12; i = (Word16) (i - tmp))

+	{

+		tmp = add(tmp, 1);

+		for (j = tmp; j > 0; j--)

+		{

+			st->D[i - j + 1] = st->D[i - j - tmp];   

+		}

+	}

+

+	/* Compute the first column of the distance matrix D            */

+	/* (squared Euclidean distances from isf1[] to isf_old_tx[][]). */

+

+	ptr = st->hist_ptr;                 

+	for (i = 1; i < DTX_HIST_SIZE; i++)

+	{

+		/* Compute the distance between the latest isf and the other isfs. */

+		ptr = sub(ptr, 1);

+		if (ptr < 0)

+		{

+			ptr = DTX_HIST_SIZE_MIN_ONE;   

+		}

+		L_tmp = 0;                         

+		for (j = 0; j < M; j++)

+		{

+			tmp = sub(isf_old_tx[st->hist_ptr * M + j], isf_old_tx[ptr * M + j]);

+			L_tmp = L_mac(L_tmp, tmp, tmp);

+		}

+		st->D[i - 1] = L_tmp;           

+

+		/* Update also the column sums. */

+		st->sumD[0] = L_add(st->sumD[0], st->D[i - 1]); 

+		st->sumD[i] = L_add(st->sumD[i], st->D[i - 1]); 

+	}

+

+	/* Find the minimum and maximum distances */

+	summax = st->sumD[0];                  

+	summin = st->sumD[0];                  

+	indices[0] = 0;                        

+	indices[2] = 0;                        

+	for (i = 1; i < DTX_HIST_SIZE; i++)

+	{

+		if (L_sub(st->sumD[i], summax) > 0)

+		{

+			indices[0] = i;                

+			summax = st->sumD[i];          

+		}

+		if (L_sub(st->sumD[i], summin) < 0)

+		{

+			indices[2] = i;                

+			summin = st->sumD[i];          

+		}

+	}

+

+	/* Find the second largest distance */

+	summax2nd = -2147483647L;              

+	indices[1] = -1;                       

+	for (i = 0; i < DTX_HIST_SIZE; i++)

+	{

+		if ((L_sub(st->sumD[i], summax2nd) > 0) && (sub(i, indices[0]) != 0))

+		{

+			indices[1] = i;                

+			summax2nd = st->sumD[i];       

+		}

+	}

+

+	for (i = 0; i < 3; i++)

+	{

+		indices[i] = sub(st->hist_ptr, indices[i]);     

+		if (indices[i] < 0)

+		{

+			indices[i] = add(indices[i], DTX_HIST_SIZE);       

+		}

+	}

+

+	/* If maximum distance/MED_THRESH is smaller than minimum distance */

+	/* then the median ISF vector replacement is not performed         */

+	tmp = norm_l(summax);

+	summax = (summax << tmp);

+	summin = (summin << tmp);

+	L_tmp = L_mult(voround(summax), INV_MED_THRESH);

+	if(L_tmp <= summin)

+	{

+		indices[0] = -1; 

+	}

+	/* If second largest distance/MED_THRESH is smaller than     */

+	/* minimum distance then the median ISF vector replacement is    */

+	/* not performed                                                 */

+	summax2nd = L_shl(summax2nd, tmp);

+	L_tmp = L_mult(voround(summax2nd), INV_MED_THRESH);

+	if(L_tmp <= summin)

+	{

+		indices[1] = -1;                 

+	}

+	return;

+}

+

+static Word16 dithering_control(

+		dtx_encState * st

+		)

+{

+	Word16 tmp, mean, CN_dith, gain_diff;

+	Word32 i, ISF_diff;

+

+	/* determine how stationary the spectrum of background noise is */

+	ISF_diff = 0;

+	for (i = 0; i < 8; i++)

+	{

+		ISF_diff = L_add(ISF_diff, st->sumD[i]);

+	}

+	if ((ISF_diff >> 26) > 0)

+	{

+		CN_dith = 1;

+	} else

+	{

+		CN_dith = 0;

+	}

+

+	/* determine how stationary the energy of background noise is */

+	mean = 0;

+	for (i = 0; i < DTX_HIST_SIZE; i++)

+	{

+		mean = add(mean, st->log_en_hist[i]);

+	}

+	mean = (mean >> 3);

+	gain_diff = 0;

+	for (i = 0; i < DTX_HIST_SIZE; i++)

+	{

+		tmp = abs_s(sub(st->log_en_hist[i], mean));

+		gain_diff = add(gain_diff, tmp);

+	}

+	if (gain_diff > GAIN_THR)

+	{

+		CN_dith = 1;

+	}

+	return CN_dith;

+}

diff --git a/media/libstagefright/codecs/amrwbenc/src/g_pitch.c b/media/libstagefright/codecs/amrwbenc/src/g_pitch.c
new file mode 100644
index 0000000..570138e
--- /dev/null
+++ b/media/libstagefright/codecs/amrwbenc/src/g_pitch.c
@@ -0,0 +1,79 @@
+/*

+ ** Copyright 2003-2010, VisualOn, Inc.

+ **

+ ** Licensed under the Apache License, Version 2.0 (the "License");

+ ** you may not use this file except in compliance with the License.

+ ** You may obtain a copy of the License at

+ **

+ **     http://www.apache.org/licenses/LICENSE-2.0

+ **

+ ** Unless required by applicable law or agreed to in writing, software

+ ** distributed under the License is distributed on an "AS IS" BASIS,

+ ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

+ ** See the License for the specific language governing permissions and

+ ** limitations under the License.

+ */

+

+/***********************************************************************

+*      File: g_pitch.c                                                 *

+*                                                                      *

+*	   Description:Compute the gain of pitch. Result in Q12        *

+*	               if(gain < 0) gain = 0                           *

+*				   if(gain > 1.2) gain = 1.2           *

+************************************************************************/

+

+#include "typedef.h"

+#include "basic_op.h"

+#include "math_op.h"

+

+Word16 G_pitch(                            /* (o) Q14 : Gain of pitch lag saturated to 1.2   */

+		Word16 xn[],                          /* (i)     : Pitch target.                        */

+		Word16 y1[],                          /* (i)     : filtered adaptive codebook.          */

+		Word16 g_coeff[],                     /* : Correlations need for gain quantization.     */

+		Word16 L_subfr                        /* : Length of subframe.                          */

+	      )

+{

+	Word32 i;

+	Word16 xy, yy, exp_xy, exp_yy, gain;

+	/* Compute scalar product <y1[],y1[]> */

+#ifdef ASM_OPT                  /* asm optimization branch */

+	/* Compute scalar product <xn[],y1[]> */

+	xy = extract_h(Dot_product12_asm(xn, y1, L_subfr, &exp_xy));

+	yy = extract_h(Dot_product12_asm(y1, y1, L_subfr, &exp_yy));

+

+#else

+	/* Compute scalar product <xn[],y1[]> */

+	xy = extract_h(Dot_product12(xn, y1, L_subfr, &exp_xy));

+	yy = extract_h(Dot_product12(y1, y1, L_subfr, &exp_yy));

+

+#endif

+

+	g_coeff[0] = yy;                       

+	g_coeff[1] = exp_yy;                   

+	g_coeff[2] = xy;                       

+	g_coeff[3] = exp_xy;                   

+

+	/* If (xy < 0) gain = 0 */

+	if (xy < 0)

+		return ((Word16) 0);

+

+	/* compute gain = xy/yy */

+

+	xy >>= 1;                       /* Be sure xy < yy */

+	gain = div_s(xy, yy);

+

+	i = exp_xy;

+	i -= exp_yy;

+

+	gain = shl(gain, i);                   

+

+	/* if (gain > 1.2) gain = 1.2  in Q14 */

+	if(gain > 19661)

+	{

+		gain = 19661;                      

+	}

+	return (gain);

+}

+

+

+

diff --git a/media/libstagefright/codecs/amrwbenc/src/gpclip.c b/media/libstagefright/codecs/amrwbenc/src/gpclip.c
new file mode 100644
index 0000000..e23f2f4
--- /dev/null
+++ b/media/libstagefright/codecs/amrwbenc/src/gpclip.c
@@ -0,0 +1,110 @@
+/*

+ ** Copyright 2003-2010, VisualOn, Inc.

+ **

+ ** Licensed under the Apache License, Version 2.0 (the "License");

+ ** you may not use this file except in compliance with the License.

+ ** You may obtain a copy of the License at

+ **

+ **     http://www.apache.org/licenses/LICENSE-2.0

+ **

+ ** Unless required by applicable law or agreed to in writing, software

+ ** distributed under the License is distributed on an "AS IS" BASIS,

+ ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

+ ** See the License for the specific language governing permissions and

+ ** limitations under the License.

+ */

+

+/**************************************************************************

+*      File: gpclip.c                                                     *

+*                                                                         *

+*      Description:To avoid unstable synthesis on frame erasure, the gain *

+*      need to be limited(gain pitch < 1.0) when the following            *

+*      case occurs                                                        *

+*      a resonance on LPC filter(lp_disp < 60Hz)                          *

+*      a good pitch prediction (lp_gp > 0.95)                             *

+*                                                                         *   

+***************************************************************************/

+#include "typedef.h"

+#include "basic_op.h"

+

+#define DIST_ISF_MAX    307                /* 120 Hz (6400Hz=16384) */

+#define DIST_ISF_THRES  154                /* 60     (6400Hz=16384) */

+#define GAIN_PIT_THRES  14746              /* 0.9 in Q14 */

+#define GAIN_PIT_MIN    9830               /* 0.6 in Q14 */

+#define M               16

+

+

+void Init_gp_clip(

+		Word16 mem[]                          /* (o) : memory of gain of pitch clipping algorithm */

+		)

+{

+	mem[0] = DIST_ISF_MAX;                 

+	mem[1] = GAIN_PIT_MIN;                 

+}

+

+

+Word16 Gp_clip(

+		Word16 mem[]                          /* (i/o) : memory of gain of pitch clipping algorithm */

+	      )

+{

+	Word16 clip = 0;

+	if ((mem[0] < DIST_ISF_THRES) && (mem[1] > GAIN_PIT_THRES))

+		clip = 1;                          

+

+	return (clip);

+}

+

+

+void Gp_clip_test_isf(

+		Word16 isf[],                         /* (i)   : isf values (in frequency domain)           */

+		Word16 mem[]                          /* (i/o) : memory of gain of pitch clipping algorithm */

+		)

+{

+	Word16 dist, dist_min;

+	Word32 i;

+

+	dist_min = vo_sub(isf[1], isf[0]);

+

+	for (i = 2; i < M - 1; i++)

+	{

+		dist = vo_sub(isf[i], isf[i - 1]);

+		if(dist < dist_min)

+		{

+			dist_min = dist;               

+		}

+	}

+

+	dist = extract_h(L_mac(vo_L_mult(26214, mem[0]), 6554, dist_min));

+

+	if (dist > DIST_ISF_MAX)

+	{

+		dist = DIST_ISF_MAX;               

+	}

+	mem[0] = dist;                        

+

+	return;

+}

+

+

+void Gp_clip_test_gain_pit(

+		Word16 gain_pit,                      /* (i) Q14 : gain of quantized pitch                    */

+		Word16 mem[]                          /* (i/o)   : memory of gain of pitch clipping algorithm */

+		)

+{

+	Word16 gain;

+	Word32 L_tmp;

+	L_tmp = (29491 * mem[1])<<1;

+	L_tmp += (3277 * gain_pit)<<1;

+

+	gain = extract_h(L_tmp);

+

+	if(gain < GAIN_PIT_MIN)

+	{

+		gain = GAIN_PIT_MIN;              

+	}

+	mem[1] = gain;                         

+	return;

+}

+

+

+

diff --git a/media/libstagefright/codecs/amrwbenc/src/homing.c b/media/libstagefright/codecs/amrwbenc/src/homing.c
new file mode 100644
index 0000000..015633f
--- /dev/null
+++ b/media/libstagefright/codecs/amrwbenc/src/homing.c
@@ -0,0 +1,46 @@
+/*

+ ** Copyright 2003-2010, VisualOn, Inc.

+ **

+ ** Licensed under the Apache License, Version 2.0 (the "License");

+ ** you may not use this file except in compliance with the License.

+ ** You may obtain a copy of the License at

+ **

+ **     http://www.apache.org/licenses/LICENSE-2.0

+ **

+ ** Unless required by applicable law or agreed to in writing, software

+ ** distributed under the License is distributed on an "AS IS" BASIS,

+ ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

+ ** See the License for the specific language governing permissions and

+ ** limitations under the License.

+ */

+

+/***********************************************************************

+*       File: homing.c                                                 *

+*                                                                      *

+*       Description:Performs the homing routines                       *

+*                                                                      *

+************************************************************************/

+

+#include "typedef.h"

+#include "cnst.h"

+#include "basic_op.h"

+#include "bits.h"

+#include "homing.tab"

+

+Word16 encoder_homing_frame_test(Word16 input_frame[])

+{

+	Word32 i;

+	Word16 j = 0;

+

+	/* check 320 input samples for matching EHF_MASK: defined in e_homing.h */

+	for (i = 0; i < L_FRAME16k; i++)

+	{

+		j = (Word16) (input_frame[i] ^ EHF_MASK);

+

+		if (j)

+			break;

+	}

+

+	return (Word16) (!j);

+}

+

diff --git a/media/libstagefright/codecs/amrwbenc/src/hp400.c b/media/libstagefright/codecs/amrwbenc/src/hp400.c
new file mode 100644
index 0000000..463a53a
--- /dev/null
+++ b/media/libstagefright/codecs/amrwbenc/src/hp400.c
@@ -0,0 +1,106 @@
+/*

+ ** Copyright 2003-2010, VisualOn, Inc.

+ **

+ ** Licensed under the Apache License, Version 2.0 (the "License");

+ ** you may not use this file except in compliance with the License.

+ ** You may obtain a copy of the License at

+ **

+ **     http://www.apache.org/licenses/LICENSE-2.0

+ **

+ ** Unless required by applicable law or agreed to in writing, software

+ ** distributed under the License is distributed on an "AS IS" BASIS,

+ ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

+ ** See the License for the specific language governing permissions and

+ ** limitations under the License.

+ */

+

+/***********************************************************************

+*      File: hp400.c                                                    *

+*                                                                       *

+*      Description:                                                     *

+* 2nd order high pass filter with cut off frequency at 400 Hz.          *

+* Designed with cheby2 function in MATLAB.                              *

+* Optimized for fixed-point to get the following frequency response:    *

+*                                                                       *

+*  frequency:     0Hz   100Hz  200Hz  300Hz  400Hz  630Hz  1.5kHz  3kHz *

+*  dB loss:     -infdB  -30dB  -20dB  -10dB  -3dB   +6dB    +1dB    0dB *

+*                                                                       *

+* Algorithm:                                                            *

+*                                                                       *

+*  y[i] = b[0]*x[i] + b[1]*x[i-1] + b[2]*x[i-2]                         *

+*                   + a[1]*y[i-1] + a[2]*y[i-2];                        *

+*                                                                       *

+*  Word16 b[3] = {3660, -7320,  3660};       in Q12                     *

+*  Word16 a[3] = {4096,  7320, -3540};       in Q12                     *

+*                                                                       *

+*  float -->   b[3] = {0.893554687, -1.787109375,  0.893554687};        *

+*              a[3] = {1.000000000,  1.787109375, -0.864257812};        *

+*                                                                       *

+************************************************************************/

+

+#include "typedef.h"

+#include "basic_op.h"

+#include "oper_32b.h"

+#include "acelp.h"

+

+/* filter coefficients  */

+static Word16 b[3] = {915, -1830, 915};         /* Q12 (/4) */

+static Word16 a[3] = {16384, 29280, -14160};    /* Q12 (x4) */

+/* Initialization of static values */

+

+void Init_HP400_12k8(Word16 mem[])

+{

+	Set_zero(mem, 6);

+}

+

+

+void HP400_12k8(

+		Word16 signal[],                      /* input signal / output is divided by 16 */

+		Word16 lg,                            /* lenght of signal    */

+		Word16 mem[]                          /* filter memory [6]   */

+	       )

+{

+	Word16  x2;

+	Word16 y2_hi, y2_lo, y1_hi, y1_lo, x0, x1;

+	Word32 L_tmp;

+	Word32 num;

+	y2_hi = *mem++;

+	y2_lo = *mem++;

+	y1_hi = *mem++;

+	y1_lo = *mem++;

+	x0 = *mem++;   

+	x1 = *mem;   

+	num = (Word32)lg;

+	do

+	{

+		x2 = x1;

+		x1 = x0;

+		x0 = *signal;

+		/* y[i] = b[0]*x[i] + b[1]*x[i-1] + b140[2]*x[i-2]  */

+		/* + a[1]*y[i-1] + a[2] * y[i-2];  */

+		L_tmp = 8192L;                    /* rounding to maximise precision */

+		L_tmp += y1_lo * a[1];

+		L_tmp += y2_lo * a[2];

+		L_tmp = L_tmp >> 14;

+		L_tmp += (y1_hi * a[1] + y2_hi * a[2] + (x0 + x2)* b[0] + x1 * b[1]) << 1;

+		L_tmp <<= 1;           /* coeff Q12 --> Q13 */

+		y2_hi = y1_hi;

+		y2_lo = y1_lo;

+		y1_hi = (Word16)(L_tmp>>16);

+		y1_lo = (Word16)((L_tmp & 0xffff)>>1);

+

+		/* signal is divided by 16 to avoid overflow in energy computation */

+		*signal++ = (L_tmp + 0x8000) >> 16;

+	}while(--num !=0);

+

+	*mem-- = x1;

+	*mem-- = x0;

+	*mem-- = y1_lo;

+	*mem-- = y1_hi;

+	*mem-- = y2_lo;

+	*mem   = y2_hi;  

+	return;

+}

+

+

+

diff --git a/media/libstagefright/codecs/amrwbenc/src/hp50.c b/media/libstagefright/codecs/amrwbenc/src/hp50.c
new file mode 100644
index 0000000..53e3d7b
--- /dev/null
+++ b/media/libstagefright/codecs/amrwbenc/src/hp50.c
@@ -0,0 +1,106 @@
+/*

+ ** Copyright 2003-2010, VisualOn, Inc.

+ **

+ ** Licensed under the Apache License, Version 2.0 (the "License");

+ ** you may not use this file except in compliance with the License.

+ ** You may obtain a copy of the License at

+ **

+ **     http://www.apache.org/licenses/LICENSE-2.0

+ **

+ ** Unless required by applicable law or agreed to in writing, software

+ ** distributed under the License is distributed on an "AS IS" BASIS,

+ ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

+ ** See the License for the specific language governing permissions and

+ ** limitations under the License.

+ */

+

+/***********************************************************************

+*      File: hp50.c                                                     *

+*                                                                       *

+*	   Description:                                                 *

+* 2nd order high pass filter with cut off frequency at 31 Hz.           *

+* Designed with cheby2 function in MATLAB.                              *

+* Optimized for fixed-point to get the following frequency response:    *

+*                                                                       *

+*  frequency:     0Hz    14Hz  24Hz   31Hz   37Hz   41Hz   47Hz         *

+*  dB loss:     -infdB  -15dB  -6dB   -3dB  -1.5dB  -1dB  -0.5dB        *

+*                                                                       *

+* Algorithm:                                                            *

+*                                                                       *

+*  y[i] = b[0]*x[i] + b[1]*x[i-1] + b[2]*x[i-2]                         *

+*                   + a[1]*y[i-1] + a[2]*y[i-2];                        *

+*                                                                       *

+*  Word16 b[3] = {4053, -8106, 4053};       in Q12                      *

+*  Word16 a[3] = {8192, 16211, -8021};       in Q12                     *

+*                                                                       *

+*  float -->   b[3] = {0.989501953, -1.979003906,  0.989501953};        *

+*              a[3] = {1.000000000,  1.978881836, -0.979125977};        *

+************************************************************************/

+

+#include "typedef.h"

+#include "basic_op.h"

+#include "oper_32b.h"

+#include "cnst.h"

+#include "acelp.h"

+

+/* filter coefficients  */

+static Word16 b[3] = {4053, -8106, 4053};  /* Q12 */

+static Word16 a[3] = {8192, 16211, -8021}; /* Q12 (x2) */

+

+/* Initialization of static values */

+

+void Init_HP50_12k8(Word16 mem[])

+{

+	Set_zero(mem, 6);

+}

+

+

+void HP50_12k8(

+		Word16 signal[],                      /* input/output signal */

+		Word16 lg,                            /* lenght of signal    */

+		Word16 mem[]                          /* filter memory [6]   */

+	      )

+{

+	Word16 x2;

+	Word16 y2_hi, y2_lo, y1_hi, y1_lo, x0, x1;

+	Word32 L_tmp;

+	Word32 num;

+

+	y2_hi = *mem++;

+	y2_lo = *mem++;

+	y1_hi = *mem++;

+	y1_lo = *mem++;

+	x0 = *mem++;   

+	x1 = *mem;

+	num = (Word32)lg;

+	do

+	{

+		x2 = x1;

+		x1 = x0;

+		x0 = *signal;

+		/* y[i] = b[0]*x[i] + b[1]*x[i-1] + b140[2]*x[i-2]  */

+		/* + a[1]*y[i-1] + a[2] * y[i-2];  */

+		L_tmp = 8192 ;                    /* rounding to maximise precision */

+		L_tmp += y1_lo * a[1];

+		L_tmp += y2_lo * a[2];

+		L_tmp = L_tmp >> 14;

+		L_tmp += (y1_hi * a[1] + y2_hi * a[2] + (x0 + x2) * b[0] + x1 * b[1]) << 1;

+		L_tmp <<= 2;           /* coeff Q12 --> Q13 */

+		y2_hi = y1_hi;

+		y2_lo = y1_lo;

+		y1_hi = (Word16)(L_tmp>>16);

+		y1_lo = (Word16)((L_tmp & 0xffff)>>1);

+		*signal++ = extract_h((L_add((L_tmp<<1), 0x8000)));

+	}while(--num !=0);

+

+	*mem-- = x1;

+	*mem-- = x0;

+	*mem-- = y1_lo;

+	*mem-- = y1_hi;

+	*mem-- = y2_lo;

+	*mem-- = y2_hi;  

+

+	return;

+}

+

+

diff --git a/media/libstagefright/codecs/amrwbenc/src/hp6k.c b/media/libstagefright/codecs/amrwbenc/src/hp6k.c
new file mode 100644
index 0000000..5ee5b20
--- /dev/null
+++ b/media/libstagefright/codecs/amrwbenc/src/hp6k.c
@@ -0,0 +1,93 @@
+/*

+ ** Copyright 2003-2010, VisualOn, Inc.

+ **

+ ** Licensed under the Apache License, Version 2.0 (the "License");

+ ** you may not use this file except in compliance with the License.

+ ** You may obtain a copy of the License at

+ **

+ **     http://www.apache.org/licenses/LICENSE-2.0

+ **

+ ** Unless required by applicable law or agreed to in writing, software

+ ** distributed under the License is distributed on an "AS IS" BASIS,

+ ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

+ ** See the License for the specific language governing permissions and

+ ** limitations under the License.

+ */

+

+/***********************************************************************

+*       File: hp6k.c                                                    *

+*                                                                       *

+*	Description:15th order band pass 6kHz to 7kHz FIR filter        *

+*       frequency: 4kHz   5kHz  5.5kHz  6kHz  6.5kHz  7kHz 7.5kHz 8kHz  *

+*	dB loss:  -60dB  -45dB  -13dB   -3dB   0dB    -3dB -13dB  -45dB *

+*	                                                                *                                                                 

+************************************************************************/

+

+#include "typedef.h"

+#include "basic_op.h"

+#include "acelp.h"

+#include "cnst.h"

+

+#define L_FIR 31

+

+/* filter coefficients (gain=4.0) */

+

+Word16 fir_6k_7k[L_FIR] =

+{

+	-32, 47, 32, -27, -369,

+	1122, -1421, 0, 3798, -8880,

+	12349, -10984, 3548, 7766, -18001,

+	22118, -18001, 7766, 3548, -10984,

+	12349, -8880, 3798, 0, -1421,

+	1122, -369, -27, 32, 47,

+	-32

+};

+

+

+void Init_Filt_6k_7k(Word16 mem[])         /* mem[30] */

+{

+	Set_zero(mem, L_FIR - 1);

+	return;

+}

+

+void Filt_6k_7k(

+		Word16 signal[],                      /* input:  signal                  */

+		Word16 lg,                            /* input:  length of input         */

+		Word16 mem[]                          /* in/out: memory (size=30)        */

+	       )

+{

+	Word16 x[L_SUBFR16k + (L_FIR - 1)];

+	Word32 i, L_tmp;

+

+	Copy(mem, x, L_FIR - 1);

+	for (i = lg - 1; i >= 0; i--)

+	{

+		x[i + L_FIR - 1] = signal[i] >> 2;                         /* gain of filter = 4 */

+	}	

+	for (i = 0; i < lg; i++)

+	{

+		L_tmp =  (x[i] + x[i+ 30]) * fir_6k_7k[0];

+		L_tmp += (x[i+1] + x[i + 29]) * fir_6k_7k[1];

+		L_tmp += (x[i+2] + x[i + 28]) * fir_6k_7k[2];

+		L_tmp += (x[i+3] + x[i + 27]) * fir_6k_7k[3];

+		L_tmp += (x[i+4] + x[i + 26]) * fir_6k_7k[4];

+		L_tmp += (x[i+5] + x[i + 25]) * fir_6k_7k[5];

+		L_tmp += (x[i+6] + x[i + 24]) * fir_6k_7k[6];

+		L_tmp += (x[i+7] + x[i + 23]) * fir_6k_7k[7];

+		L_tmp += (x[i+8] + x[i + 22]) * fir_6k_7k[8];

+		L_tmp += (x[i+9] + x[i + 21]) * fir_6k_7k[9];

+		L_tmp += (x[i+10] + x[i + 20]) * fir_6k_7k[10];

+		L_tmp += (x[i+11] + x[i + 19]) * fir_6k_7k[11];

+		L_tmp += (x[i+12] + x[i + 18]) * fir_6k_7k[12];

+		L_tmp += (x[i+13] + x[i + 17]) * fir_6k_7k[13];

+		L_tmp += (x[i+14] + x[i + 16]) * fir_6k_7k[14];

+		L_tmp += (x[i+15]) * fir_6k_7k[15];

+		signal[i] = (L_tmp + 0x4000) >> 15;

+	}

+

+	Copy(x + lg, mem, L_FIR - 1);

+

+}

+

+

+

diff --git a/media/libstagefright/codecs/amrwbenc/src/hp_wsp.c b/media/libstagefright/codecs/amrwbenc/src/hp_wsp.c
new file mode 100644
index 0000000..7fb62a4
--- /dev/null
+++ b/media/libstagefright/codecs/amrwbenc/src/hp_wsp.c
@@ -0,0 +1,148 @@
+/*

+ ** Copyright 2003-2010, VisualOn, Inc.

+ **

+ ** Licensed under the Apache License, Version 2.0 (the "License");

+ ** you may not use this file except in compliance with the License.

+ ** You may obtain a copy of the License at

+ **

+ **     http://www.apache.org/licenses/LICENSE-2.0

+ **

+ ** Unless required by applicable law or agreed to in writing, software

+ ** distributed under the License is distributed on an "AS IS" BASIS,

+ ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

+ ** See the License for the specific language governing permissions and

+ ** limitations under the License.

+ */

+

+/***********************************************************************

+*       File: hp_wsp.c                                                  *

+*       Description:                                                    *

+*       3nd order high pass filter with cut off frequency at 180Hz      *

+* Algorithm:                                                            *

+*                                                                       *

+*  y[i] = b[0]*x[i] + b[1]*x[i-1] + b[2]*x[i-2] + b[3]*x[i-3]           *

+*                   + a[1]*y[i-1] + a[2]*y[i-2] + a[3]*y[i-3];          *

+*                                                                       *

+* float a_coef[HP_ORDER]= {                                             *

+*    -2.64436711600664f,                                                *

+*    2.35087386625360f,                                                 *

+*   -0.70001156927424f};                                                *

+*                                                                       *

+* float b_coef[HP_ORDER+1]= {                                           *

+*     -0.83787057505665f,                                               *

+*    2.50975570071058f,                                                 *

+*   -2.50975570071058f,                                                 *

+*    0.83787057505665f};                                                *

+*                                                                       *

+*************************************************************************/

+

+#include "typedef.h"

+#include "basic_op.h"

+#include "oper_32b.h"

+#include "acelp.h"

+

+/* filter coefficients in Q12 */

+static Word16 a[4] = {8192, 21663, -19258, 5734};

+static Word16 b[4] = {-3432, +10280, -10280, +3432};

+

+/* Initialization of static values */

+void Init_Hp_wsp(Word16 mem[])

+{

+	Set_zero(mem, 9);

+

+	return;

+}

+

+void scale_mem_Hp_wsp(Word16 mem[], Word16 exp)

+{

+	Word32 i;

+	Word32 L_tmp;

+

+	for (i = 0; i < 6; i += 2)

+	{

+		L_tmp = ((mem[i] << 16) + (mem[i + 1]<<1));

+		L_tmp = L_shl(L_tmp, exp);

+		mem[i] = L_tmp >> 16;

+		mem[i + 1] = (L_tmp & 0xffff)>>1;

+	}

+

+	for (i = 6; i < 9; i++)

+	{

+		L_tmp = L_deposit_h(mem[i]);       /* x[i] */

+		L_tmp = L_shl(L_tmp, exp);

+		mem[i] = vo_round(L_tmp);

+	}

+

+	return;

+}

+

+

+void Hp_wsp(

+		Word16 wsp[],                         /* i   : wsp[]  signal       */

+		Word16 hp_wsp[],                      /* o   : hypass wsp[]        */

+		Word16 lg,                            /* i   : lenght of signal    */

+		Word16 mem[]                          /* i/o : filter memory [9]   */

+	   )

+{

+	Word16 x0, x1, x2, x3;

+	Word16 y3_hi, y3_lo, y2_hi, y2_lo, y1_hi, y1_lo;

+	Word32 i, L_tmp;

+

+	y3_hi = mem[0];                        

+	y3_lo = mem[1];                        

+	y2_hi = mem[2];                        

+	y2_lo = mem[3];                        

+	y1_hi = mem[4];                        

+	y1_lo = mem[5];                        

+	x0 = mem[6];                           

+	x1 = mem[7];                           

+	x2 = mem[8];                           

+

+	for (i = 0; i < lg; i++)

+	{

+		x3 = x2;                           

+		x2 = x1;                           

+		x1 = x0;                           

+		x0 = wsp[i];                       

+		/* y[i] = b[0]*x[i] + b[1]*x[i-1] + b140[2]*x[i-2] + b[3]*x[i-3]  */

+		/* + a[1]*y[i-1] + a[2] * y[i-2]  + a[3]*y[i-3]  */

+

+		L_tmp = 16384L;                    /* rounding to maximise precision */

+		L_tmp += (y1_lo * a[1])<<1;

+		L_tmp += (y2_lo * a[2])<<1;

+		L_tmp += (y3_lo * a[3])<<1;

+		L_tmp = L_tmp >> 15;

+		L_tmp += (y1_hi * a[1])<<1;

+		L_tmp += (y2_hi * a[2])<<1;

+		L_tmp += (y3_hi * a[3])<<1;

+		L_tmp += (x0 * b[0])<<1;

+		L_tmp += (x1 * b[1])<<1;

+		L_tmp += (x2 * b[2])<<1;

+		L_tmp += (x3 * b[3])<<1;

+

+		L_tmp = L_tmp << 2;

+

+		y3_hi = y2_hi;                     

+		y3_lo = y2_lo;                     

+		y2_hi = y1_hi;                     

+		y2_lo = y1_lo; 

+		y1_hi = L_tmp >> 16;

+		y1_lo = (L_tmp & 0xffff) >>1;

+

+		hp_wsp[i] = (L_tmp + 0x4000)>>15;          

+	}

+

+	mem[0] = y3_hi;                        

+	mem[1] = y3_lo;                        

+	mem[2] = y2_hi;                        

+	mem[3] = y2_lo;                        

+	mem[4] = y1_hi;                        

+	mem[5] = y1_lo;                        

+	mem[6] = x0;                           

+	mem[7] = x1;                           

+	mem[8] = x2;                           

+

+	return;

+}

+

+

diff --git a/media/libstagefright/codecs/amrwbenc/src/int_lpc.c b/media/libstagefright/codecs/amrwbenc/src/int_lpc.c
new file mode 100644
index 0000000..be1fd0b
--- /dev/null
+++ b/media/libstagefright/codecs/amrwbenc/src/int_lpc.c
@@ -0,0 +1,66 @@
+/*

+ ** Copyright 2003-2010, VisualOn, Inc.

+ **

+ ** Licensed under the Apache License, Version 2.0 (the "License");

+ ** you may not use this file except in compliance with the License.

+ ** You may obtain a copy of the License at

+ **

+ **     http://www.apache.org/licenses/LICENSE-2.0

+ **

+ ** Unless required by applicable law or agreed to in writing, software

+ ** distributed under the License is distributed on an "AS IS" BASIS,

+ ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

+ ** See the License for the specific language governing permissions and

+ ** limitations under the License.

+ */

+

+/***********************************************************************

+*      File: int_lpc.c                                                 *

+*                                                                      *

+*      Description:Interpolation of the LP parameters in 4 subframes.  *

+*                                                                      *

+************************************************************************/

+

+#include "typedef.h"

+#include "basic_op.h"

+#include "cnst.h"

+#include "acelp.h"

+

+#define MP1 (M+1)

+

+

+void Int_isp(

+		Word16 isp_old[],                     /* input : isps from past frame              */

+		Word16 isp_new[],                     /* input : isps from present frame           */

+		Word16 frac[],                        /* input : fraction for 3 first subfr (Q15)  */

+		Word16 Az[]                           /* output: LP coefficients in 4 subframes    */

+	    )

+{

+	Word32 i, k; 

+	Word16 fac_old, fac_new;

+	Word16 isp[M];

+	Word32 L_tmp;

+

+	for (k = 0; k < 3; k++)

+	{

+		fac_new = frac[k];                

+		fac_old = (32767 - fac_new) + 1;  /* 1.0 - fac_new */

+

+		for (i = 0; i < M; i++)

+		{

+			L_tmp = (isp_old[i] * fac_old)<<1;

+			L_tmp += (isp_new[i] * fac_new)<<1;

+			isp[i] = (L_tmp + 0x8000)>>16;        

+		}

+		Isp_Az(isp, Az, M, 0);

+		Az += MP1;

+	}

+

+	/* 4th subframe: isp_new (frac=1.0) */

+	Isp_Az(isp_new, Az, M, 0);

+

+	return;

+}

+

+

+

diff --git a/media/libstagefright/codecs/amrwbenc/src/isp_az.c b/media/libstagefright/codecs/amrwbenc/src/isp_az.c
new file mode 100644
index 0000000..7b44d12
--- /dev/null
+++ b/media/libstagefright/codecs/amrwbenc/src/isp_az.c
@@ -0,0 +1,247 @@
+/*

+ ** Copyright 2003-2010, VisualOn, Inc.

+ **

+ ** Licensed under the Apache License, Version 2.0 (the "License");

+ ** you may not use this file except in compliance with the License.

+ ** You may obtain a copy of the License at

+ **

+ **     http://www.apache.org/licenses/LICENSE-2.0

+ **

+ ** Unless required by applicable law or agreed to in writing, software

+ ** distributed under the License is distributed on an "AS IS" BASIS,

+ ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

+ ** See the License for the specific language governing permissions and

+ ** limitations under the License.

+ */

+

+/***********************************************************************

+*      File: isp_az.c                                                  *

+*                                                                      *

+*      Description:Compute the LPC coefficients from isp (order=M)     *

+*                                                                      *

+************************************************************************/

+

+#include "typedef.h"

+#include "basic_op.h"

+#include "oper_32b.h"

+#include "cnst.h"

+

+#define NC (M/2)

+#define NC16k (M16k/2)

+

+/* local function */

+

+static void Get_isp_pol(Word16 * isp, Word32 * f, Word16 n);

+static void Get_isp_pol_16kHz(Word16 * isp, Word32 * f, Word16 n);

+

+void Isp_Az(

+		Word16 isp[],                         /* (i) Q15 : Immittance spectral pairs            */

+		Word16 a[],                           /* (o) Q12 : predictor coefficients (order = M)   */

+		Word16 m,

+		Word16 adaptive_scaling               /* (i) 0   : adaptive scaling disabled */

+		                                      /*     1   : adaptive scaling enabled  */

+	   )

+{

+	Word32 i, j; 

+	Word16 hi, lo;

+	Word32 f1[NC16k + 1], f2[NC16k];

+	Word16 nc;

+	Word32 t0;

+	Word16 q, q_sug;

+	Word32 tmax;

+

+	nc = (m >> 1);

+	if(nc > 8)

+	{

+		Get_isp_pol_16kHz(&isp[0], f1, nc);

+		for (i = 0; i <= nc; i++)

+		{

+			f1[i] = f1[i] << 2;

+		}

+	} else

+		Get_isp_pol(&isp[0], f1, nc);

+

+	if (nc > 8)

+	{

+		Get_isp_pol_16kHz(&isp[1], f2, (nc - 1));

+		for (i = 0; i <= nc - 1; i++)

+		{

+			f2[i] = f2[i] << 2;

+		}

+	} else

+		Get_isp_pol(&isp[1], f2, (nc - 1));

+

+	/*-----------------------------------------------------*

+	 *  Multiply F2(z) by (1 - z^-2)                       *

+	 *-----------------------------------------------------*/

+

+	for (i = (nc - 1); i > 1; i--)

+	{

+		f2[i] = vo_L_sub(f2[i], f2[i - 2]);          /* f2[i] -= f2[i-2]; */

+	}

+

+	/*----------------------------------------------------------*

+	 *  Scale F1(z) by (1+isp[m-1])  and  F2(z) by (1-isp[m-1]) *

+	 *----------------------------------------------------------*/

+

+	for (i = 0; i < nc; i++)

+	{

+		/* f1[i] *= (1.0 + isp[M-1]); */

+

+		hi = f1[i] >> 16;

+		lo = (f1[i] & 0xffff)>>1;

+

+		t0 = Mpy_32_16(hi, lo, isp[m - 1]);

+		f1[i] = vo_L_add(f1[i], t0); 

+

+		/* f2[i] *= (1.0 - isp[M-1]); */

+

+		hi = f2[i] >> 16;

+		lo = (f2[i] & 0xffff)>>1;

+		t0 = Mpy_32_16(hi, lo, isp[m - 1]);

+		f2[i] = vo_L_sub(f2[i], t0); 

+	}

+

+	/*-----------------------------------------------------*

+	 *  A(z) = (F1(z)+F2(z))/2                             *

+	 *  F1(z) is symmetric and F2(z) is antisymmetric      *

+	 *-----------------------------------------------------*/

+

+	/* a[0] = 1.0; */

+	a[0] = 4096;  

+	tmax = 1;                            

+	for (i = 1, j = m - 1; i < nc; i++, j--)

+	{

+		/* a[i] = 0.5*(f1[i] + f2[i]); */

+

+		t0 = vo_L_add(f1[i], f2[i]);          /* f1[i] + f2[i]             */

+		tmax |= L_abs(t0);                 

+		a[i] = (Word16)(vo_L_shr_r(t0, 12)); /* from Q23 to Q12 and * 0.5 */

+

+		/* a[j] = 0.5*(f1[i] - f2[i]); */

+

+		t0 = vo_L_sub(f1[i], f2[i]);          /* f1[i] - f2[i]             */

+		tmax |= L_abs(t0);                

+		a[j] = (Word16)(vo_L_shr_r(t0, 12)); /* from Q23 to Q12 and * 0.5 */

+	}

+

+	/* rescale data if overflow has occured and reprocess the loop */

+	if(adaptive_scaling == 1)

+		q = 4 - norm_l(tmax);        /* adaptive scaling enabled */

+	else

+		q = 0;                           /* adaptive scaling disabled */

+

+	if (q > 0)

+	{

+		q_sug = (12 + q);

+		for (i = 1, j = m - 1; i < nc; i++, j--)

+		{

+			/* a[i] = 0.5*(f1[i] + f2[i]); */

+			t0 = vo_L_add(f1[i], f2[i]);          /* f1[i] + f2[i]             */

+			a[i] = (Word16)(vo_L_shr_r(t0, q_sug)); /* from Q23 to Q12 and * 0.5 */

+

+			/* a[j] = 0.5*(f1[i] - f2[i]); */

+			t0 = vo_L_sub(f1[i], f2[i]);          /* f1[i] - f2[i]             */

+			a[j] = (Word16)(vo_L_shr_r(t0, q_sug)); /* from Q23 to Q12 and * 0.5 */

+		}

+		a[0] = shr(a[0], q); 

+	}

+	else

+	{

+		q_sug = 12; 

+		q     = 0; 

+	}

+	/* a[NC] = 0.5*f1[NC]*(1.0 + isp[M-1]); */

+	hi = f1[nc] >> 16;

+	lo = (f1[nc] & 0xffff)>>1;

+	t0 = Mpy_32_16(hi, lo, isp[m - 1]);

+	t0 = vo_L_add(f1[nc], t0);

+	a[nc] = (Word16)(L_shr_r(t0, q_sug));    /* from Q23 to Q12 and * 0.5 */

+	/* a[m] = isp[m-1]; */

+

+	a[m] = vo_shr_r(isp[m - 1], (3 + q));           /* from Q15 to Q12          */

+	return;

+}

+

+/*-----------------------------------------------------------*

+* procedure Get_isp_pol:                                    *

+*           ~~~~~~~~~~~                                     *

+*   Find the polynomial F1(z) or F2(z) from the ISPs.       *

+* This is performed by expanding the product polynomials:   *

+*                                                           *

+* F1(z) =   product   ( 1 - 2 isp_i z^-1 + z^-2 )           *

+*         i=0,2,4,6,8                                       *

+* F2(z) =   product   ( 1 - 2 isp_i z^-1 + z^-2 )           *

+*         i=1,3,5,7                                         *

+*                                                           *

+* where isp_i are the ISPs in the cosine domain.            *

+*-----------------------------------------------------------*

+*                                                           *

+* Parameters:                                               *

+*  isp[]   : isp vector (cosine domaine)         in Q15     *

+*  f[]     : the coefficients of F1 or F2        in Q23     *

+*  n       : == NC for F1(z); == NC-1 for F2(z)             *

+*-----------------------------------------------------------*/

+

+static void Get_isp_pol(Word16 * isp, Word32 * f, Word16 n)

+{

+	Word16 hi, lo;

+	Word32 i, j, t0;

+	/* All computation in Q23 */

+

+	f[0] = vo_L_mult(4096, 1024);               /* f[0] = 1.0;        in Q23  */

+	f[1] = vo_L_mult(isp[0], -256);             /* f[1] = -2.0*isp[0] in Q23  */

+

+	f += 2;                                  /* Advance f pointer          */

+	isp += 2;                                /* Advance isp pointer        */

+	for (i = 2; i <= n; i++)

+	{

+		*f = f[-2];                        

+		for (j = 1; j < i; j++, f--)

+		{

+			hi = f[-1]>>16;

+			lo = (f[-1] & 0xffff)>>1;

+

+			t0 = Mpy_32_16(hi, lo, *isp);  /* t0 = f[-1] * isp    */

+			t0 = t0 << 1;

+			*f = vo_L_sub(*f, t0);              /* *f -= t0            */

+			*f = vo_L_add(*f, f[-2]);           /* *f += f[-2]         */

+		}

+		*f -= (*isp << 9);           /* *f -= isp<<8        */

+		f += i;                            /* Advance f pointer   */

+		isp += 2;                          /* Advance isp pointer */

+	}

+	return;

+}

+

+static void Get_isp_pol_16kHz(Word16 * isp, Word32 * f, Word16 n)

+{

+	Word16 hi, lo;

+	Word32 i, j, t0;

+

+	/* All computation in Q23 */

+	f[0] = L_mult(4096, 256);                /* f[0] = 1.0;        in Q23  */

+	f[1] = L_mult(isp[0], -64);              /* f[1] = -2.0*isp[0] in Q23  */

+

+	f += 2;                                  /* Advance f pointer          */

+	isp += 2;                                /* Advance isp pointer        */

+

+	for (i = 2; i <= n; i++)

+	{

+		*f = f[-2];                        

+		for (j = 1; j < i; j++, f--)

+		{

+			VO_L_Extract(f[-1], &hi, &lo);

+			t0 = Mpy_32_16(hi, lo, *isp);  /* t0 = f[-1] * isp    */

+			t0 = L_shl2(t0, 1);

+			*f = L_sub(*f, t0);              /* *f -= t0            */

+			*f = L_add(*f, f[-2]);           /* *f += f[-2]         */

+		}

+		*f = L_msu(*f, *isp, 64);            /* *f -= isp<<8        */

+		f += i;                            /* Advance f pointer   */

+		isp += 2;                          /* Advance isp pointer */

+	}

+	return;

+}

+

+

diff --git a/media/libstagefright/codecs/amrwbenc/src/isp_isf.c b/media/libstagefright/codecs/amrwbenc/src/isp_isf.c
new file mode 100644
index 0000000..6c6e389
--- /dev/null
+++ b/media/libstagefright/codecs/amrwbenc/src/isp_isf.c
@@ -0,0 +1,91 @@
+/*

+ ** Copyright 2003-2010, VisualOn, Inc.

+ **

+ ** Licensed under the Apache License, Version 2.0 (the "License");

+ ** you may not use this file except in compliance with the License.

+ ** You may obtain a copy of the License at

+ **

+ **     http://www.apache.org/licenses/LICENSE-2.0

+ **

+ ** Unless required by applicable law or agreed to in writing, software

+ ** distributed under the License is distributed on an "AS IS" BASIS,

+ ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

+ ** See the License for the specific language governing permissions and

+ ** limitations under the License.

+ */

+

+/***********************************************************************

+*       File: isp_isf.c                                                *

+*                                                                      *

+*       Description:                                                   *

+*	Isp_isf   Transformation isp to isf                            *

+*	Isf_isp   Transformation isf to isp                            *

+*                                                                      *

+*	The transformation from isp[i] to isf[i] and isf[i] to isp[i]  *

+*	are approximated by a look-up table and interpolation          *

+*                                                                      *

+************************************************************************/

+

+#include "typedef.h"

+#include "basic_op.h"

+#include "isp_isf.tab"                     /* Look-up table for transformations */

+

+void Isp_isf(

+		Word16 isp[],                         /* (i) Q15 : isp[m] (range: -1<=val<1)                */

+		Word16 isf[],                         /* (o) Q15 : isf[m] normalized (range: 0.0<=val<=0.5) */

+		Word16 m                              /* (i)     : LPC order                                */

+	    )

+{

+	Word32 i, ind;

+	Word32 L_tmp;

+	ind = 127;                               /* beging at end of table -1 */

+	for (i = (m - 1); i >= 0; i--)

+	{

+		if (i >= (m - 2))

+		{                                  /* m-2 is a constant */

+			ind = 127;                       /* beging at end of table -1 */

+		}

+		/* find value in table that is just greater than isp[i] */

+		while (table[ind] < isp[i])

+			ind--;

+		/* acos(isp[i])= ind*128 + ( ( isp[i]-table[ind] ) * slope[ind] )/2048 */

+		L_tmp = vo_L_mult(vo_sub(isp[i], table[ind]), slope[ind]);

+		isf[i] = vo_round((L_tmp << 4));   /* (isp[i]-table[ind])*slope[ind])>>11 */

+		isf[i] = add1(isf[i], (ind << 7)); 

+	}

+	isf[m - 1] = (isf[m - 1] >> 1);      

+	return;

+}

+

+

+void Isf_isp(

+		Word16 isf[],                         /* (i) Q15 : isf[m] normalized (range: 0.0<=val<=0.5) */

+		Word16 isp[],                         /* (o) Q15 : isp[m] (range: -1<=val<1)                */

+		Word16 m                              /* (i)     : LPC order                                */

+	    )

+{

+	Word16 offset;

+	Word32 i, ind, L_tmp;

+

+	for (i = 0; i < m - 1; i++)

+	{

+		isp[i] = isf[i];                  

+	}

+	isp[m - 1] = (isf[m - 1] << 1);

+

+	for (i = 0; i < m; i++)

+	{

+		ind = (isp[i] >> 7);                      /* ind    = b7-b15 of isf[i] */

+		offset = (Word16) (isp[i] & 0x007f);      /* offset = b0-b6  of isf[i] */

+

+		/* isp[i] = table[ind]+ ((table[ind+1]-table[ind])*offset) / 128 */

+		L_tmp = vo_L_mult(vo_sub(table[ind + 1], table[ind]), offset);

+		isp[i] = add1(table[ind], (Word16)((L_tmp >> 8)));   

+	}

+

+	return;

+}

+

+

+

+

diff --git a/media/libstagefright/codecs/amrwbenc/src/lag_wind.c b/media/libstagefright/codecs/amrwbenc/src/lag_wind.c
new file mode 100644
index 0000000..0397704
--- /dev/null
+++ b/media/libstagefright/codecs/amrwbenc/src/lag_wind.c
@@ -0,0 +1,49 @@
+/*

+ ** Copyright 2003-2010, VisualOn, Inc.

+ **

+ ** Licensed under the Apache License, Version 2.0 (the "License");

+ ** you may not use this file except in compliance with the License.

+ ** You may obtain a copy of the License at

+ **

+ **     http://www.apache.org/licenses/LICENSE-2.0

+ **

+ ** Unless required by applicable law or agreed to in writing, software

+ ** distributed under the License is distributed on an "AS IS" BASIS,

+ ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

+ ** See the License for the specific language governing permissions and

+ ** limitations under the License.

+ */

+

+/***********************************************************************

+*      File: lag_wind.c                                                *

+*                                                                      *

+*	   Description: Lag_windows on autocorrelations                *

+*	                r[i] *= lag_wind[i]                            *

+*                                                                      *

+************************************************************************/

+

+#include "typedef.h"

+#include "basic_op.h"

+#include "oper_32b.h"

+#include "lag_wind.tab"

+

+

+void Lag_window(

+		Word16 r_h[],                         /* (i/o)   : Autocorrelations  (msb)          */

+		Word16 r_l[]                          /* (i/o)   : Autocorrelations  (lsb)          */

+	       )

+{

+	Word32 i;

+	Word32 x;

+

+	for (i = 1; i <= M; i++)

+	{

+		x = Mpy_32(r_h[i], r_l[i], volag_h[i - 1], volag_l[i - 1]);

+		r_h[i] = x >> 16;

+		r_l[i] = (x & 0xffff)>>1;

+	}

+	return;

+}

+

+

+

diff --git a/media/libstagefright/codecs/amrwbenc/src/levinson.c b/media/libstagefright/codecs/amrwbenc/src/levinson.c
new file mode 100644
index 0000000..8bc6f62
--- /dev/null
+++ b/media/libstagefright/codecs/amrwbenc/src/levinson.c
@@ -0,0 +1,250 @@
+/*

+ ** Copyright 2003-2010, VisualOn, Inc.

+ **

+ ** Licensed under the Apache License, Version 2.0 (the "License");

+ ** you may not use this file except in compliance with the License.

+ ** You may obtain a copy of the License at

+ **

+ **     http://www.apache.org/licenses/LICENSE-2.0

+ **

+ ** Unless required by applicable law or agreed to in writing, software

+ ** distributed under the License is distributed on an "AS IS" BASIS,

+ ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

+ ** See the License for the specific language governing permissions and

+ ** limitations under the License.

+ */

+

+/***********************************************************************

+*      File: levinson.c                                                *

+*                                                                      *

+*      Description:LEVINSON-DURBIN algorithm in double precision       *

+*                                                                      *

+************************************************************************/

+/*---------------------------------------------------------------------------*

+ *                         LEVINSON.C					     *

+ *---------------------------------------------------------------------------*

+ *                                                                           *

+ *      LEVINSON-DURBIN algorithm in double precision                        *

+ *                                                                           *

+ *                                                                           *

+ * Algorithm                                                                 *

+ *                                                                           *

+ *       R[i]    autocorrelations.                                           *

+ *       A[i]    filter coefficients.                                        *

+ *       K       reflection coefficients.                                    *

+ *       Alpha   prediction gain.                                            *

+ *                                                                           *

+ *       Initialization:                                                     *

+ *               A[0] = 1                                                    *

+ *               K    = -R[1]/R[0]                                           *

+ *               A[1] = K                                                    *

+ *               Alpha = R[0] * (1-K**2]                                     *

+ *                                                                           *

+ *       Do for  i = 2 to M                                                  *

+ *                                                                           *

+ *            S =  SUM ( R[j]*A[i-j] ,j=1,i-1 ) +  R[i]                      *

+ *                                                                           *

+ *            K = -S / Alpha                                                 *

+ *                                                                           *

+ *            An[j] = A[j] + K*A[i-j]   for j=1 to i-1                       *

+ *                                      where   An[i] = new A[i]             *

+ *            An[i]=K                                                        *

+ *                                                                           *

+ *            Alpha=Alpha * (1-K**2)                                         *

+ *                                                                           *

+ *       END                                                                 *

+ *                                                                           *

+ * Remarks on the dynamics of the calculations.                              *

+ *                                                                           *

+ *       The numbers used are in double precision in the following format :  *

+ *       A = AH <<16 + AL<<1.  AH and AL are 16 bit signed integers.         *

+ *       Since the LSB's also contain a sign bit, this format does not       *

+ *       correspond to standard 32 bit integers.  We use this format since   *

+ *       it allows fast execution of multiplications and divisions.          *

+ *                                                                           *

+ *       "DPF" will refer to this special format in the following text.      *

+ *       See oper_32b.c                                                      *

+ *                                                                           *

+ *       The R[i] were normalized in routine AUTO (hence, R[i] < 1.0).       *

+ *       The K[i] and Alpha are theoretically < 1.0.                         *

+ *       The A[i], for a sampling frequency of 8 kHz, are in practice        *

+ *       always inferior to 16.0.                                            *

+ *                                                                           *

+ *       These characteristics allow straigthforward fixed-point             *

+ *       implementation.  We choose to represent the parameters as           *

+ *       follows :                                                           *

+ *                                                                           *

+ *               R[i]    Q31   +- .99..                                      *

+ *               K[i]    Q31   +- .99..                                      *

+ *               Alpha   Normalized -> mantissa in Q31 plus exponent         *

+ *               A[i]    Q27   +- 15.999..                                   *

+ *                                                                           *

+ *       The additions are performed in 32 bit.  For the summation used      *

+ *       to calculate the K[i], we multiply numbers in Q31 by numbers        *

+ *       in Q27, with the result of the multiplications in Q27,              *

+ *       resulting in a dynamic of +- 16.  This is sufficient to avoid       *

+ *       overflow, since the final result of the summation is                *

+ *       necessarily < 1.0 as both the K[i] and Alpha are                    *

+ *       theoretically < 1.0.                                                *

+ *___________________________________________________________________________*/

+#include "typedef.h"

+#include "basic_op.h"

+#include "oper_32b.h"

+#include "acelp.h"

+

+#define M   16

+#define NC  (M/2)

+

+void Init_Levinson(

+		Word16 * mem                          /* output  :static memory (18 words) */

+		)

+{

+	Set_zero(mem, 18);                     /* old_A[0..M-1] = 0, old_rc[0..1] = 0 */

+	return;

+}

+

+

+void Levinson(

+		Word16 Rh[],                          /* (i)     : Rh[M+1] Vector of autocorrelations (msb) */

+		Word16 Rl[],                          /* (i)     : Rl[M+1] Vector of autocorrelations (lsb) */

+		Word16 A[],                           /* (o) Q12 : A[M]    LPC coefficients  (m = 16)       */

+		Word16 rc[],                          /* (o) Q15 : rc[M]   Reflection coefficients.         */

+		Word16 * mem                          /* (i/o)   :static memory (18 words)                  */

+	     )

+{

+	Word32 i, j;

+	Word16 hi, lo;

+	Word16 Kh, Kl;                         /* reflection coefficient; hi and lo           */

+	Word16 alp_h, alp_l, alp_exp;          /* Prediction gain; hi lo and exponent         */

+	Word16 Ah[M + 1], Al[M + 1];           /* LPC coef. in double prec.                   */

+	Word16 Anh[M + 1], Anl[M + 1];         /* LPC coef.for next iteration in double prec. */

+	Word32 t0, t1, t2;                     /* temporary variable                          */

+	Word16 *old_A, *old_rc;

+

+	/* Last A(z) for case of unstable filter */

+	old_A = mem;                           

+	old_rc = mem + M;                      

+

+	/* K = A[1] = -R[1] / R[0] */

+

+	t1 = ((Rh[1] << 16) + (Rl[1] << 1));   /* R[1] in Q31 */

+	t2 = L_abs(t1);                        /* abs R[1]         */

+	t0 = Div_32(t2, Rh[0], Rl[0]);         /* R[1]/R[0] in Q31 */

+	if (t1 > 0)

+		t0 = -t0;                          /* -R[1]/R[0]       */

+

+	Kh = t0 >> 16;

+	Kl = (t0 & 0xffff)>>1;

+	rc[0] = Kh;                            

+	t0 = (t0 >> 4);                        /* A[1] in Q27      */

+

+	Ah[1] = t0 >> 16;

+	Al[1] = (t0 & 0xffff)>>1;

+

+	/* Alpha = R[0] * (1-K**2) */

+	t0 = Mpy_32(Kh, Kl, Kh, Kl);           /* K*K      in Q31 */

+	t0 = L_abs(t0);                        /* Some case <0 !! */

+	t0 = vo_L_sub((Word32) 0x7fffffffL, t0);  /* 1 - K*K  in Q31 */

+

+	hi = t0 >> 16;

+	lo = (t0 & 0xffff)>>1;

+

+	t0 = Mpy_32(Rh[0], Rl[0], hi, lo);     /* Alpha in Q31    */

+

+	/* Normalize Alpha */

+	alp_exp = norm_l(t0);

+	t0 = (t0 << alp_exp);

+

+	alp_h = t0 >> 16;

+	alp_l = (t0 & 0xffff)>>1;

+	/*--------------------------------------*

+	 * ITERATIONS  I=2 to M                 *

+	 *--------------------------------------*/

+	for (i = 2; i <= M; i++)

+	{

+		/* t0 = SUM ( R[j]*A[i-j] ,j=1,i-1 ) +  R[i] */

+		t0 = 0;                           

+		for (j = 1; j < i; j++)

+			t0 = vo_L_add(t0, Mpy_32(Rh[j], Rl[j], Ah[i - j], Al[i - j]));

+

+		t0 = t0 << 4;                 /* result in Q27 -> convert to Q31 */

+		/* No overflow possible            */

+		t1 = ((Rh[i] << 16) + (Rl[i] << 1));

+		t0 = vo_L_add(t0, t1);                /* add R[i] in Q31                 */

+

+		/* K = -t0 / Alpha */

+		t1 = L_abs(t0);

+		t2 = Div_32(t1, alp_h, alp_l);     /* abs(t0)/Alpha                   */

+		if (t0 > 0)

+			t2 = -t2;                   /* K =-t0/Alpha                    */

+		t2 = (t2 << alp_exp);           /* denormalize; compare to Alpha   */

+

+		Kh = t2 >> 16;

+		Kl = (t2 & 0xffff)>>1;

+

+		rc[i - 1] = Kh;                   

+		/* Test for unstable filter. If unstable keep old A(z) */

+		if (abs_s(Kh) > 32750)

+		{

+			A[0] = 4096;                    /* Ai[0] not stored (always 1.0) */

+			for (j = 0; j < M; j++)

+			{

+				A[j + 1] = old_A[j];       

+			}

+			rc[0] = old_rc[0];             /* only two rc coefficients are needed */

+			rc[1] = old_rc[1];

+			return;

+		}

+		/*------------------------------------------*

+		 *  Compute new LPC coeff. -> An[i]         *

+		 *  An[j]= A[j] + K*A[i-j]     , j=1 to i-1 *

+		 *  An[i]= K                                *

+		 *------------------------------------------*/

+		for (j = 1; j < i; j++)

+		{

+			t0 = Mpy_32(Kh, Kl, Ah[i - j], Al[i - j]);

+			t0 = vo_L_add(t0, ((Ah[j] << 16) + (Al[j] << 1)));

+			Anh[j] = t0 >> 16;

+			Anl[j] = (t0 & 0xffff)>>1;

+		}

+		t2 = (t2 >> 4);                 /* t2 = K in Q31 ->convert to Q27  */

+

+		VO_L_Extract(t2, &Anh[i], &Anl[i]);   /* An[i] in Q27                    */

+

+		/* Alpha = Alpha * (1-K**2) */

+		t0 = Mpy_32(Kh, Kl, Kh, Kl);               /* K*K      in Q31 */

+		t0 = L_abs(t0);                            /* Some case <0 !! */

+		t0 = vo_L_sub((Word32) 0x7fffffffL, t0);   /* 1 - K*K  in Q31 */

+		hi = t0 >> 16;

+		lo = (t0 & 0xffff)>>1;

+		t0 = Mpy_32(alp_h, alp_l, hi, lo); /* Alpha in Q31    */

+

+		/* Normalize Alpha */

+		j = norm_l(t0);

+		t0 = (t0 << j);

+		alp_h = t0 >> 16;

+		alp_l = (t0 & 0xffff)>>1;

+		alp_exp += j;         /* Add normalization to alp_exp */

+

+		/* A[j] = An[j] */

+		for (j = 1; j <= i; j++)

+		{

+			Ah[j] = Anh[j];               

+			Al[j] = Anl[j];                

+		}

+	}

+	/* Truncate A[i] in Q27 to Q12 with rounding */

+	A[0] = 4096;                          

+	for (i = 1; i <= M; i++)

+	{

+		t0 = (Ah[i] << 16) + (Al[i] << 1);

+		old_A[i - 1] = A[i] = vo_round((t0 << 1));      

+	}

+	old_rc[0] = rc[0];                    

+	old_rc[1] = rc[1];                    

+

+	return;

+}

+

+

+

diff --git a/media/libstagefright/codecs/amrwbenc/src/log2.c b/media/libstagefright/codecs/amrwbenc/src/log2.c
new file mode 100644
index 0000000..cd3d815
--- /dev/null
+++ b/media/libstagefright/codecs/amrwbenc/src/log2.c
@@ -0,0 +1,111 @@
+/*

+ ** Copyright 2003-2010, VisualOn, Inc.

+ **

+ ** Licensed under the Apache License, Version 2.0 (the "License");

+ ** you may not use this file except in compliance with the License.

+ ** You may obtain a copy of the License at

+ **

+ **     http://www.apache.org/licenses/LICENSE-2.0

+ **

+ ** Unless required by applicable law or agreed to in writing, software

+ ** distributed under the License is distributed on an "AS IS" BASIS,

+ ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

+ ** See the License for the specific language governing permissions and

+ ** limitations under the License.

+ */

+

+/***********************************************************************

+*                                                                      *

+*      File             : log2.c                                       *

+*      Purpose          : Computes log2(L_x)                           *

+*                                                                      *

+************************************************************************/

+

+#include "log2.h"

+/********************************************************************************

+*                         INCLUDE FILES

+*********************************************************************************/

+#include "typedef.h"

+#include "basic_op.h"

+

+/*********************************************************************************

+*                         LOCAL VARIABLES AND TABLES

+**********************************************************************************/

+#include "log2_tab.h"     /* Table for Log2() */

+

+/*************************************************************************

+*

+*   FUNCTION:   Log2_norm()

+*

+*   PURPOSE:   Computes log2(L_x, exp),  where   L_x is positive and

+*              normalized, and exp is the normalisation exponent

+*              If L_x is negative or zero, the result is 0.

+*

+*   DESCRIPTION:

+*        The function Log2(L_x) is approximated by a table and linear

+*        interpolation. The following steps are used to compute Log2(L_x)

+*

+*           1- exponent = 30-norm_exponent

+*           2- i = bit25-b31 of L_x;  32<=i<=63  (because of normalization).

+*           3- a = bit10-b24

+*           4- i -=32

+*           5- fraction = table[i]<<16 - (table[i] - table[i+1]) * a * 2

+*

+*************************************************************************/

+

+void Log2_norm (

+		Word32 L_x,         /* (i) : input value (normalized)                    */

+		Word16 exp,         /* (i) : norm_l (L_x)                                */

+		Word16 *exponent,   /* (o) : Integer part of Log2.   (range: 0<=val<=30) */

+		Word16 *fraction    /* (o) : Fractional part of Log2. (range: 0<=val<1)  */

+	       )

+{

+	Word16 i, a, tmp;

+	Word32 L_y;

+	if (L_x <= (Word32) 0)

+	{

+		*exponent = 0; 

+		*fraction = 0; 

+		return;

+	}

+	*exponent = (30 - exp); 

+	L_x = (L_x >> 9);

+	i = extract_h (L_x);                /* Extract b25-b31 */

+	L_x = (L_x >> 1);

+	a = (Word16)(L_x);                /* Extract b10-b24 of fraction */

+	a = (Word16)(a & (Word16)0x7fff);

+	i -= 32;

+	L_y = L_deposit_h (table[i]);       /* table[i] << 16        */

+	tmp = vo_sub(table[i], table[i + 1]); /* table[i] - table[i+1] */

+	L_y = vo_L_msu (L_y, tmp, a);          /* L_y -= tmp*a*2        */

+	*fraction = extract_h (L_y); 

+

+	return;

+}

+

+/*************************************************************************

+*

+*   FUNCTION:   Log2()

+*

+*   PURPOSE:   Computes log2(L_x),  where   L_x is positive.

+*              If L_x is negative or zero, the result is 0.

+*

+*   DESCRIPTION:

+*        normalizes L_x and then calls Log2_norm().

+*

+*************************************************************************/

+

+void Log2 (

+		Word32 L_x,         /* (i) : input value                                 */

+		Word16 *exponent,   /* (o) : Integer part of Log2.   (range: 0<=val<=30) */

+		Word16 *fraction    /* (o) : Fractional part of Log2. (range: 0<=val<1) */

+	  )

+{

+	Word16 exp;

+

+	exp = norm_l(L_x);

+	Log2_norm ((L_x << exp), exp, exponent, fraction);

+}

+

+

+

diff --git a/media/libstagefright/codecs/amrwbenc/src/lp_dec2.c b/media/libstagefright/codecs/amrwbenc/src/lp_dec2.c
new file mode 100644
index 0000000..63b746b
--- /dev/null
+++ b/media/libstagefright/codecs/amrwbenc/src/lp_dec2.c
@@ -0,0 +1,70 @@
+/*

+ ** Copyright 2003-2010, VisualOn, Inc.

+ **

+ ** Licensed under the Apache License, Version 2.0 (the "License");

+ ** you may not use this file except in compliance with the License.

+ ** You may obtain a copy of the License at

+ **

+ **     http://www.apache.org/licenses/LICENSE-2.0

+ **

+ ** Unless required by applicable law or agreed to in writing, software

+ ** distributed under the License is distributed on an "AS IS" BASIS,

+ ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

+ ** See the License for the specific language governing permissions and

+ ** limitations under the License.

+ */

+

+/***********************************************************************

+*       File: lp_dec2.c                                                *

+*                                                                      *

+*	Description:Decimate a vector by 2 with 2nd order fir filter   *

+*                                                                      *

+************************************************************************/

+

+#include "typedef.h"

+#include "basic_op.h"

+#include "cnst.h"

+

+#define L_FIR  5

+#define L_MEM  (L_FIR-2)

+

+/* static float h_fir[L_FIR] = {0.13, 0.23, 0.28, 0.23, 0.13}; */

+/* fixed-point: sum of coef = 32767 to avoid overflow on DC */

+static Word16 h_fir[L_FIR] = {4260, 7536, 9175, 7536, 4260};

+

+void LP_Decim2(

+		Word16 x[],                           /* in/out: signal to process         */

+		Word16 l,                             /* input : size of filtering         */

+		Word16 mem[]                          /* in/out: memory (size=3)           */

+	      )

+{

+	Word16 *p_x, x_buf[L_FRAME + L_MEM];

+	Word32 i, j;

+	Word32 L_tmp;

+	/* copy initial filter states into buffer */

+	p_x = x_buf;                           

+	for (i = 0; i < L_MEM; i++)

+	{

+		*p_x++ = mem[i];  

+		mem[i] = x[l - L_MEM + i];  

+	}

+	for (i = 0; i < l; i++)

+	{

+		*p_x++ = x[i];                     

+	}

+	for (i = 0, j = 0; i < l; i += 2, j++)

+	{

+		p_x = &x_buf[i];  

+		L_tmp  = ((*p_x++) * h_fir[0]);

+		L_tmp += ((*p_x++) * h_fir[1]);

+		L_tmp += ((*p_x++) * h_fir[2]);

+		L_tmp += ((*p_x++) * h_fir[3]);

+		L_tmp += ((*p_x++) * h_fir[4]);

+		x[j] = (L_tmp + 0x4000)>>15;              

+	}

+	return;

+}

+

+

+

+

diff --git a/media/libstagefright/codecs/amrwbenc/src/math_op.c b/media/libstagefright/codecs/amrwbenc/src/math_op.c
new file mode 100644
index 0000000..1c95ed0
--- /dev/null
+++ b/media/libstagefright/codecs/amrwbenc/src/math_op.c
@@ -0,0 +1,219 @@
+/*

+ ** Copyright 2003-2010, VisualOn, Inc.

+ **

+ ** Licensed under the Apache License, Version 2.0 (the "License");

+ ** you may not use this file except in compliance with the License.

+ ** You may obtain a copy of the License at

+ **

+ **     http://www.apache.org/licenses/LICENSE-2.0

+ **

+ ** Unless required by applicable law or agreed to in writing, software

+ ** distributed under the License is distributed on an "AS IS" BASIS,

+ ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

+ ** See the License for the specific language governing permissions and

+ ** limitations under the License.

+ */

+

+/*___________________________________________________________________________

+|                                                                           |

+|  This file contains mathematic operations in fixed point.                 |

+|                                                                           |

+|  Isqrt()              : inverse square root (16 bits precision).          |

+|  Pow2()               : 2^x  (16 bits precision).                         |

+|  Log2()               : log2 (16 bits precision).                         |

+|  Dot_product()        : scalar product of <x[],y[]>                       |

+|                                                                           |

+|  These operations are not standard double precision operations.           |

+|  They are used where low complexity is important and the full 32 bits     |

+|  precision is not necessary. For example, the function Div_32() has a     |

+|  24 bits precision which is enough for our purposes.                      |

+|                                                                           |

+|  In this file, the values use theses representations:                     |

+|                                                                           |

+|  Word32 L_32     : standard signed 32 bits format                         |

+|  Word16 hi, lo   : L_32 = hi<<16 + lo<<1  (DPF - Double Precision Format) |

+|  Word32 frac, Word16 exp : L_32 = frac << exp-31  (normalised format)     |

+|  Word16 int, frac        : L_32 = int.frac        (fractional format)     |

+|___________________________________________________________________________|

+*/

+#include "typedef.h"

+#include "basic_op.h"

+#include "math_op.h"

+

+/*___________________________________________________________________________

+|                                                                           |

+|   Function Name : Isqrt                                                   |

+|                                                                           |

+|       Compute 1/sqrt(L_x).                                                |

+|       if L_x is negative or zero, result is 1 (7fffffff).                 |

+|---------------------------------------------------------------------------|

+|  Algorithm:                                                               |

+|                                                                           |

+|   1- Normalization of L_x.                                                |

+|   2- call Isqrt_n(L_x, exponant)                                          |

+|   3- L_y = L_x << exponant                                                |

+|___________________________________________________________________________|

+*/

+Word32 Isqrt(                              /* (o) Q31 : output value (range: 0<=val<1)         */

+		Word32 L_x                            /* (i) Q0  : input value  (range: 0<=val<=7fffffff) */

+	    )

+{

+	Word16 exp;

+	Word32 L_y;

+	exp = norm_l(L_x);

+	L_x = (L_x << exp);                 /* L_x is normalized */

+	exp = (31 - exp);

+	Isqrt_n(&L_x, &exp);

+	L_y = (L_x << exp);                 /* denormalization   */

+	return (L_y);

+}

+

+/*___________________________________________________________________________

+|                                                                           |

+|   Function Name : Isqrt_n                                                 |

+|                                                                           |

+|       Compute 1/sqrt(value).                                              |

+|       if value is negative or zero, result is 1 (frac=7fffffff, exp=0).   |

+|---------------------------------------------------------------------------|

+|  Algorithm:                                                               |

+|                                                                           |

+|   The function 1/sqrt(value) is approximated by a table and linear        |

+|   interpolation.                                                          |

+|                                                                           |

+|   1- If exponant is odd then shift fraction right once.                   |

+|   2- exponant = -((exponant-1)>>1)                                        |

+|   3- i = bit25-b30 of fraction, 16 <= i <= 63 ->because of normalization. |

+|   4- a = bit10-b24                                                        |

+|   5- i -=16                                                               |

+|   6- fraction = table[i]<<16 - (table[i] - table[i+1]) * a * 2            |

+|___________________________________________________________________________|

+*/

+static Word16 table_isqrt[49] =

+{

+	32767, 31790, 30894, 30070, 29309, 28602, 27945, 27330, 26755, 26214,

+	25705, 25225, 24770, 24339, 23930, 23541, 23170, 22817, 22479, 22155,

+	21845, 21548, 21263, 20988, 20724, 20470, 20225, 19988, 19760, 19539,

+	19326, 19119, 18919, 18725, 18536, 18354, 18176, 18004, 17837, 17674,

+	17515, 17361, 17211, 17064, 16921, 16782, 16646, 16514, 16384

+};

+

+void Isqrt_n(

+		Word32 * frac,                        /* (i/o) Q31: normalized value (1.0 < frac <= 0.5) */

+		Word16 * exp                          /* (i/o)    : exponent (value = frac x 2^exponent) */

+	    )

+{

+	Word16 i, a, tmp;

+

+	if (*frac <= (Word32) 0)

+	{

+		*exp = 0;                          

+		*frac = 0x7fffffffL;               

+		return;

+	}

+

+	if((*exp & 1) == 1)                       /*If exponant odd -> shift right */

+		*frac = (*frac) >> 1;

+

+	*exp = negate((*exp - 1) >> 1);   

+

+	*frac = (*frac >> 9);               

+	i = extract_h(*frac);                  /* Extract b25-b31 */

+	*frac = (*frac >> 1);              

+	a = (Word16)(*frac);                  /* Extract b10-b24 */

+	a = (Word16) (a & (Word16) 0x7fff);    

+	i -= 16;

+	*frac = L_deposit_h(table_isqrt[i]);   /* table[i] << 16         */

+	tmp = vo_sub(table_isqrt[i], table_isqrt[i + 1]);      /* table[i] - table[i+1]) */

+	*frac = vo_L_msu(*frac, tmp, a);          /* frac -=  tmp*a*2       */

+

+	return;

+}

+

+/*___________________________________________________________________________

+|                                                                           |

+|   Function Name : Pow2()                                                  |

+|                                                                           |

+|     L_x = pow(2.0, exponant.fraction)         (exponant = interger part)  |

+|         = pow(2.0, 0.fraction) << exponant                                |

+|---------------------------------------------------------------------------|

+|  Algorithm:                                                               |

+|                                                                           |

+|   The function Pow2(L_x) is approximated by a table and linear            |

+|   interpolation.                                                          |

+|                                                                           |

+|   1- i = bit10-b15 of fraction,   0 <= i <= 31                            |

+|   2- a = bit0-b9   of fraction                                            |

+|   3- L_x = table[i]<<16 - (table[i] - table[i+1]) * a * 2                 |

+|   4- L_x = L_x >> (30-exponant)     (with rounding)                       |

+|___________________________________________________________________________|

+*/

+static Word16 table_pow2[33] =

+{

+	16384, 16743, 17109, 17484, 17867, 18258, 18658, 19066, 19484, 19911,

+	20347, 20792, 21247, 21713, 22188, 22674, 23170, 23678, 24196, 24726,

+	25268, 25821, 26386, 26964, 27554, 28158, 28774, 29405, 30048, 30706,

+	31379, 32066, 32767

+};

+

+Word32 Pow2(                               /* (o) Q0  : result       (range: 0<=val<=0x7fffffff) */

+		Word16 exponant,                      /* (i) Q0  : Integer part.      (range: 0<=val<=30)   */

+		Word16 fraction                       /* (i) Q15 : Fractionnal part.  (range: 0.0<=val<1.0) */

+	   )

+{

+	Word16 exp, i, a, tmp;

+	Word32 L_x;

+

+	L_x = vo_L_mult(fraction, 32);            /* L_x = fraction<<6           */

+	i = extract_h(L_x);                    /* Extract b10-b16 of fraction */

+	L_x =L_x >> 1;

+	a = (Word16)(L_x);                    /* Extract b0-b9   of fraction */

+	a = (Word16) (a & (Word16) 0x7fff); 

+

+	L_x = L_deposit_h(table_pow2[i]);      /* table[i] << 16        */

+	tmp = vo_sub(table_pow2[i], table_pow2[i + 1]);        /* table[i] - table[i+1] */

+	L_x -= (tmp * a)<<1;              /* L_x -= tmp*a*2        */

+

+	exp = vo_sub(30, exponant);

+	L_x = vo_L_shr_r(L_x, exp);

+

+	return (L_x);

+}

+

+/*___________________________________________________________________________

+|                                                                           |

+|   Function Name : Dot_product12()                                         |

+|                                                                           |

+|       Compute scalar product of <x[],y[]> using accumulator.              |

+|                                                                           |

+|       The result is normalized (in Q31) with exponent (0..30).            |

+|---------------------------------------------------------------------------|

+|  Algorithm:                                                               |

+|                                                                           |

+|       dot_product = sum(x[i]*y[i])     i=0..N-1                           |

+|___________________________________________________________________________|

+*/

+

+Word32 Dot_product12(                      /* (o) Q31: normalized result (1 < val <= -1) */

+		Word16 x[],                           /* (i) 12bits: x vector                       */

+		Word16 y[],                           /* (i) 12bits: y vector                       */

+		Word16 lg,                            /* (i)    : vector length                     */

+		Word16 * exp                          /* (o)    : exponent of result (0..+30)       */

+		)

+{

+	Word16 sft;

+	Word32 i, L_sum;

+	L_sum = 0;

+	for (i = 0; i < lg; i++)

+	{

+		L_sum += x[i] * y[i];

+	}

+	L_sum = (L_sum << 1) + 1;

+	/* Normalize acc in Q31 */

+	sft = norm_l(L_sum);

+	L_sum = L_sum << sft;

+	*exp = 30 - sft;            /* exponent = 0..30 */

+	return (L_sum);

+

+}

+

+

diff --git a/media/libstagefright/codecs/amrwbenc/src/mem_align.c b/media/libstagefright/codecs/amrwbenc/src/mem_align.c
new file mode 100644
index 0000000..e58915a
--- /dev/null
+++ b/media/libstagefright/codecs/amrwbenc/src/mem_align.c
@@ -0,0 +1,107 @@
+/*
+ ** Copyright 2003-2010, VisualOn, Inc.
+ **
+ ** Licensed under the Apache License, Version 2.0 (the "License");
+ ** you may not use this file except in compliance with the License.
+ ** You may obtain a copy of the License at
+ **
+ **     http://www.apache.org/licenses/LICENSE-2.0
+ **
+ ** Unless required by applicable law or agreed to in writing, software
+ ** distributed under the License is distributed on an "AS IS" BASIS,
+ ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ ** See the License for the specific language governing permissions and
+ ** limitations under the License.
+ */
+
+/*******************************************************************************
+	File:		mem_align.c
+
+	Content:	Memory alloc alignments functions
+
+*******************************************************************************/
+
+
+#include	"mem_align.h"
+
+/*****************************************************************************
+*
+* function name: mem_malloc
+* description:  malloc the alignments memory 
+* returns:      the point of the memory
+*
+**********************************************************************************/
+void *
+mem_malloc(VO_MEM_OPERATOR *pMemop, unsigned int size, unsigned char alignment, unsigned int CodecID)
+{
+	int ret;
+	unsigned char *mem_ptr;
+	VO_MEM_INFO MemInfo;
+
+	if (!alignment) {
+
+		MemInfo.Flag = 0;
+		MemInfo.Size = size + 1;
+		ret = pMemop->Alloc(CodecID, &MemInfo);
+		if(ret != 0)
+			return 0;
+		mem_ptr = (unsigned char *)MemInfo.VBuffer;
+
+		pMemop->Set(CodecID, mem_ptr, 0, size + 1);
+
+		*mem_ptr = (unsigned char)1;
+
+		return ((void *)(mem_ptr+1));
+	} else {
+		unsigned char *tmp;
+
+		MemInfo.Flag = 0;
+		MemInfo.Size = size + alignment;
+		ret = pMemop->Alloc(CodecID, &MemInfo);
+		if(ret != 0)
+			return 0;
+
+		tmp = (unsigned char *)MemInfo.VBuffer;
+
+		pMemop->Set(CodecID, tmp, 0, size + alignment);
+
+		mem_ptr =
+			(unsigned char *) ((unsigned int) (tmp + alignment - 1) &
+					(~((unsigned int) (alignment - 1))));
+
+		if (mem_ptr == tmp)
+			mem_ptr += alignment;
+
+		*(mem_ptr - 1) = (unsigned char) (mem_ptr - tmp);
+
+		return ((void *)mem_ptr);
+	}
+
+	return(0);
+}
+
+
+/*****************************************************************************
+*
+* function name: mem_free
+* description:  free the memory
+*
+*******************************************************************************/
+void
+mem_free(VO_MEM_OPERATOR *pMemop, void *mem_ptr, unsigned int CodecID)
+{
+
+	unsigned char *ptr;
+
+	if (mem_ptr == 0)
+		return;
+
+	ptr = mem_ptr;
+
+	ptr -= *(ptr - 1);
+
+	pMemop->Free(CodecID, ptr);
+}
+
+
+
diff --git a/media/libstagefright/codecs/amrwbenc/src/oper_32b.c b/media/libstagefright/codecs/amrwbenc/src/oper_32b.c
new file mode 100644
index 0000000..5f1523e
--- /dev/null
+++ b/media/libstagefright/codecs/amrwbenc/src/oper_32b.c
@@ -0,0 +1,223 @@
+/*

+ ** Copyright 2003-2010, VisualOn, Inc.

+ **

+ ** Licensed under the Apache License, Version 2.0 (the "License");

+ ** you may not use this file except in compliance with the License.

+ ** You may obtain a copy of the License at

+ **

+ **     http://www.apache.org/licenses/LICENSE-2.0

+ **

+ ** Unless required by applicable law or agreed to in writing, software

+ ** distributed under the License is distributed on an "AS IS" BASIS,

+ ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

+ ** See the License for the specific language governing permissions and

+ ** limitations under the License.

+ */

+

+/*****************************************************************************

+ *  This file contains operations in double precision.                       *

+ *  These operations are not standard double precision operations.           *

+ *  They are used where single precision is not enough but the full 32 bits  *

+ *  precision is not necessary. For example, the function Div_32() has a     *

+ *  24 bits precision which is enough for our purposes.                      *

+ *                                                                           *

+ *  The double precision numbers use a special representation:               *

+ *                                                                           *

+ *     L_32 = hi<<16 + lo<<1                                                 *

+ *                                                                           *

+ *  L_32 is a 32 bit integer.                                                *

+ *  hi and lo are 16 bit signed integers.                                    *

+ *  As the low part also contains the sign, this allows fast multiplication. *

+ *                                                                           *

+ *      0x8000 0000 <= L_32 <= 0x7fff fffe.                                  *

+ *                                                                           *

+ *  We will use DPF (Double Precision Format )in this file to specify        *

+ *  this special format.                                                     *

+ *****************************************************************************

+*/

+#include "typedef.h"

+#include "basic_op.h"

+#include "oper_32b.h"

+

+/*****************************************************************************

+ *                                                                           *

+ *  Function L_Extract()                                                     *

+ *                                                                           *

+ *  Extract from a 32 bit integer two 16 bit DPF.                            *

+ *                                                                           *

+ *  Arguments:                                                               *

+ *                                                                           *

+ *   L_32      : 32 bit integer.                                             *

+ *               0x8000 0000 <= L_32 <= 0x7fff ffff.                         *

+ *   hi        : b16 to b31 of L_32                                          *

+ *   lo        : (L_32 - hi<<16)>>1                                          *

+ *****************************************************************************

+*/

+

+__inline void VO_L_Extract (Word32 L_32, Word16 *hi, Word16 *lo)

+{

+	*hi = (Word16)(L_32 >> 16);

+	*lo = (Word16)((L_32 & 0xffff) >> 1);

+	return;

+}

+

+/*****************************************************************************

+ *                                                                           *

+ *  Function L_Comp()                                                        *

+ *                                                                           *

+ *  Compose from two 16 bit DPF a 32 bit integer.                            *

+ *                                                                           *

+ *     L_32 = hi<<16 + lo<<1                                                 *

+ *                                                                           *

+ *  Arguments:                                                               *

+ *                                                                           *

+ *   hi        msb                                                           *

+ *   lo        lsf (with sign)                                               *

+ *                                                                           *

+ *   Return Value :                                                          *

+ *                                                                           *

+ *             32 bit long signed integer (Word32) whose value falls in the  *

+ *             range : 0x8000 0000 <= L_32 <= 0x7fff fff0.                   *

+ *                                                                           *

+ *****************************************************************************

+*/

+

+Word32 L_Comp (Word16 hi, Word16 lo)

+{

+	Word32 L_32;

+

+	L_32 = L_deposit_h (hi);

+

+	return (L_mac (L_32, lo, 1));       /* = hi<<16 + lo<<1 */

+}

+

+/*****************************************************************************

+ * Function Mpy_32()                                                         *

+ *                                                                           *

+ *   Multiply two 32 bit integers (DPF). The result is divided by 2**31      *

+ *                                                                           *

+ *   L_32 = (hi1*hi2)<<1 + ( (hi1*lo2)>>15 + (lo1*hi2)>>15 )<<1              *

+ *                                                                           *

+ *   This operation can also be viewed as the multiplication of two Q31      *

+ *   number and the result is also in Q31.                                   *

+ *                                                                           *

+ * Arguments:                                                                *

+ *                                                                           *

+ *  hi1         hi part of first number                                      *

+ *  lo1         lo part of first number                                      *

+ *  hi2         hi part of second number                                     *

+ *  lo2         lo part of second number                                     *

+ *                                                                           *

+ *****************************************************************************

+*/

+

+__inline Word32  Mpy_32 (Word16 hi1, Word16 lo1, Word16 hi2, Word16 lo2)

+{

+	Word32 L_32;

+	L_32 = (hi1 * hi2);

+	L_32 += (hi1 * lo2) >> 15;

+	L_32 += (lo1 * hi2) >> 15;

+	L_32 <<= 1;

+

+	return (L_32);

+}

+

+/*****************************************************************************

+ * Function Mpy_32_16()                                                      *

+ *                                                                           *

+ *   Multiply a 16 bit integer by a 32 bit (DPF). The result is divided      *

+ *   by 2**15                                                                *

+ *                                                                           *

+ *                                                                           *

+ *   L_32 = (hi1*lo2)<<1 + ((lo1*lo2)>>15)<<1                                *

+ *                                                                           *

+ * Arguments:                                                                *

+ *                                                                           *

+ *  hi          hi part of 32 bit number.                                    *

+ *  lo          lo part of 32 bit number.                                    *

+ *  n           16 bit number.                                               *

+ *                                                                           *

+ *****************************************************************************

+*/

+

+__inline Word32 Mpy_32_16 (Word16 hi, Word16 lo, Word16 n)

+{

+	Word32 L_32;

+

+	L_32 = (hi * n)<<1;

+	L_32 += (((lo * n)>>15)<<1);

+

+	return (L_32);

+}

+

+/*****************************************************************************

+ *                                                                           *

+ *   Function Name : Div_32                                                  *

+ *                                                                           *

+ *   Purpose :                                                               *

+ *             Fractional integer division of two 32 bit numbers.            *

+ *             L_num / L_denom.                                              *

+ *             L_num and L_denom must be positive and L_num < L_denom.       *

+ *             L_denom = denom_hi<<16 + denom_lo<<1                          *

+ *             denom_hi is a normalize number.                               *

+ *                                                                           *

+ *   Inputs :                                                                *

+ *                                                                           *

+ *    L_num                                                                  *

+ *             32 bit long signed integer (Word32) whose value falls in the  *

+ *             range : 0x0000 0000 < L_num < L_denom                         *

+ *                                                                           *

+ *    L_denom = denom_hi<<16 + denom_lo<<1      (DPF)                        *

+ *                                                                           *

+ *       denom_hi                                                            *

+ *             16 bit positive normalized integer whose value falls in the   *

+ *             range : 0x4000 < hi < 0x7fff                                  *

+ *       denom_lo                                                            *

+ *             16 bit positive integer whose value falls in the              *

+ *             range : 0 < lo < 0x7fff                                       *

+ *                                                                           *

+ *   Return Value :                                                          *

+ *                                                                           *

+ *    L_div                                                                  *

+ *             32 bit long signed integer (Word32) whose value falls in the  *

+ *             range : 0x0000 0000 <= L_div <= 0x7fff ffff.                  *

+ *                                                                           *

+ *  Algorithm:                                                               *

+ *                                                                           *

+ *  - find = 1/L_denom.                                                      *

+ *      First approximation: approx = 1 / denom_hi                           *

+ *      1/L_denom = approx * (2.0 - L_denom * approx )                       *

+ *                                                                           *

+ *  -  result = L_num * (1/L_denom)                                          *

+ *****************************************************************************

+*/

+

+Word32 Div_32 (Word32 L_num, Word16 denom_hi, Word16 denom_lo)

+{

+	Word16 approx, hi, lo, n_hi, n_lo;

+	Word32 L_32;

+

+	/* First approximation: 1 / L_denom = 1/denom_hi */

+

+	approx = div_s ((Word16) 0x3fff, denom_hi);

+

+	/* 1/L_denom = approx * (2.0 - L_denom * approx) */

+

+	L_32 = Mpy_32_16 (denom_hi, denom_lo, approx);

+

+	L_32 = L_sub ((Word32) 0x7fffffffL, L_32);

+	hi = L_32 >> 16;

+	lo = (L_32 & 0xffff) >> 1;

+

+	L_32 = Mpy_32_16 (hi, lo, approx);

+

+	/* L_num * (1/L_denom) */

+	hi = L_32 >> 16;

+	lo = (L_32 & 0xffff) >> 1;

+	VO_L_Extract (L_num, &n_hi, &n_lo);

+	L_32 = Mpy_32 (n_hi, n_lo, hi, lo);

+	L_32 = L_shl2(L_32, 2);

+

+	return (L_32);

+}

+

diff --git a/media/libstagefright/codecs/amrwbenc/src/p_med_ol.c b/media/libstagefright/codecs/amrwbenc/src/p_med_ol.c
new file mode 100644
index 0000000..39ee966
--- /dev/null
+++ b/media/libstagefright/codecs/amrwbenc/src/p_med_ol.c
@@ -0,0 +1,256 @@
+/*

+ ** Copyright 2003-2010, VisualOn, Inc.

+ **

+ ** Licensed under the Apache License, Version 2.0 (the "License");

+ ** you may not use this file except in compliance with the License.

+ ** You may obtain a copy of the License at

+ **

+ **     http://www.apache.org/licenses/LICENSE-2.0

+ **

+ ** Unless required by applicable law or agreed to in writing, software

+ ** distributed under the License is distributed on an "AS IS" BASIS,

+ ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

+ ** See the License for the specific language governing permissions and

+ ** limitations under the License.

+ */

+

+/***********************************************************************

+*      File: p_med_ol.c                                                *

+*                                                                      *

+*      Description: Compute the open loop pitch lag                    *

+*	            output: open loop pitch lag                        *                            

+************************************************************************/

+

+#include "typedef.h"

+#include "basic_op.h"

+#include "acelp.h"

+#include "oper_32b.h"

+#include "math_op.h"

+#include "p_med_ol.tab"

+

+Word16 Pitch_med_ol(

+		   Word16      wsp[],        /*   i: signal used to compute the open loop pitch*/  

+                                     /*      wsp[-pit_max] to wsp[-1] should be known */

+		   Coder_State *st,          /* i/o: codec global structure */

+		   Word16      L_frame       /*   i: length of frame to compute pitch */

+		)

+{

+	Word16 Tm;

+	Word16 hi, lo;

+	Word16 *ww, *we, *hp_wsp;

+	Word16 exp_R0, exp_R1, exp_R2;

+	Word32 i, j, max, R0, R1, R2;

+	Word16 *p1, *p2;

+	Word16 L_min = 17;                   /* minimum pitch lag: PIT_MIN / OPL_DECIM */

+	Word16 L_max = 115;                  /* maximum pitch lag: PIT_MAX / OPL_DECIM */

+	Word16 L_0 = st->old_T0_med;         /* old open-loop pitch */

+	Word16 *gain = &(st->ol_gain);       /* normalize correlation of hp_wsp for the lag */

+	Word16 *hp_wsp_mem = st->hp_wsp_mem; /* memory of the hypass filter for hp_wsp[] (lg = 9)*/

+	Word16 *old_hp_wsp = st->old_hp_wsp; /* hypass wsp[] */

+	Word16 wght_flg = st->ol_wght_flg;   /* is weighting function used */

+

+	ww = &corrweight[198];

+	we = &corrweight[98 + L_max - L_0];

+

+	max = MIN_32;                          

+	Tm = 0;                                

+	for (i = L_max; i > L_min; i--)

+	{

+		/* Compute the correlation */

+		R0 = 0;

+		p1 = wsp;

+		p2 = &wsp[-i];

+		for (j = 0; j < L_frame; j+=4)

+		{

+			R0 += vo_L_mult((*p1++), (*p2++));

+			R0 += vo_L_mult((*p1++), (*p2++));

+			R0 += vo_L_mult((*p1++), (*p2++));

+			R0 += vo_L_mult((*p1++), (*p2++));     

+		}

+		/* Weighting of the correlation function.   */

+		hi = R0>>16;

+		lo = (R0 & 0xffff)>>1;

+

+		R0 = Mpy_32_16(hi, lo, *ww);

+		ww--;

+

+		if ((L_0 > 0) && (wght_flg > 0))

+		{

+			/* Weight the neighbourhood of the old lag. */

+			hi = R0>>16;

+			lo = (R0 & 0xffff)>>1;

+			R0 = Mpy_32_16(hi, lo, *we);

+			we--;

+		}

+		if(R0 >= max)

+		{

+			max = R0;

+			Tm = i;

+		}

+	}

+

+	/* Hypass the wsp[] vector */

+	hp_wsp = old_hp_wsp + L_max;           

+	Hp_wsp(wsp, hp_wsp, L_frame, hp_wsp_mem);

+

+	/* Compute normalize correlation at delay Tm */

+	R0 = 0;                                

+	R1 = 0;                               

+	R2 = 0; 

+	p1 = hp_wsp;

+	p2 = hp_wsp - Tm;

+	for (j = 0; j < L_frame; j+=4)

+	{

+		R2 += vo_mult32(*p1, *p1);

+		R1 += vo_mult32(*p2, *p2);

+		R0 += vo_mult32(*p1++, *p2++);

+		R2 += vo_mult32(*p1, *p1);

+		R1 += vo_mult32(*p2, *p2);

+		R0 += vo_mult32(*p1++, *p2++);

+		R2 += vo_mult32(*p1, *p1);

+		R1 += vo_mult32(*p2, *p2);

+		R0 += vo_mult32(*p1++, *p2++);

+		R2 += vo_mult32(*p1, *p1);

+		R1 += vo_mult32(*p2, *p2);

+		R0 += vo_mult32(*p1++, *p2++);

+	}

+	R0 = R0 <<1;

+	R1 = (R1 <<1) + 1L;

+	R2 = (R2 <<1) + 1L;

+	/* gain = R0/ sqrt(R1*R2) */

+

+	exp_R0 = norm_l(R0);

+	R0 = (R0 << exp_R0);

+

+	exp_R1 = norm_l(R1);

+	R1 = (R1 << exp_R1);

+

+	exp_R2 = norm_l(R2);

+	R2 = (R2 << exp_R2);

+

+

+	R1 = vo_L_mult(vo_round(R1), vo_round(R2));

+

+	i = norm_l(R1);

+	R1 = (R1 << i);

+

+	exp_R1 += exp_R2;

+	exp_R1 += i;

+	exp_R1 = 62 - exp_R1;

+

+	Isqrt_n(&R1, &exp_R1);

+

+	R0 = vo_L_mult(voround(R0), voround(R1));

+	exp_R0 = 31 - exp_R0;

+	exp_R0 += exp_R1;

+

+	*gain = vo_round(L_shl(R0, exp_R0));

+

+	/* Shitf hp_wsp[] for next frame */

+

+	for (i = 0; i < L_max; i++)

+	{

+		old_hp_wsp[i] = old_hp_wsp[i + L_frame];

+	}

+

+	return (Tm);

+}

+

+/************************************************************************

+*  Function: median5                                                    *

+*                                                                       *

+*      Returns the median of the set {X[-2], X[-1],..., X[2]},          *

+*      whose elements are 16-bit integers.                              *

+*                                                                       *

+*  Input:                                                               *

+*      X[-2:2]   16-bit integers.                                       *

+*                                                                       *

+*  Return:                                                              *

+*      The median of {X[-2], X[-1],..., X[2]}.                          *

+************************************************************************/

+

+Word16 median5(Word16 x[])

+{

+	Word16 x1, x2, x3, x4, x5;

+	Word16 tmp;

+

+	x1 = x[-2];                            

+	x2 = x[-1];                            

+	x3 = x[0];                             

+	x4 = x[1];                             

+	x5 = x[2];                             

+

+	if (x2 < x1)

+	{

+		tmp = x1;

+		x1 = x2;

+		x2 = tmp;                          

+	}

+	if (x3 < x1)

+	{

+		tmp = x1;

+		x1 = x3;

+		x3 = tmp;                          

+	}

+	if (x4 < x1)

+	{

+		tmp = x1;

+		x1 = x4;

+		x4 = tmp;                          

+	}

+	if (x5 < x1)

+	{

+		x5 = x1;                           

+	}

+	if (x3 < x2)

+	{

+		tmp = x2;

+		x2 = x3;

+		x3 = tmp;                          

+	}

+	if (x4 < x2)

+	{

+		tmp = x2;

+		x2 = x4;

+		x4 = tmp;                          

+	}

+	if (x5 < x2)

+	{

+		x5 = x2;                           

+	}

+	if (x4 < x3)

+	{

+		x3 = x4;                           

+	}

+	if (x5 < x3)

+	{

+		x3 = x5;                           

+	}

+	return (x3);

+}

+

+

+Word16 Med_olag(                           /* output : median of  5 previous open-loop lags       */

+		Word16 prev_ol_lag,                /* input  : previous open-loop lag                     */

+		Word16 old_ol_lag[5]

+	       )

+{

+	Word32 i;

+

+	/* Use median of 5 previous open-loop lags as old lag */

+

+	for (i = 4; i > 0; i--)

+	{

+		old_ol_lag[i] = old_ol_lag[i - 1]; 

+	}

+

+	old_ol_lag[0] = prev_ol_lag;           

+

+	i = median5(&old_ol_lag[2]);

+

+	return i;

+

+}

+

+

+

diff --git a/media/libstagefright/codecs/amrwbenc/src/pit_shrp.c b/media/libstagefright/codecs/amrwbenc/src/pit_shrp.c
new file mode 100644
index 0000000..c8a227c
--- /dev/null
+++ b/media/libstagefright/codecs/amrwbenc/src/pit_shrp.c
@@ -0,0 +1,49 @@
+/*

+ ** Copyright 2003-2010, VisualOn, Inc.

+ **

+ ** Licensed under the Apache License, Version 2.0 (the "License");

+ ** you may not use this file except in compliance with the License.

+ ** You may obtain a copy of the License at

+ **

+ **     http://www.apache.org/licenses/LICENSE-2.0

+ **

+ ** Unless required by applicable law or agreed to in writing, software

+ ** distributed under the License is distributed on an "AS IS" BASIS,

+ ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

+ ** See the License for the specific language governing permissions and

+ ** limitations under the License.

+ */

+

+/***********************************************************************

+*      File: pit_shrp.c                                                *

+*                                                                      *

+*      Description: Performs Pitch sharpening routine                  *

+*                                                                      *

+************************************************************************/

+

+#include "typedef.h"

+#include "basic_op.h"

+

+void Pit_shrp(

+		Word16 * x,                           /* in/out: impulse response (or algebraic code) */

+		Word16 pit_lag,                       /* input : pitch lag                            */

+		Word16 sharp,                         /* input : pitch sharpening factor (Q15)        */

+		Word16 L_subfr                        /* input : subframe size                        */

+	     )

+{

+	Word32 i;

+	Word32 L_tmp;

+	Word16 *x_ptr = x + pit_lag;

+

+	for (i = pit_lag; i < L_subfr; i++)

+	{

+		L_tmp = (*x_ptr << 15);

+		L_tmp += *x++ * sharp;

+		*x_ptr++ = ((L_tmp + 0x4000)>>15);

+	}

+

+	return;

+}

+

+

+

diff --git a/media/libstagefright/codecs/amrwbenc/src/pitch_f4.c b/media/libstagefright/codecs/amrwbenc/src/pitch_f4.c
new file mode 100644
index 0000000..c115b11b
--- /dev/null
+++ b/media/libstagefright/codecs/amrwbenc/src/pitch_f4.c
@@ -0,0 +1,324 @@
+/*

+ ** Copyright 2003-2010, VisualOn, Inc.

+ **

+ ** Licensed under the Apache License, Version 2.0 (the "License");

+ ** you may not use this file except in compliance with the License.

+ ** You may obtain a copy of the License at

+ **

+ **     http://www.apache.org/licenses/LICENSE-2.0

+ **

+ ** Unless required by applicable law or agreed to in writing, software

+ ** distributed under the License is distributed on an "AS IS" BASIS,

+ ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

+ ** See the License for the specific language governing permissions and

+ ** limitations under the License.

+ */

+

+/***********************************************************************

+*      File: pitch_f4.c                                                *

+*                                                                      *

+*      Description: Find the closed loop pitch period with             *

+*	            1/4 subsample resolution.                          *

+*                                                                      *

+************************************************************************/

+

+#include "typedef.h"

+#include "basic_op.h"

+#include "math_op.h"

+#include "acelp.h"

+#include "cnst.h"

+

+#define UP_SAMP      4

+#define L_INTERPOL1  4

+

+/* Local functions */

+

+#ifdef ASM_OPT

+void Norm_corr_asm(

+		Word16 exc[],                         /* (i)     : excitation buffer                     */

+		Word16 xn[],                          /* (i)     : target vector                         */

+		Word16 h[],                           /* (i) Q15 : impulse response of synth/wgt filters */

+		Word16 L_subfr,

+		Word16 t_min,                         /* (i)     : minimum value of pitch lag.           */

+		Word16 t_max,                         /* (i)     : maximum value of pitch lag.           */

+		Word16 corr_norm[]                    /* (o) Q15 : normalized correlation                */

+		);

+#else

+static void Norm_Corr(

+		Word16 exc[],                         /* (i)     : excitation buffer                     */

+		Word16 xn[],                          /* (i)     : target vector                         */

+		Word16 h[],                           /* (i) Q15 : impulse response of synth/wgt filters */

+		Word16 L_subfr,

+		Word16 t_min,                         /* (i)     : minimum value of pitch lag.           */

+		Word16 t_max,                         /* (i)     : maximum value of pitch lag.           */

+		Word16 corr_norm[]                    /* (o) Q15 : normalized correlation                */

+		);

+#endif

+

+static Word16 Interpol_4(                  /* (o)  : interpolated value  */

+		Word16 * x,                           /* (i)  : input vector        */

+		Word32 frac                           /* (i)  : fraction (-4..+3)   */

+		);

+

+

+Word16 Pitch_fr4(                          /* (o)     : pitch period.                         */

+		Word16 exc[],                         /* (i)     : excitation buffer                     */

+		Word16 xn[],                          /* (i)     : target vector                         */

+		Word16 h[],                           /* (i) Q15 : impulse response of synth/wgt filters */

+		Word16 t0_min,                        /* (i)     : minimum value in the searched range.  */

+		Word16 t0_max,                        /* (i)     : maximum value in the searched range.  */

+		Word16 * pit_frac,                    /* (o)     : chosen fraction (0, 1, 2 or 3).       */

+		Word16 i_subfr,                       /* (i)     : indicator for first subframe.         */

+		Word16 t0_fr2,                        /* (i)     : minimum value for resolution 1/2      */

+		Word16 t0_fr1,                        /* (i)     : minimum value for resolution 1        */

+		Word16 L_subfr                        /* (i)     : Length of subframe                    */

+		)

+{

+	Word32 fraction, i;

+	Word16 t_min, t_max;

+	Word16 max, t0, step, temp;

+	Word16 *corr;

+	Word16 corr_v[40];                     /* Total length = t0_max-t0_min+1+2*L_inter */

+

+	/* Find interval to compute normalized correlation */

+

+	t_min = t0_min - L_INTERPOL1;

+	t_max = t0_max + L_INTERPOL1;

+	corr = &corr_v[-t_min];

+	/* Compute normalized correlation between target and filtered excitation */

+#ifdef ASM_OPT               /* asm optimization branch */

+    Norm_corr_asm(exc, xn, h, L_subfr, t_min, t_max, corr);

+#else

+	Norm_Corr(exc, xn, h, L_subfr, t_min, t_max, corr);

+#endif 

+

+	/* Find integer pitch */

+

+	max = corr[t0_min];

+	t0 = t0_min;

+	for (i = t0_min + 1; i <= t0_max; i++)

+	{

+		if (corr[i] >= max)

+		{

+			max = corr[i];                 

+			t0 = i;                        

+		}

+	}

+	/* If first subframe and t0 >= t0_fr1, do not search fractionnal pitch */

+	if ((i_subfr == 0) && (t0 >= t0_fr1))

+	{

+		*pit_frac = 0;

+		return (t0);

+	}

+	/*------------------------------------------------------------------*

+	 * Search fractionnal pitch with 1/4 subsample resolution.          *

+	 * Test the fractions around t0 and choose the one which maximizes  *

+	 * the interpolated normalized correlation.                         *

+	 *------------------------------------------------------------------*/

+

+	step = 1;               /* 1/4 subsample resolution */

+	fraction = -3;

+	if ((t0_fr2 == PIT_MIN)||((i_subfr == 0) && (t0 >= t0_fr2)))

+	{

+		step = 2;              /* 1/2 subsample resolution */

+		fraction = -2;

+	}

+	if(t0 == t0_min)

+	{

+		fraction = 0;

+	}

+	max = Interpol_4(&corr[t0], fraction);

+

+	for (i = fraction + step; i <= 3; i += step)

+	{

+		temp = Interpol_4(&corr[t0], i);

+		if(temp > max)

+		{

+			max = temp;

+			fraction = i;

+		}

+	}

+	/* limit the fraction value in the interval [0,1,2,3] */

+	if (fraction < 0)

+	{

+		fraction += UP_SAMP;

+		t0 -= 1;

+	}

+	*pit_frac = fraction;

+	return (t0);

+}

+

+

+/***********************************************************************************

+* Function:  Norm_Corr()                                                            *

+*                                                                                   *

+* Description: Find the normalized correlation between the target vector and the    *

+* filtered past excitation.                                                         *

+* (correlation between target and filtered excitation divided by the                *

+*  square root of energy of target and filtered excitation).                        *

+************************************************************************************/

+#ifndef ASM_OPT

+static void Norm_Corr(

+		Word16 exc[],                         /* (i)     : excitation buffer                     */

+		Word16 xn[],                          /* (i)     : target vector                         */

+		Word16 h[],                           /* (i) Q15 : impulse response of synth/wgt filters */

+		Word16 L_subfr,

+		Word16 t_min,                         /* (i)     : minimum value of pitch lag.           */

+		Word16 t_max,                         /* (i)     : maximum value of pitch lag.           */

+		Word16 corr_norm[])                   /* (o) Q15 : normalized correlation                */

+{

+	Word32 i, k, t;

+	Word32 corr, exp_corr, norm, exp, scale;

+	Word16 exp_norm, excf[L_SUBFR], tmp;

+	Word32 L_tmp, L_tmp1, L_tmp2;

+

+	/* compute the filtered excitation for the first delay t_min */

+	k = -t_min;

+

+#ifdef ASM_OPT              /* asm optimization branch */

+	Convolve_asm(&exc[k], h, excf, 64);

+#else

+	Convolve(&exc[k], h, excf, 64);

+#endif

+

+	/* Compute rounded down 1/sqrt(energy of xn[]) */

+	L_tmp = 0; 

+	for (i = 0; i < 64; i+=4)

+	{

+		L_tmp += (xn[i] * xn[i]);

+		L_tmp += (xn[i+1] * xn[i+1]);

+		L_tmp += (xn[i+2] * xn[i+2]);

+		L_tmp += (xn[i+3] * xn[i+3]);

+	}

+

+	L_tmp = (L_tmp << 1) + 1;

+	exp = norm_l(L_tmp);

+	exp = (32 - exp);

+	//exp = exp + 2;                     /* energy of xn[] x 2 + rounded up     */

+	scale = -(exp >> 1);           /* (1<<scale) < 1/sqrt(energy rounded) */

+

+	/* loop for every possible period */

+

+	for (t = t_min; t <= t_max; t++)

+	{

+		/* Compute correlation between xn[] and excf[] */

+		L_tmp  = 0;  

+		L_tmp1 = 0;

+		for (i = 0; i < 64; i+=4)

+		{

+			L_tmp  += (xn[i] * excf[i]);

+			L_tmp1 += (excf[i] * excf[i]);

+			L_tmp  += (xn[i+1] * excf[i+1]);

+			L_tmp1 += (excf[i+1] * excf[i+1]);

+			L_tmp  += (xn[i+2] * excf[i+2]);

+			L_tmp1 += (excf[i+2] * excf[i+2]);

+			L_tmp  += (xn[i+3] * excf[i+3]);

+			L_tmp1 += (excf[i+3] * excf[i+3]);

+		}

+

+		L_tmp = (L_tmp << 1) + 1;

+		L_tmp1 = (L_tmp1 << 1) + 1;

+

+		exp = norm_l(L_tmp);

+		L_tmp = (L_tmp << exp);

+		exp_corr = (30 - exp);

+		corr = extract_h(L_tmp);

+

+		exp = norm_l(L_tmp1);

+		L_tmp = (L_tmp1 << exp);

+		exp_norm = (30 - exp);

+

+		Isqrt_n(&L_tmp, &exp_norm);

+		norm = extract_h(L_tmp);

+

+		/* Normalize correlation = correlation * (1/sqrt(energy)) */

+

+		L_tmp = vo_L_mult(corr, norm);

+

+		L_tmp2 = exp_corr + exp_norm + scale;

+		if(L_tmp2 < 0)

+		{

+			L_tmp2 = -L_tmp2;

+			L_tmp = L_tmp >> L_tmp2;

+		}

+		else

+		{

+			L_tmp = L_tmp << L_tmp2;

+		}

+

+		corr_norm[t] = vo_round(L_tmp);      

+		/* modify the filtered excitation excf[] for the next iteration */

+

+		if(t != t_max)

+		{

+			k = -(t + 1);

+			tmp = exc[k];

+			for (i = 63; i > 0; i--)

+			{

+				excf[i] = add1(vo_mult(tmp, h[i]), excf[i - 1]);

+			}

+			excf[0] = vo_mult(tmp, h[0]);

+		}

+	}

+	return;

+}

+

+#endif

+/************************************************************************************

+* Function: Interpol_4()                                                             *

+*                                                                                    *

+* Description: For interpolating the normalized correlation with 1/4 resolution.     *

+**************************************************************************************/

+

+/* 1/4 resolution interpolation filter (-3 dB at 0.791*fs/2) in Q14 */

+static Word16 inter4_1[4][8] =

+{

+	{-12, 420, -1732, 5429, 13418, -1242, 73, 32},

+	{-26, 455, -2142, 9910, 9910,  -2142, 455, -26},

+	{32,  73, -1242, 13418, 5429, -1732, 420, -12},

+	{206, -766, 1376, 14746, 1376, -766, 206, 0}

+};

+

+/*** Coefficients in floating point

+static float inter4_1[UP_SAMP*L_INTERPOL1+1] = {

+0.900000,

+0.818959,  0.604850,  0.331379,  0.083958,

+-0.075795, -0.130717, -0.105685, -0.046774,

+0.004467,  0.027789,  0.025642,  0.012571,

+0.001927, -0.001571, -0.000753,  0.000000};

+***/

+

+static Word16 Interpol_4(                  /* (o)  : interpolated value  */

+		Word16 * x,                           /* (i)  : input vector        */

+		Word32 frac                           /* (i)  : fraction (-4..+3)   */

+		)

+{

+	Word16 sum;

+	Word32  k, L_sum;

+	Word16 *ptr;

+

+	if (frac < 0)

+	{

+		frac += UP_SAMP;

+		x--;

+	}

+	x = x - L_INTERPOL1 + 1;

+	k = UP_SAMP - 1 - frac;

+	ptr = &(inter4_1[k][0]);

+

+	L_sum  = vo_mult32(x[0], (*ptr++));

+	L_sum += vo_mult32(x[1], (*ptr++));

+	L_sum += vo_mult32(x[2], (*ptr++));

+	L_sum += vo_mult32(x[3], (*ptr++));

+	L_sum += vo_mult32(x[4], (*ptr++));  

+	L_sum += vo_mult32(x[5], (*ptr++));

+	L_sum += vo_mult32(x[6], (*ptr++));

+	L_sum += vo_mult32(x[7], (*ptr++));   

+

+	sum = extract_h(L_add(L_shl2(L_sum, 2), 0x8000));

+	return (sum);

+}

+

+

+

+

diff --git a/media/libstagefright/codecs/amrwbenc/src/pred_lt4.c b/media/libstagefright/codecs/amrwbenc/src/pred_lt4.c
new file mode 100644
index 0000000..ac1ff22
--- /dev/null
+++ b/media/libstagefright/codecs/amrwbenc/src/pred_lt4.c
@@ -0,0 +1,120 @@
+/*

+ ** Copyright 2003-2010, VisualOn, Inc.

+ **

+ ** Licensed under the Apache License, Version 2.0 (the "License");

+ ** you may not use this file except in compliance with the License.

+ ** You may obtain a copy of the License at

+ **

+ **     http://www.apache.org/licenses/LICENSE-2.0

+ **

+ ** Unless required by applicable law or agreed to in writing, software

+ ** distributed under the License is distributed on an "AS IS" BASIS,

+ ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

+ ** See the License for the specific language governing permissions and

+ ** limitations under the License.

+ */

+

+/***********************************************************************

+*      File: pred_lt4.c                                                *

+*                                                                      *

+*      Description: Compute the result of long term prediction with    *

+*      fractional interpolation of resolution 1/4                      *

+*      on return exc[0..L_subr-1] contains the interpolated signal     *

+*      (adaptive codebook excitation)                                  *

+*                                                                      *

+************************************************************************/

+

+#include "typedef.h"

+#include "basic_op.h"

+

+#define UP_SAMP      4

+#define L_INTERPOL2  16

+

+/* 1/4 resolution interpolation filter (-3 dB at 0.856*fs/2) in Q14 */

+

+Word16 inter4_2[4][32] =

+{

+	{0,-2,4,-2,-10,38,-88,165,-275,424,-619,871,-1207,1699,-2598,5531,14031,-2147,780,-249,

+	-16,153,-213,226,-209,175,-133,91,-55,28,-10,2},

+

+	{1,-7,19,-33,47,-52,43,-9,-60,175,-355,626,-1044,1749,-3267,10359,10359,-3267,1749,-1044,

+	626,-355,175,-60,-9,43,-52,47,-33,19, -7, 1},

+

+	{2,-10,28,-55,91,-133,175,-209,226,-213,153,-16,-249,780,-2147,14031,5531,-2598,1699,-1207,

+	871,-619,424,-275,165,-88,38,-10,-2,4,-2,0},

+

+	{1,-7,22,-49,92,-153,231,-325,431,-544,656,-762,853,-923,968,15401,968,-923,853,-762,

+	656,-544,431,-325,231,-153,92,-49,22,-7, 1, 0}

+

+};

+

+void Pred_lt4(

+		Word16 exc[],                         /* in/out: excitation buffer */

+		Word16 T0,                            /* input : integer pitch lag */

+		Word16 frac,                          /* input : fraction of lag   */

+		Word16 L_subfr                        /* input : subframe size     */

+	     )

+{

+	Word16 j, k, *x;

+	Word32 L_sum;

+	Word16 *ptr, *ptr1;

+	Word16 *ptr2;

+

+	x = exc - T0;   

+	frac = -frac;

+	if (frac < 0)

+	{

+		frac += UP_SAMP;

+		x--;

+	}   

+	x -= 15;                                     /* x = L_INTERPOL2 - 1 */

+	k = 3 - frac;                                /* k = UP_SAMP - 1 - frac */

+

+	ptr2 = &(inter4_2[k][0]);

+	for (j = 0; j < L_subfr; j++)

+	{

+		ptr = ptr2;

+		ptr1 = x;

+		L_sum  = vo_mult32((*ptr1++), (*ptr++));

+		L_sum += vo_mult32((*ptr1++), (*ptr++));

+		L_sum += vo_mult32((*ptr1++), (*ptr++));

+		L_sum += vo_mult32((*ptr1++), (*ptr++));

+		L_sum += vo_mult32((*ptr1++), (*ptr++));

+		L_sum += vo_mult32((*ptr1++), (*ptr++));

+		L_sum += vo_mult32((*ptr1++), (*ptr++));

+		L_sum += vo_mult32((*ptr1++), (*ptr++));

+		L_sum += vo_mult32((*ptr1++), (*ptr++));

+		L_sum += vo_mult32((*ptr1++), (*ptr++));

+		L_sum += vo_mult32((*ptr1++), (*ptr++));

+		L_sum += vo_mult32((*ptr1++), (*ptr++));

+		L_sum += vo_mult32((*ptr1++), (*ptr++));

+		L_sum += vo_mult32((*ptr1++), (*ptr++));

+		L_sum += vo_mult32((*ptr1++), (*ptr++));

+		L_sum += vo_mult32((*ptr1++), (*ptr++));

+		L_sum += vo_mult32((*ptr1++), (*ptr++));

+		L_sum += vo_mult32((*ptr1++), (*ptr++));

+		L_sum += vo_mult32((*ptr1++), (*ptr++));

+		L_sum += vo_mult32((*ptr1++), (*ptr++));

+		L_sum += vo_mult32((*ptr1++), (*ptr++));

+		L_sum += vo_mult32((*ptr1++), (*ptr++));

+		L_sum += vo_mult32((*ptr1++), (*ptr++));

+		L_sum += vo_mult32((*ptr1++), (*ptr++));

+		L_sum += vo_mult32((*ptr1++), (*ptr++));

+		L_sum += vo_mult32((*ptr1++), (*ptr++));

+		L_sum += vo_mult32((*ptr1++), (*ptr++));

+		L_sum += vo_mult32((*ptr1++), (*ptr++));

+		L_sum += vo_mult32((*ptr1++), (*ptr++));

+		L_sum += vo_mult32((*ptr1++), (*ptr++));

+		L_sum += vo_mult32((*ptr1++), (*ptr++));

+		L_sum += vo_mult32((*ptr1++), (*ptr++));

+

+		L_sum = L_shl2(L_sum, 2);

+		exc[j] = extract_h(L_add(L_sum, 0x8000));

+		x++;

+	}

+

+	return;

+}

+

+

+

diff --git a/media/libstagefright/codecs/amrwbenc/src/preemph.c b/media/libstagefright/codecs/amrwbenc/src/preemph.c
new file mode 100644
index 0000000..f5bcd33
--- /dev/null
+++ b/media/libstagefright/codecs/amrwbenc/src/preemph.c
@@ -0,0 +1,88 @@
+/*

+ ** Copyright 2003-2010, VisualOn, Inc.

+ **

+ ** Licensed under the Apache License, Version 2.0 (the "License");

+ ** you may not use this file except in compliance with the License.

+ ** You may obtain a copy of the License at

+ **

+ **     http://www.apache.org/licenses/LICENSE-2.0

+ **

+ ** Unless required by applicable law or agreed to in writing, software

+ ** distributed under the License is distributed on an "AS IS" BASIS,

+ ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

+ ** See the License for the specific language governing permissions and

+ ** limitations under the License.

+ */

+

+/***********************************************************************

+*      File: preemph.c                                                *

+*                                                                     *

+*      Description: Preemphasis: filtering through 1 - g z^-1         *

+*	           Preemph2 --> signal is multiplied by 2             *

+*                                                                     *

+************************************************************************/

+

+#include "typedef.h"

+#include "basic_op.h"

+

+void Preemph(

+		Word16 x[],                           /* (i/o)   : input signal overwritten by the output */

+		Word16 mu,                            /* (i) Q15 : preemphasis coefficient                */

+		Word16 lg,                            /* (i)     : lenght of filtering                    */

+		Word16 * mem                          /* (i/o)   : memory (x[-1])                         */

+	    )

+{

+	Word16 temp;

+	Word32 i, L_tmp;

+

+	temp = x[lg - 1];                     

+

+	for (i = lg - 1; i > 0; i--)

+	{

+		L_tmp = L_deposit_h(x[i]);

+		L_tmp -= (x[i - 1] * mu)<<1;

+		x[i] = (L_tmp + 0x8000)>>16;               

+	}

+

+	L_tmp = L_deposit_h(x[0]);

+	L_tmp -= ((*mem) * mu)<<1;

+	x[0] = (L_tmp + 0x8000)>>16;                   

+

+	*mem = temp;                           

+

+	return;

+}

+

+

+void Preemph2(

+		Word16 x[],                           /* (i/o)   : input signal overwritten by the output */

+		Word16 mu,                            /* (i) Q15 : preemphasis coefficient                */

+		Word16 lg,                            /* (i)     : lenght of filtering                    */

+		Word16 * mem                          /* (i/o)   : memory (x[-1])                         */

+	     )

+{

+	Word16 temp;

+	Word32 i, L_tmp;

+

+	temp = x[lg - 1];                     

+

+	for (i = (Word16) (lg - 1); i > 0; i--)

+	{

+		L_tmp = L_deposit_h(x[i]);

+		L_tmp -= (x[i - 1] * mu)<<1;

+		L_tmp = (L_tmp << 1);

+		x[i] = (L_tmp + 0x8000)>>16;               

+	}

+

+	L_tmp = L_deposit_h(x[0]);

+	L_tmp -= ((*mem) * mu)<<1;

+	L_tmp = (L_tmp << 1);

+	x[0] = (L_tmp + 0x8000)>>16;                   

+

+	*mem = temp;                           

+

+	return;

+}

+

+

+

diff --git a/media/libstagefright/codecs/amrwbenc/src/q_gain2.c b/media/libstagefright/codecs/amrwbenc/src/q_gain2.c
new file mode 100644
index 0000000..59eefe4
--- /dev/null
+++ b/media/libstagefright/codecs/amrwbenc/src/q_gain2.c
@@ -0,0 +1,346 @@
+/*

+ ** Copyright 2003-2010, VisualOn, Inc.

+ **

+ ** Licensed under the Apache License, Version 2.0 (the "License");

+ ** you may not use this file except in compliance with the License.

+ ** You may obtain a copy of the License at

+ **

+ **     http://www.apache.org/licenses/LICENSE-2.0

+ **

+ ** Unless required by applicable law or agreed to in writing, software

+ ** distributed under the License is distributed on an "AS IS" BASIS,

+ ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

+ ** See the License for the specific language governing permissions and

+ ** limitations under the License.

+ */

+

+/**************************************************************************

+*  File: q_gain2.c                                                         *

+*                                                                          *

+*  Description:                                                            *

+* Quantization of pitch and codebook gains.                                *

+* MA prediction is performed on the innovation energy (in dB with mean     *

+* removed).                                                                *

+* An initial predicted gain, g_0, is first determined and the correction   *

+* factor     alpha = gain / g_0    is quantized.                           *

+* The pitch gain and the correction factor are vector quantized and the    *

+* mean-squared weighted error criterion is used in the quantizer search.   *

+****************************************************************************/

+

+#include "typedef.h"

+#include "basic_op.h"

+#include "oper_32b.h"

+#include "math_op.h"

+#include "log2.h"

+#include "acelp.h"

+#include "q_gain2.tab"

+

+#define MEAN_ENER    30

+#define RANGE        64

+#define PRED_ORDER   4

+

+

+/* MA prediction coeff ={0.5, 0.4, 0.3, 0.2} in Q13 */

+static Word16 pred[PRED_ORDER] = {4096, 3277, 2458, 1638};

+

+

+void Init_Q_gain2(

+		Word16 * mem                          /* output  :static memory (2 words)      */

+		)

+{

+	Word32 i;

+

+	/* 4nd order quantizer energy predictor (init to -14.0 in Q10) */

+	for (i = 0; i < PRED_ORDER; i++)

+	{

+		mem[i] = -14336;                     /* past_qua_en[i] */

+	}

+

+	return;

+}

+

+Word16 Q_gain2(                            /* Return index of quantization.          */

+		Word16 xn[],                          /* (i) Q_xn: Target vector.               */

+		Word16 y1[],                          /* (i) Q_xn: Adaptive codebook.           */

+		Word16 Q_xn,                          /* (i)     : xn and y1 format             */

+		Word16 y2[],                          /* (i) Q9  : Filtered innovative vector.  */

+		Word16 code[],                        /* (i) Q9  : Innovative vector.           */

+		Word16 g_coeff[],                     /* (i)     : Correlations <xn y1> <y1 y1> */

+		/*           Compute in G_pitch().        */

+		Word16 L_subfr,                       /* (i)     : Subframe lenght.             */

+		Word16 nbits,                         /* (i)     : number of bits (6 or 7)      */

+		Word16 * gain_pit,                    /* (i/o)Q14: Pitch gain.                  */

+		Word32 * gain_cod,                    /* (o) Q16 : Code gain.                   */

+		Word16 gp_clip,                       /* (i)     : Gp Clipping flag             */

+		Word16 * mem                          /* (i/o)   : static memory (2 words)      */

+	      )

+{

+	Word16 index, *p, min_ind, size;

+	Word16 exp, frac, gcode0, exp_gcode0, e_max, exp_code, qua_ener;

+	Word16 g_pitch, g2_pitch, g_code, g_pit_cod, g2_code, g2_code_lo;

+	Word16 coeff[5], coeff_lo[5], exp_coeff[5];

+	Word16 exp_max[5];

+	Word32 i, j, L_tmp, dist_min;

+	Word16 *past_qua_en, *t_qua_gain;

+

+	past_qua_en = mem;                     

+

+	/*-----------------------------------------------------------------*

+	 * - Find the initial quantization pitch index                     *

+	 * - Set gains search range                                        *

+	 *-----------------------------------------------------------------*/

+	if (nbits == 6)

+	{

+		t_qua_gain = t_qua_gain6b;         

+		min_ind = 0;                       

+		size = RANGE;                      

+

+		if(gp_clip == 1)

+		{

+			size = size - 16;          /* limit gain pitch to 1.0 */

+		}

+	} else

+	{

+		t_qua_gain = t_qua_gain7b;         

+

+		p = t_qua_gain7b + RANGE;            /* pt at 1/4th of table */

+

+		j = nb_qua_gain7b - RANGE;         

+

+		if (gp_clip == 1)

+		{

+			j = j - 27;                /* limit gain pitch to 1.0 */

+		}

+		min_ind = 0;                       

+		g_pitch = *gain_pit;               

+

+		for (i = 0; i < j; i++, p += 2)

+		{

+			if (g_pitch > *p)

+			{

+				min_ind = min_ind + 1;

+			}

+		}

+		size = RANGE;                      

+	}

+

+	/*------------------------------------------------------------------*

+	 *  Compute coefficient need for the quantization.                  *

+	 *                                                                  *

+	 *  coeff[0] =    y1 y1                                             *

+	 *  coeff[1] = -2 xn y1                                             *

+	 *  coeff[2] =    y2 y2                                             *

+	 *  coeff[3] = -2 xn y2                                             *

+	 *  coeff[4] =  2 y1 y2                                             *

+	 *                                                                  *

+	 * Product <y1 y1> and <xn y1> have been compute in G_pitch() and   *

+	 * are in vector g_coeff[].                                         *

+	 *------------------------------------------------------------------*/

+

+	coeff[0] = g_coeff[0];                 

+	exp_coeff[0] = g_coeff[1];             

+	coeff[1] = negate(g_coeff[2]);                    /* coeff[1] = -2 xn y1 */

+	exp_coeff[1] = g_coeff[3] + 1;     

+

+	/* Compute scalar product <y2[],y2[]> */

+#ifdef ASM_OPT                   /* asm optimization branch */

+	coeff[2] = extract_h(Dot_product12_asm(y2, y2, L_subfr, &exp));

+#else

+	coeff[2] = extract_h(Dot_product12(y2, y2, L_subfr, &exp));

+#endif

+	exp_coeff[2] = (exp - 18) + (Q_xn << 1);     /* -18 (y2 Q9) */

+

+	/* Compute scalar product -2*<xn[],y2[]> */

+#ifdef ASM_OPT                  /* asm optimization branch */

+	coeff[3] = extract_h(L_negate(Dot_product12_asm(xn, y2, L_subfr, &exp)));

+#else

+	coeff[3] = extract_h(L_negate(Dot_product12(xn, y2, L_subfr, &exp)));

+#endif

+

+	exp_coeff[3] = (exp - 8) + Q_xn;  /* -9 (y2 Q9), +1 (2 xn y2) */

+

+	/* Compute scalar product 2*<y1[],y2[]> */

+#ifdef ASM_OPT                 /* asm optimization branch */

+	coeff[4] = extract_h(Dot_product12_asm(y1, y2, L_subfr, &exp));

+#else

+	coeff[4] = extract_h(Dot_product12(y1, y2, L_subfr, &exp));

+#endif

+	exp_coeff[4] = (exp - 8) + Q_xn;  /* -9 (y2 Q9), +1 (2 y1 y2) */

+

+	/*-----------------------------------------------------------------*

+	 *  Find energy of code and compute:                               *

+	 *                                                                 *

+	 *    L_tmp = MEAN_ENER - 10log10(energy of code/ L_subfr)         *

+	 *          = MEAN_ENER - 3.0103*log2(energy of code/ L_subfr)     *

+	 *-----------------------------------------------------------------*/

+#ifdef ASM_OPT                 /* asm optimization branch */

+	L_tmp = Dot_product12_asm(code, code, L_subfr, &exp_code);

+#else

+	L_tmp = Dot_product12(code, code, L_subfr, &exp_code);

+#endif

+	/* exp_code: -18 (code in Q9), -6 (/L_subfr), -31 (L_tmp Q31->Q0) */

+	exp_code = (exp_code - (18 + 6 + 31));

+

+	Log2(L_tmp, &exp, &frac);

+	exp += exp_code;

+	L_tmp = Mpy_32_16(exp, frac, -24660);  /* x -3.0103(Q13) -> Q14 */

+

+	L_tmp += (MEAN_ENER * 8192)<<1; /* + MEAN_ENER in Q14 */

+

+	/*-----------------------------------------------------------------*

+	 * Compute gcode0.                                                 *

+	 *  = Sum(i=0,1) pred[i]*past_qua_en[i] + mean_ener - ener_code    *

+	 *-----------------------------------------------------------------*/

+	L_tmp = (L_tmp << 10);              /* From Q14 to Q24 */

+	L_tmp += (pred[0] * past_qua_en[0])<<1;      /* Q13*Q10 -> Q24 */

+	L_tmp += (pred[1] * past_qua_en[1])<<1;      /* Q13*Q10 -> Q24 */

+	L_tmp += (pred[2] * past_qua_en[2])<<1;      /* Q13*Q10 -> Q24 */

+	L_tmp += (pred[3] * past_qua_en[3])<<1;      /* Q13*Q10 -> Q24 */

+

+	gcode0 = extract_h(L_tmp);             /* From Q24 to Q8  */

+

+	/*-----------------------------------------------------------------*

+	 * gcode0 = pow(10.0, gcode0/20)                                   *

+	 *        = pow(2, 3.321928*gcode0/20)                             *

+	 *        = pow(2, 0.166096*gcode0)                                *

+	 *-----------------------------------------------------------------*/

+

+	L_tmp = vo_L_mult(gcode0, 5443);          /* *0.166096 in Q15 -> Q24     */

+	L_tmp = L_tmp >> 8;               /* From Q24 to Q16             */

+	VO_L_Extract(L_tmp, &exp_gcode0, &frac);  /* Extract exponent of gcode0  */

+

+	gcode0 = (Word16)(Pow2(14, frac));    /* Put 14 as exponent so that  */

+	/* output of Pow2() will be:   */

+	/* 16384 < Pow2() <= 32767     */

+	exp_gcode0 -= 14;

+

+	/*-------------------------------------------------------------------------*

+	 * Find the best quantizer                                                 *

+	 * ~~~~~~~~~~~~~~~~~~~~~~~                                                 *

+	 * Before doing the computation we need to aling exponents of coeff[]      *

+	 * to be sure to have the maximum precision.                               *

+	 *                                                                         *

+	 * In the table the pitch gains are in Q14, the code gains are in Q11 and  *

+	 * are multiply by gcode0 which have been multiply by 2^exp_gcode0.        *

+	 * Also when we compute g_pitch*g_pitch, g_code*g_code and g_pitch*g_code  *

+	 * we divide by 2^15.                                                      *

+	 * Considering all the scaling above we have:                              *

+	 *                                                                         *

+	 *   exp_code = exp_gcode0-11+15 = exp_gcode0+4                            *

+	 *                                                                         *

+	 *   g_pitch*g_pitch  = -14-14+15                                          *

+	 *   g_pitch          = -14                                                *

+	 *   g_code*g_code    = (2*exp_code)+15                                    *

+	 *   g_code           = exp_code                                           *

+	 *   g_pitch*g_code   = -14 + exp_code +15                                 *

+	 *                                                                         *

+	 *   g_pitch*g_pitch * coeff[0]  ;exp_max0 = exp_coeff[0] - 13             *

+	 *   g_pitch         * coeff[1]  ;exp_max1 = exp_coeff[1] - 14             *

+	 *   g_code*g_code   * coeff[2]  ;exp_max2 = exp_coeff[2] +15+(2*exp_code) *

+	 *   g_code          * coeff[3]  ;exp_max3 = exp_coeff[3] + exp_code       *

+	 *   g_pitch*g_code  * coeff[4]  ;exp_max4 = exp_coeff[4] + 1 + exp_code   *

+	 *-------------------------------------------------------------------------*/

+

+	exp_code = (exp_gcode0 + 4);

+	exp_max[0] = (exp_coeff[0] - 13);    

+	exp_max[1] = (exp_coeff[1] - 14);    

+	exp_max[2] = (exp_coeff[2] + (15 + (exp_code << 1)));  

+	exp_max[3] = (exp_coeff[3] + exp_code);   

+	exp_max[4] = (exp_coeff[4] + (1 + exp_code));  

+

+	/* Find maximum exponant */

+

+	e_max = exp_max[0];                   

+	for (i = 1; i < 5; i++)

+	{

+		if(exp_max[i] > e_max)

+		{

+			e_max = exp_max[i];            

+		}

+	}

+

+	/* align coeff[] and save in special 32 bit double precision */

+

+	for (i = 0; i < 5; i++)

+	{

+		j = add1(vo_sub(e_max, exp_max[i]), 2);/* /4 to avoid overflow */

+		L_tmp = L_deposit_h(coeff[i]);

+		L_tmp = L_shr(L_tmp, j);

+		VO_L_Extract(L_tmp, &coeff[i], &coeff_lo[i]);

+		coeff_lo[i] = (coeff_lo[i] >> 3);   /* lo >> 3 */

+	}

+

+	/* Codebook search */

+	dist_min = MAX_32;                     

+	p = &t_qua_gain[min_ind << 1];      

+

+	index = 0;                             

+	for (i = 0; i < size; i++)

+	{

+		g_pitch = *p++;                    

+		g_code = *p++;                     

+

+		g_code = ((g_code * gcode0) + 0x4000)>>15;

+		g2_pitch = ((g_pitch * g_pitch) + 0x4000)>>15;

+		g_pit_cod = ((g_code * g_pitch) + 0x4000)>>15;

+		L_tmp = (g_code * g_code)<<1;

+		VO_L_Extract(L_tmp, &g2_code, &g2_code_lo);

+

+		L_tmp = (coeff[2] * g2_code_lo)<<1;

+		L_tmp =  (L_tmp >> 3);

+		L_tmp += (coeff_lo[0] * g2_pitch)<<1;

+		L_tmp += (coeff_lo[1] * g_pitch)<<1;

+		L_tmp += (coeff_lo[2] * g2_code)<<1;

+		L_tmp += (coeff_lo[3] * g_code)<<1;

+		L_tmp += (coeff_lo[4] * g_pit_cod)<<1;

+		L_tmp =  (L_tmp >> 12);

+		L_tmp += (coeff[0] * g2_pitch)<<1;

+		L_tmp += (coeff[1] * g_pitch)<<1;

+		L_tmp += (coeff[2] * g2_code)<<1;

+		L_tmp += (coeff[3] * g_code)<<1;

+		L_tmp += (coeff[4] * g_pit_cod)<<1;

+

+		if(L_tmp < dist_min)

+		{

+			dist_min = L_tmp;              

+			index = i;                     

+		}

+	}

+

+	/* Read the quantized gains */

+	index = index + min_ind;

+	p = &t_qua_gain[(index + index)];    

+	*gain_pit = *p++;                       /* selected pitch gain in Q14 */

+	g_code = *p++;                          /* selected code gain in Q11  */

+

+	L_tmp = vo_L_mult(g_code, gcode0);             /* Q11*Q0 -> Q12 */

+	L_tmp = L_shl(L_tmp, (exp_gcode0 + 4));   /* Q12 -> Q16 */

+

+	*gain_cod = L_tmp;                       /* gain of code in Q16 */

+

+	/*---------------------------------------------------*

+	 * qua_ener = 20*log10(g_code)                       *

+	 *          = 6.0206*log2(g_code)                    *

+	 *          = 6.0206*(log2(g_codeQ11) - 11)          *

+	 *---------------------------------------------------*/

+

+	L_tmp = L_deposit_l(g_code);

+	Log2(L_tmp, &exp, &frac);

+	exp -= 11;

+	L_tmp = Mpy_32_16(exp, frac, 24660);   /* x 6.0206 in Q12 */

+

+	qua_ener = (Word16)(L_tmp >> 3); /* result in Q10 */

+

+	/* update table of past quantized energies */

+

+	past_qua_en[3] = past_qua_en[2];       

+	past_qua_en[2] = past_qua_en[1];       

+	past_qua_en[1] = past_qua_en[0];       

+	past_qua_en[0] = qua_ener;             

+

+	return (index);

+}

+

+

+

+

diff --git a/media/libstagefright/codecs/amrwbenc/src/q_pulse.c b/media/libstagefright/codecs/amrwbenc/src/q_pulse.c
new file mode 100644
index 0000000..a28ba40
--- /dev/null
+++ b/media/libstagefright/codecs/amrwbenc/src/q_pulse.c
@@ -0,0 +1,400 @@
+/*

+ ** Copyright 2003-2010, VisualOn, Inc.

+ **

+ ** Licensed under the Apache License, Version 2.0 (the "License");

+ ** you may not use this file except in compliance with the License.

+ ** You may obtain a copy of the License at

+ **

+ **     http://www.apache.org/licenses/LICENSE-2.0

+ **

+ ** Unless required by applicable law or agreed to in writing, software

+ ** distributed under the License is distributed on an "AS IS" BASIS,

+ ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

+ ** See the License for the specific language governing permissions and

+ ** limitations under the License.

+ */

+

+/***********************************************************************

+*      File: q_pulse.c                                                 *

+*                                                                      *

+*      Description: Coding and decoding of algebraic codebook          *

+*                                                                      *

+************************************************************************/

+

+#include <stdio.h>

+#include "typedef.h"

+#include "basic_op.h"

+#include "q_pulse.h"

+

+#define NB_POS 16                          /* pos in track, mask for sign bit */

+

+Word32 quant_1p_N1(                        /* (o) return N+1 bits             */

+		Word16 pos,                        /* (i) position of the pulse       */

+		Word16 N)                          /* (i) number of bits for position */

+{

+	Word16 mask;

+	Word32 index;

+

+	mask = (1 << N) - 1;              /* mask = ((1<<N)-1); */

+	/*-------------------------------------------------------*

+	 * Quantization of 1 pulse with N+1 bits:                *

+	 *-------------------------------------------------------*/

+	index = L_deposit_l((Word16) (pos & mask));

+	if ((pos & NB_POS) != 0)

+	{

+		index = vo_L_add(index, L_deposit_l(1 << N));   /* index += 1 << N; */

+	}

+	return (index);

+}

+

+

+Word32 quant_2p_2N1(                       /* (o) return (2*N)+1 bits         */

+		Word16 pos1,                          /* (i) position of the pulse 1     */

+		Word16 pos2,                          /* (i) position of the pulse 2     */

+		Word16 N)                             /* (i) number of bits for position */

+{

+	Word16 mask, tmp;

+	Word32 index;

+	mask = (1 << N) - 1;              /* mask = ((1<<N)-1); */

+	/*-------------------------------------------------------*

+	 * Quantization of 2 pulses with 2*N+1 bits:             *

+	 *-------------------------------------------------------*/

+	if (((pos2 ^ pos1) & NB_POS) == 0)

+	{

+		/* sign of 1st pulse == sign of 2th pulse */

+		if(pos1 <= pos2)          /* ((pos1 - pos2) <= 0) */

+		{

+			/* index = ((pos1 & mask) << N) + (pos2 & mask); */

+			index = L_deposit_l(add1((((Word16) (pos1 & mask)) << N), ((Word16) (pos2 & mask))));

+		} else

+		{

+			/* ((pos2 & mask) << N) + (pos1 & mask); */

+			index = L_deposit_l(add1((((Word16) (pos2 & mask)) << N), ((Word16) (pos1 & mask))));

+		}

+		if ((pos1 & NB_POS) != 0)

+		{

+			tmp = (N << 1);

+			index = vo_L_add(index, (1L << tmp));       /* index += 1 << (2*N); */

+		}

+	} else

+	{

+		/* sign of 1st pulse != sign of 2th pulse */

+		if (vo_sub((Word16) (pos1 & mask), (Word16) (pos2 & mask)) <= 0)

+		{

+			/* index = ((pos2 & mask) << N) + (pos1 & mask); */

+			index = L_deposit_l(add1((((Word16) (pos2 & mask)) << N), ((Word16) (pos1 & mask)))); 

+			if ((pos2 & NB_POS) != 0)

+			{

+				tmp = (N << 1);           /* index += 1 << (2*N); */

+				index = vo_L_add(index, (1L << tmp));

+			}

+		} else

+		{

+			/* index = ((pos1 & mask) << N) + (pos2 & mask);	 */

+			index = L_deposit_l(add1((((Word16) (pos1 & mask)) << N), ((Word16) (pos2 & mask)))); 

+			if ((pos1 & NB_POS) != 0)

+			{

+				tmp = (N << 1);

+				index = vo_L_add(index, (1 << tmp));    /* index += 1 << (2*N); */

+			}

+		}

+	}

+	return (index);

+}

+

+

+Word32 quant_3p_3N1(                       /* (o) return (3*N)+1 bits         */

+		Word16 pos1,                          /* (i) position of the pulse 1     */

+		Word16 pos2,                          /* (i) position of the pulse 2     */

+		Word16 pos3,                          /* (i) position of the pulse 3     */

+		Word16 N)                             /* (i) number of bits for position */

+{

+	Word16 nb_pos;

+	Word32 index;

+

+	nb_pos =(1 <<(N - 1));            /* nb_pos = (1<<(N-1)); */

+	/*-------------------------------------------------------*

+	 * Quantization of 3 pulses with 3*N+1 bits:             *

+	 *-------------------------------------------------------*/

+	if (((pos1 ^ pos2) & nb_pos) == 0)

+	{

+		index = quant_2p_2N1(pos1, pos2, sub(N, 1));    /* index = quant_2p_2N1(pos1, pos2, (N-1)); */

+		/* index += (pos1 & nb_pos) << N; */

+		index = vo_L_add(index, (L_deposit_l((Word16) (pos1 & nb_pos)) << N));  

+		/* index += quant_1p_N1(pos3, N) << (2*N); */

+		index = vo_L_add(index, (quant_1p_N1(pos3, N)<<(N << 1)));

+

+	} else if (((pos1 ^ pos3) & nb_pos) == 0)

+	{

+		index = quant_2p_2N1(pos1, pos3, sub(N, 1));    /* index = quant_2p_2N1(pos1, pos3, (N-1)); */

+		index = vo_L_add(index, (L_deposit_l((Word16) (pos1 & nb_pos)) << N)); 

+		/* index += (pos1 & nb_pos) << N; */

+		index = vo_L_add(index, (quant_1p_N1(pos2, N) << (N << 1)));

+		/* index += quant_1p_N1(pos2, N) <<

+		 * (2*N); */

+	} else

+	{

+		index = quant_2p_2N1(pos2, pos3, (N - 1));    /* index = quant_2p_2N1(pos2, pos3, (N-1)); */

+		/* index += (pos2 & nb_pos) << N;			 */

+		index = vo_L_add(index, (L_deposit_l((Word16) (pos2 & nb_pos)) << N));  

+		/* index += quant_1p_N1(pos1, N) << (2*N);	 */

+		index = vo_L_add(index, (quant_1p_N1(pos1, N) << (N << 1)));

+	}

+	return (index);

+}

+

+

+Word32 quant_4p_4N1(                       /* (o) return (4*N)+1 bits         */

+		Word16 pos1,                          /* (i) position of the pulse 1     */

+		Word16 pos2,                          /* (i) position of the pulse 2     */

+		Word16 pos3,                          /* (i) position of the pulse 3     */

+		Word16 pos4,                          /* (i) position of the pulse 4     */

+		Word16 N)                             /* (i) number of bits for position */

+{

+	Word16 nb_pos;

+	Word32 index;

+

+	nb_pos = 1 << (N - 1);            /* nb_pos = (1<<(N-1));  */

+	/*-------------------------------------------------------*

+	 * Quantization of 4 pulses with 4*N+1 bits:             *

+	 *-------------------------------------------------------*/

+	if (((pos1 ^ pos2) & nb_pos) == 0)

+	{

+		index = quant_2p_2N1(pos1, pos2, sub(N, 1));    /* index = quant_2p_2N1(pos1, pos2, (N-1)); */

+		/* index += (pos1 & nb_pos) << N;	 */

+		index = vo_L_add(index, (L_deposit_l((Word16) (pos1 & nb_pos)) << N));  

+		/* index += quant_2p_2N1(pos3, pos4, N) << (2*N); */

+		index = vo_L_add(index, (quant_2p_2N1(pos3, pos4, N) << (N << 1)));

+	} else if (((pos1 ^ pos3) & nb_pos) == 0)

+	{

+		index = quant_2p_2N1(pos1, pos3, (N - 1));

+		/* index += (pos1 & nb_pos) << N; */

+		index = vo_L_add(index, (L_deposit_l((Word16) (pos1 & nb_pos)) << N));  

+		/* index += quant_2p_2N1(pos2, pos4, N) << (2*N); */

+		index = vo_L_add(index, (quant_2p_2N1(pos2, pos4, N) << (N << 1)));

+	} else

+	{

+		index = quant_2p_2N1(pos2, pos3, (N - 1));

+		/* index += (pos2 & nb_pos) << N; */

+		index = vo_L_add(index, (L_deposit_l((Word16) (pos2 & nb_pos)) << N));  

+		/* index += quant_2p_2N1(pos1, pos4, N) << (2*N); */

+		index = vo_L_add(index, (quant_2p_2N1(pos1, pos4, N) << (N << 1)));

+	}

+	return (index);

+}

+

+

+Word32 quant_4p_4N(                        /* (o) return 4*N bits             */

+		Word16 pos[],                         /* (i) position of the pulse 1..4  */

+		Word16 N)                             /* (i) number of bits for position */

+{

+	Word16 nb_pos, mask, n_1, tmp;

+	Word16 posA[4], posB[4];

+	Word32 i, j, k, index;

+

+	n_1 = (Word16) (N - 1);                

+	nb_pos = (1 << n_1);                  /* nb_pos = (1<<n_1); */

+	mask = vo_sub((1 << N), 1);              /* mask = ((1<<N)-1); */

+

+	i = 0;                                 

+	j = 0;                                 

+	for (k = 0; k < 4; k++)

+	{

+		if ((pos[k] & nb_pos) == 0)

+		{

+			posA[i++] = pos[k];            

+		} else

+		{

+			posB[j++] = pos[k];            

+		}

+	}

+

+	switch (i)

+	{

+		case 0:

+			tmp = vo_sub((N << 2), 3);           /* index = 1 << ((4*N)-3); */

+			index = (1L << tmp);

+			/* index += quant_4p_4N1(posB[0], posB[1], posB[2], posB[3], n_1); */

+			index = vo_L_add(index, quant_4p_4N1(posB[0], posB[1], posB[2], posB[3], n_1));

+			break;

+		case 1:

+			/* index = quant_1p_N1(posA[0], n_1) << ((3*n_1)+1); */

+			tmp = add1((Word16)((vo_L_mult(3, n_1) >> 1)), 1);

+			index = L_shl(quant_1p_N1(posA[0], n_1), tmp);

+			/* index += quant_3p_3N1(posB[0], posB[1], posB[2], n_1); */

+			index = vo_L_add(index, quant_3p_3N1(posB[0], posB[1], posB[2], n_1));

+			break;

+		case 2:

+			tmp = ((n_1 << 1) + 1);         /* index = quant_2p_2N1(posA[0], posA[1], n_1) << ((2*n_1)+1); */

+			index = L_shl(quant_2p_2N1(posA[0], posA[1], n_1), tmp);

+			/* index += quant_2p_2N1(posB[0], posB[1], n_1); */

+			index = vo_L_add(index, quant_2p_2N1(posB[0], posB[1], n_1));

+			break;

+		case 3:

+			/* index = quant_3p_3N1(posA[0], posA[1], posA[2], n_1) << N; */

+			index = L_shl(quant_3p_3N1(posA[0], posA[1], posA[2], n_1), N);

+			index = vo_L_add(index, quant_1p_N1(posB[0], n_1));        /* index += quant_1p_N1(posB[0], n_1); */

+			break;

+		case 4:

+			index = quant_4p_4N1(posA[0], posA[1], posA[2], posA[3], n_1);

+			break;

+		default:

+			index = 0;

+			fprintf(stderr, "Error in function quant_4p_4N\n");

+	}

+	tmp = ((N << 2) - 2);               /* index += (i & 3) << ((4*N)-2); */

+	index = vo_L_add(index, L_shl((L_deposit_l(i) & (3L)), tmp));

+

+	return (index);

+}

+

+

+

+Word32 quant_5p_5N(                        /* (o) return 5*N bits             */

+		Word16 pos[],                         /* (i) position of the pulse 1..5  */

+		Word16 N)                             /* (i) number of bits for position */

+{

+	Word16 nb_pos, n_1, tmp;

+	Word16 posA[5], posB[5];

+	Word32 i, j, k, index, tmp2;

+

+	n_1 = (Word16) (N - 1);                

+	nb_pos = (1 << n_1);                  /* nb_pos = (1<<n_1); */

+

+	i = 0;                                 

+	j = 0;                                 

+	for (k = 0; k < 5; k++)

+	{

+		if ((pos[k] & nb_pos) == 0)

+		{

+			posA[i++] = pos[k];            

+		} else

+		{

+			posB[j++] = pos[k];            

+		}

+	}

+

+	switch (i)

+	{

+		case 0:

+			tmp = vo_sub((Word16)((vo_L_mult(5, N) >> 1)), 1);        /* ((5*N)-1)) */

+			index = L_shl(1L, tmp);   /* index = 1 << ((5*N)-1); */

+			tmp = add1((N << 1), 1);  /* index += quant_3p_3N1(posB[0], posB[1], posB[2], n_1) << ((2*N)+1);*/

+			tmp2 = L_shl(quant_3p_3N1(posB[0], posB[1], posB[2], n_1), tmp);

+			index = vo_L_add(index, tmp2);

+			index = vo_L_add(index, quant_2p_2N1(posB[3], posB[4], N));        /* index += quant_2p_2N1(posB[3], posB[4], N); */

+			break;

+		case 1:

+			tmp = vo_sub((Word16)((vo_L_mult(5, N) >> 1)), 1);        /* index = 1 << ((5*N)-1); */

+			index = L_shl(1L, tmp);

+			tmp = add1((N << 1), 1);   /* index += quant_3p_3N1(posB[0], posB[1], posB[2], n_1) <<((2*N)+1);  */

+			tmp2 = L_shl(quant_3p_3N1(posB[0], posB[1], posB[2], n_1), tmp);

+			index = vo_L_add(index, tmp2);

+			index = vo_L_add(index, quant_2p_2N1(posB[3], posA[0], N));        /* index += quant_2p_2N1(posB[3], posA[0], N); */

+			break;

+		case 2:

+			tmp = vo_sub((Word16)((vo_L_mult(5, N) >> 1)), 1);        /* ((5*N)-1)) */

+			index = L_shl(1L, tmp);            /* index = 1 << ((5*N)-1); */

+			tmp = add1((N << 1), 1);           /* index += quant_3p_3N1(posB[0], posB[1], posB[2], n_1) << ((2*N)+1);  */

+			tmp2 = L_shl(quant_3p_3N1(posB[0], posB[1], posB[2], n_1), tmp);

+			index = vo_L_add(index, tmp2);

+			index = vo_L_add(index, quant_2p_2N1(posA[0], posA[1], N));        /* index += quant_2p_2N1(posA[0], posA[1], N); */

+			break;

+		case 3:

+			tmp = add1((N << 1), 1);           /* index = quant_3p_3N1(posA[0], posA[1], posA[2], n_1) << ((2*N)+1);  */

+			index = L_shl(quant_3p_3N1(posA[0], posA[1], posA[2], n_1), tmp);

+			index = vo_L_add(index, quant_2p_2N1(posB[0], posB[1], N));        /* index += quant_2p_2N1(posB[0], posB[1], N); */

+			break;

+		case 4:

+			tmp = add1((N << 1), 1);           /* index = quant_3p_3N1(posA[0], posA[1], posA[2], n_1) << ((2*N)+1);  */

+			index = L_shl(quant_3p_3N1(posA[0], posA[1], posA[2], n_1), tmp);

+			index = vo_L_add(index, quant_2p_2N1(posA[3], posB[0], N));        /* index += quant_2p_2N1(posA[3], posB[0], N); */

+			break;

+		case 5:

+			tmp = add1((N << 1), 1);           /* index = quant_3p_3N1(posA[0], posA[1], posA[2], n_1) << ((2*N)+1);  */

+			index = L_shl(quant_3p_3N1(posA[0], posA[1], posA[2], n_1), tmp);

+			index = vo_L_add(index, quant_2p_2N1(posA[3], posA[4], N));        /* index += quant_2p_2N1(posA[3], posA[4], N); */

+			break;

+		default:

+			index = 0;

+			fprintf(stderr, "Error in function quant_5p_5N\n");

+	}

+

+	return (index);

+}

+

+

+Word32 quant_6p_6N_2(                      /* (o) return (6*N)-2 bits         */

+		Word16 pos[],                         /* (i) position of the pulse 1..6  */

+		Word16 N)                             /* (i) number of bits for position */

+{

+	Word16 nb_pos, n_1;

+	Word16 posA[6], posB[6];

+	Word32 i, j, k, index;

+

+	/* !!  N and n_1 are constants -> it doesn't need to be operated by Basic Operators */

+	n_1 = (Word16) (N - 1);                

+	nb_pos = (1 << n_1);                  /* nb_pos = (1<<n_1); */

+

+	i = 0;                                 

+	j = 0;                                 

+	for (k = 0; k < 6; k++)

+	{

+		if ((pos[k] & nb_pos) == 0)

+		{

+			posA[i++] = pos[k];            

+		} else

+		{

+			posB[j++] = pos[k];            

+		}

+	}

+

+	switch (i)

+	{

+		case 0:

+			index = (1 << (Word16) (6 * N - 5));        /* index = 1 << ((6*N)-5); */

+			index = vo_L_add(index, (quant_5p_5N(posB, n_1) << N)); /* index += quant_5p_5N(posB, n_1) << N; */

+			index = vo_L_add(index, quant_1p_N1(posB[5], n_1));        /* index += quant_1p_N1(posB[5], n_1); */

+			break;

+		case 1:

+			index = (1L << (Word16) (6 * N - 5));        /* index = 1 << ((6*N)-5); */

+			index = vo_L_add(index, (quant_5p_5N(posB, n_1) << N)); /* index += quant_5p_5N(posB, n_1) << N; */

+			index = vo_L_add(index, quant_1p_N1(posA[0], n_1));        /* index += quant_1p_N1(posA[0], n_1); */

+			break;

+		case 2:

+			index = (1L << (Word16) (6 * N - 5));        /* index = 1 << ((6*N)-5); */

+			/* index += quant_4p_4N(posB, n_1) << ((2*n_1)+1); */

+			index = vo_L_add(index, (quant_4p_4N(posB, n_1) << (Word16) (2 * n_1 + 1)));

+			index = vo_L_add(index, quant_2p_2N1(posA[0], posA[1], n_1));      /* index += quant_2p_2N1(posA[0], posA[1], n_1); */

+			break;

+		case 3:

+			index = (quant_3p_3N1(posA[0], posA[1], posA[2], n_1) << (Word16) (3 * n_1 + 1));    

+			                                  /* index = quant_3p_3N1(posA[0], posA[1], posA[2], n_1) << ((3*n_1)+1); */

+			index =vo_L_add(index, quant_3p_3N1(posB[0], posB[1], posB[2], n_1));     

+			                                 /* index += quant_3p_3N1(posB[0], posB[1], posB[2], n_1); */

+			break;

+		case 4:

+			i = 2;                            

+			index = (quant_4p_4N(posA, n_1) << (Word16) (2 * n_1 + 1));  /* index = quant_4p_4N(posA, n_1) << ((2*n_1)+1); */

+			index = vo_L_add(index, quant_2p_2N1(posB[0], posB[1], n_1));      /* index += quant_2p_2N1(posB[0], posB[1], n_1); */

+			break;

+		case 5:

+			i = 1;                            

+			index = (quant_5p_5N(posA, n_1) << N);       /* index = quant_5p_5N(posA, n_1) << N; */

+			index = vo_L_add(index, quant_1p_N1(posB[0], n_1));        /* index += quant_1p_N1(posB[0], n_1); */

+			break;

+		case 6:

+			i = 0;                             

+			index = (quant_5p_5N(posA, n_1) << N);       /* index = quant_5p_5N(posA, n_1) << N; */

+			index = vo_L_add(index, quant_1p_N1(posA[5], n_1));        /* index += quant_1p_N1(posA[5], n_1); */

+			break;

+		default:

+			index = 0;

+			fprintf(stderr, "Error in function quant_6p_6N_2\n");

+	}

+	index = vo_L_add(index, ((L_deposit_l(i) & 3L) << (Word16) (6 * N - 4)));   /* index += (i & 3) << ((6*N)-4); */

+

+	return (index);

+}

+

+

diff --git a/media/libstagefright/codecs/amrwbenc/src/qisf_ns.c b/media/libstagefright/codecs/amrwbenc/src/qisf_ns.c
new file mode 100644
index 0000000..00b0a53
--- /dev/null
+++ b/media/libstagefright/codecs/amrwbenc/src/qisf_ns.c
@@ -0,0 +1,111 @@
+/*

+ ** Copyright 2003-2010, VisualOn, Inc.

+ **

+ ** Licensed under the Apache License, Version 2.0 (the "License");

+ ** you may not use this file except in compliance with the License.

+ ** You may obtain a copy of the License at

+ **

+ **     http://www.apache.org/licenses/LICENSE-2.0

+ **

+ ** Unless required by applicable law or agreed to in writing, software

+ ** distributed under the License is distributed on an "AS IS" BASIS,

+ ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

+ ** See the License for the specific language governing permissions and

+ ** limitations under the License.

+ */

+

+/***************************************************************************

+*      File: qisf_ns.c                                                     *

+*                                                                          *

+*      Description: Coding/Decoding of ISF parameters for background noise.*

+*                    The ISF vector is quantized using VQ with split-by-5  *

+*                                                                          *

+****************************************************************************/

+

+#include "typedef.h"

+#include "basic_op.h"

+#include "acelp.h"

+#include "qisf_ns.tab"                     /* Codebooks of ISFs */

+

+/*------------------------------------------------------------------*

+* routine:   Qisf_ns()                                             *

+*            ~~~~~~~~~                                             *

+*------------------------------------------------------------------*/

+

+void Qisf_ns(

+		Word16 * isf1,                        /* input : ISF in the frequency domain (0..0.5) */

+		Word16 * isf_q,                       /* output: quantized ISF                        */

+		Word16 * indice                       /* output: quantization indices                 */

+	    )

+{

+	Word16 i;

+	Word32 tmp;

+

+	for (i = 0; i < ORDER; i++)

+	{

+		isf_q[i] = sub(isf1[i], mean_isf_noise[i]);     

+	}

+

+	indice[0] = Sub_VQ(&isf_q[0], dico1_isf_noise, 2, SIZE_BK_NOISE1, &tmp);    

+	indice[1] = Sub_VQ(&isf_q[2], dico2_isf_noise, 3, SIZE_BK_NOISE2, &tmp);    

+	indice[2] = Sub_VQ(&isf_q[5], dico3_isf_noise, 3, SIZE_BK_NOISE3, &tmp);    

+	indice[3] = Sub_VQ(&isf_q[8], dico4_isf_noise, 4, SIZE_BK_NOISE4, &tmp);    

+	indice[4] = Sub_VQ(&isf_q[12], dico5_isf_noise, 4, SIZE_BK_NOISE5, &tmp);   

+

+	/* decoding the ISFs */

+

+	Disf_ns(indice, isf_q);

+

+	return;

+}

+

+/********************************************************************

+* Function:   Disf_ns()                                             *

+*            ~~~~~~~~~                                              *

+* Decoding of ISF parameters                                        *

+*-------------------------------------------------------------------*

+*  Arguments:                                                       *

+*    indice[] : indices of the selected codebook entries            *

+*    isf[]    : quantized ISFs (in frequency domain)                *

+*********************************************************************/

+

+void Disf_ns(

+		Word16 * indice,                      /* input:  quantization indices                  */

+		Word16 * isf_q                        /* input : ISF in the frequency domain (0..0.5)  */

+	    )

+{

+	Word16 i;

+

+	for (i = 0; i < 2; i++)

+	{

+		isf_q[i] = dico1_isf_noise[indice[0] * 2 + i];  

+	}

+	for (i = 0; i < 3; i++)

+	{

+		isf_q[i + 2] = dico2_isf_noise[indice[1] * 3 + i];      

+	}

+	for (i = 0; i < 3; i++)

+	{

+		isf_q[i + 5] = dico3_isf_noise[indice[2] * 3 + i];      

+	}

+	for (i = 0; i < 4; i++)

+	{

+		isf_q[i + 8] = dico4_isf_noise[indice[3] * 4 + i];      

+	}

+	for (i = 0; i < 4; i++)

+	{

+		isf_q[i + 12] = dico5_isf_noise[indice[4] * 4 + i];     

+	}

+

+	for (i = 0; i < ORDER; i++)

+	{

+		isf_q[i] = add(isf_q[i], mean_isf_noise[i]);   

+	}

+

+	Reorder_isf(isf_q, ISF_GAP, ORDER);

+

+	return;

+}

+

+

+

diff --git a/media/libstagefright/codecs/amrwbenc/src/qpisf_2s.c b/media/libstagefright/codecs/amrwbenc/src/qpisf_2s.c
new file mode 100644
index 0000000..ccedb5c
--- /dev/null
+++ b/media/libstagefright/codecs/amrwbenc/src/qpisf_2s.c
@@ -0,0 +1,542 @@
+/*

+ ** Copyright 2003-2010, VisualOn, Inc.

+ **

+ ** Licensed under the Apache License, Version 2.0 (the "License");

+ ** you may not use this file except in compliance with the License.

+ ** You may obtain a copy of the License at

+ **

+ **     http://www.apache.org/licenses/LICENSE-2.0

+ **

+ ** Unless required by applicable law or agreed to in writing, software

+ ** distributed under the License is distributed on an "AS IS" BASIS,

+ ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

+ ** See the License for the specific language governing permissions and

+ ** limitations under the License.

+ */

+

+/***********************************************************************

+*       File: apisf_2s.c                                               *

+*                                                                      *

+*       Description: Coding/Decodeing of ISF parameters with predication

+*       The ISF vector is quantized using two-stage VQ with split-by-2 *

+*       in 1st stage and split-by-5(or 3) in the second stage          *

+*                                                                      *

+************************************************************************/

+

+#include "typedef.h"

+#include "basic_op.h"

+#include "cnst.h"

+#include "acelp.h"

+#include "qpisf_2s.tab"                    /* Codebooks of isfs */

+

+#define MU         10923                   /* Prediction factor   (1.0/3.0) in Q15 */

+#define N_SURV_MAX 4                       /* 4 survivors max */

+#define ALPHA      29491                   /* 0. 9 in Q15     */

+#define ONE_ALPHA (32768-ALPHA)            /* (1.0 - ALPHA) in Q15 */

+

+/* private functions */

+static void VQ_stage1(

+		Word16 * x,                           /* input : ISF residual vector           */

+		Word16 * dico,                        /* input : quantization codebook         */

+		Word16 dim,                           /* input : dimention of vector           */

+		Word16 dico_size,                     /* input : size of quantization codebook */

+		Word16 * index,                       /* output: indices of survivors          */

+		Word16 surv                           /* input : number of survivor            */

+		);

+

+/**************************************************************************

+* Function:   Qpisf_2s_46B()                                              *

+*                                                                         *

+* Description: Quantization of isf parameters with prediction. (46 bits)  *

+*                                                                         *

+* The isf vector is quantized using two-stage VQ with split-by-2 in       *

+*  1st stage and split-by-5 in the second stage.                          *

+***************************************************************************/

+

+void Qpisf_2s_46b(

+		Word16 * isf1,                        /* (i) Q15 : ISF in the frequency domain (0..0.5) */

+		Word16 * isf_q,                       /* (o) Q15 : quantized ISF               (0..0.5) */

+		Word16 * past_isfq,                   /* (io)Q15 : past ISF quantizer                   */

+		Word16 * indice,                      /* (o)     : quantization indices                 */

+		Word16 nb_surv                        /* (i)     : number of survivor (1, 2, 3 or 4)    */

+		)

+{

+	Word16 tmp_ind[5];

+	Word16 surv1[N_SURV_MAX];              /* indices of survivors from 1st stage */

+	Word32 i, k, temp, min_err, distance;

+	Word16 isf[ORDER];

+	Word16 isf_stage2[ORDER];

+

+	for (i = 0; i < ORDER; i++)

+	{

+		isf[i] = vo_sub(isf1[i], mean_isf[i]);

+		isf[i] = vo_sub(isf[i], vo_mult(MU, past_isfq[i])); 

+	}

+

+	VQ_stage1(&isf[0], dico1_isf, 9, SIZE_BK1, surv1, nb_surv);

+

+	distance = MAX_32;          

+

+	for (k = 0; k < nb_surv; k++)

+	{

+		for (i = 0; i < 9; i++)

+		{

+			isf_stage2[i] = vo_sub(isf[i], dico1_isf[i + surv1[k] * 9]); 

+		}

+		tmp_ind[0] = Sub_VQ(&isf_stage2[0], dico21_isf, 3, SIZE_BK21, &min_err); 

+		temp = min_err;

+		tmp_ind[1] = Sub_VQ(&isf_stage2[3], dico22_isf, 3, SIZE_BK22, &min_err); 

+		temp = vo_L_add(temp, min_err);

+		tmp_ind[2] = Sub_VQ(&isf_stage2[6], dico23_isf, 3, SIZE_BK23, &min_err);  

+		temp = vo_L_add(temp, min_err);

+

+		if(temp < distance)

+		{

+			distance = temp;               

+			indice[0] = surv1[k];          

+			for (i = 0; i < 3; i++)

+			{

+				indice[i + 2] = tmp_ind[i];

+			}

+		}

+	}

+

+

+	VQ_stage1(&isf[9], dico2_isf, 7, SIZE_BK2, surv1, nb_surv);

+

+	distance = MAX_32;                   

+

+	for (k = 0; k < nb_surv; k++)

+	{

+		for (i = 0; i < 7; i++)

+		{

+			isf_stage2[i] = vo_sub(isf[9 + i], dico2_isf[i + surv1[k] * 7]);       

+		}

+

+		tmp_ind[0] = Sub_VQ(&isf_stage2[0], dico24_isf, 3, SIZE_BK24, &min_err);

+		temp = min_err; 

+		tmp_ind[1] = Sub_VQ(&isf_stage2[3], dico25_isf, 4, SIZE_BK25, &min_err);

+		temp = vo_L_add(temp, min_err);

+

+		if(temp < distance)

+		{

+			distance = temp;               

+			indice[1] = surv1[k];          

+			for (i = 0; i < 2; i++)

+			{

+				indice[i + 5] = tmp_ind[i];

+			}

+		}

+	}

+

+	Dpisf_2s_46b(indice, isf_q, past_isfq, isf_q, isf_q, 0, 0);

+

+	return;

+}

+

+/*****************************************************************************

+* Function:   Qpisf_2s_36B()                                                 *

+*                                                                            *

+* Description: Quantization of isf parameters with prediction. (36 bits)     *

+*                                                                            *

+* The isf vector is quantized using two-stage VQ with split-by-2 in          *

+*  1st stage and split-by-3 in the second stage.                             *

+******************************************************************************/

+

+void Qpisf_2s_36b(

+		Word16 * isf1,                        /* (i) Q15 : ISF in the frequency domain (0..0.5) */

+		Word16 * isf_q,                       /* (o) Q15 : quantized ISF               (0..0.5) */

+		Word16 * past_isfq,                   /* (io)Q15 : past ISF quantizer                   */

+		Word16 * indice,                      /* (o)     : quantization indices                 */

+		Word16 nb_surv                        /* (i)     : number of survivor (1, 2, 3 or 4)    */

+		)

+{

+	Word16 i, k, tmp_ind[5];

+	Word16 surv1[N_SURV_MAX];              /* indices of survivors from 1st stage */

+	Word32 temp, min_err, distance;

+	Word16 isf[ORDER];

+	Word16 isf_stage2[ORDER];

+

+	for (i = 0; i < ORDER; i++)

+	{

+		isf[i] = vo_sub(isf1[i], mean_isf[i]);

+		isf[i] = vo_sub(isf[i], vo_mult(MU, past_isfq[i]));

+	}

+

+	VQ_stage1(&isf[0], dico1_isf, 9, SIZE_BK1, surv1, nb_surv);

+

+	distance = MAX_32;                  

+

+	for (k = 0; k < nb_surv; k++)

+	{

+		for (i = 0; i < 9; i++)

+		{

+			isf_stage2[i] = vo_sub(isf[i], dico1_isf[i + surv1[k] * 9]); 

+		}

+

+		tmp_ind[0] = Sub_VQ(&isf_stage2[0], dico21_isf_36b, 5, SIZE_BK21_36b, &min_err);        

+		temp = min_err;                  

+		tmp_ind[1] = Sub_VQ(&isf_stage2[5], dico22_isf_36b, 4, SIZE_BK22_36b, &min_err);        

+		temp = vo_L_add(temp, min_err);

+

+		if(temp < distance)

+		{

+			distance = temp;               

+			indice[0] = surv1[k];          

+			for (i = 0; i < 2; i++)

+			{

+				indice[i + 2] = tmp_ind[i];

+			}

+		}

+	}

+

+	VQ_stage1(&isf[9], dico2_isf, 7, SIZE_BK2, surv1, nb_surv);

+	distance = MAX_32;                    

+

+	for (k = 0; k < nb_surv; k++)

+	{

+		for (i = 0; i < 7; i++)

+		{

+			isf_stage2[i] = vo_sub(isf[9 + i], dico2_isf[i + surv1[k] * 7]);     

+		}

+

+		tmp_ind[0] = Sub_VQ(&isf_stage2[0], dico23_isf_36b, 7, SIZE_BK23_36b, &min_err);  

+		temp = min_err;                  

+

+		if(temp < distance)

+		{

+			distance = temp;               

+			indice[1] = surv1[k];          

+			indice[4] = tmp_ind[0];        

+		}

+	}

+

+	Dpisf_2s_36b(indice, isf_q, past_isfq, isf_q, isf_q, 0, 0);

+

+	return;

+}

+

+/*********************************************************************

+* Function: Dpisf_2s_46b()                                           *

+*                                                                    *

+* Description: Decoding of ISF parameters                            *

+**********************************************************************/

+

+void Dpisf_2s_46b(

+		Word16 * indice,                      /* input:  quantization indices                       */

+		Word16 * isf_q,                       /* output: quantized ISF in frequency domain (0..0.5) */

+		Word16 * past_isfq,                   /* i/0   : past ISF quantizer                    */

+		Word16 * isfold,                      /* input : past quantized ISF                    */

+		Word16 * isf_buf,                     /* input : isf buffer                                                        */

+		Word16 bfi,                           /* input : Bad frame indicator                   */

+		Word16 enc_dec

+		)

+{

+	Word16 ref_isf[M], tmp;

+	Word32 i, j, L_tmp;

+

+	if (bfi == 0)                          /* Good frame */

+	{

+		for (i = 0; i < 9; i++)

+		{

+			isf_q[i] = dico1_isf[indice[0] * 9 + i];    

+		}

+		for (i = 0; i < 7; i++)

+		{

+			isf_q[i + 9] = dico2_isf[indice[1] * 7 + i];       

+		}

+

+		for (i = 0; i < 3; i++)

+		{

+			isf_q[i] = add1(isf_q[i], dico21_isf[indice[2] * 3 + i]);   

+			isf_q[i + 3] = add1(isf_q[i + 3], dico22_isf[indice[3] * 3 + i]);  

+			isf_q[i + 6] = add1(isf_q[i + 6], dico23_isf[indice[4] * 3 + i]); 

+			isf_q[i + 9] = add1(isf_q[i + 9], dico24_isf[indice[5] * 3 + i]); 

+		}

+

+		for (i = 0; i < 4; i++)

+		{

+			isf_q[i + 12] = add1(isf_q[i + 12], dico25_isf[indice[6] * 4 + i]);  

+		}

+

+		for (i = 0; i < ORDER; i++)

+		{

+			tmp = isf_q[i];               

+			isf_q[i] = add1(tmp, mean_isf[i]);  

+			isf_q[i] = add1(isf_q[i], vo_mult(MU, past_isfq[i]));

+			past_isfq[i] = tmp;  

+		}

+

+		if (enc_dec)

+		{

+			for (i = 0; i < M; i++)

+			{

+				for (j = (L_MEANBUF - 1); j > 0; j--)

+				{

+					isf_buf[j * M + i] = isf_buf[(j - 1) * M + i]; 

+				}

+				isf_buf[i] = isf_q[i]; 

+			}

+		}

+	} else

+	{                                      /* bad frame */

+		for (i = 0; i < M; i++)

+		{

+			L_tmp = mean_isf[i] << 14;

+			for (j = 0; j < L_MEANBUF; j++)

+			{

+				L_tmp += (isf_buf[j * M + i] << 14);

+			}

+			ref_isf[i] = vo_round(L_tmp);

+		}

+

+		/* use the past ISFs slightly shifted towards their mean */

+		for (i = 0; i < ORDER; i++)

+		{

+			isf_q[i] = add1(vo_mult(ALPHA, isfold[i]), vo_mult(ONE_ALPHA, ref_isf[i])); 

+		}

+

+		/* estimate past quantized residual to be used in next frame */

+		for (i = 0; i < ORDER; i++)

+		{

+			tmp = add1(ref_isf[i], vo_mult(past_isfq[i], MU));      /* predicted ISF */

+			past_isfq[i] = vo_sub(isf_q[i], tmp); 

+			past_isfq[i] = (past_isfq[i] >> 1);        /* past_isfq[i] *= 0.5 */

+		}

+	}

+

+	Reorder_isf(isf_q, ISF_GAP, ORDER);

+	return;

+}

+

+/*********************************************************************

+* Function:   Disf_2s_36b()                                          *

+*                                                                    *

+* Description: Decoding of ISF parameters                            *

+*********************************************************************/

+

+void Dpisf_2s_36b(

+		Word16 * indice,                      /* input:  quantization indices                       */

+		Word16 * isf_q,                       /* output: quantized ISF in frequency domain (0..0.5) */

+		Word16 * past_isfq,                   /* i/0   : past ISF quantizer                    */

+		Word16 * isfold,                      /* input : past quantized ISF                    */

+		Word16 * isf_buf,                     /* input : isf buffer                                                        */

+		Word16 bfi,                           /* input : Bad frame indicator                   */

+		Word16 enc_dec

+		)

+{

+	Word16 ref_isf[M], tmp;

+	Word32 i, j, L_tmp;

+

+	if (bfi == 0)                          /* Good frame */

+	{

+		for (i = 0; i < 9; i++)

+		{

+			isf_q[i] = dico1_isf[indice[0] * 9 + i];    

+		}

+		for (i = 0; i < 7; i++)

+		{

+			isf_q[i + 9] = dico2_isf[indice[1] * 7 + i];       

+		}

+

+		for (i = 0; i < 5; i++)

+		{

+			isf_q[i] = add1(isf_q[i], dico21_isf_36b[indice[2] * 5 + i]);       

+		}

+		for (i = 0; i < 4; i++)

+		{

+			isf_q[i + 5] = add1(isf_q[i + 5], dico22_isf_36b[indice[3] * 4 + i]);        

+		}

+		for (i = 0; i < 7; i++)

+		{

+			isf_q[i + 9] = add1(isf_q[i + 9], dico23_isf_36b[indice[4] * 7 + i]);       

+		}

+

+		for (i = 0; i < ORDER; i++)

+		{

+			tmp = isf_q[i];

+			isf_q[i] = add1(tmp, mean_isf[i]);   

+			isf_q[i] = add1(isf_q[i], vo_mult(MU, past_isfq[i]));   

+			past_isfq[i] = tmp;           

+		}

+

+

+		if (enc_dec)

+		{

+			for (i = 0; i < M; i++)

+			{

+				for (j = (L_MEANBUF - 1); j > 0; j--)

+				{

+					isf_buf[j * M + i] = isf_buf[(j - 1) * M + i];      

+				}

+				isf_buf[i] = isf_q[i];    

+			}

+		}

+	} else

+	{                                      /* bad frame */

+		for (i = 0; i < M; i++)

+		{

+			L_tmp = (mean_isf[i] << 14);

+			for (j = 0; j < L_MEANBUF; j++)

+			{

+				L_tmp += (isf_buf[j * M + i] << 14);

+			}

+			ref_isf[i] = vo_round(L_tmp);    

+		}

+

+		/* use the past ISFs slightly shifted towards their mean */

+		for (i = 0; i < ORDER; i++)

+		{

+			isf_q[i] = add1(vo_mult(ALPHA, isfold[i]), vo_mult(ONE_ALPHA, ref_isf[i]));        

+		}

+

+		/* estimate past quantized residual to be used in next frame */

+		for (i = 0; i < ORDER; i++)

+		{

+			tmp = add1(ref_isf[i], vo_mult(past_isfq[i], MU));      /* predicted ISF */

+			past_isfq[i] = vo_sub(isf_q[i], tmp);  

+			past_isfq[i] = past_isfq[i] >> 1;         /* past_isfq[i] *= 0.5 */

+		}

+	}

+

+	Reorder_isf(isf_q, ISF_GAP, ORDER);

+

+	return;

+}

+

+

+/***************************************************************************

+* Function:  Reorder_isf()                                                 *

+*                                                                          *

+* Description: To make sure that the  isfs are properly order and to       *

+*              keep a certain minimum distance between consecutive isfs.   *

+*--------------------------------------------------------------------------*

+*    Argument         description                     in/out               *

+*                                                                          *

+*     isf[]           vector of isfs                    i/o                *

+*     min_dist        minimum required distance         i                  *

+*     n               LPC order                         i                  *

+****************************************************************************/

+

+void Reorder_isf(

+		Word16 * isf,                         /* (i/o) Q15: ISF in the frequency domain (0..0.5) */

+		Word16 min_dist,                      /* (i) Q15  : minimum distance to keep             */

+		Word16 n                              /* (i)      : number of ISF                        */

+		)

+{

+	Word32 i; 

+	Word16 isf_min;

+

+	isf_min = min_dist;                    

+	for (i = 0; i < n - 1; i++)

+	{

+		if(isf[i] < isf_min)

+		{

+			isf[i] = isf_min;              

+		}

+		isf_min = (isf[i] + min_dist);

+	}

+	return;

+}

+

+

+Word16 Sub_VQ(                             /* output: return quantization index     */

+		Word16 * x,                           /* input : ISF residual vector           */

+		Word16 * dico,                        /* input : quantization codebook         */

+		Word16 dim,                           /* input : dimention of vector           */

+		Word16 dico_size,                     /* input : size of quantization codebook */

+		Word32 * distance                     /* output: error of quantization         */

+	     )

+{

+	Word16 temp, *p_dico;

+	Word32 i, j, index;

+	Word32 dist_min, dist;

+

+	dist_min = MAX_32;                     

+	p_dico = dico;                         

+

+	index = 0;                             

+	for (i = 0; i < dico_size; i++)

+	{

+		dist = 0;  

+

+		for (j = 0; j < dim; j++)

+		{

+			temp = x[j] - (*p_dico++);

+			dist += (temp * temp)<<1;

+		}

+

+		if(dist < dist_min)

+		{

+			dist_min = dist;               

+			index = i;                     

+		}

+	}

+

+	*distance = dist_min;                  

+

+	/* Reading the selected vector */

+	p_dico = &dico[index * dim];           

+	for (j = 0; j < dim; j++)

+	{

+		x[j] = *p_dico++;                  

+	}

+

+	return index;

+}

+

+

+static void VQ_stage1(

+		Word16 * x,                           /* input : ISF residual vector           */

+		Word16 * dico,                        /* input : quantization codebook         */

+		Word16 dim,                           /* input : dimention of vector           */

+		Word16 dico_size,                     /* input : size of quantization codebook */

+		Word16 * index,                       /* output: indices of survivors          */

+		Word16 surv                           /* input : number of survivor            */

+		)

+{

+	Word16 temp, *p_dico;

+	Word32 i, j, k, l;

+	Word32 dist_min[N_SURV_MAX], dist;

+

+	dist_min[0] = MAX_32;

+	dist_min[1] = MAX_32;

+	dist_min[2] = MAX_32;

+	dist_min[3] = MAX_32;

+	index[0] = 0;

+	index[1] = 1;

+	index[2] = 2;

+	index[3] = 3;

+

+	p_dico = dico;                         

+

+	for (i = 0; i < dico_size; i++)

+	{

+		dist = 0;                          

+		for (j = 0; j < dim; j++)

+		{

+			temp = x[j] -  (*p_dico++);

+			dist += (temp * temp)<<1;

+		}

+

+		for (k = 0; k < surv; k++)

+		{

+			if(dist < dist_min[k])

+			{

+				for (l = surv - 1; l > k; l--)

+				{

+					dist_min[l] = dist_min[l - 1];      

+					index[l] = index[l - 1];    

+				}

+				dist_min[k] = dist;        

+				index[k] = i;              

+				break;

+			}

+		}

+	}

+	return;

+}

+

+

+

+

diff --git a/media/libstagefright/codecs/amrwbenc/src/random.c b/media/libstagefright/codecs/amrwbenc/src/random.c
new file mode 100644
index 0000000..8baa8bf
--- /dev/null
+++ b/media/libstagefright/codecs/amrwbenc/src/random.c
@@ -0,0 +1,33 @@
+/*

+ ** Copyright 2003-2010, VisualOn, Inc.

+ **

+ ** Licensed under the Apache License, Version 2.0 (the "License");

+ ** you may not use this file except in compliance with the License.

+ ** You may obtain a copy of the License at

+ **

+ **     http://www.apache.org/licenses/LICENSE-2.0

+ **

+ ** Unless required by applicable law or agreed to in writing, software

+ ** distributed under the License is distributed on an "AS IS" BASIS,

+ ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

+ ** See the License for the specific language governing permissions and

+ ** limitations under the License.

+ */

+

+/***********************************************************************

+*       File: random.c                                                 *

+*                                                                      *

+*       Description: Signed 16 bits random generator                   *

+*                                                                      *

+************************************************************************/

+

+#include "typedef.h"

+#include "basic_op.h"

+

+Word16 Random(Word16 * seed)

+{

+	/* static Word16 seed = 21845; */

+	*seed = (Word16)(L_add((L_mult(*seed, 31821) >> 1), 13849L));

+	return (*seed);

+}

+

diff --git a/media/libstagefright/codecs/amrwbenc/src/residu.c b/media/libstagefright/codecs/amrwbenc/src/residu.c
new file mode 100644
index 0000000..6829882
--- /dev/null
+++ b/media/libstagefright/codecs/amrwbenc/src/residu.c
@@ -0,0 +1,67 @@
+/*

+ ** Copyright 2003-2010, VisualOn, Inc.

+ **

+ ** Licensed under the Apache License, Version 2.0 (the "License");

+ ** you may not use this file except in compliance with the License.

+ ** You may obtain a copy of the License at

+ **

+ **     http://www.apache.org/licenses/LICENSE-2.0

+ **

+ ** Unless required by applicable law or agreed to in writing, software

+ ** distributed under the License is distributed on an "AS IS" BASIS,

+ ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

+ ** See the License for the specific language governing permissions and

+ ** limitations under the License.

+ */

+

+/***********************************************************************

+*  File: residu.c                                                      *

+*                                                                      *

+*  Description: Compute the LPC residual by filtering                  *

+*             the input speech through A(z)                            *

+*                                                                      *

+************************************************************************/

+

+#include "typedef.h"

+#include "basic_op.h"

+

+void Residu(

+		Word16 a[],                           /* (i) Q12 : prediction coefficients                     */

+		Word16 x[],                           /* (i)     : speech (values x[-m..-1] are needed         */

+		Word16 y[],                           /* (o) x2  : residual signal                             */

+		Word16 lg                             /* (i)     : size of filtering                           */

+		)

+{

+	Word16 i,*p1, *p2;

+	Word32 s;

+	for (i = 0; i < lg; i++)

+	{

+		p1 = a;

+		p2 = &x[i];

+		s  = vo_mult32((*p1++), (*p2--));

+		s += vo_mult32((*p1++), (*p2--));

+		s += vo_mult32((*p1++), (*p2--));

+		s += vo_mult32((*p1++), (*p2--));

+		s += vo_mult32((*p1++), (*p2--));

+		s += vo_mult32((*p1++), (*p2--));

+		s += vo_mult32((*p1++), (*p2--));

+		s += vo_mult32((*p1++), (*p2--));

+		s += vo_mult32((*p1++), (*p2--));

+		s += vo_mult32((*p1++), (*p2--));

+		s += vo_mult32((*p1++), (*p2--));

+		s += vo_mult32((*p1++), (*p2--));

+		s += vo_mult32((*p1++), (*p2--));

+		s += vo_mult32((*p1++), (*p2--));

+		s += vo_mult32((*p1++), (*p2--));

+		s += vo_mult32((*p1++), (*p2--));

+		s += vo_mult32((*p1), (*p2));

+

+		s = L_shl2(s, 5); 

+		y[i] = extract_h(L_add(s, 0x8000));

+	}

+

+	return;

+}

+

+

+

diff --git a/media/libstagefright/codecs/amrwbenc/src/scale.c b/media/libstagefright/codecs/amrwbenc/src/scale.c
new file mode 100644
index 0000000..af40121
--- /dev/null
+++ b/media/libstagefright/codecs/amrwbenc/src/scale.c
@@ -0,0 +1,57 @@
+/*

+ ** Copyright 2003-2010, VisualOn, Inc.

+ **

+ ** Licensed under the Apache License, Version 2.0 (the "License");

+ ** you may not use this file except in compliance with the License.

+ ** You may obtain a copy of the License at

+ **

+ **     http://www.apache.org/licenses/LICENSE-2.0

+ **

+ ** Unless required by applicable law or agreed to in writing, software

+ ** distributed under the License is distributed on an "AS IS" BASIS,

+ ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

+ ** See the License for the specific language governing permissions and

+ ** limitations under the License.

+ */

+

+/***********************************************************************

+*       File: scale.c                                                  *

+*                                                                      *

+*       Description: Scale signal to get maximum of dynamic            *

+*                                                                      *

+************************************************************************/

+

+#include "typedef.h"

+#include "basic_op.h"

+

+void Scale_sig(

+		Word16 x[],                           /* (i/o) : signal to scale               */

+		Word16 lg,                            /* (i)   : size of x[]                   */

+		Word16 exp                            /* (i)   : exponent: x = round(x << exp) */

+	      )

+{

+	Word32 i;

+	Word32 L_tmp;

+	if(exp > 0)

+	{

+		for (i = lg - 1 ; i >= 0; i--)

+		{

+			L_tmp = L_shl2(x[i], 16 + exp);  

+			x[i] = extract_h(L_add(L_tmp, 0x8000));            

+		}

+	}

+	else

+	{

+		exp = -exp;

+		for (i = lg - 1; i >= 0; i--)

+		{

+			L_tmp = x[i] << 16;

+			L_tmp >>= exp; 

+			x[i] = (L_tmp + 0x8000)>>16;            

+		}

+	}

+	return;

+}

+

+

+

diff --git a/media/libstagefright/codecs/amrwbenc/src/stream.c b/media/libstagefright/codecs/amrwbenc/src/stream.c
new file mode 100644
index 0000000..a708235
--- /dev/null
+++ b/media/libstagefright/codecs/amrwbenc/src/stream.c
@@ -0,0 +1,58 @@
+/*

+ ** Copyright 2003-2010, VisualOn, Inc.

+ **

+ ** Licensed under the Apache License, Version 2.0 (the "License");

+ ** you may not use this file except in compliance with the License.

+ ** You may obtain a copy of the License at

+ **

+ **     http://www.apache.org/licenses/LICENSE-2.0

+ **

+ ** Unless required by applicable law or agreed to in writing, software

+ ** distributed under the License is distributed on an "AS IS" BASIS,

+ ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

+ ** See the License for the specific language governing permissions and

+ ** limitations under the License.

+ */

+

+/***********************************************************************

+*       File: stream.c                                                 *

+*                                                                      *

+*       Description: VOME API Buffer Operator Implement Code           *

+*                                                                      *

+************************************************************************/

+

+#include "stream.h"

+

+void voAWB_InitFrameBuffer(FrameStream *stream)

+{

+	stream->set_ptr = NULL;

+	stream->frame_ptr_bk = stream->frame_ptr;

+	stream->set_len = 0;

+	stream->framebuffer_len = 0;

+	stream->frame_storelen = 0;	

+}

+

+void voAWB_UpdateFrameBuffer(

+		FrameStream *stream, 

+		VO_MEM_OPERATOR *pMemOP

+		)

+{

+	int  len;

+	len  = MIN(Frame_Maxsize - stream->frame_storelen, stream->set_len);

+	pMemOP->Copy(VO_INDEX_ENC_AMRWB, stream->frame_ptr_bk + stream->frame_storelen , stream->set_ptr, len);

+	stream->set_len -= len;

+	stream->set_ptr += len;

+	stream->framebuffer_len = stream->frame_storelen + len;

+	stream->frame_ptr = stream->frame_ptr_bk;

+	stream->used_len += len;

+}

+

+void voAWB_FlushFrameBuffer(FrameStream *stream)

+{

+	stream->set_ptr = NULL;

+	stream->frame_ptr_bk = stream->frame_ptr;

+	stream->set_len = 0;

+	stream->framebuffer_len = 0;

+	stream->frame_storelen = 0;	

+}

+

diff --git a/media/libstagefright/codecs/amrwbenc/src/syn_filt.c b/media/libstagefright/codecs/amrwbenc/src/syn_filt.c
new file mode 100644
index 0000000..6c1fb8e
--- /dev/null
+++ b/media/libstagefright/codecs/amrwbenc/src/syn_filt.c
@@ -0,0 +1,160 @@
+/*

+ ** Copyright 2003-2010, VisualOn, Inc.

+ **

+ ** Licensed under the Apache License, Version 2.0 (the "License");

+ ** you may not use this file except in compliance with the License.

+ ** You may obtain a copy of the License at

+ **

+ **     http://www.apache.org/licenses/LICENSE-2.0

+ **

+ ** Unless required by applicable law or agreed to in writing, software

+ ** distributed under the License is distributed on an "AS IS" BASIS,

+ ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

+ ** See the License for the specific language governing permissions and

+ ** limitations under the License.

+ */

+

+/***********************************************************************

+*       File: syn_filt.c                                               *

+*                                                                      *

+*       Description: Do the synthesis filtering 1/A(z)                 *

+*                                                                      *

+************************************************************************/

+

+#include "typedef.h"

+#include "basic_op.h"

+#include "math_op.h"

+#include "cnst.h"

+

+void Syn_filt(

+		Word16 a[],                           /* (i) Q12 : a[m+1] prediction coefficients           */

+		Word16 x[],                           /* (i)     : input signal                             */

+		Word16 y[],                           /* (o)     : output signal                            */

+		Word16 lg,                            /* (i)     : size of filtering                        */

+		Word16 mem[],                         /* (i/o)   : memory associated with this filtering.   */

+		Word16 update                         /* (i)     : 0=no update, 1=update of memory.         */

+	     )

+{

+	Word32 i, a0;

+	Word16 y_buf[L_SUBFR16k + M16k];

+	Word32 L_tmp;

+	Word16 *yy, *p1, *p2;

+	yy = &y_buf[0];                        

+	/* copy initial filter states into synthesis buffer */

+	for (i = 0; i < 16; i++)

+	{

+		*yy++ = mem[i];                    

+	}

+	a0 = (a[0] >> 1);                     /* input / 2 */

+	/* Do the filtering. */

+	for (i = 0; i < lg; i++)

+	{

+		p1 = &a[1];

+		p2 = &yy[i-1];

+		L_tmp  = vo_mult32(a0, x[i]);

+		L_tmp -= vo_mult32((*p1++), (*p2--));

+		L_tmp -= vo_mult32((*p1++), (*p2--));

+		L_tmp -= vo_mult32((*p1++), (*p2--));

+		L_tmp -= vo_mult32((*p1++), (*p2--));

+		L_tmp -= vo_mult32((*p1++), (*p2--));

+		L_tmp -= vo_mult32((*p1++), (*p2--));

+		L_tmp -= vo_mult32((*p1++), (*p2--));

+		L_tmp -= vo_mult32((*p1++), (*p2--));

+		L_tmp -= vo_mult32((*p1++), (*p2--));

+		L_tmp -= vo_mult32((*p1++), (*p2--));

+		L_tmp -= vo_mult32((*p1++), (*p2--));

+		L_tmp -= vo_mult32((*p1++), (*p2--));

+		L_tmp -= vo_mult32((*p1++), (*p2--));

+		L_tmp -= vo_mult32((*p1++), (*p2--));

+		L_tmp -= vo_mult32((*p1++), (*p2--));

+		L_tmp -= vo_mult32((*p1), (*p2));

+

+		L_tmp = L_shl2(L_tmp, 4);

+		y[i] = yy[i] = extract_h(L_add(L_tmp, 0x8000));  

+	}

+	/* Update memory if required */

+	if (update)

+		for (i = 0; i < 16; i++)

+		{

+			mem[i] = yy[lg - 16 + i];

+		}

+	return;

+}

+

+

+void Syn_filt_32(

+		Word16 a[],                           /* (i) Q12 : a[m+1] prediction coefficients */

+		Word16 m,                             /* (i)     : order of LP filter             */

+		Word16 exc[],                         /* (i) Qnew: excitation (exc[i] >> Qnew)    */

+		Word16 Qnew,                          /* (i)     : exc scaling = 0(min) to 8(max) */

+		Word16 sig_hi[],                      /* (o) /16 : synthesis high                 */

+		Word16 sig_lo[],                      /* (o) /16 : synthesis low                  */

+		Word16 lg                             /* (i)     : size of filtering              */

+		)

+{

+	Word32 i,a0;

+	Word32 L_tmp, L_tmp1;

+	Word16 *p1, *p2, *p3;

+	a0 = a[0] >> (4 + Qnew);          /* input / 16 and >>Qnew */

+	/* Do the filtering. */

+	for (i = 0; i < lg; i++)

+	{

+		L_tmp  = 0; 

+		L_tmp1 = 0;

+		p1 = a;

+		p2 = &sig_lo[i - 1];

+		p3 = &sig_hi[i - 1];

+

+		L_tmp  -= vo_mult32((*p2--), (*p1));

+		L_tmp1 -= vo_mult32((*p3--), (*p1++));

+		L_tmp  -= vo_mult32((*p2--), (*p1));

+		L_tmp1 -= vo_mult32((*p3--), (*p1++));

+		L_tmp  -= vo_mult32((*p2--), (*p1));

+		L_tmp1 -= vo_mult32((*p3--), (*p1++));

+		L_tmp  -= vo_mult32((*p2--), (*p1));

+		L_tmp1 -= vo_mult32((*p3--), (*p1++));

+		L_tmp  -= vo_mult32((*p2--), (*p1));

+		L_tmp1 -= vo_mult32((*p3--), (*p1++));

+		L_tmp  -= vo_mult32((*p2--), (*p1));

+		L_tmp1 -= vo_mult32((*p3--), (*p1++));

+		L_tmp  -= vo_mult32((*p2--), (*p1));

+		L_tmp1 -= vo_mult32((*p3--), (*p1++));

+		L_tmp  -= vo_mult32((*p2--), (*p1));

+		L_tmp1 -= vo_mult32((*p3--), (*p1++));

+		L_tmp  -= vo_mult32((*p2--), (*p1));

+		L_tmp1 -= vo_mult32((*p3--), (*p1++));

+		L_tmp  -= vo_mult32((*p2--), (*p1));

+		L_tmp1 -= vo_mult32((*p3--), (*p1++));

+		L_tmp  -= vo_mult32((*p2--), (*p1));

+		L_tmp1 -= vo_mult32((*p3--), (*p1++));

+		L_tmp  -= vo_mult32((*p2--), (*p1));

+		L_tmp1 -= vo_mult32((*p3--), (*p1++));

+		L_tmp  -= vo_mult32((*p2--), (*p1));

+		L_tmp1 -= vo_mult32((*p3--), (*p1++));

+		L_tmp  -= vo_mult32((*p2--), (*p1));

+		L_tmp1 -= vo_mult32((*p3--), (*p1++));

+		L_tmp  -= vo_mult32((*p2--), (*p1));

+		L_tmp1 -= vo_mult32((*p3--), (*p1++));

+		L_tmp  -= vo_mult32((*p2--), (*p1));

+		L_tmp1 -= vo_mult32((*p3--), (*p1++));

+

+		L_tmp = L_tmp >> 11;      

+		L_tmp += vo_L_mult(exc[i], a0);

+

+		/* sig_hi = bit16 to bit31 of synthesis */

+		L_tmp = L_tmp - (L_tmp1<<1);

+

+		L_tmp = L_tmp >> 3;           /* ai in Q12 */

+		sig_hi[i] = extract_h(L_tmp);      

+

+		/* sig_lo = bit4 to bit15 of synthesis */

+		L_tmp >>= 4;           /* 4 : sig_lo[i] >> 4 */

+		sig_lo[i] = (Word16)((L_tmp - (sig_hi[i] << 13)));  

+	}

+

+	return;

+}

+

+

+

+

diff --git a/media/libstagefright/codecs/amrwbenc/src/updt_tar.c b/media/libstagefright/codecs/amrwbenc/src/updt_tar.c
new file mode 100644
index 0000000..f3e5650
--- /dev/null
+++ b/media/libstagefright/codecs/amrwbenc/src/updt_tar.c
@@ -0,0 +1,49 @@
+/*

+ ** Copyright 2003-2010, VisualOn, Inc.

+ **

+ ** Licensed under the Apache License, Version 2.0 (the "License");

+ ** you may not use this file except in compliance with the License.

+ ** You may obtain a copy of the License at

+ **

+ **     http://www.apache.org/licenses/LICENSE-2.0

+ **

+ ** Unless required by applicable law or agreed to in writing, software

+ ** distributed under the License is distributed on an "AS IS" BASIS,

+ ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

+ ** See the License for the specific language governing permissions and

+ ** limitations under the License.

+ */

+

+/***********************************************************************

+*       File: updt_tar.c                                               *

+*                                                                      *

+*       Description: Update the target vector for codebook search      *

+*                                                                      *

+************************************************************************/

+

+#include "typedef.h"

+#include "basic_op.h"

+

+void Updt_tar(

+		Word16 * x,                           /* (i) Q0  : old target (for pitch search)     */

+		Word16 * x2,                          /* (o) Q0  : new target (for codebook search)  */

+		Word16 * y,                           /* (i) Q0  : filtered adaptive codebook vector */

+		Word16 gain,                          /* (i) Q14 : adaptive codebook gain            */

+		Word16 L                              /* (i)     : subframe size                     */

+	     )

+{

+	Word32 i;

+	Word32 L_tmp;

+

+	for (i = 0; i < L; i++)

+	{

+		L_tmp = x[i] << 15;

+		L_tmp -= (y[i] * gain)<<1;

+		x2[i] = extract_h(L_shl2(L_tmp, 1)); 

+	}

+

+	return;

+}

+

+

+

diff --git a/media/libstagefright/codecs/amrwbenc/src/util.c b/media/libstagefright/codecs/amrwbenc/src/util.c
new file mode 100644
index 0000000..78141dd
--- /dev/null
+++ b/media/libstagefright/codecs/amrwbenc/src/util.c
@@ -0,0 +1,74 @@
+/*

+ ** Copyright 2003-2010, VisualOn, Inc.

+ **

+ ** Licensed under the Apache License, Version 2.0 (the "License");

+ ** you may not use this file except in compliance with the License.

+ ** You may obtain a copy of the License at

+ **

+ **     http://www.apache.org/licenses/LICENSE-2.0

+ **

+ ** Unless required by applicable law or agreed to in writing, software

+ ** distributed under the License is distributed on an "AS IS" BASIS,

+ ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

+ ** See the License for the specific language governing permissions and

+ ** limitations under the License.

+ */

+

+/***********************************************************************

+*       File: util.c                                                   *

+*                                                                      *

+*       Description: Reset and Copy buffer                             *

+*                                                                      *

+************************************************************************/

+

+#include "typedef.h"

+#include "basic_op.h"

+

+/***********************************************************************

+* Function:  Set_zero()                                             *

+* Description: Set vector x[] to zero                               *

+************************************************************************/

+

+void Set_zero(

+		Word16 x[],                           /* (o)    : vector to clear     */

+		Word16 L                              /* (i)    : length of vector    */

+	     )

+{

+	Word32 num = (Word32)L;

+	do{

+		*x++ = 0;

+	}while(--num !=0);

+}

+

+

+/*********************************************************************

+* Function: Copy()                                                   *

+*                                                                    *

+* Description: Copy vector x[] to y[]                                *

+*********************************************************************/

+

+void Copy(

+		Word16 x[],                           /* (i)   : input vector   */

+		Word16 y[],                           /* (o)   : output vector  */

+		Word16 L                              /* (i)   : vector length  */

+	 )

+{

+	Word32	temp1,temp2,num;

+	if(L&1)

+	{

+		temp1 = *x++;

+		*y++ = temp1;

+	}

+	num = (Word32)(L>>1);

+	temp1 = *x++;

+	temp2 = *x++;

+	do{

+		*y++ = temp1;

+		*y++ = temp2;

+		temp1 = *x++;

+		temp2 = *x++;

+	}while(--num!=0);

+}

+

+

+

diff --git a/media/libstagefright/codecs/amrwbenc/src/voAMRWBEnc.c b/media/libstagefright/codecs/amrwbenc/src/voAMRWBEnc.c
new file mode 100644
index 0000000..d0d99a7
--- /dev/null
+++ b/media/libstagefright/codecs/amrwbenc/src/voAMRWBEnc.c
@@ -0,0 +1,1941 @@
+/*

+ ** Copyright 2003-2010, VisualOn, Inc.

+ **

+ ** Licensed under the Apache License, Version 2.0 (the "License");

+ ** you may not use this file except in compliance with the License.

+ ** You may obtain a copy of the License at

+ **

+ **     http://www.apache.org/licenses/LICENSE-2.0

+ **

+ ** Unless required by applicable law or agreed to in writing, software

+ ** distributed under the License is distributed on an "AS IS" BASIS,

+ ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

+ ** See the License for the specific language governing permissions and

+ ** limitations under the License.

+ */

+

+/***********************************************************************

+*      File: voAMRWBEnc.c                                              *

+*                                                                      *

+*      Description: Performs the main encoder routine                  *

+*                   Fixed-point C simulation of AMR WB ACELP coding    *

+*		    algorithm with 20 msspeech frames for              *

+*		    wideband speech signals.                           *

+*                                                                      *

+************************************************************************/

+

+#include <stdio.h>

+#include <stdlib.h>

+#include "typedef.h"

+#include "basic_op.h"

+#include "oper_32b.h"

+#include "math_op.h"

+#include "cnst.h"

+#include "acelp.h"

+#include "cod_main.h"

+#include "bits.h"

+#include "main.h"

+#include "voAMRWB.h"

+#include "mem_align.h"

+#include "cmnMemory.h"

+

+#ifdef __cplusplus

+extern "C" {

+#endif

+

+/* LPC interpolation coef {0.45, 0.8, 0.96, 1.0}; in Q15 */

+static Word16 interpol_frac[NB_SUBFR] = {14746, 26214, 31457, 32767};

+

+/* isp tables for initialization */

+static Word16 isp_init[M] =

+{

+	32138, 30274, 27246, 23170, 18205, 12540, 6393, 0,

+	-6393, -12540, -18205, -23170, -27246, -30274, -32138, 1475

+};

+

+static Word16 isf_init[M] =

+{

+	1024, 2048, 3072, 4096, 5120, 6144, 7168, 8192,

+	9216, 10240, 11264, 12288, 13312, 14336, 15360, 3840

+};

+

+/* High Band encoding */

+static const Word16 HP_gain[16] =

+{

+	3624, 4673, 5597, 6479, 7425, 8378, 9324, 10264,

+	11210, 12206, 13391, 14844, 16770, 19655, 24289, 32728

+};

+

+/* Private function declaration */

+static Word16 synthesis(

+			Word16 Aq[],                          /* A(z)  : quantized Az               */

+			Word16 exc[],                         /* (i)   : excitation at 12kHz        */

+			Word16 Q_new,                         /* (i)   : scaling performed on exc   */

+			Word16 synth16k[],                    /* (o)   : 16kHz synthesis signal     */

+			Coder_State * st                      /* (i/o) : State structure            */

+			);

+

+/* Codec some parameters initialization */

+void Reset_encoder(void *st, Word16 reset_all)

+{

+	Word16 i;

+	Coder_State *cod_state;

+	cod_state = (Coder_State *) st;

+	Set_zero(cod_state->old_exc, PIT_MAX + L_INTERPOL);

+	Set_zero(cod_state->mem_syn, M);

+	Set_zero(cod_state->past_isfq, M);

+	cod_state->mem_w0 = 0;                 

+	cod_state->tilt_code = 0;              

+	cod_state->first_frame = 1;            

+	Init_gp_clip(cod_state->gp_clip);

+	cod_state->L_gc_thres = 0;             

+	if (reset_all != 0)

+	{

+		/* Static vectors to zero */

+		Set_zero(cod_state->old_speech, L_TOTAL - L_FRAME);

+		Set_zero(cod_state->old_wsp, (PIT_MAX / OPL_DECIM));

+		Set_zero(cod_state->mem_decim2, 3);

+		/* routines initialization */

+		Init_Decim_12k8(cod_state->mem_decim);

+		Init_HP50_12k8(cod_state->mem_sig_in);

+		Init_Levinson(cod_state->mem_levinson);

+		Init_Q_gain2(cod_state->qua_gain);

+		Init_Hp_wsp(cod_state->hp_wsp_mem);

+		/* isp initialization */

+		Copy(isp_init, cod_state->ispold, M);

+		Copy(isp_init, cod_state->ispold_q, M);

+		/* variable initialization */

+		cod_state->mem_preemph = 0;        

+		cod_state->mem_wsp = 0;            

+		cod_state->Q_old = 15;             

+		cod_state->Q_max[0] = 15;          

+		cod_state->Q_max[1] = 15;          

+		cod_state->old_wsp_max = 0;        

+		cod_state->old_wsp_shift = 0;      

+		/* pitch ol initialization */

+		cod_state->old_T0_med = 40;        

+		cod_state->ol_gain = 0;            

+		cod_state->ada_w = 0;              

+		cod_state->ol_wght_flg = 0;        

+		for (i = 0; i < 5; i++)

+		{

+			cod_state->old_ol_lag[i] = 40; 

+		}

+		Set_zero(cod_state->old_hp_wsp, (L_FRAME / 2) / OPL_DECIM + (PIT_MAX / OPL_DECIM));

+		Set_zero(cod_state->mem_syn_hf, M);

+		Set_zero(cod_state->mem_syn_hi, M);

+		Set_zero(cod_state->mem_syn_lo, M);

+		Init_HP50_12k8(cod_state->mem_sig_out);

+		Init_Filt_6k_7k(cod_state->mem_hf);

+		Init_HP400_12k8(cod_state->mem_hp400);

+		Copy(isf_init, cod_state->isfold, M);

+		cod_state->mem_deemph = 0;         

+		cod_state->seed2 = 21845;          

+		Init_Filt_6k_7k(cod_state->mem_hf2);

+		cod_state->gain_alpha = 32767;     

+		cod_state->vad_hist = 0;

+		wb_vad_reset(cod_state->vadSt);

+		dtx_enc_reset(cod_state->dtx_encSt, isf_init);

+	}

+	return;

+}

+

+/*-----------------------------------------------------------------*

+*   Funtion  coder                                                *

+*            ~~~~~                                                *

+*   ->Main coder routine.                                         *

+*                                                                 *

+*-----------------------------------------------------------------*/

+void coder(

+		Word16 * mode,                        /* input :  used mode                             */

+		Word16 speech16k[],                   /* input :  320 new speech samples (at 16 kHz)    */

+		Word16 prms[],                        /* output:  output parameters                     */

+		Word16 * ser_size,                    /* output:  bit rate of the used mode             */

+		void *spe_state,                      /* i/o   :  State structure                       */

+		Word16 allow_dtx                      /* input :  DTX ON/OFF                            */

+	  )

+{

+	/* Coder states */

+	Coder_State *st;

+	/* Speech vector */

+	Word16 old_speech[L_TOTAL];

+	Word16 *new_speech, *speech, *p_window;

+

+	/* Weighted speech vector */

+	Word16 old_wsp[L_FRAME + (PIT_MAX / OPL_DECIM)];

+	Word16 *wsp;

+

+	/* Excitation vector */

+	Word16 old_exc[(L_FRAME + 1) + PIT_MAX + L_INTERPOL];

+	Word16 *exc;

+

+	/* LPC coefficients */

+	Word16 r_h[M + 1], r_l[M + 1];         /* Autocorrelations of windowed speech  */

+	Word16 rc[M];                          /* Reflection coefficients.             */

+	Word16 Ap[M + 1];                      /* A(z) with spectral expansion         */

+	Word16 ispnew[M];                      /* immittance spectral pairs at 4nd sfr */

+	Word16 ispnew_q[M];                    /* quantized ISPs at 4nd subframe       */

+	Word16 isf[M];                         /* ISF (frequency domain) at 4nd sfr    */

+	Word16 *p_A, *p_Aq;                    /* ptr to A(z) for the 4 subframes      */

+	Word16 A[NB_SUBFR * (M + 1)];          /* A(z) unquantized for the 4 subframes */

+	Word16 Aq[NB_SUBFR * (M + 1)];         /* A(z)   quantized for the 4 subframes */

+

+	/* Other vectors */

+	Word16 xn[L_SUBFR];                    /* Target vector for pitch search     */

+	Word16 xn2[L_SUBFR];                   /* Target vector for codebook search  */

+	Word16 dn[L_SUBFR];                    /* Correlation between xn2 and h1     */

+	Word16 cn[L_SUBFR];                    /* Target vector in residual domain   */

+	Word16 h1[L_SUBFR];                    /* Impulse response vector            */

+	Word16 h2[L_SUBFR];                    /* Impulse response vector            */

+	Word16 code[L_SUBFR];                  /* Fixed codebook excitation          */

+	Word16 y1[L_SUBFR];                    /* Filtered adaptive excitation       */

+	Word16 y2[L_SUBFR];                    /* Filtered adaptive excitation       */

+	Word16 error[M + L_SUBFR];             /* error of quantization              */

+	Word16 synth[L_SUBFR];                 /* 12.8kHz synthesis vector           */

+	Word16 exc2[L_FRAME];                  /* excitation vector                  */

+	Word16 buf[L_FRAME];                   /* VAD buffer                         */

+

+	/* Scalars */

+	Word32 i, j, i_subfr, select, pit_flag, clip_gain, vad_flag;

+	Word16 codec_mode;

+	Word16 T_op, T_op2, T0, T0_min, T0_max, T0_frac, index;

+	Word16 gain_pit, gain_code, g_coeff[4], g_coeff2[4];

+	Word16 tmp, gain1, gain2, exp, Q_new, mu, shift, max;

+	Word16 voice_fac;

+	Word16 indice[8];

+	Word32 L_tmp, L_gain_code, L_max, L_tmp1;

+	Word16 code2[L_SUBFR];                         /* Fixed codebook excitation  */

+	Word16 stab_fac, fac, gain_code_lo;

+

+	Word16 corr_gain;

+	Word16 *vo_p0, *vo_p1, *vo_p2, *vo_p3;

+

+	st = (Coder_State *) spe_state;

+

+	*ser_size = nb_of_bits[*mode];         

+	codec_mode = *mode;                    

+

+	/*--------------------------------------------------------------------------*

+	 *          Initialize pointers to speech vector.                           *

+	 *                                                                          *

+	 *                                                                          *

+	 *                    |-------|-------|-------|-------|-------|-------|     *

+	 *                     past sp   sf1     sf2     sf3     sf4    L_NEXT      *

+	 *                    <-------  Total speech buffer (L_TOTAL)   ------>     *

+	 *              old_speech                                                  *

+	 *                    <-------  LPC analysis window (L_WINDOW)  ------>     *

+	 *                    |       <-- present frame (L_FRAME) ---->             *

+	 *                   p_window |       <----- new speech (L_FRAME) ---->     *

+	 *                            |       |                                     *

+	 *                          speech    |                                     *

+	 *                                 new_speech                               *

+	 *--------------------------------------------------------------------------*/

+

+	new_speech = old_speech + L_TOTAL - L_FRAME - L_FILT;         /* New speech     */

+	speech = old_speech + L_TOTAL - L_FRAME - L_NEXT;             /* Present frame  */

+	p_window = old_speech + L_TOTAL - L_WINDOW; 

+

+	exc = old_exc + PIT_MAX + L_INTERPOL;  

+	wsp = old_wsp + (PIT_MAX / OPL_DECIM); 

+

+	/* copy coder memory state into working space */

+	Copy(st->old_speech, old_speech, L_TOTAL - L_FRAME);

+	Copy(st->old_wsp, old_wsp, PIT_MAX / OPL_DECIM);

+	Copy(st->old_exc, old_exc, PIT_MAX + L_INTERPOL);

+

+	/*---------------------------------------------------------------*

+	 * Down sampling signal from 16kHz to 12.8kHz                    *

+	 * -> The signal is extended by L_FILT samples (padded to zero)  *

+	 * to avoid additional delay (L_FILT samples) in the coder.      *

+	 * The last L_FILT samples are approximated after decimation and *

+	 * are used (and windowed) only in autocorrelations.             *

+	 *---------------------------------------------------------------*/

+

+	Decim_12k8(speech16k, L_FRAME16k, new_speech, st->mem_decim);

+

+	/* last L_FILT samples for autocorrelation window */

+	Copy(st->mem_decim, code, 2 * L_FILT16k);

+	Set_zero(error, L_FILT16k);            /* set next sample to zero */

+	Decim_12k8(error, L_FILT16k, new_speech + L_FRAME, code);

+

+	/*---------------------------------------------------------------*

+	 * Perform 50Hz HP filtering of input signal.                    *

+	 *---------------------------------------------------------------*/

+

+	HP50_12k8(new_speech, L_FRAME, st->mem_sig_in);

+

+	/* last L_FILT samples for autocorrelation window */

+	Copy(st->mem_sig_in, code, 6);

+	HP50_12k8(new_speech + L_FRAME, L_FILT, code);

+

+	/*---------------------------------------------------------------*

+	 * Perform fixed preemphasis through 1 - g z^-1                  *

+	 * Scale signal to get maximum of precision in filtering         *

+	 *---------------------------------------------------------------*/

+

+	mu = PREEMPH_FAC >> 1;              /* Q15 --> Q14 */

+

+	/* get max of new preemphased samples (L_FRAME+L_FILT) */

+	L_tmp = new_speech[0] << 15;

+	L_tmp -= (st->mem_preemph * mu)<<1;

+	L_max = L_abs(L_tmp);

+

+	for (i = 1; i < L_FRAME + L_FILT; i++)

+	{

+		L_tmp = new_speech[i] << 15;

+		L_tmp -= (new_speech[i - 1] * mu)<<1;

+		L_tmp = L_abs(L_tmp);

+		if(L_tmp > L_max)

+		{

+			L_max = L_tmp;                 

+		}

+	}

+

+	/* get scaling factor for new and previous samples */

+	/* limit scaling to Q_MAX to keep dynamic for ringing in low signal */

+	/* limit scaling to Q_MAX also to avoid a[0]<1 in syn_filt_32 */

+	tmp = extract_h(L_max);

+	if (tmp == 0)

+	{

+		shift = Q_MAX;                     

+	} else

+	{

+		shift = norm_s(tmp) - 1;

+		if (shift < 0)

+		{

+			shift = 0;                     

+		}

+		if (shift > Q_MAX)

+		{

+			shift = Q_MAX;                 

+		}

+	}

+	Q_new = shift;                         

+	if (Q_new > st->Q_max[0])

+	{

+		Q_new = st->Q_max[0];              

+	}

+	if (Q_new > st->Q_max[1])

+	{

+		Q_new = st->Q_max[1];              

+	}

+	exp = (Q_new - st->Q_old);

+	st->Q_old = Q_new;                     

+	st->Q_max[1] = st->Q_max[0];           

+	st->Q_max[0] = shift;                  

+

+	/* preemphasis with scaling (L_FRAME+L_FILT) */

+	tmp = new_speech[L_FRAME - 1];         

+

+	for (i = L_FRAME + L_FILT - 1; i > 0; i--)

+	{

+		L_tmp = new_speech[i] << 15;

+		L_tmp -= (new_speech[i - 1] * mu)<<1;

+		L_tmp = (L_tmp << Q_new);

+		new_speech[i] = vo_round(L_tmp);      

+	}

+

+	L_tmp = new_speech[0] << 15;

+	L_tmp -= (st->mem_preemph * mu)<<1;

+	L_tmp = (L_tmp << Q_new);

+	new_speech[0] = vo_round(L_tmp);          

+

+	st->mem_preemph = tmp;                 

+

+	/* scale previous samples and memory */

+

+	Scale_sig(old_speech, L_TOTAL - L_FRAME - L_FILT, exp);

+	Scale_sig(old_exc, PIT_MAX + L_INTERPOL, exp);

+	Scale_sig(st->mem_syn, M, exp);

+	Scale_sig(st->mem_decim2, 3, exp);

+	Scale_sig(&(st->mem_wsp), 1, exp);

+	Scale_sig(&(st->mem_w0), 1, exp);

+

+	/*------------------------------------------------------------------------*

+	 *  Call VAD                                                              *

+	 *  Preemphesis scale down signal in low frequency and keep dynamic in HF.*

+	 *  Vad work slightly in futur (new_speech = speech + L_NEXT - L_FILT).   *

+	 *------------------------------------------------------------------------*/

+	Copy(new_speech, buf, L_FRAME);

+

+#ifdef ASM_OPT        /* asm optimization branch */

+	Scale_sig_opt(buf, L_FRAME, 1 - Q_new);

+#else

+	Scale_sig(buf, L_FRAME, 1 - Q_new);

+#endif

+

+	vad_flag = wb_vad(st->vadSt, buf);          /* Voice Activity Detection */ 

+	if (vad_flag == 0)

+	{

+		st->vad_hist = (st->vad_hist + 1);        

+	} else

+	{

+		st->vad_hist = 0;             

+	}

+

+	/* DTX processing */

+	if (allow_dtx != 0)

+	{

+		/* Note that mode may change here */

+		tx_dtx_handler(st->dtx_encSt, vad_flag, mode);

+		*ser_size = nb_of_bits[*mode]; 

+	}

+

+	if(*mode != MRDTX)

+	{

+		Parm_serial(vad_flag, 1, &prms);

+	}

+	/*------------------------------------------------------------------------*

+	 *  Perform LPC analysis                                                  *

+	 *  ~~~~~~~~~~~~~~~~~~~~                                                  *

+	 *   - autocorrelation + lag windowing                                    *

+	 *   - Levinson-durbin algorithm to find a[]                              *

+	 *   - convert a[] to isp[]                                               *

+	 *   - convert isp[] to isf[] for quantization                            *

+	 *   - quantize and code the isf[]                                        *

+	 *   - convert isf[] to isp[] for interpolation                           *

+	 *   - find the interpolated ISPs and convert to a[] for the 4 subframes  *

+	 *------------------------------------------------------------------------*/

+

+	/* LP analysis centered at 4nd subframe */

+	Autocorr(p_window, M, r_h, r_l);                        /* Autocorrelations */

+	Lag_window(r_h, r_l);                                   /* Lag windowing    */

+	Levinson(r_h, r_l, A, rc, st->mem_levinson);            /* Levinson Durbin  */

+	Az_isp(A, ispnew, st->ispold);                          /* From A(z) to ISP */

+

+	/* Find the interpolated ISPs and convert to a[] for all subframes */

+	Int_isp(st->ispold, ispnew, interpol_frac, A);

+

+	/* update ispold[] for the next frame */

+	Copy(ispnew, st->ispold, M);

+

+	/* Convert ISPs to frequency domain 0..6400 */

+	Isp_isf(ispnew, isf, M);

+

+	/* check resonance for pitch clipping algorithm */

+	Gp_clip_test_isf(isf, st->gp_clip);

+

+	/*----------------------------------------------------------------------*

+	 *  Perform PITCH_OL analysis                                           *

+	 *  ~~~~~~~~~~~~~~~~~~~~~~~~~                                           *

+	 * - Find the residual res[] for the whole speech frame                 *

+	 * - Find the weighted input speech wsp[] for the whole speech frame    *

+	 * - scale wsp[] to avoid overflow in pitch estimation                  *

+	 * - Find open loop pitch lag for whole speech frame                    *

+	 *----------------------------------------------------------------------*/

+	p_A = A;                             

+	for (i_subfr = 0; i_subfr < L_FRAME; i_subfr += L_SUBFR)

+	{

+		/* Weighting of LPC coefficients */

+		Weight_a(p_A, Ap, GAMMA1, M);

+

+#ifdef ASM_OPT                    /* asm optimization branch */

+		Residu_opt(Ap, &speech[i_subfr], &wsp[i_subfr], L_SUBFR);

+#else

+		Residu(Ap, &speech[i_subfr], &wsp[i_subfr], L_SUBFR);

+#endif

+

+		p_A += (M + 1);                    

+	}

+

+	Deemph2(wsp, TILT_FAC, L_FRAME, &(st->mem_wsp));

+

+	/* find maximum value on wsp[] for 12 bits scaling */

+	max = 0;                              

+	for (i = 0; i < L_FRAME; i++)

+	{

+		tmp = abs_s(wsp[i]);

+		if(tmp > max)

+		{

+			max = tmp;                     

+		}

+	}

+	tmp = st->old_wsp_max;                 

+	if(max > tmp)

+	{

+		tmp = max;                         /* tmp = max(wsp_max, old_wsp_max) */

+	}

+	st->old_wsp_max = max;                

+

+	shift = norm_s(tmp) - 3;

+	if (shift > 0)

+	{

+		shift = 0;                         /* shift = 0..-3 */

+	}

+	/* decimation of wsp[] to search pitch in LF and to reduce complexity */

+	LP_Decim2(wsp, L_FRAME, st->mem_decim2);

+

+	/* scale wsp[] in 12 bits to avoid overflow */

+#ifdef  ASM_OPT                  /* asm optimization branch */

+	Scale_sig_opt(wsp, L_FRAME / OPL_DECIM, shift);

+#else

+	Scale_sig(wsp, L_FRAME / OPL_DECIM, shift);

+#endif

+	/* scale old_wsp (warning: exp must be Q_new-Q_old) */

+	exp = exp + (shift - st->old_wsp_shift);

+	st->old_wsp_shift = shift;

+

+	Scale_sig(old_wsp, PIT_MAX / OPL_DECIM, exp);

+	Scale_sig(st->old_hp_wsp, PIT_MAX / OPL_DECIM, exp);

+

+	scale_mem_Hp_wsp(st->hp_wsp_mem, exp);

+

+	/* Find open loop pitch lag for whole speech frame */

+

+	if(*ser_size == NBBITS_7k)

+	{

+		/* Find open loop pitch lag for whole speech frame */

+		T_op = Pitch_med_ol(wsp, st, L_FRAME / OPL_DECIM);

+	} else

+	{

+		/* Find open loop pitch lag for first 1/2 frame */

+		T_op = Pitch_med_ol(wsp, st, (L_FRAME/2) / OPL_DECIM);

+	}

+

+	if(st->ol_gain > 19661)       /* 0.6 in Q15 */

+	{

+		st->old_T0_med = Med_olag(T_op, st->old_ol_lag);       

+		st->ada_w = 32767;                 

+	} else

+	{

+		st->ada_w = vo_mult(st->ada_w, 29491);

+	}

+

+	if(st->ada_w < 26214)

+		st->ol_wght_flg = 0;

+	else

+		st->ol_wght_flg = 1;

+

+	wb_vad_tone_detection(st->vadSt, st->ol_gain);

+	T_op *= OPL_DECIM;                     

+

+	if(*ser_size != NBBITS_7k)

+	{

+		/* Find open loop pitch lag for second 1/2 frame */

+		T_op2 = Pitch_med_ol(wsp + ((L_FRAME / 2) / OPL_DECIM), st, (L_FRAME/2) / OPL_DECIM);

+

+		if(st->ol_gain > 19661)   /* 0.6 in Q15 */

+		{

+			st->old_T0_med = Med_olag(T_op2, st->old_ol_lag);  

+			st->ada_w = 32767;             

+		} else

+		{

+			st->ada_w = mult(st->ada_w, 29491); 

+		}

+

+		if(st->ada_w < 26214)

+			st->ol_wght_flg = 0;

+		else

+			st->ol_wght_flg = 1;

+

+		wb_vad_tone_detection(st->vadSt, st->ol_gain);

+

+		T_op2 *= OPL_DECIM;                

+

+	} else

+	{

+		T_op2 = T_op;                      

+	}

+	/*----------------------------------------------------------------------*

+	 *                              DTX-CNG                                 *

+	 *----------------------------------------------------------------------*/

+	if(*mode == MRDTX)            /* CNG mode */

+	{

+		/* Buffer isf's and energy */

+#ifdef ASM_OPT                   /* asm optimization branch */

+		Residu_opt(&A[3 * (M + 1)], speech, exc, L_FRAME);

+#else

+		Residu(&A[3 * (M + 1)], speech, exc, L_FRAME);

+#endif

+

+		for (i = 0; i < L_FRAME; i++)

+		{

+			exc2[i] = shr(exc[i], Q_new);  

+		}

+

+		L_tmp = 0;                         

+		for (i = 0; i < L_FRAME; i++)

+			L_tmp += (exc2[i] * exc2[i])<<1;

+

+		L_tmp >>= 1;

+

+		dtx_buffer(st->dtx_encSt, isf, L_tmp, codec_mode);

+

+		/* Quantize and code the ISFs */

+		dtx_enc(st->dtx_encSt, isf, exc2, &prms);

+

+		/* Convert ISFs to the cosine domain */

+		Isf_isp(isf, ispnew_q, M);

+		Isp_Az(ispnew_q, Aq, M, 0);

+

+		for (i_subfr = 0; i_subfr < L_FRAME; i_subfr += L_SUBFR)

+		{

+			corr_gain = synthesis(Aq, &exc2[i_subfr], 0, &speech16k[i_subfr * 5 / 4], st);

+		}

+		Copy(isf, st->isfold, M);

+

+		/* reset speech coder memories */

+		Reset_encoder(st, 0);

+

+		/*--------------------------------------------------*

+		 * Update signal for next frame.                    *

+		 * -> save past of speech[] and wsp[].              *

+		 *--------------------------------------------------*/

+

+		Copy(&old_speech[L_FRAME], st->old_speech, L_TOTAL - L_FRAME);

+		Copy(&old_wsp[L_FRAME / OPL_DECIM], st->old_wsp, PIT_MAX / OPL_DECIM);

+

+		return;

+	}

+	/*----------------------------------------------------------------------*

+	 *                               ACELP                                  *

+	 *----------------------------------------------------------------------*/

+

+	/* Quantize and code the ISFs */

+

+	if (*ser_size <= NBBITS_7k)

+	{

+		Qpisf_2s_36b(isf, isf, st->past_isfq, indice, 4);

+

+		Parm_serial(indice[0], 8, &prms);

+		Parm_serial(indice[1], 8, &prms);

+		Parm_serial(indice[2], 7, &prms);

+		Parm_serial(indice[3], 7, &prms);

+		Parm_serial(indice[4], 6, &prms);

+	} else

+	{

+		Qpisf_2s_46b(isf, isf, st->past_isfq, indice, 4);

+

+		Parm_serial(indice[0], 8, &prms);

+		Parm_serial(indice[1], 8, &prms);

+		Parm_serial(indice[2], 6, &prms);

+		Parm_serial(indice[3], 7, &prms);

+		Parm_serial(indice[4], 7, &prms);

+		Parm_serial(indice[5], 5, &prms);

+		Parm_serial(indice[6], 5, &prms);

+	}

+

+	/* Check stability on isf : distance between old isf and current isf */

+

+	L_tmp = 0;                           

+	for (i = 0; i < M - 1; i++)

+	{

+		tmp = vo_sub(isf[i], st->isfold[i]);

+		L_tmp += (tmp * tmp)<<1;

+	}

+

+	tmp = extract_h(L_shl2(L_tmp, 8)); 

+

+	tmp = vo_mult(tmp, 26214);                /* tmp = L_tmp*0.8/256 */

+	tmp = vo_sub(20480, tmp);                 /* 1.25 - tmp (in Q14) */

+

+	stab_fac = shl(tmp, 1); 

+

+	if (stab_fac < 0)

+	{

+		stab_fac = 0;                      

+	}

+	Copy(isf, st->isfold, M);

+

+	/* Convert ISFs to the cosine domain */

+	Isf_isp(isf, ispnew_q, M);

+

+	if (st->first_frame != 0)

+	{

+		st->first_frame = 0;              

+		Copy(ispnew_q, st->ispold_q, M);

+	}

+	/* Find the interpolated ISPs and convert to a[] for all subframes */

+

+	Int_isp(st->ispold_q, ispnew_q, interpol_frac, Aq);

+

+	/* update ispold[] for the next frame */

+	Copy(ispnew_q, st->ispold_q, M);

+

+	p_Aq = Aq;

+	for (i_subfr = 0; i_subfr < L_FRAME; i_subfr += L_SUBFR)

+	{

+#ifdef ASM_OPT               /* asm optimization branch */

+		Residu_opt(p_Aq, &speech[i_subfr], &exc[i_subfr], L_SUBFR);

+#else

+		Residu(p_Aq, &speech[i_subfr], &exc[i_subfr], L_SUBFR);

+#endif

+		p_Aq += (M + 1);                   

+	}

+

+	/* Buffer isf's and energy for dtx on non-speech frame */

+	if (vad_flag == 0)

+	{

+		for (i = 0; i < L_FRAME; i++)

+		{

+			exc2[i] = exc[i] >> Q_new;

+		}

+		L_tmp = 0;                         

+		for (i = 0; i < L_FRAME; i++)

+			L_tmp += (exc2[i] * exc2[i])<<1;

+		L_tmp >>= 1;

+

+		dtx_buffer(st->dtx_encSt, isf, L_tmp, codec_mode);

+	}

+	/* range for closed loop pitch search in 1st subframe */

+

+	T0_min = T_op - 8;

+	if (T0_min < PIT_MIN)

+	{

+		T0_min = PIT_MIN;                  

+	}

+	T0_max = (T0_min + 15);

+

+	if(T0_max > PIT_MAX)

+	{

+		T0_max = PIT_MAX;                  

+		T0_min = T0_max - 15;          

+	}

+	/*------------------------------------------------------------------------*

+	 *          Loop for every subframe in the analysis frame                 *

+	 *------------------------------------------------------------------------*

+	 *  To find the pitch and innovation parameters. The subframe size is     *

+	 *  L_SUBFR and the loop is repeated L_FRAME/L_SUBFR times.               *

+	 *     - compute the target signal for pitch search                       *

+	 *     - compute impulse response of weighted synthesis filter (h1[])     *

+	 *     - find the closed-loop pitch parameters                            *

+	 *     - encode the pitch dealy                                           *

+	 *     - find 2 lt prediction (with / without LP filter for lt pred)      *

+	 *     - find 2 pitch gains and choose the best lt prediction.            *

+	 *     - find target vector for codebook search                           *

+	 *     - update the impulse response h1[] for codebook search             *

+	 *     - correlation between target vector and impulse response           *

+	 *     - codebook search and encoding                                     *

+	 *     - VQ of pitch and codebook gains                                   *

+	 *     - find voicing factor and tilt of code for next subframe.          *

+	 *     - update states of weighting filter                                *

+	 *     - find excitation and synthesis speech                             *

+	 *------------------------------------------------------------------------*/

+	p_A = A;                               

+	p_Aq = Aq;                             

+	for (i_subfr = 0; i_subfr < L_FRAME; i_subfr += L_SUBFR)

+	{

+		pit_flag = i_subfr;                

+		if ((i_subfr == 2 * L_SUBFR) && (*ser_size > NBBITS_7k))

+		{

+			pit_flag = 0;                 

+			/* range for closed loop pitch search in 3rd subframe */

+			T0_min = (T_op2 - 8);

+

+			if (T0_min < PIT_MIN)

+			{

+				T0_min = PIT_MIN;          

+			}

+			T0_max = (T0_min + 15);

+			if (T0_max > PIT_MAX)

+			{

+				T0_max = PIT_MAX;         

+				T0_min = (T0_max - 15);

+			}

+		}

+		/*-----------------------------------------------------------------------*

+		 *                                                                       *

+		 *        Find the target vector for pitch search:                       *

+		 *        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~                        *

+		 *                                                                       *

+		 *             |------|  res[n]                                          *

+		 * speech[n]---| A(z) |--------                                          *

+		 *             |------|       |   |--------| error[n]  |------|          *

+		 *                   zero -- (-)--| 1/A(z) |-----------| W(z) |-- target *

+		 *                   exc          |--------|           |------|          *

+		 *                                                                       *

+		 * Instead of subtracting the zero-input response of filters from        *

+		 * the weighted input speech, the above configuration is used to         *

+		 * compute the target vector.                                            *

+		 *                                                                       *

+		 *-----------------------------------------------------------------------*/

+

+		for (i = 0; i < M; i++)

+		{

+			error[i] = vo_sub(speech[i + i_subfr - M], st->mem_syn[i]);

+		}

+

+#ifdef ASM_OPT              /* asm optimization branch */

+		Residu_opt(p_Aq, &speech[i_subfr], &exc[i_subfr], L_SUBFR);

+#else

+		Residu(p_Aq, &speech[i_subfr], &exc[i_subfr], L_SUBFR);

+#endif

+		Syn_filt(p_Aq, &exc[i_subfr], error + M, L_SUBFR, error, 0);

+		Weight_a(p_A, Ap, GAMMA1, M);

+

+#ifdef ASM_OPT             /* asm optimization branch */

+		Residu_opt(Ap, error + M, xn, L_SUBFR);

+#else

+		Residu(Ap, error + M, xn, L_SUBFR);

+#endif

+		Deemph2(xn, TILT_FAC, L_SUBFR, &(st->mem_w0));

+

+		/*----------------------------------------------------------------------*

+		 * Find approx. target in residual domain "cn[]" for inovation search.  *

+		 *----------------------------------------------------------------------*/

+		/* first half: xn[] --> cn[] */

+		Set_zero(code, M);

+		Copy(xn, code + M, L_SUBFR / 2);

+		tmp = 0;                          

+		Preemph2(code + M, TILT_FAC, L_SUBFR / 2, &tmp);

+		Weight_a(p_A, Ap, GAMMA1, M);

+		Syn_filt(Ap,code + M, code + M, L_SUBFR / 2, code, 0);

+

+#ifdef ASM_OPT                /* asm optimization branch */

+		Residu_opt(p_Aq,code + M, cn, L_SUBFR / 2);

+#else

+		Residu(p_Aq,code + M, cn, L_SUBFR / 2);

+#endif

+

+		/* second half: res[] --> cn[] (approximated and faster) */

+		Copy(&exc[i_subfr + (L_SUBFR / 2)], cn + (L_SUBFR / 2), L_SUBFR / 2);

+

+		/*---------------------------------------------------------------*

+		 * Compute impulse response, h1[], of weighted synthesis filter  * 

+		 *---------------------------------------------------------------*/

+

+		Set_zero(error, M + L_SUBFR);

+		Weight_a(p_A, error + M, GAMMA1, M);

+

+		vo_p0 = error+M;

+		vo_p3 = h1;

+		for (i = 0; i < L_SUBFR; i++)

+		{

+			L_tmp = *vo_p0 << 14;        /* x4 (Q12 to Q14) */

+			vo_p1 = p_Aq + 1;

+			vo_p2 = vo_p0-1;

+			for (j = 1; j <= M/4; j++)

+			{

+				L_tmp -= *vo_p1++ * *vo_p2--;

+				L_tmp -= *vo_p1++ * *vo_p2--;

+				L_tmp -= *vo_p1++ * *vo_p2--;

+				L_tmp -= *vo_p1++ * *vo_p2--;

+			}

+			*vo_p3++ = *vo_p0++ = vo_round((L_tmp <<4));

+		}

+		/* deemph without division by 2 -> Q14 to Q15 */

+		tmp = 0; 

+		Deemph2(h1, TILT_FAC, L_SUBFR, &tmp);   /* h1 in Q14 */

+

+		/* h2 in Q12 for codebook search */

+		Copy(h1, h2, L_SUBFR);

+

+		/*---------------------------------------------------------------*

+		 * scale xn[] and h1[] to avoid overflow in dot_product12()      *

+		 *---------------------------------------------------------------*/

+#ifdef  ASM_OPT                  /* asm optimization branch */

+		Scale_sig_opt(h2, L_SUBFR, -2);

+		Scale_sig_opt(xn, L_SUBFR, shift);     /* scaling of xn[] to limit dynamic at 12 bits */

+		Scale_sig_opt(h1, L_SUBFR, 1 + shift);  /* set h1[] in Q15 with scaling for convolution */

+#else

+		Scale_sig(h2, L_SUBFR, -2);

+		Scale_sig(xn, L_SUBFR, shift);     /* scaling of xn[] to limit dynamic at 12 bits */

+		Scale_sig(h1, L_SUBFR, 1 + shift);  /* set h1[] in Q15 with scaling for convolution */

+#endif

+		/*----------------------------------------------------------------------*

+		 *                 Closed-loop fractional pitch search                  *

+		 *----------------------------------------------------------------------*/

+		/* find closed loop fractional pitch  lag */

+		if(*ser_size <= NBBITS_9k)

+		{

+			T0 = Pitch_fr4(&exc[i_subfr], xn, h1, T0_min, T0_max, &T0_frac,

+					pit_flag, PIT_MIN, PIT_FR1_8b, L_SUBFR);

+

+			/* encode pitch lag */

+			if (pit_flag == 0)             /* if 1st/3rd subframe */

+			{

+				/*--------------------------------------------------------------*

+				 * The pitch range for the 1st/3rd subframe is encoded with     *

+				 * 8 bits and is divided as follows:                            *

+				 *   PIT_MIN to PIT_FR1-1  resolution 1/2 (frac = 0 or 2)       *

+				 *   PIT_FR1 to PIT_MAX    resolution 1   (frac = 0)            *

+				 *--------------------------------------------------------------*/

+				if (T0 < PIT_FR1_8b)

+				{

+					index = ((T0 << 1) + (T0_frac >> 1) - (PIT_MIN<<1));

+				} else

+				{

+					index = ((T0 - PIT_FR1_8b) + ((PIT_FR1_8b - PIT_MIN)*2));

+				}

+

+				Parm_serial(index, 8, &prms);

+

+				/* find T0_min and T0_max for subframe 2 and 4 */

+				T0_min = (T0 - 8);

+				if (T0_min < PIT_MIN)

+				{

+					T0_min = PIT_MIN;

+				}

+				T0_max = T0_min + 15;

+				if (T0_max > PIT_MAX)

+				{

+					T0_max = PIT_MAX;

+					T0_min = (T0_max - 15);

+				}

+			} else

+			{                              /* if subframe 2 or 4 */

+				/*--------------------------------------------------------------*

+				 * The pitch range for subframe 2 or 4 is encoded with 5 bits:  *

+				 *   T0_min  to T0_max     resolution 1/2 (frac = 0 or 2)       *

+				 *--------------------------------------------------------------*/

+				i = (T0 - T0_min);

+				index = (i << 1) + (T0_frac >> 1);

+

+				Parm_serial(index, 5, &prms);

+			}

+		} else

+		{

+			T0 = Pitch_fr4(&exc[i_subfr], xn, h1, T0_min, T0_max, &T0_frac,

+					pit_flag, PIT_FR2, PIT_FR1_9b, L_SUBFR);

+

+			/* encode pitch lag */

+			if (pit_flag == 0)             /* if 1st/3rd subframe */

+			{

+				/*--------------------------------------------------------------*

+				 * The pitch range for the 1st/3rd subframe is encoded with     *

+				 * 9 bits and is divided as follows:                            *

+				 *   PIT_MIN to PIT_FR2-1  resolution 1/4 (frac = 0,1,2 or 3)   *

+				 *   PIT_FR2 to PIT_FR1-1  resolution 1/2 (frac = 0 or 1)       *

+				 *   PIT_FR1 to PIT_MAX    resolution 1   (frac = 0)            *

+				 *--------------------------------------------------------------*/

+

+				if (T0 < PIT_FR2)

+				{

+					index = ((T0 << 2) + T0_frac) - (PIT_MIN << 2);

+				} else if(T0 < PIT_FR1_9b)

+				{

+					index = ((((T0 << 1) + (T0_frac >> 1)) - (PIT_FR2<<1)) + ((PIT_FR2 - PIT_MIN)<<2));

+				} else

+				{

+					index = (((T0 - PIT_FR1_9b) + ((PIT_FR2 - PIT_MIN)<<2)) + ((PIT_FR1_9b - PIT_FR2)<<1));

+				}

+

+				Parm_serial(index, 9, &prms);

+

+				/* find T0_min and T0_max for subframe 2 and 4 */

+

+				T0_min = (T0 - 8);

+				if (T0_min < PIT_MIN)

+				{

+					T0_min = PIT_MIN; 

+				}

+				T0_max = T0_min + 15;

+

+				if (T0_max > PIT_MAX)

+				{

+					T0_max = PIT_MAX;

+					T0_min = (T0_max - 15);

+				}

+			} else

+			{                              /* if subframe 2 or 4 */

+				/*--------------------------------------------------------------*

+				 * The pitch range for subframe 2 or 4 is encoded with 6 bits:  *

+				 *   T0_min  to T0_max     resolution 1/4 (frac = 0,1,2 or 3)   *

+				 *--------------------------------------------------------------*/

+				i = (T0 - T0_min);

+				index = (i << 2) + T0_frac;

+				Parm_serial(index, 6, &prms);

+			}

+		}

+

+		/*-----------------------------------------------------------------*

+		 * Gain clipping test to avoid unstable synthesis on frame erasure *

+		 *-----------------------------------------------------------------*/

+

+		clip_gain = 0;

+		if((st->gp_clip[0] < 154) && (st->gp_clip[1] > 14746))

+			clip_gain = 1;

+

+		/*-----------------------------------------------------------------*

+		 * - find unity gain pitch excitation (adaptive codebook entry)    *

+		 *   with fractional interpolation.                                *

+		 * - find filtered pitch exc. y1[]=exc[] convolved with h1[])      *

+		 * - compute pitch gain1                                           *

+		 *-----------------------------------------------------------------*/

+		/* find pitch exitation */

+#ifdef ASM_OPT                  /* asm optimization branch */

+		pred_lt4_asm(&exc[i_subfr], T0, T0_frac, L_SUBFR + 1);

+#else

+		Pred_lt4(&exc[i_subfr], T0, T0_frac, L_SUBFR + 1);

+#endif

+		if (*ser_size > NBBITS_9k)

+		{

+#ifdef ASM_OPT                   /* asm optimization branch */

+			Convolve_asm(&exc[i_subfr], h1, y1, L_SUBFR);

+#else

+			Convolve(&exc[i_subfr], h1, y1, L_SUBFR);

+#endif 

+			gain1 = G_pitch(xn, y1, g_coeff, L_SUBFR);

+			/* clip gain if necessary to avoid problem at decoder */

+			if ((clip_gain != 0) && (gain1 > GP_CLIP))

+			{

+				gain1 = GP_CLIP; 

+			}

+			/* find energy of new target xn2[] */

+			Updt_tar(xn, dn, y1, gain1, L_SUBFR);       /* dn used temporary */

+		} else

+		{

+			gain1 = 0; 

+		}

+		/*-----------------------------------------------------------------*

+		 * - find pitch excitation filtered by 1st order LP filter.        *

+		 * - find filtered pitch exc. y2[]=exc[] convolved with h1[])      *

+		 * - compute pitch gain2                                           *

+		 *-----------------------------------------------------------------*/

+		/* find pitch excitation with lp filter */

+		vo_p0 = exc + i_subfr-1;

+		vo_p1 = code;

+		/* find pitch excitation with lp filter */

+		for (i = 0; i < L_SUBFR/2; i++)

+		{

+			L_tmp = 5898 * *vo_p0++;

+			L_tmp1 = 5898 * *vo_p0;

+			L_tmp += 20972 * *vo_p0++;

+			L_tmp1 += 20972 * *vo_p0++;

+			L_tmp1 += 5898 * *vo_p0--;

+			L_tmp += 5898 * *vo_p0;

+			*vo_p1++ = (L_tmp + 0x4000)>>15;

+			*vo_p1++ = (L_tmp1 + 0x4000)>>15;

+		}

+

+#ifdef ASM_OPT                 /* asm optimization branch */

+		Convolve_asm(code, h1, y2, L_SUBFR);

+#else

+		Convolve(code, h1, y2, L_SUBFR);

+#endif 

+

+		gain2 = G_pitch(xn, y2, g_coeff2, L_SUBFR);

+

+		/* clip gain if necessary to avoid problem at decoder */

+		if ((clip_gain != 0) && (gain2 > GP_CLIP))

+		{

+			gain2 = GP_CLIP;

+		}

+		/* find energy of new target xn2[] */

+		Updt_tar(xn, xn2, y2, gain2, L_SUBFR);

+		/*-----------------------------------------------------------------*

+		 * use the best prediction (minimise quadratic error).             *

+		 *-----------------------------------------------------------------*/

+		select = 0; 

+		if(*ser_size > NBBITS_9k)

+		{

+			L_tmp = 0L;

+			vo_p0 = dn;

+			vo_p1 = xn2;

+			for (i = 0; i < L_SUBFR/2; i++)

+			{

+				L_tmp += *vo_p0 * *vo_p0;

+				vo_p0++;

+				L_tmp -= *vo_p1 * *vo_p1;

+				vo_p1++;

+				L_tmp += *vo_p0 * *vo_p0;

+				vo_p0++;

+				L_tmp -= *vo_p1 * *vo_p1;

+				vo_p1++;

+			}

+

+			if (L_tmp <= 0)

+			{

+				select = 1; 

+			}

+			Parm_serial(select, 1, &prms);

+		}

+		if (select == 0)

+		{

+			/* use the lp filter for pitch excitation prediction */

+			gain_pit = gain2;

+			Copy(code, &exc[i_subfr], L_SUBFR);

+			Copy(y2, y1, L_SUBFR);

+			Copy(g_coeff2, g_coeff, 4);

+		} else

+		{

+			/* no filter used for pitch excitation prediction */

+			gain_pit = gain1;

+			Copy(dn, xn2, L_SUBFR);        /* target vector for codebook search */

+		}

+		/*-----------------------------------------------------------------*

+		 * - update cn[] for codebook search                               *

+		 *-----------------------------------------------------------------*/

+		Updt_tar(cn, cn, &exc[i_subfr], gain_pit, L_SUBFR);

+

+#ifdef  ASM_OPT                           /* asm optimization branch */

+		Scale_sig_opt(cn, L_SUBFR, shift);     /* scaling of cn[] to limit dynamic at 12 bits */

+#else

+		Scale_sig(cn, L_SUBFR, shift);     /* scaling of cn[] to limit dynamic at 12 bits */

+#endif

+		/*-----------------------------------------------------------------*

+		 * - include fixed-gain pitch contribution into impulse resp. h1[] *

+		 *-----------------------------------------------------------------*/

+		tmp = 0;

+		Preemph(h2, st->tilt_code, L_SUBFR, &tmp);

+

+		if (T0_frac > 2)

+			T0 = (T0 + 1);

+		Pit_shrp(h2, T0, PIT_SHARP, L_SUBFR);

+		/*-----------------------------------------------------------------*

+		 * - Correlation between target xn2[] and impulse response h1[]    *

+		 * - Innovative codebook search                                    *

+		 *-----------------------------------------------------------------*/

+		cor_h_x(h2, xn2, dn);

+		if (*ser_size <= NBBITS_7k)

+		{

+			ACELP_2t64_fx(dn, cn, h2, code, y2, indice);

+

+			Parm_serial(indice[0], 12, &prms);

+		} else if(*ser_size <= NBBITS_9k)

+		{

+			ACELP_4t64_fx(dn, cn, h2, code, y2, 20, *ser_size, indice);

+

+			Parm_serial(indice[0], 5, &prms);

+			Parm_serial(indice[1], 5, &prms);

+			Parm_serial(indice[2], 5, &prms);

+			Parm_serial(indice[3], 5, &prms);

+		} else if(*ser_size <= NBBITS_12k)

+		{

+			ACELP_4t64_fx(dn, cn, h2, code, y2, 36, *ser_size, indice);

+

+			Parm_serial(indice[0], 9, &prms);

+			Parm_serial(indice[1], 9, &prms);

+			Parm_serial(indice[2], 9, &prms);

+			Parm_serial(indice[3], 9, &prms);

+		} else if(*ser_size <= NBBITS_14k)

+		{

+			ACELP_4t64_fx(dn, cn, h2, code, y2, 44, *ser_size, indice);

+

+			Parm_serial(indice[0], 13, &prms);

+			Parm_serial(indice[1], 13, &prms);

+			Parm_serial(indice[2], 9, &prms);

+			Parm_serial(indice[3], 9, &prms);

+		} else if(*ser_size <= NBBITS_16k)

+		{

+			ACELP_4t64_fx(dn, cn, h2, code, y2, 52, *ser_size, indice);

+

+			Parm_serial(indice[0], 13, &prms);

+			Parm_serial(indice[1], 13, &prms);

+			Parm_serial(indice[2], 13, &prms);

+			Parm_serial(indice[3], 13, &prms);

+		} else if(*ser_size <= NBBITS_18k)

+		{

+			ACELP_4t64_fx(dn, cn, h2, code, y2, 64, *ser_size, indice);

+

+			Parm_serial(indice[0], 2, &prms);

+			Parm_serial(indice[1], 2, &prms);

+			Parm_serial(indice[2], 2, &prms);

+			Parm_serial(indice[3], 2, &prms);

+			Parm_serial(indice[4], 14, &prms);

+			Parm_serial(indice[5], 14, &prms);

+			Parm_serial(indice[6], 14, &prms);

+			Parm_serial(indice[7], 14, &prms);

+		} else if(*ser_size <= NBBITS_20k)

+		{

+			ACELP_4t64_fx(dn, cn, h2, code, y2, 72, *ser_size, indice);

+

+			Parm_serial(indice[0], 10, &prms);

+			Parm_serial(indice[1], 10, &prms);

+			Parm_serial(indice[2], 2, &prms);

+			Parm_serial(indice[3], 2, &prms);

+			Parm_serial(indice[4], 10, &prms);

+			Parm_serial(indice[5], 10, &prms);

+			Parm_serial(indice[6], 14, &prms);

+			Parm_serial(indice[7], 14, &prms);

+		} else

+		{

+			ACELP_4t64_fx(dn, cn, h2, code, y2, 88, *ser_size, indice);

+

+			Parm_serial(indice[0], 11, &prms);

+			Parm_serial(indice[1], 11, &prms);

+			Parm_serial(indice[2], 11, &prms);

+			Parm_serial(indice[3], 11, &prms);

+			Parm_serial(indice[4], 11, &prms);

+			Parm_serial(indice[5], 11, &prms);

+			Parm_serial(indice[6], 11, &prms);

+			Parm_serial(indice[7], 11, &prms);

+		}

+		/*-------------------------------------------------------*

+		 * - Add the fixed-gain pitch contribution to code[].    *

+		 *-------------------------------------------------------*/

+		tmp = 0; 

+		Preemph(code, st->tilt_code, L_SUBFR, &tmp);

+		Pit_shrp(code, T0, PIT_SHARP, L_SUBFR);

+		/*----------------------------------------------------------*

+		 *  - Compute the fixed codebook gain                       *

+		 *  - quantize fixed codebook gain                          *

+		 *----------------------------------------------------------*/

+		if(*ser_size <= NBBITS_9k)

+		{

+			index = Q_gain2(xn, y1, Q_new + shift, y2, code, g_coeff, L_SUBFR, 6,

+					&gain_pit, &L_gain_code, clip_gain, st->qua_gain);

+			Parm_serial(index, 6, &prms);

+		} else

+		{

+			index = Q_gain2(xn, y1, Q_new + shift, y2, code, g_coeff, L_SUBFR, 7,

+					&gain_pit, &L_gain_code, clip_gain, st->qua_gain);

+			Parm_serial(index, 7, &prms);

+		}

+		/* test quantized gain of pitch for pitch clipping algorithm */

+		Gp_clip_test_gain_pit(gain_pit, st->gp_clip);

+

+		L_tmp = L_shl(L_gain_code, Q_new); 

+		gain_code = extract_h(L_add(L_tmp, 0x8000));

+

+		/*----------------------------------------------------------*

+		 * Update parameters for the next subframe.                 *

+		 * - tilt of code: 0.0 (unvoiced) to 0.5 (voiced)           *

+		 *----------------------------------------------------------*/

+		/* find voice factor in Q15 (1=voiced, -1=unvoiced) */

+		Copy(&exc[i_subfr], exc2, L_SUBFR);

+

+#ifdef ASM_OPT                           /* asm optimization branch */

+		Scale_sig_opt(exc2, L_SUBFR, shift);

+#else

+		Scale_sig(exc2, L_SUBFR, shift);

+#endif

+		voice_fac = voice_factor(exc2, shift, gain_pit, code, gain_code, L_SUBFR);

+		/* tilt of code for next subframe: 0.5=voiced, 0=unvoiced */

+		st->tilt_code = ((voice_fac >> 2) + 8192);

+		/*------------------------------------------------------*

+		 * - Update filter's memory "mem_w0" for finding the    *

+		 *   target vector in the next subframe.                *

+		 * - Find the total excitation                          *

+		 * - Find synthesis speech to update mem_syn[].         *

+		 *------------------------------------------------------*/

+

+		/* y2 in Q9, gain_pit in Q14 */

+		L_tmp = (gain_code * y2[L_SUBFR - 1])<<1;

+		L_tmp = L_shl(L_tmp, (5 + shift));

+		L_tmp = L_negate(L_tmp);

+		L_tmp += (xn[L_SUBFR - 1] * 16384)<<1;

+		L_tmp -= (y1[L_SUBFR - 1] * gain_pit)<<1;

+		L_tmp = L_shl(L_tmp, (1 - shift));

+		st->mem_w0 = extract_h(L_add(L_tmp, 0x8000));

+

+		if (*ser_size >= NBBITS_24k)

+			Copy(&exc[i_subfr], exc2, L_SUBFR);

+

+		for (i = 0; i < L_SUBFR; i++)

+		{

+			/* code in Q9, gain_pit in Q14 */

+			L_tmp = (gain_code * code[i])<<1;

+			L_tmp = (L_tmp << 5);

+			L_tmp += (exc[i + i_subfr] * gain_pit)<<1;

+			L_tmp = L_shl2(L_tmp, 1); 

+			exc[i + i_subfr] = extract_h(L_add(L_tmp, 0x8000));

+		}

+

+		Syn_filt(p_Aq,&exc[i_subfr], synth, L_SUBFR, st->mem_syn, 1);

+

+		if(*ser_size >= NBBITS_24k)

+		{

+			/*------------------------------------------------------------*

+			 * phase dispersion to enhance noise in low bit rate          *

+			 *------------------------------------------------------------*/

+			/* L_gain_code in Q16 */

+			VO_L_Extract(L_gain_code, &gain_code, &gain_code_lo);

+

+			/*------------------------------------------------------------*

+			 * noise enhancer                                             *

+			 * ~~~~~~~~~~~~~~                                             *

+			 * - Enhance excitation on noise. (modify gain of code)       *

+			 *   If signal is noisy and LPC filter is stable, move gain   *

+			 *   of code 1.5 dB toward gain of code threshold.            *

+			 *   This decrease by 3 dB noise energy variation.            *

+			 *------------------------------------------------------------*/

+			tmp = (16384 - (voice_fac >> 1));        /* 1=unvoiced, 0=voiced */

+			fac = vo_mult(stab_fac, tmp);

+			L_tmp = L_gain_code; 

+			if(L_tmp < st->L_gc_thres)

+			{

+				L_tmp = vo_L_add(L_tmp, Mpy_32_16(gain_code, gain_code_lo, 6226));

+				if(L_tmp > st->L_gc_thres)

+				{

+					L_tmp = st->L_gc_thres;

+				}

+			} else

+			{

+				L_tmp = Mpy_32_16(gain_code, gain_code_lo, 27536);

+				if(L_tmp < st->L_gc_thres)

+				{

+					L_tmp = st->L_gc_thres;

+				}

+			}

+			st->L_gc_thres = L_tmp;

+

+			L_gain_code = Mpy_32_16(gain_code, gain_code_lo, (32767 - fac));

+			VO_L_Extract(L_tmp, &gain_code, &gain_code_lo);

+			L_gain_code = vo_L_add(L_gain_code, Mpy_32_16(gain_code, gain_code_lo, fac));

+

+			/*------------------------------------------------------------*

+			 * pitch enhancer                                             *

+			 * ~~~~~~~~~~~~~~                                             *

+			 * - Enhance excitation on voice. (HP filtering of code)      *

+			 *   On voiced signal, filtering of code by a smooth fir HP   *

+			 *   filter to decrease energy of code in low frequency.      *

+			 *------------------------------------------------------------*/

+

+			tmp = ((voice_fac >> 3) + 4096); /* 0.25=voiced, 0=unvoiced */

+

+			L_tmp = L_deposit_h(code[0]);

+			L_tmp -= (code[1] * tmp)<<1;

+			code2[0] = vo_round(L_tmp); 

+

+			for (i = 1; i < L_SUBFR - 1; i++)

+			{

+				L_tmp = L_deposit_h(code[i]);

+				L_tmp -= (code[i + 1] * tmp)<<1;

+				L_tmp -= (code[i - 1] * tmp)<<1;

+				code2[i] = vo_round(L_tmp); 

+			}

+

+			L_tmp = L_deposit_h(code[L_SUBFR - 1]);

+			L_tmp -= (code[L_SUBFR - 2] * tmp)<<1;

+			code2[L_SUBFR - 1] = vo_round(L_tmp); 

+

+			/* build excitation */

+			gain_code = vo_round(L_shl(L_gain_code, Q_new));

+

+			for (i = 0; i < L_SUBFR; i++)

+			{

+				L_tmp = (code2[i] * gain_code)<<1;

+				L_tmp = (L_tmp << 5);

+				L_tmp += (exc2[i] * gain_pit)<<1;

+				L_tmp = (L_tmp << 1);

+				exc2[i] = vo_round(L_tmp);

+			}

+

+			corr_gain = synthesis(p_Aq, exc2, Q_new, &speech16k[i_subfr * 5 / 4], st);

+			Parm_serial(corr_gain, 4, &prms);

+		}

+		p_A += (M + 1);

+		p_Aq += (M + 1);

+	}                                      /* end of subframe loop */

+

+	/*--------------------------------------------------*

+	 * Update signal for next frame.                    *

+	 * -> save past of speech[], wsp[] and exc[].       *

+	 *--------------------------------------------------*/

+	Copy(&old_speech[L_FRAME], st->old_speech, L_TOTAL - L_FRAME);

+	Copy(&old_wsp[L_FRAME / OPL_DECIM], st->old_wsp, PIT_MAX / OPL_DECIM);

+	Copy(&old_exc[L_FRAME], st->old_exc, PIT_MAX + L_INTERPOL);

+	return;

+}

+

+/*-----------------------------------------------------*

+* Function synthesis()                                *

+*                                                     *

+* Synthesis of signal at 16kHz with HF extension.     *

+*                                                     *

+*-----------------------------------------------------*/

+

+static Word16 synthesis(

+		Word16 Aq[],                          /* A(z)  : quantized Az               */

+		Word16 exc[],                         /* (i)   : excitation at 12kHz        */

+		Word16 Q_new,                         /* (i)   : scaling performed on exc   */

+		Word16 synth16k[],                    /* (o)   : 16kHz synthesis signal     */

+		Coder_State * st                      /* (i/o) : State structure            */

+		)

+{

+	Word16 fac, tmp, exp;

+	Word16 ener, exp_ener;

+	Word32 L_tmp, i;

+

+	Word16 synth_hi[M + L_SUBFR], synth_lo[M + L_SUBFR];

+	Word16 synth[L_SUBFR];

+	Word16 HF[L_SUBFR16k];                 /* High Frequency vector      */

+	Word16 Ap[M + 1];

+

+	Word16 HF_SP[L_SUBFR16k];              /* High Frequency vector (from original signal) */

+

+	Word16 HP_est_gain, HP_calc_gain, HP_corr_gain;

+	Word16 dist_min, dist;

+	Word16 HP_gain_ind = 0;

+	Word16 gain1, gain2;

+	Word16 weight1, weight2;

+

+	/*------------------------------------------------------------*

+	 * speech synthesis                                           *

+	 * ~~~~~~~~~~~~~~~~                                           *

+	 * - Find synthesis speech corresponding to exc2[].           *

+	 * - Perform fixed deemphasis and hp 50hz filtering.          *

+	 * - Oversampling from 12.8kHz to 16kHz.                      *

+	 *------------------------------------------------------------*/

+	Copy(st->mem_syn_hi, synth_hi, M);

+	Copy(st->mem_syn_lo, synth_lo, M);

+

+#ifdef ASM_OPT                 /* asm optimization branch */

+	Syn_filt_32_asm(Aq, M, exc, Q_new, synth_hi + M, synth_lo + M, L_SUBFR);

+#else

+	Syn_filt_32(Aq, M, exc, Q_new, synth_hi + M, synth_lo + M, L_SUBFR);

+#endif

+

+	Copy(synth_hi + L_SUBFR, st->mem_syn_hi, M);

+	Copy(synth_lo + L_SUBFR, st->mem_syn_lo, M);

+

+#ifdef ASM_OPT                 /* asm optimization branch */

+	Deemph_32_asm(synth_hi + M, synth_lo + M, synth, &(st->mem_deemph));

+#else

+	Deemph_32(synth_hi + M, synth_lo + M, synth, PREEMPH_FAC, L_SUBFR, &(st->mem_deemph));

+#endif

+

+	HP50_12k8(synth, L_SUBFR, st->mem_sig_out);

+

+	/* Original speech signal as reference for high band gain quantisation */

+	for (i = 0; i < L_SUBFR16k; i++)

+	{

+		HF_SP[i] = synth16k[i]; 

+	}

+

+	/*------------------------------------------------------*

+	 * HF noise synthesis                                   *

+	 * ~~~~~~~~~~~~~~~~~~                                   *

+	 * - Generate HF noise between 5.5 and 7.5 kHz.         *

+	 * - Set energy of noise according to synthesis tilt.   *

+	 *     tilt > 0.8 ==> - 14 dB (voiced)                  *

+	 *     tilt   0.5 ==> - 6 dB  (voiced or noise)         *

+	 *     tilt < 0.0 ==>   0 dB  (noise)                   *

+	 *------------------------------------------------------*/

+	/* generate white noise vector */

+	for (i = 0; i < L_SUBFR16k; i++)

+	{

+		HF[i] = Random(&(st->seed2))>>3;

+	}

+	/* energy of excitation */

+#ifdef ASM_OPT                    /* asm optimization branch */

+	Scale_sig_opt(exc, L_SUBFR, -3);

+	Q_new = Q_new - 3;

+	ener = extract_h(Dot_product12_asm(exc, exc, L_SUBFR, &exp_ener));

+#else

+	Scale_sig(exc, L_SUBFR, -3);

+	Q_new = Q_new - 3;

+	ener = extract_h(Dot_product12(exc, exc, L_SUBFR, &exp_ener));

+#endif

+

+	exp_ener = exp_ener - (Q_new + Q_new);

+	/* set energy of white noise to energy of excitation */

+#ifdef ASM_OPT              /* asm optimization branch */

+	tmp = extract_h(Dot_product12_asm(HF, HF, L_SUBFR16k, &exp));

+#else

+	tmp = extract_h(Dot_product12(HF, HF, L_SUBFR16k, &exp));

+#endif

+

+	if(tmp > ener)

+	{

+		tmp = (tmp >> 1);                 /* Be sure tmp < ener */

+		exp = (exp + 1);

+	}

+	L_tmp = L_deposit_h(div_s(tmp, ener)); /* result is normalized */

+	exp = (exp - exp_ener);

+	Isqrt_n(&L_tmp, &exp);

+	L_tmp = L_shl(L_tmp, (exp + 1));       /* L_tmp x 2, L_tmp in Q31 */

+	tmp = extract_h(L_tmp);                /* tmp = 2 x sqrt(ener_exc/ener_hf) */

+

+	for (i = 0; i < L_SUBFR16k; i++)

+	{

+		HF[i] = vo_mult(HF[i], tmp);

+	}

+

+	/* find tilt of synthesis speech (tilt: 1=voiced, -1=unvoiced) */

+	HP400_12k8(synth, L_SUBFR, st->mem_hp400);

+

+	L_tmp = 1L;

+	for (i = 0; i < L_SUBFR; i++)

+		L_tmp += (synth[i] * synth[i])<<1;

+

+	exp = norm_l(L_tmp);

+	ener = extract_h(L_tmp << exp);   /* ener = r[0] */

+

+	L_tmp = 1L;

+	for (i = 1; i < L_SUBFR; i++)

+		L_tmp +=(synth[i] * synth[i - 1])<<1;

+

+	tmp = extract_h(L_tmp << exp);    /* tmp = r[1] */

+

+	if (tmp > 0)

+	{

+		fac = div_s(tmp, ener);

+	} else

+	{

+		fac = 0; 

+	}

+

+	/* modify energy of white noise according to synthesis tilt */

+	gain1 = 32767 - fac;

+	gain2 = vo_mult(gain1, 20480);

+	gain2 = shl(gain2, 1);

+

+	if (st->vad_hist > 0)

+	{

+		weight1 = 0;

+		weight2 = 32767;

+	} else

+	{

+		weight1 = 32767;

+		weight2 = 0;

+	}

+	tmp = vo_mult(weight1, gain1);

+	tmp = add1(tmp, vo_mult(weight2, gain2));

+

+	if (tmp != 0)

+	{

+		tmp = (tmp + 1);

+	}

+	HP_est_gain = tmp;

+

+	if(HP_est_gain < 3277)

+	{

+		HP_est_gain = 3277;                /* 0.1 in Q15 */

+	}

+	/* synthesis of noise: 4.8kHz..5.6kHz --> 6kHz..7kHz */

+	Weight_a(Aq, Ap, 19661, M);            /* fac=0.6 */

+

+#ifdef ASM_OPT                /* asm optimization branch */

+	Syn_filt_asm(Ap, HF, HF, st->mem_syn_hf);

+	/* noise High Pass filtering (1ms of delay) */

+	Filt_6k_7k_asm(HF, L_SUBFR16k, st->mem_hf);

+	/* filtering of the original signal */

+	Filt_6k_7k_asm(HF_SP, L_SUBFR16k, st->mem_hf2);

+

+	/* check the gain difference */

+	Scale_sig_opt(HF_SP, L_SUBFR16k, -1);

+	ener = extract_h(Dot_product12_asm(HF_SP, HF_SP, L_SUBFR16k, &exp_ener));

+	/* set energy of white noise to energy of excitation */

+	tmp = extract_h(Dot_product12_asm(HF, HF, L_SUBFR16k, &exp));

+#else

+	Syn_filt(Ap, HF, HF, L_SUBFR16k, st->mem_syn_hf, 1);

+	/* noise High Pass filtering (1ms of delay) */

+	Filt_6k_7k(HF, L_SUBFR16k, st->mem_hf);

+	/* filtering of the original signal */

+	Filt_6k_7k(HF_SP, L_SUBFR16k, st->mem_hf2);

+	/* check the gain difference */

+	Scale_sig(HF_SP, L_SUBFR16k, -1);

+	ener = extract_h(Dot_product12(HF_SP, HF_SP, L_SUBFR16k, &exp_ener));

+	/* set energy of white noise to energy of excitation */

+	tmp = extract_h(Dot_product12(HF, HF, L_SUBFR16k, &exp));

+#endif

+

+	if (tmp > ener)

+	{

+		tmp = (tmp >> 1);                 /* Be sure tmp < ener */

+		exp = (exp + 1);

+	}

+	L_tmp = L_deposit_h(div_s(tmp, ener)); /* result is normalized */

+	exp = vo_sub(exp, exp_ener);

+	Isqrt_n(&L_tmp, &exp);

+	L_tmp = L_shl(L_tmp, exp);             /* L_tmp, L_tmp in Q31 */

+	HP_calc_gain = extract_h(L_tmp);       /* tmp = sqrt(ener_input/ener_hf) */

+

+	/* st->gain_alpha *= st->dtx_encSt->dtxHangoverCount/7 */

+	L_tmp = (vo_L_mult(st->dtx_encSt->dtxHangoverCount, 4681) << 15);

+	st->gain_alpha = vo_mult(st->gain_alpha, extract_h(L_tmp));

+

+	if(st->dtx_encSt->dtxHangoverCount > 6)

+		st->gain_alpha = 32767;

+	HP_est_gain = HP_est_gain >> 1;     /* From Q15 to Q14 */

+	HP_corr_gain = add1(vo_mult(HP_calc_gain, st->gain_alpha), vo_mult((32767 - st->gain_alpha), HP_est_gain));

+

+	/* Quantise the correction gain */

+	dist_min = 32767;

+	for (i = 0; i < 16; i++)

+	{

+		dist = vo_mult((HP_corr_gain - HP_gain[i]), (HP_corr_gain - HP_gain[i]));

+		if (dist_min > dist)

+		{

+			dist_min = dist;

+			HP_gain_ind = i;

+		}

+	}

+	HP_corr_gain = HP_gain[HP_gain_ind];

+	/* return the quantised gain index when using the highest mode, otherwise zero */

+	return (HP_gain_ind);

+}

+

+/*************************************************

+*

+* Breif: Codec main function 

+*

+**************************************************/

+

+int AMR_Enc_Encode(HAMRENC hCodec)

+{

+	Word32 i;

+	Coder_State *gData = (Coder_State*)hCodec;

+	Word16 *signal;

+	Word16 packed_size = 0;

+	Word16 prms[NB_BITS_MAX];

+	Word16 coding_mode = 0, nb_bits, allow_dtx, mode, reset_flag;

+	mode = gData->mode;

+	coding_mode = gData->mode;

+	nb_bits = nb_of_bits[mode];

+	signal = (Word16 *)gData->inputStream;

+	allow_dtx = gData->allow_dtx;

+

+	/* check for homing frame */

+	reset_flag = encoder_homing_frame_test(signal);

+

+	for (i = 0; i < L_FRAME16k; i++)   /* Delete the 2 LSBs (14-bit input) */

+	{

+		*(signal + i) = (Word16) (*(signal + i) & 0xfffC);

+	}

+

+	coder(&coding_mode, signal, prms, &nb_bits, gData, allow_dtx);

+	packed_size = PackBits(prms, coding_mode, mode, gData);

+	if (reset_flag != 0)

+	{

+		Reset_encoder(gData, 1);

+	}

+	return packed_size;

+}

+

+/***************************************************************************

+*

+*Brief: Codec API function --- Initialize the codec and return a codec handle

+*

+***************************************************************************/

+

+VO_U32 VO_API voAMRWB_Init(VO_HANDLE * phCodec,                   /* o: the audio codec handle */

+						   VO_AUDIO_CODINGTYPE vType,             /* i: Codec Type ID */

+						   VO_CODEC_INIT_USERDATA * pUserData     /* i: init Parameters */

+						   )

+{

+	Coder_State *st;

+	FrameStream *stream;

+#ifdef USE_DEAULT_MEM

+	VO_MEM_OPERATOR voMemoprator;

+#endif

+	VO_MEM_OPERATOR *pMemOP;

+	int interMem = 0;

+

+	if(pUserData == NULL || pUserData->memflag != VO_IMF_USERMEMOPERATOR || pUserData->memData == NULL )

+	{

+#ifdef USE_DEAULT_MEM

+		voMemoprator.Alloc = cmnMemAlloc;

+		voMemoprator.Copy = cmnMemCopy;

+		voMemoprator.Free = cmnMemFree;

+		voMemoprator.Set = cmnMemSet;

+		voMemoprator.Check = cmnMemCheck;

+		interMem = 1;

+		pMemOP = &voMemoprator;

+#else

+		*phCodec = NULL;

+		return VO_ERR_INVALID_ARG;

+#endif

+	}

+	else

+	{

+		pMemOP = (VO_MEM_OPERATOR *)pUserData->memData;

+	} 

+	/*-------------------------------------------------------------------------*

+	 * Memory allocation for coder state.                                      *

+	 *-------------------------------------------------------------------------*/

+	if ((st = (Coder_State *)mem_malloc(pMemOP, sizeof(Coder_State), 32, VO_INDEX_ENC_AMRWB)) == NULL)

+	{

+		return VO_ERR_OUTOF_MEMORY;

+	}

+

+	st->vadSt = NULL;                      

+	st->dtx_encSt = NULL;                  

+	st->sid_update_counter = 3;

+	st->sid_handover_debt = 0;

+	st->prev_ft = TX_SPEECH;

+	st->inputStream = NULL;

+	st->inputSize = 0;

+

+	/* Default setting */

+	st->mode = VOAMRWB_MD2385;                        /* bit rate 23.85kbps */

+	st->frameType = VOAMRWB_RFC3267;                  /* frame type: RFC3267 */

+	st->allow_dtx = 0;                                /* disable DTX mode */

+

+	st->outputStream = NULL;

+	st->outputSize = 0;

+

+	st->stream = (FrameStream *)mem_malloc(pMemOP, sizeof(FrameStream), 32, VO_INDEX_ENC_AMRWB);

+	if(st->stream == NULL)

+		return VO_ERR_OUTOF_MEMORY;

+

+	st->stream->frame_ptr = (unsigned char *)mem_malloc(pMemOP, Frame_Maxsize, 32, VO_INDEX_ENC_AMRWB);

+	if(st->stream->frame_ptr == NULL)

+		return  VO_ERR_OUTOF_MEMORY;

+

+	stream = st->stream;

+	voAWB_InitFrameBuffer(stream);

+

+	wb_vad_init(&(st->vadSt), pMemOP);

+	dtx_enc_init(&(st->dtx_encSt), isf_init, pMemOP);

+

+	Reset_encoder((void *) st, 1);

+

+	if(interMem)

+	{

+		st->voMemoprator.Alloc = cmnMemAlloc;

+		st->voMemoprator.Copy = cmnMemCopy;

+		st->voMemoprator.Free = cmnMemFree;

+		st->voMemoprator.Set = cmnMemSet;

+		st->voMemoprator.Check = cmnMemCheck;

+		pMemOP = &st->voMemoprator;

+	}

+

+	st->pvoMemop = pMemOP;

+

+	*phCodec = (void *) st;

+

+	return VO_ERR_NONE;

+}

+

+/**********************************************************************************

+*

+* Brief: Codec API function: Input PCM data

+*

+***********************************************************************************/

+

+VO_U32 VO_API voAMRWB_SetInputData(

+		VO_HANDLE hCodec,                   /* i/o: The codec handle which was created by Init function */

+		VO_CODECBUFFER * pInput             /*   i: The input buffer parameter  */

+		)

+{

+	Coder_State  *gData;

+	FrameStream  *stream;

+

+	if(NULL == hCodec)

+	{

+		return VO_ERR_INVALID_ARG;

+	}

+

+	gData = (Coder_State *)hCodec;

+	stream = gData->stream;

+

+	if(NULL == pInput || NULL == pInput->Buffer || 0 > pInput->Length)

+	{

+		return VO_ERR_INVALID_ARG;

+	}

+

+	stream->set_ptr    = pInput->Buffer;

+	stream->set_len    = pInput->Length;

+	stream->frame_ptr  = stream->frame_ptr_bk;

+	stream->used_len   = 0;

+

+	return VO_ERR_NONE;

+}

+

+/**************************************************************************************

+*

+* Brief: Codec API function: Get the compression audio data frame by frame

+*

+***************************************************************************************/

+

+VO_U32 VO_API voAMRWB_GetOutputData(

+		VO_HANDLE hCodec,                    /* i: The Codec Handle which was created by Init function*/

+		VO_CODECBUFFER * pOutput,            /* o: The output audio data */

+		VO_AUDIO_OUTPUTINFO * pAudioFormat   /* o: The encoder module filled audio format and used the input size*/

+		)

+{

+	Coder_State* gData = (Coder_State*)hCodec;

+	VO_MEM_OPERATOR  *pMemOP;

+	FrameStream  *stream = (FrameStream *)gData->stream;

+	pMemOP = (VO_MEM_OPERATOR  *)gData->pvoMemop;

+

+	if(stream->framebuffer_len  < Frame_MaxByte)         /* check the work buffer len */

+	{

+		stream->frame_storelen = stream->framebuffer_len;

+		if(stream->frame_storelen)

+		{

+			pMemOP->Copy(VO_INDEX_ENC_AMRWB, stream->frame_ptr_bk , stream->frame_ptr , stream->frame_storelen);

+		}

+		if(stream->set_len > 0)

+		{

+			voAWB_UpdateFrameBuffer(stream, pMemOP);

+		}

+		if(stream->framebuffer_len < Frame_MaxByte)

+		{

+			if(pAudioFormat)

+				pAudioFormat->InputUsed = stream->used_len;

+			return VO_ERR_INPUT_BUFFER_SMALL;

+		}

+	}

+

+	gData->inputStream = stream->frame_ptr;

+	gData->outputStream = (unsigned short*)pOutput->Buffer;

+

+	gData->outputSize = AMR_Enc_Encode(gData);         /* encoder main function */

+

+	pOutput->Length = gData->outputSize;               /* get the output buffer length */

+	stream->frame_ptr += 640;                          /* update the work buffer ptr */

+	stream->framebuffer_len  -= 640;

+

+	if(pAudioFormat)                                   /* return output audio information */

+	{

+		pAudioFormat->Format.Channels = 1;

+		pAudioFormat->Format.SampleRate = 8000;

+		pAudioFormat->Format.SampleBits = 16;	

+		pAudioFormat->InputUsed = stream->used_len;

+	}

+	return VO_ERR_NONE;

+}

+

+/*************************************************************************

+*

+* Brief: Codec API function---set the data by specified parameter ID

+*

+*************************************************************************/

+

+

+VO_U32 VO_API voAMRWB_SetParam(

+		VO_HANDLE hCodec,   /* i/o: The Codec Handle which was created by Init function */

+		VO_S32 uParamID,    /*   i: The param ID */

+		VO_PTR pData        /*   i: The param value depend on the ID */

+		)

+{

+	Coder_State* gData = (Coder_State*)hCodec;

+	FrameStream *stream = (FrameStream *)(gData->stream);

+	int *lValue = (int*)pData;

+

+	switch(uParamID)

+	{

+		/* setting AMR-WB frame type*/

+		case VO_PID_AMRWB_FRAMETYPE:

+			if(*lValue < VOAMRWB_DEFAULT || *lValue > VOAMRWB_RFC3267)

+				return VO_ERR_WRONG_PARAM_ID; 

+			gData->frameType = *lValue;

+			break;

+		/* setting AMR-WB bit rate */

+		case VO_PID_AMRWB_MODE:

+			{

+				if(*lValue < VOAMRWB_MD66 || *lValue > VOAMRWB_MD2385)

+					return VO_ERR_WRONG_PARAM_ID; 

+				gData->mode = *lValue;

+			}

+			break;

+		/* enable or disable DTX mode */

+		case VO_PID_AMRWB_DTX:

+			gData->allow_dtx = (Word16)(*lValue);

+			break;

+

+		case VO_PID_COMMON_HEADDATA:

+			break;

+        /* flush the work buffer */

+		case VO_PID_COMMON_FLUSH:

+			stream->set_ptr = NULL;

+			stream->frame_storelen = 0;

+			stream->framebuffer_len = 0;

+			stream->set_len = 0;

+			break;

+

+		default:

+			return VO_ERR_WRONG_PARAM_ID;

+	}

+	return VO_ERR_NONE;

+}

+

+/**************************************************************************

+*

+*Brief: Codec API function---Get the data by specified parameter ID

+*

+***************************************************************************/

+

+VO_U32 VO_API voAMRWB_GetParam(

+		VO_HANDLE hCodec,      /* i: The Codec Handle which was created by Init function */

+		VO_S32 uParamID,       /* i: The param ID */

+		VO_PTR pData           /* o: The param value depend on the ID */

+		)

+{

+	int    temp;

+	Coder_State* gData = (Coder_State*)hCodec;

+

+	if (gData==NULL) 

+		return VO_ERR_INVALID_ARG;

+	switch(uParamID)

+	{

+		/* output audio format */

+		case VO_PID_AMRWB_FORMAT:

+			{

+				VO_AUDIO_FORMAT* fmt = (VO_AUDIO_FORMAT*)pData;

+				fmt->Channels   = 1;

+				fmt->SampleRate = 16000;

+				fmt->SampleBits = 16;

+				break;

+			}

+        /* output audio channel number */

+		case VO_PID_AMRWB_CHANNELS:

+			temp = 1;

+			pData = (void *)(&temp);

+			break;

+        /* output audio sample rate */

+		case VO_PID_AMRWB_SAMPLERATE:

+			temp = 16000;

+			pData = (void *)(&temp);

+			break;

+		/* output audio frame type */

+		case VO_PID_AMRWB_FRAMETYPE:

+			temp = gData->frameType;

+			pData = (void *)(&temp);

+			break;

+		/* output audio bit rate */

+		case VO_PID_AMRWB_MODE:

+			temp = gData->mode;

+			pData = (void *)(&temp);

+			break;

+		default:

+			return VO_ERR_WRONG_PARAM_ID;

+	}

+

+	return VO_ERR_NONE;

+}

+

+/***********************************************************************************

+*

+* Brief: Codec API function---Release the codec after all encoder operations are done

+*

+*************************************************************************************/

+

+VO_U32 VO_API voAMRWB_Uninit(VO_HANDLE hCodec           /* i/o: Codec handle pointer */

+							 )

+{

+	Coder_State* gData = (Coder_State*)hCodec;

+	VO_MEM_OPERATOR *pMemOP;

+	pMemOP = gData->pvoMemop;

+

+	if(hCodec)

+	{

+		if(gData->stream)

+		{

+			if(gData->stream->frame_ptr_bk)

+			{

+				mem_free(pMemOP, gData->stream->frame_ptr_bk, VO_INDEX_ENC_AMRWB);

+				gData->stream->frame_ptr_bk = NULL;

+			}

+			mem_free(pMemOP, gData->stream, VO_INDEX_ENC_AMRWB);

+			gData->stream = NULL;

+		}

+		wb_vad_exit(&(((Coder_State *) gData)->vadSt), pMemOP);

+		dtx_enc_exit(&(((Coder_State *) gData)->dtx_encSt), pMemOP);

+

+		mem_free(pMemOP, hCodec, VO_INDEX_ENC_AMRWB);

+		hCodec = NULL;

+	}

+

+	return VO_ERR_NONE;

+}

+

+/********************************************************************************

+*

+* Brief: voGetAMRWBEncAPI gets the API handle of the codec

+*

+********************************************************************************/

+

+VO_S32 VO_API voGetAMRWBEncAPI(

+							   VO_AUDIO_CODECAPI * pEncHandle      /* i/o: Codec handle pointer */

+							   )

+{

+	if(NULL == pEncHandle)

+		return VO_ERR_INVALID_ARG;

+	pEncHandle->Init = voAMRWB_Init;

+	pEncHandle->SetInputData = voAMRWB_SetInputData;

+	pEncHandle->GetOutputData = voAMRWB_GetOutputData;

+	pEncHandle->SetParam = voAMRWB_SetParam;

+	pEncHandle->GetParam = voAMRWB_GetParam;

+	pEncHandle->Uninit = voAMRWB_Uninit;

+

+	return VO_ERR_NONE;

+}

+

+#ifdef __cplusplus

+}

+#endif

diff --git a/media/libstagefright/codecs/amrwbenc/src/voicefac.c b/media/libstagefright/codecs/amrwbenc/src/voicefac.c
new file mode 100644
index 0000000..187d774
--- /dev/null
+++ b/media/libstagefright/codecs/amrwbenc/src/voicefac.c
@@ -0,0 +1,92 @@
+/*

+ ** Copyright 2003-2010, VisualOn, Inc.

+ **

+ ** Licensed under the Apache License, Version 2.0 (the "License");

+ ** you may not use this file except in compliance with the License.

+ ** You may obtain a copy of the License at

+ **

+ **     http://www.apache.org/licenses/LICENSE-2.0

+ **

+ ** Unless required by applicable law or agreed to in writing, software

+ ** distributed under the License is distributed on an "AS IS" BASIS,

+ ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

+ ** See the License for the specific language governing permissions and

+ ** limitations under the License.

+ */

+

+/***********************************************************************

+*   File: voicefac.c                                                   *

+*                                                                      *

+*   Description: Find the voicing factors (1 = voice to -1 = unvoiced) *

+*                                                                      *                                                 

+************************************************************************/

+

+#include "typedef.h"

+#include "basic_op.h"

+#include "math_op.h"

+

+Word16 voice_factor(                                  /* (o) Q15   : factor (-1=unvoiced to 1=voiced) */

+		Word16 exc[],                         /* (i) Q_exc : pitch excitation                 */

+		Word16 Q_exc,                         /* (i)       : exc format                       */

+		Word16 gain_pit,                      /* (i) Q14   : gain of pitch                    */

+		Word16 code[],                        /* (i) Q9    : Fixed codebook excitation        */

+		Word16 gain_code,                     /* (i) Q0    : gain of code                     */

+		Word16 L_subfr                        /* (i)       : subframe length                  */

+		)

+{

+	Word16 tmp, exp, ener1, exp1, ener2, exp2;

+	Word32 i, L_tmp;

+

+#ifdef ASM_OPT               /* asm optimization branch */

+	ener1 = extract_h(Dot_product12_asm(exc, exc, L_subfr, &exp1));

+#else

+	ener1 = extract_h(Dot_product12(exc, exc, L_subfr, &exp1));

+#endif

+	exp1 = exp1 - (Q_exc + Q_exc);

+	L_tmp = vo_L_mult(gain_pit, gain_pit);

+	exp = norm_l(L_tmp);

+	tmp = extract_h(L_tmp << exp);

+	ener1 = vo_mult(ener1, tmp);

+	exp1 = exp1 - exp - 10;        /* 10 -> gain_pit Q14 to Q9 */

+

+#ifdef ASM_OPT                /* asm optimization branch */

+	ener2 = extract_h(Dot_product12_asm(code, code, L_subfr, &exp2));

+#else

+	ener2 = extract_h(Dot_product12(code, code, L_subfr, &exp2));

+#endif

+

+	exp = norm_s(gain_code);

+	tmp = gain_code << exp;

+	tmp = vo_mult(tmp, tmp);

+	ener2 = vo_mult(ener2, tmp);

+	exp2 = exp2 - (exp + exp);

+

+	i = exp1 - exp2;

+

+	if (i >= 0)

+	{

+		ener1 = ener1 >> 1;

+		ener2 = ener2 >> (i + 1);

+	} else

+	{

+		ener1 = ener1 >> (1 - i);

+		ener2 = ener2 >> 1;

+	}

+

+	tmp = vo_sub(ener1, ener2);

+	ener1 = add1(add1(ener1, ener2), 1);

+

+	if (tmp >= 0)

+	{

+		tmp = div_s(tmp, ener1);

+	} else

+	{

+		tmp = vo_negate(div_s(vo_negate(tmp), ener1));

+	}

+

+	return (tmp);

+}

+

+

+

+

diff --git a/media/libstagefright/codecs/amrwbenc/src/wb_vad.c b/media/libstagefright/codecs/amrwbenc/src/wb_vad.c
new file mode 100644
index 0000000..0126853
--- /dev/null
+++ b/media/libstagefright/codecs/amrwbenc/src/wb_vad.c
@@ -0,0 +1,808 @@
+/*

+ ** Copyright 2003-2010, VisualOn, Inc.

+ **

+ ** Licensed under the Apache License, Version 2.0 (the "License");

+ ** you may not use this file except in compliance with the License.

+ ** You may obtain a copy of the License at

+ **

+ **     http://www.apache.org/licenses/LICENSE-2.0

+ **

+ ** Unless required by applicable law or agreed to in writing, software

+ ** distributed under the License is distributed on an "AS IS" BASIS,

+ ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

+ ** See the License for the specific language governing permissions and

+ ** limitations under the License.

+ */

+

+/***********************************************************************

+*      File: wb_vad.c                                                  *

+*                                                                      *

+*      Description: Voice Activity Detection                           *

+*                                                                      *

+************************************************************************/

+

+#include <stdlib.h>

+#include <stdio.h>

+#include "cnst.h"

+#include "wb_vad.h"

+#include "typedef.h"

+#include "basic_op.h"

+#include "math_op.h"

+#include "wb_vad_c.h"

+#include "mem_align.h"

+

+/******************************************************************************

+*  Calculate Log2 and scale the signal:

+*

+*    ilog2(Word32 in) = -1024*log10(in * 2^-31)/log10(2), where in = [1, 2^31-1]

+*

+*  input   output

+*  32768   16384

+*  1       31744

+*

+* When input is in the range of [1,2^16], max error is 0.0380%.

+*********************************************************************************/

+

+static Word16 ilog2(                       /* return: output value of the log2 */

+		Word16 mant                        /* i: value to be converted */

+		)

+{

+	Word16 ex, ex2, res;

+	Word32 i, l_temp;

+

+	if (mant <= 0)

+	{

+		mant = 1;                         

+	}

+	ex = norm_s(mant);

+	mant = mant << ex;

+

+	for (i = 0; i < 3; i++)

+		mant = vo_mult(mant, mant);

+	l_temp = vo_L_mult(mant, mant);

+

+	ex2 = norm_l(l_temp);

+	mant = extract_h(l_temp << ex2);

+

+	res = (ex + 16) << 10;

+	res = add1(res, (ex2 << 6));

+	res = vo_sub(add1(res, 127), (mant >> 8));

+	return (res);

+}

+

+/******************************************************************************

+*

+*     Function     : filter5

+*     Purpose      : Fifth-order half-band lowpass/highpass filter pair with

+*                    decimation.

+*

+*******************************************************************************/

+

+static void filter5(

+		Word16 * in0,                         /* i/o : input values; output low-pass part  */

+		Word16 * in1,                         /* i/o : input values; output high-pass part */

+		Word16 data[]                         /* i/o : filter memory                       */

+		)

+{

+	Word16 temp0, temp1, temp2;

+

+	temp0 = vo_sub(*in0, vo_mult(COEFF5_1, data[0]));

+	temp1 = add1(data[0], vo_mult(COEFF5_1, temp0));

+	data[0] = temp0;                      

+

+	temp0 = vo_sub(*in1, vo_mult(COEFF5_2, data[1]));

+	temp2 = add1(data[1], vo_mult(COEFF5_2, temp0));

+	data[1] = temp0;                       

+

+	*in0 = extract_h((vo_L_add(temp1, temp2) << 15));   

+	*in1 = extract_h((vo_L_sub(temp1, temp2) << 15));  

+}

+

+/******************************************************************************

+*

+*     Function     : filter3

+*     Purpose      : Third-order half-band lowpass/highpass filter pair with

+*                    decimation.

+*

+*******************************************************************************/

+

+static void filter3(

+		Word16 * in0,                         /* i/o : input values; output low-pass part  */

+		Word16 * in1,                         /* i/o : input values; output high-pass part */

+		Word16 * data                         /* i/o : filter memory                       */

+		)

+{

+	Word16 temp1, temp2;

+

+	temp1 = vo_sub(*in1, vo_mult(COEFF3, *data));

+	temp2 = add1(*data, vo_mult(COEFF3, temp1));

+	*data = temp1;                        

+

+	*in1 = extract_h((vo_L_sub(*in0, temp2) << 15));   

+	*in0 = extract_h((vo_L_add(*in0, temp2) << 15));   

+}

+

+/******************************************************************************

+*

+*     Function   : level_calculation

+*     Purpose    : Calculate signal level in a sub-band. Level is calculated

+*                  by summing absolute values of the input data.

+*

+*                  Signal level calculated from of the end of the frame

+*                  (data[count1 - count2]) is stored to (*sub_level)

+*                  and added to the level of the next frame.

+*

+******************************************************************************/

+

+static Word16 level_calculation(                      /* return: signal level */

+		Word16 data[],                        /* i   : signal buffer                                    */

+		Word16 * sub_level,                   /* i   : level calculated at the end of the previous frame*/

+		                                      /* o   : level of signal calculated from the last         */

+		                                      /*       (count2 - count1) samples                        */

+		Word16 count1,                        /* i   : number of samples to be counted                  */

+		Word16 count2,                        /* i   : number of samples to be counted                  */

+		Word16 ind_m,                         /* i   : step size for the index of the data buffer       */

+		Word16 ind_a,                         /* i   : starting index of the data buffer                */

+		Word16 scale                          /* i   : scaling for the level calculation                */

+		)

+{

+	Word32 i, l_temp1, l_temp2;

+	Word16 level;

+

+	l_temp1 = 0L;                          

+	for (i = count1; i < count2; i++)

+	{

+		l_temp1 += (abs_s(data[ind_m * i + ind_a])<<1);

+	}

+

+	l_temp2 = vo_L_add(l_temp1, L_shl(*sub_level, 16 - scale));

+	*sub_level = extract_h(L_shl(l_temp1, scale));      

+

+	for (i = 0; i < count1; i++)

+	{

+		l_temp2 += (abs_s(data[ind_m * i + ind_a])<<1);

+	}

+	level = extract_h(L_shl2(l_temp2, scale));

+

+	return level;

+}

+

+/******************************************************************************

+*

+*     Function     : filter_bank

+*     Purpose      : Divide input signal into bands and calculate level of

+*                    the signal in each band

+*

+*******************************************************************************/

+

+static void filter_bank(

+		VadVars * st,                         /* i/o : State struct               */

+		Word16 in[],                          /* i   : input frame                */

+		Word16 level[]                        /* o   : signal levels at each band */

+		)

+{

+	Word32 i;

+	Word16 tmp_buf[FRAME_LEN];

+

+	/* shift input 1 bit down for safe scaling */

+	for (i = 0; i < FRAME_LEN; i++)

+	{

+		tmp_buf[i] = in[i] >> 1;       

+	}

+

+	/* run the filter bank */

+	for (i = 0; i < 128; i++)

+	{

+		filter5(&tmp_buf[2 * i], &tmp_buf[2 * i + 1], st->a_data5[0]);

+	}

+	for (i = 0; i < 64; i++)

+	{

+		filter5(&tmp_buf[4 * i], &tmp_buf[4 * i + 2], st->a_data5[1]);

+		filter5(&tmp_buf[4 * i + 1], &tmp_buf[4 * i + 3], st->a_data5[2]);

+	}

+	for (i = 0; i < 32; i++)

+	{

+		filter5(&tmp_buf[8 * i], &tmp_buf[8 * i + 4], st->a_data5[3]);

+		filter5(&tmp_buf[8 * i + 2], &tmp_buf[8 * i + 6], st->a_data5[4]);

+		filter3(&tmp_buf[8 * i + 3], &tmp_buf[8 * i + 7], &st->a_data3[0]);

+	}

+	for (i = 0; i < 16; i++)

+	{

+		filter3(&tmp_buf[16 * i + 0], &tmp_buf[16 * i + 8], &st->a_data3[1]);

+		filter3(&tmp_buf[16 * i + 4], &tmp_buf[16 * i + 12], &st->a_data3[2]);

+		filter3(&tmp_buf[16 * i + 6], &tmp_buf[16 * i + 14], &st->a_data3[3]);

+	}

+

+	for (i = 0; i < 8; i++)

+	{

+		filter3(&tmp_buf[32 * i + 0], &tmp_buf[32 * i + 16], &st->a_data3[4]);

+		filter3(&tmp_buf[32 * i + 8], &tmp_buf[32 * i + 24], &st->a_data3[5]);

+	}

+

+	/* calculate levels in each frequency band */

+

+	/* 4800 - 6400 Hz */

+	level[11] = level_calculation(tmp_buf, &st->sub_level[11], 16, 64, 4, 1, 14);   

+	/* 4000 - 4800 Hz */

+	level[10] = level_calculation(tmp_buf, &st->sub_level[10], 8, 32, 8, 7, 15);   

+	/* 3200 - 4000 Hz */

+	level[9] = level_calculation(tmp_buf, &st->sub_level[9],8, 32, 8, 3, 15);   

+	/* 2400 - 3200 Hz */

+	level[8] = level_calculation(tmp_buf, &st->sub_level[8],8, 32, 8, 2, 15);   

+	/* 2000 - 2400 Hz */

+	level[7] = level_calculation(tmp_buf, &st->sub_level[7],4, 16, 16, 14, 16);       

+	/* 1600 - 2000 Hz */

+	level[6] = level_calculation(tmp_buf, &st->sub_level[6],4, 16, 16, 6, 16);        

+	/* 1200 - 1600 Hz */

+	level[5] = level_calculation(tmp_buf, &st->sub_level[5],4, 16, 16, 4, 16);        

+	/* 800 - 1200 Hz */

+	level[4] = level_calculation(tmp_buf, &st->sub_level[4],4, 16, 16, 12, 16);       

+	/* 600 - 800 Hz */

+	level[3] = level_calculation(tmp_buf, &st->sub_level[3],2, 8, 32, 8, 17); 

+	/* 400 - 600 Hz */

+	level[2] = level_calculation(tmp_buf, &st->sub_level[2],2, 8, 32, 24, 17);        

+	/* 200 - 400 Hz */

+	level[1] = level_calculation(tmp_buf, &st->sub_level[1],2, 8, 32, 16, 17);        

+	/* 0 - 200 Hz */

+	level[0] = level_calculation(tmp_buf, &st->sub_level[0],2, 8, 32, 0, 17); 

+}

+

+/******************************************************************************

+*

+*     Function   : update_cntrl

+*     Purpose    : Control update of the background noise estimate.

+*

+*******************************************************************************/

+

+static void update_cntrl(

+		VadVars * st,                         /* i/o : State structure                    */

+		Word16 level[]                        /* i   : sub-band levels of the input frame */

+		)

+{

+	Word32 i;

+	Word16 num, temp, stat_rat, exp, denom;

+	Word16 alpha;

+

+	/* if a tone has been detected for a while, initialize stat_count */

+	if (sub((Word16) (st->tone_flag & 0x7c00), 0x7c00) == 0)

+	{

+		st->stat_count = STAT_COUNT;      

+	} else

+	{

+		/* if 8 last vad-decisions have been "0", reinitialize stat_count */

+		if ((st->vadreg & 0x7f80) == 0)

+		{

+			st->stat_count = STAT_COUNT;   

+		} else

+		{

+			stat_rat = 0;                  

+			for (i = 0; i < COMPLEN; i++)

+			{

+				if(level[i] > st->ave_level[i])

+				{

+					num = level[i];        

+					denom = st->ave_level[i];   

+				} else

+				{

+					num = st->ave_level[i];

+					denom = level[i];      

+				}

+				/* Limit nimimum value of num and denom to STAT_THR_LEVEL */

+				if(num < STAT_THR_LEVEL)

+				{

+					num = STAT_THR_LEVEL;  

+				}

+				if(denom < STAT_THR_LEVEL)

+				{

+					denom = STAT_THR_LEVEL;

+				}

+				exp = norm_s(denom);

+				denom = denom << exp;

+

+				/* stat_rat = num/denom * 64 */

+				temp = div_s(num >> 1, denom);

+				stat_rat = add1(stat_rat, shr(temp, (8 - exp)));

+			}

+

+			/* compare stat_rat with a threshold and update stat_count */

+			if(stat_rat > STAT_THR)

+			{

+				st->stat_count = STAT_COUNT;    

+			} else

+			{

+				if ((st->vadreg & 0x4000) != 0)

+				{

+

+					if (st->stat_count != 0)

+					{

+						st->stat_count = st->stat_count - 1;       

+					}

+				}

+			}

+		}

+	}

+

+	/* Update average amplitude estimate for stationarity estimation */

+	alpha = ALPHA4;                        

+	if(st->stat_count == STAT_COUNT)

+	{

+		alpha = 32767;                    

+	} else if ((st->vadreg & 0x4000) == 0)

+	{

+		alpha = ALPHA5;                   

+	}

+	for (i = 0; i < COMPLEN; i++)

+	{

+		st->ave_level[i] = add1(st->ave_level[i], vo_mult_r(alpha, vo_sub(level[i], st->ave_level[i])));   

+	}

+}

+

+/******************************************************************************

+*

+*     Function     : hangover_addition

+*     Purpose      : Add hangover after speech bursts

+*

+*******************************************************************************/

+

+static Word16 hangover_addition(                      /* return: VAD_flag indicating final VAD decision */

+		VadVars * st,                         /* i/o : State structure                     */

+		Word16 low_power,                     /* i   : flag power of the input frame    */

+		Word16 hang_len,                      /* i   : hangover length */

+		Word16 burst_len                      /* i   : minimum burst length for hangover addition */

+		)

+{

+	/* if the input power (pow_sum) is lower than a threshold, clear counters and set VAD_flag to "0"         */

+	if (low_power != 0)

+	{

+		st->burst_count = 0;               

+		st->hang_count = 0;                

+		return 0;

+	}

+	/* update the counters (hang_count, burst_count) */

+	if ((st->vadreg & 0x4000) != 0)

+	{

+		st->burst_count = st->burst_count + 1;    

+		if(st->burst_count >= burst_len)

+		{

+			st->hang_count = hang_len;     

+		}

+		return 1;

+	} else

+	{

+		st->burst_count = 0;               

+		if (st->hang_count > 0)

+		{

+			st->hang_count = st->hang_count - 1;    

+			return 1;

+		}

+	}

+	return 0;

+}

+

+/******************************************************************************

+*

+*     Function   : noise_estimate_update

+*     Purpose    : Update of background noise estimate

+*

+*******************************************************************************/

+

+static void noise_estimate_update(

+		VadVars * st,                         /* i/o : State structure                       */

+		Word16 level[]                        /* i   : sub-band levels of the input frame */

+		)

+{

+	Word32 i; 

+	Word16 alpha_up, alpha_down, bckr_add = 2;

+

+	/* Control update of bckr_est[] */

+	update_cntrl(st, level);

+

+	/* Choose update speed */

+	if ((0x7800 & st->vadreg) == 0)

+	{

+		alpha_up = ALPHA_UP1;              

+		alpha_down = ALPHA_DOWN1;          

+	} else

+	{

+		if ((st->stat_count == 0))

+		{

+			alpha_up = ALPHA_UP2;          

+			alpha_down = ALPHA_DOWN2;      

+		} else

+		{

+			alpha_up = 0;                  

+			alpha_down = ALPHA3;           

+			bckr_add = 0;                  

+		}

+	}

+

+	/* Update noise estimate (bckr_est) */

+	for (i = 0; i < COMPLEN; i++)

+	{

+		Word16 temp;

+		temp = (st->old_level[i] - st->bckr_est[i]);

+

+		if (temp < 0)

+		{                                  /* update downwards */

+			st->bckr_est[i] = add1(-2, add(st->bckr_est[i],vo_mult_r(alpha_down, temp))); 

+			/* limit minimum value of the noise estimate to NOISE_MIN */

+			if(st->bckr_est[i] < NOISE_MIN)

+			{

+				st->bckr_est[i] = NOISE_MIN;   

+			}

+		} else

+		{                                  /* update upwards */

+			st->bckr_est[i] = add1(bckr_add, add1(st->bckr_est[i],vo_mult_r(alpha_up, temp)));   

+

+			/* limit maximum value of the noise estimate to NOISE_MAX */

+			if(st->bckr_est[i] > NOISE_MAX)

+			{

+				st->bckr_est[i] = NOISE_MAX;    

+			}

+		}

+	}

+

+	/* Update signal levels of the previous frame (old_level) */

+	for (i = 0; i < COMPLEN; i++)

+	{

+		st->old_level[i] = level[i];      

+	}

+}

+

+/******************************************************************************

+*

+*     Function     : vad_decision

+*     Purpose      : Calculates VAD_flag

+*

+*******************************************************************************/

+

+static Word16 vad_decision(                           /* return value : VAD_flag */

+		VadVars * st,                         /* i/o : State structure                       */

+		Word16 level[COMPLEN],                /* i   : sub-band levels of the input frame */

+		Word32 pow_sum                        /* i   : power of the input frame           */

+		)

+{

+	Word32 i;

+	Word32 L_snr_sum;

+	Word32 L_temp;

+	Word16 vad_thr, temp, noise_level;

+	Word16 low_power_flag;

+	Word16 hang_len, burst_len;

+	Word16 ilog2_speech_level, ilog2_noise_level;

+	Word16 temp2;

+

+	/* Calculate squared sum of the input levels (level) divided by the background noise components

+	 * (bckr_est). */

+	L_snr_sum = 0;                        

+	for (i = 0; i < COMPLEN; i++)

+	{

+		Word16 exp;

+

+		exp = norm_s(st->bckr_est[i]);

+		temp = (st->bckr_est[i] << exp);

+		temp = div_s((level[i] >> 1), temp);

+		temp = shl(temp, (exp - (UNIRSHFT - 1)));

+		L_snr_sum = L_mac(L_snr_sum, temp, temp);

+	}

+

+	/* Calculate average level of estimated background noise */

+	L_temp = 0;                           

+	for (i = 1; i < COMPLEN; i++)          /* ignore lowest band */

+	{

+		L_temp = vo_L_add(L_temp, st->bckr_est[i]);

+	}

+

+	noise_level = extract_h((L_temp << 12));

+	/* if SNR is lower than a threshold (MIN_SPEECH_SNR), and increase speech_level */

+	temp = vo_mult(noise_level, MIN_SPEECH_SNR) << 3;

+

+	if(st->speech_level < temp)

+	{

+		st->speech_level = temp;          

+	}

+	ilog2_noise_level = ilog2(noise_level);

+

+	/* If SNR is very poor, speech_level is probably corrupted by noise level. This is correctred by

+	 * subtracting MIN_SPEECH_SNR*noise_level from speech level */

+	ilog2_speech_level = ilog2(st->speech_level - temp);

+

+	temp = add1(vo_mult(NO_SLOPE, (ilog2_noise_level - NO_P1)), THR_HIGH);

+

+	temp2 = add1(SP_CH_MIN, vo_mult(SP_SLOPE, (ilog2_speech_level - SP_P1)));

+	if (temp2 < SP_CH_MIN)

+	{

+		temp2 = SP_CH_MIN;                 

+	}

+	if (temp2 > SP_CH_MAX)

+	{

+		temp2 = SP_CH_MAX;                 

+	}

+	vad_thr = temp + temp2;

+

+	if(vad_thr < THR_MIN)

+	{

+		vad_thr = THR_MIN;                 

+	}

+	/* Shift VAD decision register */

+	st->vadreg = (st->vadreg >> 1);       

+

+	/* Make intermediate VAD decision */

+	if(L_snr_sum > vo_L_mult(vad_thr, (512 * COMPLEN)))

+	{

+		st->vadreg = (Word16) (st->vadreg | 0x4000); 

+	}

+	/* check if the input power (pow_sum) is lower than a threshold" */

+	if(pow_sum < VAD_POW_LOW)

+	{

+		low_power_flag = 1;               

+	} else

+	{

+		low_power_flag = 0;               

+	}

+	/* Update background noise estimates */

+	noise_estimate_update(st, level);

+

+	/* Calculate values for hang_len and burst_len based on vad_thr */

+	hang_len = add1(vo_mult(HANG_SLOPE, (vad_thr - HANG_P1)), HANG_HIGH);

+	if(hang_len < HANG_LOW)

+	{

+		hang_len = HANG_LOW;              

+	}

+	burst_len = add1(vo_mult(BURST_SLOPE, (vad_thr - BURST_P1)), BURST_HIGH);

+

+	return (hangover_addition(st, low_power_flag, hang_len, burst_len));

+}

+

+/******************************************************************************

+*

+*     Function : Estimate_Speech()

+*     Purpose  : Estimate speech level

+*

+* Maximum signal level is searched and stored to the variable sp_max.

+* The speech frames must locate within SP_EST_COUNT number of frames.

+* Thus, noisy frames having occasional VAD = "1" decisions will not

+* affect to the estimated speech_level.

+*

+*******************************************************************************/

+

+static void Estimate_Speech(

+		VadVars * st,                         /* i/o : State structure    */

+		Word16 in_level                       /* level of the input frame */

+		)

+{

+	Word16 alpha;

+

+	/* if the required activity count cannot be achieved, reset counters */

+	if((st->sp_est_cnt - st->sp_max_cnt) > (SP_EST_COUNT - SP_ACTIVITY_COUNT))

+	{

+		st->sp_est_cnt = 0;                

+		st->sp_max = 0;                    

+		st->sp_max_cnt = 0;                

+	}

+	st->sp_est_cnt += 1; 

+

+	if (((st->vadreg & 0x4000)||(in_level > st->speech_level)) && (in_level > MIN_SPEECH_LEVEL1))

+	{

+		/* update sp_max */

+		if(in_level > st->sp_max)

+		{

+			st->sp_max = in_level;         

+		}

+		st->sp_max_cnt += 1;        

+

+		if(st->sp_max_cnt >= SP_ACTIVITY_COUNT)

+		{

+			Word16 tmp;

+			/* update speech estimate */

+			tmp = (st->sp_max >> 1);      /* scale to get "average" speech level */

+

+			/* select update speed */

+			if(tmp > st->speech_level)

+			{

+				alpha = ALPHA_SP_UP;       

+			} else

+			{

+				alpha = ALPHA_SP_DOWN;    

+			}

+			if(tmp > MIN_SPEECH_LEVEL2)

+			{

+				st->speech_level = add1(st->speech_level, vo_mult_r(alpha, vo_sub(tmp, st->speech_level))); 

+			}

+			/* clear all counters used for speech estimation */

+			st->sp_max = 0;                

+			st->sp_max_cnt = 0;            

+			st->sp_est_cnt = 0;            

+		}

+	}

+}

+

+/******************************************************************************

+*

+*  Function:   wb_vad_init

+*  Purpose:    Allocates state memory and initializes state memory

+*

+*******************************************************************************/

+

+Word16 wb_vad_init(                        /* return: non-zero with error, zero for ok. */

+		VadVars ** state,                     /* i/o : State structure    */

+		VO_MEM_OPERATOR *pMemOP

+		)

+{

+	VadVars *s;

+

+	if (state == (VadVars **) NULL)

+	{

+		fprintf(stderr, "vad_init: invalid parameter\n");

+		return -1;

+	}

+	*state = NULL;

+

+	/* allocate memory */

+	if ((s = (VadVars *) mem_malloc(pMemOP, sizeof(VadVars), 32, VO_INDEX_ENC_AMRWB)) == NULL)

+	{

+		fprintf(stderr, "vad_init: can not malloc state structure\n");

+		return -1;

+	}

+	wb_vad_reset(s);

+

+	*state = s;

+

+	return 0;

+}

+

+/******************************************************************************

+*

+*  Function:   wb_vad_reset

+*  Purpose:    Initializes state memory

+*

+*******************************************************************************/

+

+Word16 wb_vad_reset(                       /* return: non-zero with error, zero for ok. */

+		VadVars * state                       /* i/o : State structure    */

+		)

+{

+	Word32 i, j;

+

+	if (state == (VadVars *) NULL)

+	{

+		fprintf(stderr, "vad_reset: invalid parameter\n");

+		return -1;

+	}

+	state->tone_flag = 0;

+	state->vadreg = 0;

+	state->hang_count = 0;

+	state->burst_count = 0;

+	state->hang_count = 0;

+

+	/* initialize memory used by the filter bank */

+	for (i = 0; i < F_5TH_CNT; i++)

+	{

+		for (j = 0; j < 2; j++)

+		{

+			state->a_data5[i][j] = 0;

+		}

+	}

+

+	for (i = 0; i < F_3TH_CNT; i++)

+	{

+		state->a_data3[i] = 0;

+	}

+

+	/* initialize the rest of the memory */

+	for (i = 0; i < COMPLEN; i++)

+	{

+		state->bckr_est[i] = NOISE_INIT;

+		state->old_level[i] = NOISE_INIT;

+		state->ave_level[i] = NOISE_INIT;

+		state->sub_level[i] = 0;

+	}

+

+	state->sp_est_cnt = 0;

+	state->sp_max = 0;

+	state->sp_max_cnt = 0;

+	state->speech_level = SPEECH_LEVEL_INIT;

+	state->prev_pow_sum = 0;

+	return 0;

+}

+

+/******************************************************************************

+*

+*  Function:   wb_vad_exit

+*  Purpose:    The memory used for state memory is freed

+*

+*******************************************************************************/

+

+void wb_vad_exit(

+		VadVars ** state,                      /* i/o : State structure    */

+		VO_MEM_OPERATOR *pMemOP

+		)

+{

+	if (state == NULL || *state == NULL)

+		return;

+	/* deallocate memory */

+	mem_free(pMemOP, *state, VO_INDEX_ENC_AMRWB);

+	*state = NULL;

+	return;

+}

+

+/******************************************************************************

+*

+*     Function     : wb_vad_tone_detection

+*     Purpose      : Search maximum pitch gain from a frame. Set tone flag if

+*                    pitch gain is high. This is used to detect

+*                    signaling tones and other signals with high pitch gain.

+*

+*******************************************************************************/

+

+void wb_vad_tone_detection(

+		VadVars * st,                         /* i/o : State struct            */

+		Word16 p_gain                         /* pitch gain      */

+		)

+{

+	/* update tone flag */

+	st->tone_flag = (st->tone_flag >> 1);

+

+	/* if (pitch_gain > TONE_THR) set tone flag */

+	if (p_gain > TONE_THR)

+	{

+		st->tone_flag = (Word16) (st->tone_flag | 0x4000);

+	}

+}

+

+/******************************************************************************

+*

+*     Function     : wb_vad

+*     Purpose      : Main program for Voice Activity Detection (VAD) for AMR

+*

+*******************************************************************************/

+

+Word16 wb_vad(                                /* Return value : VAD Decision, 1 = speech, 0 = noise */

+		VadVars * st,                         /* i/o : State structure                 */

+		Word16 in_buf[]                       /* i   : samples of the input frame   */

+	     )

+{

+	Word16 level[COMPLEN];

+	Word32 i;

+	Word16 VAD_flag, temp;

+	Word32 L_temp, pow_sum;

+

+	/* Calculate power of the input frame. */

+	L_temp = 0L;                           

+	for (i = 0; i < FRAME_LEN; i++)

+	{

+		L_temp = L_mac(L_temp, in_buf[i], in_buf[i]);

+	}

+

+	/* pow_sum = power of current frame and previous frame */

+	pow_sum = L_add(L_temp, st->prev_pow_sum);  

+

+	/* save power of current frame for next call */

+	st->prev_pow_sum = L_temp;             

+

+	/* If input power is very low, clear tone flag */

+	if (pow_sum < POW_TONE_THR)

+	{

+		st->tone_flag = (Word16) (st->tone_flag & 0x1fff);      

+	}

+	/* Run the filter bank and calculate signal levels at each band */

+	filter_bank(st, in_buf, level);

+

+	/* compute VAD decision */

+	VAD_flag = vad_decision(st, level, pow_sum);

+

+	/* Calculate input level */

+	L_temp = 0;                          

+	for (i = 1; i < COMPLEN; i++)          /* ignore lowest band */

+	{

+		L_temp = vo_L_add(L_temp, level[i]);

+	}

+

+	temp = extract_h(L_temp << 12);

+

+	Estimate_Speech(st, temp);             /* Estimate speech level */

+	return (VAD_flag);

+}

+

+

+

+

diff --git a/media/libstagefright/codecs/amrwbenc/src/weight_a.c b/media/libstagefright/codecs/amrwbenc/src/weight_a.c
new file mode 100644
index 0000000..d47be97
--- /dev/null
+++ b/media/libstagefright/codecs/amrwbenc/src/weight_a.c
@@ -0,0 +1,48 @@
+/*

+ ** Copyright 2003-2010, VisualOn, Inc.

+ **

+ ** Licensed under the Apache License, Version 2.0 (the "License");

+ ** you may not use this file except in compliance with the License.

+ ** You may obtain a copy of the License at

+ **

+ **     http://www.apache.org/licenses/LICENSE-2.0

+ **

+ ** Unless required by applicable law or agreed to in writing, software

+ ** distributed under the License is distributed on an "AS IS" BASIS,

+ ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

+ ** See the License for the specific language governing permissions and

+ ** limitations under the License.

+ */

+

+/***********************************************************************

+*       File: weight_a.c                                               *

+*                                                                      *

+*       Description:Weighting of LPC coefficients                      *

+*	               ap[i] = a[i] * (gamma ** i)                     *

+*                                                                      * 

+************************************************************************/

+

+#include "typedef.h"

+#include "basic_op.h"

+

+void Weight_a(

+		Word16 a[],                           /* (i) Q12 : a[m+1]  LPC coefficients             */

+		Word16 ap[],                          /* (o) Q12 : Spectral expanded LPC coefficients   */

+		Word16 gamma,                         /* (i) Q15 : Spectral expansion factor.           */

+		Word16 m                              /* (i)     : LPC order.                           */

+	     )

+{

+	Word32 num = m - 1, fac;

+	*ap++ = *a++;

+	fac = gamma;

+	do{

+		*ap++ =(Word16)(((vo_L_mult((*a++), fac)) + 0x8000) >> 16);

+		fac = (vo_L_mult(fac, gamma) + 0x8000) >> 16;

+	}while(--num != 0);

+

+	*ap++ = (Word16)(((vo_L_mult((*a++), fac)) + 0x8000) >> 16);

+	return;

+}

+

+

+

diff --git a/media/libstagefright/codecs/avc/dec/AVCDecoder.cpp b/media/libstagefright/codecs/avc/dec/AVCDecoder.cpp
index aa2a3d1..24c361e 100644
--- a/media/libstagefright/codecs/avc/dec/AVCDecoder.cpp
+++ b/media/libstagefright/codecs/avc/dec/AVCDecoder.cpp
@@ -34,6 +34,8 @@
 
 namespace android {
 
+static const char kStartCode[4] = { 0x00, 0x00, 0x00, 0x01 };
+
 static int32_t Malloc(void *userData, int32_t size, int32_t attrs) {
     return reinterpret_cast<int32_t>(malloc(size));
 }
@@ -154,9 +156,7 @@
         }
     }
 
-    sp<MetaData> params = new MetaData;
-    params->setInt32(kKeyWantsNALFragments, true);
-    mSource->start(params.get());
+    mSource->start();
 
     mAnchorTimeUs = 0;
     mNumSamplesOutput = 0;
@@ -167,9 +167,10 @@
 }
 
 void AVCDecoder::addCodecSpecificData(const uint8_t *data, size_t size) {
-    MediaBuffer *buffer = new MediaBuffer(size);
-    memcpy(buffer->data(), data, size);
-    buffer->set_range(0, size);
+    MediaBuffer *buffer = new MediaBuffer(size + 4);
+    memcpy(buffer->data(), kStartCode, 4);
+    memcpy((uint8_t *)buffer->data() + 4, data, size);
+    buffer->set_range(0, size + 4);
 
     mCodecSpecificData.push(buffer);
 }
@@ -200,6 +201,29 @@
     return mFormat;
 }
 
+static void findNALFragment(
+        const MediaBuffer *buffer, const uint8_t **fragPtr, size_t *fragSize) {
+    const uint8_t *data =
+        (const uint8_t *)buffer->data() + buffer->range_offset();
+
+    size_t size = buffer->range_length();
+
+    CHECK(size >= 4);
+    CHECK(!memcmp(kStartCode, data, 4));
+
+    size_t offset = 4;
+    while (offset + 3 < size && memcmp(kStartCode, &data[offset], 4)) {
+        ++offset;
+    }
+
+    *fragPtr = &data[4];
+    if (offset + 3 >= size) {
+        *fragSize = size - 4;
+    } else {
+        *fragSize = offset - 4;
+    }
+}
+
 status_t AVCDecoder::read(
         MediaBuffer **out, const ReadOptions *options) {
     *out = NULL;
@@ -254,37 +278,31 @@
         }
     }
 
-    const uint8_t *inPtr =
-        (const uint8_t *)mInputBuffer->data() + mInputBuffer->range_offset();
+    const uint8_t *fragPtr;
+    size_t fragSize;
+    findNALFragment(mInputBuffer, &fragPtr, &fragSize);
+
+    bool releaseFragment = true;
+    status_t err = UNKNOWN_ERROR;
 
     int nalType;
     int nalRefIdc;
     AVCDec_Status res =
         PVAVCDecGetNALType(
-                const_cast<uint8_t *>(inPtr), mInputBuffer->range_length(),
+                const_cast<uint8_t *>(fragPtr), fragSize,
                 &nalType, &nalRefIdc);
 
     if (res != AVCDEC_SUCCESS) {
         LOGE("cannot determine nal type");
-
-        mInputBuffer->release();
-        mInputBuffer = NULL;
-
-        return UNKNOWN_ERROR;
-    }
-
-    switch (nalType) {
+    } else switch (nalType) {
         case AVC_NALTYPE_SPS:
         {
             res = PVAVCDecSeqParamSet(
-                    mHandle, const_cast<uint8_t *>(inPtr),
-                    mInputBuffer->range_length());
+                    mHandle, const_cast<uint8_t *>(fragPtr),
+                    fragSize);
 
             if (res != AVCDEC_SUCCESS) {
-                mInputBuffer->release();
-                mInputBuffer = NULL;
-
-                return UNKNOWN_ERROR;
+                break;
             }
 
             AVCDecObject *pDecVid = (AVCDecObject *)mHandle->AVCObject;
@@ -324,47 +342,53 @@
 
             int32_t aligned_width = (crop_right - crop_left + 1 + 15) & ~15;
             int32_t aligned_height = (crop_bottom - crop_top + 1 + 15) & ~15;
-            mFormat->setInt32(kKeyWidth, aligned_width);
-            mFormat->setInt32(kKeyHeight, aligned_height);
 
-            mInputBuffer->release();
-            mInputBuffer = NULL;
+            int32_t oldWidth, oldHeight;
+            CHECK(mFormat->findInt32(kKeyWidth, &oldWidth));
+            CHECK(mFormat->findInt32(kKeyHeight, &oldHeight));
 
-            return INFO_FORMAT_CHANGED;
+            if (oldWidth != aligned_width || oldHeight != aligned_height) {
+                mFormat->setInt32(kKeyWidth, aligned_width);
+                mFormat->setInt32(kKeyHeight, aligned_height);
+
+                err = INFO_FORMAT_CHANGED;
+            } else {
+                *out = new MediaBuffer(0);
+                err = OK;
+            }
+            break;
         }
 
         case AVC_NALTYPE_PPS:
         {
             res = PVAVCDecPicParamSet(
-                    mHandle, const_cast<uint8_t *>(inPtr),
-                    mInputBuffer->range_length());
-
-            mInputBuffer->release();
-            mInputBuffer = NULL;
+                    mHandle, const_cast<uint8_t *>(fragPtr),
+                    fragSize);
 
             if (res != AVCDEC_SUCCESS) {
-                return UNKNOWN_ERROR;
+                break;
             }
 
             *out = new MediaBuffer(0);
 
-            return OK;
+            err = OK;
+            break;
         }
 
         case AVC_NALTYPE_SLICE:
         case AVC_NALTYPE_IDR:
         {
             res = PVAVCDecodeSlice(
-                    mHandle, const_cast<uint8_t *>(inPtr),
-                    mInputBuffer->range_length());
+                    mHandle, const_cast<uint8_t *>(fragPtr),
+                    fragSize);
 
             if (res == AVCDEC_PICTURE_OUTPUT_READY) {
                 int32_t index;
                 int32_t Release;
                 AVCFrameIO Output;
                 Output.YCbCr[0] = Output.YCbCr[1] = Output.YCbCr[2] = NULL;
-                CHECK_EQ(PVAVCDecGetOutput(
-                            mHandle, &index, &Release, &Output),
+
+                CHECK_EQ(PVAVCDecGetOutput(mHandle, &index, &Release, &Output),
                          AVCDEC_SUCCESS);
 
                 CHECK(index >= 0);
@@ -376,48 +400,44 @@
 
                 // Do _not_ release input buffer yet.
 
-                return OK;
+                releaseFragment = false;
+                err = OK;
+                break;
             }
 
-            mInputBuffer->release();
-            mInputBuffer = NULL;
-
             if (res == AVCDEC_PICTURE_READY || res == AVCDEC_SUCCESS) {
                 *out = new MediaBuffer(0);
 
-                return OK;
+                err = OK;
             } else {
                 LOGV("failed to decode frame (res = %d)", res);
-                return UNKNOWN_ERROR;
             }
+            break;
         }
 
         case AVC_NALTYPE_SEI:
         {
             res = PVAVCDecSEI(
-                    mHandle, const_cast<uint8_t *>(inPtr),
-                    mInputBuffer->range_length());
-
-            mInputBuffer->release();
-            mInputBuffer = NULL;
+                    mHandle, const_cast<uint8_t *>(fragPtr),
+                    fragSize);
 
             if (res != AVCDEC_SUCCESS) {
-                return UNKNOWN_ERROR;
+                break;
             }
 
             *out = new MediaBuffer(0);
 
-            return OK;
+            err = OK;
+            break;
         }
 
         case AVC_NALTYPE_AUD:
+        case AVC_NALTYPE_FILL:
         {
-            mInputBuffer->release();
-            mInputBuffer = NULL;
-
             *out = new MediaBuffer(0);
 
-            return OK;
+            err = OK;
+            break;
         }
 
         default:
@@ -428,10 +448,19 @@
         }
     }
 
-    mInputBuffer->release();
-    mInputBuffer = NULL;
+    if (releaseFragment) {
+        size_t offset = mInputBuffer->range_offset();
+        if (fragSize + 4 == mInputBuffer->range_length()) {
+            mInputBuffer->release();
+            mInputBuffer = NULL;
+        } else {
+            mInputBuffer->set_range(
+                    offset + fragSize + 4,
+                    mInputBuffer->range_length() - fragSize - 4);
+        }
+    }
 
-    return UNKNOWN_ERROR;
+    return err;
 }
 
 // static
diff --git a/media/libstagefright/codecs/avc/enc/AVCEncoder.cpp b/media/libstagefright/codecs/avc/enc/AVCEncoder.cpp
new file mode 100644
index 0000000..d5eb156
--- /dev/null
+++ b/media/libstagefright/codecs/avc/enc/AVCEncoder.cpp
@@ -0,0 +1,492 @@
+/*
+ * Copyright (C) 2010 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+//#define LOG_NDEBUG 0
+#define LOG_TAG "AVCEncoder"
+#include <utils/Log.h>
+
+#include "AVCEncoder.h"
+
+#include "avcenc_api.h"
+#include "avcenc_int.h"
+#include "OMX_Video.h"
+
+#include <media/stagefright/MediaBufferGroup.h>
+#include <media/stagefright/MediaDebug.h>
+#include <media/stagefright/MediaDefs.h>
+#include <media/stagefright/MediaErrors.h>
+#include <media/stagefright/MetaData.h>
+#include <media/stagefright/Utils.h>
+
+namespace android {
+
+inline static void ConvertYUV420SemiPlanarToYUV420Planar(
+        uint8_t *inyuv, uint8_t* outyuv,
+        int32_t width, int32_t height) {
+
+    int32_t outYsize = width * height;
+    uint32_t *outy =  (uint32_t *) outyuv;
+    uint16_t *outcb = (uint16_t *) (outyuv + outYsize);
+    uint16_t *outcr = (uint16_t *) (outyuv + outYsize + (outYsize >> 2));
+
+    /* Y copying */
+    memcpy(outy, inyuv, outYsize);
+
+    /* U & V copying */
+    uint32_t *inyuv_4 = (uint32_t *) (inyuv + outYsize);
+    for (int32_t i = height >> 1; i > 0; --i) {
+        for (int32_t j = width >> 2; j > 0; --j) {
+            uint32_t temp = *inyuv_4++;
+            uint32_t tempU = temp & 0xFF;
+            tempU = tempU | ((temp >> 8) & 0xFF00);
+
+            uint32_t tempV = (temp >> 8) & 0xFF;
+            tempV = tempV | ((temp >> 16) & 0xFF00);
+
+            // Flip U and V
+            *outcb++ = tempV;
+            *outcr++ = tempU;
+        }
+    }
+}
+
+static int32_t MallocWrapper(
+        void *userData, int32_t size, int32_t attrs) {
+    return reinterpret_cast<int32_t>(malloc(size));
+}
+
+static void FreeWrapper(void *userData, int32_t ptr) {
+    free(reinterpret_cast<void *>(ptr));
+}
+
+static int32_t DpbAllocWrapper(void *userData,
+        unsigned int sizeInMbs, unsigned int numBuffers) {
+    AVCEncoder *encoder = static_cast<AVCEncoder *>(userData);
+    CHECK(encoder != NULL);
+    return encoder->allocOutputBuffers(sizeInMbs, numBuffers);
+}
+
+static int32_t BindFrameWrapper(
+        void *userData, int32_t index, uint8_t **yuv) {
+    AVCEncoder *encoder = static_cast<AVCEncoder *>(userData);
+    CHECK(encoder != NULL);
+    return encoder->bindOutputBuffer(index, yuv);
+}
+
+static void UnbindFrameWrapper(void *userData, int32_t index) {
+    AVCEncoder *encoder = static_cast<AVCEncoder *>(userData);
+    CHECK(encoder != NULL);
+    return encoder->unbindOutputBuffer(index);
+}
+
+AVCEncoder::AVCEncoder(
+        const sp<MediaSource>& source,
+        const sp<MetaData>& meta)
+    : mSource(source),
+      mMeta(meta),
+      mNumInputFrames(-1),
+      mStarted(false),
+      mInputBuffer(NULL),
+      mInputFrameData(NULL),
+      mGroup(NULL) {
+
+    LOGV("Construct software AVCEncoder");
+
+    mHandle = new tagAVCHandle;
+    memset(mHandle, 0, sizeof(tagAVCHandle));
+    mHandle->AVCObject = NULL;
+    mHandle->userData = this;
+    mHandle->CBAVC_DPBAlloc = DpbAllocWrapper;
+    mHandle->CBAVC_FrameBind = BindFrameWrapper;
+    mHandle->CBAVC_FrameUnbind = UnbindFrameWrapper;
+    mHandle->CBAVC_Malloc = MallocWrapper;
+    mHandle->CBAVC_Free = FreeWrapper;
+
+    mInitCheck = initCheck(meta);
+}
+
+AVCEncoder::~AVCEncoder() {
+    LOGV("Destruct software AVCEncoder");
+    if (mStarted) {
+        stop();
+    }
+
+    delete mEncParams;
+    delete mHandle;
+}
+
+status_t AVCEncoder::initCheck(const sp<MetaData>& meta) {
+    LOGV("initCheck");
+    CHECK(meta->findInt32(kKeyWidth, &mVideoWidth));
+    CHECK(meta->findInt32(kKeyHeight, &mVideoHeight));
+    CHECK(meta->findInt32(kKeySampleRate, &mVideoFrameRate));
+    CHECK(meta->findInt32(kKeyBitRate, &mVideoBitRate));
+
+    // XXX: Add more color format support
+    CHECK(meta->findInt32(kKeyColorFormat, &mVideoColorFormat));
+    if (mVideoColorFormat != OMX_COLOR_FormatYUV420Planar) {
+        if (mVideoColorFormat != OMX_COLOR_FormatYUV420SemiPlanar) {
+            LOGE("Color format %d is not supported", mVideoColorFormat);
+            return BAD_VALUE;
+        }
+        // Allocate spare buffer only when color conversion is needed.
+        // Assume the color format is OMX_COLOR_FormatYUV420SemiPlanar.
+        mInputFrameData =
+            (uint8_t *) malloc((mVideoWidth * mVideoHeight * 3 ) >> 1);
+        CHECK(mInputFrameData);
+    }
+
+    // XXX: Remove this restriction
+    if (mVideoWidth % 16 != 0 || mVideoHeight % 16 != 0) {
+        LOGE("Video frame size %dx%d must be a multiple of 16",
+            mVideoWidth, mVideoHeight);
+        return BAD_VALUE;
+    }
+
+    mEncParams = new tagAVCEncParam;
+    memset(mEncParams, 0, sizeof(mEncParams));
+    mEncParams->width = mVideoWidth;
+    mEncParams->height = mVideoHeight;
+    mEncParams->frame_rate = 1000 * mVideoFrameRate;  // In frames/ms!
+    mEncParams->rate_control = AVC_ON;
+    mEncParams->bitrate = mVideoBitRate;
+    mEncParams->initQP = 0;
+    mEncParams->init_CBP_removal_delay = 1600;
+    mEncParams->CPB_size = (uint32_t) (mVideoBitRate >> 1);
+
+    mEncParams->intramb_refresh = 0;
+    mEncParams->auto_scd = AVC_ON;
+    mEncParams->out_of_band_param_set = AVC_ON;
+    mEncParams->poc_type = 2;
+    mEncParams->log2_max_poc_lsb_minus_4 = 12;
+    mEncParams->delta_poc_zero_flag = 0;
+    mEncParams->offset_poc_non_ref = 0;
+    mEncParams->offset_top_bottom = 0;
+    mEncParams->num_ref_in_cycle = 0;
+    mEncParams->offset_poc_ref = NULL;
+
+    mEncParams->num_ref_frame = 1;
+    mEncParams->num_slice_group = 1;
+    mEncParams->fmo_type = 0;
+
+    mEncParams->db_filter = AVC_ON;
+    mEncParams->disable_db_idc = 0;
+
+    mEncParams->alpha_offset = 0;
+    mEncParams->beta_offset = 0;
+    mEncParams->constrained_intra_pred = AVC_OFF;
+
+    mEncParams->data_par = AVC_OFF;
+    mEncParams->fullsearch = AVC_OFF;
+    mEncParams->search_range = 16;
+    mEncParams->sub_pel = AVC_OFF;
+    mEncParams->submb_pred = AVC_OFF;
+    mEncParams->rdopt_mode = AVC_OFF;
+    mEncParams->bidir_pred = AVC_OFF;
+    int32_t nMacroBlocks = ((((mVideoWidth + 15) >> 4) << 4) *
+            (((mVideoHeight + 15) >> 4) << 4)) >> 8;
+    uint32_t *sliceGroup = (uint32_t *) malloc(sizeof(uint32_t) * nMacroBlocks);
+    for (int ii = 0, idx = 0; ii < nMacroBlocks; ++ii) {
+        sliceGroup[ii] = idx++;
+        if (idx >= mEncParams->num_slice_group) {
+            idx = 0;
+        }
+    }
+    mEncParams->slice_group = sliceGroup;
+
+    mEncParams->use_overrun_buffer = AVC_OFF;
+
+    // Set IDR frame refresh interval
+    int32_t iFramesIntervalSec;
+    CHECK(meta->findInt32(kKeyIFramesInterval, &iFramesIntervalSec));
+    if (iFramesIntervalSec < 0) {
+        mEncParams->idr_period = -1;
+    } else if (iFramesIntervalSec == 0) {
+        mEncParams->idr_period = 1;  // All I frames
+    } else {
+        mEncParams->idr_period =
+            (iFramesIntervalSec * mVideoFrameRate);
+    }
+    LOGV("idr_period: %d, I-frames interval: %d seconds, and frame rate: %d",
+        mEncParams->idr_period, iFramesIntervalSec, mVideoFrameRate);
+
+    // Set profile and level
+    // If profile and level setting is not correct, failure
+    // is reported when the encoder is initialized.
+    mEncParams->profile = AVC_BASELINE;
+    mEncParams->level = AVC_LEVEL3_2;
+    int32_t profile, level;
+    if (meta->findInt32(kKeyVideoProfile, &profile)) {
+        mEncParams->profile = (AVCProfile) profile;
+    }
+    if (meta->findInt32(kKeyVideoLevel, &level)) {
+        mEncParams->level = (AVCLevel) level;
+    }
+
+
+    mFormat = new MetaData;
+    mFormat->setInt32(kKeyWidth, mVideoWidth);
+    mFormat->setInt32(kKeyHeight, mVideoHeight);
+    mFormat->setInt32(kKeyBitRate, mVideoBitRate);
+    mFormat->setInt32(kKeySampleRate, mVideoFrameRate);
+    mFormat->setInt32(kKeyColorFormat, mVideoColorFormat);
+    mFormat->setCString(kKeyMIMEType, MEDIA_MIMETYPE_VIDEO_AVC);
+    mFormat->setCString(kKeyDecoderComponent, "AVCEncoder");
+    return OK;
+}
+
+status_t AVCEncoder::start(MetaData *params) {
+    LOGV("start");
+    if (mInitCheck != OK) {
+        return mInitCheck;
+    }
+
+    if (mStarted) {
+        LOGW("Call start() when encoder already started");
+        return OK;
+    }
+
+    AVCEnc_Status err;
+    err = PVAVCEncInitialize(mHandle, mEncParams, NULL, NULL);
+    if (err != AVCENC_SUCCESS) {
+        LOGE("Failed to initialize the encoder: %d", err);
+        return UNKNOWN_ERROR;
+    }
+
+    mGroup = new MediaBufferGroup();
+    int32_t maxSize;
+    if (AVCENC_SUCCESS !=
+        PVAVCEncGetMaxOutputBufferSize(mHandle, &maxSize)) {
+        maxSize = 31584;  // Magic #
+    }
+    mGroup->add_buffer(new MediaBuffer(maxSize));
+
+    mSource->start(params);
+    mNumInputFrames = -2;  // 1st two buffers contain SPS and PPS
+    mStarted = true;
+    mSpsPpsHeaderReceived = false;
+    mReadyForNextFrame = true;
+    mIsIDRFrame = 0;
+
+    return OK;
+}
+
+status_t AVCEncoder::stop() {
+    LOGV("stop");
+    if (!mStarted) {
+        LOGW("Call stop() when encoder has not started");
+        return OK;
+    }
+
+    if (mInputBuffer) {
+        mInputBuffer->release();
+        mInputBuffer = NULL;
+    }
+
+    if (mGroup) {
+        delete mGroup;
+        mGroup = NULL;
+    }
+
+    if (mInputFrameData) {
+        delete mInputFrameData;
+        mInputFrameData = NULL;
+    }
+
+    PVAVCCleanUpEncoder(mHandle);
+    mSource->stop();
+    releaseOutputBuffers();
+    mStarted = false;
+
+    return OK;
+}
+
+void AVCEncoder::releaseOutputBuffers() {
+    LOGV("releaseOutputBuffers");
+    for (size_t i = 0; i < mOutputBuffers.size(); ++i) {
+        MediaBuffer *buffer = mOutputBuffers.editItemAt(i);
+        buffer->setObserver(NULL);
+        buffer->release();
+    }
+    mOutputBuffers.clear();
+}
+
+sp<MetaData> AVCEncoder::getFormat() {
+    LOGV("getFormat");
+    return mFormat;
+}
+
+status_t AVCEncoder::read(
+        MediaBuffer **out, const ReadOptions *options) {
+
+    CHECK(!options);
+    *out = NULL;
+
+    MediaBuffer *outputBuffer;
+    CHECK_EQ(OK, mGroup->acquire_buffer(&outputBuffer));
+    uint8_t *outPtr = (uint8_t *) outputBuffer->data();
+    uint32_t dataLength = outputBuffer->size();
+
+    int32_t type;
+    AVCEnc_Status encoderStatus = AVCENC_SUCCESS;
+
+    // Return SPS and PPS for the first two buffers
+    if (!mSpsPpsHeaderReceived) {
+        encoderStatus = PVAVCEncodeNAL(mHandle, outPtr, &dataLength, &type);
+        if (encoderStatus == AVCENC_WRONG_STATE) {
+            mSpsPpsHeaderReceived = true;
+            CHECK_EQ(0, mNumInputFrames);  // 1st video frame is 0
+        } else {
+            switch (type) {
+                case AVC_NALTYPE_SPS:
+                case AVC_NALTYPE_PPS:
+                    LOGV("%s received",
+                            (type == AVC_NALTYPE_SPS)? "SPS": "PPS");
+                    ++mNumInputFrames;
+                    outputBuffer->set_range(0, dataLength);
+                    *out = outputBuffer;
+                    return OK;
+                default:
+                    LOGE("Nal type (%d) other than SPS/PPS is unexpected", type);
+                    return UNKNOWN_ERROR;
+            }
+        }
+    }
+
+    // Get next input video frame
+    if (mReadyForNextFrame) {
+        if (mInputBuffer) {
+            mInputBuffer->release();
+            mInputBuffer = NULL;
+        }
+        status_t err = mSource->read(&mInputBuffer, options);
+        if (err != OK) {
+            LOGE("Failed to read input video frame: %d", err);
+            outputBuffer->release();
+            return err;
+        }
+        int64_t timeUs;
+        CHECK(mInputBuffer->meta_data()->findInt64(kKeyTime, &timeUs));
+        outputBuffer->meta_data()->setInt64(kKeyTime, timeUs);
+
+        AVCFrameIO videoInput;
+        memset(&videoInput, 0, sizeof(videoInput));
+        videoInput.height = ((mVideoHeight  + 15) >> 4) << 4;
+        videoInput.pitch = ((mVideoWidth + 15) >> 4) << 4;
+        videoInput.coding_timestamp = (timeUs + 500) / 1000;  // in ms
+        uint8_t *inputData = (uint8_t *) mInputBuffer->data();
+
+        if (mVideoColorFormat != OMX_COLOR_FormatYUV420Planar) {
+            CHECK(mInputFrameData);
+            CHECK(mVideoColorFormat == OMX_COLOR_FormatYUV420SemiPlanar);
+            ConvertYUV420SemiPlanarToYUV420Planar(
+                inputData, mInputFrameData, mVideoWidth, mVideoHeight);
+            inputData = mInputFrameData;
+        }
+        CHECK(inputData != NULL);
+        videoInput.YCbCr[0] = inputData;
+        videoInput.YCbCr[1] = videoInput.YCbCr[0] + videoInput.height * videoInput.pitch;
+        videoInput.YCbCr[2] = videoInput.YCbCr[1] +
+            ((videoInput.height * videoInput.pitch) >> 2);
+        videoInput.disp_order = mNumInputFrames;
+
+        encoderStatus = PVAVCEncSetInput(mHandle, &videoInput);
+        if (encoderStatus == AVCENC_SUCCESS ||
+            encoderStatus == AVCENC_NEW_IDR) {
+            mReadyForNextFrame = false;
+            ++mNumInputFrames;
+            if (encoderStatus == AVCENC_NEW_IDR) {
+                mIsIDRFrame = 1;
+            }
+        } else {
+            if (encoderStatus < AVCENC_SUCCESS) {
+                outputBuffer->release();
+                return UNKNOWN_ERROR;
+            } else {
+                outputBuffer->set_range(0, 0);
+                *out = outputBuffer;
+                return OK;
+            }
+        }
+    }
+
+    // Encode an input video frame
+    CHECK(encoderStatus == AVCENC_SUCCESS ||
+          encoderStatus == AVCENC_NEW_IDR);
+    dataLength = outputBuffer->size();  // Reset the output buffer length
+    encoderStatus = PVAVCEncodeNAL(mHandle, outPtr, &dataLength, &type);
+    if (encoderStatus == AVCENC_SUCCESS) {
+        outputBuffer->meta_data()->setInt32(kKeyIsSyncFrame, mIsIDRFrame);
+        CHECK_EQ(NULL, PVAVCEncGetOverrunBuffer(mHandle));
+    } else if (encoderStatus == AVCENC_PICTURE_READY) {
+        CHECK_EQ(NULL, PVAVCEncGetOverrunBuffer(mHandle));
+        if (mIsIDRFrame) {
+            outputBuffer->meta_data()->setInt32(kKeyIsSyncFrame, mIsIDRFrame);
+            mIsIDRFrame = 0;
+            LOGV("Output an IDR frame");
+        }
+        mReadyForNextFrame = true;
+        AVCFrameIO recon;
+        if (PVAVCEncGetRecon(mHandle, &recon) == AVCENC_SUCCESS) {
+            PVAVCEncReleaseRecon(mHandle, &recon);
+        }
+    } else {
+        dataLength = 0;
+        mReadyForNextFrame = true;
+    }
+    if (encoderStatus < AVCENC_SUCCESS) {
+        outputBuffer->release();
+        return UNKNOWN_ERROR;
+    }
+
+    outputBuffer->set_range(0, dataLength);
+    *out = outputBuffer;
+    return OK;
+}
+
+int32_t AVCEncoder::allocOutputBuffers(
+        unsigned int sizeInMbs, unsigned int numBuffers) {
+    CHECK(mOutputBuffers.isEmpty());
+    size_t frameSize = (sizeInMbs << 7) * 3;
+    for (unsigned int i = 0; i <  numBuffers; ++i) {
+        MediaBuffer *buffer = new MediaBuffer(frameSize);
+        buffer->setObserver(this);
+        mOutputBuffers.push(buffer);
+    }
+
+    return 1;
+}
+
+void AVCEncoder::unbindOutputBuffer(int32_t index) {
+    CHECK(index >= 0);
+}
+
+int32_t AVCEncoder::bindOutputBuffer(int32_t index, uint8_t **yuv) {
+    CHECK(index >= 0);
+    CHECK(index < (int32_t) mOutputBuffers.size());
+    int64_t timeUs;
+    CHECK(mInputBuffer->meta_data()->findInt64(kKeyTime, &timeUs));
+    mOutputBuffers[index]->meta_data()->setInt64(kKeyTime, timeUs);
+
+    *yuv = (uint8_t *) mOutputBuffers[index]->data();
+
+    return 1;
+}
+
+void AVCEncoder::signalBufferReturned(MediaBuffer *buffer) {
+}
+
+}  // namespace android
diff --git a/media/libstagefright/codecs/avc/enc/Android.mk b/media/libstagefright/codecs/avc/enc/Android.mk
new file mode 100644
index 0000000..100f239
--- /dev/null
+++ b/media/libstagefright/codecs/avc/enc/Android.mk
@@ -0,0 +1,35 @@
+LOCAL_PATH := $(call my-dir)
+include $(CLEAR_VARS)
+
+LOCAL_SRC_FILES := \
+    AVCEncoder.cpp \
+    src/avcenc_api.cpp \
+    src/bitstream_io.cpp \
+    src/block.cpp \
+    src/findhalfpel.cpp \
+    src/header.cpp \
+    src/init.cpp \
+    src/intra_est.cpp \
+    src/motion_comp.cpp \
+    src/motion_est.cpp \
+    src/rate_control.cpp \
+    src/residual.cpp \
+    src/sad.cpp \
+    src/sad_halfpel.cpp \
+    src/slice.cpp \
+    src/vlc_encode.cpp
+
+
+LOCAL_MODULE := libstagefright_avcenc
+
+LOCAL_C_INCLUDES := \
+    $(LOCAL_PATH)/src \
+    $(LOCAL_PATH)/../common/include \
+    $(TOP)/external/opencore/extern_libs_v2/khronos/openmax/include \
+    $(TOP)/frameworks/base/media/libstagefright/include
+
+LOCAL_CFLAGS := \
+    -D__arm__ \
+    -DOSCL_IMPORT_REF= -DOSCL_UNUSED_ARG= -DOSCL_EXPORT_REF=
+
+include $(BUILD_STATIC_LIBRARY)
diff --git a/media/libstagefright/codecs/avc/enc/src/avcenc_api.cpp b/media/libstagefright/codecs/avc/enc/src/avcenc_api.cpp
new file mode 100644
index 0000000..d39885d
--- /dev/null
+++ b/media/libstagefright/codecs/avc/enc/src/avcenc_api.cpp
@@ -0,0 +1,744 @@
+/* ------------------------------------------------------------------
+ * Copyright (C) 1998-2009 PacketVideo
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
+ * express or implied.
+ * See the License for the specific language governing permissions
+ * and limitations under the License.
+ * -------------------------------------------------------------------
+ */
+#include "avcenc_api.h"
+#include "avcenc_lib.h"
+
+/* ======================================================================== */
+/*  Function : PVAVCGetNALType()                                            */
+/*  Date     : 11/4/2003                                                    */
+/*  Purpose  : Sniff NAL type from the bitstream                            */
+/*  In/out   :                                                              */
+/*  Return   : AVCENC_SUCCESS if succeed, AVCENC_FAIL if fail.              */
+/*  Modified :                                                              */
+/* ======================================================================== */
+OSCL_EXPORT_REF AVCEnc_Status PVAVCEncGetNALType(unsigned char *bitstream, int size,
+        int *nal_type, int *nal_ref_idc)
+{
+    int forbidden_zero_bit;
+    if (size > 0)
+    {
+        forbidden_zero_bit = bitstream[0] >> 7;
+        if (forbidden_zero_bit != 0)
+            return AVCENC_FAIL;
+        *nal_ref_idc = (bitstream[0] & 0x60) >> 5;
+        *nal_type = bitstream[0] & 0x1F;
+        return AVCENC_SUCCESS;
+    }
+
+    return AVCENC_FAIL;
+}
+
+
+/* ======================================================================== */
+/*  Function : PVAVCEncInitialize()                                         */
+/*  Date     : 3/18/2004                                                    */
+/*  Purpose  : Initialize the encoder library, allocate memory and verify   */
+/*              the profile/level support/settings.                         */
+/*  In/out   : Encoding parameters.                                         */
+/*  Return   : AVCENC_SUCCESS for success.                                  */
+/*  Modified :                                                              */
+/* ======================================================================== */
+OSCL_EXPORT_REF AVCEnc_Status PVAVCEncInitialize(AVCHandle *avcHandle, AVCEncParams *encParam,
+        void* extSPS, void* extPPS)
+{
+    AVCEnc_Status status;
+    AVCEncObject *encvid;
+    AVCCommonObj *video;
+    uint32 *userData = (uint32*) avcHandle->userData;
+    int framesize;
+
+    if (avcHandle->AVCObject != NULL)
+    {
+        return AVCENC_ALREADY_INITIALIZED; /* It's already initialized, need to cleanup first */
+    }
+
+    /* not initialized */
+
+    /* allocate videoObject */
+    avcHandle->AVCObject = (void*)avcHandle->CBAVC_Malloc(userData, sizeof(AVCEncObject), DEFAULT_ATTR);
+    if (avcHandle->AVCObject == NULL)
+    {
+        return AVCENC_MEMORY_FAIL;
+    }
+
+    encvid = (AVCEncObject*) avcHandle->AVCObject;
+    memset(encvid, 0, sizeof(AVCEncObject)); /* reset everything */
+
+    encvid->enc_state = AVCEnc_Initializing;
+
+    encvid->avcHandle = avcHandle;
+
+    encvid->common = (AVCCommonObj*) avcHandle->CBAVC_Malloc(userData, sizeof(AVCCommonObj), DEFAULT_ATTR);
+    if (encvid->common == NULL)
+    {
+        return AVCENC_MEMORY_FAIL;
+    }
+
+    video = encvid->common;
+    memset(video, 0, sizeof(AVCCommonObj));
+
+    /* allocate bitstream structure */
+    encvid->bitstream = (AVCEncBitstream*) avcHandle->CBAVC_Malloc(userData, sizeof(AVCEncBitstream), DEFAULT_ATTR);
+    if (encvid->bitstream == NULL)
+    {
+        return AVCENC_MEMORY_FAIL;
+    }
+    encvid->bitstream->encvid = encvid; /* to point back for reallocation */
+
+    /* allocate sequence parameter set structure */
+    video->currSeqParams = (AVCSeqParamSet*) avcHandle->CBAVC_Malloc(userData, sizeof(AVCSeqParamSet), DEFAULT_ATTR);
+    if (video->currSeqParams == NULL)
+    {
+        return AVCENC_MEMORY_FAIL;
+    }
+    memset(video->currSeqParams, 0, sizeof(AVCSeqParamSet));
+
+    /* allocate picture parameter set structure */
+    video->currPicParams = (AVCPicParamSet*) avcHandle->CBAVC_Malloc(userData, sizeof(AVCPicParamSet), DEFAULT_ATTR);
+    if (video->currPicParams == NULL)
+    {
+        return AVCENC_MEMORY_FAIL;
+    }
+    memset(video->currPicParams, 0, sizeof(AVCPicParamSet));
+
+    /* allocate slice header structure */
+    video->sliceHdr = (AVCSliceHeader*) avcHandle->CBAVC_Malloc(userData, sizeof(AVCSliceHeader), DEFAULT_ATTR);
+    if (video->sliceHdr == NULL)
+    {
+        return AVCENC_MEMORY_FAIL;
+    }
+    memset(video->sliceHdr, 0, sizeof(AVCSliceHeader));
+
+    /* allocate encoded picture buffer structure*/
+    video->decPicBuf = (AVCDecPicBuffer*) avcHandle->CBAVC_Malloc(userData, sizeof(AVCDecPicBuffer), DEFAULT_ATTR);
+    if (video->decPicBuf == NULL)
+    {
+        return AVCENC_MEMORY_FAIL;
+    }
+    memset(video->decPicBuf, 0, sizeof(AVCDecPicBuffer));
+
+    /* allocate rate control structure */
+    encvid->rateCtrl = (AVCRateControl*) avcHandle->CBAVC_Malloc(userData, sizeof(AVCRateControl), DEFAULT_ATTR);
+    if (encvid->rateCtrl == NULL)
+    {
+        return AVCENC_MEMORY_FAIL;
+    }
+    memset(encvid->rateCtrl, 0, sizeof(AVCRateControl));
+
+    /* reset frame list, not really needed */
+    video->currPic = NULL;
+    video->currFS = NULL;
+    encvid->currInput = NULL;
+    video->prevRefPic = NULL;
+
+    /* now read encParams, and allocate dimension-dependent variables */
+    /* such as mblock */
+    status = SetEncodeParam(avcHandle, encParam, extSPS, extPPS); /* initialized variables to be used in SPS*/
+    if (status != AVCENC_SUCCESS)
+    {
+        return status;
+    }
+
+    if (encParam->use_overrun_buffer == AVC_ON)
+    {
+        /* allocate overrun buffer */
+        encvid->oBSize = encvid->rateCtrl->cpbSize;
+        if (encvid->oBSize > DEFAULT_OVERRUN_BUFFER_SIZE)
+        {
+            encvid->oBSize = DEFAULT_OVERRUN_BUFFER_SIZE;
+        }
+        encvid->overrunBuffer = (uint8*) avcHandle->CBAVC_Malloc(userData, encvid->oBSize, DEFAULT_ATTR);
+        if (encvid->overrunBuffer == NULL)
+        {
+            return AVCENC_MEMORY_FAIL;
+        }
+    }
+    else
+    {
+        encvid->oBSize = 0;
+        encvid->overrunBuffer = NULL;
+    }
+
+    /* allocate frame size dependent structures */
+    framesize = video->FrameHeightInMbs * video->PicWidthInMbs;
+
+    video->mblock = (AVCMacroblock*) avcHandle->CBAVC_Malloc(userData, sizeof(AVCMacroblock) * framesize, DEFAULT_ATTR);
+    if (video->mblock == NULL)
+    {
+        return AVCENC_MEMORY_FAIL;
+    }
+
+    video->MbToSliceGroupMap = (int*) avcHandle->CBAVC_Malloc(userData, sizeof(uint) * video->PicSizeInMapUnits * 2, DEFAULT_ATTR);
+    if (video->MbToSliceGroupMap == NULL)
+    {
+        return AVCENC_MEMORY_FAIL;
+    }
+
+    encvid->mot16x16 = (AVCMV*) avcHandle->CBAVC_Malloc(userData, sizeof(AVCMV) * framesize, DEFAULT_ATTR);
+    if (encvid->mot16x16 == NULL)
+    {
+        return AVCENC_MEMORY_FAIL;
+    }
+    memset(encvid->mot16x16, 0, sizeof(AVCMV)*framesize);
+
+    encvid->intraSearch = (uint8*) avcHandle->CBAVC_Malloc(userData, sizeof(uint8) * framesize, DEFAULT_ATTR);
+    if (encvid->intraSearch == NULL)
+    {
+        return AVCENC_MEMORY_FAIL;
+    }
+
+    encvid->min_cost = (int*) avcHandle->CBAVC_Malloc(userData, sizeof(int) * framesize, DEFAULT_ATTR);
+    if (encvid->min_cost == NULL)
+    {
+        return AVCENC_MEMORY_FAIL;
+    }
+
+    /* initialize motion search related memory */
+    if (AVCENC_SUCCESS != InitMotionSearchModule(avcHandle))
+    {
+        return AVCENC_MEMORY_FAIL;
+    }
+
+    if (AVCENC_SUCCESS != InitRateControlModule(avcHandle))
+    {
+        return AVCENC_MEMORY_FAIL;
+    }
+
+    /* intialize function pointers */
+    encvid->functionPointer = (AVCEncFuncPtr*) avcHandle->CBAVC_Malloc(userData, sizeof(AVCEncFuncPtr), DEFAULT_ATTR);
+    if (encvid->functionPointer == NULL)
+    {
+        return AVCENC_MEMORY_FAIL;
+    }
+    encvid->functionPointer->SAD_Macroblock = &AVCSAD_Macroblock_C;
+    encvid->functionPointer->SAD_MB_HalfPel[0] = NULL;
+    encvid->functionPointer->SAD_MB_HalfPel[1] = &AVCSAD_MB_HalfPel_Cxh;
+    encvid->functionPointer->SAD_MB_HalfPel[2] = &AVCSAD_MB_HalfPel_Cyh;
+    encvid->functionPointer->SAD_MB_HalfPel[3] = &AVCSAD_MB_HalfPel_Cxhyh;
+
+    /* initialize timing control */
+    encvid->modTimeRef = 0;     /* ALWAYS ASSUME THAT TIMESTAMP START FROM 0 !!!*/
+    video->prevFrameNum = 0;
+    encvid->prevCodedFrameNum = 0;
+    encvid->dispOrdPOCRef = 0;
+
+    if (encvid->outOfBandParamSet == TRUE)
+    {
+        encvid->enc_state = AVCEnc_Encoding_SPS;
+    }
+    else
+    {
+        encvid->enc_state = AVCEnc_Analyzing_Frame;
+    }
+
+    return AVCENC_SUCCESS;
+}
+
+/* ======================================================================== */
+/*  Function : PVAVCEncGetMaxOutputSize()                                   */
+/*  Date     : 11/29/2008                                                   */
+/*  Purpose  : Return max output buffer size that apps should allocate for  */
+/*              output buffer.                                              */
+/*  In/out   :                                                              */
+/*  Return   : AVCENC_SUCCESS for success.                                  */
+/*  Modified :   size                                                       */
+/* ======================================================================== */
+
+OSCL_EXPORT_REF AVCEnc_Status PVAVCEncGetMaxOutputBufferSize(AVCHandle *avcHandle, int* size)
+{
+    AVCEncObject *encvid = (AVCEncObject*)avcHandle->AVCObject;
+
+    if (encvid == NULL)
+    {
+        return AVCENC_UNINITIALIZED;
+    }
+
+    *size = encvid->rateCtrl->cpbSize;
+
+    return AVCENC_SUCCESS;
+}
+
+/* ======================================================================== */
+/*  Function : PVAVCEncSetInput()                                           */
+/*  Date     : 4/18/2004                                                    */
+/*  Purpose  : To feed an unencoded original frame to the encoder library.  */
+/*  In/out   :                                                              */
+/*  Return   : AVCENC_SUCCESS for success.                                  */
+/*  Modified :                                                              */
+/* ======================================================================== */
+OSCL_EXPORT_REF AVCEnc_Status PVAVCEncSetInput(AVCHandle *avcHandle, AVCFrameIO *input)
+{
+    AVCEncObject *encvid = (AVCEncObject*)avcHandle->AVCObject;
+    AVCCommonObj *video = encvid->common;
+    AVCRateControl *rateCtrl = encvid->rateCtrl;
+
+    AVCEnc_Status status;
+    uint frameNum;
+
+    if (encvid == NULL)
+    {
+        return AVCENC_UNINITIALIZED;
+    }
+
+    if (encvid->enc_state == AVCEnc_WaitingForBuffer)
+    {
+        goto RECALL_INITFRAME;
+    }
+    else if (encvid->enc_state != AVCEnc_Analyzing_Frame)
+    {
+        return AVCENC_FAIL;
+    }
+
+    if (input->pitch > 0xFFFF)
+    {
+        return AVCENC_NOT_SUPPORTED; // we use 2-bytes for pitch
+    }
+
+    /***********************************/
+
+    /* Let's rate control decide whether to encode this frame or not */
+    /* Also set video->nal_unit_type, sliceHdr->slice_type, video->slice_type */
+    if (AVCENC_SUCCESS != RCDetermineFrameNum(encvid, rateCtrl, input->coding_timestamp, &frameNum))
+    {
+        return AVCENC_SKIPPED_PICTURE; /* not time to encode, thus skipping */
+    }
+
+    /* we may not need this line */
+    //nextFrmModTime = (uint32)((((frameNum+1)*1000)/rateCtrl->frame_rate) + modTimeRef); /* rec. time */
+    //encvid->nextModTime = nextFrmModTime - (encvid->frameInterval>>1) - 1; /* between current and next frame */
+
+    encvid->currInput = input;
+    encvid->currInput->coding_order = frameNum;
+
+RECALL_INITFRAME:
+    /* initialize and analyze the frame */
+    status = InitFrame(encvid);
+
+    if (status == AVCENC_SUCCESS)
+    {
+        encvid->enc_state = AVCEnc_Encoding_Frame;
+    }
+    else if (status == AVCENC_NEW_IDR)
+    {
+        if (encvid->outOfBandParamSet == TRUE)
+        {
+            encvid->enc_state = AVCEnc_Encoding_Frame;
+        }
+        else // assuming that in-band paramset keeps sending new SPS and PPS.
+        {
+            encvid->enc_state = AVCEnc_Encoding_SPS;
+            //video->currSeqParams->seq_parameter_set_id++;
+            //if(video->currSeqParams->seq_parameter_set_id > 31) // range check
+            {
+                video->currSeqParams->seq_parameter_set_id = 0;  // reset
+            }
+        }
+
+        video->sliceHdr->idr_pic_id++;
+        if (video->sliceHdr->idr_pic_id > 65535) // range check
+        {
+            video->sliceHdr->idr_pic_id = 0;  // reset
+        }
+    }
+    /* the following logics need to be revisited */
+    else if (status == AVCENC_PICTURE_READY) // no buffers returned back to the encoder
+    {
+        encvid->enc_state = AVCEnc_WaitingForBuffer; // Input accepted but can't continue
+        // need to free up some memory before proceeding with Encode
+    }
+
+    return status; // return status, including the AVCENC_FAIL case and all 3 above.
+}
+
+/* ======================================================================== */
+/*  Function : PVAVCEncodeNAL()                                             */
+/*  Date     : 4/29/2004                                                    */
+/*  Purpose  : To encode one NAL/slice.                                     */
+/*  In/out   :                                                              */
+/*  Return   : AVCENC_SUCCESS for success.                                  */
+/*  Modified :                                                              */
+/* ======================================================================== */
+OSCL_EXPORT_REF AVCEnc_Status PVAVCEncodeNAL(AVCHandle *avcHandle, unsigned char *buffer, unsigned int *buf_nal_size, int *nal_type)
+{
+    AVCEncObject *encvid = (AVCEncObject*)avcHandle->AVCObject;
+    AVCCommonObj *video = encvid->common;
+    AVCEncBitstream *bitstream = encvid->bitstream;
+    AVCEnc_Status status;
+
+    if (encvid == NULL)
+    {
+        return AVCENC_UNINITIALIZED;
+    }
+
+    switch (encvid->enc_state)
+    {
+        case AVCEnc_Initializing:
+            return AVCENC_UNINITIALIZED;
+        case AVCEnc_Encoding_SPS:
+            /* initialized the structure */
+            BitstreamEncInit(bitstream, buffer, *buf_nal_size, NULL, 0);
+            BitstreamWriteBits(bitstream, 8, (1 << 5) | AVC_NALTYPE_SPS);
+
+            /* encode SPS */
+            status = EncodeSPS(encvid, bitstream);
+            if (status != AVCENC_SUCCESS)
+            {
+                return status;
+            }
+
+            /* closing the NAL with trailing bits */
+            status = BitstreamTrailingBits(bitstream, buf_nal_size);
+            if (status == AVCENC_SUCCESS)
+            {
+                encvid->enc_state = AVCEnc_Encoding_PPS;
+                video->currPicParams->seq_parameter_set_id = video->currSeqParams->seq_parameter_set_id;
+                video->currPicParams->pic_parameter_set_id++;
+                *nal_type = AVC_NALTYPE_SPS;
+                *buf_nal_size = bitstream->write_pos;
+            }
+            break;
+        case AVCEnc_Encoding_PPS:
+            /* initialized the structure */
+            BitstreamEncInit(bitstream, buffer, *buf_nal_size, NULL, 0);
+            BitstreamWriteBits(bitstream, 8, (1 << 5) | AVC_NALTYPE_PPS);
+
+            /* encode PPS */
+            status = EncodePPS(encvid, bitstream);
+            if (status != AVCENC_SUCCESS)
+            {
+                return status;
+            }
+
+            /* closing the NAL with trailing bits */
+            status = BitstreamTrailingBits(bitstream, buf_nal_size);
+            if (status == AVCENC_SUCCESS)
+            {
+                if (encvid->outOfBandParamSet == TRUE) // already extract PPS, SPS
+                {
+                    encvid->enc_state = AVCEnc_Analyzing_Frame;
+                }
+                else    // SetInput has been called before SPS and PPS.
+                {
+                    encvid->enc_state = AVCEnc_Encoding_Frame;
+                }
+
+                *nal_type = AVC_NALTYPE_PPS;
+                *buf_nal_size = bitstream->write_pos;
+            }
+            break;
+
+        case AVCEnc_Encoding_Frame:
+            /* initialized the structure */
+            BitstreamEncInit(bitstream, buffer, *buf_nal_size, encvid->overrunBuffer, encvid->oBSize);
+            BitstreamWriteBits(bitstream, 8, (video->nal_ref_idc << 5) | (video->nal_unit_type));
+
+            /* Re-order the reference list according to the ref_pic_list_reordering() */
+            /* We don't have to reorder the list for the encoder here. This can only be done
+            after we encode this slice. We can run thru a second-pass to see if new ordering
+            would save more bits. Too much delay !! */
+            /* status = ReOrderList(video);*/
+            status = InitSlice(encvid);
+            if (status != AVCENC_SUCCESS)
+            {
+                return status;
+            }
+
+            /* when we have everything, we encode the slice header */
+            status = EncodeSliceHeader(encvid, bitstream);
+            if (status != AVCENC_SUCCESS)
+            {
+                return status;
+            }
+
+            status = AVCEncodeSlice(encvid);
+
+            video->slice_id++;
+
+            /* closing the NAL with trailing bits */
+            BitstreamTrailingBits(bitstream, buf_nal_size);
+
+            *buf_nal_size = bitstream->write_pos;
+
+            encvid->rateCtrl->numFrameBits += ((*buf_nal_size) << 3);
+
+            *nal_type = video->nal_unit_type;
+
+            if (status == AVCENC_PICTURE_READY)
+            {
+                status = RCUpdateFrame(encvid);
+                if (status == AVCENC_SKIPPED_PICTURE) /* skip current frame */
+                {
+                    DPBReleaseCurrentFrame(avcHandle, video);
+                    encvid->enc_state = AVCEnc_Analyzing_Frame;
+
+                    return status;
+                }
+
+                /* perform loop-filtering on the entire frame */
+                DeblockPicture(video);
+
+                /* update the original frame array */
+                encvid->prevCodedFrameNum = encvid->currInput->coding_order;
+
+                /* store the encoded picture in the DPB buffer */
+                StorePictureInDPB(avcHandle, video);
+
+                if (video->currPic->isReference)
+                {
+                    video->PrevRefFrameNum = video->sliceHdr->frame_num;
+                }
+
+                /* update POC related variables */
+                PostPOC(video);
+
+                encvid->enc_state = AVCEnc_Analyzing_Frame;
+                status = AVCENC_PICTURE_READY;
+
+            }
+            break;
+        default:
+            status = AVCENC_WRONG_STATE;
+    }
+
+    return status;
+}
+
+/* ======================================================================== */
+/*  Function : PVAVCEncGetOverrunBuffer()                                   */
+/*  Purpose  : To retrieve the overrun buffer. Check whether overrun buffer */
+/*              is used or not before returning                             */
+/*  In/out   :                                                              */
+/*  Return   : Pointer to the internal overrun buffer.                      */
+/*  Modified :                                                              */
+/* ======================================================================== */
+OSCL_EXPORT_REF uint8* PVAVCEncGetOverrunBuffer(AVCHandle* avcHandle)
+{
+    AVCEncObject *encvid = (AVCEncObject*)avcHandle->AVCObject;
+    AVCEncBitstream *bitstream = encvid->bitstream;
+
+    if (bitstream->overrunBuffer == bitstream->bitstreamBuffer) /* OB is used */
+    {
+        return encvid->overrunBuffer;
+    }
+    else
+    {
+        return NULL;
+    }
+}
+
+
+/* ======================================================================== */
+/*  Function : PVAVCEncGetRecon()                                           */
+/*  Date     : 4/29/2004                                                    */
+/*  Purpose  : To retrieve the most recently encoded frame.                 */
+/*              assume that user will make a copy if they want to hold on   */
+/*              to it. Otherwise, it is not guaranteed to be reserved.      */
+/*              Most applications prefer to see original frame rather than  */
+/*              reconstructed frame. So, we are staying aware from complex  */
+/*              buffering mechanism. If needed, can be added later.         */
+/*  In/out   :                                                              */
+/*  Return   : AVCENC_SUCCESS for success.                                  */
+/*  Modified :                                                              */
+/* ======================================================================== */
+OSCL_EXPORT_REF AVCEnc_Status PVAVCEncGetRecon(AVCHandle *avcHandle, AVCFrameIO *recon)
+{
+    AVCEncObject *encvid = (AVCEncObject*)avcHandle->AVCObject;
+    AVCCommonObj *video = encvid->common;
+    AVCFrameStore *currFS = video->currFS;
+
+    if (encvid == NULL)
+    {
+        return AVCENC_UNINITIALIZED;
+    }
+
+    recon->YCbCr[0] = currFS->frame.Sl;
+    recon->YCbCr[1] = currFS->frame.Scb;
+    recon->YCbCr[2] = currFS->frame.Scr;
+    recon->height = currFS->frame.height;
+    recon->pitch = currFS->frame.pitch;
+    recon->disp_order = currFS->PicOrderCnt;
+    recon->coding_order = currFS->FrameNum;
+    recon->id = (uint32) currFS->base_dpb; /* use the pointer as the id */
+
+    currFS->IsOutputted |= 1;
+
+    return AVCENC_SUCCESS;
+}
+
+OSCL_EXPORT_REF AVCEnc_Status PVAVCEncReleaseRecon(AVCHandle *avcHandle, AVCFrameIO *recon)
+{
+    OSCL_UNUSED_ARG(avcHandle);
+    OSCL_UNUSED_ARG(recon);
+
+    return AVCENC_SUCCESS; //for now
+}
+
+/* ======================================================================== */
+/*  Function : PVAVCCleanUpEncoder()                                        */
+/*  Date     : 4/18/2004                                                    */
+/*  Purpose  : To clean up memories allocated by PVAVCEncInitialize()       */
+/*  In/out   :                                                              */
+/*  Return   : AVCENC_SUCCESS for success.                                  */
+/*  Modified :                                                              */
+/* ======================================================================== */
+OSCL_EXPORT_REF void    PVAVCCleanUpEncoder(AVCHandle *avcHandle)
+{
+    AVCEncObject *encvid = (AVCEncObject*) avcHandle->AVCObject;
+    AVCCommonObj *video;
+    uint32 *userData = (uint32*) avcHandle->userData;
+
+    if (encvid != NULL)
+    {
+        CleanMotionSearchModule(avcHandle);
+
+        CleanupRateControlModule(avcHandle);
+
+        if (encvid->functionPointer != NULL)
+        {
+            avcHandle->CBAVC_Free(userData, (int)encvid->functionPointer);
+        }
+
+        if (encvid->min_cost)
+        {
+            avcHandle->CBAVC_Free(userData, (int)encvid->min_cost);
+        }
+
+        if (encvid->intraSearch)
+        {
+            avcHandle->CBAVC_Free(userData, (int)encvid->intraSearch);
+        }
+
+        if (encvid->mot16x16)
+        {
+            avcHandle->CBAVC_Free(userData, (int)encvid->mot16x16);
+        }
+
+        if (encvid->rateCtrl)
+        {
+            avcHandle->CBAVC_Free(userData, (int)encvid->rateCtrl);
+        }
+
+        if (encvid->overrunBuffer)
+        {
+            avcHandle->CBAVC_Free(userData, (int)encvid->overrunBuffer);
+        }
+
+        video = encvid->common;
+        if (video != NULL)
+        {
+            if (video->MbToSliceGroupMap)
+            {
+                avcHandle->CBAVC_Free(userData, (int)video->MbToSliceGroupMap);
+            }
+            if (video->mblock != NULL)
+            {
+                avcHandle->CBAVC_Free(userData, (int)video->mblock);
+            }
+            if (video->decPicBuf != NULL)
+            {
+                CleanUpDPB(avcHandle, video);
+                avcHandle->CBAVC_Free(userData, (int)video->decPicBuf);
+            }
+            if (video->sliceHdr != NULL)
+            {
+                avcHandle->CBAVC_Free(userData, (int)video->sliceHdr);
+            }
+            if (video->currPicParams != NULL)
+            {
+                if (video->currPicParams->slice_group_id)
+                {
+                    avcHandle->CBAVC_Free(userData, (int)video->currPicParams->slice_group_id);
+                }
+
+                avcHandle->CBAVC_Free(userData, (int)video->currPicParams);
+            }
+            if (video->currSeqParams != NULL)
+            {
+                avcHandle->CBAVC_Free(userData, (int)video->currSeqParams);
+            }
+            if (encvid->bitstream != NULL)
+            {
+                avcHandle->CBAVC_Free(userData, (int)encvid->bitstream);
+            }
+            if (video != NULL)
+            {
+                avcHandle->CBAVC_Free(userData, (int)video);
+            }
+        }
+
+        avcHandle->CBAVC_Free(userData, (int)encvid);
+
+        avcHandle->AVCObject = NULL;
+    }
+
+    return ;
+}
+
+OSCL_EXPORT_REF AVCEnc_Status PVAVCEncUpdateBitRate(AVCHandle *avcHandle, uint32 bitrate)
+{
+    OSCL_UNUSED_ARG(avcHandle);
+    OSCL_UNUSED_ARG(bitrate);
+
+    return AVCENC_FAIL;
+}
+
+OSCL_EXPORT_REF AVCEnc_Status PVAVCEncUpdateFrameRate(AVCHandle *avcHandle, uint32 num, uint32 denom)
+{
+    OSCL_UNUSED_ARG(avcHandle);
+    OSCL_UNUSED_ARG(num);
+    OSCL_UNUSED_ARG(denom);
+
+    return AVCENC_FAIL;
+}
+
+OSCL_EXPORT_REF AVCEnc_Status PVAVCEncUpdateIDRInterval(AVCHandle *avcHandle, int IDRInterval)
+{
+    OSCL_UNUSED_ARG(avcHandle);
+    OSCL_UNUSED_ARG(IDRInterval);
+
+    return AVCENC_FAIL;
+}
+
+OSCL_EXPORT_REF AVCEnc_Status PVAVCEncIDRRequest(AVCHandle *avcHandle)
+{
+    OSCL_UNUSED_ARG(avcHandle);
+
+    return AVCENC_FAIL;
+}
+
+OSCL_EXPORT_REF AVCEnc_Status PVAVCEncUpdateIMBRefresh(AVCHandle *avcHandle, int numMB)
+{
+    OSCL_UNUSED_ARG(avcHandle);
+    OSCL_UNUSED_ARG(numMB);
+
+    return AVCENC_FAIL;
+}
+
+void PVAVCEncGetFrameStats(AVCHandle *avcHandle, AVCEncFrameStats *avcStats)
+{
+    AVCEncObject *encvid = (AVCEncObject*) avcHandle->AVCObject;
+    AVCRateControl *rateCtrl = encvid->rateCtrl;
+
+    avcStats->avgFrameQP = GetAvgFrameQP(rateCtrl);
+    avcStats->numIntraMBs = encvid->numIntraMB;
+
+    return ;
+}
+
+
+
diff --git a/media/libstagefright/codecs/avc/enc/src/avcenc_api.h b/media/libstagefright/codecs/avc/enc/src/avcenc_api.h
new file mode 100644
index 0000000..6841ec3
--- /dev/null
+++ b/media/libstagefright/codecs/avc/enc/src/avcenc_api.h
@@ -0,0 +1,323 @@
+/* ------------------------------------------------------------------
+ * Copyright (C) 1998-2009 PacketVideo
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
+ * express or implied.
+ * See the License for the specific language governing permissions
+ * and limitations under the License.
+ * -------------------------------------------------------------------
+ */
+/**
+This file contains application function interfaces to the AVC encoder library
+and necessary type defitionitions and enumerations.
+@publishedAll
+*/
+
+#ifndef AVCENC_API_H_INCLUDED
+#define AVCENC_API_H_INCLUDED
+
+#ifndef AVCAPI_COMMON_H_INCLUDED
+#include "avcapi_common.h"
+#endif
+
+// For memset, etc
+#include <string.h>
+
+/**
+ This enumeration is used for the status returned from the library interface.
+*/
+typedef enum
+{
+    /**
+    Fail information, need to add more error code for more specific info
+    */
+    AVCENC_TRAILINGONES_FAIL = -35,
+    AVCENC_SLICE_EMPTY = -34,
+    AVCENC_POC_FAIL = -33,
+    AVCENC_CONSECUTIVE_NONREF = -32,
+    AVCENC_CABAC_FAIL = -31,
+    AVCENC_PRED_WEIGHT_TAB_FAIL = -30,
+    AVCENC_DEC_REF_PIC_MARK_FAIL = -29,
+    AVCENC_SPS_FAIL = -28,
+    AVCENC_BITSTREAM_BUFFER_FULL    = -27,
+    AVCENC_BITSTREAM_INIT_FAIL = -26,
+    AVCENC_CHROMA_QP_FAIL = -25,
+    AVCENC_INIT_QS_FAIL = -24,
+    AVCENC_INIT_QP_FAIL = -23,
+    AVCENC_WEIGHTED_BIPRED_FAIL = -22,
+    AVCENC_INVALID_INTRA_PERIOD = -21,
+    AVCENC_INVALID_CHANGE_RATE = -20,
+    AVCENC_INVALID_BETA_OFFSET = -19,
+    AVCENC_INVALID_ALPHA_OFFSET = -18,
+    AVCENC_INVALID_DEBLOCK_IDC = -17,
+    AVCENC_INVALID_REDUNDANT_PIC = -16,
+    AVCENC_INVALID_FRAMERATE = -15,
+    AVCENC_INVALID_NUM_SLICEGROUP = -14,
+    AVCENC_INVALID_POC_LSB = -13,
+    AVCENC_INVALID_NUM_REF = -12,
+    AVCENC_INVALID_FMO_TYPE = -11,
+    AVCENC_ENCPARAM_MEM_FAIL = -10,
+    AVCENC_LEVEL_NOT_SUPPORTED = -9,
+    AVCENC_LEVEL_FAIL = -8,
+    AVCENC_PROFILE_NOT_SUPPORTED = -7,
+    AVCENC_TOOLS_NOT_SUPPORTED = -6,
+    AVCENC_WRONG_STATE = -5,
+    AVCENC_UNINITIALIZED = -4,
+    AVCENC_ALREADY_INITIALIZED = -3,
+    AVCENC_NOT_SUPPORTED = -2,
+    AVCENC_MEMORY_FAIL = AVC_MEMORY_FAIL,
+    AVCENC_FAIL = AVC_FAIL,
+    /**
+    Generic success value
+    */
+    AVCENC_SUCCESS = AVC_SUCCESS,
+    AVCENC_PICTURE_READY = 2,
+    AVCENC_NEW_IDR = 3, /* upon getting this, users have to call PVAVCEncodeSPS and PVAVCEncodePPS to get a new SPS and PPS*/
+    AVCENC_SKIPPED_PICTURE = 4 /* continuable error message */
+
+} AVCEnc_Status;
+
+#define MAX_NUM_SLICE_GROUP  8      /* maximum for all the profiles */
+
+/**
+This structure contains the encoding parameters.
+*/
+typedef struct tagAVCEncParam
+{
+    /* if profile/level is set to zero, encoder will choose the closest one for you */
+    AVCProfile profile; /* profile of the bitstream to be compliant with*/
+    AVCLevel   level;   /* level of the bitstream to be compliant with*/
+
+    int width;      /* width of an input frame in pixel */
+    int height;     /* height of an input frame in pixel */
+
+    int poc_type; /* picture order count mode, 0,1 or 2 */
+    /* for poc_type == 0 */
+    uint log2_max_poc_lsb_minus_4; /* specify maximum value of POC Lsb, range 0..12*/
+    /* for poc_type == 1 */
+    uint delta_poc_zero_flag; /* delta POC always zero */
+    int offset_poc_non_ref; /* offset for non-reference pic */
+    int offset_top_bottom; /* offset between top and bottom field */
+    uint num_ref_in_cycle; /* number of reference frame in one cycle */
+    int *offset_poc_ref; /* array of offset for ref pic, dimension [num_ref_in_cycle] */
+
+    int num_ref_frame;  /* number of reference frame used */
+    int num_slice_group;  /* number of slice group */
+    int fmo_type;   /* 0: interleave, 1: dispersed, 2: foreground with left-over
+                    3: box-out, 4:raster scan, 5:wipe, 6:explicit */
+    /* for fmo_type == 0 */
+    uint run_length_minus1[MAX_NUM_SLICE_GROUP];   /* array of size num_slice_group, in round robin fasion */
+    /* fmo_type == 2*/
+    uint top_left[MAX_NUM_SLICE_GROUP-1];           /* array of co-ordinates of each slice_group */
+    uint bottom_right[MAX_NUM_SLICE_GROUP-1];       /* except the last one which is the background. */
+    /* fmo_type == 3,4,5 */
+    AVCFlag change_dir_flag;  /* slice group change direction flag */
+    uint change_rate_minus1;
+    /* fmo_type == 6 */
+    uint *slice_group; /* array of size MBWidth*MBHeight */
+
+    AVCFlag db_filter;  /* enable deblocking loop filter */
+    int disable_db_idc;  /* 0: filter everywhere, 1: no filter, 2: no filter across slice boundary */
+    int alpha_offset;   /* alpha offset range -6,...,6 */
+    int beta_offset;    /* beta offset range -6,...,6 */
+
+    AVCFlag constrained_intra_pred; /* constrained intra prediction flag */
+
+    AVCFlag auto_scd;   /* scene change detection on or off */
+    int idr_period; /* idr frame refresh rate in number of target encoded frame (no concept of actual time).*/
+    int intramb_refresh;    /* minimum number of intra MB per frame */
+    AVCFlag data_par;   /* enable data partitioning */
+
+    AVCFlag fullsearch; /* enable full-pel full-search mode */
+    int search_range;   /* search range for motion vector in (-search_range,+search_range) pixels */
+    AVCFlag sub_pel;    /* enable sub pel prediction */
+    AVCFlag submb_pred; /* enable sub MB partition mode */
+    AVCFlag rdopt_mode; /* RD optimal mode selection */
+    AVCFlag bidir_pred; /* enable bi-directional for B-slice, this flag forces the encoder to encode
+                        any frame with POC less than the previously encoded frame as a B-frame.
+                        If it's off, then such frames will remain P-frame. */
+
+    AVCFlag rate_control; /* rate control enable, on: RC on, off: constant QP */
+    int initQP;     /* initial QP */
+    uint32 bitrate;    /* target encoding bit rate in bits/second */
+    uint32 CPB_size;  /* coded picture buffer in number of bits */
+    uint32 init_CBP_removal_delay; /* initial CBP removal delay in msec */
+
+    uint32 frame_rate;  /* frame rate in the unit of frames per 1000 second */
+    /* note, frame rate is only needed by the rate control, AVC is timestamp agnostic. */
+
+    AVCFlag out_of_band_param_set; /* flag to set whether param sets are to be retrieved up front or not */
+
+    AVCFlag use_overrun_buffer;  /* do not throw away the frame if output buffer is not big enough.
+                                    copy excess bits to the overrun buffer */
+} AVCEncParams;
+
+
+/**
+This structure contains current frame encoding statistics for debugging purpose.
+*/
+typedef struct tagAVCEncFrameStats
+{
+    int avgFrameQP;   /* average frame QP */
+    int numIntraMBs;  /* number of intra MBs */
+    int numFalseAlarm;
+    int numMisDetected;
+    int numDetected;
+
+} AVCEncFrameStats;
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+    /** THE FOLLOWINGS ARE APIS */
+    /**
+    This function initializes the encoder library. It verifies the validity of the
+    encoding parameters against the specified profile/level and the list of supported
+    tools by this library. It allocates necessary memories required to perform encoding.
+    For re-encoding application, if users want to setup encoder in a more precise way,
+    users can give the external SPS and PPS to the encoder to follow.
+    \param "avcHandle"  "Handle to the AVC encoder library object."
+    \param "encParam"   "Pointer to the encoding parameter structure."
+    \param "extSPS"     "External SPS used for re-encoding purpose. NULL if not present"
+    \param "extPPS"     "External PPS used for re-encoding purpose. NULL if not present"
+    \return "AVCENC_SUCCESS for success,
+             AVCENC_NOT_SUPPORTED for the use of unsupported tools,
+             AVCENC_MEMORY_FAIL for memory allocation failure,
+             AVCENC_FAIL for generic failure."
+    */
+    OSCL_IMPORT_REF AVCEnc_Status PVAVCEncInitialize(AVCHandle *avcHandle, AVCEncParams *encParam, void* extSPS, void* extPPS);
+
+
+    /**
+    Since the output buffer size is not known prior to encoding a frame, users need to
+    allocate big enough buffer otherwise, that frame will be dropped. This function returns
+    the size of the output buffer to be allocated by the users that guarantees to hold one frame.
+    It follows the CPB spec for a particular level.  However, when the users set use_overrun_buffer
+    flag, this API is useless as excess output bits are saved in the overrun buffer waiting to be
+    copied out in small chunks, i.e. users can allocate any size of output buffer.
+    \param "avcHandle"  "Handle to the AVC encoder library object."
+    \param "size"   "Pointer to the size to be modified."
+    \return "AVCENC_SUCCESS for success, AVCENC_UNINITIALIZED when level is not known.
+    */
+
+    OSCL_IMPORT_REF AVCEnc_Status PVAVCEncGetMaxOutputBufferSize(AVCHandle *avcHandle, int* size);
+
+    /**
+    Users call this function to provide an input structure to the encoder library which will keep
+    a list of input structures it receives in case the users call this function many time before
+    calling PVAVCEncodeSlice. The encoder library will encode them according to the frame_num order.
+    Users should not modify the content of a particular frame until this frame is encoded and
+    returned thru CBAVCEnc_ReturnInput() callback function.
+    \param "avcHandle"  "Handle to the AVC encoder library object."
+    \param "input"      "Pointer to the input structure."
+    \return "AVCENC_SUCCESS for success,
+            AVCENC_FAIL if the encoder is not in the right state to take a new input frame.
+            AVCENC_NEW_IDR for the detection or determination of a new IDR, with this status,
+            the returned NAL is an SPS NAL,
+            AVCENC_NO_PICTURE if the input frame coding timestamp is too early, users must
+            get next frame or adjust the coding timestamp."
+    */
+    OSCL_IMPORT_REF AVCEnc_Status PVAVCEncSetInput(AVCHandle *avcHandle, AVCFrameIO *input);
+
+    /**
+    This function is called to encode a NAL unit which can be an SPS NAL, a PPS NAL or
+    a VCL (video coding layer) NAL which contains one slice of data. It could be a
+    fixed number of macroblocks, as specified in the encoder parameters set, or the
+    maximum number of macroblocks fitted into the given input argument "buffer". The
+    input frame is taken from the oldest unencoded input frame retrieved by users by
+    PVAVCEncGetInput API.
+    \param "avcHandle"  "Handle to the AVC encoder library object."
+    \param "buffer"     "Pointer to the output AVC bitstream buffer, the format will be EBSP,
+                         not RBSP."
+    \param "buf_nal_size"   "As input, the size of the buffer in bytes.
+                        This is the physical limitation of the buffer. As output, the size of the EBSP."
+    \param "nal_type"   "Pointer to the NAL type of the returned buffer."
+    \return "AVCENC_SUCCESS for success of encoding one slice,
+             AVCENC_PICTURE_READY for the completion of a frame encoding,
+             AVCENC_FAIL for failure (this should not occur, though)."
+    */
+    OSCL_IMPORT_REF AVCEnc_Status PVAVCEncodeNAL(AVCHandle *avcHandle, uint8 *buffer, uint *buf_nal_size, int *nal_type);
+
+    /**
+    This function sniffs the nal_unit_type such that users can call corresponding APIs.
+    This function is identical to PVAVCDecGetNALType() in the decoder.
+    \param "bitstream"  "Pointer to the beginning of a NAL unit (start with forbidden_zero_bit, etc.)."
+    \param "size"       "size of the bitstream (NumBytesInNALunit + 1)."
+    \param "nal_unit_type" "Pointer to the return value of nal unit type."
+    \return "AVCENC_SUCCESS if success, AVCENC_FAIL otherwise."
+    */
+    OSCL_IMPORT_REF AVCEnc_Status PVAVCEncGetNALType(uint8 *bitstream, int size, int *nal_type, int *nal_ref_idc);
+
+    /**
+    This function returns the pointer to internal overrun buffer. Users can call this to query
+    whether the overrun buffer has been used to encode the current NAL.
+    \param "avcHandle"  "Pointer to the handle."
+    \return "Pointer to overrun buffer if it is used, otherwise, NULL."
+    */
+    OSCL_IMPORT_REF uint8* PVAVCEncGetOverrunBuffer(AVCHandle* avcHandle);
+
+    /**
+    This function returns the reconstructed frame of the most recently encoded frame.
+    Note that this frame is not returned to the users yet. Users should only read the
+    content of this frame.
+    \param "avcHandle"  "Handle to the AVC encoder library object."
+    \param "output"     "Pointer to the input structure."
+    \return "AVCENC_SUCCESS for success, AVCENC_NO_PICTURE if no picture to be outputted."
+    */
+    OSCL_IMPORT_REF AVCEnc_Status PVAVCEncGetRecon(AVCHandle *avcHandle, AVCFrameIO *recon);
+
+    /**
+    This function is used to return the recontructed frame back to the AVC encoder library
+    in order to be re-used for encoding operation. If users want the content of it to remain
+    unchanged for a long time, they should make a copy of it and release the memory back to
+    the encoder. The encoder relies on the id element in the AVCFrameIO structure,
+    thus users should not change the id value.
+    \param "avcHandle"  "Handle to the AVC decoder library object."
+    \param "output"      "Pointer to the AVCFrameIO structure."
+    \return "AVCENC_SUCCESS for success, AVCENC_FAIL for fail for id not found."
+    */
+    OSCL_IMPORT_REF AVCEnc_Status PVAVCEncReleaseRecon(AVCHandle *avcHandle, AVCFrameIO *recon);
+
+    /**
+    This function performs clean up operation including memory deallocation.
+    The encoder will also clear the list of input structures it has not released.
+    This implies that users must keep track of the number of input structure they have allocated
+    and free them accordingly.
+    \param "avcHandle"  "Handle to the AVC encoder library object."
+    */
+    OSCL_IMPORT_REF void    PVAVCCleanUpEncoder(AVCHandle *avcHandle);
+
+    /**
+    This function extracts statistics of the current frame. If the encoder has not finished
+    with the current frame, the result is not accurate.
+    \param "avcHandle"  "Handle to the AVC encoder library object."
+    \param "avcStats"   "Pointer to AVCEncFrameStats structure."
+    \return "void."
+    */
+    void PVAVCEncGetFrameStats(AVCHandle *avcHandle, AVCEncFrameStats *avcStats);
+
+    /**
+    These functions are used for the modification of encoding parameters.
+    To be polished.
+    */
+    OSCL_IMPORT_REF AVCEnc_Status PVAVCEncUpdateBitRate(AVCHandle *avcHandle, uint32 bitrate);
+    OSCL_IMPORT_REF AVCEnc_Status PVAVCEncUpdateFrameRate(AVCHandle *avcHandle, uint32 num, uint32 denom);
+    OSCL_IMPORT_REF AVCEnc_Status PVAVCEncUpdateIDRInterval(AVCHandle *avcHandle, int IDRInterval);
+    OSCL_IMPORT_REF AVCEnc_Status PVAVCEncIDRRequest(AVCHandle *avcHandle);
+    OSCL_IMPORT_REF AVCEnc_Status PVAVCEncUpdateIMBRefresh(AVCHandle *avcHandle, int numMB);
+
+
+#ifdef __cplusplus
+}
+#endif
+#endif  /* _AVCENC_API_H_ */
+
diff --git a/media/libstagefright/codecs/avc/enc/src/avcenc_int.h b/media/libstagefright/codecs/avc/enc/src/avcenc_int.h
new file mode 100644
index 0000000..3fe08a1
--- /dev/null
+++ b/media/libstagefright/codecs/avc/enc/src/avcenc_int.h
@@ -0,0 +1,471 @@
+/* ------------------------------------------------------------------
+ * Copyright (C) 1998-2009 PacketVideo
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
+ * express or implied.
+ * See the License for the specific language governing permissions
+ * and limitations under the License.
+ * -------------------------------------------------------------------
+ */
+/**
+This file contains application function interfaces to the AVC encoder library
+and necessary type defitionitions and enumerations.
+@publishedAll
+*/
+
+#ifndef AVCENC_INT_H_INCLUDED
+#define AVCENC_INT_H_INCLUDED
+
+#ifndef AVCINT_COMMON_H_INCLUDED
+#include "avcint_common.h"
+#endif
+#ifndef AVCENC_API_H_INCLUDED
+#include "avcenc_api.h"
+#endif
+
+typedef float OsclFloat;
+
+/* Definition for the structures below */
+#define DEFAULT_ATTR    0 /* default memory attribute */
+#define MAX_INPUT_FRAME 30 /* some arbitrary number, it can be much higher than this. */
+#define MAX_REF_FRAME  16 /* max size of the RefPicList0 and RefPicList1 */
+#define MAX_REF_PIC_LIST 33
+
+#define MIN_QP          0
+#define MAX_QP          51
+#define SHIFT_QP        12
+#define  LAMBDA_ACCURACY_BITS         16
+#define  LAMBDA_FACTOR(lambda)        ((int)((double)(1<<LAMBDA_ACCURACY_BITS)*lambda+0.5))
+
+
+#define DISABLE_THRESHOLDING  0
+// for better R-D performance
+#define _LUMA_COEFF_COST_       4 //!< threshold for luma coeffs
+#define _CHROMA_COEFF_COST_     4 //!< threshold for chroma coeffs, used to be 7
+#define _LUMA_MB_COEFF_COST_    5 //!< threshold for luma coeffs of inter Macroblocks
+#define _LUMA_8x8_COEFF_COST_   5 //!< threshold for luma coeffs of 8x8 Inter Partition
+#define MAX_VALUE       999999   //!< used for start value for some variables
+
+#define  WEIGHTED_COST(factor,bits)   (((factor)*(bits))>>LAMBDA_ACCURACY_BITS)
+#define  MV_COST(f,s,cx,cy,px,py)     (WEIGHTED_COST(f,mvbits[((cx)<<(s))-px]+mvbits[((cy)<<(s))-py]))
+#define  MV_COST_S(f,cx,cy,px,py)     (WEIGHTED_COST(f,mvbits[cx-px]+mvbits[cy-py]))
+
+/* for sub-pel search and interpolation */
+#define SUBPEL_PRED_BLK_SIZE 576 // 24x24
+#define REF_CENTER 75
+#define V2Q_H0Q 1
+#define V0Q_H2Q 2
+#define V2Q_H2Q 3
+
+/*
+#define V3Q_H0Q 1
+#define V3Q_H1Q 2
+#define V0Q_H1Q 3
+#define V1Q_H1Q 4
+#define V1Q_H0Q 5
+#define V1Q_H3Q 6
+#define V0Q_H3Q 7
+#define V3Q_H3Q 8
+#define V2Q_H3Q 9
+#define V2Q_H0Q 10
+#define V2Q_H1Q 11
+#define V2Q_H2Q 12
+#define V3Q_H2Q 13
+#define V0Q_H2Q 14
+#define V1Q_H2Q 15
+*/
+
+
+#define DEFAULT_OVERRUN_BUFFER_SIZE 1000
+
+// associated with the above cost model
+const uint8 COEFF_COST[2][16] =
+{
+    {3, 2, 2, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
+    {9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9}
+};
+
+
+
+//! convert from H.263 QP to H.264 quant given by: quant=pow(2,QP/6)
+const int QP2QUANT[40] =
+{
+    1, 1, 1, 1, 2, 2, 2, 2,
+    3, 3, 3, 4, 4, 4, 5, 6,
+    6, 7, 8, 9, 10, 11, 13, 14,
+    16, 18, 20, 23, 25, 29, 32, 36,
+    40, 45, 51, 57, 64, 72, 81, 91
+};
+
+
+/**
+This enumeration keeps track of the internal status of the encoder whether it is doing
+something. The encoding flow follows the order in which these states are.
+@publishedAll
+*/
+typedef enum
+{
+    AVCEnc_Initializing = 0,
+    AVCEnc_Encoding_SPS,
+    AVCEnc_Encoding_PPS,
+    AVCEnc_Analyzing_Frame,
+    AVCEnc_WaitingForBuffer,  // pending state
+    AVCEnc_Encoding_Frame,
+} AVCEnc_State ;
+
+/**
+Bitstream structure contains bitstream related parameters such as the pointer
+to the buffer, the current byte position and bit position. The content of the
+bitstreamBuffer will be in EBSP format as the emulation prevention codes are
+automatically inserted as the RBSP is recorded.
+@publishedAll
+*/
+typedef struct tagEncBitstream
+{
+    uint8 *bitstreamBuffer; /* pointer to buffer memory   */
+    int buf_size;       /* size of the buffer memory */
+    int write_pos;      /* next position to write to bitstreamBuffer  */
+    int count_zeros;   /* count number of consecutive zero */
+    uint current_word;  /* byte-swapped (MSB left) current word to write to buffer */
+    int bit_left;      /* number of bit left in current_word */
+    uint8   *overrunBuffer;  /* extra output buffer to prevent current skip due to output buffer overrun*/
+    int     oBSize;     /* size of allocated overrun buffer */
+    void   *encvid; /* pointer to the main object */
+
+} AVCEncBitstream;
+
+/**
+This structure is used for rate control purpose and other performance related control
+variables such as, RD cost, statistics, motion search stuffs, etc.
+should be in this structure.
+@publishedAll
+*/
+
+
+typedef struct tagRDInfo
+{
+    int QP;
+    int actual_bits;
+    OsclFloat mad;
+    OsclFloat R_D;
+} RDInfo;
+
+typedef struct tagMultiPass
+{
+    /* multipass rate control data */
+    int target_bits;    /* target bits for current frame, = rc->T */
+    int actual_bits;    /* actual bits for current frame obtained after encoding, = rc->Rc*/
+    int QP;             /* quantization level for current frame, = rc->Qc*/
+    int prev_QP;        /* quantization level for previous frame */
+    int prev_prev_QP;   /* quantization level for previous frame before last*/
+    OsclFloat mad;          /* mad for current frame, = video->avgMAD*/
+    int bitrate;        /* bitrate for current frame */
+    OsclFloat framerate;    /* framerate for current frame*/
+
+    int nRe_Quantized;  /* control variable for multipass encoding, */
+    /* 0 : first pass */
+    /* 1 : intermediate pass(quantization and VLC loop only) */
+    /* 2 : final pass(de-quantization, idct, etc) */
+    /* 3 : macroblock level rate control */
+
+    int encoded_frames;     /* counter for all encoded frames */
+    int re_encoded_frames;  /* counter for all multipass encoded frames*/
+    int re_encoded_times;   /* counter for all times of multipass frame encoding */
+
+    /* Multiple frame prediction*/
+    RDInfo **pRDSamples;        /* pRDSamples[30][32], 30->30fps, 32 -> 5 bit quantizer, 32 candidates*/
+    int framePos;               /* specific position in previous multiple frames*/
+    int frameRange;             /* number of overall previous multiple frames */
+    int samplesPerFrame[30];    /* number of samples per frame, 30->30fps */
+
+    /* Bit allocation for scene change frames and high motion frames */
+    OsclFloat sum_mad;
+    int counter_BTsrc;  /* BT = Bit Transfer, bit transfer from low motion frames or less complicatedly compressed frames */
+    int counter_BTdst;  /* BT = Bit Transfer, bit transfer to scene change frames or high motion frames or more complicatedly compressed frames */
+    OsclFloat sum_QP;
+    int diff_counter;   /* diff_counter = -diff_counter_BTdst, or diff_counter_BTsrc */
+
+    /* For target bitrate or framerate update */
+    OsclFloat target_bits_per_frame;        /* = C = bitrate/framerate */
+    OsclFloat target_bits_per_frame_prev;   /* previous C */
+    OsclFloat aver_mad;                     /* so-far average mad could replace sum_mad */
+    OsclFloat aver_mad_prev;                /* previous average mad */
+    int   overlapped_win_size;          /* transition period of time */
+    int   encoded_frames_prev;          /* previous encoded_frames */
+} MultiPass;
+
+
+typedef struct tagdataPointArray
+{
+    int Qp;
+    int Rp;
+    OsclFloat Mp;   /* for MB-based RC */
+    struct tagdataPointArray *next;
+    struct tagdataPointArray *prev;
+} dataPointArray;
+
+typedef struct tagAVCRateControl
+{
+
+    /* these parameters are initialized by the users AVCEncParams */
+    /* bitrate-robustness tradeoff */
+    uint scdEnable; /* enable scene change detection */
+    int idrPeriod;  /* IDR period in number of frames */
+    int intraMBRate;   /* intra MB refresh rate per frame */
+    uint dpEnable;  /* enable data partitioning */
+
+    /* quality-complexity tradeoff */
+    uint subPelEnable;  /* enable quarter pel search */
+    int mvRange;    /* motion vector search range in +/- pixel */
+    uint subMBEnable;  /* enable sub MB prediction mode (4x4, 4x8, 8x4) */
+    uint rdOptEnable;  /* enable RD-opt mode selection */
+    uint twoPass; /* flag for 2 pass encoding ( for future )*/
+    uint bidirPred; /* bi-directional prediction for B-frame. */
+
+    uint rcEnable;  /* enable rate control, '1' on, '0' const QP */
+    int initQP; /* initial QP */
+
+    /* note the following 3 params are for HRD, these triplets can be a series
+    of triplets as the generalized HRD allows. SEI message must be generated in this case. */
+    /* We no longer have to differentiate between CBR and VBR. The users to the
+    AVC encoder lib will do the mapping from CBR/VBR to these parameters. */
+    int32 bitRate;  /* target bit rate for the overall clip in bits/second*/
+    int32 cpbSize;  /* coded picture buffer size in bytes */
+    int32 initDelayOffset; /* initial CBP removal delay in bits */
+
+    OsclFloat frame_rate; /* frame rate */
+    int srcInterval; /* source frame rate in msec */
+    int basicUnit;  /* number of macroblocks per BU */
+
+    /* Then internal parameters for the operation */
+    uint first_frame; /* a flag for the first frame */
+    int lambda_mf; /* for example */
+    int totalSAD;    /* SAD of current frame */
+
+    /*******************************************/
+    /* this part comes from MPEG4 rate control */
+    int alpha;  /* weight for I frame */
+    int Rs;     /*bit rate for the sequence (or segment) e.g., 24000 bits/sec */
+    int Rc;     /*bits used for the current frame. It is the bit count obtained after encoding. */
+    int Rp;     /*bits to be removed from the buffer per picture. */
+    /*? is this the average one, or just the bits coded for the previous frame */
+    int Rps;    /*bit to be removed from buffer per src frame */
+    OsclFloat Ts;   /*number of seconds for the sequence  (or segment). e.g., 10 sec */
+    OsclFloat Ep;
+    OsclFloat Ec;   /*mean absolute difference for the current frame after motion compensation.*/
+    /*If the macroblock is intra coded, the original spatial pixel values are summed.*/
+    int Qc;     /*quantization level used for the current frame. */
+    int Nr;     /*number of P frames remaining for encoding.*/
+    int Rr; /*number of bits remaining for encoding this sequence (or segment).*/
+    int Rr_Old;
+    int T;      /*target bit to be used for the current frame.*/
+    int S;      /*number of bits used for encoding the previous frame.*/
+    int Hc; /*header and motion vector bits used in the current frame. It includes all the  information except to the residual information.*/
+    int Hp; /*header and motion vector bits used in the previous frame. It includes all the     information except to the residual information.*/
+    int Ql; /*quantization level used in the previous frame */
+    int Bs; /*buffer size e.g., R/2 */
+    int B;      /*current buffer level e.g., R/4 - start from the middle of the buffer */
+    OsclFloat X1;
+    OsclFloat X2;
+    OsclFloat X11;
+    OsclFloat M;            /*safe margin for the buffer */
+    OsclFloat smTick;    /*ratio of src versus enc frame rate */
+    double remnant;  /*remainder frame of src/enc frame for fine frame skipping */
+    int timeIncRes; /* vol->timeIncrementResolution */
+
+    dataPointArray   *end; /*quantization levels for the past (20) frames */
+
+    int     frameNumber; /* ranging from 0 to 20 nodes*/
+    int     w;
+    int     Nr_Original;
+    int     Nr_Old, Nr_Old2;
+    int     skip_next_frame;
+    int     Qdep;       /* smooth Q adjustment */
+    int     VBR_Enabled;
+
+    int totalFrameNumber; /* total coded frames, for debugging!!*/
+
+    char    oFirstTime;
+
+    int numFrameBits; /* keep track of number of bits of the current frame */
+    int NumberofHeaderBits;
+    int NumberofTextureBits;
+    int numMBHeaderBits;
+    int numMBTextureBits;
+    double *MADofMB;
+    int32 bitsPerFrame;
+
+    /* BX rate control, something like TMN8 rate control*/
+
+    MultiPass *pMP;
+
+    int     TMN_W;
+    int     TMN_TH;
+    int     VBV_fullness;
+    int     max_BitVariance_num; /* the number of the maximum bit variance within the given buffer with the unit of 10% of bitrate/framerate*/
+    int     encoded_frames; /* counter for all encoded frames */
+    int     low_bound;              /* bound for underflow detection, usually low_bound=-Bs/2, but could be changed in H.263 mode */
+    int     VBV_fullness_offset;    /* offset of VBV_fullness, usually is zero, but can be changed in H.263 mode*/
+    /* End BX */
+
+} AVCRateControl;
+
+
+/**
+This structure is for the motion vector information. */
+typedef struct tagMV
+{
+    int x;
+    int y;
+    uint sad;
+} AVCMV;
+
+/**
+This structure contains function pointers for different platform dependent implementation of
+functions. */
+typedef struct tagAVCEncFuncPtr
+{
+
+    int (*SAD_MB_HalfPel[4])(uint8*, uint8*, int, void *);
+    int (*SAD_Macroblock)(uint8 *ref, uint8 *blk, int dmin_lx, void *extra_info);
+
+} AVCEncFuncPtr;
+
+/**
+This structure contains information necessary for correct padding.
+*/
+typedef struct tagPadInfo
+{
+    int i;
+    int width;
+    int j;
+    int height;
+} AVCPadInfo;
+
+
+#ifdef HTFM
+typedef struct tagHTFM_Stat
+{
+    int abs_dif_mad_avg;
+    uint countbreak;
+    int offsetArray[16];
+    int offsetRef[16];
+} HTFM_Stat;
+#endif
+
+
+/**
+This structure is the main object for AVC encoder library providing access to all
+global variables. It is allocated at PVAVCInitEncoder and freed at PVAVCCleanUpEncoder.
+@publishedAll
+*/
+typedef struct tagEncObject
+{
+
+    AVCCommonObj *common;
+
+    AVCEncBitstream     *bitstream; /* for current NAL */
+    uint8   *overrunBuffer;  /* extra output buffer to prevent current skip due to output buffer overrun*/
+    int     oBSize;     /* size of allocated overrun buffer */
+
+    /* rate control */
+    AVCRateControl      *rateCtrl; /* pointer to the rate control structure */
+
+    /* encoding operation */
+    AVCEnc_State        enc_state; /* encoding state */
+
+    AVCFrameIO          *currInput; /* pointer to the current input frame */
+
+    int                 currSliceGroup; /* currently encoded slice group id */
+
+    int     level[24][16], run[24][16]; /* scratch memory */
+    int     leveldc[16], rundc[16]; /* for DC component */
+    int     levelcdc[16], runcdc[16]; /* for chroma DC component */
+    int     numcoefcdc[2]; /* number of coefficient for chroma DC */
+    int     numcoefdc;      /* number of coefficients for DC component */
+
+    int     qp_const;
+    int     qp_const_c;
+    /********* intra prediction scratch memory **********************/
+    uint8   pred_i16[AVCNumI16PredMode][256]; /* save prediction for MB */
+    uint8   pred_i4[AVCNumI4PredMode][16];  /* save prediction for blk */
+    uint8   pred_ic[AVCNumIChromaMode][128];  /* for 2 chroma */
+
+    int     mostProbableI4Mode[16]; /* in raster scan order */
+    /********* motion compensation related variables ****************/
+    AVCMV   *mot16x16;          /* Saved motion vectors for 16x16 block*/
+    AVCMV(*mot16x8)[2];     /* Saved motion vectors for 16x8 block*/
+    AVCMV(*mot8x16)[2];     /* Saved motion vectors for 8x16 block*/
+    AVCMV(*mot8x8)[4];      /* Saved motion vectors for 8x8 block*/
+
+    /********* subpel position **************************************/
+    uint32  subpel_pred[SUBPEL_PRED_BLK_SIZE/*<<2*/]; /* all 16 sub-pel positions  */
+    uint8   *hpel_cand[9];      /* pointer to half-pel position */
+    int     best_hpel_pos;          /* best position */
+    uint8   qpel_cand[8][24*16];        /* pointer to quarter-pel position */
+    int     best_qpel_pos;
+    uint8   *bilin_base[9][4];    /* pointer to 4 position at top left of bilinear quarter-pel */
+
+    /* need for intra refresh rate */
+    uint8   *intraSearch;       /* Intra Array for MBs to be intra searched */
+    uint    firstIntraRefreshMBIndx; /* keep track for intra refresh */
+
+    int     i4_sad;             /* temporary for i4 mode SAD */
+    int     *min_cost;          /* Minimum cost for the all MBs */
+    int     lambda_mode;        /* Lagrange parameter for mode selection */
+    int     lambda_motion;      /* Lagrange parameter for MV selection */
+
+    uint8   *mvbits_array;      /* Table for bits spent in the cost funciton */
+    uint8   *mvbits;            /* An offset to the above array. */
+
+    /* to speedup the SAD calculation */
+    void *sad_extra_info;
+    uint8 currYMB[256];     /* interleaved current macroblock in HTFM order */
+
+#ifdef HTFM
+    int nrmlz_th[48];       /* Threshold for fast SAD calculation using HTFM */
+    HTFM_Stat htfm_stat;    /* For statistics collection */
+#endif
+
+    /* statistics */
+    int numIntraMB;         /* keep track of number of intra MB */
+
+    /* encoding complexity control */
+    uint fullsearch_enable; /* flag to enable full-pel full-search */
+
+    /* misc.*/
+    bool outOfBandParamSet; /* flag to enable out-of-band param set */
+
+    AVCSeqParamSet extSPS; /* for external SPS */
+    AVCPicParamSet extPPS; /* for external PPS */
+
+    /* time control */
+    uint32  prevFrameNum;   /* previous frame number starting from modTimeRef */
+    uint32  modTimeRef;     /* Reference modTime update every I-Vop*/
+    uint32  wrapModTime;    /* Offset to modTime Ref, rarely used */
+
+    uint    prevProcFrameNum;  /* previously processed frame number, could be skipped */
+    uint    prevCodedFrameNum;  /* previously encoded frame number */
+    /* POC related variables */
+    uint32  dispOrdPOCRef;      /* reference POC is displayer order unit. */
+
+    /* Function pointers */
+    AVCEncFuncPtr *functionPointer; /* store pointers to platform specific functions */
+
+    /* Application control data */
+    AVCHandle *avcHandle;
+
+
+} AVCEncObject;
+
+
+#endif /*AVCENC_INT_H_INCLUDED*/
+
diff --git a/media/libstagefright/codecs/avc/enc/src/avcenc_lib.h b/media/libstagefright/codecs/avc/enc/src/avcenc_lib.h
new file mode 100644
index 0000000..17e28ef
--- /dev/null
+++ b/media/libstagefright/codecs/avc/enc/src/avcenc_lib.h
@@ -0,0 +1,1020 @@
+/* ------------------------------------------------------------------
+ * Copyright (C) 1998-2009 PacketVideo
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
+ * express or implied.
+ * See the License for the specific language governing permissions
+ * and limitations under the License.
+ * -------------------------------------------------------------------
+ */
+/**
+This file contains declarations of internal functions for AVC decoder library.
+@publishedAll
+*/
+#ifndef AVCENC_LIB_H_INCLUDED
+#define AVCENC_LIB_H_INCLUDED
+
+#ifndef AVCLIB_COMMON_H_INCLUDED
+#include "avclib_common.h"
+#endif
+#ifndef AVCENC_INT_H_INCLUDED
+#include "avcenc_int.h"
+#endif
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+    /*------------- block.c -------------------------*/
+
+    /**
+    This function perform residue calculation, transform, quantize, inverse quantize,
+    inverse transform and residue compensation on a 4x4 block.
+    \param "encvid" "Pointer to AVCEncObject."
+    \param "blkidx"  "raster scan block index of the current 4x4 block."
+    \param "cur"    "Pointer to the reconstructed block."
+    \param "org"    "Pointer to the original block."
+    \param "coef_cost"  "Pointer to the coefficient cost to be filled in and returned."
+    \return "Number of non-zero coefficients."
+    */
+    int dct_luma(AVCEncObject *encvid, int blkidx, uint8 *cur, uint8 *org, int *coef_cost);
+
+    /**
+    This function performs IDCT on an INTER macroblock.
+    \param "video"  "Pointer to AVCCommonObj."
+    \param "curL"   "Pointer to the origin of the macroblock on the current frame."
+    \param "currMB" "Pointer to the AVCMacroblock structure."
+    \param "picPitch" "Pitch of the current frame."
+    \return "void".
+    */
+    void MBInterIdct(AVCCommonObj *video, uint8 *curL, AVCMacroblock *currMB, int picPitch);
+
+    /**
+    This function perform residue calculation, transform, quantize, inverse quantize,
+    inverse transform and residue compensation on a macroblock.
+    \param "encvid" "Pointer to AVCEncObject."
+    \param "curL"   "Pointer to the reconstructed MB."
+    \param "orgL"    "Pointer to the original MB."
+    \return "void"
+    */
+    void dct_luma_16x16(AVCEncObject *encvid, uint8 *curL, uint8 *orgL);
+
+    /**
+    This function perform residue calculation, transform, quantize, inverse quantize,
+    inverse transform and residue compensation for chroma components of an MB.
+    \param "encvid" "Pointer to AVCEncObject."
+    \param "curC"   "Pointer to the reconstructed MB."
+    \param "orgC"    "Pointer to the original MB."
+    \param "cr"     "Flag whether it is Cr or not."
+    \return "void"
+    */
+    void dct_chroma(AVCEncObject *encvid, uint8 *curC, uint8 *orgC, int cr);
+
+    /*----------- init.c ------------------*/
+    /**
+    This function interprets the encoding parameters provided by users in encParam.
+    The results are kept in AVCEncObject, AVCSeqParamSet, AVCPicParamSet and AVCSliceHeader.
+    \param "encvid"     "Pointer to AVCEncObject."
+    \param "encParam"   "Pointer to AVCEncParam."
+    \param "extSPS"     "External SPS template to be followed. NULL if not present."
+    \param "extPPS"     "External PPS template to be followed. NULL if not present."
+    \return "see AVCEnc_Status."
+    */
+    AVCEnc_Status  SetEncodeParam(AVCHandle *avcHandle, AVCEncParams *encParam,
+                                  void *extSPS, void *extPPS);
+
+    /**
+    This function verifies the encoding parameters whether they meet the set of supported
+    tool by a specific profile. If the profile is not set, it will just find the closest
+    profile instead of verifying it.
+    \param "video"  "Pointer to AVCEncObject."
+    \param "seqParam"   "Pointer to AVCSeqParamSet."
+    \param "picParam"   "Pointer to AVCPicParamSet."
+    \return "AVCENC_SUCCESS if success,
+            AVCENC_PROFILE_NOT_SUPPORTED if the specified profile
+                is not supported by this version of the library,
+            AVCENC_TOOLS_NOT_SUPPORTED if any of the specified encoding tools are
+            not supported by the user-selected profile."
+    */
+    AVCEnc_Status VerifyProfile(AVCEncObject *video, AVCSeqParamSet *seqParam, AVCPicParamSet *picParam);
+
+    /**
+    This function verifies the encoding parameters whether they meet the requirement
+    for a specific level. If the level is not set, it will just find the closest
+    level instead of verifying it.
+    \param "video"  "Pointer to AVCEncObject."
+    \param "seqParam"   "Pointer to AVCSeqParamSet."
+    \param "picParam"   "Pointer to AVCPicParamSet."
+    \return "AVCENC_SUCCESS if success,
+            AVCENC_LEVEL_NOT_SUPPORTED if the specified level
+                is not supported by this version of the library,
+            AVCENC_LEVEL_FAIL if any of the encoding parameters exceed
+            the range of the user-selected level."
+    */
+    AVCEnc_Status VerifyLevel(AVCEncObject *video, AVCSeqParamSet *seqParam, AVCPicParamSet *picParam);
+
+    /**
+    This funciton initializes the frame encoding by setting poc/frame_num related parameters. it
+    also performs motion estimation.
+    \param "encvid" "Pointer to the AVCEncObject."
+    \return "AVCENC_SUCCESS if success, AVCENC_NO_PICTURE if there is no input picture
+            in the queue to encode, AVCENC_POC_FAIL or AVCENC_CONSECUTIVE_NONREF for POC
+            related errors, AVCENC_NEW_IDR if new IDR is detected."
+    */
+    AVCEnc_Status InitFrame(AVCEncObject *encvid);
+
+    /**
+    This function initializes slice header related variables and other variables necessary
+    for decoding one slice.
+    \param "encvid" "Pointer to the AVCEncObject."
+    \return "AVCENC_SUCCESS if success."
+    */
+    AVCEnc_Status InitSlice(AVCEncObject *encvid);
+
+    /*----------- header.c ----------------*/
+    /**
+    This function performs bitstream encoding of the sequence parameter set NAL.
+    \param "encvid" "Pointer to the AVCEncObject."
+    \param "stream" "Pointer to AVCEncBitstream."
+    \return "AVCENC_SUCCESS if success or AVCENC_SPS_FAIL or others for unexpected failure which
+    should not occur. The SPS parameters should all be verified before this function is called."
+    */
+    AVCEnc_Status EncodeSPS(AVCEncObject *encvid, AVCEncBitstream *stream);
+
+    /**
+    This function encodes the VUI parameters into the sequence parameter set bitstream.
+    \param "stream" "Pointer to AVCEncBitstream."
+    \param "vui"    "Pointer to AVCVUIParams."
+    \return "nothing."
+    */
+    void EncodeVUI(AVCEncBitstream* stream, AVCVUIParams* vui);
+
+    /**
+    This function encodes HRD parameters into the sequence parameter set bitstream
+    \param "stream" "Pointer to AVCEncBitstream."
+    \param "hrd"    "Pointer to AVCHRDParams."
+    \return "nothing."
+    */
+    void EncodeHRD(AVCEncBitstream* stream, AVCHRDParams* hrd);
+
+
+    /**
+    This function performs bitstream encoding of the picture parameter set NAL.
+    \param "encvid" "Pointer to the AVCEncObject."
+    \param "stream" "Pointer to AVCEncBitstream."
+    \return "AVCENC_SUCCESS if success or AVCENC_PPS_FAIL or others for unexpected failure which
+    should not occur. The SPS parameters should all be verified before this function is called."
+    */
+    AVCEnc_Status EncodePPS(AVCEncObject *encvid, AVCEncBitstream *stream);
+
+    /**
+    This function encodes slice header information which has been initialized or fabricated
+    prior to entering this funciton.
+    \param "encvid" "Pointer to the AVCEncObject."
+    \param "stream" "Pointer to AVCEncBitstream."
+    \return "AVCENC_SUCCESS if success or bitstream fail statuses."
+    */
+    AVCEnc_Status EncodeSliceHeader(AVCEncObject *encvid, AVCEncBitstream *stream);
+
+    /**
+    This function encodes reference picture list reordering relted syntax.
+    \param "video" "Pointer to AVCCommonObj."
+    \param "stream" "Pointer to AVCEncBitstream."
+    \param "sliceHdr" "Pointer to AVCSliceHdr."
+    \param "slice_type" "Value of slice_type - 5 if greater than 5."
+    \return "AVCENC_SUCCESS for success and AVCENC_FAIL otherwise."
+    */
+    AVCEnc_Status ref_pic_list_reordering(AVCCommonObj *video, AVCEncBitstream *stream, AVCSliceHeader *sliceHdr, int slice_type);
+
+    /**
+    This function encodes dec_ref_pic_marking related syntax.
+    \param "video" "Pointer to AVCCommonObj."
+    \param "stream" "Pointer to AVCEncBitstream."
+    \param "sliceHdr" "Pointer to AVCSliceHdr."
+    \return "AVCENC_SUCCESS for success and AVCENC_FAIL otherwise."
+    */
+    AVCEnc_Status dec_ref_pic_marking(AVCCommonObj *video, AVCEncBitstream *stream, AVCSliceHeader *sliceHdr);
+
+    /**
+    This function initializes the POC related variables and the POC syntax to be encoded
+    to the slice header derived from the disp_order and is_reference flag of the original
+    input frame to be encoded.
+    \param "video"  "Pointer to the AVCEncObject."
+    \return "AVCENC_SUCCESS if success,
+            AVCENC_POC_FAIL if the poc type is undefined or
+            AVCENC_CONSECUTIVE_NONREF if there are consecutive non-reference frame for POC type 2."
+    */
+    AVCEnc_Status InitPOC(AVCEncObject *video);
+
+    /**
+    This function performs POC related operation after a picture is decoded.
+    \param "video" "Pointer to AVCCommonObj."
+    \return "AVCENC_SUCCESS"
+    */
+    AVCEnc_Status PostPOC(AVCCommonObj *video);
+
+    /*----------- bitstream_io.c ----------------*/
+    /**
+    This function initializes the bitstream structure with the information given by
+    the users.
+    \param "bitstream"  "Pointer to the AVCEncBitstream structure."
+    \param "buffer"     "Pointer to the unsigned char buffer for output."
+    \param "buf_size"   "The size of the buffer in bytes."
+    \param "overrunBuffer"  "Pointer to extra overrun buffer."
+    \param "oBSize"     "Size of overrun buffer in bytes."
+    \return "AVCENC_SUCCESS if success, AVCENC_BITSTREAM_INIT_FAIL if fail"
+    */
+    AVCEnc_Status BitstreamEncInit(AVCEncBitstream *bitstream, uint8 *buffer, int buf_size,
+                                   uint8 *overrunBuffer, int oBSize);
+
+    /**
+    This function writes the data from the cache into the bitstream buffer. It also adds the
+    emulation prevention code if necessary.
+    \param "stream"     "Pointer to the AVCEncBitstream structure."
+    \return "AVCENC_SUCCESS if success or AVCENC_BITSTREAM_BUFFER_FULL if fail."
+    */
+    AVCEnc_Status AVCBitstreamSaveWord(AVCEncBitstream *stream);
+
+    /**
+    This function writes the codeword into the cache which will eventually be written to
+    the bitstream buffer.
+    \param "stream"     "Pointer to the AVCEncBitstream structure."
+    \param "nBits"      "Number of bits in the codeword."
+    \param "code"       "The codeword."
+    \return "AVCENC_SUCCESS if success or AVCENC_BITSTREAM_BUFFER_FULL if fail."
+    */
+    AVCEnc_Status BitstreamWriteBits(AVCEncBitstream *stream, int nBits, uint code);
+
+    /**
+    This function writes one bit of data into the cache which will eventually be written
+    to the bitstream buffer.
+    \param "stream"     "Pointer to the AVCEncBitstream structure."
+    \param "code"       "The codeword."
+    \return "AVCENC_SUCCESS if success or AVCENC_BITSTREAM_BUFFER_FULL if fail."
+    */
+    AVCEnc_Status BitstreamWrite1Bit(AVCEncBitstream *stream, uint code);
+
+    /**
+    This function adds trailing bits to the bitstream and reports back the final EBSP size.
+    \param "stream"     "Pointer to the AVCEncBitstream structure."
+    \param "nal_size"   "Output the final NAL size."
+    \return "AVCENC_SUCCESS if success or AVCENC_BITSTREAM_BUFFER_FULL if fail."
+    */
+    AVCEnc_Status BitstreamTrailingBits(AVCEncBitstream *bitstream, uint *nal_size);
+
+    /**
+    This function checks whether the current bit position is byte-aligned or not.
+    \param "stream" "Pointer to the bitstream structure."
+    \return "true if byte-aligned, false otherwise."
+    */
+    bool byte_aligned(AVCEncBitstream *stream);
+
+
+    /**
+    This function checks the availability of overrun buffer and switches to use it when
+    normal bufffer is not big enough.
+    \param "stream" "Pointer to the bitstream structure."
+    \param "numExtraBytes" "Number of extra byte needed."
+    \return "AVCENC_SUCCESS or AVCENC_FAIL."
+    */
+    AVCEnc_Status AVCBitstreamUseOverrunBuffer(AVCEncBitstream* stream, int numExtraBytes);
+
+
+    /*-------------- intra_est.c ---------------*/
+
+    /** This function performs intra/inter decision based on ABE.
+    \param "encvid" "Pointer to AVCEncObject."
+    \param "min_cost"   "Best inter cost."
+    \param "curL"   "Pointer to the current MB origin in reconstructed frame."
+    \param "picPitch" "Pitch of the reconstructed frame."
+    \return "Boolean for intra mode."
+    */
+
+//bool IntraDecisionABE(AVCEncObject *encvid, int min_cost, uint8 *curL, int picPitch);
+    bool IntraDecision(int *min_cost, uint8 *cur, int pitch, bool ave);
+
+    /**
+    This function performs intra prediction mode search.
+    \param "encvid" "Pointer to AVCEncObject."
+    \param "mbnum"  "Current MB number."
+    \param "curL"   "Pointer to the current MB origin in reconstructed frame."
+    \param "picPitch" "Pitch of the reconstructed frame."
+    \return "void."
+    */
+    void MBIntraSearch(AVCEncObject *encvid, int mbnum, uint8 *curL, int picPitch);
+
+    /**
+    This function generates all the I16 prediction modes for an MB and keep it in
+    encvid->pred_i16.
+    \param "encvid" "Pointer to AVCEncObject."
+    \return "void"
+    */
+    void intrapred_luma_16x16(AVCEncObject *encvid);
+
+    /**
+    This function calculate the cost of all I16 modes and compare them to get the minimum.
+    \param "encvid" "Pointer to AVCEncObject."
+    \param "orgY"   "Pointer to the original luma MB."
+    \param "min_cost" "Pointer to the minimal cost so-far."
+    \return "void"
+    */
+    void find_cost_16x16(AVCEncObject *encvid, uint8 *orgY, int *min_cost);
+
+    /**
+    This function calculates the cost of each I16 mode.
+    \param "org"    "Pointer to the original luma MB."
+    \param "org_pitch" "Stride size of the original frame."
+    \param "pred"   "Pointer to the prediction values."
+    \param "min_cost" "Minimal cost so-far."
+    \return "Cost"
+    */
+
+    int cost_i16(uint8 *org, int org_pitch, uint8 *pred, int min_cost);
+
+    /**
+    This function generates all the I4 prediction modes and select the best one
+    for all the blocks inside a macroblock.It also calls dct_luma to generate the reconstructed
+    MB, and transform coefficients to be encoded.
+    \param "encvid" "Pointer to AVCEncObject."
+    \param "min_cost" "Pointer to the minimal cost so-far."
+    \return "void"
+    */
+    void mb_intra4x4_search(AVCEncObject *encvid, int *min_cost);
+
+    /**
+    This function calculates the most probable I4 mode of a given 4x4 block
+    from neighboring informationaccording to AVC/H.264 standard.
+    \param "video"  "Pointer to AVCCommonObj."
+    \param "blkidx" "The current block index."
+    \return "Most probable mode."
+    */
+    int FindMostProbableI4Mode(AVCCommonObj *video, int blkidx);
+
+    /**
+    This function is where a lot of actions take place in the 4x4 block level inside
+    mb_intra4x4_search.
+    \param "encvid" "Pointer to AVCEncObject."
+    \param "blkidx" "The current 4x4 block index."
+    \param "cur"    "Pointer to the reconstructed block."
+    \param "org"    "Pointer to the original block."
+    \return "Minimal cost, also set currMB->i4Mode"
+    */
+    int blk_intra4x4_search(AVCEncObject *encvid, int blkidx, uint8 *cur, uint8 *org);
+
+    /**
+    This function calculates the cost of a given I4 prediction mode.
+    \param "org"    "Pointer to the original block."
+    \param "org_pitch"  "Stride size of the original frame."
+    \param "pred"   "Pointer to the prediction block. (encvid->pred_i4)"
+    \param "cost"   "Pointer to the minimal cost (to be updated)."
+    \return "void"
+    */
+    void cost_i4(uint8 *org, int org_pitch, uint8 *pred, uint16 *cost);
+
+    /**
+    This function performs chroma intra search. Each mode is saved in encvid->pred_ic.
+    \param "encvid" "Pointer to AVCEncObject."
+    \return "void"
+    */
+    void chroma_intra_search(AVCEncObject *encvid);
+
+    /**
+    This function calculates the cost of a chroma prediction mode.
+    \param "orgCb"  "Pointer to the original Cb block."
+    \param "orgCr"  "Pointer to the original Cr block."
+    \param "org_pitch"  "Stride size of the original frame."
+    \param "pred"   "Pointer to the prediction block (encvid->pred_ic)"
+    \param "mincost"    "Minimal cost so far."
+    \return "Cost."
+    */
+
+    int SATDChroma(uint8 *orgCb, uint8 *orgCr, int org_pitch, uint8 *pred, int mincost);
+
+    /*-------------- motion_comp.c ---------------*/
+
+    /**
+    This is a main function to peform inter prediction.
+    \param "encvid"     "Pointer to AVCEncObject."
+    \param "video"      "Pointer to AVCCommonObj."
+    \return "void".
+    */
+    void AVCMBMotionComp(AVCEncObject *encvid, AVCCommonObj *video);
+
+
+    /**
+    This function is called for luma motion compensation.
+    \param "ref"    "Pointer to the origin of a reference luma."
+    \param "picwidth"   "Width of the picture."
+    \param "picheight"  "Height of the picture."
+    \param "x_pos"  "X-coordinate of the predicted block in quarter pel resolution."
+    \param "y_pos"  "Y-coordinate of the predicted block in quarter pel resolution."
+    \param "pred"   "Pointer to the output predicted block."
+    \param "pred_pitch" "Width of pred."
+    \param "blkwidth"   "Width of the current partition."
+    \param "blkheight"  "Height of the current partition."
+    \return "void"
+    */
+    void eLumaMotionComp(uint8 *ref, int picwidth, int picheight,
+                         int x_pos, int y_pos,
+                         uint8 *pred, int pred_pitch,
+                         int blkwidth, int blkheight);
+
+    void eFullPelMC(uint8 *in, int inwidth, uint8 *out, int outpitch,
+                    int blkwidth, int blkheight);
+
+    void eHorzInterp1MC(uint8 *in, int inpitch, uint8 *out, int outpitch,
+                        int blkwidth, int blkheight, int dx);
+
+    void eHorzInterp2MC(int *in, int inpitch, uint8 *out, int outpitch,
+                        int blkwidth, int blkheight, int dx);
+
+    void eHorzInterp3MC(uint8 *in, int inpitch, int *out, int outpitch,
+                        int blkwidth, int blkheight);
+
+    void eVertInterp1MC(uint8 *in, int inpitch, uint8 *out, int outpitch,
+                        int blkwidth, int blkheight, int dy);
+
+    void eVertInterp2MC(uint8 *in, int inpitch, int *out, int outpitch,
+                        int blkwidth, int blkheight);
+
+    void eVertInterp3MC(int *in, int inpitch, uint8 *out, int outpitch,
+                        int blkwidth, int blkheight, int dy);
+
+    void eDiagonalInterpMC(uint8 *in1, uint8 *in2, int inpitch,
+                           uint8 *out, int outpitch,
+                           int blkwidth, int blkheight);
+
+    void eChromaMotionComp(uint8 *ref, int picwidth, int picheight,
+                           int x_pos, int y_pos, uint8 *pred, int pred_pitch,
+                           int blkwidth, int blkheight);
+
+    void eChromaDiagonalMC_SIMD(uint8 *pRef, int srcPitch, int dx, int dy,
+                                uint8 *pOut, int predPitch, int blkwidth, int blkheight);
+
+    void eChromaHorizontalMC_SIMD(uint8 *pRef, int srcPitch, int dx, int dy,
+                                  uint8 *pOut, int predPitch, int blkwidth, int blkheight);
+
+    void eChromaVerticalMC_SIMD(uint8 *pRef, int srcPitch, int dx, int dy,
+                                uint8 *pOut, int predPitch, int blkwidth, int blkheight);
+
+    void eChromaFullMC_SIMD(uint8 *pRef, int srcPitch, int dx, int dy,
+                            uint8 *pOut, int predPitch, int blkwidth, int blkheight);
+
+    void eChromaVerticalMC2_SIMD(uint8 *pRef, int srcPitch, int dx, int dy,
+                                 uint8 *pOut, int predPitch, int blkwidth, int blkheight);
+
+    void eChromaHorizontalMC2_SIMD(uint8 *pRef, int srcPitch, int dx, int dy,
+                                   uint8 *pOut, int predPitch, int blkwidth, int blkheight);
+
+    void eChromaDiagonalMC2_SIMD(uint8 *pRef, int srcPitch, int dx, int dy,
+                                 uint8 *pOut, int predPitch, int blkwidth, int blkheight);
+
+
+    /*-------------- motion_est.c ---------------*/
+
+    /**
+    Allocate and initialize arrays necessary for motion search algorithm.
+    \param "envid" "Pointer to AVCEncObject."
+    \return "AVC_SUCCESS or AVC_MEMORY_FAIL."
+    */
+    AVCEnc_Status InitMotionSearchModule(AVCHandle *avcHandle);
+
+    /**
+    Clean up memory allocated in InitMotionSearchModule.
+    \param "envid" "Pointer to AVCEncObject."
+    \return "void."
+    */
+    void CleanMotionSearchModule(AVCHandle *avcHandle);
+
+
+    /**
+    This function performs motion estimation of all macroblocks in a frame during the InitFrame.
+    The goal is to find the best MB partition for inter and find out if intra search is needed for
+    any MBs. This intra MB tendency can be used for scene change detection.
+    \param "encvid" "Pointer to AVCEncObject."
+    \return "void"
+    */
+    void AVCMotionEstimation(AVCEncObject *encvid);
+
+    /**
+    This function performs repetitive edge padding to the reference picture by adding 16 pixels
+    around the luma and 8 pixels around the chromas.
+    \param "refPic" "Pointer to the reference picture."
+    \return "void"
+    */
+    void  AVCPaddingEdge(AVCPictureData *refPic);
+
+    /**
+    This function keeps track of intra refresh macroblock locations.
+    \param "encvid" "Pointer to the global array structure AVCEncObject."
+    \param "mblock" "Pointer to the array of AVCMacroblock structures."
+    \param "totalMB" "Total number of MBs in a frame."
+    \param "numRefresh" "Number of MB to be intra refresh in a single frame."
+    \return "void"
+    */
+    void AVCRasterIntraUpdate(AVCEncObject *encvid, AVCMacroblock *mblock, int totalMB, int numRefresh);
+
+#ifdef HTFM
+    void InitHTFM(VideoEncData *encvid, HTFM_Stat *htfm_stat, double *newvar, int *collect);
+    void UpdateHTFM(AVCEncObject *encvid, double *newvar, double *exp_lamda, HTFM_Stat *htfm_stat);
+    void CalcThreshold(double pf, double exp_lamda[], int nrmlz_th[]);
+    void    HTFMPrepareCurMB_AVC(AVCEncObject *encvid, HTFM_Stat *htfm_stat, uint8 *cur, int pitch);
+#endif
+
+    /**
+    This function reads the input MB into a smaller faster memory space to minimize the cache miss.
+    \param "encvid" "Pointer to the global AVCEncObject."
+    \param "cur"    "Pointer to the original input macroblock."
+    \param "pitch"  "Stride size of the input frame (luma)."
+    \return "void"
+    */
+    void    AVCPrepareCurMB(AVCEncObject *encvid, uint8 *cur, int pitch);
+
+    /**
+    Performs motion vector search for a macroblock.
+    \param "encvid" "Pointer to AVCEncObject structure."
+    \param "cur"    "Pointer to the current macroblock in the input frame."
+    \param "best_cand" "Array of best candidates (to be filled in and returned)."
+    \param "i0"     "X-coordinate of the macroblock."
+    \param "j0"     "Y-coordinate of the macroblock."
+    \param "type_pred" "Indicates the type of operations."
+    \param "FS_en"      "Flag for fullsearch enable."
+    \param "hp_guess"   "Guess for half-pel search."
+    \return "void"
+    */
+    void AVCMBMotionSearch(AVCEncObject *encvid, uint8 *cur, uint8 *best_cand[],
+                           int i0, int j0, int type_pred, int FS_en, int *hp_guess);
+
+//AVCEnc_Status AVCMBMotionSearch(AVCEncObject *encvid, AVCMacroblock *currMB, int mbNum,
+//                           int num_pass);
+
+    /**
+    Perform full-pel exhaustive search around the predicted MV.
+    \param "encvid" "Pointer to AVCEncObject structure."
+    \param "prev"   "Pointer to the reference frame."
+    \param "cur"    "Pointer to the input macroblock."
+    \param "imin"   "Pointer to minimal mv (x)."
+    \param "jmin"   "Pointer to minimal mv (y)."
+    \param "ilow, ihigh, jlow, jhigh"   "Lower bound on search range."
+    \param "cmvx, cmvy" "Predicted MV value."
+
+    \return "The cost function of the best candidate."
+    */
+    int AVCFullSearch(AVCEncObject *encvid, uint8 *prev, uint8 *cur,
+                      int *imin, int *jmin, int ilow, int ihigh, int jlow, int jhigh,
+                      int cmvx, int cmvy);
+
+    /**
+    Select candidates from neighboring blocks according to the type of the
+    prediction selection.
+    \param "mvx"    "Pointer to the candidate, x-coordinate."
+    \param "mvy"    "Pointer to the candidate, y-coordinate."
+    \param "num_can"    "Pointer to the number of candidates returned."
+    \param "imb"    "The MB index x-coordinate."
+    \param "jmb"    "The MB index y-coordinate."
+    \param "type_pred"  "Type of the prediction."
+    \param "cmvx, cmvy" "Pointer to predicted MV (modified version)."
+    \return "void."
+    */
+    void AVCCandidateSelection(int *mvx, int *mvy, int *num_can, int imb, int jmb,
+                               AVCEncObject *encvid, int type_pred, int *cmvx, int *cmvy);
+
+    /**
+    Utility function to move the values in the array dn according to the new
+    location to avoid redundant calculation.
+    \param "dn" "Array of integer of size 9."
+    \param "new_loc"    "New location index."
+    \return "void."
+    */
+    void AVCMoveNeighborSAD(int dn[], int new_loc);
+
+    /**
+    Find minimum index of dn.
+    \param "dn" "Array of integer of size 9."
+    \return "The index of dn with the smallest dn[] value."
+    */
+    int AVCFindMin(int dn[]);
+
+
+    /*------------- findhalfpel.c -------------------*/
+
+    /**
+    Search for the best half-pel resolution MV around the full-pel MV.
+    \param "encvid" "Pointer to the global AVCEncObject structure."
+    \param "cur"    "Pointer to the current macroblock."
+    \param "mot"    "Pointer to the AVCMV array of the frame."
+    \param "ncand"  "Pointer to the origin of the fullsearch result."
+    \param "xpos"   "The current MB position in x."
+    \param "ypos"   "The current MB position in y."
+    \param "hp_guess"   "Input to help speedup the search."
+    \param "cmvx, cmvy" "Predicted motion vector use for mvcost."
+    \return "Minimal cost (SATD) without MV cost. (for rate control purpose)"
+    */
+    int AVCFindHalfPelMB(AVCEncObject *encvid, uint8 *cur, AVCMV *mot, uint8 *ncand,
+                         int xpos, int ypos, int hp_guess, int cmvx, int cmvy);
+
+    /**
+    This function generates sub-pel pixels required to do subpel MV search.
+    \param "subpel_pred" "Pointer to 2-D array, each array for each position."
+    \param "ncand" "Pointer to the full-pel center position in ref frame."
+    \param "lx" "Pitch of the ref frame."
+    \return "void"
+     */
+    void GenerateHalfPelPred(uint8 *subpel_pred, uint8 *ncand, int lx);
+
+    /**
+    This function calculate vertical interpolation at half-point of size 4x17.
+    \param "dst" "Pointer to destination."
+    \param "ref" "Pointer to the starting reference pixel."
+    \return "void."
+    */
+    void VertInterpWClip(uint8 *dst, uint8 *ref);
+
+    /**
+    This function generates quarter-pel pixels around the best half-pel result
+    during the sub-pel MV search.
+    \param "bilin_base"  "Array of pointers to be used as basis for q-pel interp."
+    \param "qpel_pred"  "Array of pointers pointing to quarter-pel candidates."
+    \param "hpel_pos" "Best half-pel position at the center."
+    \return "void"
+    */
+    void GenerateQuartPelPred(uint8 **bilin_base, uint8 *qpel_pred, int hpel_pos);
+
+    /**
+    This function calculates the SATD of a subpel candidate.
+    \param "cand"   "Pointer to a candidate."
+    \param "cur"    "Pointer to the current block."
+    \param "dmin"   "Min-so-far SATD."
+    \return "Sum of Absolute Transformed Difference."
+    */
+    int SATD_MB(uint8 *cand, uint8 *cur, int dmin);
+
+    /*------------- rate_control.c -------------------*/
+
+    /** This function is a utility function. It returns average QP of the previously encoded frame.
+    \param "rateCtrl" "Pointer to AVCRateControl structure."
+    \return "Average QP."
+    */
+    int GetAvgFrameQP(AVCRateControl *rateCtrl);
+
+    /**
+    This function takes the timestamp of the input and determine whether it should be encoded
+    or skipped.
+    \param "encvid" "Pointer to the AVCEncObject structure."
+    \param "rateCtrl"   "Pointer to the AVCRateControl structure."
+    \param "modTime"    "The 32 bit timestamp of the input frame."
+    \param "frameNum"   "Pointer to the frame number if to be encoded."
+    \return "AVC_SUCCESS or else."
+    */
+    AVCEnc_Status RCDetermineFrameNum(AVCEncObject *encvid, AVCRateControl *rateCtrl, uint32 modTime, uint *frameNum);
+
+    /**
+    This function updates the buffer fullness when frames are dropped either by the
+    rate control algorithm or by the users to make sure that target bit rate is still met.
+    \param "video" "Pointer to the common object structure."
+    \param "rateCtrl" "Pointer to rate control structure."
+    \param "frameInc" "Difference of the current frame number and previous frame number."
+    \return "void."
+    */
+    void RCUpdateBuffer(AVCCommonObj *video, AVCRateControl *rateCtrl, int frameInc);
+
+    /**
+    This function initializes rate control module and allocates necessary bufferes to do the job.
+    \param "avcHandle" "Pointer to the encoder handle."
+    \return "AVCENC_SUCCESS or AVCENC_MEMORY_FAIL."
+    */
+    AVCEnc_Status InitRateControlModule(AVCHandle *avcHandle);
+
+    /**
+    This function frees buffers allocated in InitRateControlModule.
+    \param "avcHandle" "Pointer to the encoder handle."
+    \return "void."
+    */
+    void CleanupRateControlModule(AVCHandle *avcHandle);
+
+    /**
+    This function is called at the beginning of each GOP or the first IDR frame. It calculates
+    target bits for a GOP.
+    \param "encvid" "Pointer to the encoder object."
+    \return "void."
+    */
+    void RCInitGOP(AVCEncObject *encvid);
+
+    /**
+    This function calculates target bits for a particular frame.
+    \param "video"  "Pointer to the AVCEncObject structure."
+    \return "void"
+    */
+    void RCInitFrameQP(AVCEncObject *video);
+
+    /**
+    This function calculates QP for the upcoming frame or basic unit.
+    \param "encvid" "Pointer to the encoder object."
+    \param "rateCtrl" "Pointer to the rate control object."
+    \return "QP value ranging from 0-51."
+    */
+    int  RCCalculateQP(AVCEncObject *encvid, AVCRateControl *rateCtrl);
+
+    /**
+    This function translates the luma QP to chroma QP and calculates lambda based on QP.
+    \param "video"  "Pointer to the AVCEncObject structure."
+    \return "void"
+    */
+    void RCInitChromaQP(AVCEncObject *encvid);
+
+    /**
+    This function is called before encoding each macroblock.
+    \param "encvid" "Pointer to the encoder object."
+    \return "void."
+    */
+    void RCInitMBQP(AVCEncObject *encvid);
+
+    /**
+    This function updates bits usage stats after encoding an macroblock.
+    \param "video" "Pointer to AVCCommonObj."
+    \param "rateCtrl" "Pointer to AVCRateControl."
+    \param "num_header_bits" "Number of bits used for MB header."
+    \param "num_texture_bits" "Number of bits used for MB texture."
+    \return "void"
+    */
+    void RCPostMB(AVCCommonObj *video, AVCRateControl *rateCtrl, int num_header_bits, int num_texture_bits);
+
+    /**
+    This function calculates the difference between prediction and original MB.
+    \param "encvid" "Pointer to the encoder object."
+    \param "currMB" "Pointer to the current macroblock structure."
+    \param "orgL" "Pointer to the original MB."
+    \param "orgPitch" "Pointer to the original picture pitch."
+    \return "void."
+    */
+    void RCCalculateMAD(AVCEncObject *encvid, AVCMacroblock *currMB, uint8 *orgL, int orgPitch);
+
+    /**
+    Restore QP related parameters of previous MB when current MB is skipped.
+    \param "currMB" "Pointer to the current macroblock."
+    \param "video"  "Pointer to the common video structure."
+    \param "encvid" "Pointer to the global encoding structure."
+    \return "void"
+    */
+    void RCRestoreQP(AVCMacroblock *currMB, AVCCommonObj *video, AVCEncObject *encvid);
+
+    /**
+    This function is called after done with a frame.
+    \param "encvid" "Pointer to the encoder object."
+    \return "AVCENC_SUCCESS or AVCENC_SKIPPED_PICTURE when bufer overflow (need to discard current frame)."
+    */
+    AVCEnc_Status RCUpdateFrame(AVCEncObject *encvid);
+
+    /*--------- residual.c -------------------*/
+
+    /**
+    This function encodes the intra pcm data and fill it in the corresponding location
+    on the current picture.
+    \param "video"  "Pointer to AVCEncObject."
+    \return "AVCENC_SUCCESS if success, or else for bitstream errors."
+    */
+    AVCEnc_Status EncodeIntraPCM(AVCEncObject *video);
+
+    /**
+    This function performs CAVLC syntax encoding on the run and level information of the coefficients.
+    The level and run arrays are elements in AVCEncObject structure, populated by TransQuantZZ,
+    TransQuantIntraDC and TransQuantChromaDC functions.
+    \param "video"  "Pointer to AVCEncObject."
+    \param "type"   "One of AVCResidualType for a particular 4x4 block."
+    \param "bindx"  "Block index or number of nonzero coefficients for AVC_Intra16DC and AVC_ChromaDC mode."
+    \param "currMB" "Pointer to the current macroblock structure."
+    \return "AVCENC_SUCCESS for success."
+    \Note   "This function has 32-bit machine specific instruction!!!!"
+    */
+    AVCEnc_Status enc_residual_block(AVCEncObject *encvid, AVCResidualType type, int bindx, AVCMacroblock *currMB);
+
+
+    /*------------- sad.c ---------------------------*/
+
+
+    int AVCSAD_MB_HalfPel_Cxhyh(uint8 *ref, uint8 *blk, int dmin_lx, void *extra_info);
+    int AVCSAD_MB_HalfPel_Cyh(uint8 *ref, uint8 *blk, int dmin_lx, void *extra_info);
+    int AVCSAD_MB_HalfPel_Cxh(uint8 *ref, uint8 *blk, int dmin_lx, void *extra_info);
+    int AVCSAD_Macroblock_C(uint8 *ref, uint8 *blk, int dmin_lx, void *extra_info);
+
+#ifdef HTFM /*  3/2/1, Hypothesis Testing Fast Matching */
+    int AVCSAD_MB_HP_HTFM_Collectxhyh(uint8 *ref, uint8 *blk, int dmin_x, void *extra_info);
+    int AVCSAD_MB_HP_HTFM_Collectyh(uint8 *ref, uint8 *blk, int dmin_x, void *extra_info);
+    int AVCSAD_MB_HP_HTFM_Collectxh(uint8 *ref, uint8 *blk, int dmin_x, void *extra_info);
+    int AVCSAD_MB_HP_HTFMxhyh(uint8 *ref, uint8 *blk, int dmin_lx, void *extra_info);
+    int AVCSAD_MB_HP_HTFMyh(uint8 *ref, uint8 *blk, int dmin_lx, void *extra_info);
+    int AVCSAD_MB_HP_HTFMxh(uint8 *ref, uint8 *blk, int dmin_lx, void *extra_info);
+    int AVCSAD_MB_HTFM_Collect(uint8 *ref, uint8 *blk, int dmin_lx, void *extra_info);
+    int AVCSAD_MB_HTFM(uint8 *ref, uint8 *blk, int dmin_lx, void *extra_info);
+#endif
+
+
+    /*------------- slice.c -------------------------*/
+
+    /**
+    This function performs the main encoding loop for a slice.
+    \param "encvid" "Pointer to AVCEncObject."
+    \return "AVCENC_SUCCESS for success, AVCENC_PICTURE_READY for end-of-picture and
+             AVCENC_FAIL or AVCENC_SLICE_EMPTY otherwise."
+    */
+    AVCEnc_Status AVCEncodeSlice(AVCEncObject *encvid);
+
+    /**
+    This function performs the main encoding operation for one macroblock.
+    \param "video" "pointer to AVCEncObject."
+    \return "AVCENC_SUCCESS for success, or other bitstream related failure status."
+    */
+    AVCEnc_Status EncodeMB(AVCEncObject *video);
+
+    /**
+    This function calls prediction INTRA/INTER functions, transform,
+    quantization and zigzag scanning to get the run-level symbols.
+    \param "encvid" "pointer to AVCEncObject."
+    \param "curL"   "pointer to Luma component of the current frame.
+    \param "curCb"  "pointer to Cb component of the current frame.
+    \param "curCr"  "pointer to Cr component of the current frame.
+    \return "void for now."
+     */
+    void MBPredTransQuantZZ(AVCEncObject *encvid, uint8 *curL, uint8 *curCb, uint8 *curCr);
+
+    /**
+    This function copies the content of the prediction MB into the reconstructed YUV
+    frame directly.
+    \param "curL"   "Pointer to the destination Y component."
+    \param "curCb"  "Pointer to the destination Cb component."
+    \param "curCr"  "Pointer to the destination Cr component."
+    \param "predBlock"  "Pointer to the prediction MB."
+    \param "picWidth"   "The width of the frame."
+    \return "None."
+    */
+    void Copy_MB(uint8 *curL, uint8 *curCb, uint8 *curCr, uint8 *predBlock, int picWidth);
+
+    /**
+    This function encodes the mb_type, CBP, prediction mode, ref idx and MV.
+    \param "currMB" "Pointer to the current macroblock structure."
+    \param "video" "Pointer to the AVCEncObject structure."
+    \return "AVCENC_SUCCESS for success or else for fail."
+    */
+    AVCEnc_Status EncodeMBHeader(AVCMacroblock *currMB, AVCEncObject *video);
+
+    /**
+    This function finds the right mb_type for a macroblock given the mbMode, CBP,
+    NumPart, PredPartMode.
+    \param "currMB" "Pointer to the current macroblock structure."
+    \param "slice_type" "Value of the slice_type."
+    \return "mb_type."
+    */
+    uint InterpretMBType(AVCMacroblock *currMB, int slice_type);
+
+    /**
+    This function encodes the mb_pred part of the macroblock data.
+    \param "video"  "Pointer to the AVCCommonObj structure."
+    \param "currMB" "Pointer to the current macroblock structure."
+    \param "stream" "Pointer to the AVCEncBitstream structure."
+    \return "AVCENC_SUCCESS for success or bitstream fail status."
+    */
+    AVCEnc_Status mb_pred(AVCCommonObj *video, AVCMacroblock *currMB, AVCEncBitstream *stream);
+
+    /**
+    This function encodes the sub_mb_pred part of the macroblock data.
+    \param "video"  "Pointer to the AVCCommonObj structure."
+    \param "currMB" "Pointer to the current macroblock structure."
+    \param "stream" "Pointer to the AVCEncBitstream structure."
+    \return "AVCENC_SUCCESS for success or bitstream fail status."
+    */
+    AVCEnc_Status sub_mb_pred(AVCCommonObj *video, AVCMacroblock *currMB, AVCEncBitstream *stream);
+
+    /**
+    This function interprets the sub_mb_type and sets necessary information
+    when the slice type is AVC_P_SLICE.
+    in the macroblock structure.
+    \param "mblock" "Pointer to current AVCMacroblock."
+    \param "sub_mb_type" "From the syntax bitstream."
+    \return "void"
+    */
+    void InterpretSubMBTypeP(AVCMacroblock *mblock, uint *sub_mb_type);
+
+    /**
+    This function interprets the sub_mb_type and sets necessary information
+    when the slice type is AVC_B_SLICE.
+    in the macroblock structure.
+    \param "mblock" "Pointer to current AVCMacroblock."
+    \param "sub_mb_type" "From the syntax bitstream."
+    \return "void"
+    */
+    void InterpretSubMBTypeB(AVCMacroblock *mblock, uint *sub_mb_type);
+
+    /**
+    This function encodes intra 4x4 mode. It calculates the predicted I4x4 mode and the
+    remnant to be encoded.
+    \param "video"  "Pointer to AVCEncObject structure."
+    \param "currMB" "Pointer to the AVCMacroblock structure."
+    \param "stream" "Pointer to AVCEncBitstream sructure."
+    \return "AVCENC_SUCCESS for success."
+    */
+    AVCEnc_Status EncodeIntra4x4Mode(AVCCommonObj *video, AVCMacroblock *currMB, AVCEncBitstream *stream);
+
+    /*------------- vlc_encode.c -----------------------*/
+    /**
+    This function encodes and writes a value into an Exp-Golomb codeword.
+    \param "bitstream" "Pointer to AVCEncBitstream."
+    \param "codeNum" "Pointer to the value of the codeNum."
+    \return "AVCENC_SUCCESS for success or bitstream error messages for fail."
+    */
+    AVCEnc_Status ue_v(AVCEncBitstream *bitstream, uint codeNum);
+
+    /**
+    This function maps and encodes signed Exp-Golomb codes.
+    \param "bitstream" "Pointer to AVCEncBitstream."
+    \param "value"  "Pointer to syntax element value."
+    \return "AVCENC_SUCCESS or AVCENC_FAIL."
+    */
+    AVCEnc_Status  se_v(AVCEncBitstream *bitstream, int value);
+
+    /**
+    This function maps and encodes truncated Exp-Golomb codes.
+    \param "bitstream" "Pointer to AVCEncBitstream."
+    \param "value"  "Pointer to syntax element value."
+    \param "range"  "Range of the value as input to determine the algorithm."
+    \return "AVCENC_SUCCESS or AVCENC_FAIL."
+    */
+    AVCEnc_Status te_v(AVCEncBitstream *bitstream, uint value, uint range);
+
+    /**
+    This function creates Exp-Golomb codeword from codeNum.
+    \param "bitstream" "Pointer to AVCEncBitstream."
+    \param "codeNum" "Pointer to the codeNum value."
+    \return "AVCENC_SUCCESS for success or bitstream error messages for fail."
+    */
+    AVCEnc_Status SetEGBitstring(AVCEncBitstream *bitstream, uint codeNum);
+
+    /**
+    This function performs CAVLC encoding of the CBP (coded block pattern) of a macroblock
+    by calling ue_v() and then mapping the CBP to the corresponding VLC codeNum.
+    \param "currMB"  "Pointer to the current AVCMacroblock structure."
+    \param "stream"  "Pointer to the AVCEncBitstream."
+    \return "void"
+    */
+    AVCEnc_Status EncodeCBP(AVCMacroblock *currMB, AVCEncBitstream *stream);
+
+    /**
+    This function encodes trailing ones and total coefficient.
+    \param "stream" "Pointer to the AVCEncBitstream."
+    \param "TrailingOnes"   "The trailing one variable output."
+    \param "TotalCoeff" "The total coefficient variable output."
+    \param "nC" "Context for number of nonzero coefficient (prediction context)."
+    \return "AVCENC_SUCCESS for success or else for bitstream failure."
+    */
+    AVCEnc_Status ce_TotalCoeffTrailingOnes(AVCEncBitstream *stream, int TrailingOnes, int TotalCoeff, int nC);
+
+    /**
+    This function encodes trailing ones and total coefficient for chroma DC block.
+    \param "stream" "Pointer to the AVCEncBitstream."
+    \param "TrailingOnes"   "The trailing one variable output."
+    \param "TotalCoeff" "The total coefficient variable output."
+    \return "AVCENC_SUCCESS for success or else for bitstream failure."
+    */
+    AVCEnc_Status ce_TotalCoeffTrailingOnesChromaDC(AVCEncBitstream *stream, int TrailingOnes, int TotalCoeff);
+
+    /**
+    This function encodes total_zeros value as in Table 9-7 and 9-8.
+    \param "stream" "Pointer to the AVCEncBitstream."
+    \param "TotalZeros" "The total_zeros value."
+    \param "TotalCoeff" "The total coefficient variable output."
+    \return "AVCENC_SUCCESS for success or else for bitstream failure."
+    */
+    AVCEnc_Status ce_TotalZeros(AVCEncBitstream *stream, int total_zeros, int TotalCoeff);
+
+    /**
+    This function encodes total_zeros VLC syntax for chroma DC as in Table 9-9.
+    \param "stream" "Pointer to the AVCEncBitstream."
+    \param "TotalZeros" "The total_zeros value."
+    \param "TotalCoeff" "The total coefficient variable output."
+    \return "AVCENC_SUCCESS for success or else for bitstream failure."
+    */
+    AVCEnc_Status ce_TotalZerosChromaDC(AVCEncBitstream *stream, int total_zeros, int TotalCoeff);
+
+    /**
+    This function encodes run_before VLC syntax as in Table 9-10.
+    \param "stream" "Pointer to the AVCEncBitstream."
+    \param "run_before" "The run_before value."
+    \param "zerosLeft"  "The context for number of zeros left."
+    \return "AVCENC_SUCCESS for success or else for bitstream failure."
+    */
+    AVCEnc_Status ce_RunBefore(AVCEncBitstream *stream, int run_before, int zerosLeft);
+
+#ifdef __cplusplus
+}
+#endif
+
+
+#endif /* _AVCENC_LIB_H_ */
+
diff --git a/media/libstagefright/codecs/avc/enc/src/bitstream_io.cpp b/media/libstagefright/codecs/avc/enc/src/bitstream_io.cpp
new file mode 100644
index 0000000..75ab514
--- /dev/null
+++ b/media/libstagefright/codecs/avc/enc/src/bitstream_io.cpp
@@ -0,0 +1,336 @@
+/* ------------------------------------------------------------------
+ * Copyright (C) 1998-2009 PacketVideo
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
+ * express or implied.
+ * See the License for the specific language governing permissions
+ * and limitations under the License.
+ * -------------------------------------------------------------------
+ */
+#include "avcenc_lib.h"
+
+#define WORD_SIZE 32
+
+/* array for trailing bit pattern as function of number of bits */
+/* the first one is unused. */
+const static uint8 trailing_bits[9] = {0, 0x1, 0x2, 0x4, 0x8, 0x10, 0x20, 0x40, 0x80};
+
+/* ======================================================================== */
+/*  Function : BitstreamInit()                                              */
+/*  Date     : 11/4/2003                                                    */
+/*  Purpose  : Populate bitstream structure with bitstream buffer and size  */
+/*             it also initializes internal data                            */
+/*  In/out   :                                                              */
+/*  Return   : AVCENC_SUCCESS if successed, AVCENC_FAIL if failed.              */
+/*  Modified :                                                              */
+/* ======================================================================== */
+/* |--------|--------|----~~~~~-----|---------|---------|---------|
+   ^                                          ^write_pos          ^buf_size
+   bitstreamBuffer                  <--------->
+                                    current_word
+
+   |-----xxxxxxxxxxxxx|  = current_word 32 or 16 bits
+    <---->
+     bit_left
+ ======================================================================== */
+
+AVCEnc_Status BitstreamEncInit(AVCEncBitstream *stream, uint8 *buffer, int buf_size,
+                               uint8 *overrunBuffer, int oBSize)
+{
+    if (stream == NULL || buffer == NULL || buf_size <= 0)
+    {
+        return AVCENC_BITSTREAM_INIT_FAIL;
+    }
+
+    stream->bitstreamBuffer = buffer;
+
+    stream->buf_size = buf_size;
+
+    stream->write_pos = 0;
+
+    stream->count_zeros = 0;
+
+    stream->current_word = 0;
+
+    stream->bit_left = WORD_SIZE;
+
+    stream->overrunBuffer = overrunBuffer;
+
+    stream->oBSize = oBSize;
+
+    return AVCENC_SUCCESS;
+}
+
+/* ======================================================================== */
+/*  Function : AVCBitstreamSaveWord()                                           */
+/*  Date     : 3/29/2004                                                    */
+/*  Purpose  : Save the current_word into the buffer, byte-swap, and        */
+/*              add emulation prevention insertion.                         */
+/*  In/out   :                                                              */
+/*  Return   : AVCENC_SUCCESS if successed, AVCENC_WRITE_FAIL if buffer is  */
+/*              full.                                                       */
+/*  Modified :                                                              */
+/* ======================================================================== */
+AVCEnc_Status AVCBitstreamSaveWord(AVCEncBitstream *stream)
+{
+    int num_bits;
+    uint8 *write_pnt, byte;
+    uint current_word;
+
+    /* check number of bytes in current_word, must always be byte-aligned!!!! */
+    num_bits = WORD_SIZE - stream->bit_left; /* must be multiple of 8 !!*/
+
+    if (stream->buf_size - stream->write_pos <= (num_bits >> 3) + 2) /* 2 more bytes for possible EPBS */
+    {
+        if (AVCENC_SUCCESS != AVCBitstreamUseOverrunBuffer(stream, (num_bits >> 3) + 2))
+        {
+            return AVCENC_BITSTREAM_BUFFER_FULL;
+        }
+    }
+
+    /* write word, byte-by-byte */
+    write_pnt = stream->bitstreamBuffer + stream->write_pos;
+    current_word = stream->current_word;
+    while (num_bits) /* no need to check stream->buf_size and stream->write_pos, taken care already */
+    {
+        num_bits -= 8;
+        byte = (current_word >> num_bits) & 0xFF;
+        if (byte != 0)
+        {
+            *write_pnt++ = byte;
+            stream->write_pos++;
+            stream->count_zeros = 0;
+        }
+        else
+        {
+            stream->count_zeros++;
+            *write_pnt++ = byte;
+            stream->write_pos++;
+            if (stream->count_zeros == 2)
+            {   /* for num_bits = 32, this can add 2 more bytes extra for EPBS */
+                *write_pnt++ = 0x3;
+                stream->write_pos++;
+                stream->count_zeros = 0;
+            }
+        }
+    }
+
+    /* reset current_word and bit_left */
+    stream->current_word = 0;
+    stream->bit_left = WORD_SIZE;
+
+    return AVCENC_SUCCESS;
+}
+
+/* ======================================================================== */
+/*  Function : BitstreamWriteBits()                                         */
+/*  Date     : 3/29/2004                                                    */
+/*  Purpose  : Write up to machine word.                                    */
+/*  In/out   : Unused bits in 'code' must be all zeros.                     */
+/*  Return   : AVCENC_SUCCESS if successed, AVCENC_WRITE_FAIL if buffer is  */
+/*              full.                                                       */
+/*  Modified :                                                              */
+/* ======================================================================== */
+AVCEnc_Status BitstreamWriteBits(AVCEncBitstream *stream, int nBits, uint code)
+{
+    AVCEnc_Status status = AVCENC_SUCCESS;
+    int bit_left = stream->bit_left;
+    uint current_word = stream->current_word;
+
+    //DEBUG_LOG(userData,AVC_LOGTYPE_INFO,"BitstreamWriteBits",nBits,-1);
+
+    if (nBits > WORD_SIZE) /* has to be taken care of specially */
+    {
+        return AVCENC_FAIL; /* for now */
+        /* otherwise, break it down to 2 write of less than 16 bits at a time. */
+    }
+
+    if (nBits <= bit_left) /* more bits left in current_word */
+    {
+        stream->current_word = (current_word << nBits) | code;
+        stream->bit_left -= nBits;
+        if (stream->bit_left == 0) /* prepare for the next word */
+        {
+            status = AVCBitstreamSaveWord(stream);
+            return status;
+        }
+    }
+    else
+    {
+        stream->current_word = (current_word << bit_left) | (code >> (nBits - bit_left));
+
+        nBits -= bit_left;
+
+        stream->bit_left = 0;
+
+        status = AVCBitstreamSaveWord(stream); /* save current word */
+
+        stream->bit_left = WORD_SIZE - nBits;
+
+        stream->current_word = code; /* no extra masking for code, must be handled before saving */
+    }
+
+    return status;
+}
+
+
+/* ======================================================================== */
+/*  Function : BitstreamWrite1Bit()                                         */
+/*  Date     : 3/30/2004                                                    */
+/*  Purpose  : Write 1 bit                                                  */
+/*  In/out   : Unused bits in 'code' must be all zeros.                     */
+/*  Return   : AVCENC_SUCCESS if successed, AVCENC_WRITE_FAIL if buffer is  */
+/*              full.                                                       */
+/*  Modified :                                                              */
+/* ======================================================================== */
+AVCEnc_Status BitstreamWrite1Bit(AVCEncBitstream *stream, uint code)
+{
+    AVCEnc_Status status;
+    uint current_word = stream->current_word;
+
+    //DEBUG_LOG(userData,AVC_LOGTYPE_INFO,"BitstreamWrite1Bit",code,-1);
+
+    //if(1 <= bit_left) /* more bits left in current_word */
+    /* we can assume that there always be positive bit_left in the current word */
+    stream->current_word = (current_word << 1) | code;
+    stream->bit_left--;
+    if (stream->bit_left == 0) /* prepare for the next word */
+    {
+        status = AVCBitstreamSaveWord(stream);
+        return status;
+    }
+
+    return AVCENC_SUCCESS;
+}
+
+
+/* ======================================================================== */
+/*  Function : BitstreamTrailingBits()                                      */
+/*  Date     : 3/31/2004                                                    */
+/*  Purpose  : Add trailing bits and report the final EBSP size.            */
+/*  In/out   :                                                              */
+/*  Return   : AVCENC_SUCCESS if successed, AVCENC_WRITE_FAIL if buffer is  */
+/*              full.                                                       */
+/*  Modified :                                                              */
+/* ======================================================================== */
+AVCEnc_Status BitstreamTrailingBits(AVCEncBitstream *bitstream, uint *nal_size)
+{
+    (void)(nal_size);
+
+    AVCEnc_Status status;
+    int bit_left = bitstream->bit_left;
+
+    bit_left &= 0x7; /* modulo by 8 */
+    if (bit_left == 0) bit_left = 8;
+    /* bitstream->bit_left == 0 cannot happen here since it would have been Saved already */
+
+    status = BitstreamWriteBits(bitstream, bit_left, trailing_bits[bit_left]);
+
+    if (status != AVCENC_SUCCESS)
+    {
+        return status;
+    }
+
+    /* if it's not saved, save it. */
+    //if(bitstream->bit_left<(WORD_SIZE<<3)) /* in fact, no need to check */
+    {
+        status = AVCBitstreamSaveWord(bitstream);
+    }
+
+    return status;
+}
+
+/* check whether it's byte-aligned */
+bool byte_aligned(AVCEncBitstream *stream)
+{
+    if (stream->bit_left % 8)
+        return false;
+    else
+        return true;
+}
+
+
+/* determine whether overrun buffer can be used or not */
+AVCEnc_Status AVCBitstreamUseOverrunBuffer(AVCEncBitstream* stream, int numExtraBytes)
+{
+    AVCEncObject *encvid = (AVCEncObject*)stream->encvid;
+
+    if (stream->overrunBuffer != NULL) // overrunBuffer is set
+    {
+        if (stream->bitstreamBuffer != stream->overrunBuffer) // not already used
+        {
+            if (stream->write_pos + numExtraBytes >= stream->oBSize)
+            {
+                stream->oBSize = stream->write_pos + numExtraBytes + 100;
+                stream->oBSize &= (~0x3); // make it multiple of 4
+
+                // allocate new overrun Buffer
+                if (encvid->overrunBuffer)
+                {
+                    encvid->avcHandle->CBAVC_Free((uint32*)encvid->avcHandle->userData,
+                                                  (int)encvid->overrunBuffer);
+                }
+
+                encvid->oBSize = stream->oBSize;
+                encvid->overrunBuffer = (uint8*) encvid->avcHandle->CBAVC_Malloc(encvid->avcHandle->userData,
+                                        stream->oBSize, DEFAULT_ATTR);
+
+                stream->overrunBuffer = encvid->overrunBuffer;
+                if (stream->overrunBuffer == NULL)
+                {
+                    return AVCENC_FAIL;
+                }
+            }
+
+            // copy everything to overrun buffer and start using it.
+            memcpy(stream->overrunBuffer, stream->bitstreamBuffer, stream->write_pos);
+            stream->bitstreamBuffer = stream->overrunBuffer;
+            stream->buf_size = stream->oBSize;
+        }
+        else // overrun buffer is already used
+        {
+            stream->oBSize = stream->write_pos + numExtraBytes + 100;
+            stream->oBSize &= (~0x3); // make it multiple of 4
+
+            // allocate new overrun buffer
+            encvid->oBSize = stream->oBSize;
+            encvid->overrunBuffer = (uint8*) encvid->avcHandle->CBAVC_Malloc(encvid->avcHandle->userData,
+                                    stream->oBSize, DEFAULT_ATTR);
+
+            if (encvid->overrunBuffer == NULL)
+            {
+                return AVCENC_FAIL;
+            }
+
+
+            // copy from the old buffer to new buffer
+            memcpy(encvid->overrunBuffer, stream->overrunBuffer, stream->write_pos);
+            // free old buffer
+            encvid->avcHandle->CBAVC_Free((uint32*)encvid->avcHandle->userData,
+                                          (int)stream->overrunBuffer);
+
+            // assign pointer to new buffer
+            stream->overrunBuffer = encvid->overrunBuffer;
+            stream->bitstreamBuffer = stream->overrunBuffer;
+            stream->buf_size = stream->oBSize;
+        }
+
+        return AVCENC_SUCCESS;
+    }
+    else // overrunBuffer is not enable.
+    {
+        return AVCENC_FAIL;
+    }
+
+}
+
+
+
diff --git a/media/libstagefright/codecs/avc/enc/src/block.cpp b/media/libstagefright/codecs/avc/enc/src/block.cpp
new file mode 100644
index 0000000..01e26a6
--- /dev/null
+++ b/media/libstagefright/codecs/avc/enc/src/block.cpp
@@ -0,0 +1,1283 @@
+/* ------------------------------------------------------------------
+ * Copyright (C) 1998-2009 PacketVideo
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
+ * express or implied.
+ * See the License for the specific language governing permissions
+ * and limitations under the License.
+ * -------------------------------------------------------------------
+ */
+#include "avcenc_lib.h"
+
+/* subtract with the prediction and do transformation */
+void trans(uint8 *cur, int pitch, uint8 *predBlock, int16 *dataBlock)
+{
+    int16 *ptr = dataBlock;
+    int r0, r1, r2, r3, j;
+    int curpitch = (uint)pitch >> 16;
+    int predpitch = (pitch & 0xFFFF);
+
+    /* horizontal */
+    j = 4;
+    while (j > 0)
+    {
+        /* calculate the residue first */
+        r0 = cur[0] - predBlock[0];
+        r1 = cur[1] - predBlock[1];
+        r2 = cur[2] - predBlock[2];
+        r3 = cur[3] - predBlock[3];
+
+        r0 += r3;           //ptr[0] + ptr[3];
+        r3 = r0 - (r3 << 1);    //ptr[0] - ptr[3];
+        r1 += r2;           //ptr[1] + ptr[2];
+        r2 = r1 - (r2 << 1);    //ptr[1] - ptr[2];
+
+        ptr[0] = r0 + r1;
+        ptr[2] = r0 - r1;
+        ptr[1] = (r3 << 1) + r2;
+        ptr[3] = r3 - (r2 << 1);
+
+        ptr += 16;
+        predBlock += predpitch;
+        cur += curpitch;
+        j--;
+    }
+    /* vertical */
+    ptr = dataBlock;
+    j = 4;
+    while (j > 0)
+    {
+        r0 = ptr[0] + ptr[48];
+        r3 = ptr[0] - ptr[48];
+        r1 = ptr[16] + ptr[32];
+        r2 = ptr[16] - ptr[32];
+
+        ptr[0] = r0 + r1;
+        ptr[32] = r0 - r1;
+        ptr[16] = (r3 << 1) + r2;
+        ptr[48] = r3 - (r2 << 1);
+
+        ptr++;
+        j--;
+    }
+
+    return ;
+}
+
+
+/* do residue transform quant invquant, invtrans and write output out */
+int dct_luma(AVCEncObject *encvid, int blkidx, uint8 *cur, uint8 *org, int *coef_cost)
+{
+    AVCCommonObj *video = encvid->common;
+    int org_pitch = encvid->currInput->pitch;
+    int pitch = video->currPic->pitch;
+    int16 *coef = video->block;
+    uint8 *pred = video->pred_block; // size 16 for a 4x4 block
+    int pred_pitch = video->pred_pitch;
+    int r0, r1, r2, r3, j, k, idx;
+    int *level, *run;
+    int Qq, Rq, q_bits, qp_const, quant;
+    int data, lev, zero_run;
+    int numcoeff;
+
+    coef += ((blkidx & 0x3) << 2) + ((blkidx >> 2) << 6); /* point to the 4x4 block */
+
+    /* first take a 4x4 transform */
+    /* horizontal */
+    j = 4;
+    while (j > 0)
+    {
+        /* calculate the residue first */
+        r0 = org[0] - pred[0];   /* OPTIMIZEABLE */
+        r1 = org[1] - pred[1];
+        r2 = org[2] - pred[2];
+        r3 = org[3] - pred[3];
+
+        r0 += r3;           //ptr[0] + ptr[3];
+        r3 = r0 - (r3 << 1);    //ptr[0] - ptr[3];
+        r1 += r2;           //ptr[1] + ptr[2];
+        r2 = r1 - (r2 << 1);    //ptr[1] - ptr[2];
+
+        coef[0] = r0 + r1;
+        coef[2] = r0 - r1;
+        coef[1] = (r3 << 1) + r2;
+        coef[3] = r3 - (r2 << 1);
+
+        coef += 16;
+        org += org_pitch;
+        pred += pred_pitch;
+        j--;
+    }
+    /* vertical */
+    coef -= 64;
+    pred -= (pred_pitch << 2);
+    j = 4;
+    while (j > 0)   /* OPTIMIZABLE */
+    {
+        r0 = coef[0] + coef[48];
+        r3 = coef[0] - coef[48];
+        r1 = coef[16] + coef[32];
+        r2 = coef[16] - coef[32];
+
+        coef[0] = r0 + r1;
+        coef[32] = r0 - r1;
+        coef[16] = (r3 << 1) + r2;
+        coef[48] = r3 - (r2 << 1);
+
+        coef++;
+        j--;
+    }
+
+    coef -= 4;
+
+    /* quant */
+    level = encvid->level[ras2dec[blkidx]];
+    run = encvid->run[ras2dec[blkidx]];
+
+    Rq = video->QPy_mod_6;
+    Qq = video->QPy_div_6;
+    qp_const = encvid->qp_const;
+    q_bits = 15 + Qq;
+
+    zero_run = 0;
+    numcoeff = 0;
+    for (k = 0; k < 16; k++)
+    {
+        idx = ZZ_SCAN_BLOCK[k]; /* map back to raster scan order */
+        data = coef[idx];
+        quant = quant_coef[Rq][k];
+        if (data > 0)
+        {
+            lev = data * quant + qp_const;
+        }
+        else
+        {
+            lev = -data * quant + qp_const;
+        }
+        lev >>= q_bits;
+        if (lev)
+        {
+            *coef_cost += ((lev > 1) ? MAX_VALUE : COEFF_COST[DISABLE_THRESHOLDING][zero_run]);
+
+            /* dequant */
+            quant = dequant_coefres[Rq][k];
+            if (data > 0)
+            {
+                level[numcoeff] = lev;
+                coef[idx] = (lev * quant) << Qq;
+            }
+            else
+            {
+                level[numcoeff] = -lev;
+                coef[idx] = (-lev * quant) << Qq;
+            }
+            run[numcoeff++] = zero_run;
+            zero_run = 0;
+        }
+        else
+        {
+            zero_run++;
+            coef[idx] = 0;
+        }
+    }
+
+    if (video->currMB->mb_intra) // only do inverse transform with intra block
+    {
+        if (numcoeff) /* then do inverse transform */
+        {
+            for (j = 4; j > 0; j--) /* horizontal */
+            {
+                r0 = coef[0] + coef[2];
+                r1 = coef[0] - coef[2];
+                r2 = (coef[1] >> 1) - coef[3];
+                r3 = coef[1] + (coef[3] >> 1);
+
+                coef[0] = r0 + r3;
+                coef[1] = r1 + r2;
+                coef[2] = r1 - r2;
+                coef[3] = r0 - r3;
+
+                coef += 16;
+            }
+
+            coef -= 64;
+            for (j = 4; j > 0; j--) /* vertical, has to be done after horizontal */
+            {
+                r0 = coef[0] + coef[32];
+                r1 = coef[0] - coef[32];
+                r2 = (coef[16] >> 1) - coef[48];
+                r3 = coef[16] + (coef[48] >> 1);
+                r0 += r3;
+                r3 = (r0 - (r3 << 1)); /* r0-r3 */
+                r1 += r2;
+                r2 = (r1 - (r2 << 1)); /* r1-r2 */
+                r0 += 32;
+                r1 += 32;
+                r2 += 32;
+                r3 += 32;
+
+                r0 = pred[0] + (r0 >> 6);
+                if ((uint)r0 > 0xFF)   r0 = 0xFF & (~(r0 >> 31));  /* clip */
+                r1 = *(pred += pred_pitch) + (r1 >> 6);
+                if ((uint)r1 > 0xFF)   r1 = 0xFF & (~(r1 >> 31));  /* clip */
+                r2 = *(pred += pred_pitch) + (r2 >> 6);
+                if ((uint)r2 > 0xFF)   r2 = 0xFF & (~(r2 >> 31));  /* clip */
+                r3 = pred[pred_pitch] + (r3 >> 6);
+                if ((uint)r3 > 0xFF)   r3 = 0xFF & (~(r3 >> 31));  /* clip */
+
+                *cur = r0;
+                *(cur += pitch) = r1;
+                *(cur += pitch) = r2;
+                cur[pitch] = r3;
+                cur -= (pitch << 1);
+                cur++;
+                pred -= (pred_pitch << 1);
+                pred++;
+                coef++;
+            }
+        }
+        else  // copy from pred to cur
+        {
+            *((uint32*)cur) = *((uint32*)pred);
+            *((uint32*)(cur += pitch)) = *((uint32*)(pred += pred_pitch));
+            *((uint32*)(cur += pitch)) = *((uint32*)(pred += pred_pitch));
+            *((uint32*)(cur += pitch)) = *((uint32*)(pred += pred_pitch));
+        }
+    }
+
+    return numcoeff;
+}
+
+
+void MBInterIdct(AVCCommonObj *video, uint8 *curL, AVCMacroblock *currMB, int picPitch)
+{
+    int16 *coef, *coef8 = video->block;
+    uint8 *cur;  // the same as curL
+    int b8, b4;
+    int r0, r1, r2, r3, j, blkidx;
+
+    for (b8 = 0; b8 < 4; b8++)
+    {
+        cur = curL;
+        coef = coef8;
+
+        if (currMB->CBP&(1 << b8))
+        {
+            for (b4 = 0; b4 < 4; b4++)
+            {
+                blkidx = blkIdx2blkXY[b8][b4];
+                /* do IDCT */
+                if (currMB->nz_coeff[blkidx])
+                {
+                    for (j = 4; j > 0; j--) /* horizontal */
+                    {
+                        r0 = coef[0] + coef[2];
+                        r1 = coef[0] - coef[2];
+                        r2 = (coef[1] >> 1) - coef[3];
+                        r3 = coef[1] + (coef[3] >> 1);
+
+                        coef[0] = r0 + r3;
+                        coef[1] = r1 + r2;
+                        coef[2] = r1 - r2;
+                        coef[3] = r0 - r3;
+
+                        coef += 16;
+                    }
+
+                    coef -= 64;
+                    for (j = 4; j > 0; j--) /* vertical, has to be done after horizontal */
+                    {
+                        r0 = coef[0] + coef[32];
+                        r1 = coef[0] - coef[32];
+                        r2 = (coef[16] >> 1) - coef[48];
+                        r3 = coef[16] + (coef[48] >> 1);
+                        r0 += r3;
+                        r3 = (r0 - (r3 << 1)); /* r0-r3 */
+                        r1 += r2;
+                        r2 = (r1 - (r2 << 1)); /* r1-r2 */
+                        r0 += 32;
+                        r1 += 32;
+                        r2 += 32;
+                        r3 += 32;
+
+                        r0 = cur[0] + (r0 >> 6);
+                        if ((uint)r0 > 0xFF)   r0 = 0xFF & (~(r0 >> 31));  /* clip */
+                        *cur = r0;
+                        r1 = *(cur += picPitch) + (r1 >> 6);
+                        if ((uint)r1 > 0xFF)   r1 = 0xFF & (~(r1 >> 31));  /* clip */
+                        *cur = r1;
+                        r2 = *(cur += picPitch) + (r2 >> 6);
+                        if ((uint)r2 > 0xFF)   r2 = 0xFF & (~(r2 >> 31));  /* clip */
+                        *cur = r2;
+                        r3 = cur[picPitch] + (r3 >> 6);
+                        if ((uint)r3 > 0xFF)   r3 = 0xFF & (~(r3 >> 31));  /* clip */
+                        cur[picPitch] = r3;
+
+                        cur -= (picPitch << 1);
+                        cur++;
+                        coef++;
+                    }
+                    cur -= 4;
+                    coef -= 4;
+                }
+                if (b4&1)
+                {
+                    cur += ((picPitch << 2) - 4);
+                    coef += 60;
+                }
+                else
+                {
+                    cur += 4;
+                    coef += 4;
+                }
+            }
+        }
+
+        if (b8&1)
+        {
+            curL += ((picPitch << 3) - 8);
+            coef8 += 120;
+        }
+        else
+        {
+            curL += 8;
+            coef8 += 8;
+        }
+    }
+
+    return ;
+}
+
+/* performa dct, quant, iquant, idct for the entire MB */
+void dct_luma_16x16(AVCEncObject *encvid, uint8 *curL, uint8 *orgL)
+{
+    AVCCommonObj *video = encvid->common;
+    int pitch = video->currPic->pitch;
+    int org_pitch = encvid->currInput->pitch;
+    AVCMacroblock *currMB = video->currMB;
+    int16 *coef = video->block;
+    uint8 *pred = encvid->pred_i16[currMB->i16Mode];
+    int blk_x, blk_y, j, k, idx, b8, b4;
+    int r0, r1, r2, r3, m0, m1, m2 , m3;
+    int data, lev;
+    int *level, *run, zero_run, ncoeff;
+    int Rq, Qq, quant, q_bits, qp_const;
+    int offset_cur[4], offset_pred[4], offset;
+
+    /* horizontal */
+    for (j = 16; j > 0; j--)
+    {
+        for (blk_x = 4; blk_x > 0; blk_x--)
+        {
+            /* calculate the residue first */
+            r0 = *orgL++ - *pred++;
+            r1 = *orgL++ - *pred++;
+            r2 = *orgL++ - *pred++;
+            r3 = *orgL++ - *pred++;
+
+            r0 += r3;           //ptr[0] + ptr[3];
+            r3 = r0 - (r3 << 1);    //ptr[0] - ptr[3];
+            r1 += r2;           //ptr[1] + ptr[2];
+            r2 = r1 - (r2 << 1);    //ptr[1] - ptr[2];
+
+            *coef++ = r0 + r1;
+            *coef++ = (r3 << 1) + r2;
+            *coef++ = r0 - r1;
+            *coef++ = r3 - (r2 << 1);
+        }
+        orgL += (org_pitch - 16);
+    }
+    pred -= 256;
+    coef -= 256;
+    /* vertical */
+    for (blk_y = 4; blk_y > 0; blk_y--)
+    {
+        for (j = 16; j > 0; j--)
+        {
+            r0 = coef[0] + coef[48];
+            r3 = coef[0] - coef[48];
+            r1 = coef[16] + coef[32];
+            r2 = coef[16] - coef[32];
+
+            coef[0] = r0 + r1;
+            coef[32] = r0 - r1;
+            coef[16] = (r3 << 1) + r2;
+            coef[48] = r3 - (r2 << 1);
+
+            coef++;
+        }
+        coef += 48;
+    }
+
+    /* then perform DC transform */
+    coef -= 256;
+    for (j = 4; j > 0; j--)
+    {
+        r0 = coef[0] + coef[12];
+        r3 = coef[0] - coef[12];
+        r1 = coef[4] + coef[8];
+        r2 = coef[4] - coef[8];
+
+        coef[0] = r0 + r1;
+        coef[8] = r0 - r1;
+        coef[4] = r3 + r2;
+        coef[12] = r3 - r2;
+        coef += 64;
+    }
+    coef -= 256;
+    for (j = 4; j > 0; j--)
+    {
+        r0 = coef[0] + coef[192];
+        r3 = coef[0] - coef[192];
+        r1 = coef[64] + coef[128];
+        r2 = coef[64] - coef[128];
+
+        coef[0] = (r0 + r1) >> 1;
+        coef[128] = (r0 - r1) >> 1;
+        coef[64] = (r3 + r2) >> 1;
+        coef[192] = (r3 - r2) >> 1;
+        coef += 4;
+    }
+
+    coef -= 16;
+    // then quantize DC
+    level = encvid->leveldc;
+    run = encvid->rundc;
+
+    Rq = video->QPy_mod_6;
+    Qq = video->QPy_div_6;
+    quant = quant_coef[Rq][0];
+    q_bits = 15 + Qq;
+    qp_const = encvid->qp_const;
+
+    zero_run = 0;
+    ncoeff = 0;
+    for (k = 0; k < 16; k++) /* in zigzag scan order */
+    {
+        idx = ZIGZAG2RASTERDC[k];
+        data = coef[idx];
+        if (data > 0)   // quant
+        {
+            lev = data * quant + (qp_const << 1);
+        }
+        else
+        {
+            lev = -data * quant + (qp_const << 1);
+        }
+        lev >>= (q_bits + 1);
+        if (lev) // dequant
+        {
+            if (data > 0)
+            {
+                level[ncoeff] = lev;
+                coef[idx] = lev;
+            }
+            else
+            {
+                level[ncoeff] = -lev;
+                coef[idx] = -lev;
+            }
+            run[ncoeff++] = zero_run;
+            zero_run = 0;
+        }
+        else
+        {
+            zero_run++;
+            coef[idx] = 0;
+        }
+    }
+
+    /* inverse transform DC */
+    encvid->numcoefdc = ncoeff;
+    if (ncoeff)
+    {
+        quant = dequant_coefres[Rq][0];
+
+        for (j = 0; j < 4; j++)
+        {
+            m0 = coef[0] + coef[4];
+            m1 = coef[0] - coef[4];
+            m2 = coef[8] + coef[12];
+            m3 = coef[8] - coef[12];
+
+
+            coef[0] = m0 + m2;
+            coef[4] = m0 - m2;
+            coef[8] = m1 - m3;
+            coef[12] = m1 + m3;
+            coef += 64;
+        }
+
+        coef -= 256;
+
+        if (Qq >= 2)  /* this way should be faster than JM */
+        {           /* they use (((m4*scale)<<(QPy/6))+2)>>2 for both cases. */
+            Qq -= 2;
+            for (j = 0; j < 4; j++)
+            {
+                m0 = coef[0] + coef[64];
+                m1 = coef[0] - coef[64];
+                m2 = coef[128] + coef[192];
+                m3 = coef[128] - coef[192];
+
+                coef[0] = ((m0 + m2) * quant) << Qq;
+                coef[64] = ((m0 - m2) * quant) << Qq;
+                coef[128] = ((m1 - m3) * quant) << Qq;
+                coef[192] = ((m1 + m3) * quant) << Qq;
+                coef += 4;
+            }
+            Qq += 2; /* restore the value */
+        }
+        else
+        {
+            Qq = 2 - Qq;
+            offset = 1 << (Qq - 1);
+
+            for (j = 0; j < 4; j++)
+            {
+                m0 = coef[0] + coef[64];
+                m1 = coef[0] - coef[64];
+                m2 = coef[128] + coef[192];
+                m3 = coef[128] - coef[192];
+
+                coef[0] = (((m0 + m2) * quant + offset) >> Qq);
+                coef[64] = (((m0 - m2) * quant + offset) >> Qq);
+                coef[128] = (((m1 - m3) * quant + offset) >> Qq);
+                coef[192] = (((m1 + m3) * quant + offset) >> Qq);
+                coef += 4;
+            }
+            Qq = 2 - Qq; /* restore the value */
+        }
+        coef -= 16; /* back to the origin */
+    }
+
+    /* now zigzag scan ac coefs, quant, iquant and itrans */
+    run = encvid->run[0];
+    level = encvid->level[0];
+
+    /* offset btw 4x4 block */
+    offset_cur[0] = 0;
+    offset_cur[1] = (pitch << 2) - 8;
+
+    /* offset btw 8x8 block */
+    offset_cur[2] = 8 - (pitch << 3);
+    offset_cur[3] = -8;
+
+    /* similarly for pred */
+    offset_pred[0] = 0;
+    offset_pred[1] = 56;
+    offset_pred[2] = -120;
+    offset_pred[3] = -8;
+
+    currMB->CBP = 0;
+
+    for (b8 = 0; b8 < 4; b8++)
+    {
+        for (b4 = 0; b4 < 4; b4++)
+        {
+
+            zero_run = 0;
+            ncoeff = 0;
+
+            for (k = 1; k < 16; k++)
+            {
+                idx = ZZ_SCAN_BLOCK[k]; /* map back to raster scan order */
+                data = coef[idx];
+                quant = quant_coef[Rq][k];
+                if (data > 0)
+                {
+                    lev = data * quant + qp_const;
+                }
+                else
+                {
+                    lev = -data * quant + qp_const;
+                }
+                lev >>= q_bits;
+                if (lev)
+                {   /* dequant */
+                    quant = dequant_coefres[Rq][k];
+                    if (data > 0)
+                    {
+                        level[ncoeff] = lev;
+                        coef[idx] = (lev * quant) << Qq;
+                    }
+                    else
+                    {
+                        level[ncoeff] = -lev;
+                        coef[idx] = (-lev * quant) << Qq;
+                    }
+                    run[ncoeff++] = zero_run;
+                    zero_run = 0;
+                }
+                else
+                {
+                    zero_run++;
+                    coef[idx] = 0;
+                }
+            }
+
+            currMB->nz_coeff[blkIdx2blkXY[b8][b4]] = ncoeff; /* in raster scan !!! */
+            if (ncoeff)
+            {
+                currMB->CBP |= (1 << b8);
+
+                // do inverse transform here
+                for (j = 4; j > 0; j--)
+                {
+                    r0 = coef[0] + coef[2];
+                    r1 = coef[0] - coef[2];
+                    r2 = (coef[1] >> 1) - coef[3];
+                    r3 = coef[1] + (coef[3] >> 1);
+
+                    coef[0] = r0 + r3;
+                    coef[1] = r1 + r2;
+                    coef[2] = r1 - r2;
+                    coef[3] = r0 - r3;
+
+                    coef += 16;
+                }
+                coef -= 64;
+                for (j = 4; j > 0; j--)
+                {
+                    r0 = coef[0] + coef[32];
+                    r1 = coef[0] - coef[32];
+                    r2 = (coef[16] >> 1) - coef[48];
+                    r3 = coef[16] + (coef[48] >> 1);
+
+                    r0 += r3;
+                    r3 = (r0 - (r3 << 1)); /* r0-r3 */
+                    r1 += r2;
+                    r2 = (r1 - (r2 << 1)); /* r1-r2 */
+                    r0 += 32;
+                    r1 += 32;
+                    r2 += 32;
+                    r3 += 32;
+                    r0 = pred[0] + (r0 >> 6);
+                    if ((uint)r0 > 0xFF)   r0 = 0xFF & (~(r0 >> 31));  /* clip */
+                    r1 = pred[16] + (r1 >> 6);
+                    if ((uint)r1 > 0xFF)   r1 = 0xFF & (~(r1 >> 31));  /* clip */
+                    r2 = pred[32] + (r2 >> 6);
+                    if ((uint)r2 > 0xFF)   r2 = 0xFF & (~(r2 >> 31));  /* clip */
+                    r3 = pred[48] + (r3 >> 6);
+                    if ((uint)r3 > 0xFF)   r3 = 0xFF & (~(r3 >> 31));  /* clip */
+                    *curL = r0;
+                    *(curL += pitch) = r1;
+                    *(curL += pitch) = r2;
+                    curL[pitch] = r3;
+                    curL -= (pitch << 1);
+                    curL++;
+                    pred++;
+                    coef++;
+                }
+            }
+            else  // do DC-only inverse
+            {
+                m0 = coef[0] + 32;
+
+                for (j = 4; j > 0; j--)
+                {
+                    r0 = pred[0] + (m0 >> 6);
+                    if ((uint)r0 > 0xFF)   r0 = 0xFF & (~(r0 >> 31));  /* clip */
+                    r1 = pred[16] + (m0 >> 6);
+                    if ((uint)r1 > 0xFF)   r1 = 0xFF & (~(r1 >> 31));  /* clip */
+                    r2 = pred[32] + (m0 >> 6);
+                    if ((uint)r2 > 0xFF)   r2 = 0xFF & (~(r2 >> 31));  /* clip */
+                    r3 = pred[48] + (m0 >> 6);
+                    if ((uint)r3 > 0xFF)   r3 = 0xFF & (~(r3 >> 31));  /* clip */
+                    *curL = r0;
+                    *(curL += pitch) = r1;
+                    *(curL += pitch) = r2;
+                    curL[pitch] = r3;
+                    curL -= (pitch << 1);
+                    curL++;
+                    pred++;
+                }
+                coef += 4;
+            }
+
+            run += 16;  // follow coding order
+            level += 16;
+            curL += offset_cur[b4&1];
+            pred += offset_pred[b4&1];
+            coef += offset_pred[b4&1];
+        }
+
+        curL += offset_cur[2 + (b8&1)];
+        pred += offset_pred[2 + (b8&1)];
+        coef += offset_pred[2 + (b8&1)];
+    }
+
+    return ;
+}
+
+
+void dct_chroma(AVCEncObject *encvid, uint8 *curC, uint8 *orgC, int cr)
+{
+    AVCCommonObj *video = encvid->common;
+    AVCMacroblock *currMB = video->currMB;
+    int org_pitch = (encvid->currInput->pitch) >> 1;
+    int pitch = (video->currPic->pitch) >> 1;
+    int pred_pitch = 16;
+    int16 *coef = video->block + 256;
+    uint8 *pred = video->pred_block;
+    int j, blk_x, blk_y, k, idx, b4;
+    int r0, r1, r2, r3, m0;
+    int Qq, Rq, qp_const, q_bits, quant;
+    int *level, *run, zero_run, ncoeff;
+    int data, lev;
+    int offset_cur[2], offset_pred[2], offset_coef[2];
+    uint8 nz_temp[4];
+    int  coeff_cost;
+
+    if (cr)
+    {
+        coef += 8;
+        pred += 8;
+    }
+
+    if (currMB->mb_intra == 0) // inter mode
+    {
+        pred = curC;
+        pred_pitch = pitch;
+    }
+
+    /* do 4x4 transform */
+    /* horizontal */
+    for (j = 8; j > 0; j--)
+    {
+        for (blk_x = 2; blk_x > 0; blk_x--)
+        {
+            /* calculate the residue first */
+            r0 = *orgC++ - *pred++;
+            r1 = *orgC++ - *pred++;
+            r2 = *orgC++ - *pred++;
+            r3 = *orgC++ - *pred++;
+
+            r0 += r3;           //ptr[0] + ptr[3];
+            r3 = r0 - (r3 << 1);    //ptr[0] - ptr[3];
+            r1 += r2;           //ptr[1] + ptr[2];
+            r2 = r1 - (r2 << 1);    //ptr[1] - ptr[2];
+
+            *coef++ = r0 + r1;
+            *coef++ = (r3 << 1) + r2;
+            *coef++ = r0 - r1;
+            *coef++ = r3 - (r2 << 1);
+
+        }
+        coef += 8; // coef pitch is 16
+        pred += (pred_pitch - 8); // pred_pitch is 16
+        orgC += (org_pitch - 8);
+    }
+    pred -= (pred_pitch << 3);
+    coef -= 128;
+    /* vertical */
+    for (blk_y = 2; blk_y > 0; blk_y--)
+    {
+        for (j = 8; j > 0; j--)
+        {
+            r0 = coef[0] + coef[48];
+            r3 = coef[0] - coef[48];
+            r1 = coef[16] + coef[32];
+            r2 = coef[16] - coef[32];
+
+            coef[0] = r0 + r1;
+            coef[32] = r0 - r1;
+            coef[16] = (r3 << 1) + r2;
+            coef[48] = r3 - (r2 << 1);
+
+            coef++;
+        }
+        coef += 56;
+    }
+    /* then perform DC transform */
+    coef -= 128;
+
+    /* 2x2 transform of DC components*/
+    r0 = coef[0];
+    r1 = coef[4];
+    r2 = coef[64];
+    r3 = coef[68];
+
+    coef[0] = r0 + r1 + r2 + r3;
+    coef[4] = r0 - r1 + r2 - r3;
+    coef[64] = r0 + r1 - r2 - r3;
+    coef[68] = r0 - r1 - r2 + r3;
+
+    Qq    = video->QPc_div_6;
+    Rq    = video->QPc_mod_6;
+    quant = quant_coef[Rq][0];
+    q_bits    = 15 + Qq;
+    qp_const = encvid->qp_const_c;
+
+    zero_run = 0;
+    ncoeff = 0;
+    run = encvid->runcdc + (cr << 2);
+    level = encvid->levelcdc + (cr << 2);
+
+    /* in zigzag scan order */
+    for (k = 0; k < 4; k++)
+    {
+        idx = ((k >> 1) << 6) + ((k & 1) << 2);
+        data = coef[idx];
+        if (data > 0)
+        {
+            lev = data * quant + (qp_const << 1);
+        }
+        else
+        {
+            lev = -data * quant + (qp_const << 1);
+        }
+        lev >>= (q_bits + 1);
+        if (lev)
+        {
+            if (data > 0)
+            {
+                level[ncoeff] = lev;
+                coef[idx] = lev;
+            }
+            else
+            {
+                level[ncoeff] = -lev;
+                coef[idx] = -lev;
+            }
+            run[ncoeff++] = zero_run;
+            zero_run = 0;
+        }
+        else
+        {
+            zero_run++;
+            coef[idx] = 0;
+        }
+    }
+
+    encvid->numcoefcdc[cr] = ncoeff;
+
+    if (ncoeff)
+    {
+        currMB->CBP |= (1 << 4); // DC present
+        // do inverse transform
+        quant = dequant_coefres[Rq][0];
+
+        r0 = coef[0] + coef[4];
+        r1 = coef[0] - coef[4];
+        r2 = coef[64] + coef[68];
+        r3 = coef[64] - coef[68];
+
+        r0 += r2;
+        r2 = r0 - (r2 << 1);
+        r1 += r3;
+        r3 = r1 - (r3 << 1);
+
+        if (Qq >= 1)
+        {
+            Qq -= 1;
+            coef[0] = (r0 * quant) << Qq;
+            coef[4] = (r1 * quant) << Qq;
+            coef[64] = (r2 * quant) << Qq;
+            coef[68] = (r3 * quant) << Qq;
+            Qq++;
+        }
+        else
+        {
+            coef[0] = (r0 * quant) >> 1;
+            coef[4] = (r1 * quant) >> 1;
+            coef[64] = (r2 * quant) >> 1;
+            coef[68] = (r3 * quant) >> 1;
+        }
+    }
+
+    /* now do AC zigzag scan, quant, iquant and itrans */
+    if (cr)
+    {
+        run = encvid->run[20];
+        level = encvid->level[20];
+    }
+    else
+    {
+        run = encvid->run[16];
+        level = encvid->level[16];
+    }
+
+    /* offset btw 4x4 block */
+    offset_cur[0] = 0;
+    offset_cur[1] = (pitch << 2) - 8;
+    offset_pred[0] = 0;
+    offset_pred[1] = (pred_pitch << 2) - 8;
+    offset_coef[0] = 0;
+    offset_coef[1] = 56;
+
+    coeff_cost = 0;
+
+    for (b4 = 0; b4 < 4; b4++)
+    {
+        zero_run = 0;
+        ncoeff = 0;
+        for (k = 1; k < 16; k++) /* in zigzag scan order */
+        {
+            idx = ZZ_SCAN_BLOCK[k]; /* map back to raster scan order */
+            data = coef[idx];
+            quant = quant_coef[Rq][k];
+            if (data > 0)
+            {
+                lev = data * quant + qp_const;
+            }
+            else
+            {
+                lev = -data * quant + qp_const;
+            }
+            lev >>= q_bits;
+            if (lev)
+            {
+                /* for RD performance*/
+                if (lev > 1)
+                    coeff_cost += MAX_VALUE;                // set high cost, shall not be discarded
+                else
+                    coeff_cost += COEFF_COST[DISABLE_THRESHOLDING][zero_run];
+
+                /* dequant */
+                quant = dequant_coefres[Rq][k];
+                if (data > 0)
+                {
+                    level[ncoeff] = lev;
+                    coef[idx] = (lev * quant) << Qq;
+                }
+                else
+                {
+                    level[ncoeff] = -lev;
+                    coef[idx] = (-lev * quant) << Qq;
+                }
+                run[ncoeff++] = zero_run;
+                zero_run = 0;
+            }
+            else
+            {
+                zero_run++;
+                coef[idx] = 0;
+            }
+        }
+
+        nz_temp[b4] = ncoeff; // raster scan
+
+        // just advance the pointers for now, do IDCT later
+        coef += 4;
+        run += 16;
+        level += 16;
+        coef += offset_coef[b4&1];
+    }
+
+    /* rewind the pointers */
+    coef -= 128;
+
+    if (coeff_cost < _CHROMA_COEFF_COST_)
+    {
+        /* if it's not efficient to encode any blocks.
+        Just do DC only */
+        /* We can reset level and run also, but setting nz to zero should be enough. */
+        currMB->nz_coeff[16+(cr<<1)] = 0;
+        currMB->nz_coeff[17+(cr<<1)] = 0;
+        currMB->nz_coeff[20+(cr<<1)] = 0;
+        currMB->nz_coeff[21+(cr<<1)] = 0;
+
+        for (b4 = 0; b4 < 4; b4++)
+        {
+            // do DC-only inverse
+            m0 = coef[0] + 32;
+
+            for (j = 4; j > 0; j--)
+            {
+                r0 = pred[0] + (m0 >> 6);
+                if ((uint)r0 > 0xFF)   r0 = 0xFF & (~(r0 >> 31));  /* clip */
+                r1 = *(pred += pred_pitch) + (m0 >> 6);
+                if ((uint)r1 > 0xFF)   r1 = 0xFF & (~(r1 >> 31));  /* clip */
+                r2 = pred[pred_pitch] + (m0 >> 6);
+                if ((uint)r2 > 0xFF)   r2 = 0xFF & (~(r2 >> 31));  /* clip */
+                r3 = pred[pred_pitch<<1] + (m0 >> 6);
+                if ((uint)r3 > 0xFF)   r3 = 0xFF & (~(r3 >> 31));  /* clip */
+                *curC = r0;
+                *(curC += pitch) = r1;
+                *(curC += pitch) = r2;
+                curC[pitch] = r3;
+                curC -= (pitch << 1);
+                curC++;
+                pred += (1 - pred_pitch);
+            }
+            coef += 4;
+            curC += offset_cur[b4&1];
+            pred += offset_pred[b4&1];
+            coef += offset_coef[b4&1];
+        }
+    }
+    else // not dropping anything, continue with the IDCT
+    {
+        for (b4 = 0; b4 < 4; b4++)
+        {
+            ncoeff = nz_temp[b4] ; // in raster scan
+            currMB->nz_coeff[16+(b4&1)+(cr<<1)+((b4>>1)<<2)] = ncoeff; // in raster scan
+
+            if (ncoeff) // do a check on the nonzero-coeff
+            {
+                currMB->CBP |= (2 << 4);
+
+                // do inverse transform here
+                for (j = 4; j > 0; j--)
+                {
+                    r0 = coef[0] + coef[2];
+                    r1 = coef[0] - coef[2];
+                    r2 = (coef[1] >> 1) - coef[3];
+                    r3 = coef[1] + (coef[3] >> 1);
+
+                    coef[0] = r0 + r3;
+                    coef[1] = r1 + r2;
+                    coef[2] = r1 - r2;
+                    coef[3] = r0 - r3;
+
+                    coef += 16;
+                }
+                coef -= 64;
+                for (j = 4; j > 0; j--)
+                {
+                    r0 = coef[0] + coef[32];
+                    r1 = coef[0] - coef[32];
+                    r2 = (coef[16] >> 1) - coef[48];
+                    r3 = coef[16] + (coef[48] >> 1);
+
+                    r0 += r3;
+                    r3 = (r0 - (r3 << 1)); /* r0-r3 */
+                    r1 += r2;
+                    r2 = (r1 - (r2 << 1)); /* r1-r2 */
+                    r0 += 32;
+                    r1 += 32;
+                    r2 += 32;
+                    r3 += 32;
+                    r0 = pred[0] + (r0 >> 6);
+                    if ((uint)r0 > 0xFF)   r0 = 0xFF & (~(r0 >> 31));  /* clip */
+                    r1 = *(pred += pred_pitch) + (r1 >> 6);
+                    if ((uint)r1 > 0xFF)   r1 = 0xFF & (~(r1 >> 31));  /* clip */
+                    r2 = pred[pred_pitch] + (r2 >> 6);
+                    if ((uint)r2 > 0xFF)   r2 = 0xFF & (~(r2 >> 31));  /* clip */
+                    r3 = pred[pred_pitch<<1] + (r3 >> 6);
+                    if ((uint)r3 > 0xFF)   r3 = 0xFF & (~(r3 >> 31));  /* clip */
+                    *curC = r0;
+                    *(curC += pitch) = r1;
+                    *(curC += pitch) = r2;
+                    curC[pitch] = r3;
+                    curC -= (pitch << 1);
+                    curC++;
+                    pred += (1 - pred_pitch);
+                    coef++;
+                }
+            }
+            else
+            {
+                // do DC-only inverse
+                m0 = coef[0] + 32;
+
+                for (j = 4; j > 0; j--)
+                {
+                    r0 = pred[0] + (m0 >> 6);
+                    if ((uint)r0 > 0xFF)   r0 = 0xFF & (~(r0 >> 31));  /* clip */
+                    r1 = *(pred += pred_pitch) + (m0 >> 6);
+                    if ((uint)r1 > 0xFF)   r1 = 0xFF & (~(r1 >> 31));  /* clip */
+                    r2 = pred[pred_pitch] + (m0 >> 6);
+                    if ((uint)r2 > 0xFF)   r2 = 0xFF & (~(r2 >> 31));  /* clip */
+                    r3 = pred[pred_pitch<<1] + (m0 >> 6);
+                    if ((uint)r3 > 0xFF)   r3 = 0xFF & (~(r3 >> 31));  /* clip */
+                    *curC = r0;
+                    *(curC += pitch) = r1;
+                    *(curC += pitch) = r2;
+                    curC[pitch] = r3;
+                    curC -= (pitch << 1);
+                    curC++;
+                    pred += (1 - pred_pitch);
+                }
+                coef += 4;
+            }
+            curC += offset_cur[b4&1];
+            pred += offset_pred[b4&1];
+            coef += offset_coef[b4&1];
+        }
+    }
+
+    return ;
+}
+
+
+/* only DC transform */
+int TransQuantIntra16DC(AVCEncObject *encvid)
+{
+    AVCCommonObj *video = encvid->common;
+    int16 *block = video->block;
+    int *level = encvid->leveldc;
+    int *run = encvid->rundc;
+    int16 *ptr = block;
+    int r0, r1, r2, r3, j;
+    int Qq = video->QPy_div_6;
+    int Rq = video->QPy_mod_6;
+    int q_bits, qp_const, quant;
+    int data, lev, zero_run;
+    int k, ncoeff, idx;
+
+    /* DC transform */
+    /* horizontal */
+    j = 4;
+    while (j)
+    {
+        r0 = ptr[0] + ptr[12];
+        r3 = ptr[0] - ptr[12];
+        r1 = ptr[4] + ptr[8];
+        r2 = ptr[4] - ptr[8];
+
+        ptr[0] = r0 + r1;
+        ptr[8] = r0 - r1;
+        ptr[4] = r3 + r2;
+        ptr[12] = r3 - r2;
+        ptr += 64;
+        j--;
+    }
+    /* vertical */
+    ptr = block;
+    j = 4;
+    while (j)
+    {
+        r0 = ptr[0] + ptr[192];
+        r3 = ptr[0] - ptr[192];
+        r1 = ptr[64] + ptr[128];
+        r2 = ptr[64] - ptr[128];
+
+        ptr[0] = (r0 + r1) >> 1;
+        ptr[128] = (r0 - r1) >> 1;
+        ptr[64] = (r3 + r2) >> 1;
+        ptr[192] = (r3 - r2) >> 1;
+        ptr += 4;
+        j--;
+    }
+
+    quant = quant_coef[Rq][0];
+    q_bits    = 15 + Qq;
+    qp_const = (1 << q_bits) / 3;    // intra
+
+    zero_run = 0;
+    ncoeff = 0;
+
+    for (k = 0; k < 16; k++) /* in zigzag scan order */
+    {
+        idx = ZIGZAG2RASTERDC[k];
+        data = block[idx];
+        if (data > 0)
+        {
+            lev = data * quant + (qp_const << 1);
+        }
+        else
+        {
+            lev = -data * quant + (qp_const << 1);
+        }
+        lev >>= (q_bits + 1);
+        if (lev)
+        {
+            if (data > 0)
+            {
+                level[ncoeff] = lev;
+                block[idx] = lev;
+            }
+            else
+            {
+                level[ncoeff] = -lev;
+                block[idx] = -lev;
+            }
+            run[ncoeff++] = zero_run;
+            zero_run = 0;
+        }
+        else
+        {
+            zero_run++;
+            block[idx] = 0;
+        }
+    }
+    return ncoeff;
+}
+
+int TransQuantChromaDC(AVCEncObject *encvid, int16 *block, int slice_type, int cr)
+{
+    AVCCommonObj *video = encvid->common;
+    int *level, *run;
+    int r0, r1, r2, r3;
+    int Qq, Rq, q_bits, qp_const, quant;
+    int data, lev, zero_run;
+    int k, ncoeff, idx;
+
+    level = encvid->levelcdc + (cr << 2); /* cb or cr */
+    run = encvid->runcdc + (cr << 2);
+
+    /* 2x2 transform of DC components*/
+    r0 = block[0];
+    r1 = block[4];
+    r2 = block[64];
+    r3 = block[68];
+
+    block[0] = r0 + r1 + r2 + r3;
+    block[4] = r0 - r1 + r2 - r3;
+    block[64] = r0 + r1 - r2 - r3;
+    block[68] = r0 - r1 - r2 + r3;
+
+    Qq    = video->QPc_div_6;
+    Rq    = video->QPc_mod_6;
+    quant = quant_coef[Rq][0];
+    q_bits    = 15 + Qq;
+    if (slice_type == AVC_I_SLICE)
+    {
+        qp_const = (1 << q_bits) / 3;
+    }
+    else
+    {
+        qp_const = (1 << q_bits) / 6;
+    }
+
+    zero_run = 0;
+    ncoeff = 0;
+
+    for (k = 0; k < 4; k++) /* in zigzag scan order */
+    {
+        idx = ((k >> 1) << 6) + ((k & 1) << 2);
+        data = block[idx];
+        if (data > 0)
+        {
+            lev = data * quant + (qp_const << 1);
+        }
+        else
+        {
+            lev = -data * quant + (qp_const << 1);
+        }
+        lev >>= (q_bits + 1);
+        if (lev)
+        {
+            if (data > 0)
+            {
+                level[ncoeff] = lev;
+                block[idx] = lev;
+            }
+            else
+            {
+                level[ncoeff] = -lev;
+                block[idx] = -lev;
+            }
+            run[ncoeff++] = zero_run;
+            zero_run = 0;
+        }
+        else
+        {
+            zero_run++;
+            block[idx] = 0;
+        }
+    }
+    return ncoeff;
+}
+
+
diff --git a/media/libstagefright/codecs/avc/enc/src/findhalfpel.cpp b/media/libstagefright/codecs/avc/enc/src/findhalfpel.cpp
new file mode 100644
index 0000000..38a2a15
--- /dev/null
+++ b/media/libstagefright/codecs/avc/enc/src/findhalfpel.cpp
@@ -0,0 +1,622 @@
+/* ------------------------------------------------------------------
+ * Copyright (C) 1998-2009 PacketVideo
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
+ * express or implied.
+ * See the License for the specific language governing permissions
+ * and limitations under the License.
+ * -------------------------------------------------------------------
+ */
+#include "avcenc_lib.h"
+/* 3/29/01 fast half-pel search based on neighboring guess */
+/* value ranging from 0 to 4, high complexity (more accurate) to
+   low complexity (less accurate) */
+#define HP_DISTANCE_TH      5 // 2  /* half-pel distance threshold */
+
+#define PREF_16_VEC 129     /* 1MV bias versus 4MVs*/
+
+const static int distance_tab[9][9] =   /* [hp_guess][k] */
+{
+    {0, 1, 1, 1, 1, 1, 1, 1, 1},
+    {1, 0, 1, 2, 3, 4, 3, 2, 1},
+    {1, 0, 0, 0, 1, 2, 3, 2, 1},
+    {1, 2, 1, 0, 1, 2, 3, 4, 3},
+    {1, 2, 1, 0, 0, 0, 1, 2, 3},
+    {1, 4, 3, 2, 1, 0, 1, 2, 3},
+    {1, 2, 3, 2, 1, 0, 0, 0, 1},
+    {1, 2, 3, 4, 3, 2, 1, 0, 1},
+    {1, 0, 1, 2, 3, 2, 1, 0, 0}
+};
+
+#define CLIP_RESULT(x)      if((uint)x > 0xFF){ \
+                 x = 0xFF & (~(x>>31));}
+
+#define CLIP_UPPER16(x)     if((uint)x >= 0x20000000){ \
+        x = 0xFF0000 & (~(x>>31));} \
+        else { \
+        x = (x>>5)&0xFF0000; \
+        }
+
+/*=====================================================================
+    Function:   AVCFindHalfPelMB
+    Date:       10/31/2007
+    Purpose:    Find half pel resolution MV surrounding the full-pel MV
+=====================================================================*/
+
+int AVCFindHalfPelMB(AVCEncObject *encvid, uint8 *cur, AVCMV *mot, uint8 *ncand,
+                     int xpos, int ypos, int hp_guess, int cmvx, int cmvy)
+{
+    AVCPictureData *currPic = encvid->common->currPic;
+    int lx = currPic->pitch;
+    int d, dmin, satd_min;
+    uint8* cand;
+    int lambda_motion = encvid->lambda_motion;
+    uint8 *mvbits = encvid->mvbits;
+    int mvcost;
+    /* list of candidate to go through for half-pel search*/
+    uint8 *subpel_pred = (uint8*) encvid->subpel_pred; // all 16 sub-pel positions
+    uint8 **hpel_cand = (uint8**) encvid->hpel_cand; /* half-pel position */
+
+    int xh[9] = {0, 0, 2, 2, 2, 0, -2, -2, -2};
+    int yh[9] = {0, -2, -2, 0, 2, 2, 2, 0, -2};
+    int xq[8] = {0, 1, 1, 1, 0, -1, -1, -1};
+    int yq[8] = { -1, -1, 0, 1, 1, 1, 0, -1};
+    int h, hmin, q, qmin;
+
+    OSCL_UNUSED_ARG(xpos);
+    OSCL_UNUSED_ARG(ypos);
+    OSCL_UNUSED_ARG(hp_guess);
+
+    GenerateHalfPelPred(subpel_pred, ncand, lx);
+
+    cur = encvid->currYMB; // pre-load current original MB
+
+    cand = hpel_cand[0];
+
+    // find cost for the current full-pel position
+    dmin = SATD_MB(cand, cur, 65535); // get Hadamaard transform SAD
+    mvcost = MV_COST_S(lambda_motion, mot->x, mot->y, cmvx, cmvy);
+    satd_min = dmin;
+    dmin += mvcost;
+    hmin = 0;
+
+    /* find half-pel */
+    for (h = 1; h < 9; h++)
+    {
+        d = SATD_MB(hpel_cand[h], cur, dmin);
+        mvcost = MV_COST_S(lambda_motion, mot->x + xh[h], mot->y + yh[h], cmvx, cmvy);
+        d += mvcost;
+
+        if (d < dmin)
+        {
+            dmin = d;
+            hmin = h;
+            satd_min = d - mvcost;
+        }
+    }
+
+    mot->sad = dmin;
+    mot->x += xh[hmin];
+    mot->y += yh[hmin];
+    encvid->best_hpel_pos = hmin;
+
+    /*** search for quarter-pel ****/
+    GenerateQuartPelPred(encvid->bilin_base[hmin], &(encvid->qpel_cand[0][0]), hmin);
+
+    encvid->best_qpel_pos = qmin = -1;
+
+    for (q = 0; q < 8; q++)
+    {
+        d = SATD_MB(encvid->qpel_cand[q], cur, dmin);
+        mvcost = MV_COST_S(lambda_motion, mot->x + xq[q], mot->y + yq[q], cmvx, cmvy);
+        d += mvcost;
+        if (d < dmin)
+        {
+            dmin = d;
+            qmin = q;
+            satd_min = d - mvcost;
+        }
+    }
+
+    if (qmin != -1)
+    {
+        mot->sad = dmin;
+        mot->x += xq[qmin];
+        mot->y += yq[qmin];
+        encvid->best_qpel_pos = qmin;
+    }
+
+    return satd_min;
+}
+
+
+
+/** This function generates sub-pel prediction around the full-pel candidate.
+Each sub-pel position array is 20 pixel wide (for word-alignment) and 17 pixel tall. */
+/** The sub-pel position is labeled in spiral manner from the center. */
+
+void GenerateHalfPelPred(uint8* subpel_pred, uint8 *ncand, int lx)
+{
+    /* let's do straightforward way first */
+    uint8 *ref;
+    uint8 *dst;
+    uint8 tmp8;
+    int32 tmp32;
+    int16 tmp_horz[18*22], *dst_16, *src_16;
+    register int a = 0, b = 0, c = 0, d = 0, e = 0, f = 0; // temp register
+    int msk;
+    int i, j;
+
+    /* first copy full-pel to the first array */
+    /* to be optimized later based on byte-offset load */
+    ref = ncand - 3 - lx - (lx << 1); /* move back (-3,-3) */
+    dst = subpel_pred;
+
+    dst -= 4; /* offset */
+    for (j = 0; j < 22; j++) /* 24x22 */
+    {
+        i = 6;
+        while (i > 0)
+        {
+            tmp32 = *ref++;
+            tmp8 = *ref++;
+            tmp32 |= (tmp8 << 8);
+            tmp8 = *ref++;
+            tmp32 |= (tmp8 << 16);
+            tmp8 = *ref++;
+            tmp32 |= (tmp8 << 24);
+            *((uint32*)(dst += 4)) = tmp32;
+            i--;
+        }
+        ref += (lx - 24);
+    }
+
+    /* from the first array, we do horizontal interp */
+    ref = subpel_pred + 2;
+    dst_16 = tmp_horz; /* 17 x 22 */
+
+    for (j = 4; j > 0; j--)
+    {
+        for (i = 16; i > 0; i -= 4)
+        {
+            a = ref[-2];
+            b = ref[-1];
+            c = ref[0];
+            d = ref[1];
+            e = ref[2];
+            f = ref[3];
+            *dst_16++ = a + f - 5 * (b + e) + 20 * (c + d);
+            a = ref[4];
+            *dst_16++ = b + a - 5 * (c + f) + 20 * (d + e);
+            b = ref[5];
+            *dst_16++ = c + b - 5 * (d + a) + 20 * (e + f);
+            c = ref[6];
+            *dst_16++ = d + c - 5 * (e + b) + 20 * (f + a);
+
+            ref += 4;
+        }
+        /* do the 17th column here */
+        d = ref[3];
+        *dst_16 =  e + d - 5 * (f + c) + 20 * (a + b);
+        dst_16 += 2; /* stride for tmp_horz is 18 */
+        ref += 8;  /* stride for ref is 24 */
+        if (j == 3)  // move 18 lines down
+        {
+            dst_16 += 324;//18*18;
+            ref += 432;//18*24;
+        }
+    }
+
+    ref -= 480;//20*24;
+    dst_16 -= 360;//20*18;
+    dst = subpel_pred + V0Q_H2Q * SUBPEL_PRED_BLK_SIZE; /* go to the 14th array 17x18*/
+
+    for (j = 18; j > 0; j--)
+    {
+        for (i = 16; i > 0; i -= 4)
+        {
+            a = ref[-2];
+            b = ref[-1];
+            c = ref[0];
+            d = ref[1];
+            e = ref[2];
+            f = ref[3];
+            tmp32 = a + f - 5 * (b + e) + 20 * (c + d);
+            *dst_16++ = tmp32;
+            tmp32 = (tmp32 + 16) >> 5;
+            CLIP_RESULT(tmp32)
+            *dst++ = tmp32;
+
+            a = ref[4];
+            tmp32 = b + a - 5 * (c + f) + 20 * (d + e);
+            *dst_16++ = tmp32;
+            tmp32 = (tmp32 + 16) >> 5;
+            CLIP_RESULT(tmp32)
+            *dst++ = tmp32;
+
+            b = ref[5];
+            tmp32 = c + b - 5 * (d + a) + 20 * (e + f);
+            *dst_16++ = tmp32;
+            tmp32 = (tmp32 + 16) >> 5;
+            CLIP_RESULT(tmp32)
+            *dst++ = tmp32;
+
+            c = ref[6];
+            tmp32 = d + c - 5 * (e + b) + 20 * (f + a);
+            *dst_16++ = tmp32;
+            tmp32 = (tmp32 + 16) >> 5;
+            CLIP_RESULT(tmp32)
+            *dst++ = tmp32;
+
+            ref += 4;
+        }
+        /* do the 17th column here */
+        d = ref[3];
+        tmp32 =  e + d - 5 * (f + c) + 20 * (a + b);
+        *dst_16 = tmp32;
+        tmp32 = (tmp32 + 16) >> 5;
+        CLIP_RESULT(tmp32)
+        *dst = tmp32;
+
+        dst += 8;  /* stride for dst is 24 */
+        dst_16 += 2; /* stride for tmp_horz is 18 */
+        ref += 8;  /* stride for ref is 24 */
+    }
+
+
+    /* Do middle point filtering*/
+    src_16 = tmp_horz; /* 17 x 22 */
+    dst = subpel_pred + V2Q_H2Q * SUBPEL_PRED_BLK_SIZE; /* 12th array 17x17*/
+    dst -= 24; // offset
+    for (i = 0; i < 17; i++)
+    {
+        for (j = 16; j > 0; j -= 4)
+        {
+            a = *src_16;
+            b = *(src_16 += 18);
+            c = *(src_16 += 18);
+            d = *(src_16 += 18);
+            e = *(src_16 += 18);
+            f = *(src_16 += 18);
+
+            tmp32 = a + f - 5 * (b + e) + 20 * (c + d);
+            tmp32 = (tmp32 + 512) >> 10;
+            CLIP_RESULT(tmp32)
+            *(dst += 24) = tmp32;
+
+            a = *(src_16 += 18);
+            tmp32 = b + a - 5 * (c + f) + 20 * (d + e);
+            tmp32 = (tmp32 + 512) >> 10;
+            CLIP_RESULT(tmp32)
+            *(dst += 24) = tmp32;
+
+            b = *(src_16 += 18);
+            tmp32 = c + b - 5 * (d + a) + 20 * (e + f);
+            tmp32 = (tmp32 + 512) >> 10;
+            CLIP_RESULT(tmp32)
+            *(dst += 24) = tmp32;
+
+            c = *(src_16 += 18);
+            tmp32 = d + c - 5 * (e + b) + 20 * (f + a);
+            tmp32 = (tmp32 + 512) >> 10;
+            CLIP_RESULT(tmp32)
+            *(dst += 24) = tmp32;
+
+            src_16 -= (18 << 2);
+        }
+
+        d = src_16[90]; // 18*5
+        tmp32 = e + d - 5 * (f + c) + 20 * (a + b);
+        tmp32 = (tmp32 + 512) >> 10;
+        CLIP_RESULT(tmp32)
+        dst[24] = tmp32;
+
+        src_16 -= ((18 << 4) - 1);
+        dst -= ((24 << 4) - 1);
+    }
+
+    /* do vertical interpolation */
+    ref = subpel_pred + 2;
+    dst = subpel_pred + V2Q_H0Q * SUBPEL_PRED_BLK_SIZE; /* 10th array 18x17 */
+    dst -= 24; // offset
+
+    for (i = 2; i > 0; i--)
+    {
+        for (j = 16; j > 0; j -= 4)
+        {
+            a = *ref;
+            b = *(ref += 24);
+            c = *(ref += 24);
+            d = *(ref += 24);
+            e = *(ref += 24);
+            f = *(ref += 24);
+
+            tmp32 = a + f - 5 * (b + e) + 20 * (c + d);
+            tmp32 = (tmp32 + 16) >> 5;
+            CLIP_RESULT(tmp32)
+            *(dst += 24) = tmp32;  // 10th
+
+            a = *(ref += 24);
+            tmp32 = b + a - 5 * (c + f) + 20 * (d + e);
+            tmp32 = (tmp32 + 16) >> 5;
+            CLIP_RESULT(tmp32)
+            *(dst += 24) = tmp32;  // 10th
+
+            b = *(ref += 24);
+            tmp32 = c + b - 5 * (d + a) + 20 * (e + f);
+            tmp32 = (tmp32 + 16) >> 5;
+            CLIP_RESULT(tmp32)
+            *(dst += 24) = tmp32;  // 10th
+
+            c = *(ref += 24);
+            tmp32 = d + c - 5 * (e + b) + 20 * (f + a);
+            tmp32 = (tmp32 + 16) >> 5;
+            CLIP_RESULT(tmp32)
+            *(dst += 24) = tmp32;  // 10th
+
+            ref -= (24 << 2);
+        }
+
+        d = ref[120]; // 24*5
+        tmp32 = e + d - 5 * (f + c) + 20 * (a + b);
+        tmp32 = (tmp32 + 16) >> 5;
+        CLIP_RESULT(tmp32)
+        dst[24] = tmp32;  // 10th
+
+        dst -= ((24 << 4) - 1);
+        ref -= ((24 << 4) - 1);
+    }
+
+    // note that using SIMD here doesn't help much, the cycle almost stays the same
+    // one can just use the above code and change the for(i=2 to for(i=18
+    for (i = 16; i > 0; i -= 4)
+    {
+        msk = 0;
+        for (j = 17; j > 0; j--)
+        {
+            a = *((uint32*)ref); /* load 4 bytes */
+            b = (a >> 8) & 0xFF00FF; /* second and fourth byte */
+            a &= 0xFF00FF;
+
+            c = *((uint32*)(ref + 120));
+            d = (c >> 8) & 0xFF00FF;
+            c &= 0xFF00FF;
+
+            a += c;
+            b += d;
+
+            e = *((uint32*)(ref + 72)); /* e, f */
+            f = (e >> 8) & 0xFF00FF;
+            e &= 0xFF00FF;
+
+            c = *((uint32*)(ref + 48)); /* c, d */
+            d = (c >> 8) & 0xFF00FF;
+            c &= 0xFF00FF;
+
+            c += e;
+            d += f;
+
+            a += 20 * c;
+            b += 20 * d;
+            a += 0x100010;
+            b += 0x100010;
+
+            e = *((uint32*)(ref += 24)); /* e, f */
+            f = (e >> 8) & 0xFF00FF;
+            e &= 0xFF00FF;
+
+            c = *((uint32*)(ref + 72)); /* c, d */
+            d = (c >> 8) & 0xFF00FF;
+            c &= 0xFF00FF;
+
+            c += e;
+            d += f;
+
+            a -= 5 * c;
+            b -= 5 * d;
+
+            c = a << 16;
+            d = b << 16;
+            CLIP_UPPER16(a)
+            CLIP_UPPER16(c)
+            CLIP_UPPER16(b)
+            CLIP_UPPER16(d)
+
+            a |= (c >> 16);
+            b |= (d >> 16);
+            //  a>>=5;
+            //  b>>=5;
+            /* clip */
+            //  msk |= b;  msk|=a;
+            //  a &= 0xFF00FF;
+            //  b &= 0xFF00FF;
+            a |= (b << 8);  /* pack it back */
+
+            *((uint16*)(dst += 24)) = a & 0xFFFF; //dst is not word-aligned.
+            *((uint16*)(dst + 2)) = a >> 16;
+
+        }
+        dst -= 404; // 24*17-4
+        ref -= 404;
+        /*      if(msk & 0xFF00FF00) // need clipping
+                {
+                    VertInterpWClip(dst,ref); // re-do 4 column with clip
+                }*/
+    }
+
+    return ;
+}
+
+void VertInterpWClip(uint8 *dst, uint8 *ref)
+{
+    int i, j;
+    int a, b, c, d, e, f;
+    int32 tmp32;
+
+    dst -= 4;
+    ref -= 4;
+
+    for (i = 4; i > 0; i--)
+    {
+        for (j = 16; j > 0; j -= 4)
+        {
+            a = *ref;
+            b = *(ref += 24);
+            c = *(ref += 24);
+            d = *(ref += 24);
+            e = *(ref += 24);
+            f = *(ref += 24);
+
+            tmp32 = a + f - 5 * (b + e) + 20 * (c + d);
+            tmp32 = (tmp32 + 16) >> 5;
+            CLIP_RESULT(tmp32)
+            *(dst += 24) = tmp32;  // 10th
+
+            a = *(ref += 24);
+            tmp32 = b + a - 5 * (c + f) + 20 * (d + e);
+            tmp32 = (tmp32 + 16) >> 5;
+            CLIP_RESULT(tmp32)
+            *(dst += 24) = tmp32;  // 10th
+
+            b = *(ref += 24);
+            tmp32 = c + b - 5 * (d + a) + 20 * (e + f);
+            tmp32 = (tmp32 + 16) >> 5;
+            CLIP_RESULT(tmp32)
+            *(dst += 24) = tmp32;  // 10th
+
+            c = *(ref += 24);
+            tmp32 = d + c - 5 * (e + b) + 20 * (f + a);
+            tmp32 = (tmp32 + 16) >> 5;
+            CLIP_RESULT(tmp32)
+            *(dst += 24) = tmp32;  // 10th
+
+            ref -= (24 << 2);
+        }
+
+        d = ref[120]; // 24*5
+        tmp32 = e + d - 5 * (f + c) + 20 * (a + b);
+        tmp32 = (tmp32 + 16) >> 5;
+        CLIP_RESULT(tmp32)
+        dst[24] = tmp32;  // 10th
+
+        dst -= ((24 << 4) - 1);
+        ref -= ((24 << 4) - 1);
+    }
+
+    return ;
+}
+
+
+void GenerateQuartPelPred(uint8 **bilin_base, uint8 *qpel_cand, int hpel_pos)
+{
+    // for even value of hpel_pos, start with pattern 1, otherwise, start with pattern 2
+    int i, j;
+
+    uint8 *c1 = qpel_cand;
+    uint8 *tl = bilin_base[0];
+    uint8 *tr = bilin_base[1];
+    uint8 *bl = bilin_base[2];
+    uint8 *br = bilin_base[3];
+    int a, b, c, d;
+    int offset = 1 - (384 * 7);
+
+    if (!(hpel_pos&1)) // diamond pattern
+    {
+        j = 16;
+        while (j--)
+        {
+            i = 16;
+            while (i--)
+            {
+                d = tr[24];
+                a = *tr++;
+                b = bl[1];
+                c = *br++;
+
+                *c1 = (c + a + 1) >> 1;
+                *(c1 += 384) = (b + a + 1) >> 1; /* c2 */
+                *(c1 += 384) = (b + c + 1) >> 1; /* c3 */
+                *(c1 += 384) = (b + d + 1) >> 1; /* c4 */
+
+                b = *bl++;
+
+                *(c1 += 384) = (c + d + 1) >> 1;  /* c5 */
+                *(c1 += 384) = (b + d + 1) >> 1;  /* c6 */
+                *(c1 += 384) = (b + c + 1) >> 1;  /* c7 */
+                *(c1 += 384) = (b + a + 1) >> 1;  /* c8 */
+
+                c1 += offset;
+            }
+            // advance to the next line, pitch is 24
+            tl += 8;
+            tr += 8;
+            bl += 8;
+            br += 8;
+            c1 += 8;
+        }
+    }
+    else // star pattern
+    {
+        j = 16;
+        while (j--)
+        {
+            i = 16;
+            while (i--)
+            {
+                a = *br++;
+                b = *tr++;
+                c = tl[1];
+                *c1 = (a + b + 1) >> 1;
+                b = bl[1];
+                *(c1 += 384) = (a + c + 1) >> 1; /* c2 */
+                c = tl[25];
+                *(c1 += 384) = (a + b + 1) >> 1; /* c3 */
+                b = tr[23];
+                *(c1 += 384) = (a + c + 1) >> 1; /* c4 */
+                c = tl[24];
+                *(c1 += 384) = (a + b + 1) >> 1; /* c5 */
+                b = *bl++;
+                *(c1 += 384) = (a + c + 1) >> 1; /* c6 */
+                c = *tl++;
+                *(c1 += 384) = (a + b + 1) >> 1; /* c7 */
+                *(c1 += 384) = (a + c + 1) >> 1; /* c8 */
+
+                c1 += offset;
+            }
+            // advance to the next line, pitch is 24
+            tl += 8;
+            tr += 8;
+            bl += 8;
+            br += 8;
+            c1 += 8;
+        }
+    }
+
+    return ;
+}
+
+
+/* assuming cand always has a pitch of 24 */
+int SATD_MB(uint8 *cand, uint8 *cur, int dmin)
+{
+    int cost;
+
+
+    dmin = (dmin << 16) | 24;
+    cost = AVCSAD_Macroblock_C(cand, cur, dmin, NULL);
+
+    return cost;
+}
+
+
+
+
+
diff --git a/media/libstagefright/codecs/avc/enc/src/header.cpp b/media/libstagefright/codecs/avc/enc/src/header.cpp
new file mode 100644
index 0000000..9acff9e
--- /dev/null
+++ b/media/libstagefright/codecs/avc/enc/src/header.cpp
@@ -0,0 +1,917 @@
+/* ------------------------------------------------------------------
+ * Copyright (C) 1998-2009 PacketVideo
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
+ * express or implied.
+ * See the License for the specific language governing permissions
+ * and limitations under the License.
+ * -------------------------------------------------------------------
+ */
+#include "avcenc_lib.h"
+#include "avcenc_api.h"
+
+/** see subclause 7.4.2.1 */
+/* no need for checking the valid range , already done in SetEncodeParam(),
+if we have to send another SPS, the ranges should be verified first before
+users call PVAVCEncodeSPS() */
+AVCEnc_Status EncodeSPS(AVCEncObject *encvid, AVCEncBitstream *stream)
+{
+    AVCCommonObj *video = encvid->common;
+    AVCSeqParamSet *seqParam = video->currSeqParams;
+    AVCVUIParams *vui = &(seqParam->vui_parameters);
+    int i;
+    AVCEnc_Status status = AVCENC_SUCCESS;
+
+    //DEBUG_LOG(userData,AVC_LOGTYPE_INFO,"EncodeSPS",-1,-1);
+
+    status = BitstreamWriteBits(stream, 8, seqParam->profile_idc);
+    status = BitstreamWrite1Bit(stream, seqParam->constrained_set0_flag);
+    status = BitstreamWrite1Bit(stream, seqParam->constrained_set1_flag);
+    status = BitstreamWrite1Bit(stream, seqParam->constrained_set2_flag);
+    status = BitstreamWrite1Bit(stream, seqParam->constrained_set3_flag);
+    status = BitstreamWriteBits(stream, 4, 0);  /* forbidden zero bits */
+    if (status != AVCENC_SUCCESS)  /* we can check after each write also */
+    {
+        return status;
+    }
+
+    status = BitstreamWriteBits(stream, 8, seqParam->level_idc);
+    status = ue_v(stream, seqParam->seq_parameter_set_id);
+    status = ue_v(stream, seqParam->log2_max_frame_num_minus4);
+    status = ue_v(stream, seqParam->pic_order_cnt_type);
+    if (status != AVCENC_SUCCESS)
+    {
+        return status;
+    }
+
+    if (seqParam->pic_order_cnt_type == 0)
+    {
+        status = ue_v(stream, seqParam->log2_max_pic_order_cnt_lsb_minus4);
+    }
+    else if (seqParam->pic_order_cnt_type == 1)
+    {
+        status = BitstreamWrite1Bit(stream, seqParam->delta_pic_order_always_zero_flag);
+        status = se_v(stream, seqParam->offset_for_non_ref_pic); /* upto 32 bits */
+        status = se_v(stream, seqParam->offset_for_top_to_bottom_field); /* upto 32 bits */
+        status = ue_v(stream, seqParam->num_ref_frames_in_pic_order_cnt_cycle);
+
+        for (i = 0; i < (int)(seqParam->num_ref_frames_in_pic_order_cnt_cycle); i++)
+        {
+            status = se_v(stream, seqParam->offset_for_ref_frame[i]); /* upto 32 bits */
+        }
+    }
+    if (status != AVCENC_SUCCESS)
+    {
+        return status;
+    }
+
+    status = ue_v(stream, seqParam->num_ref_frames);
+    status = BitstreamWrite1Bit(stream, seqParam->gaps_in_frame_num_value_allowed_flag);
+    status = ue_v(stream, seqParam->pic_width_in_mbs_minus1);
+    status = ue_v(stream, seqParam->pic_height_in_map_units_minus1);
+    status = BitstreamWrite1Bit(stream, seqParam->frame_mbs_only_flag);
+    if (status != AVCENC_SUCCESS)
+    {
+        return status;
+    }
+    /* if frame_mbs_only_flag is 0, then write, mb_adaptive_frame_field_frame here */
+
+    status = BitstreamWrite1Bit(stream, seqParam->direct_8x8_inference_flag);
+    status = BitstreamWrite1Bit(stream, seqParam->frame_cropping_flag);
+    if (seqParam->frame_cropping_flag)
+    {
+        status = ue_v(stream, seqParam->frame_crop_left_offset);
+        status = ue_v(stream, seqParam->frame_crop_right_offset);
+        status = ue_v(stream, seqParam->frame_crop_top_offset);
+        status = ue_v(stream, seqParam->frame_crop_bottom_offset);
+    }
+    if (status != AVCENC_SUCCESS)
+    {
+        return status;
+    }
+
+    status = BitstreamWrite1Bit(stream, seqParam->vui_parameters_present_flag);
+    if (seqParam->vui_parameters_present_flag)
+    {
+        /* not supported */
+        //return AVCENC_SPS_FAIL;
+        EncodeVUI(stream, vui);
+    }
+
+    return status;
+}
+
+
+void EncodeVUI(AVCEncBitstream* stream, AVCVUIParams* vui)
+{
+    int temp;
+
+    temp = vui->aspect_ratio_info_present_flag;
+    BitstreamWrite1Bit(stream, temp);
+    if (temp)
+    {
+        BitstreamWriteBits(stream, 8, vui->aspect_ratio_idc);
+        if (vui->aspect_ratio_idc == 255)
+        {
+            BitstreamWriteBits(stream, 16, vui->sar_width);
+            BitstreamWriteBits(stream, 16, vui->sar_height);
+        }
+    }
+    temp = vui->overscan_info_present_flag;
+    BitstreamWrite1Bit(stream, temp);
+    if (temp)
+    {
+        BitstreamWrite1Bit(stream, vui->overscan_appropriate_flag);
+    }
+    temp = vui->video_signal_type_present_flag;
+    BitstreamWrite1Bit(stream, temp);
+    if (temp)
+    {
+        BitstreamWriteBits(stream, 3, vui->video_format);
+        BitstreamWrite1Bit(stream, vui->video_full_range_flag);
+        temp = vui->colour_description_present_flag;
+        BitstreamWrite1Bit(stream, temp);
+        if (temp)
+        {
+            BitstreamWriteBits(stream, 8, vui->colour_primaries);
+            BitstreamWriteBits(stream, 8, vui->transfer_characteristics);
+            BitstreamWriteBits(stream, 8, vui->matrix_coefficients);
+        }
+    }
+    temp = vui->chroma_location_info_present_flag;
+    BitstreamWrite1Bit(stream, temp);
+    if (temp)
+    {
+        ue_v(stream, vui->chroma_sample_loc_type_top_field);
+        ue_v(stream, vui->chroma_sample_loc_type_bottom_field);
+    }
+
+    temp = vui->timing_info_present_flag;
+    BitstreamWrite1Bit(stream, temp);
+    if (temp)
+    {
+        BitstreamWriteBits(stream, 32, vui->num_units_in_tick);
+        BitstreamWriteBits(stream, 32, vui->time_scale);
+        BitstreamWrite1Bit(stream, vui->fixed_frame_rate_flag);
+    }
+
+    temp = vui->nal_hrd_parameters_present_flag;
+    BitstreamWrite1Bit(stream, temp);
+    if (temp)
+    {
+        EncodeHRD(stream, &(vui->nal_hrd_parameters));
+    }
+    temp = vui->vcl_hrd_parameters_present_flag;
+    BitstreamWrite1Bit(stream, temp);
+    if (temp)
+    {
+        EncodeHRD(stream, &(vui->vcl_hrd_parameters));
+    }
+    if (vui->nal_hrd_parameters_present_flag || vui->vcl_hrd_parameters_present_flag)
+    {
+        BitstreamWrite1Bit(stream, vui->low_delay_hrd_flag);
+    }
+    BitstreamWrite1Bit(stream, vui->pic_struct_present_flag);
+    temp = vui->bitstream_restriction_flag;
+    BitstreamWrite1Bit(stream, temp);
+    if (temp)
+    {
+        BitstreamWrite1Bit(stream, vui->motion_vectors_over_pic_boundaries_flag);
+        ue_v(stream, vui->max_bytes_per_pic_denom);
+        ue_v(stream, vui->max_bits_per_mb_denom);
+        ue_v(stream, vui->log2_max_mv_length_horizontal);
+        ue_v(stream, vui->log2_max_mv_length_vertical);
+        ue_v(stream, vui->max_dec_frame_reordering);
+        ue_v(stream, vui->max_dec_frame_buffering);
+    }
+
+    return ;
+}
+
+
+void EncodeHRD(AVCEncBitstream* stream, AVCHRDParams* hrd)
+{
+    int i;
+
+    ue_v(stream, hrd->cpb_cnt_minus1);
+    BitstreamWriteBits(stream, 4, hrd->bit_rate_scale);
+    BitstreamWriteBits(stream, 4, hrd->cpb_size_scale);
+    for (i = 0; i <= (int)hrd->cpb_cnt_minus1; i++)
+    {
+        ue_v(stream, hrd->bit_rate_value_minus1[i]);
+        ue_v(stream, hrd->cpb_size_value_minus1[i]);
+        ue_v(stream, hrd->cbr_flag[i]);
+    }
+    BitstreamWriteBits(stream, 5, hrd->initial_cpb_removal_delay_length_minus1);
+    BitstreamWriteBits(stream, 5, hrd->cpb_removal_delay_length_minus1);
+    BitstreamWriteBits(stream, 5, hrd->dpb_output_delay_length_minus1);
+    BitstreamWriteBits(stream, 5, hrd->time_offset_length);
+
+    return ;
+}
+
+
+
+/** see subclause 7.4.2.2 */
+/* no need for checking the valid range , already done in SetEncodeParam().
+If we have to send another SPS, the ranges should be verified first before
+users call PVAVCEncodeSPS()*/
+AVCEnc_Status EncodePPS(AVCEncObject *encvid, AVCEncBitstream *stream)
+{
+    AVCCommonObj *video = encvid->common;
+    AVCEnc_Status status = AVCENC_SUCCESS;
+    AVCPicParamSet *picParam = video->currPicParams;
+    int i, iGroup, numBits;
+    uint temp;
+
+    status = ue_v(stream, picParam->pic_parameter_set_id);
+    status = ue_v(stream, picParam->seq_parameter_set_id);
+    status = BitstreamWrite1Bit(stream, picParam->entropy_coding_mode_flag);
+    status = BitstreamWrite1Bit(stream, picParam->pic_order_present_flag);
+    if (status != AVCENC_SUCCESS)
+    {
+        return status;
+    }
+
+    status = ue_v(stream, picParam->num_slice_groups_minus1);
+    if (picParam->num_slice_groups_minus1 > 0)
+    {
+        status = ue_v(stream, picParam->slice_group_map_type);
+        if (picParam->slice_group_map_type == 0)
+        {
+            for (iGroup = 0; iGroup <= (int)picParam->num_slice_groups_minus1; iGroup++)
+            {
+                status = ue_v(stream, picParam->run_length_minus1[iGroup]);
+            }
+        }
+        else if (picParam->slice_group_map_type == 2)
+        {
+            for (iGroup = 0; iGroup < (int)picParam->num_slice_groups_minus1; iGroup++)
+            {
+                status = ue_v(stream, picParam->top_left[iGroup]);
+                status = ue_v(stream, picParam->bottom_right[iGroup]);
+            }
+        }
+        else if (picParam->slice_group_map_type == 3 ||
+                 picParam->slice_group_map_type == 4 ||
+                 picParam->slice_group_map_type == 5)
+        {
+            status = BitstreamWrite1Bit(stream, picParam->slice_group_change_direction_flag);
+            status = ue_v(stream, picParam->slice_group_change_rate_minus1);
+        }
+        else /*if(picParam->slice_group_map_type == 6)*/
+        {
+            status = ue_v(stream, picParam->pic_size_in_map_units_minus1);
+
+            numBits = 0;/* ceil(log2(num_slice_groups_minus1+1)) bits */
+            i = picParam->num_slice_groups_minus1;
+            while (i > 0)
+            {
+                numBits++;
+                i >>= 1;
+            }
+
+            for (i = 0; i <= (int)picParam->pic_size_in_map_units_minus1; i++)
+            {
+                status = BitstreamWriteBits(stream, numBits, picParam->slice_group_id[i]);
+            }
+        }
+    }
+    if (status != AVCENC_SUCCESS)
+    {
+        return status;
+    }
+
+    status = ue_v(stream, picParam->num_ref_idx_l0_active_minus1);
+    status = ue_v(stream, picParam->num_ref_idx_l1_active_minus1);
+    status = BitstreamWrite1Bit(stream, picParam->weighted_pred_flag);
+    status = BitstreamWriteBits(stream, 2, picParam->weighted_bipred_idc);
+    if (status != AVCENC_SUCCESS)
+    {
+        return status;
+    }
+
+    status = se_v(stream, picParam->pic_init_qp_minus26);
+    status = se_v(stream, picParam->pic_init_qs_minus26);
+    status = se_v(stream, picParam->chroma_qp_index_offset);
+
+    temp = picParam->deblocking_filter_control_present_flag << 2;
+    temp |= (picParam->constrained_intra_pred_flag << 1);
+    temp |= picParam->redundant_pic_cnt_present_flag;
+
+    status = BitstreamWriteBits(stream, 3, temp);
+
+    return status;
+}
+
+/** see subclause 7.4.3 */
+AVCEnc_Status EncodeSliceHeader(AVCEncObject *encvid, AVCEncBitstream *stream)
+{
+    AVCCommonObj *video = encvid->common;
+    AVCSliceHeader *sliceHdr = video->sliceHdr;
+    AVCPicParamSet *currPPS = video->currPicParams;
+    AVCSeqParamSet *currSPS = video->currSeqParams;
+    AVCEnc_Status status = AVCENC_SUCCESS;
+    int slice_type, temp, i;
+    int num_bits;
+
+    num_bits = (stream->write_pos << 3) - stream->bit_left;
+
+    status = ue_v(stream, sliceHdr->first_mb_in_slice);
+
+    slice_type = video->slice_type;
+
+    if (video->mbNum == 0) /* first mb in frame */
+    {
+        status = ue_v(stream, sliceHdr->slice_type);
+    }
+    else
+    {
+        status = ue_v(stream, slice_type);
+    }
+
+    status = ue_v(stream, sliceHdr->pic_parameter_set_id);
+
+    status = BitstreamWriteBits(stream, currSPS->log2_max_frame_num_minus4 + 4, sliceHdr->frame_num);
+
+    if (status != AVCENC_SUCCESS)
+    {
+        return status;
+    }
+    /* if frame_mbs_only_flag is 0, encode field_pic_flag, bottom_field_flag here */
+
+    if (video->nal_unit_type == AVC_NALTYPE_IDR)
+    {
+        status = ue_v(stream, sliceHdr->idr_pic_id);
+    }
+
+    if (currSPS->pic_order_cnt_type == 0)
+    {
+        status = BitstreamWriteBits(stream, currSPS->log2_max_pic_order_cnt_lsb_minus4 + 4,
+                                    sliceHdr->pic_order_cnt_lsb);
+
+        if (currPPS->pic_order_present_flag && !sliceHdr->field_pic_flag)
+        {
+            status = se_v(stream, sliceHdr->delta_pic_order_cnt_bottom); /* 32 bits */
+        }
+    }
+    if (currSPS->pic_order_cnt_type == 1 && !currSPS->delta_pic_order_always_zero_flag)
+    {
+        status = se_v(stream, sliceHdr->delta_pic_order_cnt[0]);    /* 32 bits */
+        if (currPPS->pic_order_present_flag && !sliceHdr->field_pic_flag)
+        {
+            status = se_v(stream, sliceHdr->delta_pic_order_cnt[1]); /* 32 bits */
+        }
+    }
+
+    if (currPPS->redundant_pic_cnt_present_flag)
+    {
+        status = ue_v(stream, sliceHdr->redundant_pic_cnt);
+    }
+
+    if (slice_type == AVC_B_SLICE)
+    {
+        status = BitstreamWrite1Bit(stream, sliceHdr->direct_spatial_mv_pred_flag);
+    }
+
+    if (status != AVCENC_SUCCESS)
+    {
+        return status;
+    }
+
+    if (slice_type == AVC_P_SLICE || slice_type == AVC_SP_SLICE || slice_type == AVC_B_SLICE)
+    {
+        status = BitstreamWrite1Bit(stream, sliceHdr->num_ref_idx_active_override_flag);
+        if (sliceHdr->num_ref_idx_active_override_flag)
+        {
+            /* we shouldn't enter this part at all */
+            status = ue_v(stream, sliceHdr->num_ref_idx_l0_active_minus1);
+            if (slice_type == AVC_B_SLICE)
+            {
+                status = ue_v(stream, sliceHdr->num_ref_idx_l1_active_minus1);
+            }
+        }
+    }
+    if (status != AVCENC_SUCCESS)
+    {
+        return status;
+    }
+
+    /* ref_pic_list_reordering() */
+    status = ref_pic_list_reordering(video, stream, sliceHdr, slice_type);
+    if (status != AVCENC_SUCCESS)
+    {
+        return status;
+    }
+
+    if ((currPPS->weighted_pred_flag && (slice_type == AVC_P_SLICE || slice_type == AVC_SP_SLICE)) ||
+            (currPPS->weighted_bipred_idc == 1 && slice_type == AVC_B_SLICE))
+    {
+        //      pred_weight_table(); // not supported !!
+        return AVCENC_PRED_WEIGHT_TAB_FAIL;
+    }
+
+    if (video->nal_ref_idc != 0)
+    {
+        status = dec_ref_pic_marking(video, stream, sliceHdr);
+        if (status != AVCENC_SUCCESS)
+        {
+            return status;
+        }
+    }
+
+    if (currPPS->entropy_coding_mode_flag && slice_type != AVC_I_SLICE && slice_type != AVC_SI_SLICE)
+    {
+        return AVCENC_CABAC_FAIL;
+        /*      ue_v(stream,&(sliceHdr->cabac_init_idc));
+                if(sliceHdr->cabac_init_idc > 2){
+                    // not supported !!!!
+                }*/
+    }
+
+    status = se_v(stream, sliceHdr->slice_qp_delta);
+    if (status != AVCENC_SUCCESS)
+    {
+        return status;
+    }
+
+    if (slice_type == AVC_SP_SLICE || slice_type == AVC_SI_SLICE)
+    {
+        if (slice_type == AVC_SP_SLICE)
+        {
+            status = BitstreamWrite1Bit(stream, sliceHdr->sp_for_switch_flag);
+            /* if sp_for_switch_flag is 0, P macroblocks in SP slice is decoded using
+            SP decoding process for non-switching pictures in 8.6.1 */
+            /* else, P macroblocks in SP slice is decoded using SP and SI decoding
+            process for switching picture in 8.6.2 */
+        }
+        status = se_v(stream, sliceHdr->slice_qs_delta);
+        if (status != AVCENC_SUCCESS)
+        {
+            return status;
+        }
+    }
+
+    if (currPPS->deblocking_filter_control_present_flag)
+    {
+
+        status = ue_v(stream, sliceHdr->disable_deblocking_filter_idc);
+
+        if (sliceHdr->disable_deblocking_filter_idc != 1)
+        {
+            status = se_v(stream, sliceHdr->slice_alpha_c0_offset_div2);
+
+            status = se_v(stream, sliceHdr->slice_beta_offset_div_2);
+        }
+        if (status != AVCENC_SUCCESS)
+        {
+            return status;
+        }
+    }
+
+    if (currPPS->num_slice_groups_minus1 > 0 && currPPS->slice_group_map_type >= 3
+            && currPPS->slice_group_map_type <= 5)
+    {
+        /* Ceil(Log2(PicSizeInMapUnits/(float)SliceGroupChangeRate + 1)) */
+        temp = video->PicSizeInMapUnits / video->SliceGroupChangeRate;
+        if (video->PicSizeInMapUnits % video->SliceGroupChangeRate)
+        {
+            temp++;
+        }
+        i = 0;
+        while (temp > 1)
+        {
+            temp >>= 1;
+            i++;
+        }
+
+        BitstreamWriteBits(stream, i, sliceHdr->slice_group_change_cycle);
+    }
+
+
+    encvid->rateCtrl->NumberofHeaderBits += (stream->write_pos << 3) - stream->bit_left - num_bits;
+
+    return AVCENC_SUCCESS;
+}
+
+/** see subclause 7.4.3.1 */
+AVCEnc_Status ref_pic_list_reordering(AVCCommonObj *video, AVCEncBitstream *stream, AVCSliceHeader *sliceHdr, int slice_type)
+{
+    (void)(video);
+    int i;
+    AVCEnc_Status status = AVCENC_SUCCESS;
+
+    if (slice_type != AVC_I_SLICE && slice_type != AVC_SI_SLICE)
+    {
+        status = BitstreamWrite1Bit(stream, sliceHdr->ref_pic_list_reordering_flag_l0);
+        if (sliceHdr->ref_pic_list_reordering_flag_l0)
+        {
+            i = 0;
+            do
+            {
+                status = ue_v(stream, sliceHdr->reordering_of_pic_nums_idc_l0[i]);
+                if (sliceHdr->reordering_of_pic_nums_idc_l0[i] == 0 ||
+                        sliceHdr->reordering_of_pic_nums_idc_l0[i] == 1)
+                {
+                    status = ue_v(stream, sliceHdr->abs_diff_pic_num_minus1_l0[i]);
+                    /* this check should be in InitSlice(), if we ever use it */
+                    /*if(sliceHdr->reordering_of_pic_nums_idc_l0[i] == 0 &&
+                        sliceHdr->abs_diff_pic_num_minus1_l0[i] > video->MaxPicNum/2 -1)
+                    {
+                        return AVCENC_REF_PIC_REORDER_FAIL; // out of range
+                    }
+                    if(sliceHdr->reordering_of_pic_nums_idc_l0[i] == 1 &&
+                        sliceHdr->abs_diff_pic_num_minus1_l0[i] > video->MaxPicNum/2 -2)
+                    {
+                        return AVCENC_REF_PIC_REORDER_FAIL; // out of range
+                    }*/
+                }
+                else if (sliceHdr->reordering_of_pic_nums_idc_l0[i] == 2)
+                {
+                    status = ue_v(stream, sliceHdr->long_term_pic_num_l0[i]);
+                }
+                i++;
+            }
+            while (sliceHdr->reordering_of_pic_nums_idc_l0[i] != 3
+                    && i <= (int)sliceHdr->num_ref_idx_l0_active_minus1 + 1) ;
+        }
+    }
+    if (slice_type == AVC_B_SLICE)
+    {
+        status = BitstreamWrite1Bit(stream, sliceHdr->ref_pic_list_reordering_flag_l1);
+        if (sliceHdr->ref_pic_list_reordering_flag_l1)
+        {
+            i = 0;
+            do
+            {
+                status = ue_v(stream, sliceHdr->reordering_of_pic_nums_idc_l1[i]);
+                if (sliceHdr->reordering_of_pic_nums_idc_l1[i] == 0 ||
+                        sliceHdr->reordering_of_pic_nums_idc_l1[i] == 1)
+                {
+                    status = ue_v(stream, sliceHdr->abs_diff_pic_num_minus1_l1[i]);
+                    /* This check should be in InitSlice() if we ever use it
+                    if(sliceHdr->reordering_of_pic_nums_idc_l1[i] == 0 &&
+                        sliceHdr->abs_diff_pic_num_minus1_l1[i] > video->MaxPicNum/2 -1)
+                    {
+                        return AVCENC_REF_PIC_REORDER_FAIL; // out of range
+                    }
+                    if(sliceHdr->reordering_of_pic_nums_idc_l1[i] == 1 &&
+                        sliceHdr->abs_diff_pic_num_minus1_l1[i] > video->MaxPicNum/2 -2)
+                    {
+                        return AVCENC_REF_PIC_REORDER_FAIL; // out of range
+                    }*/
+                }
+                else if (sliceHdr->reordering_of_pic_nums_idc_l1[i] == 2)
+                {
+                    status = ue_v(stream, sliceHdr->long_term_pic_num_l1[i]);
+                }
+                i++;
+            }
+            while (sliceHdr->reordering_of_pic_nums_idc_l1[i] != 3
+                    && i <= (int)sliceHdr->num_ref_idx_l1_active_minus1 + 1) ;
+        }
+    }
+
+    return status;
+}
+
+/** see subclause 7.4.3.3 */
+AVCEnc_Status dec_ref_pic_marking(AVCCommonObj *video, AVCEncBitstream *stream, AVCSliceHeader *sliceHdr)
+{
+    int i;
+    AVCEnc_Status status = AVCENC_SUCCESS;
+
+    if (video->nal_unit_type == AVC_NALTYPE_IDR)
+    {
+        status = BitstreamWrite1Bit(stream, sliceHdr->no_output_of_prior_pics_flag);
+        status = BitstreamWrite1Bit(stream, sliceHdr->long_term_reference_flag);
+        if (sliceHdr->long_term_reference_flag == 0) /* used for short-term */
+        {
+            video->MaxLongTermFrameIdx = -1; /* no long-term frame indx */
+        }
+        else /* used for long-term */
+        {
+            video->MaxLongTermFrameIdx = 0;
+            video->LongTermFrameIdx = 0;
+        }
+    }
+    else
+    {
+        status = BitstreamWrite1Bit(stream, sliceHdr->adaptive_ref_pic_marking_mode_flag); /* default to zero */
+        if (sliceHdr->adaptive_ref_pic_marking_mode_flag)
+        {
+            i = 0;
+            do
+            {
+                status = ue_v(stream, sliceHdr->memory_management_control_operation[i]);
+                if (sliceHdr->memory_management_control_operation[i] == 1 ||
+                        sliceHdr->memory_management_control_operation[i] == 3)
+                {
+                    status = ue_v(stream, sliceHdr->difference_of_pic_nums_minus1[i]);
+                }
+                if (sliceHdr->memory_management_control_operation[i] == 2)
+                {
+                    status = ue_v(stream, sliceHdr->long_term_pic_num[i]);
+                }
+                if (sliceHdr->memory_management_control_operation[i] == 3 ||
+                        sliceHdr->memory_management_control_operation[i] == 6)
+                {
+                    status = ue_v(stream, sliceHdr->long_term_frame_idx[i]);
+                }
+                if (sliceHdr->memory_management_control_operation[i] == 4)
+                {
+                    status = ue_v(stream, sliceHdr->max_long_term_frame_idx_plus1[i]);
+                }
+                i++;
+            }
+            while (sliceHdr->memory_management_control_operation[i] != 0 && i < MAX_DEC_REF_PIC_MARKING);
+            if (i >= MAX_DEC_REF_PIC_MARKING && sliceHdr->memory_management_control_operation[i] != 0)
+            {
+                return AVCENC_DEC_REF_PIC_MARK_FAIL; /* we're screwed!!, not enough memory */
+            }
+        }
+    }
+
+    return status;
+}
+
+/* see subclause 8.2.1 Decoding process for picture order count.
+See also PostPOC() for initialization of some variables. */
+AVCEnc_Status InitPOC(AVCEncObject *encvid)
+{
+    AVCCommonObj *video = encvid->common;
+    AVCSeqParamSet *currSPS = video->currSeqParams;
+    AVCSliceHeader *sliceHdr = video->sliceHdr;
+    AVCFrameIO  *currInput = encvid->currInput;
+    int i;
+
+    switch (currSPS->pic_order_cnt_type)
+    {
+        case 0: /* POC MODE 0 , subclause 8.2.1.1 */
+            /* encoding part */
+            if (video->nal_unit_type == AVC_NALTYPE_IDR)
+            {
+                encvid->dispOrdPOCRef = currInput->disp_order;
+            }
+            while (currInput->disp_order < encvid->dispOrdPOCRef)
+            {
+                encvid->dispOrdPOCRef -= video->MaxPicOrderCntLsb;
+            }
+            sliceHdr->pic_order_cnt_lsb = currInput->disp_order - encvid->dispOrdPOCRef;
+            while (sliceHdr->pic_order_cnt_lsb >= video->MaxPicOrderCntLsb)
+            {
+                sliceHdr->pic_order_cnt_lsb -= video->MaxPicOrderCntLsb;
+            }
+            /* decoding part */
+            /* Calculate the MSBs of current picture */
+            if (video->nal_unit_type == AVC_NALTYPE_IDR)
+            {
+                video->prevPicOrderCntMsb = 0;
+                video->prevPicOrderCntLsb = 0;
+            }
+            if (sliceHdr->pic_order_cnt_lsb  <  video->prevPicOrderCntLsb  &&
+                    (video->prevPicOrderCntLsb - sliceHdr->pic_order_cnt_lsb)  >= (video->MaxPicOrderCntLsb / 2))
+                video->PicOrderCntMsb = video->prevPicOrderCntMsb + video->MaxPicOrderCntLsb;
+            else if (sliceHdr->pic_order_cnt_lsb  >  video->prevPicOrderCntLsb  &&
+                     (sliceHdr->pic_order_cnt_lsb - video->prevPicOrderCntLsb)  > (video->MaxPicOrderCntLsb / 2))
+                video->PicOrderCntMsb = video->prevPicOrderCntMsb - video->MaxPicOrderCntLsb;
+            else
+                video->PicOrderCntMsb = video->prevPicOrderCntMsb;
+
+            /* JVT-I010 page 81 is different from JM7.3 */
+            if (!sliceHdr->field_pic_flag || !sliceHdr->bottom_field_flag)
+            {
+                video->PicOrderCnt = video->TopFieldOrderCnt = video->PicOrderCntMsb + sliceHdr->pic_order_cnt_lsb;
+            }
+
+            if (!sliceHdr->field_pic_flag)
+            {
+                video->BottomFieldOrderCnt = video->TopFieldOrderCnt + sliceHdr->delta_pic_order_cnt_bottom;
+            }
+            else if (sliceHdr->bottom_field_flag)
+            {
+                video->PicOrderCnt = video->BottomFieldOrderCnt = video->PicOrderCntMsb + sliceHdr->pic_order_cnt_lsb;
+            }
+
+            if (!sliceHdr->field_pic_flag)
+            {
+                video->PicOrderCnt = AVC_MIN(video->TopFieldOrderCnt, video->BottomFieldOrderCnt);
+            }
+
+            if (video->currPicParams->pic_order_present_flag && !sliceHdr->field_pic_flag)
+            {
+                sliceHdr->delta_pic_order_cnt_bottom = 0; /* defaulted to zero */
+            }
+
+            break;
+        case 1: /* POC MODE 1, subclause 8.2.1.2 */
+            /* calculate FrameNumOffset */
+            if (video->nal_unit_type == AVC_NALTYPE_IDR)
+            {
+                encvid->dispOrdPOCRef = currInput->disp_order;  /* reset the reference point */
+                video->prevFrameNumOffset = 0;
+                video->FrameNumOffset = 0;
+            }
+            else if (video->prevFrameNum > sliceHdr->frame_num)
+            {
+                video->FrameNumOffset = video->prevFrameNumOffset + video->MaxFrameNum;
+            }
+            else
+            {
+                video->FrameNumOffset = video->prevFrameNumOffset;
+            }
+            /* calculate absFrameNum */
+            if (currSPS->num_ref_frames_in_pic_order_cnt_cycle)
+            {
+                video->absFrameNum = video->FrameNumOffset + sliceHdr->frame_num;
+            }
+            else
+            {
+                video->absFrameNum = 0;
+            }
+
+            if (video->absFrameNum > 0 && video->nal_ref_idc == 0)
+            {
+                video->absFrameNum--;
+            }
+
+            /* derive picOrderCntCycleCnt and frameNumInPicOrderCntCycle */
+            if (video->absFrameNum > 0)
+            {
+                video->picOrderCntCycleCnt = (video->absFrameNum - 1) / currSPS->num_ref_frames_in_pic_order_cnt_cycle;
+                video->frameNumInPicOrderCntCycle = (video->absFrameNum - 1) % currSPS->num_ref_frames_in_pic_order_cnt_cycle;
+            }
+            /* derive expectedDeltaPerPicOrderCntCycle, this value can be computed up front. */
+            video->expectedDeltaPerPicOrderCntCycle = 0;
+            for (i = 0; i < (int)currSPS->num_ref_frames_in_pic_order_cnt_cycle; i++)
+            {
+                video->expectedDeltaPerPicOrderCntCycle += currSPS->offset_for_ref_frame[i];
+            }
+            /* derive expectedPicOrderCnt */
+            if (video->absFrameNum)
+            {
+                video->expectedPicOrderCnt = video->picOrderCntCycleCnt * video->expectedDeltaPerPicOrderCntCycle;
+                for (i = 0; i <= video->frameNumInPicOrderCntCycle; i++)
+                {
+                    video->expectedPicOrderCnt += currSPS->offset_for_ref_frame[i];
+                }
+            }
+            else
+            {
+                video->expectedPicOrderCnt = 0;
+            }
+
+            if (video->nal_ref_idc == 0)
+            {
+                video->expectedPicOrderCnt += currSPS->offset_for_non_ref_pic;
+            }
+            /* derive TopFieldOrderCnt and BottomFieldOrderCnt */
+            /* encoding part */
+            if (!currSPS->delta_pic_order_always_zero_flag)
+            {
+                sliceHdr->delta_pic_order_cnt[0] = currInput->disp_order - encvid->dispOrdPOCRef - video->expectedPicOrderCnt;
+
+                if (video->currPicParams->pic_order_present_flag && !sliceHdr->field_pic_flag)
+                {
+                    sliceHdr->delta_pic_order_cnt[1] = sliceHdr->delta_pic_order_cnt[0]; /* should be calculated from currInput->bottom_field->disp_order */
+                }
+                else
+                {
+                    sliceHdr->delta_pic_order_cnt[1] = 0;
+                }
+            }
+            else
+            {
+                sliceHdr->delta_pic_order_cnt[0] = sliceHdr->delta_pic_order_cnt[1] = 0;
+            }
+
+            if (sliceHdr->field_pic_flag == 0)
+            {
+                video->TopFieldOrderCnt = video->expectedPicOrderCnt + sliceHdr->delta_pic_order_cnt[0];
+                video->BottomFieldOrderCnt = video->TopFieldOrderCnt + currSPS->offset_for_top_to_bottom_field + sliceHdr->delta_pic_order_cnt[1];
+
+                video->PicOrderCnt = AVC_MIN(video->TopFieldOrderCnt, video->BottomFieldOrderCnt);
+            }
+            else if (sliceHdr->bottom_field_flag == 0)
+            {
+                video->TopFieldOrderCnt = video->expectedPicOrderCnt + sliceHdr->delta_pic_order_cnt[0];
+                video->PicOrderCnt = video->TopFieldOrderCnt;
+            }
+            else
+            {
+                video->BottomFieldOrderCnt = video->expectedPicOrderCnt + currSPS->offset_for_top_to_bottom_field + sliceHdr->delta_pic_order_cnt[0];
+                video->PicOrderCnt = video->BottomFieldOrderCnt;
+            }
+            break;
+
+
+        case 2: /* POC MODE 2, subclause 8.2.1.3 */
+            /* decoding order must be the same as display order */
+            /* we don't check for that. The decoder will just output in decoding order. */
+            /* Check for 2 consecutive non-reference frame */
+            if (video->nal_ref_idc == 0)
+            {
+                if (encvid->dispOrdPOCRef == 1)
+                {
+                    return AVCENC_CONSECUTIVE_NONREF;
+                }
+                encvid->dispOrdPOCRef = 1;  /* act as a flag for non ref */
+            }
+            else
+            {
+                encvid->dispOrdPOCRef = 0;
+            }
+
+
+            if (video->nal_unit_type == AVC_NALTYPE_IDR)
+            {
+                video->FrameNumOffset = 0;
+            }
+            else if (video->prevFrameNum > sliceHdr->frame_num)
+            {
+                video->FrameNumOffset = video->prevFrameNumOffset + video->MaxFrameNum;
+            }
+            else
+            {
+                video->FrameNumOffset = video->prevFrameNumOffset;
+            }
+            /* derive tempPicOrderCnt, we just use PicOrderCnt */
+            if (video->nal_unit_type == AVC_NALTYPE_IDR)
+            {
+                video->PicOrderCnt = 0;
+            }
+            else if (video->nal_ref_idc == 0)
+            {
+                video->PicOrderCnt = 2 * (video->FrameNumOffset + sliceHdr->frame_num) - 1;
+            }
+            else
+            {
+                video->PicOrderCnt = 2 * (video->FrameNumOffset + sliceHdr->frame_num);
+            }
+            /* derive TopFieldOrderCnt and BottomFieldOrderCnt */
+            if (sliceHdr->field_pic_flag == 0)
+            {
+                video->TopFieldOrderCnt = video->BottomFieldOrderCnt = video->PicOrderCnt;
+            }
+            else if (sliceHdr->bottom_field_flag)
+            {
+                video->BottomFieldOrderCnt = video->PicOrderCnt;
+            }
+            else
+            {
+                video->TopFieldOrderCnt = video->PicOrderCnt;
+            }
+            break;
+        default:
+            return AVCENC_POC_FAIL;
+    }
+
+    return AVCENC_SUCCESS;
+}
+
+/** see subclause 8.2.1 */
+AVCEnc_Status PostPOC(AVCCommonObj *video)
+{
+    AVCSliceHeader *sliceHdr = video->sliceHdr;
+    AVCSeqParamSet *currSPS = video->currSeqParams;
+
+    video->prevFrameNum = sliceHdr->frame_num;
+
+    switch (currSPS->pic_order_cnt_type)
+    {
+        case 0: /* subclause 8.2.1.1 */
+            if (video->mem_mgr_ctrl_eq_5)
+            {
+                video->prevPicOrderCntMsb = 0;
+                video->prevPicOrderCntLsb = video->TopFieldOrderCnt;
+            }
+            else
+            {
+                video->prevPicOrderCntMsb = video->PicOrderCntMsb;
+                video->prevPicOrderCntLsb = sliceHdr->pic_order_cnt_lsb;
+            }
+            break;
+        case 1:  /* subclause 8.2.1.2 and 8.2.1.3 */
+        case 2:
+            if (video->mem_mgr_ctrl_eq_5)
+            {
+                video->prevFrameNumOffset = 0;
+            }
+            else
+            {
+                video->prevFrameNumOffset = video->FrameNumOffset;
+            }
+            break;
+    }
+
+    return AVCENC_SUCCESS;
+}
+
diff --git a/media/libstagefright/codecs/avc/enc/src/init.cpp b/media/libstagefright/codecs/avc/enc/src/init.cpp
new file mode 100644
index 0000000..c258b57
--- /dev/null
+++ b/media/libstagefright/codecs/avc/enc/src/init.cpp
@@ -0,0 +1,899 @@
+/* ------------------------------------------------------------------
+ * Copyright (C) 1998-2009 PacketVideo
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
+ * express or implied.
+ * See the License for the specific language governing permissions
+ * and limitations under the License.
+ * -------------------------------------------------------------------
+ */
+#include "avcenc_lib.h"
+#include "avcenc_api.h"
+
+#define LOG2_MAX_FRAME_NUM_MINUS4   12   /* 12 default */
+#define SLICE_GROUP_CHANGE_CYCLE    1    /* default */
+
+/* initialized variables to be used in SPS*/
+AVCEnc_Status  SetEncodeParam(AVCHandle* avcHandle, AVCEncParams* encParam,
+                              void* extSPS, void* extPPS)
+{
+    AVCEncObject *encvid = (AVCEncObject*) avcHandle->AVCObject;
+    AVCCommonObj *video = encvid->common;
+    AVCSeqParamSet *seqParam = video->currSeqParams;
+    AVCPicParamSet *picParam = video->currPicParams;
+    AVCSliceHeader *sliceHdr = video->sliceHdr;
+    AVCRateControl *rateCtrl = encvid->rateCtrl;
+    AVCEnc_Status status;
+    void *userData = avcHandle->userData;
+    int ii, maxFrameNum;
+
+    AVCSeqParamSet* extS = NULL;
+    AVCPicParamSet* extP = NULL;
+
+    if (extSPS) extS = (AVCSeqParamSet*) extSPS;
+    if (extPPS) extP = (AVCPicParamSet*) extPPS;
+
+    /* This part sets the default values of the encoding options this
+    library supports in seqParam, picParam and sliceHdr structures and
+    also copy the values from the encParam into the above 3 structures.
+
+    Some parameters will be assigned later when we encode SPS or PPS such as
+    the seq_parameter_id or pic_parameter_id. Also some of the slice parameters
+    have to be re-assigned per slice basis such as frame_num, slice_type,
+    first_mb_in_slice, pic_order_cnt_lsb, slice_qp_delta, slice_group_change_cycle */
+
+    /* profile_idc, constrained_setx_flag and level_idc is set by VerifyProfile(),
+    and VerifyLevel() functions later. */
+
+    encvid->fullsearch_enable = encParam->fullsearch;
+
+    encvid->outOfBandParamSet = ((encParam->out_of_band_param_set == AVC_ON) ? TRUE : FALSE);
+
+    /* parameters derived from the the encParam that are used in SPS */
+    if (extS)
+    {
+        video->MaxPicOrderCntLsb =  1 << (extS->log2_max_pic_order_cnt_lsb_minus4 + 4);
+        video->PicWidthInMbs = extS->pic_width_in_mbs_minus1 + 1;
+        video->PicHeightInMapUnits = extS->pic_height_in_map_units_minus1 + 1 ;
+        video->FrameHeightInMbs = (2 - extS->frame_mbs_only_flag) * video->PicHeightInMapUnits ;
+    }
+    else
+    {
+        video->MaxPicOrderCntLsb =  1 << (encParam->log2_max_poc_lsb_minus_4 + 4);
+        video->PicWidthInMbs = (encParam->width + 15) >> 4; /* round it to multiple of 16 */
+        video->FrameHeightInMbs = (encParam->height + 15) >> 4; /* round it to multiple of 16 */
+        video->PicHeightInMapUnits = video->FrameHeightInMbs;
+    }
+
+    video->PicWidthInSamplesL = video->PicWidthInMbs * 16 ;
+    if (video->PicWidthInSamplesL + 32 > 0xFFFF)
+    {
+        return AVCENC_NOT_SUPPORTED; // we use 2-bytes for pitch
+    }
+
+    video->PicWidthInSamplesC = video->PicWidthInMbs * 8 ;
+    video->PicHeightInMbs = video->FrameHeightInMbs;
+    video->PicSizeInMapUnits = video->PicWidthInMbs * video->PicHeightInMapUnits ;
+    video->PicHeightInSamplesL = video->PicHeightInMbs * 16;
+    video->PicHeightInSamplesC = video->PicHeightInMbs * 8;
+    video->PicSizeInMbs = video->PicWidthInMbs * video->PicHeightInMbs;
+
+    if (!extS && !extP)
+    {
+        maxFrameNum = (encParam->idr_period == -1) ? (1 << 16) : encParam->idr_period;
+        ii = 0;
+        while (maxFrameNum > 0)
+        {
+            ii++;
+            maxFrameNum >>= 1;
+        }
+        if (ii < 4) ii = 4;
+        else if (ii > 16) ii = 16;
+
+        seqParam->log2_max_frame_num_minus4 = ii - 4;//LOG2_MAX_FRAME_NUM_MINUS4; /* default */
+
+        video->MaxFrameNum = 1 << ii; //(LOG2_MAX_FRAME_NUM_MINUS4 + 4); /* default */
+        video->MaxPicNum = video->MaxFrameNum;
+
+        /************* set the SPS *******************/
+        seqParam->seq_parameter_set_id = 0; /* start with zero */
+        /* POC */
+        seqParam->pic_order_cnt_type = encParam->poc_type; /* POC type */
+        if (encParam->poc_type == 0)
+        {
+            if (/*encParam->log2_max_poc_lsb_minus_4<0 || (no need, it's unsigned)*/
+                encParam->log2_max_poc_lsb_minus_4 > 12)
+            {
+                return AVCENC_INVALID_POC_LSB;
+            }
+            seqParam->log2_max_pic_order_cnt_lsb_minus4 = encParam->log2_max_poc_lsb_minus_4;
+        }
+        else if (encParam->poc_type == 1)
+        {
+            seqParam->delta_pic_order_always_zero_flag = encParam->delta_poc_zero_flag;
+            seqParam->offset_for_non_ref_pic = encParam->offset_poc_non_ref;
+            seqParam->offset_for_top_to_bottom_field = encParam->offset_top_bottom;
+            seqParam->num_ref_frames_in_pic_order_cnt_cycle = encParam->num_ref_in_cycle;
+            if (encParam->offset_poc_ref == NULL)
+            {
+                return AVCENC_ENCPARAM_MEM_FAIL;
+            }
+            for (ii = 0; ii < encParam->num_ref_frame; ii++)
+            {
+                seqParam->offset_for_ref_frame[ii] = encParam->offset_poc_ref[ii];
+            }
+        }
+        /* number of reference frame */
+        if (encParam->num_ref_frame > 16 || encParam->num_ref_frame < 0)
+        {
+            return AVCENC_INVALID_NUM_REF;
+        }
+        seqParam->num_ref_frames = encParam->num_ref_frame; /* num reference frame range 0...16*/
+        seqParam->gaps_in_frame_num_value_allowed_flag = FALSE;
+        seqParam->pic_width_in_mbs_minus1 = video->PicWidthInMbs - 1;
+        seqParam->pic_height_in_map_units_minus1 = video->PicHeightInMapUnits - 1;
+        seqParam->frame_mbs_only_flag = TRUE;
+        seqParam->mb_adaptive_frame_field_flag = FALSE;
+        seqParam->direct_8x8_inference_flag = FALSE; /* default */
+        seqParam->frame_cropping_flag = FALSE;
+        seqParam->frame_crop_bottom_offset = 0;
+        seqParam->frame_crop_left_offset = 0;
+        seqParam->frame_crop_right_offset = 0;
+        seqParam->frame_crop_top_offset = 0;
+        seqParam->vui_parameters_present_flag = FALSE; /* default */
+    }
+    else if (extS) // use external SPS and PPS
+    {
+        seqParam->seq_parameter_set_id = extS->seq_parameter_set_id;
+        seqParam->log2_max_frame_num_minus4 = extS->log2_max_frame_num_minus4;
+        video->MaxFrameNum = 1 << (extS->log2_max_frame_num_minus4 + 4);
+        video->MaxPicNum = video->MaxFrameNum;
+        if (encParam->idr_period > (int)(video->MaxFrameNum) || (encParam->idr_period == -1))
+        {
+            encParam->idr_period = (int)video->MaxFrameNum;
+        }
+
+        seqParam->pic_order_cnt_type = extS->pic_order_cnt_type;
+        if (seqParam->pic_order_cnt_type == 0)
+        {
+            if (/*extS->log2_max_pic_order_cnt_lsb_minus4<0 || (no need it's unsigned)*/
+                extS->log2_max_pic_order_cnt_lsb_minus4 > 12)
+            {
+                return AVCENC_INVALID_POC_LSB;
+            }
+            seqParam->log2_max_pic_order_cnt_lsb_minus4 = extS->log2_max_pic_order_cnt_lsb_minus4;
+        }
+        else if (seqParam->pic_order_cnt_type == 1)
+        {
+            seqParam->delta_pic_order_always_zero_flag = extS->delta_pic_order_always_zero_flag;
+            seqParam->offset_for_non_ref_pic = extS->offset_for_non_ref_pic;
+            seqParam->offset_for_top_to_bottom_field = extS->offset_for_top_to_bottom_field;
+            seqParam->num_ref_frames_in_pic_order_cnt_cycle = extS->num_ref_frames_in_pic_order_cnt_cycle;
+            if (extS->offset_for_ref_frame == NULL)
+            {
+                return AVCENC_ENCPARAM_MEM_FAIL;
+            }
+            for (ii = 0; ii < (int) extS->num_ref_frames; ii++)
+            {
+                seqParam->offset_for_ref_frame[ii] = extS->offset_for_ref_frame[ii];
+            }
+        }
+        /* number of reference frame */
+        if (extS->num_ref_frames > 16 /*|| extS->num_ref_frames<0 (no need, it's unsigned)*/)
+        {
+            return AVCENC_INVALID_NUM_REF;
+        }
+        seqParam->num_ref_frames = extS->num_ref_frames; /* num reference frame range 0...16*/
+        seqParam->gaps_in_frame_num_value_allowed_flag = extS->gaps_in_frame_num_value_allowed_flag;
+        seqParam->pic_width_in_mbs_minus1 = extS->pic_width_in_mbs_minus1;
+        seqParam->pic_height_in_map_units_minus1 = extS->pic_height_in_map_units_minus1;
+        seqParam->frame_mbs_only_flag = extS->frame_mbs_only_flag;
+        if (extS->frame_mbs_only_flag != TRUE)
+        {
+            return AVCENC_NOT_SUPPORTED;
+        }
+        seqParam->mb_adaptive_frame_field_flag = extS->mb_adaptive_frame_field_flag;
+        if (extS->mb_adaptive_frame_field_flag != FALSE)
+        {
+            return AVCENC_NOT_SUPPORTED;
+        }
+
+        seqParam->direct_8x8_inference_flag = extS->direct_8x8_inference_flag;
+        seqParam->frame_cropping_flag = extS->frame_cropping_flag ;
+        if (extS->frame_cropping_flag != FALSE)
+        {
+            return AVCENC_NOT_SUPPORTED;
+        }
+
+        seqParam->frame_crop_bottom_offset = 0;
+        seqParam->frame_crop_left_offset = 0;
+        seqParam->frame_crop_right_offset = 0;
+        seqParam->frame_crop_top_offset = 0;
+        seqParam->vui_parameters_present_flag = extS->vui_parameters_present_flag;
+        if (extS->vui_parameters_present_flag)
+        {
+            memcpy(&(seqParam->vui_parameters), &(extS->vui_parameters), sizeof(AVCVUIParams));
+        }
+    }
+    else
+    {
+        return AVCENC_NOT_SUPPORTED;
+    }
+
+    /***************** now PPS ******************************/
+    if (!extP && !extS)
+    {
+        picParam->pic_parameter_set_id = (uint)(-1); /* start with zero */
+        picParam->seq_parameter_set_id = (uint)(-1); /* start with zero */
+        picParam->entropy_coding_mode_flag = 0; /* default to CAVLC */
+        picParam->pic_order_present_flag = 0; /* default for now, will need it for B-slice */
+        /* FMO */
+        if (encParam->num_slice_group < 1 || encParam->num_slice_group > MAX_NUM_SLICE_GROUP)
+        {
+            return AVCENC_INVALID_NUM_SLICEGROUP;
+        }
+        picParam->num_slice_groups_minus1 = encParam->num_slice_group - 1;
+
+        if (picParam->num_slice_groups_minus1 > 0)
+        {
+            picParam->slice_group_map_type = encParam->fmo_type;
+            switch (encParam->fmo_type)
+            {
+                case 0:
+                    for (ii = 0; ii <= (int)picParam->num_slice_groups_minus1; ii++)
+                    {
+                        picParam->run_length_minus1[ii] = encParam->run_length_minus1[ii];
+                    }
+                    break;
+                case 2:
+                    for (ii = 0; ii < (int)picParam->num_slice_groups_minus1; ii++)
+                    {
+                        picParam->top_left[ii] = encParam->top_left[ii];
+                        picParam->bottom_right[ii] = encParam->bottom_right[ii];
+                    }
+                    break;
+                case 3:
+                case 4:
+                case 5:
+                    if (encParam->change_dir_flag == AVC_ON)
+                    {
+                        picParam->slice_group_change_direction_flag = TRUE;
+                    }
+                    else
+                    {
+                        picParam->slice_group_change_direction_flag = FALSE;
+                    }
+                    if (/*encParam->change_rate_minus1 < 0 || (no need it's unsigned) */
+                        encParam->change_rate_minus1 > video->PicSizeInMapUnits - 1)
+                    {
+                        return AVCENC_INVALID_CHANGE_RATE;
+                    }
+                    picParam->slice_group_change_rate_minus1 = encParam->change_rate_minus1;
+                    video->SliceGroupChangeRate = picParam->slice_group_change_rate_minus1 + 1;
+                    break;
+                case 6:
+                    picParam->pic_size_in_map_units_minus1 = video->PicSizeInMapUnits - 1;
+
+                    /* allocate picParam->slice_group_id */
+                    picParam->slice_group_id = (uint*)avcHandle->CBAVC_Malloc(userData, sizeof(uint) * video->PicSizeInMapUnits, DEFAULT_ATTR);
+                    if (picParam->slice_group_id == NULL)
+                    {
+                        return AVCENC_MEMORY_FAIL;
+                    }
+
+                    if (encParam->slice_group == NULL)
+                    {
+                        return AVCENC_ENCPARAM_MEM_FAIL;
+                    }
+                    for (ii = 0; ii < (int)video->PicSizeInMapUnits; ii++)
+                    {
+                        picParam->slice_group_id[ii] = encParam->slice_group[ii];
+                    }
+                    break;
+                default:
+                    return AVCENC_INVALID_FMO_TYPE;
+            }
+        }
+        picParam->num_ref_idx_l0_active_minus1 = encParam->num_ref_frame - 1; /* assume frame only */
+        picParam->num_ref_idx_l1_active_minus1 = 0; /* default value */
+        picParam->weighted_pred_flag = 0; /* no weighted prediction supported */
+        picParam->weighted_bipred_idc = 0; /* range 0,1,2 */
+        if (/*picParam->weighted_bipred_idc < 0 || (no need, it's unsigned) */
+            picParam->weighted_bipred_idc > 2)
+        {
+            return AVCENC_WEIGHTED_BIPRED_FAIL;
+        }
+        picParam->pic_init_qp_minus26 = 0; /* default, will be changed at slice level anyway */
+        if (picParam->pic_init_qp_minus26 < -26 || picParam->pic_init_qp_minus26 > 25)
+        {
+            return AVCENC_INIT_QP_FAIL; /* out of range */
+        }
+        picParam->pic_init_qs_minus26 = 0;
+        if (picParam->pic_init_qs_minus26 < -26 || picParam->pic_init_qs_minus26 > 25)
+        {
+            return AVCENC_INIT_QS_FAIL; /* out of range */
+        }
+
+        picParam->chroma_qp_index_offset = 0; /* default to zero for now */
+        if (picParam->chroma_qp_index_offset < -12 || picParam->chroma_qp_index_offset > 12)
+        {
+            return AVCENC_CHROMA_QP_FAIL; /* out of range */
+        }
+        /* deblocking */
+        picParam->deblocking_filter_control_present_flag = (encParam->db_filter == AVC_ON) ? TRUE : FALSE ;
+        /* constrained intra prediction */
+        picParam->constrained_intra_pred_flag = (encParam->constrained_intra_pred == AVC_ON) ? TRUE : FALSE;
+        picParam->redundant_pic_cnt_present_flag = 0; /* default */
+    }
+    else if (extP)// external PPS
+    {
+        picParam->pic_parameter_set_id = extP->pic_parameter_set_id - 1; /* to be increased by one */
+        picParam->seq_parameter_set_id = extP->seq_parameter_set_id;
+        picParam->entropy_coding_mode_flag = extP->entropy_coding_mode_flag;
+        if (extP->entropy_coding_mode_flag != 0) /* default to CAVLC */
+        {
+            return AVCENC_NOT_SUPPORTED;
+        }
+        picParam->pic_order_present_flag = extP->pic_order_present_flag; /* default for now, will need it for B-slice */
+        if (extP->pic_order_present_flag != 0)
+        {
+            return AVCENC_NOT_SUPPORTED;
+        }
+        /* FMO */
+        if (/*(extP->num_slice_groups_minus1<0) || (no need it's unsigned) */
+            (extP->num_slice_groups_minus1 > MAX_NUM_SLICE_GROUP - 1))
+        {
+            return AVCENC_INVALID_NUM_SLICEGROUP;
+        }
+        picParam->num_slice_groups_minus1 = extP->num_slice_groups_minus1;
+
+        if (picParam->num_slice_groups_minus1 > 0)
+        {
+            picParam->slice_group_map_type = extP->slice_group_map_type;
+            switch (extP->slice_group_map_type)
+            {
+                case 0:
+                    for (ii = 0; ii <= (int)extP->num_slice_groups_minus1; ii++)
+                    {
+                        picParam->run_length_minus1[ii] = extP->run_length_minus1[ii];
+                    }
+                    break;
+                case 2:
+                    for (ii = 0; ii < (int)picParam->num_slice_groups_minus1; ii++)
+                    {
+                        picParam->top_left[ii] = extP->top_left[ii];
+                        picParam->bottom_right[ii] = extP->bottom_right[ii];
+                    }
+                    break;
+                case 3:
+                case 4:
+                case 5:
+                    picParam->slice_group_change_direction_flag = extP->slice_group_change_direction_flag;
+                    if (/*extP->slice_group_change_rate_minus1 < 0 || (no need, it's unsigned) */
+                        extP->slice_group_change_rate_minus1 > video->PicSizeInMapUnits - 1)
+                    {
+                        return AVCENC_INVALID_CHANGE_RATE;
+                    }
+                    picParam->slice_group_change_rate_minus1 = extP->slice_group_change_rate_minus1;
+                    video->SliceGroupChangeRate = picParam->slice_group_change_rate_minus1 + 1;
+                    break;
+                case 6:
+                    if (extP->pic_size_in_map_units_minus1 != video->PicSizeInMapUnits - 1)
+                    {
+                        return AVCENC_NOT_SUPPORTED;
+                    }
+
+                    picParam->pic_size_in_map_units_minus1 = extP->pic_size_in_map_units_minus1;
+
+                    /* allocate picParam->slice_group_id */
+                    picParam->slice_group_id = (uint*)avcHandle->CBAVC_Malloc(userData, sizeof(uint) * video->PicSizeInMapUnits, DEFAULT_ATTR);
+                    if (picParam->slice_group_id == NULL)
+                    {
+                        return AVCENC_MEMORY_FAIL;
+                    }
+
+                    if (extP->slice_group_id == NULL)
+                    {
+                        return AVCENC_ENCPARAM_MEM_FAIL;
+                    }
+                    for (ii = 0; ii < (int)video->PicSizeInMapUnits; ii++)
+                    {
+                        picParam->slice_group_id[ii] = extP->slice_group_id[ii];
+                    }
+                    break;
+                default:
+                    return AVCENC_INVALID_FMO_TYPE;
+            }
+        }
+        picParam->num_ref_idx_l0_active_minus1 = extP->num_ref_idx_l0_active_minus1;
+        picParam->num_ref_idx_l1_active_minus1 = extP->num_ref_idx_l1_active_minus1; /* default value */
+        if (picParam->num_ref_idx_l1_active_minus1 != 0)
+        {
+            return AVCENC_NOT_SUPPORTED;
+        }
+
+        if (extP->weighted_pred_flag)
+        {
+            return AVCENC_NOT_SUPPORTED;
+        }
+
+        picParam->weighted_pred_flag = 0; /* no weighted prediction supported */
+        picParam->weighted_bipred_idc = extP->weighted_bipred_idc; /* range 0,1,2 */
+        if (/*picParam->weighted_bipred_idc < 0 || (no need, it's unsigned) */
+            picParam->weighted_bipred_idc > 2)
+        {
+            return AVCENC_WEIGHTED_BIPRED_FAIL;
+        }
+        picParam->pic_init_qp_minus26 = extP->pic_init_qp_minus26; /* default, will be changed at slice level anyway */
+        if (picParam->pic_init_qp_minus26 < -26 || picParam->pic_init_qp_minus26 > 25)
+        {
+            return AVCENC_INIT_QP_FAIL; /* out of range */
+        }
+        picParam->pic_init_qs_minus26 = extP->pic_init_qs_minus26;
+        if (picParam->pic_init_qs_minus26 < -26 || picParam->pic_init_qs_minus26 > 25)
+        {
+            return AVCENC_INIT_QS_FAIL; /* out of range */
+        }
+
+        picParam->chroma_qp_index_offset = extP->chroma_qp_index_offset; /* default to zero for now */
+        if (picParam->chroma_qp_index_offset < -12 || picParam->chroma_qp_index_offset > 12)
+        {
+            return AVCENC_CHROMA_QP_FAIL; /* out of range */
+        }
+        /* deblocking */
+        picParam->deblocking_filter_control_present_flag = extP->deblocking_filter_control_present_flag;
+        /* constrained intra prediction */
+        picParam->constrained_intra_pred_flag = extP->constrained_intra_pred_flag;
+        if (extP->redundant_pic_cnt_present_flag  != 0)
+        {
+            return AVCENC_NOT_SUPPORTED;
+        }
+        picParam->redundant_pic_cnt_present_flag = extP->redundant_pic_cnt_present_flag; /* default */
+    }
+    else
+    {
+        return AVCENC_NOT_SUPPORTED;
+    }
+
+    /****************** now set up some SliceHeader parameters ***********/
+    if (picParam->deblocking_filter_control_present_flag == TRUE)
+    {
+        /* these values only present when db_filter is ON */
+        if (encParam->disable_db_idc > 2)
+        {
+            return AVCENC_INVALID_DEBLOCK_IDC; /* out of range */
+        }
+        sliceHdr->disable_deblocking_filter_idc = encParam->disable_db_idc;
+
+        if (encParam->alpha_offset < -6 || encParam->alpha_offset > 6)
+        {
+            return AVCENC_INVALID_ALPHA_OFFSET;
+        }
+        sliceHdr->slice_alpha_c0_offset_div2 = encParam->alpha_offset;
+
+        if (encParam->beta_offset < -6 || encParam->beta_offset > 6)
+        {
+            return AVCENC_INVALID_BETA_OFFSET;
+        }
+        sliceHdr->slice_beta_offset_div_2 =  encParam->beta_offset;
+    }
+    if (encvid->outOfBandParamSet == TRUE)
+    {
+        sliceHdr->idr_pic_id = 0;
+    }
+    else
+    {
+        sliceHdr->idr_pic_id = (uint)(-1); /* start with zero */
+    }
+    sliceHdr->field_pic_flag = FALSE;
+    sliceHdr->bottom_field_flag = FALSE;  /* won't be used anyway */
+    video->MbaffFrameFlag = (seqParam->mb_adaptive_frame_field_flag && !sliceHdr->field_pic_flag);
+
+    /* the rest will be set in InitSlice() */
+
+    /* now the rate control and performance related parameters */
+    rateCtrl->scdEnable = (encParam->auto_scd == AVC_ON) ? TRUE : FALSE;
+    rateCtrl->idrPeriod = encParam->idr_period + 1;
+    rateCtrl->intraMBRate = encParam->intramb_refresh;
+    rateCtrl->dpEnable = (encParam->data_par == AVC_ON) ? TRUE : FALSE;
+
+    rateCtrl->subPelEnable = (encParam->sub_pel == AVC_ON) ? TRUE : FALSE;
+    rateCtrl->mvRange = encParam->search_range;
+
+    rateCtrl->subMBEnable = (encParam->submb_pred == AVC_ON) ? TRUE : FALSE;
+    rateCtrl->rdOptEnable = (encParam->rdopt_mode == AVC_ON) ? TRUE : FALSE;
+    rateCtrl->bidirPred = (encParam->bidir_pred == AVC_ON) ? TRUE : FALSE;
+
+    rateCtrl->rcEnable = (encParam->rate_control == AVC_ON) ? TRUE : FALSE;
+    rateCtrl->initQP = encParam->initQP;
+    rateCtrl->initQP = AVC_CLIP3(0, 51, rateCtrl->initQP);
+
+    rateCtrl->bitRate = encParam->bitrate;
+    rateCtrl->cpbSize = encParam->CPB_size;
+    rateCtrl->initDelayOffset = (rateCtrl->bitRate * encParam->init_CBP_removal_delay / 1000);
+
+    if (encParam->frame_rate == 0)
+    {
+        return AVCENC_INVALID_FRAMERATE;
+    }
+
+    rateCtrl->frame_rate = (OsclFloat)(encParam->frame_rate * 1.0 / 1000);
+//  rateCtrl->srcInterval = encParam->src_interval;
+    rateCtrl->first_frame = 1; /* set this flag for the first time */
+
+    /* contrained_setx_flag will be set inside the VerifyProfile called below.*/
+    if (!extS && !extP)
+    {
+        seqParam->profile_idc = encParam->profile;
+        seqParam->constrained_set0_flag = FALSE;
+        seqParam->constrained_set1_flag = FALSE;
+        seqParam->constrained_set2_flag = FALSE;
+        seqParam->constrained_set3_flag = FALSE;
+        seqParam->level_idc = encParam->level;
+    }
+    else
+    {
+        seqParam->profile_idc = extS->profile_idc;
+        seqParam->constrained_set0_flag = extS->constrained_set0_flag;
+        seqParam->constrained_set1_flag = extS->constrained_set1_flag;
+        seqParam->constrained_set2_flag = extS->constrained_set2_flag;
+        seqParam->constrained_set3_flag = extS->constrained_set3_flag;
+        seqParam->level_idc = extS->level_idc;
+    }
+
+
+    status = VerifyProfile(encvid, seqParam, picParam);
+    if (status != AVCENC_SUCCESS)
+    {
+        return status;
+    }
+
+    status = VerifyLevel(encvid, seqParam, picParam);
+    if (status != AVCENC_SUCCESS)
+    {
+        return status;
+    }
+
+    return AVCENC_SUCCESS;
+}
+
+/* verify the profile setting */
+AVCEnc_Status VerifyProfile(AVCEncObject *encvid, AVCSeqParamSet *seqParam, AVCPicParamSet *picParam)
+{
+    AVCRateControl *rateCtrl = encvid->rateCtrl;
+    AVCEnc_Status status = AVCENC_SUCCESS;
+
+    if (seqParam->profile_idc == 0) /* find profile for this setting */
+    {
+        /* find the right profile for it */
+        if (seqParam->direct_8x8_inference_flag == TRUE &&
+                picParam->entropy_coding_mode_flag == FALSE &&
+                picParam->num_slice_groups_minus1 <= 7 /*&&
+            picParam->num_slice_groups_minus1>=0 (no need, it's unsigned) */)
+        {
+            seqParam->profile_idc = AVC_EXTENDED;
+            seqParam->constrained_set2_flag = TRUE;
+        }
+
+        if (rateCtrl->dpEnable == FALSE &&
+                picParam->num_slice_groups_minus1 == 0 &&
+                picParam->redundant_pic_cnt_present_flag == FALSE)
+        {
+            seqParam->profile_idc = AVC_MAIN;
+            seqParam->constrained_set1_flag = TRUE;
+        }
+
+        if (rateCtrl->bidirPred == FALSE &&
+                rateCtrl->dpEnable == FALSE &&
+                seqParam->frame_mbs_only_flag == TRUE &&
+                picParam->weighted_pred_flag == FALSE &&
+                picParam->weighted_bipred_idc == 0 &&
+                picParam->entropy_coding_mode_flag == FALSE &&
+                picParam->num_slice_groups_minus1 <= 7 /*&&
+            picParam->num_slice_groups_minus1>=0 (no need, it's unsigned)*/)
+        {
+            seqParam->profile_idc = AVC_BASELINE;
+            seqParam->constrained_set0_flag = TRUE;
+        }
+
+        if (seqParam->profile_idc == 0) /* still zero */
+        {
+            return AVCENC_PROFILE_NOT_SUPPORTED;
+        }
+    }
+
+    /* check the list of supported profile by this library */
+    switch (seqParam->profile_idc)
+    {
+        case AVC_BASELINE:
+            if (rateCtrl->bidirPred == TRUE ||
+                    rateCtrl->dpEnable == TRUE ||
+                    seqParam->frame_mbs_only_flag != TRUE ||
+                    picParam->weighted_pred_flag == TRUE ||
+                    picParam->weighted_bipred_idc != 0 ||
+                    picParam->entropy_coding_mode_flag == TRUE ||
+                    picParam->num_slice_groups_minus1 > 7 /*||
+            picParam->num_slice_groups_minus1<0 (no need, it's unsigned) */)
+            {
+                status = AVCENC_TOOLS_NOT_SUPPORTED;
+            }
+            break;
+
+        case AVC_MAIN:
+        case AVC_EXTENDED:
+            status = AVCENC_PROFILE_NOT_SUPPORTED;
+    }
+
+    return status;
+}
+
+/* verify the level setting */
+AVCEnc_Status VerifyLevel(AVCEncObject *encvid, AVCSeqParamSet *seqParam, AVCPicParamSet *picParam)
+{
+    (void)(picParam);
+
+    AVCRateControl *rateCtrl = encvid->rateCtrl;
+    AVCCommonObj *video = encvid->common;
+    int mb_per_sec, ii;
+    int lev_idx;
+    int dpb_size;
+
+    mb_per_sec = (int)(video->PicSizeInMbs * rateCtrl->frame_rate + 0.5);
+    dpb_size = (seqParam->num_ref_frames * video->PicSizeInMbs * 3) >> 6;
+
+    if (seqParam->level_idc == 0) /* find level for this setting */
+    {
+        for (ii = 0; ii < MAX_LEVEL_IDX; ii++)
+        {
+            if (mb_per_sec <= MaxMBPS[ii] &&
+                    video->PicSizeInMbs <= (uint)MaxFS[ii] &&
+                    rateCtrl->bitRate <= (int32)MaxBR[ii]*1000 &&
+                    rateCtrl->cpbSize <= (int32)MaxCPB[ii]*1000 &&
+                    rateCtrl->mvRange <= MaxVmvR[ii] &&
+                    dpb_size <= MaxDPBX2[ii]*512)
+            {
+                seqParam->level_idc = mapIdx2Lev[ii];
+                break;
+            }
+        }
+        if (seqParam->level_idc == 0)
+        {
+            return AVCENC_LEVEL_NOT_SUPPORTED;
+        }
+    }
+
+    /* check if this level is supported by this library */
+    lev_idx = mapLev2Idx[seqParam->level_idc];
+    if (seqParam->level_idc == AVC_LEVEL1_B)
+    {
+        seqParam->constrained_set3_flag = 1;
+    }
+
+
+    if (lev_idx == 255) /* not defined */
+    {
+        return AVCENC_LEVEL_NOT_SUPPORTED;
+    }
+
+    /* check if the encoding setting complies with the level */
+    if (mb_per_sec > MaxMBPS[lev_idx] ||
+            video->PicSizeInMbs > (uint)MaxFS[lev_idx] ||
+            rateCtrl->bitRate > (int32)MaxBR[lev_idx]*1000 ||
+            rateCtrl->cpbSize > (int32)MaxCPB[lev_idx]*1000 ||
+            rateCtrl->mvRange > MaxVmvR[lev_idx])
+    {
+        return AVCENC_LEVEL_FAIL;
+    }
+
+    return AVCENC_SUCCESS;
+}
+
+/* initialize variables at the beginning of each frame */
+/* determine the picture type */
+/* encode POC */
+/* maybe we should do more stuff here. MotionEstimation+SCD and generate a new SPS and PPS */
+AVCEnc_Status InitFrame(AVCEncObject *encvid)
+{
+    AVCStatus ret;
+    AVCEnc_Status status;
+    AVCCommonObj *video = encvid->common;
+    AVCSliceHeader *sliceHdr = video->sliceHdr;
+
+    /* look for the next frame in coding_order and look for available picture
+       in the DPB. Note, video->currFS->PicOrderCnt, currFS->FrameNum and currPic->PicNum
+       are set to wrong number in this function (right for decoder). */
+    if (video->nal_unit_type == AVC_NALTYPE_IDR)
+    {
+        // call init DPB in here.
+        ret = AVCConfigureSequence(encvid->avcHandle, video, TRUE);
+        if (ret != AVC_SUCCESS)
+        {
+            return AVCENC_FAIL;
+        }
+    }
+
+    /* flexible macroblock ordering (every frame)*/
+    /* populate video->mapUnitToSliceGroupMap and video->MbToSliceGroupMap */
+    /* It changes once per each PPS. */
+    FMOInit(video);
+
+    ret = DPBInitBuffer(encvid->avcHandle, video); // get new buffer
+
+    if (ret != AVC_SUCCESS)
+    {
+        return (AVCEnc_Status)ret; // AVCENC_PICTURE_READY, FAIL
+    }
+
+    DPBInitPic(video, 0); /* 0 is dummy */
+
+    /************* determine picture type IDR or non-IDR ***********/
+    video->currPicType = AVC_FRAME;
+    video->slice_data_partitioning = FALSE;
+    encvid->currInput->is_reference = 1; /* default to all frames */
+    video->nal_ref_idc = 1;  /* need to set this for InitPOC */
+    video->currPic->isReference = TRUE;
+
+    /************* set frame_num ********************/
+    if (video->nal_unit_type == AVC_NALTYPE_IDR)
+    {
+        video->prevFrameNum = video->MaxFrameNum;
+        video->PrevRefFrameNum = 0;
+        sliceHdr->frame_num = 0;
+    }
+    /* otherwise, it's set to previous reference frame access unit's frame_num in decoding order,
+       see the end of PVAVCDecodeSlice()*/
+    /* There's also restriction on the frame_num, see page 59 of JVT-I1010.doc. */
+    /* Basically, frame_num can't be repeated unless it's opposite fields or non reference fields */
+    else
+    {
+        sliceHdr->frame_num = (video->PrevRefFrameNum + 1) % video->MaxFrameNum;
+    }
+    video->CurrPicNum = sliceHdr->frame_num;  /* for field_pic_flag = 0 */
+    //video->CurrPicNum = 2*sliceHdr->frame_num + 1; /* for field_pic_flag = 1 */
+
+    /* assign pic_order_cnt, video->PicOrderCnt */
+    status = InitPOC(encvid);
+    if (status != AVCENC_SUCCESS)  /* incorrigable fail */
+    {
+        return status;
+    }
+
+    /* Initialize refListIdx for this picture */
+    RefListInit(video);
+
+    /************* motion estimation and scene analysis ************/
+    // , to move this to MB-based MV search for comparison
+    // use sub-optimal QP for mv search
+    AVCMotionEstimation(encvid);  /* AVCENC_SUCCESS or AVCENC_NEW_IDR */
+
+    /* after this point, the picture type will be fixed to either IDR or non-IDR */
+    video->currFS->PicOrderCnt = video->PicOrderCnt;
+    video->currFS->FrameNum = video->sliceHdr->frame_num;
+    video->currPic->PicNum = video->CurrPicNum;
+    video->mbNum = 0; /* start from zero MB */
+    encvid->currSliceGroup = 0; /* start from slice group #0 */
+    encvid->numIntraMB = 0; /* reset this counter */
+
+    if (video->nal_unit_type == AVC_NALTYPE_IDR)
+    {
+        RCInitGOP(encvid);
+
+        /* calculate picture QP */
+        RCInitFrameQP(encvid);
+
+        return AVCENC_NEW_IDR;
+    }
+
+    /* calculate picture QP */
+    RCInitFrameQP(encvid); /* get QP after MV search */
+
+    return AVCENC_SUCCESS;
+}
+
+/* initialize variables for this slice */
+AVCEnc_Status InitSlice(AVCEncObject *encvid)
+{
+    AVCCommonObj *video = encvid->common;
+    AVCSliceHeader *sliceHdr = video->sliceHdr;
+    AVCPicParamSet *currPPS = video->currPicParams;
+    AVCSeqParamSet *currSPS = video->currSeqParams;
+    int slice_type = video->slice_type;
+
+    sliceHdr->first_mb_in_slice = video->mbNum;
+    if (video->mbNum) // not first slice of a frame
+    {
+        video->sliceHdr->slice_type = (AVCSliceType)slice_type;
+    }
+
+    /* sliceHdr->slice_type already set in InitFrame */
+
+    sliceHdr->pic_parameter_set_id = video->currPicParams->pic_parameter_set_id;
+
+    /* sliceHdr->frame_num already set in InitFrame */
+
+    if (!currSPS->frame_mbs_only_flag)  /* we shouldn't need this check */
+    {
+        sliceHdr->field_pic_flag = sliceHdr->bottom_field_flag = FALSE;
+        return AVCENC_TOOLS_NOT_SUPPORTED;
+    }
+
+    /* sliceHdr->idr_pic_id already set in PVAVCEncodeNAL
+
+     sliceHdr->pic_order_cnt_lsb already set in InitFrame..InitPOC
+     sliceHdr->delta_pic_order_cnt_bottom  already set in InitPOC
+
+    sliceHdr->delta_pic_order_cnt[0] already set in InitPOC
+    sliceHdr->delta_pic_order_cnt[1] already set in InitPOC
+    */
+
+    sliceHdr->redundant_pic_cnt = 0; /* default if(currPPS->redundant_pic_cnt_present_flag), range 0..127 */
+    sliceHdr->direct_spatial_mv_pred_flag = 0; // default if(slice_type == AVC_B_SLICE)
+
+    sliceHdr->num_ref_idx_active_override_flag = FALSE; /* default, if(slice_type== P,SP or B)*/
+    sliceHdr->num_ref_idx_l0_active_minus1 = 0; /* default, if (num_ref_idx_active_override_flag) */
+    sliceHdr->num_ref_idx_l1_active_minus1 = 0; /* default, if above and B_slice */
+    /* the above 2 values range from 0..15 for frame picture and 0..31 for field picture */
+
+    /* ref_pic_list_reordering(), currently we don't do anything */
+    sliceHdr->ref_pic_list_reordering_flag_l0 = FALSE; /* default */
+    sliceHdr->ref_pic_list_reordering_flag_l1 = FALSE; /* default */
+    /* if the above are TRUE, some other params must be set */
+
+    if ((currPPS->weighted_pred_flag && (slice_type == AVC_P_SLICE || slice_type == AVC_SP_SLICE)) ||
+            (currPPS->weighted_bipred_idc == 1 && slice_type == AVC_B_SLICE))
+    {
+        //      pred_weight_table(); // not supported !!
+        return AVCENC_TOOLS_NOT_SUPPORTED;
+    }
+
+    /* dec_ref_pic_marking(), this will be done later*/
+    sliceHdr->no_output_of_prior_pics_flag = FALSE; /* default */
+    sliceHdr->long_term_reference_flag = FALSE; /* for IDR frame, do not make it long term */
+    sliceHdr->adaptive_ref_pic_marking_mode_flag = FALSE; /* default */
+    /* other params are not set here because they are not used */
+
+    sliceHdr->cabac_init_idc = 0; /* default, if entropy_coding_mode_flag && slice_type==I or SI, range 0..2  */
+    sliceHdr->slice_qp_delta = 0; /* default for now */
+    sliceHdr->sp_for_switch_flag = FALSE; /* default, if slice_type == SP */
+    sliceHdr->slice_qs_delta = 0; /* default, if slice_type == SP or SI */
+
+    /* derived variables from encParam */
+    /* deblocking filter */
+    video->FilterOffsetA = video->FilterOffsetB = 0;
+    if (currPPS->deblocking_filter_control_present_flag == TRUE)
+    {
+        video->FilterOffsetA = sliceHdr->slice_alpha_c0_offset_div2 << 1;
+        video->FilterOffsetB = sliceHdr->slice_beta_offset_div_2 << 1;
+    }
+
+    /* flexible macroblock ordering */
+    /* populate video->mapUnitToSliceGroupMap and video->MbToSliceGroupMap */
+    /* We already call it at the end of PVAVCEncInitialize(). It changes once per each PPS. */
+    if (video->currPicParams->num_slice_groups_minus1 > 0 && video->currPicParams->slice_group_map_type >= 3
+            && video->currPicParams->slice_group_map_type <= 5)
+    {
+        sliceHdr->slice_group_change_cycle = SLICE_GROUP_CHANGE_CYCLE;  /* default, don't understand how to set it!!!*/
+
+        video->MapUnitsInSliceGroup0 =
+            AVC_MIN(sliceHdr->slice_group_change_cycle * video->SliceGroupChangeRate, video->PicSizeInMapUnits);
+
+        FMOInit(video);
+    }
+
+    /* calculate SliceQPy first  */
+    /* calculate QSy first */
+
+    sliceHdr->slice_qp_delta = video->QPy - 26 - currPPS->pic_init_qp_minus26;
+    //sliceHdr->slice_qs_delta = video->QSy - 26 - currPPS->pic_init_qs_minus26;
+
+    return AVCENC_SUCCESS;
+}
+
diff --git a/media/libstagefright/codecs/avc/enc/src/intra_est.cpp b/media/libstagefright/codecs/avc/enc/src/intra_est.cpp
new file mode 100644
index 0000000..17e5985
--- /dev/null
+++ b/media/libstagefright/codecs/avc/enc/src/intra_est.cpp
@@ -0,0 +1,2199 @@
+/* ------------------------------------------------------------------
+ * Copyright (C) 1998-2009 PacketVideo
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
+ * express or implied.
+ * See the License for the specific language governing permissions
+ * and limitations under the License.
+ * -------------------------------------------------------------------
+ */
+#include "avcenc_lib.h"
+
+#define TH_I4  0  /* threshold biasing toward I16 mode instead of I4 mode */
+#define TH_Intra  0 /* threshold biasing toward INTER mode instead of intra mode */
+
+#define FIXED_INTRAPRED_MODE  AVC_I16
+#define FIXED_I16_MODE  AVC_I16_DC
+#define FIXED_I4_MODE   AVC_I4_Diagonal_Down_Left
+#define FIXED_INTRA_CHROMA_MODE AVC_IC_DC
+
+#define CLIP_RESULT(x)      if((uint)x > 0xFF){ \
+                 x = 0xFF & (~(x>>31));}
+
+
+bool IntraDecisionABE(AVCEncObject *encvid, int min_cost, uint8 *curL, int picPitch)
+{
+    AVCCommonObj *video = encvid->common;
+    AVCFrameIO *currInput = encvid->currInput;
+    int orgPitch = currInput->pitch;
+    int x_pos = (video->mb_x) << 4;
+    int y_pos = (video->mb_y) << 4;
+    uint8 *orgY = currInput->YCbCr[0] + y_pos * orgPitch + x_pos;
+    int j;
+    uint8 *topL, *leftL, *orgY_2, *orgY_3;
+    int temp, SBE, offset;
+    OsclFloat ABE;
+    bool intra = true;
+
+    if (((x_pos >> 4) != (int)video->PicWidthInMbs - 1) &&
+            ((y_pos >> 4) != (int)video->PicHeightInMbs - 1) &&
+            video->intraAvailA &&
+            video->intraAvailB)
+    {
+        SBE = 0;
+        /* top neighbor */
+        topL = curL - picPitch;
+        /* left neighbor */
+        leftL = curL - 1;
+        orgY_2 = orgY - orgPitch;
+
+        for (j = 0; j < 16; j++)
+        {
+            temp = *topL++ - orgY[j];
+            SBE += ((temp >= 0) ? temp : -temp);
+            temp = *(leftL += picPitch) - *(orgY_2 += orgPitch);
+            SBE += ((temp >= 0) ? temp : -temp);
+        }
+
+        /* calculate chroma */
+        offset = (y_pos >> 2) * picPitch + (x_pos >> 1);
+        topL = video->currPic->Scb + offset;
+        orgY_2 = currInput->YCbCr[1] + offset + (y_pos >> 2) * (orgPitch - picPitch);
+
+        leftL = topL - 1;
+        topL -= (picPitch >> 1);
+        orgY_3 = orgY_2 - (orgPitch >> 1);
+        for (j = 0; j < 8; j++)
+        {
+            temp = *topL++ - orgY_2[j];
+            SBE += ((temp >= 0) ? temp : -temp);
+            temp = *(leftL += (picPitch >> 1)) - *(orgY_3 += (orgPitch >> 1));
+            SBE += ((temp >= 0) ? temp : -temp);
+        }
+
+        topL = video->currPic->Scr + offset;
+        orgY_2 = currInput->YCbCr[2] + offset + (y_pos >> 2) * (orgPitch - picPitch);
+
+        leftL = topL - 1;
+        topL -= (picPitch >> 1);
+        orgY_3 = orgY_2 - (orgPitch >> 1);
+        for (j = 0; j < 8; j++)
+        {
+            temp = *topL++ - orgY_2[j];
+            SBE += ((temp >= 0) ? temp : -temp);
+            temp = *(leftL += (picPitch >> 1)) - *(orgY_3 += (orgPitch >> 1));
+            SBE += ((temp >= 0) ? temp : -temp);
+        }
+
+        /* compare mincost/384 and SBE/64 */
+        ABE = SBE / 64.0;
+        if (ABE*0.8 >= min_cost / 384.0)
+        {
+            intra = false;
+        }
+    }
+
+    return intra;
+}
+
+/* perform searching for MB mode */
+/* assuming that this is done inside the encoding loop,
+no need to call InitNeighborAvailability */
+
+void MBIntraSearch(AVCEncObject *encvid, int mbnum, uint8 *curL, int picPitch)
+{
+    AVCCommonObj *video = encvid->common;
+    AVCFrameIO *currInput = encvid->currInput;
+    AVCMacroblock *currMB = video->currMB;
+    int min_cost;
+    uint8 *orgY;
+    int x_pos = (video->mb_x) << 4;
+    int y_pos = (video->mb_y) << 4;
+    uint32 *saved_inter;
+    int j;
+    int orgPitch = currInput->pitch;
+    bool intra = true;
+
+    currMB->CBP = 0;
+
+    /* first do motion vector and variable block size search */
+    min_cost = encvid->min_cost[mbnum];
+
+    /* now perform intra prediction search */
+    /* need to add the check for encvid->intraSearch[video->mbNum] to skip intra
+       if it's not worth checking. */
+    if (video->slice_type == AVC_P_SLICE)
+    {
+        /* Decide whether intra search is necessary or not */
+        /* This one, we do it in the encoding loop so the neighboring pixel are the
+        actual reconstructed pixels. */
+        intra = IntraDecisionABE(encvid, min_cost, curL, picPitch);
+    }
+
+    if (intra == true || video->slice_type == AVC_I_SLICE)
+    {
+        orgY = currInput->YCbCr[0] + y_pos * orgPitch + x_pos;
+
+        /* i16 mode search */
+        /* generate all the predictions */
+        intrapred_luma_16x16(encvid);
+
+        /* evaluate them one by one */
+        find_cost_16x16(encvid, orgY, &min_cost);
+
+        if (video->slice_type == AVC_P_SLICE)
+        {
+            /* save current inter prediction */
+            saved_inter = encvid->subpel_pred; /* reuse existing buffer */
+            j = 16;
+            curL -= 4;
+            picPitch -= 16;
+            while (j--)
+            {
+                *saved_inter++ = *((uint32*)(curL += 4));
+                *saved_inter++ = *((uint32*)(curL += 4));
+                *saved_inter++ = *((uint32*)(curL += 4));
+                *saved_inter++ = *((uint32*)(curL += 4));
+                curL += picPitch;
+            }
+
+        }
+
+        /* i4 mode search */
+        mb_intra4x4_search(encvid, &min_cost);
+
+        encvid->min_cost[mbnum] = min_cost; /* update min_cost */
+    }
+
+
+    if (currMB->mb_intra)
+    {
+        chroma_intra_search(encvid);
+
+        /* need to set this in order for the MBInterPrediction to work!! */
+        memset(currMB->mvL0, 0, sizeof(int32)*16);
+        currMB->ref_idx_L0[0] = currMB->ref_idx_L0[1] =
+                                    currMB->ref_idx_L0[2] = currMB->ref_idx_L0[3] = -1;
+    }
+    else if (video->slice_type == AVC_P_SLICE && intra == true)
+    {
+        /* restore current inter prediction */
+        saved_inter = encvid->subpel_pred; /* reuse existing buffer */
+        j = 16;
+        curL -= ((picPitch + 16) << 4);
+        while (j--)
+        {
+            *((uint32*)(curL += 4)) = *saved_inter++;
+            *((uint32*)(curL += 4)) = *saved_inter++;
+            *((uint32*)(curL += 4)) = *saved_inter++;
+            *((uint32*)(curL += 4)) = *saved_inter++;
+            curL += picPitch;
+        }
+    }
+
+    return ;
+}
+
+/* generate all the prediction values */
+void intrapred_luma_16x16(AVCEncObject *encvid)
+{
+    AVCCommonObj *video = encvid->common;
+    AVCPictureData *currPic = video->currPic;
+
+    int x_pos = (video->mb_x) << 4;
+    int y_pos = (video->mb_y) << 4;
+    int pitch = currPic->pitch;
+
+    int offset = y_pos * pitch + x_pos;
+
+    uint8 *pred, *top, *left;
+    uint8 *curL = currPic->Sl + offset; /* point to reconstructed frame */
+    uint32 word1, word2, word3, word4;
+    uint32 sum = 0;
+
+    int a_16, b, c, factor_c;
+    uint8 *comp_ref_x0, *comp_ref_x1, *comp_ref_y0, *comp_ref_y1;
+    int H = 0, V = 0, tmp, value;
+    int i;
+
+    if (video->intraAvailB)
+    {
+        //get vertical prediction mode
+        top = curL - pitch;
+
+        pred = encvid->pred_i16[AVC_I16_Vertical] - 16;
+
+        word1 = *((uint32*)(top));  /* read 4 bytes from top */
+        word2 = *((uint32*)(top + 4)); /* read 4 bytes from top */
+        word3 = *((uint32*)(top + 8)); /* read 4 bytes from top */
+        word4 = *((uint32*)(top + 12)); /* read 4 bytes from top */
+
+        for (i = 0; i < 16; i++)
+        {
+            *((uint32*)(pred += 16)) = word1;
+            *((uint32*)(pred + 4)) = word2;
+            *((uint32*)(pred + 8)) = word3;
+            *((uint32*)(pred + 12)) = word4;
+
+        }
+
+        sum = word1 & 0xFF00FF;
+        word1 = (word1 >> 8) & 0xFF00FF;
+        sum += word1;
+        word1 = (word2 & 0xFF00FF);
+        sum += word1;
+        word2 = (word2 >> 8) & 0xFF00FF;
+        sum += word2;
+        word1 = (word3 & 0xFF00FF);
+        sum += word1;
+        word3 = (word3 >> 8) & 0xFF00FF;
+        sum += word3;
+        word1 = (word4 & 0xFF00FF);
+        sum += word1;
+        word4 = (word4 >> 8) & 0xFF00FF;
+        sum += word4;
+
+        sum += (sum >> 16);
+        sum &= 0xFFFF;
+
+        if (!video->intraAvailA)
+        {
+            sum = (sum + 8) >> 4;
+        }
+    }
+
+    if (video->intraAvailA)
+    {
+        // get horizontal mode
+        left = curL - 1 - pitch;
+
+        pred = encvid->pred_i16[AVC_I16_Horizontal] - 16;
+
+        for (i = 0; i < 16; i++)
+        {
+            word1 = *(left += pitch);
+            sum += word1;
+
+            word1 = (word1 << 8) | word1;
+            word1 = (word1 << 16) | word1; /* make it 4 */
+
+            *(uint32*)(pred += 16) = word1;
+            *(uint32*)(pred + 4) = word1;
+            *(uint32*)(pred + 8) = word1;
+            *(uint32*)(pred + 12) = word1;
+        }
+
+        if (!video->intraAvailB)
+        {
+            sum = (sum + 8) >> 4;
+        }
+        else
+        {
+            sum = (sum + 16) >> 5;
+        }
+    }
+
+    // get DC mode
+    if (!video->intraAvailA && !video->intraAvailB)
+    {
+        sum = 0x80808080;
+    }
+    else
+    {
+        sum = (sum << 8) | sum;
+        sum = (sum << 16) | sum;
+    }
+
+    pred = encvid->pred_i16[AVC_I16_DC] - 16;
+    for (i = 0; i < 16; i++)
+    {
+        *((uint32*)(pred += 16)) = sum;
+        *((uint32*)(pred + 4)) = sum;
+        *((uint32*)(pred + 8)) = sum;
+        *((uint32*)(pred + 12)) = sum;
+    }
+
+    // get plane mode
+    if (video->intraAvailA && video->intraAvailB && video->intraAvailD)
+    {
+        pred = encvid->pred_i16[AVC_I16_Plane] - 16;
+
+        comp_ref_x0 = curL - pitch + 8;
+        comp_ref_x1 = curL - pitch + 6;
+        comp_ref_y0 = curL - 1 + (pitch << 3);
+        comp_ref_y1 = curL - 1 + 6 * pitch;
+
+        for (i = 1; i < 8; i++)
+        {
+            H += i * (*comp_ref_x0++ - *comp_ref_x1--);
+            V += i * (*comp_ref_y0 - *comp_ref_y1);
+            comp_ref_y0 += pitch;
+            comp_ref_y1 -= pitch;
+        }
+
+        H += i * (*comp_ref_x0++ - curL[-pitch-1]);
+        V += i * (*comp_ref_y0 - *comp_ref_y1);
+
+
+        a_16 = ((*(curL - pitch + 15) + *(curL - 1 + 15 * pitch)) << 4) + 16;;
+        b = (5 * H + 32) >> 6;
+        c = (5 * V + 32) >> 6;
+
+        tmp = 0;
+        for (i = 0; i < 16; i++)
+        {
+            factor_c = a_16 + c * (tmp++ - 7);
+            factor_c -= 7 * b;
+
+            value = factor_c >> 5;
+            factor_c += b;
+            CLIP_RESULT(value)
+            word1 = value;
+            value = factor_c >> 5;
+            factor_c += b;
+            CLIP_RESULT(value)
+            word1 = (word1) | (value << 8);
+            value = factor_c >> 5;
+            factor_c += b;
+            CLIP_RESULT(value)
+            word1 = (word1) | (value << 16);
+            value = factor_c >> 5;
+            factor_c += b;
+            CLIP_RESULT(value)
+            word1 = (word1) | (value << 24);
+            *((uint32*)(pred += 16)) = word1;
+            value = factor_c >> 5;
+            factor_c += b;
+            CLIP_RESULT(value)
+            word1 = value;
+            value = factor_c >> 5;
+            factor_c += b;
+            CLIP_RESULT(value)
+            word1 = (word1) | (value << 8);
+            value = factor_c >> 5;
+            factor_c += b;
+            CLIP_RESULT(value)
+            word1 = (word1) | (value << 16);
+            value = factor_c >> 5;
+            factor_c += b;
+            CLIP_RESULT(value)
+            word1 = (word1) | (value << 24);
+            *((uint32*)(pred + 4)) = word1;
+            value = factor_c >> 5;
+            factor_c += b;
+            CLIP_RESULT(value)
+            word1 = value;
+            value = factor_c >> 5;
+            factor_c += b;
+            CLIP_RESULT(value)
+            word1 = (word1) | (value << 8);
+            value = factor_c >> 5;
+            factor_c += b;
+            CLIP_RESULT(value)
+            word1 = (word1) | (value << 16);
+            value = factor_c >> 5;
+            factor_c += b;
+            CLIP_RESULT(value)
+            word1 = (word1) | (value << 24);
+            *((uint32*)(pred + 8)) = word1;
+            value = factor_c >> 5;
+            factor_c += b;
+            CLIP_RESULT(value)
+            word1 = value;
+            value = factor_c >> 5;
+            factor_c += b;
+            CLIP_RESULT(value)
+            word1 = (word1) | (value << 8);
+            value = factor_c >> 5;
+            factor_c += b;
+            CLIP_RESULT(value)
+            word1 = (word1) | (value << 16);
+            value = factor_c >> 5;
+            CLIP_RESULT(value)
+            word1 = (word1) | (value << 24);
+            *((uint32*)(pred + 12)) = word1;
+        }
+    }
+
+    return ;
+}
+
+
+/* evaluate each prediction mode of I16 */
+void find_cost_16x16(AVCEncObject *encvid, uint8 *orgY, int *min_cost)
+{
+    AVCCommonObj *video = encvid->common;
+    AVCMacroblock *currMB = video->currMB;
+    int cost;
+    int org_pitch = encvid->currInput->pitch;
+
+    /* evaluate vertical mode */
+    if (video->intraAvailB)
+    {
+        cost = cost_i16(orgY, org_pitch, encvid->pred_i16[AVC_I16_Vertical], *min_cost);
+        if (cost < *min_cost)
+        {
+            *min_cost = cost;
+            currMB->mbMode = AVC_I16;
+            currMB->mb_intra = 1;
+            currMB->i16Mode = AVC_I16_Vertical;
+        }
+    }
+
+
+    /* evaluate horizontal mode */
+    if (video->intraAvailA)
+    {
+        cost = cost_i16(orgY, org_pitch, encvid->pred_i16[AVC_I16_Horizontal], *min_cost);
+        if (cost < *min_cost)
+        {
+            *min_cost = cost;
+            currMB->mbMode = AVC_I16;
+            currMB->mb_intra = 1;
+            currMB->i16Mode = AVC_I16_Horizontal;
+        }
+    }
+
+    /* evaluate DC mode */
+    cost = cost_i16(orgY, org_pitch, encvid->pred_i16[AVC_I16_DC], *min_cost);
+    if (cost < *min_cost)
+    {
+        *min_cost = cost;
+        currMB->mbMode = AVC_I16;
+        currMB->mb_intra = 1;
+        currMB->i16Mode = AVC_I16_DC;
+    }
+
+    /* evaluate plane mode */
+    if (video->intraAvailA && video->intraAvailB && video->intraAvailD)
+    {
+        cost = cost_i16(orgY, org_pitch, encvid->pred_i16[AVC_I16_Plane], *min_cost);
+        if (cost < *min_cost)
+        {
+            *min_cost = cost;
+            currMB->mbMode = AVC_I16;
+            currMB->mb_intra = 1;
+            currMB->i16Mode = AVC_I16_Plane;
+        }
+    }
+
+    return ;
+}
+
+
+int cost_i16(uint8 *org, int org_pitch, uint8 *pred, int min_cost)
+{
+
+    int cost;
+    int j, k;
+    int16 res[256], *pres; // residue
+    int m0, m1, m2, m3;
+
+    // calculate SATD
+    org_pitch -= 16;
+    pres = res;
+    // horizontal transform
+    for (j = 0; j < 16; j++)
+    {
+        k = 4;
+        while (k > 0)
+        {
+            m0 = org[0] - pred[0];
+            m3 = org[3] - pred[3];
+            m0 += m3;
+            m3 = m0 - (m3 << 1);
+            m1 = org[1] - pred[1];
+            m2 = org[2] - pred[2];
+            m1 += m2;
+            m2 = m1 - (m2 << 1);
+            pres[0] = m0 + m1;
+            pres[2] = m0 - m1;
+            pres[1] = m2 + m3;
+            pres[3] = m3 - m2;
+
+            org += 4;
+            pres += 4;
+            pred += 4;
+            k--;
+        }
+        org += org_pitch;
+    }
+    /* vertical transform */
+    cost = 0;
+    for (j = 0; j < 4; j++)
+    {
+        pres = res + (j << 6);
+        k = 16;
+        while (k > 0)
+        {
+            m0 = pres[0];
+            m3 = pres[3<<4];
+            m0 += m3;
+            m3 = m0 - (m3 << 1);
+            m1 = pres[1<<4];
+            m2 = pres[2<<4];
+            m1 += m2;
+            m2 = m1 - (m2 << 1);
+            pres[0] = m0 = m0 + m1;
+
+            if (k&0x3)  // only sum up non DC values.
+            {
+                cost += ((m0 > 0) ? m0 : -m0);
+            }
+
+            m1 = m0 - (m1 << 1);
+            cost += ((m1 > 0) ? m1 : -m1);
+            m3 = m2 + m3;
+            cost += ((m3 > 0) ? m3 : -m3);
+            m2 = m3 - (m2 << 1);
+            cost += ((m2 > 0) ? m2 : -m2);
+
+            pres++;
+            k--;
+        }
+        if ((cost >> 1) > min_cost) /* early drop out */
+        {
+            return (cost >> 1);
+        }
+    }
+
+    /* Hadamard of the DC coefficient */
+    pres = res;
+    k = 4;
+    while (k > 0)
+    {
+        m0 = pres[0];
+        m3 = pres[3<<2];
+        m0 >>= 2;
+        m0 += (m3 >> 2);
+        m3 = m0 - (m3 >> 1);
+        m1 = pres[1<<2];
+        m2 = pres[2<<2];
+        m1 >>= 2;
+        m1 += (m2 >> 2);
+        m2 = m1 - (m2 >> 1);
+        pres[0] = (m0 + m1);
+        pres[2<<2] = (m0 - m1);
+        pres[1<<2] = (m2 + m3);
+        pres[3<<2] = (m3 - m2);
+        pres += (4 << 4);
+        k--;
+    }
+
+    pres = res;
+    k = 4;
+    while (k > 0)
+    {
+        m0 = pres[0];
+        m3 = pres[3<<6];
+        m0 += m3;
+        m3 = m0 - (m3 << 1);
+        m1 = pres[1<<6];
+        m2 = pres[2<<6];
+        m1 += m2;
+        m2 = m1 - (m2 << 1);
+        m0 = m0 + m1;
+        cost += ((m0 >= 0) ? m0 : -m0);
+        m1 = m0 - (m1 << 1);
+        cost += ((m1 >= 0) ? m1 : -m1);
+        m3 = m2 + m3;
+        cost += ((m3 >= 0) ? m3 : -m3);
+        m2 = m3 - (m2 << 1);
+        cost += ((m2 >= 0) ? m2 : -m2);
+        pres += 4;
+
+        if ((cost >> 1) > min_cost) /* early drop out */
+        {
+            return (cost >> 1);
+        }
+
+        k--;
+    }
+
+    return (cost >> 1);
+}
+
+
+void mb_intra4x4_search(AVCEncObject *encvid, int *min_cost)
+{
+    AVCCommonObj *video = encvid->common;
+    AVCMacroblock *currMB = video->currMB;
+    AVCPictureData *currPic = video->currPic;
+    AVCFrameIO *currInput = encvid->currInput;
+    int pitch = currPic->pitch;
+    int org_pitch = currInput->pitch;
+    int offset;
+    uint8 *curL, *comp, *org4, *org8;
+    int y = video->mb_y << 4;
+    int x = video->mb_x << 4;
+
+    int b8, b4, cost4x4, blkidx;
+    int cost = 0;
+    int numcoef;
+    int dummy = 0;
+    int mb_intra = currMB->mb_intra; // save the original value
+
+    offset = y * pitch + x;
+
+    curL = currPic->Sl + offset;
+    org8 = currInput->YCbCr[0] + y * org_pitch + x;
+    video->pred_pitch = 4;
+
+    cost = (int)(6.0 * encvid->lambda_mode + 0.4999);
+    cost <<= 2;
+
+    currMB->mb_intra = 1;  // temporary set this to one to enable the IDCT
+    // operation inside dct_luma
+
+    for (b8 = 0; b8 < 4; b8++)
+    {
+        comp = curL;
+        org4 = org8;
+
+        for (b4 = 0; b4 < 4; b4++)
+        {
+            blkidx = blkIdx2blkXY[b8][b4];
+            cost4x4 = blk_intra4x4_search(encvid, blkidx, comp, org4);
+            cost += cost4x4;
+            if (cost > *min_cost)
+            {
+                currMB->mb_intra = mb_intra; // restore the value
+                return ;
+            }
+
+            /* do residue, Xfrm, Q, invQ, invXfrm, recon and save the DCT coefs.*/
+            video->pred_block = encvid->pred_i4[currMB->i4Mode[blkidx]];
+            numcoef = dct_luma(encvid, blkidx, comp, org4, &dummy);
+            currMB->nz_coeff[blkidx] = numcoef;
+            if (numcoef)
+            {
+                video->cbp4x4 |= (1 << blkidx);
+                currMB->CBP |= (1 << b8);
+            }
+
+            if (b4&1)
+            {
+                comp += ((pitch << 2) - 4);
+                org4 += ((org_pitch << 2) - 4);
+            }
+            else
+            {
+                comp += 4;
+                org4 += 4;
+            }
+        }
+
+        if (b8&1)
+        {
+            curL += ((pitch << 3) - 8);
+            org8 += ((org_pitch << 3) - 8);
+        }
+        else
+        {
+            curL += 8;
+            org8 += 8;
+        }
+    }
+
+    currMB->mb_intra = mb_intra; // restore the value
+
+    if (cost < *min_cost)
+    {
+        *min_cost = cost;
+        currMB->mbMode = AVC_I4;
+        currMB->mb_intra = 1;
+    }
+
+    return ;
+}
+
+
+/* search for i4 mode for a 4x4 block */
+int blk_intra4x4_search(AVCEncObject *encvid, int blkidx, uint8 *cur, uint8 *org)
+{
+    AVCCommonObj *video = encvid->common;
+    AVCNeighborAvailability availability;
+    AVCMacroblock *currMB = video->currMB;
+    bool top_left = FALSE;
+    int pitch = video->currPic->pitch;
+    uint8 mode_avail[AVCNumI4PredMode];
+    uint32 temp, DC;
+    uint8 *pred;
+    int org_pitch = encvid->currInput->pitch;
+    uint16 min_cost, cost;
+
+    int P_x, Q_x, R_x, P_y, Q_y, R_y, D, D0, D1;
+    int P0, Q0, R0, S0, P1, Q1, R1, P2, Q2;
+    uint8 P_A, P_B, P_C, P_D, P_E, P_F, P_G, P_H, P_I, P_J, P_K, P_L, P_X;
+    int r0, r1, r2, r3, r4, r5, r6, r7;
+    int x0, x1, x2, x3, x4, x5;
+    uint32 temp1, temp2;
+
+    int ipmode, mostProbableMode;
+    int fixedcost = 4 * encvid->lambda_mode;
+    int min_sad = 0x7FFF;
+
+    availability.left = TRUE;
+    availability.top = TRUE;
+    if (blkidx <= 3) /* top row block  (!block_y) */
+    { /* check availability up */
+        availability.top = video->intraAvailB ;
+    }
+    if (!(blkidx&0x3)) /* left column block (!block_x)*/
+    { /* check availability left */
+        availability.left = video->intraAvailA ;
+    }
+    availability.top_right = BlkTopRight[blkidx];
+
+    if (availability.top_right == 2)
+    {
+        availability.top_right = video->intraAvailB;
+    }
+    else if (availability.top_right == 3)
+    {
+        availability.top_right = video->intraAvailC;
+    }
+
+    if (availability.top == TRUE)
+    {
+        temp = *(uint32*)(cur - pitch);
+        P_A = temp & 0xFF;
+        P_B = (temp >> 8) & 0xFF;
+        P_C = (temp >> 16) & 0xFF;
+        P_D = (temp >> 24) & 0xFF;
+    }
+    else
+    {
+        P_A = P_B = P_C = P_D = 128;
+    }
+
+    if (availability.top_right == TRUE)
+    {
+        temp = *(uint32*)(cur - pitch + 4);
+        P_E = temp & 0xFF;
+        P_F = (temp >> 8) & 0xFF;
+        P_G = (temp >> 16) & 0xFF;
+        P_H = (temp >> 24) & 0xFF;
+    }
+    else
+    {
+        P_E = P_F = P_G = P_H = 128;
+    }
+
+    if (availability.left == TRUE)
+    {
+        cur--;
+        P_I = *cur;
+        P_J = *(cur += pitch);
+        P_K = *(cur += pitch);
+        P_L = *(cur + pitch);
+        cur -= (pitch << 1);
+        cur++;
+    }
+    else
+    {
+        P_I = P_J = P_K = P_L = 128;
+    }
+
+    /* check if top-left pixel is available */
+    if (((blkidx > 3) && (blkidx&0x3)) || ((blkidx > 3) && video->intraAvailA)
+            || ((blkidx&0x3) && video->intraAvailB)
+            || (video->intraAvailA && video->intraAvailD && video->intraAvailB))
+    {
+        top_left = TRUE;
+        P_X = *(cur - pitch - 1);
+    }
+    else
+    {
+        P_X = 128;
+    }
+
+    //===== INTRA PREDICTION FOR 4x4 BLOCK =====
+    /* vertical */
+    mode_avail[AVC_I4_Vertical] = 0;
+    if (availability.top)
+    {
+        mode_avail[AVC_I4_Vertical] = 1;
+        pred = encvid->pred_i4[AVC_I4_Vertical];
+
+        temp = (P_D << 24) | (P_C << 16) | (P_B << 8) | P_A ;
+        *((uint32*)pred) =  temp; /* write 4 at a time */
+        *((uint32*)(pred += 4)) =  temp;
+        *((uint32*)(pred += 4)) =  temp;
+        *((uint32*)(pred += 4)) =  temp;
+    }
+    /* horizontal */
+    mode_avail[AVC_I4_Horizontal] = 0;
+    mode_avail[AVC_I4_Horizontal_Up] = 0;
+    if (availability.left)
+    {
+        mode_avail[AVC_I4_Horizontal] = 1;
+        pred = encvid->pred_i4[AVC_I4_Horizontal];
+
+        temp = P_I | (P_I << 8);
+        temp = temp | (temp << 16);
+        *((uint32*)pred) = temp;
+        temp = P_J | (P_J << 8);
+        temp = temp | (temp << 16);
+        *((uint32*)(pred += 4)) = temp;
+        temp = P_K | (P_K << 8);
+        temp = temp | (temp << 16);
+        *((uint32*)(pred += 4)) = temp;
+        temp = P_L | (P_L << 8);
+        temp = temp | (temp << 16);
+        *((uint32*)(pred += 4)) = temp;
+
+        mode_avail[AVC_I4_Horizontal_Up] = 1;
+        pred = encvid->pred_i4[AVC_I4_Horizontal_Up];
+
+        Q0 = (P_J + P_K + 1) >> 1;
+        Q1 = (P_J + (P_K << 1) + P_L + 2) >> 2;
+        P0 = ((P_I + P_J + 1) >> 1);
+        P1 = ((P_I + (P_J << 1) + P_K + 2) >> 2);
+
+        temp = P0 | (P1 << 8);      // [P0 P1 Q0 Q1]
+        temp |= (Q0 << 16);     // [Q0 Q1 R0 DO]
+        temp |= (Q1 << 24);     // [R0 D0 D1 D1]
+        *((uint32*)pred) = temp;      // [D1 D1 D1 D1]
+
+        D0 = (P_K + 3 * P_L + 2) >> 2;
+        R0 = (P_K + P_L + 1) >> 1;
+
+        temp = Q0 | (Q1 << 8);
+        temp |= (R0 << 16);
+        temp |= (D0 << 24);
+        *((uint32*)(pred += 4)) = temp;
+
+        D1 = P_L;
+
+        temp = R0 | (D0 << 8);
+        temp |= (D1 << 16);
+        temp |= (D1 << 24);
+        *((uint32*)(pred += 4)) = temp;
+
+        temp = D1 | (D1 << 8);
+        temp |= (temp << 16);
+        *((uint32*)(pred += 4)) = temp;
+    }
+    /* DC */
+    mode_avail[AVC_I4_DC] = 1;
+    pred = encvid->pred_i4[AVC_I4_DC];
+    if (availability.left)
+    {
+        DC = P_I + P_J + P_K + P_L;
+
+        if (availability.top)
+        {
+            DC = (P_A + P_B + P_C + P_D + DC + 4) >> 3;
+        }
+        else
+        {
+            DC = (DC + 2) >> 2;
+
+        }
+    }
+    else if (availability.top)
+    {
+        DC = (P_A + P_B + P_C + P_D + 2) >> 2;
+
+    }
+    else
+    {
+        DC = 128;
+    }
+
+    temp = DC | (DC << 8);
+    temp = temp | (temp << 16);
+    *((uint32*)pred) = temp;
+    *((uint32*)(pred += 4)) = temp;
+    *((uint32*)(pred += 4)) = temp;
+    *((uint32*)(pred += 4)) = temp;
+
+    /* Down-left */
+    mode_avail[AVC_I4_Diagonal_Down_Left] = 0;
+
+    if (availability.top)
+    {
+        mode_avail[AVC_I4_Diagonal_Down_Left] = 1;
+
+        pred = encvid->pred_i4[AVC_I4_Diagonal_Down_Left];
+
+        r0 = P_A;
+        r1 = P_B;
+        r2 = P_C;
+        r3 = P_D;
+
+        r0 += (r1 << 1);
+        r0 += r2;
+        r0 += 2;
+        r0 >>= 2;
+        r1 += (r2 << 1);
+        r1 += r3;
+        r1 += 2;
+        r1 >>= 2;
+
+        if (availability.top_right)
+        {
+            r4 = P_E;
+            r5 = P_F;
+            r6 = P_G;
+            r7 = P_H;
+
+            r2 += (r3 << 1);
+            r2 += r4;
+            r2 += 2;
+            r2 >>= 2;
+            r3 += (r4 << 1);
+            r3 += r5;
+            r3 += 2;
+            r3 >>= 2;
+            r4 += (r5 << 1);
+            r4 += r6;
+            r4 += 2;
+            r4 >>= 2;
+            r5 += (r6 << 1);
+            r5 += r7;
+            r5 += 2;
+            r5 >>= 2;
+            r6 += (3 * r7);
+            r6 += 2;
+            r6 >>= 2;
+            temp = r0 | (r1 << 8);
+            temp |= (r2 << 16);
+            temp |= (r3 << 24);
+            *((uint32*)pred) = temp;
+
+            temp = (temp >> 8) | (r4 << 24);
+            *((uint32*)(pred += 4)) = temp;
+
+            temp = (temp >> 8) | (r5 << 24);
+            *((uint32*)(pred += 4)) = temp;
+
+            temp = (temp >> 8) | (r6 << 24);
+            *((uint32*)(pred += 4)) = temp;
+        }
+        else
+        {
+            r2 += (r3 * 3);
+            r2 += 2;
+            r2 >>= 2;
+            r3 = ((r3 << 2) + 2);
+            r3 >>= 2;
+
+            temp = r0 | (r1 << 8);
+            temp |= (r2 << 16);
+            temp |= (r3 << 24);
+            *((uint32*)pred) = temp;
+
+            temp = (temp >> 8) | (r3 << 24);
+            *((uint32*)(pred += 4)) = temp;
+
+            temp = (temp >> 8) | (r3 << 24);
+            *((uint32*)(pred += 4)) = temp;
+
+            temp = (temp >> 8) | (r3 << 24);
+            *((uint32*)(pred += 4)) = temp;
+
+        }
+    }
+
+    /* Down Right */
+    mode_avail[AVC_I4_Diagonal_Down_Right] = 0;
+    /* Diagonal Vertical Right */
+    mode_avail[AVC_I4_Vertical_Right] = 0;
+    /* Horizontal Down */
+    mode_avail[AVC_I4_Horizontal_Down] = 0;
+
+    if (top_left == TRUE)
+    {
+        /* Down Right */
+        mode_avail[AVC_I4_Diagonal_Down_Right] = 1;
+        pred = encvid->pred_i4[AVC_I4_Diagonal_Down_Right];
+
+        Q_x = (P_A + 2 * P_B + P_C + 2) >> 2;
+        R_x = (P_B + 2 * P_C + P_D + 2) >> 2;
+        P_x = (P_X + 2 * P_A + P_B + 2) >> 2;
+        D   = (P_A + 2 * P_X + P_I + 2) >> 2;
+        P_y = (P_X + 2 * P_I + P_J + 2) >> 2;
+        Q_y = (P_I + 2 * P_J + P_K + 2) >> 2;
+        R_y = (P_J + 2 * P_K + P_L + 2) >> 2;
+
+        /* we can pack these */
+        temp =  D | (P_x << 8);   //[D   P_x Q_x R_x]
+        //[P_y D   P_x Q_x]
+        temp |= (Q_x << 16); //[Q_y P_y D   P_x]
+        temp |= (R_x << 24);  //[R_y Q_y P_y D  ]
+        *((uint32*)pred) = temp;
+
+        temp =  P_y | (D << 8);
+        temp |= (P_x << 16);
+        temp |= (Q_x << 24);
+        *((uint32*)(pred += 4)) = temp;
+
+        temp =  Q_y | (P_y << 8);
+        temp |= (D << 16);
+        temp |= (P_x << 24);
+        *((uint32*)(pred += 4)) = temp;
+
+        temp = R_y | (Q_y << 8);
+        temp |= (P_y << 16);
+        temp |= (D << 24);
+        *((uint32*)(pred += 4)) = temp;
+
+
+        /* Diagonal Vertical Right */
+        mode_avail[AVC_I4_Vertical_Right] = 1;
+        pred = encvid->pred_i4[AVC_I4_Vertical_Right];
+
+        Q0 = P_A + P_B + 1;
+        R0 = P_B + P_C + 1;
+        S0 = P_C + P_D + 1;
+        P0 = P_X + P_A + 1;
+        D = (P_I + 2 * P_X + P_A + 2) >> 2;
+
+        P1 = (P0 + Q0) >> 2;
+        Q1 = (Q0 + R0) >> 2;
+        R1 = (R0 + S0) >> 2;
+
+        P0 >>= 1;
+        Q0 >>= 1;
+        R0 >>= 1;
+        S0 >>= 1;
+
+        P2 = (P_X + 2 * P_I + P_J + 2) >> 2;
+        Q2 = (P_I + 2 * P_J + P_K + 2) >> 2;
+
+        temp =  P0 | (Q0 << 8);  //[P0 Q0 R0 S0]
+        //[D  P1 Q1 R1]
+        temp |= (R0 << 16); //[P2 P0 Q0 R0]
+        temp |= (S0 << 24); //[Q2 D  P1 Q1]
+        *((uint32*)pred) =  temp;
+
+        temp =  D | (P1 << 8);
+        temp |= (Q1 << 16);
+        temp |= (R1 << 24);
+        *((uint32*)(pred += 4)) =  temp;
+
+        temp = P2 | (P0 << 8);
+        temp |= (Q0 << 16);
+        temp |= (R0 << 24);
+        *((uint32*)(pred += 4)) =  temp;
+
+        temp = Q2 | (D << 8);
+        temp |= (P1 << 16);
+        temp |= (Q1 << 24);
+        *((uint32*)(pred += 4)) =  temp;
+
+
+        /* Horizontal Down */
+        mode_avail[AVC_I4_Horizontal_Down] = 1;
+        pred = encvid->pred_i4[AVC_I4_Horizontal_Down];
+
+
+        Q2 = (P_A + 2 * P_B + P_C + 2) >> 2;
+        P2 = (P_X + 2 * P_A + P_B + 2) >> 2;
+        D = (P_I + 2 * P_X + P_A + 2) >> 2;
+        P0 = P_X + P_I + 1;
+        Q0 = P_I + P_J + 1;
+        R0 = P_J + P_K + 1;
+        S0 = P_K + P_L + 1;
+
+        P1 = (P0 + Q0) >> 2;
+        Q1 = (Q0 + R0) >> 2;
+        R1 = (R0 + S0) >> 2;
+
+        P0 >>= 1;
+        Q0 >>= 1;
+        R0 >>= 1;
+        S0 >>= 1;
+
+
+        /* we can pack these */
+        temp = P0 | (D << 8);   //[P0 D  P2 Q2]
+        //[Q0 P1 P0 D ]
+        temp |= (P2 << 16);  //[R0 Q1 Q0 P1]
+        temp |= (Q2 << 24); //[S0 R1 R0 Q1]
+        *((uint32*)pred) = temp;
+
+        temp = Q0 | (P1 << 8);
+        temp |= (P0 << 16);
+        temp |= (D << 24);
+        *((uint32*)(pred += 4)) = temp;
+
+        temp = R0 | (Q1 << 8);
+        temp |= (Q0 << 16);
+        temp |= (P1 << 24);
+        *((uint32*)(pred += 4)) = temp;
+
+        temp = S0 | (R1 << 8);
+        temp |= (R0 << 16);
+        temp |= (Q1 << 24);
+        *((uint32*)(pred += 4)) = temp;
+
+    }
+
+    /* vertical left */
+    mode_avail[AVC_I4_Vertical_Left] = 0;
+    if (availability.top)
+    {
+        mode_avail[AVC_I4_Vertical_Left] = 1;
+        pred = encvid->pred_i4[AVC_I4_Vertical_Left];
+
+        x0 = P_A + P_B + 1;
+        x1 = P_B + P_C + 1;
+        x2 = P_C + P_D + 1;
+        if (availability.top_right)
+        {
+            x3 = P_D + P_E + 1;
+            x4 = P_E + P_F + 1;
+            x5 = P_F + P_G + 1;
+        }
+        else
+        {
+            x3 = x4 = x5 = (P_D << 1) + 1;
+        }
+
+        temp1 = (x0 >> 1);
+        temp1 |= ((x1 >> 1) << 8);
+        temp1 |= ((x2 >> 1) << 16);
+        temp1 |= ((x3 >> 1) << 24);
+
+        *((uint32*)pred) = temp1;
+
+        temp2 = ((x0 + x1) >> 2);
+        temp2 |= (((x1 + x2) >> 2) << 8);
+        temp2 |= (((x2 + x3) >> 2) << 16);
+        temp2 |= (((x3 + x4) >> 2) << 24);
+
+        *((uint32*)(pred += 4)) = temp2;
+
+        temp1 = (temp1 >> 8) | ((x4 >> 1) << 24);   /* rotate out old value */
+        *((uint32*)(pred += 4)) = temp1;
+
+        temp2 = (temp2 >> 8) | (((x4 + x5) >> 2) << 24); /* rotate out old value */
+        *((uint32*)(pred += 4)) = temp2;
+    }
+
+    //===== LOOP OVER ALL 4x4 INTRA PREDICTION MODES =====
+    // can re-order the search here instead of going in order
+
+    // find most probable mode
+    encvid->mostProbableI4Mode[blkidx] = mostProbableMode = FindMostProbableI4Mode(video, blkidx);
+
+    min_cost = 0xFFFF;
+
+    for (ipmode = 0; ipmode < AVCNumI4PredMode; ipmode++)
+    {
+        if (mode_avail[ipmode] == TRUE)
+        {
+            cost  = (ipmode == mostProbableMode) ? 0 : fixedcost;
+            pred = encvid->pred_i4[ipmode];
+
+            cost_i4(org, org_pitch, pred, &cost);
+
+            if (cost < min_cost)
+            {
+                currMB->i4Mode[blkidx] = (AVCIntra4x4PredMode)ipmode;
+                min_cost   = cost;
+                min_sad = cost - ((ipmode == mostProbableMode) ? 0 : fixedcost);
+            }
+        }
+    }
+
+    if (blkidx == 0)
+    {
+        encvid->i4_sad = min_sad;
+    }
+    else
+    {
+        encvid->i4_sad += min_sad;
+    }
+
+    return min_cost;
+}
+
+int FindMostProbableI4Mode(AVCCommonObj *video, int blkidx)
+{
+    int dcOnlyPredictionFlag;
+    AVCMacroblock *currMB = video->currMB;
+    int intra4x4PredModeA, intra4x4PredModeB, predIntra4x4PredMode;
+
+
+    dcOnlyPredictionFlag = 0;
+    if (blkidx&0x3)
+    {
+        intra4x4PredModeA = currMB->i4Mode[blkidx-1]; // block to the left
+    }
+    else /* for blk 0, 4, 8, 12 */
+    {
+        if (video->intraAvailA)
+        {
+            if (video->mblock[video->mbAddrA].mbMode == AVC_I4)
+            {
+                intra4x4PredModeA = video->mblock[video->mbAddrA].i4Mode[blkidx + 3];
+            }
+            else
+            {
+                intra4x4PredModeA = AVC_I4_DC;
+            }
+        }
+        else
+        {
+            dcOnlyPredictionFlag = 1;
+            goto PRED_RESULT_READY;  // skip below
+        }
+    }
+
+    if (blkidx >> 2)
+    {
+        intra4x4PredModeB = currMB->i4Mode[blkidx-4]; // block above
+    }
+    else /* block 0, 1, 2, 3 */
+    {
+        if (video->intraAvailB)
+        {
+            if (video->mblock[video->mbAddrB].mbMode == AVC_I4)
+            {
+                intra4x4PredModeB = video->mblock[video->mbAddrB].i4Mode[blkidx+12];
+            }
+            else
+            {
+                intra4x4PredModeB = AVC_I4_DC;
+            }
+        }
+        else
+        {
+            dcOnlyPredictionFlag = 1;
+        }
+    }
+
+PRED_RESULT_READY:
+    if (dcOnlyPredictionFlag)
+    {
+        intra4x4PredModeA = intra4x4PredModeB = AVC_I4_DC;
+    }
+
+    predIntra4x4PredMode = AVC_MIN(intra4x4PredModeA, intra4x4PredModeB);
+
+    return predIntra4x4PredMode;
+}
+
+void cost_i4(uint8 *org, int org_pitch, uint8 *pred, uint16 *cost)
+{
+    int k;
+    int16 res[16], *pres;
+    int m0, m1, m2, m3, tmp1;
+    int satd = 0;
+
+    pres = res;
+    // horizontal transform
+    k = 4;
+    while (k > 0)
+    {
+        m0 = org[0] - pred[0];
+        m3 = org[3] - pred[3];
+        m0 += m3;
+        m3 = m0 - (m3 << 1);
+        m1 = org[1] - pred[1];
+        m2 = org[2] - pred[2];
+        m1 += m2;
+        m2 = m1 - (m2 << 1);
+        pres[0] = m0 + m1;
+        pres[2] = m0 - m1;
+        pres[1] = m2 + m3;
+        pres[3] = m3 - m2;
+
+        org += org_pitch;
+        pres += 4;
+        pred += 4;
+        k--;
+    }
+    /* vertical transform */
+    pres = res;
+    k = 4;
+    while (k > 0)
+    {
+        m0 = pres[0];
+        m3 = pres[12];
+        m0 += m3;
+        m3 = m0 - (m3 << 1);
+        m1 = pres[4];
+        m2 = pres[8];
+        m1 += m2;
+        m2 = m1 - (m2 << 1);
+        pres[0] = m0 + m1;
+        pres[8] = m0 - m1;
+        pres[4] = m2 + m3;
+        pres[12] = m3 - m2;
+
+        pres++;
+        k--;
+
+    }
+
+    pres = res;
+    k = 4;
+    while (k > 0)
+    {
+        tmp1 = *pres++;
+        satd += ((tmp1 >= 0) ? tmp1 : -tmp1);
+        tmp1 = *pres++;
+        satd += ((tmp1 >= 0) ? tmp1 : -tmp1);
+        tmp1 = *pres++;
+        satd += ((tmp1 >= 0) ? tmp1 : -tmp1);
+        tmp1 = *pres++;
+        satd += ((tmp1 >= 0) ? tmp1 : -tmp1);
+        k--;
+    }
+
+    satd = (satd + 1) >> 1;
+    *cost += satd;
+
+    return ;
+}
+
+void chroma_intra_search(AVCEncObject *encvid)
+{
+    AVCCommonObj *video = encvid->common;
+    AVCPictureData *currPic = video->currPic;
+
+    int x_pos = video->mb_x << 3;
+    int y_pos = video->mb_y << 3;
+    int pitch = currPic->pitch >> 1;
+    int offset = y_pos * pitch + x_pos;
+
+    uint8 *comp_ref_x, *comp_ref_y, *pred;
+    int  sum_x0, sum_x1, sum_y0, sum_y1;
+    int pred_0[2], pred_1[2], pred_2[2], pred_3[2];
+    uint32 pred_a, pred_b, pred_c, pred_d;
+    int i, j, component;
+    int a_16, b, c, factor_c, topleft;
+    int H, V, value;
+    uint8 *comp_ref_x0, *comp_ref_x1,  *comp_ref_y0, *comp_ref_y1;
+
+    uint8 *curCb = currPic->Scb + offset;
+    uint8 *curCr = currPic->Scr + offset;
+
+    uint8 *orgCb, *orgCr;
+    AVCFrameIO *currInput = encvid->currInput;
+    AVCMacroblock *currMB = video->currMB;
+    int org_pitch;
+    int cost, mincost;
+
+    /* evaluate DC mode */
+    if (video->intraAvailB & video->intraAvailA)
+    {
+        comp_ref_x = curCb - pitch;
+        comp_ref_y = curCb - 1;
+
+        for (i = 0; i < 2; i++)
+        {
+            pred_a = *((uint32*)comp_ref_x);
+            comp_ref_x += 4;
+            pred_b = (pred_a >> 8) & 0xFF00FF;
+            pred_a &= 0xFF00FF;
+            pred_a += pred_b;
+            pred_a += (pred_a >> 16);
+            sum_x0 = pred_a & 0xFFFF;
+
+            pred_a = *((uint32*)comp_ref_x);
+            pred_b = (pred_a >> 8) & 0xFF00FF;
+            pred_a &= 0xFF00FF;
+            pred_a += pred_b;
+            pred_a += (pred_a >> 16);
+            sum_x1 = pred_a & 0xFFFF;
+
+            pred_1[i] = (sum_x1 + 2) >> 2;
+
+            sum_y0 = *comp_ref_y;
+            sum_y0 += *(comp_ref_y += pitch);
+            sum_y0 += *(comp_ref_y += pitch);
+            sum_y0 += *(comp_ref_y += pitch);
+
+            sum_y1 = *(comp_ref_y += pitch);
+            sum_y1 += *(comp_ref_y += pitch);
+            sum_y1 += *(comp_ref_y += pitch);
+            sum_y1 += *(comp_ref_y += pitch);
+
+            pred_2[i] = (sum_y1 + 2) >> 2;
+
+            pred_0[i] = (sum_y0 + sum_x0 + 4) >> 3;
+            pred_3[i] = (sum_y1 + sum_x1 + 4) >> 3;
+
+            comp_ref_x = curCr - pitch;
+            comp_ref_y = curCr - 1;
+        }
+    }
+
+    else if (video->intraAvailA)
+    {
+        comp_ref_y = curCb - 1;
+        for (i = 0; i < 2; i++)
+        {
+            sum_y0 = *comp_ref_y;
+            sum_y0 += *(comp_ref_y += pitch);
+            sum_y0 += *(comp_ref_y += pitch);
+            sum_y0 += *(comp_ref_y += pitch);
+
+            sum_y1 = *(comp_ref_y += pitch);
+            sum_y1 += *(comp_ref_y += pitch);
+            sum_y1 += *(comp_ref_y += pitch);
+            sum_y1 += *(comp_ref_y += pitch);
+
+            pred_0[i] = pred_1[i] = (sum_y0 + 2) >> 2;
+            pred_2[i] = pred_3[i] = (sum_y1 + 2) >> 2;
+
+            comp_ref_y = curCr - 1;
+        }
+    }
+    else if (video->intraAvailB)
+    {
+        comp_ref_x = curCb - pitch;
+        for (i = 0; i < 2; i++)
+        {
+            pred_a = *((uint32*)comp_ref_x);
+            comp_ref_x += 4;
+            pred_b = (pred_a >> 8) & 0xFF00FF;
+            pred_a &= 0xFF00FF;
+            pred_a += pred_b;
+            pred_a += (pred_a >> 16);
+            sum_x0 = pred_a & 0xFFFF;
+
+            pred_a = *((uint32*)comp_ref_x);
+            pred_b = (pred_a >> 8) & 0xFF00FF;
+            pred_a &= 0xFF00FF;
+            pred_a += pred_b;
+            pred_a += (pred_a >> 16);
+            sum_x1 = pred_a & 0xFFFF;
+
+            pred_0[i] = pred_2[i] = (sum_x0 + 2) >> 2;
+            pred_1[i] = pred_3[i] = (sum_x1 + 2) >> 2;
+
+            comp_ref_x = curCr - pitch;
+        }
+    }
+    else
+    {
+        pred_0[0] = pred_0[1] = pred_1[0] = pred_1[1] =
+                                                pred_2[0] = pred_2[1] = pred_3[0] = pred_3[1] = 128;
+    }
+
+    pred = encvid->pred_ic[AVC_IC_DC];
+
+    pred_a = pred_0[0];
+    pred_b = pred_1[0];
+    pred_a |= (pred_a << 8);
+    pred_a |= (pred_a << 16);
+    pred_b |= (pred_b << 8);
+    pred_b |= (pred_b << 16);
+
+    pred_c = pred_0[1];
+    pred_d = pred_1[1];
+    pred_c |= (pred_c << 8);
+    pred_c |= (pred_c << 16);
+    pred_d |= (pred_d << 8);
+    pred_d |= (pred_d << 16);
+
+
+    for (j = 0; j < 4; j++) /* 4 lines */
+    {
+        *((uint32*)pred) = pred_a;
+        *((uint32*)(pred + 4)) = pred_b;
+        *((uint32*)(pred + 8)) = pred_c;
+        *((uint32*)(pred + 12)) = pred_d;
+        pred += 16; /* move to the next line */
+    }
+
+    pred_a = pred_2[0];
+    pred_b = pred_3[0];
+    pred_a |= (pred_a << 8);
+    pred_a |= (pred_a << 16);
+    pred_b |= (pred_b << 8);
+    pred_b |= (pred_b << 16);
+
+    pred_c = pred_2[1];
+    pred_d = pred_3[1];
+    pred_c |= (pred_c << 8);
+    pred_c |= (pred_c << 16);
+    pred_d |= (pred_d << 8);
+    pred_d |= (pred_d << 16);
+
+    for (j = 0; j < 4; j++) /* 4 lines */
+    {
+        *((uint32*)pred) = pred_a;
+        *((uint32*)(pred + 4)) = pred_b;
+        *((uint32*)(pred + 8)) = pred_c;
+        *((uint32*)(pred + 12)) = pred_d;
+        pred += 16; /* move to the next line */
+    }
+
+    /* predict horizontal mode */
+    if (video->intraAvailA)
+    {
+        comp_ref_y = curCb - 1;
+        comp_ref_x = curCr - 1;
+        pred = encvid->pred_ic[AVC_IC_Horizontal];
+
+        for (i = 4; i < 6; i++)
+        {
+            for (j = 0; j < 4; j++)
+            {
+                pred_a = *comp_ref_y;
+                comp_ref_y += pitch;
+                pred_a |= (pred_a << 8);
+                pred_a |= (pred_a << 16);
+                *((uint32*)pred) = pred_a;
+                *((uint32*)(pred + 4)) = pred_a;
+
+                pred_a = *comp_ref_x;
+                comp_ref_x += pitch;
+                pred_a |= (pred_a << 8);
+                pred_a |= (pred_a << 16);
+                *((uint32*)(pred + 8)) = pred_a;
+                *((uint32*)(pred + 12)) = pred_a;
+
+                pred += 16;
+            }
+        }
+    }
+
+    /* vertical mode */
+    if (video->intraAvailB)
+    {
+        comp_ref_x = curCb - pitch;
+        comp_ref_y = curCr - pitch;
+        pred = encvid->pred_ic[AVC_IC_Vertical];
+
+        pred_a = *((uint32*)comp_ref_x);
+        pred_b = *((uint32*)(comp_ref_x + 4));
+        pred_c = *((uint32*)comp_ref_y);
+        pred_d = *((uint32*)(comp_ref_y + 4));
+
+        for (j = 0; j < 8; j++)
+        {
+            *((uint32*)pred) = pred_a;
+            *((uint32*)(pred + 4)) = pred_b;
+            *((uint32*)(pred + 8)) = pred_c;
+            *((uint32*)(pred + 12)) = pred_d;
+            pred += 16;
+        }
+    }
+
+    /* Intra_Chroma_Plane */
+    if (video->intraAvailA && video->intraAvailB && video->intraAvailD)
+    {
+        comp_ref_x = curCb - pitch;
+        comp_ref_y = curCb - 1;
+        topleft = curCb[-pitch-1];
+
+        pred = encvid->pred_ic[AVC_IC_Plane];
+        for (component = 0; component < 2; component++)
+        {
+            H = V = 0;
+            comp_ref_x0 = comp_ref_x + 4;
+            comp_ref_x1 = comp_ref_x + 2;
+            comp_ref_y0 = comp_ref_y + (pitch << 2);
+            comp_ref_y1 = comp_ref_y + (pitch << 1);
+            for (i = 1; i < 4; i++)
+            {
+                H += i * (*comp_ref_x0++ - *comp_ref_x1--);
+                V += i * (*comp_ref_y0 - *comp_ref_y1);
+                comp_ref_y0 += pitch;
+                comp_ref_y1 -= pitch;
+            }
+            H += i * (*comp_ref_x0++ - topleft);
+            V += i * (*comp_ref_y0 - *comp_ref_y1);
+
+            a_16 = ((*(comp_ref_x + 7) + *(comp_ref_y + 7 * pitch)) << 4) + 16;
+            b = (17 * H + 16) >> 5;
+            c = (17 * V + 16) >> 5;
+
+            pred_a = 0;
+            for (i = 4; i < 6; i++)
+            {
+                for (j = 0; j < 4; j++)
+                {
+                    factor_c = a_16 + c * (pred_a++ - 3);
+
+                    factor_c -= 3 * b;
+
+                    value = factor_c >> 5;
+                    factor_c += b;
+                    CLIP_RESULT(value)
+                    pred_b = value;
+                    value = factor_c >> 5;
+                    factor_c += b;
+                    CLIP_RESULT(value)
+                    pred_b |= (value << 8);
+                    value = factor_c >> 5;
+                    factor_c += b;
+                    CLIP_RESULT(value)
+                    pred_b |= (value << 16);
+                    value = factor_c >> 5;
+                    factor_c += b;
+                    CLIP_RESULT(value)
+                    pred_b |= (value << 24);
+                    *((uint32*)pred) = pred_b;
+
+                    value = factor_c >> 5;
+                    factor_c += b;
+                    CLIP_RESULT(value)
+                    pred_b = value;
+                    value = factor_c >> 5;
+                    factor_c += b;
+                    CLIP_RESULT(value)
+                    pred_b |= (value << 8);
+                    value = factor_c >> 5;
+                    factor_c += b;
+                    CLIP_RESULT(value)
+                    pred_b |= (value << 16);
+                    value = factor_c >> 5;
+                    factor_c += b;
+                    CLIP_RESULT(value)
+                    pred_b |= (value << 24);
+                    *((uint32*)(pred + 4)) = pred_b;
+                    pred += 16;
+                }
+            }
+
+            pred -= 120; /* point to cr */
+            comp_ref_x = curCr - pitch;
+            comp_ref_y = curCr - 1;
+            topleft = curCr[-pitch-1];
+        }
+    }
+
+    /* now evaluate it */
+
+    org_pitch = (currInput->pitch) >> 1;
+    offset = x_pos + y_pos * org_pitch;
+
+    orgCb = currInput->YCbCr[1] + offset;
+    orgCr = currInput->YCbCr[2] + offset;
+
+    mincost = 0x7fffffff;
+    cost = SATDChroma(orgCb, orgCr, org_pitch, encvid->pred_ic[AVC_IC_DC], mincost);
+    if (cost < mincost)
+    {
+        mincost = cost;
+        currMB->intra_chroma_pred_mode = AVC_IC_DC;
+    }
+
+    if (video->intraAvailA)
+    {
+        cost = SATDChroma(orgCb, orgCr, org_pitch, encvid->pred_ic[AVC_IC_Horizontal], mincost);
+        if (cost < mincost)
+        {
+            mincost = cost;
+            currMB->intra_chroma_pred_mode = AVC_IC_Horizontal;
+        }
+    }
+
+    if (video->intraAvailB)
+    {
+        cost = SATDChroma(orgCb, orgCr, org_pitch, encvid->pred_ic[AVC_IC_Vertical], mincost);
+        if (cost < mincost)
+        {
+            mincost = cost;
+            currMB->intra_chroma_pred_mode = AVC_IC_Vertical;
+        }
+    }
+
+    if (video->intraAvailA && video->intraAvailB && video->intraAvailD)
+    {
+        cost = SATDChroma(orgCb, orgCr, org_pitch, encvid->pred_ic[AVC_IC_Plane], mincost);
+        if (cost < mincost)
+        {
+            mincost = cost;
+            currMB->intra_chroma_pred_mode = AVC_IC_Plane;
+        }
+    }
+
+
+    return ;
+}
+
+
+int SATDChroma(uint8 *orgCb, uint8 *orgCr, int org_pitch, uint8 *pred, int min_cost)
+{
+    int cost;
+    /* first take difference between orgCb, orgCr and pred */
+    int16 res[128], *pres; // residue
+    int m0, m1, m2, m3, tmp1;
+    int j, k;
+
+    pres = res;
+    org_pitch -= 8;
+    // horizontal transform
+    for (j = 0; j < 8; j++)
+    {
+        k = 2;
+        while (k > 0)
+        {
+            m0 = orgCb[0] - pred[0];
+            m3 = orgCb[3] - pred[3];
+            m0 += m3;
+            m3 = m0 - (m3 << 1);
+            m1 = orgCb[1] - pred[1];
+            m2 = orgCb[2] - pred[2];
+            m1 += m2;
+            m2 = m1 - (m2 << 1);
+            pres[0] = m0 + m1;
+            pres[2] = m0 - m1;
+            pres[1] = m2 + m3;
+            pres[3] = m3 - m2;
+
+            orgCb += 4;
+            pres += 4;
+            pred += 4;
+            k--;
+        }
+        orgCb += org_pitch;
+        k = 2;
+        while (k > 0)
+        {
+            m0 = orgCr[0] - pred[0];
+            m3 = orgCr[3] - pred[3];
+            m0 += m3;
+            m3 = m0 - (m3 << 1);
+            m1 = orgCr[1] - pred[1];
+            m2 = orgCr[2] - pred[2];
+            m1 += m2;
+            m2 = m1 - (m2 << 1);
+            pres[0] = m0 + m1;
+            pres[2] = m0 - m1;
+            pres[1] = m2 + m3;
+            pres[3] = m3 - m2;
+
+            orgCr += 4;
+            pres += 4;
+            pred += 4;
+            k--;
+        }
+        orgCr += org_pitch;
+    }
+
+    /* vertical transform */
+    for (j = 0; j < 2; j++)
+    {
+        pres = res + (j << 6);
+        k = 16;
+        while (k > 0)
+        {
+            m0 = pres[0];
+            m3 = pres[3<<4];
+            m0 += m3;
+            m3 = m0 - (m3 << 1);
+            m1 = pres[1<<4];
+            m2 = pres[2<<4];
+            m1 += m2;
+            m2 = m1 - (m2 << 1);
+            pres[0] = m0 + m1;
+            pres[2<<4] = m0 - m1;
+            pres[1<<4] = m2 + m3;
+            pres[3<<4] = m3 - m2;
+
+            pres++;
+            k--;
+        }
+    }
+
+    /* now sum of absolute value */
+    pres = res;
+    cost = 0;
+    k = 128;
+    while (k > 0)
+    {
+        tmp1 = *pres++;
+        cost += ((tmp1 >= 0) ? tmp1 : -tmp1);
+        tmp1 = *pres++;
+        cost += ((tmp1 >= 0) ? tmp1 : -tmp1);
+        tmp1 = *pres++;
+        cost += ((tmp1 >= 0) ? tmp1 : -tmp1);
+        tmp1 = *pres++;
+        cost += ((tmp1 >= 0) ? tmp1 : -tmp1);
+        tmp1 = *pres++;
+        cost += ((tmp1 >= 0) ? tmp1 : -tmp1);
+        tmp1 = *pres++;
+        cost += ((tmp1 >= 0) ? tmp1 : -tmp1);
+        tmp1 = *pres++;
+        cost += ((tmp1 >= 0) ? tmp1 : -tmp1);
+        tmp1 = *pres++;
+        cost += ((tmp1 >= 0) ? tmp1 : -tmp1);
+        k -= 8;
+        if (cost > min_cost) /* early drop out */
+        {
+            return cost;
+        }
+    }
+
+    return cost;
+}
+
+
+
+///////////////////////////////// old code, unused
+/* find the best intra mode based on original (unencoded) frame */
+/* output is
+    currMB->mb_intra, currMB->mbMode,
+    currMB->i16Mode  (if currMB->mbMode == AVC_I16)
+    currMB->i4Mode[..] (if currMB->mbMode == AVC_I4) */
+
+#ifdef FIXED_INTRAPRED_MODE
+void MBIntraSearch(AVCEncObject *encvid, AVCMacroblock *currMB, int mbNum)
+{
+    (void)(mbNum);
+
+    AVCCommonObj *video = encvid->common;
+    int indx, block_x, block_y;
+
+    video->intraAvailA = video->intraAvailB = video->intraAvailC = video->intraAvailD = 0;
+
+    if (!video->currPicParams->constrained_intra_pred_flag)
+    {
+        video->intraAvailA = video->mbAvailA;
+        video->intraAvailB = video->mbAvailB;
+        video->intraAvailC = video->mbAvailC;
+        video->intraAvailD = video->mbAvailD;
+    }
+    else
+    {
+        if (video->mbAvailA)
+        {
+            video->intraAvailA = video->mblock[video->mbAddrA].mb_intra;
+        }
+        if (video->mbAvailB)
+        {
+            video->intraAvailB = video->mblock[video->mbAddrB].mb_intra ;
+        }
+        if (video->mbAvailC)
+        {
+            video->intraAvailC = video->mblock[video->mbAddrC].mb_intra;
+        }
+        if (video->mbAvailD)
+        {
+            video->intraAvailD = video->mblock[video->mbAddrD].mb_intra;
+        }
+    }
+
+    currMB->mb_intra = TRUE;
+    currMB->mbMode = FIXED_INTRAPRED_MODE;
+
+    if (currMB->mbMode == AVC_I16)
+    {
+        currMB->i16Mode = FIXED_I16_MODE;
+
+        if (FIXED_I16_MODE == AVC_I16_Vertical && !video->intraAvailB)
+        {
+            currMB->i16Mode = AVC_I16_DC;
+        }
+
+        if (FIXED_I16_MODE == AVC_I16_Horizontal && !video->intraAvailA)
+        {
+            currMB->i16Mode = AVC_I16_DC;
+        }
+
+        if (FIXED_I16_MODE == AVC_I16_Plane && !(video->intraAvailA && video->intraAvailB && video->intraAvailD))
+        {
+            currMB->i16Mode = AVC_I16_DC;
+        }
+    }
+    else //if(currMB->mbMode == AVC_I4)
+    {
+        for (indx = 0; indx < 16; indx++)
+        {
+            block_x = blkIdx2blkX[indx];
+            block_y = blkIdx2blkY[indx];
+
+            currMB->i4Mode[(block_y<<2)+block_x] = FIXED_I4_MODE;
+
+            if (FIXED_I4_MODE == AVC_I4_Vertical && !(block_y > 0 || video->intraAvailB))
+            {
+                currMB->i4Mode[(block_y<<2)+block_x] = AVC_I4_DC;
+            }
+
+            if (FIXED_I4_MODE == AVC_I4_Horizontal && !(block_x || video->intraAvailA))
+            {
+                currMB->i4Mode[(block_y<<2)+block_x] = AVC_I4_DC;
+            }
+
+            if (FIXED_I4_MODE == AVC_I4_Diagonal_Down_Left &&
+                    (block_y == 0 && !video->intraAvailB))
+            {
+                currMB->i4Mode[(block_y<<2)+block_x] = AVC_I4_DC;
+            }
+
+            if (FIXED_I4_MODE == AVC_I4_Diagonal_Down_Right &&
+                    !((block_y && block_x)
+                      || (block_y && video->intraAvailA)
+                      || (block_x && video->intraAvailB)
+                      || (video->intraAvailA && video->intraAvailD && video->intraAvailB)))
+            {
+                currMB->i4Mode[(block_y<<2)+block_x] = AVC_I4_DC;
+            }
+
+            if (FIXED_I4_MODE == AVC_I4_Vertical_Right &&
+                    !((block_y && block_x)
+                      || (block_y && video->intraAvailA)
+                      || (block_x && video->intraAvailB)
+                      || (video->intraAvailA && video->intraAvailD && video->intraAvailB)))
+            {
+                currMB->i4Mode[(block_y<<2)+block_x] = AVC_I4_DC;
+            }
+
+            if (FIXED_I4_MODE == AVC_I4_Horizontal_Down &&
+                    !((block_y && block_x)
+                      || (block_y && video->intraAvailA)
+                      || (block_x && video->intraAvailB)
+                      || (video->intraAvailA && video->intraAvailD && video->intraAvailB)))
+            {
+                currMB->i4Mode[(block_y<<2)+block_x] = AVC_I4_DC;
+            }
+
+            if (FIXED_I4_MODE == AVC_I4_Vertical_Left &&
+                    (block_y == 0 && !video->intraAvailB))
+            {
+                currMB->i4Mode[(block_y<<2)+block_x] = AVC_I4_DC;
+            }
+
+            if (FIXED_I4_MODE == AVC_I4_Horizontal_Up && !(block_x || video->intraAvailA))
+            {
+                currMB->i4Mode[(block_y<<2)+block_x] = AVC_I4_DC;
+            }
+        }
+    }
+
+    currMB->intra_chroma_pred_mode = FIXED_INTRA_CHROMA_MODE;
+
+    if (FIXED_INTRA_CHROMA_MODE == AVC_IC_Horizontal && !(video->intraAvailA))
+    {
+        currMB->intra_chroma_pred_mode = AVC_IC_DC;
+    }
+
+    if (FIXED_INTRA_CHROMA_MODE == AVC_IC_Vertical && !(video->intraAvailB))
+    {
+        currMB->intra_chroma_pred_mode = AVC_IC_DC;
+    }
+
+    if (FIXED_INTRA_CHROMA_MODE == AVC_IC_Plane && !(video->intraAvailA && video->intraAvailB && video->intraAvailD))
+    {
+        currMB->intra_chroma_pred_mode = AVC_IC_DC;
+    }
+
+    /* also reset the motion vectors */
+    /* set MV and Ref_Idx codes of Intra blocks in P-slices */
+    memset(currMB->mvL0, 0, sizeof(int32)*16);
+    currMB->ref_idx_L0[0] = -1;
+    currMB->ref_idx_L0[1] = -1;
+    currMB->ref_idx_L0[2] = -1;
+    currMB->ref_idx_L0[3] = -1;
+
+    // output from this function, currMB->mbMode should be set to either
+    // AVC_I4, AVC_I16, or else in AVCMBMode enum, mbType, mb_intra, intra_chroma_pred_mode */
+    return ;
+}
+#else // faster combined prediction+SAD calculation
+void MBIntraSearch(AVCEncObject *encvid, AVCMacroblock *currMB, int mbNum)
+{
+    AVCCommonObj *video = encvid->common;
+    AVCFrameIO *currInput = encvid->currInput;
+    uint8 *curL, *curCb, *curCr;
+    uint8 *comp, *pred_block;
+    int block_x, block_y, offset;
+    uint sad, sad4, sadI4, sadI16;
+    int component, SubBlock_indx, temp;
+    int pitch = video->currPic->pitch;
+
+    /* calculate the cost of each intra prediction mode  and compare to the
+    inter mode */
+    /* full search for all intra prediction */
+    offset = (video->mb_y << 4) * pitch + (video->mb_x << 4);
+    curL = currInput->YCbCr[0] + offset;
+    pred_block = video->pred_block + 84;
+
+    /* Assuming that InitNeighborAvailability has been called prior to this function */
+    video->intraAvailA = video->intraAvailB = video->intraAvailC = video->intraAvailD = 0;
+
+    if (!video->currPicParams->constrained_intra_pred_flag)
+    {
+        video->intraAvailA = video->mbAvailA;
+        video->intraAvailB = video->mbAvailB;
+        video->intraAvailC = video->mbAvailC;
+        video->intraAvailD = video->mbAvailD;
+    }
+    else
+    {
+        if (video->mbAvailA)
+        {
+            video->intraAvailA = video->mblock[video->mbAddrA].mb_intra;
+        }
+        if (video->mbAvailB)
+        {
+            video->intraAvailB = video->mblock[video->mbAddrB].mb_intra ;
+        }
+        if (video->mbAvailC)
+        {
+            video->intraAvailC = video->mblock[video->mbAddrC].mb_intra;
+        }
+        if (video->mbAvailD)
+        {
+            video->intraAvailD = video->mblock[video->mbAddrD].mb_intra;
+        }
+    }
+
+    /* currently we're doing exhaustive search. Smart search will be used later */
+
+    /* I16 modes */
+    curL = currInput->YCbCr[0] + offset;
+    video->pintra_pred_top = curL - pitch;
+    video->pintra_pred_left = curL - 1;
+    if (video->mb_y)
+    {
+        video->intra_pred_topleft = *(curL - pitch - 1);
+    }
+
+    /* Intra_16x16_Vertical */
+    sadI16 = 65536;
+    /* check availability of top */
+    if (video->intraAvailB)
+    {
+        sad = SAD_I16_Vert(video, curL, sadI16);
+
+        if (sad < sadI16)
+        {
+            sadI16 = sad;
+            currMB->i16Mode = AVC_I16_Vertical;
+        }
+    }
+    /* Intra_16x16_Horizontal */
+    /* check availability of left */
+    if (video->intraAvailA)
+    {
+        sad = SAD_I16_HorzDC(video, curL, AVC_I16_Horizontal, sadI16);
+
+        if (sad < sadI16)
+        {
+            sadI16 = sad;
+            currMB->i16Mode = AVC_I16_Horizontal;
+        }
+    }
+
+    /* Intra_16x16_DC, default mode */
+    sad = SAD_I16_HorzDC(video, curL, AVC_I16_DC, sadI16);
+    if (sad < sadI16)
+    {
+        sadI16 = sad;
+        currMB->i16Mode = AVC_I16_DC;
+    }
+
+    /* Intra_16x16_Plane */
+    if (video->intraAvailA && video->intraAvailB && video->intraAvailD)
+    {
+        sad = SAD_I16_Plane(video, curL, sadI16);
+
+        if (sad < sadI16)
+        {
+            sadI16 = sad;
+            currMB->i16Mode = AVC_I16_Plane;
+        }
+    }
+
+    sadI16 >>= 1;  /* before comparison */
+
+    /* selection between intra4, intra16 or inter mode */
+    if (sadI16 < encvid->min_cost)
+    {
+        currMB->mb_intra = TRUE;
+        currMB->mbMode = AVC_I16;
+        encvid->min_cost = sadI16;
+    }
+
+    if (currMB->mb_intra) /* only do the chrominance search when intra is decided */
+    {
+        /* Note that we might be able to guess the type of prediction from
+        the luma prediction type */
+
+        /* now search for the best chroma intra prediction */
+        offset = (offset >> 2) + (video->mb_x << 2);
+        curCb = currInput->YCbCr[1] + offset;
+        curCr = currInput->YCbCr[2] + offset;
+
+        pitch >>= 1;
+        video->pintra_pred_top_cb = curCb - pitch;
+        video->pintra_pred_left_cb = curCb - 1;
+        video->pintra_pred_top_cr = curCr - pitch;
+        video->pintra_pred_left_cr = curCr - 1;
+
+        if (video->mb_y)
+        {
+            video->intra_pred_topleft_cb = *(curCb - pitch - 1);
+            video->intra_pred_topleft_cr = *(curCr - pitch - 1);
+        }
+
+        /* Intra_Chroma_DC */
+        sad4 = SAD_Chroma_DC(video, curCb, curCr, 65536);
+        currMB->intra_chroma_pred_mode = AVC_IC_DC;
+
+        /* Intra_Chroma_Horizontal */
+        if (video->intraAvailA)
+        {
+            /* check availability of left */
+            sad = SAD_Chroma_Horz(video, curCb, curCr, sad4);
+            if (sad < sad4)
+            {
+                sad4 = sad;
+                currMB->intra_chroma_pred_mode = AVC_IC_Horizontal;
+            }
+        }
+
+        /* Intra_Chroma_Vertical */
+        if (video->intraAvailB)
+        {
+            /* check availability of top */
+            sad = SAD_Chroma_Vert(video, curCb, curCr, sad4);
+
+            if (sad < sad4)
+            {
+                sad4 = sad;
+                currMB->intra_chroma_pred_mode = AVC_IC_Vertical;
+            }
+        }
+
+        /* Intra_Chroma_Plane */
+        if (video->intraAvailA && video->intraAvailB && video->intraAvailD)
+        {
+            /* check availability of top and left */
+            Intra_Chroma_Plane(video, pitch);
+
+            sad = SADChroma(pred_block + 452, curCb, curCr, pitch);
+
+            if (sad < sad4)
+            {
+                sad4 = sad;
+                currMB->intra_chroma_pred_mode = AVC_IC_Plane;
+            }
+        }
+
+        /* also reset the motion vectors */
+        /* set MV and Ref_Idx codes of Intra blocks in P-slices */
+        memset(currMB->mvL0, 0, sizeof(int32)*16);
+        memset(currMB->ref_idx_L0, -1, sizeof(int16)*4);
+
+    }
+
+    // output from this function, currMB->mbMode should be set to either
+    // AVC_I4, AVC_I16, or else in AVCMBMode enum, mbType, mb_intra, intra_chroma_pred_mode */
+
+    return ;
+}
+#endif
+
+
diff --git a/media/libstagefright/codecs/avc/enc/src/motion_comp.cpp b/media/libstagefright/codecs/avc/enc/src/motion_comp.cpp
new file mode 100644
index 0000000..ac62d78
--- /dev/null
+++ b/media/libstagefright/codecs/avc/enc/src/motion_comp.cpp
@@ -0,0 +1,2156 @@
+/* ------------------------------------------------------------------
+ * Copyright (C) 1998-2009 PacketVideo
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
+ * express or implied.
+ * See the License for the specific language governing permissions
+ * and limitations under the License.
+ * -------------------------------------------------------------------
+ */
+#include "avcenc_lib.h"
+#include "avcenc_int.h"
+
+
+#define CLIP_RESULT(x)      if((uint)x > 0xFF){ \
+                 x = 0xFF & (~(x>>31));}
+
+/* (blkwidth << 2) + (dy << 1) + dx */
+static void (*const eChromaMC_SIMD[8])(uint8 *, int , int , int , uint8 *, int, int , int) =
+{
+    &eChromaFullMC_SIMD,
+    &eChromaHorizontalMC_SIMD,
+    &eChromaVerticalMC_SIMD,
+    &eChromaDiagonalMC_SIMD,
+    &eChromaFullMC_SIMD,
+    &eChromaHorizontalMC2_SIMD,
+    &eChromaVerticalMC2_SIMD,
+    &eChromaDiagonalMC2_SIMD
+};
+/* Perform motion prediction and compensation with residue if exist. */
+void AVCMBMotionComp(AVCEncObject *encvid, AVCCommonObj *video)
+{
+    (void)(encvid);
+
+    AVCMacroblock *currMB = video->currMB;
+    AVCPictureData *currPic = video->currPic;
+    int mbPartIdx, subMbPartIdx;
+    int ref_idx;
+    int offset_MbPart_indx = 0;
+    int16 *mv;
+    uint32 x_pos, y_pos;
+    uint8 *curL, *curCb, *curCr;
+    uint8 *ref_l, *ref_Cb, *ref_Cr;
+    uint8 *predBlock, *predCb, *predCr;
+    int block_x, block_y, offset_x, offset_y, offsetP, offset;
+    int x_position = (video->mb_x << 4);
+    int y_position = (video->mb_y << 4);
+    int MbHeight, MbWidth, mbPartIdx_X, mbPartIdx_Y, offset_indx;
+    int picWidth = currPic->width;
+    int picPitch = currPic->pitch;
+    int picHeight = currPic->height;
+    uint32 tmp_word;
+
+    tmp_word = y_position * picPitch;
+    curL = currPic->Sl + tmp_word + x_position;
+    offset = (tmp_word >> 2) + (x_position >> 1);
+    curCb = currPic->Scb + offset;
+    curCr = currPic->Scr + offset;
+
+    predBlock = curL;
+    predCb = curCb;
+    predCr = curCr;
+
+    GetMotionVectorPredictor(video, 1);
+
+    for (mbPartIdx = 0; mbPartIdx < currMB->NumMbPart; mbPartIdx++)
+    {
+        MbHeight = currMB->SubMbPartHeight[mbPartIdx];
+        MbWidth = currMB->SubMbPartWidth[mbPartIdx];
+        mbPartIdx_X = ((mbPartIdx + offset_MbPart_indx) & 1);
+        mbPartIdx_Y = (mbPartIdx + offset_MbPart_indx) >> 1;
+        ref_idx = currMB->ref_idx_L0[(mbPartIdx_Y << 1) + mbPartIdx_X];
+        offset_indx = 0;
+
+        ref_l = video->RefPicList0[ref_idx]->Sl;
+        ref_Cb = video->RefPicList0[ref_idx]->Scb;
+        ref_Cr = video->RefPicList0[ref_idx]->Scr;
+
+        for (subMbPartIdx = 0; subMbPartIdx < currMB->NumSubMbPart[mbPartIdx]; subMbPartIdx++)
+        {
+            block_x = (mbPartIdx_X << 1) + ((subMbPartIdx + offset_indx) & 1);
+            block_y = (mbPartIdx_Y << 1) + (((subMbPartIdx + offset_indx) >> 1) & 1);
+            mv = (int16*)(currMB->mvL0 + block_x + (block_y << 2));
+            offset_x = x_position + (block_x << 2);
+            offset_y = y_position + (block_y << 2);
+            x_pos = (offset_x << 2) + *mv++;   /*quarter pel */
+            y_pos = (offset_y << 2) + *mv;   /*quarter pel */
+
+            //offset = offset_y * currPic->width;
+            //offsetC = (offset >> 2) + (offset_x >> 1);
+            offsetP = (block_y << 2) * picPitch + (block_x << 2);
+            eLumaMotionComp(ref_l, picPitch, picHeight, x_pos, y_pos,
+                            /*comp_Sl + offset + offset_x,*/
+                            predBlock + offsetP, picPitch, MbWidth, MbHeight);
+
+            offsetP = (block_y * picWidth) + (block_x << 1);
+            eChromaMotionComp(ref_Cb, picWidth >> 1, picHeight >> 1, x_pos, y_pos,
+                              /*comp_Scb +  offsetC,*/
+                              predCb + offsetP, picPitch >> 1, MbWidth >> 1, MbHeight >> 1);
+            eChromaMotionComp(ref_Cr, picWidth >> 1, picHeight >> 1, x_pos, y_pos,
+                              /*comp_Scr +  offsetC,*/
+                              predCr + offsetP, picPitch >> 1, MbWidth >> 1, MbHeight >> 1);
+
+            offset_indx = currMB->SubMbPartWidth[mbPartIdx] >> 3;
+        }
+        offset_MbPart_indx = currMB->MbPartWidth >> 4;
+    }
+
+    return ;
+}
+
+
+/* preform the actual  motion comp here */
+void eLumaMotionComp(uint8 *ref, int picpitch, int picheight,
+                     int x_pos, int y_pos,
+                     uint8 *pred, int pred_pitch,
+                     int blkwidth, int blkheight)
+{
+    (void)(picheight);
+
+    int dx, dy;
+    int temp2[21][21]; /* for intermediate results */
+    uint8 *ref2;
+
+    dx = x_pos & 3;
+    dy = y_pos & 3;
+    x_pos = x_pos >> 2;  /* round it to full-pel resolution */
+    y_pos = y_pos >> 2;
+
+    /* perform actual motion compensation */
+    if (dx == 0 && dy == 0)
+    {  /* fullpel position *//* G */
+
+        ref += y_pos * picpitch + x_pos;
+
+        eFullPelMC(ref, picpitch, pred, pred_pitch, blkwidth, blkheight);
+
+    }   /* other positions */
+    else  if (dy == 0)
+    { /* no vertical interpolation *//* a,b,c*/
+
+        ref += y_pos * picpitch + x_pos;
+
+        eHorzInterp1MC(ref, picpitch, pred, pred_pitch, blkwidth, blkheight, dx);
+    }
+    else if (dx == 0)
+    { /*no horizontal interpolation *//* d,h,n */
+
+        ref += y_pos * picpitch + x_pos;
+
+        eVertInterp1MC(ref, picpitch, pred, pred_pitch, blkwidth, blkheight, dy);
+    }
+    else if (dy == 2)
+    {  /* horizontal cross *//* i, j, k */
+
+        ref += y_pos * picpitch + x_pos - 2; /* move to the left 2 pixels */
+
+        eVertInterp2MC(ref, picpitch, &temp2[0][0], 21, blkwidth + 5, blkheight);
+
+        eHorzInterp2MC(&temp2[0][2], 21, pred, pred_pitch, blkwidth, blkheight, dx);
+    }
+    else if (dx == 2)
+    { /* vertical cross */ /* f,q */
+
+        ref += (y_pos - 2) * picpitch + x_pos; /* move to up 2 lines */
+
+        eHorzInterp3MC(ref, picpitch, &temp2[0][0], 21, blkwidth, blkheight + 5);
+        eVertInterp3MC(&temp2[2][0], 21, pred, pred_pitch, blkwidth, blkheight, dy);
+    }
+    else
+    { /* diagonal *//* e,g,p,r */
+
+        ref2 = ref + (y_pos + (dy / 2)) * picpitch + x_pos;
+
+        ref += (y_pos * picpitch) + x_pos + (dx / 2);
+
+        eDiagonalInterpMC(ref2, ref, picpitch, pred, pred_pitch, blkwidth, blkheight);
+    }
+
+    return ;
+}
+
+void eCreateAlign(uint8 *ref, int picpitch, int y_pos,
+                  uint8 *out, int blkwidth, int blkheight)
+{
+    int i, j;
+    int offset, out_offset;
+    uint32 prev_pix, result, pix1, pix2, pix4;
+
+    ref += y_pos * picpitch;// + x_pos;
+    out_offset = 24 - blkwidth;
+
+    //switch(x_pos&0x3){
+    switch (((uint32)ref)&0x3)
+    {
+        case 1:
+            offset =  picpitch - blkwidth - 3;
+            for (j = 0; j < blkheight; j++)
+            {
+                pix1 = *ref++;
+                pix2 = *((uint16*)ref);
+                ref += 2;
+                result = (pix2 << 8) | pix1;
+
+                for (i = 3; i < blkwidth; i += 4)
+                {
+                    pix4 = *((uint32*)ref);
+                    ref += 4;
+                    prev_pix = (pix4 << 24) & 0xFF000000; /* mask out byte belong to previous word */
+                    result |= prev_pix;
+                    *((uint32*)out) = result;  /* write 4 bytes */
+                    out += 4;
+                    result = pix4 >> 8; /* for the next loop */
+                }
+                ref += offset;
+                out += out_offset;
+            }
+            break;
+        case 2:
+            offset =  picpitch - blkwidth - 2;
+            for (j = 0; j < blkheight; j++)
+            {
+                result = *((uint16*)ref);
+                ref += 2;
+                for (i = 2; i < blkwidth; i += 4)
+                {
+                    pix4 = *((uint32*)ref);
+                    ref += 4;
+                    prev_pix = (pix4 << 16) & 0xFFFF0000; /* mask out byte belong to previous word */
+                    result |= prev_pix;
+                    *((uint32*)out) = result;  /* write 4 bytes */
+                    out += 4;
+                    result = pix4 >> 16; /* for the next loop */
+                }
+                ref += offset;
+                out += out_offset;
+            }
+            break;
+        case 3:
+            offset =  picpitch - blkwidth - 1;
+            for (j = 0; j < blkheight; j++)
+            {
+                result = *ref++;
+                for (i = 1; i < blkwidth; i += 4)
+                {
+                    pix4 = *((uint32*)ref);
+                    ref += 4;
+                    prev_pix = (pix4 << 8) & 0xFFFFFF00; /* mask out byte belong to previous word */
+                    result |= prev_pix;
+                    *((uint32*)out) = result;  /* write 4 bytes */
+                    out += 4;
+                    result = pix4 >> 24; /* for the next loop */
+                }
+                ref += offset;
+                out += out_offset;
+            }
+            break;
+    }
+}
+
+void eHorzInterp1MC(uint8 *in, int inpitch, uint8 *out, int outpitch,
+                    int blkwidth, int blkheight, int dx)
+{
+    uint8 *p_ref;
+    uint32 *p_cur;
+    uint32 tmp, pkres;
+    int result, curr_offset, ref_offset;
+    int j;
+    int32 r0, r1, r2, r3, r4, r5;
+    int32 r13, r6;
+
+    p_cur = (uint32*)out; /* assume it's word aligned */
+    curr_offset = (outpitch - blkwidth) >> 2;
+    p_ref = in;
+    ref_offset = inpitch - blkwidth;
+
+    if (dx&1)
+    {
+        dx = ((dx >> 1) ? -3 : -4); /* use in 3/4 pel */
+        p_ref -= 2;
+        r13 = 0;
+        for (j = blkheight; j > 0; j--)
+        {
+            tmp = (uint32)(p_ref + blkwidth);
+            r0 = p_ref[0];
+            r1 = p_ref[2];
+            r0 |= (r1 << 16);           /* 0,c,0,a */
+            r1 = p_ref[1];
+            r2 = p_ref[3];
+            r1 |= (r2 << 16);           /* 0,d,0,b */
+            while ((uint32)p_ref < tmp)
+            {
+                r2 = *(p_ref += 4); /* move pointer to e */
+                r3 = p_ref[2];
+                r2 |= (r3 << 16);           /* 0,g,0,e */
+                r3 = p_ref[1];
+                r4 = p_ref[3];
+                r3 |= (r4 << 16);           /* 0,h,0,f */
+
+                r4 = r0 + r3;       /* c+h, a+f */
+                r5 = r0 + r1;   /* c+d, a+b */
+                r6 = r2 + r3;   /* g+h, e+f */
+                r5 >>= 16;
+                r5 |= (r6 << 16);   /* e+f, c+d */
+                r4 += r5 * 20;      /* c+20*e+20*f+h, a+20*c+20*d+f */
+                r4 += 0x100010; /* +16, +16 */
+                r5 = r1 + r2;       /* d+g, b+e */
+                r4 -= r5 * 5;       /* c-5*d+20*e+20*f-5*g+h, a-5*b+20*c+20*d-5*e+f */
+                r4 >>= 5;
+                r13 |= r4;      /* check clipping */
+
+                r5 = p_ref[dx+2];
+                r6 = p_ref[dx+4];
+                r5 |= (r6 << 16);
+                r4 += r5;
+                r4 += 0x10001;
+                r4 = (r4 >> 1) & 0xFF00FF;
+
+                r5 = p_ref[4];  /* i */
+                r6 = (r5 << 16);
+                r5 = r6 | (r2 >> 16);/* 0,i,0,g */
+                r5 += r1;       /* d+i, b+g */ /* r5 not free */
+                r1 >>= 16;
+                r1 |= (r3 << 16); /* 0,f,0,d */ /* r1 has changed */
+                r1 += r2;       /* f+g, d+e */
+                r5 += 20 * r1;  /* d+20f+20g+i, b+20d+20e+g */
+                r0 >>= 16;
+                r0 |= (r2 << 16); /* 0,e,0,c */ /* r0 has changed */
+                r0 += r3;       /* e+h, c+f */
+                r5 += 0x100010; /* 16,16 */
+                r5 -= r0 * 5;       /* d-5e+20f+20g-5h+i, b-5c+20d+20e-5f+g */
+                r5 >>= 5;
+                r13 |= r5;      /* check clipping */
+
+                r0 = p_ref[dx+3];
+                r1 = p_ref[dx+5];
+                r0 |= (r1 << 16);
+                r5 += r0;
+                r5 += 0x10001;
+                r5 = (r5 >> 1) & 0xFF00FF;
+
+                r4 |= (r5 << 8);    /* pack them together */
+                *p_cur++ = r4;
+                r1 = r3;
+                r0 = r2;
+            }
+            p_cur += curr_offset; /* move to the next line */
+            p_ref += ref_offset;  /*    ref_offset = inpitch-blkwidth; */
+
+            if (r13&0xFF000700) /* need clipping */
+            {
+                /* move back to the beginning of the line */
+                p_ref -= (ref_offset + blkwidth);   /* input */
+                p_cur -= (outpitch >> 2);
+
+                tmp = (uint32)(p_ref + blkwidth);
+                for (; (uint32)p_ref < tmp;)
+                {
+
+                    r0 = *p_ref++;
+                    r1 = *p_ref++;
+                    r2 = *p_ref++;
+                    r3 = *p_ref++;
+                    r4 = *p_ref++;
+                    /* first pixel */
+                    r5 = *p_ref++;
+                    result = (r0 + r5);
+                    r0 = (r1 + r4);
+                    result -= (r0 * 5);//result -= r0;  result -= (r0<<2);
+                    r0 = (r2 + r3);
+                    result += (r0 * 20);//result += (r0<<4);    result += (r0<<2);
+                    result = (result + 16) >> 5;
+                    CLIP_RESULT(result)
+                    /* 3/4 pel,  no need to clip */
+                    result = (result + p_ref[dx] + 1);
+                    pkres = (result >> 1) ;
+                    /* second pixel */
+                    r0 = *p_ref++;
+                    result = (r1 + r0);
+                    r1 = (r2 + r5);
+                    result -= (r1 * 5);//result -= r1;  result -= (r1<<2);
+                    r1 = (r3 + r4);
+                    result += (r1 * 20);//result += (r1<<4);    result += (r1<<2);
+                    result = (result + 16) >> 5;
+                    CLIP_RESULT(result)
+                    /* 3/4 pel,  no need to clip */
+                    result = (result + p_ref[dx] + 1);
+                    result = (result >> 1);
+                    pkres  |= (result << 8);
+                    /* third pixel */
+                    r1 = *p_ref++;
+                    result = (r2 + r1);
+                    r2 = (r3 + r0);
+                    result -= (r2 * 5);//result -= r2;  result -= (r2<<2);
+                    r2 = (r4 + r5);
+                    result += (r2 * 20);//result += (r2<<4);    result += (r2<<2);
+                    result = (result + 16) >> 5;
+                    CLIP_RESULT(result)
+                    /* 3/4 pel,  no need to clip */
+                    result = (result + p_ref[dx] + 1);
+                    result = (result >> 1);
+                    pkres  |= (result << 16);
+                    /* fourth pixel */
+                    r2 = *p_ref++;
+                    result = (r3 + r2);
+                    r3 = (r4 + r1);
+                    result -= (r3 * 5);//result -= r3;  result -= (r3<<2);
+                    r3 = (r5 + r0);
+                    result += (r3 * 20);//result += (r3<<4);    result += (r3<<2);
+                    result = (result + 16) >> 5;
+                    CLIP_RESULT(result)
+                    /* 3/4 pel,  no need to clip */
+                    result = (result + p_ref[dx] + 1);
+                    result = (result >> 1);
+                    pkres  |= (result << 24);
+                    *p_cur++ = pkres; /* write 4 pixels */
+                    p_ref -= 5;  /* offset back to the middle of filter */
+                }
+                p_cur += curr_offset;  /* move to the next line */
+                p_ref += ref_offset;    /* move to the next line */
+            }
+        }
+    }
+    else
+    {
+        p_ref -= 2;
+        r13 = 0;
+        for (j = blkheight; j > 0; j--)
+        {
+            tmp = (uint32)(p_ref + blkwidth);
+            r0 = p_ref[0];
+            r1 = p_ref[2];
+            r0 |= (r1 << 16);           /* 0,c,0,a */
+            r1 = p_ref[1];
+            r2 = p_ref[3];
+            r1 |= (r2 << 16);           /* 0,d,0,b */
+            while ((uint32)p_ref < tmp)
+            {
+                r2 = *(p_ref += 4); /* move pointer to e */
+                r3 = p_ref[2];
+                r2 |= (r3 << 16);           /* 0,g,0,e */
+                r3 = p_ref[1];
+                r4 = p_ref[3];
+                r3 |= (r4 << 16);           /* 0,h,0,f */
+
+                r4 = r0 + r3;       /* c+h, a+f */
+                r5 = r0 + r1;   /* c+d, a+b */
+                r6 = r2 + r3;   /* g+h, e+f */
+                r5 >>= 16;
+                r5 |= (r6 << 16);   /* e+f, c+d */
+                r4 += r5 * 20;      /* c+20*e+20*f+h, a+20*c+20*d+f */
+                r4 += 0x100010; /* +16, +16 */
+                r5 = r1 + r2;       /* d+g, b+e */
+                r4 -= r5 * 5;       /* c-5*d+20*e+20*f-5*g+h, a-5*b+20*c+20*d-5*e+f */
+                r4 >>= 5;
+                r13 |= r4;      /* check clipping */
+                r4 &= 0xFF00FF; /* mask */
+
+                r5 = p_ref[4];  /* i */
+                r6 = (r5 << 16);
+                r5 = r6 | (r2 >> 16);/* 0,i,0,g */
+                r5 += r1;       /* d+i, b+g */ /* r5 not free */
+                r1 >>= 16;
+                r1 |= (r3 << 16); /* 0,f,0,d */ /* r1 has changed */
+                r1 += r2;       /* f+g, d+e */
+                r5 += 20 * r1;  /* d+20f+20g+i, b+20d+20e+g */
+                r0 >>= 16;
+                r0 |= (r2 << 16); /* 0,e,0,c */ /* r0 has changed */
+                r0 += r3;       /* e+h, c+f */
+                r5 += 0x100010; /* 16,16 */
+                r5 -= r0 * 5;       /* d-5e+20f+20g-5h+i, b-5c+20d+20e-5f+g */
+                r5 >>= 5;
+                r13 |= r5;      /* check clipping */
+                r5 &= 0xFF00FF; /* mask */
+
+                r4 |= (r5 << 8);    /* pack them together */
+                *p_cur++ = r4;
+                r1 = r3;
+                r0 = r2;
+            }
+            p_cur += curr_offset; /* move to the next line */
+            p_ref += ref_offset;  /*    ref_offset = inpitch-blkwidth; */
+
+            if (r13&0xFF000700) /* need clipping */
+            {
+                /* move back to the beginning of the line */
+                p_ref -= (ref_offset + blkwidth);   /* input */
+                p_cur -= (outpitch >> 2);
+
+                tmp = (uint32)(p_ref + blkwidth);
+                for (; (uint32)p_ref < tmp;)
+                {
+
+                    r0 = *p_ref++;
+                    r1 = *p_ref++;
+                    r2 = *p_ref++;
+                    r3 = *p_ref++;
+                    r4 = *p_ref++;
+                    /* first pixel */
+                    r5 = *p_ref++;
+                    result = (r0 + r5);
+                    r0 = (r1 + r4);
+                    result -= (r0 * 5);//result -= r0;  result -= (r0<<2);
+                    r0 = (r2 + r3);
+                    result += (r0 * 20);//result += (r0<<4);    result += (r0<<2);
+                    result = (result + 16) >> 5;
+                    CLIP_RESULT(result)
+                    pkres  = result;
+                    /* second pixel */
+                    r0 = *p_ref++;
+                    result = (r1 + r0);
+                    r1 = (r2 + r5);
+                    result -= (r1 * 5);//result -= r1;  result -= (r1<<2);
+                    r1 = (r3 + r4);
+                    result += (r1 * 20);//result += (r1<<4);    result += (r1<<2);
+                    result = (result + 16) >> 5;
+                    CLIP_RESULT(result)
+                    pkres  |= (result << 8);
+                    /* third pixel */
+                    r1 = *p_ref++;
+                    result = (r2 + r1);
+                    r2 = (r3 + r0);
+                    result -= (r2 * 5);//result -= r2;  result -= (r2<<2);
+                    r2 = (r4 + r5);
+                    result += (r2 * 20);//result += (r2<<4);    result += (r2<<2);
+                    result = (result + 16) >> 5;
+                    CLIP_RESULT(result)
+                    pkres  |= (result << 16);
+                    /* fourth pixel */
+                    r2 = *p_ref++;
+                    result = (r3 + r2);
+                    r3 = (r4 + r1);
+                    result -= (r3 * 5);//result -= r3;  result -= (r3<<2);
+                    r3 = (r5 + r0);
+                    result += (r3 * 20);//result += (r3<<4);    result += (r3<<2);
+                    result = (result + 16) >> 5;
+                    CLIP_RESULT(result)
+                    pkres  |= (result << 24);
+                    *p_cur++ = pkres;   /* write 4 pixels */
+                    p_ref -= 5;
+                }
+                p_cur += curr_offset; /* move to the next line */
+                p_ref += ref_offset;
+            }
+        }
+    }
+
+    return ;
+}
+
+void eHorzInterp2MC(int *in, int inpitch, uint8 *out, int outpitch,
+                    int blkwidth, int blkheight, int dx)
+{
+    int *p_ref;
+    uint32 *p_cur;
+    uint32 tmp, pkres;
+    int result, result2, curr_offset, ref_offset;
+    int j, r0, r1, r2, r3, r4, r5;
+
+    p_cur = (uint32*)out; /* assume it's word aligned */
+    curr_offset = (outpitch - blkwidth) >> 2;
+    p_ref = in;
+    ref_offset = inpitch - blkwidth;
+
+    if (dx&1)
+    {
+        dx = ((dx >> 1) ? -3 : -4); /* use in 3/4 pel */
+
+        for (j = blkheight; j > 0 ; j--)
+        {
+            tmp = (uint32)(p_ref + blkwidth);
+            for (; (uint32)p_ref < tmp;)
+            {
+
+                r0 = p_ref[-2];
+                r1 = p_ref[-1];
+                r2 = *p_ref++;
+                r3 = *p_ref++;
+                r4 = *p_ref++;
+                /* first pixel */
+                r5 = *p_ref++;
+                result = (r0 + r5);
+                r0 = (r1 + r4);
+                result -= (r0 * 5);//result -= r0;  result -= (r0<<2);
+                r0 = (r2 + r3);
+                result += (r0 * 20);//result += (r0<<4);    result += (r0<<2);
+                result = (result + 512) >> 10;
+                CLIP_RESULT(result)
+                result2 = ((p_ref[dx] + 16) >> 5);
+                CLIP_RESULT(result2)
+                /* 3/4 pel,  no need to clip */
+                result = (result + result2 + 1);
+                pkres = (result >> 1);
+                /* second pixel */
+                r0 = *p_ref++;
+                result = (r1 + r0);
+                r1 = (r2 + r5);
+                result -= (r1 * 5);//result -= r1;  result -= (r1<<2);
+                r1 = (r3 + r4);
+                result += (r1 * 20);//result += (r1<<4);    result += (r1<<2);
+                result = (result + 512) >> 10;
+                CLIP_RESULT(result)
+                result2 = ((p_ref[dx] + 16) >> 5);
+                CLIP_RESULT(result2)
+                /* 3/4 pel,  no need to clip */
+                result = (result + result2 + 1);
+                result = (result >> 1);
+                pkres  |= (result << 8);
+                /* third pixel */
+                r1 = *p_ref++;
+                result = (r2 + r1);
+                r2 = (r3 + r0);
+                result -= (r2 * 5);//result -= r2;  result -= (r2<<2);
+                r2 = (r4 + r5);
+                result += (r2 * 20);//result += (r2<<4);    result += (r2<<2);
+                result = (result + 512) >> 10;
+                CLIP_RESULT(result)
+                result2 = ((p_ref[dx] + 16) >> 5);
+                CLIP_RESULT(result2)
+                /* 3/4 pel,  no need to clip */
+                result = (result + result2 + 1);
+                result = (result >> 1);
+                pkres  |= (result << 16);
+                /* fourth pixel */
+                r2 = *p_ref++;
+                result = (r3 + r2);
+                r3 = (r4 + r1);
+                result -= (r3 * 5);//result -= r3;  result -= (r3<<2);
+                r3 = (r5 + r0);
+                result += (r3 * 20);//result += (r3<<4);    result += (r3<<2);
+                result = (result + 512) >> 10;
+                CLIP_RESULT(result)
+                result2 = ((p_ref[dx] + 16) >> 5);
+                CLIP_RESULT(result2)
+                /* 3/4 pel,  no need to clip */
+                result = (result + result2 + 1);
+                result = (result >> 1);
+                pkres  |= (result << 24);
+                *p_cur++ = pkres; /* write 4 pixels */
+                p_ref -= 3;  /* offset back to the middle of filter */
+            }
+            p_cur += curr_offset;  /* move to the next line */
+            p_ref += ref_offset;    /* move to the next line */
+        }
+    }
+    else
+    {
+        for (j = blkheight; j > 0 ; j--)
+        {
+            tmp = (uint32)(p_ref + blkwidth);
+            for (; (uint32)p_ref < tmp;)
+            {
+
+                r0 = p_ref[-2];
+                r1 = p_ref[-1];
+                r2 = *p_ref++;
+                r3 = *p_ref++;
+                r4 = *p_ref++;
+                /* first pixel */
+                r5 = *p_ref++;
+                result = (r0 + r5);
+                r0 = (r1 + r4);
+                result -= (r0 * 5);//result -= r0;  result -= (r0<<2);
+                r0 = (r2 + r3);
+                result += (r0 * 20);//result += (r0<<4);    result += (r0<<2);
+                result = (result + 512) >> 10;
+                CLIP_RESULT(result)
+                pkres  = result;
+                /* second pixel */
+                r0 = *p_ref++;
+                result = (r1 + r0);
+                r1 = (r2 + r5);
+                result -= (r1 * 5);//result -= r1;  result -= (r1<<2);
+                r1 = (r3 + r4);
+                result += (r1 * 20);//result += (r1<<4);    result += (r1<<2);
+                result = (result + 512) >> 10;
+                CLIP_RESULT(result)
+                pkres  |= (result << 8);
+                /* third pixel */
+                r1 = *p_ref++;
+                result = (r2 + r1);
+                r2 = (r3 + r0);
+                result -= (r2 * 5);//result -= r2;  result -= (r2<<2);
+                r2 = (r4 + r5);
+                result += (r2 * 20);//result += (r2<<4);    result += (r2<<2);
+                result = (result + 512) >> 10;
+                CLIP_RESULT(result)
+                pkres  |= (result << 16);
+                /* fourth pixel */
+                r2 = *p_ref++;
+                result = (r3 + r2);
+                r3 = (r4 + r1);
+                result -= (r3 * 5);//result -= r3;  result -= (r3<<2);
+                r3 = (r5 + r0);
+                result += (r3 * 20);//result += (r3<<4);    result += (r3<<2);
+                result = (result + 512) >> 10;
+                CLIP_RESULT(result)
+                pkres  |= (result << 24);
+                *p_cur++ = pkres; /* write 4 pixels */
+                p_ref -= 3;  /* offset back to the middle of filter */
+            }
+            p_cur += curr_offset;  /* move to the next line */
+            p_ref += ref_offset;    /* move to the next line */
+        }
+    }
+
+    return ;
+}
+
+void eHorzInterp3MC(uint8 *in, int inpitch, int *out, int outpitch,
+                    int blkwidth, int blkheight)
+{
+    uint8 *p_ref;
+    int   *p_cur;
+    uint32 tmp;
+    int result, curr_offset, ref_offset;
+    int j, r0, r1, r2, r3, r4, r5;
+
+    p_cur = out;
+    curr_offset = (outpitch - blkwidth);
+    p_ref = in;
+    ref_offset = inpitch - blkwidth;
+
+    for (j = blkheight; j > 0 ; j--)
+    {
+        tmp = (uint32)(p_ref + blkwidth);
+        for (; (uint32)p_ref < tmp;)
+        {
+
+            r0 = p_ref[-2];
+            r1 = p_ref[-1];
+            r2 = *p_ref++;
+            r3 = *p_ref++;
+            r4 = *p_ref++;
+            /* first pixel */
+            r5 = *p_ref++;
+            result = (r0 + r5);
+            r0 = (r1 + r4);
+            result -= (r0 * 5);//result -= r0;  result -= (r0<<2);
+            r0 = (r2 + r3);
+            result += (r0 * 20);//result += (r0<<4);    result += (r0<<2);
+            *p_cur++ = result;
+            /* second pixel */
+            r0 = *p_ref++;
+            result = (r1 + r0);
+            r1 = (r2 + r5);
+            result -= (r1 * 5);//result -= r1;  result -= (r1<<2);
+            r1 = (r3 + r4);
+            result += (r1 * 20);//result += (r1<<4);    result += (r1<<2);
+            *p_cur++ = result;
+            /* third pixel */
+            r1 = *p_ref++;
+            result = (r2 + r1);
+            r2 = (r3 + r0);
+            result -= (r2 * 5);//result -= r2;  result -= (r2<<2);
+            r2 = (r4 + r5);
+            result += (r2 * 20);//result += (r2<<4);    result += (r2<<2);
+            *p_cur++ = result;
+            /* fourth pixel */
+            r2 = *p_ref++;
+            result = (r3 + r2);
+            r3 = (r4 + r1);
+            result -= (r3 * 5);//result -= r3;  result -= (r3<<2);
+            r3 = (r5 + r0);
+            result += (r3 * 20);//result += (r3<<4);    result += (r3<<2);
+            *p_cur++ = result;
+            p_ref -= 3; /* move back to the middle of the filter */
+        }
+        p_cur += curr_offset; /* move to the next line */
+        p_ref += ref_offset;
+    }
+
+    return ;
+}
+void eVertInterp1MC(uint8 *in, int inpitch, uint8 *out, int outpitch,
+                    int blkwidth, int blkheight, int dy)
+{
+    uint8 *p_cur, *p_ref;
+    uint32 tmp;
+    int result, curr_offset, ref_offset;
+    int j, i;
+    int32 r0, r1, r2, r3, r4, r5, r6, r7, r8, r13;
+    uint8  tmp_in[24][24];
+
+    /* not word-aligned */
+    if (((uint32)in)&0x3)
+    {
+        eCreateAlign(in, inpitch, -2, &tmp_in[0][0], blkwidth, blkheight + 5);
+        in = &tmp_in[2][0];
+        inpitch = 24;
+    }
+    p_cur = out;
+    curr_offset = 1 - outpitch * (blkheight - 1); /* offset vertically back up and one pixel to right */
+    ref_offset = blkheight * inpitch; /* for limit */
+
+    curr_offset += 3;
+
+    if (dy&1)
+    {
+        dy = (dy >> 1) ? 0 : -inpitch;
+
+        for (j = 0; j < blkwidth; j += 4, in += 4)
+        {
+            r13 = 0;
+            p_ref = in;
+            p_cur -= outpitch;  /* compensate for the first offset */
+            tmp = (uint32)(p_ref + ref_offset); /* limit */
+            while ((uint32)p_ref < tmp)  /* the loop un-rolled  */
+            {
+                r0 = *((uint32*)(p_ref - (inpitch << 1))); /* load 4 bytes */
+                p_ref += inpitch;
+                r6 = (r0 >> 8) & 0xFF00FF; /* second and fourth byte */
+                r0 &= 0xFF00FF;
+
+                r1 = *((uint32*)(p_ref + (inpitch << 1)));  /* r1, r7, ref[3] */
+                r7 = (r1 >> 8) & 0xFF00FF;
+                r1 &= 0xFF00FF;
+
+                r0 += r1;
+                r6 += r7;
+
+                r2 = *((uint32*)p_ref); /* r2, r8, ref[1] */
+                r8 = (r2 >> 8) & 0xFF00FF;
+                r2 &= 0xFF00FF;
+
+                r1 = *((uint32*)(p_ref - inpitch)); /* r1, r7, ref[0] */
+                r7 = (r1 >> 8) & 0xFF00FF;
+                r1 &= 0xFF00FF;
+                r1 += r2;
+
+                r7 += r8;
+
+                r0 += 20 * r1;
+                r6 += 20 * r7;
+                r0 += 0x100010;
+                r6 += 0x100010;
+
+                r2 = *((uint32*)(p_ref - (inpitch << 1))); /* r2, r8, ref[-1] */
+                r8 = (r2 >> 8) & 0xFF00FF;
+                r2 &= 0xFF00FF;
+
+                r1 = *((uint32*)(p_ref + inpitch)); /* r1, r7, ref[2] */
+                r7 = (r1 >> 8) & 0xFF00FF;
+                r1 &= 0xFF00FF;
+                r1 += r2;
+
+                r7 += r8;
+
+                r0 -= 5 * r1;
+                r6 -= 5 * r7;
+
+                r0 >>= 5;
+                r6 >>= 5;
+                /* clip */
+                r13 |= r6;
+                r13 |= r0;
+                //CLIPPACK(r6,result)
+
+                r1 = *((uint32*)(p_ref + dy));
+                r2 = (r1 >> 8) & 0xFF00FF;
+                r1 &= 0xFF00FF;
+                r0 += r1;
+                r6 += r2;
+                r0 += 0x10001;
+                r6 += 0x10001;
+                r0 = (r0 >> 1) & 0xFF00FF;
+                r6 = (r6 >> 1) & 0xFF00FF;
+
+                r0 |= (r6 << 8);  /* pack it back */
+                *((uint32*)(p_cur += outpitch)) = r0;
+            }
+            p_cur += curr_offset; /* offset to the next pixel */
+            if (r13 & 0xFF000700) /* this column need clipping */
+            {
+                p_cur -= 4;
+                for (i = 0; i < 4; i++)
+                {
+                    p_ref = in + i;
+                    p_cur -= outpitch;  /* compensate for the first offset */
+
+                    tmp = (uint32)(p_ref + ref_offset); /* limit */
+                    while ((uint32)p_ref < tmp)
+                    {                           /* loop un-rolled */
+                        r0 = *(p_ref - (inpitch << 1));
+                        r1 = *(p_ref - inpitch);
+                        r2 = *p_ref;
+                        r3 = *(p_ref += inpitch);  /* modify pointer before loading */
+                        r4 = *(p_ref += inpitch);
+                        /* first pixel */
+                        r5 = *(p_ref += inpitch);
+                        result = (r0 + r5);
+                        r0 = (r1 + r4);
+                        result -= (r0 * 5);//result -= r0;  result -= (r0<<2);
+                        r0 = (r2 + r3);
+                        result += (r0 * 20);//result += (r0<<4);    result += (r0<<2);
+                        result = (result + 16) >> 5;
+                        CLIP_RESULT(result)
+                        /* 3/4 pel,  no need to clip */
+                        result = (result + p_ref[dy-(inpitch<<1)] + 1);
+                        result = (result >> 1);
+                        *(p_cur += outpitch) = result;
+                        /* second pixel */
+                        r0 = *(p_ref += inpitch);
+                        result = (r1 + r0);
+                        r1 = (r2 + r5);
+                        result -= (r1 * 5);//result -= r1;  result -= (r1<<2);
+                        r1 = (r3 + r4);
+                        result += (r1 * 20);//result += (r1<<4);    result += (r1<<2);
+                        result = (result + 16) >> 5;
+                        CLIP_RESULT(result)
+                        /* 3/4 pel,  no need to clip */
+                        result = (result + p_ref[dy-(inpitch<<1)] + 1);
+                        result = (result >> 1);
+                        *(p_cur += outpitch) = result;
+                        /* third pixel */
+                        r1 = *(p_ref += inpitch);
+                        result = (r2 + r1);
+                        r2 = (r3 + r0);
+                        result -= (r2 * 5);//result -= r2;  result -= (r2<<2);
+                        r2 = (r4 + r5);
+                        result += (r2 * 20);//result += (r2<<4);    result += (r2<<2);
+                        result = (result + 16) >> 5;
+                        CLIP_RESULT(result)
+                        /* 3/4 pel,  no need to clip */
+                        result = (result + p_ref[dy-(inpitch<<1)] + 1);
+                        result = (result >> 1);
+                        *(p_cur += outpitch) = result;
+                        /* fourth pixel */
+                        r2 = *(p_ref += inpitch);
+                        result = (r3 + r2);
+                        r3 = (r4 + r1);
+                        result -= (r3 * 5);//result -= r3;  result -= (r3<<2);
+                        r3 = (r5 + r0);
+                        result += (r3 * 20);//result += (r3<<4);    result += (r3<<2);
+                        result = (result + 16) >> 5;
+                        CLIP_RESULT(result)
+                        /* 3/4 pel,  no need to clip */
+                        result = (result + p_ref[dy-(inpitch<<1)] + 1);
+                        result = (result >> 1);
+                        *(p_cur += outpitch) = result;
+                        p_ref -= (inpitch << 1);  /* move back to center of the filter of the next one */
+                    }
+                    p_cur += (curr_offset - 3);
+                }
+            }
+        }
+    }
+    else
+    {
+        for (j = 0; j < blkwidth; j += 4, in += 4)
+        {
+            r13 = 0;
+            p_ref = in;
+            p_cur -= outpitch;  /* compensate for the first offset */
+            tmp = (uint32)(p_ref + ref_offset); /* limit */
+            while ((uint32)p_ref < tmp)  /* the loop un-rolled  */
+            {
+                r0 = *((uint32*)(p_ref - (inpitch << 1))); /* load 4 bytes */
+                p_ref += inpitch;
+                r6 = (r0 >> 8) & 0xFF00FF; /* second and fourth byte */
+                r0 &= 0xFF00FF;
+
+                r1 = *((uint32*)(p_ref + (inpitch << 1)));  /* r1, r7, ref[3] */
+                r7 = (r1 >> 8) & 0xFF00FF;
+                r1 &= 0xFF00FF;
+
+                r0 += r1;
+                r6 += r7;
+
+                r2 = *((uint32*)p_ref); /* r2, r8, ref[1] */
+                r8 = (r2 >> 8) & 0xFF00FF;
+                r2 &= 0xFF00FF;
+
+                r1 = *((uint32*)(p_ref - inpitch)); /* r1, r7, ref[0] */
+                r7 = (r1 >> 8) & 0xFF00FF;
+                r1 &= 0xFF00FF;
+                r1 += r2;
+
+                r7 += r8;
+
+                r0 += 20 * r1;
+                r6 += 20 * r7;
+                r0 += 0x100010;
+                r6 += 0x100010;
+
+                r2 = *((uint32*)(p_ref - (inpitch << 1))); /* r2, r8, ref[-1] */
+                r8 = (r2 >> 8) & 0xFF00FF;
+                r2 &= 0xFF00FF;
+
+                r1 = *((uint32*)(p_ref + inpitch)); /* r1, r7, ref[2] */
+                r7 = (r1 >> 8) & 0xFF00FF;
+                r1 &= 0xFF00FF;
+                r1 += r2;
+
+                r7 += r8;
+
+                r0 -= 5 * r1;
+                r6 -= 5 * r7;
+
+                r0 >>= 5;
+                r6 >>= 5;
+                /* clip */
+                r13 |= r6;
+                r13 |= r0;
+                //CLIPPACK(r6,result)
+                r0 &= 0xFF00FF;
+                r6 &= 0xFF00FF;
+                r0 |= (r6 << 8);  /* pack it back */
+                *((uint32*)(p_cur += outpitch)) = r0;
+            }
+            p_cur += curr_offset; /* offset to the next pixel */
+            if (r13 & 0xFF000700) /* this column need clipping */
+            {
+                p_cur -= 4;
+                for (i = 0; i < 4; i++)
+                {
+                    p_ref = in + i;
+                    p_cur -= outpitch;  /* compensate for the first offset */
+                    tmp = (uint32)(p_ref + ref_offset); /* limit */
+                    while ((uint32)p_ref < tmp)
+                    {                           /* loop un-rolled */
+                        r0 = *(p_ref - (inpitch << 1));
+                        r1 = *(p_ref - inpitch);
+                        r2 = *p_ref;
+                        r3 = *(p_ref += inpitch);  /* modify pointer before loading */
+                        r4 = *(p_ref += inpitch);
+                        /* first pixel */
+                        r5 = *(p_ref += inpitch);
+                        result = (r0 + r5);
+                        r0 = (r1 + r4);
+                        result -= (r0 * 5);//result -= r0;  result -= (r0<<2);
+                        r0 = (r2 + r3);
+                        result += (r0 * 20);//result += (r0<<4);    result += (r0<<2);
+                        result = (result + 16) >> 5;
+                        CLIP_RESULT(result)
+                        *(p_cur += outpitch) = result;
+                        /* second pixel */
+                        r0 = *(p_ref += inpitch);
+                        result = (r1 + r0);
+                        r1 = (r2 + r5);
+                        result -= (r1 * 5);//result -= r1;  result -= (r1<<2);
+                        r1 = (r3 + r4);
+                        result += (r1 * 20);//result += (r1<<4);    result += (r1<<2);
+                        result = (result + 16) >> 5;
+                        CLIP_RESULT(result)
+                        *(p_cur += outpitch) = result;
+                        /* third pixel */
+                        r1 = *(p_ref += inpitch);
+                        result = (r2 + r1);
+                        r2 = (r3 + r0);
+                        result -= (r2 * 5);//result -= r2;  result -= (r2<<2);
+                        r2 = (r4 + r5);
+                        result += (r2 * 20);//result += (r2<<4);    result += (r2<<2);
+                        result = (result + 16) >> 5;
+                        CLIP_RESULT(result)
+                        *(p_cur += outpitch) = result;
+                        /* fourth pixel */
+                        r2 = *(p_ref += inpitch);
+                        result = (r3 + r2);
+                        r3 = (r4 + r1);
+                        result -= (r3 * 5);//result -= r3;  result -= (r3<<2);
+                        r3 = (r5 + r0);
+                        result += (r3 * 20);//result += (r3<<4);    result += (r3<<2);
+                        result = (result + 16) >> 5;
+                        CLIP_RESULT(result)
+                        *(p_cur += outpitch) = result;
+                        p_ref -= (inpitch << 1);  /* move back to center of the filter of the next one */
+                    }
+                    p_cur += (curr_offset - 3);
+                }
+            }
+        }
+    }
+
+    return ;
+}
+
+void eVertInterp2MC(uint8 *in, int inpitch, int *out, int outpitch,
+                    int blkwidth, int blkheight)
+{
+    int *p_cur;
+    uint8 *p_ref;
+    uint32 tmp;
+    int result, curr_offset, ref_offset;
+    int j, r0, r1, r2, r3, r4, r5;
+
+    p_cur = out;
+    curr_offset = 1 - outpitch * (blkheight - 1); /* offset vertically back up and one pixel to right */
+    ref_offset = blkheight * inpitch; /* for limit */
+
+    for (j = 0; j < blkwidth; j++)
+    {
+        p_cur -= outpitch; /* compensate for the first offset */
+        p_ref = in++;
+
+        tmp = (uint32)(p_ref + ref_offset); /* limit */
+        while ((uint32)p_ref < tmp)
+        {                           /* loop un-rolled */
+            r0 = *(p_ref - (inpitch << 1));
+            r1 = *(p_ref - inpitch);
+            r2 = *p_ref;
+            r3 = *(p_ref += inpitch);  /* modify pointer before loading */
+            r4 = *(p_ref += inpitch);
+            /* first pixel */
+            r5 = *(p_ref += inpitch);
+            result = (r0 + r5);
+            r0 = (r1 + r4);
+            result -= (r0 * 5);//result -= r0;  result -= (r0<<2);
+            r0 = (r2 + r3);
+            result += (r0 * 20);//result += (r0<<4);    result += (r0<<2);
+            *(p_cur += outpitch) = result;
+            /* second pixel */
+            r0 = *(p_ref += inpitch);
+            result = (r1 + r0);
+            r1 = (r2 + r5);
+            result -= (r1 * 5);//result -= r1;  result -= (r1<<2);
+            r1 = (r3 + r4);
+            result += (r1 * 20);//result += (r1<<4);    result += (r1<<2);
+            *(p_cur += outpitch) = result;
+            /* third pixel */
+            r1 = *(p_ref += inpitch);
+            result = (r2 + r1);
+            r2 = (r3 + r0);
+            result -= (r2 * 5);//result -= r2;  result -= (r2<<2);
+            r2 = (r4 + r5);
+            result += (r2 * 20);//result += (r2<<4);    result += (r2<<2);
+            *(p_cur += outpitch) = result;
+            /* fourth pixel */
+            r2 = *(p_ref += inpitch);
+            result = (r3 + r2);
+            r3 = (r4 + r1);
+            result -= (r3 * 5);//result -= r3;  result -= (r3<<2);
+            r3 = (r5 + r0);
+            result += (r3 * 20);//result += (r3<<4);    result += (r3<<2);
+            *(p_cur += outpitch) = result;
+            p_ref -= (inpitch << 1);  /* move back to center of the filter of the next one */
+        }
+        p_cur += curr_offset;
+    }
+
+    return ;
+}
+
+void eVertInterp3MC(int *in, int inpitch, uint8 *out, int outpitch,
+                    int blkwidth, int blkheight, int dy)
+{
+    uint8 *p_cur;
+    int *p_ref;
+    uint32 tmp;
+    int result, result2, curr_offset, ref_offset;
+    int j, r0, r1, r2, r3, r4, r5;
+
+    p_cur = out;
+    curr_offset = 1 - outpitch * (blkheight - 1); /* offset vertically back up and one pixel to right */
+    ref_offset = blkheight * inpitch; /* for limit */
+
+    if (dy&1)
+    {
+        dy = (dy >> 1) ? -(inpitch << 1) : -(inpitch << 1) - inpitch;
+
+        for (j = 0; j < blkwidth; j++)
+        {
+            p_cur -= outpitch; /* compensate for the first offset */
+            p_ref = in++;
+
+            tmp = (uint32)(p_ref + ref_offset); /* limit */
+            while ((uint32)p_ref < tmp)
+            {                           /* loop un-rolled */
+                r0 = *(p_ref - (inpitch << 1));
+                r1 = *(p_ref - inpitch);
+                r2 = *p_ref;
+                r3 = *(p_ref += inpitch);  /* modify pointer before loading */
+                r4 = *(p_ref += inpitch);
+                /* first pixel */
+                r5 = *(p_ref += inpitch);
+                result = (r0 + r5);
+                r0 = (r1 + r4);
+                result -= (r0 * 5);//result -= r0;  result -= (r0<<2);
+                r0 = (r2 + r3);
+                result += (r0 * 20);//result += (r0<<4);    result += (r0<<2);
+                result = (result + 512) >> 10;
+                CLIP_RESULT(result)
+                result2 = ((p_ref[dy] + 16) >> 5);
+                CLIP_RESULT(result2)
+                /* 3/4 pel,  no need to clip */
+                result = (result + result2 + 1);
+                result = (result >> 1);
+                *(p_cur += outpitch) = result;
+                /* second pixel */
+                r0 = *(p_ref += inpitch);
+                result = (r1 + r0);
+                r1 = (r2 + r5);
+                result -= (r1 * 5);//result -= r1;  result -= (r1<<2);
+                r1 = (r3 + r4);
+                result += (r1 * 20);//result += (r1<<4);    result += (r1<<2);
+                result = (result + 512) >> 10;
+                CLIP_RESULT(result)
+                result2 = ((p_ref[dy] + 16) >> 5);
+                CLIP_RESULT(result2)
+                /* 3/4 pel,  no need to clip */
+                result = (result + result2 + 1);
+                result = (result >> 1);
+                *(p_cur += outpitch) = result;
+                /* third pixel */
+                r1 = *(p_ref += inpitch);
+                result = (r2 + r1);
+                r2 = (r3 + r0);
+                result -= (r2 * 5);//result -= r2;  result -= (r2<<2);
+                r2 = (r4 + r5);
+                result += (r2 * 20);//result += (r2<<4);    result += (r2<<2);
+                result = (result + 512) >> 10;
+                CLIP_RESULT(result)
+                result2 = ((p_ref[dy] + 16) >> 5);
+                CLIP_RESULT(result2)
+                /* 3/4 pel,  no need to clip */
+                result = (result + result2 + 1);
+                result = (result >> 1);
+                *(p_cur += outpitch) = result;
+                /* fourth pixel */
+                r2 = *(p_ref += inpitch);
+                result = (r3 + r2);
+                r3 = (r4 + r1);
+                result -= (r3 * 5);//result -= r3;  result -= (r3<<2);
+                r3 = (r5 + r0);
+                result += (r3 * 20);//result += (r3<<4);    result += (r3<<2);
+                result = (result + 512) >> 10;
+                CLIP_RESULT(result)
+                result2 = ((p_ref[dy] + 16) >> 5);
+                CLIP_RESULT(result2)
+                /* 3/4 pel,  no need to clip */
+                result = (result + result2 + 1);
+                result = (result >> 1);
+                *(p_cur += outpitch) = result;
+                p_ref -= (inpitch << 1);  /* move back to center of the filter of the next one */
+            }
+            p_cur += curr_offset;
+        }
+    }
+    else
+    {
+        for (j = 0; j < blkwidth; j++)
+        {
+            p_cur -= outpitch; /* compensate for the first offset */
+            p_ref = in++;
+
+            tmp = (uint32)(p_ref + ref_offset); /* limit */
+            while ((uint32)p_ref < tmp)
+            {                           /* loop un-rolled */
+                r0 = *(p_ref - (inpitch << 1));
+                r1 = *(p_ref - inpitch);
+                r2 = *p_ref;
+                r3 = *(p_ref += inpitch);  /* modify pointer before loading */
+                r4 = *(p_ref += inpitch);
+                /* first pixel */
+                r5 = *(p_ref += inpitch);
+                result = (r0 + r5);
+                r0 = (r1 + r4);
+                result -= (r0 * 5);//result -= r0;  result -= (r0<<2);
+                r0 = (r2 + r3);
+                result += (r0 * 20);//result += (r0<<4);    result += (r0<<2);
+                result = (result + 512) >> 10;
+                CLIP_RESULT(result)
+                *(p_cur += outpitch) = result;
+                /* second pixel */
+                r0 = *(p_ref += inpitch);
+                result = (r1 + r0);
+                r1 = (r2 + r5);
+                result -= (r1 * 5);//result -= r1;  result -= (r1<<2);
+                r1 = (r3 + r4);
+                result += (r1 * 20);//result += (r1<<4);    result += (r1<<2);
+                result = (result + 512) >> 10;
+                CLIP_RESULT(result)
+                *(p_cur += outpitch) = result;
+                /* third pixel */
+                r1 = *(p_ref += inpitch);
+                result = (r2 + r1);
+                r2 = (r3 + r0);
+                result -= (r2 * 5);//result -= r2;  result -= (r2<<2);
+                r2 = (r4 + r5);
+                result += (r2 * 20);//result += (r2<<4);    result += (r2<<2);
+                result = (result + 512) >> 10;
+                CLIP_RESULT(result)
+                *(p_cur += outpitch) = result;
+                /* fourth pixel */
+                r2 = *(p_ref += inpitch);
+                result = (r3 + r2);
+                r3 = (r4 + r1);
+                result -= (r3 * 5);//result -= r3;  result -= (r3<<2);
+                r3 = (r5 + r0);
+                result += (r3 * 20);//result += (r3<<4);    result += (r3<<2);
+                result = (result + 512) >> 10;
+                CLIP_RESULT(result)
+                *(p_cur += outpitch) = result;
+                p_ref -= (inpitch << 1);  /* move back to center of the filter of the next one */
+            }
+            p_cur += curr_offset;
+        }
+    }
+
+    return ;
+}
+
+void eDiagonalInterpMC(uint8 *in1, uint8 *in2, int inpitch,
+                       uint8 *out, int outpitch,
+                       int blkwidth, int blkheight)
+{
+    int j, i;
+    int result;
+    uint8 *p_cur, *p_ref, *p_tmp8;
+    int curr_offset, ref_offset;
+    uint8 tmp_res[24][24], tmp_in[24][24];
+    uint32 *p_tmp;
+    uint32 tmp, pkres, tmp_result;
+    int32 r0, r1, r2, r3, r4, r5;
+    int32 r6, r7, r8, r9, r10, r13;
+
+    ref_offset = inpitch - blkwidth;
+    p_ref = in1 - 2;
+    /* perform horizontal interpolation */
+    /* not word-aligned */
+    /* It is faster to read 1 byte at time to avoid calling CreateAlign */
+    /*  if(((uint32)p_ref)&0x3)
+        {
+            CreateAlign(p_ref,inpitch,0,&tmp_in[0][0],blkwidth+8,blkheight);
+            p_ref = &tmp_in[0][0];
+            ref_offset = 24-blkwidth;
+        }*/
+
+    p_tmp = (uint32*) & (tmp_res[0][0]);
+    for (j = blkheight; j > 0; j--)
+    {
+        r13 = 0;
+        tmp = (uint32)(p_ref + blkwidth);
+
+        //r0 = *((uint32*)p_ref);   /* d,c,b,a */
+        //r1 = (r0>>8)&0xFF00FF;    /* 0,d,0,b */
+        //r0 &= 0xFF00FF;           /* 0,c,0,a */
+        /* It is faster to read 1 byte at a time */
+        r0 = p_ref[0];
+        r1 = p_ref[2];
+        r0 |= (r1 << 16);           /* 0,c,0,a */
+        r1 = p_ref[1];
+        r2 = p_ref[3];
+        r1 |= (r2 << 16);           /* 0,d,0,b */
+
+        while ((uint32)p_ref < tmp)
+        {
+            //r2 = *((uint32*)(p_ref+=4));/* h,g,f,e */
+            //r3 = (r2>>8)&0xFF00FF;  /* 0,h,0,f */
+            //r2 &= 0xFF00FF;           /* 0,g,0,e */
+            /* It is faster to read 1 byte at a time */
+            r2 = *(p_ref += 4);
+            r3 = p_ref[2];
+            r2 |= (r3 << 16);           /* 0,g,0,e */
+            r3 = p_ref[1];
+            r4 = p_ref[3];
+            r3 |= (r4 << 16);           /* 0,h,0,f */
+
+            r4 = r0 + r3;       /* c+h, a+f */
+            r5 = r0 + r1;   /* c+d, a+b */
+            r6 = r2 + r3;   /* g+h, e+f */
+            r5 >>= 16;
+            r5 |= (r6 << 16);   /* e+f, c+d */
+            r4 += r5 * 20;      /* c+20*e+20*f+h, a+20*c+20*d+f */
+            r4 += 0x100010; /* +16, +16 */
+            r5 = r1 + r2;       /* d+g, b+e */
+            r4 -= r5 * 5;       /* c-5*d+20*e+20*f-5*g+h, a-5*b+20*c+20*d-5*e+f */
+            r4 >>= 5;
+            r13 |= r4;      /* check clipping */
+            r4 &= 0xFF00FF; /* mask */
+
+            r5 = p_ref[4];  /* i */
+            r6 = (r5 << 16);
+            r5 = r6 | (r2 >> 16);/* 0,i,0,g */
+            r5 += r1;       /* d+i, b+g */ /* r5 not free */
+            r1 >>= 16;
+            r1 |= (r3 << 16); /* 0,f,0,d */ /* r1 has changed */
+            r1 += r2;       /* f+g, d+e */
+            r5 += 20 * r1;  /* d+20f+20g+i, b+20d+20e+g */
+            r0 >>= 16;
+            r0 |= (r2 << 16); /* 0,e,0,c */ /* r0 has changed */
+            r0 += r3;       /* e+h, c+f */
+            r5 += 0x100010; /* 16,16 */
+            r5 -= r0 * 5;       /* d-5e+20f+20g-5h+i, b-5c+20d+20e-5f+g */
+            r5 >>= 5;
+            r13 |= r5;      /* check clipping */
+            r5 &= 0xFF00FF; /* mask */
+
+            r4 |= (r5 << 8);    /* pack them together */
+            *p_tmp++ = r4;
+            r1 = r3;
+            r0 = r2;
+        }
+        p_tmp += ((24 - blkwidth) >> 2); /* move to the next line */
+        p_ref += ref_offset;  /*    ref_offset = inpitch-blkwidth; */
+
+        if (r13&0xFF000700) /* need clipping */
+        {
+            /* move back to the beginning of the line */
+            p_ref -= (ref_offset + blkwidth);   /* input */
+            p_tmp -= 6; /* intermediate output */
+            tmp = (uint32)(p_ref + blkwidth);
+            while ((uint32)p_ref < tmp)
+            {
+                r0 = *p_ref++;
+                r1 = *p_ref++;
+                r2 = *p_ref++;
+                r3 = *p_ref++;
+                r4 = *p_ref++;
+                /* first pixel */
+                r5 = *p_ref++;
+                result = (r0 + r5);
+                r0 = (r1 + r4);
+                result -= (r0 * 5);//result -= r0;  result -= (r0<<2);
+                r0 = (r2 + r3);
+                result += (r0 * 20);//result += (r0<<4);    result += (r0<<2);
+                result = (result + 16) >> 5;
+                CLIP_RESULT(result)
+                pkres = result;
+                /* second pixel */
+                r0 = *p_ref++;
+                result = (r1 + r0);
+                r1 = (r2 + r5);
+                result -= (r1 * 5);//result -= r1;  result -= (r1<<2);
+                r1 = (r3 + r4);
+                result += (r1 * 20);//result += (r1<<4);    result += (r1<<2);
+                result = (result + 16) >> 5;
+                CLIP_RESULT(result)
+                pkres |= (result << 8);
+                /* third pixel */
+                r1 = *p_ref++;
+                result = (r2 + r1);
+                r2 = (r3 + r0);
+                result -= (r2 * 5);//result -= r2;  result -= (r2<<2);
+                r2 = (r4 + r5);
+                result += (r2 * 20);//result += (r2<<4);    result += (r2<<2);
+                result = (result + 16) >> 5;
+                CLIP_RESULT(result)
+                pkres |= (result << 16);
+                /* fourth pixel */
+                r2 = *p_ref++;
+                result = (r3 + r2);
+                r3 = (r4 + r1);
+                result -= (r3 * 5);//result -= r3;  result -= (r3<<2);
+                r3 = (r5 + r0);
+                result += (r3 * 20);//result += (r3<<4);    result += (r3<<2);
+                result = (result + 16) >> 5;
+                CLIP_RESULT(result)
+                pkres |= (result << 24);
+
+                *p_tmp++ = pkres; /* write 4 pixel */
+                p_ref -= 5;
+            }
+            p_tmp += ((24 - blkwidth) >> 2); /* move to the next line */
+            p_ref += ref_offset;  /*    ref_offset = inpitch-blkwidth; */
+        }
+    }
+
+    /*  perform vertical interpolation */
+    /* not word-aligned */
+    if (((uint32)in2)&0x3)
+    {
+        eCreateAlign(in2, inpitch, -2, &tmp_in[0][0], blkwidth, blkheight + 5);
+        in2 = &tmp_in[2][0];
+        inpitch = 24;
+    }
+
+    p_cur = out;
+    curr_offset = 1 - outpitch * (blkheight - 1); /* offset vertically up and one pixel right */
+    pkres = blkheight * inpitch; /* reuse it for limit */
+
+    curr_offset += 3;
+
+    for (j = 0; j < blkwidth; j += 4, in2 += 4)
+    {
+        r13 = 0;
+        p_ref = in2;
+        p_tmp8 = &(tmp_res[0][j]); /* intermediate result */
+        p_tmp8 -= 24;  /* compensate for the first offset */
+        p_cur -= outpitch;  /* compensate for the first offset */
+        tmp = (uint32)(p_ref + pkres); /* limit */
+        while ((uint32)p_ref < tmp)  /* the loop un-rolled  */
+        {
+            /* Read 1 byte at a time is too slow, too many read and pack ops, need to call CreateAlign */
+            /*p_ref8 = p_ref-(inpitch<<1);          r0 = p_ref8[0];         r1 = p_ref8[2];
+            r0 |= (r1<<16);         r6 = p_ref8[1];         r1 = p_ref8[3];
+            r6 |= (r1<<16);         p_ref+=inpitch; */
+            r0 = *((uint32*)(p_ref - (inpitch << 1))); /* load 4 bytes */
+            p_ref += inpitch;
+            r6 = (r0 >> 8) & 0xFF00FF; /* second and fourth byte */
+            r0 &= 0xFF00FF;
+
+            /*p_ref8 = p_ref+(inpitch<<1);
+            r1 = p_ref8[0];         r7 = p_ref8[2];         r1 |= (r7<<16);
+            r7 = p_ref8[1];         r2 = p_ref8[3];         r7 |= (r2<<16);*/
+            r1 = *((uint32*)(p_ref + (inpitch << 1)));  /* r1, r7, ref[3] */
+            r7 = (r1 >> 8) & 0xFF00FF;
+            r1 &= 0xFF00FF;
+
+            r0 += r1;
+            r6 += r7;
+
+            /*r2 = p_ref[0];            r8 = p_ref[2];          r2 |= (r8<<16);
+            r8 = p_ref[1];          r1 = p_ref[3];          r8 |= (r1<<16);*/
+            r2 = *((uint32*)p_ref); /* r2, r8, ref[1] */
+            r8 = (r2 >> 8) & 0xFF00FF;
+            r2 &= 0xFF00FF;
+
+            /*p_ref8 = p_ref-inpitch;           r1 = p_ref8[0];         r7 = p_ref8[2];
+            r1 |= (r7<<16);         r1 += r2;           r7 = p_ref8[1];
+            r2 = p_ref8[3];         r7 |= (r2<<16);*/
+            r1 = *((uint32*)(p_ref - inpitch)); /* r1, r7, ref[0] */
+            r7 = (r1 >> 8) & 0xFF00FF;
+            r1 &= 0xFF00FF;
+            r1 += r2;
+
+            r7 += r8;
+
+            r0 += 20 * r1;
+            r6 += 20 * r7;
+            r0 += 0x100010;
+            r6 += 0x100010;
+
+            /*p_ref8 = p_ref-(inpitch<<1);          r2 = p_ref8[0];         r8 = p_ref8[2];
+            r2 |= (r8<<16);         r8 = p_ref8[1];         r1 = p_ref8[3];         r8 |= (r1<<16);*/
+            r2 = *((uint32*)(p_ref - (inpitch << 1))); /* r2, r8, ref[-1] */
+            r8 = (r2 >> 8) & 0xFF00FF;
+            r2 &= 0xFF00FF;
+
+            /*p_ref8 = p_ref+inpitch;           r1 = p_ref8[0];         r7 = p_ref8[2];
+            r1 |= (r7<<16);         r1 += r2;           r7 = p_ref8[1];
+            r2 = p_ref8[3];         r7 |= (r2<<16);*/
+            r1 = *((uint32*)(p_ref + inpitch)); /* r1, r7, ref[2] */
+            r7 = (r1 >> 8) & 0xFF00FF;
+            r1 &= 0xFF00FF;
+            r1 += r2;
+
+            r7 += r8;
+
+            r0 -= 5 * r1;
+            r6 -= 5 * r7;
+
+            r0 >>= 5;
+            r6 >>= 5;
+            /* clip */
+            r13 |= r6;
+            r13 |= r0;
+            //CLIPPACK(r6,result)
+            /* add with horizontal results */
+            r10 = *((uint32*)(p_tmp8 += 24));
+            r9 = (r10 >> 8) & 0xFF00FF;
+            r10 &= 0xFF00FF;
+
+            r0 += r10;
+            r0 += 0x10001;
+            r0 = (r0 >> 1) & 0xFF00FF;   /* mask to 8 bytes */
+
+            r6 += r9;
+            r6 += 0x10001;
+            r6 = (r6 >> 1) & 0xFF00FF;   /* mask to 8 bytes */
+
+            r0 |= (r6 << 8);  /* pack it back */
+            *((uint32*)(p_cur += outpitch)) = r0;
+        }
+        p_cur += curr_offset; /* offset to the next pixel */
+        if (r13 & 0xFF000700) /* this column need clipping */
+        {
+            p_cur -= 4;
+            for (i = 0; i < 4; i++)
+            {
+                p_ref = in2 + i;
+                p_tmp8 = &(tmp_res[0][j+i]); /* intermediate result */
+                p_tmp8 -= 24;  /* compensate for the first offset */
+                p_cur -= outpitch;  /* compensate for the first offset */
+                tmp = (uint32)(p_ref + pkres); /* limit */
+                while ((uint32)p_ref < tmp)  /* the loop un-rolled  */
+                {
+                    r0 = *(p_ref - (inpitch << 1));
+                    r1 = *(p_ref - inpitch);
+                    r2 = *p_ref;
+                    r3 = *(p_ref += inpitch);  /* modify pointer before loading */
+                    r4 = *(p_ref += inpitch);
+                    /* first pixel */
+                    r5 = *(p_ref += inpitch);
+                    result = (r0 + r5);
+                    r0 = (r1 + r4);
+                    result -= (r0 * 5);//result -= r0;  result -= (r0<<2);
+                    r0 = (r2 + r3);
+                    result += (r0 * 20);//result += (r0<<4);    result += (r0<<2);
+                    result = (result + 16) >> 5;
+                    CLIP_RESULT(result)
+                    tmp_result = *(p_tmp8 += 24);  /* modify pointer before loading */
+                    result = (result + tmp_result + 1);  /* no clip */
+                    result = (result >> 1);
+                    *(p_cur += outpitch) = result;
+                    /* second pixel */
+                    r0 = *(p_ref += inpitch);
+                    result = (r1 + r0);
+                    r1 = (r2 + r5);
+                    result -= (r1 * 5);//result -= r1;  result -= (r1<<2);
+                    r1 = (r3 + r4);
+                    result += (r1 * 20);//result += (r1<<4);    result += (r1<<2);
+                    result = (result + 16) >> 5;
+                    CLIP_RESULT(result)
+                    tmp_result = *(p_tmp8 += 24);  /* intermediate result */
+                    result = (result + tmp_result + 1);  /* no clip */
+                    result = (result >> 1);
+                    *(p_cur += outpitch) = result;
+                    /* third pixel */
+                    r1 = *(p_ref += inpitch);
+                    result = (r2 + r1);
+                    r2 = (r3 + r0);
+                    result -= (r2 * 5);//result -= r2;  result -= (r2<<2);
+                    r2 = (r4 + r5);
+                    result += (r2 * 20);//result += (r2<<4);    result += (r2<<2);
+                    result = (result + 16) >> 5;
+                    CLIP_RESULT(result)
+                    tmp_result = *(p_tmp8 += 24);  /* intermediate result */
+                    result = (result + tmp_result + 1);  /* no clip */
+                    result = (result >> 1);
+                    *(p_cur += outpitch) = result;
+                    /* fourth pixel */
+                    r2 = *(p_ref += inpitch);
+                    result = (r3 + r2);
+                    r3 = (r4 + r1);
+                    result -= (r3 * 5);//result -= r3;  result -= (r3<<2);
+                    r3 = (r5 + r0);
+                    result += (r3 * 20);//result += (r3<<4);    result += (r3<<2);
+                    result = (result + 16) >> 5;
+                    CLIP_RESULT(result)
+                    tmp_result = *(p_tmp8 += 24);  /* intermediate result */
+                    result = (result + tmp_result + 1);  /* no clip */
+                    result = (result >> 1);
+                    *(p_cur += outpitch) = result;
+                    p_ref -= (inpitch << 1);  /* move back to center of the filter of the next one */
+                }
+                p_cur += (curr_offset - 3);
+            }
+        }
+    }
+
+    return ;
+}
+
+/* position G */
+void eFullPelMC(uint8 *in, int inpitch, uint8 *out, int outpitch,
+                int blkwidth, int blkheight)
+{
+    int i, j;
+    int offset_in = inpitch - blkwidth;
+    int offset_out = outpitch - blkwidth;
+    uint32 temp;
+    uint8 byte;
+
+    if (((uint32)in)&3)
+    {
+        for (j = blkheight; j > 0; j--)
+        {
+            for (i = blkwidth; i > 0; i -= 4)
+            {
+                temp = *in++;
+                byte = *in++;
+                temp |= (byte << 8);
+                byte = *in++;
+                temp |= (byte << 16);
+                byte = *in++;
+                temp |= (byte << 24);
+
+                *((uint32*)out) = temp; /* write 4 bytes */
+                out += 4;
+            }
+            out += offset_out;
+            in += offset_in;
+        }
+    }
+    else
+    {
+        for (j = blkheight; j > 0; j--)
+        {
+            for (i = blkwidth; i > 0; i -= 4)
+            {
+                temp = *((uint32*)in);
+                *((uint32*)out) = temp;
+                in += 4;
+                out += 4;
+            }
+            out += offset_out;
+            in += offset_in;
+        }
+    }
+    return ;
+}
+
+void ePadChroma(uint8 *ref, int picwidth, int picheight, int picpitch, int x_pos, int y_pos)
+{
+    int pad_height;
+    int pad_width;
+    uint8 *start;
+    uint32 word1, word2, word3;
+    int offset, j;
+
+
+    pad_height = 8 + ((y_pos & 7) ? 1 : 0);
+    pad_width = 8 + ((x_pos & 7) ? 1 : 0);
+
+    y_pos >>= 3;
+    x_pos >>= 3;
+    // pad vertical first
+    if (y_pos < 0) // need to pad up
+    {
+        if (x_pos < -8) start = ref - 8;
+        else if (x_pos + pad_width > picwidth + 7) start = ref + picwidth + 7 - pad_width;
+        else start = ref + x_pos;
+
+        /* word-align start */
+        offset = (uint32)start & 0x3;
+        if (offset) start -= offset;
+
+        word1 = *((uint32*)start);
+        word2 = *((uint32*)(start + 4));
+        word3 = *((uint32*)(start + 8));
+
+        /* pad up N rows */
+        j = -y_pos;
+        if (j > 8) j = 8;
+        while (j--)
+        {
+            *((uint32*)(start -= picpitch)) = word1;
+            *((uint32*)(start + 4)) = word2;
+            *((uint32*)(start + 8)) = word3;
+        }
+
+    }
+    else if (y_pos + pad_height >= picheight) /* pad down */
+    {
+        if (x_pos < -8) start = ref + picpitch * (picheight - 1) - 8;
+        else if (x_pos + pad_width > picwidth + 7) start = ref + picpitch * (picheight - 1) +
+                    picwidth + 7 - pad_width;
+        else    start = ref + picpitch * (picheight - 1) + x_pos;
+
+        /* word-align start */
+        offset = (uint32)start & 0x3;
+        if (offset) start -= offset;
+
+        word1 = *((uint32*)start);
+        word2 = *((uint32*)(start + 4));
+        word3 = *((uint32*)(start + 8));
+
+        /* pad down N rows */
+        j = y_pos + pad_height - picheight;
+        if (j > 8) j = 8;
+        while (j--)
+        {
+            *((uint32*)(start += picpitch)) = word1;
+            *((uint32*)(start + 4)) = word2;
+            *((uint32*)(start + 8)) = word3;
+        }
+    }
+
+    /* now pad horizontal */
+    if (x_pos < 0) // pad left
+    {
+        if (y_pos < -8) start = ref - (picpitch << 3);
+        else if (y_pos + pad_height > picheight + 7) start = ref + (picheight + 7 - pad_height) * picpitch;
+        else start = ref + y_pos * picpitch;
+
+        // now pad left 8 pixels for pad_height rows */
+        j = pad_height;
+        start -= picpitch;
+        while (j--)
+        {
+            word1 = *(start += picpitch);
+            word1 |= (word1 << 8);
+            word1 |= (word1 << 16);
+            *((uint32*)(start - 8)) = word1;
+            *((uint32*)(start - 4)) = word1;
+        }
+    }
+    else if (x_pos + pad_width >= picwidth) /* pad right */
+    {
+        if (y_pos < -8) start = ref - (picpitch << 3) + picwidth - 1;
+        else if (y_pos + pad_height > picheight + 7) start = ref + (picheight + 7 - pad_height) * picpitch + picwidth - 1;
+        else start = ref + y_pos * picpitch + picwidth - 1;
+
+        // now pad right 8 pixels for pad_height rows */
+        j = pad_height;
+        start -= picpitch;
+        while (j--)
+        {
+            word1 = *(start += picpitch);
+            word1 |= (word1 << 8);
+            word1 |= (word1 << 16);
+            *((uint32*)(start + 1)) = word1;
+            *((uint32*)(start + 5)) = word1;
+        }
+    }
+
+    return ;
+}
+
+
+void eChromaMotionComp(uint8 *ref, int picwidth, int picheight,
+                       int x_pos, int y_pos,
+                       uint8 *pred, int picpitch,
+                       int blkwidth, int blkheight)
+{
+    int dx, dy;
+    int offset_dx, offset_dy;
+    int index;
+
+    ePadChroma(ref, picwidth, picheight, picpitch, x_pos, y_pos);
+
+    dx = x_pos & 7;
+    dy = y_pos & 7;
+    offset_dx = (dx + 7) >> 3;
+    offset_dy = (dy + 7) >> 3;
+    x_pos = x_pos >> 3;  /* round it to full-pel resolution */
+    y_pos = y_pos >> 3;
+
+    ref += y_pos * picpitch + x_pos;
+
+    index = offset_dx + (offset_dy << 1) + ((blkwidth << 1) & 0x7);
+
+    (*(eChromaMC_SIMD[index]))(ref, picpitch , dx, dy, pred, picpitch, blkwidth, blkheight);
+    return ;
+}
+
+
+/* SIMD routines, unroll the loops in vertical direction, decreasing loops (things to be done) */
+void eChromaDiagonalMC_SIMD(uint8 *pRef, int srcPitch, int dx, int dy,
+                            uint8 *pOut, int predPitch, int blkwidth, int blkheight)
+{
+    int32 r0, r1, r2, r3, result0, result1;
+    uint8 temp[288];
+    uint8 *ref, *out;
+    int i, j;
+    int dx_8 = 8 - dx;
+    int dy_8 = 8 - dy;
+
+    /* horizontal first */
+    out = temp;
+    for (i = 0; i < blkheight + 1; i++)
+    {
+        ref = pRef;
+        r0 = ref[0];
+        for (j = 0; j < blkwidth; j += 4)
+        {
+            r0 |= (ref[2] << 16);
+            result0 = dx_8 * r0;
+
+            r1 = ref[1] | (ref[3] << 16);
+            result0 += dx * r1;
+            *(int32 *)out = result0;
+
+            result0 = dx_8 * r1;
+
+            r2 = ref[4];
+            r0 = r0 >> 16;
+            r1 = r0 | (r2 << 16);
+            result0 += dx * r1;
+            *(int32 *)(out + 16) = result0;
+
+            ref += 4;
+            out += 4;
+            r0 = r2;
+        }
+        pRef += srcPitch;
+        out += (32 - blkwidth);
+    }
+
+//  pRef -= srcPitch*(blkheight+1);
+    ref = temp;
+
+    for (j = 0; j < blkwidth; j += 4)
+    {
+        r0 = *(int32 *)ref;
+        r1 = *(int32 *)(ref + 16);
+        ref += 32;
+        out = pOut;
+        for (i = 0; i < (blkheight >> 1); i++)
+        {
+            result0 = dy_8 * r0 + 0x00200020;
+            r2 = *(int32 *)ref;
+            result0 += dy * r2;
+            result0 >>= 6;
+            result0 &= 0x00FF00FF;
+            r0 = r2;
+
+            result1 = dy_8 * r1 + 0x00200020;
+            r3 = *(int32 *)(ref + 16);
+            result1 += dy * r3;
+            result1 >>= 6;
+            result1 &= 0x00FF00FF;
+            r1 = r3;
+            *(int32 *)out = result0 | (result1 << 8);
+            out += predPitch;
+            ref += 32;
+
+            result0 = dy_8 * r0 + 0x00200020;
+            r2 = *(int32 *)ref;
+            result0 += dy * r2;
+            result0 >>= 6;
+            result0 &= 0x00FF00FF;
+            r0 = r2;
+
+            result1 = dy_8 * r1 + 0x00200020;
+            r3 = *(int32 *)(ref + 16);
+            result1 += dy * r3;
+            result1 >>= 6;
+            result1 &= 0x00FF00FF;
+            r1 = r3;
+            *(int32 *)out = result0 | (result1 << 8);
+            out += predPitch;
+            ref += 32;
+        }
+        pOut += 4;
+        ref = temp + 4; /* since it can only iterate twice max */
+    }
+    return;
+}
+
+void eChromaHorizontalMC_SIMD(uint8 *pRef, int srcPitch, int dx, int dy,
+                              uint8 *pOut, int predPitch, int blkwidth, int blkheight)
+{
+    (void)(dy);
+
+    int32 r0, r1, r2, result0, result1;
+    uint8 *ref, *out;
+    int i, j;
+    int dx_8 = 8 - dx;
+
+    /* horizontal first */
+    for (i = 0; i < blkheight; i++)
+    {
+        ref = pRef;
+        out = pOut;
+
+        r0 = ref[0];
+        for (j = 0; j < blkwidth; j += 4)
+        {
+            r0 |= (ref[2] << 16);
+            result0 = dx_8 * r0 + 0x00040004;
+
+            r1 = ref[1] | (ref[3] << 16);
+            result0 += dx * r1;
+            result0 >>= 3;
+            result0 &= 0x00FF00FF;
+
+            result1 = dx_8 * r1 + 0x00040004;
+
+            r2 = ref[4];
+            r0 = r0 >> 16;
+            r1 = r0 | (r2 << 16);
+            result1 += dx * r1;
+            result1 >>= 3;
+            result1 &= 0x00FF00FF;
+
+            *(int32 *)out = result0 | (result1 << 8);
+
+            ref += 4;
+            out += 4;
+            r0 = r2;
+        }
+
+        pRef += srcPitch;
+        pOut += predPitch;
+    }
+    return;
+}
+
+void eChromaVerticalMC_SIMD(uint8 *pRef, int srcPitch, int dx, int dy,
+                            uint8 *pOut, int predPitch, int blkwidth, int blkheight)
+{
+    (void)(dx);
+
+    int32 r0, r1, r2, r3, result0, result1;
+    int i, j;
+    uint8 *ref, *out;
+    int dy_8 = 8 - dy;
+    /* vertical first */
+    for (i = 0; i < blkwidth; i += 4)
+    {
+        ref = pRef;
+        out = pOut;
+
+        r0 = ref[0] | (ref[2] << 16);
+        r1 = ref[1] | (ref[3] << 16);
+        ref += srcPitch;
+        for (j = 0; j < blkheight; j++)
+        {
+            result0 = dy_8 * r0 + 0x00040004;
+            r2 = ref[0] | (ref[2] << 16);
+            result0 += dy * r2;
+            result0 >>= 3;
+            result0 &= 0x00FF00FF;
+            r0 = r2;
+
+            result1 = dy_8 * r1 + 0x00040004;
+            r3 = ref[1] | (ref[3] << 16);
+            result1 += dy * r3;
+            result1 >>= 3;
+            result1 &= 0x00FF00FF;
+            r1 = r3;
+            *(int32 *)out = result0 | (result1 << 8);
+            ref += srcPitch;
+            out += predPitch;
+        }
+        pOut += 4;
+        pRef += 4;
+    }
+    return;
+}
+
+void eChromaDiagonalMC2_SIMD(uint8 *pRef, int srcPitch, int dx, int dy,
+                             uint8 *pOut,  int predPitch, int blkwidth, int blkheight)
+{
+    (void)(blkwidth);
+
+    int32 r0, r1, temp0, temp1, result;
+    int32 temp[9];
+    int32 *out;
+    int i, r_temp;
+    int dy_8 = 8 - dy;
+
+    /* horizontal first */
+    out = temp;
+    for (i = 0; i < blkheight + 1; i++)
+    {
+        r_temp = pRef[1];
+        temp0 = (pRef[0] << 3) + dx * (r_temp - pRef[0]);
+        temp1 = (r_temp << 3) + dx * (pRef[2] - r_temp);
+        r0 = temp0 | (temp1 << 16);
+        *out++ = r0;
+        pRef += srcPitch;
+    }
+
+    pRef -= srcPitch * (blkheight + 1);
+
+    out = temp;
+
+    r0 = *out++;
+
+    for (i = 0; i < blkheight; i++)
+    {
+        result = dy_8 * r0 + 0x00200020;
+        r1 = *out++;
+        result += dy * r1;
+        result >>= 6;
+        result &= 0x00FF00FF;
+        *(int16 *)pOut = (result >> 8) | (result & 0xFF);
+        r0 = r1;
+        pOut += predPitch;
+    }
+    return;
+}
+
+void eChromaHorizontalMC2_SIMD(uint8 *pRef, int srcPitch, int dx, int dy,
+                               uint8 *pOut, int predPitch, int blkwidth, int blkheight)
+{
+    (void)(dy);
+    (void)(blkwidth);
+
+    int i, temp, temp0, temp1;
+
+    /* horizontal first */
+    for (i = 0; i < blkheight; i++)
+    {
+        temp = pRef[1];
+        temp0 = ((pRef[0] << 3) + dx * (temp - pRef[0]) + 4) >> 3;
+        temp1 = ((temp << 3) + dx * (pRef[2] - temp) + 4) >> 3;
+
+        *(int16 *)pOut = temp0 | (temp1 << 8);
+        pRef += srcPitch;
+        pOut += predPitch;
+
+    }
+    return;
+}
+void eChromaVerticalMC2_SIMD(uint8 *pRef, int srcPitch, int dx, int dy,
+                             uint8 *pOut, int predPitch, int blkwidth, int blkheight)
+{
+    (void)(dx);
+    (void)(blkwidth);
+
+    int32 r0, r1, result;
+    int i;
+    int dy_8 = 8 - dy;
+    r0 = pRef[0] | (pRef[1] << 16);
+    pRef += srcPitch;
+    for (i = 0; i < blkheight; i++)
+    {
+        result = dy_8 * r0 + 0x00040004;
+        r1 = pRef[0] | (pRef[1] << 16);
+        result += dy * r1;
+        result >>= 3;
+        result &= 0x00FF00FF;
+        *(int16 *)pOut = (result >> 8) | (result & 0xFF);
+        r0 = r1;
+        pRef += srcPitch;
+        pOut += predPitch;
+    }
+    return;
+}
+
+void eChromaFullMC_SIMD(uint8 *pRef, int srcPitch, int dx, int dy,
+                        uint8 *pOut, int predPitch, int blkwidth, int blkheight)
+{
+    (void)(dx);
+    (void)(dy);
+
+    int i, j;
+    int offset_in = srcPitch - blkwidth;
+    int offset_out = predPitch - blkwidth;
+    uint16 temp;
+    uint8 byte;
+
+    if (((uint32)pRef)&1)
+    {
+        for (j = blkheight; j > 0; j--)
+        {
+            for (i = blkwidth; i > 0; i -= 2)
+            {
+                temp = *pRef++;
+                byte = *pRef++;
+                temp |= (byte << 8);
+                *((uint16*)pOut) = temp; /* write 2 bytes */
+                pOut += 2;
+            }
+            pOut += offset_out;
+            pRef += offset_in;
+        }
+    }
+    else
+    {
+        for (j = blkheight; j > 0; j--)
+        {
+            for (i = blkwidth; i > 0; i -= 2)
+            {
+                temp = *((uint16*)pRef);
+                *((uint16*)pOut) = temp;
+                pRef += 2;
+                pOut += 2;
+            }
+            pOut += offset_out;
+            pRef += offset_in;
+        }
+    }
+    return ;
+}
diff --git a/media/libstagefright/codecs/avc/enc/src/motion_est.cpp b/media/libstagefright/codecs/avc/enc/src/motion_est.cpp
new file mode 100644
index 0000000..f650ef9
--- /dev/null
+++ b/media/libstagefright/codecs/avc/enc/src/motion_est.cpp
@@ -0,0 +1,1774 @@
+/* ------------------------------------------------------------------
+ * Copyright (C) 1998-2009 PacketVideo
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
+ * express or implied.
+ * See the License for the specific language governing permissions
+ * and limitations under the License.
+ * -------------------------------------------------------------------
+ */
+#include "avcenc_lib.h"
+
+#define MIN_GOP     1   /* minimum size of GOP, 1/23/01, need to be tested */
+
+#define DEFAULT_REF_IDX     0  /* always from the first frame in the reflist */
+
+#define ALL_CAND_EQUAL  10  /*  any number greater than 5 will work */
+
+
+/* from TMN 3.2 */
+#define PREF_NULL_VEC 129   /* zero vector bias */
+#define PREF_16_VEC 129     /* 1MV bias versus 4MVs*/
+#define PREF_INTRA  3024//512       /* bias for INTRA coding */
+
+const static int tab_exclude[9][9] =  // [last_loc][curr_loc]
+{
+    {0, 0, 0, 0, 0, 0, 0, 0, 0},
+    {0, 0, 0, 0, 1, 1, 1, 0, 0},
+    {0, 0, 0, 0, 1, 1, 1, 1, 1},
+    {0, 0, 0, 0, 0, 0, 1, 1, 1},
+    {0, 1, 1, 0, 0, 0, 1, 1, 1},
+    {0, 1, 1, 0, 0, 0, 0, 0, 1},
+    {0, 1, 1, 1, 1, 0, 0, 0, 1},
+    {0, 0, 1, 1, 1, 0, 0, 0, 0},
+    {0, 0, 1, 1, 1, 1, 1, 0, 0}
+}; //to decide whether to continue or compute
+
+const static int refine_next[8][2] =    /* [curr_k][increment] */
+{
+    {0, 0}, {2, 0}, {1, 1}, {0, 2}, { -1, 1}, { -2, 0}, { -1, -1}, {0, -2}
+};
+
+#ifdef _SAD_STAT
+uint32 num_MB = 0;
+uint32 num_cand = 0;
+#endif
+
+/************************************************************************/
+#define TH_INTER_2  100  /* temporary for now */
+
+//#define FIXED_INTERPRED_MODE  AVC_P16
+#define FIXED_REF_IDX   0
+#define FIXED_MVX 0
+#define FIXED_MVY 0
+
+// only use when AVC_P8 or AVC_P8ref0
+#define FIXED_SUBMB_MODE    AVC_4x4
+/*************************************************************************/
+
+/* Initialize arrays necessary for motion search */
+AVCEnc_Status InitMotionSearchModule(AVCHandle *avcHandle)
+{
+    AVCEncObject *encvid = (AVCEncObject*) avcHandle->AVCObject;
+    AVCRateControl *rateCtrl = encvid->rateCtrl;
+    int search_range = rateCtrl->mvRange;
+    int number_of_subpel_positions = 4 * (2 * search_range + 3);
+    int max_mv_bits, max_mvd;
+    int temp_bits = 0;
+    uint8 *mvbits;
+    int bits, imax, imin, i;
+    uint8* subpel_pred = (uint8*) encvid->subpel_pred; // all 16 sub-pel positions
+
+
+    while (number_of_subpel_positions > 0)
+    {
+        temp_bits++;
+        number_of_subpel_positions >>= 1;
+    }
+
+    max_mv_bits = 3 + 2 * temp_bits;
+    max_mvd  = (1 << (max_mv_bits >> 1)) - 1;
+
+    encvid->mvbits_array = (uint8*) avcHandle->CBAVC_Malloc(encvid->avcHandle->userData,
+                           sizeof(uint8) * (2 * max_mvd + 1), DEFAULT_ATTR);
+
+    if (encvid->mvbits_array == NULL)
+    {
+        return AVCENC_MEMORY_FAIL;
+    }
+
+    mvbits = encvid->mvbits  = encvid->mvbits_array + max_mvd;
+
+    mvbits[0] = 1;
+    for (bits = 3; bits <= max_mv_bits; bits += 2)
+    {
+        imax = 1    << (bits >> 1);
+        imin = imax >> 1;
+
+        for (i = imin; i < imax; i++)   mvbits[-i] = mvbits[i] = bits;
+    }
+
+    /* initialize half-pel search */
+    encvid->hpel_cand[0] = subpel_pred + REF_CENTER;
+    encvid->hpel_cand[1] = subpel_pred + V2Q_H0Q * SUBPEL_PRED_BLK_SIZE + 1 ;
+    encvid->hpel_cand[2] = subpel_pred + V2Q_H2Q * SUBPEL_PRED_BLK_SIZE + 1;
+    encvid->hpel_cand[3] = subpel_pred + V0Q_H2Q * SUBPEL_PRED_BLK_SIZE + 25;
+    encvid->hpel_cand[4] = subpel_pred + V2Q_H2Q * SUBPEL_PRED_BLK_SIZE + 25;
+    encvid->hpel_cand[5] = subpel_pred + V2Q_H0Q * SUBPEL_PRED_BLK_SIZE + 25;
+    encvid->hpel_cand[6] = subpel_pred + V2Q_H2Q * SUBPEL_PRED_BLK_SIZE + 24;
+    encvid->hpel_cand[7] = subpel_pred + V0Q_H2Q * SUBPEL_PRED_BLK_SIZE + 24;
+    encvid->hpel_cand[8] = subpel_pred + V2Q_H2Q * SUBPEL_PRED_BLK_SIZE;
+
+    /* For quarter-pel interpolation around best half-pel result */
+
+    encvid->bilin_base[0][0] = subpel_pred + V2Q_H2Q * SUBPEL_PRED_BLK_SIZE;
+    encvid->bilin_base[0][1] = subpel_pred + V2Q_H0Q * SUBPEL_PRED_BLK_SIZE + 1;
+    encvid->bilin_base[0][2] = subpel_pred + V0Q_H2Q * SUBPEL_PRED_BLK_SIZE + 24;
+    encvid->bilin_base[0][3] = subpel_pred + REF_CENTER;
+
+
+    encvid->bilin_base[1][0] = subpel_pred + V0Q_H2Q * SUBPEL_PRED_BLK_SIZE;
+    encvid->bilin_base[1][1] = subpel_pred + REF_CENTER - 24;
+    encvid->bilin_base[1][2] = subpel_pred + V2Q_H2Q * SUBPEL_PRED_BLK_SIZE;
+    encvid->bilin_base[1][3] = subpel_pred + V2Q_H0Q * SUBPEL_PRED_BLK_SIZE + 1;
+
+    encvid->bilin_base[2][0] = subpel_pred + REF_CENTER - 24;
+    encvid->bilin_base[2][1] = subpel_pred + V0Q_H2Q * SUBPEL_PRED_BLK_SIZE + 1;
+    encvid->bilin_base[2][2] = subpel_pred + V2Q_H0Q * SUBPEL_PRED_BLK_SIZE + 1;
+    encvid->bilin_base[2][3] = subpel_pred + V2Q_H2Q * SUBPEL_PRED_BLK_SIZE + 1;
+
+    encvid->bilin_base[3][0] = subpel_pred + V2Q_H0Q * SUBPEL_PRED_BLK_SIZE + 1;
+    encvid->bilin_base[3][1] = subpel_pred + V2Q_H2Q * SUBPEL_PRED_BLK_SIZE + 1;
+    encvid->bilin_base[3][2] = subpel_pred + REF_CENTER;
+    encvid->bilin_base[3][3] = subpel_pred + V0Q_H2Q * SUBPEL_PRED_BLK_SIZE + 25;
+
+    encvid->bilin_base[4][0] = subpel_pred + REF_CENTER;
+    encvid->bilin_base[4][1] = subpel_pred + V0Q_H2Q * SUBPEL_PRED_BLK_SIZE + 25;
+    encvid->bilin_base[4][2] = subpel_pred + V2Q_H0Q * SUBPEL_PRED_BLK_SIZE + 25;
+    encvid->bilin_base[4][3] = subpel_pred + V2Q_H2Q * SUBPEL_PRED_BLK_SIZE + 25;
+
+    encvid->bilin_base[5][0] = subpel_pred + V0Q_H2Q * SUBPEL_PRED_BLK_SIZE + 24;
+    encvid->bilin_base[5][1] = subpel_pred + REF_CENTER;
+    encvid->bilin_base[5][2] = subpel_pred + V2Q_H2Q * SUBPEL_PRED_BLK_SIZE + 24;
+    encvid->bilin_base[5][3] = subpel_pred + V2Q_H0Q * SUBPEL_PRED_BLK_SIZE + 25;
+
+    encvid->bilin_base[6][0] = subpel_pred + REF_CENTER - 1;
+    encvid->bilin_base[6][1] = subpel_pred + V0Q_H2Q * SUBPEL_PRED_BLK_SIZE + 24;
+    encvid->bilin_base[6][2] = subpel_pred + V2Q_H0Q * SUBPEL_PRED_BLK_SIZE + 24;
+    encvid->bilin_base[6][3] = subpel_pred + V2Q_H2Q * SUBPEL_PRED_BLK_SIZE + 24;
+
+    encvid->bilin_base[7][0] = subpel_pred + V2Q_H0Q * SUBPEL_PRED_BLK_SIZE;
+    encvid->bilin_base[7][1] = subpel_pred + V2Q_H2Q * SUBPEL_PRED_BLK_SIZE;
+    encvid->bilin_base[7][2] = subpel_pred + REF_CENTER - 1;
+    encvid->bilin_base[7][3] = subpel_pred + V0Q_H2Q * SUBPEL_PRED_BLK_SIZE + 24;
+
+    encvid->bilin_base[8][0] = subpel_pred + REF_CENTER - 25;
+    encvid->bilin_base[8][1] = subpel_pred + V0Q_H2Q * SUBPEL_PRED_BLK_SIZE;
+    encvid->bilin_base[8][2] = subpel_pred + V2Q_H0Q * SUBPEL_PRED_BLK_SIZE;
+    encvid->bilin_base[8][3] = subpel_pred + V2Q_H2Q * SUBPEL_PRED_BLK_SIZE;
+
+
+    return AVCENC_SUCCESS;
+}
+
+/* Clean-up memory */
+void CleanMotionSearchModule(AVCHandle *avcHandle)
+{
+    AVCEncObject *encvid = (AVCEncObject*) avcHandle->AVCObject;
+
+    if (encvid->mvbits_array)
+    {
+        avcHandle->CBAVC_Free(avcHandle->userData, (int)(encvid->mvbits_array));
+        encvid->mvbits = NULL;
+    }
+
+    return ;
+}
+
+
+bool IntraDecisionABE(int *min_cost, uint8 *cur, int pitch, bool ave)
+{
+    int j;
+    uint8 *out;
+    int temp, SBE;
+    OsclFloat ABE;
+    bool intra = true;
+
+    SBE = 0;
+    /* top neighbor */
+    out = cur - pitch;
+    for (j = 0; j < 16; j++)
+    {
+        temp = out[j] - cur[j];
+        SBE += ((temp >= 0) ? temp : -temp);
+    }
+
+    /* left neighbor */
+    out = cur - 1;
+    out -= pitch;
+    cur -= pitch;
+    for (j = 0; j < 16; j++)
+    {
+        temp = *(out += pitch) - *(cur += pitch);
+        SBE += ((temp >= 0) ? temp : -temp);
+    }
+
+    /* compare mincost/384 and SBE/64 */
+    ABE = SBE / 32.0; //ABE = SBE/64.0; //
+    if (ABE >= *min_cost / 256.0) //if( ABE*0.8 >= min_cost/384.0) //
+    {
+        intra = false; // no possibility of intra, just use inter
+    }
+    else
+    {
+        if (ave == true)
+        {
+            *min_cost = (*min_cost + (int)(SBE * 8)) >> 1; // possibility of intra, averaging the cost
+        }
+        else
+        {
+            *min_cost = (int)(SBE * 8);
+        }
+    }
+
+    return intra;
+}
+
+/******* main function for macroblock prediction for the entire frame ***/
+/* if turns out to be IDR frame, set video->nal_unit_type to AVC_NALTYPE_IDR */
+void AVCMotionEstimation(AVCEncObject *encvid)
+{
+    AVCCommonObj *video = encvid->common;
+    int slice_type = video->slice_type;
+    AVCFrameIO *currInput = encvid->currInput;
+    AVCPictureData *refPic = video->RefPicList0[0];
+    int i, j, k;
+    int mbwidth = video->PicWidthInMbs;
+    int mbheight = video->PicHeightInMbs;
+    int totalMB = video->PicSizeInMbs;
+    int pitch = currInput->pitch;
+    AVCMacroblock *currMB, *mblock = video->mblock;
+    AVCMV *mot_mb_16x16, *mot16x16 = encvid->mot16x16;
+    // AVCMV *mot_mb_16x8, *mot_mb_8x16, *mot_mb_8x8, etc;
+    AVCRateControl *rateCtrl = encvid->rateCtrl;
+    uint8 *intraSearch = encvid->intraSearch;
+    uint FS_en = encvid->fullsearch_enable;
+
+    int NumIntraSearch, start_i, numLoop, incr_i;
+    int mbnum, offset;
+    uint8 *cur, *best_cand[5];
+    int totalSAD = 0;   /* average SAD for rate control */
+    int type_pred;
+    int abe_cost;
+
+#ifdef HTFM
+    /***** HYPOTHESIS TESTING ********/  /* 2/28/01 */
+    int collect = 0;
+    HTFM_Stat htfm_stat;
+    double newvar[16];
+    double exp_lamda[15];
+    /*********************************/
+#endif
+    int hp_guess = 0;
+    uint32 mv_uint32;
+
+    offset = 0;
+
+    if (slice_type == AVC_I_SLICE)
+    {
+        /* cannot do I16 prediction here because it needs full decoding. */
+        for (i = 0; i < totalMB; i++)
+        {
+            encvid->min_cost[i] = 0x7FFFFFFF;  /* max value for int */
+        }
+
+        memset(intraSearch, 1, sizeof(uint8)*totalMB);
+
+        encvid->firstIntraRefreshMBIndx = 0; /* reset this */
+
+        return ;
+    }
+    else   // P_SLICE
+    {
+        for (i = 0; i < totalMB; i++)
+        {
+            mblock[i].mb_intra = 0;
+        }
+        memset(intraSearch, 1, sizeof(uint8)*totalMB);
+    }
+
+    if (refPic->padded == 0)
+    {
+        AVCPaddingEdge(refPic);
+        refPic->padded = 1;
+    }
+    /* Random INTRA update */
+    if (rateCtrl->intraMBRate)
+    {
+        AVCRasterIntraUpdate(encvid, mblock, totalMB, rateCtrl->intraMBRate);
+    }
+
+    encvid->sad_extra_info = NULL;
+#ifdef HTFM
+    /***** HYPOTHESIS TESTING ********/
+    InitHTFM(video, &htfm_stat, newvar, &collect);
+    /*********************************/
+#endif
+
+    if ((rateCtrl->scdEnable == 1)
+            && ((rateCtrl->frame_rate < 5.0) || (video->sliceHdr->frame_num > MIN_GOP)))
+        /* do not try to detect a new scene if low frame rate and too close to previous I-frame */
+    {
+        incr_i = 2;
+        numLoop = 2;
+        start_i = 1;
+        type_pred = 0; /* for initial candidate selection */
+    }
+    else
+    {
+        incr_i = 1;
+        numLoop = 1;
+        start_i = 0;
+        type_pred = 2;
+    }
+
+    /* First pass, loop thru half the macroblock */
+    /* determine scene change */
+    /* Second pass, for the rest of macroblocks */
+    NumIntraSearch = 0; // to be intra searched in the encoding loop.
+    while (numLoop--)
+    {
+        for (j = 0; j < mbheight; j++)
+        {
+            if (incr_i > 1)
+                start_i = (start_i == 0 ? 1 : 0) ; /* toggle 0 and 1 */
+
+            offset = pitch * (j << 4) + (start_i << 4);
+
+            mbnum = j * mbwidth + start_i;
+
+            for (i = start_i; i < mbwidth; i += incr_i)
+            {
+                video->mbNum = mbnum;
+                video->currMB = currMB = mblock + mbnum;
+                mot_mb_16x16 = mot16x16 + mbnum;
+
+                cur = currInput->YCbCr[0] + offset;
+
+                if (currMB->mb_intra == 0) /* for INTER mode */
+                {
+#if defined(HTFM)
+                    HTFMPrepareCurMB_AVC(encvid, &htfm_stat, cur, pitch);
+#else
+                    AVCPrepareCurMB(encvid, cur, pitch);
+#endif
+                    /************************************************************/
+                    /******** full-pel 1MV search **********************/
+
+                    AVCMBMotionSearch(encvid, cur, best_cand, i << 4, j << 4, type_pred,
+                                      FS_en, &hp_guess);
+
+                    abe_cost = encvid->min_cost[mbnum] = mot_mb_16x16->sad;
+
+                    /* set mbMode and MVs */
+                    currMB->mbMode = AVC_P16;
+                    currMB->MBPartPredMode[0][0] = AVC_Pred_L0;
+                    mv_uint32 = ((mot_mb_16x16->y) << 16) | ((mot_mb_16x16->x) & 0xffff);
+                    for (k = 0; k < 32; k += 2)
+                    {
+                        currMB->mvL0[k>>1] = mv_uint32;
+                    }
+
+                    /* make a decision whether it should be tested for intra or not */
+                    if (i != mbwidth - 1 && j != mbheight - 1 && i != 0 && j != 0)
+                    {
+                        if (false == IntraDecisionABE(&abe_cost, cur, pitch, true))
+                        {
+                            intraSearch[mbnum] = 0;
+                        }
+                        else
+                        {
+                            NumIntraSearch++;
+                            rateCtrl->MADofMB[mbnum] = abe_cost;
+                        }
+                    }
+                    else // boundary MBs, always do intra search
+                    {
+                        NumIntraSearch++;
+                    }
+
+                    totalSAD += (int) rateCtrl->MADofMB[mbnum];//mot_mb_16x16->sad;
+                }
+                else    /* INTRA update, use for prediction */
+                {
+                    mot_mb_16x16[0].x = mot_mb_16x16[0].y = 0;
+
+                    /* reset all other MVs to zero */
+                    /* mot_mb_16x8, mot_mb_8x16, mot_mb_8x8, etc. */
+                    abe_cost = encvid->min_cost[mbnum] = 0x7FFFFFFF;  /* max value for int */
+
+                    if (i != mbwidth - 1 && j != mbheight - 1 && i != 0 && j != 0)
+                    {
+                        IntraDecisionABE(&abe_cost, cur, pitch, false);
+
+                        rateCtrl->MADofMB[mbnum] = abe_cost;
+                        totalSAD += abe_cost;
+                    }
+
+                    NumIntraSearch++ ;
+                    /* cannot do I16 prediction here because it needs full decoding. */
+                    // intraSearch[mbnum] = 1;
+
+                }
+
+                mbnum += incr_i;
+                offset += (incr_i << 4);
+
+            } /* for i */
+        } /* for j */
+
+        /* since we cannot do intra/inter decision here, the SCD has to be
+        based on other criteria such as motion vectors coherency or the SAD */
+        if (incr_i > 1 && numLoop) /* scene change on and first loop */
+        {
+            //if(NumIntraSearch > ((totalMB>>3)<<1) + (totalMB>>3)) /* 75% of 50%MBs */
+            if (NumIntraSearch*99 > (48*totalMB)) /* 20% of 50%MBs */
+                /* need to do more investigation about this threshold since the NumIntraSearch
+                only show potential intra MBs, not the actual one */
+            {
+                /* we can choose to just encode I_SLICE without IDR */
+                //video->nal_unit_type = AVC_NALTYPE_IDR;
+                video->nal_unit_type = AVC_NALTYPE_SLICE;
+                video->sliceHdr->slice_type = AVC_I_ALL_SLICE;
+                video->slice_type = AVC_I_SLICE;
+                memset(intraSearch, 1, sizeof(uint8)*totalMB);
+                i = totalMB;
+                while (i--)
+                {
+                    mblock[i].mb_intra = 1;
+                    encvid->min_cost[i] = 0x7FFFFFFF;  /* max value for int */
+                }
+
+                rateCtrl->totalSAD = totalSAD * 2;  /* SAD */
+
+                return ;
+            }
+        }
+        /******** no scene change, continue motion search **********************/
+        start_i = 0;
+        type_pred++; /* second pass */
+    }
+
+    rateCtrl->totalSAD = totalSAD;  /* SAD */
+
+#ifdef HTFM
+    /***** HYPOTHESIS TESTING ********/
+    if (collect)
+    {
+        collect = 0;
+        UpdateHTFM(encvid, newvar, exp_lamda, &htfm_stat);
+    }
+    /*********************************/
+#endif
+
+    return ;
+}
+
+/*=====================================================================
+    Function:   PaddingEdge
+    Date:       09/16/2000
+    Purpose:    Pad edge of a Vop
+=====================================================================*/
+
+void  AVCPaddingEdge(AVCPictureData *refPic)
+{
+    uint8 *src, *dst;
+    int i;
+    int pitch, width, height;
+    uint32 temp1, temp2;
+
+    width = refPic->width;
+    height = refPic->height;
+    pitch = refPic->pitch;
+
+    /* pad top */
+    src = refPic->Sl;
+
+    temp1 = *src; /* top-left corner */
+    temp2 = src[width-1]; /* top-right corner */
+    temp1 |= (temp1 << 8);
+    temp1 |= (temp1 << 16);
+    temp2 |= (temp2 << 8);
+    temp2 |= (temp2 << 16);
+
+    dst = src - (pitch << 4);
+
+    *((uint32*)(dst - 16)) = temp1;
+    *((uint32*)(dst - 12)) = temp1;
+    *((uint32*)(dst - 8)) = temp1;
+    *((uint32*)(dst - 4)) = temp1;
+
+    memcpy(dst, src, width);
+
+    *((uint32*)(dst += width)) = temp2;
+    *((uint32*)(dst + 4)) = temp2;
+    *((uint32*)(dst + 8)) = temp2;
+    *((uint32*)(dst + 12)) = temp2;
+
+    dst = dst - width - 16;
+
+    i = 15;
+    while (i--)
+    {
+        memcpy(dst + pitch, dst, pitch);
+        dst += pitch;
+    }
+
+    /* pad sides */
+    dst += (pitch + 16);
+    src = dst;
+    i = height;
+    while (i--)
+    {
+        temp1 = *src;
+        temp2 = src[width-1];
+        temp1 |= (temp1 << 8);
+        temp1 |= (temp1 << 16);
+        temp2 |= (temp2 << 8);
+        temp2 |= (temp2 << 16);
+
+        *((uint32*)(dst - 16)) = temp1;
+        *((uint32*)(dst - 12)) = temp1;
+        *((uint32*)(dst - 8)) = temp1;
+        *((uint32*)(dst - 4)) = temp1;
+
+        *((uint32*)(dst += width)) = temp2;
+        *((uint32*)(dst + 4)) = temp2;
+        *((uint32*)(dst + 8)) = temp2;
+        *((uint32*)(dst + 12)) = temp2;
+
+        src += pitch;
+        dst = src;
+    }
+
+    /* pad bottom */
+    dst -= 16;
+    i = 16;
+    while (i--)
+    {
+        memcpy(dst, dst - pitch, pitch);
+        dst += pitch;
+    }
+
+
+    return ;
+}
+
+/*===========================================================================
+    Function:   AVCRasterIntraUpdate
+    Date:       2/26/01
+    Purpose:    To raster-scan assign INTRA-update .
+                N macroblocks are updated (also was programmable).
+===========================================================================*/
+void AVCRasterIntraUpdate(AVCEncObject *encvid, AVCMacroblock *mblock, int totalMB, int numRefresh)
+{
+    int indx, i;
+
+    indx = encvid->firstIntraRefreshMBIndx;
+    for (i = 0; i < numRefresh && indx < totalMB; i++)
+    {
+        (mblock + indx)->mb_intra = 1;
+        encvid->intraSearch[indx++] = 1;
+    }
+
+    /* if read the end of frame, reset and loop around */
+    if (indx >= totalMB - 1)
+    {
+        indx = 0;
+        while (i < numRefresh && indx < totalMB)
+        {
+            (mblock + indx)->mb_intra = 1;
+            encvid->intraSearch[indx++] = 1;
+            i++;
+        }
+    }
+
+    encvid->firstIntraRefreshMBIndx = indx; /* update with a new value */
+
+    return ;
+}
+
+
+#ifdef HTFM
+void InitHTFM(VideoEncData *encvid, HTFM_Stat *htfm_stat, double *newvar, int *collect)
+{
+    AVCCommonObj *video = encvid->common;
+    int i;
+    int lx = video->currPic->width; // padding
+    int lx2 = lx << 1;
+    int lx3 = lx2 + lx;
+    int rx = video->currPic->pitch;
+    int rx2 = rx << 1;
+    int rx3 = rx2 + rx;
+
+    int *offset, *offset2;
+
+    /* 4/11/01, collect data every 30 frames, doesn't have to be base layer */
+    if (((int)video->sliceHdr->frame_num) % 30 == 1)
+    {
+
+        *collect = 1;
+
+        htfm_stat->countbreak = 0;
+        htfm_stat->abs_dif_mad_avg = 0;
+
+        for (i = 0; i < 16; i++)
+        {
+            newvar[i] = 0.0;
+        }
+//      encvid->functionPointer->SAD_MB_PADDING = &SAD_MB_PADDING_HTFM_Collect;
+        encvid->functionPointer->SAD_Macroblock = &SAD_MB_HTFM_Collect;
+        encvid->functionPointer->SAD_MB_HalfPel[0] = NULL;
+        encvid->functionPointer->SAD_MB_HalfPel[1] = &SAD_MB_HP_HTFM_Collectxh;
+        encvid->functionPointer->SAD_MB_HalfPel[2] = &SAD_MB_HP_HTFM_Collectyh;
+        encvid->functionPointer->SAD_MB_HalfPel[3] = &SAD_MB_HP_HTFM_Collectxhyh;
+        encvid->sad_extra_info = (void*)(htfm_stat);
+        offset = htfm_stat->offsetArray;
+        offset2 = htfm_stat->offsetRef;
+    }
+    else
+    {
+//      encvid->functionPointer->SAD_MB_PADDING = &SAD_MB_PADDING_HTFM;
+        encvid->functionPointer->SAD_Macroblock = &SAD_MB_HTFM;
+        encvid->functionPointer->SAD_MB_HalfPel[0] = NULL;
+        encvid->functionPointer->SAD_MB_HalfPel[1] = &SAD_MB_HP_HTFMxh;
+        encvid->functionPointer->SAD_MB_HalfPel[2] = &SAD_MB_HP_HTFMyh;
+        encvid->functionPointer->SAD_MB_HalfPel[3] = &SAD_MB_HP_HTFMxhyh;
+        encvid->sad_extra_info = (void*)(encvid->nrmlz_th);
+        offset = encvid->nrmlz_th + 16;
+        offset2 = encvid->nrmlz_th + 32;
+    }
+
+    offset[0] = 0;
+    offset[1] = lx2 + 2;
+    offset[2] = 2;
+    offset[3] = lx2;
+    offset[4] = lx + 1;
+    offset[5] = lx3 + 3;
+    offset[6] = lx + 3;
+    offset[7] = lx3 + 1;
+    offset[8] = lx;
+    offset[9] = lx3 + 2;
+    offset[10] = lx3 ;
+    offset[11] = lx + 2 ;
+    offset[12] = 1;
+    offset[13] = lx2 + 3;
+    offset[14] = lx2 + 1;
+    offset[15] = 3;
+
+    offset2[0] = 0;
+    offset2[1] = rx2 + 2;
+    offset2[2] = 2;
+    offset2[3] = rx2;
+    offset2[4] = rx + 1;
+    offset2[5] = rx3 + 3;
+    offset2[6] = rx + 3;
+    offset2[7] = rx3 + 1;
+    offset2[8] = rx;
+    offset2[9] = rx3 + 2;
+    offset2[10] = rx3 ;
+    offset2[11] = rx + 2 ;
+    offset2[12] = 1;
+    offset2[13] = rx2 + 3;
+    offset2[14] = rx2 + 1;
+    offset2[15] = 3;
+
+    return ;
+}
+
+void UpdateHTFM(AVCEncObject *encvid, double *newvar, double *exp_lamda, HTFM_Stat *htfm_stat)
+{
+    if (htfm_stat->countbreak == 0)
+        htfm_stat->countbreak = 1;
+
+    newvar[0] = (double)(htfm_stat->abs_dif_mad_avg) / (htfm_stat->countbreak * 16.);
+
+    if (newvar[0] < 0.001)
+    {
+        newvar[0] = 0.001; /* to prevent floating overflow */
+    }
+    exp_lamda[0] =  1 / (newvar[0] * 1.4142136);
+    exp_lamda[1] = exp_lamda[0] * 1.5825;
+    exp_lamda[2] = exp_lamda[0] * 2.1750;
+    exp_lamda[3] = exp_lamda[0] * 3.5065;
+    exp_lamda[4] = exp_lamda[0] * 3.1436;
+    exp_lamda[5] = exp_lamda[0] * 3.5315;
+    exp_lamda[6] = exp_lamda[0] * 3.7449;
+    exp_lamda[7] = exp_lamda[0] * 4.5854;
+    exp_lamda[8] = exp_lamda[0] * 4.6191;
+    exp_lamda[9] = exp_lamda[0] * 5.4041;
+    exp_lamda[10] = exp_lamda[0] * 6.5974;
+    exp_lamda[11] = exp_lamda[0] * 10.5341;
+    exp_lamda[12] = exp_lamda[0] * 10.0719;
+    exp_lamda[13] = exp_lamda[0] * 12.0516;
+    exp_lamda[14] = exp_lamda[0] * 15.4552;
+
+    CalcThreshold(HTFM_Pf, exp_lamda, encvid->nrmlz_th);
+    return ;
+}
+
+
+void CalcThreshold(double pf, double exp_lamda[], int nrmlz_th[])
+{
+    int i;
+    double temp[15];
+    //  printf("\nLamda: ");
+
+    /* parametric PREMODELling */
+    for (i = 0; i < 15; i++)
+    {
+        //    printf("%g ",exp_lamda[i]);
+        if (pf < 0.5)
+            temp[i] = 1 / exp_lamda[i] * M4VENC_LOG(2 * pf);
+        else
+            temp[i] = -1 / exp_lamda[i] * M4VENC_LOG(2 * (1 - pf));
+    }
+
+    nrmlz_th[15] = 0;
+    for (i = 0; i < 15; i++)        /* scale upto no.pixels */
+        nrmlz_th[i] = (int)(temp[i] * ((i + 1) << 4) + 0.5);
+
+    return ;
+}
+
+void    HTFMPrepareCurMB_AVC(AVCEncObject *encvid, HTFM_Stat *htfm_stat, uint8 *cur, int pitch)
+{
+    AVCCommonObj *video = encvid->common;
+    uint32 *htfmMB = (uint32*)(encvid->currYMB);
+    uint8 *ptr, byte;
+    int *offset;
+    int i;
+    uint32 word;
+
+    if (((int)video->sliceHdr->frame_num) % 30 == 1)
+    {
+        offset = htfm_stat->offsetArray;
+    }
+    else
+    {
+        offset = encvid->nrmlz_th + 16;
+    }
+
+    for (i = 0; i < 16; i++)
+    {
+        ptr = cur + offset[i];
+        word = ptr[0];
+        byte = ptr[4];
+        word |= (byte << 8);
+        byte = ptr[8];
+        word |= (byte << 16);
+        byte = ptr[12];
+        word |= (byte << 24);
+        *htfmMB++ = word;
+
+        word = *(ptr += (pitch << 2));
+        byte = ptr[4];
+        word |= (byte << 8);
+        byte = ptr[8];
+        word |= (byte << 16);
+        byte = ptr[12];
+        word |= (byte << 24);
+        *htfmMB++ = word;
+
+        word = *(ptr += (pitch << 2));
+        byte = ptr[4];
+        word |= (byte << 8);
+        byte = ptr[8];
+        word |= (byte << 16);
+        byte = ptr[12];
+        word |= (byte << 24);
+        *htfmMB++ = word;
+
+        word = *(ptr += (pitch << 2));
+        byte = ptr[4];
+        word |= (byte << 8);
+        byte = ptr[8];
+        word |= (byte << 16);
+        byte = ptr[12];
+        word |= (byte << 24);
+        *htfmMB++ = word;
+    }
+
+    return ;
+}
+
+
+#endif // HTFM
+
+void    AVCPrepareCurMB(AVCEncObject *encvid, uint8 *cur, int pitch)
+{
+    void* tmp = (void*)(encvid->currYMB);
+    uint32 *currYMB = (uint32*) tmp;
+    int i;
+
+    cur -= pitch;
+
+    for (i = 0; i < 16; i++)
+    {
+        *currYMB++ = *((uint32*)(cur += pitch));
+        *currYMB++ = *((uint32*)(cur + 4));
+        *currYMB++ = *((uint32*)(cur + 8));
+        *currYMB++ = *((uint32*)(cur + 12));
+    }
+
+    return ;
+}
+
+#ifdef FIXED_INTERPRED_MODE
+
+/* due to the complexity of the predicted motion vector, we may not decide to skip
+a macroblock here just yet. */
+/* We will find the best motion vector and the best intra prediction mode for each block. */
+/* output are
+    currMB->NumMbPart,  currMB->MbPartWidth, currMB->MbPartHeight,
+    currMB->NumSubMbPart[], currMB->SubMbPartWidth[], currMB->SubMbPartHeight,
+    currMB->MBPartPredMode[][] (L0 or L1 or BiPred)
+    currMB->RefIdx[], currMB->ref_idx_L0[],
+    currMB->mvL0[], currMB->mvL1[]
+    */
+
+AVCEnc_Status AVCMBMotionSearch(AVCEncObject *encvid, AVCMacroblock *currMB, int mbNum,
+                                int num_pass)
+{
+    AVCCommonObj *video = encvid->common;
+    int mbPartIdx, subMbPartIdx;
+    int16 *mv;
+    int i;
+    int SubMbPartHeight, SubMbPartWidth, NumSubMbPart;
+
+    /* assign value to currMB->MBPartPredMode[][x],subMbMode[],NumSubMbPart[],SubMbPartWidth[],SubMbPartHeight[] */
+
+    currMB->mbMode = FIXED_INTERPRED_MODE;
+    currMB->mb_intra = 0;
+
+    if (currMB->mbMode == AVC_P16)
+    {
+        currMB->NumMbPart = 1;
+        currMB->MbPartWidth = 16;
+        currMB->MbPartHeight = 16;
+        currMB->SubMbPartHeight[0] = 16;
+        currMB->SubMbPartWidth[0] = 16;
+        currMB->NumSubMbPart[0] =  1;
+    }
+    else if (currMB->mbMode == AVC_P16x8)
+    {
+        currMB->NumMbPart = 2;
+        currMB->MbPartWidth = 16;
+        currMB->MbPartHeight = 8;
+        for (i = 0; i < 2; i++)
+        {
+            currMB->SubMbPartWidth[i] = 16;
+            currMB->SubMbPartHeight[i] = 8;
+            currMB->NumSubMbPart[i] = 1;
+        }
+    }
+    else if (currMB->mbMode == AVC_P8x16)
+    {
+        currMB->NumMbPart = 2;
+        currMB->MbPartWidth = 8;
+        currMB->MbPartHeight = 16;
+        for (i = 0; i < 2; i++)
+        {
+            currMB->SubMbPartWidth[i] = 8;
+            currMB->SubMbPartHeight[i] = 16;
+            currMB->NumSubMbPart[i] = 1;
+        }
+    }
+    else if (currMB->mbMode == AVC_P8 || currMB->mbMode == AVC_P8ref0)
+    {
+        currMB->NumMbPart = 4;
+        currMB->MbPartWidth = 8;
+        currMB->MbPartHeight = 8;
+        if (FIXED_SUBMB_MODE == AVC_8x8)
+        {
+            SubMbPartHeight = 8;
+            SubMbPartWidth = 8;
+            NumSubMbPart = 1;
+        }
+        else if (FIXED_SUBMB_MODE == AVC_8x4)
+        {
+            SubMbPartHeight = 4;
+            SubMbPartWidth = 8;
+            NumSubMbPart = 2;
+        }
+        else if (FIXED_SUBMB_MODE == AVC_4x8)
+        {
+            SubMbPartHeight = 8;
+            SubMbPartWidth = 4;
+            NumSubMbPart = 2;
+        }
+        else if (FIXED_SUBMB_MODE == AVC_4x4)
+        {
+            SubMbPartHeight = 4;
+            SubMbPartWidth = 4;
+            NumSubMbPart = 4;
+        }
+
+        for (i = 0; i < 4; i++)
+        {
+            currMB->subMbMode[i] = FIXED_SUBMB_MODE;
+            currMB->SubMbPartHeight[i] = SubMbPartHeight;
+            currMB->SubMbPartWidth[i] = SubMbPartWidth;
+            currMB->NumSubMbPart[i] = NumSubMbPart;
+        }
+    }
+    else /* it's probably intra mode */
+    {
+        return AVCENC_SUCCESS;
+    }
+
+    for (mbPartIdx = 0; mbPartIdx < 4; mbPartIdx++)
+    {
+        currMB->MBPartPredMode[mbPartIdx][0]  = AVC_Pred_L0;
+        currMB->ref_idx_L0[mbPartIdx] = FIXED_REF_IDX;
+        currMB->RefIdx[mbPartIdx] = video->RefPicList0[FIXED_REF_IDX]->RefIdx;
+
+        for (subMbPartIdx = 0; subMbPartIdx < 4; subMbPartIdx++)
+        {
+            mv = (int16*)(currMB->mvL0 + (mbPartIdx << 2) + subMbPartIdx);
+
+            *mv++ = FIXED_MVX;
+            *mv = FIXED_MVY;
+        }
+    }
+
+    encvid->min_cost = 0;
+
+    return AVCENC_SUCCESS;
+}
+
+#else /* perform the search */
+
+/* This option #1 search is very similar to PV's MPEG4 motion search algorithm.
+  The search is done in hierarchical manner from 16x16 MB down to smaller and smaller
+  partition. At each level, a decision can be made to stop the search if the expected
+  prediction gain is not worth the computation. The decision can also be made at the finest
+  level for more fullsearch-like behavior with the price of heavier computation. */
+void AVCMBMotionSearch(AVCEncObject *encvid, uint8 *cur, uint8 *best_cand[],
+                       int i0, int j0, int type_pred, int FS_en, int *hp_guess)
+{
+    AVCCommonObj *video = encvid->common;
+    AVCPictureData *currPic = video->currPic;
+    AVCSeqParamSet *currSPS = video->currSeqParams;
+    AVCRateControl *rateCtrl = encvid->rateCtrl;
+    AVCMacroblock *currMB = video->currMB;
+    uint8 *ref, *cand, *ncand;
+    void *extra_info = encvid->sad_extra_info;
+    int mbnum = video->mbNum;
+    int width = currPic->width; /* 6/12/01, must be multiple of 16 */
+    int height = currPic->height;
+    AVCMV *mot16x16 = encvid->mot16x16;
+    int (*SAD_Macroblock)(uint8*, uint8*, int, void*) = encvid->functionPointer->SAD_Macroblock;
+
+    int range = rateCtrl->mvRange;
+
+    int lx = currPic->pitch; /*  padding */
+    int i, j, imin, jmin, ilow, ihigh, jlow, jhigh;
+    int d, dmin, dn[9];
+    int k;
+    int mvx[5], mvy[5];
+    int num_can, center_again;
+    int last_loc, new_loc = 0;
+    int step, max_step = range >> 1;
+    int next;
+
+    int cmvx, cmvy; /* estimated predicted MV */
+    int lev_idx;
+    int lambda_motion = encvid->lambda_motion;
+    uint8 *mvbits = encvid->mvbits;
+    int mvshift = 2;
+    int mvcost;
+
+    int min_sad = 65535;
+
+    ref = video->RefPicList0[DEFAULT_REF_IDX]->Sl; /* origin of actual frame */
+
+    /* have to initialize these params, necessary for interprediction part */
+    currMB->NumMbPart = 1;
+    currMB->SubMbPartHeight[0] = 16;
+    currMB->SubMbPartWidth[0] = 16;
+    currMB->NumSubMbPart[0] = 1;
+    currMB->ref_idx_L0[0] = currMB->ref_idx_L0[1] =
+                                currMB->ref_idx_L0[2] = currMB->ref_idx_L0[3] = DEFAULT_REF_IDX;
+    currMB->ref_idx_L1[0] = currMB->ref_idx_L1[1] =
+                                currMB->ref_idx_L1[2] = currMB->ref_idx_L1[3] = DEFAULT_REF_IDX;
+    currMB->RefIdx[0] = currMB->RefIdx[1] =
+                            currMB->RefIdx[2] = currMB->RefIdx[3] = video->RefPicList0[DEFAULT_REF_IDX]->RefIdx;
+
+    cur = encvid->currYMB; /* use smaller memory space for current MB */
+
+    /*  find limit of the search (adjusting search range)*/
+    lev_idx = mapLev2Idx[currSPS->level_idc];
+
+    /* we can make this part dynamic based on previous statistics */
+    ilow = i0 - range;
+    if (i0 - ilow > 2047) /* clip to conform with the standard */
+    {
+        ilow = i0 - 2047;
+    }
+    if (ilow < -13)  // change it from -15 to -13 because of 6-tap filter needs extra 2 lines.
+    {
+        ilow = -13;
+    }
+
+    ihigh = i0 + range - 1;
+    if (ihigh - i0 > 2047) /* clip to conform with the standard */
+    {
+        ihigh = i0 + 2047;
+    }
+    if (ihigh > width - 3)
+    {
+        ihigh = width - 3;  // change from width-1 to width-3 for the same reason as above
+    }
+
+    jlow = j0 - range;
+    if (j0 - jlow > MaxVmvR[lev_idx] - 1) /* clip to conform with the standard */
+    {
+        jlow = j0 - MaxVmvR[lev_idx] + 1;
+    }
+    if (jlow < -13)     // same reason as above
+    {
+        jlow = -13;
+    }
+
+    jhigh = j0 + range - 1;
+    if (jhigh - j0 > MaxVmvR[lev_idx] - 1) /* clip to conform with the standard */
+    {
+        jhigh = j0 + MaxVmvR[lev_idx] - 1;
+    }
+    if (jhigh > height - 3) // same reason as above
+    {
+        jhigh = height - 3;
+    }
+
+    /* find initial motion vector & predicted MV*/
+    AVCCandidateSelection(mvx, mvy, &num_can, i0 >> 4, j0 >> 4, encvid, type_pred, &cmvx, &cmvy);
+
+    imin = i0;
+    jmin = j0; /* needed for fullsearch */
+    ncand = ref + i0 + j0 * lx;
+
+    /* for first row of MB, fullsearch can be used */
+    if (FS_en)
+    {
+        *hp_guess = 0; /* no guess for fast half-pel */
+
+        dmin =  AVCFullSearch(encvid, ref, cur, &imin, &jmin, ilow, ihigh, jlow, jhigh, cmvx, cmvy);
+
+        ncand = ref + imin + jmin * lx;
+    }
+    else
+    {   /*       fullsearch the top row to only upto (0,3) MB */
+        /*       upto 30% complexity saving with the same complexity */
+        if (video->PrevRefFrameNum == 0 && j0 == 0 && i0 <= 64 && type_pred != 1)
+        {
+            *hp_guess = 0; /* no guess for fast half-pel */
+            dmin =  AVCFullSearch(encvid, ref, cur, &imin, &jmin, ilow, ihigh, jlow, jhigh, cmvx, cmvy);
+            ncand = ref + imin + jmin * lx;
+        }
+        else
+        {
+            /************** initialize candidate **************************/
+
+            dmin = 65535;
+
+            /* check if all are equal */
+            if (num_can == ALL_CAND_EQUAL)
+            {
+                i = i0 + mvx[0];
+                j = j0 + mvy[0];
+
+                if (i >= ilow && i <= ihigh && j >= jlow && j <= jhigh)
+                {
+                    cand = ref + i + j * lx;
+
+                    d = (*SAD_Macroblock)(cand, cur, (dmin << 16) | lx, extra_info);
+                    mvcost = MV_COST(lambda_motion, mvshift, i - i0, j - j0, cmvx, cmvy);
+                    d +=  mvcost;
+
+                    if (d < dmin)
+                    {
+                        dmin = d;
+                        imin = i;
+                        jmin = j;
+                        ncand = cand;
+                        min_sad = d - mvcost; // for rate control
+                    }
+                }
+            }
+            else
+            {
+                /************** evaluate unique candidates **********************/
+                for (k = 0; k < num_can; k++)
+                {
+                    i = i0 + mvx[k];
+                    j = j0 + mvy[k];
+
+                    if (i >= ilow && i <= ihigh && j >= jlow && j <= jhigh)
+                    {
+                        cand = ref + i + j * lx;
+                        d = (*SAD_Macroblock)(cand, cur, (dmin << 16) | lx, extra_info);
+                        mvcost = MV_COST(lambda_motion, mvshift, i - i0, j - j0, cmvx, cmvy);
+                        d +=  mvcost;
+
+                        if (d < dmin)
+                        {
+                            dmin = d;
+                            imin = i;
+                            jmin = j;
+                            ncand = cand;
+                            min_sad = d - mvcost; // for rate control
+                        }
+                    }
+                }
+            }
+
+            /******************* local refinement ***************************/
+            center_again = 0;
+            last_loc = new_loc = 0;
+            //          ncand = ref + jmin*lx + imin;  /* center of the search */
+            step = 0;
+            dn[0] = dmin;
+            while (!center_again && step <= max_step)
+            {
+
+                AVCMoveNeighborSAD(dn, last_loc);
+
+                center_again = 1;
+                i = imin;
+                j = jmin - 1;
+                cand = ref + i + j * lx;
+
+                /*  starting from [0,-1] */
+                /* spiral check one step at a time*/
+                for (k = 2; k <= 8; k += 2)
+                {
+                    if (!tab_exclude[last_loc][k]) /* exclude last step computation */
+                    {       /* not already computed */
+                        if (i >= ilow && i <= ihigh && j >= jlow && j <= jhigh)
+                        {
+                            d = (*SAD_Macroblock)(cand, cur, (dmin << 16) | lx, extra_info);
+                            mvcost = MV_COST(lambda_motion, mvshift, i - i0, j - j0, cmvx, cmvy);
+                            d += mvcost;
+
+                            dn[k] = d; /* keep it for half pel use */
+
+                            if (d < dmin)
+                            {
+                                ncand = cand;
+                                dmin = d;
+                                imin = i;
+                                jmin = j;
+                                center_again = 0;
+                                new_loc = k;
+                                min_sad = d - mvcost; // for rate control
+                            }
+                        }
+                    }
+                    if (k == 8)  /* end side search*/
+                    {
+                        if (!center_again)
+                        {
+                            k = -1; /* start diagonal search */
+                            cand -= lx;
+                            j--;
+                        }
+                    }
+                    else
+                    {
+                        next = refine_next[k][0];
+                        i += next;
+                        cand += next;
+                        next = refine_next[k][1];
+                        j += next;
+                        cand += lx * next;
+                    }
+                }
+                last_loc = new_loc;
+                step ++;
+            }
+            if (!center_again)
+                AVCMoveNeighborSAD(dn, last_loc);
+
+            *hp_guess = AVCFindMin(dn);
+
+            encvid->rateCtrl->MADofMB[mbnum] = min_sad / 256.0;
+        }
+    }
+
+    mot16x16[mbnum].sad = dmin;
+    mot16x16[mbnum].x = (imin - i0) << 2;
+    mot16x16[mbnum].y = (jmin - j0) << 2;
+    best_cand[0] = ncand;
+
+    if (rateCtrl->subPelEnable) // always enable half-pel search
+    {
+        /* find half-pel resolution motion vector */
+        min_sad = AVCFindHalfPelMB(encvid, cur, mot16x16 + mbnum, best_cand[0], i0, j0, *hp_guess, cmvx, cmvy);
+
+        encvid->rateCtrl->MADofMB[mbnum] = min_sad / 256.0;
+
+
+        if (encvid->best_qpel_pos == -1)
+        {
+            ncand = encvid->hpel_cand[encvid->best_hpel_pos];
+        }
+        else
+        {
+            ncand = encvid->qpel_cand[encvid->best_qpel_pos];
+        }
+    }
+    else
+    {
+        encvid->rateCtrl->MADofMB[mbnum] = min_sad / 256.0;
+    }
+
+    /** do motion comp here for now */
+    ref = currPic->Sl + i0 + j0 * lx;
+    /* copy from the best result to current Picture */
+    for (j = 0; j < 16; j++)
+    {
+        for (i = 0; i < 16; i++)
+        {
+            *ref++ = *ncand++;
+        }
+        ref += (lx - 16);
+        ncand += 8;
+    }
+
+    return ;
+}
+
+#endif
+
+/*===============================================================================
+    Function:   AVCFullSearch
+    Date:       09/16/2000
+    Purpose:    Perform full-search motion estimation over the range of search
+                region in a spiral-outward manner.
+    Input/Output:   VideoEncData, current Vol, previou Vop, pointer to the left corner of
+                current VOP, current coord (also output), boundaries.
+===============================================================================*/
+int AVCFullSearch(AVCEncObject *encvid, uint8 *prev, uint8 *cur,
+                  int *imin, int *jmin, int ilow, int ihigh, int jlow, int jhigh,
+                  int cmvx, int cmvy)
+{
+    int range = encvid->rateCtrl->mvRange;
+    AVCPictureData *currPic = encvid->common->currPic;
+    uint8 *cand;
+    int i, j, k, l;
+    int d, dmin;
+    int i0 = *imin; /* current position */
+    int j0 = *jmin;
+    int (*SAD_Macroblock)(uint8*, uint8*, int, void*) = encvid->functionPointer->SAD_Macroblock;
+    void *extra_info = encvid->sad_extra_info;
+    int lx = currPic->pitch; /* with padding */
+
+    int offset = i0 + j0 * lx;
+
+    int lambda_motion = encvid->lambda_motion;
+    uint8 *mvbits = encvid->mvbits;
+    int mvshift = 2;
+    int mvcost;
+    int min_sad;
+
+    cand = prev + offset;
+
+    dmin  = (*SAD_Macroblock)(cand, cur, (65535 << 16) | lx, (void*)extra_info);
+    mvcost = MV_COST(lambda_motion, mvshift, 0, 0, cmvx, cmvy);
+    min_sad = dmin;
+    dmin += mvcost;
+
+    /* perform spiral search */
+    for (k = 1; k <= range; k++)
+    {
+
+        i = i0 - k;
+        j = j0 - k;
+
+        cand = prev + i + j * lx;
+
+        for (l = 0; l < 8*k; l++)
+        {
+            /* no need for boundary checking again */
+            if (i >= ilow && i <= ihigh && j >= jlow && j <= jhigh)
+            {
+                d = (*SAD_Macroblock)(cand, cur, (dmin << 16) | lx, (void*)extra_info);
+                mvcost = MV_COST(lambda_motion, mvshift, i - i0, j - j0, cmvx, cmvy);
+                d +=  mvcost;
+
+                if (d < dmin)
+                {
+                    dmin = d;
+                    *imin = i;
+                    *jmin = j;
+                    min_sad = d - mvcost;
+                }
+            }
+
+            if (l < (k << 1))
+            {
+                i++;
+                cand++;
+            }
+            else if (l < (k << 2))
+            {
+                j++;
+                cand += lx;
+            }
+            else if (l < ((k << 2) + (k << 1)))
+            {
+                i--;
+                cand--;
+            }
+            else
+            {
+                j--;
+                cand -= lx;
+            }
+        }
+    }
+
+    encvid->rateCtrl->MADofMB[encvid->common->mbNum] = (min_sad / 256.0); // for rate control
+
+    return dmin;
+}
+
+/*===============================================================================
+    Function:   AVCCandidateSelection
+    Date:       09/16/2000
+    Purpose:    Fill up the list of candidate using spatio-temporal correlation
+                among neighboring blocks.
+    Input/Output:   type_pred = 0: first pass, 1: second pass, or no SCD
+    Modified:   , 09/23/01, get rid of redundant candidates before passing back.
+                , 09/11/07, added return for modified predicted MV, this will be
+                    needed for both fast search and fullsearch.
+===============================================================================*/
+
+void AVCCandidateSelection(int *mvx, int *mvy, int *num_can, int imb, int jmb,
+                           AVCEncObject *encvid, int type_pred, int *cmvx, int *cmvy)
+{
+    AVCCommonObj *video = encvid->common;
+    AVCMV *mot16x16 = encvid->mot16x16;
+    AVCMV *pmot;
+    int mbnum = video->mbNum;
+    int mbwidth = video->PicWidthInMbs;
+    int mbheight = video->PicHeightInMbs;
+    int i, j, same, num1;
+
+    /* this part is for predicted MV */
+    int pmvA_x = 0, pmvA_y = 0, pmvB_x = 0, pmvB_y = 0, pmvC_x = 0, pmvC_y = 0;
+    int availA = 0, availB = 0, availC = 0;
+
+    *num_can = 0;
+
+    if (video->PrevRefFrameNum != 0) // previous frame is an IDR frame
+    {
+        /* Spatio-Temporal Candidate (five candidates) */
+        if (type_pred == 0) /* first pass */
+        {
+            pmot = &mot16x16[mbnum]; /* same coordinate previous frame */
+            mvx[(*num_can)] = (pmot->x) >> 2;
+            mvy[(*num_can)++] = (pmot->y) >> 2;
+            if (imb >= (mbwidth >> 1) && imb > 0)  /*left neighbor previous frame */
+            {
+                pmot = &mot16x16[mbnum-1];
+                mvx[(*num_can)] = (pmot->x) >> 2;
+                mvy[(*num_can)++] = (pmot->y) >> 2;
+            }
+            else if (imb + 1 < mbwidth)   /*right neighbor previous frame */
+            {
+                pmot = &mot16x16[mbnum+1];
+                mvx[(*num_can)] = (pmot->x) >> 2;
+                mvy[(*num_can)++] = (pmot->y) >> 2;
+            }
+
+            if (jmb < mbheight - 1)  /*bottom neighbor previous frame */
+            {
+                pmot = &mot16x16[mbnum+mbwidth];
+                mvx[(*num_can)] = (pmot->x) >> 2;
+                mvy[(*num_can)++] = (pmot->y) >> 2;
+            }
+            else if (jmb > 0)   /*upper neighbor previous frame */
+            {
+                pmot = &mot16x16[mbnum-mbwidth];
+                mvx[(*num_can)] = (pmot->x) >> 2;
+                mvy[(*num_can)++] = (pmot->y) >> 2;
+            }
+
+            if (imb > 0 && jmb > 0)  /* upper-left neighbor current frame*/
+            {
+                pmot = &mot16x16[mbnum-mbwidth-1];
+                mvx[(*num_can)] = (pmot->x) >> 2;
+                mvy[(*num_can)++] = (pmot->y) >> 2;
+            }
+            if (jmb > 0 && imb < mbheight - 1)  /* upper right neighbor current frame*/
+            {
+                pmot = &mot16x16[mbnum-mbwidth+1];
+                mvx[(*num_can)] = (pmot->x) >> 2;
+                mvy[(*num_can)++] = (pmot->y) >> 2;
+            }
+        }
+        else    /* second pass */
+            /* original ST1 algorithm */
+        {
+            pmot = &mot16x16[mbnum]; /* same coordinate previous frame */
+            mvx[(*num_can)] = (pmot->x) >> 2;
+            mvy[(*num_can)++] = (pmot->y) >> 2;
+
+            if (imb > 0)  /*left neighbor current frame */
+            {
+                pmot = &mot16x16[mbnum-1];
+                mvx[(*num_can)] = (pmot->x) >> 2;
+                mvy[(*num_can)++] = (pmot->y) >> 2;
+            }
+            if (jmb > 0)  /*upper neighbor current frame */
+            {
+                pmot = &mot16x16[mbnum-mbwidth];
+                mvx[(*num_can)] = (pmot->x) >> 2;
+                mvy[(*num_can)++] = (pmot->y) >> 2;
+            }
+            if (imb < mbwidth - 1)  /*right neighbor previous frame */
+            {
+                pmot = &mot16x16[mbnum+1];
+                mvx[(*num_can)] = (pmot->x) >> 2;
+                mvy[(*num_can)++] = (pmot->y) >> 2;
+            }
+            if (jmb < mbheight - 1)  /*bottom neighbor previous frame */
+            {
+                pmot = &mot16x16[mbnum+mbwidth];
+                mvx[(*num_can)] = (pmot->x) >> 2;
+                mvy[(*num_can)++] = (pmot->y) >> 2;
+            }
+        }
+
+        /* get predicted MV */
+        if (imb > 0)    /* get MV from left (A) neighbor either on current or previous frame */
+        {
+            availA = 1;
+            pmot = &mot16x16[mbnum-1];
+            pmvA_x = pmot->x;
+            pmvA_y = pmot->y;
+        }
+
+        if (jmb > 0) /* get MV from top (B) neighbor either on current or previous frame */
+        {
+            availB = 1;
+            pmot = &mot16x16[mbnum-mbwidth];
+            pmvB_x = pmot->x;
+            pmvB_y = pmot->y;
+
+            availC = 1;
+
+            if (imb < mbwidth - 1) /* get MV from top-right (C) neighbor of current frame */
+            {
+                pmot = &mot16x16[mbnum-mbwidth+1];
+            }
+            else /* get MV from top-left (D) neighbor of current frame */
+            {
+                pmot = &mot16x16[mbnum-mbwidth-1];
+            }
+            pmvC_x = pmot->x;
+            pmvC_y = pmot->y;
+        }
+
+    }
+    else  /* only Spatial Candidate (four candidates)*/
+    {
+        if (type_pred == 0) /*first pass*/
+        {
+            if (imb > 1)  /* neighbor two blocks away to the left */
+            {
+                pmot = &mot16x16[mbnum-2];
+                mvx[(*num_can)] = (pmot->x) >> 2;
+                mvy[(*num_can)++] = (pmot->y) >> 2;
+            }
+            if (imb > 0 && jmb > 0)  /* upper-left neighbor */
+            {
+                pmot = &mot16x16[mbnum-mbwidth-1];
+                mvx[(*num_can)] = (pmot->x) >> 2;
+                mvy[(*num_can)++] = (pmot->y) >> 2;
+            }
+            if (jmb > 0 && imb < mbheight - 1)  /* upper right neighbor */
+            {
+                pmot = &mot16x16[mbnum-mbwidth+1];
+                mvx[(*num_can)] = (pmot->x) >> 2;
+                mvy[(*num_can)++] = (pmot->y) >> 2;
+            }
+
+            /* get predicted MV */
+            if (imb > 1)    /* get MV from 2nd left (A) neighbor either of current frame */
+            {
+                availA = 1;
+                pmot = &mot16x16[mbnum-2];
+                pmvA_x = pmot->x;
+                pmvA_y = pmot->y;
+            }
+
+            if (jmb > 0 && imb > 0) /* get MV from top-left (B) neighbor of current frame */
+            {
+                availB = 1;
+                pmot = &mot16x16[mbnum-mbwidth-1];
+                pmvB_x = pmot->x;
+                pmvB_y = pmot->y;
+            }
+
+            if (jmb > 0 && imb < mbwidth - 1)
+            {
+                availC = 1;
+                pmot = &mot16x16[mbnum-mbwidth+1];
+                pmvC_x = pmot->x;
+                pmvC_y = pmot->y;
+            }
+        }
+//#ifdef SCENE_CHANGE_DETECTION
+        /* second pass (ST2 algorithm)*/
+        else
+        {
+            if (type_pred == 1) /*  4/7/01 */
+            {
+                if (imb > 0)  /*left neighbor current frame */
+                {
+                    pmot = &mot16x16[mbnum-1];
+                    mvx[(*num_can)] = (pmot->x) >> 2;
+                    mvy[(*num_can)++] = (pmot->y) >> 2;
+                }
+                if (jmb > 0)  /*upper neighbor current frame */
+                {
+                    pmot = &mot16x16[mbnum-mbwidth];
+                    mvx[(*num_can)] = (pmot->x) >> 2;
+                    mvy[(*num_can)++] = (pmot->y) >> 2;
+                }
+                if (imb < mbwidth - 1)  /*right neighbor current frame */
+                {
+                    pmot = &mot16x16[mbnum+1];
+                    mvx[(*num_can)] = (pmot->x) >> 2;
+                    mvy[(*num_can)++] = (pmot->y) >> 2;
+                }
+                if (jmb < mbheight - 1)  /*bottom neighbor current frame */
+                {
+                    pmot = &mot16x16[mbnum+mbwidth];
+                    mvx[(*num_can)] = (pmot->x) >> 2;
+                    mvy[(*num_can)++] = (pmot->y) >> 2;
+                }
+            }
+            //#else
+            else /* original ST1 algorithm */
+            {
+                if (imb > 0)  /*left neighbor current frame */
+                {
+                    pmot = &mot16x16[mbnum-1];
+                    mvx[(*num_can)] = (pmot->x) >> 2;
+                    mvy[(*num_can)++] = (pmot->y) >> 2;
+
+                    if (jmb > 0)  /*upper-left neighbor current frame */
+                    {
+                        pmot = &mot16x16[mbnum-mbwidth-1];
+                        mvx[(*num_can)] = (pmot->x) >> 2;
+                        mvy[(*num_can)++] = (pmot->y) >> 2;
+                    }
+
+                }
+                if (jmb > 0)  /*upper neighbor current frame */
+                {
+                    pmot = &mot16x16[mbnum-mbwidth];
+                    mvx[(*num_can)] = (pmot->x) >> 2;
+                    mvy[(*num_can)++] = (pmot->y) >> 2;
+
+                    if (imb < mbheight - 1)  /*upper-right neighbor current frame */
+                    {
+                        pmot = &mot16x16[mbnum-mbwidth+1];
+                        mvx[(*num_can)] = (pmot->x) >> 2;
+                        mvy[(*num_can)++] = (pmot->y) >> 2;
+                    }
+                }
+            }
+
+            /* get predicted MV */
+            if (imb > 0)    /* get MV from left (A) neighbor either on current or previous frame */
+            {
+                availA = 1;
+                pmot = &mot16x16[mbnum-1];
+                pmvA_x = pmot->x;
+                pmvA_y = pmot->y;
+            }
+
+            if (jmb > 0) /* get MV from top (B) neighbor either on current or previous frame */
+            {
+                availB = 1;
+                pmot = &mot16x16[mbnum-mbwidth];
+                pmvB_x = pmot->x;
+                pmvB_y = pmot->y;
+
+                availC = 1;
+
+                if (imb < mbwidth - 1) /* get MV from top-right (C) neighbor of current frame */
+                {
+                    pmot = &mot16x16[mbnum-mbwidth+1];
+                }
+                else /* get MV from top-left (D) neighbor of current frame */
+                {
+                    pmot = &mot16x16[mbnum-mbwidth-1];
+                }
+                pmvC_x = pmot->x;
+                pmvC_y = pmot->y;
+            }
+        }
+//#endif
+    }
+
+    /*  3/23/01, remove redundant candidate (possible k-mean) */
+    num1 = *num_can;
+    *num_can = 1;
+    for (i = 1; i < num1; i++)
+    {
+        same = 0;
+        j = 0;
+        while (!same && j < *num_can)
+        {
+#if (CANDIDATE_DISTANCE==0)
+            if (mvx[i] == mvx[j] && mvy[i] == mvy[j])
+#else
+            // modified k-mean,  3/24/01, shouldn't be greater than 3
+            if (AVC_ABS(mvx[i] - mvx[j]) + AVC_ABS(mvy[i] - mvy[j]) < CANDIDATE_DISTANCE)
+#endif
+                same = 1;
+            j++;
+        }
+        if (!same)
+        {
+            mvx[*num_can] = mvx[i];
+            mvy[*num_can] = mvy[i];
+            (*num_can)++;
+        }
+    }
+
+    if (num1 == 5 && *num_can == 1)
+        *num_can = ALL_CAND_EQUAL; /* all are equal */
+
+    /* calculate predicted MV */
+
+    if (availA && !(availB || availC))
+    {
+        *cmvx = pmvA_x;
+        *cmvy = pmvA_y;
+    }
+    else
+    {
+        *cmvx = AVC_MEDIAN(pmvA_x, pmvB_x, pmvC_x);
+        *cmvy = AVC_MEDIAN(pmvA_y, pmvB_y, pmvC_y);
+    }
+
+    return ;
+}
+
+
+/*************************************************************
+    Function:   AVCMoveNeighborSAD
+    Date:       3/27/01
+    Purpose:    Move neighboring SAD around when center has shifted
+*************************************************************/
+
+void AVCMoveNeighborSAD(int dn[], int new_loc)
+{
+    int tmp[9];
+    tmp[0] = dn[0];
+    tmp[1] = dn[1];
+    tmp[2] = dn[2];
+    tmp[3] = dn[3];
+    tmp[4] = dn[4];
+    tmp[5] = dn[5];
+    tmp[6] = dn[6];
+    tmp[7] = dn[7];
+    tmp[8] = dn[8];
+    dn[0] = dn[1] = dn[2] = dn[3] = dn[4] = dn[5] = dn[6] = dn[7] = dn[8] = 65536;
+
+    switch (new_loc)
+    {
+        case 0:
+            break;
+        case 1:
+            dn[4] = tmp[2];
+            dn[5] = tmp[0];
+            dn[6] = tmp[8];
+            break;
+        case 2:
+            dn[4] = tmp[3];
+            dn[5] = tmp[4];
+            dn[6] = tmp[0];
+            dn[7] = tmp[8];
+            dn[8] = tmp[1];
+            break;
+        case 3:
+            dn[6] = tmp[4];
+            dn[7] = tmp[0];
+            dn[8] = tmp[2];
+            break;
+        case 4:
+            dn[1] = tmp[2];
+            dn[2] = tmp[3];
+            dn[6] = tmp[5];
+            dn[7] = tmp[6];
+            dn[8] = tmp[0];
+            break;
+        case 5:
+            dn[1] = tmp[0];
+            dn[2] = tmp[4];
+            dn[8] = tmp[6];
+            break;
+        case 6:
+            dn[1] = tmp[8];
+            dn[2] = tmp[0];
+            dn[3] = tmp[4];
+            dn[4] = tmp[5];
+            dn[8] = tmp[7];
+            break;
+        case 7:
+            dn[2] = tmp[8];
+            dn[3] = tmp[0];
+            dn[4] = tmp[6];
+            break;
+        case 8:
+            dn[2] = tmp[1];
+            dn[3] = tmp[2];
+            dn[4] = tmp[0];
+            dn[5] = tmp[6];
+            dn[6] = tmp[7];
+            break;
+    }
+    dn[0] = tmp[new_loc];
+
+    return ;
+}
+
+/*  3/28/01, find minimal of dn[9] */
+
+int AVCFindMin(int dn[])
+{
+    int min, i;
+    int dmin;
+
+    dmin = dn[1];
+    min = 1;
+    for (i = 2; i < 9; i++)
+    {
+        if (dn[i] < dmin)
+        {
+            dmin = dn[i];
+            min = i;
+        }
+    }
+
+    return min;
+}
+
+
+
diff --git a/media/libstagefright/codecs/avc/enc/src/rate_control.cpp b/media/libstagefright/codecs/avc/enc/src/rate_control.cpp
new file mode 100644
index 0000000..15b55fb
--- /dev/null
+++ b/media/libstagefright/codecs/avc/enc/src/rate_control.cpp
@@ -0,0 +1,981 @@
+/* ------------------------------------------------------------------
+ * Copyright (C) 1998-2009 PacketVideo
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
+ * express or implied.
+ * See the License for the specific language governing permissions
+ * and limitations under the License.
+ * -------------------------------------------------------------------
+ */
+#include "avcenc_lib.h"
+#include <math.h>
+
+/* rate control variables */
+#define RC_MAX_QUANT 51
+#define RC_MIN_QUANT 0   //cap to 10 to prevent rate fluctuation    
+
+#define MAD_MIN 1 /* handle the case of devision by zero in RC */
+
+
+/* local functions */
+double QP2Qstep(int QP);
+int Qstep2QP(double Qstep);
+
+double ComputeFrameMAD(AVCCommonObj *video, AVCRateControl *rateCtrl);
+
+void targetBitCalculation(AVCEncObject *encvid, AVCCommonObj *video, AVCRateControl *rateCtrl, MultiPass *pMP);
+
+void calculateQuantizer_Multipass(AVCEncObject *encvid, AVCCommonObj *video,
+                                  AVCRateControl *rateCtrl, MultiPass *pMP);
+
+void updateRC_PostProc(AVCRateControl *rateCtrl, MultiPass *pMP);
+
+void AVCSaveRDSamples(MultiPass *pMP, int counter_samples);
+
+void updateRateControl(AVCRateControl *rateControl, int nal_type);
+
+int GetAvgFrameQP(AVCRateControl *rateCtrl)
+{
+    return rateCtrl->Qc;
+}
+
+AVCEnc_Status RCDetermineFrameNum(AVCEncObject *encvid, AVCRateControl *rateCtrl, uint32 modTime, uint *frameNum)
+{
+    AVCCommonObj *video = encvid->common;
+    AVCSliceHeader *sliceHdr = video->sliceHdr;
+    uint32 modTimeRef = encvid->modTimeRef;
+    int32  currFrameNum ;
+    int  frameInc;
+
+
+    /* check with the buffer fullness to make sure that we have enough bits to encode this frame */
+    /* we can use a threshold to guarantee minimum picture quality */
+    /**********************************/
+
+    /* for now, the default is to encode every frame, To Be Changed */
+    if (rateCtrl->first_frame)
+    {
+        encvid->modTimeRef = modTime;
+        encvid->wrapModTime = 0;
+        encvid->prevFrameNum = 0;
+        encvid->prevProcFrameNum = 0;
+
+        *frameNum = 0;
+
+        /* set frame type to IDR-frame */
+        video->nal_unit_type = AVC_NALTYPE_IDR;
+        sliceHdr->slice_type = AVC_I_ALL_SLICE;
+        video->slice_type = AVC_I_SLICE;
+
+        return AVCENC_SUCCESS;
+    }
+    else
+    {
+        if (modTime < modTimeRef) /* modTime wrapped around */
+        {
+            encvid->wrapModTime += ((uint32)0xFFFFFFFF - modTimeRef) + 1;
+            encvid->modTimeRef = modTimeRef = 0;
+        }
+        modTime += encvid->wrapModTime; /* wrapModTime is non zero after wrap-around */
+
+        currFrameNum = (int32)(((modTime - modTimeRef) * rateCtrl->frame_rate + 200) / 1000); /* add small roundings */
+
+        if (currFrameNum <= (int32)encvid->prevProcFrameNum)
+        {
+            return AVCENC_FAIL;  /* this is a late frame do not encode it */
+        }
+
+        frameInc = currFrameNum - encvid->prevProcFrameNum;
+
+        if (frameInc < rateCtrl->skip_next_frame + 1)
+        {
+            return AVCENC_FAIL;  /* frame skip required to maintain the target bit rate. */
+        }
+
+        RCUpdateBuffer(video, rateCtrl, frameInc - rateCtrl->skip_next_frame);  /* in case more frames dropped */
+
+        *frameNum = currFrameNum;
+
+        /* This part would be similar to DetermineVopType of m4venc */
+        if ((*frameNum >= (uint)rateCtrl->idrPeriod && rateCtrl->idrPeriod > 0) || (*frameNum > video->MaxFrameNum)) /* first frame or IDR*/
+        {
+            /* set frame type to IDR-frame */
+            if (rateCtrl->idrPeriod)
+            {
+                encvid->modTimeRef += (uint32)(rateCtrl->idrPeriod * 1000 / rateCtrl->frame_rate);
+                *frameNum -= rateCtrl->idrPeriod;
+            }
+            else
+            {
+                encvid->modTimeRef += (uint32)(video->MaxFrameNum * 1000 / rateCtrl->frame_rate);
+                *frameNum -= video->MaxFrameNum;
+            }
+
+            video->nal_unit_type = AVC_NALTYPE_IDR;
+            sliceHdr->slice_type = AVC_I_ALL_SLICE;
+            video->slice_type = AVC_I_SLICE;
+            encvid->prevProcFrameNum = *frameNum;
+        }
+        else
+        {
+            video->nal_unit_type = AVC_NALTYPE_SLICE;
+            sliceHdr->slice_type = AVC_P_ALL_SLICE;
+            video->slice_type = AVC_P_SLICE;
+            encvid->prevProcFrameNum = currFrameNum;
+        }
+
+    }
+
+    return AVCENC_SUCCESS;
+}
+
+void RCUpdateBuffer(AVCCommonObj *video, AVCRateControl *rateCtrl, int frameInc)
+{
+    int tmp;
+    MultiPass *pMP = rateCtrl->pMP;
+
+    OSCL_UNUSED_ARG(video);
+
+    if (rateCtrl->rcEnable == TRUE)
+    {
+        if (frameInc > 1)
+        {
+            tmp = rateCtrl->bitsPerFrame * (frameInc - 1);
+            rateCtrl->VBV_fullness -= tmp;
+            pMP->counter_BTsrc += 10 * (frameInc - 1);
+
+            /* Check buffer underflow */
+            if (rateCtrl->VBV_fullness < rateCtrl->low_bound)
+            {
+                rateCtrl->VBV_fullness = rateCtrl->low_bound; // -rateCtrl->Bs/2;
+                rateCtrl->TMN_W = rateCtrl->VBV_fullness - rateCtrl->low_bound;
+                pMP->counter_BTsrc = pMP->counter_BTdst + (int)((OsclFloat)(rateCtrl->Bs / 2 - rateCtrl->low_bound) / 2.0 / (pMP->target_bits_per_frame / 10));
+            }
+        }
+    }
+}
+
+
+AVCEnc_Status InitRateControlModule(AVCHandle *avcHandle)
+{
+    AVCEncObject *encvid = (AVCEncObject*) avcHandle->AVCObject;
+    AVCCommonObj *video = encvid->common;
+    AVCRateControl *rateCtrl = encvid->rateCtrl;
+    double L1, L2, L3, bpp;
+    int qp;
+    int i, j;
+
+    rateCtrl->basicUnit = video->PicSizeInMbs;
+
+    rateCtrl->MADofMB = (double*) avcHandle->CBAVC_Malloc(encvid->avcHandle->userData,
+                        video->PicSizeInMbs * sizeof(double), DEFAULT_ATTR);
+
+    if (!rateCtrl->MADofMB)
+    {
+        goto CLEANUP_RC;
+    }
+
+    if (rateCtrl->rcEnable == TRUE)
+    {
+        rateCtrl->pMP = (MultiPass*) avcHandle->CBAVC_Malloc(encvid->avcHandle->userData, sizeof(MultiPass), DEFAULT_ATTR);
+        if (!rateCtrl->pMP)
+        {
+            goto CLEANUP_RC;
+        }
+        memset(rateCtrl->pMP, 0, sizeof(MultiPass));
+        rateCtrl->pMP->encoded_frames = -1; /* forget about the very first I frame */
+
+        /* RDInfo **pRDSamples */
+        rateCtrl->pMP->pRDSamples = (RDInfo **)avcHandle->CBAVC_Malloc(encvid->avcHandle->userData, (30 * sizeof(RDInfo *)), DEFAULT_ATTR);
+        if (!rateCtrl->pMP->pRDSamples)
+        {
+            goto CLEANUP_RC;
+        }
+
+        for (i = 0; i < 30; i++)
+        {
+            rateCtrl->pMP->pRDSamples[i] = (RDInfo *)avcHandle->CBAVC_Malloc(encvid->avcHandle->userData, (32 * sizeof(RDInfo)), DEFAULT_ATTR);
+            if (!rateCtrl->pMP->pRDSamples[i])
+            {
+                goto CLEANUP_RC;
+            }
+            for (j = 0; j < 32; j++)    memset(&(rateCtrl->pMP->pRDSamples[i][j]), 0, sizeof(RDInfo));
+        }
+        rateCtrl->pMP->frameRange = (int)(rateCtrl->frame_rate * 1.0); /* 1.0s time frame*/
+        rateCtrl->pMP->frameRange = AVC_MAX(rateCtrl->pMP->frameRange, 5);
+        rateCtrl->pMP->frameRange = AVC_MIN(rateCtrl->pMP->frameRange, 30);
+
+        rateCtrl->pMP->framePos = -1;
+
+
+        rateCtrl->bitsPerFrame = (int32)(rateCtrl->bitRate / rateCtrl->frame_rate);
+
+        /* BX rate control */
+        rateCtrl->skip_next_frame = 0; /* must be initialized */
+
+        rateCtrl->Bs = rateCtrl->cpbSize;
+        rateCtrl->TMN_W = 0;
+        rateCtrl->VBV_fullness = (int)(rateCtrl->Bs * 0.5); /* rateCtrl->Bs */
+        rateCtrl->encoded_frames = 0;
+
+        rateCtrl->TMN_TH = rateCtrl->bitsPerFrame;
+
+        rateCtrl->max_BitVariance_num = (int)((OsclFloat)(rateCtrl->Bs - rateCtrl->VBV_fullness) / (rateCtrl->bitsPerFrame / 10.0)) - 5;
+        if (rateCtrl->max_BitVariance_num < 0) rateCtrl->max_BitVariance_num += 5;
+
+        // Set the initial buffer fullness
+        /* According to the spec, the initial buffer fullness needs to be set to 1/3 */
+        rateCtrl->VBV_fullness = (int)(rateCtrl->Bs / 3.0 - rateCtrl->Bs / 2.0); /* the buffer range is [-Bs/2, Bs/2] */
+        rateCtrl->pMP->counter_BTsrc = (int)((rateCtrl->Bs / 2.0 - rateCtrl->Bs / 3.0) / (rateCtrl->bitsPerFrame / 10.0));
+        rateCtrl->TMN_W = (int)(rateCtrl->VBV_fullness + rateCtrl->pMP->counter_BTsrc * (rateCtrl->bitsPerFrame / 10.0));
+
+        rateCtrl->low_bound = -rateCtrl->Bs / 2;
+        rateCtrl->VBV_fullness_offset = 0;
+
+        /* Setting the bitrate and framerate */
+        rateCtrl->pMP->bitrate = rateCtrl->bitRate;
+        rateCtrl->pMP->framerate = rateCtrl->frame_rate;
+        rateCtrl->pMP->target_bits_per_frame = rateCtrl->pMP->bitrate / rateCtrl->pMP->framerate;
+
+        /*compute the initial QP*/
+        bpp = 1.0 * rateCtrl->bitRate / (rateCtrl->frame_rate * (video->PicSizeInMbs << 8));
+        if (video->PicWidthInSamplesL == 176)
+        {
+            L1 = 0.1;
+            L2 = 0.3;
+            L3 = 0.6;
+        }
+        else if (video->PicWidthInSamplesL == 352)
+        {
+            L1 = 0.2;
+            L2 = 0.6;
+            L3 = 1.2;
+        }
+        else
+        {
+            L1 = 0.6;
+            L2 = 1.4;
+            L3 = 2.4;
+        }
+
+        if (rateCtrl->initQP == 0)
+        {
+            if (bpp <= L1)
+                qp = 35;
+            else if (bpp <= L2)
+                qp = 25;
+            else if (bpp <= L3)
+                qp = 20;
+            else
+                qp = 15;
+            rateCtrl->initQP = qp;
+        }
+
+        rateCtrl->Qc = rateCtrl->initQP;
+    }
+
+    return AVCENC_SUCCESS;
+
+CLEANUP_RC:
+
+    CleanupRateControlModule(avcHandle);
+    return AVCENC_MEMORY_FAIL;
+
+}
+
+
+void CleanupRateControlModule(AVCHandle *avcHandle)
+{
+    AVCEncObject *encvid = (AVCEncObject*) avcHandle->AVCObject;
+    AVCRateControl *rateCtrl = encvid->rateCtrl;
+    int i;
+
+    if (rateCtrl->MADofMB)
+    {
+        avcHandle->CBAVC_Free(avcHandle->userData, (int)(rateCtrl->MADofMB));
+    }
+
+    if (rateCtrl->pMP)
+    {
+        if (rateCtrl->pMP->pRDSamples)
+        {
+            for (i = 0; i < 30; i++)
+            {
+                if (rateCtrl->pMP->pRDSamples[i])
+                {
+                    avcHandle->CBAVC_Free(avcHandle->userData, (int)rateCtrl->pMP->pRDSamples[i]);
+                }
+            }
+            avcHandle->CBAVC_Free(avcHandle->userData, (int)rateCtrl->pMP->pRDSamples);
+        }
+        avcHandle->CBAVC_Free(avcHandle->userData, (int)(rateCtrl->pMP));
+    }
+
+    return ;
+}
+
+void RCInitGOP(AVCEncObject *encvid)
+{
+    /* in BX RC, there's no GOP-level RC */
+
+    OSCL_UNUSED_ARG(encvid);
+
+    return ;
+}
+
+
+void RCInitFrameQP(AVCEncObject *encvid)
+{
+    AVCCommonObj *video = encvid->common;
+    AVCRateControl *rateCtrl = encvid->rateCtrl;
+    AVCPicParamSet *picParam = video->currPicParams;
+    MultiPass *pMP = rateCtrl->pMP;
+
+    if (rateCtrl->rcEnable == TRUE)
+    {
+        /* frame layer rate control */
+        if (rateCtrl->encoded_frames == 0)
+        {
+            video->QPy = rateCtrl->Qc = rateCtrl->initQP;
+        }
+        else
+        {
+            calculateQuantizer_Multipass(encvid, video, rateCtrl, pMP);
+            video->QPy = rateCtrl->Qc;
+        }
+
+        rateCtrl->NumberofHeaderBits = 0;
+        rateCtrl->NumberofTextureBits = 0;
+        rateCtrl->numFrameBits = 0; // reset
+
+        /* update pMP->framePos */
+        if (++pMP->framePos == pMP->frameRange) pMP->framePos = 0;
+
+        if (rateCtrl->T == 0)
+        {
+            pMP->counter_BTdst = (int)(rateCtrl->frame_rate * 7.5 + 0.5); /* 0.75s time frame */
+            pMP->counter_BTdst = AVC_MIN(pMP->counter_BTdst, (int)(rateCtrl->max_BitVariance_num / 2 * 0.40)); /* 0.75s time frame may go beyond VBV buffer if we set the buffer size smaller than 0.75s */
+            pMP->counter_BTdst = AVC_MAX(pMP->counter_BTdst, (int)((rateCtrl->Bs / 2 - rateCtrl->VBV_fullness) * 0.30 / (rateCtrl->TMN_TH / 10.0) + 0.5)); /* At least 30% of VBV buffer size/2 */
+            pMP->counter_BTdst = AVC_MIN(pMP->counter_BTdst, 20); /* Limit the target to be smaller than 3C */
+
+            pMP->target_bits = rateCtrl->T = rateCtrl->TMN_TH = (int)(rateCtrl->TMN_TH * (1.0 + pMP->counter_BTdst * 0.1));
+            pMP->diff_counter = pMP->counter_BTdst;
+        }
+
+        /* collect the necessary data: target bits, actual bits, mad and QP */
+        pMP->target_bits = rateCtrl->T;
+        pMP->QP  = video->QPy;
+
+        pMP->mad = (OsclFloat)rateCtrl->totalSAD / video->PicSizeInMbs; //ComputeFrameMAD(video, rateCtrl);
+        if (pMP->mad < MAD_MIN) pMP->mad = MAD_MIN; /* MAD_MIN is defined as 1 in mp4def.h */
+
+        pMP->bitrate = rateCtrl->bitRate; /* calculated in RCVopQPSetting */
+        pMP->framerate = rateCtrl->frame_rate;
+
+        /* first pass encoding */
+        pMP->nRe_Quantized = 0;
+
+    } // rcEnable
+    else
+    {
+        video->QPy = rateCtrl->initQP;
+    }
+
+//  printf(" %d ",video->QPy);
+
+    if (video->CurrPicNum == 0 && encvid->outOfBandParamSet == FALSE)
+    {
+        picParam->pic_init_qs_minus26 = 0;
+        picParam->pic_init_qp_minus26 = video->QPy - 26;
+    }
+
+    // need this for motion estimation
+    encvid->lambda_mode = QP2QUANT[AVC_MAX(0, video->QPy-SHIFT_QP)];
+    encvid->lambda_motion = LAMBDA_FACTOR(encvid->lambda_mode);
+    return ;
+}
+
+/* Mad based variable bit allocation + QP calculation with a new quadratic method */
+void calculateQuantizer_Multipass(AVCEncObject *encvid, AVCCommonObj *video,
+                                  AVCRateControl *rateCtrl, MultiPass *pMP)
+{
+    int prev_actual_bits = 0, curr_target, /*pos=0,*/i, j;
+    OsclFloat Qstep, prev_QP = 0.625;
+
+    OsclFloat curr_mad, prev_mad, curr_RD, prev_RD, average_mad, aver_QP;
+
+    /* Mad based variable bit allocation */
+    targetBitCalculation(encvid, video, rateCtrl, pMP);
+
+    if (rateCtrl->T <= 0 || rateCtrl->totalSAD == 0)
+    {
+        if (rateCtrl->T < 0)    rateCtrl->Qc = RC_MAX_QUANT;
+        return;
+    }
+
+    /* ---------------------------------------------------------------------------------------------------*/
+    /* current frame QP estimation */
+    curr_target = rateCtrl->T;
+    curr_mad = (OsclFloat)rateCtrl->totalSAD / video->PicSizeInMbs;
+    if (curr_mad < MAD_MIN) curr_mad = MAD_MIN; /* MAD_MIN is defined as 1 in mp4def.h */
+    curr_RD  = (OsclFloat)curr_target / curr_mad;
+
+    if (rateCtrl->skip_next_frame == -1) // previous was skipped
+    {
+        i = pMP->framePos;
+        prev_mad = pMP->pRDSamples[i][0].mad;
+        prev_QP = pMP->pRDSamples[i][0].QP;
+        prev_actual_bits = pMP->pRDSamples[i][0].actual_bits;
+    }
+    else
+    {
+        /* Another version of search the optimal point */
+        prev_mad = 0.0;
+        i = 0;
+        while (i < pMP->frameRange && prev_mad < 0.001) /* find first one with nonzero prev_mad */
+        {
+            prev_mad = pMP->pRDSamples[i][0].mad;
+            i++;
+        }
+
+        if (i < pMP->frameRange)
+        {
+            prev_actual_bits = pMP->pRDSamples[i-1][0].actual_bits;
+
+            for (j = 0; i < pMP->frameRange; i++)
+            {
+                if (pMP->pRDSamples[i][0].mad != 0 &&
+                        AVC_ABS(prev_mad - curr_mad) > AVC_ABS(pMP->pRDSamples[i][0].mad - curr_mad))
+                {
+                    prev_mad = pMP->pRDSamples[i][0].mad;
+                    prev_actual_bits = pMP->pRDSamples[i][0].actual_bits;
+                    j = i;
+                }
+            }
+            prev_QP = QP2Qstep(pMP->pRDSamples[j][0].QP);
+
+            for (i = 1; i < pMP->samplesPerFrame[j]; i++)
+            {
+                if (AVC_ABS(prev_actual_bits - curr_target) > AVC_ABS(pMP->pRDSamples[j][i].actual_bits - curr_target))
+                {
+                    prev_actual_bits = pMP->pRDSamples[j][i].actual_bits;
+                    prev_QP = QP2Qstep(pMP->pRDSamples[j][i].QP);
+                }
+            }
+        }
+    }
+
+    // quadratic approximation
+    if (prev_mad > 0.001) // only when prev_mad is greater than 0, otherwise keep using the same QP
+    {
+        prev_RD = (OsclFloat)prev_actual_bits / prev_mad;
+        //rateCtrl->Qc = (Int)(prev_QP * sqrt(prev_actual_bits/curr_target) + 0.4);
+        if (prev_QP == 0.625) // added this to allow getting out of QP = 0 easily
+        {
+            Qstep = (int)(prev_RD / curr_RD + 0.5);
+        }
+        else
+        {
+            //      rateCtrl->Qc =(Int)(prev_QP * M4VENC_SQRT(prev_RD/curr_RD) + 0.9);
+
+            if (prev_RD / curr_RD > 0.5 && prev_RD / curr_RD < 2.0)
+                Qstep = (int)(prev_QP * (sqrt(prev_RD / curr_RD) + prev_RD / curr_RD) / 2.0 + 0.9); /* Quadratic and linear approximation */
+            else
+                Qstep = (int)(prev_QP * (sqrt(prev_RD / curr_RD) + pow(prev_RD / curr_RD, 1.0 / 3.0)) / 2.0 + 0.9);
+        }
+        // lower bound on Qc should be a function of curr_mad
+        // When mad is already low, lower bound on Qc doesn't have to be small.
+        // Note, this doesn't work well for low complexity clip encoded at high bit rate
+        // it doesn't hit the target bit rate due to this QP lower bound.
+        /// if((curr_mad < 8) && (rateCtrl->Qc < 12))   rateCtrl->Qc = 12;
+        //  else    if((curr_mad < 128) && (rateCtrl->Qc < 3)) rateCtrl->Qc = 3;
+
+        rateCtrl->Qc = Qstep2QP(Qstep);
+
+        if (rateCtrl->Qc < RC_MIN_QUANT) rateCtrl->Qc = RC_MIN_QUANT;
+        if (rateCtrl->Qc > RC_MAX_QUANT)    rateCtrl->Qc = RC_MAX_QUANT;
+    }
+
+    /* active bit resource protection */
+    aver_QP = (pMP->encoded_frames == 0 ? 0 : pMP->sum_QP / (OsclFloat)pMP->encoded_frames);
+    average_mad = (pMP->encoded_frames == 0 ? 0 : pMP->sum_mad / (OsclFloat)pMP->encoded_frames); /* this function is called from the scond encoded frame*/
+    if (pMP->diff_counter == 0 &&
+            ((OsclFloat)rateCtrl->Qc <= aver_QP*1.1 || curr_mad <= average_mad*1.1) &&
+            pMP->counter_BTsrc <= (pMP->counter_BTdst + (int)(pMP->framerate*1.0 + 0.5)))
+    {
+        rateCtrl->TMN_TH -= (int)(pMP->target_bits_per_frame / 10.0);
+        rateCtrl->T = rateCtrl->TMN_TH - rateCtrl->TMN_W;
+        pMP->counter_BTsrc++;
+        pMP->diff_counter--;
+    }
+
+}
+
+void targetBitCalculation(AVCEncObject *encvid, AVCCommonObj *video, AVCRateControl *rateCtrl, MultiPass *pMP)
+{
+    OSCL_UNUSED_ARG(encvid);
+    OsclFloat curr_mad;//, average_mad;
+    int diff_counter_BTsrc, diff_counter_BTdst, prev_counter_diff, curr_counter_diff, bound;
+    /* BT = Bit Transfer, for pMP->counter_BTsrc, pMP->counter_BTdst */
+
+    /* some stuff about frame dropping remained here to be done because pMP cannot be inserted into updateRateControl()*/
+    updateRC_PostProc(rateCtrl, pMP);
+
+    /* update pMP->counter_BTsrc and pMP->counter_BTdst to avoid interger overflow */
+    if (pMP->counter_BTsrc > 1000 && pMP->counter_BTdst > 1000)
+    {
+        pMP->counter_BTsrc -= 1000;
+        pMP->counter_BTdst -= 1000;
+    }
+
+    /* ---------------------------------------------------------------------------------------------------*/
+    /* target calculation */
+    curr_mad = (OsclFloat)rateCtrl->totalSAD / video->PicSizeInMbs;
+    if (curr_mad < MAD_MIN) curr_mad = MAD_MIN; /* MAD_MIN is defined as 1 in mp4def.h */
+    diff_counter_BTsrc = diff_counter_BTdst = 0;
+    pMP->diff_counter = 0;
+
+
+    /*1.calculate average mad */
+    pMP->sum_mad += curr_mad;
+    //average_mad = (pMP->encoded_frames < 1 ? curr_mad : pMP->sum_mad/(OsclFloat)(pMP->encoded_frames+1)); /* this function is called from the scond encoded frame*/
+    //pMP->aver_mad = average_mad;
+    if (pMP->encoded_frames >= 0) /* pMP->encoded_frames is set to -1 initially, so forget about the very first I frame */
+        pMP->aver_mad = (pMP->aver_mad * pMP->encoded_frames + curr_mad) / (pMP->encoded_frames + 1);
+
+    if (pMP->overlapped_win_size > 0 && pMP->encoded_frames_prev >= 0)
+        pMP->aver_mad_prev = (pMP->aver_mad_prev * pMP->encoded_frames_prev + curr_mad) / (pMP->encoded_frames_prev + 1);
+
+    /*2.average_mad, mad ==> diff_counter_BTsrc, diff_counter_BTdst */
+    if (pMP->overlapped_win_size == 0)
+    {
+        /* original verison */
+        if (curr_mad > pMP->aver_mad*1.1)
+        {
+            if (curr_mad / (pMP->aver_mad + 0.0001) > 2)
+                diff_counter_BTdst = (int)(sqrt(curr_mad / (pMP->aver_mad + 0.0001)) * 10 + 0.4) - 10;
+            //diff_counter_BTdst = (int)((sqrt(curr_mad/pMP->aver_mad)*2+curr_mad/pMP->aver_mad)/(3*0.1) + 0.4) - 10;
+            else
+                diff_counter_BTdst = (int)(curr_mad / (pMP->aver_mad + 0.0001) * 10 + 0.4) - 10;
+        }
+        else /* curr_mad <= average_mad*1.1 */
+            //diff_counter_BTsrc = 10 - (int)((sqrt(curr_mad/pMP->aver_mad) + pow(curr_mad/pMP->aver_mad, 1.0/3.0))/(2.0*0.1) + 0.4);
+            diff_counter_BTsrc = 10 - (int)(sqrt(curr_mad / (pMP->aver_mad + 0.0001)) * 10 + 0.5);
+
+        /* actively fill in the possible gap */
+        if (diff_counter_BTsrc == 0 && diff_counter_BTdst == 0 &&
+                curr_mad <= pMP->aver_mad*1.1 && pMP->counter_BTsrc < pMP->counter_BTdst)
+            diff_counter_BTsrc = 1;
+
+    }
+    else if (pMP->overlapped_win_size > 0)
+    {
+        /* transition time: use previous average mad "pMP->aver_mad_prev" instead of the current average mad "pMP->aver_mad" */
+        if (curr_mad > pMP->aver_mad_prev*1.1)
+        {
+            if (curr_mad / pMP->aver_mad_prev > 2)
+                diff_counter_BTdst = (int)(sqrt(curr_mad / (pMP->aver_mad_prev + 0.0001)) * 10 + 0.4) - 10;
+            //diff_counter_BTdst = (int)((M4VENC_SQRT(curr_mad/pMP->aver_mad_prev)*2+curr_mad/pMP->aver_mad_prev)/(3*0.1) + 0.4) - 10;
+            else
+                diff_counter_BTdst = (int)(curr_mad / (pMP->aver_mad_prev + 0.0001) * 10 + 0.4) - 10;
+        }
+        else /* curr_mad <= average_mad*1.1 */
+            //diff_counter_BTsrc = 10 - (Int)((sqrt(curr_mad/pMP->aver_mad_prev) + pow(curr_mad/pMP->aver_mad_prev, 1.0/3.0))/(2.0*0.1) + 0.4);
+            diff_counter_BTsrc = 10 - (int)(sqrt(curr_mad / (pMP->aver_mad_prev + 0.0001)) * 10 + 0.5);
+
+        /* actively fill in the possible gap */
+        if (diff_counter_BTsrc == 0 && diff_counter_BTdst == 0 &&
+                curr_mad <= pMP->aver_mad_prev*1.1 && pMP->counter_BTsrc < pMP->counter_BTdst)
+            diff_counter_BTsrc = 1;
+
+        if (--pMP->overlapped_win_size <= 0)    pMP->overlapped_win_size = 0;
+    }
+
+
+    /* if difference is too much, do clipping */
+    /* First, set the upper bound for current bit allocation variance: 80% of available buffer */
+    bound = (int)((rateCtrl->Bs / 2 - rateCtrl->VBV_fullness) * 0.6 / (pMP->target_bits_per_frame / 10)); /* rateCtrl->Bs */
+    diff_counter_BTsrc =  AVC_MIN(diff_counter_BTsrc, bound);
+    diff_counter_BTdst =  AVC_MIN(diff_counter_BTdst, bound);
+
+    /* Second, set another upper bound for current bit allocation: 4-5*bitrate/framerate */
+    bound = 50;
+//  if(video->encParams->RC_Type == CBR_LOWDELAY)
+//  not necessary       bound = 10;  -- For Low delay */
+
+    diff_counter_BTsrc =  AVC_MIN(diff_counter_BTsrc, bound);
+    diff_counter_BTdst =  AVC_MIN(diff_counter_BTdst, bound);
+
+
+    /* Third, check the buffer */
+    prev_counter_diff = pMP->counter_BTdst - pMP->counter_BTsrc;
+    curr_counter_diff = prev_counter_diff + (diff_counter_BTdst - diff_counter_BTsrc);
+
+    if (AVC_ABS(prev_counter_diff) >= rateCtrl->max_BitVariance_num || AVC_ABS(curr_counter_diff) >= rateCtrl->max_BitVariance_num)
+    {   //diff_counter_BTsrc = diff_counter_BTdst = 0;
+
+        if (curr_counter_diff > rateCtrl->max_BitVariance_num && diff_counter_BTdst)
+        {
+            diff_counter_BTdst = (rateCtrl->max_BitVariance_num - prev_counter_diff) + diff_counter_BTsrc;
+            if (diff_counter_BTdst < 0) diff_counter_BTdst = 0;
+        }
+
+        else if (curr_counter_diff < -rateCtrl->max_BitVariance_num && diff_counter_BTsrc)
+        {
+            diff_counter_BTsrc = diff_counter_BTdst - (-rateCtrl->max_BitVariance_num - prev_counter_diff);
+            if (diff_counter_BTsrc < 0) diff_counter_BTsrc = 0;
+        }
+    }
+
+
+    /*3.diff_counter_BTsrc, diff_counter_BTdst ==> TMN_TH */
+    rateCtrl->TMN_TH = (int)(pMP->target_bits_per_frame);
+    pMP->diff_counter = 0;
+
+    if (diff_counter_BTsrc)
+    {
+        rateCtrl->TMN_TH -= (int)(pMP->target_bits_per_frame * diff_counter_BTsrc * 0.1);
+        pMP->diff_counter = -diff_counter_BTsrc;
+    }
+    else if (diff_counter_BTdst)
+    {
+        rateCtrl->TMN_TH += (int)(pMP->target_bits_per_frame * diff_counter_BTdst * 0.1);
+        pMP->diff_counter = diff_counter_BTdst;
+    }
+
+
+    /*4.update pMP->counter_BTsrc, pMP->counter_BTdst */
+    pMP->counter_BTsrc += diff_counter_BTsrc;
+    pMP->counter_BTdst += diff_counter_BTdst;
+
+
+    /*5.target bit calculation */
+    rateCtrl->T = rateCtrl->TMN_TH - rateCtrl->TMN_W;
+
+    return ;
+}
+
+void updateRC_PostProc(AVCRateControl *rateCtrl, MultiPass *pMP)
+{
+    if (rateCtrl->skip_next_frame > 0) /* skip next frame */
+    {
+        pMP->counter_BTsrc += 10 * rateCtrl->skip_next_frame;
+
+    }
+    else if (rateCtrl->skip_next_frame == -1) /* skip current frame */
+    {
+        pMP->counter_BTdst -= pMP->diff_counter;
+        pMP->counter_BTsrc += 10;
+
+        pMP->sum_mad -= pMP->mad;
+        pMP->aver_mad = (pMP->aver_mad * pMP->encoded_frames - pMP->mad) / (pMP->encoded_frames - 1 + 0.0001);
+        pMP->sum_QP  -= pMP->QP;
+        pMP->encoded_frames --;
+    }
+    /* some stuff in update VBV_fullness remains here */
+    //if(rateCtrl->VBV_fullness < -rateCtrl->Bs/2) /* rateCtrl->Bs */
+    if (rateCtrl->VBV_fullness < rateCtrl->low_bound)
+    {
+        rateCtrl->VBV_fullness = rateCtrl->low_bound; // -rateCtrl->Bs/2;
+        rateCtrl->TMN_W = rateCtrl->VBV_fullness - rateCtrl->low_bound;
+        pMP->counter_BTsrc = pMP->counter_BTdst + (int)((OsclFloat)(rateCtrl->Bs / 2 - rateCtrl->low_bound) / 2.0 / (pMP->target_bits_per_frame / 10));
+    }
+}
+
+
+void RCInitChromaQP(AVCEncObject *encvid)
+{
+    AVCCommonObj *video = encvid->common;
+    AVCMacroblock *currMB = video->currMB;
+    int q_bits;
+
+    /* we have to do the same thing for AVC_CLIP3(0,51,video->QSy) */
+
+    video->QPy_div_6 = (currMB->QPy * 43) >> 8;
+    video->QPy_mod_6 = currMB->QPy - 6 * video->QPy_div_6;
+    currMB->QPc = video->QPc = mapQPi2QPc[AVC_CLIP3(0, 51, currMB->QPy + video->currPicParams->chroma_qp_index_offset)];
+    video->QPc_div_6 = (video->QPc * 43) >> 8;
+    video->QPc_mod_6 = video->QPc - 6 * video->QPc_div_6;
+
+    /* pre-calculate this to save computation */
+    q_bits = 4 + video->QPy_div_6;
+    if (video->slice_type == AVC_I_SLICE)
+    {
+        encvid->qp_const = 682 << q_bits;       // intra
+    }
+    else
+    {
+        encvid->qp_const = 342 << q_bits;       // inter
+    }
+
+    q_bits = 4 + video->QPc_div_6;
+    if (video->slice_type == AVC_I_SLICE)
+    {
+        encvid->qp_const_c = 682 << q_bits;    // intra
+    }
+    else
+    {
+        encvid->qp_const_c = 342 << q_bits;    // inter
+    }
+
+    encvid->lambda_mode = QP2QUANT[AVC_MAX(0, currMB->QPy-SHIFT_QP)];
+    encvid->lambda_motion = LAMBDA_FACTOR(encvid->lambda_mode);
+
+    return ;
+}
+
+
+void RCInitMBQP(AVCEncObject *encvid)
+{
+    AVCCommonObj *video =  encvid->common;
+    AVCMacroblock *currMB = video->currMB;
+
+    currMB->QPy = video->QPy; /* set to previous value or picture level */
+
+    RCInitChromaQP(encvid);
+
+}
+
+void RCPostMB(AVCCommonObj *video, AVCRateControl *rateCtrl, int num_header_bits, int num_texture_bits)
+{
+    OSCL_UNUSED_ARG(video);
+    rateCtrl->numMBHeaderBits = num_header_bits;
+    rateCtrl->numMBTextureBits = num_texture_bits;
+    rateCtrl->NumberofHeaderBits += rateCtrl->numMBHeaderBits;
+    rateCtrl->NumberofTextureBits += rateCtrl->numMBTextureBits;
+}
+
+void RCRestoreQP(AVCMacroblock *currMB, AVCCommonObj *video, AVCEncObject *encvid)
+{
+    currMB->QPy = video->QPy; /* use previous QP */
+    RCInitChromaQP(encvid);
+
+    return ;
+}
+
+
+void RCCalculateMAD(AVCEncObject *encvid, AVCMacroblock *currMB, uint8 *orgL, int orgPitch)
+{
+    AVCCommonObj *video = encvid->common;
+    AVCRateControl *rateCtrl = encvid->rateCtrl;
+    uint32 dmin_lx;
+
+    if (rateCtrl->rcEnable == TRUE)
+    {
+        if (currMB->mb_intra)
+        {
+            if (currMB->mbMode == AVC_I16)
+            {
+                dmin_lx = (0xFFFF << 16) | orgPitch;
+                rateCtrl->MADofMB[video->mbNum] = AVCSAD_Macroblock_C(orgL,
+                                                  encvid->pred_i16[currMB->i16Mode], dmin_lx, NULL);
+            }
+            else /* i4 */
+            {
+                rateCtrl->MADofMB[video->mbNum] = encvid->i4_sad / 256.;
+            }
+        }
+        /* for INTER, we have already saved it with the MV search */
+    }
+
+    return ;
+}
+
+
+
+AVCEnc_Status RCUpdateFrame(AVCEncObject *encvid)
+{
+    AVCCommonObj *video = encvid->common;
+    AVCRateControl *rateCtrl = encvid->rateCtrl;
+    AVCEnc_Status status = AVCENC_SUCCESS;
+    MultiPass *pMP = rateCtrl->pMP;
+    int diff_BTCounter;
+    int nal_type = video->nal_unit_type;
+
+    /* update the complexity weight of I, P, B frame */
+
+    if (rateCtrl->rcEnable == TRUE)
+    {
+        pMP->actual_bits = rateCtrl->numFrameBits;
+        pMP->mad = (OsclFloat)rateCtrl->totalSAD / video->PicSizeInMbs; //ComputeFrameMAD(video, rateCtrl);
+
+        AVCSaveRDSamples(pMP, 0);
+
+        pMP->encoded_frames++;
+
+        /* for pMP->samplesPerFrame */
+        pMP->samplesPerFrame[pMP->framePos] = 0;
+
+        pMP->sum_QP += pMP->QP;
+
+        /* update pMP->counter_BTsrc, pMP->counter_BTdst */
+        /* re-allocate the target bit again and then stop encoding */
+        diff_BTCounter = (int)((OsclFloat)(rateCtrl->TMN_TH - rateCtrl->TMN_W - pMP->actual_bits) /
+                               (pMP->bitrate / (pMP->framerate + 0.0001) + 0.0001) / 0.1);
+        if (diff_BTCounter >= 0)
+            pMP->counter_BTsrc += diff_BTCounter; /* pMP->actual_bits is smaller */
+        else
+            pMP->counter_BTdst -= diff_BTCounter; /* pMP->actual_bits is bigger */
+
+        rateCtrl->TMN_TH -= (int)((OsclFloat)pMP->bitrate / (pMP->framerate + 0.0001) * (diff_BTCounter * 0.1));
+        rateCtrl->T = pMP->target_bits = rateCtrl->TMN_TH - rateCtrl->TMN_W;
+        pMP->diff_counter -= diff_BTCounter;
+
+        rateCtrl->Rc = rateCtrl->numFrameBits;  /* Total Bits for current frame */
+        rateCtrl->Hc = rateCtrl->NumberofHeaderBits;    /* Total Bits in Header and Motion Vector */
+
+        /* BX_RC */
+        updateRateControl(rateCtrl, nal_type);
+        if (rateCtrl->skip_next_frame == -1) // skip current frame
+        {
+            status = AVCENC_SKIPPED_PICTURE;
+        }
+    }
+
+    rateCtrl->first_frame = 0;  // reset here after we encode the first frame.
+
+    return status;
+}
+
+void AVCSaveRDSamples(MultiPass *pMP, int counter_samples)
+{
+    /* for pMP->pRDSamples */
+    pMP->pRDSamples[pMP->framePos][counter_samples].QP    = pMP->QP;
+    pMP->pRDSamples[pMP->framePos][counter_samples].actual_bits = pMP->actual_bits;
+    pMP->pRDSamples[pMP->framePos][counter_samples].mad   = pMP->mad;
+    pMP->pRDSamples[pMP->framePos][counter_samples].R_D = (OsclFloat)pMP->actual_bits / (pMP->mad + 0.0001);
+
+    return ;
+}
+
+void updateRateControl(AVCRateControl *rateCtrl, int nal_type)
+{
+    int  frame_bits;
+    MultiPass *pMP = rateCtrl->pMP;
+
+    /* BX rate contro\l */
+    frame_bits = (int)(rateCtrl->bitRate / rateCtrl->frame_rate);
+    rateCtrl->TMN_W += (rateCtrl->Rc - rateCtrl->TMN_TH);
+    rateCtrl->VBV_fullness += (rateCtrl->Rc - frame_bits); //rateCtrl->Rp);
+    //if(rateCtrl->VBV_fullness < 0) rateCtrl->VBV_fullness = -1;
+
+    rateCtrl->encoded_frames++;
+
+    /* frame dropping */
+    rateCtrl->skip_next_frame = 0;
+
+    if ((rateCtrl->VBV_fullness > rateCtrl->Bs / 2) && nal_type != AVC_NALTYPE_IDR) /* skip the current frame */ /* rateCtrl->Bs */
+    {
+        rateCtrl->TMN_W -= (rateCtrl->Rc - rateCtrl->TMN_TH);
+        rateCtrl->VBV_fullness -= rateCtrl->Rc;
+        rateCtrl->skip_next_frame = -1;
+    }
+    else if ((OsclFloat)(rateCtrl->VBV_fullness - rateCtrl->VBV_fullness_offset) > (rateCtrl->Bs / 2 - rateCtrl->VBV_fullness_offset)*0.95) /* skip next frame */
+    {
+        rateCtrl->VBV_fullness -= frame_bits; //rateCtrl->Rp;
+        rateCtrl->skip_next_frame = 1;
+        pMP->counter_BTsrc -= (int)((OsclFloat)(rateCtrl->Bs / 2 - rateCtrl->low_bound) / 2.0 / (pMP->target_bits_per_frame / 10));
+        /* BX_1, skip more than 1 frames  */
+        //while(rateCtrl->VBV_fullness > rateCtrl->Bs*0.475)
+        while ((rateCtrl->VBV_fullness - rateCtrl->VBV_fullness_offset) > (rateCtrl->Bs / 2 - rateCtrl->VBV_fullness_offset)*0.95)
+        {
+            rateCtrl->VBV_fullness -= frame_bits; //rateCtrl->Rp;
+            rateCtrl->skip_next_frame++;
+            pMP->counter_BTsrc -= (int)((OsclFloat)(rateCtrl->Bs / 2 - rateCtrl->low_bound) / 2.0 / (pMP->target_bits_per_frame / 10));
+        }
+
+        /* END BX_1 */
+    }
+}
+
+
+double ComputeFrameMAD(AVCCommonObj *video, AVCRateControl *rateCtrl)
+{
+    double TotalMAD;
+    int i;
+    TotalMAD = 0.0;
+    for (i = 0; i < (int)video->PicSizeInMbs; i++)
+        TotalMAD += rateCtrl->MADofMB[i];
+    TotalMAD /= video->PicSizeInMbs;
+    return TotalMAD;
+}
+
+
+
+
+
+/* convert from QP to Qstep */
+double QP2Qstep(int QP)
+{
+    int i;
+    double Qstep;
+    static const double QP2QSTEP[6] = { 0.625, 0.6875, 0.8125, 0.875, 1.0, 1.125 };
+
+    Qstep = QP2QSTEP[QP % 6];
+    for (i = 0; i < (QP / 6); i++)
+        Qstep *= 2;
+
+    return Qstep;
+}
+
+/* convert from step size to QP */
+int Qstep2QP(double Qstep)
+{
+    int q_per = 0, q_rem = 0;
+
+    //  assert( Qstep >= QP2Qstep(0) && Qstep <= QP2Qstep(51) );
+    if (Qstep < QP2Qstep(0))
+        return 0;
+    else if (Qstep > QP2Qstep(51))
+        return 51;
+
+    while (Qstep > QP2Qstep(5))
+    {
+        Qstep /= 2;
+        q_per += 1;
+    }
+
+    if (Qstep <= (0.625 + 0.6875) / 2)
+    {
+        Qstep = 0.625;
+        q_rem = 0;
+    }
+    else if (Qstep <= (0.6875 + 0.8125) / 2)
+    {
+        Qstep = 0.6875;
+        q_rem = 1;
+    }
+    else if (Qstep <= (0.8125 + 0.875) / 2)
+    {
+        Qstep = 0.8125;
+        q_rem = 2;
+    }
+    else if (Qstep <= (0.875 + 1.0) / 2)
+    {
+        Qstep = 0.875;
+        q_rem = 3;
+    }
+    else if (Qstep <= (1.0 + 1.125) / 2)
+    {
+        Qstep = 1.0;
+        q_rem = 4;
+    }
+    else
+    {
+        Qstep = 1.125;
+        q_rem = 5;
+    }
+
+    return (q_per * 6 + q_rem);
+}
+
+
+
diff --git a/media/libstagefright/codecs/avc/enc/src/residual.cpp b/media/libstagefright/codecs/avc/enc/src/residual.cpp
new file mode 100644
index 0000000..42eb910
--- /dev/null
+++ b/media/libstagefright/codecs/avc/enc/src/residual.cpp
@@ -0,0 +1,389 @@
+/* ------------------------------------------------------------------
+ * Copyright (C) 1998-2009 PacketVideo
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
+ * express or implied.
+ * See the License for the specific language governing permissions
+ * and limitations under the License.
+ * -------------------------------------------------------------------
+ */
+#include "avcenc_lib.h"
+
+AVCEnc_Status EncodeIntraPCM(AVCEncObject *encvid)
+{
+    AVCEnc_Status status = AVCENC_SUCCESS;
+    AVCCommonObj *video = encvid->common;
+    AVCFrameIO  *currInput = encvid->currInput;
+    AVCEncBitstream *stream = encvid->bitstream;
+    int x_position = (video->mb_x << 4);
+    int y_position = (video->mb_y << 4);
+    int orgPitch = currInput->pitch;
+    int offset1 = y_position * orgPitch + x_position;
+    int i, j;
+    int offset;
+    uint8 *pDst, *pSrc;
+    uint code;
+
+    ue_v(stream, 25);
+
+    i = stream->bit_left & 0x7;
+    if (i) /* not byte-aligned */
+    {
+        BitstreamWriteBits(stream, 0, i);
+    }
+
+    pSrc = currInput->YCbCr[0] + offset1;
+    pDst = video->currPic->Sl + offset1;
+    offset = video->PicWidthInSamplesL - 16;
+
+    /* at this point bitstream is byte-aligned */
+    j = 16;
+    while (j > 0)
+    {
+#if (WORD_SIZE==32)
+        for (i = 0; i < 4; i++)
+        {
+            code = *((uint*)pSrc);
+            pSrc += 4;
+            *((uint*)pDst) = code;
+            pDst += 4;
+            status = BitstreamWriteBits(stream, 32, code);
+        }
+#else
+        for (i = 0; i < 8; i++)
+        {
+            code = *((uint*)pSrc);
+            pSrc += 2;
+            *((uint*)pDst) = code;
+            pDst += 2;
+            status = BitstreamWriteBits(stream, 16, code);
+        }
+#endif
+        pDst += offset;
+        pSrc += offset;
+        j--;
+    }
+    if (status != AVCENC_SUCCESS)  /* check only once per line */
+        return status;
+
+    pDst = video->currPic->Scb + ((offset1 + x_position) >> 2);
+    pSrc = currInput->YCbCr[1] + ((offset1 + x_position) >> 2);
+    offset >>= 1;
+
+    j = 8;
+    while (j > 0)
+    {
+#if (WORD_SIZE==32)
+        for (i = 0; i < 2; i++)
+        {
+            code = *((uint*)pSrc);
+            pSrc += 4;
+            *((uint*)pDst) = code;
+            pDst += 4;
+            status = BitstreamWriteBits(stream, 32, code);
+        }
+#else
+        for (i = 0; i < 4; i++)
+        {
+            code = *((uint*)pSrc);
+            pSrc += 2;
+            *((uint*)pDst) = code;
+            pDst += 2;
+            status = BitstreamWriteBits(stream, 16, code);
+        }
+#endif
+        pDst += offset;
+        pSrc += offset;
+        j--;
+    }
+
+    if (status != AVCENC_SUCCESS)  /* check only once per line */
+        return status;
+
+    pDst = video->currPic->Scr + ((offset1 + x_position) >> 2);
+    pSrc = currInput->YCbCr[2] + ((offset1 + x_position) >> 2);
+
+    j = 8;
+    while (j > 0)
+    {
+#if (WORD_SIZE==32)
+        for (i = 0; i < 2; i++)
+        {
+            code = *((uint*)pSrc);
+            pSrc += 4;
+            *((uint*)pDst) = code;
+            pDst += 4;
+            status = BitstreamWriteBits(stream, 32, code);
+        }
+#else
+        for (i = 0; i < 4; i++)
+        {
+            code = *((uint*)pSrc);
+            pSrc += 2;
+            *((uint*)pDst) = code;
+            pDst += 2;
+            status = BitstreamWriteBits(stream, 16, code);
+        }
+#endif
+        pDst += offset;
+        pSrc += offset;
+        j--;
+    }
+
+    return status;
+}
+
+
+AVCEnc_Status enc_residual_block(AVCEncObject *encvid, AVCResidualType type, int cindx, AVCMacroblock *currMB)
+{
+    AVCEnc_Status status = AVCENC_SUCCESS;
+    AVCCommonObj *video = encvid->common;
+    int i, maxNumCoeff, nC;
+    int cdc = 0, cac = 0;
+    int TrailingOnes;
+    AVCEncBitstream *stream = encvid->bitstream;
+    uint trailing_ones_sign_flag;
+    int zerosLeft;
+    int *level, *run;
+    int TotalCoeff;
+    const static int incVlc[] = {0, 3, 6, 12, 24, 48, 32768};  // maximum vlc = 6
+    int escape, numPrefix, sufmask, suffix, shift, sign, value, absvalue, vlcnum, level_two_or_higher;
+    int bindx = blkIdx2blkXY[cindx>>2][cindx&3] ; // raster scan index
+
+    switch (type)
+    {
+        case AVC_Luma:
+            maxNumCoeff = 16;
+            level = encvid->level[cindx];
+            run = encvid->run[cindx];
+            TotalCoeff = currMB->nz_coeff[bindx];
+            break;
+        case AVC_Intra16DC:
+            maxNumCoeff = 16;
+            level = encvid->leveldc;
+            run = encvid->rundc;
+            TotalCoeff = cindx; /* special case */
+            bindx = 0;
+            cindx = 0;
+            break;
+        case AVC_Intra16AC:
+            maxNumCoeff = 15;
+            level = encvid->level[cindx];
+            run = encvid->run[cindx];
+            TotalCoeff = currMB->nz_coeff[bindx];
+            break;
+        case AVC_ChromaDC:  /* how to differentiate Cb from Cr */
+            maxNumCoeff = 4;
+            cdc = 1;
+            if (cindx >= 8)
+            {
+                level = encvid->levelcdc + 4;
+                run = encvid->runcdc + 4;
+                TotalCoeff = cindx - 8;  /* special case */
+            }
+            else
+            {
+                level = encvid->levelcdc;
+                run = encvid->runcdc;
+                TotalCoeff = cindx;  /* special case */
+            }
+            break;
+        case AVC_ChromaAC:
+            maxNumCoeff = 15;
+            cac = 1;
+            level = encvid->level[cindx];
+            run = encvid->run[cindx];
+            cindx -= 16;
+            bindx = 16 + blkIdx2blkXY[cindx>>2][cindx&3];
+            cindx += 16;
+            TotalCoeff = currMB->nz_coeff[bindx];
+            break;
+        default:
+            return AVCENC_FAIL;
+    }
+
+
+    /* find TrailingOnes */
+    TrailingOnes = 0;
+    zerosLeft = 0;
+    i = TotalCoeff - 1;
+    nC = 1;
+    while (i >= 0)
+    {
+        zerosLeft += run[i];
+        if (nC && (level[i] == 1 || level[i] == -1))
+        {
+            TrailingOnes++;
+        }
+        else
+        {
+            nC = 0;
+        }
+        i--;
+    }
+    if (TrailingOnes > 3)
+    {
+        TrailingOnes = 3; /* clip it */
+    }
+
+    if (!cdc)
+    {
+        if (!cac)  /* not chroma */
+        {
+            nC = predict_nnz(video, bindx & 3, bindx >> 2);
+        }
+        else /* chroma ac but not chroma dc */
+        {
+            nC = predict_nnz_chroma(video, bindx & 3, bindx >> 2);
+        }
+
+        status = ce_TotalCoeffTrailingOnes(stream, TrailingOnes, TotalCoeff, nC);
+    }
+    else
+    {
+        nC = -1; /* Chroma DC level */
+        status = ce_TotalCoeffTrailingOnesChromaDC(stream, TrailingOnes, TotalCoeff);
+    }
+
+    /* This part is done quite differently in ReadCoef4x4_CAVLC() */
+    if (TotalCoeff > 0)
+    {
+
+        i = TotalCoeff - 1;
+
+        if (TrailingOnes) /* keep reading the sign of those trailing ones */
+        {
+            nC = TrailingOnes;
+            trailing_ones_sign_flag = 0;
+            while (nC)
+            {
+                trailing_ones_sign_flag <<= 1;
+                trailing_ones_sign_flag |= ((uint32)level[i--] >> 31); /* 0 or positive, 1 for negative */
+                nC--;
+            }
+
+            /* instead of writing one bit at a time, read the whole thing at once */
+            status = BitstreamWriteBits(stream, TrailingOnes, trailing_ones_sign_flag);
+        }
+
+        level_two_or_higher = 1;
+        if (TotalCoeff > 3 && TrailingOnes == 3)
+        {
+            level_two_or_higher = 0;
+        }
+
+        if (TotalCoeff > 10 && TrailingOnes < 3)
+        {
+            vlcnum = 1;
+        }
+        else
+        {
+            vlcnum = 0;
+        }
+
+        /* then do this TotalCoeff-TrailingOnes times */
+        for (i = TotalCoeff - TrailingOnes - 1; i >= 0; i--)
+        {
+            value = level[i];
+            absvalue = (value >= 0) ? value : -value;
+
+            if (level_two_or_higher)
+            {
+                if (value > 0) value--;
+                else    value++;
+                level_two_or_higher = 0;
+            }
+
+            if (value >= 0)
+            {
+                sign = 0;
+            }
+            else
+            {
+                sign = 1;
+                value = -value;
+            }
+
+            if (vlcnum == 0) // VLC1
+            {
+                if (value < 8)
+                {
+                    status = BitstreamWriteBits(stream, value * 2 + sign - 1, 1);
+                }
+                else if (value < 8 + 8)
+                {
+                    status = BitstreamWriteBits(stream, 14 + 1 + 4, (1 << 4) | ((value - 8) << 1) | sign);
+                }
+                else
+                {
+                    status = BitstreamWriteBits(stream, 14 + 2 + 12, (1 << 12) | ((value - 16) << 1) | sign) ;
+                }
+            }
+            else  // VLCN
+            {
+                shift = vlcnum - 1;
+                escape = (15 << shift) + 1;
+                numPrefix = (value - 1) >> shift;
+                sufmask = ~((0xffffffff) << shift);
+                suffix = (value - 1) & sufmask;
+                if (value < escape)
+                {
+                    status = BitstreamWriteBits(stream, numPrefix + vlcnum + 1, (1 << (shift + 1)) | (suffix << 1) | sign);
+                }
+                else
+                {
+                    status = BitstreamWriteBits(stream, 28, (1 << 12) | ((value - escape) << 1) | sign);
+                }
+
+            }
+
+            if (absvalue > incVlc[vlcnum])
+                vlcnum++;
+
+            if (i == TotalCoeff - TrailingOnes - 1 && absvalue > 3)
+                vlcnum = 2;
+        }
+
+        if (status != AVCENC_SUCCESS)  /* occasionally check the bitstream */
+        {
+            return status;
+        }
+        if (TotalCoeff < maxNumCoeff)
+        {
+            if (!cdc)
+            {
+                ce_TotalZeros(stream, zerosLeft, TotalCoeff);
+            }
+            else
+            {
+                ce_TotalZerosChromaDC(stream, zerosLeft, TotalCoeff);
+            }
+        }
+        else
+        {
+            zerosLeft = 0;
+        }
+
+        i = TotalCoeff - 1;
+        while (i > 0) /* don't do the last one */
+        {
+            if (zerosLeft > 0)
+            {
+                ce_RunBefore(stream, run[i], zerosLeft);
+            }
+
+            zerosLeft = zerosLeft - run[i];
+            i--;
+        }
+    }
+
+    return status;
+}
diff --git a/media/libstagefright/codecs/avc/enc/src/sad.cpp b/media/libstagefright/codecs/avc/enc/src/sad.cpp
new file mode 100644
index 0000000..ae7acd2
--- /dev/null
+++ b/media/libstagefright/codecs/avc/enc/src/sad.cpp
@@ -0,0 +1,290 @@
+/* ------------------------------------------------------------------
+ * Copyright (C) 1998-2009 PacketVideo
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
+ * express or implied.
+ * See the License for the specific language governing permissions
+ * and limitations under the License.
+ * -------------------------------------------------------------------
+ */
+#include "avcenc_lib.h"
+#include "sad_inline.h"
+
+#define Cached_lx 176
+
+#ifdef _SAD_STAT
+uint32 num_sad_MB = 0;
+uint32 num_sad_Blk = 0;
+uint32 num_sad_MB_call = 0;
+uint32 num_sad_Blk_call = 0;
+
+#define NUM_SAD_MB_CALL()       num_sad_MB_call++
+#define NUM_SAD_MB()            num_sad_MB++
+#define NUM_SAD_BLK_CALL()      num_sad_Blk_call++
+#define NUM_SAD_BLK()           num_sad_Blk++
+
+#else
+
+#define NUM_SAD_MB_CALL()
+#define NUM_SAD_MB()
+#define NUM_SAD_BLK_CALL()
+#define NUM_SAD_BLK()
+
+#endif
+
+
+/* consist of
+int AVCSAD_Macroblock_C(uint8 *ref,uint8 *blk,int dmin,int lx,void *extra_info)
+int AVCSAD_MB_HTFM_Collect(uint8 *ref,uint8 *blk,int dmin,int lx,void *extra_info)
+int AVCSAD_MB_HTFM(uint8 *ref,uint8 *blk,int dmin,int lx,void *extra_info)
+*/
+
+
+/*==================================================================
+    Function:   SAD_Macroblock
+    Date:       09/07/2000
+    Purpose:    Compute SAD 16x16 between blk and ref.
+    To do:      Uniform subsampling will be inserted later!
+                Hypothesis Testing Fast Matching to be used later!
+    Changes:
+    11/7/00:    implemented MMX
+    1/24/01:    implemented SSE
+==================================================================*/
+/********** C ************/
+int AVCSAD_Macroblock_C(uint8 *ref, uint8 *blk, int dmin_lx, void *extra_info)
+{
+    (void)(extra_info);
+
+    int32 x10;
+    int dmin = (uint32)dmin_lx >> 16;
+    int lx = dmin_lx & 0xFFFF;
+
+    NUM_SAD_MB_CALL();
+
+    x10 = simd_sad_mb(ref, blk, dmin, lx);
+
+    return x10;
+}
+
+#ifdef HTFM   /* HTFM with uniform subsampling implementation 2/28/01 */
+/*===============================================================
+    Function:   AVCAVCSAD_MB_HTFM_Collect and AVCSAD_MB_HTFM
+    Date:       3/2/1
+    Purpose:    Compute the SAD on a 16x16 block using
+                uniform subsampling and hypothesis testing fast matching
+                for early dropout. SAD_MB_HP_HTFM_Collect is to collect
+                the statistics to compute the thresholds to be used in
+                SAD_MB_HP_HTFM.
+    Input/Output:
+    Changes:
+  ===============================================================*/
+
+int AVCAVCSAD_MB_HTFM_Collect(uint8 *ref, uint8 *blk, int dmin_lx, void *extra_info)
+{
+    int i;
+    int sad = 0;
+    uint8 *p1;
+    int lx4 = (dmin_lx << 2) & 0x3FFFC;
+    uint32 cur_word;
+    int saddata[16], tmp, tmp2;    /* used when collecting flag (global) is on */
+    int difmad;
+    int madstar;
+    HTFM_Stat *htfm_stat = (HTFM_Stat*) extra_info;
+    int *abs_dif_mad_avg = &(htfm_stat->abs_dif_mad_avg);
+    uint *countbreak = &(htfm_stat->countbreak);
+    int *offsetRef = htfm_stat->offsetRef;
+
+    madstar = (uint32)dmin_lx >> 20;
+
+    NUM_SAD_MB_CALL();
+
+    blk -= 4;
+    for (i = 0; i < 16; i++)
+    {
+        p1 = ref + offsetRef[i];
+        cur_word = *((uint32*)(blk += 4));
+        tmp = p1[12];
+        tmp2 = (cur_word >> 24) & 0xFF;
+        sad = SUB_SAD(sad, tmp, tmp2);
+        tmp = p1[8];
+        tmp2 = (cur_word >> 16) & 0xFF;
+        sad = SUB_SAD(sad, tmp, tmp2);
+        tmp = p1[4];
+        tmp2 = (cur_word >> 8) & 0xFF;
+        sad = SUB_SAD(sad, tmp, tmp2);
+        tmp = p1[0];
+        p1 += lx4;
+        tmp2 = (cur_word & 0xFF);
+        sad = SUB_SAD(sad, tmp, tmp2);
+
+        cur_word = *((uint32*)(blk += 4));
+        tmp = p1[12];
+        tmp2 = (cur_word >> 24) & 0xFF;
+        sad = SUB_SAD(sad, tmp, tmp2);
+        tmp = p1[8];
+        tmp2 = (cur_word >> 16) & 0xFF;
+        sad = SUB_SAD(sad, tmp, tmp2);
+        tmp = p1[4];
+        tmp2 = (cur_word >> 8) & 0xFF;
+        sad = SUB_SAD(sad, tmp, tmp2);
+        tmp = p1[0];
+        p1 += lx4;
+        tmp2 = (cur_word & 0xFF);
+        sad = SUB_SAD(sad, tmp, tmp2);
+
+        cur_word = *((uint32*)(blk += 4));
+        tmp = p1[12];
+        tmp2 = (cur_word >> 24) & 0xFF;
+        sad = SUB_SAD(sad, tmp, tmp2);
+        tmp = p1[8];
+        tmp2 = (cur_word >> 16) & 0xFF;
+        sad = SUB_SAD(sad, tmp, tmp2);
+        tmp = p1[4];
+        tmp2 = (cur_word >> 8) & 0xFF;
+        sad = SUB_SAD(sad, tmp, tmp2);
+        tmp = p1[0];
+        p1 += lx4;
+        tmp2 = (cur_word & 0xFF);
+        sad = SUB_SAD(sad, tmp, tmp2);
+
+        cur_word = *((uint32*)(blk += 4));
+        tmp = p1[12];
+        tmp2 = (cur_word >> 24) & 0xFF;
+        sad = SUB_SAD(sad, tmp, tmp2);
+        tmp = p1[8];
+        tmp2 = (cur_word >> 16) & 0xFF;
+        sad = SUB_SAD(sad, tmp, tmp2);
+        tmp = p1[4];
+        tmp2 = (cur_word >> 8) & 0xFF;
+        sad = SUB_SAD(sad, tmp, tmp2);
+        tmp = p1[0];
+        p1 += lx4;
+        tmp2 = (cur_word & 0xFF);
+        sad = SUB_SAD(sad, tmp, tmp2);
+
+        NUM_SAD_MB();
+
+        saddata[i] = sad;
+
+        if (i > 0)
+        {
+            if ((uint32)sad > ((uint32)dmin_lx >> 16))
+            {
+                difmad = saddata[0] - ((saddata[1] + 1) >> 1);
+                (*abs_dif_mad_avg) += ((difmad > 0) ? difmad : -difmad);
+                (*countbreak)++;
+                return sad;
+            }
+        }
+    }
+
+    difmad = saddata[0] - ((saddata[1] + 1) >> 1);
+    (*abs_dif_mad_avg) += ((difmad > 0) ? difmad : -difmad);
+    (*countbreak)++;
+    return sad;
+}
+
+int AVCSAD_MB_HTFM(uint8 *ref, uint8 *blk, int dmin_lx, void *extra_info)
+{
+    int sad = 0;
+    uint8 *p1;
+
+    int i;
+    int tmp, tmp2;
+    int lx4 = (dmin_lx << 2) & 0x3FFFC;
+    int sadstar = 0, madstar;
+    int *nrmlz_th = (int*) extra_info;
+    int *offsetRef = (int*) extra_info + 32;
+    uint32 cur_word;
+
+    madstar = (uint32)dmin_lx >> 20;
+
+    NUM_SAD_MB_CALL();
+
+    blk -= 4;
+    for (i = 0; i < 16; i++)
+    {
+        p1 = ref + offsetRef[i];
+        cur_word = *((uint32*)(blk += 4));
+        tmp = p1[12];
+        tmp2 = (cur_word >> 24) & 0xFF;
+        sad = SUB_SAD(sad, tmp, tmp2);
+        tmp = p1[8];
+        tmp2 = (cur_word >> 16) & 0xFF;
+        sad = SUB_SAD(sad, tmp, tmp2);
+        tmp = p1[4];
+        tmp2 = (cur_word >> 8) & 0xFF;
+        sad = SUB_SAD(sad, tmp, tmp2);
+        tmp = p1[0];
+        p1 += lx4;
+        tmp2 = (cur_word & 0xFF);
+        sad = SUB_SAD(sad, tmp, tmp2);
+
+        cur_word = *((uint32*)(blk += 4));
+        tmp = p1[12];
+        tmp2 = (cur_word >> 24) & 0xFF;
+        sad = SUB_SAD(sad, tmp, tmp2);
+        tmp = p1[8];
+        tmp2 = (cur_word >> 16) & 0xFF;
+        sad = SUB_SAD(sad, tmp, tmp2);
+        tmp = p1[4];
+        tmp2 = (cur_word >> 8) & 0xFF;
+        sad = SUB_SAD(sad, tmp, tmp2);
+        tmp = p1[0];
+        p1 += lx4;
+        tmp2 = (cur_word & 0xFF);
+        sad = SUB_SAD(sad, tmp, tmp2);
+
+        cur_word = *((uint32*)(blk += 4));
+        tmp = p1[12];
+        tmp2 = (cur_word >> 24) & 0xFF;
+        sad = SUB_SAD(sad, tmp, tmp2);
+        tmp = p1[8];
+        tmp2 = (cur_word >> 16) & 0xFF;
+        sad = SUB_SAD(sad, tmp, tmp2);
+        tmp = p1[4];
+        tmp2 = (cur_word >> 8) & 0xFF;
+        sad = SUB_SAD(sad, tmp, tmp2);
+        tmp = p1[0];
+        p1 += lx4;
+        tmp2 = (cur_word & 0xFF);
+        sad = SUB_SAD(sad, tmp, tmp2);
+
+        cur_word = *((uint32*)(blk += 4));
+        tmp = p1[12];
+        tmp2 = (cur_word >> 24) & 0xFF;
+        sad = SUB_SAD(sad, tmp, tmp2);
+        tmp = p1[8];
+        tmp2 = (cur_word >> 16) & 0xFF;
+        sad = SUB_SAD(sad, tmp, tmp2);
+        tmp = p1[4];
+        tmp2 = (cur_word >> 8) & 0xFF;
+        sad = SUB_SAD(sad, tmp, tmp2);
+        tmp = p1[0];
+        p1 += lx4;
+        tmp2 = (cur_word & 0xFF);
+        sad = SUB_SAD(sad, tmp, tmp2);
+
+        NUM_SAD_MB();
+
+        sadstar += madstar;
+        if (((uint32)sad <= ((uint32)dmin_lx >> 16)) && (sad <= (sadstar - *nrmlz_th++)))
+            ;
+        else
+            return 65536;
+    }
+
+    return sad;
+}
+#endif /* HTFM */
+
+
+
diff --git a/media/libstagefright/codecs/avc/enc/src/sad_halfpel.cpp b/media/libstagefright/codecs/avc/enc/src/sad_halfpel.cpp
new file mode 100644
index 0000000..faf2198
--- /dev/null
+++ b/media/libstagefright/codecs/avc/enc/src/sad_halfpel.cpp
@@ -0,0 +1,629 @@
+/* ------------------------------------------------------------------
+ * Copyright (C) 1998-2009 PacketVideo
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
+ * express or implied.
+ * See the License for the specific language governing permissions
+ * and limitations under the License.
+ * -------------------------------------------------------------------
+ */
+/* contains
+int AVCHalfPel1_SAD_MB(uint8 *ref,uint8 *blk,int dmin,int width,int ih,int jh)
+int AVCHalfPel2_SAD_MB(uint8 *ref,uint8 *blk,int dmin,int width)
+int AVCHalfPel1_SAD_Blk(uint8 *ref,uint8 *blk,int dmin,int width,int ih,int jh)
+int AVCHalfPel2_SAD_Blk(uint8 *ref,uint8 *blk,int dmin,int width)
+
+int AVCSAD_MB_HalfPel_C(uint8 *ref,uint8 *blk,int dmin,int width,int rx,int xh,int yh,void *extra_info)
+int AVCSAD_MB_HP_HTFM_Collect(uint8 *ref,uint8 *blk,int dmin,int width,int rx,int xh,int yh,void *extra_info)
+int AVCSAD_MB_HP_HTFM(uint8 *ref,uint8 *blk,int dmin,int width,int rx,int xh,int yh,void *extra_info)
+int AVCSAD_Blk_HalfPel_C(uint8 *ref,uint8 *blk,int dmin,int width,int rx,int xh,int yh,void *extra_info)
+*/
+
+#include "avcenc_lib.h"
+#include "sad_halfpel_inline.h"
+
+#ifdef _SAD_STAT
+uint32 num_sad_HP_MB = 0;
+uint32 num_sad_HP_Blk = 0;
+uint32 num_sad_HP_MB_call = 0;
+uint32 num_sad_HP_Blk_call = 0;
+#define NUM_SAD_HP_MB_CALL()    num_sad_HP_MB_call++
+#define NUM_SAD_HP_MB()         num_sad_HP_MB++
+#define NUM_SAD_HP_BLK_CALL()   num_sad_HP_Blk_call++
+#define NUM_SAD_HP_BLK()        num_sad_HP_Blk++
+#else
+#define NUM_SAD_HP_MB_CALL()
+#define NUM_SAD_HP_MB()
+#define NUM_SAD_HP_BLK_CALL()
+#define NUM_SAD_HP_BLK()
+#endif
+
+
+
+/*===============================================================
+    Function:   SAD_MB_HalfPel
+    Date:       09/17/2000
+    Purpose:    Compute the SAD on the half-pel resolution
+    Input/Output:   hmem is assumed to be a pointer to the starting
+                point of the search in the 33x33 matrix search region
+    Changes:
+    11/7/00:    implemented MMX
+  ===============================================================*/
+/*==================================================================
+    Function:   AVCSAD_MB_HalfPel_C
+    Date:       04/30/2001
+    Purpose:    Compute SAD 16x16 between blk and ref in halfpel
+                resolution,
+    Changes:
+  ==================================================================*/
+/* One component is half-pel */
+int AVCSAD_MB_HalfPel_Cxhyh(uint8 *ref, uint8 *blk, int dmin_rx, void *extra_info)
+{
+    (void)(extra_info);
+
+    int i, j;
+    int sad = 0;
+    uint8 *kk, *p1, *p2, *p3, *p4;
+//  int sumref=0;
+    int temp;
+    int rx = dmin_rx & 0xFFFF;
+
+    NUM_SAD_HP_MB_CALL();
+
+    p1 = ref;
+    p2 = ref + 1;
+    p3 = ref + rx;
+    p4 = ref + rx + 1;
+    kk  = blk;
+
+    for (i = 0; i < 16; i++)
+    {
+        for (j = 0; j < 16; j++)
+        {
+
+            temp = ((p1[j] + p2[j] + p3[j] + p4[j] + 2) >> 2) - *kk++;
+            sad += AVC_ABS(temp);
+        }
+
+        NUM_SAD_HP_MB();
+
+        if (sad > (int)((uint32)dmin_rx >> 16))
+            return sad;
+
+        p1 += rx;
+        p3 += rx;
+        p2 += rx;
+        p4 += rx;
+    }
+    return sad;
+}
+
+int AVCSAD_MB_HalfPel_Cyh(uint8 *ref, uint8 *blk, int dmin_rx, void *extra_info)
+{
+    (void)(extra_info);
+
+    int i, j;
+    int sad = 0;
+    uint8 *kk, *p1, *p2;
+//  int sumref=0;
+    int temp;
+    int rx = dmin_rx & 0xFFFF;
+
+    NUM_SAD_HP_MB_CALL();
+
+    p1 = ref;
+    p2 = ref + rx; /* either left/right or top/bottom pixel */
+    kk  = blk;
+
+    for (i = 0; i < 16; i++)
+    {
+        for (j = 0; j < 16; j++)
+        {
+
+            temp = ((p1[j] + p2[j] + 1) >> 1) - *kk++;
+            sad += AVC_ABS(temp);
+        }
+
+        NUM_SAD_HP_MB();
+
+        if (sad > (int)((uint32)dmin_rx >> 16))
+            return sad;
+        p1 += rx;
+        p2 += rx;
+    }
+    return sad;
+}
+
+int AVCSAD_MB_HalfPel_Cxh(uint8 *ref, uint8 *blk, int dmin_rx, void *extra_info)
+{
+    (void)(extra_info);
+
+    int i, j;
+    int sad = 0;
+    uint8 *kk, *p1;
+    int temp;
+    int rx = dmin_rx & 0xFFFF;
+
+    NUM_SAD_HP_MB_CALL();
+
+    p1 = ref;
+    kk  = blk;
+
+    for (i = 0; i < 16; i++)
+    {
+        for (j = 0; j < 16; j++)
+        {
+
+            temp = ((p1[j] + p1[j+1] + 1) >> 1) - *kk++;
+            sad += AVC_ABS(temp);
+        }
+
+        NUM_SAD_HP_MB();
+
+        if (sad > (int)((uint32)dmin_rx >> 16))
+            return sad;
+        p1 += rx;
+    }
+    return sad;
+}
+
+#ifdef HTFM  /* HTFM with uniform subsampling implementation,  2/28/01 */
+
+//Checheck here
+int AVCAVCSAD_MB_HP_HTFM_Collectxhyh(uint8 *ref, uint8 *blk, int dmin_rx, void *extra_info)
+{
+    int i, j;
+    int sad = 0;
+    uint8 *p1, *p2;
+    int rx = dmin_rx & 0xFFFF;
+    int refwx4 = rx << 2;
+    int saddata[16];      /* used when collecting flag (global) is on */
+    int difmad, tmp, tmp2;
+    int madstar;
+    HTFM_Stat *htfm_stat = (HTFM_Stat*) extra_info;
+    int *abs_dif_mad_avg = &(htfm_stat->abs_dif_mad_avg);
+    UInt *countbreak = &(htfm_stat->countbreak);
+    int *offsetRef = htfm_stat->offsetRef;
+    uint32 cur_word;
+
+    madstar = (uint32)dmin_rx >> 20;
+
+    NUM_SAD_HP_MB_CALL();
+
+    blk -= 4;
+
+    for (i = 0; i < 16; i++) /* 16 stages */
+    {
+        p1 = ref + offsetRef[i];
+        p2 = p1 + rx;
+
+        j = 4;/* 4 lines */
+        do
+        {
+            cur_word = *((uint32*)(blk += 4));
+            tmp = p1[12] + p2[12];
+            tmp2 = p1[13] + p2[13];
+            tmp += tmp2;
+            tmp2 = (cur_word >> 24) & 0xFF;
+            tmp += 2;
+            sad = INTERP2_SUB_SAD(sad, tmp, tmp2);;
+            tmp = p1[8] + p2[8];
+            tmp2 = p1[9] + p2[9];
+            tmp += tmp2;
+            tmp2 = (cur_word >> 16) & 0xFF;
+            tmp += 2;
+            sad = INTERP2_SUB_SAD(sad, tmp, tmp2);;
+            tmp = p1[4] + p2[4];
+            tmp2 = p1[5] + p2[5];
+            tmp += tmp2;
+            tmp2 = (cur_word >> 8) & 0xFF;
+            tmp += 2;
+            sad = INTERP2_SUB_SAD(sad, tmp, tmp2);;
+            tmp2 = p1[1] + p2[1];
+            tmp = p1[0] + p2[0];
+            p1 += refwx4;
+            p2 += refwx4;
+            tmp += tmp2;
+            tmp2 = (cur_word & 0xFF);
+            tmp += 2;
+            sad = INTERP2_SUB_SAD(sad, tmp, tmp2);;
+        }
+        while (--j);
+
+        NUM_SAD_HP_MB();
+
+        saddata[i] = sad;
+
+        if (i > 0)
+        {
+            if (sad > ((uint32)dmin_rx >> 16))
+            {
+                difmad = saddata[0] - ((saddata[1] + 1) >> 1);
+                (*abs_dif_mad_avg) += ((difmad > 0) ? difmad : -difmad);
+                (*countbreak)++;
+                return sad;
+            }
+        }
+    }
+    difmad = saddata[0] - ((saddata[1] + 1) >> 1);
+    (*abs_dif_mad_avg) += ((difmad > 0) ? difmad : -difmad);
+    (*countbreak)++;
+
+    return sad;
+}
+
+int AVCAVCSAD_MB_HP_HTFM_Collectyh(uint8 *ref, uint8 *blk, int dmin_rx, void *extra_info)
+{
+    int i, j;
+    int sad = 0;
+    uint8 *p1, *p2;
+    int rx = dmin_rx & 0xFFFF;
+    int refwx4 = rx << 2;
+    int saddata[16];      /* used when collecting flag (global) is on */
+    int difmad, tmp, tmp2;
+    int madstar;
+    HTFM_Stat *htfm_stat = (HTFM_Stat*) extra_info;
+    int *abs_dif_mad_avg = &(htfm_stat->abs_dif_mad_avg);
+    UInt *countbreak = &(htfm_stat->countbreak);
+    int *offsetRef = htfm_stat->offsetRef;
+    uint32 cur_word;
+
+    madstar = (uint32)dmin_rx >> 20;
+
+    NUM_SAD_HP_MB_CALL();
+
+    blk -= 4;
+
+    for (i = 0; i < 16; i++) /* 16 stages */
+    {
+        p1 = ref + offsetRef[i];
+        p2 = p1 + rx;
+        j = 4;
+        do
+        {
+            cur_word = *((uint32*)(blk += 4));
+            tmp = p1[12];
+            tmp2 = p2[12];
+            tmp++;
+            tmp2 += tmp;
+            tmp = (cur_word >> 24) & 0xFF;
+            sad = INTERP1_SUB_SAD(sad, tmp, tmp2);;
+            tmp = p1[8];
+            tmp2 = p2[8];
+            tmp++;
+            tmp2 += tmp;
+            tmp = (cur_word >> 16) & 0xFF;
+            sad = INTERP1_SUB_SAD(sad, tmp, tmp2);;
+            tmp = p1[4];
+            tmp2 = p2[4];
+            tmp++;
+            tmp2 += tmp;
+            tmp = (cur_word >> 8) & 0xFF;
+            sad = INTERP1_SUB_SAD(sad, tmp, tmp2);;
+            tmp = p1[0];
+            p1 += refwx4;
+            tmp2 = p2[0];
+            p2 += refwx4;
+            tmp++;
+            tmp2 += tmp;
+            tmp = (cur_word & 0xFF);
+            sad = INTERP1_SUB_SAD(sad, tmp, tmp2);;
+        }
+        while (--j);
+
+        NUM_SAD_HP_MB();
+
+        saddata[i] = sad;
+
+        if (i > 0)
+        {
+            if (sad > ((uint32)dmin_rx >> 16))
+            {
+                difmad = saddata[0] - ((saddata[1] + 1) >> 1);
+                (*abs_dif_mad_avg) += ((difmad > 0) ? difmad : -difmad);
+                (*countbreak)++;
+                return sad;
+            }
+        }
+    }
+    difmad = saddata[0] - ((saddata[1] + 1) >> 1);
+    (*abs_dif_mad_avg) += ((difmad > 0) ? difmad : -difmad);
+    (*countbreak)++;
+
+    return sad;
+}
+
+int AVCAVCSAD_MB_HP_HTFM_Collectxh(uint8 *ref, uint8 *blk, int dmin_rx, void *extra_info)
+{
+    int i, j;
+    int sad = 0;
+    uint8 *p1;
+    int rx = dmin_rx & 0xFFFF;
+    int refwx4 = rx << 2;
+    int saddata[16];      /* used when collecting flag (global) is on */
+    int difmad, tmp, tmp2;
+    int madstar;
+    HTFM_Stat *htfm_stat = (HTFM_Stat*) extra_info;
+    int *abs_dif_mad_avg = &(htfm_stat->abs_dif_mad_avg);
+    UInt *countbreak = &(htfm_stat->countbreak);
+    int *offsetRef = htfm_stat->offsetRef;
+    uint32 cur_word;
+
+    madstar = (uint32)dmin_rx >> 20;
+
+    NUM_SAD_HP_MB_CALL();
+
+    blk -= 4;
+
+    for (i = 0; i < 16; i++) /* 16 stages */
+    {
+        p1 = ref + offsetRef[i];
+
+        j = 4; /* 4 lines */
+        do
+        {
+            cur_word = *((uint32*)(blk += 4));
+            tmp = p1[12];
+            tmp2 = p1[13];
+            tmp++;
+            tmp2 += tmp;
+            tmp = (cur_word >> 24) & 0xFF;
+            sad = INTERP1_SUB_SAD(sad, tmp, tmp2);;
+            tmp = p1[8];
+            tmp2 = p1[9];
+            tmp++;
+            tmp2 += tmp;
+            tmp = (cur_word >> 16) & 0xFF;
+            sad = INTERP1_SUB_SAD(sad, tmp, tmp2);;
+            tmp = p1[4];
+            tmp2 = p1[5];
+            tmp++;
+            tmp2 += tmp;
+            tmp = (cur_word >> 8) & 0xFF;
+            sad = INTERP1_SUB_SAD(sad, tmp, tmp2);;
+            tmp = p1[0];
+            tmp2 = p1[1];
+            p1 += refwx4;
+            tmp++;
+            tmp2 += tmp;
+            tmp = (cur_word & 0xFF);
+            sad = INTERP1_SUB_SAD(sad, tmp, tmp2);;
+        }
+        while (--j);
+
+        NUM_SAD_HP_MB();
+
+        saddata[i] = sad;
+
+        if (i > 0)
+        {
+            if (sad > ((uint32)dmin_rx >> 16))
+            {
+                difmad = saddata[0] - ((saddata[1] + 1) >> 1);
+                (*abs_dif_mad_avg) += ((difmad > 0) ? difmad : -difmad);
+                (*countbreak)++;
+                return sad;
+            }
+        }
+    }
+    difmad = saddata[0] - ((saddata[1] + 1) >> 1);
+    (*abs_dif_mad_avg) += ((difmad > 0) ? difmad : -difmad);
+    (*countbreak)++;
+
+    return sad;
+}
+
+int AVCSAD_MB_HP_HTFMxhyh(uint8 *ref, uint8 *blk, int dmin_rx, void *extra_info)
+{
+    int i, j;
+    int sad = 0, tmp, tmp2;
+    uint8 *p1, *p2;
+    int rx = dmin_rx & 0xFFFF;
+    int refwx4 = rx << 2;
+    int sadstar = 0, madstar;
+    int *nrmlz_th = (int*) extra_info;
+    int *offsetRef = nrmlz_th + 32;
+    uint32 cur_word;
+
+    madstar = (uint32)dmin_rx >> 20;
+
+    NUM_SAD_HP_MB_CALL();
+
+    blk -= 4;
+
+    for (i = 0; i < 16; i++) /* 16 stages */
+    {
+        p1 = ref + offsetRef[i];
+        p2 = p1 + rx;
+
+        j = 4; /* 4 lines */
+        do
+        {
+            cur_word = *((uint32*)(blk += 4));
+            tmp = p1[12] + p2[12];
+            tmp2 = p1[13] + p2[13];
+            tmp += tmp2;
+            tmp2 = (cur_word >> 24) & 0xFF;
+            tmp += 2;
+            sad = INTERP2_SUB_SAD(sad, tmp, tmp2);;
+            tmp = p1[8] + p2[8];
+            tmp2 = p1[9] + p2[9];
+            tmp += tmp2;
+            tmp2 = (cur_word >> 16) & 0xFF;
+            tmp += 2;
+            sad = INTERP2_SUB_SAD(sad, tmp, tmp2);;
+            tmp = p1[4] + p2[4];
+            tmp2 = p1[5] + p2[5];
+            tmp += tmp2;
+            tmp2 = (cur_word >> 8) & 0xFF;
+            tmp += 2;
+            sad = INTERP2_SUB_SAD(sad, tmp, tmp2);;
+            tmp2 = p1[1] + p2[1];
+            tmp = p1[0] + p2[0];
+            p1 += refwx4;
+            p2 += refwx4;
+            tmp += tmp2;
+            tmp2 = (cur_word & 0xFF);
+            tmp += 2;
+            sad = INTERP2_SUB_SAD(sad, tmp, tmp2);;
+        }
+        while (--j);
+
+        NUM_SAD_HP_MB();
+
+        sadstar += madstar;
+        if (sad > sadstar - nrmlz_th[i] || sad > ((uint32)dmin_rx >> 16))
+        {
+            return 65536;
+        }
+    }
+
+    return sad;
+}
+
+int AVCSAD_MB_HP_HTFMyh(uint8 *ref, uint8 *blk, int dmin_rx, void *extra_info)
+{
+    int i, j;
+    int sad = 0, tmp, tmp2;
+    uint8 *p1, *p2;
+    int rx = dmin_rx & 0xFFFF;
+    int refwx4 = rx << 2;
+    int sadstar = 0, madstar;
+    int *nrmlz_th = (int*) extra_info;
+    int *offsetRef = nrmlz_th + 32;
+    uint32 cur_word;
+
+    madstar = (uint32)dmin_rx >> 20;
+
+    NUM_SAD_HP_MB_CALL();
+
+    blk -= 4;
+
+    for (i = 0; i < 16; i++) /* 16 stages */
+    {
+        p1 = ref + offsetRef[i];
+        p2 = p1 + rx;
+        j = 4;
+        do
+        {
+            cur_word = *((uint32*)(blk += 4));
+            tmp = p1[12];
+            tmp2 = p2[12];
+            tmp++;
+            tmp2 += tmp;
+            tmp = (cur_word >> 24) & 0xFF;
+            sad = INTERP1_SUB_SAD(sad, tmp, tmp2);;
+            tmp = p1[8];
+            tmp2 = p2[8];
+            tmp++;
+            tmp2 += tmp;
+            tmp = (cur_word >> 16) & 0xFF;
+            sad = INTERP1_SUB_SAD(sad, tmp, tmp2);;
+            tmp = p1[4];
+            tmp2 = p2[4];
+            tmp++;
+            tmp2 += tmp;
+            tmp = (cur_word >> 8) & 0xFF;
+            sad = INTERP1_SUB_SAD(sad, tmp, tmp2);;
+            tmp = p1[0];
+            p1 += refwx4;
+            tmp2 = p2[0];
+            p2 += refwx4;
+            tmp++;
+            tmp2 += tmp;
+            tmp = (cur_word & 0xFF);
+            sad = INTERP1_SUB_SAD(sad, tmp, tmp2);;
+        }
+        while (--j);
+
+        NUM_SAD_HP_MB();
+        sadstar += madstar;
+        if (sad > sadstar - nrmlz_th[i] || sad > ((uint32)dmin_rx >> 16))
+        {
+            return 65536;
+        }
+    }
+
+    return sad;
+}
+
+int AVCSAD_MB_HP_HTFMxh(uint8 *ref, uint8 *blk, int dmin_rx, void *extra_info)
+{
+    int i, j;
+    int sad = 0, tmp, tmp2;
+    uint8 *p1;
+    int rx = dmin_rx & 0xFFFF;
+    int refwx4 = rx << 2;
+    int sadstar = 0, madstar;
+    int *nrmlz_th = (int*) extra_info;
+    int *offsetRef = nrmlz_th + 32;
+    uint32 cur_word;
+
+    madstar = (uint32)dmin_rx >> 20;
+
+    NUM_SAD_HP_MB_CALL();
+
+    blk -= 4;
+
+    for (i = 0; i < 16; i++) /* 16 stages */
+    {
+        p1 = ref + offsetRef[i];
+
+        j = 4;/* 4 lines */
+        do
+        {
+            cur_word = *((uint32*)(blk += 4));
+            tmp = p1[12];
+            tmp2 = p1[13];
+            tmp++;
+            tmp2 += tmp;
+            tmp = (cur_word >> 24) & 0xFF;
+            sad = INTERP1_SUB_SAD(sad, tmp, tmp2);;
+            tmp = p1[8];
+            tmp2 = p1[9];
+            tmp++;
+            tmp2 += tmp;
+            tmp = (cur_word >> 16) & 0xFF;
+            sad = INTERP1_SUB_SAD(sad, tmp, tmp2);;
+            tmp = p1[4];
+            tmp2 = p1[5];
+            tmp++;
+            tmp2 += tmp;
+            tmp = (cur_word >> 8) & 0xFF;
+            sad = INTERP1_SUB_SAD(sad, tmp, tmp2);;
+            tmp = p1[0];
+            tmp2 = p1[1];
+            p1 += refwx4;
+            tmp++;
+            tmp2 += tmp;
+            tmp = (cur_word & 0xFF);
+            sad = INTERP1_SUB_SAD(sad, tmp, tmp2);;
+        }
+        while (--j);
+
+        NUM_SAD_HP_MB();
+
+        sadstar += madstar;
+        if (sad > sadstar - nrmlz_th[i] || sad > ((uint32)dmin_rx >> 16))
+        {
+            return 65536;
+        }
+    }
+
+    return sad;
+}
+
+#endif /* HTFM */
+
+
+
+
+
diff --git a/media/libstagefright/codecs/avc/enc/src/sad_halfpel_inline.h b/media/libstagefright/codecs/avc/enc/src/sad_halfpel_inline.h
new file mode 100644
index 0000000..3a21647
--- /dev/null
+++ b/media/libstagefright/codecs/avc/enc/src/sad_halfpel_inline.h
@@ -0,0 +1,96 @@
+/* ------------------------------------------------------------------
+ * Copyright (C) 1998-2009 PacketVideo
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
+ * express or implied.
+ * See the License for the specific language governing permissions
+ * and limitations under the License.
+ * -------------------------------------------------------------------
+ */
+
+#ifndef _SAD_HALFPEL_INLINE_H_
+#define _SAD_HALFPEL_INLINE_H_
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
+#if defined(__GNUC__) && defined(__arm__) /* ARM GNU COMPILER  */
+
+    __inline int32 INTERP1_SUB_SAD(int32 sad, int32 tmp, int32 tmp2)
+    {
+        tmp = (tmp2 >> 1) - tmp;
+        if (tmp > 0) sad += tmp;
+        else sad -= tmp;
+
+        return sad;
+    }
+
+    __inline int32 INTERP2_SUB_SAD(int32 sad, int32 tmp, int32 tmp2)
+    {
+        tmp = (tmp >> 2) - tmp2;
+        if (tmp > 0) sad += tmp;
+        else sad -= tmp;
+
+        return sad;
+    }
+
+#elif defined(__CC_ARM)  /* only work with arm v5 */
+
+    __inline int32 INTERP1_SUB_SAD(int32 sad, int32 tmp, int32 tmp2)
+    {
+        __asm
+        {
+            rsbs    tmp, tmp, tmp2, asr #1 ;
+            rsbmi   tmp, tmp, #0 ;
+            add     sad, sad, tmp ;
+        }
+
+        return sad;
+    }
+
+    __inline int32 INTERP2_SUB_SAD(int32 sad, int32 tmp, int32 tmp2)
+    {
+        __asm
+        {
+            rsbs    tmp, tmp2, tmp, asr #2 ;
+            rsbmi   tmp, tmp, #0 ;
+            add     sad, sad, tmp ;
+        }
+
+        return sad;
+    }
+
+#elif defined(__GNUC__) && defined(__arm__) /* ARM GNU COMPILER  */
+
+    __inline int32 INTERP1_SUB_SAD(int32 sad, int32 tmp, int32 tmp2)
+    {
+__asm__ volatile("rsbs	%1, %1, %2, asr #1\n\trsbmi %1, %1, #0\n\tadd  %0, %0, %1": "=r"(sad), "=r"(tmp): "r"(tmp2));
+
+        return sad;
+    }
+
+    __inline int32 INTERP2_SUB_SAD(int32 sad, int32 tmp, int32 tmp2)
+    {
+__asm__ volatile("rsbs	%1, %2, %1, asr #2\n\trsbmi %1, %1, #0\n\tadd	%0, %0, %1": "=r"(sad), "=r"(tmp): "r"(tmp2));
+
+        return sad;
+    }
+
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif //_SAD_HALFPEL_INLINE_H_
+
diff --git a/media/libstagefright/codecs/avc/enc/src/sad_inline.h b/media/libstagefright/codecs/avc/enc/src/sad_inline.h
new file mode 100644
index 0000000..f39794f
--- /dev/null
+++ b/media/libstagefright/codecs/avc/enc/src/sad_inline.h
@@ -0,0 +1,488 @@
+/* ------------------------------------------------------------------
+ * Copyright (C) 1998-2009 PacketVideo
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
+ * express or implied.
+ * See the License for the specific language governing permissions
+ * and limitations under the License.
+ * -------------------------------------------------------------------
+ */
+#ifndef _SAD_INLINE_H_
+#define _SAD_INLINE_H_
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
+#if defined(__GNUC__) && defined(__arm__) /* ARM GNU COMPILER  */
+
+    __inline int32 SUB_SAD(int32 sad, int32 tmp, int32 tmp2)
+    {
+        tmp = tmp - tmp2;
+        if (tmp > 0) sad += tmp;
+        else sad -= tmp;
+
+        return sad;
+    }
+
+    __inline int32 sad_4pixel(int32 src1, int32 src2, int32 mask)
+    {
+        int32 x7;
+
+        x7 = src2 ^ src1;       /* check odd/even combination */
+        if ((uint32)src2 >= (uint32)src1)
+        {
+            src1 = src2 - src1;     /* subs */
+        }
+        else
+        {
+            src1 = src1 - src2;
+        }
+        x7 = x7 ^ src1;     /* only odd bytes need to add carry */
+        x7 = mask & ((uint32)x7 >> 1);
+        x7 = (x7 << 8) - x7;
+        src1 = src1 + (x7 >> 7); /* add 0xFF to the negative byte, add back carry */
+        src1 = src1 ^(x7 >> 7);   /* take absolute value of negative byte */
+
+        return src1;
+    }
+
+#define NUMBER 3
+#define SHIFT 24
+
+#include "sad_mb_offset.h"
+
+#undef NUMBER
+#define NUMBER 2
+#undef SHIFT
+#define SHIFT 16
+#include "sad_mb_offset.h"
+
+#undef NUMBER
+#define NUMBER 1
+#undef SHIFT
+#define SHIFT 8
+#include "sad_mb_offset.h"
+
+
+    __inline int32 simd_sad_mb(uint8 *ref, uint8 *blk, int dmin, int lx)
+    {
+        int32 x4, x5, x6, x8, x9, x10, x11, x12, x14;
+
+        x9 = 0x80808080; /* const. */
+
+        x8 = (uint32)ref & 0x3;
+        if (x8 == 3)
+            goto SadMBOffset3;
+        if (x8 == 2)
+            goto SadMBOffset2;
+        if (x8 == 1)
+            goto SadMBOffset1;
+
+//  x5 = (x4<<8)-x4; /* x5 = x4*255; */
+        x4 = x5 = 0;
+
+        x6 = 0xFFFF00FF;
+
+        ref -= lx;
+        blk -= 16;
+
+        x8 = 16;
+
+LOOP_SAD0:
+        /****** process 8 pixels ******/
+        x10 = *((uint32*)(ref += lx));
+        x11 = *((uint32*)(ref + 4));
+        x12 = *((uint32*)(blk += 16));
+        x14 = *((uint32*)(blk + 4));
+
+        /* process x11 & x14 */
+        x11 = sad_4pixel(x11, x14, x9);
+
+        /* process x12 & x10 */
+        x10 = sad_4pixel(x10, x12, x9);
+
+        x5 = x5 + x10; /* accumulate low bytes */
+        x10 = x10 & (x6 << 8); /* x10 & 0xFF00FF00 */
+        x4 = x4 + ((uint32)x10 >> 8);  /* accumulate high bytes */
+        x5 = x5 + x11;  /* accumulate low bytes */
+        x11 = x11 & (x6 << 8); /* x11 & 0xFF00FF00 */
+        x4 = x4 + ((uint32)x11 >> 8);  /* accumulate high bytes */
+
+        /****** process 8 pixels ******/
+        x10 = *((uint32*)(ref + 8));
+        x11 = *((uint32*)(ref + 12));
+        x12 = *((uint32*)(blk + 8));
+        x14 = *((uint32*)(blk + 12));
+
+        /* process x11 & x14 */
+        x11 = sad_4pixel(x11, x14, x9);
+
+        /* process x12 & x10 */
+        x10 = sad_4pixel(x10, x12, x9);
+
+        x5 = x5 + x10;  /* accumulate low bytes */
+        x10 = x10 & (x6 << 8); /* x10 & 0xFF00FF00 */
+        x4 = x4 + ((uint32)x10 >> 8); /* accumulate high bytes */
+        x5 = x5 + x11;  /* accumulate low bytes */
+        x11 = x11 & (x6 << 8); /* x11 & 0xFF00FF00 */
+        x4 = x4 + ((uint32)x11 >> 8);  /* accumulate high bytes */
+
+        /****************/
+        x10 = x5 - (x4 << 8); /* extract low bytes */
+        x10 = x10 + x4;     /* add with high bytes */
+        x10 = x10 + (x10 << 16); /* add with lower half word */
+
+        if ((int)((uint32)x10 >> 16) <= dmin) /* compare with dmin */
+        {
+            if (--x8)
+            {
+                goto LOOP_SAD0;
+            }
+
+        }
+
+        return ((uint32)x10 >> 16);
+
+SadMBOffset3:
+
+        return sad_mb_offset3(ref, blk, lx, dmin);
+
+SadMBOffset2:
+
+        return sad_mb_offset2(ref, blk, lx, dmin);
+
+SadMBOffset1:
+
+        return sad_mb_offset1(ref, blk, lx, dmin);
+
+    }
+
+#elif defined(__CC_ARM)  /* only work with arm v5 */
+
+    __inline int32 SUB_SAD(int32 sad, int32 tmp, int32 tmp2)
+    {
+        __asm
+        {
+            rsbs    tmp, tmp, tmp2 ;
+            rsbmi   tmp, tmp, #0 ;
+            add     sad, sad, tmp ;
+        }
+
+        return sad;
+    }
+
+    __inline int32 sad_4pixel(int32 src1, int32 src2, int32 mask)
+    {
+        int32 x7;
+
+        __asm
+        {
+            EOR     x7, src2, src1;     /* check odd/even combination */
+            SUBS    src1, src2, src1;
+            EOR     x7, x7, src1;
+            AND     x7, mask, x7, lsr #1;
+            ORRCC   x7, x7, #0x80000000;
+            RSB     x7, x7, x7, lsl #8;
+            ADD     src1, src1, x7, asr #7;   /* add 0xFF to the negative byte, add back carry */
+            EOR     src1, src1, x7, asr #7;   /* take absolute value of negative byte */
+        }
+
+        return src1;
+    }
+
+    __inline int32 sad_4pixelN(int32 src1, int32 src2, int32 mask)
+    {
+        int32 x7;
+
+        __asm
+        {
+            EOR      x7, src2, src1;        /* check odd/even combination */
+            ADDS     src1, src2, src1;
+            EOR      x7, x7, src1;      /* only odd bytes need to add carry */
+            ANDS     x7, mask, x7, rrx;
+            RSB      x7, x7, x7, lsl #8;
+            SUB      src1, src1, x7, asr #7;  /* add 0xFF to the negative byte, add back carry */
+            EOR      src1, src1, x7, asr #7; /* take absolute value of negative byte */
+        }
+
+        return src1;
+    }
+
+#define sum_accumulate  __asm{      SBC      x5, x5, x10;  /* accumulate low bytes */ \
+        BIC      x10, x6, x10;   /* x10 & 0xFF00FF00 */ \
+        ADD      x4, x4, x10,lsr #8;   /* accumulate high bytes */ \
+        SBC      x5, x5, x11;    /* accumulate low bytes */ \
+        BIC      x11, x6, x11;   /* x11 & 0xFF00FF00 */ \
+        ADD      x4, x4, x11,lsr #8; } /* accumulate high bytes */
+
+
+#define NUMBER 3
+#define SHIFT 24
+#define INC_X8 0x08000001
+
+#include "sad_mb_offset.h"
+
+#undef NUMBER
+#define NUMBER 2
+#undef SHIFT
+#define SHIFT 16
+#undef INC_X8
+#define INC_X8 0x10000001
+#include "sad_mb_offset.h"
+
+#undef NUMBER
+#define NUMBER 1
+#undef SHIFT
+#define SHIFT 8
+#undef INC_X8
+#define INC_X8 0x08000001
+#include "sad_mb_offset.h"
+
+
+    __inline int32 simd_sad_mb(uint8 *ref, uint8 *blk, int dmin, int lx)
+    {
+        int32 x4, x5, x6, x8, x9, x10, x11, x12, x14;
+
+        x9 = 0x80808080; /* const. */
+        x4 = x5 = 0;
+
+        __asm
+        {
+            MOVS    x8, ref, lsl #31 ;
+            BHI     SadMBOffset3;
+            BCS     SadMBOffset2;
+            BMI     SadMBOffset1;
+
+            MVN     x6, #0xFF00;
+        }
+LOOP_SAD0:
+        /****** process 8 pixels ******/
+        x11 = *((int32*)(ref + 12));
+        x10 = *((int32*)(ref + 8));
+        x14 = *((int32*)(blk + 12));
+        x12 = *((int32*)(blk + 8));
+
+        /* process x11 & x14 */
+        x11 = sad_4pixel(x11, x14, x9);
+
+        /* process x12 & x10 */
+        x10 = sad_4pixel(x10, x12, x9);
+
+        x5 = x5 + x10;  /* accumulate low bytes */
+        x10 = x10 & (x6 << 8); /* x10 & 0xFF00FF00 */
+        x4 = x4 + ((uint32)x10 >> 8); /* accumulate high bytes */
+        x5 = x5 + x11;  /* accumulate low bytes */
+        x11 = x11 & (x6 << 8); /* x11 & 0xFF00FF00 */
+        x4 = x4 + ((uint32)x11 >> 8);  /* accumulate high bytes */
+
+        __asm
+        {
+            /****** process 8 pixels ******/
+            LDR     x11, [ref, #4];
+            LDR     x10, [ref], lx ;
+            LDR     x14, [blk, #4];
+            LDR     x12, [blk], #16 ;
+        }
+
+        /* process x11 & x14 */
+        x11 = sad_4pixel(x11, x14, x9);
+
+        /* process x12 & x10 */
+        x10 = sad_4pixel(x10, x12, x9);
+
+        x5 = x5 + x10;  /* accumulate low bytes */
+        x10 = x10 & (x6 << 8); /* x10 & 0xFF00FF00 */
+        x4 = x4 + ((uint32)x10 >> 8); /* accumulate high bytes */
+        x5 = x5 + x11;  /* accumulate low bytes */
+        x11 = x11 & (x6 << 8); /* x11 & 0xFF00FF00 */
+        x4 = x4 + ((uint32)x11 >> 8);  /* accumulate high bytes */
+
+        /****************/
+        x10 = x5 - (x4 << 8); /* extract low bytes */
+        x10 = x10 + x4;     /* add with high bytes */
+        x10 = x10 + (x10 << 16); /* add with lower half word */
+
+        __asm
+        {
+            /****************/
+            RSBS    x11, dmin, x10, lsr #16;
+            ADDLSS  x8, x8, #0x10000001;
+            BLS     LOOP_SAD0;
+        }
+
+        return ((uint32)x10 >> 16);
+
+SadMBOffset3:
+
+        return sad_mb_offset3(ref, blk, lx, dmin, x8);
+
+SadMBOffset2:
+
+        return sad_mb_offset2(ref, blk, lx, dmin, x8);
+
+SadMBOffset1:
+
+        return sad_mb_offset1(ref, blk, lx, dmin, x8);
+    }
+
+
+#elif defined(__GNUC__) && defined(__arm__) /* ARM GNU COMPILER  */
+
+    __inline int32 SUB_SAD(int32 sad, int32 tmp, int32 tmp2)
+    {
+__asm__ volatile("rsbs	%1, %1, %2\n\trsbmi %1, %1, #0\n\tadd	%0, %0, %1": "=r"(sad): "r"(tmp), "r"(tmp2));
+        return sad;
+    }
+
+    __inline int32 sad_4pixel(int32 src1, int32 src2, int32 mask)
+    {
+        int32 x7;
+
+__asm__ volatile("EOR	%1, %2, %0\n\tSUBS  %0, %2, %0\n\tEOR	%1, %1, %0\n\tAND  %1, %3, %1, lsr #1\n\tORRCC	%1, %1, #0x80000000\n\tRSB  %1, %1, %1, lsl #8\n\tADD  %0, %0, %1, asr #7\n\tEOR  %0, %0, %1, asr #7": "=r"(src1), "=&r"(x7): "r"(src2), "r"(mask));
+
+        return src1;
+    }
+
+    __inline int32 sad_4pixelN(int32 src1, int32 src2, int32 mask)
+    {
+        int32 x7;
+
+__asm__ volatile("EOR	%1, %2, %0\n\tADDS  %0, %2, %0\n\tEOR  %1, %1, %0\n\tANDS  %1, %3, %1, rrx\n\tRSB  %1, %1, %1, lsl #8\n\tSUB	%0, %0, %1, asr #7\n\tEOR   %0, %0, %1, asr #7": "=r"(src1), "=&r"(x7): "r"(src2), "r"(mask));
+
+        return src1;
+    }
+
+#define sum_accumulate  __asm__ volatile("SBC  %0, %0, %1\n\tBIC   %1, %4, %1\n\tADD   %2, %2, %1, lsr #8\n\tSBC   %0, %0, %3\n\tBIC   %3, %4, %3\n\tADD   %2, %2, %3, lsr #8": "=&r" (x5), "=&r" (x10), "=&r" (x4), "=&r" (x11): "r" (x6));
+
+#define NUMBER 3
+#define SHIFT 24
+#define INC_X8 0x08000001
+
+#include "sad_mb_offset.h"
+
+#undef NUMBER
+#define NUMBER 2
+#undef SHIFT
+#define SHIFT 16
+#undef INC_X8
+#define INC_X8 0x10000001
+#include "sad_mb_offset.h"
+
+#undef NUMBER
+#define NUMBER 1
+#undef SHIFT
+#define SHIFT 8
+#undef INC_X8
+#define INC_X8 0x08000001
+#include "sad_mb_offset.h"
+
+
+    __inline int32 simd_sad_mb(uint8 *ref, uint8 *blk, int dmin, int lx)
+    {
+        int32 x4, x5, x6, x8, x9, x10, x11, x12, x14;
+
+        x9 = 0x80808080; /* const. */
+        x4 = x5 = 0;
+
+        x8 = (uint32)ref & 0x3;
+        if (x8 == 3)
+            goto SadMBOffset3;
+        if (x8 == 2)
+            goto SadMBOffset2;
+        if (x8 == 1)
+            goto SadMBOffset1;
+
+        x8 = 16;
+///
+__asm__ volatile("MVN	%0, #0xFF00": "=r"(x6));
+
+LOOP_SAD0:
+        /****** process 8 pixels ******/
+        x11 = *((int32*)(ref + 12));
+        x10 = *((int32*)(ref + 8));
+        x14 = *((int32*)(blk + 12));
+        x12 = *((int32*)(blk + 8));
+
+        /* process x11 & x14 */
+        x11 = sad_4pixel(x11, x14, x9);
+
+        /* process x12 & x10 */
+        x10 = sad_4pixel(x10, x12, x9);
+
+        x5 = x5 + x10;  /* accumulate low bytes */
+        x10 = x10 & (x6 << 8); /* x10 & 0xFF00FF00 */
+        x4 = x4 + ((uint32)x10 >> 8); /* accumulate high bytes */
+        x5 = x5 + x11;  /* accumulate low bytes */
+        x11 = x11 & (x6 << 8); /* x11 & 0xFF00FF00 */
+        x4 = x4 + ((uint32)x11 >> 8);  /* accumulate high bytes */
+
+        /****** process 8 pixels ******/
+        x11 = *((int32*)(ref + 4));
+__asm__ volatile("LDR	%0, [%1], %2": "=&r"(x10), "=r"(ref): "r"(lx));
+        //x10 = *((int32*)ref); ref+=lx;
+        x14 = *((int32*)(blk + 4));
+__asm__ volatile("LDR	%0, [%1], #16": "=&r"(x12), "=r"(blk));
+
+        /* process x11 & x14 */
+        x11 = sad_4pixel(x11, x14, x9);
+
+        /* process x12 & x10 */
+        x10 = sad_4pixel(x10, x12, x9);
+
+        x5 = x5 + x10;  /* accumulate low bytes */
+        x10 = x10 & (x6 << 8); /* x10 & 0xFF00FF00 */
+        x4 = x4 + ((uint32)x10 >> 8); /* accumulate high bytes */
+        x5 = x5 + x11;  /* accumulate low bytes */
+        x11 = x11 & (x6 << 8); /* x11 & 0xFF00FF00 */
+        x4 = x4 + ((uint32)x11 >> 8);  /* accumulate high bytes */
+
+        /****************/
+        x10 = x5 - (x4 << 8); /* extract low bytes */
+        x10 = x10 + x4;     /* add with high bytes */
+        x10 = x10 + (x10 << 16); /* add with lower half word */
+
+        /****************/
+
+        if (((uint32)x10 >> 16) <= dmin) /* compare with dmin */
+        {
+            if (--x8)
+            {
+                goto LOOP_SAD0;
+            }
+
+        }
+
+        return ((uint32)x10 >> 16);
+
+SadMBOffset3:
+
+        return sad_mb_offset3(ref, blk, lx, dmin);
+
+SadMBOffset2:
+
+        return sad_mb_offset2(ref, blk, lx, dmin);
+
+SadMBOffset1:
+
+        return sad_mb_offset1(ref, blk, lx, dmin);
+    }
+
+
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif // _SAD_INLINE_H_
+
diff --git a/media/libstagefright/codecs/avc/enc/src/sad_mb_offset.h b/media/libstagefright/codecs/avc/enc/src/sad_mb_offset.h
new file mode 100644
index 0000000..d5d4a42
--- /dev/null
+++ b/media/libstagefright/codecs/avc/enc/src/sad_mb_offset.h
@@ -0,0 +1,311 @@
+/* ------------------------------------------------------------------
+ * Copyright (C) 1998-2009 PacketVideo
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
+ * express or implied.
+ * See the License for the specific language governing permissions
+ * and limitations under the License.
+ * -------------------------------------------------------------------
+ */
+
+#if defined(__GNUC__) && defined(__arm__) /* ARM GNU COMPILER  */
+
+#if (NUMBER==3)
+__inline int32 sad_mb_offset3(uint8 *ref, uint8 *blk, int lx, int dmin)
+#elif (NUMBER==2)
+__inline int32 sad_mb_offset2(uint8 *ref, uint8 *blk, int lx, int dmin)
+#elif (NUMBER==1)
+__inline int32 sad_mb_offset1(uint8 *ref, uint8 *blk, int lx, int dmin)
+#endif
+{
+    int32 x4, x5, x6, x8, x9, x10, x11, x12, x14;
+
+    //  x5 = (x4<<8) - x4;
+    x4 = x5 = 0;
+    x6 = 0xFFFF00FF;
+    x9 = 0x80808080; /* const. */
+    ref -= NUMBER; /* bic ref, ref, #3 */
+    ref -= lx;
+    blk -= 16;
+    x8 = 16;
+
+#if (NUMBER==3)
+LOOP_SAD3:
+#elif (NUMBER==2)
+LOOP_SAD2:
+#elif (NUMBER==1)
+LOOP_SAD1:
+#endif
+    /****** process 8 pixels ******/
+    x10 = *((uint32*)(ref += lx)); /* D C B A */
+    x11 = *((uint32*)(ref + 4));    /* H G F E */
+    x12 = *((uint32*)(ref + 8));    /* L K J I */
+
+    x10 = ((uint32)x10 >> SHIFT); /* 0 0 0 D */
+    x10 = x10 | (x11 << (32 - SHIFT));        /* G F E D */
+    x11 = ((uint32)x11 >> SHIFT); /* 0 0 0 H */
+    x11 = x11 | (x12 << (32 - SHIFT));        /* K J I H */
+
+    x12 = *((uint32*)(blk += 16));
+    x14 = *((uint32*)(blk + 4));
+
+    /* process x11 & x14 */
+    x11 = sad_4pixel(x11, x14, x9);
+
+    /* process x12 & x10 */
+    x10 = sad_4pixel(x10, x12, x9);
+
+    x5 = x5 + x10; /* accumulate low bytes */
+    x10 = x10 & (x6 << 8); /* x10 & 0xFF00FF00 */
+    x4 = x4 + ((uint32)x10 >> 8);  /* accumulate high bytes */
+    x5 = x5 + x11;  /* accumulate low bytes */
+    x11 = x11 & (x6 << 8); /* x11 & 0xFF00FF00 */
+    x4 = x4 + ((uint32)x11 >> 8);  /* accumulate high bytes */
+
+    /****** process 8 pixels ******/
+    x10 = *((uint32*)(ref + 8)); /* D C B A */
+    x11 = *((uint32*)(ref + 12));   /* H G F E */
+    x12 = *((uint32*)(ref + 16));   /* L K J I */
+
+    x10 = ((uint32)x10 >> SHIFT); /* mvn x10, x10, lsr #24  = 0xFF 0xFF 0xFF ~D */
+    x10 = x10 | (x11 << (32 - SHIFT));        /* bic x10, x10, x11, lsl #8 = ~G ~F ~E ~D */
+    x11 = ((uint32)x11 >> SHIFT); /* 0xFF 0xFF 0xFF ~H */
+    x11 = x11 | (x12 << (32 - SHIFT));        /* ~K ~J ~I ~H */
+
+    x12 = *((uint32*)(blk + 8));
+    x14 = *((uint32*)(blk + 12));
+
+    /* process x11 & x14 */
+    x11 = sad_4pixel(x11, x14, x9);
+
+    /* process x12 & x10 */
+    x10 = sad_4pixel(x10, x12, x9);
+
+    x5 = x5 + x10; /* accumulate low bytes */
+    x10 = x10 & (x6 << 8); /* x10 & 0xFF00FF00 */
+    x4 = x4 + ((uint32)x10 >> 8);  /* accumulate high bytes */
+    x5 = x5 + x11;  /* accumulate low bytes */
+    x11 = x11 & (x6 << 8); /* x11 & 0xFF00FF00 */
+    x4 = x4 + ((uint32)x11 >> 8);  /* accumulate high bytes */
+
+    /****************/
+    x10 = x5 - (x4 << 8); /* extract low bytes */
+    x10 = x10 + x4;     /* add with high bytes */
+    x10 = x10 + (x10 << 16); /* add with lower half word */
+
+    if ((int)((uint32)x10 >> 16) <= dmin) /* compare with dmin */
+    {
+        if (--x8)
+        {
+#if (NUMBER==3)
+            goto         LOOP_SAD3;
+#elif (NUMBER==2)
+            goto         LOOP_SAD2;
+#elif (NUMBER==1)
+            goto         LOOP_SAD1;
+#endif
+        }
+
+    }
+
+    return ((uint32)x10 >> 16);
+}
+
+#elif defined(__CC_ARM)  /* only work with arm v5 */
+
+#if (NUMBER==3)
+__inline int32 sad_mb_offset3(uint8 *ref, uint8 *blk, int lx, int dmin, int32 x8)
+#elif (NUMBER==2)
+__inline int32 sad_mb_offset2(uint8 *ref, uint8 *blk, int lx, int dmin, int32 x8)
+#elif (NUMBER==1)
+__inline int32 sad_mb_offset1(uint8 *ref, uint8 *blk, int lx, int dmin, int32 x8)
+#endif
+{
+    int32 x4, x5, x6, x9, x10, x11, x12, x14;
+
+    x9 = 0x80808080; /* const. */
+    x4 = x5 = 0;
+
+    __asm{
+        MVN      x6, #0xff0000;
+#if (NUMBER==3)
+LOOP_SAD3:
+#elif (NUMBER==2)
+LOOP_SAD2:
+#elif (NUMBER==1)
+LOOP_SAD1:
+#endif
+        BIC      ref, ref, #3;
+    }
+    /****** process 8 pixels ******/
+    x11 = *((int32*)(ref + 12));
+    x12 = *((int32*)(ref + 16));
+    x10 = *((int32*)(ref + 8));
+    x14 = *((int32*)(blk + 12));
+
+    __asm{
+        MVN      x10, x10, lsr #SHIFT;
+        BIC      x10, x10, x11, lsl #(32-SHIFT);
+        MVN      x11, x11, lsr #SHIFT;
+        BIC      x11, x11, x12, lsl #(32-SHIFT);
+
+        LDR      x12, [blk, #8];
+    }
+
+    /* process x11 & x14 */
+    x11 = sad_4pixelN(x11, x14, x9);
+
+    /* process x12 & x10 */
+    x10 = sad_4pixelN(x10, x12, x9);
+
+    sum_accumulate;
+
+    __asm{
+        /****** process 8 pixels ******/
+        LDR      x11, [ref, #4];
+        LDR      x12, [ref, #8];
+        LDR  x10, [ref], lx ;
+        LDR  x14, [blk, #4];
+
+        MVN      x10, x10, lsr #SHIFT;
+        BIC      x10, x10, x11, lsl #(32-SHIFT);
+        MVN      x11, x11, lsr #SHIFT;
+        BIC      x11, x11, x12, lsl #(32-SHIFT);
+
+        LDR      x12, [blk], #16;
+    }
+
+    /* process x11 & x14 */
+    x11 = sad_4pixelN(x11, x14, x9);
+
+    /* process x12 & x10 */
+    x10 = sad_4pixelN(x10, x12, x9);
+
+    sum_accumulate;
+
+    /****************/
+    x10 = x5 - (x4 << 8); /* extract low bytes */
+    x10 = x10 + x4;     /* add with high bytes */
+    x10 = x10 + (x10 << 16); /* add with lower half word */
+
+    __asm{
+        RSBS     x11, dmin, x10, lsr #16
+        ADDLSS   x8, x8, #INC_X8
+#if (NUMBER==3)
+        BLS      LOOP_SAD3;
+#elif (NUMBER==2)
+BLS      LOOP_SAD2;
+#elif (NUMBER==1)
+BLS      LOOP_SAD1;
+#endif
+    }
+
+    return ((uint32)x10 >> 16);
+}
+
+#elif defined(__GNUC__) && defined(__arm__) /* ARM GNU COMPILER  */
+
+#if (NUMBER==3)
+__inline int32 sad_mb_offset3(uint8 *ref, uint8 *blk, int lx, int dmin)
+#elif (NUMBER==2)
+__inline int32 sad_mb_offset2(uint8 *ref, uint8 *blk, int lx, int dmin)
+#elif (NUMBER==1)
+__inline int32 sad_mb_offset1(uint8 *ref, uint8 *blk, int lx, int dmin)
+#endif
+{
+    int32 x4, x5, x6, x8, x9, x10, x11, x12, x14;
+
+    x9 = 0x80808080; /* const. */
+    x4 = x5 = 0;
+    x8 = 16; //<<===========*******
+
+__asm__ volatile("MVN	%0, #0xFF0000": "=r"(x6));
+
+#if (NUMBER==3)
+LOOP_SAD3:
+#elif (NUMBER==2)
+LOOP_SAD2:
+#elif (NUMBER==1)
+LOOP_SAD1:
+#endif
+__asm__ volatile("BIC  %0, %0, #3": "=r"(ref));
+    /****** process 8 pixels ******/
+    x11 = *((int32*)(ref + 12));
+    x12 = *((int32*)(ref + 16));
+    x10 = *((int32*)(ref + 8));
+    x14 = *((int32*)(blk + 12));
+
+#if (SHIFT==8)
+__asm__ volatile("MVN   %0, %0, lsr #8\n\tBIC   %0, %0, %1,lsl #24\n\tMVN   %1, %1,lsr #8\n\tBIC   %1, %1, %2,lsl #24": "=&r"(x10), "=&r"(x11): "r"(x12));
+#elif (SHIFT==16)
+__asm__ volatile("MVN   %0, %0, lsr #16\n\tBIC   %0, %0, %1,lsl #16\n\tMVN   %1, %1,lsr #16\n\tBIC   %1, %1, %2,lsl #16": "=&r"(x10), "=&r"(x11): "r"(x12));
+#elif (SHIFT==24)
+__asm__ volatile("MVN   %0, %0, lsr #24\n\tBIC   %0, %0, %1,lsl #8\n\tMVN   %1, %1,lsr #24\n\tBIC   %1, %1, %2,lsl #8": "=&r"(x10), "=&r"(x11): "r"(x12));
+#endif
+
+    x12 = *((int32*)(blk + 8));
+
+    /* process x11 & x14 */
+    x11 = sad_4pixelN(x11, x14, x9);
+
+    /* process x12 & x10 */
+    x10 = sad_4pixelN(x10, x12, x9);
+
+    sum_accumulate;
+
+    /****** process 8 pixels ******/
+    x11 = *((int32*)(ref + 4));
+    x12 = *((int32*)(ref + 8));
+    x10 = *((int32*)ref); ref += lx;
+    x14 = *((int32*)(blk + 4));
+
+#if (SHIFT==8)
+__asm__ volatile("MVN   %0, %0, lsr #8\n\tBIC   %0, %0, %1,lsl #24\n\tMVN   %1, %1,lsr #8\n\tBIC   %1, %1, %2,lsl #24": "=&r"(x10), "=&r"(x11): "r"(x12));
+#elif (SHIFT==16)
+__asm__ volatile("MVN   %0, %0, lsr #16\n\tBIC   %0, %0, %1,lsl #16\n\tMVN   %1, %1,lsr #16\n\tBIC   %1, %1, %2,lsl #16": "=&r"(x10), "=&r"(x11): "r"(x12));
+#elif (SHIFT==24)
+__asm__ volatile("MVN   %0, %0, lsr #24\n\tBIC   %0, %0, %1,lsl #8\n\tMVN   %1, %1,lsr #24\n\tBIC   %1, %1, %2,lsl #8": "=&r"(x10), "=&r"(x11): "r"(x12));
+#endif
+__asm__ volatile("LDR   %0, [%1], #16": "=&r"(x12), "=r"(blk));
+
+    /* process x11 & x14 */
+    x11 = sad_4pixelN(x11, x14, x9);
+
+    /* process x12 & x10 */
+    x10 = sad_4pixelN(x10, x12, x9);
+
+    sum_accumulate;
+
+    /****************/
+    x10 = x5 - (x4 << 8); /* extract low bytes */
+    x10 = x10 + x4;     /* add with high bytes */
+    x10 = x10 + (x10 << 16); /* add with lower half word */
+
+    if (((uint32)x10 >> 16) <= (uint32)dmin) /* compare with dmin */
+    {
+        if (--x8)
+        {
+#if (NUMBER==3)
+            goto         LOOP_SAD3;
+#elif (NUMBER==2)
+goto         LOOP_SAD2;
+#elif (NUMBER==1)
+goto         LOOP_SAD1;
+#endif
+        }
+
+    }
+
+    return ((uint32)x10 >> 16);
+}
+
+#endif
+
diff --git a/media/libstagefright/codecs/avc/enc/src/slice.cpp b/media/libstagefright/codecs/avc/enc/src/slice.cpp
new file mode 100644
index 0000000..f6d066e
--- /dev/null
+++ b/media/libstagefright/codecs/avc/enc/src/slice.cpp
@@ -0,0 +1,1025 @@
+/* ------------------------------------------------------------------
+ * Copyright (C) 1998-2009 PacketVideo
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
+ * express or implied.
+ * See the License for the specific language governing permissions
+ * and limitations under the License.
+ * -------------------------------------------------------------------
+ */
+#include "avcenc_lib.h"
+
+
+AVCEnc_Status AVCEncodeSlice(AVCEncObject *encvid)
+{
+    AVCEnc_Status status = AVCENC_SUCCESS;
+    AVCCommonObj *video = encvid->common;
+    AVCPicParamSet *pps = video->currPicParams;
+    AVCSliceHeader *sliceHdr = video->sliceHdr;
+    AVCMacroblock *currMB ;
+    AVCEncBitstream *stream = encvid->bitstream;
+    uint slice_group_id;
+    int CurrMbAddr, slice_type;
+
+    slice_type = video->slice_type;
+
+    /* set the first mb in slice */
+    video->mbNum = CurrMbAddr = sliceHdr->first_mb_in_slice;// * (1+video->MbaffFrameFlag);
+    slice_group_id = video->MbToSliceGroupMap[CurrMbAddr];
+
+    video->mb_skip_run = 0;
+
+    /* while loop , see subclause 7.3.4 */
+    while (1)
+    {
+        video->mbNum = CurrMbAddr;
+        currMB = video->currMB = &(video->mblock[CurrMbAddr]);
+        currMB->slice_id = video->slice_id;  // for deblocking
+
+        video->mb_x = CurrMbAddr % video->PicWidthInMbs;
+        video->mb_y = CurrMbAddr / video->PicWidthInMbs;
+
+        /* initialize QP for this MB here*/
+        /* calculate currMB->QPy */
+        RCInitMBQP(encvid);
+
+        /* check the availability of neighboring macroblocks */
+        InitNeighborAvailability(video, CurrMbAddr);
+
+        /* Assuming that InitNeighborAvailability has been called prior to this function */
+        video->intraAvailA = video->intraAvailB = video->intraAvailC = video->intraAvailD = 0;
+        /* this is necessary for all subsequent intra search */
+
+        if (!video->currPicParams->constrained_intra_pred_flag)
+        {
+            video->intraAvailA = video->mbAvailA;
+            video->intraAvailB = video->mbAvailB;
+            video->intraAvailC = video->mbAvailC;
+            video->intraAvailD = video->mbAvailD;
+        }
+        else
+        {
+            if (video->mbAvailA)
+            {
+                video->intraAvailA = video->mblock[video->mbAddrA].mb_intra;
+            }
+            if (video->mbAvailB)
+            {
+                video->intraAvailB = video->mblock[video->mbAddrB].mb_intra ;
+            }
+            if (video->mbAvailC)
+            {
+                video->intraAvailC = video->mblock[video->mbAddrC].mb_intra;
+            }
+            if (video->mbAvailD)
+            {
+                video->intraAvailD = video->mblock[video->mbAddrD].mb_intra;
+            }
+        }
+
+        /* encode_one_macroblock() */
+        status = EncodeMB(encvid);
+        if (status != AVCENC_SUCCESS)
+        {
+            break;
+        }
+
+        /* go to next MB */
+        CurrMbAddr++;
+
+        while ((uint)video->MbToSliceGroupMap[CurrMbAddr] != slice_group_id &&
+                (uint)CurrMbAddr < video->PicSizeInMbs)
+        {
+            CurrMbAddr++;
+        }
+
+        if ((uint)CurrMbAddr >= video->PicSizeInMbs)
+        {
+            /* end of slice, return, but before that check to see if there are other slices
+            to be encoded. */
+            encvid->currSliceGroup++;
+            if (encvid->currSliceGroup > (int)pps->num_slice_groups_minus1) /* no more slice group */
+            {
+                status = AVCENC_PICTURE_READY;
+                break;
+            }
+            else
+            {
+                /* find first_mb_num for the next slice */
+                CurrMbAddr = 0;
+                while (video->MbToSliceGroupMap[CurrMbAddr] != encvid->currSliceGroup &&
+                        (uint)CurrMbAddr < video->PicSizeInMbs)
+                {
+                    CurrMbAddr++;
+                }
+                if ((uint)CurrMbAddr >= video->PicSizeInMbs)
+                {
+                    status = AVCENC_SLICE_EMPTY; /* error, one slice group has no MBs in it */
+                }
+
+                video->mbNum = CurrMbAddr;
+                status = AVCENC_SUCCESS;
+                break;
+            }
+        }
+    }
+
+    if (video->mb_skip_run > 0)
+    {
+        /* write skip_run */
+        if (slice_type != AVC_I_SLICE && slice_type != AVC_SI_SLICE)
+        {
+            ue_v(stream, video->mb_skip_run);
+            video->mb_skip_run = 0;
+        }
+        else    /* shouldn't happen */
+        {
+            status = AVCENC_FAIL;
+        }
+    }
+
+    return status;
+}
+
+
+AVCEnc_Status EncodeMB(AVCEncObject *encvid)
+{
+    AVCEnc_Status status = AVCENC_SUCCESS;
+    AVCCommonObj *video = encvid->common;
+    AVCPictureData *currPic = video->currPic;
+    AVCFrameIO  *currInput = encvid->currInput;
+    AVCMacroblock *currMB = video->currMB;
+    AVCMacroblock *MB_A, *MB_B;
+    AVCEncBitstream *stream = encvid->bitstream;
+    AVCRateControl *rateCtrl = encvid->rateCtrl;
+    uint8 *cur, *curL, *curCb, *curCr;
+    uint8 *orgL, *orgCb, *orgCr, *org4;
+    int CurrMbAddr = video->mbNum;
+    int picPitch = currPic->pitch;
+    int orgPitch = currInput->pitch;
+    int x_position = (video->mb_x << 4);
+    int y_position = (video->mb_y << 4);
+    int offset;
+    int b8, b4, blkidx;
+    AVCResidualType  resType;
+    int slice_type;
+    int numcoeff; /* output from residual_block_cavlc */
+    int cost16, cost8;
+
+    int num_bits, start_mb_bits, start_text_bits;
+
+    slice_type = video->slice_type;
+
+    /* now, point to the reconstructed frame */
+    offset = y_position * picPitch + x_position;
+    curL = currPic->Sl + offset;
+    orgL = currInput->YCbCr[0] + offset;
+    offset = (offset + x_position) >> 2;
+    curCb = currPic->Scb + offset;
+    curCr = currPic->Scr + offset;
+    orgCb = currInput->YCbCr[1] + offset;
+    orgCr = currInput->YCbCr[2] + offset;
+
+    if (orgPitch != picPitch)
+    {
+        offset = y_position * (orgPitch - picPitch);
+        orgL += offset;
+        offset >>= 2;
+        orgCb += offset;
+        orgCr += offset;
+    }
+
+    /******* determine MB prediction mode *******/
+    if (encvid->intraSearch[CurrMbAddr])
+    {
+        MBIntraSearch(encvid, CurrMbAddr, curL, picPitch);
+    }
+    /******* This part should be determined somehow ***************/
+    if (currMB->mbMode == AVC_I_PCM)
+    {
+        /* write down mb_type and PCM data */
+        /* and copy from currInput to currPic */
+        status = EncodeIntraPCM(encvid);
+
+
+        return status;
+    }
+
+    /****** for intra prediction, pred is already done *******/
+    /****** for I4, the recon is ready and Xfrm coefs are ready to be encoded *****/
+
+    //RCCalculateMAD(encvid,currMB,orgL,orgPitch); // no need to re-calculate MAD for Intra
+    // not used since totalSAD is used instead
+
+    /* compute the prediction */
+    /* output is video->pred_block */
+    if (!currMB->mb_intra)
+    {
+        AVCMBMotionComp(encvid, video); /* perform prediction and residue calculation */
+        /* we can do the loop here and call dct_luma */
+        video->pred_pitch = picPitch;
+        currMB->CBP = 0;
+        cost16 = 0;
+        cur = curL;
+        org4 = orgL;
+
+        for (b8 = 0; b8 < 4; b8++)
+        {
+            cost8 = 0;
+
+            for (b4 = 0; b4 < 4; b4++)
+            {
+                blkidx = blkIdx2blkXY[b8][b4];
+                video->pred_block = cur;
+                numcoeff = dct_luma(encvid, blkidx, cur, org4, &cost8);
+                currMB->nz_coeff[blkidx] = numcoeff;
+                if (numcoeff)
+                {
+                    video->cbp4x4 |= (1 << blkidx);
+                    currMB->CBP |= (1 << b8);
+                }
+
+                if (b4&1)
+                {
+                    cur += ((picPitch << 2) - 4);
+                    org4 += ((orgPitch << 2) - 4);
+                }
+                else
+                {
+                    cur += 4;
+                    org4 += 4;
+                }
+            }
+
+            /* move the IDCT part out of dct_luma to accommodate the check
+               for coeff_cost. */
+
+            if ((currMB->CBP&(1 << b8)) && (cost8 <= _LUMA_COEFF_COST_))
+            {
+                cost8 = 0; // reset it
+
+                currMB->CBP ^= (1 << b8);
+                blkidx = blkIdx2blkXY[b8][0];
+
+                currMB->nz_coeff[blkidx] = 0;
+                currMB->nz_coeff[blkidx+1] = 0;
+                currMB->nz_coeff[blkidx+4] = 0;
+                currMB->nz_coeff[blkidx+5] = 0;
+            }
+
+            cost16 += cost8;
+
+            if (b8&1)
+            {
+                cur -= 8;
+                org4 -= 8;
+            }
+            else
+            {
+                cur += (8 - (picPitch << 3));
+                org4 += (8 - (orgPitch << 3));
+            }
+        }
+
+        /* after the whole MB, we do another check for coeff_cost */
+        if ((currMB->CBP&0xF) && (cost16 <= _LUMA_MB_COEFF_COST_))
+        {
+            currMB->CBP = 0;  // reset it to zero
+            memset(currMB->nz_coeff, 0, sizeof(uint8)*16);
+        }
+
+        // now we do IDCT
+        MBInterIdct(video, curL, currMB, picPitch);
+
+//      video->pred_block = video->pred + 256;
+    }
+    else    /* Intra prediction */
+    {
+        encvid->numIntraMB++;
+
+        if (currMB->mbMode == AVC_I16) /* do prediction for the whole macroblock */
+        {
+            currMB->CBP = 0;
+            /* get the prediction from encvid->pred_i16 */
+            dct_luma_16x16(encvid, curL, orgL);
+        }
+        video->pred_block = encvid->pred_ic[currMB->intra_chroma_pred_mode];
+    }
+
+    /* chrominance */
+    /* not need to do anything, the result is in encvid->pred_ic
+    chroma dct must be aware that prediction block can come from either intra or inter. */
+
+    dct_chroma(encvid, curCb, orgCb, 0);
+
+    dct_chroma(encvid, curCr, orgCr, 1);
+
+
+    /* 4.1 if there's nothing in there, video->mb_skip_run++ */
+    /* 4.2 if coded, check if there is a run of skipped MB, encodes it,
+            set video->QPyprev = currMB->QPy; */
+
+    /* 5. vlc encode */
+
+    /* check for skipped macroblock, INTER only */
+    if (!currMB->mb_intra)
+    {
+        /* decide whether this MB (for inter MB) should be skipped if there's nothing left. */
+        if (!currMB->CBP && currMB->NumMbPart == 1 && currMB->QPy == video->QPy)
+        {
+            if (currMB->MBPartPredMode[0][0] == AVC_Pred_L0 && currMB->ref_idx_L0[0] == 0)
+            {
+                MB_A = &video->mblock[video->mbAddrA];
+                MB_B = &video->mblock[video->mbAddrB];
+
+                if (!video->mbAvailA || !video->mbAvailB)
+                {
+                    if (currMB->mvL0[0] == 0) /* both mv components are zeros.*/
+                    {
+                        currMB->mbMode = AVC_SKIP;
+                        video->mvd_l0[0][0][0] = 0;
+                        video->mvd_l0[0][0][1] = 0;
+                    }
+                }
+                else
+                {
+                    if ((MB_A->ref_idx_L0[1] == 0 && MB_A->mvL0[3] == 0) ||
+                            (MB_B->ref_idx_L0[2] == 0 && MB_B->mvL0[12] == 0))
+                    {
+                        if (currMB->mvL0[0] == 0) /* both mv components are zeros.*/
+                        {
+                            currMB->mbMode = AVC_SKIP;
+                            video->mvd_l0[0][0][0] = 0;
+                            video->mvd_l0[0][0][1] = 0;
+                        }
+                    }
+                    else if (video->mvd_l0[0][0][0] == 0 && video->mvd_l0[0][0][1] == 0)
+                    {
+                        currMB->mbMode = AVC_SKIP;
+                    }
+                }
+            }
+
+            if (currMB->mbMode == AVC_SKIP)
+            {
+                video->mb_skip_run++;
+
+                /* set parameters */
+                /* not sure whether we need the followings */
+                if (slice_type == AVC_P_SLICE)
+                {
+                    currMB->mbMode = AVC_SKIP;
+                    currMB->MbPartWidth = currMB->MbPartHeight = 16;
+                    currMB->MBPartPredMode[0][0] = AVC_Pred_L0;
+                    currMB->NumMbPart = 1;
+                    currMB->NumSubMbPart[0] = currMB->NumSubMbPart[1] =
+                                                  currMB->NumSubMbPart[2] = currMB->NumSubMbPart[3] = 1;
+                    currMB->SubMbPartWidth[0] = currMB->SubMbPartWidth[1] =
+                                                    currMB->SubMbPartWidth[2] = currMB->SubMbPartWidth[3] = currMB->MbPartWidth;
+                    currMB->SubMbPartHeight[0] = currMB->SubMbPartHeight[1] =
+                                                     currMB->SubMbPartHeight[2] = currMB->SubMbPartHeight[3] = currMB->MbPartHeight;
+
+                }
+                else if (slice_type == AVC_B_SLICE)
+                {
+                    currMB->mbMode = AVC_SKIP;
+                    currMB->MbPartWidth = currMB->MbPartHeight = 8;
+                    currMB->MBPartPredMode[0][0] = AVC_Direct;
+                    currMB->NumMbPart = -1;
+                }
+
+                /* for skipped MB, always look at the first entry in RefPicList */
+                currMB->RefIdx[0] = currMB->RefIdx[1] =
+                                        currMB->RefIdx[2] = currMB->RefIdx[3] = video->RefPicList0[0]->RefIdx;
+
+                /* do not return yet, need to do some copies */
+            }
+        }
+    }
+    /* non-skipped MB */
+
+
+    /************* START ENTROPY CODING *************************/
+
+    start_mb_bits = 32 + (encvid->bitstream->write_pos << 3) - encvid->bitstream->bit_left;
+
+    /* encode mb_type, mb_pred, sub_mb_pred, CBP */
+    if (slice_type != AVC_I_SLICE && slice_type != AVC_SI_SLICE && currMB->mbMode != AVC_SKIP)
+    {
+        //if(!pps->entropy_coding_mode_flag)  ALWAYS true
+        {
+            ue_v(stream, video->mb_skip_run);
+            video->mb_skip_run = 0;
+        }
+    }
+
+    if (currMB->mbMode != AVC_SKIP)
+    {
+        status = EncodeMBHeader(currMB, encvid);
+        if (status != AVCENC_SUCCESS)
+        {
+            return status;
+        }
+    }
+
+    start_text_bits = 32 + (encvid->bitstream->write_pos << 3) - encvid->bitstream->bit_left;
+
+    /**** now decoding part *******/
+    resType = AVC_Luma;
+
+    /* DC transform for luma I16 mode */
+    if (currMB->mbMode == AVC_I16)
+    {
+        /* vlc encode level/run */
+        status = enc_residual_block(encvid, AVC_Intra16DC, encvid->numcoefdc, currMB);
+        if (status != AVCENC_SUCCESS)
+        {
+            return status;
+        }
+        resType = AVC_Intra16AC;
+    }
+
+    /* VLC encoding for luma */
+    for (b8 = 0; b8 < 4; b8++)
+    {
+        if (currMB->CBP&(1 << b8))
+        {
+            for (b4 = 0; b4 < 4; b4++)
+            {
+                /* vlc encode level/run */
+                status = enc_residual_block(encvid, resType, (b8 << 2) + b4, currMB);
+                if (status != AVCENC_SUCCESS)
+                {
+                    return status;
+                }
+            }
+        }
+    }
+
+    /* chroma */
+    if (currMB->CBP & (3 << 4)) /* chroma DC residual present */
+    {
+        for (b8 = 0; b8 < 2; b8++) /* for iCbCr */
+        {
+            /* vlc encode level/run */
+            status = enc_residual_block(encvid, AVC_ChromaDC, encvid->numcoefcdc[b8] + (b8 << 3), currMB);
+            if (status != AVCENC_SUCCESS)
+            {
+                return status;
+            }
+        }
+    }
+
+    if (currMB->CBP & (2 << 4))
+    {
+        /* AC part */
+        for (b8 = 0; b8 < 2; b8++) /* for iCbCr */
+        {
+            for (b4 = 0; b4 < 4; b4++)  /* for each block inside Cb or Cr */
+            {
+                /* vlc encode level/run */
+                status = enc_residual_block(encvid, AVC_ChromaAC, 16 + (b8 << 2) + b4, currMB);
+                if (status != AVCENC_SUCCESS)
+                {
+                    return status;
+                }
+            }
+        }
+    }
+
+
+    num_bits = 32 + (encvid->bitstream->write_pos << 3) - encvid->bitstream->bit_left;
+
+    RCPostMB(video, rateCtrl, start_text_bits - start_mb_bits,
+             num_bits - start_text_bits);
+
+//  num_bits -= start_mb_bits;
+//  fprintf(fdebug,"MB #%d: %d bits\n",CurrMbAddr,num_bits);
+//  fclose(fdebug);
+    return status;
+}
+
+/* copy the content from predBlock back to the reconstructed YUV frame */
+void Copy_MB(uint8 *curL, uint8 *curCb, uint8 *curCr, uint8 *predBlock, int picPitch)
+{
+    int j, offset;
+    uint32 *dst, *dst2, *src;
+
+    dst = (uint32*)curL;
+    src = (uint32*)predBlock;
+
+    offset = (picPitch - 16) >> 2;
+
+    for (j = 0; j < 16; j++)
+    {
+        *dst++ = *src++;
+        *dst++ = *src++;
+        *dst++ = *src++;
+        *dst++ = *src++;
+
+        dst += offset;
+    }
+
+    dst = (uint32*)curCb;
+    dst2 = (uint32*)curCr;
+    offset >>= 1;
+
+    for (j = 0; j < 8; j++)
+    {
+        *dst++ = *src++;
+        *dst++ = *src++;
+        *dst2++ = *src++;
+        *dst2++ = *src++;
+
+        dst += offset;
+        dst2 += offset;
+    }
+    return ;
+}
+
+/* encode mb_type, mb_pred, sub_mb_pred, CBP */
+/* decide whether this MB (for inter MB) should be skipped */
+AVCEnc_Status EncodeMBHeader(AVCMacroblock *currMB, AVCEncObject *encvid)
+{
+    AVCEnc_Status status = AVCENC_SUCCESS;
+    uint mb_type;
+    AVCCommonObj *video = encvid->common;
+    AVCEncBitstream *stream = encvid->bitstream;
+
+    if (currMB->CBP > 47)   /* chroma CBP is 11 */
+    {
+        currMB->CBP -= 16;  /* remove the 5th bit from the right */
+    }
+
+    mb_type = InterpretMBType(currMB, video->slice_type);
+
+    status = ue_v(stream, mb_type);
+
+    if (currMB->mbMode == AVC_P8 || currMB->mbMode == AVC_P8ref0)
+    {
+        status = sub_mb_pred(video, currMB, stream);
+    }
+    else
+    {
+        status = mb_pred(video, currMB, stream) ;
+    }
+
+    if (currMB->mbMode != AVC_I16)
+    {
+        /* decode coded_block_pattern */
+        status = EncodeCBP(currMB, stream);
+    }
+
+    /* calculate currMB->mb_qp_delta = currMB->QPy - video->QPyprev */
+    if (currMB->CBP > 0 || currMB->mbMode == AVC_I16)
+    {
+        status = se_v(stream, currMB->QPy - video->QPy);
+        video->QPy = currMB->QPy; /* = (video->QPyprev + currMB->mb_qp_delta + 52)%52; */
+        // no need video->QPc = currMB->QPc;
+    }
+    else
+    {
+        if (currMB->QPy != video->QPy) // current QP is not the same as previous QP
+        {
+            /* restore these values */
+            RCRestoreQP(currMB, video, encvid);
+        }
+    }
+
+    return status;
+}
+
+
+/* inputs are mbMode, mb_intra, i16Mode, CBP, NumMbPart, MbPartWidth, MbPartHeight */
+uint InterpretMBType(AVCMacroblock *currMB, int slice_type)
+{
+    int CBP_chrom;
+    int mb_type;// part1, part2, part3;
+//  const static int MapParts2Type[2][3][3]={{{4,8,12},{10,6,14},{16,18,20}},
+//  {{5,9,13},{11,7,15},{17,19,21}}};
+
+    if (currMB->mb_intra)
+    {
+        if (currMB->mbMode == AVC_I4)
+        {
+            mb_type = 0;
+        }
+        else if (currMB->mbMode == AVC_I16)
+        {
+            CBP_chrom = (currMB->CBP & 0x30);
+            if (currMB->CBP&0xF)
+            {
+                currMB->CBP |= 0xF;  /* either 0x0 or 0xF */
+                mb_type = 13;
+            }
+            else
+            {
+                mb_type = 1;
+            }
+            mb_type += (CBP_chrom >> 2) + currMB->i16Mode;
+        }
+        else /* if(currMB->mbMode == AVC_I_PCM) */
+        {
+            mb_type = 25;
+        }
+    }
+    else
+    {  /* P-MB *//* note that the order of the enum AVCMBMode cannot be changed
+        since we use it here. */
+        mb_type = currMB->mbMode - AVC_P16;
+    }
+
+    if (slice_type == AVC_P_SLICE)
+    {
+        if (currMB->mb_intra)
+        {
+            mb_type += 5;
+        }
+    }
+    // following codes have not been tested yet, not needed.
+    /*  else if(slice_type == AVC_B_SLICE)
+        {
+            if(currMB->mbMode == AVC_BDirect16)
+            {
+                mb_type = 0;
+            }
+            else if(currMB->mbMode == AVC_P16)
+            {
+                mb_type = currMB->MBPartPredMode[0][0] + 1; // 1 or 2
+            }
+            else if(currMB->mbMode == AVC_P8)
+            {
+                mb_type = 26;
+            }
+            else if(currMB->mbMode == AVC_P8ref0)
+            {
+                mb_type = 27;
+            }
+            else
+            {
+                part1 = currMB->mbMode - AVC_P16x8;
+                part2 = currMB->MBPartPredMode[0][0];
+                part3 = currMB->MBPartPredMode[1][0];
+                mb_type = MapParts2Type[part1][part2][part3];
+            }
+        }
+
+        if(slice_type == AVC_SI_SLICE)
+        {
+            mb_type++;
+        }
+    */
+    return (uint)mb_type;
+}
+
+//const static int mbPart2raster[3][4] = {{0,0,0,0},{1,1,0,0},{1,0,1,0}};
+
+/* see subclause 7.3.5.1 */
+AVCEnc_Status mb_pred(AVCCommonObj *video, AVCMacroblock *currMB, AVCEncBitstream *stream)
+{
+    AVCEnc_Status status = AVCENC_SUCCESS;
+    int mbPartIdx;
+    AVCSliceHeader *sliceHdr = video->sliceHdr;
+    int max_ref_idx;
+    uint code;
+
+    if (currMB->mbMode == AVC_I4 || currMB->mbMode == AVC_I16)
+    {
+        if (currMB->mbMode == AVC_I4)
+        {
+            /* perform prediction to get the actual intra 4x4 pred mode */
+            EncodeIntra4x4Mode(video, currMB, stream);
+            /* output will be in currMB->i4Mode[4][4] */
+        }
+
+        /* assume already set from MBPrediction() */
+        status = ue_v(stream, currMB->intra_chroma_pred_mode);
+    }
+    else if (currMB->MBPartPredMode[0][0] != AVC_Direct)
+    {
+
+        memset(currMB->ref_idx_L0, 0, sizeof(int16)*4);
+
+        /* see subclause 7.4.5.1 for the range of ref_idx_lX */
+        max_ref_idx = sliceHdr->num_ref_idx_l0_active_minus1;
+        /*      if(video->MbaffFrameFlag && currMB->mb_field_decoding_flag)
+                    max_ref_idx = 2*sliceHdr->num_ref_idx_l0_active_minus1 + 1;
+        */
+        /* decode ref index for L0 */
+        if (sliceHdr->num_ref_idx_l0_active_minus1 > 0)
+        {
+            for (mbPartIdx = 0; mbPartIdx < currMB->NumMbPart; mbPartIdx++)
+            {
+                if (/*(sliceHdr->num_ref_idx_l0_active_minus1>0 || currMB->mb_field_decoding_flag) &&*/
+                    currMB->MBPartPredMode[mbPartIdx][0] != AVC_Pred_L1)
+                {
+                    code = currMB->ref_idx_L0[mbPartIdx];
+                    status = te_v(stream, code, max_ref_idx);
+                }
+            }
+        }
+
+        /* see subclause 7.4.5.1 for the range of ref_idx_lX */
+        max_ref_idx = sliceHdr->num_ref_idx_l1_active_minus1;
+        /*      if(video->MbaffFrameFlag && currMB->mb_field_decoding_flag)
+                    max_ref_idx = 2*sliceHdr->num_ref_idx_l1_active_minus1 + 1;
+        */
+        /* decode ref index for L1 */
+        if (sliceHdr->num_ref_idx_l1_active_minus1 > 0)
+        {
+            for (mbPartIdx = 0; mbPartIdx < currMB->NumMbPart; mbPartIdx++)
+            {
+                if (/*(sliceHdr->num_ref_idx_l1_active_minus1>0 || currMB->mb_field_decoding_flag) &&*/
+                    currMB->MBPartPredMode[mbPartIdx][0] != AVC_Pred_L0)
+                {
+                    status = te_v(stream, currMB->ref_idx_L1[mbPartIdx], max_ref_idx);
+                }
+            }
+        }
+
+        /* encode mvd_l0 */
+        for (mbPartIdx = 0; mbPartIdx < currMB->NumMbPart; mbPartIdx++)
+        {
+            if (currMB->MBPartPredMode[mbPartIdx][0] != AVC_Pred_L1)
+            {
+                status = se_v(stream, video->mvd_l0[mbPartIdx][0][0]);
+                status = se_v(stream, video->mvd_l0[mbPartIdx][0][1]);
+            }
+        }
+        /* encode mvd_l1 */
+        for (mbPartIdx = 0; mbPartIdx < currMB->NumMbPart; mbPartIdx++)
+        {
+            if (currMB->MBPartPredMode[mbPartIdx][0] != AVC_Pred_L0)
+            {
+                status = se_v(stream, video->mvd_l1[mbPartIdx][0][0]);
+                status = se_v(stream, video->mvd_l1[mbPartIdx][0][1]);
+            }
+        }
+    }
+
+    return status;
+}
+
+/* see subclause 7.3.5.2 */
+AVCEnc_Status sub_mb_pred(AVCCommonObj *video, AVCMacroblock *currMB, AVCEncBitstream *stream)
+{
+    AVCEnc_Status status = AVCENC_SUCCESS;
+    int mbPartIdx, subMbPartIdx;
+    AVCSliceHeader *sliceHdr = video->sliceHdr;
+    uint max_ref_idx;
+    uint slice_type = video->slice_type;
+    uint sub_mb_type[4];
+
+    /* this should move somewhere else where we don't have to make this check */
+    if (currMB->mbMode == AVC_P8ref0)
+    {
+        memset(currMB->ref_idx_L0, 0, sizeof(int16)*4);
+    }
+
+    /* we have to check the values to make sure they are valid  */
+    /* assign values to currMB->sub_mb_type[] */
+    if (slice_type == AVC_P_SLICE)
+    {
+        InterpretSubMBTypeP(currMB, sub_mb_type);
+    }
+    /* no need to check for B-slice
+        else if(slice_type == AVC_B_SLICE)
+        {
+            InterpretSubMBTypeB(currMB,sub_mb_type);
+        }*/
+
+    for (mbPartIdx = 0; mbPartIdx < 4; mbPartIdx++)
+    {
+        status = ue_v(stream, sub_mb_type[mbPartIdx]);
+    }
+
+    /* see subclause 7.4.5.1 for the range of ref_idx_lX */
+    max_ref_idx = sliceHdr->num_ref_idx_l0_active_minus1;
+    /*  if(video->MbaffFrameFlag && currMB->mb_field_decoding_flag)
+            max_ref_idx = 2*sliceHdr->num_ref_idx_l0_active_minus1 + 1; */
+
+    for (mbPartIdx = 0; mbPartIdx < 4; mbPartIdx++)
+    {
+        if ((sliceHdr->num_ref_idx_l0_active_minus1 > 0 /*|| currMB->mb_field_decoding_flag*/) &&
+                currMB->mbMode != AVC_P8ref0 && /*currMB->subMbMode[mbPartIdx]!=AVC_BDirect8 &&*/
+                currMB->MBPartPredMode[mbPartIdx][0] != AVC_Pred_L1)
+        {
+            status = te_v(stream, currMB->ref_idx_L0[mbPartIdx], max_ref_idx);
+        }
+        /* used in deblocking */
+        currMB->RefIdx[mbPartIdx] = video->RefPicList0[currMB->ref_idx_L0[mbPartIdx]]->RefIdx;
+    }
+    /* see subclause 7.4.5.1 for the range of ref_idx_lX */
+    max_ref_idx = sliceHdr->num_ref_idx_l1_active_minus1;
+    /*  if(video->MbaffFrameFlag && currMB->mb_field_decoding_flag)
+            max_ref_idx = 2*sliceHdr->num_ref_idx_l1_active_minus1 + 1;*/
+
+    if (sliceHdr->num_ref_idx_l1_active_minus1 > 0)
+    {
+        for (mbPartIdx = 0; mbPartIdx < 4; mbPartIdx++)
+        {
+            if (/*(sliceHdr->num_ref_idx_l1_active_minus1>0 || currMB->mb_field_decoding_flag) &&*/
+                /*currMB->subMbMode[mbPartIdx]!=AVC_BDirect8 &&*/
+                currMB->MBPartPredMode[mbPartIdx][0] != AVC_Pred_L0)
+            {
+                status = te_v(stream, currMB->ref_idx_L1[mbPartIdx], max_ref_idx);
+            }
+        }
+    }
+
+    for (mbPartIdx = 0; mbPartIdx < 4; mbPartIdx++)
+    {
+        if (/*currMB->subMbMode[mbPartIdx]!=AVC_BDirect8 &&*/
+            currMB->MBPartPredMode[mbPartIdx][0] != AVC_Pred_L1)
+        {
+            for (subMbPartIdx = 0; subMbPartIdx < currMB->NumSubMbPart[mbPartIdx]; subMbPartIdx++)
+            {
+                status = se_v(stream, video->mvd_l0[mbPartIdx][subMbPartIdx][0]);
+                status = se_v(stream, video->mvd_l0[mbPartIdx][subMbPartIdx][1]);
+            }
+        }
+    }
+
+    for (mbPartIdx = 0; mbPartIdx < 4; mbPartIdx++)
+    {
+        if (/*currMB->subMbMode[mbPartIdx]!=AVC_BDirect8 &&*/
+            currMB->MBPartPredMode[mbPartIdx][0] != AVC_Pred_L0)
+        {
+            for (subMbPartIdx = 0; subMbPartIdx < currMB->NumSubMbPart[mbPartIdx]; subMbPartIdx++)
+            {
+                status = se_v(stream, video->mvd_l1[mbPartIdx][subMbPartIdx][0]);
+                status = se_v(stream, video->mvd_l1[mbPartIdx][subMbPartIdx][1]);
+            }
+        }
+    }
+
+    return status;
+}
+
+/* input is mblock->sub_mb_type[] */
+void InterpretSubMBTypeP(AVCMacroblock *mblock, uint *sub_mb_type)
+{
+    int i;
+    /* see enum AVCMBType declaration */
+    /*const static AVCSubMBMode map2subMbMode[4] = {AVC_8x8,AVC_8x4,AVC_4x8,AVC_4x4};
+    const static int map2subPartWidth[4] = {8,8,4,4};
+    const static int map2subPartHeight[4] = {8,4,8,4};
+    const static int map2numSubPart[4] = {1,2,2,4};*/
+
+    for (i = 0; i < 4 ; i++)
+    {
+        sub_mb_type[i] = mblock->subMbMode[i] - AVC_8x8;
+    }
+
+    return ;
+}
+
+void InterpretSubMBTypeB(AVCMacroblock *mblock, uint *sub_mb_type)
+{
+    int i;
+    /* see enum AVCMBType declaration */
+    /*  const static AVCSubMBMode map2subMbMode[13] = {AVC_BDirect8,AVC_8x8,AVC_8x8,
+            AVC_8x8,AVC_8x4,AVC_4x8,AVC_8x4,AVC_4x8,AVC_8x4,AVC_4x8,AVC_4x4,AVC_4x4,AVC_4x4};
+        const static int map2subPartWidth[13] = {4,8,8,8,8,4,8,4,8,4,4,4,4};
+        const static int map2subPartHeight[13] = {4,8,8,8,4,8,4,8,4,8,4,4,4};
+        const static int map2numSubPart[13] = {4,1,1,1,2,2,2,2,2,2,4,4,4};
+        const static int map2predMode[13] = {3,0,1,2,0,0,1,1,2,2,0,1,2};*/
+
+    for (i = 0; i < 4 ; i++)
+    {
+        if (mblock->subMbMode[i] == AVC_BDirect8)
+        {
+            sub_mb_type[i] = 0;
+        }
+        else if (mblock->subMbMode[i] == AVC_8x8)
+        {
+            sub_mb_type[i] = 1 + mblock->MBPartPredMode[i][0];
+        }
+        else if (mblock->subMbMode[i] == AVC_4x4)
+        {
+            sub_mb_type[i] = 10 + mblock->MBPartPredMode[i][0];
+        }
+        else
+        {
+            sub_mb_type[i] = 4 + (mblock->MBPartPredMode[i][0] << 1) + (mblock->subMbMode[i] - AVC_8x4);
+        }
+    }
+
+    return ;
+}
+
+/* see subclause 8.3.1 */
+AVCEnc_Status EncodeIntra4x4Mode(AVCCommonObj *video, AVCMacroblock *currMB, AVCEncBitstream *stream)
+{
+    int intra4x4PredModeA = 0;
+    int intra4x4PredModeB, predIntra4x4PredMode;
+    int component, SubBlock_indx, block_x, block_y;
+    int dcOnlyPredictionFlag;
+    uint    flag;
+    int     rem = 0;
+    int     mode;
+    int bindx = 0;
+
+    for (component = 0; component < 4; component++) /* partition index */
+    {
+        block_x = ((component & 1) << 1);
+        block_y = ((component >> 1) << 1);
+
+        for (SubBlock_indx = 0; SubBlock_indx < 4; SubBlock_indx++) /* sub-partition index */
+        {
+            dcOnlyPredictionFlag = 0;
+            if (block_x > 0)
+            {
+                intra4x4PredModeA = currMB->i4Mode[(block_y << 2) + block_x - 1 ];
+            }
+            else
+            {
+                if (video->intraAvailA)
+                {
+                    if (video->mblock[video->mbAddrA].mbMode == AVC_I4)
+                    {
+                        intra4x4PredModeA = video->mblock[video->mbAddrA].i4Mode[(block_y << 2) + 3];
+                    }
+                    else
+                    {
+                        intra4x4PredModeA = AVC_I4_DC;
+                    }
+                }
+                else
+                {
+                    dcOnlyPredictionFlag = 1;
+                }
+            }
+
+            if (block_y > 0)
+            {
+                intra4x4PredModeB = currMB->i4Mode[((block_y-1) << 2) + block_x];
+            }
+            else
+            {
+                if (video->intraAvailB)
+                {
+                    if (video->mblock[video->mbAddrB].mbMode == AVC_I4)
+                    {
+                        intra4x4PredModeB = video->mblock[video->mbAddrB].i4Mode[(3 << 2) + block_x];
+                    }
+                    else
+                    {
+                        intra4x4PredModeB = AVC_I4_DC;
+                    }
+                }
+                else
+                {
+                    dcOnlyPredictionFlag = 1;
+                }
+            }
+
+            if (dcOnlyPredictionFlag)
+            {
+                intra4x4PredModeA = intra4x4PredModeB = AVC_I4_DC;
+            }
+
+            predIntra4x4PredMode = AVC_MIN(intra4x4PredModeA, intra4x4PredModeB);
+
+            flag = 0;
+            mode = currMB->i4Mode[(block_y<<2)+block_x];
+
+            if (mode == (AVCIntra4x4PredMode)predIntra4x4PredMode)
+            {
+                flag = 1;
+            }
+            else if (mode < predIntra4x4PredMode)
+            {
+                rem = mode;
+            }
+            else
+            {
+                rem = mode - 1;
+            }
+
+            BitstreamWrite1Bit(stream, flag);
+
+            if (!flag)
+            {
+                BitstreamWriteBits(stream, 3, rem);
+            }
+
+            bindx++;
+            block_y += (SubBlock_indx & 1) ;
+            block_x += (1 - 2 * (SubBlock_indx & 1)) ;
+        }
+    }
+
+    return AVCENC_SUCCESS;
+}
+
+
+
diff --git a/media/libstagefright/codecs/avc/enc/src/vlc_encode.cpp b/media/libstagefright/codecs/avc/enc/src/vlc_encode.cpp
new file mode 100644
index 0000000..222e709
--- /dev/null
+++ b/media/libstagefright/codecs/avc/enc/src/vlc_encode.cpp
@@ -0,0 +1,336 @@
+/* ------------------------------------------------------------------
+ * Copyright (C) 1998-2009 PacketVideo
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
+ * express or implied.
+ * See the License for the specific language governing permissions
+ * and limitations under the License.
+ * -------------------------------------------------------------------
+ */
+#include "avcenc_lib.h"
+
+/**
+See algorithm in subclause 9.1, Table 9-1, Table 9-2. */
+AVCEnc_Status ue_v(AVCEncBitstream *bitstream, uint codeNum)
+{
+    if (AVCENC_SUCCESS != SetEGBitstring(bitstream, codeNum))
+        return AVCENC_FAIL;
+
+    return AVCENC_SUCCESS;
+}
+
+/**
+See subclause 9.1.1, Table 9-3 */
+AVCEnc_Status  se_v(AVCEncBitstream *bitstream, int value)
+{
+    uint codeNum;
+    AVCEnc_Status status;
+
+    if (value <= 0)
+    {
+        codeNum = -value * 2;
+    }
+    else
+    {
+        codeNum = value * 2 - 1;
+    }
+
+    status = ue_v(bitstream, codeNum);
+
+    return status;
+}
+
+AVCEnc_Status te_v(AVCEncBitstream *bitstream, uint value, uint range)
+{
+    AVCEnc_Status status;
+
+    if (range > 1)
+    {
+        return ue_v(bitstream, value);
+    }
+    else
+    {
+        status = BitstreamWrite1Bit(bitstream, 1 - value);
+        return status;
+    }
+}
+
+/**
+See subclause 9.1, Table 9-1, 9-2. */
+// compute leadingZeros and inforbits
+//codeNum = (1<<leadingZeros)-1+infobits;
+AVCEnc_Status SetEGBitstring(AVCEncBitstream *bitstream, uint codeNum)
+{
+    AVCEnc_Status status;
+    int leadingZeros;
+    int infobits;
+
+    if (!codeNum)
+    {
+        status = BitstreamWrite1Bit(bitstream, 1);
+        return status;
+    }
+
+    /* calculate leadingZeros and infobits */
+    leadingZeros = 1;
+    while ((uint)(1 << leadingZeros) < codeNum + 2)
+    {
+        leadingZeros++;
+    }
+    leadingZeros--;
+    infobits = codeNum - (1 << leadingZeros) + 1;
+
+    status = BitstreamWriteBits(bitstream, leadingZeros, 0);
+    infobits |= (1 << leadingZeros);
+    status = BitstreamWriteBits(bitstream, leadingZeros + 1, infobits);
+    return status;
+}
+
+/* see Table 9-4 assignment of codeNum to values of coded_block_pattern. */
+const static uint8 MapCBP2code[48][2] =
+{
+    {3, 0}, {29, 2}, {30, 3}, {17, 7}, {31, 4}, {18, 8}, {37, 17}, {8, 13}, {32, 5}, {38, 18}, {19, 9}, {9, 14},
+    {20, 10}, {10, 15}, {11, 16}, {2, 11}, {16, 1}, {33, 32}, {34, 33}, {21, 36}, {35, 34}, {22, 37}, {39, 44}, {4, 40},
+    {36, 35}, {40, 45}, {23, 38}, {5, 41}, {24, 39}, {6, 42}, {7, 43}, {1, 19}, {41, 6}, {42, 24}, {43, 25}, {25, 20},
+    {44, 26}, {26, 21}, {46, 46}, {12, 28}, {45, 27}, {47, 47}, {27, 22}, {13, 29}, {28, 23}, {14, 30}, {15, 31}, {0, 12}
+};
+
+AVCEnc_Status EncodeCBP(AVCMacroblock *currMB, AVCEncBitstream *stream)
+{
+    AVCEnc_Status status;
+    uint codeNum;
+
+    if (currMB->mbMode == AVC_I4)
+    {
+        codeNum = MapCBP2code[currMB->CBP][0];
+    }
+    else
+    {
+        codeNum = MapCBP2code[currMB->CBP][1];
+    }
+
+    status = ue_v(stream, codeNum);
+
+    return status;
+}
+
+AVCEnc_Status ce_TotalCoeffTrailingOnes(AVCEncBitstream *stream, int TrailingOnes, int TotalCoeff, int nC)
+{
+    const static uint8 totCoeffTrailOne[3][4][17][2] =
+    {
+        {   // 0702
+            {{1, 1}, {6, 5}, {8, 7}, {9, 7}, {10, 7}, {11, 7}, {13, 15}, {13, 11}, {13, 8}, {14, 15}, {14, 11}, {15, 15}, {15, 11}, {16, 15}, {16, 11}, {16, 7}, {16, 4}},
+            {{0, 0}, {2, 1}, {6, 4}, {8, 6}, {9, 6}, {10, 6}, {11, 6}, {13, 14}, {13, 10}, {14, 14}, {14, 10}, {15, 14}, {15, 10}, {15, 1}, {16, 14}, {16, 10}, {16, 6}},
+            {{0, 0}, {0, 0}, {3, 1}, {7, 5}, {8, 5}, {9, 5}, {10, 5}, {11, 5}, {13, 13}, {13, 9}, {14, 13}, {14, 9}, {15, 13}, {15, 9}, {16, 13}, {16, 9}, {16, 5}},
+            {{0, 0}, {0, 0}, {0, 0}, {5, 3}, {6, 3}, {7, 4}, {8, 4}, {9, 4}, {10, 4}, {11, 4}, {13, 12}, {14, 12}, {14, 8}, {15, 12}, {15, 8}, {16, 12}, {16, 8}},
+        },
+        {
+            {{2, 3}, {6, 11}, {6, 7}, {7, 7}, {8, 7}, {8, 4}, {9, 7}, {11, 15}, {11, 11}, {12, 15}, {12, 11}, {12, 8}, {13, 15}, {13, 11}, {13, 7}, {14, 9}, {14, 7}},
+            {{0, 0}, {2, 2}, {5, 7}, {6, 10}, {6, 6}, {7, 6}, {8, 6}, {9, 6}, {11, 14}, {11, 10}, {12, 14}, {12, 10}, {13, 14}, {13, 10}, {14, 11}, {14, 8}, {14, 6}},
+            {{0, 0}, {0, 0}, {3, 3}, {6, 9}, {6, 5}, {7, 5}, {8, 5}, {9, 5}, {11, 13}, {11, 9}, {12, 13}, {12, 9}, {13, 13}, {13, 9}, {13, 6}, {14, 10}, {14, 5}},
+            {{0, 0}, {0, 0}, {0, 0}, {4, 5}, {4, 4}, {5, 6}, {6, 8}, {6, 4}, {7, 4}, {9, 4}, {11, 12}, {11, 8}, {12, 12}, {13, 12}, {13, 8}, {13, 1}, {14, 4}},
+        },
+        {
+            {{4, 15}, {6, 15}, {6, 11}, {6, 8}, {7, 15}, {7, 11}, {7, 9}, {7, 8}, {8, 15}, {8, 11}, {9, 15}, {9, 11}, {9, 8}, {10, 13}, {10, 9}, {10, 5}, {10, 1}},
+            {{0, 0}, {4, 14}, {5, 15}, {5, 12}, {5, 10}, {5, 8}, {6, 14}, {6, 10}, {7, 14}, {8, 14}, {8, 10}, {9, 14}, {9, 10}, {9, 7}, {10, 12}, {10, 8}, {10, 4}},
+            {{0, 0}, {0, 0}, {4, 13}, {5, 14}, {5, 11}, {5, 9}, {6, 13}, {6, 9}, {7, 13}, {7, 10}, {8, 13}, {8, 9}, {9, 13}, {9, 9}, {10, 11}, {10, 7}, {10, 3}},
+            {{0, 0}, {0, 0}, {0, 0}, {4, 12}, {4, 11}, {4, 10}, {4, 9}, {4, 8}, {5, 13}, {6, 12}, {7, 12}, {8, 12}, {8, 8}, {9, 12}, {10, 10}, {10, 6}, {10, 2}}
+        }
+    };
+
+
+    AVCEnc_Status status = AVCENC_SUCCESS;
+    uint code, len;
+    int vlcnum;
+
+    if (TrailingOnes > 3)
+    {
+        return AVCENC_TRAILINGONES_FAIL;
+    }
+
+    if (nC >= 8)
+    {
+        if (TotalCoeff)
+        {
+            code = ((TotalCoeff - 1) << 2) | (TrailingOnes);
+        }
+        else
+        {
+            code = 3;
+        }
+        status = BitstreamWriteBits(stream, 6, code);
+    }
+    else
+    {
+        if (nC < 2)
+        {
+            vlcnum = 0;
+        }
+        else if (nC < 4)
+        {
+            vlcnum = 1;
+        }
+        else
+        {
+            vlcnum = 2;
+        }
+
+        len = totCoeffTrailOne[vlcnum][TrailingOnes][TotalCoeff][0];
+        code = totCoeffTrailOne[vlcnum][TrailingOnes][TotalCoeff][1];
+        status = BitstreamWriteBits(stream, len, code);
+    }
+
+    return status;
+}
+
+AVCEnc_Status ce_TotalCoeffTrailingOnesChromaDC(AVCEncBitstream *stream, int TrailingOnes, int TotalCoeff)
+{
+    const static uint8 totCoeffTrailOneChrom[4][5][2] =
+    {
+        { {2, 1}, {6, 7}, {6, 4}, {6, 3}, {6, 2}},
+        { {0, 0}, {1, 1}, {6, 6}, {7, 3}, {8, 3}},
+        { {0, 0}, {0, 0}, {3, 1}, {7, 2}, {8, 2}},
+        { {0, 0}, {0, 0}, {0, 0}, {6, 5}, {7, 0}},
+    };
+
+    AVCEnc_Status status = AVCENC_SUCCESS;
+    uint code, len;
+
+    len = totCoeffTrailOneChrom[TrailingOnes][TotalCoeff][0];
+    code = totCoeffTrailOneChrom[TrailingOnes][TotalCoeff][1];
+    status = BitstreamWriteBits(stream, len, code);
+
+    return status;
+}
+
+/* see Table 9-7 and 9-8 */
+AVCEnc_Status ce_TotalZeros(AVCEncBitstream *stream, int total_zeros, int TotalCoeff)
+{
+    const static uint8 lenTotalZeros[15][16] =
+    {
+        { 1, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 9},
+        { 3, 3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 6, 6, 6, 6},
+        { 4, 3, 3, 3, 4, 4, 3, 3, 4, 5, 5, 6, 5, 6},
+        { 5, 3, 4, 4, 3, 3, 3, 4, 3, 4, 5, 5, 5},
+        { 4, 4, 4, 3, 3, 3, 3, 3, 4, 5, 4, 5},
+        { 6, 5, 3, 3, 3, 3, 3, 3, 4, 3, 6},
+        { 6, 5, 3, 3, 3, 2, 3, 4, 3, 6},
+        { 6, 4, 5, 3, 2, 2, 3, 3, 6},
+        { 6, 6, 4, 2, 2, 3, 2, 5},
+        { 5, 5, 3, 2, 2, 2, 4},
+        { 4, 4, 3, 3, 1, 3},
+        { 4, 4, 2, 1, 3},
+        { 3, 3, 1, 2},
+        { 2, 2, 1},
+        { 1, 1},
+    };
+
+    const static uint8 codTotalZeros[15][16] =
+    {
+        {1, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 1},
+        {7, 6, 5, 4, 3, 5, 4, 3, 2, 3, 2, 3, 2, 1, 0},
+        {5, 7, 6, 5, 4, 3, 4, 3, 2, 3, 2, 1, 1, 0},
+        {3, 7, 5, 4, 6, 5, 4, 3, 3, 2, 2, 1, 0},
+        {5, 4, 3, 7, 6, 5, 4, 3, 2, 1, 1, 0},
+        {1, 1, 7, 6, 5, 4, 3, 2, 1, 1, 0},
+        {1, 1, 5, 4, 3, 3, 2, 1, 1, 0},
+        {1, 1, 1, 3, 3, 2, 2, 1, 0},
+        {1, 0, 1, 3, 2, 1, 1, 1, },
+        {1, 0, 1, 3, 2, 1, 1, },
+        {0, 1, 1, 2, 1, 3},
+        {0, 1, 1, 1, 1},
+        {0, 1, 1, 1},
+        {0, 1, 1},
+        {0, 1},
+    };
+    int len, code;
+    AVCEnc_Status status;
+
+    len = lenTotalZeros[TotalCoeff-1][total_zeros];
+    code = codTotalZeros[TotalCoeff-1][total_zeros];
+
+    status = BitstreamWriteBits(stream, len, code);
+
+    return status;
+}
+
+/* see Table 9-9 */
+AVCEnc_Status ce_TotalZerosChromaDC(AVCEncBitstream *stream, int total_zeros, int TotalCoeff)
+{
+    const static uint8 lenTotalZerosChromaDC[3][4] =
+    {
+        { 1, 2, 3, 3, },
+        { 1, 2, 2, 0, },
+        { 1, 1, 0, 0, },
+    };
+
+    const static uint8 codTotalZerosChromaDC[3][4] =
+    {
+        { 1, 1, 1, 0, },
+        { 1, 1, 0, 0, },
+        { 1, 0, 0, 0, },
+    };
+
+    int len, code;
+    AVCEnc_Status status;
+
+    len = lenTotalZerosChromaDC[TotalCoeff-1][total_zeros];
+    code = codTotalZerosChromaDC[TotalCoeff-1][total_zeros];
+
+    status = BitstreamWriteBits(stream, len, code);
+
+    return status;
+}
+
+/* see Table 9-10 */
+AVCEnc_Status ce_RunBefore(AVCEncBitstream *stream, int run_before, int zerosLeft)
+{
+    const static uint8 lenRunBefore[7][16] =
+    {
+        {1, 1},
+        {1, 2, 2},
+        {2, 2, 2, 2},
+        {2, 2, 2, 3, 3},
+        {2, 2, 3, 3, 3, 3},
+        {2, 3, 3, 3, 3, 3, 3},
+        {3, 3, 3, 3, 3, 3, 3, 4, 5, 6, 7, 8, 9, 10, 11},
+    };
+
+    const static uint8 codRunBefore[7][16] =
+    {
+        {1, 0},
+        {1, 1, 0},
+        {3, 2, 1, 0},
+        {3, 2, 1, 1, 0},
+        {3, 2, 3, 2, 1, 0},
+        {3, 0, 1, 3, 2, 5, 4},
+        {7, 6, 5, 4, 3, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1},
+    };
+
+    int len, code;
+    AVCEnc_Status status;
+
+    if (zerosLeft <= 6)
+    {
+        len = lenRunBefore[zerosLeft-1][run_before];
+        code = codRunBefore[zerosLeft-1][run_before];
+    }
+    else
+    {
+        len = lenRunBefore[6][run_before];
+        code = codRunBefore[6][run_before];
+    }
+
+    status = BitstreamWriteBits(stream, len, code);
+
+
+    return status;
+}
diff --git a/media/libstagefright/codecs/common/Android.mk b/media/libstagefright/codecs/common/Android.mk
new file mode 100644
index 0000000..fffb2ad
--- /dev/null
+++ b/media/libstagefright/codecs/common/Android.mk
@@ -0,0 +1,33 @@
+LOCAL_PATH := $(call my-dir)
+include $(CLEAR_VARS)
+
+LOCAL_PRELINK_MODULE := false
+
+LOCAL_SRC_FILES := cmnMemory.c
+
+LOCAL_MODULE := libstagefright_enc_common
+
+LOCAL_ARM_MODE := arm
+
+LOCAL_STATIC_LIBRARIES :=
+
+LOCAL_C_INCLUDES := \
+	$(LOCAL_PATH)/include
+
+LOCAL_CFLAGS := $(VO_CFLAGS)
+
+ifeq ($(VOTT), v5)
+LOCAL_CFLAGS += -DARM -DASM_OPT
+LOCAL_C_INCLUDES += $(LOCAL_PATH)/src/asm/ARMV5E
+endif
+
+ifeq ($(VOTT), v7)
+LOCAL_CFLAGS += -DARM -DARMV7 -DASM_OPT
+LOCAL_C_INCLUDES += $(LOCAL_PATH)/src/asm/ARMV5E
+LOCAL_C_INCLUDES += $(LOCAL_PATH)/src/asm/ARMV7
+endif
+
+include $(BUILD_SHARED_LIBRARY)
+
+
+
diff --git a/media/libstagefright/codecs/common/Config.mk b/media/libstagefright/codecs/common/Config.mk
new file mode 100644
index 0000000..27a17c1
--- /dev/null
+++ b/media/libstagefright/codecs/common/Config.mk
@@ -0,0 +1,24 @@
+# 

+# This configure file is just for Linux projects against Android

+#

+

+VOPRJ := 

+VONJ :=

+

+# WARNING:

+# Using v7 breaks generic build

+ifeq ($(TARGET_ARCH),arm)

+VOTT := v5

+else

+VOTT := pc

+endif

+

+# Do we also need to check on ARCH_ARM_HAVE_ARMV7A? - probably not

+ifeq ($(ARCH_ARM_HAVE_NEON),true)

+VOTT := v7

+endif

+

+VOTEST := 0

+

+VO_CFLAGS:=-DLINUX 

+

diff --git a/media/libstagefright/codecs/common/cmnMemory.c b/media/libstagefright/codecs/common/cmnMemory.c
new file mode 100644
index 0000000..c17264c
--- /dev/null
+++ b/media/libstagefright/codecs/common/cmnMemory.c
@@ -0,0 +1,73 @@
+/*

+ ** Copyright 2003-2010, VisualOn, Inc.

+ **

+ ** Licensed under the Apache License, Version 2.0 (the "License");

+ ** you may not use this file except in compliance with the License.

+ ** You may obtain a copy of the License at

+ **

+ **     http://www.apache.org/licenses/LICENSE-2.0

+ **

+ ** Unless required by applicable law or agreed to in writing, software

+ ** distributed under the License is distributed on an "AS IS" BASIS,

+ ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

+ ** See the License for the specific language governing permissions and

+ ** limitations under the License.

+ */

+/*******************************************************************************

+	File:		cmnMemory.c

+

+	Content:	sample code for memory operator implementation

+

+*******************************************************************************/

+#include "cmnMemory.h"

+

+#include <malloc.h>

+#if defined LINUX

+#include <string.h>

+#endif

+

+//VO_MEM_OPERATOR		g_memOP;

+

+VO_U32 cmnMemAlloc (VO_S32 uID,  VO_MEM_INFO * pMemInfo)

+{

+	if (!pMemInfo)

+		return VO_ERR_INVALID_ARG;

+

+	pMemInfo->VBuffer = malloc (pMemInfo->Size);

+	return 0;

+}

+

+VO_U32 cmnMemFree (VO_S32 uID, VO_PTR pMem)

+{

+	free (pMem);

+	return 0;

+}

+

+VO_U32	cmnMemSet (VO_S32 uID, VO_PTR pBuff, VO_U8 uValue, VO_U32 uSize)

+{

+	memset (pBuff, uValue, uSize);

+	return 0;

+}

+

+VO_U32	cmnMemCopy (VO_S32 uID, VO_PTR pDest, VO_PTR pSource, VO_U32 uSize)

+{

+	memcpy (pDest, pSource, uSize);

+	return 0;

+}

+

+VO_U32	cmnMemCheck (VO_S32 uID, VO_PTR pBuffer, VO_U32 uSize)

+{

+	return 0;

+}

+

+VO_S32 cmnMemCompare (VO_S32 uID, VO_PTR pBuffer1, VO_PTR pBuffer2, VO_U32 uSize)

+{

+	return memcmp(pBuffer1, pBuffer2, uSize);

+}

+

+VO_U32	cmnMemMove (VO_S32 uID, VO_PTR pDest, VO_PTR pSource, VO_U32 uSize)

+{

+	memmove (pDest, pSource, uSize);

+	return 0;

+}

+

diff --git a/media/libstagefright/codecs/common/include/cmnMemory.h b/media/libstagefright/codecs/common/include/cmnMemory.h
new file mode 100644
index 0000000..9315600
--- /dev/null
+++ b/media/libstagefright/codecs/common/include/cmnMemory.h
@@ -0,0 +1,106 @@
+/*

+ ** Copyright 2003-2010, VisualOn, Inc.

+ **

+ ** Licensed under the Apache License, Version 2.0 (the "License");

+ ** you may not use this file except in compliance with the License.

+ ** You may obtain a copy of the License at

+ **

+ **     http://www.apache.org/licenses/LICENSE-2.0

+ **

+ ** Unless required by applicable law or agreed to in writing, software

+ ** distributed under the License is distributed on an "AS IS" BASIS,

+ ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

+ ** See the License for the specific language governing permissions and

+ ** limitations under the License.

+ */

+/*******************************************************************************

+	File:		cmnMemory.h

+

+	Content:	memory operator implementation header file

+

+*******************************************************************************/

+

+#ifndef __cmnMemory_H__

+#define __cmnMemory_H__

+

+#ifdef __cplusplus

+extern "C" {

+#endif /* __cplusplus */

+

+#include <voMem.h>

+

+//extern VO_MEM_OPERATOR	g_memOP;

+

+/**

+ * Allocate memory

+ * \param uID [in] module ID

+ * \param uSize [in] size of memory

+ * \return value is the allocated memory address. NULL is failed.

+ */

+VO_U32	cmnMemAlloc (VO_S32 uID,  VO_MEM_INFO * pMemInfo);

+

+/**

+ * Free up memory

+ * \param uID [in] module ID

+ * \param pMem [in] address of memory

+ * \return value 0, if succeeded.

+ */

+VO_U32	cmnMemFree (VO_S32 uID, VO_PTR pBuffer);

+

+/**

+ * memory set function

+ * \param uID [in] module ID

+ * \param pBuff [in/out] address of memory

+ * \param uValue [in] the value to be set

+ * \param uSize [in] the size to be set

+ * \return value 0, if succeeded.

+ */

+VO_U32	cmnMemSet (VO_S32 uID, VO_PTR pBuff, VO_U8 uValue, VO_U32 uSize);

+

+/**

+ * memory copy function

+ * \param uID [in] module ID

+ * \param pDest [in/out] address of destination memory

+ * \param pSource [in] address of source memory

+ * \param uSize [in] the size to be copied

+ * \return value 0, if succeeded.

+ */

+VO_U32	cmnMemCopy (VO_S32 uID, VO_PTR pDest, VO_PTR pSource, VO_U32 uSize);

+

+/**

+ * memory check function

+ * \param uID [in] module ID

+ * \param pBuff [in] address of buffer to be checked

+ * \param uSize [in] the size to be checked

+ * \return value 0, if succeeded.

+ */

+VO_U32	cmnMemCheck (VO_S32 uID, VO_PTR pBuffer, VO_U32 uSize);

+

+/**

+ * memory compare function

+ * \param uID [in] module ID

+ * \param pBuffer1 [in] address of buffer 1 to be compared

+ * \param pBuffer2 [in] address of buffer 2 to be compared

+ * \param uSize [in] the size to be compared

+ * \return value: same as standard C run-time memcmp() function.

+ */

+VO_S32	cmnMemCompare (VO_S32 uID, VO_PTR pBuffer1, VO_PTR pBuffer2, VO_U32 uSize);

+

+/**

+ * memory move function

+ * \param uID [in] module ID

+ * \param pDest [in/out] address of destination memory

+ * \param pSource [in] address of source memory

+ * \param uSize [in] the size to be moved

+ * \return value 0, if succeeded.

+ */

+VO_U32	cmnMemMove (VO_S32 uID, VO_PTR pDest, VO_PTR pSource, VO_U32 uSize);

+

+

+#ifdef __cplusplus

+}

+#endif /* __cplusplus */

+

+#endif // __cmnMemory_H__

+

+

diff --git a/media/libstagefright/codecs/common/include/voAAC.h b/media/libstagefright/codecs/common/include/voAAC.h
new file mode 100644
index 0000000..d11ed83
--- /dev/null
+++ b/media/libstagefright/codecs/common/include/voAAC.h
@@ -0,0 +1,74 @@
+/*

+ ** Copyright 2003-2010, VisualOn, Inc.

+ **

+ ** Licensed under the Apache License, Version 2.0 (the "License");

+ ** you may not use this file except in compliance with the License.

+ ** You may obtain a copy of the License at

+ **

+ **     http://www.apache.org/licenses/LICENSE-2.0

+ **

+ ** Unless required by applicable law or agreed to in writing, software

+ ** distributed under the License is distributed on an "AS IS" BASIS,

+ ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

+ ** See the License for the specific language governing permissions and

+ ** limitations under the License.

+ */

+/*******************************************************************************

+	File:		voAAC.h

+

+	Content:	AAC codec APIs & data types

+

+*******************************************************************************/

+

+#ifndef __voAAC_H__

+#define __voAAC_H__

+

+#ifdef __cplusplus

+extern "C" {

+#endif /* __cplusplus */

+

+#include "voAudio.h"

+

+/*!

+ * the frame type that the decoder supports

+ */

+typedef enum {

+	VOAAC_RAWDATA			= 0,	/*!<contains only raw aac data in a frame*/

+	VOAAC_ADTS				= 1,	/*!<contains ADTS header + raw AAC data in a frame*/

+	VOAAC_FT_MAX			= VO_MAX_ENUM_VALUE

+} VOAACFRAMETYPE;

+

+/*!

+ * the structure for AAC encoder input parameter

+ */

+typedef  struct {

+  int	  sampleRate;          /*! audio file sample rate */

+  int	  bitRate;             /*! encoder bit rate in bits/sec */

+  short   nChannels;		   /*! number of channels on input (1,2) */

+  short   adtsUsed;			   /*! whether write adts header */

+} AACENC_PARAM;

+

+/* AAC Param ID */

+#define VO_PID_AAC_Mdoule				0x42211000

+#define VO_PID_AAC_ENCPARAM				VO_PID_AAC_Mdoule | 0x0040  /*!< get/set AAC encoder parameter, the parameter is a pointer to AACENC_PARAM */

+

+/* AAC decoder error ID */

+#define VO_ERR_AAC_Mdoule				0x82210000

+#define VO_ERR_AAC_UNSFILEFORMAT		(VO_ERR_AAC_Mdoule | 0xF001)

+#define VO_ERR_AAC_UNSPROFILE			(VO_ERR_AAC_Mdoule | 0xF002)

+

+/**

+ * Get audio encoder API interface

+ * \param pEncHandle [out] Return the AAC Encoder handle.

+ * \retval VO_ERR_OK Succeeded.

+ */

+VO_S32 VO_API voGetAACEncAPI (VO_AUDIO_CODECAPI * pEncHandle);

+

+#ifdef __cplusplus

+}

+#endif /* __cplusplus */

+

+#endif // __voAAC_H__

+

+

+

diff --git a/media/libstagefright/codecs/common/include/voAMRWB.h b/media/libstagefright/codecs/common/include/voAMRWB.h
new file mode 100644
index 0000000..8a93eb8
--- /dev/null
+++ b/media/libstagefright/codecs/common/include/voAMRWB.h
@@ -0,0 +1,87 @@
+/*

+ ** Copyright 2003-2010, VisualOn, Inc.

+ **

+ ** Licensed under the Apache License, Version 2.0 (the "License");

+ ** you may not use this file except in compliance with the License.

+ ** You may obtain a copy of the License at

+ **

+ **     http://www.apache.org/licenses/LICENSE-2.0

+ **

+ ** Unless required by applicable law or agreed to in writing, software

+ ** distributed under the License is distributed on an "AS IS" BASIS,

+ ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

+ ** See the License for the specific language governing permissions and

+ ** limitations under the License.

+ */

+/*******************************************************************************

+	File:		voAMRWB.h

+

+	Content:	AMR-WB codec APIs & data types

+

+*******************************************************************************/

+#ifndef  __VOAMRWB_H__

+#define  __VOAMRWB_H__

+

+#include  "voAudio.h"

+#ifdef __cplusplus

+extern "C" {

+#endif /* __cplusplus */

+#pragma pack(push, 4)

+

+/*!* the bit rate the codec supports*/

+typedef enum { 

+	VOAMRWB_MDNONE		= -1,	/*!< Invalid mode */

+	VOAMRWB_MD66		= 0,	/*!< 6.60kbps   */

+	VOAMRWB_MD885		= 1,    /*!< 8.85kbps   */       

+	VOAMRWB_MD1265		= 2,	/*!< 12.65kbps  */

+	VOAMRWB_MD1425		= 3,	/*!< 14.25kbps  */

+	VOAMRWB_MD1585		= 4,	/*!< 15.85bps   */

+	VOAMRWB_MD1825		= 5,	/*!< 18.25bps   */

+	VOAMRWB_MD1985		= 6,	/*!< 19.85kbps  */

+	VOAMRWB_MD2305		= 7,    /*!< 23.05kbps  */

+	VOAMRWB_MD2385          = 8,    /*!< 23.85kbps> */	

+	VOAMRWB_N_MODES 	= 9,	/*!< Invalid mode */

+	VOAMRWB_MODE_MAX    = VO_MAX_ENUM_VALUE

+	

+}VOAMRWBMODE;

+

+/*!* the frame format the codec supports*/

+typedef enum {

+	VOAMRWB_DEFAULT  	= 0,	/*!< the frame type is the header (defined in RFC3267) + rawdata*/

+	/*One word (2-byte) for sync word (0x6b21)*/

+	/*One word (2-byte) for frame length N.*/

+	/*N words (2-byte) containing N bits (bit 0 = 0x007f, bit 1 = 0x0081).*/

+	VOAMRWB_ITU         = 1, 

+	/*One word (2-byte) for sync word (0x6b21).*/

+	/*One word (2-byte) to indicate the frame type.*/	

+	/*One word (2-byte) to indicate the mode.*/

+	/*N words  (2-byte) containing N bits (bit 0 = 0xff81, bit 1 = 0x007f).*/

+	VOAMRWB_RFC3267		= 2,	/* see RFC 3267 */  

+    VOAMRWB_TMAX        = VO_MAX_ENUM_VALUE	

+}VOAMRWBFRAMETYPE;

+

+

+#define    VO_PID_AMRWB_Module							0x42261000 

+#define    VO_PID_AMRWB_FORMAT                          (VO_PID_AMRWB_Module | 0x0002)

+#define    VO_PID_AMRWB_CHANNELS                        (VO_PID_AMRWB_Module | 0x0003)

+#define    VO_PID_AMRWB_SAMPLERATE                      (VO_PID_AMRWB_Module | 0x0004)

+#define    VO_PID_AMRWB_FRAMETYPE                       (VO_PID_AMRWB_Module | 0x0005)

+#define    VO_PID_AMRWB_MODE                            (VO_PID_AMRWB_Module | 0x0006)

+#define    VO_PID_AMRWB_DTX                             (VO_PID_AMRWB_Module | 0x0007)

+

+/**

+ * Get audio codec API interface

+ * \param pEncHandle [out] Return the AMRWB Encoder handle.

+ * \retval VO_ERR_OK Succeeded.

+ */

+VO_S32 VO_API voGetAMRWBEncAPI(VO_AUDIO_CODECAPI *pEncHandle);

+

+

+#pragma pack(pop)

+#ifdef __cplusplus

+} /* extern "C" */

+#endif /* __cplusplus */

+

+

+#endif   //__VOAMRWB_H__

+

diff --git a/media/libstagefright/codecs/common/include/voAudio.h b/media/libstagefright/codecs/common/include/voAudio.h
new file mode 100644
index 0000000..64c9dfb
--- /dev/null
+++ b/media/libstagefright/codecs/common/include/voAudio.h
@@ -0,0 +1,173 @@
+/*

+ ** Copyright 2003-2010, VisualOn, Inc.

+ **

+ ** Licensed under the Apache License, Version 2.0 (the "License");

+ ** you may not use this file except in compliance with the License.

+ ** You may obtain a copy of the License at

+ **

+ **     http://www.apache.org/licenses/LICENSE-2.0

+ **

+ ** Unless required by applicable law or agreed to in writing, software

+ ** distributed under the License is distributed on an "AS IS" BASIS,

+ ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

+ ** See the License for the specific language governing permissions and

+ ** limitations under the License.

+ */

+/*******************************************************************************

+	File:		voAudio.h

+

+	Content:	Audio types and functions

+

+*******************************************************************************/

+

+#ifndef __voAudio_H__

+#define __voAudio_H__

+

+#ifdef __cplusplus

+extern "C" {

+#endif /* __cplusplus */

+

+#include "voIndex.h"

+#include "voMem.h"

+

+#define	VO_PID_AUDIO_BASE			 0x42000000							/*!< The base param ID for AUDIO codec */

+#define	VO_PID_AUDIO_FORMAT			(VO_PID_AUDIO_BASE | 0X0001)		/*!< The format data of audio in track */

+#define	VO_PID_AUDIO_SAMPLEREATE	(VO_PID_AUDIO_BASE | 0X0002)		/*!< The sample rate of audio  */

+#define	VO_PID_AUDIO_CHANNELS		(VO_PID_AUDIO_BASE | 0X0003)		/*!< The channel of audio */

+#define	VO_PID_AUDIO_BITRATE		(VO_PID_AUDIO_BASE | 0X0004)		/*!< The bit rate of audio */

+#define VO_PID_AUDIO_CHANNELMODE	(VO_PID_AUDIO_BASE | 0X0005)		/*!< The channel mode of audio */

+

+#define	VO_ERR_AUDIO_BASE			0x82000000

+#define VO_ERR_AUDIO_UNSCHANNEL		VO_ERR_AUDIO_BASE | 0x0001

+#define VO_ERR_AUDIO_UNSSAMPLERATE	VO_ERR_AUDIO_BASE | 0x0002

+#define VO_ERR_AUDIO_UNSFEATURE		VO_ERR_AUDIO_BASE | 0x0003

+

+

+/**

+ *Enumeration used to define the possible audio coding formats.

+ */

+typedef enum VO_AUDIO_CODINGTYPE {

+	VO_AUDIO_CodingUnused = 0,  /**< Placeholder value when coding is N/A  */

+	VO_AUDIO_CodingPCM,         /**< Any variant of PCM coding */

+	VO_AUDIO_CodingADPCM,       /**< Any variant of ADPCM encoded data */

+	VO_AUDIO_CodingAMRNB,       /**< Any variant of AMR encoded data */

+	VO_AUDIO_CodingAMRWB,       /**< Any variant of AMR encoded data */

+	VO_AUDIO_CodingAMRWBP,      /**< Any variant of AMR encoded data */

+	VO_AUDIO_CodingQCELP13,     /**< Any variant of QCELP 13kbps encoded data */

+	VO_AUDIO_CodingEVRC,        /**< Any variant of EVRC encoded data */

+	VO_AUDIO_CodingAAC,         /**< Any variant of AAC encoded data, 0xA106 - ISO/MPEG-4 AAC, 0xFF - AAC */

+	VO_AUDIO_CodingAC3,         /**< Any variant of AC3 encoded data */

+	VO_AUDIO_CodingFLAC,        /**< Any variant of FLAC encoded data */

+	VO_AUDIO_CodingMP1,			/**< Any variant of MP1 encoded data */

+	VO_AUDIO_CodingMP3,         /**< Any variant of MP3 encoded data */

+	VO_AUDIO_CodingOGG,         /**< Any variant of OGG encoded data */

+	VO_AUDIO_CodingWMA,         /**< Any variant of WMA encoded data */

+	VO_AUDIO_CodingRA,          /**< Any variant of RA encoded data */

+	VO_AUDIO_CodingMIDI,        /**< Any variant of MIDI encoded data */

+	VO_AUDIO_CodingDRA,         /**< Any variant of dra encoded data */

+	VO_AUDIO_CodingG729,        /**< Any variant of dra encoded data */

+	VO_AUDIO_Coding_MAX		= VO_MAX_ENUM_VALUE

+} VO_AUDIO_CODINGTYPE;

+

+/*!

+* the channel type value

+*/

+typedef enum {

+	VO_CHANNEL_CENTER				= 1,	/*!<center channel*/

+	VO_CHANNEL_FRONT_LEFT			= 1<<1,	/*!<front left channel*/

+	VO_CHANNEL_FRONT_RIGHT			= 1<<2,	/*!<front right channel*/

+	VO_CHANNEL_SIDE_LEFT  			= 1<<3, /*!<side left channel*/

+	VO_CHANNEL_SIDE_RIGHT			= 1<<4, /*!<side right channel*/

+	VO_CHANNEL_BACK_LEFT			= 1<<5,	/*!<back left channel*/

+	VO_CHANNEL_BACK_RIGHT			= 1<<6,	/*!<back right channel*/

+	VO_CHANNEL_BACK_CENTER			= 1<<7,	/*!<back center channel*/

+	VO_CHANNEL_LFE_BASS				= 1<<8,	/*!<low-frequency effects bass channel*/

+	VO_CHANNEL_ALL					= 0xffff,/*!<[default] include all channels */

+	VO_CHANNEL_MAX					= VO_MAX_ENUM_VALUE

+} VO_AUDIO_CHANNELTYPE;

+

+/**

+ * General audio format info

+ */

+typedef struct

+{

+	VO_S32	SampleRate;  /*!< Sample rate */

+	VO_S32	Channels;    /*!< Channel count */

+	VO_S32	SampleBits;  /*!< Bits per sample */

+} VO_AUDIO_FORMAT;

+

+/**

+ * General audio output info

+ */

+typedef struct

+{

+	VO_AUDIO_FORMAT	Format;			/*!< Sample rate */

+	VO_U32			InputUsed;		/*!< Channel count */

+	VO_U32			Resever;		/*!< Resevered */

+} VO_AUDIO_OUTPUTINFO;

+

+/**

+ * General audio codec function set

+ */

+typedef struct VO_AUDIO_CODECAPI

+{

+	/**

+	 * Init the audio codec module and return codec handle

+	 * \param phCodec [OUT] Return the video codec handle

+	 * \param vType	[IN] The codec type if the module support multi codec.

+	 * \param pUserData	[IN] The init param. It is either a memory operator or an allocated memory

+	 * \retval VO_ERR_NONE Succeeded.

+	 */

+	VO_U32 (VO_API * Init) (VO_HANDLE * phCodec, VO_AUDIO_CODINGTYPE vType, VO_CODEC_INIT_USERDATA * pUserData );

+

+	/**

+	 * Set input audio data.

+	 * \param hCodec [IN]] The codec handle which was created by Init function.

+	 * \param pInput [IN] The input buffer param.

+	 * \retval VO_ERR_NONE Succeeded.

+	 */

+	VO_U32 (VO_API * SetInputData) (VO_HANDLE hCodec, VO_CODECBUFFER * pInput);

+

+	/**

+	 * Get the outut audio data

+	 * \param hCodec [IN]] The codec handle which was created by Init function.

+	 * \param pOutBuffer [OUT] The output audio data

+	 * \param pOutInfo [OUT] The codec fills audio format and the input data size used in current call.

+	 *						 pOutInfo->InputUsed is total used input data size in byte.

+	 * \retval  VO_ERR_NONE Succeeded.

+	 *			VO_ERR_INPUT_BUFFER_SMALL. The input was finished or the input data was not enought. Continue to input 

+	 *										data before next call.

+	 */

+	VO_U32 (VO_API * GetOutputData) (VO_HANDLE hCodec, VO_CODECBUFFER * pOutBuffer, VO_AUDIO_OUTPUTINFO * pOutInfo);

+

+	/**

+	 * Set the parameter for the specified param ID.

+	 * \param hCodec [IN]] The codec handle which was created by Init function.

+	 * \param uParamID [IN] The param ID.

+	 * \param pData [IN] The param value.

+	 * \retval VO_ERR_NONE Succeeded.

+	 */

+	VO_U32 (VO_API * SetParam) (VO_HANDLE hCodec, VO_S32 uParamID, VO_PTR pData);

+

+	/**

+	 * Get the parameter for the specified param ID.

+	 * \param hCodec [IN]] The codec handle which was created by Init function.

+	 * \param uParamID [IN] The param ID.

+	 * \param pData [IN] The param value.

+	 * \retval VO_ERR_NONE Succeeded.

+	 */

+	VO_U32 (VO_API * GetParam) (VO_HANDLE hCodec, VO_S32 uParamID, VO_PTR pData);

+

+	/**

+	 * Uninit the Codec.

+	 * \param hCodec [IN]] The codec handle which was created by Init function.

+	 * \retval VO_ERR_NONE Succeeded.

+	 */

+	VO_U32 (VO_API * Uninit) (VO_HANDLE hCodec);

+} VO_AUDIO_CODECAPI;

+

+#ifdef __cplusplus

+}

+#endif /* __cplusplus */

+

+#endif // __voAudio_H__

diff --git a/media/libstagefright/codecs/common/include/voIndex.h b/media/libstagefright/codecs/common/include/voIndex.h
new file mode 100644
index 0000000..541a0db
--- /dev/null
+++ b/media/libstagefright/codecs/common/include/voIndex.h
@@ -0,0 +1,193 @@
+/*

+ ** Copyright 2003-2010, VisualOn, Inc.

+ **

+ ** Licensed under the Apache License, Version 2.0 (the "License");

+ ** you may not use this file except in compliance with the License.

+ ** You may obtain a copy of the License at

+ **

+ **     http://www.apache.org/licenses/LICENSE-2.0

+ **

+ ** Unless required by applicable law or agreed to in writing, software

+ ** distributed under the License is distributed on an "AS IS" BASIS,

+ ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

+ ** See the License for the specific language governing permissions and

+ ** limitations under the License.

+ */

+/*******************************************************************************

+	File:		voIndex.h

+

+	Content:	module and ID definition

+

+*******************************************************************************/

+

+#ifndef __voIndex_H__

+#define __voIndex_H__

+

+#ifdef __cplusplus

+extern "C" {

+#endif /* __cplusplus */

+

+#include "voType.h"

+

+/* Define the module ID */

+#define _MAKE_SOURCE_ID(id, name) \

+VO_INDEX_SRC_##name = _VO_INDEX_SOURCE | id,

+

+#define _MAKE_CODEC_ID(id, name) \

+VO_INDEX_DEC_##name = _VO_INDEX_DEC | id, \

+VO_INDEX_ENC_##name = _VO_INDEX_ENC | id,

+

+#define _MAKE_EFFECT_ID(id, name) \

+VO_INDEX_EFT_##name = _VO_INDEX_EFFECT | id,

+

+#define _MAKE_SINK_ID(id, name) \

+VO_INDEX_SNK_##name = _VO_INDEX_SINK | id,

+

+#define _MAKE_FILTER_ID(id, name) \

+VO_INDEX_FLT_##name = _VO_INDEX_FILTER | id,

+

+#define _MAKE_OMX_ID(id, name) \

+VO_INDEX_OMX_##name = _VO_INDEX_OMX | id,

+

+#define _MAKE_MFW_ID(id, name) \

+VO_INDEX_MFW_##name = _VO_INDEX_MFW | id,

+

+enum

+{

+	_VO_INDEX_SOURCE		= 0x01000000,

+	_VO_INDEX_DEC			= 0x02000000,

+	_VO_INDEX_ENC			= 0x03000000,

+	_VO_INDEX_EFFECT		= 0x04000000,

+	_VO_INDEX_SINK			= 0x05000000,

+	_VO_INDEX_FILTER		= 0x06000000,

+	_VO_INDEX_OMX			= 0x07000000,

+	_VO_INDEX_MFW			= 0x08000000,

+

+	// define file parser modules

+	_MAKE_SOURCE_ID (0x010000, MP4)

+	_MAKE_SOURCE_ID (0x020000, AVI)

+	_MAKE_SOURCE_ID (0x030000, ASF)

+	_MAKE_SOURCE_ID (0x040000, REAL)

+	_MAKE_SOURCE_ID (0x050000, AUDIO)

+	_MAKE_SOURCE_ID (0x060000, FLASH)

+	_MAKE_SOURCE_ID (0x070000, OGG)

+	_MAKE_SOURCE_ID (0x080000, MKV)

+

+	// define network source modules

+	_MAKE_SOURCE_ID (0x110000, RTSP)

+	_MAKE_SOURCE_ID (0x120000, HTTP)

+

+	// define CMMB source modules

+	_MAKE_SOURCE_ID (0x200000, CMMB)

+	_MAKE_SOURCE_ID (0x210000, CMMB_INNO)

+	_MAKE_SOURCE_ID (0x220000, CMMB_TELE)

+	_MAKE_SOURCE_ID (0x230000, CMMB_SIANO)

+

+	// define DVBT source modules

+	_MAKE_SOURCE_ID (0x300000, DVBT)

+	_MAKE_SOURCE_ID (0x310000, DVBT_DIBCOM)

+

+	// define other source modules

+	_MAKE_SOURCE_ID (0x400000, ID3)

+

+	// define video codec modules

+	_MAKE_CODEC_ID (0x010000, H264)

+	_MAKE_CODEC_ID (0x020000, MPEG4)

+	_MAKE_CODEC_ID (0x030000, H263)

+	_MAKE_CODEC_ID (0x040000, S263)

+	_MAKE_CODEC_ID (0x050000, RV)

+	_MAKE_CODEC_ID (0x060000, WMV)

+	_MAKE_CODEC_ID (0x070000, DIVX3)

+	_MAKE_CODEC_ID (0x080000, MJPEG)

+	_MAKE_CODEC_ID (0x090000, MPEG2)

+	_MAKE_CODEC_ID (0x0A0000, VP6)

+

+	// define audio codec modules

+	_MAKE_CODEC_ID (0x210000, AAC)

+	_MAKE_CODEC_ID (0x220000, MP3)

+	_MAKE_CODEC_ID (0x230000, WMA)

+	_MAKE_CODEC_ID (0x240000, RA)

+	_MAKE_CODEC_ID (0x250000, AMRNB)

+	_MAKE_CODEC_ID (0x260000, AMRWB)

+	_MAKE_CODEC_ID (0x270000, AMRWBP)

+	_MAKE_CODEC_ID (0x280000, QCELP)

+	_MAKE_CODEC_ID (0x290000, EVRC)

+	_MAKE_CODEC_ID (0x2A0000, ADPCM)

+	_MAKE_CODEC_ID (0x2B0000, MIDI)

+	_MAKE_CODEC_ID (0x2C0000, AC3)

+	_MAKE_CODEC_ID (0x2D0000, FLAC)

+	_MAKE_CODEC_ID (0x2E0000, DRA)

+	_MAKE_CODEC_ID (0x2F0000, OGG)

+	_MAKE_CODEC_ID (0x300000, G729)

+

+	// define image codec modules

+	_MAKE_CODEC_ID (0x410000, JPEG)

+	_MAKE_CODEC_ID (0x420000, GIF)

+	_MAKE_CODEC_ID (0x430000, PNG)

+	_MAKE_CODEC_ID (0x440000, TIF)

+

+	// define effect modules

+	_MAKE_EFFECT_ID (0x010000, EQ)

+

+	// define sink modules

+	_MAKE_SINK_ID (0x010000, VIDEO)

+	_MAKE_SINK_ID (0x020000, AUDIO)

+	_MAKE_SINK_ID (0x030000, CCRRR)

+	_MAKE_SINK_ID (0x040000, CCRRV)

+

+	_MAKE_SINK_ID (0x110000, MP4)

+	_MAKE_SINK_ID (0x120000, AVI)

+	_MAKE_SINK_ID (0x130000, AFW)

+

+	// define media frame module ID

+	_MAKE_MFW_ID (0x010000, VOMMPLAY)

+	_MAKE_MFW_ID (0x020000, VOMMREC)

+	_MAKE_MFW_ID (0x030000, VOME)

+};

+

+

+/* define the error ID */

+#define VO_ERR_NONE						0x00000000

+#define VO_ERR_FINISH					0x00000001

+#define VO_ERR_BASE						0X80000000

+#define VO_ERR_FAILED					0x80000001

+#define VO_ERR_OUTOF_MEMORY				0x80000002

+#define VO_ERR_NOT_IMPLEMENT			0x80000003

+#define VO_ERR_INVALID_ARG				0x80000004

+#define VO_ERR_INPUT_BUFFER_SMALL		0x80000005

+#define VO_ERR_OUTPUT_BUFFER_SMALL		0x80000006

+#define VO_ERR_WRONG_STATUS				0x80000007

+#define VO_ERR_WRONG_PARAM_ID			0x80000008

+#define VO_ERR_LICENSE_ERROR			0x80000009

+

+/* xxx is the module ID

+#define VO_ERR_FAILED					0x8xxx0001

+#define VO_ERR_OUTOF_MEMORY				0x8xxx0002

+#define VO_ERR_NOT_IMPLEMENT			0x8xxx0003

+#define VO_ERR_INVALID_ARG				0x8xxx0004

+#define VO_ERR_INPUT_BUFFER_SMALL		0x8xxx0005

+#define VO_ERR_OUTPUT_BUFFER_SMALL		0x8xxx0006

+#define VO_ERR_WRONG_STATUS				0x8xxx0007

+#define VO_ERR_WRONG_PARAM_ID			0x8xxx0008

+#define VO_ERR_LICENSE_ERROR			0x8xxx0009

+// Module own error ID

+#define VO_ERR_Module					0x8xxx0X00

+*/

+ 

+#define	VO_PID_COMMON_BASE				 0x40000000						/*!< The base of common param ID */

+#define	VO_PID_COMMON_QUERYMEM			(VO_PID_COMMON_BASE | 0X0001)	/*!< Query the memory needed; Reserved. */

+#define	VO_PID_COMMON_INPUTTYPE			(VO_PID_COMMON_BASE | 0X0002)	/*!< Set or get the input buffer type. VO_INPUT_TYPE */

+#define	VO_PID_COMMON_HASRESOURCE		(VO_PID_COMMON_BASE | 0X0003)	/*!< Query it has resource to be used. VO_U32 *, 1 have, 0 No */

+#define	VO_PID_COMMON_HEADDATA			(VO_PID_COMMON_BASE | 0X0004)	/*!< Decoder track header data. VO_CODECBUFFER * */

+#define	VO_PID_COMMON_FLUSH				(VO_PID_COMMON_BASE | 0X0005)	/*!< Flush the codec buffer. VO_U32 *, 1 Flush, 0 No * */

+

+/*

+// Module Param ID

+#define VO_ID_Mdoule					0x0xxx1000

+*/

+

+#ifdef __cplusplus

+}

+#endif /* __cplusplus */

+

+#endif // __voIndex_H__

diff --git a/media/libstagefright/codecs/common/include/voMem.h b/media/libstagefright/codecs/common/include/voMem.h
new file mode 100644
index 0000000..8dfb634
--- /dev/null
+++ b/media/libstagefright/codecs/common/include/voMem.h
@@ -0,0 +1,65 @@
+/*
+ ** Copyright 2003-2010, VisualOn, Inc.
+ **
+ ** Licensed under the Apache License, Version 2.0 (the "License");
+ ** you may not use this file except in compliance with the License.
+ ** You may obtain a copy of the License at
+ **
+ **     http://www.apache.org/licenses/LICENSE-2.0
+ **
+ ** Unless required by applicable law or agreed to in writing, software
+ ** distributed under the License is distributed on an "AS IS" BASIS,
+ ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ ** See the License for the specific language governing permissions and
+ ** limitations under the License.
+ */
+/*******************************************************************************
+	File:		voMem.h
+
+	Content:	memory functions & data structures
+
+*******************************************************************************/
+
+#ifndef __voMem_H__
+#define __voMem_H__
+
+#ifdef __cplusplus
+extern "C" {
+#endif /* __cplusplus */
+
+#include "voIndex.h"
+
+typedef struct
+{
+	VO_S32				Size;				/*!< Buffer stride */
+	VO_S32				Flag;
+	VO_PTR				VBuffer;			/*!< user data pointer */
+	VO_PTR				PBuffer;			/*!< user data pointer */
+}
+VO_MEM_INFO;
+
+typedef struct VO_MEM_OPERATOR
+{
+	VO_U32 (VO_API * Alloc) (VO_S32 uID, VO_MEM_INFO * pMemInfo);
+	VO_U32 (VO_API * Free) (VO_S32 uID, VO_PTR pBuff);
+	VO_U32 (VO_API * Set) (VO_S32 uID, VO_PTR pBuff, VO_U8 uValue, VO_U32 uSize);
+	VO_U32 (VO_API * Copy) (VO_S32 uID, VO_PTR pDest, VO_PTR pSource, VO_U32 uSize);
+	VO_U32 (VO_API * Check) (VO_S32 uID, VO_PTR pBuffer, VO_U32 uSize);
+	VO_S32 (VO_API * Compare) (VO_S32 uID, VO_PTR pBuffer1, VO_PTR pBuffer2, VO_U32 uSize);
+	VO_U32 (VO_API * Move) (VO_S32 uID, VO_PTR pDest, VO_PTR pSource, VO_U32 uSize);
+} VO_MEM_OPERATOR;
+
+#define voMemAlloc(pBuff, pMemOP, ID, nSize) \
+{ \
+	VO_MEM_INFO voMemInfo; \
+	voMemInfo.Size=nSize; \
+	pMemOP->Alloc(ID, &voMemInfo); \
+	pBuff=(VO_PBYTE)voMemInfo.VBuffer; \
+}
+
+
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+
+#endif // __voMem_H__
diff --git a/media/libstagefright/codecs/common/include/voType.h b/media/libstagefright/codecs/common/include/voType.h
new file mode 100644
index 0000000..2669134
--- /dev/null
+++ b/media/libstagefright/codecs/common/include/voType.h
@@ -0,0 +1,221 @@
+/*

+ ** Copyright 2003-2010, VisualOn, Inc.

+ **

+ ** Licensed under the Apache License, Version 2.0 (the "License");

+ ** you may not use this file except in compliance with the License.

+ ** You may obtain a copy of the License at

+ **

+ **     http://www.apache.org/licenses/LICENSE-2.0

+ **

+ ** Unless required by applicable law or agreed to in writing, software

+ ** distributed under the License is distributed on an "AS IS" BASIS,

+ ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

+ ** See the License for the specific language governing permissions and

+ ** limitations under the License.

+ */

+/*******************************************************************************

+	File:		voType.h

+

+	Content:	data type definition

+

+*******************************************************************************/

+#ifndef __voType_H__

+#define __voType_H__

+

+#ifdef __cplusplus

+extern "C" {

+#endif /* __cplusplus */

+

+#ifdef _WIN32

+#	define VO_API __cdecl

+#	define VO_CBI __stdcall

+#else

+#	define VO_API

+#	define VO_CBI

+#endif //_WIN32

+

+/** VO_IN is used to identify inputs to an VO function.  This designation

+    will also be used in the case of a pointer that points to a parameter

+    that is used as an output. */

+#ifndef VO_IN

+#define VO_IN

+#endif

+

+/** VO_OUT is used to identify outputs from an VO function.  This

+    designation will also be used in the case of a pointer that points

+    to a parameter that is used as an input. */

+#ifndef VO_OUT

+#define VO_OUT

+#endif

+

+/** VO_INOUT is used to identify parameters that may be either inputs or

+    outputs from an VO function at the same time.  This designation will

+    also be used in the case of a pointer that  points to a parameter that

+    is used both as an input and an output. */

+#ifndef VO_INOUT

+#define VO_INOUT

+#endif

+

+#define VO_MAX_ENUM_VALUE	0X7FFFFFFF

+

+/** VO_VOID */

+typedef void VO_VOID;

+

+/** VO_U8 is an 8 bit unsigned quantity that is byte aligned */

+typedef unsigned char VO_U8;

+

+/** VO_BYTE is an 8 bit unsigned quantity that is byte aligned */

+typedef unsigned char VO_BYTE;

+

+/** VO_S8 is an 8 bit signed quantity that is byte aligned */

+typedef signed char VO_S8;

+

+/** VO_CHAR is an 8 bit signed quantity that is byte aligned */

+typedef char VO_CHAR;

+

+/** VO_U16 is a 16 bit unsigned quantity that is 16 bit word aligned */

+typedef unsigned short VO_U16;

+

+/** VO_WCHAR is a 16 bit unsigned quantity that is 16 bit word aligned */

+#if defined _WIN32

+typedef unsigned short VO_WCHAR;

+typedef unsigned short* VO_PWCHAR;

+#elif defined LINUX

+typedef unsigned char VO_WCHAR;

+typedef unsigned char* VO_PWCHAR;

+#endif

+

+/** VO_S16 is a 16 bit signed quantity that is 16 bit word aligned */

+typedef signed short VO_S16;

+

+/** VO_U32 is a 32 bit unsigned quantity that is 32 bit word aligned */

+typedef unsigned long VO_U32;

+

+/** VO_S32 is a 32 bit signed quantity that is 32 bit word aligned */

+typedef signed long VO_S32;

+

+/* Users with compilers that cannot accept the "long long" designation should

+   define the VO_SKIP64BIT macro.  It should be noted that this may cause

+   some components to fail to compile if the component was written to require

+   64 bit integral types.  However, these components would NOT compile anyway

+   since the compiler does not support the way the component was written.

+*/

+#ifndef VO_SKIP64BIT

+#ifdef _WIN32

+/** VO_U64 is a 64 bit unsigned quantity that is 64 bit word aligned */

+typedef unsigned __int64  VO_U64;

+/** VO_S64 is a 64 bit signed quantity that is 64 bit word aligned */

+typedef signed   __int64  VO_S64;

+#else // WIN32

+/** VO_U64 is a 64 bit unsigned quantity that is 64 bit word aligned */

+typedef unsigned long long VO_U64;

+/** VO_S64 is a 64 bit signed quantity that is 64 bit word aligned */

+typedef signed long long VO_S64;

+#endif // WIN32

+#endif // VO_SKIP64BIT

+

+/** The VO_BOOL type is intended to be used to represent a true or a false

+    value when passing parameters to and from the VO core and components.  The

+    VO_BOOL is a 32 bit quantity and is aligned on a 32 bit word boundary.

+ */

+typedef enum VO_BOOL {

+    VO_FALSE = 0,

+    VO_TRUE = !VO_FALSE,

+	VO_BOOL_MAX = VO_MAX_ENUM_VALUE

+} VO_BOOL;

+

+/** The VO_PTR type is intended to be used to pass pointers between the VO

+    applications and the VO Core and components.  This is a 32 bit pointer and

+    is aligned on a 32 bit boundary.

+ */

+typedef void* VO_PTR;

+

+/** The VO_HANDLE type is intended to be used to pass pointers between the VO

+    applications and the VO Core and components.  This is a 32 bit pointer and

+    is aligned on a 32 bit boundary.

+ */

+typedef void* VO_HANDLE;

+

+/** The VO_STRING type is intended to be used to pass "C" type strings between

+    the application and the core and component.  The VO_STRING type is a 32

+    bit pointer to a zero terminated string.  The  pointer is word aligned and

+    the string is byte aligned.

+ */

+typedef char* VO_PCHAR;

+

+/** The VO_PBYTE type is intended to be used to pass arrays of bytes such as

+    buffers between the application and the component and core.  The VO_PBYTE

+    type is a 32 bit pointer to a zero terminated string.  The  pointer is word

+    aligned and the string is byte aligned.

+ */

+typedef unsigned char* VO_PBYTE;

+

+/** The VO_PTCHAR type is intended to be used to pass arrays of wchar such as

+    unicode char between the application and the component and core.  The VO_PTCHAR

+    type is a 32 bit pointer to a zero terminated string.  The  pointer is word

+    aligned and the string is byte aligned.

+ */

+/*

+#if !defined LINUX

+typedef unsigned short* VO_PTCHAR;

+typedef unsigned short* VO_TCHAR;

+#else

+typedef char* VO_PTCHAR;

+typedef char VO_TCHAR;

+#endif

+*/

+

+#ifndef NULL

+#ifdef __cplusplus

+#define NULL    0

+#else

+#define NULL    ((void *)0)

+#endif

+#endif

+

+/**

+ * Input stream format, Frame or Stream..

+ */

+typedef enum {

+    VO_INPUT_FRAME	= 1,	/*!< Input contains completely frame(s) data. */

+    VO_INPUT_STREAM,		/*!< Input is stream data. */

+	VO_INPUT_STREAM_MAX = VO_MAX_ENUM_VALUE

+} VO_INPUT_TYPE;

+

+

+/**

+ * General data buffer, used as input or output.

+ */

+typedef struct {

+	VO_PBYTE	Buffer;		/*!< Buffer pointer */

+	VO_U32		Length;		/*!< Buffer size in byte */

+	VO_S64		Time;		/*!< The time of the buffer */

+} VO_CODECBUFFER;

+

+

+/**

+ * The init memdata flag.

+ */

+typedef enum{

+	VO_IMF_USERMEMOPERATOR		=0,	/*!< memData is  the pointer of memoperator function*/

+	VO_IMF_PREALLOCATEDBUFFER	=1,	/*!< memData is  preallocated memory*/

+	VO_IMF_MAX = VO_MAX_ENUM_VALUE

+}VO_INIT_MEM_FlAG;

+

+

+/**

+ * The init memory structure..

+ */

+typedef struct{

+	VO_INIT_MEM_FlAG			memflag;	/*!<memory flag  */

+	VO_PTR						memData;	/*!<a pointer to VO_MEM_OPERATOR or a preallocated buffer  */

+	VO_U32						reserved1;	/*!<reserved  */

+	VO_U32						reserved2;	/*!<reserved */

+}VO_CODEC_INIT_USERDATA;

+

+

+#ifdef __cplusplus

+}

+#endif /* __cplusplus */

+

+#endif // __voType_H__

diff --git a/media/libstagefright/codecs/m4v_h263/enc/Android.mk b/media/libstagefright/codecs/m4v_h263/enc/Android.mk
new file mode 100644
index 0000000..f2c9320
--- /dev/null
+++ b/media/libstagefright/codecs/m4v_h263/enc/Android.mk
@@ -0,0 +1,37 @@
+LOCAL_PATH := $(call my-dir)
+include $(CLEAR_VARS)
+
+LOCAL_SRC_FILES := \
+    M4vH263Encoder.cpp \
+    src/bitstream_io.cpp \
+    src/combined_encode.cpp \
+    src/datapart_encode.cpp \
+    src/dct.cpp \
+    src/findhalfpel.cpp \
+    src/fastcodemb.cpp \
+    src/fastidct.cpp \
+    src/fastquant.cpp \
+    src/me_utils.cpp \
+    src/mp4enc_api.cpp \
+    src/rate_control.cpp \
+    src/motion_est.cpp \
+    src/motion_comp.cpp \
+    src/sad.cpp \
+    src/sad_halfpel.cpp \
+    src/vlc_encode.cpp \
+    src/vop.cpp
+
+
+LOCAL_MODULE := libstagefright_m4vh263enc
+
+LOCAL_CFLAGS := \
+    -DBX_RC \
+    -DOSCL_IMPORT_REF= -DOSCL_UNUSED_ARG= -DOSCL_EXPORT_REF=
+
+LOCAL_C_INCLUDES := \
+    $(LOCAL_PATH)/src \
+    $(LOCAL_PATH)/include \
+    $(TOP)/external/opencore/extern_libs_v2/khronos/openmax/include \
+    $(TOP)/frameworks/base/media/libstagefright/include
+
+include $(BUILD_STATIC_LIBRARY)
diff --git a/media/libstagefright/codecs/m4v_h263/enc/M4vH263Encoder.cpp b/media/libstagefright/codecs/m4v_h263/enc/M4vH263Encoder.cpp
new file mode 100644
index 0000000..e375250
--- /dev/null
+++ b/media/libstagefright/codecs/m4v_h263/enc/M4vH263Encoder.cpp
@@ -0,0 +1,359 @@
+/*
+ * Copyright (C) 2010 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+//#define LOG_NDEBUG 0
+#define LOG_TAG "M4vH263Encoder"
+#include <utils/Log.h>
+
+#include "M4vH263Encoder.h"
+
+#include "mp4enc_api.h"
+#include "OMX_Video.h"
+
+#include <media/stagefright/MediaBufferGroup.h>
+#include <media/stagefright/MediaDebug.h>
+#include <media/stagefright/MediaDefs.h>
+#include <media/stagefright/MediaErrors.h>
+#include <media/stagefright/MetaData.h>
+#include <media/stagefright/Utils.h>
+
+namespace android {
+
+inline static void ConvertYUV420SemiPlanarToYUV420Planar(
+        uint8_t *inyuv, uint8_t* outyuv,
+        int32_t width, int32_t height) {
+
+    int32_t outYsize = width * height;
+    uint32_t *outy = (uint32_t *)  outyuv;
+    uint16_t *outcb = (uint16_t *) (outyuv + outYsize);
+    uint16_t *outcr = (uint16_t *) (outyuv + outYsize + (outYsize >> 2));
+
+    /* Y copying */
+    memcpy(outy, inyuv, outYsize);
+
+    /* U & V copying */
+    uint32_t *inyuv_4 = (uint32_t *) (inyuv + outYsize);
+    for (int32_t i = height >> 1; i > 0; --i) {
+        for (int32_t j = width >> 2; j > 0; --j) {
+            uint32_t temp = *inyuv_4++;
+            uint32_t tempU = temp & 0xFF;
+            tempU = tempU | ((temp >> 8) & 0xFF00);
+
+            uint32_t tempV = (temp >> 8) & 0xFF;
+            tempV = tempV | ((temp >> 16) & 0xFF00);
+
+            // Flip U and V
+            *outcb++ = tempV;
+            *outcr++ = tempU;
+        }
+    }
+}
+
+M4vH263Encoder::M4vH263Encoder(
+        const sp<MediaSource>& source,
+        const sp<MetaData>& meta)
+    : mSource(source),
+      mMeta(meta),
+      mNumInputFrames(-1),
+      mNextModTimeUs(0),
+      mStarted(false),
+      mInputBuffer(NULL),
+      mInputFrameData(NULL),
+      mGroup(NULL) {
+
+    LOGV("Construct software M4vH263Encoder");
+
+    mHandle = new tagvideoEncControls;
+    memset(mHandle, 0, sizeof(tagvideoEncControls));
+
+    mInitCheck = initCheck(meta);
+}
+
+M4vH263Encoder::~M4vH263Encoder() {
+    LOGV("Destruct software M4vH263Encoder");
+    if (mStarted) {
+        stop();
+    }
+
+    delete mEncParams;
+    delete mHandle;
+}
+
+status_t M4vH263Encoder::initCheck(const sp<MetaData>& meta) {
+    LOGV("initCheck");
+    CHECK(meta->findInt32(kKeyWidth, &mVideoWidth));
+    CHECK(meta->findInt32(kKeyHeight, &mVideoHeight));
+    CHECK(meta->findInt32(kKeySampleRate, &mVideoFrameRate));
+    CHECK(meta->findInt32(kKeyBitRate, &mVideoBitRate));
+
+    // XXX: Add more color format support
+    CHECK(meta->findInt32(kKeyColorFormat, &mVideoColorFormat));
+    if (mVideoColorFormat != OMX_COLOR_FormatYUV420Planar) {
+        if (mVideoColorFormat != OMX_COLOR_FormatYUV420SemiPlanar) {
+            LOGE("Color format %d is not supported", mVideoColorFormat);
+            return BAD_VALUE;
+        }
+        // Allocate spare buffer only when color conversion is needed.
+        // Assume the color format is OMX_COLOR_FormatYUV420SemiPlanar.
+        mInputFrameData =
+            (uint8_t *) malloc((mVideoWidth * mVideoHeight * 3 ) >> 1);
+        CHECK(mInputFrameData);
+    }
+
+    // XXX: Remove this restriction
+    if (mVideoWidth % 16 != 0 || mVideoHeight % 16 != 0) {
+        LOGE("Video frame size %dx%d must be a multiple of 16",
+            mVideoWidth, mVideoHeight);
+        return BAD_VALUE;
+    }
+
+    mEncParams = new tagvideoEncOptions;
+    memset(mEncParams, 0, sizeof(tagvideoEncOptions));
+    if (!PVGetDefaultEncOption(mEncParams, 0)) {
+        LOGE("Failed to get default encoding parameters");
+        return BAD_VALUE;
+    }
+
+    // Need to know which role the encoder is in.
+    // XXX: Set the mode proper for other types of applications
+    //      like streaming or video conference
+    const char *mime;
+    CHECK(meta->findCString(kKeyMIMEType, &mime));
+    CHECK(!strcmp(mime, MEDIA_MIMETYPE_VIDEO_MPEG4) ||
+          !strcmp(mime, MEDIA_MIMETYPE_VIDEO_H263));
+    if (!strcmp(mime, MEDIA_MIMETYPE_VIDEO_MPEG4)) {
+        mEncParams->encMode = COMBINE_MODE_WITH_ERR_RES;
+    } else {
+        mEncParams->encMode = H263_MODE;
+    }
+    mEncParams->encWidth[0] = mVideoWidth;
+    mEncParams->encHeight[0] = mVideoHeight;
+    mEncParams->encFrameRate[0] = mVideoFrameRate;
+    mEncParams->rcType = VBR_1;
+    mEncParams->vbvDelay = (float)5.0;
+
+    // Set profile and level
+    // If profile and level setting is not correct, failure
+    // is reported when the encoder is initialized.
+    mEncParams->profile_level = CORE_PROFILE_LEVEL2;
+    int32_t profileLevel;
+    if (meta->findInt32(kKeyVideoLevel, &profileLevel)) {
+        mEncParams->profile_level = (ProfileLevelType)profileLevel;
+    }
+
+    mEncParams->packetSize = 32;
+    mEncParams->rvlcEnable = PV_OFF;
+    mEncParams->numLayers = 1;
+    mEncParams->timeIncRes = 1000;
+    mEncParams->tickPerSrc = mEncParams->timeIncRes / mVideoFrameRate;
+
+    mEncParams->bitRate[0] = mVideoBitRate;
+    mEncParams->iQuant[0] = 15;
+    mEncParams->pQuant[0] = 12;
+    mEncParams->quantType[0] = 0;
+    mEncParams->noFrameSkipped = PV_OFF;
+
+    // Set IDR frame refresh interval
+    int32_t iFramesIntervalSec;
+    CHECK(meta->findInt32(kKeyIFramesInterval, &iFramesIntervalSec));
+    if (iFramesIntervalSec < 0) {
+        mEncParams->intraPeriod = -1;
+    } else if (iFramesIntervalSec == 0) {
+        mEncParams->intraPeriod = 1;  // All I frames
+    } else {
+        mEncParams->intraPeriod =
+            (iFramesIntervalSec * mVideoFrameRate);
+    }
+
+    mEncParams->numIntraMB = 0;
+    mEncParams->sceneDetect = PV_ON;
+    mEncParams->searchRange = 16;
+    mEncParams->mv8x8Enable = PV_OFF;
+    mEncParams->gobHeaderInterval = 0;
+    mEncParams->useACPred = PV_ON;
+    mEncParams->intraDCVlcTh = 0;
+
+    mFormat = new MetaData;
+    mFormat->setInt32(kKeyWidth, mVideoWidth);
+    mFormat->setInt32(kKeyHeight, mVideoHeight);
+    mFormat->setInt32(kKeyBitRate, mVideoBitRate);
+    mFormat->setInt32(kKeySampleRate, mVideoFrameRate);
+    mFormat->setInt32(kKeyColorFormat, mVideoColorFormat);
+
+    mFormat->setCString(kKeyMIMEType, mime);
+    mFormat->setCString(kKeyDecoderComponent, "M4vH263Encoder");
+    return OK;
+}
+
+status_t M4vH263Encoder::start(MetaData *params) {
+    LOGV("start");
+    if (mInitCheck != OK) {
+        return mInitCheck;
+    }
+
+    if (mStarted) {
+        LOGW("Call start() when encoder already started");
+        return OK;
+    }
+
+    if (!PVInitVideoEncoder(mHandle, mEncParams)) {
+        LOGE("Failed to initialize the encoder");
+        return UNKNOWN_ERROR;
+    }
+
+    mGroup = new MediaBufferGroup();
+    int32_t maxSize;
+    if (!PVGetMaxVideoFrameSize(mHandle, &maxSize)) {
+        maxSize = 256 * 1024;  // Magic #
+    }
+    LOGV("Max output buffer size: %d", maxSize);
+    mGroup->add_buffer(new MediaBuffer(maxSize));
+
+    mSource->start(params);
+    mNumInputFrames = -1;  // 1st frame contains codec specific data
+    mStarted = true;
+
+    return OK;
+}
+
+status_t M4vH263Encoder::stop() {
+    LOGV("stop");
+    if (!mStarted) {
+        LOGW("Call stop() when encoder has not started");
+        return OK;
+    }
+
+    if (mInputBuffer) {
+        mInputBuffer->release();
+        mInputBuffer = NULL;
+    }
+
+    if (mGroup) {
+        delete mGroup;
+        mGroup = NULL;
+    }
+
+    if (mInputFrameData) {
+        delete mInputFrameData;
+        mInputFrameData = NULL;
+    }
+
+    CHECK(PVCleanUpVideoEncoder(mHandle));
+
+    mSource->stop();
+    mStarted = false;
+
+    return OK;
+}
+
+sp<MetaData> M4vH263Encoder::getFormat() {
+    LOGV("getFormat");
+    return mFormat;
+}
+
+status_t M4vH263Encoder::read(
+        MediaBuffer **out, const ReadOptions *options) {
+
+    CHECK(!options);
+    *out = NULL;
+
+    MediaBuffer *outputBuffer;
+    CHECK_EQ(OK, mGroup->acquire_buffer(&outputBuffer));
+    uint8_t *outPtr = (uint8_t *) outputBuffer->data();
+    int32_t dataLength = outputBuffer->size();
+
+    // Output codec specific data
+    if (mNumInputFrames < 0) {
+        if (!PVGetVolHeader(mHandle, outPtr, &dataLength, 0)) {
+            LOGE("Failed to get VOL header");
+            return UNKNOWN_ERROR;
+        }
+        LOGV("Output VOL header: %d bytes", dataLength);
+        outputBuffer->meta_data()->setInt32(kKeyIsCodecConfig, 1);
+        outputBuffer->set_range(0, dataLength);
+        *out = outputBuffer;
+        ++mNumInputFrames;
+        return OK;
+    }
+
+    // Ready for accepting an input video frame
+    if (OK != mSource->read(&mInputBuffer, options)) {
+        LOGE("Failed to read from data source");
+        outputBuffer->release();
+        return UNKNOWN_ERROR;
+    }
+    int64_t timeUs;
+    CHECK(mInputBuffer->meta_data()->findInt64(kKeyTime, &timeUs));
+    if (mNextModTimeUs > timeUs) {
+        LOGV("mNextModTimeUs %lld > timeUs %lld", mNextModTimeUs, timeUs);
+        outputBuffer->set_range(0, 0);
+        *out = outputBuffer;
+        mInputBuffer->release();
+        mInputBuffer = NULL;
+        return OK;
+    }
+
+    // Color convert to OMX_COLOR_FormatYUV420Planar if necessary
+    outputBuffer->meta_data()->setInt64(kKeyTime, timeUs);
+    uint8_t *inPtr = (uint8_t *) mInputBuffer->data();
+    if (mVideoColorFormat != OMX_COLOR_FormatYUV420Planar) {
+        CHECK(mInputFrameData);
+        CHECK(mVideoColorFormat == OMX_COLOR_FormatYUV420SemiPlanar);
+        ConvertYUV420SemiPlanarToYUV420Planar(
+            inPtr, mInputFrameData, mVideoWidth, mVideoHeight);
+        inPtr = mInputFrameData;
+    }
+    CHECK(inPtr != NULL);
+
+    // Ready for encoding a video frame
+    VideoEncFrameIO vin, vout;
+    vin.height = ((mVideoHeight + 15) >> 4) << 4;
+    vin.pitch  = ((mVideoWidth  + 15) >> 4) << 4;
+    vin.timestamp = (timeUs + 500) / 1000; // in ms
+    vin.yChan = inPtr;
+    vin.uChan = vin.yChan + vin.height * vin.pitch;
+    vin.vChan = vin.uChan + ((vin.height * vin.pitch) >> 2);
+    unsigned long modTimeMs = 0;
+    int32_t nLayer = 0;
+    MP4HintTrack hintTrack;
+    if (!PVEncodeVideoFrame(mHandle, &vin, &vout,
+            &modTimeMs, outPtr, &dataLength, &nLayer) ||
+        !PVGetHintTrack(mHandle, &hintTrack)) {
+        LOGE("Failed to encode frame or get hink track at frame %lld",
+            mNumInputFrames);
+        outputBuffer->release();
+        mInputBuffer->release();
+        mInputBuffer = NULL;
+        return UNKNOWN_ERROR;
+    }
+    CHECK_EQ(NULL, PVGetOverrunBuffer(mHandle));
+    if (hintTrack.CodeType == 0) {  // I-frame serves as sync frame
+        outputBuffer->meta_data()->setInt32(kKeyIsSyncFrame, 1);
+    }
+
+    ++mNumInputFrames;
+    mNextModTimeUs = modTimeMs * 1000LL;
+    outputBuffer->set_range(0, dataLength);
+    *out = outputBuffer;
+    mInputBuffer->release();
+    mInputBuffer = NULL;
+    return OK;
+}
+
+void M4vH263Encoder::signalBufferReturned(MediaBuffer *buffer) {
+}
+
+}  // namespace android
diff --git a/media/libstagefright/codecs/m4v_h263/enc/include/cvei.h b/media/libstagefright/codecs/m4v_h263/enc/include/cvei.h
new file mode 100644
index 0000000..18e54dc
--- /dev/null
+++ b/media/libstagefright/codecs/m4v_h263/enc/include/cvei.h
@@ -0,0 +1,437 @@
+/* ------------------------------------------------------------------
+ * Copyright (C) 1998-2009 PacketVideo
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
+ * express or implied.
+ * See the License for the specific language governing permissions
+ * and limitations under the License.
+ * -------------------------------------------------------------------
+ */
+/*********************************************************************************/
+/*  File: cvei.h                                                                */
+/*  Purpose:                                                                    */
+/*  Date:                                                                       */
+/*  Revision History:                                                           */
+/** @introduction   Common Video Encoder Interface (CVEI) is intended to be used by
+    application developers who want to create a multimedia application with video
+    encoding feature. CVEI is designed such that new video encoder algorithms or
+    modules can be plugged in seamlessly without user interaction. In other words,
+    any changes to the CVEI library are transparent to the users. Users can still
+    use the same set of APIs for new encoding tools.
+
+    @requirement    CVEI will take an input frame in one of several format supported
+    by PV and encode it to an MPEG4 bitstream. It will also return a reconstructed
+    image in YUV 4:2:0 format. Currently the input format supported are YUV 4:2:0,
+    RGB24 and UYVY 4:2:2.
+
+    CVEI is designed such that it is simple to use. It should hides implementation
+    dependency  from the users. In this version, we decided that the operation will
+    be synchronous, i.e., the encoding will be a blocked call. Asynchronous operation
+    will be in the level above CVEI, i.e., in Author Engine Video Module which will
+    take care of capturing device as well.
+
+    @brief  The following classes are used to interface with codecs. Their names
+    are CPVxxxVideoEncoder where xxx is codec specific such as MPEG4, H263, H26L,
+    etc. All of them are subclasses of CPVCommonVideoEncoder.
+*/
+/*********************************************************************************/
+
+#ifndef __CVEI_H
+#define __CVEI_H
+
+#include "oscl_scheduler_ao.h"
+#include "oscl_base.h"
+#include "mp4enc_api.h" /* for MP4HintTrack */
+
+#define MAX_LAYER 2
+
+/** General returned values. */
+enum TCVEI_RETVAL
+{
+    ECVEI_SUCCESS,
+    ECVEI_FAIL,
+    ECVEI_FLUSH,
+    ECVEI_MORE_OUTPUT
+} ;
+
+/** Returned events with the callback function. */
+enum TCVEI_EVENT
+{
+    /** Called when a packet or a frame of output bitstream is ready. */
+    ECVEI_BUFFER_READY,
+
+    /** Called when the last packet of a frame of output bitstream is ready. */
+    ECVEI_FRAME_DONE,
+
+    /** Called when no buffers is available for output bitstream. A buffer can be added thru AddBuffer API. */
+    ECVEI_NO_BUFFERS,
+
+    /** Called when there is an error with the encoding operation. */
+    ECVEI_ERROR
+};
+
+/** Contains supported input format */
+enum TPVVideoFormat
+{
+    ECVEI_RGB24,
+    ECVEI_RGB12,
+    ECVEI_YUV420,
+    ECVEI_UYVY,
+    ECVEI_YUV420SEMIPLANAR
+};
+
+/** Type of contents for optimal encoding mode. */
+enum TPVContentType
+{
+    /** Content is to be streamed in real-time. */
+    ECVEI_STREAMING,
+
+    /** Content is to be downloaded and playbacked later.*/
+    ECVEI_DOWNLOAD,
+
+    /** Content is to be 3gpp baseline compliant. */
+    ECVEI_H263
+};
+
+/** Rate control type. */
+enum TMP4RateControlType
+{
+    /** Constant quality, variable bit rate, fixed quantization level. */
+    ECONSTANT_Q,
+
+    /** Short-term constant bit rate control. */
+    ECBR_1,
+
+    /** Long-term constant bit rate control. */
+    EVBR_1
+};
+
+/** Targeted profile and level to encode. */
+enum TPVM4VProfileLevel
+{
+    /* Non-scalable profile */
+    ECVEI_SIMPLE_LEVEL0 = 0,
+    ECVEI_SIMPLE_LEVEL1,
+    ECVEI_SIMPLE_LEVEL2,
+    ECVEI_SIMPLE_LEVEL3,
+    ECVEI_CORE_LEVEL1,
+    ECVEI_CORE_LEVEL2,
+
+    /* Scalable profile */
+    ECVEI_SIMPLE_SCALABLE_LEVEL0 = 6,
+    ECVEI_SIMPLE_SCALABLE_LEVEL1,
+    ECVEI_SIMPLE_SCALABLE_LEVEL2,
+
+    ECVEI_CORE_SCALABLE_LEVEL1 = 10,
+    ECVEI_CORE_SCALABLE_LEVEL2,
+    ECVEI_CORE_SCALABLE_LEVEL3
+};
+
+/** This structure contains encoder settings. */
+struct TPVVideoEncodeParam
+{
+    /** Specifies an  ID that will be used to specify this encoder while returning
+    the bitstream in asynchronous mode. */
+    uint32              iEncodeID;
+
+    /** Specifies whether base only (iNumLayer = 1) or base + enhancement layer
+    (iNumLayer =2 ) is to be used. */
+    int32               iNumLayer;
+
+    /** Specifies the width in pixels of the encoded frames. IFrameWidth[0] is for
+    base layer and iFrameWidth[1] is for enhanced layer. */
+    int                 iFrameWidth[MAX_LAYER];
+
+    /** Specifies the height in pixels of the encoded frames. IFrameHeight[0] is for
+    base layer and iFrameHeight[1] is for enhanced layer. */
+    int                 iFrameHeight[MAX_LAYER];
+
+    /** Specifies the cumulative bit rate in bit per second. IBitRate[0] is for base
+    layer and iBitRate[1] is for base+enhanced layer.*/
+    int                 iBitRate[MAX_LAYER];
+
+    /** Specifies the cumulative frame rate in frame per second. IFrameRate[0] is for
+    base layer and iFrameRate[1] is for base+enhanced layer. */
+    float               iFrameRate[MAX_LAYER];
+
+    /** Specifies the picture quality factor on the scale of 1 to 10. It trades off
+    the picture quality with the frame rate. Higher frame quality means lower frame rate.
+    Lower frame quality for higher frame rate.*/
+    int32               iFrameQuality;
+
+    /** Enable the use of iFrameQuality to determine the frame rate. If it is false,
+    the encoder will try to meet the specified frame rate regardless of the frame quality.*/
+    bool                iEnableFrameQuality;
+
+    /** Specifies the maximum number of P-frames between 2 INTRA frames. An INTRA mode is
+    forced to a frame once this interval is reached. When there is only one I-frame is present
+    at the beginning of the clip, iIFrameInterval should be set to -1. */
+    int32               iIFrameInterval;
+
+    /** According to iIFrameInterval setting, the minimum number of intra MB per frame is
+    optimally calculated for error resiliency. However, when iIFrameInterval is set to -1,
+    iNumIntraMBRefresh must be specified to guarantee the minimum number of intra
+    macroblocks per frame.*/
+    uint32              iNumIntraMBRefresh;
+
+    /** Specifies the VBV buffer size which determines the end-to-end delay between the
+    encoder and the decoder.  The size is in unit of seconds. For download application,
+    the buffer size can be larger than the streaming application. For 2-way application,
+    this buffer shall be kept minimal. For a special case, in VBR mode, iBufferDelay will
+    be set to -1 to allow buffer underflow. */
+    float               iBufferDelay;
+
+    /** Specifies the type of the access whether it is streaming, CVEI_STREAMING
+    (data partitioning mode) or download, CVEI_DOWNLOAD (combined mode).*/
+    TPVContentType      iContentType;
+
+    /** Specifies the rate control algorithm among one of the following constant Q,
+    CBR and VBR.  The structure TMP4RateControlType is defined below.*/
+    TMP4RateControlType iRateControlType;
+
+    /** Specifies high quality but also high complexity mode for rate control. */
+    bool                iRDOptimal;
+
+    /** Specifies the initial quantization parameter for the first I-frame. If constant Q
+    rate control is used, this QP will be used for all the I-frames. This number must be
+    set between 1 and 31, otherwise, Initialize() will fail. */
+    int                 iIquant[2];
+
+    /** Specifies the initial quantization parameter for the first P-frame. If constant Q
+    rate control is used, this QP will be used for all the P-frames. This number must be
+    set between 1 and 31, otherwise, Initialize() will fail. */
+    int                 iPquant[2];
+
+    /** Specifies the initial quantization parameter for the first B-frame. If constant Q
+    rate control is used, this QP will be used for all the B-frames. This number must be
+    set between 1 and 31, otherwise, Initialize() will fail. */
+    int                 iBquant[2];
+
+    /** Specifies the search range in pixel unit for motion vector. The range of the
+    motion vector will be of dimension [-iSearchRange.5, +iSearchRange.0]. */
+    int32               iSearchRange;
+
+    /** Specifies the use of 8x8 motion vectors. */
+    bool                iMV8x8;
+
+    /** Specifies the use of half-pel motion vectors. */
+    bool                iMVHalfPel;
+
+    /** Specifies automatic scene detection where I-frame will be used the the first frame
+    in a new scene. */
+    bool                iSceneDetection;
+
+    /** Specifies the packet size in bytes which represents the number of bytes between two resync markers.
+    For ECVEI_DOWNLOAD and ECVEI_H263, if iPacketSize is set to 0, there will be no resync markers in the bitstream.
+    For ECVEI_STREAMING is parameter must be set to a value greater than 0.*/
+    uint32              iPacketSize;
+
+    /** Specifies whether the current frame skipping decision is allowed after encoding
+    the current frame. If there is no memory of what has been coded for the current frame,
+    iNoCurrentSkip has to be on. */
+    bool                iNoCurrentSkip;
+
+    /** Specifies that no frame skipping is allowed. Frame skipping is a tool used to
+    control the average number of bits spent to meet the target bit rate. */
+    bool                iNoFrameSkip;
+
+    /** Specifies the duration of the clip in millisecond.*/
+    int32               iClipDuration;
+
+    /** Specifies the profile and level used to encode the bitstream. When present,
+    other settings will be checked against the range allowable by this target profile
+    and level. Fail may be returned from the Initialize call. */
+    TPVM4VProfileLevel  iProfileLevel;
+
+    /** Specifies FSI Buffer input */
+    uint8*              iFSIBuff;
+
+    /** Specifies FSI Buffer Length */
+    int             iFSIBuffLength;
+
+
+};
+
+
+/** Structure for input format information */
+struct TPVVideoInputFormat
+{
+    /** Contains the width in pixels of the input frame. */
+    int32           iFrameWidth;
+
+    /** Contains the height in pixels of the input frame. */
+    int32           iFrameHeight;
+
+    /** Contains the input frame rate in the unit of frame per second. */
+    float           iFrameRate;
+
+    /** Contains Frame Orientation. Used for RGB input. 1 means Bottom_UP RGB, 0 means Top_Down RGB, -1 for video formats other than RGB*/
+    int             iFrameOrientation;
+
+    /** Contains the format of the input video, e.g., YUV 4:2:0, UYVY, RGB24, etc. */
+    TPVVideoFormat  iVideoFormat;
+};
+
+
+/** Contains the input data information */
+struct TPVVideoInputData
+{
+    /** Pointer to an input frame buffer in input source format.*/
+    uint8       *iSource;
+
+    /** The corresponding time stamp of the input frame. */
+    uint32      iTimeStamp;
+};
+
+/** Contains the output data information */
+struct TPVVideoOutputData
+{
+    /** Pointer to the reconstructed frame buffer in YUV 4:2:0 domain. */
+    uint8           *iFrame;
+
+    /** The number of layer encoded, 0 for base, 1 for enhanced. */
+    int32           iLayerNumber;
+
+    /** Pointer to the encoded bitstream buffer. */
+    uint8           *iBitStream;
+
+    /** The size in bytes of iBStream. */
+    int32           iBitStreamSize;
+
+    /** The time stamp of the encoded frame according to the bitstream. */
+    uint32          iVideoTimeStamp;
+
+    /** The time stamp of the encoded frame as given before the encoding. */
+    uint32          iExternalTimeStamp;
+
+    /** The hint track information. */
+    MP4HintTrack    iHintTrack;
+};
+
+/** An observer class for callbacks to report the status of the CVEI */
+class MPVCVEIObserver
+{
+    public:
+        /** The callback funtion with aEvent being one of TCVEIEvent enumeration. */
+        virtual void HandlePVCVEIEvent
+        (uint32 aId, uint32 aEvent, uint32 aParam1 = 0) = 0;
+        virtual ~MPVCVEIObserver() {}
+};
+
+/** This class is the base class for codec specific interface class.
+The users must maintain an instance of the codec specific class throughout
+the encoding session.
+*/
+class CommonVideoEncoder : public OsclTimerObject
+{
+    public:
+        /** Constructor for CVEI class. */
+        CommonVideoEncoder() : OsclTimerObject(OsclActiveObject::EPriorityNominal, "PVEncoder") {};
+
+        /** Initialization function to set the input video format and the
+        encoding parameters. This function returns CVEI_ERROR if there is
+        any errors. Otherwise, the function returns CVEI_SUCCESS.*/
+        virtual  TCVEI_RETVAL Initialize(TPVVideoInputFormat *aVidInFormat, TPVVideoEncodeParam *aEncParam) = 0;
+
+        /** Set the observer for asynchronous encoding mode. */
+        virtual  TCVEI_RETVAL SetObserver(MPVCVEIObserver *aObserver) = 0;
+
+        /** Add a buffer to the queue of output buffers for output bitstream in
+        asynchronous encoding mode. */
+        virtual  TCVEI_RETVAL AddBuffer(TPVVideoOutputData *aVidOut) = 0;
+
+        /** This function sends in an input video data structure containing a source
+        frame and the associated timestamp. The encoded bitstream will be returned by
+        observer callback.
+        The above 3 APIs only replace EncodeFrame() API. Other APIs such as initialization
+        and update parameters remain the same. */
+        virtual  TCVEI_RETVAL Encode(TPVVideoInputData *aVidIn) = 0;
+
+        /** This function returns the maximum VBV buffer size such that the
+            application can allocate a buffer that guarantees to fit one frame.*/
+        virtual  int32 GetBufferSize() = 0;
+
+        /** This function returns the VOL header part (starting from the VOS header)
+        of the encoded bitstream. This function must be called after Initialize.
+        The output is written to the memory (volHeader) allocated by the users.*/
+        virtual  TCVEI_RETVAL GetVolHeader(uint8 *volHeader, int32 *size, int32 layer) = 0;
+
+        /** This function sends in an input video data structure containing a source
+        frame and the associated timestamp. It returns an output video data structure
+        containing coded bit stream, reconstructed frame in YUV 4:2:0 (can be changed
+        to source format) and the timestamp associated with the coded frame.
+        The input timestamp may not correspond to the output timestamp. User can send
+        an input structure in without getting any encoded data back or getting an encoded
+        frame in the past. This function returns ECVEI_ERROR if there is any errors.
+        Otherwise, the function returns ECVEI_SUCCESS.
+        In case of Overrun Buffer usage, it is possible that return value is ECVEI_MORE_OUTPUT
+        which indicates that frame cannot fit in the current buffer*/
+        virtual  TCVEI_RETVAL EncodeFrame(TPVVideoInputData  *aVidIn, TPVVideoOutputData *aVidOut, int *aRemainingBytes
+#ifdef PVAUTHOR_PROFILING
+                                          , void *aParam1 = 0
+#endif
+                                         ) = 0;
+
+        /** Before the termination of the encoding process, the users have to query
+        whether there are any encoded frame pending inside the CVEI. The returned value
+        will indicate whether there are more frames to be flushed (ECVEI_FLUSH).
+        FlushOutput has to be called until there are no more frames, i.e., it returns
+        ECVEI_SUCCESS. This function may be called during the encoding operation if
+        there is no input frame and the application does not want to waste the time
+        waiting for input frame. It can call this function to flush encoded frame
+        out of the memory. */
+        virtual  TCVEI_RETVAL FlushOutput(TPVVideoOutputData *aVidOut) = 0;
+
+        /** This function cleanup the CVEI allocated resources. */
+        virtual  TCVEI_RETVAL Terminate() = 0;
+
+        /**This function dynamically changes the target bit rate of the encoder
+        while encoding. aBitRate[n] is the new accumulate target bit rate of layer n.
+        Successful update is returned with ECVEI_SUCCESS.*/
+        virtual  TCVEI_RETVAL UpdateBitRate(int32 aNumLayer, int32 *aBitRate) = 0;
+
+        /** This function dynamically changes the target frame rate of the encoder
+        while encoding. aFrameRate[n] is the new accumulate target frame rate of
+        layer n. Successful update is returned with ECVEI_SUCCESS. */
+        virtual  TCVEI_RETVAL UpdateFrameRate(int32 aNumLayer, float *aFrameRate) = 0;
+
+        /** This function dynamically changes the I-Vop update interval while
+        encoding to a new value, aIFrameInterval. */
+        virtual  TCVEI_RETVAL UpdateIFrameInterval(int32 aIFrameInterval) = 0;
+
+        /** This function forces an I-Vop mode to the next frame to be encoded. */
+        virtual  TCVEI_RETVAL IFrameRequest() = 0;
+
+        /** This function returns the input width of a specific layer
+        (not necessarily multiple of 16). */
+        virtual  int32 GetEncodeWidth(int32 aLayer) = 0;
+
+        /** This function returns the input height of a specific layer
+        (not necessarily multiple of 16). */
+        virtual  int32 GetEncodeHeight(int32 aLayer) = 0;
+
+        /** This function returns the target encoded frame rate of a specific layer. */
+        virtual  float GetEncodeFrameRate(int32 aLayer) = 0;
+    protected:
+        virtual void Run(void) = 0;
+        virtual void DoCancel(void) = 0;
+        /* internal enum */
+        enum TCVEIState
+        {
+            EIdle,
+            EEncode
+        };
+
+        TCVEIState  iState;
+        uint32      iId;
+};
+
+#endif
diff --git a/media/libstagefright/codecs/m4v_h263/enc/include/mp4enc_api.h b/media/libstagefright/codecs/m4v_h263/enc/include/mp4enc_api.h
new file mode 100644
index 0000000..a54fd8b
--- /dev/null
+++ b/media/libstagefright/codecs/m4v_h263/enc/include/mp4enc_api.h
@@ -0,0 +1,454 @@
+/* ------------------------------------------------------------------
+ * Copyright (C) 1998-2009 PacketVideo
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
+ * express or implied.
+ * See the License for the specific language governing permissions
+ * and limitations under the License.
+ * -------------------------------------------------------------------
+ */
+#ifndef _MP4ENC_API_H_
+#define _MP4ENC_API_H_
+
+#include <string.h>
+
+#ifndef _PV_TYPES_
+#define _PV_TYPES_
+typedef unsigned char UChar;
+typedef char Char;
+typedef unsigned int UInt;
+typedef int Int;
+typedef unsigned short UShort;
+typedef short Short;
+typedef unsigned int Bool;
+typedef unsigned long ULong;
+
+#define PV_CODEC_INIT  0
+#define PV_CODEC_STOP  1
+#endif
+
+#define PV_TRUE  1
+#define PV_FALSE 0
+
+typedef enum
+{
+    SHORT_HEADER,
+    SHORT_HEADER_WITH_ERR_RES,
+    H263_MODE,
+    H263_MODE_WITH_ERR_RES,
+    DATA_PARTITIONING_MODE,
+    COMBINE_MODE_NO_ERR_RES,
+    COMBINE_MODE_WITH_ERR_RES
+
+} MP4EncodingMode;
+
+typedef enum
+{
+    CONSTANT_Q,
+    CBR_1,
+    VBR_1,
+    CBR_2,
+    VBR_2,
+    CBR_LOWDELAY
+} MP4RateControlType;
+
+typedef enum
+{
+    PASS1,
+    PASS2
+} PassNum;
+
+typedef enum
+{
+    PV_OFF,
+    PV_ON
+} ParamEncMode;
+
+
+/* {SPL0, SPL1, SPL2, SPL3, CPL1, CPL2, CPL2, CPL2} , SPL0: Simple Profile@Level0 , CPL1: Core Profile@Level1 */
+/* {SSPL0, SSPL1, SSPL2, SSPL2, CSPL1, CSPL2, CSPL3, CSPL3} , SSPL0: Simple Scalable Profile@Level0, CPL1: Core Scalable Profile@Level1 */
+
+typedef enum
+{
+    /* Non-scalable profile */
+    SIMPLE_PROFILE_LEVEL0 = 0,
+    SIMPLE_PROFILE_LEVEL1,
+    SIMPLE_PROFILE_LEVEL2,
+    SIMPLE_PROFILE_LEVEL3,
+    CORE_PROFILE_LEVEL1,
+    CORE_PROFILE_LEVEL2,
+
+    /* Scalable profile */
+    SIMPLE_SCALABLE_PROFILE_LEVEL0 = 6,
+    SIMPLE_SCALABLE_PROFILE_LEVEL1,
+    SIMPLE_SCALABLE_PROFILE_LEVEL2,
+
+    CORE_SCALABLE_PROFILE_LEVEL1 = 10,
+    CORE_SCALABLE_PROFILE_LEVEL2,
+    CORE_SCALABLE_PROFILE_LEVEL3
+
+} ProfileLevelType;
+
+
+typedef struct tagMP4HintTrack
+{
+    UChar   MTB;
+    UChar   LayerID;
+    UChar   CodeType;
+    UChar   RefSelCode;
+} MP4HintTrack;
+
+typedef struct tagvideoEncControls
+{
+    void            *videoEncoderData;
+    Int             videoEncoderInit;
+} VideoEncControls;
+
+
+typedef struct tagvideoEncFrameIO
+{
+    UChar   *yChan; /* pointer to Y */
+    UChar   *uChan; /* pointer to U */
+    UChar   *vChan; /* pointer to V */
+    Int     height; /* height for Y */
+    Int     pitch;  /* stride  for Y */
+    ULong   timestamp; /* modulo timestamp in millisecond*/
+
+}   VideoEncFrameIO  ;
+
+/**
+@brief  Encoding options structure */
+typedef struct tagvideoEncOptions
+{
+    /** @brief Sets the encoding mode, defined by the above enumaration. If there are conflicts between the encoding mode
+    *   and subsequent encoding options, encoding mode take precedent over encoding options. */
+    MP4EncodingMode     encMode;
+
+    /** @brief Sets the number of bytes per packet, only used in DATA_PARTITIONING_MODE or COMBINE_MODE_WITH_ERR_RES mode.
+    *           The resync marker will be inserted as often as the size of the packet.*/
+    Int                 packetSize;
+
+    /** @brief Selects MPEG-4/H.263 profile and level, if specified other encoding options must conform with it. */
+    ProfileLevelType    profile_level;
+
+    /** @brief Enables reversible variable length code (RVLC) mode. Normally it is set to PV_OFF.*/
+    ParamEncMode        rvlcEnable;
+
+    /** @brief Set the frequency of GOB header interval */
+    Int                 gobHeaderInterval;
+
+    /** @brief Sets the number of bitstream layers: 1 is base only: 2 is base + enhancement */
+    Int                 numLayers;
+
+    /** @brief Sets the number of ticks per second used for timing information encoded in MPEG4 bitstream.*/
+    Int                 timeIncRes;
+
+    /** @brief Sets the number of ticks in time increment resolution between 2 source frames (equivalent to source frame rate). */
+    Int                 tickPerSrc;
+
+    /** @brief Specifies encoded heights in pixels, height[n] represents the n-th layer's height. */
+    Int                 encHeight[2];
+
+    /** @brief Specifies encoded widths in pixels, width[n] represents the n-th layer's width.*/
+    Int                 encWidth[2];
+
+    /** @brief Specifies target frame rates in frames per second, frameRate[n] represents the n-th layer's target frame rate.*/
+    float               encFrameRate[2];
+
+    /** @brief Specifies target bit rates in bits per second unit, bitRate[n] represents the n-th layer's target bit rate. */
+    Int                 bitRate[2];
+
+    /** @brief Specifies default quantization parameters for I-Vop. Iquant[n] represents the n-th layer default quantization parameter. The default is Iquant[0]=12.*/
+    Int                 iQuant[2];
+
+    /** @brief Specifies default quantization parameters for P-Vop. Pquant[n] represents the n-th layer default quantization parameter. The default is Pquant[0]=10.*/
+    Int                 pQuant[2];
+
+    /** @brief  specifies quantization mode (H263 mode or MPEG mode) of the encoded base and enhance layer (if any).
+    *           In Simple and Simple Scalable profile, we use only H263 mode.*/
+    Int                 quantType[2];
+
+    /** @brief Sets rate control algorithm, one of (CONSTANT_Q, CBR_1, or VBR_1).
+    *           CONSTANT_Q uses the default quantization values to encode the sequence.
+    *           CBR_1 (constant bit rate) controls the output at a desired bit rate
+    *           VBR_1 (variable bit rate) gives better picture quality at the expense of bit rate fluctuation
+    *           Note:   type=CONSTANT_Q produces sequences with arbitrary bit rate.
+    *                   type=CBR_1 produces sequences suitable for streaming.
+    *                   type=VBR_1 produces sequences suitable for download. */
+    MP4RateControlType  rcType;
+
+    /** @brief  Sets the VBV buffer size (in the unit of second delay) used to prevent buffer overflow and underflow
+    *           on the decoder side. This function is redundant to PVSetVBVSize. Either one of them is used at a time. */
+    float               vbvDelay;
+
+    /** @brief  Specifies whether frame skipping is permitted or not. When rate control type is set to CONSTANT_Q
+    *           frame skipping is automatically banned.  In CBR_1 and VBR_1 rate control, frame skipping is allowed by default.
+    *           However, users can force no frame skipping with this flag, but buffer constraint may be violated.*/
+    ParamEncMode        noFrameSkipped;
+
+    /** @brief Sets the maximum number of P-frames between two I-frames. I-frame mode is periodically forced
+    *           if no I-frame is encoded after the specified period to add error resiliency and help resynchronize in case of errors.
+    *           If scene change detection can add additional I-frame if new scenes are detected.
+    *           intraPeriod is the I frame interval in terms of second.
+    *           intraPeriod =0 indicates I-frame encoding only;
+    *           intraPeriod = -1  indicates I-frame followed by all P-frames; (default)
+    *           intraPeriod = N, indicates the number of P-frames between 2 I-frames.*/
+    Int                 intraPeriod;
+
+
+    /** @brief  Specifies the number Intra MBs to be refreshed in a P-frame. */
+    Int                 numIntraMB;
+
+    /**
+    *   @brief  Specifies whether the scene change detection (SCD) is enabled or disabled.
+    *           With SCD enable, when a new scene is detected, I-Vop mode will be used for the first frame of
+    *           the new scene resulting in better picture quality. An insertion of an I-VOP resets the intraPeriod
+    *           specified by the IntraPeriodAPI().*/
+    ParamEncMode        sceneDetect;
+
+    /** @brief  Specifies the search range of motion estimation search.  Larger value implies
+    *           larger search range, better motion vector match, but more complexity.
+    *           If searchRange=n, the motion vector search is in the range of [-n,n-1] pixels.
+    *           If half-pel  mode is on, the range is [-n, (n-1)+1/2] pixels. The default value is 16.*/
+    Int                 searchRange;
+
+    /** @brief  Turns on/off 8x8 block motion estimation and compensation.
+    *           If on, four motion vectors may be used for motion estimation and compensation of a macroblock,
+    *           otherwise one motion vector per macroblock is used. When the 8x8 MV is off, the total encoding complexity
+    *           is less but the image quality is also worse. Therefore, it can be used in complexity limited environment.*/
+    ParamEncMode        mv8x8Enable;
+
+
+    /** @brief Set the threshold for using intra DC VLC.
+    *           Value must range from 0-7.*/
+    Int                 intraDCVlcTh;
+
+    /** @brief This flag turns on the use of AC prediction */
+    Bool                useACPred;
+
+} VideoEncOptions;
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
+
+    /* API's */
+    /* Always start with this one !!*/
+    /**
+    *   @brief  Gets default encoding options. This way users only have to set relevant encoding options and leave the one
+    *           they are unsure of.
+    *   @encOption  Pointer to VideoEncOption structure.
+    *   @encUseCase This value determines the set of default encoding options, for example, different encoding options
+    *            are assigned to streaming use-case as compared to download use-case. It can be project dependent too.
+    *   @return true for correct operation; false if error happens
+    */
+    OSCL_IMPORT_REF Bool PVGetDefaultEncOption(VideoEncOptions *encOption, Int encUseCase);
+
+    /**
+    *   @brief  Verifies the consistency of encoding parameters, allocates memory needed and set necessary internal variables.
+    *   @param  encCtrl is video encoder control structure that is always passed as input in all APIs
+    *   @return true for correct operation; false if error happens
+    */
+    OSCL_IMPORT_REF Bool    PVInitVideoEncoder(VideoEncControls *encCtrl, VideoEncOptions *encOption);
+
+    /* acquiring encoder info APIs */
+    /**
+    *   @brief  This function returns VOL header. It has to be called before the frame is encoded.  If so,
+    *           then the VOL Header is passed back to the application. Then all frames that are encoded do not contain the VOL Header.
+    *           If you do not call the API then the VOL Header is passed within the first frame that is encoded.
+    *           The behavior is unknown if it is called after the first frame is encoded. It is mainly used for MP4 file format authoring.
+    *   @param  encCtrl is video encoder control structure that is always passed as input in all APIs.
+    *   @param  volHeader is the Buffer for VOL header.
+    *   @param  size is the size of VOL header in bytes.
+    *   @param  layer is the layer of the requested VOL header.
+    *   @return true for correct operation; false if error happens.
+    */
+    OSCL_IMPORT_REF Bool    PVGetVolHeader(VideoEncControls *encCtrl, UChar *volHeader, Int *size, Int layer);
+
+    /**
+    *   @brief  This function returns the profile and level in H.263 coding when the encoding parameters are set
+    *   @param  encCtrl is video encoder control structure that is always passed as input in all APIs.
+    *   @param  profileID is the pointer of the profile ID. Right now we only support profile 0
+    *   @param  levelID is the pointer of the level ID that could be 10-70.
+    *   @return true for correct operation; false if error happens.
+    */
+    OSCL_IMPORT_REF Bool    PVGetH263ProfileLevelID(VideoEncControls *encCtrl, Int *profileID, Int *levelID);
+
+    /**
+    *   @brief  This function returns the profile and level of MPEG4 when the encoding parameters are set
+    *   @param  encCtrl is video encoder control structure that is always passed as input in all APIs.
+    *   @param  profile_level is the pointer of the profile enumeration
+    *   @param  nLayer is the index of the layer of interest
+    *   @return true for correct operation; false if error happens.
+    */
+    OSCL_IMPORT_REF Bool    PVGetMPEG4ProfileLevelID(VideoEncControls *encCtrl, Int *profile_level, Int nLayer);
+
+    /**
+    *   @brief  This function returns maximum frame size in bytes
+    *   @param  encCtrl is video encoder control structure that is always passed as input in all APIs
+    *   @param  maxVideoFrameSize is the pointer of the maximum frame size
+    *   @return true for correct operation; false if error happens
+    */
+    OSCL_IMPORT_REF Bool    PVGetMaxVideoFrameSize(VideoEncControls *encCtrl, Int *maxVideoFrameSize);
+
+#ifndef LIMITED_API
+    /**
+    *   @brief  This function returns the total amount of memory (in bytes) allocated by the encoder library.
+    *   @param  encCtrl is video encoder control structure that is always passed as input in all APIs
+    *   @return true for correct operation; false if error happens
+    */
+    OSCL_IMPORT_REF Int     PVGetEncMemoryUsage(VideoEncControls *encCtrl);
+
+    /**
+    *   @brief  This function is used by PVAuthor to get the size of the VBV buffer.
+    *   @param  encCtrl is video encoder control structure that is always passed as input in all APIs
+    *   @param  VBVSize is the pointer of The size of the VBV buffer in bytes.
+    *   @return true for correct operation; false if error happens
+    */
+    OSCL_IMPORT_REF Bool    PVGetVBVSize(VideoEncControls *encCtrl, Int *VBVSize);
+#endif
+
+    /**
+    *   @brief  This function encodes a frame in YUV 4:2:0 format from the *video_in input frame and put the result in YUV
+    *           for reconstructed frame and bstream for MPEG4 bitstream. The application is required to allocate memory for
+    *           bitstream buffer.The size of the input bitstream memory and the returned output buffer are specified in the
+    *           size field. The encoded layer is specified by the nLayer field. If the current frame is not encoded, size=0 and nLayer=-1.
+    *           Note: If the allocated buffer size is too small to fit a bitstream of a frame, then those extra bits will be left out
+    *                 which can cause syntactic error at the decoder side.
+    *   @param  encCtrl is video encoder control structure that is always passed as input in all APIs
+    *   @param  vid_in is the pointer to VideoEncFrameIO structure containing the YUV input data
+    *   @param  vid_out is the pointer to VideoEncFrameIO structure containing the reconstructed YUV output data after encoding
+    *   @param  nextModTime is the timestamp encoder expects from the next input
+    *   @param  bstream is the pointer to MPEG4 bitstream buffer
+    *   @param  size is the size of bitstream buffer allocated (input) and size of the encoded bitstream (output).
+    *   @param  nLayer is the layer of the encoded frame either 0 for base or 1 for enhancement layer. The value -1 indicates skipped frame due to buffer overflow.
+    *   @return true newfor correct operation; false if error happens
+    */
+    OSCL_IMPORT_REF Bool    PVEncodeVideoFrame(VideoEncControls *encCtrl, VideoEncFrameIO *vid_in, VideoEncFrameIO *vid_out,
+            ULong *nextModTime, UChar *bstream, Int *size, Int *nLayer);
+
+
+    /**
+    *   @brief  This function is used to query overrun buffer. It is used when PVEncodeVideoFrame.returns size that is
+    *           larger than the input size.
+    *   @param  encCtrl is video encoder control structure that is always passed as input in all APIs
+    *   @return Pointer to the overrun buffer. NULL if overrun buffer is not used.
+    */
+    OSCL_IMPORT_REF UChar* PVGetOverrunBuffer(VideoEncControls *encCtrl);
+
+#ifndef NO_SLICE_ENCODE   /* This set of APIs are not working. This functionality has been partially 
+    replaced by the introduction of overrun buffer. */
+
+    /* slice-based coding */
+    /**
+    *   @brief  This function sets the input YUV frame and timestamp to be encoded by the slice-based encoding function PVEncodeSlice().
+    *           It also return the memory address the reconstructed frame will be copied to (in advance) and the coded layer number.
+    *           The encoder library processes the timestamp and determine if this frame is to be encoded or not. If the current frame
+    *           is not encoded, nLayer=-1. For frame-based motion estimation, the motion estimation of the entire frame is also performed
+    *           in this function. For MB-based motion estimation, the motion vector is searched while coding each MB in PVEncodeSlice().
+    *   @param  encCtrl is video encoder control structure that is always passed as input in all APIs
+    *   @param  vid_in is the pointer to VideoEncFrameIO structure containing the YUV input data
+    *   @param  nextModTime is the timestamp encoder expects from the next input if this input is rejected and nLayer is set to -1.
+    *   @param  nLayer is the layer of the encoded frame either 0 for base or 1 for enhancement layer. The value -1 indicates skipped frame due to buffer overflow.
+    *   @return true newfor correct operation; false if error happens
+    */
+    OSCL_IMPORT_REF Bool    PVEncodeFrameSet(VideoEncControls *encCtrl, VideoEncFrameIO *vid_in, ULong *nextModTime, Int *nLayer);
+    /**
+    *   @brief  This function encodes a GOB (short header mode) or a packet (data partitioning mode or combined mode with resync marker)
+    *           and output the reconstructed frame and MPEG4 bitstream. The application is required to allocate memory for the bitstream buffer.
+    *           The size of the input bitstream memory and the returned output buffer are specified in the size field.  If the buffer size is
+    *           smaller than the requested packet size, user has to call PVEncodeSlice again to get the rest of that pending packet before moving
+    *           on to the next packet. For the combined mode without resync marker, the function returns when the buffer is full.
+    *           The end-of-frame flag  indicates the completion of the frame encoding.  Next frame must be sent in with PVEncodeFrameSet().
+    *           At the end-of-frame, the next video input address and the next video modulo timestamp will be set.
+    *   @param  encCtrl is video encoder control structure that is always passed as input in all APIs
+    *   @param  bstream is the pointer to MPEG4 bitstream buffer.
+    *   @param  size is the size of bitstream buffer allocated (input) and size of the encoded bitstream (output).
+    *   @param  endofFrame is a flag indicating the end-of-frame, '1'. Otherwise, '0'.  When PVSetNoCurrentFrameSkip is OFF,
+    *           end-of-frame '-1' indicates current frame bitstream must be disregarded.
+    *   @param  vid_out is the pointer to VideoEncFrameIO structure containing the reconstructed YUV output data after encoding
+    *   @param  nextModTime is the timestamp encoder expects from the next input
+    *   @return true newfor correct operation; false if error happens
+    */
+    OSCL_IMPORT_REF Bool    PVEncodeSlice(VideoEncControls *encCtrl, UChar *bstream, Int *size,
+                                          Int *endofFrame, VideoEncFrameIO *vid_out, ULong *nextModTime);
+#endif
+
+    /**
+    *   @brief  This function returns MP4 file format hint track information.
+    *   @param  encCtrl is video encoder control structure that is always passed as input in all APIs
+    *   @param  info is the structure for MP4 hint track information
+    *   @return true for correct operation; false if error happens
+    */
+    OSCL_IMPORT_REF Bool    PVGetHintTrack(VideoEncControls *encCtrl, MP4HintTrack *info);
+
+#ifndef LIMITED_API
+    /**
+    *   @brief  updates target frame rates of the encoded base and enhance layer (if any) while encoding operation is ongoing.
+    *   @param  encCtrl is video encoder control structure that is always passed as input in all APIs
+    *   @param  frameRate is the pointers to array of target frame rates in frames per second,
+    *           frameRate[n] represents the n-th layer's target frame rate.
+    *   @return true for correct operation; false if error happens
+    */
+    OSCL_IMPORT_REF Bool    PVUpdateEncFrameRate(VideoEncControls *encCtrl, float *frameRate); /* for 2-way */
+
+
+    /**
+    *   @brief  updates target bit rates of the encoded base and enhance layer (if any) while encoding operation is ongoing.
+    *   @param  encCtrl is video encoder control structure that is always passed as input in all APIs
+    *   @param  bitRate is the pointers to array of target bit rates in bits per second unit,
+    *           bitRate[n] represents the n-th layer's target bit rate.
+    *   @return true for correct operation; false if error happens
+    */
+    OSCL_IMPORT_REF Bool    PVUpdateBitRate(VideoEncControls *encCtrl, Int *bitRate);           /* for 2-way */
+
+
+    /**
+    *   @brief  updates the INTRA frame refresh interval while encoding operation is ongoing.
+    *   @param  encCtrl is video encoder control structure that is always passed as input in all APIs
+    *   @param  aIFramePeriod is a new value of INTRA frame interval in the unit of number of coded frames.
+    *   @return true for correct operation; false if error happens
+    */
+
+    OSCL_IMPORT_REF Bool    PVUpdateIFrameInterval(VideoEncControls *encCtrl, Int aIFramePeriod);/* for 2-way */
+
+    /**
+    *   @brief  specifies the number Intra MBs to be refreshed
+    *   @param  encCtrl is video encoder control structure that is always passed as input in all APIs
+    *   @param  numMB is the number of Intra MBs to be refreshed
+    *   @return true for correct operation; false if error happens
+    */
+    OSCL_IMPORT_REF Bool    PVUpdateNumIntraMBRefresh(VideoEncControls *encCtrl, Int numMB);  /* for 2-way */
+
+    /**
+    *   @brief  This function is called whenever users want the next base frame to be encoded as an I-Vop.
+    *   @param  encCtrl is video encoder control structure that is always passed as input in all APIs
+    *   @return true for correct operation; false if error happens
+    */
+    OSCL_IMPORT_REF Bool    PVIFrameRequest(VideoEncControls *encCtrl);                         /* for 2-way */
+
+#endif // LIMITED_API
+
+    /* finishing encoder */
+    /**
+    *   @brief  This function frees up all the memory allocated by the encoder library.
+    *   @param  encCtrl is video encoder control structure that is always passed as input in all APIs
+    *   @return true for correct operation; false if error happens
+    */
+    OSCL_IMPORT_REF Bool    PVCleanUpVideoEncoder(VideoEncControls *encCtrl);
+
+#ifdef __cplusplus
+}
+#endif
+#endif /* _MP4ENC_API_H_ */
+
diff --git a/media/libstagefright/codecs/m4v_h263/enc/src/bitstream_io.cpp b/media/libstagefright/codecs/m4v_h263/enc/src/bitstream_io.cpp
new file mode 100644
index 0000000..5c4c4ab
--- /dev/null
+++ b/media/libstagefright/codecs/m4v_h263/enc/src/bitstream_io.cpp
@@ -0,0 +1,859 @@
+/* ------------------------------------------------------------------
+ * Copyright (C) 1998-2009 PacketVideo
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
+ * express or implied.
+ * See the License for the specific language governing permissions
+ * and limitations under the License.
+ * -------------------------------------------------------------------
+ */
+/* Date: 8/02/04                                                                */
+/* Description:                                                                 */
+/*  Change the bitstream parsing algorithm. Use temporary word of 2 or 4 bytes  */
+/*  before writing it to the bitstream buffer.                                  */
+/*  Note byteCount doesn't have to be multiple of 2 or 4                        */
+/*********************************************************************************/
+
+#include "bitstream_io.h"
+#include "m4venc_oscl.h"
+#include <stdlib.h>
+
+static const UChar Mask[ ] =
+{
+    0x00, 0x01, 0x03, 0x07, 0x0F, 0x1F, 0x3F, 0x7F, 0xFF
+};
+
+#define WORD_SIZE   4   /* for 32-bit machine */
+
+/*Note:
+    1. There is a problem when output the last bits(which can not form a byte yet
+    so when you output, you need to stuff to make sure it is a byte
+    2.  I now hard coded byte to be 8 bits*/
+
+
+/* ======================================================================== */
+/*  Function : BitStreamCreateEnc(Int bufferSize )                          */
+/*  Date     : 08/29/2000                                                   */
+/*  Purpose  : Create a bitstream to hold one encoded video packet or frame */
+/*  In/out   :                                                              */
+/*      bufferSize  :   size of the bitstream buffer in bytes               */
+/*  Return   : Pointer to the BitstreamEncVideo                             */
+/*  Modified :                                                              */
+/* ======================================================================== */
+
+BitstreamEncVideo *BitStreamCreateEnc(Int bufferSize)
+{
+    BitstreamEncVideo *stream;
+    stream = (BitstreamEncVideo *) M4VENC_MALLOC(sizeof(BitstreamEncVideo));
+    if (stream == NULL)
+    {
+        return NULL;
+    }
+    stream->bufferSize = bufferSize;
+    stream->bitstreamBuffer = (UChar *) M4VENC_MALLOC(stream->bufferSize * sizeof(UChar));
+    if (stream->bitstreamBuffer == NULL)
+    {
+        M4VENC_FREE(stream);
+        stream = NULL;
+        return NULL;
+    }
+    M4VENC_MEMSET(stream->bitstreamBuffer, 0, stream->bufferSize*sizeof(UChar));
+    stream->word = 0;
+#if WORD_SIZE==4
+    stream->bitLeft = 32;
+#else
+    stream->bitLeft = 16;
+#endif
+    stream->byteCount = 0;
+
+    stream->overrunBuffer = NULL;
+    stream->oBSize = 0;
+
+    return stream;
+}
+
+/* ======================================================================== */
+/*  Function : BitstreamCloseEnc( )                                         */
+/*  Date     : 08/29/2000                                                   */
+/*  Purpose  : close a bitstream                                            */
+/*  In/out   :
+        stream  :   the bitstream to be closed                              */
+/*  Return   :                                                              */
+/*  Modified :                                                              */
+/* ======================================================================== */
+
+Void  BitstreamCloseEnc(BitstreamEncVideo *stream)
+{
+    if (stream)
+    {
+        if (stream->bitstreamBuffer)
+        {
+            M4VENC_FREE(stream->bitstreamBuffer);
+        }
+
+        M4VENC_FREE(stream);
+    }
+}
+
+
+/* ======================================================================== */
+/*  Function : BitstreamPutBits(BitstreamEncVideo *stream, Int Length,
+                         Int Value)                                         */
+/*  Date     : 08/29/2000                                                   */
+/*  Purpose  : put Length (1-16) number of bits to the stream               */
+/*            for 32-bit machine this function can do upto 32 bit input     */
+/*  In/out   :                                                              */
+/*      stream      the bitstream where the bits are put in                 */
+/*      Length      bits length (should belong to 1 to 16)                  */
+/*      Value       those bits value                                        */
+/*  Return   :  PV_STATUS                                                   */
+/*  Modified :                                                              */
+/* ======================================================================== */
+PV_STATUS BitstreamPutBits(BitstreamEncVideo *stream, Int Length, UInt Value)
+{
+    PV_STATUS status;
+
+    if (stream->bitLeft > Length)
+    {
+        stream->word <<= Length;
+        stream->word |= Value;  /* assuming Value is not larger than Length */
+        stream->bitLeft -= Length;
+        return PV_SUCCESS;
+    }
+    else
+    {
+
+        stream->word <<= stream->bitLeft;
+        Length -= stream->bitLeft;
+        stream->word |= ((UInt)Value >> Length);
+
+        status = BitstreamSaveWord(stream);
+        if (status != PV_SUCCESS)
+        {
+            return status;
+        }
+
+        /* we got new Length and Value */
+        /* note that Value is not "clean" because of msb are not masked out */
+        stream->word = Value;
+        stream->bitLeft -= Length;
+        /* assuming that Length is no more than 16 bits */
+        /* stream->bitLeft should be greater than zero at this point */
+        //if(stream->bitLeft<=0)
+        //  exit(-1);
+        return PV_SUCCESS;
+    }
+}
+
+/* ======================================================================== */
+/*  Function : BitstreamPutGT16Bits(BitstreamEncVideo *stream, Int Length, UInt32 Value)    */
+/*  Date     : 08/29/2000                                                   */
+/*  Purpose  : Use this function to put Length (17-32) number of bits to    */
+/*              for 16-bit machine  the stream.                             */
+/*  In/out   :                                                              */
+/*      stream      the bitstream where the bits are put in                 */
+/*      Length      bits length (should belong to 17 to 32)                 */
+/*      Value       those bits value                                        */
+/*  Return   :  PV_STATUS                                                   */
+/*  Modified :                                                              */
+/* ======================================================================== */
+PV_STATUS BitstreamPutGT16Bits(BitstreamEncVideo *stream, Int Length, ULong Value)
+{
+    PV_STATUS status;
+    UInt topValue;
+    Int topLength;
+
+    topValue = (Value >> 16);
+    topLength = Length - 16;
+
+    if (topLength > 0)
+    {
+        status = BitstreamPutBits(stream, topLength, topValue);
+
+        if (status != PV_SUCCESS)
+        {
+            return status;
+        }
+
+        status = BitstreamPutBits(stream, 16, (UInt)(Value & 0xFFFF));
+
+        return status;
+    }
+    else
+    {
+        status = BitstreamPutBits(stream, Length, (UInt)Value);
+        return status;
+    }
+}
+
+/* ======================================================================== */
+/*  Function : BitstreamSaveWord                                            */
+/*  Date     : 08/03/2004                                                   */
+/*  Purpose  : save written word into the bitstream buffer.                 */
+/*  In/out   :                                                              */
+/*      stream      the bitstream where the bits are put in                 */
+/*  Return   :  PV_STATUS                                                   */
+/*  Modified :                                                              */
+/* ======================================================================== */
+
+PV_STATUS BitstreamSaveWord(BitstreamEncVideo *stream)
+{
+    UChar *ptr;
+    UInt word;
+
+    /* assume that stream->bitLeft is always zero when this function is called */
+    if (stream->byteCount + WORD_SIZE > stream->bufferSize)
+    {
+        if (PV_SUCCESS != BitstreamUseOverrunBuffer(stream, WORD_SIZE))
+        {
+            stream->byteCount += WORD_SIZE;
+            return PV_FAIL;
+        }
+    }
+
+    ptr = stream->bitstreamBuffer + stream->byteCount;
+    word = stream->word;
+    stream->word = 0; /* important to reset to zero */
+
+    /* NOTE: byteCount does not have to be multiple of 2 or 4 */
+#if (WORD_SIZE == 4)
+    *ptr++ = word >> 24;
+    *ptr++ = 0xFF & (word >> 16);
+#endif
+
+    *ptr++ = 0xFF & (word >> 8);
+    *ptr = 0xFF & word;
+
+#if (WORD_SIZE == 4)
+    stream->byteCount += 4;
+    stream->bitLeft = 32;
+#else
+    stream->byteCount += 2;
+    stream->bitLeft = 16;
+#endif
+
+    return PV_SUCCESS;
+}
+
+
+/* ======================================================================== */
+/*  Function : BitstreamSavePartial                                         */
+/*  Date     : 08/03/2004                                                   */
+/*  Purpose  : save unfinished written word into the bitstream buffer.      */
+/*  In/out   :                                                              */
+/*      stream      the bitstream where the bits are put in                 */
+/*  Return   :  PV_STATUS                                                   */
+/*  Modified :                                                              */
+/* ======================================================================== */
+
+PV_STATUS BitstreamSavePartial(BitstreamEncVideo *stream, Int *fraction)
+{
+    UChar *ptr;
+    UInt word, shift;
+    Int numbyte, bitleft, bitused;
+
+    bitleft = stream->bitLeft;
+    bitused = (WORD_SIZE << 3) - bitleft; /* number of bits used */
+    numbyte = bitused >> 3; /* number of byte fully used */
+
+    if (stream->byteCount + numbyte > stream->bufferSize)
+    {
+        if (PV_SUCCESS != BitstreamUseOverrunBuffer(stream, numbyte))
+        {
+            stream->byteCount += numbyte;
+            return PV_FAIL;
+        }
+    }
+
+    ptr = stream->bitstreamBuffer + stream->byteCount;
+    word = stream->word;
+    word <<= bitleft;   /* word is not all consumed */
+    bitleft = bitused - (numbyte << 3); /* number of bits used (fraction) */
+    stream->byteCount += numbyte;
+    if (bitleft)
+    {
+        *fraction = 1;
+    }
+    else
+    {
+        *fraction = 0;
+    }
+    bitleft = (WORD_SIZE << 3) - bitleft;
+    /* save new value */
+    stream->bitLeft = bitleft;
+
+    shift = ((WORD_SIZE - 1) << 3);
+    while (numbyte)
+    {
+        *ptr++ = (UChar)((word >> shift) & 0xFF);
+        word <<= 8;
+        numbyte--;
+    }
+
+    if (*fraction)
+    {// this could lead to buffer overrun when ptr is already out of bound.
+        //  *ptr = (UChar)((word>>shift)&0xFF); /* need to do it for the last fractional byte */
+    }
+
+    /* save new values */
+    stream->word = word >> bitleft;
+
+    /* note we don't update byteCount, bitLeft and word */
+    /* so that encoder can continue PutBits if they don't */
+
+    return PV_SUCCESS;
+}
+
+
+/* ======================================================================== */
+/*  Function : BitstreamShortHeaderByteAlignStuffing(                       */
+/*                                      BitstreamEncVideo *stream)          */
+/*  Date     : 08/29/2000                                                   */
+/*  Purpose  : bit stuffing for next start code in short video header       */
+/*  In/out   :                                                              */
+/*  Return   :  number of bits to be stuffed                                */
+/*  Modified :                                                              */
+/* ======================================================================== */
+
+Int BitstreamShortHeaderByteAlignStuffing(BitstreamEncVideo *stream)
+{
+    UInt restBits;
+    Int fraction;
+
+    restBits = (stream->bitLeft & 0x7); /* modulo 8 */
+
+    if (restBits)  /*short_video_header[0] is 1 in h263 baseline*/
+    {
+        /* H.263 style stuffing */
+        BitstreamPutBits(stream, restBits, 0);
+    }
+
+    if (stream->bitLeft != (WORD_SIZE << 3))
+    {
+        BitstreamSavePartial(stream, &fraction);
+    }
+
+    return restBits;
+}
+
+/* ======================================================================== */
+/*  Function : BitstreamMpeg4ByteAlignStuffing(BitstreamEncVideo *stream)   */
+/*  Date     : 08/29/2000                                                   */
+/*  Purpose  : bit stuffing for next start code in MPEG-4                  */
+/*  In/out   :                                                              */
+/*  Return   :  number of bits to be stuffed                                */
+/*  Modified :                                                              */
+/* ======================================================================== */
+Int BitstreamMpeg4ByteAlignStuffing(BitstreamEncVideo *stream)
+{
+
+    UInt restBits;
+    Int fraction;
+    /* Question: in MPEG-4 , short_video_header[0]==0 => even already byte aligned, will still stuff 8 bits
+       need to check with  */
+    /*if (!(getPointerENC(index1, index2)%8) && short_video_header[0]) return 0;*/
+
+    /* need stuffing bits, */
+    BitstreamPutBits(stream, 1, 0);
+
+    restBits = (stream->bitLeft & 0x7); /* modulo 8 */
+
+    if (restBits)  /*short_video_header[0] is 1 in h263 baseline*/
+    {
+        /* need stuffing bits, */
+        BitstreamPutBits(stream, restBits, Mask[restBits]);
+    }
+
+    if (stream->bitLeft != (WORD_SIZE << 3))
+    {
+        BitstreamSavePartial(stream, &fraction);
+    }
+
+    return (restBits);
+}
+
+/*does bit stuffing for next resync marker*/
+/*  does bit stuffing for next resync marker
+ *                                            "0"
+ *                                           "01"
+ *                                          "011"
+ *                                         "0111"
+ *                                        "01111"
+ *                                       "011111"
+ *                                      "0111111"
+ *                                     "01111111"   (8-bit codeword)
+ */
+
+/*Int BitstreamNextResyncMarkerEnc(BitstreamEncVideo *stream)
+{
+  Int count;
+  BitstreamPut1Bits(stream,0);
+  count=8-stream->totalBits & 8;
+  BitstreamPutBits(stream,count,Mask[count]);
+  return count;
+}*/
+
+/* ======================================================================== */
+/*  Function : BitstreamAppendEnc( BitstreamEncVideo *bitstream1,           */
+/*                                      BitstreamEncVideo *bitstream2   )   */
+/*  Date     : 08/29/2000                                                   */
+/*  Purpose  : Append the intermediate bitstream (bitstream2) to the end of */
+/*                              output bitstream(bitstream1)                */
+/*  In/out   :                                                              */
+/*  Return   :                                                              */
+/*  Modified :                                                              */
+/* ======================================================================== */
+
+
+PV_STATUS BitstreamAppendEnc(BitstreamEncVideo *bitstream1, BitstreamEncVideo *bitstream2)
+{
+    PV_STATUS status;
+    UChar *ptrBS2, *ptrBS1;
+    UChar byteBS2, byteBS1;
+    Int  numbyte2;
+    Int bitused, bitleft, offset, fraction;
+
+    status = BitstreamSavePartial(bitstream1, &fraction);
+    if (status != PV_SUCCESS)
+    {
+        return status;
+    }
+
+    offset = fraction;
+    status = BitstreamSavePartial(bitstream2, &fraction);
+    if (status != PV_SUCCESS)
+    {
+        return status;
+    }
+
+    if (!offset) /* bitstream1 is byte-aligned */
+    {
+        return BitstreamAppendPacket(bitstream1, bitstream2);
+    }
+
+    offset += fraction;
+
+    /* since bitstream1 doesn't have to be byte-aligned, we have to process byte by byte */
+    /* we read one byte from bitstream2 and use BitstreamPutBits to do the job */
+    if (bitstream1->byteCount + bitstream2->byteCount + offset > bitstream1->bufferSize)
+    {
+        if (PV_SUCCESS != BitstreamUseOverrunBuffer(bitstream1, bitstream2->byteCount + offset))
+        {
+            bitstream1->byteCount += (bitstream2->byteCount + offset);
+            return PV_FAIL;
+        }
+    }
+
+    ptrBS1 = bitstream1->bitstreamBuffer + bitstream1->byteCount; /* move ptr bs1*/
+    ptrBS2 = bitstream2->bitstreamBuffer;
+
+    bitused = (WORD_SIZE << 3) - bitstream1->bitLeft; /* this must be between 1-7 */
+    bitleft = 8 - bitused;
+
+    numbyte2 = bitstream2->byteCount;   /* number of byte to copy from bs2 */
+    bitstream1->byteCount += numbyte2;  /* new byteCount */
+
+    byteBS1 = ((UChar) bitstream1->word) << bitleft;    /* fraction byte from bs1 */
+
+    while (numbyte2)
+    {
+        byteBS2 = *ptrBS2++;
+        byteBS1 |= (byteBS2 >> bitused);
+        *ptrBS1++ = byteBS1;
+        byteBS1 = byteBS2 << bitleft;
+        numbyte2--;
+    }
+
+    bitstream1->word = byteBS1 >> bitleft;  /* bitstream->bitLeft remains the same */
+
+    /* now save bs2->word in bs1 */
+    status = BitstreamPutBits(bitstream1, (WORD_SIZE << 3) - bitstream2->bitLeft, bitstream2->word);
+
+    return status;
+}
+
+/* ======================================================================== */
+/*  Function : BitstreamAppendPacket( BitstreamEncVideo *bitstream1,        */
+/*                                      BitstreamEncVideo *bitstream2   )   */
+/*  Date     : 05/31/2001                                                   */
+/*  Purpose  : Append the intermediate bitstream (bitstream2) to the end of */
+/*              output bitstream(bitstream1) knowing that bitstream1 is byte-aligned*/
+/*  In/out   :                                                              */
+/*  Return   :                                                              */
+/*  Modified :                                                              */
+/* ======================================================================== */
+PV_STATUS BitstreamAppendPacket(BitstreamEncVideo *bitstream1, BitstreamEncVideo *bitstream2)
+{
+    UChar *ptrBS2, *ptrBS1;
+    Int  numbyte2;
+
+    if (bitstream1->byteCount + bitstream2->byteCount  > bitstream1->bufferSize)
+    {
+        if (PV_SUCCESS != BitstreamUseOverrunBuffer(bitstream1, bitstream2->byteCount))
+        {
+            bitstream1->byteCount += bitstream2->byteCount; /* legacy, to keep track of total bytes */
+            return PV_FAIL;
+        }
+    }
+
+    ptrBS1 = bitstream1->bitstreamBuffer + bitstream1->byteCount; /* move ptr bs1*/
+    ptrBS2 = bitstream2->bitstreamBuffer;
+
+    numbyte2 = bitstream2->byteCount;
+    bitstream1->byteCount += numbyte2; /* new byteCount */
+
+    /*copy all the bytes in bitstream2*/
+    M4VENC_MEMCPY(ptrBS1, ptrBS2, sizeof(UChar)*numbyte2);
+
+    bitstream1->word = bitstream2->word;  /* bitstream1->bitLeft is the same */
+    bitstream1->bitLeft = bitstream2->bitLeft;
+
+    return PV_SUCCESS;
+}
+
+/* ======================================================================== */
+/*  Function : BitstreamAppendPacketNoOffset( BitstreamEncVideo *bitstream1,*/
+/*                                      BitstreamEncVideo *bitstream2   )   */
+/*  Date     : 04/23/2002                                                   */
+/*  Purpose  : Append the intermediate bitstream (bitstream2) to the end of */
+/*              output bitstream(bitstream1) , for slice-based coding only */
+/*  In/out   :                                                              */
+/*  Return   :                                                              */
+/*  Modified :                                                              */
+/* ======================================================================== */
+PV_STATUS BitstreamAppendPacketNoOffset(BitstreamEncVideo *bitstream1, BitstreamEncVideo *bitstream2)
+{
+    PV_STATUS status = PV_SUCCESS;
+    UChar *ptrBS2, *ptrBS1;
+    Int  numbyte2;
+    Int  byteleft;
+
+    numbyte2 = bitstream2->byteCount;
+
+    if (bitstream1->byteCount + bitstream2->byteCount > bitstream1->bufferSize)
+    {
+        numbyte2 =  bitstream1->bufferSize - bitstream1->byteCount;
+        status =  PV_END_OF_BUF;    /* signal end of buffer */
+    }
+
+    ptrBS1 = bitstream1->bitstreamBuffer; /* move ptr bs1*/
+    ptrBS2 = bitstream2->bitstreamBuffer;
+
+    bitstream1->byteCount += numbyte2; /* should be equal to bufferSize */
+
+    /*copy all the bytes in bitstream2*/
+    M4VENC_MEMCPY(ptrBS1, ptrBS2, sizeof(UChar)*numbyte2);
+    bitstream1->word = 0;
+    bitstream1->bitLeft = (WORD_SIZE << 3);
+
+    if (status == PV_END_OF_BUF) /* re-position bitstream2 */
+    {
+        byteleft = bitstream2->byteCount - numbyte2;
+
+        M4VENC_MEMCPY(ptrBS2, ptrBS2 + numbyte2, sizeof(UChar)*byteleft);
+
+        bitstream2->byteCount = byteleft;
+        /* bitstream2->word and bitstream->bitLeft are unchanged.
+           they should be 0 and (WORD_SIZE<<3) */
+    }
+
+    return status;
+}
+
+#ifndef NO_SLICE_ENCODE
+/* ======================================================================== */
+/*  Function : BitstreamRepos( BitstreamEncVideo *bitstream,                */
+/*                                      Int byteCount, Int bitCount)        */
+/*  Date     : 04/28/2002                                                   */
+/*  Purpose  : Reposition the size of the buffer content (curtail)          */
+/*  In/out   :                                                              */
+/*  Return   :                                                              */
+/*  Modified :                                                              */
+/* ======================================================================== */
+PV_STATUS   BitstreamRepos(BitstreamEncVideo *bitstream, Int byteCount, Int bitCount)
+{
+    UChar *ptr, byte;
+    UInt word;
+    Int fraction;
+
+    BitstreamSavePartial(bitstream, &fraction);
+
+    bitstream->byteCount = byteCount;
+    ptr = bitstream->bitstreamBuffer + byteCount; /* get fraction of the byte */
+    if (bitCount)
+    {
+        bitstream->bitLeft = (WORD_SIZE << 3) - bitCount; /* bitCount should be 0-31 */
+        word = *ptr++;
+        byte = *ptr++;
+        word = byte | (word << 8);
+#if (WORD_SIZE == 4)
+        byte = *ptr++;
+        word = byte | (word << 8);
+        byte = *ptr++;
+        word = byte | (word << 8);
+#endif
+        bitstream->word = word >> (bitstream->bitLeft);
+    }
+    else
+    {
+        bitstream->word = 0;
+        bitstream->bitLeft = (WORD_SIZE << 3);
+    }
+
+    return PV_SUCCESS;
+}
+
+/* ======================================================================== */
+/*  Function : BitstreamFlushBits(BitstreamEncVideo *bitstream1,            */
+/*                              Int num_bit_left)                           */
+/*  Date     : 04/24/2002                                                   */
+/*  Purpose  : Flush buffer except the last num_bit_left bits.              */
+/*  In/out   :                                                              */
+/*  Return   :                                                              */
+/*  Modified :                                                              */
+/* ======================================================================== */
+
+
+PV_STATUS BitstreamFlushBits(BitstreamEncVideo *bitstream1, Int num_bit_left)
+{
+    Int i;
+    UChar *ptrDst, *ptrSrc;
+    Int leftover, bitused;
+    Int new_byte = (num_bit_left >> 3);
+    Int new_bit = num_bit_left - (new_byte << 3); /* between 0-7 */
+
+    ptrSrc = bitstream1->bitstreamBuffer + bitstream1->byteCount;
+    ptrDst = bitstream1->bitstreamBuffer;
+
+    bitused = (WORD_SIZE << 3) - bitstream1->bitLeft;
+
+    leftover = 8 - bitused; /* bitused should be between 0-7 */
+
+    bitstream1->byteCount = new_byte;
+    bitstream1->bitLeft = (WORD_SIZE << 3) - new_bit;
+
+    if (!bitused) /* byte aligned */
+    {
+        M4VENC_MEMCPY(ptrDst, ptrSrc, new_byte + 1);
+    }
+    else
+    {
+        /*copy all the bytes in bitstream2*/
+        for (i = 0; i < new_byte; i++)
+        {
+            *ptrDst++ = (ptrSrc[0] << bitused) | (ptrSrc[1] >> leftover);
+            ptrSrc++;
+        }
+        /* copy for the last byte of ptrSrc, copy extra bits doesn't hurt */
+        if (new_bit)
+        {
+            *ptrDst++ = (ptrSrc[0] << bitused) | (ptrSrc[1] >> leftover);
+            ptrSrc++;
+        }
+    }
+    if (new_bit)
+    {
+        ptrSrc = bitstream1->bitstreamBuffer + new_byte;
+        bitstream1->word = (*ptrSrc) >> (8 - new_bit);
+    }
+
+    return PV_SUCCESS;
+}
+
+/* ======================================================================== */
+/*  Function : BitstreamPrependPacket( BitstreamEncVideo *bitstream1,       */
+/*                                      BitstreamEncVideo *bitstream2   )   */
+/*  Date     : 04/26/2002                                                   */
+/*  Purpose  : Prepend the intermediate bitstream (bitstream2) to the beginning of */
+/*              output bitstream(bitstream1) */
+/*  In/out   :                                                              */
+/*  Return   :                                                              */
+/*  Modified :                                                              */
+/* ======================================================================== */
+PV_STATUS BitstreamPrependPacket(BitstreamEncVideo *bitstream1, BitstreamEncVideo *bitstream2)
+{
+    UChar *pSrc, *pDst, byte;
+    Int     movebyte, bitused, leftover, i, fraction;
+
+    BitstreamSavePartial(bitstream2, &fraction); /* make sure only fraction of byte left */
+    BitstreamSavePartial(bitstream1, &fraction);
+
+    if (bitstream1->byteCount + bitstream2->byteCount >= bitstream1->bufferSize)
+    {
+        bitstream1->byteCount += bitstream2->byteCount;
+        return PV_END_OF_BUF;
+    }
+
+    movebyte = bitstream1->byteCount;
+    if (movebyte < bitstream2->byteCount)
+        movebyte = bitstream2->byteCount;
+    movebyte++;
+
+    /* shift bitstream1 to the right by movebyte */
+    pSrc = bitstream1->bitstreamBuffer;
+    pDst = pSrc + movebyte;
+
+    M4VENC_MEMCPY(pDst, pSrc, bitstream1->byteCount + 1);
+
+    /* copy bitstream2 to the beginning of bitstream1 */
+    M4VENC_MEMCPY(pSrc, bitstream2->bitstreamBuffer, bitstream2->byteCount + 1);
+
+    /* now shift back previous bitstream1 buffer to the end */
+    pSrc = pDst;
+    pDst = bitstream1->bitstreamBuffer + bitstream2->byteCount;
+
+    bitused = (WORD_SIZE << 3) - bitstream2->bitLeft;
+    leftover = 8 - bitused;     /* bitused should be 0-7 */
+
+    byte = (bitstream2->word) << leftover;
+
+    *pDst++ = byte | (pSrc[0] >> bitused);
+
+    for (i = 0; i < bitstream1->byteCount + 1; i++)
+    {
+        *pDst++ = ((pSrc[0] << leftover) | (pSrc[1] >> bitused));
+        pSrc++;
+    }
+
+    bitstream1->byteCount += bitstream2->byteCount;
+    //bitstream1->bitCount += bitstream2->bitCount;
+    bitused = (WORD_SIZE << 4) - (bitstream1->bitLeft + bitstream2->bitLeft);
+
+    if (bitused >= 8)
+    {
+        bitused -= 8;
+        bitstream1->byteCount++;
+    }
+
+    bitstream1->bitLeft = (WORD_SIZE << 3) - bitused;
+
+    bitstream2->byteCount = bitstream2->word = 0;
+    bitstream2->bitLeft = (WORD_SIZE << 3);
+
+    pSrc = bitstream1->bitstreamBuffer + bitstream1->byteCount;
+    leftover = 8 - bitused;
+    //*pSrc = (pSrc[0]>>leftover)<<leftover; /* make sure the rest of bits are zeros */
+
+    bitstream1->word = (UInt)((pSrc[0]) >> leftover);
+
+    return PV_SUCCESS;
+}
+#endif  /* NO_SLICE_ENCODE */
+
+
+/* ======================================================================== */
+/*  Function : BitstreamGetPos( BitstreamEncVideo *stream                   */
+/*  Date     : 08/05/2004                                                   */
+/*  Purpose  : Get the bit position.                                        */
+/*  In/out   :                                                              */
+/*  Return   :                                                              */
+/*  Modified :                                                              */
+/* ======================================================================== */
+Int BitstreamGetPos(BitstreamEncVideo *stream)
+{
+
+    return stream->byteCount*8 + (WORD_SIZE << 3) - stream->bitLeft;
+}
+
+void BitstreamEncReset(BitstreamEncVideo *stream)
+{
+    stream->bitLeft = (WORD_SIZE << 3);
+    stream->word = 0;
+    stream->byteCount = 0;
+    return ;
+}
+
+/* This function set the overrun buffer, and VideoEncData context for callback to reallocate
+overrun buffer.  */
+Void  BitstreamSetOverrunBuffer(BitstreamEncVideo* stream, UChar* overrunBuffer, Int oBSize, VideoEncData *video)
+{
+    stream->overrunBuffer = overrunBuffer;
+    stream->oBSize = oBSize;
+    stream->video = video;
+
+    return ;
+}
+
+
+/* determine whether overrun buffer can be used or not */
+PV_STATUS BitstreamUseOverrunBuffer(BitstreamEncVideo* stream, Int numExtraBytes)
+{
+    VideoEncData *video = stream->video;
+
+    if (stream->overrunBuffer != NULL) // overrunBuffer is set
+    {
+        if (stream->bitstreamBuffer != stream->overrunBuffer) // not already used
+        {
+            if (stream->byteCount + numExtraBytes >= stream->oBSize)
+            {
+                stream->oBSize = stream->byteCount + numExtraBytes + 100;
+                stream->oBSize &= (~0x3); // make it multiple of 4
+
+                // allocate new overrun Buffer
+                if (video->overrunBuffer)
+                {
+                    M4VENC_FREE(video->overrunBuffer);
+                }
+                video->oBSize = stream->oBSize;
+                video->overrunBuffer = (UChar*) M4VENC_MALLOC(sizeof(UChar) * stream->oBSize);
+                stream->overrunBuffer = video->overrunBuffer;
+                if (stream->overrunBuffer == NULL)
+                {
+                    return PV_FAIL;
+                }
+            }
+
+            // copy everything to overrun buffer and start using it.
+            memcpy(stream->overrunBuffer, stream->bitstreamBuffer, stream->byteCount);
+            stream->bitstreamBuffer = stream->overrunBuffer;
+            stream->bufferSize = stream->oBSize;
+        }
+        else // overrun buffer is already used
+        {
+            if (stream->byteCount + numExtraBytes >= stream->oBSize)
+            {
+                stream->oBSize = stream->byteCount + numExtraBytes + 100;
+            }
+
+            // allocate new overrun buffer
+            stream->oBSize &= (~0x3); // make it multiple of 4
+            video->oBSize = stream->oBSize;
+            video->overrunBuffer = (UChar*) M4VENC_MALLOC(sizeof(UChar) * stream->oBSize);
+            if (video->overrunBuffer == NULL)
+            {
+                return PV_FAIL;
+            }
+
+            // copy from the old buffer to new buffer
+            memcpy(video->overrunBuffer, stream->overrunBuffer, stream->byteCount);
+            // free old buffer
+            M4VENC_FREE(stream->overrunBuffer);
+            // assign pointer to new buffer
+            stream->overrunBuffer = video->overrunBuffer;
+            stream->bitstreamBuffer = stream->overrunBuffer;
+            stream->bufferSize = stream->oBSize;
+        }
+
+        return PV_SUCCESS;
+    }
+    else // overrunBuffer is not enable.
+    {
+        return PV_FAIL;
+    }
+
+}
+
+
+
+
+
+
+
diff --git a/media/libstagefright/codecs/m4v_h263/enc/src/bitstream_io.h b/media/libstagefright/codecs/m4v_h263/enc/src/bitstream_io.h
new file mode 100644
index 0000000..0bce257
--- /dev/null
+++ b/media/libstagefright/codecs/m4v_h263/enc/src/bitstream_io.h
@@ -0,0 +1,57 @@
+/* ------------------------------------------------------------------
+ * Copyright (C) 1998-2009 PacketVideo
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
+ * express or implied.
+ * See the License for the specific language governing permissions
+ * and limitations under the License.
+ * -------------------------------------------------------------------
+ */
+#ifndef _BITSTREAM_IO_H_
+#define _BITSTREAM_IO_H_
+
+#define BitstreamPut1Bits(x,y)  BitstreamPutBits(x,1,y)
+#define BitstreamPutGT8Bits(x,y,z) BitstreamPutBits(x,y,z)
+
+#include "mp4lib_int.h"
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
+    BitstreamEncVideo *BitStreamCreateEnc(Int bufferSize);
+    Void  BitstreamCloseEnc(BitstreamEncVideo *stream);
+    PV_STATUS BitstreamPutBits(BitstreamEncVideo *stream, Int Length, UInt Value);
+    PV_STATUS BitstreamPutGT16Bits(BitstreamEncVideo *stream, Int Length, ULong Value);
+    PV_STATUS BitstreamSaveWord(BitstreamEncVideo *stream);
+    PV_STATUS BitstreamSavePartial(BitstreamEncVideo *stream, Int *fraction);
+    Int BitstreamGetPos(BitstreamEncVideo *stream);
+    void BitstreamEncReset(BitstreamEncVideo *stream);
+
+    Int BitstreamShortHeaderByteAlignStuffing(BitstreamEncVideo *stream);
+    Int BitstreamMpeg4ByteAlignStuffing(BitstreamEncVideo *stream);
+    PV_STATUS BitstreamAppendEnc(BitstreamEncVideo *bitstream1, BitstreamEncVideo *bitstream2);
+    PV_STATUS BitstreamAppendPacket(BitstreamEncVideo *bitstream1, BitstreamEncVideo *bitstream2);
+    PV_STATUS BitstreamAppendPacketNoOffset(BitstreamEncVideo *bitstream1, BitstreamEncVideo *bitstream2);
+    PV_STATUS BitstreamRepos(BitstreamEncVideo *bitstream, Int byteCount, Int bitCount);
+    PV_STATUS BitstreamFlushBits(BitstreamEncVideo *bitstream1, Int num_bit_left);
+    PV_STATUS BitstreamPrependPacket(BitstreamEncVideo *bitstream1, BitstreamEncVideo *bitstream2);
+
+
+    Void  BitstreamSetOverrunBuffer(BitstreamEncVideo *stream, UChar *overrunBuffer, Int oBSize, VideoEncData *video);
+    PV_STATUS BitstreamUseOverrunBuffer(BitstreamEncVideo* stream, Int numExtraBytes);
+
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _BITSTREAM_IO_H_ */
diff --git a/media/libstagefright/codecs/m4v_h263/enc/src/combined_encode.cpp b/media/libstagefright/codecs/m4v_h263/enc/src/combined_encode.cpp
new file mode 100644
index 0000000..e725680
--- /dev/null
+++ b/media/libstagefright/codecs/m4v_h263/enc/src/combined_encode.cpp
@@ -0,0 +1,693 @@
+/* ------------------------------------------------------------------
+ * Copyright (C) 1998-2009 PacketVideo
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
+ * express or implied.
+ * See the License for the specific language governing permissions
+ * and limitations under the License.
+ * -------------------------------------------------------------------
+ */
+#include "mp4def.h"
+#include "mp4enc_lib.h"
+#include "mp4lib_int.h"
+#include "bitstream_io.h"
+#include "vlc_encode.h"
+#include "m4venc_oscl.h"
+
+PV_STATUS EncodeGOBHeader(VideoEncData *video, Int GOB_number, Int quant_scale, Int bs1stream);
+
+/* ======================================================================== */
+/*  Function : EncodeFrameCombinedMode()                                    */
+/*  Date     : 09/01/2000                                                   */
+/*  History  :                                                              */
+/*  Purpose  : Encode a frame of MPEG4 bitstream in Combined mode.          */
+/*  In/out   :                                                              */
+/*  Return   :  PV_SUCCESS if successful else PV_FAIL                       */
+/*  Modified :                                                              */
+/*                                                                          */
+/* ======================================================================== */
+PV_STATUS EncodeFrameCombinedMode(VideoEncData *video)
+{
+    PV_STATUS status = PV_SUCCESS;
+    Vol *currVol = video->vol[video->currLayer];
+    Vop *currVop = video->currVop;
+    VideoEncParams *encParams = video->encParams;
+    Int width = currVop->width; /* has to be Vop, for multiple of 16 */
+    Int lx = currVop->pitch; /* with padding */
+    Int offset = 0;
+    Int ind_x, ind_y;
+    Int start_packet_header = 0;
+    UChar *QPMB = video->QPMB;
+    Int QP;
+    Int mbnum = 0, slice_counter = 0, curr_slice_counter = 0;
+    Int num_bits, packet_size = encParams->ResyncPacketsize;
+    Int GOB_Header_Interval = encParams->GOB_Header_Interval;
+    BitstreamEncVideo *bs1 = video->bitstream1;
+    Int numHeaderBits;
+    approxDCT fastDCTfunction;
+    Int ncoefblck[6] = {64, 64, 64, 64, 64, 64}; /* for FastCodeMB,  5/18/2001 */
+    PV_STATUS(*CodeMB)(VideoEncData *, approxDCT *, Int, Int[]);
+    void (*MBVlcEncode)(VideoEncData*, Int[], void *);
+    void (*BlockCodeCoeff)(RunLevelBlock*, BitstreamEncVideo*, Int, Int, UChar);
+
+    /* for H263 GOB changes */
+//MP4RateControlType rc_type = encParams->RC_Type;
+
+    video->QP_prev = currVop->quantizer;
+
+    numHeaderBits = BitstreamGetPos(bs1);
+
+    /* determine type of quantization   */
+#ifndef NO_MPEG_QUANT
+    if (currVol->quantType == 0)
+        CodeMB = &CodeMB_H263;
+    else
+        CodeMB = &CodeMB_MPEG;
+#else
+    CodeMB = &CodeMB_H263;
+#endif
+
+    /* determine which functions to be used, in MB-level */
+    if (currVop->predictionType == P_VOP)
+        MBVlcEncode = &MBVlcEncodeCombined_P_VOP;
+    else if (currVop->predictionType == I_VOP)
+        MBVlcEncode = &MBVlcEncodeCombined_I_VOP;
+    else /* B_VOP not implemented yet */
+        return PV_FAIL;
+
+    /* determine which VLC table to be used */
+#ifndef H263_ONLY
+    if (currVol->shortVideoHeader)
+        BlockCodeCoeff = &BlockCodeCoeff_ShortHeader;
+#ifndef NO_RVLC
+    else if (currVol->useReverseVLC)
+        BlockCodeCoeff = &BlockCodeCoeff_RVLC;
+#endif
+    else
+        BlockCodeCoeff = &BlockCodeCoeff_Normal;
+#else
+    BlockCodeCoeff = &BlockCodeCoeff_ShortHeader;
+#endif
+
+    /* gob_frame_id is the same for different vop types - the reason should be SCD */
+    if (currVol->shortVideoHeader && currVop->gobFrameID != currVop->predictionType)
+        currVop->gobFrameID = currVop->predictionType;
+
+
+    video->usePrevQP = 0;
+
+    for (ind_y = 0; ind_y < currVol->nMBPerCol; ind_y++)    /* Col MB Loop */
+    {
+
+        video->outputMB->mb_y = ind_y; /*  5/28/01 */
+
+        if (currVol->shortVideoHeader)  /* ShortVideoHeader Mode */
+        {
+
+            if (slice_counter && GOB_Header_Interval && (ind_y % GOB_Header_Interval == 0))     /* Encode GOB Header */
+            {
+                QP = QPMB[mbnum];    /* Get quant_scale */
+                video->header_bits -= BitstreamGetPos(currVol->stream); /* Header Bits */
+                status = EncodeGOBHeader(video, slice_counter, QP, 0);  //ind_y     /* Encode GOB Header */
+                video->header_bits += BitstreamGetPos(currVol->stream); /* Header Bits */
+                curr_slice_counter = slice_counter;
+            }
+        }
+
+        for (ind_x = 0; ind_x < currVol->nMBPerRow; ind_x++)  /* Row MB Loop */
+        {
+            video->outputMB->mb_x = ind_x; /*  5/28/01 */
+            video->mbnum = mbnum;
+            QP = QPMB[mbnum];   /* always read new QP */
+
+            if (GOB_Header_Interval)
+                video->sliceNo[mbnum] = curr_slice_counter; /* Update MB slice number */
+            else
+                video->sliceNo[mbnum] = slice_counter;
+
+            /****************************************************************************************/
+            /* MB Prediction:Put into MC macroblock, substract from currVop, put in predMB */
+            /****************************************************************************************/
+            getMotionCompensatedMB(video, ind_x, ind_y, offset);
+
+#ifndef H263_ONLY
+            if (start_packet_header)
+            {
+                slice_counter++;                        /* Increment slice counter */
+                video->sliceNo[mbnum] = slice_counter;  /* Update MB slice number*/
+                video->header_bits -= BitstreamGetPos(bs1); /* Header Bits */
+                video->QP_prev = currVop->quantizer;
+                status = EncodeVideoPacketHeader(video, mbnum, video->QP_prev, 0);
+                video->header_bits += BitstreamGetPos(bs1); /* Header Bits */
+                numHeaderBits = BitstreamGetPos(bs1);
+                start_packet_header = 0;
+                video->usePrevQP = 0;
+            }
+#endif
+            /***********************************************/
+            /* Code_MB:  DCT, Q, Q^(-1), IDCT, Motion Comp */
+            /***********************************************/
+
+            status = (*CodeMB)(video, &fastDCTfunction, (offset << 5) + QP, ncoefblck);
+
+            /************************************/
+            /* MB VLC Encode: VLC Encode MB     */
+            /************************************/
+
+            (*MBVlcEncode)(video, ncoefblck, (void*)BlockCodeCoeff);
+
+            /*************************************************************/
+            /* Assemble Packets:  Assemble the MB VLC codes into Packets */
+            /*************************************************************/
+
+            /* Assemble_Packet(video) */
+#ifndef H263_ONLY
+            if (!currVol->shortVideoHeader) /* Not in ShortVideoHeader mode */
+            {
+                if (!currVol->ResyncMarkerDisable) /* RESYNC MARKER MODE */
+                {
+                    num_bits = BitstreamGetPos(bs1) - numHeaderBits;
+                    if (num_bits > packet_size)
+                    {
+                        video->header_bits += BitstreamMpeg4ByteAlignStuffing(bs1); /* Byte align Packet */
+
+                        status = BitstreamAppendPacket(currVol->stream, bs1); /* Put Packet to Buffer */
+                        /* continue even if status == PV_END_OF_BUF, to get the stats */
+
+                        BitstreamEncReset(bs1);
+
+                        start_packet_header = 1;
+                    }
+                }
+                else   /* NO RESYNC MARKER MODE */
+                {
+                    status = BitstreamAppendEnc(currVol->stream, bs1); /* Initialize to 0 */
+                    /* continue even if status == PV_END_OF_BUF, to get the stats */
+
+                    BitstreamEncReset(bs1);
+                }
+            }
+            else
+#endif /* H263_ONLY */
+            {   /* ShortVideoHeader Mode */
+                status = BitstreamAppendEnc(currVol->stream, bs1);  /* Initialize to 0 */
+                /* continue even if status == PV_END_OF_BUF, to get the stats */
+
+                BitstreamEncReset(bs1);
+            }
+            mbnum++;
+            offset += 16;
+        } /* End of For ind_x */
+
+        offset += (lx << 4) - width;
+        if (currVol->shortVideoHeader)  /* ShortVideoHeader = 1 */
+        {
+
+            if (GOB_Header_Interval)  slice_counter++;
+        }
+
+    } /* End of For ind_y */
+
+    if (currVol->shortVideoHeader) /* ShortVideoHeader = 1 */
+    {
+
+        video->header_bits += BitstreamShortHeaderByteAlignStuffing(currVol->stream); /* Byte Align */
+    }
+#ifndef H263_ONLY
+    else   /* Combined Mode*/
+    {
+        if (!currVol->ResyncMarkerDisable) /* Resync Markers */
+        {
+
+            if (!start_packet_header)
+            {
+                video->header_bits += BitstreamMpeg4ByteAlignStuffing(bs1);/* Byte Align  */
+
+                status = BitstreamAppendPacket(currVol->stream, bs1);   /* Put Packet to Buffer */
+                /* continue even if status == PV_END_OF_BUF, to get the stats */
+
+                BitstreamEncReset(bs1);
+            }
+        }
+        else   /* No Resync Markers */
+        {
+            video->header_bits += BitstreamMpeg4ByteAlignStuffing(currVol->stream); /* Byte Align */
+        }
+    }
+#endif /* H263_ONLY */
+
+    return status; /* if status == PV_END_OF_BUF, this frame will be pre-skipped */
+}
+
+#ifndef NO_SLICE_ENCODE
+/* ======================================================================== */
+/*  Function : EncodeSliceCombinedMode()                                    */
+/*  Date     : 04/19/2002                                                   */
+/*  History  :                                                              */
+/*  Purpose  : Encode a slice of MPEG4 bitstream in Combined mode and save  */
+/*              the current MB to continue next time it is called.          */
+/*  In/out   :                                                              */
+/*  Return   :  PV_SUCCESS if successful else PV_FAIL                       */
+/*  Modified :                                                              */
+/*                                                                          */
+/* ======================================================================== */
+PV_STATUS EncodeSliceCombinedMode(VideoEncData *video)
+{
+    PV_STATUS status = PV_SUCCESS;
+    Vol *currVol = video->vol[video->currLayer];
+    Vop *currVop = video->currVop;
+    UChar mode = MODE_INTRA;
+    UChar *Mode = video->headerInfo.Mode;
+    VideoEncParams *encParams = video->encParams;
+    Int nTotalMB = currVol->nTotalMB;
+    Int width = currVop->width; /* has to be Vop, for multiple of 16 */
+    Int lx = currVop->pitch; /* , with padding */
+//  rateControl *rc = encParams->rc[video->currLayer];
+    UChar *QPMB = video->QPMB;
+    Int QP;
+    Int ind_x = video->outputMB->mb_x, ind_y = video->outputMB->mb_y;
+    Int offset = video->offset;                 /* get current MB location */
+    Int mbnum = video->mbnum, slice_counter = video->sliceNo[mbnum]; /* get current MB location */
+    Int firstMB = mbnum;
+    Int start_packet_header = 0;
+    Int num_bits = 0;
+    Int packet_size = encParams->ResyncPacketsize - 1;
+    Int resync_marker = ((!currVol->shortVideoHeader) && (!currVol->ResyncMarkerDisable));
+    BitstreamEncVideo *bs1 = video->bitstream1;
+    Int byteCount = 0, byteCount1 = 0, bitCount = 0;
+    Int numHeaderBits = 0;
+    approxDCT fastDCTfunction;
+    Int ncoefblck[6] = {64, 64, 64, 64, 64, 64}; /* for FastCodeMB,  5/18/2001 */
+    UChar CBP = 0;
+    Short outputMB[6][64];
+    Int k;
+    PV_STATUS(*CodeMB)(VideoEncData *, approxDCT *, Int, Int[]);
+    void (*MBVlcEncode)(VideoEncData*, Int[], void *);
+    void (*BlockCodeCoeff)(RunLevelBlock*, BitstreamEncVideo*, Int, Int, UChar);
+
+    video->QP_prev = 31;
+
+#define H263_GOB_CHANGES
+
+
+    if (video->end_of_buf) /* left-over from previous run */
+    {
+        status = BitstreamAppendPacketNoOffset(currVol->stream, bs1);
+        if (status != PV_END_OF_BUF)
+        {
+            BitstreamEncReset(bs1);
+            video->end_of_buf = 0;
+        }
+        return status;
+    }
+
+
+    if (mbnum == 0) /* only do this at the start of a frame */
+    {
+        QPMB[0] = video->QP_prev = QP = currVop->quantizer;
+        video->usePrevQP = 0;
+
+        numHeaderBits = BitstreamGetPos(bs1);
+    }
+
+    /* Re-assign fast functions on every slice, don't have to put it in the memory */
+    QP = QPMB[mbnum];
+    if (mbnum > 0)   video->QP_prev = QPMB[mbnum-1];
+
+    /* determine type of quantization   */
+#ifndef NO_MPEG_QUANT
+    if (currVol->quantType == 0)
+        CodeMB = &CodeMB_H263;
+    else
+        CodeMB = &CodeMB_MPEG;
+#else
+    CodeMB = &CodeMB_H263;
+#endif
+
+    /* determine which functions to be used, in MB-level */
+    if (currVop->predictionType == P_VOP)
+        MBVlcEncode = &MBVlcEncodeCombined_P_VOP;
+    else if (currVop->predictionType == I_VOP)
+        MBVlcEncode = &MBVlcEncodeCombined_I_VOP;
+    else /* B_VOP not implemented yet */
+        return PV_FAIL;
+
+    /* determine which VLC table to be used */
+#ifndef H263_ONLY
+    if (currVol->shortVideoHeader)
+        BlockCodeCoeff = &BlockCodeCoeff_ShortHeader;
+#ifndef NO_RVLC
+    else if (currVol->useReverseVLC)
+        BlockCodeCoeff = &BlockCodeCoeff_RVLC;
+#endif
+    else
+        BlockCodeCoeff = &BlockCodeCoeff_Normal;
+#else
+    BlockCodeCoeff = &BlockCodeCoeff_ShortHeader;
+#endif
+
+    /*  (gob_frame_id is the same for different vop types) The reason should be SCD */
+    if (currVol->shortVideoHeader && currVop->gobFrameID != currVop->predictionType)
+        currVop->gobFrameID = currVop->predictionType;
+
+
+    if (mbnum != 0)
+    {
+        if (currVol->shortVideoHeader)
+        {
+            /* Encode GOB Header */
+            bitCount = BitstreamGetPos(bs1);
+            byteCount1 = byteCount = bitCount >> 3; /* save the position before GOB header */
+            bitCount = bitCount & 0x7;
+
+#ifdef H263_GOB_CHANGES
+            video->header_bits -= BitstreamGetPos(bs1); /* Header Bits */
+            status = EncodeGOBHeader(video, slice_counter, QP, 1);  //ind_y    /* Encode GOB Header */
+            video->header_bits += BitstreamGetPos(bs1); /* Header Bits */
+#endif
+            goto JUMP_IN_SH;
+        }
+        else if (currVol->ResyncMarkerDisable)
+        {
+            goto JUMP_IN_SH;
+        }
+        else
+        {
+            start_packet_header = 1;
+            goto JUMP_IN;
+        }
+    }
+
+    for (ind_y = 0; ind_y < currVol->nMBPerCol; ind_y++)    /* Col MB Loop */
+    {
+
+        video->outputMB->mb_y = ind_y; /*  5/28/01, do not remove */
+
+        for (ind_x = 0; ind_x < currVol->nMBPerRow; ind_x++)  /* Row MB Loop */
+        {
+
+            video->outputMB->mb_x = ind_x; /*  5/28/01, do not remove */
+            video->mbnum = mbnum;
+            video->sliceNo[mbnum] = slice_counter;      /* Update MB slice number */
+JUMP_IN_SH:
+            /****************************************************************************************/
+            /* MB Prediction:Put into MC macroblock, substract from currVop, put in predMB */
+            /****************************************************************************************/
+            getMotionCompensatedMB(video, ind_x, ind_y, offset);
+
+JUMP_IN:
+            QP = QPMB[mbnum];   /* always read new QP */
+#ifndef H263_ONLY
+            if (start_packet_header)
+            {
+                slice_counter++;                        /* Increment slice counter */
+                video->sliceNo[mbnum] = slice_counter;  /* Update MB slice number*/
+                video->QP_prev = currVop->quantizer;                        /* store QP */
+                num_bits = BitstreamGetPos(bs1);
+                status = EncodeVideoPacketHeader(video, mbnum, video->QP_prev, 1);
+                numHeaderBits = BitstreamGetPos(bs1) - num_bits;
+                video->header_bits += numHeaderBits; /* Header Bits */
+                start_packet_header = 0;
+                video->usePrevQP = 0;
+            }
+            else  /* don't encode the first MB in packet again */
+#endif /* H263_ONLY */
+            {
+                /***********************************************/
+                /* Code_MB:  DCT, Q, Q^(-1), IDCT, Motion Comp */
+                /***********************************************/
+                status = (*CodeMB)(video, &fastDCTfunction, (offset << 5) + QP, ncoefblck);
+            }
+
+            /************************************/
+            /* MB VLC Encode: VLC Encode MB     */
+            /************************************/
+
+            /* save the state before VLC encoding */
+            if (resync_marker)
+            {
+                bitCount = BitstreamGetPos(bs1);
+                byteCount = bitCount >> 3; /* save the state before encoding */
+                bitCount = bitCount & 0x7;
+                mode = Mode[mbnum];
+                CBP = video->headerInfo.CBP[mbnum];
+                for (k = 0; k < 6; k++)
+                {
+                    M4VENC_MEMCPY(outputMB[k], video->outputMB->block[k], sizeof(Short) << 6);
+                }
+            }
+            /*************************************/
+
+            (*MBVlcEncode)(video, ncoefblck, (void*)BlockCodeCoeff);
+
+            /*************************************************************/
+            /* Assemble Packets:  Assemble the MB VLC codes into Packets */
+            /*************************************************************/
+
+            /* Assemble_Packet(video) */
+#ifndef H263_ONLY
+            if (!currVol->shortVideoHeader)
+            {
+                if (!currVol->ResyncMarkerDisable)
+                {
+                    /* Not in ShortVideoHeader mode and RESYNC MARKER MODE */
+
+                    num_bits = BitstreamGetPos(bs1) ;//- numHeaderBits; // include header
+
+                    /* Assemble packet and return when size reached */
+                    if (num_bits > packet_size && mbnum != firstMB)
+                    {
+
+                        BitstreamRepos(bs1, byteCount, bitCount); /* rewind one MB */
+
+                        video->header_bits += BitstreamMpeg4ByteAlignStuffing(bs1); /* Byte align Packet */
+
+                        status = BitstreamAppendPacketNoOffset(currVol->stream, bs1); /* Put Packet to Buffer */
+
+                        if (status == PV_END_OF_BUF)
+                        {
+                            video->end_of_buf = 1;
+                        }
+                        else
+                        {
+                            BitstreamEncReset(bs1);
+                        }
+
+                        start_packet_header = 1;
+
+                        if (mbnum < nTotalMB || video->end_of_buf) /* return here */
+                        {
+                            video->mbnum = mbnum;
+                            video->sliceNo[mbnum] = slice_counter;
+                            video->offset = offset;
+                            Mode[mbnum] = mode;
+                            video->headerInfo.CBP[mbnum] = CBP;
+
+                            for (k = 0; k < 6; k++)
+                            {
+                                M4VENC_MEMCPY(video->outputMB->block[k], outputMB[k], sizeof(Short) << 6);
+                            }
+
+                            return status;
+                        }
+                    }
+                }
+                else  /* NO RESYNC MARKER , return when buffer is full*/
+                {
+
+                    if (mbnum < nTotalMB - 1 && currVol->stream->byteCount + bs1->byteCount + 1 >= currVol->stream->bufferSize)
+                    {
+                        /* find maximum bytes to fit in the buffer */
+                        byteCount = currVol->stream->bufferSize - currVol->stream->byteCount - 1;
+
+                        num_bits = BitstreamGetPos(bs1) - (byteCount << 3);
+                        BitstreamRepos(bs1, byteCount, 0);
+                        status = BitstreamAppendPacketNoOffset(currVol->stream, bs1);
+                        BitstreamFlushBits(bs1, num_bits);
+
+                        /* move on to next MB */
+                        mbnum++ ;
+                        offset += 16;
+                        video->outputMB->mb_x++;
+                        if (video->outputMB->mb_x >= currVol->nMBPerRow)
+                        {
+                            video->outputMB->mb_x = 0;
+                            video->outputMB->mb_y++;
+                            offset += (lx << 4) - width;
+                        }
+                        video->mbnum = mbnum;
+                        video->offset = offset;
+                        video->sliceNo[mbnum] = slice_counter;
+                        return status;
+                    }
+                }
+            }
+#endif /* H263_ONLY */
+            offset += 16;
+            mbnum++; /* has to increment before SCD, to preserve Mode[mbnum] */
+
+        } /* End of For ind_x */
+
+        offset += (lx << 4) - width;
+
+        if (currVol->shortVideoHeader)  /* ShortVideoHeader = 1 */
+        {
+#ifdef H263_GOB_CHANGES
+            slice_counter++;
+            video->header_bits += BitstreamShortHeaderByteAlignStuffing(bs1);
+#endif
+            //video->header_bits+=BitstreamShortHeaderByteAlignStuffing(bs1);
+
+            /* check if time to packetize */
+            if (currVol->stream->byteCount + bs1->byteCount > currVol->stream->bufferSize)
+            {
+                if (byteCount == byteCount1) /* a single GOB bigger than packet size */
+                {
+                    status = BitstreamAppendPacketNoOffset(currVol->stream, bs1);
+                    status = PV_END_OF_BUF;
+                    video->end_of_buf = 1;
+                    start_packet_header = 1;
+                }
+                else    /* for short_header scooch back to previous GOB */
+                {
+                    num_bits = ((bs1->byteCount - byteCount) << 3);
+                    //num_bits = ((bs1->byteCount<<3) + bs1->bitCount) - ((byteCount<<3) + bitCount);
+                    BitstreamRepos(bs1, byteCount, 0);
+                    //BitstreamRepos(bs1,byteCount,bitCount);
+//                  k = currVol->stream->byteCount; /* save state before appending */
+                    status = BitstreamAppendPacketNoOffset(currVol->stream, bs1);
+                    BitstreamFlushBits(bs1, num_bits);
+//                  if(mbnum == nTotalMB || k + bs1->byteCount >= currVol->stream->bufferSize){
+                    /* last GOB or current one with larger size will be returned next run */
+//                      status = PV_END_OF_BUF;
+//                      video->end_of_buf = 1;
+//                  }
+                    start_packet_header = 1;
+                    if (mbnum == nTotalMB) /* there's one more GOB to packetize for the next round */
+                    {
+                        status = PV_END_OF_BUF;
+                        video->end_of_buf = 1;
+                    }
+                }
+
+                if (mbnum < nTotalMB) /* return here */
+                {
+                    /* move on to next MB */
+                    video->outputMB->mb_x = 0;
+                    video->outputMB->mb_y++;
+                    video->mbnum = mbnum;
+                    video->offset = offset;
+                    video->sliceNo[mbnum] = slice_counter;
+                    return status;
+                }
+            }
+            else if (mbnum < nTotalMB) /* do not write GOB header if end of vop */
+            {
+                bitCount = BitstreamGetPos(bs1);
+                byteCount = bitCount >> 3;  /* save the position before GOB header */
+                bitCount = bitCount & 0x7;
+#ifdef H263_GOB_CHANGES
+                video->header_bits -= BitstreamGetPos(bs1); /* Header Bits */
+                status = EncodeGOBHeader(video, slice_counter, QP, 1);         /* Encode GOB Header */
+                video->header_bits += BitstreamGetPos(bs1); /* Header Bits */
+#endif
+            }
+        }
+
+    } /* End of For ind_y */
+#ifndef H263_ONLY
+    if (!currVol->shortVideoHeader) /* Combined Mode*/
+    {
+        if (!currVol->ResyncMarkerDisable) /* Resync Markers */
+        {
+
+            if (!start_packet_header)
+            {
+
+                video->header_bits += BitstreamMpeg4ByteAlignStuffing(bs1);/* Byte Align  */
+
+                status = BitstreamAppendPacketNoOffset(currVol->stream, bs1);   /* Put Packet to Buffer */
+                if (status == PV_END_OF_BUF)
+                {
+                    video->end_of_buf = 1;
+                }
+                else
+                {
+                    BitstreamEncReset(bs1);
+                }
+            }
+        }
+        else   /* No Resync Markers */
+        {
+            video->header_bits += BitstreamMpeg4ByteAlignStuffing(bs1); /* Byte Align */
+            status = BitstreamAppendPacketNoOffset(currVol->stream, bs1); /* Initialize to 0 */
+            if (status == PV_END_OF_BUF)
+            {
+                video->end_of_buf = 1;
+            }
+            else
+            {
+                BitstreamEncReset(bs1);
+            }
+        }
+    }
+    else
+#endif /* H263_ONLY */
+    {
+        if (!start_packet_header) /* not yet packetized */
+        {
+            video->header_bits += BitstreamShortHeaderByteAlignStuffing(bs1);
+            status = BitstreamAppendPacketNoOffset(currVol->stream, bs1);
+            if (status == PV_END_OF_BUF)
+            {
+                video->end_of_buf = 1;
+            }
+            else
+            {
+                BitstreamEncReset(bs1);
+                video->end_of_buf = 0;
+            }
+        }
+    }
+
+    video->mbnum = mbnum;
+    if (mbnum < nTotalMB)
+        video->sliceNo[mbnum] = slice_counter;
+    video->offset = offset;
+
+    return status;
+}
+#endif  /* NO_SLICE_ENCODE */
+
+/* ======================================================================== */
+/*  Function : EncodeGOBHeader()                                            */
+/*  Date     : 09/05/2000                                                   */
+/*  History  :                                                              */
+/*  Purpose  : Encode a frame of MPEG4 bitstream in Combined mode.          */
+/*  In/out   :                                                              */
+/*  Return   :  PV_SUCCESS if successful else PV_FAIL                       */
+/*  Modified :                                                              */
+/*                                                                          */
+/* ======================================================================== */
+
+PV_STATUS EncodeGOBHeader(VideoEncData *video, Int GOB_number, Int quant_scale, Int bs1stream)
+{
+    PV_STATUS status = PV_SUCCESS;
+    BitstreamEncVideo *stream = (bs1stream ? video->bitstream1 : video->vol[video->currLayer]->stream);
+
+    status = BitstreamPutGT16Bits(stream, 17, GOB_RESYNC_MARKER); /* gob_resync_marker */
+    status = BitstreamPutBits(stream, 5, GOB_number);           /* Current gob_number */
+    status = BitstreamPutBits(stream, 2, video->currVop->gobFrameID); /* gob_frame_id */
+    status = BitstreamPutBits(stream, 5, quant_scale);              /* quant_scale */
+    return status;
+}
+
+
diff --git a/media/libstagefright/codecs/m4v_h263/enc/src/datapart_encode.cpp b/media/libstagefright/codecs/m4v_h263/enc/src/datapart_encode.cpp
new file mode 100644
index 0000000..16c8e79
--- /dev/null
+++ b/media/libstagefright/codecs/m4v_h263/enc/src/datapart_encode.cpp
@@ -0,0 +1,482 @@
+/* ------------------------------------------------------------------
+ * Copyright (C) 1998-2009 PacketVideo
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
+ * express or implied.
+ * See the License for the specific language governing permissions
+ * and limitations under the License.
+ * -------------------------------------------------------------------
+ */
+#ifndef H263_ONLY
+
+#include "mp4def.h"
+#include "mp4lib_int.h"
+#include "bitstream_io.h"
+#include "mp4enc_lib.h"
+#include "m4venc_oscl.h"
+
+/* ======================================================================== */
+/*  Function : EncodeFrameDataPartMode()                                    */
+/*  Date     : 09/6/2000                                                    */
+/*  History  :                                                              */
+/*  Purpose  : Encode a frame of MPEG4 bitstream in datapartitioning mode.  */
+/*  In/out   :                                                              */
+/*  Return   :  PV_SUCCESS if successful else PV_FAIL                       */
+/*  Modified :                                                              */
+/*                                                                          */
+/* ======================================================================== */
+PV_STATUS EncodeFrameDataPartMode(VideoEncData *video)
+{
+    PV_STATUS status = PV_SUCCESS;
+    Vol *currVol = video->vol[video->currLayer];
+    Vop *currVop = video->currVop;
+    VideoEncParams *encParams = video->encParams;
+    Int width = currVop->width; /* has to be Vop, for multiple of 16 */
+    Int lx = currVop->pitch; /*  with padding */
+    Int offset = 0;
+    Int ind_x, ind_y;
+    Int start_packet_header = 0;
+    UChar *QPMB = video->QPMB;
+    Int QP;
+    Int mbnum = 0, slice_counter = 0;
+    Int num_bits, packet_size = encParams->ResyncPacketsize;
+    BitstreamEncVideo *bs1 = video->bitstream1;
+    BitstreamEncVideo *bs2 = video->bitstream2;
+    BitstreamEncVideo *bs3 = video->bitstream3;
+    Int numHeaderBits;
+    approxDCT fastDCTfunction;
+    Int ncoefblck[6] = {64, 64, 64, 64, 64, 64}; /* for FastCodeMB,  5/18/2001 */
+    PV_STATUS(*CodeMB)(VideoEncData *, approxDCT *, Int, Int[]);
+    void (*MBVlcEncode)(VideoEncData*, Int[], void *);
+    void (*BlockCodeCoeff)(RunLevelBlock*, BitstreamEncVideo*, Int, Int, UChar);
+
+    video->QP_prev = currVop->quantizer;
+
+    numHeaderBits = BitstreamGetPos(bs1); /* Number of bits in VOP Header */
+
+    /* determine type of quantization   */
+#ifndef NO_MPEG_QUANT
+    if (currVol->quantType == 0)
+        CodeMB = &CodeMB_H263;
+    else
+        CodeMB = &CodeMB_MPEG;
+#else
+    CodeMB = &CodeMB_H263;
+#endif
+
+    /* determine which functions to be used, in MB-level */
+    if (currVop->predictionType == P_VOP)
+        MBVlcEncode = &MBVlcEncodeDataPar_P_VOP;
+    else if (currVop->predictionType == I_VOP)
+        MBVlcEncode = &MBVlcEncodeDataPar_I_VOP;
+    else /* B_VOP not implemented yet */
+        return PV_FAIL;
+
+    /* determine which VLC table to be used */
+    if (currVol->shortVideoHeader)
+        BlockCodeCoeff = &BlockCodeCoeff_ShortHeader;
+#ifndef NO_RVLC
+    else if (currVol->useReverseVLC)
+        BlockCodeCoeff = &BlockCodeCoeff_RVLC;
+#endif
+    else
+        BlockCodeCoeff = &BlockCodeCoeff_Normal;
+
+    video->usePrevQP = 0;
+
+    for (ind_y = 0; ind_y < currVol->nMBPerCol; ind_y++)    /* Col MB Loop */
+    {
+
+        video->outputMB->mb_y = ind_y; /*  5/28/01 */
+
+        for (ind_x = 0; ind_x < currVol->nMBPerRow; ind_x++)  /* Row MB Loop */
+        {
+            video->outputMB->mb_x = ind_x; /*  5/28/01 */
+            video->mbnum = mbnum;
+            video->sliceNo[mbnum] = slice_counter;      /* Update MB slice number */
+            QP = QPMB[mbnum];   /* always read new QP */
+
+            /****************************************************************************************/
+            /* MB Prediction:Put into MC macroblock, substract from currVop, put in predMB */
+            /****************************************************************************************/
+
+            getMotionCompensatedMB(video, ind_x, ind_y, offset);
+
+            if (start_packet_header)
+            {
+                slice_counter++;                        /* Increment slice counter */
+                video->sliceNo[mbnum] = slice_counter;  /* Update MB slice number*/
+                video->header_bits -= BitstreamGetPos(bs1); /* Header Bits */
+                video->QP_prev = currVop->quantizer;                        /* store QP */
+                status = EncodeVideoPacketHeader(video, mbnum, video->QP_prev, 0);
+                video->header_bits += BitstreamGetPos(bs1); /* Header Bits */
+                numHeaderBits = BitstreamGetPos(bs1);
+                start_packet_header = 0;
+                video->usePrevQP = 0;
+            }
+
+            /***********************************************/
+            /* Code_MB:  DCT, Q, Q^(-1), IDCT, Motion Comp */
+            /***********************************************/
+
+            status = (*CodeMB)(video, &fastDCTfunction, (offset << 5) + QP, ncoefblck);
+
+            /************************************/
+            /* MB VLC Encode: VLC Encode MB     */
+            /************************************/
+
+            MBVlcEncode(video, ncoefblck, (void*)BlockCodeCoeff);
+
+            /*************************************************************/
+            /* Assemble Packets:  Assemble the MB VLC codes into Packets */
+            /*************************************************************/
+
+            /* INCLUDE VOP HEADER IN COUNT */
+
+            num_bits = BitstreamGetPos(bs1) + BitstreamGetPos(bs2) +
+                       BitstreamGetPos(bs3) - numHeaderBits;
+
+            /* Assemble_Packet(video) */
+
+            if (num_bits > packet_size)
+            {
+                if (video->currVop->predictionType == I_VOP)
+                    BitstreamPutGT16Bits(bs1, 19, DC_MARKER);   /* Add dc_marker */
+                else
+                    BitstreamPutGT16Bits(bs1, 17, MOTION_MARKER_COMB); /*Add motion_marker*/
+                BitstreamAppendEnc(bs1, bs2);   /* Combine bs1 and bs2 */
+                BitstreamAppendEnc(bs1, bs3);   /* Combine bs1 and bs3 */
+                video->header_bits += BitstreamMpeg4ByteAlignStuffing(bs1); /* Byte align Packet */
+
+                status = BitstreamAppendPacket(currVol->stream, bs1); /* Put Packet to Buffer */
+                /* continue even if status == PV_END_OF_BUF, to get the stats */
+
+                BitstreamEncReset(bs1); /* Initialize to 0 */
+                BitstreamEncReset(bs2);
+                BitstreamEncReset(bs3);
+                start_packet_header = 1;
+            }
+            mbnum++;
+            offset += 16;
+        } /* End of For ind_x */
+
+        offset += (lx << 4) - width;
+    } /* End of For ind_y */
+
+    if (!start_packet_header)
+    {
+        if (video->currVop->predictionType == I_VOP)
+        {
+            BitstreamPutGT16Bits(bs1, 19, DC_MARKER);   /* Add dc_marker */
+            video->header_bits += 19;
+        }
+        else
+        {
+            BitstreamPutGT16Bits(bs1, 17, MOTION_MARKER_COMB); /* Add motion_marker */
+            video->header_bits += 17;
+        }
+        BitstreamAppendEnc(bs1, bs2);
+        BitstreamAppendEnc(bs1, bs3);
+        video->header_bits += BitstreamMpeg4ByteAlignStuffing(bs1); /* Byte align Packet */
+        status = BitstreamAppendPacket(currVol->stream, bs1); /* Put Packet to Buffer */
+        /* continue even if status == PV_END_OF_BUF, to get the stats */
+        BitstreamEncReset(bs1); /* Initialize to 0 */
+        BitstreamEncReset(bs2);
+        BitstreamEncReset(bs3);
+    }
+
+    return status; /* if status == PV_END_OF_BUF, this frame will be pre-skipped */
+}
+
+#ifndef  NO_SLICE_ENCODE
+/* ======================================================================== */
+/*  Function : EncodeSliceDataPartMode()                                    */
+/*  Date     : 04/19/2002                                                   */
+/*  History  :                                                              */
+/*  Purpose  : Encode a slice of MPEG4 bitstream in DataPar mode and save   */
+/*              the current MB to continue next time it is called.          */
+/*  In/out   :                                                              */
+/*  Return   :  PV_SUCCESS if successful else PV_FAIL                       */
+/*  Modified :                                                              */
+/*                                                                          */
+/* ======================================================================== */
+PV_STATUS EncodeSliceDataPartMode(VideoEncData *video)
+{
+    PV_STATUS status = PV_SUCCESS;
+    Vol *currVol = video->vol[video->currLayer];
+    Vop *currVop = video->currVop;
+    UChar mode, *Mode = video->headerInfo.Mode;
+    VideoEncParams *encParams = video->encParams;
+    Int nTotalMB = currVol->nTotalMB;
+    Int width = currVop->width; /* has to be Vop, for multiple of 16 */
+    Int lx = currVop->pitch; /* , with pading */
+    UChar *QPMB = video->QPMB;
+    Int QP;
+    Int ind_x = video->outputMB->mb_x, ind_y = video->outputMB->mb_y;
+    Int offset = video->offset;                 /* get current MB location */
+    Int mbnum = video->mbnum, slice_counter = video->sliceNo[mbnum]; /* get current MB location */
+    Int firstMB = mbnum;
+    Int start_packet_header = (mbnum != 0);
+    Int num_bits = 0;
+    Int packet_size = encParams->ResyncPacketsize - 1 - (currVop->predictionType == I_VOP ? 19 : 17);
+    BitstreamEncVideo *bs1 = video->bitstream1;
+    BitstreamEncVideo *bs2 = video->bitstream2;
+    BitstreamEncVideo *bs3 = video->bitstream3;
+    Int bitCount1 = 0, bitCount2 = 0, bitCount3 = 0, byteCount1 = 0, byteCount2 = 0, byteCount3 = 0;
+    Int numHeaderBits = 0;
+    approxDCT fastDCTfunction;
+    Int ncoefblck[6] = {64, 64, 64, 64, 64, 64}; /* for FastCodeMB,  5/18/2001 */
+    UChar CBP;
+    Short outputMB[6][64];
+    PV_STATUS(*CodeMB)(VideoEncData *, approxDCT *, Int, Int[]);
+    void (*MBVlcEncode)(VideoEncData*, Int[], void *);
+    void (*BlockCodeCoeff)(RunLevelBlock*, BitstreamEncVideo*, Int, Int, UChar);
+    Int k;
+
+    video->QP_prev = 31;
+
+    if (video->end_of_buf) /* left-over from previous run */
+    {
+        status = BitstreamAppendPacketNoOffset(currVol->stream, bs1);
+        if (status != PV_END_OF_BUF)
+        {
+            BitstreamEncReset(bs1);
+            video->end_of_buf = 0;
+        }
+        return status;
+    }
+
+    if (mbnum == 0) /* only do this at the start of a frame */
+    {
+        QPMB[0] = video->QP_prev = QP = currVop->quantizer;
+        video->usePrevQP = 0;
+
+        numHeaderBits = BitstreamGetPos(bs1); /* Number of bits in VOP Header */
+
+    }
+
+
+    /* Re-assign fast functions on every slice, don't have to put it in the memory */
+    QP = QPMB[mbnum];
+    if (mbnum > 0)   video->QP_prev = QPMB[mbnum-1];
+
+    /* determine type of quantization   */
+#ifndef NO_MPEG_QUANT
+    if (currVol->quantType == 0)
+        CodeMB = &CodeMB_H263;
+    else
+        CodeMB = &CodeMB_MPEG;
+#else
+    CodeMB = &CodeMB_H263;
+#endif
+
+    /* determine which functions to be used, in MB-level */
+    if (currVop->predictionType == P_VOP)
+        MBVlcEncode = &MBVlcEncodeDataPar_P_VOP;
+    else if (currVop->predictionType == I_VOP)
+        MBVlcEncode = &MBVlcEncodeDataPar_I_VOP;
+    else /* B_VOP not implemented yet */
+        return PV_FAIL;
+
+    /* determine which VLC table to be used */
+#ifndef NO_RVLC
+    if (currVol->useReverseVLC)
+        BlockCodeCoeff = &BlockCodeCoeff_RVLC;
+    else
+#endif
+        BlockCodeCoeff = &BlockCodeCoeff_Normal;
+
+    if (mbnum != 0)
+    {
+        goto JUMP_IN;
+    }
+
+    for (ind_y = 0; ind_y < currVol->nMBPerCol; ind_y++)    /* Col MB Loop */
+    {
+
+        video->outputMB->mb_y = ind_y; /*  5/28/01 */
+
+        for (ind_x = 0; ind_x < currVol->nMBPerRow; ind_x++)  /* Row MB Loop */
+        {
+
+            video->outputMB->mb_x = ind_x; /*  5/28/01 */
+            video->mbnum = mbnum;
+            video->sliceNo[mbnum] = slice_counter;      /* Update MB slice number */
+
+            /****************************************************************************************/
+            /* MB Prediction:Put into MC macroblock, substract from currVop, put in predMB */
+            /****************************************************************************************/
+            getMotionCompensatedMB(video, ind_x, ind_y, offset);
+
+JUMP_IN:
+
+            QP = QPMB[mbnum];   /* always read new QP */
+
+            if (start_packet_header)
+            {
+                slice_counter++;                        /* Increment slice counter */
+                video->sliceNo[mbnum] = slice_counter;  /* Update MB slice number*/
+                video->QP_prev = currVop->quantizer;                        /* store QP */
+                num_bits = BitstreamGetPos(bs1);
+                status = EncodeVideoPacketHeader(video, mbnum, video->QP_prev, 0);
+                numHeaderBits = BitstreamGetPos(bs1) - num_bits;
+                video->header_bits += numHeaderBits; /* Header Bits */
+                start_packet_header = 0;
+                video->usePrevQP = 0;
+            }
+            else  /* don't encode the first MB in packet again */
+            {
+                /***********************************************/
+                /* Code_MB:  DCT, Q, Q^(-1), IDCT, Motion Comp */
+                /***********************************************/
+
+                status = (*CodeMB)(video, &fastDCTfunction, (offset << 5) + QP, ncoefblck);
+                for (k = 0; k < 6; k++)
+                {
+                    M4VENC_MEMCPY(outputMB[k], video->outputMB->block[k], sizeof(Short) << 6);
+                }
+            }
+
+            /************************************/
+            /* MB VLC Encode: VLC Encode MB     */
+            /************************************/
+
+            /* save the state before VLC encoding */
+            bitCount1 = BitstreamGetPos(bs1);
+            bitCount2 = BitstreamGetPos(bs2);
+            bitCount3 = BitstreamGetPos(bs3);
+            byteCount1 = bitCount1 >> 3;
+            byteCount2 = bitCount2 >> 3;
+            byteCount3 = bitCount3 >> 3;
+            bitCount1 &= 0x7;
+            bitCount2 &= 0x7;
+            bitCount3 &= 0x7;
+            mode = Mode[mbnum];
+            CBP = video->headerInfo.CBP[mbnum];
+
+            /*************************************/
+
+            MBVlcEncode(video, ncoefblck, (void*)BlockCodeCoeff);
+
+            /*************************************************************/
+            /* Assemble Packets:  Assemble the MB VLC codes into Packets */
+            /*************************************************************/
+
+            num_bits = BitstreamGetPos(bs1) + BitstreamGetPos(bs2) +
+                       BitstreamGetPos(bs3);// - numHeaderBits; //include header bits
+
+            /* Assemble_Packet(video) */
+            if (num_bits > packet_size && mbnum != firstMB)  /* encoding at least one more MB*/
+            {
+
+                BitstreamRepos(bs1, byteCount1, bitCount1); /* rewind one MB */
+                BitstreamRepos(bs2, byteCount2, bitCount2); /* rewind one MB */
+                BitstreamRepos(bs3, byteCount3, bitCount3); /* rewind one MB */
+
+                if (video->currVop->predictionType == I_VOP)
+                {
+                    BitstreamPutGT16Bits(bs1, 19, DC_MARKER);   /* Add dc_marker */
+                    video->header_bits += 19;
+                }
+                else
+                {
+                    BitstreamPutGT16Bits(bs1, 17, MOTION_MARKER_COMB); /*Add motion_marker*/
+                    video->header_bits += 17;
+                }
+
+                status = BitstreamAppendEnc(bs1, bs2);  /* Combine with bs2 */
+                status = BitstreamAppendEnc(bs1, bs3);  /* Combine with bs3 */
+
+                video->header_bits += BitstreamMpeg4ByteAlignStuffing(bs1); /* Byte align Packet */
+                status = BitstreamAppendPacketNoOffset(currVol->stream, bs1);
+
+                BitstreamEncReset(bs2);
+                BitstreamEncReset(bs3);
+
+                if (status == PV_END_OF_BUF) /* if cannot fit a buffer */
+                {
+                    video->end_of_buf = 1;
+                }
+                else
+                {
+                    BitstreamEncReset(bs1);
+                }
+
+                start_packet_header = 1;
+
+                if (mbnum < nTotalMB || video->end_of_buf) /* return here */
+                {
+                    video->mbnum = mbnum;
+                    video->sliceNo[mbnum] = slice_counter;
+                    video->offset = offset;
+                    Mode[mbnum] = mode;
+                    video->headerInfo.CBP[mbnum] = CBP;
+
+                    for (k = 0; k < 6; k++)
+                    {
+                        M4VENC_MEMCPY(video->outputMB->block[k], outputMB[k], sizeof(Short) << 6);
+                    }
+
+                    return status;
+                }
+            }
+
+            offset += 16;
+            mbnum++; /* has to increment before SCD, to preserve Mode[mbnum] */
+        } /* End of For ind_x */
+
+        offset += (lx << 4) - width;
+
+    } /* End of For ind_y */
+
+    if (!start_packet_header)
+    {
+        if (video->currVop->predictionType == I_VOP)
+        {
+            BitstreamPutGT16Bits(bs1, 19, DC_MARKER);   /* Add dc_marker */
+            video->header_bits += 19;
+        }
+        else
+        {
+            BitstreamPutGT16Bits(bs1, 17, MOTION_MARKER_COMB); /*Add motion_marker*/
+            video->header_bits += 17;
+        }
+
+        status = BitstreamAppendEnc(bs1, bs2);  /* Combine with bs2 */
+        status = BitstreamAppendEnc(bs1, bs3);  /* Combine with bs3 */
+
+        video->header_bits += BitstreamMpeg4ByteAlignStuffing(bs1); /* Byte align Packet */
+        status = BitstreamAppendPacketNoOffset(currVol->stream, bs1);
+
+        BitstreamEncReset(bs2);
+        BitstreamEncReset(bs3);
+
+        if (status == PV_END_OF_BUF)
+        {
+            video->end_of_buf = 1;
+        }
+        else
+        {
+            BitstreamEncReset(bs1);
+        }
+    }
+
+    video->mbnum = mbnum;
+    if (mbnum < nTotalMB)
+        video->sliceNo[mbnum] = slice_counter;
+    video->offset = offset;
+
+    return status;
+}
+#endif /* NO_SLICE_ENCODE */
+#endif /* H263_ONLY */
+
+
diff --git a/media/libstagefright/codecs/m4v_h263/enc/src/dct.cpp b/media/libstagefright/codecs/m4v_h263/enc/src/dct.cpp
new file mode 100644
index 0000000..fa50eeb
--- /dev/null
+++ b/media/libstagefright/codecs/m4v_h263/enc/src/dct.cpp
@@ -0,0 +1,1283 @@
+/* ------------------------------------------------------------------
+ * Copyright (C) 1998-2009 PacketVideo
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
+ * express or implied.
+ * See the License for the specific language governing permissions
+ * and limitations under the License.
+ * -------------------------------------------------------------------
+ */
+#include "mp4enc_lib.h"
+#include "mp4lib_int.h"
+#include "dct_inline.h"
+
+#define FDCT_SHIFT 10
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
+    /**************************************************************************/
+    /*  Function:   BlockDCT_AANwSub
+        Date:       7/31/01
+        Input:
+        Output:     out[64] ==> next block
+        Purpose:    Do subtraction for zero MV first
+        Modified:
+    **************************************************************************/
+
+    Void BlockDCT_AANwSub(Short *out, UChar *cur, UChar *pred, Int width)
+    {
+        Short *dst;
+        Int k0, k1, k2, k3, k4, k5, k6, k7;
+        Int round;
+        Int k12 = 0x022A02D4;
+        Int k14 = 0x0188053A;
+        Int abs_sum;
+        Int mask;
+        Int tmp, tmp2;
+        Int ColTh;
+
+        dst = out + 64 ;
+        ColTh = *dst;
+        out += 128;
+        round = 1 << (FDCT_SHIFT - 1);
+
+        do  /* fdct_nextrow */
+        {
+            /* assuming the block is word-aligned */
+            mask = 0x1FE;
+            tmp = *((Int*) cur);    /* contains 4 pixels */
+            tmp2 = *((Int*) pred); /* prediction 4 pixels */
+            k0 = tmp2 & 0xFF;
+            k1 = mask & (tmp << 1);
+            k0 = k1 - (k0 << 1);
+            k1 = (tmp2 >> 8) & 0xFF;
+            k2 = mask & (tmp >> 7);
+            k1 = k2 - (k1 << 1);
+            k2 = (tmp2 >> 16) & 0xFF;
+            k3 = mask & (tmp >> 15);
+            k2 = k3 - (k2 << 1);
+            k3 = (tmp2 >> 24) & 0xFF;
+            k4 = mask & (tmp >> 23);
+            k3 = k4 - (k3 << 1);
+            tmp = *((Int*)(cur + 4));   /* another 4 pixels */
+            tmp2 = *((Int*)(pred + 4));
+            k4 = tmp2 & 0xFF;
+            k5 = mask & (tmp << 1);
+            k4 = k5 - (k4 << 1);
+            k5 = (tmp2 >> 8) & 0xFF;
+            k6 = mask & (tmp >> 7);
+            k5 = k6 - (k5 << 1);
+            k6 = (tmp2 >> 16) & 0xFF;
+            k7 = mask & (tmp >> 15);
+            k6 = k7 - (k6 << 1);
+            k7 = (tmp2 >> 24) & 0xFF;
+            tmp = mask & (tmp >> 23);
+            k7 = tmp - (k7 << 1);
+            cur += width;
+            pred += 16;
+
+            /* fdct_1 */
+            k0 = k0 + k7;
+            k7 = k0 - (k7 << 1);
+            k1 = k1 + k6;
+            k6 = k1 - (k6 << 1);
+            k2 = k2 + k5;
+            k5 = k2 - (k5 << 1);
+            k3 = k3 + k4;
+            k4 = k3 - (k4 << 1);
+
+            k0 = k0 + k3;
+            k3 = k0 - (k3 << 1);
+            k1 = k1 + k2;
+            k2 = k1 - (k2 << 1);
+
+            k0 = k0 + k1;
+            k1 = k0 - (k1 << 1);
+            /**********/
+            dst[0] = k0;
+            dst[4] = k1; /* col. 4 */
+            /* fdct_2 */
+            k4 = k4 + k5;
+            k5 = k5 + k6;
+            k6 = k6 + k7;
+            k2 = k2 + k3;
+            /* MUL2C k2,k5,724,FDCT_SHIFT */
+            /* k0, k1 become scratch */
+            /* assume FAST MULTIPLY */
+            k1 = mla724(k12, k5, round);
+            k0 = mla724(k12, k2, round);
+
+            k5 = k1 >> FDCT_SHIFT;
+            k2 = k0 >> FDCT_SHIFT;
+            /*****************/
+            k2 = k2 + k3;
+            k3 = (k3 << 1) - k2;
+            /********/
+            dst[2] = k2;        /* col. 2 */
+            k3 <<= 1;       /* scale up col. 6 */
+            dst[6] = k3; /* col. 6 */
+            /* fdct_3 */
+            /* ROTATE k4,k6,392,946, FDCT_SHIFT */
+            /* assume FAST MULTIPLY */
+            /* k0, k1 are output */
+            k0 = k4 - k6;
+
+            k1 = mla392(k0, k14, round);
+            k0 = mla554(k4, k12, k1);
+            k1 = mla1338(k6, k14, k1);
+
+            k4 = k0 >> FDCT_SHIFT;
+            k6 = k1 >> FDCT_SHIFT;
+            /***********************/
+            k5 = k5 + k7;
+            k7 = (k7 << 1) - k5;
+            k4 = k4 + k7;
+            k7 = (k7 << 1) - k4;
+            k5 = k5 + k6;
+            k4 <<= 1;       /* scale up col.5 */
+            k6 = k5 - (k6 << 1);
+            /********/
+            dst[5] = k4;    /* col. 5 */
+            k6 <<= 2;       /* scale up col. 7 */
+            dst[1] = k5;    /* col. 1 */
+            dst[7] = k6;    /* col. 7 */
+            dst[3] = k7;    /* col. 3 */
+            dst += 8;
+        }
+        while (dst < out);
+
+        out -= 64;
+        dst = out + 8;
+
+        /*  Vertical Block Loop  */
+        do  /* Vertical 8xDCT loop */
+        {
+            k0 = out[0];
+            k1 = out[8];
+            k2 = out[16];
+            k3 = out[24];
+            k4 = out[32];
+            k5 = out[40];
+            k6 = out[48];
+            k7 = out[56];
+            /* deadzone thresholding for column */
+
+            abs_sum = sum_abs(k0, k1, k2, k3, k4, k5, k6, k7);
+
+            if (abs_sum < ColTh)
+            {
+                out[0] = 0x7fff;
+                out++;
+                continue;
+            }
+
+            /* fdct_1 */
+            k0 = k0 + k7;
+            k7 = k0 - (k7 << 1);
+            k1 = k1 + k6;
+            k6 = k1 - (k6 << 1);
+            k2 = k2 + k5;
+            k5 = k2 - (k5 << 1);
+            k3 = k3 + k4;
+            k4 = k3 - (k4 << 1);
+
+            k0 = k0 + k3;
+            k3 = k0 - (k3 << 1);
+            k1 = k1 + k2;
+            k2 = k1 - (k2 << 1);
+
+            k0 = k0 + k1;
+            k1 = k0 - (k1 << 1);
+            /**********/
+            out[32] = k1; /* row 4 */
+            out[0] = k0; /* row 0 */
+            /* fdct_2 */
+            k4 = k4 + k5;
+            k5 = k5 + k6;
+            k6 = k6 + k7;
+            k2 = k2 + k3;
+            /* MUL2C k2,k5,724,FDCT_SHIFT */
+            /* k0, k1 become scratch */
+            /* assume FAST MULTIPLY */
+            k1 = mla724(k12, k5, round);
+            k0 = mla724(k12, k2, round);
+
+            k5 = k1 >> FDCT_SHIFT;
+            k2 = k0 >> FDCT_SHIFT;
+            /*****************/
+            k2 = k2 + k3;
+            k3 = (k3 << 1) - k2;
+            k3 <<= 1;       /* scale up col. 6 */
+            /********/
+            out[48] = k3;   /* row 6 */
+            out[16] = k2;   /* row 2 */
+            /* fdct_3 */
+            /* ROTATE k4,k6,392,946, FDCT_SHIFT */
+            /* assume FAST MULTIPLY */
+            /* k0, k1 are output */
+            k0 = k4 - k6;
+
+            k1 = mla392(k0, k14, round);
+            k0 = mla554(k4, k12, k1);
+            k1 = mla1338(k6, k14, k1);
+
+            k4 = k0 >> FDCT_SHIFT;
+            k6 = k1 >> FDCT_SHIFT;
+            /***********************/
+            k5 = k5 + k7;
+            k7 = (k7 << 1) - k5;
+            k4 = k4 + k7;
+            k7 = (k7 << 1) - k4;
+            k5 = k5 + k6;
+            k4 <<= 1;       /* scale up col. 5 */
+            k6 = k5 - (k6 << 1);
+            /********/
+            out[24] = k7 ;    /* row 3 */
+            k6 <<= 2;       /* scale up col. 7 */
+            out[56] = k6 ;   /* row 7 */
+            out[8] = k5 ;    /* row 1 */
+            out[40] = k4 ;   /* row 5 */
+            out++;
+        }
+        while ((UInt)out < (UInt)dst) ;
+
+        return ;
+    }
+
+    /**************************************************************************/
+    /*  Function:   Block4x4DCT_AANwSub
+        Date:       7/31/01
+        Input:
+        Output:     out[64] ==> next block
+        Purpose:    Do subtraction for zero MV first before 4x4 DCT
+        Modified:
+    **************************************************************************/
+
+    Void Block4x4DCT_AANwSub(Short *out, UChar *cur, UChar *pred, Int width)
+    {
+        Short *dst;
+        register Int k0, k1, k2, k3, k4, k5, k6, k7;
+        Int round;
+        Int k12 = 0x022A02D4;
+        Int k14 = 0x0188053A;
+        Int mask;
+        Int tmp, tmp2;
+        Int abs_sum;
+        Int ColTh;
+
+        dst = out + 64 ;
+        ColTh = *dst;
+        out += 128;
+        round = 1 << (FDCT_SHIFT - 1);
+
+        do  /* fdct_nextrow */
+        {
+            /* assuming the block is word-aligned */
+            mask = 0x1FE;
+            tmp = *((Int*) cur);    /* contains 4 pixels */
+            tmp2 = *((Int*) pred); /* prediction 4 pixels */
+            k0 = tmp2 & 0xFF;
+            k1 = mask & (tmp << 1);
+            k0 = k1 - (k0 << 1);
+            k1 = (tmp2 >> 8) & 0xFF;
+            k2 = mask & (tmp >> 7);
+            k1 = k2 - (k1 << 1);
+            k2 = (tmp2 >> 16) & 0xFF;
+            k3 = mask & (tmp >> 15);
+            k2 = k3 - (k2 << 1);
+            k3 = (tmp2 >> 24) & 0xFF;
+            k4 = mask & (tmp >> 23);
+            k3 = k4 - (k3 << 1);
+            tmp = *((Int*)(cur + 4));   /* another 4 pixels */
+            tmp2 = *((Int*)(pred + 4));
+            k4 = tmp2 & 0xFF;
+            k5 = mask & (tmp << 1);
+            k4 = k5 - (k4 << 1);
+            k5 = (tmp2 >> 8) & 0xFF;
+            k6 = mask & (tmp >> 7);
+            k5 = k6 - (k5 << 1);
+            k6 = (tmp2 >> 16) & 0xFF;
+            k7 = mask & (tmp >> 15);
+            k6 = k7 - (k6 << 1);
+            k7 = (tmp2 >> 24) & 0xFF;
+            tmp = mask & (tmp >> 23);
+            k7 = tmp - (k7 << 1);
+            cur += width;
+            pred += 16;
+
+            /* fdct_1 */
+            k0 = k0 + k7;
+            k7 = k0 - (k7 << 1);
+            k1 = k1 + k6;
+            k6 = k1 - (k6 << 1);
+            k2 = k2 + k5;
+            k5 = k2 - (k5 << 1);
+            k3 = k3 + k4;
+            k4 = k3 - (k4 << 1);
+
+            k0 = k0 + k3;
+            k3 = k0 - (k3 << 1);
+            k1 = k1 + k2;
+            k2 = k1 - (k2 << 1);
+
+            k0 = k0 + k1;
+            /**********/
+            dst[0] = k0;
+            /* fdct_2 */
+            k4 = k4 + k5;
+            k5 = k5 + k6;
+            k6 = k6 + k7;
+            k2 = k2 + k3;
+            /* MUL2C k2,k5,724,FDCT_SHIFT */
+            /* k0, k1 become scratch */
+            /* assume FAST MULTIPLY */
+            k1 = mla724(k12, k5, round);
+            k0 = mla724(k12, k2, round);
+
+            k5 = k1 >> FDCT_SHIFT;
+            k2 = k0 >> FDCT_SHIFT;
+            /*****************/
+            k2 = k2 + k3;
+            /********/
+            dst[2] = k2;        /* col. 2 */
+            /* fdct_3 */
+            /* ROTATE k4,k6,392,946, FDCT_SHIFT */
+            /* assume FAST MULTIPLY */
+            /* k0, k1 are output */
+            k0 = k4 - k6;
+
+            k1 = mla392(k0, k14, round);
+            k0 = mla554(k4, k12, k1);
+            k1 = mla1338(k6, k14, k1);
+
+            k4 = k0 >> FDCT_SHIFT;
+            k6 = k1 >> FDCT_SHIFT;
+            /***********************/
+            k5 = k5 + k7;
+            k7 = (k7 << 1) - k5;
+            k7 = k7 - k4;
+            k5 = k5 + k6;
+            /********/
+            dst[1] = k5;        /* col. 1 */
+            dst[3] = k7;        /* col. 3 */
+            dst += 8;
+        }
+        while (dst < out);
+
+        out -= 64;
+        dst = out + 4;
+
+        /*  Vertical Block Loop  */
+        do  /* Vertical 8xDCT loop */
+        {
+            k0 = out[0];
+            k1 = out[8];
+            k2 = out[16];
+            k3 = out[24];
+            k4 = out[32];
+            k5 = out[40];
+            k6 = out[48];
+            k7 = out[56];
+
+            abs_sum = sum_abs(k0, k1, k2, k3, k4, k5, k6, k7);
+
+            if (abs_sum < ColTh)
+            {
+                out[0] = 0x7fff;
+                out++;
+                continue;
+            }
+            /* fdct_1 */
+            k0 = k0 + k7;
+            k7 = k0 - (k7 << 1);
+            k1 = k1 + k6;
+            k6 = k1 - (k6 << 1);
+            k2 = k2 + k5;
+            k5 = k2 - (k5 << 1);
+            k3 = k3 + k4;
+            k4 = k3 - (k4 << 1);
+
+            k0 = k0 + k3;
+            k3 = k0 - (k3 << 1);
+            k1 = k1 + k2;
+            k2 = k1 - (k2 << 1);
+
+            k0 = k0 + k1;
+            /**********/
+            out[0] = k0;   /* row 0 */
+            /* fdct_2 */
+            k4 = k4 + k5;
+            k5 = k5 + k6;
+            k6 = k6 + k7;
+            k2 = k2 + k3;
+            /* MUL2C k2,k5,724,FDCT_SHIFT */
+            /* k0, k1 become scratch */
+            /* assume FAST MULTIPLY */
+            k1 = mla724(k12, k5, round);
+            k0 = mla724(k12, k2, round);
+
+            k5 = k1 >> FDCT_SHIFT;
+            k2 = k0 >> FDCT_SHIFT;
+            /*****************/
+            k2 = k2 + k3;
+            /********/
+            out[16] = k2;           /* row 2 */
+            /* fdct_3 */
+            /* ROTATE k4,k6,392,946, FDCT_SHIFT */
+            /* assume FAST MULTIPLY */
+            /* k0, k1 are output */
+            k0 = k4 - k6;
+
+            k1 = mla392(k0, k14, round);
+            k0 = mla554(k4, k12, k1);
+            k1 = mla1338(k6, k14, k1);
+
+            k4 = k0 >> FDCT_SHIFT;
+            k6 = k1 >> FDCT_SHIFT;
+            /***********************/
+            k5 = k5 + k7;
+            k7 = (k7 << 1) - k5;
+            k7 = k7 - k4 ;
+            k5 = k5 + k6;
+            /********/
+            out[24] = k7 ;      /* row 3 */
+            out[8] = k5 ;       /* row 1 */
+            out++;
+        }
+        while ((UInt)out < (UInt)dst) ;
+
+        return ;
+    }
+
+    /**************************************************************************/
+    /*  Function:   Block2x2DCT_AANwSub
+        Date:       7/31/01
+        Input:
+        Output:     out[64] ==> next block
+        Purpose:    Do subtraction for zero MV first before 2x2 DCT
+        Modified:
+    **************************************************************************/
+
+
+    Void Block2x2DCT_AANwSub(Short *out, UChar *cur, UChar *pred, Int width)
+    {
+        Short *dst;
+        register Int k0, k1, k2, k3, k4, k5, k6, k7;
+        Int round;
+        Int k12 = 0x022A02D4;
+        Int k14 = 0x018803B2;
+        Int mask;
+        Int tmp, tmp2;
+        Int abs_sum;
+        Int ColTh;
+
+        dst = out + 64 ;
+        ColTh = *dst;
+        out += 128;
+        round = 1 << (FDCT_SHIFT - 1);
+
+        do  /* fdct_nextrow */
+        {
+            /* assuming the block is word-aligned */
+            mask = 0x1FE;
+            tmp = *((Int*) cur);    /* contains 4 pixels */
+            tmp2 = *((Int*) pred); /* prediction 4 pixels */
+            k0 = tmp2 & 0xFF;
+            k1 = mask & (tmp << 1);
+            k0 = k1 - (k0 << 1);
+            k1 = (tmp2 >> 8) & 0xFF;
+            k2 = mask & (tmp >> 7);
+            k1 = k2 - (k1 << 1);
+            k2 = (tmp2 >> 16) & 0xFF;
+            k3 = mask & (tmp >> 15);
+            k2 = k3 - (k2 << 1);
+            k3 = (tmp2 >> 24) & 0xFF;
+            k4 = mask & (tmp >> 23);
+            k3 = k4 - (k3 << 1);
+            tmp = *((Int*)(cur + 4));   /* another 4 pixels */
+            tmp2 = *((Int*)(pred + 4));
+            k4 = tmp2 & 0xFF;
+            k5 = mask & (tmp << 1);
+            k4 = k5 - (k4 << 1);
+            k5 = (tmp2 >> 8) & 0xFF;
+            k6 = mask & (tmp >> 7);
+            k5 = k6 - (k5 << 1);
+            k6 = (tmp2 >> 16) & 0xFF;
+            k7 = mask & (tmp >> 15);
+            k6 = k7 - (k6 << 1);
+            k7 = (tmp2 >> 24) & 0xFF;
+            tmp = mask & (tmp >> 23);
+            k7 = tmp - (k7 << 1);
+            cur += width;
+            pred += 16;
+
+            /* fdct_1 */
+            k0 = k0 + k7;
+            k7 = k0 - (k7 << 1);
+            k1 = k1 + k6;
+            k6 = k1 - (k6 << 1);
+            k2 = k2 + k5;
+            k5 = k2 - (k5 << 1);
+            k3 = k3 + k4;
+            k4 = k3 - (k4 << 1);
+
+            k0 = k0 + k3;
+            k3 = k0 - (k3 << 1);
+            k1 = k1 + k2;
+            k2 = k1 - (k2 << 1);
+
+            k0 = k0 + k1;
+            /**********/
+            dst[0] = k0;
+            /* fdct_2 */
+            k4 = k4 + k5;
+            k5 = k5 + k6;
+            k6 = k6 + k7;
+            /* MUL2C k2,k5,724,FDCT_SHIFT */
+            /* k0, k1 become scratch */
+            /* assume FAST MULTIPLY */
+            k1 = mla724(k12, k5, round);
+
+            k5 = k1 >> FDCT_SHIFT;
+            /*****************/
+            /********/
+            /* fdct_3 */
+            /* ROTATE k4,k6,392,946, FDCT_SHIFT */
+            /* assume FAST MULTIPLY */
+            /* k0, k1 are output */
+            k1 = mla392(k4, k14, round);
+            k1 = mla946(k6, k14, k1);
+
+            k6 = k1 >> FDCT_SHIFT;
+            /***********************/
+            k5 = k5 + k7;
+            k5 = k5 + k6;
+            /********/
+            dst[1] = k5;
+            dst += 8;
+        }
+        while (dst < out);
+        out -= 64;
+        dst = out + 2;
+        /*  Vertical Block Loop  */
+        do  /* Vertical 8xDCT loop */
+        {
+            k0 = out[0];
+            k1 = out[8];
+            k2 = out[16];
+            k3 = out[24];
+            k4 = out[32];
+            k5 = out[40];
+            k6 = out[48];
+            k7 = out[56];
+
+            abs_sum = sum_abs(k0, k1, k2, k3, k4, k5, k6, k7);
+
+            if (abs_sum < ColTh)
+            {
+                out[0] = 0x7fff;
+                out++;
+                continue;
+            }
+            /* fdct_1 */
+            k0 = k0 + k7;
+            k7 = k0 - (k7 << 1);
+            k1 = k1 + k6;
+            k6 = k1 - (k6 << 1);
+            k2 = k2 + k5;
+            k5 = k2 - (k5 << 1);
+            k3 = k3 + k4;
+            k4 = k3 - (k4 << 1);
+
+            k0 = k0 + k3;
+            k3 = k0 - (k3 << 1);
+            k1 = k1 + k2;
+            k2 = k1 - (k2 << 1);
+
+            k0 = k0 + k1;
+            /**********/
+            out[0] = k0;        /* row 0 */
+            /* fdct_2 */
+            k4 = k4 + k5;
+            k5 = k5 + k6;
+            k6 = k6 + k7;
+            /* MUL2C k2,k5,724,FDCT_SHIFT */
+            /* k0, k1 become scratch */
+            /* assume FAST MULTIPLY */
+            k1 = mla724(k12, k5, round);
+
+            k5 = k1 >> FDCT_SHIFT;
+            /*****************/
+            /********/
+            /* fdct_3 */
+            /* ROTATE k4,k6,392,946, FDCT_SHIFT */
+            /* assume FAST MULTIPLY */
+            /* k0, k1 are output */
+            k1 = mla392(k4, k14, round);
+            k1 = mla946(k6, k14, k1);
+
+            k6 = k1 >> FDCT_SHIFT;
+            /***********************/
+            k5 = k5 + k7;
+            k5 = k5 + k6;
+            /********/
+            out[8] = k5 ;       /* row 1 */
+            out++;
+        }
+        while ((UInt)out < (UInt)dst) ;
+
+        return ;
+    }
+
+    /**************************************************************************/
+    /*  Function:   BlockDCT_AANIntra
+        Date:       8/9/01
+        Input:      rec
+        Output:     out[64] ==> next block
+        Purpose:    Input directly from rec frame.
+        Modified:
+    **************************************************************************/
+
+    Void BlockDCT_AANIntra(Short *out, UChar *cur, UChar *dummy2, Int width)
+    {
+        Short *dst;
+        Int k0, k1, k2, k3, k4, k5, k6, k7;
+        Int round;
+        Int k12 = 0x022A02D4;
+        Int k14 = 0x0188053A;
+        Int abs_sum;
+        Int mask;
+        Int *curInt, tmp;
+        Int ColTh;
+
+        OSCL_UNUSED_ARG(dummy2);
+
+        dst = out + 64 ;
+        ColTh = *dst;
+        out += 128;
+        round = 1 << (FDCT_SHIFT - 1);
+
+        do  /* fdct_nextrow */
+        {
+            mask = 0x1FE;
+            curInt = (Int*) cur;
+            tmp = curInt[0];    /* contains 4 pixels */
+            k0 = mask & (tmp << 1);
+            k1 = mask & (tmp >> 7);
+            k2 = mask & (tmp >> 15);
+            k3 = mask & (tmp >> 23);
+            tmp = curInt[1];    /* another 4 pixels */
+            k4 =  mask & (tmp << 1);
+            k5 =  mask & (tmp >> 7);
+            k6 =  mask & (tmp >> 15);
+            k7 =  mask & (tmp >> 23);
+            cur += width;
+            /* fdct_1 */
+            k0 = k0 + k7;
+            k7 = k0 - (k7 << 1);
+            k1 = k1 + k6;
+            k6 = k1 - (k6 << 1);
+            k2 = k2 + k5;
+            k5 = k2 - (k5 << 1);
+            k3 = k3 + k4;
+            k4 = k3 - (k4 << 1);
+
+            k0 = k0 + k3;
+            k3 = k0 - (k3 << 1);
+            k1 = k1 + k2;
+            k2 = k1 - (k2 << 1);
+
+            k0 = k0 + k1;
+            k1 = k0 - (k1 << 1);
+            /**********/
+            dst[0] = k0;
+            dst[4] = k1; /* col. 4 */
+            /* fdct_2 */
+            k4 = k4 + k5;
+            k5 = k5 + k6;
+            k6 = k6 + k7;
+            k2 = k2 + k3;
+            /* MUL2C k2,k5,724,FDCT_SHIFT */
+            /* k0, k1 become scratch */
+            /* assume FAST MULTIPLY */
+            k1 = mla724(k12, k5, round);
+            k0 = mla724(k12, k2, round);
+
+            k5 = k1 >> FDCT_SHIFT;
+            k2 = k0 >> FDCT_SHIFT;
+            /*****************/
+            k2 = k2 + k3;
+            k3 = (k3 << 1) - k2;
+            /********/
+            dst[2] = k2;        /* col. 2 */
+            k3 <<= 1;       /* scale up col. 6 */
+            dst[6] = k3; /* col. 6 */
+            /* fdct_3 */
+            /* ROTATE k4,k6,392,946, FDCT_SHIFT */
+            /* assume FAST MULTIPLY */
+            /* k0, k1 are output */
+            k0 = k4 - k6;
+
+            k1 = mla392(k0, k14, round);
+            k0 = mla554(k4, k12, k1);
+            k1 = mla1338(k6, k14, k1);
+
+            k4 = k0 >> FDCT_SHIFT;
+            k6 = k1 >> FDCT_SHIFT;
+            /***********************/
+            k5 = k5 + k7;
+            k7 = (k7 << 1) - k5;
+            k4 = k4 + k7;
+            k7 = (k7 << 1) - k4;
+            k5 = k5 + k6;
+            k4 <<= 1;       /* scale up col.5 */
+            k6 = k5 - (k6 << 1);
+            /********/
+            dst[5] = k4;    /* col. 5 */
+            k6 <<= 2;       /* scale up col. 7 */
+            dst[1] = k5;    /* col. 1 */
+            dst[7] = k6;    /* col. 7 */
+            dst[3] = k7;    /* col. 3 */
+            dst += 8;
+        }
+        while (dst < out);
+
+        out -= 64;
+        dst = out + 8;
+
+        /*  Vertical Block Loop  */
+        do  /* Vertical 8xDCT loop */
+        {
+            k0 = out[0];
+            k1 = out[8];
+            k2 = out[16];
+            k3 = out[24];
+            k4 = out[32];
+            k5 = out[40];
+            k6 = out[48];
+            k7 = out[56];
+            /* deadzone thresholding for column */
+
+            abs_sum = sum_abs(k0, k1, k2, k3, k4, k5, k6, k7);
+
+            if (abs_sum < ColTh)
+            {
+                out[0] = 0x7fff;
+                out++;
+                continue;
+            }
+
+            /* fdct_1 */
+            k0 = k0 + k7;
+            k7 = k0 - (k7 << 1);
+            k1 = k1 + k6;
+            k6 = k1 - (k6 << 1);
+            k2 = k2 + k5;
+            k5 = k2 - (k5 << 1);
+            k3 = k3 + k4;
+            k4 = k3 - (k4 << 1);
+
+            k0 = k0 + k3;
+            k3 = k0 - (k3 << 1);
+            k1 = k1 + k2;
+            k2 = k1 - (k2 << 1);
+
+            k0 = k0 + k1;
+            k1 = k0 - (k1 << 1);
+            /**********/
+            out[32] = k1; /* row 4 */
+            out[0] = k0; /* row 0 */
+            /* fdct_2 */
+            k4 = k4 + k5;
+            k5 = k5 + k6;
+            k6 = k6 + k7;
+            k2 = k2 + k3;
+            /* MUL2C k2,k5,724,FDCT_SHIFT */
+            /* k0, k1 become scratch */
+            /* assume FAST MULTIPLY */
+            k1 = mla724(k12, k5, round);
+            k0 = mla724(k12, k2, round);
+
+            k5 = k1 >> FDCT_SHIFT;
+            k2 = k0 >> FDCT_SHIFT;
+            /*****************/
+            k2 = k2 + k3;
+            k3 = (k3 << 1) - k2;
+            k3 <<= 1;       /* scale up col. 6 */
+            /********/
+            out[48] = k3;   /* row 6 */
+            out[16] = k2;   /* row 2 */
+            /* fdct_3 */
+            /* ROTATE k4,k6,392,946, FDCT_SHIFT */
+            /* assume FAST MULTIPLY */
+            /* k0, k1 are output */
+            k0 = k4 - k6;
+
+            k1 = mla392(k0, k14, round);
+            k0 = mla554(k4, k12, k1);
+            k1 = mla1338(k6, k14, k1);
+
+            k4 = k0 >> FDCT_SHIFT;
+            k6 = k1 >> FDCT_SHIFT;
+            /***********************/
+            k5 = k5 + k7;
+            k7 = (k7 << 1) - k5;
+            k4 = k4 + k7;
+            k7 = (k7 << 1) - k4;
+            k5 = k5 + k6;
+            k4 <<= 1;       /* scale up col. 5 */
+            k6 = k5 - (k6 << 1);
+            /********/
+            out[24] = k7 ;    /* row 3 */
+            k6 <<= 2;       /* scale up col. 7 */
+            out[56] = k6 ;   /* row 7 */
+            out[8] = k5 ;    /* row 1 */
+            out[40] = k4 ;   /* row 5 */
+            out++;
+        }
+        while ((UInt)out < (UInt)dst) ;
+
+        return ;
+    }
+
+    /**************************************************************************/
+    /*  Function:   Block4x4DCT_AANIntra
+        Date:       8/9/01
+        Input:      prev
+        Output:     out[64] ==> next block
+        Purpose:    Input directly from prev frame. output 2x2 DCT
+        Modified:
+    **************************************************************************/
+
+    Void Block4x4DCT_AANIntra(Short *out, UChar *cur, UChar *dummy2, Int width)
+    {
+        Short *dst;
+        register Int k0, k1, k2, k3, k4, k5, k6, k7;
+        Int round;
+        Int k12 = 0x022A02D4;
+        Int k14 = 0x0188053A;
+        Int mask;
+        Int *curInt, tmp;
+        Int abs_sum;
+        Int ColTh;
+
+        OSCL_UNUSED_ARG(dummy2);
+
+        dst = out + 64 ;
+        ColTh = *dst;
+        out += 128;
+        round = 1 << (FDCT_SHIFT - 1);
+
+        do  /* fdct_nextrow */
+        {
+            mask = 0x1FE;
+            curInt = (Int*) cur;
+            tmp = curInt[0];    /* contains 4 pixels */
+            k0 = mask & (tmp << 1);
+            k1 = mask & (tmp >> 7);
+            k2 = mask & (tmp >> 15);
+            k3 = mask & (tmp >> 23);
+            tmp = curInt[1];    /* another 4 pixels */
+            k4 =  mask & (tmp << 1);
+            k5 =  mask & (tmp >> 7);
+            k6 =  mask & (tmp >> 15);
+            k7 =  mask & (tmp >> 23);
+            cur += width;
+            /* fdct_1 */
+            k0 = k0 + k7;
+            k7 = k0 - (k7 << 1);
+            k1 = k1 + k6;
+            k6 = k1 - (k6 << 1);
+            k2 = k2 + k5;
+            k5 = k2 - (k5 << 1);
+            k3 = k3 + k4;
+            k4 = k3 - (k4 << 1);
+
+            k0 = k0 + k3;
+            k3 = k0 - (k3 << 1);
+            k1 = k1 + k2;
+            k2 = k1 - (k2 << 1);
+
+            k0 = k0 + k1;
+            /**********/
+            dst[0] = k0;
+            /* fdct_2 */
+            k4 = k4 + k5;
+            k5 = k5 + k6;
+            k6 = k6 + k7;
+            k2 = k2 + k3;
+            /* MUL2C k2,k5,724,FDCT_SHIFT */
+            /* k0, k1 become scratch */
+            /* assume FAST MULTIPLY */
+            k1 = mla724(k12, k5, round);
+            k0 = mla724(k12, k2, round);
+
+            k5 = k1 >> FDCT_SHIFT;
+            k2 = k0 >> FDCT_SHIFT;
+            /*****************/
+            k2 = k2 + k3;
+            /********/
+            dst[2] = k2;        /* col. 2 */
+            /* fdct_3 */
+            /* ROTATE k4,k6,392,946, FDCT_SHIFT */
+            /* assume FAST MULTIPLY */
+            /* k0, k1 are output */
+            k0 = k4 - k6;
+
+            k1 = mla392(k0, k14, round);
+            k0 = mla554(k4, k12, k1);
+            k1 = mla1338(k6, k14, k1);
+
+            k4 = k0 >> FDCT_SHIFT;
+            k6 = k1 >> FDCT_SHIFT;
+            /***********************/
+            k5 = k5 + k7;
+            k7 = (k7 << 1) - k5;
+            k7 = k7 - k4;
+            k5 = k5 + k6;
+            /********/
+            dst[1] = k5;        /* col. 1 */
+            dst[3] = k7;        /* col. 3 */
+            dst += 8;
+        }
+        while (dst < out);
+
+        out -= 64;
+        dst = out + 4;
+
+        /*  Vertical Block Loop  */
+        do  /* Vertical 8xDCT loop */
+        {
+            k0 = out[0];
+            k1 = out[8];
+            k2 = out[16];
+            k3 = out[24];
+            k4 = out[32];
+            k5 = out[40];
+            k6 = out[48];
+            k7 = out[56];
+
+            abs_sum = sum_abs(k0, k1, k2, k3, k4, k5, k6, k7);
+
+            if (abs_sum < ColTh)
+            {
+                out[0] = 0x7fff;
+                out++;
+                continue;
+            }
+            /* fdct_1 */
+            k0 = k0 + k7;
+            k7 = k0 - (k7 << 1);
+            k1 = k1 + k6;
+            k6 = k1 - (k6 << 1);
+            k2 = k2 + k5;
+            k5 = k2 - (k5 << 1);
+            k3 = k3 + k4;
+            k4 = k3 - (k4 << 1);
+
+            k0 = k0 + k3;
+            k3 = k0 - (k3 << 1);
+            k1 = k1 + k2;
+            k2 = k1 - (k2 << 1);
+
+            k0 = k0 + k1;
+            /**********/
+            out[0] = k0;   /* row 0 */
+            /* fdct_2 */
+            k4 = k4 + k5;
+            k5 = k5 + k6;
+            k6 = k6 + k7;
+            k2 = k2 + k3;
+            /* MUL2C k2,k5,724,FDCT_SHIFT */
+            /* k0, k1 become scratch */
+            /* assume FAST MULTIPLY */
+            k1 = mla724(k12, k5, round);
+            k0 = mla724(k12, k2, round);
+
+            k5 = k1 >> FDCT_SHIFT;
+            k2 = k0 >> FDCT_SHIFT;
+            /*****************/
+            k2 = k2 + k3;
+            /********/
+            out[16] = k2;           /* row 2 */
+            /* fdct_3 */
+            /* ROTATE k4,k6,392,946, FDCT_SHIFT */
+            /* assume FAST MULTIPLY */
+            /* k0, k1 are output */
+            k0 = k4 - k6;
+
+            k1 = mla392(k0, k14, round);
+            k0 = mla554(k4, k12, k1);
+            k1 = mla1338(k6, k14, k1);
+
+            k4 = k0 >> FDCT_SHIFT;
+            k6 = k1 >> FDCT_SHIFT;
+            /***********************/
+            k5 = k5 + k7;
+            k7 = (k7 << 1) - k5;
+            k7 = k7 - k4 ;
+            k5 = k5 + k6;
+            /********/
+            out[24] = k7 ;      /* row 3 */
+            out[8] = k5 ;       /* row 1 */
+            out++;
+        }
+        while ((UInt)out < (UInt)dst) ;
+
+        return ;
+    }
+
+    /**************************************************************************/
+    /*  Function:   Block2x2DCT_AANIntra
+        Date:       8/9/01
+        Input:      prev
+        Output:     out[64] ==> next block
+        Purpose:    Input directly from prev frame. output 2x2 DCT
+        Modified:
+    **************************************************************************/
+
+    Void Block2x2DCT_AANIntra(Short *out, UChar *cur, UChar *dummy2, Int width)
+    {
+        Short *dst;
+        register Int k0, k1, k2, k3, k4, k5, k6, k7;
+        Int round;
+        Int k12 = 0x022A02D4;
+        Int k14 = 0x018803B2;
+        Int mask;
+        Int *curInt, tmp;
+        Int abs_sum;
+        Int ColTh;
+
+        OSCL_UNUSED_ARG(dummy2);
+
+        dst = out + 64 ;
+        ColTh = *dst;
+        out += 128;
+        round = 1 << (FDCT_SHIFT - 1);
+
+        do  /* fdct_nextrow */
+        {
+            mask = 0x1FE;
+            curInt = (Int*) cur;
+            tmp = curInt[0];    /* contains 4 pixels */
+            k0 = mask & (tmp << 1);
+            k1 = mask & (tmp >> 7);
+            k2 = mask & (tmp >> 15);
+            k3 = mask & (tmp >> 23);
+            tmp = curInt[1];    /* another 4 pixels */
+            k4 =  mask & (tmp << 1);
+            k5 =  mask & (tmp >> 7);
+            k6 =  mask & (tmp >> 15);
+            k7 =  mask & (tmp >> 23);
+            cur += width;
+
+            /* fdct_1 */
+            k0 = k0 + k7;
+            k7 = k0 - (k7 << 1);
+            k1 = k1 + k6;
+            k6 = k1 - (k6 << 1);
+            k2 = k2 + k5;
+            k5 = k2 - (k5 << 1);
+            k3 = k3 + k4;
+            k4 = k3 - (k4 << 1);
+
+            k0 = k0 + k3;
+            k3 = k0 - (k3 << 1);
+            k1 = k1 + k2;
+            k2 = k1 - (k2 << 1);
+
+            k0 = k0 + k1;
+            /**********/
+            dst[0] = k0;
+            /* fdct_2 */
+            k4 = k4 + k5;
+            k5 = k5 + k6;
+            k6 = k6 + k7;
+            /* MUL2C k2,k5,724,FDCT_SHIFT */
+            /* k0, k1 become scratch */
+            /* assume FAST MULTIPLY */
+            k1 = mla724(k12, k5, round);
+
+            k5 = k1 >> FDCT_SHIFT;
+            /*****************/
+            /********/
+            /* fdct_3 */
+            /* ROTATE k4,k6,392,946, FDCT_SHIFT */
+            /* assume FAST MULTIPLY */
+            /* k0, k1 are output */
+            k1 = mla392(k4, k14, round);
+            k1 = mla946(k6, k14, k1);
+
+            k6 = k1 >> FDCT_SHIFT;
+            /***********************/
+            k5 = k5 + k7;
+            k5 = k5 + k6;
+            /********/
+            dst[1] = k5;
+            dst += 8;
+        }
+        while (dst < out);
+        out -= 64;
+        dst = out + 2;
+        /*  Vertical Block Loop  */
+        do  /* Vertical 8xDCT loop */
+        {
+            k0 = out[0];
+            k1 = out[8];
+            k2 = out[16];
+            k3 = out[24];
+            k4 = out[32];
+            k5 = out[40];
+            k6 = out[48];
+            k7 = out[56];
+
+            abs_sum = sum_abs(k0, k1, k2, k3, k4, k5, k6, k7);
+
+            if (abs_sum < ColTh)
+            {
+                out[0] = 0x7fff;
+                out++;
+                continue;
+            }
+            /* fdct_1 */
+            k0 = k0 + k7;
+            k7 = k0 - (k7 << 1);
+            k1 = k1 + k6;
+            k6 = k1 - (k6 << 1);
+            k2 = k2 + k5;
+            k5 = k2 - (k5 << 1);
+            k3 = k3 + k4;
+            k4 = k3 - (k4 << 1);
+
+            k0 = k0 + k3;
+            k3 = k0 - (k3 << 1);
+            k1 = k1 + k2;
+            k2 = k1 - (k2 << 1);
+
+            k0 = k0 + k1;
+            /**********/
+            out[0] = k0;        /* row 0 */
+            /* fdct_2 */
+            k4 = k4 + k5;
+            k5 = k5 + k6;
+            k6 = k6 + k7;
+            /* MUL2C k2,k5,724,FDCT_SHIFT */
+            /* k0, k1 become scratch */
+            /* assume FAST MULTIPLY */
+            k1 = mla724(k12, k5, round);
+
+            k5 = k1 >> FDCT_SHIFT;
+            /*****************/
+            /********/
+            /* fdct_3 */
+            /* ROTATE k4,k6,392,946, FDCT_SHIFT */
+            /* assume FAST MULTIPLY */
+            /* k0, k1 are output */
+            k1 = mla392(k4, k14, round);
+            k1 = mla946(k6, k14, k1);
+
+            k6 = k1 >> FDCT_SHIFT;
+            /***********************/
+            k5 = k5 + k7;
+            k5 = k5 + k6;
+            /********/
+            out[8] = k5 ;       /* row 1 */
+            out++;
+        }
+        while ((UInt)out < (UInt)dst) ;
+
+        return ;
+    }
+    /**************************************************************************/
+    /*  Function:   Block1x1DCTwSub
+        Date:       8/9/01
+        Input:      block
+        Output:     y
+        Purpose:    Compute DC value only
+        Modified:
+    **************************************************************************/
+    void Block1x1DCTwSub(Short *out, UChar *cur, UChar *pred, Int width)
+    {
+        UChar *end;
+        Int temp = 0;
+        Int offset2;
+
+        offset2 = width - 8;
+        end = pred + (16 << 3);
+        do
+        {
+            temp += (*cur++ - *pred++);
+            temp += (*cur++ - *pred++);
+            temp += (*cur++ - *pred++);
+            temp += (*cur++ - *pred++);
+            temp += (*cur++ - *pred++);
+            temp += (*cur++ - *pred++);
+            temp += (*cur++ - *pred++);
+            temp += (*cur++ - *pred++);
+            cur += offset2;
+            pred += 8;
+        }
+        while (pred < end) ;
+
+        out[1] = out[2] = out[3] = out[4] = out[5] = out[6] = out[7] = 0;
+        out[0] = temp >> 3;
+
+        return ;
+    }
+
+    /**************************************************************************/
+    /*  Function:   Block1x1DCTIntra
+        Date:       8/9/01
+        Input:      prev
+        Output:     out
+        Purpose:    Compute DC value only
+        Modified:
+    **************************************************************************/
+    void Block1x1DCTIntra(Short *out, UChar *cur, UChar *dummy2, Int width)
+    {
+        UChar *end;
+        Int temp = 0;
+        ULong word;
+
+        OSCL_UNUSED_ARG(dummy2);
+
+        end = cur + (width << 3);
+        do
+        {
+            word = *((ULong*)cur);
+            temp += (word >> 24);
+            temp += ((word >> 16) & 0xFF);
+            temp += ((word >> 8) & 0xFF);
+            temp += (word & 0xFF);
+
+            word = *((ULong*)(cur + 4));
+            temp += (word >> 24);
+            temp += ((word >> 16) & 0xFF);
+            temp += ((word >> 8) & 0xFF);
+            temp += (word & 0xFF);
+
+            cur += width;
+        }
+        while (cur < end) ;
+
+        out[1] = out[2] = out[3] = out[4] = out[5] = out[6] = out[7] = 0;
+        out[0] = temp >> 3;
+
+        return ;
+    }
+
+#ifdef __cplusplus
+}
+#endif
+
diff --git a/media/libstagefright/codecs/m4v_h263/enc/src/dct.h b/media/libstagefright/codecs/m4v_h263/enc/src/dct.h
new file mode 100644
index 0000000..3dceb66
--- /dev/null
+++ b/media/libstagefright/codecs/m4v_h263/enc/src/dct.h
@@ -0,0 +1,191 @@
+/* ------------------------------------------------------------------
+ * Copyright (C) 1998-2009 PacketVideo
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
+ * express or implied.
+ * See the License for the specific language governing permissions
+ * and limitations under the License.
+ * -------------------------------------------------------------------
+ */
+#ifndef _DCT_H_
+#define _DCT_H_
+
+const static Int ColThInter[32] = {0, 0x1C, 0x4C, 0x6C, 0x9C, 0xBC, 0xEC, 0x10C,
+                                   0x13C, 0x15C, 0x18C, 0x1AC, 0x1DC, 0x1FC, 0x22C, 0x24C,
+                                   0x27C, 0x29C, 0x2CC, 0x2EC, 0x31C, 0x33C, 0x36C, 0x38C,
+                                   0x3BC, 0x3DC, 0x40C, 0x42C, 0x45C, 0x47C, 0x4AC, 0x4CC
+                                  };
+
+const static Int ColThIntra[32] = {0, 0x1C, 0x3C, 0x5C, 0x7C, 0x9C, 0xBC, 0xDC,
+                                   0xFC, 0x11C, 0x13C, 0x15C, 0x17C, 0x19C, 0x1BC, 0x1DC,
+                                   0x1FC, 0x21C, 0x23C, 0x25C, 0x27C, 0x29C, 0x2BC, 0x2DC,
+                                   0x2FC, 0x31C, 0x33C, 0x35C, 0x37C, 0x39C, 0x3BC, 0x3DC
+                                  };
+
+/******************************************************/
+/********** IDCT part **************************/
+const static unsigned char imask[8] = {128, 64, 32, 16, 8, 4, 2, 1};
+const static unsigned char mask[8] = {0x7f, 0xbf, 0xdf, 0xef, 0xf7, 0xfb, 0xfd, 0xfe};
+
+#define W1 2841                 /* 2048*sqrt(2)*cos(1*pi/16) */
+#define W2 2676                 /* 2048*sqrt(2)*cos(2*pi/16) */
+#define W3 2408                 /* 2048*sqrt(2)*cos(3*pi/16) */
+#define W5 1609                 /* 2048*sqrt(2)*cos(5*pi/16) */
+#define W6 1108                 /* 2048*sqrt(2)*cos(6*pi/16) */
+#define W7 565                  /* 2048*sqrt(2)*cos(7*pi/16) */
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
+    /* Reduced input IDCT */
+    void idct_col0(Short *blk);
+    void idct_col1(Short *blk);
+    void idct_col2(Short *blk);
+    void idct_col3(Short *blk);
+    void idct_col4(Short *blk);
+    void idct_col0x40(Short *blk);
+    void idct_col0x20(Short *blk);
+    void idct_col0x10(Short *blk);
+
+    void idct_rowInter(Short *srce, UChar *rec, Int lx);
+    void idct_row0Inter(Short *blk, UChar *rec, Int lx);
+    void idct_row1Inter(Short *blk, UChar *rec, Int lx);
+    void idct_row2Inter(Short *blk, UChar *rec, Int lx);
+    void idct_row3Inter(Short *blk, UChar *rec, Int lx);
+    void idct_row4Inter(Short *blk, UChar *rec, Int lx);
+    void idct_row0x40Inter(Short *blk, UChar *rec, Int lx);
+    void idct_row0x20Inter(Short *blk, UChar *rec, Int lx);
+    void idct_row0x10Inter(Short *blk, UChar *rec, Int lx);
+    void idct_row0xCCInter(Short *blk, UChar *rec, Int lx);
+    void idct_rowIntra(Short *srce, UChar *rec, Int lx);
+    void idct_row0Intra(Short *blk, UChar *rec, Int lx);
+    void idct_row1Intra(Short *blk, UChar *rec, Int lx);
+    void idct_row2Intra(Short *blk, UChar *rec, Int lx);
+    void idct_row3Intra(Short *blk, UChar *rec, Int lx);
+    void idct_row4Intra(Short *blk, UChar *rec, Int lx);
+    void idct_row0x40Intra(Short *blk, UChar *rec, Int lx);
+    void idct_row0x20Intra(Short *blk, UChar *rec, Int lx);
+    void idct_row0x10Intra(Short *blk, UChar *rec, Int lx);
+    void idct_row0xCCIntra(Short *blk, UChar *rec, Int lx);
+    void idct_rowzmv(Short *srce, UChar *rec, UChar *prev, Int lx);
+    void idct_row0zmv(Short *blk, UChar *rec, UChar *prev, Int lx);
+    void idct_row1zmv(Short *blk, UChar *rec, UChar *prev, Int lx);
+    void idct_row2zmv(Short *blk, UChar *rec, UChar *prev, Int lx);
+    void idct_row3zmv(Short *blk, UChar *rec, UChar *prev, Int lx);
+    void idct_row4zmv(Short *blk, UChar *rec, UChar *prev, Int lx);
+    void idct_row0x40zmv(Short *blk, UChar *rec, UChar *prev, Int lx);
+    void idct_row0x20zmv(Short *blk, UChar *rec, UChar *prev, Int lx);
+    void idct_row0x10zmv(Short *blk, UChar *rec, UChar *prev, Int lx);
+    void idct_row0xCCzmv(Short *blk, UChar *rec, UChar *prev, Int lx);
+
+
+#ifdef __cplusplus
+}
+#endif
+
+/* Look-up table mapping to RIDCT from bitmap */
+#ifdef SMALL_DCT
+
+static void (*const idctcolVCA[16])(Short*) =
+{
+    &idct_col0, &idct_col4, &idct_col3, &idct_col4,
+    &idct_col2, &idct_col4, &idct_col3, &idct_col4,
+    &idct_col1, &idct_col4, &idct_col3, &idct_col4,
+    &idct_col2, &idct_col4, &idct_col3, &idct_col4
+};
+
+static void (*const idctrowVCAInter[16])(Short*, UChar*, Int) =
+{
+    &idct_row0Inter, &idct_row4Inter, &idct_row3Inter, &idct_row4Inter,
+    &idct_row2Inter, &idct_row4Inter, &idct_row3Inter, &idct_row4Inter,
+    &idct_row1Inter, &idct_row4Inter, &idct_row3Inter, &idct_row4Inter,
+    &idct_row2Inter, &idct_row4Inter, &idct_row3Inter, &idct_row4Inter
+};
+
+static void (*const idctrowVCAzmv[16])(Short*, UChar*, UChar*, Int) =
+{
+    &idct_row0zmv, &idct_row4zmv, &idct_row3zmv, &idct_row4zmv,
+    &idct_row2zmv, &idct_row4zmv, &idct_row3zmv, &idct_row4zmv,
+    &idct_row1zmv, &idct_row4zmv, &idct_row3zmv, &idct_row4zmv,
+    &idct_row2zmv, &idct_row4zmv, &idct_row3zmv, &idct_row4zmv
+};
+
+
+static void (*const idctrowVCAIntra[16])(Short*, UChar*, Int) =
+{
+    &idct_row0Intra, &idct_row4Intra, &idct_row3Intra, &idct_row4Intra,
+    &idct_row2Intra, &idct_row4Intra, &idct_row3Intra, &idct_row4Intra,
+    &idct_row1Intra, &idct_row4Intra, &idct_row3Intra, &idct_row4Intra,
+    &idct_row2Intra, &idct_row4Intra, &idct_row3Intra, &idct_row4Intra
+};
+
+#else /* SMALL_DCT */
+
+static void (*const idctcolVCA[16])(Short*) =
+{
+    &idct_col0, &idct_col0x10, &idct_col0x20, &idct_col4,
+    &idct_col0x40, &idct_col4, &idct_col3, &idct_col4,
+    &idct_col1, &idct_col4, &idct_col3, &idct_col4,
+    &idct_col2, &idct_col4, &idct_col3, &idct_col4
+};
+
+static void (*const idctrowVCAInter[16])(Short*, UChar*, Int) =
+{
+    &idct_row0Inter, &idct_row0x10Inter, &idct_row0x20Inter, &idct_row4Inter,
+    &idct_row0x40Inter, &idct_row4Inter, &idct_row3Inter, &idct_row4Inter,
+    &idct_row1Inter, &idct_row4Inter, &idct_row3Inter, &idct_row4Inter,
+    &idct_row2Inter, &idct_row4Inter, &idct_row3Inter, &idct_row4Inter
+};
+
+static void (*const idctrowVCAzmv[16])(Short*, UChar*, UChar*, Int) =
+{
+    &idct_row0zmv, &idct_row0x10zmv, &idct_row0x20zmv, &idct_row4zmv,
+    &idct_row0x40zmv, &idct_row4zmv, &idct_row3zmv, &idct_row4zmv,
+    &idct_row1zmv, &idct_row4zmv, &idct_row3zmv, &idct_row4zmv,
+    &idct_row2zmv, &idct_row4zmv, &idct_row3zmv, &idct_row4zmv
+};
+
+static void (*const idctrowVCAIntra[16])(Short*, UChar*, Int) =
+{
+    &idct_row0Intra, &idct_row0x10Intra, &idct_row0x20Intra, &idct_row4Intra,
+    &idct_row0x40Intra, &idct_row4Intra, &idct_row3Intra, &idct_row4Intra,
+    &idct_row1Intra, &idct_row4Intra, &idct_row3Intra, &idct_row4Intra,
+    &idct_row2Intra, &idct_row4Intra, &idct_row3Intra, &idct_row4Intra
+};
+
+#endif /* SMALL_DCT */
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+    /* part in AppVCA_dct.c */
+//void Block1x1DCTzmv (Short *out,UChar *prev,UChar *cur,UChar *rec,Int lx,Int chroma);
+    void Block1x1DCTwSub(Short *out, UChar *cur, UChar *prev, Int pitch_chroma);
+    void Block1x1DCTIntra(Short *out, UChar *cur, UChar *dummy1, Int pitch_chroma);
+    /* This part is in dct_aan.c */
+    Void BlockDCT_AANwSub(Short *out, UChar *cur, UChar *prev, Int pitch_chroma);
+    Void Block4x4DCT_AANwSub(Short *out, UChar *cur, UChar *prev, Int pitch_chroma);
+    Void Block2x2DCT_AANwSub(Short *out, UChar *cur, UChar *prev, Int pitch_chroma);
+//Void BlockDCT_AANzmv(Short *out,UChar *prev,UChar *cur,UChar *rec,Int ColTh,Int lx,Int chroma);
+//Void Block4x4DCT_AANzmv(Short *out,UChar *prev,UChar *cur,UChar *rec,Int ColTh,Int lx,Int chroma);
+//Void Block2x2DCT_AANzmv(Short *out,UChar *prev,UChar *cur,UChar *rec,Int ColTh,Int lx,Int chroma);
+    Void BlockDCT_AANIntra(Short *out, UChar *cur, UChar *dummy1, Int pitch_chroma);
+    Void Block4x4DCT_AANIntra(Short *out, UChar *cur, UChar *dummy1, Int pitch_chroma);
+    Void Block2x2DCT_AANIntra(Short *out, UChar *cur, UChar *dummy1, Int pitch_chroma);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif //_DCT_H_
diff --git a/media/libstagefright/codecs/m4v_h263/enc/src/dct_inline.h b/media/libstagefright/codecs/m4v_h263/enc/src/dct_inline.h
new file mode 100644
index 0000000..f795bd9
--- /dev/null
+++ b/media/libstagefright/codecs/m4v_h263/enc/src/dct_inline.h
@@ -0,0 +1,395 @@
+/* ------------------------------------------------------------------
+ * Copyright (C) 1998-2009 PacketVideo
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
+ * express or implied.
+ * See the License for the specific language governing permissions
+ * and limitations under the License.
+ * -------------------------------------------------------------------
+ */
+/*  Filename: dct_inline.h                                                      */
+/*  Description: Implementation for in-line functions used in dct.cpp           */
+/*  Modified:                                                                   */
+/*********************************************************************************/
+#ifndef _DCT_INLINE_H_
+#define _DCT_INLINE_H_
+
+#if !defined(PV_ARM_GCC_V5) && !defined(PV_ARM_GCC_V4)
+
+__inline int32 mla724(int32 op1, int32 op2, int32 op3)
+{
+    int32 out;
+
+    OSCL_UNUSED_ARG(op1);
+
+    out = op2 * 724 + op3; /* op1 is not used here */
+
+    return out;
+}
+
+__inline int32 mla392(int32 k0, int32 k14, int32 round)
+{
+    int32 k1;
+
+    OSCL_UNUSED_ARG(k14);
+
+    k1 = k0 * 392 + round;
+
+    return k1;
+}
+
+__inline int32 mla554(int32 k4, int32 k12, int32 k1)
+{
+    int32 k0;
+
+    OSCL_UNUSED_ARG(k12);
+
+    k0 = k4 * 554 + k1;
+
+    return k0;
+}
+
+__inline int32 mla1338(int32 k6, int32 k14, int32 k1)
+{
+    int32 out;
+
+    OSCL_UNUSED_ARG(k14);
+
+    out = k6 * 1338 + k1;
+
+    return out;
+}
+
+__inline int32 mla946(int32 k6, int32 k14, int32 k1)
+{
+    int32 out;
+
+    OSCL_UNUSED_ARG(k14);
+
+    out = k6 * 946 + k1;
+
+    return out;
+}
+
+__inline int32 sum_abs(int32 k0, int32 k1, int32 k2, int32 k3,
+                       int32 k4, int32 k5, int32 k6, int32 k7)
+{
+    int32 carry, abs_sum;
+
+    carry = k0 >> 31;
+    abs_sum = (k0 ^ carry);
+    carry = k1 >> 31;
+    abs_sum += (k1 ^ carry) - carry;
+    carry = k2 >> 31;
+    abs_sum += (k2 ^ carry) - carry;
+    carry = k3 >> 31;
+    abs_sum += (k3 ^ carry) - carry;
+    carry = k4 >> 31;
+    abs_sum += (k4 ^ carry) - carry;
+    carry = k5 >> 31;
+    abs_sum += (k5 ^ carry) - carry;
+    carry = k6 >> 31;
+    abs_sum += (k6 ^ carry) - carry;
+    carry = k7 >> 31;
+    abs_sum += (k7 ^ carry) - carry;
+
+    return abs_sum;
+}
+
+#elif defined(__CC_ARM)  /* only work with arm v5 */
+
+#if defined(__TARGET_ARCH_5TE)
+
+__inline int32 mla724(int32 op1, int32 op2, int32 op3)
+{
+    int32 out;
+
+    __asm
+    {
+        smlabb out, op1, op2, op3
+    }
+
+    return out;
+}
+
+__inline int32 mla392(int32 k0, int32 k14, int32 round)
+{
+    int32 k1;
+
+    __asm
+    {
+        smlabt k1, k0, k14, round
+    }
+
+    return k1;
+}
+
+__inline int32 mla554(int32 k4, int32 k12, int32 k1)
+{
+    int32 k0;
+
+    __asm
+    {
+        smlabt k0, k4, k12, k1
+    }
+
+    return k0;
+}
+
+__inline int32 mla1338(int32 k6, int32 k14, int32 k1)
+{
+    int32 out;
+
+    __asm
+    {
+        smlabb out, k6, k14, k1
+    }
+
+    return out;
+}
+
+__inline int32 mla946(int32 k6, int32 k14, int32 k1)
+{
+    int32 out;
+
+    __asm
+    {
+        smlabb out, k6, k14, k1
+    }
+
+    return out;
+}
+
+#else // not ARM5TE
+
+
+__inline int32 mla724(int32 op1, int32 op2, int32 op3)
+{
+    int32 out;
+
+    __asm
+    {
+        and out, op2, #0xFFFF
+        mla out, op1, out, op3
+    }
+
+    return out;
+}
+
+__inline int32 mla392(int32 k0, int32 k14, int32 round)
+{
+    int32 k1;
+
+    __asm
+    {
+        mov k1, k14, asr #16
+        mla k1, k0, k1, round
+    }
+
+    return k1;
+}
+
+__inline int32 mla554(int32 k4, int32 k12, int32 k1)
+{
+    int32 k0;
+
+    __asm
+    {
+        mov  k0, k12, asr #16
+        mla k0, k4, k0, k1
+    }
+
+    return k0;
+}
+
+__inline int32 mla1338(int32 k6, int32 k14, int32 k1)
+{
+    int32 out;
+
+    __asm
+    {
+        and out, k14, 0xFFFF
+        mla out, k6, out, k1
+    }
+
+    return out;
+}
+
+__inline int32 mla946(int32 k6, int32 k14, int32 k1)
+{
+    int32 out;
+
+    __asm
+    {
+        and out, k14, 0xFFFF
+        mla out, k6, out, k1
+    }
+
+    return out;
+}
+
+#endif
+
+__inline int32 sum_abs(int32 k0, int32 k1, int32 k2, int32 k3,
+                       int32 k4, int32 k5, int32 k6, int32 k7)
+{
+    int32 carry, abs_sum;
+    __asm
+    {
+        eor     carry, k0, k0, asr #31 ;
+        eors    abs_sum, k1, k1, asr #31 ;
+        adc     abs_sum, abs_sum, carry ;
+        eors    carry,  k2, k2, asr #31 ;
+        adc     abs_sum, abs_sum, carry ;
+        eors    carry,  k3, k3, asr #31 ;
+        adc     abs_sum, abs_sum, carry ;
+        eors    carry,  k4, k4, asr #31 ;
+        adc     abs_sum, abs_sum, carry ;
+        eors    carry,  k5, k5, asr #31 ;
+        adc     abs_sum, abs_sum, carry ;
+        eors    carry,  k6, k6, asr #31 ;
+        adc     abs_sum, abs_sum, carry ;
+        eors    carry,  k7, k7, asr #31 ;
+        adc     abs_sum, abs_sum, carry ;
+    }
+
+    return abs_sum;
+}
+
+#elif ( defined(PV_ARM_GCC_V5) || defined(PV_ARM_GCC_V4) )  /* ARM GNU COMPILER  */
+
+__inline int32 mla724(int32 op1, int32 op2, int32 op3)
+{
+    register int32 out;
+    register int32 aa = (int32)op1;
+    register int32 bb = (int32)op2;
+    register int32 cc = (int32)op3;
+
+    asm volatile("smlabb %0, %1, %2, %3"
+             : "=&r"(out)
+                         : "r"(aa),
+                         "r"(bb),
+                         "r"(cc));
+    return out;
+}
+
+
+__inline int32 mla392(int32 k0, int32 k14, int32 round)
+{
+    register int32 out;
+    register int32 aa = (int32)k0;
+    register int32 bb = (int32)k14;
+    register int32 cc = (int32)round;
+
+    asm volatile("smlabt %0, %1, %2, %3"
+             : "=&r"(out)
+                         : "r"(aa),
+                         "r"(bb),
+                         "r"(cc));
+
+    return out;
+}
+
+__inline int32 mla554(int32 k4, int32 k12, int32 k1)
+{
+    register int32 out;
+    register int32 aa = (int32)k4;
+    register int32 bb = (int32)k12;
+    register int32 cc = (int32)k1;
+
+    asm volatile("smlabt %0, %1, %2, %3"
+             : "=&r"(out)
+                         : "r"(aa),
+                         "r"(bb),
+                         "r"(cc));
+
+    return out;
+}
+
+__inline int32 mla1338(int32 k6, int32 k14, int32 k1)
+{
+    register int32 out;
+    register int32 aa = (int32)k6;
+    register int32 bb = (int32)k14;
+    register int32 cc = (int32)k1;
+
+    asm volatile("smlabb %0, %1, %2, %3"
+             : "=&r"(out)
+                         : "r"(aa),
+                         "r"(bb),
+                         "r"(cc));
+    return out;
+}
+
+__inline int32 mla946(int32 k6, int32 k14, int32 k1)
+{
+    register int32 out;
+    register int32 aa = (int32)k6;
+    register int32 bb = (int32)k14;
+    register int32 cc = (int32)k1;
+
+    asm volatile("smlabb %0, %1, %2, %3"
+             : "=&r"(out)
+                         : "r"(aa),
+                         "r"(bb),
+                         "r"(cc));
+    return out;
+}
+
+__inline int32 sum_abs(int32 k0, int32 k1, int32 k2, int32 k3,
+                       int32 k4, int32 k5, int32 k6, int32 k7)
+{
+    register int32 carry;
+    register int32 abs_sum;
+    register int32 aa = (int32)k0;
+    register int32 bb = (int32)k1;
+    register int32 cc = (int32)k2;
+    register int32 dd = (int32)k3;
+    register int32 ee = (int32)k4;
+    register int32 ff = (int32)k5;
+    register int32 gg = (int32)k6;
+    register int32 hh = (int32)k7;
+
+    asm volatile("eor  %0, %2, %2, asr #31\n\t"
+                 "eors %1, %3, %3, asr #31\n\t"
+                 "adc  %1, %1, %0\n\t"
+                 "eors %0, %4, %4, asr #31\n\t"
+                 "adc  %1, %1, %0\n\t"
+                 "eors %0, %5, %5, asr #31\n\t"
+                 "adc  %1, %1, %0\n\t"
+                 "eors %0, %6, %6, asr #31\n\t"
+                 "adc  %1, %1, %0\n\t"
+                 "eors %0, %7, %7, asr #31\n\t"
+                 "adc  %1, %1, %0\n\t"
+                 "eors %0, %8, %8, asr #31\n\t"
+                 "adc  %1, %1, %0\n\t"
+                 "eors %0, %9, %9, asr #31\n\t"
+                 "adc  %1, %1, %0\n\t"
+
+             : "=&r"(carry),
+                 "=&r"(abs_sum):
+                         "r"(aa),
+                         "r"(bb),
+                         "r"(cc),
+                         "r"(dd),
+                         "r"(ee),
+                         "r"(ff),
+                         "r"(gg),
+                         "r"(hh));
+
+    return abs_sum;
+}
+
+#endif // Diff. OS
+
+#endif //_DCT_INLINE_H_
+
+
diff --git a/media/libstagefright/codecs/m4v_h263/enc/src/fastcodemb.cpp b/media/libstagefright/codecs/m4v_h263/enc/src/fastcodemb.cpp
new file mode 100644
index 0000000..6fd41c3
--- /dev/null
+++ b/media/libstagefright/codecs/m4v_h263/enc/src/fastcodemb.cpp
@@ -0,0 +1,622 @@
+/* ------------------------------------------------------------------
+ * Copyright (C) 1998-2009 PacketVideo
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
+ * express or implied.
+ * See the License for the specific language governing permissions
+ * and limitations under the License.
+ * -------------------------------------------------------------------
+ */
+#include "mp4def.h"
+#include "mp4lib_int.h"
+#include "mp4enc_lib.h"
+#include "dct.h"
+#include "m4venc_oscl.h"
+
+/* ======================================================================== */
+/*  Function : CodeMB_H263( )                                               */
+/*  Date     : 8/15/2001                                                    */
+/*  Purpose  : Perform residue calc (only zero MV), DCT, H263 Quant/Dequant,*/
+/*              IDCT and motion compensation.Modified from FastCodeMB()     */
+/*  Input    :                                                              */
+/*      video       Video encoder data structure                            */
+/*      function    Approximate DCT function, scaling and threshold         */
+/*      ncoefblck   Array for last nonzero coeff for speedup in VlcEncode   */
+/*      QP      Combined offset from the origin to the current          */
+/*                  macroblock  and QP  for current MB.                     */
+/*    Output     :                                                          */
+/*      video->outputMB     Quantized DCT coefficients.                     */
+/*      currVop->yChan,uChan,vChan  Reconstructed pixels                    */
+/*                                                                          */
+/*  Return   :   PV_STATUS                                                  */
+/*  Modified :                                                              */
+/*           2/26/01
+            -modified threshold based on correlation coeff 0.75 only for mode H.263
+            -ncoefblck[] as input,  to keep position of last non-zero coeff*/
+/*           8/10/01
+            -modified threshold based on correlation coeff 0.5
+            -used column threshold to speedup column DCT.
+            -used bitmap zigzag to speedup RunLevel().                      */
+/* ======================================================================== */
+
+PV_STATUS CodeMB_H263(VideoEncData *video, approxDCT *function, Int QP, Int ncoefblck[])
+{
+    Int sad, k, CBP, mbnum = video->mbnum;
+    Short *output, *dataBlock;
+    UChar Mode = video->headerInfo.Mode[mbnum];
+    UChar *bitmapcol, *bitmaprow = video->bitmaprow;
+    UInt  *bitmapzz ;
+    UChar shortHeader = video->vol[video->currLayer]->shortVideoHeader;
+    Int dc_scaler = 8;
+    Int intra = (Mode == MODE_INTRA || Mode == MODE_INTRA_Q);
+    struct QPstruct QuantParam;
+    Int dctMode, DctTh1;
+    Int ColTh;
+    Int(*BlockQuantDequantH263)(Short *, Short *, struct QPstruct *,
+                                UChar[], UChar *, UInt *, Int, Int, Int, UChar);
+    Int(*BlockQuantDequantH263DC)(Short *, Short *, struct QPstruct *,
+                                  UChar *, UInt *, Int, UChar);
+    void (*BlockDCT1x1)(Short *, UChar *, UChar *, Int);
+    void (*BlockDCT2x2)(Short *, UChar *, UChar *, Int);
+    void (*BlockDCT4x4)(Short *, UChar *, UChar *, Int);
+    void (*BlockDCT8x8)(Short *, UChar *, UChar *, Int);
+
+    /* motion comp. related var. */
+    Vop *currVop = video->currVop;
+    VideoEncFrameIO *inputFrame = video->input;
+    Int ind_x = video->outputMB->mb_x;
+    Int ind_y = video->outputMB->mb_y;
+    Int lx = currVop->pitch;
+    Int width = currVop->width;
+    UChar *rec, *input, *pred;
+    Int offset = QP >> 5;  /* QP is combined offset and QP */
+    Int offsetc = (offset >> 2) + (ind_x << 2); /* offset for chrom */
+    /*****************************/
+
+    OSCL_UNUSED_ARG(function);
+
+    output = video->outputMB->block[0];
+    CBP = 0;
+    QP = QP & 0x1F;
+//  M4VENC_MEMSET(output,0,(sizeof(Short)<<6)*6); /* reset quantized coeff. to zero , 7/24/01*/
+
+    QuantParam.QPx2 = QP << 1;
+    QuantParam.QP = QP;
+    QuantParam.QPdiv2 = QP >> 1;
+    QuantParam.QPx2plus = QuantParam.QPx2 + QuantParam.QPdiv2;
+    QuantParam.Addition = QP - 1 + (QP & 0x1);
+
+    if (intra)
+    {
+        BlockDCT1x1 = &Block1x1DCTIntra;
+        BlockDCT2x2 = &Block2x2DCT_AANIntra;
+        BlockDCT4x4 = &Block4x4DCT_AANIntra;
+        BlockDCT8x8 = &BlockDCT_AANIntra;
+        BlockQuantDequantH263 = &BlockQuantDequantH263Intra;
+        BlockQuantDequantH263DC = &BlockQuantDequantH263DCIntra;
+        if (shortHeader)
+        {
+            dc_scaler = 8;
+        }
+        else
+        {
+            dc_scaler = cal_dc_scalerENC(QP, 1); /* luminance blocks */
+        }
+        DctTh1 = (Int)(dc_scaler * 3);//*1.829
+        ColTh = ColThIntra[QP];
+    }
+    else
+    {
+        BlockDCT1x1 = &Block1x1DCTwSub;
+        BlockDCT2x2 = &Block2x2DCT_AANwSub;
+        BlockDCT4x4 = &Block4x4DCT_AANwSub;
+        BlockDCT8x8 = &BlockDCT_AANwSub;
+
+        BlockQuantDequantH263 = &BlockQuantDequantH263Inter;
+        BlockQuantDequantH263DC = &BlockQuantDequantH263DCInter;
+        ColTh = ColThInter[QP];
+        DctTh1 = (Int)(16 * QP);  //9*QP;
+    }
+
+    rec = currVop->yChan + offset;
+    input = inputFrame->yChan + offset;
+    if (lx != width) input -= (ind_y << 9);  /* non-padded offset */
+
+    dataBlock = video->dataBlock;
+    pred = video->predictedMB;
+
+    for (k = 0; k < 6; k++)
+    {
+        CBP <<= 1;
+        bitmapcol = video->bitmapcol[k];
+        bitmapzz = video->bitmapzz[k];  /*  7/30/01 */
+        if (k < 4)
+        {
+            sad = video->mot[mbnum][k+1].sad;
+            if (k&1)
+            {
+                rec += 8;
+                input += 8;
+            }
+            else if (k == 2)
+            {
+                dctMode = ((width << 3) - 8);
+                input += dctMode;
+                dctMode = ((lx << 3) - 8);
+                rec += dctMode;
+            }
+        }
+        else
+        {
+            if (k == 4)
+            {
+                rec = currVop->uChan + offsetc;
+                input = inputFrame->uChan + offsetc;
+                if (lx != width) input -= (ind_y << 7);
+                lx >>= 1;
+                width >>= 1;
+                if (intra)
+                {
+                    sad = getBlockSum(input, width);
+                    if (shortHeader)
+                        dc_scaler = 8;
+                    else
+                    {
+                        dc_scaler = cal_dc_scalerENC(QP, 2); /* chrominance blocks */
+                    }
+                    DctTh1 = (Int)(dc_scaler * 3);//*1.829
+                }
+                else
+                    sad = Sad8x8(input, pred, width);
+            }
+            else
+            {
+                rec = currVop->vChan + offsetc;
+                input = inputFrame->vChan + offsetc;
+                if (lx != width) input -= (ind_y << 7);
+                if (intra)
+                {
+                    sad = getBlockSum(input, width);
+                }
+                else
+                    sad = Sad8x8(input, pred, width);
+            }
+        }
+
+        if (sad < DctTh1 && !(shortHeader && intra)) /* all-zero */
+        {                       /* For shortHeader intra block, DC value cannot be zero */
+            dctMode = 0;
+            CBP |= 0;
+            ncoefblck[k] = 0;
+        }
+        else if (sad < 18*QP/*(QP<<4)*/) /* DC-only */
+        {
+            dctMode = 1;
+            BlockDCT1x1(dataBlock, input, pred, width);
+
+            CBP |= (*BlockQuantDequantH263DC)(dataBlock, output, &QuantParam,
+                                              bitmaprow + k, bitmapzz, dc_scaler, shortHeader);
+            ncoefblck[k] = 1;
+        }
+        else
+        {
+
+            dataBlock[64] = ColTh;
+
+            if (sad < 22*QP/*(QP<<4)+(QP<<1)*/)  /* 2x2 DCT */
+            {
+                dctMode = 2;
+                BlockDCT2x2(dataBlock, input, pred, width);
+                ncoefblck[k] = 6;
+            }
+            else if (sad < (QP << 5)) /* 4x4 DCT */
+            {
+                dctMode = 4;
+                BlockDCT4x4(dataBlock, input, pred, width);
+                ncoefblck[k] = 26;
+            }
+            else /* Full-DCT */
+            {
+                dctMode = 8;
+                BlockDCT8x8(dataBlock, input, pred, width);
+                ncoefblck[k] = 64;
+            }
+
+            CBP |= (*BlockQuantDequantH263)(dataBlock, output, &QuantParam,
+                                            bitmapcol, bitmaprow + k, bitmapzz, dctMode, k, dc_scaler, shortHeader);
+        }
+        BlockIDCTMotionComp(dataBlock, bitmapcol, bitmaprow[k], dctMode, rec, pred, (lx << 1) | intra);
+        output += 64;
+        if (!(k&1))
+        {
+            pred += 8;
+        }
+        else
+        {
+            pred += 120;
+        }
+    }
+
+    video->headerInfo.CBP[mbnum] = CBP; /*  5/18/2001 */
+    return PV_SUCCESS;
+}
+
+#ifndef NO_MPEG_QUANT
+/* ======================================================================== */
+/*  Function : CodeMB_MPEG( )                                               */
+/*  Date     : 8/15/2001                                                    */
+/*  Purpose  : Perform residue calc (only zero MV), DCT, MPEG Quant/Dequant,*/
+/*              IDCT and motion compensation.Modified from FastCodeMB()     */
+/*  Input    :                                                              */
+/*      video       Video encoder data structure                            */
+/*      function    Approximate DCT function, scaling and threshold         */
+/*      ncoefblck   Array for last nonzero coeff for speedup in VlcEncode   */
+/*      QP      Combined offset from the origin to the current          */
+/*                  macroblock  and QP  for current MB.                     */
+/*    Output     :                                                          */
+/*      video->outputMB     Quantized DCT coefficients.                     */
+/*      currVop->yChan,uChan,vChan  Reconstructed pixels                    */
+/*                                                                          */
+/*  Return   :   PV_STATUS                                                  */
+/*  Modified :                                                              */
+/*           2/26/01
+            -modified threshold based on correlation coeff 0.75 only for mode H.263
+            -ncoefblck[] as input, keep position of last non-zero coeff*/
+/*           8/10/01
+            -modified threshold based on correlation coeff 0.5
+            -used column threshold to speedup column DCT.
+            -used bitmap zigzag to speedup RunLevel().                      */
+/* ======================================================================== */
+
+PV_STATUS CodeMB_MPEG(VideoEncData *video, approxDCT *function, Int QP, Int ncoefblck[])
+{
+    Int sad, k, CBP, mbnum = video->mbnum;
+    Short *output, *dataBlock;
+    UChar Mode = video->headerInfo.Mode[mbnum];
+    UChar *bitmapcol, *bitmaprow = video->bitmaprow;
+    UInt  *bitmapzz ;
+    Int dc_scaler = 8;
+    Vol *currVol = video->vol[video->currLayer];
+    Int intra = (Mode == MODE_INTRA || Mode == MODE_INTRA_Q);
+    Int *qmat;
+    Int dctMode, DctTh1, DctTh2, DctTh3, DctTh4;
+    Int ColTh;
+
+    Int(*BlockQuantDequantMPEG)(Short *, Short *, Int, Int *,
+                                UChar [], UChar *, UInt *, Int,  Int, Int);
+    Int(*BlockQuantDequantMPEGDC)(Short *, Short *, Int, Int *,
+                                  UChar [], UChar *, UInt *, Int);
+
+    void (*BlockDCT1x1)(Short *, UChar *, UChar *, Int);
+    void (*BlockDCT2x2)(Short *, UChar *, UChar *, Int);
+    void (*BlockDCT4x4)(Short *, UChar *, UChar *, Int);
+    void (*BlockDCT8x8)(Short *, UChar *, UChar *, Int);
+
+    /* motion comp. related var. */
+    Vop *currVop = video->currVop;
+    VideoEncFrameIO *inputFrame = video->input;
+    Int ind_x = video->outputMB->mb_x;
+    Int ind_y = video->outputMB->mb_y;
+    Int lx = currVop->pitch;
+    Int width = currVop->width;
+    UChar *rec, *input, *pred;
+    Int offset = QP >> 5;
+    Int offsetc = (offset >> 2) + (ind_x << 2); /* offset for chrom */
+    /*****************************/
+
+    OSCL_UNUSED_ARG(function);
+
+    output = video->outputMB->block[0];
+    CBP = 0;
+    QP = QP & 0x1F;
+//  M4VENC_MEMSET(output,0,(sizeof(Short)<<6)*6); /* reset quantized coeff. to zero ,  7/24/01*/
+
+    if (intra)
+    {
+        BlockDCT1x1 = &Block1x1DCTIntra;
+        BlockDCT2x2 = &Block2x2DCT_AANIntra;
+        BlockDCT4x4 = &Block4x4DCT_AANIntra;
+        BlockDCT8x8 = &BlockDCT_AANIntra;
+
+        BlockQuantDequantMPEG = &BlockQuantDequantMPEGIntra;
+        BlockQuantDequantMPEGDC = &BlockQuantDequantMPEGDCIntra;
+        dc_scaler = cal_dc_scalerENC(QP, 1); /* luminance blocks */
+        qmat = currVol->iqmat;
+        DctTh1 = (Int)(3 * dc_scaler);//2*dc_scaler);
+        DctTh2 = (Int)((1.25 * QP - 1) * qmat[1] * 0.45);//0.567);//0.567);
+        DctTh3 = (Int)((1.25 * QP - 1) * qmat[2] * 0.55);//1.162); /*  8/2/2001 */
+        DctTh4 = (Int)((1.25 * QP - 1) * qmat[32] * 0.8);//1.7583);//0.7942);
+        ColTh = ColThIntra[QP];
+    }
+    else
+    {
+        BlockDCT1x1 = &Block1x1DCTwSub;
+        BlockDCT2x2 = &Block2x2DCT_AANwSub;
+        BlockDCT4x4 = &Block4x4DCT_AANwSub;
+        BlockDCT8x8 = &BlockDCT_AANwSub;
+
+        BlockQuantDequantMPEG = &BlockQuantDequantMPEGInter;
+        BlockQuantDequantMPEGDC = &BlockQuantDequantMPEGDCInter;
+        qmat = currVol->niqmat;
+        DctTh1 = (Int)(((QP << 1) - 0.5) * qmat[0] * 0.4);//0.2286);//0.3062);
+        DctTh2 = (Int)(((QP << 1) - 0.5) * qmat[1] * 0.45);//0.567);//0.4);
+        DctTh3 = (Int)(((QP << 1) - 0.5) * qmat[2] * 0.55);//1.162); /*  8/2/2001 */
+        DctTh4 = (Int)(((QP << 1) - 0.5) * qmat[32] * 0.8);//1.7583);//0.7942);
+        ColTh = ColThInter[QP];
+    }// get qmat, DctTh1, DctTh2, DctTh3
+
+    rec = currVop->yChan + offset;
+    input = inputFrame->yChan + offset;
+    if (lx != width) input -= (ind_y << 9);  /* non-padded offset */
+
+    dataBlock = video->dataBlock;
+    pred = video->predictedMB;
+
+    for (k = 0; k < 6; k++)
+    {
+        CBP <<= 1;
+        bitmapcol = video->bitmapcol[k];
+        bitmapzz = video->bitmapzz[k];  /*  8/2/01 */
+        if (k < 4)
+        {//Y block
+            sad = video->mot[mbnum][k+1].sad;
+            if (k&1)
+            {
+                rec += 8;
+                input += 8;
+            }
+            else if (k == 2)
+            {
+                dctMode = ((width << 3) - 8);
+                input += dctMode;
+                dctMode = ((lx << 3) - 8);
+                rec += dctMode;
+            }
+        }
+        else
+        {// U, V block
+            if (k == 4)
+            {
+                rec = currVop->uChan + offsetc;
+                input = inputFrame->uChan + offsetc;
+                if (lx != width) input -= (ind_y << 7);
+                lx >>= 1;
+                width >>= 1;
+                if (intra)
+                {
+                    dc_scaler = cal_dc_scalerENC(QP, 2); /* luminance blocks */
+                    DctTh1 = dc_scaler * 3;
+                    sad = getBlockSum(input, width);
+                }
+                else
+                    sad = Sad8x8(input, pred, width);
+            }
+            else
+            {
+                rec = currVop->vChan + offsetc;
+                input = inputFrame->vChan + offsetc;
+                if (lx != width) input -= (ind_y << 7);
+                if (intra)
+                    sad = getBlockSum(input, width);
+                else
+                    sad = Sad8x8(input, pred, width);
+            }
+        }
+
+        if (sad < DctTh1) /* all-zero */
+        {
+            dctMode = 0;
+            CBP |= 0;
+            ncoefblck[k] = 0;
+        }
+        else if (sad < DctTh2) /* DC-only */
+        {
+            dctMode = 1;
+            BlockDCT1x1(dataBlock, input, pred, width);
+
+            CBP |= (*BlockQuantDequantMPEGDC)(dataBlock, output, QP, qmat,
+                                              bitmapcol, bitmaprow + k, bitmapzz, dc_scaler);
+            ncoefblck[k] = 1;
+        }
+        else
+        {
+            dataBlock[64] = ColTh;
+
+            if (sad < DctTh3) /* 2x2-DCT */
+            {
+                dctMode = 2;
+                BlockDCT2x2(dataBlock, input, pred, width);
+                ncoefblck[k] = 6;
+            }
+            else if (sad < DctTh4) /* 4x4 DCT */
+            {
+                dctMode = 4;
+                BlockDCT4x4(dataBlock, input, pred, width);
+                ncoefblck[k] = 26;
+            }
+            else /* full-DCT */
+            {
+                dctMode = 8;
+                BlockDCT8x8(dataBlock, input, pred, width);
+                ncoefblck[k] = 64;
+            }
+
+            CBP |= (*BlockQuantDequantMPEG)(dataBlock, output, QP, qmat,
+                                            bitmapcol, bitmaprow + k, bitmapzz, dctMode, k, dc_scaler); //
+        }
+        dctMode = 8; /* for mismatch handle */
+        BlockIDCTMotionComp(dataBlock, bitmapcol, bitmaprow[k], dctMode, rec, pred, (lx << 1) | (intra));
+
+        output += 64;
+        if (!(k&1))
+        {
+            pred += 8;
+        }
+        else
+        {
+            pred += 120;
+        }
+    }
+
+    video->headerInfo.CBP[mbnum] = CBP; /*  5/18/2001 */
+    return PV_SUCCESS;
+}
+
+#endif
+
+/* ======================================================================== */
+/*  Function : getBlockSAV( )                                               */
+/*  Date     : 8/10/2000                                                    */
+/*  Purpose  : Get SAV for one block                                        */
+/*  In/out   : block[64] contain one block data                             */
+/*  Return   :                                                              */
+/*  Modified :                                                              */
+/* ======================================================================== */
+/* can be written in MMX or SSE,  2/22/2001 */
+Int getBlockSAV(Short block[])
+{
+    Int i, val, sav = 0;
+
+    i = 8;
+    while (i--)
+    {
+        val = *block++;
+        if (val > 0)    sav += val;
+        else        sav -= val;
+        val = *block++;
+        if (val > 0)    sav += val;
+        else        sav -= val;
+        val = *block++;
+        if (val > 0)    sav += val;
+        else        sav -= val;
+        val = *block++;
+        if (val > 0)    sav += val;
+        else        sav -= val;
+        val = *block++;
+        if (val > 0)    sav += val;
+        else        sav -= val;
+        val = *block++;
+        if (val > 0)    sav += val;
+        else        sav -= val;
+        val = *block++;
+        if (val > 0)    sav += val;
+        else        sav -= val;
+        val = *block++;
+        if (val > 0)    sav += val;
+        else        sav -= val;
+    }
+
+    return sav;
+
+}
+
+/* ======================================================================== */
+/*  Function : Sad8x8( )                                                    */
+/*  Date     : 8/10/2000                                                    */
+/*  Purpose  : Find SAD between prev block and current block                */
+/*  In/out   : Previous and current frame block pointers, and frame width   */
+/*  Return   :                                                              */
+/*  Modified :                                                              */
+/*      8/15/01,  - do 4 pixel at a time    assuming 32 bit register        */
+/* ======================================================================== */
+Int Sad8x8(UChar *cur, UChar *prev, Int width)
+{
+    UChar *end = cur + (width << 3);
+    Int sad = 0;
+    Int *curInt = (Int*) cur;
+    Int *prevInt = (Int*) prev;
+    Int cur1, cur2, prev1, prev2;
+    UInt mask, sgn_msk = 0x80808080;
+    Int  sum2 = 0, sum4 = 0;
+    Int  tmp;
+    do
+    {
+        mask    = ~(0xFF00);
+        cur1    = curInt[1];        /* load cur[4..7] */
+        cur2    = curInt[0];
+        curInt += (width >> 2);     /* load cur[0..3] and +=lx */
+        prev1   = prevInt[1];
+        prev2   = prevInt[0];
+        prevInt += 4;
+
+        tmp     = prev2 ^ cur2;
+        cur2    = prev2 - cur2;
+        tmp     = tmp ^ cur2;       /* (^)^(-) last bit is one if carry */
+        tmp     = sgn_msk & ((UInt)tmp >> 1); /* check the sign of each byte */
+        if (cur2 < 0)   tmp = tmp | 0x80000000; /* corcurt sign of first byte */
+        tmp     = (tmp << 8) - tmp;     /* carry borrowed bytes are marked with 0x1FE */
+        cur2    = cur2 + (tmp >> 7);     /* negative bytes is added with 0xFF, -1 */
+        cur2    = cur2 ^(tmp >> 7); /* take absolute by inverting bits (EOR) */
+
+        tmp     = prev1 ^ cur1;
+        cur1    = prev1 - cur1;
+        tmp     = tmp ^ cur1;       /* (^)^(-) last bit is one if carry */
+        tmp     = sgn_msk & ((UInt)tmp >> 1); /* check the sign of each byte */
+        if (cur1 < 0)   tmp = tmp | 0x80000000; /* corcurt sign of first byte */
+        tmp     = (tmp << 8) - tmp;     /* carry borrowed bytes are marked with 0x1FE */
+        cur1    = cur1 + (tmp >> 7);     /* negative bytes is added with 0xFF, -1 */
+        cur1    = cur1 ^(tmp >> 7); /* take absolute by inverting bits (EOR) */
+
+        sum4    = sum4 + cur1;
+        cur1    = cur1 & (mask << 8);   /* mask first and third bytes */
+        sum2    = sum2 + ((UInt)cur1 >> 8);
+        sum4    = sum4 + cur2;
+        cur2    = cur2 & (mask << 8);   /* mask first and third bytes */
+        sum2    = sum2 + ((UInt)cur2 >> 8);
+    }
+    while ((UInt)curInt < (UInt)end);
+
+    cur1 = sum4 - (sum2 << 8);  /* get even-sum */
+    cur1 = cur1 + sum2;         /* add 16 bit even-sum and odd-sum*/
+    cur1 = cur1 + (cur1 << 16); /* add upper and lower 16 bit sum */
+    sad  = ((UInt)cur1 >> 16);  /* take upper 16 bit */
+    return sad;
+}
+
+/* ======================================================================== */
+/*  Function : getBlockSum( )                                               */
+/*  Date     : 8/10/2000                                                    */
+/*  Purpose  : Find summation of value within a block.                      */
+/*  In/out   : Pointer to current block in a frame and frame width          */
+/*  Return   :                                                              */
+/*  Modified :                                                              */
+/*          8/15/01,  - SIMD 4 pixels at a time                         */
+/* ======================================================================== */
+
+Int getBlockSum(UChar *cur, Int width)
+{
+    Int sad = 0, sum4 = 0, sum2 = 0;
+    UChar *end = cur + (width << 3);
+    Int *curInt = (Int*)cur;
+    UInt mask   = ~(0xFF00);
+    Int load1, load2;
+
+    do
+    {
+        load1 = curInt[1];
+        load2 = curInt[0];
+        curInt += (width >> 2);
+        sum4 += load1;
+        load1 = load1 & (mask << 8); /* even bytes */
+        sum2 += ((UInt)load1 >> 8); /* sum even bytes, 16 bit */
+        sum4 += load2;
+        load2 = load2 & (mask << 8); /* even bytes */
+        sum2 += ((UInt)load2 >> 8); /* sum even bytes, 16 bit */
+    }
+    while ((UInt)curInt < (UInt)end);
+    load1 = sum4 - (sum2 << 8);     /* get even-sum */
+    load1 = load1 + sum2;           /* add 16 bit even-sum and odd-sum*/
+    load1 = load1 + (load1 << 16);  /* add upper and lower 16 bit sum */
+    sad  = ((UInt)load1 >> 16); /* take upper 16 bit */
+
+    return sad;
+}
+
diff --git a/media/libstagefright/codecs/m4v_h263/enc/src/fastcodemb.h b/media/libstagefright/codecs/m4v_h263/enc/src/fastcodemb.h
new file mode 100644
index 0000000..686a66d
--- /dev/null
+++ b/media/libstagefright/codecs/m4v_h263/enc/src/fastcodemb.h
@@ -0,0 +1,103 @@
+/* ------------------------------------------------------------------
+ * Copyright (C) 1998-2009 PacketVideo
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
+ * express or implied.
+ * See the License for the specific language governing permissions
+ * and limitations under the License.
+ * -------------------------------------------------------------------
+ */
+/*  =====================================================================   */
+/*  File: FastCodeMB.h                                                      */
+/*  Description: This file contains structure and function prototypes used
+            in FastCodeMB() function. When it is decided to use FastCodeMB
+            instead of CodeMB, all of this prototypes should be migrated to
+            mp4enc_lib.h.                                                   */
+/*  Rev:                                                                    */
+/*  Created: 8/14/01                                                        */
+/* //////////////////////////////////////////////////////////////////////// */
+
+typedef struct struct_approxDCT  approxDCT;
+struct struct_approxDCT
+{
+    const Int *scale;
+    Int(*DCT)(Int block[ ], Int coeff[ ], approxDCT *);
+
+    // Threshold value for H.263 Quantizer
+    Int th_app_all[8];
+    Int th_app_odd[8];
+    Int th_app_even[8];
+    Int th_app_even1[8];
+    Int th_app_even2[8];
+};
+
+struct QPstruct
+{
+    Int QPx2 ;
+    Int QP;
+    Int QPdiv2;
+    Int QPx2plus;
+    Int Addition;
+};
+
+/*---- FastCodeMB.c -----*/
+void initCodeMB(approxDCT *function, Int QP);
+PV_STATUS CodeMB_H263(VideoEncData *video, approxDCT *function, Int QP, Int ncoefblck[], Int offset);
+PV_STATUS CodeMB_MPEG(VideoEncData *video, approxDCT *function, Int QP, Int ncoefblck[], Int offset);
+Int getBlockSAV(Int block[]);
+Int Sad8x8(UChar *rec, UChar *prev, Int lx);
+Int getBlockSum(UChar *rec, Int lx);
+
+/*---- AppVCA_dct.c -----*/
+Int     AppVCA1_dct(Int block[], Int out[ ], approxDCT *function);
+Int     AppVCA2_dct(Int block[], Int out[ ], approxDCT *function);
+Int     AppVCA3_dct(Int block[], Int out[ ], approxDCT *function);
+Int     AppVCA4_dct(Int block[], Int out[ ], approxDCT *function);
+Int     AppVCA5_dct(Int block[], Int out[ ], approxDCT *function);
+
+/*---- FastQuant.c -----*/
+Int cal_dc_scalerENC(Int QP, Int type) ;
+Int BlockQuantDequantH263Inter(Int *rcoeff, Int *qcoeff, struct QPstruct *QuantParam,
+                               UChar bitmapcol[ ], UChar *bitmaprow, UInt *bitmapzz,
+                               Int dctMode, Int comp, Int dummy);
+
+Int BlockQuantDequantH263Intra(Int *rcoeff, Int *qcoeff, struct QPstruct *QuantParam,
+                               UChar bitmapcol[ ], UChar *bitmaprow, UInt *bitmapzz,
+                               Int dctMode, Int comp, Int dc_scaler);
+
+Int BlockQuantDequantH263DCInter(Int *rcoeff, Int *qcoeff, struct QPstruct *QuantParam,
+                                 UChar *bitmaprow, UInt *bitmapzz, Int dummy);
+
+Int BlockQuantDequantH263DCIntra(Int *rcoeff, Int *qcoeff, struct QPstruct *QuantParam,
+                                 UChar *bitmaprow, UInt *bitmapzz, Int dc_scaler);
+
+Int BlockQuantDequantMPEGInter(Int *rcoeff, Int *qcoeff, Int QP, Int *qmat,
+                               UChar bitmapcol[ ], UChar *bitmaprow, UInt *bitmapzz,
+                               Int DctMode, Int comp, Int dc_scaler);
+
+Int BlockQuantDequantMPEGIntra(Int *rcoeff, Int *qcoeff, Int QP, Int *qmat,
+                               UChar bitmapcol[ ], UChar *bitmaprow, UInt *bitmapzz,
+                               Int DctMode, Int comp, Int dc_scaler);
+
+Int BlockQuantDequantMPEGDCInter(Int *rcoeff, Int *qcoeff, Int QP, Int *qmat,
+                                 UChar bitmapcol[ ], UChar *bitmaprow, UInt *bitmapzz, Int dummy);
+
+Int BlockQuantDequantMPEGDCIntra(Int *rcoeff, Int *qcoeff, Int QP, Int *qmat,
+                                 UChar bitmapcol[ ], UChar *bitmaprow, UInt *bitmapzz, Int dc_scaler);
+
+/*---- FastIDCT.c -----*/
+void BlockIDCTMotionComp(Int *block, UChar *bitmapcol, UChar bitmaprow,
+                         Int dctMode, UChar *rec, Int lx, Int intra);
+
+/*---- motion_comp.c -----*/
+void PutSkippedBlock(UChar *rec, UChar *prev, Int lx);
+
+
diff --git a/media/libstagefright/codecs/m4v_h263/enc/src/fastidct.cpp b/media/libstagefright/codecs/m4v_h263/enc/src/fastidct.cpp
new file mode 100644
index 0000000..21d7427
--- /dev/null
+++ b/media/libstagefright/codecs/m4v_h263/enc/src/fastidct.cpp
@@ -0,0 +1,2020 @@
+/* ------------------------------------------------------------------
+ * Copyright (C) 1998-2009 PacketVideo
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
+ * express or implied.
+ * See the License for the specific language governing permissions
+ * and limitations under the License.
+ * -------------------------------------------------------------------
+ */
+/*
+
+------------------------------------------------------------------------------
+ REVISION HISTORY
+ Who:   Date: July/2001
+ Description:   1. Optimized BlockIDCT bitmap checking.
+                2. Rearranged functions.
+                3. Do column IDCT first, then row IDCT.
+                4. Combine motion comp and IDCT, require
+                   two sets of row IDCTs one for INTRA
+                   and one for INTER.
+                5. Add AAN IDCT
+
+ Who:   Date: 8/16/01
+                1. Increase the input precision to 8 bits, i.e. change RDCTBITS
+                   to 11, have to comment out all in-line assembly since 16 bit
+                    multiplication doesn't work. Try to use diffent precision with
+                    32 bit mult. but hasn't finished. Turns out that without in-line
+                    assembly the performance doesn't change much (only 1%).
+ Who:   Date: 9/04/05
+                1. Replace AAN IDCT with Chen's IDCT to accommodate 16 bit data type.
+
+*/
+#include "mp4def.h"
+#include "mp4enc_lib.h"
+#include "mp4lib_int.h"
+#include "dct.h"
+
+#define ADD_CLIP    { \
+            tmp = *rec + tmp; \
+        if((UInt)tmp > mask) tmp = mask&(~(tmp>>31)); \
+        *rec++ = tmp;   \
+        }
+
+#define INTRA_CLIP  { \
+        if((UInt)tmp > mask) tmp = mask&(~(tmp>>31)); \
+        *rec++ = tmp;   \
+        }
+
+
+#define CLIP_RESULT(x)      if((UInt)x > 0xFF){x = 0xFF & (~(x>>31));}
+#define ADD_AND_CLIP1(x)    x += (pred_word&0xFF); CLIP_RESULT(x);
+#define ADD_AND_CLIP2(x)    x += ((pred_word>>8)&0xFF); CLIP_RESULT(x);
+#define ADD_AND_CLIP3(x)    x += ((pred_word>>16)&0xFF); CLIP_RESULT(x);
+#define ADD_AND_CLIP4(x)    x += ((pred_word>>24)&0xFF); CLIP_RESULT(x);
+
+
+void idct_col0(Short *blk)
+{
+    OSCL_UNUSED_ARG(blk);
+
+    return;
+}
+
+void idct_col1(Short *blk)
+{
+    blk[0] = blk[8] = blk[16] = blk[24] = blk[32] = blk[40] = blk[48] = blk[56] =
+                                              blk[0] << 3;
+    return ;
+}
+
+void idct_col2(Short *blk)
+{
+    int32 x0, x1, x3, x5, x7;//, x8;
+
+    x1 = blk[8];
+    x0 = ((int32)blk[0] << 11) + 128;
+    /* both upper and lower*/
+
+    x7 = W7 * x1;
+    x1 = W1 * x1;
+
+    x3 = x7;
+    x5 = (181 * (x1 - x7) + 128) >> 8;
+    x7 = (181 * (x1 + x7) + 128) >> 8;
+
+    blk[0] = (x0 + x1) >> 8;
+    blk[8] = (x0 + x7) >> 8;
+    blk[16] = (x0 + x5) >> 8;
+    blk[24] = (x0 + x3) >> 8;
+    blk[56] = (x0 - x1) >> 8;
+    blk[48] = (x0 - x7) >> 8;
+    blk[40] = (x0 - x5) >> 8;
+    blk[32] = (x0 - x3) >> 8;
+    return ;
+}
+
+void idct_col3(Short *blk)
+{
+    int32 x0, x1, x2, x3, x4, x5, x6, x7, x8;
+
+    x2 = blk[16];
+    x1 = blk[8];
+    x0 = ((int32)blk[0] << 11) + 128;
+
+    x4 = x0;
+    x6 = W6 * x2;
+    x2 = W2 * x2;
+    x8 = x0 - x2;
+    x0 += x2;
+    x2 = x8;
+    x8 = x4 - x6;
+    x4 += x6;
+    x6 = x8;
+
+    x7 = W7 * x1;
+    x1 = W1 * x1;
+    x3 = x7;
+    x5 = (181 * (x1 - x7) + 128) >> 8;
+    x7 = (181 * (x1 + x7) + 128) >> 8;
+
+    blk[0] = (x0 + x1) >> 8;
+    blk[8] = (x4 + x7) >> 8;
+    blk[16] = (x6 + x5) >> 8;
+    blk[24] = (x2 + x3) >> 8;
+    blk[56] = (x0 - x1) >> 8;
+    blk[48] = (x4 - x7) >> 8;
+    blk[40] = (x6 - x5) >> 8;
+    blk[32] = (x2 - x3) >> 8;
+    return ;
+}
+
+void idct_col4(Short *blk)
+{
+    int32 x0, x1, x2, x3, x4, x5, x6, x7, x8;
+    x2 = blk[16];
+    x1 = blk[8];
+    x3 = blk[24];
+    x0 = ((int32)blk[0] << 11) + 128;
+
+    x4 = x0;
+    x6 = W6 * x2;
+    x2 = W2 * x2;
+    x8 = x0 - x2;
+    x0 += x2;
+    x2 = x8;
+    x8 = x4 - x6;
+    x4 += x6;
+    x6 = x8;
+
+    x7 = W7 * x1;
+    x1 = W1 * x1;
+    x5 = W3 * x3;
+    x3 = -W5 * x3;
+    x8 = x1 - x5;
+    x1 += x5;
+    x5 = x8;
+    x8 = x7 - x3;
+    x3 += x7;
+    x7 = (181 * (x5 + x8) + 128) >> 8;
+    x5 = (181 * (x5 - x8) + 128) >> 8;
+
+
+    blk[0] = (x0 + x1) >> 8;
+    blk[8] = (x4 + x7) >> 8;
+    blk[16] = (x6 + x5) >> 8;
+    blk[24] = (x2 + x3) >> 8;
+    blk[56] = (x0 - x1) >> 8;
+    blk[48] = (x4 - x7) >> 8;
+    blk[40] = (x6 - x5) >> 8;
+    blk[32] = (x2 - x3) >> 8;
+    return ;
+}
+
+#ifndef SMALL_DCT
+void idct_col0x40(Short *blk)
+{
+    int32 x1, x3, x5, x7;//, x8;
+
+    x1 = blk[8];
+    /* both upper and lower*/
+
+    x7 = W7 * x1;
+    x1 = W1 * x1;
+
+    x3 = x7;
+    x5 = (181 * (x1 - x7) + 128) >> 8;
+    x7 = (181 * (x1 + x7) + 128) >> 8;
+
+    blk[0] = (128 + x1) >> 8;
+    blk[8] = (128 + x7) >> 8;
+    blk[16] = (128 + x5) >> 8;
+    blk[24] = (128 + x3) >> 8;
+    blk[56] = (128 - x1) >> 8;
+    blk[48] = (128 - x7) >> 8;
+    blk[40] = (128 - x5) >> 8;
+    blk[32] = (128 - x3) >> 8;
+
+    return ;
+}
+
+void idct_col0x20(Short *blk)
+{
+    int32 x0, x2, x4, x6;
+
+    x2 = blk[16];
+    x6 = W6 * x2;
+    x2 = W2 * x2;
+    x0 = 128 + x2;
+    x2 = 128 - x2;
+    x4 = 128 + x6;
+    x6 = 128 - x6;
+
+    blk[0] = (x0) >> 8;
+    blk[56] = (x0) >> 8;
+    blk[8] = (x4) >> 8;
+    blk[48] = (x4) >> 8;
+    blk[16] = (x6) >> 8;
+    blk[40] = (x6) >> 8;
+    blk[24] = (x2) >> 8;
+    blk[32] = (x2) >> 8;
+
+    return ;
+}
+
+void idct_col0x10(Short *blk)
+{
+    int32 x1, x3, x5,  x7;
+
+    x3 = blk[24];
+    x1 = W3 * x3;
+    x3 = W5 * x3;
+
+    x7 = (181 * (x3 - x1) + 128) >> 8;
+    x5 = (-181 * (x1 + x3) + 128) >> 8;
+
+
+    blk[0] = (128 + x1) >> 8;
+    blk[8] = (128 + x7) >> 8;
+    blk[16] = (128 + x5) >> 8;
+    blk[24] = (128 - x3) >> 8;
+    blk[56] = (128 - x1) >> 8;
+    blk[48] = (128 - x7) >> 8;
+    blk[40] = (128 - x5) >> 8;
+    blk[32] = (128 + x3) >> 8;
+
+    return ;
+}
+
+#endif /* SMALL_DCT */
+
+void idct_col(Short *blk)
+{
+    int32 x0, x1, x2, x3, x4, x5, x6, x7, x8;
+
+    x1 = (int32)blk[32] << 11;
+    x2 = blk[48];
+    x3 = blk[16];
+    x4 = blk[8];
+    x5 = blk[56];
+    x6 = blk[40];
+    x7 = blk[24];
+    x0 = ((int32)blk[0] << 11) + 128;
+
+    /* first stage */
+    x8 = W7 * (x4 + x5);
+    x4 = x8 + (W1 - W7) * x4;
+    x5 = x8 - (W1 + W7) * x5;
+    x8 = W3 * (x6 + x7);
+    x6 = x8 - (W3 - W5) * x6;
+    x7 = x8 - (W3 + W5) * x7;
+
+    /* second stage */
+    x8 = x0 + x1;
+    x0 -= x1;
+    x1 = W6 * (x3 + x2);
+    x2 = x1 - (W2 + W6) * x2;
+    x3 = x1 + (W2 - W6) * x3;
+    x1 = x4 + x6;
+    x4 -= x6;
+    x6 = x5 + x7;
+    x5 -= x7;
+
+    /* third stage */
+    x7 = x8 + x3;
+    x8 -= x3;
+    x3 = x0 + x2;
+    x0 -= x2;
+    x2 = (181 * (x4 + x5) + 128) >> 8;
+    x4 = (181 * (x4 - x5) + 128) >> 8;
+
+    /* fourth stage */
+    blk[0]    = (x7 + x1) >> 8;
+    blk[8] = (x3 + x2) >> 8;
+    blk[16] = (x0 + x4) >> 8;
+    blk[24] = (x8 + x6) >> 8;
+    blk[32] = (x8 - x6) >> 8;
+    blk[40] = (x0 - x4) >> 8;
+    blk[48] = (x3 - x2) >> 8;
+    blk[56] = (x7 - x1) >> 8;
+
+    return ;
+}
+
+/* This function should not be called at all ****/
+void idct_row0Inter(Short *srce, UChar *rec, Int lx)
+{
+    OSCL_UNUSED_ARG(srce);
+
+    OSCL_UNUSED_ARG(rec);
+
+    OSCL_UNUSED_ARG(lx);
+
+    return;
+}
+
+void idct_row1Inter(Short *blk, UChar *rec, Int lx)
+{
+    int tmp;
+    int i = 8;
+    uint32 pred_word, dst_word;
+    int res, res2;
+
+    /* preset the offset, such that we can take advantage pre-offset addressing mode   */
+    rec -= lx;
+    blk -= 8;
+
+    while (i--)
+    {
+        tmp = (*(blk += 8) + 32) >> 6;
+        *blk = 0;
+
+        pred_word = *((uint32*)(rec += lx)); /* read 4 bytes from pred */
+        res = tmp + (pred_word & 0xFF);
+        CLIP_RESULT(res);
+        res2 = tmp + ((pred_word >> 8) & 0xFF);
+        CLIP_RESULT(res2);
+        dst_word = (res2 << 8) | res;
+        res = tmp + ((pred_word >> 16) & 0xFF);
+        CLIP_RESULT(res);
+        dst_word |= (res << 16);
+        res = tmp + ((pred_word >> 24) & 0xFF);
+        CLIP_RESULT(res);
+        dst_word |= (res << 24);
+        *((uint32*)rec) = dst_word; /* save 4 bytes to dst */
+
+        pred_word = *((uint32*)(rec + 4)); /* read 4 bytes from pred */
+        res = tmp + (pred_word & 0xFF);
+        CLIP_RESULT(res);
+        res2 = tmp + ((pred_word >> 8) & 0xFF);
+        CLIP_RESULT(res2);
+        dst_word = (res2 << 8) | res;
+        res = tmp + ((pred_word >> 16) & 0xFF);
+        CLIP_RESULT(res);
+        dst_word |= (res << 16);
+        res = tmp + ((pred_word >> 24) & 0xFF);
+        CLIP_RESULT(res);
+        dst_word |= (res << 24);
+        *((uint32*)(rec + 4)) = dst_word; /* save 4 bytes to dst */
+    }
+    return;
+}
+
+void idct_row2Inter(Short *blk, UChar *rec, Int lx)
+{
+    int32 x0, x1, x2, x4, x5;
+    int i = 8;
+    uint32 pred_word, dst_word;
+    int res, res2;
+
+    /* preset the offset, such that we can take advantage pre-offset addressing mode   */
+    rec -= lx;
+    blk -= 8;
+
+    while (i--)
+    {
+        /* shortcut */
+        x4 = blk[9];
+        blk[9] = 0;
+        x0 = ((*(blk += 8)) << 8) + 8192;
+        *blk = 0;  /* for proper rounding in the fourth stage */
+
+        /* first stage */
+        x5 = (W7 * x4 + 4) >> 3;
+        x4 = (W1 * x4 + 4) >> 3;
+
+        /* third stage */
+        x2 = (181 * (x4 + x5) + 128) >> 8;
+        x1 = (181 * (x4 - x5) + 128) >> 8;
+
+        /* fourth stage */
+        pred_word = *((uint32*)(rec += lx)); /* read 4 bytes from pred */
+        res = (x0 + x4) >> 14;
+        ADD_AND_CLIP1(res);
+        res2 = (x0 + x2) >> 14;
+        ADD_AND_CLIP2(res2);
+        dst_word = (res2 << 8) | res;
+        res = (x0 + x1) >> 14;
+        ADD_AND_CLIP3(res);
+        dst_word |= (res << 16);
+        res = (x0 + x5) >> 14;
+        ADD_AND_CLIP4(res);
+        dst_word |= (res << 24);
+        *((uint32*)rec) = dst_word; /* save 4 bytes to dst */
+
+        pred_word = *((uint32*)(rec + 4)); /* read 4 bytes from pred */
+        res = (x0 - x5) >> 14;
+        ADD_AND_CLIP1(res);
+        res2 = (x0 - x1) >> 14;
+        ADD_AND_CLIP2(res2);
+        dst_word = (res2 << 8) | res;
+        res = (x0 - x2) >> 14;
+        ADD_AND_CLIP3(res);
+        dst_word |= (res << 16);
+        res = (x0 - x4) >> 14;
+        ADD_AND_CLIP4(res);
+        dst_word |= (res << 24);
+        *((uint32*)(rec + 4)) = dst_word; /* save 4 bytes to dst */
+    }
+    return ;
+}
+
+void idct_row3Inter(Short *blk, UChar *rec, Int lx)
+{
+    int32 x0, x1, x2, x3, x4, x5, x6, x7, x8;
+    int i = 8;
+    uint32 pred_word, dst_word;
+    int res, res2;
+
+    /* preset the offset, such that we can take advantage pre-offset addressing mode   */
+    rec -= lx;
+    blk -= 8;
+
+    while (i--)
+    {
+        x2 = blk[10];
+        blk[10] = 0;
+        x1 = blk[9];
+        blk[9] = 0;
+        x0 = ((*(blk += 8)) << 8) + 8192;
+        *blk = 0;  /* for proper rounding in the fourth stage */
+        /* both upper and lower*/
+        /* both x2orx6 and x0orx4 */
+
+        x4 = x0;
+        x6 = (W6 * x2 + 4) >> 3;
+        x2 = (W2 * x2 + 4) >> 3;
+        x8 = x0 - x2;
+        x0 += x2;
+        x2 = x8;
+        x8 = x4 - x6;
+        x4 += x6;
+        x6 = x8;
+
+        x7 = (W7 * x1 + 4) >> 3;
+        x1 = (W1 * x1 + 4) >> 3;
+        x3 = x7;
+        x5 = (181 * (x1 - x7) + 128) >> 8;
+        x7 = (181 * (x1 + x7) + 128) >> 8;
+
+        pred_word = *((uint32*)(rec += lx)); /* read 4 bytes from pred */
+        res = (x0 + x1) >> 14;
+        ADD_AND_CLIP1(res);
+        res2 = (x4 + x7) >> 14;
+        ADD_AND_CLIP2(res2);
+        dst_word = (res2 << 8) | res;
+        res = (x6 + x5) >> 14;
+        ADD_AND_CLIP3(res);
+        dst_word |= (res << 16);
+        res = (x2 + x3) >> 14;
+        ADD_AND_CLIP4(res);
+        dst_word |= (res << 24);
+        *((uint32*)rec) = dst_word; /* save 4 bytes to dst */
+
+        pred_word = *((uint32*)(rec + 4)); /* read 4 bytes from pred */
+        res = (x2 - x3) >> 14;
+        ADD_AND_CLIP1(res);
+        res2 = (x6 - x5) >> 14;
+        ADD_AND_CLIP2(res2);
+        dst_word = (res2 << 8) | res;
+        res = (x4 - x7) >> 14;
+        ADD_AND_CLIP3(res);
+        dst_word |= (res << 16);
+        res = (x0 - x1) >> 14;
+        ADD_AND_CLIP4(res);
+        dst_word |= (res << 24);
+        *((uint32*)(rec + 4)) = dst_word; /* save 4 bytes to dst */
+    }
+
+    return ;
+}
+
+void idct_row4Inter(Short *blk, UChar *rec, Int lx)
+{
+    int32 x0, x1, x2, x3, x4, x5, x6, x7, x8;
+    int i = 8;
+    uint32 pred_word, dst_word;
+    int res, res2;
+
+    /* preset the offset, such that we can take advantage pre-offset addressing mode   */
+    rec -= lx;
+    blk -= 8;
+
+    while (i--)
+    {
+        x2 = blk[10];
+        blk[10] = 0;
+        x1 = blk[9];
+        blk[9] = 0;
+        x3 = blk[11];
+        blk[11] = 0;
+        x0 = ((*(blk += 8)) << 8) + 8192;
+        *blk = 0;   /* for proper rounding in the fourth stage */
+
+        x4 = x0;
+        x6 = (W6 * x2 + 4) >> 3;
+        x2 = (W2 * x2 + 4) >> 3;
+        x8 = x0 - x2;
+        x0 += x2;
+        x2 = x8;
+        x8 = x4 - x6;
+        x4 += x6;
+        x6 = x8;
+
+        x7 = (W7 * x1 + 4) >> 3;
+        x1 = (W1 * x1 + 4) >> 3;
+        x5 = (W3 * x3 + 4) >> 3;
+        x3 = (- W5 * x3 + 4) >> 3;
+        x8 = x1 - x5;
+        x1 += x5;
+        x5 = x8;
+        x8 = x7 - x3;
+        x3 += x7;
+        x7 = (181 * (x5 + x8) + 128) >> 8;
+        x5 = (181 * (x5 - x8) + 128) >> 8;
+
+        pred_word = *((uint32*)(rec += lx)); /* read 4 bytes from pred */
+        res = (x0 + x1) >> 14;
+        ADD_AND_CLIP1(res);
+        res2 = (x4 + x7) >> 14;
+        ADD_AND_CLIP2(res2);
+        dst_word = (res2 << 8) | res;
+        res = (x6 + x5) >> 14;
+        ADD_AND_CLIP3(res);
+        dst_word |= (res << 16);
+        res = (x2 + x3) >> 14;
+        ADD_AND_CLIP4(res);
+        dst_word |= (res << 24);
+        *((uint32*)rec) = dst_word; /* save 4 bytes to dst */
+
+        pred_word = *((uint32*)(rec + 4)); /* read 4 bytes from pred */
+        res = (x2 - x3) >> 14;
+        ADD_AND_CLIP1(res);
+        res2 = (x6 - x5) >> 14;
+        ADD_AND_CLIP2(res2);
+        dst_word = (res2 << 8) | res;
+        res = (x4 - x7) >> 14;
+        ADD_AND_CLIP3(res);
+        dst_word |= (res << 16);
+        res = (x0 - x1) >> 14;
+        ADD_AND_CLIP4(res);
+        dst_word |= (res << 24);
+        *((uint32*)(rec + 4)) = dst_word; /* save 4 bytes to dst */
+    }
+    return ;
+}
+
+#ifndef SMALL_DCT
+void idct_row0x40Inter(Short *blk, UChar *rec, Int lx)
+{
+    int32 x1, x2, x4, x5;
+    int i = 8;
+    uint32 pred_word, dst_word;
+    int res, res2;
+
+    /* preset the offset, such that we can take advantage pre-offset addressing mode   */
+    rec -= lx;
+
+    while (i--)
+    {
+        /* shortcut */
+        x4 = blk[1];
+        blk[1] = 0;
+        blk += 8;  /* for proper rounding in the fourth stage */
+
+        /* first stage */
+        x5 = (W7 * x4 + 4) >> 3;
+        x4 = (W1 * x4 + 4) >> 3;
+
+        /* third stage */
+        x2 = (181 * (x4 + x5) + 128) >> 8;
+        x1 = (181 * (x4 - x5) + 128) >> 8;
+
+        /* fourth stage */
+        pred_word = *((uint32*)(rec += lx)); /* read 4 bytes from pred */
+        res = (8192 + x4) >> 14;
+        ADD_AND_CLIP1(res);
+        res2 = (8192 + x2) >> 14;
+        ADD_AND_CLIP2(res2);
+        dst_word = (res2 << 8) | res;
+        res = (8192 + x1) >> 14;
+        ADD_AND_CLIP3(res);
+        dst_word |= (res << 16);
+        res = (8192 + x5) >> 14;
+        ADD_AND_CLIP4(res);
+        dst_word |= (res << 24);
+        *((uint32*)rec) = dst_word; /* save 4 bytes to dst */
+
+        pred_word = *((uint32*)(rec + 4)); /* read 4 bytes from pred */
+        res = (8192 - x5) >> 14;
+        ADD_AND_CLIP1(res);
+        res2 = (8192 - x1) >> 14;
+        ADD_AND_CLIP2(res2);
+        dst_word = (res2 << 8) | res;
+        res = (8192 - x2) >> 14;
+        ADD_AND_CLIP3(res);
+        dst_word |= (res << 16);
+        res = (8192 - x4) >> 14;
+        ADD_AND_CLIP4(res);
+        dst_word |= (res << 24);
+        *((uint32*)(rec + 4)) = dst_word; /* save 4 bytes to dst */
+    }
+    return ;
+}
+
+void idct_row0x20Inter(Short *blk, UChar *rec, Int lx)
+{
+    int32 x0, x2, x4, x6;
+    int i = 8;
+    uint32 pred_word, dst_word;
+    int res, res2;
+
+    /* preset the offset, such that we can take advantage pre-offset addressing mode   */
+    rec -= lx;
+
+    while (i--)
+    {
+        x2 = blk[2];
+        blk[2] = 0;
+        blk += 8; /* for proper rounding in the fourth stage */
+        /* both upper and lower*/
+        /* both x2orx6 and x0orx4 */
+        x6 = (W6 * x2 + 4) >> 3;
+        x2 = (W2 * x2 + 4) >> 3;
+        x0 = 8192 + x2;
+        x2 = 8192 - x2;
+        x4 = 8192 + x6;
+        x6 = 8192 - x6;
+
+        pred_word = *((uint32*)(rec += lx)); /* read 4 bytes from pred */
+        res = (x0) >> 14;
+        ADD_AND_CLIP1(res);
+        res2 = (x4) >> 14;
+        ADD_AND_CLIP2(res2);
+        dst_word = (res2 << 8) | res;
+        res = (x6) >> 14;
+        ADD_AND_CLIP3(res);
+        dst_word |= (res << 16);
+        res = (x2) >> 14;
+        ADD_AND_CLIP4(res);
+        dst_word |= (res << 24);
+        *((uint32*)rec) = dst_word; /* save 4 bytes to dst */
+
+        pred_word = *((uint32*)(rec + 4)); /* read 4 bytes from pred */
+        res = (x2) >> 14;
+        ADD_AND_CLIP1(res);
+        res2 = (x6) >> 14;
+        ADD_AND_CLIP2(res2);
+        dst_word = (res2 << 8) | res;
+        res = (x4) >> 14;
+        ADD_AND_CLIP3(res);
+        dst_word |= (res << 16);
+        res = (x0) >> 14;
+        ADD_AND_CLIP4(res);
+        dst_word |= (res << 24);
+        *((uint32*)(rec + 4)) = dst_word; /* save 4 bytes to dst */
+    }
+
+    return ;
+}
+
+void idct_row0x10Inter(Short *blk, UChar *rec, Int lx)
+{
+    int32 x1, x3, x5, x7;
+    int i = 8;
+    uint32 pred_word, dst_word;
+    int res, res2;
+
+    /* preset the offset, such that we can take advantage pre-offset addressing mode   */
+    rec -= lx;
+
+    while (i--)
+    {
+        x3 = blk[3];
+        blk[3] = 0;
+        blk += 8;
+
+        x1 = (W3 * x3 + 4) >> 3;
+        x3 = (-W5 * x3 + 4) >> 3;
+
+        x7 = (-181 * (x3 + x1) + 128) >> 8;
+        x5 = (181 * (x3 - x1) + 128) >> 8;
+
+        pred_word = *((uint32*)(rec += lx)); /* read 4 bytes from pred */
+        res = (8192 + x1) >> 14;
+        ADD_AND_CLIP1(res);
+        res2 = (8192 + x7) >> 14;
+        ADD_AND_CLIP2(res2);
+        dst_word = (res2 << 8) | res;
+        res = (8192 + x5) >> 14;
+        ADD_AND_CLIP3(res);
+        dst_word |= (res << 16);
+        res = (8192 + x3) >> 14;
+        ADD_AND_CLIP4(res);
+        dst_word |= (res << 24);
+        *((uint32*)rec) = dst_word; /* save 4 bytes to dst */
+
+        pred_word = *((uint32*)(rec + 4)); /* read 4 bytes from pred */
+        res = (8192 - x3) >> 14;
+        ADD_AND_CLIP1(res);
+        res2 = (8192 - x5) >> 14;
+        ADD_AND_CLIP2(res2);
+        dst_word = (res2 << 8) | res;
+        res = (8192 - x7) >> 14;
+        ADD_AND_CLIP3(res);
+        dst_word |= (res << 16);
+        res = (8192 - x1) >> 14;
+        ADD_AND_CLIP4(res);
+        dst_word |= (res << 24);
+        *((uint32*)(rec + 4)) = dst_word; /* save 4 bytes to dst */
+    }
+    return ;
+}
+
+#endif /* SMALL_DCT */
+
+void idct_rowInter(Short *blk, UChar *rec, Int lx)
+{
+    int32 x0, x1, x2, x3, x4, x5, x6, x7, x8;
+    int i = 8;
+    uint32 pred_word, dst_word;
+    int res, res2;
+
+    /* preset the offset, such that we can take advantage pre-offset addressing mode   */
+    rec -= lx;
+    blk -= 8;
+
+    while (i--)
+    {
+        x1 = (int32)blk[12] << 8;
+        blk[12] = 0;
+        x2 = blk[14];
+        blk[14] = 0;
+        x3 = blk[10];
+        blk[10] = 0;
+        x4 = blk[9];
+        blk[9] = 0;
+        x5 = blk[15];
+        blk[15] = 0;
+        x6 = blk[13];
+        blk[13] = 0;
+        x7 = blk[11];
+        blk[11] = 0;
+        x0 = ((*(blk += 8)) << 8) + 8192;
+        *blk = 0;   /* for proper rounding in the fourth stage */
+
+        /* first stage */
+        x8 = W7 * (x4 + x5) + 4;
+        x4 = (x8 + (W1 - W7) * x4) >> 3;
+        x5 = (x8 - (W1 + W7) * x5) >> 3;
+        x8 = W3 * (x6 + x7) + 4;
+        x6 = (x8 - (W3 - W5) * x6) >> 3;
+        x7 = (x8 - (W3 + W5) * x7) >> 3;
+
+        /* second stage */
+        x8 = x0 + x1;
+        x0 -= x1;
+        x1 = W6 * (x3 + x2) + 4;
+        x2 = (x1 - (W2 + W6) * x2) >> 3;
+        x3 = (x1 + (W2 - W6) * x3) >> 3;
+        x1 = x4 + x6;
+        x4 -= x6;
+        x6 = x5 + x7;
+        x5 -= x7;
+
+        /* third stage */
+        x7 = x8 + x3;
+        x8 -= x3;
+        x3 = x0 + x2;
+        x0 -= x2;
+        x2 = (181 * (x4 + x5) + 128) >> 8;
+        x4 = (181 * (x4 - x5) + 128) >> 8;
+
+        /* fourth stage */
+        pred_word = *((uint32*)(rec += lx)); /* read 4 bytes from pred */
+
+        res = (x7 + x1) >> 14;
+        ADD_AND_CLIP1(res);
+        res2 = (x3 + x2) >> 14;
+        ADD_AND_CLIP2(res2);
+        dst_word = (res2 << 8) | res;
+        res = (x0 + x4) >> 14;
+        ADD_AND_CLIP3(res);
+        dst_word |= (res << 16);
+        res = (x8 + x6) >> 14;
+        ADD_AND_CLIP4(res);
+        dst_word |= (res << 24);
+        *((uint32*)rec) = dst_word; /* save 4 bytes to dst */
+
+        pred_word = *((uint32*)(rec + 4)); /* read 4 bytes from pred */
+
+        res = (x8 - x6) >> 14;
+        ADD_AND_CLIP1(res);
+        res2 = (x0 - x4) >> 14;
+        ADD_AND_CLIP2(res2);
+        dst_word = (res2 << 8) | res;
+        res = (x3 - x2) >> 14;
+        ADD_AND_CLIP3(res);
+        dst_word |= (res << 16);
+        res = (x7 - x1) >> 14;
+        ADD_AND_CLIP4(res);
+        dst_word |= (res << 24);
+        *((uint32*)(rec + 4)) = dst_word; /* save 4 bytes to dst */
+    }
+    return;
+}
+
+void idct_row0Intra(Short *srce, UChar *rec, Int lx)
+{
+    OSCL_UNUSED_ARG(srce);
+
+    OSCL_UNUSED_ARG(rec);
+
+    OSCL_UNUSED_ARG(lx);
+
+    return;
+}
+
+void idct_row1Intra(Short *blk, UChar *rec, Int lx)
+{
+    int32 tmp;
+    int i = 8;
+
+    rec -= lx;
+    blk -= 8;
+    while (i--)
+    {
+        tmp = ((*(blk += 8) + 32) >> 6);
+        *blk = 0;
+        CLIP_RESULT(tmp)
+
+        tmp |= (tmp << 8);
+        tmp |= (tmp << 16);
+        *((uint32*)(rec += lx)) = tmp;
+        *((uint32*)(rec + 4)) = tmp;
+    }
+    return;
+}
+
+void idct_row2Intra(Short *blk, UChar *rec, Int lx)
+{
+    int32 x0, x1, x2, x4, x5;
+    int res, res2;
+    uint32 dst_word;
+    int i = 8;
+
+    rec -= lx;
+    blk -= 8;
+    while (i--)
+    {
+        /* shortcut */
+        x4 = blk[9];
+        blk[9] = 0;
+        x0 = ((*(blk += 8)) << 8) + 8192;
+        *blk = 0;   /* for proper rounding in the fourth stage */
+
+        /* first stage */
+        x5 = (W7 * x4 + 4) >> 3;
+        x4 = (W1 * x4 + 4) >> 3;
+
+        /* third stage */
+        x2 = (181 * (x4 + x5) + 128) >> 8;
+        x1 = (181 * (x4 - x5) + 128) >> 8;
+
+        /* fourth stage */
+        res = ((x0 + x4) >> 14);
+        CLIP_RESULT(res)
+        res2 = ((x0 + x2) >> 14);
+        CLIP_RESULT(res2)
+        dst_word = (res2 << 8) | res;
+        res = ((x0 + x1) >> 14);
+        CLIP_RESULT(res)
+        dst_word |= (res << 16);
+        res = ((x0 + x5) >> 14);
+        CLIP_RESULT(res)
+        dst_word |= (res << 24);
+        *((uint32*)(rec += lx)) = dst_word;
+
+        res = ((x0 - x5) >> 14);
+        CLIP_RESULT(res)
+        res2 = ((x0 - x1) >> 14);
+        CLIP_RESULT(res2)
+        dst_word = (res2 << 8) | res;
+        res = ((x0 - x2) >> 14);
+        CLIP_RESULT(res)
+        dst_word |= (res << 16);
+        res = ((x0 - x4) >> 14);
+        CLIP_RESULT(res)
+        dst_word |= (res << 24);
+        *((uint32*)(rec + 4)) = dst_word;
+    }
+    return ;
+}
+
+void idct_row3Intra(Short *blk, UChar *rec, Int lx)
+{
+    int32 x0, x1, x2, x3, x4, x5, x6, x7, x8;
+    int res, res2;
+    uint32 dst_word;
+    int i = 8;
+
+    rec -= lx;
+    blk -= 8;
+    while (i--)
+    {
+        x2 = blk[10];
+        blk[10] = 0;
+        x1 = blk[9];
+        blk[9] = 0;
+        x0 = ((*(blk += 8)) << 8) + 8192;
+        *blk = 0;/* for proper rounding in the fourth stage */
+        /* both upper and lower*/
+        /* both x2orx6 and x0orx4 */
+
+        x4 = x0;
+        x6 = (W6 * x2 + 4) >> 3;
+        x2 = (W2 * x2 + 4) >> 3;
+        x8 = x0 - x2;
+        x0 += x2;
+        x2 = x8;
+        x8 = x4 - x6;
+        x4 += x6;
+        x6 = x8;
+
+        x7 = (W7 * x1 + 4) >> 3;
+        x1 = (W1 * x1 + 4) >> 3;
+        x3 = x7;
+        x5 = (181 * (x1 - x7) + 128) >> 8;
+        x7 = (181 * (x1 + x7) + 128) >> 8;
+
+        res = ((x0 + x1) >> 14);
+        CLIP_RESULT(res)
+        res2 = ((x4 + x7) >> 14);
+        CLIP_RESULT(res2)
+        dst_word = (res2 << 8) | res;
+        res = ((x6 + x5) >> 14);
+        CLIP_RESULT(res)
+        dst_word |= (res << 16);
+        res = ((x2 + x3) >> 14);
+        CLIP_RESULT(res)
+        dst_word |= (res << 24);
+        *((uint32*)(rec += lx)) = dst_word;
+
+        res = ((x2 - x3) >> 14);
+        CLIP_RESULT(res)
+        res2 = ((x6 - x5) >> 14);
+        CLIP_RESULT(res2)
+        dst_word = (res2 << 8) | res;
+        res = ((x4 - x7) >> 14);
+        CLIP_RESULT(res)
+        dst_word |= (res << 16);
+        res = ((x0 - x1) >> 14);
+        CLIP_RESULT(res)
+        dst_word |= (res << 24);
+        *((uint32*)(rec + 4)) = dst_word;
+
+    }
+    return ;
+}
+
+void idct_row4Intra(Short *blk, UChar *rec, Int lx)
+{
+    int32 x0, x1, x2, x3, x4, x5, x6, x7, x8;
+    int res, res2;
+    uint32 dst_word;
+    int i = 8;
+
+    rec -= lx;
+    blk -= 8;
+    while (i--)
+    {
+        x2 = blk[10];
+        blk[10] = 0;
+        x1 = blk[9];
+        blk[9] = 0;
+        x3 = blk[11];
+        blk[11] = 0;
+        x0 = ((*(blk += 8)) << 8) + 8192;
+        *blk = 0; /* for proper rounding in the fourth stage */
+
+        x4 = x0;
+        x6 = (W6 * x2 + 4) >> 3;
+        x2 = (W2 * x2 + 4) >> 3;
+        x8 = x0 - x2;
+        x0 += x2;
+        x2 = x8;
+        x8 = x4 - x6;
+        x4 += x6;
+        x6 = x8;
+
+        x7 = (W7 * x1 + 4) >> 3;
+        x1 = (W1 * x1 + 4) >> 3;
+        x5 = (W3 * x3 + 4) >> 3;
+        x3 = (- W5 * x3 + 4) >> 3;
+        x8 = x1 - x5;
+        x1 += x5;
+        x5 = x8;
+        x8 = x7 - x3;
+        x3 += x7;
+        x7 = (181 * (x5 + x8) + 128) >> 8;
+        x5 = (181 * (x5 - x8) + 128) >> 8;
+
+        res = ((x0 + x1) >> 14);
+        CLIP_RESULT(res)
+        res2 = ((x4 + x7) >> 14);
+        CLIP_RESULT(res2)
+        dst_word = (res2 << 8) | res;
+        res = ((x6 + x5) >> 14);
+        CLIP_RESULT(res)
+        dst_word |= (res << 16);
+        res = ((x2 + x3) >> 14);
+        CLIP_RESULT(res)
+        dst_word |= (res << 24);
+        *((uint32*)(rec += lx)) = dst_word;
+
+        res = ((x2 - x3) >> 14);
+        CLIP_RESULT(res)
+        res2 = ((x6 - x5) >> 14);
+        CLIP_RESULT(res2)
+        dst_word = (res2 << 8) | res;
+        res = ((x4 - x7) >> 14);
+        CLIP_RESULT(res)
+        dst_word |= (res << 16);
+        res = ((x0 - x1) >> 14);
+        CLIP_RESULT(res)
+        dst_word |= (res << 24);
+        *((uint32*)(rec + 4)) = dst_word;
+    }
+
+    return ;
+}
+
+#ifndef SMALL_DCT
+void idct_row0x40Intra(Short *blk, UChar *rec, Int lx)
+{
+    int32  x1, x2, x4, x5;
+    int res, res2;
+    uint32 dst_word;
+    int i = 8;
+
+    rec -= lx;
+
+    while (i--)
+    {
+        /* shortcut */
+        x4 = blk[1];
+        blk[1] = 0;
+        blk += 8;
+
+        /* first stage */
+        x5 = (W7 * x4 + 4) >> 3;
+        x4 = (W1 * x4 + 4) >> 3;
+
+        /* third stage */
+        x2 = (181 * (x4 + x5) + 128) >> 8;
+        x1 = (181 * (x4 - x5) + 128) >> 8;
+
+        /* fourth stage */
+        res = ((8192 + x4) >> 14);
+        CLIP_RESULT(res)
+        res2 = ((8192 + x2) >> 14);
+        CLIP_RESULT(res2)
+        dst_word = (res2 << 8) | res;
+        res = ((8192 + x1) >> 14);
+        CLIP_RESULT(res)
+        dst_word |= (res << 16);
+        res = ((8192 + x5) >> 14);
+        CLIP_RESULT(res)
+        dst_word |= (res << 24);
+        *((uint32*)(rec += lx)) = dst_word;
+
+        res = ((8192 - x5) >> 14);
+        CLIP_RESULT(res)
+        res2 = ((8192 - x1) >> 14);
+        CLIP_RESULT(res2)
+        dst_word = (res2 << 8) | res;
+        res = ((8192 - x2) >> 14);
+        CLIP_RESULT(res)
+        dst_word |= (res << 16);
+        res = ((8192 - x4) >> 14);
+        CLIP_RESULT(res)
+        dst_word |= (res << 24);
+        *((uint32*)(rec + 4)) = dst_word;
+
+    }
+    return ;
+}
+
+void idct_row0x20Intra(Short *blk, UChar *rec, Int lx)
+{
+    int32 x0, x2, x4, x6;
+    int res, res2;
+    uint32 dst_word;
+    int i = 8;
+
+    rec -= lx;
+    while (i--)
+    {
+        x2 = blk[2];
+        blk[2] = 0;
+        blk += 8;
+
+        /* both upper and lower*/
+        /* both x2orx6 and x0orx4 */
+        x6 = (W6 * x2 + 4) >> 3;
+        x2 = (W2 * x2 + 4) >> 3;
+        x0 = 8192 + x2;
+        x2 = 8192 - x2;
+        x4 = 8192 + x6;
+        x6 = 8192 - x6;
+
+        res = ((x0) >> 14);
+        CLIP_RESULT(res)
+        res2 = ((x4) >> 14);
+        CLIP_RESULT(res2)
+        dst_word = (res2 << 8) | res;
+        res = ((x6) >> 14);
+        CLIP_RESULT(res)
+        dst_word |= (res << 16);
+        res = ((x2) >> 14);
+        CLIP_RESULT(res)
+        dst_word |= (res << 24);
+        *((uint32*)(rec += lx)) = dst_word;
+
+        res = ((x2) >> 14);
+        CLIP_RESULT(res)
+        res2 = ((x6) >> 14);
+        CLIP_RESULT(res2)
+        dst_word = (res2 << 8) | res;
+        res = ((x4) >> 14);
+        CLIP_RESULT(res)
+        dst_word |= (res << 16);
+        res = ((x0) >> 14);
+        CLIP_RESULT(res)
+        dst_word |= (res << 24);
+        *((uint32*)(rec + 4)) = dst_word;
+
+    }
+    return ;
+}
+
+void idct_row0x10Intra(Short *blk, UChar *rec, Int lx)
+{
+    int32 x1, x3, x5, x7;
+    int res, res2;
+    uint32 dst_word;
+    int i = 8;
+
+    rec -= lx;
+    while (i--)
+    {
+        x3 = blk[3];
+        blk[3] = 0 ;
+        blk += 8;
+
+        x1 = (W3 * x3 + 4) >> 3;
+        x3 = (W5 * x3 + 4) >> 3;
+
+        x7 = (181 * (x3 - x1) + 128) >> 8;
+        x5 = (-181 * (x1 + x3) + 128) >> 8;
+
+        res = ((8192 + x1) >> 14);
+        CLIP_RESULT(res)
+        res2 = ((8192 + x7) >> 14);
+        CLIP_RESULT(res2)
+        dst_word = (res2 << 8) | res;
+        res = ((8192 + x5) >> 14);
+        CLIP_RESULT(res)
+        dst_word |= (res << 16);
+        res = ((8192 - x3) >> 14);
+        CLIP_RESULT(res)
+        dst_word |= (res << 24);
+        *((uint32*)(rec += lx)) = dst_word;
+
+        res = ((8192 + x3) >> 14);
+        CLIP_RESULT(res)
+        res2 = ((8192 - x5) >> 14);
+        CLIP_RESULT(res2)
+        dst_word = (res2 << 8) | res;
+        res = ((8192 - x7) >> 14);
+        CLIP_RESULT(res)
+        dst_word |= (res << 16);
+        res = ((8192 - x1) >> 14);
+        CLIP_RESULT(res)
+        dst_word |= (res << 24);
+        *((uint32*)(rec + 4)) = dst_word;
+
+    }
+
+    return ;
+}
+
+#endif /* SMALL_DCT */
+void idct_rowIntra(Short *blk, UChar *rec, Int lx)
+{
+    int32 x0, x1, x2, x3, x4, x5, x6, x7, x8;
+    int i = 8;
+    int res, res2;
+    uint32 dst_word;
+
+    blk -= 8;
+    rec -= lx;
+
+    while (i--)
+    {
+        x1 = (int32)blk[12] << 8;
+        blk[12] = 0;
+        x2 = blk[14];
+        blk[14] = 0;
+        x3 = blk[10];
+        blk[10] = 0;
+        x4 = blk[9];
+        blk[9] = 0;
+        x5 = blk[15];
+        blk[15] = 0;
+        x6 = blk[13];
+        blk[13] = 0;
+        x7 = blk[11];
+        blk[11] = 0;
+        x0 = ((*(blk += 8)) << 8) + 8192;
+        *blk = 0;  /* for proper rounding in the fourth stage */
+
+        /* first stage */
+        x8 = W7 * (x4 + x5) + 4;
+        x4 = (x8 + (W1 - W7) * x4) >> 3;
+        x5 = (x8 - (W1 + W7) * x5) >> 3;
+        x8 = W3 * (x6 + x7) + 4;
+        x6 = (x8 - (W3 - W5) * x6) >> 3;
+        x7 = (x8 - (W3 + W5) * x7) >> 3;
+
+        /* second stage */
+        x8 = x0 + x1;
+        x0 -= x1;
+        x1 = W6 * (x3 + x2) + 4;
+        x2 = (x1 - (W2 + W6) * x2) >> 3;
+        x3 = (x1 + (W2 - W6) * x3) >> 3;
+        x1 = x4 + x6;
+        x4 -= x6;
+        x6 = x5 + x7;
+        x5 -= x7;
+
+        /* third stage */
+        x7 = x8 + x3;
+        x8 -= x3;
+        x3 = x0 + x2;
+        x0 -= x2;
+        x2 = (181 * (x4 + x5) + 128) >> 8;
+        x4 = (181 * (x4 - x5) + 128) >> 8;
+
+        /* fourth stage */
+        res = ((x7 + x1) >> 14);
+        CLIP_RESULT(res)
+        res2 = ((x3 + x2) >> 14);
+        CLIP_RESULT(res2)
+        dst_word = res | (res2 << 8);
+        res = ((x0 + x4) >> 14);
+        CLIP_RESULT(res)
+        dst_word |= (res << 16);
+        res = ((x8 + x6) >> 14);
+        CLIP_RESULT(res)
+        dst_word |= (res << 24);
+        *((uint32*)(rec += lx)) = dst_word;
+
+        res = ((x8 - x6) >> 14);
+        CLIP_RESULT(res)
+        res2 = ((x0 - x4) >> 14);
+        CLIP_RESULT(res2)
+        dst_word = res | (res2 << 8);
+        res = ((x3 - x2) >> 14);
+        CLIP_RESULT(res)
+        dst_word |= (res << 16);
+        res = ((x7 - x1) >> 14);
+        CLIP_RESULT(res)
+        dst_word |= (res << 24);
+        *((uint32*)(rec + 4)) = dst_word;
+    }
+    return;
+}
+
+
+/* This function should not be called at all ****/
+void idct_row0zmv(Short *srce, UChar *rec, UChar *pred, Int lx)
+{
+    OSCL_UNUSED_ARG(srce);
+    OSCL_UNUSED_ARG(rec);
+    OSCL_UNUSED_ARG(pred);
+    OSCL_UNUSED_ARG(lx);
+
+    return;
+}
+
+void idct_row1zmv(Short *blk, UChar *rec, UChar *pred, Int lx)
+{
+    int tmp;
+    int i = 8;
+    uint32 pred_word, dst_word;
+    int res, res2;
+
+    /* preset the offset, such that we can take advantage pre-offset addressing mode   */
+    pred -= 16;
+    rec -= lx;
+    blk -= 8;
+
+    while (i--)
+    {
+        tmp = (*(blk += 8) + 32) >> 6;
+        *blk = 0;
+
+        pred_word = *((uint32*)(pred += 16)); /* read 4 bytes from pred */
+        res = tmp + (pred_word & 0xFF);
+        CLIP_RESULT(res);
+        res2 = tmp + ((pred_word >> 8) & 0xFF);
+        CLIP_RESULT(res2);
+        dst_word = (res2 << 8) | res;
+        res = tmp + ((pred_word >> 16) & 0xFF);
+        CLIP_RESULT(res);
+        dst_word |= (res << 16);
+        res = tmp + ((pred_word >> 24) & 0xFF);
+        CLIP_RESULT(res);
+        dst_word |= (res << 24);
+        *((uint32*)(rec += lx)) = dst_word; /* save 4 bytes to dst */
+
+        pred_word = *((uint32*)(pred + 4)); /* read 4 bytes from pred */
+        res = tmp + (pred_word & 0xFF);
+        CLIP_RESULT(res);
+        res2 = tmp + ((pred_word >> 8) & 0xFF);
+        CLIP_RESULT(res2);
+        dst_word = (res2 << 8) | res;
+        res = tmp + ((pred_word >> 16) & 0xFF);
+        CLIP_RESULT(res);
+        dst_word |= (res << 16);
+        res = tmp + ((pred_word >> 24) & 0xFF);
+        CLIP_RESULT(res);
+        dst_word |= (res << 24);
+        *((uint32*)(rec + 4)) = dst_word; /* save 4 bytes to dst */
+    }
+    return;
+}
+
+void idct_row2zmv(Short *blk, UChar *rec, UChar *pred, Int lx)
+{
+    int32 x0, x1, x2, x4, x5;
+    int i = 8;
+    uint32 pred_word, dst_word;
+    int res, res2;
+
+    /* preset the offset, such that we can take advantage pre-offset addressing mode   */
+    rec -= lx;
+    pred -= 16;
+    blk -= 8;
+
+    while (i--)
+    {
+        /* shortcut */
+        x4 = blk[9];
+        blk[9] = 0;
+        x0 = ((*(blk += 8)) << 8) + 8192;
+        *blk = 0;  /* for proper rounding in the fourth stage */
+
+        /* first stage */
+        x5 = (W7 * x4 + 4) >> 3;
+        x4 = (W1 * x4 + 4) >> 3;
+
+        /* third stage */
+        x2 = (181 * (x4 + x5) + 128) >> 8;
+        x1 = (181 * (x4 - x5) + 128) >> 8;
+
+        /* fourth stage */
+        pred_word = *((uint32*)(pred += 16)); /* read 4 bytes from pred */
+        res = (x0 + x4) >> 14;
+        ADD_AND_CLIP1(res);
+        res2 = (x0 + x2) >> 14;
+        ADD_AND_CLIP2(res2);
+        dst_word = (res2 << 8) | res;
+        res = (x0 + x1) >> 14;
+        ADD_AND_CLIP3(res);
+        dst_word |= (res << 16);
+        res = (x0 + x5) >> 14;
+        ADD_AND_CLIP4(res);
+        dst_word |= (res << 24);
+        *((uint32*)(rec += lx)) = dst_word; /* save 4 bytes to dst */
+
+        pred_word = *((uint32*)(pred + 4)); /* read 4 bytes from pred */
+        res = (x0 - x5) >> 14;
+        ADD_AND_CLIP1(res);
+        res2 = (x0 - x1) >> 14;
+        ADD_AND_CLIP2(res2);
+        dst_word = (res2 << 8) | res;
+        res = (x0 - x2) >> 14;
+        ADD_AND_CLIP3(res);
+        dst_word |= (res << 16);
+        res = (x0 - x4) >> 14;
+        ADD_AND_CLIP4(res);
+        dst_word |= (res << 24);
+        *((uint32*)(rec + 4)) = dst_word; /* save 4 bytes to dst */
+    }
+    return ;
+}
+
+void idct_row3zmv(Short *blk, UChar *rec, UChar *pred, Int lx)
+{
+    int32 x0, x1, x2, x3, x4, x5, x6, x7, x8;
+    int i = 8;
+    uint32 pred_word, dst_word;
+    int res, res2;
+
+    /* preset the offset, such that we can take advantage pre-offset addressing mode   */
+    rec -= lx;
+    pred -= 16;
+    blk -= 8;
+
+    while (i--)
+    {
+        x2 = blk[10];
+        blk[10] = 0;
+        x1 = blk[9];
+        blk[9] = 0;
+        x0 = ((*(blk += 8)) << 8) + 8192;
+        *blk = 0;  /* for proper rounding in the fourth stage */
+        /* both upper and lower*/
+        /* both x2orx6 and x0orx4 */
+
+        x4 = x0;
+        x6 = (W6 * x2 + 4) >> 3;
+        x2 = (W2 * x2 + 4) >> 3;
+        x8 = x0 - x2;
+        x0 += x2;
+        x2 = x8;
+        x8 = x4 - x6;
+        x4 += x6;
+        x6 = x8;
+
+        x7 = (W7 * x1 + 4) >> 3;
+        x1 = (W1 * x1 + 4) >> 3;
+        x3 = x7;
+        x5 = (181 * (x1 - x7) + 128) >> 8;
+        x7 = (181 * (x1 + x7) + 128) >> 8;
+
+        pred_word = *((uint32*)(pred += 16)); /* read 4 bytes from pred */
+        res = (x0 + x1) >> 14;
+        ADD_AND_CLIP1(res);
+        res2 = (x4 + x7) >> 14;
+        ADD_AND_CLIP2(res2);
+        dst_word = (res2 << 8) | res;
+        res = (x6 + x5) >> 14;
+        ADD_AND_CLIP3(res);
+        dst_word |= (res << 16);
+        res = (x2 + x3) >> 14;
+        ADD_AND_CLIP4(res);
+        dst_word |= (res << 24);
+        *((uint32*)(rec += lx)) = dst_word; /* save 4 bytes to dst */
+
+        pred_word = *((uint32*)(pred + 4)); /* read 4 bytes from pred */
+        res = (x2 - x3) >> 14;
+        ADD_AND_CLIP1(res);
+        res2 = (x6 - x5) >> 14;
+        ADD_AND_CLIP2(res2);
+        dst_word = (res2 << 8) | res;
+        res = (x4 - x7) >> 14;
+        ADD_AND_CLIP3(res);
+        dst_word |= (res << 16);
+        res = (x0 - x1) >> 14;
+        ADD_AND_CLIP4(res);
+        dst_word |= (res << 24);
+        *((uint32*)(rec + 4)) = dst_word; /* save 4 bytes to dst */
+    }
+
+    return ;
+}
+
+void idct_row4zmv(Short *blk, UChar *rec, UChar *pred, Int lx)
+{
+    int32 x0, x1, x2, x3, x4, x5, x6, x7, x8;
+    int i = 8;
+    uint32 pred_word, dst_word;
+    int res, res2;
+
+    /* preset the offset, such that we can take advantage pre-offset addressing mode   */
+    rec -= lx;
+    pred -= 16;
+    blk -= 8;
+
+    while (i--)
+    {
+        x2 = blk[10];
+        blk[10] = 0;
+        x1 = blk[9];
+        blk[9] = 0;
+        x3 = blk[11];
+        blk[11] = 0;
+        x0 = ((*(blk += 8)) << 8) + 8192;
+        *blk = 0;   /* for proper rounding in the fourth stage */
+
+        x4 = x0;
+        x6 = (W6 * x2 + 4) >> 3;
+        x2 = (W2 * x2 + 4) >> 3;
+        x8 = x0 - x2;
+        x0 += x2;
+        x2 = x8;
+        x8 = x4 - x6;
+        x4 += x6;
+        x6 = x8;
+
+        x7 = (W7 * x1 + 4) >> 3;
+        x1 = (W1 * x1 + 4) >> 3;
+        x5 = (W3 * x3 + 4) >> 3;
+        x3 = (- W5 * x3 + 4) >> 3;
+        x8 = x1 - x5;
+        x1 += x5;
+        x5 = x8;
+        x8 = x7 - x3;
+        x3 += x7;
+        x7 = (181 * (x5 + x8) + 128) >> 8;
+        x5 = (181 * (x5 - x8) + 128) >> 8;
+
+        pred_word = *((uint32*)(pred += 16)); /* read 4 bytes from pred */
+        res = (x0 + x1) >> 14;
+        ADD_AND_CLIP1(res);
+        res2 = (x4 + x7) >> 14;
+        ADD_AND_CLIP2(res2);
+        dst_word = (res2 << 8) | res;
+        res = (x6 + x5) >> 14;
+        ADD_AND_CLIP3(res);
+        dst_word |= (res << 16);
+        res = (x2 + x3) >> 14;
+        ADD_AND_CLIP4(res);
+        dst_word |= (res << 24);
+        *((uint32*)(rec += lx)) = dst_word; /* save 4 bytes to dst */
+
+        pred_word = *((uint32*)(pred + 4)); /* read 4 bytes from pred */
+        res = (x2 - x3) >> 14;
+        ADD_AND_CLIP1(res);
+        res2 = (x6 - x5) >> 14;
+        ADD_AND_CLIP2(res2);
+        dst_word = (res2 << 8) | res;
+        res = (x4 - x7) >> 14;
+        ADD_AND_CLIP3(res);
+        dst_word |= (res << 16);
+        res = (x0 - x1) >> 14;
+        ADD_AND_CLIP4(res);
+        dst_word |= (res << 24);
+        *((uint32*)(rec + 4)) = dst_word; /* save 4 bytes to dst */
+    }
+    return ;
+}
+
+#ifndef SMALL_DCT
+void idct_row0x40zmv(Short *blk, UChar *rec, UChar *pred, Int lx)
+{
+    int32 x1, x2, x4, x5;
+    int i = 8;
+    uint32 pred_word, dst_word;
+    int res, res2;
+
+    /* preset the offset, such that we can take advantage pre-offset addressing mode   */
+    rec -= lx;
+    pred -= 16;
+
+    while (i--)
+    {
+        /* shortcut */
+        x4 = blk[1];
+        blk[1] = 0;
+        blk += 8;  /* for proper rounding in the fourth stage */
+
+        /* first stage */
+        x5 = (W7 * x4 + 4) >> 3;
+        x4 = (W1 * x4 + 4) >> 3;
+
+        /* third stage */
+        x2 = (181 * (x4 + x5) + 128) >> 8;
+        x1 = (181 * (x4 - x5) + 128) >> 8;
+
+        /* fourth stage */
+        pred_word = *((uint32*)(pred += 16)); /* read 4 bytes from pred */
+        res = (8192 + x4) >> 14;
+        ADD_AND_CLIP1(res);
+        res2 = (8192 + x2) >> 14;
+        ADD_AND_CLIP2(res2);
+        dst_word = (res2 << 8) | res;
+        res = (8192 + x1) >> 14;
+        ADD_AND_CLIP3(res);
+        dst_word |= (res << 16);
+        res = (8192 + x5) >> 14;
+        ADD_AND_CLIP4(res);
+        dst_word |= (res << 24);
+        *((uint32*)(rec += lx)) = dst_word; /* save 4 bytes to dst */
+
+        pred_word = *((uint32*)(pred + 4)); /* read 4 bytes from pred */
+        res = (8192 - x5) >> 14;
+        ADD_AND_CLIP1(res);
+        res2 = (8192 - x1) >> 14;
+        ADD_AND_CLIP2(res2);
+        dst_word = (res2 << 8) | res;
+        res = (8192 - x2) >> 14;
+        ADD_AND_CLIP3(res);
+        dst_word |= (res << 16);
+        res = (8192 - x4) >> 14;
+        ADD_AND_CLIP4(res);
+        dst_word |= (res << 24);
+        *((uint32*)(rec + 4)) = dst_word; /* save 4 bytes to dst */
+    }
+    return ;
+}
+
+void idct_row0x20zmv(Short *blk, UChar *rec, UChar *pred, Int lx)
+{
+    int32 x0, x2, x4, x6;
+    int i = 8;
+    uint32 pred_word, dst_word;
+    int res, res2;
+
+    /* preset the offset, such that we can take advantage pre-offset addressing mode   */
+    rec -= lx;
+    pred -= 16;
+
+    while (i--)
+    {
+        x2 = blk[2];
+        blk[2] = 0;
+        blk += 8; /* for proper rounding in the fourth stage */
+        /* both upper and lower*/
+        /* both x2orx6 and x0orx4 */
+        x6 = (W6 * x2 + 4) >> 3;
+        x2 = (W2 * x2 + 4) >> 3;
+        x0 = 8192 + x2;
+        x2 = 8192 - x2;
+        x4 = 8192 + x6;
+        x6 = 8192 - x6;
+
+        pred_word = *((uint32*)(pred += 16)); /* read 4 bytes from pred */
+        res = (x0) >> 14;
+        ADD_AND_CLIP1(res);
+        res2 = (x4) >> 14;
+        ADD_AND_CLIP2(res2);
+        dst_word = (res2 << 8) | res;
+        res = (x6) >> 14;
+        ADD_AND_CLIP3(res);
+        dst_word |= (res << 16);
+        res = (x2) >> 14;
+        ADD_AND_CLIP4(res);
+        dst_word |= (res << 24);
+        *((uint32*)(rec += lx)) = dst_word; /* save 4 bytes to dst */
+
+        pred_word = *((uint32*)(pred + 4)); /* read 4 bytes from pred */
+        res = (x2) >> 14;
+        ADD_AND_CLIP1(res);
+        res2 = (x6) >> 14;
+        ADD_AND_CLIP2(res2);
+        dst_word = (res2 << 8) | res;
+        res = (x4) >> 14;
+        ADD_AND_CLIP3(res);
+        dst_word |= (res << 16);
+        res = (x0) >> 14;
+        ADD_AND_CLIP4(res);
+        dst_word |= (res << 24);
+        *((uint32*)(rec + 4)) = dst_word; /* save 4 bytes to dst */
+    }
+
+    return ;
+}
+
+void idct_row0x10zmv(Short *blk, UChar *rec, UChar *pred, Int lx)
+{
+    int32 x1, x3, x5, x7;
+    int i = 8;
+    uint32 pred_word, dst_word;
+    int res, res2;
+
+    /* preset the offset, such that we can take advantage pre-offset addressing mode   */
+    rec -= lx;
+    pred -= 16;
+
+    while (i--)
+    {
+        x3 = blk[3];
+        blk[3] = 0;
+        blk += 8;
+
+        x1 = (W3 * x3 + 4) >> 3;
+        x3 = (-W5 * x3 + 4) >> 3;
+
+        x7 = (-181 * (x3 + x1) + 128) >> 8;
+        x5 = (181 * (x3 - x1) + 128) >> 8;
+
+        pred_word = *((uint32*)(pred += 16)); /* read 4 bytes from pred */
+        res = (8192 + x1) >> 14;
+        ADD_AND_CLIP1(res);
+        res2 = (8192 + x7) >> 14;
+        ADD_AND_CLIP2(res2);
+        dst_word = (res2 << 8) | res;
+        res = (8192 + x5) >> 14;
+        ADD_AND_CLIP3(res);
+        dst_word |= (res << 16);
+        res = (8192 + x3) >> 14;
+        ADD_AND_CLIP4(res);
+        dst_word |= (res << 24);
+        *((uint32*)(rec += lx)) = dst_word; /* save 4 bytes to dst */
+
+        pred_word = *((uint32*)(pred + 4)); /* read 4 bytes from pred */
+        res = (8192 - x3) >> 14;
+        ADD_AND_CLIP1(res);
+        res2 = (8192 - x5) >> 14;
+        ADD_AND_CLIP2(res2);
+        dst_word = (res2 << 8) | res;
+        res = (8192 - x7) >> 14;
+        ADD_AND_CLIP3(res);
+        dst_word |= (res << 16);
+        res = (8192 - x1) >> 14;
+        ADD_AND_CLIP4(res);
+        dst_word |= (res << 24);
+        *((uint32*)(rec + 4)) = dst_word; /* save 4 bytes to dst */
+    }
+    return ;
+}
+
+#endif /* SMALL_DCT */
+
+void idct_rowzmv(Short *blk, UChar *rec, UChar *pred, Int lx)
+{
+    int32 x0, x1, x2, x3, x4, x5, x6, x7, x8;
+    int i = 8;
+    uint32 pred_word, dst_word;
+    int res, res2;
+
+    /* preset the offset, such that we can take advantage pre-offset addressing mode   */
+    rec -= lx;
+    pred -= 16;
+    blk -= 8;
+
+    while (i--)
+    {
+        x1 = (int32)blk[12] << 8;
+        blk[12] = 0;
+        x2 = blk[14];
+        blk[14] = 0;
+        x3 = blk[10];
+        blk[10] = 0;
+        x4 = blk[9];
+        blk[9] = 0;
+        x5 = blk[15];
+        blk[15] = 0;
+        x6 = blk[13];
+        blk[13] = 0;
+        x7 = blk[11];
+        blk[11] = 0;
+        x0 = ((*(blk += 8)) << 8) + 8192;
+        *blk = 0;   /* for proper rounding in the fourth stage */
+
+        /* first stage */
+        x8 = W7 * (x4 + x5) + 4;
+        x4 = (x8 + (W1 - W7) * x4) >> 3;
+        x5 = (x8 - (W1 + W7) * x5) >> 3;
+        x8 = W3 * (x6 + x7) + 4;
+        x6 = (x8 - (W3 - W5) * x6) >> 3;
+        x7 = (x8 - (W3 + W5) * x7) >> 3;
+
+        /* second stage */
+        x8 = x0 + x1;
+        x0 -= x1;
+        x1 = W6 * (x3 + x2) + 4;
+        x2 = (x1 - (W2 + W6) * x2) >> 3;
+        x3 = (x1 + (W2 - W6) * x3) >> 3;
+        x1 = x4 + x6;
+        x4 -= x6;
+        x6 = x5 + x7;
+        x5 -= x7;
+
+        /* third stage */
+        x7 = x8 + x3;
+        x8 -= x3;
+        x3 = x0 + x2;
+        x0 -= x2;
+        x2 = (181 * (x4 + x5) + 128) >> 8;
+        x4 = (181 * (x4 - x5) + 128) >> 8;
+
+        /* fourth stage */
+        pred_word = *((uint32*)(pred += 16)); /* read 4 bytes from pred */
+
+        res = (x7 + x1) >> 14;
+        ADD_AND_CLIP1(res);
+        res2 = (x3 + x2) >> 14;
+        ADD_AND_CLIP2(res2);
+        dst_word = (res2 << 8) | res;
+        res = (x0 + x4) >> 14;
+        ADD_AND_CLIP3(res);
+        dst_word |= (res << 16);
+        res = (x8 + x6) >> 14;
+        ADD_AND_CLIP4(res);
+        dst_word |= (res << 24);
+        *((uint32*)(rec += lx)) = dst_word; /* save 4 bytes to dst */
+
+        pred_word = *((uint32*)(pred + 4)); /* read 4 bytes from pred */
+
+        res = (x8 - x6) >> 14;
+        ADD_AND_CLIP1(res);
+        res2 = (x0 - x4) >> 14;
+        ADD_AND_CLIP2(res2);
+        dst_word = (res2 << 8) | res;
+        res = (x3 - x2) >> 14;
+        ADD_AND_CLIP3(res);
+        dst_word |= (res << 16);
+        res = (x7 - x1) >> 14;
+        ADD_AND_CLIP4(res);
+        dst_word |= (res << 24);
+        *((uint32*)(rec + 4)) = dst_word; /* save 4 bytes to dst */
+    }
+    return;
+}
+
+/*----------------------------------------------------------------------------
+;  End Function: idctcol
+----------------------------------------------------------------------------*/
+/* ======================================================================== */
+/*  Function : BlockIDCTMotionComp                                              */
+/*  Date     : 10/16/2000                                                   */
+/*  Purpose  : fast IDCT routine                                    */
+/*  In/out   :                                                              */
+/*      Int* coeff_in   Dequantized coefficient
+        Int block_out   output IDCT coefficient
+        Int maxval      clip value                                          */
+/*  Modified :   7/31/01, add checking for all-zero and DC-only block.  */
+/*              do 8 columns at a time                                      */
+/*               8/2/01, do column first then row-IDCT.                 */
+/*               8/2/01, remove clipping (included in motion comp).     */
+/*               8/7/01, combine with motion comp.                      */
+/*               8/8/01, use AAN IDCT                                       */
+/*               9/4/05, use Chen's IDCT and 16 bit block                   */
+/* ======================================================================== */
+void BlockIDCTMotionComp(Short *block, UChar *bitmapcol, UChar bitmaprow,
+                         Int dctMode, UChar *rec, UChar *pred, Int lx_intra)
+{
+    Int i;
+    Int tmp, tmp2;
+    ULong tmp4;
+    Int bmap;
+    Short *ptr = block;
+    UChar *endcol;
+    UInt mask = 0xFF;
+    Int lx = lx_intra >> 1;
+    Int intra = (lx_intra & 1);
+
+    /*  all-zero block */
+    if (dctMode == 0 || bitmaprow == 0)
+    {
+        if (intra)
+        {
+            *((ULong*)rec) = *((ULong*)(rec + 4)) = 0;
+            *((ULong*)(rec += lx)) = 0;
+            *((ULong*)(rec + 4)) = 0;
+            *((ULong*)(rec += lx)) = 0;
+            *((ULong*)(rec + 4)) = 0;
+            *((ULong*)(rec += lx)) = 0;
+            *((ULong*)(rec + 4)) = 0;
+            *((ULong*)(rec += lx)) = 0;
+            *((ULong*)(rec + 4)) = 0;
+            *((ULong*)(rec += lx)) = 0;
+            *((ULong*)(rec + 4)) = 0;
+            *((ULong*)(rec += lx)) = 0;
+            *((ULong*)(rec + 4)) = 0;
+            *((ULong*)(rec += lx)) = 0;
+            *((ULong*)(rec + 4)) = 0;
+            return ;
+        }
+        else /* copy from previous frame */
+        {
+            *((ULong*)rec) = *((ULong*)pred);
+            *((ULong*)(rec + 4)) = *((ULong*)(pred + 4));
+            *((ULong*)(rec += lx)) = *((ULong*)(pred += 16));
+            *((ULong*)(rec + 4)) = *((ULong*)(pred + 4));
+            *((ULong*)(rec += lx)) = *((ULong*)(pred += 16));
+            *((ULong*)(rec + 4)) = *((ULong*)(pred + 4));
+            *((ULong*)(rec += lx)) = *((ULong*)(pred += 16));
+            *((ULong*)(rec + 4)) = *((ULong*)(pred + 4));
+            *((ULong*)(rec += lx)) = *((ULong*)(pred += 16));
+            *((ULong*)(rec + 4)) = *((ULong*)(pred + 4));
+            *((ULong*)(rec += lx)) = *((ULong*)(pred += 16));
+            *((ULong*)(rec + 4)) = *((ULong*)(pred + 4));
+            *((ULong*)(rec += lx)) = *((ULong*)(pred += 16));
+            *((ULong*)(rec + 4)) = *((ULong*)(pred + 4));
+            *((ULong*)(rec += lx)) = *((ULong*)(pred += 16));
+            *((ULong*)(rec + 4)) = *((ULong*)(pred + 4));
+            return ;
+        }
+    }
+
+    /* Test for DC only block */
+    if (dctMode == 1 || (bitmaprow == 0x80 && bitmapcol[0] == 0x80))
+    {
+        i = ((block[0] << 3) + 32) >> 6;
+        block[0] = 0;
+        if (intra)
+        {
+            if ((UInt)i > mask) i = mask & (~(i >> 31));
+
+            tmp = i | (i << 8);
+            tmp |= (tmp << 16);
+
+            *((ULong*)rec) = *((ULong*)(rec + 4)) = tmp;
+            *((ULong*)(rec += lx)) = tmp;
+            *((ULong*)(rec + 4)) = tmp;
+            *((ULong*)(rec += lx)) = tmp;
+            *((ULong*)(rec + 4)) = tmp;
+            *((ULong*)(rec += lx)) = tmp;
+            *((ULong*)(rec + 4)) = tmp;
+            *((ULong*)(rec += lx)) = tmp;
+            *((ULong*)(rec + 4)) = tmp;
+            *((ULong*)(rec += lx)) = tmp;
+            *((ULong*)(rec + 4)) = tmp;
+            *((ULong*)(rec += lx)) = tmp;
+            *((ULong*)(rec + 4)) = tmp;
+            *((ULong*)(rec += lx)) = tmp;
+            *((ULong*)(rec + 4)) = tmp;
+
+            return ;
+        }
+        else
+        {
+            endcol = rec + (lx << 3);
+            do
+            {
+                tmp4 = *((ULong*)pred);
+                tmp2 = tmp4 & 0xFF;
+                tmp2 += i;
+                if ((UInt)tmp2 > mask) tmp2 = mask & (~(tmp2 >> 31));
+                tmp = (tmp4 >> 8) & 0xFF;
+                tmp += i;
+                if ((UInt)tmp > mask) tmp = mask & (~(tmp >> 31));
+                tmp2 |= (tmp << 8);
+                tmp = (tmp4 >> 16) & 0xFF;
+                tmp += i;
+                if ((UInt)tmp > mask) tmp = mask & (~(tmp >> 31));
+                tmp2 |= (tmp << 16);
+                tmp = (tmp4 >> 24) & 0xFF;
+                tmp += i;
+                if ((UInt)tmp > mask) tmp = mask & (~(tmp >> 31));
+                tmp2 |= (tmp << 24);
+                *((ULong*)rec) = tmp2;
+
+                tmp4 = *((ULong*)(pred + 4));
+                tmp2 = tmp4 & 0xFF;
+                tmp2 += i;
+                if ((UInt)tmp2 > mask) tmp2 = mask & (~(tmp2 >> 31));
+                tmp = (tmp4 >> 8) & 0xFF;
+                tmp += i;
+                if ((UInt)tmp > mask) tmp = mask & (~(tmp >> 31));
+                tmp2 |= (tmp << 8);
+                tmp = (tmp4 >> 16) & 0xFF;
+                tmp += i;
+                if ((UInt)tmp > mask) tmp = mask & (~(tmp >> 31));
+                tmp2 |= (tmp << 16);
+                tmp = (tmp4 >> 24) & 0xFF;
+                tmp += i;
+                if ((UInt)tmp > mask) tmp = mask & (~(tmp >> 31));
+                tmp2 |= (tmp << 24);
+                *((ULong*)(rec + 4)) = tmp2;
+
+                rec += lx;
+                pred += 16;
+            }
+            while (rec < endcol);
+            return ;
+        }
+    }
+
+    for (i = 0; i < dctMode; i++)
+    {
+        bmap = (Int)bitmapcol[i];
+        if (bmap)
+        {
+            if ((bmap&0xf) == 0)
+                (*(idctcolVCA[bmap>>4]))(ptr);
+            else
+                idct_col(ptr);
+        }
+        ptr++;
+    }
+
+    if ((bitmaprow&0xf) == 0)
+    {
+        if (intra)
+            (*(idctrowVCAIntra[(Int)(bitmaprow>>4)]))(block, rec, lx);
+        else
+            (*(idctrowVCAzmv[(Int)(bitmaprow>>4)]))(block, rec, pred, lx);
+    }
+    else
+    {
+        if (intra)
+            idct_rowIntra(block, rec, lx);
+        else
+            idct_rowzmv(block, rec, pred, lx);
+    }
+}
diff --git a/media/libstagefright/codecs/m4v_h263/enc/src/fastquant.cpp b/media/libstagefright/codecs/m4v_h263/enc/src/fastquant.cpp
new file mode 100644
index 0000000..466ce47
--- /dev/null
+++ b/media/libstagefright/codecs/m4v_h263/enc/src/fastquant.cpp
@@ -0,0 +1,967 @@
+/* ------------------------------------------------------------------
+ * Copyright (C) 1998-2009 PacketVideo
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
+ * express or implied.
+ * See the License for the specific language governing permissions
+ * and limitations under the License.
+ * -------------------------------------------------------------------
+ */
+#include "mp4enc_lib.h"
+#include "fastquant_inline.h"
+
+#define siz 63
+#define LSL 18
+
+
+const static UChar imask[8] = {128, 64, 32, 16, 8, 4, 2, 1};
+#define SIGN0(a)        ( ((a)<0) ? -1 : (((a)>0) ? 1  : 0) )
+
+/* variable bit precision quantization scale */
+/* used to avoid using 32-bit multiplication */
+const static Short scaleArrayV[32] = {0, 16384, 8192, 5462,  /* 15 */
+                                      4096, 3277, 2731, 2341,
+                                      4096, 3641, 3277, 2979,  /* 16 */
+                                      2731, 2521, 2341, 2185,
+                                      4096, 3856, 3641, 3450,  /* 17 */
+                                      3277, 3121, 2979, 2850,
+                                      5462, 5243, 5042, 4855,  /* 18 */
+                                      4682, 4520, 4370, 4229
+                                     };
+
+/* scale for dc_scaler and qmat, note, no value smaller than 8 */
+const static Short scaleArrayV2[47] = {0, 0, 0, 0, 0, 0, 0, 0, /* 15 */
+                                       4096, 3641, 3277, 2979, 2731, 2521, 2341, 2185,
+                                       4096, 3856, 3641, 3450, 3277, 3121, 2979, 2850,  /* 16 */
+                                       2731, 2622, 2521, 2428, 2341, 2260, 2185, 2115,
+                                       4096, 3972, 3856, 3745, 3641, 3543, 3450, 3361,  /* 17 */
+                                       3277, 3197, 3121, 3049, 2979, 2913, 2850
+                                      };
+
+/* AAN scale and zigzag */
+const static Short AANScale[64] =
+{
+    /* 0 */ 0x1000, 0x0B89, 0x0C3E, 0x0D9B, 0x1000, 0x0A2E, 0x0EC8, 0x0E7F,
+    /* 1 */ 0x0B89, 0x0851, 0x08D4, 0x09CF, 0x0B89, 0x0757, 0x0AA8, 0x0A73,
+    /* 2 */ 0x0C3E, 0x08D4, 0x095F, 0x0A6A, 0x0C3E, 0x07CB, 0x0B50, 0x0B18,
+    /* 3 */ 0x0D9B, 0x09CF, 0x0A6A, 0x0B92, 0x0D9B, 0x08A8, 0x0C92, 0x0C54,
+    /* 4 */ 0x1000, 0x0B89, 0x0C3E, 0x0D9B, 0x1000, 0x0A2E, 0x0EC8, 0x0E7F,
+    /* 5 */ 0x0A2E, 0x0757, 0x07CB, 0x08A8, 0x0A2E, 0x067A, 0x0968, 0x0939,
+    /* 6 */ 0x0EC8, 0x0AA8, 0x0B50, 0x0C92, 0x0EC8, 0x0968, 0x0DA8, 0x0D64,
+    /* 7 */ 0x0E7F, 0x0A73, 0x0B18, 0x0C54, 0x0E7F, 0x0939, 0x0D64, 0x0D23
+};
+
+const static UShort ZZTab[64] =
+{
+    /* 0 */ 0x0, 0x2, 0xA, 0xC, 0x1C, 0x1E, 0x36, 0x38,
+    /* 1 */ 0x4, 0x8, 0xE, 0x1A, 0x20, 0x34, 0x3A, 0x54,
+    /* 2 */ 0x6, 0x10, 0x18, 0x22, 0x32, 0x3C, 0x52, 0x56,
+    /* 3 */ 0x12, 0x16, 0x24, 0x30, 0x3E, 0x50, 0x58, 0x6A,
+    /* 4 */ 0x14, 0x26, 0x2E, 0x40, 0x4E, 0x5A, 0x68, 0x6C,
+    /* 5 */ 0x28, 0x2C, 0x42, 0x4C, 0x5C, 0x66, 0x6E, 0x78,
+    /* 6 */ 0x2A, 0x44, 0x4A, 0x5E, 0x64, 0x70, 0x76, 0x7A,
+    /* 7 */ 0x46, 0x48, 0x60, 0x62, 0x72, 0x74, 0x7C, 0x7E
+};
+
+
+//Tao need to remove, write another version of abs
+//#include <math.h>
+
+/* ======================================================================== */
+/*  Function : cal_dc_scalerENC                                             */
+/*  Date     : 01/25/2000                                                   */
+/*  Purpose  : calculation of DC quantization scale according to the
+               incoming Q and type;                                         */
+/*  In/out   :                                                              */
+/*      Int Qp      Quantizer                                               */
+/*  Return   :                                                              */
+/*          DC Scaler                                                       */
+/*  Modified :                                                              */
+/* ======================================================================== */
+/* ======================================================================== */
+Int cal_dc_scalerENC(Int QP, Int type)
+{
+
+    Int dc_scaler;
+    if (type == 1)
+    {
+        if (QP > 0 && QP < 5)
+            dc_scaler = 8;
+        else if (QP > 4 && QP < 9)
+            dc_scaler = 2 * QP;
+        else if (QP > 8 && QP < 25)
+            dc_scaler = QP + 8;
+        else
+            dc_scaler = 2 * QP - 16;
+    }
+    else
+    {
+        if (QP > 0 && QP < 5)
+            dc_scaler = 8;
+        else if (QP > 4 && QP < 25)
+            dc_scaler = (QP + 13) / 2;
+        else
+            dc_scaler = QP - 6;
+    }
+    return dc_scaler;
+}
+
+
+/***********************************************************************
+ Function: BlckQuantDequantH263
+ Date:     June 15, 1999
+ Purpose:  Combine BlockQuantH263 and BlockDequantH263ENC
+ Input:   coeff=> DCT coefficient
+ Output:  qcoeff=> quantized coefficient
+          rcoeff=> reconstructed coefficient
+          return CBP for this block
+          4/2/01,  correct dc_scaler for short_header mode.
+          5/14/01,
+          changed the division into LUT multiplication/shift and other
+          modifications to speed up fastQuant/DeQuant (check for zero 1st, rowq LUT,
+          fast bitmaprow mask and borrowed Addition method instead of ifs from , ).
+          6/25/01,
+          Further optimization (~100K/QCIF), need more testing/comment before integration.
+
+          7/4/01,  break up Inter / Intra function and merge for different cases.
+          7/22/01,  combine AAN scaling here and reordering.
+          7/24/01, , reorder already done in FDCT, the input here is in the next block and
+            it's the
+            transpose of the raster scan. Output the same order (for proof of concenpt).
+          8/1/01, , change FDCT to do row/column FDCT without reordering, input is still
+            in the next block. The reconstructed DCT output is current block in normal
+            order. The quantized output is in zigzag scan order for INTER, row/column for
+            INTRA. Use bitmapzz for zigzag RunLevel for INTER.  The quantization is done
+            in column/row scanning order.
+          8/2/01, , change IDCT to do column/row, change bitmaprow/col to the opposite.
+          8/3/01, , add clipping to the reconstructed coefficient [-2047,2047]
+          9/4/05, , removed scaling for AAN IDCT, use Chen IDCT instead.
+ ********************************************************************/
+
+Int BlockQuantDequantH263Inter(Short *rcoeff, Short *qcoeff, struct QPstruct *QuantParam,
+                               UChar bitmapcol[ ], UChar *bitmaprow, UInt *bitmapzz,
+                               Int dctMode, Int comp, Int dummy, UChar shortHeader)
+{
+    Int i, zz;
+    Int tmp, coeff, q_value;
+    Int QPdiv2 = QuantParam->QPdiv2;
+    Int QPx2 = QuantParam->QPx2;
+    Int Addition = QuantParam->Addition;
+    Int QPx2plus = QuantParam->QPx2plus;
+    Int round = 1 << 15;
+    Int q_scale = scaleArrayV[QuantParam->QP];
+    Int shift = 15 + (QPx2 >> 4);
+    Int *temp;
+    UChar *bcolptr = bitmapcol;
+    Int ac_clip;    /* quantized coeff bound */
+
+    OSCL_UNUSED_ARG(comp);
+    OSCL_UNUSED_ARG(dummy);
+
+
+    if (shortHeader) ac_clip = 126; /* clip between [-127,126] (standard allows 127!) */
+    else ac_clip = 2047;  /* clip between [-2048,2047] */
+
+    /* reset all bitmap to zero */
+    temp = (Int*) bitmapcol;
+    temp[0] = temp[1] = 0;
+    bitmapzz[0] = bitmapzz[1] = 0;
+    *bitmaprow = 0;
+    QPx2plus <<= 4;
+    QPx2plus -= 8;
+
+    rcoeff += 64; /* actual data is 64 item ahead */
+    //end  = rcoeff + dctMode - 1;
+    //rcoeff--;
+    bcolptr--;
+    i = 0;
+
+    do
+    {
+        bcolptr++;
+        //rcoeff++;
+        //i=0;
+        coeff = rcoeff[i];
+        if (coeff == 0x7fff) /* all zero column */
+        {
+            i++;
+            continue;
+        }
+
+        do
+        {
+            if (coeff >= -QPx2plus && coeff < QPx2plus)  /* quantize to zero */
+            {
+                i += 8;
+                if (i < (dctMode << 3))
+                {
+                    coeff = rcoeff[i];
+                    if (coeff > -QPx2plus && coeff < QPx2plus)  /* quantize to zero */
+                    {
+                        i += 8;
+                        coeff = rcoeff[i];
+                        continue;
+                    }
+                    else
+                        goto NONZERO1;
+                }
+            }
+            else
+            {
+NONZERO1:
+                /* scaling */
+                q_value = AANScale[i];  /* load scale AAN */
+                zz = ZZTab[i];  /* zigzag order */
+
+                coeff = aan_scale(q_value, coeff, round, QPdiv2);
+                q_value = coeff_quant(coeff, q_scale, shift);
+
+                /* dequantization  */
+                if (q_value)
+                {
+
+                    //coeff = PV_MIN(ac_clip,PV_MAX(-ac_clip-1, q_value));
+                    q_value = coeff_clip(q_value, ac_clip);
+                    qcoeff[zz>>1] = q_value;
+
+                    // dequant and clip
+                    //coeff = PV_MIN(2047,PV_MAX(-2048, q_value));
+                    tmp = 2047;
+                    coeff = coeff_dequant(q_value, QPx2, Addition, tmp);
+                    rcoeff[i-64] = coeff;
+
+                    (*bcolptr) |= imask[i>>3];
+                    if ((zz >> 1) > 31) bitmapzz[1] |= (1 << (63 - (zz >> 1)));
+                    else        bitmapzz[0] |= (1 << (31 - (zz >> 1)));
+                }
+                i += 8;
+                coeff = rcoeff[i];
+            }
+        }
+        while (i < (dctMode << 3));
+
+        i += (1 - (dctMode << 3));
+    }
+    while (i < dctMode) ;
+
+    i = dctMode;
+    tmp = 1 << (8 - i);
+    while (i--)
+    {
+        if (bitmapcol[i])(*bitmaprow) |= tmp;
+        tmp <<= 1;
+    }
+
+    if (*bitmaprow)
+        return 1;
+    else
+        return 0;
+}
+
+Int BlockQuantDequantH263Intra(Short *rcoeff, Short *qcoeff, struct QPstruct *QuantParam,
+                               UChar bitmapcol[ ], UChar *bitmaprow, UInt *bitmapzz,
+                               Int dctMode, Int comp, Int dc_scaler, UChar shortHeader)
+{
+    Int i;
+    Int tmp, coeff, q_value;
+    Int QPx2 = QuantParam->QPx2;
+    Int Addition = QuantParam->Addition;
+    Int QPx2plus = QuantParam->QPx2plus;
+    Int round = 1 << 15;
+    Int q_scale = scaleArrayV[QuantParam->QP];
+    Int shift = 15 + (QPx2 >> 4);
+    UChar *bmcolptr = bitmapcol;
+    Int ac_clip;    /* quantized coeff bound */
+
+    OSCL_UNUSED_ARG(bitmapzz);
+    OSCL_UNUSED_ARG(comp);
+
+
+    if (shortHeader) ac_clip = 126; /* clip between [-127,126] (standard allows 127!) */
+    else ac_clip = 2047;  /* clip between [-2048,2047] */
+
+    *((Int*)bitmapcol) = *((Int*)(bitmapcol + 4)) = 0;
+    *bitmaprow = 0;
+
+    QPx2plus = QPx2 << 4;
+    QPx2plus -= 8;
+
+    rcoeff += 64; /* actual data is 64 element ahead */
+    i = 0;
+
+    /* DC value */
+    coeff = *rcoeff;
+    /* scaling */
+    if (coeff == 0x7fff && !shortHeader) /* all zero column */
+    {
+        bmcolptr++;
+        i++;
+    }
+    else
+    {
+        if (coeff == 0x7fff) /* shortHeader on */
+        {
+            coeff = 1; /* can't be zero */
+            qcoeff[0] = coeff;
+            coeff = coeff * dc_scaler;
+            coeff = PV_MAX(-2048, PV_MIN(2047, coeff));
+            rcoeff[-64] = coeff;
+            bitmapcol[0] |= 128;
+            bmcolptr++;
+            //qcoeff++;
+            //rcoeff++;
+            //i=0;
+            i++;
+        }
+        else
+        {
+            q_value = round + (coeff << 12);
+            coeff = q_value >> 16;
+            if (coeff >= 0) coeff += (dc_scaler >> 1) ;
+            else            coeff -= (dc_scaler >> 1) ;
+            q_value = scaleArrayV2[dc_scaler];
+            coeff = coeff * q_value;
+            coeff >>= (15 + (dc_scaler >> 4));
+            coeff += ((UInt)coeff >> 31);
+
+            if (shortHeader)
+                coeff = PV_MAX(1, PV_MIN(254, coeff));
+
+            if (coeff)
+            {
+                qcoeff[0] = coeff;
+                coeff = coeff * dc_scaler;
+                coeff = PV_MAX(-2048, PV_MIN(2047, coeff));
+                rcoeff[-64] = coeff;
+                bitmapcol[0] |= 128;
+            }
+            i += 8;
+        }
+    }
+    /* AC values */
+    do
+    {
+        coeff = rcoeff[i];
+        if (coeff == 0x7fff) /* all zero row */
+        {
+            bmcolptr++;
+            i++;
+            continue;
+        }
+        do
+        {
+            if (coeff >= -QPx2plus && coeff < QPx2plus)  /* quantize to zero */
+            {
+                i += 8;
+                if (i < dctMode << 3)
+                {
+                    coeff = rcoeff[i];
+                    if (coeff > -QPx2plus && coeff < QPx2plus)  /* quantize to zero */
+                    {
+                        i += 8;
+                        coeff = rcoeff[i];
+                        continue;
+                    }
+                    else
+                        goto NONZERO2;
+                }
+            }
+            else
+            {
+NONZERO2:   /* scaling */
+                q_value = AANScale[i]; /*  09/02/05 */
+
+                /* scale aan */
+                q_value = smlabb(q_value, coeff, round);
+                coeff = q_value >> 16;
+                /* quant */
+                q_value = smulbb(q_scale, coeff); /*mov     q_value, coeff, lsl #14 */
+                /*smull tmp, coeff, q_value, q_scale*/
+                q_value >>= shift;
+                q_value += ((UInt)q_value >> 31); /* add 1 if negative */
+
+                if (q_value)
+                {
+                    //coeff = PV_MIN(ac_clip,PV_MAX(-ac_clip-1, q_value));
+                    q_value = coeff_clip(q_value, ac_clip);
+                    qcoeff[i] = q_value;
+
+                    // dequant and clip
+                    //coeff = PV_MIN(2047,PV_MAX(-2048, q_value));
+                    tmp = 2047;
+                    coeff = coeff_dequant(q_value, QPx2, Addition, tmp);
+                    rcoeff[i-64] = coeff;
+
+                    (*bmcolptr) |= imask[i>>3];
+                }
+                i += 8;
+                coeff = rcoeff[i];
+            }
+        }
+        while (i < (dctMode << 3)) ;
+
+        //qcoeff++; /* next column */
+        bmcolptr++;
+        //rcoeff++;
+        i += (1 - (dctMode << 3)); //i = 0;
+    }
+    while (i < dctMode);//while(rcoeff < end) ;
+
+    i = dctMode;
+    tmp = 1 << (8 - i);
+    while (i--)
+    {
+        if (bitmapcol[i])(*bitmaprow) |= tmp;
+        tmp <<= 1;
+    }
+
+    if (((*bitmaprow)&127) || (bitmapcol[0]&127)) /* exclude DC */
+        return 1;
+    else
+        return 0;
+}
+
+
+/***********************************************************************
+ Function: BlckQuantDequantH263DC
+ Date:     5/3/2001
+ Purpose:   H.263 quantization mode, only for DC component
+ 6/25/01,
+          Further optimization (~100K/QCIF), need more testing/comment before integration.
+
+ ********************************************************************/
+Int BlockQuantDequantH263DCInter(Short *rcoeff, Short *qcoeff, struct QPstruct *QuantParam,
+                                 UChar *bitmaprow, UInt *bitmapzz, Int dummy, UChar shortHeader)
+{
+    Int coeff, scale_q;
+    Int CBP = 0;
+    Int QP = QuantParam->QP;
+    Int QPx2plus = QuantParam->QPx2plus;
+    Int Addition = QuantParam->Addition;
+    Int shift = 15 + (QP >> 3);
+    Int ac_clip;    /* quantized coeff bound */
+    Int tmp;
+
+    OSCL_UNUSED_ARG(dummy);
+
+    if (shortHeader) ac_clip = 126; /* clip between [-127,126] (standard allows 127!) */
+    else ac_clip = 2047;  /* clip between [-2048,2047] */
+
+    *bitmaprow = 0;
+    bitmapzz[0] = bitmapzz[1] = 0;
+    coeff = rcoeff[0];
+
+    if (coeff >= -QPx2plus && coeff < QPx2plus)
+    {
+        rcoeff[0] = 0;
+        return CBP;//rcoeff[0] = 0; not needed since CBP will be zero
+    }
+    else
+    {
+        scale_q = scaleArrayV[QP];
+
+        coeff = aan_dc_scale(coeff, QP);
+
+        scale_q = coeff_quant(coeff, scale_q, shift);
+
+        //coeff = PV_MIN(ac_clip,PV_MAX(-ac_clip-1, tmp));
+        scale_q = coeff_clip(scale_q, ac_clip);
+
+        qcoeff[0] = scale_q;
+
+        QP <<= 1;
+        //coeff = PV_MIN(2047,PV_MAX(-2048, tmp));
+        tmp = 2047;
+        coeff = coeff_dequant(scale_q, QP, Addition, tmp);
+
+        rcoeff[0] = coeff;
+
+        (*bitmaprow) = 128;
+        bitmapzz[0] = (ULong)1 << 31;
+        CBP = 1;
+    }
+    return CBP;
+}
+
+
+Int BlockQuantDequantH263DCIntra(Short *rcoeff, Short *qcoeff, struct QPstruct *QuantParam,
+                                 UChar *bitmaprow, UInt *bitmapzz, Int dc_scaler, UChar shortHeader)
+{
+    Int tmp, coeff;
+
+    OSCL_UNUSED_ARG(QuantParam);
+
+    *bitmaprow = 0;
+    coeff = rcoeff[0];
+
+    if (coeff >= 0) coeff += (dc_scaler >> 1) ;
+    else            coeff -= (dc_scaler >> 1) ;
+    tmp = scaleArrayV2[dc_scaler];
+    tmp = coeff * tmp;
+    tmp >>= (15 + (dc_scaler >> 4));
+    tmp += ((UInt)tmp >> 31);
+
+    if (shortHeader)
+        tmp = PV_MAX(1, PV_MIN(254, tmp));
+
+    if (tmp)
+    {
+        qcoeff[0] = tmp;
+        coeff = tmp * dc_scaler;
+        coeff = PV_MAX(-2048, PV_MIN(2047, coeff));
+        rcoeff[0] = coeff;
+        *bitmaprow = 128;
+        bitmapzz[0] = (ULong)1 << 31;
+    }
+
+    return 0;
+}
+
+#ifndef NO_MPEG_QUANT
+/***********************************************************************
+ Function: BlckQuantDequantMPEG
+ Date:     June 15, 1999
+ Purpose:  Combine BlockQuantMPEG and BlockDequantMPEGENC
+ Input:   coeff=> DCT coefficient
+ Output:  qcoeff=> quantized coefficient
+          rcoeff=> reconstructed coefficient
+ Modified:  7/5/01, break up function for Intra/Inter
+          8/3/01,  update with changes from H263 quant mode.
+          8/3/01,  add clipping to the reconstructed coefficient [-2048,2047]
+          8/6/01,  optimize using multiplicative lookup-table.
+                     can be further optimized using ARM assembly, e.g.,
+                     clipping, 16-bit mult., etc !!!!!!!!!!!!!
+ ********************************************************************/
+
+Int BlockQuantDequantMPEGInter(Short *rcoeff, Short *qcoeff, Int QP, Int *qmat,
+                               UChar bitmapcol[ ], UChar *bitmaprow, UInt *bitmapzz,
+                               Int dctMode, Int comp, Int dc_scaler)
+{
+    Int i, zz;
+    Int tmp, coeff, q_value = 0;
+    Int sum = 0;
+    Int stepsize, QPx2 = QP << 1;
+    Int CBP = 0;
+    Int round = 1 << 15;
+    Int q_scale = scaleArrayV[QP];
+    Int shift = 15 + (QP >> 3);
+    UChar *bcolptr = bitmapcol;
+
+    OSCL_UNUSED_ARG(dc_scaler);
+    OSCL_UNUSED_ARG(comp);
+
+
+    *((Int*)bitmapcol) = *((Int*)(bitmapcol + 4)) = 0;
+    bitmapzz[0] = bitmapzz[1] = 0;
+    *bitmaprow = 0;
+
+    rcoeff += 64;
+    i = 0;
+    bcolptr--;
+
+    do
+    {
+        bcolptr++;
+        coeff = rcoeff[i];
+        if (coeff == 0x7fff) /* all zero column */
+        {
+            i++;
+            continue;
+        }
+        do
+        {
+            q_value = AANScale[i];  /*  09/02/05 scaling for AAN*/
+            /* aan scaling */
+            q_value = smlabb(q_value, coeff, round);
+
+            coeff = q_value >> 16;
+
+            stepsize = qmat[i];
+//          if(coeff>0)     coeff = (16*coeff + (stepsize/2)) / stepsize;
+//          else            coeff = (16*coeff - (stepsize/2)) / stepsize;
+            coeff <<= 4;
+            if (coeff >= 0) coeff += (stepsize >> 1) ;
+            else            coeff -= (stepsize >> 1) ;
+            q_value = scaleArrayV2[stepsize];
+            /* mpeg quant table scale */
+            coeff = smulbb(coeff, q_value);
+
+            coeff >>= (15 + (stepsize >> 4));
+            coeff += ((UInt)coeff >> 31);
+
+            /* QP scale */
+            if (coeff >= -QPx2 && coeff < QPx2)  /* quantized to zero*/
+            {
+                i += 8;
+            }
+            else
+            {
+//              q_value = coeff/(QPx2);
+                q_value = coeff_quant(coeff, q_scale, shift);
+
+                if (q_value)                /* dequant */
+                {
+
+                    zz = ZZTab[i];  /* zigzag order */
+
+                    tmp = 2047;
+
+                    q_value = clip_2047(q_value, tmp);
+
+                    qcoeff[zz>>1] = q_value;
+
+                    //q_value=(((coeff*2)+SIGN0(coeff))*stepsize*QP)/16;
+                    /* no need for SIGN0, no zero coming in this {} */
+                    q_value = coeff_dequant_mpeg(q_value, stepsize, QP, tmp);
+
+                    rcoeff[i-64] = q_value;
+
+                    sum += q_value;
+                    (*bcolptr) |= imask[i>>3];
+                    if ((zz >> 1) > 31) bitmapzz[1] |= (1 << (63 - (zz >> 1)));
+                    else        bitmapzz[0] |= (1 << (31 - (zz >> 1)));
+                }
+                i += 8;
+            }
+            coeff = rcoeff[i];
+        }
+        while (i < (dctMode << 3)) ;
+
+        i += (1 - (dctMode << 3));
+    }
+    while (i < dctMode) ;
+
+    i = dctMode;
+    tmp = 1 << (8 - i);
+    while (i--)
+    {
+        if (bitmapcol[i])(*bitmaprow) |= tmp;
+        tmp <<= 1;
+    }
+
+    if (*bitmaprow)
+        CBP = 1;   /* check CBP before mismatch control,  7/5/01 */
+
+    /* Mismatch control,  5/3/01 */
+    if (CBP)
+    {
+        if ((sum&0x1) == 0)
+        {
+            rcoeff--;  /* rcoeff[63] */
+            coeff = *rcoeff;
+            coeff ^= 0x1;
+            *rcoeff = coeff;
+            if (coeff)
+            {
+                bitmapcol[7] |= 1;
+                (*bitmaprow) |= 1;
+            }
+        }
+    }
+
+    return CBP;
+}
+
+Int BlockQuantDequantMPEGIntra(Short *rcoeff, Short *qcoeff, Int QP, Int *qmat,
+                               UChar bitmapcol[ ], UChar *bitmaprow, UInt *bitmapzz,
+                               Int dctMode, Int comp, Int dc_scaler)
+{
+    Int i;
+    Int tmp, coeff, q_value = 0;
+    Int sum = 0;
+    Int stepsize;
+    Int CBP = 0;
+    Int round = 1 << 15;
+    Int q_scale = scaleArrayV[QP];
+    Int shift = 15 + (QP >> 3);
+    Int round2 = (3 * QP + 2) >> 2;
+    Int QPx2plus = (QP << 1) - round2;
+    UChar *bmcolptr = bitmapcol;
+
+    OSCL_UNUSED_ARG(bitmapzz);
+    OSCL_UNUSED_ARG(comp);
+
+    *((Int*)bitmapcol) = *((Int*)(bitmapcol + 4)) = 0;
+    *bitmaprow = 0;
+
+    rcoeff += 64;
+    i = 0;
+
+    /* DC value */
+    coeff = *rcoeff;
+
+    if (coeff == 0x7fff) /* all zero column */
+    {
+        bmcolptr++;
+        i++;
+    }
+    else
+    {
+        q_value = round + (coeff << 12);
+        coeff = q_value >> 16;
+        /*if (coeff >= 0)   coeff = (coeff + (dc_scaler/2)) / dc_scaler;
+        else            coeff = (coeff - (dc_scaler/2)) / dc_scaler;*/
+        if (coeff >= 0) coeff += (dc_scaler >> 1) ;
+        else            coeff -= (dc_scaler >> 1) ;
+        q_value = scaleArrayV2[dc_scaler];
+
+        /* mpeg quant table scale */
+        coeff = smulbb(coeff, q_value);
+
+        coeff >>= (15 + (dc_scaler >> 4));
+        coeff += ((UInt)coeff >> 31);
+
+        if (coeff)
+        {
+            coeff = PV_MAX(1, PV_MIN(254, coeff));
+            qcoeff[0] = coeff;
+
+            coeff = smulbb(coeff, dc_scaler);
+
+            q_value = clip_2047(coeff, 2047);
+
+            sum = q_value;
+
+            rcoeff[-64] = q_value;
+
+            bitmapcol[0] |= 128;
+        }
+        i += 8;
+    }
+    /* AC values */
+    do
+    {
+        coeff = rcoeff[i];
+        if (coeff == 0x7fff) /* all zero row */
+        {
+            bmcolptr++;
+            i++;
+            continue;
+        }
+        do
+        {
+            /* scaling */
+            q_value = AANScale[i]; /*  09/02/05 */
+
+            /* q_value = coeff*q_value + round */
+            q_value = smlabb(coeff, q_value, round);
+            coeff = q_value >> 16;
+
+            stepsize = qmat[i];
+            /*if(coeff>0)       coeff = (16*coeff + (stepsize/2)) / stepsize;
+            else            coeff = (16*coeff - (stepsize/2)) / stepsize;*/
+            coeff <<= 4;
+            if (coeff >= 0) coeff += (stepsize >> 1) ;
+            else            coeff -= (stepsize >> 1) ;
+            q_value = scaleArrayV2[stepsize];
+
+            /* scale mpeg quant */
+            coeff = smulbb(coeff, q_value);
+
+            coeff >>= (15 + (stepsize >> 4));
+            coeff += ((UInt)coeff >> 31);
+
+            if (coeff >= -QPx2plus && coeff < QPx2plus)
+            {
+                i += 8;
+            }
+            else
+            {
+                //q_value = ( coeff + SIGN0(coeff)*((3*QP+2)/4))/(2*QP);
+                if (coeff > 0) coeff += round2;
+                else if (coeff < 0) coeff -= round2;
+
+                q_value = smulbb(coeff, q_scale);
+                q_value >>= shift;
+                q_value += ((UInt)q_value >> 31);
+
+                if (q_value)
+                {
+                    tmp = 2047;
+                    q_value = clip_2047(q_value, tmp);
+
+                    qcoeff[i] = q_value;
+
+                    stepsize = smulbb(stepsize, QP);
+                    q_value =  smulbb(q_value, stepsize);
+
+                    q_value = coeff_dequant_mpeg_intra(q_value, tmp);
+                    //q_value = (coeff*stepsize*QP*2)/16;
+
+                    rcoeff[i-64] = q_value;
+
+                    sum += q_value;
+                    (*bmcolptr) |= imask[i>>3];
+                }
+                i += 8;
+            }
+            coeff = rcoeff[i];
+        }
+        while (i < (dctMode << 3)) ;
+
+        bmcolptr++;
+        i += (1 - (dctMode << 3));
+    }
+    while (i < dctMode) ;
+
+    i = dctMode;
+    tmp = 1 << (8 - i);
+    while (i--)
+    {
+        if (bitmapcol[i])(*bitmaprow) |= tmp;
+        tmp <<= 1;
+    }
+
+    if (((*bitmaprow) &127) || (bitmapcol[0]&127))
+        CBP = 1;  /* check CBP before mismatch control,  7/5/01 */
+
+    /* Mismatch control,  5/3/01 */
+    if (CBP || bitmapcol[0])
+    {
+        if ((sum&0x1) == 0)
+        {
+            rcoeff--;  /* rcoeff[63] */
+            coeff = *rcoeff;
+            coeff ^= 0x1;
+            *rcoeff = coeff;
+            if (coeff)
+            {
+                bitmapcol[7] |= 1;
+                (*bitmaprow) |= 1;
+            }
+        }
+    }
+
+    return CBP;
+}
+
+
+/***********************************************************************
+ Function: BlckQuantDequantMPEGDC
+ Date:     5/3/2001
+ Purpose:  MPEG Quant/Dequant for DC only block.
+ ********************************************************************/
+Int BlockQuantDequantMPEGDCInter(Short *rcoeff, Short *qcoeff, Int QP, Int *qmat,
+                                 UChar bitmapcol[ ], UChar *bitmaprow, UInt *bitmapzz, Int dummy)
+{
+    Int q_value, coeff, stepsize;
+    Int CBP = 0;
+    Int q_scale = scaleArrayV[QP];
+    Int shift = 15 + (QP >> 3);
+    Int QPx2 = QP << 1;
+
+    OSCL_UNUSED_ARG(dummy);
+
+    *((Int*)bitmapcol) = *((Int*)(bitmapcol + 4)) = 0;
+    *bitmaprow = 0;
+    bitmapzz[0] = bitmapzz[1] = 0;
+    coeff = rcoeff[0];
+    stepsize = qmat[0];
+
+    /*if(coeff>0)       coeff = (16*coeff + (stepsize/2)) / stepsize;
+    else            coeff = (16*coeff - (stepsize/2)) / stepsize;*/
+    coeff <<= 4;
+    if (coeff >= 0) coeff += (stepsize >> 1) ;
+    else            coeff -= (stepsize >> 1) ;
+    q_value = scaleArrayV2[stepsize];
+
+    coeff = smulbb(coeff, q_value);
+
+    coeff >>= (15 + (stepsize >> 4));
+    coeff += ((UInt)coeff >> 31);
+
+    if (coeff >= -QPx2 && coeff < QPx2)
+    {
+        rcoeff[0] = 0;
+        return CBP;
+    }
+    else
+    {
+//      q_value = coeff/(QPx2);
+        q_value = coeff_quant(coeff, q_scale, shift);
+
+        if (q_value)
+        {
+
+            //PV_MIN(2047,PV_MAX(-2048, q_value));
+            q_value = clip_2047(q_value, 2047);
+            qcoeff[0] = q_value;
+            q_value = coeff_dequant_mpeg(q_value, stepsize, QP, 2047);
+            //q_value=(((coeff*2)+SIGN0(coeff))*stepsize*QP)/16;
+            rcoeff[0] = q_value;
+
+            bitmapcol[0] = 128;
+            (*bitmaprow) = 128;
+            bitmapzz[0] = (UInt)1 << 31;
+            CBP = 1;
+
+            /* Mismatch control,  5/3/01 */
+            if ((q_value&0x1) == 0)
+            {
+                rcoeff[63] = 1; /* after scaling it remains the same */
+                bitmapcol[7] |= 1;
+                (*bitmaprow) |= 1;
+            }
+        }
+    }
+    return CBP;
+}
+
+
+Int BlockQuantDequantMPEGDCIntra(Short *rcoeff, Short *qcoeff, Int QP, Int *qmat,
+                                 UChar bitmapcol[ ], UChar *bitmaprow, UInt *bitmapzz,
+                                 Int dc_scaler)
+{
+    Int tmp, coeff, q_value;
+
+    OSCL_UNUSED_ARG(QP);
+    OSCL_UNUSED_ARG(qmat);
+
+
+    *((Int*)bitmapcol) = *((Int*)(bitmapcol + 4)) = 0;
+    *bitmaprow = 0;
+    coeff = rcoeff[0];
+
+    /*if (coeff >= 0)   tmp = (coeff + dc_scaler/2) / dc_scaler;
+    else            tmp = (coeff - dc_scaler/2) / dc_scaler;*/
+    if (coeff >= 0) coeff += (dc_scaler >> 1) ;
+    else            coeff -= (dc_scaler >> 1) ;
+    tmp = scaleArrayV2[dc_scaler];
+
+    tmp = smulbb(tmp, coeff);
+    tmp >>= (15 + (dc_scaler >> 4));
+    tmp += ((UInt)tmp >> 31);
+
+    if (tmp)
+    {
+        coeff = PV_MAX(1, PV_MIN(254, tmp));
+        qcoeff[0] = coeff;
+
+        q_value = smulbb(coeff, dc_scaler);
+        q_value = clip_2047(q_value, 2047);
+        rcoeff[0] = q_value;
+        bitmapcol[0] = 128;
+        *bitmaprow = 128;
+        bitmapzz[0] = (UInt)1 << 31;
+
+        /* Mismatch control,  5/3/01 */
+        if ((q_value&0x1) == 0)
+        {
+            rcoeff[63] = 1; /* after scaling it remains the same */
+            bitmapcol[7] |= 1;
+            (*bitmaprow) |= 1;
+        }
+    }
+
+    return 0;
+}
+#endif
+
diff --git a/media/libstagefright/codecs/m4v_h263/enc/src/fastquant_inline.h b/media/libstagefright/codecs/m4v_h263/enc/src/fastquant_inline.h
new file mode 100644
index 0000000..79d0ebf
--- /dev/null
+++ b/media/libstagefright/codecs/m4v_h263/enc/src/fastquant_inline.h
@@ -0,0 +1,625 @@
+/* ------------------------------------------------------------------
+ * Copyright (C) 1998-2009 PacketVideo
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
+ * express or implied.
+ * See the License for the specific language governing permissions
+ * and limitations under the License.
+ * -------------------------------------------------------------------
+ */
+/*********************************************************************************/
+/*  Filename: fastquant_inline.h                                                        */
+/*  Description: Implementation for in-line functions used in dct.cpp           */
+/*  Modified:                                                                   */
+/*********************************************************************************/
+#ifndef _FASTQUANT_INLINE_H_
+#define _FASTQUANT_INLINE_H_
+
+#include "mp4def.h"
+
+#if !defined(PV_ARM_GCC_V5) && !defined(PV_ARM_GCC_V4) /* ARM GNU COMPILER  */
+
+__inline int32 aan_scale(int32 q_value, int32 coeff, int32 round, int32 QPdiv2)
+{
+    q_value = coeff * q_value + round;
+    coeff = q_value >> 16;
+    if (coeff < 0)  coeff += QPdiv2;
+    else            coeff -= QPdiv2;
+
+    return coeff;
+}
+
+
+__inline int32 coeff_quant(int32 coeff, int32 q_scale, int32 shift)
+{
+    int32 q_value;
+
+    q_value = coeff * q_scale;      //q_value = -((-(coeff + QPdiv2)*q_scale)>>LSL);
+    q_value >>= shift;                  //q_value = (((coeff - QPdiv2)*q_scale)>>LSL );
+    q_value += ((UInt)q_value >> 31); /* add one if negative */
+
+    return q_value;
+}
+
+__inline int32  coeff_clip(int32 q_value, int32 ac_clip)
+{
+    int32 coeff = q_value + ac_clip;
+
+    if ((UInt)coeff > (UInt)(ac_clip << 1))
+        q_value = ac_clip ^(q_value >> 31);
+
+    return q_value;
+}
+
+__inline int32 coeff_dequant(int32 q_value, int32 QPx2, int32 Addition, int32 tmp)
+{
+    int32 coeff;
+
+    OSCL_UNUSED_ARG(tmp);
+
+    if (q_value < 0)
+    {
+        coeff = q_value * QPx2 - Addition;
+        if (coeff < -2048)
+            coeff = -2048;
+    }
+    else
+    {
+        coeff = q_value * QPx2 + Addition;
+        if (coeff > 2047)
+            coeff = 2047;
+    }
+    return coeff;
+}
+
+__inline int32 smlabb(int32 q_value, int32 coeff, int32 round)
+{
+    q_value = coeff * q_value + round;
+
+    return q_value;
+}
+
+__inline int32 smulbb(int32 q_scale, int32 coeff)
+{
+    int32 q_value;
+
+    q_value = coeff * q_scale;
+
+    return q_value;
+}
+
+__inline int32 aan_dc_scale(int32 coeff, int32 QP)
+{
+
+    if (coeff < 0)  coeff += (QP >> 1);
+    else            coeff -= (QP >> 1);
+
+    return coeff;
+}
+
+__inline int32 clip_2047(int32 q_value, int32 tmp)
+{
+    OSCL_UNUSED_ARG(tmp);
+
+    if (q_value < -2048)
+    {
+        q_value = -2048;
+    }
+    else if (q_value > 2047)
+    {
+        q_value = 2047;
+    }
+
+    return q_value;
+}
+
+__inline int32 coeff_dequant_mpeg(int32 q_value, int32 stepsize, int32 QP, int32 tmp)
+{
+    int32 coeff;
+
+    OSCL_UNUSED_ARG(tmp);
+
+    coeff = q_value << 1;
+    stepsize *= QP;
+    if (coeff > 0)
+    {
+        q_value = (coeff + 1) * stepsize;
+        q_value >>= 4;
+        if (q_value > 2047) q_value = 2047;
+    }
+    else
+    {
+        q_value = (coeff - 1) * stepsize;
+        q_value += 15;
+        q_value >>= 4;
+        if (q_value < -2048)    q_value = -2048;
+    }
+
+    return q_value;
+}
+
+__inline int32 coeff_dequant_mpeg_intra(int32 q_value, int32 tmp)
+{
+    OSCL_UNUSED_ARG(tmp);
+
+    q_value <<= 1;
+    if (q_value > 0)
+    {
+        q_value >>= 4;
+        if (q_value > 2047) q_value = 2047;
+    }
+    else
+    {
+        q_value += 15;
+        q_value >>= 4;
+        if (q_value < -2048) q_value = -2048;
+    }
+
+    return q_value;
+}
+
+#elif defined(__CC_ARM)  /* only work with arm v5 */
+
+#if defined(__TARGET_ARCH_5TE)
+
+__inline int32 aan_scale(int32 q_value, int32 coeff,
+                         int32 round, int32 QPdiv2)
+{
+    __asm
+    {
+        smlabb q_value, coeff, q_value, round
+        movs       coeff, q_value, asr #16
+        addle   coeff, coeff, QPdiv2
+        subgt   coeff, coeff, QPdiv2
+    }
+
+    return coeff;
+}
+
+__inline int32 coeff_quant(int32 coeff, int32 q_scale, int32 shift)
+{
+    int32 q_value;
+
+    __asm
+    {
+        smulbb  q_value, q_scale, coeff    /*mov    coeff, coeff, lsl #14*/
+        mov     coeff, q_value, asr shift   /*smull tmp, coeff, q_scale, coeff*/
+        add q_value, coeff, coeff, lsr #31
+    }
+
+
+    return q_value;
+}
+
+__inline int32 coeff_dequant(int32 q_value, int32 QPx2, int32 Addition, int32 tmp)
+{
+    int32 coeff;
+
+    __asm
+    {
+        cmp     q_value, #0
+        smulbb  coeff, q_value, QPx2
+        sublt   coeff, coeff, Addition
+        addge   coeff, coeff, Addition
+        add     q_value, coeff, tmp
+        subs    q_value, q_value, #3840
+        subcss  q_value, q_value, #254
+        eorhi   coeff, tmp, coeff, asr #31
+    }
+
+    return coeff;
+}
+
+__inline int32 smlabb(int32 q_value, int32 coeff, int32 round)
+{
+    __asm
+    {
+        smlabb q_value, coeff, q_value, round
+    }
+
+    return q_value;
+}
+
+__inline int32 smulbb(int32 q_scale, int32 coeff)
+{
+    int32 q_value;
+
+    __asm
+    {
+        smulbb  q_value, q_scale, coeff
+    }
+
+    return q_value;
+}
+
+__inline int32 coeff_dequant_mpeg(int32 q_value, int32 stepsize, int32 QP, int32 tmp)
+{
+    /* tmp must have value of 2047 */
+    int32 coeff;
+    __asm
+    {
+        movs    coeff, q_value, lsl #1
+        smulbb  stepsize, stepsize, QP
+        addgt   coeff, coeff, #1
+        sublt   coeff, coeff, #1
+        smulbb  q_value, coeff, stepsize
+        addlt   q_value, q_value, #15
+        mov     q_value, q_value, asr #4
+        add     coeff, q_value, tmp
+        subs    coeff, coeff, #0xf00
+        subcss  coeff, coeff, #0xfe
+        eorhi   q_value, tmp, q_value, asr #31
+    }
+
+    return q_value;
+}
+
+
+#else // not ARMV5TE
+
+__inline int32 aan_scale(int32 q_value, int32 coeff,
+                         int32 round, int32 QPdiv2)
+{
+    __asm
+    {
+        mla q_value, coeff, q_value, round
+        movs       coeff, q_value, asr #16
+        addle   coeff, coeff, QPdiv2
+        subgt   coeff, coeff, QPdiv2
+    }
+
+    return coeff;
+}
+
+__inline int32 coeff_quant(int32 coeff, int32 q_scale, int32 shift)
+{
+    int32 q_value;
+
+    __asm
+    {
+        mul q_value, q_scale, coeff    /*mov    coeff, coeff, lsl #14*/
+        mov     coeff, q_value, asr shift   /*smull tmp, coeff, q_scale, coeff*/
+        add q_value, coeff, coeff, lsr #31
+    }
+
+
+    return q_value;
+}
+
+
+__inline int32 coeff_dequant(int32 q_value, int32 QPx2, int32 Addition, int32 tmp)
+{
+    int32 coeff;
+
+    __asm
+    {
+        cmp     q_value, #0
+        mul coeff, q_value, QPx2
+        sublt   coeff, coeff, Addition
+        addge   coeff, coeff, Addition
+        add     q_value, coeff, tmp
+        subs    q_value, q_value, #3840
+        subcss  q_value, q_value, #254
+        eorhi   coeff, tmp, coeff, asr #31
+    }
+
+    return coeff;
+}
+
+__inline int32 smlabb(int32 q_value, int32 coeff, int32 round)
+{
+    __asm
+    {
+        mla q_value, coeff, q_value, round
+    }
+
+    return q_value;
+}
+
+__inline int32 smulbb(int32 q_scale, int32 coeff)
+{
+    int32 q_value;
+
+    __asm
+    {
+        mul q_value, q_scale, coeff
+    }
+
+    return q_value;
+}
+
+
+__inline int32 coeff_dequant_mpeg(int32 q_value, int32 stepsize, int32 QP, int32 tmp)
+{
+    /* tmp must have value of 2047 */
+    int32 coeff;
+    __asm
+    {
+        movs    coeff, q_value, lsl #1
+        mul  stepsize, stepsize, QP
+        addgt   coeff, coeff, #1
+        sublt   coeff, coeff, #1
+        mul q_value, coeff, stepsize
+        addlt   q_value, q_value, #15
+        mov     q_value, q_value, asr #4
+        add     coeff, q_value, tmp
+        subs    coeff, coeff, #0xf00
+        subcss  coeff, coeff, #0xfe
+        eorhi   q_value, tmp, q_value, asr #31
+    }
+
+    return q_value;
+}
+
+
+#endif
+
+__inline int32  coeff_clip(int32 q_value, int32 ac_clip)
+{
+    int32 coeff;
+
+    __asm
+    {
+        add     coeff, q_value, ac_clip
+        subs    coeff, coeff, ac_clip, lsl #1
+        eorhi   q_value, ac_clip, q_value, asr #31
+    }
+
+    return q_value;
+}
+
+__inline int32 aan_dc_scale(int32 coeff, int32 QP)
+{
+
+    __asm
+    {
+        cmp   coeff, #0
+        addle   coeff, coeff, QP, asr #1
+        subgt   coeff, coeff, QP, asr #1
+    }
+
+    return coeff;
+}
+
+__inline int32 clip_2047(int32 q_value, int32 tmp)
+{
+    /* tmp must have value of 2047 */
+    int32 coeff;
+
+    __asm
+    {
+        add     coeff, q_value, tmp
+        subs    coeff, coeff, #0xf00
+        subcss  coeff, coeff, #0xfe
+        eorhi   q_value, tmp, q_value, asr #31
+    }
+
+    return q_value;
+}
+
+__inline int32 coeff_dequant_mpeg_intra(int32 q_value, int32 tmp)
+{
+    int32 coeff;
+
+    __asm
+    {
+        movs    q_value, q_value, lsl #1
+        addlt   q_value, q_value, #15
+        mov     q_value, q_value, asr #4
+        add     coeff, q_value, tmp
+        subs    coeff, coeff, #0xf00
+        subcss  coeff, coeff, #0xfe
+        eorhi   q_value, tmp, q_value, asr #31
+    }
+
+    return q_value;
+}
+
+#elif ( defined(PV_ARM_GCC_V4) || defined(PV_ARM_GCC_V5) ) /* ARM GNU COMPILER  */
+
+__inline int32 aan_scale(int32 q_value, int32 coeff,
+                         int32 round, int32 QPdiv2)
+{
+    register int32 out;
+    register int32 qv = q_value;
+    register int32 cf = coeff;
+    register int32 rr = round;
+    register int32 qp = QPdiv2;
+
+    asm volatile("smlabb %0, %2, %1, %3\n\t"
+                 "movs %0, %0, asr #16\n\t"
+                 "addle %0, %0, %4\n\t"
+                 "subgt %0, %0, %4"
+             : "=&r"(out)
+                         : "r"(qv),
+                         "r"(cf),
+                         "r"(rr),
+                         "r"(qp));
+    return out;
+}
+
+__inline int32 coeff_quant(int32 coeff, int32 q_scale, int32 shift)
+{
+    register int32 out;
+    register int32 temp1;
+    register int32 cc = coeff;
+    register int32 qs = q_scale;
+    register int32 ss = shift;
+
+    asm volatile("smulbb %0, %3, %2\n\t"
+                 "mov %1, %0, asr %4\n\t"
+                 "add %0, %1, %1, lsr #31"
+             : "=&r"(out),
+                 "=&r"(temp1)
+                         : "r"(cc),
+                         "r"(qs),
+                         "r"(ss));
+
+    return out;
+}
+
+__inline int32 coeff_clip(int32 q_value, int32 ac_clip)
+{
+    register int32 coeff;
+
+    asm volatile("add   %1, %0, %2\n\t"
+                 "subs  %1, %1, %2, lsl #1\n\t"
+                 "eorhi %0, %2, %0, asr #31"
+             : "+r"(q_value),
+                 "=&r"(coeff)
+                         : "r"(ac_clip));
+
+    return q_value;
+}
+
+__inline int32 coeff_dequant(int32 q_value, int32 QPx2, int32 Addition, int32 tmp)
+{
+    register int32 out;
+    register int32 temp1;
+    register int32 qv = q_value;
+    register int32 qp = QPx2;
+    register int32 aa = Addition;
+    register int32 tt = tmp;
+
+    asm volatile("cmp    %2, #0\n\t"
+                 "mul    %0, %2, %3\n\t"
+                 "sublt  %0, %0, %4\n\t"
+                 "addge  %0, %0, %4\n\t"
+                 "add    %1, %0, %5\n\t"
+                 "subs   %1, %1, #3840\n\t"
+                 "subcss %1, %1, #254\n\t"
+                 "eorhi  %0, %5, %0, asr #31"
+             : "=&r"(out),
+                 "=&r"(temp1)
+                         : "r"(qv),
+                         "r"(qp),
+                         "r"(aa),
+                         "r"(tt));
+
+    return out;
+}
+
+__inline int32 smlabb(int32 q_value, int32 coeff, int32 round)
+{
+    register int32 out;
+    register int32 aa = (int32)q_value;
+    register int32 bb = (int32)coeff;
+    register int32 cc = (int32)round;
+
+    asm volatile("smlabb %0, %1, %2, %3"
+             : "=&r"(out)
+                         : "r"(aa),
+                         "r"(bb),
+                         "r"(cc));
+    return out;
+}
+
+__inline int32 smulbb(int32 q_scale, int32 coeff)
+{
+    register int32 out;
+    register int32 aa = (int32)q_scale;
+    register int32 bb = (int32)coeff;
+
+    asm volatile("smulbb %0, %1, %2"
+             : "=&r"(out)
+                         : "r"(aa),
+                         "r"(bb));
+    return out;
+}
+
+__inline int32 aan_dc_scale(int32 coeff, int32 QP)
+{
+    register int32 out;
+    register int32 cc = coeff;
+    register int32 qp = QP;
+
+    asm volatile("cmp %1, #0\n\t"
+                 "addle %0, %1, %2, asr #1\n\t"
+                 "subgt %0, %1, %2, asr #1"
+             : "=&r"(out)
+                         : "r"(cc),
+                         "r"(qp));
+    return out;
+}
+
+__inline int32 clip_2047(int32 q_value, int32 tmp)
+{
+    register int32 coeff;
+    asm volatile("add    %1, %0, %2\n\t"
+                 "subs   %1, %1, #0xF00\n\t"
+                 "subcss %1, %1, #0xFE\n\t"
+                 "eorhi  %0, %2, %0, asr #31"
+             : "+r"(q_value),
+                 "=&r"(coeff)
+                         : "r"(tmp));
+
+    return q_value;
+}
+
+__inline int32 coeff_dequant_mpeg(int32 q_value, int32 stepsize, int32 QP, int32 tmp)
+{
+    register int32 out;
+    register int32 temp1;
+    register int32 qv = q_value;
+    register int32 ss = stepsize;
+    register int32 qp = QP;
+    register int32 tt = tmp;
+
+    asm volatile("movs    %1, %2, lsl #1\n\t"
+                 "mul     %0, %3, %4\n\t"
+                 "addgt   %1, %1, #1\n\t"
+                 "sublt   %1, %1, #1\n\t"
+                 "mul     %0, %1, %0\n\t"
+                 "addlt   %0, %0, #15\n\t"
+                 "mov     %0, %0, asr #4\n\t"
+                 "add     %1, %0, %5\n\t"
+                 "subs    %1, %1, #0xF00\n\t"
+                 "subcss  %1, %1, #0xFE\n\t"
+                 "eorhi   %0, %5, %0, asr #31"
+             : "=&r"(out),
+                 "=&r"(temp1)
+                         : "r"(qv),
+                         "r"(ss),
+                         "r"(qp),
+                         "r"(tt));
+
+    return out;
+
+}
+
+__inline int32 coeff_dequant_mpeg_intra(int32 q_value, int32 tmp)
+{
+    register int32 out;
+    register int32 temp1;
+    register int32 qv = q_value;
+    register int32 tt = tmp;
+
+    asm volatile("movs    %1, %2, lsl #1\n\t"
+                 "addlt   %1, %1, #15\n\t"
+                 "mov     %0, %1, asr #4\n\t"
+                 "add     %1, %0, %3\n\t"
+                 "subs    %1, %1, #0xF00\n\t"
+                 "subcss  %1, %1, #0xFE\n\t"
+                 "eorhi   %0, %3, %0, asr #31"
+             : "=&r"(out),
+                 "=&r"(temp1)
+                         : "r"(qv),
+                         "r"(tt));
+    return out;
+}
+
+
+#endif // Platform
+
+
+#endif //_FASTQUANT_INLINE_H_
+
+
diff --git a/media/libstagefright/codecs/m4v_h263/enc/src/findhalfpel.cpp b/media/libstagefright/codecs/m4v_h263/enc/src/findhalfpel.cpp
new file mode 100644
index 0000000..319c76f
--- /dev/null
+++ b/media/libstagefright/codecs/m4v_h263/enc/src/findhalfpel.cpp
@@ -0,0 +1,287 @@
+/* ------------------------------------------------------------------
+ * Copyright (C) 1998-2009 PacketVideo
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
+ * express or implied.
+ * See the License for the specific language governing permissions
+ * and limitations under the License.
+ * -------------------------------------------------------------------
+ */
+#include "mp4def.h"
+#include "mp4enc_lib.h"
+#include "mp4lib_int.h"
+#include "m4venc_oscl.h"
+
+/* 3/29/01 fast half-pel search based on neighboring guess */
+/* value ranging from 0 to 4, high complexity (more accurate) to
+   low complexity (less accurate) */
+#define HP_DISTANCE_TH      2  /* half-pel distance threshold */
+
+#define PREF_16_VEC 129     /* 1MV bias versus 4MVs*/
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+    void GenerateSearchRegion(UChar *searchPadding, UChar *ref, Int width, Int height,
+    Int ilow, Int ihigh, Int jlow, Int jhigh);
+
+    void InterpDiag(UChar *prev, Int lx, UChar *pred_block);
+    void InterpHorz(UChar *prev, Int lx, UChar *pred_block);
+    void InterpVert(UChar *prev, Int lx, UChar *pred_block);
+#ifdef __cplusplus
+}
+#endif
+
+
+const static Int distance_tab[9][9] =   /* [hp_guess][k] */
+{
+    {0, 1, 1, 1, 1, 1, 1, 1, 1},
+    {1, 0, 1, 2, 3, 4, 3, 2, 1},
+    {1, 0, 0, 0, 1, 2, 3, 2, 1},
+    {1, 2, 1, 0, 1, 2, 3, 4, 3},
+    {1, 2, 1, 0, 0, 0, 1, 2, 3},
+    {1, 4, 3, 2, 1, 0, 1, 2, 3},
+    {1, 2, 3, 2, 1, 0, 0, 0, 1},
+    {1, 2, 3, 4, 3, 2, 1, 0, 1},
+    {1, 0, 1, 2, 3, 2, 1, 0, 0}
+};
+
+
+/*=====================================================================
+    Function:   FindHalfPelMB
+    Date:       10/7/2000
+    Purpose:    Find half pel resolution MV surrounding the full-pel MV
+=====================================================================*/
+
+void FindHalfPelMB(VideoEncData *video, UChar *cur, MOT *mot, UChar *ncand,
+                   Int xpos, Int ypos, Int *xhmin, Int *yhmin, Int hp_guess)
+{
+//  hp_mem = ULong *vertArray; /* 20x17 */
+//           ULong *horzArray; /* 20x16 */
+//           ULong *diagArray; /* 20x17 */
+    Int dmin, d;
+
+    Int xh, yh;
+    Int k, kmin = 0;
+    Int imin, jmin, ilow, jlow;
+    Int h263_mode = video->encParams->H263_Enabled; /*  3/29/01 */
+    Int in_range[9] = {0, 1, 1, 1, 1, 1, 1, 1, 1}; /*  3/29/01 */
+    Int range = video->encParams->SearchRange;
+    Int lx = video->currVop->pitch;
+    Int width = video->currVop->width; /*  padding */
+    Int height = video->vol[video->currLayer]->height;
+    Int(**SAD_MB_HalfPel)(UChar*, UChar*, Int, void*) =
+        video->functionPointer->SAD_MB_HalfPel;
+    void *extra_info = video->sad_extra_info;
+
+    Int next_hp_pos[9][2] = {{0, 0}, {2, 0}, {1, 1}, {0, 2}, { -1, 1}, { -2, 0}, { -1, -1}, {0, -2}, {0, -1}};
+    Int next_ncand[9] = {0, 1 , lx, lx, 0, -1, -1, -lx, -lx};
+
+    cur = video->currYMB;
+
+    /**************** check range ***************************/
+    /*  3/29/01 */
+    imin = xpos + (mot[0].x >> 1);
+    jmin = ypos + (mot[0].y >> 1);
+    ilow = xpos - range;
+    jlow = ypos - range;
+
+    if (!h263_mode)
+    {
+        if (imin <= -15 || imin == ilow)
+            in_range[1] = in_range[7] = in_range[8] = 0;
+        else if (imin >= width - 1)
+            in_range[3] = in_range[4] = in_range[5] = 0;
+        if (jmin <= -15 || jmin == jlow)
+            in_range[1] = in_range[2] = in_range[3] = 0;
+        else if (jmin >= height - 1)
+            in_range[5] = in_range[6] = in_range[7] = 0;
+    }
+    else
+    {
+        if (imin <= 0 || imin == ilow)
+            in_range[1] = in_range[7] = in_range[8] = 0;
+        else if (imin >= width - 16)
+            in_range[3] = in_range[4] = in_range[5] = 0;
+        if (jmin <= 0 || jmin == jlow)
+            in_range[1] = in_range[2] = in_range[3] = 0;
+        else if (jmin >= height - 16)
+            in_range[5] = in_range[6] = in_range[7] = 0;
+    }
+
+    xhmin[0] = 0;
+    yhmin[0] = 0;
+    dmin = mot[0].sad;
+
+    xh = 0;
+    yh = -1;
+    ncand -= lx; /* initial position */
+
+    for (k = 2; k <= 8; k += 2)
+    {
+        if (distance_tab[hp_guess][k] < HP_DISTANCE_TH)
+        {
+            if (in_range[k])
+            {
+                d = (*(SAD_MB_HalfPel[((yh&1)<<1)+(xh&1)]))(ncand, cur, (dmin << 16) | lx, extra_info);
+
+                if (d < dmin)
+                {
+                    dmin = d;
+                    xhmin[0] = xh;
+                    yhmin[0] = yh;
+                    kmin = k;
+                }
+                else if (d == dmin &&
+                         PV_ABS(mot[0].x + xh) + PV_ABS(mot[0].y + yh) < PV_ABS(mot[0].x + xhmin[0]) + PV_ABS(mot[0].y + yhmin[0]))
+                {
+                    xhmin[0] = xh;
+                    yhmin[0] = yh;
+                    kmin = k;
+                }
+
+            }
+        }
+        xh += next_hp_pos[k][0];
+        yh += next_hp_pos[k][1];
+        ncand += next_ncand[k];
+
+        if (k == 8)
+        {
+            if (xhmin[0] != 0 || yhmin[0] != 0)
+            {
+                k = -1;
+                hp_guess = kmin;
+            }
+        }
+    }
+
+    mot[0].sad = dmin;
+    mot[0].x += xhmin[0];
+    mot[0].y += yhmin[0];
+
+    return ;
+}
+
+#ifndef NO_INTER4V
+/*=====================================================================
+    Function:   FindHalfPelBlk
+    Date:       10/7/2000
+    Purpose:    Find half pel resolution MV surrounding the full-pel MV
+                And decide between 1MV or 4MV mode
+=====================================================================*/
+///// THIS FUNCTION IS NOT WORKING!!! NEED TO BE RIVISITED
+
+Int FindHalfPelBlk(VideoEncData *video, UChar *cur, MOT *mot, Int sad16, UChar *ncand8[],
+                   UChar *mode, Int xpos, Int ypos, Int *xhmin, Int *yhmin, UChar *hp_mem)
+{
+    Int k, comp;
+    Int xh, yh;//, xhmin, yhmin;
+    Int imin, jmin, ilow, jlow;
+    Int height;
+    UChar *cand, *cur8;
+    UChar *hmem;//[17*17]; /* half-pel memory */
+    Int d, dmin, sad8;
+    Int lx = video->currVop->pitch;
+    Int width = video->currVop->width; /* , padding */
+    Int(*SAD_Blk_HalfPel)(UChar*, UChar*, Int, Int, Int, Int, Int, void*) = video->functionPointer->SAD_Blk_HalfPel;
+    void *extra_info = video->sad_extra_info;
+    Int in_range[8]; /*  3/29/01 */
+    Int range = video->encParams->SearchRange;
+    Int swidth;
+    Int next_hp_pos[8][2] = {{1, 0}, {1, 0}, {0, 1}, {0, 1}, { -1, 0}, { -1, 0}, {0, -1}, {0, -1}};
+
+    height = video->vol[video->currLayer]->height;
+
+    hmem = hp_mem;
+    sad8 = 0;
+    for (comp = 0; comp < 4; comp++)
+    {
+#ifdef _SAD_STAT
+        num_HP_Blk++;
+#endif
+        /**************** check range ***************************/
+        /*  3/29/01 */
+        M4VENC_MEMSET(in_range, 1, sizeof(Int) << 3);
+        imin = xpos + ((comp & 1) << 3) + (mot[comp+1].x >> 1);
+        jmin = ypos + ((comp & 2) << 2) + (mot[comp+1].y >> 1);
+        ilow = xpos + ((comp & 1) << 3) - range;
+        jlow = ypos + ((comp & 2) << 2) - range;
+
+        if (imin <= -15 || imin == ilow)
+            in_range[0] = in_range[6] = in_range[7] = 0;
+        else if (imin >= width - 1)
+            in_range[2] = in_range[3] = in_range[4] = 0;
+
+        if (jmin <= -15 || jmin == jlow)
+            in_range[0] = in_range[1] = in_range[2] = 0;
+        else if (jmin >= height - 1)
+            in_range[4] = in_range[5] = in_range[6] = 0;
+
+        /**************** half-pel search ***********************/
+        cur8 = cur + ((comp & 1) << 3) + ((comp & 2) << 2) * width ;
+
+        /* generate half-pel search region */
+        {
+            cand = ncand8[comp+1];
+            swidth = lx;
+        }
+
+        xhmin[comp+1] = 0;
+        yhmin[comp+1] = 0;
+        dmin = mot[comp+1].sad;
+
+        xh = -1;
+        yh = -1;
+        for (k = 0; k < 8; k++)
+        {
+            if (in_range[k])
+            {
+                d = (*SAD_Blk_HalfPel)(cand, cur8, dmin, lx, swidth, xh, yh, extra_info);
+
+                if (d < dmin)
+                {
+                    dmin = d;
+                    xhmin[comp+1] = xh;
+                    yhmin[comp+1] = yh;
+                }
+            }
+            xh += next_hp_pos[k][0];
+            yh += next_hp_pos[k][1];
+        }
+        /********************************************/
+        mot[comp+1].x += xhmin[comp+1];
+        mot[comp+1].y += yhmin[comp+1];
+        mot[comp+1].sad = dmin;
+        sad8 += dmin;
+
+        if (sad8 >= sad16 - PREF_16_VEC)
+        {
+            *mode = MODE_INTER;
+            for (k = 1; k <= 4; k++)
+            {
+                mot[k].sad = (mot[0].sad + 2) >> 2;
+                mot[k].x = mot[0].x;
+                mot[k].y = mot[0].y;
+            }
+            return sad8;
+        }
+
+        hmem += (10 * 10);
+    }
+
+    *mode = MODE_INTER4V;
+
+    return sad8;
+}
+#endif /* NO_INTER4V */
+
diff --git a/media/libstagefright/codecs/m4v_h263/enc/src/m4venc_oscl.h b/media/libstagefright/codecs/m4v_h263/enc/src/m4venc_oscl.h
new file mode 100644
index 0000000..c9e18d5
--- /dev/null
+++ b/media/libstagefright/codecs/m4v_h263/enc/src/m4venc_oscl.h
@@ -0,0 +1,43 @@
+/* ------------------------------------------------------------------
+ * Copyright (C) 1998-2009 PacketVideo
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
+ * express or implied.
+ * See the License for the specific language governing permissions
+ * and limitations under the License.
+ * -------------------------------------------------------------------
+ */
+/*********************************************************************************/
+/* Revision History                                                             */
+/* Date: 11/04/05                                                               */
+/* Description: Created for abstracting out OSCL such that the code can be used */
+/*          by both V3 and V4 OSCL library. This file is for V4.                */
+/*********************************************************************************/
+
+#ifndef _M4VENC_OSCL_H_
+#define _M4VENC_OSCL_H_
+
+#include <stdlib.h>
+#include <math.h>
+
+#define M4VENC_MALLOC(size)             malloc(size)
+#define M4VENC_FREE(ptr)                free(ptr)
+
+#define M4VENC_MEMSET(ptr,val,size)     memset(ptr,val,size)
+#define M4VENC_MEMCPY(dst,src,size)     memcpy(dst,src,size)
+
+#define M4VENC_LOG(x)                   log(x)
+#define M4VENC_SQRT(x)                  sqrt(x)
+#define M4VENC_POW(x,y)                 pow(x,y)
+
+#define M4VENC_HAS_SYMBIAN_SUPPORT  OSCL_HAS_SYMBIAN_SUPPORT
+
+#endif //_M4VENC_OSCL_H_
diff --git a/media/libstagefright/codecs/m4v_h263/enc/src/me_utils.cpp b/media/libstagefright/codecs/m4v_h263/enc/src/me_utils.cpp
new file mode 100644
index 0000000..6dab31a
--- /dev/null
+++ b/media/libstagefright/codecs/m4v_h263/enc/src/me_utils.cpp
@@ -0,0 +1,386 @@
+/* ------------------------------------------------------------------
+ * Copyright (C) 1998-2009 PacketVideo
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
+ * express or implied.
+ * See the License for the specific language governing permissions
+ * and limitations under the License.
+ * -------------------------------------------------------------------
+ */
+#include "mp4def.h"
+#include "mp4enc_lib.h"
+#include "mp4lib_int.h"
+#include "m4venc_oscl.h"
+
+#define VOP_OFFSET  ((lx<<4)+16)  /* for offset to image area */
+#define CVOP_OFFSET ((lx<<2)+8)
+
+#define PREF_INTRA  512     /* bias for INTRA coding */
+
+/*===============================================================
+    Function:   ChooseMode
+    Date:       09/21/2000
+    Purpose:    Choosing between INTRA or INTER
+    Input/Output: Pointer to the starting point of the macroblock.
+    Note:
+===============================================================*/
+void ChooseMode_C(UChar *Mode, UChar *cur, Int lx, Int min_SAD)
+{
+    Int i, j;
+    Int MB_mean, A, tmp, Th;
+    Int offset = (lx >> 2) - 4;
+    UChar *p = cur;
+    Int *pint = (Int *) cur, temp = 0;
+    MB_mean = 0;
+    A = 0;
+    Th = (min_SAD - PREF_INTRA) >> 1;
+
+    for (j = 0; j < 8; j++)
+    {
+
+        /* Odd Rows */
+        temp += (*pint++) & 0x00FF00FF;
+        temp += (*pint++) & 0x00FF00FF;
+        temp += (*pint++) & 0x00FF00FF;
+        temp += (*pint++) & 0x00FF00FF;
+        pint += offset;
+
+        /* Even Rows */
+        temp += (*pint++ >> 8) & 0x00FF00FF;
+        temp += (*pint++ >> 8) & 0x00FF00FF;
+        temp += (*pint++ >> 8) & 0x00FF00FF;
+        temp += (*pint++ >> 8) & 0x00FF00FF;
+        pint += offset;
+
+    }
+
+    MB_mean = (((temp & 0x0000FFFF)) + ((temp & 0xFFFF0000) >> 16)) >> 7;
+
+    p = cur;
+    offset = lx - 16;
+    for (j = 0; j < 16; j++)
+    {
+        temp = (j & 1);
+        p += temp;
+        i = 8;
+        while (i--)
+        {
+            tmp = *p - MB_mean;
+            p += 2;
+            if (tmp > 0) A += tmp;
+            else    A -= tmp;
+        }
+
+        if (A >= Th)
+        {
+            *Mode = MODE_INTER;
+            return ;
+        }
+        p += (offset - temp);
+    }
+
+    if (A < Th)
+        *Mode = MODE_INTRA;
+    else
+        *Mode = MODE_INTER;
+
+    return ;
+}
+
+
+/*===============================================================
+    Function:   GetHalfPelMBRegion
+    Date:       09/17/2000
+    Purpose:    Interpolate the search region for half-pel search
+    Input/Output:   Center of the search, Half-pel memory, width
+    Note:       rounding type should be parameterized.
+                Now fixed it to zero!!!!!!
+
+===============================================================*/
+
+
+void GetHalfPelMBRegion_C(UChar *cand, UChar *hmem, Int lx)
+{
+    Int i, j;
+    UChar *p1, *p2, *p3, *p4;
+    UChar *hmem1 = hmem;
+    UChar *hmem2 = hmem1 + 33;
+    Int offset = lx - 17;
+
+    p1 = cand - lx - 1;
+    p2 = cand - lx;
+    p3 = cand - 1;
+    p4 = cand;
+
+    for (j = 0; j < 16; j++)
+    {
+        for (i = 0; i < 16; i++)
+        {
+            *hmem1++ = ((*p1++) + *p2 + *p3 + *p4 + 2) >> 2;
+            *hmem1++ = ((*p2++) + *p4 + 1) >> 1;
+            *hmem2++ = ((*p3++) + *p4 + 1) >> 1;
+            *hmem2++ = *p4++;
+        }
+        /*  last pixel */
+        *hmem1++ = ((*p1++) + (*p2++) + *p3 + *p4 + 2) >> 2;
+        *hmem2++ = ((*p3++) + (*p4++) + 1) >> 1;
+        hmem1 += 33;
+        hmem2 += 33;
+        p1 += offset;
+        p2 += offset;
+        p3 += offset;
+        p4 += offset;
+    }
+    /* last row */
+    for (i = 0; i < 16; i++)
+    {
+        *hmem1++ = ((*p1++) + *p2 + (*p3++) + *p4 + 2) >> 2;
+        *hmem1++ = ((*p2++) + (*p4++) + 1) >> 1;
+
+    }
+    *hmem1 = (*p1 + *p2 + *p3 + *p4 + 2) >> 2;
+
+    return ;
+}
+
+/*===============================================================
+   Function:    GetHalfPelBlkRegion
+   Date:        09/20/2000
+   Purpose: Interpolate the search region for half-pel search
+            in 4MV mode.
+   Input/Output:    Center of the search, Half-pel memory, width
+   Note:        rounding type should be parameterized.
+            Now fixed it to zero!!!!!!
+
+===============================================================*/
+
+
+void GetHalfPelBlkRegion(UChar *cand, UChar *hmem, Int lx)
+{
+    Int i, j;
+    UChar *p1, *p2, *p3, *p4;
+    UChar *hmem1 = hmem;
+    UChar *hmem2 = hmem1 + 17;
+    Int offset = lx - 9;
+
+    p1 = cand - lx - 1;
+    p2 = cand - lx;
+    p3 = cand - 1;
+    p4 = cand;
+
+    for (j = 0; j < 8; j++)
+    {
+        for (i = 0; i < 8; i++)
+        {
+            *hmem1++ = ((*p1++) + *p2 + *p3 + *p4 + 2) >> 2;
+            *hmem1++ = ((*p2++) + *p4 + 1) >> 1;
+            *hmem2++ = ((*p3++) + *p4 + 1) >> 1;
+            *hmem2++ = *p4++;
+        }
+        /*  last pixel */
+        *hmem1++ = ((*p1++) + (*p2++) + *p3 + *p4 + 2) >> 2;
+        *hmem2++ = ((*p3++) + (*p4++) + 1) >> 1;
+        hmem1 += 17;
+        hmem2 += 17;
+        p1 += offset;
+        p2 += offset;
+        p3 += offset;
+        p4 += offset;
+    }
+    /* last row */
+    for (i = 0; i < 8; i++)
+    {
+        *hmem1++ = ((*p1++) + *p2 + (*p3++) + *p4 + 2) >> 2;
+        *hmem1++ = ((*p2++) + (*p4++) + 1) >> 1;
+
+    }
+    *hmem1 = (*p1 + *p2 + *p3 + *p4 + 2) >> 2;
+
+    return ;
+}
+
+
+/*=====================================================================
+    Function:   PaddingEdge
+    Date:       09/16/2000
+    Purpose:    Pad edge of a Vop
+    Modification: 09/20/05.
+=====================================================================*/
+
+void  PaddingEdge(Vop *refVop)
+{
+    UChar *src, *dst;
+    Int i;
+    Int pitch, width, height;
+    ULong temp1, temp2;
+
+    width = refVop->width;
+    height = refVop->height;
+    pitch = refVop->pitch;
+
+    /* pad top */
+    src = refVop->yChan;
+
+    temp1 = *src; /* top-left corner */
+    temp2 = src[width-1]; /* top-right corner */
+    temp1 |= (temp1 << 8);
+    temp1 |= (temp1 << 16);
+    temp2 |= (temp2 << 8);
+    temp2 |= (temp2 << 16);
+
+    dst = src - (pitch << 4);
+
+    *((ULong*)(dst - 16)) = temp1;
+    *((ULong*)(dst - 12)) = temp1;
+    *((ULong*)(dst - 8)) = temp1;
+    *((ULong*)(dst - 4)) = temp1;
+
+    M4VENC_MEMCPY(dst, src, width);
+
+    *((ULong*)(dst += width)) = temp2;
+    *((ULong*)(dst + 4)) = temp2;
+    *((ULong*)(dst + 8)) = temp2;
+    *((ULong*)(dst + 12)) = temp2;
+
+    dst = dst - width - 16;
+
+    i = 15;
+    while (i--)
+    {
+        M4VENC_MEMCPY(dst + pitch, dst, pitch);
+        dst += pitch;
+    }
+
+    /* pad sides */
+    dst += (pitch + 16);
+    src = dst;
+    i = height;
+    while (i--)
+    {
+        temp1 = *src;
+        temp2 = src[width-1];
+        temp1 |= (temp1 << 8);
+        temp1 |= (temp1 << 16);
+        temp2 |= (temp2 << 8);
+        temp2 |= (temp2 << 16);
+
+        *((ULong*)(dst - 16)) = temp1;
+        *((ULong*)(dst - 12)) = temp1;
+        *((ULong*)(dst - 8)) = temp1;
+        *((ULong*)(dst - 4)) = temp1;
+
+        *((ULong*)(dst += width)) = temp2;
+        *((ULong*)(dst + 4)) = temp2;
+        *((ULong*)(dst + 8)) = temp2;
+        *((ULong*)(dst + 12)) = temp2;
+
+        src += pitch;
+        dst = src;
+    }
+
+    /* pad bottom */
+    dst -= 16;
+    i = 16;
+    while (i--)
+    {
+        M4VENC_MEMCPY(dst, dst - pitch, pitch);
+        dst += pitch;
+    }
+
+
+    return ;
+}
+
+/*===================================================================
+    Function:   ComputeMBSum
+    Date:       10/28/2000
+    Purpose:    Compute sum of absolute value (SAV) of blocks in a macroblock
+                in INTRA mode needed for rate control. Thus, instead of
+                computing the SAV, we can compute first order moment or
+                variance .
+
+    11/28/00:    add MMX
+    9/3/01:      do parallel comp for C function.
+===================================================================*/
+void ComputeMBSum_C(UChar *cur, Int lx, MOT *mot_mb)
+{
+    Int j;
+    Int *cInt, *cInt2;
+    Int sad1 = 0, sad2 = 0, sad3 = 0, sad4 = 0;
+    Int tmp, tmp2, mask = 0x00FF00FF;
+
+    cInt = (Int*)cur;   /* make sure this is word-align */
+    cInt2 = (Int*)(cur + (lx << 3));
+    j = 8;
+    while (j--)
+    {
+        tmp = cInt[3];  /* load 4 pixels at a time */
+        tmp2 = tmp & mask;
+        tmp = (tmp >> 8) & mask;
+        tmp += tmp2;
+        sad2 += tmp;
+        tmp = cInt[2];
+        tmp2 = tmp & mask;
+        tmp = (tmp >> 8) & mask;
+        tmp += tmp2;
+        sad2 += tmp;
+        tmp = cInt[1];
+        tmp2 = tmp & mask;
+        tmp = (tmp >> 8) & mask;
+        tmp += tmp2;
+        sad1 += tmp;
+        tmp = *cInt;
+        cInt += (lx >> 2);
+        tmp2 = tmp & mask;
+        tmp = (tmp >> 8) & mask;
+        tmp += tmp2;
+        sad1 += tmp;
+
+        tmp = cInt2[3];
+        tmp2 = tmp & mask;
+        tmp = (tmp >> 8) & mask;
+        tmp += tmp2;
+        sad4 += tmp;
+        tmp = cInt2[2];
+        tmp2 = tmp & mask;
+        tmp = (tmp >> 8) & mask;
+        tmp += tmp2;
+        sad4 += tmp;
+        tmp = cInt2[1];
+        tmp2 = tmp & mask;
+        tmp = (tmp >> 8) & mask;
+        tmp += tmp2;
+        sad3 += tmp;
+        tmp = *cInt2;
+        cInt2 += (lx >> 2);
+        tmp2 = tmp & mask;
+        tmp = (tmp >> 8) & mask;
+        tmp += tmp2;
+        sad3 += tmp;
+    }
+    sad1 += (sad1 << 16);
+    sad2 += (sad2 << 16);
+    sad3 += (sad3 << 16);
+    sad4 += (sad4 << 16);
+    sad1 >>= 16;
+    sad2 >>= 16;
+    sad3 >>= 16;
+    sad4 >>= 16;
+
+    mot_mb[1].sad = sad1;
+    mot_mb[2].sad = sad2;
+    mot_mb[3].sad = sad3;
+    mot_mb[4].sad = sad4;
+    mot_mb[0].sad = sad1 + sad2 + sad3 + sad4;
+
+    return ;
+}
+
diff --git a/media/libstagefright/codecs/m4v_h263/enc/src/motion_comp.cpp b/media/libstagefright/codecs/m4v_h263/enc/src/motion_comp.cpp
new file mode 100644
index 0000000..b81d278
--- /dev/null
+++ b/media/libstagefright/codecs/m4v_h263/enc/src/motion_comp.cpp
@@ -0,0 +1,1965 @@
+/* ------------------------------------------------------------------
+ * Copyright (C) 1998-2009 PacketVideo
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
+ * express or implied.
+ * See the License for the specific language governing permissions
+ * and limitations under the License.
+ * -------------------------------------------------------------------
+ */
+#include "mp4lib_int.h"
+#include "mp4enc_lib.h"
+
+//const static Int roundtab4[] = {0,1,1,1};
+//const static Int roundtab8[] = {0,0,1,1,1,1,1,2};
+//const static Int roundtab12[] = {0,0,0,1,1,1,1,1,1,1,2,2};
+const static Int roundtab16[] = {0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2};
+
+#define FORWARD_MODE    1
+#define BACKWARD_MODE   2
+#define BIDIRECTION_MODE    3
+#define DIRECT_MODE         4
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+    /*Function Prototype */
+    /* no-edge padding */
+    Int EncGetPredOutside(Int xpos, Int ypos, UChar *c_prev, UChar *rec,
+    Int width, Int height, Int rnd1);
+
+    void Copy_MB_from_Vop(UChar *comp, Int yChan[][NCOEFF_BLOCK], Int width);
+    void Copy_B_from_Vop(UChar *comp, Int cChan[], Int width);
+    void Copy_MB_into_Vop(UChar *comp, Int yChan[][NCOEFF_BLOCK], Int width);
+    void Copy_B_into_Vop(UChar *comp, Int cChan[], Int width);
+    void get_MB(UChar *c_prev, UChar *c_prev_u  , UChar *c_prev_v,
+                Short mb[6][64], Int lx, Int lx_uv);
+
+    Int GetPredAdvBy0x0(
+        UChar *c_prev,      /* i */
+        UChar *pred_block,      /* i */
+        Int lx,     /* i */
+        Int rnd1 /* i */
+    );
+
+    Int GetPredAdvBy0x1(
+        UChar *c_prev,      /* i */
+        UChar *pred_block,      /* i */
+        Int lx,     /* i */
+        Int rnd1 /* i */
+    );
+
+    Int GetPredAdvBy1x0(
+        UChar *c_prev,      /* i */
+        UChar *pred_block,      /* i */
+        Int lx,     /* i */
+        Int rnd1 /* i */
+    );
+
+    Int GetPredAdvBy1x1(
+        UChar *c_prev,      /* i */
+        UChar *pred_block,      /* i */
+        Int lx,     /* i */
+        Int rnd1 /* i */
+    );
+
+    static Int(*const GetPredAdvBTable[2][2])(UChar*, UChar*, Int, Int) =
+    {
+        {&GetPredAdvBy0x0, &GetPredAdvBy0x1},
+        {&GetPredAdvBy1x0, &GetPredAdvBy1x1}
+    };
+
+
+#ifdef __cplusplus
+}
+#endif
+
+
+/* ======================================================================== */
+/*  Function : getMotionCompensatedMB( )                                    */
+/*  Date     : 4/17/2001                                                    */
+/*  Purpose  : Get the motion compensate block into video->predictionMB     */
+/*              and generate video->predictionErrorMB                       */
+/*              modified from MBMotionComp() function in the decoder        */
+/*  In/out   :                                                              */
+/*  Return   :                                                              */
+/*  Modified :                                                              */
+/* ======================================================================== */
+
+void getMotionCompensatedMB(VideoEncData *video, Int ind_x, Int ind_y, Int offset)
+{
+    Vop *prevVop = video->forwardRefVop; //reference frame
+    Vop *currVop = video->currVop;
+    Int mbnum = video->mbnum;       //mb index
+    MOT *mot = video->mot[mbnum];
+    Int ypos, xpos;
+    UChar *c_prev, *cu_prev, *cv_prev;
+    UChar *c_rec, *cu_rec, *cv_rec;
+    Int height, pitch, pitch_uv, height_uv;
+    Int mode = video->headerInfo.Mode[mbnum];  /* get mode */
+    Int dx, dy;
+    Int xpred, ypred;
+    Int xsum, ysum;
+    Int round1;
+
+    OSCL_UNUSED_ARG(offset);
+
+    round1 = (Int)(1 - video->currVop->roundingType);
+
+    pitch  = currVop->pitch;
+    height = currVop->height;
+    pitch_uv  = pitch >> 1;
+    height_uv = height >> 1;
+
+    ypos = ind_y << 4 ;
+    xpos = ind_x << 4 ;
+
+    c_rec = video->predictedMB;
+    cu_rec = video->predictedMB + 256;
+    cv_rec = video->predictedMB + 264;
+
+    if (mode == MODE_INTER || mode == MODE_INTER_Q)
+    {
+        /* Motion vector in x direction       */
+        dx = mot[0].x;
+        dy = mot[0].y;
+
+        c_prev  = prevVop->yChan;
+
+        xpred = (xpos << 1) + dx ;
+        ypred = (ypos << 1) + dy ;
+
+        /* Call function that performs luminance prediction */
+        EncPrediction_INTER(xpred, ypred, c_prev, c_rec,
+                            pitch, round1);
+
+        if ((dx & 3) == 0)  dx = dx >> 1;
+        else        dx = (dx >> 1) | 1;
+
+        if ((dy & 3) == 0)      dy = dy >> 1;
+        else        dy = (dy >> 1) | 1;
+
+        xpred = xpos + dx;
+        ypred = ypos + dy;
+
+        cu_prev = prevVop->uChan;
+        cv_prev = prevVop->vChan;
+
+        EncPrediction_Chrom(xpred, ypred, cu_prev, cv_prev, cu_rec, cv_rec,
+                            pitch_uv, (currVop->width) >> 1, height_uv, round1);
+    }
+#ifndef NO_INTER4V
+    else if (mode == MODE_INTER4V)
+    {
+        c_prev  = prevVop->yChan;
+        cu_prev = prevVop->uChan;
+        cv_prev = prevVop->vChan;
+
+        EncPrediction_INTER4V(xpos, ypos, mot, c_prev, c_rec,
+                              pitch, round1);
+
+        xsum = mot[1].x + mot[2].x + mot[3].x + mot[4].x;
+        ysum = mot[1].y + mot[2].y + mot[3].y + mot[4].y;
+
+        dx = PV_SIGN(xsum) * (roundtab16[(PV_ABS(xsum)) & 0xF] +
+                              (((PV_ABS(xsum)) >> 4) << 1));
+        dy = PV_SIGN(ysum) * (roundtab16[(PV_ABS(ysum)) & 0xF] +
+                              (((PV_ABS(ysum)) >> 4) << 1));
+
+        ypred = ypos + dy;
+        xpred = xpos + dx;
+
+        EncPrediction_Chrom(xpred, ypred, cu_prev, cv_prev, cu_rec, cv_rec,
+                            pitch_uv, (currVop->width) >> 1, height_uv, round1);
+    }
+#endif
+    else
+    {
+        ;//printf("Error, MODE_SKIPPED is not decided yet!\n");
+    }
+
+    return ;
+}
+
+/***************************************************************************
+    Function:   EncPrediction_INTER
+    Date:       04/17/2001
+    Purpose:    Get predicted area for luminance and compensate with the residue.
+                Modified from luminance_pred_mode_inter() in decoder.
+***************************************************************************/
+
+void EncPrediction_INTER(
+    Int xpred,          /* i */
+    Int ypred,          /* i */
+    UChar *c_prev,          /* i */
+    UChar *c_rec,       /* i */
+    Int lx,         /* i */
+    Int round1          /* i */
+)
+{
+    c_prev += (xpred >> 1) + ((ypred >> 1) * lx);
+
+    GetPredAdvBTable[ypred&1][xpred&1](c_prev, c_rec, lx, round1);
+
+    c_prev += B_SIZE;
+    c_rec += B_SIZE;
+
+    GetPredAdvBTable[ypred&1][xpred&1](c_prev, c_rec, lx, round1);
+
+    c_prev += (lx << 3) - B_SIZE;
+    c_rec += (16 << 3) - B_SIZE; /* padding */
+
+    GetPredAdvBTable[ypred&1][xpred&1](c_prev, c_rec, lx, round1);
+
+    c_prev += B_SIZE;
+    c_rec += B_SIZE;
+
+    GetPredAdvBTable[ypred&1][xpred&1](c_prev, c_rec, lx, round1);
+
+    return;
+}
+
+#ifndef NO_INTER4V
+/***************************************************************************
+    Function:   EncPrediction_INTER4V
+    Date:       04/17/2001
+    Purpose:    Get predicted area for luminance and compensate with the residue.
+                Modified from luminance_pred_mode_inter4v() in decoder.
+***************************************************************************/
+
+void EncPrediction_INTER4V(
+    Int xpos,           /* i */
+    Int ypos,           /* i */
+    MOT *mot,           /* i */
+    UChar *c_prev,          /* i */
+    UChar *c_rec,           /* i */
+    Int lx,         /* i */
+    Int round1          /* i */
+)
+{
+    Int ypred, xpred;
+
+    xpred = (Int)((xpos << 1) + mot[1].x);
+    ypred = (Int)((ypos << 1) + mot[1].y);
+
+    GetPredAdvBTable[ypred&1][xpred&1](c_prev + (xpred >> 1) + ((ypred >> 1)*lx),
+                                       c_rec, lx, round1);
+
+    c_rec += B_SIZE;
+
+    xpred = (Int)(((xpos + B_SIZE) << 1) + mot[2].x);
+    ypred = (Int)((ypos << 1) + mot[2].y);
+
+    GetPredAdvBTable[ypred&1][xpred&1](c_prev + (xpred >> 1) + ((ypred >> 1)*lx),
+                                       c_rec, lx, round1);
+
+    c_rec += (16 << 3) - B_SIZE; /* padding */
+
+    xpred = (Int)((xpos << 1) + mot[3].x);
+    ypred = (Int)(((ypos + B_SIZE) << 1) + mot[3].y);
+
+    GetPredAdvBTable[ypred&1][xpred&1](c_prev + (xpred >> 1) + ((ypred >> 1)*lx),
+                                       c_rec, lx, round1);
+
+    c_rec += B_SIZE;
+
+    xpred = (Int)(((xpos + B_SIZE) << 1) + mot[4].x);
+    ypred = (Int)(((ypos + B_SIZE) << 1) + mot[4].y);
+
+    GetPredAdvBTable[ypred&1][xpred&1](c_prev + (xpred >> 1) + ((ypred >> 1)*lx),
+                                       c_rec, lx, round1);
+
+    return;
+}
+#endif /* NO_INTER4V */
+
+/***************************************************************************
+    Function:   EncPrediction_Chrom
+    Date:       04/17/2001
+    Purpose:    Get predicted area for chrominance and compensate with the residue.
+                Modified from chrominance_pred() in decoder.
+***************************************************************************/
+
+void EncPrediction_Chrom(
+    Int xpred,          /* i */
+    Int ypred,          /* i */
+    UChar *cu_prev,         /* i */
+    UChar *cv_prev,         /* i */
+    UChar *cu_rec,
+    UChar *cv_rec,
+    Int lx,
+    Int width_uv,           /* i */
+    Int height_uv,          /* i */
+    Int round1          /* i */
+)
+{
+    /* check whether the MV points outside the frame */
+    /* Compute prediction for Chrominance b block (block[4]) */
+    if (xpred >= 0 && xpred <= ((width_uv << 1) - (2*B_SIZE)) && ypred >= 0 &&
+            ypred <= ((height_uv << 1) - (2*B_SIZE)))
+    {
+        /*****************************/
+        /* (x,y) is inside the frame */
+        /*****************************/
+
+        /* Compute prediction for Chrominance b (block[4]) */
+        GetPredAdvBTable[ypred&1][xpred&1](cu_prev + (xpred >> 1) + ((ypred >> 1)*lx),
+                                           cu_rec, lx, round1);
+
+        /* Compute prediction for Chrominance r (block[5]) */
+        GetPredAdvBTable[ypred&1][xpred&1](cv_prev + (xpred >> 1) + ((ypred >> 1)*lx),
+                                           cv_rec,  lx, round1);
+    }
+    else
+    {
+        /******************************/
+        /* (x,y) is outside the frame */
+        /******************************/
+
+        /* Compute prediction for Chrominance b (block[4]) */
+        EncGetPredOutside(xpred, ypred,
+                          cu_prev, cu_rec,
+                          width_uv, height_uv, round1);
+
+        /* Compute prediction for Chrominance r (block[5]) */
+        EncGetPredOutside(xpred, ypred,
+                          cv_prev, cv_rec,
+                          width_uv, height_uv, round1);
+    }
+
+    return;
+}
+/***************************************************************************
+    Function:   GetPredAdvancedB
+    Date:       04/17/2001
+    Purpose:    Get predicted area (block) and compensate with the residue.
+                - modified from GetPredAdvancedBAdd in decoder.
+    Intput/Output:
+    Modified:
+***************************************************************************/
+
+Int GetPredAdvBy0x0(
+    UChar *prev,        /* i */
+    UChar *rec,     /* i */
+    Int lx,     /* i */
+    Int rnd /* i */
+)
+{
+    Int i;      /* loop variable */
+    ULong  pred_word, word1, word2;
+    Int tmp;
+
+    OSCL_UNUSED_ARG(rnd);
+
+    /* initialize offset to adjust pixel counter */
+    /*    the next row; full-pel resolution      */
+
+    tmp = (ULong)prev & 0x3;
+
+    if (tmp == 0)  /* word-aligned */
+    {
+        rec -= 16; /* preset */
+        prev -= lx;
+
+        for (i = 8; i > 0; i--)
+        {
+            *((ULong*)(rec += 16)) = *((ULong*)(prev += lx));
+            *((ULong*)(rec + 4)) = *((ULong*)(prev + 4));
+        }
+        return 1;
+    }
+    else if (tmp == 1) /* first position */
+    {
+        prev--; /* word-aligned */
+        rec -= 16; /* preset */
+        prev -= lx;
+
+        for (i = 8; i > 0; i--)
+        {
+            word1 = *((ULong*)(prev += lx)); /* read 4 bytes, b4 b3 b2 b1 */
+            word2 = *((ULong*)(prev + 4));  /* read 4 bytes, b8 b7 b6 b5 */
+            word1 >>= 8; /* 0 b4 b3 b2 */
+            pred_word = word1 | (word2 << 24);  /* b5 b4 b3 b2 */
+            *((ULong*)(rec += 16)) = pred_word;
+
+            word1 = *((ULong*)(prev + 8)); /* b12 b11 b10 b9 */
+            word2 >>= 8; /* 0 b8 b7 b6 */
+            pred_word = word2 | (word1 << 24); /* b9 b8 b7 b6 */
+            *((ULong*)(rec + 4)) = pred_word;
+        }
+
+        return 1;
+    }
+    else if (tmp == 2) /* second position */
+    {
+        prev -= 2; /* word1-aligned */
+        rec -= 16; /* preset */
+        prev -= lx;
+
+        for (i = 8; i > 0; i--)
+        {
+            word1 = *((ULong*)(prev += lx)); /* read 4 bytes, b4 b3 b2 b1 */
+            word2 = *((ULong*)(prev + 4));  /* read 4 bytes, b8 b7 b6 b5 */
+            word1 >>= 16; /* 0 0 b4 b3 */
+            pred_word = word1 | (word2 << 16);  /* b6 b5 b4 b3 */
+            *((ULong*)(rec += 16)) = pred_word;
+
+            word1 = *((ULong*)(prev + 8)); /* b12 b11 b10 b9 */
+            word2 >>= 16; /* 0 0 b8 b7 */
+            pred_word = word2 | (word1 << 16); /* b10 b9 b8 b7 */
+            *((ULong*)(rec + 4)) = pred_word;
+        }
+
+        return 1;
+    }
+    else /* third position */
+    {
+        prev -= 3; /* word1-aligned */
+        rec -= 16; /* preset */
+        prev -= lx;
+
+        for (i = 8; i > 0; i--)
+        {
+            word1 = *((ULong*)(prev += lx)); /* read 4 bytes, b4 b3 b2 b1 */
+            word2 = *((ULong*)(prev + 4));  /* read 4 bytes, b8 b7 b6 b5 */
+            word1 >>= 24; /* 0 0 0 b4 */
+            pred_word = word1 | (word2 << 8);   /* b7 b6 b5 b4 */
+            *((ULong*)(rec += 16)) = pred_word;
+
+            word1 = *((ULong*)(prev + 8)); /* b12 b11 b10 b9 */
+            word2 >>= 24; /* 0 0 0 b8 */
+            pred_word = word2 | (word1 << 8); /* b11 b10 b9 b8 */
+            *((ULong*)(rec + 4)) = pred_word;
+
+        }
+
+        return 1;
+    }
+}
+/**************************************************************************/
+Int GetPredAdvBy0x1(
+    UChar *prev,        /* i */
+    UChar *rec,     /* i */
+    Int lx,     /* i */
+    Int rnd1 /* i */
+)
+{
+    Int i;      /* loop variable */
+    Int offset;
+    ULong word1, word2, word3, word12;
+    Int tmp;
+    ULong mask;
+
+    /* initialize offset to adjust pixel counter */
+    /*    the next row; full-pel resolution      */
+    offset = lx - B_SIZE; /* offset for prev */
+
+    /* Branch based on pixel location (half-pel or full-pel) for x and y */
+    rec -= 12; /* preset */
+
+    tmp = (ULong)prev & 3;
+    mask = 254;
+    mask |= (mask << 8);
+    mask |= (mask << 16); /* 0xFEFEFEFE */
+
+    if (tmp == 0) /* word-aligned */
+    {
+        if (rnd1 == 1)
+        {
+            for (i = B_SIZE; i > 0; i--)
+            {
+                word1 = *((ULong*)prev); /* b4 b3 b2 b1 */
+                word2 = *((ULong*)(prev += 4)); /* b8 b7 b6 b5 */
+                word12 = (word1 >> 8); /* 0 b4 b3 b2 */
+                word12 |= (word2 << 24); /* b5 b4 b3 b2 */
+                word3 = word1 | word12; // rnd1 = 1; otherwise word3 = word1&word12
+                word1 &= mask;
+                word3 &= (~mask); /* 0x1010101, check last bit */
+                word12 &= mask;
+                word1 >>= 1;
+                word1 = word1 + (word12 >> 1);
+                word1 += word3;
+                *((ULong*)(rec += 12)) = word1; /* write 4 pixels */
+
+                word1 = *((ULong*)(prev += 4)); /* b12 b11 b10 b9 */
+                word12 = (word2 >> 8); /* 0 b8 b7 b6 */
+                word12 |= (word1 << 24); /* b9 b8 b7 b6 */
+                word3 = word2 | word12;
+                word2 &= mask;
+                word3 &= (~mask);  /* 0x1010101, check last bit */
+                word12 &= mask;
+                word2 >>= 1;
+                word2 = word2 + (word12 >> 1);
+                word2 += word3;
+                *((ULong*)(rec += 4)) = word2; /* write 4 pixels */
+
+                prev += offset;
+            }
+            return 1;
+        }
+        else /* rnd1 == 0 */
+        {
+            for (i = B_SIZE; i > 0; i--)
+            {
+                word1 = *((ULong*)prev); /* b4 b3 b2 b1 */
+
+                word2 = *((ULong*)(prev += 4)); /* b8 b7 b6 b5 */
+                word12 = (word1 >> 8); /* 0 b4 b3 b2 */
+                word12 |= (word2 << 24); /* b5 b4 b3 b2 */
+                word3 = word1 & word12; // rnd1 = 1; otherwise word3 = word1&word12
+                word1 &= mask;
+                word3 &= (~mask); /* 0x1010101, check last bit */
+                word12 &= mask;
+                word1 >>= 1;
+                word1 = word1 + (word12 >> 1);
+                word1 += word3;
+                *((ULong*)(rec += 12)) = word1; /* write 4 pixels */
+
+                word1 = *((ULong*)(prev += 4)); /* b12 b11 b10 b9 */
+                word12 = (word2 >> 8); /* 0 b8 b7 b6 */
+                word12 |= (word1 << 24); /* b9 b8 b7 b6 */
+                word3 = word2 & word12;
+                word2 &= mask;
+                word3 &= (~mask);  /* 0x1010101, check last bit */
+                word12 &= mask;
+                word2 >>= 1;
+                word2 = word2 + (word12 >> 1);
+                word2 += word3;
+                *((ULong*)(rec += 4)) = word2; /* write 4 pixels */
+
+                prev += offset;
+            }
+            return 1;
+        } /* rnd1 */
+    }
+    else if (tmp == 1)
+    {
+        prev--; /* word-aligned */
+        if (rnd1 == 1)
+        {
+            for (i = B_SIZE; i > 0; i--)
+            {
+                word1 = *((ULong*)prev); /* b3 b2 b1 b0 */
+                word2 = *((ULong*)(prev += 4)); /* b7 b6 b5 b4 */
+                word12 = (word1 >> 8); /* 0 b3 b2 b1 */
+                word1 >>= 16; /* 0 0 b3 b2 */
+                word12 |= (word2 << 24); /* b4 b3 b2 b1 */
+                word1 |= (word2 << 16); /* b5 b4 b3 b2 */
+                word3 = word1 | word12; // rnd1 = 1; otherwise word3 = word1&word12
+                word1 &= mask;
+                word3 &= (~mask); /* 0x1010101, check last bit */
+                word12 &= mask;
+                word1 >>= 1;
+                word1 = word1 + (word12 >> 1);
+                word1 += word3;
+                *((ULong*)(rec += 12)) = word1; /* write 4 pixels */
+
+                word1 = *((ULong*)(prev += 4)); /* b11 b10 b9 b8 */
+                word12 = (word2 >> 8); /* 0 b7 b6 b5 */
+                word2 >>= 16; /* 0 0 b7 b6 */
+                word12 |= (word1 << 24); /* b8 b7 b6 b5 */
+                word2 |= (word1 << 16); /* b9 b8 b7 b6 */
+                word3 = word2 | word12; // rnd1 = 1; otherwise word3 = word2&word12
+                word2 &= mask;
+                word3 &= (~mask); /* 0x1010101, check last bit */
+                word12 &= mask;
+                word2 >>= 1;
+                word2 = word2 + (word12 >> 1);
+                word2 += word3;
+                *((ULong*)(rec += 4)) = word2; /* write 4 pixels */
+
+                prev += offset;
+            }
+            return 1;
+        }
+        else /* rnd1 = 0 */
+        {
+            for (i = B_SIZE; i > 0; i--)
+            {
+                word1 = *((ULong*)prev); /* b3 b2 b1 b0 */
+
+                word2 = *((ULong*)(prev += 4)); /* b7 b6 b5 b4 */
+                word12 = (word1 >> 8); /* 0 b3 b2 b1 */
+                word1 >>= 16; /* 0 0 b3 b2 */
+                word12 |= (word2 << 24); /* b4 b3 b2 b1 */
+                word1 |= (word2 << 16); /* b5 b4 b3 b2 */
+                word3 = word1 & word12;
+                word1 &= mask;
+                word3 &= (~mask); /* 0x1010101, check last bit */
+                word12 &= mask;
+                word1 >>= 1;
+                word1 = word1 + (word12 >> 1);
+                word1 += word3;
+                *((ULong*)(rec += 12)) = word1; /* write 4 pixels */
+
+                word1 = *((ULong*)(prev += 4)); /* b11 b10 b9 b8 */
+                word12 = (word2 >> 8); /* 0 b7 b6 b5 */
+                word2 >>= 16; /* 0 0 b7 b6 */
+                word12 |= (word1 << 24); /* b8 b7 b6 b5 */
+                word2 |= (word1 << 16); /* b9 b8 b7 b6 */
+                word3 = word2 & word12;
+                word2 &= mask;
+                word3 &= (~mask); /* 0x1010101, check last bit */
+                word12 &= mask;
+                word2 >>= 1;
+                word2 = word2 + (word12 >> 1);
+                word2 += word3;
+                *((ULong*)(rec += 4)) = word2; /* write 4 pixels */
+
+                prev += offset;
+            }
+            return 1;
+        } /* rnd1 */
+    }
+    else if (tmp == 2)
+    {
+        prev -= 2; /* word-aligned */
+        if (rnd1 == 1)
+        {
+            for (i = B_SIZE; i > 0; i--)
+            {
+                word1 = *((ULong*)prev); /* b2 b1 b0 bN1 */
+                word2 = *((ULong*)(prev += 4)); /* b6 b5 b4 b3 */
+                word12 = (word1 >> 16); /* 0 0 b2 b1 */
+                word1 >>= 24; /* 0 0 0 b2 */
+                word12 |= (word2 << 16); /* b4 b3 b2 b1 */
+                word1 |= (word2 << 8); /* b5 b4 b3 b2 */
+                word3 = word1 | word12; // rnd1 = 1; otherwise word3 = word1&word12
+                word1 &= mask;
+                word3 &= (~mask); /* 0x1010101, check last bit */
+                word12 &= mask;
+                word1 >>= 1;
+                word1 = word1 + (word12 >> 1);
+                word1 += word3;
+                *((ULong*)(rec += 12)) = word1; /* write 4 pixels */
+
+                word1 = *((ULong*)(prev += 4)); /* b10 b9 b8 b7 */
+                word12 = (word2 >> 16); /* 0 0 b6 b5 */
+                word2 >>= 24; /* 0 0 0 b6 */
+                word12 |= (word1 << 16); /* b8 b7 b6 b5 */
+                word2 |= (word1 << 8); /* b9 b8 b7 b6 */
+                word3 = word2 | word12; // rnd1 = 1; otherwise word3 = word1&word12
+                word2 &= mask;
+                word3 &= (~mask); /* 0x1010101, check last bit */
+                word12 &= mask;
+                word2 >>= 1;
+                word2 = word2 + (word12 >> 1);
+                word2 += word3;
+                *((ULong*)(rec += 4)) = word2; /* write 4 pixels */
+                prev += offset;
+            }
+            return 1;
+        }
+        else /* rnd1 == 0 */
+        {
+            for (i = B_SIZE; i > 0; i--)
+            {
+                word1 = *((ULong*)prev); /* b2 b1 b0 bN1 */
+                word2 = *((ULong*)(prev += 4)); /* b6 b5 b4 b3 */
+                word12 = (word1 >> 16); /* 0 0 b2 b1 */
+                word1 >>= 24; /* 0 0 0 b2 */
+                word12 |= (word2 << 16); /* b4 b3 b2 b1 */
+                word1 |= (word2 << 8); /* b5 b4 b3 b2 */
+                word3 = word1 & word12; // rnd1 = 1; otherwise word3 = word1&word12
+                word1 &= mask;
+                word3 &= (~mask); /* 0x1010101, check last bit */
+                word12 &= mask;
+                word1 >>= 1;
+                word1 = word1 + (word12 >> 1);
+                word1 += word3;
+                *((ULong*)(rec += 12)) = word1; /* write 4 pixels */
+
+                word1 = *((ULong*)(prev += 4)); /* b10 b9 b8 b7 */
+                word12 = (word2 >> 16); /* 0 0 b6 b5 */
+                word2 >>= 24; /* 0 0 0 b6 */
+                word12 |= (word1 << 16); /* b8 b7 b6 b5 */
+                word2 |= (word1 << 8); /* b9 b8 b7 b6 */
+                word3 = word2 & word12; // rnd1 = 1; otherwise word3 = word1&word12
+                word2 &= mask;
+                word3 &= (~mask); /* 0x1010101, check last bit */
+                word12 &= mask;
+                word2 >>= 1;
+                word2 = word2 + (word12 >> 1);
+                word2 += word3;
+                *((ULong*)(rec += 4)) = word2; /* write 4 pixels */
+                prev += offset;
+            }
+            return 1;
+        }
+    }
+    else /* tmp = 3 */
+    {
+        prev -= 3; /* word-aligned */
+        if (rnd1 == 1)
+        {
+            for (i = B_SIZE; i > 0; i--)
+            {
+                word1 = *((ULong*)prev); /* b1 b0 bN1 bN2 */
+                word2 = *((ULong*)(prev += 4)); /* b5 b4 b3 b2 */
+                word12 = (word1 >> 24); /* 0 0 0 b1 */
+                word12 |= (word2 << 8); /* b4 b3 b2 b1 */
+                word1 = word2;
+                word3 = word1 | word12; // rnd1 = 1; otherwise word3 = word1&word12
+                word1 &= mask;
+                word3 &= (~mask); /* 0x1010101, check last bit */
+                word12 &= mask;
+                word1 >>= 1;
+                word1 = word1 + (word12 >> 1);
+                word1 += word3;
+                *((ULong*)(rec += 12)) = word1; /* write 4 pixels */
+
+                word1 = *((ULong*)(prev += 4)); /* b9 b8 b7 b6 */
+                word12 = (word2 >> 24); /* 0 0 0 b5 */
+                word12 |= (word1 << 8); /* b8 b7 b6 b5 */
+                word2 = word1; /* b9 b8 b7 b6 */
+                word3 = word2 | word12; // rnd1 = 1; otherwise word3 = word1&word12
+                word2 &= mask;
+                word3 &= (~mask); /* 0x1010101, check last bit */
+                word12 &= mask;
+                word2 >>= 1;
+                word2 = word2 + (word12 >> 1);
+                word2 += word3;
+                *((ULong*)(rec += 4)) = word2; /* write 4 pixels */
+                prev += offset;
+            }
+            return 1;
+        }
+        else
+        {
+            for (i = B_SIZE; i > 0; i--)
+            {
+                word1 = *((ULong*)prev); /* b1 b0 bN1 bN2 */
+                word2 = *((ULong*)(prev += 4)); /* b5 b4 b3 b2 */
+                word12 = (word1 >> 24); /* 0 0 0 b1 */
+                word12 |= (word2 << 8); /* b4 b3 b2 b1 */
+                word1 = word2;
+                word3 = word1 & word12; // rnd1 = 1; otherwise word3 = word1&word12
+                word1 &= mask;
+                word3 &= (~mask); /* 0x1010101, check last bit */
+                word12 &= mask;
+                word1 >>= 1;
+                word1 = word1 + (word12 >> 1);
+                word1 += word3;
+                *((ULong*)(rec += 12)) = word1; /* write 4 pixels */
+
+                word1 = *((ULong*)(prev += 4)); /* b9 b8 b7 b6 */
+                word12 = (word2 >> 24); /* 0 0 0 b5 */
+                word12 |= (word1 << 8); /* b8 b7 b6 b5 */
+                word2 = word1; /* b9 b8 b7 b6 */
+                word3 = word2 & word12; // rnd1 = 1; otherwise word3 = word1&word12
+                word2 &= mask;
+                word3 &= (~mask); /* 0x1010101, check last bit */
+                word12 &= mask;
+                word2 >>= 1;
+                word2 = word2 + (word12 >> 1);
+                word2 += word3;
+                *((ULong*)(rec += 4)) = word2; /* write 4 pixels */
+                prev += offset;
+            }
+            return 1;
+        }
+    }
+}
+
+/**************************************************************************/
+Int GetPredAdvBy1x0(
+    UChar *prev,        /* i */
+    UChar *rec,     /* i */
+    Int lx,     /* i */
+    Int rnd1 /* i */
+)
+{
+    Int i;      /* loop variable */
+    Int offset;
+    ULong  word1, word2, word3, word12, word22;
+    Int tmp;
+    ULong mask;
+
+    /* initialize offset to adjust pixel counter */
+    /*    the next row; full-pel resolution      */
+    offset = lx - B_SIZE; /* offset for prev */
+
+    /* Branch based on pixel location (half-pel or full-pel) for x and y */
+    rec -= 12; /* preset */
+
+    tmp = (ULong)prev & 3;
+    mask = 254;
+    mask |= (mask << 8);
+    mask |= (mask << 16); /* 0xFEFEFEFE */
+
+    if (tmp == 0) /* word-aligned */
+    {
+        prev -= 4;
+        if (rnd1 == 1)
+        {
+            for (i = B_SIZE; i > 0; i--)
+            {
+                word1 = *((ULong*)(prev += 4));
+                word2 = *((ULong*)(prev + lx));
+                word3 = word1 | word2; // rnd1 = 1; otherwise word3 = word1&word2
+                word1 &= mask;
+                word3 &= (~mask); /* 0x1010101, check last bit */
+                word2 &= mask;
+                word1 >>= 1;
+                word1 = word1 + (word2 >> 1);
+                word1 += word3;
+                *((ULong*)(rec += 12)) = word1;
+                word1 = *((ULong*)(prev += 4));
+                word2 = *((ULong*)(prev + lx));
+                word3 = word1 | word2; // rnd1 = 1; otherwise word3 = word1&word2
+                word1 &= mask;
+                word3 &= (~mask); /* 0x1010101, check last bit */
+                word2 &= mask;
+                word1 >>= 1;
+                word1 = word1 + (word2 >> 1);
+                word1 += word3;
+                *((ULong*)(rec += 4)) = word1;
+
+                prev += offset;
+            }
+            return 1;
+        }
+        else   /* rnd1 = 0 */
+        {
+            for (i = B_SIZE; i > 0; i--)
+            {
+                word1 = *((ULong*)(prev += 4));
+                word2 = *((ULong*)(prev + lx));
+                word3 = word1 & word2;  /* rnd1 = 0; */
+                word1 &= mask;
+                word3 &= (~mask); /* 0x1010101, check last bit */
+                word2 &= mask;
+                word1 >>= 1;
+                word1 = word1 + (word2 >> 1);
+                word1 += word3;
+                *((ULong*)(rec += 12)) = word1;
+                word1 = *((ULong*)(prev += 4));
+                word2 = *((ULong*)(prev + lx));
+                word3 = word1 & word2;  /* rnd1 = 0; */
+                word1 &= mask;
+                word3 &= (~mask); /* 0x1010101, check last bit */
+                word2 &= mask;
+                word1 >>= 1;
+                word1 = word1 + (word2 >> 1);
+                word1 += word3;
+                *((ULong*)(rec += 4)) = word1;
+
+                prev += offset;
+            }
+            return 1;
+        }
+    }
+    else if (tmp == 1)
+    {
+        prev--; /* word-aligned */
+        if (rnd1 == 1)
+        {
+            for (i = B_SIZE; i > 0; i--)
+            {
+                word12 = *((ULong*)prev); /* read b4 b3 b2 b1 */
+                word22 = *((ULong*)(prev + lx));
+
+                word1 = *((ULong*)(prev += 4)); /* read b8 b7 b6 b5 */
+                word2 = *((ULong*)(prev + lx));
+                word12 >>= 8; /* 0 b4 b3 b2 */
+                word22 >>= 8;
+                word12 = word12 | (word1 << 24); /* b5 b4 b3 b2 */
+                word22 = word22 | (word2 << 24);
+                word3 = word12 | word22;
+                word12 &= mask;
+                word22 &= mask;
+                word3 &= (~mask); /* 0x1010101, check last bit */
+                word12 >>= 1;
+                word12 = word12 + (word22 >> 1);
+                word12 += word3;
+                *((ULong*)(rec += 12)) = word12;
+
+                word12 = *((ULong*)(prev += 4)); /* read b12 b11 b10 b9 */
+                word22 = *((ULong*)(prev + lx));
+                word1 >>= 8; /* 0 b8 b7 b6 */
+                word2 >>= 8;
+                word1 = word1 | (word12 << 24); /* b9 b8 b7 b6 */
+                word2 = word2 | (word22 << 24);
+                word3 = word1 | word2;
+                word1 &= mask;
+                word2 &= mask;
+                word3 &= (~mask); /* 0x1010101, check last bit */
+                word1 >>= 1;
+                word1 = word1 + (word2 >> 1);
+                word1 += word3;
+                *((ULong*)(rec += 4)) = word1;
+                prev += offset;
+            }
+            return 1;
+        }
+        else /* rnd1 = 0 */
+        {
+            for (i = B_SIZE; i > 0; i--)
+            {
+                word12 = *((ULong*)prev); /* read b4 b3 b2 b1 */
+                word22 = *((ULong*)(prev + lx));
+
+                word1 = *((ULong*)(prev += 4)); /* read b8 b7 b6 b5 */
+                word2 = *((ULong*)(prev + lx));
+                word12 >>= 8; /* 0 b4 b3 b2 */
+                word22 >>= 8;
+                word12 = word12 | (word1 << 24); /* b5 b4 b3 b2 */
+                word22 = word22 | (word2 << 24);
+                word3 = word12 & word22;
+                word12 &= mask;
+                word22 &= mask;
+                word3 &= (~mask); /* 0x1010101, check last bit */
+                word12 >>= 1;
+                word12 = word12 + (word22 >> 1);
+                word12 += word3;
+                *((ULong*)(rec += 12)) = word12;
+
+                word12 = *((ULong*)(prev += 4)); /* read b12 b11 b10 b9 */
+                word22 = *((ULong*)(prev + lx));
+                word1 >>= 8; /* 0 b8 b7 b6 */
+                word2 >>= 8;
+                word1 = word1 | (word12 << 24); /* b9 b8 b7 b6 */
+                word2 = word2 | (word22 << 24);
+                word3 = word1 & word2;
+                word1 &= mask;
+                word2 &= mask;
+                word3 &= (~mask); /* 0x1010101, check last bit */
+                word1 >>= 1;
+                word1 = word1 + (word2 >> 1);
+                word1 += word3;
+                *((ULong*)(rec += 4)) = word1;
+                prev += offset;
+            }
+            return 1;
+        }
+    }
+    else if (tmp == 2)
+    {
+        prev -= 2; /* word-aligned */
+        if (rnd1 == 1)
+        {
+            for (i = B_SIZE; i > 0; i--)
+            {
+                word12 = *((ULong*)prev); /* read b4 b3 b2 b1 */
+                word22 = *((ULong*)(prev + lx));
+
+                word1 = *((ULong*)(prev += 4)); /* read b8 b7 b6 b5 */
+                word2 = *((ULong*)(prev + lx));
+                word12 >>= 16; /* 0 0 b4 b3 */
+                word22 >>= 16;
+                word12 = word12 | (word1 << 16); /* b6 b5 b4 b3 */
+                word22 = word22 | (word2 << 16);
+                word3 = word12 | word22;
+                word12 &= mask;
+                word22 &= mask;
+                word3 &= (~mask); /* 0x1010101, check last bit */
+                word12 >>= 1;
+                word12 = word12 + (word22 >> 1);
+                word12 += word3;
+                *((ULong*)(rec += 12)) = word12;
+
+                word12 = *((ULong*)(prev += 4)); /* read b12 b11 b10 b9 */
+                word22 = *((ULong*)(prev + lx));
+                word1 >>= 16; /* 0 0 b8 b7 */
+                word2 >>= 16;
+                word1 = word1 | (word12 << 16); /* b10 b9 b8 b7 */
+                word2 = word2 | (word22 << 16);
+                word3 = word1 | word2;
+                word1 &= mask;
+                word2 &= mask;
+                word3 &= (~mask); /* 0x1010101, check last bit */
+                word1 >>= 1;
+                word1 = word1 + (word2 >> 1);
+                word1 += word3;
+                *((ULong*)(rec += 4)) = word1;
+                prev += offset;
+            }
+            return 1;
+        }
+        else /* rnd1 = 0 */
+        {
+            for (i = B_SIZE; i > 0; i--)
+            {
+                word12 = *((ULong*)prev); /* read b4 b3 b2 b1 */
+                word22 = *((ULong*)(prev + lx));
+
+                word1 = *((ULong*)(prev += 4)); /* read b8 b7 b6 b5 */
+                word2 = *((ULong*)(prev + lx));
+                word12 >>= 16; /* 0 0 b4 b3 */
+                word22 >>= 16;
+                word12 = word12 | (word1 << 16); /* b6 b5 b4 b3 */
+                word22 = word22 | (word2 << 16);
+                word3 = word12 & word22;
+                word12 &= mask;
+                word22 &= mask;
+                word3 &= (~mask); /* 0x1010101, check last bit */
+                word12 >>= 1;
+                word12 = word12 + (word22 >> 1);
+                word12 += word3;
+                *((ULong*)(rec += 12)) = word12;
+
+                word12 = *((ULong*)(prev += 4)); /* read b12 b11 b10 b9 */
+                word22 = *((ULong*)(prev + lx));
+                word1 >>= 16; /* 0 0 b8 b7 */
+                word2 >>= 16;
+                word1 = word1 | (word12 << 16); /* b10 b9 b8 b7 */
+                word2 = word2 | (word22 << 16);
+                word3 = word1 & word2;
+                word1 &= mask;
+                word2 &= mask;
+                word3 &= (~mask); /* 0x1010101, check last bit */
+                word1 >>= 1;
+                word1 = word1 + (word2 >> 1);
+                word1 += word3;
+                *((ULong*)(rec += 4)) = word1;
+                prev += offset;
+            }
+
+            return 1;
+        }
+    }
+    else /* tmp == 3 */
+    {
+        prev -= 3; /* word-aligned */
+        if (rnd1 == 1)
+        {
+            for (i = B_SIZE; i > 0; i--)
+            {
+                word12 = *((ULong*)prev); /* read b4 b3 b2 b1 */
+                word22 = *((ULong*)(prev + lx));
+
+                word1 = *((ULong*)(prev += 4)); /* read b8 b7 b6 b5 */
+                word2 = *((ULong*)(prev + lx));
+                word12 >>= 24; /* 0 0 0 b4 */
+                word22 >>= 24;
+                word12 = word12 | (word1 << 8); /* b7 b6 b5 b4 */
+                word22 = word22 | (word2 << 8);
+                word3 = word12 | word22;
+                word12 &= mask;
+                word22 &= mask;
+                word3 &= (~mask); /* 0x1010101, check last bit */
+                word12 >>= 1;
+                word12 = word12 + (word22 >> 1);
+                word12 += word3;
+                *((ULong*)(rec += 12)) = word12;
+
+                word12 = *((ULong*)(prev += 4)); /* read b12 b11 b10 b9 */
+                word22 = *((ULong*)(prev + lx));
+                word1 >>= 24; /* 0 0 0 b8 */
+                word2 >>= 24;
+                word1 = word1 | (word12 << 8); /* b11 b10 b9 b8 */
+                word2 = word2 | (word22 << 8);
+                word3 = word1 | word2;
+                word1 &= mask;
+                word2 &= mask;
+                word3 &= (~mask); /* 0x1010101, check last bit */
+                word1 >>= 1;
+                word1 = word1 + (word2 >> 1);
+                word1 += word3;
+                *((ULong*)(rec += 4)) = word1;
+                prev += offset;
+            }
+            return 1;
+        }
+        else /* rnd1 = 0 */
+        {
+            for (i = B_SIZE; i > 0; i--)
+            {
+                word12 = *((ULong*)prev); /* read b4 b3 b2 b1 */
+                word22 = *((ULong*)(prev + lx));
+
+                word1 = *((ULong*)(prev += 4)); /* read b8 b7 b6 b5 */
+                word2 = *((ULong*)(prev + lx));
+                word12 >>= 24; /* 0 0 0 b4 */
+                word22 >>= 24;
+                word12 = word12 | (word1 << 8); /* b7 b6 b5 b4 */
+                word22 = word22 | (word2 << 8);
+                word3 = word12 & word22;
+                word12 &= mask;
+                word22 &= mask;
+                word3 &= (~mask); /* 0x1010101, check last bit */
+                word12 >>= 1;
+                word12 = word12 + (word22 >> 1);
+                word12 += word3;
+                *((ULong*)(rec += 12)) = word12;
+
+                word12 = *((ULong*)(prev += 4)); /* read b12 b11 b10 b9 */
+                word22 = *((ULong*)(prev + lx));
+                word1 >>= 24; /* 0 0 0 b8 */
+                word2 >>= 24;
+                word1 = word1 | (word12 << 8); /* b11 b10 b9 b8 */
+                word2 = word2 | (word22 << 8);
+                word3 = word1 & word2;
+                word1 &= mask;
+                word2 &= mask;
+                word3 &= (~mask); /* 0x1010101, check last bit */
+                word1 >>= 1;
+                word1 = word1 + (word2 >> 1);
+                word1 += word3;
+                *((ULong*)(rec += 4)) = word1;
+                prev += offset;
+            }
+            return 1;
+        } /* rnd */
+    } /* tmp */
+}
+
+/**********************************************************************************/
+Int GetPredAdvBy1x1(
+    UChar *prev,        /* i */
+    UChar *rec,     /* i */
+    Int lx,     /* i */
+    Int rnd1 /* i */
+)
+{
+    Int i;      /* loop variable */
+    Int offset;
+    ULong  x1, x2, x1m, x2m, y1, y2, y1m, y2m; /* new way */
+    Int tmp;
+    Int rnd2;
+    ULong mask;
+
+    /* initialize offset to adjust pixel counter */
+    /*    the next row; full-pel resolution      */
+    offset = lx - B_SIZE; /* offset for prev */
+
+    rnd2 = rnd1 + 1;
+    rnd2 |= (rnd2 << 8);
+    rnd2 |= (rnd2 << 16);
+
+    mask = 0x3F;
+    mask |= (mask << 8);
+    mask |= (mask << 16); /* 0x3f3f3f3f */
+
+    tmp = (ULong)prev & 3;
+
+    rec -= 4; /* preset */
+
+    if (tmp == 0) /* word-aligned */
+    {
+        for (i = B_SIZE; i > 0; i--)
+        {
+            x1 = *((ULong*)prev); /* load a3 a2 a1 a0 */
+            x2 = *((ULong*)(prev + lx)); /* load b3 b2 b1 b0, another line */
+            y1 = *((ULong*)(prev += 4)); /* a7 a6 a5 a4 */
+            y2 = *((ULong*)(prev + lx)); /* b7 b6 b5 b4 */
+
+            x1m = (x1 >> 2) & mask; /* zero out last 2 bits */
+            x2m = (x2 >> 2) & mask;
+            x1 = x1 ^(x1m << 2);
+            x2 = x2 ^(x2m << 2);
+            x1m += x2m;
+            x1 += x2;
+
+            /* x2m, x2 free */
+            y1m = (y1 >> 2) & mask; /* zero out last 2 bits */
+            y2m = (y2 >> 2) & mask;
+            y1 = y1 ^(y1m << 2);
+            y2 = y2 ^(y2m << 2);
+            y1m += y2m;
+            y1 += y2;
+
+            /* y2m, y2 free */
+            /* x2m, x2 free */
+            x2 = *((ULong*)(prev += 4)); /* a11 a10 a9 a8 */
+            y2 = *((ULong*)(prev + lx)); /* b11 b10 b9 b8 */
+            x2m = (x2 >> 2) & mask;
+            y2m = (y2 >> 2) & mask;
+            x2 = x2 ^(x2m << 2);
+            y2 = y2 ^(y2m << 2);
+            x2m += y2m;
+            x2 += y2;
+            /* y2m, y2 free */
+
+            /* now operate on x1m, x1, y1m, y1, x2m, x2 */
+            /* x1m = a3+b3, a2+b2, a1+b1, a0+b0 */
+            /* y1m = a7+b7, a6+b6, a5+b5, a4+b4 */
+            /* x2m = a11+b11, a10+b10, a9+b9, a8+b8 */
+            /* x1, y1, x2 */
+
+            y2m = x1m >> 8;
+            y2 = x1 >> 8;
+            y2m |= (y1m << 24);  /* a4+b4, a3+b3, a2+b2, a1+b1 */
+            y2 |= (y1 << 24);
+            x1m += y2m;  /* a3+b3+a4+b4, ....., a0+b0+a1+b1 */
+            x1 += y2;
+            x1 += rnd2;
+            x1 &= (mask << 2);
+            x1m += (x1 >> 2);
+            *((ULong*)(rec += 4)) = x1m; /* save x1m */
+
+            y2m = y1m >> 8;
+            y2 = y1 >> 8;
+            y2m |= (x2m << 24); /* a8+b8, a7+b7, a6+b6, a5+b5 */
+            y2 |= (x2 << 24);
+            y1m += y2m;  /* a7+b7+a8+b8, ....., a4+b4+a5+b5 */
+            y1 += y2;
+            y1 += rnd2;
+            y1 &= (mask << 2);
+            y1m += (y1 >> 2);
+            *((ULong*)(rec += 4)) = y1m; /* save y1m */
+
+            rec += 8;
+            prev += offset;
+        }
+
+        return 1;
+    }
+    else if (tmp == 1)
+    {
+        prev--; /* to word-aligned */
+        for (i = B_SIZE; i > 0; i--)
+        {
+            x1 = *((ULong*)prev); /* load a3 a2 a1 a0 */
+            x2 = *((ULong*)(prev + lx)); /* load b3 b2 b1 b0, another line */
+            y1 = *((ULong*)(prev += 4)); /* a7 a6 a5 a4 */
+            y2 = *((ULong*)(prev + lx)); /* b7 b6 b5 b4 */
+
+            x1m = (x1 >> 2) & mask; /* zero out last 2 bits */
+            x2m = (x2 >> 2) & mask;
+            x1 = x1 ^(x1m << 2);
+            x2 = x2 ^(x2m << 2);
+            x1m += x2m;
+            x1 += x2;
+
+            /* x2m, x2 free */
+            y1m = (y1 >> 2) & mask; /* zero out last 2 bits */
+            y2m = (y2 >> 2) & mask;
+            y1 = y1 ^(y1m << 2);
+            y2 = y2 ^(y2m << 2);
+            y1m += y2m;
+            y1 += y2;
+
+            /* y2m, y2 free */
+            /* x2m, x2 free */
+            x2 = *((ULong*)(prev += 4)); /* a11 a10 a9 a8 */
+            y2 = *((ULong*)(prev + lx)); /* b11 b10 b9 b8 */
+            x2m = (x2 >> 2) & mask;
+            y2m = (y2 >> 2) & mask;
+            x2 = x2 ^(x2m << 2);
+            y2 = y2 ^(y2m << 2);
+            x2m += y2m;
+            x2 += y2;
+            /* y2m, y2 free */
+
+            /* now operate on x1m, x1, y1m, y1, x2m, x2 */
+            /* x1m = a3+b3, a2+b2, a1+b1, a0+b0 */
+            /* y1m = a7+b7, a6+b6, a5+b5, a4+b4 */
+            /* x2m = a11+b11, a10+b10, a9+b9, a8+b8 */
+            /* x1, y1, x2 */
+
+            x1m >>= 8 ;
+            x1 >>= 8;
+            x1m |= (y1m << 24);  /* a4+b4, a3+b3, a2+b2, a1+b1 */
+            x1 |= (y1 << 24);
+            y2m = (y1m << 16);
+            y2 = (y1 << 16);
+            y2m |= (x1m >> 8); /* a5+b5, a4+b4, a3+b3, a2+b2 */
+            y2 |= (x1 >> 8);
+            x1 += rnd2;
+            x1m += y2m;  /* a4+b4+a5+b5, ....., a1+b1+a2+b2 */
+            x1 += y2;
+            x1 &= (mask << 2);
+            x1m += (x1 >> 2);
+            *((ULong*)(rec += 4)) = x1m; /* save x1m */
+
+            y1m >>= 8;
+            y1 >>= 8;
+            y1m |= (x2m << 24); /* a8+b8, a7+b7, a6+b6, a5+b5 */
+            y1 |= (x2 << 24);
+            y2m = (x2m << 16);
+            y2 = (x2 << 16);
+            y2m |= (y1m >> 8); /*  a9+b9, a8+b8, a7+b7, a6+b6,*/
+            y2 |= (y1 >> 8);
+            y1 += rnd2;
+            y1m += y2m;  /* a8+b8+a9+b9, ....., a5+b5+a6+b6 */
+            y1 += y2;
+            y1 &= (mask << 2);
+            y1m += (y1 >> 2);
+            *((ULong*)(rec += 4)) = y1m; /* save y1m */
+
+            rec += 8;
+            prev += offset;
+        }
+        return 1;
+    }
+    else if (tmp == 2)
+    {
+        prev -= 2; /* to word-aligned */
+        for (i = B_SIZE; i > 0; i--)
+        {
+            x1 = *((ULong*)prev); /* load a3 a2 a1 a0 */
+            x2 = *((ULong*)(prev + lx)); /* load b3 b2 b1 b0, another line */
+            y1 = *((ULong*)(prev += 4)); /* a7 a6 a5 a4 */
+            y2 = *((ULong*)(prev + lx)); /* b7 b6 b5 b4 */
+
+            x1m = (x1 >> 2) & mask; /* zero out last 2 bits */
+            x2m = (x2 >> 2) & mask;
+            x1 = x1 ^(x1m << 2);
+            x2 = x2 ^(x2m << 2);
+            x1m += x2m;
+            x1 += x2;
+
+            /* x2m, x2 free */
+            y1m = (y1 >> 2) & mask; /* zero out last 2 bits */
+            y2m = (y2 >> 2) & mask;
+            y1 = y1 ^(y1m << 2);
+            y2 = y2 ^(y2m << 2);
+            y1m += y2m;
+            y1 += y2;
+
+            /* y2m, y2 free */
+            /* x2m, x2 free */
+            x2 = *((ULong*)(prev += 4)); /* a11 a10 a9 a8 */
+            y2 = *((ULong*)(prev + lx)); /* b11 b10 b9 b8 */
+            x2m = (x2 >> 2) & mask;
+            y2m = (y2 >> 2) & mask;
+            x2 = x2 ^(x2m << 2);
+            y2 = y2 ^(y2m << 2);
+            x2m += y2m;
+            x2 += y2;
+            /* y2m, y2 free */
+
+            /* now operate on x1m, x1, y1m, y1, x2m, x2 */
+            /* x1m = a3+b3, a2+b2, a1+b1, a0+b0 */
+            /* y1m = a7+b7, a6+b6, a5+b5, a4+b4 */
+            /* x2m = a11+b11, a10+b10, a9+b9, a8+b8 */
+            /* x1, y1, x2 */
+
+            x1m >>= 16 ;
+            x1 >>= 16;
+            x1m |= (y1m << 16);  /* a5+b5, a4+b4, a3+b3, a2+b2 */
+            x1 |= (y1 << 16);
+            y2m = (y1m << 8);
+            y2 = (y1 << 8);
+            y2m |= (x1m >> 8); /* a6+b6, a5+b5, a4+b4, a3+b3 */
+            y2 |= (x1 >> 8);
+            x1 += rnd2;
+            x1m += y2m;  /* a5+b5+a6+b6, ....., a2+b2+a3+b3 */
+            x1 += y2;
+            x1 &= (mask << 2);
+            x1m += (x1 >> 2);
+            *((ULong*)(rec += 4)) = x1m; /* save x1m */
+
+            y1m >>= 16;
+            y1 >>= 16;
+            y1m |= (x2m << 16); /* a9+b9, a8+b8, a7+b7, a6+b6 */
+            y1 |= (x2 << 16);
+            y2m = (x2m << 8);
+            y2 = (x2 << 8);
+            y2m |= (y1m >> 8); /*  a10+b10, a9+b9, a8+b8, a7+b7,*/
+            y2 |= (y1 >> 8);
+            y1 += rnd2;
+            y1m += y2m;  /* a9+b9+a10+b10, ....., a6+b6+a7+b7 */
+            y1 += y2;
+            y1 &= (mask << 2);
+            y1m += (y1 >> 2);
+            *((ULong*)(rec += 4)) = y1m; /* save y1m */
+
+            rec += 8;
+            prev += offset;
+        }
+        return 1;
+    }
+    else /* tmp == 3 */
+    {
+        prev -= 3; /* to word-aligned */
+        for (i = B_SIZE; i > 0; i--)
+        {
+            x1 = *((ULong*)prev); /* load a3 a2 a1 a0 */
+            x2 = *((ULong*)(prev + lx)); /* load b3 b2 b1 b0, another line */
+            y1 = *((ULong*)(prev += 4)); /* a7 a6 a5 a4 */
+            y2 = *((ULong*)(prev + lx)); /* b7 b6 b5 b4 */
+
+            x1m = (x1 >> 2) & mask; /* zero out last 2 bits */
+            x2m = (x2 >> 2) & mask;
+            x1 = x1 ^(x1m << 2);
+            x2 = x2 ^(x2m << 2);
+            x1m += x2m;
+            x1 += x2;
+
+            /* x2m, x2 free */
+            y1m = (y1 >> 2) & mask; /* zero out last 2 bits */
+            y2m = (y2 >> 2) & mask;
+            y1 = y1 ^(y1m << 2);
+            y2 = y2 ^(y2m << 2);
+            y1m += y2m;
+            y1 += y2;
+
+            /* y2m, y2 free */
+            /* x2m, x2 free */
+            x2 = *((ULong*)(prev += 4)); /* a11 a10 a9 a8 */
+            y2 = *((ULong*)(prev + lx)); /* b11 b10 b9 b8 */
+            x2m = (x2 >> 2) & mask;
+            y2m = (y2 >> 2) & mask;
+            x2 = x2 ^(x2m << 2);
+            y2 = y2 ^(y2m << 2);
+            x2m += y2m;
+            x2 += y2;
+            /* y2m, y2 free */
+
+            /* now operate on x1m, x1, y1m, y1, x2m, x2 */
+            /* x1m = a3+b3, a2+b2, a1+b1, a0+b0 */
+            /* y1m = a7+b7, a6+b6, a5+b5, a4+b4 */
+            /* x2m = a11+b11, a10+b10, a9+b9, a8+b8 */
+            /* x1, y1, x2 */
+
+            x1m >>= 24 ;
+            x1 >>= 24;
+            x1m |= (y1m << 8);  /* a6+b6, a5+b5, a4+b4, a3+b3 */
+            x1 |= (y1 << 8);
+
+            x1m += y1m;  /* a6+b6+a7+b7, ....., a3+b3+a4+b4 */
+            x1 += y1;
+            x1 += rnd2;
+            x1 &= (mask << 2);
+            x1m += (x1 >> 2);
+            *((ULong*)(rec += 4)) = x1m; /* save x1m */
+
+            y1m >>= 24;
+            y1 >>= 24;
+            y1m |= (x2m << 8); /* a10+b10, a9+b9, a8+b8, a7+b7 */
+            y1 |= (x2 << 8);
+            y1m += x2m;  /* a10+b10+a11+b11, ....., a7+b7+a8+b8 */
+            y1 += x2;
+            y1 += rnd2;
+            y1 &= (mask << 2);
+            y1m += (y1 >> 2);
+            *((ULong*)(rec += 4)) = y1m; /* save y1m */
+
+            rec += 8;
+            prev += offset;
+        }
+        return 1;
+    }
+}
+
+
+/*=============================================================================
+    Function:   EncGetPredOutside
+    Date:       04/17/2001
+    Purpose:    - modified from GetPredOutside in the decoder.
+    Modified:    09/24/05
+                use the existing non-initialized padded region
+=============================================================================*/
+// not really needed since padding is included
+#define PAD_CORNER  { temp = *src; \
+                     temp |= (temp<<8); \
+                     temp |= (temp<<16); \
+                     *((ULong*)dst) = temp; \
+                     *((ULong*)(dst+4)) = temp; \
+                     *((ULong*)(dst+=lx)) = temp; \
+                     *((ULong*)(dst+4)) = temp; \
+                     *((ULong*)(dst+=lx)) = temp; \
+                     *((ULong*)(dst+4)) = temp; \
+                     *((ULong*)(dst+=lx)) = temp; \
+                     *((ULong*)(dst+4)) = temp; \
+                     *((ULong*)(dst+=lx)) = temp; \
+                     *((ULong*)(dst+4)) = temp; \
+                     *((ULong*)(dst+=lx)) = temp; \
+                     *((ULong*)(dst+4)) = temp; \
+                     *((ULong*)(dst+=lx)) = temp; \
+                     *((ULong*)(dst+4)) = temp; \
+                     *((ULong*)(dst+=lx)) = temp; \
+                     *((ULong*)(dst+4)) = temp; }
+
+#define PAD_ROW     { temp = *((ULong*)src); \
+                      temp2 = *((ULong*)(src+4)); \
+                      *((ULong*)dst) = temp; \
+                      *((ULong*)(dst+4)) = temp2; \
+                      *((ULong*)(dst+=lx)) = temp; \
+                      *((ULong*)(dst+4)) = temp2; \
+                      *((ULong*)(dst+=lx)) = temp; \
+                      *((ULong*)(dst+4)) = temp2; \
+                      *((ULong*)(dst+=lx)) = temp; \
+                      *((ULong*)(dst+4)) = temp2; \
+                      *((ULong*)(dst+=lx)) = temp; \
+                      *((ULong*)(dst+4)) = temp2; \
+                      *((ULong*)(dst+=lx)) = temp; \
+                      *((ULong*)(dst+4)) = temp2; \
+                      *((ULong*)(dst+=lx)) = temp; \
+                      *((ULong*)(dst+4)) = temp2; \
+                      *((ULong*)(dst+=lx)) = temp; \
+                      *((ULong*)(dst+4)) = temp2; }
+
+#define PAD_COL     { temp = *src;   temp |= (temp<<8);  temp |= (temp<<16); \
+                      *((ULong*)dst) = temp; \
+                     *((ULong*)(dst+4)) = temp; \
+                      temp = *(src+=lx);     temp |= (temp<<8);  temp |= (temp<<16); \
+                      *((ULong*)(dst+=lx)) = temp; \
+                     *((ULong*)(dst+4)) = temp; \
+                      temp = *(src+=lx);     temp |= (temp<<8);  temp |= (temp<<16); \
+                      *((ULong*)(dst+=lx)) = temp; \
+                     *((ULong*)(dst+4)) = temp; \
+                      temp = *(src+=lx);     temp |= (temp<<8);  temp |= (temp<<16); \
+                      *((ULong*)(dst+=lx)) = temp; \
+                     *((ULong*)(dst+4)) = temp; \
+                      temp = *(src+=lx);     temp |= (temp<<8);  temp |= (temp<<16); \
+                      *((ULong*)(dst+=lx)) = temp; \
+                     *((ULong*)(dst+4)) = temp; \
+                      temp = *(src+=lx);     temp |= (temp<<8);  temp |= (temp<<16); \
+                      *((ULong*)(dst+=lx)) = temp; \
+                     *((ULong*)(dst+4)) = temp; \
+                      temp = *(src+=lx);     temp |= (temp<<8);  temp |= (temp<<16); \
+                      *((ULong*)(dst+=lx)) = temp; \
+                     *((ULong*)(dst+4)) = temp; \
+                      temp = *(src+=lx);     temp |= (temp<<8);  temp |= (temp<<16); \
+                      *((ULong*)(dst+=lx)) = temp; \
+                      *((ULong*)(dst+4)) = temp; }
+
+
+Int EncGetPredOutside(Int xpos, Int ypos, UChar *c_prev, UChar *rec,
+                      Int width, Int height, Int rnd1)
+{
+    Int lx;
+    UChar *src, *dst;
+    ULong temp, temp2;
+    Int xoffset;
+
+    lx = width + 16; /* only works for chroma */
+
+    if (xpos < 0)
+    {
+        if (ypos < 0) /* pad top-left */
+        {
+            /* pad corner */
+            src = c_prev;
+            dst = c_prev - (lx << 3) - 8;
+            PAD_CORNER
+
+            /* pad top */
+            dst = c_prev - (lx << 3);
+            PAD_ROW
+
+            /* pad left */
+            dst = c_prev - 8;
+            PAD_COL
+
+            GetPredAdvBTable[ypos&1][xpos&1](c_prev + (xpos >> 1) + ((ypos >> 1)*lx),
+                                             rec, lx, rnd1);
+
+            return 1;
+        }
+        else if ((ypos >> 1) < (height - 8)) /* pad left of frame */
+        {
+            /* pad left */
+            src = c_prev + (ypos >> 1) * lx;
+            dst = src - 8;
+            PAD_COL
+            /* pad extra row */
+            temp = *(src += lx);
+            temp |= (temp << 8);
+            temp |= (temp << 16);
+            *((ULong*)(dst += lx)) = temp;
+            *((ULong*)(dst + 4)) = temp;
+
+            GetPredAdvBTable[ypos&1][xpos&1](c_prev + (xpos >> 1) + ((ypos >> 1)*lx),
+                                             rec, lx, rnd1);
+
+            return 1;
+        }
+        else /* pad bottom-left */
+        {
+            /* pad corner */
+            src = c_prev + (height - 1) * lx;
+            dst = src + lx - 8;
+            PAD_CORNER
+
+            /* pad bottom */
+            dst = src + lx;
+            PAD_ROW
+
+            /* pad left */
+            src -= (lx << 3);
+            src += lx;
+            dst = src - 8;
+            PAD_COL
+
+            GetPredAdvBTable[ypos&1][xpos&1](c_prev + (xpos >> 1) + ((ypos >> 1)*lx),
+                                             rec, lx, rnd1);
+
+            return 1;
+        }
+    }
+    else if ((xpos >> 1) < (width - 8))
+    {
+        if (ypos < 0) /* pad top of frame */
+        {
+            xoffset = (xpos >> 1) & 0x3;
+            src = c_prev + (xpos >> 1) - xoffset;
+            dst = src - (lx << 3);
+            PAD_ROW
+            if (xoffset || (xpos&1))
+            {
+                temp = *((ULong*)(src + 8));
+                dst = src - (lx << 3) + 8;
+                *((ULong*)dst) = temp;
+                *((ULong*)(dst += lx)) = temp;
+                *((ULong*)(dst += lx)) = temp;
+                *((ULong*)(dst += lx)) = temp;
+                *((ULong*)(dst += lx)) = temp;
+                *((ULong*)(dst += lx)) = temp;
+                *((ULong*)(dst += lx)) = temp;
+                *((ULong*)(dst += lx)) = temp;
+            }
+
+            GetPredAdvBTable[ypos&1][xpos&1](c_prev + (xpos >> 1) + ((ypos >> 1)*lx),
+                                             rec, lx, rnd1);
+
+            return 1;
+        }
+        else /* pad bottom of frame */
+        {
+            xoffset = (xpos >> 1) & 0x3;
+            src = c_prev + (xpos >> 1) - xoffset + (height - 1) * lx;
+            dst = src + lx;
+            PAD_ROW
+            if (xoffset || (xpos&1))
+            {
+                temp = *((ULong*)(src + 8));
+                dst = src + lx + 8;
+                *((ULong*)dst) = temp;
+                *((ULong*)(dst += lx)) = temp;
+                *((ULong*)(dst += lx)) = temp;
+                *((ULong*)(dst += lx)) = temp;
+                *((ULong*)(dst += lx)) = temp;
+                *((ULong*)(dst += lx)) = temp;
+                *((ULong*)(dst += lx)) = temp;
+                *((ULong*)(dst += lx)) = temp;
+            }
+
+            GetPredAdvBTable[ypos&1][xpos&1](c_prev + (xpos >> 1) + ((ypos >> 1)*lx),
+                                             rec, lx, rnd1);
+
+            return 1;
+        }
+    }
+    else
+    {
+        if (ypos < 0) /* pad top-right */
+        {
+            /* pad corner */
+            src = c_prev + width - 1;
+            dst = src - (lx << 3) + 1;
+            PAD_CORNER
+
+            /* pad top */
+            src -= 7;
+            dst = src - (lx << 3);
+            PAD_ROW
+
+            /* pad left */
+            src += 7;
+            dst = src + 1;
+            PAD_COL
+
+            GetPredAdvBTable[ypos&1][xpos&1](c_prev + (xpos >> 1) + ((ypos >> 1)*lx),
+                                             rec, lx, rnd1);
+
+            return 1;
+        }
+        else if ((ypos >> 1) < (height - B_SIZE)) /* pad right of frame */
+        {
+            /* pad left */
+            src = c_prev + (ypos >> 1) * lx + width - 1;
+            dst = src + 1;
+            PAD_COL
+            /* pad extra row */
+            temp = *(src += lx);
+            temp |= (temp << 8);
+            temp |= (temp << 16);
+            *((ULong*)(dst += lx)) = temp;
+            *((ULong*)(dst + 4)) = temp;
+
+            GetPredAdvBTable[ypos&1][xpos&1](c_prev + (xpos >> 1) + ((ypos >> 1)*lx),
+                                             rec, lx, rnd1);
+
+            return 1;
+        }
+        else /* pad bottom-right */
+        {
+            /* pad left */
+            src = c_prev + (height - 8) * lx + width - 1;
+            dst = src + 1;
+            PAD_COL
+
+            /* pad corner */
+            dst = src + lx + 1;
+            PAD_CORNER
+
+            /* pad bottom */
+            src -= 7;
+            dst = src + lx;
+            PAD_ROW
+
+            GetPredAdvBTable[ypos&1][xpos&1](c_prev + (xpos >> 1) + ((ypos >> 1)*lx),
+                                             rec, lx, rnd1);
+
+            return 1;
+        }
+    }
+}
+
+/* ====================================================================== /
+    Function : Copy_MB_from_Vop()
+    Date     : 04/17/2001
+ ====================================================================== */
+
+void Copy_MB_from_Vop(UChar *comp, Int yChan[][NCOEFF_BLOCK], Int pitch)
+{
+    Int row, col, i;
+    Int *src1, *src2;
+    Int offset = pitch - MB_SIZE;
+    ULong temp;
+
+    for (i = 0; i < 4; i += 2)
+    {
+        src1 = yChan[i];
+        src2 = yChan[i+1];
+
+        row = B_SIZE;
+        while (row--)
+        {
+            col = B_SIZE;
+            while (col)
+            {
+                temp = *((ULong*)comp);
+                *src1++ = (Int)(temp & 0xFF);
+                *src1++ = (Int)((temp >> 8) & 0xFF);
+                *src1++ = (Int)((temp >> 16) & 0xFF);
+                *src1++ = (Int)((temp >> 24) & 0xFF);
+                comp += 4;
+                col -= 4;
+            }
+            col = B_SIZE;
+            while (col)
+            {
+                temp = *((ULong*)comp);
+                *src2++ = (Int)(temp & 0xFF);
+                *src2++ = (Int)((temp >> 8) & 0xFF);
+                *src2++ = (Int)((temp >> 16) & 0xFF);
+                *src2++ = (Int)((temp >> 24) & 0xFF);
+                comp += 4;
+                col -= 4;
+            }
+            comp += offset;
+        }
+    }
+    return ;
+}
+
+/* ====================================================================== /
+    Function : Copy_B_from_Vop()
+    Date     : 04/17/2001
+/ ====================================================================== */
+
+void Copy_B_from_Vop(UChar *comp, Int cChan[], Int pitch)
+{
+    Int row, col;
+    Int offset = pitch - B_SIZE;
+    ULong temp;
+
+    row = B_SIZE;
+    while (row--)
+    {
+        col = B_SIZE;
+        while (col)
+        {
+            temp = *((ULong*)comp);
+            *cChan++ = (Int)(temp & 0xFF);
+            *cChan++ = (Int)((temp >> 8) & 0xFF);
+            *cChan++ = (Int)((temp >> 16) & 0xFF);
+            *cChan++ = (Int)((temp >> 24) & 0xFF);
+            comp += 4;
+            col -= 4;
+        }
+        comp += offset;
+    }
+}
+
+/* ====================================================================== /
+    Function : Copy_MB_into_Vop()
+    Date     : 04/17/2001
+    History  : From decoder
+/ ====================================================================== */
+
+void Copy_MB_into_Vop(UChar *comp, Int yChan[][NCOEFF_BLOCK], Int pitch)
+{
+    Int row, col, i;
+    Int *src1, *src2;
+    Int offset = pitch - MB_SIZE;
+    UChar mask = 0xFF;
+    Int tmp;
+    ULong temp;
+
+    for (i = 0; i < 4; i += 2)
+    {
+        src1 = yChan[i];
+        src2 = yChan[i+1];
+
+        row = B_SIZE;
+        while (row--)
+        {
+            col = B_SIZE;
+            while (col)
+            {
+                tmp = (*src1++);
+                if ((UInt)tmp > mask) tmp = mask & (~(tmp >> 31));
+                temp = tmp << 24;
+                tmp = (*src1++);
+                if ((UInt)tmp > mask) tmp = mask & (~(tmp >> 31));
+                temp |= (tmp << 16);
+                tmp = (*src1++);
+                if ((UInt)tmp > mask) tmp = mask & (~(tmp >> 31));
+                temp |= (tmp << 8);
+                tmp = (*src1++);
+                if ((UInt)tmp > mask) tmp = mask & (~(tmp >> 31));
+                temp |= tmp;
+                *((ULong*)comp) = temp;
+                comp += 4;
+                col -= 4;
+            }
+            col = B_SIZE;
+            while (col)
+            {
+                tmp = (*src2++);
+                if ((UInt)tmp > mask) tmp = mask & (~(tmp >> 31));
+                temp = tmp << 24;
+                tmp = (*src2++);
+                if ((UInt)tmp > mask) tmp = mask & (~(tmp >> 31));
+                temp |= (tmp << 16);
+                tmp = (*src2++);
+                if ((UInt)tmp > mask) tmp = mask & (~(tmp >> 31));
+                temp |= (tmp << 8);
+                tmp = (*src2++);
+                if ((UInt)tmp > mask) tmp = mask & (~(tmp >> 31));
+                temp |= tmp;
+                *((ULong*)comp) = temp;
+                comp += 4;
+                col -= 4;
+            }
+            comp += offset;
+        }
+    }
+    return ;
+}
+
+
+/* ====================================================================== /
+    Function : Copy_B_into_Vop()
+    Date     : 04/17/2001
+    History  : From decoder
+/ ====================================================================== */
+
+void Copy_B_into_Vop(UChar *comp, Int cChan[], Int pitch)
+{
+    Int row, col;
+    Int offset = pitch - B_SIZE;
+    Int tmp;
+    UChar mask = 0xFF;
+    ULong temp;
+
+    row = B_SIZE;
+    while (row--)
+    {
+        col = B_SIZE;
+        while (col)
+        {
+            tmp = (*cChan++);
+            if ((UInt)tmp > mask) tmp = mask & (~(tmp >> 31));
+            temp = tmp << 24;
+            tmp = (*cChan++);
+            if ((UInt)tmp > mask) tmp = mask & (~(tmp >> 31));
+            temp |= (tmp << 16);
+            tmp = (*cChan++);
+            if ((UInt)tmp > mask) tmp = mask & (~(tmp >> 31));
+            temp |= (tmp << 8);
+            tmp = (*cChan++);
+            if ((UInt)tmp > mask) tmp = mask & (~(tmp >> 31));
+            temp |= tmp;
+            *((ULong*)comp) = temp;
+            comp += 4;
+            col -= 4;
+        }
+        comp += offset;
+    }
+}
+
+/* ======================================================================== */
+/*  Function : get_MB( )                                                    */
+/*  Date     : 10/03/2000                                                   */
+/*  Purpose  : Copy 4 Y to reference frame                                  */
+/*  In/out   :                                                              */
+/*  Return   :                                                              */
+/*  Modified :                                                              */
+/* ======================================================================== */
+void get_MB(UChar *c_prev, UChar *c_prev_u  , UChar *c_prev_v,
+            Short mb[6][64], Int lx, Int lx_uv)
+
+{
+    Int i, j, count = 0, count1 = 0;
+    Int k1 = lx - MB_SIZE, k2 = lx_uv - B_SIZE;
+
+    for (i = 0; i < B_SIZE; i++)
+    {
+        for (j = 0; j < B_SIZE; j++)
+        {
+            mb[0][count] = (Int)(*c_prev++);
+            mb[4][count] = (Int)(*c_prev_u++);
+            mb[5][count++] = (Int)(*c_prev_v++);
+        }
+
+        for (j = 0; j < B_SIZE; j++)
+            mb[1][count1++] = (Int)(*c_prev++);
+
+        c_prev += k1;
+        c_prev_u += k2;
+        c_prev_v += k2;
+
+
+    }
+
+    count = count1 = 0;
+    for (i = 0; i < B_SIZE; i++)
+    {
+        for (j = 0; j < B_SIZE; j++)
+            mb[2][count++] = (Int)(*c_prev++);
+
+        for (j = 0; j < B_SIZE; j++)
+            mb[3][count1++] = (Int)(*c_prev++);
+
+        c_prev += k1;
+    }
+}
+
+void PutSkippedBlock(UChar *rec, UChar *prev, Int lx)
+{
+    UChar *end;
+    Int offset = (lx - 8) >> 2;
+    Int *src, *dst;
+
+    dst = (Int*)rec;
+    src = (Int*)prev;
+
+    end = prev + (lx << 3);
+
+    do
+    {
+        *dst++ = *src++;
+        *dst++ = *src++;
+        dst += offset;
+        src += offset;
+    }
+    while ((UInt)src < (UInt)end);
+
+    return ;
+}
diff --git a/media/libstagefright/codecs/m4v_h263/enc/src/motion_est.cpp b/media/libstagefright/codecs/m4v_h263/enc/src/motion_est.cpp
new file mode 100644
index 0000000..997b78d
--- /dev/null
+++ b/media/libstagefright/codecs/m4v_h263/enc/src/motion_est.cpp
@@ -0,0 +1,1741 @@
+/* ------------------------------------------------------------------
+ * Copyright (C) 1998-2009 PacketVideo
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
+ * express or implied.
+ * See the License for the specific language governing permissions
+ * and limitations under the License.
+ * -------------------------------------------------------------------
+ */
+#include "mp4def.h"
+#include "mp4enc_lib.h"
+#include "mp4lib_int.h"
+#include "m4venc_oscl.h"
+
+//#define PRINT_MV
+#define MIN_GOP 1   /* minimum size of GOP,  1/23/01, need to be tested */
+
+#define CANDIDATE_DISTANCE  0 /* distance candidate from one another to consider as a distinct one */
+/* shouldn't be more than 3 */
+
+#define ZERO_MV_PREF    0 /* 0: bias (0,0)MV before full-pel search, lowest complexity*/
+/* 1: bias (0,0)MV after full-pel search, before half-pel, highest comp */
+/* 2: bias (0,0)MV after half-pel, high comp, better PSNR */
+
+#define RASTER_REFRESH  /* instead of random INTRA refresh, do raster scan,  2/26/01 */
+
+#ifdef RASTER_REFRESH
+#define TARGET_REFRESH_PER_REGION 4 /* , no. MB per frame to be INTRA refreshed */
+#else
+#define TARGET_REFRESH_PER_REGION 1 /* , no. MB per region to be INTRA refreshed */
+#endif
+
+#define ALL_CAND_EQUAL  10  /*  any number greater than 5 will work */
+
+#define NumPixelMB  256     /*  number of pixels used in SAD calculation */
+
+#define DEF_8X8_WIN 3   /* search region for 8x8 MVs around the 16x16 MV */
+#define MB_Nb  256
+
+#define PREF_NULL_VEC 129   /* for zero vector bias */
+#define PREF_16_VEC 129     /* 1MV bias versus 4MVs*/
+#define PREF_INTRA  512     /* bias for INTRA coding */
+
+const static Int tab_exclude[9][9] =  // [last_loc][curr_loc]
+{
+    {0, 0, 0, 0, 0, 0, 0, 0, 0},
+    {0, 0, 0, 0, 1, 1, 1, 0, 0},
+    {0, 0, 0, 0, 1, 1, 1, 1, 1},
+    {0, 0, 0, 0, 0, 0, 1, 1, 1},
+    {0, 1, 1, 0, 0, 0, 1, 1, 1},
+    {0, 1, 1, 0, 0, 0, 0, 0, 1},
+    {0, 1, 1, 1, 1, 0, 0, 0, 1},
+    {0, 0, 1, 1, 1, 0, 0, 0, 0},
+    {0, 0, 1, 1, 1, 1, 1, 0, 0}
+}; //to decide whether to continue or compute
+
+const static Int refine_next[8][2] =    /* [curr_k][increment] */
+{
+    {0, 0}, {2, 0}, {1, 1}, {0, 2}, { -1, 1}, { -2, 0}, { -1, -1}, {0, -2}
+};
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
+    void MBMotionSearch(VideoEncData *video, UChar *cur, UChar *best_cand[],
+    Int i0, Int j0, Int type_pred, Int fullsearch, Int *hp_guess);
+
+    Int  fullsearch(VideoEncData *video, Vol *currVol, UChar *ref, UChar *cur,
+                    Int *imin, Int *jmin, Int ilow, Int ihigh, Int jlow, Int jhigh);
+    Int fullsearchBlk(VideoEncData *video, Vol *currVol, UChar *cent, UChar *cur,
+                      Int *imin, Int *jmin, Int ilow, Int ihigh, Int jlow, Int jhigh, Int range);
+    void CandidateSelection(Int *mvx, Int *mvy, Int *num_can, Int imb, Int jmb,
+                            VideoEncData *video, Int type_pred);
+    void RasterIntraUpdate(UChar *intraArray, UChar *Mode, Int totalMB, Int numRefresh);
+    void ResetIntraUpdate(UChar *intraArray, Int totalMB);
+    void ResetIntraUpdateRegion(UChar *intraArray, Int start_i, Int rwidth,
+                                Int start_j, Int rheight, Int mbwidth, Int mbheight);
+
+    void MoveNeighborSAD(Int dn[], Int new_loc);
+    Int FindMin(Int dn[]);
+    void PrepareCurMB(VideoEncData *video, UChar *cur);
+
+#ifdef __cplusplus
+}
+#endif
+
+/***************************************/
+/*  2/28/01, for HYPOTHESIS TESTING */
+#ifdef HTFM     /* defined in mp4def.h */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+    void CalcThreshold(double pf, double exp_lamda[], Int nrmlz_th[]);
+    void    HTFMPrepareCurMB(VideoEncData *video, HTFM_Stat *htfm_stat, UChar *cur);
+#ifdef __cplusplus
+}
+#endif
+
+
+#define HTFM_Pf  0.25   /* 3/2/1, probability of false alarm, can be varied from 0 to 0.5 */
+/***************************************/
+#endif
+
+#ifdef _SAD_STAT
+ULong num_MB = 0;
+ULong num_HP_MB = 0;
+ULong num_Blk = 0;
+ULong num_HP_Blk = 0;
+ULong num_cand = 0;
+ULong num_better_hp = 0;
+ULong i_dist_from_guess = 0;
+ULong j_dist_from_guess = 0;
+ULong num_hp_not_zero = 0;
+#endif
+
+
+
+/*==================================================================
+    Function:   MotionEstimation
+    Date:       10/3/2000
+    Purpose:    Go through all macroblock for motion search and
+                determine scene change detection.
+====================================================================*/
+
+void MotionEstimation(VideoEncData *video)
+{
+    UChar use_4mv = video->encParams->MV8x8_Enabled;
+    Vol *currVol = video->vol[video->currLayer];
+    Vop *currVop = video->currVop;
+    VideoEncFrameIO *currFrame = video->input;
+    Int i, j, comp;
+    Int mbwidth = currVol->nMBPerRow;
+    Int mbheight = currVol->nMBPerCol;
+    Int totalMB = currVol->nTotalMB;
+    Int width = currFrame->pitch;
+    UChar *mode_mb, *Mode = video->headerInfo.Mode;
+    MOT *mot_mb, **mot = video->mot;
+    UChar *intraArray = video->intraArray;
+    Int FS_en = video->encParams->FullSearch_Enabled;
+    void (*ComputeMBSum)(UChar *, Int, MOT *) = video->functionPointer->ComputeMBSum;
+    void (*ChooseMode)(UChar*, UChar*, Int, Int) = video->functionPointer->ChooseMode;
+
+    Int numIntra, start_i, numLoop, incr_i;
+    Int mbnum, offset;
+    UChar *cur, *best_cand[5];
+    Int sad8 = 0, sad16 = 0;
+    Int totalSAD = 0;   /* average SAD for rate control */
+    Int skip_halfpel_4mv;
+    Int f_code_p, f_code_n, max_mag = 0, min_mag = 0;
+    Int type_pred;
+    Int xh[5] = {0, 0, 0, 0, 0};
+    Int yh[5] = {0, 0, 0, 0, 0}; /* half-pel */
+    UChar hp_mem4MV[17*17*4];
+
+#ifdef HTFM
+    /***** HYPOTHESIS TESTING ********/  /* 2/28/01 */
+    Int collect = 0;
+    HTFM_Stat htfm_stat;
+    double newvar[16];
+    double exp_lamda[15];
+    /*********************************/
+#endif
+    Int hp_guess = 0;
+#ifdef PRINT_MV
+    FILE *fp_debug;
+#endif
+
+//  FILE *fstat;
+//  static int frame_num = 0;
+
+    offset = 0;
+
+    if (video->currVop->predictionType == I_VOP)
+    {   /* compute the SAV */
+        mbnum = 0;
+        cur = currFrame->yChan;
+
+        for (j = 0; j < mbheight; j++)
+        {
+            for (i = 0; i < mbwidth; i++)
+            {
+                video->mbnum = mbnum;
+                mot_mb = mot[mbnum];
+
+                (*ComputeMBSum)(cur + (i << 4), width, mot_mb);
+
+                totalSAD += mot_mb[0].sad;
+
+                mbnum++;
+            }
+            cur += (width << 4);
+        }
+
+        video->sumMAD = (float)totalSAD / (float)NumPixelMB;
+
+        ResetIntraUpdate(intraArray, totalMB);
+
+        return  ;
+    }
+
+    /* 09/20/05 */
+    if (video->prevBaseVop->padded == 0 && !video->encParams->H263_Enabled)
+    {
+        PaddingEdge(video->prevBaseVop);
+        video->prevBaseVop->padded = 1;
+    }
+
+    /* Random INTRA update */
+    /*  suggest to do it in CodeMB */
+    /*  2/21/2001 */
+    //if(video->encParams->RC_Type == CBR_1 || video->encParams->RC_Type == CBR_2)
+    if (video->currLayer == 0 && video->encParams->Refresh)
+    {
+        RasterIntraUpdate(intraArray, Mode, totalMB, video->encParams->Refresh);
+    }
+
+    video->sad_extra_info = NULL;
+
+#ifdef HTFM
+    /***** HYPOTHESIS TESTING ********/  /* 2/28/01 */
+    InitHTFM(video, &htfm_stat, newvar, &collect);
+    /*********************************/
+#endif
+
+    if ((video->encParams->SceneChange_Det == 1) /*&& video->currLayer==0 */
+            && ((video->encParams->LayerFrameRate[0] < 5.0) || (video->numVopsInGOP > MIN_GOP)))
+        /* do not try to detect a new scene if low frame rate and too close to previous I-frame */
+    {
+        incr_i = 2;
+        numLoop = 2;
+        start_i = 1;
+        type_pred = 0; /* for initial candidate selection */
+    }
+    else
+    {
+        incr_i = 1;
+        numLoop = 1;
+        start_i = 0;
+        type_pred = 2;
+    }
+
+    /* First pass, loop thru half the macroblock */
+    /* determine scene change */
+    /* Second pass, for the rest of macroblocks */
+    numIntra = 0;
+    while (numLoop--)
+    {
+        for (j = 0; j < mbheight; j++)
+        {
+            if (incr_i > 1)
+                start_i = (start_i == 0 ? 1 : 0) ; /* toggle 0 and 1 */
+
+            offset = width * (j << 4) + (start_i << 4);
+
+            mbnum = j * mbwidth + start_i;
+
+            for (i = start_i; i < mbwidth; i += incr_i)
+            {
+                video->mbnum = mbnum;
+                mot_mb = mot[mbnum];
+                mode_mb = Mode + mbnum;
+
+                cur = currFrame->yChan + offset;
+
+
+                if (*mode_mb != MODE_INTRA)
+                {
+#if defined(HTFM)
+                    HTFMPrepareCurMB(video, &htfm_stat, cur);
+#else
+                    PrepareCurMB(video, cur);
+#endif
+                    /************************************************************/
+                    /******** full-pel 1MV and 4MVs search **********************/
+
+#ifdef _SAD_STAT
+                    num_MB++;
+#endif
+                    MBMotionSearch(video, cur, best_cand, i << 4, j << 4, type_pred,
+                                   FS_en, &hp_guess);
+
+#ifdef PRINT_MV
+                    fp_debug = fopen("c:\\bitstream\\mv1_debug.txt", "a");
+                    fprintf(fp_debug, "#%d (%d,%d,%d) : ", mbnum, mot_mb[0].x, mot_mb[0].y, mot_mb[0].sad);
+                    fprintf(fp_debug, "(%d,%d,%d) : (%d,%d,%d) : (%d,%d,%d) : (%d,%d,%d) : ==>\n",
+                            mot_mb[1].x, mot_mb[1].y, mot_mb[1].sad,
+                            mot_mb[2].x, mot_mb[2].y, mot_mb[2].sad,
+                            mot_mb[3].x, mot_mb[3].y, mot_mb[3].sad,
+                            mot_mb[4].x, mot_mb[4].y, mot_mb[4].sad);
+                    fclose(fp_debug);
+#endif
+                    sad16 = mot_mb[0].sad;
+#ifdef NO_INTER4V
+                    sad8 = sad16;
+#else
+                    sad8 = mot_mb[1].sad + mot_mb[2].sad + mot_mb[3].sad + mot_mb[4].sad;
+#endif
+
+                    /* choose between INTRA or INTER */
+                    (*ChooseMode)(mode_mb, cur, width, ((sad8 < sad16) ? sad8 : sad16));
+                }
+                else    /* INTRA update, use for prediction 3/23/01 */
+                {
+                    mot_mb[0].x = mot_mb[0].y = 0;
+                }
+
+                if (*mode_mb == MODE_INTRA)
+                {
+                    numIntra++ ;
+
+                    /* compute SAV for rate control and fast DCT, 11/28/00 */
+                    (*ComputeMBSum)(cur, width, mot_mb);
+
+                    /* leave mot_mb[0] as it is for fast motion search */
+                    /* set the 4 MVs to zeros */
+                    for (comp = 1; comp <= 4; comp++)
+                    {
+                        mot_mb[comp].x = 0;
+                        mot_mb[comp].y = 0;
+                    }
+#ifdef PRINT_MV
+                    fp_debug = fopen("c:\\bitstream\\mv1_debug.txt", "a");
+                    fprintf(fp_debug, "\n");
+                    fclose(fp_debug);
+#endif
+                }
+                else /* *mode_mb = MODE_INTER;*/
+                {
+                    if (video->encParams->HalfPel_Enabled)
+                    {
+#ifdef _SAD_STAT
+                        num_HP_MB++;
+#endif
+                        /* find half-pel resolution motion vector */
+                        FindHalfPelMB(video, cur, mot_mb, best_cand[0],
+                                      i << 4, j << 4, xh, yh, hp_guess);
+#ifdef PRINT_MV
+                        fp_debug = fopen("c:\\bitstream\\mv1_debug.txt", "a");
+                        fprintf(fp_debug, "(%d,%d), %d\n", mot_mb[0].x, mot_mb[0].y, mot_mb[0].sad);
+                        fclose(fp_debug);
+#endif
+                        skip_halfpel_4mv = ((sad16 - mot_mb[0].sad) <= (MB_Nb >> 1) + 1);
+                        sad16 = mot_mb[0].sad;
+
+#ifndef NO_INTER4V
+                        if (use_4mv && !skip_halfpel_4mv)
+                        {
+                            /* Also decide 1MV or 4MV !!!!!!!!*/
+                            sad8 = FindHalfPelBlk(video, cur, mot_mb, sad16,
+                                                  best_cand, mode_mb, i << 4, j << 4, xh, yh, hp_mem4MV);
+
+#ifdef PRINT_MV
+                            fp_debug = fopen("c:\\bitstream\\mv1_debug.txt", "a");
+                            fprintf(fp_debug, " (%d,%d,%d) : (%d,%d,%d) : (%d,%d,%d) : (%d,%d,%d) \n",
+                                    mot_mb[1].x, mot_mb[1].y, mot_mb[1].sad,
+                                    mot_mb[2].x, mot_mb[2].y, mot_mb[2].sad,
+                                    mot_mb[3].x, mot_mb[3].y, mot_mb[3].sad,
+                                    mot_mb[4].x, mot_mb[4].y, mot_mb[4].sad);
+                            fclose(fp_debug);
+#endif
+                        }
+#endif /* NO_INTER4V */
+                    }
+                    else    /* HalfPel_Enabled ==0  */
+                    {
+#ifndef NO_INTER4V
+                        //if(sad16 < sad8-PREF_16_VEC)
+                        if (sad16 - PREF_16_VEC > sad8)
+                        {
+                            *mode_mb = MODE_INTER4V;
+                        }
+#endif
+                    }
+#if (ZERO_MV_PREF==2)   /* use mot_mb[7].sad as d0 computed in MBMotionSearch*/
+                    /******************************************************/
+                    if (mot_mb[7].sad - PREF_NULL_VEC < sad16 && mot_mb[7].sad - PREF_NULL_VEC < sad8)
+                    {
+                        mot_mb[0].sad = mot_mb[7].sad - PREF_NULL_VEC;
+                        mot_mb[0].x = mot_mb[0].y = 0;
+                        *mode_mb = MODE_INTER;
+                    }
+                    /******************************************************/
+#endif
+                    if (*mode_mb == MODE_INTER)
+                    {
+                        if (mot_mb[0].x == 0 && mot_mb[0].y == 0)   /* use zero vector */
+                            mot_mb[0].sad += PREF_NULL_VEC; /* add back the bias */
+
+                        mot_mb[1].sad = mot_mb[2].sad = mot_mb[3].sad = mot_mb[4].sad = (mot_mb[0].sad + 2) >> 2;
+                        mot_mb[1].x = mot_mb[2].x = mot_mb[3].x = mot_mb[4].x = mot_mb[0].x;
+                        mot_mb[1].y = mot_mb[2].y = mot_mb[3].y = mot_mb[4].y = mot_mb[0].y;
+
+                    }
+                }
+
+                /* find maximum magnitude */
+                /* compute average SAD for rate control, 11/28/00 */
+                if (*mode_mb == MODE_INTER)
+                {
+#ifdef PRINT_MV
+                    fp_debug = fopen("c:\\bitstream\\mv1_debug.txt", "a");
+                    fprintf(fp_debug, "%d MODE_INTER\n", mbnum);
+                    fclose(fp_debug);
+#endif
+                    totalSAD += mot_mb[0].sad;
+                    if (mot_mb[0].x > max_mag)
+                        max_mag = mot_mb[0].x;
+                    if (mot_mb[0].y > max_mag)
+                        max_mag = mot_mb[0].y;
+                    if (mot_mb[0].x < min_mag)
+                        min_mag = mot_mb[0].x;
+                    if (mot_mb[0].y < min_mag)
+                        min_mag = mot_mb[0].y;
+                }
+                else if (*mode_mb == MODE_INTER4V)
+                {
+#ifdef PRINT_MV
+                    fp_debug = fopen("c:\\bitstream\\mv1_debug.txt", "a");
+                    fprintf(fp_debug, "%d MODE_INTER4V\n", mbnum);
+                    fclose(fp_debug);
+#endif
+                    totalSAD += sad8;
+                    for (comp = 1; comp <= 4; comp++)
+                    {
+                        if (mot_mb[comp].x > max_mag)
+                            max_mag = mot_mb[comp].x;
+                        if (mot_mb[comp].y > max_mag)
+                            max_mag = mot_mb[comp].y;
+                        if (mot_mb[comp].x < min_mag)
+                            min_mag = mot_mb[comp].x;
+                        if (mot_mb[comp].y < min_mag)
+                            min_mag = mot_mb[comp].y;
+                    }
+                }
+                else    /* MODE_INTRA */
+                {
+#ifdef PRINT_MV
+                    fp_debug = fopen("c:\\bitstream\\mv1_debug.txt", "a");
+                    fprintf(fp_debug, "%d MODE_INTRA\n", mbnum);
+                    fclose(fp_debug);
+#endif
+                    totalSAD += mot_mb[0].sad;
+                }
+                mbnum += incr_i;
+                offset += (incr_i << 4);
+
+            }
+        }
+
+        if (incr_i > 1 && numLoop) /* scene change on and first loop */
+        {
+            //if(numIntra > ((totalMB>>3)<<1) + (totalMB>>3)) /* 75% of 50%MBs */
+            if (numIntra > (0.30*(totalMB / 2.0))) /* 15% of 50%MBs */
+            {
+                /******** scene change detected *******************/
+                currVop->predictionType = I_VOP;
+                M4VENC_MEMSET(Mode, MODE_INTRA, sizeof(UChar)*totalMB); /* set this for MB level coding*/
+                currVop->quantizer = video->encParams->InitQuantIvop[video->currLayer];
+
+                /* compute the SAV for rate control & fast DCT */
+                totalSAD = 0;
+                offset = 0;
+                mbnum = 0;
+                cur = currFrame->yChan;
+
+                for (j = 0; j < mbheight; j++)
+                {
+                    for (i = 0; i < mbwidth; i++)
+                    {
+                        video->mbnum = mbnum;
+                        mot_mb = mot[mbnum];
+
+
+                        (*ComputeMBSum)(cur + (i << 4), width, mot_mb);
+                        totalSAD += mot_mb[0].sad;
+
+                        mbnum++;
+                    }
+                    cur += (width << 4);
+                }
+
+                video->sumMAD = (float)totalSAD / (float)NumPixelMB;
+                ResetIntraUpdate(intraArray, totalMB);
+                /* video->numVopsInGOP=0; 3/13/01 move it to vop.c*/
+
+                return ;
+            }
+        }
+        /******** no scene change, continue motion search **********************/
+        start_i = 0;
+        type_pred++; /* second pass */
+    }
+
+    video->sumMAD = (float)totalSAD / (float)NumPixelMB;    /* avg SAD */
+
+    /* find f_code , 10/27/2000 */
+    f_code_p = 1;
+    while ((max_mag >> (4 + f_code_p)) > 0)
+        f_code_p++;
+
+    f_code_n = 1;
+    min_mag *= -1;
+    while ((min_mag - 1) >> (4 + f_code_n) > 0)
+        f_code_n++;
+
+    currVop->fcodeForward = (f_code_p > f_code_n ? f_code_p : f_code_n);
+
+#ifdef HTFM
+    /***** HYPOTHESIS TESTING ********/  /* 2/28/01 */
+    if (collect)
+    {
+        collect = 0;
+        UpdateHTFM(video, newvar, exp_lamda, &htfm_stat);
+    }
+    /*********************************/
+#endif
+
+    return ;
+}
+
+
+#ifdef HTFM
+void InitHTFM(VideoEncData *video, HTFM_Stat *htfm_stat, double *newvar, Int *collect)
+{
+    Int i;
+    Int lx = video->currVop->width; //  padding
+    Int lx2 = lx << 1;
+    Int lx3 = lx2 + lx;
+    Int rx = video->currVop->pitch;
+    Int rx2 = rx << 1;
+    Int rx3 = rx2 + rx;
+
+    Int *offset, *offset2;
+
+    /* 4/11/01, collect data every 30 frames, doesn't have to be base layer */
+    if (((Int)video->numVopsInGOP) % 30 == 1)
+    {
+
+        *collect = 1;
+
+        htfm_stat->countbreak = 0;
+        htfm_stat->abs_dif_mad_avg = 0;
+
+        for (i = 0; i < 16; i++)
+        {
+            newvar[i] = 0.0;
+        }
+//      video->functionPointer->SAD_MB_PADDING = &SAD_MB_PADDING_HTFM_Collect;
+        video->functionPointer->SAD_Macroblock = &SAD_MB_HTFM_Collect;
+        video->functionPointer->SAD_MB_HalfPel[0] = NULL;
+        video->functionPointer->SAD_MB_HalfPel[1] = &SAD_MB_HP_HTFM_Collectxh;
+        video->functionPointer->SAD_MB_HalfPel[2] = &SAD_MB_HP_HTFM_Collectyh;
+        video->functionPointer->SAD_MB_HalfPel[3] = &SAD_MB_HP_HTFM_Collectxhyh;
+        video->sad_extra_info = (void*)(htfm_stat);
+        offset = htfm_stat->offsetArray;
+        offset2 = htfm_stat->offsetRef;
+    }
+    else
+    {
+//      video->functionPointer->SAD_MB_PADDING = &SAD_MB_PADDING_HTFM;
+        video->functionPointer->SAD_Macroblock = &SAD_MB_HTFM;
+        video->functionPointer->SAD_MB_HalfPel[0] = NULL;
+        video->functionPointer->SAD_MB_HalfPel[1] = &SAD_MB_HP_HTFMxh;
+        video->functionPointer->SAD_MB_HalfPel[2] = &SAD_MB_HP_HTFMyh;
+        video->functionPointer->SAD_MB_HalfPel[3] = &SAD_MB_HP_HTFMxhyh;
+        video->sad_extra_info = (void*)(video->nrmlz_th);
+        offset = video->nrmlz_th + 16;
+        offset2 = video->nrmlz_th + 32;
+    }
+
+    offset[0] = 0;
+    offset[1] = lx2 + 2;
+    offset[2] = 2;
+    offset[3] = lx2;
+    offset[4] = lx + 1;
+    offset[5] = lx3 + 3;
+    offset[6] = lx + 3;
+    offset[7] = lx3 + 1;
+    offset[8] = lx;
+    offset[9] = lx3 + 2;
+    offset[10] = lx3 ;
+    offset[11] = lx + 2 ;
+    offset[12] = 1;
+    offset[13] = lx2 + 3;
+    offset[14] = lx2 + 1;
+    offset[15] = 3;
+
+    offset2[0] = 0;
+    offset2[1] = rx2 + 2;
+    offset2[2] = 2;
+    offset2[3] = rx2;
+    offset2[4] = rx + 1;
+    offset2[5] = rx3 + 3;
+    offset2[6] = rx + 3;
+    offset2[7] = rx3 + 1;
+    offset2[8] = rx;
+    offset2[9] = rx3 + 2;
+    offset2[10] = rx3 ;
+    offset2[11] = rx + 2 ;
+    offset2[12] = 1;
+    offset2[13] = rx2 + 3;
+    offset2[14] = rx2 + 1;
+    offset2[15] = 3;
+
+    return ;
+}
+
+void UpdateHTFM(VideoEncData *video, double *newvar, double *exp_lamda, HTFM_Stat *htfm_stat)
+{
+    if (htfm_stat->countbreak == 0)
+        htfm_stat->countbreak = 1;
+
+    newvar[0] = (double)(htfm_stat->abs_dif_mad_avg) / (htfm_stat->countbreak * 16.);
+
+    if (newvar[0] < 0.001)
+    {
+        newvar[0] = 0.001; /* to prevent floating overflow */
+    }
+    exp_lamda[0] =  1 / (newvar[0] * 1.4142136);
+    exp_lamda[1] = exp_lamda[0] * 1.5825;
+    exp_lamda[2] = exp_lamda[0] * 2.1750;
+    exp_lamda[3] = exp_lamda[0] * 3.5065;
+    exp_lamda[4] = exp_lamda[0] * 3.1436;
+    exp_lamda[5] = exp_lamda[0] * 3.5315;
+    exp_lamda[6] = exp_lamda[0] * 3.7449;
+    exp_lamda[7] = exp_lamda[0] * 4.5854;
+    exp_lamda[8] = exp_lamda[0] * 4.6191;
+    exp_lamda[9] = exp_lamda[0] * 5.4041;
+    exp_lamda[10] = exp_lamda[0] * 6.5974;
+    exp_lamda[11] = exp_lamda[0] * 10.5341;
+    exp_lamda[12] = exp_lamda[0] * 10.0719;
+    exp_lamda[13] = exp_lamda[0] * 12.0516;
+    exp_lamda[14] = exp_lamda[0] * 15.4552;
+
+    CalcThreshold(HTFM_Pf, exp_lamda, video->nrmlz_th);
+    return ;
+}
+
+
+void CalcThreshold(double pf, double exp_lamda[], Int nrmlz_th[])
+{
+    Int i;
+    double temp[15];
+    //  printf("\nLamda: ");
+
+    /* parametric PREMODELling */
+    for (i = 0; i < 15; i++)
+    {
+        //    printf("%g ",exp_lamda[i]);
+        if (pf < 0.5)
+            temp[i] = 1 / exp_lamda[i] * M4VENC_LOG(2 * pf);
+        else
+            temp[i] = -1 / exp_lamda[i] * M4VENC_LOG(2 * (1 - pf));
+    }
+
+    nrmlz_th[15] = 0;
+    for (i = 0; i < 15; i++)        /* scale upto no.pixels */
+        nrmlz_th[i] = (Int)(temp[i] * ((i + 1) << 4) + 0.5);
+
+    return ;
+}
+
+void    HTFMPrepareCurMB(VideoEncData *video, HTFM_Stat *htfm_stat, UChar *cur)
+{
+    void* tmp = (void*)(video->currYMB);
+    ULong *htfmMB = (ULong*)tmp;
+    UChar *ptr, byte;
+    Int *offset;
+    Int i;
+    ULong word;
+    Int width = video->currVop->width;
+
+    if (((Int)video->numVopsInGOP) % 30 == 1)
+    {
+        offset = htfm_stat->offsetArray;
+    }
+    else
+    {
+        offset = video->nrmlz_th + 16;
+    }
+
+    for (i = 0; i < 16; i++)
+    {
+        ptr = cur + offset[i];
+        word = ptr[0];
+        byte = ptr[4];
+        word |= (byte << 8);
+        byte = ptr[8];
+        word |= (byte << 16);
+        byte = ptr[12];
+        word |= (byte << 24);
+        *htfmMB++ = word;
+
+        word = *(ptr += (width << 2));
+        byte = ptr[4];
+        word |= (byte << 8);
+        byte = ptr[8];
+        word |= (byte << 16);
+        byte = ptr[12];
+        word |= (byte << 24);
+        *htfmMB++ = word;
+
+        word = *(ptr += (width << 2));
+        byte = ptr[4];
+        word |= (byte << 8);
+        byte = ptr[8];
+        word |= (byte << 16);
+        byte = ptr[12];
+        word |= (byte << 24);
+        *htfmMB++ = word;
+
+        word = *(ptr += (width << 2));
+        byte = ptr[4];
+        word |= (byte << 8);
+        byte = ptr[8];
+        word |= (byte << 16);
+        byte = ptr[12];
+        word |= (byte << 24);
+        *htfmMB++ = word;
+    }
+
+    return ;
+}
+
+
+#endif
+
+void    PrepareCurMB(VideoEncData *video, UChar *cur)
+{
+    void* tmp = (void*)(video->currYMB);
+    ULong *currYMB = (ULong*)tmp;
+    Int i;
+    Int width = video->currVop->width;
+
+    cur -= width;
+
+    for (i = 0; i < 16; i++)
+    {
+        *currYMB++ = *((ULong*)(cur += width));
+        *currYMB++ = *((ULong*)(cur + 4));
+        *currYMB++ = *((ULong*)(cur + 8));
+        *currYMB++ = *((ULong*)(cur + 12));
+    }
+
+    return ;
+}
+
+
+/*==================================================================
+    Function:   MBMotionSearch
+    Date:       09/06/2000
+    Purpose:    Perform motion estimation for a macroblock.
+                Find 1MV and 4MVs in half-pels resolutions.
+                Using ST1 algorithm provided by Chalidabhongse and Kuo
+                CSVT March'98.
+
+==================================================================*/
+
+void MBMotionSearch(VideoEncData *video, UChar *cur, UChar *best_cand[],
+                    Int i0, Int j0, Int type_pred, Int FS_en, Int *hp_guess)
+{
+    Vol *currVol = video->vol[video->currLayer];
+    UChar *ref, *cand, *ncand = NULL, *cur8;
+    void *extra_info = video->sad_extra_info;
+    Int mbnum = video->mbnum;
+    Int width = video->currVop->width; /* 6/12/01, must be multiple of 16 */
+    Int height = video->currVop->height;
+    MOT **mot = video->mot;
+    UChar use_4mv = video->encParams->MV8x8_Enabled;
+    UChar h263_mode = video->encParams->H263_Enabled;
+    Int(*SAD_Macroblock)(UChar*, UChar*, Int, void*) = video->functionPointer->SAD_Macroblock;
+    Int(*SAD_Block)(UChar*, UChar*, Int, Int, void*) = video->functionPointer->SAD_Block;
+    VideoEncParams *encParams = video->encParams;
+    Int range = encParams->SearchRange;
+
+    Int lx = video->currVop->pitch; /* padding */
+    Int comp;
+    Int i, j, imin, jmin, ilow, ihigh, jlow, jhigh, iorg, jorg;
+    Int d, dmin, dn[9];
+#if (ZERO_MV_PREF==1)   /* compute (0,0) MV at the end */
+    Int d0;
+#endif
+    Int k;
+    Int mvx[5], mvy[5], imin0, jmin0;
+    Int num_can, center_again;
+    Int last_loc, new_loc = 0;
+    Int step, max_step = range >> 1;
+    Int next;
+
+    ref = video->forwardRefVop->yChan; /* origin of actual frame */
+
+    cur = video->currYMB; /* use smaller memory space for current MB */
+
+    /*  find limit of the search (adjusting search range)*/
+
+    if (!h263_mode)
+    {
+        ilow = i0 - range;
+        if (ilow < -15)
+            ilow = -15;
+        ihigh = i0 + range - 1;
+        if (ihigh > width - 1)
+            ihigh = width - 1;
+        jlow = j0 - range;
+        if (jlow < -15)
+            jlow = -15;
+        jhigh = j0 + range - 1;
+        if (jhigh > height - 1)
+            jhigh = height - 1;
+    }
+    else
+    {
+        ilow = i0 - range;
+        if (ilow < 0)
+            ilow = 0;
+        ihigh = i0 + range - 1;
+        if (ihigh > width - 16)
+            ihigh = width - 16;
+        jlow = j0 - range;
+        if (jlow < 0)
+            jlow = 0;
+        jhigh = j0 + range - 1;
+        if (jhigh > height - 16)
+            jhigh = height - 16;
+    }
+
+    imin = i0;
+    jmin = j0; /* needed for fullsearch */
+    ncand = ref + imin + jmin * lx;
+
+    /* for first row of MB, fullsearch can be used */
+    if (FS_en)
+    {
+        *hp_guess = 0; /* no guess for fast half-pel */
+
+        dmin =  fullsearch(video, currVol, ref, cur, &imin, &jmin, ilow, ihigh, jlow, jhigh);
+
+        ncand = ref + imin + jmin * lx;
+
+        mot[mbnum][0].sad = dmin;
+        mot[mbnum][0].x = (imin - i0) << 1;
+        mot[mbnum][0].y = (jmin - j0) << 1;
+        imin0 = imin << 1;  /* 16x16 MV in half-pel resolution */
+        jmin0 = jmin << 1;
+        best_cand[0] = ncand;
+    }
+    else
+    {   /* 4/7/01, modified this testing for fullsearch the top row to only upto (0,3) MB */
+        /*            upto 30% complexity saving with the same complexity */
+        if (video->forwardRefVop->predictionType == I_VOP && j0 == 0 && i0 <= 64 && type_pred != 1)
+        {
+            *hp_guess = 0; /* no guess for fast half-pel */
+            dmin =  fullsearch(video, currVol, ref, cur, &imin, &jmin, ilow, ihigh, jlow, jhigh);
+            ncand = ref + imin + jmin * lx;
+        }
+        else
+        {
+            /************** initialize candidate **************************/
+            /* find initial motion vector */
+            CandidateSelection(mvx, mvy, &num_can, i0 >> 4, j0 >> 4, video, type_pred);
+
+            dmin = 65535;
+
+            /* check if all are equal */
+            if (num_can == ALL_CAND_EQUAL)
+            {
+                i = i0 + mvx[0];
+                j = j0 + mvy[0];
+
+                if (i >= ilow && i <= ihigh && j >= jlow && j <= jhigh)
+                {
+                    cand = ref + i + j * lx;
+
+                    d = (*SAD_Macroblock)(cand, cur, (dmin << 16) | lx, extra_info);
+
+                    if (d < dmin)
+                    {
+                        dmin = d;
+                        imin = i;
+                        jmin = j;
+                        ncand = cand;
+                    }
+                }
+            }
+            else
+            {
+                /************** evaluate unique candidates **********************/
+                for (k = 0; k < num_can; k++)
+                {
+                    i = i0 + mvx[k];
+                    j = j0 + mvy[k];
+
+                    if (i >= ilow && i <= ihigh && j >= jlow && j <= jhigh)
+                    {
+                        cand = ref + i + j * lx;
+                        d = (*SAD_Macroblock)(cand, cur, (dmin << 16) | lx, extra_info);
+
+                        if (d < dmin)
+                        {
+                            dmin = d;
+                            imin = i;
+                            jmin = j;
+                            ncand = cand;
+                        }
+                        else if ((d == dmin) && PV_ABS(mvx[k]) + PV_ABS(mvy[k]) < PV_ABS(i0 - imin) + PV_ABS(j0 - jmin))
+                        {
+                            dmin = d;
+                            imin = i;
+                            jmin = j;
+                            ncand = cand;
+                        }
+                    }
+                }
+            }
+            if (num_can == 0 || dmin == 65535) /* no candidate selected */
+            {
+                ncand = ref + i0 + j0 * lx; /* use (0,0) MV as initial value */
+                mot[mbnum][7].sad = dmin = (*SAD_Macroblock)(ncand, cur, (65535 << 16) | lx, extra_info);
+#if (ZERO_MV_PREF==1)   /* compute (0,0) MV at the end */
+                d0 = dmin;
+#endif
+                imin = i0;
+                jmin = j0;
+            }
+
+#if (ZERO_MV_PREF==0)  /*  COMPUTE ZERO VECTOR FIRST !!!!!*/
+            dmin -= PREF_NULL_VEC;
+#endif
+
+            /******************* local refinement ***************************/
+            center_again = 0;
+            last_loc = new_loc = 0;
+            //          ncand = ref + jmin*lx + imin;  /* center of the search */
+            step = 0;
+            dn[0] = dmin;
+            while (!center_again && step <= max_step)
+            {
+
+                MoveNeighborSAD(dn, last_loc);
+
+                center_again = 1;
+                i = imin;
+                j = jmin - 1;
+                cand = ref + i + j * lx;
+
+                /*  starting from [0,-1] */
+                /* spiral check one step at a time*/
+                for (k = 2; k <= 8; k += 2)
+                {
+                    if (!tab_exclude[last_loc][k]) /* exclude last step computation */
+                    {       /* not already computed */
+                        if (i >= ilow && i <= ihigh && j >= jlow && j <= jhigh)
+                        {
+                            d = (*SAD_Macroblock)(cand, cur, (dmin << 16) | lx, extra_info);
+                            dn[k] = d; /* keep it for half pel use */
+
+                            if (d < dmin)
+                            {
+                                ncand = cand;
+                                dmin = d;
+                                imin = i;
+                                jmin = j;
+                                center_again = 0;
+                                new_loc = k;
+                            }
+                            else if ((d == dmin) && PV_ABS(i0 - i) + PV_ABS(j0 - j) < PV_ABS(i0 - imin) + PV_ABS(j0 - jmin))
+                            {
+                                ncand = cand;
+                                imin = i;
+                                jmin = j;
+                                center_again = 0;
+                                new_loc = k;
+                            }
+                        }
+                    }
+                    if (k == 8)  /* end side search*/
+                    {
+                        if (!center_again)
+                        {
+                            k = -1; /* start diagonal search */
+                            cand -= lx;
+                            j--;
+                        }
+                    }
+                    else
+                    {
+                        next = refine_next[k][0];
+                        i += next;
+                        cand += next;
+                        next = refine_next[k][1];
+                        j += next;
+                        cand += lx * next;
+                    }
+                }
+                last_loc = new_loc;
+                step ++;
+            }
+            if (!center_again)
+                MoveNeighborSAD(dn, last_loc);
+
+            *hp_guess = FindMin(dn);
+
+        }
+
+#if (ZERO_MV_PREF==1)   /* compute (0,0) MV at the end */
+        if (d0 - PREF_NULL_VEC < dmin)
+        {
+            ncand = ref + i0 + j0 * lx;
+            dmin = d0;
+            imin = i0;
+            jmin = j0;
+        }
+#endif
+        mot[mbnum][0].sad = dmin;
+        mot[mbnum][0].x = (imin - i0) << 1;
+        mot[mbnum][0].y = (jmin - j0) << 1;
+        imin0 = imin << 1;  /* 16x16 MV in half-pel resolution */
+        jmin0 = jmin << 1;
+        best_cand[0] = ncand;
+    }
+    /* imin and jmin is the best 1 MV */
+#ifndef NO_INTER4V
+    /*******************  Find 4 motion vectors ****************************/
+    if (use_4mv && !h263_mode)
+    {
+#ifdef _SAD_STAT
+        num_Blk += 4;
+#endif
+        /* starting from the best 1MV */
+        //offset = imin + jmin*lx;
+        iorg = i0;
+        jorg = j0;
+
+        for (comp = 0; comp < 4; comp++)
+        {
+            i0 = iorg + ((comp & 1) << 3);
+            j0 = jorg + ((comp & 2) << 2);
+
+            imin = (imin0 >> 1) + ((comp & 1) << 3);    /* starting point from 16x16 MV */
+            jmin = (jmin0 >> 1) + ((comp & 2) << 2);
+            ncand = ref + imin + jmin * lx;
+
+            cur8 = cur + ((comp & 1) << 3) + (((comp & 2) << 2) << 4) ; /* 11/30/05, smaller cache */
+
+            /*  find limit of the search (adjusting search range)*/
+            ilow = i0 - range;
+            ihigh = i0 + range - 1 ;/* 4/9/01 */
+            if (ilow < -15)
+                ilow = -15;
+            if (ihigh > width - 1)
+                ihigh = width - 1;
+            jlow = j0 - range;
+            jhigh = j0 + range - 1 ;/* 4/9/01 */
+            if (jlow < -15)
+                jlow = -15;
+            if (jhigh > height - 1)
+                jhigh = height - 1;
+
+            SAD_Block = video->functionPointer->SAD_Block;
+
+            if (FS_en)  /* fullsearch enable, center around 16x16 MV */
+            {
+                dmin =  fullsearchBlk(video, currVol, ncand, cur8, &imin, &jmin, ilow, ihigh, jlow, jhigh, range);
+                ncand = ref + imin + jmin * lx;
+
+                mot[mbnum][comp+1].sad = dmin;
+                mot[mbnum][comp+1].x = (imin - i0) << 1;
+                mot[mbnum][comp+1].y = (jmin - j0) << 1;
+                best_cand[comp+1] = ncand;
+            }
+            else    /* no fullsearch, do local search */
+            {
+                /* starting point from 16x16 */
+                dmin = (*SAD_Block)(ncand, cur8, 65536, lx, extra_info);
+
+                /******************* local refinement ***************************/
+                center_again = 0;
+                last_loc = 0;
+
+                while (!center_again)
+                {
+                    center_again = 1;
+                    i = imin;
+                    j = jmin - 1;
+                    cand = ref + i + j * lx;
+
+                    /*  starting from [0,-1] */
+                    /* spiral check one step at a time*/
+                    for (k = 2; k <= 8; k += 2)
+                    {
+                        if (!tab_exclude[last_loc][k]) /* exclude last step computation */
+                        {       /* not already computed */
+                            if (i >= ilow && i <= ihigh && j >= jlow && j <= jhigh)
+                            {
+                                d = (*SAD_Block)(cand, cur8, dmin, lx, extra_info);
+
+                                if (d < dmin)
+                                {
+                                    ncand = cand;
+                                    dmin = d;
+                                    imin = i;
+                                    jmin = j;
+                                    center_again = 0;
+                                    new_loc = k;
+                                }
+                                else if ((d == dmin) &&
+                                         PV_ABS(i0 - i) + PV_ABS(j0 - j) < PV_ABS(i0 - imin) + PV_ABS(j0 - jmin))
+                                {
+                                    ncand = cand;
+                                    imin = i;
+                                    jmin = j;
+                                    center_again = 0;
+                                    new_loc = k;
+                                }
+                            }
+                        }
+                        if (k == 8)  /* end side search*/
+                        {
+                            if (!center_again)
+                            {
+                                k = -1; /* start diagonal search */
+                                if (j <= height - 1 && j > 0)   cand -= lx;
+                                j--;
+                            }
+                        }
+                        else
+                        {
+                            next = refine_next[k][0];
+                            cand += next;
+                            i += next;
+                            next = refine_next[k][1];
+                            cand += lx * next;
+                            j += next;
+                        }
+                    }
+                    last_loc = new_loc;
+                }
+                mot[mbnum][comp+1].sad = dmin;
+                mot[mbnum][comp+1].x = (imin - i0) << 1;
+                mot[mbnum][comp+1].y = (jmin - j0) << 1;
+                best_cand[comp+1] = ncand;
+            }
+            /********************************************/
+        }
+    }
+    else
+#endif  /* NO_INTER4V */
+    {
+        mot[mbnum][1].sad = mot[mbnum][2].sad = mot[mbnum][3].sad = mot[mbnum][4].sad = (dmin + 2) >> 2;
+        mot[mbnum][1].x = mot[mbnum][2].x = mot[mbnum][3].x = mot[mbnum][4].x = mot[mbnum][0].x;
+        mot[mbnum][1].y = mot[mbnum][2].y = mot[mbnum][3].y = mot[mbnum][4].y = mot[mbnum][0].y;
+        best_cand[1] = best_cand[2] = best_cand[3] = best_cand[4] = ncand;
+
+    }
+    return ;
+}
+
+
+/*===============================================================================
+    Function:   fullsearch
+    Date:       09/16/2000
+    Purpose:    Perform full-search motion estimation over the range of search
+                region in a spiral-outward manner.
+    Input/Output:   VideoEncData, current Vol, previou Vop, pointer to the left corner of
+                current VOP, current coord (also output), boundaries.
+===============================================================================*/
+
+Int fullsearch(VideoEncData *video, Vol *currVol, UChar *prev, UChar *cur,
+               Int *imin, Int *jmin, Int ilow, Int ihigh, Int jlow, Int jhigh)
+{
+    Int range = video->encParams->SearchRange;
+    UChar *cand;
+    Int i, j, k, l;
+    Int d, dmin;
+    Int i0 = *imin; /* current position */
+    Int j0 = *jmin;
+    Int(*SAD_Macroblock)(UChar*, UChar*, Int, void*) = video->functionPointer->SAD_Macroblock;
+    void *extra_info = video->sad_extra_info;
+//  UChar h263_mode = video->encParams->H263_Enabled;
+    Int lx = video->currVop->pitch; /* with padding */
+
+    Int offset = i0 + j0 * lx;
+
+    OSCL_UNUSED_ARG(currVol);
+
+    cand = prev + offset;
+
+    dmin  = (*SAD_Macroblock)(cand, cur, (65535 << 16) | lx, (void*)extra_info) - PREF_NULL_VEC;
+
+    /* perform spiral search */
+    for (k = 1; k <= range; k++)
+    {
+
+        i = i0 - k;
+        j = j0 - k;
+
+        cand = prev + i + j * lx;
+
+        for (l = 0; l < 8*k; l++)
+        {
+            /* no need for boundary checking again */
+            if (i >= ilow && i <= ihigh && j >= jlow && j <= jhigh)
+            {
+                d = (*SAD_Macroblock)(cand, cur, (dmin << 16) | lx, (void*)extra_info);
+
+                if (d < dmin)
+                {
+                    dmin = d;
+                    *imin = i;
+                    *jmin = j;
+                }
+                else if ((d == dmin) && PV_ABS(i0 - i) + PV_ABS(j0 - j) < PV_ABS(i0 - *imin) + PV_ABS(j0 - *jmin))
+                {
+                    dmin = d;
+                    *imin = i;
+                    *jmin = j;
+                }
+            }
+
+            if (l < (k << 1))
+            {
+                i++;
+                cand++;
+            }
+            else if (l < (k << 2))
+            {
+                j++;
+                cand += lx;
+            }
+            else if (l < ((k << 2) + (k << 1)))
+            {
+                i--;
+                cand--;
+            }
+            else
+            {
+                j--;
+                cand -= lx;
+            }
+        }
+    }
+
+    return dmin;
+}
+
+#ifndef NO_INTER4V
+/*===============================================================================
+    Function:   fullsearchBlk
+    Date:       01/9/2001
+    Purpose:    Perform full-search motion estimation of an 8x8 block over the range
+                of search region in a spiral-outward manner centered at the 16x16 MV.
+    Input/Output:   VideoEncData, MB coordinate, pointer to the initial MV on the
+                reference, pointer to coor of current block, search range.
+===============================================================================*/
+Int fullsearchBlk(VideoEncData *video, Vol *currVol, UChar *cent, UChar *cur,
+                  Int *imin, Int *jmin, Int ilow, Int ihigh, Int jlow, Int jhigh, Int range)
+{
+    UChar *cand, *ref;
+    Int i, j, k, l, istart, jstart;
+    Int d, dmin;
+    Int lx = video->currVop->pitch; /* with padding */
+    Int(*SAD_Block)(UChar*, UChar*, Int, Int, void*) = video->functionPointer->SAD_Block;
+    void *extra_info = video->sad_extra_info;
+
+    OSCL_UNUSED_ARG(currVol);
+
+    /* starting point centered at 16x16 MV */
+    ref = cent;
+    istart = *imin;
+    jstart = *jmin;
+
+    dmin = (*SAD_Block)(ref, cur, 65536, lx, (void*)extra_info);
+
+    cand = ref;
+    /* perform spiral search */
+    for (k = 1; k <= range; k++)
+    {
+
+        i = istart - k;
+        j = jstart - k;
+        cand -= (lx + 1);  /* candidate region */
+
+        for (l = 0; l < 8*k; l++)
+        {
+            /* no need for boundary checking again */
+            if (i >= ilow && i <= ihigh && j >= jlow && j <= jhigh)
+            {
+                d = (*SAD_Block)(cand, cur, dmin, lx, (void*)extra_info);
+
+                if (d < dmin)
+                {
+                    dmin = d;
+                    *imin = i;
+                    *jmin = j;
+                }
+                else if ((d == dmin) &&
+                         PV_ABS(istart - i) + PV_ABS(jstart - j) < PV_ABS(istart - *imin) + PV_ABS(jstart - *jmin))
+                {
+                    dmin = d;
+                    *imin = i;
+                    *jmin = j;
+                }
+            }
+
+            if (l < (k << 1))
+            {
+                i++;
+                cand++;
+            }
+            else if (l < (k << 2))
+            {
+                j++;
+                cand += lx;
+            }
+            else if (l < ((k << 2) + (k << 1)))
+            {
+                i--;
+                cand--;
+            }
+            else
+            {
+                j--;
+                cand -= lx;
+            }
+        }
+    }
+
+    return dmin;
+}
+#endif /* NO_INTER4V */
+
+/*===============================================================================
+    Function:   CandidateSelection
+    Date:       09/16/2000
+    Purpose:    Fill up the list of candidate using spatio-temporal correlation
+                among neighboring blocks.
+    Input/Output:   type_pred = 0: first pass, 1: second pass, or no SCD
+    Modified:    09/23/01, get rid of redundant candidates before passing back.
+===============================================================================*/
+
+void CandidateSelection(Int *mvx, Int *mvy, Int *num_can, Int imb, Int jmb,
+                        VideoEncData *video, Int type_pred)
+{
+    MOT **mot = video->mot;
+    MOT *pmot;
+    Int mbnum = video->mbnum;
+    Vol *currVol = video->vol[video->currLayer];
+    Int mbwidth = currVol->nMBPerRow;
+    Int mbheight = currVol->nMBPerCol;
+    Int i, j, same, num1;
+
+    *num_can = 0;
+
+    if (video->forwardRefVop->predictionType == P_VOP)
+    {
+        /* Spatio-Temporal Candidate (five candidates) */
+        if (type_pred == 0) /* first pass */
+        {
+            pmot = &mot[mbnum][0]; /* same coordinate previous frame */
+            mvx[(*num_can)] = (pmot->x) >> 1;
+            mvy[(*num_can)++] = (pmot->y) >> 1;
+            if (imb >= (mbwidth >> 1) && imb > 0)  /*left neighbor previous frame */
+            {
+                pmot = &mot[mbnum-1][0];
+                mvx[(*num_can)] = (pmot->x) >> 1;
+                mvy[(*num_can)++] = (pmot->y) >> 1;
+            }
+            else if (imb + 1 < mbwidth)   /*right neighbor previous frame */
+            {
+                pmot = &mot[mbnum+1][0];
+                mvx[(*num_can)] = (pmot->x) >> 1;
+                mvy[(*num_can)++] = (pmot->y) >> 1;
+            }
+
+            if (jmb < mbheight - 1)  /*bottom neighbor previous frame */
+            {
+                pmot = &mot[mbnum+mbwidth][0];
+                mvx[(*num_can)] = (pmot->x) >> 1;
+                mvy[(*num_can)++] = (pmot->y) >> 1;
+            }
+            else if (jmb > 0)   /*upper neighbor previous frame */
+            {
+                pmot = &mot[mbnum-mbwidth][0];
+                mvx[(*num_can)] = (pmot->x) >> 1;
+                mvy[(*num_can)++] = (pmot->y) >> 1;
+            }
+
+            if (imb > 0 && jmb > 0)  /* upper-left neighbor current frame*/
+            {
+                pmot = &mot[mbnum-mbwidth-1][0];
+                mvx[(*num_can)] = (pmot->x) >> 1;
+                mvy[(*num_can)++] = (pmot->y) >> 1;
+            }
+            if (jmb > 0 && imb < mbheight - 1)  /* upper right neighbor current frame*/
+            {
+                pmot = &mot[mbnum-mbwidth+1][0];
+                mvx[(*num_can)] = (pmot->x) >> 1;
+                mvy[(*num_can)++] = (pmot->y) >> 1;
+            }
+        }
+        else    /* second pass */
+            /* original ST1 algorithm */
+        {
+            pmot = &mot[mbnum][0]; /* same coordinate previous frame */
+            mvx[(*num_can)] = (pmot->x) >> 1;
+            mvy[(*num_can)++] = (pmot->y) >> 1;
+
+            if (imb > 0)  /*left neighbor current frame */
+            {
+                pmot = &mot[mbnum-1][0];
+                mvx[(*num_can)] = (pmot->x) >> 1;
+                mvy[(*num_can)++] = (pmot->y) >> 1;
+            }
+            if (jmb > 0)  /*upper neighbor current frame */
+            {
+                pmot = &mot[mbnum-mbwidth][0];
+                mvx[(*num_can)] = (pmot->x) >> 1;
+                mvy[(*num_can)++] = (pmot->y) >> 1;
+            }
+            if (imb < mbwidth - 1)  /*right neighbor previous frame */
+            {
+                pmot = &mot[mbnum+1][0];
+                mvx[(*num_can)] = (pmot->x) >> 1;
+                mvy[(*num_can)++] = (pmot->y) >> 1;
+            }
+            if (jmb < mbheight - 1)  /*bottom neighbor previous frame */
+            {
+                pmot = &mot[mbnum+mbwidth][0];
+                mvx[(*num_can)] = (pmot->x) >> 1;
+                mvy[(*num_can)++] = (pmot->y) >> 1;
+            }
+        }
+    }
+    else  /* only Spatial Candidate (four candidates)*/
+    {
+        if (type_pred == 0) /*first pass*/
+        {
+            if (imb > 1)  /* neighbor two blocks away to the left */
+            {
+                pmot = &mot[mbnum-2][0];
+                mvx[(*num_can)] = (pmot->x) >> 1;
+                mvy[(*num_can)++] = (pmot->y) >> 1;
+            }
+            if (imb > 0 && jmb > 0)  /* upper-left neighbor */
+            {
+                pmot = &mot[mbnum-mbwidth-1][0];
+                mvx[(*num_can)] = (pmot->x) >> 1;
+                mvy[(*num_can)++] = (pmot->y) >> 1;
+            }
+            if (jmb > 0 && imb < mbheight - 1)  /* upper right neighbor */
+            {
+                pmot = &mot[mbnum-mbwidth+1][0];
+                mvx[(*num_can)] = (pmot->x) >> 1;
+                mvy[(*num_can)++] = (pmot->y) >> 1;
+            }
+        }
+//#ifdef SCENE_CHANGE_DETECTION
+        /* second pass (ST2 algorithm)*/
+        else if (type_pred == 1) /* 4/7/01 */
+        {
+            if (imb > 0)  /*left neighbor current frame */
+            {
+                pmot = &mot[mbnum-1][0];
+                mvx[(*num_can)] = (pmot->x) >> 1;
+                mvy[(*num_can)++] = (pmot->y) >> 1;
+            }
+            if (jmb > 0)  /*upper neighbor current frame */
+            {
+                pmot = &mot[mbnum-mbwidth][0];
+                mvx[(*num_can)] = (pmot->x) >> 1;
+                mvy[(*num_can)++] = (pmot->y) >> 1;
+            }
+            if (imb < mbwidth - 1)  /*right neighbor current frame */
+            {
+                pmot = &mot[mbnum+1][0];
+                mvx[(*num_can)] = (pmot->x) >> 1;
+                mvy[(*num_can)++] = (pmot->y) >> 1;
+            }
+            if (jmb < mbheight - 1)  /*bottom neighbor current frame */
+            {
+                pmot = &mot[mbnum+mbwidth][0];
+                mvx[(*num_can)] = (pmot->x) >> 1;
+                mvy[(*num_can)++] = (pmot->y) >> 1;
+            }
+        }
+//#else
+        else /* original ST1 algorithm */
+        {
+            if (imb > 0)  /*left neighbor current frame */
+            {
+                pmot = &mot[mbnum-1][0];
+                mvx[(*num_can)] = (pmot->x) >> 1;
+                mvy[(*num_can)++] = (pmot->y) >> 1;
+
+                if (jmb > 0)  /*upper-left neighbor current frame */
+                {
+                    pmot = &mot[mbnum-mbwidth-1][0];
+                    mvx[(*num_can)] = (pmot->x) >> 1;
+                    mvy[(*num_can)++] = (pmot->y) >> 1;
+                }
+
+            }
+            if (jmb > 0)  /*upper neighbor current frame */
+            {
+                pmot = &mot[mbnum-mbwidth][0];
+                mvx[(*num_can)] = (pmot->x) >> 1;
+                mvy[(*num_can)++] = (pmot->y) >> 1;
+
+                if (imb < mbheight - 1)  /*upper-right neighbor current frame */
+                {
+                    pmot = &mot[mbnum-mbwidth+1][0];
+                    mvx[(*num_can)] = (pmot->x) >> 1;
+                    mvy[(*num_can)++] = (pmot->y) >> 1;
+                }
+            }
+        }
+//#endif
+    }
+
+    /* 3/23/01, remove redundant candidate (possible k-mean) */
+    num1 = *num_can;
+    *num_can = 1;
+    for (i = 1; i < num1; i++)
+    {
+        same = 0;
+        j = 0;
+        while (!same && j < *num_can)
+        {
+#if (CANDIDATE_DISTANCE==0)
+            if (mvx[i] == mvx[j] && mvy[i] == mvy[j])
+#else
+            // modified k-mean, 3/24/01, shouldn't be greater than 3
+            if (PV_ABS(mvx[i] - mvx[j]) + PV_ABS(mvy[i] - mvy[j]) < CANDIDATE_DISTANCE)
+#endif
+                same = 1;
+            j++;
+        }
+        if (!same)
+        {
+            mvx[*num_can] = mvx[i];
+            mvy[*num_can] = mvy[i];
+            (*num_can)++;
+        }
+    }
+
+#ifdef _SAD_STAT
+    num_cand += (*num_can);
+#endif
+
+    if (num1 == 5 && *num_can == 1)
+        *num_can = ALL_CAND_EQUAL; /* all are equal */
+
+    return ;
+}
+
+/*===========================================================================
+    Function:   RasterIntraUpdate
+    Date:       2/26/01
+    Purpose:    To raster-scan assign INTRA-update .
+                N macroblocks are updated (also was programmable).
+===========================================================================*/
+void RasterIntraUpdate(UChar *intraArray, UChar *Mode, Int totalMB, Int numRefresh)
+{
+    Int indx, i;
+
+    /* find the last refresh MB */
+    indx = 0;
+    while (intraArray[indx] == 1 && indx < totalMB)
+        indx++;
+
+    /* add more  */
+    for (i = 0; i < numRefresh && indx < totalMB; i++)
+    {
+        Mode[indx] = MODE_INTRA;
+        intraArray[indx++] = 1;
+    }
+
+    /* if read the end of frame, reset and loop around */
+    if (indx >= totalMB - 1)
+    {
+        ResetIntraUpdate(intraArray, totalMB);
+        indx = 0;
+        while (i < numRefresh && indx < totalMB)
+        {
+            intraArray[indx] = 1;
+            Mode[indx++] = MODE_INTRA;
+            i++;
+        }
+    }
+
+    return ;
+}
+
+/*===========================================================================
+    Function:   ResetIntraUpdate
+    Date:       11/28/00
+    Purpose:    Reset already intra updated flags to all zero
+===========================================================================*/
+
+void ResetIntraUpdate(UChar *intraArray, Int totalMB)
+{
+    M4VENC_MEMSET(intraArray, 0, sizeof(UChar)*totalMB);
+    return ;
+}
+
+/*===========================================================================
+    Function:   ResetIntraUpdateRegion
+    Date:       12/1/00
+    Purpose:    Reset already intra updated flags in one region to all zero
+===========================================================================*/
+void ResetIntraUpdateRegion(UChar *intraArray, Int start_i, Int rwidth,
+                            Int start_j, Int rheight, Int mbwidth, Int mbheight)
+{
+    Int indx, j;
+
+    if (start_i + rwidth >= mbwidth)
+        rwidth = mbwidth - start_i;
+    if (start_j + rheight >= mbheight)
+        rheight = mbheight - start_j;
+
+    for (j = start_j; j < start_j + rheight; j++)
+    {
+        indx = j * mbwidth;
+        M4VENC_MEMSET(intraArray + indx + start_i, 0, sizeof(UChar)*rwidth);
+    }
+
+    return ;
+}
+
+/*************************************************************
+    Function:   MoveNeighborSAD
+    Date:       3/27/01
+    Purpose:    Move neighboring SAD around when center has shifted
+*************************************************************/
+
+void MoveNeighborSAD(Int dn[], Int new_loc)
+{
+    Int tmp[9];
+    tmp[0] = dn[0];
+    tmp[1] = dn[1];
+    tmp[2] = dn[2];
+    tmp[3] = dn[3];
+    tmp[4] = dn[4];
+    tmp[5] = dn[5];
+    tmp[6] = dn[6];
+    tmp[7] = dn[7];
+    tmp[8] = dn[8];
+    dn[0] = dn[1] = dn[2] = dn[3] = dn[4] = dn[5] = dn[6] = dn[7] = dn[8] = 65536;
+
+    switch (new_loc)
+    {
+        case 0:
+            break;
+        case 1:
+            dn[4] = tmp[2];
+            dn[5] = tmp[0];
+            dn[6] = tmp[8];
+            break;
+        case 2:
+            dn[4] = tmp[3];
+            dn[5] = tmp[4];
+            dn[6] = tmp[0];
+            dn[7] = tmp[8];
+            dn[8] = tmp[1];
+            break;
+        case 3:
+            dn[6] = tmp[4];
+            dn[7] = tmp[0];
+            dn[8] = tmp[2];
+            break;
+        case 4:
+            dn[1] = tmp[2];
+            dn[2] = tmp[3];
+            dn[6] = tmp[5];
+            dn[7] = tmp[6];
+            dn[8] = tmp[0];
+            break;
+        case 5:
+            dn[1] = tmp[0];
+            dn[2] = tmp[4];
+            dn[8] = tmp[6];
+            break;
+        case 6:
+            dn[1] = tmp[8];
+            dn[2] = tmp[0];
+            dn[3] = tmp[4];
+            dn[4] = tmp[5];
+            dn[8] = tmp[7];
+            break;
+        case 7:
+            dn[2] = tmp[8];
+            dn[3] = tmp[0];
+            dn[4] = tmp[6];
+            break;
+        case 8:
+            dn[2] = tmp[1];
+            dn[3] = tmp[2];
+            dn[4] = tmp[0];
+            dn[5] = tmp[6];
+            dn[6] = tmp[7];
+            break;
+    }
+    dn[0] = tmp[new_loc];
+
+    return ;
+}
+
+/* 3/28/01, find minimal of dn[9] */
+
+Int FindMin(Int dn[])
+{
+    Int min, i;
+    Int dmin;
+
+    dmin = dn[1];
+    min = 1;
+    for (i = 2; i < 9; i++)
+    {
+        if (dn[i] < dmin)
+        {
+            dmin = dn[i];
+            min = i;
+        }
+    }
+
+    return min;
+}
+
+
+
diff --git a/media/libstagefright/codecs/m4v_h263/enc/src/mp4def.h b/media/libstagefright/codecs/m4v_h263/enc/src/mp4def.h
new file mode 100644
index 0000000..df1aa8b
--- /dev/null
+++ b/media/libstagefright/codecs/m4v_h263/enc/src/mp4def.h
@@ -0,0 +1,228 @@
+/* ------------------------------------------------------------------
+ * Copyright (C) 1998-2009 PacketVideo
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
+ * express or implied.
+ * See the License for the specific language governing permissions
+ * and limitations under the License.
+ * -------------------------------------------------------------------
+ */
+#ifndef _PVDECDEF_H_
+#define _PVDECDEF_H_
+
+#include <stdlib.h>
+#include <string.h>
+
+// Redefine the int types
+typedef uint8_t uint8;
+typedef uint16_t uint16;
+typedef int16_t int16;
+typedef uint32_t uint32;
+typedef int32_t int32;
+typedef unsigned int uint;
+
+/********** platform dependent in-line assembly *****************************/
+
+/*************** Intel *****************/
+
+/*************** ARM *****************/
+/* for general ARM instruction. #define __ARM has to be defined in compiler set up.*/
+/* for DSP MUL */
+#ifdef __TARGET_FEATURE_DSPMUL
+#define _ARM_DSP_MUL
+#endif
+
+/* for Count Leading Zero instruction */
+#ifdef __TARGET_ARCH_5T
+#define _ARM_CLZ
+#endif
+#ifdef __TARGET_ARCH_5TE
+#define _ARM_CLZ
+#endif
+/****************************************************************************/
+
+#ifndef _PV_TYPES_
+#define _PV_TYPES_
+typedef unsigned char UChar;
+typedef char Char;
+typedef unsigned int UInt;
+typedef int Int;
+typedef unsigned short UShort;
+typedef short Short;
+typedef short int SInt;
+typedef unsigned int Bool;
+typedef unsigned long   ULong;
+typedef void Void;
+
+#define PV_CODEC_INIT       0
+#define PV_CODEC_STOP       1
+#define PV_CODEC_RUNNING    2
+#define PV_CODEC_RESET      3
+#endif
+
+typedef enum
+{
+    PV_SUCCESS,
+    PV_FAIL,
+    PV_EOS,             /* hit End_Of_Sequence     */
+    PV_MB_STUFFING,     /* hit Macroblock_Stuffing */
+    PV_END_OF_VOP,      /* hit End_of_Video_Object_Plane */
+    PV_END_OF_MB,       /* hit End_of_Macroblock */
+    PV_END_OF_BUF       /* hit End_of_Bitstream_Buffer */
+} PV_STATUS;
+
+typedef UChar PIXEL;
+//typedef Int MOT;   /* : "int" type runs faster on RISC machine */
+
+#define HTFM            /*  3/2/01, Hypothesis Test Fast Matching for early drop-out*/
+//#define _MOVE_INTERFACE
+
+//#define RANDOM_REFSELCODE
+
+/* handle the case of devision by zero in RC */
+#define MAD_MIN 1
+
+/* 4/11/01, if SSE or MMX, no HTFM, no SAD_HP_FLY */
+
+/* Code size reduction related Macros */
+#ifdef H263_ONLY
+#ifndef NO_RVLC
+#define NO_RVLC
+#endif
+#ifndef NO_MPEG_QUANT
+#define NO_MPEG_QUANT
+#endif
+#ifndef NO_INTER4V
+#define NO_INTER4V
+#endif
+#endif
+/**************************************/
+
+#define TRUE    1
+#define FALSE   0
+
+#define PV_ABS(x)       (((x)<0)? -(x) : (x))
+#define PV_SIGN(x)      (((x)<0)? -1 : 1)
+#define PV_SIGN0(a)     (((a)<0)? -1 : (((a)>0) ? 1 : 0))
+#define PV_MAX(a,b)     ((a)>(b)? (a):(b))
+#define PV_MIN(a,b)     ((a)<(b)? (a):(b))
+
+#define MODE_INTRA      0
+#define MODE_INTER      1
+#define MODE_INTRA_Q    2
+#define MODE_INTER_Q    3
+#define MODE_INTER4V    4
+#define MODE_SKIPPED    6
+
+#define I_VOP       0
+#define P_VOP       1
+#define B_VOP       2
+
+/*09/04/00 Add MB height and width */
+#define MB_WIDTH 16
+#define MB_HEIGHT 16
+
+#define VOP_BRIGHT_WHITEENC 255
+
+
+#define LUMINANCE_DC_TYPE   1
+#define CHROMINANCE_DC_TYPE 2
+
+#define EOB_CODE                        1
+#define EOB_CODE_LENGTH                32
+
+/* 11/30/98 */
+#define FoundRM     1   /* Resync Marker */
+#define FoundVSC    2   /* VOP_START_CODE. */
+#define FoundGSC    3   /* GROUP_START_CODE */
+#define FoundEOB    4   /* EOB_CODE */
+
+
+/* 05/08/2000, the error code returned from BitstreamShowBits() */
+#define BITSTREAM_ERROR_CODE 0xFFFFFFFF
+
+/* PacketVideo "absolution timestamp" object.  06/13/2000 */
+#define PVTS_START_CODE         0x01C4
+#define PVTS_START_CODE_LENGTH  32
+
+/* session layer and vop layer start codes */
+
+#define SESSION_START_CODE  0x01B0
+#define SESSION_END_CODE    0x01B1
+#define VISUAL_OBJECT_START_CODE 0x01B5
+
+#define VO_START_CODE           0x8
+#define VO_HEADER_LENGTH        32      /* lengtho of VO header: VO_START_CODE +  VO_ID */
+
+#define SOL_START_CODE          0x01BE
+#define SOL_START_CODE_LENGTH   32
+
+#define VOL_START_CODE 0x12
+#define VOL_START_CODE_LENGTH 28
+
+#define VOP_START_CODE 0x1B6
+#define VOP_START_CODE_LENGTH   32
+
+#define GROUP_START_CODE    0x01B3
+#define GROUP_START_CODE_LENGTH  32
+
+#define VOP_ID_CODE_LENGTH      5
+#define VOP_TEMP_REF_CODE_LENGTH    16
+
+#define USER_DATA_START_CODE        0x01B2
+#define USER_DATA_START_CODE_LENGTH 32
+
+#define START_CODE_PREFIX       0x01
+#define START_CODE_PREFIX_LENGTH    24
+
+#define SHORT_VIDEO_START_MARKER         0x20
+#define SHORT_VIDEO_START_MARKER_LENGTH  22
+#define SHORT_VIDEO_END_MARKER            0x3F
+#define GOB_RESYNC_MARKER         0x01
+#define GOB_RESYNC_MARKER_LENGTH  17
+
+/* motion and resync markers used in error resilient mode  */
+
+#define DC_MARKER                      438273
+#define DC_MARKER_LENGTH                19
+
+#define MOTION_MARKER_COMB             126977
+#define MOTION_MARKER_COMB_LENGTH       17
+
+#define MOTION_MARKER_SEP              81921
+#define MOTION_MARKER_SEP_LENGTH        17
+
+#define RESYNC_MARKER           1
+#define RESYNC_MARKER_LENGTH    17
+
+#define SPRITE_NOT_USED     0
+#define STATIC_SPRITE       1
+#define ONLINE_SPRITE       2
+#define GMC_SPRITE      3
+
+/* macroblock and block size */
+#define MB_SIZE 16
+#define NCOEFF_MB (MB_SIZE*MB_SIZE)
+#define B_SIZE 8
+#define NCOEFF_BLOCK (B_SIZE*B_SIZE)
+#define NCOEFF_Y NCOEFF_MB
+#define NCOEFF_U NCOEFF_BLOCK
+#define NCOEFF_V NCOEFF_BLOCK
+
+/* overrun buffer size  */
+#define DEFAULT_OVERRUN_BUFFER_SIZE 1000
+
+
+/* VLC decoding related definitions */
+#define VLC_ERROR   (-1)
+#define VLC_ESCAPE  7167
+
+#endif /* _PVDECDEF_H_ */
diff --git a/media/libstagefright/codecs/m4v_h263/enc/src/mp4enc_api.cpp b/media/libstagefright/codecs/m4v_h263/enc/src/mp4enc_api.cpp
new file mode 100644
index 0000000..946e3d0
--- /dev/null
+++ b/media/libstagefright/codecs/m4v_h263/enc/src/mp4enc_api.cpp
@@ -0,0 +1,3278 @@
+/* ------------------------------------------------------------------
+ * Copyright (C) 1998-2009 PacketVideo
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
+ * express or implied.
+ * See the License for the specific language governing permissions
+ * and limitations under the License.
+ * -------------------------------------------------------------------
+ */
+
+#include "mp4enc_lib.h"
+#include "bitstream_io.h"
+#include "rate_control.h"
+#include "m4venc_oscl.h"
+
+
+/* Inverse normal zigzag */
+const static Int zigzag_i[NCOEFF_BLOCK] =
+{
+    0, 1, 8, 16, 9, 2, 3, 10,
+    17, 24, 32, 25, 18, 11, 4, 5,
+    12, 19, 26, 33, 40, 48, 41, 34,
+    27, 20, 13, 6, 7, 14, 21, 28,
+    35, 42, 49, 56, 57, 50, 43, 36,
+    29, 22, 15, 23, 30, 37, 44, 51,
+    58, 59, 52, 45, 38, 31, 39, 46,
+    53, 60, 61, 54, 47, 55, 62, 63
+};
+
+/* INTRA */
+const static Int mpeg_iqmat_def[NCOEFF_BLOCK] =
+    {  8, 17, 18, 19, 21, 23, 25, 27,
+       17, 18, 19, 21, 23, 25, 27, 28,
+       20, 21, 22, 23, 24, 26, 28, 30,
+       21, 22, 23, 24, 26, 28, 30, 32,
+       22, 23, 24, 26, 28, 30, 32, 35,
+       23, 24, 26, 28, 30, 32, 35, 38,
+       25, 26, 28, 30, 32, 35, 38, 41,
+       27, 28, 30, 32, 35, 38, 41, 45
+    };
+
+/* INTER */
+const static Int mpeg_nqmat_def[64]  =
+    { 16, 17, 18, 19, 20, 21, 22, 23,
+      17, 18, 19, 20, 21, 22, 23, 24,
+      18, 19, 20, 21, 22, 23, 24, 25,
+      19, 20, 21, 22, 23, 24, 26, 27,
+      20, 21, 22, 23, 25, 26, 27, 28,
+      21, 22, 23, 24, 26, 27, 28, 30,
+      22, 23, 24, 26, 27, 28, 30, 31,
+      23, 24, 25, 27, 28, 30, 31, 33
+    };
+
+/* Profiles and levels */
+/* Simple profile(level 0-3) and Core profile (level 1-2) */
+/* {SPL0, SPL1, SPL2, SPL3, CPL1, CPL2, CPL2, CPL2} , SPL0: Simple Profile@Level0, CPL1: Core Profile@Level1, the last two are redundant for easy table manipulation */
+const static Int profile_level_code[8] =
+{
+    0x08, 0x01, 0x02, 0x03, 0x21, 0x22, 0x22, 0x22
+};
+
+const static Int profile_level_max_bitrate[8] =
+{
+    64000, 64000, 128000, 384000, 384000, 2000000, 2000000, 2000000
+};
+
+const static Int profile_level_max_packet_size[8] =
+{
+    2048, 2048, 4096, 8192, 4096, 8192, 8192, 8192
+};
+
+const static Int profile_level_max_mbsPerSec[8] =
+{
+    1485, 1485, 5940, 11880, 5940, 23760, 23760, 23760
+};
+
+const static Int profile_level_max_VBV_size[8] =
+{
+    163840, 163840, 655360, 655360, 262144, 1310720, 1310720, 1310720
+};
+
+
+/* Simple scalable profile (level 0-2) and Core scalable profile (level 1-3) */
+/* {SSPL0, SSPL1, SSPL2, SSPL2, CSPL1, CSPL2, CSPL3, CSPL3} , SSPL0: Simple Scalable Profile@Level0, CSPL1: Core Scalable Profile@Level1, the fourth is redundant for easy table manipulation */
+
+const static Int scalable_profile_level_code[8] =
+{
+    0x10, 0x11, 0x12, 0x12, 0xA1, 0xA2, 0xA3, 0xA3
+};
+
+const static Int scalable_profile_level_max_bitrate[8] =
+{
+    128000, 128000, 256000, 256000, 768000, 1500000, 4000000, 4000000
+};
+
+/* in bits */
+const static Int scalable_profile_level_max_packet_size[8] =
+{
+    2048, 2048, 4096, 4096, 4096, 4096, 16384, 16384
+};
+
+const static Int scalable_profile_level_max_mbsPerSec[8] =
+{
+    1485, 7425, 23760, 23760, 14850, 29700, 120960, 120960
+};
+
+const static Int scalable_profile_level_max_VBV_size[8] =
+{
+    163840, 655360, 655360, 655360, 1048576, 1310720, 1310720, 1310720
+};
+
+
+/* H263 profile 0 @ level 10-70 */
+const static Int   h263Level[8] = {0, 10, 20, 30, 40, 50, 60, 70};
+const static float rBR_bound[8] = {0, 1, 2, 6, 32, 64, 128, 256};
+const static float max_h263_framerate[2] = {(float)30000 / (float)2002,
+        (float)30000 / (float)1001
+                                           };
+const static Int   max_h263_width[2]  = {176, 352};
+const static Int   max_h263_height[2] = {144, 288};
+
+/* 6/2/2001, newly added functions to make PVEncodeVop more readable. */
+Int DetermineCodingLayer(VideoEncData *video, Int *nLayer, ULong modTime);
+void DetermineVopType(VideoEncData *video, Int currLayer);
+Int UpdateSkipNextFrame(VideoEncData *video, ULong *modTime, Int *size, PV_STATUS status);
+Bool SetProfile_BufferSize(VideoEncData *video, float delay, Int bInitialized);
+
+#ifdef PRINT_RC_INFO
+extern FILE *facct;
+extern int tiTotalNumBitsGenerated;
+extern int iStuffBits;
+#endif
+
+#ifdef PRINT_EC
+extern FILE *fec;
+#endif
+
+
+/* ======================================================================== */
+/*  Function : PVGetDefaultEncOption()                                      */
+/*  Date     : 12/12/2005                                                   */
+/*  Purpose  :                                                              */
+/*  In/out   :                                                              */
+/*  Return   : PV_TRUE if successed, PV_FALSE if failed.                    */
+/*  Modified :                                                              */
+/*                                                                          */
+/* ======================================================================== */
+
+OSCL_EXPORT_REF Bool PVGetDefaultEncOption(VideoEncOptions *encOption, Int encUseCase)
+{
+    VideoEncOptions defaultUseCase = {H263_MODE, profile_level_max_packet_size[SIMPLE_PROFILE_LEVEL0] >> 3,
+                                      SIMPLE_PROFILE_LEVEL0, PV_OFF, 0, 1, 1000, 33, {144, 144}, {176, 176}, {15, 30}, {64000, 128000},
+                                      {10, 10}, {12, 12}, {0, 0}, CBR_1, 0.0, PV_OFF, -1, 0, PV_OFF, 16, PV_OFF, 0, PV_ON
+                                     };
+
+    OSCL_UNUSED_ARG(encUseCase); // unused for now. Later we can add more defaults setting and use this
+    // argument to select the right one.
+    /* in the future we can create more meaningful use-cases */
+    if (encOption == NULL)
+    {
+        return PV_FALSE;
+    }
+
+    M4VENC_MEMCPY(encOption, &defaultUseCase, sizeof(VideoEncOptions));
+
+    return PV_TRUE;
+}
+
+/* ======================================================================== */
+/*  Function : PVInitVideoEncoder()                                         */
+/*  Date     : 08/22/2000                                                   */
+/*  Purpose  : Initialization of MP4 Encoder and VO bitstream               */
+/*  In/out   :                                                              */
+/*  Return   : PV_TRUE if successed, PV_FALSE if failed.                    */
+/*  Modified :  5/21/01, allocate only yChan and assign uChan & vChan   */
+/*              12/12/05, add encoding option as input argument         */
+/* ======================================================================== */
+OSCL_EXPORT_REF Bool    PVInitVideoEncoder(VideoEncControls *encoderControl, VideoEncOptions *encOption)
+{
+
+    Bool        status = PV_TRUE;
+    Int         nLayers, idx, i, j;
+    Int         max = 0, max_width = 0, max_height = 0, pitch, offset;
+    Int         size = 0, nTotalMB = 0;
+    VideoEncData *video;
+    Vol         *pVol;
+    VideoEncParams  *pEncParams;
+    Int         temp_w, temp_h, mbsPerSec;
+
+    /******************************************/
+    /*      this part use to be PVSetEncode() */
+    Int profile_table_index, *profile_level_table;
+    Int profile_level = encOption->profile_level;
+    Int PacketSize = encOption->packetSize << 3;
+    Int timeInc, timeIncRes;
+    float profile_max_framerate;
+    VideoEncParams *encParams;
+
+    if (encoderControl->videoEncoderData) /* this has been called */
+    {
+        if (encoderControl->videoEncoderInit) /* check if PVInitVideoEncoder() has been called  */
+        {
+            PVCleanUpVideoEncoder(encoderControl);
+            encoderControl->videoEncoderInit = 0;
+        }
+
+        M4VENC_FREE(encoderControl->videoEncoderData);
+        encoderControl->videoEncoderData = NULL;
+    }
+    encoderControl->videoEncoderInit = 0;   /* reset this value */
+
+    video = (VideoEncData *)M4VENC_MALLOC(sizeof(VideoEncData)); /* allocate memory for encData */
+
+    if (video == NULL)
+        return PV_FALSE;
+
+    M4VENC_MEMSET(video, 0, sizeof(VideoEncData));
+
+    encoderControl->videoEncoderData = (void *) video;         /* set up pointer in VideoEncData structure */
+
+    video->encParams = (VideoEncParams *)M4VENC_MALLOC(sizeof(VideoEncParams));
+    if (video->encParams == NULL)
+        goto CLEAN_UP;
+
+    M4VENC_MEMSET(video->encParams, 0, sizeof(VideoEncParams));
+
+    encParams = video->encParams;
+    encParams->nLayers = encOption->numLayers;
+
+    /* Check whether the input packetsize is valid (Note: put code here (before any memory allocation) in order to avoid memory leak */
+    if ((Int)profile_level < (Int)(SIMPLE_SCALABLE_PROFILE_LEVEL0))  /* non-scalable profile */
+    {
+        profile_level_table = (Int *)profile_level_max_packet_size;
+        profile_table_index = (Int)profile_level;
+        if (encParams->nLayers != 1)
+        {
+            goto CLEAN_UP;
+        }
+
+        encParams->LayerMaxMbsPerSec[0] = profile_level_max_mbsPerSec[profile_table_index];
+
+    }
+    else   /* scalable profile */
+    {
+        profile_level_table = (Int *)scalable_profile_level_max_packet_size;
+        profile_table_index = (Int)profile_level - (Int)(SIMPLE_SCALABLE_PROFILE_LEVEL0);
+        if (encParams->nLayers < 2)
+        {
+            goto CLEAN_UP;
+        }
+        for (i = 0; i < encParams->nLayers; i++)
+        {
+            encParams->LayerMaxMbsPerSec[i] = scalable_profile_level_max_mbsPerSec[profile_table_index];
+        }
+
+    }
+
+    /* cannot have zero size packet with these modes */
+    if (PacketSize == 0)
+    {
+        if (encOption->encMode == DATA_PARTITIONING_MODE)
+        {
+            goto CLEAN_UP;
+        }
+        if (encOption->encMode == COMBINE_MODE_WITH_ERR_RES)
+        {
+            encOption->encMode = COMBINE_MODE_NO_ERR_RES;
+        }
+    }
+
+    if (encOption->gobHeaderInterval == 0)
+    {
+        if (encOption->encMode == H263_MODE_WITH_ERR_RES)
+        {
+            encOption->encMode = H263_MODE;
+        }
+
+        if (encOption->encMode == SHORT_HEADER_WITH_ERR_RES)
+        {
+            encOption->encMode = SHORT_HEADER;
+        }
+    }
+
+    if (PacketSize > profile_level_table[profile_table_index])
+        goto CLEAN_UP;
+
+    /* Initial Defaults for all Modes */
+
+    encParams->SequenceStartCode = 1;
+    encParams->GOV_Enabled = 0;
+    encParams->RoundingType = 0;
+    encParams->IntraDCVlcThr = PV_MAX(PV_MIN(encOption->intraDCVlcTh, 7), 0);
+    encParams->ACDCPrediction = ((encOption->useACPred == PV_ON) ? TRUE : FALSE);
+    encParams->RC_Type = encOption->rcType;
+    encParams->Refresh = encOption->numIntraMB;
+    encParams->ResyncMarkerDisable = 0; /* Enable Resync Marker */
+
+    for (i = 0; i < encOption->numLayers; i++)
+    {
+#ifdef NO_MPEG_QUANT
+        encParams->QuantType[i] = 0;
+#else
+        encParams->QuantType[i] = encOption->quantType[i];      /* H263 */
+#endif
+        if (encOption->pQuant[i] >= 1 && encOption->pQuant[i] <= 31)
+        {
+            encParams->InitQuantPvop[i] = encOption->pQuant[i];
+        }
+        else
+        {
+            goto CLEAN_UP;
+        }
+        if (encOption->iQuant[i] >= 1 && encOption->iQuant[i] <= 31)
+        {
+            encParams->InitQuantIvop[i] = encOption->iQuant[i];
+        }
+        else
+        {
+            goto CLEAN_UP;
+        }
+    }
+
+    encParams->HalfPel_Enabled = 1;
+    encParams->SearchRange = encOption->searchRange; /* 4/16/2001 */
+    encParams->FullSearch_Enabled = 0;
+#ifdef NO_INTER4V
+    encParams->MV8x8_Enabled = 0;
+#else
+    encParams->MV8x8_Enabled = 0;// comment out for now!! encOption->mv8x8Enable;
+#endif
+    encParams->H263_Enabled = 0;
+    encParams->GOB_Header_Interval = 0; // need to be reset to 0
+    encParams->IntraPeriod = encOption->intraPeriod;    /* Intra update period update default*/
+    encParams->SceneChange_Det = encOption->sceneDetect;
+    encParams->FineFrameSkip_Enabled = 0;
+    encParams->NoFrameSkip_Enabled = encOption->noFrameSkipped;
+    encParams->NoPreSkip_Enabled = encOption->noFrameSkipped;
+    encParams->GetVolHeader[0] = 0;
+    encParams->GetVolHeader[1] = 0;
+    encParams->ResyncPacketsize = encOption->packetSize << 3;
+    encParams->LayerMaxBitRate[0] = 0;
+    encParams->LayerMaxBitRate[1] = 0;
+    encParams->LayerMaxFrameRate[0] = (float)0.0;
+    encParams->LayerMaxFrameRate[1] = (float)0.0;
+    encParams->VBV_delay = encOption->vbvDelay;  /* 2sec VBV buffer size */
+
+    switch (encOption->encMode)
+    {
+
+        case SHORT_HEADER:
+        case SHORT_HEADER_WITH_ERR_RES:
+
+            /* From Table 6-26 */
+            encParams->nLayers = 1;
+            encParams->QuantType[0] = 0;    /*H263 */
+            encParams->ResyncMarkerDisable = 1; /* Disable Resync Marker */
+            encParams->DataPartitioning = 0; /* Combined Mode */
+            encParams->ReversibleVLC = 0;   /* Disable RVLC */
+            encParams->RoundingType = 0;
+            encParams->IntraDCVlcThr = 7;   /* use_intra_dc_vlc = 0 */
+            encParams->MV8x8_Enabled = 0;
+
+            encParams->GOB_Header_Interval = encOption->gobHeaderInterval;
+            encParams->H263_Enabled = 2;
+            encParams->GOV_Enabled = 0;
+            encParams->TimeIncrementRes = 30000;        /* timeIncrementRes for H263 */
+            break;
+
+        case H263_MODE:
+        case H263_MODE_WITH_ERR_RES:
+
+            /* From Table 6-26 */
+            encParams->nLayers = 1;
+            encParams->QuantType[0] = 0;    /*H263 */
+            encParams->ResyncMarkerDisable = 1; /* Disable Resync Marker */
+            encParams->DataPartitioning = 0; /* Combined Mode */
+            encParams->ReversibleVLC = 0;   /* Disable RVLC */
+            encParams->RoundingType = 0;
+            encParams->IntraDCVlcThr = 7;   /* use_intra_dc_vlc = 0 */
+            encParams->MV8x8_Enabled = 0;
+
+            encParams->H263_Enabled = 1;
+            encParams->GOV_Enabled = 0;
+            encParams->TimeIncrementRes = 30000;        /* timeIncrementRes for H263 */
+
+            break;
+#ifndef H263_ONLY
+        case DATA_PARTITIONING_MODE:
+
+            encParams->DataPartitioning = 1;        /* Base Layer Data Partitioning */
+            encParams->ResyncMarkerDisable = 0; /* Resync Marker */
+#ifdef NO_RVLC
+            encParams->ReversibleVLC = 0;
+#else
+            encParams->ReversibleVLC = (encOption->rvlcEnable == PV_ON); /* RVLC when Data Partitioning */
+#endif
+            encParams->ResyncPacketsize = PacketSize;
+            break;
+
+        case COMBINE_MODE_WITH_ERR_RES:
+
+            encParams->DataPartitioning = 0;        /* Combined Mode */
+            encParams->ResyncMarkerDisable = 0; /* Resync Marker */
+            encParams->ReversibleVLC = 0;           /* No RVLC */
+            encParams->ResyncPacketsize = PacketSize;
+            break;
+
+        case COMBINE_MODE_NO_ERR_RES:
+
+            encParams->DataPartitioning = 0;        /* Combined Mode */
+            encParams->ResyncMarkerDisable = 1; /* Disable Resync Marker */
+            encParams->ReversibleVLC = 0;           /* No RVLC */
+            break;
+#endif
+        default:
+            goto CLEAN_UP;
+    }
+    /* Set the constraints (maximum values) according to the input profile and level */
+    /* Note that profile_table_index is already figured out above */
+
+    /* base layer */
+    encParams->profile_table_index    = profile_table_index; /* Used to limit the profile and level in SetProfile_BufferSize() */
+
+    /* check timeIncRes */
+    timeIncRes = encOption->timeIncRes;
+    timeInc = encOption->tickPerSrc;
+
+    if ((timeIncRes >= 1) && (timeIncRes <= 65536) && (timeInc < timeIncRes) && (timeInc != 0))
+    {
+        if (!encParams->H263_Enabled)
+        {
+            encParams->TimeIncrementRes = timeIncRes;
+        }
+        else
+        {
+            encParams->TimeIncrementRes = 30000;
+//          video->FrameRate = 30000/(float)1001; /* fix it to 29.97 fps */
+        }
+        video->FrameRate = timeIncRes / ((float)timeInc);
+    }
+    else
+    {
+        goto CLEAN_UP;
+    }
+
+    /* check frame dimension */
+    if (encParams->H263_Enabled)
+    {
+        switch (encOption->encWidth[0])
+        {
+            case 128:
+                if (encOption->encHeight[0] != 96) /* source_format = 1 */
+                    goto CLEAN_UP;
+                break;
+            case 176:
+                if (encOption->encHeight[0] != 144) /* source_format = 2 */
+                    goto CLEAN_UP;
+                break;
+            case 352:
+                if (encOption->encHeight[0] != 288) /* source_format = 2 */
+                    goto CLEAN_UP;
+                break;
+
+            case 704:
+                if (encOption->encHeight[0] != 576) /* source_format = 2 */
+                    goto CLEAN_UP;
+                break;
+            case 1408:
+                if (encOption->encHeight[0] != 1152) /* source_format = 2 */
+                    goto CLEAN_UP;
+                break;
+
+            default:
+                goto CLEAN_UP;
+        }
+    }
+    for (i = 0; i < encParams->nLayers; i++)
+    {
+        encParams->LayerHeight[i] = encOption->encHeight[i];
+        encParams->LayerWidth[i] = encOption->encWidth[i];
+    }
+
+    /* check frame rate */
+    for (i = 0; i < encParams->nLayers; i++)
+    {
+        encParams->LayerFrameRate[i] = encOption->encFrameRate[i];
+    }
+
+    if (encParams->nLayers > 1)
+    {
+        if (encOption->encFrameRate[0] == encOption->encFrameRate[1] ||
+                encOption->encFrameRate[0] == 0. || encOption->encFrameRate[1] == 0.) /* 7/31/03 */
+            goto CLEAN_UP;
+    }
+    /* set max frame rate */
+    for (i = 0; i < encParams->nLayers; i++)
+    {
+
+        /* Make sure the maximum framerate is consistent with the given profile and level */
+        nTotalMB = ((encParams->LayerWidth[i] + 15) / 16) * ((encParams->LayerHeight[i] + 15) / 16);
+
+        if (nTotalMB > 0)
+            profile_max_framerate = (float)encParams->LayerMaxMbsPerSec[i] / (float)nTotalMB;
+
+        else
+            profile_max_framerate = (float)30.0;
+
+        encParams->LayerMaxFrameRate[i] = PV_MIN(profile_max_framerate, encParams->LayerFrameRate[i]);
+    }
+
+    /* check bit rate */
+    /* set max bit rate */
+    for (i = 0; i < encParams->nLayers; i++)
+    {
+        encParams->LayerBitRate[i] = encOption->bitRate[i];
+        encParams->LayerMaxBitRate[i] = encOption->bitRate[i];
+    }
+    if (encParams->nLayers > 1)
+    {
+        if (encOption->bitRate[0] == encOption->bitRate[1] ||
+                encOption->bitRate[0] == 0 || encOption->bitRate[1] == 0) /* 7/31/03 */
+            goto CLEAN_UP;
+    }
+    /* check rate control and vbv delay*/
+    encParams->RC_Type = encOption->rcType;
+
+    if (encOption->vbvDelay == 0.0) /* set to default */
+    {
+        switch (encOption->rcType)
+        {
+            case CBR_1:
+            case CBR_2:
+                encParams->VBV_delay = (float)2.0; /* default 2sec VBV buffer size */
+                break;
+
+            case CBR_LOWDELAY:
+                encParams->VBV_delay = (float)0.5; /* default 0.5sec VBV buffer size */
+                break;
+
+            case VBR_1:
+            case VBR_2:
+                encParams->VBV_delay = (float)10.0; /* default 10sec VBV buffer size */
+                break;
+            default:
+                break;
+        }
+    }
+    else /* force this value */
+    {
+        encParams->VBV_delay = encOption->vbvDelay;
+    }
+
+    /* check search range */
+    if (encParams->H263_Enabled && encOption->searchRange > 16)
+    {
+        encParams->SearchRange = 16; /* 4/16/2001 */
+    }
+
+    /*****************************************/
+    /* checking for conflict between options */
+    /*****************************************/
+
+    if (video->encParams->RC_Type == CBR_1 || video->encParams->RC_Type == CBR_2 || video->encParams->RC_Type == CBR_LOWDELAY)  /* if CBR */
+    {
+#ifdef _PRINT_STAT
+        if (video->encParams->NoFrameSkip_Enabled == PV_ON ||
+                video->encParams->NoPreSkip_Enabled == PV_ON) /* don't allow frame skip*/
+            printf("WARNING!!!! CBR with NoFrameSkip\n");
+#endif
+    }
+    else if (video->encParams->RC_Type == CONSTANT_Q)   /* constant_Q */
+    {
+        video->encParams->NoFrameSkip_Enabled = PV_ON;  /* no frame skip */
+        video->encParams->NoPreSkip_Enabled = PV_ON;    /* no frame skip */
+#ifdef _PRINT_STAT
+        printf("Turn on NoFrameSkip\n");
+#endif
+    }
+
+    if (video->encParams->NoFrameSkip_Enabled == PV_ON) /* if no frame skip */
+    {
+        video->encParams->FineFrameSkip_Enabled = PV_OFF;
+#ifdef _PRINT_STAT
+        printf("NoFrameSkip !!! may violate VBV_BUFFER constraint.\n");
+        printf("Turn off FineFrameSkip\n");
+#endif
+    }
+
+    /******************************************/
+    /******************************************/
+
+    nLayers = video->encParams->nLayers; /* Number of Layers to be encoded */
+
+    /* Find the maximum width*height for memory allocation of the VOPs */
+    for (idx = 0; idx < nLayers; idx++)
+    {
+        temp_w = video->encParams->LayerWidth[idx];
+        temp_h = video->encParams->LayerHeight[idx];
+
+        if ((temp_w*temp_h) > max)
+        {
+            max = temp_w * temp_h;
+            max_width = ((temp_w + 15) >> 4) << 4;
+            max_height = ((temp_h + 15) >> 4) << 4;
+            nTotalMB = ((max_width * max_height) >> 8);
+        }
+
+        /* Check if the video size and framerate(MBsPerSec) are vald */
+        mbsPerSec = (Int)(nTotalMB * video->encParams->LayerFrameRate[idx]);
+        if (mbsPerSec > video->encParams->LayerMaxMbsPerSec[idx]) status = PV_FALSE;
+    }
+
+    /****************************************************/
+    /* Set Profile and Video Buffer Size for each layer */
+    /****************************************************/
+    if (video->encParams->RC_Type == CBR_LOWDELAY) video->encParams->VBV_delay = 0.5; /* For CBR_LOWDELAY, we set 0.5sec buffer */
+    status = SetProfile_BufferSize(video, video->encParams->VBV_delay, 1);
+    if (status != PV_TRUE)
+        goto CLEAN_UP;
+
+    /****************************************/
+    /* memory allocation and initialization */
+    /****************************************/
+
+    if (video == NULL) goto CLEAN_UP;
+
+    /* cyclic reference for passing through both structures */
+    video->videoEncControls = encoderControl;
+
+    //video->currLayer = 0; /* Set current Layer to 0 */
+    //video->currFrameNo = 0; /* Set current frame Number to 0 */
+    video->nextModTime = 0;
+    video->nextEncIVop = 0; /* Sets up very first frame to be I-VOP! */
+    video->numVopsInGOP = 0; /* counter for Vops in Gop, 2/8/01 */
+
+    //video->frameRate = video->encParams->LayerFrameRate[0]; /* Set current layer frame rate */
+
+    video->QPMB = (UChar *) M4VENC_MALLOC(nTotalMB * sizeof(UChar)); /* Memory for MB quantizers */
+    if (video->QPMB == NULL) goto CLEAN_UP;
+
+
+    video->headerInfo.Mode = (UChar *) M4VENC_MALLOC(sizeof(UChar) * nTotalMB); /* Memory for MB Modes */
+    if (video->headerInfo.Mode == NULL) goto CLEAN_UP;
+    video->headerInfo.CBP = (UChar *) M4VENC_MALLOC(sizeof(UChar) * nTotalMB);   /* Memory for CBP (Y and C) of each MB */
+    if (video->headerInfo.CBP == NULL) goto CLEAN_UP;
+
+    /* Allocating motion vector space and interpolation memory*/
+
+    video->mot = (MOT **)M4VENC_MALLOC(sizeof(MOT *) * nTotalMB);
+    if (video->mot == NULL) goto CLEAN_UP;
+
+    for (idx = 0; idx < nTotalMB; idx++)
+    {
+        video->mot[idx] = (MOT *)M4VENC_MALLOC(sizeof(MOT) * 8);
+        if (video->mot[idx] == NULL)
+        {
+            goto CLEAN_UP;
+        }
+    }
+
+    video->intraArray = (UChar *)M4VENC_MALLOC(sizeof(UChar) * nTotalMB);
+    if (video->intraArray == NULL) goto CLEAN_UP;
+
+    video->sliceNo = (UChar *) M4VENC_MALLOC(nTotalMB); /* Memory for Slice Numbers */
+    if (video->sliceNo == NULL) goto CLEAN_UP;
+    /* Allocating space for predDCAC[][8][16], Not that I intentionally  */
+    /*    increase the dimension of predDCAC from [][6][15] to [][8][16] */
+    /*    so that compilers can generate faster code to indexing the     */
+    /*    data inside (by using << instead of *).         04/14/2000. */
+    /* 5/29/01, use  decoder lib ACDC prediction memory scheme.  */
+    video->predDC = (typeDCStore *) M4VENC_MALLOC(nTotalMB * sizeof(typeDCStore));
+    if (video->predDC == NULL) goto CLEAN_UP;
+
+    if (!video->encParams->H263_Enabled)
+    {
+        video->predDCAC_col = (typeDCACStore *) M4VENC_MALLOC(((max_width >> 4) + 1) * sizeof(typeDCACStore));
+        if (video->predDCAC_col == NULL) goto CLEAN_UP;
+
+        /* element zero will be used for storing vertical (col) AC coefficients */
+        /*  the rest will be used for storing horizontal (row) AC coefficients  */
+        video->predDCAC_row = video->predDCAC_col + 1;        /*  ACDC */
+
+        video->acPredFlag = (Int *) M4VENC_MALLOC(nTotalMB * sizeof(Int)); /* Memory for acPredFlag */
+        if (video->acPredFlag == NULL) goto CLEAN_UP;
+    }
+
+    video->outputMB = (MacroBlock *) M4VENC_MALLOC(sizeof(MacroBlock)); /* Allocating macroblock space */
+    if (video->outputMB == NULL) goto CLEAN_UP;
+    M4VENC_MEMSET(video->outputMB->block[0], 0, (sizeof(Short) << 6)*6);
+
+    M4VENC_MEMSET(video->dataBlock, 0, sizeof(Short) << 7);
+    /* Allocate (2*packetsize) working bitstreams */
+
+    video->bitstream1 = BitStreamCreateEnc(2 * 4096); /*allocate working stream 1*/
+    if (video->bitstream1 == NULL) goto CLEAN_UP;
+    video->bitstream2 = BitStreamCreateEnc(2 * 4096); /*allocate working stream 2*/
+    if (video->bitstream2 == NULL) goto CLEAN_UP;
+    video->bitstream3 = BitStreamCreateEnc(2 * 4096); /*allocate working stream 3*/
+    if (video->bitstream3 == NULL) goto CLEAN_UP;
+
+    /* allocate overrun buffer */
+    // this buffer is used when user's buffer is too small to hold one frame.
+    // It is not needed for slice-based encoding.
+    if (nLayers == 1)
+    {
+        video->oBSize = encParams->BufferSize[0] >> 3;
+    }
+    else
+    {
+        video->oBSize = PV_MAX((encParams->BufferSize[0] >> 3), (encParams->BufferSize[1] >> 3));
+    }
+
+    if (video->oBSize > DEFAULT_OVERRUN_BUFFER_SIZE || encParams->RC_Type == CONSTANT_Q) // set limit
+    {
+        video->oBSize = DEFAULT_OVERRUN_BUFFER_SIZE;
+    }
+    video->overrunBuffer = (UChar*) M4VENC_MALLOC(sizeof(UChar) * video->oBSize);
+    if (video->overrunBuffer == NULL) goto CLEAN_UP;
+
+
+    video->currVop = (Vop *) M4VENC_MALLOC(sizeof(Vop)); /* Memory for Current VOP */
+    if (video->currVop == NULL) goto CLEAN_UP;
+
+    /* add padding, 09/19/05 */
+    if (video->encParams->H263_Enabled) /* make it conditional  11/28/05 */
+    {
+        pitch = max_width;
+        offset = 0;
+    }
+    else
+    {
+        pitch = max_width + 32;
+        offset = (pitch << 4) + 16;
+        max_height += 32;
+    }
+    size = pitch * max_height;
+
+    video->currVop->yChan = (PIXEL *)M4VENC_MALLOC(sizeof(PIXEL) * (size + (size >> 1))); /* Memory for currVop Y */
+    if (video->currVop->yChan == NULL) goto CLEAN_UP;
+    video->currVop->uChan = video->currVop->yChan + size;/* Memory for currVop U */
+    video->currVop->vChan = video->currVop->uChan + (size >> 2);/* Memory for currVop V */
+
+    /* shift for the offset */
+    if (offset)
+    {
+        video->currVop->yChan += offset; /* offset to the origin.*/
+        video->currVop->uChan += (offset >> 2) + 4;
+        video->currVop->vChan += (offset >> 2) + 4;
+    }
+
+    video->forwardRefVop = video->currVop;      /*  Initialize forwardRefVop */
+    video->backwardRefVop = video->currVop;     /*  Initialize backwardRefVop */
+
+    video->prevBaseVop = (Vop *) M4VENC_MALLOC(sizeof(Vop));         /* Memory for Previous Base Vop */
+    if (video->prevBaseVop == NULL) goto CLEAN_UP;
+    video->prevBaseVop->yChan = (PIXEL *) M4VENC_MALLOC(sizeof(PIXEL) * (size + (size >> 1))); /* Memory for prevBaseVop Y */
+    if (video->prevBaseVop->yChan == NULL) goto CLEAN_UP;
+    video->prevBaseVop->uChan = video->prevBaseVop->yChan + size; /* Memory for prevBaseVop U */
+    video->prevBaseVop->vChan = video->prevBaseVop->uChan + (size >> 2); /* Memory for prevBaseVop V */
+
+    if (offset)
+    {
+        video->prevBaseVop->yChan += offset; /* offset to the origin.*/
+        video->prevBaseVop->uChan += (offset >> 2) + 4;
+        video->prevBaseVop->vChan += (offset >> 2) + 4;
+    }
+
+
+    if (0) /* If B Frames */
+    {
+        video->nextBaseVop = (Vop *) M4VENC_MALLOC(sizeof(Vop));         /* Memory for Next Base Vop */
+        if (video->nextBaseVop == NULL) goto CLEAN_UP;
+        video->nextBaseVop->yChan = (PIXEL *) M4VENC_MALLOC(sizeof(PIXEL) * (size + (size >> 1))); /* Memory for nextBaseVop Y */
+        if (video->nextBaseVop->yChan == NULL) goto CLEAN_UP;
+        video->nextBaseVop->uChan = video->nextBaseVop->yChan + size; /* Memory for nextBaseVop U */
+        video->nextBaseVop->vChan = video->nextBaseVop->uChan + (size >> 2); /* Memory for nextBaseVop V */
+
+        if (offset)
+        {
+            video->nextBaseVop->yChan += offset; /* offset to the origin.*/
+            video->nextBaseVop->uChan += (offset >> 2) + 4;
+            video->nextBaseVop->vChan += (offset >> 2) + 4;
+        }
+    }
+
+    if (nLayers > 1)   /* If enhancement layers */
+    {
+        video->prevEnhanceVop = (Vop *) M4VENC_MALLOC(sizeof(Vop));      /* Memory for Previous Enhancement Vop */
+        if (video->prevEnhanceVop == NULL) goto CLEAN_UP;
+        video->prevEnhanceVop->yChan = (PIXEL *) M4VENC_MALLOC(sizeof(PIXEL) * (size + (size >> 1))); /* Memory for Previous Ehancement Y */
+        if (video->prevEnhanceVop->yChan == NULL) goto CLEAN_UP;
+        video->prevEnhanceVop->uChan = video->prevEnhanceVop->yChan + size; /* Memory for Previous Enhancement U */
+        video->prevEnhanceVop->vChan = video->prevEnhanceVop->uChan + (size >> 2); /* Memory for Previous Enhancement V */
+
+        if (offset)
+        {
+            video->prevEnhanceVop->yChan += offset; /* offset to the origin.*/
+            video->prevEnhanceVop->uChan += (offset >> 2) + 4;
+            video->prevEnhanceVop->vChan += (offset >> 2) + 4;
+        }
+    }
+
+    video->numberOfLayers = nLayers; /* Number of Layers */
+    video->sumMAD = 0;
+
+
+    /* 04/09/01, for Vops in the use multipass processing */
+    for (idx = 0; idx < nLayers; idx++)
+    {
+        video->pMP[idx] = (MultiPass *)M4VENC_MALLOC(sizeof(MultiPass));
+        if (video->pMP[idx] == NULL)    goto CLEAN_UP;
+        M4VENC_MEMSET(video->pMP[idx], 0, sizeof(MultiPass));
+
+        video->pMP[idx]->encoded_frames = -1; /* forget about the very first I frame */
+
+
+        /* RDInfo **pRDSamples */
+        video->pMP[idx]->pRDSamples = (RDInfo **)M4VENC_MALLOC(30 * sizeof(RDInfo *));
+        if (video->pMP[idx]->pRDSamples == NULL)    goto CLEAN_UP;
+        for (i = 0; i < 30; i++)
+        {
+            video->pMP[idx]->pRDSamples[i] = (RDInfo *)M4VENC_MALLOC(32 * sizeof(RDInfo));
+            if (video->pMP[idx]->pRDSamples[i] == NULL) goto CLEAN_UP;
+            for (j = 0; j < 32; j++)    M4VENC_MEMSET(&(video->pMP[idx]->pRDSamples[i][j]), 0, sizeof(RDInfo));
+        }
+        video->pMP[idx]->frameRange = (Int)(video->encParams->LayerFrameRate[idx] * 1.0); /* 1.0s time frame*/
+        video->pMP[idx]->frameRange = PV_MAX(video->pMP[idx]->frameRange, 5);
+        video->pMP[idx]->frameRange = PV_MIN(video->pMP[idx]->frameRange, 30);
+
+        video->pMP[idx]->framePos = -1;
+
+    }
+    /* /// End /////////////////////////////////////// */
+
+
+    video->vol = (Vol **)M4VENC_MALLOC(nLayers * sizeof(Vol *)); /* Memory for VOL pointers */
+
+    /* Memory allocation and Initialization of Vols and writing of headers */
+    if (video->vol == NULL) goto CLEAN_UP;
+
+    for (idx = 0; idx < nLayers; idx++)
+    {
+        video->volInitialize[idx] = 1;
+        video->refTick[idx] = 0;
+        video->relLayerCodeTime[idx] = 1000;
+        video->vol[idx] = (Vol *)M4VENC_MALLOC(sizeof(Vol));
+        if (video->vol[idx] == NULL)  goto CLEAN_UP;
+
+        pVol = video->vol[idx];
+        pEncParams = video->encParams;
+
+        M4VENC_MEMSET(video->vol[idx], 0, sizeof(Vol));
+        /* Initialize some VOL parameters */
+        pVol->volID = idx;  /* Set VOL ID */
+        pVol->shortVideoHeader = pEncParams->H263_Enabled; /*Short Header */
+        pVol->GOVStart = pEncParams->GOV_Enabled; /* GOV Header */
+        pVol->timeIncrementResolution = video->encParams->TimeIncrementRes;
+        pVol->nbitsTimeIncRes = 1;
+        while (pVol->timeIncrementResolution > (1 << pVol->nbitsTimeIncRes))
+        {
+            pVol->nbitsTimeIncRes++;
+        }
+
+        /* timing stuff */
+        pVol->timeIncrement = 0;
+        pVol->moduloTimeBase = 0;
+        pVol->fixedVopRate = 0; /* No fixed VOP rate */
+        pVol->stream = (BitstreamEncVideo *)M4VENC_MALLOC(sizeof(BitstreamEncVideo)); /* allocate BitstreamEncVideo Instance */
+        if (pVol->stream == NULL)  goto CLEAN_UP;
+
+        pVol->width = pEncParams->LayerWidth[idx];      /* Layer Width */
+        pVol->height = pEncParams->LayerHeight[idx];    /* Layer Height */
+        //  pVol->intra_acdcPredDisable = pEncParams->ACDCPrediction; /* ACDC Prediction */
+        pVol->ResyncMarkerDisable = pEncParams->ResyncMarkerDisable; /* Resync Marker Mode */
+        pVol->dataPartitioning = pEncParams->DataPartitioning; /* Data Partitioning */
+        pVol->useReverseVLC = pEncParams->ReversibleVLC; /* RVLC */
+        if (idx > 0) /* Scalability layers */
+        {
+            pVol->ResyncMarkerDisable = 1;
+            pVol->dataPartitioning = 0;
+            pVol->useReverseVLC = 0; /*  No RVLC */
+        }
+        pVol->quantType = pEncParams->QuantType[idx];           /* Quantizer Type */
+
+        /* no need to init Quant Matrices */
+
+        pVol->scalability = 0;  /* Vol Scalability */
+        if (idx > 0)
+            pVol->scalability = 1; /* Multiple layers => Scalability */
+
+        /* Initialize Vol to Temporal scalability.  It can change during encoding */
+        pVol->scalType = 1;
+        /* Initialize reference Vol ID to the base layer = 0 */
+        pVol->refVolID = 0;
+        /* Initialize layer resolution to same as the reference */
+        pVol->refSampDir = 0;
+        pVol->horSamp_m = 1;
+        pVol->horSamp_n = 1;
+        pVol->verSamp_m = 1;
+        pVol->verSamp_n = 1;
+        pVol->enhancementType = 0; /* We always enhance the entire region */
+
+        pVol->nMBPerRow = (pVol->width + 15) / 16;
+        pVol->nMBPerCol = (pVol->height + 15) / 16;
+        pVol->nTotalMB = pVol->nMBPerRow * pVol->nMBPerCol;
+
+        if (pVol->nTotalMB >= 1)
+            pVol->nBitsForMBID = 1;
+        if (pVol->nTotalMB >= 3)
+            pVol->nBitsForMBID = 2;
+        if (pVol->nTotalMB >= 5)
+            pVol->nBitsForMBID = 3;
+        if (pVol->nTotalMB >= 9)
+            pVol->nBitsForMBID = 4;
+        if (pVol->nTotalMB >= 17)
+            pVol->nBitsForMBID = 5;
+        if (pVol->nTotalMB >= 33)
+            pVol->nBitsForMBID = 6;
+        if (pVol->nTotalMB >= 65)
+            pVol->nBitsForMBID = 7;
+        if (pVol->nTotalMB >= 129)
+            pVol->nBitsForMBID = 8;
+        if (pVol->nTotalMB >= 257)
+            pVol->nBitsForMBID = 9;
+        if (pVol->nTotalMB >= 513)
+            pVol->nBitsForMBID = 10;
+        if (pVol->nTotalMB >= 1025)
+            pVol->nBitsForMBID = 11;
+        if (pVol->nTotalMB >= 2049)
+            pVol->nBitsForMBID = 12;
+        if (pVol->nTotalMB >= 4097)
+            pVol->nBitsForMBID = 13;
+        if (pVol->nTotalMB >= 8193)
+            pVol->nBitsForMBID = 14;
+        if (pVol->nTotalMB >= 16385)
+            pVol->nBitsForMBID = 15;
+        if (pVol->nTotalMB >= 32769)
+            pVol->nBitsForMBID = 16;
+        if (pVol->nTotalMB >= 65537)
+            pVol->nBitsForMBID = 17;
+        if (pVol->nTotalMB >= 131073)
+            pVol->nBitsForMBID = 18;
+
+        if (pVol->shortVideoHeader)
+        {
+            switch (pVol->width)
+            {
+                case 128:
+                    if (pVol->height == 96)  /* source_format = 1 */
+                    {
+                        pVol->nGOBinVop = 6;
+                        pVol->nMBinGOB = 8;
+                    }
+                    else
+                        status = PV_FALSE;
+                    break;
+
+                case 176:
+                    if (pVol->height == 144)  /* source_format = 2 */
+                    {
+                        pVol->nGOBinVop = 9;
+                        pVol->nMBinGOB = 11;
+                    }
+                    else
+                        status = PV_FALSE;
+                    break;
+                case 352:
+                    if (pVol->height == 288)  /* source_format = 2 */
+                    {
+                        pVol->nGOBinVop = 18;
+                        pVol->nMBinGOB = 22;
+                    }
+                    else
+                        status = PV_FALSE;
+                    break;
+
+                case 704:
+                    if (pVol->height == 576)  /* source_format = 2 */
+                    {
+                        pVol->nGOBinVop = 18;
+                        pVol->nMBinGOB = 88;
+                    }
+                    else
+                        status = PV_FALSE;
+                    break;
+                case 1408:
+                    if (pVol->height == 1152)  /* source_format = 2 */
+                    {
+                        pVol->nGOBinVop = 18;
+                        pVol->nMBinGOB = 352;
+                    }
+                    else
+                        status = PV_FALSE;
+                    break;
+
+                default:
+                    status = PV_FALSE;
+                    break;
+            }
+        }
+    }
+
+    /***************************************************/
+    /* allocate and initialize rate control parameters */
+    /***************************************************/
+
+    /* BEGIN INITIALIZATION OF ANNEX L RATE CONTROL */
+    if (video->encParams->RC_Type != CONSTANT_Q)
+    {
+        for (idx = 0; idx < nLayers; idx++) /* 12/25/00 */
+        {
+            video->rc[idx] =
+                (rateControl *)M4VENC_MALLOC(sizeof(rateControl));
+
+            if (video->rc[idx] == NULL) goto CLEAN_UP;
+
+            M4VENC_MEMSET(video->rc[idx], 0, sizeof(rateControl));
+        }
+        if (PV_SUCCESS != RC_Initialize(video))
+        {
+            goto CLEAN_UP;
+        }
+        /* initialization for 2-pass rate control */
+    }
+    /* END INITIALIZATION OF ANNEX L RATE CONTROL */
+
+    /********** assign platform dependent functions ***********************/
+    /* 1/23/01 */
+    /* This must be done at run-time not a compile time */
+    video->functionPointer = (FuncPtr*) M4VENC_MALLOC(sizeof(FuncPtr));
+    if (video->functionPointer == NULL) goto CLEAN_UP;
+
+    video->functionPointer->ComputeMBSum = &ComputeMBSum_C;
+    video->functionPointer->SAD_MB_HalfPel[0] = NULL;
+    video->functionPointer->SAD_MB_HalfPel[1] = &SAD_MB_HalfPel_Cxh;
+    video->functionPointer->SAD_MB_HalfPel[2] = &SAD_MB_HalfPel_Cyh;
+    video->functionPointer->SAD_MB_HalfPel[3] = &SAD_MB_HalfPel_Cxhyh;
+
+#ifndef NO_INTER4V
+    video->functionPointer->SAD_Blk_HalfPel = &SAD_Blk_HalfPel_C;
+    video->functionPointer->SAD_Block = &SAD_Block_C;
+#endif
+    video->functionPointer->SAD_Macroblock = &SAD_Macroblock_C;
+    video->functionPointer->ChooseMode = &ChooseMode_C;
+    video->functionPointer->GetHalfPelMBRegion = &GetHalfPelMBRegion_C;
+//  video->functionPointer->SAD_MB_PADDING = &SAD_MB_PADDING; /* 4/21/01 */
+
+
+    encoderControl->videoEncoderInit = 1;  /* init done! */
+
+    return PV_TRUE;
+
+CLEAN_UP:
+    PVCleanUpVideoEncoder(encoderControl);
+
+    return PV_FALSE;
+}
+
+
+/* ======================================================================== */
+/*  Function : PVCleanUpVideoEncoder()                                      */
+/*  Date     : 08/22/2000                                                   */
+/*  Purpose  : Deallocates allocated memory from InitVideoEncoder()         */
+/*  In/out   :                                                              */
+/*  Return   : PV_TRUE if successed, PV_FALSE if failed.                    */
+/*  Modified : 5/21/01, free only yChan in Vop                          */
+/*                                                                          */
+/* ======================================================================== */
+
+OSCL_EXPORT_REF Bool    PVCleanUpVideoEncoder(VideoEncControls *encoderControl)
+{
+    Int idx, i;
+    VideoEncData *video = (VideoEncData *)encoderControl->videoEncoderData;
+    int nTotalMB;
+    int max_width, offset;
+
+#ifdef PRINT_RC_INFO
+    if (facct != NULL)
+    {
+        fprintf(facct, "@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@\n");
+        fprintf(facct, "TOTAL NUM BITS GENERATED %d\n", tiTotalNumBitsGenerated);
+        fprintf(facct, "@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@\n");
+        fprintf(facct, "TOTAL NUMBER OF FRAMES CODED %d\n",
+                video->encParams->rc[0]->totalFrameNumber);
+        fprintf(facct, "@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@\n");
+        fprintf(facct, "Average BitRate %d\n",
+                (tiTotalNumBitsGenerated / (90 / 30)));
+        fprintf(facct, "@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@\n");
+        fprintf(facct, "TOTAL NUMBER OF STUFF BITS %d\n", (iStuffBits + 10740));
+        fprintf(facct, "@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@\n");
+        fprintf(facct, "TOTAL NUMBER OF BITS TO NETWORK %d\n", (35800*90 / 30));;
+        fprintf(facct, "@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@\n");
+        fprintf(facct, "SUM OF STUFF BITS AND GENERATED BITS %d\n",
+                (tiTotalNumBitsGenerated + iStuffBits + 10740));
+        fprintf(facct, "@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@\n");
+        fprintf(facct, "UNACCOUNTED DIFFERENCE %d\n",
+                ((35800*90 / 30) - (tiTotalNumBitsGenerated + iStuffBits + 10740)));
+        fprintf(facct, "@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@\n");
+        fclose(facct);
+    }
+#endif
+
+#ifdef PRINT_EC
+    fclose(fec);
+#endif
+
+    if (video != NULL)
+    {
+
+        if (video->QPMB) M4VENC_FREE(video->QPMB);
+        if (video->headerInfo.Mode)M4VENC_FREE(video->headerInfo.Mode);
+        if (video->headerInfo.CBP)M4VENC_FREE(video->headerInfo.CBP);
+
+
+        if (video->mot)
+        {
+            nTotalMB = video->vol[0]->nTotalMB;
+            for (idx = 1; idx < video->currLayer; idx++)
+                if (video->vol[idx]->nTotalMB > nTotalMB)
+                    nTotalMB = video->vol[idx]->nTotalMB;
+            for (idx = 0; idx < nTotalMB; idx++)
+            {
+                if (video->mot[idx])
+                    M4VENC_FREE(video->mot[idx]);
+            }
+            M4VENC_FREE(video->mot);
+        }
+
+        if (video->intraArray) M4VENC_FREE(video->intraArray);
+
+        if (video->sliceNo)M4VENC_FREE(video->sliceNo);
+        if (video->acPredFlag)M4VENC_FREE(video->acPredFlag);
+//      if(video->predDCAC)M4VENC_FREE(video->predDCAC);
+        if (video->predDC) M4VENC_FREE(video->predDC);
+        video->predDCAC_row = NULL;
+        if (video->predDCAC_col) M4VENC_FREE(video->predDCAC_col);
+        if (video->outputMB)M4VENC_FREE(video->outputMB);
+
+        if (video->bitstream1)BitstreamCloseEnc(video->bitstream1);
+        if (video->bitstream2)BitstreamCloseEnc(video->bitstream2);
+        if (video->bitstream3)BitstreamCloseEnc(video->bitstream3);
+
+        if (video->overrunBuffer) M4VENC_FREE(video->overrunBuffer);
+
+        max_width = video->encParams->LayerWidth[0];
+        max_width = (((max_width + 15) >> 4) << 4); /* 09/19/05 */
+        if (video->encParams->H263_Enabled)
+        {
+            offset = 0;
+        }
+        else
+        {
+            offset = ((max_width + 32) << 4) + 16;
+        }
+
+        if (video->currVop)
+        {
+            if (video->currVop->yChan)
+            {
+                video->currVop->yChan -= offset;
+                M4VENC_FREE(video->currVop->yChan);
+            }
+            M4VENC_FREE(video->currVop);
+        }
+
+        if (video->nextBaseVop)
+        {
+            if (video->nextBaseVop->yChan)
+            {
+                video->nextBaseVop->yChan -= offset;
+                M4VENC_FREE(video->nextBaseVop->yChan);
+            }
+            M4VENC_FREE(video->nextBaseVop);
+        }
+
+        if (video->prevBaseVop)
+        {
+            if (video->prevBaseVop->yChan)
+            {
+                video->prevBaseVop->yChan -= offset;
+                M4VENC_FREE(video->prevBaseVop->yChan);
+            }
+            M4VENC_FREE(video->prevBaseVop);
+        }
+        if (video->prevEnhanceVop)
+        {
+            if (video->prevEnhanceVop->yChan)
+            {
+                video->prevEnhanceVop->yChan -= offset;
+                M4VENC_FREE(video->prevEnhanceVop->yChan);
+            }
+            M4VENC_FREE(video->prevEnhanceVop);
+        }
+
+        /* 04/09/01, for Vops in the use multipass processing */
+        for (idx = 0; idx < video->encParams->nLayers; idx++)
+        {
+            if (video->pMP[idx])
+            {
+                if (video->pMP[idx]->pRDSamples)
+                {
+                    for (i = 0; i < 30; i++)
+                    {
+                        if (video->pMP[idx]->pRDSamples[i])
+                            M4VENC_FREE(video->pMP[idx]->pRDSamples[i]);
+                    }
+                    M4VENC_FREE(video->pMP[idx]->pRDSamples);
+                }
+
+                M4VENC_MEMSET(video->pMP[idx], 0, sizeof(MultiPass));
+                M4VENC_FREE(video->pMP[idx]);
+            }
+        }
+        /* //  End /////////////////////////////////////// */
+
+        if (video->vol)
+        {
+            for (idx = 0; idx < video->encParams->nLayers; idx++)
+            {
+                if (video->vol[idx])
+                {
+                    if (video->vol[idx]->stream)
+                        M4VENC_FREE(video->vol[idx]->stream);
+                    M4VENC_FREE(video->vol[idx]);
+                }
+            }
+            M4VENC_FREE(video->vol);
+        }
+
+        /***************************************************/
+        /* stop rate control parameters */
+        /***************************************************/
+
+        /* ANNEX L RATE CONTROL */
+        if (video->encParams->RC_Type != CONSTANT_Q)
+        {
+            RC_Cleanup(video->rc, video->encParams->nLayers);
+
+            for (idx = 0; idx < video->encParams->nLayers; idx++)
+            {
+                if (video->rc[idx])
+                    M4VENC_FREE(video->rc[idx]);
+            }
+        }
+
+        if (video->functionPointer) M4VENC_FREE(video->functionPointer);
+
+        /* If application has called PVCleanUpVideoEncoder then we deallocate */
+        /* If PVInitVideoEncoder class it, then we DO NOT deallocate */
+        if (video->encParams)
+        {
+            M4VENC_FREE(video->encParams);
+        }
+
+        M4VENC_FREE(video);
+        encoderControl->videoEncoderData = NULL; /* video */
+    }
+
+    encoderControl->videoEncoderInit = 0;
+
+    return PV_TRUE;
+}
+
+/* ======================================================================== */
+/*  Function : PVGetVolHeader()                                             */
+/*  Date     : 7/17/2001,                                                   */
+/*  Purpose  :                                                              */
+/*  In/out   :                                                              */
+/*  Return   : PV_TRUE if successed, PV_FALSE if failed.                    */
+/*  Modified :                                                              */
+/*                                                                          */
+/* ======================================================================== */
+
+OSCL_EXPORT_REF Bool PVGetVolHeader(VideoEncControls *encCtrl, UChar *volHeader, Int *size, Int layer)
+{
+    VideoEncData    *encData;
+    PV_STATUS   EncodeVOS_Start(VideoEncControls *encCtrl);
+    encData = (VideoEncData *)encCtrl->videoEncoderData;
+
+
+    if (encData == NULL)
+        return PV_FALSE;
+    if (encData->encParams == NULL)
+        return PV_FALSE;
+
+
+    encData->currLayer = layer; /* Set Layer */
+    /*pv_status = */
+    EncodeVOS_Start(encCtrl); /* Encode VOL Header */
+
+    encData->encParams->GetVolHeader[layer] = 1; /* Set usage flag: Needed to support old method*/
+
+    /* Copy bitstream to buffer and set the size */
+
+    if (*size > encData->bitstream1->byteCount)
+    {
+        *size = encData->bitstream1->byteCount;
+        M4VENC_MEMCPY(volHeader, encData->bitstream1->bitstreamBuffer, *size);
+    }
+    else
+        return PV_FALSE;
+
+    /* Reset bitstream1 buffer parameters */
+    BitstreamEncReset(encData->bitstream1);
+
+    return PV_TRUE;
+}
+
+/* ======================================================================== */
+/*  Function : PVGetOverrunBuffer()                                         */
+/*  Purpose  : Get the overrun buffer `                                     */
+/*  In/out   :                                                              */
+/*  Return   : Pointer to overrun buffer.                                   */
+/*  Modified :                                                              */
+/* ======================================================================== */
+
+OSCL_EXPORT_REF UChar* PVGetOverrunBuffer(VideoEncControls *encCtrl)
+{
+    VideoEncData *video = (VideoEncData *)encCtrl->videoEncoderData;
+    Int currLayer = video->currLayer;
+    Vol *currVol = video->vol[currLayer];
+
+    if (currVol->stream->bitstreamBuffer != video->overrunBuffer) // not used
+    {
+        return NULL;
+    }
+
+    return video->overrunBuffer;
+}
+
+
+
+
+/* ======================================================================== */
+/*  Function : EncodeVideoFrame()                                           */
+/*  Date     : 08/22/2000                                                   */
+/*  Purpose  : Encode video frame and return bitstream                      */
+/*  In/out   :                                                              */
+/*  Return   : PV_TRUE if successed, PV_FALSE if failed.                    */
+/*  Modified :                                                              */
+/*  02.14.2001                                      */
+/*              Finishing new timestamp 32-bit input                        */
+/*              Applications need to take care of wrap-around               */
+/* ======================================================================== */
+OSCL_EXPORT_REF Bool PVEncodeVideoFrame(VideoEncControls *encCtrl, VideoEncFrameIO *vid_in, VideoEncFrameIO *vid_out,
+                                        ULong *nextModTime, UChar *bstream, Int *size, Int *nLayer)
+{
+    Bool status = PV_TRUE;
+    PV_STATUS pv_status;
+    VideoEncData *video = (VideoEncData *)encCtrl->videoEncoderData;
+    VideoEncParams *encParams = video->encParams;
+    Vol *currVol;
+    Vop *tempForwRefVop = NULL;
+    Int tempRefSelCode = 0;
+    PV_STATUS   EncodeVOS_Start(VideoEncControls *encCtrl);
+    Int width_16, height_16;
+    Int width, height;
+    Vop *temp;
+    Int encodeVop = 0;
+    void  PaddingEdge(Vop *padVop);
+    Int currLayer = -1;
+    //Int nLayers = encParams->nLayers;
+
+    ULong modTime = vid_in->timestamp;
+
+#ifdef RANDOM_REFSELCODE   /* add random selection of reference Vop */
+    Int random_val[30] = {0, 1, 1, 1, 0, 0, 1, 0, 1, 0, 0, 0, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 0, 1, 0, 1, 0, 0};
+    static Int rand_idx = 0;
+#endif
+
+    /*******************************************************/
+    /* Determine Next Vop to encode, if any, and nLayer    */
+    /*******************************************************/
+    //i = nLayers-1;
+
+    if (video->volInitialize[0]) /* first vol to code */
+    {
+        video->nextModTime = video->modTimeRef = ((modTime) - ((modTime) % 1000));
+    }
+
+    encodeVop = DetermineCodingLayer(video, nLayer, modTime);
+    currLayer = *nLayer;
+    if ((currLayer < 0) || (currLayer > encParams->nLayers - 1))
+        return PV_FALSE;
+
+    /******************************************/
+    /* If post-skipping still effective --- return */
+    /******************************************/
+
+    if (!encodeVop) /* skip enh layer, no base layer coded --- return */
+    {
+#ifdef _PRINT_STAT
+        printf("No frame coded. Continue to next frame.");
+#endif
+        /* expected next code time, convert back to millisec */
+        *nextModTime = video->nextModTime;
+
+#ifdef ALLOW_VOP_NOT_CODED
+        if (video->vol[0]->shortVideoHeader) /* Short Video Header = 1 */
+        {
+            *size = 0;
+            *nLayer = -1;
+        }
+        else
+        {
+            *nLayer = 0;
+            EncodeVopNotCoded(video, bstream, size, modTime);
+            *size = video->vol[0]->stream->byteCount;
+        }
+#else
+        *size = 0;
+        *nLayer = -1;
+#endif
+        return status;
+    }
+
+
+//ENCODE_VOP_AGAIN:  /* 12/30/00 */
+
+    /**************************************************************/
+    /* Initialize Vol stream structure with application bitstream */
+    /**************************************************************/
+
+    currVol = video->vol[currLayer];
+    currVol->stream->bitstreamBuffer = bstream;
+    currVol->stream->bufferSize = *size;
+    BitstreamEncReset(currVol->stream);
+    BitstreamSetOverrunBuffer(currVol->stream, video->overrunBuffer, video->oBSize, video);
+
+    /***********************************************************/
+    /* Encode VOS and VOL Headers on first call for each layer */
+    /***********************************************************/
+
+    if (video->volInitialize[currLayer])
+    {
+        video->currVop->timeInc = 0;
+        video->prevBaseVop->timeInc = 0;
+        if (!video->encParams->GetVolHeader[currLayer])
+            pv_status = EncodeVOS_Start(encCtrl);
+    }
+
+    /***************************************************/
+    /* Copy Input Video Frame to Internal Video Buffer */
+    /***************************************************/
+    /* Determine Width and Height of Vop Layer */
+
+    width = encParams->LayerWidth[currLayer];   /* Get input width */
+    height = encParams->LayerHeight[currLayer]; /* Get input height */
+    /* Round Up to nearest multiple of 16 : MPEG-4 Standard */
+
+    width_16 = ((width + 15) / 16) * 16;            /* Round up to nearest multiple of 16 */
+    height_16 = ((height + 15) / 16) * 16;          /* Round up to nearest multiple of 16 */
+
+    video->input = vid_in;  /* point to the frame input */
+
+    /*//  End ////////////////////////////// */
+
+
+    /**************************************/
+    /* Determine VOP Type                 */
+    /* 6/2/2001, separate function      */
+    /**************************************/
+    DetermineVopType(video, currLayer);
+
+    /****************************/
+    /*    Initialize VOP        */
+    /****************************/
+    video->currVop->volID = currVol->volID;
+    video->currVop->width = width_16;
+    video->currVop->height = height_16;
+    if (video->encParams->H263_Enabled) /*  11/28/05 */
+    {
+        video->currVop->pitch = width_16;
+    }
+    else
+    {
+        video->currVop->pitch = width_16 + 32;
+    }
+    video->currVop->timeInc = currVol->timeIncrement;
+    video->currVop->vopCoded = 1;
+    video->currVop->roundingType = 0;
+    video->currVop->intraDCVlcThr = encParams->IntraDCVlcThr;
+
+    if (currLayer == 0
+#ifdef RANDOM_REFSELCODE   /* add random selection of reference Vop */
+            || random_val[rand_idx] || video->volInitialize[currLayer]
+#endif
+       )
+    {
+        tempForwRefVop = video->forwardRefVop; /* keep initial state */
+        if (tempForwRefVop != NULL) tempRefSelCode = tempForwRefVop->refSelectCode;
+
+        video->forwardRefVop = video->prevBaseVop;
+        video->forwardRefVop->refSelectCode = 1;
+    }
+#ifdef RANDOM_REFSELCODE
+    else
+    {
+        tempForwRefVop = video->forwardRefVop; /* keep initial state */
+        if (tempForwRefVop != NULL) tempRefSelCode = tempForwRefVop->refSelectCode;
+
+        video->forwardRefVop = video->prevEnhanceVop;
+        video->forwardRefVop->refSelectCode = 0;
+    }
+    rand_idx++;
+    rand_idx %= 30;
+#endif
+
+    video->currVop->refSelectCode = video->forwardRefVop->refSelectCode;
+    video->currVop->gobNumber = 0;
+    video->currVop->gobFrameID = video->currVop->predictionType;
+    video->currVop->temporalRef = (modTime * 30 / 1001) % 256;
+
+    video->currVop->temporalInterval = 0;
+
+    if (video->currVop->predictionType == I_VOP)
+        video->currVop->quantizer = encParams->InitQuantIvop[currLayer];
+    else
+        video->currVop->quantizer = encParams->InitQuantPvop[currLayer];
+
+
+    /****************/
+    /* Encode Vop */
+    /****************/
+    video->slice_coding = 0;
+
+    pv_status = EncodeVop(video);
+#ifdef _PRINT_STAT
+    if (video->currVop->predictionType == I_VOP)
+        printf(" I-VOP ");
+    else
+        printf(" P-VOP (ref.%d)", video->forwardRefVop->refSelectCode);
+#endif
+
+    /************************************/
+    /* Update Skip Next Frame           */
+    /************************************/
+    *nLayer = UpdateSkipNextFrame(video, nextModTime, size, pv_status);
+    if (*nLayer == -1) /* skip current frame */
+    {
+        /* make sure that pointers are restored to the previous state */
+        if (currLayer == 0)
+        {
+            video->forwardRefVop = tempForwRefVop; /* For P-Vop base only */
+            video->forwardRefVop->refSelectCode = tempRefSelCode;
+        }
+
+        return status;
+    }
+
+    /* If I-VOP was encoded, reset IntraPeriod */
+    if ((currLayer == 0) && (encParams->IntraPeriod > 0) && (video->currVop->predictionType == I_VOP))
+        video->nextEncIVop = encParams->IntraPeriod;
+
+    /* Set HintTrack Information */
+    if (currLayer != -1)
+    {
+        if (currVol->prevModuloTimeBase)
+            video->hintTrackInfo.MTB = 1;
+        else
+            video->hintTrackInfo.MTB = 0;
+        video->hintTrackInfo.LayerID = (UChar)currVol->volID;
+        video->hintTrackInfo.CodeType = (UChar)video->currVop->predictionType;
+        video->hintTrackInfo.RefSelCode = (UChar)video->currVop->refSelectCode;
+    }
+
+    /************************************************/
+    /* Determine nLayer and timeInc for next encode */
+    /* 12/27/00 always go by the highest layer*/
+    /************************************************/
+
+    /**********************************************************/
+    /* Copy Reconstructed Buffer to Output Video Frame Buffer */
+    /**********************************************************/
+    vid_out->yChan = video->currVop->yChan;
+    vid_out->uChan = video->currVop->uChan;
+    vid_out->vChan = video->currVop->vChan;
+    if (video->encParams->H263_Enabled)
+    {
+        vid_out->height = video->currVop->height; /* padded height */
+        vid_out->pitch = video->currVop->width; /* padded width */
+    }
+    else
+    {
+        vid_out->height = video->currVop->height + 32; /* padded height */
+        vid_out->pitch = video->currVop->width + 32; /* padded width */
+    }
+    //video_out->timestamp = video->modTime;
+    vid_out->timestamp = (ULong)(((video->prevFrameNum[currLayer] * 1000) / encParams->LayerFrameRate[currLayer]) + video->modTimeRef + 0.5);
+
+    /*// End /////////////////////// */
+
+    /***********************************/
+    /* Update Ouput bstream byte count */
+    /***********************************/
+
+    *size = currVol->stream->byteCount;
+
+    /****************************************/
+    /* Swap Vop Pointers for Base Layer     */
+    /****************************************/
+    if (currLayer == 0)
+    {
+        temp = video->prevBaseVop;
+        video->prevBaseVop = video->currVop;
+        video->prevBaseVop->padded = 0; /* not padded */
+        video->currVop  = temp;
+        video->forwardRefVop = video->prevBaseVop; /* For P-Vop base only */
+        video->forwardRefVop->refSelectCode = 1;
+    }
+    else
+    {
+        temp = video->prevEnhanceVop;
+        video->prevEnhanceVop = video->currVop;
+        video->prevEnhanceVop->padded = 0; /* not padded */
+        video->currVop = temp;
+        video->forwardRefVop = video->prevEnhanceVop;
+        video->forwardRefVop->refSelectCode = 0;
+    }
+
+    /****************************************/
+    /* Modify the intialize flag at the end.*/
+    /****************************************/
+    if (video->volInitialize[currLayer])
+        video->volInitialize[currLayer] = 0;
+
+    return status;
+}
+
+#ifndef NO_SLICE_ENCODE
+/* ======================================================================== */
+/*  Function : PVEncodeFrameSet()                                           */
+/*  Date     : 04/18/2000                                                   */
+/*  Purpose  : Enter a video frame and perform front-end time check plus ME */
+/*  In/out   :                                                              */
+/*  Return   : PV_TRUE if successed, PV_FALSE if failed.                    */
+/*  Modified :                                                              */
+/*                                                                          */
+/* ======================================================================== */
+OSCL_EXPORT_REF Bool PVEncodeFrameSet(VideoEncControls *encCtrl, VideoEncFrameIO *vid_in, ULong *nextModTime, Int *nLayer)
+{
+    Bool status = PV_TRUE;
+    VideoEncData *video = (VideoEncData *)encCtrl->videoEncoderData;
+    VideoEncParams *encParams = video->encParams;
+    Vol *currVol;
+    PV_STATUS   EncodeVOS_Start(VideoEncControls *encCtrl);
+    Int width_16, height_16;
+    Int width, height;
+    Int encodeVop = 0;
+    void  PaddingEdge(Vop *padVop);
+    Int currLayer = -1;
+    //Int nLayers = encParams->nLayers;
+
+    ULong   modTime = vid_in->timestamp;
+
+#ifdef RANDOM_REFSELCODE   /* add random selection of reference Vop */
+    Int random_val[30] = {0, 1, 1, 1, 0, 0, 1, 0, 1, 0, 0, 0, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 0, 1, 0, 1, 0, 0};
+    static Int rand_idx = 0;
+#endif
+    /*******************************************************/
+    /* Determine Next Vop to encode, if any, and nLayer    */
+    /*******************************************************/
+
+    video->modTime = modTime;
+
+    //i = nLayers-1;
+
+    if (video->volInitialize[0]) /* first vol to code */
+    {
+        video->nextModTime = video->modTimeRef = ((modTime) - ((modTime) % 1000));
+    }
+
+
+    encodeVop = DetermineCodingLayer(video, nLayer, modTime);
+
+    currLayer = *nLayer;
+
+    /******************************************/
+    /* If post-skipping still effective --- return */
+    /******************************************/
+
+    if (!encodeVop) /* skip enh layer, no base layer coded --- return */
+    {
+#ifdef _PRINT_STAT
+        printf("No frame coded. Continue to next frame.");
+#endif
+        *nLayer = -1;
+
+        /* expected next code time, convert back to millisec */
+        *nextModTime = video->nextModTime;;
+        return status;
+    }
+
+    /**************************************************************/
+    /* Initialize Vol stream structure with application bitstream */
+    /**************************************************************/
+
+    currVol = video->vol[currLayer];
+    currVol->stream->bufferSize = 0;
+    BitstreamEncReset(currVol->stream);
+
+    /***********************************************************/
+    /* Encode VOS and VOL Headers on first call for each layer */
+    /***********************************************************/
+
+    if (video->volInitialize[currLayer])
+    {
+        video->currVop->timeInc = 0;
+        video->prevBaseVop->timeInc = 0;
+    }
+
+    /***************************************************/
+    /* Copy Input Video Frame to Internal Video Buffer */
+    /***************************************************/
+    /* Determine Width and Height of Vop Layer */
+
+    width = encParams->LayerWidth[currLayer];   /* Get input width */
+    height = encParams->LayerHeight[currLayer]; /* Get input height */
+    /* Round Up to nearest multiple of 16 : MPEG-4 Standard */
+
+    width_16 = ((width + 15) / 16) * 16;            /* Round up to nearest multiple of 16 */
+    height_16 = ((height + 15) / 16) * 16;          /* Round up to nearest multiple of 16 */
+
+    video->input = vid_in;  /* point to the frame input */
+
+    /*//  End ////////////////////////////// */
+
+
+    /**************************************/
+    /* Determine VOP Type                 */
+    /* 6/2/2001, separate function      */
+    /**************************************/
+    DetermineVopType(video, currLayer);
+
+    /****************************/
+    /*    Initialize VOP        */
+    /****************************/
+    video->currVop->volID = currVol->volID;
+    video->currVop->width = width_16;
+    video->currVop->height = height_16;
+    if (video->encParams->H263_Enabled) /*  11/28/05 */
+    {
+        video->currVop->pitch = width_16;
+    }
+    else
+    {
+        video->currVop->pitch = width_16 + 32;
+    }
+    video->currVop->timeInc = currVol->timeIncrement;
+    video->currVop->vopCoded = 1;
+    video->currVop->roundingType = 0;
+    video->currVop->intraDCVlcThr = encParams->IntraDCVlcThr;
+
+    if (currLayer == 0
+#ifdef RANDOM_REFSELCODE   /* add random selection of reference Vop */
+            || random_val[rand_idx] || video->volInitialize[currLayer]
+#endif
+       )
+    {
+        video->tempForwRefVop = video->forwardRefVop; /* keep initial state */
+        if (video->tempForwRefVop != NULL) video->tempRefSelCode = video->tempForwRefVop->refSelectCode;
+
+        video->forwardRefVop = video->prevBaseVop;
+        video->forwardRefVop->refSelectCode = 1;
+    }
+#ifdef RANDOM_REFSELCODE
+    else
+    {
+        video->tempForwRefVop = video->forwardRefVop; /* keep initial state */
+        if (video->tempForwRefVop != NULL) video->tempRefSelCode = video->tempForwRefVop->refSelectCode;
+
+        video->forwardRefVop = video->prevEnhanceVop;
+        video->forwardRefVop->refSelectCode = 0;
+    }
+    rand_idx++;
+    rand_idx %= 30;
+#endif
+
+    video->currVop->refSelectCode = video->forwardRefVop->refSelectCode;
+    video->currVop->gobNumber = 0;
+    video->currVop->gobFrameID = video->currVop->predictionType;
+    video->currVop->temporalRef = ((modTime) * 30 / 1001) % 256;
+
+    video->currVop->temporalInterval = 0;
+
+    if (video->currVop->predictionType == I_VOP)
+        video->currVop->quantizer = encParams->InitQuantIvop[currLayer];
+    else
+        video->currVop->quantizer = encParams->InitQuantPvop[currLayer];
+
+    /****************/
+    /* Encode Vop   */
+    /****************/
+    video->slice_coding = 1;
+
+    /*pv_status =*/
+    EncodeVop(video);
+
+#ifdef _PRINT_STAT
+    if (video->currVop->predictionType == I_VOP)
+        printf(" I-VOP ");
+    else
+        printf(" P-VOP (ref.%d)", video->forwardRefVop->refSelectCode);
+#endif
+
+    /* Set HintTrack Information */
+    if (currVol->prevModuloTimeBase)
+        video->hintTrackInfo.MTB = 1;
+    else
+        video->hintTrackInfo.MTB = 0;
+
+    video->hintTrackInfo.LayerID = (UChar)currVol->volID;
+    video->hintTrackInfo.CodeType = (UChar)video->currVop->predictionType;
+    video->hintTrackInfo.RefSelCode = (UChar)video->currVop->refSelectCode;
+
+    return status;
+}
+#endif /* NO_SLICE_ENCODE */
+
+#ifndef NO_SLICE_ENCODE
+/* ======================================================================== */
+/*  Function : PVEncodePacket()                                             */
+/*  Date     : 04/18/2002                                                   */
+/*  Purpose  : Encode one packet and return bitstream                       */
+/*  In/out   :                                                              */
+/*  Return   : PV_TRUE if successed, PV_FALSE if failed.                    */
+/*  Modified :                                                              */
+/*                                                                          */
+/* ======================================================================== */
+OSCL_EXPORT_REF Bool PVEncodeSlice(VideoEncControls *encCtrl, UChar *bstream, Int *size,
+                                   Int *endofFrame, VideoEncFrameIO *vid_out, ULong *nextModTime)
+{
+    PV_STATUS pv_status;
+    VideoEncData *video = (VideoEncData *)encCtrl->videoEncoderData;
+    VideoEncParams *encParams = video->encParams;
+    Vol *currVol;
+    PV_STATUS   EncodeVOS_Start(VideoEncControls *encCtrl);
+    Vop *temp;
+    void  PaddingEdge(Vop *padVop);
+    Int currLayer = video->currLayer;
+    Int pre_skip;
+    Int pre_size;
+    /**************************************************************/
+    /* Initialize Vol stream structure with application bitstream */
+    /**************************************************************/
+
+    currVol = video->vol[currLayer];
+    currVol->stream->bitstreamBuffer = bstream;
+    pre_size = currVol->stream->byteCount;
+    currVol->stream->bufferSize = pre_size + (*size);
+
+    /***********************************************************/
+    /* Encode VOS and VOL Headers on first call for each layer */
+    /***********************************************************/
+
+    if (video->volInitialize[currLayer])
+    {
+        if (!video->encParams->GetVolHeader[currLayer])
+            pv_status = EncodeVOS_Start(encCtrl);
+    }
+
+    /****************/
+    /* Encode Slice */
+    /****************/
+    pv_status = EncodeSlice(video);
+
+    *endofFrame = 0;
+
+    if (video->mbnum >= currVol->nTotalMB && !video->end_of_buf)
+    {
+        *endofFrame = 1;
+
+        /************************************/
+        /* Update Skip Next Frame           */
+        /************************************/
+        pre_skip = UpdateSkipNextFrame(video, nextModTime, size, pv_status); /* modified such that no pre-skipped */
+
+        if (pre_skip == -1) /* error */
+        {
+            *endofFrame = -1;
+            /* make sure that pointers are restored to the previous state */
+            if (currLayer == 0)
+            {
+                video->forwardRefVop = video->tempForwRefVop; /* For P-Vop base only */
+                video->forwardRefVop->refSelectCode = video->tempRefSelCode;
+            }
+
+            return pv_status;
+        }
+
+        /* If I-VOP was encoded, reset IntraPeriod */
+        if ((currLayer == 0) && (encParams->IntraPeriod > 0) && (video->currVop->predictionType == I_VOP))
+            video->nextEncIVop = encParams->IntraPeriod;
+
+        /**********************************************************/
+        /* Copy Reconstructed Buffer to Output Video Frame Buffer */
+        /**********************************************************/
+        vid_out->yChan = video->currVop->yChan;
+        vid_out->uChan = video->currVop->uChan;
+        vid_out->vChan = video->currVop->vChan;
+        if (video->encParams->H263_Enabled)
+        {
+            vid_out->height = video->currVop->height; /* padded height */
+            vid_out->pitch = video->currVop->width; /* padded width */
+        }
+        else
+        {
+            vid_out->height = video->currVop->height + 32; /* padded height */
+            vid_out->pitch = video->currVop->width + 32; /* padded width */
+        }
+        //vid_out->timestamp = video->modTime;
+        vid_out->timestamp = (ULong)(((video->prevFrameNum[currLayer] * 1000) / encParams->LayerFrameRate[currLayer]) + video->modTimeRef + 0.5);
+
+        /*// End /////////////////////// */
+
+        /****************************************/
+        /* Swap Vop Pointers for Base Layer     */
+        /****************************************/
+
+        if (currLayer == 0)
+        {
+            temp = video->prevBaseVop;
+            video->prevBaseVop = video->currVop;
+            video->prevBaseVop->padded = 0; /* not padded */
+            video->currVop = temp;
+            video->forwardRefVop = video->prevBaseVop; /* For P-Vop base only */
+            video->forwardRefVop->refSelectCode = 1;
+        }
+        else
+        {
+            temp = video->prevEnhanceVop;
+            video->prevEnhanceVop = video->currVop;
+            video->prevEnhanceVop->padded = 0; /* not padded */
+            video->currVop = temp;
+            video->forwardRefVop = video->prevEnhanceVop;
+            video->forwardRefVop->refSelectCode = 0;
+        }
+    }
+
+    /***********************************/
+    /* Update Ouput bstream byte count */
+    /***********************************/
+
+    *size = currVol->stream->byteCount - pre_size;
+
+    /****************************************/
+    /* Modify the intialize flag at the end.*/
+    /****************************************/
+    if (video->volInitialize[currLayer])
+        video->volInitialize[currLayer] = 0;
+
+    return pv_status;
+}
+#endif /* NO_SLICE_ENCODE */
+
+
+/* ======================================================================== */
+/*  Function : PVGetH263ProfileLevelID()                                    */
+/*  Date     : 02/05/2003                                                   */
+/*  Purpose  : Get H.263 Profile ID and level ID for profile 0              */
+/*  In/out   : Profile ID=0, levelID is what we want                        */
+/*  Return   : PV_TRUE if successed, PV_FALSE if failed.                    */
+/*  Modified :                                                              */
+/*  Note     : h263Level[8], rBR_bound[8], max_h263_framerate[2]            */
+/*             max_h263_width[2], max_h263_height[2] are global             */
+/*                                                                          */
+/* ======================================================================== */
+OSCL_EXPORT_REF Bool PVGetH263ProfileLevelID(VideoEncControls *encCtrl, Int *profileID, Int *levelID)
+{
+    VideoEncData *encData;
+    Int width, height;
+    float bitrate_r, framerate;
+
+
+    /* For this version, we only support H.263 profile 0 */
+    *profileID = 0;
+
+    *levelID = 0;
+    encData = (VideoEncData *)encCtrl->videoEncoderData;
+
+    if (encData == NULL)
+        return PV_FALSE;
+    if (encData->encParams == NULL)
+        return PV_FALSE;
+
+    if (!encData->encParams->H263_Enabled) return PV_FALSE;
+
+
+    /* get image width, height, bitrate and framerate */
+    width     = encData->encParams->LayerWidth[0];
+    height    = encData->encParams->LayerHeight[0];
+    bitrate_r = (float)(encData->encParams->LayerBitRate[0]) / (float)64000.0;
+    framerate = encData->encParams->LayerFrameRate[0];
+    if (!width || !height || !(bitrate_r > 0 && framerate > 0)) return PV_FALSE;
+
+    /* This is the most frequent case : level 10 */
+    if (bitrate_r <= rBR_bound[1] && framerate <= max_h263_framerate[0] &&
+            (width <= max_h263_width[0] && height <= max_h263_height[0]))
+    {
+        *levelID = h263Level[1];
+        return PV_TRUE;
+    }
+    else if (bitrate_r > rBR_bound[4] ||
+             (width > max_h263_width[1] || height > max_h263_height[1]) ||
+             framerate > max_h263_framerate[1])    /* check the highest level 70 */
+    {
+        *levelID = h263Level[7];
+        return PV_TRUE;
+    }
+    else   /* search level 20, 30, 40 */
+    {
+
+        /* pick out level 20 */
+        if (bitrate_r <= rBR_bound[2] &&
+                ((width <= max_h263_width[0] && height <= max_h263_height[0] && framerate <= max_h263_framerate[1]) ||
+                 (width <= max_h263_width[1] && height <= max_h263_height[1] && framerate <= max_h263_framerate[0])))
+        {
+            *levelID = h263Level[2];
+            return PV_TRUE;
+        }
+        else   /* width, height and framerate are ok, now choose level 30 or 40 */
+        {
+            *levelID = (bitrate_r <= rBR_bound[3] ? h263Level[3] : h263Level[4]);
+            return PV_TRUE;
+        }
+    }
+}
+
+/* ======================================================================== */
+/*  Function : PVGetMPEG4ProfileLevelID()                                   */
+/*  Date     : 26/06/2008                                                   */
+/*  Purpose  : Get MPEG4 Level after initialized                            */
+/*  In/out   : profile_level according to interface                         */
+/*  Return   : PV_TRUE if successed, PV_FALSE if failed.                    */
+/*  Modified :                                                              */
+/*                                                                          */
+/* ======================================================================== */
+OSCL_EXPORT_REF Bool PVGetMPEG4ProfileLevelID(VideoEncControls *encCtrl, Int *profile_level, Int nLayer)
+{
+    VideoEncData* video;
+    Int i;
+
+    video = (VideoEncData *)encCtrl->videoEncoderData;
+
+    if (nLayer == 0)
+    {
+        for (i = 0; i < 8; i++)
+        {
+            if (video->encParams->ProfileLevel[0] == profile_level_code[i])
+            {
+                break;
+            }
+        }
+        *profile_level = i;
+    }
+    else
+    {
+        for (i = 0; i < 8; i++)
+        {
+            if (video->encParams->ProfileLevel[0] == scalable_profile_level_code[i])
+            {
+                break;
+            }
+        }
+        *profile_level = i + SIMPLE_SCALABLE_PROFILE_LEVEL0;
+    }
+
+    return true;
+}
+
+#ifndef LIMITED_API
+/* ======================================================================== */
+/*  Function : PVUpdateEncFrameRate                                         */
+/*  Date     : 04/08/2002                                                   */
+/*  Purpose  : Update target frame rates of the encoded base and enhance    */
+/*             layer(if any) while encoding operation is ongoing            */
+/*  In/out   :                                                              */
+/*  Return   : PV_TRUE if successed, PV_FALSE if failed.                    */
+/*  Modified :                                                              */
+/*                                                                          */
+/* ======================================================================== */
+
+OSCL_EXPORT_REF Bool PVUpdateEncFrameRate(VideoEncControls *encCtrl, float *frameRate)
+{
+    VideoEncData    *encData;
+    Int i;// nTotalMB, mbPerSec;
+
+    encData = (VideoEncData *)encCtrl->videoEncoderData;
+
+    if (encData == NULL)
+        return PV_FALSE;
+    if (encData->encParams == NULL)
+        return PV_FALSE;
+
+    /* Update the framerates for all the layers */
+    for (i = 0; i < encData->encParams->nLayers; i++)
+    {
+
+        /* New check: encoding framerate should be consistent with the given profile and level */
+        //nTotalMB = (((encData->encParams->LayerWidth[i]+15)/16)*16)*(((encData->encParams->LayerHeight[i]+15)/16)*16)/(16*16);
+        //mbPerSec = (Int)(nTotalMB * frameRate[i]);
+        //if(mbPerSec > encData->encParams->LayerMaxMbsPerSec[i]) return PV_FALSE;
+        if (frameRate[i] > encData->encParams->LayerMaxFrameRate[i]) return PV_FALSE; /* set by users or profile */
+
+        encData->encParams->LayerFrameRate[i] = frameRate[i];
+    }
+
+    return RC_UpdateBXRCParams((void*) encData);
+
+}
+#endif
+#ifndef LIMITED_API
+/* ======================================================================== */
+/*  Function : PVUpdateBitRate                                              */
+/*  Date     : 04/08/2002                                                   */
+/*  Purpose  : Update target bit rates of the encoded base and enhance      */
+/*             layer(if any) while encoding operation is ongoing            */
+/*  In/out   :                                                              */
+/*  Return   : PV_TRUE if successed, PV_FALSE if failed.                    */
+/*  Modified :                                                              */
+/*                                                                          */
+/* ======================================================================== */
+
+OSCL_EXPORT_REF Bool PVUpdateBitRate(VideoEncControls *encCtrl, Int *bitRate)
+{
+    VideoEncData    *encData;
+    Int i;
+
+    encData = (VideoEncData *)encCtrl->videoEncoderData;
+
+    if (encData == NULL)
+        return PV_FALSE;
+    if (encData->encParams == NULL)
+        return PV_FALSE;
+
+    /* Update the bitrates for all the layers */
+    for (i = 0; i < encData->encParams->nLayers; i++)
+    {
+        if (bitRate[i] > encData->encParams->LayerMaxBitRate[i]) /* set by users or profile */
+        {
+            return PV_FALSE;
+        }
+        encData->encParams->LayerBitRate[i] = bitRate[i];
+    }
+
+    return RC_UpdateBXRCParams((void*) encData);
+
+}
+#endif
+#ifndef LIMITED_API
+/* ============================================================================ */
+/*  Function : PVUpdateVBVDelay()                                                   */
+/*  Date     : 4/23/2004                                                        */
+/*  Purpose  : Update VBV buffer size(in delay)                                 */
+/*  In/out   :                                                                  */
+/*  Return   : PV_TRUE if successed, PV_FALSE if failed.                        */
+/*  Modified :                                                                  */
+/*                                                                              */
+/* ============================================================================ */
+
+Bool PVUpdateVBVDelay(VideoEncControls *encCtrl, float delay)
+{
+
+    VideoEncData    *encData;
+    Int total_bitrate, max_buffer_size;
+    int index;
+
+    encData = (VideoEncData *)encCtrl->videoEncoderData;
+
+    if (encData == NULL)
+        return PV_FALSE;
+    if (encData->encParams == NULL)
+        return PV_FALSE;
+
+    /* Check whether the input delay is valid based on the given profile */
+    total_bitrate   = (encData->encParams->nLayers == 1 ? encData->encParams->LayerBitRate[0] :
+                       encData->encParams->LayerBitRate[1]);
+    index = encData->encParams->profile_table_index;
+    max_buffer_size = (encData->encParams->nLayers == 1 ? profile_level_max_VBV_size[index] :
+                       scalable_profile_level_max_VBV_size[index]);
+
+    if (total_bitrate*delay > (float)max_buffer_size)
+        return PV_FALSE;
+
+    encData->encParams->VBV_delay = delay;
+    return PV_TRUE;
+
+}
+#endif
+#ifndef LIMITED_API
+/* ======================================================================== */
+/*  Function : PVUpdateIFrameInterval()                                         */
+/*  Date     : 04/10/2002                                                   */
+/*  Purpose  : updates the INTRA frame refresh interval while encoding      */
+/*             is ongoing                                                   */
+/*  In/out   :                                                              */
+/*  Return   : PV_TRUE if successed, PV_FALSE if failed.                    */
+/*  Modified :                                                              */
+/*                                                                          */
+/* ======================================================================== */
+
+OSCL_EXPORT_REF Bool PVUpdateIFrameInterval(VideoEncControls *encCtrl, Int aIFramePeriod)
+{
+    VideoEncData    *encData;
+
+    encData = (VideoEncData *)encCtrl->videoEncoderData;
+
+    if (encData == NULL)
+        return PV_FALSE;
+    if (encData->encParams == NULL)
+        return PV_FALSE;
+
+    encData->encParams->IntraPeriod = aIFramePeriod;
+    return PV_TRUE;
+}
+#endif
+#ifndef LIMITED_API
+/* ======================================================================== */
+/*  Function : PVSetNumIntraMBRefresh()                                     */
+/*  Date     : 08/05/2003                                                   */
+/*  Purpose  :                                                              */
+/*  In/out   :                                                              */
+/*  Return   : PV_TRUE if successed, PV_FALSE if failed.                    */
+/*  Modified :                                                              */
+/*                                                                          */
+/* ======================================================================== */
+OSCL_EXPORT_REF Bool    PVUpdateNumIntraMBRefresh(VideoEncControls *encCtrl, Int numMB)
+{
+    VideoEncData    *encData;
+
+    encData = (VideoEncData *)encCtrl->videoEncoderData;
+
+    if (encData == NULL)
+        return PV_FALSE;
+
+    encData->encParams->Refresh = numMB;
+
+    return PV_TRUE;
+}
+#endif
+#ifndef LIMITED_API
+/* ======================================================================== */
+/*  Function : PVIFrameRequest()                                            */
+/*  Date     : 04/10/2002                                                   */
+/*  Purpose  : encodes the next base frame as an I-Vop                      */
+/*  In/out   :                                                              */
+/*  Return   : PV_TRUE if successed, PV_FALSE if failed.                    */
+/*  Modified :                                                              */
+/*                                                                          */
+/* ======================================================================== */
+
+OSCL_EXPORT_REF Bool PVIFrameRequest(VideoEncControls *encCtrl)
+{
+    VideoEncData    *encData;
+
+    encData = (VideoEncData *)encCtrl->videoEncoderData;
+
+    if (encData == NULL)
+        return PV_FALSE;
+    if (encData->encParams == NULL)
+        return PV_FALSE;
+
+    encData->nextEncIVop = 1;
+    return PV_TRUE;
+}
+#endif
+#ifndef LIMITED_API
+/* ======================================================================== */
+/*  Function : PVGetEncMemoryUsage()                                        */
+/*  Date     : 10/17/2000                                                   */
+/*  Purpose  :                                                              */
+/*  In/out   :                                                              */
+/*  Return   : PV_TRUE if successed, PV_FALSE if failed.                    */
+/*  Modified :                                                              */
+/*                                                                          */
+/* ======================================================================== */
+
+OSCL_EXPORT_REF Int PVGetEncMemoryUsage(VideoEncControls *encCtrl)
+{
+    VideoEncData    *encData;
+
+    encData = (VideoEncData *)encCtrl->videoEncoderData;
+
+    if (encData == NULL)
+        return PV_FALSE;
+    if (encData->encParams == NULL)
+        return PV_FALSE;
+    return encData->encParams->MemoryUsage;
+}
+#endif
+
+/* ======================================================================== */
+/*  Function : PVGetHintTrack()                                             */
+/*  Date     : 1/17/2001,                                                   */
+/*  Purpose  :                                                              */
+/*  In/out   :                                                              */
+/*  Return   : PV_TRUE if successed, PV_FALSE if failed.                    */
+/*  Modified :                                                              */
+/*                                                                          */
+/* ======================================================================== */
+
+OSCL_EXPORT_REF Bool PVGetHintTrack(VideoEncControls *encCtrl, MP4HintTrack *info)
+{
+    VideoEncData    *encData;
+
+    encData = (VideoEncData *)encCtrl->videoEncoderData;
+
+    if (encData == NULL)
+        return PV_FALSE;
+    if (encData->encParams == NULL)
+        return PV_FALSE;
+    info->MTB = encData->hintTrackInfo.MTB;
+    info->LayerID = encData->hintTrackInfo.LayerID;
+    info->CodeType = encData->hintTrackInfo.CodeType;
+    info->RefSelCode = encData->hintTrackInfo.RefSelCode;
+
+    return PV_TRUE;
+}
+
+/* ======================================================================== */
+/*  Function : PVGetMaxVideoFrameSize()                                     */
+/*  Date     : 7/17/2001,                                                   */
+/*  Purpose  : Function merely returns the maximum buffer size              */
+/*  In/out   :                                                              */
+/*  Return   : PV_TRUE if successed, PV_FALSE if failed.                    */
+/*  Modified :                                                              */
+/*                                                                          */
+/* ======================================================================== */
+
+OSCL_EXPORT_REF Bool PVGetMaxVideoFrameSize(VideoEncControls *encCtrl, Int *maxVideoFrameSize)
+{
+    VideoEncData    *encData;
+
+    encData = (VideoEncData *)encCtrl->videoEncoderData;
+
+    if (encData == NULL)
+        return PV_FALSE;
+    if (encData->encParams == NULL)
+        return PV_FALSE;
+
+
+
+    *maxVideoFrameSize = encData->encParams->BufferSize[0];
+
+    if (encData->encParams->nLayers == 2)
+        if (*maxVideoFrameSize < encData->encParams->BufferSize[1])
+            *maxVideoFrameSize = encData->encParams->BufferSize[1];
+    *maxVideoFrameSize >>= 3;   /* Convert to Bytes */
+
+    if (*maxVideoFrameSize <= 4000)
+        *maxVideoFrameSize = 4000;
+
+    return PV_TRUE;
+}
+#ifndef LIMITED_API
+/* ======================================================================== */
+/*  Function : PVGetVBVSize()                                               */
+/*  Date     : 4/15/2002                                                    */
+/*  Purpose  : Function merely returns the maximum buffer size              */
+/*  In/out   :                                                              */
+/*  Return   : PV_TRUE if successed, PV_FALSE if failed.                    */
+/*  Modified :                                                              */
+/*                                                                          */
+/* ======================================================================== */
+
+OSCL_EXPORT_REF Bool PVGetVBVSize(VideoEncControls *encCtrl, Int *VBVSize)
+{
+    VideoEncData    *encData;
+
+    encData = (VideoEncData *)encCtrl->videoEncoderData;
+
+    if (encData == NULL)
+        return PV_FALSE;
+    if (encData->encParams == NULL)
+        return PV_FALSE;
+
+    *VBVSize = encData->encParams->BufferSize[0];
+    if (encData->encParams->nLayers == 2)
+        *VBVSize += encData->encParams->BufferSize[1];
+
+    return PV_TRUE;
+
+}
+#endif
+/* ======================================================================== */
+/*  Function : EncodeVOS_Start()                                            */
+/*  Date     : 08/22/2000                                                   */
+/*  Purpose  : Encodes the VOS,VO, and VOL or Short Headers                 */
+/*  In/out   :                                                              */
+/*  Return   : PV_TRUE if successed, PV_FALSE if failed.                    */
+/*  Modified :                                                              */
+/*                                                                          */
+/* ======================================================================== */
+PV_STATUS EncodeVOS_Start(VideoEncControls *encoderControl)
+{
+
+    VideoEncData *video = (VideoEncData *)encoderControl->videoEncoderData;
+    Vol         *currVol = video->vol[video->currLayer];
+    PV_STATUS status = PV_SUCCESS;
+    //int profile_level=0x01;
+    BitstreamEncVideo *stream = video->bitstream1;
+    int i, j;
+
+    /********************************/
+    /* Check for short_video_header */
+    /********************************/
+    if (currVol->shortVideoHeader == 1)
+        return status;
+    else
+    {
+        /* Short Video Header or M4V */
+
+        /**************************/
+        /* VisualObjectSequence ()*/
+        /**************************/
+        status = BitstreamPutGT16Bits(stream, 32, SESSION_START_CODE);
+        /*  Determine profile_level */
+        status = BitstreamPutBits(stream, 8, video->encParams->ProfileLevel[video->currLayer]);
+
+        /******************/
+        /* VisualObject() */
+        /******************/
+
+        status = BitstreamPutGT16Bits(stream, 32, VISUAL_OBJECT_START_CODE);
+        status = BitstreamPut1Bits(stream, 0x00); /* visual object identifier */
+        status = BitstreamPutBits(stream, 4, 0x01); /* visual object Type == "video ID" */
+        status = BitstreamPut1Bits(stream, 0x00); /* no video signal type */
+
+        /*temp   = */
+        BitstreamMpeg4ByteAlignStuffing(stream);
+
+
+        status = BitstreamPutGT16Bits(stream, 27, VO_START_CODE);/* byte align: should be 2 bits */
+        status = BitstreamPutBits(stream, 5, 0x00);/*  Video ID = 0  */
+
+
+
+        /**********************/
+        /* VideoObjectLayer() */
+        /**********************/
+        if (currVol->shortVideoHeader == 0)
+        { /* M4V  else Short Video Header */
+            status = BitstreamPutGT16Bits(stream, VOL_START_CODE_LENGTH, VOL_START_CODE);
+            status = BitstreamPutBits(stream, 4, currVol->volID);/*  video_object_layer_id */
+            status = BitstreamPut1Bits(stream, 0x00);/*  Random Access = 0  */
+
+            if (video->currLayer == 0)
+                status = BitstreamPutBits(stream, 8, 0x01);/* Video Object Type Indication = 1  ... Simple Object Type */
+            else
+                status = BitstreamPutBits(stream, 8, 0x02);/* Video Object Type Indication = 2  ... Simple Scalable Object Type */
+
+            status = BitstreamPut1Bits(stream, 0x00);/*  is_object_layer_identifer = 0 */
+
+
+            status = BitstreamPutBits(stream, 4, 0x01); /* aspect_ratio_info = 1 ... 1:1(Square) */
+            status = BitstreamPut1Bits(stream, 0x00);/* vol_control_parameters = 0 */
+            status = BitstreamPutBits(stream, 2, 0x00);/* video_object_layer_shape = 00 ... rectangular */
+            status = BitstreamPut1Bits(stream, 0x01);/* marker bit */
+            status = BitstreamPutGT8Bits(stream, 16, currVol->timeIncrementResolution);/* vop_time_increment_resolution */
+            status = BitstreamPut1Bits(stream, 0x01);/* marker bit */
+            status = BitstreamPut1Bits(stream, currVol->fixedVopRate);/* fixed_vop_rate = 0 */
+
+            /* For Rectangular VO layer shape */
+            status = BitstreamPut1Bits(stream, 0x01);/* marker bit */
+            status = BitstreamPutGT8Bits(stream, 13, currVol->width);/* video_object_layer_width */
+            status = BitstreamPut1Bits(stream, 0x01);/* marker bit */
+            status = BitstreamPutGT8Bits(stream, 13, currVol->height);/* video_object_layer_height */
+            status = BitstreamPut1Bits(stream, 0x01);/*marker bit */
+
+            status = BitstreamPut1Bits(stream, 0x00);/*interlaced = 0 */
+            status = BitstreamPut1Bits(stream, 0x01);/* obmc_disable = 1 */
+            status = BitstreamPut1Bits(stream, 0x00);/* sprite_enable = 0 */
+            status = BitstreamPut1Bits(stream, 0x00);/* not_8_bit = 0 */
+            status = BitstreamPut1Bits(stream, currVol->quantType);/*   quant_type */
+
+            if (currVol->quantType)
+            {
+                status = BitstreamPut1Bits(stream, currVol->loadIntraQuantMat); /* Intra quant matrix */
+                if (currVol->loadIntraQuantMat)
+                {
+                    for (j = 63; j >= 1; j--)
+                        if (currVol->iqmat[*(zigzag_i+j)] != currVol->iqmat[*(zigzag_i+j-1)])
+                            break;
+                    if ((j == 1) && (currVol->iqmat[*(zigzag_i+j)] == currVol->iqmat[*(zigzag_i+j-1)]))
+                        j = 0;
+                    for (i = 0; i < j + 1; i++)
+                        BitstreamPutBits(stream, 8, currVol->iqmat[*(zigzag_i+i)]);
+                    if (j < 63)
+                        BitstreamPutBits(stream, 8, 0);
+                }
+                else
+                {
+                    for (j = 0; j < 64; j++)
+                        currVol->iqmat[j] = mpeg_iqmat_def[j];
+
+                }
+                status = BitstreamPut1Bits(stream, currVol->loadNonIntraQuantMat); /* Non-Intra quant matrix */
+                if (currVol->loadNonIntraQuantMat)
+                {
+                    for (j = 63; j >= 1; j--)
+                        if (currVol->niqmat[*(zigzag_i+j)] != currVol->niqmat[*(zigzag_i+j-1)])
+                            break;
+                    if ((j == 1) && (currVol->niqmat[*(zigzag_i+j)] == currVol->niqmat[*(zigzag_i+j-1)]))
+                        j = 0;
+                    for (i = 0; i < j + 1; i++)
+                        BitstreamPutBits(stream, 8, currVol->niqmat[*(zigzag_i+i)]);
+                    if (j < 63)
+                        BitstreamPutBits(stream, 8, 0);
+                }
+                else
+                {
+                    for (j = 0; j < 64; j++)
+                        currVol->niqmat[j] = mpeg_nqmat_def[j];
+                }
+            }
+
+            status = BitstreamPut1Bits(stream, 0x01);   /* complexity_estimation_disable = 1 */
+            status = BitstreamPut1Bits(stream, currVol->ResyncMarkerDisable);/* Resync_marker_disable */
+            status = BitstreamPut1Bits(stream, currVol->dataPartitioning);/* Data partitioned */
+
+            if (currVol->dataPartitioning)
+                status = BitstreamPut1Bits(stream, currVol->useReverseVLC); /* Reversible_vlc */
+
+
+            if (currVol->scalability) /* Scalability*/
+            {
+
+                status = BitstreamPut1Bits(stream, currVol->scalability);/* Scalability = 1 */
+                status = BitstreamPut1Bits(stream, currVol->scalType);/* hierarchy _type ... Spatial= 0 and Temporal = 1 */
+                status = BitstreamPutBits(stream, 4, currVol->refVolID);/* ref_layer_id  */
+                status = BitstreamPut1Bits(stream, currVol->refSampDir);/* ref_layer_sampling_direc*/
+                status = BitstreamPutBits(stream, 5, currVol->horSamp_n);/*hor_sampling_factor_n*/
+                status = BitstreamPutBits(stream, 5, currVol->horSamp_m);/*hor_sampling_factor_m*/
+                status = BitstreamPutBits(stream, 5, currVol->verSamp_n);/*vert_sampling_factor_n*/
+                status = BitstreamPutBits(stream, 5, currVol->verSamp_m);/*vert_sampling_factor_m*/
+                status = BitstreamPut1Bits(stream, currVol->enhancementType);/* enhancement_type*/
+            }
+            else /* No Scalability */
+                status = BitstreamPut1Bits(stream, currVol->scalability);/* Scalability = 0 */
+
+            /*temp = */
+            BitstreamMpeg4ByteAlignStuffing(stream); /* Byte align Headers for VOP */
+        }
+    }
+
+    return status;
+}
+
+/* ======================================================================== */
+/*  Function : VOS_End()                                                    */
+/*  Date     : 08/22/2000                                                   */
+/*  Purpose  : Visual Object Sequence End                                   */
+/*  In/out   :                                                              */
+/*  Return   : PV_TRUE if successed, PV_FALSE if failed.                    */
+/*  Modified :                                                              */
+/*                                                                          */
+/* ======================================================================== */
+
+PV_STATUS VOS_End(VideoEncControls *encoderControl)
+{
+    PV_STATUS status = PV_SUCCESS;
+    VideoEncData *video = (VideoEncData *)encoderControl->videoEncoderData;
+    Vol         *currVol = video->vol[video->currLayer];
+    BitstreamEncVideo *stream = currVol->stream;
+
+
+    status = BitstreamPutBits(stream, SESSION_END_CODE, 32);
+
+    return status;
+}
+
+/* ======================================================================== */
+/*  Function : DetermineCodingLayer                                         */
+/*  Date     : 06/02/2001                                                   */
+/*  Purpose  : Find layer to code based on current mod time, assuming that
+               it's time to encode enhanced layer.                          */
+/*  In/out   :                                                              */
+/*  Return   : Number of layer to code.                                     */
+/*  Modified :                                                              */
+/*                                                                          */
+/* ======================================================================== */
+
+Int DetermineCodingLayer(VideoEncData *video, Int *nLayer, ULong modTime)
+{
+    Vol **vol = video->vol;
+    VideoEncParams *encParams = video->encParams;
+    Int numLayers = encParams->nLayers;
+    UInt modTimeRef = video->modTimeRef;
+    float *LayerFrameRate = encParams->LayerFrameRate;
+    UInt frameNum[4], frameTick;
+    ULong frameModTime, nextFrmModTime;
+#ifdef REDUCE_FRAME_VARIANCE    /* To limit how close 2 frames can be */
+    float frameInterval;
+#endif
+    float srcFrameInterval;
+    Int frameInc;
+    Int i, extra_skip;
+    Int encodeVop = 0;
+
+    i = numLayers - 1;
+
+    if (modTime - video->nextModTime > ((ULong)(-1)) >> 1) /* next time wrapped around */
+        return 0; /* not time to code it yet */
+
+    video->relLayerCodeTime[i] -= 1000;
+    video->nextEncIVop--;  /* number of Vops in highest layer resolution. */
+    video->numVopsInGOP++;
+
+    /* from this point frameModTime and nextFrmModTime are internal */
+
+    frameNum[i] = (UInt)((modTime - modTimeRef) * LayerFrameRate[i] + 500) / 1000;
+    if (video->volInitialize[i])
+    {
+        video->prevFrameNum[i] = frameNum[i] - 1;
+    }
+    else if (frameNum[i] <= video->prevFrameNum[i])
+    {
+        return 0; /* do not encode this frame */
+    }
+
+    /**** this part computes expected next frame *******/
+    frameModTime = (ULong)(((frameNum[i] * 1000) / LayerFrameRate[i]) + modTimeRef + 0.5); /* rec. time */
+    nextFrmModTime = (ULong)((((frameNum[i] + 1) * 1000) / LayerFrameRate[i]) + modTimeRef + 0.5); /* rec. time */
+
+    srcFrameInterval = 1000 / video->FrameRate;
+
+    video->nextModTime = nextFrmModTime - (ULong)(srcFrameInterval / 2.) - 1; /* between current and next frame */
+
+#ifdef REDUCE_FRAME_VARIANCE    /* To limit how close 2 frames can be */
+    frameInterval = 1000 / LayerFrameRate[i]; /* next rec. time */
+    delta = (Int)(frameInterval / 4); /* empirical number */
+    if (video->nextModTime - modTime  < (ULong)delta) /* need to move nextModTime further. */
+    {
+        video->nextModTime += ((delta - video->nextModTime + modTime)); /* empirical formula  */
+    }
+#endif
+    /****************************************************/
+
+    /* map frame no.to tick from modTimeRef */
+    /*frameTick = (frameNum[i]*vol[i]->timeIncrementResolution) ;
+    frameTick = (UInt)((frameTick + (encParams->LayerFrameRate[i]/2))/encParams->LayerFrameRate[i]);*/
+    /*  11/16/01, change frameTick to be the closest tick from the actual modTime */
+    /*  12/12/02, add (double) to prevent large number wrap-around */
+    frameTick = (Int)(((double)(modTime - modTimeRef) * vol[i]->timeIncrementResolution + 500) / 1000);
+
+    /* find timeIncrement to be put in the bitstream */
+    /* refTick is second boundary reference. */
+    vol[i]->timeIncrement = frameTick - video->refTick[i];
+
+
+    vol[i]->moduloTimeBase = 0;
+    while (vol[i]->timeIncrement >= vol[i]->timeIncrementResolution)
+    {
+        vol[i]->timeIncrement -= vol[i]->timeIncrementResolution;
+        vol[i]->moduloTimeBase++;
+        /* do not update refTick and modTimeRef yet, do it after encoding!! */
+    }
+
+    if (video->relLayerCodeTime[i] <= 0)    /* no skipping */
+    {
+        encodeVop = 1;
+        video->currLayer = *nLayer = i;
+        video->relLayerCodeTime[i] += 1000;
+
+        /* takes care of more dropped frame than expected */
+        extra_skip = -1;
+        frameInc = (frameNum[i] - video->prevFrameNum[i]);
+        extra_skip += frameInc;
+
+        if (extra_skip > 0)
+        {   /* update rc->Nr, rc->B, (rc->Rr)*/
+            video->nextEncIVop -= extra_skip;
+            video->numVopsInGOP += extra_skip;
+            if (encParams->RC_Type != CONSTANT_Q)
+            {
+                RC_UpdateBuffer(video, i, extra_skip);
+            }
+        }
+
+    }
+    /* update frame no. */
+    video->prevFrameNum[i] = frameNum[i];
+
+    /* go through all lower layer */
+    for (i = (numLayers - 2); i >= 0; i--)
+    {
+
+        video->relLayerCodeTime[i] -= 1000;
+
+        /* find timeIncrement to be put in the bitstream */
+        vol[i]->timeIncrement = frameTick - video->refTick[i];
+
+        if (video->relLayerCodeTime[i] <= 0) /* time to encode base */
+        {
+            /* 12/27/00 */
+            encodeVop = 1;
+            video->currLayer = *nLayer = i;
+            video->relLayerCodeTime[i] +=
+                (Int)((1000.0 * encParams->LayerFrameRate[numLayers-1]) / encParams->LayerFrameRate[i]);
+
+            vol[i]->moduloTimeBase = 0;
+            while (vol[i]->timeIncrement >= vol[i]->timeIncrementResolution)
+            {
+                vol[i]->timeIncrement -= vol[i]->timeIncrementResolution;
+                vol[i]->moduloTimeBase++;
+                /* do not update refTick and modTimeRef yet, do it after encoding!! */
+            }
+
+            /* takes care of more dropped frame than expected */
+            frameNum[i] = (UInt)((frameModTime - modTimeRef) * encParams->LayerFrameRate[i] + 500) / 1000;
+            if (video->volInitialize[i])
+                video->prevFrameNum[i] = frameNum[i] - 1;
+
+            extra_skip = -1;
+            frameInc = (frameNum[i] - video->prevFrameNum[i]);
+            extra_skip += frameInc;
+
+            if (extra_skip > 0)
+            {   /* update rc->Nr, rc->B, (rc->Rr)*/
+                if (encParams->RC_Type != CONSTANT_Q)
+                {
+                    RC_UpdateBuffer(video, i, extra_skip);
+                }
+            }
+            /* update frame no. */
+            video->prevFrameNum[i] = frameNum[i];
+        }
+    }
+
+#ifdef _PRINT_STAT
+    if (encodeVop)
+        printf(" TI: %d ", vol[*nLayer]->timeIncrement);
+#endif
+
+    return encodeVop;
+}
+
+/* ======================================================================== */
+/*  Function : DetermineVopType                                             */
+/*  Date     : 06/02/2001                                                   */
+/*  Purpose  : The name says it all.                                        */
+/*  In/out   :                                                              */
+/*  Return   : void .                                                       */
+/*  Modified :                                                              */
+/*                                                                          */
+/* ======================================================================== */
+
+void DetermineVopType(VideoEncData *video, Int currLayer)
+{
+    VideoEncParams *encParams = video->encParams;
+//  Vol *currVol = video->vol[currLayer];
+
+    if (encParams->IntraPeriod == 0) /* I-VOPs only */
+    {
+        if (video->currLayer > 0)
+            video->currVop->predictionType = P_VOP;
+        else
+        {
+            video->currVop->predictionType = I_VOP;
+            if (video->numVopsInGOP >= 132)
+                video->numVopsInGOP = 0;
+        }
+    }
+    else if (encParams->IntraPeriod == -1)  /* IPPPPP... */
+    {
+
+        /* maintain frame type if previous frame is pre-skipped, 06/02/2001 */
+        if (encParams->RC_Type == CONSTANT_Q || video->rc[currLayer]->skip_next_frame != -1)
+            video->currVop->predictionType = P_VOP;
+
+        if (video->currLayer == 0)
+        {
+            if (/*video->numVopsInGOP>=132 || */video->volInitialize[currLayer])
+            {
+                video->currVop->predictionType = I_VOP;
+                video->numVopsInGOP = 0; /* force INTRA update every 132 base frames*/
+                video->nextEncIVop = 1;
+            }
+            else if (video->nextEncIVop == 0 || video->currVop->predictionType == I_VOP)
+            {
+                video->numVopsInGOP = 0;
+                video->nextEncIVop = 1;
+            }
+        }
+    }
+    else   /* IntraPeriod>0 : IPPPPPIPPPPPI... */
+    {
+
+        /* maintain frame type if previous frame is pre-skipped, 06/02/2001 */
+        if (encParams->RC_Type == CONSTANT_Q || video->rc[currLayer]->skip_next_frame != -1)
+            video->currVop->predictionType = P_VOP;
+
+        if (currLayer == 0)
+        {
+            if (video->nextEncIVop <= 0 || video->currVop->predictionType == I_VOP)
+            {
+                video->nextEncIVop = encParams->IntraPeriod;
+                video->currVop->predictionType = I_VOP;
+                video->numVopsInGOP = 0;
+            }
+        }
+    }
+
+    return ;
+}
+
+/* ======================================================================== */
+/*  Function : UpdateSkipNextFrame                                          */
+/*  Date     : 06/02/2001                                                   */
+/*  Purpose  : From rate control frame skipping decision, update timing
+                related parameters.                                         */
+/*  In/out   :                                                              */
+/*  Return   : Current coded layer.                                         */
+/*  Modified :                                                              */
+/*                                                                          */
+/* ======================================================================== */
+
+Int UpdateSkipNextFrame(VideoEncData *video, ULong *modTime, Int *size, PV_STATUS status)
+{
+    Int currLayer = video->currLayer;
+    Int nLayer = currLayer;
+    VideoEncParams *encParams = video->encParams;
+    Int numLayers = encParams->nLayers;
+    Vol *currVol = video->vol[currLayer];
+    Vol **vol = video->vol;
+    Int num_skip, extra_skip;
+    Int i;
+    UInt newRefTick, deltaModTime;
+    UInt temp;
+
+    if (encParams->RC_Type != CONSTANT_Q)
+    {
+        if (video->volInitialize[0] && currLayer == 0)  /* always encode the first frame */
+        {
+            RC_ResetSkipNextFrame(video, currLayer);
+            //return currLayer;  09/15/05
+        }
+        else
+        {
+            if (RC_GetSkipNextFrame(video, currLayer) < 0 || status == PV_END_OF_BUF)   /* Skip Current Frame */
+            {
+
+#ifdef _PRINT_STAT
+                printf("Skip current frame");
+#endif
+                currVol->moduloTimeBase = currVol->prevModuloTimeBase;
+
+                /*********************/
+                /* prepare to return */
+                /*********************/
+                *size = 0;  /* Set Bitstream buffer to zero */
+
+                /* Determine nLayer and modTime for next encode */
+
+                *modTime = video->nextModTime;
+                nLayer = -1;
+
+                return nLayer; /* return immediately without updating RefTick & modTimeRef */
+                /* If I-VOP was attempted, then ensure next base is I-VOP */
+                /*if((encParams->IntraPeriod>0) && (video->currVop->predictionType == I_VOP))
+                video->nextEncIVop = 0; commented out by 06/05/01 */
+
+            }
+            else if ((num_skip = RC_GetSkipNextFrame(video, currLayer)) > 0)
+            {
+
+#ifdef _PRINT_STAT
+                printf("Skip next %d frames", num_skip);
+#endif
+                /* to keep the Nr of enh layer the same */
+                /* adjust relLayerCodeTime only, do not adjust layerCodeTime[numLayers-1] */
+                extra_skip = 0;
+                for (i = 0; i < currLayer; i++)
+                {
+                    if (video->relLayerCodeTime[i] <= 1000)
+                    {
+                        extra_skip = 1;
+                        break;
+                    }
+                }
+
+                for (i = currLayer; i < numLayers; i++)
+                {
+                    video->relLayerCodeTime[i] += (num_skip + extra_skip) *
+                                                  ((Int)((1000.0 * encParams->LayerFrameRate[numLayers-1]) / encParams->LayerFrameRate[i]));
+                }
+            }
+        }/* first frame */
+    }
+    /*****  current frame is encoded, now update refTick ******/
+
+    video->refTick[currLayer] += vol[currLayer]->prevModuloTimeBase * vol[currLayer]->timeIncrementResolution;
+
+    /* Reset layerCodeTime every I-VOP to prevent overflow */
+    if (currLayer == 0)
+    {
+        /*  12/12/02, fix for weird targer frame rate of 9.99 fps or 3.33 fps */
+        if (((encParams->IntraPeriod != 0) /*&& (video->currVop->predictionType==I_VOP)*/) ||
+                ((encParams->IntraPeriod == 0) && (video->numVopsInGOP == 0)))
+        {
+            newRefTick = video->refTick[0];
+
+            for (i = 1; i < numLayers; i++)
+            {
+                if (video->refTick[i] < newRefTick)
+                    newRefTick = video->refTick[i];
+            }
+
+            /* check to make sure that the update is integer multiple of frame number */
+            /* how many msec elapsed from last modTimeRef */
+            deltaModTime = (newRefTick / vol[0]->timeIncrementResolution) * 1000;
+
+            for (i = numLayers - 1; i >= 0; i--)
+            {
+                temp = (UInt)(deltaModTime * encParams->LayerFrameRate[i]); /* 12/12/02 */
+                if (temp % 1000)
+                    newRefTick = 0;
+
+            }
+            if (newRefTick > 0)
+            {
+                video->modTimeRef += deltaModTime;
+                for (i = numLayers - 1; i >= 0; i--)
+                {
+                    video->prevFrameNum[i] -= (UInt)(deltaModTime * encParams->LayerFrameRate[i]) / 1000;
+                    video->refTick[i] -= newRefTick;
+                }
+            }
+        }
+    }
+
+    *modTime =  video->nextModTime;
+
+    return nLayer;
+}
+
+
+#ifndef ORIGINAL_VERSION
+
+/* ======================================================================== */
+/*  Function : SetProfile_BufferSize                                        */
+/*  Date     : 04/08/2002                                                   */
+/*  Purpose  : Set profile and video buffer size, copied from Jim's code    */
+/*             in PVInitVideoEncoder(.), since we have different places     */
+/*             to reset profile and video buffer size                       */
+/*  In/out   :                                                              */
+/*  Return   :                                                              */
+/*  Modified :                                                              */
+/*                                                                          */
+/* ======================================================================== */
+
+Bool SetProfile_BufferSize(VideoEncData *video, float delay, Int bInitialized)
+{
+    Int i, j, start, end;
+//  Int BaseMBsPerSec = 0, EnhMBsPerSec = 0;
+    Int nTotalMB = 0;
+    Int idx, temp_w, temp_h, max = 0, max_width, max_height;
+
+    Int nLayers = video->encParams->nLayers; /* Number of Layers to be encoded */
+
+    Int total_bitrate = 0, base_bitrate;
+    Int total_packet_size = 0, base_packet_size;
+    Int total_MBsPerSec = 0, base_MBsPerSec;
+    Int total_VBV_size = 0, base_VBV_size, enhance_VBV_size = 0;
+    float total_framerate, base_framerate;
+    float upper_bound_ratio;
+    Int bFound = 0;
+    Int k = 0, width16, height16, index;
+    Int lowest_level;
+
+#define MIN_BUFF    16000 /* 16k minimum buffer size */
+#define BUFF_CONST  2.0    /* 2000ms */
+#define UPPER_BOUND_RATIO 8.54 /* upper_bound = 1.4*(1.1+bound/10)*bitrate/framerate */
+
+#define QCIF_WIDTH  176
+#define QCIF_HEIGHT 144
+
+    index = video->encParams->profile_table_index;
+
+    /* Calculate "nTotalMB" */
+    /* Find the maximum width*height for memory allocation of the VOPs */
+    for (idx = 0; idx < nLayers; idx++)
+    {
+        temp_w = video->encParams->LayerWidth[idx];
+        temp_h = video->encParams->LayerHeight[idx];
+
+        if ((temp_w*temp_h) > max)
+        {
+            max = temp_w * temp_h;
+            max_width = temp_w;
+            max_height = temp_h;
+            nTotalMB = ((max_width + 15) >> 4) * ((max_height + 15) >> 4);
+        }
+    }
+    upper_bound_ratio = (video->encParams->RC_Type == CBR_LOWDELAY ? (float)5.0 : (float)UPPER_BOUND_RATIO);
+
+
+    /* Get the basic information: bitrate, packet_size, MBs/s and VBV_size */
+    base_bitrate        = video->encParams->LayerBitRate[0];
+    if (video->encParams->LayerMaxBitRate[0] != 0) /* video->encParams->LayerMaxBitRate[0] == 0 means it has not been set */
+    {
+        base_bitrate    = PV_MAX(base_bitrate, video->encParams->LayerMaxBitRate[0]);
+    }
+    else /* if the max is not set, set it to the specified profile/level */
+    {
+        video->encParams->LayerMaxBitRate[0] = profile_level_max_bitrate[index];
+    }
+
+    base_framerate      = video->encParams->LayerFrameRate[0];
+    if (video->encParams->LayerMaxFrameRate[0] != 0)
+    {
+        base_framerate  = PV_MAX(base_framerate, video->encParams->LayerMaxFrameRate[0]);
+    }
+    else /* if the max is not set, set it to the specified profile/level */
+    {
+        video->encParams->LayerMaxFrameRate[0] = (float)profile_level_max_mbsPerSec[index] / nTotalMB;
+    }
+
+    base_packet_size    = video->encParams->ResyncPacketsize;
+    base_MBsPerSec      = (Int)(base_framerate * nTotalMB);
+    base_VBV_size       = PV_MAX((Int)(base_bitrate * delay),
+                                 (Int)(upper_bound_ratio * base_bitrate / base_framerate));
+    base_VBV_size       = PV_MAX(base_VBV_size, MIN_BUFF);
+
+    /* if the buffer is larger than maximum buffer size, we'll clip it */
+    if (base_VBV_size > profile_level_max_VBV_size[5])
+        base_VBV_size = profile_level_max_VBV_size[5];
+
+
+    /* Check if the buffer exceeds the maximum buffer size given the maximum profile and level */
+    if (nLayers == 1 && base_VBV_size > profile_level_max_VBV_size[index])
+        return FALSE;
+
+
+    if (nLayers == 2)
+    {
+        total_bitrate       = video->encParams->LayerBitRate[1];
+        if (video->encParams->LayerMaxBitRate[1] != 0)
+        {
+            total_bitrate   = PV_MIN(total_bitrate, video->encParams->LayerMaxBitRate[1]);
+        }
+        else /* if the max is not set, set it to the specified profile/level */
+        {
+            video->encParams->LayerMaxBitRate[1] = scalable_profile_level_max_bitrate[index];
+        }
+
+        total_framerate     = video->encParams->LayerFrameRate[1];
+        if (video->encParams->LayerMaxFrameRate[1] != 0)
+        {
+            total_framerate     = PV_MIN(total_framerate, video->encParams->LayerMaxFrameRate[1]);
+        }
+        else /* if the max is not set, set it to the specified profile/level */
+        {
+            video->encParams->LayerMaxFrameRate[1] = (float)scalable_profile_level_max_mbsPerSec[index] / nTotalMB;
+        }
+
+        total_packet_size   = video->encParams->ResyncPacketsize;
+        total_MBsPerSec     = (Int)(total_framerate * nTotalMB);
+
+        enhance_VBV_size    = PV_MAX((Int)((total_bitrate - base_bitrate) * delay),
+                                     (Int)(upper_bound_ratio * (total_bitrate - base_bitrate) / (total_framerate - base_framerate)));
+        enhance_VBV_size    = PV_MAX(enhance_VBV_size, MIN_BUFF);
+
+        total_VBV_size      = base_VBV_size + enhance_VBV_size;
+
+        /* if the buffer is larger than maximum buffer size, we'll clip it */
+        if (total_VBV_size > scalable_profile_level_max_VBV_size[6])
+        {
+            total_VBV_size = scalable_profile_level_max_VBV_size[6];
+            enhance_VBV_size = total_VBV_size - base_VBV_size;
+        }
+
+        /* Check if the buffer exceeds the maximum buffer size given the maximum profile and level */
+        if (total_VBV_size > scalable_profile_level_max_VBV_size[index])
+            return FALSE;
+    }
+
+
+    if (!bInitialized) /* Has been initialized --> profile @ level has been figured out! */
+    {
+        video->encParams->BufferSize[0] = base_VBV_size;
+        if (nLayers > 1)
+            video->encParams->BufferSize[1] = enhance_VBV_size;
+
+        return PV_TRUE;
+    }
+
+
+    /* Profile @ level determination */
+    if (nLayers == 1)
+    {
+        /* BASE ONLY : Simple Profile(SP) Or Core Profile(CP) */
+        if (base_bitrate     > profile_level_max_bitrate[index]     ||
+                base_packet_size > profile_level_max_packet_size[index] ||
+                base_MBsPerSec   > profile_level_max_mbsPerSec[index]   ||
+                base_VBV_size    > profile_level_max_VBV_size[index])
+
+            return PV_FALSE; /* Beyond the bound of Core Profile @ Level2 */
+
+        /* For H263/Short header, determine k*16384 */
+        width16  = ((video->encParams->LayerWidth[0] + 15) >> 4) << 4;
+        height16 = ((video->encParams->LayerHeight[0] + 15) >> 4) << 4;
+        if (video->encParams->H263_Enabled)
+        {
+            k = 4;
+            if (width16  == 2*QCIF_WIDTH && height16 == 2*QCIF_HEIGHT)  /* CIF */
+                k = 16;
+
+            else if (width16  == 4*QCIF_WIDTH && height16 == 4*QCIF_HEIGHT)  /* 4CIF */
+                k = 32;
+
+            else if (width16  == 8*QCIF_WIDTH && height16 == 8*QCIF_HEIGHT)  /* 16CIF */
+                k = 64;
+
+            video->encParams->maxFrameSize  = k * 16384;
+
+            /* Make sure the buffer size is limited to the top profile and level: the Core profile and level 2 */
+            if (base_VBV_size > (Int)(k*16384 + 4*(float)profile_level_max_bitrate[5]*1001.0 / 30000.0))
+                base_VBV_size = (Int)(k * 16384 + 4 * (float)profile_level_max_bitrate[5] * 1001.0 / 30000.0);
+
+            if (base_VBV_size > (Int)(k*16384 + 4*(float)profile_level_max_bitrate[index]*1001.0 / 30000.0))
+                return PV_FALSE;
+        }
+
+        /* Search the appropriate profile@level index */
+        if (!video->encParams->H263_Enabled &&
+                (video->encParams->IntraDCVlcThr != 0 || video->encParams->SearchRange > 16))
+        {
+            lowest_level = 1; /* cannot allow SPL0 */
+        }
+        else
+        {
+            lowest_level = 0; /* SPL0 */
+        }
+
+        for (i = lowest_level; i <= index; i++)
+        {
+            if (i != 4 && /* skip Core Profile@Level1 because the parameters in it are smaller than those in Simple Profile@Level3 */
+                    base_bitrate     <= profile_level_max_bitrate[i]     &&
+                    base_packet_size <= profile_level_max_packet_size[i] &&
+                    base_MBsPerSec   <= profile_level_max_mbsPerSec[i]   &&
+                    base_VBV_size    <= (video->encParams->H263_Enabled ? (Int)(k*16384 + 4*(float)profile_level_max_bitrate[i]*1001.0 / 30000.0) :
+                                         profile_level_max_VBV_size[i]))
+                break;
+        }
+        if (i > index) return PV_FALSE; /* Nothing found!! */
+
+        /* Found out the actual profile @ level : index "i" */
+        if (i == 0)
+        {
+            /* For Simple Profile @ Level 0, we need to do one more check: image size <= QCIF */
+            if (width16 > QCIF_WIDTH || height16 > QCIF_HEIGHT)
+                i = 1; /* image size > QCIF, then set SP level1 */
+        }
+
+        video->encParams->ProfileLevel[0] = profile_level_code[i];
+        video->encParams->BufferSize[0]   = base_VBV_size;
+
+        if (video->encParams->LayerMaxBitRate[0] == 0)
+            video->encParams->LayerMaxBitRate[0] = profile_level_max_bitrate[i];
+
+        if (video->encParams->LayerMaxFrameRate[0] == 0)
+            video->encParams->LayerMaxFrameRate[0] = PV_MIN(30, (float)profile_level_max_mbsPerSec[i] / nTotalMB);
+
+        /* For H263/Short header, one special constraint for VBV buffer size */
+        if (video->encParams->H263_Enabled)
+            video->encParams->BufferSize[0] = (Int)(k * 16384 + 4 * (float)profile_level_max_bitrate[i] * 1001.0 / 30000.0);
+
+    }
+    else
+    {
+        /* SCALABALE MODE: Simple Scalable Profile(SSP) Or Core Scalable Profile(CSP) */
+
+        if (total_bitrate       > scalable_profile_level_max_bitrate[index]     ||
+                total_packet_size   > scalable_profile_level_max_packet_size[index] ||
+                total_MBsPerSec     > scalable_profile_level_max_mbsPerSec[index]   ||
+                total_VBV_size      > scalable_profile_level_max_VBV_size[index])
+
+            return PV_FALSE; /* Beyond given profile and level */
+
+        /* One-time check: Simple Scalable Profile or Core Scalable Profile */
+        if (total_bitrate       <= scalable_profile_level_max_bitrate[2]        &&
+                total_packet_size   <= scalable_profile_level_max_packet_size[2]    &&
+                total_MBsPerSec     <= scalable_profile_level_max_mbsPerSec[2]      &&
+                total_VBV_size      <= scalable_profile_level_max_VBV_size[2])
+
+        {
+            start = 0;
+            end = index;
+        }
+
+        else
+        {
+            start = 4;
+            end = index;
+        }
+
+
+        /* Search the scalable profile */
+        for (i = start; i <= end; i++)
+        {
+            if (total_bitrate       <= scalable_profile_level_max_bitrate[i]     &&
+                    total_packet_size   <= scalable_profile_level_max_packet_size[i] &&
+                    total_MBsPerSec     <= scalable_profile_level_max_mbsPerSec[i]   &&
+                    total_VBV_size      <= scalable_profile_level_max_VBV_size[i])
+
+                break;
+        }
+        if (i > end) return PV_FALSE;
+
+        /* Search the base profile */
+        if (i == 0)
+        {
+            j = 0;
+            bFound = 1;
+        }
+        else        bFound = 0;
+
+        for (j = start; !bFound && j <= i; j++)
+        {
+            if (base_bitrate        <= profile_level_max_bitrate[j]      &&
+                    base_packet_size    <= profile_level_max_packet_size[j]  &&
+                    base_MBsPerSec      <= profile_level_max_mbsPerSec[j]    &&
+                    base_VBV_size       <= profile_level_max_VBV_size[j])
+
+            {
+                bFound = 1;
+                break;
+            }
+        }
+
+        if (!bFound) // && start == 4)
+            return PV_FALSE; /* mis-match in the profiles between base layer and enhancement layer */
+
+        /* j for base layer, i for enhancement layer */
+        video->encParams->ProfileLevel[0] = profile_level_code[j];
+        video->encParams->ProfileLevel[1] = scalable_profile_level_code[i];
+        video->encParams->BufferSize[0]   = base_VBV_size;
+        video->encParams->BufferSize[1]   = enhance_VBV_size;
+
+        if (video->encParams->LayerMaxBitRate[0] == 0)
+            video->encParams->LayerMaxBitRate[0] = profile_level_max_bitrate[j];
+
+        if (video->encParams->LayerMaxBitRate[1] == 0)
+            video->encParams->LayerMaxBitRate[1] = scalable_profile_level_max_bitrate[i];
+
+        if (video->encParams->LayerMaxFrameRate[0] == 0)
+            video->encParams->LayerMaxFrameRate[0] = PV_MIN(30, (float)profile_level_max_mbsPerSec[j] / nTotalMB);
+
+        if (video->encParams->LayerMaxFrameRate[1] == 0)
+            video->encParams->LayerMaxFrameRate[1] = PV_MIN(30, (float)scalable_profile_level_max_mbsPerSec[i] / nTotalMB);
+
+
+    } /* end of: if(nLayers == 1) */
+
+
+    if (!video->encParams->H263_Enabled && (video->encParams->ProfileLevel[0] == 0x08)) /* SPL0 restriction*/
+    {
+        /* PV only allow frame-based rate control, no QP change from one MB to another
+        if(video->encParams->ACDCPrediction == TRUE && MB-based rate control)
+         return PV_FALSE */
+    }
+
+    return PV_TRUE;
+}
+
+#endif /* #ifndef ORIGINAL_VERSION */
+
+
+
diff --git a/media/libstagefright/codecs/m4v_h263/enc/src/mp4enc_lib.h b/media/libstagefright/codecs/m4v_h263/enc/src/mp4enc_lib.h
new file mode 100644
index 0000000..8293576
--- /dev/null
+++ b/media/libstagefright/codecs/m4v_h263/enc/src/mp4enc_lib.h
@@ -0,0 +1,207 @@
+/* ------------------------------------------------------------------
+ * Copyright (C) 1998-2009 PacketVideo
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
+ * express or implied.
+ * See the License for the specific language governing permissions
+ * and limitations under the License.
+ * -------------------------------------------------------------------
+ */
+#ifndef _MP4ENC_LIB_H_
+#define _MP4ENC_LIB_H_
+
+#include "mp4def.h"     // typedef
+#include "mp4lib_int.h" // main video structure
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
+    /* defined in vop.c */
+    PV_STATUS EncodeVop(VideoEncData *video);
+    PV_STATUS EncodeSlice(VideoEncData *video);
+    PV_STATUS EncodeVideoPacketHeader(VideoEncData *video, int MB_number,
+                                      int quant_scale, Int insert);
+#ifdef ALLOW_VOP_NOT_CODED
+    PV_STATUS EncodeVopNotCoded(VideoEncData *video, UChar *bstream, Int *size, ULong modTime);
+#endif
+
+    /* defined in combined_decode.c */
+    PV_STATUS EncodeFrameCombinedMode(VideoEncData *video);
+    PV_STATUS EncodeSliceCombinedMode(VideoEncData *video);
+
+    /* defined in datapart_decode.c */
+    PV_STATUS EncodeFrameDataPartMode(VideoEncData *video);
+    PV_STATUS EncodeSliceDataPartMode(VideoEncData *video);
+
+    /* defined in fastcodeMB.c */
+
+//void m4v_memset(void *adr_dst, uint8 value, uint32 size);
+
+    PV_STATUS CodeMB_H263(VideoEncData *video, approxDCT *function, Int offsetQP, Int ncoefblck[]);
+#ifndef NO_MPEG_QUANT
+    PV_STATUS CodeMB_MPEG(VideoEncData *video, approxDCT *function, Int offsetQP, Int ncoefblck[]);
+#endif
+    Int getBlockSAV(Short block[]);
+    Int Sad8x8(UChar *rec, UChar *prev, Int lx);
+    Int getBlockSum(UChar *rec, Int lx);
+
+    /* defined in dct.c */
+    void  blockIdct(Short *block);
+    void blockIdct_SSE(Short *input);
+    void BlockDCTEnc(Short *blockData, Short *blockCoeff);
+
+    /*---- FastQuant.c -----*/
+    Int cal_dc_scalerENC(Int QP, Int type) ;
+    Int BlockQuantDequantH263Inter(Short *rcoeff, Short *qcoeff, struct QPstruct *QuantParam,
+                                   UChar bitmapcol[ ], UChar *bitmaprow, UInt *bitmapzz,
+                                   Int dctMode, Int comp, Int dummy, UChar shortHeader);
+
+    Int BlockQuantDequantH263Intra(Short *rcoeff, Short *qcoeff, struct QPstruct *QuantParam,
+                                   UChar bitmapcol[ ], UChar *bitmaprow, UInt *bitmapzz,
+                                   Int dctMode, Int comp, Int dc_scaler, UChar shortHeader);
+
+    Int BlockQuantDequantH263DCInter(Short *rcoeff, Short *qcoeff, struct QPstruct *QuantParam,
+                                     UChar *bitmaprow, UInt *bitmapzz, Int dummy, UChar shortHeader);
+
+    Int BlockQuantDequantH263DCIntra(Short *rcoeff, Short *qcoeff, struct QPstruct *QuantParam,
+                                     UChar *bitmaprow, UInt *bitmapzz, Int dc_scaler, UChar shortHeader);
+
+#ifndef NO_MPEG_QUANT
+    Int BlockQuantDequantMPEGInter(Short *rcoeff, Short *qcoeff, Int QP, Int *qmat,
+                                   UChar bitmapcol[ ], UChar *bitmaprow, UInt *bitmapzz,
+                                   Int DctMode, Int comp, Int dc_scaler);
+
+    Int BlockQuantDequantMPEGIntra(Short *rcoeff, Short *qcoeff, Int QP, Int *qmat,
+                                   UChar bitmapcol[ ], UChar *bitmaprow, UInt *bitmapzz,
+                                   Int DctMode, Int comp, Int dc_scaler);
+
+    Int BlockQuantDequantMPEGDCInter(Short *rcoeff, Short *qcoeff, Int QP, Int *qmat,
+                                     UChar bitmapcol[ ], UChar *bitmaprow, UInt *bitmapzz, Int dummy);
+
+    Int BlockQuantDequantMPEGDCIntra(Short *rcoeff, Short *qcoeff, Int QP, Int *qmat,
+                                     UChar bitmapcol[ ], UChar *bitmaprow, UInt *bitmapzz, Int dc_scaler);
+#endif
+
+    /*---- FastIDCT.c -----*/
+    void BlockIDCTMotionComp(Short *block, UChar *bitmapcol, UChar bitmaprow,
+                             Int dctMode, UChar *rec, UChar *prev, Int lx_intra_zeroMV);
+
+
+    /* defined in motion_comp.c */
+    void getMotionCompensatedMB(VideoEncData *video, Int ind_x, Int ind_y, Int offset);
+    void EncPrediction_INTER(Int xpred, Int ypred, UChar *c_prev, UChar *c_rec,
+                             Int width, Int round1);
+
+    void EncPrediction_INTER4V(Int xpred, Int ypred, MOT *mot, UChar *c_prev, UChar *c_rec,
+                               Int width, Int round1);
+
+    void EncPrediction_Chrom(Int xpred, Int ypred, UChar *cu_prev, UChar *cv_prev, UChar *cu_rec,
+                             UChar *cv_rec, Int pitch_uv, Int width_uv, Int height_uv, Int round1);
+
+    void get_MB(UChar *c_prev, UChar *c_prev_u  , UChar *c_prev_v,
+                Short mb[6][64], Int width, Int width_uv);
+
+    void PutSkippedBlock(UChar *rec, UChar *prev, Int lx);
+
+    /* defined in motion_est.c */
+    void MotionEstimation(VideoEncData *video);
+#ifdef HTFM
+    void InitHTFM(VideoEncData *video, HTFM_Stat *htfm_stat, double *newvar, Int *collect);
+    void UpdateHTFM(VideoEncData *video, double *newvar, double *exp_lamda, HTFM_Stat *htfm_stat);
+#endif
+
+    /* defined in ME_utils.c */
+    void ChooseMode_C(UChar *Mode, UChar *cur, Int lx, Int min_SAD);
+    void ChooseMode_MMX(UChar *Mode, UChar *cur, Int lx, Int min_SAD);
+    void GetHalfPelMBRegion_C(UChar *cand, UChar *hmem, Int lx);
+    void GetHalfPelMBRegion_SSE(UChar *cand, UChar *hmem, Int lx);
+    void GetHalfPelBlkRegion(UChar *cand, UChar *hmem, Int lx);
+    void PaddingEdge(Vop *padVop);
+    void ComputeMBSum_C(UChar *cur, Int lx, MOT *mot_mb);
+    void ComputeMBSum_MMX(UChar *cur, Int lx, MOT *mot_mb);
+    void ComputeMBSum_SSE(UChar *cur, Int lx, MOT *mot_mb);
+    void GetHalfPelMBRegionPadding(UChar *ncand, UChar *hmem, Int lx, Int *reptl);
+    void GetHalfPelBlkRegionPadding(UChar *ncand, UChar *hmem, Int lx, Int *reptl);
+
+    /* defined in findhalfpel.c */
+    void FindHalfPelMB(VideoEncData *video, UChar *cur, MOT *mot, UChar *ncand,
+                       Int xpos, Int ypos, Int *xhmin, Int *yhmin, Int hp_guess);
+    Int  FindHalfPelBlk(VideoEncData *video, UChar *cur, MOT *mot, Int sad16, UChar *ncand8[],
+                        UChar *mode, Int xpos, Int ypos, Int *xhmin, Int *yhmin, UChar *hp_mem);
+
+
+    /* defined in sad.c */
+    Int SAD_MB_HalfPel_Cxhyh(UChar *ref, UChar *blk, Int dmin_lx, void *extra_info);
+    Int SAD_MB_HalfPel_Cyh(UChar *ref, UChar *blk, Int dmin_lx, void *extra_info);
+    Int SAD_MB_HalfPel_Cxh(UChar *ref, UChar *blk, Int dmin_lx, void *extra_info);
+    Int SAD_MB_HalfPel_MMX(UChar *ref, UChar *blk, Int dmin_lx, void *extra_info);
+    Int SAD_MB_HalfPel_SSE(UChar *ref, UChar *blk, Int dmin_lx, void *extra_info);
+    Int SAD_Blk_HalfPel_C(UChar *ref, UChar *blk, Int dmin, Int lx, Int rx, Int xh, Int yh, void *extra_info);
+    Int SAD_Blk_HalfPel_MMX(UChar *ref, UChar *blk, Int dmin, Int lx, void *extra_info);
+    Int SAD_Blk_HalfPel_SSE(UChar *ref, UChar *blk, Int dmin, Int lx, void *extra_info);
+    Int SAD_Macroblock_C(UChar *ref, UChar *blk, Int dmin_lx, void *extra_info);
+    Int SAD_Macroblock_MMX(UChar *ref, UChar *blk, Int dmin_lx, void *extra_info);
+    Int SAD_Macroblock_SSE(UChar *ref, UChar *blk, Int dmin_lx, void *extra_info);
+    Int SAD_Block_C(UChar *ref, UChar *blk, Int dmin, Int lx, void *extra_info);
+    Int SAD_Block_MMX(UChar *ref, UChar *blk, Int dmin, Int lx, void *extra_info);
+    Int SAD_Block_SSE(UChar *ref, UChar *blk, Int dmin, Int lx, void *extra_info);
+
+#ifdef HTFM /* Hypothesis Testing Fast Matching */
+    Int SAD_MB_HP_HTFM_Collectxhyh(UChar *ref, UChar *blk, Int dmin_x, void *extra_info);
+    Int SAD_MB_HP_HTFM_Collectyh(UChar *ref, UChar *blk, Int dmin_x, void *extra_info);
+    Int SAD_MB_HP_HTFM_Collectxh(UChar *ref, UChar *blk, Int dmin_x, void *extra_info);
+    Int SAD_MB_HP_HTFMxhyh(UChar *ref, UChar *blk, Int dmin_lx, void *extra_info);
+    Int SAD_MB_HP_HTFMyh(UChar *ref, UChar *blk, Int dmin_lx, void *extra_info);
+    Int SAD_MB_HP_HTFMxh(UChar *ref, UChar *blk, Int dmin_lx, void *extra_info);
+    Int SAD_MB_HTFM_Collect(UChar *ref, UChar *blk, Int dmin_lx, void *extra_info);
+    Int SAD_MB_HTFM(UChar *ref, UChar *blk, Int dmin_lx, void *extra_info);
+#endif
+    /* on-the-fly padding */
+    Int SAD_Blk_PADDING(UChar *ref, UChar *cur, Int dmin, Int lx, void *extra_info);
+    Int SAD_MB_PADDING(UChar *ref, UChar *cur, Int dmin, Int lx, void *extra_info);
+#ifdef HTFM
+    Int SAD_MB_PADDING_HTFM_Collect(UChar *ref, UChar *blk, Int dmin, Int lx, void *extra_info);
+    Int SAD_MB_PADDING_HTFM(UChar *ref, UChar *blk, Int dmin, Int lx, void *extra_info);
+#endif
+
+    /* defined in rate_control.c */
+    /* These are APIs to rate control exposed to core encoder module. */
+    PV_STATUS RC_Initialize(void *video);
+    PV_STATUS RC_VopQPSetting(VideoEncData *video, rateControl *rc[]);
+    PV_STATUS RC_VopUpdateStat(VideoEncData *video, rateControl *rc);
+    PV_STATUS RC_MBQPSetting(VideoEncData *video, rateControl *rc, Int start_packet_header);
+    PV_STATUS RC_MBUpdateStat(VideoEncData *video, rateControl *rc, Int Bi, Int Hi);
+    PV_STATUS RC_Cleanup(rateControl *rc[], Int numLayers);
+
+    Int       RC_GetSkipNextFrame(VideoEncData *video, Int currLayer);
+    Int       RC_GetRemainingVops(VideoEncData *video, Int currLayer);
+    void      RC_ResetSkipNextFrame(VideoEncData *video, Int currLayer);
+    PV_STATUS RC_UpdateBuffer(VideoEncData *video, Int currLayer, Int num_skip);
+    PV_STATUS RC_UpdateBXRCParams(void *input);
+
+
+    /* defined in vlc_encode.c */
+    void MBVlcEncodeDataPar_I_VOP(VideoEncData *video, Int ncoefblck[], void *blkCodePtr);
+    void MBVlcEncodeDataPar_P_VOP(VideoEncData *video, Int ncoefblck[], void *blkCodePtr);
+    void MBVlcEncodeCombined_I_VOP(VideoEncData *video, Int ncoefblck[], void *blkCodePtr);
+    void MBVlcEncodeCombined_P_VOP(VideoEncData *video, Int ncoefblck[], void *blkCodePtr);
+    void BlockCodeCoeff_ShortHeader(RunLevelBlock *RLB, BitstreamEncVideo *bs, Int j_start, Int j_stop, UChar Mode);
+    void BlockCodeCoeff_RVLC(RunLevelBlock *RLB, BitstreamEncVideo *bs, Int j_start, Int j_stop, UChar Mode);
+    void BlockCodeCoeff_Normal(RunLevelBlock *RLB, BitstreamEncVideo *bs, Int j_start, Int j_stop, UChar Mode);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _MP4ENC_LIB_H_ */
+
diff --git a/media/libstagefright/codecs/m4v_h263/enc/src/mp4lib_int.h b/media/libstagefright/codecs/m4v_h263/enc/src/mp4lib_int.h
new file mode 100644
index 0000000..3bc9421
--- /dev/null
+++ b/media/libstagefright/codecs/m4v_h263/enc/src/mp4lib_int.h
@@ -0,0 +1,472 @@
+/* ------------------------------------------------------------------
+ * Copyright (C) 1998-2009 PacketVideo
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
+ * express or implied.
+ * See the License for the specific language governing permissions
+ * and limitations under the License.
+ * -------------------------------------------------------------------
+ */
+
+#ifndef _MP4LIB_INT_H_
+#define _MP4LIB_INT_H_
+
+#include "mp4def.h"
+#include "mp4enc_api.h"
+#include "rate_control.h"
+
+/* BitstreamEncVideo will be modified */
+typedef struct tagBitstream
+{
+    Int(*writeVideoPacket)(UChar *buf, Int nbytes_required);   /*write video packet out */
+    UChar *bitstreamBuffer; /*buffer to hold one video packet*/
+    Int bufferSize; /*total bitstream buffer size in bytes */
+    Int byteCount;  /*how many bytes already encoded*/
+    UInt word;      /*hold one word temporarily */
+    Int bitLeft;    /*number of bits left in "word" */
+    UChar* overrunBuffer;  /* pointer to overrun buffer */
+    Int oBSize;     /* length of overrun buffer */
+    struct tagVideoEncData *video;
+} BitstreamEncVideo;
+
+typedef struct tagVOP
+{
+    PIXEL   *yChan;             /* The Y component */
+    PIXEL   *uChan;             /* The U component */
+    PIXEL   *vChan;             /* The V component */
+    Int     frame;              /* frame number */
+    Int     volID;              /* Layer number */
+    //Int       timeStamp;          /* Vop TimeStamp in msec */
+
+    /* Syntax elements copied from VOL (standard) */
+    Int     width;              /* Width (multiple of 16) */
+    Int     height;             /* Height (multiple of 16) */
+    Int     pitch;              /* Pitch (differs from width for UMV case) */
+    Int     padded;     /* flag whether this frame has been padded */
+
+    /* Actual syntax elements for VOP (standard) */
+    Int     predictionType;     /* VOP prediction type */
+    Int     timeInc;            /* VOP time increment (relative to last mtb) */
+    Int     vopCoded;
+    Int     roundingType;
+    Int     intraDCVlcThr;
+    Int     quantizer;          /* VOP quantizer */
+    Int     fcodeForward;       /* VOP dynamic range of motion vectors */
+    Int     fcodeBackward;      /* VOP dynamic range of motion vectors */
+    Int     refSelectCode;      /* enhancement layer reference select code */
+
+    /* H.263 parameters */
+    Int     gobNumber;
+    Int     gobFrameID;
+    Int     temporalRef;        /* temporal reference, roll over at 256 */
+    Int     temporalInterval;   /* increase every 256 temporalRef */
+
+} Vop;
+
+typedef struct tagVol
+{
+    Int     volID;              /* VOL identifier (for tracking) */
+    Int     shortVideoHeader;   /* shortVideoHeader mode */
+    Int     GOVStart;           /* Insert GOV Header */
+    Int     timeIncrementResolution;    /* VOL time increment */
+    Int     nbitsTimeIncRes;    /* number of bits for time increment */
+    Int     timeIncrement;      /* time increment */
+    Int     moduloTimeBase;     /* internal decoder clock */
+    Int     prevModuloTimeBase; /* in case of pre-frameskip */
+
+    Int     fixedVopRate;
+    BitstreamEncVideo  *stream; /* library bitstream buffer (input buffer) */
+
+    /* VOL Dimensions */
+    Int     width;              /* Width */
+    Int     height;             /* Height */
+
+    /* Error Resilience Flags */
+    Int     ResyncMarkerDisable; /* VOL Disable Resynch Markers */
+    Int     useReverseVLC;      /* VOL reversible VLCs */
+    Int     dataPartitioning;   /* VOL data partitioning */
+
+    /* Quantization related parameters */
+    Int     quantPrecision;     /* Quantizer precision */
+    Int     quantType;          /* MPEG-4 or H.263 Quantization Type */
+
+    /* Added loaded quant mat, 05/22/2000 */
+    Int     loadIntraQuantMat;      /* Load intra quantization matrix */
+    Int     loadNonIntraQuantMat;   /* Load nonintra quantization matrix */
+    Int     iqmat[64];          /* Intra quant.matrix */
+    Int     niqmat[64];         /* Non-intra quant.matrix */
+
+
+    /* Parameters used for scalability */
+    Int     scalability;        /* VOL scalability (flag) */
+    Int     scalType;           /* temporal = 0, spatial = 1, both = 2 */
+
+    Int     refVolID;           /* VOL id of reference VOL */
+    Int     refSampDir;         /* VOL resol. of ref. VOL */
+    Int     horSamp_n;          /* VOL hor. resampling of ref. VOL given by */
+    Int     horSamp_m;          /* sampfac = hor_samp_n/hor_samp_m      */
+    Int     verSamp_n;          /* VOL ver. resampling of ref. VOL given by */
+    Int     verSamp_m;          /* sampfac = ver_samp_n/ver_samp_m      */
+    Int     enhancementType;    /* VOL type of enhancement layer */
+
+    /* These variables were added since they are used a lot. */
+    Int     nMBPerRow, nMBPerCol;   /* number of MBs in each row & column    */
+    Int     nTotalMB;
+    Int     nBitsForMBID;           /* how many bits required for MB number? */
+
+    /* for short video header */
+    Int     nMBinGOB;           /* number of MBs in GOB, 05/22/00 */
+    Int     nGOBinVop;          /* number of GOB in Vop  05/22/00 */
+} Vol;
+
+typedef struct tagMacroBlock
+{
+    Int     mb_x;               /* X coordinate */
+    Int     mb_y;               /* Y coordinate */
+    Short   block[9][64];       /* 4-Y, U and V blocks , and AAN Scale*/
+} MacroBlock;
+
+typedef struct tagRunLevelBlock
+{
+    Int run[64];        /* Runlength */
+    Int level[64];      /* Abs(level) */
+    Int s[64];          /* sign level */
+} RunLevelBlock;
+
+typedef struct tagHeaderInfoDecVideo
+{
+    UChar       *Mode;              /* Modes INTRA/INTER/etc. */
+    UChar       *CBP;               /* MCBPC/CBPY stuff */
+} HeaderInfoEncVideo;
+
+typedef Short typeDCStore[6];   /* ACDC */
+typedef Short typeDCACStore[4][8];
+
+typedef struct tagMOT
+{
+    Int x;  /* half-pel resolution x component */
+    Int y;      /* half-pel resolution y component */
+    Int sad;  /* SAD */
+} MOT;
+
+typedef struct tagHintTrackInfo
+{
+    UChar MTB;
+    UChar LayerID;
+    UChar CodeType;
+    UChar RefSelCode;
+
+} HintTrackInfo;
+
+
+typedef struct tagVideoEncParams
+{
+    //Int       Width;                  /* Input Width */
+    //Int       Height;                 /* Input Height */
+    //float FrameRate;              /* Input Frame Rate */
+    UInt    TimeIncrementRes;       /* timeIncrementRes */
+
+    /*VOL Parameters */
+    Int     nLayers;
+    Int     LayerWidth[4];          /* Encoded Width */
+    Int     LayerHeight[4];         /* Encoded Height */
+    float   LayerFrameRate[4];      /* Encoded Frame Rate */
+    Int     LayerBitRate[4];        /* Encoded BitRate */
+    Int     LayerMaxBitRate[4];     /* Maximum Encoded BitRate */
+    float   LayerMaxFrameRate[4];   /* Maximum Encoded Frame Rate */
+    Int     LayerMaxMbsPerSec[4];   /* Maximum mbs per second, according to the specified profile and level */
+    Int     LayerMaxBufferSize[4];  /* Maximum buffer size, according to the specified profile and level */
+
+    Bool    ResyncMarkerDisable;    /* Disable Resync Marker */
+    Bool    DataPartitioning;       /* Base Layer Data Partitioning */
+    Bool    ReversibleVLC;          /* RVLC when Data Partitioning */
+    Bool    ACDCPrediction;         /* AC/DC Prediction    */
+    Int     QuantType[4];           /* H263, MPEG2 */
+    Int     InitQuantBvop[4];
+    Int     InitQuantPvop[4];
+    Int     InitQuantIvop[4];
+    Int     ResyncPacketsize;
+
+    Int     RoundingType;
+    Int     IntraDCVlcThr;
+
+    /* Rate Control Parameters */
+    MP4RateControlType  RC_Type;        /*Constant Q, M4 constantRate, VM5+, M4RC,MPEG2TM5 */
+
+    /* Intra Refresh Parameters */
+    Int     IntraPeriod;            /* Intra update period */
+    Int     Refresh;                /* Number of MBs refresh in each frame */
+    /* Other Parameters */
+    Bool    SceneChange_Det;        /* scene change detection */
+    Bool    FineFrameSkip_Enabled;  /* src rate resolution frame skipping */
+    Bool    VBR_Enabled;            /* VBR rate control */
+    Bool    NoFrameSkip_Enabled;    /* do not allow frame skip */
+    Bool    NoPreSkip_Enabled;      /* do not allow pre-skip */
+
+    Bool    H263_Enabled;           /* H263 Short Header */
+    Bool    GOV_Enabled;            /* GOV Header Enabled */
+    Bool    SequenceStartCode;      /* This probably should be removed */
+    Bool    FullSearch_Enabled;     /* full-pel exhaustive search motion estimation */
+    Bool    HalfPel_Enabled;        /* Turn Halfpel ME on or off */
+    Bool    MV8x8_Enabled;          /* Enable 8x8 motion vectors */
+    Bool    RD_opt_Enabled;         /* Enable operational R-D optimization */
+    Int     GOB_Header_Interval;        /* Enable encoding GOB header in H263_WITH_ERR_RES and SHORT_HERDER_WITH_ERR_RES */
+    Int     SearchRange;            /* Search range for 16x16 motion vector */
+    Int     MemoryUsage;            /* Amount of memory allocated */
+    Int     GetVolHeader[2];        /* Flag to check if Vol Header has been retrieved */
+    Int     BufferSize[2];          /* Buffer Size for Base and Enhance Layers */
+    Int     ProfileLevel[2];        /* Profile and Level for encoding purposes */
+    float   VBV_delay;              /* VBV buffer size in the form of delay */
+    Int     maxFrameSize;           /* maximum frame size(bits) for H263/Short header mode, k*16384 */
+    Int     profile_table_index;    /* index for profile and level tables given the specified profile and level */
+
+} VideoEncParams;
+
+/* platform dependent functions */
+typedef struct tagFuncPtr
+{
+//  Int (*SAD_MB_HalfPel)(UChar *ref,UChar *blk,Int dmin_lx,Int xh,Int yh,void *extra_info);
+    Int(*SAD_MB_HalfPel[4])(UChar*, UChar*, Int, void *);
+    Int(*SAD_Blk_HalfPel)(UChar *ref, UChar *blk, Int dmin, Int lx, Int rx, Int xh, Int yh, void *extra_info);
+    Int(*SAD_Macroblock)(UChar *ref, UChar *blk, Int dmin_lx, void *extra_info);
+    Int(*SAD_Block)(UChar *ref, UChar *blk, Int dmin, Int lx, void *extra_info);
+    Int(*SAD_MB_PADDING)(UChar *ref, UChar *blk, Int dmin, Int lx, void *extra_info); /*, 4/21/01 */
+    void (*ComputeMBSum)(UChar *cur, Int lx, MOT *mot_mb);
+    void (*ChooseMode)(UChar *Mode, UChar *cur, Int lx, Int min_SAD);
+    void (*GetHalfPelMBRegion)(UChar *cand, UChar *hmem, Int lx);
+    void (*blockIdct)(Int *block);
+
+
+} FuncPtr;
+
+/* 04/09/01, for multipass rate control */
+
+typedef struct tagRDInfo
+{
+    Int QP;
+    Int actual_bits;
+    float mad;
+    float R_D;
+} RDInfo;
+
+typedef struct tagMultiPass
+{
+    /* multipass rate control data */
+    Int target_bits;    /* target bits for current frame, = rc->T */
+    Int actual_bits;    /* actual bits for current frame obtained after encoding, = rc->Rc*/
+    Int QP;             /* quantization level for current frame, = rc->Qc*/
+    Int prev_QP;        /* quantization level for previous frame */
+    Int prev_prev_QP;   /* quantization level for previous frame before last*/
+    float mad;          /* mad for current frame, = video->avgMAD*/
+    Int bitrate;        /* bitrate for current frame */
+    float framerate;    /* framerate for current frame*/
+
+    Int nRe_Quantized;  /* control variable for multipass encoding, */
+    /* 0 : first pass */
+    /* 1 : intermediate pass(quantization and VLC loop only) */
+    /* 2 : final pass(de-quantization, idct, etc) */
+    /* 3 : macroblock level rate control */
+
+    Int encoded_frames;     /* counter for all encoded frames */
+    Int re_encoded_frames;  /* counter for all multipass encoded frames*/
+    Int re_encoded_times;   /* counter for all times of multipass frame encoding */
+
+    /* Multiple frame prediction*/
+    RDInfo **pRDSamples;        /* pRDSamples[30][32], 30->30fps, 32 -> 5 bit quantizer, 32 candidates*/
+    Int framePos;               /* specific position in previous multiple frames*/
+    Int frameRange;             /* number of overall previous multiple frames */
+    Int samplesPerFrame[30];    /* number of samples per frame, 30->30fps */
+
+    /* Bit allocation for scene change frames and high motion frames */
+    float sum_mad;
+    Int counter_BTsrc;  /* BT = Bit Transfer, bit transfer from low motion frames or less complicatedly compressed frames */
+    Int counter_BTdst;  /* BT = Bit Transfer, bit transfer to scene change frames or high motion frames or more complicatedly compressed frames */
+    float sum_QP;
+    Int diff_counter;   /* diff_counter = -diff_counter_BTdst, or diff_counter_BTsrc */
+
+    /* For target bitrate or framerate update */
+    float target_bits_per_frame;        /* = C = bitrate/framerate */
+    float target_bits_per_frame_prev;   /* previous C */
+    float aver_mad;                     /* so-far average mad could replace sum_mad */
+    float aver_mad_prev;                /* previous average mad */
+    Int   overlapped_win_size;          /* transition period of time */
+    Int   encoded_frames_prev;          /* previous encoded_frames */
+} MultiPass;
+
+/* End */
+
+#ifdef HTFM
+typedef struct tagHTFM_Stat
+{
+    Int abs_dif_mad_avg;
+    UInt countbreak;
+    Int offsetArray[16];
+    Int offsetRef[16];
+} HTFM_Stat;
+#endif
+
+/* Global structure that can be passed around */
+typedef struct tagVideoEncData
+{
+    /* VOL Header Initialization */
+    UChar   volInitialize[4];       /* Used to Write VOL Headers */
+    /* Data For Layers (Scalability) */
+    Int     numberOfLayers;     /* Number of Layers */
+    Vol     **vol;              /* Data stored for each VOL */
+
+    /* Data used for encoding frames */
+    VideoEncFrameIO *input;     /* original input frame */
+    Vop     *currVop;           /* Current reconstructed VOP */
+    Vop     *prevBaseVop;       /* Previous reference Base Vop */
+    Vop     *nextBaseVop;       /* Next reference Base Vop */
+    Vop     *prevEnhanceVop;/* Previous Enhancement Layer Vop */
+    Vop     *forwardRefVop;     /* Forward Reference VOP */
+    Vop     *backwardRefVop;    /* Backward Reference VOP */
+
+    /* scratch memory */
+    BitstreamEncVideo  *bitstream1; /* Used for data partitioning */
+    BitstreamEncVideo  *bitstream2; /* and combined modes as      */
+    BitstreamEncVideo  *bitstream3; /* intermediate storages      */
+
+    UChar   *overrunBuffer;  /* extra output buffer to prevent current skip due to output buffer overrun*/
+    Int     oBSize;     /* size of allocated overrun buffer */
+
+    Int dc_scalar_1;            /*dc scalar for Y block */
+    Int dc_scalar_2;            /*dc scalar for U, V block*/
+
+    /* Annex L Rate Control */
+    rateControl     *rc[4];         /* Pointer to Rate Control structure*/
+    /* 12/25/00, each R.C. for each layer */
+
+    /********* motion compensation related variables ****************/
+    MOT     **mot;              /* Motion vectors */
+    /*  where [mbnum][0] = 1MV.
+        [mbnum][1...4] = 4MVs
+        [mbnum][5] = backward MV.
+        [mbnum][6] = delta MV for direct mode.
+        [mbnum][7] = nothing yet. */
+    UChar   *intraArray;            /* Intra Update Arrary */
+    float   sumMAD;             /* SAD/MAD for frame */
+
+    /* to speedup the SAD calculation */
+    void *sad_extra_info;
+#ifdef HTFM
+    Int nrmlz_th[48];       /* Threshold for fast SAD calculation using HTFM */
+    HTFM_Stat htfm_stat;    /* For statistics collection */
+#endif
+
+    /*Tao 04/09/00  For DCT routine */
+    UChar currYMB[256];     /* interleaved current macroblock in HTFM order */
+    MacroBlock  *outputMB;          /* Output MB to VLC encode */
+    UChar   predictedMB[384];   /* scrath memory for predicted value */
+    RunLevelBlock RLB[6];       /* Run and Level of coefficients! */
+    Short   dataBlock[128];     /* DCT block data before and after quant/dequant*/
+
+    UChar   bitmaprow[8];       /* Need to keep it for ACDCPrediction, 8 bytes for alignment, need only 6 */
+    UChar   bitmapcol[6][8];
+    UInt    bitmapzz[6][2]; /* for zigzag bitmap */
+    Int     zeroMV;         /* flag for zero MV */
+
+    Int     usePrevQP;      /* flag for intraDCVlcThreshold switch decision */
+    Int     QP_prev;            /* use for DQUANT calculation */
+    Int     *acPredFlag;        /* */
+    typeDCStore     *predDC;        /* The DC coeffs for each MB */
+    typeDCACStore   *predDCAC_row;
+    typeDCACStore   *predDCAC_col;
+
+
+    UChar   *sliceNo;           /* Slice Number for each MB */
+
+    Int     header_bits;        /* header bits in frmae */
+    HeaderInfoEncVideo  headerInfo; /* MB Header information */
+    UChar   zz_direction;       /* direction of zigzag scan */
+    UChar   *QPMB;              /* Quantizer value for each MB */
+
+    /* Miscellaneous data points to be passed */
+    float   FrameRate;          /* Src frame Rate */
+
+    ULong   nextModTime;        /* expected next frame time */
+    UInt    prevFrameNum[4];    /* previous frame number starting from modTimeRef */
+    UInt    modTimeRef;     /* Reference modTime update every I-Vop*/
+    UInt    refTick[4];         /* second aligned referenc tick */
+    Int     relLayerCodeTime[4];/* Next coding time for each Layer relative to highest layer */
+
+    ULong   modTime;            /* Input frame modTime */
+    Int     currLayer;          /* Current frame layer  */
+    Int     mbnum;              /*  Macroblock number */
+
+    /* slice coding, state variables */
+    Vop     *tempForwRefVop;
+    Int     tempRefSelCode;
+    Int     end_of_buf;         /* end of bitstream buffer flag */
+    Int     slice_coding;       /* flag for slice based coding */
+    Int     totalSAD;           /* So far total SAD for a frame */
+    Int     numIntra;           /* So far number of Intra MB */
+    Int     offset;             /* So far MB offset */
+    Int     ind_x, ind_y;       /* So far MB coordinate */
+    Int     collect;
+    Int     hp_guess;
+    /*********************************/
+
+    HintTrackInfo hintTrackInfo;    /* hintTrackInfo */
+    /* IntraPeriod, Timestamp, etc. */
+    float       nextEncIVop;    /* counter til the next I-Vop */
+    float       numVopsInGOP;   /* value at the beginning of nextEncIVop */
+
+    /* platform dependent functions */
+    FuncPtr     *functionPointer;   /* structure containing platform dependent functions */
+
+    /* Application controls */
+    VideoEncControls    *videoEncControls;
+    VideoEncParams      *encParams;
+
+    MultiPass *pMP[4]; /* for multipass encoding, 4 represents 4 layer encoding */
+
+} VideoEncData;
+
+/*************************************************************/
+/*                  VLC structures                           */
+/*************************************************************/
+
+typedef struct tagVLCtable
+{
+    unsigned int code; /* right justified */
+    int len;
+} VLCtable, *LPVLCtable;
+
+
+/*************************************************************/
+/*                  Approx DCT                               */
+/*************************************************************/
+typedef struct struct_approxDCT  approxDCT;
+struct struct_approxDCT
+{
+    Void(*BlockDCT8x8)(Int *, Int *, UChar *, UChar *, Int, Int);
+    Void(*BlockDCT8x8Intra)(Int *, Int *, UChar *, UChar *, Int, Int);
+    Void(*BlockDCT8x8wSub)(Int *, Int *, UChar *, UChar *, Int, Int);
+};
+
+/*************************************************************/
+/*                  QP structure                             */
+/*************************************************************/
+
+struct QPstruct
+{
+    Int QPx2 ;
+    Int QP;
+    Int QPdiv2;
+    Int QPx2plus;
+    Int Addition;
+};
+
+
+#endif /* _MP4LIB_INT_H_ */
+
diff --git a/media/libstagefright/codecs/m4v_h263/enc/src/rate_control.cpp b/media/libstagefright/codecs/m4v_h263/enc/src/rate_control.cpp
new file mode 100644
index 0000000..53149c1
--- /dev/null
+++ b/media/libstagefright/codecs/m4v_h263/enc/src/rate_control.cpp
@@ -0,0 +1,885 @@
+/* ------------------------------------------------------------------
+ * Copyright (C) 1998-2009 PacketVideo
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
+ * express or implied.
+ * See the License for the specific language governing permissions
+ * and limitations under the License.
+ * -------------------------------------------------------------------
+ */
+#include "mp4def.h"
+#include "mp4lib_int.h"
+#include "rate_control.h"
+#include "mp4enc_lib.h"
+#include "bitstream_io.h"
+#include "m4venc_oscl.h"
+
+void targetBitCalculation(void *input);
+void calculateQuantizer_Multipass(void *video);
+void updateRateControl(rateControl *rc, VideoEncData *video);
+void updateRC_PostProc(rateControl *rc, VideoEncData *video);
+
+/***************************************************************************
+**************  RC APIs to core encoding modules  *******************
+
+PV_STATUS RC_Initialize(void *video);
+PV_STATUS RC_Cleanup(rateControl *rc[],Int numLayers);
+PV_STATUS RC_VopQPSetting(VideoEncData *video,rateControl *rc[]);
+PV_STATUS RC_VopUpdateStat(VideoEncData *video,rateControl *rc[]);
+PV_STATUS RC_UpdateBuffer(VideoEncData *video, Int currLayer, Int num_skip);
+Int       RC_GetSkipNextFrame(VideoEncData *video,Int currLayer);
+void      RC_ResetSkipNextFrame(void *video,Int currLayer);
+
+PV_STATUS RC_UpdateBXRCParams(void *input);  Parameters update for target bitrate or framerate change
+
+****************************************************************************/
+
+
+/************************************************************************/
+/************ API part **************************************************/
+/* must be called before each sequence*/
+
+PV_STATUS RC_Initialize(void *input)
+{
+    VideoEncData *video = (VideoEncData *) input;
+    VideoEncParams *encParams = video->encParams;
+    rateControl **rc = video->rc;
+    Int numLayers = encParams->nLayers;
+    Int *LayerBitRate = encParams->LayerBitRate;
+    float *LayerFrameRate = encParams->LayerFrameRate;
+    MultiPass **pMP = video->pMP;
+
+    Int n;
+
+    for (n = 0; n < numLayers; n++)
+    {
+        /* rate control */
+        rc[n]->fine_frame_skip = encParams->FineFrameSkip_Enabled;
+        rc[n]->no_frame_skip = encParams->NoFrameSkip_Enabled;
+        rc[n]->no_pre_skip = encParams->NoPreSkip_Enabled;
+        rc[n]->skip_next_frame = 0; /* must be initialized */
+
+        //rc[n]->TMN_TH = (Int)((float)LayerBitRate[n]/LayerFrameRate[n]);
+        rc[n]->Bs = video->encParams->BufferSize[n];
+        rc[n]->TMN_W = 0;
+        rc[n]->VBV_fullness = (Int)(rc[n]->Bs * 0.5); /* rc[n]->Bs */
+        rc[n]->encoded_frames = 0;
+        rc[n]->framerate = LayerFrameRate[n];
+        if (n == 0)
+        {
+            rc[n]->TMN_TH = (Int)((float)LayerBitRate[n] / LayerFrameRate[n]);
+            rc[n]->bitrate = LayerBitRate[n];
+            rc[n]->framerate = LayerFrameRate[n];
+
+            // For h263 or short header mode, the bit variation is within (-2*Rmax*1001/3000, 2*Rmax*1001/3000)
+            if (video->encParams->H263_Enabled)
+            {
+                rc[n]->max_BitVariance_num = (Int)((rc[n]->Bs - video->encParams->maxFrameSize) / 2 / (rc[n]->bitrate / rc[n]->framerate / 10.0)) - 5;
+                if (rc[n]->max_BitVariance_num < 0) rc[n]->max_BitVariance_num += 5;
+            }
+            else   // MPEG-4 normal modes
+            {
+                rc[n]->max_BitVariance_num = (Int)((float)(rc[n]->Bs - rc[n]->VBV_fullness) / ((float)LayerBitRate[n] / LayerFrameRate[n] / 10.0)) - 5;
+                if (rc[n]->max_BitVariance_num < 0) rc[n]->max_BitVariance_num += 5;
+            }
+        }
+        else
+        {
+            if (LayerFrameRate[n] - LayerFrameRate[n-1] > 0) /*  7/31/03 */
+            {
+                rc[n]->TMN_TH = (Int)((float)(LayerBitRate[n] - LayerBitRate[n-1]) / (LayerFrameRate[n] - LayerFrameRate[n-1]));
+                rc[n]->max_BitVariance_num = (Int)((float)(rc[n]->Bs - rc[n]->VBV_fullness) * 10 / ((float)rc[n]->TMN_TH)) - 5;
+                if (rc[n]->max_BitVariance_num < 0) rc[n]->max_BitVariance_num += 5;
+            }
+            else   /*  7/31/03 */
+            {
+                rc[n]->TMN_TH = 1 << 30;
+                rc[n]->max_BitVariance_num = 0;
+            }
+            rc[n]->bitrate = LayerBitRate[n] - LayerBitRate[n-1];
+            rc[n]->framerate = LayerFrameRate[n] - LayerFrameRate[n-1];
+        }
+
+        // Set the initial buffer fullness
+        if (1) //!video->encParams->H263_Enabled)  { // MPEG-4
+        {
+            /* According to the spec, the initial buffer fullness needs to be set to 1/3 */
+            rc[n]->VBV_fullness = (Int)(rc[n]->Bs / 3.0 - rc[n]->Bs / 2.0); /* the buffer range is [-Bs/2, Bs/2] */
+            pMP[n]->counter_BTsrc = (Int)((rc[n]->Bs / 2.0 - rc[n]->Bs / 3.0) / (rc[n]->bitrate / rc[n]->framerate / 10.0));
+            rc[n]->TMN_W = (Int)(rc[n]->VBV_fullness + pMP[n]->counter_BTsrc * (rc[n]->bitrate / rc[n]->framerate / 10.0));
+
+            rc[n]->low_bound = -rc[n]->Bs / 2;
+            rc[n]-> VBV_fullness_offset = 0;
+        }
+        else   /* this part doesn't work in some cases, the low_bound is too high, Jan 4,2006 */
+        {
+            rc[n]->VBV_fullness =  rc[n]->Bs - (Int)(video->encParams->VBV_delay * rc[n]->bitrate);
+            if (rc[n]->VBV_fullness < 0) rc[n]->VBV_fullness = 0;
+            //rc[n]->VBV_fullness = (rc[n]->Bs-video->encParams->maxFrameSize)/2 + video->encParams->maxFrameSize;
+
+            rc[n]->VBV_fullness -= rc[n]->Bs / 2; /* the buffer range is [-Bs/2, Bs/2] */
+            rc[n]->low_bound = -rc[n]->Bs / 2 + video->encParams->maxFrameSize;  /*  too high */
+            rc[n]->VBV_fullness_offset = video->encParams->maxFrameSize / 2; /*  don't understand the meaning of this */
+            pMP[n]->counter_BTdst = pMP[n]->counter_BTsrc = 0;
+
+        }
+
+        /* Setting the bitrate and framerate */
+        pMP[n]->bitrate = rc[n]->bitrate;
+        pMP[n]->framerate = rc[n]->framerate;
+        pMP[n]->target_bits_per_frame = pMP[n]->bitrate / pMP[n]->framerate;
+
+    }
+
+    return PV_SUCCESS;
+}
+
+
+/* ======================================================================== */
+/*  Function : RC_Cleanup                                                   */
+/*  Date     : 12/20/2000                                                   */
+/*  Purpose  : free Rate Control memory                                     */
+/*  In/out   :                                                              */
+/*  Return   :                                                              */
+/*  Modified :                                                              */
+/* ======================================================================== */
+
+
+PV_STATUS RC_Cleanup(rateControl *rc[], Int numLayers)
+{
+    OSCL_UNUSED_ARG(rc);
+    OSCL_UNUSED_ARG(numLayers);
+
+    return PV_SUCCESS;
+}
+
+
+
+/* ======================================================================== */
+/*  Function : RC_VopQPSetting                                              */
+/*  Date     : 4/11/2001                                                    */
+/*  Purpose  : Reset rate control before coding VOP, moved from vop.c       */
+/*              Compute QP for the whole VOP and initialize MB-based RC
+                reset QPMB[], currVop->quantizer, rc->Ec, video->header_bits */
+/* to          In order to  work RC_VopQPSetting has to do the followings
+                1. Set video->QPMB of all macroblocks.
+                2. Set currVop->quantizer
+                3. Reset video->header_bits to zero.
+                4. Initialize internal RC parameters for Vop cooding        */
+/*  In/out   :                                                              */
+/*  Return   : PV_STATUS                                                    */
+/*  Modified :                                                              */
+/* ======================================================================== */
+/* To be moved to rate_control.c and separate between BX_RC and ANNEX_L     */
+
+PV_STATUS RC_VopQPSetting(VideoEncData *video, rateControl *prc[])
+{
+    Int currLayer = video->currLayer;
+    Vol *currVol = video->vol[currLayer];
+    Vop *currVop = video->currVop;
+#ifdef TEST_MBBASED_QP
+    int i;
+#endif
+
+    rateControl *rc = video->rc[currLayer];
+    MultiPass *pMP = video->pMP[currLayer];
+
+    OSCL_UNUSED_ARG(prc);
+
+    if (video->encParams->RC_Type == CONSTANT_Q)
+    {
+        M4VENC_MEMSET(video->QPMB, currVop->quantizer, sizeof(UChar)*currVol->nTotalMB);
+        return PV_SUCCESS;
+    }
+    else
+    {
+
+        if (video->rc[currLayer]->encoded_frames == 0) /* rc[currLayer]->totalFrameNumber*/
+        {
+            M4VENC_MEMSET(video->QPMB, currVop->quantizer, sizeof(UChar)*currVol->nTotalMB);
+            video->rc[currLayer]->Qc = video->encParams->InitQuantIvop[currLayer];
+        }
+        else
+        {
+            calculateQuantizer_Multipass((void*) video);
+            currVop->quantizer = video->rc[currLayer]->Qc;
+#ifdef TEST_MBBASED_QP
+            i = currVol->nTotalMB;  /* testing changing QP at MB level */
+            while (i)
+            {
+                i--;
+                video->QPMB[i] = (i & 1) ? currVop->quantizer - 1 : currVop->quantizer + 1;
+            }
+#else
+            M4VENC_MEMSET(video->QPMB, currVop->quantizer, sizeof(UChar)*currVol->nTotalMB);
+#endif
+        }
+
+        video->header_bits = 0;
+    }
+
+    /* update pMP->framePos */
+    if (++pMP->framePos == pMP->frameRange) pMP->framePos = 0;
+
+    if (rc->T == 0)
+    {
+        pMP->counter_BTdst = (Int)(video->encParams->LayerFrameRate[video->currLayer] * 7.5 + 0.5); /* 0.75s time frame */
+        pMP->counter_BTdst = PV_MIN(pMP->counter_BTdst, (Int)(rc->max_BitVariance_num / 2 * 0.40)); /* 0.75s time frame may go beyond VBV buffer if we set the buffer size smaller than 0.75s */
+        pMP->counter_BTdst = PV_MAX(pMP->counter_BTdst, (Int)((rc->Bs / 2 - rc->VBV_fullness) * 0.30 / (rc->TMN_TH / 10.0) + 0.5)); /* At least 30% of VBV buffer size/2 */
+        pMP->counter_BTdst = PV_MIN(pMP->counter_BTdst, 20); /* Limit the target to be smaller than 3C */
+
+        pMP->target_bits = rc->T = rc->TMN_TH = (Int)(rc->TMN_TH * (1.0 + pMP->counter_BTdst * 0.1));
+        pMP->diff_counter = pMP->counter_BTdst;
+    }
+
+    /* collect the necessary data: target bits, actual bits, mad and QP */
+    pMP->target_bits = rc->T;
+    pMP->QP  = currVop->quantizer;
+
+    pMP->mad = video->sumMAD / (float)currVol->nTotalMB;
+    if (pMP->mad < MAD_MIN) pMP->mad = MAD_MIN; /* MAD_MIN is defined as 1 in mp4def.h */
+
+    pMP->bitrate = rc->bitrate; /* calculated in RCVopQPSetting */
+    pMP->framerate = rc->framerate;
+
+    /* first pass encoding */
+    pMP->nRe_Quantized = 0;
+
+    return  PV_SUCCESS;
+}
+
+
+/* ======================================================================== */
+/*  Function : SaveRDSamples()                                              */
+/*  Date     : 08/29/2001                                                   */
+/*  History  :                                                              */
+/*  Purpose  : Save QP, actual_bits, mad and R_D of the current iteration   */
+/*  In/out   :                                                              */
+/*  Return   :                                                              */
+/*  Modified :                                                              */
+/*                                                                          */
+/* ======================================================================== */
+
+Void SaveRDSamples(MultiPass *pMP, Int counter_samples)
+{
+    /* for pMP->pRDSamples */
+    pMP->pRDSamples[pMP->framePos][counter_samples].QP    = pMP->QP;
+    pMP->pRDSamples[pMP->framePos][counter_samples].actual_bits = pMP->actual_bits;
+    pMP->pRDSamples[pMP->framePos][counter_samples].mad   = pMP->mad;
+    pMP->pRDSamples[pMP->framePos][counter_samples].R_D = (float)(pMP->actual_bits / (pMP->mad + 0.0001));
+
+    return ;
+}
+/* ======================================================================== */
+/*  Function : RC_VopUpdateStat                                             */
+/*  Date     : 12/20/2000                                                   */
+/*  Purpose  : Update statistics for rate control after encoding each VOP.  */
+/*             No need to change anything in VideoEncData structure.        */
+/*  In/out   :                                                              */
+/*  Return   :                                                              */
+/*  Modified :                                                              */
+/* ======================================================================== */
+
+PV_STATUS RC_VopUpdateStat(VideoEncData *video, rateControl *rc)
+{
+    Int currLayer = video->currLayer;
+    Vol *currVol = video->vol[currLayer];
+    MultiPass *pMP = video->pMP[currLayer];
+    Int diff_BTCounter;
+
+    switch (video->encParams->RC_Type)
+    {
+        case CONSTANT_Q:
+            break;
+
+        case CBR_1:
+        case CBR_2:
+        case VBR_1:
+        case VBR_2:
+        case CBR_LOWDELAY:
+
+            pMP->actual_bits = currVol->stream->byteCount << 3;
+
+            SaveRDSamples(pMP, 0);
+
+            pMP->encoded_frames++;
+
+            /* for pMP->samplesPerFrame */
+            pMP->samplesPerFrame[pMP->framePos] = 0;
+
+            pMP->sum_QP += pMP->QP;
+
+
+            /* update pMP->counter_BTsrc, pMP->counter_BTdst */
+            /* re-allocate the target bit again and then stop encoding */
+            diff_BTCounter = (Int)((float)(rc->TMN_TH - rc->TMN_W - pMP->actual_bits) /
+                                   (pMP->bitrate / (pMP->framerate + 0.0001) + 0.0001) / 0.1);
+            if (diff_BTCounter >= 0)
+                pMP->counter_BTsrc += diff_BTCounter; /* pMP->actual_bits is smaller */
+            else
+                pMP->counter_BTdst -= diff_BTCounter; /* pMP->actual_bits is bigger */
+
+            rc->TMN_TH -= (Int)((float)pMP->bitrate / (pMP->framerate + 0.0001) * (diff_BTCounter * 0.1));
+            rc->T = pMP->target_bits = rc->TMN_TH - rc->TMN_W;
+            pMP->diff_counter -= diff_BTCounter;
+
+            rc->Rc = currVol->stream->byteCount << 3;   /* Total Bits for current frame */
+            rc->Hc = video->header_bits;    /* Total Bits in Header and Motion Vector */
+
+            /* BX_RC */
+            updateRateControl(rc, video);
+
+            break;
+
+        default: /* for case CBR_1/2, VBR_1/2 */
+
+            return PV_FAIL;
+    }
+
+
+    return PV_SUCCESS;
+}
+
+/* ======================================================================== */
+/*  Function : RC_GetSkipNextFrame, RC_GetRemainingVops                     */
+/*  Date     : 2/20/2001                                                    */
+/*  Purpose  : To access RC parameters from other parts of the code.        */
+/*  In/out   :                                                              */
+/*  Return   :                                                              */
+/*  Modified :                                                              */
+/* ======================================================================== */
+
+Int RC_GetSkipNextFrame(VideoEncData *video, Int currLayer)
+{
+    return video->rc[currLayer]->skip_next_frame;
+}
+
+void RC_ResetSkipNextFrame(VideoEncData *video, Int currLayer)
+{
+
+    video->rc[currLayer]->skip_next_frame = 0;
+    return ;
+}
+
+/* ======================================================================== */
+/*  Function : RC_UpdateBuffer                                      */
+/*  Date     : 2/20/2001                                                    */
+/*  Purpose  : Update RC in case of there are frames skipped (camera freeze)*/
+/*              from the application level in addition to what RC requested */
+/*  In/out   : Nr, B, Rr                                                    */
+/*  Return   : Void                                                         */
+/*  Modified :                                                              */
+/* ======================================================================== */
+
+
+PV_STATUS RC_UpdateBuffer(VideoEncData *video, Int currLayer, Int num_skip)
+{
+    rateControl *rc  = video->rc[currLayer];
+    MultiPass   *pMP = video->pMP[currLayer];
+
+    if (video == NULL || rc == NULL || pMP == NULL)
+        return PV_FAIL;
+
+    rc->VBV_fullness   -= (Int)(rc->bitrate / rc->framerate * num_skip); //rc[currLayer]->Rp;
+    pMP->counter_BTsrc += 10 * num_skip;
+
+    /* Check buffer underflow */
+    if (rc->VBV_fullness < rc->low_bound)
+    {
+        rc->VBV_fullness = rc->low_bound; // -rc->Bs/2;
+        rc->TMN_W = rc->VBV_fullness - rc->low_bound;
+        pMP->counter_BTsrc = pMP->counter_BTdst + (Int)((float)(rc->Bs / 2 - rc->low_bound) / 2.0 / (pMP->target_bits_per_frame / 10));
+    }
+
+    return PV_SUCCESS;
+}
+
+
+/* ======================================================================== */
+/*  Function : RC_UpdateBXRCParams                                          */
+/*  Date     : 4/08/2002                                                    */
+/*  Purpose  : Update RC parameters specifically for target bitrate or      */
+/*             framerate update during an encoding session                  */
+/*  In/out   :                                                              */
+/*  Return   : PV_TRUE if successed, PV_FALSE if failed.                    */
+/*  Modified :                                                              */
+/* ======================================================================== */
+
+PV_STATUS RC_UpdateBXRCParams(void *input)
+{
+    VideoEncData *video = (VideoEncData *) input;
+    VideoEncParams *encParams = video->encParams;
+    rateControl **rc = video->rc;
+    Int numLayers = encParams->nLayers;
+    Int *LayerBitRate = encParams->LayerBitRate;
+    float *LayerFrameRate = encParams->LayerFrameRate;
+    MultiPass **pMP = video->pMP;
+
+    Int n, VBV_fullness;
+    Int diff_counter;
+
+    extern Bool SetProfile_BufferSize(VideoEncData *video, float delay, Int bInitialized);
+
+
+    /* Reset video buffer size due to target bitrate change */
+    SetProfile_BufferSize(video, video->encParams->VBV_delay, 0); /* output: video->encParams->BufferSize[] */
+
+    for (n = 0; n < numLayers; n++)
+    {
+        /* Remaining stuff about frame dropping and underflow check in update RC */
+        updateRC_PostProc(rc[n], video);
+        rc[n]->skip_next_frame = 0; /* must be initialized */
+
+        /* New changes: bitrate and framerate, Bs, max_BitVariance_num, TMN_TH(optional), encoded_frames(optional) */
+        rc[n]->Bs = video->encParams->BufferSize[n];
+        VBV_fullness = (Int)(rc[n]->Bs * 0.5);
+
+        if (n == 0)
+        {
+            rc[n]->TMN_TH = (Int)((float)LayerBitRate[n] / LayerFrameRate[n]);
+            rc[n]->bitrate   = pMP[n]->bitrate   = LayerBitRate[n];
+            rc[n]->framerate = pMP[n]->framerate = LayerFrameRate[n];
+
+            // For h263 or short header mode, the bit variation is within (-2*Rmax*1001/3000, 2*Rmax*1001/3000)
+            if (video->encParams->H263_Enabled)
+            {
+                rc[n]->max_BitVariance_num = (Int)((rc[n]->Bs - video->encParams->maxFrameSize) / 2 / (rc[n]->bitrate / rc[n]->framerate / 10.0)) - 5;
+                //rc[n]->max_BitVariance_num = (Int)((float)(rc[n]->Bs - rc[n]->VBV_fullness)/((float)LayerBitRate[n]/LayerFrameRate[n]/10.0))-5;
+            }
+            else   // MPEG-4 normal modes
+            {
+                rc[n]->max_BitVariance_num = (Int)((float)(rc[n]->Bs - VBV_fullness) * 10 / ((float)LayerBitRate[n] / LayerFrameRate[n])) - 5;
+            }
+        }
+        else
+        {
+            if (LayerFrameRate[n] - LayerFrameRate[n-1] > 0) /*  7/31/03 */
+            {
+                rc[n]->TMN_TH = (Int)((float)(LayerBitRate[n] - LayerBitRate[n-1]) / (LayerFrameRate[n] - LayerFrameRate[n-1]));
+                rc[n]->max_BitVariance_num = (Int)((float)(rc[n]->Bs - VBV_fullness) * 10 / ((float)rc[n]->TMN_TH)) - 5;
+                if (rc[n]->max_BitVariance_num < 0) rc[n]->max_BitVariance_num += 5;
+            }
+            else   /*  7/31/03 */
+            {
+                rc[n]->TMN_TH = 1 << 30;
+                rc[n]->max_BitVariance_num = 0;
+            }
+            rc[n]->bitrate   = pMP[n]->bitrate   = LayerBitRate[n] - LayerBitRate[n-1];
+            rc[n]->framerate = pMP[n]->framerate = LayerFrameRate[n] - LayerFrameRate[n-1];
+        }
+
+        pMP[n]->target_bits_per_frame_prev = pMP[n]->target_bits_per_frame;
+        pMP[n]->target_bits_per_frame = pMP[n]->bitrate / (float)(pMP[n]->framerate + 0.0001);  /*  7/31/03 */
+
+        /* rc[n]->VBV_fullness and rc[n]->TMN_W should be kept same */
+        /* update pMP[n]->counter_BTdst and pMP[n]->counter_BTsrc   */
+        diff_counter = (Int)((float)(rc[n]->VBV_fullness - rc[n]->TMN_W) /
+                             (pMP[n]->target_bits_per_frame / 10 + 0.0001)); /*  7/31/03 */
+
+        pMP[n]->counter_BTdst = pMP[n]->counter_BTsrc = 0;
+        if (diff_counter > 0)
+            pMP[n]->counter_BTdst = diff_counter;
+
+        else if (diff_counter < 0)
+            pMP[n]->counter_BTsrc = -diff_counter;
+
+        rc[n]->TMN_W = (Int)(rc[n]->VBV_fullness -      /* re-calculate rc[n]->TMN_W in order for higher accuracy */
+                             (pMP[n]->target_bits_per_frame / 10) * (pMP[n]->counter_BTdst - pMP[n]->counter_BTsrc));
+
+        /* Keep the current average mad */
+        if (pMP[n]->aver_mad != 0)
+        {
+            pMP[n]->aver_mad_prev = pMP[n]->aver_mad;
+            pMP[n]->encoded_frames_prev = pMP[n]->encoded_frames;
+        }
+
+        pMP[n]->aver_mad = 0;
+        pMP[n]->overlapped_win_size = 4;
+
+        /* Misc */
+        pMP[n]->sum_mad = pMP[n]->sum_QP = 0;
+        //pMP[n]->encoded_frames_prev = pMP[n]->encoded_frames;
+        pMP[n]->encoded_frames = pMP[n]->re_encoded_frames = pMP[n]->re_encoded_times = 0;
+
+    } /* end of: for(n=0; n<numLayers; n++) */
+
+    return PV_SUCCESS;
+
+}
+
+
+/* ================================================================================ */
+/*  Function : targetBitCalculation                                                 */
+/*  Date     : 10/01/2001                                                           */
+/*  Purpose  : quadratic bit allocation model: T(n) = C*sqrt(mad(n)/aver_mad(n-1))  */
+/*                                                                                  */
+/*  In/out   : rc->T                                                                */
+/*  Return   : Void                                                                 */
+/*  Modified :                                                                      */
+/* ================================================================================ */
+
+void targetBitCalculation(void *input)
+{
+    VideoEncData *video = (VideoEncData *) input;
+    MultiPass *pMP = video->pMP[video->currLayer];
+    Vol *currVol = video->vol[video->currLayer];
+    rateControl *rc = video->rc[video->currLayer];
+
+    float curr_mad;//, average_mad;
+    Int diff_counter_BTsrc, diff_counter_BTdst, prev_counter_diff, curr_counter_diff, bound;
+    /* BT = Bit Transfer, for pMP->counter_BTsrc, pMP->counter_BTdst */
+
+    if (video == NULL || currVol == NULL || pMP == NULL || rc == NULL)
+        return;
+
+    /* some stuff about frame dropping remained here to be done because pMP cannot be inserted into updateRateControl()*/
+    updateRC_PostProc(rc, video);
+
+    /* update pMP->counter_BTsrc and pMP->counter_BTdst to avoid interger overflow */
+    if (pMP->counter_BTsrc > 1000 && pMP->counter_BTdst > 1000)
+    {
+        pMP->counter_BTsrc -= 1000;
+        pMP->counter_BTdst -= 1000;
+    }
+
+    /* ---------------------------------------------------------------------------------------------------*/
+    /* target calculation */
+    curr_mad = video->sumMAD / (float)currVol->nTotalMB;
+    if (curr_mad < MAD_MIN) curr_mad = MAD_MIN; /* MAD_MIN is defined as 1 in mp4def.h */
+    diff_counter_BTsrc = diff_counter_BTdst = 0;
+    pMP->diff_counter = 0;
+
+
+    /*1.calculate average mad */
+    pMP->sum_mad += curr_mad;
+    //average_mad = (pMP->encoded_frames < 1 ? curr_mad : pMP->sum_mad/(float)(pMP->encoded_frames+1)); /* this function is called from the scond encoded frame*/
+    //pMP->aver_mad = average_mad;
+    if (pMP->encoded_frames >= 0) /* pMP->encoded_frames is set to -1 initially, so forget about the very first I frame */
+        pMP->aver_mad = (pMP->aver_mad * pMP->encoded_frames + curr_mad) / (pMP->encoded_frames + 1);
+
+    if (pMP->overlapped_win_size > 0 && pMP->encoded_frames_prev >= 0)  /*  7/31/03 */
+        pMP->aver_mad_prev = (pMP->aver_mad_prev * pMP->encoded_frames_prev + curr_mad) / (pMP->encoded_frames_prev + 1);
+
+    /*2.average_mad, mad ==> diff_counter_BTsrc, diff_counter_BTdst */
+    if (pMP->overlapped_win_size == 0)
+    {
+        /* original verison */
+        if (curr_mad > pMP->aver_mad*1.1)
+        {
+            if (curr_mad / (pMP->aver_mad + 0.0001) > 2)
+                diff_counter_BTdst = (Int)(M4VENC_SQRT(curr_mad / (pMP->aver_mad + 0.0001)) * 10 + 0.4) - 10;
+            //diff_counter_BTdst = (Int)((sqrt(curr_mad/pMP->aver_mad)*2+curr_mad/pMP->aver_mad)/(3*0.1) + 0.4) - 10;
+            else
+                diff_counter_BTdst = (Int)(curr_mad / (pMP->aver_mad + 0.0001) * 10 + 0.4) - 10;
+        }
+        else /* curr_mad <= average_mad*1.1 */
+            //diff_counter_BTsrc = 10 - (Int)((sqrt(curr_mad/pMP->aver_mad) + pow(curr_mad/pMP->aver_mad, 1.0/3.0))/(2.0*0.1) + 0.4);
+            diff_counter_BTsrc = 10 - (Int)(M4VENC_SQRT(curr_mad / (pMP->aver_mad + 0.0001)) * 10 + 0.5);
+        //diff_counter_BTsrc = 10 - (Int)(curr_mad/pMP->aver_mad/0.1 + 0.5)
+
+        /* actively fill in the possible gap */
+        if (diff_counter_BTsrc == 0 && diff_counter_BTdst == 0 &&
+                curr_mad <= pMP->aver_mad*1.1 && pMP->counter_BTsrc < pMP->counter_BTdst)
+            diff_counter_BTsrc = 1;
+
+    }
+    else if (pMP->overlapped_win_size > 0)
+    {
+        /* transition time: use previous average mad "pMP->aver_mad_prev" instead of the current average mad "pMP->aver_mad" */
+        if (curr_mad > pMP->aver_mad_prev*1.1)
+        {
+            if (curr_mad / pMP->aver_mad_prev > 2)
+                diff_counter_BTdst = (Int)(M4VENC_SQRT(curr_mad / (pMP->aver_mad_prev + 0.0001)) * 10 + 0.4) - 10;
+            //diff_counter_BTdst = (Int)((M4VENC_SQRT(curr_mad/pMP->aver_mad_prev)*2+curr_mad/pMP->aver_mad_prev)/(3*0.1) + 0.4) - 10;
+            else
+                diff_counter_BTdst = (Int)(curr_mad / (pMP->aver_mad_prev + 0.0001) * 10 + 0.4) - 10;
+        }
+        else /* curr_mad <= average_mad*1.1 */
+            //diff_counter_BTsrc = 10 - (Int)((sqrt(curr_mad/pMP->aver_mad_prev) + pow(curr_mad/pMP->aver_mad_prev, 1.0/3.0))/(2.0*0.1) + 0.4);
+            diff_counter_BTsrc = 10 - (Int)(M4VENC_SQRT(curr_mad / (pMP->aver_mad_prev + 0.0001)) * 10 + 0.5);
+        //diff_counter_BTsrc = 10 - (Int)(curr_mad/pMP->aver_mad_prev/0.1 + 0.5)
+
+        /* actively fill in the possible gap */
+        if (diff_counter_BTsrc == 0 && diff_counter_BTdst == 0 &&
+                curr_mad <= pMP->aver_mad_prev*1.1 && pMP->counter_BTsrc < pMP->counter_BTdst)
+            diff_counter_BTsrc = 1;
+
+        if (--pMP->overlapped_win_size <= 0)    pMP->overlapped_win_size = 0;
+    }
+
+
+    /* if difference is too much, do clipping */
+    /* First, set the upper bound for current bit allocation variance: 80% of available buffer */
+    bound = (Int)((rc->Bs / 2 - rc->VBV_fullness) * 0.6 / (pMP->target_bits_per_frame / 10)); /* rc->Bs */
+    diff_counter_BTsrc =  PV_MIN(diff_counter_BTsrc, bound);
+    diff_counter_BTdst =  PV_MIN(diff_counter_BTdst, bound);
+
+    /* Second, set another upper bound for current bit allocation: 4-5*bitrate/framerate */
+    bound = 50;
+//  if(video->encParams->RC_Type == CBR_LOWDELAY)
+//  not necessary       bound = 10;     /*  1/17/02 -- For Low delay */
+
+    diff_counter_BTsrc =  PV_MIN(diff_counter_BTsrc, bound);
+    diff_counter_BTdst =  PV_MIN(diff_counter_BTdst, bound);
+
+
+    /* Third, check the buffer */
+    prev_counter_diff = pMP->counter_BTdst - pMP->counter_BTsrc;
+    curr_counter_diff = prev_counter_diff + (diff_counter_BTdst - diff_counter_BTsrc);
+
+    if (PV_ABS(prev_counter_diff) >= rc->max_BitVariance_num || PV_ABS(curr_counter_diff) >= rc->max_BitVariance_num) // PV_ABS(curr_counter_diff) >= PV_ABS(prev_counter_diff) )
+    {   //diff_counter_BTsrc = diff_counter_BTdst = 0;
+
+        if (curr_counter_diff > rc->max_BitVariance_num && diff_counter_BTdst)
+        {
+            diff_counter_BTdst = (rc->max_BitVariance_num - prev_counter_diff) + diff_counter_BTsrc;
+            if (diff_counter_BTdst < 0) diff_counter_BTdst = 0;
+        }
+
+        else if (curr_counter_diff < -rc->max_BitVariance_num && diff_counter_BTsrc)
+        {
+            diff_counter_BTsrc = diff_counter_BTdst - (-rc->max_BitVariance_num - prev_counter_diff);
+            if (diff_counter_BTsrc < 0) diff_counter_BTsrc = 0;
+        }
+    }
+
+
+    /*3.diff_counter_BTsrc, diff_counter_BTdst ==> TMN_TH */
+    //rc->TMN_TH = (Int)((float)pMP->bitrate/pMP->framerate);
+    rc->TMN_TH = (Int)(pMP->target_bits_per_frame);
+    pMP->diff_counter = 0;
+
+    if (diff_counter_BTsrc)
+    {
+        rc->TMN_TH -= (Int)(pMP->target_bits_per_frame * diff_counter_BTsrc * 0.1);
+        pMP->diff_counter = -diff_counter_BTsrc;
+    }
+    else if (diff_counter_BTdst)
+    {
+        rc->TMN_TH += (Int)(pMP->target_bits_per_frame * diff_counter_BTdst * 0.1);
+        pMP->diff_counter = diff_counter_BTdst;
+    }
+
+
+    /*4.update pMP->counter_BTsrc, pMP->counter_BTdst */
+    pMP->counter_BTsrc += diff_counter_BTsrc;
+    pMP->counter_BTdst += diff_counter_BTdst;
+
+
+    /*5.target bit calculation */
+    rc->T = rc->TMN_TH - rc->TMN_W;
+    //rc->T = rc->TMN_TH - (Int)((float)rc->TMN_W/rc->frameRate);
+
+    if (video->encParams->H263_Enabled && rc->T > video->encParams->maxFrameSize)
+    {
+        rc->T = video->encParams->maxFrameSize;  //  added this 11/07/05
+    }
+
+}
+
+/* ================================================================================ */
+/*  Function : calculateQuantizer_Multipass                                         */
+/*  Date     : 10/01/2001                                                           */
+/*  Purpose  : variable rate bit allocation + new QP determination scheme           */
+/*                                                                                  */
+/*  In/out   : rc->T and rc->Qc                                                     */
+/*  Return   : Void                                                                 */
+/*  Modified :                                                                      */
+/* ================================================================================ */
+
+/* Mad based variable bit allocation + QP calculation with a new quadratic method */
+void calculateQuantizer_Multipass(void *input)
+{
+    VideoEncData *video = (VideoEncData *) input;
+    MultiPass *pMP = video->pMP[video->currLayer];
+    Vol *currVol = video->vol[video->currLayer];
+    rateControl *rc = video->rc[video->currLayer];
+
+    Int prev_QP, prev_actual_bits, curr_target, i, j;
+
+    float curr_mad, prev_mad, curr_RD, prev_RD, average_mad, aver_QP;
+
+
+    if (video == NULL || currVol == NULL || pMP == NULL || rc == NULL)
+        return;
+
+    /* Mad based variable bit allocation */
+    targetBitCalculation((void*) video);
+
+    if (rc->T <= 0 || video->sumMAD == 0)
+    {
+        if (rc->T < 0)  rc->Qc = 31;
+        return;
+    }
+
+    /* ---------------------------------------------------------------------------------------------------*/
+    /* current frame QP estimation */
+    curr_target = rc->T;
+    curr_mad = video->sumMAD / (float)currVol->nTotalMB;
+    if (curr_mad < MAD_MIN) curr_mad = MAD_MIN; /* MAD_MIN is defined as 1 in mp4def.h */
+    curr_RD  = (float)curr_target / curr_mad;
+
+    /* Another version of search the optimal point */
+    prev_actual_bits = pMP->pRDSamples[0][0].actual_bits;
+    prev_mad = pMP->pRDSamples[0][0].mad;
+
+    for (i = 0, j = 0; i < pMP->frameRange; i++)
+    {
+        if (pMP->pRDSamples[i][0].mad != 0 && prev_mad != 0 &&
+                PV_ABS(prev_mad - curr_mad) > PV_ABS(pMP->pRDSamples[i][0].mad - curr_mad))
+        {
+            prev_mad = pMP->pRDSamples[i][0].mad;
+            prev_actual_bits = pMP->pRDSamples[i][0].actual_bits;
+            j = i;
+        }
+    }
+    prev_QP = pMP->pRDSamples[j][0].QP;
+    for (i = 1; i < pMP->samplesPerFrame[j]; i++)
+    {
+        if (PV_ABS(prev_actual_bits - curr_target) > PV_ABS(pMP->pRDSamples[j][i].actual_bits - curr_target))
+        {
+            prev_actual_bits = pMP->pRDSamples[j][i].actual_bits;
+            prev_QP = pMP->pRDSamples[j][i].QP;
+        }
+    }
+
+    // quadratic approximation
+    prev_RD = (float)prev_actual_bits / prev_mad;
+    //rc->Qc = (Int)(prev_QP * sqrt(prev_actual_bits/curr_target) + 0.4);
+    if (prev_QP == 1) // 11/14/05, added this to allow getting out of QP = 1 easily
+    {
+        rc->Qc = (Int)(prev_RD / curr_RD + 0.5);
+    }
+    else
+    {
+        rc->Qc = (Int)(prev_QP * M4VENC_SQRT(prev_RD / curr_RD) + 0.9);
+
+        if (prev_RD / curr_RD > 0.5 && prev_RD / curr_RD < 2.0)
+            rc->Qc = (Int)(prev_QP * (M4VENC_SQRT(prev_RD / curr_RD) + prev_RD / curr_RD) / 2.0 + 0.9); /* Quadratic and linear approximation */
+        else
+            rc->Qc = (Int)(prev_QP * (M4VENC_SQRT(prev_RD / curr_RD) + M4VENC_POW(prev_RD / curr_RD, 1.0 / 3.0)) / 2.0 + 0.9);
+    }
+    //rc->Qc =(Int)(prev_QP * sqrt(prev_RD/curr_RD) + 0.4);
+    // 11/08/05
+    // lower bound on Qc should be a function of curr_mad
+    // When mad is already low, lower bound on Qc doesn't have to be small.
+    // Note, this doesn't work well for low complexity clip encoded at high bit rate
+    // it doesn't hit the target bit rate due to this QP lower bound.
+/// if((curr_mad < 8) && (rc->Qc < 12)) rc->Qc = 12;
+//  else    if((curr_mad < 128) && (rc->Qc < 3)) rc->Qc = 3;
+
+    if (rc->Qc < 1) rc->Qc = 1;
+    if (rc->Qc > 31)    rc->Qc = 31;
+
+
+    /* active bit resource protection */
+    aver_QP = (pMP->encoded_frames == 0 ? 0 : pMP->sum_QP / (float)pMP->encoded_frames);
+    average_mad = (pMP->encoded_frames == 0 ? 0 : pMP->sum_mad / (float)pMP->encoded_frames); /* this function is called from the scond encoded frame*/
+    if (pMP->diff_counter == 0 &&
+            ((float)rc->Qc <= aver_QP*1.1 || curr_mad <= average_mad*1.1) &&
+            pMP->counter_BTsrc <= (pMP->counter_BTdst + (Int)(pMP->framerate*1.0 + 0.5)))
+    {
+        rc->TMN_TH -= (Int)(pMP->target_bits_per_frame / 10.0);
+        rc->T = rc->TMN_TH - rc->TMN_W;
+        pMP->counter_BTsrc++;
+        pMP->diff_counter--;
+    }
+
+}
+
+
+/* ======================================================================== */
+/*  Function : updateRateControl                                            */
+/*  Date     : 11/17/2000                                                   */
+/*  Purpose  :Update the RD Modal (After Encoding the Current Frame)        */
+/*  In/out   :                                                              */
+/*  Return   :                                                              */
+/*  Modified :                                                              */
+/* ======================================================================== */
+
+void updateRateControl(rateControl *rc, VideoEncData *video)
+{
+    Int  frame_bits;
+
+
+    /* rate contro\l */
+    frame_bits = (Int)(rc->bitrate / rc->framerate);
+    rc->TMN_W += (rc->Rc - rc->TMN_TH);
+    rc->VBV_fullness += (rc->Rc - frame_bits); //rc->Rp);
+    //if(rc->VBV_fullness < 0) rc->VBV_fullness = -1;
+
+    rc->encoded_frames++;
+
+    /* frame dropping */
+    rc->skip_next_frame = 0;
+
+    if ((video->encParams->H263_Enabled && rc->Rc > video->encParams->maxFrameSize) || /*  For H263/short header mode, drop the frame if the actual frame size exceeds the bound */
+            (rc->VBV_fullness > rc->Bs / 2 && !rc->no_pre_skip)) /* skip the current frame */ /* rc->Bs */
+    {
+        rc->TMN_W -= (rc->Rc - rc->TMN_TH);
+        rc->VBV_fullness -= rc->Rc;
+        rc->skip_next_frame = -1;
+    }
+    else if ((float)(rc->VBV_fullness - rc->VBV_fullness_offset) > (rc->Bs / 2 - rc->VBV_fullness_offset)*0.95 &&
+             !rc->no_frame_skip) /* skip next frame */
+    {
+        rc->VBV_fullness -= frame_bits; //rc->Rp;
+        rc->skip_next_frame = 1;
+        /*  skip more than 1 frames  */
+        //while(rc->VBV_fullness > rc->Bs*0.475)
+        while ((rc->VBV_fullness - rc->VBV_fullness_offset) > (rc->Bs / 2 - rc->VBV_fullness_offset)*0.95)
+        {
+            rc->VBV_fullness -= frame_bits; //rc->Rp;
+            rc->skip_next_frame++;
+        }
+        /* END  */
+    }
+
+}
+
+/* ======================================================================== */
+/*  Function : updateRC_PostProc                                            */
+/*  Date     : 04/08/2002                                                   */
+/*  Purpose  : Remaing RC update stuff for frame skip and buffer underflow  */
+/*             check                                                        */
+/*  In/out   :                                                              */
+/*  Return   :                                                              */
+/*  Modified :                                                              */
+/* ======================================================================== */
+void updateRC_PostProc(rateControl *rc, VideoEncData *video)
+{
+    MultiPass *pMP = video->pMP[video->currLayer];
+
+    if (rc->skip_next_frame == 1 && !rc->no_frame_skip) /* skip next frame */
+    {
+        pMP->counter_BTsrc += 10 * rc->skip_next_frame;
+
+    }
+    else if (rc->skip_next_frame == -1 && !rc->no_pre_skip) /* skip current frame */
+    {
+        pMP->counter_BTdst -= pMP->diff_counter;
+        pMP->counter_BTsrc += 10;
+
+        pMP->sum_mad -= pMP->mad;
+        pMP->aver_mad = (pMP->aver_mad * pMP->encoded_frames - pMP->mad) / (float)(pMP->encoded_frames - 1 + 0.0001);
+        pMP->sum_QP  -= pMP->QP;
+        pMP->encoded_frames --;
+    }
+    /* some stuff in update VBV_fullness remains here */
+    //if(rc->VBV_fullness < -rc->Bs/2) /* rc->Bs */
+    if (rc->VBV_fullness < rc->low_bound)
+    {
+        rc->VBV_fullness = rc->low_bound; // -rc->Bs/2;
+        rc->TMN_W = rc->VBV_fullness - rc->low_bound;
+        pMP->counter_BTsrc = pMP->counter_BTdst + (Int)((float)(rc->Bs / 2 - rc->low_bound) / 2.0 / (pMP->target_bits_per_frame / 10));
+    }
+}
+
diff --git a/media/libstagefright/codecs/m4v_h263/enc/src/rate_control.h b/media/libstagefright/codecs/m4v_h263/enc/src/rate_control.h
new file mode 100644
index 0000000..ad29549
--- /dev/null
+++ b/media/libstagefright/codecs/m4v_h263/enc/src/rate_control.h
@@ -0,0 +1,96 @@
+/* ------------------------------------------------------------------
+ * Copyright (C) 1998-2009 PacketVideo
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
+ * express or implied.
+ * See the License for the specific language governing permissions
+ * and limitations under the License.
+ * -------------------------------------------------------------------
+ */
+#ifndef _RATE_CONTROL_H_
+#define _RATE_CONTROL_H_
+
+#include "mp4def.h"
+
+typedef struct tagdataPointArray
+{
+    Int Qp;
+    Int Rp;
+    float Mp;   /* for MB-based RC, 3/14/01 */
+    struct tagdataPointArray *next;
+    struct tagdataPointArray *prev;
+} dataPointArray;
+
+
+typedef struct
+{
+    Int alpha;  /* weight for I frame */
+    Int Rs;     /*bit rate for the sequence (or segment) e.g., 24000 bits/sec */
+    Int Rc;     /*bits used for the current frame. It is the bit count obtained after encoding. */
+    Int Rp;     /*bits to be removed from the buffer per picture. */
+    /*? is this the average one, or just the bits coded for the previous frame */
+    Int Rps;    /*bit to be removed from buffer per src frame */
+    float Ts;   /*number of seconds for the sequence  (or segment). e.g., 10 sec */
+    float Ep;
+    float Ec;   /*mean absolute difference for the current frame after motion compensation.*/
+    /*If the macroblock is intra coded, the original spatial pixel values are summed.*/
+    Int Qc;     /*quantization level used for the current frame. */
+    Int Nr;     /*number of P frames remaining for encoding.*/
+    Int Rr; /*number of bits remaining for encoding this sequence (or segment).*/
+    Int Rr_Old;/* 12/24/00 */
+    Int T;      /*target bit to be used for the current frame.*/
+    Int S;      /*number of bits used for encoding the previous frame.*/
+    Int Hc; /*header and motion vector bits used in the current frame. It includes all the  information except to the residual information.*/
+    Int Hp; /*header and motion vector bits used in the previous frame. It includes all the     information except to the residual information.*/
+    Int Ql; /*quantization level used in the previous frame */
+    Int Bs; /*buffer size e.g., R/2 */
+    Int B;      /*current buffer level e.g., R/4 - start from the middle of the buffer */
+    float X1;
+    float X2;
+    float X11;
+    float M;            /*safe margin for the buffer */
+    float smTick;    /*ratio of src versus enc frame rate */
+    double remnant;  /*remainder frame of src/enc frame for fine frame skipping */
+    Int timeIncRes; /* vol->timeIncrementResolution */
+
+    dataPointArray   *end; /*quantization levels for the past (20) frames */
+
+    Int     frameNumber; /* ranging from 0 to 20 nodes*/
+    Int     w;
+    Int     Nr_Original;
+    Int     Nr_Old, Nr_Old2;
+    Int     skip_next_frame;
+    Int     Qdep;       /* smooth Q adjustment */
+    Int     fine_frame_skip;
+    Int     VBR_Enabled;
+    Int     no_frame_skip;
+    Int     no_pre_skip;
+
+    Int totalFrameNumber; /* total coded frames, for debugging!!*/
+
+    char    oFirstTime;
+
+    /* BX rate control */
+    Int     TMN_W;
+    Int     TMN_TH;
+    Int     VBV_fullness;
+    Int     max_BitVariance_num; /* the number of the maximum bit variance within the given buffer with the unit of 10% of bitrate/framerate*/
+    Int     encoded_frames; /* counter for all encoded frames */
+    float   framerate;
+    Int     bitrate;
+    Int     low_bound;              /* bound for underflow detection, usually low_bound=-Bs/2, but could be changed in H.263 mode */
+    Int     VBV_fullness_offset;    /* offset of VBV_fullness, usually is zero, but can be changed in H.263 mode*/
+    /* End BX */
+
+} rateControl;
+
+
+#endif /* _RATE_CONTROL_H_ */
diff --git a/media/libstagefright/codecs/m4v_h263/enc/src/sad.cpp b/media/libstagefright/codecs/m4v_h263/enc/src/sad.cpp
new file mode 100644
index 0000000..8d18f45
--- /dev/null
+++ b/media/libstagefright/codecs/m4v_h263/enc/src/sad.cpp
@@ -0,0 +1,375 @@
+/* ------------------------------------------------------------------
+ * Copyright (C) 1998-2009 PacketVideo
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
+ * express or implied.
+ * See the License for the specific language governing permissions
+ * and limitations under the License.
+ * -------------------------------------------------------------------
+ */
+#include "mp4def.h"
+#include "mp4lib_int.h"
+
+#include "sad_inline.h"
+
+#define Cached_lx 176
+
+#ifdef _SAD_STAT
+ULong num_sad_MB = 0;
+ULong num_sad_Blk = 0;
+ULong num_sad_MB_call = 0;
+ULong num_sad_Blk_call = 0;
+
+#define NUM_SAD_MB_CALL()       num_sad_MB_call++
+#define NUM_SAD_MB()            num_sad_MB++
+#define NUM_SAD_BLK_CALL()      num_sad_Blk_call++
+#define NUM_SAD_BLK()           num_sad_Blk++
+
+#else
+
+#define NUM_SAD_MB_CALL()
+#define NUM_SAD_MB()
+#define NUM_SAD_BLK_CALL()
+#define NUM_SAD_BLK()
+
+#endif
+
+
+/* consist of
+Int SAD_Macroblock_C(UChar *ref,UChar *blk,Int dmin,Int lx,void *extra_info)
+Int SAD_MB_HTFM_Collect(UChar *ref,UChar *blk,Int dmin,Int lx,void *extra_info)
+Int SAD_MB_HTFM(UChar *ref,UChar *blk,Int dmin,Int lx,void *extra_info)
+Int SAD_Block_C(UChar *ref,UChar *blk,Int dmin,Int lx,void *extra_info)
+Int SAD_Blk_PADDING(UChar *ref,UChar *cur,Int dmin,Int lx,void *extra_info)
+Int SAD_MB_PADDING(UChar *ref,UChar *cur,Int dmin,Int lx,void *extra_info)
+Int SAD_MB_PAD1(UChar *ref,UChar *cur,Int dmin,Int lx,Int *rep);
+Int SAD_MB_PADDING_HTFM_Collect(UChar *ref,UChar *cur,Int dmin,Int lx,void *extra_info)
+Int SAD_MB_PADDING_HTFM(UChar *ref,UChar *cur,Int dmin,Int lx,void *vptr)
+*/
+
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
+    Int SAD_MB_PAD1(UChar *ref, UChar *cur, Int dmin, Int lx, Int *rep);
+
+
+    /*==================================================================
+        Function:   SAD_Macroblock
+        Date:       09/07/2000
+        Purpose:    Compute SAD 16x16 between blk and ref.
+        To do:      Uniform subsampling will be inserted later!
+                    Hypothesis Testing Fast Matching to be used later!
+        Changes:
+    11/7/00:     implemented MMX
+    1/24/01:     implemented SSE
+    ==================================================================*/
+    /********** C ************/
+    Int SAD_Macroblock_C(UChar *ref, UChar *blk, Int dmin_lx, void *extra_info)
+    {
+        int32 x10;
+        Int dmin = (ULong)dmin_lx >> 16;
+        Int lx = dmin_lx & 0xFFFF;
+
+        OSCL_UNUSED_ARG(extra_info);
+
+        NUM_SAD_MB_CALL();
+
+        x10 = simd_sad_mb(ref, blk, dmin, lx);
+
+        return x10;
+    }
+
+#ifdef HTFM   /* HTFM with uniform subsampling implementation, 2/28/01 */
+    /*===============================================================
+        Function:   SAD_MB_HTFM_Collect and SAD_MB_HTFM
+        Date:       3/2/1
+        Purpose:    Compute the SAD on a 16x16 block using
+                    uniform subsampling and hypothesis testing fast matching
+                    for early dropout. SAD_MB_HP_HTFM_Collect is to collect
+                    the statistics to compute the thresholds to be used in
+                    SAD_MB_HP_HTFM.
+        Input/Output:
+        Changes:
+      ===============================================================*/
+
+    Int SAD_MB_HTFM_Collect(UChar *ref, UChar *blk, Int dmin_lx, void *extra_info)
+    {
+        Int i;
+        Int sad = 0;
+        UChar *p1;
+        Int lx4 = (dmin_lx << 2) & 0x3FFFC;
+        ULong cur_word;
+        Int saddata[16], tmp, tmp2;    /* used when collecting flag (global) is on */
+        Int difmad;
+        HTFM_Stat *htfm_stat = (HTFM_Stat*) extra_info;
+        Int *abs_dif_mad_avg = &(htfm_stat->abs_dif_mad_avg);
+        UInt *countbreak = &(htfm_stat->countbreak);
+        Int *offsetRef = htfm_stat->offsetRef;
+
+        NUM_SAD_MB_CALL();
+
+        blk -= 4;
+        for (i = 0; i < 16; i++)
+        {
+            p1 = ref + offsetRef[i];
+            cur_word = *((ULong*)(blk += 4));
+            tmp = p1[12];
+            tmp2 = (cur_word >> 24) & 0xFF;
+            sad = SUB_SAD(sad, tmp, tmp2);
+            tmp = p1[8];
+            tmp2 = (cur_word >> 16) & 0xFF;
+            sad = SUB_SAD(sad, tmp, tmp2);
+            tmp = p1[4];
+            tmp2 = (cur_word >> 8) & 0xFF;
+            sad = SUB_SAD(sad, tmp, tmp2);
+            tmp = p1[0];
+            p1 += lx4;
+            tmp2 = (cur_word & 0xFF);
+            sad = SUB_SAD(sad, tmp, tmp2);
+
+            cur_word = *((ULong*)(blk += 4));
+            tmp = p1[12];
+            tmp2 = (cur_word >> 24) & 0xFF;
+            sad = SUB_SAD(sad, tmp, tmp2);
+            tmp = p1[8];
+            tmp2 = (cur_word >> 16) & 0xFF;
+            sad = SUB_SAD(sad, tmp, tmp2);
+            tmp = p1[4];
+            tmp2 = (cur_word >> 8) & 0xFF;
+            sad = SUB_SAD(sad, tmp, tmp2);
+            tmp = p1[0];
+            p1 += lx4;
+            tmp2 = (cur_word & 0xFF);
+            sad = SUB_SAD(sad, tmp, tmp2);
+
+            cur_word = *((ULong*)(blk += 4));
+            tmp = p1[12];
+            tmp2 = (cur_word >> 24) & 0xFF;
+            sad = SUB_SAD(sad, tmp, tmp2);
+            tmp = p1[8];
+            tmp2 = (cur_word >> 16) & 0xFF;
+            sad = SUB_SAD(sad, tmp, tmp2);
+            tmp = p1[4];
+            tmp2 = (cur_word >> 8) & 0xFF;
+            sad = SUB_SAD(sad, tmp, tmp2);
+            tmp = p1[0];
+            p1 += lx4;
+            tmp2 = (cur_word & 0xFF);
+            sad = SUB_SAD(sad, tmp, tmp2);
+
+            cur_word = *((ULong*)(blk += 4));
+            tmp = p1[12];
+            tmp2 = (cur_word >> 24) & 0xFF;
+            sad = SUB_SAD(sad, tmp, tmp2);
+            tmp = p1[8];
+            tmp2 = (cur_word >> 16) & 0xFF;
+            sad = SUB_SAD(sad, tmp, tmp2);
+            tmp = p1[4];
+            tmp2 = (cur_word >> 8) & 0xFF;
+            sad = SUB_SAD(sad, tmp, tmp2);
+            tmp = p1[0];
+            p1 += lx4;
+            tmp2 = (cur_word & 0xFF);
+            sad = SUB_SAD(sad, tmp, tmp2);
+
+            NUM_SAD_MB();
+
+            saddata[i] = sad;
+
+            if (i > 0)
+            {
+                if ((ULong)sad > ((ULong)dmin_lx >> 16))
+                {
+                    difmad = saddata[0] - ((saddata[1] + 1) >> 1);
+                    (*abs_dif_mad_avg) += ((difmad > 0) ? difmad : -difmad);
+                    (*countbreak)++;
+                    return sad;
+                }
+            }
+        }
+
+        difmad = saddata[0] - ((saddata[1] + 1) >> 1);
+        (*abs_dif_mad_avg) += ((difmad > 0) ? difmad : -difmad);
+        (*countbreak)++;
+        return sad;
+    }
+
+    Int SAD_MB_HTFM(UChar *ref, UChar *blk, Int dmin_lx, void *extra_info)
+    {
+        Int sad = 0;
+        UChar *p1;
+
+        Int i;
+        Int tmp, tmp2;
+        Int lx4 = (dmin_lx << 2) & 0x3FFFC;
+        Int sadstar = 0, madstar;
+        Int *nrmlz_th = (Int*) extra_info;
+        Int *offsetRef = (Int*) extra_info + 32;
+        ULong cur_word;
+
+        madstar = (ULong)dmin_lx >> 20;
+
+        NUM_SAD_MB_CALL();
+
+        blk -= 4;
+        for (i = 0; i < 16; i++)
+        {
+            p1 = ref + offsetRef[i];
+            cur_word = *((ULong*)(blk += 4));
+            tmp = p1[12];
+            tmp2 = (cur_word >> 24) & 0xFF;
+            sad = SUB_SAD(sad, tmp, tmp2);
+            tmp = p1[8];
+            tmp2 = (cur_word >> 16) & 0xFF;
+            sad = SUB_SAD(sad, tmp, tmp2);
+            tmp = p1[4];
+            tmp2 = (cur_word >> 8) & 0xFF;
+            sad = SUB_SAD(sad, tmp, tmp2);
+            tmp = p1[0];
+            p1 += lx4;
+            tmp2 = (cur_word & 0xFF);
+            sad = SUB_SAD(sad, tmp, tmp2);
+
+            cur_word = *((ULong*)(blk += 4));
+            tmp = p1[12];
+            tmp2 = (cur_word >> 24) & 0xFF;
+            sad = SUB_SAD(sad, tmp, tmp2);
+            tmp = p1[8];
+            tmp2 = (cur_word >> 16) & 0xFF;
+            sad = SUB_SAD(sad, tmp, tmp2);
+            tmp = p1[4];
+            tmp2 = (cur_word >> 8) & 0xFF;
+            sad = SUB_SAD(sad, tmp, tmp2);
+            tmp = p1[0];
+            p1 += lx4;
+            tmp2 = (cur_word & 0xFF);
+            sad = SUB_SAD(sad, tmp, tmp2);
+
+            cur_word = *((ULong*)(blk += 4));
+            tmp = p1[12];
+            tmp2 = (cur_word >> 24) & 0xFF;
+            sad = SUB_SAD(sad, tmp, tmp2);
+            tmp = p1[8];
+            tmp2 = (cur_word >> 16) & 0xFF;
+            sad = SUB_SAD(sad, tmp, tmp2);
+            tmp = p1[4];
+            tmp2 = (cur_word >> 8) & 0xFF;
+            sad = SUB_SAD(sad, tmp, tmp2);
+            tmp = p1[0];
+            p1 += lx4;
+            tmp2 = (cur_word & 0xFF);
+            sad = SUB_SAD(sad, tmp, tmp2);
+
+            cur_word = *((ULong*)(blk += 4));
+            tmp = p1[12];
+            tmp2 = (cur_word >> 24) & 0xFF;
+            sad = SUB_SAD(sad, tmp, tmp2);
+            tmp = p1[8];
+            tmp2 = (cur_word >> 16) & 0xFF;
+            sad = SUB_SAD(sad, tmp, tmp2);
+            tmp = p1[4];
+            tmp2 = (cur_word >> 8) & 0xFF;
+            sad = SUB_SAD(sad, tmp, tmp2);
+            tmp = p1[0];
+            p1 += lx4;
+            tmp2 = (cur_word & 0xFF);
+            sad = SUB_SAD(sad, tmp, tmp2);
+
+            NUM_SAD_MB();
+
+            sadstar += madstar;
+            if (((ULong)sad <= ((ULong)dmin_lx >> 16)) && (sad <= (sadstar - *nrmlz_th++)))
+                ;
+            else
+                return 65536;
+        }
+
+        return sad;
+    }
+#endif /* HTFM */
+
+#ifndef NO_INTER4V
+    /*==================================================================
+        Function:   SAD_Block
+        Date:       09/07/2000
+        Purpose:    Compute SAD 16x16 between blk and ref.
+        To do:      Uniform subsampling will be inserted later!
+                    Hypothesis Testing Fast Matching to be used later!
+        Changes:
+    11/7/00:     implemented MMX
+    1/24/01:     implemented SSE
+      ==================================================================*/
+    /********** C ************/
+    Int SAD_Block_C(UChar *ref, UChar *blk, Int dmin, Int lx, void *)
+    {
+        Int sad = 0;
+
+        Int i;
+        UChar *ii;
+        Int *kk;
+        Int tmp, tmp2, tmp3, mask = 0xFF;
+        Int width = (lx - 32);
+
+        NUM_SAD_BLK_CALL();
+
+        ii = ref;
+        kk  = (Int*)blk; /* assuming word-align for blk */
+        for (i = 0; i < 8; i++)
+        {
+            tmp3 = kk[1];
+            tmp = ii[7];
+            tmp2 = (UInt)tmp3 >> 24;
+            sad = SUB_SAD(sad, tmp, tmp2);
+            tmp = ii[6];
+            tmp2 = (tmp3 >> 16) & mask;
+            sad = SUB_SAD(sad, tmp, tmp2);
+            tmp = ii[5];
+            tmp2 = (tmp3 >> 8) & mask;
+            sad = SUB_SAD(sad, tmp, tmp2);
+            tmp = ii[4];
+            tmp2 = tmp3 & mask;
+            sad = SUB_SAD(sad, tmp, tmp2);
+            tmp3 = *kk;
+            kk += (width >> 2);
+            tmp = ii[3];
+            tmp2 = (UInt)tmp3 >> 24;
+            sad = SUB_SAD(sad, tmp, tmp2);
+            tmp = ii[2];
+            tmp2 = (tmp3 >> 16) & mask;
+            sad = SUB_SAD(sad, tmp, tmp2);
+            tmp = ii[1];
+            tmp2 = (tmp3 >> 8) & mask;
+            sad = SUB_SAD(sad, tmp, tmp2);
+            tmp = *ii;
+            ii += lx;
+            tmp2 = tmp3 & mask;
+            sad = SUB_SAD(sad, tmp, tmp2);
+
+            NUM_SAD_BLK();
+
+            if (sad > dmin)
+                return sad;
+        }
+
+        return sad;
+    }
+
+#endif /* NO_INTER4V */
+
+#ifdef __cplusplus
+}
+#endif
+
+
+
diff --git a/media/libstagefright/codecs/m4v_h263/enc/src/sad_halfpel.cpp b/media/libstagefright/codecs/m4v_h263/enc/src/sad_halfpel.cpp
new file mode 100644
index 0000000..f05697c
--- /dev/null
+++ b/media/libstagefright/codecs/m4v_h263/enc/src/sad_halfpel.cpp
@@ -0,0 +1,855 @@
+/* ------------------------------------------------------------------
+ * Copyright (C) 1998-2009 PacketVideo
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
+ * express or implied.
+ * See the License for the specific language governing permissions
+ * and limitations under the License.
+ * -------------------------------------------------------------------
+ */
+/* contains
+Int HalfPel1_SAD_MB(UChar *ref,UChar *blk,Int dmin,Int width,Int ih,Int jh)
+Int HalfPel2_SAD_MB(UChar *ref,UChar *blk,Int dmin,Int width)
+Int HalfPel1_SAD_Blk(UChar *ref,UChar *blk,Int dmin,Int width,Int ih,Int jh)
+Int HalfPel2_SAD_Blk(UChar *ref,UChar *blk,Int dmin,Int width)
+
+Int SAD_MB_HalfPel_C(UChar *ref,UChar *blk,Int dmin,Int width,Int rx,Int xh,Int yh,void *extra_info)
+Int SAD_MB_HP_HTFM_Collect(UChar *ref,UChar *blk,Int dmin,Int width,Int rx,Int xh,Int yh,void *extra_info)
+Int SAD_MB_HP_HTFM(UChar *ref,UChar *blk,Int dmin,Int width,Int rx,Int xh,Int yh,void *extra_info)
+Int SAD_Blk_HalfPel_C(UChar *ref,UChar *blk,Int dmin,Int width,Int rx,Int xh,Int yh,void *extra_info)
+*/
+
+//#include <stdlib.h> /* for RAND_MAX */
+#include "mp4def.h"
+#include "mp4lib_int.h"
+#include "sad_halfpel_inline.h"
+
+#ifdef _SAD_STAT
+ULong num_sad_HP_MB = 0;
+ULong num_sad_HP_Blk = 0;
+ULong num_sad_HP_MB_call = 0;
+ULong num_sad_HP_Blk_call = 0;
+#define NUM_SAD_HP_MB_CALL()    num_sad_HP_MB_call++
+#define NUM_SAD_HP_MB()         num_sad_HP_MB++
+#define NUM_SAD_HP_BLK_CALL()   num_sad_HP_Blk_call++
+#define NUM_SAD_HP_BLK()        num_sad_HP_Blk++
+#else
+#define NUM_SAD_HP_MB_CALL()
+#define NUM_SAD_HP_MB()
+#define NUM_SAD_HP_BLK_CALL()
+#define NUM_SAD_HP_BLK()
+#endif
+
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+    /*==================================================================
+        Function:   HalfPel1_SAD_MB
+        Date:       03/27/2001
+        Purpose:    Compute SAD 16x16 between blk and ref in halfpel
+                    resolution,
+        Changes:
+      ==================================================================*/
+    /* One component is half-pel */
+    Int HalfPel1_SAD_MB(UChar *ref, UChar *blk, Int dmin, Int width, Int ih, Int jh)
+    {
+        Int i, j;
+        Int sad = 0;
+        UChar *kk, *p1, *p2;
+        Int temp;
+
+        OSCL_UNUSED_ARG(jh);
+
+        p1 = ref;
+        if (ih) p2 = ref + 1;
+        else p2 = ref + width;
+        kk  = blk;
+
+        for (i = 0; i < 16; i++)
+        {
+            for (j = 0; j < 16; j++)
+            {
+
+                temp = ((p1[j] + p2[j] + 1) >> 1) - *kk++;
+                sad += PV_ABS(temp);
+            }
+
+            if (sad > dmin)
+                return sad;
+            p1 += width;
+            p2 += width;
+        }
+        return sad;
+    }
+
+    /* Two components need half-pel */
+    Int HalfPel2_SAD_MB(UChar *ref, UChar *blk, Int dmin, Int width)
+    {
+        Int i, j;
+        Int sad = 0;
+        UChar *kk, *p1, *p2, *p3, *p4;
+        Int temp;
+
+        p1 = ref;
+        p2 = ref + 1;
+        p3 = ref + width;
+        p4 = ref + width + 1;
+        kk  = blk;
+
+        for (i = 0; i < 16; i++)
+        {
+            for (j = 0; j < 16; j++)
+            {
+
+                temp = ((p1[j] + p2[j] + p3[j] + p4[j] + 2) >> 2) - *kk++;
+                sad += PV_ABS(temp);
+            }
+
+            if (sad > dmin)
+                return sad;
+
+            p1 += width;
+            p3 += width;
+            p2 += width;
+            p4 += width;
+        }
+        return sad;
+    }
+
+#ifndef NO_INTER4V
+    /*==================================================================
+        Function:   HalfPel1_SAD_Blk
+        Date:       03/27/2001
+        Purpose:    Compute SAD 8x8 between blk and ref in halfpel
+                    resolution.
+        Changes:
+      ==================================================================*/
+    /* One component needs half-pel */
+    Int HalfPel1_SAD_Blk(UChar *ref, UChar *blk, Int dmin, Int width, Int ih, Int jh)
+    {
+        Int i, j;
+        Int sad = 0;
+        UChar *kk, *p1, *p2;
+        Int temp;
+
+        OSCL_UNUSED_ARG(jh);
+
+        p1 = ref;
+        if (ih) p2 = ref + 1;
+        else p2 = ref + width;
+        kk  = blk;
+
+        for (i = 0; i < 8; i++)
+        {
+            for (j = 0; j < 8; j++)
+            {
+
+                temp = ((p1[j] + p2[j] + 1) >> 1) - *kk++;
+                sad += PV_ABS(temp);
+            }
+
+            if (sad > dmin)
+                return sad;
+            p1 += width;
+            p2 += width;
+            kk += 8;
+        }
+        return sad;
+    }
+    /* Two components need half-pel */
+    Int HalfPel2_SAD_Blk(UChar *ref, UChar *blk, Int dmin, Int width)
+    {
+        Int i, j;
+        Int sad = 0;
+        UChar *kk, *p1, *p2, *p3, *p4;
+        Int temp;
+
+        p1 = ref;
+        p2 = ref + 1;
+        p3 = ref + width;
+        p4 = ref + width + 1;
+        kk  = blk;
+
+        for (i = 0; i < 8; i++)
+        {
+            for (j = 0; j < 8; j++)
+            {
+
+                temp = ((p1[j] + p2[j] + p3[j] + p4[j] + 2) >> 2) - *kk++;
+                sad += PV_ABS(temp);
+            }
+
+            if (sad > dmin)
+                return sad;
+
+            p1 += width;
+            p3 += width;
+            p2 += width;
+            p4 += width;
+            kk += 8;
+        }
+        return sad;
+    }
+#endif // NO_INTER4V
+    /*===============================================================
+        Function:   SAD_MB_HalfPel
+        Date:       09/17/2000
+        Purpose:    Compute the SAD on the half-pel resolution
+        Input/Output:   hmem is assumed to be a pointer to the starting
+                    point of the search in the 33x33 matrix search region
+        Changes:
+    11/7/00:     implemented MMX
+      ===============================================================*/
+    /*==================================================================
+        Function:   SAD_MB_HalfPel_C
+        Date:       04/30/2001
+        Purpose:    Compute SAD 16x16 between blk and ref in halfpel
+                    resolution,
+        Changes:
+      ==================================================================*/
+    /* One component is half-pel */
+    Int SAD_MB_HalfPel_Cxhyh(UChar *ref, UChar *blk, Int dmin_rx, void *extra_info)
+    {
+        Int i, j;
+        Int sad = 0;
+        UChar *kk, *p1, *p2, *p3, *p4;
+//  Int sumref=0;
+        Int temp;
+        Int rx = dmin_rx & 0xFFFF;
+
+        OSCL_UNUSED_ARG(extra_info);
+
+        NUM_SAD_HP_MB_CALL();
+
+        p1 = ref;
+        p2 = ref + 1;
+        p3 = ref + rx;
+        p4 = ref + rx + 1;
+        kk  = blk;
+
+        for (i = 0; i < 16; i++)
+        {
+            for (j = 0; j < 16; j++)
+            {
+
+                temp = ((p1[j] + p2[j] + p3[j] + p4[j] + 2) >> 2) - *kk++;
+                sad += PV_ABS(temp);
+            }
+
+            NUM_SAD_HP_MB();
+
+            if (sad > (Int)((ULong)dmin_rx >> 16))
+                return sad;
+
+            p1 += rx;
+            p3 += rx;
+            p2 += rx;
+            p4 += rx;
+        }
+        return sad;
+    }
+
+    Int SAD_MB_HalfPel_Cyh(UChar *ref, UChar *blk, Int dmin_rx, void *extra_info)
+    {
+        Int i, j;
+        Int sad = 0;
+        UChar *kk, *p1, *p2;
+//  Int sumref=0;
+        Int temp;
+        Int rx = dmin_rx & 0xFFFF;
+
+        OSCL_UNUSED_ARG(extra_info);
+
+        NUM_SAD_HP_MB_CALL();
+
+        p1 = ref;
+        p2 = ref + rx; /* either left/right or top/bottom pixel */
+        kk  = blk;
+
+        for (i = 0; i < 16; i++)
+        {
+            for (j = 0; j < 16; j++)
+            {
+
+                temp = ((p1[j] + p2[j] + 1) >> 1) - *kk++;
+                sad += PV_ABS(temp);
+            }
+
+            NUM_SAD_HP_MB();
+
+            if (sad > (Int)((ULong)dmin_rx >> 16))
+                return sad;
+            p1 += rx;
+            p2 += rx;
+        }
+        return sad;
+    }
+
+    Int SAD_MB_HalfPel_Cxh(UChar *ref, UChar *blk, Int dmin_rx, void *extra_info)
+    {
+        Int i, j;
+        Int sad = 0;
+        UChar *kk, *p1;
+//  Int sumref=0;
+        Int temp;
+        Int rx = dmin_rx & 0xFFFF;
+
+        OSCL_UNUSED_ARG(extra_info);
+
+        NUM_SAD_HP_MB_CALL();
+
+        p1 = ref;
+        kk  = blk;
+
+        for (i = 0; i < 16; i++)
+        {
+            for (j = 0; j < 16; j++)
+            {
+
+                temp = ((p1[j] + p1[j+1] + 1) >> 1) - *kk++;
+                sad += PV_ABS(temp);
+            }
+
+            NUM_SAD_HP_MB();
+
+            if (sad > (Int)((ULong)dmin_rx >> 16))
+                return sad;
+            p1 += rx;
+        }
+        return sad;
+    }
+
+#ifdef HTFM  /* HTFM with uniform subsampling implementation, 2/28/01 */
+
+//Checheck here
+    Int SAD_MB_HP_HTFM_Collectxhyh(UChar *ref, UChar *blk, Int dmin_rx, void *extra_info)
+    {
+        Int i, j;
+        Int sad = 0;
+        UChar *p1, *p2;
+        Int rx = dmin_rx & 0xFFFF;
+        Int refwx4 = rx << 2;
+        Int saddata[16];      /* used when collecting flag (global) is on */
+        Int difmad, tmp, tmp2;
+        HTFM_Stat *htfm_stat = (HTFM_Stat*) extra_info;
+        Int *abs_dif_mad_avg = &(htfm_stat->abs_dif_mad_avg);
+        UInt *countbreak = &(htfm_stat->countbreak);
+        Int *offsetRef = htfm_stat->offsetRef;
+        ULong cur_word;
+
+        NUM_SAD_HP_MB_CALL();
+
+        blk -= 4;
+
+        for (i = 0; i < 16; i++) /* 16 stages */
+        {
+            p1 = ref + offsetRef[i];
+            p2 = p1 + rx;
+
+            j = 4;/* 4 lines */
+            do
+            {
+                cur_word = *((ULong*)(blk += 4));
+                tmp = p1[12] + p2[12];
+                tmp2 = p1[13] + p2[13];
+                tmp += tmp2;
+                tmp2 = (cur_word >> 24) & 0xFF;
+                tmp += 2;
+                sad = INTERP2_SUB_SAD(sad, tmp, tmp2);;
+                tmp = p1[8] + p2[8];
+                tmp2 = p1[9] + p2[9];
+                tmp += tmp2;
+                tmp2 = (cur_word >> 16) & 0xFF;
+                tmp += 2;
+                sad = INTERP2_SUB_SAD(sad, tmp, tmp2);;
+                tmp = p1[4] + p2[4];
+                tmp2 = p1[5] + p2[5];
+                tmp += tmp2;
+                tmp2 = (cur_word >> 8) & 0xFF;
+                tmp += 2;
+                sad = INTERP2_SUB_SAD(sad, tmp, tmp2);;
+                tmp2 = p1[1] + p2[1];
+                tmp = p1[0] + p2[0];
+                p1 += refwx4;
+                p2 += refwx4;
+                tmp += tmp2;
+                tmp2 = (cur_word & 0xFF);
+                tmp += 2;
+                sad = INTERP2_SUB_SAD(sad, tmp, tmp2);;
+            }
+            while (--j);
+
+            NUM_SAD_HP_MB();
+
+            saddata[i] = sad;
+
+            if (i > 0)
+            {
+                if (sad > (Int)((ULong)dmin_rx >> 16))
+                {
+                    difmad = saddata[0] - ((saddata[1] + 1) >> 1);
+                    (*abs_dif_mad_avg) += ((difmad > 0) ? difmad : -difmad);
+                    (*countbreak)++;
+                    return sad;
+                }
+            }
+        }
+        difmad = saddata[0] - ((saddata[1] + 1) >> 1);
+        (*abs_dif_mad_avg) += ((difmad > 0) ? difmad : -difmad);
+        (*countbreak)++;
+
+        return sad;
+    }
+
+    Int SAD_MB_HP_HTFM_Collectyh(UChar *ref, UChar *blk, Int dmin_rx, void *extra_info)
+    {
+        Int i, j;
+        Int sad = 0;
+        UChar *p1, *p2;
+        Int rx = dmin_rx & 0xFFFF;
+        Int refwx4 = rx << 2;
+        Int saddata[16];      /* used when collecting flag (global) is on */
+        Int difmad, tmp, tmp2;
+        HTFM_Stat *htfm_stat = (HTFM_Stat*) extra_info;
+        Int *abs_dif_mad_avg = &(htfm_stat->abs_dif_mad_avg);
+        UInt *countbreak = &(htfm_stat->countbreak);
+        Int *offsetRef = htfm_stat->offsetRef;
+        ULong cur_word;
+
+        NUM_SAD_HP_MB_CALL();
+
+        blk -= 4;
+
+        for (i = 0; i < 16; i++) /* 16 stages */
+        {
+            p1 = ref + offsetRef[i];
+            p2 = p1 + rx;
+            j = 4;
+            do
+            {
+                cur_word = *((ULong*)(blk += 4));
+                tmp = p1[12];
+                tmp2 = p2[12];
+                tmp++;
+                tmp2 += tmp;
+                tmp = (cur_word >> 24) & 0xFF;
+                sad = INTERP1_SUB_SAD(sad, tmp, tmp2);;
+                tmp = p1[8];
+                tmp2 = p2[8];
+                tmp++;
+                tmp2 += tmp;
+                tmp = (cur_word >> 16) & 0xFF;
+                sad = INTERP1_SUB_SAD(sad, tmp, tmp2);;
+                tmp = p1[4];
+                tmp2 = p2[4];
+                tmp++;
+                tmp2 += tmp;
+                tmp = (cur_word >> 8) & 0xFF;
+                sad = INTERP1_SUB_SAD(sad, tmp, tmp2);;
+                tmp = p1[0];
+                p1 += refwx4;
+                tmp2 = p2[0];
+                p2 += refwx4;
+                tmp++;
+                tmp2 += tmp;
+                tmp = (cur_word & 0xFF);
+                sad = INTERP1_SUB_SAD(sad, tmp, tmp2);;
+            }
+            while (--j);
+
+            NUM_SAD_HP_MB();
+
+            saddata[i] = sad;
+
+            if (i > 0)
+            {
+                if (sad > (Int)((ULong)dmin_rx >> 16))
+                {
+                    difmad = saddata[0] - ((saddata[1] + 1) >> 1);
+                    (*abs_dif_mad_avg) += ((difmad > 0) ? difmad : -difmad);
+                    (*countbreak)++;
+                    return sad;
+                }
+            }
+        }
+        difmad = saddata[0] - ((saddata[1] + 1) >> 1);
+        (*abs_dif_mad_avg) += ((difmad > 0) ? difmad : -difmad);
+        (*countbreak)++;
+
+        return sad;
+    }
+
+    Int SAD_MB_HP_HTFM_Collectxh(UChar *ref, UChar *blk, Int dmin_rx, void *extra_info)
+    {
+        Int i, j;
+        Int sad = 0;
+        UChar *p1;
+        Int rx = dmin_rx & 0xFFFF;
+        Int refwx4 = rx << 2;
+        Int saddata[16];      /* used when collecting flag (global) is on */
+        Int difmad, tmp, tmp2;
+        HTFM_Stat *htfm_stat = (HTFM_Stat*) extra_info;
+        Int *abs_dif_mad_avg = &(htfm_stat->abs_dif_mad_avg);
+        UInt *countbreak = &(htfm_stat->countbreak);
+        Int *offsetRef = htfm_stat->offsetRef;
+        ULong cur_word;
+
+        NUM_SAD_HP_MB_CALL();
+
+        blk -= 4;
+
+        for (i = 0; i < 16; i++) /* 16 stages */
+        {
+            p1 = ref + offsetRef[i];
+
+            j = 4; /* 4 lines */
+            do
+            {
+                cur_word = *((ULong*)(blk += 4));
+                tmp = p1[12];
+                tmp2 = p1[13];
+                tmp++;
+                tmp2 += tmp;
+                tmp = (cur_word >> 24) & 0xFF;
+                sad = INTERP1_SUB_SAD(sad, tmp, tmp2);;
+                tmp = p1[8];
+                tmp2 = p1[9];
+                tmp++;
+                tmp2 += tmp;
+                tmp = (cur_word >> 16) & 0xFF;
+                sad = INTERP1_SUB_SAD(sad, tmp, tmp2);;
+                tmp = p1[4];
+                tmp2 = p1[5];
+                tmp++;
+                tmp2 += tmp;
+                tmp = (cur_word >> 8) & 0xFF;
+                sad = INTERP1_SUB_SAD(sad, tmp, tmp2);;
+                tmp = p1[0];
+                tmp2 = p1[1];
+                p1 += refwx4;
+                tmp++;
+                tmp2 += tmp;
+                tmp = (cur_word & 0xFF);
+                sad = INTERP1_SUB_SAD(sad, tmp, tmp2);;
+            }
+            while (--j);
+
+            NUM_SAD_HP_MB();
+
+            saddata[i] = sad;
+
+            if (i > 0)
+            {
+                if (sad > (Int)((ULong)dmin_rx >> 16))
+                {
+                    difmad = saddata[0] - ((saddata[1] + 1) >> 1);
+                    (*abs_dif_mad_avg) += ((difmad > 0) ? difmad : -difmad);
+                    (*countbreak)++;
+                    return sad;
+                }
+            }
+        }
+        difmad = saddata[0] - ((saddata[1] + 1) >> 1);
+        (*abs_dif_mad_avg) += ((difmad > 0) ? difmad : -difmad);
+        (*countbreak)++;
+
+        return sad;
+    }
+
+    Int SAD_MB_HP_HTFMxhyh(UChar *ref, UChar *blk, Int dmin_rx, void *extra_info)
+    {
+        Int i, j;
+        Int sad = 0, tmp, tmp2;
+        UChar *p1, *p2;
+        Int rx = dmin_rx & 0xFFFF;
+        Int refwx4 = rx << 2;
+        Int sadstar = 0, madstar;
+        Int *nrmlz_th = (Int*) extra_info;
+        Int *offsetRef = nrmlz_th + 32;
+        ULong cur_word;
+
+        madstar = (ULong)dmin_rx >> 20;
+
+        NUM_SAD_HP_MB_CALL();
+
+        blk -= 4;
+
+        for (i = 0; i < 16; i++) /* 16 stages */
+        {
+            p1 = ref + offsetRef[i];
+            p2 = p1 + rx;
+
+            j = 4; /* 4 lines */
+            do
+            {
+                cur_word = *((ULong*)(blk += 4));
+                tmp = p1[12] + p2[12];
+                tmp2 = p1[13] + p2[13];
+                tmp += tmp2;
+                tmp2 = (cur_word >> 24) & 0xFF;
+                tmp += 2;
+                sad = INTERP2_SUB_SAD(sad, tmp, tmp2);;
+                tmp = p1[8] + p2[8];
+                tmp2 = p1[9] + p2[9];
+                tmp += tmp2;
+                tmp2 = (cur_word >> 16) & 0xFF;
+                tmp += 2;
+                sad = INTERP2_SUB_SAD(sad, tmp, tmp2);;
+                tmp = p1[4] + p2[4];
+                tmp2 = p1[5] + p2[5];
+                tmp += tmp2;
+                tmp2 = (cur_word >> 8) & 0xFF;
+                tmp += 2;
+                sad = INTERP2_SUB_SAD(sad, tmp, tmp2);;
+                tmp2 = p1[1] + p2[1];
+                tmp = p1[0] + p2[0];
+                p1 += refwx4;
+                p2 += refwx4;
+                tmp += tmp2;
+                tmp2 = (cur_word & 0xFF);
+                tmp += 2;
+                sad = INTERP2_SUB_SAD(sad, tmp, tmp2);;
+            }
+            while (--j);
+
+            NUM_SAD_HP_MB();
+
+            sadstar += madstar;
+            if (sad > sadstar - nrmlz_th[i] || sad > (Int)((ULong)dmin_rx >> 16))
+            {
+                return 65536;
+            }
+        }
+
+        return sad;
+    }
+
+    Int SAD_MB_HP_HTFMyh(UChar *ref, UChar *blk, Int dmin_rx, void *extra_info)
+    {
+        Int i, j;
+        Int sad = 0, tmp, tmp2;
+        UChar *p1, *p2;
+        Int rx = dmin_rx & 0xFFFF;
+        Int refwx4 = rx << 2;
+        Int sadstar = 0, madstar;
+        Int *nrmlz_th = (Int*) extra_info;
+        Int *offsetRef = nrmlz_th + 32;
+        ULong cur_word;
+
+        madstar = (ULong)dmin_rx >> 20;
+
+        NUM_SAD_HP_MB_CALL();
+
+        blk -= 4;
+
+        for (i = 0; i < 16; i++) /* 16 stages */
+        {
+            p1 = ref + offsetRef[i];
+            p2 = p1 + rx;
+            j = 4;
+            do
+            {
+                cur_word = *((ULong*)(blk += 4));
+                tmp = p1[12];
+                tmp2 = p2[12];
+                tmp++;
+                tmp2 += tmp;
+                tmp = (cur_word >> 24) & 0xFF;
+                sad = INTERP1_SUB_SAD(sad, tmp, tmp2);;
+                tmp = p1[8];
+                tmp2 = p2[8];
+                tmp++;
+                tmp2 += tmp;
+                tmp = (cur_word >> 16) & 0xFF;
+                sad = INTERP1_SUB_SAD(sad, tmp, tmp2);;
+                tmp = p1[4];
+                tmp2 = p2[4];
+                tmp++;
+                tmp2 += tmp;
+                tmp = (cur_word >> 8) & 0xFF;
+                sad = INTERP1_SUB_SAD(sad, tmp, tmp2);;
+                tmp = p1[0];
+                p1 += refwx4;
+                tmp2 = p2[0];
+                p2 += refwx4;
+                tmp++;
+                tmp2 += tmp;
+                tmp = (cur_word & 0xFF);
+                sad = INTERP1_SUB_SAD(sad, tmp, tmp2);;
+            }
+            while (--j);
+
+            NUM_SAD_HP_MB();
+            sadstar += madstar;
+            if (sad > sadstar - nrmlz_th[i] || sad > (Int)((ULong)dmin_rx >> 16))
+            {
+                return 65536;
+            }
+        }
+
+        return sad;
+    }
+
+    Int SAD_MB_HP_HTFMxh(UChar *ref, UChar *blk, Int dmin_rx, void *extra_info)
+    {
+        Int i, j;
+        Int sad = 0, tmp, tmp2;
+        UChar *p1;
+        Int rx = dmin_rx & 0xFFFF;
+        Int refwx4 = rx << 2;
+        Int sadstar = 0, madstar;
+        Int *nrmlz_th = (Int*) extra_info;
+        Int *offsetRef = nrmlz_th + 32;
+        ULong cur_word;
+
+        madstar = (ULong)dmin_rx >> 20;
+
+        NUM_SAD_HP_MB_CALL();
+
+        blk -= 4;
+
+        for (i = 0; i < 16; i++) /* 16 stages */
+        {
+            p1 = ref + offsetRef[i];
+
+            j = 4;/* 4 lines */
+            do
+            {
+                cur_word = *((ULong*)(blk += 4));
+                tmp = p1[12];
+                tmp2 = p1[13];
+                tmp++;
+                tmp2 += tmp;
+                tmp = (cur_word >> 24) & 0xFF;
+                sad = INTERP1_SUB_SAD(sad, tmp, tmp2);;
+                tmp = p1[8];
+                tmp2 = p1[9];
+                tmp++;
+                tmp2 += tmp;
+                tmp = (cur_word >> 16) & 0xFF;
+                sad = INTERP1_SUB_SAD(sad, tmp, tmp2);;
+                tmp = p1[4];
+                tmp2 = p1[5];
+                tmp++;
+                tmp2 += tmp;
+                tmp = (cur_word >> 8) & 0xFF;
+                sad = INTERP1_SUB_SAD(sad, tmp, tmp2);;
+                tmp = p1[0];
+                tmp2 = p1[1];
+                p1 += refwx4;
+                tmp++;
+                tmp2 += tmp;
+                tmp = (cur_word & 0xFF);
+                sad = INTERP1_SUB_SAD(sad, tmp, tmp2);;
+            }
+            while (--j);
+
+            NUM_SAD_HP_MB();
+
+            sadstar += madstar;
+            if (sad > sadstar - nrmlz_th[i] || sad > (Int)((ULong)dmin_rx >> 16))
+            {
+                return 65536;
+            }
+        }
+
+        return sad;
+    }
+
+#endif /* HTFM */
+
+#ifndef NO_INTER4V
+    /*==================================================================
+        Function:   SAD_Blk_HalfPel_C
+        Date:       04/30/2001
+        Purpose:    Compute SAD 16x16 between blk and ref in halfpel
+                    resolution,
+        Changes:
+      ==================================================================*/
+    /* One component is half-pel */
+    Int SAD_Blk_HalfPel_C(UChar *ref, UChar *blk, Int dmin, Int width, Int rx, Int xh, Int yh, void *extra_info)
+    {
+        Int i, j;
+        Int sad = 0;
+        UChar *kk, *p1, *p2, *p3, *p4;
+        Int temp;
+
+        OSCL_UNUSED_ARG(extra_info);
+
+        NUM_SAD_HP_BLK_CALL();
+
+        if (xh && yh)
+        {
+            p1 = ref;
+            p2 = ref + xh;
+            p3 = ref + yh * rx;
+            p4 = ref + yh * rx + xh;
+            kk  = blk;
+
+            for (i = 0; i < 8; i++)
+            {
+                for (j = 0; j < 8; j++)
+                {
+
+                    temp = ((p1[j] + p2[j] + p3[j] + p4[j] + 2) >> 2) - kk[j];
+                    sad += PV_ABS(temp);
+                }
+
+                NUM_SAD_HP_BLK();
+
+                if (sad > dmin)
+                    return sad;
+
+                p1 += rx;
+                p3 += rx;
+                p2 += rx;
+                p4 += rx;
+                kk += width;
+            }
+            return sad;
+        }
+        else
+        {
+            p1 = ref;
+            p2 = ref + xh + yh * rx; /* either left/right or top/bottom pixel */
+
+            kk  = blk;
+
+            for (i = 0; i < 8; i++)
+            {
+                for (j = 0; j < 8; j++)
+                {
+
+                    temp = ((p1[j] + p2[j] + 1) >> 1) - kk[j];
+                    sad += PV_ABS(temp);
+                }
+
+                NUM_SAD_HP_BLK();
+
+                if (sad > dmin)
+                    return sad;
+                p1 += rx;
+                p2 += rx;
+                kk += width;
+            }
+            return sad;
+        }
+    }
+#endif /* NO_INTER4V */
+
+#ifdef __cplusplus
+}
+#endif
+
+
+
diff --git a/media/libstagefright/codecs/m4v_h263/enc/src/sad_halfpel_inline.h b/media/libstagefright/codecs/m4v_h263/enc/src/sad_halfpel_inline.h
new file mode 100644
index 0000000..d55778f
--- /dev/null
+++ b/media/libstagefright/codecs/m4v_h263/enc/src/sad_halfpel_inline.h
@@ -0,0 +1,130 @@
+/* ------------------------------------------------------------------
+ * Copyright (C) 1998-2009 PacketVideo
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
+ * express or implied.
+ * See the License for the specific language governing permissions
+ * and limitations under the License.
+ * -------------------------------------------------------------------
+ */
+/*********************************************************************************/
+/*  Filename: sad_halfpel_inline.h                                                      */
+/*  Description: Implementation for in-line functions used in dct.cpp           */
+/*  Modified:                                                                   */
+/*********************************************************************************/
+
+#ifndef _SAD_HALFPEL_INLINE_H_
+#define _SAD_HALFPEL_INLINE_H_
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
+#if !defined(PV_ARM_GCC_V5) && !defined(PV_ARM_GCC_V4) /* ARM GNU COMPILER  */
+
+    __inline int32 INTERP1_SUB_SAD(int32 sad, int32 tmp, int32 tmp2)
+    {
+        tmp = (tmp2 >> 1) - tmp;
+        if (tmp > 0) sad += tmp;
+        else sad -= tmp;
+
+        return sad;
+    }
+
+    __inline int32 INTERP2_SUB_SAD(int32 sad, int32 tmp, int32 tmp2)
+    {
+        tmp = (tmp >> 2) - tmp2;
+        if (tmp > 0) sad += tmp;
+        else sad -= tmp;
+
+        return sad;
+    }
+
+#elif defined(__CC_ARM)  /* only work with arm v5 */
+
+    __inline int32 INTERP1_SUB_SAD(int32 sad, int32 tmp, int32 tmp2)
+    {
+        __asm
+        {
+            rsbs    tmp, tmp, tmp2, asr #1 ;
+            rsbmi   tmp, tmp, #0 ;
+            add     sad, sad, tmp ;
+        }
+
+        return sad;
+    }
+
+    __inline int32 INTERP2_SUB_SAD(int32 sad, int32 tmp, int32 tmp2)
+    {
+        __asm
+        {
+            rsbs    tmp, tmp2, tmp, asr #2 ;
+            rsbmi   tmp, tmp, #0 ;
+            add     sad, sad, tmp ;
+        }
+
+        return sad;
+    }
+
+#elif ( defined(PV_ARM_GCC_V5) || defined(PV_ARM_GCC_V4) ) /* ARM GNU COMPILER  */
+
+
+    __inline int32 INTERP1_SUB_SAD(int32 sad, int32 tmp, int32 tmp2)
+    {
+        register int32 out;
+        register int32 temp1;
+        register int32 ss = sad;
+        register int32 tt = tmp;
+        register int32 uu = tmp2;
+
+        asm volatile("rsbs	%1, %3, %4, asr #1\n\t"
+                     "rsbmi %1, %1, #0\n\t"
+                     "add  %0, %2, %1"
+             : "=&r"(out),
+                     "=&r"(temp1)
+                             : "r"(ss),
+                             "r"(tt),
+                             "r"(uu));
+        return out;
+    }
+
+
+    __inline int32 INTERP2_SUB_SAD(int32 sad, int32 tmp, int32 tmp2)
+{
+        register int32 out;
+        register int32 temp1;
+        register int32 ss = sad;
+        register int32 tt = tmp;
+        register int32 uu = tmp2;
+
+        asm volatile("rsbs      %1, %4, %3, asr #2\n\t"
+                     "rsbmi %1, %1, #0\n\t"
+                     "add  %0, %2, %1"
+             : "=&r"(out),
+                     "=&r"(temp1)
+                             : "r"(ss),
+                             "r"(tt),
+                             "r"(uu));
+        return out;
+    }
+
+
+#endif // Diff OS
+
+
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif //_SAD_HALFPEL_INLINE_H_
+
diff --git a/media/libstagefright/codecs/m4v_h263/enc/src/sad_inline.h b/media/libstagefright/codecs/m4v_h263/enc/src/sad_inline.h
new file mode 100644
index 0000000..ba77dfd
--- /dev/null
+++ b/media/libstagefright/codecs/m4v_h263/enc/src/sad_inline.h
@@ -0,0 +1,539 @@
+/* ------------------------------------------------------------------
+ * Copyright (C) 1998-2009 PacketVideo
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
+ * express or implied.
+ * See the License for the specific language governing permissions
+ * and limitations under the License.
+ * -------------------------------------------------------------------
+ */
+/*********************************************************************************/
+/*  Filename: sad_inline.h                                                      */
+/*  Description: Implementation for in-line functions used in dct.cpp           */
+/*  Modified:                                                                   */
+/*********************************************************************************/
+#ifndef _SAD_INLINE_H_
+#define _SAD_INLINE_H_
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
+#if !defined(PV_ARM_GCC_V5) && !defined(PV_ARM_GCC_V4) /* ARM GNU COMPILER  */
+
+    __inline int32 SUB_SAD(int32 sad, int32 tmp, int32 tmp2)
+    {
+        tmp = tmp - tmp2;
+        if (tmp > 0) sad += tmp;
+        else sad -= tmp;
+
+        return sad;
+    }
+
+    __inline int32 sad_4pixel(int32 src1, int32 src2, int32 mask)
+    {
+        int32 x7;
+
+        x7 = src2 ^ src1;       /* check odd/even combination */
+        if ((uint32)src2 >= (uint32)src1)
+        {
+            src1 = src2 - src1;     /* subs */
+        }
+        else
+        {
+            src1 = src1 - src2;
+        }
+        x7 = x7 ^ src1;     /* only odd bytes need to add carry */
+        x7 = mask & ((uint32)x7 >> 1);
+        x7 = (x7 << 8) - x7;
+        src1 = src1 + (x7 >> 7); /* add 0xFF to the negative byte, add back carry */
+        src1 = src1 ^(x7 >> 7);   /* take absolute value of negative byte */
+
+        return src1;
+    }
+
+#define NUMBER 3
+#define SHIFT 24
+
+#include "sad_mb_offset.h"
+
+#undef NUMBER
+#define NUMBER 2
+#undef SHIFT
+#define SHIFT 16
+#include "sad_mb_offset.h"
+
+#undef NUMBER
+#define NUMBER 1
+#undef SHIFT
+#define SHIFT 8
+#include "sad_mb_offset.h"
+
+
+    __inline int32 simd_sad_mb(UChar *ref, UChar *blk, Int dmin, Int lx)
+    {
+        int32 x4, x5, x6, x8, x9, x10, x11, x12, x14;
+
+        x9 = 0x80808080; /* const. */
+
+        x8 = (uint32)ref & 0x3;
+        if (x8 == 3)
+            goto SadMBOffset3;
+        if (x8 == 2)
+            goto SadMBOffset2;
+        if (x8 == 1)
+            goto SadMBOffset1;
+
+//  x5 = (x4<<8)-x4; /* x5 = x4*255; */
+        x4 = x5 = 0;
+
+        x6 = 0xFFFF00FF;
+
+        ref -= lx;
+        blk -= 16;
+
+        x8 = 16;
+
+LOOP_SAD0:
+        /****** process 8 pixels ******/
+        x10 = *((uint32*)(ref += lx));
+        x11 = *((uint32*)(ref + 4));
+        x12 = *((uint32*)(blk += 16));
+        x14 = *((uint32*)(blk + 4));
+
+        /* process x11 & x14 */
+        x11 = sad_4pixel(x11, x14, x9);
+
+        /* process x12 & x10 */
+        x10 = sad_4pixel(x10, x12, x9);
+
+        x5 = x5 + x10; /* accumulate low bytes */
+        x10 = x10 & (x6 << 8); /* x10 & 0xFF00FF00 */
+        x4 = x4 + ((uint32)x10 >> 8);  /* accumulate high bytes */
+        x5 = x5 + x11;  /* accumulate low bytes */
+        x11 = x11 & (x6 << 8); /* x11 & 0xFF00FF00 */
+        x4 = x4 + ((uint32)x11 >> 8);  /* accumulate high bytes */
+
+        /****** process 8 pixels ******/
+        x10 = *((uint32*)(ref + 8));
+        x11 = *((uint32*)(ref + 12));
+        x12 = *((uint32*)(blk + 8));
+        x14 = *((uint32*)(blk + 12));
+
+        /* process x11 & x14 */
+        x11 = sad_4pixel(x11, x14, x9);
+
+        /* process x12 & x10 */
+        x10 = sad_4pixel(x10, x12, x9);
+
+        x5 = x5 + x10;  /* accumulate low bytes */
+        x10 = x10 & (x6 << 8); /* x10 & 0xFF00FF00 */
+        x4 = x4 + ((uint32)x10 >> 8); /* accumulate high bytes */
+        x5 = x5 + x11;  /* accumulate low bytes */
+        x11 = x11 & (x6 << 8); /* x11 & 0xFF00FF00 */
+        x4 = x4 + ((uint32)x11 >> 8);  /* accumulate high bytes */
+
+        /****************/
+        x10 = x5 - (x4 << 8); /* extract low bytes */
+        x10 = x10 + x4;     /* add with high bytes */
+        x10 = x10 + (x10 << 16); /* add with lower half word */
+
+        if (((uint32)x10 >> 16) <= (uint32)dmin) /* compare with dmin */
+        {
+            if (--x8)
+            {
+                goto LOOP_SAD0;
+            }
+
+        }
+
+        return ((uint32)x10 >> 16);
+
+SadMBOffset3:
+
+        return sad_mb_offset3(ref, blk, lx, dmin);
+
+SadMBOffset2:
+
+        return sad_mb_offset2(ref, blk, lx, dmin);
+
+SadMBOffset1:
+
+        return sad_mb_offset1(ref, blk, lx, dmin);
+
+    }
+
+#elif defined(__CC_ARM)  /* only work with arm v5 */
+
+    __inline int32 SUB_SAD(int32 sad, int32 tmp, int32 tmp2)
+    {
+        __asm
+        {
+            rsbs    tmp, tmp, tmp2 ;
+            rsbmi   tmp, tmp, #0 ;
+            add     sad, sad, tmp ;
+        }
+
+        return sad;
+    }
+
+    __inline int32 sad_4pixel(int32 src1, int32 src2, int32 mask)
+    {
+        int32 x7;
+
+        __asm
+        {
+            EOR     x7, src2, src1;     /* check odd/even combination */
+            SUBS    src1, src2, src1;
+            EOR     x7, x7, src1;
+            AND     x7, mask, x7, lsr #1;
+            ORRCC   x7, x7, #0x80000000;
+            RSB     x7, x7, x7, lsl #8;
+            ADD     src1, src1, x7, asr #7;   /* add 0xFF to the negative byte, add back carry */
+            EOR     src1, src1, x7, asr #7;   /* take absolute value of negative byte */
+        }
+
+        return src1;
+    }
+
+    __inline int32 sad_4pixelN(int32 src1, int32 src2, int32 mask)
+    {
+        int32 x7;
+
+        __asm
+        {
+            EOR      x7, src2, src1;        /* check odd/even combination */
+            ADDS     src1, src2, src1;
+            EOR      x7, x7, src1;      /* only odd bytes need to add carry */
+            ANDS     x7, mask, x7, rrx;
+            RSB      x7, x7, x7, lsl #8;
+            SUB      src1, src1, x7, asr #7;  /* add 0xFF to the negative byte, add back carry */
+            EOR      src1, src1, x7, asr #7; /* take absolute value of negative byte */
+        }
+
+        return src1;
+    }
+
+#define sum_accumulate  __asm{      SBC      x5, x5, x10;  /* accumulate low bytes */ \
+        BIC      x10, x6, x10;   /* x10 & 0xFF00FF00 */ \
+        ADD      x4, x4, x10,lsr #8;   /* accumulate high bytes */ \
+        SBC      x5, x5, x11;    /* accumulate low bytes */ \
+        BIC      x11, x6, x11;   /* x11 & 0xFF00FF00 */ \
+        ADD      x4, x4, x11,lsr #8; } /* accumulate high bytes */
+
+
+#define NUMBER 3
+#define SHIFT 24
+#define INC_X8 0x08000001
+
+#include "sad_mb_offset.h"
+
+#undef NUMBER
+#define NUMBER 2
+#undef SHIFT
+#define SHIFT 16
+#undef INC_X8
+#define INC_X8 0x10000001
+#include "sad_mb_offset.h"
+
+#undef NUMBER
+#define NUMBER 1
+#undef SHIFT
+#define SHIFT 8
+#undef INC_X8
+#define INC_X8 0x08000001
+#include "sad_mb_offset.h"
+
+
+    __inline int32 simd_sad_mb(UChar *ref, UChar *blk, Int dmin, Int lx)
+    {
+        int32 x4, x5, x6, x8, x9, x10, x11, x12, x14;
+
+        x9 = 0x80808080; /* const. */
+        x4 = x5 = 0;
+
+        __asm
+        {
+            MOVS    x8, ref, lsl #31 ;
+            BHI     SadMBOffset3;
+            BCS     SadMBOffset2;
+            BMI     SadMBOffset1;
+
+            MVN     x6, #0xFF00;
+        }
+LOOP_SAD0:
+        /****** process 8 pixels ******/
+        x11 = *((int32*)(ref + 12));
+        x10 = *((int32*)(ref + 8));
+        x14 = *((int32*)(blk + 12));
+        x12 = *((int32*)(blk + 8));
+
+        /* process x11 & x14 */
+        x11 = sad_4pixel(x11, x14, x9);
+
+        /* process x12 & x10 */
+        x10 = sad_4pixel(x10, x12, x9);
+
+        x5 = x5 + x10;  /* accumulate low bytes */
+        x10 = x10 & (x6 << 8); /* x10 & 0xFF00FF00 */
+        x4 = x4 + ((uint32)x10 >> 8); /* accumulate high bytes */
+        x5 = x5 + x11;  /* accumulate low bytes */
+        x11 = x11 & (x6 << 8); /* x11 & 0xFF00FF00 */
+        x4 = x4 + ((uint32)x11 >> 8);  /* accumulate high bytes */
+
+        __asm
+        {
+            /****** process 8 pixels ******/
+            LDR     x11, [ref, #4];
+            LDR     x10, [ref], lx ;
+            LDR     x14, [blk, #4];
+            LDR     x12, [blk], #16 ;
+        }
+
+        /* process x11 & x14 */
+        x11 = sad_4pixel(x11, x14, x9);
+
+        /* process x12 & x10 */
+        x10 = sad_4pixel(x10, x12, x9);
+
+        x5 = x5 + x10;  /* accumulate low bytes */
+        x10 = x10 & (x6 << 8); /* x10 & 0xFF00FF00 */
+        x4 = x4 + ((uint32)x10 >> 8); /* accumulate high bytes */
+        x5 = x5 + x11;  /* accumulate low bytes */
+        x11 = x11 & (x6 << 8); /* x11 & 0xFF00FF00 */
+        x4 = x4 + ((uint32)x11 >> 8);  /* accumulate high bytes */
+
+        /****************/
+        x10 = x5 - (x4 << 8); /* extract low bytes */
+        x10 = x10 + x4;     /* add with high bytes */
+        x10 = x10 + (x10 << 16); /* add with lower half word */
+
+        __asm
+        {
+            /****************/
+            RSBS    x11, dmin, x10, lsr #16;
+            ADDLSS  x8, x8, #0x10000001;
+            BLS     LOOP_SAD0;
+        }
+
+        return ((uint32)x10 >> 16);
+
+SadMBOffset3:
+
+        return sad_mb_offset3(ref, blk, lx, dmin, x8);
+
+SadMBOffset2:
+
+        return sad_mb_offset2(ref, blk, lx, dmin, x8);
+
+SadMBOffset1:
+
+        return sad_mb_offset1(ref, blk, lx, dmin, x8);
+    }
+
+
+#elif ( defined(PV_ARM_GCC_V5) || defined(PV_ARM_GCC_V4) ) /* ARM GNU COMPILER  */
+
+    __inline int32 SUB_SAD(int32 sad, int32 tmp, int32 tmp2)
+    {
+        register int32 out;
+        register int32 temp1;
+        register int32 ss = sad;
+        register int32 tt = tmp;
+        register int32 uu = tmp2;
+
+        asm volatile("rsbs  %1, %4, %3\n\t"
+                     "rsbmi %1, %1, #0\n\t"
+                     "add   %0, %2, %1"
+             : "=&r"(out),
+                     "=&r"(temp1)
+                             : "r"(ss),
+                             "r"(tt),
+                             "r"(uu));
+        return out;
+    }
+
+    __inline int32 sad_4pixel(int32 src1, int32 src2, int32 mask)
+{
+        register int32 out;
+        register int32 temp1;
+        register int32 s1 = src1;
+        register int32 s2 = src2;
+        register int32 mm = mask;
+
+        asm volatile("eor   %0, %3, %2\n\t"
+                     "subs  %1, %3, %2\n\t"
+                     "eor   %0, %0, %1\n\t"
+                     "and   %0, %4, %0, lsr #1\n\t"
+                     "orrcc %0, %0, #0x80000000\n\t"
+                     "rsb   %0, %0, %0, lsl #8\n\t"
+                     "add   %1, %1, %0, asr #7\n\t"
+                     "eor   %1, %1, %0, asr #7"
+             : "=&r"(out),
+                     "=&r"(temp1)
+                             : "r"(s1),
+                             "r"(s2),
+                             "r"(mm));
+
+        return temp1;
+    }
+
+    __inline int32 sad_4pixelN(int32 src1, int32 src2, int32 mask)
+{
+        register int32 out;
+        register int32 temp1;
+        register int32 s1 = src1;
+        register int32 s2 = src2;
+        register int32 mm = mask;
+
+        asm volatile("eor    %1, %3, %2\n\t"
+                     "adds   %0, %3, %2\n\t"
+                     "eor    %1, %1, %0\n\t"
+                     "ands   %1, %4, %1,rrx\n\t"
+                     "rsb    %1, %1, %1, lsl #8\n\t"
+                     "sub    %0, %0, %1, asr #7\n\t"
+                     "eor    %0, %0, %1, asr #7"
+             : "=&r"(out),
+                     "=&r"(temp1)
+                             : "r"(s1),
+                             "r"(s2),
+                             "r"(mm));
+
+        return (out);
+    }
+
+#define sum_accumulate asm volatile("sbc  %0, %0, %1\n\t" \
+                                "bic  %1, %4, %1\n\t" \
+                                "add  %2, %2, %1, lsr #8\n\t" \
+                                "sbc  %0, %0, %3\n\t" \
+                                "bic  %3, %4, %3\n\t" \
+                                "add  %2, %2, %3, lsr #8" \
+                                :"+r"(x5), "+r"(x10), "+r"(x4), "+r"(x11) \
+                                :"r"(x6));
+
+#define NUMBER 3
+#define SHIFT 24
+#define INC_X8 0x08000001
+
+#include "sad_mb_offset.h"
+
+#undef NUMBER
+#define NUMBER 2
+#undef SHIFT
+#define SHIFT 16
+#undef INC_X8
+#define INC_X8 0x10000001
+#include "sad_mb_offset.h"
+
+#undef NUMBER
+#define NUMBER 1
+#undef SHIFT
+#define SHIFT 8
+#undef INC_X8
+#define INC_X8 0x08000001
+#include "sad_mb_offset.h"
+
+
+    __inline int32 simd_sad_mb(UChar *ref, UChar *blk, Int dmin, Int lx)
+{
+        int32 x4, x5, x6, x8, x9, x10, x11, x12, x14;
+
+        x9 = 0x80808080; /* const. */
+        x4 = x5 = 0;
+
+        x8 = (uint32)ref & 0x3;
+        if (x8 == 3)
+            goto SadMBOffset3;
+        if (x8 == 2)
+            goto SadMBOffset2;
+        if (x8 == 1)
+            goto SadMBOffset1;
+
+asm volatile("mvn %0, #0xFF00": "=r"(x6));
+
+LOOP_SAD0:
+        /****** process 8 pixels ******/
+        x11 = *((int32*)(ref + 12));
+        x10 = *((int32*)(ref + 8));
+        x14 = *((int32*)(blk + 12));
+        x12 = *((int32*)(blk + 8));
+
+        /* process x11 & x14 */
+        x11 = sad_4pixel(x11, x14, x9);
+
+        /* process x12 & x10 */
+        x10 = sad_4pixel(x10, x12, x9);
+
+        x5 = x5 + x10;  /* accumulate low bytes */
+        x10 = x10 & (x6 << 8); /* x10 & 0xFF00FF00 */
+        x4 = x4 + ((uint32)x10 >> 8); /* accumulate high bytes */
+        x5 = x5 + x11;  /* accumulate low bytes */
+        x11 = x11 & (x6 << 8); /* x11 & 0xFF00FF00 */
+        x4 = x4 + ((uint32)x11 >> 8);  /* accumulate high bytes */
+
+        asm volatile("ldr  %0, [%4, #4]\n\t"
+                     "ldr  %1, [%4], %6\n\t"
+                     "ldr  %2, [%5, #4]\n\t"
+                     "ldr  %3, [%5], #16"
+             : "=r"(x11), "=r"(x10), "=r"(x14), "=r"(x12), "+r"(ref), "+r"(blk)
+                             : "r"(lx));
+
+        /* process x11 & x14 */
+        x11 = sad_4pixel(x11, x14, x9);
+
+        /* process x12 & x10 */
+        x10 = sad_4pixel(x10, x12, x9);
+
+        x5 = x5 + x10;  /* accumulate low bytes */
+        x10 = x10 & (x6 << 8); /* x10 & 0xFF00FF00 */
+        x4 = x4 + ((uint32)x10 >> 8); /* accumulate high bytes */
+        x5 = x5 + x11;  /* accumulate low bytes */
+        x11 = x11 & (x6 << 8); /* x11 & 0xFF00FF00 */
+        x4 = x4 + ((uint32)x11 >> 8);  /* accumulate high bytes */
+
+        /****************/
+        x10 = x5 - (x4 << 8); /* extract low bytes */
+        x10 = x10 + x4;     /* add with high bytes */
+        x10 = x10 + (x10 << 16); /* add with lower half word */
+
+        if (((uint32)x10 >> 16) <= (uint32)dmin) /* compare with dmin */
+        {
+            if (--x8)
+            {
+                goto LOOP_SAD0;
+            }
+
+        }
+
+        return ((uint32)x10 >> 16);
+
+SadMBOffset3:
+
+        return sad_mb_offset3(ref, blk, lx, dmin);
+
+SadMBOffset2:
+
+        return sad_mb_offset2(ref, blk, lx, dmin);
+
+SadMBOffset1:
+
+        return sad_mb_offset1(ref, blk, lx, dmin);
+    }
+
+#endif // OS
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif // _SAD_INLINE_H_
+
diff --git a/media/libstagefright/codecs/m4v_h263/enc/src/sad_mb_offset.h b/media/libstagefright/codecs/m4v_h263/enc/src/sad_mb_offset.h
new file mode 100644
index 0000000..4c7b929
--- /dev/null
+++ b/media/libstagefright/codecs/m4v_h263/enc/src/sad_mb_offset.h
@@ -0,0 +1,317 @@
+/* ------------------------------------------------------------------
+ * Copyright (C) 1998-2009 PacketVideo
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
+ * express or implied.
+ * See the License for the specific language governing permissions
+ * and limitations under the License.
+ * -------------------------------------------------------------------
+ */
+/*********************************************************************************/
+/*  Filename: sad_mb_offset.h                                                       */
+/*  Description: Implementation for in-line functions used in dct.cpp           */
+/*  Modified:                                                                   */
+/*********************************************************************************/
+
+#if !defined(PV_ARM_GCC_V4) && !defined(PV_ARM_GCC_V5) /* ARM GNU COMPILER  */
+
+#if (NUMBER==3)
+__inline int32 sad_mb_offset3(UChar *ref, UChar *blk, Int lx, Int dmin)
+#elif (NUMBER==2)
+__inline int32 sad_mb_offset2(UChar *ref, UChar *blk, Int lx, Int dmin)
+#elif (NUMBER==1)
+__inline int32 sad_mb_offset1(UChar *ref, UChar *blk, Int lx, Int dmin)
+#endif
+{
+    int32 x4, x5, x6, x8, x9, x10, x11, x12, x14;
+
+    //  x5 = (x4<<8) - x4;
+    x4 = x5 = 0;
+    x6 = 0xFFFF00FF;
+    x9 = 0x80808080; /* const. */
+    ref -= NUMBER; /* bic ref, ref, #3 */
+    ref -= lx;
+    blk -= 16;
+    x8 = 16;
+
+#if (NUMBER==3)
+LOOP_SAD3:
+#elif (NUMBER==2)
+LOOP_SAD2:
+#elif (NUMBER==1)
+LOOP_SAD1:
+#endif
+    /****** process 8 pixels ******/
+    x10 = *((uint32*)(ref += lx)); /* D C B A */
+    x11 = *((uint32*)(ref + 4));    /* H G F E */
+    x12 = *((uint32*)(ref + 8));    /* L K J I */
+
+    x10 = ((uint32)x10 >> SHIFT); /* 0 0 0 D */
+    x10 = x10 | (x11 << (32 - SHIFT));        /* G F E D */
+    x11 = ((uint32)x11 >> SHIFT); /* 0 0 0 H */
+    x11 = x11 | (x12 << (32 - SHIFT));        /* K J I H */
+
+    x12 = *((uint32*)(blk += 16));
+    x14 = *((uint32*)(blk + 4));
+
+    /* process x11 & x14 */
+    x11 = sad_4pixel(x11, x14, x9);
+
+    /* process x12 & x10 */
+    x10 = sad_4pixel(x10, x12, x9);
+
+    x5 = x5 + x10; /* accumulate low bytes */
+    x10 = x10 & (x6 << 8); /* x10 & 0xFF00FF00 */
+    x4 = x4 + ((uint32)x10 >> 8);  /* accumulate high bytes */
+    x5 = x5 + x11;  /* accumulate low bytes */
+    x11 = x11 & (x6 << 8); /* x11 & 0xFF00FF00 */
+    x4 = x4 + ((uint32)x11 >> 8);  /* accumulate high bytes */
+
+    /****** process 8 pixels ******/
+    x10 = *((uint32*)(ref + 8)); /* D C B A */
+    x11 = *((uint32*)(ref + 12));   /* H G F E */
+    x12 = *((uint32*)(ref + 16));   /* L K J I */
+
+    x10 = ((uint32)x10 >> SHIFT); /* mvn x10, x10, lsr #24  = 0xFF 0xFF 0xFF ~D */
+    x10 = x10 | (x11 << (32 - SHIFT));        /* bic x10, x10, x11, lsl #8 = ~G ~F ~E ~D */
+    x11 = ((uint32)x11 >> SHIFT); /* 0xFF 0xFF 0xFF ~H */
+    x11 = x11 | (x12 << (32 - SHIFT));        /* ~K ~J ~I ~H */
+
+    x12 = *((uint32*)(blk + 8));
+    x14 = *((uint32*)(blk + 12));
+
+    /* process x11 & x14 */
+    x11 = sad_4pixel(x11, x14, x9);
+
+    /* process x12 & x10 */
+    x10 = sad_4pixel(x10, x12, x9);
+
+    x5 = x5 + x10; /* accumulate low bytes */
+    x10 = x10 & (x6 << 8); /* x10 & 0xFF00FF00 */
+    x4 = x4 + ((uint32)x10 >> 8);  /* accumulate high bytes */
+    x5 = x5 + x11;  /* accumulate low bytes */
+    x11 = x11 & (x6 << 8); /* x11 & 0xFF00FF00 */
+    x4 = x4 + ((uint32)x11 >> 8);  /* accumulate high bytes */
+
+    /****************/
+    x10 = x5 - (x4 << 8); /* extract low bytes */
+    x10 = x10 + x4;     /* add with high bytes */
+    x10 = x10 + (x10 << 16); /* add with lower half word */
+
+    if (((uint32)x10 >> 16) <= (uint32)dmin) /* compare with dmin */
+    {
+        if (--x8)
+        {
+#if (NUMBER==3)
+            goto         LOOP_SAD3;
+#elif (NUMBER==2)
+            goto         LOOP_SAD2;
+#elif (NUMBER==1)
+            goto         LOOP_SAD1;
+#endif
+        }
+
+    }
+
+    return ((uint32)x10 >> 16);
+}
+
+#elif defined(__CC_ARM)  /* only work with arm v5 */
+
+#if (NUMBER==3)
+__inline int32 sad_mb_offset3(UChar *ref, UChar *blk, Int lx, Int dmin, int32 x8)
+#elif (NUMBER==2)
+__inline int32 sad_mb_offset2(UChar *ref, UChar *blk, Int lx, Int dmin, int32 x8)
+#elif (NUMBER==1)
+__inline int32 sad_mb_offset1(UChar *ref, UChar *blk, Int lx, Int dmin, int32 x8)
+#endif
+{
+    int32 x4, x5, x6, x9, x10, x11, x12, x14;
+
+    x9 = 0x80808080; /* const. */
+    x4 = x5 = 0;
+
+    __asm{
+        MVN      x6, #0xff0000;
+        BIC      ref, ref, #3;
+
+#if (NUMBER==3)
+LOOP_SAD3:
+#elif (NUMBER==2)
+LOOP_SAD2:
+#elif (NUMBER==1)
+LOOP_SAD1:
+#endif
+    }
+    /****** process 8 pixels ******/
+    x11 = *((int32*)(ref + 12));
+    x12 = *((int32*)(ref + 16));
+    x10 = *((int32*)(ref + 8));
+    x14 = *((int32*)(blk + 12));
+
+    __asm{
+        MVN      x10, x10, lsr #SHIFT;
+        BIC      x10, x10, x11, lsl #(32-SHIFT);
+        MVN      x11, x11, lsr #SHIFT;
+        BIC      x11, x11, x12, lsl #(32-SHIFT);
+
+        LDR      x12, [blk, #8];
+    }
+
+    /* process x11 & x14 */
+    x11 = sad_4pixelN(x11, x14, x9);
+
+    /* process x12 & x10 */
+    x10 = sad_4pixelN(x10, x12, x9);
+
+    sum_accumulate;
+
+    __asm{
+        /****** process 8 pixels ******/
+        LDR      x11, [ref, #4];
+        LDR      x12, [ref, #8];
+        LDR  x10, [ref], lx ;
+        LDR  x14, [blk, #4];
+
+        MVN      x10, x10, lsr #SHIFT;
+        BIC      x10, x10, x11, lsl #(32-SHIFT);
+        MVN      x11, x11, lsr #SHIFT;
+        BIC      x11, x11, x12, lsl #(32-SHIFT);
+
+        LDR      x12, [blk], #16;
+    }
+
+    /* process x11 & x14 */
+    x11 = sad_4pixelN(x11, x14, x9);
+
+    /* process x12 & x10 */
+    x10 = sad_4pixelN(x10, x12, x9);
+
+    sum_accumulate;
+
+    /****************/
+    x10 = x5 - (x4 << 8); /* extract low bytes */
+    x10 = x10 + x4;     /* add with high bytes */
+    x10 = x10 + (x10 << 16); /* add with lower half word */
+
+    __asm{
+        RSBS     x11, dmin, x10, lsr #16
+        ADDLSS   x8, x8, #INC_X8
+#if (NUMBER==3)
+        BLS      LOOP_SAD3;
+#elif (NUMBER==2)
+BLS      LOOP_SAD2;
+#elif (NUMBER==1)
+BLS      LOOP_SAD1;
+#endif
+    }
+
+    return ((uint32)x10 >> 16);
+}
+
+#elif ( defined(PV_ARM_GCC_V5) || defined(PV_ARM_GCC_V4) ) /* ARM GNU COMPILER  */
+
+#if (NUMBER==3)
+__inline int32 sad_mb_offset3(UChar *ref, UChar *blk, Int lx, Int dmin)
+#elif (NUMBER==2)
+__inline int32 sad_mb_offset2(UChar *ref, UChar *blk, Int lx, Int dmin)
+#elif (NUMBER==1)
+__inline int32 sad_mb_offset1(UChar *ref, UChar *blk, Int lx, Int dmin)
+#endif
+{
+    int32 x4, x5, x6, x8, x9, x10, x11, x12, x14;
+
+    //  x5 = (x4<<8) - x4;
+    x4 = x5 = 0;
+    x6 = 0xFFFF00FF;
+    x9 = 0x80808080; /* const. */
+    ref -= NUMBER; /* bic ref, ref, #3 */
+    ref -= lx;
+    x8 = 16;
+
+#if (NUMBER==3)
+LOOP_SAD3:
+#elif (NUMBER==2)
+LOOP_SAD2:
+#elif (NUMBER==1)
+LOOP_SAD1:
+#endif
+    /****** process 8 pixels ******/
+    x10 = *((uint32*)(ref += lx)); /* D C B A */
+    x11 = *((uint32*)(ref + 4));    /* H G F E */
+    x12 = *((uint32*)(ref + 8));    /* L K J I */
+
+    int32 shift = SHIFT;
+    int32 shift2 = 32 - SHIFT;
+    asm volatile("ldr  %3, [%4, #4]\n\t"
+                 "mvn  %0, %0, lsr %5\n\t"
+                 "bic  %0, %0, %1, lsl %6\n\t"
+                 "mvn  %1, %1, lsr %5\n\t"
+                 "bic  %1, %1, %2, lsl %6\n\t"
+                 "ldr  %2, [%4, #8]"
+             : "+r"(x10), "+r"(x11), "+r"(x12), "=r"(x14)
+                         : "r"(blk), "r"(shift), "r"(shift2));
+
+    /* process x11 & x14 */
+    x11 = sad_4pixel(x11, x14, x9);
+
+    /* process x12 & x10 */
+    x10 = sad_4pixel(x10, x12, x9);
+
+    sum_accumulate;
+
+    /****** process 8 pixels ******/
+    x10 = *((uint32*)(ref + 8)); /* D C B A */
+    x11 = *((uint32*)(ref + 12));   /* H G F E */
+    x12 = *((uint32*)(ref + 16));   /* L K J I */
+
+    asm volatile("ldr  %3, [%4, #4]\n\t"
+                 "mvn  %0, %0, lsr %5\n\t"
+                 "bic  %0, %0, %1, lsl %6\n\t"
+                 "mvn  %1, %1, lsr %5\n\t"
+                 "bic  %1, %1, %2, lsl %6\n\t"
+                 "ldr  %2, [%4, #8]"
+             : "+r"(x10), "+r"(x11), "+r"(x12), "=r"(x14)
+                         : "r"(blk), "r"(shift), "r"(shift2));
+
+    /* process x11 & x14 */
+    x11 = sad_4pixel(x11, x14, x9);
+
+    /* process x12 & x10 */
+    x10 = sad_4pixel(x10, x12, x9);
+
+    sum_accumulate;
+
+    /****************/
+    x10 = x5 - (x4 << 8); /* extract low bytes */
+    x10 = x10 + x4;     /* add with high bytes */
+    x10 = x10 + (x10 << 16); /* add with lower half word */
+
+    if (((uint32)x10 >> 16) <= (uint32)dmin) /* compare with dmin */
+    {
+        if (--x8)
+        {
+#if (NUMBER==3)
+            goto         LOOP_SAD3;
+#elif (NUMBER==2)
+goto         LOOP_SAD2;
+#elif (NUMBER==1)
+goto         LOOP_SAD1;
+#endif
+        }
+
+    }
+
+    return ((uint32)x10 >> 16);
+}
+
+#endif
+
diff --git a/media/libstagefright/codecs/m4v_h263/enc/src/vlc_enc_tab.h b/media/libstagefright/codecs/m4v_h263/enc/src/vlc_enc_tab.h
new file mode 100644
index 0000000..79d62e4
--- /dev/null
+++ b/media/libstagefright/codecs/m4v_h263/enc/src/vlc_enc_tab.h
@@ -0,0 +1,1146 @@
+/* ------------------------------------------------------------------
+ * Copyright (C) 1998-2009 PacketVideo
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
+ * express or implied.
+ * See the License for the specific language governing permissions
+ * and limitations under the License.
+ * -------------------------------------------------------------------
+ */
+/******************************************************************************
+ *
+ * This software module was originally developed by
+ *
+ * Robert Danielsen (Telenor / ACTS-MoMuSys).
+ *
+ * and edited by
+ *
+ * Minhua Zhou (HHI / ACTS-MoMuSys).
+ * Luis Ducla-Soares (IST / ACTS-MoMuSys).
+ *
+ * in the course of development of the MPEG-4 Video (ISO/IEC 14496-2) standard.
+ * This software module is an implementation of a part of one or more MPEG-4
+ * Video (ISO/IEC 14496-2) tools as specified by the MPEG-4 Video (ISO/IEC
+ * 14496-2) standard.
+ *
+ * ISO/IEC gives users of the MPEG-4 Video (ISO/IEC 14496-2) standard free
+ * license to this software module or modifications thereof for use in hardware
+ * or software products claiming conformance to the MPEG-4 Video (ISO/IEC
+ * 14496-2) standard.
+ *
+ * Those intending to use this software module in hardware or software products
+ * are advised that its use may infringe existing patents. The original
+ * developer of this software module and his/her company, the subsequent
+ * editors and their companies, and ISO/IEC have no liability for use of this
+ * software module or modifications thereof in an implementation. Copyright is
+ * not released for non MPEG-4 Video (ISO/IEC 14496-2) standard conforming
+ * products.
+ *
+ * ACTS-MoMuSys partners retain full right to use the code for his/her own
+ * purpose, assign or donate the code to a third party and to inhibit third
+ * parties from using the code for non MPEG-4 Video (ISO/IEC 14496-2) standard
+ * conforming products. This copyright notice must be included in all copies or
+ * derivative works.
+ *
+ * Copyright (c) 1997
+ *
+ *****************************************************************************/
+
+
+/***********************************************************HeaderBegin*******
+ *
+ * File:    vlc.h
+ *
+ * Author:  Robert Danielsen
+ * Created: 07.06.96
+ *
+ * Description: vlc tables for encoder
+ *
+ * Notes:   Idea taken from MPEG-2 software simulation group
+ *
+ * Modified:
+ *  28.10.96 Robert Danielsen: Added tables for Intra luminance
+ *          coefficients
+ *      01.05.97 Luis Ducla-Soares: added VM7.0 Reversible VLC tables (RVLC).
+ *      13.05.97 Minhua Zhou: added cbpy_tab3,cbpy_tab2
+ *
+ ***********************************************************HeaderEnd*********/
+
+/************************    INCLUDE FILES    ********************************/
+
+#ifndef _VLC_ENC_TAB_H_
+#define _VLC_ENC_TAB_H_
+
+
+#include "mp4def.h"
+/* type definitions for variable length code table entries */
+
+
+
+static const Int intra_max_level[2][64] =
+{
+    {27, 10,  5,  4,  3,  3,  3,  3,
+        2,  2,  1,  1,  1,  1,  1,  0,
+        0,  0,  0,  0,  0,  0,  0,  0,
+        0,  0,  0,  0,  0,  0,  0,  0,
+        0,  0,  0,  0,  0,  0,  0,  0,
+        0,  0,  0,  0,  0,  0,  0,  0,
+        0,  0,  0,  0,  0,  0,  0,  0,
+        0,  0,  0,  0,  0,  0,  0,  0,
+    },
+
+    {8,  3,  2,  2,  2,  2,  2,  1,
+     1,  1,  1,  1,  1,  1,  1,  1,
+     1,  1,  1,  1,  1,  0,  0,  0,
+     0,  0,  0,  0,  0,  0,  0,  0,
+     0,  0,  0,  0,  0,  0,  0,  0,
+     0,  0,  0,  0,  0,  0,  0,  0,
+     0,  0,  0,  0,  0,  0,  0,  0,
+     0,  0,  0,  0,  0,  0,  0,  0
+    }
+};
+
+
+static const Int inter_max_level[2][64] =
+{
+    {12,  6,  4,  3,  3,  3,  3,  2,
+        2,  2,  2,  1,  1,  1,  1,  1,
+        1,  1,  1,  1,  1,  1,  1,  1,
+        1,  1,  1,  0,  0,  0,  0,  0,
+        0,  0,  0,  0,  0,  0,  0,  0,
+        0,  0,  0,  0,  0,  0,  0,  0,
+        0,  0,  0,  0,  0,  0,  0,  0,
+        0,  0,  0,  0,  0,  0,  0,  0},
+
+    {3,  2,  1,  1,  1,  1,  1,  1,
+     1,  1,  1,  1,  1,  1,  1,  1,
+     1,  1,  1,  1,  1,  1,  1,  1,
+     1,  1,  1,  1,  1,  1,  1,  1,
+     1,  1,  1,  1,  1,  1,  1,  1,
+     1,  0,  0,  0,  0,  0,  0,  0,
+     0,  0,  0,  0,  0,  0,  0,  0,
+     0,  0,  0,  0,  0,  0,  0,  0}
+};
+
+
+static const Int intra_max_run0[28] = { 999, 14,  9,  7,  3,  2,  1,
+                                        1,  1,  1,  1,  0,  0,  0,
+                                        0,  0,  0,  0,  0,  0,  0,
+                                        0,  0,  0,  0,  0,  0,  0
+                                      };
+
+
+static const Int intra_max_run1[9] = { 999, 20,  6,
+                                       1,  0,  0,
+                                       0,  0,  0
+                                     };
+
+static const Int inter_max_run0[13] = { 999,
+                                        26, 10,  6,  2,  1,  1,
+                                        0,  0,  0,  0,  0,  0
+                                      };
+
+
+static const Int inter_max_run1[4] = { 999, 40,  1,  0 };
+
+
+
+/* DC prediction sizes */
+
+static const VLCtable DCtab_lum[13] =
+{
+    {3, 3}, {3, 2}, {2, 2}, {2, 3}, {1, 3}, {1, 4}, {1, 5}, {1, 6}, {1, 7},
+    {1, 8}, {1, 9}, {1, 10}, {1, 11}
+};
+
+static const VLCtable DCtab_chrom[13] =
+{
+    {3, 2}, {2, 2}, {1, 2}, {1, 3}, {1, 4}, {1, 5}, {1, 6}, {1, 7}, {1, 8},
+    {1, 9}, {1, 10}, {1, 11}, {1, 12}
+};
+
+/* Motion vectors */
+
+static const VLCtable mvtab[33] =
+{
+    {1, 1}, {1, 2}, {1, 3}, {1, 4}, {3, 6}, {5, 7}, {4, 7}, {3, 7},
+    {11, 9}, {10, 9}, {9, 9}, {17, 10}, {16, 10}, {15, 10}, {14, 10}, {13, 10},
+    {12, 10}, {11, 10}, {10, 10}, {9, 10}, {8, 10}, {7, 10}, {6, 10}, {5, 10},
+    {4, 10}, {7, 11}, {6, 11}, {5, 11}, {4, 11}, {3, 11}, {2, 11}, {3, 12},
+    {2, 12}
+};
+
+
+/* MCBPC Indexing by cbpc in first two bits, mode in last two.
+ CBPC as in table 4/H.263, MB type (mode): 3 = 01, 4 = 10.
+ Example: cbpc = 01 and mode = 4 gives index = 0110 = 6. */
+
+static const VLCtable mcbpc_intra_tab[15] =
+{
+    {0x01, 9}, {0x01, 1}, {0x01, 4}, {0x00, 0},
+    {0x00, 0}, {0x01, 3}, {0x01, 6}, {0x00, 0},
+    {0x00, 0}, {0x02, 3}, {0x02, 6}, {0x00, 0},
+    {0x00, 0}, {0x03, 3}, {0x03, 6}
+};
+
+
+/* MCBPC inter.
+   Addressing: 5 bit ccmmm (cc = CBPC, mmm = mode (1-4 binary)) */
+
+static const VLCtable mcbpc_inter_tab[29] =
+{
+    {1, 1}, {3, 3}, {2, 3}, {3, 5}, {4, 6}, {1, 9}, {0, 0}, {0, 0},
+    {3, 4}, {7, 7}, {5, 7}, {4, 8}, {4, 9}, {0, 0}, {0, 0}, {0, 0},
+    {2, 4}, {6, 7}, {4, 7}, {3, 8}, {3, 9}, {0, 0}, {0, 0}, {0, 0},
+    {5, 6}, {5, 9}, {5, 8}, {3, 7}, {2, 9}
+};
+
+
+
+/* CBPY. Straightforward indexing */
+
+static const VLCtable cbpy_tab[16] =
+{
+    {3, 4}, {5, 5}, {4, 5}, {9, 4}, {3, 5}, {7, 4}, {2, 6}, {11, 4},
+    {2, 5}, {3, 6}, {5, 4}, {10, 4}, {4, 4}, {8, 4}, {6, 4}, {3, 2}
+};
+
+static const VLCtable cbpy_tab3[8] =
+{
+    {3, 3}, {1, 6}, {1, 5}, {2, 3}, {2, 5}, {3, 5}, {1, 3}, {1, 1}
+};
+static const VLCtable cbpy_tab2[4] =
+{
+    {1, 4}, {1, 3}, {1, 2}, {1, 1}
+};
+
+/* DCT coefficients. Four tables, two for last = 0, two for last = 1.
+   the sign bit must be added afterwards. */
+
+/* first part of coeffs for last = 0. Indexed by [run][level-1] */
+
+static const VLCtable coeff_tab0[2][12] =
+{
+    /* run = 0 */
+    {
+        {0x02, 2}, {0x0f, 4}, {0x15, 6}, {0x17, 7},
+        {0x1f, 8}, {0x25, 9}, {0x24, 9}, {0x21, 10},
+        {0x20, 10}, {0x07, 11}, {0x06, 11}, {0x20, 11}
+    },
+    /* run = 1 */
+    {
+        {0x06, 3}, {0x14, 6}, {0x1e, 8}, {0x0f, 10},
+        {0x21, 11}, {0x50, 12}, {0x00, 0}, {0x00, 0},
+        {0x00, 0}, {0x00, 0}, {0x00, 0}, {0x00, 0}
+    }
+};
+
+/* rest of coeffs for last = 0. indexing by [run-2][level-1] */
+
+static const VLCtable coeff_tab1[25][4] =
+{
+    /* run = 2 */
+    {
+        {0x0e, 4}, {0x1d, 8}, {0x0e, 10}, {0x51, 12}
+    },
+    /* run = 3 */
+    {
+        {0x0d, 5}, {0x23, 9}, {0x0d, 10}, {0x00, 0}
+    },
+    /* run = 4-26 */
+    {
+        {0x0c, 5}, {0x22, 9}, {0x52, 12}, {0x00, 0}
+    },
+    {
+        {0x0b, 5}, {0x0c, 10}, {0x53, 12}, {0x00, 0}
+    },
+    {
+        {0x13, 6}, {0x0b, 10}, {0x54, 12}, {0x00, 0}
+    },
+    {
+        {0x12, 6}, {0x0a, 10}, {0x00, 0}, {0x00, 0}
+    },
+    {
+        {0x11, 6}, {0x09, 10}, {0x00, 0}, {0x00, 0}
+    },
+    {
+        {0x10, 6}, {0x08, 10}, {0x00, 0}, {0x00, 0}
+    },
+    {
+        {0x16, 7}, {0x55, 12}, {0x00, 0}, {0x00, 0}
+    },
+    {
+        {0x15, 7}, {0x00, 0}, {0x00, 0}, {0x00, 0}
+    },
+    {
+        {0x14, 7}, {0x00, 0}, {0x00, 0}, {0x00, 0}
+    },
+    {
+        {0x1c, 8}, {0x00, 0}, {0x00, 0}, {0x00, 0}
+    },
+    {
+        {0x1b, 8}, {0x00, 0}, {0x00, 0}, {0x00, 0}
+    },
+    {
+        {0x21, 9}, {0x00, 0}, {0x00, 0}, {0x00, 0}
+    },
+    {
+        {0x20, 9}, {0x00, 0}, {0x00, 0}, {0x00, 0}
+    },
+    {
+        {0x1f, 9}, {0x00, 0}, {0x00, 0}, {0x00, 0}
+    },
+    {
+        {0x1e, 9}, {0x00, 0}, {0x00, 0}, {0x00, 0}
+    },
+    {
+        {0x1d, 9}, {0x00, 0}, {0x00, 0}, {0x00, 0}
+    },
+    {
+        {0x1c, 9}, {0x00, 0}, {0x00, 0}, {0x00, 0}
+    },
+    {
+        {0x1b, 9}, {0x00, 0}, {0x00, 0}, {0x00, 0}
+    },
+    {
+        {0x1a, 9}, {0x00, 0}, {0x00, 0}, {0x00, 0}
+    },
+    {
+        {0x22, 11}, {0x00, 0}, {0x00, 0}, {0x00, 0}
+    },
+    {
+        {0x23, 11}, {0x00, 0}, {0x00, 0}, {0x00, 0}
+    },
+    {
+        {0x56, 12}, {0x00, 0}, {0x00, 0}, {0x00, 0}
+    },
+    {
+        {0x57, 12}, {0x00, 0}, {0x00, 0}, {0x00, 0}
+    }
+};
+
+/* first coeffs of last = 1. indexing by [run][level-1] */
+
+static const VLCtable coeff_tab2[2][3] =
+{
+    /* run = 0 */
+    {
+        {0x07, 4}, {0x19, 9}, {0x05, 11}
+    },
+    /* run = 1 */
+    {
+        {0x0f, 6}, {0x04, 11}, {0x00, 0}
+    }
+};
+
+/* rest of coeffs for last = 1. indexing by [run-2] */
+
+static const VLCtable coeff_tab3[40] =
+{
+    {0x0e, 6}, {0x0d, 6}, {0x0c, 6},
+    {0x13, 7}, {0x12, 7}, {0x11, 7}, {0x10, 7},
+    {0x1a, 8}, {0x19, 8}, {0x18, 8}, {0x17, 8},
+    {0x16, 8}, {0x15, 8}, {0x14, 8}, {0x13, 8},
+    {0x18, 9}, {0x17, 9}, {0x16, 9}, {0x15, 9},
+    {0x14, 9}, {0x13, 9}, {0x12, 9}, {0x11, 9},
+    {0x07, 10}, {0x06, 10}, {0x05, 10}, {0x04, 10},
+    {0x24, 11}, {0x25, 11}, {0x26, 11}, {0x27, 11},
+    {0x58, 12}, {0x59, 12}, {0x5a, 12}, {0x5b, 12},
+    {0x5c, 12}, {0x5d, 12}, {0x5e, 12}, {0x5f, 12},
+    {0x00, 0}
+};
+
+/* New tables for Intra luminance coefficients. Same codewords,
+   different meaning */
+
+/* Coeffs for last = 0, run = 0. Indexed by [level-1] */
+
+static const VLCtable coeff_tab4[27] =
+{
+    /* run = 0 */
+    {0x02, 2}, {0x06, 3}, {0x0f, 4}, {0x0d, 5},
+    {0x0c, 5}, {0x15, 6}, {0x13, 6}, {0x12, 6},
+    {0x17, 7}, {0x1f, 8}, {0x1e, 8}, {0x1d, 8},
+    {0x25, 9}, {0x24, 9}, {0x23, 9}, {0x21, 9},
+    {0x21, 10}, {0x20, 10}, {0x0f, 10}, {0x0e, 10},
+    {0x07, 11}, {0x06, 11}, {0x20, 11}, {0x21, 11},
+    {0x50, 12}, {0x51, 12}, {0x52, 12}
+};
+
+/* Coeffs for last = 0, run = 1. Indexed by [level-1] */
+
+static const VLCtable coeff_tab5[10] =
+{
+    {0x0e, 4}, {0x14, 6}, {0x16, 7}, {0x1c, 8},
+    {0x20, 9}, {0x1f, 9}, {0x0d, 10}, {0x22, 11},
+    {0x53, 12}, {0x55, 12}
+};
+
+/* Coeffs for last = 0, run = 2 -> 9. Indexed by [run-2][level-1] */
+
+static const VLCtable coeff_tab6[8][5] =
+{
+    /* run = 2 */
+    {
+        {0x0b, 5}, {0x15, 7}, {0x1e, 9}, {0x0c, 10},
+        {0x56, 12}
+    },
+    /* run = 3 */
+    {
+        {0x11, 6}, {0x1b, 8}, {0x1d, 9}, {0x0b, 10},
+        {0x00, 0}
+    },
+    /* run = 4 */
+    {
+        {0x10, 6}, {0x22, 9}, {0x0a, 10}, {0x00, 0},
+        {0x00, 0}
+    },
+    /* run = 5 */
+    {
+        {0x0d, 6}, {0x1c, 9}, {0x08, 10}, {0x00, 0},
+        {0x00, 0}
+    },
+    /* run = 6 */
+    {
+        {0x12, 7}, {0x1b, 9}, {0x54, 12}, {0x00, 0},
+        {0x00, 0}
+    },
+    /* run = 7 */
+    {
+        {0x14, 7}, {0x1a, 9}, {0x57, 12}, {0x00, 0},
+        {0x00, 0}
+    },
+    /* run = 8 */
+    {
+        {0x19, 8}, {0x09, 10}, {0x00, 0}, {0x00, 0},
+        {0x00, 0}
+    },
+    /* run = 9 */
+    {
+        {0x18, 8}, {0x23, 11}, {0x00, 0}, {0x00, 0},
+        {0x00, 0}
+    }
+};
+
+/* Coeffs for last = 0, run = 10 -> 14. Indexed by [run-10] */
+
+static const VLCtable coeff_tab7[5] =
+{
+    {0x17, 8}, {0x19, 9}, {0x18, 9}, {0x07, 10},
+    {0x58, 12}
+};
+
+/* Coeffs for last = 1, run = 0. Indexed by [level-1] */
+
+static const VLCtable coeff_tab8[8] =
+{
+    {0x07, 4}, {0x0c, 6}, {0x16, 8}, {0x17, 9},
+    {0x06, 10}, {0x05, 11}, {0x04, 11}, {0x59, 12}
+};
+
+/* Coeffs for last = 1, run = 1 -> 6. Indexed by [run-1][level-1] */
+
+static const VLCtable coeff_tab9[6][3] =
+{
+    /* run = 1 */
+    {
+        {0x0f, 6}, {0x16, 9}, {0x05, 10}
+    },
+    /* run = 2 */
+    {
+        {0x0e, 6}, {0x04, 10}, {0x00, 0}
+    },
+    /* run = 3 */
+    {
+        {0x11, 7}, {0x24, 11}, {0x00, 0}
+    },
+    /* run = 4 */
+    {
+        {0x10, 7}, {0x25, 11}, {0x00, 0}
+    },
+    /* run = 5 */
+    {
+        {0x13, 7}, {0x5a, 12}, {0x00, 0}
+    },
+    /* run = 6 */
+    {
+        {0x15, 8}, {0x5b, 12}, {0x00, 0}
+    }
+};
+
+/* Coeffs for last = 1, run = 7 -> 20. Indexed by [run-7] */
+
+static const VLCtable coeff_tab10[14] =
+{
+    {0x14, 8}, {0x13, 8}, {0x1a, 8}, {0x15, 9},
+    {0x14, 9}, {0x13, 9}, {0x12, 9}, {0x11, 9},
+    {0x26, 11}, {0x27, 11}, {0x5c, 12}, {0x5d, 12},
+    {0x5e, 12}, {0x5f, 12}
+};
+
+
+#ifndef NO_RVLC
+/* RVLC tables */
+/* DCT coefficients. Four tables, two for last = 0, two for last = 1.
+   the sign bit must be added afterwards. */
+
+/* DCT  coeffs (intra) for last = 0.  */
+
+/* Indexed by [level-1] */
+
+static const VLCtable coeff_RVLCtab1[27] =
+{
+    /* run = 0 */
+    {     0x6,  3},
+    {     0x7,  3},
+    {     0xa,  4},
+    {     0x9,  5},
+    {    0x14,  6},
+    {    0x15,  6},
+    {    0x34,  7},
+    {    0x74,  8},
+    {    0x75,  8},
+    {    0xdd,  9},
+    {    0xec,  9},
+    {   0x1ec, 10},
+    {   0x1ed, 10},
+    {   0x1f4, 10},
+    {   0x3ec, 11},
+    {   0x3ed, 11},
+    {   0x3f4, 11},
+    {   0x77d, 12},
+    {   0x7bc, 12},
+    {   0xfbd, 13},
+    {   0xfdc, 13},
+    {   0x7bd, 12},
+    {   0xfdd, 13},
+    {  0x1fbd, 14},
+    {  0x1fdc, 14},
+    {  0x1fdd, 14},
+    {  0x1ffc, 15}
+};
+
+
+/* Indexed by [level-1] */
+
+static const VLCtable coeff_RVLCtab2[13] =
+{
+    /* run = 1 */
+    {     0x1,  4},
+    {     0x8,  5},
+    {    0x2d,  7},
+    {    0x6c,  8},
+    {    0x6d,  8},
+    {    0xdc,  9},
+    {   0x1dd, 10},
+    {   0x3dc, 11},
+    {   0x3dd, 11},
+    {   0x77c, 12},
+    {   0xfbc, 13},
+    {  0x1f7d, 14},
+    {  0x1fbc, 14}
+};
+
+
+/* Indexed by [level-1] */
+
+static const VLCtable coeff_RVLCtab3[11] =
+{
+    /* run = 2 */
+
+    {     0x4,  5},
+    {    0x2c,  7},
+    {    0xbc,  9},
+    {   0x1dc, 10},
+    {   0x3bc, 11},
+    {   0x3bd, 11},
+    {   0xefd, 13},
+    {   0xf7c, 13},
+    {   0xf7d, 13},
+    {  0x1efd, 14},
+    {  0x1f7c, 14}
+};
+
+
+/* Indexed by [level-1] */
+
+static const VLCtable coeff_RVLCtab4[9] =
+{
+    /* run = 3 */
+    {     0x5,  5},
+    {    0x5c,  8},
+    {    0xbd,  9},
+    {   0x37d, 11},
+    {   0x6fc, 12},
+    {   0xefc, 13},
+    {  0x1dfd, 14},
+    {  0x1efc, 14},
+    {  0x1ffd, 15}
+};
+
+
+/* Indexed by [run-4][level-1] */
+
+static const VLCtable coeff_RVLCtab5[2][6] =
+{
+    /* run = 4 */
+    {
+        {     0xc,  6},
+        {    0x5d,  8},
+        {   0x1bd, 10},
+        {   0x3fd, 12},
+        {   0x6fd, 12},
+        {  0x1bfd, 14}
+    },
+    /* run = 5 */
+    {
+        {     0xd,  6},
+        {    0x7d,  9},
+        {   0x2fc, 11},
+        {   0x5fc, 12},
+        {  0x1bfc, 14},
+        {  0x1dfc, 14}
+    }
+};
+
+
+/* Indexed by [run-6][level-1]       */
+
+static const VLCtable coeff_RVLCtab6[2][5] =
+{
+
+    /* run = 6 */
+    {
+        {    0x1c,  7},
+        {   0x17c, 10},
+        {   0x2fd, 11},
+        {   0x5fd, 12},
+        {  0x2ffc, 15}
+    },
+    /* run = 7 */
+    {
+        {    0x1d,  7},
+        {   0x17d, 10},
+        {   0x37c, 11},
+        {   0xdfd, 13},
+        {  0x2ffd, 15}
+    }
+
+};
+/* Indexed by [run-8][level-1] */
+
+static const VLCtable coeff_RVLCtab7[2][4] =
+{
+    /* run = 8 */
+    {
+        {    0x3c,  8},
+        {   0x1bc, 10},
+        {   0xbfd, 13},
+        {  0x17fd, 14}
+    },
+    /* run = 9 */
+    {
+        {    0x3d,  8},
+        {   0x1fd, 11},
+        {   0xdfc, 13},
+        {  0x37fc, 15},
+    }
+};
+
+
+
+/* Indexed by [run-10][level-1] */
+
+static const VLCtable coeff_RVLCtab8[3][2] =
+{
+    /* run = 10 */
+    {
+        {    0x7c,  9},
+        {   0x3fc, 12}
+    },
+    /* run = 11 */
+    {
+        {    0xfc, 10},
+        {   0xbfc, 13}
+    },
+    /* run = 12 */
+    {
+        {    0xfd, 10},
+        {  0x37fd, 15}
+    }
+};
+
+
+/* Indexed by [level-1] */
+
+static const VLCtable coeff_RVLCtab9[7] =
+{
+    /* run = 13 -> 19 */
+    {   0x1fc, 11},
+    {   0x7fc, 13},
+    {   0x7fd, 13},
+    {   0xffc, 14},
+    {   0xffd, 14},
+    {  0x17fc, 14},
+    {  0x3bfc, 15}
+};
+
+
+
+/* first coeffs of last = 1. indexing by [run][level-1] */
+
+static const VLCtable coeff_RVLCtab10[2][5] =
+{
+    /* run = 0 */
+    {
+        {     0xb,  4},
+        {    0x78,  8},
+        {   0x3f5, 11},
+        {   0xfec, 13},
+        {  0x1fec, 14}
+    },
+    /* run = 1 */
+    {
+        {    0x12,  5},
+        {    0xed,  9},
+        {   0x7dc, 12},
+        {  0x1fed, 14},
+        {  0x3bfd, 15}
+    }
+
+};
+
+static const VLCtable coeff_RVLCtab11[3] =
+{
+    /* run = 2 */
+    {    0x13,  5},
+    {   0x3f8, 11},
+    {  0x3dfc, 15}
+
+};
+
+static const VLCtable coeff_RVLCtab12[11][2] =
+{
+    /* run = 3 */
+    {
+        {    0x18,  6},
+        {   0x7dd, 12}
+    },
+    /* run = 4 */
+    {
+        {    0x19,  6},
+        {   0x7ec, 12}
+    },
+    /* run = 5 */
+    {
+        {    0x22,  6},
+        {   0xfed, 13}
+    },
+    /* run = 6 */
+    {
+        {    0x23,  6},
+        {   0xff4, 13}
+    },
+    /* run = 7 */
+    {
+        {    0x35,  7},
+        {   0xff5, 13}
+    },
+    /* run = 8 */
+    {
+        {    0x38,  7},
+        {   0xff8, 13}
+    },
+    /* run = 9 */
+    {
+        {    0x39,  7},
+        {   0xff9, 13}
+    },
+    /* run = 10 */
+    {
+        {    0x42,  7},
+        {  0x1ff4, 14}
+    },
+    /* run = 11 */
+    {
+        {    0x43,  7},
+        {  0x1ff5, 14}
+    },
+    /* run = 12 */
+    {
+        {    0x79,  8},
+        {  0x1ff8, 14}
+    },
+    /* run = 13 */
+    {
+        {    0x82,  8},
+        {  0x3dfd, 15}
+    }
+
+};
+
+static const VLCtable coeff_RVLCtab13[32] =
+{
+    /* run = 14 -> 44 */
+    {    0x83,  8},
+    {    0xf4,  9},
+    {    0xf5,  9},
+    {    0xf8,  9},
+    {    0xf9,  9},
+    {   0x102,  9},
+    {   0x103,  9},
+    {   0x1f5, 10},
+    {   0x1f8, 10},
+    {   0x1f9, 10},
+    {   0x202, 10},
+    {   0x203, 10},
+    {   0x3f9, 11},
+    {   0x402, 11},
+    {   0x403, 11},
+    {   0x7ed, 12},
+    {   0x7f4, 12},
+    {   0x7f5, 12},
+    {   0x7f8, 12},
+    {   0x7f9, 12},
+    {   0x802, 12},
+    {   0x803, 12},
+    {  0x1002, 13},
+    {  0x1003, 13},
+    {  0x1ff9, 14},
+    {  0x2002, 14},
+    {  0x2003, 14},
+    {  0x3efc, 15},
+    {  0x3efd, 15},
+    {  0x3f7c, 15},
+    {  0x3f7d, 15}
+};
+
+
+
+/* Coeffs for last = 0, run = 0. Indexed by [level-1] */
+
+static const VLCtable coeff_RVLCtab14[19] =
+{
+    /* run = 0 */
+    {     0x6,  3},
+    {     0x1,  4},
+    {     0x4,  5},
+    {    0x1c,  7},
+    {    0x3c,  8},
+    {    0x3d,  8},
+    {    0x7c,  9},
+    {    0xfc, 10},
+    {    0xfd, 10},
+    {   0x1fc, 11},
+    {   0x1fd, 11},
+    {   0x3fc, 12},
+    {   0x7fc, 13},
+    {   0x7fd, 13},
+    {   0xbfc, 13},
+    {   0xbfd, 13},
+    {   0xffc, 14},
+    {   0xffd, 14},
+    {  0x1ffc, 15}
+};
+
+static const VLCtable coeff_RVLCtab15[10] =
+{
+    /* run = 1 */
+    {     0x7,  3},
+    {     0xc,  6},
+    {    0x5c,  8},
+    {    0x7d,  9},
+    {   0x17c, 10},
+    {   0x2fc, 11},
+    {   0x3fd, 12},
+    {   0xdfc, 13},
+    {  0x17fc, 14},
+    {  0x17fd, 14}
+};
+
+static const VLCtable coeff_RVLCtab16[2][7] =
+{
+    /* run = 2 */
+    {
+        {     0xa,  4},
+        {    0x1d,  7},
+        {    0xbc,  9},
+        {   0x2fd, 11},
+        {   0x5fc, 12},
+        {  0x1bfc, 14},
+        {  0x1bfd, 14}
+    },
+    /* run = 3 */
+    {
+        {     0x5,  5},
+        {    0x5d,  8},
+        {   0x17d, 10},
+        {   0x5fd, 12},
+        {   0xdfd, 13},
+        {  0x1dfc, 14},
+        {  0x1ffd, 15}
+    }
+};
+
+static const VLCtable coeff_RVLCtab17[5] =
+{
+    /* run = 4 */
+    {     0x8,  5},
+    {    0x6c,  8},
+    {   0x37c, 11},
+    {   0xefc, 13},
+    {  0x2ffc, 15}
+};
+
+static const VLCtable coeff_RVLCtab18[3][4] =
+{
+    /* run = 5 */
+    {
+        {     0x9,  5},
+        {    0xbd,  9},
+        {   0x37d, 11},
+        {   0xefd, 13}
+    },
+    /* run = 6 */
+    {
+        {     0xd,  6},
+        {   0x1bc, 10},
+        {   0x6fc, 12},
+        {  0x1dfd, 14}
+    },
+    /* run = 7 */
+    {
+        {    0x14,  6},
+        {   0x1bd, 10},
+        {   0x6fd, 12},
+        {  0x2ffd, 15}
+    }
+};
+
+static const VLCtable coeff_RVLCtab19[2][3] =
+{
+    /* run = 8 */
+    {
+        {    0x15,  6},
+        {   0x1dc, 10},
+        {   0xf7c, 13}
+    },
+    /* run = 9 */
+    {
+        {    0x2c,  7},
+        {   0x1dd, 10},
+        {  0x1efc, 14}
+    }
+};
+
+static const VLCtable coeff_RVLCtab20[8][2] =
+{
+    /* run = 10 */
+    {
+        {    0x2d,  7},
+        {   0x3bc, 11}
+    },
+    /* run = 11 */
+    {
+        {    0x34,  7},
+        {   0x77c, 12}
+    },
+    /* run = 12 */
+    {
+        {    0x6d,  8},
+        {   0xf7d, 13}
+    },
+    /* run = 13 */
+    {
+        {    0x74,  8},
+        {  0x1efd, 14}
+    },
+    /* run = 14 */
+    {
+        {    0x75,  8},
+        {  0x1f7c, 14}
+    },
+    /* run = 15 */
+    {
+        {    0xdc,  9},
+        {  0x1f7d, 14}
+    },
+    /* run = 16 */
+    {
+        {    0xdd,  9},
+        {  0x1fbc, 14}
+    },
+    /* run = 17 */
+    {
+        {    0xec,  9},
+        {  0x37fc, 15}
+    }
+};
+
+static const VLCtable coeff_RVLCtab21[21] =
+{
+    /* run = 18 -> 38 */
+    {   0x1ec, 10},
+    {   0x1ed, 10},
+    {   0x1f4, 10},
+    {   0x3bd, 11},
+    {   0x3dc, 11},
+    {   0x3dd, 11},
+    {   0x3ec, 11},
+    {   0x3ed, 11},
+    {   0x3f4, 11},
+    {   0x77d, 12},
+    {   0x7bc, 12},
+    {   0x7bd, 12},
+    {   0xfbc, 13},
+    {   0xfbd, 13},
+    {   0xfdc, 13},
+    {   0xfdd, 13},
+    {  0x1fbd, 14},
+    {  0x1fdc, 14},
+    {  0x1fdd, 14},
+    {  0x37fd, 15},
+    {  0x3bfc, 15}
+};
+
+
+/* first coeffs of last = 1. indexing by [run][level-1] */
+
+static const VLCtable coeff_RVLCtab22[2][5] =
+{
+    /* run = 0 */
+    {
+        {     0xb,  4},
+        {    0x78,  8},
+        {   0x3f5, 11},
+        {   0xfec, 13},
+        {  0x1fec, 14}
+    },
+    /* run = 1 */
+    {
+        {    0x12,  5},
+        {    0xed,  9},
+        {   0x7dc, 12},
+        {  0x1fed, 14},
+        {  0x3bfd, 15}
+    }
+
+};
+
+static const VLCtable coeff_RVLCtab23[3] =
+{
+    /* run = 2 */
+    {    0x13,  5},
+    {   0x3f8, 11},
+    {  0x3dfc, 15}
+
+};
+
+static const VLCtable coeff_RVLCtab24[11][2] =
+{
+    /* run = 3 */
+    {
+        {    0x18,  6},
+        {   0x7dd, 12}
+    },
+    /* run = 4 */
+    {
+        {    0x19,  6},
+        {   0x7ec, 12}
+    },
+    /* run = 5 */
+    {
+        {    0x22,  6},
+        {   0xfed, 13}
+    },
+    /* run = 6 */
+    {
+        {    0x23,  6},
+        {   0xff4, 13}
+    },
+    /* run = 7 */
+    {
+        {    0x35,  7},
+        {   0xff5, 13}
+    },
+    /* run = 8 */
+    {
+        {    0x38,  7},
+        {   0xff8, 13}
+    },
+    /* run = 9 */
+    {
+        {    0x39,  7},
+        {   0xff9, 13}
+    },
+    /* run = 10 */
+    {
+        {    0x42,  7},
+        {  0x1ff4, 14}
+    },
+    /* run = 11 */
+    {
+        {    0x43,  7},
+        {  0x1ff5, 14}
+    },
+    /* run = 12 */
+    {
+        {    0x79,  8},
+        {  0x1ff8, 14}
+    },
+    /* run = 13 */
+    {
+        {    0x82,  8},
+        {  0x3dfd, 15}
+    }
+
+};
+
+static const VLCtable coeff_RVLCtab25[32] =
+{
+    /* run = 14 -> 44 */
+    {    0x83,  8},
+    {    0xf4,  9},
+    {    0xf5,  9},
+    {    0xf8,  9},
+    {    0xf9,  9},
+    {   0x102,  9},
+    {   0x103,  9},
+    {   0x1f5, 10},
+    {   0x1f8, 10},
+    {   0x1f9, 10},
+    {   0x202, 10},
+    {   0x203, 10},
+    {   0x3f9, 11},
+    {   0x402, 11},
+    {   0x403, 11},
+    {   0x7ed, 12},
+    {   0x7f4, 12},
+    {   0x7f5, 12},
+    {   0x7f8, 12},
+    {   0x7f9, 12},
+    {   0x802, 12},
+    {   0x803, 12},
+    {  0x1002, 13},
+    {  0x1003, 13},
+    {  0x1ff9, 14},
+    {  0x2002, 14},
+    {  0x2003, 14},
+    {  0x3efc, 15},
+    {  0x3efd, 15},
+    {  0x3f7c, 15},
+    {  0x3f7d, 15}
+};
+
+#endif /* NO_RVLC */
+
+#endif /* _VLC_ENC_TAB_H_ */
+
diff --git a/media/libstagefright/codecs/m4v_h263/enc/src/vlc_encode.cpp b/media/libstagefright/codecs/m4v_h263/enc/src/vlc_encode.cpp
new file mode 100644
index 0000000..7ea5dc4
--- /dev/null
+++ b/media/libstagefright/codecs/m4v_h263/enc/src/vlc_encode.cpp
@@ -0,0 +1,2799 @@
+/* ------------------------------------------------------------------
+ * Copyright (C) 1998-2009 PacketVideo
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
+ * express or implied.
+ * See the License for the specific language governing permissions
+ * and limitations under the License.
+ * -------------------------------------------------------------------
+ */
+/******************************************************************************
+*
+* This software module was originally developed by
+*
+* Robert Danielsen (Telenor / ACTS-MoMuSys).
+*
+* and edited by
+*
+* Luis Ducla-Soares (IST / ACTS-MoMuSys).
+* Cor Quist (KPN / ACTS-MoMuSys).
+*
+* in the course of development of the MPEG-4 Video (ISO/IEC 14496-2) standard.
+* This software module is an implementation of a part of one or more MPEG-4
+* Video (ISO/IEC 14496-2) tools as specified by the MPEG-4 Video (ISO/IEC
+* 14496-2) standard.
+*
+* ISO/IEC gives users of the MPEG-4 Video (ISO/IEC 14496-2) standard free
+* license to this software module or modifications thereof for use in hardware
+* or software products claiming conformance to the MPEG-4 Video (ISO/IEC
+* 14496-2) standard.
+*
+* Those intending to use this software module in hardware or software products
+* are advised that its use may infringe existing patents. The original
+* developer of this software module and his/her company, the subsequent
+* editors and their companies, and ISO/IEC have no liability for use of this
+* software module or modifications thereof in an implementation. Copyright is
+* not released for non MPEG-4 Video (ISO/IEC 14496-2) standard conforming
+* products.
+*
+* ACTS-MoMuSys partners retain full right to use the code for his/her own
+* purpose, assign or donate the code to a third party and to inhibit third
+* parties from using the code for non MPEG-4 Video (ISO/IEC 14496-2) standard
+* conforming products. This copyright notice must be included in all copies or
+* derivative works.
+*
+* Copyright (c) 1997
+*
+*****************************************************************************/
+
+/***********************************************************HeaderBegin*******
+*
+* File: putvlc.c
+*
+* Author:   Robert Danielsen, Telenor R&D
+* Created:  07.07.96
+*
+* Description: Functions for writing to bitstream
+*
+* Notes:    Same kind of tables as in the MPEG-2 software simulation
+*       group software.
+*
+* Modified:
+*   28.10.96 Robert Danielsen: Added PutCoeff_Intra(), renamed
+*           PutCoeff() to PutCoeff_Inter().
+*   06.11.96 Robert Danielsen: Added PutMCBPC_sep()
+*      01.05.97 Luis Ducla-Soares: added PutCoeff_Intra_RVLC() and
+*                                  PutCoeff_Inter_RVLC().
+*
+***********************************************************HeaderEnd*********/
+
+/************************    INCLUDE FILES    ********************************/
+
+
+#include "mp4lib_int.h"
+#include "mp4enc_lib.h"
+#include "vlc_enc_tab.h"
+#include "bitstream_io.h"
+#include "m4venc_oscl.h"
+#include "vlc_encode_inline.h"
+
+typedef void (*BlockCodeCoeffPtr)(RunLevelBlock*, BitstreamEncVideo*, Int, Int, UChar) ;
+
+const static Int mode_MBtype[] =
+{
+    3,
+    0,
+    4,
+    1,
+    2,
+};
+
+const static Int zigzag_inv[NCOEFF_BLOCK] =
+{
+    0,  1,  8, 16,  9,  2,  3, 10,
+    17, 24, 32, 25, 18, 11,  4,  5,
+    12, 19, 26, 33, 40, 48, 41, 34,
+    27, 20, 13,  6,  7, 14, 21, 28,
+    35, 42, 49, 56, 57, 50, 43, 36,
+    29, 22, 15, 23, 30, 37, 44, 51,
+    58, 59, 52, 45, 38, 31, 39, 46,
+    53, 60, 61, 54, 47, 55, 62, 63
+};
+
+/* Horizontal zigzag inverse */
+const static Int zigzag_h_inv[NCOEFF_BLOCK] =
+{
+    0, 1, 2, 3, 8, 9, 16, 17,
+    10, 11, 4, 5, 6, 7, 15, 14,
+    13, 12, 19, 18, 24, 25, 32, 33,
+    26, 27, 20, 21, 22, 23, 28, 29,
+    30, 31, 34, 35, 40, 41, 48, 49,
+    42, 43, 36, 37, 38, 39, 44, 45,
+    46, 47, 50, 51, 56, 57, 58, 59,
+    52, 53, 54, 55, 60, 61, 62, 63
+};
+
+/* Vertical zigzag inverse */
+const static Int zigzag_v_inv[NCOEFF_BLOCK] =
+{
+    0, 8, 16, 24, 1, 9, 2, 10,
+    17, 25, 32, 40, 48, 56, 57, 49,
+    41, 33, 26, 18, 3, 11, 4, 12,
+    19, 27, 34, 42, 50, 58, 35, 43,
+    51, 59, 20, 28, 5, 13, 6, 14,
+    21, 29, 36, 44, 52, 60, 37, 45,
+    53, 61, 22, 30, 7, 15, 23, 31,
+    38, 46, 54, 62, 39, 47, 55, 63
+};
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
+    Int PutCoeff_Inter(Int run, Int level, BitstreamEncVideo *bitstream);
+    Int PutCoeff_Inter_Last(Int run, Int level, BitstreamEncVideo *bitstream);
+    Int PutCoeff_Intra(Int run, Int level, BitstreamEncVideo *bitstream);
+    Int PutCoeff_Intra_Last(Int run, Int level, BitstreamEncVideo *bitstream);
+    Int PutCBPY(Int cbpy, Char intra, BitstreamEncVideo *bitstream);
+    Int PutMCBPC_Inter(Int cbpc, Int mode, BitstreamEncVideo *bitstream);
+    Int PutMCBPC_Intra(Int cbpc, Int mode, BitstreamEncVideo *bitstream);
+    Int PutMV(Int mvint, BitstreamEncVideo *bitstream);
+    Int PutDCsize_chrom(Int size, BitstreamEncVideo *bitstream);
+    Int PutDCsize_lum(Int size, BitstreamEncVideo *bitstream);
+    Int PutDCsize_lum(Int size, BitstreamEncVideo *bitstream);
+#ifndef NO_RVLC
+    Int PutCoeff_Inter_RVLC(Int run, Int level, BitstreamEncVideo *bitstream);
+    Int PutCoeff_Inter_RVLC_Last(Int run, Int level, BitstreamEncVideo *bitstream);
+    Int PutCoeff_Intra_RVLC(Int run, Int level, BitstreamEncVideo *bitstream);
+    Int PutCoeff_Intra_RVLC_Last(Int run, Int level, BitstreamEncVideo *bitstream);
+#endif
+    Int PutRunCoeff_Inter(Int run, Int level, BitstreamEncVideo *bitstream);
+    Int PutRunCoeff_Inter_Last(Int run, Int level, BitstreamEncVideo *bitstream);
+    Int PutRunCoeff_Intra(Int run, Int level, BitstreamEncVideo *bitstream);
+    Int PutRunCoeff_Intra_Last(Int run, Int level, BitstreamEncVideo *bitstream);
+    Int PutLevelCoeff_Inter(Int run, Int level, BitstreamEncVideo *bitstream);
+    Int PutLevelCoeff_Inter_Last(Int run, Int level, BitstreamEncVideo *bitstream);
+    Int PutLevelCoeff_Intra(Int run, Int level, BitstreamEncVideo *bitstream);
+    Int PutLevelCoeff_Intra_Last(Int run, Int level, BitstreamEncVideo *bitstream);
+
+    void RunLevel(VideoEncData *video, Int intra, Int intraDC_decision, Int ncoefblck[]);
+    Int IntraDC_dpcm(Int val, Int lum, BitstreamEncVideo *bitstream);
+    Void DCACPred(VideoEncData *video, UChar Mode, Int *intraDC_decision, Int intraDCVlcQP);
+    Void find_pmvs(VideoEncData *video, Int block, Int *mvx, Int *mvy);
+    Void  WriteMVcomponent(Int f_code, Int dmv, BitstreamEncVideo *bs);
+    static Bool IntraDCSwitch_Decision(Int Mode, Int intra_dc_vlc_threshold, Int intraDCVlcQP);
+
+    Void ScaleMVD(Int  f_code, Int  diff_vector, Int  *residual, Int  *vlc_code_mag);
+
+#ifdef __cplusplus
+}
+#endif
+
+Int
+PutDCsize_lum(Int size, BitstreamEncVideo *bitstream)
+{
+    Int length;
+
+    if (!(size >= 0 && size < 13))
+        return -1;
+
+    length = DCtab_lum[size].len;
+    if (length)
+        BitstreamPutBits(bitstream, length, DCtab_lum[size].code);
+
+    return length;
+}
+
+Int
+PutDCsize_chrom(Int size, BitstreamEncVideo *bitstream)
+{
+    Int length;
+
+    if (!(size >= 0 && size < 13))
+        return -1;
+    length = DCtab_chrom[size].len;
+    if (length)
+        BitstreamPutBits(bitstream, length, DCtab_chrom[size].code);
+
+    return length;
+}
+
+Int
+PutMV(Int mvint, BitstreamEncVideo *bitstream)
+{
+    Int sign = 0;
+    Int absmv;
+    Int length;
+
+    if (mvint > 32)
+    {
+        absmv = -mvint + 65;
+        sign = 1;
+    }
+    else
+        absmv = mvint;
+
+    length = mvtab[absmv].len;
+    if (length)
+        BitstreamPutBits(bitstream, length, mvtab[absmv].code);
+
+    if (mvint != 0)
+    {
+        BitstreamPut1Bits(bitstream, sign);
+        return (length + 1);
+    }
+    else
+        return length;
+}
+
+Int
+PutMCBPC_Intra(Int cbp, Int mode, BitstreamEncVideo *bitstream)
+{
+    Int ind;
+    Int length;
+
+    ind = ((mode_MBtype[mode] >> 1) & 3) | ((cbp & 3) << 2);
+
+    length = mcbpc_intra_tab[ind].len;
+    if (length)
+        BitstreamPutBits(bitstream, length, mcbpc_intra_tab[ind].code);
+
+    return length;
+}
+
+Int
+PutMCBPC_Inter(Int cbp, Int mode, BitstreamEncVideo *bitstream)
+{
+    Int ind;
+    Int length;
+
+    ind = (mode_MBtype[mode] & 7) | ((cbp & 3) << 3);
+
+    length = mcbpc_inter_tab[ind].len;
+    if (length)
+        BitstreamPutBits(bitstream, length, mcbpc_inter_tab[ind].code);
+
+    return length;
+}
+
+Int
+PutCBPY(Int cbpy, Char intra, BitstreamEncVideo *bitstream)
+{
+    Int ind;
+    Int length;
+
+    if ((intra == 0))
+        cbpy = 15 - cbpy;
+
+    ind = cbpy;
+
+    length = cbpy_tab[ind].len;
+    if (length)
+        BitstreamPutBits(bitstream, length, (UInt)cbpy_tab[ind].code);
+
+    return length;
+}
+
+/* 5/16/01, break up function for last and not-last coefficient */
+/* Note:::: I checked the ARM assembly for if( run > x && run < y) type
+    of code, they do a really good job compiling it to if( (UInt)(run-x) < y-x).
+    No need to hand-code it!!!!!, 6/1/2001 */
+
+Int PutCoeff_Inter(Int run, Int level, BitstreamEncVideo *bitstream)
+{
+    Int length = 0;
+
+    if (run < 2 && level < 13)
+    {
+        length = coeff_tab0[run][level-1].len;
+        if (length)
+            BitstreamPutBits(bitstream, length, (UInt)coeff_tab0[run][level-1].code);
+    }
+    else if (run > 1 && run < 27 && level < 5)
+    {
+        length = coeff_tab1[run-2][level-1].len;
+        if (length)
+            BitstreamPutBits(bitstream, length, (UInt)coeff_tab1[run-2][level-1].code);
+    }
+
+    return length;
+}
+
+Int PutCoeff_Inter_Last(Int run, Int level, BitstreamEncVideo *bitstream)
+{
+    Int length = 0;
+
+    if (run < 2 && level < 4)
+    {
+        length = coeff_tab2[run][level-1].len;
+        if (length)
+            BitstreamPutBits(bitstream, length, (UInt)coeff_tab2[run][level-1].code);
+    }
+    else if (run > 1 && run < 42 && level == 1)
+    {
+        length = coeff_tab3[run-2].len;
+        if (length)
+            BitstreamPutBits(bitstream, length, (UInt)coeff_tab3[run-2].code);
+    }
+
+    return length;
+}
+
+/* 5/16/01, break up function for last and not-last coefficient */
+
+Int PutCoeff_Intra(Int run, Int level, BitstreamEncVideo *bitstream)
+{
+    Int length = 0;
+
+    if (run == 0 && level < 28)
+    {
+        length = coeff_tab4[level-1].len;
+        if (length)
+            BitstreamPutBits(bitstream, length, (UInt)coeff_tab4[level-1].code);
+    }
+    else if (run == 1 && level < 11)
+    {
+        length = coeff_tab5[level-1].len;
+        if (length)
+            BitstreamPutBits(bitstream, length, (UInt)coeff_tab5[level-1].code);
+    }
+    else if (run > 1 && run < 10 && level < 6)
+    {
+        length = coeff_tab6[run-2][level-1].len;
+        if (length)
+            BitstreamPutBits(bitstream, length, (UInt)coeff_tab6[run-2][level-1].code);
+    }
+    else if (run > 9 && run < 15 && level == 1)
+    {
+        length = coeff_tab7[run-10].len;
+        if (length)
+            BitstreamPutBits(bitstream, length, (UInt)coeff_tab7[run-10].code);
+    }
+
+    return length;
+}
+
+Int PutCoeff_Intra_Last(Int run, Int level, BitstreamEncVideo *bitstream)
+{
+    Int length = 0;
+
+    if (run == 0 && level < 9)
+    {
+        length = coeff_tab8[level-1].len;
+        if (length)
+            BitstreamPutBits(bitstream, length, (UInt)coeff_tab8[level-1].code);
+    }
+    else if (run > 0 && run < 7 && level < 4)
+    {
+        length = coeff_tab9[run-1][level-1].len;
+        if (length)
+            BitstreamPutBits(bitstream, length, (UInt)coeff_tab9[run-1][level-1].code);
+    }
+    else if (run > 6 && run < 21 && level == 1)
+    {
+        length = coeff_tab10[run-7].len;
+        if (length)
+            BitstreamPutBits(bitstream, length, (UInt)coeff_tab10[run-7].code);
+    }
+
+    return length;
+}
+
+/* 5/16/01, break up function for last and not-last coefficient */
+#ifndef NO_RVLC
+Int PutCoeff_Inter_RVLC(Int run, Int level, BitstreamEncVideo *bitstream)
+{
+    Int length = 0;
+
+    if (run == 0 && level < 20)
+    {
+        length =  coeff_RVLCtab14[level-1].len;
+        if (length)
+            BitstreamPutBits(bitstream, length, (UInt)coeff_RVLCtab14[level-1].code);
+    }
+    else if (run == 1 && level < 11)
+    {
+        length = coeff_RVLCtab15[level-1].len;
+        if (length)
+            BitstreamPutBits(bitstream, length, (UInt)coeff_RVLCtab15[level-1].code);
+    }
+    else if (run > 1 && run < 4 && level < 8)
+    {
+        length = coeff_RVLCtab16[run-2][level-1].len;
+        if (length)
+            BitstreamPutBits(bitstream, length, (UInt)coeff_RVLCtab16[run-2][level-1].code);
+    }
+    else if (run == 4 && level < 6)
+    {
+        length = coeff_RVLCtab17[level-1].len;
+        if (length)
+            BitstreamPutBits(bitstream, length, (UInt)coeff_RVLCtab17[level-1].code);
+    }
+    else if (run > 4 && run < 8 && level < 5)
+    {
+        length = coeff_RVLCtab18[run-5][level-1].len;
+        if (length)
+            BitstreamPutBits(bitstream, length, (UInt)coeff_RVLCtab18[run-5][level-1].code);
+    }
+    else if (run > 7 && run < 10 && level < 4)
+    {
+        length = coeff_RVLCtab19[run-8][level-1].len;
+        if (length)
+            BitstreamPutBits(bitstream, length, (UInt)coeff_RVLCtab19[run-8][level-1].code);
+    }
+    else if (run > 9 && run < 18 && level < 3)
+    {
+        length = coeff_RVLCtab20[run-10][level-1].len;
+        if (length)
+            BitstreamPutBits(bitstream, length, (UInt)coeff_RVLCtab20[run-10][level-1].code);
+    }
+    else if (run > 17 && run < 39 && level == 1)
+    {
+        length = coeff_RVLCtab21[run-18].len;
+        if (length)
+            BitstreamPutBits(bitstream, length, (UInt)coeff_RVLCtab21[run-18].code);
+    }
+
+    return length;
+}
+
+Int PutCoeff_Inter_RVLC_Last(Int run, Int level, BitstreamEncVideo *bitstream)
+{
+    Int length = 0;
+
+    if (run >= 0 && run < 2 && level < 6)
+    {
+        length = coeff_RVLCtab22[run][level-1].len;
+        if (length)
+            BitstreamPutBits(bitstream, length, (UInt)coeff_RVLCtab22[run][level-1].code);
+    }
+    else if (run == 2 && level < 4)
+    {
+        length = coeff_RVLCtab23[level-1].len;
+        if (length)
+            BitstreamPutBits(bitstream, length, (UInt)coeff_RVLCtab23[level-1].code);
+    }
+    else if (run > 2 && run < 14 && level < 3)
+    {
+        length = coeff_RVLCtab24[run-3][level-1].len;
+        if (length)
+            BitstreamPutBits(bitstream, length, (UInt)coeff_RVLCtab24[run-3][level-1].code);
+    }
+    else if (run > 13 && run < 45 && level == 1)
+    {
+        length = coeff_RVLCtab25[run-14].len;
+        if (length)
+            BitstreamPutBits(bitstream, length, (UInt)coeff_RVLCtab25[run-14].code);
+    }
+
+    return length;
+}
+
+/* 5/16/01, break up function for last and not-last coefficient */
+
+Int PutCoeff_Intra_RVLC(Int run, Int level, BitstreamEncVideo *bitstream)
+{
+    Int length = 0;
+
+    if (run == 0 && level < 28)
+    {
+        length = coeff_RVLCtab1[level-1].len;
+        if (length)
+            BitstreamPutBits(bitstream, length, (UInt)coeff_RVLCtab1[level-1].code);
+    }
+    else if (run == 1 && level < 14)
+    {
+        length = coeff_RVLCtab2[level-1].len;
+        if (length)
+            BitstreamPutBits(bitstream, length, (UInt)coeff_RVLCtab2[level-1].code);
+    }
+    else if (run == 2 && level < 12)
+    {
+        length = coeff_RVLCtab3[level-1].len;
+        if (length)
+            BitstreamPutBits(bitstream, length, (UInt)coeff_RVLCtab3[level-1].code);
+    }
+    else if (run == 3 && level < 10)
+    {
+        length = coeff_RVLCtab4[level-1].len;
+        if (length)
+            BitstreamPutBits(bitstream, length, (UInt)coeff_RVLCtab4[level-1].code);
+    }
+    else if (run > 3 && run < 6 && level < 7)
+    {
+        length = coeff_RVLCtab5[run-4][level-1].len;
+        if (length)
+            BitstreamPutBits(bitstream, length, (UInt)coeff_RVLCtab5[run-4][level-1].code);
+    }
+    else if (run > 5 && run < 8 && level < 6)
+    {
+        length = coeff_RVLCtab6[run-6][level-1].len;
+        if (length)
+            BitstreamPutBits(bitstream, length, (UInt)coeff_RVLCtab6[run-6][level-1].code);
+    }
+    else if (run > 7 && run < 10 && level < 5)
+    {
+        length = coeff_RVLCtab7[run-8][level-1].len;
+        if (length)
+            BitstreamPutBits(bitstream, length, (UInt)coeff_RVLCtab7[run-8][level-1].code);
+
+    }
+    else if (run > 9 && run < 13 && level < 3)
+    {
+        length = coeff_RVLCtab8[run-10][level-1].len;
+        if (length)
+            BitstreamPutBits(bitstream, length, (UInt)coeff_RVLCtab8[run-10][level-1].code);
+    }
+    else if (run > 12 && run < 20 && level == 1)
+    {
+        length = coeff_RVLCtab9[run-13].len;
+        if (length)
+            BitstreamPutBits(bitstream, length, (UInt)coeff_RVLCtab9[run-13].code);
+    }
+    return length;
+}
+
+Int PutCoeff_Intra_RVLC_Last(Int run, Int level, BitstreamEncVideo *bitstream)
+{
+    Int length = 0;
+
+    if (run >= 0 && run < 2 && level < 6)
+    {
+        length = coeff_RVLCtab10[run][level-1].len;
+        if (length)
+            BitstreamPutBits(bitstream, length, (UInt)coeff_RVLCtab10[run][level-1].code);
+    }
+    else if (run == 2 && level < 4)
+    {
+        length = coeff_RVLCtab11[level-1].len;
+        if (length)
+            BitstreamPutBits(bitstream, length, (UInt)coeff_RVLCtab11[level-1].code);
+    }
+    else if (run > 2 && run < 14 && level < 3)
+    {
+        length = coeff_RVLCtab12[run-3][level-1].len;
+        if (length)
+            BitstreamPutBits(bitstream, length, (UInt)coeff_RVLCtab12[run-3][level-1].code);
+    }
+    else if (run > 13 && run < 45 && level == 1)
+    {
+        length = coeff_RVLCtab13[run-14].len;
+        if (length)
+            BitstreamPutBits(bitstream, length, (UInt)coeff_RVLCtab13[run-14].code);
+    }
+    return length;
+}
+#endif
+
+/* The following is for 3-mode VLC */
+
+Int
+PutRunCoeff_Inter(Int run, Int level, BitstreamEncVideo *bitstream)
+{
+    Int length = 0;
+
+    if (run < 2 && level < 13)
+    {
+        length = coeff_tab0[run][level-1].len;
+        if (length)
+        {
+            BitstreamPutGT8Bits(bitstream, 7 + 2, 14/*3*/);
+            //BitstreamPutBits(bitstream, 2, 2);
+            BitstreamPutBits(bitstream, length, (UInt)coeff_tab0[run][level-1].code);
+            length += 9;
+        }
+    }
+    else if (run > 1 && run < 27 && level < 5)
+    {
+        length = coeff_tab1[run-2][level-1].len;
+        if (length)
+        {
+            BitstreamPutGT8Bits(bitstream, 7 + 2, 14/*3*/);
+            //BitstreamPutBits(bitstream, 2, 2);
+            BitstreamPutBits(bitstream, length, (UInt)coeff_tab1[run-2][level-1].code);
+            length += 9;
+        }
+    }
+    return length;
+}
+
+Int PutRunCoeff_Inter_Last(Int run, Int level, BitstreamEncVideo *bitstream)
+{
+    Int length = 0;
+
+    if (run < 2 && level < 4)
+    {
+        length = coeff_tab2[run][level-1].len;
+        if (length)
+        {
+            BitstreamPutGT8Bits(bitstream, 7 + 2, 14/*3*/);
+            //BitstreamPutBits(bitstream, 2, 2);
+            BitstreamPutBits(bitstream, length, (UInt)coeff_tab2[run][level-1].code);
+            length += 9;
+        }
+    }
+    else if (run > 1 && run < 42 && level == 1)
+    {
+        length = coeff_tab3[run-2].len;
+        if (length)
+        {
+            BitstreamPutGT8Bits(bitstream, 7 + 2, 14/*3*/);
+            //BitstreamPutBits(bitstream, 2, 2);
+            BitstreamPutBits(bitstream, length, (UInt)coeff_tab3[run-2].code);
+            length += 9;
+        }
+    }
+    return length;
+}
+
+Int PutRunCoeff_Intra(Int run, Int level, BitstreamEncVideo *bitstream)
+{
+    Int length = 0;
+
+    if (run == 0 && level < 28)
+    {
+        length = coeff_tab4[level-1].len;
+        if (length)
+        {
+            BitstreamPutGT8Bits(bitstream, 7 + 2, 14/*3*/);
+            //BitstreamPutBits(bitstream, 2, 2);
+            BitstreamPutBits(bitstream, length, (UInt)coeff_tab4[level-1].code);
+            length += 9;
+        }
+    }
+    else if (run == 1 && level < 11)
+    {
+        length = coeff_tab5[level-1].len;
+        if (length)
+        {
+            BitstreamPutGT8Bits(bitstream, 7 + 2, 14/*3*/);
+            //BitstreamPutBits(bitstream, 2, 2);
+            BitstreamPutBits(bitstream, length, (UInt)coeff_tab5[level-1].code);
+            length += 9;
+        }
+    }
+    else if (run > 1 && run < 10 && level < 6)
+    {
+        length = coeff_tab6[run-2][level-1].len;
+        if (length)
+        {
+            BitstreamPutGT8Bits(bitstream, 7 + 2, 14/*3*/);
+            //BitstreamPutBits(bitstream, 2, 2);
+            BitstreamPutBits(bitstream, length, (UInt)coeff_tab6[run-2][level-1].code);
+            length += 9;
+        }
+    }
+    else if (run > 9 && run < 15 && level == 1)
+    {
+        length = coeff_tab7[run-10].len;
+        if (length)
+        {
+            BitstreamPutGT8Bits(bitstream, 7 + 2, 14/*3*/);
+            //BitstreamPutBits(bitstream, 2, 2);
+            BitstreamPutBits(bitstream, length, (UInt)coeff_tab7[run-10].code);
+            length += 9;
+        }
+    }
+    return length;
+}
+Int PutRunCoeff_Intra_Last(Int run, Int level, BitstreamEncVideo *bitstream)
+{
+    Int length = 0;
+
+    if (run == 0 && level < 9)
+    {
+        length = coeff_tab8[level-1].len;
+        if (length)
+        {
+            BitstreamPutGT8Bits(bitstream, 7 + 2, 14/*3*/);
+            //BitstreamPutBits(bitstream, 2, 2);
+            BitstreamPutBits(bitstream, length, (UInt)coeff_tab8[level-1].code);
+            length += 9;
+        }
+    }
+    else if (run > 0 && run < 7 && level < 4)
+    {
+        length = coeff_tab9[run-1][level-1].len;
+        if (length)
+        {
+            BitstreamPutGT8Bits(bitstream, 7 + 2, 14/*3*/);
+            //BitstreamPutBits(bitstream, 2, 2);
+            BitstreamPutBits(bitstream, length, (UInt)coeff_tab9[run-1][level-1].code);
+            length += 9;
+        }
+    }
+    else if (run > 6 && run < 21 && level == 1)
+    {
+        length = coeff_tab10[run-7].len;
+        if (length)
+        {
+            BitstreamPutGT8Bits(bitstream, 7 + 2, 14/*3*/);
+            //BitstreamPutBits(bitstream, 2, 2);
+            BitstreamPutBits(bitstream, length, (UInt)coeff_tab10[run-7].code);
+            length += 9;
+        }
+    }
+    return length;
+}
+
+Int
+PutLevelCoeff_Inter(Int run, Int level, BitstreamEncVideo *bitstream)
+{
+    Int length = 0;
+
+    if (run < 2 && level < 13)
+    {
+        length = coeff_tab0[run][level-1].len;
+        if (length)
+        {
+            BitstreamPutBits(bitstream, 7 + 1, 6/*3*/);
+            BitstreamPutBits(bitstream, length, (UInt)coeff_tab0[run][level-1].code);
+            length += 8;
+        }
+    }
+    else if (run > 1 && run < 27 && level < 5)
+    {
+        length = coeff_tab1[run-2][level-1].len;
+        if (length)
+        {
+            BitstreamPutBits(bitstream, 7 + 1, 6/*3*/);
+            BitstreamPutBits(bitstream, length, (UInt)coeff_tab1[run-2][level-1].code);
+            length += 8;
+        }
+    }
+    return length;
+}
+
+Int PutLevelCoeff_Inter_Last(Int run, Int level, BitstreamEncVideo *bitstream)
+{
+    Int length = 0;
+
+    if (run < 2 && level < 4)
+    {
+        length = coeff_tab2[run][level-1].len;
+        if (length)
+        {
+            BitstreamPutBits(bitstream, 7 + 1, 6/*3*/);
+            BitstreamPutBits(bitstream, length, (UInt)coeff_tab2[run][level-1].code);
+            length += 8;
+        }
+    }
+    else if (run > 1 && run < 42 && level == 1)
+    {
+        length = coeff_tab3[run-2].len;
+        if (length)
+        {
+            BitstreamPutBits(bitstream, 7 + 1, 6/*3*/);
+            BitstreamPutBits(bitstream, length, (UInt)coeff_tab3[run-2].code);
+            length += 8;
+        }
+    }
+    return length;
+}
+
+Int PutLevelCoeff_Intra(Int run, Int level, BitstreamEncVideo *bitstream)
+{
+    Int length = 0;
+
+    if (run == 0 && level < 28)
+    {
+        length = coeff_tab4[level-1].len;
+        if (length)
+        {
+            BitstreamPutBits(bitstream, 7 + 1, 6/*3*/);
+            BitstreamPutBits(bitstream, length, (UInt)coeff_tab4[level-1].code);
+            length += 8;
+        }
+    }
+    else if (run == 1 && level < 11)
+    {
+        length = coeff_tab5[level-1].len;
+        if (length)
+        {
+            BitstreamPutBits(bitstream, 7 + 1, 6/*3*/);
+            BitstreamPutBits(bitstream, length, (UInt)coeff_tab5[level-1].code);
+            length += 8;
+        }
+    }
+    else if (run > 1 && run < 10 && level < 6)
+    {
+        length = coeff_tab6[run-2][level-1].len;
+        if (length)
+        {
+            BitstreamPutBits(bitstream, 7 + 1, 6/*3*/);
+            BitstreamPutBits(bitstream, length, (UInt)coeff_tab6[run-2][level-1].code);
+            length += 8;
+        }
+    }
+    else if (run > 9 && run < 15 && level == 1)
+    {
+        length = coeff_tab7[run-10].len;
+        if (length)
+        {
+            BitstreamPutBits(bitstream, 7 + 1, 6/*3*/);
+            BitstreamPutBits(bitstream, length, (UInt)coeff_tab7[run-10].code);
+            length += 8;
+        }
+    }
+    return length;
+}
+Int PutLevelCoeff_Intra_Last(Int run, Int level, BitstreamEncVideo *bitstream)
+{
+    Int length = 0;
+
+    if (run == 0 && level < 9)
+    {
+        length = coeff_tab8[level-1].len;
+        if (length)
+        {
+            BitstreamPutBits(bitstream, 7 + 1, 6/*3*/);
+            BitstreamPutBits(bitstream, length, (UInt)coeff_tab8[level-1].code);
+            length += 8;
+        }
+    }
+    else if (run > 0 && run < 7 && level < 4)
+    {
+        length = coeff_tab9[run-1][level-1].len;
+        if (length)
+        {
+            BitstreamPutBits(bitstream, 7 + 1, 6/*3*/);
+            BitstreamPutBits(bitstream, length, (UInt)coeff_tab9[run-1][level-1].code);
+            length += 8;
+        }
+    }
+    else if (run > 6 && run < 21 && level == 1)
+    {
+        length = coeff_tab10[run-7].len;
+        if (length)
+        {
+            BitstreamPutBits(bitstream, 7 + 1, 6/*3*/);
+            BitstreamPutBits(bitstream, length, (UInt)coeff_tab10[run-7].code);
+            length += 8;
+        }
+    }
+    return length;
+}
+
+
+
+/* ======================================================================== */
+/*  Function : MBVlcEncode()                                                */
+/*  Date     : 09/10/2000                                                   */
+/*  Purpose  : Encode GOV Header                                            */
+/*  In/out   :                                                              */
+/*  Return   :                                                              */
+/*  Modified : 5/21/01, break up into smaller functions                     */
+/* ======================================================================== */
+#ifndef H263_ONLY
+/**************************************/
+/* Data Partitioning I-VOP Encoding   */
+/**************************************/
+
+void MBVlcEncodeDataPar_I_VOP(
+    VideoEncData *video,
+    Int ncoefblck[],
+    void *blkCodePtr)
+{
+
+    BitstreamEncVideo *bs1 = video->bitstream1;
+    BitstreamEncVideo *bs2 = video->bitstream2;
+    BitstreamEncVideo *bs3 = video->bitstream3;
+    int i;
+    UChar Mode = video->headerInfo.Mode[video->mbnum];
+    UChar CBP;
+//  MacroBlock *MB=video->outputMB;
+    Int mbnum = video->mbnum;
+    Int intraDC_decision, DC;
+//  int temp;
+    Int dquant; /* 3/15/01 */
+    RunLevelBlock *RLB = video->RLB;
+    BlockCodeCoeffPtr BlockCodeCoeff = (BlockCodeCoeffPtr) blkCodePtr;
+
+    /* DC and AC Prediction, 5/28/01, compute CBP, intraDC_decision*/
+    DCACPred(video, Mode, &intraDC_decision, video->QP_prev);
+
+    /* CBP, Run, Level, and Sign */
+    RunLevel(video, 1, intraDC_decision, ncoefblck);
+    CBP = video->headerInfo.CBP[mbnum];
+
+    /* Compute DQuant */
+    dquant = video->QPMB[mbnum] - video->QP_prev; /* 3/15/01, QP_prev may not equal QPMB[mbnum-1] if mbnum-1 is skipped*/
+
+    video->QP_prev = video->QPMB[mbnum];
+
+    if (dquant && Mode == MODE_INTRA)
+    {
+        Mode = MODE_INTRA_Q;
+    }
+
+    if (dquant >= 0)
+        dquant = (PV_ABS(dquant) + 1);
+    else
+        dquant = (PV_ABS(dquant) - 1);
+
+    /* FIRST PART: ALL TO BS1 */
+
+    PutMCBPC_Intra(CBP, Mode, bs1); /* MCBPC */
+
+    if (Mode == MODE_INTRA_Q)
+        /*  MAY NEED TO CHANGE DQUANT HERE  */
+        BitstreamPutBits(bs1, 2, dquant);  /* dquant*/
+
+
+    if (intraDC_decision == 0)
+    {
+        for (i = 0; i < 6; i++)
+        {
+            DC = video->RLB[i].level[0];
+            if (video->RLB[i].s[0])
+                DC = -DC;
+            if (i < 4)
+                /*temp =*/ IntraDC_dpcm(DC, 1, bs1);        /* dct_dc_size_luminance, */
+            else                                    /* dct_dc_differential, and */
+                /*temp =*/ IntraDC_dpcm(DC, 0, bs1);        /* marker bit */
+        }
+    }
+
+    /* SECOND PART: ALL TO BS2*/
+
+    BitstreamPut1Bits(bs2, video->acPredFlag[video->mbnum]);    /* ac_pred_flag */
+
+    /*temp=*/
+    PutCBPY(CBP >> 2, (Char)(1), bs2); /* cbpy */
+
+
+    /* THIRD PART:  ALL TO BS3*/
+    /* MB_CodeCoeff(video,bs3); */ /* 5/22/01, replaced with below */
+    for (i = 0; i < 6; i++)
+    {
+        if (CBP&(1 << (5 - i)))
+            (*BlockCodeCoeff)(&(RLB[i]), bs3, 1 - intraDC_decision, ncoefblck[i], Mode);/* Code Intra AC*/
+    }
+
+    return ;
+}
+
+/************************************/
+/* Data Partitioning P-VOP Encoding */
+/************************************/
+
+void MBVlcEncodeDataPar_P_VOP(
+    VideoEncData *video,
+    Int ncoefblck[],
+    void *blkCodePtr)
+{
+
+    BitstreamEncVideo *bs1 = video->bitstream1;
+    BitstreamEncVideo *bs2 = video->bitstream2;
+    BitstreamEncVideo *bs3 = video->bitstream3;
+    int i;
+    Int mbnum = video->mbnum;
+    UChar Mode = video->headerInfo.Mode[mbnum];
+    Int QP_tmp = video->QPMB[mbnum];
+    UChar CBP;
+//  MacroBlock *MB=video->outputMB;
+    Int intra, intraDC_decision, DC;
+    Int pmvx, pmvy;
+//  int temp;
+    Int dquant; /* 3/15/01 */
+    RunLevelBlock *RLB = video->RLB;
+    BlockCodeCoeffPtr BlockCodeCoeff = (BlockCodeCoeffPtr) blkCodePtr;
+
+    intra = (Mode == MODE_INTRA || Mode == MODE_INTRA_Q);
+
+    /* DC and AC Prediction, 5/28/01, compute CBP, intraDC_decision*/
+
+    if (intra)
+    {
+        if (video->usePrevQP)
+        {
+            QP_tmp = video->QPMB[mbnum-1];
+        }
+
+        DCACPred(video, Mode, &intraDC_decision, QP_tmp);
+    }
+    else
+        intraDC_decision = 0; /* used in RunLevel */
+
+    /* CBP, Run, Level, and Sign */
+    RunLevel(video, intra, intraDC_decision, ncoefblck);
+    CBP = video->headerInfo.CBP[mbnum];
+
+    /* Compute DQuant */
+    dquant = video->QPMB[mbnum] - video->QP_prev; /* 3/15/01, QP_prev may not equal QPMB[mbnum-1] if mbnum-1 is skipped*/
+
+    if (dquant && (Mode == MODE_INTRA || Mode == MODE_INTER))
+    {
+        Mode += 2;  /* make it MODE_INTRA_Q and MODE_INTER_Q */
+    }
+
+    if (dquant >= 0)
+        dquant = (PV_ABS(dquant) + 1);
+    else
+        dquant = (PV_ABS(dquant) - 1);
+
+    /* FIRST PART: ALL TO BS1 */
+
+    if (CBP == 0 && intra == 0)  /* Determine if Skipped MB */
+    {
+        if ((Mode == MODE_INTER) && (video->mot[mbnum][0].x == 0) && (video->mot[mbnum][0].y == 0))
+            Mode = video->headerInfo.Mode[video->mbnum] = MODE_SKIPPED;
+        else if ((Mode == MODE_INTER4V) && (video->mot[mbnum][1].x == 0) && (video->mot[mbnum][1].y == 0)
+                 && (video->mot[mbnum][2].x == 0) && (video->mot[mbnum][2].y == 0)
+                 && (video->mot[mbnum][3].x == 0) && (video->mot[mbnum][3].y == 0)
+                 && (video->mot[mbnum][4].x == 0) && (video->mot[mbnum][4].y == 0))
+            Mode = video->headerInfo.Mode[video->mbnum] = MODE_SKIPPED;
+    }
+
+
+    if (Mode == MODE_SKIPPED)
+    {
+        BitstreamPut1Bits(bs1, 1); /* not_coded = 1 */
+        return;
+    }
+    else
+        BitstreamPut1Bits(bs1, 0); /* not_coded =0 */
+
+    video->QP_prev = video->QPMB[mbnum];
+    video->usePrevQP = 1;
+
+    PutMCBPC_Inter(CBP, Mode, bs1); /* MCBPC */
+
+    video->header_bits -= BitstreamGetPos(bs1); /* Header Bits */
+
+    if (Mode == MODE_INTER || Mode == MODE_INTER_Q)
+    {
+        find_pmvs(video, 0, &pmvx, &pmvy); /* Get predicted motion vectors */
+        WriteMVcomponent(video->currVop->fcodeForward, video->mot[mbnum][0].x - pmvx, bs1); /* Write x to bitstream */
+        WriteMVcomponent(video->currVop->fcodeForward, video->mot[mbnum][0].y - pmvy, bs1);     /* Write y to bitstream */
+    }
+    else if (Mode == MODE_INTER4V)
+    {
+        for (i = 1; i < 5; i++)
+        {
+            find_pmvs(video, i, &pmvx, &pmvy);
+            WriteMVcomponent(video->currVop->fcodeForward, video->mot[mbnum][i].x - pmvx, bs1);
+            WriteMVcomponent(video->currVop->fcodeForward, video->mot[mbnum][i].y - pmvy, bs1);
+        }
+    }
+    video->header_bits += BitstreamGetPos(bs1); /* Header Bits */
+
+    /* SECOND PART: ALL TO BS2 */
+
+
+    if (intra)
+    {
+        BitstreamPut1Bits(bs2, video->acPredFlag[video->mbnum]);    /* ac_pred_flag */
+        /*temp=*/
+        PutCBPY(CBP >> 2, (Char)(Mode == MODE_INTRA || Mode == MODE_INTRA_Q), bs2); /* cbpy */
+
+        if (Mode == MODE_INTRA_Q)
+            BitstreamPutBits(bs2, 2, dquant);  /* dquant, 3/15/01*/
+
+        if (intraDC_decision == 0)
+        {
+            for (i = 0; i < 6; i++)
+            {
+                DC = video->RLB[i].level[0];
+                if (video->RLB[i].s[0])
+                    DC = -DC;
+                if (i < 4)
+                    /*temp =*/ IntraDC_dpcm(DC, 1, bs2);        /* dct_dc_size_luminance, */
+                else                                    /* dct_dc_differential, and */
+                    /*temp =*/ IntraDC_dpcm(DC, 0, bs2);        /* marker bit */
+            }
+        }
+
+        /****************************/  /* THIRD PART: ALL TO BS3 */
+        for (i = 0; i < 6; i++)
+        {
+            if (CBP&(1 << (5 - i)))
+                (*BlockCodeCoeff)(&(RLB[i]), bs3, 1 - intraDC_decision, ncoefblck[i], Mode);/* Code Intra AC*/
+        }
+    }
+    else
+    {
+        /*temp=*/
+        PutCBPY(CBP >> 2, (Char)(Mode == MODE_INTRA || Mode == MODE_INTRA_Q), bs2); /* cbpy */
+        if (Mode == MODE_INTER_Q)
+            /*  MAY NEED TO CHANGE DQUANT HERE  */
+            BitstreamPutBits(bs2, 2, dquant);  /* dquant, 3/15/01*/
+
+        /****************************/  /* THIRD PART: ALL TO BS3 */
+        for (i = 0; i < 6; i++)
+        {
+            if (CBP&(1 << (5 - i)))
+                (*BlockCodeCoeff)(&(RLB[i]), bs3, 0, ncoefblck[i], Mode);/* Code Intra AC*/
+        }
+    }
+
+    return ;
+}
+#endif /* H263_ONLY */
+/****************************************************************************************/
+/* Short Header/Combined Mode with or without Error Resilience I-VOP and P-VOP Encoding */
+/* 5/21/01, B-VOP is not implemented yet!!!!                                            */
+/****************************************************************************************/
+
+void MBVlcEncodeCombined_I_VOP(
+    VideoEncData *video,
+    Int ncoefblck[],
+    void *blkCodePtr)
+{
+
+    BitstreamEncVideo *bs1 = video->bitstream1;
+//  BitstreamEncVideo *bs2 = video->bitstream2;
+//  BitstreamEncVideo *bs3 = video->bitstream3;
+    int i;
+    UChar Mode = video->headerInfo.Mode[video->mbnum];
+    UChar CBP = video->headerInfo.CBP[video->mbnum];
+//  MacroBlock *MB=video->outputMB;
+    Int mbnum = video->mbnum;
+    Int intraDC_decision;
+//  int temp;
+    Int dquant; /* 3/15/01 */
+    RunLevelBlock *RLB = video->RLB;
+    Int DC;
+    Int shortVideoHeader = video->vol[video->currLayer]->shortVideoHeader;
+    BlockCodeCoeffPtr BlockCodeCoeff = (BlockCodeCoeffPtr) blkCodePtr;
+
+    /* DC and AC Prediction, 5/28/01, compute CBP, intraDC_decision*/
+
+#ifndef H263_ONLY
+    if (!shortVideoHeader)
+        DCACPred(video, Mode, &intraDC_decision, video->QP_prev);
+    else
+#endif
+    {
+        intraDC_decision = 0;
+    }
+
+    /* CBP, Run, Level, and Sign */
+
+    RunLevel(video, 1, intraDC_decision, ncoefblck);
+    CBP = video->headerInfo.CBP[mbnum];
+
+    /* Compute DQuant */
+    dquant = video->QPMB[mbnum] - video->QP_prev; /* 3/15/01, QP_prev may not equal QPMB[mbnum-1] if mbnum-1 is skipped*/
+
+    video->QP_prev = video->QPMB[mbnum];
+
+    if (dquant && Mode == MODE_INTRA)
+    {
+        Mode = MODE_INTRA_Q;
+    }
+
+    if (dquant >= 0)
+        dquant = (PV_ABS(dquant) + 1);
+    else
+        dquant = (PV_ABS(dquant) - 1);
+
+    PutMCBPC_Intra(CBP, Mode, bs1); /* mcbpc I_VOP */
+
+    if (!video->vol[video->currLayer]->shortVideoHeader)
+    {
+        BitstreamPut1Bits(bs1, video->acPredFlag[video->mbnum]);    /* ac_pred_flag */
+    }
+
+    /*temp=*/
+    PutCBPY(CBP >> 2, (Char)(1), bs1); /* cbpy */
+
+    if (Mode == MODE_INTRA_Q)
+        /*  MAY NEED TO CHANGE DQUANT HERE */
+        BitstreamPutBits(bs1, 2, dquant);  /* dquant, 3/15/01*/
+
+    /*MB_CodeCoeff(video,bs1); 5/21/01, replaced by below */
+    /*******************/
+#ifndef H263_ONLY
+    if (shortVideoHeader) /* Short Header DC coefficients */
+    {
+#endif
+        for (i = 0; i < 6; i++)
+        {
+            DC = RLB[i].level[0];
+            if (RLB[i].s[0])
+                DC = -DC;
+            if (DC != 128)
+                BitstreamPutBits(bs1, 8, DC);   /* intra_dc_size_luminance */
+            else
+                BitstreamPutBits(bs1, 8, 255);          /* intra_dc_size_luminance */
+            if (CBP&(1 << (5 - i)))
+                (*BlockCodeCoeff)(&(RLB[i]), bs1, 1, ncoefblck[i], Mode); /* Code short header Intra AC*/
+        }
+#ifndef H263_ONLY
+    }
+    else if (intraDC_decision == 0)   /* Combined Intra Mode DC and AC coefficients */
+    {
+        for (i = 0; i < 6; i++)
+        {
+            DC = RLB[i].level[0];
+            if (RLB[i].s[0])
+                DC = -DC;
+
+            if (i < 4)
+                /*temp =*/ IntraDC_dpcm(DC, 1, bs1);        /* dct_dc_size_luminance, */
+            else                                                /* dct_dc_differential, and */
+                /*temp =*/ IntraDC_dpcm(DC, 0, bs1);        /* marker bit */
+            if (CBP&(1 << (5 - i)))
+                (*BlockCodeCoeff)(&(RLB[i]), bs1, 1, ncoefblck[i], Mode);/* Code Intra AC */
+        }
+    }
+    else   /* Combined Mode Intra DC/AC coefficients */
+    {
+        for (i = 0; i < 6; i++)
+        {
+            if (CBP&(1 << (5 - i)))
+                (*BlockCodeCoeff)(&(RLB[i]), bs1, 0, ncoefblck[i], Mode);/* Code Intra AC */
+        }
+    }
+#endif
+    /*******************/
+    return ;
+}
+
+void MBVlcEncodeCombined_P_VOP(
+    VideoEncData *video,
+    Int ncoefblck[],
+    void *blkCodePtr)
+{
+
+    BitstreamEncVideo *bs1 = video->bitstream1;
+//  BitstreamEncVideo *bs2 = video->bitstream2;
+//  BitstreamEncVideo *bs3 = video->bitstream3;
+    int i;
+    Int mbnum = video->mbnum;
+    UChar Mode = video->headerInfo.Mode[mbnum];
+    Int QP_tmp = video->QPMB[mbnum];
+    UChar CBP ;
+//  MacroBlock *MB=video->outputMB;
+    Int intra, intraDC_decision;
+    Int pmvx, pmvy;
+//  int temp;
+    Int dquant; /* 3/15/01 */
+    RunLevelBlock *RLB = video->RLB;
+    Int DC;
+    Int shortVideoHeader = video->vol[video->currLayer]->shortVideoHeader;
+    BlockCodeCoeffPtr BlockCodeCoeff = (BlockCodeCoeffPtr) blkCodePtr;
+
+    intra = (Mode == MODE_INTRA || Mode == MODE_INTRA_Q);
+
+    /* DC and AC Prediction, 5/28/01, compute intraDC_decision*/
+#ifndef H263_ONLY
+    if (!shortVideoHeader && intra)
+    {
+        if (video->usePrevQP)
+        {
+            QP_tmp = video->QPMB[mbnum-1];
+        }
+        DCACPred(video, Mode, &intraDC_decision, QP_tmp);
+    }
+    else
+#endif
+        intraDC_decision = 0;
+
+    /* CBP, Run, Level, and Sign */
+
+    RunLevel(video, intra, intraDC_decision, ncoefblck);
+    CBP = video->headerInfo.CBP[mbnum];
+
+    /* Compute DQuant */
+    dquant = video->QPMB[mbnum] - video->QP_prev; /* 3/15/01, QP_prev may not equal QPMB[mbnum-1] if mbnum-1 is skipped*/
+    if (dquant && (Mode == MODE_INTRA || Mode == MODE_INTER))
+    {
+        Mode += 2;  /* make it MODE_INTRA_Q and MODE_INTER_Q */
+    }
+
+    if (dquant >= 0)
+        dquant = (PV_ABS(dquant) + 1);
+    else
+        dquant = (PV_ABS(dquant) - 1);
+
+    if (CBP == 0 && intra == 0)  /* Determine if Skipped MB */
+    {
+        if ((Mode == MODE_INTER) && (video->mot[mbnum][0].x == 0) && (video->mot[mbnum][0].y == 0))
+            Mode = video->headerInfo.Mode[video->mbnum] = MODE_SKIPPED;
+        else if ((Mode == MODE_INTER4V) && (video->mot[mbnum][1].x == 0) && (video->mot[mbnum][1].y == 0)
+                 && (video->mot[mbnum][2].x == 0) && (video->mot[mbnum][2].y == 0)
+                 && (video->mot[mbnum][3].x == 0) && (video->mot[mbnum][3].y == 0)
+                 && (video->mot[mbnum][4].x == 0) && (video->mot[mbnum][4].y == 0))
+            Mode = video->headerInfo.Mode[video->mbnum] = MODE_SKIPPED;
+    }
+
+    if (Mode == MODE_SKIPPED)
+    {
+        BitstreamPut1Bits(bs1, 1); /* not_coded = 1 */
+        return;
+    }
+    else
+        BitstreamPut1Bits(bs1, 0); /* not_coded =0 */
+
+    video->QP_prev = video->QPMB[mbnum];
+    video->usePrevQP = 1;
+
+    PutMCBPC_Inter(CBP, Mode, bs1); /* mcbpc P_VOP */
+
+    if (!video->vol[video->currLayer]->shortVideoHeader && intra)
+    {
+        BitstreamPut1Bits(bs1, video->acPredFlag[video->mbnum]);    /* ac_pred_flag */
+    }
+
+    /*temp=*/
+    PutCBPY(CBP >> 2, (Char)(intra), bs1); /* cbpy */
+
+    if (Mode == MODE_INTRA_Q || Mode == MODE_INTER_Q)
+        /*  MAY NEED TO CHANGE DQUANT HERE  */
+        BitstreamPutBits(bs1, 2, dquant);  /* dquant, 3/15/01*/
+
+    video->header_bits -= BitstreamGetPos(bs1); /* Header Bits */
+
+    if (!((video->vol[video->currLayer]->scalability) && (video->currVop->refSelectCode == 3)))
+    {
+        if (Mode == MODE_INTER || Mode == MODE_INTER_Q)
+        {
+            find_pmvs(video, 0, &pmvx, &pmvy); /* Get predicted motion vectors */
+            WriteMVcomponent(video->currVop->fcodeForward, video->mot[mbnum][0].x - pmvx, bs1); /* Write x to bitstream */
+            WriteMVcomponent(video->currVop->fcodeForward, video->mot[mbnum][0].y - pmvy, bs1);     /* Write y to bitstream */
+        }
+        else if (Mode == MODE_INTER4V)
+        {
+            for (i = 1; i < 5; i++)
+            {
+                find_pmvs(video, i, &pmvx, &pmvy);
+                WriteMVcomponent(video->currVop->fcodeForward, video->mot[mbnum][i].x - pmvx, bs1);
+                WriteMVcomponent(video->currVop->fcodeForward, video->mot[mbnum][i].y - pmvy, bs1);
+            }
+        }
+    }
+    video->header_bits += BitstreamGetPos(bs1); /* Header Bits */
+
+    /* MB_CodeCoeff(video,bs1); */ /* 5/22/01, replaced with below */
+    /****************************/
+    if (intra)
+    {
+#ifndef H263_ONLY
+        if (shortVideoHeader) /* Short Header DC coefficients */
+        {
+#endif
+            for (i = 0; i < 6; i++)
+            {
+                DC = RLB[i].level[0];
+                if (RLB[i].s[0])
+                    DC = -DC;
+                if (DC != 128)
+                    BitstreamPutBits(bs1, 8, DC);   /* intra_dc_size_luminance */
+                else
+                    BitstreamPutBits(bs1, 8, 255);          /* intra_dc_size_luminance */
+                if (CBP&(1 << (5 - i)))
+                    (*BlockCodeCoeff)(&(RLB[i]), bs1, 1, ncoefblck[i], Mode); /* Code short header Intra AC*/
+            }
+#ifndef H263_ONLY
+        }
+        else if (intraDC_decision == 0)   /* Combined Intra Mode DC and AC coefficients */
+        {
+            for (i = 0; i < 6; i++)
+            {
+                DC = RLB[i].level[0];
+                if (RLB[i].s[0])
+                    DC = -DC;
+
+                if (i < 4)
+                    /*temp =*/ IntraDC_dpcm(DC, 1, bs1);        /* dct_dc_size_luminance, */
+                else                                                /* dct_dc_differential, and */
+                    /*temp =*/ IntraDC_dpcm(DC, 0, bs1);        /* marker bit */
+                if (CBP&(1 << (5 - i)))
+                    (*BlockCodeCoeff)(&(RLB[i]), bs1, 1, ncoefblck[i], Mode);/* Code Intra AC */
+            }
+        }
+        else   /* Combined Mode Intra DC/AC coefficients */
+        {
+            for (i = 0; i < 6; i++)
+            {
+                if (CBP&(1 << (5 - i)))
+                    (*BlockCodeCoeff)(&(RLB[i]), bs1, 0, ncoefblck[i], Mode);/* Code Intra AC */
+            }
+        }
+#endif
+    }
+    else   /* Shortheader or Combined INTER Mode AC coefficients */
+    {
+        for (i = 0; i < 6; i++)
+        {
+            if (CBP&(1 << (5 - i)))
+                (*BlockCodeCoeff)(&(RLB[i]), bs1, 0, ncoefblck[i], Mode);/* Code Inter AC*/
+        }
+    }
+    /****************************/
+
+    return ;
+}
+
+/* ======================================================================== */
+/*  Function : BlockCodeCoeff()                                         */
+/*  Date     : 09/18/2000                                                   */
+/*  Purpose  : VLC Encode  AC/DC coeffs                                     */
+/*  In/out   :                                                              */
+/*  Return   :                                                              */
+/*  Modified :  5/16/01  grouping BitstreamPutBits calls                    */
+/*              5/22/01  break up function                              */
+/* ======================================================================== */
+#ifndef NO_RVLC
+/*****************/
+/* RVLC ENCODING */
+/*****************/
+Void BlockCodeCoeff_RVLC(RunLevelBlock *RLB, BitstreamEncVideo *bs, Int j_start, Int j_stop, UChar Mode)
+{
+    int length = 0;
+    int i;
+    Int level;
+    Int run;
+    Int intra = (Mode == MODE_INTRA || Mode == MODE_INTRA_Q);
+
+    /* Not Last Coefficient */
+    for (i = j_start; i < j_stop - 1; i++)
+    {
+        run = RLB->run[i];
+        level = RLB->level[i];
+        //if(i==63||RLB->run[i+1] == -1)    /* Don't Code Last Coefficient Here */
+        //  break;
+        /*ENCODE RUN LENGTH */
+        if (level < 28 && run < 39)
+        {
+            if (intra)
+                length = PutCoeff_Intra_RVLC(run, level, bs);
+            else
+                length = PutCoeff_Inter_RVLC(run, level, bs);
+        }
+        else
+            length = 0;
+        /* ESCAPE CODING */
+        if (length == 0)
+        {
+            BitstreamPutBits(bs, 5 + 1, 2); /* ESCAPE + Not Last Coefficient */
+            //BitstreamPutBits(bs,1,0); /* Not Last Coefficient */
+            BitstreamPutBits(bs, 6 + 1, (run << 1) | 1); /* RUN + MARKER BIT*/
+            //BitstreamPutBits(bs,1,1);  /* MARKER BIT */
+            BitstreamPutGT8Bits(bs, 11, level); /* LEVEL */
+            BitstreamPutBits(bs, 1 + 4, 16); /* MARKER BIT */
+            //BitstreamPutBits(bs,4,0);  /* RVLC TRAILING ESCAPE */
+        }
+        BitstreamPutBits(bs, 1, RLB->s[i]); /* SIGN BIT */
+    }
+    /* Last Coefficient!!! */
+    run = RLB->run[i];
+    level = RLB->level[i];
+
+    /*ENCODE RUN LENGTH */
+    if (level < 6 && run < 45)
+    {
+        if (intra)
+            length = PutCoeff_Intra_RVLC_Last(run, level, bs);
+        else
+            length = PutCoeff_Inter_RVLC_Last(run, level, bs);
+    }
+    else
+        length = 0;
+    /* ESCAPE CODING */
+    if (length == 0)
+    {
+        BitstreamPutBits(bs, 5 + 1, 3); /* ESCAPE CODE + Last Coefficient*/
+        //BitstreamPutBits(bs,1,1); /* Last Coefficient !*/
+        BitstreamPutBits(bs, 6 + 1, (run << 1) | 1); /* RUN + MARKER BIT*/
+        //BitstreamPutBits(bs,1,1);  /* MARKER BIT */
+        BitstreamPutGT8Bits(bs, 11, level); /* LEVEL */
+        BitstreamPutBits(bs, 1 + 4, 16); /* MARKER BIT + RVLC TRAILING ESCAPE */
+        //BitstreamPutBits(bs,4,0);  /* */
+    }
+    BitstreamPut1Bits(bs, RLB->s[i]); /* SIGN BIT */
+
+    return ;
+}
+#endif
+/*******************************/
+/* SHORT VIDEO HEADER ENCODING */
+/*******************************/
+
+Void BlockCodeCoeff_ShortHeader(RunLevelBlock *RLB, BitstreamEncVideo *bs, Int j_start, Int j_stop, UChar Mode)
+{
+    int length = 0;
+    int i;
+//  int temp;
+    Int level;
+    Int run;
+
+    OSCL_UNUSED_ARG(Mode);
+
+    /* Not Last Coefficient */
+    for (i = j_start; i < j_stop - 1; i++)
+    {
+        run = RLB->run[i];
+        level = RLB->level[i];
+//      if(i==63 ||RLB->run[i+1] == -1) /* Don't Code Last Coefficient Here */
+//          break;
+        /*ENCODE RUN LENGTH */
+        if (level < 13)
+        {
+            length = PutCoeff_Inter(run, level, bs);
+            if (length != 0)
+                /*temp =*/ BitstreamPut1Bits(bs, RLB->s[i]); /* Sign Bit */
+        }
+        else
+            length = 0;
+        /* ESCAPE CODING */
+        if (length == 0)
+        {
+            if (RLB->s[i])
+                level = -level;
+            BitstreamPutBits(bs, 7 + 1, 6); /* ESCAPE CODE + Not Last Coefficient */
+            //BitstreamPutBits(bs,1,0); /* Not Last Coefficient */
+            BitstreamPutBits(bs, 6, run); /* RUN */
+            BitstreamPutBits(bs, 8, level&0xFF); /* LEVEL, mask to make sure length 8 */
+        }
+    }
+    /* Last Coefficient!!! */
+    run = RLB->run[i];
+    level = RLB->level[i];
+
+    /*ENCODE RUN LENGTH */
+    if (level < 13)
+    {
+        length = PutCoeff_Inter_Last(run, level, bs);
+        if (length != 0)
+            /*temp =*/ BitstreamPut1Bits(bs, RLB->s[i]); /* Sign Bit */
+    }
+    else
+        length = 0;
+    /* ESCAPE CODING */
+    if (length == 0)
+    {
+        if (RLB->s[i])
+            level = -level;
+        BitstreamPutBits(bs, 7 + 1, 7); /* ESCAPE CODE + Last Coefficient */
+        //BitstreamPutBits(bs,1,1); /* Last Coefficient !!!*/
+        BitstreamPutBits(bs, 6, run); /* RUN */
+        BitstreamPutBits(bs, 8, level&0xFF); /* LEVEL, mask to make sure length 8  */
+    }
+
+    return ;
+
+}
+
+#ifndef H263_ONLY
+/****************/
+/* VLC ENCODING */
+/****************/
+Void BlockCodeCoeff_Normal(RunLevelBlock *RLB, BitstreamEncVideo *bs, Int j_start, Int j_stop, UChar Mode)
+{
+    int length = 0;
+    int i;
+    //int temp;
+    Int level;
+    Int run;
+    Int intra = (Mode == MODE_INTRA || Mode == MODE_INTRA_Q);
+    Int level_minus_max;
+    Int run_minus_max;
+    Int(*PutCoeff)(Int, Int, BitstreamEncVideo *); /* pointer to functions, 5/28/01 */
+
+    /* Not Last Coefficient!!! */
+
+    if (intra)
+        PutCoeff = &PutCoeff_Intra;
+    else
+        PutCoeff = &PutCoeff_Inter;
+
+    for (i = j_start; i < j_stop - 1; i++)
+    {
+        run = RLB->run[i];
+        level = RLB->level[i];
+
+        /* Encode Run Length */
+        if (level < 28)
+        {
+            length = (*PutCoeff)(run, level, bs); /* 5/28/01 replaces above */
+        }
+        else
+        {
+            length = 0;
+        }
+
+        /* First escape mode: LEVEL OFFSET */
+        if (length == 0)
+        {
+            if (intra)
+            {
+                level_minus_max = level - intra_max_level[0][run];
+                if (level_minus_max < 28)
+                    length = PutLevelCoeff_Intra(run, level_minus_max, bs);
+                else
+                    length = 0;
+            }
+            else
+            {
+                level_minus_max = level - inter_max_level[0][run];
+                if (level_minus_max < 13)
+                    length = PutLevelCoeff_Inter(run, level_minus_max, bs);
+                else
+                    length = 0;
+            }
+
+            /* Second escape mode: RUN OFFSET */
+            if (length == 0)
+            {
+                if (level < 28)
+                {
+                    if (intra)
+                    {
+                        run_minus_max = run - (intra_max_run0[level] + 1);
+                        length = PutRunCoeff_Intra(run_minus_max, level, bs);
+                    }
+                    else if (level < 13)
+                    {
+                        run_minus_max = run - (inter_max_run0[level] + 1);
+                        length = PutRunCoeff_Inter(run_minus_max, level, bs);
+                    }
+                    else
+                    {
+                        length = 0;
+                    }
+                }
+                else
+                {
+                    length = 0;
+                }
+
+                /* Third escape mode: FIXED LENGTH CODE */
+                if (length == 0)
+                {
+                    if (RLB->s[i])
+                        level = -level;
+                    /*temp =*/
+                    BitstreamPutBits(bs, 7 + 2 + 1, 30); /* ESCAPE CODE + Followed by 11 + Not Last Coefficient*/
+                    //temp = BitstreamPutBits(bs,2,3); /* Followed by 11 */
+                    //temp = BitstreamPutBits(bs, 1, 0); /* Not Last Coefficient*/
+                    /*temp =*/
+                    BitstreamPutBits(bs, 6 + 1, (run << 1) | 1); /* Encode Run + Marker Bit */
+                    //temp = BitstreamPutBits(bs,1,1); /* Marker Bit */
+                    /*temp =*/
+                    BitstreamPutGT8Bits(bs, 12 + 1, ((level << 1) | 1)&0x1FFF); /* Encode Level, mask to make sure length 12  */
+                    //temp = BitstreamPutBits(bs,1,1); /* Marker Bit */
+                }
+            }
+        }
+
+        /* Encode Sign Bit */
+        if (length != 0)
+            /*temp =*/ BitstreamPut1Bits(bs, RLB->s[i]); /* Sign Bit */
+
+    }
+    /* Last Coefficient */
+    run = RLB->run[i];
+    level = RLB->level[i];
+
+    /* Encode Run Length */
+    if (level < 9)
+    {
+        if (intra)
+        {
+            length = PutCoeff_Intra_Last(run, level, bs);
+        }
+        else if (level < 4)
+        {
+            length = PutCoeff_Inter_Last(run, level, bs);
+        }
+        else
+        {
+            length = 0;
+        }
+    }
+    else
+    {
+        length = 0;
+    }
+
+    /* First escape mode: LEVEL OFFSET */
+    if (length == 0)
+    {
+        if (intra)
+        {
+            level_minus_max = level - intra_max_level[1][run];
+            if (level_minus_max < 9)
+                length = PutLevelCoeff_Intra_Last(run, level_minus_max, bs);
+            else
+                length = 0;
+        }
+        else
+        {
+            level_minus_max = level - inter_max_level[1][run];
+            if (level_minus_max < 4)
+                length = PutLevelCoeff_Inter_Last(run, level_minus_max, bs);
+            else
+                length = 0;
+        }
+        /* Second escape mode: RUN OFFSET */
+        if (length == 0)
+        {
+            if (level < 9)
+            {
+                if (intra)
+                {
+                    run_minus_max = run - (intra_max_run1[level] + 1);
+                    length = PutRunCoeff_Intra_Last(run_minus_max, level, bs);
+                }
+                else if (level < 4)
+                {
+                    run_minus_max = run - (inter_max_run1[level] + 1);
+                    length = PutRunCoeff_Inter_Last(run_minus_max, level, bs);
+                }
+                else
+                {
+                    length = 0;
+                }
+            }
+            else
+            {
+                length = 0;
+            }
+            /* Third escape mode: FIXED LENGTH CODE */
+            if (length == 0)
+            {
+                if (RLB->s[i])
+                    level = -level;
+                /*temp =*/
+                BitstreamPutGT8Bits(bs, 7 + 2 + 1, 31); /* ESCAPE CODE + Followed by 11 + Last Coefficient*/
+                //temp = BitstreamPutBits(bs,2,3); /* Followed by 11 */
+                //temp = BitstreamPutBits(bs, 1, 1); /* Last Coefficient!!!*/
+                /*temp =*/
+                BitstreamPutBits(bs, 6 + 1, (run << 1) | 1); /* Encode Run + Marker Bit */
+                //temp = BitstreamPutBits(bs,1,1); /* Marker Bit */
+                /*temp =*/
+                BitstreamPutGT8Bits(bs, 12 + 1, ((level << 1) | 1)&0x1FFF); /* Encode Level, mask to make sure length 8 */
+                //temp = BitstreamPutBits(bs,1,1); /* Marker Bit */
+            }
+        }
+    }
+
+    /* Encode Sign Bit */
+    if (length != 0)
+        /*temp =*/ BitstreamPut1Bits(bs, RLB->s[i]);
+
+
+    return ;
+}
+
+#endif /* H263_ONLY */
+/* ======================================================================== */
+/*  Function : RUNLevel                                                     */
+/*  Date     : 09/20/2000                                                   */
+/*  Purpose  : Get the Coded Block Pattern for each block                   */
+/*  In/out   :                                                              */
+/*      Int* qcoeff     Quantized DCT coefficients
+        Int Mode        Coding Mode
+        Int ncoeffs     Number of coefficients                              */
+/*  Return   :                                                              */
+/*      Int CBP         Coded Block Pattern                                 */
+/*  Modified :                                                              */
+/* ======================================================================== */
+
+void RunLevel(VideoEncData *video, Int intra, Int intraDC_decision, Int ncoefblck[])
+{
+    Int i, j;
+    Int CBP = video->headerInfo.CBP[video->mbnum];
+    Int ShortNacNintra = (!(video->vol[video->currLayer]->shortVideoHeader) && video->acPredFlag[video->mbnum] && intra);
+    MacroBlock *MB = video->outputMB;
+    Short *dataBlock;
+    Int level;
+    RunLevelBlock *RLB;
+    Int run, idx;
+    Int *zz, nc, zzorder;
+    UChar imask[6] = {0x1F, 0x2F, 0x37, 0x3B, 0x3D, 0x3E};
+    UInt *bitmapzz;
+
+    /* Set Run, Level and CBP for this Macroblock */
+    /* ZZ scan is done here.  */
+
+    if (intra)
+    {
+
+        if (intraDC_decision != 0)
+            intra = 0;              /* DC/AC in Run/Level */
+
+        for (i = 0; i < 6 ; i++)
+        {
+
+            zz = (Int *) zigzag_inv;
+
+            RLB = video->RLB + i;
+
+            dataBlock = MB->block[i];
+
+            if (intra)
+            {
+                RLB->run[0] = 0;
+                level = dataBlock[0];
+                dataBlock[0] = 0; /* reset to zero */
+                if (level < 0)
+                {
+                    RLB->level[0] = -level;
+                    RLB->s[0] = 1;
+                }
+                else
+                {
+                    RLB->level[0] = level;
+                    RLB->s[0] = 0;
+                }
+            }
+
+            idx = intra;
+
+            if ((CBP >> (5 - i)) & 1)
+            {
+                if (ShortNacNintra)
+                {
+                    switch ((video->zz_direction >> (5 - i))&1)
+                    {
+                        case 0:
+                            zz = (Int *)zigzag_v_inv;
+                            break;
+                        case 1:
+                            zz = (Int *)zigzag_h_inv;
+                            break;
+                    }
+                }
+                run = 0;
+                nc = ncoefblck[i];
+                for (j = intra, zz += intra; j < nc; j++, zz++)
+                {
+                    zzorder = *zz;
+                    level = dataBlock[zzorder];
+                    if (level == 0)
+                        run++;
+                    else
+                    {
+                        dataBlock[zzorder] = 0; /* reset output */
+                        if (level < 0)
+                        {
+                            RLB->level[idx] = -level;
+                            RLB->s[idx] = 1;
+                            RLB->run[idx] = run;
+                            run = 0;
+                            idx++;
+                        }
+                        else
+                        {
+                            RLB->level[idx] = level;
+                            RLB->s[idx] = 0;
+                            RLB->run[idx] = run;
+                            run = 0;
+                            idx++;
+                        }
+                    }
+                }
+            }
+
+            ncoefblck[i] = idx; /* 5/22/01, reuse ncoefblck */
+
+            if (idx == intra) /* reset CBP, nothing to be coded */
+                CBP &= imask[i];
+        }
+
+        video->headerInfo.CBP[video->mbnum] = CBP;
+
+        return ;
+    }
+    else
+    {
+//      zz = (Int *) zigzag_inv;  no need to use it, default
+
+        if (CBP)
+        {
+            for (i = 0; i < 6 ; i++)
+            {
+                RLB = video->RLB + i;
+                idx = 0;
+
+                if ((CBP >> (5 - i)) & 1)
+                {   /* 7/30/01 */
+                    /* Use bitmapzz to find the Run,Level,Sign symbols */
+                    bitmapzz = video->bitmapzz[i];
+                    dataBlock = MB->block[i];
+                    nc  = ncoefblck[i];
+
+                    idx = zero_run_search(bitmapzz, dataBlock, RLB, nc);
+                }
+                ncoefblck[i] = idx; /* 5/22/01, reuse ncoefblck */
+                if (idx == 0) /* reset CBP, nothing to be coded */
+                    CBP &= imask[i];
+            }
+            video->headerInfo.CBP[video->mbnum] = CBP;
+        }
+        return ;
+    }
+}
+
+#ifndef H263_ONLY
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+    static Bool IntraDCSwitch_Decision(Int Mode, Int intra_dc_vlc_thr, Int intraDCVlcQP)
+    {
+        Bool switched = FALSE;
+
+        if (Mode == MODE_INTRA || Mode == MODE_INTRA_Q)
+        {
+            if (intra_dc_vlc_thr != 0)
+            {
+                switched = (intra_dc_vlc_thr == 7 || intraDCVlcQP >= intra_dc_vlc_thr * 2 + 11);
+            }
+        }
+
+        return switched;
+    }
+#ifdef __cplusplus
+}
+#endif
+
+Int IntraDC_dpcm(Int val, Int lum, BitstreamEncVideo *bitstream)
+{
+    Int n_bits;
+    Int absval, size = 0;
+
+    absval = (val < 0) ? -val : val;    /* abs(val) */
+
+
+    /* compute dct_dc_size */
+
+    size = 0;
+    while (absval)
+    {
+        absval >>= 1;
+        size++;
+    }
+
+    if (lum)
+    {   /* luminance */
+        n_bits = PutDCsize_lum(size, bitstream);
+    }
+    else
+    {   /* chrominance */
+        n_bits = PutDCsize_chrom(size, bitstream);
+    }
+
+    if (size != 0)
+    {
+        if (val >= 0)
+        {
+            ;
+        }
+        else
+        {
+            absval = -val; /* set to "-val" MW 14-NOV-1996 */
+            val = absval ^((1 << size) - 1);
+        }
+        BitstreamPutBits(bitstream, (size), (UInt)(val));
+        n_bits += size;
+
+        if (size > 8)
+            BitstreamPut1Bits(bitstream, 1);
+    }
+
+    return n_bits;  /* # bits for intra_dc dpcm */
+
+}
+
+/* ======================================================================== */
+/*  Function : DC_AC_PRED                                                   */
+/*  Date     : 09/24/2000                                                   */
+/*  Purpose  : DC and AC encoding of Intra Blocks                           */
+/*  In/out   :                                                              */
+/*      VideoEncData    *video
+        UChar           Mode                                                */
+/*  Return   :                                                              */
+/*                                                                          */
+/* ======================================================================== */
+Int cal_dc_scalerENC(Int QP, Int type) ;
+
+
+#define PREDICT_AC  for (m = 0; m < 7; m++){ \
+                        tmp = DCAC[0]*QPtmp;\
+                        if(tmp<0)   tmp = (tmp-(QP/2))/QP;\
+                        else        tmp = (tmp+(QP/2))/QP;\
+                        pred[m] = tmp;\
+                        DCAC++;\
+                    }
+
+
+Void DCACPred(VideoEncData *video, UChar Mode, Int *intraDC_decision, Int intraDCVlcQP)
+{
+    MacroBlock *MB = video->outputMB;
+    Int mbnum = video->mbnum;
+    typeDCStore *DC_store = video->predDC + mbnum;
+    typeDCACStore *DCAC_row = video->predDCAC_row;
+    typeDCACStore *DCAC_col = video->predDCAC_col;
+    Short   *DCAC;
+    UChar Mode_top, Mode_left;
+
+    Vol *currVol = video->vol[video->currLayer];
+    Int nMBPerRow = currVol->nMBPerRow;
+    Int x_pos = video->outputMB->mb_x; /* 5/28/01 */
+    Int y_pos = video->outputMB->mb_y;
+    UChar QP = video->QPMB[mbnum];
+    UChar *QPMB = video->QPMB;
+    UChar *slice_nb = video->sliceNo;
+    Bool bACPredEnable = video->encParams->ACDCPrediction;
+    Int *ACpred_flag = video->acPredFlag;
+    Int mid_grey = 128 << 3;
+    Int m;
+    Int comp;
+    Int dc_scale = 8, tmp;
+
+    static const Int Xpos[6] = { -1, 0, -1, 0, -1, -1};
+    static const Int Ypos[6] = { -1, -1, 0, 0, -1, -1};
+    static const Int Xtab[6] = {1, 0, 3, 2, 4, 5};
+    static const Int Ytab[6] = {2, 3, 0, 1, 4, 5};
+    static const Int Ztab[6] = {3, 2, 1, 0, 4, 5};
+
+    /* I added these to speed up comparisons */
+    static const Int Pos0[6] = { 1, 1, 0, 0, 1, 1};
+    static const Int Pos1[6] = { 1, 0, 1, 0, 1, 1};
+    static const Int B_Xtab[6] = {0, 1, 0, 1, 2, 3};
+    static const Int B_Ytab[6] = {0, 0, 1, 1, 2, 3};
+
+    Int direction[6];       /* 0: HORIZONTAL, 1: VERTICAL */
+    Int block_A, block_B, block_C;
+    Int grad_hor, grad_ver, DC_pred;
+    Short pred[7], *predptr;
+    Short pcoeff[42];
+    Short *qcoeff;
+    Int S = 0, S1, S2;
+    Int diff, QPtmp;
+    Int newCBP[6];
+    UChar mask1[6] = {0x20, 0x10, 0x8, 0x4, 0x2, 0x1};
+//  UChar mask2[6] = {0x1f,0x2f,0x37,0x3b,0x3d,0x3e};
+
+    Int y_offset, x_offset, x_tab, y_tab, z_tab;    /* speedup coefficients */
+    Int b_xtab, b_ytab;
+
+    video->zz_direction = 0;
+
+    /* Standard MPEG-4 Headers do DC/AC prediction*/
+    /* check whether neighbors are INTER */
+    if (y_pos > 0)
+    {
+        Mode_top = video->headerInfo.Mode[mbnum-nMBPerRow];
+        if (!(Mode_top == MODE_INTRA || Mode_top == MODE_INTRA_Q))
+        {
+            DCAC = DC_store[-nMBPerRow];
+            *DCAC++ = mid_grey;
+            *DCAC++ = mid_grey;
+            *DCAC++ = mid_grey;
+            *DCAC++ = mid_grey;
+            *DCAC++ = mid_grey;
+            *DCAC++ = mid_grey;
+            /* set to 0 DCAC_row[x_pos][0..3] */
+            if (bACPredEnable == TRUE)
+            {
+                M4VENC_MEMSET(DCAC_row[x_pos][0], 0, sizeof(Short) << 5);
+            }
+        }
+    }
+    if (x_pos > 0)
+    {
+        Mode_left = video->headerInfo.Mode[mbnum-1];
+        if (!(Mode_left == MODE_INTRA || Mode_left == MODE_INTRA_Q))
+        {
+            DCAC = DC_store[-1];
+            *DCAC++ = mid_grey;
+            *DCAC++ = mid_grey;
+            *DCAC++ = mid_grey;
+            *DCAC++ = mid_grey;
+            *DCAC++ = mid_grey;
+            *DCAC++ = mid_grey;
+            /* set to 0 DCAC_col[x_pos][0..3] */
+            if (bACPredEnable == TRUE)
+            {
+                M4VENC_MEMSET(DCAC_col[0][0], 0, sizeof(Short) << 5);
+            }
+        }
+    }
+
+    S1 = 0;
+    S2 = 0;
+
+    for (comp = 0; comp < 6; comp++)
+    {
+
+        if (Ypos[comp] != 0)        y_offset = -nMBPerRow;
+        else                    y_offset = 0;
+        x_offset = Xpos[comp];
+        x_tab = Xtab[comp];
+        y_tab = Ytab[comp];
+        z_tab = Ztab[comp];
+
+        b_xtab = B_Xtab[comp];
+        b_ytab = B_Ytab[comp];
+
+        qcoeff = MB->block[comp];
+
+        /****************************/
+        /*  Store DC coefficients */
+        /****************************/
+        /* Store coeff values for Intra MB */
+        if (comp == 0) dc_scale = cal_dc_scalerENC(QP, 1) ;
+        if (comp == 4) dc_scale = cal_dc_scalerENC(QP, 2) ;
+
+        QPtmp = qcoeff[0] * dc_scale; /* DC value */
+
+        if (QPtmp > 2047)   /* 10/10/01, add clipping (bug fixed) */
+            DC_store[0][comp] = 2047;
+        else if (QPtmp < -2048)
+            DC_store[0][comp] = -2048;
+        else
+            DC_store[0][comp] = QPtmp;
+
+        /**************************************************************/
+        /* Find the direction of the prediction and the DC prediction */
+        /**************************************************************/
+
+        if ((x_pos == 0) && y_pos == 0)
+        {   /* top left corner */
+            block_A = (comp == 1 || comp == 3) ? DC_store[0][x_tab] : mid_grey;
+            block_B = (comp == 3) ? DC_store[x_offset][z_tab] : mid_grey;
+            block_C = (comp == 2 || comp == 3) ? DC_store[0][y_tab] : mid_grey;
+        }
+        else if (x_pos == 0)
+        {   /* left edge */
+            block_A = (comp == 1 || comp == 3) ? DC_store[0][x_tab] : mid_grey;
+            block_B = ((comp == 1 && (slice_nb[mbnum] == slice_nb[mbnum-nMBPerRow])) || comp == 3) ?
+                      DC_store[y_offset+x_offset][z_tab] : mid_grey;
+            block_C = (comp == 2 || comp == 3 ||
+                       (Pos0[comp] && (slice_nb[mbnum] == slice_nb[mbnum-nMBPerRow]))) ?
+                      DC_store[y_offset][y_tab] : mid_grey;
+        }
+        else if (y_pos == 0)
+        { /* top row */
+            block_A = (comp == 1 || comp == 3 || (Pos1[comp] && (slice_nb[mbnum] == slice_nb[mbnum-1]))) ?
+                      DC_store[x_offset][x_tab] : mid_grey;
+            block_B = ((comp == 2 && (slice_nb[mbnum] == slice_nb[mbnum-1])) || comp == 3) ?
+                      DC_store[y_offset + x_offset][z_tab] : mid_grey;
+            block_C = (comp == 2 || comp == 3) ?
+                      DC_store[y_offset][y_tab] : mid_grey;
+        }
+        else
+        {
+            block_A = (comp == 1 || comp == 3 || (Pos1[comp] && (slice_nb[mbnum] == slice_nb[mbnum-1]))) ?
+                      DC_store[x_offset][x_tab] : mid_grey;
+            block_B = (((comp == 0 || comp == 4 || comp == 5) &&
+                        (slice_nb[mbnum] == slice_nb[mbnum-1-nMBPerRow])) ||
+                       (comp == 1 && (slice_nb[mbnum] == slice_nb[mbnum-nMBPerRow])) ||
+                       (comp == 2 && (slice_nb[mbnum] == slice_nb[mbnum-1])) || (comp == 3)) ?
+                      (DC_store[y_offset + x_offset][z_tab]) : mid_grey;
+            block_C = (comp == 2 || comp == 3 || (Pos0[comp] && (slice_nb[mbnum] == slice_nb[mbnum-nMBPerRow]))) ?
+                      DC_store[y_offset][y_tab] : mid_grey;
+        }
+        grad_hor = block_B - block_C;
+        grad_ver = block_A - block_B;
+
+        if ((PV_ABS(grad_ver)) < (PV_ABS(grad_hor)))
+        {
+            DC_pred = block_C;
+            direction[comp] = 1;
+            video->zz_direction = (video->zz_direction) | mask1[comp];
+
+        }
+        else
+        {
+            DC_pred = block_A;
+            direction[comp] = 0;
+            //video->zz_direction=video->zz_direction<<1;
+        }
+
+        /* DC prediction */
+        QPtmp = dc_scale; /* 5/28/01 */
+        qcoeff[0] -= (DC_pred + QPtmp / 2) / QPtmp;
+
+
+        if (bACPredEnable)
+        {
+            /***********************/
+            /* Find AC prediction  */
+            /***********************/
+
+            if ((x_pos == 0) && y_pos == 0)     /* top left corner */
+            {
+                if (direction[comp] == 0)
+                {
+                    if (comp == 1 || comp == 3)
+                    {
+                        QPtmp = QPMB[mbnum+x_offset];
+                        DCAC = DCAC_col[0][b_ytab];
+                        if (QPtmp != QP)
+                        {
+                            predptr = pred;
+                            PREDICT_AC
+                        }
+                        else
+                        {
+                            predptr = DCAC;
+                        }
+                    }
+                    else
+                    {
+                        predptr = pred;
+                        pred[0] = pred[1] = pred[2] = pred[3] = pred[4] = pred[5] = pred[6] = 0;
+                    }
+                }
+                else
+                {
+                    if (comp == 2 || comp == 3)
+                    {
+                        QPtmp = QPMB[mbnum+ y_offset];
+                        DCAC = DCAC_row[x_pos][b_xtab];
+                        if (QPtmp != QP)
+                        {
+                            predptr = pred;
+                            PREDICT_AC
+                        }
+                        else
+                        {
+                            predptr = DCAC;
+                        }
+                    }
+                    else
+                    {
+                        predptr = pred;
+                        pred[0] = pred[1] = pred[2] = pred[3] = pred[4] = pred[5] = pred[6] = 0;
+                    }
+                }
+            }
+            else if (x_pos == 0)    /* left edge */
+            {
+                if (direction[comp] == 0)
+                {
+                    if (comp == 1 || comp == 3)
+                    {
+                        QPtmp = QPMB[mbnum+x_offset];
+                        DCAC = DCAC_col[0][b_ytab];
+                        if (QPtmp != QP)
+                        {
+                            predptr = pred;
+                            PREDICT_AC
+                        }
+                        else
+                        {
+                            predptr = DCAC;
+                        }
+                    }
+                    else
+                    {
+                        predptr = pred;
+                        pred[0] = pred[1] = pred[2] = pred[3] = pred[4] = pred[5] = pred[6] = 0;
+                    }
+                }
+                else
+                {
+
+                    if ((Pos0[comp] && (slice_nb[mbnum] == slice_nb[mbnum-nMBPerRow]))
+                            || comp == 2 || comp == 3)
+                    {
+                        QPtmp = QPMB[mbnum+y_offset];
+                        DCAC = DCAC_row[x_pos][b_xtab];
+                        if (QPtmp != QP)
+                        {
+                            predptr = pred;
+                            PREDICT_AC
+                        }
+                        else
+                        {
+                            predptr = DCAC;
+                        }
+                    }
+                    else
+                    {
+                        predptr = pred;
+                        pred[0] = pred[1] = pred[2] = pred[3] = pred[4] = pred[5] = pred[6] = 0;
+                    }
+                }
+            }
+            else if (y_pos == 0)  /* top row */
+            {
+                if (direction[comp] == 0)
+                {
+                    if ((Pos1[comp] && (slice_nb[mbnum] == slice_nb[mbnum-1]))
+                            || comp == 1 || comp == 3)
+                    {
+                        QPtmp = QPMB[mbnum+x_offset];
+                        DCAC = DCAC_col[0][b_ytab];
+                        if (QPtmp != QP)
+                        {
+                            predptr = pred;
+                            PREDICT_AC
+                        }
+                        else
+                        {
+                            predptr = DCAC;
+                        }
+                    }
+                    else
+                    {
+                        predptr = pred;
+                        pred[0] = pred[1] = pred[2] = pred[3] = pred[4] = pred[5] = pred[6] = 0;
+                    }
+                }
+                else
+                {
+                    if (comp == 2 || comp == 3)
+                    {
+                        QPtmp = QPMB[mbnum+y_offset];
+                        DCAC = DCAC_row[x_pos][b_xtab];
+                        if (QPtmp != QP)
+                        {
+                            predptr = pred;
+                            PREDICT_AC
+                        }
+                        else
+                        {
+                            predptr = DCAC;
+                        }
+                    }
+                    else
+                    {
+                        predptr = pred;
+                        pred[0] = pred[1] = pred[2] = pred[3] = pred[4] = pred[5] = pred[6] = 0;
+                    }
+                }
+            }
+            else
+            {
+                if (direction[comp] == 0)
+                {
+                    if ((Pos1[comp] && (slice_nb[mbnum] == slice_nb[mbnum-1]))
+                            || comp == 1 || comp == 3)
+                    {
+                        QPtmp = QPMB[mbnum+x_offset];
+                        DCAC = DCAC_col[0][b_ytab];
+                        if (QPtmp != QP)
+                        {
+                            predptr = pred;
+                            PREDICT_AC
+                        }
+                        else
+                        {
+                            predptr = DCAC;
+                        }
+                    }
+                    else
+                    {
+                        predptr = pred;
+                        pred[0] = pred[1] = pred[2] = pred[3] = pred[4] = pred[5] = pred[6] = 0;
+                    }
+                }
+                else
+                {
+                    if ((Pos0[comp] && (slice_nb[mbnum] == slice_nb[mbnum-nMBPerRow]))
+                            || comp  == 2 || comp == 3)
+                    {
+                        QPtmp = QPMB[mbnum+y_offset];
+                        DCAC = DCAC_row[x_pos][b_xtab];
+                        if (QPtmp != QP)
+                        {
+                            predptr = pred;
+                            PREDICT_AC
+                        }
+                        else
+                        {
+                            predptr = DCAC;
+                        }
+                    }
+                    else
+                    {
+                        predptr = pred;
+                        pred[0] = pred[1] = pred[2] = pred[3] = pred[4] = pred[5] = pred[6] = 0;
+                    }
+                }
+            }
+
+            /************************************/
+            /* Decide and Perform AC prediction */
+            /************************************/
+            newCBP[comp] = 0;
+
+            if (direction[comp] == 0)   /* Horizontal, left COLUMN of block A */
+            {
+                DCAC = pcoeff + comp * 7; /* re-use DCAC as local var */
+                qcoeff += 8;
+                for (m = 0; m < 7; m++)
+                {
+                    QPtmp = qcoeff[m<<3];
+                    if (QPtmp > 0)  S1 += QPtmp;
+                    else        S1 -= QPtmp;
+                    QPtmp -= predptr[m];
+                    DCAC[m] = QPtmp; /* save prediction residue to pcoeff*/
+                    if (QPtmp)  newCBP[comp] = 1;
+                    diff = PV_ABS(QPtmp);
+                    S2 += diff;
+                }
+            }
+            else            /* Vertical, top ROW of block C */
+            {
+                qcoeff++;
+                DCAC = pcoeff + comp * 7; /* re-use DCAC as local var */
+                for (m = 0; m < 7; m++)
+                {
+                    QPtmp = qcoeff[m];
+                    if (QPtmp > 0)  S1 += QPtmp;
+                    else        S1 -= QPtmp;
+                    QPtmp -= predptr[m];
+                    DCAC[m] = QPtmp; /* save prediction residue to pcoeff*/
+                    if (QPtmp)  newCBP[comp] = 1;
+                    diff = PV_ABS(QPtmp);
+                    S2 += diff;
+                }
+            }
+
+            /****************************/
+            /*  Store DCAC coefficients */
+            /****************************/
+            /* Store coeff values for Intra MB */
+            qcoeff = MB->block[comp];
+            DCAC = DCAC_row[x_pos][b_xtab];
+            DCAC[0] = qcoeff[1];
+            DCAC[1] = qcoeff[2];
+            DCAC[2] = qcoeff[3];
+            DCAC[3] = qcoeff[4];
+            DCAC[4] = qcoeff[5];
+            DCAC[5] = qcoeff[6];
+            DCAC[6] = qcoeff[7];
+
+            DCAC = DCAC_col[0][b_ytab];
+            DCAC[0] = qcoeff[8];
+            DCAC[1] = qcoeff[16];
+            DCAC[2] = qcoeff[24];
+            DCAC[3] = qcoeff[32];
+            DCAC[4] = qcoeff[40];
+            DCAC[5] = qcoeff[48];
+            DCAC[6] = qcoeff[56];
+
+
+        } /* bACPredEnable */
+
+    } /* END COMP FOR LOOP */
+
+    //if (diff > 2047)
+    //    break;
+    S += (S1 - S2);
+
+
+    if (S >= 0 && bACPredEnable == TRUE)
+    {
+        ACpred_flag[mbnum] = 1;
+        DCAC = pcoeff; /* prediction residue */
+        qcoeff = MB->block[0];
+
+        for (comp = 0; comp < 6; comp++)
+        {
+            if (direction[comp] == 0)
+            {
+                qcoeff[8] = DCAC[0];
+                qcoeff[16] = DCAC[1];
+                qcoeff[24] = DCAC[2];
+                qcoeff[32] = DCAC[3];
+                qcoeff[40] = DCAC[4];
+                qcoeff[48] = DCAC[5];
+                qcoeff[56] = DCAC[6];
+
+            }
+            else
+            {
+                qcoeff[1] = DCAC[0];
+                qcoeff[2] = DCAC[1];
+                qcoeff[3] = DCAC[2];
+                qcoeff[4] = DCAC[3];
+                qcoeff[5] = DCAC[4];
+                qcoeff[6] = DCAC[5];
+                qcoeff[7] = DCAC[6];
+            }
+            if (newCBP[comp]) /* 5/28/01, update CBP */
+                video->headerInfo.CBP[mbnum] |= mask1[comp];
+            DCAC += 7;
+            qcoeff += 64;
+        }
+    }
+    else  /* Only DC Prediction */
+    {
+        ACpred_flag[mbnum] = 0;
+    }
+
+    *intraDC_decision = IntraDCSwitch_Decision(Mode, video->currVop->intraDCVlcThr, intraDCVlcQP);
+    if (*intraDC_decision) /* code DC with AC , 5/28/01*/
+    {
+        qcoeff = MB->block[0];
+        for (comp = 0; comp < 6; comp++)
+        {
+            if (*qcoeff)
+                video->headerInfo.CBP[mbnum] |= mask1[comp];
+            qcoeff += 64;
+        }
+    }
+    return;
+}
+#endif /* H263_ONLY */
+
+
+
+Void find_pmvs(VideoEncData *video, Int block, Int *mvx, Int *mvy)
+{
+    Vol *currVol = video->vol[video->currLayer];
+//  UChar *Mode = video->headerInfo.Mode; /* modes for MBs */
+    UChar *slice_nb = video->sliceNo;
+    Int nMBPerRow = currVol->nMBPerRow;
+    Int mbnum = video->mbnum;
+
+    Int   p1x, p2x, p3x;
+    Int   p1y, p2y, p3y;
+    Int   xin1, xin2, xin3;
+    Int   yin1, yin2, yin3;
+    Int   vec1, vec2, vec3;
+    Int   rule1, rule2, rule3;
+    MOT   **motdata = video->mot;
+    Int   x = mbnum % nMBPerRow;
+    Int   y = mbnum / nMBPerRow;
+
+    /*
+        In a previous version, a MB vector (block = 0) was predicted the same way
+        as block 1, which is the most likely interpretation of the VM.
+
+        Therefore, if we have advanced pred. mode, and if all MBs around have
+        only one 16x16 vector each, we chose the appropiate block as if these
+        MBs have 4 vectors.
+
+        This different prediction affects only 16x16 vectors of MBs with
+        transparent blocks.
+
+        In the current version, we choose for the 16x16 mode the first
+        non-transparent block in the surrounding MBs
+    */
+
+    switch (block)
+    {
+        case 0:
+            vec1 = 2 ;
+            yin1 = y  ;
+            xin1 = x - 1;
+            vec2 = 3 ;
+            yin2 = y - 1;
+            xin2 = x;
+            vec3 = 3 ;
+            yin3 = y - 1;
+            xin3 = x + 1;
+            break;
+
+        case 1:
+            vec1 = 2 ;
+            yin1 = y  ;
+            xin1 = x - 1;
+            vec2 = 3 ;
+            yin2 = y - 1;
+            xin2 = x;
+            vec3 = 3 ;
+            yin3 = y - 1;
+            xin3 = x + 1;
+            break;
+
+        case 2:
+            vec1 = 1 ;
+            yin1 = y  ;
+            xin1 = x;
+            vec2 = 4 ;
+            yin2 = y - 1;
+            xin2 = x;
+            vec3 = 3 ;
+            yin3 = y - 1;
+            xin3 = x + 1;
+            break;
+
+        case 3:
+            vec1 = 4 ;
+            yin1 = y  ;
+            xin1 = x - 1;
+            vec2 = 1 ;
+            yin2 = y  ;
+            xin2 = x;
+            vec3 = 2 ;
+            yin3 = y  ;
+            xin3 = x;
+            break;
+
+        default: /* case 4 */
+            vec1 = 3 ;
+            yin1 = y  ;
+            xin1 = x;
+            vec2 = 1 ;
+            yin2 = y  ;
+            xin2 = x;
+            vec3 = 2 ;
+            yin3 = y  ;
+            xin3 = x;
+            break;
+    }
+
+    if (block == 0)
+    {
+        /* according to the motion encoding, we must choose a first non-transparent
+        block in the surrounding MBs (16-mode)
+            */
+
+        if (x > 0 && slice_nb[mbnum] == slice_nb[mbnum-1])
+            rule1 = 0;
+        else
+            rule1 = 1;
+
+        if (y > 0 && slice_nb[mbnum] == slice_nb[mbnum-nMBPerRow])
+            rule2 = 0;
+        else
+            rule2 = 1;
+
+        if ((x != nMBPerRow - 1) && (y > 0) && slice_nb[mbnum] == slice_nb[mbnum+1-nMBPerRow])
+            rule3 = 0;
+        else
+            rule3 = 1;
+    }
+    else
+    {
+        /* check borders for single blocks (advanced mode) */
+        /* rule 1 */
+        if (((block == 1 || block == 3) &&
+                (x == 0 || slice_nb[mbnum] != slice_nb[mbnum-1])))
+            rule1 = 1;
+        else
+            rule1 = 0;
+
+        /* rule 2 */
+        if (((block == 1 || block == 2) &&
+                (y == 0 || slice_nb[mbnum] != slice_nb[mbnum-nMBPerRow])))
+            rule2 = 1;
+        else
+            rule2 = 0;
+
+        /* rule 3 */
+        if (((block == 1 || block == 2) &&
+                (x == nMBPerRow - 1 || y == 0 || slice_nb[mbnum] != slice_nb[mbnum+1-nMBPerRow])))
+            rule3 = 1;
+        else
+            rule3 = 0;
+    }
+
+    if (rule1)
+    {
+        p1x = p1y = 0;
+    }
+    else
+    {
+
+        p1x = motdata[yin1*nMBPerRow+xin1][vec1].x;
+        p1y = motdata[yin1*nMBPerRow+xin1][vec1].y;
+        //p1x = motxdata[xin1*2+(vec1&0x1) + (yin1*2+(vec1>>1))*xB];
+        //p1y = motydata[xin1*2+(vec1&0x1) + (yin1*2+(vec1>>1))*xB];
+    }
+
+    if (rule2)
+    {
+        p2x = p2y = 0;
+    }
+    else
+    {
+        p2x = motdata[yin2*nMBPerRow+xin2][vec2].x;
+        p2y = motdata[yin2*nMBPerRow+xin2][vec2].y;
+        //p2x = motxdata[xin2*2+(vec2&0x1) + (yin2*2+(vec2>>1))*xB];
+        //p2y = motydata[xin2*2+(vec2&0x1) + (yin2*2+(vec2>>1))*xB];
+    }
+
+    if (rule3)
+    {
+        p3x = p3y = 0;
+    }
+    else
+    {
+        p3x = motdata[yin3*nMBPerRow+xin3][vec3].x;
+        p3y = motdata[yin3*nMBPerRow+xin3][vec3].y;
+        //p3x = motxdata[xin3*2+ (vec3&0x1) + (yin3*2+(vec3>>1))*xB];
+        //p3y = motydata[xin3*2+ (vec3&0x1) + (yin3*2+(vec3>>1))*xB];
+    }
+
+    if (rule1 && rule2 && rule3)
+    {
+        /* all MBs are outside the VOP */
+        *mvx = *mvy = 0;
+    }
+    else if (rule1 + rule2 + rule3 == 2)
+    {
+        /* two of three are zero */
+        *mvx = (p1x + p2x + p3x);
+        *mvy = (p1y + p2y + p3y);
+    }
+    else
+    {
+        *mvx = ((p1x + p2x + p3x - PV_MAX(p1x, PV_MAX(p2x, p3x)) - PV_MIN(p1x, PV_MIN(p2x, p3x))));
+        *mvy = ((p1y + p2y + p3y - PV_MAX(p1y, PV_MAX(p2y, p3y)) - PV_MIN(p1y, PV_MIN(p2y, p3y))));
+    }
+
+    return;
+}
+
+
+Void WriteMVcomponent(Int f_code, Int dmv, BitstreamEncVideo *bs)
+{
+    Int residual, vlc_code_mag, bits, entry;
+
+    ScaleMVD(f_code, dmv, &residual, &vlc_code_mag);
+
+    if (vlc_code_mag < 0)
+        entry = vlc_code_mag + 65;
+    else
+        entry = vlc_code_mag;
+
+    bits = PutMV(entry, bs);
+
+    if ((f_code != 1) && (vlc_code_mag != 0))
+    {
+        BitstreamPutBits(bs, f_code - 1, residual);
+        bits += f_code - 1;
+    }
+    return;
+}
+
+
+Void
+ScaleMVD(
+    Int  f_code,       /* <-- MV range in 1/2 units: 1=32,2=64,...,7=2048     */
+    Int  diff_vector,  /* <-- MV Difference commponent in 1/2 units           */
+    Int  *residual,    /* --> value to be FLC coded                           */
+    Int  *vlc_code_mag /* --> value to be VLC coded                           */
+)
+{
+    Int   range;
+    Int   scale_factor;
+    Int   r_size;
+    Int   low;
+    Int   high;
+    Int   aux;
+
+    r_size = f_code - 1;
+    scale_factor = 1 << r_size;
+    range = 32 * scale_factor;
+    low   = -range;
+    high  =  range - 1;
+
+    if (diff_vector < low)
+        diff_vector += 2 * range;
+    else if (diff_vector > high)
+        diff_vector -= 2 * range;
+
+    if (diff_vector == 0)
+    {
+        *vlc_code_mag = 0;
+        *residual = 0;
+    }
+    else if (scale_factor == 1)
+    {
+        *vlc_code_mag = diff_vector;
+        *residual = 0;
+    }
+    else
+    {
+        aux = PV_ABS(diff_vector) + scale_factor - 1;
+        *vlc_code_mag = aux >> r_size;
+
+        if (diff_vector < 0)
+            *vlc_code_mag = -*vlc_code_mag;
+        *residual = aux & (scale_factor - 1);
+    }
+}
diff --git a/media/libstagefright/codecs/m4v_h263/enc/src/vlc_encode.h b/media/libstagefright/codecs/m4v_h263/enc/src/vlc_encode.h
new file mode 100644
index 0000000..3721b6b
--- /dev/null
+++ b/media/libstagefright/codecs/m4v_h263/enc/src/vlc_encode.h
@@ -0,0 +1,42 @@
+/* ------------------------------------------------------------------
+ * Copyright (C) 1998-2009 PacketVideo
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
+ * express or implied.
+ * See the License for the specific language governing permissions
+ * and limitations under the License.
+ * -------------------------------------------------------------------
+ */
+#ifndef _VLC_ENCODE_H_
+#define _VLC_ENCODE_H_
+
+#include "mp4def.h"
+#include "mp4enc_api.h"
+
+Int PutCoeff_Inter(Int run, Int level, Int last, BitstreamEncVideo *bitstream);
+Int PutCoeff_Intra(Int run, Int level, Int last, BitstreamEncVideo *bitstream);
+Int PutCBPY(Int cbpy, Char intra, BitstreamEncVideo *bitstream);
+Int PutMCBPC_Inter(Int cbpc, Int mode, BitstreamEncVideo *bitstream);
+Int PutMCBPC_Intra(Int cbpc, Int mode, BitstreamEncVideo *bitstream);
+Int PutMV(Int mvint, BitstreamEncVideo *bitstream);
+Int PutDCsize_chrom(Int size, BitstreamEncVideo *bitstream);
+Int PutDCsize_lum(Int size, BitstreamEncVideo *bitstream);
+Int PutDCsize_lum(Int size, BitstreamEncVideo *bitstream);
+Int PutCoeff_Inter_RVLC(Int run, Int level, Int last, BitstreamEncVideo *bitstream);
+Int PutCoeff_Intra_RVLC(Int run, Int level, Int last, BitstreamEncVideo *bitstream);
+Int PutRunCoeff_Inter(Int run, Int level, Int last, BitstreamEncVideo *bitstream);
+Int PutRunCoeff_Intra(Int run, Int level, Int last, BitstreamEncVideo *bitstream);
+Int PutLevelCoeff_Inter(Int run, Int level, Int last, BitstreamEncVideo *bitstream);
+Int PutLevelCoeff_Intra(Int run, Int level, Int last, BitstreamEncVideo *bitstream);
+
+Void MB_CodeCoeff(VideoEncData *video, BitstreamEncVideo *bs);
+Void BlockCodeCoeff(RunLevelBlock *RLB, BitstreamEncVideo *bs, Int j_start, UChar Mode, Int rvlc, Int shortVideoHeader);
+#endif /* _VLC_ENCODE_H_ */
diff --git a/media/libstagefright/codecs/m4v_h263/enc/src/vlc_encode_inline.h b/media/libstagefright/codecs/m4v_h263/enc/src/vlc_encode_inline.h
new file mode 100644
index 0000000..a2f4934
--- /dev/null
+++ b/media/libstagefright/codecs/m4v_h263/enc/src/vlc_encode_inline.h
@@ -0,0 +1,316 @@
+/* ------------------------------------------------------------------
+ * Copyright (C) 1998-2009 PacketVideo
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
+ * express or implied.
+ * See the License for the specific language governing permissions
+ * and limitations under the License.
+ * -------------------------------------------------------------------
+ */
+#ifndef _VLC_ENCODE_INLINE_H_
+#define _VLC_ENCODE_INLINE_H_
+
+#if !defined(PV_ARM_GCC_V5) && !defined(PV_ARM_GCC_V4)
+
+__inline  Int zero_run_search(UInt *bitmapzz, Short *dataBlock, RunLevelBlock *RLB, Int nc)
+{
+    Int idx, run, level, j;
+    UInt end, match;
+
+    idx = 0;
+    j   = 0;
+    run = 0;
+    match = 1 << 31;
+    if (nc > 32)
+        end = 1;
+    else
+        end = 1 << (32 - nc);
+
+    while (match >= end)
+    {
+        if ((match&bitmapzz[0]) == 0)
+        {
+            run++;
+            j++;
+            match >>= 1;
+        }
+        else
+        {
+            match >>= 1;
+            level = dataBlock[j];
+            dataBlock[j] = 0; /* reset output */
+            j++;
+            if (level < 0)
+            {
+                RLB->level[idx] = -level;
+                RLB->s[idx] = 1;
+                RLB->run[idx] = run;
+                run = 0;
+                idx++;
+            }
+            else
+            {
+                RLB->level[idx] = level;
+                RLB->s[idx] = 0;
+                RLB->run[idx] = run;
+                run = 0;
+                idx++;
+            }
+        }
+    }
+    nc -= 32;
+    if (nc > 0)
+    {
+        match = 1 << 31;
+        end = 1 << (32 - nc);
+        while (match >= end)
+        {
+            if ((match&bitmapzz[1]) == 0)
+            {
+                run++;
+                j++;
+                match >>= 1;
+            }
+            else
+            {
+                match >>= 1;
+                level = dataBlock[j];
+                dataBlock[j] = 0; /* reset output */
+                j++;
+                if (level < 0)
+                {
+                    RLB->level[idx] = -level;
+                    RLB->s[idx] = 1;
+                    RLB->run[idx] = run;
+                    run = 0;
+                    idx++;
+                }
+                else
+                {
+                    RLB->level[idx] = level;
+                    RLB->s[idx] = 0;
+                    RLB->run[idx] = run;
+                    run = 0;
+                    idx++;
+                }
+            }
+        }
+    }
+
+    return idx;
+}
+
+#elif defined(__CC_ARM)  /* only work with arm v5 */
+
+__inline  Int zero_run_search(UInt *bitmapzz, Short *dataBlock, RunLevelBlock *RLB, Int nc)
+{
+    OSCL_UNUSED_ARG(nc);
+    Int idx, run, level, j;
+    UInt end, match;
+    Int  zzorder;
+
+    idx = 0;
+    run = 0;
+    j   = -1;
+    __asm
+    {
+        ldr match, [bitmapzz]
+        clz run, match
+    }
+
+    zzorder = 0;
+
+    while (run < 32)
+    {
+        __asm
+        {
+            mov end, #0x80000000
+            mov end, end, lsr run   /* mask*/
+            bic match, match, end       /* remove it from bitmap */
+            mov run, run, lsl #1  /* 05/09/02 */
+            ldrsh level, [dataBlock, run] /*  load data */
+            strh zzorder, [dataBlock, run] /* reset output */
+            add j, j, #1
+            rsb run, j, run, lsr #1 /* delta run */
+            add j, j, run           /* current position */
+        }
+        if (level < 0)
+        {
+            RLB->level[idx] = -level;
+            RLB->s[idx] = 1;
+            RLB->run[idx] = run;
+            run = 0;
+            idx++;
+        }
+        else
+        {
+            RLB->level[idx] = level;
+            RLB->s[idx] = 0;
+            RLB->run[idx] = run;
+            run = 0;
+            idx++;
+        }
+        __asm
+        {
+            clz run, match
+        }
+    }
+    __asm
+    {
+        ldr match, [bitmapzz, #4]
+        clz run, match
+    }
+
+    while (run < 32)
+    {
+        __asm
+        {
+            mov end, #0x80000000
+            mov end, end, lsr run   /* mask*/
+            bic match, match, end       /* remove it from bitmap */
+            add run, run, #32       /* current position */
+            mov run, run, lsl #1    /* 09/02/05 */
+            ldrsh level, [dataBlock, run] /*  load data */
+            strh  zzorder, [dataBlock, run] /* reset output */
+            add j, j, #1
+            rsb run, j, run, lsr #1     /* delta run */
+            add j, j, run           /* current position */
+        }
+        if (level < 0)
+        {
+            RLB->level[idx] = -level;
+            RLB->s[idx] = 1;
+            RLB->run[idx] = run;
+            run = 0;
+            idx++;
+        }
+        else
+        {
+            RLB->level[idx] = level;
+            RLB->s[idx] = 0;
+            RLB->run[idx] = run;
+            run = 0;
+            idx++;
+        }
+        __asm
+        {
+            clz run, match
+        }
+    }
+
+    return idx;
+}
+
+#elif ( defined(PV_ARM_GCC_V4) || defined(PV_ARM_GCC_V5) ) /* ARM GNU COMPILER  */
+
+__inline Int m4v_enc_clz(UInt temp)
+{
+    register Int rb;
+    register UInt ra = (UInt)temp;
+
+    asm volatile("clz   %0, %1"
+             : "=&r"(rb)
+                         : "r"(ra)
+                        );
+
+    return (rb);
+}
+
+__inline  Int zero_run_search(UInt *bitmapzz, Short *dataBlock, RunLevelBlock *RLB, Int nc)
+{
+    OSCL_UNUSED_ARG(nc);
+    Int idx, run, level = 0, j;
+    UInt end = 0, match;
+    Int  zzorder;
+
+    idx = 0;
+    run = 0;
+    j   = -1;
+    match = *bitmapzz;
+    run = m4v_enc_clz(match);
+
+    zzorder = 0;
+
+    while (run < 32)
+    {
+        asm volatile("mov   %0, #0x80000000\n\t"
+                     "mov   %0, %0, lsr %1\n\t"
+                     "bic   %2, %2, %0\n\t"
+                     "mov   %1, %1, lsl #1\n\t"
+                     "ldrsh %3, [%6, %1]\n\t"
+                     "strh  %5, [%6, %1]\n\t"
+                     "add   %4, %4, #1\n\t"
+                     "rsb   %1, %4, %1, lsr #1\n\t"
+                     "add   %4, %4, %1"
+             : "+r"(end), "+r"(run), "+r"(match), "=r"(level), "+r"(j)
+                             : "r"(zzorder), "r"(dataBlock));
+        if (level < 0)
+        {
+            RLB->level[idx] = -level;
+            RLB->s[idx] = 1;
+            RLB->run[idx] = run;
+            run = 0;
+            idx++;
+        }
+        else
+        {
+            RLB->level[idx] = level;
+            RLB->s[idx] = 0;
+            RLB->run[idx] = run;
+            run = 0;
+            idx++;
+        }
+        run = m4v_enc_clz(match);
+    }
+    match = bitmapzz[1];
+    run = m4v_enc_clz(match);
+
+    while (run < 32)
+    {
+        asm volatile("mov   %0, #0x80000000\n\t"
+                     "mov   %0, %0, lsr %1\n\t"
+                     "bic   %2, %2, %0\n\t"
+                     "add   %1, %1, #32\n\t"
+                     "mov   %1, %1, lsl #1\n\t"
+                     "ldrsh %3, [%6, %1]\n\t"
+                     "strh  %5, [%6, %1]\n\t"
+                     "add   %4, %4, #1\n\t"
+                     "rsb   %1, %4, %1, lsr #1\n\t"
+                     "add   %4, %4, %1"
+             : "+r"(end), "+r"(run), "+r"(match), "+r"(level), "+r"(j)
+                             : "r"(zzorder), "r"(dataBlock));
+        if (level < 0)
+        {
+            RLB->level[idx] = -level;
+            RLB->s[idx] = 1;
+            RLB->run[idx] = run;
+            run = 0;
+            idx++;
+        }
+        else
+        {
+            RLB->level[idx] = level;
+            RLB->s[idx] = 0;
+            RLB->run[idx] = run;
+            run = 0;
+            idx++;
+        }
+        run = m4v_enc_clz(match);
+    }
+
+    return idx;
+}
+
+#endif
+
+#endif // _VLC_ENCODE_INLINE_H_
+
+
diff --git a/media/libstagefright/codecs/m4v_h263/enc/src/vop.cpp b/media/libstagefright/codecs/m4v_h263/enc/src/vop.cpp
new file mode 100644
index 0000000..47076c3
--- /dev/null
+++ b/media/libstagefright/codecs/m4v_h263/enc/src/vop.cpp
@@ -0,0 +1,581 @@
+/* ------------------------------------------------------------------
+ * Copyright (C) 1998-2009 PacketVideo
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
+ * express or implied.
+ * See the License for the specific language governing permissions
+ * and limitations under the License.
+ * -------------------------------------------------------------------
+ */
+#include "mp4def.h"
+#include "mp4lib_int.h"
+#include "mp4enc_lib.h"
+#include "bitstream_io.h"
+#include "m4venc_oscl.h"
+
+PV_STATUS EncodeShortHeader(BitstreamEncVideo *stream, Vop *currVop);
+PV_STATUS EncodeVOPHeader(BitstreamEncVideo *stream, Vol *currVol, Vop *currVop);
+PV_STATUS EncodeGOVHeader(BitstreamEncVideo *stream, UInt seconds);
+
+PV_STATUS EncodeVop_BXRC(VideoEncData *video);
+PV_STATUS EncodeVop_NoME(VideoEncData *video);
+
+/* ======================================================================== */
+/*  Function : DecodeVop()                                                  */
+/*  Date     : 08/23/2000                                                   */
+/*  Purpose  : Encode VOP Header                                            */
+/*  In/out   :                                                              */
+/*  Return   :                                                              */
+/*  Modified :                                                              */
+/* ======================================================================== */
+PV_STATUS EncodeVop(VideoEncData *video)
+{
+
+    PV_STATUS status;
+    Int currLayer = video->currLayer;
+    Vol *currVol = video->vol[currLayer];
+    Vop *currVop = video->currVop;
+//  BitstreamEncVideo *stream=video->bitstream1;
+    UChar *Mode = video->headerInfo.Mode;
+    rateControl **rc = video->rc;
+//  UInt time=0;
+
+    /*******************/
+    /* Initialize mode */
+    /*******************/
+
+    switch (currVop->predictionType)
+    {
+        case I_VOP:
+            M4VENC_MEMSET(Mode, MODE_INTRA, sizeof(UChar)*currVol->nTotalMB);
+            break;
+        case P_VOP:
+            M4VENC_MEMSET(Mode, MODE_INTER, sizeof(UChar)*currVol->nTotalMB);
+            break;
+        case B_VOP:
+            /*M4VENC_MEMSET(Mode, MODE_INTER_B,sizeof(UChar)*nTotalMB);*/
+            return PV_FAIL;
+        default:
+            return PV_FAIL;
+    }
+
+    /*********************/
+    /* Motion Estimation */
+    /* compute MVs, scene change detection, edge padding, */
+    /* intra refresh, compute block activity */
+    /*********************/
+    MotionEstimation(video);    /* do ME for the whole frame */
+
+    /***************************/
+    /* rate Control (assign QP) */
+    /* 4/11/01, clean-up, and put into a separate function */
+    /***************************/
+    status = RC_VopQPSetting(video, rc);
+    if (status == PV_FAIL)
+        return PV_FAIL;
+
+    /**********************/
+    /*     Encode VOP     */
+    /**********************/
+    if (video->slice_coding) /* end here */
+    {
+        /* initialize state variable for slice-based APIs */
+        video->totalSAD = 0;
+        video->mbnum = 0;
+        video->sliceNo[0] = 0;
+        video->numIntra = 0;
+        video->offset = 0;
+        video->end_of_buf = 0;
+        video->hp_guess = -1;
+        return status;
+    }
+
+    status = EncodeVop_NoME(video);
+
+    /******************************/
+    /* rate control (update stat) */
+    /* 6/2/01 separate function */
+    /******************************/
+
+    RC_VopUpdateStat(video, rc[currLayer]);
+
+    return status;
+}
+
+/* ======================================================================== */
+/*  Function : EncodeVop_NoME()                                             */
+/*  Date     : 08/28/2001                                                   */
+/*  History  :                                                              */
+/*  Purpose  : EncodeVop without motion est.                                */
+/*  In/out   :                                                              */
+/*  Return   :                                                              */
+/*  Modified :                                                              */
+/*                                                                          */
+/* ======================================================================== */
+
+PV_STATUS EncodeVop_NoME(VideoEncData *video)
+{
+    Vop *currVop = video->currVop;
+    Vol *currVol = video->vol[video->currLayer];
+    BitstreamEncVideo *stream = video->bitstream1;
+    Int time = 0;   /* follows EncodeVop value */
+    PV_STATUS status = PV_SUCCESS;
+
+    if (currVol->shortVideoHeader) /* Short Video Header = 1 */
+    {
+
+        status = EncodeShortHeader(stream, currVop); /* Encode Short Header */
+
+        video->header_bits = BitstreamGetPos(stream); /* Header Bits */
+
+        status = EncodeFrameCombinedMode(video);
+
+    }
+#ifndef H263_ONLY
+    else    /* Short Video Header = 0 */
+    {
+
+        if (currVol->GOVStart && currVop->predictionType == I_VOP)
+            status = EncodeGOVHeader(stream, time); /* Encode GOV Header */
+
+        status = EncodeVOPHeader(stream, currVol, currVop);  /* Encode VOP Header */
+
+        video->header_bits = BitstreamGetPos(stream); /* Header Bits */
+
+        if (currVop->vopCoded)
+        {
+            if (!currVol->scalability)
+            {
+                if (currVol->dataPartitioning)
+                {
+                    status = EncodeFrameDataPartMode(video); /* Encode Data Partitioning Mode VOP */
+                }
+                else
+                {
+                    status = EncodeFrameCombinedMode(video); /* Encode Combined Mode VOP */
+                }
+            }
+            else
+                status = EncodeFrameCombinedMode(video); /* Encode Combined Mode VOP */
+        }
+        else  /* Vop Not coded */
+        {
+
+            return status;
+        }
+    }
+#endif /* H263_ONLY */
+    return status;
+
+}
+
+#ifndef NO_SLICE_ENCODE
+/* ======================================================================== */
+/*  Function : EncodeSlice()                                                */
+/*  Date     : 04/19/2002                                                   */
+/*  History  :                                                              */
+/*  Purpose  : Encode one slice.                                            */
+/*  In/out   :                                                              */
+/*  Return   :                                                              */
+/*  Modified :                                                              */
+/*                                                                          */
+/* ======================================================================== */
+
+PV_STATUS EncodeSlice(VideoEncData *video)
+{
+    Vop *currVop = video->currVop;
+    Int currLayer = video->currLayer;
+    Vol *currVol = video->vol[currLayer];
+    BitstreamEncVideo *stream = video->bitstream1; /* different from frame-based */
+    Int time = 0;   /* follows EncodeVop value */
+    PV_STATUS status = PV_SUCCESS;
+    rateControl **rc = video->rc;
+
+    if (currVol->shortVideoHeader) /* Short Video Header = 1 */
+    {
+
+        if (video->mbnum == 0)
+        {
+            status = EncodeShortHeader(stream, currVop); /* Encode Short Header */
+
+            video->header_bits = BitstreamGetPos(stream); /* Header Bits */
+        }
+
+        status = EncodeSliceCombinedMode(video);
+
+    }
+#ifndef H263_ONLY
+    else    /* Short Video Header = 0 */
+    {
+
+        if (video->mbnum == 0)
+        {
+            if (currVol->GOVStart)
+                status = EncodeGOVHeader(stream, time); /* Encode GOV Header */
+
+            status = EncodeVOPHeader(stream, currVol, currVop);  /* Encode VOP Header */
+
+            video->header_bits = BitstreamGetPos(stream); /* Header Bits */
+        }
+
+        if (currVop->vopCoded)
+        {
+            if (!currVol->scalability)
+            {
+                if (currVol->dataPartitioning)
+                {
+                    status = EncodeSliceDataPartMode(video); /* Encode Data Partitioning Mode VOP */
+                }
+                else
+                {
+                    status = EncodeSliceCombinedMode(video); /* Encode Combined Mode VOP */
+                }
+            }
+            else
+                status = EncodeSliceCombinedMode(video); /* Encode Combined Mode VOP */
+        }
+        else  /* Vop Not coded */
+        {
+
+            return status;
+        }
+    }
+#endif /* H263_ONLY */
+    if (video->mbnum >= currVol->nTotalMB && status != PV_END_OF_BUF) /* end of Vop */
+    {
+        /******************************/
+        /* rate control (update stat) */
+        /* 6/2/01 separate function */
+        /******************************/
+
+        status = RC_VopUpdateStat(video, rc[currLayer]);
+    }
+
+    return status;
+
+}
+#endif /* NO_SLICE_ENCODE */
+
+#ifndef H263_ONLY
+/* ======================================================================== */
+/*  Function : EncodeGOVHeader()                                            */
+/*  Date     : 08/23/2000                                                   */
+/*  Purpose  : Encode GOV Header                                            */
+/*  In/out   :                                                              */
+/*  Return   :                                                              */
+/*  Modified :                                                              */
+/* ======================================================================== */
+PV_STATUS EncodeGOVHeader(BitstreamEncVideo *stream, UInt seconds)
+{
+    PV_STATUS status;
+//  int temp;
+    UInt tmpvar;
+
+    /********************************/
+    /* Group_of_VideoObjectPlane()  */
+    /********************************/
+
+    status = BitstreamPutGT16Bits(stream, 32, GROUP_START_CODE);
+    /* time_code */
+    tmpvar = seconds / 3600;
+    status = BitstreamPutBits(stream, 5, tmpvar); /* Hours*/
+
+    tmpvar = (seconds - tmpvar * 3600) / 60;
+    status = BitstreamPutBits(stream, 6, tmpvar); /* Minutes*/
+
+    status = BitstreamPut1Bits(stream, 1); /* Marker*/
+
+    tmpvar = seconds % 60;
+    status = BitstreamPutBits(stream, 6, tmpvar); /* Seconds*/
+
+    status = BitstreamPut1Bits(stream, 1); /* closed_gov */
+    status = BitstreamPut1Bits(stream, 0); /* broken_link */
+    /*temp =*/
+    BitstreamMpeg4ByteAlignStuffing(stream); /* Byte align GOV Header */
+
+    return status;
+}
+
+#ifdef ALLOW_VOP_NOT_CODED
+
+PV_STATUS EncodeVopNotCoded(VideoEncData *video, UChar *bstream, Int *size, ULong modTime)
+{
+    PV_STATUS status;
+    Vol *currVol = video->vol[0];
+    Vop *currVop = video->currVop;
+    BitstreamEncVideo *stream = currVol->stream;
+    UInt frameTick;
+    Int timeInc;
+
+    stream->bitstreamBuffer = bstream;
+    stream->bufferSize = *size;
+    BitstreamEncReset(stream);
+
+    status = BitstreamPutGT16Bits(stream, 32, VOP_START_CODE); /*Start Code for VOP*/
+    status = BitstreamPutBits(stream, 2, P_VOP);/* VOP Coding Type*/
+
+    frameTick = (Int)(((double)(modTime - video->modTimeRef) * currVol->timeIncrementResolution + 500) / 1000);
+    timeInc = frameTick - video->refTick[0];
+    while (timeInc >= currVol->timeIncrementResolution)
+    {
+        timeInc -= currVol->timeIncrementResolution;
+        status = BitstreamPut1Bits(stream, 1);
+        /* do not update refTick and modTimeRef yet, do it after encoding!! */
+    }
+    status = BitstreamPut1Bits(stream, 0);
+    status = BitstreamPut1Bits(stream, 1); /* marker bit */
+    status = BitstreamPutBits(stream, currVol->nbitsTimeIncRes, timeInc); /* vop_time_increment */
+    status = BitstreamPut1Bits(stream, 1); /* marker bit */
+    status = BitstreamPut1Bits(stream, 0); /* vop_coded bit */
+    BitstreamMpeg4ByteAlignStuffing(stream);
+
+    return status;
+}
+#endif
+
+/* ======================================================================== */
+/*  Function : EncodeVOPHeader()                                            */
+/*  Date     : 08/23/2000                                                   */
+/*  Purpose  : Encode VOP Header                                            */
+/*  In/out   :                                                              */
+/*  Return   :                                                              */
+/*  Modified :                                                              */
+/* ======================================================================== */
+
+PV_STATUS EncodeVOPHeader(BitstreamEncVideo *stream, Vol *currVol, Vop *currVop)
+{
+    PV_STATUS status;
+    //int temp;
+
+    int MTB = currVol->moduloTimeBase;
+    /************************/
+    /* VideoObjectPlane()   */
+    /************************/
+
+    status = BitstreamPutGT16Bits(stream, 32, VOP_START_CODE); /*Start Code for VOP*/
+    status = BitstreamPutBits(stream, 2, currVop->predictionType);/* VOP Coding Type*/
+
+    currVol->prevModuloTimeBase = currVol->moduloTimeBase;
+
+    while (MTB)
+    {
+        status = BitstreamPut1Bits(stream, 1);
+        MTB--;
+    }
+    status = BitstreamPut1Bits(stream, 0);
+
+    status = BitstreamPut1Bits(stream, 1); /* marker bit */
+    status = BitstreamPutBits(stream, currVol->nbitsTimeIncRes, currVop->timeInc); /* vop_time_increment */
+    status = BitstreamPut1Bits(stream, 1); /* marker bit */
+    status = BitstreamPut1Bits(stream, currVop->vopCoded); /* vop_coded bit */
+    if (currVop->vopCoded == 0)
+    {
+        /*temp =*/
+        BitstreamMpeg4ByteAlignStuffing(stream); /* Byte align VOP Header */
+        return status;
+    }
+    if (currVop->predictionType == P_VOP)
+        status = BitstreamPut1Bits(stream, currVop->roundingType); /* vop_rounding_type */
+
+    status = BitstreamPutBits(stream, 3, currVop->intraDCVlcThr); /* intra_dc_vlc_thr */
+    status = BitstreamPutBits(stream, 5, currVop->quantizer);   /* vop_quant */
+
+    if (currVop->predictionType != I_VOP)
+        status = BitstreamPutBits(stream, 3, currVop->fcodeForward); /* vop_fcode_forward */
+    if (currVop->predictionType == B_VOP)
+        status = BitstreamPutBits(stream, 3, currVop->fcodeBackward);/* vop_fcode_backward */
+
+    if (currVol->scalability)
+        /* enhancement_type = 0 */
+        status = BitstreamPutBits(stream, 2, currVop->refSelectCode); /* ref_select_code */
+
+    return status;
+}
+#endif /* H263_ONLY */
+/* ======================================================================== */
+/*  Function : EncodeShortHeader()                                          */
+/*  Date     : 08/23/2000                                                   */
+/*  Purpose  : Encode VOP Header                                            */
+/*  In/out   :                                                              */
+/*  Return   :                                                              */
+/*  Modified :                                                              */
+/* ======================================================================== */
+
+PV_STATUS EncodeShortHeader(BitstreamEncVideo *stream, Vop *currVop)
+{
+
+    PV_STATUS status;
+
+    status = BitstreamPutGT16Bits(stream, 22, SHORT_VIDEO_START_MARKER); /* Short_video_start_marker */
+    status = BitstreamPutBits(stream, 8, currVop->temporalRef); /* temporal_reference */
+    status = BitstreamPut1Bits(stream, 1); /* marker bit */
+    status = BitstreamPut1Bits(stream, 0); /* zero bit */
+    status = BitstreamPut1Bits(stream, 0); /* split_screen_indicator=0*/
+    status = BitstreamPut1Bits(stream, 0); /* document_camera_indicator=0*/
+    status = BitstreamPut1Bits(stream, 0); /* full_picture_freeze_release=0*/
+
+    switch (currVop->width)
+    {
+        case 128:
+            if (currVop->height == 96)
+                status = BitstreamPutBits(stream, 3, 1); /* source_format = 1 */
+            else
+            {
+                status = PV_FAIL;
+                return status;
+            }
+            break;
+
+        case 176:
+            if (currVop->height == 144)
+                status = BitstreamPutBits(stream, 3, 2); /* source_format = 2 */
+            else
+            {
+                status = PV_FAIL;
+                return status;
+            }
+            break;
+
+        case 352:
+            if (currVop->height == 288)
+                status = BitstreamPutBits(stream, 3, 3); /* source_format = 3 */
+            else
+            {
+                status = PV_FAIL;
+                return status;
+            }
+            break;
+
+        case 704:
+            if (currVop->height == 576)
+                status = BitstreamPutBits(stream, 3, 4); /* source_format = 4 */
+            else
+            {
+                status = PV_FAIL;
+                return status;
+            }
+            break;
+
+        case 1408:
+            if (currVop->height == 1152)
+                status = BitstreamPutBits(stream, 3, 5); /* source_format = 5 */
+            else
+            {
+                status = PV_FAIL;
+                return status;
+            }
+            break;
+
+        default:
+            status = PV_FAIL;
+            return status;
+    }
+
+
+    status = BitstreamPut1Bits(stream, currVop->predictionType); /* picture_coding type */
+    status = BitstreamPutBits(stream, 4, 0); /* four_reserved_zero_bits */
+    status = BitstreamPutBits(stream, 5, currVop->quantizer); /* vop_quant*/
+    status = BitstreamPut1Bits(stream, 0); /* zero_bit*/
+    status = BitstreamPut1Bits(stream, 0); /* pei=0 */
+
+    return status;
+}
+
+#ifndef H263_ONLY
+/* ======================================================================== */
+/*  Function : EncodeVideoPacketHeader()                                    */
+/*  Date     : 09/05/2000                                                   */
+/*  History  :                                                              */
+/*  Purpose  : Encode a frame of MPEG4 bitstream in Combined mode.          */
+/*  In/out   :                                                              */
+/*  Return   :                                                              */
+/*  Modified : 04/25/2002                               */
+/*             Add bitstream structure as input argument                    */
+/*                                                                          */
+/* ======================================================================== */
+PV_STATUS EncodeVideoPacketHeader(VideoEncData *video, int MB_number,
+                                  int quant_scale, Int insert)
+{
+//  PV_STATUS status=PV_SUCCESS;
+    int fcode;
+    Vop *currVop = video->currVop;
+    Vol *currVol = video->vol[video->currLayer];
+    BitstreamEncVideo *bs, tmp;
+    UChar buffer[30];
+
+    if (insert) /* insert packet header to the beginning of bs1 */
+    {
+        tmp.bitstreamBuffer = buffer; /* use temporary buffer */
+        tmp.bufferSize = 30;
+        BitstreamEncReset(&tmp);
+        bs = &tmp;
+    }
+    else
+        bs = video->bitstream1;
+
+
+    if (currVop->predictionType == I_VOP)
+        BitstreamPutGT16Bits(bs, 17, 1);    /* resync_marker I_VOP */
+    else if (currVop->predictionType == P_VOP)
+    {
+        fcode = currVop->fcodeForward;
+        BitstreamPutGT16Bits(bs, 16 + fcode, 1);    /* resync_marker P_VOP */
+
+    }
+    else
+    {
+        fcode = currVop->fcodeForward;
+        if (currVop->fcodeBackward > fcode)
+            fcode = currVop->fcodeBackward;
+        BitstreamPutGT16Bits(bs, 16 + fcode, 1);    /* resync_marker B_VOP */
+    }
+
+    BitstreamPutBits(bs, currVol->nBitsForMBID, MB_number); /* resync_marker */
+    BitstreamPutBits(bs, 5, quant_scale); /* quant_scale */
+    BitstreamPut1Bits(bs, 0); /* header_extension_code = 0 */
+
+    if (0) /* header_extension_code = 1 */
+    {
+        /* NEED modulo_time_base code here ... default 0x01  belo*/
+        /*status =*/
+        BitstreamPut1Bits(bs, 1);
+        /*status = */
+        BitstreamPut1Bits(bs, 0);
+
+        /*status = */
+        BitstreamPut1Bits(bs, 1); /* marker bit */
+        /*status = */
+        BitstreamPutBits(bs, currVol->nbitsTimeIncRes, currVop->timeInc); /* vop_time_increment */
+        /*status = */
+        BitstreamPut1Bits(bs, 1); /* marker bit */
+
+        /*status = */
+        BitstreamPutBits(bs, 2, currVop->predictionType);/* VOP Coding Type*/
+
+        /*status = */
+        BitstreamPutBits(bs, 3, currVop->intraDCVlcThr); /* intra_dc_vlc_thr */
+
+        if (currVop->predictionType != I_VOP)
+            /*status = */ BitstreamPutBits(bs, 3, currVop->fcodeForward);
+        if (currVop->predictionType == B_VOP)
+            /*status = */ BitstreamPutBits(bs, 3, currVop->fcodeBackward);
+    }
+#ifndef NO_SLICE_ENCODE
+    if (insert)
+        BitstreamPrependPacket(video->bitstream1, bs);
+#endif
+    return PV_SUCCESS;
+}
+
+#endif /* H263_ONLY */
+
+
+
diff --git a/media/libstagefright/codecs/mp3dec/MP3Decoder.cpp b/media/libstagefright/codecs/mp3dec/MP3Decoder.cpp
index efcb476..f40bd11 100644
--- a/media/libstagefright/codecs/mp3dec/MP3Decoder.cpp
+++ b/media/libstagefright/codecs/mp3dec/MP3Decoder.cpp
@@ -27,13 +27,35 @@
 
 MP3Decoder::MP3Decoder(const sp<MediaSource> &source)
     : mSource(source),
+      mNumChannels(0),
       mStarted(false),
       mBufferGroup(NULL),
       mConfig(new tPVMP3DecoderExternal),
       mDecoderBuf(NULL),
       mAnchorTimeUs(0),
-      mNumSamplesOutput(0),
+      mNumFramesOutput(0),
       mInputBuffer(NULL) {
+    init();
+}
+
+void MP3Decoder::init() {
+    sp<MetaData> srcFormat = mSource->getFormat();
+
+    int32_t sampleRate;
+    CHECK(srcFormat->findInt32(kKeyChannelCount, &mNumChannels));
+    CHECK(srcFormat->findInt32(kKeySampleRate, &sampleRate));
+
+    mMeta = new MetaData;
+    mMeta->setCString(kKeyMIMEType, MEDIA_MIMETYPE_AUDIO_RAW);
+    mMeta->setInt32(kKeyChannelCount, mNumChannels);
+    mMeta->setInt32(kKeySampleRate, sampleRate);
+
+    int64_t durationUs;
+    if (srcFormat->findInt64(kKeyDuration, &durationUs)) {
+        mMeta->setInt64(kKeyDuration, durationUs);
+    }
+
+    mMeta->setCString(kKeyDecoderComponent, "MP3Decoder");
 }
 
 MP3Decoder::~MP3Decoder() {
@@ -62,7 +84,7 @@
     mSource->start();
 
     mAnchorTimeUs = 0;
-    mNumSamplesOutput = 0;
+    mNumFramesOutput = 0;
     mStarted = true;
 
     return OK;
@@ -90,26 +112,7 @@
 }
 
 sp<MetaData> MP3Decoder::getFormat() {
-    sp<MetaData> srcFormat = mSource->getFormat();
-
-    int32_t numChannels;
-    int32_t sampleRate;
-    CHECK(srcFormat->findInt32(kKeyChannelCount, &numChannels));
-    CHECK(srcFormat->findInt32(kKeySampleRate, &sampleRate));
-
-    sp<MetaData> meta = new MetaData;
-    meta->setCString(kKeyMIMEType, MEDIA_MIMETYPE_AUDIO_RAW);
-    meta->setInt32(kKeyChannelCount, numChannels);
-    meta->setInt32(kKeySampleRate, sampleRate);
-
-    int64_t durationUs;
-    if (srcFormat->findInt64(kKeyDuration, &durationUs)) {
-        meta->setInt64(kKeyDuration, durationUs);
-    }
-
-    meta->setCString(kKeyDecoderComponent, "MP3Decoder");
-
-    return meta;
+    return mMeta;
 }
 
 status_t MP3Decoder::read(
@@ -122,7 +125,7 @@
     if (options && options->getSeekTo(&seekTimeUs)) {
         CHECK(seekTimeUs >= 0);
 
-        mNumSamplesOutput = 0;
+        mNumFramesOutput = 0;
 
         if (mInputBuffer) {
             mInputBuffer->release();
@@ -142,7 +145,7 @@
         int64_t timeUs;
         if (mInputBuffer->meta_data()->findInt64(kKeyTime, &timeUs)) {
             mAnchorTimeUs = timeUs;
-            mNumSamplesOutput = 0;
+            mNumFramesOutput = 0;
         } else {
             // We must have a new timestamp after seeking.
             CHECK(seekTimeUs < 0);
@@ -179,7 +182,7 @@
 
         // This is recoverable, just ignore the current frame and
         // play silence instead.
-        memset(buffer->data(), 0, mConfig->outputFrameSize);
+        memset(buffer->data(), 0, mConfig->outputFrameSize * sizeof(int16_t));
         mConfig->inputBufferUsedLength = mInputBuffer->range_length();
     }
 
@@ -198,9 +201,9 @@
     buffer->meta_data()->setInt64(
             kKeyTime,
             mAnchorTimeUs
-                + (mNumSamplesOutput * 1000000) / mConfig->samplingRate);
+                + (mNumFramesOutput * 1000000) / mConfig->samplingRate);
 
-    mNumSamplesOutput += mConfig->outputFrameSize / sizeof(int16_t);
+    mNumFramesOutput += mConfig->outputFrameSize / mNumChannels;
 
     *out = buffer;
 
diff --git a/media/libstagefright/codecs/on2/Android.mk b/media/libstagefright/codecs/on2/Android.mk
new file mode 100644
index 0000000..2e431205
--- /dev/null
+++ b/media/libstagefright/codecs/on2/Android.mk
@@ -0,0 +1,4 @@
+LOCAL_PATH:= $(call my-dir)
+include $(CLEAR_VARS)
+
+include $(call all-makefiles-under,$(LOCAL_PATH))
diff --git a/media/libstagefright/codecs/on2/dec/Android.mk b/media/libstagefright/codecs/on2/dec/Android.mk
new file mode 100644
index 0000000..03dfb75
--- /dev/null
+++ b/media/libstagefright/codecs/on2/dec/Android.mk
@@ -0,0 +1,16 @@
+LOCAL_PATH := $(call my-dir)
+include $(CLEAR_VARS)
+
+LOCAL_SRC_FILES := \
+        VPXDecoder.cpp
+
+LOCAL_MODULE := libstagefright_vpxdec
+
+LOCAL_C_INCLUDES := \
+        $(TOP)/frameworks/base/media/libstagefright/include \
+        $(TOP)/external/opencore/extern_libs_v2/khronos/openmax/include \
+        $(TOP)/external/libvpx \
+        $(TOP)/external/libvpx/vpx_codec \
+        $(TOP)/external/libvpx/vpx_ports
+
+include $(BUILD_STATIC_LIBRARY)
diff --git a/media/libstagefright/codecs/on2/dec/VPXDecoder.cpp b/media/libstagefright/codecs/on2/dec/VPXDecoder.cpp
new file mode 100644
index 0000000..bad8956
--- /dev/null
+++ b/media/libstagefright/codecs/on2/dec/VPXDecoder.cpp
@@ -0,0 +1,230 @@
+/*
+ * Copyright (C) 2010 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+//#define LOG_NDEBUG 0
+#define LOG_TAG "VPXDecoder"
+#include <utils/Log.h>
+
+#include "VPXDecoder.h"
+
+#include <OMX_Component.h>
+
+#include <media/stagefright/MediaBufferGroup.h>
+#include <media/stagefright/MediaDebug.h>
+#include <media/stagefright/MediaDefs.h>
+#include <media/stagefright/MediaErrors.h>
+#include <media/stagefright/MetaData.h>
+#include <media/stagefright/Utils.h>
+
+#include "vpx_codec/vpx_decoder.h"
+#include "vp8/vp8dx.h"
+
+namespace android {
+
+VPXDecoder::VPXDecoder(const sp<MediaSource> &source)
+    : mSource(source),
+      mStarted(false),
+      mBufferSize(0),
+      mCtx(NULL),
+      mBufferGroup(NULL) {
+    sp<MetaData> inputFormat = source->getFormat();
+    const char *mime;
+    CHECK(inputFormat->findCString(kKeyMIMEType, &mime));
+    CHECK(!strcasecmp(mime, MEDIA_MIMETYPE_VIDEO_VPX));
+
+    CHECK(inputFormat->findInt32(kKeyWidth, &mWidth));
+    CHECK(inputFormat->findInt32(kKeyHeight, &mHeight));
+
+    mBufferSize = (mWidth * mHeight * 3) / 2;
+
+    mFormat = new MetaData;
+    mFormat->setCString(kKeyMIMEType, MEDIA_MIMETYPE_VIDEO_RAW);
+    mFormat->setInt32(kKeyWidth, mWidth);
+    mFormat->setInt32(kKeyHeight, mHeight);
+    mFormat->setInt32(kKeyColorFormat, OMX_COLOR_FormatYUV420Planar);
+    mFormat->setCString(kKeyDecoderComponent, "VPXDecoder");
+
+    int64_t durationUs;
+    if (inputFormat->findInt64(kKeyDuration, &durationUs)) {
+        mFormat->setInt64(kKeyDuration, durationUs);
+    }
+}
+
+VPXDecoder::~VPXDecoder() {
+    if (mStarted) {
+        stop();
+    }
+}
+
+status_t VPXDecoder::start(MetaData *) {
+    if (mStarted) {
+        return UNKNOWN_ERROR;
+    }
+
+    status_t err = mSource->start();
+
+    if (err != OK) {
+        return err;
+    }
+
+    mCtx = new vpx_codec_ctx_t;
+    if (vpx_codec_dec_init(
+                (vpx_codec_ctx_t *)mCtx, &vpx_codec_vp8_dx_algo, NULL, 0)) {
+        LOGE("on2 decoder failed to initialize.");
+
+        mSource->stop();
+
+        return UNKNOWN_ERROR;
+    }
+
+    mBufferGroup = new MediaBufferGroup;
+    mBufferGroup->add_buffer(new MediaBuffer(mBufferSize));
+    mBufferGroup->add_buffer(new MediaBuffer(mBufferSize));
+
+    mStarted = true;
+
+    return OK;
+}
+
+status_t VPXDecoder::stop() {
+    if (!mStarted) {
+        return UNKNOWN_ERROR;
+    }
+
+    delete mBufferGroup;
+    mBufferGroup = NULL;
+
+    vpx_codec_destroy((vpx_codec_ctx_t *)mCtx);
+    delete (vpx_codec_ctx_t *)mCtx;
+    mCtx = NULL;
+
+    mSource->stop();
+
+    mStarted = false;
+
+    return OK;
+}
+
+sp<MetaData> VPXDecoder::getFormat() {
+    return mFormat;
+}
+
+status_t VPXDecoder::read(
+        MediaBuffer **out, const ReadOptions *options) {
+    *out = NULL;
+
+    MediaBuffer *input;
+    status_t err = mSource->read(&input, options);
+
+    if (err != OK) {
+        return err;
+    }
+
+    LOGV("read %d bytes from source\n", input->range_length());
+
+    if (vpx_codec_decode(
+                (vpx_codec_ctx_t *)mCtx,
+                (uint8_t *)input->data() + input->range_offset(),
+                input->range_length(),
+                NULL,
+                0)) {
+        LOGE("on2 decoder failed to decode frame.");
+        input->release();
+        input = NULL;
+
+        return UNKNOWN_ERROR;
+    }
+
+    LOGV("successfully decoded 1 or more frames.");
+
+    int64_t timeUs;
+    CHECK(input->meta_data()->findInt64(kKeyTime, &timeUs));
+
+    input->release();
+    input = NULL;
+
+    vpx_codec_iter_t iter = NULL;
+    vpx_image_t *img = vpx_codec_get_frame((vpx_codec_ctx_t *)mCtx, &iter);
+
+    if (img == NULL) {
+        LOGI("on2 decoder did not return a frame.");
+
+        *out = new MediaBuffer(0);
+        return OK;
+    }
+
+    CHECK_EQ(img->fmt, IMG_FMT_I420);
+
+    int32_t width = img->d_w;
+    int32_t height = img->d_h;
+
+    if (width != mWidth || height != mHeight) {
+        LOGI("Image dimensions changed, width = %d, height = %d",
+             width, height);
+
+        mWidth = width;
+        mHeight = height;
+        mFormat->setInt32(kKeyWidth, width);
+        mFormat->setInt32(kKeyHeight, height);
+
+        mBufferSize = (mWidth * mHeight * 3) / 2;
+        delete mBufferGroup;
+        mBufferGroup = new MediaBufferGroup;
+        mBufferGroup->add_buffer(new MediaBuffer(mBufferSize));
+        mBufferGroup->add_buffer(new MediaBuffer(mBufferSize));
+
+        return INFO_FORMAT_CHANGED;
+    }
+
+    MediaBuffer *output;
+    CHECK_EQ(mBufferGroup->acquire_buffer(&output), OK);
+
+    const uint8_t *srcLine = (const uint8_t *)img->planes[PLANE_Y];
+    uint8_t *dst = (uint8_t *)output->data();
+    for (size_t i = 0; i < img->d_h; ++i) {
+        memcpy(dst, srcLine, img->d_w);
+
+        srcLine += img->stride[PLANE_Y];
+        dst += img->d_w;
+    }
+
+    srcLine = (const uint8_t *)img->planes[PLANE_U];
+    for (size_t i = 0; i < img->d_h / 2; ++i) {
+        memcpy(dst, srcLine, img->d_w / 2);
+
+        srcLine += img->stride[PLANE_U];
+        dst += img->d_w / 2;
+    }
+
+    srcLine = (const uint8_t *)img->planes[PLANE_V];
+    for (size_t i = 0; i < img->d_h / 2; ++i) {
+        memcpy(dst, srcLine, img->d_w / 2);
+
+        srcLine += img->stride[PLANE_V];
+        dst += img->d_w / 2;
+    }
+
+    output->set_range(0, (width * height * 3) / 2);
+
+    output->meta_data()->setInt64(kKeyTime, timeUs);
+
+    *out = output;
+
+    return OK;
+}
+
+}  // namespace android
+
diff --git a/media/libstagefright/colorconversion/ColorConverter.cpp b/media/libstagefright/colorconversion/ColorConverter.cpp
index e74782f..5b16997 100644
--- a/media/libstagefright/colorconversion/ColorConverter.cpp
+++ b/media/libstagefright/colorconversion/ColorConverter.cpp
@@ -42,6 +42,7 @@
         case OMX_COLOR_FormatYUV420Planar:
         case OMX_COLOR_FormatCbYCrY:
         case OMX_QCOM_COLOR_FormatYVU420SemiPlanar:
+        case OMX_COLOR_FormatYUV420SemiPlanar:
             return true;
 
         default:
@@ -71,6 +72,11 @@
                     width, height, srcBits, srcSkip, dstBits, dstSkip);
             break;
 
+        case OMX_COLOR_FormatYUV420SemiPlanar:
+            convertYUV420SemiPlanar(
+                    width, height, srcBits, srcSkip, dstBits, dstSkip);
+            break;
+
         default:
         {
             CHECK(!"Should not be here. Unknown color conversion.");
@@ -279,6 +285,68 @@
     }
 }
 
+void ColorConverter::convertYUV420SemiPlanar(
+        size_t width, size_t height,
+        const void *srcBits, size_t srcSkip,
+        void *dstBits, size_t dstSkip) {
+    CHECK_EQ(srcSkip, 0);  // Doesn't really make sense for YUV formats.
+    CHECK(dstSkip >= width * 2);
+    CHECK((dstSkip & 3) == 0);
+
+    uint8_t *kAdjustedClip = initClip();
+
+    uint32_t *dst_ptr = (uint32_t *)dstBits;
+    const uint8_t *src_y = (const uint8_t *)srcBits;
+
+    const uint8_t *src_u =
+        (const uint8_t *)src_y + width * height;
+
+    for (size_t y = 0; y < height; ++y) {
+        for (size_t x = 0; x < width; x += 2) {
+            signed y1 = (signed)src_y[x] - 16;
+            signed y2 = (signed)src_y[x + 1] - 16;
+
+            signed v = (signed)src_u[x & ~1] - 128;
+            signed u = (signed)src_u[(x & ~1) + 1] - 128;
+
+            signed u_b = u * 517;
+            signed u_g = -u * 100;
+            signed v_g = -v * 208;
+            signed v_r = v * 409;
+
+            signed tmp1 = y1 * 298;
+            signed b1 = (tmp1 + u_b) / 256;
+            signed g1 = (tmp1 + v_g + u_g) / 256;
+            signed r1 = (tmp1 + v_r) / 256;
+
+            signed tmp2 = y2 * 298;
+            signed b2 = (tmp2 + u_b) / 256;
+            signed g2 = (tmp2 + v_g + u_g) / 256;
+            signed r2 = (tmp2 + v_r) / 256;
+
+            uint32_t rgb1 =
+                ((kAdjustedClip[b1] >> 3) << 11)
+                | ((kAdjustedClip[g1] >> 2) << 5)
+                | (kAdjustedClip[r1] >> 3);
+
+            uint32_t rgb2 =
+                ((kAdjustedClip[b2] >> 3) << 11)
+                | ((kAdjustedClip[g2] >> 2) << 5)
+                | (kAdjustedClip[r2] >> 3);
+
+            dst_ptr[x / 2] = (rgb2 << 16) | rgb1;
+        }
+
+        src_y += width;
+
+        if (y & 1) {
+            src_u += width;
+        }
+
+        dst_ptr += dstSkip / 4;
+    }
+}
+
 uint8_t *ColorConverter::initClip() {
     static const signed kClipMin = -278;
     static const signed kClipMax = 535;
diff --git a/media/libstagefright/foundation/AAtomizer.cpp b/media/libstagefright/foundation/AAtomizer.cpp
new file mode 100644
index 0000000..b7b9e9f9
--- /dev/null
+++ b/media/libstagefright/foundation/AAtomizer.cpp
@@ -0,0 +1,67 @@
+/*
+ * Copyright (C) 2010 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include <sys/types.h>
+
+#include "AAtomizer.h"
+
+namespace android {
+
+// static
+AAtomizer AAtomizer::gAtomizer;
+
+// static
+const char *AAtomizer::Atomize(const char *name) {
+    return gAtomizer.atomize(name);
+}
+
+AAtomizer::AAtomizer() {
+    for (size_t i = 0; i < 128; ++i) {
+        mAtoms.push(List<AString>());
+    }
+}
+
+const char *AAtomizer::atomize(const char *name) {
+    Mutex::Autolock autoLock(mLock);
+
+    const size_t n = mAtoms.size();
+    size_t index = AAtomizer::Hash(name) % n;
+    List<AString> &entry = mAtoms.editItemAt(index);
+    List<AString>::iterator it = entry.begin();
+    while (it != entry.end()) {
+        if ((*it) == name) {
+            return (*it).c_str();
+        }
+        ++it;
+    }
+
+    entry.push_back(AString(name));
+
+    return (*--entry.end()).c_str();
+}
+
+// static
+uint32_t AAtomizer::Hash(const char *s) {
+    uint32_t sum = 0;
+    while (*s != '\0') {
+        sum = (sum * 31) + *s;
+        ++s;
+    }
+
+    return sum;
+}
+
+}  // namespace android
diff --git a/media/libstagefright/foundation/ABuffer.cpp b/media/libstagefright/foundation/ABuffer.cpp
new file mode 100644
index 0000000..6173db4
--- /dev/null
+++ b/media/libstagefright/foundation/ABuffer.cpp
@@ -0,0 +1,76 @@
+/*
+ * Copyright (C) 2010 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include "ABuffer.h"
+
+#include "ADebug.h"
+#include "ALooper.h"
+#include "AMessage.h"
+
+namespace android {
+
+ABuffer::ABuffer(size_t capacity)
+    : mData(malloc(capacity)),
+      mCapacity(capacity),
+      mRangeOffset(0),
+      mRangeLength(capacity),
+      mInt32Data(0),
+      mOwnsData(true) {
+}
+
+ABuffer::ABuffer(void *data, size_t capacity)
+    : mData(data),
+      mCapacity(capacity),
+      mRangeOffset(0),
+      mRangeLength(capacity),
+      mInt32Data(0),
+      mOwnsData(false) {
+}
+
+ABuffer::~ABuffer() {
+    if (mOwnsData) {
+        if (mData != NULL) {
+            free(mData);
+            mData = NULL;
+        }
+    }
+
+    if (mFarewell != NULL) {
+        mFarewell->post();
+    }
+}
+
+void ABuffer::setRange(size_t offset, size_t size) {
+    CHECK_LE(offset, mCapacity);
+    CHECK_LE(offset + size, mCapacity);
+
+    mRangeOffset = offset;
+    mRangeLength = size;
+}
+
+void ABuffer::setFarewellMessage(const sp<AMessage> msg) {
+    mFarewell = msg;
+}
+
+sp<AMessage> ABuffer::meta() {
+    if (mMeta == NULL) {
+        mMeta = new AMessage;
+    }
+    return mMeta;
+}
+
+}  // namespace android
+
diff --git a/media/libstagefright/foundation/ADebug.cpp b/media/libstagefright/foundation/ADebug.cpp
new file mode 100644
index 0000000..16f8b22
--- /dev/null
+++ b/media/libstagefright/foundation/ADebug.cpp
@@ -0,0 +1,76 @@
+/*
+ * Copyright (C) 2010 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include "ADebug.h"
+
+#include <stdio.h>
+#include <stdlib.h>
+
+#ifdef ANDROID
+#include <cutils/log.h>
+#endif
+
+namespace android {
+
+Logger::Logger(LogType type)
+    : mLogType(type) {
+    switch (mLogType) {
+        case VERBOSE:
+            mMessage = "V ";
+            break;
+        case INFO:
+            mMessage = "I ";
+            break;
+        case WARNING:
+            mMessage = "W ";
+            break;
+        case ERROR:
+            mMessage = "E ";
+            break;
+        case FATAL:
+            mMessage = "F ";
+            break;
+
+        default:
+            break;
+    }
+}
+
+Logger::~Logger() {
+    if (mLogType == VERBOSE) {
+        return;
+    }
+
+    mMessage.append("\n");
+
+#if defined(ANDROID) && 1
+    LOG_PRI(ANDROID_LOG_INFO, "ADebug", "%s", mMessage.c_str());
+#else
+    fprintf(stderr, mMessage.c_str());
+    fflush(stderr);
+#endif
+
+    if (mLogType == FATAL) {
+        abort();
+    }
+}
+
+const char *LeafName(const char *s) {
+    const char *lastSlash = strrchr(s, '/');
+    return lastSlash != NULL ? lastSlash + 1 : s;
+}
+
+}  // namespace android
diff --git a/media/libstagefright/foundation/AHandler.cpp b/media/libstagefright/foundation/AHandler.cpp
new file mode 100644
index 0000000..bd5f7e94
--- /dev/null
+++ b/media/libstagefright/foundation/AHandler.cpp
@@ -0,0 +1,33 @@
+/*
+ * Copyright (C) 2010 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+//#define LOG_NDEBUG 0
+#define LOG_TAG "AHandler"
+#include <utils/Log.h>
+
+#include <media/stagefright/foundation/AHandler.h>
+
+#include <media/stagefright/foundation/ALooperRoster.h>
+
+namespace android {
+
+sp<ALooper> AHandler::looper() {
+    extern ALooperRoster gLooperRoster;
+
+    return gLooperRoster.findLooper(id());
+}
+
+}  // namespace android
diff --git a/media/libstagefright/foundation/ALooper.cpp b/media/libstagefright/foundation/ALooper.cpp
new file mode 100644
index 0000000..cd4f349
--- /dev/null
+++ b/media/libstagefright/foundation/ALooper.cpp
@@ -0,0 +1,197 @@
+/*
+ * Copyright (C) 2010 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+//#define LOG_NDEBUG 0
+#define LOG_TAG "ALooper"
+#include <utils/Log.h>
+
+#include <sys/time.h>
+
+#include "ALooper.h"
+
+#include "AHandler.h"
+#include "ALooperRoster.h"
+#include "AMessage.h"
+
+namespace android {
+
+ALooperRoster gLooperRoster;
+
+struct ALooper::LooperThread : public Thread {
+    LooperThread(ALooper *looper, bool canCallJava)
+        : Thread(canCallJava),
+          mLooper(looper) {
+    }
+
+    virtual bool threadLoop() {
+        return mLooper->loop();
+    }
+
+protected:
+    virtual ~LooperThread() {}
+
+private:
+    ALooper *mLooper;
+
+    DISALLOW_EVIL_CONSTRUCTORS(LooperThread);
+};
+
+// static
+int64_t ALooper::GetNowUs() {
+    struct timeval tv;
+    gettimeofday(&tv, NULL);
+
+    return (int64_t)tv.tv_sec * 1000000ll + tv.tv_usec;
+}
+
+ALooper::ALooper()
+    : mRunningLocally(false) {
+}
+
+ALooper::~ALooper() {
+    stop();
+}
+
+ALooper::handler_id ALooper::registerHandler(const sp<AHandler> &handler) {
+    return gLooperRoster.registerHandler(this, handler);
+}
+
+void ALooper::unregisterHandler(handler_id handlerID) {
+    gLooperRoster.unregisterHandler(handlerID);
+}
+
+status_t ALooper::start(bool runOnCallingThread, bool canCallJava) {
+    if (runOnCallingThread) {
+        {
+            Mutex::Autolock autoLock(mLock);
+
+            if (mThread != NULL || mRunningLocally) {
+                return INVALID_OPERATION;
+            }
+
+            mRunningLocally = true;
+        }
+
+        do {
+        } while (loop());
+
+        return OK;
+    }
+
+    Mutex::Autolock autoLock(mLock);
+
+    if (mThread != NULL || mRunningLocally) {
+        return INVALID_OPERATION;
+    }
+
+    mThread = new LooperThread(this, canCallJava);
+
+    status_t err = mThread->run("ALooper");
+    if (err != OK) {
+        mThread.clear();
+    }
+
+    return err;
+}
+
+status_t ALooper::stop() {
+    sp<LooperThread> thread;
+    bool runningLocally;
+
+    {
+        Mutex::Autolock autoLock(mLock);
+
+        thread = mThread;
+        runningLocally = mRunningLocally;
+        mThread.clear();
+        mRunningLocally = false;
+    }
+
+    if (thread == NULL && !runningLocally) {
+        return INVALID_OPERATION;
+    }
+
+    if (thread != NULL) {
+        thread->requestExit();
+    }
+
+    mQueueChangedCondition.signal();
+
+    if (!runningLocally) {
+        thread->requestExitAndWait();
+    }
+
+    return OK;
+}
+
+void ALooper::post(const sp<AMessage> &msg, int64_t delayUs) {
+    Mutex::Autolock autoLock(mLock);
+
+    int64_t whenUs;
+    if (delayUs > 0) {
+        whenUs = GetNowUs() + delayUs;
+    } else {
+        whenUs = GetNowUs();
+    }
+
+    List<Event>::iterator it = mEventQueue.begin();
+    while (it != mEventQueue.end() && (*it).mWhenUs <= whenUs) {
+        ++it;
+    }
+
+    Event event;
+    event.mWhenUs = whenUs;
+    event.mMessage = msg;
+
+    if (it == mEventQueue.begin()) {
+        mQueueChangedCondition.signal();
+    }
+
+    mEventQueue.insert(it, event);
+}
+
+bool ALooper::loop() {
+    Event event;
+
+    {
+        Mutex::Autolock autoLock(mLock);
+        if (mThread == NULL && !mRunningLocally) {
+            return false;
+        }
+        if (mEventQueue.empty()) {
+            mQueueChangedCondition.wait(mLock);
+            return true;
+        }
+        int64_t whenUs = (*mEventQueue.begin()).mWhenUs;
+        int64_t nowUs = GetNowUs();
+
+        if (whenUs > nowUs) {
+            int64_t delayUs = whenUs - nowUs;
+            mQueueChangedCondition.waitRelative(mLock, delayUs * 1000ll);
+
+            return true;
+        }
+
+        event = *mEventQueue.begin();
+        mEventQueue.erase(mEventQueue.begin());
+    }
+
+    gLooperRoster.deliverMessage(event.mMessage);
+
+    return true;
+}
+
+}  // namespace android
diff --git a/media/libstagefright/foundation/ALooperRoster.cpp b/media/libstagefright/foundation/ALooperRoster.cpp
new file mode 100644
index 0000000..65f7593
--- /dev/null
+++ b/media/libstagefright/foundation/ALooperRoster.cpp
@@ -0,0 +1,144 @@
+/*
+ * Copyright (C) 2010 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+//#define LOG_NDEBUG 0
+#define LOG_TAG "ALooperRoster"
+#include <utils/Log.h>
+
+#include "ALooperRoster.h"
+
+#include "ADebug.h"
+#include "AHandler.h"
+#include "AMessage.h"
+
+namespace android {
+
+ALooperRoster::ALooperRoster()
+    : mNextHandlerID(1) {
+}
+
+ALooper::handler_id ALooperRoster::registerHandler(
+        const sp<ALooper> looper, const sp<AHandler> &handler) {
+    Mutex::Autolock autoLock(mLock);
+
+    if (handler->id() != 0) {
+        CHECK(!"A handler must only be registered once.");
+        return INVALID_OPERATION;
+    }
+
+    HandlerInfo info;
+    info.mLooper = looper;
+    info.mHandler = handler;
+    ALooper::handler_id handlerID = mNextHandlerID++;
+    mHandlers.add(handlerID, info);
+
+    handler->setID(handlerID);
+
+    return handlerID;
+}
+
+void ALooperRoster::unregisterHandler(ALooper::handler_id handlerID) {
+    Mutex::Autolock autoLock(mLock);
+
+    ssize_t index = mHandlers.indexOfKey(handlerID);
+    CHECK_GE(index, 0);
+
+    const HandlerInfo &info = mHandlers.valueAt(index);
+
+    sp<AHandler> handler = info.mHandler.promote();
+
+    if (handler != NULL) {
+        handler->setID(0);
+    }
+
+    mHandlers.removeItemsAt(index);
+}
+
+void ALooperRoster::postMessage(
+        const sp<AMessage> &msg, int64_t delayUs) {
+    Mutex::Autolock autoLock(mLock);
+
+    ssize_t index = mHandlers.indexOfKey(msg->target());
+
+    if (index < 0) {
+        LOG(WARNING) << "failed to post message. Target handler not registered.";
+        return;
+    }
+
+    const HandlerInfo &info = mHandlers.valueAt(index);
+
+    sp<ALooper> looper = info.mLooper.promote();
+
+    if (looper == NULL) {
+        LOG(WARNING) << "failed to post message. "
+                        "Target handler still registered, but object gone.";
+
+        mHandlers.removeItemsAt(index);
+        return;
+    }
+
+    looper->post(msg, delayUs);
+}
+
+void ALooperRoster::deliverMessage(const sp<AMessage> &msg) {
+    sp<AHandler> handler;
+
+    {
+        Mutex::Autolock autoLock(mLock);
+
+        ssize_t index = mHandlers.indexOfKey(msg->target());
+
+        if (index < 0) {
+            LOG(WARNING) << "failed to deliver message. "
+                         << "Target handler not registered.";
+            return;
+        }
+
+        const HandlerInfo &info = mHandlers.valueAt(index);
+        handler = info.mHandler.promote();
+
+        if (handler == NULL) {
+            LOG(WARNING) << "failed to deliver message. "
+                            "Target handler registered, but object gone.";
+
+            mHandlers.removeItemsAt(index);
+            return;
+        }
+    }
+
+    handler->onMessageReceived(msg);
+}
+
+sp<ALooper> ALooperRoster::findLooper(ALooper::handler_id handlerID) {
+    Mutex::Autolock autoLock(mLock);
+
+    ssize_t index = mHandlers.indexOfKey(handlerID);
+
+    if (index < 0) {
+        return NULL;
+    }
+
+    sp<ALooper> looper = mHandlers.valueAt(index).mLooper.promote();
+
+    if (looper == NULL) {
+        mHandlers.removeItemsAt(index);
+        return NULL;
+    }
+
+    return looper;
+}
+
+}  // namespace android
diff --git a/media/libstagefright/foundation/AMessage.cpp b/media/libstagefright/foundation/AMessage.cpp
new file mode 100644
index 0000000..26c6d42
--- /dev/null
+++ b/media/libstagefright/foundation/AMessage.cpp
@@ -0,0 +1,344 @@
+/*
+ * Copyright (C) 2010 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include "AMessage.h"
+
+#include <ctype.h>
+
+#include "AAtomizer.h"
+#include "ADebug.h"
+#include "ALooperRoster.h"
+#include "AString.h"
+
+namespace android {
+
+AMessage::AMessage(uint32_t what, ALooper::handler_id target)
+    : mWhat(what),
+      mTarget(target),
+      mNumItems(0) {
+}
+
+AMessage::~AMessage() {
+    clear();
+}
+
+void AMessage::setWhat(uint32_t what) {
+    mWhat = what;
+}
+
+uint32_t AMessage::what() const {
+    return mWhat;
+}
+
+void AMessage::setTarget(ALooper::handler_id handlerID) {
+    mTarget = handlerID;
+}
+
+ALooper::handler_id AMessage::target() const {
+    return mTarget;
+}
+
+void AMessage::clear() {
+    for (size_t i = 0; i < mNumItems; ++i) {
+        Item *item = &mItems[i];
+        freeItem(item);
+    }
+    mNumItems = 0;
+}
+
+void AMessage::freeItem(Item *item) {
+    switch (item->mType) {
+        case kTypeString:
+        {
+            delete item->u.stringValue;
+            break;
+        }
+
+        case kTypeObject:
+        case kTypeMessage:
+        {
+            if (item->u.refValue != NULL) {
+                item->u.refValue->decStrong(this);
+            }
+            break;
+        }
+
+        default:
+            break;
+    }
+}
+
+AMessage::Item *AMessage::allocateItem(const char *name) {
+    name = AAtomizer::Atomize(name);
+
+    size_t i = 0;
+    while (i < mNumItems && mItems[i].mName != name) {
+        ++i;
+    }
+
+    Item *item;
+
+    if (i < mNumItems) {
+        item = &mItems[i];
+        freeItem(item);
+    } else {
+        CHECK(mNumItems < kMaxNumItems);
+        i = mNumItems++;
+        item = &mItems[i];
+
+        item->mName = name;
+    }
+
+    return item;
+}
+
+const AMessage::Item *AMessage::findItem(
+        const char *name, Type type) const {
+    name = AAtomizer::Atomize(name);
+
+    for (size_t i = 0; i < mNumItems; ++i) {
+        const Item *item = &mItems[i];
+
+        if (item->mName == name) {
+            return item->mType == type ? item : NULL;
+        }
+    }
+
+    return NULL;
+}
+
+#define BASIC_TYPE(NAME,FIELDNAME,TYPENAME)                             \
+void AMessage::set##NAME(const char *name, TYPENAME value) {            \
+    Item *item = allocateItem(name);                                    \
+                                                                        \
+    item->mType = kType##NAME;                                          \
+    item->u.FIELDNAME = value;                                          \
+}                                                                       \
+                                                                        \
+bool AMessage::find##NAME(const char *name, TYPENAME *value) const {    \
+    const Item *item = findItem(name, kType##NAME);                     \
+    if (item) {                                                         \
+        *value = item->u.FIELDNAME;                                     \
+        return true;                                                    \
+    }                                                                   \
+    return false;                                                       \
+}
+
+BASIC_TYPE(Int32,int32Value,int32_t)
+BASIC_TYPE(Int64,int64Value,int64_t)
+BASIC_TYPE(Size,sizeValue,size_t)
+BASIC_TYPE(Float,floatValue,float)
+BASIC_TYPE(Double,doubleValue,double)
+BASIC_TYPE(Pointer,ptrValue,void *)
+
+#undef BASIC_TYPE
+
+void AMessage::setString(
+        const char *name, const char *s, ssize_t len) {
+    Item *item = allocateItem(name);
+    item->mType = kTypeString;
+    item->u.stringValue = new AString(s, len < 0 ? strlen(s) : len);
+}
+
+void AMessage::setObject(const char *name, const sp<RefBase> &obj) {
+    Item *item = allocateItem(name);
+    item->mType = kTypeObject;
+
+    if (obj != NULL) { obj->incStrong(this); }
+    item->u.refValue = obj.get();
+}
+
+void AMessage::setMessage(const char *name, const sp<AMessage> &obj) {
+    Item *item = allocateItem(name);
+    item->mType = kTypeMessage;
+
+    if (obj != NULL) { obj->incStrong(this); }
+    item->u.refValue = obj.get();
+}
+
+bool AMessage::findString(const char *name, AString *value) const {
+    const Item *item = findItem(name, kTypeString);
+    if (item) {
+        *value = *item->u.stringValue;
+        return true;
+    }
+    return false;
+}
+
+bool AMessage::findObject(const char *name, sp<RefBase> *obj) const {
+    const Item *item = findItem(name, kTypeObject);
+    if (item) {
+        *obj = item->u.refValue;
+        return true;
+    }
+    return false;
+}
+
+bool AMessage::findMessage(const char *name, sp<AMessage> *obj) const {
+    const Item *item = findItem(name, kTypeMessage);
+    if (item) {
+        *obj = static_cast<AMessage *>(item->u.refValue);
+        return true;
+    }
+    return false;
+}
+
+void AMessage::post(int64_t delayUs) {
+    extern ALooperRoster gLooperRoster;
+
+    gLooperRoster.postMessage(this, delayUs);
+}
+
+sp<AMessage> AMessage::dup() const {
+    sp<AMessage> msg = new AMessage(mWhat, mTarget);
+    msg->mNumItems = mNumItems;
+
+    for (size_t i = 0; i < mNumItems; ++i) {
+        const Item *from = &mItems[i];
+        Item *to = &msg->mItems[i];
+
+        to->mName = from->mName;
+        to->mType = from->mType;
+
+        switch (from->mType) {
+            case kTypeString:
+            {
+                to->u.stringValue =
+                    new AString(*from->u.stringValue);
+                break;
+            }
+
+            case kTypeObject:
+            case kTypeMessage:
+            {
+                to->u.refValue = from->u.refValue;
+                to->u.refValue->incStrong(msg.get());
+                break;
+            }
+
+            default:
+            {
+                to->u = from->u;
+                break;
+            }
+        }
+    }
+
+    return msg;
+}
+
+static void appendIndent(AString *s, int32_t indent) {
+    static const char kWhitespace[] =
+        "                                        "
+        "                                        ";
+
+    CHECK_LT((size_t)indent, sizeof(kWhitespace));
+
+    s->append(kWhitespace, indent);
+}
+
+static bool isFourcc(uint32_t what) {
+    return isprint(what & 0xff)
+        && isprint((what >> 8) & 0xff)
+        && isprint((what >> 16) & 0xff)
+        && isprint((what >> 24) & 0xff);
+}
+
+AString AMessage::debugString(int32_t indent) const {
+    AString s = "AMessage(what = ";
+
+    AString tmp;
+    if (isFourcc(mWhat)) {
+        tmp = StringPrintf(
+                "'%c%c%c%c'",
+                (char)(mWhat >> 24),
+                (char)((mWhat >> 16) & 0xff),
+                (char)((mWhat >> 8) & 0xff),
+                (char)(mWhat & 0xff));
+    } else {
+        tmp = StringPrintf("0x%08x", mWhat);
+    }
+    s.append(tmp);
+
+    if (mTarget != 0) {
+        tmp = StringPrintf(", target = %d", mTarget);
+        s.append(tmp);
+    }
+    s.append(") = {\n");
+
+    for (size_t i = 0; i < mNumItems; ++i) {
+        const Item &item = mItems[i];
+
+        switch (item.mType) {
+            case kTypeInt32:
+                tmp = StringPrintf(
+                        "int32_t %s = %d", item.mName, item.u.int32Value);
+                break;
+            case kTypeInt64:
+                tmp = StringPrintf(
+                        "int64_t %s = %lld", item.mName, item.u.int64Value);
+                break;
+            case kTypeSize:
+                tmp = StringPrintf(
+                        "size_t %s = %d", item.mName, item.u.sizeValue);
+                break;
+            case kTypeFloat:
+                tmp = StringPrintf(
+                        "float %s = %f", item.mName, item.u.floatValue);
+                break;
+            case kTypeDouble:
+                tmp = StringPrintf(
+                        "double %s = %f", item.mName, item.u.doubleValue);
+                break;
+            case kTypePointer:
+                tmp = StringPrintf(
+                        "void *%s = %p", item.mName, item.u.ptrValue);
+                break;
+            case kTypeString:
+                tmp = StringPrintf(
+                        "string %s = \"%s\"",
+                        item.mName,
+                        item.u.stringValue->c_str());
+                break;
+            case kTypeObject:
+                tmp = StringPrintf(
+                        "RefBase *%s = %p", item.mName, item.u.refValue);
+                break;
+            case kTypeMessage:
+                tmp = StringPrintf(
+                        "AMessage %s = %s",
+                        item.mName,
+                        static_cast<AMessage *>(
+                            item.u.refValue)->debugString(
+                                indent + strlen(item.mName) + 14).c_str());
+                break;
+            default:
+                TRESPASS();
+        }
+
+        appendIndent(&s, indent);
+        s.append("  ");
+        s.append(tmp);
+        s.append("\n");
+    }
+
+    appendIndent(&s, indent);
+    s.append("}");
+
+    return s;
+}
+
+}  // namespace android
diff --git a/media/libstagefright/foundation/AString.cpp b/media/libstagefright/foundation/AString.cpp
new file mode 100644
index 0000000..61b76cf
--- /dev/null
+++ b/media/libstagefright/foundation/AString.cpp
@@ -0,0 +1,331 @@
+/*
+ * Copyright (C) 2010 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include <ctype.h>
+#include <stdarg.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+
+#include "ADebug.h"
+#include "AString.h"
+
+namespace android {
+
+// static
+const char *AString::kEmptyString = "";
+
+AString::AString()
+    : mData((char *)kEmptyString),
+      mSize(0),
+      mAllocSize(1) {
+}
+
+AString::AString(const char *s)
+    : mData(NULL),
+      mSize(0),
+      mAllocSize(1) {
+    setTo(s);
+}
+
+AString::AString(const char *s, size_t size)
+    : mData(NULL),
+      mSize(0),
+      mAllocSize(1) {
+    setTo(s, size);
+}
+
+AString::AString(const AString &from)
+    : mData(NULL),
+      mSize(0),
+      mAllocSize(1) {
+    setTo(from, 0, from.size());
+}
+
+AString::AString(const AString &from, size_t offset, size_t n)
+    : mData(NULL),
+      mSize(0),
+      mAllocSize(1) {
+    setTo(from, offset, n);
+}
+
+AString::~AString() {
+    clear();
+}
+
+AString &AString::operator=(const AString &from) {
+    if (&from != this) {
+        setTo(from, 0, from.size());
+    }
+
+    return *this;
+}
+
+size_t AString::size() const {
+    return mSize;
+}
+
+const char *AString::c_str() const {
+    return mData;
+}
+
+bool AString::empty() const {
+    return mSize == 0;
+}
+
+void AString::setTo(const char *s) {
+    setTo(s, strlen(s));
+}
+
+void AString::setTo(const char *s, size_t size) {
+    clear();
+    append(s, size);
+}
+
+void AString::setTo(const AString &from, size_t offset, size_t n) {
+    CHECK(&from != this);
+
+    clear();
+    setTo(from.mData + offset, n);
+}
+
+void AString::clear() {
+    if (mData && mData != kEmptyString) {
+        free(mData);
+        mData = NULL;
+    }
+
+    mData = (char *)kEmptyString;
+    mSize = 0;
+    mAllocSize = 1;
+}
+
+size_t AString::hash() const {
+    size_t x = 0;
+    for (size_t i = 0; i < mSize; ++i) {
+        x = (x * 31) + mData[i];
+    }
+
+    return x;
+}
+
+bool AString::operator==(const AString &other) const {
+    return mSize == other.mSize && !memcmp(mData, other.mData, mSize);
+}
+
+void AString::trim() {
+    makeMutable();
+
+    size_t i = 0;
+    while (i < mSize && isspace(mData[i])) {
+        ++i;
+    }
+
+    size_t j = mSize;
+    while (j > i && isspace(mData[j - 1])) {
+        --j;
+    }
+
+    memmove(mData, &mData[i], j - i);
+    mSize = j - i;
+    mData[mSize] = '\0';
+}
+
+void AString::erase(size_t start, size_t n) {
+    CHECK_LT(start, mSize);
+    CHECK_LE(start + n, mSize);
+
+    makeMutable();
+
+    memmove(&mData[start], &mData[start + n], mSize - start - n);
+    mSize -= n;
+    mData[mSize] = '\0';
+}
+
+void AString::makeMutable() {
+    if (mData == kEmptyString) {
+        mData = strdup(kEmptyString);
+    }
+}
+
+void AString::append(const char *s) {
+    append(s, strlen(s));
+}
+
+void AString::append(const char *s, size_t size) {
+    makeMutable();
+
+    if (mSize + size + 1 > mAllocSize) {
+        mAllocSize = (mAllocSize + size + 31) & -32;
+        mData = (char *)realloc(mData, mAllocSize);
+        CHECK(mData != NULL);
+    }
+
+    memcpy(&mData[mSize], s, size);
+    mSize += size;
+    mData[mSize] = '\0';
+}
+
+void AString::append(const AString &from) {
+    append(from.c_str(), from.size());
+}
+
+void AString::append(const AString &from, size_t offset, size_t n) {
+    append(from.c_str() + offset, n);
+}
+
+void AString::append(int x) {
+    char s[16];
+    sprintf(s, "%d", x);
+
+    append(s);
+}
+
+void AString::append(unsigned x) {
+    char s[16];
+    sprintf(s, "%u", x);
+
+    append(s);
+}
+
+void AString::append(long x) {
+    char s[16];
+    sprintf(s, "%ld", x);
+
+    append(s);
+}
+
+void AString::append(unsigned long x) {
+    char s[16];
+    sprintf(s, "%lu", x);
+
+    append(s);
+}
+
+void AString::append(long long x) {
+    char s[32];
+    sprintf(s, "%lld", x);
+
+    append(s);
+}
+
+void AString::append(unsigned long long x) {
+    char s[32];
+    sprintf(s, "%llu", x);
+
+    append(s);
+}
+
+void AString::append(float x) {
+    char s[16];
+    sprintf(s, "%f", x);
+
+    append(s);
+}
+
+void AString::append(double x) {
+    char s[16];
+    sprintf(s, "%f", x);
+
+    append(s);
+}
+
+void AString::append(void *x) {
+    char s[16];
+    sprintf(s, "%p", x);
+
+    append(s);
+}
+
+ssize_t AString::find(const char *substring, size_t start) const {
+    CHECK_LE(start, size());
+
+    const char *match = strstr(mData + start, substring);
+
+    if (match == NULL) {
+        return -1;
+    }
+
+    return match - mData;
+}
+
+void AString::insert(const AString &from, size_t insertionPos) {
+    insert(from.c_str(), from.size(), insertionPos);
+}
+
+void AString::insert(const char *from, size_t size, size_t insertionPos) {
+    CHECK_GE(insertionPos, 0u);
+    CHECK_LE(insertionPos, mSize);
+
+    makeMutable();
+
+    if (mSize + size + 1 > mAllocSize) {
+        mAllocSize = (mAllocSize + size + 31) & -32;
+        mData = (char *)realloc(mData, mAllocSize);
+        CHECK(mData != NULL);
+    }
+
+    memmove(&mData[insertionPos + size],
+            &mData[insertionPos], mSize - insertionPos + 1);
+
+    memcpy(&mData[insertionPos], from, size);
+
+    mSize += size;
+}
+
+bool AString::operator<(const AString &other) const {
+    return compare(other) < 0;
+}
+
+bool AString::operator>(const AString &other) const {
+    return compare(other) > 0;
+}
+
+int AString::compare(const AString &other) const {
+    return strcmp(mData, other.mData);
+}
+
+void AString::tolower() {
+    makeMutable();
+
+    for (size_t i = 0; i < mSize; ++i) {
+        mData[i] = ::tolower(mData[i]);
+    }
+}
+
+bool AString::startsWith(const char *prefix) const {
+    return !strncmp(mData, prefix, strlen(prefix));
+}
+
+AString StringPrintf(const char *format, ...) {
+    va_list ap;
+    va_start(ap, format);
+
+    char *buffer;
+    vasprintf(&buffer, format, ap);
+
+    va_end(ap);
+
+    AString result(buffer);
+
+    free(buffer);
+    buffer = NULL;
+
+    return result;
+}
+
+}  // namespace android
+
diff --git a/media/libstagefright/foundation/Android.mk b/media/libstagefright/foundation/Android.mk
new file mode 100644
index 0000000..35eea7e
--- /dev/null
+++ b/media/libstagefright/foundation/Android.mk
@@ -0,0 +1,36 @@
+LOCAL_PATH:= $(call my-dir)
+include $(CLEAR_VARS)
+
+LOCAL_SRC_FILES:=               \
+    AAtomizer.cpp               \
+    ABuffer.cpp                 \
+    ADebug.cpp                  \
+    AHandler.cpp                \
+    ALooper.cpp                 \
+    ALooperRoster.cpp           \
+    AMessage.cpp                \
+    AString.cpp                 \
+    base64.cpp                  \
+    hexdump.cpp
+
+LOCAL_C_INCLUDES:= \
+    frameworks/base/include/media/stagefright/foundation
+
+LOCAL_SHARED_LIBRARIES := \
+        libbinder         \
+        libmedia          \
+        libutils          \
+        libcutils         \
+        libui             \
+        libsonivox        \
+        libvorbisidec     \
+        libsurfaceflinger_client \
+        libcamera_client
+
+LOCAL_CFLAGS += -Wno-multichar
+
+LOCAL_MODULE:= libstagefright_foundation
+
+LOCAL_PRELINK_MODULE:= false
+
+include $(BUILD_SHARED_LIBRARY)
diff --git a/media/libstagefright/foundation/base64.cpp b/media/libstagefright/foundation/base64.cpp
new file mode 100644
index 0000000..d5fb4e01
--- /dev/null
+++ b/media/libstagefright/foundation/base64.cpp
@@ -0,0 +1,139 @@
+/*
+ * Copyright (C) 2010 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include "base64.h"
+
+#include "ABuffer.h"
+#include "ADebug.h"
+
+namespace android {
+
+sp<ABuffer> decodeBase64(const AString &s) {
+    if ((s.size() % 4) != 0) {
+        return NULL;
+    }
+
+    size_t n = s.size();
+    size_t padding = 0;
+    if (n >= 1 && s.c_str()[n - 1] == '=') {
+        padding = 1;
+
+        if (n >= 2 && s.c_str()[n - 2] == '=') {
+            padding = 2;
+        }
+    }
+
+    size_t outLen = 3 * s.size() / 4 - padding;
+
+    sp<ABuffer> buffer = new ABuffer(outLen);
+
+    uint8_t *out = buffer->data();
+    size_t j = 0;
+    uint32_t accum = 0;
+    for (size_t i = 0; i < n; ++i) {
+        char c = s.c_str()[i];
+        unsigned value;
+        if (c >= 'A' && c <= 'Z') {
+            value = c - 'A';
+        } else if (c >= 'a' && c <= 'z') {
+            value = 26 + c - 'a';
+        } else if (c >= '0' && c <= '9') {
+            value = 52 + c - '0';
+        } else if (c == '+') {
+            value = 62;
+        } else if (c == '/') {
+            value = 63;
+        } else if (c != '=') {
+            return NULL;
+        } else {
+            if (i < n - padding) {
+                return NULL;
+            }
+
+            value = 0;
+        }
+
+        accum = (accum << 6) | value;
+
+        if (((i + 1) % 4) == 0) {
+            out[j++] = (accum >> 16);
+
+            if (j < outLen) { out[j++] = (accum >> 8) & 0xff; } 
+            if (j < outLen) { out[j++] = accum & 0xff; }
+
+            accum = 0;
+        }
+    }
+
+    return buffer;
+}
+
+static char encode6Bit(unsigned x) {
+    if (x <= 25) {
+        return 'A' + x;
+    } else if (x <= 51) {
+        return 'a' + x - 26;
+    } else if (x <= 61) {
+        return '0' + x - 52;
+    } else if (x == 62) {
+        return '+';
+    } else {
+        return '/';
+    }
+}
+
+void encodeBase64(
+        const void *_data, size_t size, AString *out) {
+    out->clear();
+
+    const uint8_t *data = (const uint8_t *)_data;
+
+    size_t i;
+    for (i = 0; i < (size / 3) * 3; i += 3) {
+        uint8_t x1 = data[i];
+        uint8_t x2 = data[i + 1];
+        uint8_t x3 = data[i + 2];
+
+        out->append(encode6Bit(x1 >> 2));
+        out->append(encode6Bit((x1 << 4 | x2 >> 4) & 0x3f));
+        out->append(encode6Bit((x2 << 2 | x3 >> 6) & 0x3f));
+        out->append(encode6Bit(x3 & 0x3f));
+    }
+    switch (size % 3) {
+        case 0:
+            break;
+        case 2:
+        {
+            uint8_t x1 = data[i];
+            uint8_t x2 = data[i + 1];
+            out->append(encode6Bit(x1 >> 2));
+            out->append(encode6Bit((x1 << 4 | x2 >> 4) & 0x3f));
+            out->append(encode6Bit((x2 << 2) & 0x3f));
+            out->append('=');
+            break;
+        }
+        default:
+        {
+            uint8_t x1 = data[i];
+            out->append(encode6Bit(x1 >> 2));
+            out->append(encode6Bit((x1 << 4) & 0x3f));
+            out->append("==");
+            break;
+        }
+    }
+}
+
+}  // namespace android
diff --git a/media/libstagefright/foundation/hexdump.cpp b/media/libstagefright/foundation/hexdump.cpp
new file mode 100644
index 0000000..093b587
--- /dev/null
+++ b/media/libstagefright/foundation/hexdump.cpp
@@ -0,0 +1,73 @@
+/*
+ * Copyright (C) 2010 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include "hexdump.h"
+
+#include "ADebug.h"
+#include "AString.h"
+
+#include <ctype.h>
+#include <stdint.h>
+#include <stdio.h>
+
+namespace android {
+
+void hexdump(const void *_data, size_t size) {
+    const uint8_t *data = (const uint8_t *)_data;
+
+    size_t offset = 0;
+    while (offset < size) {
+        AString line;
+
+        char tmp[32];
+        sprintf(tmp, "%08lx:  ", (unsigned long)offset);
+
+        line.append(tmp);
+
+        for (size_t i = 0; i < 16; ++i) {
+            if (i == 8) {
+                line.append(' ');
+            }
+            if (offset + i >= size) {
+                line.append("   ");
+            } else {
+                sprintf(tmp, "%02x ", data[offset + i]);
+                line.append(tmp);
+            }
+        }
+
+        line.append(' ');
+
+        for (size_t i = 0; i < 16; ++i) {
+            if (offset + i >= size) {
+                break;
+            }
+
+            if (isprint(data[offset + i])) {
+                line.append((char)data[offset + i]);
+            } else {
+                line.append('.');
+            }
+        }
+
+        LOG(INFO) << line;
+
+        offset += 16;
+    }
+}
+
+}  // namespace android
+
diff --git a/media/libstagefright/httplive/Android.mk b/media/libstagefright/httplive/Android.mk
new file mode 100644
index 0000000..3de2c80
--- /dev/null
+++ b/media/libstagefright/httplive/Android.mk
@@ -0,0 +1,20 @@
+LOCAL_PATH:= $(call my-dir)
+
+include $(CLEAR_VARS)
+
+LOCAL_SRC_FILES:=       \
+        LiveSource.cpp  \
+        M3UParser.cpp   \
+
+LOCAL_C_INCLUDES:= \
+	$(JNI_H_INCLUDE) \
+	$(TOP)/external/opencore/extern_libs_v2/khronos/openmax/include \
+        $(TOP)/frameworks/base/media/libstagefright
+
+LOCAL_MODULE:= libstagefright_httplive
+
+ifeq ($(TARGET_ARCH),arm)
+    LOCAL_CFLAGS += -Wno-psabi
+endif
+
+include $(BUILD_STATIC_LIBRARY)
diff --git a/media/libstagefright/httplive/LiveSource.cpp b/media/libstagefright/httplive/LiveSource.cpp
new file mode 100644
index 0000000..001afc4
--- /dev/null
+++ b/media/libstagefright/httplive/LiveSource.cpp
@@ -0,0 +1,188 @@
+/*
+ * Copyright (C) 2010 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#define LOG_TAG "LiveSource"
+#include <utils/Log.h>
+
+#include "include/LiveSource.h"
+#include "include/M3UParser.h"
+#include "include/NuHTTPDataSource.h"
+
+#include <media/stagefright/foundation/ABuffer.h>
+#include <media/stagefright/MediaDebug.h>
+
+namespace android {
+
+LiveSource::LiveSource(const char *url)
+    : mURL(url),
+      mInitCheck(NO_INIT),
+      mPlaylistIndex(0),
+      mLastFetchTimeUs(-1),
+      mSource(new NuHTTPDataSource),
+      mSourceSize(0),
+      mOffsetBias(0) {
+    if (switchToNext()) {
+        mInitCheck = OK;
+    }
+}
+
+LiveSource::~LiveSource() {
+}
+
+status_t LiveSource::initCheck() const {
+    return mInitCheck;
+}
+
+bool LiveSource::loadPlaylist() {
+    mPlaylist.clear();
+    mPlaylistIndex = 0;
+
+    sp<ABuffer> buffer;
+    status_t err = fetchM3U(mURL.c_str(), &buffer);
+
+    if (err != OK) {
+        return false;
+    }
+
+    mPlaylist = new M3UParser(mURL.c_str(), buffer->data(), buffer->size());
+
+    if (mPlaylist->initCheck() != OK) {
+        return false;
+    }
+
+    if (!mPlaylist->meta()->findInt32(
+                "media-sequence", &mFirstItemSequenceNumber)) {
+        mFirstItemSequenceNumber = 0;
+    }
+
+    return true;
+}
+
+static int64_t getNowUs() {
+    struct timeval tv;
+    gettimeofday(&tv, NULL);
+
+    return (int64_t)tv.tv_usec + tv.tv_sec * 1000000ll;
+}
+
+bool LiveSource::switchToNext() {
+    mOffsetBias += mSourceSize;
+    mSourceSize = 0;
+
+    if (mLastFetchTimeUs < 0 || getNowUs() >= mLastFetchTimeUs + 15000000ll
+        || mPlaylistIndex == mPlaylist->size()) {
+        int32_t nextSequenceNumber =
+            mPlaylistIndex + mFirstItemSequenceNumber;
+
+        if (!loadPlaylist()) {
+            LOGE("failed to reload playlist");
+            return false;
+        }
+
+        if (mLastFetchTimeUs < 0) {
+            mPlaylistIndex = mPlaylist->size() / 2;
+        } else {
+            if (nextSequenceNumber < mFirstItemSequenceNumber
+                    || nextSequenceNumber
+                            >= mFirstItemSequenceNumber + (int32_t)mPlaylist->size()) {
+                LOGE("Cannot find sequence number %d in new playlist",
+                     nextSequenceNumber);
+
+                return false;
+            }
+
+            mPlaylistIndex = nextSequenceNumber - mFirstItemSequenceNumber;
+        }
+
+        mLastFetchTimeUs = getNowUs();
+    }
+
+    AString uri;
+    CHECK(mPlaylist->itemAt(mPlaylistIndex, &uri));
+    LOGI("switching to %s", uri.c_str());
+
+    if (mSource->connect(uri.c_str()) != OK
+            || mSource->getSize(&mSourceSize) != OK) {
+        return false;
+    }
+
+    mPlaylistIndex++;
+    return true;
+}
+
+ssize_t LiveSource::readAt(off_t offset, void *data, size_t size) {
+    CHECK(offset >= mOffsetBias);
+    offset -= mOffsetBias;
+
+    if (offset >= mSourceSize) {
+        CHECK_EQ(offset, mSourceSize);
+
+        offset -= mSourceSize;
+        if (!switchToNext()) {
+            return ERROR_END_OF_STREAM;
+        }
+    }
+
+    size_t numRead = 0;
+    while (numRead < size) {
+        ssize_t n = mSource->readAt(
+                offset + numRead, (uint8_t *)data + numRead, size - numRead);
+
+        if (n <= 0) {
+            break;
+        }
+
+        numRead += n;
+    }
+
+    return numRead;
+}
+
+status_t LiveSource::fetchM3U(const char *url, sp<ABuffer> *out) {
+    *out = NULL;
+
+    status_t err = mSource->connect(url);
+
+    if (err != OK) {
+        return err;
+    }
+
+    off_t size;
+    err = mSource->getSize(&size);
+
+    if (err != OK) {
+        return err;
+    }
+
+    sp<ABuffer> buffer = new ABuffer(size);
+    size_t offset = 0;
+    while (offset < (size_t)size) {
+        ssize_t n = mSource->readAt(
+                offset, buffer->data() + offset, size - offset);
+
+        if (n <= 0) {
+            return ERROR_IO;
+        }
+
+        offset += n;
+    }
+
+    *out = buffer;
+
+    return OK;
+}
+
+}  // namespace android
diff --git a/media/libstagefright/httplive/M3UParser.cpp b/media/libstagefright/httplive/M3UParser.cpp
new file mode 100644
index 0000000..edd8648
--- /dev/null
+++ b/media/libstagefright/httplive/M3UParser.cpp
@@ -0,0 +1,231 @@
+/*
+ * Copyright (C) 2010 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include "include/M3UParser.h"
+
+#include <media/stagefright/foundation/AMessage.h>
+#include <media/stagefright/MediaDebug.h>
+#include <media/stagefright/MediaErrors.h>
+
+namespace android {
+
+M3UParser::M3UParser(
+        const char *baseURI, const void *data, size_t size)
+    : mInitCheck(NO_INIT),
+      mBaseURI(baseURI),
+      mIsExtM3U(false),
+      mIsVariantPlaylist(false) {
+    mInitCheck = parse(data, size);
+}
+
+M3UParser::~M3UParser() {
+}
+
+status_t M3UParser::initCheck() const {
+    return mInitCheck;
+}
+
+bool M3UParser::isExtM3U() const {
+    return mIsExtM3U;
+}
+
+bool M3UParser::isVariantPlaylist() const {
+    return mIsVariantPlaylist;
+}
+
+sp<AMessage> M3UParser::meta() {
+    return mMeta;
+}
+
+size_t M3UParser::size() {
+    return mItems.size();
+}
+
+bool M3UParser::itemAt(size_t index, AString *uri, sp<AMessage> *meta) {
+    uri->clear();
+    if (meta) { *meta = NULL; }
+
+    if (index >= mItems.size()) {
+        return false;
+    }
+
+    *uri = mItems.itemAt(index).mURI;
+
+    if (meta) {
+        *meta = mItems.itemAt(index).mMeta;
+    }
+
+    return true;
+}
+
+static bool MakeURL(const char *baseURL, const char *url, AString *out) {
+    out->clear();
+
+    if (strncasecmp("http://", baseURL, 7)) {
+        // Base URL must be absolute
+        return false;
+    }
+
+    if (!strncasecmp("http://", url, 7)) {
+        // "url" is already an absolute URL, ignore base URL.
+        out->setTo(url);
+        return true;
+    }
+
+    size_t n = strlen(baseURL);
+    if (baseURL[n - 1] == '/') {
+        out->setTo(baseURL);
+        out->append(url);
+    } else {
+        char *slashPos = strrchr(baseURL, '/');
+
+        if (slashPos > &baseURL[6]) {
+            out->setTo(baseURL, slashPos - baseURL);
+        } else {
+            out->setTo(baseURL);
+        }
+
+        out->append("/");
+        out->append(url);
+    }
+
+    return true;
+}
+
+status_t M3UParser::parse(const void *_data, size_t size) {
+    int32_t lineNo = 0;
+
+    sp<AMessage> itemMeta;
+
+    const char *data = (const char *)_data;
+    size_t offset = 0;
+    while (offset < size) {
+        size_t offsetLF = offset;
+        while (offsetLF < size && data[offsetLF] != '\n') {
+            ++offsetLF;
+        }
+        if (offsetLF >= size) {
+            break;
+        }
+
+        AString line;
+        if (offsetLF > offset && data[offsetLF - 1] == '\r') {
+            line.setTo(&data[offset], offsetLF - offset - 1);
+        } else {
+            line.setTo(&data[offset], offsetLF - offset);
+        }
+
+        LOGI("#%s#", line.c_str());
+
+        if (lineNo == 0 && line == "#EXTM3U") {
+            mIsExtM3U = true;
+        }
+
+        if (mIsExtM3U) {
+            status_t err = OK;
+
+            if (line.startsWith("#EXT-X-TARGETDURATION")) {
+                if (mIsVariantPlaylist) {
+                    return ERROR_MALFORMED;
+                }
+                err = parseMetaData(line, &mMeta, "target-duration");
+            } else if (line.startsWith("#EXT-X-MEDIA-SEQUENCE")) {
+                if (mIsVariantPlaylist) {
+                    return ERROR_MALFORMED;
+                }
+                err = parseMetaData(line, &mMeta, "media-sequence");
+            } else if (line.startsWith("#EXTINF")) {
+                if (mIsVariantPlaylist) {
+                    return ERROR_MALFORMED;
+                }
+                err = parseMetaData(line, &itemMeta, "duration");
+            } else if (line.startsWith("#EXT-X-STREAM-INF")) {
+                if (mMeta != NULL) {
+                    return ERROR_MALFORMED;
+                }
+                mIsVariantPlaylist = true;
+            }
+
+            if (err != OK) {
+                return err;
+            }
+        }
+
+        if (!line.startsWith("#")) {
+            if (!mIsVariantPlaylist) {
+                int32_t durationSecs;
+                if (itemMeta == NULL
+                        || !itemMeta->findInt32("duration", &durationSecs)) {
+                    return ERROR_MALFORMED;
+                }
+            }
+
+            mItems.push();
+            Item *item = &mItems.editItemAt(mItems.size() - 1);
+
+            CHECK(MakeURL(mBaseURI.c_str(), line.c_str(), &item->mURI));
+
+            item->mMeta = itemMeta;
+
+            itemMeta.clear();
+        }
+
+        offset = offsetLF + 1;
+        ++lineNo;
+    }
+
+    return OK;
+}
+
+// static
+status_t M3UParser::parseMetaData(
+        const AString &line, sp<AMessage> *meta, const char *key) {
+    ssize_t colonPos = line.find(":");
+
+    if (colonPos < 0) {
+        return ERROR_MALFORMED;
+    }
+
+    int32_t x;
+    status_t err = ParseInt32(line.c_str() + colonPos + 1, &x);
+
+    if (err != OK) {
+        return err;
+    }
+
+    if (meta->get() == NULL) {
+        *meta = new AMessage;
+    }
+    (*meta)->setInt32(key, x);
+
+    return OK;
+}
+
+// static
+status_t M3UParser::ParseInt32(const char *s, int32_t *x) {
+    char *end;
+    long lval = strtol(s, &end, 10);
+
+    if (end == s || (*end != '\0' && *end != ',')) {
+        return ERROR_MALFORMED;
+    }
+
+    *x = (int32_t)lval;
+
+    return OK;
+}
+
+}  // namespace android
diff --git a/media/libstagefright/id3/Android.mk b/media/libstagefright/id3/Android.mk
index 93fac1c..23c8e44 100644
--- a/media/libstagefright/id3/Android.mk
+++ b/media/libstagefright/id3/Android.mk
@@ -1,5 +1,3 @@
-ifeq ($(BUILD_WITH_FULL_STAGEFRIGHT),true)
-
 LOCAL_PATH:= $(call my-dir)
 include $(CLEAR_VARS)
 
@@ -28,5 +26,3 @@
 LOCAL_MODULE := testid3
 
 include $(BUILD_EXECUTABLE)
-
-endif
diff --git a/media/libstagefright/include/AACDecoder.h b/media/libstagefright/include/AACDecoder.h
index f09addd..200f93c 100644
--- a/media/libstagefright/include/AACDecoder.h
+++ b/media/libstagefright/include/AACDecoder.h
@@ -25,6 +25,7 @@
 namespace android {
 
 struct MediaBufferGroup;
+struct MetaData;
 
 struct AACDecoder : public MediaSource {
     AACDecoder(const sp<MediaSource> &source);
@@ -41,6 +42,7 @@
     virtual ~AACDecoder();
 
 private:
+    sp<MetaData>    mMeta;
     sp<MediaSource> mSource;
     bool mStarted;
 
@@ -50,9 +52,11 @@
     void *mDecoderBuf;
     int64_t mAnchorTimeUs;
     int64_t mNumSamplesOutput;
+    status_t mInitCheck;
 
     MediaBuffer *mInputBuffer;
 
+    status_t initCheck();
     AACDecoder(const AACDecoder &);
     AACDecoder &operator=(const AACDecoder &);
 };
diff --git a/media/libstagefright/include/AACEncoder.h b/media/libstagefright/include/AACEncoder.h
new file mode 100644
index 0000000..ecc533f
--- /dev/null
+++ b/media/libstagefright/include/AACEncoder.h
@@ -0,0 +1,81 @@
+/*
+ * Copyright (C) 2010 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef AAC_ENCODER_H
+#define AAC_ENCODER_H
+
+#include <media/stagefright/MediaSource.h>
+#include <media/stagefright/MetaData.h>
+
+struct VO_AUDIO_CODECAPI;
+struct VO_MEM_OPERATOR;
+
+namespace android {
+
+struct MediaBufferGroup;
+
+class AACEncoder: public MediaSource {
+    public:
+        AACEncoder(const sp<MediaSource> &source, const sp<MetaData> &meta);
+
+        virtual status_t start(MetaData *params);
+        virtual status_t stop();
+        virtual sp<MetaData> getFormat();
+        virtual status_t read(
+                MediaBuffer **buffer, const ReadOptions *options);
+
+
+    protected:
+        virtual ~AACEncoder();
+
+    private:
+        sp<MediaSource>   mSource;
+        sp<MetaData>      mMeta;
+        bool              mStarted;
+        MediaBufferGroup *mBufferGroup;
+        MediaBuffer      *mInputBuffer;
+        status_t          mInitCheck;
+        int32_t           mSampleRate;
+        int32_t           mChannels;
+        int32_t           mBitRate;
+        int32_t           mFrameCount;
+
+        int64_t           mAnchorTimeUs;
+        int64_t           mNumInputSamples;
+
+        enum {
+            kNumSamplesPerFrame = 1024,
+        };
+
+        int16_t           mInputFrame[kNumSamplesPerFrame];
+
+        uint8_t           mAudioSpecificConfigData[2]; // auido specific data
+        void             *mEncoderHandle;
+        VO_AUDIO_CODECAPI *mApiHandle;
+        VO_MEM_OPERATOR  *mMemOperator;
+
+        status_t setAudioSpecificConfigData();
+        status_t initCheck();
+
+        AACEncoder& operator=(const AACEncoder &rhs);
+        AACEncoder(const AACEncoder& copy);
+
+};
+
+}
+
+#endif  //#ifndef AAC_ENCODER_H
+
diff --git a/media/libstagefright/include/AMRNBEncoder.h b/media/libstagefright/include/AMRNBEncoder.h
index 7167c00..71160e6 100644
--- a/media/libstagefright/include/AMRNBEncoder.h
+++ b/media/libstagefright/include/AMRNBEncoder.h
@@ -19,13 +19,14 @@
 #define AMR_NB_ENCODER_H_
 
 #include <media/stagefright/MediaSource.h>
+#include <media/stagefright/MetaData.h>
 
 namespace android {
 
 struct MediaBufferGroup;
 
 struct AMRNBEncoder : public MediaSource {
-    AMRNBEncoder(const sp<MediaSource> &source);
+    AMRNBEncoder(const sp<MediaSource> &source, const sp<MetaData> &meta);
 
     virtual status_t start(MetaData *params);
     virtual status_t stop();
@@ -40,6 +41,7 @@
 
 private:
     sp<MediaSource> mSource;
+    sp<MetaData>    mMeta;
     bool mStarted;
 
     MediaBufferGroup *mBufferGroup;
diff --git a/media/libstagefright/include/AMRWBEncoder.h b/media/libstagefright/include/AMRWBEncoder.h
new file mode 100644
index 0000000..f2d155f
--- /dev/null
+++ b/media/libstagefright/include/AMRWBEncoder.h
@@ -0,0 +1,72 @@
+/*
+ * Copyright (C) 2010 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef AMR_WB_ENCODER_H
+#define AMR_WB_ENCODER_H
+
+#include <media/stagefright/MediaSource.h>
+#include <media/stagefright/MetaData.h>
+
+struct VO_AUDIO_CODECAPI;
+struct VO_MEM_OPERATOR;
+
+namespace android {
+
+struct MediaBufferGroup;
+
+class AMRWBEncoder: public MediaSource {
+    public:
+        AMRWBEncoder(const sp<MediaSource> &source, const sp<MetaData> &meta);
+
+        virtual status_t start(MetaData *params);
+        virtual status_t stop();
+        virtual sp<MetaData> getFormat();
+        virtual status_t read(
+                MediaBuffer **buffer, const ReadOptions *options);
+
+
+    protected:
+        virtual ~AMRWBEncoder();
+
+    private:
+        sp<MediaSource>   mSource;
+        sp<MetaData>      mMeta;
+        bool              mStarted;
+        MediaBufferGroup *mBufferGroup;
+        MediaBuffer      *mInputBuffer;
+        status_t          mInitCheck;
+        int32_t           mBitRate;
+        void             *mEncoderHandle;
+        VO_AUDIO_CODECAPI *mApiHandle;
+        VO_MEM_OPERATOR  *mMemOperator;
+
+        int64_t mAnchorTimeUs;
+        int64_t mNumFramesOutput;
+
+        int16_t mInputFrame[320];
+        int32_t mNumInputSamples;
+
+        status_t initCheck();
+
+        AMRWBEncoder& operator=(const AMRWBEncoder &rhs);
+        AMRWBEncoder(const AMRWBEncoder& copy);
+
+};
+
+}
+
+#endif  //#ifndef AMR_WB_ENCODER_H
+
diff --git a/media/libstagefright/include/ARTSPController.h b/media/libstagefright/include/ARTSPController.h
new file mode 100644
index 0000000..55efd41
--- /dev/null
+++ b/media/libstagefright/include/ARTSPController.h
@@ -0,0 +1,53 @@
+/*
+ * Copyright (C) 2010 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef A_RTSP_CONTROLLER_H_
+
+#define A_RTSP_CONTROLLER_H_
+
+#include <media/stagefright/foundation/ABase.h>
+#include <media/stagefright/MediaExtractor.h>
+
+namespace android {
+
+struct ALooper;
+struct MyHandler;
+
+struct ARTSPController : public MediaExtractor {
+    ARTSPController(const sp<ALooper> &looper);
+
+    status_t connect(const char *url);
+    void disconnect();
+
+    virtual size_t countTracks();
+    virtual sp<MediaSource> getTrack(size_t index);
+
+    virtual sp<MetaData> getTrackMetaData(
+            size_t index, uint32_t flags);
+
+protected:
+    virtual ~ARTSPController();
+
+private:
+    sp<ALooper> mLooper;
+    sp<MyHandler> mHandler;
+
+    DISALLOW_EVIL_CONSTRUCTORS(ARTSPController);
+};
+
+}  // namespace android
+
+#endif  // A_RTSP_CONTROLLER_H_
diff --git a/media/libstagefright/include/AVCEncoder.h b/media/libstagefright/include/AVCEncoder.h
new file mode 100644
index 0000000..4fe2e30
--- /dev/null
+++ b/media/libstagefright/include/AVCEncoder.h
@@ -0,0 +1,90 @@
+/*
+ * Copyright (C) 2010 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef AVC_ENCODER_H_
+
+#define AVC_ENCODER_H_
+
+#include <media/stagefright/MediaBuffer.h>
+#include <media/stagefright/MediaSource.h>
+#include <utils/Vector.h>
+
+struct tagAVCHandle;
+struct tagAVCEncParam;
+
+namespace android {
+
+struct MediaBuffer;
+struct MediaBufferGroup;
+
+struct AVCEncoder : public MediaSource,
+                    public MediaBufferObserver {
+    AVCEncoder(const sp<MediaSource> &source,
+            const sp<MetaData>& meta);
+
+    virtual status_t start(MetaData *params);
+    virtual status_t stop();
+
+    virtual sp<MetaData> getFormat();
+
+    virtual status_t read(
+            MediaBuffer **buffer, const ReadOptions *options);
+
+    virtual void signalBufferReturned(MediaBuffer *buffer);
+
+    // Callbacks required by the encoder
+    int32_t allocOutputBuffers(unsigned int sizeInMbs, unsigned int numBuffers);
+    void    unbindOutputBuffer(int32_t index);
+    int32_t bindOutputBuffer(int32_t index, uint8_t **yuv);
+
+protected:
+    virtual ~AVCEncoder();
+
+private:
+    sp<MediaSource> mSource;
+    sp<MetaData>    mFormat;
+    sp<MetaData>    mMeta;
+
+    int32_t  mVideoWidth;
+    int32_t  mVideoHeight;
+    int32_t  mVideoFrameRate;
+    int32_t  mVideoBitRate;
+    int32_t  mVideoColorFormat;
+    int64_t  mNumInputFrames;
+    status_t mInitCheck;
+    bool     mStarted;
+    bool     mSpsPpsHeaderReceived;
+    bool     mReadyForNextFrame;
+    int32_t  mIsIDRFrame;  // for set kKeyIsSyncFrame
+
+    tagAVCHandle          *mHandle;
+    tagAVCEncParam        *mEncParams;
+    MediaBuffer           *mInputBuffer;
+    uint8_t               *mInputFrameData;
+    MediaBufferGroup      *mGroup;
+    Vector<MediaBuffer *> mOutputBuffers;
+
+
+    status_t initCheck(const sp<MetaData>& meta);
+    void releaseOutputBuffers();
+
+    AVCEncoder(const AVCEncoder &);
+    AVCEncoder &operator=(const AVCEncoder &);
+};
+
+}  // namespace android
+
+#endif  // AVC_ENCODER_H_
diff --git a/media/libstagefright/include/AwesomePlayer.h b/media/libstagefright/include/AwesomePlayer.h
index 9455743..8d0877c 100644
--- a/media/libstagefright/include/AwesomePlayer.h
+++ b/media/libstagefright/include/AwesomePlayer.h
@@ -18,12 +18,13 @@
 
 #define AWESOME_PLAYER_H_
 
+#include "NuHTTPDataSource.h"
 #include "TimedEventQueue.h"
 
 #include <media/MediaPlayerInterface.h>
 #include <media/stagefright/DataSource.h>
-#include <media/stagefright/HTTPDataSource.h>
 #include <media/stagefright/OMXClient.h>
+#include <media/stagefright/TimeSource.h>
 #include <utils/threads.h>
 
 namespace android {
@@ -33,8 +34,10 @@
 struct MediaBuffer;
 struct MediaExtractor;
 struct MediaSource;
-struct Prefetcher;
-struct TimeSource;
+struct NuCachedSource2;
+
+struct ALooper;
+struct ARTSPController;
 
 struct AwesomeRenderer : public RefBase {
     AwesomeRenderer() {}
@@ -98,6 +101,9 @@
         PREPARED            = 16,
         AT_EOS              = 32,
         PREPARE_CANCELLED   = 64,
+        CACHE_UNDERRUN      = 128,
+        AUDIO_AT_EOS        = 256,
+        VIDEO_AT_EOS        = 512,
     };
 
     mutable Mutex mLock;
@@ -111,6 +117,7 @@
     sp<ISurface> mISurface;
     sp<MediaPlayerBase::AudioSink> mAudioSink;
 
+    SystemTimeSource mSystemTimeSource;
     TimeSource *mTimeSource;
 
     String8 mUri;
@@ -166,8 +173,11 @@
     MediaBuffer *mLastVideoBuffer;
     MediaBuffer *mVideoBuffer;
 
-    sp<Prefetcher> mPrefetcher;
-    sp<HTTPDataSource> mConnectingDataSource;
+    sp<NuHTTPDataSource> mConnectingDataSource;
+    sp<NuCachedSource2> mCachedSource;
+
+    sp<ALooper> mLooper;
+    sp<ARTSPController> mRTSPController;
 
     struct SuspensionState {
         String8 mUri;
diff --git a/media/libstagefright/include/LiveSource.h b/media/libstagefright/include/LiveSource.h
new file mode 100644
index 0000000..c55508c
--- /dev/null
+++ b/media/libstagefright/include/LiveSource.h
@@ -0,0 +1,69 @@
+/*
+ * Copyright (C) 2010 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef LIVE_SOURCE_H_
+
+#define LIVE_SOURCE_H_
+
+#include <media/stagefright/foundation/ABase.h>
+#include <media/stagefright/foundation/AString.h>
+#include <media/stagefright/DataSource.h>
+#include <utils/Vector.h>
+
+namespace android {
+
+struct ABuffer;
+struct NuHTTPDataSource;
+struct M3UParser;
+
+struct LiveSource : public DataSource {
+    LiveSource(const char *url);
+
+    virtual status_t initCheck() const;
+
+    virtual ssize_t readAt(off_t offset, void *data, size_t size);
+
+    virtual uint32_t flags() {
+        return kWantsPrefetching;
+    }
+
+protected:
+    virtual ~LiveSource();
+
+private:
+    AString mURL;
+    status_t mInitCheck;
+
+    sp<M3UParser> mPlaylist;
+    int32_t mFirstItemSequenceNumber;
+    size_t mPlaylistIndex;
+    int64_t mLastFetchTimeUs;
+
+    sp<NuHTTPDataSource> mSource;
+    off_t mSourceSize;
+    off_t mOffsetBias;
+
+    status_t fetchM3U(const char *url, sp<ABuffer> *buffer);
+
+    bool switchToNext();
+    bool loadPlaylist();
+
+    DISALLOW_EVIL_CONSTRUCTORS(LiveSource);
+};
+
+}  // namespace android
+
+#endif  // LIVE_SOURCE_H_
diff --git a/media/libstagefright/include/M3UParser.h b/media/libstagefright/include/M3UParser.h
new file mode 100644
index 0000000..36553de
--- /dev/null
+++ b/media/libstagefright/include/M3UParser.h
@@ -0,0 +1,71 @@
+/*
+ * Copyright (C) 2010 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef M3U_PARSER_H_
+
+#define M3U_PARSER_H_
+
+#include <media/stagefright/foundation/ABase.h>
+#include <media/stagefright/foundation/AMessage.h>
+#include <media/stagefright/foundation/AString.h>
+#include <utils/Vector.h>
+
+namespace android {
+
+struct M3UParser : public RefBase {
+    M3UParser(const char *baseURI, const void *data, size_t size);
+
+    status_t initCheck() const;
+
+    bool isExtM3U() const;
+    bool isVariantPlaylist() const;
+
+    sp<AMessage> meta();
+
+    size_t size();
+    bool itemAt(size_t index, AString *uri, sp<AMessage> *meta = NULL);
+
+protected:
+    virtual ~M3UParser();
+
+private:
+    struct Item {
+        AString mURI;
+        sp<AMessage> mMeta;
+    };
+
+    status_t mInitCheck;
+
+    AString mBaseURI;
+    bool mIsExtM3U;
+    bool mIsVariantPlaylist;
+
+    sp<AMessage> mMeta;
+    Vector<Item> mItems;
+
+    status_t parse(const void *data, size_t size);
+
+    static status_t parseMetaData(
+            const AString &line, sp<AMessage> *meta, const char *key);
+
+    static status_t ParseInt32(const char *s, int32_t *x);
+
+    DISALLOW_EVIL_CONSTRUCTORS(M3UParser);
+};
+
+}  // namespace android
+
+#endif  // M3U_PARSER_H_
diff --git a/media/libstagefright/include/M4vH263Encoder.h b/media/libstagefright/include/M4vH263Encoder.h
new file mode 100644
index 0000000..dd146f4
--- /dev/null
+++ b/media/libstagefright/include/M4vH263Encoder.h
@@ -0,0 +1,80 @@
+/*
+ * Copyright (C) 2010 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef M4V_H263_ENCODER_H_
+
+#define M4V_H263_ENCODER_H_
+
+#include <media/stagefright/MediaBuffer.h>
+#include <media/stagefright/MediaSource.h>
+
+struct tagvideoEncControls;
+struct tagvideoEncOptions;
+
+namespace android {
+
+struct MediaBuffer;
+struct MediaBufferGroup;
+
+struct M4vH263Encoder : public MediaSource,
+                    public MediaBufferObserver {
+    M4vH263Encoder(const sp<MediaSource> &source,
+            const sp<MetaData>& meta);
+
+    virtual status_t start(MetaData *params);
+    virtual status_t stop();
+
+    virtual sp<MetaData> getFormat();
+
+    virtual status_t read(
+            MediaBuffer **buffer, const ReadOptions *options);
+
+    virtual void signalBufferReturned(MediaBuffer *buffer);
+
+protected:
+    virtual ~M4vH263Encoder();
+
+private:
+    sp<MediaSource> mSource;
+    sp<MetaData>    mFormat;
+    sp<MetaData>    mMeta;
+
+    int32_t  mVideoWidth;
+    int32_t  mVideoHeight;
+    int32_t  mVideoFrameRate;
+    int32_t  mVideoBitRate;
+    int32_t  mVideoColorFormat;
+    int64_t  mNumInputFrames;
+    int64_t  mNextModTimeUs;
+    status_t mInitCheck;
+    bool     mStarted;
+
+    tagvideoEncControls   *mHandle;
+    tagvideoEncOptions    *mEncParams;
+    MediaBuffer           *mInputBuffer;
+    uint8_t               *mInputFrameData;
+    MediaBufferGroup      *mGroup;
+
+    status_t initCheck(const sp<MetaData>& meta);
+    void releaseOutputBuffers();
+
+    M4vH263Encoder(const M4vH263Encoder &);
+    M4vH263Encoder &operator=(const M4vH263Encoder &);
+};
+
+}  // namespace android
+
+#endif  // M4V_H263_ENCODER_H_
diff --git a/media/libstagefright/include/MP3Decoder.h b/media/libstagefright/include/MP3Decoder.h
index 88aa4c6..4086fb6 100644
--- a/media/libstagefright/include/MP3Decoder.h
+++ b/media/libstagefright/include/MP3Decoder.h
@@ -42,6 +42,9 @@
 
 private:
     sp<MediaSource> mSource;
+    sp<MetaData> mMeta;
+    int32_t mNumChannels;
+
     bool mStarted;
 
     MediaBufferGroup *mBufferGroup;
@@ -49,10 +52,12 @@
     tPVMP3DecoderExternal *mConfig;
     void *mDecoderBuf;
     int64_t mAnchorTimeUs;
-    int64_t mNumSamplesOutput;
+    int64_t mNumFramesOutput;
 
     MediaBuffer *mInputBuffer;
 
+    void init();
+
     MP3Decoder(const MP3Decoder &);
     MP3Decoder &operator=(const MP3Decoder &);
 };
diff --git a/media/libstagefright/include/MPEG2TSExtractor.h b/media/libstagefright/include/MPEG2TSExtractor.h
new file mode 100644
index 0000000..c96973b
--- /dev/null
+++ b/media/libstagefright/include/MPEG2TSExtractor.h
@@ -0,0 +1,54 @@
+#ifndef MPEG2_TS_EXTRACTOR_H_
+
+#define MPEG2_TS_EXTRACTOR_H_
+
+#include <media/stagefright/foundation/ABase.h>
+#include <media/stagefright/MediaExtractor.h>
+#include <utils/threads.h>
+#include <utils/Vector.h>
+
+namespace android {
+
+struct AnotherPacketSource;
+struct ATSParser;
+struct DataSource;
+struct MPEG2TSSource;
+struct String8;
+
+struct MPEG2TSExtractor : public MediaExtractor {
+    MPEG2TSExtractor(const sp<DataSource> &source);
+
+    virtual size_t countTracks();
+    virtual sp<MediaSource> getTrack(size_t index);
+    virtual sp<MetaData> getTrackMetaData(size_t index, uint32_t flags);
+
+    virtual sp<MetaData> getMetaData();
+
+    virtual uint32_t flags() const {
+        return CAN_PAUSE;
+    }
+
+private:
+    friend struct MPEG2TSSource;
+
+    Mutex mLock;
+
+    sp<DataSource> mDataSource;
+    sp<ATSParser> mParser;
+
+    Vector<sp<AnotherPacketSource> > mSourceImpls;
+
+    off_t mOffset;
+
+    void init();
+    status_t feedMore();
+
+    DISALLOW_EVIL_CONSTRUCTORS(MPEG2TSExtractor);
+};
+
+bool SniffMPEG2TS(
+        const sp<DataSource> &source, String8 *mimeType, float *confidence);
+
+}  // namespace android
+
+#endif  // MPEG2_TS_EXTRACTOR_H_
diff --git a/media/libstagefright/include/NuCachedSource2.h b/media/libstagefright/include/NuCachedSource2.h
new file mode 100644
index 0000000..3a20c16
--- /dev/null
+++ b/media/libstagefright/include/NuCachedSource2.h
@@ -0,0 +1,98 @@
+/*
+ * Copyright (C) 2010 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef NU_CACHED_SOURCE_2_H_
+
+#define NU_CACHED_SOURCE_2_H_
+
+#include <media/stagefright/foundation/ABase.h>
+#include <media/stagefright/foundation/AHandlerReflector.h>
+#include <media/stagefright/DataSource.h>
+
+namespace android {
+
+struct ALooper;
+struct PageCache;
+
+struct NuCachedSource2 : public DataSource {
+    NuCachedSource2(const sp<DataSource> &source);
+
+    virtual status_t initCheck() const;
+
+    virtual ssize_t readAt(off_t offset, void *data, size_t size);
+
+    virtual status_t getSize(off_t *size);
+    virtual uint32_t flags();
+
+    ////////////////////////////////////////////////////////////////////////////
+
+    size_t cachedSize();
+    size_t approxDataRemaining(bool *eos);
+
+protected:
+    virtual ~NuCachedSource2();
+
+private:
+    friend struct AHandlerReflector<NuCachedSource2>;
+
+    enum {
+        kPageSize            = 65536,
+        kHighWaterThreshold  = 5 * 1024 * 1024,
+        kLowWaterThreshold   = 512 * 1024,
+
+        // Read data after a 15 sec timeout whether we're actively
+        // fetching or not.
+        kKeepAliveIntervalUs = 15000000,
+    };
+
+    enum {
+        kWhatFetchMore  = 'fetc',
+        kWhatRead       = 'read',
+    };
+
+    sp<DataSource> mSource;
+    sp<AHandlerReflector<NuCachedSource2> > mReflector;
+    sp<ALooper> mLooper;
+
+    Mutex mSerializer;
+    Mutex mLock;
+    Condition mCondition;
+
+    PageCache *mCache;
+    off_t mCacheOffset;
+    status_t mFinalStatus;
+    off_t mLastAccessPos;
+    sp<AMessage> mAsyncResult;
+    bool mFetching;
+    int64_t mLastFetchTimeUs;
+
+    void onMessageReceived(const sp<AMessage> &msg);
+    void onFetch();
+    void onRead(const sp<AMessage> &msg);
+
+    void fetchInternal();
+    ssize_t readInternal(off_t offset, void *data, size_t size);
+    status_t seekInternal_l(off_t offset);
+
+    size_t approxDataRemaining_l(bool *eos);
+    void restartPrefetcherIfNecessary_l();
+
+    DISALLOW_EVIL_CONSTRUCTORS(NuCachedSource2);
+};
+
+}  // namespace android
+
+#endif  // NU_CACHED_SOURCE_2_H_
diff --git a/media/libstagefright/include/NuHTTPDataSource.h b/media/libstagefright/include/NuHTTPDataSource.h
new file mode 100644
index 0000000..8593a91
--- /dev/null
+++ b/media/libstagefright/include/NuHTTPDataSource.h
@@ -0,0 +1,73 @@
+#ifndef NU_HTTP_DATA_SOURCE_H_
+
+#define NU_HTTP_DATA_SOURCE_H_
+
+#include <media/stagefright/DataSource.h>
+#include <utils/String8.h>
+#include <utils/threads.h>
+
+#include "HTTPStream.h"
+
+namespace android {
+
+struct NuHTTPDataSource : public DataSource {
+    NuHTTPDataSource();
+
+    status_t connect(
+            const char *uri,
+            const KeyedVector<String8, String8> *headers = NULL,
+            off_t offset = 0);
+
+    void disconnect();
+
+    virtual status_t initCheck() const;
+
+    virtual ssize_t readAt(off_t offset, void *data, size_t size);
+    virtual status_t getSize(off_t *size);
+    virtual uint32_t flags();
+
+protected:
+    virtual ~NuHTTPDataSource();
+
+private:
+    enum State {
+        DISCONNECTED,
+        CONNECTING,
+        CONNECTED
+    };
+
+    Mutex mLock;
+
+    State mState;
+
+    String8 mHost;
+    unsigned mPort;
+    String8 mPath;
+    String8 mHeaders;
+
+    HTTPStream mHTTP;
+    off_t mOffset;
+    off_t mContentLength;
+    bool mContentLengthValid;
+
+    status_t connect(
+            const char *uri, const String8 &headers, off_t offset);
+
+    status_t connect(
+            const char *host, unsigned port, const char *path,
+            const String8 &headers,
+            off_t offset);
+
+    void applyTimeoutResponse();
+
+    static void MakeFullHeaders(
+            const KeyedVector<String8, String8> *overrides,
+            String8 *headers);
+
+    NuHTTPDataSource(const NuHTTPDataSource &);
+    NuHTTPDataSource &operator=(const NuHTTPDataSource &);
+};
+
+}  // namespace android
+
+#endif  // NU_HTTP_DATA_SOURCE_H_
diff --git a/media/libstagefright/include/OMX.h b/media/libstagefright/include/OMX.h
index ea131e8..c99da59 100644
--- a/media/libstagefright/include/OMX.h
+++ b/media/libstagefright/include/OMX.h
@@ -102,7 +102,7 @@
             OMX_IN OMX_U32 nData1,
             OMX_IN OMX_U32 nData2,
             OMX_IN OMX_PTR pEventData);
-        
+
     OMX_ERRORTYPE OnEmptyBufferDone(
             node_id node, OMX_IN OMX_BUFFERHEADERTYPE *pBuffer);
 
@@ -115,20 +115,19 @@
     virtual ~OMX();
 
 private:
-    Mutex mLock;
-
-    OMXMaster *mMaster;
-
     struct CallbackDispatcher;
-    sp<CallbackDispatcher> mDispatcher;
 
+    Mutex mLock;
+    OMXMaster *mMaster;
     int32_t mNodeCounter;
 
     KeyedVector<wp<IBinder>, OMXNodeInstance *> mLiveNodes;
     KeyedVector<node_id, OMXNodeInstance *> mNodeIDToInstance;
+    KeyedVector<node_id, sp<CallbackDispatcher> > mDispatchers;
 
     node_id makeNodeID(OMXNodeInstance *instance);
     OMXNodeInstance *findInstance(node_id node);
+    sp<CallbackDispatcher> findDispatcher(node_id node);
 
     void invalidateNodeID_l(node_id node);
 
diff --git a/media/libstagefright/include/Prefetcher.h b/media/libstagefright/include/Prefetcher.h
deleted file mode 100644
index b411d1b..0000000
--- a/media/libstagefright/include/Prefetcher.h
+++ /dev/null
@@ -1,70 +0,0 @@
-/*
- * Copyright (C) 2010 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#ifndef PREFETCHER_H_
-
-#define PREFETCHER_H_
-
-#include <utils/RefBase.h>
-#include <utils/Vector.h>
-#include <utils/threads.h>
-
-namespace android {
-
-struct MediaSource;
-struct PrefetchedSource;
-
-struct Prefetcher : public RefBase {
-    Prefetcher();
-
-    // Given an existing MediaSource returns a new MediaSource
-    // that will benefit from prefetching/caching the original one.
-    sp<MediaSource> addSource(const sp<MediaSource> &source);
-
-    int64_t getCachedDurationUs(bool *noMoreData = NULL);
-
-    // If provided (non-NULL), "continueFunc" will be called repeatedly
-    // while preparing and preparation will finish early if it returns
-    // false. In this case "-EINTR" is returned as a result.
-    status_t prepare(
-            bool (*continueFunc)(void *cookie) = NULL,
-            void *cookie = NULL);
-
-protected:
-    virtual ~Prefetcher();
-
-private:
-    Mutex mLock;
-    Condition mCondition;
-
-    Vector<wp<PrefetchedSource> > mSources;
-    android_thread_id_t mThread;
-    bool mDone;
-    bool mThreadExited;
-
-    void startThread();
-    void stopThread();
-
-    static int ThreadWrapper(void *me);
-    void threadFunc();
-
-    Prefetcher(const Prefetcher &);
-    Prefetcher &operator=(const Prefetcher &);
-};
-
-}  // namespace android
-
-#endif  // PREFETCHER_H_
diff --git a/media/libstagefright/include/ThrottledSource.h b/media/libstagefright/include/ThrottledSource.h
new file mode 100644
index 0000000..88164b3
--- /dev/null
+++ b/media/libstagefright/include/ThrottledSource.h
@@ -0,0 +1,52 @@
+/*
+ * Copyright (C) 2010 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef THROTTLED_SOURCE_H_
+
+#define THROTTLED_SOURCE_H_
+
+#include <media/stagefright/DataSource.h>
+#include <utils/threads.h>
+
+namespace android {
+
+struct ThrottledSource : public DataSource {
+    ThrottledSource(
+            const sp<DataSource> &source,
+            int32_t bandwidthLimitBytesPerSecond);
+
+    virtual status_t initCheck() const;
+
+    virtual ssize_t readAt(off_t offset, void *data, size_t size);
+
+    virtual status_t getSize(off_t *size);
+    virtual uint32_t flags();
+
+private:
+    Mutex mLock;
+
+    sp<DataSource> mSource;
+    int32_t mBandwidthLimitBytesPerSecond;
+    int64_t mStartTimeUs;
+    size_t mTotalTransferred;
+
+    ThrottledSource(const ThrottledSource &);
+    ThrottledSource &operator=(const ThrottledSource &);
+};
+
+}  // namespace android
+
+#endif  // THROTTLED_SOURCE_H_
diff --git a/media/libstagefright/include/VPXDecoder.h b/media/libstagefright/include/VPXDecoder.h
new file mode 100644
index 0000000..550c612
--- /dev/null
+++ b/media/libstagefright/include/VPXDecoder.h
@@ -0,0 +1,60 @@
+/*
+ * Copyright (C) 2010 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef VPX_DECODER_H_
+
+#define VPX_DECODER_H_
+
+#include <media/stagefright/MediaSource.h>
+#include <utils/Vector.h>
+
+namespace android {
+
+struct MediaBufferGroup;
+
+struct VPXDecoder : public MediaSource {
+    VPXDecoder(const sp<MediaSource> &source);
+
+    virtual status_t start(MetaData *params);
+    virtual status_t stop();
+
+    virtual sp<MetaData> getFormat();
+
+    virtual status_t read(
+            MediaBuffer **buffer, const ReadOptions *options);
+
+protected:
+    virtual ~VPXDecoder();
+
+private:
+    sp<MediaSource> mSource;
+    bool mStarted;
+    int32_t mWidth, mHeight;
+    size_t mBufferSize;
+
+    void *mCtx;
+    MediaBufferGroup *mBufferGroup;
+
+    sp<MetaData> mFormat;
+
+    VPXDecoder(const VPXDecoder &);
+    VPXDecoder &operator=(const VPXDecoder &);
+};
+
+}  // namespace android
+
+#endif  // VPX_DECODER_H_
+
diff --git a/media/libstagefright/matroska/Android.mk b/media/libstagefright/matroska/Android.mk
new file mode 100644
index 0000000..0e72198
--- /dev/null
+++ b/media/libstagefright/matroska/Android.mk
@@ -0,0 +1,16 @@
+LOCAL_PATH:= $(call my-dir)
+include $(CLEAR_VARS)
+
+LOCAL_SRC_FILES:=                 \
+        MatroskaExtractor.cpp     \
+        mkvparser.cpp             \
+
+LOCAL_C_INCLUDES:= \
+	$(JNI_H_INCLUDE) \
+        $(TOP)/external/opencore/extern_libs_v2/khronos/openmax/include \
+
+LOCAL_CFLAGS += -Wno-multichar
+
+LOCAL_MODULE:= libstagefright_matroska
+
+include $(BUILD_STATIC_LIBRARY)
diff --git a/media/libstagefright/matroska/MatroskaExtractor.cpp b/media/libstagefright/matroska/MatroskaExtractor.cpp
new file mode 100644
index 0000000..339a7b5
--- /dev/null
+++ b/media/libstagefright/matroska/MatroskaExtractor.cpp
@@ -0,0 +1,594 @@
+/*
+ * Copyright (C) 2010 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+//#define LOG_NDEBUG 0
+#define LOG_TAG "MatroskaExtractor"
+#include <utils/Log.h>
+
+#include "MatroskaExtractor.h"
+
+#include "mkvparser.hpp"
+
+#include <media/stagefright/DataSource.h>
+#include <media/stagefright/MediaBuffer.h>
+#include <media/stagefright/MediaDebug.h>
+#include <media/stagefright/MediaDefs.h>
+#include <media/stagefright/MediaErrors.h>
+#include <media/stagefright/MediaSource.h>
+#include <media/stagefright/MetaData.h>
+#include <utils/String8.h>
+
+namespace android {
+
+struct DataSourceReader : public mkvparser::IMkvReader {
+    DataSourceReader(const sp<DataSource> &source)
+        : mSource(source) {
+    }
+
+    virtual int Read(long long position, long length, unsigned char* buffer) {
+        CHECK(position >= 0);
+        CHECK(length >= 0);
+
+        if (length == 0) {
+            return 0;
+        }
+
+        ssize_t n = mSource->readAt(position, buffer, length);
+
+        if (n <= 0) {
+            return -1;
+        }
+
+        return 0;
+    }
+
+    virtual int Length(long long* total, long long* available) {
+        off_t size;
+        if (mSource->getSize(&size) != OK) {
+            return -1;
+        }
+
+        if (total) {
+            *total = size;
+        }
+
+        if (available) {
+            *available = size;
+        }
+
+        return 0;
+    }
+
+private:
+    sp<DataSource> mSource;
+
+    DataSourceReader(const DataSourceReader &);
+    DataSourceReader &operator=(const DataSourceReader &);
+};
+
+////////////////////////////////////////////////////////////////////////////////
+
+#include <ctype.h>
+static void hexdump(const void *_data, size_t size) {
+    const uint8_t *data = (const uint8_t *)_data;
+    size_t offset = 0;
+    while (offset < size) {
+        printf("0x%04x  ", offset);
+
+        size_t n = size - offset;
+        if (n > 16) {
+            n = 16;
+        }
+
+        for (size_t i = 0; i < 16; ++i) {
+            if (i == 8) {
+                printf(" ");
+            }
+
+            if (offset + i < size) {
+                printf("%02x ", data[offset + i]);
+            } else {
+                printf("   ");
+            }
+        }
+
+        printf(" ");
+
+        for (size_t i = 0; i < n; ++i) {
+            if (isprint(data[offset + i])) {
+                printf("%c", data[offset + i]);
+            } else {
+                printf(".");
+            }
+        }
+
+        printf("\n");
+
+        offset += 16;
+    }
+}
+
+struct BlockIterator {
+    BlockIterator(mkvparser::Segment *segment, unsigned long trackNum);
+
+    bool eos() const;
+
+    void advance();
+    void reset();
+    void seek(int64_t seekTimeUs);
+
+    const mkvparser::Block *block() const;
+    int64_t blockTimeUs() const;
+
+private:
+    mkvparser::Segment *mSegment;
+    unsigned long mTrackNum;
+
+    mkvparser::Cluster *mCluster;
+    const mkvparser::BlockEntry *mBlockEntry;
+
+    BlockIterator(const BlockIterator &);
+    BlockIterator &operator=(const BlockIterator &);
+};
+
+struct MatroskaSource : public MediaSource {
+    MatroskaSource(
+            const sp<MatroskaExtractor> &extractor, size_t index);
+
+    virtual status_t start(MetaData *params);
+    virtual status_t stop();
+
+    virtual sp<MetaData> getFormat();
+
+    virtual status_t read(
+            MediaBuffer **buffer, const ReadOptions *options);
+
+private:
+    enum Type {
+        AVC,
+        AAC,
+        OTHER
+    };
+
+    sp<MatroskaExtractor> mExtractor;
+    size_t mTrackIndex;
+    Type mType;
+    BlockIterator mBlockIter;
+
+    status_t advance();
+
+    MatroskaSource(const MatroskaSource &);
+    MatroskaSource &operator=(const MatroskaSource &);
+};
+
+MatroskaSource::MatroskaSource(
+        const sp<MatroskaExtractor> &extractor, size_t index)
+    : mExtractor(extractor),
+      mTrackIndex(index),
+      mType(OTHER),
+      mBlockIter(mExtractor->mSegment,
+                 mExtractor->mTracks.itemAt(index).mTrackNum) {
+    const char *mime;
+    CHECK(mExtractor->mTracks.itemAt(index).mMeta->
+            findCString(kKeyMIMEType, &mime));
+
+    if (!strcasecmp(mime, MEDIA_MIMETYPE_VIDEO_AVC)) {
+        mType = AVC;
+    } else if (!strcasecmp(mime, MEDIA_MIMETYPE_AUDIO_AAC)) {
+        mType = AAC;
+    }
+}
+
+status_t MatroskaSource::start(MetaData *params) {
+    mBlockIter.reset();
+
+    return OK;
+}
+
+status_t MatroskaSource::stop() {
+    return OK;
+}
+
+sp<MetaData> MatroskaSource::getFormat() {
+    return mExtractor->mTracks.itemAt(mTrackIndex).mMeta;
+}
+
+////////////////////////////////////////////////////////////////////////////////
+
+BlockIterator::BlockIterator(
+        mkvparser::Segment *segment, unsigned long trackNum)
+    : mSegment(segment),
+      mTrackNum(trackNum),
+      mCluster(NULL),
+      mBlockEntry(NULL) {
+    reset();
+}
+
+bool BlockIterator::eos() const {
+    return mCluster == NULL || mCluster->EOS();
+}
+
+void BlockIterator::advance() {
+    while (!eos()) {
+        if (mBlockEntry != NULL) {
+            mBlockEntry = mCluster->GetNext(mBlockEntry);
+        } else if (mCluster != NULL) {
+            mCluster = mSegment->GetNext(mCluster);
+
+            if (eos()) {
+                break;
+            }
+
+            mBlockEntry = mCluster->GetFirst();
+        }
+
+        if (mBlockEntry != NULL
+                && mBlockEntry->GetBlock()->GetTrackNumber() == mTrackNum) {
+            break;
+        }
+    }
+}
+
+void BlockIterator::reset() {
+    mCluster = mSegment->GetFirst();
+    mBlockEntry = mCluster->GetFirst();
+
+    while (!eos() && block()->GetTrackNumber() != mTrackNum) {
+        advance();
+    }
+}
+
+void BlockIterator::seek(int64_t seekTimeUs) {
+    mCluster = mSegment->GetCluster(seekTimeUs * 1000ll);
+    mBlockEntry = mCluster != NULL ? mCluster->GetFirst() : NULL;
+
+    while (!eos() && block()->GetTrackNumber() != mTrackNum) {
+        advance();
+    }
+
+    while (!eos() && !mBlockEntry->GetBlock()->IsKey()) {
+        advance();
+    }
+}
+
+const mkvparser::Block *BlockIterator::block() const {
+    CHECK(!eos());
+
+    return mBlockEntry->GetBlock();
+}
+
+int64_t BlockIterator::blockTimeUs() const {
+    return (mBlockEntry->GetBlock()->GetTime(mCluster) + 500ll) / 1000ll;
+}
+
+////////////////////////////////////////////////////////////////////////////////
+
+status_t MatroskaSource::read(
+        MediaBuffer **out, const ReadOptions *options) {
+    *out = NULL;
+
+    int64_t seekTimeUs;
+    if (options && options->getSeekTo(&seekTimeUs)) {
+        mBlockIter.seek(seekTimeUs);
+    }
+
+    if (mBlockIter.eos()) {
+        return ERROR_END_OF_STREAM;
+    }
+
+    const mkvparser::Block *block = mBlockIter.block();
+    size_t size = block->GetSize();
+    int64_t timeUs = mBlockIter.blockTimeUs();
+
+    MediaBuffer *buffer = new MediaBuffer(size + 2);
+    buffer->meta_data()->setInt64(kKeyTime, timeUs);
+
+    long res = block->Read(
+            mExtractor->mReader, (unsigned char *)buffer->data() + 2);
+
+    if (res != 0) {
+        return ERROR_END_OF_STREAM;
+    }
+
+    buffer->set_range(2, size);
+
+    if (mType == AVC) {
+        CHECK(size >= 2);
+
+        uint8_t *data = (uint8_t *)buffer->data();
+
+        unsigned NALsize = data[2] << 8 | data[3];
+        CHECK_EQ(size, NALsize + 2);
+
+        memcpy(data, "\x00\x00\x00\x01", 4);
+        buffer->set_range(0, size + 2);
+    } else if (mType == AAC) {
+        // There's strange junk at the beginning...
+
+        const uint8_t *data = (const uint8_t *)buffer->data() + 2;
+        size_t offset = 0;
+        while (offset < size && data[offset] != 0x21) {
+            ++offset;
+        }
+        buffer->set_range(2 + offset, size - offset);
+    }
+
+    *out = buffer;
+
+#if 0
+    hexdump((const uint8_t *)buffer->data() + buffer->range_offset(),
+            buffer->range_length());
+#endif
+
+    mBlockIter.advance();
+
+    return OK;
+}
+
+////////////////////////////////////////////////////////////////////////////////
+
+MatroskaExtractor::MatroskaExtractor(const sp<DataSource> &source)
+    : mDataSource(source),
+      mReader(new DataSourceReader(mDataSource)),
+      mSegment(NULL),
+      mExtractedThumbnails(false) {
+    mkvparser::EBMLHeader ebmlHeader;
+    long long pos;
+    if (ebmlHeader.Parse(mReader, pos) < 0) {
+        return;
+    }
+
+    long long ret =
+        mkvparser::Segment::CreateInstance(mReader, pos, mSegment);
+
+    if (ret) {
+        CHECK(mSegment == NULL);
+        return;
+    }
+
+    ret = mSegment->Load();
+
+    if (ret < 0) {
+        delete mSegment;
+        mSegment = NULL;
+        return;
+    }
+
+    addTracks();
+}
+
+MatroskaExtractor::~MatroskaExtractor() {
+    delete mSegment;
+    mSegment = NULL;
+
+    delete mReader;
+    mReader = NULL;
+}
+
+size_t MatroskaExtractor::countTracks() {
+    return mTracks.size();
+}
+
+sp<MediaSource> MatroskaExtractor::getTrack(size_t index) {
+    if (index >= mTracks.size()) {
+        return NULL;
+    }
+
+    return new MatroskaSource(this, index);
+}
+
+sp<MetaData> MatroskaExtractor::getTrackMetaData(
+        size_t index, uint32_t flags) {
+    if (index >= mTracks.size()) {
+        return NULL;
+    }
+
+    if ((flags & kIncludeExtensiveMetaData) && !mExtractedThumbnails) {
+        findThumbnails();
+        mExtractedThumbnails = true;
+    }
+
+    return mTracks.itemAt(index).mMeta;
+}
+
+static void addESDSFromAudioSpecificInfo(
+        const sp<MetaData> &meta, const void *asi, size_t asiSize) {
+    static const uint8_t kStaticESDS[] = {
+        0x03, 22,
+        0x00, 0x00,     // ES_ID
+        0x00,           // streamDependenceFlag, URL_Flag, OCRstreamFlag
+
+        0x04, 17,
+        0x40,                       // Audio ISO/IEC 14496-3
+        0x00, 0x00, 0x00, 0x00,
+        0x00, 0x00, 0x00, 0x00,
+        0x00, 0x00, 0x00, 0x00,
+
+        0x05,
+        // AudioSpecificInfo (with size prefix) follows
+    };
+
+    CHECK(asiSize < 128);
+    size_t esdsSize = sizeof(kStaticESDS) + asiSize + 1;
+    uint8_t *esds = new uint8_t[esdsSize];
+    memcpy(esds, kStaticESDS, sizeof(kStaticESDS));
+    uint8_t *ptr = esds + sizeof(kStaticESDS);
+    *ptr++ = asiSize;
+    memcpy(ptr, asi, asiSize);
+
+    meta->setData(kKeyESDS, 0, esds, esdsSize);
+
+    delete[] esds;
+    esds = NULL;
+}
+
+void addVorbisCodecInfo(
+        const sp<MetaData> &meta,
+        const void *_codecPrivate, size_t codecPrivateSize) {
+    // printf("vorbis private data follows:\n");
+    // hexdump(_codecPrivate, codecPrivateSize);
+
+    CHECK(codecPrivateSize >= 3);
+
+    const uint8_t *codecPrivate = (const uint8_t *)_codecPrivate;
+    CHECK(codecPrivate[0] == 0x02);
+
+    size_t len1 = codecPrivate[1];
+    size_t len2 = codecPrivate[2];
+
+    CHECK(codecPrivateSize > 3 + len1 + len2);
+
+    CHECK(codecPrivate[3] == 0x01);
+    meta->setData(kKeyVorbisInfo, 0, &codecPrivate[3], len1);
+
+    CHECK(codecPrivate[len1 + 3] == 0x03);
+
+    CHECK(codecPrivate[len1 + len2 + 3] == 0x05);
+    meta->setData(
+            kKeyVorbisBooks, 0, &codecPrivate[len1 + len2 + 3],
+            codecPrivateSize - len1 - len2 - 3);
+}
+
+void MatroskaExtractor::addTracks() {
+    const mkvparser::Tracks *tracks = mSegment->GetTracks();
+
+    for (size_t index = 0; index < tracks->GetTracksCount(); ++index) {
+        const mkvparser::Track *track = tracks->GetTrackByIndex(index);
+
+        const char *const codecID = track->GetCodecId();
+        LOGV("codec id = %s", codecID);
+        LOGV("codec name = %s", track->GetCodecNameAsUTF8());
+
+        size_t codecPrivateSize;
+        const unsigned char *codecPrivate =
+            track->GetCodecPrivate(&codecPrivateSize);
+
+        enum { VIDEO_TRACK = 1, AUDIO_TRACK = 2 };
+
+        sp<MetaData> meta = new MetaData;
+
+        switch (track->GetType()) {
+            case VIDEO_TRACK:
+            {
+                const mkvparser::VideoTrack *vtrack =
+                    static_cast<const mkvparser::VideoTrack *>(track);
+
+                if (!strcmp("V_MPEG4/ISO/AVC", codecID)) {
+                    meta->setCString(kKeyMIMEType, MEDIA_MIMETYPE_VIDEO_AVC);
+                    meta->setData(kKeyAVCC, 0, codecPrivate, codecPrivateSize);
+                } else if (!strcmp("V_VP8", codecID)) {
+                    meta->setCString(kKeyMIMEType, MEDIA_MIMETYPE_VIDEO_VPX);
+                } else {
+                    continue;
+                }
+
+                meta->setInt32(kKeyWidth, vtrack->GetWidth());
+                meta->setInt32(kKeyHeight, vtrack->GetHeight());
+                break;
+            }
+
+            case AUDIO_TRACK:
+            {
+                const mkvparser::AudioTrack *atrack =
+                    static_cast<const mkvparser::AudioTrack *>(track);
+
+                if (!strcmp("A_AAC", codecID)) {
+                    meta->setCString(kKeyMIMEType, MEDIA_MIMETYPE_AUDIO_AAC);
+                    CHECK(codecPrivateSize >= 2);
+
+                    addESDSFromAudioSpecificInfo(
+                            meta, codecPrivate, codecPrivateSize);
+                } else if (!strcmp("A_VORBIS", codecID)) {
+                    meta->setCString(kKeyMIMEType, MEDIA_MIMETYPE_AUDIO_VORBIS);
+
+                    addVorbisCodecInfo(meta, codecPrivate, codecPrivateSize);
+                } else {
+                    continue;
+                }
+
+                meta->setInt32(kKeySampleRate, atrack->GetSamplingRate());
+                meta->setInt32(kKeyChannelCount, atrack->GetChannels());
+                break;
+            }
+
+            default:
+                continue;
+        }
+
+        long long durationNs = mSegment->GetDuration();
+        meta->setInt64(kKeyDuration, (durationNs + 500) / 1000);
+
+        mTracks.push();
+        TrackInfo *trackInfo = &mTracks.editItemAt(mTracks.size() - 1);
+        trackInfo->mTrackNum = track->GetNumber();
+        trackInfo->mMeta = meta;
+    }
+}
+
+void MatroskaExtractor::findThumbnails() {
+    for (size_t i = 0; i < mTracks.size(); ++i) {
+        TrackInfo *info = &mTracks.editItemAt(i);
+
+        const char *mime;
+        CHECK(info->mMeta->findCString(kKeyMIMEType, &mime));
+
+        if (strncasecmp(mime, "video/", 6)) {
+            continue;
+        }
+
+        BlockIterator iter(mSegment, info->mTrackNum);
+        int32_t i = 0;
+        int64_t thumbnailTimeUs = 0;
+        size_t maxBlockSize = 0;
+        while (!iter.eos() && i < 20) {
+            if (iter.block()->IsKey()) {
+                ++i;
+
+                size_t blockSize = iter.block()->GetSize();
+                if (blockSize > maxBlockSize) {
+                    maxBlockSize = blockSize;
+                    thumbnailTimeUs = iter.blockTimeUs();
+                }
+            }
+            iter.advance();
+        }
+        info->mMeta->setInt64(kKeyThumbnailTime, thumbnailTimeUs);
+    }
+}
+
+sp<MetaData> MatroskaExtractor::getMetaData() {
+    sp<MetaData> meta = new MetaData;
+    meta->setCString(kKeyMIMEType, MEDIA_MIMETYPE_CONTAINER_MATROSKA);
+
+    return meta;
+}
+
+bool SniffMatroska(
+        const sp<DataSource> &source, String8 *mimeType, float *confidence) {
+    DataSourceReader reader(source);
+    mkvparser::EBMLHeader ebmlHeader;
+    long long pos;
+    if (ebmlHeader.Parse(&reader, pos) < 0) {
+        return false;
+    }
+
+    mimeType->setTo(MEDIA_MIMETYPE_CONTAINER_MATROSKA);
+    *confidence = 0.6;
+
+    return true;
+}
+
+}  // namespace android
diff --git a/media/libstagefright/matroska/MatroskaExtractor.h b/media/libstagefright/matroska/MatroskaExtractor.h
new file mode 100644
index 0000000..7471848
--- /dev/null
+++ b/media/libstagefright/matroska/MatroskaExtractor.h
@@ -0,0 +1,76 @@
+/*
+ * Copyright (C) 2010 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef MATROSKA_EXTRACTOR_H_
+
+#define MATROSKA_EXTRACTOR_H_
+
+#include <media/stagefright/MediaExtractor.h>
+#include <utils/Vector.h>
+
+namespace mkvparser {
+struct Segment;
+};
+
+namespace android {
+
+class String8;
+
+struct DataSourceReader;
+struct MatroskaSource;
+
+struct MatroskaExtractor : public MediaExtractor {
+    MatroskaExtractor(const sp<DataSource> &source);
+
+    virtual size_t countTracks();
+
+    virtual sp<MediaSource> getTrack(size_t index);
+
+    virtual sp<MetaData> getTrackMetaData(
+            size_t index, uint32_t flags);
+
+    virtual sp<MetaData> getMetaData();
+
+protected:
+    virtual ~MatroskaExtractor();
+
+private:
+    friend struct MatroskaSource;
+
+    struct TrackInfo {
+        unsigned long mTrackNum;
+        sp<MetaData> mMeta;
+    };
+    Vector<TrackInfo> mTracks;
+
+    sp<DataSource> mDataSource;
+    DataSourceReader *mReader;
+    mkvparser::Segment *mSegment;
+    bool mExtractedThumbnails;
+
+    void addTracks();
+    void findThumbnails();
+
+    MatroskaExtractor(const MatroskaExtractor &);
+    MatroskaExtractor &operator=(const MatroskaExtractor &);
+};
+
+bool SniffMatroska(
+        const sp<DataSource> &source, String8 *mimeType, float *confidence);
+
+}  // namespace android
+
+#endif  // MATROSKA_EXTRACTOR_H_
diff --git a/media/libstagefright/matroska/mkvparser.cpp b/media/libstagefright/matroska/mkvparser.cpp
new file mode 100644
index 0000000..4e51004
--- /dev/null
+++ b/media/libstagefright/matroska/mkvparser.cpp
@@ -0,0 +1,3103 @@
+#include "mkvparser.hpp"
+#include <cassert>
+#include <cstring>
+
+mkvparser::IMkvReader::~IMkvReader()
+{
+}
+
+long long mkvparser::ReadUInt(IMkvReader* pReader, long long pos, long& len)
+{
+    assert(pReader);
+    assert(pos >= 0);
+    
+    long long total, available;
+
+    long hr = pReader->Length(&total, &available);
+    assert(hr >= 0);
+    assert(pos < available);
+    assert((available - pos) >= 1);  //assume here max u-int len is 8
+    
+    unsigned char b;
+
+    hr = pReader->Read(pos, 1, &b);
+    if (hr < 0)
+        return hr;
+        
+    assert(hr == 0L);
+    
+    if (b & 0x80)       //1000 0000
+    {
+        len = 1;
+        b &= 0x7F;      //0111 1111
+    }        
+    else if (b & 0x40)  //0100 0000
+    {
+        len = 2;
+        b &= 0x3F;      //0011 1111
+    }
+    else if (b & 0x20)  //0010 0000
+    {
+        len = 3;
+        b &= 0x1F;      //0001 1111
+    }
+    else if (b & 0x10)  //0001 0000
+    {
+        len = 4;
+        b &= 0x0F;      //0000 1111
+    }
+    else if (b & 0x08)  //0000 1000
+    {
+        len = 5;
+        b &= 0x07;      //0000 0111
+    }
+    else if (b & 0x04)  //0000 0100
+    {
+        len = 6;
+        b &= 0x03;      //0000 0011
+    }
+    else if (b & 0x02)  //0000 0010
+    {
+        len = 7;
+        b &= 0x01;      //0000 0001
+    }
+    else 
+    {
+        assert(b & 0x01);  //0000 0001
+        len = 8;
+        b = 0;             //0000 0000
+    }
+    
+    assert((available - pos) >= len);
+    
+    long long result = b;
+    ++pos;
+    for (long i = 1; i < len; ++i)
+    {
+        hr = pReader->Read(pos, 1, &b);
+        
+        if (hr < 0)
+            return hr;
+            
+        assert(hr == 0L);
+        
+        result <<= 8;
+        result |= b;
+        
+        ++pos;
+    }
+    
+    return result;
+}
+    
+    
+long long mkvparser::GetUIntLength(
+    IMkvReader* pReader,
+    long long pos, 
+    long& len)
+{
+    assert(pReader);
+    assert(pos >= 0);
+    
+    long long total, available;
+
+    long hr = pReader->Length(&total, &available);
+    assert(hr >= 0);
+    assert(available <= total);
+    
+    if (pos >= available)
+        return pos;  //too few bytes available
+    
+    unsigned char b;
+    
+    hr = pReader->Read(pos, 1, &b);
+    
+    if (hr < 0)
+        return hr;
+
+    assert(hr == 0L);
+    
+    if (b == 0)  //we can't handle u-int values larger than 8 bytes
+        return E_FILE_FORMAT_INVALID;
+    
+    unsigned char m = 0x80;
+    len = 1;
+    
+    while (!(b & m))
+    {
+        m >>= 1;
+        ++len;
+    }
+    
+    return 0;  //success
+}
+
+
+long long mkvparser::SyncReadUInt(
+    IMkvReader* pReader,
+    long long pos, 
+    long long stop,
+    long& len)
+{
+    assert(pReader);
+
+    if (pos >= stop)
+        return E_FILE_FORMAT_INVALID;
+    
+    unsigned char b;
+    
+    long hr = pReader->Read(pos, 1, &b);
+    
+    if (hr < 0)
+        return hr;
+        
+    if (hr != 0L)
+        return E_BUFFER_NOT_FULL;
+
+    if (b == 0)  //we can't handle u-int values larger than 8 bytes
+        return E_FILE_FORMAT_INVALID;
+    
+    unsigned char m = 0x80;
+    len = 1;
+        
+    while (!(b & m))
+    {
+        m >>= 1;
+        ++len;
+    }
+    
+    if ((pos + len) > stop)
+        return E_FILE_FORMAT_INVALID;
+        
+    long long result = b & (~m);
+    ++pos;
+    
+    for (int i = 1; i < len; ++i)
+    {
+        hr = pReader->Read(pos, 1, &b);
+        
+        if (hr < 0)
+            return hr;
+           
+        if (hr != 0L)
+            return E_BUFFER_NOT_FULL;
+            
+        result <<= 8;
+        result |= b;
+        
+        ++pos;
+    }
+    
+    return result;
+}
+
+
+long long mkvparser::UnserializeUInt(
+    IMkvReader* pReader, 
+    long long pos,
+    long long size)
+{
+    assert(pReader);
+    assert(pos >= 0);
+    assert(size > 0);
+    assert(size <= 8);
+    
+    long long result = 0;
+    
+    for (long long i = 0; i < size; ++i)
+    {
+        unsigned char b;
+        
+        const long hr = pReader->Read(pos, 1, &b);
+        
+        if (hr < 0)      
+            return hr;
+        result <<= 8;
+        result |= b;
+        
+        ++pos;
+    }
+    
+    return result;
+}
+
+
+float mkvparser::Unserialize4Float(
+    IMkvReader* pReader, 
+    long long pos)
+{
+    assert(pReader);
+    assert(pos >= 0);
+    
+    long long total, available;
+    
+    long hr = pReader->Length(&total, &available);
+    assert(hr >= 0);
+    assert(available <= total);
+    assert((pos + 4) <= available);
+    
+    float result;
+    
+    unsigned char* const p = (unsigned char*)&result;
+    unsigned char* q = p + 4;
+    
+    for (;;)
+    {
+        hr = pReader->Read(pos, 1, --q);
+        assert(hr == 0L);
+        
+        if (q == p)
+            break;
+            
+        ++pos;
+    }
+    
+    return result;
+}
+
+
+double mkvparser::Unserialize8Double(
+    IMkvReader* pReader, 
+    long long pos)
+{
+    assert(pReader);
+    assert(pos >= 0);
+    
+    double result;
+    
+    unsigned char* const p = (unsigned char*)&result;
+    unsigned char* q = p + 8;
+    
+    for (;;)
+    {
+        const long hr = pReader->Read(pos, 1, --q);
+        assert(hr == 0L);
+        
+        if (q == p)
+            break;
+            
+        ++pos;
+    }
+    
+    return result;
+}
+
+signed char mkvparser::Unserialize1SInt(
+    IMkvReader* pReader,
+    long long pos)
+{
+    assert(pReader);
+    assert(pos >= 0);
+ 
+    long long total, available;
+
+    long hr = pReader->Length(&total, &available);
+    assert(hr == 0);   
+    assert(available <= total);
+    assert(pos < available);
+
+    signed char result;
+
+    hr = pReader->Read(pos, 1, (unsigned char*)&result);
+    assert(hr == 0);
+
+    return result;
+}
+
+short mkvparser::Unserialize2SInt(
+    IMkvReader* pReader, 
+    long long pos)
+{
+    assert(pReader);
+    assert(pos >= 0);
+    
+    long long total, available;
+    
+    long hr = pReader->Length(&total, &available);
+    assert(hr >= 0);
+    assert(available <= total);
+    assert((pos + 2) <= available);
+    
+    short result;
+    
+    unsigned char* const p = (unsigned char*)&result;
+    unsigned char* q = p + 2;
+    
+    for (;;)
+    {
+        hr = pReader->Read(pos, 1, --q);
+        assert(hr == 0L);
+        
+        if (q == p)
+            break;
+            
+        ++pos;
+    }
+    
+    return result;
+}
+
+
+bool mkvparser::Match(
+    IMkvReader* pReader,
+    long long& pos,
+    unsigned long id_,
+    long long& val)
+
+{
+    assert(pReader);
+    assert(pos >= 0);
+    
+    long long total, available;
+
+    long hr = pReader->Length(&total, &available);
+    assert(hr >= 0);
+    assert(available <= total);
+    
+    long len;
+
+    const long long id = ReadUInt(pReader, pos, len);
+    assert(id >= 0);
+    assert(len > 0);
+    assert(len <= 8);
+    assert((pos + len) <= available);
+    
+    if ((unsigned long)id != id_)
+        return false;
+        
+    pos += len;  //consume id
+    
+    const long long size = ReadUInt(pReader, pos, len);
+    assert(size >= 0);
+    assert(size <= 8);
+    assert(len > 0);
+    assert(len <= 8);
+    assert((pos + len) <= available);
+    
+    pos += len;  //consume length of size of payload
+    
+    val = UnserializeUInt(pReader, pos, size);
+    assert(val >= 0);
+    
+    pos += size;  //consume size of payload
+    
+    return true;
+}
+
+bool mkvparser::Match(
+    IMkvReader* pReader,
+    long long& pos,
+    unsigned long id_,
+    char*& val)
+{
+    assert(pReader);
+    assert(pos >= 0);
+    
+    long long total, available;
+
+    long hr = pReader->Length(&total, &available);
+    assert(hr >= 0);
+    assert(available <= total);
+    
+    long len;
+
+    const long long id = ReadUInt(pReader, pos, len);
+    assert(id >= 0);
+    assert(len > 0);
+    assert(len <= 8);
+    assert((pos + len) <= available);
+    
+    if ((unsigned long)id != id_)
+        return false;
+    
+    pos += len;  //consume id
+    
+    const long long size_ = ReadUInt(pReader, pos, len);
+    assert(size_ >= 0);
+    assert(len > 0);
+    assert(len <= 8);
+    assert((pos + len) <= available);
+    
+    pos += len;  //consume length of size of payload
+    assert((pos + size_) <= available);
+
+    const size_t size = static_cast<size_t>(size_);    
+    val = new char[size+1];
+
+    for (size_t i = 0; i < size; ++i)
+    {
+        char c;
+
+        hr = pReader->Read(pos + i, 1, (unsigned char*)&c);
+        assert(hr == 0L);
+            
+        val[i] = c;
+   
+        if (c == '\0')
+            break;     
+   
+    }
+
+    val[size] = '\0';
+    pos += size_;  //consume size of payload
+    
+    return true;
+}
+
+#if 0
+bool mkvparser::Match(
+    IMkvReader* pReader,
+    long long& pos,
+    unsigned long id,
+    wchar_t*& val)
+{
+    char* str;
+    
+    if (!Match(pReader, pos, id, str))
+        return false;
+
+    const size_t size = mbstowcs(NULL, str, 0);
+       
+    if (size == 0) 
+        val = NULL;
+    else 
+    { 
+        val = new wchar_t[size+1];
+        mbstowcs(val, str, size);
+        val[size] = L'\0';
+    }
+
+    delete[] str;
+    return true;    
+}
+#endif
+
+
+bool mkvparser::Match(
+    IMkvReader* pReader,
+    long long& pos,
+    unsigned long id_,
+    unsigned char*& val,
+    size_t *optionalSize)
+{
+    assert(pReader);
+    assert(pos >= 0);
+    
+    long long total, available;
+
+    long hr = pReader->Length(&total, &available);
+    assert(hr >= 0);
+    assert(available <= total);
+    
+    long len;
+    const long long id = ReadUInt(pReader, pos, len);
+    assert(id >= 0);
+    assert(len > 0);
+    assert(len <= 8);
+    assert((pos + len) <= available);
+    
+    if ((unsigned long)id != id_)
+        return false;
+        
+    pos += len;  //consume id
+    
+    const long long size_ = ReadUInt(pReader, pos, len);
+    assert(size_ >= 0);
+    assert(len > 0);
+    assert(len <= 8);
+    assert((pos + len) <= available);
+    
+    pos += len;  //consume length of size of payload
+    assert((pos + size_) <= available);
+
+    const size_t size = static_cast<size_t>(size_);    
+    val = new unsigned char[size];
+ 
+    if (optionalSize) {
+        *optionalSize = size;
+    }
+
+    for (size_t i = 0; i < size; ++i)
+    {
+        unsigned char b;
+
+        hr = pReader->Read(pos + i, 1, &b);
+        assert(hr == 0L);
+
+        val[i] = b; 
+    }
+    
+    pos += size_;  //consume size of payload    
+    return true;
+}
+
+
+bool mkvparser::Match(
+    IMkvReader* pReader,
+    long long& pos,
+    unsigned long id_,
+    double& val)
+{
+    assert(pReader);
+    assert(pos >= 0);
+    
+    long long total, available;
+
+    long hr = pReader->Length(&total, &available);
+    assert(hr >= 0);
+    assert(available <= total);
+    long idlen;
+    const long long id = ReadUInt(pReader, pos, idlen);
+    assert(id >= 0);  //TODO
+    
+    if ((unsigned long)id != id_)
+        return false;
+
+    long sizelen;
+    const long long size = ReadUInt(pReader, pos + idlen, sizelen);
+
+    switch (size)
+    {	
+        case 4:
+        case 8:
+            break;
+        default:
+            return false;
+    }
+
+    pos += idlen + sizelen;  //consume id and size fields
+    assert((pos + size) <= available);
+
+    if (size == 4)
+        val = Unserialize4Float(pReader, pos);
+    else
+    {
+        assert(size == 8);
+        val = Unserialize8Double(pReader, pos);
+    }
+    
+    pos += size;  //consume size of payload
+    
+    return true;
+}
+
+
+bool mkvparser::Match(
+    IMkvReader* pReader,
+    long long& pos,
+    unsigned long id_,
+    short& val)
+{
+    assert(pReader);
+    assert(pos >= 0);
+    
+    long long total, available;
+
+    long hr = pReader->Length(&total, &available);
+    assert(hr >= 0);
+    assert(available <= total);
+    
+    long len;
+    const long long id = ReadUInt(pReader, pos, len);
+    assert(id >= 0);
+    assert((pos + len) <= available);
+    
+    if ((unsigned long)id != id_)
+        return false;
+        
+    pos += len;  //consume id
+    
+    const long long size = ReadUInt(pReader, pos, len);
+    assert(size <= 2);
+    assert((pos + len) <= available);
+   
+    pos += len;  //consume length of size of payload
+    assert((pos + size) <= available);
+
+    //TODO:
+    // Generalize this to work for any size signed int
+    if (size == 1)
+        val = Unserialize1SInt(pReader, pos);
+    else 
+        val = Unserialize2SInt(pReader, pos);
+        
+    pos += size;  //consume size of payload
+    
+    return true;
+}
+
+
+namespace mkvparser
+{
+
+EBMLHeader::EBMLHeader():
+    m_docType(NULL)
+{
+}
+
+EBMLHeader::~EBMLHeader()
+{
+    delete[] m_docType;
+}
+
+long long EBMLHeader::Parse(
+    IMkvReader* pReader,
+    long long& pos)
+{
+    assert(pReader);
+    
+    long long total, available;
+    
+    long hr = pReader->Length(&total, &available);
+    
+    if (hr < 0) 
+        return hr;
+    
+    pos = 0;    
+    long long end = (1024 < available)? 1024: available;    
+
+    for (;;)
+    {    
+        unsigned char b = 0;
+    
+        while (pos < end)
+        {
+            hr = pReader->Read(pos, 1, &b);
+           
+            if (hr < 0)
+                return hr;
+            
+            if (b == 0x1A)
+                break;
+                
+            ++pos;
+        }
+    
+        if (b != 0x1A)
+        {
+            if ((pos >= 1024) ||
+                (available >= total) || 
+                ((total - available) < 5))
+                  return -1;
+                
+            return available + 5;  //5 = 4-byte ID + 1st byte of size
+        }
+    
+        if ((total - pos) < 5)
+            return E_FILE_FORMAT_INVALID;
+            
+        if ((available - pos) < 5)
+            return pos + 5;  //try again later
+
+        long len;            
+
+        const long long result = ReadUInt(pReader, pos, len);
+        
+        if (result < 0)  //error
+            return result;
+            
+        if (result == 0x0A45DFA3)  //ReadId masks-off length indicator bits
+        {
+            assert(len == 4);
+            pos += len;
+            break;
+        }
+
+        ++pos;  //throw away just the 0x1A byte, and try again
+    }
+        
+    long len;
+    long long result = GetUIntLength(pReader, pos, len);
+    
+    if (result < 0)  //error
+        return result;
+        
+    if (result > 0)  //need more data
+        return result;
+        
+    assert(len > 0);
+    assert(len <= 8);
+    
+    if ((total -  pos) < len)
+        return E_FILE_FORMAT_INVALID;
+    if ((available - pos) < len)
+        return pos + len;  //try again later
+        
+    result = ReadUInt(pReader, pos, len);
+    
+    if (result < 0)  //error
+        return result;
+        
+    pos += len;  //consume u-int
+    
+    if ((total - pos) < result)
+        return E_FILE_FORMAT_INVALID;
+
+    if ((available - pos) < result)
+        return pos + result;
+        
+    end = pos + result;
+    
+    m_version = 1;
+    m_readVersion = 1;
+    m_maxIdLength = 4;
+    m_maxSizeLength = 8;
+    m_docTypeVersion = 1;
+    m_docTypeReadVersion = 1;
+
+    while (pos < end)
+    {
+        if (Match(pReader, pos, 0x0286, m_version))   
+            ;
+        else if (Match(pReader, pos, 0x02F7, m_readVersion))        
+            ;
+        else if (Match(pReader, pos, 0x02F2, m_maxIdLength))        
+            ;
+        else if (Match(pReader, pos, 0x02F3, m_maxSizeLength))      
+            ;
+        else if (Match(pReader, pos, 0x0282, m_docType))            
+            ; 
+        else if (Match(pReader, pos, 0x0287, m_docTypeVersion))     
+            ;
+        else if (Match(pReader, pos, 0x0285, m_docTypeReadVersion)) 
+            ;
+        else
+        {
+            result = ReadUInt(pReader, pos, len);
+            assert(result > 0);
+            assert(len > 0);
+            assert(len <= 8);
+        
+            pos += len;
+            assert(pos < end);
+            
+            result = ReadUInt(pReader, pos, len);
+            assert(result >= 0);
+            assert(len > 0);
+            assert(len <= 8);
+            
+            pos += len + result;
+            assert(pos <= end);
+        }
+    }
+    
+    assert(pos == end);
+        
+    return 0;    
+}
+
+
+Segment::Segment(
+    IMkvReader* pReader,
+    long long start,
+    long long size) :
+    m_pReader(pReader),
+    m_start(start),
+    m_size(size),
+    m_pos(start),
+    m_pInfo(NULL),
+    m_pTracks(NULL),
+    m_clusterCount(0)
+    //m_clusterNumber(0)
+{
+}
+
+
+Segment::~Segment()
+{
+    Cluster** i = m_clusters;
+    Cluster** j = m_clusters + m_clusterCount;
+
+    while (i != j)
+    {
+        Cluster* p = *i++;
+        assert(p);		
+        delete p;
+    } 
+    
+    delete[] m_clusters;
+       
+    delete m_pTracks;
+    delete m_pInfo;
+}
+
+
+long long Segment::CreateInstance(
+    IMkvReader* pReader,
+    long long pos,
+    Segment*& pSegment)
+{
+    assert(pReader);
+    assert(pos >= 0);
+    
+    pSegment = NULL;
+    
+    long long total, available;
+    
+    long hr = pReader->Length(&total, &available);
+    assert(hr >= 0);
+    assert(available <= total);
+    
+    //I would assume that in practice this loop would execute
+    //exactly once, but we allow for other elements (e.g. Void)
+    //to immediately follow the EBML header.  This is fine for
+    //the source filter case (since the entire file is available),
+    //but in the splitter case over a network we should probably
+    //just give up early.  We could for example decide only to
+    //execute this loop a maximum of, say, 10 times.
+    
+    while (pos < total)
+    {    
+        //Read ID
+        
+        long len;
+        long long result = GetUIntLength(pReader, pos, len);
+        
+        if (result)  //error, or too few available bytes
+            return result;
+            
+        if ((pos + len) > total)
+            return E_FILE_FORMAT_INVALID;
+            
+        if ((pos + len) > available)
+            return pos + len;
+
+        //TODO: if we liberalize the behavior of ReadUInt, we can
+        //probably eliminate having to use GetUIntLength here.
+        const long long id = ReadUInt(pReader, pos, len);
+        
+        if (id < 0)  //error
+            return id;
+            
+        pos += len;  //consume ID
+        
+        //Read Size
+        
+        result = GetUIntLength(pReader, pos, len);
+        
+        if (result)  //error, or too few available bytes
+            return result;
+            
+        if ((pos + len) > total)
+            return E_FILE_FORMAT_INVALID;
+            
+        if ((pos + len) > available)
+            return pos + len;
+
+        //TODO: if we liberalize the behavior of ReadUInt, we can
+        //probably eliminate having to use GetUIntLength here.
+        const long long size = ReadUInt(pReader, pos, len);
+        
+        if (size < 0)
+            return size;
+            
+        pos += len;  //consume length of size of element
+        
+        //Pos now points to start of payload
+        
+        if ((pos + size) > total)
+            return E_FILE_FORMAT_INVALID;
+        
+        if (id == 0x08538067)  //Segment ID
+        {
+            pSegment = new  Segment(pReader, pos, size); 
+            assert(pSegment);  //TODO   
+
+            return 0;    //success
+        }
+        
+        pos += size;  //consume payload
+    }
+    
+    assert(pos == total);
+    
+    pSegment = new Segment(pReader, pos, 0); 
+    assert(pSegment);  //TODO   
+
+    return 0;  //success (sort of)
+}
+
+
+long long Segment::ParseHeaders()
+{
+    //Outermost (level 0) segment object has been constructed, 
+    //and pos designates start of payload.  We need to find the
+    //inner (level 1) elements.
+    long long total, available;
+    
+    long hr = m_pReader->Length(&total, &available);
+    assert(hr >= 0);
+    assert(available <= total);
+    
+    const long long stop = m_start + m_size;
+    assert(stop <= total);
+    assert(m_pos <= stop);
+    
+    bool bQuit = false;
+    while ((m_pos < stop) && !bQuit)
+    {
+        long long pos = m_pos;
+        
+        long len;
+        long long result = GetUIntLength(m_pReader, pos, len);
+        
+        if (result)  //error, or too few available bytes
+            return result;
+            
+        if ((pos + len) > stop)
+            return E_FILE_FORMAT_INVALID;
+            
+        if ((pos + len) > available)
+            return pos + len;
+            
+        const long long idpos = pos;
+        const long long id = ReadUInt(m_pReader, idpos, len);
+        
+        if (id < 0)  //error
+            return id;
+            
+        pos += len;  //consume ID
+        
+        //Read Size
+        result = GetUIntLength(m_pReader, pos, len);
+        
+        if (result)  //error, or too few available bytes
+            return result;
+            
+        if ((pos + len) > stop)
+            return E_FILE_FORMAT_INVALID;
+            
+        if ((pos + len) > available)
+            return pos + len;
+
+        const long long size = ReadUInt(m_pReader, pos, len);
+        
+        if (size < 0)
+            return size;
+            
+        pos += len;  //consume length of size of element
+        
+        //Pos now points to start of payload
+        
+        if ((pos + size) > stop)
+            return E_FILE_FORMAT_INVALID;
+            
+        //We read EBML elements either in total or nothing at all.
+            
+        if ((pos + size) > available)
+            return pos + size;
+        
+        if (id == 0x0549A966)  //Segment Info ID
+        {
+            assert(m_pInfo == NULL);
+            m_pInfo = new  SegmentInfo(this, pos, size);
+            assert(m_pInfo);  //TODO
+            
+            if (m_pTracks)
+                bQuit = true;
+        }
+        else if (id == 0x0654AE6B)  //Tracks ID
+        {
+            assert(m_pTracks == NULL);
+            m_pTracks = new  Tracks(this, pos, size);
+            assert(m_pTracks);  //TODO
+            
+            if (m_pInfo)
+                bQuit = true;
+        }
+        else if (id == 0x0F43B675)  //Cluster ID
+        {
+#if 0
+            if (m_pInfo == NULL)  //TODO: liberalize
+                ;  
+            else if (m_pTracks == NULL)
+                ;
+            else
+                //ParseCluster(idpos, pos, size);            
+                Cluster::Parse(this, m_clusters, pos, size);
+#endif
+            bQuit = true;
+        }
+        
+        m_pos = pos + size;  //consume payload
+    }
+    
+    assert(m_pos <= stop);
+    
+    return 0;  //success
+}
+
+
+long Segment::ParseCluster(Cluster*& pCluster, long long& pos_) const
+{
+    pCluster = NULL;
+    pos_ = -1;
+    
+    const long long stop = m_start + m_size;
+    assert(m_pos <= stop);
+    
+    long long pos = m_pos;
+    long long off = -1;
+   
+ 
+    while (pos < stop)
+    {
+        long len;
+        const long long idpos = pos;
+        
+        const long long id = SyncReadUInt(m_pReader, pos, stop, len);
+        
+        if (id < 0)  //error
+            return static_cast<long>(id);
+            
+        if (id == 0)
+            return E_FILE_FORMAT_INVALID;
+            
+        pos += len;  //consume id        
+        assert(pos < stop);
+
+        const long long size = SyncReadUInt(m_pReader, pos, stop, len);
+        
+        if (size < 0)  //error
+            return static_cast<long>(size);
+            
+        pos += len;  //consume size
+        assert(pos <= stop);
+            
+        if (size == 0)  //weird
+            continue;
+            
+        //pos now points to start of payload
+            
+        pos += size;  //consume payload
+        assert(pos <= stop);
+
+        if (off >= 0)
+        {
+            pos_ = idpos;
+            break;
+        }
+
+        if (id == 0x0F43B675)  //Cluster ID
+            off = idpos - m_start;
+    }
+    
+    Segment* const this_ = const_cast<Segment*>(this);
+    const size_t idx = m_clusterCount;
+    
+    if (pos >= stop)
+    {
+        pos_ = stop;
+        
+#if 0        
+        if (off < 0)
+        {
+            pCluster = Cluster::CreateEndOfStream(this_, idx);
+            return 1L;
+        }
+#else
+        if (off < 0)
+            return 1L;
+#endif
+                
+        //Reading 0 bytes at pos might work too -- it would depend 
+        //on how the reader is implemented.
+        
+        unsigned char b;
+
+        const long hr = m_pReader->Read(pos - 1, 1, &b);
+        
+        if (hr < 0)
+            return hr;
+            
+        if (hr != 0L)
+            return E_BUFFER_NOT_FULL;
+    }
+    
+    assert(off >= 0);
+    assert(pos_ >= m_start);
+    assert(pos_ <= stop);
+
+    pCluster = Cluster::Parse(this_, idx, off);
+    return 0L;
+}
+
+
+bool Segment::AddCluster(Cluster* pCluster, long long pos)
+{
+    assert(pos >= m_start);
+    
+    const long long stop = m_start + m_size;
+    assert(pos <= stop);
+
+    if (pCluster)    
+        m_clusters[pos] = pCluster;
+        
+    m_pos = pos;  //m_pos >= stop is now we know we have all clusters
+    
+    return (pos >= stop);
+}
+
+
+long Segment::Load()
+{
+    //Outermost (level 0) segment object has been constructed, 
+    //and pos designates start of payload.  We need to find the
+    //inner (level 1) elements.
+    const long long stop = m_start + m_size;
+#ifdef _DEBUG
+    {
+        long long total, available;
+        
+        long hr = m_pReader->Length(&total, &available);
+        assert(hr >= 0);
+        assert(available >= total);
+        assert(stop <= total);
+    }
+#endif
+    long long index = m_pos;
+    
+    m_clusterCount = 0;
+
+    while (index < stop)
+    {
+        long len = 0;
+
+        long long result = GetUIntLength(m_pReader, index, len);
+       
+        if (result < 0)  //error
+            return static_cast<long>(result);
+            
+        if ((index + len) > stop)
+            return E_FILE_FORMAT_INVALID;
+            
+        const long long idpos = index;
+        const long long id = ReadUInt(m_pReader, idpos, len);
+        
+        if (id < 0)  //error
+            return static_cast<long>(id);
+            
+        index += len;  //consume ID
+        
+        //Read Size
+        result = GetUIntLength(m_pReader, index, len);
+        
+        if (result < 0)  //error
+            return static_cast<long>(result);
+            
+        if ((index + len) > stop)
+            return E_FILE_FORMAT_INVALID;
+            
+        const long long size = ReadUInt(m_pReader, index, len);
+        
+        if (size < 0)  //error
+            return static_cast<long>(size);
+            
+        index += len;  //consume length of size of element
+ 
+        if (id == 0x0F43B675) // Cluster ID 
+            break;
+	
+        if (id == 0x014D9B74) // SeekHead ID 
+        {
+            ParseSeekHead(index, size, NULL); 
+            break;
+        }
+        index += size;
+    }
+        
+    if (m_clusterCount == 0)
+        return -1L;
+
+    while (m_pos < stop)
+    {
+        long long pos = m_pos;
+        
+        long len;
+
+        long long result = GetUIntLength(m_pReader, pos, len);
+        
+        if (result < 0)  //error
+            return static_cast<long>(result);
+            
+        if ((pos + len) > stop)
+            return E_FILE_FORMAT_INVALID;
+            
+        const long long idpos = pos;
+        const long long id = ReadUInt(m_pReader, idpos, len);
+        
+        if (id < 0)  //error
+            return static_cast<long>(id);
+            
+        pos += len;  //consume ID
+        
+        //Read Size
+        result = GetUIntLength(m_pReader, pos, len);
+        
+        if (result < 0)  //error
+            return static_cast<long>(result);
+            
+        if ((pos + len) > stop)
+	        return E_FILE_FORMAT_INVALID;
+            
+        const long long size = ReadUInt(m_pReader, pos, len);
+       
+        if (size < 0)  //error
+            return static_cast<long>(size);
+            
+        pos += len;  //consume length of size of element
+        
+        //Pos now points to start of payload
+        
+        if ((pos + size) > stop)
+            return E_FILE_FORMAT_INVALID;
+            
+        if (id == 0x0F43B675)  //Cluster ID
+            break;
+
+        if (id == 0x014D9B74)  //SeekHead ID
+        {
+            m_clusters = new Cluster*[m_clusterCount];   
+            size_t index = 0;
+            
+            ParseSeekHead(pos, size, &index);            
+            assert(index == m_clusterCount);
+        }            
+        else if (id == 0x0549A966)  //Segment Info ID
+        {
+            assert(m_pInfo == NULL);
+            m_pInfo = new  SegmentInfo(this, pos, size);
+            assert(m_pInfo);  //TODO
+        }
+        else if (id == 0x0654AE6B)  //Tracks ID
+        {
+            assert(m_pTracks == NULL);
+            m_pTracks = new Tracks(this, pos, size);
+            assert(m_pTracks);  //TODO
+        }
+
+        m_pos = pos + size;  //consume payload
+    }
+    
+    assert(m_clusters);
+    
+    //TODO: see notes above.  This check is here (temporarily) to ensure
+    //that the first seekhead has entries for the clusters (because that's
+    //when they're loaded).  In case we are given a file that lists the
+    //clusters in a second seekhead, the worst thing that happens is that
+    //we treat this as an invalid file (which is better then simply
+    //asserting somewhere).  But that's only a work-around.  What we need
+    //to do is be able to handle having multiple seekheads, and having
+    //clusters listed somewhere besides the first seekhead.
+    //    
+    //if (m_clusters == NULL)
+    //    return E_FILE_FORMAT_INVALID;
+        
+    //NOTE: we stop parsing when we reach the first cluster, under the
+    //assumption all clusters are named in some SeekHead.  Clusters
+    //will have been (pre)loaded, so we indicate that we have all clusters
+    //by adjusting the parse position:
+    m_pos = stop;  //means "we have all clusters"
+
+    return 0L;
+}
+
+
+void Segment::ParseSeekHead(long long start, long long size_, size_t* pIndex)
+{
+    long long pos = start;
+    const long long stop = start + size_;
+    while (pos < stop)
+    {
+        long len;
+        
+        const long long id = ReadUInt(m_pReader, pos, len);
+        assert(id >= 0);  //TODO
+        assert((pos + len) <= stop);
+        
+        pos += len;  //consume ID
+        
+        const long long size = ReadUInt(m_pReader, pos, len);
+        assert(size >= 0);
+        assert((pos + len) <= stop);
+        
+        pos += len;  //consume Size field
+        assert((pos + size) <= stop);
+
+        if (id == 0x0DBB)  //SeekEntry ID
+            ParseSeekEntry(pos, size, pIndex);
+        
+        pos += size;  //consume payload
+        assert(pos <= stop);
+    }
+    
+    assert(pos == stop);
+}
+
+
+void Segment::ParseSecondarySeekHead(long long off, size_t* pIndex)
+{
+    assert(off >= 0);
+    assert(off < m_size);
+
+    long long pos = m_start + off;
+    const long long stop = m_start + m_size;
+    
+    long len;
+
+    long long result = GetUIntLength(m_pReader, pos, len);
+    assert(result == 0);
+    assert((pos + len) <= stop);
+    
+    const long long idpos = pos;
+
+    const long long id = ReadUInt(m_pReader, idpos, len);
+    assert(id == 0x014D9B74);  //SeekHead ID
+    
+    pos += len;  //consume ID
+    assert(pos < stop);
+    
+    //Read Size
+    
+    result = GetUIntLength(m_pReader, pos, len);
+    assert(result == 0);
+    assert((pos + len) <= stop);
+    
+    const long long size = ReadUInt(m_pReader, pos, len);
+    assert(size >= 0);
+    
+    pos += len;  //consume length of size of element
+    assert((pos + size) <= stop);
+    
+    //Pos now points to start of payload
+    
+    ParseSeekHead(pos, size, pIndex);
+}
+
+
+void Segment::ParseSeekEntry(long long start, long long size_, size_t* pIndex)
+{
+    long long pos = start;
+
+    const long long stop = start + size_;
+    
+    long len;
+    
+    const long long seekIdId = ReadUInt(m_pReader, pos, len);
+    //seekIdId;
+    assert(seekIdId == 0x13AB);  //SeekID ID
+    assert((pos + len) <= stop);
+    
+    pos += len;  //consume id
+
+    const long long seekIdSize = ReadUInt(m_pReader, pos, len);
+    assert(seekIdSize >= 0);
+    assert((pos + len) <= stop);
+    
+    pos += len;  //consume size
+    
+    const long long seekId = ReadUInt(m_pReader, pos, len);  //payload
+    assert(seekId >= 0);
+    assert(len == seekIdSize);
+    assert((pos + len) <= stop);
+    
+    pos += seekIdSize;  //consume payload
+    
+    const long long seekPosId = ReadUInt(m_pReader, pos, len);
+    //seekPosId;
+    assert(seekPosId == 0x13AC);  //SeekPos ID
+    assert((pos + len) <= stop);
+    
+    pos += len;  //consume id
+    
+    const long long seekPosSize = ReadUInt(m_pReader, pos, len);
+    assert(seekPosSize >= 0);
+    assert((pos + len) <= stop);
+
+    pos += len;  //consume size
+    assert((pos + seekPosSize) <= stop);
+        
+    const long long seekOff = UnserializeUInt(m_pReader, pos, seekPosSize);
+    assert(seekOff >= 0);
+    assert(seekOff < m_size);
+    
+    pos += seekPosSize;  //consume payload
+    assert(pos == stop);
+    
+    const long long seekPos = m_start + seekOff;
+    assert(seekPos < (m_start + m_size));
+   
+    if (seekId == 0x0F43B675)  //cluster id
+    {       
+        if (pIndex == NULL)
+            ++m_clusterCount; 
+        else
+        {
+            assert(m_clusters);
+            assert(m_clusterCount > 0);
+            
+            size_t& index = *pIndex;
+            assert(index < m_clusterCount);
+            
+            Cluster*& pCluster = m_clusters[index];
+            
+            pCluster = Cluster::Parse(this, index, seekOff);
+            assert(pCluster);  //TODO
+            
+            ++index;
+        }
+    }
+    else if (seekId == 0x014D9B74)  //SeekHead ID
+    {
+        ParseSecondarySeekHead(seekOff, pIndex);
+    }
+}
+
+
+long long Segment::Unparsed() const
+{
+    const long long stop = m_start + m_size;
+
+    const long long result = stop - m_pos;
+    assert(result >= 0);
+    
+    return result;
+}
+
+
+#if 0  //NOTE: too inefficient
+long long Segment::Load(long long time_ns)
+{
+    if (Unparsed() <= 0)
+        return 0;
+    
+    while (m_clusters.empty())
+    {
+        const long long result = Parse();
+        
+        if (result)  //error, or not enough bytes available
+            return result;
+            
+        if (Unparsed() <= 0)
+            return 0;
+    }
+    
+    while (m_clusters.back()->GetTime() < time_ns)
+    {
+        const long long result = Parse();
+        
+        if (result)  //error, or not enough bytes available
+            return result;
+            
+        if (Unparsed() <= 0)
+            return 0;
+    }        
+
+    return 0;        
+}
+#endif
+
+
+Cluster* Segment::GetFirst()
+{
+    if ((m_clusters == NULL) || (m_clusterCount <= 0))
+       return &m_eos;
+
+    Cluster* const pCluster = m_clusters[0];
+    assert(pCluster);
+        
+    return pCluster;
+}
+
+
+Cluster* Segment::GetLast()
+{
+    if ((m_clusters == NULL) || (m_clusterCount <= 0))
+        return &m_eos;
+
+    const size_t idx = m_clusterCount - 1;    
+    Cluster* const pCluster = m_clusters[idx];
+    assert(pCluster);
+        
+    return pCluster;
+}
+
+
+unsigned long Segment::GetCount() const
+{
+    //TODO: m_clusterCount should not be long long.
+    return static_cast<unsigned long>(m_clusterCount);
+}
+
+
+Cluster* Segment::GetNext(const Cluster* pCurr)
+{
+    assert(pCurr);
+    assert(pCurr != &m_eos);
+    assert(m_clusters);
+    assert(m_clusterCount > 0);
+
+    size_t idx =  pCurr->m_index;
+    assert(idx < m_clusterCount);
+    assert(pCurr == m_clusters[idx]);
+    
+    idx++;
+    
+    if (idx >= m_clusterCount) 
+        return &m_eos;
+        
+    Cluster* const pNext = m_clusters[idx];
+    assert(pNext);
+    
+    return pNext;
+}
+
+
+Cluster* Segment::GetCluster(long long time_ns)
+{
+    if ((m_clusters == NULL) || (m_clusterCount <= 0))
+        return &m_eos;
+        
+    {
+        Cluster* const pCluster = m_clusters[0];
+        assert(pCluster);
+        assert(pCluster->m_index == 0);
+        
+        if (time_ns <= pCluster->GetTime())
+            return pCluster;
+    }
+    
+    //Binary search of cluster array
+       
+    size_t i = 0;
+    size_t j = m_clusterCount;
+    
+    while (i < j)
+    {
+        //INVARIANT:
+        //[0, i) <= time_ns
+        //[i, j) ?
+        //[j, m_clusterCount)  > time_ns
+        
+        const size_t k = i + (j - i) / 2;
+        assert(k < m_clusterCount);
+
+        Cluster* const pCluster = m_clusters[k];
+        assert(pCluster);
+        assert(pCluster->m_index == k);
+        
+        const long long t = pCluster->GetTime();
+        
+        if (t <= time_ns)
+            i = k + 1;
+        else
+            j = k;
+            
+        assert(i <= j);
+    }
+    
+    assert(i == j);
+    assert(i > 0);
+    assert(i <= m_clusterCount);
+    
+    const size_t k = i - 1;
+    
+    Cluster* const pCluster = m_clusters[k];
+    assert(pCluster);
+    assert(pCluster->m_index == k);
+    assert(pCluster->GetTime() <= time_ns);
+    
+    return pCluster;
+}
+
+
+Tracks* Segment::GetTracks() const
+{
+    return m_pTracks;
+}
+
+
+const SegmentInfo* const Segment::GetInfo() const
+{
+    return m_pInfo;
+}
+
+
+long long Segment::GetDuration() const
+{
+    assert(m_pInfo);
+    return m_pInfo->GetDuration();
+}
+
+
+SegmentInfo::SegmentInfo(Segment* pSegment, long long start, long long size_) :
+    m_pSegment(pSegment),
+    m_start(start),
+    m_size(size_),
+    m_pMuxingAppAsUTF8(NULL),
+    m_pWritingAppAsUTF8(NULL),
+    m_pTitleAsUTF8(NULL)
+{
+    IMkvReader* const pReader = m_pSegment->m_pReader;
+   
+    long long pos = start;
+    const long long stop = start + size_;
+    
+    m_timecodeScale = 1000000;
+    m_duration = 0;
+    
+    
+    while (pos < stop)
+    {
+        if (Match(pReader, pos, 0x0AD7B1, m_timecodeScale))
+            assert(m_timecodeScale > 0);
+
+        else if (Match(pReader, pos, 0x0489, m_duration))
+            assert(m_duration >= 0);
+
+        else if (Match(pReader, pos, 0x0D80, m_pMuxingAppAsUTF8))   //[4D][80] 
+            assert(m_pMuxingAppAsUTF8);
+
+        else if (Match(pReader, pos, 0x1741, m_pWritingAppAsUTF8))  //[57][41]
+            assert(m_pWritingAppAsUTF8);
+            
+        else if (Match(pReader, pos, 0x3BA9, m_pTitleAsUTF8))        //[7B][A9]
+            assert(m_pTitleAsUTF8);
+
+        else
+        {
+            long len;
+            
+            const long long id = ReadUInt(pReader, pos, len);
+            //id;
+            assert(id >= 0);
+            assert((pos + len) <= stop);
+            
+            pos += len;  //consume id
+            assert((stop - pos) > 0);
+            
+            const long long size = ReadUInt(pReader, pos, len);
+            assert(size >= 0);
+            assert((pos + len) <= stop);
+            
+            pos += len + size;  //consume size and payload
+            assert(pos <= stop);
+        }
+    }
+    
+    assert(pos == stop);
+}
+
+SegmentInfo::~SegmentInfo()
+{
+    if (m_pMuxingAppAsUTF8)
+    {
+        delete[] m_pMuxingAppAsUTF8;
+        m_pMuxingAppAsUTF8 = NULL;
+    }
+
+    if (m_pWritingAppAsUTF8)
+    {
+        delete[] m_pWritingAppAsUTF8;
+        m_pWritingAppAsUTF8 = NULL;
+    }
+   
+    if (m_pTitleAsUTF8)
+    {
+        delete[] m_pTitleAsUTF8;
+        m_pTitleAsUTF8 = NULL;
+    }
+}
+
+long long SegmentInfo::GetTimeCodeScale() const
+{
+    return m_timecodeScale;
+}
+
+
+long long SegmentInfo::GetDuration() const
+{
+    assert(m_duration >= 0);    
+    assert(m_timecodeScale >= 1);
+    
+    const double dd = double(m_duration) * double(m_timecodeScale);
+    const long long d = static_cast<long long>(dd);
+    
+    return d;
+}
+
+const char* SegmentInfo::GetMuxingAppAsUTF8() const
+{
+    return m_pMuxingAppAsUTF8;
+}
+
+const char* SegmentInfo::GetWritingAppAsUTF8() const
+{
+    return m_pWritingAppAsUTF8;
+}
+
+const char* SegmentInfo::GetTitleAsUTF8() const
+{
+    return m_pTitleAsUTF8;
+}
+
+Track::Track(Segment* pSegment, const Info& i) :
+    m_pSegment(pSegment),
+    m_info(i)
+{
+}
+
+Track::~Track()
+{
+    Info& info = const_cast<Info&>(m_info);
+    info.Clear();
+}
+
+Track::Info::Info():
+    type(-1),
+    number(-1),
+    uid(-1),
+    nameAsUTF8(NULL),
+    codecId(NULL),
+    codecPrivate(NULL),
+    codecPrivateSize(0),
+    codecNameAsUTF8(NULL)
+{
+}
+
+void Track::Info::Clear() 
+{
+    delete[] nameAsUTF8;
+    nameAsUTF8 = NULL;
+
+    delete[] codecId;
+    codecId = NULL;
+
+    delete[] codecPrivate;
+    codecPrivate = NULL;
+
+    delete[] codecNameAsUTF8;
+    codecNameAsUTF8 = NULL;
+}
+
+const BlockEntry* Track::GetEOS() const
+{
+    return &m_eos;
+}
+
+long long Track::GetType() const
+{
+    const unsigned long result = static_cast<unsigned long>(m_info.type);
+    return result;
+}
+
+unsigned long Track::GetNumber() const
+{
+    assert(m_info.number >= 0);
+    const unsigned long result = static_cast<unsigned long>(m_info.number);
+    return result;
+}
+
+const char* Track::GetNameAsUTF8() const
+{
+    return m_info.nameAsUTF8;
+}
+
+const char* Track::GetCodecNameAsUTF8() const
+{  
+    return m_info.codecNameAsUTF8;
+}
+
+
+const char* Track::GetCodecId() const
+{
+    return m_info.codecId;
+}
+
+
+const unsigned char* Track::GetCodecPrivate(size_t *optionalSize) const
+{
+    if (optionalSize) {
+        *optionalSize = m_info.codecPrivateSize;
+    }
+    return m_info.codecPrivate;
+}
+
+
+long Track::GetFirst(const BlockEntry*& pBlockEntry) const
+{
+    Cluster* const pCluster = m_pSegment->GetFirst();
+    
+    //If Segment::GetFirst returns NULL, then this must be a network 
+    //download, and we haven't loaded any clusters yet.  In this case,
+    //returning NULL from Track::GetFirst means the same thing.
+
+    if ((pCluster == NULL) || pCluster->EOS())
+    {
+        pBlockEntry = NULL;
+        return E_BUFFER_NOT_FULL;  //return 1L instead?
+    }
+        
+    pBlockEntry = pCluster->GetFirst();
+    
+    while (pBlockEntry)
+    {
+        const Block* const pBlock = pBlockEntry->GetBlock();
+        assert(pBlock);
+        
+        if (pBlock->GetTrackNumber() == (unsigned long)m_info.number)
+            return 0L;
+            
+        pBlockEntry = pCluster->GetNext(pBlockEntry);
+    }
+    
+    //NOTE: if we get here, it means that we didn't find a block with
+    //a matching track number.  We interpret that as an error (which
+    //might be too conservative).
+
+    pBlockEntry = GetEOS();  //so we can return a non-NULL value
+    return 1L;
+}
+
+
+long Track::GetNext(const BlockEntry* pCurrEntry, const BlockEntry*& pNextEntry) const
+{
+    assert(pCurrEntry);
+    assert(!pCurrEntry->EOS());  //?
+    assert(pCurrEntry->GetBlock()->GetTrackNumber() == (unsigned long)m_info.number);    
+    
+    const Cluster* const pCurrCluster = pCurrEntry->GetCluster();
+    assert(pCurrCluster);
+    assert(!pCurrCluster->EOS());
+    
+    pNextEntry = pCurrCluster->GetNext(pCurrEntry);
+            
+    while (pNextEntry)
+    {    
+        const Block* const pNextBlock = pNextEntry->GetBlock();
+        assert(pNextBlock);
+    
+        if (pNextBlock->GetTrackNumber() == (unsigned long)m_info.number)
+            return 0L;
+            
+        pNextEntry = pCurrCluster->GetNext(pNextEntry);
+    }
+
+    Segment* pSegment = pCurrCluster->m_pSegment;    
+    Cluster* const pNextCluster = pSegment->GetNext(pCurrCluster);
+    
+    if ((pNextCluster == NULL) || pNextCluster->EOS())
+    {
+        if (pSegment->Unparsed() <= 0)   //all clusters have been loaded
+        {
+            pNextEntry = GetEOS();
+            return 1L;
+        }
+        
+        pNextEntry = NULL;
+        return E_BUFFER_NOT_FULL;
+    }
+        
+    pNextEntry = pNextCluster->GetFirst();
+    
+    while (pNextEntry)
+    {
+        const Block* const pNextBlock = pNextEntry->GetBlock();
+        assert(pNextBlock);
+        
+        if (pNextBlock->GetTrackNumber() == (unsigned long)m_info.number)
+            return 0L;
+            
+        pNextEntry = pNextCluster->GetNext(pNextEntry);
+    }
+    
+    //TODO: what has happened here is that we did not find a block
+    //with a matching track number on the next cluster.  It might
+    //be the case that some cluster beyond the next cluster 
+    //contains a block having a matching track number, but for
+    //now we terminate the search immediately.  We do this so that
+    //we don't end up searching the entire file looking for the
+    //next block.  Another possibility is to try searching for the next
+    //block in a small, fixed number of clusters (intead searching
+    //just the next one), or to terminate the search when when the
+    //there is a large gap in time, or large gap in file position.  It
+    //might very well be the case that the approach we use here is
+    //unnecessarily conservative.
+    
+    //TODO: again, here's a case where we need to return the special
+    //EOS block.  Or something.  It's OK if pNext is NULL, because
+    //we only need it to set the stop time of the media sample.
+    //(The start time is determined from pCurr, which is non-NULL
+    //and non-EOS.)  The problem is when we set pCurr=pNext; when
+    //pCurr has the value NULL we interpret that to mean that we
+    //haven't fully initialized pCurr and we attempt to set it to
+    //point to the first block for this track.  But that's not what
+    //we want at all; we want the next call to PopulateSample to
+    //return end-of-stream, not (re)start from the beginning.
+    //
+    //One work-around is to send EOS immediately.  We would send 
+    //the EOS the next pass anyway, so maybe it's no great loss.  The 
+    //only problem is that if this the stream really does end one
+    //cluster early (relative to other tracks), or the last frame
+    //happens to be a keyframe ("CanSeekToEnd").
+    //
+    //The problem is that we need a way to mark as stream as
+    //"at end of stream" without actually being at end of stream.
+    //We need to give pCurr some value that means "you've reached EOS".
+    //We can't synthesize the special EOS Cluster immediately
+    //(when we first open the file, say), because we use the existance
+    //of that special cluster value to mean that we've read all of 
+    //the clusters (this is a network download, so we can't know apriori
+    //how many we have).
+    //
+    //Or, we could return E_FAIL, and set another bit in the stream
+    //object itself, to indicate that it should send EOS earlier
+    //than when (pCurr=pStop).
+    //
+    //Or, probably the best solution, when we actually load the 
+    //blocks into a cluster: if we notice that there's no block
+    //for a track, we synthesize a nonce EOS block for that track.
+    //That way we always have something to return.  But that will
+    //only work for sequential scan???
+
+    //pNext = NULL;    
+    //return E_FAIL;
+    pNextEntry = GetEOS();
+    return 1L;
+}
+
+
+Track::EOSBlock::EOSBlock()
+{
+}
+
+
+bool Track::EOSBlock::EOS() const
+{
+    return true;
+}
+
+
+Cluster* Track::EOSBlock::GetCluster() const
+{
+    return NULL;
+}
+
+
+size_t Track::EOSBlock::GetIndex() const
+{
+    return 0;
+}
+
+
+const Block* Track::EOSBlock::GetBlock() const
+{
+    return NULL;
+}
+
+
+bool Track::EOSBlock::IsBFrame() const
+{
+    return false;
+}
+
+
+VideoTrack::VideoTrack(Segment* pSegment, const Info& i) :
+    Track(pSegment, i),
+    m_width(-1),
+    m_height(-1),
+    m_rate(-1)
+{
+    assert(i.type == 1);
+    assert(i.number > 0);
+    
+    IMkvReader* const pReader = pSegment->m_pReader;
+    
+    const Settings& s = i.settings;
+    assert(s.start >= 0);
+    assert(s.size >= 0);
+    
+    long long pos = s.start;
+    assert(pos >= 0);
+    
+    const long long stop = pos + s.size;
+    
+    while (pos < stop)
+    {
+#ifdef _DEBUG
+        long len;
+        const long long id = ReadUInt(pReader, pos, len);
+        assert(id >= 0);  //TODO: handle error case
+        assert((pos + len) <= stop);
+#endif
+        if (Match(pReader, pos, 0x30, m_width))         
+            ;
+        else if (Match(pReader, pos, 0x3A, m_height))   
+            ;
+        else if (Match(pReader, pos, 0x0383E3, m_rate)) 
+            ;
+        else
+        {
+            long len;
+            const long long id = ReadUInt(pReader, pos, len);
+            assert(id >= 0);  //TODO: handle error case
+            assert((pos + len) <= stop);
+        
+            pos += len;  //consume id
+            
+            const long long size = ReadUInt(pReader, pos, len);
+            assert(size >= 0);  //TODO: handle error case
+            assert((pos + len) <= stop);
+            
+            pos += len;  //consume length of size
+            assert((pos + size) <= stop);
+            
+            //pos now designates start of payload
+            
+            pos += size;  //consume payload
+            assert(pos <= stop);
+        }
+    }
+    
+    return;
+}
+
+
+bool VideoTrack::VetEntry(const BlockEntry* pBlockEntry) const
+{
+    assert(pBlockEntry);
+    
+    const Block* const pBlock = pBlockEntry->GetBlock();
+    assert(pBlock);    
+    assert(pBlock->GetTrackNumber() == (unsigned long)m_info.number);
+    
+    return pBlock->IsKey();
+}
+
+
+
+long long VideoTrack::GetWidth() const
+{
+    return m_width;
+}
+
+
+long long VideoTrack::GetHeight() const
+{
+    return m_height;
+}
+
+
+double VideoTrack::GetFrameRate() const
+{
+    return m_rate;
+}
+
+
+AudioTrack::AudioTrack(Segment* pSegment, const Info& i) :
+    Track(pSegment, i)
+{
+    assert(i.type == 2);
+    assert(i.number > 0);
+
+    IMkvReader* const pReader = pSegment->m_pReader;
+    
+    const Settings& s = i.settings;
+    assert(s.start >= 0);
+    assert(s.size >= 0);
+    
+    long long pos = s.start;
+    assert(pos >= 0);
+    
+    const long long stop = pos + s.size;
+    
+    while (pos < stop)
+    {
+#ifdef _DEBUG
+        long len;
+        const long long id = ReadUInt(pReader, pos, len);
+        assert(id >= 0);  //TODO: handle error case
+        assert((pos + len) <= stop);
+#endif
+        if (Match(pReader, pos, 0x35, m_rate))            
+            ;
+        else if (Match(pReader, pos, 0x1F, m_channels))   
+            ;
+        else if (Match(pReader, pos, 0x2264, m_bitDepth))  
+            ;            
+        else
+        {
+            long len;
+            const long long id = ReadUInt(pReader, pos, len);
+            assert(id >= 0);  //TODO: handle error case
+            assert((pos + len) <= stop);
+        
+            pos += len;  //consume id
+            
+            const long long size = ReadUInt(pReader, pos, len);
+            assert(size >= 0);  //TODO: handle error case
+            assert((pos + len) <= stop);
+            
+            pos += len;  //consume length of size
+            assert((pos + size) <= stop);
+            
+            //pos now designates start of payload
+            
+            pos += size;  //consume payload
+            assert(pos <= stop);
+        }
+    }
+
+    return;
+}
+
+bool AudioTrack::VetEntry(const BlockEntry* pBlockEntry) const
+{
+    assert(pBlockEntry);
+    
+    const Block* const pBlock = pBlockEntry->GetBlock();
+    assert(pBlock);
+    assert(pBlock->GetTrackNumber() == (unsigned long)m_info.number);
+
+    return true;
+}
+
+
+double AudioTrack::GetSamplingRate() const
+{
+    return m_rate;
+}
+
+
+long long AudioTrack::GetChannels() const
+{
+    return m_channels;
+}
+
+long long AudioTrack::GetBitDepth() const
+{
+    return m_bitDepth;
+}
+
+Tracks::Tracks(Segment* pSegment, long long start, long long size_) :
+    m_pSegment(pSegment),
+    m_start(start),
+    m_size(size_),
+    m_trackEntries(NULL),
+    m_trackEntriesEnd(NULL)
+{
+    long long stop = m_start + m_size;
+    IMkvReader* const pReader = m_pSegment->m_pReader;
+    
+    long long pos1 = m_start;
+    int count = 0;
+    
+    while (pos1 < stop)
+    {
+        long len;
+        const long long id = ReadUInt(pReader, pos1, len);
+        assert(id >= 0);
+        assert((pos1 + len) <= stop);
+        
+        pos1 += len;  //consume id
+        
+        const long long size = ReadUInt(pReader, pos1, len);
+        assert(size >= 0);
+        assert((pos1 + len) <= stop);
+        
+        pos1 += len;  //consume length of size
+        
+        //pos now desinates start of element
+        if (id == 0x2E)  //TrackEntry ID
+            ++count;
+            
+        pos1 += size;  //consume payload
+        assert(pos1 <= stop);
+    }    
+
+    if (count <= 0)
+        return;
+
+    m_trackEntries = new Track*[count];
+    m_trackEntriesEnd = m_trackEntries;
+
+    long long pos = m_start;
+
+    while (pos < stop)
+    {
+        long len;
+        const long long id = ReadUInt(pReader, pos, len);
+        assert(id >= 0);
+        assert((pos + len) <= stop);
+        
+        pos += len;  //consume id
+        
+        const long long size1 = ReadUInt(pReader, pos, len);
+        assert(size1 >= 0);
+        assert((pos + len) <= stop);
+        
+        pos += len;  //consume length of size
+        
+        //pos now desinates start of element
+        
+        if (id == 0x2E)  //TrackEntry ID
+            ParseTrackEntry(pos, size1, *m_trackEntriesEnd++);
+            
+        pos += size1;  //consume payload
+        assert(pos <= stop);
+    }    
+}
+
+unsigned long Tracks::GetTracksCount() const
+{
+    const ptrdiff_t result = m_trackEntriesEnd - m_trackEntries;
+    assert(result >= 0);
+    
+    return static_cast<unsigned long>(result);
+}
+
+
+void Tracks::ParseTrackEntry(
+    long long start,
+    long long size,
+    Track*& pTrack)
+{
+    IMkvReader* const pReader = m_pSegment->m_pReader;
+    
+    long long pos = start;
+    const long long stop = start + size;
+
+    Track::Info i;
+    
+    Track::Settings videoSettings;
+    videoSettings.start = -1;
+    
+    Track::Settings audioSettings;
+    audioSettings.start = -1;
+    
+    while (pos < stop)
+    {
+#ifdef _DEBUG
+        long len;
+        const long long id = ReadUInt(pReader, pos, len);
+        len;
+        id;
+#endif
+        if (Match(pReader, pos, 0x57, i.number))
+            assert(i.number > 0);
+
+        else if (Match(pReader, pos, 0x33C5, i.uid))           
+            ;  
+
+        else if (Match(pReader, pos, 0x03, i.type))            
+            ;  
+
+        else if (Match(pReader, pos, 0x136E, i.nameAsUTF8))          
+            assert(i.nameAsUTF8);  
+
+        else if (Match(pReader, pos, 0x06, i.codecId))         
+            ;  
+
+        else if (Match(pReader, pos, 0x23A2, i.codecPrivate, &i.codecPrivateSize))  
+            ;  
+
+        else if (Match(pReader, pos, 0x058688, i.codecNameAsUTF8))   
+            assert(i.codecNameAsUTF8);  
+
+        else
+        {
+            long len;
+            
+            const long long id = ReadUInt(pReader, pos, len);
+            assert(id >= 0);  //TODO: handle error case
+            assert((pos + len) <= stop);
+            
+            pos += len;  //consume id
+            
+            const long long size = ReadUInt(pReader, pos, len);
+            assert(size >= 0);  //TODO: handle error case
+            assert((pos + len) <= stop);
+            
+            pos += len;  //consume length of size
+            const long long start = pos;
+            
+            pos += size;  //consume payload
+            assert(pos <= stop);
+            
+            if (id == 0x60)
+            {
+                videoSettings.start = start;
+                videoSettings.size = size;
+            }
+            else if (id == 0x61)
+            {
+                audioSettings.start = start;
+                audioSettings.size = size;
+            }
+        }
+    }
+    
+    assert(pos == stop);
+    //TODO: propertly vet info.number, to ensure both its existence,
+    //and that it is unique among all tracks.
+    assert(i.number > 0);
+
+    //TODO: vet settings, to ensure that video settings (0x60)
+    //were specified when type = 1, and that audio settings (0x61)
+    //were specified when type = 2.    
+    if (i.type == 1)  //video
+    {
+        assert(audioSettings.start < 0);
+        assert(videoSettings.start >= 0);
+        
+        i.settings = videoSettings;
+        
+        VideoTrack* const t = new VideoTrack(m_pSegment, i);
+        assert(t);  //TODO
+        pTrack = t;    
+    }
+    else if (i.type == 2)  //audio
+    {
+        assert(videoSettings.start < 0);
+        assert(audioSettings.start >= 0);
+        
+        i.settings = audioSettings;
+        
+        AudioTrack* const t = new  AudioTrack(m_pSegment, i);
+        assert(t);  //TODO
+        pTrack = t;  
+    }
+    else
+    {
+        // for now we do not support other track types yet.
+        // TODO: support other track types
+        i.Clear();
+  
+        pTrack = NULL;
+    }
+    
+    return;
+}
+
+
+Tracks::~Tracks()
+{
+    Track** i = m_trackEntries;
+    Track** const j = m_trackEntriesEnd;
+    
+    while (i != j)
+    {
+        Track* pTrack = *i++;
+        delete pTrack;
+        pTrack = NULL;    
+    }
+
+    delete[] m_trackEntries;
+}
+
+
+Track* Tracks::GetTrackByNumber(unsigned long tn) const
+{
+    Track** i = m_trackEntries;
+    Track** const j = m_trackEntriesEnd;
+
+    while (i != j)
+    {
+        Track* const pTrack = *i++;
+       
+        if (pTrack == NULL)
+            continue;
+
+        if (tn == pTrack->GetNumber())
+            return pTrack;
+    }
+
+    return NULL;  //not found
+}
+
+
+Track* Tracks::GetTrackByIndex(unsigned long idx) const
+{
+    const ptrdiff_t count = m_trackEntriesEnd - m_trackEntries;
+       
+    if (idx >= static_cast<unsigned long>(count))
+         return NULL;
+
+    return m_trackEntries[idx];
+}
+
+
+void Cluster::Load()
+{
+    assert(m_pSegment);
+    
+    if (m_start > 0)
+    {
+        assert(m_size > 0);
+        assert(m_timecode >= 0);
+        return;
+    }
+    
+    assert(m_size == 0);
+    assert(m_timecode < 0);
+    
+    IMkvReader* const pReader = m_pSegment->m_pReader;
+
+    const long long off = -m_start;  //relative to segment
+    long long pos = m_pSegment->m_start + off;  //absolute
+    
+    long len;
+
+    const long long id_ = ReadUInt(pReader, pos, len);
+    assert(id_ >= 0);
+    assert(id_ == 0x0F43B675);  //Cluster ID
+    
+    pos += len;  //consume id
+    
+    const long long size_ = ReadUInt(pReader, pos, len);
+    assert(size_ >= 0);
+    
+    pos += len;  //consume size
+    
+    m_start = pos;
+    m_size = size_;
+    
+    const long long stop = m_start + size_;
+    
+    long long timecode = -1;
+    
+    while (pos < stop)
+    {
+        if (Match(pReader, pos, 0x67, timecode))
+            break;            
+        else
+        {
+            const long long id = ReadUInt(pReader, pos, len);
+            assert(id >= 0);  //TODO
+            assert((pos + len) <= stop);
+            
+            pos += len;  //consume id
+            
+            const long long size = ReadUInt(pReader, pos, len);
+            assert(size >= 0);  //TODO
+            assert((pos + len) <= stop);
+            
+            pos += len;  //consume size
+            
+            if (id == 0x20)  //BlockGroup ID
+                break;
+                
+            if (id == 0x23)  //SimpleBlock ID
+                break;
+
+            pos += size;  //consume payload
+            assert(pos <= stop);
+        }
+    }
+    
+    assert(pos <= stop);
+    assert(timecode >= 0);
+    
+    m_timecode = timecode;
+}
+
+
+Cluster* Cluster::Parse(
+    Segment* pSegment,
+    size_t idx,
+    long long off)
+{
+    assert(pSegment);
+    assert(off >= 0);
+    assert(off < pSegment->m_size);
+    Cluster* const pCluster = new Cluster(pSegment, idx, -off);
+    assert(pCluster);
+    
+    return pCluster;
+}
+
+
+Cluster::Cluster() :
+    m_pSegment(NULL),
+    m_index(0),
+    m_start(0),
+    m_size(0),
+    m_timecode(0),
+    m_pEntries(NULL),
+    m_entriesCount(0)
+{
+}
+
+Cluster::Cluster(
+    Segment* pSegment,
+    size_t idx,
+    long long off) :
+    m_pSegment(pSegment),
+    m_index(idx),
+    m_start(off),
+    m_size(0),
+    m_timecode(-1),
+    m_pEntries(NULL),
+    m_entriesCount(0)
+{
+}
+
+
+Cluster::~Cluster()
+{
+#if 0
+    while (!m_pEntries.empty())
+    {
+        BlockEntry* pBlockEntry = m_pEntries.front();
+        assert(pBlockEntry);
+        
+        m_pEntries.pop_front();
+        delete pBlockEntry;
+    }
+#else
+    BlockEntry** i = m_pEntries;
+    BlockEntry** const j = m_pEntries + m_entriesCount;
+    while (i != j)
+    {
+         BlockEntry* p = *i++;
+   
+         assert(p);
+         delete p;
+    }
+ 
+    delete[] m_pEntries;
+#endif
+
+}
+
+bool Cluster::EOS() const
+{
+    return (m_pSegment == 0);
+}
+
+
+void Cluster::LoadBlockEntries()
+{
+    if (m_pEntries)
+        return;
+
+    Load();    
+    assert(m_timecode >= 0);
+    assert(m_start > 0);
+    assert(m_size > 0);
+    
+    IMkvReader* const pReader = m_pSegment->m_pReader;
+    
+    long long pos = m_start;
+    const long long stop = m_start + m_size;
+    long long timecode = -1;
+   
+    long long idx = pos;
+
+    m_entriesCount = 0;
+    
+    while (idx < stop)
+    {
+        if (Match(pReader, idx, 0x67, timecode))
+            assert(timecode == m_timecode);
+        else 
+        {
+            long len;
+            
+            const long long id = ReadUInt(pReader, idx, len);
+            assert(id >= 0);  //TODO
+            assert((idx + len) <= stop);
+            
+            idx += len;  //consume id
+            
+            const long long size = ReadUInt(pReader, idx, len);
+            assert(size >= 0);  //TODO
+            assert((idx + len) <= stop);
+            
+            idx += len;  //consume size
+            
+            if (id == 0x20)  //BlockGroup ID
+                ++m_entriesCount;
+            else if (id == 0x23)  //SimpleBlock ID
+                ++m_entriesCount;
+
+            idx += size;  //consume payload
+
+            assert(idx <= stop);
+        }  
+    }
+
+    if (m_entriesCount == 0)
+        return;
+     
+    m_pEntries = new BlockEntry*[m_entriesCount];
+    size_t index = 0;
+    
+    while (pos < stop)
+    {
+        if (Match(pReader, pos, 0x67, timecode))
+            assert(timecode == m_timecode);
+        else
+        {
+            long len;
+            const long long id = ReadUInt(pReader, pos, len);
+            assert(id >= 0);  //TODO
+            assert((pos + len) <= stop);
+            
+            pos += len;  //consume id
+            
+            const long long size = ReadUInt(pReader, pos, len);
+            assert(size >= 0);  //TODO
+            assert((pos + len) <= stop);
+            
+            pos += len;  //consume size
+            
+            if (id == 0x20)  //BlockGroup ID
+                ParseBlockGroup(pos, size, index++);
+            else if (id == 0x23)  //SimpleBlock ID
+                ParseSimpleBlock(pos, size, index++);
+
+            pos += size;  //consume payload
+            assert(pos <= stop);
+        }
+    }
+    
+    assert(pos == stop);
+    assert(timecode >= 0);
+    assert(index == m_entriesCount);
+}
+
+
+
+long long Cluster::GetTimeCode()
+{
+    Load();
+    return m_timecode;
+}
+
+
+long long Cluster::GetTime()
+{
+    const long long tc = GetTimeCode();
+    assert(tc >= 0);
+    
+    const SegmentInfo* const pInfo = m_pSegment->GetInfo();
+    assert(pInfo);
+    
+    const long long scale = pInfo->GetTimeCodeScale();
+    assert(scale >= 1);
+    
+    const long long t = m_timecode * scale;
+
+    return t;
+}
+
+
+void Cluster::ParseBlockGroup(long long start, long long size, size_t index)
+{
+    assert(m_pEntries);
+    assert(m_entriesCount);
+    assert(index < m_entriesCount);
+    
+    BlockGroup* const pGroup = new BlockGroup(this, index, start, size);
+    assert(pGroup);  //TODO
+        
+    m_pEntries[index] = pGroup;
+}
+
+
+
+void Cluster::ParseSimpleBlock(long long start, long long size, size_t index)
+{
+    assert(m_pEntries);
+    assert(m_entriesCount);
+    assert(index < m_entriesCount);
+
+    SimpleBlock* const pSimpleBlock = new SimpleBlock(this, index, start, size);
+    assert(pSimpleBlock);  //TODO
+        
+    m_pEntries[index] = pSimpleBlock;
+}
+
+
+const BlockEntry* Cluster::GetFirst()
+{
+    LoadBlockEntries();
+    
+    return m_pEntries[0];
+}
+
+        
+const BlockEntry* Cluster::GetLast()
+{ 
+    if (m_entriesCount == 0)
+        return m_pEntries[0];
+    
+    return m_pEntries[m_entriesCount-1];
+}
+
+        
+const BlockEntry* Cluster::GetNext(const BlockEntry* pEntry) const
+{
+    assert(pEntry);
+    
+    size_t idx = pEntry->GetIndex();
+    
+    ++idx;
+
+    if (idx == m_entriesCount) 
+      return NULL;
+
+    return m_pEntries[idx];
+
+}
+
+
+const BlockEntry* Cluster::GetEntry(const Track* pTrack)
+{
+
+    assert(pTrack);
+    
+    if (m_pSegment == NULL)  //EOS
+        return pTrack->GetEOS();
+    
+    LoadBlockEntries();
+    
+    BlockEntry* i = *m_pEntries;
+    BlockEntry* j = *m_pEntries + m_entriesCount;
+    while (i != j)
+    {
+        BlockEntry* pEntry = i;
+        i++;
+        assert(pEntry);
+        assert(!pEntry->EOS());
+        
+        const Block* const pBlock = pEntry->GetBlock();
+        assert(pBlock);
+        
+        if (pBlock->GetTrackNumber() != pTrack->GetNumber())
+            continue;
+
+        if (pTrack->VetEntry(pEntry))
+            return pEntry;
+    }
+    
+    return pTrack->GetEOS();  //no satisfactory block found
+}
+
+
+BlockEntry::BlockEntry()
+{
+}
+
+
+BlockEntry::~BlockEntry()
+{
+}
+
+
+
+SimpleBlock::SimpleBlock(
+    Cluster* pCluster, 
+    size_t idx, 
+    long long start, 
+    long long size) :
+    m_pCluster(pCluster),
+    m_index(idx),
+    m_block(start, size, pCluster->m_pSegment->m_pReader)
+{
+}
+
+
+bool SimpleBlock::EOS() const
+{
+    return false;
+}
+
+
+Cluster* SimpleBlock::GetCluster() const
+{
+    return m_pCluster;
+}
+
+
+size_t SimpleBlock::GetIndex() const
+{
+    return m_index;
+}
+
+
+const Block* SimpleBlock::GetBlock() const
+{
+    return &m_block;
+}
+
+
+bool SimpleBlock::IsBFrame() const
+{
+    return false;
+}
+
+
+BlockGroup::BlockGroup(
+    Cluster* pCluster, 
+    size_t idx, 
+    long long start, 
+    long long size_) :
+    m_pCluster(pCluster),
+    m_index(idx),
+    m_prevTimeCode(0),
+    m_nextTimeCode(0),
+    m_pBlock(NULL)  //TODO: accept multiple blocks within a block group
+{
+    IMkvReader* const pReader = m_pCluster->m_pSegment->m_pReader;
+    
+    long long pos = start;
+    const long long stop = start + size_;
+ 
+    bool bSimpleBlock = false;
+    
+    while (pos < stop)
+    {
+        short t;
+    
+        if (Match(pReader, pos, 0x7B, t))
+        {    
+            if (t < 0)
+                m_prevTimeCode = t;
+            else if (t > 0)
+                m_nextTimeCode = t;
+            else
+                assert(false);
+        }
+        else
+        {
+            long len;
+            const long long id = ReadUInt(pReader, pos, len);
+            assert(id >= 0);  //TODO
+            assert((pos + len) <= stop);
+            
+            pos += len;  //consume ID
+            
+            const long long size = ReadUInt(pReader, pos, len);
+            assert(size >= 0);  //TODO
+            assert((pos + len) <= stop);
+            
+            pos += len;  //consume size
+            
+            switch (id)
+            {
+                case 0x23:  //SimpleBlock ID
+                    bSimpleBlock = true;
+                    //YES, FALL THROUGH TO NEXT CASE
+
+                case 0x21:  //Block ID
+                    ParseBlock(pos, size);                    
+                    break;
+                    
+                default:
+                    break;
+            }
+                
+            pos += size;  //consume payload
+            assert(pos <= stop);
+        }
+    }
+    
+    assert(pos == stop);
+    assert(m_pBlock);
+    
+    if (!bSimpleBlock)
+        m_pBlock->SetKey(m_prevTimeCode >= 0);
+}
+
+
+BlockGroup::~BlockGroup()
+{
+    delete m_pBlock;
+}
+
+
+void BlockGroup::ParseBlock(long long start, long long size)
+{   
+    IMkvReader* const pReader = m_pCluster->m_pSegment->m_pReader;
+    
+    Block* const pBlock = new Block(start, size, pReader);
+    assert(pBlock);  //TODO
+
+    //TODO: the Matroska spec says you have multiple blocks within the 
+    //same block group, with blocks ranked by priority (the flag bits).
+    //I haven't ever seen such a file (mkvmux certainly doesn't make
+    //one), so until then I'll just assume block groups contain a single
+    //block.
+#if 0    
+    m_blocks.push_back(pBlock);
+#else
+    assert(m_pBlock == NULL);
+    m_pBlock = pBlock;
+#endif
+
+#if 0
+    Track* const pTrack = pBlock->GetTrack();
+    assert(pTrack);
+    
+    pTrack->Insert(pBlock);
+#endif
+}
+
+
+bool BlockGroup::EOS() const
+{
+    return false;
+}
+
+
+Cluster* BlockGroup::GetCluster() const
+{
+    return m_pCluster;
+}
+
+
+size_t BlockGroup::GetIndex() const
+{
+    return m_index;
+}
+
+
+const Block* BlockGroup::GetBlock() const
+{
+    return m_pBlock;
+}
+
+
+short BlockGroup::GetPrevTimeCode() const
+{
+    return m_prevTimeCode;
+}
+
+
+short BlockGroup::GetNextTimeCode() const
+{
+    return m_nextTimeCode;
+}    
+
+
+bool BlockGroup::IsBFrame() const
+{
+    return (m_nextTimeCode > 0);
+}
+
+
+
+Block::Block(long long start, long long size_, IMkvReader* pReader) :
+    m_start(start),
+    m_size(size_)
+{
+    long long pos = start;
+    const long long stop = start + size_;
+
+    long len;
+    
+    m_track = ReadUInt(pReader, pos, len);
+    assert(m_track > 0);
+    assert((pos + len) <= stop);
+    
+    pos += len;  //consume track number
+    assert((stop - pos) >= 2);
+    
+    m_timecode = Unserialize2SInt(pReader, pos);
+
+    pos += 2;
+    assert((stop - pos) >= 1);
+    
+    const long hr = pReader->Read(pos, 1, &m_flags);
+    assert(hr == 0L);
+
+    ++pos;
+    assert(pos <= stop);
+    
+    m_frameOff = pos;
+    
+    const long long frame_size = stop - pos;
+
+    assert(frame_size <= 2147483647L);
+    
+    m_frameSize = static_cast<long>(frame_size);
+}
+
+
+long long Block::GetTimeCode(Cluster* pCluster) const
+{
+    assert(pCluster);
+    
+    const long long tc0 = pCluster->GetTimeCode();
+    assert(tc0 >= 0);
+    
+    const long long tc = tc0 + static_cast<long long>(m_timecode);
+    assert(tc >= 0);
+    
+    return tc;  //unscaled timecode units
+}
+
+
+long long Block::GetTime(Cluster* pCluster) const
+{
+    assert(pCluster);
+    
+    const long long tc = GetTimeCode(pCluster);
+    
+    const Segment* const pSegment = pCluster->m_pSegment;
+    const SegmentInfo* const pInfo = pSegment->GetInfo();
+    assert(pInfo);
+    
+    const long long scale = pInfo->GetTimeCodeScale();
+    assert(scale >= 1);
+    
+    const long long ns = tc * scale;
+
+    return ns;
+}
+
+
+unsigned long Block::GetTrackNumber() const
+{
+    assert(m_track > 0);
+    
+    return static_cast<unsigned long>(m_track);
+}
+
+
+bool Block::IsKey() const
+{
+    return ((m_flags & static_cast<unsigned char>(1 << 7)) != 0);
+}
+
+
+void Block::SetKey(bool bKey)
+{
+    if (bKey)
+        m_flags |= static_cast<unsigned char>(1 << 7);
+    else
+        m_flags &= 0x7F;
+}
+
+
+long Block::GetSize() const
+{
+    return m_frameSize;
+}
+
+
+long Block::Read(IMkvReader* pReader, unsigned char* buf) const
+{
+
+    assert(pReader);
+    assert(buf);
+    
+    const long hr = pReader->Read(m_frameOff, m_frameSize, buf);
+    
+    return hr;
+}
+
+
+}  //end namespace mkvparser
diff --git a/media/libstagefright/matroska/mkvparser.hpp b/media/libstagefright/matroska/mkvparser.hpp
new file mode 100644
index 0000000..4d311b4
--- /dev/null
+++ b/media/libstagefright/matroska/mkvparser.hpp
@@ -0,0 +1,428 @@
+#ifndef MKVPARSER_HPP
+#define MKVPARSER_HPP
+
+#include <cstdlib>
+#include <cstdio>
+
+namespace mkvparser
+{
+
+const int E_FILE_FORMAT_INVALID = -2;
+const int E_BUFFER_NOT_FULL = -3;
+
+class IMkvReader
+{
+public:
+    virtual int Read(long long position, long length, unsigned char* buffer) = 0;
+    virtual int Length(long long* total, long long* available) = 0; 	
+protected:
+    virtual ~IMkvReader();
+};
+
+long long GetUIntLength(IMkvReader*, long long, long&);
+long long ReadUInt(IMkvReader*, long long, long&);
+long long SyncReadUInt(IMkvReader*, long long pos, long long stop, long&);
+long long UnserializeUInt(IMkvReader*, long long pos, long long size);
+float Unserialize4Float(IMkvReader*, long long);
+double Unserialize8Double(IMkvReader*, long long);
+short Unserialize2SInt(IMkvReader*, long long);
+signed char Unserialize1SInt(IMkvReader*, long long);
+bool Match(IMkvReader*, long long&, unsigned long, long long&);
+bool Match(IMkvReader*, long long&, unsigned long, char*&);
+bool Match(IMkvReader*, long long&, unsigned long,unsigned char*&,
+           size_t *optionalSize = NULL);
+bool Match(IMkvReader*, long long&, unsigned long, double&);
+bool Match(IMkvReader*, long long&, unsigned long, short&);
+
+
+struct EBMLHeader
+{
+    EBMLHeader();
+    ~EBMLHeader();  
+    long long m_version;
+    long long m_readVersion;
+    long long m_maxIdLength;
+    long long m_maxSizeLength;
+    char* m_docType;
+    long long m_docTypeVersion;
+    long long m_docTypeReadVersion;
+    
+    long long Parse(IMkvReader*, long long&);
+};
+
+
+class Segment;
+class Track;
+class Cluster;
+
+class Block
+{
+    Block(const Block&);
+    Block& operator=(const Block&);
+
+public:
+    const long long m_start;
+    const long long m_size;
+    
+    Block(long long start, long long size, IMkvReader*);
+    
+    unsigned long GetTrackNumber() const;
+    
+    long long GetTimeCode(Cluster*) const;  //absolute, but not scaled
+    long long GetTime(Cluster*) const;      //absolute, and scaled (nanosecond units)
+    bool IsKey() const;
+    void SetKey(bool);
+
+    long GetSize() const;
+    long Read(IMkvReader*, unsigned char*) const;
+    
+private:
+    long long m_track;   //Track::Number()
+    short m_timecode;  //relative to cluster
+    unsigned char m_flags;
+    long long m_frameOff;
+    long m_frameSize;    
+
+};
+
+
+class BlockEntry
+{
+    BlockEntry(const BlockEntry&);
+    BlockEntry& operator=(const BlockEntry&);
+    
+public:
+    virtual ~BlockEntry();
+    virtual bool EOS() const = 0;
+    virtual Cluster* GetCluster() const = 0;
+    virtual size_t GetIndex() const = 0;
+    virtual const Block* GetBlock() const = 0;
+    virtual bool IsBFrame() const = 0;
+    
+protected:
+    BlockEntry();
+
+};
+
+
+class SimpleBlock : public BlockEntry
+{
+    SimpleBlock(const SimpleBlock&);
+    SimpleBlock& operator=(const SimpleBlock&);
+
+public:
+    SimpleBlock(Cluster*, size_t, long long start, long long size);
+
+    bool EOS() const;
+    Cluster* GetCluster() const; 
+    size_t GetIndex() const;
+    const Block* GetBlock() const;
+    bool IsBFrame() const;
+
+protected:
+    Cluster* const m_pCluster;
+    const size_t m_index;
+    Block m_block;
+    
+};
+
+
+class BlockGroup : public BlockEntry
+{
+    BlockGroup(const BlockGroup&);
+    BlockGroup& operator=(const BlockGroup&);
+
+public:
+    BlockGroup(Cluster*, size_t, long long, long long);
+    ~BlockGroup();
+    
+    bool EOS() const;
+    Cluster* GetCluster() const; 
+    size_t GetIndex() const;
+    const Block* GetBlock() const;
+    bool IsBFrame() const;
+    
+    short GetPrevTimeCode() const;  //relative to block's time
+    short GetNextTimeCode() const;  //as above
+    
+protected:
+    Cluster* const m_pCluster;
+    const size_t m_index;
+    
+private:
+    BlockGroup(Cluster*, size_t, unsigned long);
+    void ParseBlock(long long start, long long size);
+
+    short m_prevTimeCode;
+    short m_nextTimeCode;
+    
+    //TODO: the Matroska spec says you can have multiple blocks within the 
+    //same block group, with blocks ranked by priority (the flag bits).
+    //For now we just cache a single block.
+#if 0
+    typedef std::deque<Block*> blocks_t;
+    blocks_t m_blocks;  //In practice should contain only a single element.
+#else
+    Block* m_pBlock;
+#endif
+    
+};
+
+
+class Track
+{
+    Track(const Track&);
+    Track& operator=(const Track&);
+
+public:    
+    Segment* const m_pSegment;
+    virtual ~Track();
+    
+    long long GetType() const; 
+    unsigned long GetNumber() const;
+    const char* GetNameAsUTF8() const;
+    const char* GetCodecNameAsUTF8() const;
+    const char* GetCodecId() const;
+    const unsigned char* GetCodecPrivate(
+            size_t *optionalSize = NULL) const;
+    
+    const BlockEntry* GetEOS() const;
+    
+    struct Settings 
+    {
+        long long start;
+        long long size;
+    };
+    
+    struct Info
+    {
+        long long type;
+        long long number;
+        long long uid;
+        char* nameAsUTF8;
+        char* codecId;
+        unsigned char* codecPrivate;
+        size_t codecPrivateSize;
+        char* codecNameAsUTF8;
+        Settings settings;
+        Info();
+        void Clear();
+    };
+    
+    long GetFirst(const BlockEntry*&) const;
+    long GetNext(const BlockEntry* pCurr, const BlockEntry*& pNext) const;
+    virtual bool VetEntry(const BlockEntry*) const = 0;
+        
+protected:
+    Track(Segment*, const Info&);        
+    const Info m_info;
+
+    class EOSBlock : public BlockEntry
+    {
+    public:
+        EOSBlock();
+
+        bool EOS() const;    
+        Cluster* GetCluster() const;
+        size_t GetIndex() const;
+        const Block* GetBlock() const;
+        bool IsBFrame() const;
+    };
+    
+    EOSBlock m_eos;
+    
+};
+
+
+class VideoTrack : public Track
+{
+    VideoTrack(const VideoTrack&);
+    VideoTrack& operator=(const VideoTrack&);
+    
+public:
+    VideoTrack(Segment*, const Info&);    
+    long long GetWidth() const;
+    long long GetHeight() const;
+    double GetFrameRate() const;
+    
+    bool VetEntry(const BlockEntry*) const;
+
+private:
+    long long m_width;
+    long long m_height;
+    double m_rate;
+    
+};
+
+
+class AudioTrack : public Track
+{
+    AudioTrack(const AudioTrack&);
+    AudioTrack& operator=(const AudioTrack&);
+
+public:
+    AudioTrack(Segment*, const Info&);    
+    double GetSamplingRate() const;
+    long long GetChannels() const;
+    long long GetBitDepth() const;    
+    bool VetEntry(const BlockEntry*) const;
+
+private:
+    double m_rate;
+    long long m_channels;
+    long long m_bitDepth;
+};
+
+
+class Tracks
+{
+    Tracks(const Tracks&);
+    Tracks& operator=(const Tracks&);
+
+public:
+    Segment* const m_pSegment;
+    const long long m_start;
+    const long long m_size;
+    
+    Tracks(Segment*, long long start, long long size);
+    virtual ~Tracks();
+
+    Track* GetTrackByNumber(unsigned long tn) const;
+    Track* GetTrackByIndex(unsigned long idx) const;
+    
+private:
+    Track** m_trackEntries; 
+    Track** m_trackEntriesEnd;
+
+    void ParseTrackEntry(long long, long long, Track*&);
+    
+public:
+    unsigned long GetTracksCount() const;
+};
+
+
+class SegmentInfo
+{
+    SegmentInfo(const SegmentInfo&);
+    SegmentInfo& operator=(const SegmentInfo&);
+    
+public:
+    Segment* const m_pSegment;
+    const long long m_start;
+    const long long m_size;
+    
+    SegmentInfo(Segment*, long long start, long long size);
+    ~SegmentInfo();
+    long long GetTimeCodeScale() const;
+    long long GetDuration() const;  //scaled
+    const char* GetMuxingAppAsUTF8() const;
+    const char* GetWritingAppAsUTF8() const;
+    const char* GetTitleAsUTF8() const;
+    
+private:
+    long long m_timecodeScale;
+    double m_duration;
+    char* m_pMuxingAppAsUTF8;
+    char* m_pWritingAppAsUTF8;
+    char* m_pTitleAsUTF8;
+};
+
+
+class Cluster
+{
+    Cluster(const Cluster&);
+    Cluster& operator=(const Cluster&);
+
+public:
+    Segment* const m_pSegment;
+    const size_t m_index;
+    
+public:    
+    static Cluster* Parse(Segment*, size_t, long long off);
+
+    Cluster();  //EndOfStream
+    ~Cluster();
+    
+    bool EOS() const;
+    
+    long long GetTimeCode();  //absolute, but not scaled
+    long long GetTime();      //absolute, and scaled (nanosecond units)
+
+    const BlockEntry* GetFirst();
+    const BlockEntry* GetLast();
+    const BlockEntry* GetNext(const BlockEntry*) const;    
+    const BlockEntry* GetEntry(const Track*);
+protected:    
+    Cluster(Segment*, size_t, long long off);
+    
+private:
+    long long m_start;
+    long long m_size;    
+    long long m_timecode;
+    BlockEntry** m_pEntries;
+    size_t m_entriesCount;
+   
+    void Load();
+    void LoadBlockEntries();
+    void ParseBlockGroup(long long, long long, size_t);
+    void ParseSimpleBlock(long long, long long, size_t);
+    
+};
+
+
+class Segment
+{
+    Segment(const Segment&);
+    Segment& operator=(const Segment&);
+
+private:
+    Segment(IMkvReader*, long long pos, long long size);
+
+public:
+    IMkvReader* const m_pReader;
+    const long long m_start;  //posn of segment payload
+    const long long m_size;   //size of segment payload
+    Cluster m_eos;  //TODO: make private?
+    
+    static long long CreateInstance(IMkvReader*, long long, Segment*&);
+    ~Segment();
+
+    //for big-bang loading (source filter)
+    long Load();
+
+    //for incremental loading (splitter)    
+    long long Unparsed() const;
+    long long ParseHeaders();
+    long ParseCluster(Cluster*&, long long& newpos) const;
+    bool AddCluster(Cluster*, long long);
+
+    Tracks* GetTracks() const;    
+    const SegmentInfo* const GetInfo() const;
+    long long GetDuration() const;
+    
+    //NOTE: this turned out to be too inefficient.
+    //long long Load(long long time_nanoseconds);
+
+    Cluster* GetFirst();
+    Cluster* GetLast();
+    unsigned long GetCount() const;
+    
+    Cluster* GetNext(const Cluster*);
+    Cluster* GetCluster(long long time_nanoseconds);
+    
+private:
+    long long m_pos;  //absolute file posn; what has been consumed so far    
+    SegmentInfo* m_pInfo;
+    Tracks* m_pTracks;    
+    Cluster** m_clusters;
+    size_t m_clusterCount;
+
+    void ParseSeekHead(long long pos, long long size, size_t*);
+    void ParseSeekEntry(long long pos, long long size, size_t*);
+    void ParseSecondarySeekHead(long long off, size_t*);
+};
+
+
+}  //end namespace mkvparser
+
+#endif  //MKVPARSER_HPP
diff --git a/media/libstagefright/mpeg2ts/ABitReader.cpp b/media/libstagefright/mpeg2ts/ABitReader.cpp
new file mode 100644
index 0000000..24c8df8
--- /dev/null
+++ b/media/libstagefright/mpeg2ts/ABitReader.cpp
@@ -0,0 +1,98 @@
+/*
+ * Copyright (C) 2010 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include "ABitReader.h"
+
+#include <media/stagefright/foundation/ADebug.h>
+
+namespace android {
+
+ABitReader::ABitReader(const uint8_t *data, size_t size)
+    : mData(data),
+      mSize(size),
+      mReservoir(0),
+      mNumBitsLeft(0) {
+}
+
+void ABitReader::fillReservoir() {
+    CHECK_GT(mSize, 0u);
+
+    mReservoir = 0;
+    size_t i;
+    for (i = 0; mSize > 0 && i < 4; ++i) {
+        mReservoir = (mReservoir << 8) | *mData;
+
+        ++mData;
+        --mSize;
+    }
+
+    mNumBitsLeft = 8 * i;
+    mReservoir <<= 32 - mNumBitsLeft;
+}
+
+uint32_t ABitReader::getBits(size_t n) {
+    CHECK_LE(n, 32u);
+
+    uint32_t result = 0;
+    while (n > 0) {
+        if (mNumBitsLeft == 0) {
+            fillReservoir();
+        }
+
+        size_t m = n;
+        if (m > mNumBitsLeft) {
+            m = mNumBitsLeft;
+        }
+
+        result = (result << m) | (mReservoir >> (32 - m));
+        mReservoir <<= m;
+        mNumBitsLeft -= m;
+
+        n -= m;
+    }
+
+    return result;
+}
+
+void ABitReader::skipBits(size_t n) {
+    while (n > 32) {
+        getBits(32);
+        n -= 32;
+    }
+
+    if (n > 0) {
+        getBits(n);
+    }
+}
+
+void ABitReader::putBits(uint32_t x, size_t n) {
+    CHECK_LE(mNumBitsLeft + n, 32u);
+
+    mReservoir = (mReservoir >> n) | (x << (32 - n));
+    mNumBitsLeft += n;
+}
+
+size_t ABitReader::numBitsLeft() const {
+    return mSize * 8 + mNumBitsLeft;
+}
+
+const uint8_t *ABitReader::data() const {
+    CHECK_EQ(mNumBitsLeft % 8, 0u);
+
+    return mData - mNumBitsLeft / 8;
+}
+
+}  // namespace android
diff --git a/media/libstagefright/mpeg2ts/ABitReader.h b/media/libstagefright/mpeg2ts/ABitReader.h
new file mode 100644
index 0000000..5135211
--- /dev/null
+++ b/media/libstagefright/mpeg2ts/ABitReader.h
@@ -0,0 +1,53 @@
+/*
+ * Copyright (C) 2010 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef A_BIT_READER_H_
+
+#define A_BIT_READER_H_
+
+#include <media/stagefright/foundation/ABase.h>
+
+#include <sys/types.h>
+#include <stdint.h>
+
+namespace android {
+
+struct ABitReader {
+    ABitReader(const uint8_t *data, size_t size);
+
+    uint32_t getBits(size_t n);
+    void skipBits(size_t n);
+
+    size_t numBitsLeft() const;
+
+    const uint8_t *data() const;
+
+private:
+    const uint8_t *mData;
+    size_t mSize;
+
+    uint32_t mReservoir;  // left-aligned bits
+    size_t mNumBitsLeft;
+
+    void fillReservoir();
+    void putBits(uint32_t x, size_t n);
+
+    DISALLOW_EVIL_CONSTRUCTORS(ABitReader);
+};
+
+}  // namespace android
+
+#endif  // A_BIT_READER_H_
diff --git a/media/libstagefright/mpeg2ts/ATSParser.cpp b/media/libstagefright/mpeg2ts/ATSParser.cpp
new file mode 100644
index 0000000..d05975d
--- /dev/null
+++ b/media/libstagefright/mpeg2ts/ATSParser.cpp
@@ -0,0 +1,941 @@
+/*
+ * Copyright (C) 2010 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include "ATSParser.h"
+
+#include "ABitReader.h"
+#include "AnotherPacketSource.h"
+
+#include <media/stagefright/foundation/ABuffer.h>
+#include <media/stagefright/foundation/ADebug.h>
+#include <media/stagefright/foundation/AMessage.h>
+#include <media/stagefright/foundation/hexdump.h>
+#include <media/stagefright/MediaDefs.h>
+#include <media/stagefright/MediaErrors.h>
+#include <media/stagefright/MetaData.h>
+#include <utils/KeyedVector.h>
+
+namespace android {
+
+static const size_t kTSPacketSize = 188;
+
+struct ATSParser::Program : public RefBase {
+    Program(unsigned programMapPID);
+
+    bool parsePID(
+            unsigned pid, unsigned payload_unit_start_indicator,
+            ABitReader *br);
+
+    sp<MediaSource> getSource(SourceType type);
+
+private:
+    unsigned mProgramMapPID;
+    KeyedVector<unsigned, sp<Stream> > mStreams;
+
+    void parseProgramMap(ABitReader *br);
+
+    DISALLOW_EVIL_CONSTRUCTORS(Program);
+};
+
+struct ATSParser::Stream : public RefBase {
+    Stream(unsigned elementaryPID, unsigned streamType);
+
+    void parse(
+            unsigned payload_unit_start_indicator,
+            ABitReader *br);
+
+    sp<MediaSource> getSource(SourceType type);
+
+protected:
+    virtual ~Stream();
+
+private:
+    unsigned mElementaryPID;
+    unsigned mStreamType;
+
+    sp<ABuffer> mBuffer;
+    sp<AnotherPacketSource> mSource;
+    bool mPayloadStarted;
+
+    void flush();
+    void parsePES(ABitReader *br);
+
+    void onPayloadData(
+            unsigned PTS_DTS_flags, uint64_t PTS, uint64_t DTS,
+            const uint8_t *data, size_t size);
+
+    DISALLOW_EVIL_CONSTRUCTORS(Stream);
+};
+
+////////////////////////////////////////////////////////////////////////////////
+
+ATSParser::Program::Program(unsigned programMapPID)
+    : mProgramMapPID(programMapPID) {
+}
+
+bool ATSParser::Program::parsePID(
+        unsigned pid, unsigned payload_unit_start_indicator,
+        ABitReader *br) {
+    if (pid == mProgramMapPID) {
+        if (payload_unit_start_indicator) {
+            unsigned skip = br->getBits(8);
+            br->skipBits(skip * 8);
+        }
+
+        parseProgramMap(br);
+        return true;
+    }
+
+    ssize_t index = mStreams.indexOfKey(pid);
+    if (index < 0) {
+        return false;
+    }
+
+    mStreams.editValueAt(index)->parse(
+            payload_unit_start_indicator, br);
+
+    return true;
+}
+
+void ATSParser::Program::parseProgramMap(ABitReader *br) {
+    unsigned table_id = br->getBits(8);
+    LOG(VERBOSE) << "  table_id = " << table_id;
+    CHECK_EQ(table_id, 0x02u);
+
+    unsigned section_syntax_indictor = br->getBits(1);
+    LOG(VERBOSE) << "  section_syntax_indictor = " << section_syntax_indictor;
+    CHECK_EQ(section_syntax_indictor, 1u);
+
+    CHECK_EQ(br->getBits(1), 0u);
+    LOG(VERBOSE) << "  reserved = " << br->getBits(2);
+
+    unsigned section_length = br->getBits(12);
+    LOG(VERBOSE) << "  section_length = " << section_length;
+    CHECK((section_length & 0xc00) == 0);
+    CHECK_LE(section_length, 1021u);
+
+    LOG(VERBOSE) << "  program_number = " << br->getBits(16);
+    LOG(VERBOSE) << "  reserved = " << br->getBits(2);
+    LOG(VERBOSE) << "  version_number = " << br->getBits(5);
+    LOG(VERBOSE) << "  current_next_indicator = " << br->getBits(1);
+    LOG(VERBOSE) << "  section_number = " << br->getBits(8);
+    LOG(VERBOSE) << "  last_section_number = " << br->getBits(8);
+    LOG(VERBOSE) << "  reserved = " << br->getBits(3);
+
+    LOG(VERBOSE) << "  PCR_PID = "
+              << StringPrintf("0x%04x", br->getBits(13));
+
+    LOG(VERBOSE) << "  reserved = " << br->getBits(4);
+
+    unsigned program_info_length = br->getBits(12);
+    LOG(VERBOSE) << "  program_info_length = " << program_info_length;
+    CHECK((program_info_length & 0xc00) == 0);
+
+    br->skipBits(program_info_length * 8);  // skip descriptors
+
+    // infoBytesRemaining is the number of bytes that make up the
+    // variable length section of ES_infos. It does not include the
+    // final CRC.
+    size_t infoBytesRemaining = section_length - 9 - program_info_length - 4;
+
+    while (infoBytesRemaining > 0) {
+        CHECK_GE(infoBytesRemaining, 5u);
+
+        unsigned streamType = br->getBits(8);
+        LOG(VERBOSE) << "    stream_type = "
+                  << StringPrintf("0x%02x", streamType);
+
+        LOG(VERBOSE) << "    reserved = " << br->getBits(3);
+
+        unsigned elementaryPID = br->getBits(13);
+        LOG(VERBOSE) << "    elementary_PID = "
+                  << StringPrintf("0x%04x", elementaryPID);
+
+        LOG(VERBOSE) << "    reserved = " << br->getBits(4);
+
+        unsigned ES_info_length = br->getBits(12);
+        LOG(VERBOSE) << "    ES_info_length = " << ES_info_length;
+        CHECK((ES_info_length & 0xc00) == 0);
+
+        CHECK_GE(infoBytesRemaining - 5, ES_info_length);
+
+#if 0
+        br->skipBits(ES_info_length * 8);  // skip descriptors
+#else
+        unsigned info_bytes_remaining = ES_info_length;
+        while (info_bytes_remaining >= 2) {
+            LOG(VERBOSE) << "      tag = " << StringPrintf("0x%02x", br->getBits(8));
+
+            unsigned descLength = br->getBits(8);
+            LOG(VERBOSE) << "      len = " << descLength;
+
+            CHECK_GE(info_bytes_remaining, 2 + descLength);
+
+            br->skipBits(descLength * 8);
+
+            info_bytes_remaining -= descLength + 2;
+        }
+        CHECK_EQ(info_bytes_remaining, 0u);
+#endif
+
+        ssize_t index = mStreams.indexOfKey(elementaryPID);
+#if 0  // XXX revisit
+        CHECK_LT(index, 0);
+        mStreams.add(elementaryPID, new Stream(elementaryPID, streamType));
+#else
+        if (index < 0) {
+            mStreams.add(elementaryPID, new Stream(elementaryPID, streamType));
+        }
+#endif
+
+        infoBytesRemaining -= 5 + ES_info_length;
+    }
+
+    CHECK_EQ(infoBytesRemaining, 0u);
+
+    LOG(VERBOSE) << "  CRC = " << StringPrintf("0x%08x", br->getBits(32));
+}
+
+sp<MediaSource> ATSParser::Program::getSource(SourceType type) {
+    for (size_t i = 0; i < mStreams.size(); ++i) {
+        sp<MediaSource> source = mStreams.editValueAt(i)->getSource(type);
+        if (source != NULL) {
+            return source;
+        }
+    }
+
+    return NULL;
+}
+
+////////////////////////////////////////////////////////////////////////////////
+
+ATSParser::Stream::Stream(unsigned elementaryPID, unsigned streamType)
+    : mElementaryPID(elementaryPID),
+      mStreamType(streamType),
+      mBuffer(new ABuffer(65536)),
+      mPayloadStarted(false) {
+    mBuffer->setRange(0, 0);
+}
+
+ATSParser::Stream::~Stream() {
+}
+
+void ATSParser::Stream::parse(
+        unsigned payload_unit_start_indicator, ABitReader *br) {
+    if (payload_unit_start_indicator) {
+        if (mPayloadStarted) {
+            // Otherwise we run the danger of receiving the trailing bytes
+            // of a PES packet that we never saw the start of and assuming
+            // we have a a complete PES packet.
+
+            flush();
+        }
+
+        mPayloadStarted = true;
+    }
+
+    if (!mPayloadStarted) {
+        return;
+    }
+
+    size_t payloadSizeBits = br->numBitsLeft();
+    CHECK_EQ(payloadSizeBits % 8, 0u);
+
+    CHECK_LE(mBuffer->size() + payloadSizeBits / 8, mBuffer->capacity());
+
+    memcpy(mBuffer->data() + mBuffer->size(), br->data(), payloadSizeBits / 8);
+    mBuffer->setRange(0, mBuffer->size() + payloadSizeBits / 8);
+}
+
+void ATSParser::Stream::parsePES(ABitReader *br) {
+    unsigned packet_startcode_prefix = br->getBits(24);
+
+    LOG(VERBOSE) << "packet_startcode_prefix = "
+              << StringPrintf("0x%08x", packet_startcode_prefix);
+
+    CHECK_EQ(packet_startcode_prefix, 0x000001u);
+
+    unsigned stream_id = br->getBits(8);
+    LOG(VERBOSE) << "stream_id = " << StringPrintf("0x%02x", stream_id);
+
+    unsigned PES_packet_length = br->getBits(16);
+    LOG(VERBOSE) << "PES_packet_length = " << PES_packet_length;
+
+    if (stream_id != 0xbc  // program_stream_map
+            && stream_id != 0xbe  // padding_stream
+            && stream_id != 0xbf  // private_stream_2
+            && stream_id != 0xf0  // ECM
+            && stream_id != 0xf1  // EMM
+            && stream_id != 0xff  // program_stream_directory
+            && stream_id != 0xf2  // DSMCC
+            && stream_id != 0xf8) {  // H.222.1 type E
+        CHECK_EQ(br->getBits(2), 2u);
+
+        LOG(VERBOSE) << "PES_scrambling_control = " << br->getBits(2);
+        LOG(VERBOSE) << "PES_priority = " << br->getBits(1);
+        LOG(VERBOSE) << "data_alignment_indicator = " << br->getBits(1);
+        LOG(VERBOSE) << "copyright = " << br->getBits(1);
+        LOG(VERBOSE) << "original_or_copy = " << br->getBits(1);
+
+        unsigned PTS_DTS_flags = br->getBits(2);
+        LOG(VERBOSE) << "PTS_DTS_flags = " << PTS_DTS_flags;
+
+        unsigned ESCR_flag = br->getBits(1);
+        LOG(VERBOSE) << "ESCR_flag = " << ESCR_flag;
+
+        unsigned ES_rate_flag = br->getBits(1);
+        LOG(VERBOSE) << "ES_rate_flag = " << ES_rate_flag;
+
+        unsigned DSM_trick_mode_flag = br->getBits(1);
+        LOG(VERBOSE) << "DSM_trick_mode_flag = " << DSM_trick_mode_flag;
+
+        unsigned additional_copy_info_flag = br->getBits(1);
+        LOG(VERBOSE) << "additional_copy_info_flag = "
+                  << additional_copy_info_flag;
+
+        LOG(VERBOSE) << "PES_CRC_flag = " << br->getBits(1);
+        LOG(VERBOSE) << "PES_extension_flag = " << br->getBits(1);
+
+        unsigned PES_header_data_length = br->getBits(8);
+        LOG(VERBOSE) << "PES_header_data_length = " << PES_header_data_length;
+
+        unsigned optional_bytes_remaining = PES_header_data_length;
+
+        uint64_t PTS = 0, DTS = 0;
+
+        if (PTS_DTS_flags == 2 || PTS_DTS_flags == 3) {
+            CHECK_GE(optional_bytes_remaining, 5u);
+
+            CHECK_EQ(br->getBits(4), PTS_DTS_flags);
+
+            PTS = ((uint64_t)br->getBits(3)) << 30;
+            CHECK_EQ(br->getBits(1), 1u);
+            PTS |= ((uint64_t)br->getBits(15)) << 15;
+            CHECK_EQ(br->getBits(1), 1u);
+            PTS |= br->getBits(15);
+            CHECK_EQ(br->getBits(1), 1u);
+
+            LOG(VERBOSE) << "PTS = " << PTS;
+            // LOG(INFO) << "PTS = " << PTS / 90000.0f << " secs";
+
+            optional_bytes_remaining -= 5;
+
+            if (PTS_DTS_flags == 3) {
+                CHECK_GE(optional_bytes_remaining, 5u);
+
+                CHECK_EQ(br->getBits(4), 1u);
+
+                DTS = ((uint64_t)br->getBits(3)) << 30;
+                CHECK_EQ(br->getBits(1), 1u);
+                DTS |= ((uint64_t)br->getBits(15)) << 15;
+                CHECK_EQ(br->getBits(1), 1u);
+                DTS |= br->getBits(15);
+                CHECK_EQ(br->getBits(1), 1u);
+
+                LOG(VERBOSE) << "DTS = " << DTS;
+
+                optional_bytes_remaining -= 5;
+            }
+        }
+
+        if (ESCR_flag) {
+            CHECK_GE(optional_bytes_remaining, 6u);
+
+            br->getBits(2);
+
+            uint64_t ESCR = ((uint64_t)br->getBits(3)) << 30;
+            CHECK_EQ(br->getBits(1), 1u);
+            ESCR |= ((uint64_t)br->getBits(15)) << 15;
+            CHECK_EQ(br->getBits(1), 1u);
+            ESCR |= br->getBits(15);
+            CHECK_EQ(br->getBits(1), 1u);
+
+            LOG(VERBOSE) << "ESCR = " << ESCR;
+            LOG(VERBOSE) << "ESCR_extension = " << br->getBits(9);
+
+            CHECK_EQ(br->getBits(1), 1u);
+
+            optional_bytes_remaining -= 6;
+        }
+
+        if (ES_rate_flag) {
+            CHECK_GE(optional_bytes_remaining, 3u);
+
+            CHECK_EQ(br->getBits(1), 1u);
+            LOG(VERBOSE) << "ES_rate = " << br->getBits(22);
+            CHECK_EQ(br->getBits(1), 1u);
+
+            optional_bytes_remaining -= 3;
+        }
+
+        br->skipBits(optional_bytes_remaining * 8);
+
+        // ES data follows.
+
+        onPayloadData(
+                PTS_DTS_flags, PTS, DTS,
+                br->data(), br->numBitsLeft() / 8);
+
+        if (PES_packet_length != 0) {
+            CHECK_GE(PES_packet_length, PES_header_data_length + 3);
+
+            unsigned dataLength =
+                PES_packet_length - 3 - PES_header_data_length;
+
+            CHECK_EQ(br->numBitsLeft(), dataLength * 8);
+
+            br->skipBits(dataLength * 8);
+        } else {
+            size_t payloadSizeBits = br->numBitsLeft();
+            CHECK((payloadSizeBits % 8) == 0);
+
+            LOG(VERBOSE) << "There's " << (payloadSizeBits / 8)
+                         << " bytes of payload.";
+        }
+    } else if (stream_id == 0xbe) {  // padding_stream
+        CHECK_NE(PES_packet_length, 0u);
+        br->skipBits(PES_packet_length * 8);
+    } else {
+        CHECK_NE(PES_packet_length, 0u);
+        br->skipBits(PES_packet_length * 8);
+    }
+}
+
+void ATSParser::Stream::flush() {
+    if (mBuffer->size() == 0) {
+        return;
+    }
+
+    LOG(VERBOSE) << "flushing stream "
+                 << StringPrintf("0x%04x", mElementaryPID)
+                 << " size = " << mBuffer->size();
+
+    ABitReader br(mBuffer->data(), mBuffer->size());
+    parsePES(&br);
+
+    mBuffer->setRange(0, 0);
+}
+
+static sp<ABuffer> FindNAL(
+        const uint8_t *data, size_t size, unsigned nalType,
+        size_t *stopOffset) {
+    bool foundStart = false;
+    size_t startOffset = 0;
+
+    size_t offset = 0;
+    for (;;) {
+        while (offset + 3 < size
+                && memcmp("\x00\x00\x00\x01", &data[offset], 4)) {
+            ++offset;
+        }
+
+        if (foundStart) {
+            size_t nalSize;
+            if (offset + 3 >= size) {
+                nalSize = size - startOffset;
+            } else {
+                nalSize = offset - startOffset;
+            }
+
+            sp<ABuffer> nal = new ABuffer(nalSize);
+            memcpy(nal->data(), &data[startOffset], nalSize);
+
+            if (stopOffset != NULL) {
+                *stopOffset = startOffset + nalSize;
+            }
+
+            return nal;
+        }
+
+        if (offset + 4 >= size) {
+            return NULL;
+        }
+
+        if ((data[offset + 4] & 0x1f) == nalType) {
+            foundStart = true;
+            startOffset = offset + 4;
+        }
+
+        offset += 4;
+    }
+}
+
+static unsigned parseUE(ABitReader *br) {
+    unsigned numZeroes = 0;
+    while (br->getBits(1) == 0) {
+        ++numZeroes;
+    }
+
+    unsigned x = br->getBits(numZeroes);
+
+    return x + (1u << numZeroes) - 1;
+}
+
+// Determine video dimensions from the sequence parameterset.
+static void FindDimensions(
+        const sp<ABuffer> seqParamSet, int32_t *width, int32_t *height) {
+    ABitReader br(seqParamSet->data() + 1, seqParamSet->size() - 1);
+
+    unsigned profile_idc = br.getBits(8);
+    br.skipBits(16);
+    parseUE(&br);  // seq_parameter_set_id
+
+    if (profile_idc == 100 || profile_idc == 110
+            || profile_idc == 122 || profile_idc == 144) {
+        TRESPASS();
+    }
+
+    parseUE(&br);  // log2_max_frame_num_minus4
+    unsigned pic_order_cnt_type = parseUE(&br);
+
+    if (pic_order_cnt_type == 0) {
+        parseUE(&br);  // log2_max_pic_order_cnt_lsb_minus4
+    } else if (pic_order_cnt_type == 1) {
+        br.getBits(1);  // delta_pic_order_always_zero_flag
+        parseUE(&br);  // offset_for_non_ref_pic
+        parseUE(&br);  // offset_for_top_to_bottom_field
+
+        unsigned num_ref_frames_in_pic_order_cnt_cycle = parseUE(&br);
+        for (unsigned i = 0; i < num_ref_frames_in_pic_order_cnt_cycle; ++i) {
+            parseUE(&br);  // offset_for_ref_frame
+        }
+    }
+
+    parseUE(&br);  // num_ref_frames
+    br.getBits(1);  // gaps_in_frame_num_value_allowed_flag
+
+    unsigned pic_width_in_mbs_minus1 = parseUE(&br);
+    unsigned pic_height_in_map_units_minus1 = parseUE(&br);
+    unsigned frame_mbs_only_flag = br.getBits(1);
+
+    *width = pic_width_in_mbs_minus1 * 16 + 16;
+
+    *height = (2 - frame_mbs_only_flag)
+        * (pic_height_in_map_units_minus1 * 16 + 16);
+}
+
+static sp<ABuffer> MakeAVCCodecSpecificData(
+        const sp<ABuffer> &buffer, int32_t *width, int32_t *height) {
+    const uint8_t *data = buffer->data();
+    size_t size = buffer->size();
+
+    sp<ABuffer> seqParamSet = FindNAL(data, size, 7, NULL);
+    if (seqParamSet == NULL) {
+        return NULL;
+    }
+
+    FindDimensions(seqParamSet, width, height);
+
+    size_t stopOffset;
+    sp<ABuffer> picParamSet = FindNAL(data, size, 8, &stopOffset);
+    CHECK(picParamSet != NULL);
+
+    buffer->setRange(stopOffset, size - stopOffset);
+    LOG(INFO) << "buffer has " << buffer->size() << " bytes left.";
+
+    size_t csdSize =
+        1 + 3 + 1 + 1
+        + 2 * 1 + seqParamSet->size()
+        + 1 + 2 * 1 + picParamSet->size();
+
+    sp<ABuffer> csd = new ABuffer(csdSize);
+    uint8_t *out = csd->data();
+
+    *out++ = 0x01;  // configurationVersion
+    memcpy(out, seqParamSet->data() + 1, 3);  // profile/level...
+    out += 3;
+    *out++ = (0x3f << 2) | 1;  // lengthSize == 2 bytes
+    *out++ = 0xe0 | 1;
+
+    *out++ = seqParamSet->size() >> 8;
+    *out++ = seqParamSet->size() & 0xff;
+    memcpy(out, seqParamSet->data(), seqParamSet->size());
+    out += seqParamSet->size();
+
+    *out++ = 1;
+
+    *out++ = picParamSet->size() >> 8;
+    *out++ = picParamSet->size() & 0xff;
+    memcpy(out, picParamSet->data(), picParamSet->size());
+
+    return csd;
+}
+
+static bool getNextNALUnit(
+        const uint8_t **_data, size_t *_size,
+        const uint8_t **nalStart, size_t *nalSize) {
+    const uint8_t *data = *_data;
+    size_t size = *_size;
+
+    *nalStart = NULL;
+    *nalSize = 0;
+
+    if (size == 0) {
+        return false;
+    }
+
+    size_t offset = 0;
+    for (;;) {
+        CHECK_LT(offset + 2, size);
+
+        if (!memcmp("\x00\x00\x01", &data[offset], 3)) {
+            break;
+        }
+
+        CHECK_EQ((unsigned)data[offset], 0x00u);
+        ++offset;
+    }
+
+    offset += 3;
+    size_t startOffset = offset;
+
+    while (offset + 2 < size
+            && memcmp("\x00\x00\x00", &data[offset], 3)
+            && memcmp("\x00\x00\x01", &data[offset], 3)) {
+        ++offset;
+    }
+
+    if (offset + 2 >= size) {
+        *nalStart = &data[startOffset];
+        *nalSize = size - startOffset;
+
+        *_data = NULL;
+        *_size = 0;
+
+        return true;
+    }
+
+    size_t endOffset = offset;
+
+    while (offset + 2 < size && memcmp("\x00\x00\x01", &data[offset], 3)) {
+        CHECK_EQ((unsigned)data[offset], 0x00u);
+        ++offset;
+    }
+
+    CHECK_LT(offset + 2, size);
+
+    *nalStart = &data[startOffset];
+    *nalSize = endOffset - startOffset;
+
+    *_data = &data[offset];
+    *_size = size - offset;
+
+    return true;
+}
+
+sp<ABuffer> MakeCleanAVCData(const uint8_t *data, size_t size) {
+    const uint8_t *tmpData = data;
+    size_t tmpSize = size;
+
+    size_t totalSize = 0;
+    const uint8_t *nalStart;
+    size_t nalSize;
+    while (getNextNALUnit(&tmpData, &tmpSize, &nalStart, &nalSize)) {
+        totalSize += 4 + nalSize;
+    }
+
+    sp<ABuffer> buffer = new ABuffer(totalSize);
+    size_t offset = 0;
+    while (getNextNALUnit(&data, &size, &nalStart, &nalSize)) {
+        memcpy(buffer->data() + offset, "\x00\x00\x00\x01", 4);
+        memcpy(buffer->data() + offset + 4, nalStart, nalSize);
+
+        offset += 4 + nalSize;
+    }
+
+    return buffer;
+}
+
+static sp<ABuffer> FindMPEG2ADTSConfig(
+        const sp<ABuffer> &buffer, int32_t *sampleRate, int32_t *channelCount) {
+    ABitReader br(buffer->data(), buffer->size());
+
+    CHECK_EQ(br.getBits(12), 0xfffu);
+    CHECK_EQ(br.getBits(1), 0u);
+    CHECK_EQ(br.getBits(2), 0u);
+    br.getBits(1);  // protection_absent
+    unsigned profile = br.getBits(2);
+    LOG(INFO) << "profile = " << profile;
+    CHECK_NE(profile, 3u);
+    unsigned sampling_freq_index = br.getBits(4);
+    br.getBits(1);  // private_bit
+    unsigned channel_configuration = br.getBits(3);
+    CHECK_NE(channel_configuration, 0u);
+
+    LOG(INFO) << "sampling_freq_index = " << sampling_freq_index;
+    LOG(INFO) << "channel_configuration = " << channel_configuration;
+
+    CHECK_LE(sampling_freq_index, 11u);
+    static const int32_t kSamplingFreq[] = {
+        96000, 88200, 64000, 48000, 44100, 32000, 24000, 22050,
+        16000, 12000, 11025, 8000
+    };
+    *sampleRate = kSamplingFreq[sampling_freq_index];
+
+    *channelCount = channel_configuration;
+
+    static const uint8_t kStaticESDS[] = {
+        0x03, 22,
+        0x00, 0x00,     // ES_ID
+        0x00,           // streamDependenceFlag, URL_Flag, OCRstreamFlag
+
+        0x04, 17,
+        0x40,                       // Audio ISO/IEC 14496-3
+        0x00, 0x00, 0x00, 0x00,
+        0x00, 0x00, 0x00, 0x00,
+        0x00, 0x00, 0x00, 0x00,
+
+        0x05, 2,
+        // AudioSpecificInfo follows
+
+        // oooo offf fccc c000
+        // o - audioObjectType
+        // f - samplingFreqIndex
+        // c - channelConfig
+    };
+    sp<ABuffer> csd = new ABuffer(sizeof(kStaticESDS) + 2);
+    memcpy(csd->data(), kStaticESDS, sizeof(kStaticESDS));
+
+    csd->data()[sizeof(kStaticESDS)] =
+        ((profile + 1) << 3) | (sampling_freq_index >> 1);
+
+    csd->data()[sizeof(kStaticESDS) + 1] =
+        ((sampling_freq_index << 7) & 0x80) | (channel_configuration << 3);
+
+    hexdump(csd->data(), csd->size());
+    return csd;
+}
+
+void ATSParser::Stream::onPayloadData(
+        unsigned PTS_DTS_flags, uint64_t PTS, uint64_t DTS,
+        const uint8_t *data, size_t size) {
+    LOG(VERBOSE) << "onPayloadData mStreamType="
+                 << StringPrintf("0x%02x", mStreamType);
+
+    sp<ABuffer> buffer;
+
+    if (mStreamType == 0x1b) {
+        buffer = MakeCleanAVCData(data, size);
+    } else {
+        // hexdump(data, size);
+
+        buffer = new ABuffer(size);
+        memcpy(buffer->data(), data, size);
+    }
+
+    if (mSource == NULL) {
+        sp<MetaData> meta = new MetaData;
+
+        if (mStreamType == 0x1b) {
+            meta->setCString(kKeyMIMEType, MEDIA_MIMETYPE_VIDEO_AVC);
+
+            int32_t width, height;
+            sp<ABuffer> csd = MakeAVCCodecSpecificData(buffer, &width, &height);
+
+            if (csd == NULL) {
+                return;
+            }
+
+            meta->setData(kKeyAVCC, 0, csd->data(), csd->size());
+            meta->setInt32(kKeyWidth, width);
+            meta->setInt32(kKeyHeight, height);
+        } else {
+            CHECK_EQ(mStreamType, 0x0fu);
+
+            meta->setCString(kKeyMIMEType, MEDIA_MIMETYPE_AUDIO_AAC);
+
+            int32_t sampleRate, channelCount;
+            sp<ABuffer> csd =
+                FindMPEG2ADTSConfig(buffer, &sampleRate, &channelCount);
+
+            LOG(INFO) << "sampleRate = " << sampleRate;
+            LOG(INFO) << "channelCount = " << channelCount;
+
+            meta->setInt32(kKeySampleRate, sampleRate);
+            meta->setInt32(kKeyChannelCount, channelCount);
+
+            meta->setData(kKeyESDS, 0, csd->data(), csd->size());
+        }
+
+        LOG(INFO) << "created source!";
+        mSource = new AnotherPacketSource(meta);
+
+        // fall through
+    }
+
+    CHECK(PTS_DTS_flags == 2 || PTS_DTS_flags == 3);
+    buffer->meta()->setInt64("time", (PTS * 100) / 9);
+
+    if (mStreamType == 0x0f) {
+        // WHY???
+        buffer->setRange(7, buffer->size() - 7);
+    }
+
+    mSource->queueAccessUnit(buffer);
+}
+
+sp<MediaSource> ATSParser::Stream::getSource(SourceType type) {
+    if ((type == AVC_VIDEO && mStreamType == 0x1b)
+        || (type == MPEG2ADTS_AUDIO && mStreamType == 0x0f)) {
+        return mSource;
+    }
+
+    return NULL;
+}
+
+////////////////////////////////////////////////////////////////////////////////
+
+ATSParser::ATSParser() {
+}
+
+ATSParser::~ATSParser() {
+}
+
+void ATSParser::feedTSPacket(const void *data, size_t size) {
+    CHECK_EQ(size, kTSPacketSize);
+
+    ABitReader br((const uint8_t *)data, kTSPacketSize);
+    parseTS(&br);
+}
+
+void ATSParser::parseProgramAssociationTable(ABitReader *br) {
+    unsigned table_id = br->getBits(8);
+    LOG(VERBOSE) << "  table_id = " << table_id;
+    CHECK_EQ(table_id, 0x00u);
+
+    unsigned section_syntax_indictor = br->getBits(1);
+    LOG(VERBOSE) << "  section_syntax_indictor = " << section_syntax_indictor;
+    CHECK_EQ(section_syntax_indictor, 1u);
+
+    CHECK_EQ(br->getBits(1), 0u);
+    LOG(VERBOSE) << "  reserved = " << br->getBits(2);
+
+    unsigned section_length = br->getBits(12);
+    LOG(VERBOSE) << "  section_length = " << section_length;
+    CHECK((section_length & 0xc00) == 0);
+
+    LOG(VERBOSE) << "  transport_stream_id = " << br->getBits(16);
+    LOG(VERBOSE) << "  reserved = " << br->getBits(2);
+    LOG(VERBOSE) << "  version_number = " << br->getBits(5);
+    LOG(VERBOSE) << "  current_next_indicator = " << br->getBits(1);
+    LOG(VERBOSE) << "  section_number = " << br->getBits(8);
+    LOG(VERBOSE) << "  last_section_number = " << br->getBits(8);
+
+    size_t numProgramBytes = (section_length - 5 /* header */ - 4 /* crc */);
+    CHECK_EQ((numProgramBytes % 4), 0u);
+
+    for (size_t i = 0; i < numProgramBytes / 4; ++i) {
+        unsigned program_number = br->getBits(16);
+        LOG(VERBOSE) << "    program_number = " << program_number;
+
+        LOG(VERBOSE) << "    reserved = " << br->getBits(3);
+
+        if (program_number == 0) {
+            LOG(VERBOSE) << "    network_PID = "
+                      << StringPrintf("0x%04x", br->getBits(13));
+        } else {
+            unsigned programMapPID = br->getBits(13);
+
+            LOG(VERBOSE) << "    program_map_PID = "
+                      << StringPrintf("0x%04x", programMapPID);
+
+            mPrograms.push(new Program(programMapPID));
+        }
+    }
+
+    LOG(VERBOSE) << "  CRC = " << StringPrintf("0x%08x", br->getBits(32));
+}
+
+void ATSParser::parsePID(
+        ABitReader *br, unsigned PID,
+        unsigned payload_unit_start_indicator) {
+    if (PID == 0) {
+        if (payload_unit_start_indicator) {
+            unsigned skip = br->getBits(8);
+            br->skipBits(skip * 8);
+        }
+        parseProgramAssociationTable(br);
+        return;
+    }
+
+    bool handled = false;
+    for (size_t i = 0; i < mPrograms.size(); ++i) {
+        if (mPrograms.editItemAt(i)->parsePID(
+                    PID, payload_unit_start_indicator, br)) {
+            handled = true;
+            break;
+        }
+    }
+
+    if (!handled) {
+        LOG(WARNING) << "PID " << StringPrintf("0x%04x", PID)
+                     << " not handled.";
+    }
+}
+
+void ATSParser::parseAdaptationField(ABitReader *br) {
+    unsigned adaptation_field_length = br->getBits(8);
+    if (adaptation_field_length > 0) {
+        br->skipBits(adaptation_field_length * 8);  // XXX
+    }
+}
+
+void ATSParser::parseTS(ABitReader *br) {
+    LOG(VERBOSE) << "---";
+
+    unsigned sync_byte = br->getBits(8);
+    CHECK_EQ(sync_byte, 0x47u);
+
+    LOG(VERBOSE) << "transport_error_indicator = " << br->getBits(1);
+
+    unsigned payload_unit_start_indicator = br->getBits(1);
+    LOG(VERBOSE) << "payload_unit_start_indicator = "
+                 << payload_unit_start_indicator;
+
+    LOG(VERBOSE) << "transport_priority = " << br->getBits(1);
+
+    unsigned PID = br->getBits(13);
+    LOG(VERBOSE) << "PID = " << StringPrintf("0x%04x", PID);
+
+    LOG(VERBOSE) << "transport_scrambling_control = " << br->getBits(2);
+
+    unsigned adaptation_field_control = br->getBits(2);
+    LOG(VERBOSE) << "adaptation_field_control = " << adaptation_field_control;
+
+    LOG(VERBOSE) << "continuity_counter = " << br->getBits(4);
+
+    if (adaptation_field_control == 2 || adaptation_field_control == 3) {
+        parseAdaptationField(br);
+    }
+
+    if (adaptation_field_control == 1 || adaptation_field_control == 3) {
+        parsePID(br, PID, payload_unit_start_indicator);
+    }
+}
+
+sp<MediaSource> ATSParser::getSource(SourceType type) {
+    for (size_t i = 0; i < mPrograms.size(); ++i) {
+        sp<MediaSource> source = mPrograms.editItemAt(i)->getSource(type);
+
+        if (source != NULL) {
+            return source;
+        }
+    }
+
+    return NULL;
+}
+
+}  // namespace android
diff --git a/media/libstagefright/mpeg2ts/ATSParser.h b/media/libstagefright/mpeg2ts/ATSParser.h
new file mode 100644
index 0000000..1e22e7b
--- /dev/null
+++ b/media/libstagefright/mpeg2ts/ATSParser.h
@@ -0,0 +1,68 @@
+/*
+ * Copyright (C) 2010 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef A_TS_PARSER_H_
+
+#define A_TS_PARSER_H_
+
+#include <sys/types.h>
+
+#include <media/stagefright/foundation/ABase.h>
+#include <utils/Vector.h>
+#include <utils/RefBase.h>
+
+namespace android {
+
+struct ABitReader;
+struct MediaSource;
+
+struct ATSParser : public RefBase {
+    ATSParser();
+
+    void feedTSPacket(const void *data, size_t size);
+
+    enum SourceType {
+        AVC_VIDEO,
+        MPEG2ADTS_AUDIO
+    };
+    sp<MediaSource> getSource(SourceType type);
+
+protected:
+    virtual ~ATSParser();
+
+private:
+    struct Program;
+    struct Stream;
+
+    Vector<sp<Program> > mPrograms;
+
+    void parseProgramAssociationTable(ABitReader *br);
+    void parseProgramMap(ABitReader *br);
+    void parsePES(ABitReader *br);
+
+    void parsePID(
+        ABitReader *br, unsigned PID,
+        unsigned payload_unit_start_indicator);
+
+    void parseAdaptationField(ABitReader *br);
+    void parseTS(ABitReader *br);
+
+    DISALLOW_EVIL_CONSTRUCTORS(ATSParser);
+};
+
+}  // namespace android
+
+#endif  // A_TS_PARSER_H_
diff --git a/media/libstagefright/mpeg2ts/Android.mk b/media/libstagefright/mpeg2ts/Android.mk
new file mode 100644
index 0000000..b6772eb
--- /dev/null
+++ b/media/libstagefright/mpeg2ts/Android.mk
@@ -0,0 +1,22 @@
+LOCAL_PATH:= $(call my-dir)
+
+include $(CLEAR_VARS)
+
+LOCAL_SRC_FILES:=                 \
+        ABitReader.cpp            \
+        AnotherPacketSource.cpp   \
+        ATSParser.cpp             \
+        MPEG2TSExtractor.cpp      \
+
+LOCAL_C_INCLUDES:= \
+	$(JNI_H_INCLUDE) \
+	$(TOP)/external/opencore/extern_libs_v2/khronos/openmax/include \
+        $(TOP)/frameworks/base/media/libstagefright
+
+LOCAL_MODULE:= libstagefright_mpeg2ts
+
+ifeq ($(TARGET_ARCH),arm)
+    LOCAL_CFLAGS += -Wno-psabi
+endif
+
+include $(BUILD_STATIC_LIBRARY)
diff --git a/media/libstagefright/mpeg2ts/AnotherPacketSource.cpp b/media/libstagefright/mpeg2ts/AnotherPacketSource.cpp
new file mode 100644
index 0000000..3d51177
--- /dev/null
+++ b/media/libstagefright/mpeg2ts/AnotherPacketSource.cpp
@@ -0,0 +1,112 @@
+/*
+ * Copyright (C) 2010 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include "AnotherPacketSource.h"
+
+#include <media/stagefright/foundation/ABuffer.h>
+#include <media/stagefright/foundation/ADebug.h>
+#include <media/stagefright/foundation/AMessage.h>
+#include <media/stagefright/foundation/AString.h>
+#include <media/stagefright/foundation/hexdump.h>
+#include <media/stagefright/MediaBuffer.h>
+#include <media/stagefright/MediaDefs.h>
+#include <media/stagefright/MetaData.h>
+#include <utils/Vector.h>
+
+namespace android {
+
+AnotherPacketSource::AnotherPacketSource(const sp<MetaData> &meta)
+    : mFormat(meta),
+      mEOSResult(OK) {
+}
+
+AnotherPacketSource::~AnotherPacketSource() {
+}
+
+status_t AnotherPacketSource::start(MetaData *params) {
+    return OK;
+}
+
+status_t AnotherPacketSource::stop() {
+    return OK;
+}
+
+sp<MetaData> AnotherPacketSource::getFormat() {
+    return mFormat;
+}
+
+status_t AnotherPacketSource::read(
+        MediaBuffer **out, const ReadOptions *) {
+    *out = NULL;
+
+    Mutex::Autolock autoLock(mLock);
+    while (mEOSResult == OK && mBuffers.empty()) {
+        mCondition.wait(mLock);
+    }
+
+    if (!mBuffers.empty()) {
+        const sp<ABuffer> buffer = *mBuffers.begin();
+
+        uint64_t timeUs;
+        CHECK(buffer->meta()->findInt64(
+                    "time", (int64_t *)&timeUs));
+
+        MediaBuffer *mediaBuffer = new MediaBuffer(buffer->size());
+        mediaBuffer->meta_data()->setInt64(kKeyTime, timeUs);
+
+        // hexdump(buffer->data(), buffer->size());
+
+        memcpy(mediaBuffer->data(), buffer->data(), buffer->size());
+        *out = mediaBuffer;
+
+        mBuffers.erase(mBuffers.begin());
+        return OK;
+    }
+
+    return mEOSResult;
+}
+
+void AnotherPacketSource::queueAccessUnit(const sp<ABuffer> &buffer) {
+    int32_t damaged;
+    if (buffer->meta()->findInt32("damaged", &damaged) && damaged) {
+        // LOG(VERBOSE) << "discarding damaged AU";
+        return;
+    }
+
+    Mutex::Autolock autoLock(mLock);
+    mBuffers.push_back(buffer);
+    mCondition.signal();
+}
+
+void AnotherPacketSource::signalEOS(status_t result) {
+    CHECK(result != OK);
+
+    Mutex::Autolock autoLock(mLock);
+    mEOSResult = result;
+    mCondition.signal();
+}
+
+bool AnotherPacketSource::hasBufferAvailable(status_t *finalResult) {
+    Mutex::Autolock autoLock(mLock);
+    if (!mBuffers.empty()) {
+        return true;
+    }
+
+    *finalResult = mEOSResult;
+    return false;
+}
+
+}  // namespace android
diff --git a/media/libstagefright/mpeg2ts/AnotherPacketSource.h b/media/libstagefright/mpeg2ts/AnotherPacketSource.h
new file mode 100644
index 0000000..ce83d21
--- /dev/null
+++ b/media/libstagefright/mpeg2ts/AnotherPacketSource.h
@@ -0,0 +1,62 @@
+/*
+ * Copyright (C) 2010 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef ANOTHER_PACKET_SOURCE_H_
+
+#define ANOTHER_PACKET_SOURCE_H_
+
+#include <media/stagefright/foundation/ABase.h>
+#include <media/stagefright/MediaSource.h>
+#include <utils/threads.h>
+#include <utils/List.h>
+
+namespace android {
+
+struct ABuffer;
+
+struct AnotherPacketSource : public MediaSource {
+    AnotherPacketSource(const sp<MetaData> &meta);
+
+    virtual status_t start(MetaData *params = NULL);
+    virtual status_t stop();
+    virtual sp<MetaData> getFormat();
+
+    virtual status_t read(
+            MediaBuffer **buffer, const ReadOptions *options = NULL);
+
+    bool hasBufferAvailable(status_t *finalResult);
+
+    void queueAccessUnit(const sp<ABuffer> &buffer);
+    void signalEOS(status_t result);
+
+protected:
+    virtual ~AnotherPacketSource();
+
+private:
+    Mutex mLock;
+    Condition mCondition;
+
+    sp<MetaData> mFormat;
+    List<sp<ABuffer> > mBuffers;
+    status_t mEOSResult;
+
+    DISALLOW_EVIL_CONSTRUCTORS(AnotherPacketSource);
+};
+
+
+}  // namespace android
+
+#endif  // ANOTHER_PACKET_SOURCE_H_
diff --git a/media/libstagefright/mpeg2ts/MPEG2TSExtractor.cpp b/media/libstagefright/mpeg2ts/MPEG2TSExtractor.cpp
new file mode 100644
index 0000000..b287c95
--- /dev/null
+++ b/media/libstagefright/mpeg2ts/MPEG2TSExtractor.cpp
@@ -0,0 +1,197 @@
+/*
+ * Copyright (C) 2010 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+//#define LOG_NDEBUG 0
+#define LOG_TAG "MPEG2TSExtractor"
+#include <utils/Log.h>
+
+#include "include/MPEG2TSExtractor.h"
+
+#include <media/stagefright/DataSource.h>
+#include <media/stagefright/MediaDefs.h>
+#include <media/stagefright/MediaErrors.h>
+#include <media/stagefright/MediaSource.h>
+#include <media/stagefright/MetaData.h>
+#include <utils/String8.h>
+
+#include "AnotherPacketSource.h"
+#include "ATSParser.h"
+
+namespace android {
+
+struct MPEG2TSSource : public MediaSource {
+    MPEG2TSSource(
+            const sp<MPEG2TSExtractor> &extractor,
+            const sp<AnotherPacketSource> &impl);
+
+    virtual status_t start(MetaData *params = NULL);
+    virtual status_t stop();
+    virtual sp<MetaData> getFormat();
+
+    virtual status_t read(
+            MediaBuffer **buffer, const ReadOptions *options = NULL);
+
+private:
+    sp<MPEG2TSExtractor> mExtractor;
+    sp<AnotherPacketSource> mImpl;
+
+    DISALLOW_EVIL_CONSTRUCTORS(MPEG2TSSource);
+};
+
+MPEG2TSSource::MPEG2TSSource(
+        const sp<MPEG2TSExtractor> &extractor,
+        const sp<AnotherPacketSource> &impl)
+    : mExtractor(extractor),
+      mImpl(impl) {
+}
+
+status_t MPEG2TSSource::start(MetaData *params) {
+    return mImpl->start(params);
+}
+
+status_t MPEG2TSSource::stop() {
+    return mImpl->stop();
+}
+
+sp<MetaData> MPEG2TSSource::getFormat() {
+    return mImpl->getFormat();
+}
+
+status_t MPEG2TSSource::read(
+        MediaBuffer **out, const ReadOptions *options) {
+    *out = NULL;
+
+    status_t finalResult;
+    while (!mImpl->hasBufferAvailable(&finalResult)) {
+        if (finalResult != OK) {
+            return ERROR_END_OF_STREAM;
+        }
+
+        status_t err = mExtractor->feedMore();
+        if (err != OK) {
+            mImpl->signalEOS(err);
+        }
+    }
+
+    return mImpl->read(out, options);
+}
+
+////////////////////////////////////////////////////////////////////////////////
+
+MPEG2TSExtractor::MPEG2TSExtractor(const sp<DataSource> &source)
+    : mDataSource(source),
+      mParser(new ATSParser),
+      mOffset(0) {
+    init();
+}
+
+size_t MPEG2TSExtractor::countTracks() {
+    return mSourceImpls.size();
+}
+
+sp<MediaSource> MPEG2TSExtractor::getTrack(size_t index) {
+    if (index >= mSourceImpls.size()) {
+        return NULL;
+    }
+
+    return new MPEG2TSSource(this, mSourceImpls.editItemAt(index));
+}
+
+sp<MetaData> MPEG2TSExtractor::getTrackMetaData(
+        size_t index, uint32_t flags) {
+    return index < mSourceImpls.size()
+        ? mSourceImpls.editItemAt(index)->getFormat() : NULL;
+}
+
+sp<MetaData> MPEG2TSExtractor::getMetaData() {
+    sp<MetaData> meta = new MetaData;
+    meta->setCString(kKeyMIMEType, MEDIA_MIMETYPE_CONTAINER_MPEG2TS);
+
+    return meta;
+}
+
+void MPEG2TSExtractor::init() {
+    bool haveAudio = false;
+    bool haveVideo = false;
+
+    while (feedMore() == OK) {
+        ATSParser::SourceType type;
+        if (haveAudio && haveVideo) {
+            break;
+        }
+        if (haveVideo) {
+            type = ATSParser::MPEG2ADTS_AUDIO;
+        } else {
+            type = ATSParser::AVC_VIDEO;
+        }
+        sp<AnotherPacketSource> impl =
+            (AnotherPacketSource *)mParser->getSource(type).get();
+
+        if (impl != NULL) {
+            if (type == ATSParser::MPEG2ADTS_AUDIO) {
+                haveAudio = true;
+            } else {
+                haveVideo = true;
+            }
+            mSourceImpls.push(impl);
+        }
+    }
+
+    LOGI("haveAudio=%d, haveVideo=%d", haveAudio, haveVideo);
+}
+
+status_t MPEG2TSExtractor::feedMore() {
+    Mutex::Autolock autoLock(mLock);
+
+    static const size_t kTSPacketSize = 188;
+
+    uint8_t packet[kTSPacketSize];
+    ssize_t n = mDataSource->readAt(mOffset, packet, kTSPacketSize);
+
+    if (n < (ssize_t)kTSPacketSize) {
+        return (n < 0) ? (status_t)n : ERROR_END_OF_STREAM;
+    }
+
+    mOffset += kTSPacketSize;
+    mParser->feedTSPacket(packet, kTSPacketSize);
+
+    return OK;
+}
+
+////////////////////////////////////////////////////////////////////////////////
+
+bool SniffMPEG2TS(
+        const sp<DataSource> &source, String8 *mimeType, float *confidence) {
+#if 0
+    char header;
+    if (source->readAt(0, &header, 1) != 1 || header != 0x47) {
+        return false;
+    }
+
+    *confidence = 0.05f;
+    mimeType->setTo(MEDIA_MIMETYPE_CONTAINER_MPEG2TS);
+
+    return true;
+#else
+    // For now we're going to never identify this type of stream, since we'd
+    // just base our decision on a single byte...
+    // Instead you can instantiate an MPEG2TSExtractor by explicitly stating
+    // its proper mime type in the call to MediaExtractor::Create(...).
+    return false;
+#endif
+}
+
+}  // namespace android
diff --git a/media/libstagefright/omx/OMX.cpp b/media/libstagefright/omx/OMX.cpp
index 132e31b..6de761f 100644
--- a/media/libstagefright/omx/OMX.cpp
+++ b/media/libstagefright/omx/OMX.cpp
@@ -43,7 +43,7 @@
 ////////////////////////////////////////////////////////////////////////////////
 
 struct OMX::CallbackDispatcher : public RefBase {
-    CallbackDispatcher(OMX *owner);
+    CallbackDispatcher(OMXNodeInstance *owner);
 
     void post(const omx_message &msg);
 
@@ -53,7 +53,7 @@
 private:
     Mutex mLock;
 
-    OMX *mOwner;
+    OMXNodeInstance *mOwner;
     bool mDone;
     Condition mQueueChanged;
     List<omx_message> mQueue;
@@ -69,7 +69,7 @@
     CallbackDispatcher &operator=(const CallbackDispatcher &);
 };
 
-OMX::CallbackDispatcher::CallbackDispatcher(OMX *owner)
+OMX::CallbackDispatcher::CallbackDispatcher(OMXNodeInstance *owner)
     : mOwner(owner),
       mDone(false) {
     pthread_attr_t attr;
@@ -101,12 +101,11 @@
 }
 
 void OMX::CallbackDispatcher::dispatch(const omx_message &msg) {
-    OMXNodeInstance *instance = mOwner->findInstance(msg.node);
-    if (instance == NULL) {
+    if (mOwner == NULL) {
         LOGV("Would have dispatched a message to a node that's already gone.");
         return;
     }
-    instance->onMessage(msg);
+    mOwner->onMessage(msg);
 }
 
 // static
@@ -145,7 +144,6 @@
 
 OMX::OMX()
     : mMaster(new OMXMaster),
-      mDispatcher(new CallbackDispatcher(this)),
       mNodeCounter(0) {
 }
 
@@ -166,6 +164,10 @@
         instance = mLiveNodes.editValueAt(index);
         mLiveNodes.removeItemsAt(index);
 
+        index = mDispatchers.indexOfKey(instance->nodeID());
+        CHECK(index >= 0);
+        mDispatchers.removeItemsAt(index);
+
         invalidateNodeID_l(instance->nodeID());
     }
 
@@ -226,6 +228,7 @@
     }
 
     *node = makeNodeID(instance);
+    mDispatchers.add(*node, new CallbackDispatcher(instance));
 
     instance->setHandle(*node, handle);
 
@@ -241,6 +244,11 @@
     ssize_t index = mLiveNodes.indexOfKey(instance->observer()->asBinder());
     CHECK(index >= 0);
     mLiveNodes.removeItemsAt(index);
+
+    index = mDispatchers.indexOfKey(node);
+    CHECK(index >= 0);
+    mDispatchers.removeItemsAt(index);
+
     instance->observer()->asBinder()->unlinkToDeath(this);
 
     return instance->freeNode(mMaster);
@@ -341,7 +349,7 @@
     msg.u.event_data.data1 = nData1;
     msg.u.event_data.data2 = nData2;
 
-    mDispatcher->post(msg);
+    findDispatcher(node)->post(msg);
 
     return OMX_ErrorNone;
 }
@@ -355,7 +363,7 @@
     msg.node = node;
     msg.u.buffer_data.buffer = pBuffer;
 
-    mDispatcher->post(msg);
+    findDispatcher(node)->post(msg);
 
     return OMX_ErrorNone;
 }
@@ -375,7 +383,7 @@
     msg.u.extended_buffer_data.platform_private = pBuffer->pPlatformPrivate;
     msg.u.extended_buffer_data.data_ptr = pBuffer->pBuffer;
 
-    mDispatcher->post(msg);
+    findDispatcher(node)->post(msg);
 
     return OMX_ErrorNone;
 }
@@ -397,6 +405,14 @@
     return index < 0 ? NULL : mNodeIDToInstance.valueAt(index);
 }
 
+sp<OMX::CallbackDispatcher> OMX::findDispatcher(node_id node) {
+    Mutex::Autolock autoLock(mLock);
+
+    ssize_t index = mDispatchers.indexOfKey(node);
+
+    return index < 0 ? NULL : mDispatchers.valueAt(index);
+}
+
 void OMX::invalidateNodeID(node_id node) {
     Mutex::Autolock autoLock(mLock);
     invalidateNodeID_l(node);
diff --git a/media/libstagefright/omx/OMXMaster.cpp b/media/libstagefright/omx/OMXMaster.cpp
index 9a45bea..56b169a 100644
--- a/media/libstagefright/omx/OMXMaster.cpp
+++ b/media/libstagefright/omx/OMXMaster.cpp
@@ -14,6 +14,10 @@
  * limitations under the License.
  */
 
+//#define LOG_NDEBUG 0
+#define LOG_TAG "OMXMaster"
+#include <utils/Log.h>
+
 #include "OMXMaster.h"
 
 #include <dlfcn.h>
diff --git a/media/libstagefright/omx/OMXNodeInstance.cpp b/media/libstagefright/omx/OMXNodeInstance.cpp
index c1a010c..5db516e 100644
--- a/media/libstagefright/omx/OMXNodeInstance.cpp
+++ b/media/libstagefright/omx/OMXNodeInstance.cpp
@@ -264,6 +264,8 @@
         return UNKNOWN_ERROR;
     }
 
+    CHECK_EQ(header->pAppPrivate, buffer_meta);
+
     *buffer = header;
 
     addActiveBuffer(portIndex, *buffer);
@@ -294,6 +296,8 @@
         return UNKNOWN_ERROR;
     }
 
+    CHECK_EQ(header->pAppPrivate, buffer_meta);
+
     *buffer = header;
     *buffer_data = header->pBuffer;
 
@@ -325,6 +329,8 @@
         return UNKNOWN_ERROR;
     }
 
+    CHECK_EQ(header->pAppPrivate, buffer_meta);
+
     *buffer = header;
 
     addActiveBuffer(portIndex, *buffer);
diff --git a/media/libstagefright/omx/tests/Android.mk b/media/libstagefright/omx/tests/Android.mk
index ee117e5..8bf4336 100644
--- a/media/libstagefright/omx/tests/Android.mk
+++ b/media/libstagefright/omx/tests/Android.mk
@@ -1,5 +1,3 @@
-ifeq ($(BUILD_WITH_FULL_STAGEFRIGHT),true)
-
 LOCAL_PATH:= $(call my-dir)
 include $(CLEAR_VARS)
 
@@ -17,7 +15,3 @@
 LOCAL_MODULE:= omx_tests
 
 include $(BUILD_EXECUTABLE)
-
-endif
-
-
diff --git a/media/libstagefright/rtsp/AAVCAssembler.cpp b/media/libstagefright/rtsp/AAVCAssembler.cpp
new file mode 100644
index 0000000..3dfb200
--- /dev/null
+++ b/media/libstagefright/rtsp/AAVCAssembler.cpp
@@ -0,0 +1,385 @@
+/*
+ * Copyright (C) 2010 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include "AAVCAssembler.h"
+
+#include "ARTPSource.h"
+
+#include <media/stagefright/foundation/ABuffer.h>
+#include <media/stagefright/foundation/ADebug.h>
+#include <media/stagefright/foundation/AMessage.h>
+#include <media/stagefright/foundation/hexdump.h>
+
+#include <stdint.h>
+
+#define BE_VERBOSE      0
+
+namespace android {
+
+// static
+AAVCAssembler::AAVCAssembler(const sp<AMessage> &notify)
+    : mNotifyMsg(notify),
+      mAccessUnitRTPTime(0),
+      mNextExpectedSeqNoValid(false),
+      mNextExpectedSeqNo(0),
+      mAccessUnitDamaged(false) {
+}
+
+AAVCAssembler::~AAVCAssembler() {
+}
+
+ARTPAssembler::AssemblyStatus AAVCAssembler::addNALUnit(
+        const sp<ARTPSource> &source) {
+    List<sp<ABuffer> > *queue = source->queue();
+
+    if (queue->empty()) {
+        return NOT_ENOUGH_DATA;
+    }
+
+    if (mNextExpectedSeqNoValid) {
+        List<sp<ABuffer> >::iterator it = queue->begin();
+        while (it != queue->end()) {
+            if ((uint32_t)(*it)->int32Data() >= mNextExpectedSeqNo) {
+                break;
+            }
+
+            it = queue->erase(it);
+        }
+
+        if (queue->empty()) {
+            return NOT_ENOUGH_DATA;
+        }
+    }
+
+    sp<ABuffer> buffer = *queue->begin();
+
+    if (!mNextExpectedSeqNoValid) {
+        mNextExpectedSeqNoValid = true;
+        mNextExpectedSeqNo = (uint32_t)buffer->int32Data();
+    } else if ((uint32_t)buffer->int32Data() != mNextExpectedSeqNo) {
+#if BE_VERBOSE
+        LOG(VERBOSE) << "Not the sequence number I expected";
+#endif
+
+        return WRONG_SEQUENCE_NUMBER;
+    }
+
+    const uint8_t *data = buffer->data();
+    size_t size = buffer->size();
+
+    if (size < 1 || (data[0] & 0x80)) {
+        // Corrupt.
+
+        LOG(ERROR) << "Ignoring corrupt buffer.";
+        queue->erase(queue->begin());
+
+        ++mNextExpectedSeqNo;
+        return MALFORMED_PACKET;
+    }
+
+    unsigned nalType = data[0] & 0x1f;
+    if (nalType >= 1 && nalType <= 23) {
+        addSingleNALUnit(buffer);
+        queue->erase(queue->begin());
+        ++mNextExpectedSeqNo;
+        return OK;
+    } else if (nalType == 28) {
+        // FU-A
+        return addFragmentedNALUnit(queue);
+    } else if (nalType == 24) {
+        // STAP-A
+        bool success = addSingleTimeAggregationPacket(buffer);
+        queue->erase(queue->begin());
+        ++mNextExpectedSeqNo;
+
+        return success ? OK : MALFORMED_PACKET;
+    } else {
+        LOG(ERROR) << "Ignoring unsupported buffer (nalType=" << nalType << ")";
+
+        queue->erase(queue->begin());
+        ++mNextExpectedSeqNo;
+
+        return MALFORMED_PACKET;
+    }
+}
+
+void AAVCAssembler::addSingleNALUnit(const sp<ABuffer> &buffer) {
+#if BE_VERBOSE
+    LOG(VERBOSE) << "addSingleNALUnit of size " << buffer->size();
+    hexdump(buffer->data(), buffer->size());
+#endif
+
+    uint32_t rtpTime;
+    CHECK(buffer->meta()->findInt32("rtp-time", (int32_t *)&rtpTime));
+
+    if (!mNALUnits.empty() && rtpTime != mAccessUnitRTPTime) {
+        submitAccessUnit();
+    }
+    mAccessUnitRTPTime = rtpTime;
+
+    mNALUnits.push_back(buffer);
+}
+
+bool AAVCAssembler::addSingleTimeAggregationPacket(const sp<ABuffer> &buffer) {
+    const uint8_t *data = buffer->data();
+    size_t size = buffer->size();
+
+    if (size < 3) {
+        LOG(ERROR) << "Discarding too small STAP-A packet.";
+        return false;
+    }
+
+    ++data;
+    --size;
+    while (size >= 2) {
+        size_t nalSize = (data[0] << 8) | data[1];
+
+        if (size < nalSize + 2) {
+            LOG(ERROR) << "Discarding malformed STAP-A packet.";
+            return false;
+        }
+
+        sp<ABuffer> unit = new ABuffer(nalSize);
+        memcpy(unit->data(), &data[2], nalSize);
+
+        PropagateTimes(buffer, unit);
+
+        addSingleNALUnit(unit);
+
+        data += 2 + nalSize;
+        size -= 2 + nalSize;
+    }
+
+    if (size != 0) {
+        LOG(WARNING) << "Unexpected padding at end of STAP-A packet.";
+    }
+
+    return true;
+}
+
+ARTPAssembler::AssemblyStatus AAVCAssembler::addFragmentedNALUnit(
+        List<sp<ABuffer> > *queue) {
+    CHECK(!queue->empty());
+
+    sp<ABuffer> buffer = *queue->begin();
+    const uint8_t *data = buffer->data();
+    size_t size = buffer->size();
+
+    CHECK(size > 0);
+    unsigned indicator = data[0];
+
+    CHECK((indicator & 0x1f) == 28);
+
+    if (size < 2) {
+        LOG(ERROR) << "Ignoring malformed FU buffer (size = " << size << ")";
+
+        queue->erase(queue->begin());
+        ++mNextExpectedSeqNo;
+        return MALFORMED_PACKET;
+    }
+
+    if (!(data[1] & 0x80)) {
+        // Start bit not set on the first buffer.
+
+#if BE_VERBOSE
+        LOG(ERROR) << "Start bit not set on first buffer";
+#endif
+
+        queue->erase(queue->begin());
+        ++mNextExpectedSeqNo;
+        return MALFORMED_PACKET;
+    }
+
+    uint32_t nalType = data[1] & 0x1f;
+    uint32_t nri = (data[0] >> 5) & 3;
+
+    uint32_t expectedSeqNo = (uint32_t)buffer->int32Data() + 1;
+    size_t totalSize = size - 2;
+    size_t totalCount = 1;
+    bool complete = false;
+
+    if (data[1] & 0x40) {
+        // Huh? End bit also set on the first buffer.
+
+#if BE_VERBOSE
+        LOG(WARNING) << "Grrr. This isn't fragmented at all.";
+#endif
+
+        complete = true;
+    } else {
+        List<sp<ABuffer> >::iterator it = ++queue->begin();
+        while (it != queue->end()) {
+#if BE_VERBOSE
+            LOG(VERBOSE) << "sequence length " << totalCount;
+#endif
+
+            const sp<ABuffer> &buffer = *it;
+
+            const uint8_t *data = buffer->data();
+            size_t size = buffer->size();
+
+            if ((uint32_t)buffer->int32Data() != expectedSeqNo) {
+#if BE_VERBOSE
+                LOG(VERBOSE) << "sequence not complete, expected seqNo "
+                     << expectedSeqNo << ", got "
+                     << (uint32_t)buffer->int32Data();
+#endif
+
+                return WRONG_SEQUENCE_NUMBER;
+            }
+
+            if (size < 2
+                    || data[0] != indicator
+                    || (data[1] & 0x1f) != nalType
+                    || (data[1] & 0x80)) {
+                LOG(ERROR) << "Ignoring malformed FU buffer.\n";
+
+                // Delete the whole start of the FU.
+
+                it = queue->begin();
+                for (size_t i = 0; i <= totalCount; ++i) {
+                    it = queue->erase(it);
+                }
+
+                mNextExpectedSeqNo = expectedSeqNo + 1;
+
+                return MALFORMED_PACKET;
+            }
+
+            totalSize += size - 2;
+            ++totalCount;
+
+            expectedSeqNo = expectedSeqNo + 1;
+
+            if (data[1] & 0x40) {
+                // This is the last fragment.
+                complete = true;
+                break;
+            }
+
+            ++it;
+        }
+    }
+
+    if (!complete) {
+        return NOT_ENOUGH_DATA;
+    }
+
+    mNextExpectedSeqNo = expectedSeqNo;
+
+    // We found all the fragments that make up the complete NAL unit.
+
+    // Leave room for the header. So far totalSize did not include the
+    // header byte.
+    ++totalSize;
+
+    sp<ABuffer> unit = new ABuffer(totalSize);
+    PropagateTimes(buffer, unit);
+
+    unit->data()[0] = (nri << 5) | nalType;
+
+    size_t offset = 1;
+    List<sp<ABuffer> >::iterator it = queue->begin();
+    for (size_t i = 0; i < totalCount; ++i) {
+        const sp<ABuffer> &buffer = *it;
+
+#if BE_VERBOSE
+        LOG(VERBOSE) << "piece #" << (i + 1) << "/" << totalCount;
+        hexdump(buffer->data(), buffer->size());
+#endif
+
+        memcpy(unit->data() + offset, buffer->data() + 2, buffer->size() - 2);
+        offset += buffer->size() - 2;
+
+        it = queue->erase(it);
+    }
+
+    unit->setRange(0, totalSize);
+
+    addSingleNALUnit(unit);
+
+#if BE_VERBOSE
+    LOG(VERBOSE) << "successfully assembled a NAL unit from fragments.";
+#endif
+
+    return OK;
+}
+
+void AAVCAssembler::submitAccessUnit() {
+    CHECK(!mNALUnits.empty());
+
+#if BE_VERBOSE
+    LOG(VERBOSE) << "Access unit complete (" << mNALUnits.size() << " nal units)";
+#endif
+
+    uint64_t ntpTime;
+    CHECK((*mNALUnits.begin())->meta()->findInt64(
+                "ntp-time", (int64_t *)&ntpTime));
+
+    size_t totalSize = 0;
+    for (List<sp<ABuffer> >::iterator it = mNALUnits.begin();
+         it != mNALUnits.end(); ++it) {
+        totalSize += 4 + (*it)->size();
+    }
+
+    sp<ABuffer> accessUnit = new ABuffer(totalSize);
+    size_t offset = 0;
+    for (List<sp<ABuffer> >::iterator it = mNALUnits.begin();
+         it != mNALUnits.end(); ++it) {
+        memcpy(accessUnit->data() + offset, "\x00\x00\x00\x01", 4);
+        offset += 4;
+
+        sp<ABuffer> nal = *it;
+        memcpy(accessUnit->data() + offset, nal->data(), nal->size());
+        offset += nal->size();
+    }
+
+    accessUnit->meta()->setInt64("ntp-time", ntpTime);
+
+#if 0
+    printf(mAccessUnitDamaged ? "X" : ".");
+    fflush(stdout);
+#endif
+
+    if (mAccessUnitDamaged) {
+        accessUnit->meta()->setInt32("damaged", true);
+    }
+
+    mNALUnits.clear();
+    mAccessUnitDamaged = false;
+
+    sp<AMessage> msg = mNotifyMsg->dup();
+    msg->setObject("access-unit", accessUnit);
+    msg->post();
+}
+
+ARTPAssembler::AssemblyStatus AAVCAssembler::assembleMore(
+        const sp<ARTPSource> &source) {
+    AssemblyStatus status = addNALUnit(source);
+    if (status == MALFORMED_PACKET) {
+        mAccessUnitDamaged = true;
+    }
+    return status;
+}
+
+void AAVCAssembler::packetLost() {
+    CHECK(mNextExpectedSeqNoValid);
+    ++mNextExpectedSeqNo;
+
+    mAccessUnitDamaged = true;
+}
+
+}  // namespace android
diff --git a/media/libstagefright/rtsp/AAVCAssembler.h b/media/libstagefright/rtsp/AAVCAssembler.h
new file mode 100644
index 0000000..1e97520
--- /dev/null
+++ b/media/libstagefright/rtsp/AAVCAssembler.h
@@ -0,0 +1,61 @@
+/*
+ * Copyright (C) 2010 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef A_AVC_ASSEMBLER_H_
+
+#define A_AVC_ASSEMBLER_H_
+
+#include "ARTPAssembler.h"
+
+#include <utils/List.h>
+#include <utils/RefBase.h>
+
+namespace android {
+
+struct ABuffer;
+struct AMessage;
+
+struct AAVCAssembler : public ARTPAssembler {
+    AAVCAssembler(const sp<AMessage> &notify);
+
+protected:
+    virtual ~AAVCAssembler();
+
+    virtual AssemblyStatus assembleMore(const sp<ARTPSource> &source);
+    virtual void packetLost();
+
+private:
+    sp<AMessage> mNotifyMsg;
+
+    uint32_t mAccessUnitRTPTime;
+    bool mNextExpectedSeqNoValid;
+    uint32_t mNextExpectedSeqNo;
+    bool mAccessUnitDamaged;
+    List<sp<ABuffer> > mNALUnits;
+
+    AssemblyStatus addNALUnit(const sp<ARTPSource> &source);
+    void addSingleNALUnit(const sp<ABuffer> &buffer);
+    AssemblyStatus addFragmentedNALUnit(List<sp<ABuffer> > *queue);
+    bool addSingleTimeAggregationPacket(const sp<ABuffer> &buffer);
+
+    void submitAccessUnit();
+
+    DISALLOW_EVIL_CONSTRUCTORS(AAVCAssembler);
+};
+
+}  // namespace android
+
+#endif  // A_AVC_ASSEMBLER_H_
diff --git a/media/libstagefright/rtsp/AMPEG4AudioAssembler.cpp b/media/libstagefright/rtsp/AMPEG4AudioAssembler.cpp
new file mode 100644
index 0000000..0549d84
--- /dev/null
+++ b/media/libstagefright/rtsp/AMPEG4AudioAssembler.cpp
@@ -0,0 +1,166 @@
+/*
+ * Copyright (C) 2010 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include "AMPEG4AudioAssembler.h"
+
+#include "ARTPSource.h"
+
+#include <media/stagefright/foundation/ABuffer.h>
+#include <media/stagefright/foundation/ADebug.h>
+#include <media/stagefright/foundation/AMessage.h>
+
+namespace android {
+
+AMPEG4AudioAssembler::AMPEG4AudioAssembler(const sp<AMessage> &notify)
+    : mNotifyMsg(notify),
+      mAccessUnitRTPTime(0),
+      mNextExpectedSeqNoValid(false),
+      mNextExpectedSeqNo(0),
+      mAccessUnitDamaged(false) {
+}
+
+AMPEG4AudioAssembler::~AMPEG4AudioAssembler() {
+}
+
+ARTPAssembler::AssemblyStatus AMPEG4AudioAssembler::assembleMore(
+        const sp<ARTPSource> &source) {
+    AssemblyStatus status = addPacket(source);
+    if (status == MALFORMED_PACKET) {
+        mAccessUnitDamaged = true;
+    }
+    return status;
+}
+
+ARTPAssembler::AssemblyStatus AMPEG4AudioAssembler::addPacket(
+        const sp<ARTPSource> &source) {
+    List<sp<ABuffer> > *queue = source->queue();
+
+    if (queue->empty()) {
+        return NOT_ENOUGH_DATA;
+    }
+
+    if (mNextExpectedSeqNoValid) {
+        List<sp<ABuffer> >::iterator it = queue->begin();
+        while (it != queue->end()) {
+            if ((uint32_t)(*it)->int32Data() >= mNextExpectedSeqNo) {
+                break;
+            }
+
+            it = queue->erase(it);
+        }
+
+        if (queue->empty()) {
+            return NOT_ENOUGH_DATA;
+        }
+    }
+
+    sp<ABuffer> buffer = *queue->begin();
+
+    if (!mNextExpectedSeqNoValid) {
+        mNextExpectedSeqNoValid = true;
+        mNextExpectedSeqNo = (uint32_t)buffer->int32Data();
+    } else if ((uint32_t)buffer->int32Data() != mNextExpectedSeqNo) {
+#if VERBOSE
+        LOG(VERBOSE) << "Not the sequence number I expected";
+#endif
+
+        return WRONG_SEQUENCE_NUMBER;
+    }
+
+    uint32_t rtpTime;
+    CHECK(buffer->meta()->findInt32("rtp-time", (int32_t *)&rtpTime));
+
+    if (mPackets.size() > 0 && rtpTime != mAccessUnitRTPTime) {
+        submitAccessUnit();
+    }
+    mAccessUnitRTPTime = rtpTime;
+
+    mPackets.push_back(buffer);
+
+    queue->erase(queue->begin());
+    ++mNextExpectedSeqNo;
+
+    return OK;
+}
+
+void AMPEG4AudioAssembler::submitAccessUnit() {
+    CHECK(!mPackets.empty());
+
+#if VERBOSE
+    LOG(VERBOSE) << "Access unit complete (" << mPackets.size() << " packets)";
+#endif
+
+    uint64_t ntpTime;
+    CHECK((*mPackets.begin())->meta()->findInt64(
+                "ntp-time", (int64_t *)&ntpTime));
+
+    size_t totalSize = 0;
+    List<sp<ABuffer> >::iterator it = mPackets.begin();
+    while (it != mPackets.end()) {
+        const sp<ABuffer> &unit = *it;
+
+        size_t n = 0;
+        while (unit->data()[n] == 0xff) {
+            ++n;
+        }
+        ++n;
+
+        totalSize += unit->size() - n;
+        ++it;
+    }
+
+    sp<ABuffer> accessUnit = new ABuffer(totalSize);
+    size_t offset = 0;
+    it = mPackets.begin();
+    while (it != mPackets.end()) {
+        const sp<ABuffer> &unit = *it;
+
+        size_t n = 0;
+        while (unit->data()[n] == 0xff) {
+            ++n;
+        }
+        ++n;
+
+        memcpy((uint8_t *)accessUnit->data() + offset,
+               unit->data() + n, unit->size() - n);
+
+        offset += unit->size() - n;
+
+        ++it;
+    }
+
+    accessUnit->meta()->setInt64("ntp-time", ntpTime);
+
+    if (mAccessUnitDamaged) {
+        accessUnit->meta()->setInt32("damaged", true);
+    }
+
+    mPackets.clear();
+    mAccessUnitDamaged = false;
+
+    sp<AMessage> msg = mNotifyMsg->dup();
+    msg->setObject("access-unit", accessUnit);
+    msg->post();
+}
+
+void AMPEG4AudioAssembler::packetLost() {
+    CHECK(mNextExpectedSeqNoValid);
+    ++mNextExpectedSeqNo;
+
+    mAccessUnitDamaged = true;
+}
+
+}  // namespace android
diff --git a/media/libstagefright/rtsp/AMPEG4AudioAssembler.h b/media/libstagefright/rtsp/AMPEG4AudioAssembler.h
new file mode 100644
index 0000000..5c2a2dd
--- /dev/null
+++ b/media/libstagefright/rtsp/AMPEG4AudioAssembler.h
@@ -0,0 +1,56 @@
+/*
+ * Copyright (C) 2010 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef A_MPEG4_AUDIO_ASSEMBLER_H_
+
+#define A_MPEG4_AUDIO_ASSEMBLER_H_
+
+#include "ARTPAssembler.h"
+
+#include <utils/List.h>
+
+#include <stdint.h>
+
+namespace android {
+
+struct AMessage;
+
+struct AMPEG4AudioAssembler : public ARTPAssembler {
+    AMPEG4AudioAssembler(const sp<AMessage> &notify);
+
+protected:
+    virtual ~AMPEG4AudioAssembler();
+
+    virtual AssemblyStatus assembleMore(const sp<ARTPSource> &source);
+    virtual void packetLost();
+
+private:
+    sp<AMessage> mNotifyMsg;
+    uint32_t mAccessUnitRTPTime;
+    bool mNextExpectedSeqNoValid;
+    uint32_t mNextExpectedSeqNo;
+    bool mAccessUnitDamaged;
+    List<sp<ABuffer> > mPackets;
+
+    AssemblyStatus addPacket(const sp<ARTPSource> &source);
+    void submitAccessUnit();
+
+    DISALLOW_EVIL_CONSTRUCTORS(AMPEG4AudioAssembler);
+};
+
+}  // namespace android
+
+#endif  // A_MPEG4_AUDIO_ASSEMBLER_H_
diff --git a/media/libstagefright/rtsp/APacketSource.cpp b/media/libstagefright/rtsp/APacketSource.cpp
new file mode 100644
index 0000000..2869d54
--- /dev/null
+++ b/media/libstagefright/rtsp/APacketSource.cpp
@@ -0,0 +1,345 @@
+/*
+ * Copyright (C) 2010 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include "APacketSource.h"
+
+#include "ASessionDescription.h"
+
+#include <media/stagefright/foundation/ABuffer.h>
+#include <media/stagefright/foundation/ADebug.h>
+#include <media/stagefright/foundation/AMessage.h>
+#include <media/stagefright/foundation/AString.h>
+#include <media/stagefright/foundation/base64.h>
+#include <media/stagefright/foundation/hexdump.h>
+#include <media/stagefright/MediaBuffer.h>
+#include <media/stagefright/MediaDefs.h>
+#include <media/stagefright/MetaData.h>
+#include <utils/Vector.h>
+
+namespace android {
+
+static bool GetAttribute(const char *s, const char *key, AString *value) {
+    value->clear();
+
+    size_t keyLen = strlen(key);
+
+    for (;;) {
+        const char *colonPos = strchr(s, ';');
+
+        size_t len =
+            (colonPos == NULL) ? strlen(s) : colonPos - s;
+
+        if (len >= keyLen + 1 && s[keyLen] == '=' && !strncmp(s, key, keyLen)) {
+            value->setTo(&s[keyLen + 1], len - keyLen - 1);
+            return true;
+        }
+
+        if (colonPos == NULL) {
+            return false;
+        }
+
+        s = colonPos + 1;
+    }
+}
+
+static sp<ABuffer> decodeHex(const AString &s) {
+    if ((s.size() % 2) != 0) {
+        return NULL;
+    }
+
+    size_t outLen = s.size() / 2;
+    sp<ABuffer> buffer = new ABuffer(outLen);
+    uint8_t *out = buffer->data();
+
+    uint8_t accum = 0;
+    for (size_t i = 0; i < s.size(); ++i) {
+        char c = s.c_str()[i];
+        unsigned value;
+        if (c >= '0' && c <= '9') {
+            value = c - '0';
+        } else if (c >= 'a' && c <= 'f') {
+            value = c - 'a' + 10;
+        } else if (c >= 'A' && c <= 'F') {
+            value = c - 'A' + 10;
+        } else {
+            return NULL;
+        }
+
+        accum = (accum << 4) | value;
+
+        if (i & 1) {
+            *out++ = accum;
+
+            accum = 0;
+        }
+    }
+
+    return buffer;
+}
+
+static sp<ABuffer> MakeAVCCodecSpecificData(const char *params) {
+    AString val;
+    CHECK(GetAttribute(params, "profile-level-id", &val));
+
+    sp<ABuffer> profileLevelID = decodeHex(val);
+    CHECK(profileLevelID != NULL);
+    CHECK_EQ(profileLevelID->size(), 3u);
+
+    Vector<sp<ABuffer> > paramSets;
+
+    size_t numSeqParameterSets = 0;
+    size_t totalSeqParameterSetSize = 0;
+    size_t numPicParameterSets = 0;
+    size_t totalPicParameterSetSize = 0;
+
+    CHECK(GetAttribute(params, "sprop-parameter-sets", &val));
+    size_t start = 0;
+    for (;;) {
+        ssize_t commaPos = val.find(",", start);
+        size_t end = (commaPos < 0) ? val.size() : commaPos;
+
+        AString nalString(val, start, end - start);
+        sp<ABuffer> nal = decodeBase64(nalString);
+        CHECK(nal != NULL);
+        CHECK_GT(nal->size(), 0u);
+        CHECK_LE(nal->size(), 65535u);
+
+        uint8_t nalType = nal->data()[0] & 0x1f;
+        if (numSeqParameterSets == 0) {
+            CHECK_EQ((unsigned)nalType, 7u);
+        } else if (numPicParameterSets > 0) {
+            CHECK_EQ((unsigned)nalType, 8u);
+        }
+        if (nalType == 7) {
+            ++numSeqParameterSets;
+            totalSeqParameterSetSize += nal->size();
+        } else  {
+            CHECK_EQ((unsigned)nalType, 8u);
+            ++numPicParameterSets;
+            totalPicParameterSetSize += nal->size();
+        }
+
+        paramSets.push(nal);
+
+        if (commaPos < 0) {
+            break;
+        }
+
+        start = commaPos + 1;
+    }
+
+    CHECK_LT(numSeqParameterSets, 32u);
+    CHECK_LE(numPicParameterSets, 255u);
+
+    size_t csdSize =
+        1 + 3 + 1 + 1
+        + 2 * numSeqParameterSets + totalSeqParameterSetSize
+        + 1 + 2 * numPicParameterSets + totalPicParameterSetSize;
+
+    sp<ABuffer> csd = new ABuffer(csdSize);
+    uint8_t *out = csd->data();
+
+    *out++ = 0x01;  // configurationVersion
+    memcpy(out, profileLevelID->data(), 3);
+    out += 3;
+    *out++ = (0x3f << 2) | 1;  // lengthSize == 2 bytes
+    *out++ = 0xe0 | numSeqParameterSets;
+
+    for (size_t i = 0; i < numSeqParameterSets; ++i) {
+        sp<ABuffer> nal = paramSets.editItemAt(i);
+
+        *out++ = nal->size() >> 8;
+        *out++ = nal->size() & 0xff;
+
+        memcpy(out, nal->data(), nal->size());
+
+        out += nal->size();
+    }
+
+    *out++ = numPicParameterSets;
+
+    for (size_t i = 0; i < numPicParameterSets; ++i) {
+        sp<ABuffer> nal = paramSets.editItemAt(i + numSeqParameterSets);
+
+        *out++ = nal->size() >> 8;
+        *out++ = nal->size() & 0xff;
+
+        memcpy(out, nal->data(), nal->size());
+
+        out += nal->size();
+    }
+
+    hexdump(csd->data(), csd->size());
+
+    return csd;
+}
+
+sp<ABuffer> MakeAACCodecSpecificData(const char *params) {
+    AString val;
+    CHECK(GetAttribute(params, "config", &val));
+
+    sp<ABuffer> config = decodeHex(val);
+    CHECK(config != NULL);
+    CHECK_GE(config->size(), 4u);
+
+    const uint8_t *data = config->data();
+    uint32_t x = data[0] << 24 | data[1] << 16 | data[2] << 8 | data[3];
+    x = (x >> 1) & 0xffff;
+
+    static const uint8_t kStaticESDS[] = {
+        0x03, 22,
+        0x00, 0x00,     // ES_ID
+        0x00,           // streamDependenceFlag, URL_Flag, OCRstreamFlag
+
+        0x04, 17,
+        0x40,                       // Audio ISO/IEC 14496-3
+        0x00, 0x00, 0x00, 0x00,
+        0x00, 0x00, 0x00, 0x00,
+        0x00, 0x00, 0x00, 0x00,
+
+        0x05, 2,
+        // AudioSpecificInfo follows
+    };
+
+    sp<ABuffer> csd = new ABuffer(sizeof(kStaticESDS) + 2);
+    memcpy(csd->data(), kStaticESDS, sizeof(kStaticESDS));
+    csd->data()[sizeof(kStaticESDS)] = (x >> 8) & 0xff;
+    csd->data()[sizeof(kStaticESDS) + 1] = x & 0xff;
+
+    hexdump(csd->data(), csd->size());
+
+    return csd;
+}
+
+APacketSource::APacketSource(
+        const sp<ASessionDescription> &sessionDesc, size_t index)
+    : mFormat(new MetaData),
+      mEOSResult(OK) {
+    unsigned long PT;
+    AString desc;
+    AString params;
+    sessionDesc->getFormatType(index, &PT, &desc, &params);
+
+    int64_t durationUs;
+    if (sessionDesc->getDurationUs(&durationUs)) {
+        mFormat->setInt64(kKeyDuration, durationUs);
+    } else {
+        mFormat->setInt64(kKeyDuration, 60 * 60 * 1000000ll);
+    }
+
+    if (!strncmp(desc.c_str(), "H264/", 5)) {
+        mFormat->setCString(kKeyMIMEType, MEDIA_MIMETYPE_VIDEO_AVC);
+
+        int32_t width, height;
+        sessionDesc->getDimensions(index, PT, &width, &height);
+
+        mFormat->setInt32(kKeyWidth, width);
+        mFormat->setInt32(kKeyHeight, height);
+
+        sp<ABuffer> codecSpecificData =
+            MakeAVCCodecSpecificData(params.c_str());
+
+        mFormat->setData(
+                kKeyAVCC, 0,
+                codecSpecificData->data(), codecSpecificData->size());
+
+    } else if (!strncmp(desc.c_str(), "MP4A-LATM", 9)) {
+        mFormat->setCString(kKeyMIMEType, MEDIA_MIMETYPE_AUDIO_AAC);
+
+        int32_t sampleRate, numChannels;
+        ASessionDescription::ParseFormatDesc(
+                desc.c_str(), &sampleRate, &numChannels);
+
+        mFormat->setInt32(kKeySampleRate, sampleRate);
+        mFormat->setInt32(kKeyChannelCount, numChannels);
+
+        sp<ABuffer> codecSpecificData =
+            MakeAACCodecSpecificData(params.c_str());
+
+        mFormat->setData(
+                kKeyESDS, 0,
+                codecSpecificData->data(), codecSpecificData->size());
+    } else {
+        TRESPASS();
+    }
+}
+
+APacketSource::~APacketSource() {
+}
+
+status_t APacketSource::start(MetaData *params) {
+    return OK;
+}
+
+status_t APacketSource::stop() {
+    return OK;
+}
+
+sp<MetaData> APacketSource::getFormat() {
+    return mFormat;
+}
+
+status_t APacketSource::read(
+        MediaBuffer **out, const ReadOptions *) {
+    *out = NULL;
+
+    Mutex::Autolock autoLock(mLock);
+    while (mEOSResult == OK && mBuffers.empty()) {
+        mCondition.wait(mLock);
+    }
+
+    if (!mBuffers.empty()) {
+        const sp<ABuffer> buffer = *mBuffers.begin();
+
+        uint64_t ntpTime;
+        CHECK(buffer->meta()->findInt64(
+                    "ntp-time", (int64_t *)&ntpTime));
+
+        int64_t timeUs = (int64_t)(ntpTime * 1E6 / (1ll << 32));
+
+        MediaBuffer *mediaBuffer = new MediaBuffer(buffer->size());
+        mediaBuffer->meta_data()->setInt64(kKeyTime, timeUs);
+        memcpy(mediaBuffer->data(), buffer->data(), buffer->size());
+        *out = mediaBuffer;
+
+        mBuffers.erase(mBuffers.begin());
+        return OK;
+    }
+
+    return mEOSResult;
+}
+
+void APacketSource::queueAccessUnit(const sp<ABuffer> &buffer) {
+    int32_t damaged;
+    if (buffer->meta()->findInt32("damaged", &damaged) && damaged) {
+        // LOG(VERBOSE) << "discarding damaged AU";
+        return;
+    }
+
+    Mutex::Autolock autoLock(mLock);
+    mBuffers.push_back(buffer);
+    mCondition.signal();
+}
+
+void APacketSource::signalEOS(status_t result) {
+    CHECK(result != OK);
+
+    Mutex::Autolock autoLock(mLock);
+    mEOSResult = result;
+    mCondition.signal();
+}
+
+}  // namespace android
diff --git a/media/libstagefright/rtsp/APacketSource.h b/media/libstagefright/rtsp/APacketSource.h
new file mode 100644
index 0000000..4040eee
--- /dev/null
+++ b/media/libstagefright/rtsp/APacketSource.h
@@ -0,0 +1,61 @@
+/*
+ * Copyright (C) 2010 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef A_PACKET_SOURCE_H_
+
+#define A_PACKET_SOURCE_H_
+
+#include <media/stagefright/foundation/ABase.h>
+#include <media/stagefright/MediaSource.h>
+#include <utils/threads.h>
+#include <utils/List.h>
+
+namespace android {
+
+struct ABuffer;
+struct ASessionDescription;
+
+struct APacketSource : public MediaSource {
+    APacketSource(const sp<ASessionDescription> &sessionDesc, size_t index);
+
+    virtual status_t start(MetaData *params = NULL);
+    virtual status_t stop();
+    virtual sp<MetaData> getFormat();
+
+    virtual status_t read(
+            MediaBuffer **buffer, const ReadOptions *options = NULL);
+
+    void queueAccessUnit(const sp<ABuffer> &buffer);
+    void signalEOS(status_t result);
+
+protected:
+    virtual ~APacketSource();
+
+private:
+    Mutex mLock;
+    Condition mCondition;
+
+    sp<MetaData> mFormat;
+    List<sp<ABuffer> > mBuffers;
+    status_t mEOSResult;
+
+    DISALLOW_EVIL_CONSTRUCTORS(APacketSource);
+};
+
+
+}  // namespace android
+
+#endif  // A_PACKET_SOURCE_H_
diff --git a/media/libstagefright/rtsp/ARTPAssembler.cpp b/media/libstagefright/rtsp/ARTPAssembler.cpp
new file mode 100644
index 0000000..24225b8
--- /dev/null
+++ b/media/libstagefright/rtsp/ARTPAssembler.cpp
@@ -0,0 +1,78 @@
+/*
+ * Copyright (C) 2010 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include "ARTPAssembler.h"
+
+#include <media/stagefright/foundation/ABuffer.h>
+#include <media/stagefright/foundation/ADebug.h>
+#include <media/stagefright/foundation/AMessage.h>
+
+#include <stdint.h>
+
+namespace android {
+
+static int64_t getNowUs() {
+    struct timeval tv;
+    gettimeofday(&tv, NULL);
+
+    return (int64_t)tv.tv_usec + tv.tv_sec * 1000000ll;
+}
+
+ARTPAssembler::ARTPAssembler()
+    : mFirstFailureTimeUs(-1) {
+}
+
+void ARTPAssembler::PropagateTimes(
+        const sp<ABuffer> &from, const sp<ABuffer> &to) {
+    uint32_t rtpTime;
+    CHECK(from->meta()->findInt32("rtp-time", (int32_t *)&rtpTime));
+
+    uint64_t ntpTime = 0;
+    CHECK(from->meta()->findInt64("ntp-time", (int64_t *)&ntpTime));
+
+    to->meta()->setInt32("rtp-time", rtpTime);
+    to->meta()->setInt64("ntp-time", ntpTime);
+}
+
+void ARTPAssembler::onPacketReceived(const sp<ARTPSource> &source) {
+    AssemblyStatus status;
+    for (;;) {
+        status = assembleMore(source);
+
+        if (status == WRONG_SEQUENCE_NUMBER) {
+            if (mFirstFailureTimeUs >= 0) {
+                if (getNowUs() - mFirstFailureTimeUs > 10000ll) {
+                    mFirstFailureTimeUs = -1;
+
+                    // LOG(VERBOSE) << "waited too long for packet.";
+                    packetLost();
+                    continue;
+                }
+            } else {
+                mFirstFailureTimeUs = getNowUs();
+            }
+            break;
+        } else {
+            mFirstFailureTimeUs = -1;
+
+            if (status == NOT_ENOUGH_DATA) {
+                break;
+            }
+        }
+    }
+}
+
+}  // namespace android
diff --git a/media/libstagefright/rtsp/ARTPAssembler.h b/media/libstagefright/rtsp/ARTPAssembler.h
new file mode 100644
index 0000000..892bd65
--- /dev/null
+++ b/media/libstagefright/rtsp/ARTPAssembler.h
@@ -0,0 +1,56 @@
+/*
+ * Copyright (C) 2010 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef A_RTP_ASSEMBLER_H_
+
+#define A_RTP_ASSEMBLER_H_
+
+#include <media/stagefright/foundation/ABase.h>
+#include <utils/RefBase.h>
+
+namespace android {
+
+struct ABuffer;
+struct ARTPSource;
+
+struct ARTPAssembler : public RefBase {
+    enum AssemblyStatus {
+        MALFORMED_PACKET,
+        WRONG_SEQUENCE_NUMBER,
+        NOT_ENOUGH_DATA,
+        OK
+    };
+
+    ARTPAssembler();
+
+    void onPacketReceived(const sp<ARTPSource> &source);
+
+protected:
+    static void PropagateTimes(
+        const sp<ABuffer> &from, const sp<ABuffer> &to);
+
+    virtual AssemblyStatus assembleMore(const sp<ARTPSource> &source) = 0;
+    virtual void packetLost() = 0;
+
+private:
+    int64_t mFirstFailureTimeUs;
+
+    DISALLOW_EVIL_CONSTRUCTORS(ARTPAssembler);
+};
+
+}  // namespace android
+
+#endif  // A_RTP_ASSEMBLER_H_
diff --git a/media/libstagefright/rtsp/ARTPConnection.cpp b/media/libstagefright/rtsp/ARTPConnection.cpp
new file mode 100644
index 0000000..a4413f0
--- /dev/null
+++ b/media/libstagefright/rtsp/ARTPConnection.cpp
@@ -0,0 +1,499 @@
+/*
+ * Copyright (C) 2010 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include "ARTPConnection.h"
+
+#include "ARTPSource.h"
+#include "ASessionDescription.h"
+
+#include <media/stagefright/foundation/ABuffer.h>
+#include <media/stagefright/foundation/ADebug.h>
+#include <media/stagefright/foundation/AMessage.h>
+#include <media/stagefright/foundation/AString.h>
+
+#include <arpa/inet.h>
+#include <sys/socket.h>
+
+#define VERBOSE         0
+
+#if VERBOSE
+#include "hexdump.h"
+#endif
+
+namespace android {
+
+static uint16_t u16at(const uint8_t *data) {
+    return data[0] << 8 | data[1];
+}
+
+static uint32_t u32at(const uint8_t *data) {
+    return u16at(data) << 16 | u16at(&data[2]);
+}
+
+static uint64_t u64at(const uint8_t *data) {
+    return (uint64_t)(u32at(data)) << 32 | u32at(&data[4]);
+}
+
+// static
+const int64_t ARTPConnection::kSelectTimeoutUs = 1000ll;
+
+struct ARTPConnection::StreamInfo {
+    int mRTPSocket;
+    int mRTCPSocket;
+    sp<ASessionDescription> mSessionDesc;
+    size_t mIndex;
+    sp<AMessage> mNotifyMsg;
+};
+
+ARTPConnection::ARTPConnection()
+    : mPollEventPending(false) {
+}
+
+ARTPConnection::~ARTPConnection() {
+}
+
+void ARTPConnection::addStream(
+        int rtpSocket, int rtcpSocket,
+        const sp<ASessionDescription> &sessionDesc,
+        size_t index,
+        const sp<AMessage> &notify) {
+    sp<AMessage> msg = new AMessage(kWhatAddStream, id());
+    msg->setInt32("rtp-socket", rtpSocket);
+    msg->setInt32("rtcp-socket", rtcpSocket);
+    msg->setObject("session-desc", sessionDesc);
+    msg->setSize("index", index);
+    msg->setMessage("notify", notify);
+    msg->post();
+}
+
+void ARTPConnection::removeStream(int rtpSocket, int rtcpSocket) {
+    sp<AMessage> msg = new AMessage(kWhatRemoveStream, id());
+    msg->setInt32("rtp-socket", rtpSocket);
+    msg->setInt32("rtcp-socket", rtcpSocket);
+    msg->post();
+}
+
+static void bumpSocketBufferSize(int s) {
+    int size = 256 * 1024;
+    CHECK_EQ(setsockopt(s, SOL_SOCKET, SO_RCVBUF, &size, sizeof(size)), 0);
+}
+
+// static
+void ARTPConnection::MakePortPair(
+        int *rtpSocket, int *rtcpSocket, unsigned *rtpPort) {
+    *rtpSocket = socket(AF_INET, SOCK_DGRAM, 0);
+    CHECK_GE(*rtpSocket, 0);
+
+    bumpSocketBufferSize(*rtpSocket);
+
+    *rtcpSocket = socket(AF_INET, SOCK_DGRAM, 0);
+    CHECK_GE(*rtcpSocket, 0);
+
+    bumpSocketBufferSize(*rtcpSocket);
+
+    unsigned start = (rand() * 1000)/ RAND_MAX + 15550;
+    start &= ~1;
+
+    for (unsigned port = start; port < 65536; port += 2) {
+        struct sockaddr_in addr;
+        memset(addr.sin_zero, 0, sizeof(addr.sin_zero));
+        addr.sin_family = AF_INET;
+        addr.sin_addr.s_addr = INADDR_ANY;
+        addr.sin_port = htons(port);
+
+        if (bind(*rtpSocket,
+                 (const struct sockaddr *)&addr, sizeof(addr)) < 0) {
+            continue;
+        }
+
+        addr.sin_port = htons(port + 1);
+
+        if (bind(*rtcpSocket,
+                 (const struct sockaddr *)&addr, sizeof(addr)) == 0) {
+            *rtpPort = port;
+            return;
+        }
+    }
+
+    TRESPASS();
+}
+
+void ARTPConnection::onMessageReceived(const sp<AMessage> &msg) {
+    switch (msg->what()) {
+        case kWhatAddStream:
+        {
+            onAddStream(msg);
+            break;
+        }
+
+        case kWhatRemoveStream:
+        {
+            onRemoveStream(msg);
+            break;
+        }
+
+        case kWhatPollStreams:
+        {
+            onPollStreams();
+            break;
+        }
+
+        default:
+        {
+            TRESPASS();
+            break;
+        }
+    }
+}
+
+void ARTPConnection::onAddStream(const sp<AMessage> &msg) {
+    mStreams.push_back(StreamInfo());
+    StreamInfo *info = &*--mStreams.end();
+
+    int32_t s;
+    CHECK(msg->findInt32("rtp-socket", &s));
+    info->mRTPSocket = s;
+    CHECK(msg->findInt32("rtcp-socket", &s));
+    info->mRTCPSocket = s;
+
+    sp<RefBase> obj;
+    CHECK(msg->findObject("session-desc", &obj));
+    info->mSessionDesc = static_cast<ASessionDescription *>(obj.get());
+
+    CHECK(msg->findSize("index", &info->mIndex));
+    CHECK(msg->findMessage("notify", &info->mNotifyMsg));
+
+    postPollEvent();
+}
+
+void ARTPConnection::onRemoveStream(const sp<AMessage> &msg) {
+    int32_t rtpSocket, rtcpSocket;
+    CHECK(msg->findInt32("rtp-socket", &rtpSocket));
+    CHECK(msg->findInt32("rtcp-socket", &rtcpSocket));
+
+    List<StreamInfo>::iterator it = mStreams.begin();
+    while (it != mStreams.end()
+           && (it->mRTPSocket != rtpSocket || it->mRTCPSocket != rtcpSocket)) {
+        ++it;
+    }
+
+    if (it == mStreams.end()) {
+        TRESPASS();
+    }
+
+    mStreams.erase(it);
+}
+
+void ARTPConnection::postPollEvent() {
+    if (mPollEventPending) {
+        return;
+    }
+
+    sp<AMessage> msg = new AMessage(kWhatPollStreams, id());
+    msg->post();
+
+    mPollEventPending = true;
+}
+
+void ARTPConnection::onPollStreams() {
+    mPollEventPending = false;
+
+    if (mStreams.empty()) {
+        return;
+    }
+
+    struct timeval tv;
+    tv.tv_sec = 0;
+    tv.tv_usec = kSelectTimeoutUs;
+
+    fd_set rs;
+    FD_ZERO(&rs);
+
+    int maxSocket = -1;
+    for (List<StreamInfo>::iterator it = mStreams.begin();
+         it != mStreams.end(); ++it) {
+        FD_SET(it->mRTPSocket, &rs);
+        FD_SET(it->mRTCPSocket, &rs);
+
+        if (it->mRTPSocket > maxSocket) {
+            maxSocket = it->mRTPSocket;
+        }
+        if (it->mRTCPSocket > maxSocket) {
+            maxSocket = it->mRTCPSocket;
+        }
+    }
+
+    int res = select(maxSocket + 1, &rs, NULL, NULL, &tv);
+    CHECK_GE(res, 0);
+
+    if (res > 0) {
+        for (List<StreamInfo>::iterator it = mStreams.begin();
+             it != mStreams.end(); ++it) {
+            if (FD_ISSET(it->mRTPSocket, &rs)) {
+                receive(&*it, true);
+            }
+            if (FD_ISSET(it->mRTCPSocket, &rs)) {
+                receive(&*it, false);
+            }
+        }
+    }
+
+    postPollEvent();
+}
+
+status_t ARTPConnection::receive(StreamInfo *s, bool receiveRTP) {
+    sp<ABuffer> buffer = new ABuffer(65536);
+
+    struct sockaddr_in from;
+    socklen_t fromSize = sizeof(from);
+
+    ssize_t nbytes = recvfrom(
+            receiveRTP ? s->mRTPSocket : s->mRTCPSocket,
+            buffer->data(),
+            buffer->capacity(),
+            0,
+            (struct sockaddr *)&from,
+            &fromSize);
+
+    if (nbytes < 0) {
+        return -1;
+    }
+
+    buffer->setRange(0, nbytes);
+
+    status_t err;
+    if (receiveRTP) {
+        err = parseRTP(s, buffer);
+    } else {
+        err = parseRTCP(s, buffer);
+    }
+
+    return err;
+}
+
+status_t ARTPConnection::parseRTP(StreamInfo *s, const sp<ABuffer> &buffer) {
+    size_t size = buffer->size();
+
+    if (size < 12) {
+        // Too short to be a valid RTP header.
+        return -1;
+    }
+
+    const uint8_t *data = buffer->data();
+
+    if ((data[0] >> 6) != 2) {
+        // Unsupported version.
+        return -1;
+    }
+
+    if (data[0] & 0x20) {
+        // Padding present.
+
+        size_t paddingLength = data[size - 1];
+
+        if (paddingLength + 12 > size) {
+            // If we removed this much padding we'd end up with something
+            // that's too short to be a valid RTP header.
+            return -1;
+        }
+
+        size -= paddingLength;
+    }
+
+    int numCSRCs = data[0] & 0x0f;
+
+    size_t payloadOffset = 12 + 4 * numCSRCs;
+
+    if (size < payloadOffset) {
+        // Not enough data to fit the basic header and all the CSRC entries.
+        return -1;
+    }
+
+    if (data[0] & 0x10) {
+        // Header eXtension present.
+
+        if (size < payloadOffset + 4) {
+            // Not enough data to fit the basic header, all CSRC entries
+            // and the first 4 bytes of the extension header.
+
+            return -1;
+        }
+
+        const uint8_t *extensionData = &data[payloadOffset];
+
+        size_t extensionLength =
+            4 * (extensionData[2] << 8 | extensionData[3]);
+
+        if (size < payloadOffset + 4 + extensionLength) {
+            return -1;
+        }
+
+        payloadOffset += 4 + extensionLength;
+    }
+
+    uint32_t srcId = u32at(&data[8]);
+
+    sp<ARTPSource> source;
+    ssize_t index = mSources.indexOfKey(srcId);
+    if (index < 0) {
+        index = mSources.size();
+
+        source = new ARTPSource(
+                srcId, s->mSessionDesc, s->mIndex, s->mNotifyMsg);
+
+        mSources.add(srcId, source);
+    } else {
+        source = mSources.valueAt(index);
+    }
+
+    uint32_t rtpTime = u32at(&data[4]);
+
+    sp<AMessage> meta = buffer->meta();
+    meta->setInt32("ssrc", srcId);
+    meta->setInt32("rtp-time", rtpTime);
+    meta->setInt32("PT", data[1] & 0x7f);
+    meta->setInt32("M", data[1] >> 7);
+
+    buffer->setInt32Data(u16at(&data[2]));
+
+#if VERBOSE
+    printf("RTP = {\n"
+           "  PT: %d\n"
+           "  sequence number: %d\n"
+           "  RTP-time: 0x%08x\n"
+           "  M: %d\n"
+           "  SSRC: 0x%08x\n"
+           "}\n",
+           data[1] & 0x7f,
+           u16at(&data[2]),
+           rtpTime,
+           data[1] >> 7,
+           srcId);
+
+    // hexdump(&data[payloadOffset], size - payloadOffset);
+#endif
+
+    buffer->setRange(payloadOffset, size - payloadOffset);
+
+    source->processRTPPacket(buffer);
+
+    return OK;
+}
+
+status_t ARTPConnection::parseRTCP(StreamInfo *s, const sp<ABuffer> &buffer) {
+    const uint8_t *data = buffer->data();
+    size_t size = buffer->size();
+
+    while (size > 0) {
+        if (size < 8) {
+            // Too short to be a valid RTCP header
+            return -1;
+        }
+
+        if ((data[0] >> 6) != 2) {
+            // Unsupported version.
+            return -1;
+        }
+
+        if (data[0] & 0x20) {
+            // Padding present.
+
+            size_t paddingLength = data[size - 1];
+
+            if (paddingLength + 12 > size) {
+                // If we removed this much padding we'd end up with something
+                // that's too short to be a valid RTP header.
+                return -1;
+            }
+
+            size -= paddingLength;
+        }
+
+        size_t headerLength = 4 * (data[2] << 8 | data[3]) + 4;
+
+        if (size < headerLength) {
+            // Only received a partial packet?
+            return -1;
+        }
+
+        switch (data[1]) {
+            case 200:
+            {
+                parseSR(s, data, headerLength);
+                break;
+            }
+
+            default:
+            {
+#if VERBOSE
+                printf("Unknown RTCP packet type %d of size %ld\n",
+                       data[1], headerLength);
+
+                hexdump(data, headerLength);
+#endif
+                break;
+            }
+        }
+
+        data += headerLength;
+        size -= headerLength;
+    }
+
+    return OK;
+}
+
+status_t ARTPConnection::parseSR(
+        StreamInfo *s, const uint8_t *data, size_t size) {
+    size_t RC = data[0] & 0x1f;
+
+    if (size < (7 + RC * 6) * 4) {
+        // Packet too short for the minimal SR header.
+        return -1;
+    }
+
+    uint32_t id = u32at(&data[4]);
+    uint64_t ntpTime = u64at(&data[8]);
+    uint32_t rtpTime = u32at(&data[16]);
+
+#if VERBOSE
+    printf("SR = {\n"
+           "  SSRC:      0x%08x\n"
+           "  NTP-time:  0x%016llx\n"
+           "  RTP-time:  0x%08x\n"
+           "}\n",
+           id, ntpTime, rtpTime);
+#endif
+
+    sp<ARTPSource> source;
+    ssize_t index = mSources.indexOfKey(id);
+    if (index < 0) {
+        index = mSources.size();
+
+        source = new ARTPSource(
+                id, s->mSessionDesc, s->mIndex, s->mNotifyMsg);
+
+        mSources.add(id, source);
+    } else {
+        source = mSources.valueAt(index);
+    }
+
+    source->timeUpdate(rtpTime, ntpTime);
+
+    return 0;
+}
+
+}  // namespace android
+
diff --git a/media/libstagefright/rtsp/ARTPConnection.h b/media/libstagefright/rtsp/ARTPConnection.h
new file mode 100644
index 0000000..c77e3a4
--- /dev/null
+++ b/media/libstagefright/rtsp/ARTPConnection.h
@@ -0,0 +1,83 @@
+/*
+ * Copyright (C) 2010 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef A_RTP_CONNECTION_H_
+
+#define A_RTP_CONNECTION_H_
+
+#include <media/stagefright/foundation/AHandler.h>
+#include <utils/List.h>
+
+namespace android {
+
+struct ABuffer;
+struct ARTPSource;
+struct ASessionDescription;
+
+struct ARTPConnection : public AHandler {
+    ARTPConnection();
+
+    void addStream(
+            int rtpSocket, int rtcpSocket,
+            const sp<ASessionDescription> &sessionDesc, size_t index,
+            const sp<AMessage> &notify);
+
+    void removeStream(int rtpSocket, int rtcpSocket);
+
+    // Creates a pair of UDP datagram sockets bound to adjacent ports
+    // (the rtpSocket is bound to an even port, the rtcpSocket to the
+    // next higher port).
+    static void MakePortPair(
+            int *rtpSocket, int *rtcpSocket, unsigned *rtpPort);
+
+protected:
+    virtual ~ARTPConnection();
+    virtual void onMessageReceived(const sp<AMessage> &msg);
+
+private:
+    enum {
+        kWhatAddStream,
+        kWhatRemoveStream,
+        kWhatPollStreams,
+    };
+
+    static const int64_t kSelectTimeoutUs;
+
+    struct StreamInfo;
+    List<StreamInfo> mStreams;
+
+    KeyedVector<uint32_t, sp<ARTPSource> > mSources;
+
+    bool mPollEventPending;
+
+    void onAddStream(const sp<AMessage> &msg);
+    void onRemoveStream(const sp<AMessage> &msg);
+    void onPollStreams();
+
+    status_t receive(StreamInfo *info, bool receiveRTP);
+
+    status_t parseRTP(StreamInfo *info, const sp<ABuffer> &buffer);
+    status_t parseRTCP(StreamInfo *info, const sp<ABuffer> &buffer);
+    status_t parseSR(StreamInfo *info, const uint8_t *data, size_t size);
+
+    void postPollEvent();
+
+    DISALLOW_EVIL_CONSTRUCTORS(ARTPConnection);
+};
+
+}  // namespace android
+
+#endif  // A_RTP_CONNECTION_H_
diff --git a/media/libstagefright/rtsp/ARTPSource.cpp b/media/libstagefright/rtsp/ARTPSource.cpp
new file mode 100644
index 0000000..f05daa8
--- /dev/null
+++ b/media/libstagefright/rtsp/ARTPSource.cpp
@@ -0,0 +1,250 @@
+/*
+ * Copyright (C) 2010 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include "ARTPSource.h"
+
+#include "AAVCAssembler.h"
+#include "AMPEG4AudioAssembler.h"
+#include "ASessionDescription.h"
+
+#include <media/stagefright/foundation/ABuffer.h>
+#include <media/stagefright/foundation/ADebug.h>
+#include <media/stagefright/foundation/AMessage.h>
+
+#define VERBOSE         0
+
+namespace android {
+
+ARTPSource::ARTPSource(
+        uint32_t id,
+        const sp<ASessionDescription> &sessionDesc, size_t index,
+        const sp<AMessage> &notify)
+    : mID(id),
+      mHighestSeqNumber(0),
+      mNumBuffersReceived(0),
+      mNumTimes(0) {
+    unsigned long PT;
+    AString desc;
+    AString params;
+    sessionDesc->getFormatType(index, &PT, &desc, &params);
+
+    if (!strncmp(desc.c_str(), "H264/", 5)) {
+        mAssembler = new AAVCAssembler(notify);
+    } else if (!strncmp(desc.c_str(), "MP4A-LATM", 9)) {
+        mAssembler = new AMPEG4AudioAssembler(notify);
+    } else {
+        TRESPASS();
+    }
+}
+
+static uint32_t AbsDiff(uint32_t seq1, uint32_t seq2) {
+    return seq1 > seq2 ? seq1 - seq2 : seq2 - seq1;
+}
+
+void ARTPSource::processRTPPacket(const sp<ABuffer> &buffer) {
+    if (queuePacket(buffer) && mNumTimes == 2 && mAssembler != NULL) {
+        mAssembler->onPacketReceived(this);
+    }
+
+    dump();
+}
+
+void ARTPSource::timeUpdate(uint32_t rtpTime, uint64_t ntpTime) {
+#if VERBOSE
+    LOG(VERBOSE) << "timeUpdate";
+#endif
+
+    if (mNumTimes == 2) {
+        mNTPTime[0] = mNTPTime[1];
+        mRTPTime[0] = mRTPTime[1];
+        mNumTimes = 1;
+    }
+    mNTPTime[mNumTimes] = ntpTime;
+    mRTPTime[mNumTimes++] = rtpTime;
+
+    if (mNumTimes == 2) {
+        for (List<sp<ABuffer> >::iterator it = mQueue.begin();
+             it != mQueue.end(); ++it) {
+            sp<AMessage> meta = (*it)->meta();
+
+            uint32_t rtpTime;
+            CHECK(meta->findInt32("rtp-time", (int32_t *)&rtpTime));
+
+            meta->setInt64("ntp-time", RTP2NTP(rtpTime));
+        }
+    }
+}
+
+bool ARTPSource::queuePacket(const sp<ABuffer> &buffer) {
+    uint32_t seqNum = (uint32_t)buffer->int32Data();
+
+    if (mNumTimes == 2) {
+        sp<AMessage> meta = buffer->meta();
+
+        uint32_t rtpTime;
+        CHECK(meta->findInt32("rtp-time", (int32_t *)&rtpTime));
+
+        meta->setInt64("ntp-time", RTP2NTP(rtpTime));
+    }
+
+    if (mNumBuffersReceived++ == 0) {
+        mHighestSeqNumber = seqNum;
+        mQueue.push_back(buffer);
+        return true;
+    }
+
+    // Only the lower 16-bit of the sequence numbers are transmitted,
+    // derive the high-order bits by choosing the candidate closest
+    // to the highest sequence number (extended to 32 bits) received so far.
+
+    uint32_t seq1 = seqNum | (mHighestSeqNumber & 0xffff0000);
+    uint32_t seq2 = seqNum | ((mHighestSeqNumber & 0xffff0000) + 0x10000);
+    uint32_t seq3 = seqNum | ((mHighestSeqNumber & 0xffff0000) - 0x10000);
+    uint32_t diff1 = AbsDiff(seq1, mHighestSeqNumber);
+    uint32_t diff2 = AbsDiff(seq2, mHighestSeqNumber);
+    uint32_t diff3 = AbsDiff(seq3, mHighestSeqNumber);
+
+    if (diff1 < diff2) {
+        if (diff1 < diff3) {
+            // diff1 < diff2 ^ diff1 < diff3
+            seqNum = seq1;
+        } else {
+            // diff3 <= diff1 < diff2
+            seqNum = seq3;
+        }
+    } else if (diff2 < diff3) {
+        // diff2 <= diff1 ^ diff2 < diff3
+        seqNum = seq2;
+    } else {
+        // diff3 <= diff2 <= diff1
+        seqNum = seq3;
+    }
+
+    if (seqNum > mHighestSeqNumber) {
+        mHighestSeqNumber = seqNum;
+    }
+
+    buffer->setInt32Data(seqNum);
+
+    List<sp<ABuffer> >::iterator it = mQueue.begin();
+    while (it != mQueue.end() && (uint32_t)(*it)->int32Data() < seqNum) {
+        ++it;
+    }
+
+    if (it != mQueue.end() && (uint32_t)(*it)->int32Data() == seqNum) {
+        LOG(WARNING) << "Discarding duplicate buffer";
+        return false;
+    }
+
+    mQueue.insert(it, buffer);
+
+    return true;
+}
+
+void ARTPSource::dump() const {
+    if ((mNumBuffersReceived % 128) != 0) {
+        return;
+    }
+
+#if 0
+    if (mAssembler == NULL) {
+        char tmp[20];
+        sprintf(tmp, "0x%08x", mID);
+
+        int32_t numMissing = 0;
+
+        if (!mQueue.empty()) {
+            List<sp<ABuffer> >::const_iterator it = mQueue.begin();
+            uint32_t expectedSeqNum = (uint32_t)(*it)->int32Data();
+            ++expectedSeqNum;
+            ++it;
+
+            for (; it != mQueue.end(); ++it) {
+                uint32_t seqNum = (uint32_t)(*it)->int32Data();
+                CHECK_GE(seqNum, expectedSeqNum);
+
+                if (seqNum != expectedSeqNum) {
+                    numMissing += seqNum - expectedSeqNum;
+                    expectedSeqNum = seqNum;
+                }
+
+                ++expectedSeqNum;
+            }
+        }
+
+        LOG(VERBOSE) << "[" << tmp << "] Missing " << numMissing
+             << " / " << (mNumBuffersReceived + numMissing) << " packets. ("
+             << (100.0 * numMissing / (mNumBuffersReceived + numMissing))
+             << " %%)";
+    }
+#endif
+
+#if 0
+    AString out;
+    
+    out.append(tmp);
+    out.append(" [");
+
+    List<sp<ABuffer> >::const_iterator it = mQueue.begin();
+    while (it != mQueue.end()) {
+        uint32_t start = (uint32_t)(*it)->int32Data();
+
+        out.append(start);
+
+        ++it;
+        uint32_t expected = start + 1;
+
+        while (it != mQueue.end()) {
+            uint32_t seqNum = (uint32_t)(*it)->int32Data();
+
+            if (seqNum != expected) {
+                if (expected > start + 1) {
+                    out.append("-");
+                    out.append(expected - 1);
+                }
+                out.append(", ");
+                break;
+            }
+
+            ++it;
+            ++expected;
+        }
+
+        if (it == mQueue.end()) {
+            if (expected > start + 1) {
+                out.append("-");
+                out.append(expected - 1);
+            }
+        }
+    }
+
+    out.append("]");
+
+    LOG(VERBOSE) << out;
+#endif
+}
+
+uint64_t ARTPSource::RTP2NTP(uint32_t rtpTime) const {
+    CHECK_EQ(mNumTimes, 2u);
+
+    return mNTPTime[0] + (double)(mNTPTime[1] - mNTPTime[0])
+            * ((double)rtpTime - (double)mRTPTime[0])
+            / (double)(mRTPTime[1] - mRTPTime[0]);
+}
+
+}  // namespace android
+
+
diff --git a/media/libstagefright/rtsp/ARTPSource.h b/media/libstagefright/rtsp/ARTPSource.h
new file mode 100644
index 0000000..b93cd56
--- /dev/null
+++ b/media/libstagefright/rtsp/ARTPSource.h
@@ -0,0 +1,67 @@
+/*
+ * Copyright (C) 2010 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef A_RTP_SOURCE_H_
+
+#define A_RTP_SOURCE_H_
+
+#include <stdint.h>
+
+#include <media/stagefright/foundation/ABase.h>
+#include <utils/List.h>
+#include <utils/RefBase.h>
+
+namespace android {
+
+struct ABuffer;
+struct AMessage;
+struct ARTPAssembler;
+struct ASessionDescription;
+
+struct ARTPSource : public RefBase {
+    ARTPSource(
+            uint32_t id,
+            const sp<ASessionDescription> &sessionDesc, size_t index,
+            const sp<AMessage> &notify);
+
+    void processRTPPacket(const sp<ABuffer> &buffer);
+    void timeUpdate(uint32_t rtpTime, uint64_t ntpTime);
+
+    List<sp<ABuffer> > *queue() { return &mQueue; }
+
+private:
+    uint32_t mID;
+    uint32_t mHighestSeqNumber;
+    int32_t mNumBuffersReceived;
+
+    List<sp<ABuffer> > mQueue;
+    sp<ARTPAssembler> mAssembler;
+
+    size_t mNumTimes;
+    uint64_t mNTPTime[2];
+    uint32_t mRTPTime[2];
+
+    uint64_t RTP2NTP(uint32_t rtpTime) const;
+
+    bool queuePacket(const sp<ABuffer> &buffer);
+    void dump() const;
+
+    DISALLOW_EVIL_CONSTRUCTORS(ARTPSource);
+};
+
+}  // namespace android
+
+#endif  // A_RTP_SOURCE_H_
diff --git a/media/libstagefright/rtsp/ARTSPConnection.cpp b/media/libstagefright/rtsp/ARTSPConnection.cpp
new file mode 100644
index 0000000..e9162c0
--- /dev/null
+++ b/media/libstagefright/rtsp/ARTSPConnection.cpp
@@ -0,0 +1,549 @@
+/*
+ * Copyright (C) 2010 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include "ARTSPConnection.h"
+
+#include <media/stagefright/foundation/ABuffer.h>
+#include <media/stagefright/foundation/ADebug.h>
+#include <media/stagefright/foundation/AMessage.h>
+
+#include <arpa/inet.h>
+#include <fcntl.h>
+#include <netdb.h>
+#include <sys/socket.h>
+
+namespace android {
+
+// static
+const int64_t ARTSPConnection::kSelectTimeoutUs = 1000ll;
+
+ARTSPConnection::ARTSPConnection()
+    : mState(DISCONNECTED),
+      mSocket(-1),
+      mConnectionID(0),
+      mNextCSeq(0),
+      mReceiveResponseEventPending(false) {
+}
+
+ARTSPConnection::~ARTSPConnection() {
+    if (mSocket >= 0) {
+        LOG(ERROR) << "Connection is still open, closing the socket.";
+        close(mSocket);
+        mSocket = -1;
+    }
+}
+
+void ARTSPConnection::connect(const char *url, const sp<AMessage> &reply) {
+    sp<AMessage> msg = new AMessage(kWhatConnect, id());
+    msg->setString("url", url);
+    msg->setMessage("reply", reply);
+    msg->post();
+}
+
+void ARTSPConnection::disconnect(const sp<AMessage> &reply) {
+    sp<AMessage> msg = new AMessage(kWhatDisconnect, id());
+    msg->setMessage("reply", reply);
+    msg->post();
+}
+
+void ARTSPConnection::sendRequest(
+        const char *request, const sp<AMessage> &reply) {
+    sp<AMessage> msg = new AMessage(kWhatSendRequest, id());
+    msg->setString("request", request);
+    msg->setMessage("reply", reply);
+    msg->post();
+}
+
+void ARTSPConnection::onMessageReceived(const sp<AMessage> &msg) {
+    switch (msg->what()) {
+        case kWhatConnect:
+            onConnect(msg);
+            break;
+
+        case kWhatDisconnect:
+            onDisconnect(msg);
+            break;
+
+        case kWhatCompleteConnection:
+            onCompleteConnection(msg);
+            break;
+
+        case kWhatSendRequest:
+            onSendRequest(msg);
+            break;
+
+        case kWhatReceiveResponse:
+            onReceiveResponse();
+            break;
+
+        default:
+            TRESPASS();
+            break;
+    }
+}
+
+// static
+bool ARTSPConnection::ParseURL(
+        const char *url, AString *host, unsigned *port, AString *path) {
+    host->clear();
+    *port = 0;
+    path->clear();
+
+    if (strncasecmp("rtsp://", url, 7)) {
+        return false;
+    }
+
+    const char *slashPos = strchr(&url[7], '/');
+
+    if (slashPos == NULL) {
+        host->setTo(&url[7]);
+        path->setTo("/");
+    } else {
+        host->setTo(&url[7], slashPos - &url[7]);
+        path->setTo(slashPos);
+    }
+
+    char *colonPos = strchr(host->c_str(), ':');
+
+    if (colonPos != NULL) {
+        unsigned long x;
+        if (!ParseSingleUnsignedLong(colonPos + 1, &x) || x >= 65536) {
+            return false;
+        }
+
+        *port = x;
+
+        size_t colonOffset = colonPos - host->c_str();
+        size_t trailing = host->size() - colonOffset;
+        host->erase(colonOffset, trailing);
+    } else {
+        *port = 554;
+    }
+
+    return true;
+}
+
+void ARTSPConnection::onConnect(const sp<AMessage> &msg) {
+    ++mConnectionID;
+
+    if (mState != DISCONNECTED) {
+        close(mSocket);
+        mSocket = -1;
+
+        flushPendingRequests();
+    }
+
+    mState = CONNECTING;
+
+    mSocket = socket(AF_INET, SOCK_STREAM, 0);
+
+    // Make socket non-blocking.
+    int flags = fcntl(mSocket, F_GETFL, 0);
+    CHECK_NE(flags, -1);
+    CHECK_NE(fcntl(mSocket, F_SETFL, flags | O_NONBLOCK), -1);
+
+    AString url;
+    CHECK(msg->findString("url", &url));
+
+    AString host, path;
+    unsigned port;
+    CHECK(ParseURL(url.c_str(), &host, &port, &path));
+
+    struct hostent *ent = gethostbyname(host.c_str());
+    CHECK(ent != NULL);
+
+    struct sockaddr_in remote;
+    memset(remote.sin_zero, 0, sizeof(remote.sin_zero));
+    remote.sin_family = AF_INET;
+    remote.sin_addr.s_addr = *(in_addr_t *)ent->h_addr;
+    remote.sin_port = htons(port);
+
+    int err = ::connect(
+            mSocket, (const struct sockaddr *)&remote, sizeof(remote));
+
+    sp<AMessage> reply;
+    CHECK(msg->findMessage("reply", &reply));
+
+    reply->setInt32("server-ip", ntohl(remote.sin_addr.s_addr));
+
+    if (err < 0) {
+        if (errno == EINPROGRESS) {
+            sp<AMessage> msg = new AMessage(kWhatCompleteConnection, id());
+            msg->setMessage("reply", reply);
+            msg->setInt32("connection-id", mConnectionID);
+            msg->post();
+            return;
+        }
+
+        reply->setInt32("result", -errno);
+        mState = DISCONNECTED;
+
+        close(mSocket);
+        mSocket = -1;
+    } else {
+        reply->setInt32("result", OK);
+        mState = CONNECTED;
+        mNextCSeq = 1;
+
+        postReceiveReponseEvent();
+    }
+
+    reply->post();
+}
+
+void ARTSPConnection::onDisconnect(const sp<AMessage> &msg) {
+    if (mState == CONNECTED || mState == CONNECTING) {
+        close(mSocket);
+        mSocket = -1;
+
+        flushPendingRequests();
+    } 
+
+    sp<AMessage> reply;
+    CHECK(msg->findMessage("reply", &reply));
+
+    reply->setInt32("result", OK);
+    mState = DISCONNECTED;
+
+    reply->post();
+}
+
+void ARTSPConnection::onCompleteConnection(const sp<AMessage> &msg) {
+    sp<AMessage> reply;
+    CHECK(msg->findMessage("reply", &reply));
+
+    int32_t connectionID;
+    CHECK(msg->findInt32("connection-id", &connectionID));
+
+    if ((connectionID != mConnectionID) || mState != CONNECTING) {
+        // While we were attempting to connect, the attempt was
+        // cancelled.
+        reply->setInt32("result", -ECONNABORTED);
+        reply->post();
+        return;
+    }
+
+    struct timeval tv;
+    tv.tv_sec = 0;
+    tv.tv_usec = kSelectTimeoutUs;
+
+    fd_set ws;
+    FD_ZERO(&ws);
+    FD_SET(mSocket, &ws);
+
+    int res = select(mSocket + 1, NULL, &ws, NULL, &tv);
+    CHECK_GE(res, 0);
+
+    if (res == 0) {
+        // Timed out. Not yet connected.
+
+        msg->post();
+        return;
+    }
+
+    int err;
+    socklen_t optionLen = sizeof(err);
+    CHECK_EQ(getsockopt(mSocket, SOL_SOCKET, SO_ERROR, &err, &optionLen), 0);
+    CHECK_EQ(optionLen, (socklen_t)sizeof(err));
+
+    if (err != 0) {
+        LOG(ERROR) << "err = " << err << " (" << strerror(err) << ")";
+
+        reply->setInt32("result", -err);
+
+        mState = DISCONNECTED;
+        close(mSocket);
+        mSocket = -1;
+    } else {
+        reply->setInt32("result", OK);
+        mState = CONNECTED;
+        mNextCSeq = 1;
+
+        postReceiveReponseEvent();
+    }
+
+    reply->post();
+}
+
+void ARTSPConnection::onSendRequest(const sp<AMessage> &msg) {
+    sp<AMessage> reply;
+    CHECK(msg->findMessage("reply", &reply));
+
+    if (mState != CONNECTED) {
+        reply->setInt32("result", -ENOTCONN);
+        reply->post();
+        return;
+    }
+
+    AString request;
+    CHECK(msg->findString("request", &request));
+
+    // Find the boundary between headers and the body.
+    ssize_t i = request.find("\r\n\r\n");
+    CHECK_GE(i, 0);
+
+    int32_t cseq = mNextCSeq++;
+
+    AString cseqHeader = "CSeq: ";
+    cseqHeader.append(cseq);
+    cseqHeader.append("\r\n");
+
+    request.insert(cseqHeader, i + 2);
+
+    LOG(VERBOSE) << request;
+
+    size_t numBytesSent = 0;
+    while (numBytesSent < request.size()) {
+        ssize_t n =
+            send(mSocket, request.c_str() + numBytesSent,
+                 request.size() - numBytesSent, 0);
+
+        if (n == 0) {
+            // Server closed the connection.
+            TRESPASS();
+        } else if (n < 0) {
+            if (errno == EINTR) {
+                continue;
+            }
+
+            TRESPASS();
+        }
+
+        numBytesSent += (size_t)n;
+    }
+
+    mPendingRequests.add(cseq, reply);
+}
+
+void ARTSPConnection::onReceiveResponse() {
+    mReceiveResponseEventPending = false;
+
+    if (mState != CONNECTED) {
+        return;
+    }
+
+    struct timeval tv;
+    tv.tv_sec = 0;
+    tv.tv_usec = kSelectTimeoutUs;
+
+    fd_set rs;
+    FD_ZERO(&rs);
+    FD_SET(mSocket, &rs);
+
+    int res = select(mSocket + 1, &rs, NULL, NULL, &tv);
+    CHECK_GE(res, 0);
+
+    if (res == 1) {
+        if (!receiveRTSPReponse()) {
+            // Something horrible, irreparable has happened.
+            flushPendingRequests();
+            return;
+        }
+    }
+
+    postReceiveReponseEvent();
+}
+
+void ARTSPConnection::flushPendingRequests() {
+    for (size_t i = 0; i < mPendingRequests.size(); ++i) {
+        sp<AMessage> reply = mPendingRequests.valueAt(i);
+
+        reply->setInt32("result", -ECONNABORTED);
+        reply->post();
+    }
+
+    mPendingRequests.clear();
+}
+
+void ARTSPConnection::postReceiveReponseEvent() {
+    if (mReceiveResponseEventPending) {
+        return;
+    }
+
+    sp<AMessage> msg = new AMessage(kWhatReceiveResponse, id());
+    msg->post();
+
+    mReceiveResponseEventPending = true;
+}
+
+bool ARTSPConnection::receiveLine(AString *line) {
+    line->clear();
+
+    bool sawCR = false;
+    for (;;) {
+        char c;
+        ssize_t n = recv(mSocket, &c, 1, 0);
+        if (n == 0) {
+            // Server closed the connection.
+            return false;
+        } else if (n < 0) {
+            if (errno == EINTR) {
+                continue;
+            }
+
+            TRESPASS();
+        }
+
+        if (sawCR && c == '\n') {
+            line->erase(line->size() - 1, 1);
+            return true;
+        }
+
+        line->append(&c, 1);
+
+        sawCR = (c == '\r');
+    }
+}
+
+bool ARTSPConnection::receiveRTSPReponse() {
+    sp<ARTSPResponse> response = new ARTSPResponse;
+
+    if (!receiveLine(&response->mStatusLine)) {
+        return false;
+    }
+
+    LOG(INFO) << "status: " << response->mStatusLine;
+
+    ssize_t space1 = response->mStatusLine.find(" ");
+    if (space1 < 0) {
+        return false;
+    }
+    ssize_t space2 = response->mStatusLine.find(" ", space1 + 1);
+    if (space2 < 0) {
+        return false;
+    }
+
+    AString statusCodeStr(
+            response->mStatusLine, space1 + 1, space2 - space1 - 1);
+
+    if (!ParseSingleUnsignedLong(
+                statusCodeStr.c_str(), &response->mStatusCode)
+            || response->mStatusCode < 100 || response->mStatusCode > 999) {
+        return false;
+    }
+
+    AString line;
+    for (;;) {
+        if (!receiveLine(&line)) {
+            break;
+        }
+
+        if (line.empty()) {
+            break;
+        }
+
+        LOG(VERBOSE) << "line: " << line;
+
+        ssize_t colonPos = line.find(":");
+        if (colonPos < 0) {
+            // Malformed header line.
+            return false;
+        }
+
+        AString key(line, 0, colonPos);
+        key.trim();
+        key.tolower();
+
+        line.erase(0, colonPos + 1);
+        line.trim();
+
+        response->mHeaders.add(key, line);
+    }
+
+    unsigned long contentLength = 0;
+
+    ssize_t i = response->mHeaders.indexOfKey("content-length");
+
+    if (i >= 0) {
+        AString value = response->mHeaders.valueAt(i);
+        if (!ParseSingleUnsignedLong(value.c_str(), &contentLength)) {
+            return false;
+        }
+    }
+
+    if (contentLength > 0) {
+        response->mContent = new ABuffer(contentLength);
+
+        size_t numBytesRead = 0;
+        while (numBytesRead < contentLength) {
+            ssize_t n = recv(
+                    mSocket, response->mContent->data() + numBytesRead,
+                    contentLength - numBytesRead, 0);
+
+            if (n == 0) {
+                // Server closed the connection.
+                TRESPASS();
+            } else if (n < 0) {
+                if (errno == EINTR) {
+                    continue;
+                }
+
+                TRESPASS();
+            }
+
+            numBytesRead += (size_t)n;
+        }
+    }
+
+    return notifyResponseListener(response);
+}
+
+// static
+bool ARTSPConnection::ParseSingleUnsignedLong(
+        const char *from, unsigned long *x) {
+    char *end;
+    *x = strtoul(from, &end, 10);
+
+    if (end == from || *end != '\0') {
+        return false;
+    }
+
+    return true;
+}
+
+bool ARTSPConnection::notifyResponseListener(
+        const sp<ARTSPResponse> &response) {
+    ssize_t i = response->mHeaders.indexOfKey("cseq");
+
+    if (i < 0) {
+        return true;
+    }
+
+    AString value = response->mHeaders.valueAt(i);
+
+    unsigned long cseq;
+    if (!ParseSingleUnsignedLong(value.c_str(), &cseq)) {
+        return false;
+    }
+
+    i = mPendingRequests.indexOfKey(cseq);
+
+    if (i < 0) {
+        // Unsolicited response?
+        TRESPASS();
+    }
+
+    sp<AMessage> reply = mPendingRequests.valueAt(i);
+    mPendingRequests.removeItemsAt(i);
+
+    reply->setInt32("result", OK);
+    reply->setObject("response", response);
+    reply->post();
+
+    return true;
+}
+
+}  // namespace android
diff --git a/media/libstagefright/rtsp/ARTSPConnection.h b/media/libstagefright/rtsp/ARTSPConnection.h
new file mode 100644
index 0000000..3577a2f
--- /dev/null
+++ b/media/libstagefright/rtsp/ARTSPConnection.h
@@ -0,0 +1,97 @@
+/*
+ * Copyright (C) 2010 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef A_RTSP_CONNECTION_H_
+
+#define A_RTSP_CONNECTION_H_
+
+#include <media/stagefright/foundation/AHandler.h>
+#include <media/stagefright/foundation/AString.h>
+
+namespace android {
+
+struct ABuffer;
+
+struct ARTSPResponse : public RefBase {
+    unsigned long mStatusCode;
+    AString mStatusLine;
+    KeyedVector<AString,AString> mHeaders;
+    sp<ABuffer> mContent;
+};
+
+struct ARTSPConnection : public AHandler {
+    ARTSPConnection();
+
+    void connect(const char *url, const sp<AMessage> &reply);
+    void disconnect(const sp<AMessage> &reply);
+
+    void sendRequest(const char *request, const sp<AMessage> &reply);
+
+protected:
+    virtual ~ARTSPConnection();
+    virtual void onMessageReceived(const sp<AMessage> &msg);
+
+private:
+    enum State {
+        DISCONNECTED,
+        CONNECTING,
+        CONNECTED,
+    };
+
+    enum {
+        kWhatConnect            = 'conn',
+        kWhatDisconnect         = 'disc',
+        kWhatCompleteConnection = 'comc',
+        kWhatSendRequest        = 'sreq',
+        kWhatReceiveResponse    = 'rres',
+    };
+
+    static const int64_t kSelectTimeoutUs;
+
+    State mState;
+    int mSocket;
+    int32_t mConnectionID;
+    int32_t mNextCSeq;
+    bool mReceiveResponseEventPending;
+
+    KeyedVector<int32_t, sp<AMessage> > mPendingRequests;
+
+    void onConnect(const sp<AMessage> &msg);
+    void onDisconnect(const sp<AMessage> &msg);
+    void onCompleteConnection(const sp<AMessage> &msg);
+    void onSendRequest(const sp<AMessage> &msg);
+    void onReceiveResponse();
+
+    void flushPendingRequests();
+    void postReceiveReponseEvent();
+
+    // Return false iff something went unrecoverably wrong.
+    bool receiveRTSPReponse();
+    bool receiveLine(AString *line);
+    bool notifyResponseListener(const sp<ARTSPResponse> &response);
+
+    static bool ParseURL(
+            const char *url, AString *host, unsigned *port, AString *path);
+
+    static bool ParseSingleUnsignedLong(
+            const char *from, unsigned long *x);
+
+    DISALLOW_EVIL_CONSTRUCTORS(ARTSPConnection);
+};
+
+}  // namespace android
+
+#endif  // A_RTSP_CONNECTION_H_
diff --git a/media/libstagefright/rtsp/ARTSPController.cpp b/media/libstagefright/rtsp/ARTSPController.cpp
new file mode 100644
index 0000000..7b87d42
--- /dev/null
+++ b/media/libstagefright/rtsp/ARTSPController.cpp
@@ -0,0 +1,75 @@
+/*
+ * Copyright (C) 2010 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include "ARTSPController.h"
+
+#include "MyHandler.h"
+
+#include <media/stagefright/foundation/ADebug.h>
+#include <media/stagefright/MediaErrors.h>
+#include <media/stagefright/MediaSource.h>
+#include <media/stagefright/MetaData.h>
+
+namespace android {
+
+ARTSPController::ARTSPController(const sp<ALooper> &looper)
+    : mLooper(looper) {
+}
+
+ARTSPController::~ARTSPController() {
+}
+
+status_t ARTSPController::connect(const char *url) {
+    if (mHandler != NULL) {
+        return ERROR_ALREADY_CONNECTED;
+    }
+
+    mHandler = new MyHandler(url, mLooper);
+    sleep(10);
+
+    return OK;
+}
+
+void ARTSPController::disconnect() {
+    if (mHandler == NULL) {
+        return;
+    }
+
+    mHandler.clear();
+}
+
+size_t ARTSPController::countTracks() {
+    if (mHandler == NULL) {
+        return 0;
+    }
+
+    return mHandler->countTracks();
+}
+
+sp<MediaSource> ARTSPController::getTrack(size_t index) {
+    CHECK(mHandler != NULL);
+
+    return mHandler->getPacketSource(index);
+}
+
+sp<MetaData> ARTSPController::getTrackMetaData(
+        size_t index, uint32_t flags) {
+    CHECK(mHandler != NULL);
+
+    return mHandler->getPacketSource(index)->getFormat();
+}
+
+}  // namespace android
diff --git a/media/libstagefright/rtsp/ASessionDescription.cpp b/media/libstagefright/rtsp/ASessionDescription.cpp
new file mode 100644
index 0000000..ca4c55e
--- /dev/null
+++ b/media/libstagefright/rtsp/ASessionDescription.cpp
@@ -0,0 +1,270 @@
+/*
+ * Copyright (C) 2010 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include "ASessionDescription.h"
+
+#include <media/stagefright/foundation/ADebug.h>
+#include <media/stagefright/foundation/AString.h>
+
+#include <stdlib.h>
+
+namespace android {
+
+ASessionDescription::ASessionDescription()
+    : mIsValid(false) {
+}
+
+ASessionDescription::~ASessionDescription() {
+}
+
+bool ASessionDescription::setTo(const void *data, size_t size) {
+    mIsValid = parse(data, size);
+
+    if (!mIsValid) {
+        mTracks.clear();
+        mFormats.clear();
+    }
+
+    return mIsValid;
+}
+
+bool ASessionDescription::parse(const void *data, size_t size) {
+    mTracks.clear();
+    mFormats.clear();
+
+    mTracks.push(Attribs());
+    mFormats.push(AString("[root]"));
+
+    AString desc((const char *)data, size);
+    LOG(VERBOSE) << desc;
+
+    size_t i = 0;
+    for (;;) {
+        ssize_t eolPos = desc.find("\r\n", i);
+        if (eolPos < 0) {
+            break;
+        }
+
+        AString line(desc, i, eolPos - i);
+
+        if (line.size() < 2 || line.c_str()[1] != '=') {
+            return false;
+        }
+
+        switch (line.c_str()[0]) {
+            case 'v':
+            {
+                if (strcmp(line.c_str(), "v=0")) {
+                    return false;
+                }
+                break;
+            }
+
+            case 'a':
+            case 'b':
+            {
+                AString key, value;
+
+                ssize_t colonPos = line.find(":", 2);
+                if (colonPos < 0) {
+                    key = line;
+                } else {
+                    key.setTo(line, 0, colonPos);
+
+                    if (key == "a=fmtp" || key == "a=rtpmap"
+                            || key == "a=framesize") {
+                        ssize_t spacePos = line.find(" ", colonPos + 1);
+                        if (spacePos < 0) {
+                            return false;
+                        }
+
+                        key.setTo(line, 0, spacePos);
+
+                        colonPos = spacePos;
+                    }
+
+                    value.setTo(line, colonPos + 1, line.size() - colonPos - 1);
+                }
+
+                key.trim();
+                value.trim();
+
+                LOG(VERBOSE) << "adding '" << key << "' => '" << value << "'";
+
+                mTracks.editItemAt(mTracks.size() - 1).add(key, value);
+                break;
+            }
+
+            case 'm':
+            {
+                LOG(VERBOSE) << "new section '" << AString(line, 2, line.size() - 2) << "'";
+
+                mTracks.push(Attribs());
+                mFormats.push(AString(line, 2, line.size() - 2));
+                break;
+            }
+        }
+
+        i = eolPos + 2;
+    }
+
+    return true;
+}
+
+bool ASessionDescription::isValid() const {
+    return mIsValid;
+}
+
+size_t ASessionDescription::countTracks() const {
+    return mTracks.size();
+}
+
+void ASessionDescription::getFormat(size_t index, AString *value) const {
+    CHECK_GE(index, 0u);
+    CHECK_LT(index, mTracks.size());
+
+    *value = mFormats.itemAt(index);
+}
+
+bool ASessionDescription::findAttribute(
+        size_t index, const char *key, AString *value) const {
+    CHECK_GE(index, 0u);
+    CHECK_LT(index, mTracks.size());
+
+    value->clear();
+
+    const Attribs &track = mTracks.itemAt(index);
+    ssize_t i = track.indexOfKey(AString(key));
+
+    if (i < 0) {
+        return false;
+    }
+
+    *value = track.valueAt(i);
+
+    return true;
+}
+
+void ASessionDescription::getFormatType(
+        size_t index, unsigned long *PT,
+        AString *desc, AString *params) const {
+    AString format;
+    getFormat(index, &format);
+
+    char *lastSpacePos = strrchr(format.c_str(), ' ');
+    CHECK(lastSpacePos != NULL);
+
+    char *end;
+    unsigned long x = strtoul(lastSpacePos + 1, &end, 10);
+    CHECK_GT(end, lastSpacePos + 1);
+    CHECK_EQ(*end, '\0');
+
+    *PT = x;
+
+    char key[20];
+    sprintf(key, "a=rtpmap:%lu", x);
+
+    CHECK(findAttribute(index, key, desc));
+
+    sprintf(key, "a=fmtp:%lu", x);
+    if (!findAttribute(index, key, params)) {
+        params->clear();
+    }
+}
+
+void ASessionDescription::getDimensions(
+        size_t index, unsigned long PT,
+        int32_t *width, int32_t *height) const {
+    char key[20];
+    sprintf(key, "a=framesize:%lu", PT);
+    AString value;
+    CHECK(findAttribute(index, key, &value));
+
+    const char *s = value.c_str();
+    char *end;
+    *width = strtoul(s, &end, 10);
+    CHECK_GT(end, s);
+    CHECK_EQ(*end, '-');
+
+    s = end + 1;
+    *height = strtoul(s, &end, 10);
+    CHECK_GT(end, s);
+    CHECK_EQ(*end, '\0');
+}
+
+bool ASessionDescription::getDurationUs(int64_t *durationUs) const {
+    *durationUs = 0;
+
+    CHECK(mIsValid);
+
+    AString value;
+    if (!findAttribute(0, "a=range", &value)) {
+        return false;
+    }
+
+    if (value == "npt=now-") {
+        return false;
+    }
+
+    if (strncmp(value.c_str(), "npt=", 4)) {
+        return false;
+    }
+
+    const char *s = value.c_str() + 4;
+    char *end;
+    double from = strtod(s, &end);
+    CHECK_GT(end, s);
+    CHECK_EQ(*end, '-');
+
+    s = end + 1;
+    double to = strtod(s, &end);
+    CHECK_GT(end, s);
+    CHECK_EQ(*end, '\0');
+
+    CHECK_GE(to, from);
+
+    *durationUs = (int64_t)((to - from) * 1E6);
+
+    return true;
+}
+
+// static
+void ASessionDescription::ParseFormatDesc(
+        const char *desc, int32_t *timescale, int32_t *numChannels) {
+    const char *slash1 = strchr(desc, '/');
+    CHECK(slash1 != NULL);
+
+    const char *s = slash1 + 1;
+    char *end;
+    unsigned long x = strtoul(s, &end, 10);
+    CHECK_GT(end, s);
+    CHECK(*end == '\0' || *end == '/');
+
+    *timescale = x;
+    *numChannels = 1;
+
+    if (*end == '/') {
+        s = end + 1;
+        unsigned long x = strtoul(s, &end, 10);
+        CHECK_GT(end, s);
+        CHECK_EQ(*end, '\0');
+
+        *numChannels = x;
+    }
+}
+
+}  // namespace android
+
diff --git a/media/libstagefright/rtsp/ASessionDescription.h b/media/libstagefright/rtsp/ASessionDescription.h
new file mode 100644
index 0000000..b26980f
--- /dev/null
+++ b/media/libstagefright/rtsp/ASessionDescription.h
@@ -0,0 +1,75 @@
+/*
+ * Copyright (C) 2010 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef A_SESSION_DESCRIPTION_H_
+
+#define A_SESSION_DESCRIPTION_H_
+
+#include <sys/types.h>
+
+#include <media/stagefright/foundation/ABase.h>
+#include <utils/KeyedVector.h>
+#include <utils/RefBase.h>
+#include <utils/Vector.h>
+
+namespace android {
+
+struct AString;
+
+struct ASessionDescription : public RefBase {
+    ASessionDescription();
+
+    bool setTo(const void *data, size_t size);
+    bool isValid() const;
+
+    // Actually, 1 + number of tracks, as index 0 is reserved for the
+    // session description root-level attributes.
+    size_t countTracks() const;
+    void getFormat(size_t index, AString *value) const;
+
+    void getFormatType(
+            size_t index, unsigned long *PT,
+            AString *desc, AString *params) const;
+
+    void getDimensions(
+            size_t index, unsigned long PT,
+            int32_t *width, int32_t *height) const;
+
+    bool getDurationUs(int64_t *durationUs) const;
+
+    static void ParseFormatDesc(
+            const char *desc, int32_t *timescale, int32_t *numChannels);
+
+    bool findAttribute(size_t index, const char *key, AString *value) const;
+
+protected:
+    virtual ~ASessionDescription();
+
+private:
+    typedef KeyedVector<AString,AString> Attribs;
+
+    bool mIsValid;
+    Vector<Attribs> mTracks;
+    Vector<AString> mFormats;
+
+    bool parse(const void *data, size_t size);
+
+    DISALLOW_EVIL_CONSTRUCTORS(ASessionDescription);
+};
+
+}  // namespace android
+
+#endif  // A_SESSION_DESCRIPTION_H_
diff --git a/media/libstagefright/rtsp/Android.mk b/media/libstagefright/rtsp/Android.mk
new file mode 100644
index 0000000..4608fa0
--- /dev/null
+++ b/media/libstagefright/rtsp/Android.mk
@@ -0,0 +1,28 @@
+LOCAL_PATH:= $(call my-dir)
+
+include $(CLEAR_VARS)
+
+LOCAL_SRC_FILES:=       \
+        ARTSPController.cpp         \
+        AAVCAssembler.cpp           \
+        AMPEG4AudioAssembler.cpp    \
+        APacketSource.cpp           \
+        ARTPAssembler.cpp           \
+        ARTPConnection.cpp          \
+        ARTPSource.cpp              \
+        ARTSPConnection.cpp         \
+        ASessionDescription.cpp     \
+
+LOCAL_C_INCLUDES:= \
+	$(JNI_H_INCLUDE) \
+	$(TOP)/external/opencore/extern_libs_v2/khronos/openmax/include \
+        $(TOP)/frameworks/base/media/libstagefright/include \
+
+LOCAL_MODULE:= libstagefright_rtsp
+
+ifeq ($(TARGET_ARCH),arm)
+    LOCAL_CFLAGS += -Wno-psabi
+endif
+
+include $(BUILD_STATIC_LIBRARY)
+
diff --git a/media/libstagefright/rtsp/MyHandler.h b/media/libstagefright/rtsp/MyHandler.h
new file mode 100644
index 0000000..74bb798
--- /dev/null
+++ b/media/libstagefright/rtsp/MyHandler.h
@@ -0,0 +1,442 @@
+/*
+ * Copyright (C) 2010 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef MY_HANDLER_H_
+
+#define MY_HANDLER_H_
+
+#include "APacketSource.h"
+#include "ARTPConnection.h"
+#include "ARTSPConnection.h"
+#include "ASessionDescription.h"
+
+#include <media/stagefright/foundation/ABuffer.h>
+#include <media/stagefright/foundation/ADebug.h>
+#include <media/stagefright/foundation/ALooper.h>
+#include <media/stagefright/foundation/AMessage.h>
+#include <media/stagefright/MediaErrors.h>
+
+namespace android {
+
+struct MyHandler : public AHandler {
+    MyHandler(const char *url, const sp<ALooper> &looper)
+        : mLooper(looper),
+          mConn(new ARTSPConnection),
+          mRTPConn(new ARTPConnection),
+          mSessionURL(url),
+          mSetupTracksSuccessful(false),
+          mFirstAccessUnit(true),
+          mFirstAccessUnitNTP(-1) {
+        mLooper->registerHandler(this);
+        mLooper->registerHandler(mConn);
+        mLooper->registerHandler(mRTPConn);
+        sp<AMessage> reply = new AMessage('conn', id());
+        mConn->connect(mSessionURL.c_str(), reply);
+    }
+
+    virtual void onMessageReceived(const sp<AMessage> &msg) {
+        switch (msg->what()) {
+            case 'conn':
+            {
+                int32_t result;
+                CHECK(msg->findInt32("result", &result));
+
+                LOG(INFO) << "connection request completed with result "
+                     << result << " (" << strerror(-result) << ")";
+
+                if (result == OK) {
+                    AString request;
+                    request = "DESCRIBE ";
+                    request.append(mSessionURL);
+                    request.append(" RTSP/1.0\r\n");
+                    request.append("Accept: application/sdp\r\n");
+                    request.append("\r\n");
+
+                    sp<AMessage> reply = new AMessage('desc', id());
+                    mConn->sendRequest(request.c_str(), reply);
+                }
+                break;
+            }
+
+            case 'disc':
+            {
+                LOG(INFO) << "disconnect completed";
+
+                (new AMessage('quit', id()))->post();
+                break;
+            }
+
+            case 'desc':
+            {
+                int32_t result;
+                CHECK(msg->findInt32("result", &result));
+
+                LOG(INFO) << "DESCRIBE completed with result "
+                     << result << " (" << strerror(-result) << ")";
+
+                if (result == OK) {
+                    sp<RefBase> obj;
+                    CHECK(msg->findObject("response", &obj));
+                    sp<ARTSPResponse> response =
+                        static_cast<ARTSPResponse *>(obj.get());
+
+                    if (response->mStatusCode == 302) {
+                        ssize_t i = response->mHeaders.indexOfKey("location");
+                        CHECK_GE(i, 0);
+
+                        mSessionURL = response->mHeaders.valueAt(i);
+
+                        AString request;
+                        request = "DESCRIBE ";
+                        request.append(mSessionURL);
+                        request.append(" RTSP/1.0\r\n");
+                        request.append("Accept: application/sdp\r\n");
+                        request.append("\r\n");
+
+                        sp<AMessage> reply = new AMessage('desc', id());
+                        mConn->sendRequest(request.c_str(), reply);
+                        break;
+                    }
+
+                    CHECK_EQ(response->mStatusCode, 200u);
+
+                    mSessionDesc = new ASessionDescription;
+
+                    mSessionDesc->setTo(
+                            response->mContent->data(),
+                            response->mContent->size());
+
+                    CHECK(mSessionDesc->isValid());
+
+                    ssize_t i = response->mHeaders.indexOfKey("content-base");
+                    if (i >= 0) {
+                        mBaseURL = response->mHeaders.valueAt(i);
+                    } else {
+                        i = response->mHeaders.indexOfKey("content-location");
+                        if (i >= 0) {
+                            mBaseURL = response->mHeaders.valueAt(i);
+                        } else {
+                            mBaseURL = mSessionURL;
+                        }
+                    }
+
+                    CHECK_GT(mSessionDesc->countTracks(), 1u);
+                    setupTrack(1);
+                } else {
+                    sp<AMessage> reply = new AMessage('disc', id());
+                    mConn->disconnect(reply);
+                }
+                break;
+            }
+
+            case 'setu':
+            {
+                size_t index;
+                CHECK(msg->findSize("index", &index));
+
+                size_t trackIndex;
+                CHECK(msg->findSize("track-index", &trackIndex));
+
+                int32_t result;
+                CHECK(msg->findInt32("result", &result));
+
+                LOG(INFO) << "SETUP(" << index << ") completed with result "
+                     << result << " (" << strerror(-result) << ")";
+
+                TrackInfo *track = &mTracks.editItemAt(trackIndex);
+
+                if (result == OK) {
+                    sp<RefBase> obj;
+                    CHECK(msg->findObject("response", &obj));
+                    sp<ARTSPResponse> response =
+                        static_cast<ARTSPResponse *>(obj.get());
+
+                    CHECK_EQ(response->mStatusCode, 200u);
+
+                    ssize_t i = response->mHeaders.indexOfKey("session");
+                    CHECK_GE(i, 0);
+
+                    if (index == 1) {
+                        mSessionID = response->mHeaders.valueAt(i);
+                        i = mSessionID.find(";");
+                        if (i >= 0) {
+                            // Remove options, i.e. ";timeout=90"
+                            mSessionID.erase(i, mSessionID.size() - i);
+                        }
+                    }
+
+                    sp<AMessage> notify = new AMessage('accu', id());
+                    notify->setSize("track-index", trackIndex);
+
+                    mRTPConn->addStream(
+                            track->mRTPSocket, track->mRTCPSocket,
+                            mSessionDesc, index,
+                            notify);
+
+                    track->mPacketSource =
+                        new APacketSource(mSessionDesc, index);
+
+                    mSetupTracksSuccessful = true;
+
+                    ++index;
+                    if (index < mSessionDesc->countTracks()) {
+                        setupTrack(index);
+                        break;
+                    }
+                } else {
+                    close(track->mRTPSocket);
+                    close(track->mRTCPSocket);
+
+                    mTracks.removeItemsAt(mTracks.size() - 1);
+                }
+
+                if (mSetupTracksSuccessful) {
+                    AString request = "PLAY ";
+                    request.append(mSessionURL);
+                    request.append(" RTSP/1.0\r\n");
+
+                    request.append("Session: ");
+                    request.append(mSessionID);
+                    request.append("\r\n");
+
+                    request.append("\r\n");
+
+                    sp<AMessage> reply = new AMessage('play', id());
+                    mConn->sendRequest(request.c_str(), reply);
+                } else {
+                    sp<AMessage> reply = new AMessage('disc', id());
+                    mConn->disconnect(reply);
+                }
+                break;
+            }
+
+            case 'play':
+            {
+                int32_t result;
+                CHECK(msg->findInt32("result", &result));
+
+                LOG(INFO) << "PLAY completed with result "
+                     << result << " (" << strerror(-result) << ")";
+
+                if (result == OK) {
+                    sp<RefBase> obj;
+                    CHECK(msg->findObject("response", &obj));
+                    sp<ARTSPResponse> response =
+                        static_cast<ARTSPResponse *>(obj.get());
+
+                    CHECK_EQ(response->mStatusCode, 200u);
+
+                    sp<AMessage> msg = new AMessage('abor', id());
+                    msg->post(60000000ll);
+                } else {
+                    sp<AMessage> reply = new AMessage('disc', id());
+                    mConn->disconnect(reply);
+                }
+
+                break;
+            }
+
+            case 'abor':
+            {
+                for (size_t i = 0; i < mTracks.size(); ++i) {
+                    mTracks.editItemAt(i).mPacketSource->signalEOS(
+                            ERROR_END_OF_STREAM);
+                }
+
+                sp<AMessage> reply = new AMessage('tear', id());
+
+                AString request;
+                request = "TEARDOWN ";
+
+                // XXX should use aggregate url from SDP here...
+                request.append(mSessionURL);
+                request.append(" RTSP/1.0\r\n");
+
+                request.append("Session: ");
+                request.append(mSessionID);
+                request.append("\r\n");
+
+                request.append("\r\n");
+
+                mConn->sendRequest(request.c_str(), reply);
+                break;
+            }
+
+            case 'tear':
+            {
+                int32_t result;
+                CHECK(msg->findInt32("result", &result));
+
+                LOG(INFO) << "TEARDOWN completed with result "
+                     << result << " (" << strerror(-result) << ")";
+
+                sp<AMessage> reply = new AMessage('disc', id());
+                mConn->disconnect(reply);
+                break;
+            }
+
+            case 'quit':
+            {
+                mLooper->stop();
+                break;
+            }
+
+            case 'accu':
+            {
+                size_t trackIndex;
+                CHECK(msg->findSize("track-index", &trackIndex));
+
+                sp<RefBase> obj;
+                CHECK(msg->findObject("access-unit", &obj));
+
+                sp<ABuffer> accessUnit = static_cast<ABuffer *>(obj.get());
+
+                uint64_t ntpTime;
+                CHECK(accessUnit->meta()->findInt64(
+                            "ntp-time", (int64_t *)&ntpTime));
+
+                if (mFirstAccessUnit) {
+                    mFirstAccessUnit = false;
+                    mFirstAccessUnitNTP = ntpTime;
+                }
+                if (ntpTime > mFirstAccessUnitNTP) {
+                    ntpTime -= mFirstAccessUnitNTP;
+                } else {
+                    ntpTime = 0;
+                }
+
+                accessUnit->meta()->setInt64("ntp-time", ntpTime);
+
+                TrackInfo *track = &mTracks.editItemAt(trackIndex);
+                track->mPacketSource->queueAccessUnit(accessUnit);
+                break;
+            }
+
+            default:
+                TRESPASS();
+                break;
+        }
+    }
+
+    sp<APacketSource> getPacketSource(size_t index) {
+        CHECK_GE(index, 0u);
+        CHECK_LT(index, mTracks.size());
+
+        return mTracks.editItemAt(index).mPacketSource;
+    }
+
+    size_t countTracks() const {
+        return mTracks.size();
+    }
+
+private:
+    sp<ALooper> mLooper;
+    sp<ARTSPConnection> mConn;
+    sp<ARTPConnection> mRTPConn;
+    sp<ASessionDescription> mSessionDesc;
+    AString mSessionURL;
+    AString mBaseURL;
+    AString mSessionID;
+    bool mSetupTracksSuccessful;
+    bool mFirstAccessUnit;
+    uint64_t mFirstAccessUnitNTP;
+
+    struct TrackInfo {
+        int mRTPSocket;
+        int mRTCPSocket;
+
+        sp<APacketSource> mPacketSource;
+    };
+    Vector<TrackInfo> mTracks;
+
+    void setupTrack(size_t index) {
+        AString url;
+        CHECK(mSessionDesc->findAttribute(index, "a=control", &url));
+
+        AString trackURL;
+        CHECK(MakeURL(mBaseURL.c_str(), url.c_str(), &trackURL));
+
+        mTracks.push(TrackInfo());
+        TrackInfo *info = &mTracks.editItemAt(mTracks.size() - 1);
+
+        unsigned rtpPort;
+        ARTPConnection::MakePortPair(
+                &info->mRTPSocket, &info->mRTCPSocket, &rtpPort);
+
+        AString request = "SETUP ";
+        request.append(trackURL);
+        request.append(" RTSP/1.0\r\n");
+
+        request.append("Transport: RTP/AVP/UDP;unicast;client_port=");
+        request.append(rtpPort);
+        request.append("-");
+        request.append(rtpPort + 1);
+        request.append("\r\n");
+
+        if (index > 1) {
+            request.append("Session: ");
+            request.append(mSessionID);
+            request.append("\r\n");
+        }
+
+        request.append("\r\n");
+
+        sp<AMessage> reply = new AMessage('setu', id());
+        reply->setSize("index", index);
+        reply->setSize("track-index", mTracks.size() - 1);
+        mConn->sendRequest(request.c_str(), reply);
+    }
+
+    static bool MakeURL(const char *baseURL, const char *url, AString *out) {
+        out->clear();
+
+        if (strncasecmp("rtsp://", baseURL, 7)) {
+            // Base URL must be absolute
+            return false;
+        }
+
+        if (!strncasecmp("rtsp://", url, 7)) {
+            // "url" is already an absolute URL, ignore base URL.
+            out->setTo(url);
+            return true;
+        }
+
+        size_t n = strlen(baseURL);
+        if (baseURL[n - 1] == '/') {
+            out->setTo(baseURL);
+            out->append(url);
+        } else {
+            char *slashPos = strrchr(baseURL, '/');
+
+            if (slashPos > &baseURL[6]) {
+                out->setTo(baseURL, slashPos - baseURL);
+            } else {
+                out->setTo(baseURL);
+            }
+
+            out->append("/");
+            out->append(url);
+        }
+
+        return true;
+    }
+
+    DISALLOW_EVIL_CONSTRUCTORS(MyHandler);
+};
+
+}  // namespace android
+
+#endif  // MY_HANDLER_H_
diff --git a/media/libstagefright/rtsp/MyTransmitter.h b/media/libstagefright/rtsp/MyTransmitter.h
new file mode 100644
index 0000000..009a3b1
--- /dev/null
+++ b/media/libstagefright/rtsp/MyTransmitter.h
@@ -0,0 +1,981 @@
+/*
+ * Copyright (C) 2010 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef MY_TRANSMITTER_H_
+
+#define MY_TRANSMITTER_H_
+
+#include "ARTPConnection.h"
+
+#include <arpa/inet.h>
+#include <sys/socket.h>
+
+#include <openssl/md5.h>
+
+#include <media/stagefright/foundation/ADebug.h>
+#include <media/stagefright/foundation/base64.h>
+#include <media/stagefright/foundation/hexdump.h>
+
+#ifdef ANDROID
+#include "VideoSource.h"
+
+#include <media/stagefright/OMXClient.h>
+#include <media/stagefright/OMXCodec.h>
+#endif
+
+namespace android {
+
+#define TRACK_SUFFIX    "trackid=1"
+#define PT              96
+#define PT_STR          "96"
+
+#define USERNAME        "bcast"
+#define PASSWORD        "test"
+
+static int uniformRand(int limit) {
+    return ((double)rand() * limit) / RAND_MAX;
+}
+
+static bool GetAttribute(const char *s, const char *key, AString *value) {
+    value->clear();
+
+    size_t keyLen = strlen(key);
+
+    for (;;) {
+        const char *colonPos = strchr(s, ';');
+
+        size_t len =
+            (colonPos == NULL) ? strlen(s) : colonPos - s;
+
+        if (len >= keyLen + 1 && s[keyLen] == '=' && !strncmp(s, key, keyLen)) {
+            value->setTo(&s[keyLen + 1], len - keyLen - 1);
+            return true;
+        }
+
+        if (colonPos == NULL) {
+            return false;
+        }
+
+        s = colonPos + 1;
+    }
+}
+
+struct MyTransmitter : public AHandler {
+    MyTransmitter(const char *url, const sp<ALooper> &looper)
+        : mServerURL(url),
+          mLooper(looper),
+          mConn(new ARTSPConnection),
+          mConnected(false),
+          mAuthType(NONE),
+          mRTPSocket(-1),
+          mRTCPSocket(-1),
+          mSourceID(rand()),
+          mSeqNo(uniformRand(65536)),
+          mRTPTimeBase(rand()),
+          mNumSamplesSent(0),
+          mNumRTPSent(0),
+          mNumRTPOctetsSent(0),
+          mLastRTPTime(0),
+          mLastNTPTime(0) {
+        mStreamURL = mServerURL;
+        mStreamURL.append("/bazong.sdp");
+
+        mTrackURL = mStreamURL;
+        mTrackURL.append("/");
+        mTrackURL.append(TRACK_SUFFIX);
+
+        mLooper->registerHandler(this);
+        mLooper->registerHandler(mConn);
+
+        sp<AMessage> reply = new AMessage('conn', id());
+        mConn->connect(mServerURL.c_str(), reply);
+
+#ifdef ANDROID
+        int width = 640;
+        int height = 480;
+
+        sp<MediaSource> source = new VideoSource(width, height);
+
+        sp<MetaData> encMeta = new MetaData;
+        encMeta->setCString(kKeyMIMEType, MEDIA_MIMETYPE_VIDEO_AVC);
+        encMeta->setInt32(kKeyWidth, width);
+        encMeta->setInt32(kKeyHeight, height);
+
+        OMXClient client;
+        client.connect();
+
+        mEncoder = OMXCodec::Create(
+                client.interface(), encMeta,
+                true /* createEncoder */, source);
+
+        mEncoder->start();
+
+        MediaBuffer *buffer;
+        CHECK_EQ(mEncoder->read(&buffer), (status_t)OK);
+        CHECK(buffer != NULL);
+
+        makeH264SPropParamSets(buffer);
+
+        buffer->release();
+        buffer = NULL;
+#endif
+    }
+
+    uint64_t ntpTime() {
+        struct timeval tv;
+        gettimeofday(&tv, NULL);
+
+        uint64_t nowUs = tv.tv_sec * 1000000ll + tv.tv_usec;
+
+        nowUs += ((70ll * 365 + 17) * 24) * 60 * 60 * 1000000ll;
+
+        uint64_t hi = nowUs / 1000000ll;
+        uint64_t lo = ((1ll << 32) * (nowUs % 1000000ll)) / 1000000ll;
+
+        return (hi << 32) | lo;
+    }
+
+    void issueAnnounce() {
+        AString sdp;
+        sdp = "v=0\r\n";
+
+        sdp.append("o=- ");
+
+        uint64_t ntp = ntpTime();
+        sdp.append(ntp);
+        sdp.append(" ");
+        sdp.append(ntp);
+        sdp.append(" IN IP4 127.0.0.0\r\n");
+
+        sdp.append(
+              "s=Sample\r\n"
+              "i=Playing around with ANNOUNCE\r\n"
+              "c=IN IP4 ");
+
+        struct in_addr addr;
+        addr.s_addr = htonl(mServerIP);
+
+        sdp.append(inet_ntoa(addr));
+
+        sdp.append(
+              "\r\n"
+              "t=0 0\r\n"
+              "a=range:npt=now-\r\n");
+
+#ifdef ANDROID
+        sp<MetaData> meta = mEncoder->getFormat();
+        int32_t width, height;
+        CHECK(meta->findInt32(kKeyWidth, &width));
+        CHECK(meta->findInt32(kKeyHeight, &height));
+
+        sdp.append(
+              "m=video 0 RTP/AVP " PT_STR "\r\n"
+              "b=AS 320000\r\n"
+              "a=rtpmap:" PT_STR " H264/90000\r\n");
+
+        sdp.append("a=cliprect 0,0,");
+        sdp.append(height);
+        sdp.append(",");
+        sdp.append(width);
+        sdp.append("\r\n");
+
+        sdp.append(
+              "a=framesize:" PT_STR " ");
+        sdp.append(width);
+        sdp.append("-");
+        sdp.append(height);
+        sdp.append("\r\n");
+
+        sdp.append(
+              "a=fmtp:" PT_STR " profile-level-id=42C015;sprop-parameter-sets=");
+
+        sdp.append(mSeqParamSet);
+        sdp.append(",");
+        sdp.append(mPicParamSet);
+        sdp.append(";packetization-mode=1\r\n");
+#else
+        sdp.append(
+                "m=audio 0 RTP/AVP " PT_STR "\r\n"
+                "a=rtpmap:" PT_STR " L8/8000/1\r\n");
+#endif
+
+        sdp.append("a=control:" TRACK_SUFFIX "\r\n");
+
+        AString request;
+        request.append("ANNOUNCE ");
+        request.append(mStreamURL);
+        request.append(" RTSP/1.0\r\n");
+
+        addAuthentication(&request, "ANNOUNCE", mStreamURL.c_str());
+
+        request.append("Content-Type: application/sdp\r\n");
+        request.append("Content-Length: ");
+        request.append(sdp.size());
+        request.append("\r\n");
+
+        request.append("\r\n");
+        request.append(sdp);
+
+        sp<AMessage> reply = new AMessage('anno', id());
+        mConn->sendRequest(request.c_str(), reply);
+    }
+
+    void H(const AString &s, AString *out) {
+        out->clear();
+
+        MD5_CTX m;
+        MD5_Init(&m);
+        MD5_Update(&m, s.c_str(), s.size());
+
+        uint8_t key[16];
+        MD5_Final(key, &m);
+
+        for (size_t i = 0; i < 16; ++i) {
+            char nibble = key[i] >> 4;
+            if (nibble <= 9) {
+                nibble += '0';
+            } else {
+                nibble += 'a' - 10;
+            }
+            out->append(&nibble, 1);
+
+            nibble = key[i] & 0x0f;
+            if (nibble <= 9) {
+                nibble += '0';
+            } else {
+                nibble += 'a' - 10;
+            }
+            out->append(&nibble, 1);
+        }
+    }
+
+    void authenticate(const sp<ARTSPResponse> &response) {
+        ssize_t i = response->mHeaders.indexOfKey("www-authenticate");
+        CHECK_GE(i, 0);
+
+        AString value = response->mHeaders.valueAt(i);
+
+        if (!strncmp(value.c_str(), "Basic", 5)) {
+            mAuthType = BASIC;
+        } else {
+            CHECK(!strncmp(value.c_str(), "Digest", 6));
+            mAuthType = DIGEST;
+
+            i = value.find("nonce=");
+            CHECK_GE(i, 0);
+            CHECK_EQ(value.c_str()[i + 6], '\"');
+            ssize_t j = value.find("\"", i + 7);
+            CHECK_GE(j, 0);
+
+            mNonce.setTo(value, i + 7, j - i - 7);
+        }
+
+        issueAnnounce();
+    }
+
+    void addAuthentication(
+            AString *request, const char *method, const char *url) {
+        if (mAuthType == NONE) {
+            return;
+        }
+
+        if (mAuthType == BASIC) {
+            request->append("Authorization: Basic YmNhc3Q6dGVzdAo=\r\n");
+            return;
+        }
+
+        CHECK_EQ((int)mAuthType, (int)DIGEST);
+
+        AString A1;
+        A1.append(USERNAME);
+        A1.append(":");
+        A1.append("Streaming Server");
+        A1.append(":");
+        A1.append(PASSWORD);
+
+        AString A2;
+        A2.append(method);
+        A2.append(":");
+        A2.append(url);
+
+        AString HA1, HA2;
+        H(A1, &HA1);
+        H(A2, &HA2);
+
+        AString tmp;
+        tmp.append(HA1);
+        tmp.append(":");
+        tmp.append(mNonce);
+        tmp.append(":");
+        tmp.append(HA2);
+
+        AString digest;
+        H(tmp, &digest);
+
+        request->append("Authorization: Digest ");
+        request->append("nonce=\"");
+        request->append(mNonce);
+        request->append("\", ");
+        request->append("username=\"" USERNAME "\", ");
+        request->append("uri=\"");
+        request->append(url);
+        request->append("\", ");
+        request->append("response=\"");
+        request->append(digest);
+        request->append("\"");
+        request->append("\r\n");
+    }
+
+    virtual void onMessageReceived(const sp<AMessage> &msg) {
+        switch (msg->what()) {
+            case 'conn':
+            {
+                int32_t result;
+                CHECK(msg->findInt32("result", &result));
+
+                LOG(INFO) << "connection request completed with result "
+                     << result << " (" << strerror(-result) << ")";
+
+                if (result != OK) {
+                    (new AMessage('quit', id()))->post();
+                    break;
+                }
+
+                mConnected = true;
+
+                CHECK(msg->findInt32("server-ip", (int32_t *)&mServerIP));
+
+                issueAnnounce();
+                break;
+            }
+
+            case 'anno':
+            {
+                int32_t result;
+                CHECK(msg->findInt32("result", &result));
+
+                LOG(INFO) << "ANNOUNCE completed with result "
+                     << result << " (" << strerror(-result) << ")";
+
+                sp<RefBase> obj;
+                CHECK(msg->findObject("response", &obj));
+                sp<ARTSPResponse> response;
+
+                if (result == OK) {
+                    response = static_cast<ARTSPResponse *>(obj.get());
+                    CHECK(response != NULL);
+
+                    if (response->mStatusCode == 401) {
+                        if (mAuthType != NONE) {
+                            LOG(INFO) << "FAILED to authenticate";
+                            (new AMessage('quit', id()))->post();
+                            break;
+                        }
+
+                        authenticate(response);
+                        break;
+                    }
+                }
+
+                if (result != OK || response->mStatusCode != 200) {
+                    (new AMessage('quit', id()))->post();
+                    break;
+                }
+
+                unsigned rtpPort;
+                ARTPConnection::MakePortPair(&mRTPSocket, &mRTCPSocket, &rtpPort);
+
+                // (new AMessage('poll', id()))->post();
+
+                AString request;
+                request.append("SETUP ");
+                request.append(mTrackURL);
+                request.append(" RTSP/1.0\r\n");
+
+                addAuthentication(&request, "SETUP", mTrackURL.c_str());
+
+                request.append("Transport: RTP/AVP;unicast;client_port=");
+                request.append(rtpPort);
+                request.append("-");
+                request.append(rtpPort + 1);
+                request.append(";mode=record\r\n");
+                request.append("\r\n");
+
+                sp<AMessage> reply = new AMessage('setu', id());
+                mConn->sendRequest(request.c_str(), reply);
+                break;
+            }
+
+#if 0
+            case 'poll':
+            {
+                fd_set rs;
+                FD_ZERO(&rs);
+                FD_SET(mRTCPSocket, &rs);
+
+                struct timeval tv;
+                tv.tv_sec = 0;
+                tv.tv_usec = 0;
+
+                int res = select(mRTCPSocket + 1, &rs, NULL, NULL, &tv);
+
+                if (res == 1) {
+                    sp<ABuffer> buffer = new ABuffer(65536);
+                    ssize_t n = recv(mRTCPSocket, buffer->data(), buffer->size(), 0);
+
+                    if (n <= 0) {
+                        LOG(ERROR) << "recv returned " << n;
+                    } else {
+                        LOG(INFO) << "recv returned " << n << " bytes of data.";
+
+                        hexdump(buffer->data(), n);
+                    }
+                }
+
+                msg->post(50000);
+                break;
+            }
+#endif
+
+            case 'setu':
+            {
+                int32_t result;
+                CHECK(msg->findInt32("result", &result));
+
+                LOG(INFO) << "SETUP completed with result "
+                     << result << " (" << strerror(-result) << ")";
+
+                sp<RefBase> obj;
+                CHECK(msg->findObject("response", &obj));
+                sp<ARTSPResponse> response;
+
+                if (result == OK) {
+                    response = static_cast<ARTSPResponse *>(obj.get());
+                    CHECK(response != NULL);
+                }
+
+                if (result != OK || response->mStatusCode != 200) {
+                    (new AMessage('quit', id()))->post();
+                    break;
+                }
+
+                ssize_t i = response->mHeaders.indexOfKey("session");
+                CHECK_GE(i, 0);
+                mSessionID = response->mHeaders.valueAt(i);
+                i = mSessionID.find(";");
+                if (i >= 0) {
+                    // Remove options, i.e. ";timeout=90"
+                    mSessionID.erase(i, mSessionID.size() - i);
+                }
+
+                i = response->mHeaders.indexOfKey("transport");
+                CHECK_GE(i, 0);
+                AString transport = response->mHeaders.valueAt(i);
+
+                LOG(INFO) << "transport = '" << transport << "'";
+
+                AString value;
+                CHECK(GetAttribute(transport.c_str(), "server_port", &value));
+
+                unsigned rtpPort, rtcpPort;
+                CHECK_EQ(sscanf(value.c_str(), "%u-%u", &rtpPort, &rtcpPort), 2);
+
+                CHECK(GetAttribute(transport.c_str(), "source", &value));
+
+                memset(mRemoteAddr.sin_zero, 0, sizeof(mRemoteAddr.sin_zero));
+                mRemoteAddr.sin_family = AF_INET;
+                mRemoteAddr.sin_addr.s_addr = inet_addr(value.c_str());
+                mRemoteAddr.sin_port = htons(rtpPort);
+
+                mRemoteRTCPAddr = mRemoteAddr;
+                mRemoteRTCPAddr.sin_port = htons(rtpPort + 1);
+
+                CHECK_EQ(0, connect(mRTPSocket,
+                                    (const struct sockaddr *)&mRemoteAddr,
+                                    sizeof(mRemoteAddr)));
+
+                CHECK_EQ(0, connect(mRTCPSocket,
+                                    (const struct sockaddr *)&mRemoteRTCPAddr,
+                                    sizeof(mRemoteRTCPAddr)));
+
+                uint32_t x = ntohl(mRemoteAddr.sin_addr.s_addr);
+                LOG(INFO) << "sending data to "
+                     << (x >> 24)
+                     << "."
+                     << ((x >> 16) & 0xff)
+                     << "."
+                     << ((x >> 8) & 0xff)
+                     << "."
+                     << (x & 0xff)
+                     << ":"
+                     << rtpPort;
+
+                AString request;
+                request.append("RECORD ");
+                request.append(mStreamURL);
+                request.append(" RTSP/1.0\r\n");
+
+                addAuthentication(&request, "RECORD", mStreamURL.c_str());
+
+                request.append("Session: ");
+                request.append(mSessionID);
+                request.append("\r\n");
+                request.append("\r\n");
+
+                sp<AMessage> reply = new AMessage('reco', id());
+                mConn->sendRequest(request.c_str(), reply);
+                break;
+            }
+
+            case 'reco':
+            {
+                int32_t result;
+                CHECK(msg->findInt32("result", &result));
+
+                LOG(INFO) << "RECORD completed with result "
+                     << result << " (" << strerror(-result) << ")";
+
+                sp<RefBase> obj;
+                CHECK(msg->findObject("response", &obj));
+                sp<ARTSPResponse> response;
+
+                if (result == OK) {
+                    response = static_cast<ARTSPResponse *>(obj.get());
+                    CHECK(response != NULL);
+                }
+
+                if (result != OK) {
+                    (new AMessage('quit', id()))->post();
+                    break;
+                }
+
+                (new AMessage('more', id()))->post();
+                (new AMessage('sr  ', id()))->post();
+                (new AMessage('aliv', id()))->post(30000000ll);
+                break;
+            }
+
+            case 'aliv':
+            {
+                if (!mConnected) {
+                    break;
+                }
+
+                AString request;
+                request.append("OPTIONS ");
+                request.append(mStreamURL);
+                request.append(" RTSP/1.0\r\n");
+
+                addAuthentication(&request, "RECORD", mStreamURL.c_str());
+
+                request.append("Session: ");
+                request.append(mSessionID);
+                request.append("\r\n");
+                request.append("\r\n");
+
+                sp<AMessage> reply = new AMessage('opts', id());
+                mConn->sendRequest(request.c_str(), reply);
+                break;
+            }
+
+            case 'opts':
+            {
+                int32_t result;
+                CHECK(msg->findInt32("result", &result));
+
+                LOG(INFO) << "OPTIONS completed with result "
+                     << result << " (" << strerror(-result) << ")";
+
+                if (!mConnected) {
+                    break;
+                }
+
+                (new AMessage('aliv', id()))->post(30000000ll);
+                break;
+            }
+
+            case 'more':
+            {
+                if (!mConnected) {
+                    break;
+                }
+
+                sp<ABuffer> buffer = new ABuffer(65536);
+                uint8_t *data = buffer->data();
+                data[0] = 0x80;
+                data[1] = (1 << 7) | PT;  // M-bit
+                data[2] = (mSeqNo >> 8) & 0xff;
+                data[3] = mSeqNo & 0xff;
+                data[8] = mSourceID >> 24;
+                data[9] = (mSourceID >> 16) & 0xff;
+                data[10] = (mSourceID >> 8) & 0xff;
+                data[11] = mSourceID & 0xff;
+
+#ifdef ANDROID
+                MediaBuffer *mediaBuf = NULL;
+                for (;;) {
+                    CHECK_EQ(mEncoder->read(&mediaBuf), (status_t)OK);
+                    if (mediaBuf->range_length() > 0) {
+                        break;
+                    }
+                    mediaBuf->release();
+                    mediaBuf = NULL;
+                }
+
+                int64_t timeUs;
+                CHECK(mediaBuf->meta_data()->findInt64(kKeyTime, &timeUs));
+
+                uint32_t rtpTime = mRTPTimeBase + (timeUs * 9 / 100ll);
+
+                const uint8_t *mediaData =
+                    (const uint8_t *)mediaBuf->data() + mediaBuf->range_offset();
+
+                CHECK(!memcmp("\x00\x00\x00\x01", mediaData, 4));
+
+                CHECK_LE(mediaBuf->range_length() - 4 + 12, buffer->size());
+
+                memcpy(&data[12],
+                       mediaData + 4, mediaBuf->range_length() - 4);
+
+                buffer->setRange(0, mediaBuf->range_length() - 4 + 12);
+
+                mediaBuf->release();
+                mediaBuf = NULL;
+#else
+                uint32_t rtpTime = mRTPTimeBase + mNumRTPSent * 128;
+                memset(&data[12], 0, 128);
+                buffer->setRange(0, 12 + 128);
+#endif
+
+                data[4] = rtpTime >> 24;
+                data[5] = (rtpTime >> 16) & 0xff;
+                data[6] = (rtpTime >> 8) & 0xff;
+                data[7] = rtpTime & 0xff;
+
+                ssize_t n = send(
+                        mRTPSocket, data, buffer->size(), 0);
+                if (n < 0) {
+                    LOG(ERROR) << "send failed (" << strerror(errno) << ")";
+                }
+                CHECK_EQ(n, (ssize_t)buffer->size());
+
+                ++mSeqNo;
+
+                ++mNumRTPSent;
+                mNumRTPOctetsSent += buffer->size() - 12;
+
+                mLastRTPTime = rtpTime;
+                mLastNTPTime = ntpTime();
+
+#ifdef ANDROID
+                if (mNumRTPSent < 60 * 25) {  // 60 secs worth
+                    msg->post(40000);
+#else
+                if (mNumRTPOctetsSent < 8000 * 60) {
+                    msg->post(1000000ll * 128 / 8000);
+#endif
+                } else {
+                    LOG(INFO) << "That's enough, pausing.";
+
+                    AString request;
+                    request.append("PAUSE ");
+                    request.append(mStreamURL);
+                    request.append(" RTSP/1.0\r\n");
+
+                    addAuthentication(&request, "PAUSE", mStreamURL.c_str());
+
+                    request.append("Session: ");
+                    request.append(mSessionID);
+                    request.append("\r\n");
+                    request.append("\r\n");
+
+                    sp<AMessage> reply = new AMessage('paus', id());
+                    mConn->sendRequest(request.c_str(), reply);
+                }
+                break;
+            }
+
+            case 'sr  ':
+            {
+                if (!mConnected) {
+                    break;
+                }
+
+                sp<ABuffer> buffer = new ABuffer(65536);
+                buffer->setRange(0, 0);
+
+                addSR(buffer);
+                addSDES(buffer);
+
+                uint8_t *data = buffer->data();
+                ssize_t n = send(
+                        mRTCPSocket, data, buffer->size(), 0);
+                CHECK_EQ(n, (ssize_t)buffer->size());
+
+                msg->post(3000000);
+                break;
+            }
+
+            case 'paus':
+            {
+                int32_t result;
+                CHECK(msg->findInt32("result", &result));
+
+                LOG(INFO) << "PAUSE completed with result "
+                     << result << " (" << strerror(-result) << ")";
+
+                sp<RefBase> obj;
+                CHECK(msg->findObject("response", &obj));
+                sp<ARTSPResponse> response;
+
+                AString request;
+                request.append("TEARDOWN ");
+                request.append(mStreamURL);
+                request.append(" RTSP/1.0\r\n");
+
+                addAuthentication(&request, "TEARDOWN", mStreamURL.c_str());
+
+                request.append("Session: ");
+                request.append(mSessionID);
+                request.append("\r\n");
+                request.append("\r\n");
+
+                sp<AMessage> reply = new AMessage('tear', id());
+                mConn->sendRequest(request.c_str(), reply);
+                break;
+            }
+
+            case 'tear':
+            {
+                int32_t result;
+                CHECK(msg->findInt32("result", &result));
+
+                LOG(INFO) << "TEARDOWN completed with result "
+                     << result << " (" << strerror(-result) << ")";
+
+                sp<RefBase> obj;
+                CHECK(msg->findObject("response", &obj));
+                sp<ARTSPResponse> response;
+
+                if (result == OK) {
+                    response = static_cast<ARTSPResponse *>(obj.get());
+                    CHECK(response != NULL);
+                }
+
+                (new AMessage('quit', id()))->post();
+                break;
+            }
+
+            case 'disc':
+            {
+                LOG(INFO) << "disconnect completed";
+
+                mConnected = false;
+                (new AMessage('quit', id()))->post();
+                break;
+            }
+
+            case 'quit':
+            {
+                if (mConnected) {
+                    mConn->disconnect(new AMessage('disc', id()));
+                    break;
+                }
+
+                if (mRTPSocket >= 0) {
+                    close(mRTPSocket);
+                    mRTPSocket = -1;
+                }
+
+                if (mRTCPSocket >= 0) {
+                    close(mRTCPSocket);
+                    mRTCPSocket = -1;
+                }
+
+#ifdef ANDROID
+                mEncoder->stop();
+                mEncoder.clear();
+#endif
+
+                mLooper->stop();
+                break;
+            }
+
+            default:
+                TRESPASS();
+        }
+    }
+
+protected:
+    virtual ~MyTransmitter() {
+    }
+
+private:
+    enum AuthType {
+        NONE,
+        BASIC,
+        DIGEST
+    };
+
+    AString mServerURL;
+    AString mTrackURL;
+    AString mStreamURL;
+
+    sp<ALooper> mLooper;
+    sp<ARTSPConnection> mConn;
+    bool mConnected;
+    uint32_t mServerIP;
+    AuthType mAuthType;
+    AString mNonce;
+    AString mSessionID;
+    int mRTPSocket, mRTCPSocket;
+    uint32_t mSourceID;
+    uint32_t mSeqNo;
+    uint32_t mRTPTimeBase;
+    struct sockaddr_in mRemoteAddr;
+    struct sockaddr_in mRemoteRTCPAddr;
+    size_t mNumSamplesSent;
+    uint32_t mNumRTPSent;
+    uint32_t mNumRTPOctetsSent;
+    uint32_t mLastRTPTime;
+    uint64_t mLastNTPTime;
+
+#ifdef ANDROID
+    sp<MediaSource> mEncoder;
+    AString mSeqParamSet;
+    AString mPicParamSet;
+
+    void makeH264SPropParamSets(MediaBuffer *buffer) {
+        static const char kStartCode[] = "\x00\x00\x00\x01";
+
+        const uint8_t *data =
+            (const uint8_t *)buffer->data() + buffer->range_offset();
+        size_t size = buffer->range_length();
+
+        CHECK_GE(size, 0u);
+        CHECK(!memcmp(kStartCode, data, 4));
+
+        data += 4;
+        size -= 4;
+
+        size_t startCodePos = 0;
+        while (startCodePos + 3 < size
+                && memcmp(kStartCode, &data[startCodePos], 4)) {
+            ++startCodePos;
+        }
+
+        CHECK_LT(startCodePos + 3, size);
+
+        encodeBase64(data, startCodePos, &mSeqParamSet);
+
+        encodeBase64(&data[startCodePos + 4], size - startCodePos - 4,
+                     &mPicParamSet);
+    }
+#endif
+
+    void addSR(const sp<ABuffer> &buffer) {
+        uint8_t *data = buffer->data() + buffer->size();
+
+        data[0] = 0x80 | 0;
+        data[1] = 200;  // SR
+        data[2] = 0;
+        data[3] = 6;
+        data[4] = mSourceID >> 24;
+        data[5] = (mSourceID >> 16) & 0xff;
+        data[6] = (mSourceID >> 8) & 0xff;
+        data[7] = mSourceID & 0xff;
+
+        data[8] = mLastNTPTime >> (64 - 8);
+        data[9] = (mLastNTPTime >> (64 - 16)) & 0xff;
+        data[10] = (mLastNTPTime >> (64 - 24)) & 0xff;
+        data[11] = (mLastNTPTime >> 32) & 0xff;
+        data[12] = (mLastNTPTime >> 24) & 0xff;
+        data[13] = (mLastNTPTime >> 16) & 0xff;
+        data[14] = (mLastNTPTime >> 8) & 0xff;
+        data[15] = mLastNTPTime & 0xff;
+
+        data[16] = (mLastRTPTime >> 24) & 0xff;
+        data[17] = (mLastRTPTime >> 16) & 0xff;
+        data[18] = (mLastRTPTime >> 8) & 0xff;
+        data[19] = mLastRTPTime & 0xff;
+
+        data[20] = mNumRTPSent >> 24;
+        data[21] = (mNumRTPSent >> 16) & 0xff;
+        data[22] = (mNumRTPSent >> 8) & 0xff;
+        data[23] = mNumRTPSent & 0xff;
+
+        data[24] = mNumRTPOctetsSent >> 24;
+        data[25] = (mNumRTPOctetsSent >> 16) & 0xff;
+        data[26] = (mNumRTPOctetsSent >> 8) & 0xff;
+        data[27] = mNumRTPOctetsSent & 0xff;
+
+        buffer->setRange(buffer->offset(), buffer->size() + 28);
+    }
+
+    void addSDES(const sp<ABuffer> &buffer) {
+        uint8_t *data = buffer->data() + buffer->size();
+        data[0] = 0x80 | 1;
+        data[1] = 202;  // SDES
+        data[4] = mSourceID >> 24;
+        data[5] = (mSourceID >> 16) & 0xff;
+        data[6] = (mSourceID >> 8) & 0xff;
+        data[7] = mSourceID & 0xff;
+
+        size_t offset = 8;
+
+        data[offset++] = 1;  // CNAME
+
+        static const char *kCNAME = "andih@laptop";
+        data[offset++] = strlen(kCNAME);
+
+        memcpy(&data[offset], kCNAME, strlen(kCNAME));
+        offset += strlen(kCNAME);
+
+        data[offset++] = 7;  // NOTE
+
+        static const char *kNOTE = "Hell's frozen over.";
+        data[offset++] = strlen(kNOTE);
+
+        memcpy(&data[offset], kNOTE, strlen(kNOTE));
+        offset += strlen(kNOTE);
+
+        data[offset++] = 0;
+
+        if ((offset % 4) > 0) {
+            size_t count = 4 - (offset % 4);
+            switch (count) {
+                case 3:
+                    data[offset++] = 0;
+                case 2:
+                    data[offset++] = 0;
+                case 1:
+                    data[offset++] = 0;
+            }
+        }
+
+        size_t numWords = (offset / 4) - 1;
+        data[2] = numWords >> 8;
+        data[3] = numWords & 0xff;
+
+        buffer->setRange(buffer->offset(), buffer->size() + offset);
+    }
+
+    DISALLOW_EVIL_CONSTRUCTORS(MyTransmitter);
+};
+
+}  // namespace android
+
+#endif  // MY_TRANSMITTER_H_
diff --git a/media/libstagefright/rtsp/VideoSource.h b/media/libstagefright/rtsp/VideoSource.h
new file mode 100644
index 0000000..ae0c85b
--- /dev/null
+++ b/media/libstagefright/rtsp/VideoSource.h
@@ -0,0 +1,98 @@
+/*
+ * Copyright (C) 2010 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef VIDEO_SOURCE_H_
+
+#define VIDEO_SOURCE_H_
+
+#include <media/stagefright/MediaBufferGroup.h>
+#include <media/stagefright/MediaDefs.h>
+#include <media/stagefright/MediaSource.h>
+#include <media/stagefright/MetaData.h>
+
+namespace android {
+
+class VideoSource : public MediaSource {
+    static const int32_t kFramerate = 24;  // fps
+
+public:
+    VideoSource(int width, int height)
+        : mWidth(width),
+          mHeight(height),
+          mSize((width * height * 3) / 2) {
+        mGroup.add_buffer(new MediaBuffer(mSize));
+    }
+
+    virtual sp<MetaData> getFormat() {
+        sp<MetaData> meta = new MetaData;
+        meta->setInt32(kKeyWidth, mWidth);
+        meta->setInt32(kKeyHeight, mHeight);
+        meta->setCString(kKeyMIMEType, MEDIA_MIMETYPE_VIDEO_RAW);
+
+        return meta;
+    }
+
+    virtual status_t start(MetaData *params) {
+        mNumFramesOutput = 0;
+        return OK;
+    }
+
+    virtual status_t stop() {
+        return OK;
+    }
+
+    virtual status_t read(
+            MediaBuffer **buffer, const MediaSource::ReadOptions *options) {
+        if (mNumFramesOutput == kFramerate * 100) {
+            // Stop returning data after 10 secs.
+            return ERROR_END_OF_STREAM;
+        }
+
+        // printf("VideoSource::read\n");
+        status_t err = mGroup.acquire_buffer(buffer);
+        if (err != OK) {
+            return err;
+        }
+
+        char x = (char)((double)rand() / RAND_MAX * 255);
+        memset((*buffer)->data(), x, mSize);
+        (*buffer)->set_range(0, mSize);
+        (*buffer)->meta_data()->clear();
+        (*buffer)->meta_data()->setInt64(
+                kKeyTime, (mNumFramesOutput * 1000000) / kFramerate);
+        ++mNumFramesOutput;
+
+        // printf("VideoSource::read - returning buffer\n");
+        // LOG(INFO)("VideoSource::read - returning buffer");
+        return OK;
+    }
+
+protected:
+    virtual ~VideoSource() {}
+
+private:
+    MediaBufferGroup mGroup;
+    int mWidth, mHeight;
+    size_t mSize;
+    int64_t mNumFramesOutput;;
+
+    VideoSource(const VideoSource &);
+    VideoSource &operator=(const VideoSource &);
+};
+
+}  // namespace android
+
+#endif  // VIDEO_SOURCE_H_
diff --git a/media/mediaserver/Android.mk b/media/mediaserver/Android.mk
index a92cea8..0559812 100644
--- a/media/mediaserver/Android.mk
+++ b/media/mediaserver/Android.mk
@@ -14,8 +14,8 @@
 base := $(LOCAL_PATH)/../..
 
 LOCAL_C_INCLUDES := \
-    $(base)/libs/audioflinger \
-    $(base)/camera/libcameraservice \
+    $(base)/services/audioflinger \
+    $(base)/services/camera/libcameraservice \
     $(base)/media/libmediaplayerservice
 
 LOCAL_MODULE:= mediaserver
diff --git a/media/tests/MediaFrameworkTest/src/com/android/mediaframeworktest/MediaProfileReader.java b/media/tests/MediaFrameworkTest/src/com/android/mediaframeworktest/MediaProfileReader.java
index 056537d..b1ad315 100644
--- a/media/tests/MediaFrameworkTest/src/com/android/mediaframeworktest/MediaProfileReader.java
+++ b/media/tests/MediaFrameworkTest/src/com/android/mediaframeworktest/MediaProfileReader.java
@@ -34,10 +34,12 @@
     private static final List<AudioDecoder> audioDecoders = DecoderCapabilities.getAudioDecoders();
     private static final List<VideoEncoderCap> videoEncoders = EncoderCapabilities.getVideoEncoders();
     private static final List<AudioEncoderCap> audioEncoders = EncoderCapabilities.getAudioEncoders();
-    private static final HashMap<Integer, String> encoderMap = new HashMap<Integer, String>();
+    private static final HashMap<Integer, String> videoEncoderMap = new HashMap<Integer, String>();
+    private static final HashMap<Integer, String> audioEncoderMap = new HashMap<Integer, String>();
 
     static {
-        initEncoderMap();
+        initAudioEncoderMap();
+        initVideoEncoderMap();
     };
 
     public static List<VideoEncoderCap> getVideoEncoders() {
@@ -79,7 +81,7 @@
             videoEncoder != MediaRecorder.VideoEncoder.MPEG_4_SP) {
             throw new IllegalArgumentException("Unsupported video encoder " + videoEncoder);
         }
-        return encoderMap.get(videoEncoder);
+        return videoEncoderMap.get(videoEncoder);
     }
 
     public static String getAudioCodecName(int audioEncoder) {
@@ -90,22 +92,24 @@
             audioEncoder != MediaRecorder.AudioEncoder.EAAC_PLUS) {
             throw new IllegalArgumentException("Unsupported audio encodeer " + audioEncoder);
         }
-        return encoderMap.get(audioEncoder);
+        return audioEncoderMap.get(audioEncoder);
     }
 
     private MediaProfileReader() {} // Don't call me
 
-    private static void initEncoderMap() {
+    private static void initVideoEncoderMap() {
         // video encoders
-        encoderMap.put(MediaRecorder.VideoEncoder.H263, "h263");
-        encoderMap.put(MediaRecorder.VideoEncoder.H264, "h264");
-        encoderMap.put(MediaRecorder.VideoEncoder.MPEG_4_SP, "m4v");
+        videoEncoderMap.put(MediaRecorder.VideoEncoder.H263, "h263");
+        videoEncoderMap.put(MediaRecorder.VideoEncoder.H264, "h264");
+        videoEncoderMap.put(MediaRecorder.VideoEncoder.MPEG_4_SP, "m4v");
+    }
 
+    private static void initAudioEncoderMap() {
         // audio encoders
-        encoderMap.put(MediaRecorder.AudioEncoder.AMR_NB, "amrnb");
-        encoderMap.put(MediaRecorder.AudioEncoder.AMR_WB, "amrwb");
-        encoderMap.put(MediaRecorder.AudioEncoder.AAC, "aac");
-        encoderMap.put(MediaRecorder.AudioEncoder.AAC_PLUS, "aacplus");
-        encoderMap.put(MediaRecorder.AudioEncoder.EAAC_PLUS, "eaacplus");
+        audioEncoderMap.put(MediaRecorder.AudioEncoder.AMR_NB, "amrnb");
+        audioEncoderMap.put(MediaRecorder.AudioEncoder.AMR_WB, "amrwb");
+        audioEncoderMap.put(MediaRecorder.AudioEncoder.AAC, "aac");
+        audioEncoderMap.put(MediaRecorder.AudioEncoder.AAC_PLUS, "aacplus");
+        audioEncoderMap.put(MediaRecorder.AudioEncoder.EAAC_PLUS, "eaacplus");
     }
 }
diff --git a/media/tests/MediaFrameworkTest/src/com/android/mediaframeworktest/functional/CameraTest.java b/media/tests/MediaFrameworkTest/src/com/android/mediaframeworktest/functional/CameraTest.java
index 2e599f2..bbd6bea 100644
--- a/media/tests/MediaFrameworkTest/src/com/android/mediaframeworktest/functional/CameraTest.java
+++ b/media/tests/MediaFrameworkTest/src/com/android/mediaframeworktest/functional/CameraTest.java
@@ -19,21 +19,20 @@
 import com.android.mediaframeworktest.MediaFrameworkTest;
 import com.android.mediaframeworktest.MediaNames;
 
-import java.io.*;
-
 import android.content.Context;
 import android.hardware.Camera;
 import android.hardware.Camera.PictureCallback;
 import android.hardware.Camera.PreviewCallback;
 import android.hardware.Camera.ShutterCallback;
+import android.os.ConditionVariable;
+import android.os.Environment;
+import android.os.Looper;
 import android.test.ActivityInstrumentationTestCase;
+import android.test.suitebuilder.annotation.LargeTest;
 import android.util.Log;
 import android.view.SurfaceHolder;
 
-import android.os.ConditionVariable;
-import android.os.Looper;
-
-import android.test.suitebuilder.annotation.LargeTest;
+import java.io.*;
 
 /**
  * Junit / Instrumentation test case for the camera api
@@ -153,7 +152,8 @@
             try {         
                 if (rawData != null) {
                     int rawDataLength = rawData.length;
-                    File rawoutput = new File("/sdcard/test.bmp");
+                    File rawoutput = new File(
+                            Environment.getExternalStorageDirectory().toString(), "/test.bmp");
                     FileOutputStream outstream = new FileOutputStream(rawoutput);
                     outstream.write(rawData);                   
                     Log.v(TAG, "JpegPictureCallback rawDataLength = " + rawDataLength);
diff --git a/media/tests/MediaFrameworkTest/src/com/android/mediaframeworktest/functional/MediaRecorderTest.java b/media/tests/MediaFrameworkTest/src/com/android/mediaframeworktest/functional/MediaRecorderTest.java
index a52fd76..2332657 100644
--- a/media/tests/MediaFrameworkTest/src/com/android/mediaframeworktest/functional/MediaRecorderTest.java
+++ b/media/tests/MediaFrameworkTest/src/com/android/mediaframeworktest/functional/MediaRecorderTest.java
@@ -121,8 +121,8 @@
         mSurfaceHolder = MediaFrameworkTest.mSurfaceView.getHolder();
         String filename = ("/sdcard/" + videoEncoder + "_" + audioEncoder + "_" + highQuality + ".3gp");
         try {
-            Log.v(TAG, "video encoder :" + videoEncoder);
-            Log.v(TAG, "audio encoder :" + audioEncoder);
+            Log.v(TAG, "video encoder : " + videoEncoder);
+            Log.v(TAG, "audio encoder : " + audioEncoder);
             Log.v(TAG, "quality : " + (highQuality?"high": "low"));
             Log.v(TAG, "encoder : " + MediaProfileReader.getVideoCodecName(videoEncoder));
             Log.v(TAG, "audio : " + MediaProfileReader.getAudioCodecName(audioEncoder));
diff --git a/media/tests/omxjpegdecoder/Android.mk b/media/tests/omxjpegdecoder/Android.mk
index b7c18bc..f97f8eb 100644
--- a/media/tests/omxjpegdecoder/Android.mk
+++ b/media/tests/omxjpegdecoder/Android.mk
@@ -11,7 +11,6 @@
 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 # See the License for the specific language governing permissions and
 # limitations under the License.
-ifeq ($(BUILD_WITH_FULL_STAGEFRIGHT),true)
 
 LOCAL_PATH:= $(call my-dir)
 
@@ -54,5 +53,3 @@
 LOCAL_MODULE_TAGS := optional
 
 include $(BUILD_EXECUTABLE)
-
-endif
diff --git a/native/android/Android.mk b/native/android/Android.mk
new file mode 100644
index 0000000..950a1e9
--- /dev/null
+++ b/native/android/Android.mk
@@ -0,0 +1,32 @@
+BASE_PATH := $(call my-dir)
+LOCAL_PATH:= $(call my-dir)
+
+include $(CLEAR_VARS)
+
+# our source files
+#
+LOCAL_SRC_FILES:= \
+    asset_manager.cpp \
+    input.cpp \
+    looper.cpp \
+    native_activity.cpp \
+    native_window.cpp \
+    sensor.cpp
+
+LOCAL_SHARED_LIBRARIES := \
+    libcutils \
+    libutils \
+    libbinder \
+    libui \
+    libgui \
+    libsurfaceflinger_client \
+    libandroid_runtime
+
+LOCAL_C_INCLUDES += \
+    frameworks/base/native/include \
+    frameworks/base/core/jni/android \
+    dalvik/libnativehelper/include/nativehelper
+
+LOCAL_MODULE:= libandroid
+
+include $(BUILD_SHARED_LIBRARY)
diff --git a/native/android/asset_manager.cpp b/native/android/asset_manager.cpp
new file mode 100644
index 0000000..36c381e
--- /dev/null
+++ b/native/android/asset_manager.cpp
@@ -0,0 +1,210 @@
+/*
+ * Copyright (C) 2010 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#define LOG_TAG "NAsset"
+#include <utils/Log.h>
+
+#include <android/asset_manager.h>
+#include <utils/AssetManager.h>
+#include <utils/AssetDir.h>
+#include <utils/Asset.h>
+#include <utils/threads.h>
+
+#include "jni.h"
+#include "JNIHelp.h"
+
+using namespace android;
+
+// -------------------- Backing implementation of the public API --------------------
+
+// AAssetManager is actually a secret typedef for an empty base class of AssetManager,
+// but AAssetDir and AAsset are actual wrappers for isolation.
+
+// -----
+struct AAssetDir {
+    AssetDir* mAssetDir;
+    size_t mCurFileIndex;
+    String8 mCachedFileName;
+
+    AAssetDir(AssetDir* dir) : mAssetDir(dir), mCurFileIndex(0) { }
+    ~AAssetDir() { delete mAssetDir; }
+};
+
+
+// -----
+struct AAsset {
+    Asset* mAsset;
+
+    AAsset(Asset* asset) : mAsset(asset) { }
+    ~AAsset() { delete mAsset; }
+};
+
+// -------------------- Public native C API --------------------
+
+/**
+ * Supporting information
+ */
+
+static struct assetmanager_offsets_t
+{
+    jfieldID mObject;
+} gAssetManagerOffsets;
+
+static volatile bool gJNIConfigured = false;
+static Mutex gMutex;
+
+/**
+ * Asset Manager functionality
+ */
+AAssetManager* AAssetManager_fromJava(JNIEnv* env, jobject assetManager)
+{
+    {
+        Mutex::Autolock _l(gMutex);
+
+        if (gJNIConfigured == false) {
+            jclass amClass = env->FindClass("android/content/res/AssetManager");
+            gAssetManagerOffsets.mObject = env->GetFieldID(amClass, "mObject", "I");
+            gJNIConfigured = true;
+        }
+    }
+
+    return (AAssetManager*) env->GetIntField(assetManager, gAssetManagerOffsets.mObject);
+}
+
+AAsset* AAssetManager_open(AAssetManager* amgr, const char* filename, int mode)
+{
+    Asset::AccessMode amMode;
+    switch (mode) {
+    case AASSET_MODE_UNKNOWN:
+        amMode = Asset::ACCESS_UNKNOWN;
+        break;
+    case AASSET_MODE_RANDOM:
+        amMode = Asset::ACCESS_RANDOM;
+        break;
+    case AASSET_MODE_STREAMING:
+        amMode = Asset::ACCESS_STREAMING;
+        break;
+    case AASSET_MODE_BUFFER:
+        amMode = Asset::ACCESS_BUFFER;
+        break;
+    default:
+        return NULL;
+    }
+
+    AssetManager* mgr = static_cast<AssetManager*>(amgr);
+    Asset* asset = mgr->open(filename, amMode);
+    if (asset == NULL) {
+        return NULL;
+    }
+
+    return new AAsset(asset);
+}
+
+AAssetDir* AAssetManager_openDir(AAssetManager* amgr, const char* dirName)
+{
+    AssetManager* mgr = static_cast<AssetManager*>(amgr);
+    return new AAssetDir(mgr->openDir(dirName));
+}
+
+/**
+ * AssetDir functionality
+ */
+
+const char* AAssetDir_getNextFileName(AAssetDir* assetDir)
+{
+    const char* returnName = NULL;
+    size_t index = assetDir->mCurFileIndex;
+    const size_t max = assetDir->mAssetDir->getFileCount();
+
+    // Find the next regular file; explicitly don't report directories even if the
+    // underlying implementation changes to report them.  At that point we can add
+    // a more general iterator to this native interface set if appropriate.
+    while ((index < max) && (assetDir->mAssetDir->getFileType(index) != kFileTypeRegular)) {
+        index++;
+    }
+
+    // still in bounds? then the one at 'index' is the next to be reported; generate
+    // the string to return and advance the iterator for next time.
+    if (index < max) {
+        assetDir->mCachedFileName = assetDir->mAssetDir->getFileName(index);
+        returnName = assetDir->mCachedFileName.string();
+        index++;
+    }
+
+    assetDir->mCurFileIndex = index;
+    return returnName;
+}
+
+void AAssetDir_rewind(AAssetDir* assetDir)
+{
+    assetDir->mCurFileIndex = 0;
+}
+
+const char* AAssetDir_getFileName(AAssetDir* assetDir, int index)
+{
+    assetDir->mCachedFileName = assetDir->mAssetDir->getFileName(index);
+    return assetDir->mCachedFileName.string();
+}
+
+void AAssetDir_close(AAssetDir* assetDir)
+{
+    delete assetDir;
+}
+
+/**
+ * Asset functionality
+ */
+
+int AAsset_read(AAsset* asset, void* buf, size_t count)
+{
+    return asset->mAsset->read(buf, (size_t)count);
+}
+
+off_t AAsset_seek(AAsset* asset, off_t offset, int whence)
+{
+    return asset->mAsset->seek(offset, whence);
+}
+
+void AAsset_close(AAsset* asset)
+{
+    asset->mAsset->close();
+    delete asset;
+}
+
+const void* AAsset_getBuffer(AAsset* asset)
+{
+    return asset->mAsset->getBuffer(false);
+}
+
+off_t AAsset_getLength(AAsset* asset)
+{
+    return asset->mAsset->getLength();
+}
+
+off_t AAsset_getRemainingLength(AAsset* asset)
+{
+    return asset->mAsset->getRemainingLength();
+}
+
+int AAsset_openFileDescriptor(AAsset* asset, off_t* outStart, off_t* outLength)
+{
+    return asset->mAsset->openFileDescriptor(outStart, outLength);
+}
+
+int AAsset_isAllocated(AAsset* asset)
+{
+    return asset->mAsset->isAllocated() ? 1 : 0;
+}
diff --git a/native/android/input.cpp b/native/android/input.cpp
new file mode 100644
index 0000000..59bf711
--- /dev/null
+++ b/native/android/input.cpp
@@ -0,0 +1,265 @@
+/*
+ * Copyright (C) 2009 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#define LOG_TAG "input"
+#include <utils/Log.h>
+
+#include <android/input.h>
+#include <ui/Input.h>
+#include <ui/InputTransport.h>
+#include <utils/PollLoop.h>
+
+#include <android_runtime/android_app_NativeActivity.h>
+
+#include <poll.h>
+
+using android::InputEvent;
+using android::KeyEvent;
+using android::MotionEvent;
+
+int32_t AInputEvent_getType(const AInputEvent* event) {
+    return static_cast<const InputEvent*>(event)->getType();
+}
+
+int32_t AInputEvent_getDeviceId(const AInputEvent* event) {
+    return static_cast<const InputEvent*>(event)->getDeviceId();
+}
+
+int32_t AInputEvent_getSource(const AInputEvent* event) {
+    return static_cast<const InputEvent*>(event)->getSource();
+}
+
+int32_t AKeyEvent_getAction(const AInputEvent* key_event) {
+    return static_cast<const KeyEvent*>(key_event)->getAction();
+}
+
+int32_t AKeyEvent_getFlags(const AInputEvent* key_event) {
+    return static_cast<const KeyEvent*>(key_event)->getFlags();
+}
+
+int32_t AKeyEvent_getKeyCode(const AInputEvent* key_event) {
+    return static_cast<const KeyEvent*>(key_event)->getKeyCode();
+}
+
+int32_t AKeyEvent_getScanCode(const AInputEvent* key_event) {
+    return static_cast<const KeyEvent*>(key_event)->getScanCode();
+}
+
+int32_t AKeyEvent_getMetaState(const AInputEvent* key_event) {
+    return static_cast<const KeyEvent*>(key_event)->getMetaState();
+}
+int32_t AKeyEvent_getRepeatCount(const AInputEvent* key_event) {
+    return static_cast<const KeyEvent*>(key_event)->getRepeatCount();
+}
+
+int64_t AKeyEvent_getDownTime(const AInputEvent* key_event) {
+    return static_cast<const KeyEvent*>(key_event)->getDownTime();
+}
+
+
+int64_t AKeyEvent_getEventTime(const AInputEvent* key_event) {
+    return static_cast<const KeyEvent*>(key_event)->getEventTime();
+}
+
+int32_t AMotionEvent_getAction(const AInputEvent* motion_event) {
+    return static_cast<const MotionEvent*>(motion_event)->getAction();
+}
+
+int32_t AMotionEvent_getMetaState(const AInputEvent* motion_event) {
+    return static_cast<const MotionEvent*>(motion_event)->getMetaState();
+}
+
+int32_t AMotionEvent_getEdgeFlags(const AInputEvent* motion_event) {
+    return reinterpret_cast<const MotionEvent*>(motion_event)->getEdgeFlags();
+}
+
+int64_t AMotionEvent_getDownTime(const AInputEvent* motion_event) {
+    return static_cast<const MotionEvent*>(motion_event)->getDownTime();
+}
+
+int64_t AMotionEvent_getEventTime(const AInputEvent* motion_event) {
+    return static_cast<const MotionEvent*>(motion_event)->getEventTime();
+}
+
+float AMotionEvent_getXOffset(const AInputEvent* motion_event) {
+    return static_cast<const MotionEvent*>(motion_event)->getXOffset();
+}
+
+float AMotionEvent_getYOffset(const AInputEvent* motion_event) {
+    return static_cast<const MotionEvent*>(motion_event)->getYOffset();
+}
+
+float AMotionEvent_getXPrecision(const AInputEvent* motion_event) {
+    return static_cast<const MotionEvent*>(motion_event)->getXPrecision();
+}
+
+float AMotionEvent_getYPrecision(const AInputEvent* motion_event) {
+    return static_cast<const MotionEvent*>(motion_event)->getYPrecision();
+}
+
+size_t AMotionEvent_getPointerCount(const AInputEvent* motion_event) {
+    return static_cast<const MotionEvent*>(motion_event)->getPointerCount();
+}
+
+int32_t AMotionEvent_getPointerId(const AInputEvent* motion_event, size_t pointer_index) {
+    return static_cast<const MotionEvent*>(motion_event)->getPointerId(pointer_index);
+}
+
+float AMotionEvent_getRawX(const AInputEvent* motion_event, size_t pointer_index) {
+    return static_cast<const MotionEvent*>(motion_event)->getRawX(pointer_index);
+}
+
+float AMotionEvent_getRawY(const AInputEvent* motion_event, size_t pointer_index) {
+    return static_cast<const MotionEvent*>(motion_event)->getRawY(pointer_index);
+}
+
+float AMotionEvent_getX(const AInputEvent* motion_event, size_t pointer_index) {
+    return static_cast<const MotionEvent*>(motion_event)->getX(pointer_index);
+}
+
+float AMotionEvent_getY(const AInputEvent* motion_event, size_t pointer_index) {
+    return static_cast<const MotionEvent*>(motion_event)->getY(pointer_index);
+}
+
+float AMotionEvent_getPressure(const AInputEvent* motion_event, size_t pointer_index) {
+    return static_cast<const MotionEvent*>(motion_event)->getPressure(pointer_index);
+}
+
+float AMotionEvent_getSize(const AInputEvent* motion_event, size_t pointer_index) {
+    return static_cast<const MotionEvent*>(motion_event)->getSize(pointer_index);
+}
+
+float AMotionEvent_getTouchMajor(const AInputEvent* motion_event, size_t pointer_index) {
+    return static_cast<const MotionEvent*>(motion_event)->getTouchMajor(pointer_index);
+}
+
+float AMotionEvent_getTouchMinor(const AInputEvent* motion_event, size_t pointer_index) {
+    return static_cast<const MotionEvent*>(motion_event)->getTouchMinor(pointer_index);
+}
+
+float AMotionEvent_getToolMajor(const AInputEvent* motion_event, size_t pointer_index) {
+    return static_cast<const MotionEvent*>(motion_event)->getToolMajor(pointer_index);
+}
+
+float AMotionEvent_getToolMinor(const AInputEvent* motion_event, size_t pointer_index) {
+    return static_cast<const MotionEvent*>(motion_event)->getToolMinor(pointer_index);
+}
+
+float AMotionEvent_getOrientation(const AInputEvent* motion_event, size_t pointer_index) {
+    return static_cast<const MotionEvent*>(motion_event)->getOrientation(pointer_index);
+}
+
+size_t AMotionEvent_getHistorySize(const AInputEvent* motion_event) {
+    return static_cast<const MotionEvent*>(motion_event)->getHistorySize();
+}
+
+int64_t AMotionEvent_getHistoricalEventTime(AInputEvent* motion_event,
+        size_t history_index) {
+    return static_cast<const MotionEvent*>(motion_event)->getHistoricalEventTime(
+            history_index);
+}
+
+float AMotionEvent_getHistoricalRawX(AInputEvent* motion_event, size_t pointer_index,
+        size_t history_index) {
+    return static_cast<const MotionEvent*>(motion_event)->getHistoricalRawX(
+            pointer_index, history_index);
+}
+
+float AMotionEvent_getHistoricalRawY(AInputEvent* motion_event, size_t pointer_index,
+        size_t history_index) {
+    return static_cast<const MotionEvent*>(motion_event)->getHistoricalRawY(
+            pointer_index, history_index);
+}
+
+float AMotionEvent_getHistoricalX(AInputEvent* motion_event, size_t pointer_index,
+        size_t history_index) {
+    return static_cast<const MotionEvent*>(motion_event)->getHistoricalX(
+            pointer_index, history_index);
+}
+
+float AMotionEvent_getHistoricalY(AInputEvent* motion_event, size_t pointer_index,
+        size_t history_index) {
+    return static_cast<const MotionEvent*>(motion_event)->getHistoricalY(
+            pointer_index, history_index);
+}
+
+float AMotionEvent_getHistoricalPressure(AInputEvent* motion_event, size_t pointer_index,
+        size_t history_index) {
+    return static_cast<const MotionEvent*>(motion_event)->getHistoricalPressure(
+            pointer_index, history_index);
+}
+
+float AMotionEvent_getHistoricalSize(AInputEvent* motion_event, size_t pointer_index,
+        size_t history_index) {
+    return static_cast<const MotionEvent*>(motion_event)->getHistoricalSize(
+            pointer_index, history_index);
+}
+
+float AMotionEvent_getHistoricalTouchMajor(AInputEvent* motion_event, size_t pointer_index,
+        size_t history_index) {
+    return static_cast<const MotionEvent*>(motion_event)->getHistoricalTouchMajor(
+            pointer_index, history_index);
+}
+
+float AMotionEvent_getHistoricalTouchMinor(AInputEvent* motion_event, size_t pointer_index,
+        size_t history_index) {
+    return static_cast<const MotionEvent*>(motion_event)->getHistoricalTouchMinor(
+            pointer_index, history_index);
+}
+
+float AMotionEvent_getHistoricalToolMajor(AInputEvent* motion_event, size_t pointer_index,
+        size_t history_index) {
+    return static_cast<const MotionEvent*>(motion_event)->getHistoricalToolMajor(
+            pointer_index, history_index);
+}
+
+float AMotionEvent_getHistoricalToolMinor(AInputEvent* motion_event, size_t pointer_index,
+        size_t history_index) {
+    return static_cast<const MotionEvent*>(motion_event)->getHistoricalToolMinor(
+            pointer_index, history_index);
+}
+
+float AMotionEvent_getHistoricalOrientation(AInputEvent* motion_event, size_t pointer_index,
+        size_t history_index) {
+    return static_cast<const MotionEvent*>(motion_event)->getHistoricalOrientation(
+            pointer_index, history_index);
+}
+
+
+void AInputQueue_attachLooper(AInputQueue* queue, ALooper* looper,
+        ALooper_callbackFunc* callback, void* data) {
+    queue->attachLooper(looper, callback, data);
+}
+
+void AInputQueue_detachLooper(AInputQueue* queue) {
+    queue->detachLooper();
+}
+
+int32_t AInputQueue_hasEvents(AInputQueue* queue) {
+    return queue->hasEvents();
+}
+
+int32_t AInputQueue_getEvent(AInputQueue* queue, AInputEvent** outEvent) {
+    return queue->getEvent(outEvent);
+}
+
+int32_t AInputQueue_preDispatchEvent(AInputQueue* queue, AInputEvent* event) {
+    return queue->preDispatchEvent(event) ? 1 : 0;
+}
+
+void AInputQueue_finishEvent(AInputQueue* queue, AInputEvent* event, int handled) {
+    queue->finishEvent(event, handled != 0);
+}
diff --git a/native/android/looper.cpp b/native/android/looper.cpp
new file mode 100644
index 0000000..1564c47
--- /dev/null
+++ b/native/android/looper.cpp
@@ -0,0 +1,82 @@
+/*
+ * Copyright (C) 2010 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#define LOG_TAG "ALooper"
+#include <utils/Log.h>
+
+#include <android/looper.h>
+#include <utils/PollLoop.h>
+
+using android::PollLoop;
+using android::sp;
+
+ALooper* ALooper_forThread() {
+    return PollLoop::getForThread().get();
+}
+
+ALooper* ALooper_prepare(int32_t opts) {
+    bool allowFds = (opts&ALOOPER_PREPARE_ALLOW_NON_CALLBACKS) != 0;
+    sp<PollLoop> loop = PollLoop::getForThread();
+    if (loop == NULL) {
+        loop = new PollLoop(allowFds);
+        PollLoop::setForThread(loop);
+    }
+    if (loop->getAllowNonCallbacks() != allowFds) {
+        LOGW("ALooper_prepare again with different ALOOPER_PREPARE_ALLOW_NON_CALLBACKS");
+    }
+    return loop.get();
+}
+
+int32_t ALooper_pollOnce(int timeoutMillis, int* outEvents, void** outData) {
+    sp<PollLoop> loop = PollLoop::getForThread();
+    if (loop == NULL) {
+        LOGW("ALooper_pollOnce: No looper for this thread!");
+        return -1;
+    }
+    return loop->pollOnce(timeoutMillis, outEvents, outData);
+}
+
+int32_t ALooper_pollAll(int timeoutMillis, int* outEvents, void** outData) {
+    sp<PollLoop> loop = PollLoop::getForThread();
+    if (loop == NULL) {
+        LOGW("ALooper_pollOnce: No looper for this thread!");
+        return -1;
+    }
+    
+    int32_t result;
+    while ((result = loop->pollOnce(timeoutMillis, outEvents, outData)) == ALOOPER_POLL_CALLBACK) {
+        ;
+    }
+    
+    return result;
+}
+
+void ALooper_acquire(ALooper* looper) {
+    static_cast<PollLoop*>(looper)->incStrong((void*)ALooper_acquire);
+}
+
+void ALooper_release(ALooper* looper) {
+    static_cast<PollLoop*>(looper)->decStrong((void*)ALooper_acquire);
+}
+
+void ALooper_addFd(ALooper* looper, int fd, int events,
+        ALooper_callbackFunc* callback, void* data) {
+    static_cast<PollLoop*>(looper)->setLooperCallback(fd, events, callback, data);
+}
+
+int32_t ALooper_removeFd(ALooper* looper, int fd) {
+    return static_cast<PollLoop*>(looper)->removeCallback(fd) ? 1 : 0;
+}
diff --git a/native/android/native_activity.cpp b/native/android/native_activity.cpp
new file mode 100644
index 0000000..0c6823a
--- /dev/null
+++ b/native/android/native_activity.cpp
@@ -0,0 +1,39 @@
+/*
+ * Copyright (C) 2010 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#define LOG_TAG "native_activity"
+#include <utils/Log.h>
+
+#include <android_runtime/android_app_NativeActivity.h>
+
+using namespace android;
+
+void ANativeActivity_setWindowFormat(ANativeActivity* activity, int32_t format) {
+	android_NativeActivity_setWindowFormat(activity, format);
+}
+
+void ANativeActivity_setWindowFlags(ANativeActivity* activity,
+		uint32_t addFlags, uint32_t removeFlags) {
+	android_NativeActivity_setWindowFlags(activity, addFlags, addFlags|removeFlags);
+}
+
+void ANativeActivity_showSoftInput(ANativeActivity* activity, uint32_t flags) {
+	android_NativeActivity_showSoftInput(activity, flags);
+}
+
+void ANativeActivity_hideSoftInput(ANativeActivity* activity, uint32_t flags) {
+	android_NativeActivity_hideSoftInput(activity, flags);
+}
diff --git a/native/android/native_window.cpp b/native/android/native_window.cpp
new file mode 100644
index 0000000..bada078
--- /dev/null
+++ b/native/android/native_window.cpp
@@ -0,0 +1,97 @@
+/*
+ * Copyright (C) 2010 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#define LOG_TAG "Surface"
+#include <utils/Log.h>
+
+#include <android/native_window_jni.h>
+#include <surfaceflinger/Surface.h>
+#include <android_runtime/android_view_Surface.h>
+
+using namespace android;
+
+ANativeWindow* ANativeWindow_fromSurface(JNIEnv* env, jobject surface) {
+    sp<ANativeWindow> win = android_Surface_getNativeWindow(env, surface);
+    if (win != NULL) {
+        win->incStrong((void*)ANativeWindow_acquire);
+    }
+    return win.get();
+}
+
+void ANativeWindow_acquire(ANativeWindow* window) {
+    window->incStrong((void*)ANativeWindow_acquire);
+}
+
+void ANativeWindow_release(ANativeWindow* window) {
+    window->decStrong((void*)ANativeWindow_acquire);
+}
+
+static int32_t getWindowProp(ANativeWindow* window, int what) {
+    int value;
+    int res = window->query(window, what, &value);
+    return res < 0 ? res : value;
+}
+
+int32_t ANativeWindow_getWidth(ANativeWindow* window) {
+    return getWindowProp(window, NATIVE_WINDOW_WIDTH);
+}
+
+int32_t ANativeWindow_getHeight(ANativeWindow* window) {
+    return getWindowProp(window, NATIVE_WINDOW_HEIGHT);
+}
+
+int32_t ANativeWindow_getFormat(ANativeWindow* window) {
+    return getWindowProp(window, NATIVE_WINDOW_FORMAT);
+}
+
+int32_t ANativeWindow_setBuffersGeometry(ANativeWindow* window, int32_t width,
+        int32_t height) {
+    native_window_set_buffers_geometry(window, width, height, 0);
+    return 0;
+}
+
+int32_t ANativeWindow_lock(ANativeWindow* window, ANativeWindow_Buffer* outBuffer,
+        ARect* inOutDirtyBounds) {
+    Region dirtyRegion;
+    Region* dirtyParam = NULL;
+    if (inOutDirtyBounds != NULL) {
+        dirtyRegion.set(*(Rect*)inOutDirtyBounds);
+        dirtyParam = &dirtyRegion;
+    }
+    
+    Surface::SurfaceInfo info;
+    status_t res = static_cast<Surface*>(window)->lock(&info, dirtyParam);
+    if (res != OK) {
+        return -1;
+    }
+    
+    outBuffer->width = (int32_t)info.w;
+    outBuffer->height = (int32_t)info.h;
+    outBuffer->stride = (int32_t)info.s;
+    outBuffer->format = (int32_t)info.format;
+    outBuffer->bits = info.bits;
+    
+    if (inOutDirtyBounds != NULL) {
+        *inOutDirtyBounds = dirtyRegion.getBounds();
+    }
+    
+    return 0;
+}
+
+int32_t ANativeWindow_unlockAndPost(ANativeWindow* window) {
+    status_t res = static_cast<Surface*>(window)->unlockAndPost();
+    return res == android::OK ? 0 : -1;
+}
diff --git a/native/android/sensor.cpp b/native/android/sensor.cpp
new file mode 100644
index 0000000..7a3907e
--- /dev/null
+++ b/native/android/sensor.cpp
@@ -0,0 +1,150 @@
+/*
+ * Copyright (C) 2009 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#define LOG_TAG "sensor"
+#include <utils/Log.h>
+
+#include <android/looper.h>
+#include <android/sensor.h>
+
+#include <utils/RefBase.h>
+#include <utils/PollLoop.h>
+#include <utils/Timers.h>
+
+#include <gui/Sensor.h>
+#include <gui/SensorManager.h>
+#include <gui/SensorEventQueue.h>
+
+#include <poll.h>
+
+using android::sp;
+using android::Sensor;
+using android::SensorManager;
+using android::SensorEventQueue;
+using android::String8;
+
+/*****************************************************************************/
+
+ASensorManager* ASensorManager_getInstance()
+{
+    return &SensorManager::getInstance();
+}
+
+int ASensorManager_getSensorList(ASensorManager* manager, ASensor** list)
+{
+    Sensor* l;
+    int c = static_cast<SensorManager*>(manager)->getSensorList(&l);
+    if (list) {
+        *list = l;
+    }
+    return c;
+}
+
+ASensor* ASensorManager_getDefaultSensor(ASensorManager* manager, int type)
+{
+    return static_cast<SensorManager*>(manager)->getDefaultSensor(type);
+}
+
+ASensorEventQueue* ASensorManager_createEventQueue(ASensorManager* manager,
+        ALooper* looper, ALooper_callbackFunc* callback, void* data)
+{
+    sp<SensorEventQueue> queue =
+            static_cast<SensorManager*>(manager)->createEventQueue();
+    if (queue != 0) {
+        ALooper_addFd(looper, queue->getFd(), POLLIN, callback, data);
+        queue->looper = looper;
+        queue->incStrong(manager);
+    }
+    return static_cast<ASensorEventQueue*>(queue.get());
+}
+
+int ASensorManager_destroyEventQueue(ASensorManager* manager,
+        ASensorEventQueue* inQueue)
+{
+    sp<SensorEventQueue> queue = static_cast<SensorEventQueue*>(inQueue);
+    ALooper_removeFd(queue->looper, queue->getFd());
+    queue->decStrong(manager);
+    return 0;
+}
+
+/*****************************************************************************/
+
+int ASensorEventQueue_enableSensor(ASensorEventQueue* queue, ASensor* sensor)
+{
+    return static_cast<SensorEventQueue*>(queue)->enableSensor(
+            static_cast<Sensor*>(sensor));
+}
+
+int ASensorEventQueue_disableSensor(ASensorEventQueue* queue, ASensor* sensor)
+{
+    return static_cast<SensorEventQueue*>(queue)->disableSensor(
+            static_cast<Sensor*>(sensor));
+}
+
+int ASensorEventQueue_setEventRate(ASensorEventQueue* queue, ASensor* sensor,
+        int32_t usec)
+{
+    return static_cast<SensorEventQueue*>(queue)->setEventRate(
+            static_cast<Sensor*>(sensor), us2ns(usec));
+}
+
+int ASensorEventQueue_hasEvents(ASensorEventQueue* queue)
+{
+    struct pollfd pfd;
+    pfd.fd = static_cast<SensorEventQueue*>(queue)->getFd();
+    pfd.events = POLLIN;
+    pfd.revents = 0;
+
+    int nfd = poll(&pfd, 1, 0);
+
+    if (nfd < 0)
+        return -errno;
+
+    if (pfd.revents != POLLIN)
+        return -1;
+
+    return (nfd == 0) ? 0 : 1;
+}
+
+ssize_t ASensorEventQueue_getEvents(ASensorEventQueue* queue,
+                ASensorEvent* events, size_t count)
+{
+    return static_cast<SensorEventQueue*>(queue)->read(events, count);
+}
+
+
+/*****************************************************************************/
+
+const char* ASensor_getName(ASensor* sensor)
+{
+    return static_cast<Sensor*>(sensor)->getName().string();
+}
+
+const char* ASensor_getVendor(ASensor* sensor)
+{
+    return static_cast<Sensor*>(sensor)->getVendor().string();
+}
+
+int ASensor_getType(ASensor* sensor)
+{
+    return static_cast<Sensor*>(sensor)->getType();
+}
+
+float ASensor_getResolution(ASensor* sensor)
+{
+    return static_cast<Sensor*>(sensor)->getResolution();
+}
+
diff --git a/native/include/android/asset_manager.h b/native/include/android/asset_manager.h
new file mode 100644
index 0000000..89989f8
--- /dev/null
+++ b/native/include/android/asset_manager.h
@@ -0,0 +1,148 @@
+/*
+ * Copyright (C) 2010 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+
+#ifndef ANDROID_ASSET_MANAGER_H
+#define ANDROID_ASSET_MANAGER_H
+
+#include <jni.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+struct AAssetManager;
+typedef struct AAssetManager AAssetManager;
+
+struct AAssetDir;
+typedef struct AAssetDir AAssetDir;
+
+struct AAsset;
+typedef struct AAsset AAsset;
+
+/* Available modes for opening assets */
+enum {
+    AASSET_MODE_UNKNOWN      = 0,
+    AASSET_MODE_RANDOM       = 1,
+    AASSET_MODE_STREAMING    = 2,
+    AASSET_MODE_BUFFER       = 3
+};
+
+
+/**
+ * Given a Dalvik AssetManager object, obtain the corresponding native AAssetManager
+ * object.  Note that the caller is responsible for obtaining and holding a VM reference
+ * to the jobject to prevent its being garbage collected while the native object is
+ * in use.
+ */
+AAssetManager* AAssetManager_fromJava(JNIEnv* env, jobject assetManager);
+
+/**
+ * Open the named directory within the asset hierarchy.  The directory can then
+ * be inspected with the AAssetDir functions.  To open the top-level directory,
+ * pass in "" as the dirName.
+ *
+ * The object returned here should be freed by calling AAssetDir_close().
+ */
+AAssetDir* AAssetManager_openDir(AAssetManager* mgr, const char* dirName);
+
+/**
+ * Open an asset.
+ *
+ * The object returned here should be freed by calling AAsset_close().
+ */
+AAsset* AAssetManager_open(AAssetManager* mgr, const char* filename, int mode);
+
+/**
+ * Iterate over the files in an asset directory.  A NULL string is returned
+ * when all the file names have been returned.
+ *
+ * The returned file name is suitable for passing to AAssetManager_open().
+ *
+ * The string returned here is owned by the AssetDir implementation and is not
+ * guaranteed to remain valid if any other calls are made on this AAssetDir
+ * instance.
+ */
+const char* AAssetDir_getNextFileName(AAssetDir* assetDir);
+
+/**
+ * Reset the iteration state of AAssetDir_getNextFileName() to the beginning.
+ */
+void AAssetDir_rewind(AAssetDir* assetDir);
+
+/**
+ * Close an opened AAssetDir, freeing any related resources.
+ */
+void AAssetDir_close(AAssetDir* assetDir);
+
+/**
+ * Attempt to read 'count' bytes of data from the current offset.
+ *
+ * Returns the number of bytes read, zero on EOF, or < 0 on error.
+ */
+int AAsset_read(AAsset* asset, void* buf, size_t count);
+
+/**
+ * Seek to the specified offset within the asset data.  'whence' uses the
+ * same constants as lseek()/fseek().
+ *
+ * Returns the new position on success, or (off_t) -1 on error.
+ */
+off_t AAsset_seek(AAsset* asset, off_t offset, int whence);
+
+/**
+ * Close the asset, freeing all associated resources.
+ */
+void AAsset_close(AAsset* asset);
+
+/**
+ * Get a pointer to a buffer holding the entire contents of the assset.
+ *
+ * Returns NULL on failure.
+ */
+const void* AAsset_getBuffer(AAsset* asset);
+
+/**
+ * Report the total size of the asset data.
+ */
+off_t AAsset_getLength(AAsset* asset);
+
+/**
+ * Report the total amount of asset data that can be read from the current position.
+ */
+off_t AAsset_getRemainingLength(AAsset* asset);
+
+/**
+ * Open a new file descriptor that can be used to read the asset data.
+ *
+ * Returns < 0 if direct fd access is not possible (for example, if the asset is
+ * compressed).
+ */
+int AAsset_openFileDescriptor(AAsset* asset, off_t* outStart, off_t* outLength);
+
+/**
+ * Returns whether this asset's internal buffer is allocated in ordinary RAM (i.e. not
+ * mmapped).
+ */
+int AAsset_isAllocated(AAsset* asset);
+
+
+
+#ifdef __cplusplus
+};
+#endif
+
+#endif      // ANDROID_ASSET_MANAGER_H
diff --git a/native/include/android/input.h b/native/include/android/input.h
new file mode 100644
index 0000000..0b8c7e4
--- /dev/null
+++ b/native/include/android/input.h
@@ -0,0 +1,638 @@
+/*
+ * Copyright (C) 2010 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef _ANDROID_INPUT_H
+#define _ANDROID_INPUT_H
+
+/******************************************************************
+ *
+ * IMPORTANT NOTICE:
+ *
+ *   This file is part of Android's set of stable system headers
+ *   exposed by the Android NDK (Native Development Kit).
+ *
+ *   Third-party source AND binary code relies on the definitions
+ *   here to be FROZEN ON ALL UPCOMING PLATFORM RELEASES.
+ *
+ *   - DO NOT MODIFY ENUMS (EXCEPT IF YOU ADD NEW 32-BIT VALUES)
+ *   - DO NOT MODIFY CONSTANTS OR FUNCTIONAL MACROS
+ *   - DO NOT CHANGE THE SIGNATURE OF FUNCTIONS IN ANY WAY
+ *   - DO NOT CHANGE THE LAYOUT OR SIZE OF STRUCTURES
+ */
+
+/*
+ * Structures and functions to receive and process input events in
+ * native code.
+ *
+ * NOTE: These functions MUST be implemented by /system/lib/libui.so
+ */
+
+#include <sys/types.h>
+#include <android/keycodes.h>
+#include <android/looper.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/*
+ * Key states (may be returned by queries about the current state of a
+ * particular key code, scan code or switch).
+ */
+enum {
+    /* The key state is unknown or the requested key itself is not supported. */
+    AKEY_STATE_UNKNOWN = -1,
+
+    /* The key is up. */
+    AKEY_STATE_UP = 0,
+
+    /* The key is down. */
+    AKEY_STATE_DOWN = 1,
+
+    /* The key is down but is a virtual key press that is being emulated by the system. */
+    AKEY_STATE_VIRTUAL = 2
+};
+
+/*
+ * Meta key / modifer state.
+ */
+enum {
+    /* No meta keys are pressed. */
+    AMETA_NONE = 0,
+
+    /* This mask is used to check whether one of the ALT meta keys is pressed. */
+    AMETA_ALT_ON = 0x02,
+
+    /* This mask is used to check whether the left ALT meta key is pressed. */
+    AMETA_ALT_LEFT_ON = 0x10,
+
+    /* This mask is used to check whether the right ALT meta key is pressed. */
+    AMETA_ALT_RIGHT_ON = 0x20,
+
+    /* This mask is used to check whether one of the SHIFT meta keys is pressed. */
+    AMETA_SHIFT_ON = 0x01,
+
+    /* This mask is used to check whether the left SHIFT meta key is pressed. */
+    AMETA_SHIFT_LEFT_ON = 0x40,
+
+    /* This mask is used to check whether the right SHIFT meta key is pressed. */
+    AMETA_SHIFT_RIGHT_ON = 0x80,
+
+    /* This mask is used to check whether the SYM meta key is pressed. */
+    AMETA_SYM_ON = 0x04
+};
+
+/*
+ * Input events.
+ *
+ * Input events are opaque structures.  Use the provided accessors functions to
+ * read their properties.
+ */
+struct AInputEvent;
+typedef struct AInputEvent AInputEvent;
+
+/*
+ * Input event types.
+ */
+enum {
+    /* Indicates that the input event is a key event. */
+    AINPUT_EVENT_TYPE_KEY = 1,
+
+    /* Indicates that the input event is a motion event. */
+    AINPUT_EVENT_TYPE_MOTION = 2
+};
+
+/*
+ * Key event actions.
+ */
+enum {
+    /* The key has been pressed down. */
+    AKEY_EVENT_ACTION_DOWN = 0,
+
+    /* The key has been released. */
+    AKEY_EVENT_ACTION_UP = 1,
+
+    /* Multiple duplicate key events have occurred in a row, or a complex string is
+     * being delivered.  The repeat_count property of the key event contains the number
+     * of times the given key code should be executed.
+     */
+    AKEY_EVENT_ACTION_MULTIPLE = 2
+};
+
+/*
+ * Key event flags.
+ */
+enum {
+    /* This mask is set if the device woke because of this key event. */
+    AKEY_EVENT_FLAG_WOKE_HERE = 0x1,
+
+    /* This mask is set if the key event was generated by a software keyboard. */
+    AKEY_EVENT_FLAG_SOFT_KEYBOARD = 0x2,
+
+    /* This mask is set if we don't want the key event to cause us to leave touch mode. */
+    AKEY_EVENT_FLAG_KEEP_TOUCH_MODE = 0x4,
+
+    /* This mask is set if an event was known to come from a trusted part
+     * of the system.  That is, the event is known to come from the user,
+     * and could not have been spoofed by a third party component. */
+    AKEY_EVENT_FLAG_FROM_SYSTEM = 0x8,
+
+    /* This mask is used for compatibility, to identify enter keys that are
+     * coming from an IME whose enter key has been auto-labelled "next" or
+     * "done".  This allows TextView to dispatch these as normal enter keys
+     * for old applications, but still do the appropriate action when
+     * receiving them. */
+    AKEY_EVENT_FLAG_EDITOR_ACTION = 0x10,
+
+    /* When associated with up key events, this indicates that the key press
+     * has been canceled.  Typically this is used with virtual touch screen
+     * keys, where the user can slide from the virtual key area on to the
+     * display: in that case, the application will receive a canceled up
+     * event and should not perform the action normally associated with the
+     * key.  Note that for this to work, the application can not perform an
+     * action for a key until it receives an up or the long press timeout has
+     * expired. */
+    AKEY_EVENT_FLAG_CANCELED = 0x20,
+
+    /* This key event was generated by a virtual (on-screen) hard key area.
+     * Typically this is an area of the touchscreen, outside of the regular
+     * display, dedicated to "hardware" buttons. */
+    AKEY_EVENT_FLAG_VIRTUAL_HARD_KEY = 0x40,
+
+    /* This flag is set for the first key repeat that occurs after the
+     * long press timeout. */
+    AKEY_EVENT_FLAG_LONG_PRESS = 0x80,
+
+    /* Set when a key event has AKEY_EVENT_FLAG_CANCELED set because a long
+     * press action was executed while it was down. */
+    AKEY_EVENT_FLAG_CANCELED_LONG_PRESS = 0x100,
+
+    /* Set for AKEY_EVENT_ACTION_UP when this event's key code is still being
+     * tracked from its initial down.  That is, somebody requested that tracking
+     * started on the key down and a long press has not caused
+     * the tracking to be canceled. */
+    AKEY_EVENT_FLAG_TRACKING = 0x200
+};
+
+/*
+ * Motion event actions.
+ */
+
+/* Bit shift for the action bits holding the pointer index as
+ * defined by AMOTION_EVENT_ACTION_POINTER_INDEX_MASK.
+ */
+#define AMOTION_EVENT_ACTION_POINTER_INDEX_SHIFT 8
+
+enum {
+    /* Bit mask of the parts of the action code that are the action itself.
+     */
+    AMOTION_EVENT_ACTION_MASK = 0xff,
+
+    /* Bits in the action code that represent a pointer index, used with
+     * AMOTION_EVENT_ACTION_POINTER_DOWN and AMOTION_EVENT_ACTION_POINTER_UP.  Shifting
+     * down by AMOTION_EVENT_ACTION_POINTER_INDEX_SHIFT provides the actual pointer
+     * index where the data for the pointer going up or down can be found.
+     */
+    AMOTION_EVENT_ACTION_POINTER_INDEX_MASK  = 0xff00,
+
+    /* A pressed gesture has started, the motion contains the initial starting location.
+     */
+    AMOTION_EVENT_ACTION_DOWN = 0,
+
+    /* A pressed gesture has finished, the motion contains the final release location
+     * as well as any intermediate points since the last down or move event.
+     */
+    AMOTION_EVENT_ACTION_UP = 1,
+
+    /* A change has happened during a press gesture (between AMOTION_EVENT_ACTION_DOWN and
+     * AMOTION_EVENT_ACTION_UP).  The motion contains the most recent point, as well as
+     * any intermediate points since the last down or move event.
+     */
+    AMOTION_EVENT_ACTION_MOVE = 2,
+
+    /* The current gesture has been aborted.
+     * You will not receive any more points in it.  You should treat this as
+     * an up event, but not perform any action that you normally would.
+     */
+    AMOTION_EVENT_ACTION_CANCEL = 3,
+
+    /* A movement has happened outside of the normal bounds of the UI element.
+     * This does not provide a full gesture, but only the initial location of the movement/touch.
+     */
+    AMOTION_EVENT_ACTION_OUTSIDE = 4,
+
+    /* A non-primary pointer has gone down.
+     * The bits in AMOTION_EVENT_ACTION_POINTER_INDEX_MASK indicate which pointer changed.
+     */
+    AMOTION_EVENT_ACTION_POINTER_DOWN = 5,
+
+    /* A non-primary pointer has gone up.
+     * The bits in AMOTION_EVENT_ACTION_POINTER_INDEX_MASK indicate which pointer changed.
+     */
+    AMOTION_EVENT_ACTION_POINTER_UP = 6
+};
+
+/*
+ * Motion event edge touch flags.
+ */
+enum {
+    /* No edges intersected */
+    AMOTION_EVENT_EDGE_FLAG_NONE = 0,
+
+    /* Flag indicating the motion event intersected the top edge of the screen. */
+    AMOTION_EVENT_EDGE_FLAG_TOP = 0x01,
+
+    /* Flag indicating the motion event intersected the bottom edge of the screen. */
+    AMOTION_EVENT_EDGE_FLAG_BOTTOM = 0x02,
+
+    /* Flag indicating the motion event intersected the left edge of the screen. */
+    AMOTION_EVENT_EDGE_FLAG_LEFT = 0x04,
+
+    /* Flag indicating the motion event intersected the right edge of the screen. */
+    AMOTION_EVENT_EDGE_FLAG_RIGHT = 0x08
+};
+
+/*
+ * Input sources.
+ *
+ * The appropriate interpretation for an input event depends on its source.
+ * Refer to the documentation on android.view.InputDevice for more details about input sources
+ * and their correct interpretation.
+ */
+enum {
+    AINPUT_SOURCE_CLASS_MASK = 0x000000ff,
+
+    AINPUT_SOURCE_CLASS_BUTTON = 0x00000001,
+    AINPUT_SOURCE_CLASS_POINTER = 0x00000002,
+    AINPUT_SOURCE_CLASS_NAVIGATION = 0x00000004,
+    AINPUT_SOURCE_CLASS_POSITION = 0x00000008,
+    AINPUT_SOURCE_CLASS_JOYSTICK = 0x00000010,
+};
+
+enum {
+    AINPUT_SOURCE_UNKNOWN = 0x00000000,
+
+    AINPUT_SOURCE_KEYBOARD = 0x00000100 | AINPUT_SOURCE_CLASS_BUTTON,
+    AINPUT_SOURCE_DPAD = 0x00000200 | AINPUT_SOURCE_CLASS_BUTTON,
+    AINPUT_SOURCE_GAMEPAD = 0x00000400 | AINPUT_SOURCE_CLASS_BUTTON,
+    AINPUT_SOURCE_TOUCHSCREEN = 0x00001000 | AINPUT_SOURCE_CLASS_POINTER,
+    AINPUT_SOURCE_MOUSE = 0x00002000 | AINPUT_SOURCE_CLASS_POINTER,
+    AINPUT_SOURCE_TRACKBALL = 0x00010000 | AINPUT_SOURCE_CLASS_NAVIGATION,
+    AINPUT_SOURCE_TOUCHPAD = 0x00100000 | AINPUT_SOURCE_CLASS_POSITION,
+    AINPUT_SOURCE_JOYSTICK_LEFT = 0x01000000 | AINPUT_SOURCE_CLASS_JOYSTICK,
+    AINPUT_SOURCE_JOYSTICK_RIGHT = 0x02000000 | AINPUT_SOURCE_CLASS_JOYSTICK,
+};
+
+/*
+ * Input event accessors.
+ *
+ * Note that most functions can only be used on input events that are of a given type.
+ * Calling these functions on input events of other types will yield undefined behavior.
+ */
+
+/*** Accessors for all input events. ***/
+
+/* Get the input event type. */
+int32_t AInputEvent_getType(const AInputEvent* event);
+
+/* Get the id for the device that an input event came from.
+ *
+ * Input events can be generated by multiple different input devices.
+ * Use the input device id to obtain information about the input
+ * device that was responsible for generating a particular event.
+ *
+ * An input device id of 0 indicates that the event didn't come from a physical device;
+ * other numbers are arbitrary and you shouldn't depend on the values.
+ * Use the provided input device query API to obtain information about input devices.
+ */
+int32_t AInputEvent_getDeviceId(const AInputEvent* event);
+
+/* Get the input event source. */
+int32_t AInputEvent_getSource(const AInputEvent* event);
+
+/*** Accessors for key events only. ***/
+
+/* Get the key event action. */
+int32_t AKeyEvent_getAction(const AInputEvent* key_event);
+
+/* Get the key event flags. */
+int32_t AKeyEvent_getFlags(const AInputEvent* key_event);
+
+/* Get the key code of the key event.
+ * This is the physical key that was pressed, not the Unicode character. */
+int32_t AKeyEvent_getKeyCode(const AInputEvent* key_event);
+
+/* Get the hardware key id of this key event.
+ * These values are not reliable and vary from device to device. */
+int32_t AKeyEvent_getScanCode(const AInputEvent* key_event);
+
+/* Get the meta key state. */
+int32_t AKeyEvent_getMetaState(const AInputEvent* key_event);
+
+/* Get the repeat count of the event.
+ * For both key up an key down events, this is the number of times the key has
+ * repeated with the first down starting at 0 and counting up from there.  For
+ * multiple key events, this is the number of down/up pairs that have occurred. */
+int32_t AKeyEvent_getRepeatCount(const AInputEvent* key_event);
+
+/* Get the time of the most recent key down event, in the
+ * java.lang.System.nanoTime() time base.  If this is a down event,
+ * this will be the same as eventTime.
+ * Note that when chording keys, this value is the down time of the most recently
+ * pressed key, which may not be the same physical key of this event. */
+int64_t AKeyEvent_getDownTime(const AInputEvent* key_event);
+
+/* Get the time this event occurred, in the
+ * java.lang.System.nanoTime() time base. */
+int64_t AKeyEvent_getEventTime(const AInputEvent* key_event);
+
+/*** Accessors for motion events only. ***/
+
+/* Get the combined motion event action code and pointer index. */
+int32_t AMotionEvent_getAction(const AInputEvent* motion_event);
+
+/* Get the state of any meta / modifier keys that were in effect when the
+ * event was generated. */
+int32_t AMotionEvent_getMetaState(const AInputEvent* motion_event);
+
+/* Get a bitfield indicating which edges, if any, were touched by this motion event.
+ * For touch events, clients can use this to determine if the user's finger was
+ * touching the edge of the display. */
+int32_t AMotionEvent_getEdgeFlags(const AInputEvent* motion_event);
+
+/* Get the time when the user originally pressed down to start a stream of
+ * position events, in the java.lang.System.nanoTime() time base. */
+int64_t AMotionEvent_getDownTime(const AInputEvent* motion_event);
+
+/* Get the time when this specific event was generated,
+ * in the java.lang.System.nanoTime() time base. */
+int64_t AMotionEvent_getEventTime(const AInputEvent* motion_event);
+
+/* Get the X coordinate offset.
+ * For touch events on the screen, this is the delta that was added to the raw
+ * screen coordinates to adjust for the absolute position of the containing windows
+ * and views. */
+float AMotionEvent_getXOffset(const AInputEvent* motion_event);
+
+/* Get the precision of the Y coordinates being reported.
+ * For touch events on the screen, this is the delta that was added to the raw
+ * screen coordinates to adjust for the absolute position of the containing windows
+ * and views. */
+float AMotionEvent_getYOffset(const AInputEvent* motion_event);
+
+/* Get the precision of the X coordinates being reported.
+ * You can multiply this number with an X coordinate sample to find the
+ * actual hardware value of the X coordinate. */
+float AMotionEvent_getXPrecision(const AInputEvent* motion_event);
+
+/* Get the precision of the Y coordinates being reported.
+ * You can multiply this number with a Y coordinate sample to find the
+ * actual hardware value of the Y coordinate. */
+float AMotionEvent_getYPrecision(const AInputEvent* motion_event);
+
+/* Get the number of pointers of data contained in this event.
+ * Always >= 1. */
+size_t AMotionEvent_getPointerCount(const AInputEvent* motion_event);
+
+/* Get the pointer identifier associated with a particular pointer
+ * data index is this event.  The identifier tells you the actual pointer
+ * number associated with the data, accounting for individual pointers
+ * going up and down since the start of the current gesture. */
+int32_t AMotionEvent_getPointerId(const AInputEvent* motion_event, size_t pointer_index);
+
+/* Get the original raw X coordinate of this event.
+ * For touch events on the screen, this is the original location of the event
+ * on the screen, before it had been adjusted for the containing window
+ * and views. */
+float AMotionEvent_getRawX(const AInputEvent* motion_event, size_t pointer_index);
+
+/* Get the original raw X coordinate of this event.
+ * For touch events on the screen, this is the original location of the event
+ * on the screen, before it had been adjusted for the containing window
+ * and views. */
+float AMotionEvent_getRawY(const AInputEvent* motion_event, size_t pointer_index);
+
+/* Get the current X coordinate of this event for the given pointer index.
+ * Whole numbers are pixels; the value may have a fraction for input devices
+ * that are sub-pixel precise. */
+float AMotionEvent_getX(const AInputEvent* motion_event, size_t pointer_index);
+
+/* Get the current Y coordinate of this event for the given pointer index.
+ * Whole numbers are pixels; the value may have a fraction for input devices
+ * that are sub-pixel precise. */
+float AMotionEvent_getY(const AInputEvent* motion_event, size_t pointer_index);
+
+/* Get the current pressure of this event for the given pointer index.
+ * The pressure generally ranges from 0 (no pressure at all) to 1 (normal pressure),
+ * however values higher than 1 may be generated depending on the calibration of
+ * the input device. */
+float AMotionEvent_getPressure(const AInputEvent* motion_event, size_t pointer_index);
+
+/* Get the current scaled value of the approximate size for the given pointer index.
+ * This represents some approximation of the area of the screen being
+ * pressed; the actual value in pixels corresponding to the
+ * touch is normalized with the device specific range of values
+ * and scaled to a value between 0 and 1.  The value of size can be used to
+ * determine fat touch events. */
+float AMotionEvent_getSize(const AInputEvent* motion_event, size_t pointer_index);
+
+/* Get the current length of the major axis of an ellipse that describes the touch area
+ * at the point of contact for the given pointer index. */
+float AMotionEvent_getTouchMajor(const AInputEvent* motion_event, size_t pointer_index);
+
+/* Get the current length of the minor axis of an ellipse that describes the touch area
+ * at the point of contact for the given pointer index. */
+float AMotionEvent_getTouchMinor(const AInputEvent* motion_event, size_t pointer_index);
+
+/* Get the current length of the major axis of an ellipse that describes the size
+ * of the approaching tool for the given pointer index.
+ * The tool area represents the estimated size of the finger or pen that is
+ * touching the device independent of its actual touch area at the point of contact. */
+float AMotionEvent_getToolMajor(const AInputEvent* motion_event, size_t pointer_index);
+
+/* Get the current length of the minor axis of an ellipse that describes the size
+ * of the approaching tool for the given pointer index.
+ * The tool area represents the estimated size of the finger or pen that is
+ * touching the device independent of its actual touch area at the point of contact. */
+float AMotionEvent_getToolMinor(const AInputEvent* motion_event, size_t pointer_index);
+
+/* Get the current orientation of the touch area and tool area in radians clockwise from
+ * vertical for the given pointer index.
+ * An angle of 0 degrees indicates that the major axis of contact is oriented
+ * upwards, is perfectly circular or is of unknown orientation.  A positive angle
+ * indicates that the major axis of contact is oriented to the right.  A negative angle
+ * indicates that the major axis of contact is oriented to the left.
+ * The full range is from -PI/4 radians (finger pointing fully left) to PI/4 radians
+ * (finger pointing fully right). */
+float AMotionEvent_getOrientation(const AInputEvent* motion_event, size_t pointer_index);
+
+/* Get the number of historical points in this event.  These are movements that
+ * have occurred between this event and the previous event.  This only applies
+ * to AMOTION_EVENT_ACTION_MOVE events -- all other actions will have a size of 0.
+ * Historical samples are indexed from oldest to newest. */
+size_t AMotionEvent_getHistorySize(const AInputEvent* motion_event);
+
+/* Get the time that a historical movement occurred between this event and
+ * the previous event, in the java.lang.System.nanoTime() time base. */
+int64_t AMotionEvent_getHistoricalEventTime(AInputEvent* motion_event,
+        size_t history_index);
+
+/* Get the historical raw X coordinate of this event for the given pointer index that
+ * occurred between this event and the previous motion event.
+ * For touch events on the screen, this is the original location of the event
+ * on the screen, before it had been adjusted for the containing window
+ * and views.
+ * Whole numbers are pixels; the value may have a fraction for input devices
+ * that are sub-pixel precise. */
+float AMotionEvent_getHistoricalRawX(const AInputEvent* motion_event, size_t pointer_index);
+
+/* Get the historical raw Y coordinate of this event for the given pointer index that
+ * occurred between this event and the previous motion event.
+ * For touch events on the screen, this is the original location of the event
+ * on the screen, before it had been adjusted for the containing window
+ * and views.
+ * Whole numbers are pixels; the value may have a fraction for input devices
+ * that are sub-pixel precise. */
+float AMotionEvent_getHistoricalRawY(const AInputEvent* motion_event, size_t pointer_index);
+
+/* Get the historical X coordinate of this event for the given pointer index that
+ * occurred between this event and the previous motion event.
+ * Whole numbers are pixels; the value may have a fraction for input devices
+ * that are sub-pixel precise. */
+float AMotionEvent_getHistoricalX(AInputEvent* motion_event, size_t pointer_index,
+        size_t history_index);
+
+/* Get the historical Y coordinate of this event for the given pointer index that
+ * occurred between this event and the previous motion event.
+ * Whole numbers are pixels; the value may have a fraction for input devices
+ * that are sub-pixel precise. */
+float AMotionEvent_getHistoricalY(AInputEvent* motion_event, size_t pointer_index,
+        size_t history_index);
+
+/* Get the historical pressure of this event for the given pointer index that
+ * occurred between this event and the previous motion event.
+ * The pressure generally ranges from 0 (no pressure at all) to 1 (normal pressure),
+ * however values higher than 1 may be generated depending on the calibration of
+ * the input device. */
+float AMotionEvent_getHistoricalPressure(AInputEvent* motion_event, size_t pointer_index,
+        size_t history_index);
+
+/* Get the current scaled value of the approximate size for the given pointer index that
+ * occurred between this event and the previous motion event.
+ * This represents some approximation of the area of the screen being
+ * pressed; the actual value in pixels corresponding to the
+ * touch is normalized with the device specific range of values
+ * and scaled to a value between 0 and 1.  The value of size can be used to
+ * determine fat touch events. */
+float AMotionEvent_getHistoricalSize(AInputEvent* motion_event, size_t pointer_index,
+        size_t history_index);
+
+/* Get the historical length of the major axis of an ellipse that describes the touch area
+ * at the point of contact for the given pointer index that
+ * occurred between this event and the previous motion event. */
+float AMotionEvent_getHistoricalTouchMajor(const AInputEvent* motion_event, size_t pointer_index,
+        size_t history_index);
+
+/* Get the historical length of the minor axis of an ellipse that describes the touch area
+ * at the point of contact for the given pointer index that
+ * occurred between this event and the previous motion event. */
+float AMotionEvent_getHistoricalTouchMinor(const AInputEvent* motion_event, size_t pointer_index,
+        size_t history_index);
+
+/* Get the historical length of the major axis of an ellipse that describes the size
+ * of the approaching tool for the given pointer index that
+ * occurred between this event and the previous motion event.
+ * The tool area represents the estimated size of the finger or pen that is
+ * touching the device independent of its actual touch area at the point of contact. */
+float AMotionEvent_getHistoricalToolMajor(const AInputEvent* motion_event, size_t pointer_index,
+        size_t history_index);
+
+/* Get the historical length of the minor axis of an ellipse that describes the size
+ * of the approaching tool for the given pointer index that
+ * occurred between this event and the previous motion event.
+ * The tool area represents the estimated size of the finger or pen that is
+ * touching the device independent of its actual touch area at the point of contact. */
+float AMotionEvent_getHistoricalToolMinor(const AInputEvent* motion_event, size_t pointer_index,
+        size_t history_index);
+
+/* Get the historical orientation of the touch area and tool area in radians clockwise from
+ * vertical for the given pointer index that
+ * occurred between this event and the previous motion event.
+ * An angle of 0 degrees indicates that the major axis of contact is oriented
+ * upwards, is perfectly circular or is of unknown orientation.  A positive angle
+ * indicates that the major axis of contact is oriented to the right.  A negative angle
+ * indicates that the major axis of contact is oriented to the left.
+ * The full range is from -PI/4 radians (finger pointing fully left) to PI/4 radians
+ * (finger pointing fully right). */
+float AMotionEvent_getHistoricalOrientation(const AInputEvent* motion_event, size_t pointer_index,
+        size_t history_index);
+
+
+/*
+ * Input queue
+ *
+ * An input queue is the facility through which you retrieve input
+ * events.
+ */
+struct AInputQueue;
+typedef struct AInputQueue AInputQueue;
+
+/*
+ * Add this input queue to a looper for processing.  See
+ * ALooper_addFd() for information on the callback and data params.
+ */
+void AInputQueue_attachLooper(AInputQueue* queue, ALooper* looper,
+        ALooper_callbackFunc* callback, void* data);
+
+/*
+ * Remove the input queue from the looper it is currently attached to.
+ */
+void AInputQueue_detachLooper(AInputQueue* queue);
+
+/*
+ * Returns true if there are one or more events available in the
+ * input queue.  Returns 1 if the queue has events; 0 if
+ * it does not have events; and a negative value if there is an error.
+ */
+int32_t AInputQueue_hasEvents(AInputQueue* queue);
+
+/*
+ * Returns the next available event from the queue.  Returns a negative
+ * value if no events are available or an error has occurred.
+ */
+int32_t AInputQueue_getEvent(AInputQueue* queue, AInputEvent** outEvent);
+
+/*
+ * Sends the key for standard pre-dispatching -- that is, possibly deliver
+ * it to the current IME to be consumed before the app.  Returns 0 if it
+ * was not pre-dispatched, meaning you can process it right now.  If non-zero
+ * is returned, you must abandon the current event processing and allow the
+ * event to appear again in the event queue (if it does not get consumed during
+ * pre-dispatching).
+ */
+int32_t AInputQueue_preDispatchEvent(AInputQueue* queue, AInputEvent* event);
+
+/*
+ * Report that dispatching has finished with the given event.
+ * This must be called after receiving an event with AInputQueue_get_event().
+ */
+void AInputQueue_finishEvent(AInputQueue* queue, AInputEvent* event, int handled);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif // _ANDROID_INPUT_H
diff --git a/native/include/android/keycodes.h b/native/include/android/keycodes.h
new file mode 100644
index 0000000..496eccc0
--- /dev/null
+++ b/native/include/android/keycodes.h
@@ -0,0 +1,166 @@
+/*
+ * Copyright (C) 2010 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef _ANDROID_KEYCODES_H
+#define _ANDROID_KEYCODES_H
+
+/******************************************************************
+ *
+ * IMPORTANT NOTICE:
+ *
+ *   This file is part of Android's set of stable system headers
+ *   exposed by the Android NDK (Native Development Kit).
+ *
+ *   Third-party source AND binary code relies on the definitions
+ *   here to be FROZEN ON ALL UPCOMING PLATFORM RELEASES.
+ *
+ *   - DO NOT MODIFY ENUMS (EXCEPT IF YOU ADD NEW 32-BIT VALUES)
+ *   - DO NOT MODIFY CONSTANTS OR FUNCTIONAL MACROS
+ *   - DO NOT CHANGE THE SIGNATURE OF FUNCTIONS IN ANY WAY
+ *   - DO NOT CHANGE THE LAYOUT OR SIZE OF STRUCTURES
+ */
+
+#include <sys/types.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/*
+ * Key codes.
+ */
+enum {
+    AKEYCODE_UNKNOWN         = 0,
+    AKEYCODE_SOFT_LEFT       = 1,
+    AKEYCODE_SOFT_RIGHT      = 2,
+    AKEYCODE_HOME            = 3,
+    AKEYCODE_BACK            = 4,
+    AKEYCODE_CALL            = 5,
+    AKEYCODE_ENDCALL         = 6,
+    AKEYCODE_0               = 7,
+    AKEYCODE_1               = 8,
+    AKEYCODE_2               = 9,
+    AKEYCODE_3               = 10,
+    AKEYCODE_4               = 11,
+    AKEYCODE_5               = 12,
+    AKEYCODE_6               = 13,
+    AKEYCODE_7               = 14,
+    AKEYCODE_8               = 15,
+    AKEYCODE_9               = 16,
+    AKEYCODE_STAR            = 17,
+    AKEYCODE_POUND           = 18,
+    AKEYCODE_DPAD_UP         = 19,
+    AKEYCODE_DPAD_DOWN       = 20,
+    AKEYCODE_DPAD_LEFT       = 21,
+    AKEYCODE_DPAD_RIGHT      = 22,
+    AKEYCODE_DPAD_CENTER     = 23,
+    AKEYCODE_VOLUME_UP       = 24,
+    AKEYCODE_VOLUME_DOWN     = 25,
+    AKEYCODE_POWER           = 26,
+    AKEYCODE_CAMERA          = 27,
+    AKEYCODE_CLEAR           = 28,
+    AKEYCODE_A               = 29,
+    AKEYCODE_B               = 30,
+    AKEYCODE_C               = 31,
+    AKEYCODE_D               = 32,
+    AKEYCODE_E               = 33,
+    AKEYCODE_F               = 34,
+    AKEYCODE_G               = 35,
+    AKEYCODE_H               = 36,
+    AKEYCODE_I               = 37,
+    AKEYCODE_J               = 38,
+    AKEYCODE_K               = 39,
+    AKEYCODE_L               = 40,
+    AKEYCODE_M               = 41,
+    AKEYCODE_N               = 42,
+    AKEYCODE_O               = 43,
+    AKEYCODE_P               = 44,
+    AKEYCODE_Q               = 45,
+    AKEYCODE_R               = 46,
+    AKEYCODE_S               = 47,
+    AKEYCODE_T               = 48,
+    AKEYCODE_U               = 49,
+    AKEYCODE_V               = 50,
+    AKEYCODE_W               = 51,
+    AKEYCODE_X               = 52,
+    AKEYCODE_Y               = 53,
+    AKEYCODE_Z               = 54,
+    AKEYCODE_COMMA           = 55,
+    AKEYCODE_PERIOD          = 56,
+    AKEYCODE_ALT_LEFT        = 57,
+    AKEYCODE_ALT_RIGHT       = 58,
+    AKEYCODE_SHIFT_LEFT      = 59,
+    AKEYCODE_SHIFT_RIGHT     = 60,
+    AKEYCODE_TAB             = 61,
+    AKEYCODE_SPACE           = 62,
+    AKEYCODE_SYM             = 63,
+    AKEYCODE_EXPLORER        = 64,
+    AKEYCODE_ENVELOPE        = 65,
+    AKEYCODE_ENTER           = 66,
+    AKEYCODE_DEL             = 67,
+    AKEYCODE_GRAVE           = 68,
+    AKEYCODE_MINUS           = 69,
+    AKEYCODE_EQUALS          = 70,
+    AKEYCODE_LEFT_BRACKET    = 71,
+    AKEYCODE_RIGHT_BRACKET   = 72,
+    AKEYCODE_BACKSLASH       = 73,
+    AKEYCODE_SEMICOLON       = 74,
+    AKEYCODE_APOSTROPHE      = 75,
+    AKEYCODE_SLASH           = 76,
+    AKEYCODE_AT              = 77,
+    AKEYCODE_NUM             = 78,
+    AKEYCODE_HEADSETHOOK     = 79,
+    AKEYCODE_FOCUS           = 80,   // *Camera* focus
+    AKEYCODE_PLUS            = 81,
+    AKEYCODE_MENU            = 82,
+    AKEYCODE_NOTIFICATION    = 83,
+    AKEYCODE_SEARCH          = 84,
+    AKEYCODE_MEDIA_PLAY_PAUSE= 85,
+    AKEYCODE_MEDIA_STOP      = 86,
+    AKEYCODE_MEDIA_NEXT      = 87,
+    AKEYCODE_MEDIA_PREVIOUS  = 88,
+    AKEYCODE_MEDIA_REWIND    = 89,
+    AKEYCODE_MEDIA_FAST_FORWARD = 90,
+    AKEYCODE_MUTE            = 91,
+    AKEYCODE_PAGE_UP         = 92,
+    AKEYCODE_PAGE_DOWN       = 93,
+    AKEYCODE_PICTSYMBOLS     = 94,
+    AKEYCODE_SWITCH_CHARSET  = 95,
+    AKEYCODE_BUTTON_A        = 96,
+    AKEYCODE_BUTTON_B        = 97,
+    AKEYCODE_BUTTON_C        = 98,
+    AKEYCODE_BUTTON_X        = 99,
+    AKEYCODE_BUTTON_Y        = 100,
+    AKEYCODE_BUTTON_Z        = 101,
+    AKEYCODE_BUTTON_L1       = 102,
+    AKEYCODE_BUTTON_R1       = 103,
+    AKEYCODE_BUTTON_L2       = 104,
+    AKEYCODE_BUTTON_R2       = 105,
+    AKEYCODE_BUTTON_THUMBL   = 106,
+    AKEYCODE_BUTTON_THUMBR   = 107,
+    AKEYCODE_BUTTON_START    = 108,
+    AKEYCODE_BUTTON_SELECT   = 109,
+    AKEYCODE_BUTTON_MODE     = 110,
+
+    // NOTE: If you add a new keycode here you must also add it to several other files.
+    //       Refer to frameworks/base/core/java/android/view/KeyEvent.java for the full list.
+};
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif // _ANDROID_KEYCODES_H
diff --git a/native/include/android/looper.h b/native/include/android/looper.h
new file mode 100644
index 0000000..2917216
--- /dev/null
+++ b/native/include/android/looper.h
@@ -0,0 +1,177 @@
+/*
+ * Copyright (C) 2010 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+
+#ifndef ANDROID_LOOPER_H
+#define ANDROID_LOOPER_H
+
+#include <poll.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ * ALooper
+ *
+ * A looper is the state tracking an event loop for a thread.
+ * Loopers do not define event structures or other such things; rather
+ * they are a lower-level facility to attach one or more discrete objects
+ * listening for an event.  An "event" here is simply data available on
+ * a file descriptor: each attached object has an associated file descriptor,
+ * and waiting for "events" means (internally) polling on all of these file
+ * descriptors until one or more of them have data available.
+ *
+ * A thread can have only one ALooper associated with it.
+ */
+struct ALooper;
+typedef struct ALooper ALooper;
+
+/**
+ * For callback-based event loops, this is the prototype of the function
+ * that is called.  It is given the file descriptor it is associated with,
+ * a bitmask of the poll events that were triggered (typically POLLIN), and
+ * the data pointer that was originally supplied.
+ *
+ * Implementations should return 1 to continue receiving callbacks, or 0
+ * to have this file descriptor and callback unregistered from the looper.
+ */
+typedef int ALooper_callbackFunc(int fd, int events, void* data);
+
+/**
+ * Return the ALooper associated with the calling thread, or NULL if
+ * there is not one.
+ */
+ALooper* ALooper_forThread();
+
+enum {
+    /**
+     * Option for ALooper_prepare: this ALooper will accept calls to
+     * ALooper_addFd() that do not have a callback (that is provide NULL
+     * for the callback).  In this case the caller of ALooper_pollOnce()
+     * or ALooper_pollAll() MUST check the return from these functions to
+     * discover when data is available on such fds and process it.
+     */
+    ALOOPER_PREPARE_ALLOW_NON_CALLBACKS = 1<<0
+};
+
+/**
+ * Prepare an ALooper associated with the calling thread, and return it.
+ * If the thread already has an ALooper, it is returned.  Otherwise, a new
+ * one is created, associated with the thread, and returned.
+ *
+ * The opts may be ALOOPER_PREPARE_ALLOW_NON_CALLBACKS or 0.
+ */
+ALooper* ALooper_prepare(int32_t opts);
+
+enum {
+    /**
+     * Result from ALooper_pollOnce() and ALooper_pollAll(): one or
+     * more callbacks were executed.
+     */
+    ALOOPER_POLL_CALLBACK = -1,
+    
+    /**
+     * Result from ALooper_pollOnce() and ALooper_pollAll(): the
+     * timeout expired.
+     */
+    ALOOPER_POLL_TIMEOUT = -2,
+    
+    /**
+     * Result from ALooper_pollOnce() and ALooper_pollAll(): an error
+     * occurred.
+     */
+    ALOOPER_POLL_ERROR = -3,
+};
+
+/**
+ * Wait for events to be available, with optional timeout in milliseconds.
+ * Invokes callbacks for all file descriptors on which an event occurred.
+ *
+ * If the timeout is zero, returns immediately without blocking.
+ * If the timeout is negative, waits indefinitely until an event appears.
+ *
+ * Returns ALOOPER_POLL_CALLBACK if a callback was invoked.
+ *
+ * Returns ALOOPER_POLL_TIMEOUT if there was no data before the given
+ * timeout expired.
+ *
+ * Returns ALOPER_POLL_ERROR if an error occurred.
+ *
+ * Returns a value >= 0 containing a file descriptor if it has data
+ * and it has no callback function (requiring the caller here to handle it).
+ * In this (and only this) case outEvents and outData will contain the poll
+ * events and data associated with the fd.
+ *
+ * This method does not return until it has finished invoking the appropriate callbacks
+ * for all file descriptors that were signalled.
+ */
+int32_t ALooper_pollOnce(int timeoutMillis, int* outEvents, void** outData);
+
+/**
+ * Like ALooper_pollOnce(), but performs all pending callbacks until all
+ * data has been consumed or a file descriptor is available with no callback.
+ * This function will never return ALOOPER_POLL_CALLBACK.
+ */
+int32_t ALooper_pollAll(int timeoutMillis, int* outEvents, void** outData);
+
+/**
+ * Acquire a reference on the given ALooper object.  This prevents the object
+ * from being deleted until the reference is removed.  This is only needed
+ * to safely hand an ALooper from one thread to another.
+ */
+void ALooper_acquire(ALooper* looper);
+
+/**
+ * Remove a reference that was previously acquired with ALooper_acquire().
+ */
+void ALooper_release(ALooper* looper);
+
+/**
+ * Add a new file descriptor to be polled by the looper.  If the same file
+ * descriptor was previously added, it is replaced.
+ *
+ * "fd" is the file descriptor to be added.
+ * "events" are the poll events to wake up on.  Typically this is POLLIN.
+ * "callback" is the function to call when there is an event on the file
+ * descriptor.
+ * "id" is an identifier to associated with this file descriptor, or 0.
+ * "data" is a private data pointer to supply to the callback.
+ *
+ * There are two main uses of this function:
+ *
+ * (1) If "callback" is non-NULL, then
+ * this function will be called when there is data on the file descriptor.  It
+ * should execute any events it has pending, appropriately reading from the
+ * file descriptor.
+ *
+ * (2) If "callback" is NULL, the fd will be returned by ALooper_pollOnce
+ * when it has data available, requiring the caller to take care of processing
+ * it.
+ */
+void ALooper_addFd(ALooper* looper, int fd, int events,
+        ALooper_callbackFunc* callback, void* data);
+
+/**
+ * Remove a previously added file descriptor from the looper.
+ */
+int32_t ALooper_removeFd(ALooper* looper, int fd);
+
+#ifdef __cplusplus
+};
+#endif
+
+#endif // ANDROID_NATIVE_WINDOW_H
diff --git a/native/include/android/native_activity.h b/native/include/android/native_activity.h
new file mode 100644
index 0000000..ee4204d
--- /dev/null
+++ b/native/include/android/native_activity.h
@@ -0,0 +1,254 @@
+/*
+ * Copyright (C) 2010 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+
+#ifndef ANDROID_NATIVE_ACTIVITY_H
+#define ANDROID_NATIVE_ACTIVITY_H
+
+#include <stdint.h>
+#include <sys/types.h>
+
+#include <jni.h>
+
+#include <android/asset_manager.h>
+#include <android/input.h>
+#include <android/native_window.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+struct ANativeActivityCallbacks;
+
+/**
+ * This structure defines the native side of an android.app.NativeActivity.
+ * It is created by the framework, and handed to the application's native
+ * code as it is being launched.
+ */
+typedef struct ANativeActivity {
+    /**
+     * Pointer to the callback function table of the native application.
+     * You can set the functions here to your own callbacks.  The callbacks
+     * pointer itself here should not be changed; it is allocated and managed
+     * for you by the framework.
+     */
+    struct ANativeActivityCallbacks* callbacks;
+
+    /**
+     * The global handle on the process's Java VM.
+     */
+    JavaVM* vm;
+
+    /**
+     * JNI context for the main thread of the app.  Note that this field
+     * can ONLY be used from the main thread of the process; that is, the
+     * thread that calls into the ANativeActivityCallbacks.
+     */
+    JNIEnv* env;
+
+    /**
+     * The NativeActivity Java class.
+     */
+    jobject clazz;
+
+    /**
+     * Path to this application's internal data directory.
+     */
+    const char* internalDataPath;
+    
+    /**
+     * Path to this application's external (removable/mountable) data directory.
+     */
+    const char* externalDataPath;
+    
+    /**
+     * The platform's SDK version code.
+     */
+    int32_t sdkVersion;
+    
+    /**
+     * This is the native instance of the application.  It is not used by
+     * the framework, but can be set by the application to its own instance
+     * state.
+     */
+    void* instance;
+
+    /**
+     * Pointer to the Asset Manager instance for the application.  The application
+     * uses this to access binary assets bundled inside its own .apk file.
+     */
+    AAssetManager* assetManager;
+} ANativeActivity;
+
+/**
+ * These are the callbacks the framework makes into a native application.
+ * All of these callbacks happen on the main thread of the application.
+ * By default, all callbacks are NULL; set to a pointer to your own function
+ * to have it called.
+ */
+typedef struct ANativeActivityCallbacks {
+    /**
+     * NativeActivity has started.  See Java documentation for Activity.onStart()
+     * for more information.
+     */
+    void (*onStart)(ANativeActivity* activity);
+    
+    /**
+     * NativeActivity has resumed.  See Java documentation for Activity.onResume()
+     * for more information.
+     */
+    void (*onResume)(ANativeActivity* activity);
+    
+    /**
+     * Framework is asking NativeActivity to save its current instance state.
+     * See Java documentation for Activity.onSaveInstanceState() for more
+     * information.  The returned pointer needs to be created with malloc();
+     * the framework will call free() on it for you.  You also must fill in
+     * outSize with the number of bytes in the allocation.  Note that the
+     * saved state will be persisted, so it can not contain any active
+     * entities (pointers to memory, file descriptors, etc).
+     */
+    void* (*onSaveInstanceState)(ANativeActivity* activity, size_t* outSize);
+    
+    /**
+     * NativeActivity has paused.  See Java documentation for Activity.onPause()
+     * for more information.
+     */
+    void (*onPause)(ANativeActivity* activity);
+    
+    /**
+     * NativeActivity has stopped.  See Java documentation for Activity.onStop()
+     * for more information.
+     */
+    void (*onStop)(ANativeActivity* activity);
+    
+    /**
+     * NativeActivity is being destroyed.  See Java documentation for Activity.onDestroy()
+     * for more information.
+     */
+    void (*onDestroy)(ANativeActivity* activity);
+
+    /**
+     * Focus has changed in this NativeActivity's window.  This is often used,
+     * for example, to pause a game when it loses input focus.
+     */
+    void (*onWindowFocusChanged)(ANativeActivity* activity, int hasFocus);
+    
+    /**
+     * The drawing window for this native activity has been created.  You
+     * can use the given native window object to start drawing.
+     */
+    void (*onNativeWindowCreated)(ANativeActivity* activity, ANativeWindow* window);
+
+    /**
+     * The drawing window for this native activity has been resized.  You should
+     * retrieve the new size from the window and ensure that your rendering in
+     * it now matches.
+     */
+    void (*onNativeWindowResized)(ANativeActivity* activity, ANativeWindow* window);
+
+    /**
+     * The drawing window for this native activity needs to be redrawn.  To avoid
+     * transient artifacts during screen changes (such resizing after rotation),
+     * applications should not return from this function until they have finished
+     * drawing their window in its current state.
+     */
+    void (*onNativeWindowRedrawNeeded)(ANativeActivity* activity, ANativeWindow* window);
+
+    /**
+     * The drawing window for this native activity is going to be destroyed.
+     * You MUST ensure that you do not touch the window object after returning
+     * from this function: in the common case of drawing to the window from
+     * another thread, that means the implementation of this callback must
+     * properly synchronize with the other thread to stop its drawing before
+     * returning from here.
+     */
+    void (*onNativeWindowDestroyed)(ANativeActivity* activity, ANativeWindow* window);
+    
+    /**
+     * The input queue for this native activity's window has been created.
+     * You can use the given input queue to start retrieving input events.
+     */
+    void (*onInputQueueCreated)(ANativeActivity* activity, AInputQueue* queue);
+    
+    /**
+     * The input queue for this native activity's window is being destroyed.
+     * You should no longer try to reference this object upon returning from this
+     * function.
+     */
+    void (*onInputQueueDestroyed)(ANativeActivity* activity, AInputQueue* queue);
+
+    /**
+     * The rectangle in the window in which content should be placed has changed.
+     */
+    void (*onContentRectChanged)(ANativeActivity* activity, const ARect* rect);
+
+    /**
+     * The system is running low on memory.  Use this callback to release
+     * resources you do not need, to help the system avoid killing more
+     * important processes.
+     */
+    void (*onLowMemory)(ANativeActivity* activity);
+} ANativeActivityCallbacks;
+
+/**
+ * This is the function that must be in the native code to instantiate the
+ * application's native activity.  It is called with the activity instance (see
+ * above); if the code is being instantiated from a previously saved instance,
+ * the savedState will be non-NULL and point to the saved data.
+ */
+typedef void ANativeActivity_createFunc(ANativeActivity* activity,
+        void* savedState, size_t savedStateSize);
+
+/**
+ * The name of the function that NativeInstance looks for when launching its
+ * native code.
+ */
+extern ANativeActivity_createFunc ANativeActivity_onCreate;
+
+void ANativeActivity_setWindowFormat(ANativeActivity* activity, int32_t format);
+
+void ANativeActivity_setWindowFlags(ANativeActivity* activity,
+        uint32_t addFlags, uint32_t removeFlags);
+
+/**
+ * Flags for ANativeActivity_showSoftInput; see the Java InputMethodManager
+ * API for documentation.
+ */
+enum {
+    ANATIVEACTIVITY_SHOW_SOFT_INPUT_IMPLICIT = 0x0001,
+    ANATIVEACTIVITY_SHOW_SOFT_INPUT_FORCED = 0x0002,
+};
+
+void ANativeActivity_showSoftInput(ANativeActivity* activity, uint32_t flags);
+
+/**
+ * Flags for ANativeActivity_hideSoftInput; see the Java InputMethodManager
+ * API for documentation.
+ */
+enum {
+    ANATIVEACTIVITY_HIDE_SOFT_INPUT_IMPLICIT_ONLY = 0x0001,
+    ANATIVEACTIVITY_HIDE_SOFT_INPUT_NOT_ALWAYS = 0x0002,
+};
+
+void ANativeActivity_hideSoftInput(ANativeActivity* activity, uint32_t flags);
+
+#ifdef __cplusplus
+};
+#endif
+
+#endif // ANDROID_NATIVE_ACTIVITY_H
+
diff --git a/native/include/android/native_window.h b/native/include/android/native_window.h
new file mode 100644
index 0000000..7599d7e
--- /dev/null
+++ b/native/include/android/native_window.h
@@ -0,0 +1,106 @@
+/*
+ * Copyright (C) 2010 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef ANDROID_NATIVE_WINDOW_H
+#define ANDROID_NATIVE_WINDOW_H
+
+#include <android/rect.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/*
+ * Pixel formats that a window can use.
+ */
+enum {
+    WINDOW_FORMAT_RGBA_8888          = 1,
+    WINDOW_FORMAT_RGBX_8888          = 2,
+    WINDOW_FORMAT_RGB_565            = 4,
+};
+
+struct ANativeWindow;
+typedef struct ANativeWindow ANativeWindow;
+
+typedef struct ANativeWindow_Buffer {
+    int32_t width;
+    int32_t height;
+    int32_t stride;
+    int32_t format;
+    void* bits;
+    
+    uint32_t reserved[6];
+} ANativeWindow_Buffer;
+
+/**
+ * Acquire a reference on the given ANativeWindow object.  This prevents the object
+ * from being deleted until the reference is removed.
+ */
+void ANativeWindow_acquire(ANativeWindow* window);
+
+/**
+ * Remove a reference that was previously acquired with ANativeWindow_acquire().
+ */
+void ANativeWindow_release(ANativeWindow* window);
+
+/*
+ * Return the current width in pixels of the window surface.  Returns a
+ * negative value on error.
+ */
+int32_t ANativeWindow_getWidth(ANativeWindow* window);
+
+/*
+ * Return the current height in pixels of the window surface.  Returns a
+ * negative value on error.
+ */
+int32_t ANativeWindow_getHeight(ANativeWindow* window);
+
+/*
+ * Return the current pixel format of the window surface.  Returns a
+ * negative value on error.
+ */
+int32_t ANativeWindow_getFormat(ANativeWindow* window);
+
+/*
+ * Change the format and size of the window buffers.
+ *
+ * The width and height control the number of pixels in the buffers, not the
+ * dimensions of the window on screen.  If these are different than the
+ * window's physical size, then it buffer will be scaled to match that size
+ * when compositing it to the screen.
+ *
+ * For all of these parameters, if 0 is supplied then the window's base
+ * value will come back in force.
+ */
+int32_t ANativeWindow_setBuffersGeometry(ANativeWindow* window, int32_t width, int32_t height);
+
+/**
+ * Lock the window's next drawing surface for writing.
+ */
+int32_t ANativeWindow_lock(ANativeWindow* window, ANativeWindow_Buffer* outBuffer,
+        ARect* inOutDirtyBounds);
+
+/**
+ * Unlock the window's drawing surface after previously locking it,
+ * posting the new buffer to the display.
+ */
+int32_t ANativeWindow_unlockAndPost(ANativeWindow* window);
+
+#ifdef __cplusplus
+};
+#endif
+
+#endif // ANDROID_NATIVE_WINDOW_H
diff --git a/native/include/android/native_window_jni.h b/native/include/android/native_window_jni.h
new file mode 100644
index 0000000..b9e72ef
--- /dev/null
+++ b/native/include/android/native_window_jni.h
@@ -0,0 +1,40 @@
+/*
+ * Copyright (C) 2010 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef ANDROID_NATIVE_WINDOW_JNI_H
+#define ANDROID_NATIVE_WINDOW_JNI_H
+
+#include <android/native_window.h>
+
+#include <jni.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ * Return the ANativeWindow associated with a Java Surface object,
+ * for interacting with it through native code.  This acquires a reference
+ * on the ANativeWindow that is returned; be sure to use ANativeWindow_release()
+ * when done with it so that it doesn't leak.
+ */
+ANativeWindow* ANativeWindow_fromSurface(JNIEnv* env, jobject surface);
+
+#ifdef __cplusplus
+};
+#endif
+
+#endif // ANDROID_NATIVE_WINDOW_H
diff --git a/native/include/android/rect.h b/native/include/android/rect.h
new file mode 100644
index 0000000..3e81f53
--- /dev/null
+++ b/native/include/android/rect.h
@@ -0,0 +1,36 @@
+/*
+ * Copyright (C) 2010 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+
+#ifndef ANDROID_RECT_H
+#define ANDROID_RECT_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+typedef struct ARect {
+    int32_t left;
+    int32_t top;
+    int32_t right;
+    int32_t bottom;
+} ARect;
+
+#ifdef __cplusplus
+};
+#endif
+
+#endif // ANDROID_RECT_H
diff --git a/native/include/android/sensor.h b/native/include/android/sensor.h
new file mode 100644
index 0000000..4291d3e
--- /dev/null
+++ b/native/include/android/sensor.h
@@ -0,0 +1,235 @@
+/*
+ * Copyright (C) 2010 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+
+#ifndef ANDROID_SENSOR_H
+#define ANDROID_SENSOR_H
+
+/******************************************************************
+ *
+ * IMPORTANT NOTICE:
+ *
+ *   This file is part of Android's set of stable system headers
+ *   exposed by the Android NDK (Native Development Kit).
+ *
+ *   Third-party source AND binary code relies on the definitions
+ *   here to be FROZEN ON ALL UPCOMING PLATFORM RELEASES.
+ *
+ *   - DO NOT MODIFY ENUMS (EXCEPT IF YOU ADD NEW 32-BIT VALUES)
+ *   - DO NOT MODIFY CONSTANTS OR FUNCTIONAL MACROS
+ *   - DO NOT CHANGE THE SIGNATURE OF FUNCTIONS IN ANY WAY
+ *   - DO NOT CHANGE THE LAYOUT OR SIZE OF STRUCTURES
+ */
+
+/*
+ * Structures and functions to receive and process sensor events in
+ * native code.
+ *
+ */
+
+#include <sys/types.h>
+
+#include <android/looper.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
+/*
+ * Sensor types
+ * (keep in sync with hardware/sensor.h)
+ */
+
+enum {
+    ASENSOR_TYPE_ACCELEROMETER      = 1,
+    ASENSOR_TYPE_MAGNETIC_FIELD     = 2,
+    ASENSOR_TYPE_GYROSCOPE          = 4,
+    ASENSOR_TYPE_LIGHT              = 5,
+    ASENSOR_TYPE_PROXIMITY          = 8
+};
+
+/*
+ * Sensor accuracy measure
+ */
+enum {
+    ASENSOR_STATUS_UNRELIABLE       = 0,
+    ASENSOR_STATUS_ACCURACY_LOW     = 1,
+    ASENSOR_STATUS_ACCURACY_MEDIUM  = 2,
+    ASENSOR_STATUS_ACCURACY_HIGH    = 3
+};
+
+/*
+ * A few useful constants
+ */
+
+/* Earth's gravity in m/s^2 */
+#define ASENSOR_STANDARD_GRAVITY            (9.80665f)
+/* Maximum magnetic field on Earth's surface in uT */
+#define ASENSOR_MAGNETIC_FIELD_EARTH_MAX    (60.0f)
+/* Minimum magnetic field on Earth's surface in uT*/
+#define ASENSOR_MAGNETIC_FIELD_EARTH_MIN    (30.0f)
+
+/*
+ * A sensor event.
+ */
+
+typedef struct ASensorVector {
+    union {
+        float v[3];
+        struct {
+            float x;
+            float y;
+            float z;
+        };
+    };
+    int8_t status;
+    uint8_t reserved[3];
+} ASensorVector;
+
+typedef struct ASensorEvent {
+    int sensor;
+    int32_t reserved0;
+    union {
+        float           data[16];
+        ASensorVector   acceleration;
+        ASensorVector   magnetic;
+        float           temperature;
+        float           distance;
+        float           light;
+    };
+    int64_t timestamp;
+    int32_t reserved1[4];
+} ASensorEvent;
+
+
+struct ASensorManager;
+typedef struct ASensorManager ASensorManager;
+
+struct ASensorEventQueue;
+typedef struct ASensorEventQueue ASensorEventQueue;
+
+struct ASensor;
+typedef struct ASensor ASensor;
+
+/*****************************************************************************/
+
+/*
+ * Get a reference to the sensor manager. ASensorManager is a singleton.
+ *
+ * Example:
+ *
+ *     ASensorManager* sensorManager = ASensorManager_getInstance();
+ *
+ */
+ASensorManager* ASensorManager_getInstance();
+
+
+/*
+ * Returns the list of available sensors.
+ */
+int ASensorManager_getSensorList(ASensorManager* manager, ASensor** list);
+
+/*
+ * Returns the default sensor for the given type, or NULL if no sensor
+ * of that type exist.
+ */
+ASensor* ASensorManager_getDefaultSensor(ASensorManager* manager, int type);
+
+/*
+ * Creates a new sensor event queue and associate it with a looper.
+ */
+ASensorEventQueue* ASensorManager_createEventQueue(ASensorManager* manager,
+        ALooper* looper, ALooper_callbackFunc* callback, void* data);
+
+/*
+ * Destroys the event queue and free all resources associated to it.
+ */
+int ASensorManager_destroyEventQueue(ASensorManager* manager, ASensorEventQueue* queue);
+
+
+/*****************************************************************************/
+
+/*
+ * Enable the selected sensor. Returns a negative error code on failure.
+ */
+int ASensorEventQueue_enableSensor(ASensorEventQueue* queue, ASensor* sensor);
+
+/*
+ * Disable the selected sensor. Returns a negative error code on failure.
+ */
+int ASensorEventQueue_disableSensor(ASensorEventQueue* queue, ASensor* sensor);
+
+/*
+ * Sets the delivery rate of events in microseconds for the given sensor.
+ * Note that this is a hint only, generally event will arrive at a higher
+ * rate.
+ * Returns a negative error code on failure.
+ */
+int ASensorEventQueue_setEventRate(ASensorEventQueue* queue, ASensor* sensor, int32_t usec);
+
+/*
+ * Returns true if there are one or more events available in the
+ * sensor queue.  Returns 1 if the queue has events; 0 if
+ * it does not have events; and a negative value if there is an error.
+ */
+int ASensorEventQueue_hasEvents(ASensorEventQueue* queue);
+
+/*
+ * Returns the next available events from the queue.  Returns a negative
+ * value if no events are available or an error has occurred, otherwise
+ * the number of events returned.
+ *
+ * Examples:
+ *   ASensorEvent event;
+ *   ssize_t numEvent = ASensorEventQueue_getEvents(queue, &event, 1);
+ *
+ *   ASensorEvent eventBuffer[8];
+ *   ssize_t numEvent = ASensorEventQueue_getEvents(queue, eventBuffer, 8);
+ *
+ */
+ssize_t ASensorEventQueue_getEvents(ASensorEventQueue* queue,
+                ASensorEvent* events, size_t count);
+
+
+/*****************************************************************************/
+
+/*
+ * Returns this sensor's name (non localized)
+ */
+const char* ASensor_getName(ASensor* sensor);
+
+/*
+ * Returns this sensor's vendor's name (non localized)
+ */
+const char* ASensor_getVendor(ASensor* sensor);
+
+/*
+ * Return this sensor's type
+ */
+int ASensor_getType(ASensor* sensor);
+
+/*
+ * Returns this sensors's resolution
+ */
+float ASensor_getResolution(ASensor* sensor);
+
+
+#ifdef __cplusplus
+};
+#endif
+
+#endif // ANDROID_SENSOR_H
diff --git a/native/include/android/window.h b/native/include/android/window.h
new file mode 100644
index 0000000..2ab192b
--- /dev/null
+++ b/native/include/android/window.h
@@ -0,0 +1,58 @@
+/*
+ * Copyright (C) 2010 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+
+#ifndef ANDROID_WINDOW_H
+#define ANDROID_WINDOW_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ * Window flags, as per the Java API at android.view.WindowManager.LayoutParams.
+ */
+enum {
+    AWINDOW_FLAG_ALLOW_LOCK_WHILE_SCREEN_ON = 0x00000001,
+    AWINDOW_FLAG_DIM_BEHIND                 = 0x00000002,
+    AWINDOW_FLAG_BLUR_BEHIND                = 0x00000004,
+    AWINDOW_FLAG_NOT_FOCUSABLE              = 0x00000008,
+    AWINDOW_FLAG_NOT_TOUCHABLE              = 0x00000010,
+    AWINDOW_FLAG_NOT_TOUCH_MODAL            = 0x00000020,
+    AWINDOW_FLAG_TOUCHABLE_WHEN_WAKING      = 0x00000040,
+    AWINDOW_FLAG_KEEP_SCREEN_ON             = 0x00000080,
+    AWINDOW_FLAG_LAYOUT_IN_SCREEN           = 0x00000100,
+    AWINDOW_FLAG_LAYOUT_NO_LIMITS           = 0x00000200,
+    AWINDOW_FLAG_FULLSCREEN                 = 0x00000400,
+    AWINDOW_FLAG_FORCE_NOT_FULLSCREEN       = 0x00000800,
+    AWINDOW_FLAG_DITHER                     = 0x00001000,
+    AWINDOW_FLAG_SECURE                     = 0x00002000,
+    AWINDOW_FLAG_SCALED                     = 0x00004000,
+    AWINDOW_FLAG_IGNORE_CHEEK_PRESSES       = 0x00008000,
+    AWINDOW_FLAG_LAYOUT_INSET_DECOR         = 0x00010000,
+    AWINDOW_FLAG_ALT_FOCUSABLE_IM           = 0x00020000,
+    AWINDOW_FLAG_WATCH_OUTSIDE_TOUCH        = 0x00040000,
+    AWINDOW_FLAG_SHOW_WHEN_LOCKED           = 0x00080000,
+    AWINDOW_FLAG_SHOW_WALLPAPER             = 0x00100000,
+    AWINDOW_FLAG_TURN_SCREEN_ON             = 0x00200000,
+    AWINDOW_FLAG_DISMISS_KEYGUARD           = 0x00400000,
+};
+
+#ifdef __cplusplus
+};
+#endif
+
+#endif // ANDROID_WINDOW_H
diff --git a/opengl/include/EGL/egl.h b/opengl/include/EGL/egl.h
index c269976..99ea342 100644
--- a/opengl/include/EGL/egl.h
+++ b/opengl/include/EGL/egl.h
@@ -1,7 +1,7 @@
 /* -*- mode: c; tab-width: 8; -*- */
 /* vi: set sw=4 ts=8: */
 /* Reference version of egl.h for EGL 1.4.
- * $Revision: 7244 $ on $Date: 2009-01-20 17:06:59 -0800 (Tue, 20 Jan 2009) $
+ * $Revision: 9356 $ on $Date: 2009-10-21 02:52:25 -0700 (Wed, 21 Oct 2009) $
  */
 
 /*
@@ -109,7 +109,6 @@
 #define EGL_NATIVE_RENDERABLE		0x302D
 #define EGL_NATIVE_VISUAL_ID		0x302E
 #define EGL_NATIVE_VISUAL_TYPE		0x302F
-#define EGL_PRESERVED_RESOURCES		0x3030
 #define EGL_SAMPLES			0x3031
 #define EGL_SAMPLE_BUFFERS		0x3032
 #define EGL_SURFACE_TYPE		0x3033
diff --git a/opengl/include/EGL/eglext.h b/opengl/include/EGL/eglext.h
index 545fd0e..b121158 100644
--- a/opengl/include/EGL/eglext.h
+++ b/opengl/include/EGL/eglext.h
@@ -6,7 +6,7 @@
 #endif
 
 /*
-** Copyright (c) 2007-2009 The Khronos Group Inc.
+** Copyright (c) 2007-2010 The Khronos Group Inc.
 **
 ** Permission is hereby granted, free of charge, to any person obtaining a
 ** copy of this software and/or associated documentation files (the
@@ -34,8 +34,8 @@
 
 /* Header file version number */
 /* Current version at http://www.khronos.org/registry/egl/ */
-/* $Revision: 7244 $ on $Date: 2009-01-20 17:06:59 -0800 (Tue, 20 Jan 2009) $ */
-#define EGL_EGLEXT_VERSION 3
+/* $Revision: 11249 $ on $Date: 2010-05-05 09:54:28 -0700 (Wed, 05 May 2010) $ */
+#define EGL_EGLEXT_VERSION 5
 
 #ifndef EGL_KHR_config_attribs
 #define EGL_KHR_config_attribs 1
@@ -120,6 +120,36 @@
 #define EGL_GL_RENDERBUFFER_KHR			0x30B9	/* eglCreateImageKHR target */
 #endif
 
+#ifndef EGL_KHR_reusable_sync
+#define EGL_KHR_reusable_sync 1
+
+typedef void* EGLSyncKHR;
+typedef khronos_utime_nanoseconds_t EGLTimeKHR;
+
+#define EGL_SYNC_STATUS_KHR			0x30F1
+#define EGL_SIGNALED_KHR			0x30F2
+#define EGL_UNSIGNALED_KHR			0x30F3
+#define EGL_TIMEOUT_EXPIRED_KHR			0x30F5
+#define EGL_CONDITION_SATISFIED_KHR		0x30F6
+#define EGL_SYNC_TYPE_KHR			0x30F7
+#define EGL_SYNC_REUSABLE_KHR			0x30FA
+#define EGL_SYNC_FLUSH_COMMANDS_BIT_KHR		0x0001	/* eglClientWaitSyncKHR <flags> bitfield */
+#define EGL_FOREVER_KHR				0xFFFFFFFFFFFFFFFFull
+#define EGL_NO_SYNC_KHR				((EGLSyncKHR)0)
+#ifdef EGL_EGLEXT_PROTOTYPES
+EGLAPI EGLSyncKHR EGLAPIENTRY eglCreateSyncKHR(EGLDisplay dpy, EGLenum type, const EGLint *attrib_list);
+EGLAPI EGLBoolean EGLAPIENTRY eglDestroySyncKHR(EGLDisplay dpy, EGLSyncKHR sync);
+EGLAPI EGLint EGLAPIENTRY eglClientWaitSyncKHR(EGLDisplay dpy, EGLSyncKHR sync, EGLint flags, EGLTimeKHR timeout);
+EGLAPI EGLBoolean EGLAPIENTRY eglSignalSyncKHR(EGLDisplay dpy, EGLSyncKHR sync, EGLenum mode);
+EGLAPI EGLBoolean EGLAPIENTRY eglGetSyncAttribKHR(EGLDisplay dpy, EGLSyncKHR sync, EGLint attribute, EGLint *value);
+#endif /* EGL_EGLEXT_PROTOTYPES */
+typedef EGLSyncKHR (EGLAPIENTRYP PFNEGLCREATESYNCKHRPROC) (EGLDisplay dpy, EGLenum type, const EGLint *attrib_list);
+typedef EGLBoolean (EGLAPIENTRYP PFNEGLDESTROYSYNCKHRPROC) (EGLDisplay dpy, EGLSyncKHR sync);
+typedef EGLint (EGLAPIENTRYP PFNEGLCLIENTWAITSYNCKHRPROC) (EGLDisplay dpy, EGLSyncKHR sync, EGLint flags, EGLTimeKHR timeout);
+typedef EGLBoolean (EGLAPIENTRYP PFNEGLSIGNALSYNCKHRPROC) (EGLDisplay dpy, EGLSyncKHR sync, EGLenum mode);
+typedef EGLBoolean (EGLAPIENTRYP PFNEGLGETSYNCATTRIBKHRPROC) (EGLDisplay dpy, EGLSyncKHR sync, EGLint attribute, EGLint *value);
+#endif
+
 #ifndef EGL_KHR_image_base
 #define EGL_KHR_image_base 1
 /* Most interfaces defined by EGL_KHR_image_pixmap above */
@@ -131,6 +161,67 @@
 /* Interfaces defined by EGL_KHR_image above */
 #endif
 
+#ifndef EGL_IMG_context_priority
+#define EGL_IMG_context_priority 1
+#define EGL_CONTEXT_PRIORITY_LEVEL_IMG		0x3100
+#define EGL_CONTEXT_PRIORITY_HIGH_IMG		0x3101
+#define EGL_CONTEXT_PRIORITY_MEDIUM_IMG		0x3102
+#define EGL_CONTEXT_PRIORITY_LOW_IMG		0x3103
+#endif
+
+#ifndef EGL_NV_coverage_sample
+#define EGL_NV_coverage_sample 1
+#define EGL_COVERAGE_BUFFERS_NV 0x30E0
+#define EGL_COVERAGE_SAMPLES_NV 0x30E1
+#endif
+
+#ifndef EGL_NV_depth_nonlinear
+#define EGL_NV_depth_nonlinear 1
+#define EGL_DEPTH_ENCODING_NV 0x30E2
+#define EGL_DEPTH_ENCODING_NONE_NV 0
+#define EGL_DEPTH_ENCODING_NONLINEAR_NV 0x30E3
+#endif
+
+#ifndef EGL_NV_sync
+#define EGL_NV_sync 1
+#define EGL_SYNC_PRIOR_COMMANDS_COMPLETE_NV	0x30E6
+#define EGL_SYNC_STATUS_NV			0x30E7
+#define EGL_SIGNALED_NV				0x30E8
+#define EGL_UNSIGNALED_NV			0x30E9
+#define EGL_SYNC_FLUSH_COMMANDS_BIT_NV		0x0001
+#define EGL_FOREVER_NV				0xFFFFFFFFFFFFFFFFull
+#define EGL_ALREADY_SIGNALED_NV			0x30EA
+#define EGL_TIMEOUT_EXPIRED_NV			0x30EB
+#define EGL_CONDITION_SATISFIED_NV		0x30EC
+#define EGL_SYNC_TYPE_NV			0x30ED
+#define EGL_SYNC_CONDITION_NV			0x30EE
+#define EGL_SYNC_FENCE_NV			0x30EF
+#define EGL_NO_SYNC_NV				((EGLSyncNV)0)
+typedef void* EGLSyncNV;
+typedef unsigned long long EGLTimeNV;
+#ifdef EGL_EGLEXT_PROTOTYPES
+EGLSyncNV eglCreateFenceSyncNV (EGLDisplay dpy, EGLenum condition, const EGLint *attrib_list);
+EGLBoolean eglDestroySyncNV (EGLSyncNV sync);
+EGLBoolean eglFenceNV (EGLSyncNV sync);
+EGLint eglClientWaitSyncNV (EGLSyncNV sync, EGLint flags, EGLTimeNV timeout);
+EGLBoolean eglSignalSyncNV (EGLSyncNV sync, EGLenum mode);
+EGLBoolean eglGetSyncAttribNV (EGLSyncNV sync, EGLint attribute, EGLint *value);
+#endif /* EGL_EGLEXT_PROTOTYPES */
+typedef EGLSyncNV (EGLAPIENTRYP PFNEGLCREATEFENCESYNCNVPROC) (EGLDisplay dpy, EGLenum condition, const EGLint *attrib_list);
+typedef EGLBoolean (EGLAPIENTRYP PFNEGLDESTROYSYNCNVPROC) (EGLSyncNV sync);
+typedef EGLBoolean (EGLAPIENTRYP PFNEGLFENCENVPROC) (EGLSyncNV sync);
+typedef EGLint (EGLAPIENTRYP PFNEGLCLIENTWAITSYNCNVPROC) (EGLSyncNV sync, EGLint flags, EGLTimeNV timeout);
+typedef EGLBoolean (EGLAPIENTRYP PFNEGLSIGNALSYNCNVPROC) (EGLSyncNV sync, EGLenum mode);
+typedef EGLBoolean (EGLAPIENTRYP PFNEGLGETSYNCATTRIBNVPROC) (EGLSyncNV sync, EGLint attribute, EGLint *value);
+#endif
+
+#ifndef EGL_KHR_fence_sync
+#define EGL_KHR_fence_sync 1
+/* Reuses most tokens and entry points from EGL_KHR_reusable_sync */
+#define EGL_SYNC_PRIOR_COMMANDS_COMPLETE_KHR	0x30F0
+#define EGL_SYNC_CONDITION_KHR			0x30F8
+#define EGL_SYNC_FENCE_KHR			0x30F9
+#endif
 
 #ifndef EGL_ANDROID_image_native_buffer
 #define EGL_ANDROID_image_native_buffer 1
@@ -154,7 +245,6 @@
 typedef EGLBoolean (EGLAPIENTRYP PFNEGLSETSWAPRECTANGLEANDROIDPROC) (EGLDisplay dpy, EGLSurface draw, EGLint left, EGLint top, EGLint width, EGLint height);
 #endif
 
-
 #ifdef __cplusplus
 }
 #endif
diff --git a/opengl/include/EGL/eglplatform.h b/opengl/include/EGL/eglplatform.h
index 53e9e6116..25d7697 100644
--- a/opengl/include/EGL/eglplatform.h
+++ b/opengl/include/EGL/eglplatform.h
@@ -25,7 +25,7 @@
 */
 
 /* Platform-specific types and definitions for egl.h
- * $Revision: 7244 $ on $Date: 2009-01-20 17:06:59 -0800 (Tue, 20 Jan 2009) $
+ * $Revision: 9724 $ on $Date: 2009-12-02 02:05:33 -0800 (Wed, 02 Dec 2009) $
  *
  * Adopters may modify khrplatform.h and this file to suit their platform.
  * You are encouraged to submit all modifications to the Khronos group so that
@@ -50,8 +50,10 @@
 #define EGLAPI KHRONOS_APICALL
 #endif
 
+#ifndef EGLAPIENTRY
 #define EGLAPIENTRY  KHRONOS_APIENTRY
-#define EGLAPIENTRYP KHRONOS_APIENTRY*
+#endif
+#define EGLAPIENTRYP EGLAPIENTRY*
 
 /* The types NativeDisplayType, NativeWindowType, and NativePixmapType
  * are aliases of window-system-dependent types, such as X Display * or
@@ -89,10 +91,11 @@
 
 #elif defined(ANDROID)
 
-struct android_native_window_t;
+#include <android/native_window.h>
+
 struct egl_native_pixmap_t;
 
-typedef struct android_native_window_t* EGLNativeWindowType;
+typedef struct ANativeWindow*           EGLNativeWindowType;
 typedef struct egl_native_pixmap_t*     EGLNativePixmapType;
 typedef void*                           EGLNativeDisplayType;
 
diff --git a/opengl/include/GLES/gl.h b/opengl/include/GLES/gl.h
index 2e8b971..5b8d85a 100644
--- a/opengl/include/GLES/gl.h
+++ b/opengl/include/GLES/gl.h
@@ -1,7 +1,7 @@
 #ifndef __gl_h_
 #define __gl_h_
 
-/* $Revision: 7172 $ on $Date:: 2009-01-09 11:17:41 -0800 #$ */
+/* $Revision: 10601 $ on $Date:: 2010-03-04 22:15:27 -0800 #$ */
 
 #include <GLES/glplatform.h>
 
@@ -15,6 +15,7 @@
  */
 
 typedef void             GLvoid;
+typedef char             GLchar;
 typedef unsigned int     GLenum;
 typedef unsigned char    GLboolean;
 typedef unsigned int     GLbitfield;
@@ -678,7 +679,7 @@
 GL_API void GL_APIENTRY glGetIntegerv (GLenum pname, GLint *params);
 GL_API void GL_APIENTRY glGetLightxv (GLenum light, GLenum pname, GLfixed *params);
 GL_API void GL_APIENTRY glGetMaterialxv (GLenum face, GLenum pname, GLfixed *params);
-GL_API void GL_APIENTRY glGetPointerv (GLenum pname, void **params);
+GL_API void GL_APIENTRY glGetPointerv (GLenum pname, GLvoid **params);
 GL_API const GLubyte * GL_APIENTRY glGetString (GLenum name);
 GL_API void GL_APIENTRY glGetTexEnviv (GLenum env, GLenum pname, GLint *params);
 GL_API void GL_APIENTRY glGetTexEnvxv (GLenum env, GLenum pname, GLfixed *params);
diff --git a/opengl/include/GLES/glext.h b/opengl/include/GLES/glext.h
index a8fe2e9..a5b3ead 100644
--- a/opengl/include/GLES/glext.h
+++ b/opengl/include/GLES/glext.h
@@ -1,7 +1,7 @@
 #ifndef __glext_h_
 #define __glext_h_
 
-/* $Revision: 7172 $ on $Date:: 2009-01-09 11:17:41 -0800 #$ */
+/* $Revision: 10965 $ on $Date:: 2010-04-09 02:11:29 -0700 #$ */
 
 #ifdef __cplusplus
 extern "C" {
@@ -68,6 +68,11 @@
 typedef void* GLeglImageOES;
 #endif
 
+/* GL_OES_element_index_uint */
+#ifndef GL_OES_element_index_uint
+#define GL_UNSIGNED_INT                                         0x1405
+#endif
+
 /* GL_OES_fixed_point */
 #ifndef GL_OES_fixed_point
 #define GL_FIXED_OES                                            0x140C
@@ -201,6 +206,16 @@
 #define GL_MIRRORED_REPEAT_OES                                  0x8370
 #endif
 
+/* GL_OES_vertex_array_object */
+#ifndef GL_OES_vertex_array_object
+#define GL_VERTEX_ARRAY_BINDING_OES                             0x85B5
+#endif
+
+/* GL_OES_texture_external */
+#ifndef GL_TEXTURE_EXTERNAL_OES
+#define GL_TEXTURE_EXTERNAL_OES                                 0x8D65
+#endif
+
 /*------------------------------------------------------------------------*
  * AMD extension tokens
  *------------------------------------------------------------------------*/
@@ -219,15 +234,191 @@
 #endif
 
 /*------------------------------------------------------------------------*
+ * APPLE extension tokens
+ *------------------------------------------------------------------------*/
+
+/* GL_APPLE_texture_2D_limited_npot */
+/* No new tokens introduced by this extension. */
+
+/*------------------------------------------------------------------------*
  * EXT extension tokens
  *------------------------------------------------------------------------*/
 
+/* GL_EXT_blend_minmax */
+#ifndef GL_EXT_blend_minmax
+#define GL_MIN_EXT                                              0x8007
+#define GL_MAX_EXT                                              0x8008
+#endif
+
+/* GL_EXT_discard_framebuffer */
+#ifndef GL_EXT_discard_framebuffer
+#define GL_COLOR_EXT                                            0x1800
+#define GL_DEPTH_EXT                                            0x1801
+#define GL_STENCIL_EXT                                          0x1802
+#endif
+
+/* GL_EXT_multi_draw_arrays */
+/* No new tokens introduced by this extension. */
+
+/* GL_EXT_read_format_bgra */
+#ifndef GL_EXT_read_format_bgra
+#define GL_BGRA_EXT                                             0x80E1
+#define GL_UNSIGNED_SHORT_4_4_4_4_REV_EXT                       0x8365
+#define GL_UNSIGNED_SHORT_1_5_5_5_REV_EXT                       0x8366
+#endif
+
 /* GL_EXT_texture_filter_anisotropic */
 #ifndef GL_EXT_texture_filter_anisotropic
 #define GL_TEXTURE_MAX_ANISOTROPY_EXT                           0x84FE
 #define GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT                       0x84FF
 #endif
 
+/* GL_EXT_texture_format_BGRA8888 */
+#ifndef GL_EXT_texture_format_BGRA8888
+#define GL_BGRA_EXT                                             0x80E1
+#endif
+
+/* GL_EXT_texture_lod_bias */
+#ifndef GL_EXT_texture_lod_bias
+#define GL_MAX_TEXTURE_LOD_BIAS_EXT                             0x84FD
+#define GL_TEXTURE_FILTER_CONTROL_EXT                           0x8500
+#define GL_TEXTURE_LOD_BIAS_EXT                                 0x8501
+#endif
+
+/*------------------------------------------------------------------------*
+ * IMG extension tokens
+ *------------------------------------------------------------------------*/
+
+/* GL_IMG_read_format */
+#ifndef GL_IMG_read_format
+#define GL_BGRA_IMG                                             0x80E1
+#define GL_UNSIGNED_SHORT_4_4_4_4_REV_IMG                       0x8365
+#endif
+
+/* GL_IMG_texture_compression_pvrtc */
+#ifndef GL_IMG_texture_compression_pvrtc
+#define GL_COMPRESSED_RGB_PVRTC_4BPPV1_IMG                      0x8C00
+#define GL_COMPRESSED_RGB_PVRTC_2BPPV1_IMG                      0x8C01
+#define GL_COMPRESSED_RGBA_PVRTC_4BPPV1_IMG                     0x8C02
+#define GL_COMPRESSED_RGBA_PVRTC_2BPPV1_IMG                     0x8C03
+#endif
+
+/* GL_IMG_texture_env_enhanced_fixed_function */
+#ifndef GL_IMG_texture_env_enhanced_fixed_function
+#define GL_MODULATE_COLOR_IMG                                   0x8C04
+#define GL_RECIP_ADD_SIGNED_ALPHA_IMG                           0x8C05
+#define GL_TEXTURE_ALPHA_MODULATE_IMG                           0x8C06
+#define GL_FACTOR_ALPHA_MODULATE_IMG                            0x8C07
+#define GL_FRAGMENT_ALPHA_MODULATE_IMG                          0x8C08
+#define GL_ADD_BLEND_IMG                                        0x8C09
+#define GL_DOT3_RGBA_IMG                                        0x86AF
+#endif
+
+/* GL_IMG_user_clip_plane */
+#ifndef GL_IMG_user_clip_plane
+#define GL_CLIP_PLANE0_IMG                                      0x3000
+#define GL_CLIP_PLANE1_IMG                                      0x3001
+#define GL_CLIP_PLANE2_IMG                                      0x3002
+#define GL_CLIP_PLANE3_IMG                                      0x3003
+#define GL_CLIP_PLANE4_IMG                                      0x3004
+#define GL_CLIP_PLANE5_IMG                                      0x3005
+#define GL_MAX_CLIP_PLANES_IMG                                  0x0D32
+#endif
+
+/* GL_IMG_multisampled_render_to_texture */
+#ifndef GL_IMG_multisampled_render_to_texture
+#define GL_RENDERBUFFER_SAMPLES_IMG                             0x9133
+#define GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE_IMG               0x9134
+#define GL_MAX_SAMPLES_IMG                                      0x9135
+#define GL_TEXTURE_SAMPLES_IMG                                  0x9136
+#endif
+
+/*------------------------------------------------------------------------*
+ * NV extension tokens
+ *------------------------------------------------------------------------*/
+
+/* GL_NV_fence */
+#ifndef GL_NV_fence
+#define GL_ALL_COMPLETED_NV                                     0x84F2
+#define GL_FENCE_STATUS_NV                                      0x84F3
+#define GL_FENCE_CONDITION_NV                                   0x84F4
+#endif
+
+/*------------------------------------------------------------------------*
+ * QCOM extension tokens
+ *------------------------------------------------------------------------*/
+
+/* GL_QCOM_driver_control */
+/* No new tokens introduced by this extension. */
+
+/* GL_QCOM_extended_get */
+#ifndef GL_QCOM_extended_get
+#define GL_TEXTURE_WIDTH_QCOM                                   0x8BD2
+#define GL_TEXTURE_HEIGHT_QCOM                                  0x8BD3
+#define GL_TEXTURE_DEPTH_QCOM                                   0x8BD4
+#define GL_TEXTURE_INTERNAL_FORMAT_QCOM                         0x8BD5
+#define GL_TEXTURE_FORMAT_QCOM                                  0x8BD6
+#define GL_TEXTURE_TYPE_QCOM                                    0x8BD7
+#define GL_TEXTURE_IMAGE_VALID_QCOM                             0x8BD8
+#define GL_TEXTURE_NUM_LEVELS_QCOM                              0x8BD9
+#define GL_TEXTURE_TARGET_QCOM                                  0x8BDA
+#define GL_TEXTURE_OBJECT_VALID_QCOM                            0x8BDB
+#define GL_STATE_RESTORE                                        0x8BDC
+#endif
+
+/* GL_QCOM_extended_get2 */
+/* No new tokens introduced by this extension. */
+
+/* GL_QCOM_perfmon_global_mode */
+#ifndef GL_QCOM_perfmon_global_mode
+#define GL_PERFMON_GLOBAL_MODE_QCOM                             0x8FA0
+#endif
+
+/* GL_QCOM_writeonly_rendering */
+#ifndef GL_QCOM_writeonly_rendering
+#define GL_WRITEONLY_RENDERING_QCOM                             0x8823
+#endif
+
+/* GL_QCOM_tiled_rendering */
+#ifndef GL_QCOM_tiled_rendering
+#define GL_COLOR_BUFFER_BIT0_QCOM                               0x00000001
+#define GL_COLOR_BUFFER_BIT1_QCOM                               0x00000002
+#define GL_COLOR_BUFFER_BIT2_QCOM                               0x00000004
+#define GL_COLOR_BUFFER_BIT3_QCOM                               0x00000008
+#define GL_COLOR_BUFFER_BIT4_QCOM                               0x00000010
+#define GL_COLOR_BUFFER_BIT5_QCOM                               0x00000020
+#define GL_COLOR_BUFFER_BIT6_QCOM                               0x00000040
+#define GL_COLOR_BUFFER_BIT7_QCOM                               0x00000080
+#define GL_DEPTH_BUFFER_BIT0_QCOM                               0x00000100
+#define GL_DEPTH_BUFFER_BIT1_QCOM                               0x00000200
+#define GL_DEPTH_BUFFER_BIT2_QCOM                               0x00000400
+#define GL_DEPTH_BUFFER_BIT3_QCOM                               0x00000800
+#define GL_DEPTH_BUFFER_BIT4_QCOM                               0x00001000
+#define GL_DEPTH_BUFFER_BIT5_QCOM                               0x00002000
+#define GL_DEPTH_BUFFER_BIT6_QCOM                               0x00004000
+#define GL_DEPTH_BUFFER_BIT7_QCOM                               0x00008000
+#define GL_STENCIL_BUFFER_BIT0_QCOM                             0x00010000
+#define GL_STENCIL_BUFFER_BIT1_QCOM                             0x00020000
+#define GL_STENCIL_BUFFER_BIT2_QCOM                             0x00040000
+#define GL_STENCIL_BUFFER_BIT3_QCOM                             0x00080000
+#define GL_STENCIL_BUFFER_BIT4_QCOM                             0x00100000
+#define GL_STENCIL_BUFFER_BIT5_QCOM                             0x00200000
+#define GL_STENCIL_BUFFER_BIT6_QCOM                             0x00400000
+#define GL_STENCIL_BUFFER_BIT7_QCOM                             0x00800000
+#define GL_MULTISAMPLE_BUFFER_BIT0_QCOM                         0x01000000
+#define GL_MULTISAMPLE_BUFFER_BIT1_QCOM                         0x02000000
+#define GL_MULTISAMPLE_BUFFER_BIT2_QCOM                         0x04000000
+#define GL_MULTISAMPLE_BUFFER_BIT3_QCOM                         0x08000000
+#define GL_MULTISAMPLE_BUFFER_BIT4_QCOM                         0x10000000
+#define GL_MULTISAMPLE_BUFFER_BIT5_QCOM                         0x20000000
+#define GL_MULTISAMPLE_BUFFER_BIT6_QCOM                         0x40000000
+#define GL_MULTISAMPLE_BUFFER_BIT7_QCOM                         0x80000000
+#endif
+
+/*------------------------------------------------------------------------*
+ * End of extension tokens, start of corresponding extension functions
+ *------------------------------------------------------------------------*/
+
 /*------------------------------------------------------------------------*
  * OES extension functions
  *------------------------------------------------------------------------*/
@@ -456,11 +647,11 @@
 #ifdef GL_GLEXT_PROTOTYPES
 GL_API void* GL_APIENTRY glMapBufferOES (GLenum target, GLenum access);
 GL_API GLboolean GL_APIENTRY glUnmapBufferOES (GLenum target);
-GL_API void GL_APIENTRY glGetBufferPointervOES (GLenum target, GLenum pname, void** params);
+GL_API void GL_APIENTRY glGetBufferPointervOES (GLenum target, GLenum pname, GLvoid ** params);
 #endif
 typedef void* (GL_APIENTRYP PFNGLMAPBUFFEROESPROC) (GLenum target, GLenum access);
 typedef GLboolean (GL_APIENTRYP PFNGLUNMAPBUFFEROESPROC) (GLenum target);
-typedef void (GL_APIENTRYP PFNGLGETBUFFERPOINTERVOESPROC) (GLenum target, GLenum pname, void** params);
+typedef void (GL_APIENTRYP PFNGLGETBUFFERPOINTERVOESPROC) (GLenum target, GLenum pname, GLvoid ** params);
 #endif
 
 /* GL_OES_matrix_get */
@@ -576,6 +767,26 @@
 #define GL_OES_texture_mirrored_repeat 1
 #endif
 
+/* GL_OES_vertex_array_object */
+#ifndef GL_OES_vertex_array_object
+#define GL_OES_vertex_array_object 1
+#ifdef GL_GLEXT_PROTOTYPES
+GL_API void GL_APIENTRY glBindVertexArrayOES (GLuint array);
+GL_API void GL_APIENTRY glDeleteVertexArraysOES (GLsizei n, const GLuint *arrays);
+GL_API void GL_APIENTRY glGenVertexArraysOES (GLsizei n, GLuint *arrays);
+GL_API GLboolean GL_APIENTRY glIsVertexArrayOES (GLuint array);
+#endif
+typedef void (GL_APIENTRYP PFNGLBINDVERTEXARRAYOESPROC) (GLuint array);
+typedef void (GL_APIENTRYP PFNGLDELETEVERTEXARRAYSOESPROC) (GLsizei n, const GLuint *arrays);
+typedef void (GL_APIENTRYP PFNGLGENVERTEXARRAYSOESPROC) (GLsizei n, GLuint *arrays);
+typedef GLboolean (GL_APIENTRYP PFNGLISVERTEXARRAYOESPROC) (GLuint array);
+#endif
+
+/* GL_OES_texture_external */
+#ifndef GL_OES_texture_external
+#define GL_OES_texture_external 1
+#endif
+
 /*------------------------------------------------------------------------*
  * AMD extension functions
  *------------------------------------------------------------------------*/
@@ -591,14 +802,207 @@
 #endif
 
 /*------------------------------------------------------------------------*
+ * APPLE extension functions
+ *------------------------------------------------------------------------*/
+
+/* GL_APPLE_texture_2D_limited_npot */
+#ifndef GL_APPLE_texture_2D_limited_npot
+#define GL_APPLE_texture_2D_limited_npot 1
+#endif
+
+/*------------------------------------------------------------------------*
  * EXT extension functions
  *------------------------------------------------------------------------*/
 
+/* GL_EXT_blend_minmax */
+#ifndef GL_EXT_blend_minmax
+#define GL_EXT_blend_minmax 1
+#endif
+
+/* GL_EXT_discard_framebuffer */
+#ifndef GL_EXT_discard_framebuffer
+#define GL_EXT_discard_framebuffer 1
+#ifdef GL_GLEXT_PROTOTYPES
+GL_API void GL_APIENTRY glDiscardFramebufferEXT (GLenum target, GLsizei numAttachments, const GLenum *attachments);
+#endif
+typedef void (GL_APIENTRYP PFNGLDISCARDFRAMEBUFFEREXTPROC) (GLenum target, GLsizei numAttachments, const GLenum *attachments);
+#endif
+
+/* GL_EXT_multi_draw_arrays */
+#ifndef GL_EXT_multi_draw_arrays
+#define GL_EXT_multi_draw_arrays 1
+#ifdef GL_GLEXT_PROTOTYPES
+GL_API void GL_APIENTRY glMultiDrawArraysEXT (GLenum mode, GLint *first, GLsizei *count, GLsizei primcount);
+GL_API void GL_APIENTRY glMultiDrawElementsEXT (GLenum mode, const GLsizei *count, GLenum type, const GLvoid* *indices, GLsizei primcount);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef void (GL_APIENTRYP PFNGLMULTIDRAWARRAYSEXTPROC) (GLenum mode, GLint *first, GLsizei *count, GLsizei primcount);
+typedef void (GL_APIENTRYP PFNGLMULTIDRAWELEMENTSEXTPROC) (GLenum mode, const GLsizei *count, GLenum type, const GLvoid* *indices, GLsizei primcount);
+#endif
+
+/* GL_EXT_read_format_bgra */
+#ifndef GL_EXT_read_format_bgra
+#define GL_EXT_read_format_bgra 1
+#endif
+
 /* GL_EXT_texture_filter_anisotropic */
 #ifndef GL_EXT_texture_filter_anisotropic
 #define GL_EXT_texture_filter_anisotropic 1
 #endif
 
+/* GL_EXT_texture_format_BGRA8888 */
+#ifndef GL_EXT_texture_format_BGRA8888
+#define GL_EXT_texture_format_BGRA8888 1
+#endif
+
+/* GL_EXT_texture_lod_bias */
+#ifndef GL_EXT_texture_lod_bias
+#define GL_EXT_texture_lod_bias 1
+#endif
+
+/*------------------------------------------------------------------------*
+ * IMG extension functions
+ *------------------------------------------------------------------------*/
+
+/* GL_IMG_read_format */
+#ifndef GL_IMG_read_format
+#define GL_IMG_read_format 1
+#endif
+
+/* GL_IMG_texture_compression_pvrtc */
+#ifndef GL_IMG_texture_compression_pvrtc
+#define GL_IMG_texture_compression_pvrtc 1
+#endif
+
+/* GL_IMG_texture_env_enhanced_fixed_function */
+#ifndef GL_IMG_texture_env_enhanced_fixed_function
+#define GL_IMG_texture_env_enhanced_fixed_function 1
+#endif
+
+/* GL_IMG_user_clip_plane */
+#ifndef GL_IMG_user_clip_plane
+#define GL_IMG_user_clip_plane 1
+#ifdef GL_GLEXT_PROTOTYPES
+GL_API void GL_APIENTRY glClipPlanefIMG (GLenum p, const GLfloat *eqn);
+GL_API void GL_APIENTRY glClipPlanexIMG (GLenum p, const GLfixed *eqn);
+#endif
+typedef void (GL_APIENTRYP PFNGLCLIPPLANEFIMGPROC) (GLenum p, const GLfloat *eqn);
+typedef void (GL_APIENTRYP PFNGLCLIPPLANEXIMGPROC) (GLenum p, const GLfixed *eqn);
+#endif
+
+/* GL_IMG_multisampled_render_to_texture */
+#ifndef GL_IMG_multisampled_render_to_texture
+#define GL_IMG_multisampled_render_to_texture 1
+#ifdef GL_GLEXT_PROTOTYPES
+GL_API void GL_APIENTRY glRenderbufferStorageMultisampleIMG (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height);
+GL_API void GL_APIENTRY glFramebufferTexture2DMultisampleIMG (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLsizei samples);
+#endif
+typedef void (GL_APIENTRYP PFNGLRENDERBUFFERSTORAGEMULTISAMPLEIMG) (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height);
+typedef void (GL_APIENTRYP PFNGLFRAMEBUFFERTEXTURE2DMULTISAMPLEIMG) (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLsizei samples);
+#endif
+
+/*------------------------------------------------------------------------*
+ * NV extension functions
+ *------------------------------------------------------------------------*/
+
+/* NV_fence */
+#ifndef GL_NV_fence
+#define GL_NV_fence 1
+#ifdef GL_GLEXT_PROTOTYPES
+GL_API void GL_APIENTRY glDeleteFencesNV (GLsizei n, const GLuint *fences);
+GL_API void GL_APIENTRY glGenFencesNV (GLsizei n, GLuint *fences);
+GL_API GLboolean GL_APIENTRY glIsFenceNV (GLuint fence);
+GL_API GLboolean GL_APIENTRY glTestFenceNV (GLuint fence);
+GL_API void GL_APIENTRY glGetFenceivNV (GLuint fence, GLenum pname, GLint *params);
+GL_API void GL_APIENTRY glFinishFenceNV (GLuint fence);
+GL_API void GL_APIENTRY glSetFenceNV (GLuint fence, GLenum condition);
+#endif
+typedef void (GL_APIENTRYP PFNGLDELETEFENCESNVPROC) (GLsizei n, const GLuint *fences);
+typedef void (GL_APIENTRYP PFNGLGENFENCESNVPROC) (GLsizei n, GLuint *fences);
+typedef GLboolean (GL_APIENTRYP PFNGLISFENCENVPROC) (GLuint fence);
+typedef GLboolean (GL_APIENTRYP PFNGLTESTFENCENVPROC) (GLuint fence);
+typedef void (GL_APIENTRYP PFNGLGETFENCEIVNVPROC) (GLuint fence, GLenum pname, GLint *params);
+typedef void (GL_APIENTRYP PFNGLFINISHFENCENVPROC) (GLuint fence);
+typedef void (GL_APIENTRYP PFNGLSETFENCENVPROC) (GLuint fence, GLenum condition);
+#endif
+
+/*------------------------------------------------------------------------*
+ * QCOM extension functions
+ *------------------------------------------------------------------------*/
+
+/* GL_QCOM_driver_control */
+#ifndef GL_QCOM_driver_control
+#define GL_QCOM_driver_control 1
+#ifdef GL_GLEXT_PROTOTYPES
+GL_API void GL_APIENTRY glGetDriverControlsQCOM (GLint *num, GLsizei size, GLuint *driverControls);
+GL_API void GL_APIENTRY glGetDriverControlStringQCOM (GLuint driverControl, GLsizei bufSize, GLsizei *length, GLchar *driverControlString);
+GL_API void GL_APIENTRY glEnableDriverControlQCOM (GLuint driverControl);
+GL_API void GL_APIENTRY glDisableDriverControlQCOM (GLuint driverControl);
+#endif
+typedef void (GL_APIENTRYP PFNGLGETDRIVERCONTROLSQCOMPROC) (GLint *num, GLsizei size, GLuint *driverControls);
+typedef void (GL_APIENTRYP PFNGLGETDRIVERCONTROLSTRINGQCOMPROC) (GLuint driverControl, GLsizei bufSize, GLsizei *length, GLchar *driverControlString);
+typedef void (GL_APIENTRYP PFNGLENABLEDRIVERCONTROLQCOMPROC) (GLuint driverControl);
+typedef void (GL_APIENTRYP PFNGLDISABLEDRIVERCONTROLQCOMPROC) (GLuint driverControl);
+#endif
+
+/* GL_QCOM_extended_get */
+#ifndef GL_QCOM_extended_get
+#define GL_QCOM_extended_get 1
+#ifdef GL_GLEXT_PROTOTYPES
+GL_API void GL_APIENTRY glExtGetTexturesQCOM (GLuint *textures, GLint maxTextures, GLint *numTextures);
+GL_API void GL_APIENTRY glExtGetBuffersQCOM (GLuint *buffers, GLint maxBuffers, GLint *numBuffers);
+GL_API void GL_APIENTRY glExtGetRenderbuffersQCOM (GLuint *renderbuffers, GLint maxRenderbuffers, GLint *numRenderbuffers);
+GL_API void GL_APIENTRY glExtGetFramebuffersQCOM (GLuint *framebuffers, GLint maxFramebuffers, GLint *numFramebuffers);
+GL_API void GL_APIENTRY glExtGetTexLevelParameterivQCOM (GLuint texture, GLenum face, GLint level, GLenum pname, GLint *params);
+GL_API void GL_APIENTRY glExtTexObjectStateOverrideiQCOM (GLenum target, GLenum pname, GLint param);
+GL_API void GL_APIENTRY glExtGetTexSubImageQCOM (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, GLvoid *texels);
+GL_API void GL_APIENTRY glExtGetBufferPointervQCOM (GLenum target, GLvoid **params);
+#endif
+typedef void (GL_APIENTRYP PFNGLEXTGETTEXTURESQCOMPROC) (GLuint *textures, GLint maxTextures, GLint *numTextures);
+typedef void (GL_APIENTRYP PFNGLEXTGETBUFFERSQCOMPROC) (GLuint *buffers, GLint maxBuffers, GLint *numBuffers);
+typedef void (GL_APIENTRYP PFNGLEXTGETRENDERBUFFERSQCOMPROC) (GLuint *renderbuffers, GLint maxRenderbuffers, GLint *numRenderbuffers);
+typedef void (GL_APIENTRYP PFNGLEXTGETFRAMEBUFFERSQCOMPROC) (GLuint *framebuffers, GLint maxFramebuffers, GLint *numFramebuffers);
+typedef void (GL_APIENTRYP PFNGLEXTGETTEXLEVELPARAMETERIVQCOMPROC) (GLuint texture, GLenum face, GLint level, GLenum pname, GLint *params);
+typedef void (GL_APIENTRYP PFNGLEXTTEXOBJECTSTATEOVERRIDEIQCOMPROC) (GLenum target, GLenum pname, GLint param);
+typedef void (GL_APIENTRYP PFNGLEXTGETTEXSUBIMAGEQCOMPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, GLvoid *texels);
+typedef void (GL_APIENTRYP PFNGLEXTGETBUFFERPOINTERVQCOMPROC) (GLenum target, GLvoid **params);
+#endif
+
+/* GL_QCOM_extended_get2 */
+#ifndef GL_QCOM_extended_get2
+#define GL_QCOM_extended_get2 1
+#ifdef GL_GLEXT_PROTOTYPES
+GL_API void GL_APIENTRY glExtGetShadersQCOM (GLuint *shaders, GLint maxShaders, GLint *numShaders);
+GL_API void GL_APIENTRY glExtGetProgramsQCOM (GLuint *programs, GLint maxPrograms, GLint *numPrograms);
+GL_API GLboolean GL_APIENTRY glExtIsProgramBinaryQCOM (GLuint program);
+GL_API void GL_APIENTRY glExtGetProgramBinarySourceQCOM (GLuint program, GLenum shadertype, GLchar *source, GLint *length);
+#endif
+typedef void (GL_APIENTRYP PFNGLEXTGETSHADERSQCOMPROC) (GLuint *shaders, GLint maxShaders, GLint *numShaders);
+typedef void (GL_APIENTRYP PFNGLEXTGETPROGRAMSQCOMPROC) (GLuint *programs, GLint maxPrograms, GLint *numPrograms);
+typedef GLboolean (GL_APIENTRYP PFNGLEXTISPROGRAMBINARYQCOMPROC) (GLuint program);
+typedef void (GL_APIENTRYP PFNGLEXTGETPROGRAMBINARYSOURCEQCOMPROC) (GLuint program, GLenum shadertype, GLchar *source, GLint *length);
+#endif
+
+/* GL_QCOM_perfmon_global_mode */
+#ifndef GL_QCOM_perfmon_global_mode
+#define GL_QCOM_perfmon_global_mode 1
+#endif
+
+/* GL_QCOM_writeonly_rendering */
+#ifndef GL_QCOM_writeonly_rendering
+#define GL_QCOM_writeonly_rendering 1
+#endif
+
+/* GL_QCOM_tiled_rendering */
+#ifndef GL_QCOM_tiled_rendering
+#define GL_QCOM_tiled_rendering 1
+#ifdef GL_GLEXT_PROTOTYPES
+GL_API void GL_APIENTRY glStartTilingQCOM (GLuint x, GLuint y, GLuint width, GLuint height, GLbitfield preserveMask);
+GL_API void GL_APIENTRY glEndTilingQCOM (GLbitfield preserveMask);
+#endif
+typedef void (GL_APIENTRYP PFNGLSTARTTILINGQCOMPROC) (GLuint x, GLuint y, GLuint width, GLuint height, GLbitfield preserveMask);
+typedef void (GL_APIENTRYP PFNGLENDTILINGQCOMPROC) (GLbitfield preserveMask);
+#endif
+
 #ifdef __cplusplus
 }
 #endif
diff --git a/opengl/include/GLES/glplatform.h b/opengl/include/GLES/glplatform.h
index 198e679..2db6ee2 100644
--- a/opengl/include/GLES/glplatform.h
+++ b/opengl/include/GLES/glplatform.h
@@ -1,7 +1,7 @@
 #ifndef __glplatform_h_
 #define __glplatform_h_
 
-/* $Revision: 7172 $ on $Date:: 2009-01-09 11:17:41 -0800 #$ */
+/* $Revision: 10601 $ on $Date:: 2010-03-04 22:15:27 -0800 #$ */
 
 /*
  * This document is licensed under the SGI Free Software B License Version
@@ -9,7 +9,6 @@
  */
 
 /* Platform-specific types and definitions for OpenGL ES 1.X  gl.h
- * Last modified on 2008/12/19
  *
  * Adopters may modify khrplatform.h and this file to suit their platform.
  * You are encouraged to submit all modifications to the Khronos group so that
@@ -24,10 +23,8 @@
 #define GL_API      KHRONOS_APICALL
 #endif
 
-#if defined(ANDROID)
-
+#ifndef GL_APIENTRY
 #define GL_APIENTRY KHRONOS_APIENTRY
-
 #endif
 
 #endif /* __glplatform_h_ */
diff --git a/opengl/include/GLES2/gl2.h b/opengl/include/GLES2/gl2.h
index 0182a67..e1d3b87 100644
--- a/opengl/include/GLES2/gl2.h
+++ b/opengl/include/GLES2/gl2.h
@@ -1,7 +1,7 @@
 #ifndef __gl2_h_
 #define __gl2_h_
 
-/* $Revision: 7173 $ on $Date:: 2009-01-09 11:18:21 -0800 #$ */
+/* $Revision: 10602 $ on $Date:: 2010-03-04 22:35:34 -0800 #$ */
 
 #include <GLES2/gl2platform.h>
 
@@ -19,6 +19,7 @@
  *-----------------------------------------------------------------------*/
 
 typedef void             GLvoid;
+typedef char             GLchar;
 typedef unsigned int     GLenum;
 typedef unsigned char    GLboolean;
 typedef unsigned int     GLbitfield;
@@ -472,7 +473,7 @@
 
 GL_APICALL void         GL_APIENTRY glActiveTexture (GLenum texture);
 GL_APICALL void         GL_APIENTRY glAttachShader (GLuint program, GLuint shader);
-GL_APICALL void         GL_APIENTRY glBindAttribLocation (GLuint program, GLuint index, const char* name);
+GL_APICALL void         GL_APIENTRY glBindAttribLocation (GLuint program, GLuint index, const GLchar* name);
 GL_APICALL void         GL_APIENTRY glBindBuffer (GLenum target, GLuint buffer);
 GL_APICALL void         GL_APIENTRY glBindFramebuffer (GLenum target, GLuint framebuffer);
 GL_APICALL void         GL_APIENTRY glBindRenderbuffer (GLenum target, GLuint renderbuffer);
@@ -482,8 +483,8 @@
 GL_APICALL void         GL_APIENTRY glBlendEquationSeparate (GLenum modeRGB, GLenum modeAlpha);
 GL_APICALL void         GL_APIENTRY glBlendFunc (GLenum sfactor, GLenum dfactor);
 GL_APICALL void         GL_APIENTRY glBlendFuncSeparate (GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha);
-GL_APICALL void         GL_APIENTRY glBufferData (GLenum target, GLsizeiptr size, const void* data, GLenum usage);
-GL_APICALL void         GL_APIENTRY glBufferSubData (GLenum target, GLintptr offset, GLsizeiptr size, const void* data);
+GL_APICALL void         GL_APIENTRY glBufferData (GLenum target, GLsizeiptr size, const GLvoid* data, GLenum usage);
+GL_APICALL void         GL_APIENTRY glBufferSubData (GLenum target, GLintptr offset, GLsizeiptr size, const GLvoid* data);
 GL_APICALL GLenum       GL_APIENTRY glCheckFramebufferStatus (GLenum target);
 GL_APICALL void         GL_APIENTRY glClear (GLbitfield mask);
 GL_APICALL void         GL_APIENTRY glClearColor (GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha);
@@ -491,8 +492,8 @@
 GL_APICALL void         GL_APIENTRY glClearStencil (GLint s);
 GL_APICALL void         GL_APIENTRY glColorMask (GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha);
 GL_APICALL void         GL_APIENTRY glCompileShader (GLuint shader);
-GL_APICALL void         GL_APIENTRY glCompressedTexImage2D (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const void* data);
-GL_APICALL void         GL_APIENTRY glCompressedTexSubImage2D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const void* data);
+GL_APICALL void         GL_APIENTRY glCompressedTexImage2D (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const GLvoid* data);
+GL_APICALL void         GL_APIENTRY glCompressedTexSubImage2D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const GLvoid* data);
 GL_APICALL void         GL_APIENTRY glCopyTexImage2D (GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border);
 GL_APICALL void         GL_APIENTRY glCopyTexSubImage2D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height);
 GL_APICALL GLuint       GL_APIENTRY glCreateProgram (void);
@@ -511,7 +512,7 @@
 GL_APICALL void         GL_APIENTRY glDisable (GLenum cap);
 GL_APICALL void         GL_APIENTRY glDisableVertexAttribArray (GLuint index);
 GL_APICALL void         GL_APIENTRY glDrawArrays (GLenum mode, GLint first, GLsizei count);
-GL_APICALL void         GL_APIENTRY glDrawElements (GLenum mode, GLsizei count, GLenum type, const void* indices);
+GL_APICALL void         GL_APIENTRY glDrawElements (GLenum mode, GLsizei count, GLenum type, const GLvoid* indices);
 GL_APICALL void         GL_APIENTRY glEnable (GLenum cap);
 GL_APICALL void         GL_APIENTRY glEnableVertexAttribArray (GLuint index);
 GL_APICALL void         GL_APIENTRY glFinish (void);
@@ -524,10 +525,10 @@
 GL_APICALL void         GL_APIENTRY glGenFramebuffers (GLsizei n, GLuint* framebuffers);
 GL_APICALL void         GL_APIENTRY glGenRenderbuffers (GLsizei n, GLuint* renderbuffers);
 GL_APICALL void         GL_APIENTRY glGenTextures (GLsizei n, GLuint* textures);
-GL_APICALL void         GL_APIENTRY glGetActiveAttrib (GLuint program, GLuint index, GLsizei bufsize, GLsizei* length, GLint* size, GLenum* type, char* name);
-GL_APICALL void         GL_APIENTRY glGetActiveUniform (GLuint program, GLuint index, GLsizei bufsize, GLsizei* length, GLint* size, GLenum* type, char* name);
+GL_APICALL void         GL_APIENTRY glGetActiveAttrib (GLuint program, GLuint index, GLsizei bufsize, GLsizei* length, GLint* size, GLenum* type, GLchar* name);
+GL_APICALL void         GL_APIENTRY glGetActiveUniform (GLuint program, GLuint index, GLsizei bufsize, GLsizei* length, GLint* size, GLenum* type, GLchar* name);
 GL_APICALL void         GL_APIENTRY glGetAttachedShaders (GLuint program, GLsizei maxcount, GLsizei* count, GLuint* shaders);
-GL_APICALL int          GL_APIENTRY glGetAttribLocation (GLuint program, const char* name);
+GL_APICALL int          GL_APIENTRY glGetAttribLocation (GLuint program, const GLchar* name);
 GL_APICALL void         GL_APIENTRY glGetBooleanv (GLenum pname, GLboolean* params);
 GL_APICALL void         GL_APIENTRY glGetBufferParameteriv (GLenum target, GLenum pname, GLint* params);
 GL_APICALL GLenum       GL_APIENTRY glGetError (void);
@@ -535,21 +536,21 @@
 GL_APICALL void         GL_APIENTRY glGetFramebufferAttachmentParameteriv (GLenum target, GLenum attachment, GLenum pname, GLint* params);
 GL_APICALL void         GL_APIENTRY glGetIntegerv (GLenum pname, GLint* params);
 GL_APICALL void         GL_APIENTRY glGetProgramiv (GLuint program, GLenum pname, GLint* params);
-GL_APICALL void         GL_APIENTRY glGetProgramInfoLog (GLuint program, GLsizei bufsize, GLsizei* length, char* infolog);
+GL_APICALL void         GL_APIENTRY glGetProgramInfoLog (GLuint program, GLsizei bufsize, GLsizei* length, GLchar* infolog);
 GL_APICALL void         GL_APIENTRY glGetRenderbufferParameteriv (GLenum target, GLenum pname, GLint* params);
 GL_APICALL void         GL_APIENTRY glGetShaderiv (GLuint shader, GLenum pname, GLint* params);
-GL_APICALL void         GL_APIENTRY glGetShaderInfoLog (GLuint shader, GLsizei bufsize, GLsizei* length, char* infolog);
+GL_APICALL void         GL_APIENTRY glGetShaderInfoLog (GLuint shader, GLsizei bufsize, GLsizei* length, GLchar* infolog);
 GL_APICALL void         GL_APIENTRY glGetShaderPrecisionFormat (GLenum shadertype, GLenum precisiontype, GLint* range, GLint* precision);
-GL_APICALL void         GL_APIENTRY glGetShaderSource (GLuint shader, GLsizei bufsize, GLsizei* length, char* source);
+GL_APICALL void         GL_APIENTRY glGetShaderSource (GLuint shader, GLsizei bufsize, GLsizei* length, GLchar* source);
 GL_APICALL const GLubyte* GL_APIENTRY glGetString (GLenum name);
 GL_APICALL void         GL_APIENTRY glGetTexParameterfv (GLenum target, GLenum pname, GLfloat* params);
 GL_APICALL void         GL_APIENTRY glGetTexParameteriv (GLenum target, GLenum pname, GLint* params);
 GL_APICALL void         GL_APIENTRY glGetUniformfv (GLuint program, GLint location, GLfloat* params);
 GL_APICALL void         GL_APIENTRY glGetUniformiv (GLuint program, GLint location, GLint* params);
-GL_APICALL int          GL_APIENTRY glGetUniformLocation (GLuint program, const char* name);
+GL_APICALL int          GL_APIENTRY glGetUniformLocation (GLuint program, const GLchar* name);
 GL_APICALL void         GL_APIENTRY glGetVertexAttribfv (GLuint index, GLenum pname, GLfloat* params);
 GL_APICALL void         GL_APIENTRY glGetVertexAttribiv (GLuint index, GLenum pname, GLint* params);
-GL_APICALL void         GL_APIENTRY glGetVertexAttribPointerv (GLuint index, GLenum pname, void** pointer);
+GL_APICALL void         GL_APIENTRY glGetVertexAttribPointerv (GLuint index, GLenum pname, GLvoid** pointer);
 GL_APICALL void         GL_APIENTRY glHint (GLenum target, GLenum mode);
 GL_APICALL GLboolean    GL_APIENTRY glIsBuffer (GLuint buffer);
 GL_APICALL GLboolean    GL_APIENTRY glIsEnabled (GLenum cap);
@@ -562,25 +563,25 @@
 GL_APICALL void         GL_APIENTRY glLinkProgram (GLuint program);
 GL_APICALL void         GL_APIENTRY glPixelStorei (GLenum pname, GLint param);
 GL_APICALL void         GL_APIENTRY glPolygonOffset (GLfloat factor, GLfloat units);
-GL_APICALL void         GL_APIENTRY glReadPixels (GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, void* pixels);
+GL_APICALL void         GL_APIENTRY glReadPixels (GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLvoid* pixels);
 GL_APICALL void         GL_APIENTRY glReleaseShaderCompiler (void);
 GL_APICALL void         GL_APIENTRY glRenderbufferStorage (GLenum target, GLenum internalformat, GLsizei width, GLsizei height);
 GL_APICALL void         GL_APIENTRY glSampleCoverage (GLclampf value, GLboolean invert);
 GL_APICALL void         GL_APIENTRY glScissor (GLint x, GLint y, GLsizei width, GLsizei height);
-GL_APICALL void         GL_APIENTRY glShaderBinary (GLsizei n, const GLuint* shaders, GLenum binaryformat, const void* binary, GLsizei length);
-GL_APICALL void         GL_APIENTRY glShaderSource (GLuint shader, GLsizei count, const char** string, const GLint* length);
+GL_APICALL void         GL_APIENTRY glShaderBinary (GLsizei n, const GLuint* shaders, GLenum binaryformat, const GLvoid* binary, GLsizei length);
+GL_APICALL void         GL_APIENTRY glShaderSource (GLuint shader, GLsizei count, const GLchar** string, const GLint* length);
 GL_APICALL void         GL_APIENTRY glStencilFunc (GLenum func, GLint ref, GLuint mask);
 GL_APICALL void         GL_APIENTRY glStencilFuncSeparate (GLenum face, GLenum func, GLint ref, GLuint mask);
 GL_APICALL void         GL_APIENTRY glStencilMask (GLuint mask);
 GL_APICALL void         GL_APIENTRY glStencilMaskSeparate (GLenum face, GLuint mask);
 GL_APICALL void         GL_APIENTRY glStencilOp (GLenum fail, GLenum zfail, GLenum zpass);
 GL_APICALL void         GL_APIENTRY glStencilOpSeparate (GLenum face, GLenum fail, GLenum zfail, GLenum zpass);
-GL_APICALL void         GL_APIENTRY glTexImage2D (GLenum target, GLint level, GLint internalformat,  GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const GLvoid* pixels);
+GL_APICALL void         GL_APIENTRY glTexImage2D (GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const GLvoid* pixels);
 GL_APICALL void         GL_APIENTRY glTexParameterf (GLenum target, GLenum pname, GLfloat param);
 GL_APICALL void         GL_APIENTRY glTexParameterfv (GLenum target, GLenum pname, const GLfloat* params);
 GL_APICALL void         GL_APIENTRY glTexParameteri (GLenum target, GLenum pname, GLint param);
 GL_APICALL void         GL_APIENTRY glTexParameteriv (GLenum target, GLenum pname, const GLint* params);
-GL_APICALL void         GL_APIENTRY glTexSubImage2D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const void* pixels);
+GL_APICALL void         GL_APIENTRY glTexSubImage2D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid* pixels);
 GL_APICALL void         GL_APIENTRY glUniform1f (GLint location, GLfloat x);
 GL_APICALL void         GL_APIENTRY glUniform1fv (GLint location, GLsizei count, const GLfloat* v);
 GL_APICALL void         GL_APIENTRY glUniform1i (GLint location, GLint x);
@@ -610,7 +611,7 @@
 GL_APICALL void         GL_APIENTRY glVertexAttrib3fv (GLuint indx, const GLfloat* values);
 GL_APICALL void         GL_APIENTRY glVertexAttrib4f (GLuint indx, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
 GL_APICALL void         GL_APIENTRY glVertexAttrib4fv (GLuint indx, const GLfloat* values);
-GL_APICALL void         GL_APIENTRY glVertexAttribPointer (GLuint indx, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const void* ptr);
+GL_APICALL void         GL_APIENTRY glVertexAttribPointer (GLuint indx, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const GLvoid* ptr);
 GL_APICALL void         GL_APIENTRY glViewport (GLint x, GLint y, GLsizei width, GLsizei height);
 
 #ifdef __cplusplus
diff --git a/opengl/include/GLES2/gl2ext.h b/opengl/include/GLES2/gl2ext.h
index 72f1ae7..de5d65a 100644
--- a/opengl/include/GLES2/gl2ext.h
+++ b/opengl/include/GLES2/gl2ext.h
@@ -1,7 +1,7 @@
 #ifndef __gl2ext_h_
 #define __gl2ext_h_
 
-/* $Revision: 8271 $ on $Date:: 2009-05-21 09:33:40 -0700 #$ */
+/* $Revision: 10969 $ on $Date:: 2010-04-09 02:27:15 -0700 #$ */
 
 #ifdef __cplusplus
 extern "C" {
@@ -57,6 +57,11 @@
 typedef void* GLeglImageOES;
 #endif
 
+/* GL_OES_element_index_uint */
+#ifndef GL_OES_element_index_uint
+#define GL_UNSIGNED_INT                                         0x1405
+#endif
+
 /* GL_OES_get_program_binary */
 #ifndef GL_OES_get_program_binary
 #define GL_PROGRAM_BINARY_LENGTH_OES                            0x8741
@@ -100,8 +105,8 @@
 #define GL_STENCIL_INDEX4_OES                                   0x8D47
 #endif
 
-/* GL_OES_texture3D */
-#ifndef GL_OES_texture3D
+/* GL_OES_texture_3D */
+#ifndef GL_OES_texture_3D
 #define GL_TEXTURE_WRAP_R_OES                                   0x8072
 #define GL_TEXTURE_3D_OES                                       0x806F
 #define GL_TEXTURE_BINDING_3D_OES                               0x806A
@@ -110,11 +115,28 @@
 #define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_3D_ZOFFSET_OES        0x8CD4
 #endif
 
+/* GL_OES_texture_float */
+/* No new tokens introduced by this extension. */
+
+/* GL_OES_texture_float_linear */
+/* No new tokens introduced by this extension. */
+
 /* GL_OES_texture_half_float */
 #ifndef GL_OES_texture_half_float
 #define GL_HALF_FLOAT_OES                                       0x8D61
 #endif
 
+/* GL_OES_texture_half_float_linear */
+/* No new tokens introduced by this extension. */
+
+/* GL_OES_texture_npot */
+/* No new tokens introduced by this extension. */
+
+/* GL_OES_vertex_array_object */
+#ifndef GL_OES_vertex_array_object
+#define GL_VERTEX_ARRAY_BINDING_OES                             0x85B5
+#endif
+
 /* GL_OES_vertex_half_float */
 /* GL_HALF_FLOAT_OES defined in GL_OES_texture_half_float already. */
 
@@ -124,6 +146,11 @@
 #define GL_INT_10_10_10_2_OES                                   0x8DF7
 #endif
 
+/* GL_OES_texture_external */
+#ifndef GL_TEXTURE_EXTERNAL_OES
+#define GL_TEXTURE_EXTERNAL_OES                                 0x8D65
+#endif
+
 /*------------------------------------------------------------------------*
  * AMD extension tokens
  *------------------------------------------------------------------------*/
@@ -141,11 +168,6 @@
 #define GL_ATC_RGBA_INTERPOLATED_ALPHA_AMD                      0x87EE
 #endif
 
-/* GL_AMD_program_binary_Z400 */
-#ifndef GL_AMD_program_binary_Z400
-#define GL_Z400_BINARY_AMD                                      0x8740
-#endif
-
 /* GL_AMD_performance_monitor */
 #ifndef GL_AMD_performance_monitor
 #define GL_COUNTER_TYPE_AMD                                     0x8BC0
@@ -157,35 +179,78 @@
 #define GL_PERFMON_RESULT_AMD                                   0x8BC6
 #endif
 
+/* GL_AMD_program_binary_Z400 */
+#ifndef GL_AMD_program_binary_Z400
+#define GL_Z400_BINARY_AMD                                      0x8740
+#endif
+
 /*------------------------------------------------------------------------*
  * EXT extension tokens
  *------------------------------------------------------------------------*/
 
+/* GL_EXT_blend_minmax */
+#ifndef GL_EXT_blend_minmax
+#define GL_MIN_EXT                                              0x8007
+#define GL_MAX_EXT                                              0x8008
+#endif
+
+/* GL_EXT_discard_framebuffer */
+#ifndef GL_EXT_discard_framebuffer
+#define GL_COLOR_EXT                                            0x1800
+#define GL_DEPTH_EXT                                            0x1801
+#define GL_STENCIL_EXT                                          0x1802
+#endif
+
+/* GL_EXT_multi_draw_arrays */
+/* No new tokens introduced by this extension. */
+
+/* GL_EXT_read_format_bgra */
+#ifndef GL_EXT_read_format_bgra
+#define GL_BGRA_EXT                                             0x80E1
+#define GL_UNSIGNED_SHORT_4_4_4_4_REV_EXT                       0x8365
+#define GL_UNSIGNED_SHORT_1_5_5_5_REV_EXT                       0x8366
+#endif
+
 /* GL_EXT_texture_filter_anisotropic */
 #ifndef GL_EXT_texture_filter_anisotropic
 #define GL_TEXTURE_MAX_ANISOTROPY_EXT                           0x84FE
 #define GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT                       0x84FF
 #endif
 
+/* GL_EXT_texture_format_BGRA8888 */
+#ifndef GL_EXT_texture_format_BGRA8888
+#define GL_BGRA_EXT                                             0x80E1
+#endif
+
 /* GL_EXT_texture_type_2_10_10_10_REV */
 #ifndef GL_EXT_texture_type_2_10_10_10_REV
 #define GL_UNSIGNED_INT_2_10_10_10_REV_EXT                      0x8368
 #endif
 
-/* GL_EXT_texture_format_BGRA8888 */
-#ifndef GL_EXT_texture_format_BGRA8888
-#define GL_BGRA                                                 0x80E1
+/* GL_EXT_texture_compression_dxt1 */
+#ifndef GL_EXT_texture_compression_dxt1
+#define GL_COMPRESSED_RGB_S3TC_DXT1_EXT                         0x83F0
+#define GL_COMPRESSED_RGBA_S3TC_DXT1_EXT                        0x83F1
 #endif
 
 /*------------------------------------------------------------------------*
  * IMG extension tokens
  *------------------------------------------------------------------------*/
 
+/* GL_IMG_program_binary */
+#ifndef GL_IMG_program_binary
+#define GL_SGX_PROGRAM_BINARY_IMG                               0x9130
+#endif
+
 /* GL_IMG_read_format */
 #ifndef GL_IMG_read_format
-#define GL_BGRA                                                 0x80E1
-#define GL_UNSIGNED_SHORT_4_4_4_4_REV                           0x8365
-#define GL_UNSIGNED_SHORT_1_5_5_5_REV                           0x8366
+#define GL_BGRA_IMG                                             0x80E1
+#define GL_UNSIGNED_SHORT_4_4_4_4_REV_IMG                       0x8365
+#endif
+
+/* GL_IMG_shader_binary */
+#ifndef GL_IMG_shader_binary
+#define GL_SGX_BINARY_IMG                                       0x8C0A
 #endif
 
 /* GL_IMG_texture_compression_pvrtc */
@@ -196,6 +261,14 @@
 #define GL_COMPRESSED_RGBA_PVRTC_2BPPV1_IMG                     0x8C03
 #endif
 
+/* GL_IMG_multisampled_render_to_texture */
+#ifndef GL_IMG_multisampled_render_to_texture
+#define GL_RENDERBUFFER_SAMPLES_IMG                             0x9133
+#define GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE_IMG               0x9134
+#define GL_MAX_SAMPLES_IMG                                      0x9135
+#define GL_TEXTURE_SAMPLES_IMG                                  0x9136
+#endif
+
 /*------------------------------------------------------------------------*
  * NV extension tokens
  *------------------------------------------------------------------------*/
@@ -207,6 +280,24 @@
 #define GL_FENCE_CONDITION_NV                                   0x84F4
 #endif
 
+/* GL_NV_coverage_sample */
+#ifndef GL_NV_coverage_sample
+#define GL_COVERAGE_COMPONENT_NV                                0x8ED0
+#define GL_COVERAGE_COMPONENT4_NV                               0x8ED1
+#define GL_COVERAGE_ATTACHMENT_NV                               0x8ED2
+#define GL_COVERAGE_BUFFERS_NV                                  0x8ED3
+#define GL_COVERAGE_SAMPLES_NV                                  0x8ED4
+#define GL_COVERAGE_ALL_FRAGMENTS_NV                            0x8ED5
+#define GL_COVERAGE_EDGE_FRAGMENTS_NV                           0x8ED6
+#define GL_COVERAGE_AUTOMATIC_NV                                0x8ED7
+#define GL_COVERAGE_BUFFER_BIT_NV                               0x8000
+#endif
+
+/* GL_NV_depth_nonlinear */
+#ifndef GL_NV_depth_nonlinear
+#define GL_DEPTH_COMPONENT16_NONLINEAR_NV                       0x8E2C
+#endif
+
 /*------------------------------------------------------------------------*
  * QCOM extension tokens
  *------------------------------------------------------------------------*/
@@ -214,11 +305,70 @@
 /* GL_QCOM_driver_control */
 /* No new tokens introduced by this extension. */
 
+/* GL_QCOM_extended_get */
+#ifndef GL_QCOM_extended_get
+#define GL_TEXTURE_WIDTH_QCOM                                   0x8BD2
+#define GL_TEXTURE_HEIGHT_QCOM                                  0x8BD3
+#define GL_TEXTURE_DEPTH_QCOM                                   0x8BD4
+#define GL_TEXTURE_INTERNAL_FORMAT_QCOM                         0x8BD5
+#define GL_TEXTURE_FORMAT_QCOM                                  0x8BD6
+#define GL_TEXTURE_TYPE_QCOM                                    0x8BD7
+#define GL_TEXTURE_IMAGE_VALID_QCOM                             0x8BD8
+#define GL_TEXTURE_NUM_LEVELS_QCOM                              0x8BD9
+#define GL_TEXTURE_TARGET_QCOM                                  0x8BDA
+#define GL_TEXTURE_OBJECT_VALID_QCOM                            0x8BDB
+#define GL_STATE_RESTORE                                        0x8BDC
+#endif
+
+/* GL_QCOM_extended_get2 */
+/* No new tokens introduced by this extension. */
+
 /* GL_QCOM_perfmon_global_mode */
 #ifndef GL_QCOM_perfmon_global_mode
 #define GL_PERFMON_GLOBAL_MODE_QCOM                             0x8FA0
 #endif
 
+/* GL_QCOM_writeonly_rendering */
+#ifndef GL_QCOM_writeonly_rendering
+#define GL_WRITEONLY_RENDERING_QCOM                             0x8823
+#endif
+
+/* GL_QCOM_tiled_rendering */
+#ifndef GL_QCOM_tiled_rendering
+#define GL_COLOR_BUFFER_BIT0_QCOM                               0x00000001
+#define GL_COLOR_BUFFER_BIT1_QCOM                               0x00000002
+#define GL_COLOR_BUFFER_BIT2_QCOM                               0x00000004
+#define GL_COLOR_BUFFER_BIT3_QCOM                               0x00000008
+#define GL_COLOR_BUFFER_BIT4_QCOM                               0x00000010
+#define GL_COLOR_BUFFER_BIT5_QCOM                               0x00000020
+#define GL_COLOR_BUFFER_BIT6_QCOM                               0x00000040
+#define GL_COLOR_BUFFER_BIT7_QCOM                               0x00000080
+#define GL_DEPTH_BUFFER_BIT0_QCOM                               0x00000100
+#define GL_DEPTH_BUFFER_BIT1_QCOM                               0x00000200
+#define GL_DEPTH_BUFFER_BIT2_QCOM                               0x00000400
+#define GL_DEPTH_BUFFER_BIT3_QCOM                               0x00000800
+#define GL_DEPTH_BUFFER_BIT4_QCOM                               0x00001000
+#define GL_DEPTH_BUFFER_BIT5_QCOM                               0x00002000
+#define GL_DEPTH_BUFFER_BIT6_QCOM                               0x00004000
+#define GL_DEPTH_BUFFER_BIT7_QCOM                               0x00008000
+#define GL_STENCIL_BUFFER_BIT0_QCOM                             0x00010000
+#define GL_STENCIL_BUFFER_BIT1_QCOM                             0x00020000
+#define GL_STENCIL_BUFFER_BIT2_QCOM                             0x00040000
+#define GL_STENCIL_BUFFER_BIT3_QCOM                             0x00080000
+#define GL_STENCIL_BUFFER_BIT4_QCOM                             0x00100000
+#define GL_STENCIL_BUFFER_BIT5_QCOM                             0x00200000
+#define GL_STENCIL_BUFFER_BIT6_QCOM                             0x00400000
+#define GL_STENCIL_BUFFER_BIT7_QCOM                             0x00800000
+#define GL_MULTISAMPLE_BUFFER_BIT0_QCOM                         0x01000000
+#define GL_MULTISAMPLE_BUFFER_BIT1_QCOM                         0x02000000
+#define GL_MULTISAMPLE_BUFFER_BIT2_QCOM                         0x04000000
+#define GL_MULTISAMPLE_BUFFER_BIT3_QCOM                         0x08000000
+#define GL_MULTISAMPLE_BUFFER_BIT4_QCOM                         0x10000000
+#define GL_MULTISAMPLE_BUFFER_BIT5_QCOM                         0x20000000
+#define GL_MULTISAMPLE_BUFFER_BIT6_QCOM                         0x40000000
+#define GL_MULTISAMPLE_BUFFER_BIT7_QCOM                         0x80000000
+#endif
+
 /*------------------------------------------------------------------------*
  * End of extension tokens, start of corresponding extension functions
  *------------------------------------------------------------------------*/
@@ -237,17 +387,6 @@
 #define GL_OES_compressed_paletted_texture 1
 #endif
 
-/* GL_OES_EGL_image */
-#ifndef GL_OES_EGL_image
-#define GL_OES_EGL_image 1
-#ifdef GL_GLEXT_PROTOTYPES
-GL_APICALL void GL_APIENTRY glEGLImageTargetTexture2DOES (GLenum target, GLeglImageOES image);
-GL_APICALL void GL_APIENTRY glEGLImageTargetRenderbufferStorageOES (GLenum target, GLeglImageOES image);
-#endif
-typedef void (GL_APIENTRYP PFNGLEGLIMAGETARGETTEXTURE2DOESPROC) (GLenum target, GLeglImageOES image);
-typedef void (GL_APIENTRYP PFNGLEGLIMAGETARGETRENDERBUFFERSTORAGEOESPROC) (GLenum target, GLeglImageOES image);
-#endif
-
 /* GL_OES_depth24 */
 #ifndef GL_OES_depth24
 #define GL_OES_depth24 1
@@ -263,6 +402,17 @@
 #define GL_OES_depth_texture 1
 #endif
 
+/* GL_OES_EGL_image */
+#ifndef GL_OES_EGL_image
+#define GL_OES_EGL_image 1
+#ifdef GL_GLEXT_PROTOTYPES
+GL_APICALL void GL_APIENTRY glEGLImageTargetTexture2DOES (GLenum target, GLeglImageOES image);
+GL_APICALL void GL_APIENTRY glEGLImageTargetRenderbufferStorageOES (GLenum target, GLeglImageOES image);
+#endif
+typedef void (GL_APIENTRYP PFNGLEGLIMAGETARGETTEXTURE2DOESPROC) (GLenum target, GLeglImageOES image);
+typedef void (GL_APIENTRYP PFNGLEGLIMAGETARGETRENDERBUFFERSTORAGEOESPROC) (GLenum target, GLeglImageOES image);
+#endif
+
 /* GL_OES_element_index_uint */
 #ifndef GL_OES_element_index_uint
 #define GL_OES_element_index_uint 1
@@ -282,11 +432,11 @@
 #ifndef GL_OES_get_program_binary
 #define GL_OES_get_program_binary 1
 #ifdef GL_GLEXT_PROTOTYPES
-GL_APICALL void GL_APIENTRY glGetProgramBinaryOES (GLuint program, GLsizei bufSize, GLsizei *length, GLenum *binaryFormat, void *binary);
-GL_APICALL void GL_APIENTRY glProgramBinaryOES (GLuint program, GLenum binaryFormat, const void *binary, GLint length);
+GL_APICALL void GL_APIENTRY glGetProgramBinaryOES (GLuint program, GLsizei bufSize, GLsizei *length, GLenum *binaryFormat, GLvoid *binary);
+GL_APICALL void GL_APIENTRY glProgramBinaryOES (GLuint program, GLenum binaryFormat, const GLvoid *binary, GLint length);
 #endif
-typedef void (GL_APIENTRYP PFNGLGETPROGRAMBINARYOESPROC) (GLuint program, GLsizei bufSize, GLsizei *length, GLenum *binaryFormat, void *binary);
-typedef void (GL_APIENTRYP PFNGLPROGRAMBINARYOESPROC) (GLuint program, GLenum binaryFormat, const void *binary, GLint length);
+typedef void (GL_APIENTRYP PFNGLGETPROGRAMBINARYOESPROC) (GLuint program, GLsizei bufSize, GLsizei *length, GLenum *binaryFormat, GLvoid *binary);
+typedef void (GL_APIENTRYP PFNGLPROGRAMBINARYOESPROC) (GLuint program, GLenum binaryFormat, const GLvoid *binary, GLint length);
 #endif
 
 /* GL_OES_mapbuffer */
@@ -295,11 +445,11 @@
 #ifdef GL_GLEXT_PROTOTYPES
 GL_APICALL void* GL_APIENTRY glMapBufferOES (GLenum target, GLenum access);
 GL_APICALL GLboolean GL_APIENTRY glUnmapBufferOES (GLenum target);
-GL_APICALL void GL_APIENTRY glGetBufferPointervOES (GLenum target, GLenum pname, void** params);
+GL_APICALL void GL_APIENTRY glGetBufferPointervOES (GLenum target, GLenum pname, GLvoid** params);
 #endif
 typedef void* (GL_APIENTRYP PFNGLMAPBUFFEROESPROC) (GLenum target, GLenum access);
 typedef GLboolean (GL_APIENTRYP PFNGLUNMAPBUFFEROESPROC) (GLenum target);
-typedef void (GL_APIENTRYP PFNGLGETBUFFERPOINTERVOESPROC) (GLenum target, GLenum pname, void** params);
+typedef void (GL_APIENTRYP PFNGLGETBUFFERPOINTERVOESPROC) (GLenum target, GLenum pname, GLvoid** params);
 #endif
 
 /* GL_OES_packed_depth_stencil */
@@ -331,46 +481,61 @@
 #ifndef GL_OES_texture_3D
 #define GL_OES_texture_3D 1
 #ifdef GL_GLEXT_PROTOTYPES
-GL_APICALL void GL_APIENTRY glTexImage3DOES (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const void* pixels);
-GL_APICALL void GL_APIENTRY glTexSubImage3DOES (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const void* pixels);
+GL_APICALL void GL_APIENTRY glTexImage3DOES (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const GLvoid* pixels);
+GL_APICALL void GL_APIENTRY glTexSubImage3DOES (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const GLvoid* pixels);
 GL_APICALL void GL_APIENTRY glCopyTexSubImage3DOES (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height);
-GL_APICALL void GL_APIENTRY glCompressedTexImage3DOES (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const void* data);
-GL_APICALL void GL_APIENTRY glCompressedTexSubImage3DOES (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const void* data);
+GL_APICALL void GL_APIENTRY glCompressedTexImage3DOES (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const GLvoid* data);
+GL_APICALL void GL_APIENTRY glCompressedTexSubImage3DOES (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const GLvoid* data);
 GL_APICALL void GL_APIENTRY glFramebufferTexture3DOES (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLint zoffset);
 #endif
 typedef void (GL_APIENTRYP PFNGLTEXIMAGE3DOESPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const GLvoid* pixels);
-typedef void (GL_APIENTRYP PFNGLTEXSUBIMAGE3DOESPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const void* pixels);
+typedef void (GL_APIENTRYP PFNGLTEXSUBIMAGE3DOESPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const GLvoid* pixels);
 typedef void (GL_APIENTRYP PFNGLCOPYTEXSUBIMAGE3DOESPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height);
-typedef void (GL_APIENTRYP PFNGLCOMPRESSEDTEXIMAGE3DOESPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const void* data);
-typedef void (GL_APIENTRYP PFNGLCOMPRESSEDTEXSUBIMAGE3DOESPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const void* data);
+typedef void (GL_APIENTRYP PFNGLCOMPRESSEDTEXIMAGE3DOESPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const GLvoid* data);
+typedef void (GL_APIENTRYP PFNGLCOMPRESSEDTEXSUBIMAGE3DOESPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const GLvoid* data);
 typedef void (GL_APIENTRYP PFNGLFRAMEBUFFERTEXTURE3DOES) (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLint zoffset);
 #endif
 
-/* GL_OES_texture_float_linear */
-#ifndef GL_OES_texture_float_linear
-#define GL_OES_texture_float_linear 1
-#endif
-
-/* GL_OES_texture_half_float_linear */
-#ifndef GL_OES_texture_half_float_linear
-#define GL_OES_texture_half_float_linear 1
-#endif
-
 /* GL_OES_texture_float */
 #ifndef GL_OES_texture_float
 #define GL_OES_texture_float 1
 #endif
 
+/* GL_OES_texture_float_linear */
+#ifndef GL_OES_texture_float_linear
+#define GL_OES_texture_float_linear 1
+#endif
+
 /* GL_OES_texture_half_float */
 #ifndef GL_OES_texture_half_float
 #define GL_OES_texture_half_float 1
 #endif
 
+/* GL_OES_texture_half_float_linear */
+#ifndef GL_OES_texture_half_float_linear
+#define GL_OES_texture_half_float_linear 1
+#endif
+
 /* GL_OES_texture_npot */
 #ifndef GL_OES_texture_npot
 #define GL_OES_texture_npot 1
 #endif
 
+/* GL_OES_vertex_array_object */
+#ifndef GL_OES_vertex_array_object
+#define GL_OES_vertex_array_object 1
+#ifdef GL_GLEXT_PROTOTYPES
+GL_APICALL void GL_APIENTRY glBindVertexArrayOES (GLuint array);
+GL_APICALL void GL_APIENTRY glDeleteVertexArraysOES (GLsizei n, const GLuint *arrays);
+GL_APICALL void GL_APIENTRY glGenVertexArraysOES (GLsizei n, GLuint *arrays);
+GL_APICALL GLboolean GL_APIENTRY glIsVertexArrayOES (GLuint array);
+#endif
+typedef void (GL_APIENTRYP PFNGLBINDVERTEXARRAYOESPROC) (GLuint array);
+typedef void (GL_APIENTRYP PFNGLDELETEVERTEXARRAYSOESPROC) (GLsizei n, const GLuint *arrays);
+typedef void (GL_APIENTRYP PFNGLGENVERTEXARRAYSOESPROC) (GLsizei n, GLuint *arrays);
+typedef GLboolean (GL_APIENTRYP PFNGLISVERTEXARRAYOESPROC) (GLuint array);
+#endif
+
 /* GL_OES_vertex_half_float */
 #ifndef GL_OES_vertex_half_float
 #define GL_OES_vertex_half_float 1
@@ -381,6 +546,11 @@
 #define GL_OES_vertex_type_10_10_10_2 1
 #endif
 
+/* GL_OES_texture_external */
+#ifndef GL_OES_texture_external
+#define GL_OES_texture_external 1
+#endif
+
 /*------------------------------------------------------------------------*
  * AMD extension functions
  *------------------------------------------------------------------------*/
@@ -395,20 +565,15 @@
 #define GL_AMD_compressed_ATC_texture 1
 #endif
 
-/* GL_AMD_program_binary_Z400 */
-#ifndef GL_AMD_program_binary_Z400
-#define GL_AMD_program_binary_Z400 1
-#endif
-
 /* AMD_performance_monitor */
 #ifndef GL_AMD_performance_monitor
 #define GL_AMD_performance_monitor 1
 #ifdef GL_GLEXT_PROTOTYPES
 GL_APICALL void GL_APIENTRY glGetPerfMonitorGroupsAMD (GLint *numGroups, GLsizei groupsSize, GLuint *groups);
 GL_APICALL void GL_APIENTRY glGetPerfMonitorCountersAMD (GLuint group, GLint *numCounters, GLint *maxActiveCounters, GLsizei counterSize, GLuint *counters);
-GL_APICALL void GL_APIENTRY glGetPerfMonitorGroupStringAMD (GLuint group, GLsizei bufSize, GLsizei *length, char *groupString);
-GL_APICALL void GL_APIENTRY glGetPerfMonitorCounterStringAMD (GLuint group, GLuint counter, GLsizei bufSize, GLsizei *length, char *counterString);
-GL_APICALL void GL_APIENTRY glGetPerfMonitorCounterInfoAMD (GLuint group, GLuint counter, GLenum pname, void *data);
+GL_APICALL void GL_APIENTRY glGetPerfMonitorGroupStringAMD (GLuint group, GLsizei bufSize, GLsizei *length, GLchar *groupString);
+GL_APICALL void GL_APIENTRY glGetPerfMonitorCounterStringAMD (GLuint group, GLuint counter, GLsizei bufSize, GLsizei *length, GLchar *counterString);
+GL_APICALL void GL_APIENTRY glGetPerfMonitorCounterInfoAMD (GLuint group, GLuint counter, GLenum pname, GLvoid *data);
 GL_APICALL void GL_APIENTRY glGenPerfMonitorsAMD (GLsizei n, GLuint *monitors);
 GL_APICALL void GL_APIENTRY glDeletePerfMonitorsAMD (GLsizei n, GLuint *monitors);
 GL_APICALL void GL_APIENTRY glSelectPerfMonitorCountersAMD (GLuint monitor, GLboolean enable, GLuint group, GLint numCounters, GLuint *countersList);
@@ -418,9 +583,9 @@
 #endif
 typedef void (GL_APIENTRYP PFNGLGETPERFMONITORGROUPSAMDPROC) (GLint *numGroups, GLsizei groupsSize, GLuint *groups);
 typedef void (GL_APIENTRYP PFNGLGETPERFMONITORCOUNTERSAMDPROC) (GLuint group, GLint *numCounters, GLint *maxActiveCounters, GLsizei counterSize, GLuint *counters);
-typedef void (GL_APIENTRYP PFNGLGETPERFMONITORGROUPSTRINGAMDPROC) (GLuint group, GLsizei bufSize, GLsizei *length, char *groupString);
-typedef void (GL_APIENTRYP PFNGLGETPERFMONITORCOUNTERSTRINGAMDPROC) (GLuint group, GLuint counter, GLsizei bufSize, GLsizei *length, char *counterString);
-typedef void (GL_APIENTRYP PFNGLGETPERFMONITORCOUNTERINFOAMDPROC) (GLuint group, GLuint counter, GLenum pname, void *data);
+typedef void (GL_APIENTRYP PFNGLGETPERFMONITORGROUPSTRINGAMDPROC) (GLuint group, GLsizei bufSize, GLsizei *length, GLchar *groupString);
+typedef void (GL_APIENTRYP PFNGLGETPERFMONITORCOUNTERSTRINGAMDPROC) (GLuint group, GLuint counter, GLsizei bufSize, GLsizei *length, GLchar *counterString);
+typedef void (GL_APIENTRYP PFNGLGETPERFMONITORCOUNTERINFOAMDPROC) (GLuint group, GLuint counter, GLenum pname, GLvoid *data);
 typedef void (GL_APIENTRYP PFNGLGENPERFMONITORSAMDPROC) (GLsizei n, GLuint *monitors);
 typedef void (GL_APIENTRYP PFNGLDELETEPERFMONITORSAMDPROC) (GLsizei n, GLuint *monitors);
 typedef void (GL_APIENTRYP PFNGLSELECTPERFMONITORCOUNTERSAMDPROC) (GLuint monitor, GLboolean enable, GLuint group, GLint numCounters, GLuint *countersList);
@@ -429,39 +594,99 @@
 typedef void (GL_APIENTRYP PFNGLGETPERFMONITORCOUNTERDATAAMDPROC) (GLuint monitor, GLenum pname, GLsizei dataSize, GLuint *data, GLint *bytesWritten);
 #endif
 
+/* GL_AMD_program_binary_Z400 */
+#ifndef GL_AMD_program_binary_Z400
+#define GL_AMD_program_binary_Z400 1
+#endif
+
 /*------------------------------------------------------------------------*
  * EXT extension functions
  *------------------------------------------------------------------------*/
 
+/* GL_EXT_blend_minmax */
+#ifndef GL_EXT_blend_minmax
+#define GL_EXT_blend_minmax 1
+#endif
+
+/* GL_EXT_discard_framebuffer */
+#ifndef GL_EXT_discard_framebuffer
+#define GL_EXT_discard_framebuffer 1
+#ifdef GL_GLEXT_PROTOTYPES
+GL_APICALL void GL_APIENTRY glDiscardFramebufferEXT (GLenum target, GLsizei numAttachments, const GLenum *attachments);
+#endif
+typedef void (GL_APIENTRYP PFNGLDISCARDFRAMEBUFFEREXTPROC) (GLenum target, GLsizei numAttachments, const GLenum *attachments);
+#endif
+
+#ifndef GL_EXT_multi_draw_arrays
+#define GL_EXT_multi_draw_arrays 1
+#ifdef GL_GLEXT_PROTOTYPES
+GL_APICALL void GL_APIENTRY glMultiDrawArraysEXT (GLenum mode, GLint *first, GLsizei *count, GLsizei primcount);
+GL_APICALL void GL_APIENTRY glMultiDrawElementsEXT (GLenum mode, const GLsizei *count, GLenum type, const GLvoid* *indices, GLsizei primcount);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef void (GL_APIENTRYP PFNGLMULTIDRAWARRAYSEXTPROC) (GLenum mode, GLint *first, GLsizei *count, GLsizei primcount);
+typedef void (GL_APIENTRYP PFNGLMULTIDRAWELEMENTSEXTPROC) (GLenum mode, const GLsizei *count, GLenum type, const GLvoid* *indices, GLsizei primcount);
+#endif
+
+/* GL_EXT_read_format_bgra */
+#ifndef GL_EXT_read_format_bgra
+#define GL_EXT_read_format_bgra 1
+#endif
+
 /* GL_EXT_texture_filter_anisotropic */
 #ifndef GL_EXT_texture_filter_anisotropic
 #define GL_EXT_texture_filter_anisotropic 1
 #endif
 
-/* GL_EXT_texture_type_2_10_10_10_REV */
-#ifndef GL_EXT_texture_type_2_10_10_10_REV
-#define GL_EXT_texture_type_2_10_10_10_REV 1
-#endif
-
 /* GL_EXT_texture_format_BGRA8888 */
 #ifndef GL_EXT_texture_format_BGRA8888
 #define GL_EXT_texture_format_BGRA8888 1
 #endif
 
+/* GL_EXT_texture_type_2_10_10_10_REV */
+#ifndef GL_EXT_texture_type_2_10_10_10_REV
+#define GL_EXT_texture_type_2_10_10_10_REV 1
+#endif
+
+/* GL_EXT_texture_compression_dxt1 */
+#ifndef GL_EXT_texture_compression_dxt1
+#define GL_EXT_texture_compression_dxt1 1
+#endif
+
 /*------------------------------------------------------------------------*
  * IMG extension functions
  *------------------------------------------------------------------------*/
 
+/* GL_IMG_program_binary */
+#ifndef GL_IMG_program_binary
+#define GL_IMG_program_binary 1
+#endif
+
 /* GL_IMG_read_format */
 #ifndef GL_IMG_read_format
 #define GL_IMG_read_format 1
 #endif
 
+/* GL_IMG_shader_binary */
+#ifndef GL_IMG_shader_binary
+#define GL_IMG_shader_binary 1
+#endif
+
 /* GL_IMG_texture_compression_pvrtc */
 #ifndef GL_IMG_texture_compression_pvrtc
 #define GL_IMG_texture_compression_pvrtc 1
 #endif
 
+/* GL_IMG_multisampled_render_to_texture */
+#ifndef GL_IMG_multisampled_render_to_texture
+#define GL_IMG_multisampled_render_to_texture 1
+#ifdef GL_GLEXT_PROTOTYPES
+GL_APICALL void GL_APIENTRY glRenderbufferStorageMultisampleIMG (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height);
+GL_APICALL void GL_APIENTRY glFramebufferTexture2DMultisampleIMG (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLsizei samples);
+#endif
+typedef void (GL_APIENTRYP PFNGLRENDERBUFFERSTORAGEMULTISAMPLEIMG) (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height);
+typedef void (GL_APIENTRYP PFNGLFRAMEBUFFERTEXTURE2DMULTISAMPLEIMG) (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLsizei samples);
+#endif
+
 /*------------------------------------------------------------------------*
  * NV extension functions
  *------------------------------------------------------------------------*/
@@ -487,6 +712,22 @@
 typedef void (GL_APIENTRYP PFNGLSETFENCENVPROC) (GLuint fence, GLenum condition);
 #endif
 
+/* GL_NV_coverage_sample */
+#ifndef GL_NV_coverage_sample
+#define GL_NV_coverage_sample 1
+#ifdef GL_GLEXT_PROTOTYPES
+GL_APICALL void GL_APIENTRY glCoverageMaskNV (GLboolean mask);
+GL_APICALL void GL_APIENTRY glCoverageOperationNV (GLenum operation);
+#endif
+typedef void (GL_APIENTRYP PFNGLCOVERAGEMASKNVPROC) (GLboolean mask);
+typedef void (GL_APIENTRYP PFNGLCOVERAGEOPERATIONNVPROC) (GLenum operation);
+#endif
+
+/* GL_NV_depth_nonlinear */
+#ifndef GL_NV_depth_nonlinear
+#define GL_NV_depth_nonlinear 1
+#endif
+
 /*------------------------------------------------------------------------*
  * QCOM extension functions
  *------------------------------------------------------------------------*/
@@ -496,21 +737,75 @@
 #define GL_QCOM_driver_control 1
 #ifdef GL_GLEXT_PROTOTYPES
 GL_APICALL void GL_APIENTRY glGetDriverControlsQCOM (GLint *num, GLsizei size, GLuint *driverControls);
-GL_APICALL void GL_APIENTRY glGetDriverControlStringQCOM (GLuint driverControl, GLsizei bufSize, GLsizei *length, char *driverControlString);
+GL_APICALL void GL_APIENTRY glGetDriverControlStringQCOM (GLuint driverControl, GLsizei bufSize, GLsizei *length, GLchar *driverControlString);
 GL_APICALL void GL_APIENTRY glEnableDriverControlQCOM (GLuint driverControl);
 GL_APICALL void GL_APIENTRY glDisableDriverControlQCOM (GLuint driverControl);
 #endif
 typedef void (GL_APIENTRYP PFNGLGETDRIVERCONTROLSQCOMPROC) (GLint *num, GLsizei size, GLuint *driverControls);
-typedef void (GL_APIENTRYP PFNGLGETDRIVERCONTROLSTRINGQCOMPROC) (GLuint driverControl, GLsizei bufSize, GLsizei *length, char *driverControlString);
+typedef void (GL_APIENTRYP PFNGLGETDRIVERCONTROLSTRINGQCOMPROC) (GLuint driverControl, GLsizei bufSize, GLsizei *length, GLchar *driverControlString);
 typedef void (GL_APIENTRYP PFNGLENABLEDRIVERCONTROLQCOMPROC) (GLuint driverControl);
 typedef void (GL_APIENTRYP PFNGLDISABLEDRIVERCONTROLQCOMPROC) (GLuint driverControl);
 #endif
 
+/* GL_QCOM_extended_get */
+#ifndef GL_QCOM_extended_get
+#define GL_QCOM_extended_get 1
+#ifdef GL_GLEXT_PROTOTYPES
+GL_APICALL void GL_APIENTRY glExtGetTexturesQCOM (GLuint *textures, GLint maxTextures, GLint *numTextures);
+GL_APICALL void GL_APIENTRY glExtGetBuffersQCOM (GLuint *buffers, GLint maxBuffers, GLint *numBuffers);
+GL_APICALL void GL_APIENTRY glExtGetRenderbuffersQCOM (GLuint *renderbuffers, GLint maxRenderbuffers, GLint *numRenderbuffers);
+GL_APICALL void GL_APIENTRY glExtGetFramebuffersQCOM (GLuint *framebuffers, GLint maxFramebuffers, GLint *numFramebuffers);
+GL_APICALL void GL_APIENTRY glExtGetTexLevelParameterivQCOM (GLuint texture, GLenum face, GLint level, GLenum pname, GLint *params);
+GL_APICALL void GL_APIENTRY glExtTexObjectStateOverrideiQCOM (GLenum target, GLenum pname, GLint param);
+GL_APICALL void GL_APIENTRY glExtGetTexSubImageQCOM (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, GLvoid *texels);
+GL_APICALL void GL_APIENTRY glExtGetBufferPointervQCOM (GLenum target, GLvoid **params);
+#endif
+typedef void (GL_APIENTRYP PFNGLEXTGETTEXTURESQCOMPROC) (GLuint *textures, GLint maxTextures, GLint *numTextures);
+typedef void (GL_APIENTRYP PFNGLEXTGETBUFFERSQCOMPROC) (GLuint *buffers, GLint maxBuffers, GLint *numBuffers);
+typedef void (GL_APIENTRYP PFNGLEXTGETRENDERBUFFERSQCOMPROC) (GLuint *renderbuffers, GLint maxRenderbuffers, GLint *numRenderbuffers);
+typedef void (GL_APIENTRYP PFNGLEXTGETFRAMEBUFFERSQCOMPROC) (GLuint *framebuffers, GLint maxFramebuffers, GLint *numFramebuffers);
+typedef void (GL_APIENTRYP PFNGLEXTGETTEXLEVELPARAMETERIVQCOMPROC) (GLuint texture, GLenum face, GLint level, GLenum pname, GLint *params);
+typedef void (GL_APIENTRYP PFNGLEXTTEXOBJECTSTATEOVERRIDEIQCOMPROC) (GLenum target, GLenum pname, GLint param);
+typedef void (GL_APIENTRYP PFNGLEXTGETTEXSUBIMAGEQCOMPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, GLvoid *texels);
+typedef void (GL_APIENTRYP PFNGLEXTGETBUFFERPOINTERVQCOMPROC) (GLenum target, GLvoid **params);
+#endif
+
+/* GL_QCOM_extended_get2 */
+#ifndef GL_QCOM_extended_get2
+#define GL_QCOM_extended_get2 1
+#ifdef GL_GLEXT_PROTOTYPES
+GL_APICALL void GL_APIENTRY glExtGetShadersQCOM (GLuint *shaders, GLint maxShaders, GLint *numShaders);
+GL_APICALL void GL_APIENTRY glExtGetProgramsQCOM (GLuint *programs, GLint maxPrograms, GLint *numPrograms);
+GL_APICALL GLboolean GL_APIENTRY glExtIsProgramBinaryQCOM (GLuint program);
+GL_APICALL void GL_APIENTRY glExtGetProgramBinarySourceQCOM (GLuint program, GLenum shadertype, GLchar *source, GLint *length);
+#endif
+typedef void (GL_APIENTRYP PFNGLEXTGETSHADERSQCOMPROC) (GLuint *shaders, GLint maxShaders, GLint *numShaders);
+typedef void (GL_APIENTRYP PFNGLEXTGETPROGRAMSQCOMPROC) (GLuint *programs, GLint maxPrograms, GLint *numPrograms);
+typedef GLboolean (GL_APIENTRYP PFNGLEXTISPROGRAMBINARYQCOMPROC) (GLuint program);
+typedef void (GL_APIENTRYP PFNGLEXTGETPROGRAMBINARYSOURCEQCOMPROC) (GLuint program, GLenum shadertype, GLchar *source, GLint *length);
+#endif
+
 /* GL_QCOM_perfmon_global_mode */
 #ifndef GL_QCOM_perfmon_global_mode
 #define GL_QCOM_perfmon_global_mode 1
 #endif
 
+/* GL_QCOM_writeonly_rendering */
+#ifndef GL_QCOM_writeonly_rendering
+#define GL_QCOM_writeonly_rendering 1
+#endif
+
+/* GL_QCOM_tiled_rendering */
+#ifndef GL_QCOM_tiled_rendering
+#define GL_QCOM_tiled_rendering 1
+#ifdef GL_GLEXT_PROTOTYPES
+GL_APICALL void GL_APIENTRY glStartTilingQCOM (GLuint x, GLuint y, GLuint width, GLuint height, GLbitfield preserveMask);
+GL_APICALL void GL_APIENTRY glEndTilingQCOM (GLbitfield preserveMask);
+#endif
+typedef void (GL_APIENTRYP PFNGLSTARTTILINGQCOMPROC) (GLuint x, GLuint y, GLuint width, GLuint height, GLbitfield preserveMask);
+typedef void (GL_APIENTRYP PFNGLENDTILINGQCOMPROC) (GLbitfield preserveMask);
+#endif
+
 #ifdef __cplusplus
 }
 #endif
diff --git a/opengl/include/GLES2/gl2platform.h b/opengl/include/GLES2/gl2platform.h
index 3e9036c..c9fa3c4 100644
--- a/opengl/include/GLES2/gl2platform.h
+++ b/opengl/include/GLES2/gl2platform.h
@@ -1,7 +1,7 @@
 #ifndef __gl2platform_h_
 #define __gl2platform_h_
 
-/* $Revision: 7173 $ on $Date:: 2009-01-09 11:18:21 -0800 #$ */
+/* $Revision: 10602 $ on $Date:: 2010-03-04 22:35:34 -0800 #$ */
 
 /*
  * This document is licensed under the SGI Free Software B License Version
@@ -9,7 +9,6 @@
  */
 
 /* Platform-specific types and definitions for OpenGL ES 2.X  gl2.h
- * Last modified on 2008/12/19
  *
  * Adopters may modify khrplatform.h and this file to suit their platform.
  * You are encouraged to submit all modifications to the Khronos group so that
@@ -24,6 +23,8 @@
 #define GL_APICALL  KHRONOS_APICALL
 #endif
 
+#ifndef GL_APIENTRY
 #define GL_APIENTRY KHRONOS_APIENTRY
+#endif
 
 #endif /* __gl2platform_h_ */
diff --git a/opengl/java/android/opengl/GLES10.java b/opengl/java/android/opengl/GLES10.java
index db52b82..790acbd 100644
--- a/opengl/java/android/opengl/GLES10.java
+++ b/opengl/java/android/opengl/GLES10.java
@@ -669,6 +669,22 @@
         java.nio.IntBuffer params
     );
 
+/*
+ * Copyright (C) 2009 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
     // C function const GLubyte * glGetString ( GLenum name )
 
     public static native String glGetString(
diff --git a/opengl/java/android/opengl/GLES20.java b/opengl/java/android/opengl/GLES20.java
index b8aac0e..635f811 100644
--- a/opengl/java/android/opengl/GLES20.java
+++ b/opengl/java/android/opengl/GLES20.java
@@ -670,6 +670,15 @@
         int count
     );
 
+    // C function void glDrawElements ( GLenum mode, GLsizei count, GLenum type, GLint offset )
+
+    public static native void glDrawElements(
+        int mode,
+        int count,
+        int type,
+        int offset
+    );
+
     // C function void glDrawElements ( GLenum mode, GLsizei count, GLenum type, const GLvoid *indices )
 
     public static native void glDrawElements(
@@ -978,6 +987,22 @@
         java.nio.IntBuffer params
     );
 
+/*
+ * Copyright (C) 2009 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
     // C function void glGetProgramInfoLog( GLuint program, GLsizei maxLength, GLsizei * length,
  	//     GLchar * infoLog);
 
@@ -1018,6 +1043,22 @@
         java.nio.IntBuffer params
     );
 
+/*
+ * Copyright (C) 2009 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
     // C function void glGetShaderInfoLog( GLuint shader, GLsizei maxLength, GLsizei * length,
  	//     GLchar * infoLog);
 
@@ -1064,6 +1105,22 @@
         byte source
     );
 
+/*
+ * Copyright (C) 2009 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
     // C function const GLubyte * glGetString ( GLenum name )
 
     public static native String glGetString(
@@ -1316,6 +1373,22 @@
         int length
     );
 
+/*
+ * Copyright (C) 2009 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
     // C function void glShaderSource ( GLuint shader, GLsizei count, const GLchar ** string, const GLint* length )
 
     public static native void glShaderSource(
@@ -1814,6 +1887,17 @@
         java.nio.FloatBuffer values
     );
 
+    // C function void glVertexAttribPointer ( GLuint indx, GLint size, GLenum type, GLboolean normalized, GLsizei stride, GLint offset )
+
+    public static native void glVertexAttribPointer(
+        int indx,
+        int size,
+        int type,
+        boolean normalized,
+        int stride,
+        int offset
+    );
+
     // C function void glVertexAttribPointer ( GLuint indx, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const GLvoid *ptr )
 
     private static native void glVertexAttribPointerBounds(
diff --git a/opengl/java/android/opengl/GLSurfaceView.java b/opengl/java/android/opengl/GLSurfaceView.java
index f904cdf..41207f7 100644
--- a/opengl/java/android/opengl/GLSurfaceView.java
+++ b/opengl/java/android/opengl/GLSurfaceView.java
@@ -222,7 +222,10 @@
         // underlying surface is created and destroyed
         SurfaceHolder holder = getHolder();
         holder.addCallback(this);
-        holder.setFormat(PixelFormat.RGB_565);
+        // setFormat is done by SurfaceView in SDK 2.3 and newer. Uncomment
+        // this statement if back-porting to 2.2 or older:
+        // holder.setFormat(PixelFormat.RGB_565);
+        //
         // setType is not needed for SDK 2.0 or newer. Uncomment this
         // statement if back-porting this code to older SDKs.
         // holder.setType(SurfaceHolder.SURFACE_TYPE_GPU);
@@ -1104,7 +1107,6 @@
             mRenderer = renderer;
         }
 
-
         @Override
         public void run() {
             setName("GLThread " + getId());
@@ -1155,6 +1157,7 @@
                 boolean sizeChanged = false;
                 boolean wantRenderNotification = false;
                 boolean doRenderNotification = false;
+                boolean askedToReleaseEglContext = false;
                 int w = 0;
                 int h = 0;
                 Runnable event = null;
@@ -1180,6 +1183,17 @@
                                 }
                             }
 
+                            // Do we need to give up the EGL context?
+                            if (mShouldReleaseEglContext) {
+                                if (LOG_SURFACE) {
+                                    Log.i("GLThread", "releasing EGL context because asked to tid=" + getId());
+                                }
+                                stopEglSurfaceLocked();
+                                stopEglContextLocked();
+                                mShouldReleaseEglContext = false;
+                                askedToReleaseEglContext = true;
+                            }
+
                             // Have we lost the EGL context?
                             if (lostEglContext) {
                                 stopEglSurfaceLocked();
@@ -1229,6 +1243,9 @@
                             }
 
                             if (doRenderNotification) {
+                                if (LOG_SURFACE) {
+                                    Log.i("GLThread", "sending render notification tid=" + getId());
+                                }
                                 wantRenderNotification = false;
                                 doRenderNotification = false;
                                 mRenderComplete = true;
@@ -1236,22 +1253,24 @@
                             }
 
                             // Ready to draw?
-                            if ((!mPaused) && mHasSurface
-                                && (mWidth > 0) && (mHeight > 0)
-                                && (mRequestRender || (mRenderMode == RENDERMODE_CONTINUOUSLY))) {
+                            if (readyToDraw()) {
 
                                 // If we don't have an EGL context, try to acquire one.
-                                if ((! mHaveEglContext) && sGLThreadManager.tryAcquireEglContextLocked(this)) {
-                                    try {
-                                        mEglHelper.start();
-                                    } catch (RuntimeException t) {
-                                        sGLThreadManager.releaseEglContextLocked(this);
-                                        throw t;
-                                    }
-                                    mHaveEglContext = true;
-                                    createEglContext = true;
+                                if (! mHaveEglContext) {
+                                    if (askedToReleaseEglContext) {
+                                        askedToReleaseEglContext = false;
+                                    } else if (sGLThreadManager.tryAcquireEglContextLocked(this)) {
+                                        try {
+                                            mEglHelper.start();
+                                        } catch (RuntimeException t) {
+                                            sGLThreadManager.releaseEglContextLocked(this);
+                                            throw t;
+                                        }
+                                        mHaveEglContext = true;
+                                        createEglContext = true;
 
-                                    sGLThreadManager.notifyAll();
+                                        sGLThreadManager.notifyAll();
+                                    }
                                 }
 
                                 if (mHaveEglContext && !mHaveEglSurface) {
@@ -1266,6 +1285,9 @@
                                         w = mWidth;
                                         h = mHeight;
                                         wantRenderNotification = true;
+                                        if (LOG_SURFACE) {
+                                            Log.i("GLThread", "noticing that we want render notification tid=" + getId());
+                                        }
 
                                         if (DRAW_TWICE_AFTER_SIZE_CHANGED) {
                                             // We keep mRequestRender true so that we draw twice after the size changes.
@@ -1285,7 +1307,16 @@
 
                             // By design, this is the only place in a GLThread thread where we wait().
                             if (LOG_THREADS) {
-                                Log.i("GLThread", "waiting tid=" + getId());
+                                Log.i("GLThread", "waiting tid=" + getId()
+                                    + " mHaveEglContext: " + mHaveEglContext
+                                    + " mHaveEglSurface: " + mHaveEglSurface
+                                    + " mPaused: " + mPaused
+                                    + " mHasSurface: " + mHasSurface
+                                    + " mWaitingForSurface: " + mWaitingForSurface
+                                    + " mWidth: " + mWidth
+                                    + " mHeight: " + mHeight
+                                    + " mRequestRender: " + mRequestRender
+                                    + " mRenderMode: " + mRenderMode);
                             }
                             sGLThreadManager.wait();
                         }
@@ -1327,7 +1358,7 @@
                     }
 
                     if (LOG_RENDERER_DRAW_FRAME) {
-                        Log.w("GLThread", "onDrawFrame");
+                        Log.w("GLThread", "onDrawFrame tid=" + getId());
                     }
                     mRenderer.onDrawFrame(gl);
                     if (!mEglHelper.swap()) {
@@ -1353,6 +1384,16 @@
             }
         }
 
+        public boolean ableToDraw() {
+            return mHaveEglContext && mHaveEglSurface && readyToDraw();
+        }
+
+        private boolean readyToDraw() {
+            return (!mPaused) && mHasSurface
+                && (mWidth > 0) && (mHeight > 0)
+                && (mRequestRender || (mRenderMode == RENDERMODE_CONTINUOUSLY));
+        }
+
         public void setRenderMode(int renderMode) {
             if ( !((RENDERMODE_WHEN_DIRTY <= renderMode) && (renderMode <= RENDERMODE_CONTINUOUSLY)) ) {
                 throw new IllegalArgumentException("renderMode");
@@ -1462,9 +1503,10 @@
                 sGLThreadManager.notifyAll();
 
                 // Wait for thread to react to resize and render a frame
-                while (! mExited && !mPaused && !mRenderComplete ) {
+                while (! mExited && !mPaused && !mRenderComplete
+                        && (mGLThread != null && mGLThread.ableToDraw())) {
                     if (LOG_SURFACE) {
-                        Log.i("Main thread", "onWindowResize waiting for render complete.");
+                        Log.i("Main thread", "onWindowResize waiting for render complete from tid=" + mGLThread.getId());
                     }
                     try {
                         sGLThreadManager.wait();
@@ -1491,6 +1533,11 @@
             }
         }
 
+        public void requestReleaseEglContextLocked() {
+            mShouldReleaseEglContext = true;
+            sGLThreadManager.notifyAll();
+        }
+
         /**
          * Queue an "event" to be run on the GL rendering thread.
          * @param r the runnable to be run on the GL rendering thread.
@@ -1515,6 +1562,7 @@
         private boolean mWaitingForSurface;
         private boolean mHaveEglContext;
         private boolean mHaveEglSurface;
+        private boolean mShouldReleaseEglContext;
         private int mWidth;
         private int mHeight;
         private int mRenderMode;
@@ -1599,6 +1647,13 @@
             if (mMultipleGLESContextsAllowed) {
                 return true;
             }
+            // Notify the owning thread that it should release the context.
+            // TODO: implement a fairness policy. Currently
+            // if the owning thread is drawing continuously it will just
+            // reacquire the EGL context.
+            if (mEglOwner != null) {
+                mEglOwner.requestReleaseEglContextLocked();
+            }
             return false;
         }
 
diff --git a/opengl/java/com/google/android/gles_jni/GLImpl.java b/opengl/java/com/google/android/gles_jni/GLImpl.java
index 30b9325..090c0cb7 100644
--- a/opengl/java/com/google/android/gles_jni/GLImpl.java
+++ b/opengl/java/com/google/android/gles_jni/GLImpl.java
@@ -19,7 +19,7 @@
 
 package com.google.android.gles_jni;
 
-import android.app.ActivityThread;
+import android.app.AppGlobals;
 import android.content.pm.ApplicationInfo;
 import android.content.pm.IPackageManager;
 import android.os.Build;
@@ -65,7 +65,7 @@
     private static boolean allowIndirectBuffers(String appName) {
         boolean result = false;
         int version = 0;
-        IPackageManager pm = ActivityThread.getPackageManager();
+        IPackageManager pm = AppGlobals.getPackageManager();
         try {
             ApplicationInfo applicationInfo = pm.getApplicationInfo(appName, 0);
             if (applicationInfo != null) {
diff --git a/opengl/libagl/Android.mk b/opengl/libagl/Android.mk
index 6cb146c..8abd6499 100644
--- a/opengl/libagl/Android.mk
+++ b/opengl/libagl/Android.mk
@@ -37,6 +37,10 @@
 	LOCAL_CFLAGS += -fstrict-aliasing
 endif
 
+ifeq ($(ARCH_ARM_HAVE_TLS_REGISTER),true)
+    LOCAL_CFLAGS += -DHAVE_ARM_TLS_REGISTER
+endif
+
 ifneq ($(TARGET_SIMULATOR),true)
     # we need to access the private Bionic header <bionic_tls.h>
     # on ARM platforms, we need to mirror the ARCH_ARM_HAVE_TLS_REGISTER
diff --git a/opengl/libagl/egl.cpp b/opengl/libagl/egl.cpp
index b6e0aae..54d7307 100644
--- a/opengl/libagl/egl.cpp
+++ b/opengl/libagl/egl.cpp
@@ -213,7 +213,7 @@
     egl_window_surface_v2_t(
             EGLDisplay dpy, EGLConfig config,
             int32_t depthFormat,
-            android_native_window_t* window);
+            ANativeWindow* window);
 
     ~egl_window_surface_v2_t();
 
@@ -235,7 +235,7 @@
 private:
     status_t lock(android_native_buffer_t* buf, int usage, void** vaddr);
     status_t unlock(android_native_buffer_t* buf);
-    android_native_window_t*   nativeWindow;
+    ANativeWindow*   nativeWindow;
     android_native_buffer_t*   buffer;
     android_native_buffer_t*   previousBuffer;
     gralloc_module_t const*    module;
@@ -355,7 +355,7 @@
 egl_window_surface_v2_t::egl_window_surface_v2_t(EGLDisplay dpy,
         EGLConfig config,
         int32_t depthFormat,
-        android_native_window_t* window)
+        ANativeWindow* window)
     : egl_surface_t(dpy, config, depthFormat), 
     nativeWindow(window), buffer(0), previousBuffer(0), module(0),
     blitengine(0), bits(NULL)
@@ -1300,7 +1300,7 @@
     if (!(surfaceType & EGL_WINDOW_BIT))
         return setError(EGL_BAD_MATCH, EGL_NO_SURFACE);
 
-    if (static_cast<android_native_window_t*>(window)->common.magic !=
+    if (static_cast<ANativeWindow*>(window)->common.magic !=
             ANDROID_NATIVE_WINDOW_MAGIC) {
         return setError(EGL_BAD_NATIVE_WINDOW, EGL_NO_SURFACE);
     }
@@ -1323,7 +1323,7 @@
 
     egl_surface_t* surface;
     surface = new egl_window_surface_v2_t(dpy, config, depthFormat,
-            static_cast<android_native_window_t*>(window));
+            static_cast<ANativeWindow*>(window));
 
     if (!surface->initCheck()) {
         // there was a problem in the ctor, the error
@@ -1525,8 +1525,13 @@
     }
 
     if (ggl_unlikely(attrib_list==0)) {
-        *num_config = 0;
-        return EGL_TRUE;
+        /*
+         * A NULL attrib_list should be treated as though it was an empty
+         * one (terminated with EGL_NONE) as defined in
+         * section 3.4.1 "Querying Configurations" in the EGL specification.
+         */
+        static const EGLint dummy = EGL_NONE;
+        attrib_list = &dummy;
     }
 
     int numAttributes = 0;
diff --git a/opengl/libagl/texture.cpp b/opengl/libagl/texture.cpp
index 9407bd5..d67612e 100644
--- a/opengl/libagl/texture.cpp
+++ b/opengl/libagl/texture.cpp
@@ -1515,7 +1515,7 @@
         ogles_error(c, GL_INVALID_VALUE);
         return;
     }
-    if (x<0 || x<0) {
+    if (x<0 || y<0) {
         ogles_error(c, GL_INVALID_VALUE);
         return;
     }
diff --git a/opengl/libs/EGL/egl.cpp b/opengl/libs/EGL/egl.cpp
index 89b3e1f..714fd3e 100644
--- a/opengl/libs/EGL/egl.cpp
+++ b/opengl/libs/EGL/egl.cpp
@@ -239,7 +239,7 @@
 
 // ----------------------------------------------------------------------------
 
-egl_connection_t gEGLImpl[IMPL_NUM_IMPLEMENTATIONS];
+static egl_connection_t gEGLImpl[IMPL_NUM_IMPLEMENTATIONS];
 static egl_display_t gDisplay[NUM_DISPLAYS];
 static pthread_mutex_t gThreadLocalStorageKeyMutex = PTHREAD_MUTEX_INITIALIZER;
 static pthread_key_t gEGLThreadLocalStorageKey = -1;
@@ -843,10 +843,12 @@
     EGLint patch_index = -1;
     GLint attr;
     size_t size = 0;
-    while ((attr=attrib_list[size]) != EGL_NONE) {
-        if (attr == EGL_CONFIG_ID)
-            patch_index = size;
-        size += 2;
+    if (attrib_list) {
+        while ((attr=attrib_list[size]) != EGL_NONE) {
+            if (attr == EGL_CONFIG_ID)
+                patch_index = size;
+            size += 2;
+        }
     }
     if (patch_index >= 0) {
         size += 2; // we need copy the sentinel as well
@@ -1043,6 +1045,10 @@
     int i=0, index=0;
     egl_connection_t* cnx = validate_display_config(dpy, config, dp, i, index);
     if (cnx) {
+        if (share_list != EGL_NO_CONTEXT) {
+            egl_context_t* const c = get_context(share_list);
+            share_list = c->context;
+        }
         EGLContext context = cnx->egl.eglCreateContext(
                 dp->disp[i].dpy, dp->disp[i].config[index],
                 share_list, attrib_list);
diff --git a/opengl/libs/GLES2/gl2_api.in b/opengl/libs/GLES2/gl2_api.in
index 9c2e69a..5164450 100644
--- a/opengl/libs/GLES2/gl2_api.in
+++ b/opengl/libs/GLES2/gl2_api.in
@@ -4,7 +4,7 @@
 void API_ENTRY(glAttachShader)(GLuint program, GLuint shader) {
     CALL_GL_API(glAttachShader, program, shader);
 }
-void API_ENTRY(glBindAttribLocation)(GLuint program, GLuint index, const char* name) {
+void API_ENTRY(glBindAttribLocation)(GLuint program, GLuint index, const GLchar* name) {
     CALL_GL_API(glBindAttribLocation, program, index, name);
 }
 void API_ENTRY(glBindBuffer)(GLenum target, GLuint buffer) {
@@ -34,10 +34,10 @@
 void API_ENTRY(glBlendFuncSeparate)(GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha) {
     CALL_GL_API(glBlendFuncSeparate, srcRGB, dstRGB, srcAlpha, dstAlpha);
 }
-void API_ENTRY(glBufferData)(GLenum target, GLsizeiptr size, const void* data, GLenum usage) {
+void API_ENTRY(glBufferData)(GLenum target, GLsizeiptr size, const GLvoid* data, GLenum usage) {
     CALL_GL_API(glBufferData, target, size, data, usage);
 }
-void API_ENTRY(glBufferSubData)(GLenum target, GLintptr offset, GLsizeiptr size, const void* data) {
+void API_ENTRY(glBufferSubData)(GLenum target, GLintptr offset, GLsizeiptr size, const GLvoid* data) {
     CALL_GL_API(glBufferSubData, target, offset, size, data);
 }
 GLenum API_ENTRY(glCheckFramebufferStatus)(GLenum target) {
@@ -61,10 +61,10 @@
 void API_ENTRY(glCompileShader)(GLuint shader) {
     CALL_GL_API(glCompileShader, shader);
 }
-void API_ENTRY(glCompressedTexImage2D)(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const void* data) {
+void API_ENTRY(glCompressedTexImage2D)(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const GLvoid* data) {
     CALL_GL_API(glCompressedTexImage2D, target, level, internalformat, width, height, border, imageSize, data);
 }
-void API_ENTRY(glCompressedTexSubImage2D)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const void* data) {
+void API_ENTRY(glCompressedTexSubImage2D)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const GLvoid* data) {
     CALL_GL_API(glCompressedTexSubImage2D, target, level, xoffset, yoffset, width, height, format, imageSize, data);
 }
 void API_ENTRY(glCopyTexImage2D)(GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border) {
@@ -121,7 +121,7 @@
 void API_ENTRY(glDrawArrays)(GLenum mode, GLint first, GLsizei count) {
     CALL_GL_API(glDrawArrays, mode, first, count);
 }
-void API_ENTRY(glDrawElements)(GLenum mode, GLsizei count, GLenum type, const void* indices) {
+void API_ENTRY(glDrawElements)(GLenum mode, GLsizei count, GLenum type, const GLvoid* indices) {
     CALL_GL_API(glDrawElements, mode, count, type, indices);
 }
 void API_ENTRY(glEnable)(GLenum cap) {
@@ -160,16 +160,16 @@
 void API_ENTRY(glGenTextures)(GLsizei n, GLuint* textures) {
     CALL_GL_API(glGenTextures, n, textures);
 }
-void API_ENTRY(glGetActiveAttrib)(GLuint program, GLuint index, GLsizei bufsize, GLsizei* length, GLint* size, GLenum* type, char* name) {
+void API_ENTRY(glGetActiveAttrib)(GLuint program, GLuint index, GLsizei bufsize, GLsizei* length, GLint* size, GLenum* type, GLchar* name) {
     CALL_GL_API(glGetActiveAttrib, program, index, bufsize, length, size, type, name);
 }
-void API_ENTRY(glGetActiveUniform)(GLuint program, GLuint index, GLsizei bufsize, GLsizei* length, GLint* size, GLenum* type, char* name) {
+void API_ENTRY(glGetActiveUniform)(GLuint program, GLuint index, GLsizei bufsize, GLsizei* length, GLint* size, GLenum* type, GLchar* name) {
     CALL_GL_API(glGetActiveUniform, program, index, bufsize, length, size, type, name);
 }
 void API_ENTRY(glGetAttachedShaders)(GLuint program, GLsizei maxcount, GLsizei* count, GLuint* shaders) {
     CALL_GL_API(glGetAttachedShaders, program, maxcount, count, shaders);
 }
-int API_ENTRY(glGetAttribLocation)(GLuint program, const char* name) {
+int API_ENTRY(glGetAttribLocation)(GLuint program, const GLchar* name) {
     CALL_GL_API_RETURN(glGetAttribLocation, program, name);
 }
 void API_ENTRY(glGetBooleanv)(GLenum pname, GLboolean* params) {
@@ -193,7 +193,7 @@
 void API_ENTRY(glGetProgramiv)(GLuint program, GLenum pname, GLint* params) {
     CALL_GL_API(glGetProgramiv, program, pname, params);
 }
-void API_ENTRY(glGetProgramInfoLog)(GLuint program, GLsizei bufsize, GLsizei* length, char* infolog) {
+void API_ENTRY(glGetProgramInfoLog)(GLuint program, GLsizei bufsize, GLsizei* length, GLchar* infolog) {
     CALL_GL_API(glGetProgramInfoLog, program, bufsize, length, infolog);
 }
 void API_ENTRY(glGetRenderbufferParameteriv)(GLenum target, GLenum pname, GLint* params) {
@@ -202,13 +202,13 @@
 void API_ENTRY(glGetShaderiv)(GLuint shader, GLenum pname, GLint* params) {
     CALL_GL_API(glGetShaderiv, shader, pname, params);
 }
-void API_ENTRY(glGetShaderInfoLog)(GLuint shader, GLsizei bufsize, GLsizei* length, char* infolog) {
+void API_ENTRY(glGetShaderInfoLog)(GLuint shader, GLsizei bufsize, GLsizei* length, GLchar* infolog) {
     CALL_GL_API(glGetShaderInfoLog, shader, bufsize, length, infolog);
 }
 void API_ENTRY(glGetShaderPrecisionFormat)(GLenum shadertype, GLenum precisiontype, GLint* range, GLint* precision) {
     CALL_GL_API(glGetShaderPrecisionFormat, shadertype, precisiontype, range, precision);
 }
-void API_ENTRY(glGetShaderSource)(GLuint shader, GLsizei bufsize, GLsizei* length, char* source) {
+void API_ENTRY(glGetShaderSource)(GLuint shader, GLsizei bufsize, GLsizei* length, GLchar* source) {
     CALL_GL_API(glGetShaderSource, shader, bufsize, length, source);
 }
 const GLubyte* API_ENTRY(glGetString)(GLenum name) {
@@ -226,7 +226,7 @@
 void API_ENTRY(glGetUniformiv)(GLuint program, GLint location, GLint* params) {
     CALL_GL_API(glGetUniformiv, program, location, params);
 }
-int API_ENTRY(glGetUniformLocation)(GLuint program, const char* name) {
+int API_ENTRY(glGetUniformLocation)(GLuint program, const GLchar* name) {
     CALL_GL_API_RETURN(glGetUniformLocation, program, name);
 }
 void API_ENTRY(glGetVertexAttribfv)(GLuint index, GLenum pname, GLfloat* params) {
@@ -235,7 +235,7 @@
 void API_ENTRY(glGetVertexAttribiv)(GLuint index, GLenum pname, GLint* params) {
     CALL_GL_API(glGetVertexAttribiv, index, pname, params);
 }
-void API_ENTRY(glGetVertexAttribPointerv)(GLuint index, GLenum pname, void** pointer) {
+void API_ENTRY(glGetVertexAttribPointerv)(GLuint index, GLenum pname, GLvoid** pointer) {
     CALL_GL_API(glGetVertexAttribPointerv, index, pname, pointer);
 }
 void API_ENTRY(glHint)(GLenum target, GLenum mode) {
@@ -274,7 +274,7 @@
 void API_ENTRY(glPolygonOffset)(GLfloat factor, GLfloat units) {
     CALL_GL_API(glPolygonOffset, factor, units);
 }
-void API_ENTRY(glReadPixels)(GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, void* pixels) {
+void API_ENTRY(glReadPixels)(GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLvoid* pixels) {
     CALL_GL_API(glReadPixels, x, y, width, height, format, type, pixels);
 }
 void API_ENTRY(glReleaseShaderCompiler)(void) {
@@ -289,10 +289,10 @@
 void API_ENTRY(glScissor)(GLint x, GLint y, GLsizei width, GLsizei height) {
     CALL_GL_API(glScissor, x, y, width, height);
 }
-void API_ENTRY(glShaderBinary)(GLsizei n, const GLuint* shaders, GLenum binaryformat, const void* binary, GLsizei length) {
+void API_ENTRY(glShaderBinary)(GLsizei n, const GLuint* shaders, GLenum binaryformat, const GLvoid* binary, GLsizei length) {
     CALL_GL_API(glShaderBinary, n, shaders, binaryformat, binary, length);
 }
-void API_ENTRY(glShaderSource)(GLuint shader, GLsizei count, const char** string, const GLint* length) {
+void API_ENTRY(glShaderSource)(GLuint shader, GLsizei count, const GLchar** string, const GLint* length) {
     CALL_GL_API(glShaderSource, shader, count, string, length);
 }
 void API_ENTRY(glStencilFunc)(GLenum func, GLint ref, GLuint mask) {
@@ -313,7 +313,7 @@
 void API_ENTRY(glStencilOpSeparate)(GLenum face, GLenum fail, GLenum zfail, GLenum zpass) {
     CALL_GL_API(glStencilOpSeparate, face, fail, zfail, zpass);
 }
-void API_ENTRY(glTexImage2D)(GLenum target, GLint level, GLint internalformat,  GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const GLvoid* pixels) {
+void API_ENTRY(glTexImage2D)(GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const GLvoid* pixels) {
     CALL_GL_API(glTexImage2D, target, level, internalformat, width, height, border, format, type, pixels);
 }
 void API_ENTRY(glTexParameterf)(GLenum target, GLenum pname, GLfloat param) {
@@ -328,7 +328,7 @@
 void API_ENTRY(glTexParameteriv)(GLenum target, GLenum pname, const GLint* params) {
     CALL_GL_API(glTexParameteriv, target, pname, params);
 }
-void API_ENTRY(glTexSubImage2D)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const void* pixels) {
+void API_ENTRY(glTexSubImage2D)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid* pixels) {
     CALL_GL_API(glTexSubImage2D, target, level, xoffset, yoffset, width, height, format, type, pixels);
 }
 void API_ENTRY(glUniform1f)(GLint location, GLfloat x) {
@@ -418,7 +418,7 @@
 void API_ENTRY(glVertexAttrib4fv)(GLuint indx, const GLfloat* values) {
     CALL_GL_API(glVertexAttrib4fv, indx, values);
 }
-void API_ENTRY(glVertexAttribPointer)(GLuint indx, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const void* ptr) {
+void API_ENTRY(glVertexAttribPointer)(GLuint indx, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const GLvoid* ptr) {
     CALL_GL_API(glVertexAttribPointer, indx, size, type, normalized, stride, ptr);
 }
 void API_ENTRY(glViewport)(GLint x, GLint y, GLsizei width, GLsizei height) {
diff --git a/opengl/libs/GLES2/gl2ext_api.in b/opengl/libs/GLES2/gl2ext_api.in
index 6eeecb3..e965625 100644
--- a/opengl/libs/GLES2/gl2ext_api.in
+++ b/opengl/libs/GLES2/gl2ext_api.in
@@ -4,10 +4,10 @@
 void API_ENTRY(__glEGLImageTargetRenderbufferStorageOES)(GLenum target, GLeglImageOES image) {
     CALL_GL_API(glEGLImageTargetRenderbufferStorageOES, target, image);
 }
-void API_ENTRY(glGetProgramBinaryOES)(GLuint program, GLsizei bufSize, GLsizei *length, GLenum *binaryFormat, void *binary) {
+void API_ENTRY(glGetProgramBinaryOES)(GLuint program, GLsizei bufSize, GLsizei *length, GLenum *binaryFormat, GLvoid *binary) {
     CALL_GL_API(glGetProgramBinaryOES, program, bufSize, length, binaryFormat, binary);
 }
-void API_ENTRY(glProgramBinaryOES)(GLuint program, GLenum binaryFormat, const void *binary, GLint length) {
+void API_ENTRY(glProgramBinaryOES)(GLuint program, GLenum binaryFormat, const GLvoid *binary, GLint length) {
     CALL_GL_API(glProgramBinaryOES, program, binaryFormat, binary, length);
 }
 void* API_ENTRY(glMapBufferOES)(GLenum target, GLenum access) {
@@ -16,40 +16,52 @@
 GLboolean API_ENTRY(glUnmapBufferOES)(GLenum target) {
     CALL_GL_API_RETURN(glUnmapBufferOES, target);
 }
-void API_ENTRY(glGetBufferPointervOES)(GLenum target, GLenum pname, void** params) {
+void API_ENTRY(glGetBufferPointervOES)(GLenum target, GLenum pname, GLvoid** params) {
     CALL_GL_API(glGetBufferPointervOES, target, pname, params);
 }
-void API_ENTRY(glTexImage3DOES)(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const void* pixels) {
+void API_ENTRY(glTexImage3DOES)(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const GLvoid* pixels) {
     CALL_GL_API(glTexImage3DOES, target, level, internalformat, width, height, depth, border, format, type, pixels);
 }
-void API_ENTRY(glTexSubImage3DOES)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const void* pixels) {
+void API_ENTRY(glTexSubImage3DOES)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const GLvoid* pixels) {
     CALL_GL_API(glTexSubImage3DOES, target, level, xoffset, yoffset, zoffset, width, height, depth, format, type, pixels);
 }
 void API_ENTRY(glCopyTexSubImage3DOES)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height) {
     CALL_GL_API(glCopyTexSubImage3DOES, target, level, xoffset, yoffset, zoffset, x, y, width, height);
 }
-void API_ENTRY(glCompressedTexImage3DOES)(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const void* data) {
+void API_ENTRY(glCompressedTexImage3DOES)(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const GLvoid* data) {
     CALL_GL_API(glCompressedTexImage3DOES, target, level, internalformat, width, height, depth, border, imageSize, data);
 }
-void API_ENTRY(glCompressedTexSubImage3DOES)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const void* data) {
+void API_ENTRY(glCompressedTexSubImage3DOES)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const GLvoid* data) {
     CALL_GL_API(glCompressedTexSubImage3DOES, target, level, xoffset, yoffset, zoffset, width, height, depth, format, imageSize, data);
 }
 void API_ENTRY(glFramebufferTexture3DOES)(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLint zoffset) {
     CALL_GL_API(glFramebufferTexture3DOES, target, attachment, textarget, texture, level, zoffset);
 }
+void API_ENTRY(glBindVertexArrayOES)(GLuint array) {
+    CALL_GL_API(glBindVertexArrayOES, array);
+}
+void API_ENTRY(glDeleteVertexArraysOES)(GLsizei n, const GLuint *arrays) {
+    CALL_GL_API(glDeleteVertexArraysOES, n, arrays);
+}
+void API_ENTRY(glGenVertexArraysOES)(GLsizei n, GLuint *arrays) {
+    CALL_GL_API(glGenVertexArraysOES, n, arrays);
+}
+GLboolean API_ENTRY(glIsVertexArrayOES)(GLuint array) {
+    CALL_GL_API_RETURN(glIsVertexArrayOES, array);
+}
 void API_ENTRY(glGetPerfMonitorGroupsAMD)(GLint *numGroups, GLsizei groupsSize, GLuint *groups) {
     CALL_GL_API(glGetPerfMonitorGroupsAMD, numGroups, groupsSize, groups);
 }
 void API_ENTRY(glGetPerfMonitorCountersAMD)(GLuint group, GLint *numCounters, GLint *maxActiveCounters, GLsizei counterSize, GLuint *counters) {
     CALL_GL_API(glGetPerfMonitorCountersAMD, group, numCounters, maxActiveCounters, counterSize, counters);
 }
-void API_ENTRY(glGetPerfMonitorGroupStringAMD)(GLuint group, GLsizei bufSize, GLsizei *length, char *groupString) {
+void API_ENTRY(glGetPerfMonitorGroupStringAMD)(GLuint group, GLsizei bufSize, GLsizei *length, GLchar *groupString) {
     CALL_GL_API(glGetPerfMonitorGroupStringAMD, group, bufSize, length, groupString);
 }
-void API_ENTRY(glGetPerfMonitorCounterStringAMD)(GLuint group, GLuint counter, GLsizei bufSize, GLsizei *length, char *counterString) {
+void API_ENTRY(glGetPerfMonitorCounterStringAMD)(GLuint group, GLuint counter, GLsizei bufSize, GLsizei *length, GLchar *counterString) {
     CALL_GL_API(glGetPerfMonitorCounterStringAMD, group, counter, bufSize, length, counterString);
 }
-void API_ENTRY(glGetPerfMonitorCounterInfoAMD)(GLuint group, GLuint counter, GLenum pname, void *data) {
+void API_ENTRY(glGetPerfMonitorCounterInfoAMD)(GLuint group, GLuint counter, GLenum pname, GLvoid *data) {
     CALL_GL_API(glGetPerfMonitorCounterInfoAMD, group, counter, pname, data);
 }
 void API_ENTRY(glGenPerfMonitorsAMD)(GLsizei n, GLuint *monitors) {
@@ -70,6 +82,21 @@
 void API_ENTRY(glGetPerfMonitorCounterDataAMD)(GLuint monitor, GLenum pname, GLsizei dataSize, GLuint *data, GLint *bytesWritten) {
     CALL_GL_API(glGetPerfMonitorCounterDataAMD, monitor, pname, dataSize, data, bytesWritten);
 }
+void API_ENTRY(glDiscardFramebufferEXT)(GLenum target, GLsizei numAttachments, const GLenum *attachments) {
+    CALL_GL_API(glDiscardFramebufferEXT, target, numAttachments, attachments);
+}
+void API_ENTRY(glMultiDrawArraysEXT)(GLenum mode, GLint *first, GLsizei *count, GLsizei primcount) {
+    CALL_GL_API(glMultiDrawArraysEXT, mode, first, count, primcount);
+}
+void API_ENTRY(glMultiDrawElementsEXT)(GLenum mode, const GLsizei *count, GLenum type, const GLvoid* *indices, GLsizei primcount) {
+    CALL_GL_API(glMultiDrawElementsEXT, mode, count, type, indices, primcount);
+}
+void API_ENTRY(glRenderbufferStorageMultisampleIMG)(GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height) {
+    CALL_GL_API(glRenderbufferStorageMultisampleIMG, target, samples, internalformat, width, height);
+}
+void API_ENTRY(glFramebufferTexture2DMultisampleIMG)(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLsizei samples) {
+    CALL_GL_API(glFramebufferTexture2DMultisampleIMG, target, attachment, textarget, texture, level, samples);
+}
 void API_ENTRY(glDeleteFencesNV)(GLsizei n, const GLuint *fences) {
     CALL_GL_API(glDeleteFencesNV, n, fences);
 }
@@ -91,10 +118,16 @@
 void API_ENTRY(glSetFenceNV)(GLuint fence, GLenum condition) {
     CALL_GL_API(glSetFenceNV, fence, condition);
 }
+void API_ENTRY(glCoverageMaskNV)(GLboolean mask) {
+    CALL_GL_API(glCoverageMaskNV, mask);
+}
+void API_ENTRY(glCoverageOperationNV)(GLenum operation) {
+    CALL_GL_API(glCoverageOperationNV, operation);
+}
 void API_ENTRY(glGetDriverControlsQCOM)(GLint *num, GLsizei size, GLuint *driverControls) {
     CALL_GL_API(glGetDriverControlsQCOM, num, size, driverControls);
 }
-void API_ENTRY(glGetDriverControlStringQCOM)(GLuint driverControl, GLsizei bufSize, GLsizei *length, char *driverControlString) {
+void API_ENTRY(glGetDriverControlStringQCOM)(GLuint driverControl, GLsizei bufSize, GLsizei *length, GLchar *driverControlString) {
     CALL_GL_API(glGetDriverControlStringQCOM, driverControl, bufSize, length, driverControlString);
 }
 void API_ENTRY(glEnableDriverControlQCOM)(GLuint driverControl) {
@@ -103,3 +136,45 @@
 void API_ENTRY(glDisableDriverControlQCOM)(GLuint driverControl) {
     CALL_GL_API(glDisableDriverControlQCOM, driverControl);
 }
+void API_ENTRY(glExtGetTexturesQCOM)(GLuint *textures, GLint maxTextures, GLint *numTextures) {
+    CALL_GL_API(glExtGetTexturesQCOM, textures, maxTextures, numTextures);
+}
+void API_ENTRY(glExtGetBuffersQCOM)(GLuint *buffers, GLint maxBuffers, GLint *numBuffers) {
+    CALL_GL_API(glExtGetBuffersQCOM, buffers, maxBuffers, numBuffers);
+}
+void API_ENTRY(glExtGetRenderbuffersQCOM)(GLuint *renderbuffers, GLint maxRenderbuffers, GLint *numRenderbuffers) {
+    CALL_GL_API(glExtGetRenderbuffersQCOM, renderbuffers, maxRenderbuffers, numRenderbuffers);
+}
+void API_ENTRY(glExtGetFramebuffersQCOM)(GLuint *framebuffers, GLint maxFramebuffers, GLint *numFramebuffers) {
+    CALL_GL_API(glExtGetFramebuffersQCOM, framebuffers, maxFramebuffers, numFramebuffers);
+}
+void API_ENTRY(glExtGetTexLevelParameterivQCOM)(GLuint texture, GLenum face, GLint level, GLenum pname, GLint *params) {
+    CALL_GL_API(glExtGetTexLevelParameterivQCOM, texture, face, level, pname, params);
+}
+void API_ENTRY(glExtTexObjectStateOverrideiQCOM)(GLenum target, GLenum pname, GLint param) {
+    CALL_GL_API(glExtTexObjectStateOverrideiQCOM, target, pname, param);
+}
+void API_ENTRY(glExtGetTexSubImageQCOM)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, GLvoid *texels) {
+    CALL_GL_API(glExtGetTexSubImageQCOM, target, level, xoffset, yoffset, zoffset, width, height, depth, format, type, texels);
+}
+void API_ENTRY(glExtGetBufferPointervQCOM)(GLenum target, GLvoid **params) {
+    CALL_GL_API(glExtGetBufferPointervQCOM, target, params);
+}
+void API_ENTRY(glExtGetShadersQCOM)(GLuint *shaders, GLint maxShaders, GLint *numShaders) {
+    CALL_GL_API(glExtGetShadersQCOM, shaders, maxShaders, numShaders);
+}
+void API_ENTRY(glExtGetProgramsQCOM)(GLuint *programs, GLint maxPrograms, GLint *numPrograms) {
+    CALL_GL_API(glExtGetProgramsQCOM, programs, maxPrograms, numPrograms);
+}
+GLboolean API_ENTRY(glExtIsProgramBinaryQCOM)(GLuint program) {
+    CALL_GL_API_RETURN(glExtIsProgramBinaryQCOM, program);
+}
+void API_ENTRY(glExtGetProgramBinarySourceQCOM)(GLuint program, GLenum shadertype, GLchar *source, GLint *length) {
+    CALL_GL_API(glExtGetProgramBinarySourceQCOM, program, shadertype, source, length);
+}
+void API_ENTRY(glStartTilingQCOM)(GLuint x, GLuint y, GLuint width, GLuint height, GLbitfield preserveMask) {
+    CALL_GL_API(glStartTilingQCOM, x, y, width, height, preserveMask);
+}
+void API_ENTRY(glEndTilingQCOM)(GLbitfield preserveMask) {
+    CALL_GL_API(glEndTilingQCOM, preserveMask);
+}
diff --git a/opengl/libs/GLES_CM/gl_api.in b/opengl/libs/GLES_CM/gl_api.in
index 5437d47..7f20c4f 100644
--- a/opengl/libs/GLES_CM/gl_api.in
+++ b/opengl/libs/GLES_CM/gl_api.in
@@ -259,7 +259,7 @@
 void API_ENTRY(glGetMaterialxv)(GLenum face, GLenum pname, GLfixed *params) {
     CALL_GL_API(glGetMaterialxv, face, pname, params);
 }
-void API_ENTRY(glGetPointerv)(GLenum pname, void **params) {
+void API_ENTRY(glGetPointerv)(GLenum pname, GLvoid **params) {
     CALL_GL_API(glGetPointerv, pname, params);
 }
 const GLubyte * API_ENTRY(glGetString)(GLenum name) {
diff --git a/opengl/libs/GLES_CM/glext_api.in b/opengl/libs/GLES_CM/glext_api.in
index 2c8648e..5393fa6 100644
--- a/opengl/libs/GLES_CM/glext_api.in
+++ b/opengl/libs/GLES_CM/glext_api.in
@@ -205,7 +205,7 @@
 GLboolean API_ENTRY(glUnmapBufferOES)(GLenum target) {
     CALL_GL_API_RETURN(glUnmapBufferOES, target);
 }
-void API_ENTRY(glGetBufferPointervOES)(GLenum target, GLenum pname, void** params) {
+void API_ENTRY(glGetBufferPointervOES)(GLenum target, GLenum pname, GLvoid ** params) {
     CALL_GL_API(glGetBufferPointervOES, target, pname, params);
 }
 void API_ENTRY(glCurrentPaletteMatrixOES)(GLuint matrixpaletteindex) {
@@ -268,3 +268,111 @@
 void API_ENTRY(glGetTexGenxvOES)(GLenum coord, GLenum pname, GLfixed *params) {
     CALL_GL_API(glGetTexGenxvOES, coord, pname, params);
 }
+void API_ENTRY(glBindVertexArrayOES)(GLuint array) {
+    CALL_GL_API(glBindVertexArrayOES, array);
+}
+void API_ENTRY(glDeleteVertexArraysOES)(GLsizei n, const GLuint *arrays) {
+    CALL_GL_API(glDeleteVertexArraysOES, n, arrays);
+}
+void API_ENTRY(glGenVertexArraysOES)(GLsizei n, GLuint *arrays) {
+    CALL_GL_API(glGenVertexArraysOES, n, arrays);
+}
+GLboolean API_ENTRY(glIsVertexArrayOES)(GLuint array) {
+    CALL_GL_API_RETURN(glIsVertexArrayOES, array);
+}
+void API_ENTRY(glDiscardFramebufferEXT)(GLenum target, GLsizei numAttachments, const GLenum *attachments) {
+    CALL_GL_API(glDiscardFramebufferEXT, target, numAttachments, attachments);
+}
+void API_ENTRY(glMultiDrawArraysEXT)(GLenum mode, GLint *first, GLsizei *count, GLsizei primcount) {
+    CALL_GL_API(glMultiDrawArraysEXT, mode, first, count, primcount);
+}
+void API_ENTRY(glMultiDrawElementsEXT)(GLenum mode, const GLsizei *count, GLenum type, const GLvoid* *indices, GLsizei primcount) {
+    CALL_GL_API(glMultiDrawElementsEXT, mode, count, type, indices, primcount);
+}
+void API_ENTRY(glClipPlanefIMG)(GLenum p, const GLfloat *eqn) {
+    CALL_GL_API(glClipPlanefIMG, p, eqn);
+}
+void API_ENTRY(glClipPlanexIMG)(GLenum p, const GLfixed *eqn) {
+    CALL_GL_API(glClipPlanexIMG, p, eqn);
+}
+void API_ENTRY(glRenderbufferStorageMultisampleIMG)(GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height) {
+    CALL_GL_API(glRenderbufferStorageMultisampleIMG, target, samples, internalformat, width, height);
+}
+void API_ENTRY(glFramebufferTexture2DMultisampleIMG)(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLsizei samples) {
+    CALL_GL_API(glFramebufferTexture2DMultisampleIMG, target, attachment, textarget, texture, level, samples);
+}
+void API_ENTRY(glDeleteFencesNV)(GLsizei n, const GLuint *fences) {
+    CALL_GL_API(glDeleteFencesNV, n, fences);
+}
+void API_ENTRY(glGenFencesNV)(GLsizei n, GLuint *fences) {
+    CALL_GL_API(glGenFencesNV, n, fences);
+}
+GLboolean API_ENTRY(glIsFenceNV)(GLuint fence) {
+    CALL_GL_API_RETURN(glIsFenceNV, fence);
+}
+GLboolean API_ENTRY(glTestFenceNV)(GLuint fence) {
+    CALL_GL_API_RETURN(glTestFenceNV, fence);
+}
+void API_ENTRY(glGetFenceivNV)(GLuint fence, GLenum pname, GLint *params) {
+    CALL_GL_API(glGetFenceivNV, fence, pname, params);
+}
+void API_ENTRY(glFinishFenceNV)(GLuint fence) {
+    CALL_GL_API(glFinishFenceNV, fence);
+}
+void API_ENTRY(glSetFenceNV)(GLuint fence, GLenum condition) {
+    CALL_GL_API(glSetFenceNV, fence, condition);
+}
+void API_ENTRY(glGetDriverControlsQCOM)(GLint *num, GLsizei size, GLuint *driverControls) {
+    CALL_GL_API(glGetDriverControlsQCOM, num, size, driverControls);
+}
+void API_ENTRY(glGetDriverControlStringQCOM)(GLuint driverControl, GLsizei bufSize, GLsizei *length, GLchar *driverControlString) {
+    CALL_GL_API(glGetDriverControlStringQCOM, driverControl, bufSize, length, driverControlString);
+}
+void API_ENTRY(glEnableDriverControlQCOM)(GLuint driverControl) {
+    CALL_GL_API(glEnableDriverControlQCOM, driverControl);
+}
+void API_ENTRY(glDisableDriverControlQCOM)(GLuint driverControl) {
+    CALL_GL_API(glDisableDriverControlQCOM, driverControl);
+}
+void API_ENTRY(glExtGetTexturesQCOM)(GLuint *textures, GLint maxTextures, GLint *numTextures) {
+    CALL_GL_API(glExtGetTexturesQCOM, textures, maxTextures, numTextures);
+}
+void API_ENTRY(glExtGetBuffersQCOM)(GLuint *buffers, GLint maxBuffers, GLint *numBuffers) {
+    CALL_GL_API(glExtGetBuffersQCOM, buffers, maxBuffers, numBuffers);
+}
+void API_ENTRY(glExtGetRenderbuffersQCOM)(GLuint *renderbuffers, GLint maxRenderbuffers, GLint *numRenderbuffers) {
+    CALL_GL_API(glExtGetRenderbuffersQCOM, renderbuffers, maxRenderbuffers, numRenderbuffers);
+}
+void API_ENTRY(glExtGetFramebuffersQCOM)(GLuint *framebuffers, GLint maxFramebuffers, GLint *numFramebuffers) {
+    CALL_GL_API(glExtGetFramebuffersQCOM, framebuffers, maxFramebuffers, numFramebuffers);
+}
+void API_ENTRY(glExtGetTexLevelParameterivQCOM)(GLuint texture, GLenum face, GLint level, GLenum pname, GLint *params) {
+    CALL_GL_API(glExtGetTexLevelParameterivQCOM, texture, face, level, pname, params);
+}
+void API_ENTRY(glExtTexObjectStateOverrideiQCOM)(GLenum target, GLenum pname, GLint param) {
+    CALL_GL_API(glExtTexObjectStateOverrideiQCOM, target, pname, param);
+}
+void API_ENTRY(glExtGetTexSubImageQCOM)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, GLvoid *texels) {
+    CALL_GL_API(glExtGetTexSubImageQCOM, target, level, xoffset, yoffset, zoffset, width, height, depth, format, type, texels);
+}
+void API_ENTRY(glExtGetBufferPointervQCOM)(GLenum target, GLvoid **params) {
+    CALL_GL_API(glExtGetBufferPointervQCOM, target, params);
+}
+void API_ENTRY(glExtGetShadersQCOM)(GLuint *shaders, GLint maxShaders, GLint *numShaders) {
+    CALL_GL_API(glExtGetShadersQCOM, shaders, maxShaders, numShaders);
+}
+void API_ENTRY(glExtGetProgramsQCOM)(GLuint *programs, GLint maxPrograms, GLint *numPrograms) {
+    CALL_GL_API(glExtGetProgramsQCOM, programs, maxPrograms, numPrograms);
+}
+GLboolean API_ENTRY(glExtIsProgramBinaryQCOM)(GLuint program) {
+    CALL_GL_API_RETURN(glExtIsProgramBinaryQCOM, program);
+}
+void API_ENTRY(glExtGetProgramBinarySourceQCOM)(GLuint program, GLenum shadertype, GLchar *source, GLint *length) {
+    CALL_GL_API(glExtGetProgramBinarySourceQCOM, program, shadertype, source, length);
+}
+void API_ENTRY(glStartTilingQCOM)(GLuint x, GLuint y, GLuint width, GLuint height, GLbitfield preserveMask) {
+    CALL_GL_API(glStartTilingQCOM, x, y, width, height, preserveMask);
+}
+void API_ENTRY(glEndTilingQCOM)(GLbitfield preserveMask) {
+    CALL_GL_API(glEndTilingQCOM, preserveMask);
+}
diff --git a/opengl/libs/egl_impl.h b/opengl/libs/egl_impl.h
index 1fba209f7..c8f529a 100644
--- a/opengl/libs/egl_impl.h
+++ b/opengl/libs/egl_impl.h
@@ -31,6 +31,7 @@
 
 struct egl_connection_t
 {
+    inline egl_connection_t() : dso(0) { }
     void *              dso;
     gl_hooks_t *        hooks[2];
     EGLint              major;
diff --git a/opengl/libs/entries.in b/opengl/libs/entries.in
index bbe3e23..61acb5f 100644
--- a/opengl/libs/entries.in
+++ b/opengl/libs/entries.in
@@ -4,13 +4,14 @@
 GL_ENTRY(void, glAlphaFuncxOES, GLenum func, GLclampx ref)
 GL_ENTRY(void, glAttachShader, GLuint program, GLuint shader)
 GL_ENTRY(void, glBeginPerfMonitorAMD, GLuint monitor)
-GL_ENTRY(void, glBindAttribLocation, GLuint program, GLuint index, const char* name)
+GL_ENTRY(void, glBindAttribLocation, GLuint program, GLuint index, const GLchar* name)
 GL_ENTRY(void, glBindBuffer, GLenum target, GLuint buffer)
 GL_ENTRY(void, glBindFramebuffer, GLenum target, GLuint framebuffer)
 GL_ENTRY(void, glBindFramebufferOES, GLenum target, GLuint framebuffer)
 GL_ENTRY(void, glBindRenderbuffer, GLenum target, GLuint renderbuffer)
 GL_ENTRY(void, glBindRenderbufferOES, GLenum target, GLuint renderbuffer)
 GL_ENTRY(void, glBindTexture, GLenum target, GLuint texture)
+GL_ENTRY(void, glBindVertexArrayOES, GLuint array)
 GL_ENTRY(void, glBlendColor, GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha)
 GL_ENTRY(void, glBlendEquation,  GLenum mode )
 GL_ENTRY(void, glBlendEquationOES, GLenum mode)
@@ -34,8 +35,10 @@
 GL_ENTRY(void, glClearStencil, GLint s)
 GL_ENTRY(void, glClientActiveTexture, GLenum texture)
 GL_ENTRY(void, glClipPlanef, GLenum plane, const GLfloat *equation)
+GL_ENTRY(void, glClipPlanefIMG, GLenum p, const GLfloat *eqn)
 GL_ENTRY(void, glClipPlanefOES, GLenum plane, const GLfloat *equation)
 GL_ENTRY(void, glClipPlanex, GLenum plane, const GLfixed *equation)
+GL_ENTRY(void, glClipPlanexIMG, GLenum p, const GLfixed *eqn)
 GL_ENTRY(void, glClipPlanexOES, GLenum plane, const GLfixed *equation)
 GL_ENTRY(void, glColor4f, GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha)
 GL_ENTRY(void, glColor4ub, GLubyte red, GLubyte green, GLubyte blue, GLubyte alpha)
@@ -45,12 +48,14 @@
 GL_ENTRY(void, glColorPointer, GLint size, GLenum type, GLsizei stride, const GLvoid *pointer)
 GL_ENTRY(void, glCompileShader, GLuint shader)
 GL_ENTRY(void, glCompressedTexImage2D, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const GLvoid *data)
-GL_ENTRY(void, glCompressedTexImage3DOES, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const void* data)
+GL_ENTRY(void, glCompressedTexImage3DOES, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const GLvoid* data)
 GL_ENTRY(void, glCompressedTexSubImage2D, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const GLvoid *data)
-GL_ENTRY(void, glCompressedTexSubImage3DOES, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const void* data)
+GL_ENTRY(void, glCompressedTexSubImage3DOES, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const GLvoid* data)
 GL_ENTRY(void, glCopyTexImage2D, GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border)
 GL_ENTRY(void, glCopyTexSubImage2D, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height)
 GL_ENTRY(void, glCopyTexSubImage3DOES, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height)
+GL_ENTRY(void, glCoverageMaskNV, GLboolean mask)
+GL_ENTRY(void, glCoverageOperationNV, GLenum operation)
 GL_ENTRY(GLuint, glCreateProgram, void)
 GL_ENTRY(GLuint, glCreateShader, GLenum type)
 GL_ENTRY(void, glCullFace, GLenum mode)
@@ -65,6 +70,7 @@
 GL_ENTRY(void, glDeleteRenderbuffersOES, GLsizei n, const GLuint* renderbuffers)
 GL_ENTRY(void, glDeleteShader, GLuint shader)
 GL_ENTRY(void, glDeleteTextures, GLsizei n, const GLuint *textures)
+GL_ENTRY(void, glDeleteVertexArraysOES, GLsizei n, const GLuint *arrays)
 GL_ENTRY(void, glDepthFunc, GLenum func)
 GL_ENTRY(void, glDepthMask, GLboolean flag)
 GL_ENTRY(void, glDepthRangef, GLclampf zNear, GLclampf zFar)
@@ -76,6 +82,7 @@
 GL_ENTRY(void, glDisableClientState, GLenum array)
 GL_ENTRY(void, glDisableDriverControlQCOM, GLuint driverControl)
 GL_ENTRY(void, glDisableVertexAttribArray, GLuint index)
+GL_ENTRY(void, glDiscardFramebufferEXT, GLenum target, GLsizei numAttachments, const GLenum *attachments)
 GL_ENTRY(void, glDrawArrays, GLenum mode, GLint first, GLsizei count)
 GL_ENTRY(void, glDrawElements, GLenum mode, GLsizei count, GLenum type, const GLvoid *indices)
 GL_ENTRY(void, glDrawTexfOES, GLfloat x, GLfloat y, GLfloat z, GLfloat width, GLfloat height)
@@ -93,6 +100,19 @@
 GL_ENTRY(void, glEnableDriverControlQCOM, GLuint driverControl)
 GL_ENTRY(void, glEnableVertexAttribArray, GLuint index)
 GL_ENTRY(void, glEndPerfMonitorAMD, GLuint monitor)
+GL_ENTRY(void, glEndTilingQCOM, GLbitfield preserveMask)
+GL_ENTRY(void, glExtGetBufferPointervQCOM, GLenum target, GLvoid **params)
+GL_ENTRY(void, glExtGetBuffersQCOM, GLuint *buffers, GLint maxBuffers, GLint *numBuffers)
+GL_ENTRY(void, glExtGetFramebuffersQCOM, GLuint *framebuffers, GLint maxFramebuffers, GLint *numFramebuffers)
+GL_ENTRY(void, glExtGetProgramBinarySourceQCOM, GLuint program, GLenum shadertype, GLchar *source, GLint *length)
+GL_ENTRY(void, glExtGetProgramsQCOM, GLuint *programs, GLint maxPrograms, GLint *numPrograms)
+GL_ENTRY(void, glExtGetRenderbuffersQCOM, GLuint *renderbuffers, GLint maxRenderbuffers, GLint *numRenderbuffers)
+GL_ENTRY(void, glExtGetShadersQCOM, GLuint *shaders, GLint maxShaders, GLint *numShaders)
+GL_ENTRY(void, glExtGetTexLevelParameterivQCOM, GLuint texture, GLenum face, GLint level, GLenum pname, GLint *params)
+GL_ENTRY(void, glExtGetTexSubImageQCOM, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, GLvoid *texels)
+GL_ENTRY(void, glExtGetTexturesQCOM, GLuint *textures, GLint maxTextures, GLint *numTextures)
+GL_ENTRY(GLboolean, glExtIsProgramBinaryQCOM, GLuint program)
+GL_ENTRY(void, glExtTexObjectStateOverrideiQCOM, GLenum target, GLenum pname, GLint param)
 GL_ENTRY(void, glFinish, void)
 GL_ENTRY(void, glFinishFenceNV, GLuint fence)
 GL_ENTRY(void, glFlush, void)
@@ -105,6 +125,7 @@
 GL_ENTRY(void, glFramebufferRenderbuffer, GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer)
 GL_ENTRY(void, glFramebufferRenderbufferOES, GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer)
 GL_ENTRY(void, glFramebufferTexture2D, GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level)
+GL_ENTRY(void, glFramebufferTexture2DMultisampleIMG, GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLsizei samples)
 GL_ENTRY(void, glFramebufferTexture2DOES, GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level)
 GL_ENTRY(void, glFramebufferTexture3DOES, GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLint zoffset)
 GL_ENTRY(void, glFrontFace, GLenum mode)
@@ -120,20 +141,21 @@
 GL_ENTRY(void, glGenRenderbuffers, GLsizei n, GLuint* renderbuffers)
 GL_ENTRY(void, glGenRenderbuffersOES, GLsizei n, GLuint* renderbuffers)
 GL_ENTRY(void, glGenTextures, GLsizei n, GLuint *textures)
+GL_ENTRY(void, glGenVertexArraysOES, GLsizei n, GLuint *arrays)
 GL_ENTRY(void, glGenerateMipmap, GLenum target)
 GL_ENTRY(void, glGenerateMipmapOES, GLenum target)
-GL_ENTRY(void, glGetActiveAttrib, GLuint program, GLuint index, GLsizei bufsize, GLsizei* length, GLint* size, GLenum* type, char* name)
-GL_ENTRY(void, glGetActiveUniform, GLuint program, GLuint index, GLsizei bufsize, GLsizei* length, GLint* size, GLenum* type, char* name)
+GL_ENTRY(void, glGetActiveAttrib, GLuint program, GLuint index, GLsizei bufsize, GLsizei* length, GLint* size, GLenum* type, GLchar* name)
+GL_ENTRY(void, glGetActiveUniform, GLuint program, GLuint index, GLsizei bufsize, GLsizei* length, GLint* size, GLenum* type, GLchar* name)
 GL_ENTRY(void, glGetAttachedShaders, GLuint program, GLsizei maxcount, GLsizei* count, GLuint* shaders)
-GL_ENTRY(int, glGetAttribLocation, GLuint program, const char* name)
+GL_ENTRY(int, glGetAttribLocation, GLuint program, const GLchar* name)
 GL_ENTRY(void, glGetBooleanv, GLenum pname, GLboolean *params)
 GL_ENTRY(void, glGetBufferParameteriv, GLenum target, GLenum pname, GLint *params)
-GL_ENTRY(void, glGetBufferPointervOES, GLenum target, GLenum pname, void** params)
+GL_ENTRY(void, glGetBufferPointervOES, GLenum target, GLenum pname, GLvoid ** params)
 GL_ENTRY(void, glGetClipPlanef, GLenum pname, GLfloat eqn[4])
 GL_ENTRY(void, glGetClipPlanefOES, GLenum pname, GLfloat eqn[4])
 GL_ENTRY(void, glGetClipPlanex, GLenum pname, GLfixed eqn[4])
 GL_ENTRY(void, glGetClipPlanexOES, GLenum pname, GLfixed eqn[4])
-GL_ENTRY(void, glGetDriverControlStringQCOM, GLuint driverControl, GLsizei bufSize, GLsizei *length, char *driverControlString)
+GL_ENTRY(void, glGetDriverControlStringQCOM, GLuint driverControl, GLsizei bufSize, GLsizei *length, GLchar *driverControlString)
 GL_ENTRY(void, glGetDriverControlsQCOM, GLint *num, GLsizei size, GLuint *driverControls)
 GL_ENTRY(GLenum, glGetError, void)
 GL_ENTRY(void, glGetFenceivNV, GLuint fence, GLenum pname, GLint *params)
@@ -150,20 +172,20 @@
 GL_ENTRY(void, glGetMaterialxv, GLenum face, GLenum pname, GLfixed *params)
 GL_ENTRY(void, glGetMaterialxvOES, GLenum face, GLenum pname, GLfixed *params)
 GL_ENTRY(void, glGetPerfMonitorCounterDataAMD, GLuint monitor, GLenum pname, GLsizei dataSize, GLuint *data, GLint *bytesWritten)
-GL_ENTRY(void, glGetPerfMonitorCounterInfoAMD, GLuint group, GLuint counter, GLenum pname, void *data)
-GL_ENTRY(void, glGetPerfMonitorCounterStringAMD, GLuint group, GLuint counter, GLsizei bufSize, GLsizei *length, char *counterString)
+GL_ENTRY(void, glGetPerfMonitorCounterInfoAMD, GLuint group, GLuint counter, GLenum pname, GLvoid *data)
+GL_ENTRY(void, glGetPerfMonitorCounterStringAMD, GLuint group, GLuint counter, GLsizei bufSize, GLsizei *length, GLchar *counterString)
 GL_ENTRY(void, glGetPerfMonitorCountersAMD, GLuint group, GLint *numCounters, GLint *maxActiveCounters, GLsizei counterSize, GLuint *counters)
-GL_ENTRY(void, glGetPerfMonitorGroupStringAMD, GLuint group, GLsizei bufSize, GLsizei *length, char *groupString)
+GL_ENTRY(void, glGetPerfMonitorGroupStringAMD, GLuint group, GLsizei bufSize, GLsizei *length, GLchar *groupString)
 GL_ENTRY(void, glGetPerfMonitorGroupsAMD, GLint *numGroups, GLsizei groupsSize, GLuint *groups)
-GL_ENTRY(void, glGetPointerv, GLenum pname, void **params)
-GL_ENTRY(void, glGetProgramBinaryOES, GLuint program, GLsizei bufSize, GLsizei *length, GLenum *binaryFormat, void *binary)
-GL_ENTRY(void, glGetProgramInfoLog, GLuint program, GLsizei bufsize, GLsizei* length, char* infolog)
+GL_ENTRY(void, glGetPointerv, GLenum pname, GLvoid **params)
+GL_ENTRY(void, glGetProgramBinaryOES, GLuint program, GLsizei bufSize, GLsizei *length, GLenum *binaryFormat, GLvoid *binary)
+GL_ENTRY(void, glGetProgramInfoLog, GLuint program, GLsizei bufsize, GLsizei* length, GLchar* infolog)
 GL_ENTRY(void, glGetProgramiv, GLuint program, GLenum pname, GLint* params)
 GL_ENTRY(void, glGetRenderbufferParameteriv, GLenum target, GLenum pname, GLint* params)
 GL_ENTRY(void, glGetRenderbufferParameterivOES, GLenum target, GLenum pname, GLint* params)
-GL_ENTRY(void, glGetShaderInfoLog, GLuint shader, GLsizei bufsize, GLsizei* length, char* infolog)
+GL_ENTRY(void, glGetShaderInfoLog, GLuint shader, GLsizei bufsize, GLsizei* length, GLchar* infolog)
 GL_ENTRY(void, glGetShaderPrecisionFormat, GLenum shadertype, GLenum precisiontype, GLint* range, GLint* precision)
-GL_ENTRY(void, glGetShaderSource, GLuint shader, GLsizei bufsize, GLsizei* length, char* source)
+GL_ENTRY(void, glGetShaderSource, GLuint shader, GLsizei bufsize, GLsizei* length, GLchar* source)
 GL_ENTRY(void, glGetShaderiv, GLuint shader, GLenum pname, GLint* params)
 GL_ENTRY(const GLubyte *, glGetString, GLenum name)
 GL_ENTRY(void, glGetTexEnvfv, GLenum env, GLenum pname, GLfloat *params)
@@ -177,10 +199,10 @@
 GL_ENTRY(void, glGetTexParameteriv, GLenum target, GLenum pname, GLint *params)
 GL_ENTRY(void, glGetTexParameterxv, GLenum target, GLenum pname, GLfixed *params)
 GL_ENTRY(void, glGetTexParameterxvOES, GLenum target, GLenum pname, GLfixed *params)
-GL_ENTRY(int, glGetUniformLocation, GLuint program, const char* name)
+GL_ENTRY(int, glGetUniformLocation, GLuint program, const GLchar* name)
 GL_ENTRY(void, glGetUniformfv, GLuint program, GLint location, GLfloat* params)
 GL_ENTRY(void, glGetUniformiv, GLuint program, GLint location, GLint* params)
-GL_ENTRY(void, glGetVertexAttribPointerv, GLuint index, GLenum pname, void** pointer)
+GL_ENTRY(void, glGetVertexAttribPointerv, GLuint index, GLenum pname, GLvoid** pointer)
 GL_ENTRY(void, glGetVertexAttribfv, GLuint index, GLenum pname, GLfloat* params)
 GL_ENTRY(void, glGetVertexAttribiv, GLuint index, GLenum pname, GLint* params)
 GL_ENTRY(void, glHint, GLenum target, GLenum mode)
@@ -194,6 +216,7 @@
 GL_ENTRY(GLboolean, glIsRenderbufferOES, GLuint renderbuffer)
 GL_ENTRY(GLboolean, glIsShader, GLuint shader)
 GL_ENTRY(GLboolean, glIsTexture, GLuint texture)
+GL_ENTRY(GLboolean, glIsVertexArrayOES, GLuint array)
 GL_ENTRY(void, glLightModelf, GLenum pname, GLfloat param)
 GL_ENTRY(void, glLightModelfv, GLenum pname, const GLfloat *params)
 GL_ENTRY(void, glLightModelx, GLenum pname, GLfixed param)
@@ -228,6 +251,8 @@
 GL_ENTRY(void, glMultMatrixf, const GLfloat *m)
 GL_ENTRY(void, glMultMatrixx, const GLfixed *m)
 GL_ENTRY(void, glMultMatrixxOES, const GLfixed *m)
+GL_ENTRY(void, glMultiDrawArraysEXT, GLenum mode, GLint *first, GLsizei *count, GLsizei primcount)
+GL_ENTRY(void, glMultiDrawElementsEXT, GLenum mode, const GLsizei *count, GLenum type, const GLvoid* *indices, GLsizei primcount)
 GL_ENTRY(void, glMultiTexCoord4f, GLenum target, GLfloat s, GLfloat t, GLfloat r, GLfloat q)
 GL_ENTRY(void, glMultiTexCoord4x, GLenum target, GLfixed s, GLfixed t, GLfixed r, GLfixed q)
 GL_ENTRY(void, glMultiTexCoord4xOES, GLenum target, GLfixed s, GLfixed t, GLfixed r, GLfixed q)
@@ -254,12 +279,13 @@
 GL_ENTRY(void, glPolygonOffsetx, GLfixed factor, GLfixed units)
 GL_ENTRY(void, glPolygonOffsetxOES, GLfixed factor, GLfixed units)
 GL_ENTRY(void, glPopMatrix, void)
-GL_ENTRY(void, glProgramBinaryOES, GLuint program, GLenum binaryFormat, const void *binary, GLint length)
+GL_ENTRY(void, glProgramBinaryOES, GLuint program, GLenum binaryFormat, const GLvoid *binary, GLint length)
 GL_ENTRY(void, glPushMatrix, void)
 GL_ENTRY(GLbitfield, glQueryMatrixxOES, GLfixed mantissa[16], GLint exponent[16])
 GL_ENTRY(void, glReadPixels, GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLvoid *pixels)
 GL_ENTRY(void, glReleaseShaderCompiler, void)
 GL_ENTRY(void, glRenderbufferStorage, GLenum target, GLenum internalformat, GLsizei width, GLsizei height)
+GL_ENTRY(void, glRenderbufferStorageMultisampleIMG, GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height)
 GL_ENTRY(void, glRenderbufferStorageOES, GLenum target, GLenum internalformat, GLsizei width, GLsizei height)
 GL_ENTRY(void, glRotatef, GLfloat angle, GLfloat x, GLfloat y, GLfloat z)
 GL_ENTRY(void, glRotatex, GLfixed angle, GLfixed x, GLfixed y, GLfixed z)
@@ -274,8 +300,9 @@
 GL_ENTRY(void, glSelectPerfMonitorCountersAMD, GLuint monitor, GLboolean enable, GLuint group, GLint numCounters, GLuint *countersList)
 GL_ENTRY(void, glSetFenceNV, GLuint fence, GLenum condition)
 GL_ENTRY(void, glShadeModel, GLenum mode)
-GL_ENTRY(void, glShaderBinary, GLsizei n, const GLuint* shaders, GLenum binaryformat, const void* binary, GLsizei length)
-GL_ENTRY(void, glShaderSource, GLuint shader, GLsizei count, const char** string, const GLint* length)
+GL_ENTRY(void, glShaderBinary, GLsizei n, const GLuint* shaders, GLenum binaryformat, const GLvoid* binary, GLsizei length)
+GL_ENTRY(void, glShaderSource, GLuint shader, GLsizei count, const GLchar** string, const GLint* length)
+GL_ENTRY(void, glStartTilingQCOM, GLuint x, GLuint y, GLuint width, GLuint height, GLbitfield preserveMask)
 GL_ENTRY(void, glStencilFunc, GLenum func, GLint ref, GLuint mask)
 GL_ENTRY(void, glStencilFuncSeparate, GLenum face, GLenum func, GLint ref, GLuint mask)
 GL_ENTRY(void, glStencilMask, GLuint mask)
@@ -298,8 +325,8 @@
 GL_ENTRY(void, glTexGenivOES, GLenum coord, GLenum pname, const GLint *params)
 GL_ENTRY(void, glTexGenxOES, GLenum coord, GLenum pname, GLfixed param)
 GL_ENTRY(void, glTexGenxvOES, GLenum coord, GLenum pname, const GLfixed *params)
-GL_ENTRY(void, glTexImage2D, GLenum target, GLint level, GLint internalformat,  GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const GLvoid* pixels)
-GL_ENTRY(void, glTexImage3DOES, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const void* pixels)
+GL_ENTRY(void, glTexImage2D, GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const GLvoid *pixels)
+GL_ENTRY(void, glTexImage3DOES, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const GLvoid* pixels)
 GL_ENTRY(void, glTexParameterf, GLenum target, GLenum pname, GLfloat param)
 GL_ENTRY(void, glTexParameterfv, GLenum target, GLenum pname, const GLfloat *params)
 GL_ENTRY(void, glTexParameteri, GLenum target, GLenum pname, GLint param)
@@ -309,7 +336,7 @@
 GL_ENTRY(void, glTexParameterxv, GLenum target, GLenum pname, const GLfixed *params)
 GL_ENTRY(void, glTexParameterxvOES, GLenum target, GLenum pname, const GLfixed *params)
 GL_ENTRY(void, glTexSubImage2D, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *pixels)
-GL_ENTRY(void, glTexSubImage3DOES, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const void* pixels)
+GL_ENTRY(void, glTexSubImage3DOES, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const GLvoid* pixels)
 GL_ENTRY(void, glTranslatef, GLfloat x, GLfloat y, GLfloat z)
 GL_ENTRY(void, glTranslatex, GLfixed x, GLfixed y, GLfixed z)
 GL_ENTRY(void, glTranslatexOES, GLfixed x, GLfixed y, GLfixed z)
@@ -343,7 +370,7 @@
 GL_ENTRY(void, glVertexAttrib3fv, GLuint indx, const GLfloat* values)
 GL_ENTRY(void, glVertexAttrib4f, GLuint indx, GLfloat x, GLfloat y, GLfloat z, GLfloat w)
 GL_ENTRY(void, glVertexAttrib4fv, GLuint indx, const GLfloat* values)
-GL_ENTRY(void, glVertexAttribPointer, GLuint indx, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const void* ptr)
+GL_ENTRY(void, glVertexAttribPointer, GLuint indx, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const GLvoid* ptr)
 GL_ENTRY(void, glVertexPointer, GLint size, GLenum type, GLsizei stride, const GLvoid *pointer)
 GL_ENTRY(void, glViewport, GLint x, GLint y, GLsizei width, GLsizei height)
 GL_ENTRY(void, glWeightPointerOES, GLint size, GLenum type, GLsizei stride, const GLvoid *pointer)
diff --git a/opengl/tests/gl2_basic/gl2_basic.cpp b/opengl/tests/gl2_basic/gl2_basic.cpp
index 2361db5..f274c7c 100644
--- a/opengl/tests/gl2_basic/gl2_basic.cpp
+++ b/opengl/tests/gl2_basic/gl2_basic.cpp
@@ -195,7 +195,6 @@
     X(EGL_NATIVE_RENDERABLE),
     X(EGL_NATIVE_VISUAL_ID),
     X(EGL_NATIVE_VISUAL_TYPE),
-    X(EGL_PRESERVED_RESOURCES),
     X(EGL_SAMPLES),
     X(EGL_SAMPLE_BUFFERS),
     X(EGL_SURFACE_TYPE),
diff --git a/opengl/tests/gl_basic/gl_basic.cpp b/opengl/tests/gl_basic/gl_basic.cpp
index feb964a..0cc8398 100644
--- a/opengl/tests/gl_basic/gl_basic.cpp
+++ b/opengl/tests/gl_basic/gl_basic.cpp
@@ -114,7 +114,6 @@
     X(EGL_NATIVE_RENDERABLE),
     X(EGL_NATIVE_VISUAL_ID),
     X(EGL_NATIVE_VISUAL_TYPE),
-    X(EGL_PRESERVED_RESOURCES),
     X(EGL_SAMPLES),
     X(EGL_SAMPLE_BUFFERS),
     X(EGL_SURFACE_TYPE),
diff --git a/opengl/tests/gl_jni/jni/gl_code.cpp b/opengl/tests/gl_jni/jni/gl_code.cpp
index 33b25ab..f031c79 100644
--- a/opengl/tests/gl_jni/jni/gl_code.cpp
+++ b/opengl/tests/gl_jni/jni/gl_code.cpp
@@ -180,4 +180,5 @@
 JNIEXPORT void JNICALL Java_com_android_gljni_GLJNILib_changeBackground(JNIEnv * env, jobject obj)
 {
     background = 1.0f - background;
-}
\ No newline at end of file
+}
+
diff --git a/opengl/tools/glgen/specs/gles11/GLES20.spec b/opengl/tools/glgen/specs/gles11/GLES20.spec
index 61094d1..ee88f59 100644
--- a/opengl/tools/glgen/specs/gles11/GLES20.spec
+++ b/opengl/tools/glgen/specs/gles11/GLES20.spec
@@ -39,6 +39,7 @@
 void glDisable ( GLenum cap )

 void glDisableVertexAttribArray ( GLuint index )

 void glDrawArrays ( GLenum mode, GLint first, GLsizei count )

+void glDrawElements ( GLenum mode, GLsizei count, GLenum type, GLint offset )

 void glDrawElements ( GLenum mode, GLsizei count, GLenum type, const GLvoid *indices )

 void glEnable ( GLenum cap )

 void glEnableVertexAttribArray ( GLuint index )

@@ -138,5 +139,6 @@
 void glVertexAttrib3fv ( GLuint indx, const GLfloat *values )

 void glVertexAttrib4f ( GLuint indx, GLfloat x, GLfloat y, GLfloat z, GLfloat w )

 void glVertexAttrib4fv ( GLuint indx, const GLfloat *values )

+void glVertexAttribPointer ( GLuint indx, GLint size, GLenum type, GLboolean normalized, GLsizei stride, GLint offset )

 void glVertexAttribPointer ( GLuint indx, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const GLvoid *ptr )

-void glViewport ( GLint x, GLint y, GLsizei width, GLsizei height )
\ No newline at end of file
+void glViewport ( GLint x, GLint y, GLsizei width, GLsizei height )

diff --git a/opengl/tools/glgen/src/JniCodeEmitter.java b/opengl/tools/glgen/src/JniCodeEmitter.java
index ebaca90..9d8c5a0 100644
--- a/opengl/tools/glgen/src/JniCodeEmitter.java
+++ b/opengl/tools/glgen/src/JniCodeEmitter.java
@@ -695,7 +695,7 @@
         boolean isPointerFunc = isPointerFunc(jfunc);
         boolean isVBOPointerFunc = (outName.endsWith("Pointer") ||
                 outName.endsWith("PointerOES") ||
-            outName.endsWith("DrawElements")) &&
+            outName.endsWith("DrawElements") || outName.endsWith("VertexAttribPointer")) &&
             !jfunc.getCFunc().hasPointerArg();
         if (isPointerFunc) {
             outName += "Bounds";
diff --git a/packages/SettingsProvider/AndroidManifest.xml b/packages/SettingsProvider/AndroidManifest.xml
index d057ab7..dd0d064 100644
--- a/packages/SettingsProvider/AndroidManifest.xml
+++ b/packages/SettingsProvider/AndroidManifest.xml
@@ -8,6 +8,8 @@
                  android:backupAgent="SettingsBackupAgent"
                  android:killAfterRestore="false"
                  android:icon="@drawable/ic_launcher_settings">
+                 
+    <!-- todo add: android:neverEncrypt="true" -->
 
         <provider android:name="SettingsProvider" android:authorities="settings"
                   android:multiprocess="false"
diff --git a/packages/SettingsProvider/src/com/android/providers/settings/DatabaseHelper.java b/packages/SettingsProvider/src/com/android/providers/settings/DatabaseHelper.java
index dab7601..7395233 100644
--- a/packages/SettingsProvider/src/com/android/providers/settings/DatabaseHelper.java
+++ b/packages/SettingsProvider/src/com/android/providers/settings/DatabaseHelper.java
@@ -971,7 +971,7 @@
             int vibrate = 0;
             vibrate = AudioService.getValueForVibrateSetting(vibrate,
                     AudioManager.VIBRATE_TYPE_NOTIFICATION, AudioManager.VIBRATE_SETTING_ON);
-            vibrate = AudioService.getValueForVibrateSetting(vibrate,
+            vibrate |= AudioService.getValueForVibrateSetting(vibrate,
                     AudioManager.VIBRATE_TYPE_RINGER, AudioManager.VIBRATE_SETTING_OFF);
             loadSetting(stmt, Settings.System.VIBRATE_ON, vibrate);
         } finally {
diff --git a/packages/SettingsProvider/src/com/android/providers/settings/SettingsProvider.java b/packages/SettingsProvider/src/com/android/providers/settings/SettingsProvider.java
index 4372cd8..6a5290e 100644
--- a/packages/SettingsProvider/src/com/android/providers/settings/SettingsProvider.java
+++ b/packages/SettingsProvider/src/com/android/providers/settings/SettingsProvider.java
@@ -408,9 +408,12 @@
                     }
                 } else if (prefix == '-' && index >= 0) {
                     // remove the provider from the list if present
-                    // remove leading and trailing commas
-                    if (index > 0) index--;
-                    if (end < providers.length()) end++;
+                    // remove leading or trailing comma
+                    if (index > 0) {
+                        index--;
+                    } else if (end < providers.length()) {
+                        end++;
+                    }
 
                     newProviders = providers.substring(0, index);
                     if (end < providers.length()) {
diff --git a/packages/SystemUI/Android.mk b/packages/SystemUI/Android.mk
new file mode 100644
index 0000000..4c83768
--- /dev/null
+++ b/packages/SystemUI/Android.mk
@@ -0,0 +1,13 @@
+LOCAL_PATH:= $(call my-dir)
+include $(CLEAR_VARS)
+
+LOCAL_MODULE_TAGS := optional
+
+LOCAL_SRC_FILES := $(call all-subdir-java-files)
+
+LOCAL_JAVA_LIBRARIES := services
+
+LOCAL_PACKAGE_NAME := SystemUI
+LOCAL_CERTIFICATE := platform
+
+include $(BUILD_PACKAGE)
diff --git a/packages/SystemUI/AndroidManifest.xml b/packages/SystemUI/AndroidManifest.xml
new file mode 100644
index 0000000..75045d7
--- /dev/null
+++ b/packages/SystemUI/AndroidManifest.xml
@@ -0,0 +1,24 @@
+<manifest xmlns:android="http://schemas.android.com/apk/res/android"
+        package="com.android.systemui"
+        android:sharedUserId="android.uid.system"
+        android:process="system"
+        >
+
+    <uses-permission android:name="android.permission.STATUS_BAR_SERVICE" />
+
+    <application
+        android:allowClearUserData="false"
+        android:label="@string/app_label"
+        android:icon="@drawable/ic_launcher_settings">
+                 
+        <service
+            android:name=".statusbar.StatusBarService"
+            android:exported="false"
+            />
+
+        <activity android:name=".usb.UsbStorageActivity"
+                android:excludeFromRecents="true">
+        </activity>
+
+    </application>
+</manifest>
diff --git a/libs/surfaceflinger/MODULE_LICENSE_APACHE2 b/packages/SystemUI/MODULE_LICENSE_APACHE2
similarity index 100%
copy from libs/surfaceflinger/MODULE_LICENSE_APACHE2
copy to packages/SystemUI/MODULE_LICENSE_APACHE2
diff --git a/packages/SystemUI/NOTICE b/packages/SystemUI/NOTICE
new file mode 100644
index 0000000..c5b1efa
--- /dev/null
+++ b/packages/SystemUI/NOTICE
@@ -0,0 +1,190 @@
+
+   Copyright (c) 2005-2008, The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+   See the License for the specific language governing permissions and
+   limitations under the License.
+
+
+                                 Apache License
+                           Version 2.0, January 2004
+                        http://www.apache.org/licenses/
+
+   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+   1. Definitions.
+
+      "License" shall mean the terms and conditions for use, reproduction,
+      and distribution as defined by Sections 1 through 9 of this document.
+
+      "Licensor" shall mean the copyright owner or entity authorized by
+      the copyright owner that is granting the License.
+
+      "Legal Entity" shall mean the union of the acting entity and all
+      other entities that control, are controlled by, or are under common
+      control with that entity. For the purposes of this definition,
+      "control" means (i) the power, direct or indirect, to cause the
+      direction or management of such entity, whether by contract or
+      otherwise, or (ii) ownership of fifty percent (50%) or more of the
+      outstanding shares, or (iii) beneficial ownership of such entity.
+
+      "You" (or "Your") shall mean an individual or Legal Entity
+      exercising permissions granted by this License.
+
+      "Source" form shall mean the preferred form for making modifications,
+      including but not limited to software source code, documentation
+      source, and configuration files.
+
+      "Object" form shall mean any form resulting from mechanical
+      transformation or translation of a Source form, including but
+      not limited to compiled object code, generated documentation,
+      and conversions to other media types.
+
+      "Work" shall mean the work of authorship, whether in Source or
+      Object form, made available under the License, as indicated by a
+      copyright notice that is included in or attached to the work
+      (an example is provided in the Appendix below).
+
+      "Derivative Works" shall mean any work, whether in Source or Object
+      form, that is based on (or derived from) the Work and for which the
+      editorial revisions, annotations, elaborations, or other modifications
+      represent, as a whole, an original work of authorship. For the purposes
+      of this License, Derivative Works shall not include works that remain
+      separable from, or merely link (or bind by name) to the interfaces of,
+      the Work and Derivative Works thereof.
+
+      "Contribution" shall mean any work of authorship, including
+      the original version of the Work and any modifications or additions
+      to that Work or Derivative Works thereof, that is intentionally
+      submitted to Licensor for inclusion in the Work by the copyright owner
+      or by an individual or Legal Entity authorized to submit on behalf of
+      the copyright owner. For the purposes of this definition, "submitted"
+      means any form of electronic, verbal, or written communication sent
+      to the Licensor or its representatives, including but not limited to
+      communication on electronic mailing lists, source code control systems,
+      and issue tracking systems that are managed by, or on behalf of, the
+      Licensor for the purpose of discussing and improving the Work, but
+      excluding communication that is conspicuously marked or otherwise
+      designated in writing by the copyright owner as "Not a Contribution."
+
+      "Contributor" shall mean Licensor and any individual or Legal Entity
+      on behalf of whom a Contribution has been received by Licensor and
+      subsequently incorporated within the Work.
+
+   2. Grant of Copyright License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      copyright license to reproduce, prepare Derivative Works of,
+      publicly display, publicly perform, sublicense, and distribute the
+      Work and such Derivative Works in Source or Object form.
+
+   3. Grant of Patent License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      (except as stated in this section) patent license to make, have made,
+      use, offer to sell, sell, import, and otherwise transfer the Work,
+      where such license applies only to those patent claims licensable
+      by such Contributor that are necessarily infringed by their
+      Contribution(s) alone or by combination of their Contribution(s)
+      with the Work to which such Contribution(s) was submitted. If You
+      institute patent litigation against any entity (including a
+      cross-claim or counterclaim in a lawsuit) alleging that the Work
+      or a Contribution incorporated within the Work constitutes direct
+      or contributory patent infringement, then any patent licenses
+      granted to You under this License for that Work shall terminate
+      as of the date such litigation is filed.
+
+   4. Redistribution. You may reproduce and distribute copies of the
+      Work or Derivative Works thereof in any medium, with or without
+      modifications, and in Source or Object form, provided that You
+      meet the following conditions:
+
+      (a) You must give any other recipients of the Work or
+          Derivative Works a copy of this License; and
+
+      (b) You must cause any modified files to carry prominent notices
+          stating that You changed the files; and
+
+      (c) You must retain, in the Source form of any Derivative Works
+          that You distribute, all copyright, patent, trademark, and
+          attribution notices from the Source form of the Work,
+          excluding those notices that do not pertain to any part of
+          the Derivative Works; and
+
+      (d) If the Work includes a "NOTICE" text file as part of its
+          distribution, then any Derivative Works that You distribute must
+          include a readable copy of the attribution notices contained
+          within such NOTICE file, excluding those notices that do not
+          pertain to any part of the Derivative Works, in at least one
+          of the following places: within a NOTICE text file distributed
+          as part of the Derivative Works; within the Source form or
+          documentation, if provided along with the Derivative Works; or,
+          within a display generated by the Derivative Works, if and
+          wherever such third-party notices normally appear. The contents
+          of the NOTICE file are for informational purposes only and
+          do not modify the License. You may add Your own attribution
+          notices within Derivative Works that You distribute, alongside
+          or as an addendum to the NOTICE text from the Work, provided
+          that such additional attribution notices cannot be construed
+          as modifying the License.
+
+      You may add Your own copyright statement to Your modifications and
+      may provide additional or different license terms and conditions
+      for use, reproduction, or distribution of Your modifications, or
+      for any such Derivative Works as a whole, provided Your use,
+      reproduction, and distribution of the Work otherwise complies with
+      the conditions stated in this License.
+
+   5. Submission of Contributions. Unless You explicitly state otherwise,
+      any Contribution intentionally submitted for inclusion in the Work
+      by You to the Licensor shall be under the terms and conditions of
+      this License, without any additional terms or conditions.
+      Notwithstanding the above, nothing herein shall supersede or modify
+      the terms of any separate license agreement you may have executed
+      with Licensor regarding such Contributions.
+
+   6. Trademarks. This License does not grant permission to use the trade
+      names, trademarks, service marks, or product names of the Licensor,
+      except as required for reasonable and customary use in describing the
+      origin of the Work and reproducing the content of the NOTICE file.
+
+   7. Disclaimer of Warranty. Unless required by applicable law or
+      agreed to in writing, Licensor provides the Work (and each
+      Contributor provides its Contributions) on an "AS IS" BASIS,
+      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+      implied, including, without limitation, any warranties or conditions
+      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+      PARTICULAR PURPOSE. You are solely responsible for determining the
+      appropriateness of using or redistributing the Work and assume any
+      risks associated with Your exercise of permissions under this License.
+
+   8. Limitation of Liability. In no event and under no legal theory,
+      whether in tort (including negligence), contract, or otherwise,
+      unless required by applicable law (such as deliberate and grossly
+      negligent acts) or agreed to in writing, shall any Contributor be
+      liable to You for damages, including any direct, indirect, special,
+      incidental, or consequential damages of any character arising as a
+      result of this License or out of the use or inability to use the
+      Work (including but not limited to damages for loss of goodwill,
+      work stoppage, computer failure or malfunction, or any and all
+      other commercial damages or losses), even if such Contributor
+      has been advised of the possibility of such damages.
+
+   9. Accepting Warranty or Additional Liability. While redistributing
+      the Work or Derivative Works thereof, You may choose to offer,
+      and charge a fee for, acceptance of support, warranty, indemnity,
+      or other liability obligations and/or rights consistent with this
+      License. However, in accepting such obligations, You may act only
+      on Your own behalf and on Your sole responsibility, not on behalf
+      of any other Contributor, and only if You agree to indemnify,
+      defend, and hold each Contributor harmless for any liability
+      incurred by, or claims asserted against, such Contributor by reason
+      of your accepting any such warranty or additional liability.
+
+   END OF TERMS AND CONDITIONS
+
diff --git a/packages/SystemUI/res/drawable-hdpi/alert_bar_background_normal.9.png b/packages/SystemUI/res/drawable-hdpi/alert_bar_background_normal.9.png
new file mode 100644
index 0000000..bc127bd
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/alert_bar_background_normal.9.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/alert_bar_background_pressed.9.png b/packages/SystemUI/res/drawable-hdpi/alert_bar_background_pressed.9.png
new file mode 100644
index 0000000..59af804
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/alert_bar_background_pressed.9.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/battery_low_battery.png b/packages/SystemUI/res/drawable-hdpi/battery_low_battery.png
similarity index 100%
rename from core/res/res/drawable-hdpi/battery_low_battery.png
rename to packages/SystemUI/res/drawable-hdpi/battery_low_battery.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/btn_default_small_normal.9.png b/packages/SystemUI/res/drawable-hdpi/btn_default_small_normal.9.png
new file mode 100644
index 0000000..baafed6
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/btn_default_small_normal.9.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/btn_default_small_normal_disable.9.png b/packages/SystemUI/res/drawable-hdpi/btn_default_small_normal_disable.9.png
new file mode 100644
index 0000000..175197b
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/btn_default_small_normal_disable.9.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/btn_default_small_normal_disable_focused.9.png b/packages/SystemUI/res/drawable-hdpi/btn_default_small_normal_disable_focused.9.png
new file mode 100644
index 0000000..ec1feff
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/btn_default_small_normal_disable_focused.9.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/btn_default_small_pressed.9.png b/packages/SystemUI/res/drawable-hdpi/btn_default_small_pressed.9.png
new file mode 100644
index 0000000..c1f9a0f
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/btn_default_small_pressed.9.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/btn_default_small_selected.9.png b/packages/SystemUI/res/drawable-hdpi/btn_default_small_selected.9.png
new file mode 100644
index 0000000..0ea3f40
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/btn_default_small_selected.9.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/ic_launcher_settings.png b/packages/SystemUI/res/drawable-hdpi/ic_launcher_settings.png
new file mode 100644
index 0000000..ff34a7f
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/ic_launcher_settings.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/ic_notification_overlay.9.png b/packages/SystemUI/res/drawable-hdpi/ic_notification_overlay.9.png
new file mode 100644
index 0000000..744178f
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/ic_notification_overlay.9.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/shade_bg.png b/packages/SystemUI/res/drawable-hdpi/shade_bg.png
new file mode 100644
index 0000000..3d00cd0
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/shade_bg.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/shade_handlebar.9.png b/packages/SystemUI/res/drawable-hdpi/shade_handlebar.9.png
new file mode 100644
index 0000000..f313ffb
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/shade_handlebar.9.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/shade_header_background.9.png b/packages/SystemUI/res/drawable-hdpi/shade_header_background.9.png
new file mode 100644
index 0000000..37b5fef
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/shade_header_background.9.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/stat_notify_alarm.png b/packages/SystemUI/res/drawable-hdpi/stat_notify_alarm.png
similarity index 100%
rename from core/res/res/drawable-hdpi/stat_notify_alarm.png
rename to packages/SystemUI/res/drawable-hdpi/stat_notify_alarm.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_notify_more.png b/packages/SystemUI/res/drawable-hdpi/stat_notify_more.png
new file mode 100755
index 0000000..1c7f9db
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_notify_more.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_data_bluetooth.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_data_bluetooth.png
new file mode 100644
index 0000000..96dc085
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_data_bluetooth.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/stat_sys_data_bluetooth_connected.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_data_bluetooth_connected.png
similarity index 100%
rename from core/res/res/drawable-hdpi/stat_sys_data_bluetooth_connected.png
rename to packages/SystemUI/res/drawable-hdpi/stat_sys_data_bluetooth_connected.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/stat_sys_data_connected_1x.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_data_connected_1x.png
similarity index 100%
rename from core/res/res/drawable-hdpi/stat_sys_data_connected_1x.png
rename to packages/SystemUI/res/drawable-hdpi/stat_sys_data_connected_1x.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/stat_sys_data_connected_3g.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_data_connected_3g.png
similarity index 100%
rename from core/res/res/drawable-hdpi/stat_sys_data_connected_3g.png
rename to packages/SystemUI/res/drawable-hdpi/stat_sys_data_connected_3g.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/stat_sys_data_connected_e.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_data_connected_e.png
similarity index 100%
rename from core/res/res/drawable-hdpi/stat_sys_data_connected_e.png
rename to packages/SystemUI/res/drawable-hdpi/stat_sys_data_connected_e.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/stat_sys_data_connected_g.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_data_connected_g.png
similarity index 100%
rename from core/res/res/drawable-hdpi/stat_sys_data_connected_g.png
rename to packages/SystemUI/res/drawable-hdpi/stat_sys_data_connected_g.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/stat_sys_data_connected_h.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_data_connected_h.png
similarity index 100%
rename from core/res/res/drawable-hdpi/stat_sys_data_connected_h.png
rename to packages/SystemUI/res/drawable-hdpi/stat_sys_data_connected_h.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/stat_sys_data_in_1x.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_data_in_1x.png
similarity index 100%
rename from core/res/res/drawable-hdpi/stat_sys_data_in_1x.png
rename to packages/SystemUI/res/drawable-hdpi/stat_sys_data_in_1x.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/stat_sys_data_in_3g.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_data_in_3g.png
similarity index 100%
rename from core/res/res/drawable-hdpi/stat_sys_data_in_3g.png
rename to packages/SystemUI/res/drawable-hdpi/stat_sys_data_in_3g.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/stat_sys_data_in_e.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_data_in_e.png
similarity index 100%
rename from core/res/res/drawable-hdpi/stat_sys_data_in_e.png
rename to packages/SystemUI/res/drawable-hdpi/stat_sys_data_in_e.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/stat_sys_data_in_g.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_data_in_g.png
similarity index 100%
rename from core/res/res/drawable-hdpi/stat_sys_data_in_g.png
rename to packages/SystemUI/res/drawable-hdpi/stat_sys_data_in_g.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/stat_sys_data_in_h.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_data_in_h.png
similarity index 100%
rename from core/res/res/drawable-hdpi/stat_sys_data_in_h.png
rename to packages/SystemUI/res/drawable-hdpi/stat_sys_data_in_h.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/stat_sys_data_inandout_1x.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_data_inandout_1x.png
similarity index 100%
rename from core/res/res/drawable-hdpi/stat_sys_data_inandout_1x.png
rename to packages/SystemUI/res/drawable-hdpi/stat_sys_data_inandout_1x.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/stat_sys_data_inandout_3g.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_data_inandout_3g.png
similarity index 100%
rename from core/res/res/drawable-hdpi/stat_sys_data_inandout_3g.png
rename to packages/SystemUI/res/drawable-hdpi/stat_sys_data_inandout_3g.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/stat_sys_data_inandout_e.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_data_inandout_e.png
similarity index 100%
rename from core/res/res/drawable-hdpi/stat_sys_data_inandout_e.png
rename to packages/SystemUI/res/drawable-hdpi/stat_sys_data_inandout_e.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/stat_sys_data_inandout_g.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_data_inandout_g.png
similarity index 100%
rename from core/res/res/drawable-hdpi/stat_sys_data_inandout_g.png
rename to packages/SystemUI/res/drawable-hdpi/stat_sys_data_inandout_g.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/stat_sys_data_inandout_h.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_data_inandout_h.png
similarity index 100%
rename from core/res/res/drawable-hdpi/stat_sys_data_inandout_h.png
rename to packages/SystemUI/res/drawable-hdpi/stat_sys_data_inandout_h.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/stat_sys_data_out_1x.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_data_out_1x.png
similarity index 100%
rename from core/res/res/drawable-hdpi/stat_sys_data_out_1x.png
rename to packages/SystemUI/res/drawable-hdpi/stat_sys_data_out_1x.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/stat_sys_data_out_3g.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_data_out_3g.png
similarity index 100%
rename from core/res/res/drawable-hdpi/stat_sys_data_out_3g.png
rename to packages/SystemUI/res/drawable-hdpi/stat_sys_data_out_3g.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/stat_sys_data_out_e.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_data_out_e.png
similarity index 100%
rename from core/res/res/drawable-hdpi/stat_sys_data_out_e.png
rename to packages/SystemUI/res/drawable-hdpi/stat_sys_data_out_e.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/stat_sys_data_out_g.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_data_out_g.png
similarity index 100%
rename from core/res/res/drawable-hdpi/stat_sys_data_out_g.png
rename to packages/SystemUI/res/drawable-hdpi/stat_sys_data_out_g.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/stat_sys_data_out_h.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_data_out_h.png
similarity index 100%
rename from core/res/res/drawable-hdpi/stat_sys_data_out_h.png
rename to packages/SystemUI/res/drawable-hdpi/stat_sys_data_out_h.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/stat_sys_gps_acquiring.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_gps_acquiring.png
similarity index 100%
rename from core/res/res/drawable-hdpi/stat_sys_gps_acquiring.png
rename to packages/SystemUI/res/drawable-hdpi/stat_sys_gps_acquiring.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/stat_sys_no_sim.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_no_sim.png
similarity index 100%
rename from core/res/res/drawable-hdpi/stat_sys_no_sim.png
rename to packages/SystemUI/res/drawable-hdpi/stat_sys_no_sim.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/stat_sys_r_signal_0.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_r_signal_0.png
similarity index 100%
rename from core/res/res/drawable-hdpi/stat_sys_r_signal_0.png
rename to packages/SystemUI/res/drawable-hdpi/stat_sys_r_signal_0.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/stat_sys_r_signal_1.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_r_signal_1.png
similarity index 100%
rename from core/res/res/drawable-hdpi/stat_sys_r_signal_1.png
rename to packages/SystemUI/res/drawable-hdpi/stat_sys_r_signal_1.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/stat_sys_r_signal_2.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_r_signal_2.png
similarity index 100%
rename from core/res/res/drawable-hdpi/stat_sys_r_signal_2.png
rename to packages/SystemUI/res/drawable-hdpi/stat_sys_r_signal_2.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/stat_sys_r_signal_3.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_r_signal_3.png
similarity index 100%
rename from core/res/res/drawable-hdpi/stat_sys_r_signal_3.png
rename to packages/SystemUI/res/drawable-hdpi/stat_sys_r_signal_3.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/stat_sys_r_signal_4.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_r_signal_4.png
similarity index 100%
rename from core/res/res/drawable-hdpi/stat_sys_r_signal_4.png
rename to packages/SystemUI/res/drawable-hdpi/stat_sys_r_signal_4.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/stat_sys_ringer_silent.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_ringer_silent.png
similarity index 100%
rename from core/res/res/drawable-hdpi/stat_sys_ringer_silent.png
rename to packages/SystemUI/res/drawable-hdpi/stat_sys_ringer_silent.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/stat_sys_ringer_vibrate.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_ringer_vibrate.png
similarity index 100%
rename from core/res/res/drawable-hdpi/stat_sys_ringer_vibrate.png
rename to packages/SystemUI/res/drawable-hdpi/stat_sys_ringer_vibrate.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/stat_sys_roaming_cdma_0.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_roaming_cdma_0.png
similarity index 100%
rename from core/res/res/drawable-hdpi/stat_sys_roaming_cdma_0.png
rename to packages/SystemUI/res/drawable-hdpi/stat_sys_roaming_cdma_0.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/stat_sys_roaming_cdma_flash_anim0.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_roaming_cdma_flash_anim0.png
similarity index 100%
rename from core/res/res/drawable-hdpi/stat_sys_roaming_cdma_flash_anim0.png
rename to packages/SystemUI/res/drawable-hdpi/stat_sys_roaming_cdma_flash_anim0.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/stat_sys_roaming_cdma_flash_anim1.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_roaming_cdma_flash_anim1.png
similarity index 100%
rename from core/res/res/drawable-hdpi/stat_sys_roaming_cdma_flash_anim1.png
rename to packages/SystemUI/res/drawable-hdpi/stat_sys_roaming_cdma_flash_anim1.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/stat_sys_signal_0.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_0.png
similarity index 100%
rename from core/res/res/drawable-hdpi/stat_sys_signal_0.png
rename to packages/SystemUI/res/drawable-hdpi/stat_sys_signal_0.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/stat_sys_signal_1.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_1.png
similarity index 100%
rename from core/res/res/drawable-hdpi/stat_sys_signal_1.png
rename to packages/SystemUI/res/drawable-hdpi/stat_sys_signal_1.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/stat_sys_signal_2.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_2.png
similarity index 100%
rename from core/res/res/drawable-hdpi/stat_sys_signal_2.png
rename to packages/SystemUI/res/drawable-hdpi/stat_sys_signal_2.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/stat_sys_signal_3.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_3.png
similarity index 100%
rename from core/res/res/drawable-hdpi/stat_sys_signal_3.png
rename to packages/SystemUI/res/drawable-hdpi/stat_sys_signal_3.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/stat_sys_signal_4.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_4.png
similarity index 100%
rename from core/res/res/drawable-hdpi/stat_sys_signal_4.png
rename to packages/SystemUI/res/drawable-hdpi/stat_sys_signal_4.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/stat_sys_signal_flightmode.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_flightmode.png
similarity index 100%
rename from core/res/res/drawable-hdpi/stat_sys_signal_flightmode.png
rename to packages/SystemUI/res/drawable-hdpi/stat_sys_signal_flightmode.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/stat_sys_signal_null.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_null.png
similarity index 100%
rename from core/res/res/drawable-hdpi/stat_sys_signal_null.png
rename to packages/SystemUI/res/drawable-hdpi/stat_sys_signal_null.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/stat_sys_tty_mode.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_tty_mode.png
similarity index 100%
rename from core/res/res/drawable-hdpi/stat_sys_tty_mode.png
rename to packages/SystemUI/res/drawable-hdpi/stat_sys_tty_mode.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/stat_sys_wifi_signal_0.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_wifi_signal_0.png
similarity index 100%
rename from core/res/res/drawable-hdpi/stat_sys_wifi_signal_0.png
rename to packages/SystemUI/res/drawable-hdpi/stat_sys_wifi_signal_0.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/stat_sys_wifi_signal_1.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_wifi_signal_1.png
similarity index 100%
rename from core/res/res/drawable-hdpi/stat_sys_wifi_signal_1.png
rename to packages/SystemUI/res/drawable-hdpi/stat_sys_wifi_signal_1.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/stat_sys_wifi_signal_2.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_wifi_signal_2.png
similarity index 100%
rename from core/res/res/drawable-hdpi/stat_sys_wifi_signal_2.png
rename to packages/SystemUI/res/drawable-hdpi/stat_sys_wifi_signal_2.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/stat_sys_wifi_signal_3.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_wifi_signal_3.png
similarity index 100%
rename from core/res/res/drawable-hdpi/stat_sys_wifi_signal_3.png
rename to packages/SystemUI/res/drawable-hdpi/stat_sys_wifi_signal_3.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/stat_sys_wifi_signal_4.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_wifi_signal_4.png
similarity index 100%
rename from core/res/res/drawable-hdpi/stat_sys_wifi_signal_4.png
rename to packages/SystemUI/res/drawable-hdpi/stat_sys_wifi_signal_4.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/status_bar_background.9.png b/packages/SystemUI/res/drawable-hdpi/status_bar_background.9.png
new file mode 100644
index 0000000..a4be298
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/status_bar_background.9.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/status_bar_item_app_background_normal.9.png b/packages/SystemUI/res/drawable-hdpi/status_bar_item_app_background_normal.9.png
new file mode 100644
index 0000000..4fbfa4f
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/status_bar_item_app_background_normal.9.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/title_bar_portrait.9.png b/packages/SystemUI/res/drawable-hdpi/title_bar_portrait.9.png
new file mode 100644
index 0000000..70f7cc2
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/title_bar_portrait.9.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/title_bar_shadow.9.png b/packages/SystemUI/res/drawable-hdpi/title_bar_shadow.9.png
new file mode 100644
index 0000000..e6dab63
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/title_bar_shadow.9.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/alert_bar_background_normal.9.png b/packages/SystemUI/res/drawable-mdpi/alert_bar_background_normal.9.png
new file mode 100644
index 0000000..258de13
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/alert_bar_background_normal.9.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/alert_bar_background_pressed.9.png b/packages/SystemUI/res/drawable-mdpi/alert_bar_background_pressed.9.png
new file mode 100644
index 0000000..258de13
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/alert_bar_background_pressed.9.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/battery_low_battery.png b/packages/SystemUI/res/drawable-mdpi/battery_low_battery.png
similarity index 100%
rename from core/res/res/drawable-mdpi/battery_low_battery.png
rename to packages/SystemUI/res/drawable-mdpi/battery_low_battery.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/btn_default_small_normal.9.png b/packages/SystemUI/res/drawable-mdpi/btn_default_small_normal.9.png
new file mode 100644
index 0000000..bcedd5f
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/btn_default_small_normal.9.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/btn_default_small_normal_disable.9.png b/packages/SystemUI/res/drawable-mdpi/btn_default_small_normal_disable.9.png
new file mode 100644
index 0000000..ac6260f
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/btn_default_small_normal_disable.9.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/btn_default_small_normal_disable_focused.9.png b/packages/SystemUI/res/drawable-mdpi/btn_default_small_normal_disable_focused.9.png
new file mode 100644
index 0000000..4ee1b3f
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/btn_default_small_normal_disable_focused.9.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/btn_default_small_pressed.9.png b/packages/SystemUI/res/drawable-mdpi/btn_default_small_pressed.9.png
new file mode 100644
index 0000000..25e38f4
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/btn_default_small_pressed.9.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/btn_default_small_selected.9.png b/packages/SystemUI/res/drawable-mdpi/btn_default_small_selected.9.png
new file mode 100644
index 0000000..cc209c6
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/btn_default_small_selected.9.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/ic_launcher_settings.png b/packages/SystemUI/res/drawable-mdpi/ic_launcher_settings.png
new file mode 100644
index 0000000..b08ad3b
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/ic_launcher_settings.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/ic_notification_overlay.9.png b/packages/SystemUI/res/drawable-mdpi/ic_notification_overlay.9.png
new file mode 100644
index 0000000..1a3063c4
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/ic_notification_overlay.9.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/shade_bg.png b/packages/SystemUI/res/drawable-mdpi/shade_bg.png
new file mode 100644
index 0000000..941d3b1
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/shade_bg.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/shade_handlebar.9.png b/packages/SystemUI/res/drawable-mdpi/shade_handlebar.9.png
new file mode 100644
index 0000000..9cbd9fe
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/shade_handlebar.9.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/shade_header_background.9.png b/packages/SystemUI/res/drawable-mdpi/shade_header_background.9.png
new file mode 100644
index 0000000..fa9a90c
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/shade_header_background.9.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/stat_notify_alarm.png b/packages/SystemUI/res/drawable-mdpi/stat_notify_alarm.png
similarity index 100%
rename from core/res/res/drawable-mdpi/stat_notify_alarm.png
rename to packages/SystemUI/res/drawable-mdpi/stat_notify_alarm.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_notify_more.png b/packages/SystemUI/res/drawable-mdpi/stat_notify_more.png
new file mode 100644
index 0000000..e129ba9
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/stat_notify_more.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/stat_sys_data_bluetooth_connected.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_data_bluetooth_connected.png
similarity index 100%
rename from core/res/res/drawable-mdpi/stat_sys_data_bluetooth_connected.png
rename to packages/SystemUI/res/drawable-mdpi/stat_sys_data_bluetooth_connected.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/stat_sys_data_connected_1x.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_data_connected_1x.png
similarity index 100%
rename from core/res/res/drawable-mdpi/stat_sys_data_connected_1x.png
rename to packages/SystemUI/res/drawable-mdpi/stat_sys_data_connected_1x.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/stat_sys_data_connected_3g.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_data_connected_3g.png
similarity index 100%
rename from core/res/res/drawable-mdpi/stat_sys_data_connected_3g.png
rename to packages/SystemUI/res/drawable-mdpi/stat_sys_data_connected_3g.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/stat_sys_data_connected_e.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_data_connected_e.png
similarity index 100%
rename from core/res/res/drawable-mdpi/stat_sys_data_connected_e.png
rename to packages/SystemUI/res/drawable-mdpi/stat_sys_data_connected_e.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/stat_sys_data_connected_g.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_data_connected_g.png
similarity index 100%
rename from core/res/res/drawable-mdpi/stat_sys_data_connected_g.png
rename to packages/SystemUI/res/drawable-mdpi/stat_sys_data_connected_g.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/stat_sys_data_connected_h.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_data_connected_h.png
similarity index 100%
rename from core/res/res/drawable-mdpi/stat_sys_data_connected_h.png
rename to packages/SystemUI/res/drawable-mdpi/stat_sys_data_connected_h.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/stat_sys_data_in_1x.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_data_in_1x.png
similarity index 100%
rename from core/res/res/drawable-mdpi/stat_sys_data_in_1x.png
rename to packages/SystemUI/res/drawable-mdpi/stat_sys_data_in_1x.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/stat_sys_data_in_3g.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_data_in_3g.png
similarity index 100%
rename from core/res/res/drawable-mdpi/stat_sys_data_in_3g.png
rename to packages/SystemUI/res/drawable-mdpi/stat_sys_data_in_3g.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/stat_sys_data_in_e.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_data_in_e.png
similarity index 100%
rename from core/res/res/drawable-mdpi/stat_sys_data_in_e.png
rename to packages/SystemUI/res/drawable-mdpi/stat_sys_data_in_e.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/stat_sys_data_in_g.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_data_in_g.png
similarity index 100%
rename from core/res/res/drawable-mdpi/stat_sys_data_in_g.png
rename to packages/SystemUI/res/drawable-mdpi/stat_sys_data_in_g.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/stat_sys_data_in_h.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_data_in_h.png
similarity index 100%
rename from core/res/res/drawable-mdpi/stat_sys_data_in_h.png
rename to packages/SystemUI/res/drawable-mdpi/stat_sys_data_in_h.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/stat_sys_data_inandout_1x.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_data_inandout_1x.png
similarity index 100%
rename from core/res/res/drawable-mdpi/stat_sys_data_inandout_1x.png
rename to packages/SystemUI/res/drawable-mdpi/stat_sys_data_inandout_1x.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/stat_sys_data_inandout_3g.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_data_inandout_3g.png
similarity index 100%
rename from core/res/res/drawable-mdpi/stat_sys_data_inandout_3g.png
rename to packages/SystemUI/res/drawable-mdpi/stat_sys_data_inandout_3g.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/stat_sys_data_inandout_e.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_data_inandout_e.png
similarity index 100%
rename from core/res/res/drawable-mdpi/stat_sys_data_inandout_e.png
rename to packages/SystemUI/res/drawable-mdpi/stat_sys_data_inandout_e.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/stat_sys_data_inandout_g.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_data_inandout_g.png
similarity index 100%
rename from core/res/res/drawable-mdpi/stat_sys_data_inandout_g.png
rename to packages/SystemUI/res/drawable-mdpi/stat_sys_data_inandout_g.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/stat_sys_data_inandout_h.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_data_inandout_h.png
similarity index 100%
rename from core/res/res/drawable-mdpi/stat_sys_data_inandout_h.png
rename to packages/SystemUI/res/drawable-mdpi/stat_sys_data_inandout_h.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/stat_sys_data_out_1x.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_data_out_1x.png
similarity index 100%
rename from core/res/res/drawable-mdpi/stat_sys_data_out_1x.png
rename to packages/SystemUI/res/drawable-mdpi/stat_sys_data_out_1x.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/stat_sys_data_out_3g.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_data_out_3g.png
similarity index 100%
rename from core/res/res/drawable-mdpi/stat_sys_data_out_3g.png
rename to packages/SystemUI/res/drawable-mdpi/stat_sys_data_out_3g.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/stat_sys_data_out_e.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_data_out_e.png
similarity index 100%
rename from core/res/res/drawable-mdpi/stat_sys_data_out_e.png
rename to packages/SystemUI/res/drawable-mdpi/stat_sys_data_out_e.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/stat_sys_data_out_g.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_data_out_g.png
similarity index 100%
rename from core/res/res/drawable-mdpi/stat_sys_data_out_g.png
rename to packages/SystemUI/res/drawable-mdpi/stat_sys_data_out_g.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/stat_sys_data_out_h.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_data_out_h.png
similarity index 100%
rename from core/res/res/drawable-mdpi/stat_sys_data_out_h.png
rename to packages/SystemUI/res/drawable-mdpi/stat_sys_data_out_h.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/stat_sys_gps_acquiring.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_gps_acquiring.png
similarity index 100%
rename from core/res/res/drawable-mdpi/stat_sys_gps_acquiring.png
rename to packages/SystemUI/res/drawable-mdpi/stat_sys_gps_acquiring.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/stat_sys_no_sim.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_no_sim.png
similarity index 100%
rename from core/res/res/drawable-mdpi/stat_sys_no_sim.png
rename to packages/SystemUI/res/drawable-mdpi/stat_sys_no_sim.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/stat_sys_r_signal_0.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_r_signal_0.png
similarity index 100%
rename from core/res/res/drawable-mdpi/stat_sys_r_signal_0.png
rename to packages/SystemUI/res/drawable-mdpi/stat_sys_r_signal_0.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/stat_sys_r_signal_1.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_r_signal_1.png
similarity index 100%
rename from core/res/res/drawable-mdpi/stat_sys_r_signal_1.png
rename to packages/SystemUI/res/drawable-mdpi/stat_sys_r_signal_1.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/stat_sys_r_signal_2.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_r_signal_2.png
similarity index 100%
rename from core/res/res/drawable-mdpi/stat_sys_r_signal_2.png
rename to packages/SystemUI/res/drawable-mdpi/stat_sys_r_signal_2.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/stat_sys_r_signal_3.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_r_signal_3.png
similarity index 100%
rename from core/res/res/drawable-mdpi/stat_sys_r_signal_3.png
rename to packages/SystemUI/res/drawable-mdpi/stat_sys_r_signal_3.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/stat_sys_r_signal_4.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_r_signal_4.png
similarity index 100%
rename from core/res/res/drawable-mdpi/stat_sys_r_signal_4.png
rename to packages/SystemUI/res/drawable-mdpi/stat_sys_r_signal_4.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/stat_sys_ringer_silent.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_ringer_silent.png
similarity index 100%
rename from core/res/res/drawable-mdpi/stat_sys_ringer_silent.png
rename to packages/SystemUI/res/drawable-mdpi/stat_sys_ringer_silent.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/stat_sys_ringer_vibrate.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_ringer_vibrate.png
similarity index 100%
rename from core/res/res/drawable-mdpi/stat_sys_ringer_vibrate.png
rename to packages/SystemUI/res/drawable-mdpi/stat_sys_ringer_vibrate.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/stat_sys_roaming_cdma_0.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_roaming_cdma_0.png
similarity index 100%
rename from core/res/res/drawable-mdpi/stat_sys_roaming_cdma_0.png
rename to packages/SystemUI/res/drawable-mdpi/stat_sys_roaming_cdma_0.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/stat_sys_roaming_cdma_flash_anim0.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_roaming_cdma_flash_anim0.png
similarity index 100%
rename from core/res/res/drawable-mdpi/stat_sys_roaming_cdma_flash_anim0.png
rename to packages/SystemUI/res/drawable-mdpi/stat_sys_roaming_cdma_flash_anim0.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/stat_sys_roaming_cdma_flash_anim1.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_roaming_cdma_flash_anim1.png
similarity index 100%
rename from core/res/res/drawable-mdpi/stat_sys_roaming_cdma_flash_anim1.png
rename to packages/SystemUI/res/drawable-mdpi/stat_sys_roaming_cdma_flash_anim1.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/stat_sys_signal_0.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_0.png
similarity index 100%
rename from core/res/res/drawable-mdpi/stat_sys_signal_0.png
rename to packages/SystemUI/res/drawable-mdpi/stat_sys_signal_0.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/stat_sys_signal_1.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_1.png
similarity index 100%
rename from core/res/res/drawable-mdpi/stat_sys_signal_1.png
rename to packages/SystemUI/res/drawable-mdpi/stat_sys_signal_1.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/stat_sys_signal_2.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_2.png
similarity index 100%
rename from core/res/res/drawable-mdpi/stat_sys_signal_2.png
rename to packages/SystemUI/res/drawable-mdpi/stat_sys_signal_2.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/stat_sys_signal_3.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_3.png
similarity index 100%
rename from core/res/res/drawable-mdpi/stat_sys_signal_3.png
rename to packages/SystemUI/res/drawable-mdpi/stat_sys_signal_3.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/stat_sys_signal_4.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_4.png
similarity index 100%
rename from core/res/res/drawable-mdpi/stat_sys_signal_4.png
rename to packages/SystemUI/res/drawable-mdpi/stat_sys_signal_4.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/stat_sys_signal_flightmode.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_flightmode.png
similarity index 100%
rename from core/res/res/drawable-mdpi/stat_sys_signal_flightmode.png
rename to packages/SystemUI/res/drawable-mdpi/stat_sys_signal_flightmode.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/stat_sys_signal_null.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_null.png
similarity index 100%
rename from core/res/res/drawable-mdpi/stat_sys_signal_null.png
rename to packages/SystemUI/res/drawable-mdpi/stat_sys_signal_null.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/stat_sys_tty_mode.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_tty_mode.png
similarity index 100%
rename from core/res/res/drawable-mdpi/stat_sys_tty_mode.png
rename to packages/SystemUI/res/drawable-mdpi/stat_sys_tty_mode.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/stat_sys_wifi_signal_0.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_wifi_signal_0.png
similarity index 100%
rename from core/res/res/drawable-mdpi/stat_sys_wifi_signal_0.png
rename to packages/SystemUI/res/drawable-mdpi/stat_sys_wifi_signal_0.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/stat_sys_wifi_signal_1.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_wifi_signal_1.png
similarity index 100%
rename from core/res/res/drawable-mdpi/stat_sys_wifi_signal_1.png
rename to packages/SystemUI/res/drawable-mdpi/stat_sys_wifi_signal_1.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/stat_sys_wifi_signal_2.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_wifi_signal_2.png
similarity index 100%
rename from core/res/res/drawable-mdpi/stat_sys_wifi_signal_2.png
rename to packages/SystemUI/res/drawable-mdpi/stat_sys_wifi_signal_2.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/stat_sys_wifi_signal_3.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_wifi_signal_3.png
similarity index 100%
rename from core/res/res/drawable-mdpi/stat_sys_wifi_signal_3.png
rename to packages/SystemUI/res/drawable-mdpi/stat_sys_wifi_signal_3.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/stat_sys_wifi_signal_4.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_wifi_signal_4.png
similarity index 100%
rename from core/res/res/drawable-mdpi/stat_sys_wifi_signal_4.png
rename to packages/SystemUI/res/drawable-mdpi/stat_sys_wifi_signal_4.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/status_bar_background.9.png b/packages/SystemUI/res/drawable-mdpi/status_bar_background.9.png
new file mode 100644
index 0000000..eb7c1a4
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/status_bar_background.9.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/status_bar_item_app_background_normal.9.png b/packages/SystemUI/res/drawable-mdpi/status_bar_item_app_background_normal.9.png
new file mode 100644
index 0000000..c079615
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/status_bar_item_app_background_normal.9.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/title_bar_portrait.9.png b/packages/SystemUI/res/drawable-mdpi/title_bar_portrait.9.png
new file mode 100644
index 0000000..13b18d8
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/title_bar_portrait.9.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/title_bar_shadow.9.png b/packages/SystemUI/res/drawable-mdpi/title_bar_shadow.9.png
new file mode 100644
index 0000000..dbcefee
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/title_bar_shadow.9.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable/alert_bar_background.xml b/packages/SystemUI/res/drawable/alert_bar_background.xml
new file mode 100644
index 0000000..24b6aa3
--- /dev/null
+++ b/packages/SystemUI/res/drawable/alert_bar_background.xml
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2008 The Android Open Source Project
+
+     Licensed under the Apache License, Version 2.0 (the "License");
+     you may not use this file except in compliance with the License.
+     You may obtain a copy of the License at
+
+          http://www.apache.org/licenses/LICENSE-2.0
+
+     Unless required by applicable law or agreed to in writing, software
+     distributed under the License is distributed on an "AS IS" BASIS,
+     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     See the License for the specific language governing permissions and
+     limitations under the License.
+-->
+
+<selector xmlns:android="http://schemas.android.com/apk/res/android">
+    <item android:state_pressed="true" 
+        android:drawable="@drawable/alert_bar_background_pressed" />
+    <item
+         android:drawable="@drawable/alert_bar_background_normal" />
+</selector>
+
diff --git a/packages/SystemUI/res/drawable/btn_default_small.xml b/packages/SystemUI/res/drawable/btn_default_small.xml
new file mode 100644
index 0000000..5485ea0
--- /dev/null
+++ b/packages/SystemUI/res/drawable/btn_default_small.xml
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2008 The Android Open Source Project
+
+     Licensed under the Apache License, Version 2.0 (the "License");
+     you may not use this file except in compliance with the License.
+     You may obtain a copy of the License at
+
+          http://www.apache.org/licenses/LICENSE-2.0
+
+     Unless required by applicable law or agreed to in writing, software
+     distributed under the License is distributed on an "AS IS" BASIS,
+     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     See the License for the specific language governing permissions and
+     limitations under the License.
+-->
+
+<selector xmlns:android="http://schemas.android.com/apk/res/android">
+    <item android:state_window_focused="false" android:state_enabled="true"
+        android:drawable="@drawable/btn_default_small_normal" />
+    <item android:state_window_focused="false" android:state_enabled="false"
+        android:drawable="@drawable/btn_default_small_normal_disable" />
+    <item android:state_pressed="true" 
+        android:drawable="@drawable/btn_default_small_pressed" />
+    <item android:state_focused="true" android:state_enabled="true"
+        android:drawable="@drawable/btn_default_small_selected" />
+    <item android:state_enabled="true"
+        android:drawable="@drawable/btn_default_small_normal" />
+    <item android:state_focused="true"
+        android:drawable="@drawable/btn_default_small_normal_disable_focused" />
+    <item
+         android:drawable="@drawable/btn_default_small_normal_disable" />
+</selector>
+
diff --git a/packages/SystemUI/res/drawable/stat_sys_gps_acquiring_anim.xml b/packages/SystemUI/res/drawable/stat_sys_gps_acquiring_anim.xml
new file mode 100644
index 0000000..393697c
--- /dev/null
+++ b/packages/SystemUI/res/drawable/stat_sys_gps_acquiring_anim.xml
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/*
+**
+** Copyright 2008, The Android Open Source Project
+**
+** Licensed under the Apache License, Version 2.0 (the "License");
+** you may not use this file except in compliance with the License.
+** You may obtain a copy of the License at
+**
+**     http://www.apache.org/licenses/LICENSE-2.0
+**
+** Unless required by applicable law or agreed to in writing, software
+** distributed under the License is distributed on an "AS IS" BASIS,
+** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+** See the License for the specific language governing permissions and
+** limitations under the License.
+*/
+-->
+<animation-list
+        xmlns:android="http://schemas.android.com/apk/res/android"
+        android:oneshot="false">
+    <item android:drawable="@drawable/stat_sys_gps_acquiring" android:duration="500" />
+    <item android:drawable="@*android:drawable/stat_sys_gps_on" android:duration="500" />
+</animation-list>
diff --git a/core/res/res/drawable/stat_sys_roaming_cdma_flash.xml b/packages/SystemUI/res/drawable/stat_sys_roaming_cdma_flash.xml
similarity index 100%
rename from core/res/res/drawable/stat_sys_roaming_cdma_flash.xml
rename to packages/SystemUI/res/drawable/stat_sys_roaming_cdma_flash.xml
diff --git a/core/res/res/layout/battery_low.xml b/packages/SystemUI/res/layout/battery_low.xml
similarity index 100%
rename from core/res/res/layout/battery_low.xml
rename to packages/SystemUI/res/layout/battery_low.xml
diff --git a/packages/SystemUI/res/layout/intruder_alert.xml b/packages/SystemUI/res/layout/intruder_alert.xml
new file mode 100644
index 0000000..ba4a774
--- /dev/null
+++ b/packages/SystemUI/res/layout/intruder_alert.xml
@@ -0,0 +1,58 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/* apps/common/assets/default/default/skins/StatusBar.xml
+**
+** Copyright 2006, The Android Open Source Project
+**
+** Licensed under the Apache License, Version 2.0 (the "License"); 
+** you may not use this file except in compliance with the License. 
+** You may obtain a copy of the License at 
+**
+**     http://www.apache.org/licenses/LICENSE-2.0 
+**
+** Unless required by applicable law or agreed to in writing, software 
+** distributed under the License is distributed on an "AS IS" BASIS, 
+** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 
+** See the License for the specific language governing permissions and 
+** limitations under the License.
+*/
+-->
+
+<!--    android:background="@drawable/status_bar_closed_default_background" -->
+<FrameLayout
+    xmlns:android="http://schemas.android.com/apk/res/android"
+    android:layout_height="32dip"
+    android:layout_width="match_parent"
+    android:paddingLeft="8dip"
+    android:paddingRight="8dip"
+    >
+        
+    <LinearLayout 
+        android:id="@+id/intruder_alert_content"
+        android:layout_width="match_parent"
+        android:layout_height="match_parent"
+        android:gravity="center"
+        android:animationCache="false"
+        android:orientation="horizontal"
+        android:background="@drawable/alert_bar_background"
+        android:clickable="true"
+        android:focusable="true"
+        android:descendantFocusability="afterDescendants"
+        >
+
+        <ImageView
+            android:id="@+id/alertIcon"
+            android:layout_width="25dip"
+            android:layout_height="25dip"
+            android:layout_marginLeft="6dip"
+            android:layout_marginRight="8dip"
+            />
+        <TextView
+            android:id="@+id/alertText"
+            android:textAppearance="@style/TextAppearance.StatusBar.IntruderAlert"
+            android:layout_width="match_parent"
+            android:layout_height="wrap_content"
+            android:singleLine="true"
+            />
+    </LinearLayout>
+</FrameLayout>
diff --git a/packages/SystemUI/res/layout/status_bar.xml b/packages/SystemUI/res/layout/status_bar.xml
new file mode 100644
index 0000000..5fe8e79
--- /dev/null
+++ b/packages/SystemUI/res/layout/status_bar.xml
@@ -0,0 +1,115 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/* apps/common/assets/default/default/skins/StatusBar.xml
+**
+** Copyright 2006, The Android Open Source Project
+**
+** Licensed under the Apache License, Version 2.0 (the "License"); 
+** you may not use this file except in compliance with the License. 
+** You may obtain a copy of the License at 
+**
+**     http://www.apache.org/licenses/LICENSE-2.0 
+**
+** Unless required by applicable law or agreed to in writing, software 
+** distributed under the License is distributed on an "AS IS" BASIS, 
+** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 
+** See the License for the specific language governing permissions and 
+** limitations under the License.
+*/
+-->
+
+<!--    android:background="@drawable/status_bar_closed_default_background" -->
+<com.android.systemui.statusbar.StatusBarView
+    xmlns:android="http://schemas.android.com/apk/res/android"
+    android:background="@drawable/status_bar_background"
+    android:orientation="vertical"
+    android:focusable="true"
+    android:descendantFocusability="afterDescendants"
+    >
+
+    <LinearLayout android:id="@+id/icons"
+        android:layout_width="match_parent"
+        android:layout_height="match_parent"
+        android:orientation="horizontal">
+            
+        <com.android.systemui.statusbar.IconMerger android:id="@+id/notificationIcons"
+            android:layout_width="0dip"
+            android:layout_weight="1"
+            android:layout_height="match_parent"
+            android:layout_alignParentLeft="true"
+            android:paddingLeft="6dip"
+            android:gravity="center_vertical"
+            android:orientation="horizontal"/>  
+            
+        <LinearLayout android:id="@+id/statusIcons"
+            android:layout_width="wrap_content"
+            android:layout_height="match_parent"
+            android:layout_alignParentRight="true"
+            android:paddingRight="6dip"
+            android:gravity="center_vertical"
+            android:orientation="horizontal"/>    
+
+        <com.android.systemui.statusbar.Clock
+            android:textAppearance="@*android:style/TextAppearance.StatusBar.Icon"
+            android:layout_width="wrap_content"
+            android:layout_height="match_parent"
+            android:singleLine="true"
+            android:paddingRight="6dip"
+            android:textSize="16sp"
+            android:textStyle="bold"
+            android:gravity="center_vertical|left"
+            />
+    </LinearLayout>
+        
+    <LinearLayout android:id="@+id/ticker"
+        android:layout_width="match_parent"
+        android:layout_height="match_parent"
+        android:paddingLeft="6dip"
+        android:animationCache="false"
+        android:orientation="horizontal" >
+        <ImageSwitcher android:id="@+id/tickerIcon"
+            android:layout_width="wrap_content"
+            android:layout_height="match_parent"
+            android:layout_marginRight="8dip"
+            >
+            <com.android.systemui.statusbar.AnimatedImageView
+                android:layout_width="25dip"
+                android:layout_height="25dip"
+                />
+            <com.android.systemui.statusbar.AnimatedImageView
+                android:layout_width="25dip"
+                android:layout_height="25dip"
+                />
+        </ImageSwitcher>
+        <com.android.systemui.statusbar.TickerView android:id="@+id/tickerText"
+            android:layout_width="0dip"
+            android:layout_weight="1"
+            android:layout_height="wrap_content"
+            android:paddingTop="2dip"
+            android:paddingRight="10dip">
+            <TextView
+                android:textAppearance="@*android:style/TextAppearance.StatusBar.Ticker"
+                android:layout_width="match_parent"
+                android:layout_height="wrap_content"
+                android:singleLine="true"
+                />
+            <TextView
+                android:textAppearance="@*android:style/TextAppearance.StatusBar.Ticker"
+                android:layout_width="match_parent"
+                android:layout_height="wrap_content"
+                android:singleLine="true"
+                />
+        </com.android.systemui.statusbar.TickerView>
+    </LinearLayout>
+
+    <com.android.systemui.statusbar.DateView android:id="@+id/date"
+        android:textAppearance="@*android:style/TextAppearance.StatusBar.Icon"
+        android:layout_width="wrap_content"
+        android:layout_height="match_parent"
+        android:singleLine="true"
+        android:gravity="center_vertical|left"
+        android:paddingLeft="6px"
+        android:paddingRight="6px"
+        android:background="@drawable/status_bar_background"
+        />
+</com.android.systemui.statusbar.StatusBarView>
diff --git a/packages/SystemUI/res/layout/status_bar_expanded.xml b/packages/SystemUI/res/layout/status_bar_expanded.xml
new file mode 100644
index 0000000..b5b1b50
--- /dev/null
+++ b/packages/SystemUI/res/layout/status_bar_expanded.xml
@@ -0,0 +1,129 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/* apps/common/assets/default/default/skins/StatusBar.xml
+**
+** Copyright 2006, The Android Open Source Project
+**
+** Licensed under the Apache License, Version 2.0 (the "License"); 
+** you may not use this file except in compliance with the License. 
+** You may obtain a copy of the License at 
+**
+**     http://www.apache.org/licenses/LICENSE-2.0 
+**
+** Unless required by applicable law or agreed to in writing, software 
+** distributed under the License is distributed on an "AS IS" BASIS, 
+** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 
+** See the License for the specific language governing permissions and 
+** limitations under the License.
+*/
+-->
+
+<com.android.systemui.statusbar.ExpandedView xmlns:android="http://schemas.android.com/apk/res/android"
+    android:orientation="vertical"
+    android:focusable="true"
+    android:descendantFocusability="afterDescendants"
+    >
+
+    <LinearLayout
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:orientation="horizontal"
+        android:paddingTop="3dp"
+        android:paddingBottom="5dp"
+        android:paddingRight="3dp"
+        android:background="@drawable/shade_header_background"
+        >
+        <com.android.systemui.statusbar.CarrierLabel
+            android:layout_width="0dp"
+            android:layout_height="wrap_content"
+            android:layout_weight="1"
+            android:layout_marginTop="1dp"
+            android:layout_marginLeft="5dp"
+            android:layout_gravity="center_vertical"
+            android:paddingBottom="1dp"
+            android:paddingLeft="4dp"
+            android:textAppearance="?android:attr/textAppearanceLarge"
+            android:textColor="?android:attr/textColorSecondary"
+            />
+        <TextView android:id="@+id/clear_all_button"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:layout_gravity="center_vertical"
+            android:layout_marginTop="4dp"
+            android:layout_marginBottom="1dp"
+            android:textSize="14sp"
+            android:textColor="#ff000000"
+            android:text="@string/status_bar_clear_all_button"
+            style="?android:attr/buttonStyle"
+            android:paddingLeft="15dp"
+            android:paddingRight="15dp"
+            android:background="@drawable/btn_default_small"
+            />
+    </LinearLayout>
+
+    <FrameLayout
+        android:layout_width="match_parent" 
+        android:layout_height="wrap_content"
+        android:layout_weight="1"
+        >
+        <ScrollView
+            android:id="@+id/scroll"
+            android:layout_width="match_parent"
+            android:layout_height="match_parent"
+            android:fadingEdge="none"
+            >
+            <com.android.systemui.statusbar.NotificationLinearLayout
+                android:id="@+id/notificationLinearLayout"
+                android:layout_width="match_parent"
+                android:layout_height="wrap_content"
+                android:orientation="vertical"
+                >
+                
+                <TextView android:id="@+id/noNotificationsTitle"
+                    android:layout_width="match_parent"
+                    android:layout_height="wrap_content"
+                    android:background="@drawable/title_bar_portrait"
+                    android:paddingLeft="5dp"
+                    android:textAppearance="@style/TextAppearance.StatusBar.Title"
+                    android:text="@string/status_bar_no_notifications_title"
+                    />
+
+                <TextView android:id="@+id/ongoingTitle"
+                    android:layout_width="match_parent"
+                    android:layout_height="wrap_content"
+                    android:background="@drawable/title_bar_portrait"
+                    android:paddingLeft="5dp"
+                    android:textAppearance="@style/TextAppearance.StatusBar.Title"
+                    android:text="@string/status_bar_ongoing_events_title"
+                    />
+                <LinearLayout android:id="@+id/ongoingItems"
+                    android:layout_width="match_parent"
+                    android:layout_height="wrap_content"
+                    android:orientation="vertical"
+                    />
+
+                <TextView android:id="@+id/latestTitle"
+                    android:layout_width="match_parent"
+                    android:layout_height="wrap_content"
+                    android:background="@drawable/title_bar_portrait"
+                    android:paddingLeft="5dp"
+                    android:textAppearance="@style/TextAppearance.StatusBar.Title"
+                    android:text="@string/status_bar_latest_events_title"
+                    />
+                <LinearLayout android:id="@+id/latestItems"
+                    android:layout_width="match_parent"
+                    android:layout_height="wrap_content"
+                    android:orientation="vertical"
+                    />
+            </com.android.systemui.statusbar.NotificationLinearLayout>
+        </ScrollView>
+
+        <ImageView
+            android:layout_width="match_parent"
+            android:layout_height="match_parent"
+            android:src="@drawable/title_bar_shadow"
+            android:scaleType="fitXY"
+        />
+
+    </FrameLayout>
+</com.android.systemui.statusbar.ExpandedView>
diff --git a/packages/SystemUI/res/layout/status_bar_icon.xml b/packages/SystemUI/res/layout/status_bar_icon.xml
new file mode 100644
index 0000000..21d606f
--- /dev/null
+++ b/packages/SystemUI/res/layout/status_bar_icon.xml
@@ -0,0 +1,46 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/* apps/common/assets/default/default/skins/StatusBar.xml
+**
+** Copyright 2006, The Android Open Source Project
+**
+** Licensed under the Apache License, Version 2.0 (the "License"); 
+** you may not use this file except in compliance with the License. 
+** You may obtain a copy of the License at 
+**
+**     http://www.apache.org/licenses/LICENSE-2.0 
+**
+** Unless required by applicable law or agreed to in writing, software 
+** distributed under the License is distributed on an "AS IS" BASIS, 
+** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 
+** See the License for the specific language governing permissions and 
+** limitations under the License.
+*/
+-->
+
+<!-- The icons are a fixed size so an app can't mess everything up with bogus images -->
+<!-- TODO: the icons are hard coded to 25x25 pixels.  Their size should come froem a theme -->
+<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android" 
+    android:layout_width="25dp" 
+    android:layout_height="25dp"
+    >
+
+    <com.android.systemui.statusbar.AnimatedImageView android:id="@+id/image"
+        android:layout_width="match_parent" 
+        android:layout_height="match_parent"
+        />
+
+    <TextView android:id="@+id/number"
+        android:layout_width="wrap_content" 
+        android:layout_height="wrap_content"
+        android:layout_gravity="right|bottom"
+        android:layout_marginRight="1dp"
+        android:layout_marginBottom="1dp"
+        android:textSize="10sp"
+        android:textColor="#ffffffff"
+        android:background="@drawable/ic_notification_overlay"
+        android:gravity="center"
+        android:textStyle="bold"
+        />
+
+</FrameLayout>
diff --git a/packages/SystemUI/res/layout/status_bar_latest_event.xml b/packages/SystemUI/res/layout/status_bar_latest_event.xml
new file mode 100644
index 0000000..88d9739
--- /dev/null
+++ b/packages/SystemUI/res/layout/status_bar_latest_event.xml
@@ -0,0 +1,24 @@
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    android:layout_width="match_parent"
+    android:layout_height="65sp"
+    android:orientation="vertical"
+    >
+
+    <com.android.systemui.statusbar.LatestItemView android:id="@+id/content"
+            android:layout_width="match_parent"
+            android:layout_height="64sp"
+            android:background="@android:drawable/status_bar_item_background"
+            android:focusable="true"
+            android:clickable="true"
+            android:paddingRight="6sp"
+            >
+    </com.android.systemui.statusbar.LatestItemView>
+
+    <View
+        android:layout_width="match_parent"
+        android:layout_height="1sp"
+        android:background="@android:drawable/divider_horizontal_bright"
+        />
+
+</LinearLayout>
+
diff --git a/packages/SystemUI/res/layout/status_bar_tracking.xml b/packages/SystemUI/res/layout/status_bar_tracking.xml
new file mode 100644
index 0000000..a2b40e6
--- /dev/null
+++ b/packages/SystemUI/res/layout/status_bar_tracking.xml
@@ -0,0 +1,50 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+    Copyright (C) 2008 The Android Open Source Project
+
+    Licensed under the Apache License, Version 2.0 (the "License");
+    you may not use this file except in compliance with the License.
+    You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing, software
+    distributed under the License is distributed on an "AS IS" BASIS,
+    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+    See the License for the specific language governing permissions and
+    limitations under the License.
+-->
+
+<com.android.systemui.statusbar.TrackingView
+    xmlns:android="http://schemas.android.com/apk/res/android"
+    android:orientation="vertical"
+    android:visibility="gone"
+    android:focusable="true"
+    android:descendantFocusability="afterDescendants"
+    android:paddingBottom="0px"
+    android:paddingLeft="0px"
+    android:paddingRight="0px"
+    >
+
+    <com.android.systemui.statusbar.TrackingPatternView
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:layout_weight="1"
+        />
+
+    <com.android.systemui.statusbar.CloseDragHandle android:id="@+id/close"
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:orientation="vertical"
+        >
+        <ImageView
+            android:layout_width="match_parent"
+            android:layout_height="wrap_content"
+            android:layout_gravity="bottom"
+            android:scaleType="fitXY"
+            android:src="@drawable/shade_handlebar"
+            />
+
+    </com.android.systemui.statusbar.CloseDragHandle>
+
+</com.android.systemui.statusbar.TrackingView>
diff --git a/packages/SystemUI/res/values/config.xml b/packages/SystemUI/res/values/config.xml
new file mode 100644
index 0000000..8ea46e5
--- /dev/null
+++ b/packages/SystemUI/res/values/config.xml
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/*
+** Copyright 2009, The Android Open Source Project
+**
+** Licensed under the Apache License, Version 2.0 (the "License"); 
+** you may not use this file except in compliance with the License. 
+** You may obtain a copy of the License at 
+**
+**     http://www.apache.org/licenses/LICENSE-2.0 
+**
+** Unless required by applicable law or agreed to in writing, software 
+** distributed under the License is distributed on an "AS IS" BASIS, 
+** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 
+** See the License for the specific language governing permissions and 
+** limitations under the License.
+*/
+-->
+
+<!-- These resources are around just to allow their values to be customized
+     for different hardware and product builds. -->
+<resources>
+    <!-- Control whether status bar should distinguish HSPA data icon form UMTS data icon on devices -->
+    <bool name="config_hspa_data_distinguishable">false</bool>
+</resources>
+
diff --git a/packages/SystemUI/res/values/defaults.xml b/packages/SystemUI/res/values/defaults.xml
new file mode 100644
index 0000000..34302c4
--- /dev/null
+++ b/packages/SystemUI/res/values/defaults.xml
@@ -0,0 +1,78 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/**
+ * Copyright (c) 2009, The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License"); 
+ * you may not use this file except in compliance with the License. 
+ * You may obtain a copy of the License at 
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0 
+ *
+ * Unless required by applicable law or agreed to in writing, software 
+ * distributed under the License is distributed on an "AS IS" BASIS, 
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 
+ * See the License for the specific language governing permissions and 
+ * limitations under the License.
+ */
+-->
+<resources>
+    <bool name="def_dim_screen">true</bool>
+    <integer name="def_screen_off_timeout">60000</integer>
+    <bool name="def_airplane_mode_on">false</bool>
+    <!-- Comma-separated list of bluetooth, wifi, and cell. -->
+    <string name="def_airplane_mode_radios" translatable="false">cell,bluetooth,wifi</string>
+    <string name="airplane_mode_toggleable_radios" translatable="false">wifi</string>
+    <bool name="def_auto_time">true</bool>
+    <bool name="def_accelerometer_rotation">true</bool>
+    <!-- Default screen brightness, from 0 to 255.  102 is 40%. -->
+    <integer name="def_screen_brightness">102</integer>
+    <bool name="def_screen_brightness_automatic_mode">false</bool>
+    <fraction name="def_window_animation_scale">100%</fraction>
+    <fraction name="def_window_transition_scale">100%</fraction>
+    <bool name="def_haptic_feedback">true</bool>
+    
+    <bool name="def_bluetooth_on">false</bool>
+    <bool name="def_install_non_market_apps">false</bool>
+    <!-- Comma-separated list of location providers. 
+         Network location is off by default because it requires
+         user opt-in via Setup Wizard or Settings.  
+    -->
+    <string name="def_location_providers_allowed" translatable="false">gps</string>
+    <bool name="assisted_gps_enabled">true</bool>
+    <!--  0 == mobile, 1 == wifi. -->
+    <integer name="def_network_preference">1</integer>
+    <bool name="def_usb_mass_storage_enabled">true</bool>
+    <bool name="def_wifi_on">false</bool>
+    <bool name="def_networks_available_notification_on">true</bool>
+    
+    <bool name="def_backup_enabled">false</bool>
+    <string name="def_backup_transport" translatable="false"></string>
+    <!-- Default value for whether or not to pulse the notification LED when there is a 
+         pending notification -->
+    <bool name="def_notification_pulse">true</bool>
+
+    <bool name="def_mount_play_notification_snd">true</bool>
+    <bool name="def_mount_ums_autostart">false</bool>
+    <bool name="def_mount_ums_prompt">true</bool>
+    <bool name="def_mount_ums_notify_enabled">true</bool>
+    <!-- Enable User preference for setting install location -->
+    <bool name="set_install_location">true</bool>
+    <!-- Default install location if user preference for setting install location is turned on. -->
+    <integer name="def_install_location">2</integer>
+
+    <!-- user interface sound effects -->
+    <integer name="def_power_sounds_enabled">1</integer>
+    <string name="def_low_battery_sound" translatable="false">/system/media/audio/ui/LowBattery.ogg</string>
+    <integer name="def_dock_sounds_enabled">0</integer>
+    <string name="def_desk_dock_sound" translatable="false">/system/media/audio/ui/Dock.ogg</string>
+    <string name="def_desk_undock_sound" translatable="false">/system/media/audio/ui/Undock.ogg</string>
+    <string name="def_car_dock_sound" translatable="false">/system/media/audio/ui/Dock.ogg</string>
+    <string name="def_car_undock_sound" translatable="false">/system/media/audio/ui/Undock.ogg</string>
+    <integer name="def_lockscreen_sounds_enabled">0</integer>
+    <string name="def_lock_sound" translatable="false">/system/media/audio/ui/Lock.ogg</string>
+    <string name="def_unlock_sound" translatable="false">/system/media/audio/ui/Unlock.ogg</string>
+
+    <!-- Default for Settings.System.VIBRATE_IN_SILENT -->
+    <bool name="def_vibrate_in_silent">true</bool>
+</resources>
diff --git a/packages/SystemUI/res/values/dimens.xml b/packages/SystemUI/res/values/dimens.xml
new file mode 100644
index 0000000..93cf377
--- /dev/null
+++ b/packages/SystemUI/res/values/dimens.xml
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ * Copyright (c) 2006, The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License"); 
+ * you may not use this file except in compliance with the License. 
+ * You may obtain a copy of the License at 
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0 
+ *
+ * Unless required by applicable law or agreed to in writing, software 
+ * distributed under the License is distributed on an "AS IS" BASIS, 
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 
+ * See the License for the specific language governing permissions and 
+ * limitations under the License.
+*/
+-->
+<resources>
+    <!-- Margin at the edge of the screen to ignore touch events for in the windowshade. -->
+    <dimen name="status_bar_edge_ignore">5dp</dimen>
+</resources>
+
diff --git a/packages/SystemUI/res/values/strings.xml b/packages/SystemUI/res/values/strings.xml
new file mode 100644
index 0000000..ba3a3d1
--- /dev/null
+++ b/packages/SystemUI/res/values/strings.xml
@@ -0,0 +1,54 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/**
+ * Copyright (c) 2009, The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License"); 
+ * you may not use this file except in compliance with the License. 
+ * You may obtain a copy of the License at 
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0 
+ *
+ * Unless required by applicable law or agreed to in writing, software 
+ * distributed under the License is distributed on an "AS IS" BASIS, 
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 
+ * See the License for the specific language governing permissions and 
+ * limitations under the License.
+ */
+-->
+<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+    <!-- Name of the status bar as seen in the applications info settings page. -->
+    <string name="app_label">Status Bar</string>
+
+    <!-- The text for the button in the notification window-shade that clears
+         all of the currently visible notifications. -->
+    <string name="status_bar_clear_all_button">Clear</string>
+
+    <!-- The label in the bar at the top of the status bar when there are no notifications
+         showing. -->
+    <string name="status_bar_no_notifications_title">No notifications</string>
+
+    <!-- The label for the group of notifications for ongoing events in the opened version of
+         the status bar.  An ongoing call is the prime example of this.  The MP3 music player
+         might be another example.  -->
+    <string name="status_bar_ongoing_events_title">Ongoing</string>
+
+    <!-- The label for the group of notifications for recent events in the opened version of
+         the status bar.  Recently received text messsages (SMS), emails, calendar alerts, etc. -->
+    <string name="status_bar_latest_events_title">Notifications</string>
+
+    <!-- When the battery is low, this is displayed to the user in a dialog.  The title of the low battery alert. -->
+    <string name="battery_low_title">Please connect charger</string>
+
+    <!-- When the battery is low, this is displayed to the user in a dialog. The subtitle of the low battery alert. -->
+    <string name="battery_low_subtitle">The battery is getting low:</string>
+
+    <!-- A message that appears when the battery level is getting low in a dialog.  This is appened to the subtitle of the low battery alert. -->
+    <string name="battery_low_percent_format"><xliff:g id="number">%d%%</xliff:g>
+    or less remaining.</string>
+
+    <!-- When the battery is low, this is the label of the button to go to the
+         power usage activity to find out what drained the battery. -->
+    <string name="battery_low_why">Battery use</string>
+
+</resources>
diff --git a/packages/SystemUI/res/values/styles.xml b/packages/SystemUI/res/values/styles.xml
new file mode 100644
index 0000000..816f34a4
--- /dev/null
+++ b/packages/SystemUI/res/values/styles.xml
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2006 The Android Open Source Project
+
+     Licensed under the Apache License, Version 2.0 (the "License");
+     you may not use this file except in compliance with the License.
+     You may obtain a copy of the License at
+  
+          http://www.apache.org/licenses/LICENSE-2.0
+  
+     Unless required by applicable law or agreed to in writing, software
+     distributed under the License is distributed on an "AS IS" BASIS,
+     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     See the License for the specific language governing permissions and
+     limitations under the License.
+-->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android">
+
+    <style name="TextAppearance.StatusBar.Title" parent="@android:style/TextAppearance.StatusBar">
+        <item name="android:textAppearance">?android:attr/textAppearanceSmall</item>
+        <item name="android:textStyle">bold</item>
+        <item name="android:textColor">?android:attr/textColorPrimary</item>
+    </style>
+
+    <style name="TextAppearance.StatusBar.IntruderAlert"
+        parent="@android:style/TextAppearance.StatusBar">
+    </style>
+</resources>
diff --git a/packages/SystemUI/res/xml/bookmarks.xml b/packages/SystemUI/res/xml/bookmarks.xml
new file mode 100644
index 0000000..dfaeeaf
--- /dev/null
+++ b/packages/SystemUI/res/xml/bookmarks.xml
@@ -0,0 +1,56 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2007 The Android Open Source Project
+
+     Licensed under the Apache License, Version 2.0 (the "License");
+     you may not use this file except in compliance with the License.
+     You may obtain a copy of the License at
+  
+          http://www.apache.org/licenses/LICENSE-2.0
+  
+     Unless required by applicable law or agreed to in writing, software
+     distributed under the License is distributed on an "AS IS" BASIS,
+     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     See the License for the specific language governing permissions and
+     limitations under the License.
+-->
+
+<bookmarks>
+    <bookmark
+        package="com.android.browser"
+        class="com.android.browser.BrowserActivity"
+        shortcut="b" />
+    <bookmark
+        package="com.android.contacts"
+        class="com.android.contacts.DialtactsContactsEntryActivity"
+        shortcut="c" />
+    <bookmark
+        package="com.android.email"
+        class="com.android.email.activity.Welcome"
+        shortcut="e" />
+    <bookmark
+        package="com.google.android.gm"
+        class="com.google.android.gm.ConversationListActivityGmail"
+        shortcut="g" />
+    <bookmark
+        package="com.android.im"
+        class="com.android.im.app.LandingPage"
+        shortcut="i" />
+    <bookmark
+        package="com.android.calendar"
+        class="com.android.calendar.LaunchActivity"
+        shortcut="l" />
+<!--
+    <bookmark
+        package="com.google.android.apps.maps"
+        class="com.google.android.maps.MapsActivity"
+        shortcut="m" />
+-->
+    <bookmark
+        package="com.android.music"
+        class="com.android.music.MusicBrowserActivity"
+        shortcut="p" />
+    <bookmark
+        package="com.android.mms"
+        class="com.android.mms.ui.ConversationList"
+        shortcut="s" />
+</bookmarks>
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/AnimatedImageView.java b/packages/SystemUI/src/com/android/systemui/statusbar/AnimatedImageView.java
new file mode 100644
index 0000000..70d4d6a
--- /dev/null
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/AnimatedImageView.java
@@ -0,0 +1,85 @@
+/*
+ * Copyright (C) 2008 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.android.systemui.statusbar;
+
+import android.content.Context;
+import android.graphics.drawable.AnimationDrawable;
+import android.graphics.drawable.Drawable;
+import android.util.AttributeSet;
+import android.widget.ImageView;
+import android.widget.RemoteViews.RemoteView;
+
+@RemoteView
+public class AnimatedImageView extends ImageView {
+    AnimationDrawable mAnim;
+    boolean mAttached;
+
+    public AnimatedImageView(Context context) {
+        super(context);
+    }
+
+    public AnimatedImageView(Context context, AttributeSet attrs) {
+        super(context, attrs);
+    }
+
+    private void updateAnim() {
+        Drawable drawable = getDrawable();
+        if (mAttached && mAnim != null) {
+            mAnim.stop();
+        }
+        if (drawable instanceof AnimationDrawable) {
+            mAnim = (AnimationDrawable)drawable;
+            if (mAttached) {
+                mAnim.start();
+            }
+        } else {
+            mAnim = null;
+        }
+    }
+
+    @Override
+    public void setImageDrawable(Drawable drawable) {
+        super.setImageDrawable(drawable);
+        updateAnim();
+    }
+
+    @Override
+    @android.view.RemotableViewMethod
+    public void setImageResource(int resid) {
+        super.setImageResource(resid);
+        updateAnim();
+    }
+
+    @Override
+    public void onAttachedToWindow() {
+        super.onAttachedToWindow();
+        if (mAnim != null) {
+            mAnim.start();
+        }
+        mAttached = true;
+    }
+
+    @Override
+    public void onDetachedFromWindow() {
+        super.onDetachedFromWindow();
+        if (mAnim != null) {
+            mAnim.stop();
+        }
+        mAttached = false;
+    }
+}
+
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/CarrierLabel.java b/packages/SystemUI/src/com/android/systemui/statusbar/CarrierLabel.java
new file mode 100644
index 0000000..d89d093
--- /dev/null
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/CarrierLabel.java
@@ -0,0 +1,117 @@
+/*
+ * Copyright (C) 2006 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.android.systemui.statusbar;
+
+import android.content.BroadcastReceiver;
+import android.content.Context;
+import android.content.Intent;
+import android.content.IntentFilter;
+import android.provider.Telephony;
+import android.util.AttributeSet;
+import android.util.Slog;
+import android.view.View;
+import android.widget.TextView;
+
+import java.text.SimpleDateFormat;
+import java.util.Calendar;
+import java.util.TimeZone;
+
+import com.android.internal.R;
+
+/**
+ * This widget display an analogic clock with two hands for hours and
+ * minutes.
+ */
+public class CarrierLabel extends TextView {
+    private boolean mAttached;
+
+    public CarrierLabel(Context context) {
+        this(context, null);
+    }
+
+    public CarrierLabel(Context context, AttributeSet attrs) {
+        this(context, attrs, 0);
+    }
+
+    public CarrierLabel(Context context, AttributeSet attrs, int defStyle) {
+        super(context, attrs, defStyle);
+        updateNetworkName(false, null, false, null);
+    }
+
+    @Override
+    protected void onAttachedToWindow() {
+        super.onAttachedToWindow();
+
+        if (!mAttached) {
+            mAttached = true;
+            IntentFilter filter = new IntentFilter();
+            filter.addAction(Telephony.Intents.SPN_STRINGS_UPDATED_ACTION);
+            getContext().registerReceiver(mIntentReceiver, filter, null, getHandler());
+        }
+    }
+
+    @Override
+    protected void onDetachedFromWindow() {
+        super.onDetachedFromWindow();
+        if (mAttached) {
+            getContext().unregisterReceiver(mIntentReceiver);
+            mAttached = false;
+        }
+    }
+
+    private final BroadcastReceiver mIntentReceiver = new BroadcastReceiver() {
+        @Override
+        public void onReceive(Context context, Intent intent) {
+            String action = intent.getAction();
+            if (Telephony.Intents.SPN_STRINGS_UPDATED_ACTION.equals(action)) {
+                updateNetworkName(intent.getBooleanExtra(Telephony.Intents.EXTRA_SHOW_SPN, false),
+                        intent.getStringExtra(Telephony.Intents.EXTRA_SPN),
+                        intent.getBooleanExtra(Telephony.Intents.EXTRA_SHOW_PLMN, false),
+                        intent.getStringExtra(Telephony.Intents.EXTRA_PLMN));
+            }
+        }
+    };
+
+    void updateNetworkName(boolean showSpn, String spn, boolean showPlmn, String plmn) {
+        if (false) {
+            Slog.d("CarrierLabel", "updateNetworkName showSpn=" + showSpn + " spn=" + spn
+                    + " showPlmn=" + showPlmn + " plmn=" + plmn);
+        }
+        StringBuilder str = new StringBuilder();
+        boolean something = false;
+        if (showPlmn && plmn != null) {
+            str.append(plmn);
+            something = true;
+        }
+        if (showSpn && spn != null) {
+            if (something) {
+                str.append(' ');
+            }
+            str.append(spn);
+            something = true;
+        }
+        if (something) {
+            setText(str.toString());
+        } else {
+            setText(com.android.internal.R.string.lockscreen_carrier_default);
+        }
+    }
+
+    
+}
+
+
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/Clock.java b/packages/SystemUI/src/com/android/systemui/statusbar/Clock.java
new file mode 100644
index 0000000..9fc8df5
--- /dev/null
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/Clock.java
@@ -0,0 +1,208 @@
+/*
+ * Copyright (C) 2006 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.android.systemui.statusbar;
+
+import android.content.BroadcastReceiver;
+import android.content.Context;
+import android.content.Intent;
+import android.content.IntentFilter;
+import android.content.res.Resources;
+import android.content.res.TypedArray;
+import android.graphics.Canvas;
+import android.graphics.Typeface;
+import android.graphics.drawable.Drawable;
+import android.text.Spannable;
+import android.text.SpannableStringBuilder;
+import android.text.format.DateFormat;
+import android.text.style.CharacterStyle;
+import android.text.style.ForegroundColorSpan;
+import android.text.style.RelativeSizeSpan;
+import android.text.style.RelativeSizeSpan;
+import android.text.style.StyleSpan;
+import android.util.AttributeSet;
+import android.view.View;
+import android.widget.TextView;
+
+import java.text.SimpleDateFormat;
+import java.util.Calendar;
+import java.util.TimeZone;
+
+import com.android.internal.R;
+
+/**
+ * This widget display an analogic clock with two hands for hours and
+ * minutes.
+ */
+public class Clock extends TextView {
+    private boolean mAttached;
+    private Calendar mCalendar;
+    private String mClockFormatString;
+    private SimpleDateFormat mClockFormat;
+
+    private static final int AM_PM_STYLE_NORMAL  = 0;
+    private static final int AM_PM_STYLE_SMALL   = 1;
+    private static final int AM_PM_STYLE_GONE    = 2;
+
+    private static final int AM_PM_STYLE = AM_PM_STYLE_GONE;
+
+    public Clock(Context context) {
+        this(context, null);
+    }
+
+    public Clock(Context context, AttributeSet attrs) {
+        this(context, attrs, 0);
+    }
+
+    public Clock(Context context, AttributeSet attrs, int defStyle) {
+        super(context, attrs, defStyle);
+    }
+
+    @Override
+    protected void onAttachedToWindow() {
+        super.onAttachedToWindow();
+
+        if (!mAttached) {
+            mAttached = true;
+            IntentFilter filter = new IntentFilter();
+
+            filter.addAction(Intent.ACTION_TIME_TICK);
+            filter.addAction(Intent.ACTION_TIME_CHANGED);
+            filter.addAction(Intent.ACTION_TIMEZONE_CHANGED);
+            filter.addAction(Intent.ACTION_CONFIGURATION_CHANGED);
+
+            getContext().registerReceiver(mIntentReceiver, filter, null, getHandler());
+        }
+
+        // NOTE: It's safe to do these after registering the receiver since the receiver always runs
+        // in the main thread, therefore the receiver can't run before this method returns.
+
+        // The time zone may have changed while the receiver wasn't registered, so update the Time
+        mCalendar = Calendar.getInstance(TimeZone.getDefault());
+
+        // Make sure we update to the current time
+        updateClock();
+    }
+
+    @Override
+    protected void onDetachedFromWindow() {
+        super.onDetachedFromWindow();
+        if (mAttached) {
+            getContext().unregisterReceiver(mIntentReceiver);
+            mAttached = false;
+        }
+    }
+
+    private final BroadcastReceiver mIntentReceiver = new BroadcastReceiver() {
+        @Override
+        public void onReceive(Context context, Intent intent) {
+            String action = intent.getAction();
+            if (action.equals(Intent.ACTION_TIMEZONE_CHANGED)) {
+                String tz = intent.getStringExtra("time-zone");
+                mCalendar = Calendar.getInstance(TimeZone.getTimeZone(tz));
+                if (mClockFormat != null) {
+                    mClockFormat.setTimeZone(mCalendar.getTimeZone());
+                }
+            }
+            updateClock();
+        }
+    };
+
+    final void updateClock() {
+        mCalendar.setTimeInMillis(System.currentTimeMillis());
+        setText(getSmallTime());
+    }
+
+    private final CharSequence getSmallTime() {
+        Context context = getContext();
+        boolean b24 = DateFormat.is24HourFormat(context);
+        int res;
+
+        if (b24) {
+            res = R.string.twenty_four_hour_time_format;
+        } else {
+            res = R.string.twelve_hour_time_format;
+        }
+
+        final char MAGIC1 = '\uEF00';
+        final char MAGIC2 = '\uEF01';
+
+        SimpleDateFormat sdf;
+        String format = context.getString(res);
+        if (!format.equals(mClockFormatString)) {
+            /*
+             * Search for an unquoted "a" in the format string, so we can
+             * add dummy characters around it to let us find it again after
+             * formatting and change its size.
+             */
+            if (AM_PM_STYLE != AM_PM_STYLE_NORMAL) {
+                int a = -1;
+                boolean quoted = false;
+                for (int i = 0; i < format.length(); i++) {
+                    char c = format.charAt(i);
+
+                    if (c == '\'') {
+                        quoted = !quoted;
+                    }
+                    if (!quoted && c == 'a') {
+                        a = i;
+                        break;
+                    }
+                }
+
+                if (a >= 0) {
+                    // Move a back so any whitespace before AM/PM is also in the alternate size.
+                    final int b = a;
+                    while (a > 0 && Character.isWhitespace(format.charAt(a-1))) {
+                        a--;
+                    }
+                    format = format.substring(0, a) + MAGIC1 + format.substring(a, b)
+                        + "a" + MAGIC2 + format.substring(b + 1);
+                }
+            }
+
+            mClockFormat = sdf = new SimpleDateFormat(format);
+            mClockFormatString = format;
+        } else {
+            sdf = mClockFormat;
+        }
+        String result = sdf.format(mCalendar.getTime());
+
+        if (AM_PM_STYLE != AM_PM_STYLE_NORMAL) {
+            int magic1 = result.indexOf(MAGIC1);
+            int magic2 = result.indexOf(MAGIC2);
+            if (magic1 >= 0 && magic2 > magic1) {
+                SpannableStringBuilder formatted = new SpannableStringBuilder(result);
+                if (AM_PM_STYLE == AM_PM_STYLE_GONE) {
+                    formatted.delete(magic1, magic2+1);
+                } else {
+                    if (AM_PM_STYLE == AM_PM_STYLE_SMALL) {
+                        CharacterStyle style = new RelativeSizeSpan(0.7f);
+                        formatted.setSpan(style, magic1, magic2,
+                                          Spannable.SPAN_EXCLUSIVE_INCLUSIVE);
+                    }
+                    formatted.delete(magic2, magic2 + 1);
+                    formatted.delete(magic1, magic1 + 1);
+                }
+                return formatted;
+            }
+        }
+ 
+        return result;
+
+    }
+}
+
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/CloseDragHandle.java b/packages/SystemUI/src/com/android/systemui/statusbar/CloseDragHandle.java
new file mode 100644
index 0000000..f45caf51
--- /dev/null
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/CloseDragHandle.java
@@ -0,0 +1,51 @@
+/*
+ * Copyright (C) 2008 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.android.systemui.statusbar;
+
+import android.content.Context;
+import android.util.AttributeSet;
+import android.view.MotionEvent;
+import android.widget.LinearLayout;
+
+
+public class CloseDragHandle extends LinearLayout {
+    StatusBarService mService;
+
+    public CloseDragHandle(Context context, AttributeSet attrs) {
+        super(context, attrs);
+    }
+
+    /**
+     * Ensure that, if there is no target under us to receive the touch,
+     * that we process it ourself.  This makes sure that onInterceptTouchEvent()
+     * is always called for the entire gesture.
+     */
+    @Override
+    public boolean onTouchEvent(MotionEvent event) {
+        if (event.getAction() != MotionEvent.ACTION_DOWN) {
+            mService.interceptTouchEvent(event);
+        }
+        return true;
+    }
+
+    @Override
+    public boolean onInterceptTouchEvent(MotionEvent event) {
+        return mService.interceptTouchEvent(event)
+                ? true : super.onInterceptTouchEvent(event);
+    }
+}
+
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/CommandQueue.java b/packages/SystemUI/src/com/android/systemui/statusbar/CommandQueue.java
new file mode 100644
index 0000000..f9347b1
--- /dev/null
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/CommandQueue.java
@@ -0,0 +1,201 @@
+/*
+ * Copyright (C) 2010 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.android.systemui.statusbar;
+
+import android.os.Handler;
+import android.os.IBinder;
+import android.os.Message;
+
+import com.android.internal.statusbar.IStatusBar;
+import com.android.internal.statusbar.StatusBarIcon;
+import com.android.internal.statusbar.StatusBarIconList;
+import com.android.internal.statusbar.StatusBarNotification;
+
+/**
+ * This class takes the functions from IStatusBar that come in on
+ * binder pool threads and posts messages to get them onto the main
+ * thread, and calls onto Callbacks.  It also takes care of
+ * coalescing these calls so they don't stack up.  For the calls
+ * are coalesced, note that they are all idempotent.
+ */
+class CommandQueue extends IStatusBar.Stub {
+    private static final String TAG = "StatusBar.CommandQueue";
+
+    private static final int MSG_MASK = 0xffff0000;
+    private static final int INDEX_MASK = 0x0000ffff;
+
+    private static final int MSG_ICON = 0x00010000;
+    private static final int OP_SET_ICON = 1;
+    private static final int OP_REMOVE_ICON = 2;
+
+    private static final int MSG_ADD_NOTIFICATION = 0x00020000;
+    private static final int MSG_UPDATE_NOTIFICATION = 0x00030000;
+    private static final int MSG_REMOVE_NOTIFICATION = 0x00040000;
+
+    private static final int MSG_DISABLE = 0x00050000;
+
+    private static final int MSG_SET_VISIBILITY = 0x00060000;
+    private static final int OP_EXPAND = 1;
+    private static final int OP_COLLAPSE = 2;
+
+    private StatusBarIconList mList;
+    private Callbacks mCallbacks;
+    private Handler mHandler = new H();
+
+    private class NotificationQueueEntry {
+        IBinder key;
+        StatusBarNotification notification;
+    }
+
+    /**
+     * These methods are called back on the main thread.
+     */
+    public interface Callbacks {
+        public void addIcon(String slot, int index, int viewIndex, StatusBarIcon icon);
+        public void updateIcon(String slot, int index, int viewIndex,
+                StatusBarIcon old, StatusBarIcon icon);
+        public void removeIcon(String slot, int index, int viewIndex);
+        public void addNotification(IBinder key, StatusBarNotification notification);
+        public void updateNotification(IBinder key, StatusBarNotification notification);
+        public void removeNotification(IBinder key);
+        public void disable(int state);
+        public void animateExpand();
+        public void animateCollapse();
+    }
+
+    public CommandQueue(Callbacks callbacks, StatusBarIconList list) {
+        mCallbacks = callbacks;
+        mList = list;
+    }
+
+    public void setIcon(int index, StatusBarIcon icon) {
+        synchronized (mList) {
+            int what = MSG_ICON | index;
+            mHandler.removeMessages(what);
+            mHandler.obtainMessage(what, OP_SET_ICON, 0, icon.clone()).sendToTarget();
+        }
+    }
+
+    public void removeIcon(int index) {
+        synchronized (mList) {
+            int what = MSG_ICON | index;
+            mHandler.removeMessages(what);
+            mHandler.obtainMessage(what, OP_REMOVE_ICON, 0, null).sendToTarget();
+        }
+    }
+
+    public void addNotification(IBinder key, StatusBarNotification notification) {
+        synchronized (mList) {
+            NotificationQueueEntry ne = new NotificationQueueEntry();
+            ne.key = key;
+            ne.notification = notification;
+            mHandler.obtainMessage(MSG_ADD_NOTIFICATION, 0, 0, ne).sendToTarget();
+        }
+    }
+
+    public void updateNotification(IBinder key, StatusBarNotification notification) {
+        synchronized (mList) {
+            NotificationQueueEntry ne = new NotificationQueueEntry();
+            ne.key = key;
+            ne.notification = notification;
+            mHandler.obtainMessage(MSG_UPDATE_NOTIFICATION, 0, 0, ne).sendToTarget();
+        }
+    }
+
+    public void removeNotification(IBinder key) {
+        synchronized (mList) {
+            mHandler.obtainMessage(MSG_REMOVE_NOTIFICATION, 0, 0, key).sendToTarget();
+        }
+    }
+
+    public void disable(int state) {
+        synchronized (mList) {
+            mHandler.removeMessages(MSG_DISABLE);
+            mHandler.obtainMessage(MSG_DISABLE, state, 0, null).sendToTarget();
+        }
+    }
+
+    public void animateExpand() {
+        synchronized (mList) {
+            mHandler.removeMessages(MSG_SET_VISIBILITY);
+            mHandler.obtainMessage(MSG_SET_VISIBILITY, OP_EXPAND, 0, null).sendToTarget();
+        }
+    }
+
+    public void animateCollapse() {
+        synchronized (mList) {
+            mHandler.removeMessages(MSG_SET_VISIBILITY);
+            mHandler.obtainMessage(MSG_SET_VISIBILITY, OP_COLLAPSE, 0, null).sendToTarget();
+        }
+    }
+
+    private final class H extends Handler {
+        public void handleMessage(Message msg) {
+            final int what = msg.what & MSG_MASK;
+            switch (what) {
+                case MSG_ICON: {
+                    final int index = msg.what & INDEX_MASK;
+                    final int viewIndex = mList.getViewIndex(index);
+                    switch (msg.arg1) {
+                        case OP_SET_ICON: {
+                            StatusBarIcon icon = (StatusBarIcon)msg.obj;
+                            StatusBarIcon old = mList.getIcon(index);
+                            if (old == null) {
+                                mList.setIcon(index, icon);
+                                mCallbacks.addIcon(mList.getSlot(index), index, viewIndex, icon);
+                            } else {
+                                mList.setIcon(index, icon);
+                                mCallbacks.updateIcon(mList.getSlot(index), index, viewIndex,
+                                        old, icon);
+                            }
+                            break;
+                        }
+                        case OP_REMOVE_ICON:
+                            mList.removeIcon(index);
+                            mCallbacks.removeIcon(mList.getSlot(index), index, viewIndex);
+                            break;
+                    }
+                    break;
+                }
+                case MSG_ADD_NOTIFICATION: {
+                    final NotificationQueueEntry ne = (NotificationQueueEntry)msg.obj;
+                    mCallbacks.addNotification(ne.key, ne.notification);
+                    break;
+                }
+                case MSG_UPDATE_NOTIFICATION: {
+                    final NotificationQueueEntry ne = (NotificationQueueEntry)msg.obj;
+                    mCallbacks.updateNotification(ne.key, ne.notification);
+                    break;
+                }
+                case MSG_REMOVE_NOTIFICATION: {
+                    mCallbacks.removeNotification((IBinder)msg.obj);
+                    break;
+                }
+                case MSG_DISABLE:
+                    mCallbacks.disable(msg.arg1);
+                    break;
+                case MSG_SET_VISIBILITY:
+                    if (msg.arg1 == OP_EXPAND) {
+                        mCallbacks.animateExpand();
+                    } else {
+                        mCallbacks.animateCollapse();
+                    }
+            }
+        }
+    }
+}
+
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/DateView.java b/packages/SystemUI/src/com/android/systemui/statusbar/DateView.java
new file mode 100644
index 0000000..e6d3a7e
--- /dev/null
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/DateView.java
@@ -0,0 +1,89 @@
+/*
+ * Copyright (C) 2008 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.android.systemui.statusbar;
+
+import android.content.BroadcastReceiver;
+import android.content.Context;
+import android.content.Intent;
+import android.content.IntentFilter;
+import android.util.AttributeSet;
+import android.util.Slog;
+import android.widget.TextView;
+import android.view.MotionEvent;
+
+import java.text.DateFormat;
+import java.util.Date;
+
+public final class DateView extends TextView {
+    private static final String TAG = "DateView";
+
+    private boolean mUpdating = false;
+
+    private BroadcastReceiver mIntentReceiver = new BroadcastReceiver() {
+        @Override
+        public void onReceive(Context context, Intent intent) {
+            String action = intent.getAction();
+            if (action.equals(Intent.ACTION_TIME_TICK)
+                    || action.equals(Intent.ACTION_TIMEZONE_CHANGED)) {
+                updateClock();
+            }
+        }
+    };
+
+    public DateView(Context context, AttributeSet attrs) {
+        super(context, attrs);
+    }
+
+    @Override
+    protected void onAttachedToWindow() {
+        super.onAttachedToWindow();
+    }
+    
+    @Override
+    protected void onDetachedFromWindow() {
+        super.onDetachedFromWindow();
+        setUpdates(false);
+    }
+
+    @Override
+    protected int getSuggestedMinimumWidth() {
+        // makes the large background bitmap not force us to full width
+        return 0;
+    }
+
+    private final void updateClock() {
+        Date now = new Date();
+        setText(DateFormat.getDateInstance(DateFormat.LONG).format(now));
+    }
+
+    void setUpdates(boolean update) {
+        if (update != mUpdating) {
+            mUpdating = update;
+            if (update) {
+                // Register for Intent broadcasts for the clock and battery
+                IntentFilter filter = new IntentFilter();
+                filter.addAction(Intent.ACTION_TIME_TICK);
+                filter.addAction(Intent.ACTION_TIMEZONE_CHANGED);
+                mContext.registerReceiver(mIntentReceiver, filter, null, null);
+                updateClock();
+            } else {
+                mContext.unregisterReceiver(mIntentReceiver);
+            }
+        }
+    }
+}
+
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/ExpandedView.java b/packages/SystemUI/src/com/android/systemui/statusbar/ExpandedView.java
new file mode 100644
index 0000000..3d85f27
--- /dev/null
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/ExpandedView.java
@@ -0,0 +1,59 @@
+/*
+ * Copyright (C) 2008 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.android.systemui.statusbar;
+
+import android.content.Context;
+import android.util.AttributeSet;
+import android.view.Display;
+import android.view.KeyEvent;
+import android.view.MotionEvent;
+import android.view.WindowManager;
+import android.widget.LinearLayout;
+import android.util.Slog;
+
+
+public class ExpandedView extends LinearLayout {
+    StatusBarService mService;
+    int mPrevHeight = -1;
+
+    public ExpandedView(Context context, AttributeSet attrs) {
+        super(context, attrs);
+    }
+
+    @Override
+    protected void onFinishInflate() {
+        super.onFinishInflate();
+    }
+
+    /** We want to shrink down to 0, and ignore the background. */
+    @Override
+    public int getSuggestedMinimumHeight() {
+        return 0;
+    }
+
+    @Override
+     protected void onLayout(boolean changed, int left, int top, int right, int bottom) {
+         super.onLayout(changed, left, top, right, bottom);
+         int height = bottom - top;
+         if (height != mPrevHeight) {
+             //Slog.d(StatusBarService.TAG, "height changed old=" + mPrevHeight
+             //     + " new=" + height);
+             mPrevHeight = height;
+             mService.updateExpandedViewPos(StatusBarService.EXPANDED_LEAVE_ALONE);
+         }
+     }
+}
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/FixedSizeDrawable.java b/packages/SystemUI/src/com/android/systemui/statusbar/FixedSizeDrawable.java
new file mode 100644
index 0000000..eb22b61
--- /dev/null
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/FixedSizeDrawable.java
@@ -0,0 +1,66 @@
+/*
+ * Copyright (C) 2008 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.android.systemui.statusbar;
+
+import android.graphics.drawable.Drawable;
+import android.graphics.Canvas;
+import android.graphics.ColorFilter;
+import android.graphics.Rect;
+import android.util.Slog;
+
+class FixedSizeDrawable extends Drawable {
+    Drawable mDrawable;
+    int mLeft;
+    int mTop;
+    int mRight;
+    int mBottom;
+
+    FixedSizeDrawable(Drawable that) {
+        mDrawable = that;
+    }
+
+    public void setFixedBounds(int l, int t, int r, int b) {
+        mLeft = l;
+        mTop = t;
+        mRight = r;
+        mBottom = b;
+    }
+
+    public void setBounds(Rect bounds) {
+        mDrawable.setBounds(mLeft, mTop, mRight, mBottom);
+    }
+
+    public void setBounds(int l, int t, int r, int b) {
+        mDrawable.setBounds(mLeft, mTop, mRight, mBottom);
+    }
+
+    public void draw(Canvas canvas) {
+        mDrawable.draw(canvas);
+    }
+
+    public int getOpacity() {
+        return mDrawable.getOpacity();
+    }
+
+    public void setAlpha(int alpha) {
+        mDrawable.setAlpha(alpha);
+    }
+
+    public void setColorFilter(ColorFilter cf) {
+        mDrawable.setColorFilter(cf);
+    }
+}
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/IconMerger.java b/packages/SystemUI/src/com/android/systemui/statusbar/IconMerger.java
new file mode 100644
index 0000000..027bed4a
--- /dev/null
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/IconMerger.java
@@ -0,0 +1,154 @@
+/*
+ * Copyright (C) 2008 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.android.systemui.statusbar;
+
+import android.content.Context;
+import android.os.Handler;
+import android.util.AttributeSet;
+import android.util.Slog;
+import android.view.View;
+import android.widget.LinearLayout;
+
+import com.android.systemui.R;
+
+
+public class IconMerger extends LinearLayout {
+    private static final String TAG = "IconMerger";
+
+    private StatusBarIconView mMoreView;
+
+    public IconMerger(Context context, AttributeSet attrs) {
+        super(context, attrs);
+    }
+
+    public void addMoreView(StatusBarIconView v, LinearLayout.LayoutParams lp) {
+        super.addView(v, lp);
+        mMoreView = v;
+    }
+
+    public void addView(StatusBarIconView v, int index, LinearLayout.LayoutParams lp) {
+        if (index == 0) {
+            throw new RuntimeException("Attempt to put view before the more view: " + v);
+        }
+        super.addView(v, index, lp);
+    }
+
+    @Override
+    protected void onLayout(boolean changed, int l, int t, int r, int b) {
+        super.onLayout(changed, l, t, r, b);
+
+        final int maxWidth = r - l;
+        final int N = getChildCount();
+        int i;
+
+        // get the rightmost one, and see if we even need to do anything
+        int fitRight = -1;
+        for (i=N-1; i>=0; i--) {
+            final View child = getChildAt(i);
+            if (child.getVisibility() != GONE) {
+                fitRight = child.getRight();
+                break;
+            }
+        }
+
+        // find the first visible one that isn't the more icon
+        final StatusBarIconView moreView = mMoreView;
+        int fitLeft = -1;
+        int startIndex = -1;
+        for (i=0; i<N; i++) {
+            final View child = getChildAt(i);
+            if (child == moreView) {
+                startIndex = i+1;
+            }
+            else if (child.getVisibility() != GONE) {
+                fitLeft = child.getLeft();
+                break;
+            }
+        }
+
+        if (moreView == null || startIndex < 0) {
+            return;
+            /*
+            throw new RuntimeException("Status Bar / IconMerger moreView == " + moreView
+                    + " startIndex=" + startIndex);
+            */
+        }
+        
+        // if it fits without the more icon, then hide the more icon and update fitLeft
+        // so everything gets pushed left
+        int adjust = 0;
+        if (fitRight - fitLeft <= maxWidth) {
+            adjust = fitLeft - moreView.getLeft();
+            fitLeft -= adjust;
+            fitRight -= adjust;
+            moreView.layout(0, moreView.getTop(), 0, moreView.getBottom());
+        }
+        int extra = fitRight - r;
+        int shift = -1;
+
+        int breakingPoint = fitLeft + extra + adjust;
+        int number = 0;
+        for (i=startIndex; i<N; i++) {
+            final StatusBarIconView child = (StatusBarIconView)getChildAt(i);
+            if (child.getVisibility() != GONE) {
+                int childLeft = child.getLeft();
+                int childRight = child.getRight();
+                if (childLeft < breakingPoint) {
+                    // hide this one
+                    child.layout(0, child.getTop(), 0, child.getBottom());
+                    int n = child.getStatusBarIcon().number;
+                    if (n == 0) {
+                        number += 1;
+                    } else if (n > 0) {
+                        number += n;
+                    }
+                } else {
+                    // decide how much to shift by
+                    if (shift < 0) {
+                        shift = childLeft - fitLeft;
+                    }
+                    // shift this left by shift
+                    child.layout(childLeft-shift, child.getTop(),
+                                    childRight-shift, child.getBottom());
+                }
+            }
+        }
+        
+        // BUG: Updating the text during the layout here doesn't seem to cause
+        // the view to be redrawn fully.  The text view gets resized correctly, but the
+        // text contents aren't drawn properly.  To work around this, we post a message
+        // and provide the value later.  We're the only one changing this value show it
+        // should be ordered correctly.
+        if (false) {
+            // TODO this.moreIcon.update(number);
+        } else {
+            mBugWorkaroundNumber = number;
+            mBugWorkaroundHandler.post(mBugWorkaroundRunnable);
+        }
+    }
+
+    private int mBugWorkaroundNumber;
+    private Handler mBugWorkaroundHandler = new Handler();
+    private Runnable mBugWorkaroundRunnable = new Runnable() {
+        public void run() {
+            /* TODO
+            IconMerger.this.moreIcon.update(mBugWorkaroundNumber);
+            IconMerger.this.moreIcon.view.invalidate();
+            */
+        }
+    };
+}
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/LatestItemView.java b/packages/SystemUI/src/com/android/systemui/statusbar/LatestItemView.java
new file mode 100644
index 0000000..1e89624
--- /dev/null
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/LatestItemView.java
@@ -0,0 +1,34 @@
+/*
+ * Copyright (C) 2008 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.android.systemui.statusbar;
+
+import android.content.Context;
+import android.util.AttributeSet;
+import android.util.Slog;
+import android.view.MotionEvent;
+import android.widget.FrameLayout;
+
+public class LatestItemView extends FrameLayout {
+
+    public LatestItemView(Context context, AttributeSet attrs) {
+        super(context, attrs);
+    }
+
+    public boolean dispatchTouchEvent(MotionEvent ev) {
+        return onTouchEvent(ev);
+    }
+}
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/NotificationData.java b/packages/SystemUI/src/com/android/systemui/statusbar/NotificationData.java
new file mode 100644
index 0000000..7a82267
--- /dev/null
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/NotificationData.java
@@ -0,0 +1,126 @@
+/*
+ * Copyright (C) 2008 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.android.systemui.statusbar;
+
+import android.app.Notification;
+import android.os.IBinder;
+import android.view.View;
+
+import com.android.internal.statusbar.StatusBarNotification;
+
+import java.util.ArrayList;
+
+/**
+ * The list of currently displaying notifications.
+ */
+public class NotificationData {
+    public static final class Entry {
+        public IBinder key;
+        public StatusBarNotification notification;
+        public StatusBarIconView icon;
+        public View row; // the outer expanded view
+        public View content; // takes the click events and sends the PendingIntent
+        public View expanded; // the inflated RemoteViews
+    }
+    private final ArrayList<Entry> mEntries = new ArrayList<Entry>();
+
+    public int size() {
+        return mEntries.size();
+    }
+
+    public Entry getEntryAt(int index) {
+        return mEntries.get(index);
+    }
+
+    public int findEntry(IBinder key) {
+        final int N = mEntries.size();
+        for (int i=0; i<N; i++) {
+            Entry entry = mEntries.get(i);
+            if (entry.key == key) {
+                return i;
+            }
+        }
+        return -1;
+    }
+
+    public int add(IBinder key, StatusBarNotification notification, View row, View content,
+            View expanded, StatusBarIconView icon) {
+        Entry entry = new Entry();
+        entry.key = key;
+        entry.notification = notification;
+        entry.row = row;
+        entry.content = content;
+        entry.expanded = expanded;
+        entry.icon = icon;
+        final int index = chooseIndex(notification.notification.when);
+        mEntries.add(index, entry);
+        return index;
+    }
+
+    public Entry remove(IBinder key) {
+        final int N = mEntries.size();
+        for (int i=0; i<N; i++) {
+            Entry entry = mEntries.get(i);
+            if (entry.key == key) {
+                mEntries.remove(i);
+                return entry;
+            }
+        }
+        return null;
+    }
+
+    private int chooseIndex(final long when) {
+        final int N = mEntries.size();
+        for (int i=0; i<N; i++) {
+            Entry entry = mEntries.get(i);
+            if (entry.notification.notification.when > when) {
+                return i;
+            }
+        }
+        return N;
+    }
+
+    /**
+     * Return whether there are any visible items (i.e. items without an error).
+     */
+    public boolean hasVisibleItems() {
+        final int N = mEntries.size();
+        for (int i=0; i<N; i++) {
+            Entry entry = mEntries.get(i);
+            if (entry.expanded != null) { // the view successfully inflated
+                return true;
+            }
+        }
+        return false;
+    }
+
+    /**
+     * Return whether there are any clearable items (that aren't errors).
+     */
+    public boolean hasClearableItems() {
+        final int N = mEntries.size();
+        for (int i=0; i<N; i++) {
+            Entry entry = mEntries.get(i);
+            if (entry.expanded != null) { // the view successfully inflated
+                if ((entry.notification.notification.flags & Notification.FLAG_NO_CLEAR) == 0) {
+                    return true;
+                }
+            }
+        }
+        return false;
+    }
+}
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/NotificationLinearLayout.java b/packages/SystemUI/src/com/android/systemui/statusbar/NotificationLinearLayout.java
new file mode 100644
index 0000000..8105352
--- /dev/null
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/NotificationLinearLayout.java
@@ -0,0 +1,29 @@
+/*
+ * Copyright (C) 2008 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.android.systemui.statusbar;
+
+import android.content.Context;
+import android.util.AttributeSet;
+import android.widget.LinearLayout;
+
+
+public class NotificationLinearLayout extends LinearLayout {
+    public NotificationLinearLayout(Context context, AttributeSet attrs) {
+        super(context, attrs);
+    }
+}
+
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/StatusBarIconView.java b/packages/SystemUI/src/com/android/systemui/statusbar/StatusBarIconView.java
new file mode 100644
index 0000000..d98bd7d
--- /dev/null
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/StatusBarIconView.java
@@ -0,0 +1,127 @@
+/*
+ * Copyright (C) 2008 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.android.systemui.statusbar;
+
+import android.content.Context;
+import android.content.pm.PackageManager;
+import android.content.res.Resources;
+import android.graphics.drawable.Drawable;
+import android.graphics.Canvas;
+import android.util.Slog;
+import android.view.ViewDebug;
+import android.widget.FrameLayout;
+
+import com.android.internal.statusbar.StatusBarIcon;
+
+public class StatusBarIconView extends AnimatedImageView {
+    private static final String TAG = "StatusBarIconView";
+
+    private StatusBarIcon mIcon;
+    @ViewDebug.ExportedProperty private String mSlot;
+
+    public StatusBarIconView(Context context, String slot) {
+        super(context);
+        mSlot = slot;
+    }
+
+    private static boolean streq(String a, String b) {
+        if (a == b) {
+            return true;
+        }
+        if (a == null && b != null) {
+            return false;
+        }
+        if (a != null && b == null) {
+            return false;
+        }
+        return a.equals(b);
+    }
+
+    /**
+     * Returns whether the set succeeded.
+     */
+    public boolean set(StatusBarIcon icon) {
+        final boolean iconEquals = mIcon != null
+                && streq(mIcon.iconPackage, icon.iconPackage)
+                && mIcon.iconId == icon.iconId;
+        final boolean levelEquals = iconEquals
+                && mIcon.iconLevel == icon.iconLevel;
+        final boolean visibilityEquals = mIcon != null
+                && mIcon.visible == icon.visible;
+        if (!iconEquals) {
+            Drawable drawable = getIcon(icon);
+            if (drawable == null) {
+                Slog.w(StatusBarService.TAG, "No icon for slot " + mSlot);
+                return false;
+            }
+            setImageDrawable(drawable);
+        }
+        if (!levelEquals) {
+            setImageLevel(icon.iconLevel);
+        }
+        if (!visibilityEquals) {
+            setVisibility(icon.visible ? VISIBLE : GONE);
+        }
+        mIcon = icon.clone();
+        return true;
+    }
+
+    private Drawable getIcon(StatusBarIcon icon) {
+        return getIcon(getContext(), icon);
+    }
+
+    /**
+     * Returns the right icon to use for this item, respecting the iconId and
+     * iconPackage (if set)
+     * 
+     * @param context Context to use to get resources if iconPackage is not set
+     * @return Drawable for this item, or null if the package or item could not
+     *         be found
+     */
+    public static Drawable getIcon(Context context, StatusBarIcon icon) {
+        Resources r = null;
+
+        if (icon.iconPackage != null) {
+            try {
+                r = context.getPackageManager().getResourcesForApplication(icon.iconPackage);
+            } catch (PackageManager.NameNotFoundException ex) {
+                Slog.e(StatusBarService.TAG, "Icon package not found: " + icon.iconPackage);
+                return null;
+            }
+        } else {
+            r = context.getResources();
+        }
+
+        if (icon.iconId == 0) {
+            return null;
+        }
+        
+        try {
+            return r.getDrawable(icon.iconId);
+        } catch (RuntimeException e) {
+            Slog.w(StatusBarService.TAG, "Icon not found in "
+                  + (icon.iconPackage != null ? icon.iconId : "<system>")
+                  + ": " + Integer.toHexString(icon.iconId));
+        }
+
+        return null;
+    }
+
+    public StatusBarIcon getStatusBarIcon() {
+        return mIcon;
+    }
+}
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/StatusBarPolicy.java b/packages/SystemUI/src/com/android/systemui/statusbar/StatusBarPolicy.java
new file mode 100644
index 0000000..4f39ee4
--- /dev/null
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/StatusBarPolicy.java
@@ -0,0 +1,1160 @@
+/*
+ * Copyright (C) 2008 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.android.systemui.statusbar.policy;
+
+import android.app.StatusBarManager;
+import android.app.AlertDialog;
+import android.bluetooth.BluetoothA2dp;
+import android.bluetooth.BluetoothAdapter;
+import android.bluetooth.BluetoothHeadset;
+import android.bluetooth.BluetoothPbap;
+import android.content.BroadcastReceiver;
+import android.content.ContentResolver;
+import android.content.Context;
+import android.content.DialogInterface;
+import android.content.Intent;
+import android.content.IntentFilter;
+import android.content.res.TypedArray;
+import android.graphics.PixelFormat;
+import android.graphics.Typeface;
+import android.graphics.drawable.Drawable;
+import android.location.LocationManager;
+import android.media.AudioManager;
+import android.media.Ringtone;
+import android.media.RingtoneManager;
+import android.net.NetworkInfo;
+import android.net.Uri;
+import android.net.wifi.WifiManager;
+import android.os.Binder;
+import android.os.Handler;
+import android.os.Message;
+import android.os.RemoteException;
+import android.os.storage.StorageManager;
+import android.provider.Settings;
+import android.telephony.PhoneStateListener;
+import android.telephony.ServiceState;
+import android.telephony.SignalStrength;
+import android.telephony.TelephonyManager;
+import android.text.format.DateFormat;
+import android.text.style.CharacterStyle;
+import android.text.style.RelativeSizeSpan;
+import android.text.style.ForegroundColorSpan;
+import android.text.style.StyleSpan;
+import android.text.Spannable;
+import android.text.SpannableStringBuilder;
+import android.util.Slog;
+import android.view.View;
+import android.view.ViewGroup;
+import android.view.WindowManager;
+import android.view.WindowManagerImpl;
+import android.widget.ImageView;
+import android.widget.LinearLayout;
+import android.widget.TextView;
+
+import com.android.internal.app.IBatteryStats;
+import com.android.internal.telephony.IccCard;
+import com.android.internal.telephony.TelephonyIntents;
+import com.android.internal.telephony.cdma.EriInfo;
+import com.android.internal.telephony.cdma.TtyIntent;
+import com.android.server.am.BatteryStatsService;
+
+import com.android.systemui.R;
+
+/**
+ * This class contains all of the policy about which icons are installed in the status
+ * bar at boot time.  It goes through the normal API for icons, even though it probably
+ * strictly doesn't need to.
+ */
+public class StatusBarPolicy {
+    private static final String TAG = "StatusBarPolicy";
+
+    // message codes for the handler
+    private static final int EVENT_BATTERY_CLOSE = 4;
+
+    private static final int AM_PM_STYLE_NORMAL  = 0;
+    private static final int AM_PM_STYLE_SMALL   = 1;
+    private static final int AM_PM_STYLE_GONE    = 2;
+
+    private static final int AM_PM_STYLE = AM_PM_STYLE_GONE;
+
+    private final Context mContext;
+    private final StatusBarManager mService;
+    private final Handler mHandler = new StatusBarHandler();
+    private final IBatteryStats mBatteryStats;
+
+    // storage
+    private StorageManager mStorageManager;
+
+    // battery
+    private boolean mBatteryFirst = true;
+    private boolean mBatteryPlugged;
+    private int mBatteryLevel;
+    private AlertDialog mLowBatteryDialog;
+    private TextView mBatteryLevelTextView;
+    private View mBatteryView;
+    private int mBatteryViewSequence;
+    private boolean mBatteryShowLowOnEndCall = false;
+    private static final boolean SHOW_LOW_BATTERY_WARNING = true;
+    private static final boolean SHOW_BATTERY_WARNINGS_IN_CALL = true;
+
+    // phone
+    private TelephonyManager mPhone;
+    private int mPhoneSignalIconId;
+
+    //***** Signal strength icons
+    //GSM/UMTS
+    private static final int[] sSignalImages = new int[] {
+        R.drawable.stat_sys_signal_0,
+        R.drawable.stat_sys_signal_1,
+        R.drawable.stat_sys_signal_2,
+        R.drawable.stat_sys_signal_3,
+        R.drawable.stat_sys_signal_4
+    };
+    private static final int[] sSignalImages_r = new int[] {
+        R.drawable.stat_sys_r_signal_0,
+        R.drawable.stat_sys_r_signal_1,
+        R.drawable.stat_sys_r_signal_2,
+        R.drawable.stat_sys_r_signal_3,
+        R.drawable.stat_sys_r_signal_4
+    };
+    private static final int[] sRoamingIndicatorImages_cdma = new int[] {
+        R.drawable.stat_sys_roaming_cdma_0, //Standard Roaming Indicator
+        // 1 is Standard Roaming Indicator OFF
+        // TODO T: image never used, remove and put 0 instead?
+        R.drawable.stat_sys_roaming_cdma_0,
+
+        // 2 is Standard Roaming Indicator FLASHING
+        // TODO T: image never used, remove and put 0 instead?
+        R.drawable.stat_sys_roaming_cdma_0,
+
+        // 3-12 Standard ERI
+        R.drawable.stat_sys_roaming_cdma_0, //3
+        R.drawable.stat_sys_roaming_cdma_0,
+        R.drawable.stat_sys_roaming_cdma_0,
+        R.drawable.stat_sys_roaming_cdma_0,
+        R.drawable.stat_sys_roaming_cdma_0,
+        R.drawable.stat_sys_roaming_cdma_0,
+        R.drawable.stat_sys_roaming_cdma_0,
+        R.drawable.stat_sys_roaming_cdma_0,
+        R.drawable.stat_sys_roaming_cdma_0,
+        R.drawable.stat_sys_roaming_cdma_0,
+
+        // 13-63 Reserved for Standard ERI
+        R.drawable.stat_sys_roaming_cdma_0, //13
+        R.drawable.stat_sys_roaming_cdma_0,
+        R.drawable.stat_sys_roaming_cdma_0,
+        R.drawable.stat_sys_roaming_cdma_0,
+        R.drawable.stat_sys_roaming_cdma_0,
+        R.drawable.stat_sys_roaming_cdma_0,
+        R.drawable.stat_sys_roaming_cdma_0,
+        R.drawable.stat_sys_roaming_cdma_0,
+        R.drawable.stat_sys_roaming_cdma_0,
+        R.drawable.stat_sys_roaming_cdma_0,
+        R.drawable.stat_sys_roaming_cdma_0,
+        R.drawable.stat_sys_roaming_cdma_0,
+        R.drawable.stat_sys_roaming_cdma_0,
+        R.drawable.stat_sys_roaming_cdma_0,
+        R.drawable.stat_sys_roaming_cdma_0,
+        R.drawable.stat_sys_roaming_cdma_0,
+        R.drawable.stat_sys_roaming_cdma_0,
+        R.drawable.stat_sys_roaming_cdma_0,
+        R.drawable.stat_sys_roaming_cdma_0,
+        R.drawable.stat_sys_roaming_cdma_0,
+        R.drawable.stat_sys_roaming_cdma_0,
+        R.drawable.stat_sys_roaming_cdma_0,
+        R.drawable.stat_sys_roaming_cdma_0,
+        R.drawable.stat_sys_roaming_cdma_0,
+        R.drawable.stat_sys_roaming_cdma_0,
+        R.drawable.stat_sys_roaming_cdma_0,
+        R.drawable.stat_sys_roaming_cdma_0,
+        R.drawable.stat_sys_roaming_cdma_0,
+        R.drawable.stat_sys_roaming_cdma_0,
+        R.drawable.stat_sys_roaming_cdma_0,
+        R.drawable.stat_sys_roaming_cdma_0,
+        R.drawable.stat_sys_roaming_cdma_0,
+        R.drawable.stat_sys_roaming_cdma_0,
+        R.drawable.stat_sys_roaming_cdma_0,
+        R.drawable.stat_sys_roaming_cdma_0,
+        R.drawable.stat_sys_roaming_cdma_0,
+        R.drawable.stat_sys_roaming_cdma_0,
+        R.drawable.stat_sys_roaming_cdma_0,
+        R.drawable.stat_sys_roaming_cdma_0,
+        R.drawable.stat_sys_roaming_cdma_0,
+        R.drawable.stat_sys_roaming_cdma_0,
+        R.drawable.stat_sys_roaming_cdma_0,
+        R.drawable.stat_sys_roaming_cdma_0,
+        R.drawable.stat_sys_roaming_cdma_0,
+        R.drawable.stat_sys_roaming_cdma_0,
+        R.drawable.stat_sys_roaming_cdma_0,
+        R.drawable.stat_sys_roaming_cdma_0,
+        R.drawable.stat_sys_roaming_cdma_0,
+        R.drawable.stat_sys_roaming_cdma_0,
+        R.drawable.stat_sys_roaming_cdma_0,
+        R.drawable.stat_sys_roaming_cdma_0,
+
+        // 64-127 Reserved for Non Standard (Operator Specific) ERI
+        R.drawable.stat_sys_roaming_cdma_0, //64
+        R.drawable.stat_sys_roaming_cdma_0,
+        R.drawable.stat_sys_roaming_cdma_0,
+        R.drawable.stat_sys_roaming_cdma_0,
+        R.drawable.stat_sys_roaming_cdma_0,
+        R.drawable.stat_sys_roaming_cdma_0,
+        R.drawable.stat_sys_roaming_cdma_0,
+        R.drawable.stat_sys_roaming_cdma_0,
+        R.drawable.stat_sys_roaming_cdma_0,
+        R.drawable.stat_sys_roaming_cdma_0,
+        R.drawable.stat_sys_roaming_cdma_0,
+        R.drawable.stat_sys_roaming_cdma_0,
+        R.drawable.stat_sys_roaming_cdma_0,
+        R.drawable.stat_sys_roaming_cdma_0,
+        R.drawable.stat_sys_roaming_cdma_0,
+        R.drawable.stat_sys_roaming_cdma_0,
+        R.drawable.stat_sys_roaming_cdma_0,
+        R.drawable.stat_sys_roaming_cdma_0,
+        R.drawable.stat_sys_roaming_cdma_0,
+        R.drawable.stat_sys_roaming_cdma_0 //83
+
+        // 128-255 Reserved
+    };
+
+    //***** Data connection icons
+    private int[] mDataIconList = sDataNetType_g;
+    //GSM/UMTS
+    private static final int[] sDataNetType_g = new int[] {
+            R.drawable.stat_sys_data_connected_g,
+            R.drawable.stat_sys_data_in_g,
+            R.drawable.stat_sys_data_out_g,
+            R.drawable.stat_sys_data_inandout_g,
+        };
+    private static final int[] sDataNetType_3g = new int[] {
+            R.drawable.stat_sys_data_connected_3g,
+            R.drawable.stat_sys_data_in_3g,
+            R.drawable.stat_sys_data_out_3g,
+            R.drawable.stat_sys_data_inandout_3g,
+        };
+    private static final int[] sDataNetType_e = new int[] {
+            R.drawable.stat_sys_data_connected_e,
+            R.drawable.stat_sys_data_in_e,
+            R.drawable.stat_sys_data_out_e,
+            R.drawable.stat_sys_data_inandout_e,
+        };
+    //3.5G
+    private static final int[] sDataNetType_h = new int[] {
+            R.drawable.stat_sys_data_connected_h,
+            R.drawable.stat_sys_data_in_h,
+            R.drawable.stat_sys_data_out_h,
+            R.drawable.stat_sys_data_inandout_h,
+    };
+
+    //CDMA
+    // Use 3G icons for EVDO data and 1x icons for 1XRTT data
+    private static final int[] sDataNetType_1x = new int[] {
+        R.drawable.stat_sys_data_connected_1x,
+        R.drawable.stat_sys_data_in_1x,
+        R.drawable.stat_sys_data_out_1x,
+        R.drawable.stat_sys_data_inandout_1x,
+    };
+
+    // Assume it's all good unless we hear otherwise.  We don't always seem
+    // to get broadcasts that it *is* there.
+    IccCard.State mSimState = IccCard.State.READY;
+    int mPhoneState = TelephonyManager.CALL_STATE_IDLE;
+    int mDataState = TelephonyManager.DATA_DISCONNECTED;
+    int mDataActivity = TelephonyManager.DATA_ACTIVITY_NONE;
+    ServiceState mServiceState;
+    SignalStrength mSignalStrength;
+
+    // data connection
+    private boolean mDataIconVisible;
+    private boolean mHspaDataDistinguishable;
+
+    // ringer volume
+    private boolean mVolumeVisible;
+
+    // bluetooth device status
+    private int mBluetoothHeadsetState;
+    private boolean mBluetoothA2dpConnected;
+    private int mBluetoothPbapState;
+    private boolean mBluetoothEnabled;
+
+    // wifi
+    private static final int[] sWifiSignalImages = new int[] {
+            R.drawable.stat_sys_wifi_signal_1,
+            R.drawable.stat_sys_wifi_signal_2,
+            R.drawable.stat_sys_wifi_signal_3,
+            R.drawable.stat_sys_wifi_signal_4,
+        };
+    private static final int sWifiTemporarilyNotConnectedImage =
+            R.drawable.stat_sys_wifi_signal_0;
+
+    private int mLastWifiSignalLevel = -1;
+    private boolean mIsWifiConnected = false;
+
+    // sync state
+    // If sync is active the SyncActive icon is displayed. If sync is not active but
+    // sync is failing the SyncFailing icon is displayed. Otherwise neither are displayed.
+
+    private BroadcastReceiver mIntentReceiver = new BroadcastReceiver() {
+        @Override
+        public void onReceive(Context context, Intent intent) {
+            String action = intent.getAction();
+            if (action.equals(Intent.ACTION_BATTERY_CHANGED)) {
+                updateBattery(intent);
+            }
+            else if (action.equals(Intent.ACTION_ALARM_CHANGED)) {
+                updateAlarm(intent);
+            }
+            else if (action.equals(Intent.ACTION_SYNC_STATE_CHANGED)) {
+                updateSyncState(intent);
+            }
+            else if (action.equals(Intent.ACTION_BATTERY_LOW)) {
+                onBatteryLow(intent);
+            }
+            else if (action.equals(Intent.ACTION_BATTERY_OKAY)
+                    || action.equals(Intent.ACTION_POWER_CONNECTED)) {
+                onBatteryOkay(intent);
+            }
+            else if (action.equals(BluetoothAdapter.ACTION_STATE_CHANGED) ||
+                    action.equals(BluetoothHeadset.ACTION_STATE_CHANGED) ||
+                    action.equals(BluetoothA2dp.ACTION_SINK_STATE_CHANGED) ||
+                    action.equals(BluetoothPbap.PBAP_STATE_CHANGED_ACTION)) {
+                updateBluetooth(intent);
+            }
+            else if (action.equals(WifiManager.NETWORK_STATE_CHANGED_ACTION) ||
+                    action.equals(WifiManager.WIFI_STATE_CHANGED_ACTION) ||
+                    action.equals(WifiManager.RSSI_CHANGED_ACTION)) {
+                updateWifi(intent);
+            }
+            else if (action.equals(LocationManager.GPS_ENABLED_CHANGE_ACTION) ||
+                    action.equals(LocationManager.GPS_FIX_CHANGE_ACTION)) {
+                updateGps(intent);
+            }
+            else if (action.equals(AudioManager.RINGER_MODE_CHANGED_ACTION) ||
+                    action.equals(AudioManager.VIBRATE_SETTING_CHANGED_ACTION)) {
+                updateVolume();
+            }
+            else if (action.equals(TelephonyIntents.ACTION_SIM_STATE_CHANGED)) {
+                updateSimState(intent);
+            }
+            else if (action.equals(TtyIntent.TTY_ENABLED_CHANGE_ACTION)) {
+                updateTTY(intent);
+            }
+        }
+    };
+
+    public StatusBarPolicy(Context context) {
+        mContext = context;
+        mService = (StatusBarManager)context.getSystemService(Context.STATUS_BAR_SERVICE);
+        mSignalStrength = new SignalStrength();
+        mBatteryStats = BatteryStatsService.getService();
+
+        // storage
+        mStorageManager = (StorageManager) context.getSystemService(Context.STORAGE_SERVICE);
+        mStorageManager.registerListener(
+                new com.android.systemui.usb.StorageNotification(context));
+
+        // battery
+        mService.setIcon("battery", com.android.internal.R.drawable.stat_sys_battery_unknown, 0);
+
+        // phone_signal
+        mPhone = (TelephonyManager)context.getSystemService(Context.TELEPHONY_SERVICE);
+        mPhoneSignalIconId = R.drawable.stat_sys_signal_null;
+        mService.setIcon("phone_signal", mPhoneSignalIconId, 0);
+
+        // register for phone state notifications.
+        ((TelephonyManager)mContext.getSystemService(Context.TELEPHONY_SERVICE))
+                .listen(mPhoneStateListener,
+                          PhoneStateListener.LISTEN_SERVICE_STATE
+                        | PhoneStateListener.LISTEN_SIGNAL_STRENGTHS
+                        | PhoneStateListener.LISTEN_CALL_STATE
+                        | PhoneStateListener.LISTEN_DATA_CONNECTION_STATE
+                        | PhoneStateListener.LISTEN_DATA_ACTIVITY);
+
+        // data_connection
+        mService.setIcon("data_connection", R.drawable.stat_sys_data_connected_g, 0);
+        mService.setIconVisibility("data_connection", false);
+
+        // wifi
+        mService.setIcon("wifi", sWifiSignalImages[0], 0);
+        mService.setIconVisibility("wifi", false);
+        // wifi will get updated by the sticky intents
+
+        // TTY status
+        mService.setIcon("tty",  R.drawable.stat_sys_tty_mode, 0);
+        mService.setIconVisibility("tty", false);
+
+        // Cdma Roaming Indicator, ERI
+        mService.setIcon("cdma_eri", R.drawable.stat_sys_roaming_cdma_0, 0);
+        mService.setIconVisibility("cdma_eri", false);
+
+        // bluetooth status
+        mService.setIcon("bluetooth", R.drawable.stat_sys_data_bluetooth, 0);
+        BluetoothAdapter adapter = BluetoothAdapter.getDefaultAdapter();
+        if (adapter != null) {
+            mBluetoothEnabled = adapter.isEnabled();
+        } else {
+            mBluetoothEnabled = false;
+        }
+        mBluetoothA2dpConnected = false;
+        mBluetoothHeadsetState = BluetoothHeadset.STATE_DISCONNECTED;
+        mBluetoothPbapState = BluetoothPbap.STATE_DISCONNECTED;
+        mService.setIconVisibility("bluetooth", mBluetoothEnabled);
+
+        // Gps status
+        mService.setIcon("gps", R.drawable.stat_sys_gps_acquiring_anim, 0);
+        mService.setIconVisibility("gps", false);
+
+        // Alarm clock
+        mService.setIcon("alarm_clock", R.drawable.stat_notify_alarm, 0);
+        mService.setIconVisibility("alarm_clock", false);
+
+        // Sync state
+        mService.setIcon("sync_active", com.android.internal.R.drawable.stat_notify_sync_anim0, 0);
+        mService.setIcon("sync_failing", com.android.internal.R.drawable.stat_notify_sync_error, 0);
+        mService.setIconVisibility("sync_active", false);
+        mService.setIconVisibility("sync_failing", false);
+
+        // volume
+        mService.setIcon("volume", R.drawable.stat_sys_ringer_silent, 0);
+        mService.setIconVisibility("volume", false);
+        updateVolume();
+
+        IntentFilter filter = new IntentFilter();
+
+        // Register for Intent broadcasts for...
+        filter.addAction(Intent.ACTION_BATTERY_CHANGED);
+        filter.addAction(Intent.ACTION_BATTERY_LOW);
+        filter.addAction(Intent.ACTION_BATTERY_OKAY);
+        filter.addAction(Intent.ACTION_POWER_CONNECTED);
+        filter.addAction(Intent.ACTION_ALARM_CHANGED);
+        filter.addAction(Intent.ACTION_SYNC_STATE_CHANGED);
+        filter.addAction(AudioManager.RINGER_MODE_CHANGED_ACTION);
+        filter.addAction(AudioManager.VIBRATE_SETTING_CHANGED_ACTION);
+        filter.addAction(BluetoothAdapter.ACTION_STATE_CHANGED);
+        filter.addAction(BluetoothHeadset.ACTION_STATE_CHANGED);
+        filter.addAction(BluetoothA2dp.ACTION_SINK_STATE_CHANGED);
+        filter.addAction(BluetoothPbap.PBAP_STATE_CHANGED_ACTION);
+        filter.addAction(WifiManager.WIFI_STATE_CHANGED_ACTION);
+        filter.addAction(WifiManager.SUPPLICANT_CONNECTION_CHANGE_ACTION);
+        filter.addAction(WifiManager.NETWORK_STATE_CHANGED_ACTION);
+        filter.addAction(WifiManager.RSSI_CHANGED_ACTION);
+        filter.addAction(LocationManager.GPS_ENABLED_CHANGE_ACTION);
+        filter.addAction(LocationManager.GPS_FIX_CHANGE_ACTION);
+        filter.addAction(TelephonyIntents.ACTION_SIM_STATE_CHANGED);
+        filter.addAction(TtyIntent.TTY_ENABLED_CHANGE_ACTION);
+        mContext.registerReceiver(mIntentReceiver, filter, null, mHandler);
+
+        // load config to determine if to distinguish Hspa data icon
+        try {
+            mHspaDataDistinguishable = mContext.getResources().getBoolean(
+                    R.bool.config_hspa_data_distinguishable);
+        } catch (Exception e) {
+            mHspaDataDistinguishable = false;
+        }
+    }
+
+    private final void updateAlarm(Intent intent) {
+        boolean alarmSet = intent.getBooleanExtra("alarmSet", false);
+        mService.setIconVisibility("alarm_clock", alarmSet);
+    }
+
+    private final void updateSyncState(Intent intent) {
+        boolean isActive = intent.getBooleanExtra("active", false);
+        boolean isFailing = intent.getBooleanExtra("failing", false);
+        mService.setIconVisibility("sync_active", isActive);
+        // Don't display sync failing icon: BUG 1297963 Set sync error timeout to "never"
+        //mService.setIconVisibility("sync_failing", isFailing && !isActive);
+    }
+
+    private final void updateBattery(Intent intent) {
+        final int id = intent.getIntExtra("icon-small", 0);
+        int level = intent.getIntExtra("level", 0);
+        mService.setIcon("battery", id, level);
+
+        boolean plugged = intent.getIntExtra("plugged", 0) != 0;
+        level = intent.getIntExtra("level", -1);
+        if (false) {
+            Slog.d(TAG, "updateBattery level=" + level
+                    + " plugged=" + plugged
+                    + " mBatteryPlugged=" + mBatteryPlugged
+                    + " mBatteryLevel=" + mBatteryLevel
+                    + " mBatteryFirst=" + mBatteryFirst);
+        }
+
+        boolean oldPlugged = mBatteryPlugged;
+
+        mBatteryPlugged = plugged;
+        mBatteryLevel = level;
+
+        if (mBatteryFirst) {
+            mBatteryFirst = false;
+        }
+        /*
+         * No longer showing the battery view because it draws attention away
+         * from the USB storage notification. We could still show it when
+         * connected to a brick, but that could lead to the user into thinking
+         * the device does not charge when plugged into USB (since he/she would
+         * not see the same battery screen on USB as he sees on brick).
+         */
+        if (false) {
+            Slog.d(TAG, "plugged=" + plugged + " oldPlugged=" + oldPlugged + " level=" + level);
+        }
+    }
+
+    private void onBatteryLow(Intent intent) {
+        if (SHOW_LOW_BATTERY_WARNING) {
+            if (false) {
+                Slog.d(TAG, "mPhoneState=" + mPhoneState
+                      + " mLowBatteryDialog=" + mLowBatteryDialog
+                      + " mBatteryShowLowOnEndCall=" + mBatteryShowLowOnEndCall);
+            }
+
+            if (SHOW_BATTERY_WARNINGS_IN_CALL || mPhoneState == TelephonyManager.CALL_STATE_IDLE) {
+                showLowBatteryWarning();
+            } else {
+                mBatteryShowLowOnEndCall = true;
+            }
+        }
+    }
+
+    private void onBatteryOkay(Intent intent) {
+        if (mLowBatteryDialog != null
+                && SHOW_LOW_BATTERY_WARNING) {
+            mLowBatteryDialog.dismiss();
+            mBatteryShowLowOnEndCall = false;
+        }
+    }
+
+    private void setBatteryLevel(View parent, int id, int height, int background, int level) {
+        ImageView v = (ImageView)parent.findViewById(id);
+        LinearLayout.LayoutParams lp = (LinearLayout.LayoutParams)v.getLayoutParams();
+        lp.weight = height;
+        if (background != 0) {
+            v.setBackgroundResource(background);
+            Drawable bkg = v.getBackground();
+            bkg.setLevel(level);
+        }
+    }
+
+    private void showLowBatteryWarning() {
+        closeLastBatteryView();
+
+        // Show exact battery level.
+        CharSequence levelText = mContext.getString(
+                    R.string.battery_low_percent_format, mBatteryLevel);
+
+        if (mBatteryLevelTextView != null) {
+            mBatteryLevelTextView.setText(levelText);
+        } else {
+            View v = View.inflate(mContext, R.layout.battery_low, null);
+            mBatteryLevelTextView=(TextView)v.findViewById(R.id.level_percent);
+
+            mBatteryLevelTextView.setText(levelText);
+
+            AlertDialog.Builder b = new AlertDialog.Builder(mContext);
+                b.setCancelable(true);
+                b.setTitle(R.string.battery_low_title);
+                b.setView(v);
+                b.setIcon(android.R.drawable.ic_dialog_alert);
+                b.setPositiveButton(android.R.string.ok, null);
+
+                final Intent intent = new Intent(Intent.ACTION_POWER_USAGE_SUMMARY);
+                intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK
+                        | Intent.FLAG_ACTIVITY_MULTIPLE_TASK
+                        | Intent.FLAG_ACTIVITY_EXCLUDE_FROM_RECENTS
+                        | Intent.FLAG_ACTIVITY_NO_HISTORY);
+                if (intent.resolveActivity(mContext.getPackageManager()) != null) {
+                    b.setNegativeButton(R.string.battery_low_why,
+                            new DialogInterface.OnClickListener() {
+                        public void onClick(DialogInterface dialog, int which) {
+                            mContext.startActivity(intent);
+                            if (mLowBatteryDialog != null) {
+                                mLowBatteryDialog.dismiss();
+                            }
+                        }
+                    });
+                }
+
+            AlertDialog d = b.create();
+            d.setOnDismissListener(mLowBatteryListener);
+            d.getWindow().setType(WindowManager.LayoutParams.TYPE_SYSTEM_ALERT);
+            d.show();
+            mLowBatteryDialog = d;
+        }
+
+        final ContentResolver cr = mContext.getContentResolver();
+        if (Settings.System.getInt(cr,
+                Settings.System.POWER_SOUNDS_ENABLED, 1) == 1)
+        {
+            final String soundPath = Settings.System.getString(cr,
+                Settings.System.LOW_BATTERY_SOUND);
+            if (soundPath != null) {
+                final Uri soundUri = Uri.parse("file://" + soundPath);
+                if (soundUri != null) {
+                    final Ringtone sfx = RingtoneManager.getRingtone(mContext, soundUri);
+                    if (sfx != null) {
+                        sfx.setStreamType(AudioManager.STREAM_SYSTEM);
+                        sfx.play();
+                    }
+                }
+            }
+        }
+    }
+
+    private final void updateCallState(int state) {
+        mPhoneState = state;
+        if (false) {
+            Slog.d(TAG, "mPhoneState=" + mPhoneState
+                    + " mLowBatteryDialog=" + mLowBatteryDialog
+                    + " mBatteryShowLowOnEndCall=" + mBatteryShowLowOnEndCall);
+        }
+        if (mPhoneState == TelephonyManager.CALL_STATE_IDLE) {
+            if (mBatteryShowLowOnEndCall) {
+                if (!mBatteryPlugged) {
+                    showLowBatteryWarning();
+                }
+                mBatteryShowLowOnEndCall = false;
+            }
+        } else {
+            if (mLowBatteryDialog != null) {
+                mLowBatteryDialog.dismiss();
+                mBatteryShowLowOnEndCall = true;
+            }
+        }
+    }
+
+    private DialogInterface.OnDismissListener mLowBatteryListener
+            = new DialogInterface.OnDismissListener() {
+        public void onDismiss(DialogInterface dialog) {
+            mLowBatteryDialog = null;
+            mBatteryLevelTextView = null;
+        }
+    };
+
+    private void scheduleCloseBatteryView() {
+        Message m = mHandler.obtainMessage(EVENT_BATTERY_CLOSE);
+        m.arg1 = (++mBatteryViewSequence);
+        mHandler.sendMessageDelayed(m, 3000);
+    }
+
+    private void closeLastBatteryView() {
+        if (mBatteryView != null) {
+            //mBatteryView.debug();
+            WindowManagerImpl.getDefault().removeView(mBatteryView);
+            mBatteryView = null;
+        }
+    }
+
+    private PhoneStateListener mPhoneStateListener = new PhoneStateListener() {
+        @Override
+        public void onSignalStrengthsChanged(SignalStrength signalStrength) {
+            mSignalStrength = signalStrength;
+            updateSignalStrength();
+        }
+
+        @Override
+        public void onServiceStateChanged(ServiceState state) {
+            mServiceState = state;
+            updateSignalStrength();
+            updateCdmaRoamingIcon(state);
+            updateDataIcon();
+        }
+
+        @Override
+        public void onCallStateChanged(int state, String incomingNumber) {
+            updateCallState(state);
+            // In cdma, if a voice call is made, RSSI should switch to 1x.
+            if (isCdma()) {
+                updateSignalStrength();
+            }
+        }
+
+        @Override
+        public void onDataConnectionStateChanged(int state, int networkType) {
+            mDataState = state;
+            updateDataNetType(networkType);
+            updateDataIcon();
+        }
+
+        @Override
+        public void onDataActivity(int direction) {
+            mDataActivity = direction;
+            updateDataIcon();
+        }
+    };
+
+    private final void updateSimState(Intent intent) {
+        String stateExtra = intent.getStringExtra(IccCard.INTENT_KEY_ICC_STATE);
+        if (IccCard.INTENT_VALUE_ICC_ABSENT.equals(stateExtra)) {
+            mSimState = IccCard.State.ABSENT;
+        }
+        else if (IccCard.INTENT_VALUE_ICC_READY.equals(stateExtra)) {
+            mSimState = IccCard.State.READY;
+        }
+        else if (IccCard.INTENT_VALUE_ICC_LOCKED.equals(stateExtra)) {
+            final String lockedReason = intent.getStringExtra(IccCard.INTENT_KEY_LOCKED_REASON);
+            if (IccCard.INTENT_VALUE_LOCKED_ON_PIN.equals(lockedReason)) {
+                mSimState = IccCard.State.PIN_REQUIRED;
+            }
+            else if (IccCard.INTENT_VALUE_LOCKED_ON_PUK.equals(lockedReason)) {
+                mSimState = IccCard.State.PUK_REQUIRED;
+            }
+            else {
+                mSimState = IccCard.State.NETWORK_LOCKED;
+            }
+        } else {
+            mSimState = IccCard.State.UNKNOWN;
+        }
+        updateDataIcon();
+    }
+
+    private boolean isCdma() {
+        return (mSignalStrength != null) && !mSignalStrength.isGsm();
+    }
+
+    private boolean isEvdo() {
+        return ( (mServiceState != null)
+                 && ((mServiceState.getRadioTechnology()
+                        == ServiceState.RADIO_TECHNOLOGY_EVDO_0)
+                     || (mServiceState.getRadioTechnology()
+                        == ServiceState.RADIO_TECHNOLOGY_EVDO_A)
+                     || (mServiceState.getRadioTechnology()
+                        == ServiceState.RADIO_TECHNOLOGY_EVDO_B)));
+    }
+
+    private boolean hasService() {
+        if (mServiceState != null) {
+            switch (mServiceState.getState()) {
+                case ServiceState.STATE_OUT_OF_SERVICE:
+                case ServiceState.STATE_POWER_OFF:
+                    return false;
+                default:
+                    return true;
+            }
+        } else {
+            return false;
+        }
+    }
+
+    private final void updateSignalStrength() {
+        int iconLevel = -1;
+        int[] iconList;
+
+        // Display signal strength while in "emergency calls only" mode
+        if (!hasService() && !mServiceState.isEmergencyOnly()) {
+            //Slog.d(TAG, "updateSignalStrength: no service");
+            if (Settings.System.getInt(mContext.getContentResolver(),
+                    Settings.System.AIRPLANE_MODE_ON, 0) == 1) {
+                mPhoneSignalIconId = R.drawable.stat_sys_signal_flightmode;
+            } else {
+                mPhoneSignalIconId = R.drawable.stat_sys_signal_null;
+            }
+            mService.setIcon("phone_signal", mPhoneSignalIconId, 0);
+            return;
+        }
+
+        if (!isCdma()) {
+            int asu = mSignalStrength.getGsmSignalStrength();
+
+            // ASU ranges from 0 to 31 - TS 27.007 Sec 8.5
+            // asu = 0 (-113dB or less) is very weak
+            // signal, its better to show 0 bars to the user in such cases.
+            // asu = 99 is a special case, where the signal strength is unknown.
+            if (asu <= 2 || asu == 99) iconLevel = 0;
+            else if (asu >= 12) iconLevel = 4;
+            else if (asu >= 8)  iconLevel = 3;
+            else if (asu >= 5)  iconLevel = 2;
+            else iconLevel = 1;
+
+            // Though mPhone is a Manager, this call is not an IPC
+            if (mPhone.isNetworkRoaming()) {
+                iconList = sSignalImages_r;
+            } else {
+                iconList = sSignalImages;
+            }
+        } else {
+            iconList = this.sSignalImages;
+
+            // If 3G(EV) and 1x network are available than 3G should be
+            // displayed, displayed RSSI should be from the EV side.
+            // If a voice call is made then RSSI should switch to 1x.
+            if ((mPhoneState == TelephonyManager.CALL_STATE_IDLE) && isEvdo()){
+                iconLevel = getEvdoLevel();
+                if (false) {
+                    Slog.d(TAG, "use Evdo level=" + iconLevel + " to replace Cdma Level=" + getCdmaLevel());
+                }
+            } else {
+                iconLevel = getCdmaLevel();
+            }
+        }
+        mPhoneSignalIconId = iconList[iconLevel];
+        mService.setIcon("phone_signal", mPhoneSignalIconId, 0);
+    }
+
+    private int getCdmaLevel() {
+        final int cdmaDbm = mSignalStrength.getCdmaDbm();
+        final int cdmaEcio = mSignalStrength.getCdmaEcio();
+        int levelDbm = 0;
+        int levelEcio = 0;
+
+        if (cdmaDbm >= -75) levelDbm = 4;
+        else if (cdmaDbm >= -85) levelDbm = 3;
+        else if (cdmaDbm >= -95) levelDbm = 2;
+        else if (cdmaDbm >= -100) levelDbm = 1;
+        else levelDbm = 0;
+
+        // Ec/Io are in dB*10
+        if (cdmaEcio >= -90) levelEcio = 4;
+        else if (cdmaEcio >= -110) levelEcio = 3;
+        else if (cdmaEcio >= -130) levelEcio = 2;
+        else if (cdmaEcio >= -150) levelEcio = 1;
+        else levelEcio = 0;
+
+        return (levelDbm < levelEcio) ? levelDbm : levelEcio;
+    }
+
+    private int getEvdoLevel() {
+        int evdoDbm = mSignalStrength.getEvdoDbm();
+        int evdoSnr = mSignalStrength.getEvdoSnr();
+        int levelEvdoDbm = 0;
+        int levelEvdoSnr = 0;
+
+        if (evdoDbm >= -65) levelEvdoDbm = 4;
+        else if (evdoDbm >= -75) levelEvdoDbm = 3;
+        else if (evdoDbm >= -90) levelEvdoDbm = 2;
+        else if (evdoDbm >= -105) levelEvdoDbm = 1;
+        else levelEvdoDbm = 0;
+
+        if (evdoSnr >= 7) levelEvdoSnr = 4;
+        else if (evdoSnr >= 5) levelEvdoSnr = 3;
+        else if (evdoSnr >= 3) levelEvdoSnr = 2;
+        else if (evdoSnr >= 1) levelEvdoSnr = 1;
+        else levelEvdoSnr = 0;
+
+        return (levelEvdoDbm < levelEvdoSnr) ? levelEvdoDbm : levelEvdoSnr;
+    }
+
+    private final void updateDataNetType(int net) {
+        switch (net) {
+        case TelephonyManager.NETWORK_TYPE_EDGE:
+            mDataIconList = sDataNetType_e;
+            break;
+        case TelephonyManager.NETWORK_TYPE_UMTS:
+            mDataIconList = sDataNetType_3g;
+            break;
+        case TelephonyManager.NETWORK_TYPE_HSDPA:
+        case TelephonyManager.NETWORK_TYPE_HSUPA:
+        case TelephonyManager.NETWORK_TYPE_HSPA:
+            if (mHspaDataDistinguishable) {
+                mDataIconList = sDataNetType_h;
+            } else {
+                mDataIconList = sDataNetType_3g;
+            }
+            break;
+        case TelephonyManager.NETWORK_TYPE_CDMA:
+            // display 1xRTT for IS95A/B
+            mDataIconList = this.sDataNetType_1x;
+            break;
+        case TelephonyManager.NETWORK_TYPE_1xRTT:
+            mDataIconList = this.sDataNetType_1x;
+            break;
+        case TelephonyManager.NETWORK_TYPE_EVDO_0: //fall through
+        case TelephonyManager.NETWORK_TYPE_EVDO_A:
+        case TelephonyManager.NETWORK_TYPE_EVDO_B:
+            mDataIconList = sDataNetType_3g;
+            break;
+        default:
+            mDataIconList = sDataNetType_g;
+        break;
+        }
+    }
+
+    private final void updateDataIcon() {
+        int iconId;
+        boolean visible = true;
+
+        if (!isCdma()) {
+            // GSM case, we have to check also the sim state
+            if (mSimState == IccCard.State.READY || mSimState == IccCard.State.UNKNOWN) {
+                if (hasService() && mDataState == TelephonyManager.DATA_CONNECTED) {
+                    switch (mDataActivity) {
+                        case TelephonyManager.DATA_ACTIVITY_IN:
+                            iconId = mDataIconList[1];
+                            break;
+                        case TelephonyManager.DATA_ACTIVITY_OUT:
+                            iconId = mDataIconList[2];
+                            break;
+                        case TelephonyManager.DATA_ACTIVITY_INOUT:
+                            iconId = mDataIconList[3];
+                            break;
+                        default:
+                            iconId = mDataIconList[0];
+                            break;
+                    }
+                    mService.setIcon("data_connection", iconId, 0);
+                } else {
+                    visible = false;
+                }
+            } else {
+                iconId = R.drawable.stat_sys_no_sim;
+                mService.setIcon("data_connection", iconId, 0);
+            }
+        } else {
+            // CDMA case, mDataActivity can be also DATA_ACTIVITY_DORMANT
+            if (hasService() && mDataState == TelephonyManager.DATA_CONNECTED) {
+                switch (mDataActivity) {
+                    case TelephonyManager.DATA_ACTIVITY_IN:
+                        iconId = mDataIconList[1];
+                        break;
+                    case TelephonyManager.DATA_ACTIVITY_OUT:
+                        iconId = mDataIconList[2];
+                        break;
+                    case TelephonyManager.DATA_ACTIVITY_INOUT:
+                        iconId = mDataIconList[3];
+                        break;
+                    case TelephonyManager.DATA_ACTIVITY_DORMANT:
+                    default:
+                        iconId = mDataIconList[0];
+                        break;
+                }
+                mService.setIcon("data_connection", iconId, 0);
+            } else {
+                visible = false;
+            }
+        }
+
+        long ident = Binder.clearCallingIdentity();
+        try {
+            mBatteryStats.notePhoneDataConnectionState(mPhone.getNetworkType(), visible);
+        } catch (RemoteException e) {
+        } finally {
+            Binder.restoreCallingIdentity(ident);
+        }
+
+        if (mDataIconVisible != visible) {
+            mService.setIconVisibility("data_connection", visible);
+            mDataIconVisible = visible;
+        }
+    }
+
+    private final void updateVolume() {
+        AudioManager audioManager = (AudioManager) mContext.getSystemService(Context.AUDIO_SERVICE);
+        final int ringerMode = audioManager.getRingerMode();
+        final boolean visible = ringerMode == AudioManager.RINGER_MODE_SILENT ||
+                ringerMode == AudioManager.RINGER_MODE_VIBRATE;
+        final int iconId = audioManager.shouldVibrate(AudioManager.VIBRATE_TYPE_RINGER)
+                ? R.drawable.stat_sys_ringer_vibrate
+                : R.drawable.stat_sys_ringer_silent;
+
+        if (visible) {
+            mService.setIcon("volume", iconId, 0);
+        }
+        if (visible != mVolumeVisible) {
+            mService.setIconVisibility("volume", visible);
+            mVolumeVisible = visible;
+        }
+    }
+
+    private final void updateBluetooth(Intent intent) {
+        int iconId = R.drawable.stat_sys_data_bluetooth;
+        String action = intent.getAction();
+        if (action.equals(BluetoothAdapter.ACTION_STATE_CHANGED)) {
+            int state = intent.getIntExtra(BluetoothAdapter.EXTRA_STATE, BluetoothAdapter.ERROR);
+            mBluetoothEnabled = state == BluetoothAdapter.STATE_ON;
+        } else if (action.equals(BluetoothHeadset.ACTION_STATE_CHANGED)) {
+            mBluetoothHeadsetState = intent.getIntExtra(BluetoothHeadset.EXTRA_STATE,
+                    BluetoothHeadset.STATE_ERROR);
+        } else if (action.equals(BluetoothA2dp.ACTION_SINK_STATE_CHANGED)) {
+            BluetoothA2dp a2dp = new BluetoothA2dp(mContext);
+            if (a2dp.getConnectedSinks().size() != 0) {
+                mBluetoothA2dpConnected = true;
+            } else {
+                mBluetoothA2dpConnected = false;
+            }
+        } else if (action.equals(BluetoothPbap.PBAP_STATE_CHANGED_ACTION)) {
+            mBluetoothPbapState = intent.getIntExtra(BluetoothPbap.PBAP_STATE,
+                    BluetoothPbap.STATE_DISCONNECTED);
+        } else {
+            return;
+        }
+
+        if (mBluetoothHeadsetState == BluetoothHeadset.STATE_CONNECTED || mBluetoothA2dpConnected ||
+                mBluetoothPbapState == BluetoothPbap.STATE_CONNECTED) {
+            iconId = R.drawable.stat_sys_data_bluetooth_connected;
+        }
+
+        mService.setIcon("bluetooth", iconId, 0);
+        mService.setIconVisibility("bluetooth", mBluetoothEnabled);
+    }
+
+    private final void updateWifi(Intent intent) {
+        final String action = intent.getAction();
+        if (action.equals(WifiManager.WIFI_STATE_CHANGED_ACTION)) {
+
+            final boolean enabled = intent.getIntExtra(WifiManager.EXTRA_WIFI_STATE,
+                    WifiManager.WIFI_STATE_UNKNOWN) == WifiManager.WIFI_STATE_ENABLED;
+
+            if (!enabled) {
+                // If disabled, hide the icon. (We show icon when connected.)
+                mService.setIconVisibility("wifi", false);
+            }
+
+        } else if (action.equals(WifiManager.SUPPLICANT_CONNECTION_CHANGE_ACTION)) {
+            final boolean enabled = intent.getBooleanExtra(WifiManager.EXTRA_SUPPLICANT_CONNECTED,
+                                                           false);
+            if (!enabled) {
+                mService.setIconVisibility("wifi", false);
+            }
+        } else if (action.equals(WifiManager.NETWORK_STATE_CHANGED_ACTION)) {
+
+            final NetworkInfo networkInfo = (NetworkInfo)
+                    intent.getParcelableExtra(WifiManager.EXTRA_NETWORK_INFO);
+
+            int iconId;
+            if (networkInfo != null && networkInfo.isConnected()) {
+                mIsWifiConnected = true;
+                if (mLastWifiSignalLevel == -1) {
+                    iconId = sWifiSignalImages[0];
+                } else {
+                    iconId = sWifiSignalImages[mLastWifiSignalLevel];
+                }
+
+                // Show the icon since wi-fi is connected
+                mService.setIconVisibility("wifi", true);
+
+            } else {
+                mLastWifiSignalLevel = -1;
+                mIsWifiConnected = false;
+                iconId = sWifiSignalImages[0];
+
+                // Hide the icon since we're not connected
+                mService.setIconVisibility("wifi", false);
+            }
+
+            mService.setIcon("wifi", iconId, 0);
+        } else if (action.equals(WifiManager.RSSI_CHANGED_ACTION)) {
+            int iconId;
+            final int newRssi = intent.getIntExtra(WifiManager.EXTRA_NEW_RSSI, -200);
+            int newSignalLevel = WifiManager.calculateSignalLevel(newRssi,
+                                                                  sWifiSignalImages.length);
+            if (newSignalLevel != mLastWifiSignalLevel) {
+                mLastWifiSignalLevel = newSignalLevel;
+                if (mIsWifiConnected) {
+                    iconId = sWifiSignalImages[newSignalLevel];
+                } else {
+                    iconId = sWifiTemporarilyNotConnectedImage;
+                }
+                mService.setIcon("wifi", iconId, 0);
+            }
+        }
+    }
+
+    private final void updateGps(Intent intent) {
+        final String action = intent.getAction();
+        final boolean enabled = intent.getBooleanExtra(LocationManager.EXTRA_GPS_ENABLED, false);
+
+        if (action.equals(LocationManager.GPS_FIX_CHANGE_ACTION) && enabled) {
+            // GPS is getting fixes
+            mService.setIcon("gps", com.android.internal.R.drawable.stat_sys_gps_on, 0);
+            mService.setIconVisibility("gps", true);
+        } else if (action.equals(LocationManager.GPS_ENABLED_CHANGE_ACTION) && !enabled) {
+            // GPS is off
+            mService.setIconVisibility("gps", false);
+        } else {
+            // GPS is on, but not receiving fixes
+            mService.setIcon("gps", R.drawable.stat_sys_gps_acquiring_anim, 0);
+            mService.setIconVisibility("gps", true);
+        }
+    }
+
+    private final void updateTTY(Intent intent) {
+        final String action = intent.getAction();
+        final boolean enabled = intent.getBooleanExtra(TtyIntent.TTY_ENABLED, false);
+
+        if (false) Slog.v(TAG, "updateTTY: enabled: " + enabled);
+
+        if (enabled) {
+            // TTY is on
+            if (false) Slog.v(TAG, "updateTTY: set TTY on");
+            mService.setIcon("tty", R.drawable.stat_sys_tty_mode, 0);
+            mService.setIconVisibility("tty", true);
+        } else {
+            // TTY is off
+            if (false) Slog.v(TAG, "updateTTY: set TTY off");
+            mService.setIconVisibility("tty", false);
+        }
+    }
+
+    private final void updateCdmaRoamingIcon(ServiceState state) {
+        if (!hasService()) {
+            mService.setIconVisibility("cdma_eri", false);
+            return;
+        }
+
+        if (!isCdma()) {
+            mService.setIconVisibility("cdma_eri", false);
+            return;
+        }
+
+        int[] iconList = sRoamingIndicatorImages_cdma;
+        int iconIndex = state.getCdmaEriIconIndex();
+        int iconMode = state.getCdmaEriIconMode();
+
+        if (iconIndex == -1) {
+            Slog.e(TAG, "getCdmaEriIconIndex returned null, skipping ERI icon update");
+            return;
+        }
+
+        if (iconMode == -1) {
+            Slog.e(TAG, "getCdmeEriIconMode returned null, skipping ERI icon update");
+            return;
+        }
+
+        if (iconIndex == EriInfo.ROAMING_INDICATOR_OFF) {
+            if (false) Slog.v(TAG, "Cdma ROAMING_INDICATOR_OFF, removing ERI icon");
+            mService.setIconVisibility("cdma_eri", false);
+            return;
+        }
+
+        switch (iconMode) {
+            case EriInfo.ROAMING_ICON_MODE_NORMAL:
+                mService.setIcon("cdma_eri", iconList[iconIndex], 0);
+                mService.setIconVisibility("cdma_eri", true);
+                break;
+            case EriInfo.ROAMING_ICON_MODE_FLASH:
+                mService.setIcon("cdma_eri", R.drawable.stat_sys_roaming_cdma_flash, 0);
+                mService.setIconVisibility("cdma_eri", true);
+                break;
+
+        }
+        mService.setIcon("phone_signal", mPhoneSignalIconId, 0);
+    }
+
+
+    private class StatusBarHandler extends Handler {
+        @Override
+        public void handleMessage(Message msg) {
+            switch (msg.what) {
+            case EVENT_BATTERY_CLOSE:
+                if (msg.arg1 == mBatteryViewSequence) {
+                    closeLastBatteryView();
+                }
+                break;
+            }
+        }
+    }
+}
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/StatusBarService.java b/packages/SystemUI/src/com/android/systemui/statusbar/StatusBarService.java
new file mode 100644
index 0000000..07bcce7
--- /dev/null
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/StatusBarService.java
@@ -0,0 +1,1606 @@
+/*
+ * Copyright (C) 2010 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.android.systemui.statusbar;
+
+import android.app.Service;
+import com.android.internal.statusbar.IStatusBar;
+import com.android.internal.statusbar.IStatusBarService;
+import com.android.internal.statusbar.StatusBarIcon;
+import com.android.internal.statusbar.StatusBarIconList;
+import com.android.internal.statusbar.StatusBarNotification;
+
+import android.app.ActivityManagerNative;
+import android.app.Dialog;
+import android.app.Notification;
+import android.app.PendingIntent;
+import android.app.Service;
+import android.app.StatusBarManager;
+import android.content.BroadcastReceiver;
+import android.content.Context;
+import android.content.Intent;
+import android.content.IntentFilter;
+import android.content.pm.PackageManager;
+import android.content.res.Resources;
+import android.graphics.PixelFormat;
+import android.graphics.Rect;
+import android.graphics.drawable.Drawable;
+import android.net.Uri;
+import android.os.IBinder;
+import android.os.RemoteException;
+import android.os.Binder;
+import android.os.Handler;
+import android.os.Message;
+import android.os.ServiceManager;
+import android.os.SystemClock;
+import android.util.Slog;
+import android.util.Log;
+import android.view.Display;
+import android.view.Gravity;
+import android.view.KeyEvent;
+import android.view.LayoutInflater;
+import android.view.MotionEvent;
+import android.view.VelocityTracker;
+import android.view.View;
+import android.view.ViewGroup;
+import android.view.Window;
+import android.view.WindowManager;
+import android.view.WindowManagerImpl;
+import android.view.animation.Animation;
+import android.view.animation.AnimationUtils;
+import android.widget.ImageView;
+import android.widget.LinearLayout;
+import android.widget.RemoteViews;
+import android.widget.ScrollView;
+import android.widget.TextView;
+import android.widget.FrameLayout;
+
+import java.io.FileDescriptor;
+import java.io.PrintWriter;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.Set;
+
+import com.android.systemui.R;
+import com.android.systemui.statusbar.policy.StatusBarPolicy;
+
+
+
+public class StatusBarService extends Service implements CommandQueue.Callbacks {
+    static final String TAG = "StatusBarService";
+    static final boolean SPEW = false;
+
+    public static final String ACTION_STATUSBAR_START
+            = "com.android.internal.policy.statusbar.START";
+
+    static final int EXPANDED_LEAVE_ALONE = -10000;
+    static final int EXPANDED_FULL_OPEN = -10001;
+
+    private static final int MSG_ANIMATE = 1000;
+    private static final int MSG_ANIMATE_REVEAL = 1001;
+    private static final int MSG_SHOW_INTRUDER = 1002;
+    private static final int MSG_HIDE_INTRUDER = 1003;
+
+    // will likely move to a resource or other tunable param at some point
+    private static final int INTRUDER_ALERT_DECAY_MS = 10000;
+
+    StatusBarPolicy mIconPolicy;
+
+    CommandQueue mCommandQueue;
+    IStatusBarService mBarService;
+
+    int mIconSize;
+    Display mDisplay;
+    StatusBarView mStatusBarView;
+    int mPixelFormat;
+    H mHandler = new H();
+    Object mQueueLock = new Object();
+
+    // icons
+    LinearLayout mIcons;
+    IconMerger mNotificationIcons;
+    LinearLayout mStatusIcons;
+
+    // expanded notifications
+    Dialog mExpandedDialog;
+    ExpandedView mExpandedView;
+    WindowManager.LayoutParams mExpandedParams;
+    ScrollView mScrollView;
+    View mNotificationLinearLayout;
+    View mExpandedContents;
+    // top bar
+    TextView mNoNotificationsTitle;
+    TextView mClearButton;
+    // drag bar
+    CloseDragHandle mCloseView;
+    // ongoing
+    NotificationData mOngoing = new NotificationData();
+    TextView mOngoingTitle;
+    LinearLayout mOngoingItems;
+    // latest
+    NotificationData mLatest = new NotificationData();
+    TextView mLatestTitle;
+    LinearLayout mLatestItems;
+    // position
+    int[] mPositionTmp = new int[2];
+    boolean mExpanded;
+    boolean mExpandedVisible;
+
+    // the date view
+    DateView mDateView;
+
+    // the tracker view
+    TrackingView mTrackingView;
+    WindowManager.LayoutParams mTrackingParams;
+    int mTrackingPosition; // the position of the top of the tracking view.
+    private boolean mPanelSlightlyVisible;
+
+    // ticker
+    private Ticker mTicker;
+    private View mTickerView;
+    private boolean mTicking;
+
+    // Tracking finger for opening/closing.
+    int mEdgeBorder; // corresponds to R.dimen.status_bar_edge_ignore
+    boolean mTracking;
+    VelocityTracker mVelocityTracker;
+
+    static final int ANIM_FRAME_DURATION = (1000/60);
+
+    boolean mAnimating;
+    long mCurAnimationTime;
+    float mDisplayHeight;
+    float mAnimY;
+    float mAnimVel;
+    float mAnimAccel;
+    long mAnimLastTime;
+    boolean mAnimatingReveal = false;
+    int mViewDelta;
+    int[] mAbsPos = new int[2];
+
+    // for disabling the status bar
+    int mDisabled = 0;
+
+    private class ExpandedDialog extends Dialog {
+        ExpandedDialog(Context context) {
+            super(context, com.android.internal.R.style.Theme_Light_NoTitleBar);
+        }
+
+        @Override
+        public boolean dispatchKeyEvent(KeyEvent event) {
+            boolean down = event.getAction() == KeyEvent.ACTION_DOWN;
+            switch (event.getKeyCode()) {
+            case KeyEvent.KEYCODE_BACK:
+                if (!down) {
+                    animateCollapse();
+                }
+                return true;
+            }
+            return super.dispatchKeyEvent(event);
+        }
+    }
+
+
+    @Override
+    public void onCreate() {
+        // First set up our views and stuff.
+        mDisplay = ((WindowManager)getSystemService(Context.WINDOW_SERVICE)).getDefaultDisplay();
+        makeStatusBarView(this);
+
+        // Connect in to the status bar manager service
+        StatusBarIconList iconList = new StatusBarIconList();
+        ArrayList<IBinder> notificationKeys = new ArrayList<IBinder>();
+        ArrayList<StatusBarNotification> notifications = new ArrayList<StatusBarNotification>();
+        mCommandQueue = new CommandQueue(this, iconList);
+        mBarService = IStatusBarService.Stub.asInterface(
+                ServiceManager.getService(Context.STATUS_BAR_SERVICE));
+        try {
+            mBarService.registerStatusBar(mCommandQueue, iconList, notificationKeys, notifications);
+        } catch (RemoteException ex) {
+            // If the system process isn't there we're doomed anyway.
+        }
+
+        // Set up the initial icon state
+        int N = iconList.size();
+        int viewIndex = 0;
+        for (int i=0; i<N; i++) {
+            StatusBarIcon icon = iconList.getIcon(i);
+            if (icon != null) {
+                addIcon(iconList.getSlot(i), i, viewIndex, icon);
+                viewIndex++;
+            }
+        }
+
+        // Set up the initial notification state
+        N = notificationKeys.size();
+        if (N == notifications.size()) {
+            for (int i=0; i<N; i++) {
+                addNotification(notificationKeys.get(i), notifications.get(i));
+            }
+        } else {
+            Log.wtf(TAG, "Notification list length mismatch: keys=" + N
+                    + " notifications=" + notifications.size());
+        }
+
+        // Put up the view
+        addStatusBarView();
+
+        // Lastly, call to the icon policy to install/update all the icons.
+        mIconPolicy = new StatusBarPolicy(this);
+    }
+
+    @Override
+    public void onDestroy() {
+        // we're never destroyed
+    }
+
+    // for immersive activities
+    private View mIntruderAlertView;
+
+    /**
+     * Nobody binds to us.
+     */
+    @Override
+    public IBinder onBind(Intent intent) {
+        return null;
+    }
+
+    // ================================================================================
+    // Constructing the view
+    // ================================================================================
+    private void makeStatusBarView(Context context) {
+        Resources res = context.getResources();
+
+        mIconSize = res.getDimensionPixelSize(com.android.internal.R.dimen.status_bar_icon_size);
+
+        ExpandedView expanded = (ExpandedView)View.inflate(context,
+                R.layout.status_bar_expanded, null);
+        expanded.mService = this;
+
+        mIntruderAlertView = View.inflate(context, R.layout.intruder_alert, null);
+        mIntruderAlertView.setVisibility(View.GONE);
+        mIntruderAlertView.setClickable(true);
+
+        StatusBarView sb = (StatusBarView)View.inflate(context, R.layout.status_bar, null);
+        sb.mService = this;
+
+        // figure out which pixel-format to use for the status bar.
+        mPixelFormat = PixelFormat.TRANSLUCENT;
+        Drawable bg = sb.getBackground();
+        if (bg != null) {
+            mPixelFormat = bg.getOpacity();
+        }
+
+        mStatusBarView = sb;
+        mStatusIcons = (LinearLayout)sb.findViewById(R.id.statusIcons);
+        mNotificationIcons = (IconMerger)sb.findViewById(R.id.notificationIcons);
+        mIcons = (LinearLayout)sb.findViewById(R.id.icons);
+        mTickerView = sb.findViewById(R.id.ticker);
+        mDateView = (DateView)sb.findViewById(R.id.date);
+
+        mExpandedDialog = new ExpandedDialog(context);
+        mExpandedView = expanded;
+        mExpandedContents = expanded.findViewById(R.id.notificationLinearLayout);
+        mOngoingTitle = (TextView)expanded.findViewById(R.id.ongoingTitle);
+        mOngoingItems = (LinearLayout)expanded.findViewById(R.id.ongoingItems);
+        mLatestTitle = (TextView)expanded.findViewById(R.id.latestTitle);
+        mLatestItems = (LinearLayout)expanded.findViewById(R.id.latestItems);
+        mNoNotificationsTitle = (TextView)expanded.findViewById(R.id.noNotificationsTitle);
+        mClearButton = (TextView)expanded.findViewById(R.id.clear_all_button);
+        mClearButton.setOnClickListener(mClearButtonListener);
+        mScrollView = (ScrollView)expanded.findViewById(R.id.scroll);
+        mNotificationLinearLayout = expanded.findViewById(R.id.notificationLinearLayout);
+
+        mOngoingTitle.setVisibility(View.GONE);
+        mLatestTitle.setVisibility(View.GONE);
+
+        mTicker = new MyTicker(context, sb);
+
+        TickerView tickerView = (TickerView)sb.findViewById(R.id.tickerText);
+        tickerView.mTicker = mTicker;
+
+        mTrackingView = (TrackingView)View.inflate(context, R.layout.status_bar_tracking, null);
+        mTrackingView.mService = this;
+        mCloseView = (CloseDragHandle)mTrackingView.findViewById(R.id.close);
+        mCloseView.mService = this;
+
+        mEdgeBorder = res.getDimensionPixelSize(R.dimen.status_bar_edge_ignore);
+
+        // the more notifications icon
+        StatusBarIconView moreView = new StatusBarIconView(this, "more");
+        moreView.set(new StatusBarIcon(null, R.drawable.stat_notify_more, 0));
+        mNotificationIcons.addMoreView(moreView,
+                new LinearLayout.LayoutParams(mIconSize, mIconSize));
+
+        // set the inital view visibility
+        setAreThereNotifications();
+        mDateView.setVisibility(View.INVISIBLE);
+
+        // receive broadcasts
+        IntentFilter filter = new IntentFilter();
+        filter.addAction(Intent.ACTION_CONFIGURATION_CHANGED);
+        filter.addAction(Intent.ACTION_CLOSE_SYSTEM_DIALOGS);
+        filter.addAction(Intent.ACTION_SCREEN_OFF);
+        context.registerReceiver(mBroadcastReceiver, filter);
+    }
+
+    protected void addStatusBarView() {
+        Resources res = getResources();
+        final int height= res.getDimensionPixelSize(com.android.internal.R.dimen.status_bar_height);
+
+        final StatusBarView view = mStatusBarView;
+        WindowManager.LayoutParams lp = new WindowManager.LayoutParams(
+                ViewGroup.LayoutParams.MATCH_PARENT,
+                height,
+                WindowManager.LayoutParams.TYPE_STATUS_BAR,
+                WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE
+                    | WindowManager.LayoutParams.FLAG_TOUCHABLE_WHEN_WAKING,
+                PixelFormat.RGBX_8888);
+        lp.gravity = Gravity.TOP | Gravity.FILL_HORIZONTAL;
+        lp.setTitle("StatusBar");
+        // TODO lp.windowAnimations = R.style.Animation_StatusBar;
+
+        WindowManagerImpl.getDefault().addView(view, lp);
+
+        lp = new WindowManager.LayoutParams(
+                ViewGroup.LayoutParams.MATCH_PARENT,
+                ViewGroup.LayoutParams.WRAP_CONTENT,
+                WindowManager.LayoutParams.TYPE_STATUS_BAR_PANEL,
+                WindowManager.LayoutParams.FLAG_LAYOUT_IN_SCREEN
+                    | WindowManager.LayoutParams.FLAG_LAYOUT_NO_LIMITS
+                    | WindowManager.LayoutParams.FLAG_NOT_TOUCH_MODAL
+                    | WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE
+                    | WindowManager.LayoutParams.FLAG_ALT_FOCUSABLE_IM,
+                PixelFormat.TRANSLUCENT);
+        lp.gravity = Gravity.TOP | Gravity.FILL_HORIZONTAL;
+        lp.y += height * 1.5; // FIXME
+        lp.setTitle("IntruderAlert");
+        lp.windowAnimations = com.android.internal.R.style.Animation_StatusBar_IntruderAlert;
+
+        WindowManagerImpl.getDefault().addView(mIntruderAlertView, lp);
+    }
+
+    public void addIcon(String slot, int index, int viewIndex, StatusBarIcon icon) {
+        if (SPEW) Slog.d(TAG, "addIcon slot=" + slot + " index=" + index + " viewIndex=" + viewIndex
+                + " icon=" + icon);
+        StatusBarIconView view = new StatusBarIconView(this, slot);
+        view.set(icon);
+        mStatusIcons.addView(view, viewIndex, new LinearLayout.LayoutParams(mIconSize, mIconSize));
+    }
+
+    public void updateIcon(String slot, int index, int viewIndex,
+            StatusBarIcon old, StatusBarIcon icon) {
+        if (SPEW) Slog.d(TAG, "updateIcon slot=" + slot + " index=" + index + " viewIndex=" + viewIndex
+                + " old=" + old + " icon=" + icon);
+        StatusBarIconView view = (StatusBarIconView)mStatusIcons.getChildAt(viewIndex);
+        view.set(icon);
+    }
+
+    public void removeIcon(String slot, int index, int viewIndex) {
+        if (SPEW) Slog.d(TAG, "removeIcon slot=" + slot + " index=" + index + " viewIndex=" + viewIndex);
+        mStatusIcons.removeViewAt(viewIndex);
+    }
+
+    public void addNotification(IBinder key, StatusBarNotification notification) {
+        StatusBarIconView iconView = addNotificationViews(key, notification);
+        if (iconView == null) return;
+
+        boolean immersive = false;
+        try {
+            immersive = ActivityManagerNative.getDefault().isTopActivityImmersive();
+            Slog.d(TAG, "Top activity is " + (immersive?"immersive":"not immersive"));
+        } catch (RemoteException ex) {
+        }
+        if (immersive) {
+            if ((notification.notification.flags & Notification.FLAG_HIGH_PRIORITY) != 0) {
+                Slog.d(TAG, "Presenting high-priority notification in immersive activity");
+                // @@@ special new transient ticker mode
+                // 1. Populate mIntruderAlertView
+
+                ImageView alertIcon = (ImageView) mIntruderAlertView.findViewById(R.id.alertIcon);
+                TextView alertText = (TextView) mIntruderAlertView.findViewById(R.id.alertText);
+                alertIcon.setImageDrawable(StatusBarIconView.getIcon(
+                    alertIcon.getContext(),
+                    iconView.getStatusBarIcon()));
+                alertText.setText(notification.notification.tickerText);
+
+                View button = mIntruderAlertView.findViewById(R.id.intruder_alert_content);
+                button.setOnClickListener(
+                    new Launcher(notification.notification.contentIntent,
+                        notification.pkg, notification.tag, notification.id));
+
+                // 2. Animate mIntruderAlertView in
+                mHandler.sendEmptyMessage(MSG_SHOW_INTRUDER);
+
+                // 3. Set alarm to age the notification off (TODO)
+                mHandler.removeMessages(MSG_HIDE_INTRUDER);
+                mHandler.sendEmptyMessageDelayed(MSG_HIDE_INTRUDER, INTRUDER_ALERT_DECAY_MS);
+            }
+        } else if (notification.notification.fullScreenIntent != null) {
+            // not immersive & a full-screen alert should be shown
+            Slog.d(TAG, "Notification has fullScreenIntent and activity is not immersive;"
+                    + " sending fullScreenIntent");
+            try {
+                notification.notification.fullScreenIntent.send();
+            } catch (PendingIntent.CanceledException e) {
+            }
+        } else {
+            // usual case: status bar visible & not immersive
+
+            // show the ticker
+            tick(notification);
+        }
+
+        // Recalculate the position of the sliding windows and the titles.
+        setAreThereNotifications();
+        updateExpandedViewPos(EXPANDED_LEAVE_ALONE);
+    }
+
+    public void updateNotification(IBinder key, StatusBarNotification notification) {
+        Slog.d(TAG, "updateNotification key=" + key + " notification=" + notification);
+
+        NotificationData oldList;
+        int oldIndex = mOngoing.findEntry(key);
+        if (oldIndex >= 0) {
+            oldList = mOngoing;
+        } else {
+            oldIndex = mLatest.findEntry(key);
+            if (oldIndex < 0) {
+                Slog.w(TAG, "updateNotification for unknown key: " + key);
+                return;
+            }
+            oldList = mLatest;
+        }
+        final NotificationData.Entry oldEntry = oldList.getEntryAt(oldIndex);
+        final StatusBarNotification oldNotification = oldEntry.notification;
+        final RemoteViews oldContentView = oldNotification.notification.contentView;
+
+        final RemoteViews contentView = notification.notification.contentView;
+
+        if (false) {
+            Slog.d(TAG, "old notification: when=" + oldNotification.notification.when
+                    + " ongoing=" + oldNotification.isOngoing()
+                    + " expanded=" + oldEntry.expanded
+                    + " contentView=" + oldContentView);
+            Slog.d(TAG, "new notification: when=" + notification.notification.when
+                    + " ongoing=" + oldNotification.isOngoing()
+                    + " contentView=" + contentView);
+        }
+
+        // Can we just reapply the RemoteViews in place?  If when didn't change, the order
+        // didn't change.
+        if (notification.notification.when == oldNotification.notification.when
+                && notification.isOngoing() == oldNotification.isOngoing()
+                && oldEntry.expanded != null
+                && contentView != null && oldContentView != null
+                && contentView.getPackage() != null
+                && oldContentView.getPackage() != null
+                && oldContentView.getPackage().equals(contentView.getPackage())
+                && oldContentView.getLayoutId() == contentView.getLayoutId()) {
+            if (SPEW) Slog.d(TAG, "reusing notification");
+            oldEntry.notification = notification;
+            try {
+                // Reapply the RemoteViews
+                contentView.reapply(this, oldEntry.content);
+                // update the contentIntent
+                final PendingIntent contentIntent = notification.notification.contentIntent;
+                if (contentIntent != null) {
+                    oldEntry.content.setOnClickListener(new Launcher(contentIntent,
+                                notification.pkg, notification.tag, notification.id));
+                }
+                // Update the icon.
+                final StatusBarIcon ic = new StatusBarIcon(notification.pkg,
+                        notification.notification.icon, notification.notification.iconLevel,
+                        notification.notification.number);
+                if (!oldEntry.icon.set(ic)) {
+                    handleNotificationError(key, notification, "Couldn't update icon: " + ic);
+                    return;
+                }
+            }
+            catch (RuntimeException e) {
+                // It failed to add cleanly.  Log, and remove the view from the panel.
+                Slog.w(TAG, "Couldn't reapply views for package " + contentView.getPackage(), e);
+                removeNotificationViews(key);
+                addNotificationViews(key, notification);
+            }
+        } else {
+            if (SPEW) Slog.d(TAG, "not reusing notification");
+            removeNotificationViews(key);
+            addNotificationViews(key, notification);
+        }
+
+        // Restart the ticker if it's still running
+        tick(notification);
+
+        // Recalculate the position of the sliding windows and the titles.
+        setAreThereNotifications();
+        updateExpandedViewPos(EXPANDED_LEAVE_ALONE);
+    }
+
+    public void removeNotification(IBinder key) {
+        if (SPEW) Slog.d(TAG, "removeNotification key=" + key);
+        StatusBarNotification old = removeNotificationViews(key);
+
+        if (old != null) {
+            // Cancel the ticker if it's still running
+            mTicker.removeEntry(old);
+
+            // Recalculate the position of the sliding windows and the titles.
+            setAreThereNotifications();
+            updateExpandedViewPos(EXPANDED_LEAVE_ALONE);
+        }
+    }
+
+    private int chooseIconIndex(boolean isOngoing, int viewIndex) {
+        final int latestSize = mLatest.size();
+        if (isOngoing) {
+            return latestSize + (mOngoing.size() - viewIndex);
+        } else {
+            return latestSize - viewIndex;
+        }
+    }
+
+    View[] makeNotificationView(StatusBarNotification notification, ViewGroup parent) {
+        Notification n = notification.notification;
+        RemoteViews remoteViews = n.contentView;
+        if (remoteViews == null) {
+            return null;
+        }
+
+        // create the row view
+        LayoutInflater inflater = (LayoutInflater)getSystemService(Context.LAYOUT_INFLATER_SERVICE);
+        View row = inflater.inflate(R.layout.status_bar_latest_event, parent, false);
+
+        // bind the click event to the content area
+        ViewGroup content = (ViewGroup)row.findViewById(R.id.content);
+        content.setDescendantFocusability(ViewGroup.FOCUS_BLOCK_DESCENDANTS);
+        content.setOnFocusChangeListener(mFocusChangeListener);
+        PendingIntent contentIntent = n.contentIntent;
+        if (contentIntent != null) {
+            content.setOnClickListener(new Launcher(contentIntent, notification.pkg,
+                        notification.tag, notification.id));
+        }
+
+        View expanded = null;
+        Exception exception = null;
+        try {
+            expanded = remoteViews.apply(this, content);
+        }
+        catch (RuntimeException e) {
+            exception = e;
+        }
+        if (expanded == null) {
+            String ident = notification.pkg + "/0x" + Integer.toHexString(notification.id);
+            Slog.e(TAG, "couldn't inflate view for notification " + ident, exception);
+            return null;
+        } else {
+            content.addView(expanded);
+            row.setDrawingCacheEnabled(true);
+        }
+
+        return new View[] { row, content, expanded };
+    }
+
+    StatusBarIconView addNotificationViews(IBinder key, StatusBarNotification notification) {
+        NotificationData list;
+        ViewGroup parent;
+        final boolean isOngoing = notification.isOngoing();
+        if (isOngoing) {
+            list = mOngoing;
+            parent = mOngoingItems;
+        } else {
+            list = mLatest;
+            parent = mLatestItems;
+        }
+        // Construct the expanded view.
+        final View[] views = makeNotificationView(notification, parent);
+        if (views == null) {
+            handleNotificationError(key, notification, "Couldn't expand RemoteViews for: "
+                    + notification);
+            return null;
+        }
+        final View row = views[0];
+        final View content = views[1];
+        final View expanded = views[2];
+        // Construct the icon.
+        final StatusBarIconView iconView = new StatusBarIconView(this,
+                notification.pkg + "/0x" + Integer.toHexString(notification.id));
+        final StatusBarIcon ic = new StatusBarIcon(notification.pkg, notification.notification.icon,
+                    notification.notification.iconLevel, notification.notification.number);
+        if (!iconView.set(ic)) {
+            handleNotificationError(key, notification, "Coulding create icon: " + ic);
+            return null;
+        }
+        // Add the expanded view.
+        final int viewIndex = list.add(key, notification, row, content, expanded, iconView);
+        parent.addView(row, viewIndex);
+        // Add the icon.
+        final int iconIndex = chooseIconIndex(isOngoing, viewIndex);
+        mNotificationIcons.addView(iconView, iconIndex,
+                new LinearLayout.LayoutParams(mIconSize, mIconSize));
+        return iconView;
+    }
+
+    StatusBarNotification removeNotificationViews(IBinder key) {
+        NotificationData.Entry entry = mOngoing.remove(key);
+        if (entry == null) {
+            entry = mLatest.remove(key);
+            if (entry == null) {
+                Slog.w(TAG, "removeNotification for unknown key: " + key);
+                return null;
+            }
+        }
+        // Remove the expanded view.
+        ((ViewGroup)entry.row.getParent()).removeView(entry.row);
+        // Remove the icon.
+        ((ViewGroup)entry.icon.getParent()).removeView(entry.icon);
+
+        return entry.notification;
+    }
+
+    private void setAreThereNotifications() {
+        boolean ongoing = mOngoing.hasVisibleItems();
+        boolean latest = mLatest.hasVisibleItems();
+
+        // (no ongoing notifications are clearable)
+        if (mLatest.hasClearableItems()) {
+            mClearButton.setVisibility(View.VISIBLE);
+        } else {
+            mClearButton.setVisibility(View.INVISIBLE);
+        }
+
+        mOngoingTitle.setVisibility(ongoing ? View.VISIBLE : View.GONE);
+        mLatestTitle.setVisibility(latest ? View.VISIBLE : View.GONE);
+
+        if (ongoing || latest) {
+            mNoNotificationsTitle.setVisibility(View.GONE);
+        } else {
+            mNoNotificationsTitle.setVisibility(View.VISIBLE);
+        }
+    }
+
+
+    /**
+     * State is one or more of the DISABLE constants from StatusBarManager.
+     */
+    public void disable(int state) {
+        final int old = mDisabled;
+        final int diff = state ^ old;
+        mDisabled = state;
+
+        if ((diff & StatusBarManager.DISABLE_EXPAND) != 0) {
+            if ((state & StatusBarManager.DISABLE_EXPAND) != 0) {
+                Slog.d(TAG, "DISABLE_EXPAND: yes");
+                animateCollapse();
+            }
+        }
+        if ((diff & StatusBarManager.DISABLE_NOTIFICATION_ICONS) != 0) {
+            if ((state & StatusBarManager.DISABLE_NOTIFICATION_ICONS) != 0) {
+                Slog.d(TAG, "DISABLE_NOTIFICATION_ICONS: yes");
+                if (mTicking) {
+                    mTicker.halt();
+                } else {
+                    setNotificationIconVisibility(false, com.android.internal.R.anim.fade_out);
+                }
+            } else {
+                Slog.d(TAG, "DISABLE_NOTIFICATION_ICONS: no");
+                if (!mExpandedVisible) {
+                    setNotificationIconVisibility(true, com.android.internal.R.anim.fade_in);
+                }
+            }
+        } else if ((diff & StatusBarManager.DISABLE_NOTIFICATION_TICKER) != 0) {
+            if (mTicking && (state & StatusBarManager.DISABLE_NOTIFICATION_TICKER) != 0) {
+                Slog.d(TAG, "DISABLE_NOTIFICATION_TICKER: yes");
+                mTicker.halt();
+            }
+        }
+    }
+
+    /**
+     * All changes to the status bar and notifications funnel through here and are batched.
+     */
+    private class H extends Handler {
+        public void handleMessage(Message m) {
+            switch (m.what) {
+                case MSG_ANIMATE:
+                    doAnimation();
+                    break;
+                case MSG_ANIMATE_REVEAL:
+                    doRevealAnimation();
+                    break;
+                case MSG_SHOW_INTRUDER:
+                    setIntruderAlertVisibility(true);
+                    break;
+                case MSG_HIDE_INTRUDER:
+                    setIntruderAlertVisibility(false);
+                    break;
+            }
+        }
+    }
+
+    View.OnFocusChangeListener mFocusChangeListener = new View.OnFocusChangeListener() {
+        public void onFocusChange(View v, boolean hasFocus) {
+            // Because 'v' is a ViewGroup, all its children will be (un)selected
+            // too, which allows marqueeing to work.
+            v.setSelected(hasFocus);
+        }
+    };
+
+    private void makeExpandedVisible() {
+        if (SPEW) Slog.d(TAG, "Make expanded visible: expanded visible=" + mExpandedVisible);
+        if (mExpandedVisible) {
+            return;
+        }
+        mExpandedVisible = true;
+        visibilityChanged(true);
+
+        updateExpandedViewPos(EXPANDED_LEAVE_ALONE);
+        mExpandedParams.flags &= ~WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE;
+        mExpandedParams.flags |= WindowManager.LayoutParams.FLAG_ALT_FOCUSABLE_IM;
+        mExpandedDialog.getWindow().setAttributes(mExpandedParams);
+        mExpandedView.requestFocus(View.FOCUS_FORWARD);
+        mTrackingView.setVisibility(View.VISIBLE);
+
+        if (!mTicking) {
+            setDateViewVisibility(true, com.android.internal.R.anim.fade_in);
+        }
+    }
+
+    public void animateExpand() {
+        if (SPEW) Slog.d(TAG, "Animate expand: expanded=" + mExpanded);
+        if ((mDisabled & StatusBarManager.DISABLE_EXPAND) != 0) {
+            return ;
+        }
+        if (mExpanded) {
+            return;
+        }
+
+        prepareTracking(0, true);
+        performFling(0, 2000.0f, true);
+    }
+
+    public void animateCollapse() {
+        if (SPEW) {
+            Slog.d(TAG, "animateCollapse(): mExpanded=" + mExpanded
+                    + " mExpandedVisible=" + mExpandedVisible
+                    + " mExpanded=" + mExpanded
+                    + " mAnimating=" + mAnimating
+                    + " mAnimY=" + mAnimY
+                    + " mAnimVel=" + mAnimVel);
+        }
+
+        if (!mExpandedVisible) {
+            return;
+        }
+
+        int y;
+        if (mAnimating) {
+            y = (int)mAnimY;
+        } else {
+            y = mDisplay.getHeight()-1;
+        }
+        // Let the fling think that we're open so it goes in the right direction
+        // and doesn't try to re-open the windowshade.
+        mExpanded = true;
+        prepareTracking(y, false);
+        performFling(y, -2000.0f, true);
+    }
+
+    void performExpand() {
+        if (SPEW) Slog.d(TAG, "performExpand: mExpanded=" + mExpanded);
+        if ((mDisabled & StatusBarManager.DISABLE_EXPAND) != 0) {
+            return ;
+        }
+        if (mExpanded) {
+            return;
+        }
+
+        mExpanded = true;
+        makeExpandedVisible();
+        updateExpandedViewPos(EXPANDED_FULL_OPEN);
+
+        if (false) postStartTracing();
+    }
+
+    void performCollapse() {
+        if (SPEW) Slog.d(TAG, "performCollapse: mExpanded=" + mExpanded
+                + " mExpandedVisible=" + mExpandedVisible);
+
+        if (!mExpandedVisible) {
+            return;
+        }
+        mExpandedVisible = false;
+        visibilityChanged(false);
+        mExpandedParams.flags |= WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE;
+        mExpandedParams.flags &= ~WindowManager.LayoutParams.FLAG_ALT_FOCUSABLE_IM;
+        mExpandedDialog.getWindow().setAttributes(mExpandedParams);
+        mTrackingView.setVisibility(View.GONE);
+
+        if ((mDisabled & StatusBarManager.DISABLE_NOTIFICATION_ICONS) == 0) {
+            setNotificationIconVisibility(true, com.android.internal.R.anim.fade_in);
+        }
+        setDateViewVisibility(false, com.android.internal.R.anim.fade_out);
+
+        if (!mExpanded) {
+            return;
+        }
+        mExpanded = false;
+    }
+
+    void doAnimation() {
+        if (mAnimating) {
+            if (SPEW) Slog.d(TAG, "doAnimation");
+            if (SPEW) Slog.d(TAG, "doAnimation before mAnimY=" + mAnimY);
+            incrementAnim();
+            if (SPEW) Slog.d(TAG, "doAnimation after  mAnimY=" + mAnimY);
+            if (mAnimY >= mDisplay.getHeight()-1) {
+                if (SPEW) Slog.d(TAG, "Animation completed to expanded state.");
+                mAnimating = false;
+                updateExpandedViewPos(EXPANDED_FULL_OPEN);
+                performExpand();
+            }
+            else if (mAnimY < mStatusBarView.getHeight()) {
+                if (SPEW) Slog.d(TAG, "Animation completed to collapsed state.");
+                mAnimating = false;
+                updateExpandedViewPos(0);
+                performCollapse();
+            }
+            else {
+                updateExpandedViewPos((int)mAnimY);
+                mCurAnimationTime += ANIM_FRAME_DURATION;
+                mHandler.sendMessageAtTime(mHandler.obtainMessage(MSG_ANIMATE), mCurAnimationTime);
+            }
+        }
+    }
+
+    void stopTracking() {
+        mTracking = false;
+        mVelocityTracker.recycle();
+        mVelocityTracker = null;
+    }
+
+    void incrementAnim() {
+        long now = SystemClock.uptimeMillis();
+        float t = ((float)(now - mAnimLastTime)) / 1000;            // ms -> s
+        final float y = mAnimY;
+        final float v = mAnimVel;                                   // px/s
+        final float a = mAnimAccel;                                 // px/s/s
+        mAnimY = y + (v*t) + (0.5f*a*t*t);                          // px
+        mAnimVel = v + (a*t);                                       // px/s
+        mAnimLastTime = now;                                        // ms
+        //Slog.d(TAG, "y=" + y + " v=" + v + " a=" + a + " t=" + t + " mAnimY=" + mAnimY
+        //        + " mAnimAccel=" + mAnimAccel);
+    }
+
+    void doRevealAnimation() {
+        final int h = mCloseView.getHeight() + mStatusBarView.getHeight();
+        if (mAnimatingReveal && mAnimating && mAnimY < h) {
+            incrementAnim();
+            if (mAnimY >= h) {
+                mAnimY = h;
+                updateExpandedViewPos((int)mAnimY);
+            } else {
+                updateExpandedViewPos((int)mAnimY);
+                mCurAnimationTime += ANIM_FRAME_DURATION;
+                mHandler.sendMessageAtTime(mHandler.obtainMessage(MSG_ANIMATE_REVEAL),
+                        mCurAnimationTime);
+            }
+        }
+    }
+
+    void prepareTracking(int y, boolean opening) {
+        mTracking = true;
+        mVelocityTracker = VelocityTracker.obtain();
+        if (opening) {
+            mAnimAccel = 2000.0f;
+            mAnimVel = 200;
+            mAnimY = mStatusBarView.getHeight();
+            updateExpandedViewPos((int)mAnimY);
+            mAnimating = true;
+            mAnimatingReveal = true;
+            mHandler.removeMessages(MSG_ANIMATE);
+            mHandler.removeMessages(MSG_ANIMATE_REVEAL);
+            long now = SystemClock.uptimeMillis();
+            mAnimLastTime = now;
+            mCurAnimationTime = now + ANIM_FRAME_DURATION;
+            mAnimating = true;
+            mHandler.sendMessageAtTime(mHandler.obtainMessage(MSG_ANIMATE_REVEAL),
+                    mCurAnimationTime);
+            makeExpandedVisible();
+        } else {
+            // it's open, close it?
+            if (mAnimating) {
+                mAnimating = false;
+                mHandler.removeMessages(MSG_ANIMATE);
+            }
+            updateExpandedViewPos(y + mViewDelta);
+        }
+    }
+
+    void performFling(int y, float vel, boolean always) {
+        mAnimatingReveal = false;
+        mDisplayHeight = mDisplay.getHeight();
+
+        mAnimY = y;
+        mAnimVel = vel;
+
+        //Slog.d(TAG, "starting with mAnimY=" + mAnimY + " mAnimVel=" + mAnimVel);
+
+        if (mExpanded) {
+            if (!always && (
+                    vel > 200.0f
+                    || (y > (mDisplayHeight-25) && vel > -200.0f))) {
+                // We are expanded, but they didn't move sufficiently to cause
+                // us to retract.  Animate back to the expanded position.
+                mAnimAccel = 2000.0f;
+                if (vel < 0) {
+                    mAnimVel = 0;
+                }
+            }
+            else {
+                // We are expanded and are now going to animate away.
+                mAnimAccel = -2000.0f;
+                if (vel > 0) {
+                    mAnimVel = 0;
+                }
+            }
+        } else {
+            if (always || (
+                    vel > 200.0f
+                    || (y > (mDisplayHeight/2) && vel > -200.0f))) {
+                // We are collapsed, and they moved enough to allow us to
+                // expand.  Animate in the notifications.
+                mAnimAccel = 2000.0f;
+                if (vel < 0) {
+                    mAnimVel = 0;
+                }
+            }
+            else {
+                // We are collapsed, but they didn't move sufficiently to cause
+                // us to retract.  Animate back to the collapsed position.
+                mAnimAccel = -2000.0f;
+                if (vel > 0) {
+                    mAnimVel = 0;
+                }
+            }
+        }
+        //Slog.d(TAG, "mAnimY=" + mAnimY + " mAnimVel=" + mAnimVel
+        //        + " mAnimAccel=" + mAnimAccel);
+
+        long now = SystemClock.uptimeMillis();
+        mAnimLastTime = now;
+        mCurAnimationTime = now + ANIM_FRAME_DURATION;
+        mAnimating = true;
+        mHandler.removeMessages(MSG_ANIMATE);
+        mHandler.removeMessages(MSG_ANIMATE_REVEAL);
+        mHandler.sendMessageAtTime(mHandler.obtainMessage(MSG_ANIMATE), mCurAnimationTime);
+        stopTracking();
+    }
+
+    boolean interceptTouchEvent(MotionEvent event) {
+        if (SPEW) {
+            Slog.d(TAG, "Touch: rawY=" + event.getRawY() + " event=" + event + " mDisabled="
+                + mDisabled);
+        }
+
+        if ((mDisabled & StatusBarManager.DISABLE_EXPAND) != 0) {
+            return false;
+        }
+
+        final int statusBarSize = mStatusBarView.getHeight();
+        final int hitSize = statusBarSize*2;
+        if (event.getAction() == MotionEvent.ACTION_DOWN) {
+            final int y = (int)event.getRawY();
+
+            if (!mExpanded) {
+                mViewDelta = statusBarSize - y;
+            } else {
+                mTrackingView.getLocationOnScreen(mAbsPos);
+                mViewDelta = mAbsPos[1] + mTrackingView.getHeight() - y;
+            }
+            if ((!mExpanded && y < hitSize) ||
+                    (mExpanded && y > (mDisplay.getHeight()-hitSize))) {
+
+                // We drop events at the edge of the screen to make the windowshade come
+                // down by accident less, especially when pushing open a device with a keyboard
+                // that rotates (like g1 and droid)
+                int x = (int)event.getRawX();
+                final int edgeBorder = mEdgeBorder;
+                if (x >= edgeBorder && x < mDisplay.getWidth() - edgeBorder) {
+                    prepareTracking(y, !mExpanded);// opening if we're not already fully visible
+                    mVelocityTracker.addMovement(event);
+                }
+            }
+        } else if (mTracking) {
+            mVelocityTracker.addMovement(event);
+            final int minY = statusBarSize + mCloseView.getHeight();
+            if (event.getAction() == MotionEvent.ACTION_MOVE) {
+                int y = (int)event.getRawY();
+                if (mAnimatingReveal && y < minY) {
+                    // nothing
+                } else  {
+                    mAnimatingReveal = false;
+                    updateExpandedViewPos(y + mViewDelta);
+                }
+            } else if (event.getAction() == MotionEvent.ACTION_UP) {
+                mVelocityTracker.computeCurrentVelocity(1000);
+
+                float yVel = mVelocityTracker.getYVelocity();
+                boolean negative = yVel < 0;
+
+                float xVel = mVelocityTracker.getXVelocity();
+                if (xVel < 0) {
+                    xVel = -xVel;
+                }
+                if (xVel > 150.0f) {
+                    xVel = 150.0f; // limit how much we care about the x axis
+                }
+
+                float vel = (float)Math.hypot(yVel, xVel);
+                if (negative) {
+                    vel = -vel;
+                }
+
+                performFling((int)event.getRawY(), vel, false);
+            }
+
+        }
+        return false;
+    }
+
+    private class Launcher implements View.OnClickListener {
+        private PendingIntent mIntent;
+        private String mPkg;
+        private String mTag;
+        private int mId;
+
+        Launcher(PendingIntent intent, String pkg, String tag, int id) {
+            mIntent = intent;
+            mPkg = pkg;
+            mTag = tag;
+            mId = id;
+        }
+
+        public void onClick(View v) {
+            try {
+                // The intent we are sending is for the application, which
+                // won't have permission to immediately start an activity after
+                // the user switches to home.  We know it is safe to do at this
+                // point, so make sure new activity switches are now allowed.
+                ActivityManagerNative.getDefault().resumeAppSwitches();
+            } catch (RemoteException e) {
+            }
+
+            if (mIntent != null) {
+                int[] pos = new int[2];
+                v.getLocationOnScreen(pos);
+                Intent overlay = new Intent();
+                overlay.setSourceBounds(
+                        new Rect(pos[0], pos[1], pos[0]+v.getWidth(), pos[1]+v.getHeight()));
+                try {
+                    mIntent.send(StatusBarService.this, 0, overlay);
+                } catch (PendingIntent.CanceledException e) {
+                    // the stack trace isn't very helpful here.  Just log the exception message.
+                    Slog.w(TAG, "Sending contentIntent failed: " + e);
+                }
+            }
+
+            try {
+                mBarService.onNotificationClick(mPkg, mTag, mId);
+            } catch (RemoteException ex) {
+                // system process is dead if we're here.
+            }
+
+            // close the shade if it was open
+            animateCollapse();
+
+            // If this click was on the intruder alert, hide that instead
+            mHandler.sendEmptyMessage(MSG_HIDE_INTRUDER);
+        }
+    }
+
+    private void tick(StatusBarNotification n) {
+        // Show the ticker if one is requested. Also don't do this
+        // until status bar window is attached to the window manager,
+        // because...  well, what's the point otherwise?  And trying to
+        // run a ticker without being attached will crash!
+        if (n.notification.tickerText != null && mStatusBarView.getWindowToken() != null) {
+            if (0 == (mDisabled & (StatusBarManager.DISABLE_NOTIFICATION_ICONS
+                            | StatusBarManager.DISABLE_NOTIFICATION_TICKER))) {
+                mTicker.addEntry(n);
+            }
+        }
+    }
+
+    /**
+     * Cancel this notification and tell the StatusBarManagerService / NotificationManagerService
+     * about the failure.
+     *
+     * WARNING: this will call back into us.  Don't hold any locks.
+     */
+    void handleNotificationError(IBinder key, StatusBarNotification n, String message) {
+        removeNotification(key);
+        try {
+            mBarService.onNotificationError(n.pkg, n.tag, n.id, n.uid, n.initialPid, message);
+        } catch (RemoteException ex) {
+            // The end is nigh.
+        }
+    }
+
+    private class MyTicker extends Ticker {
+        MyTicker(Context context, StatusBarView sb) {
+            super(context, sb);
+        }
+
+        @Override
+        void tickerStarting() {
+            mTicking = true;
+            mIcons.setVisibility(View.GONE);
+            mTickerView.setVisibility(View.VISIBLE);
+            mTickerView.startAnimation(loadAnim(com.android.internal.R.anim.push_up_in, null));
+            mIcons.startAnimation(loadAnim(com.android.internal.R.anim.push_up_out, null));
+            if (mExpandedVisible) {
+                setDateViewVisibility(false, com.android.internal.R.anim.push_up_out);
+            }
+        }
+
+        @Override
+        void tickerDone() {
+            mIcons.setVisibility(View.VISIBLE);
+            mTickerView.setVisibility(View.GONE);
+            mIcons.startAnimation(loadAnim(com.android.internal.R.anim.push_down_in, null));
+            mTickerView.startAnimation(loadAnim(com.android.internal.R.anim.push_down_out,
+                        mTickingDoneListener));
+            if (mExpandedVisible) {
+                setDateViewVisibility(true, com.android.internal.R.anim.push_down_in);
+            }
+        }
+
+        void tickerHalting() {
+            mIcons.setVisibility(View.VISIBLE);
+            mTickerView.setVisibility(View.GONE);
+            mIcons.startAnimation(loadAnim(com.android.internal.R.anim.fade_in, null));
+            mTickerView.startAnimation(loadAnim(com.android.internal.R.anim.fade_out,
+                        mTickingDoneListener));
+            if (mExpandedVisible) {
+                setDateViewVisibility(true, com.android.internal.R.anim.fade_in);
+            }
+        }
+    }
+
+    Animation.AnimationListener mTickingDoneListener = new Animation.AnimationListener() {;
+        public void onAnimationEnd(Animation animation) {
+            mTicking = false;
+        }
+        public void onAnimationRepeat(Animation animation) {
+        }
+        public void onAnimationStart(Animation animation) {
+        }
+    };
+
+    private Animation loadAnim(int id, Animation.AnimationListener listener) {
+        Animation anim = AnimationUtils.loadAnimation(StatusBarService.this, id);
+        if (listener != null) {
+            anim.setAnimationListener(listener);
+        }
+        return anim;
+    }
+
+    public String viewInfo(View v) {
+        return "(" + v.getLeft() + "," + v.getTop() + ")(" + v.getRight() + "," + v.getBottom()
+                + " " + v.getWidth() + "x" + v.getHeight() + ")";
+    }
+
+    protected void dump(FileDescriptor fd, PrintWriter pw, String[] args) {
+        if (checkCallingOrSelfPermission(android.Manifest.permission.DUMP)
+                != PackageManager.PERMISSION_GRANTED) {
+            pw.println("Permission Denial: can't dump StatusBar from from pid="
+                    + Binder.getCallingPid()
+                    + ", uid=" + Binder.getCallingUid());
+            return;
+        }
+
+        synchronized (mQueueLock) {
+            pw.println("Current Status Bar state:");
+            pw.println("  mExpanded=" + mExpanded
+                    + ", mExpandedVisible=" + mExpandedVisible);
+            pw.println("  mTicking=" + mTicking);
+            pw.println("  mTracking=" + mTracking);
+            pw.println("  mAnimating=" + mAnimating
+                    + ", mAnimY=" + mAnimY + ", mAnimVel=" + mAnimVel
+                    + ", mAnimAccel=" + mAnimAccel);
+            pw.println("  mCurAnimationTime=" + mCurAnimationTime
+                    + " mAnimLastTime=" + mAnimLastTime);
+            pw.println("  mDisplayHeight=" + mDisplayHeight
+                    + " mAnimatingReveal=" + mAnimatingReveal
+                    + " mViewDelta=" + mViewDelta);
+            pw.println("  mDisplayHeight=" + mDisplayHeight);
+            pw.println("  mExpandedParams: " + mExpandedParams);
+            pw.println("  mExpandedView: " + viewInfo(mExpandedView));
+            pw.println("  mExpandedDialog: " + mExpandedDialog);
+            pw.println("  mTrackingParams: " + mTrackingParams);
+            pw.println("  mTrackingView: " + viewInfo(mTrackingView));
+            pw.println("  mOngoingTitle: " + viewInfo(mOngoingTitle));
+            pw.println("  mOngoingItems: " + viewInfo(mOngoingItems));
+            pw.println("  mLatestTitle: " + viewInfo(mLatestTitle));
+            pw.println("  mLatestItems: " + viewInfo(mLatestItems));
+            pw.println("  mNoNotificationsTitle: " + viewInfo(mNoNotificationsTitle));
+            pw.println("  mCloseView: " + viewInfo(mCloseView));
+            pw.println("  mTickerView: " + viewInfo(mTickerView));
+            pw.println("  mScrollView: " + viewInfo(mScrollView)
+                    + " scroll " + mScrollView.getScrollX() + "," + mScrollView.getScrollY());
+            pw.println("mNotificationLinearLayout: " + viewInfo(mNotificationLinearLayout));
+        }
+        /*
+        synchronized (mNotificationData) {
+            int N = mNotificationData.ongoingCount();
+            pw.println("  ongoingCount.size=" + N);
+            for (int i=0; i<N; i++) {
+                StatusBarNotification n = mNotificationData.getOngoing(i);
+                pw.println("    [" + i + "] key=" + n.key + " view=" + n.view);
+                pw.println("           data=" + n.data);
+            }
+            N = mNotificationData.latestCount();
+            pw.println("  ongoingCount.size=" + N);
+            for (int i=0; i<N; i++) {
+                StatusBarNotification n = mNotificationData.getLatest(i);
+                pw.println("    [" + i + "] key=" + n.key + " view=" + n.view);
+                pw.println("           data=" + n.data);
+            }
+        }
+        */
+
+        if (false) {
+            pw.println("see the logcat for a dump of the views we have created.");
+            // must happen on ui thread
+            mHandler.post(new Runnable() {
+                    public void run() {
+                        mStatusBarView.getLocationOnScreen(mAbsPos);
+                        Slog.d(TAG, "mStatusBarView: ----- (" + mAbsPos[0] + "," + mAbsPos[1]
+                                + ") " + mStatusBarView.getWidth() + "x"
+                                + mStatusBarView.getHeight());
+                        mStatusBarView.debug();
+
+                        mExpandedView.getLocationOnScreen(mAbsPos);
+                        Slog.d(TAG, "mExpandedView: ----- (" + mAbsPos[0] + "," + mAbsPos[1]
+                                + ") " + mExpandedView.getWidth() + "x"
+                                + mExpandedView.getHeight());
+                        mExpandedView.debug();
+
+                        mTrackingView.getLocationOnScreen(mAbsPos);
+                        Slog.d(TAG, "mTrackingView: ----- (" + mAbsPos[0] + "," + mAbsPos[1]
+                                + ") " + mTrackingView.getWidth() + "x"
+                                + mTrackingView.getHeight());
+                        mTrackingView.debug();
+                    }
+                });
+        }
+    }
+
+    void onBarViewAttached() {
+        WindowManager.LayoutParams lp;
+        int pixelFormat;
+        Drawable bg;
+
+        /// ---------- Tracking View --------------
+        pixelFormat = PixelFormat.RGBX_8888;
+        bg = mTrackingView.getBackground();
+        if (bg != null) {
+            pixelFormat = bg.getOpacity();
+        }
+
+        lp = new WindowManager.LayoutParams(
+                ViewGroup.LayoutParams.MATCH_PARENT,
+                ViewGroup.LayoutParams.MATCH_PARENT,
+                WindowManager.LayoutParams.TYPE_STATUS_BAR_PANEL,
+                WindowManager.LayoutParams.FLAG_LAYOUT_IN_SCREEN
+                | WindowManager.LayoutParams.FLAG_LAYOUT_NO_LIMITS
+                | WindowManager.LayoutParams.FLAG_ALT_FOCUSABLE_IM,
+                pixelFormat);
+//        lp.token = mStatusBarView.getWindowToken();
+        lp.gravity = Gravity.TOP | Gravity.FILL_HORIZONTAL;
+        lp.setTitle("TrackingView");
+        lp.y = mTrackingPosition;
+        mTrackingParams = lp;
+
+        WindowManagerImpl.getDefault().addView(mTrackingView, lp);
+    }
+
+    void onTrackingViewAttached() {
+        WindowManager.LayoutParams lp;
+        int pixelFormat;
+        Drawable bg;
+
+        /// ---------- Expanded View --------------
+        pixelFormat = PixelFormat.TRANSLUCENT;
+
+        final int disph = mDisplay.getHeight();
+        lp = mExpandedDialog.getWindow().getAttributes();
+        lp.width = ViewGroup.LayoutParams.MATCH_PARENT;
+        lp.height = getExpandedHeight();
+        lp.x = 0;
+        mTrackingPosition = lp.y = -disph; // sufficiently large negative
+        lp.type = WindowManager.LayoutParams.TYPE_STATUS_BAR_PANEL;
+        lp.flags = WindowManager.LayoutParams.FLAG_LAYOUT_IN_SCREEN
+                | WindowManager.LayoutParams.FLAG_LAYOUT_NO_LIMITS
+                | WindowManager.LayoutParams.FLAG_NOT_TOUCH_MODAL
+                | WindowManager.LayoutParams.FLAG_DITHER
+                | WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE;
+        lp.format = pixelFormat;
+        lp.gravity = Gravity.TOP | Gravity.FILL_HORIZONTAL;
+        lp.setTitle("StatusBarExpanded");
+        mExpandedDialog.getWindow().setAttributes(lp);
+        mExpandedDialog.getWindow().setFormat(pixelFormat);
+        mExpandedParams = lp;
+
+        mExpandedDialog.getWindow().requestFeature(Window.FEATURE_NO_TITLE);
+        mExpandedDialog.setContentView(mExpandedView,
+                new ViewGroup.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT,
+                                           ViewGroup.LayoutParams.MATCH_PARENT));
+        mExpandedDialog.getWindow().setBackgroundDrawable(null);
+        mExpandedDialog.show();
+        FrameLayout hack = (FrameLayout)mExpandedView.getParent();
+    }
+
+    void setDateViewVisibility(boolean visible, int anim) {
+        mDateView.setUpdates(visible);
+        mDateView.setVisibility(visible ? View.VISIBLE : View.INVISIBLE);
+        mDateView.startAnimation(loadAnim(anim, null));
+    }
+
+    void setNotificationIconVisibility(boolean visible, int anim) {
+        int old = mNotificationIcons.getVisibility();
+        int v = visible ? View.VISIBLE : View.INVISIBLE;
+        if (old != v) {
+            mNotificationIcons.setVisibility(v);
+            mNotificationIcons.startAnimation(loadAnim(anim, null));
+        }
+    }
+
+    void updateExpandedViewPos(int expandedPosition) {
+        if (SPEW) {
+            Slog.d(TAG, "updateExpandedViewPos before expandedPosition=" + expandedPosition
+                    + " mTrackingParams.y=" + mTrackingParams.y
+                    + " mTrackingPosition=" + mTrackingPosition);
+        }
+
+        int h = mStatusBarView.getHeight();
+        int disph = mDisplay.getHeight();
+
+        // If the expanded view is not visible, make sure they're still off screen.
+        // Maybe the view was resized.
+        if (!mExpandedVisible) {
+            if (mTrackingView != null) {
+                mTrackingPosition = -disph;
+                if (mTrackingParams != null) {
+                    mTrackingParams.y = mTrackingPosition;
+                    WindowManagerImpl.getDefault().updateViewLayout(mTrackingView, mTrackingParams);
+                }
+            }
+            if (mExpandedParams != null) {
+                mExpandedParams.y = -disph;
+                mExpandedDialog.getWindow().setAttributes(mExpandedParams);
+            }
+            return;
+        }
+
+        // tracking view...
+        int pos;
+        if (expandedPosition == EXPANDED_FULL_OPEN) {
+            pos = h;
+        }
+        else if (expandedPosition == EXPANDED_LEAVE_ALONE) {
+            pos = mTrackingPosition;
+        }
+        else {
+            if (expandedPosition <= disph) {
+                pos = expandedPosition;
+            } else {
+                pos = disph;
+            }
+            pos -= disph-h;
+        }
+        mTrackingPosition = mTrackingParams.y = pos;
+        mTrackingParams.height = disph-h;
+        WindowManagerImpl.getDefault().updateViewLayout(mTrackingView, mTrackingParams);
+
+        if (mExpandedParams != null) {
+            mCloseView.getLocationInWindow(mPositionTmp);
+            final int closePos = mPositionTmp[1];
+
+            mExpandedContents.getLocationInWindow(mPositionTmp);
+            final int contentsBottom = mPositionTmp[1] + mExpandedContents.getHeight();
+
+            mExpandedParams.y = pos + mTrackingView.getHeight()
+                    - (mTrackingParams.height-closePos) - contentsBottom;
+            int max = h;
+            if (mExpandedParams.y > max) {
+                mExpandedParams.y = max;
+            }
+            int min = mTrackingPosition;
+            if (mExpandedParams.y < min) {
+                mExpandedParams.y = min;
+            }
+
+            boolean visible = (mTrackingPosition + mTrackingView.getHeight()) > h;
+            if (!visible) {
+                // if the contents aren't visible, move the expanded view way off screen
+                // because the window itself extends below the content view.
+                mExpandedParams.y = -disph;
+            }
+            mExpandedDialog.getWindow().setAttributes(mExpandedParams);
+
+            // As long as this isn't just a repositioning that's not supposed to affect
+            // the user's perception of what's showing, call to say that the visibility
+            // has changed. (Otherwise, someone else will call to do that).
+            if (expandedPosition != EXPANDED_LEAVE_ALONE) {
+                if (SPEW) Slog.d(TAG, "updateExpandedViewPos visibilityChanged(" + visible + ")");
+                visibilityChanged(visible);
+            }
+        }
+
+        if (SPEW) {
+            Slog.d(TAG, "updateExpandedViewPos after  expandedPosition=" + expandedPosition
+                    + " mTrackingParams.y=" + mTrackingParams.y
+                    + " mTrackingPosition=" + mTrackingPosition
+                    + " mExpandedParams.y=" + mExpandedParams.y
+                    + " mExpandedParams.height=" + mExpandedParams.height);
+        }
+    }
+
+    int getExpandedHeight() {
+        return mDisplay.getHeight() - mStatusBarView.getHeight() - mCloseView.getHeight();
+    }
+
+    void updateExpandedHeight() {
+        if (mExpandedView != null) {
+            mExpandedParams.height = getExpandedHeight();
+            mExpandedDialog.getWindow().setAttributes(mExpandedParams);
+        }
+    }
+
+    /**
+     * The LEDs are turned o)ff when the notification panel is shown, even just a little bit.
+     * This was added last-minute and is inconsistent with the way the rest of the notifications
+     * are handled, because the notification isn't really cancelled.  The lights are just
+     * turned off.  If any other notifications happen, the lights will turn back on.  Steve says
+     * this is what he wants. (see bug 1131461)
+     */
+    void visibilityChanged(boolean visible) {
+        if (mPanelSlightlyVisible != visible) {
+            mPanelSlightlyVisible = visible;
+            try {
+                mBarService.onPanelRevealed();
+            } catch (RemoteException ex) {
+                // Won't fail unless the world has ended.
+            }
+        }
+    }
+
+    void performDisableActions(int net) {
+        int old = mDisabled;
+        int diff = net ^ old;
+        mDisabled = net;
+
+        // act accordingly
+        if ((diff & StatusBarManager.DISABLE_EXPAND) != 0) {
+            if ((net & StatusBarManager.DISABLE_EXPAND) != 0) {
+                Slog.d(TAG, "DISABLE_EXPAND: yes");
+                animateCollapse();
+            }
+        }
+        if ((diff & StatusBarManager.DISABLE_NOTIFICATION_ICONS) != 0) {
+            if ((net & StatusBarManager.DISABLE_NOTIFICATION_ICONS) != 0) {
+                Slog.d(TAG, "DISABLE_NOTIFICATION_ICONS: yes");
+                if (mTicking) {
+                    mNotificationIcons.setVisibility(View.INVISIBLE);
+                    mTicker.halt();
+                } else {
+                    setNotificationIconVisibility(false, com.android.internal.R.anim.fade_out);
+                }
+            } else {
+                Slog.d(TAG, "DISABLE_NOTIFICATION_ICONS: no");
+                if (!mExpandedVisible) {
+                    setNotificationIconVisibility(true, com.android.internal.R.anim.fade_in);
+                }
+            }
+        } else if ((diff & StatusBarManager.DISABLE_NOTIFICATION_TICKER) != 0) {
+            if (mTicking && (net & StatusBarManager.DISABLE_NOTIFICATION_TICKER) != 0) {
+                mTicker.halt();
+            }
+        }
+    }
+
+    private View.OnClickListener mClearButtonListener = new View.OnClickListener() {
+        public void onClick(View v) {
+            try {
+                mBarService.onClearAllNotifications();
+            } catch (RemoteException ex) {
+                // system process is dead if we're here.
+            }
+            animateCollapse();
+        }
+    };
+
+    private BroadcastReceiver mBroadcastReceiver = new BroadcastReceiver() {
+        public void onReceive(Context context, Intent intent) {
+            String action = intent.getAction();
+            if (Intent.ACTION_CLOSE_SYSTEM_DIALOGS.equals(action)
+                    || Intent.ACTION_SCREEN_OFF.equals(action)) {
+                //collapse();
+            }
+            else if (Intent.ACTION_CONFIGURATION_CHANGED.equals(action)) {
+                updateResources();
+            }
+        }
+    };
+
+    private void setIntruderAlertVisibility(boolean vis) {
+        mIntruderAlertView.setVisibility(vis ? View.VISIBLE : View.GONE);
+    }
+
+    /**
+     * Reload some of our resources when the configuration changes.
+     *
+     * We don't reload everything when the configuration changes -- we probably
+     * should, but getting that smooth is tough.  Someday we'll fix that.  In the
+     * meantime, just update the things that we know change.
+     */
+    void updateResources() {
+        Resources res = getResources();
+
+        mClearButton.setText(getText(R.string.status_bar_clear_all_button));
+        mOngoingTitle.setText(getText(R.string.status_bar_ongoing_events_title));
+        mLatestTitle.setText(getText(R.string.status_bar_latest_events_title));
+        mNoNotificationsTitle.setText(getText(R.string.status_bar_no_notifications_title));
+
+        mEdgeBorder = res.getDimensionPixelSize(R.dimen.status_bar_edge_ignore);
+
+        if (false) Slog.v(TAG, "updateResources");
+    }
+
+    //
+    // tracing
+    //
+
+    void postStartTracing() {
+        mHandler.postDelayed(mStartTracing, 3000);
+    }
+
+    void vibrate() {
+        android.os.Vibrator vib = (android.os.Vibrator)getSystemService(Context.VIBRATOR_SERVICE);
+        vib.vibrate(250);
+    }
+
+    Runnable mStartTracing = new Runnable() {
+        public void run() {
+            vibrate();
+            SystemClock.sleep(250);
+            Slog.d(TAG, "startTracing");
+            android.os.Debug.startMethodTracing("/data/statusbar-traces/trace");
+            mHandler.postDelayed(mStopTracing, 10000);
+        }
+    };
+
+    Runnable mStopTracing = new Runnable() {
+        public void run() {
+            android.os.Debug.stopMethodTracing();
+            Slog.d(TAG, "stopTracing");
+            vibrate();
+        }
+    };
+}
+
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/StatusBarView.java b/packages/SystemUI/src/com/android/systemui/statusbar/StatusBarView.java
new file mode 100644
index 0000000..1e140b9
--- /dev/null
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/StatusBarView.java
@@ -0,0 +1,192 @@
+/*
+ * Copyright (C) 2008 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.android.systemui.statusbar;
+
+import android.content.Context;
+import android.content.res.Configuration;
+import android.graphics.Canvas;
+import android.os.SystemClock;
+import android.util.AttributeSet;
+import android.view.MotionEvent;
+import android.view.View;
+import android.view.ViewGroup;
+import android.view.ViewParent;
+import android.widget.FrameLayout;
+
+import com.android.systemui.R;
+
+public class StatusBarView extends FrameLayout {
+    private static final String TAG = "StatusBarView";
+
+    static final int DIM_ANIM_TIME = 400;
+    
+    StatusBarService mService;
+    boolean mTracking;
+    int mStartX, mStartY;
+    ViewGroup mNotificationIcons;
+    ViewGroup mStatusIcons;
+    View mDate;
+    FixedSizeDrawable mBackground;
+    
+    boolean mNightMode = false;
+    int mStartAlpha = 0, mEndAlpha = 0;
+    long mEndTime = 0;
+
+    public StatusBarView(Context context, AttributeSet attrs) {
+        super(context, attrs);
+    }
+
+    @Override
+    protected void onFinishInflate() {
+        super.onFinishInflate();
+        mNotificationIcons = (ViewGroup)findViewById(R.id.notificationIcons);
+        mStatusIcons = (ViewGroup)findViewById(R.id.statusIcons);
+        mDate = findViewById(R.id.date);
+
+        mBackground = new FixedSizeDrawable(mDate.getBackground());
+        mBackground.setFixedBounds(0, 0, 0, 0);
+        mDate.setBackgroundDrawable(mBackground);
+    }
+
+    @Override
+    protected void onAttachedToWindow() {
+        super.onAttachedToWindow();
+        mService.onBarViewAttached();
+    }
+    
+    @Override
+    protected void onConfigurationChanged(Configuration newConfig) {
+        super.onConfigurationChanged(newConfig);
+        boolean nightMode = (newConfig.uiMode & Configuration.UI_MODE_NIGHT_MASK)
+                == Configuration.UI_MODE_NIGHT_YES;
+        if (mNightMode != nightMode) {
+            mNightMode = nightMode;
+            mStartAlpha = getCurAlpha();
+            mEndAlpha = mNightMode ? 0x80 : 0x00;
+            mEndTime = SystemClock.uptimeMillis() + DIM_ANIM_TIME;
+            invalidate();
+        }
+    }
+
+    int getCurAlpha() {
+        long time = SystemClock.uptimeMillis();
+        if (time > mEndTime) {
+            return mEndAlpha;
+        }
+        return mEndAlpha
+                - (int)(((mEndAlpha-mStartAlpha) * (mEndTime-time) / DIM_ANIM_TIME));
+    }
+    
+    @Override
+    protected void onSizeChanged(int w, int h, int oldw, int oldh) {
+        super.onSizeChanged(w, h, oldw, oldh);
+        mService.updateExpandedViewPos(StatusBarService.EXPANDED_LEAVE_ALONE);
+    }
+
+    @Override
+    protected void onLayout(boolean changed, int l, int t, int r, int b) {
+        super.onLayout(changed, l, t, r, b);
+
+        // put the date date view quantized to the icons
+        int oldDateRight = mDate.getRight();
+        int newDateRight;
+
+        newDateRight = getDateSize(mNotificationIcons, oldDateRight,
+                getViewOffset(mNotificationIcons));
+        if (newDateRight < 0) {
+            int offset = getViewOffset(mStatusIcons);
+            if (oldDateRight < offset) {
+                newDateRight = oldDateRight;
+            } else {
+                newDateRight = getDateSize(mStatusIcons, oldDateRight, offset);
+                if (newDateRight < 0) {
+                    newDateRight = r;
+                }
+            }
+        }
+        int max = r - getPaddingRight();
+        if (newDateRight > max) {
+            newDateRight = max;
+        }
+
+        mDate.layout(mDate.getLeft(), mDate.getTop(), newDateRight, mDate.getBottom());
+        mBackground.setFixedBounds(-mDate.getLeft(), -mDate.getTop(), (r-l), (b-t));
+    }
+
+    @Override
+    protected void dispatchDraw(Canvas canvas) {
+        super.dispatchDraw(canvas);
+        int alpha = getCurAlpha();
+        if (alpha != 0) {
+            canvas.drawARGB(alpha, 0, 0, 0);
+        }
+        if (alpha != mEndAlpha) {
+            invalidate();
+        }
+    }
+
+    /**
+     * Gets the left position of v in this view.  Throws if v is not
+     * a child of this.
+     */
+    private int getViewOffset(View v) {
+        int offset = 0;
+        while (v != this) {
+            offset += v.getLeft();
+            ViewParent p = v.getParent();
+            if (v instanceof View) {
+                v = (View)p;
+            } else {
+                throw new RuntimeException(v + " is not a child of " + this);
+            }
+        }
+        return offset;
+    }
+
+    private int getDateSize(ViewGroup g, int w, int offset) {
+        final int N = g.getChildCount();
+        for (int i=0; i<N; i++) {
+            View v = g.getChildAt(i);
+            int l = v.getLeft() + offset;
+            int r = v.getRight() + offset;
+            if (w >= l && w <= r) {
+                return r;
+            }
+        }
+        return -1;
+    }
+
+    /**
+     * Ensure that, if there is no target under us to receive the touch,
+     * that we process it ourself.  This makes sure that onInterceptTouchEvent()
+     * is always called for the entire gesture.
+     */
+    @Override
+    public boolean onTouchEvent(MotionEvent event) {
+        if (event.getAction() != MotionEvent.ACTION_DOWN) {
+            mService.interceptTouchEvent(event);
+        }
+        return true;
+    }
+
+    @Override
+    public boolean onInterceptTouchEvent(MotionEvent event) {
+        return mService.interceptTouchEvent(event)
+                ? true : super.onInterceptTouchEvent(event);
+    }
+}
+
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/Ticker.java b/packages/SystemUI/src/com/android/systemui/statusbar/Ticker.java
new file mode 100644
index 0000000..07e8653
--- /dev/null
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/Ticker.java
@@ -0,0 +1,273 @@
+/*
+ * Copyright (C) 2008 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.android.systemui.statusbar;
+
+import android.content.Context;
+import android.graphics.drawable.Drawable;
+import android.os.Handler;
+import android.text.StaticLayout;
+import android.text.Layout.Alignment;
+import android.text.TextPaint;
+import android.text.TextUtils;
+import android.util.Slog;
+import android.view.View;
+import android.view.animation.Animation;
+import android.view.animation.AnimationUtils;
+import android.widget.TextSwitcher;
+import android.widget.TextView;
+import android.widget.ImageSwitcher;
+
+import java.util.ArrayList;
+
+import com.android.internal.statusbar.StatusBarIcon;
+import com.android.internal.statusbar.StatusBarNotification;
+import com.android.internal.util.CharSequences;
+import com.android.systemui.R;
+
+public abstract class Ticker {
+    private static final int TICKER_SEGMENT_DELAY = 3000;
+    
+    private Context mContext;
+    private Handler mHandler = new Handler();
+    private ArrayList<Segment> mSegments = new ArrayList();
+    private TextPaint mPaint;
+    private View mTickerView;
+    private ImageSwitcher mIconSwitcher;
+    private TextSwitcher mTextSwitcher;
+
+    private final class Segment {
+        StatusBarNotification notification;
+        Drawable icon;
+        CharSequence text;
+        int current;
+        int next;
+        boolean first;
+
+        StaticLayout getLayout(CharSequence substr) {
+            int w = mTextSwitcher.getWidth() - mTextSwitcher.getPaddingLeft()
+                    - mTextSwitcher.getPaddingRight();
+            return new StaticLayout(substr, mPaint, w, Alignment.ALIGN_NORMAL, 1, 0, true);
+        }
+
+        CharSequence rtrim(CharSequence substr, int start, int end) {
+            while (end > start && !TextUtils.isGraphic(substr.charAt(end-1))) {
+                end--;
+            }
+            if (end > start) {
+                return substr.subSequence(start, end);
+            }
+            return null;
+        }
+
+        /** returns null if there is no more text */
+        CharSequence getText() {
+            if (this.current > this.text.length()) {
+                return null;
+            }
+            CharSequence substr = this.text.subSequence(this.current, this.text.length());
+            StaticLayout l = getLayout(substr);
+            int lineCount = l.getLineCount();
+            if (lineCount > 0) {
+                int start = l.getLineStart(0);
+                int end = l.getLineEnd(0);
+                this.next = this.current + end;
+                return rtrim(substr, start, end);
+            } else {
+                throw new RuntimeException("lineCount=" + lineCount + " current=" + current +
+                        " text=" + text);
+            }
+        }
+
+        /** returns null if there is no more text */
+        CharSequence advance() {
+            this.first = false;
+            int index = this.next;
+            final int len = this.text.length();
+            while (index < len && !TextUtils.isGraphic(this.text.charAt(index))) {
+                index++;
+            }
+            if (index >= len) {
+                return null;
+            }
+
+            CharSequence substr = this.text.subSequence(index, this.text.length());
+            StaticLayout l = getLayout(substr);
+            final int lineCount = l.getLineCount();
+            int i;
+            for (i=0; i<lineCount; i++) {
+                int start = l.getLineStart(i);
+                int end = l.getLineEnd(i);
+                if (i == lineCount-1) {
+                    this.next = len;
+                } else {
+                    this.next = index + l.getLineStart(i+1);
+                }
+                CharSequence result = rtrim(substr, start, end);
+                if (result != null) {
+                    this.current = index + start;
+                    return result;
+                }
+            }
+            this.current = len;
+            return null;
+        }
+
+        Segment(StatusBarNotification n, Drawable icon, CharSequence text) {
+            this.notification = n;
+            this.icon = icon;
+            this.text = text;
+            int index = 0;
+            final int len = text.length();
+            while (index < len && !TextUtils.isGraphic(text.charAt(index))) {
+                index++;
+            }
+            this.current = index;
+            this.next = index;
+            this.first = true;
+        }
+    };
+
+    Ticker(Context context, StatusBarView sb) {
+        mContext = context;
+        mTickerView = sb.findViewById(R.id.ticker);
+
+        mIconSwitcher = (ImageSwitcher)sb.findViewById(R.id.tickerIcon);
+        mIconSwitcher.setInAnimation(
+                    AnimationUtils.loadAnimation(context, com.android.internal.R.anim.push_up_in));
+        mIconSwitcher.setOutAnimation(
+                    AnimationUtils.loadAnimation(context, com.android.internal.R.anim.push_up_out));
+
+        mTextSwitcher = (TextSwitcher)sb.findViewById(R.id.tickerText);
+        mTextSwitcher.setInAnimation(
+                    AnimationUtils.loadAnimation(context, com.android.internal.R.anim.push_up_in));
+        mTextSwitcher.setOutAnimation(
+                    AnimationUtils.loadAnimation(context, com.android.internal.R.anim.push_up_out));
+
+        // Copy the paint style of one of the TextSwitchers children to use later for measuring
+        TextView text = (TextView)mTextSwitcher.getChildAt(0);
+        mPaint = text.getPaint();
+    }
+
+
+    void addEntry(StatusBarNotification n) {
+        int initialCount = mSegments.size();
+
+        // If what's being displayed has the same text and icon, just drop it
+        // (which will let the current one finish, this happens when apps do
+        // a notification storm).
+        if (initialCount > 0) {
+            final Segment seg = mSegments.get(0);
+            if (n.pkg.equals(seg.notification.pkg)
+                    && n.notification.icon == seg.notification.notification.icon
+                    && n.notification.iconLevel == seg.notification.notification.iconLevel
+                    && CharSequences.equals(seg.notification.notification.tickerText,
+                        n.notification.tickerText)) {
+                return;
+            }
+        }
+
+        final Drawable icon = StatusBarIconView.getIcon(mContext,
+                new StatusBarIcon(n.pkg, n.notification.icon, n.notification.iconLevel, 0));
+        final Segment newSegment = new Segment(n, icon, n.notification.tickerText);
+
+        // If there's already a notification schedule for this package and id, remove it.
+        for (int i=0; i<initialCount; i++) {
+            Segment seg = mSegments.get(i);
+            if (n.id == seg.notification.id && n.pkg.equals(seg.notification.pkg)) {
+                // just update that one to use this new data instead
+                mSegments.remove(i);
+            }
+        }
+
+        mSegments.add(newSegment);
+
+        if (initialCount == 0 && mSegments.size() > 0) {
+            Segment seg = mSegments.get(0);
+            seg.first = false;
+            
+            mIconSwitcher.setAnimateFirstView(false);
+            mIconSwitcher.reset();
+            mIconSwitcher.setImageDrawable(seg.icon);
+            
+            mTextSwitcher.setAnimateFirstView(false);
+            mTextSwitcher.reset();
+            mTextSwitcher.setText(seg.getText());
+            
+            tickerStarting();
+            scheduleAdvance();
+        }
+    }
+
+    void removeEntry(StatusBarNotification n) {
+        for (int i=mSegments.size()-1; i>=0; i--) {
+            Segment seg = mSegments.get(i);
+            if (n.id == seg.notification.id && n.pkg.equals(seg.notification.pkg)) {
+                mSegments.remove(i);
+            }
+        }
+    }
+
+    void halt() {
+        mHandler.removeCallbacks(mAdvanceTicker);
+        mSegments.clear();
+        tickerHalting();
+    }
+
+    void reflowText() {
+        if (mSegments.size() > 0) {
+            Segment seg = mSegments.get(0);
+            CharSequence text = seg.getText();
+            mTextSwitcher.setCurrentText(text);
+        }
+    }
+
+    private Runnable mAdvanceTicker = new Runnable() {
+        public void run() {
+            while (mSegments.size() > 0) {
+                Segment seg = mSegments.get(0);
+
+                if (seg.first) {
+                    // this makes the icon slide in for the first one for a given
+                    // notification even if there are two notifications with the
+                    // same icon in a row
+                    mIconSwitcher.setImageDrawable(seg.icon);
+                }
+                CharSequence text = seg.advance();
+                if (text == null) {
+                    mSegments.remove(0);
+                    continue;
+                }
+                mTextSwitcher.setText(text);
+
+                scheduleAdvance();
+                break;
+            }
+            if (mSegments.size() == 0) {
+                tickerDone();
+            }
+        }
+    };
+
+    private void scheduleAdvance() {
+        mHandler.postDelayed(mAdvanceTicker, TICKER_SEGMENT_DELAY);
+    }
+
+    abstract void tickerStarting();
+    abstract void tickerDone();
+    abstract void tickerHalting();
+}
+
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/TickerView.java b/packages/SystemUI/src/com/android/systemui/statusbar/TickerView.java
new file mode 100644
index 0000000..9749ae4
--- /dev/null
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/TickerView.java
@@ -0,0 +1,38 @@
+/*
+ * Copyright (C) 2008 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.android.systemui.statusbar;
+
+import android.content.Context;
+import android.util.AttributeSet;
+import android.widget.TextSwitcher;
+
+
+public class TickerView extends TextSwitcher
+{
+    Ticker mTicker;
+
+    public TickerView(Context context, AttributeSet attrs) {
+        super(context, attrs);
+    }
+
+    @Override
+    protected void onSizeChanged(int w, int h, int oldw, int oldh) {
+        super.onSizeChanged(w, h, oldw, oldh);
+        mTicker.reflowText();
+    }
+}
+
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/TrackingPatternView.java b/packages/SystemUI/src/com/android/systemui/statusbar/TrackingPatternView.java
new file mode 100644
index 0000000..ba6f15d
--- /dev/null
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/TrackingPatternView.java
@@ -0,0 +1,70 @@
+/*
+ * Copyright (C) 2008 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.android.systemui.statusbar;
+
+import android.content.Context;
+import android.content.res.TypedArray;
+import android.util.AttributeSet;
+import android.util.Slog;
+import android.view.View;
+import android.graphics.BitmapFactory;
+import android.graphics.Bitmap;
+import android.graphics.Paint;
+import android.graphics.Canvas;
+
+public class TrackingPatternView extends View {
+    private Bitmap mTexture;
+    private Paint mPaint;
+    private int mTextureWidth;
+    private int mTextureHeight;
+    
+    public TrackingPatternView(Context context, AttributeSet attrs) {
+        super(context, attrs);
+
+        mTexture = BitmapFactory.decodeResource(getResources(), 
+                com.android.internal.R.drawable.status_bar_background);
+        mTextureWidth = mTexture.getWidth();
+        mTextureHeight = mTexture.getHeight();
+
+        mPaint = new Paint();
+        mPaint.setDither(false);
+    }
+
+    @Override
+    public void onDraw(Canvas canvas) {
+        final Bitmap texture = mTexture;
+        final Paint paint = mPaint;
+
+        final int width = getWidth();
+        final int height = getHeight();
+
+        final int textureWidth = mTextureWidth;
+        final int textureHeight = mTextureHeight;
+
+        int x = 0;
+        int y;
+
+        while (x < width) {
+            y = 0;
+            while (y < height) {
+                canvas.drawBitmap(texture, x, y, paint);
+                y += textureHeight;
+            }
+            x += textureWidth;
+        }
+    }
+}
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/TrackingView.java b/packages/SystemUI/src/com/android/systemui/statusbar/TrackingView.java
new file mode 100644
index 0000000..9108eee
--- /dev/null
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/TrackingView.java
@@ -0,0 +1,63 @@
+/*
+ * Copyright (C) 2008 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.android.systemui.statusbar;
+
+import android.content.Context;
+import android.util.AttributeSet;
+import android.view.Display;
+import android.view.KeyEvent;
+import android.view.WindowManager;
+import android.widget.LinearLayout;
+
+
+public class TrackingView extends LinearLayout {
+    final Display mDisplay;
+    StatusBarService mService;
+    boolean mTracking;
+    int mStartX, mStartY;
+
+    public TrackingView(Context context, AttributeSet attrs) {
+        super(context, attrs);
+        mDisplay = ((WindowManager)context.getSystemService(
+                Context.WINDOW_SERVICE)).getDefaultDisplay();
+    }
+    
+    @Override
+    protected void onLayout(boolean changed, int left, int top, int right, int bottom) {
+        super.onLayout(changed, left, top, right, bottom);
+        mService.updateExpandedHeight();
+    }
+
+    @Override
+    public boolean dispatchKeyEvent(KeyEvent event) {
+        boolean down = event.getAction() == KeyEvent.ACTION_DOWN;
+        switch (event.getKeyCode()) {
+        case KeyEvent.KEYCODE_BACK:
+            if (down) {
+                //mService.deactivate();
+            }
+            return true;
+        }
+        return super.dispatchKeyEvent(event);
+    }
+
+    @Override
+    protected void onAttachedToWindow() {
+        super.onAttachedToWindow();
+        mService.onTrackingViewAttached();
+    }
+}
diff --git a/packages/SystemUI/src/com/android/systemui/usb/StorageNotification.java b/packages/SystemUI/src/com/android/systemui/usb/StorageNotification.java
new file mode 100644
index 0000000..b9e915a4
--- /dev/null
+++ b/packages/SystemUI/src/com/android/systemui/usb/StorageNotification.java
@@ -0,0 +1,398 @@
+/*
+ * Copyright (C) 2010 Google Inc.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.android.systemui.usb;
+
+import android.app.Activity;
+import android.app.Notification;
+import android.app.NotificationManager;
+import android.app.PendingIntent;
+import android.content.BroadcastReceiver;
+import android.content.Context;
+import android.content.DialogInterface;
+import android.content.Intent;
+import android.content.IntentFilter;
+import android.content.pm.PackageManager;
+import android.content.res.Resources;
+import android.os.Bundle;
+import android.os.Environment;
+import android.os.Handler;
+import android.os.storage.IMountService;
+import android.os.Message;
+import android.os.ServiceManager;
+import android.os.storage.StorageEventListener;
+import android.os.storage.StorageManager;
+import android.os.storage.StorageResultCode;
+import android.provider.Settings;
+import android.util.Slog;
+import android.view.View;
+import android.widget.Button;
+import android.widget.ImageView;
+import android.widget.TextView;
+import android.widget.Toast;
+
+public class StorageNotification extends StorageEventListener {
+    private static final String TAG = "StorageNotification";
+
+    private static final boolean POP_UMS_ACTIVITY_ON_CONNECT = true;
+
+    /**
+     * Binder context for this service
+     */
+    private Context mContext;
+    
+    /**
+     * The notification that is shown when a USB mass storage host
+     * is connected. 
+     * <p>
+     * This is lazily created, so use {@link #setUsbStorageNotification()}.
+     */
+    private Notification mUsbStorageNotification;
+
+    /**
+     * The notification that is shown when the following media events occur:
+     *     - Media is being checked
+     *     - Media is blank (or unknown filesystem)
+     *     - Media is corrupt
+     *     - Media is safe to unmount
+     *     - Media is missing
+     * <p>
+     * This is lazily created, so use {@link #setMediaStorageNotification()}.
+     */
+    private Notification   mMediaStorageNotification;
+    private boolean        mUmsAvailable;
+    private StorageManager mStorageManager;
+
+    public StorageNotification(Context context) {
+        mContext = context;
+
+        mStorageManager = (StorageManager) context.getSystemService(Context.STORAGE_SERVICE);
+        final boolean connected = mStorageManager.isUsbMassStorageConnected();
+        Slog.d(TAG, String.format( "Startup with UMS connection %s (media state %s)", mUmsAvailable,
+                Environment.getExternalStorageState()));
+        onUsbMassStorageConnectionChanged(connected);
+    }
+
+    /*
+     * @override com.android.os.storage.StorageEventListener
+     */
+    @Override
+    public void onUsbMassStorageConnectionChanged(boolean connected) {
+        mUmsAvailable = connected;
+        /*
+         * Even though we may have a UMS host connected, we the SD card
+         * may not be in a state for export.
+         */
+        String st = Environment.getExternalStorageState();
+
+        Slog.i(TAG, String.format("UMS connection changed to %s (media state %s)", connected, st));
+
+        if (connected && (st.equals(
+                Environment.MEDIA_REMOVED) || st.equals(Environment.MEDIA_CHECKING))) {
+            /*
+             * No card or card being checked = don't display
+             */
+            connected = false;
+        }
+        updateUsbMassStorageNotification(connected);
+    }
+
+    /*
+     * @override com.android.os.storage.StorageEventListener
+     */
+    @Override
+    public void onStorageStateChanged(String path, String oldState, String newState) {
+        Slog.i(TAG, String.format(
+                "Media {%s} state changed from {%s} -> {%s}", path, oldState, newState));
+        if (newState.equals(Environment.MEDIA_SHARED)) {
+            /*
+             * Storage is now shared. Modify the UMS notification
+             * for stopping UMS.
+             */
+            Intent intent = new Intent();
+            intent.setClass(mContext, com.android.systemui.usb.UsbStorageActivity.class);
+            PendingIntent pi = PendingIntent.getActivity(mContext, 0, intent, 0);
+            setUsbStorageNotification(
+                    com.android.internal.R.string.usb_storage_stop_notification_title,
+                    com.android.internal.R.string.usb_storage_stop_notification_message,
+                    com.android.internal.R.drawable.stat_sys_warning, false, true, pi);
+        } else if (newState.equals(Environment.MEDIA_CHECKING)) {
+            /*
+             * Storage is now checking. Update media notification and disable
+             * UMS notification.
+             */
+            setMediaStorageNotification(
+                    com.android.internal.R.string.ext_media_checking_notification_title,
+                    com.android.internal.R.string.ext_media_checking_notification_message,
+                    com.android.internal.R.drawable.stat_notify_sdcard_prepare, true, false, null);
+            updateUsbMassStorageNotification(false);
+        } else if (newState.equals(Environment.MEDIA_MOUNTED)) {
+            /*
+             * Storage is now mounted. Dismiss any media notifications,
+             * and enable UMS notification if connected.
+             */
+            setMediaStorageNotification(0, 0, 0, false, false, null);
+            updateUsbMassStorageNotification(mUmsAvailable);
+        } else if (newState.equals(Environment.MEDIA_UNMOUNTED)) {
+            /*
+             * Storage is now unmounted. We may have been unmounted
+             * because the user is enabling/disabling UMS, in which case we don't
+             * want to display the 'safe to unmount' notification.
+             */
+            if (!mStorageManager.isUsbMassStorageEnabled()) {
+                if (oldState.equals(Environment.MEDIA_SHARED)) {
+                    /*
+                     * The unmount was due to UMS being enabled. Dismiss any
+                     * media notifications, and enable UMS notification if connected
+                     */
+                    setMediaStorageNotification(0, 0, 0, false, false, null);
+                    updateUsbMassStorageNotification(mUmsAvailable);
+                } else {
+                    /*
+                     * Show safe to unmount media notification, and enable UMS
+                     * notification if connected.
+                     */
+                    setMediaStorageNotification(
+                            com.android.internal.R.string.ext_media_safe_unmount_notification_title,
+                            com.android.internal.R.string.ext_media_safe_unmount_notification_message,
+                            com.android.internal.R.drawable.stat_notify_sdcard, true, true, null);
+                    updateUsbMassStorageNotification(mUmsAvailable);
+                }
+            } else {
+                /*
+                 * The unmount was due to UMS being enabled. Dismiss any
+                 * media notifications, and disable the UMS notification
+                 */
+                setMediaStorageNotification(0, 0, 0, false, false, null);
+                updateUsbMassStorageNotification(false);
+            }
+        } else if (newState.equals(Environment.MEDIA_NOFS)) {
+            /*
+             * Storage has no filesystem. Show blank media notification,
+             * and enable UMS notification if connected.
+             */
+            Intent intent = new Intent();
+            intent.setClass(mContext, com.android.internal.app.ExternalMediaFormatActivity.class);
+            PendingIntent pi = PendingIntent.getActivity(mContext, 0, intent, 0);
+
+            setMediaStorageNotification(
+                    com.android.internal.R.string.ext_media_nofs_notification_title,
+                    com.android.internal.R.string.ext_media_nofs_notification_message,
+                    com.android.internal.R.drawable.stat_notify_sdcard_usb, true, false, pi);
+            updateUsbMassStorageNotification(mUmsAvailable);
+        } else if (newState.equals(Environment.MEDIA_UNMOUNTABLE)) {
+            /*
+             * Storage is corrupt. Show corrupt media notification,
+             * and enable UMS notification if connected.
+             */
+            Intent intent = new Intent();
+            intent.setClass(mContext, com.android.internal.app.ExternalMediaFormatActivity.class);
+            PendingIntent pi = PendingIntent.getActivity(mContext, 0, intent, 0);
+
+            setMediaStorageNotification(
+                    com.android.internal.R.string.ext_media_unmountable_notification_title,
+                    com.android.internal.R.string.ext_media_unmountable_notification_message,
+                    com.android.internal.R.drawable.stat_notify_sdcard_usb, true, false, pi); 
+            updateUsbMassStorageNotification(mUmsAvailable);
+        } else if (newState.equals(Environment.MEDIA_REMOVED)) {
+            /*
+             * Storage has been removed. Show nomedia media notification,
+             * and disable UMS notification regardless of connection state.
+             */
+            setMediaStorageNotification(
+                    com.android.internal.R.string.ext_media_nomedia_notification_title,
+                    com.android.internal.R.string.ext_media_nomedia_notification_message,
+                    com.android.internal.R.drawable.stat_notify_sdcard_usb,
+                    true, false, null);
+            updateUsbMassStorageNotification(false);
+        } else if (newState.equals(Environment.MEDIA_BAD_REMOVAL)) {
+            /*
+             * Storage has been removed unsafely. Show bad removal media notification,
+             * and disable UMS notification regardless of connection state.
+             */
+            setMediaStorageNotification(
+                    com.android.internal.R.string.ext_media_badremoval_notification_title,
+                    com.android.internal.R.string.ext_media_badremoval_notification_message,
+                    com.android.internal.R.drawable.stat_sys_warning,
+                    true, true, null);
+            updateUsbMassStorageNotification(false);
+        } else {
+            Slog.w(TAG, String.format("Ignoring unknown state {%s}", newState));
+        }
+    }
+
+    /**
+     * Update the state of the USB mass storage notification
+     */
+    void updateUsbMassStorageNotification(boolean available) {
+
+        if (available) {
+            Intent intent = new Intent();
+            intent.setClass(mContext, com.android.systemui.usb.UsbStorageActivity.class);
+            intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
+
+            PendingIntent pi = PendingIntent.getActivity(mContext, 0, intent, 0);
+            setUsbStorageNotification(
+                    com.android.internal.R.string.usb_storage_notification_title,
+                    com.android.internal.R.string.usb_storage_notification_message,
+                    com.android.internal.R.drawable.stat_sys_data_usb,
+                    false, true, pi);
+        } else {
+            setUsbStorageNotification(0, 0, 0, false, false, null);
+        }
+    }
+
+    /**
+     * Sets the USB storage notification.
+     */
+    private synchronized void setUsbStorageNotification(int titleId, int messageId, int icon,
+            boolean sound, boolean visible, PendingIntent pi) {
+
+        if (!visible && mUsbStorageNotification == null) {
+            return;
+        }
+
+        NotificationManager notificationManager = (NotificationManager) mContext
+                .getSystemService(Context.NOTIFICATION_SERVICE);
+
+        if (notificationManager == null) {
+            return;
+        }
+        
+        if (visible) {
+            Resources r = Resources.getSystem();
+            CharSequence title = r.getText(titleId);
+            CharSequence message = r.getText(messageId);
+
+            if (mUsbStorageNotification == null) {
+                mUsbStorageNotification = new Notification();
+                mUsbStorageNotification.icon = icon;
+                mUsbStorageNotification.when = 0;
+            }
+
+            if (sound) {
+                mUsbStorageNotification.defaults |= Notification.DEFAULT_SOUND;
+            } else {
+                mUsbStorageNotification.defaults &= ~Notification.DEFAULT_SOUND;
+            }
+                
+            mUsbStorageNotification.flags = Notification.FLAG_ONGOING_EVENT;
+
+            mUsbStorageNotification.tickerText = title;
+            if (pi == null) {
+                Intent intent = new Intent();
+                pi = PendingIntent.getBroadcast(mContext, 0, intent, 0);
+            }
+
+            mUsbStorageNotification.setLatestEventInfo(mContext, title, message, pi);
+            final boolean adbOn = 1 == Settings.Secure.getInt(
+                mContext.getContentResolver(),
+                Settings.Secure.ADB_ENABLED,
+                0);
+
+            if (POP_UMS_ACTIVITY_ON_CONNECT && !adbOn) {
+                // Pop up a full-screen alert to coach the user through enabling UMS. The average
+                // user has attached the device to USB either to charge the phone (in which case
+                // this is harmless) or transfer files, and in the latter case this alert saves
+                // several steps (as well as subtly indicates that you shouldn't mix UMS with other
+                // activities on the device).
+                //
+                // If ADB is enabled, however, we suppress this dialog (under the assumption that a
+                // developer (a) knows how to enable UMS, and (b) is probably using USB to install
+                // builds or use adb commands.
+                mUsbStorageNotification.fullScreenIntent = pi;
+            }
+        }
+    
+        final int notificationId = mUsbStorageNotification.icon;
+        if (visible) {
+            notificationManager.notify(notificationId, mUsbStorageNotification);
+        } else {
+            notificationManager.cancel(notificationId);
+        }
+    }
+
+    private synchronized boolean getMediaStorageNotificationDismissable() {
+        if ((mMediaStorageNotification != null) &&
+            ((mMediaStorageNotification.flags & Notification.FLAG_AUTO_CANCEL) ==
+                    Notification.FLAG_AUTO_CANCEL))
+            return true;
+
+        return false;
+    }
+
+    /**
+     * Sets the media storage notification.
+     */
+    private synchronized void setMediaStorageNotification(int titleId, int messageId, int icon, boolean visible,
+                                                          boolean dismissable, PendingIntent pi) {
+
+        if (!visible && mMediaStorageNotification == null) {
+            return;
+        }
+
+        NotificationManager notificationManager = (NotificationManager) mContext
+                .getSystemService(Context.NOTIFICATION_SERVICE);
+
+        if (notificationManager == null) {
+            return;
+        }
+
+        if (mMediaStorageNotification != null && visible) {
+            /*
+             * Dismiss the previous notification - we're about to
+             * re-use it.
+             */
+            final int notificationId = mMediaStorageNotification.icon;
+            notificationManager.cancel(notificationId);
+        }
+        
+        if (visible) {
+            Resources r = Resources.getSystem();
+            CharSequence title = r.getText(titleId);
+            CharSequence message = r.getText(messageId);
+
+            if (mMediaStorageNotification == null) {
+                mMediaStorageNotification = new Notification();
+                mMediaStorageNotification.when = 0;
+            }
+
+            mMediaStorageNotification.defaults &= ~Notification.DEFAULT_SOUND;
+
+            if (dismissable) {
+                mMediaStorageNotification.flags = Notification.FLAG_AUTO_CANCEL;
+            } else {
+                mMediaStorageNotification.flags = Notification.FLAG_ONGOING_EVENT;
+            }
+
+            mMediaStorageNotification.tickerText = title;
+            if (pi == null) {
+                Intent intent = new Intent();
+                pi = PendingIntent.getBroadcast(mContext, 0, intent, 0);
+            }
+
+            mMediaStorageNotification.icon = icon;
+            mMediaStorageNotification.setLatestEventInfo(mContext, title, message, pi);
+        }
+    
+        final int notificationId = mMediaStorageNotification.icon;
+        if (visible) {
+            notificationManager.notify(notificationId, mMediaStorageNotification);
+        } else {
+            notificationManager.cancel(notificationId);
+        }
+    }
+}
diff --git a/packages/SystemUI/src/com/android/systemui/usb/UsbStorageActivity.java b/packages/SystemUI/src/com/android/systemui/usb/UsbStorageActivity.java
new file mode 100644
index 0000000..55d31ec
--- /dev/null
+++ b/packages/SystemUI/src/com/android/systemui/usb/UsbStorageActivity.java
@@ -0,0 +1,272 @@
+/*
+ * Copyright (C) 2007 Google Inc.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.android.systemui.usb;
+
+import com.android.internal.R;
+import android.app.Activity;
+import android.app.ActivityManager;
+import android.app.AlertDialog;
+import android.app.Dialog;
+import android.content.BroadcastReceiver;
+import android.content.Context;
+import android.content.DialogInterface;
+import android.content.Intent;
+import android.content.IntentFilter;
+import android.content.DialogInterface.OnCancelListener;
+import android.content.pm.ApplicationInfo;
+import android.content.pm.PackageManager;
+import android.content.pm.PackageManager.NameNotFoundException;
+import android.os.Bundle;
+import android.os.Environment;
+import android.os.Handler;
+import android.os.IBinder;
+import android.os.storage.IMountService;
+import android.os.storage.StorageManager;
+import android.os.storage.StorageEventListener;
+import android.os.RemoteException;
+import android.os.ServiceManager;
+import android.widget.ImageView;
+import android.widget.Button;
+import android.widget.ProgressBar;
+import android.widget.TextView;
+import android.view.View;
+import android.view.Window;
+import android.util.Log;
+
+import java.util.List;
+
+/**
+ * This activity is shown to the user for him/her to enable USB mass storage
+ * on-demand (that is, when the USB cable is connected). It uses the alert
+ * dialog style. It will be launched from a notification.
+ */
+public class UsbStorageActivity extends Activity
+        implements View.OnClickListener, OnCancelListener {
+    private static final String TAG = "UsbStorageActivity";
+
+    private Button mMountButton;
+    private Button mUnmountButton;
+    private ProgressBar mProgressBar;
+    private TextView mBanner;
+    private TextView mMessage;
+    private ImageView mIcon;
+    private StorageManager mStorageManager = null;
+    private static final int DLG_CONFIRM_KILL_STORAGE_USERS = 1;
+    private static final int DLG_ERROR_SHARING = 2;
+    static final boolean localLOGV = false;
+
+    /** Used to detect when the USB cable is unplugged, so we can call finish() */
+    private BroadcastReceiver mBatteryReceiver = new BroadcastReceiver() {
+        @Override
+        public void onReceive(Context context, Intent intent) {
+            if (intent.getAction() == Intent.ACTION_BATTERY_CHANGED) {
+                handleBatteryChanged(intent);
+            }
+        }
+    };
+
+    private StorageEventListener mStorageListener = new StorageEventListener() {
+        @Override
+        public void onStorageStateChanged(String path, String oldState, String newState) {
+            final boolean on = newState.equals(Environment.MEDIA_SHARED);
+            switchDisplay(on);
+        }
+    };
+    
+    @Override
+    protected void onCreate(Bundle savedInstanceState) {
+        super.onCreate(savedInstanceState);
+
+        if (mStorageManager == null) {
+            mStorageManager = (StorageManager) getSystemService(Context.STORAGE_SERVICE);
+            if (mStorageManager == null) {
+                Log.w(TAG, "Failed to get StorageManager");
+            }
+        }
+
+        requestWindowFeature(Window.FEATURE_INDETERMINATE_PROGRESS);
+        setProgressBarIndeterminateVisibility(true);
+
+        setTitle(getString(com.android.internal.R.string.usb_storage_activity_title));
+
+        setContentView(com.android.internal.R.layout.usb_storage_activity);
+
+        mIcon = (ImageView) findViewById(com.android.internal.R.id.icon);
+        mBanner = (TextView) findViewById(com.android.internal.R.id.banner);
+        mMessage = (TextView) findViewById(com.android.internal.R.id.message);
+
+        mMountButton = (Button) findViewById(com.android.internal.R.id.mount_button);
+        mMountButton.setOnClickListener(this);
+        mUnmountButton = (Button) findViewById(com.android.internal.R.id.unmount_button);
+        mUnmountButton.setOnClickListener(this);
+        mProgressBar = (ProgressBar) findViewById(com.android.internal.R.id.progress);
+    }
+
+    private void switchDisplay(boolean usbStorageInUse) {
+        if (usbStorageInUse) {
+            mProgressBar.setVisibility(View.GONE);
+            mUnmountButton.setVisibility(View.VISIBLE);
+            mMountButton.setVisibility(View.GONE);
+            mIcon.setImageResource(com.android.internal.R.drawable.usb_android_connected);
+            mBanner.setText(com.android.internal.R.string.usb_storage_stop_title);
+            mMessage.setText(com.android.internal.R.string.usb_storage_stop_message);
+        } else {
+            mProgressBar.setVisibility(View.GONE);
+            mUnmountButton.setVisibility(View.GONE);
+            mMountButton.setVisibility(View.VISIBLE);
+            mIcon.setImageResource(com.android.internal.R.drawable.usb_android);
+            mBanner.setText(com.android.internal.R.string.usb_storage_title);
+            mMessage.setText(com.android.internal.R.string.usb_storage_message);
+        }
+    }
+
+    @Override
+    protected void onResume() {
+        super.onResume();
+
+        mStorageManager.registerListener(mStorageListener);
+        registerReceiver(mBatteryReceiver, new IntentFilter(Intent.ACTION_BATTERY_CHANGED));
+        try {
+            switchDisplay(mStorageManager.isUsbMassStorageEnabled());
+        } catch (Exception ex) {
+            Log.e(TAG, "Failed to read UMS enable state", ex);
+        }
+    }
+
+    @Override
+    protected void onPause() {
+        super.onPause();
+        
+        unregisterReceiver(mBatteryReceiver);
+        if (mStorageManager == null && mStorageListener != null) {
+            mStorageManager.unregisterListener(mStorageListener);
+        }
+    }
+
+    private void handleBatteryChanged(Intent intent) {
+        int pluggedType = intent.getIntExtra("plugged", 0);
+        if (pluggedType == 0) {
+            // It was disconnected from the plug, so finish
+            finish();
+        }
+    }
+
+    private IMountService getMountService() {
+        IBinder service = ServiceManager.getService("mount");
+        if (service != null) {
+            return IMountService.Stub.asInterface(service);
+        }
+        return null;
+    }
+
+    @Override
+    public Dialog onCreateDialog(int id, Bundle args) {
+        switch (id) {
+        case DLG_CONFIRM_KILL_STORAGE_USERS:
+            return new AlertDialog.Builder(this)
+                    .setTitle(R.string.dlg_confirm_kill_storage_users_title)
+                    .setPositiveButton(R.string.dlg_ok, new DialogInterface.OnClickListener() {
+                        public void onClick(DialogInterface dialog, int which) {
+                            switchUsbMassStorageAsync(true);
+                        }})
+                    .setNegativeButton(R.string.cancel, null)
+                    .setMessage(R.string.dlg_confirm_kill_storage_users_text)
+                    .setOnCancelListener(this)
+                    .create();
+        case DLG_ERROR_SHARING:
+            return new AlertDialog.Builder(this)
+                    .setTitle(R.string.dlg_error_title)
+                    .setNeutralButton(R.string.dlg_ok, null)
+                    .setMessage(R.string.usb_storage_error_message)
+                    .setOnCancelListener(this)
+                    .create();
+        }
+        return null;
+    }
+
+    private void showDialogInner(int id) {
+        removeDialog(id);
+        showDialog(id);
+    }
+
+    private void switchUsbMassStorageAsync(boolean on) {
+        mUnmountButton.setVisibility(View.GONE);
+        mMountButton.setVisibility(View.GONE);
+
+        mProgressBar.setVisibility(View.VISIBLE);
+        // will be hidden once USB mass storage kicks in (or fails)
+        
+        final boolean _on = on;
+        new Thread() {
+            public void run() {
+                if (_on) {
+                    mStorageManager.enableUsbMassStorage();
+                } else {
+                    mStorageManager.disableUsbMassStorage();
+                }
+            }
+        }.start();
+    }
+
+    private void checkStorageUsers() {
+        IMountService ims = getMountService();
+        if (ims == null) {
+            // Display error dialog
+            showDialogInner(DLG_ERROR_SHARING);
+        }
+        String extStoragePath = Environment.getExternalStorageDirectory().toString();
+        boolean showDialog = false;
+        try {
+            int[] stUsers = ims.getStorageUsers(extStoragePath);
+            if (stUsers != null && stUsers.length > 0) {
+                showDialog = true;
+            } else {
+                // List of applications on sdcard.
+                ActivityManager am = (ActivityManager)getSystemService(Context.ACTIVITY_SERVICE);
+                List<ApplicationInfo> infoList = am.getRunningExternalApplications();
+                if (infoList != null && infoList.size() > 0) {
+                    showDialog = true;
+                }
+            }
+        } catch (RemoteException e) {
+            // Display error dialog
+            showDialogInner(DLG_ERROR_SHARING);
+        }
+        if (showDialog) {
+            // Display dialog to user
+            showDialogInner(DLG_CONFIRM_KILL_STORAGE_USERS);
+        } else {
+            if (localLOGV) Log.i(TAG, "Enabling UMS");
+            switchUsbMassStorageAsync(true);
+        }
+    }
+
+    public void onClick(View v) {
+        if (v == mMountButton) {
+           // Check for list of storage users and display dialog if needed.
+            checkStorageUsers();
+        } else if (v == mUnmountButton) {
+            if (localLOGV) Log.i(TAG, "Disabling UMS");
+            switchUsbMassStorageAsync(false);
+        }
+    }
+
+    public void onCancel(DialogInterface dialog) {
+        finish();
+    }
+
+}
diff --git a/packages/VpnServices/src/com/android/server/vpn/VpnServiceBinder.java b/packages/VpnServices/src/com/android/server/vpn/VpnServiceBinder.java
index 5672a01..eeafd5a 100644
--- a/packages/VpnServices/src/com/android/server/vpn/VpnServiceBinder.java
+++ b/packages/VpnServices/src/com/android/server/vpn/VpnServiceBinder.java
@@ -52,8 +52,11 @@
     // The actual implementation is delegated to the VpnService class.
     private VpnService<? extends VpnProfile> mService;
 
+    // TODO(oam): Test VPN when EFS is enabled (will do later)...
     private static String getStateFilePath() {
-	return Environment.getDataDirectory().getPath() + STATES_FILE_RELATIVE_PATH;
+        // This call will return the correcu directory whether Encrypted FS is enabled or not
+        // Disabled: /data/misc/vpn/.states   Enabled: /data/secure/misc/vpn/.states
+	return Environment.getSecureDataDirectory().getPath() + STATES_FILE_RELATIVE_PATH;
     }
 
     private final IBinder mBinder = new IVpnService.Stub() {
diff --git a/policy/Android.mk b/policy/Android.mk
new file mode 100644
index 0000000..47d8fb8
--- /dev/null
+++ b/policy/Android.mk
@@ -0,0 +1,14 @@
+LOCAL_PATH:= $(call my-dir)
+
+# the library
+# ============================================================
+include $(CLEAR_VARS)
+
+LOCAL_SRC_FILES := $(call all-java-files-under, src)
+            
+LOCAL_MODULE := android.policy
+
+include $(BUILD_JAVA_LIBRARY)
+
+# additionally, build unit tests in a separate .apk
+include $(call all-makefiles-under,$(LOCAL_PATH))
diff --git a/policy/src/com/android/internal/policy/impl/AccountUnlockScreen.java b/policy/src/com/android/internal/policy/impl/AccountUnlockScreen.java
new file mode 100644
index 0000000..840c5e1
--- /dev/null
+++ b/policy/src/com/android/internal/policy/impl/AccountUnlockScreen.java
@@ -0,0 +1,347 @@
+/*
+ * Copyright (C) 2008 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.android.internal.policy.impl;
+
+import com.android.internal.R;
+import com.android.internal.widget.LockPatternUtils;
+
+import android.accounts.Account;
+import android.accounts.AccountManager;
+import android.accounts.OperationCanceledException;
+import android.accounts.AccountManagerFuture;
+import android.accounts.AuthenticatorException;
+import android.accounts.AccountManagerCallback;
+import android.content.Context;
+import android.content.Intent;
+import android.content.res.Configuration;
+import android.graphics.Rect;
+import android.text.Editable;
+import android.text.InputFilter;
+import android.text.LoginFilter;
+import android.text.TextWatcher;
+import android.view.KeyEvent;
+import android.view.LayoutInflater;
+import android.view.View;
+import android.view.WindowManager;
+import android.widget.Button;
+import android.widget.EditText;
+import android.widget.RelativeLayout;
+import android.widget.TextView;
+import android.app.Dialog;
+import android.app.ProgressDialog;
+import android.os.Bundle;
+
+import java.io.IOException;
+
+/**
+ * When the user forgets their password a bunch of times, we fall back on their
+ * account's login/password to unlock the phone (and reset their lock pattern).
+ */
+public class AccountUnlockScreen extends RelativeLayout implements KeyguardScreen,
+        KeyguardUpdateMonitor.InfoCallback,View.OnClickListener, TextWatcher {
+    private static final String LOCK_PATTERN_PACKAGE = "com.android.settings";
+    private static final String LOCK_PATTERN_CLASS =
+            "com.android.settings.ChooseLockPattern";
+
+    /**
+     * The amount of millis to stay awake once this screen detects activity
+     */
+    private static final int AWAKE_POKE_MILLIS = 30000;
+
+    private final KeyguardScreenCallback mCallback;
+    private final LockPatternUtils mLockPatternUtils;
+    private KeyguardUpdateMonitor mUpdateMonitor;
+
+    private TextView mTopHeader;
+    private TextView mInstructions;
+    private EditText mLogin;
+    private EditText mPassword;
+    private Button mOk;
+    private Button mEmergencyCall;
+
+    /**
+     * Shown while making asynchronous check of password.
+     */
+    private ProgressDialog mCheckingDialog;
+
+    /**
+     * AccountUnlockScreen constructor.
+     * @param configuration
+     * @param updateMonitor
+     */
+    public AccountUnlockScreen(Context context,Configuration configuration,
+            KeyguardUpdateMonitor updateMonitor, KeyguardScreenCallback callback,
+            LockPatternUtils lockPatternUtils) {
+        super(context);
+        mCallback = callback;
+        mLockPatternUtils = lockPatternUtils;
+
+        LayoutInflater.from(context).inflate(
+                R.layout.keyguard_screen_glogin_unlock, this, true);
+
+        mTopHeader = (TextView) findViewById(R.id.topHeader);
+        mTopHeader.setText(mLockPatternUtils.isPermanentlyLocked() ?
+                R.string.lockscreen_glogin_too_many_attempts :
+                R.string.lockscreen_glogin_forgot_pattern);
+
+        mInstructions = (TextView) findViewById(R.id.instructions);
+
+        mLogin = (EditText) findViewById(R.id.login);
+        mLogin.setFilters(new InputFilter[] { new LoginFilter.UsernameFilterGeneric() } );
+        mLogin.addTextChangedListener(this);
+
+        mPassword = (EditText) findViewById(R.id.password);
+        mPassword.addTextChangedListener(this);
+
+        mOk = (Button) findViewById(R.id.ok);
+        mOk.setOnClickListener(this);
+
+        mEmergencyCall = (Button) findViewById(R.id.emergencyCall);
+        mEmergencyCall.setOnClickListener(this);
+        mLockPatternUtils.updateEmergencyCallButtonState(mEmergencyCall);
+
+        mUpdateMonitor = updateMonitor;
+        mUpdateMonitor.registerInfoCallback(this);
+    }
+
+    public void afterTextChanged(Editable s) {
+    }
+
+    public void beforeTextChanged(CharSequence s, int start, int count, int after) {
+    }
+
+    public void onTextChanged(CharSequence s, int start, int before, int count) {
+        mCallback.pokeWakelock(AWAKE_POKE_MILLIS);
+    }
+
+    @Override
+    protected boolean onRequestFocusInDescendants(int direction,
+            Rect previouslyFocusedRect) {
+        // send focus to the login field
+        return mLogin.requestFocus(direction, previouslyFocusedRect);
+    }
+
+    /** {@inheritDoc} */
+    public boolean needsInput() {
+        return true;
+    }
+
+    /** {@inheritDoc} */
+    public void onPause() {
+
+    }
+
+    /** {@inheritDoc} */
+    public void onResume() {
+        // start fresh
+        mLogin.setText("");
+        mPassword.setText("");
+        mLogin.requestFocus();
+        mLockPatternUtils.updateEmergencyCallButtonState(mEmergencyCall);
+    }
+
+    /** {@inheritDoc} */
+    public void cleanUp() {
+        if (mCheckingDialog != null) {
+            mCheckingDialog.hide();
+        }
+        mUpdateMonitor.removeCallback(this);
+    }
+
+    /** {@inheritDoc} */
+    public void onClick(View v) {
+        mCallback.pokeWakelock();
+        if (v == mOk) {
+            asyncCheckPassword();
+        }
+
+        if (v == mEmergencyCall) {
+            mCallback.takeEmergencyCallAction();
+        }
+    }
+
+    private void postOnCheckPasswordResult(final boolean success) {
+        // ensure this runs on UI thread
+        mLogin.post(new Runnable() {
+            public void run() {
+                if (success) {
+                    // clear out forgotten password
+                    mLockPatternUtils.setPermanentlyLocked(false);
+                    mLockPatternUtils.setLockPatternEnabled(false);
+                    mLockPatternUtils.saveLockPattern(null);
+
+                    // launch the 'choose lock pattern' activity so
+                    // the user can pick a new one if they want to
+                    Intent intent = new Intent();
+                    intent.setClassName(LOCK_PATTERN_PACKAGE, LOCK_PATTERN_CLASS);
+                    intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
+                    mContext.startActivity(intent);
+                    mCallback.reportSuccessfulUnlockAttempt();
+
+                    // close the keyguard
+                    mCallback.keyguardDone(true);
+                } else {
+                    mInstructions.setText(R.string.lockscreen_glogin_invalid_input);
+                    mPassword.setText("");
+                    mCallback.reportFailedUnlockAttempt();
+                }
+            }
+        });
+    }
+
+    @Override
+    public boolean dispatchKeyEvent(KeyEvent event) {
+        if (event.getAction() == KeyEvent.ACTION_DOWN
+                && event.getKeyCode() == KeyEvent.KEYCODE_BACK) {
+            if (mLockPatternUtils.isPermanentlyLocked()) {
+                mCallback.goToLockScreen();
+            } else {
+                mCallback.forgotPattern(false);
+            }
+            return true;
+        }
+        return super.dispatchKeyEvent(event);
+    }
+
+    /**
+     * Given the string the user entered in the 'username' field, find
+     * the stored account that they probably intended.  Prefer, in order:
+     *
+     *   - an exact match for what was typed, or
+     *   - a case-insensitive match for what was typed, or
+     *   - if they didn't include a domain, an exact match of the username, or
+     *   - if they didn't include a domain, a case-insensitive
+     *     match of the username.
+     *
+     * If there is a tie for the best match, choose neither --
+     * the user needs to be more specific.
+     *
+     * @return an account name from the database, or null if we can't
+     * find a single best match.
+     */
+    private Account findIntendedAccount(String username) {
+        Account[] accounts = AccountManager.get(mContext).getAccountsByType("com.google");
+
+        // Try to figure out which account they meant if they
+        // typed only the username (and not the domain), or got
+        // the case wrong.
+
+        Account bestAccount = null;
+        int bestScore = 0;
+        for (Account a: accounts) {
+            int score = 0;
+            if (username.equals(a.name)) {
+                score = 4;
+            } else if (username.equalsIgnoreCase(a.name)) {
+                score = 3;
+            } else if (username.indexOf('@') < 0) {
+                int i = a.name.indexOf('@');
+                if (i >= 0) {
+                    String aUsername = a.name.substring(0, i);
+                    if (username.equals(aUsername)) {
+                        score = 2;
+                    } else if (username.equalsIgnoreCase(aUsername)) {
+                        score = 1;
+                    }
+                }
+            }
+            if (score > bestScore) {
+                bestAccount = a;
+                bestScore = score;
+            } else if (score == bestScore) {
+                bestAccount = null;
+            }
+        }
+        return bestAccount;
+    }
+
+    private void asyncCheckPassword() {
+        mCallback.pokeWakelock(AWAKE_POKE_MILLIS);
+        final String login = mLogin.getText().toString();
+        final String password = mPassword.getText().toString();
+        Account account = findIntendedAccount(login);
+        if (account == null) {
+            postOnCheckPasswordResult(false);
+            return;
+        }
+        getProgressDialog().show();
+        Bundle options = new Bundle();
+        options.putString(AccountManager.KEY_PASSWORD, password);
+        AccountManager.get(mContext).confirmCredentials(account, options, null /* activity */,
+                new AccountManagerCallback<Bundle>() {
+            public void run(AccountManagerFuture<Bundle> future) {
+                try {
+                    mCallback.pokeWakelock(AWAKE_POKE_MILLIS);
+                    final Bundle result = future.getResult();
+                    final boolean verified = result.getBoolean(AccountManager.KEY_BOOLEAN_RESULT);
+                    postOnCheckPasswordResult(verified);
+                } catch (OperationCanceledException e) {
+                    postOnCheckPasswordResult(false);
+                } catch (IOException e) {
+                    postOnCheckPasswordResult(false);
+                } catch (AuthenticatorException e) {
+                    postOnCheckPasswordResult(false);
+                } finally {
+                    mLogin.post(new Runnable() {
+                        public void run() {
+                            getProgressDialog().hide();
+                        }
+                    });
+                }
+            }
+        }, null /* handler */);
+    }
+
+    private Dialog getProgressDialog() {
+        if (mCheckingDialog == null) {
+            mCheckingDialog = new ProgressDialog(mContext);
+            mCheckingDialog.setMessage(
+                    mContext.getString(R.string.lockscreen_glogin_checking_password));
+            mCheckingDialog.setIndeterminate(true);
+            mCheckingDialog.setCancelable(false);
+            mCheckingDialog.getWindow().setType(
+                    WindowManager.LayoutParams.TYPE_KEYGUARD_DIALOG);
+            if (!mContext.getResources().getBoolean(
+                    com.android.internal.R.bool.config_sf_slowBlur)) {
+                mCheckingDialog.getWindow().setFlags(
+                        WindowManager.LayoutParams.FLAG_BLUR_BEHIND,
+                        WindowManager.LayoutParams.FLAG_BLUR_BEHIND);
+            }
+        }
+        return mCheckingDialog;
+    }
+
+    public void onPhoneStateChanged(String newState) {
+        mLockPatternUtils.updateEmergencyCallButtonState(mEmergencyCall);
+    }
+
+    public void onRefreshBatteryInfo(boolean showBatteryInfo, boolean pluggedIn, int batteryLevel) {
+
+    }
+
+    public void onRefreshCarrierInfo(CharSequence plmn, CharSequence spn) {
+
+    }
+
+    public void onRingerModeChanged(int state) {
+
+    }
+
+    public void onTimeChanged() {
+
+    }
+}
diff --git a/policy/src/com/android/internal/policy/impl/GlobalActions.java b/policy/src/com/android/internal/policy/impl/GlobalActions.java
new file mode 100644
index 0000000..1f06dcc
--- /dev/null
+++ b/policy/src/com/android/internal/policy/impl/GlobalActions.java
@@ -0,0 +1,578 @@
+/*
+ * Copyright (C) 2008 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.android.internal.policy.impl;
+
+import android.app.Activity;
+import android.app.AlertDialog;
+import android.app.StatusBarManager;
+import android.content.BroadcastReceiver;
+import android.content.Context;
+import android.content.DialogInterface;
+import android.content.Intent;
+import android.content.IntentFilter;
+import android.media.AudioManager;
+import android.os.Handler;
+import android.os.Message;
+import android.os.SystemProperties;
+import android.provider.Settings;
+import android.telephony.PhoneStateListener;
+import android.telephony.ServiceState;
+import android.telephony.TelephonyManager;
+import android.util.Log;
+import android.view.LayoutInflater;
+import android.view.View;
+import android.view.ViewGroup;
+import android.view.WindowManager;
+import android.widget.BaseAdapter;
+import android.widget.ImageView;
+import android.widget.TextView;
+import com.android.internal.R;
+import com.android.internal.app.ShutdownThread;
+import com.android.internal.telephony.TelephonyIntents;
+import com.android.internal.telephony.TelephonyProperties;
+import com.google.android.collect.Lists;
+
+import java.util.ArrayList;
+
+/**
+ * Helper to show the global actions dialog.  Each item is an {@link Action} that
+ * may show depending on whether the keyguard is showing, and whether the device
+ * is provisioned.
+ */
+class GlobalActions implements DialogInterface.OnDismissListener, DialogInterface.OnClickListener  {
+
+    private static final String TAG = "GlobalActions";
+
+    private StatusBarManager mStatusBar;
+
+    private final Context mContext;
+    private final AudioManager mAudioManager;
+
+    private ArrayList<Action> mItems;
+    private AlertDialog mDialog;
+
+    private ToggleAction mSilentModeToggle;
+    private ToggleAction mAirplaneModeOn;
+
+    private MyAdapter mAdapter;
+
+    private boolean mKeyguardShowing = false;
+    private boolean mDeviceProvisioned = false;
+    private ToggleAction.State mAirplaneState = ToggleAction.State.Off;
+    private boolean mIsWaitingForEcmExit = false;
+
+    /**
+     * @param context everything needs a context :(
+     */
+    public GlobalActions(Context context) {
+        mContext = context;
+        mAudioManager = (AudioManager) mContext.getSystemService(Context.AUDIO_SERVICE);
+
+        // receive broadcasts
+        IntentFilter filter = new IntentFilter();
+        filter.addAction(Intent.ACTION_CLOSE_SYSTEM_DIALOGS);
+        filter.addAction(Intent.ACTION_SCREEN_OFF);
+        filter.addAction(TelephonyIntents.ACTION_EMERGENCY_CALLBACK_MODE_CHANGED);
+        context.registerReceiver(mBroadcastReceiver, filter);
+
+        // get notified of phone state changes
+        TelephonyManager telephonyManager =
+                (TelephonyManager) context.getSystemService(Context.TELEPHONY_SERVICE);
+        telephonyManager.listen(mPhoneStateListener, PhoneStateListener.LISTEN_SERVICE_STATE);
+    }
+
+    /**
+     * Show the global actions dialog (creating if necessary)
+     * @param keyguardShowing True if keyguard is showing
+     */
+    public void showDialog(boolean keyguardShowing, boolean isDeviceProvisioned) {
+        mKeyguardShowing = keyguardShowing;
+        mDeviceProvisioned = isDeviceProvisioned;
+        if (mDialog == null) {
+            mStatusBar = (StatusBarManager)mContext.getSystemService(Context.STATUS_BAR_SERVICE);
+            mDialog = createDialog();
+        }
+        prepareDialog();
+
+        mStatusBar.disable(StatusBarManager.DISABLE_EXPAND);
+        mDialog.show();
+    }
+
+    /**
+     * Create the global actions dialog.
+     * @return A new dialog.
+     */
+    private AlertDialog createDialog() {
+        mSilentModeToggle = new ToggleAction(
+                R.drawable.ic_lock_silent_mode,
+                R.drawable.ic_lock_silent_mode_off,
+                R.string.global_action_toggle_silent_mode,
+                R.string.global_action_silent_mode_on_status,
+                R.string.global_action_silent_mode_off_status) {
+
+            void willCreate() {
+                // XXX: FIXME: switch to ic_lock_vibrate_mode when available
+                mEnabledIconResId = (Settings.System.getInt(mContext.getContentResolver(),
+                        Settings.System.VIBRATE_IN_SILENT, 1) == 1)
+                    ? R.drawable.ic_lock_silent_mode_vibrate
+                    : R.drawable.ic_lock_silent_mode;
+            }
+
+            void onToggle(boolean on) {
+                if (on) {
+                    mAudioManager.setRingerMode((Settings.System.getInt(mContext.getContentResolver(),
+                        Settings.System.VIBRATE_IN_SILENT, 1) == 1)
+                        ? AudioManager.RINGER_MODE_VIBRATE
+                        : AudioManager.RINGER_MODE_SILENT);
+                } else {
+                    mAudioManager.setRingerMode(AudioManager.RINGER_MODE_NORMAL);
+                }
+            }
+
+            public boolean showDuringKeyguard() {
+                return true;
+            }
+
+            public boolean showBeforeProvisioning() {
+                return false;
+            }
+        };
+
+        mAirplaneModeOn = new ToggleAction(
+                R.drawable.ic_lock_airplane_mode,
+                R.drawable.ic_lock_airplane_mode_off,
+                R.string.global_actions_toggle_airplane_mode,
+                R.string.global_actions_airplane_mode_on_status,
+                R.string.global_actions_airplane_mode_off_status) {
+
+            void onToggle(boolean on) {
+                if (Boolean.parseBoolean(
+                        SystemProperties.get(TelephonyProperties.PROPERTY_INECM_MODE))) {
+                    mIsWaitingForEcmExit = true;
+                    // Launch ECM exit dialog
+                    Intent ecmDialogIntent =
+                            new Intent(TelephonyIntents.ACTION_SHOW_NOTICE_ECM_BLOCK_OTHERS, null);
+                    ecmDialogIntent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
+                    mContext.startActivity(ecmDialogIntent);
+                } else {
+                    changeAirplaneModeSystemSetting(on);
+                }
+            }
+
+            @Override
+            protected void changeStateFromPress(boolean buttonOn) {
+                // In ECM mode airplane state cannot be changed
+                if (!(Boolean.parseBoolean(
+                        SystemProperties.get(TelephonyProperties.PROPERTY_INECM_MODE)))) {
+                    mState = buttonOn ? State.TurningOn : State.TurningOff;
+                    mAirplaneState = mState;
+                }
+            }
+
+            public boolean showDuringKeyguard() {
+                return true;
+            }
+
+            public boolean showBeforeProvisioning() {
+                return false;
+            }
+        };
+
+        mItems = Lists.newArrayList(
+                // silent mode
+                mSilentModeToggle,
+                // next: airplane mode
+                mAirplaneModeOn,
+                // last: power off
+                new SinglePressAction(
+                        com.android.internal.R.drawable.ic_lock_power_off,
+                        R.string.global_action_power_off) {
+
+                    public void onPress() {
+                        // shutdown by making sure radio and power are handled accordingly.
+                        ShutdownThread.shutdown(mContext, true);
+                    }
+
+                    public boolean showDuringKeyguard() {
+                        return true;
+                    }
+
+                    public boolean showBeforeProvisioning() {
+                        return true;
+                    }
+                });
+
+        mAdapter = new MyAdapter();
+
+        final AlertDialog.Builder ab = new AlertDialog.Builder(mContext);
+
+        ab.setAdapter(mAdapter, this)
+                .setInverseBackgroundForced(true)
+                .setTitle(R.string.global_actions);
+
+        final AlertDialog dialog = ab.create();
+        dialog.getWindow().setType(WindowManager.LayoutParams.TYPE_SYSTEM_DIALOG);
+        if (!mContext.getResources().getBoolean(
+                com.android.internal.R.bool.config_sf_slowBlur)) {
+            dialog.getWindow().setFlags(WindowManager.LayoutParams.FLAG_BLUR_BEHIND,
+                    WindowManager.LayoutParams.FLAG_BLUR_BEHIND);
+        }
+
+        dialog.setOnDismissListener(this);
+
+        return dialog;
+    }
+
+    private void prepareDialog() {
+        final boolean silentModeOn =
+                mAudioManager.getRingerMode() != AudioManager.RINGER_MODE_NORMAL;
+        mSilentModeToggle.updateState(
+                silentModeOn ? ToggleAction.State.On : ToggleAction.State.Off);
+        mAirplaneModeOn.updateState(mAirplaneState);
+        mAdapter.notifyDataSetChanged();
+        if (mKeyguardShowing) {
+            mDialog.getWindow().setType(WindowManager.LayoutParams.TYPE_KEYGUARD_DIALOG);
+        } else {
+            mDialog.getWindow().setType(WindowManager.LayoutParams.TYPE_SYSTEM_DIALOG);
+        }
+    }
+
+
+    /** {@inheritDoc} */
+    public void onDismiss(DialogInterface dialog) {
+        mStatusBar.disable(StatusBarManager.DISABLE_NONE);
+    }
+
+    /** {@inheritDoc} */
+    public void onClick(DialogInterface dialog, int which) {
+        dialog.dismiss();
+        mAdapter.getItem(which).onPress();
+    }
+
+
+    /**
+     * The adapter used for the list within the global actions dialog, taking
+     * into account whether the keyguard is showing via
+     * {@link GlobalActions#mKeyguardShowing} and whether the device is provisioned
+     * via {@link GlobalActions#mDeviceProvisioned}.
+     */
+    private class MyAdapter extends BaseAdapter {
+
+        public int getCount() {
+            int count = 0;
+
+            for (int i = 0; i < mItems.size(); i++) {
+                final Action action = mItems.get(i);
+
+                if (mKeyguardShowing && !action.showDuringKeyguard()) {
+                    continue;
+                }
+                if (!mDeviceProvisioned && !action.showBeforeProvisioning()) {
+                    continue;
+                }
+                count++;
+            }
+            return count;
+        }
+
+        @Override
+        public boolean isEnabled(int position) {
+            return getItem(position).isEnabled();
+        }
+
+        @Override
+        public boolean areAllItemsEnabled() {
+            return false;
+        }
+
+        public Action getItem(int position) {
+
+            int filteredPos = 0;
+            for (int i = 0; i < mItems.size(); i++) {
+                final Action action = mItems.get(i);
+                if (mKeyguardShowing && !action.showDuringKeyguard()) {
+                    continue;
+                }
+                if (!mDeviceProvisioned && !action.showBeforeProvisioning()) {
+                    continue;
+                }
+                if (filteredPos == position) {
+                    return action;
+                }
+                filteredPos++;
+            }
+
+            throw new IllegalArgumentException("position " + position + " out of "
+                    + "range of showable actions, filtered count = "
+                    + "= " + getCount() + ", keyguardshowing=" + mKeyguardShowing
+                    + ", provisioned=" + mDeviceProvisioned);
+        }
+
+
+        public long getItemId(int position) {
+            return position;
+        }
+
+        public View getView(int position, View convertView, ViewGroup parent) {
+            Action action = getItem(position);
+            return action.create(mContext, convertView, parent, LayoutInflater.from(mContext));
+        }
+    }
+
+    // note: the scheme below made more sense when we were planning on having
+    // 8 different things in the global actions dialog.  seems overkill with
+    // only 3 items now, but may as well keep this flexible approach so it will
+    // be easy should someone decide at the last minute to include something
+    // else, such as 'enable wifi', or 'enable bluetooth'
+
+    /**
+     * What each item in the global actions dialog must be able to support.
+     */
+    private interface Action {
+        View create(Context context, View convertView, ViewGroup parent, LayoutInflater inflater);
+
+        void onPress();
+
+        /**
+         * @return whether this action should appear in the dialog when the keygaurd
+         *    is showing.
+         */
+        boolean showDuringKeyguard();
+
+        /**
+         * @return whether this action should appear in the dialog before the
+         *   device is provisioned.
+         */
+        boolean showBeforeProvisioning();
+
+        boolean isEnabled();
+    }
+
+    /**
+     * A single press action maintains no state, just responds to a press
+     * and takes an action.
+     */
+    private static abstract class SinglePressAction implements Action {
+        private final int mIconResId;
+        private final int mMessageResId;
+
+        protected SinglePressAction(int iconResId, int messageResId) {
+            mIconResId = iconResId;
+            mMessageResId = messageResId;
+        }
+
+        public boolean isEnabled() {
+            return true;
+        }
+
+        abstract public void onPress();
+
+        public View create(
+                Context context, View convertView, ViewGroup parent, LayoutInflater inflater) {
+            View v = (convertView != null) ?
+                    convertView :
+                    inflater.inflate(R.layout.global_actions_item, parent, false);
+
+            ImageView icon = (ImageView) v.findViewById(R.id.icon);
+            TextView messageView = (TextView) v.findViewById(R.id.message);
+
+            v.findViewById(R.id.status).setVisibility(View.GONE);
+
+            icon.setImageDrawable(context.getResources().getDrawable(mIconResId));
+            messageView.setText(mMessageResId);
+
+            return v;
+        }
+    }
+
+    /**
+     * A toggle action knows whether it is on or off, and displays an icon
+     * and status message accordingly.
+     */
+    private static abstract class ToggleAction implements Action {
+
+        enum State {
+            Off(false),
+            TurningOn(true),
+            TurningOff(true),
+            On(false);
+
+            private final boolean inTransition;
+
+            State(boolean intermediate) {
+                inTransition = intermediate;
+            }
+
+            public boolean inTransition() {
+                return inTransition;
+            }
+        }
+
+        protected State mState = State.Off;
+
+        // prefs
+        protected int mEnabledIconResId;
+        protected int mDisabledIconResid;
+        protected int mMessageResId;
+        protected int mEnabledStatusMessageResId;
+        protected int mDisabledStatusMessageResId;
+
+        /**
+         * @param enabledIconResId The icon for when this action is on.
+         * @param disabledIconResid The icon for when this action is off.
+         * @param essage The general information message, e.g 'Silent Mode'
+         * @param enabledStatusMessageResId The on status message, e.g 'sound disabled'
+         * @param disabledStatusMessageResId The off status message, e.g. 'sound enabled'
+         */
+        public ToggleAction(int enabledIconResId,
+                int disabledIconResid,
+                int essage,
+                int enabledStatusMessageResId,
+                int disabledStatusMessageResId) {
+            mEnabledIconResId = enabledIconResId;
+            mDisabledIconResid = disabledIconResid;
+            mMessageResId = essage;
+            mEnabledStatusMessageResId = enabledStatusMessageResId;
+            mDisabledStatusMessageResId = disabledStatusMessageResId;
+        }
+
+        /**
+         * Override to make changes to resource IDs just before creating the
+         * View.
+         */
+        void willCreate() {
+
+        }
+
+        public View create(Context context, View convertView, ViewGroup parent,
+                LayoutInflater inflater) {
+            willCreate();
+
+            View v = (convertView != null) ?
+                    convertView :
+                    inflater.inflate(R
+                            .layout.global_actions_item, parent, false);
+
+            ImageView icon = (ImageView) v.findViewById(R.id.icon);
+            TextView messageView = (TextView) v.findViewById(R.id.message);
+            TextView statusView = (TextView) v.findViewById(R.id.status);
+
+            messageView.setText(mMessageResId);
+
+            boolean on = ((mState == State.On) || (mState == State.TurningOn));
+            icon.setImageDrawable(context.getResources().getDrawable(
+                    (on ? mEnabledIconResId : mDisabledIconResid)));
+            statusView.setText(on ? mEnabledStatusMessageResId : mDisabledStatusMessageResId);
+            statusView.setVisibility(View.VISIBLE);
+
+            final boolean enabled = isEnabled();
+            messageView.setEnabled(enabled);
+            statusView.setEnabled(enabled);
+            icon.setEnabled(enabled);
+            v.setEnabled(enabled);
+
+            return v;
+        }
+
+        public final void onPress() {
+            if (mState.inTransition()) {
+                Log.w(TAG, "shouldn't be able to toggle when in transition");
+                return;
+            }
+
+            final boolean nowOn = !(mState == State.On);
+            onToggle(nowOn);
+            changeStateFromPress(nowOn);
+        }
+
+        public boolean isEnabled() {
+            return !mState.inTransition();
+        }
+
+        /**
+         * Implementations may override this if their state can be in on of the intermediate
+         * states until some notification is received (e.g airplane mode is 'turning off' until
+         * we know the wireless connections are back online
+         * @param buttonOn Whether the button was turned on or off
+         */
+        protected void changeStateFromPress(boolean buttonOn) {
+            mState = buttonOn ? State.On : State.Off;
+        }
+
+        abstract void onToggle(boolean on);
+
+        public void updateState(State state) {
+            mState = state;
+        }
+    }
+
+    private BroadcastReceiver mBroadcastReceiver = new BroadcastReceiver() {
+        public void onReceive(Context context, Intent intent) {
+            String action = intent.getAction();
+            if (Intent.ACTION_CLOSE_SYSTEM_DIALOGS.equals(action)
+                    || Intent.ACTION_SCREEN_OFF.equals(action)) {
+                String reason = intent.getStringExtra(PhoneWindowManager.SYSTEM_DIALOG_REASON_KEY);
+                if (!PhoneWindowManager.SYSTEM_DIALOG_REASON_GLOBAL_ACTIONS.equals(reason)) {
+                    mHandler.sendEmptyMessage(MESSAGE_DISMISS);
+                }
+            } else if (TelephonyIntents.ACTION_EMERGENCY_CALLBACK_MODE_CHANGED.equals(action)) {
+                // Airplane mode can be changed after ECM exits if airplane toggle button
+                // is pressed during ECM mode
+                if (!(intent.getBooleanExtra("PHONE_IN_ECM_STATE", false)) &&
+                        mIsWaitingForEcmExit) {
+                    mIsWaitingForEcmExit = false;
+                    changeAirplaneModeSystemSetting(true);
+                }
+            }
+        }
+    };
+
+    PhoneStateListener mPhoneStateListener = new PhoneStateListener() {
+        @Override
+        public void onServiceStateChanged(ServiceState serviceState) {
+            final boolean inAirplaneMode = serviceState.getState() == ServiceState.STATE_POWER_OFF;
+            mAirplaneState = inAirplaneMode ? ToggleAction.State.On : ToggleAction.State.Off;
+            mAirplaneModeOn.updateState(mAirplaneState);
+            mAdapter.notifyDataSetChanged();
+        }
+    };
+
+    private static final int MESSAGE_DISMISS = 0;
+    private Handler mHandler = new Handler() {
+        public void handleMessage(Message msg) {
+            if (msg.what == MESSAGE_DISMISS) {
+                if (mDialog != null) {
+                    mDialog.dismiss();
+                }
+            }
+        }
+    };
+
+    /**
+     * Change the airplane mode system setting
+     */
+    private void changeAirplaneModeSystemSetting(boolean on) {
+        Settings.System.putInt(
+                mContext.getContentResolver(),
+                Settings.System.AIRPLANE_MODE_ON,
+                on ? 1 : 0);
+        Intent intent = new Intent(Intent.ACTION_AIRPLANE_MODE_CHANGED);
+        intent.addFlags(Intent.FLAG_RECEIVER_REPLACE_PENDING);
+        intent.putExtra("state", on);
+        mContext.sendBroadcast(intent);
+    }
+}
diff --git a/policy/src/com/android/internal/policy/impl/IconUtilities.java b/policy/src/com/android/internal/policy/impl/IconUtilities.java
new file mode 100644
index 0000000..99055cf
--- /dev/null
+++ b/policy/src/com/android/internal/policy/impl/IconUtilities.java
@@ -0,0 +1,192 @@
+/*
+ * Copyright (C) 2008 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.android.internal.policy.impl;
+
+import android.graphics.drawable.BitmapDrawable;
+import android.graphics.drawable.Drawable;
+import android.graphics.drawable.PaintDrawable;
+import android.graphics.drawable.StateListDrawable;
+import android.graphics.Bitmap;
+import android.graphics.BlurMaskFilter;
+import android.graphics.Canvas;
+import android.graphics.ColorMatrix;
+import android.graphics.ColorMatrixColorFilter;
+import android.graphics.Paint;
+import android.graphics.PaintFlagsDrawFilter;
+import android.graphics.PixelFormat;
+import android.graphics.PorterDuff;
+import android.graphics.Rect;
+import android.graphics.RectF;
+import android.graphics.TableMaskFilter;
+import android.graphics.Typeface;
+import android.text.Layout.Alignment;
+import android.text.StaticLayout;
+import android.text.TextPaint;
+import android.util.DisplayMetrics;
+import android.util.Log;
+import android.content.res.Resources;
+import android.content.Context;
+
+/**
+ * Various utilities shared amongst the Launcher's classes.
+ */
+final class IconUtilities {
+    private static final String TAG = "IconUtilities";
+
+    private static final int sColors[] = { 0xffff0000, 0xff00ff00, 0xff0000ff };
+
+    private int mIconWidth = -1;
+    private int mIconHeight = -1;
+    private int mIconTextureWidth = -1;
+    private int mIconTextureHeight = -1;
+
+    private final Paint mPaint = new Paint();
+    private final Paint mBlurPaint = new Paint();
+    private final Paint mGlowColorPressedPaint = new Paint();
+    private final Paint mGlowColorFocusedPaint = new Paint();
+    private final Rect mOldBounds = new Rect();
+    private final Canvas mCanvas = new Canvas();
+    private final DisplayMetrics mDisplayMetrics;
+
+    private int mColorIndex = 0;
+
+    public IconUtilities(Context context) {
+        final Resources resources = context.getResources();
+        DisplayMetrics metrics = mDisplayMetrics = resources.getDisplayMetrics();
+        final float density = metrics.density;
+        final float blurPx = 5 * density;
+
+        mIconWidth = mIconHeight = (int) resources.getDimension(android.R.dimen.app_icon_size);
+        mIconTextureWidth = mIconTextureHeight = mIconWidth + (int)(blurPx*2);
+
+        mBlurPaint.setMaskFilter(new BlurMaskFilter(blurPx, BlurMaskFilter.Blur.NORMAL));
+        mGlowColorPressedPaint.setColor(0xffffc300);
+        mGlowColorPressedPaint.setMaskFilter(TableMaskFilter.CreateClipTable(0, 30));
+        mGlowColorFocusedPaint.setColor(0xffff8e00);
+        mGlowColorFocusedPaint.setMaskFilter(TableMaskFilter.CreateClipTable(0, 30));
+
+        ColorMatrix cm = new ColorMatrix();
+        cm.setSaturation(0.2f);
+
+        mCanvas.setDrawFilter(new PaintFlagsDrawFilter(Paint.DITHER_FLAG,
+                Paint.FILTER_BITMAP_FLAG));
+    }
+
+    public Drawable createIconDrawable(Drawable src) {
+        Bitmap scaled = createIconBitmap(src);
+
+        StateListDrawable result = new StateListDrawable();
+
+        result.addState(new int[] { android.R.attr.state_focused },
+                new BitmapDrawable(createSelectedBitmap(scaled, false)));
+        result.addState(new int[] { android.R.attr.state_pressed },
+                new BitmapDrawable(createSelectedBitmap(scaled, true)));
+        result.addState(new int[0], new BitmapDrawable(scaled));
+
+        result.setBounds(0, 0, mIconTextureWidth, mIconTextureHeight);
+        return result;
+    }
+
+    /**
+     * Returns a bitmap suitable for the all apps view.  The bitmap will be a power
+     * of two sized ARGB_8888 bitmap that can be used as a gl texture.
+     */
+    private Bitmap createIconBitmap(Drawable icon) {
+        int width = mIconWidth;
+        int height = mIconHeight;
+
+        if (icon instanceof PaintDrawable) {
+            PaintDrawable painter = (PaintDrawable) icon;
+            painter.setIntrinsicWidth(width);
+            painter.setIntrinsicHeight(height);
+        } else if (icon instanceof BitmapDrawable) {
+            // Ensure the bitmap has a density.
+            BitmapDrawable bitmapDrawable = (BitmapDrawable) icon;
+            Bitmap bitmap = bitmapDrawable.getBitmap();
+            if (bitmap.getDensity() == Bitmap.DENSITY_NONE) {
+                bitmapDrawable.setTargetDensity(mDisplayMetrics);
+            }
+        }
+        int sourceWidth = icon.getIntrinsicWidth();
+        int sourceHeight = icon.getIntrinsicHeight();
+
+        if (sourceWidth > 0 && sourceWidth > 0) {
+            // There are intrinsic sizes.
+            if (width < sourceWidth || height < sourceHeight) {
+                // It's too big, scale it down.
+                final float ratio = (float) sourceWidth / sourceHeight;
+                if (sourceWidth > sourceHeight) {
+                    height = (int) (width / ratio);
+                } else if (sourceHeight > sourceWidth) {
+                    width = (int) (height * ratio);
+                }
+            } else if (sourceWidth < width && sourceHeight < height) {
+                // It's small, use the size they gave us.
+                width = sourceWidth;
+                height = sourceHeight;
+            }
+        }
+
+        // no intrinsic size --> use default size
+        int textureWidth = mIconTextureWidth;
+        int textureHeight = mIconTextureHeight;
+
+        final Bitmap bitmap = Bitmap.createBitmap(textureWidth, textureHeight,
+                Bitmap.Config.ARGB_8888);
+        final Canvas canvas = mCanvas;
+        canvas.setBitmap(bitmap);
+
+        final int left = (textureWidth-width) / 2;
+        final int top = (textureHeight-height) / 2;
+
+        if (false) {
+            // draw a big box for the icon for debugging
+            canvas.drawColor(sColors[mColorIndex]);
+            if (++mColorIndex >= sColors.length) mColorIndex = 0;
+            Paint debugPaint = new Paint();
+            debugPaint.setColor(0xffcccc00);
+            canvas.drawRect(left, top, left+width, top+height, debugPaint);
+        }
+
+        mOldBounds.set(icon.getBounds());
+        icon.setBounds(left, top, left+width, top+height);
+        icon.draw(canvas);
+        icon.setBounds(mOldBounds);
+
+        return bitmap;
+    }
+
+    private Bitmap createSelectedBitmap(Bitmap src, boolean pressed) {
+        final Bitmap result = Bitmap.createBitmap(mIconTextureWidth, mIconTextureHeight,
+                Bitmap.Config.ARGB_8888);
+        final Canvas dest = new Canvas(result);
+
+        dest.drawColor(0, PorterDuff.Mode.CLEAR);
+
+        int[] xy = new int[2];
+        Bitmap mask = src.extractAlpha(mBlurPaint, xy);
+
+        dest.drawBitmap(mask, xy[0], xy[1],
+                pressed ? mGlowColorPressedPaint : mGlowColorFocusedPaint);
+
+        mask.recycle();
+
+        dest.drawBitmap(src, 0, 0, mPaint);
+
+        return result;
+    }
+}
diff --git a/policy/src/com/android/internal/policy/impl/KeyguardScreen.java b/policy/src/com/android/internal/policy/impl/KeyguardScreen.java
new file mode 100644
index 0000000..bbb6875
--- /dev/null
+++ b/policy/src/com/android/internal/policy/impl/KeyguardScreen.java
@@ -0,0 +1,45 @@
+/*
+ * Copyright (C) 2008 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.android.internal.policy.impl;
+
+/**
+ * Common interface of each {@link android.view.View} that is a screen of
+ * {@link LockPatternKeyguardView}.
+ */
+public interface KeyguardScreen {
+
+    /**
+     * Return true if your view needs input, so should allow the soft
+     * keyboard to be displayed.
+     */
+    boolean needsInput();
+    
+    /**
+     * This screen is no longer in front of the user.
+     */
+    void onPause();
+
+    /**
+     * This screen is going to be in front of the user.
+     */
+    void onResume();
+
+    /**
+     * This view is going away; a hook to do cleanup.
+     */
+    void cleanUp();
+}
diff --git a/policy/src/com/android/internal/policy/impl/KeyguardScreenCallback.java b/policy/src/com/android/internal/policy/impl/KeyguardScreenCallback.java
new file mode 100644
index 0000000..a843603
--- /dev/null
+++ b/policy/src/com/android/internal/policy/impl/KeyguardScreenCallback.java
@@ -0,0 +1,82 @@
+/*
+ * Copyright (C) 2008 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.android.internal.policy.impl;
+
+import android.content.res.Configuration;
+
+/**
+ * Within a keyguard, there may be several screens that need a callback
+ * to the host keyguard view.
+ */
+public interface KeyguardScreenCallback extends KeyguardViewCallback {
+
+    /**
+     * Transition to the lock screen.
+     */
+    void goToLockScreen();
+
+    /**
+     * Transition to the unlock screen.
+     */
+    void goToUnlockScreen();
+
+    /**
+     * The user reported that they forgot their pattern (or not, when they want to back out of the
+     * forgot pattern screen).
+     *
+     * @param isForgotten True if the user hit the forgot pattern, false if they want to back out
+     *        of the account screen.
+     */
+    void forgotPattern(boolean isForgotten);
+
+    /**
+     * @return Whether the keyguard requires some sort of PIN.
+     */
+    boolean isSecure();
+
+    /**
+     * @return Whether we are in a mode where we only want to verify the
+     *   user can get past the keyguard.
+     */
+    boolean isVerifyUnlockOnly();
+
+    /**
+     * Stay on me, but recreate me (so I can use a different layout).
+     */
+    void recreateMe(Configuration config);
+
+    /**
+     * Take action to send an emergency call.
+     */
+    void takeEmergencyCallAction();
+
+    /**
+     * Report that the user had a failed attempt to unlock with password or pattern.
+     */
+    void reportFailedUnlockAttempt();
+
+    /**
+     * Report that the user successfully entered their password or pattern.
+     */
+    void reportSuccessfulUnlockAttempt();
+
+    /**
+     * Report whether we there's another way to unlock the device.
+     * @return true
+     */
+    boolean doesFallbackUnlockScreenExist();
+}
diff --git a/policy/src/com/android/internal/policy/impl/KeyguardUpdateMonitor.java b/policy/src/com/android/internal/policy/impl/KeyguardUpdateMonitor.java
new file mode 100644
index 0000000..b225e56
--- /dev/null
+++ b/policy/src/com/android/internal/policy/impl/KeyguardUpdateMonitor.java
@@ -0,0 +1,526 @@
+/*
+ * Copyright (C) 2008 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.android.internal.policy.impl;
+
+import android.content.BroadcastReceiver;
+import android.content.Context;
+import android.content.Intent;
+import android.content.IntentFilter;
+import android.content.res.Configuration;
+import android.database.ContentObserver;
+import static android.os.BatteryManager.BATTERY_STATUS_CHARGING;
+import static android.os.BatteryManager.BATTERY_STATUS_FULL;
+import static android.os.BatteryManager.BATTERY_STATUS_UNKNOWN;
+import android.media.AudioManager;
+import android.os.Handler;
+import android.os.Message;
+import android.os.SystemClock;
+import android.provider.Settings;
+import android.provider.Telephony;
+import static android.provider.Telephony.Intents.EXTRA_PLMN;
+import static android.provider.Telephony.Intents.EXTRA_SHOW_PLMN;
+import static android.provider.Telephony.Intents.EXTRA_SHOW_SPN;
+import static android.provider.Telephony.Intents.EXTRA_SPN;
+import static android.provider.Telephony.Intents.SPN_STRINGS_UPDATED_ACTION;
+
+import com.android.internal.telephony.IccCard;
+import com.android.internal.telephony.TelephonyIntents;
+
+import android.telephony.TelephonyManager;
+import android.util.Log;
+import com.android.internal.R;
+import com.google.android.collect.Lists;
+
+import java.util.ArrayList;
+
+/**
+ * Watches for updates that may be interesting to the keyguard, and provides
+ * the up to date information as well as a registration for callbacks that care
+ * to be updated.
+ *
+ * Note: under time crunch, this has been extended to include some stuff that
+ * doesn't really belong here.  see {@link #handleBatteryUpdate} where it shutdowns
+ * the device, and {@link #getFailedAttempts()}, {@link #reportFailedAttempt()}
+ * and {@link #clearFailedAttempts()}.  Maybe we should rename this 'KeyguardContext'...
+ */
+public class KeyguardUpdateMonitor {
+
+    static private final String TAG = "KeyguardUpdateMonitor";
+    static private final boolean DEBUG = false;
+
+    private static final int LOW_BATTERY_THRESHOLD = 20;
+
+    private final Context mContext;
+
+    private IccCard.State mSimState = IccCard.State.READY;
+
+    private boolean mKeyguardBypassEnabled;
+
+    private boolean mDevicePluggedIn;
+
+    private boolean mDeviceProvisioned;
+
+    private int mBatteryLevel;
+
+    private CharSequence mTelephonyPlmn;
+    private CharSequence mTelephonySpn;
+
+    private int mFailedAttempts = 0;
+
+    private Handler mHandler;
+
+    private ArrayList<InfoCallback> mInfoCallbacks = Lists.newArrayList();
+    private ArrayList<SimStateCallback> mSimStateCallbacks = Lists.newArrayList();
+    private ContentObserver mContentObserver;
+
+    // messages for the handler
+    private static final int MSG_TIME_UPDATE = 301;
+    private static final int MSG_BATTERY_UPDATE = 302;
+    private static final int MSG_CARRIER_INFO_UPDATE = 303;
+    private static final int MSG_SIM_STATE_CHANGE = 304;
+    private static final int MSG_RINGER_MODE_CHANGED = 305;
+    private static final int MSG_PHONE_STATE_CHANGED = 306;
+
+
+    /**
+     * When we receive a
+     * {@link com.android.internal.telephony.TelephonyIntents#ACTION_SIM_STATE_CHANGED} broadcast,
+     * and then pass a result via our handler to {@link KeyguardUpdateMonitor#handleSimStateChange},
+     * we need a single object to pass to the handler.  This class helps decode
+     * the intent and provide a {@link SimCard.State} result.
+     */
+    private static class SimArgs {
+
+        public final IccCard.State simState;
+
+        private SimArgs(Intent intent) {
+            if (!TelephonyIntents.ACTION_SIM_STATE_CHANGED.equals(intent.getAction())) {
+                throw new IllegalArgumentException("only handles intent ACTION_SIM_STATE_CHANGED");
+            }
+            String stateExtra = intent.getStringExtra(IccCard.INTENT_KEY_ICC_STATE);
+            if (IccCard.INTENT_VALUE_ICC_ABSENT.equals(stateExtra)) {
+                this.simState = IccCard.State.ABSENT;
+            } else if (IccCard.INTENT_VALUE_ICC_READY.equals(stateExtra)) {
+                this.simState = IccCard.State.READY;
+            } else if (IccCard.INTENT_VALUE_ICC_LOCKED.equals(stateExtra)) {
+                final String lockedReason = intent
+                        .getStringExtra(IccCard.INTENT_KEY_LOCKED_REASON);
+                if (IccCard.INTENT_VALUE_LOCKED_ON_PIN.equals(lockedReason)) {
+                    this.simState = IccCard.State.PIN_REQUIRED;
+                } else if (IccCard.INTENT_VALUE_LOCKED_ON_PUK.equals(lockedReason)) {
+                    this.simState = IccCard.State.PUK_REQUIRED;
+                } else {
+                    this.simState = IccCard.State.UNKNOWN;
+                }
+            } else if (IccCard.INTENT_VALUE_LOCKED_NETWORK.equals(stateExtra)) {
+                this.simState = IccCard.State.NETWORK_LOCKED;
+            } else {
+                this.simState = IccCard.State.UNKNOWN;
+            }
+        }
+
+        public String toString() {
+            return simState.toString();
+        }
+    }
+
+    public KeyguardUpdateMonitor(Context context) {
+        mContext = context;
+
+        mHandler = new Handler() {
+            @Override
+            public void handleMessage(Message msg) {
+                switch (msg.what) {
+                    case MSG_TIME_UPDATE:
+                        handleTimeUpdate();
+                        break;
+                    case MSG_BATTERY_UPDATE:
+                        handleBatteryUpdate(msg.arg1,  msg.arg2);
+                        break;
+                    case MSG_CARRIER_INFO_UPDATE:
+                        handleCarrierInfoUpdate();
+                        break;
+                    case MSG_SIM_STATE_CHANGE:
+                        handleSimStateChange((SimArgs) msg.obj);
+                        break;
+                    case MSG_RINGER_MODE_CHANGED:
+                        handleRingerModeChange(msg.arg1);
+                        break;
+                    case MSG_PHONE_STATE_CHANGED:
+                        handlePhoneStateChanged((String)msg.obj);
+                        break;
+                }
+            }
+        };
+
+        mKeyguardBypassEnabled = context.getResources().getBoolean(
+                com.android.internal.R.bool.config_bypass_keyguard_if_slider_open);
+
+        mDeviceProvisioned = Settings.Secure.getInt(
+                mContext.getContentResolver(), Settings.Secure.DEVICE_PROVISIONED, 0) != 0;
+
+        // Since device can't be un-provisioned, we only need to register a content observer
+        // to update mDeviceProvisioned when we are...
+        if (!mDeviceProvisioned) {
+            mContentObserver = new ContentObserver(mHandler) {
+                @Override
+                public void onChange(boolean selfChange) {
+                    super.onChange(selfChange);
+                    mDeviceProvisioned = Settings.Secure.getInt(mContext.getContentResolver(),
+                        Settings.Secure.DEVICE_PROVISIONED, 0) != 0;
+                    if (mDeviceProvisioned && mContentObserver != null) {
+                        // We don't need the observer anymore...
+                        mContext.getContentResolver().unregisterContentObserver(mContentObserver);
+                        mContentObserver = null;
+                    }
+                    if (DEBUG) Log.d(TAG, "DEVICE_PROVISIONED state = " + mDeviceProvisioned);
+                }
+            };
+
+            mContext.getContentResolver().registerContentObserver(
+                    Settings.Secure.getUriFor(Settings.Secure.DEVICE_PROVISIONED),
+                    false, mContentObserver);
+
+            // prevent a race condition between where we check the flag and where we register the
+            // observer by grabbing the value once again...
+            mDeviceProvisioned = Settings.Secure.getInt(mContext.getContentResolver(),
+                Settings.Secure.DEVICE_PROVISIONED, 0) != 0;
+        }
+
+        // take a guess to start
+        mSimState = IccCard.State.READY;
+        mDevicePluggedIn = true;
+        mBatteryLevel = 100;
+
+        mTelephonyPlmn = getDefaultPlmn();
+
+        // setup receiver
+        final IntentFilter filter = new IntentFilter();
+        filter.addAction(Intent.ACTION_TIME_TICK);
+        filter.addAction(Intent.ACTION_TIME_CHANGED);
+        filter.addAction(Intent.ACTION_BATTERY_CHANGED);
+        filter.addAction(Intent.ACTION_TIMEZONE_CHANGED);
+        filter.addAction(TelephonyIntents.ACTION_SIM_STATE_CHANGED);
+        filter.addAction(TelephonyManager.ACTION_PHONE_STATE_CHANGED);
+        filter.addAction(SPN_STRINGS_UPDATED_ACTION);
+        filter.addAction(AudioManager.RINGER_MODE_CHANGED_ACTION);
+        context.registerReceiver(new BroadcastReceiver() {
+
+            public void onReceive(Context context, Intent intent) {
+                final String action = intent.getAction();
+                if (DEBUG) Log.d(TAG, "received broadcast " + action);
+
+                if (Intent.ACTION_TIME_TICK.equals(action)
+                        || Intent.ACTION_TIME_CHANGED.equals(action)
+                        || Intent.ACTION_TIMEZONE_CHANGED.equals(action)) {
+                    mHandler.sendMessage(mHandler.obtainMessage(MSG_TIME_UPDATE));
+                } else if (SPN_STRINGS_UPDATED_ACTION.equals(action)) {
+                    mTelephonyPlmn = getTelephonyPlmnFrom(intent);
+                    mTelephonySpn = getTelephonySpnFrom(intent);
+                    mHandler.sendMessage(mHandler.obtainMessage(MSG_CARRIER_INFO_UPDATE));
+                } else if (Intent.ACTION_BATTERY_CHANGED.equals(action)) {
+                    final int pluggedInStatus = intent
+                            .getIntExtra("status", BATTERY_STATUS_UNKNOWN);
+                    int batteryLevel = intent.getIntExtra("level", 0);
+                    final Message msg = mHandler.obtainMessage(
+                            MSG_BATTERY_UPDATE,
+                            pluggedInStatus,
+                            batteryLevel);
+                    mHandler.sendMessage(msg);
+                } else if (TelephonyIntents.ACTION_SIM_STATE_CHANGED.equals(action)) {
+                    mHandler.sendMessage(mHandler.obtainMessage(
+                            MSG_SIM_STATE_CHANGE,
+                            new SimArgs(intent)));
+                } else if (AudioManager.RINGER_MODE_CHANGED_ACTION.equals(action)) {
+                    mHandler.sendMessage(mHandler.obtainMessage(MSG_RINGER_MODE_CHANGED,
+                            intent.getIntExtra(AudioManager.EXTRA_RINGER_MODE, -1), 0));
+                } else if (TelephonyManager.ACTION_PHONE_STATE_CHANGED.equals(action)) {
+                    String state = intent.getStringExtra(TelephonyManager.EXTRA_STATE);
+                    mHandler.sendMessage(mHandler.obtainMessage(MSG_PHONE_STATE_CHANGED, state));
+                }
+            }
+        }, filter);
+    }
+
+    protected void handlePhoneStateChanged(String newState) {
+        if (DEBUG) Log.d(TAG, "handlePhoneStateChanged(" + newState + ")");
+        for (int i = 0; i < mInfoCallbacks.size(); i++) {
+            mInfoCallbacks.get(i).onPhoneStateChanged(newState);
+        }
+    }
+
+    protected void handleRingerModeChange(int mode) {
+        if (DEBUG) Log.d(TAG, "handleRingerModeChange(" + mode + ")");
+        for (int i = 0; i < mInfoCallbacks.size(); i++) {
+            mInfoCallbacks.get(i).onRingerModeChanged(mode);
+        }
+    }
+
+    /**
+     * Handle {@link #MSG_TIME_UPDATE}
+     */
+    private void handleTimeUpdate() {
+        if (DEBUG) Log.d(TAG, "handleTimeUpdate");
+        for (int i = 0; i < mInfoCallbacks.size(); i++) {
+            mInfoCallbacks.get(i).onTimeChanged();
+        }
+    }
+
+    /**
+     * Handle {@link #MSG_BATTERY_UPDATE}
+     */
+    private void handleBatteryUpdate(int pluggedInStatus, int batteryLevel) {
+        if (DEBUG) Log.d(TAG, "handleBatteryUpdate");
+        final boolean pluggedIn = isPluggedIn(pluggedInStatus);
+
+        if (isBatteryUpdateInteresting(pluggedIn, batteryLevel)) {
+            mBatteryLevel = batteryLevel;
+            mDevicePluggedIn = pluggedIn;
+            for (int i = 0; i < mInfoCallbacks.size(); i++) {
+                mInfoCallbacks.get(i).onRefreshBatteryInfo(
+                        shouldShowBatteryInfo(), pluggedIn, batteryLevel);
+            }
+        }
+    }
+
+    /**
+     * Handle {@link #MSG_CARRIER_INFO_UPDATE}
+     */
+    private void handleCarrierInfoUpdate() {
+        if (DEBUG) Log.d(TAG, "handleCarrierInfoUpdate: plmn = " + mTelephonyPlmn
+            + ", spn = " + mTelephonySpn);
+
+        for (int i = 0; i < mInfoCallbacks.size(); i++) {
+            mInfoCallbacks.get(i).onRefreshCarrierInfo(mTelephonyPlmn, mTelephonySpn);
+        }
+    }
+
+    /**
+     * Handle {@link #MSG_SIM_STATE_CHANGE}
+     */
+    private void handleSimStateChange(SimArgs simArgs) {
+        final IccCard.State state = simArgs.simState;
+
+        if (DEBUG) {
+            Log.d(TAG, "handleSimStateChange: intentValue = " + simArgs + " "
+                    + "state resolved to " + state.toString());
+        }
+
+        if (state != IccCard.State.UNKNOWN && state != mSimState) {
+            mSimState = state;
+            for (int i = 0; i < mSimStateCallbacks.size(); i++) {
+                mSimStateCallbacks.get(i).onSimStateChanged(state);
+            }
+        }
+    }
+
+    /**
+     * @param status One of the statuses of {@link android.os.BatteryManager}
+     * @return Whether the status maps to a status for being plugged in.
+     */
+    private boolean isPluggedIn(int status) {
+        return status == BATTERY_STATUS_CHARGING || status == BATTERY_STATUS_FULL;
+    }
+
+    private boolean isBatteryUpdateInteresting(boolean pluggedIn, int batteryLevel) {
+        // change in plug is always interesting
+        if (mDevicePluggedIn != pluggedIn) {
+            return true;
+        }
+
+        // change in battery level while plugged in
+        if (pluggedIn && mBatteryLevel != batteryLevel) {
+            return true;
+        }
+
+        if (!pluggedIn) {
+            // not plugged in and below threshold
+            if (batteryLevel < LOW_BATTERY_THRESHOLD && batteryLevel != mBatteryLevel) {
+                return true;
+            }
+        }
+        return false;
+    }
+
+    /**
+     * @param intent The intent with action {@link Telephony.Intents#SPN_STRINGS_UPDATED_ACTION}
+     * @return The string to use for the plmn, or null if it should not be shown.
+     */
+    private CharSequence getTelephonyPlmnFrom(Intent intent) {
+        if (intent.getBooleanExtra(EXTRA_SHOW_PLMN, false)) {
+            final String plmn = intent.getStringExtra(EXTRA_PLMN);
+            if (plmn != null) {
+                return plmn;
+            } else {
+                return getDefaultPlmn();
+            }
+        }
+        return null;
+    }
+
+    /**
+     * @return The default plmn (no service)
+     */
+    private CharSequence getDefaultPlmn() {
+        return mContext.getResources().getText(
+                        R.string.lockscreen_carrier_default);
+    }
+
+    /**
+     * @param intent The intent with action {@link Telephony.Intents#SPN_STRINGS_UPDATED_ACTION}
+     * @return The string to use for the plmn, or null if it should not be shown.
+     */
+    private CharSequence getTelephonySpnFrom(Intent intent) {
+        if (intent.getBooleanExtra(EXTRA_SHOW_SPN, false)) {
+            final String spn = intent.getStringExtra(EXTRA_SPN);
+            if (spn != null) {
+                return spn;
+            }
+        }
+        return null;
+    }
+
+    /**
+     * Remove the given observer from being registered from any of the kinds
+     * of callbacks.
+     * @param observer The observer to remove (an instance of {@link ConfigurationChangeCallback},
+     *   {@link InfoCallback} or {@link SimStateCallback}
+     */
+    public void removeCallback(Object observer) {
+        mInfoCallbacks.remove(observer);
+        mSimStateCallbacks.remove(observer);
+    }
+
+    /**
+     * Callback for general information relevant to lock screen.
+     */
+    interface InfoCallback {
+        void onRefreshBatteryInfo(boolean showBatteryInfo, boolean pluggedIn, int batteryLevel);
+        void onTimeChanged();
+
+        /**
+         * @param plmn The operator name of the registered network.  May be null if it shouldn't
+         *   be displayed.
+         * @param spn The service provider name.  May be null if it shouldn't be displayed.
+         */
+        void onRefreshCarrierInfo(CharSequence plmn, CharSequence spn);
+
+        /**
+         * Called when the ringer mode changes.
+         * @param state the current ringer state, as defined in
+         * {@link AudioManager#RINGER_MODE_CHANGED_ACTION}
+         */
+        void onRingerModeChanged(int state);
+
+        /**
+         * Called when the phone state changes. String will be one of:
+         * {@link TelephonyManager#EXTRA_STATE_IDLE}
+         * {@link TelephonyManager@EXTRA_STATE_RINGING}
+         * {@link TelephonyManager#EXTRA_STATE_OFFHOOK
+         */
+        void onPhoneStateChanged(String newState);
+    }
+
+    /**
+     * Callback to notify of sim state change.
+     */
+    interface SimStateCallback {
+        void onSimStateChanged(IccCard.State simState);
+    }
+
+    /**
+     * Register to receive notifications about general keyguard information
+     * (see {@link InfoCallback}.
+     * @param callback The callback.
+     */
+    public void registerInfoCallback(InfoCallback callback) {
+        if (!mInfoCallbacks.contains(callback)) {
+            mInfoCallbacks.add(callback);
+        } else {
+            Log.e(TAG, "Object tried to add another INFO callback", new Exception("Whoops"));
+        }
+    }
+
+    /**
+     * Register to be notified of sim state changes.
+     * @param callback The callback.
+     */
+    public void registerSimStateCallback(SimStateCallback callback) {
+        if (!mSimStateCallbacks.contains(callback)) {
+            mSimStateCallbacks.add(callback);
+        } else {
+            Log.e(TAG, "Object tried to add another SIM callback", new Exception("Whoops"));
+        }
+    }
+
+    public IccCard.State getSimState() {
+        return mSimState;
+    }
+
+    /**
+     * Report that the user succesfully entered the sim pin so we
+     * have the information earlier than waiting for the intent
+     * broadcast from the telephony code.
+     */
+    public void reportSimPinUnlocked() {
+        mSimState = IccCard.State.READY;
+    }
+
+    public boolean isKeyguardBypassEnabled() {
+        return mKeyguardBypassEnabled;
+    }
+
+    public boolean isDevicePluggedIn() {
+        return mDevicePluggedIn;
+    }
+
+    public int getBatteryLevel() {
+        return mBatteryLevel;
+    }
+
+    public boolean shouldShowBatteryInfo() {
+        return mDevicePluggedIn || mBatteryLevel < LOW_BATTERY_THRESHOLD;
+    }
+
+    public CharSequence getTelephonyPlmn() {
+        return mTelephonyPlmn;
+    }
+
+    public CharSequence getTelephonySpn() {
+        return mTelephonySpn;
+    }
+
+    /**
+     * @return Whether the device is provisioned (whether they have gone through
+     *   the setup wizard)
+     */
+    public boolean isDeviceProvisioned() {
+        return mDeviceProvisioned;
+    }
+
+    public int getFailedAttempts() {
+        return mFailedAttempts;
+    }
+
+    public void clearFailedAttempts() {
+        mFailedAttempts = 0;
+    }
+
+    public void reportFailedAttempt() {
+        mFailedAttempts++;
+    }
+}
diff --git a/policy/src/com/android/internal/policy/impl/KeyguardViewBase.java b/policy/src/com/android/internal/policy/impl/KeyguardViewBase.java
new file mode 100644
index 0000000..9dcbcb6
--- /dev/null
+++ b/policy/src/com/android/internal/policy/impl/KeyguardViewBase.java
@@ -0,0 +1,209 @@
+/*
+ * Copyright (C) 2007 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.android.internal.policy.impl;
+
+import android.content.Context;
+import android.content.Intent;
+import android.media.AudioManager;
+import android.telephony.TelephonyManager;
+import android.view.KeyEvent;
+import android.view.View;
+import android.view.Gravity;
+import android.widget.FrameLayout;
+import android.util.AttributeSet;
+
+/**
+ * Base class for keyguard views.  {@link #reset} is where you should
+ * reset the state of your view.  Use the {@link KeyguardViewCallback} via
+ * {@link #getCallback()} to send information back (such as poking the wake lock,
+ * or finishing the keyguard).
+ *
+ * Handles intercepting of media keys that still work when the keyguard is
+ * showing.
+ */
+public abstract class KeyguardViewBase extends FrameLayout {
+
+    private KeyguardViewCallback mCallback;
+    private AudioManager mAudioManager;
+    private TelephonyManager mTelephonyManager = null;
+
+    public KeyguardViewBase(Context context) {
+        super(context);
+
+        // drop shadow below status bar in keyguard too
+        mForegroundInPadding = false;
+        setForegroundGravity(Gravity.FILL_HORIZONTAL | Gravity.TOP);
+        setForeground(
+                context.getResources().getDrawable(
+                        com.android.internal.R.drawable.title_bar_shadow));
+    }
+
+    // used to inject callback
+    void setCallback(KeyguardViewCallback callback) {
+        mCallback = callback;
+    }
+
+    public KeyguardViewCallback getCallback() {
+        return mCallback;
+    }
+
+    /**
+     * Called when you need to reset the state of your view.
+     */
+    abstract public void reset();
+
+    /**
+     * Called when the screen turned off.
+     */
+    abstract public void onScreenTurnedOff();
+
+    /**
+     * Called when the screen turned on.
+     */
+    abstract public void onScreenTurnedOn();
+
+    /**
+     * Called when a key has woken the device to give us a chance to adjust our
+     * state according the the key.  We are responsible for waking the device
+     * (by poking the wake lock) once we are ready.
+     *
+     * The 'Tq' suffix is per the documentation in {@link android.view.WindowManagerPolicy}.
+     * Be sure not to take any action that takes a long time; any significant
+     * action should be posted to a handler.
+     *
+     * @param keyCode The wake key, which may be relevant for configuring the
+     *   keyguard.
+     */
+    abstract public void wakeWhenReadyTq(int keyCode);
+
+    /**
+     * Verify that the user can get past the keyguard securely.  This is called,
+     * for example, when the phone disables the keyguard but then wants to launch
+     * something else that requires secure access.
+     *
+     * The result will be propogated back via {@link KeyguardViewCallback#keyguardDone(boolean)}
+     */
+    abstract public void verifyUnlock();
+
+    /**
+     * Called before this view is being removed.
+     */
+    abstract public void cleanUp();
+
+    @Override
+    public boolean dispatchKeyEvent(KeyEvent event) {
+        if (shouldEventKeepScreenOnWhileKeyguardShowing(event)) {
+            mCallback.pokeWakelock();
+        }
+
+        if (interceptMediaKey(event)) {
+            return true;
+        }
+        return super.dispatchKeyEvent(event);
+    }
+
+    private boolean shouldEventKeepScreenOnWhileKeyguardShowing(KeyEvent event) {
+        if (event.getAction() != KeyEvent.ACTION_DOWN) {
+            return false;
+        }
+        switch (event.getKeyCode()) {
+            case KeyEvent.KEYCODE_DPAD_DOWN:
+            case KeyEvent.KEYCODE_DPAD_LEFT:
+            case KeyEvent.KEYCODE_DPAD_RIGHT:
+            case KeyEvent.KEYCODE_DPAD_UP:
+                return false;
+            default:
+                return true;
+        }
+    }
+
+    /**
+     * Allows the media keys to work when the keyguard is showing.
+     * The media keys should be of no interest to the actual keyguard view(s),
+     * so intercepting them here should not be of any harm.
+     * @param event The key event
+     * @return whether the event was consumed as a media key.
+     */
+    private boolean interceptMediaKey(KeyEvent event) {
+        final int keyCode = event.getKeyCode();
+        if (event.getAction() == KeyEvent.ACTION_DOWN) {
+            switch (keyCode) {
+                case KeyEvent.KEYCODE_MEDIA_PLAY_PAUSE:
+                    /* Suppress PLAYPAUSE toggle when phone is ringing or
+                     * in-call to avoid music playback */
+                    if (mTelephonyManager == null) {
+                        mTelephonyManager = (TelephonyManager) getContext().getSystemService(
+                                Context.TELEPHONY_SERVICE);
+                    }
+                    if (mTelephonyManager != null &&
+                            mTelephonyManager.getCallState() != TelephonyManager.CALL_STATE_IDLE) {
+                        return true;  // suppress key event
+                    }
+                case KeyEvent.KEYCODE_HEADSETHOOK: 
+                case KeyEvent.KEYCODE_MEDIA_STOP: 
+                case KeyEvent.KEYCODE_MEDIA_NEXT: 
+                case KeyEvent.KEYCODE_MEDIA_PREVIOUS: 
+                case KeyEvent.KEYCODE_MEDIA_REWIND: 
+                case KeyEvent.KEYCODE_MEDIA_FAST_FORWARD: {
+                    Intent intent = new Intent(Intent.ACTION_MEDIA_BUTTON, null);
+                    intent.putExtra(Intent.EXTRA_KEY_EVENT, event);
+                    getContext().sendOrderedBroadcast(intent, null);
+                    return true;
+                }
+
+                case KeyEvent.KEYCODE_VOLUME_UP:
+                case KeyEvent.KEYCODE_VOLUME_DOWN: {
+                    synchronized (this) {
+                        if (mAudioManager == null) {
+                            mAudioManager = (AudioManager) getContext().getSystemService(
+                                    Context.AUDIO_SERVICE);
+                        }
+                    }
+                    // Volume buttons should only function for music.
+                    if (mAudioManager.isMusicActive()) {
+                        mAudioManager.adjustStreamVolume(
+                                    AudioManager.STREAM_MUSIC,
+                                    keyCode == KeyEvent.KEYCODE_VOLUME_UP
+                                            ? AudioManager.ADJUST_RAISE
+                                            : AudioManager.ADJUST_LOWER,
+                                    0);
+                    }
+                    // Don't execute default volume behavior
+                    return true;
+                }
+            }
+        } else if (event.getAction() == KeyEvent.ACTION_UP) {
+            switch (keyCode) {
+                case KeyEvent.KEYCODE_MUTE:
+                case KeyEvent.KEYCODE_HEADSETHOOK: 
+                case KeyEvent.KEYCODE_MEDIA_PLAY_PAUSE: 
+                case KeyEvent.KEYCODE_MEDIA_STOP: 
+                case KeyEvent.KEYCODE_MEDIA_NEXT: 
+                case KeyEvent.KEYCODE_MEDIA_PREVIOUS: 
+                case KeyEvent.KEYCODE_MEDIA_REWIND: 
+                case KeyEvent.KEYCODE_MEDIA_FAST_FORWARD: {
+                    Intent intent = new Intent(Intent.ACTION_MEDIA_BUTTON, null);
+                    intent.putExtra(Intent.EXTRA_KEY_EVENT, event);
+                    getContext().sendOrderedBroadcast(intent, null);
+                    return true;
+                }
+            }
+        }
+        return false;
+    }
+
+}
diff --git a/policy/src/com/android/internal/policy/impl/KeyguardViewCallback.java b/policy/src/com/android/internal/policy/impl/KeyguardViewCallback.java
new file mode 100644
index 0000000..b376d65
--- /dev/null
+++ b/policy/src/com/android/internal/policy/impl/KeyguardViewCallback.java
@@ -0,0 +1,49 @@
+/*
+ * Copyright (C) 2007 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.android.internal.policy.impl;
+
+/**
+ * The callback used by the keyguard view to tell the {@link KeyguardViewMediator} 
+ * various things.
+ */
+public interface KeyguardViewCallback {
+
+    /**
+     * Request the wakelock to be poked for the default amount of time.
+     */
+    void pokeWakelock();
+
+    /**
+     * Request the wakelock to be poked for a specific amount of time.
+     * @param millis The amount of time in millis.
+     */
+    void pokeWakelock(int millis);
+
+    /**
+     * Report that the keyguard is done.
+     * @param authenticated Whether the user securely got past the keyguard.
+     *   the only reason for this to be false is if the keyguard was instructed
+     *   to appear temporarily to verify the user is supposed to get past the
+     *   keyguard, and the user fails to do so.
+     */
+    void keyguardDone(boolean authenticated);
+
+    /**
+     * Report that the keyguard is done drawing.
+     */
+    void keyguardDoneDrawing();
+}
diff --git a/policy/src/com/android/internal/policy/impl/KeyguardViewManager.java b/policy/src/com/android/internal/policy/impl/KeyguardViewManager.java
new file mode 100644
index 0000000..ba1d7f5
--- /dev/null
+++ b/policy/src/com/android/internal/policy/impl/KeyguardViewManager.java
@@ -0,0 +1,241 @@
+/*
+ * Copyright (C) 2007 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.android.internal.policy.impl;
+
+import com.android.internal.R;
+
+import android.content.Context;
+import android.content.pm.ActivityInfo;
+import android.graphics.PixelFormat;
+import android.graphics.Canvas;
+import android.util.Log;
+import android.view.View;
+import android.view.ViewGroup;
+import android.view.ViewManager;
+import android.view.WindowManager;
+import android.widget.FrameLayout;
+
+/**
+ * Manages creating, showing, hiding and resetting the keyguard.  Calls back
+ * via {@link com.android.internal.policy.impl.KeyguardViewCallback} to poke
+ * the wake lock and report that the keyguard is done, which is in turn,
+ * reported to this class by the current {@link KeyguardViewBase}.
+ */
+public class KeyguardViewManager implements KeyguardWindowController {
+    private final static boolean DEBUG = false;
+    private static String TAG = "KeyguardViewManager";
+
+    private final Context mContext;
+    private final ViewManager mViewManager;
+    private final KeyguardViewCallback mCallback;
+    private final KeyguardViewProperties mKeyguardViewProperties;
+
+    private final KeyguardUpdateMonitor mUpdateMonitor;
+
+    private WindowManager.LayoutParams mWindowLayoutParams;
+    private boolean mNeedsInput = false;
+
+    private FrameLayout mKeyguardHost;
+    private KeyguardViewBase mKeyguardView;
+
+    private boolean mScreenOn = false;
+
+    /**
+     * @param context Used to create views.
+     * @param viewManager Keyguard will be attached to this.
+     * @param callback Used to notify of changes.
+     */
+    public KeyguardViewManager(Context context, ViewManager viewManager,
+            KeyguardViewCallback callback, KeyguardViewProperties keyguardViewProperties, KeyguardUpdateMonitor updateMonitor) {
+        mContext = context;
+        mViewManager = viewManager;
+        mCallback = callback;
+        mKeyguardViewProperties = keyguardViewProperties;
+
+        mUpdateMonitor = updateMonitor;
+    }
+
+    /**
+     * Helper class to host the keyguard view.
+     */
+    private static class KeyguardViewHost extends FrameLayout {
+        private final KeyguardViewCallback mCallback;
+
+        private KeyguardViewHost(Context context, KeyguardViewCallback callback) {
+            super(context);
+            mCallback = callback;
+        }
+
+        @Override
+        protected void dispatchDraw(Canvas canvas) {
+            super.dispatchDraw(canvas);
+            mCallback.keyguardDoneDrawing();
+        }
+    }
+
+    /**
+     * Show the keyguard.  Will handle creating and attaching to the view manager
+     * lazily.
+     */
+    public synchronized void show() {
+        if (DEBUG) Log.d(TAG, "show(); mKeyguardView==" + mKeyguardView);
+
+        if (mKeyguardHost == null) {
+            if (DEBUG) Log.d(TAG, "keyguard host is null, creating it...");
+
+            mKeyguardHost = new KeyguardViewHost(mContext, mCallback);
+
+            final int stretch = ViewGroup.LayoutParams.MATCH_PARENT;
+            int flags = WindowManager.LayoutParams.FLAG_FORCE_NOT_FULLSCREEN
+                    | WindowManager.LayoutParams.FLAG_SHOW_WALLPAPER
+                    | WindowManager.LayoutParams.FLAG_KEEP_SURFACE_WHILE_ANIMATING
+                    /*| WindowManager.LayoutParams.FLAG_LAYOUT_IN_SCREEN
+                    | WindowManager.LayoutParams.FLAG_LAYOUT_INSET_DECOR*/ ;
+            if (!mNeedsInput) {
+                flags |= WindowManager.LayoutParams.FLAG_ALT_FOCUSABLE_IM;
+            }
+            WindowManager.LayoutParams lp = new WindowManager.LayoutParams(
+                    stretch, stretch, WindowManager.LayoutParams.TYPE_KEYGUARD,
+                    flags, PixelFormat.TRANSLUCENT);
+            lp.softInputMode = WindowManager.LayoutParams.SOFT_INPUT_ADJUST_PAN;
+            lp.windowAnimations = com.android.internal.R.style.Animation_LockScreen;
+            lp.screenOrientation = ActivityInfo.SCREEN_ORIENTATION_NOSENSOR;
+            lp.setTitle("Keyguard");
+            mWindowLayoutParams = lp;
+
+            mViewManager.addView(mKeyguardHost, lp);
+        }
+
+        if (mKeyguardView == null) {
+            if (DEBUG) Log.d(TAG, "keyguard view is null, creating it...");
+            mKeyguardView = mKeyguardViewProperties.createKeyguardView(mContext, mUpdateMonitor, this);
+            mKeyguardView.setId(R.id.lock_screen);
+            mKeyguardView.setCallback(mCallback);
+
+            final ViewGroup.LayoutParams lp = new FrameLayout.LayoutParams(
+                    ViewGroup.LayoutParams.MATCH_PARENT,
+                    ViewGroup.LayoutParams.MATCH_PARENT);
+
+            mKeyguardHost.addView(mKeyguardView, lp);
+
+            if (mScreenOn) {
+                mKeyguardView.onScreenTurnedOn();
+            }
+        }
+
+        mKeyguardHost.setVisibility(View.VISIBLE);
+        mKeyguardView.requestFocus();
+    }
+
+    public void setNeedsInput(boolean needsInput) {
+        mNeedsInput = needsInput;
+        if (mWindowLayoutParams != null) {
+            if (needsInput) {
+                mWindowLayoutParams.flags &=
+                    ~WindowManager.LayoutParams.FLAG_ALT_FOCUSABLE_IM;
+            } else {
+                mWindowLayoutParams.flags |=
+                    WindowManager.LayoutParams.FLAG_ALT_FOCUSABLE_IM;
+            }
+            mViewManager.updateViewLayout(mKeyguardHost, mWindowLayoutParams);
+        }
+    }
+
+    /**
+     * Reset the state of the view.
+     */
+    public synchronized void reset() {
+        if (DEBUG) Log.d(TAG, "reset()");
+        if (mKeyguardView != null) {
+            mKeyguardView.reset();
+        }
+    }
+
+    public synchronized void onScreenTurnedOff() {
+        if (DEBUG) Log.d(TAG, "onScreenTurnedOff()");
+        mScreenOn = false;
+        if (mKeyguardView != null) {
+            mKeyguardView.onScreenTurnedOff();
+        }
+    }
+
+    public synchronized void onScreenTurnedOn() {
+        if (DEBUG) Log.d(TAG, "onScreenTurnedOn()");
+        mScreenOn = true;
+        if (mKeyguardView != null) {
+            mKeyguardView.onScreenTurnedOn();
+        }
+    }
+
+    public synchronized void verifyUnlock() {
+        if (DEBUG) Log.d(TAG, "verifyUnlock()");
+        show();
+        mKeyguardView.verifyUnlock();
+    }
+
+    /**
+     * A key has woken the device.  We use this to potentially adjust the state
+     * of the lock screen based on the key.
+     *
+     * The 'Tq' suffix is per the documentation in {@link android.view.WindowManagerPolicy}.
+     * Be sure not to take any action that takes a long time; any significant
+     * action should be posted to a handler.
+     *
+     * @param keyCode The wake key.
+     */
+    public boolean wakeWhenReadyTq(int keyCode) {
+        if (DEBUG) Log.d(TAG, "wakeWhenReady(" + keyCode + ")");
+        if (mKeyguardView != null) {
+            mKeyguardView.wakeWhenReadyTq(keyCode);
+            return true;
+        } else {
+            Log.w(TAG, "mKeyguardView is null in wakeWhenReadyTq");
+            return false;
+        }
+    }
+
+    /**
+     * Hides the keyguard view
+     */
+    public synchronized void hide() {
+        if (DEBUG) Log.d(TAG, "hide()");
+        if (mKeyguardHost != null) {
+            mKeyguardHost.setVisibility(View.GONE);
+            // Don't do this right away, so we can let the view continue to animate
+            // as it goes away.
+            if (mKeyguardView != null) {
+                final KeyguardViewBase lastView = mKeyguardView;
+                mKeyguardView = null;
+                mKeyguardHost.postDelayed(new Runnable() {
+                    public void run() {
+                        synchronized (KeyguardViewManager.this) {
+                            mKeyguardHost.removeView(lastView);
+                            lastView.cleanUp();
+                        }
+                    }
+                }, 500);
+            }
+        }
+    }
+
+    /**
+     * @return Whether the keyguard is showing
+     */
+    public synchronized boolean isShowing() {
+        return (mKeyguardHost != null && mKeyguardHost.getVisibility() == View.VISIBLE);
+    }
+}
diff --git a/policy/src/com/android/internal/policy/impl/KeyguardViewMediator.java b/policy/src/com/android/internal/policy/impl/KeyguardViewMediator.java
new file mode 100644
index 0000000..88203c3
--- /dev/null
+++ b/policy/src/com/android/internal/policy/impl/KeyguardViewMediator.java
@@ -0,0 +1,1136 @@
+/*
+ * Copyright (C) 2007 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.android.internal.policy.impl;
+
+import com.android.internal.telephony.IccCard;
+import com.android.internal.widget.LockPatternUtils;
+
+import android.app.ActivityManagerNative;
+import android.app.AlarmManager;
+import android.app.PendingIntent;
+import android.app.StatusBarManager;
+import android.content.BroadcastReceiver;
+import android.content.ContentResolver;
+import android.content.Context;
+import android.content.Intent;
+import android.content.IntentFilter;
+import android.media.AudioManager;
+import android.media.Ringtone;
+import android.media.RingtoneManager;
+import android.net.Uri;
+import android.os.Handler;
+import android.os.IBinder;
+import android.os.LocalPowerManager;
+import android.os.Message;
+import android.os.PowerManager;
+import android.os.RemoteException;
+import android.os.SystemClock;
+import android.os.SystemProperties;
+import android.provider.Settings;
+import android.telephony.TelephonyManager;
+import android.util.Config;
+import android.util.EventLog;
+import android.util.Log;
+import android.view.KeyEvent;
+import android.view.WindowManagerImpl;
+import android.view.WindowManagerPolicy;
+
+
+/**
+ * Mediates requests related to the keyguard.  This includes queries about the
+ * state of the keyguard, power management events that effect whether the keyguard
+ * should be shown or reset, callbacks to the phone window manager to notify
+ * it of when the keyguard is showing, and events from the keyguard view itself
+ * stating that the keyguard was succesfully unlocked.
+ *
+ * Note that the keyguard view is shown when the screen is off (as appropriate)
+ * so that once the screen comes on, it will be ready immediately.
+ *
+ * Example queries about the keyguard:
+ * - is {movement, key} one that should wake the keygaurd?
+ * - is the keyguard showing?
+ * - are input events restricted due to the state of the keyguard?
+ *
+ * Callbacks to the phone window manager:
+ * - the keyguard is showing
+ *
+ * Example external events that translate to keyguard view changes:
+ * - screen turned off -> reset the keyguard, and show it so it will be ready
+ *   next time the screen turns on
+ * - keyboard is slid open -> if the keyguard is not secure, hide it
+ *
+ * Events from the keyguard view:
+ * - user succesfully unlocked keyguard -> hide keyguard view, and no longer
+ *   restrict input events.
+ *
+ * Note: in addition to normal power managment events that effect the state of
+ * whether the keyguard should be showing, external apps and services may request
+ * that the keyguard be disabled via {@link #setKeyguardEnabled(boolean)}.  When
+ * false, this will override all other conditions for turning on the keyguard.
+ *
+ * Threading and synchronization:
+ * This class is created by the initialization routine of the {@link WindowManagerPolicy},
+ * and runs on its thread.  The keyguard UI is created from that thread in the
+ * constructor of this class.  The apis may be called from other threads, including the
+ * {@link com.android.server.InputManager}'s and {@link android.view.WindowManager}'s.
+ * Therefore, methods on this class are synchronized, and any action that is pointed
+ * directly to the keyguard UI is posted to a {@link Handler} to ensure it is taken on the UI
+ * thread of the keyguard.
+ */
+public class KeyguardViewMediator implements KeyguardViewCallback,
+        KeyguardUpdateMonitor.SimStateCallback {
+    private final static boolean DEBUG = false && Config.LOGD;
+    private final static boolean DBG_WAKE = DEBUG || true;
+
+    private final static String TAG = "KeyguardViewMediator";
+
+    private static final String DELAYED_KEYGUARD_ACTION =
+        "com.android.internal.policy.impl.PhoneWindowManager.DELAYED_KEYGUARD";
+
+    // used for handler messages
+    private static final int TIMEOUT = 1;
+    private static final int SHOW = 2;
+    private static final int HIDE = 3;
+    private static final int RESET = 4;
+    private static final int VERIFY_UNLOCK = 5;
+    private static final int NOTIFY_SCREEN_OFF = 6;
+    private static final int NOTIFY_SCREEN_ON = 7;
+    private static final int WAKE_WHEN_READY = 8;
+    private static final int KEYGUARD_DONE = 9;
+    private static final int KEYGUARD_DONE_DRAWING = 10;
+    private static final int KEYGUARD_DONE_AUTHENTICATING = 11;
+    private static final int SET_HIDDEN = 12;
+    private static final int KEYGUARD_TIMEOUT = 13;
+
+    /**
+     * The default amount of time we stay awake (used for all key input)
+     */
+    protected static final int AWAKE_INTERVAL_DEFAULT_MS = 5000;
+
+
+    /**
+     * The default amount of time we stay awake (used for all key input) when
+     * the keyboard is open
+     */
+    protected static final int AWAKE_INTERVAL_DEFAULT_KEYBOARD_OPEN_MS = 10000;
+
+    /**
+     * How long to wait after the screen turns off due to timeout before
+     * turning on the keyguard (i.e, the user has this much time to turn
+     * the screen back on without having to face the keyguard).
+     */
+    private static final int KEYGUARD_DELAY_MS = 5000;
+
+    /**
+     * How long we'll wait for the {@link KeyguardViewCallback#keyguardDoneDrawing()}
+     * callback before unblocking a call to {@link #setKeyguardEnabled(boolean)}
+     * that is reenabling the keyguard.
+     */
+    private static final int KEYGUARD_DONE_DRAWING_TIMEOUT_MS = 2000;
+
+    private Context mContext;
+    private AlarmManager mAlarmManager;
+    private StatusBarManager mStatusBarManager;
+    private boolean mShowLockIcon;
+    private boolean mShowingLockIcon;
+
+    private boolean mSystemReady;
+
+    // Whether the next call to playSounds() should be skipped.  Defaults to
+    // true because the first lock (on boot) should be silent.
+    private boolean mSuppressNextLockSound = true;
+
+
+    /** Low level access to the power manager for enableUserActivity.  Having this
+     * requires that we run in the system process.  */
+    LocalPowerManager mRealPowerManager;
+
+    /** High level access to the power manager for WakeLocks */
+    private PowerManager mPM;
+
+    /**
+     * Used to keep the device awake while the keyguard is showing, i.e for
+     * calls to {@link #pokeWakelock()}
+     */
+    private PowerManager.WakeLock mWakeLock;
+
+    /**
+     * Used to keep the device awake while to ensure the keyguard finishes opening before
+     * we sleep.
+     */
+    private PowerManager.WakeLock mShowKeyguardWakeLock;
+
+    /**
+     * Does not turn on screen, held while a call to {@link KeyguardViewManager#wakeWhenReadyTq(int)}
+     * is called to make sure the device doesn't sleep before it has a chance to poke
+     * the wake lock.
+     * @see #wakeWhenReadyLocked(int)
+     */
+    private PowerManager.WakeLock mWakeAndHandOff;
+
+    private KeyguardViewManager mKeyguardViewManager;
+
+    // these are protected by synchronized (this)
+
+    /**
+     * External apps (like the phone app) can tell us to disable the keygaurd.
+     */
+    private boolean mExternallyEnabled = true;
+
+    /**
+     * Remember if an external call to {@link #setKeyguardEnabled} with value
+     * false caused us to hide the keyguard, so that we need to reshow it once
+     * the keygaurd is reenabled with another call with value true.
+     */
+    private boolean mNeedToReshowWhenReenabled = false;
+
+    // cached value of whether we are showing (need to know this to quickly
+    // answer whether the input should be restricted)
+    private boolean mShowing = false;
+
+    // true if the keyguard is hidden by another window
+    private boolean mHidden = false;
+
+    /**
+     * Helps remember whether the screen has turned on since the last time
+     * it turned off due to timeout. see {@link #onScreenTurnedOff(int)}
+     */
+    private int mDelayedShowingSequence;
+
+    private int mWakelockSequence;
+
+    private PhoneWindowManager mCallback;
+
+    /**
+     * If the user has disabled the keyguard, then requests to exit, this is
+     * how we'll ultimately let them know whether it was successful.  We use this
+     * var being non-null as an indicator that there is an in progress request.
+     */
+    private WindowManagerPolicy.OnKeyguardExitResult mExitSecureCallback;
+
+    // the properties of the keyguard
+    private KeyguardViewProperties mKeyguardViewProperties;
+
+    private KeyguardUpdateMonitor mUpdateMonitor;
+
+    private boolean mKeyboardOpen = false;
+
+    private boolean mScreenOn = false;
+
+    // last known state of the cellular connection
+    private String mPhoneState = TelephonyManager.EXTRA_STATE_IDLE;
+
+    /**
+     * we send this intent when the keyguard is dismissed.
+     */
+    private Intent mUserPresentIntent;
+
+    /**
+     * {@link #setKeyguardEnabled} waits on this condition when it reenables
+     * the keyguard.
+     */
+    private boolean mWaitingUntilKeyguardVisible = false;
+
+    public KeyguardViewMediator(Context context, PhoneWindowManager callback,
+            LocalPowerManager powerManager) {
+        mContext = context;
+
+        mRealPowerManager = powerManager;
+        mPM = (PowerManager) context.getSystemService(Context.POWER_SERVICE);
+        mWakeLock = mPM.newWakeLock(
+                PowerManager.FULL_WAKE_LOCK | PowerManager.ACQUIRE_CAUSES_WAKEUP,
+                "keyguard");
+        mWakeLock.setReferenceCounted(false);
+        mShowKeyguardWakeLock = mPM.newWakeLock(PowerManager.PARTIAL_WAKE_LOCK, "show keyguard");
+        mShowKeyguardWakeLock.setReferenceCounted(false);
+
+        mWakeAndHandOff = mPM.newWakeLock(
+                PowerManager.PARTIAL_WAKE_LOCK,
+                "keyguardWakeAndHandOff");
+        mWakeAndHandOff.setReferenceCounted(false);
+
+        IntentFilter filter = new IntentFilter();
+        filter.addAction(DELAYED_KEYGUARD_ACTION);
+        filter.addAction(TelephonyManager.ACTION_PHONE_STATE_CHANGED);
+        context.registerReceiver(mBroadCastReceiver, filter);
+        mAlarmManager = (AlarmManager) context
+                .getSystemService(Context.ALARM_SERVICE);
+        mCallback = callback;
+
+        mUpdateMonitor = new KeyguardUpdateMonitor(context);
+
+        mUpdateMonitor.registerSimStateCallback(this);
+
+        mKeyguardViewProperties = new LockPatternKeyguardViewProperties(
+                new LockPatternUtils(mContext), mUpdateMonitor);
+
+        mKeyguardViewManager = new KeyguardViewManager(
+                context, WindowManagerImpl.getDefault(), this,
+                mKeyguardViewProperties, mUpdateMonitor);
+
+        mUserPresentIntent = new Intent(Intent.ACTION_USER_PRESENT);
+        mUserPresentIntent.addFlags(Intent.FLAG_RECEIVER_REPLACE_PENDING);
+
+        final ContentResolver cr = mContext.getContentResolver();
+        mShowLockIcon = (Settings.System.getInt(cr, "show_status_bar_lock", 0) == 1);
+    }
+
+    /**
+     * Let us know that the system is ready after startup.
+     */
+    public void onSystemReady() {
+        synchronized (this) {
+            if (DEBUG) Log.d(TAG, "onSystemReady");
+            mSystemReady = true;
+            doKeyguard();
+        }
+    }
+
+    /**
+     * Called to let us know the screen was turned off.
+     * @param why either {@link WindowManagerPolicy#OFF_BECAUSE_OF_USER},
+     *   {@link WindowManagerPolicy#OFF_BECAUSE_OF_TIMEOUT} or
+     *   {@link WindowManagerPolicy#OFF_BECAUSE_OF_PROX_SENSOR}.
+     */
+    public void onScreenTurnedOff(int why) {
+        synchronized (this) {
+            mScreenOn = false;
+            if (DEBUG) Log.d(TAG, "onScreenTurnedOff(" + why + ")");
+
+            if (mExitSecureCallback != null) {
+                if (DEBUG) Log.d(TAG, "pending exit secure callback cancelled");
+                mExitSecureCallback.onKeyguardExitResult(false);
+                mExitSecureCallback = null;
+                if (!mExternallyEnabled) {
+                    hideLocked();
+                }
+            } else if (mShowing) {
+                notifyScreenOffLocked();
+                resetStateLocked();
+            } else if (why == WindowManagerPolicy.OFF_BECAUSE_OF_TIMEOUT) {
+                // if the screen turned off because of timeout, set an alarm
+                // to enable it a little bit later (i.e, give the user a chance
+                // to turn the screen back on within a certain window without
+                // having to unlock the screen)
+                long when = SystemClock.elapsedRealtime() + KEYGUARD_DELAY_MS;
+                Intent intent = new Intent(DELAYED_KEYGUARD_ACTION);
+                intent.putExtra("seq", mDelayedShowingSequence);
+                PendingIntent sender = PendingIntent.getBroadcast(mContext,
+                        0, intent, PendingIntent.FLAG_CANCEL_CURRENT);
+                mAlarmManager.set(AlarmManager.ELAPSED_REALTIME_WAKEUP, when,
+                        sender);
+                if (DEBUG) Log.d(TAG, "setting alarm to turn off keyguard, seq = "
+                                 + mDelayedShowingSequence);
+            } else if (why == WindowManagerPolicy.OFF_BECAUSE_OF_PROX_SENSOR) {
+                // Do not enable the keyguard if the prox sensor forced the screen off.
+            } else {
+                doKeyguard();
+            }
+        }
+    }
+
+    /**
+     * Let's us know the screen was turned on.
+     */
+    public void onScreenTurnedOn() {
+        synchronized (this) {
+            mScreenOn = true;
+            mDelayedShowingSequence++;
+            if (DEBUG) Log.d(TAG, "onScreenTurnedOn, seq = " + mDelayedShowingSequence);
+            notifyScreenOnLocked();
+        }
+    }
+
+    /**
+     * Same semantics as {@link WindowManagerPolicy#enableKeyguard}; provide
+     * a way for external stuff to override normal keyguard behavior.  For instance
+     * the phone app disables the keyguard when it receives incoming calls.
+     */
+    public void setKeyguardEnabled(boolean enabled) {
+        synchronized (this) {
+            if (DEBUG) Log.d(TAG, "setKeyguardEnabled(" + enabled + ")");
+
+
+            mExternallyEnabled = enabled;
+
+            if (!enabled && mShowing) {
+                if (mExitSecureCallback != null) {
+                    if (DEBUG) Log.d(TAG, "in process of verifyUnlock request, ignoring");
+                    // we're in the process of handling a request to verify the user
+                    // can get past the keyguard. ignore extraneous requests to disable / reenable
+                    return;
+                }
+
+                // hiding keyguard that is showing, remember to reshow later
+                if (DEBUG) Log.d(TAG, "remembering to reshow, hiding keyguard, "
+                        + "disabling status bar expansion");
+                mNeedToReshowWhenReenabled = true;
+                hideLocked();
+            } else if (enabled && mNeedToReshowWhenReenabled) {
+                // reenabled after previously hidden, reshow
+                if (DEBUG) Log.d(TAG, "previously hidden, reshowing, reenabling "
+                        + "status bar expansion");
+                mNeedToReshowWhenReenabled = false;
+
+                if (mExitSecureCallback != null) {
+                    if (DEBUG) Log.d(TAG, "onKeyguardExitResult(false), resetting");
+                    mExitSecureCallback.onKeyguardExitResult(false);
+                    mExitSecureCallback = null;
+                    resetStateLocked();
+                } else {
+                    showLocked();
+
+                    // block until we know the keygaurd is done drawing (and post a message
+                    // to unblock us after a timeout so we don't risk blocking too long
+                    // and causing an ANR).
+                    mWaitingUntilKeyguardVisible = true;
+                    mHandler.sendEmptyMessageDelayed(KEYGUARD_DONE_DRAWING, KEYGUARD_DONE_DRAWING_TIMEOUT_MS);
+                    if (DEBUG) Log.d(TAG, "waiting until mWaitingUntilKeyguardVisible is false");
+                    while (mWaitingUntilKeyguardVisible) {
+                        try {
+                            wait();
+                        } catch (InterruptedException e) {
+                            Thread.currentThread().interrupt();
+                        }
+                    }
+                    if (DEBUG) Log.d(TAG, "done waiting for mWaitingUntilKeyguardVisible");
+                }
+            }
+        }
+    }
+
+    /**
+     * @see android.app.KeyguardManager#exitKeyguardSecurely
+     */
+    public void verifyUnlock(WindowManagerPolicy.OnKeyguardExitResult callback) {
+        synchronized (this) {
+            if (DEBUG) Log.d(TAG, "verifyUnlock");
+            if (!mUpdateMonitor.isDeviceProvisioned()) {
+                // don't allow this api when the device isn't provisioned
+                if (DEBUG) Log.d(TAG, "ignoring because device isn't provisioned");
+                callback.onKeyguardExitResult(false);
+            } else if (mExternallyEnabled) {
+                // this only applies when the user has externally disabled the
+                // keyguard.  this is unexpected and means the user is not
+                // using the api properly.
+                Log.w(TAG, "verifyUnlock called when not externally disabled");
+                callback.onKeyguardExitResult(false);
+            } else if (mExitSecureCallback != null) {
+                // already in progress with someone else
+                callback.onKeyguardExitResult(false);
+            } else {
+                mExitSecureCallback = callback;
+                verifyUnlockLocked();
+            }
+        }
+    }
+
+    /**
+     * Is the keyguard currently showing?
+     */
+    public boolean isShowing() {
+        return mShowing;
+    }
+
+    /**
+     * Is the keyguard currently showing and not being force hidden?
+     */
+    public boolean isShowingAndNotHidden() {
+        return mShowing && !mHidden;
+    }
+
+    /**
+     * Notify us when the keyguard is hidden by another window
+     */
+    public void setHidden(boolean isHidden) {
+        if (DEBUG) Log.d(TAG, "setHidden " + isHidden);
+        mHandler.removeMessages(SET_HIDDEN);
+        Message msg = mHandler.obtainMessage(SET_HIDDEN, (isHidden ? 1 : 0), 0);
+        mHandler.sendMessage(msg);
+    }
+
+    /**
+     * Handles SET_HIDDEN message sent by setHidden()
+     */
+    private void handleSetHidden(boolean isHidden) {
+        synchronized (KeyguardViewMediator.this) {
+            if (mHidden != isHidden) {
+                mHidden = isHidden;
+                adjustUserActivityLocked();
+                adjustStatusBarLocked();
+            }
+        }
+    }
+
+    /**
+     * Used by PhoneWindowManager to enable the keyguard due to a user activity timeout.
+     * This must be safe to call from any thread and with any window manager locks held.
+     */
+    public void doKeyguardTimeout() {
+        mHandler.removeMessages(KEYGUARD_TIMEOUT);
+        Message msg = mHandler.obtainMessage(KEYGUARD_TIMEOUT);
+        mHandler.sendMessage(msg);
+    }
+
+    /**
+     * Given the state of the keyguard, is the input restricted?
+     * Input is restricted when the keyguard is showing, or when the keyguard
+     * was suppressed by an app that disabled the keyguard or we haven't been provisioned yet.
+     */
+    public boolean isInputRestricted() {
+        return mShowing || mNeedToReshowWhenReenabled || !mUpdateMonitor.isDeviceProvisioned();
+    }
+
+    /**
+     * Returns true if the change is resulting in the keyguard beign dismissed,
+     * meaning the screen can turn on immediately.  Otherwise returns false.
+     */
+    public boolean doLidChangeTq(boolean isLidOpen) {
+        mKeyboardOpen = isLidOpen;
+
+        if (mUpdateMonitor.isKeyguardBypassEnabled() && mKeyboardOpen
+                && !mKeyguardViewProperties.isSecure() && mKeyguardViewManager.isShowing()) {
+            if (DEBUG) Log.d(TAG, "bypassing keyguard on sliding open of keyboard with non-secure keyguard");
+            mHandler.sendEmptyMessage(KEYGUARD_DONE_AUTHENTICATING);
+            return true;
+        }
+        return false;
+    }
+
+    /**
+     * Enable the keyguard if the settings are appropriate.
+     */
+    private void doKeyguard() {
+        synchronized (this) {
+            // if another app is disabling us, don't show
+            if (!mExternallyEnabled) {
+                if (DEBUG) Log.d(TAG, "doKeyguard: not showing because externally disabled");
+
+                // note: we *should* set mNeedToReshowWhenReenabled=true here, but that makes
+                // for an occasional ugly flicker in this situation:
+                // 1) receive a call with the screen on (no keyguard) or make a call
+                // 2) screen times out
+                // 3) user hits key to turn screen back on
+                // instead, we reenable the keyguard when we know the screen is off and the call
+                // ends (see the broadcast receiver below)
+                // TODO: clean this up when we have better support at the window manager level
+                // for apps that wish to be on top of the keyguard
+                return;
+            }
+
+            // if the keyguard is already showing, don't bother
+            if (mKeyguardViewManager.isShowing()) {
+                if (DEBUG) Log.d(TAG, "doKeyguard: not showing because it is already showing");
+                return;
+            }
+
+            // if the setup wizard hasn't run yet, don't show
+            final boolean requireSim = !SystemProperties.getBoolean("keyguard.no_require_sim",
+                    false);
+            final boolean provisioned = mUpdateMonitor.isDeviceProvisioned();
+            final IccCard.State state = mUpdateMonitor.getSimState();
+            final boolean lockedOrMissing = state.isPinLocked()
+                    || ((state == IccCard.State.ABSENT) && requireSim);
+
+            if (!lockedOrMissing && !provisioned) {
+                if (DEBUG) Log.d(TAG, "doKeyguard: not showing because device isn't provisioned"
+                        + " and the sim is not locked or missing");
+                return;
+            }
+
+            if (DEBUG) Log.d(TAG, "doKeyguard: showing the lock screen");
+            showLocked();
+        }
+    }
+
+    /**
+     * Send message to keyguard telling it to reset its state.
+     * @see #handleReset()
+     */
+    private void resetStateLocked() {
+        if (DEBUG) Log.d(TAG, "resetStateLocked");
+        Message msg = mHandler.obtainMessage(RESET);
+        mHandler.sendMessage(msg);
+    }
+
+    /**
+     * Send message to keyguard telling it to verify unlock
+     * @see #handleVerifyUnlock()
+     */
+    private void verifyUnlockLocked() {
+        if (DEBUG) Log.d(TAG, "verifyUnlockLocked");
+        mHandler.sendEmptyMessage(VERIFY_UNLOCK);
+    }
+
+
+    /**
+     * Send a message to keyguard telling it the screen just turned on.
+     * @see #onScreenTurnedOff(int)
+     * @see #handleNotifyScreenOff
+     */
+    private void notifyScreenOffLocked() {
+        if (DEBUG) Log.d(TAG, "notifyScreenOffLocked");
+        mHandler.sendEmptyMessage(NOTIFY_SCREEN_OFF);
+    }
+
+    /**
+     * Send a message to keyguard telling it the screen just turned on.
+     * @see #onScreenTurnedOn()
+     * @see #handleNotifyScreenOn
+     */
+    private void notifyScreenOnLocked() {
+        if (DEBUG) Log.d(TAG, "notifyScreenOnLocked");
+        mHandler.sendEmptyMessage(NOTIFY_SCREEN_ON);
+    }
+
+    /**
+     * Send message to keyguard telling it about a wake key so it can adjust
+     * its state accordingly and then poke the wake lock when it is ready.
+     * @param keyCode The wake key.
+     * @see #handleWakeWhenReady
+     * @see #onWakeKeyWhenKeyguardShowingTq(int)
+     */
+    private void wakeWhenReadyLocked(int keyCode) {
+        if (DBG_WAKE) Log.d(TAG, "wakeWhenReadyLocked(" + keyCode + ")");
+
+        /**
+         * acquire the handoff lock that will keep the cpu running.  this will
+         * be released once the keyguard has set itself up and poked the other wakelock
+         * in {@link #handleWakeWhenReady(int)}
+         */
+        mWakeAndHandOff.acquire();
+
+        Message msg = mHandler.obtainMessage(WAKE_WHEN_READY, keyCode, 0);
+        mHandler.sendMessage(msg);
+    }
+
+    /**
+     * Send message to keyguard telling it to show itself
+     * @see #handleShow()
+     */
+    private void showLocked() {
+        if (DEBUG) Log.d(TAG, "showLocked");
+        // ensure we stay awake until we are finished displaying the keyguard
+        mShowKeyguardWakeLock.acquire();
+        Message msg = mHandler.obtainMessage(SHOW);
+        mHandler.sendMessage(msg);
+    }
+
+    /**
+     * Send message to keyguard telling it to hide itself
+     * @see #handleHide()
+     */
+    private void hideLocked() {
+        if (DEBUG) Log.d(TAG, "hideLocked");
+        Message msg = mHandler.obtainMessage(HIDE);
+        mHandler.sendMessage(msg);
+    }
+
+    /** {@inheritDoc} */
+    public void onSimStateChanged(IccCard.State simState) {
+        if (DEBUG) Log.d(TAG, "onSimStateChanged: " + simState);
+
+        switch (simState) {
+            case ABSENT:
+                // only force lock screen in case of missing sim if user hasn't
+                // gone through setup wizard
+                if (!mUpdateMonitor.isDeviceProvisioned()) {
+                    if (!isShowing()) {
+                        if (DEBUG) Log.d(TAG, "INTENT_VALUE_ICC_ABSENT and keygaurd isn't showing, we need "
+                             + "to show the keyguard since the device isn't provisioned yet.");
+                        doKeyguard();
+                    } else {
+                        resetStateLocked();
+                    }
+                }
+                break;
+            case PIN_REQUIRED:
+            case PUK_REQUIRED:
+                if (!isShowing()) {
+                    if (DEBUG) Log.d(TAG, "INTENT_VALUE_ICC_LOCKED and keygaurd isn't showing, we need "
+                            + "to show the keyguard so the user can enter their sim pin");
+                    doKeyguard();
+                } else {
+                    resetStateLocked();
+                }
+
+                break;
+            case READY:
+                if (isShowing()) {
+                    resetStateLocked();
+                }
+                break;
+        }
+    }
+
+    public boolean isSecure() {
+        return mKeyguardViewProperties.isSecure();
+    }
+
+    private BroadcastReceiver mBroadCastReceiver = new BroadcastReceiver() {
+        @Override
+        public void onReceive(Context context, Intent intent) {
+            final String action = intent.getAction();
+            if (action.equals(DELAYED_KEYGUARD_ACTION)) {
+
+                int sequence = intent.getIntExtra("seq", 0);
+
+                if (false) Log.d(TAG, "received DELAYED_KEYGUARD_ACTION with seq = "
+                        + sequence + ", mDelayedShowingSequence = " + mDelayedShowingSequence);
+
+                if (mDelayedShowingSequence == sequence) {
+                    // Don't play lockscreen SFX if the screen went off due to
+                    // timeout.
+                    mSuppressNextLockSound = true;
+
+                    doKeyguard();
+                }
+            } else if (TelephonyManager.ACTION_PHONE_STATE_CHANGED.equals(action)) {
+                mPhoneState = intent.getStringExtra(TelephonyManager.EXTRA_STATE);
+
+                if (TelephonyManager.EXTRA_STATE_IDLE.equals(mPhoneState)  // call ending
+                        && !mScreenOn                           // screen off
+                        && mExternallyEnabled) {                // not disabled by any app
+
+                    // note: this is a way to gracefully reenable the keyguard when the call
+                    // ends and the screen is off without always reenabling the keyguard
+                    // each time the screen turns off while in call (and having an occasional ugly
+                    // flicker while turning back on the screen and disabling the keyguard again).
+                    if (DEBUG) Log.d(TAG, "screen is off and call ended, let's make sure the "
+                            + "keyguard is showing");
+                    doKeyguard();
+                }
+            }
+        }
+    };
+
+
+    /**
+     * When a key is received when the screen is off and the keyguard is showing,
+     * we need to decide whether to actually turn on the screen, and if so, tell
+     * the keyguard to prepare itself and poke the wake lock when it is ready.
+     *
+     * The 'Tq' suffix is per the documentation in {@link WindowManagerPolicy}.
+     * Be sure not to take any action that takes a long time; any significant
+     * action should be posted to a handler.
+     *
+     * @param keyCode The keycode of the key that woke the device
+     * @return Whether we poked the wake lock (and turned the screen on)
+     */
+    public boolean onWakeKeyWhenKeyguardShowingTq(int keyCode) {
+        if (DEBUG) Log.d(TAG, "onWakeKeyWhenKeyguardShowing(" + keyCode + ")");
+
+        if (isWakeKeyWhenKeyguardShowing(keyCode)) {
+            // give the keyguard view manager a chance to adjust the state of the
+            // keyguard based on the key that woke the device before poking
+            // the wake lock
+            wakeWhenReadyLocked(keyCode);
+            return true;
+        } else {
+            return false;
+        }
+    }
+
+    private boolean isWakeKeyWhenKeyguardShowing(int keyCode) {
+        switch (keyCode) {
+            case KeyEvent.KEYCODE_VOLUME_UP:
+            case KeyEvent.KEYCODE_VOLUME_DOWN:
+            case KeyEvent.KEYCODE_MUTE:
+            case KeyEvent.KEYCODE_HEADSETHOOK:
+            case KeyEvent.KEYCODE_MEDIA_PLAY_PAUSE:
+            case KeyEvent.KEYCODE_MEDIA_STOP:
+            case KeyEvent.KEYCODE_MEDIA_NEXT:
+            case KeyEvent.KEYCODE_MEDIA_PREVIOUS:
+            case KeyEvent.KEYCODE_MEDIA_REWIND:
+            case KeyEvent.KEYCODE_MEDIA_FAST_FORWARD:
+            case KeyEvent.KEYCODE_CAMERA:
+                return false;
+        }
+        return true;
+    }
+
+    /**
+     * Callbacks from {@link KeyguardViewManager}.
+     */
+
+    /** {@inheritDoc} */
+    public void pokeWakelock() {
+        pokeWakelock(mKeyboardOpen ?
+                AWAKE_INTERVAL_DEFAULT_KEYBOARD_OPEN_MS : AWAKE_INTERVAL_DEFAULT_MS);
+    }
+
+    /** {@inheritDoc} */
+    public void pokeWakelock(int holdMs) {
+        synchronized (this) {
+            if (DBG_WAKE) Log.d(TAG, "pokeWakelock(" + holdMs + ")");
+            mWakeLock.acquire();
+            mHandler.removeMessages(TIMEOUT);
+            mWakelockSequence++;
+            Message msg = mHandler.obtainMessage(TIMEOUT, mWakelockSequence, 0);
+            mHandler.sendMessageDelayed(msg, holdMs);
+        }
+    }
+
+    /**
+     * {@inheritDoc}
+     *
+     * @see #handleKeyguardDone
+     */
+    public void keyguardDone(boolean authenticated) {
+        keyguardDone(authenticated, true);
+    }
+
+    public void keyguardDone(boolean authenticated, boolean wakeup) {
+        synchronized (this) {
+            EventLog.writeEvent(70000, 2);
+            if (DEBUG) Log.d(TAG, "keyguardDone(" + authenticated + ")");
+            Message msg = mHandler.obtainMessage(KEYGUARD_DONE);
+            msg.arg1 = wakeup ? 1 : 0;
+            mHandler.sendMessage(msg);
+
+            if (authenticated) {
+                mUpdateMonitor.clearFailedAttempts();
+            }
+
+            if (mExitSecureCallback != null) {
+                mExitSecureCallback.onKeyguardExitResult(authenticated);
+                mExitSecureCallback = null;
+
+                if (authenticated) {
+                    // after succesfully exiting securely, no need to reshow
+                    // the keyguard when they've released the lock
+                    mExternallyEnabled = true;
+                    mNeedToReshowWhenReenabled = false;
+                }
+            }
+        }
+    }
+
+    /**
+     * {@inheritDoc}
+     *
+     * @see #handleKeyguardDoneDrawing
+     */
+    public void keyguardDoneDrawing() {
+        mHandler.sendEmptyMessage(KEYGUARD_DONE_DRAWING);
+    }
+
+    /**
+     * This handler will be associated with the policy thread, which will also
+     * be the UI thread of the keyguard.  Since the apis of the policy, and therefore
+     * this class, can be called by other threads, any action that directly
+     * interacts with the keyguard ui should be posted to this handler, rather
+     * than called directly.
+     */
+    private Handler mHandler = new Handler() {
+        @Override
+        public void handleMessage(Message msg) {
+            switch (msg.what) {
+                case TIMEOUT:
+                    handleTimeout(msg.arg1);
+                    return ;
+                case SHOW:
+                    handleShow();
+                    return ;
+                case HIDE:
+                    handleHide();
+                    return ;
+                case RESET:
+                    handleReset();
+                    return ;
+                case VERIFY_UNLOCK:
+                    handleVerifyUnlock();
+                    return;
+                case NOTIFY_SCREEN_OFF:
+                    handleNotifyScreenOff();
+                    return;
+                case NOTIFY_SCREEN_ON:
+                    handleNotifyScreenOn();
+                    return;
+                case WAKE_WHEN_READY:
+                    handleWakeWhenReady(msg.arg1);
+                    return;
+                case KEYGUARD_DONE:
+                    handleKeyguardDone(msg.arg1 != 0);
+                    return;
+                case KEYGUARD_DONE_DRAWING:
+                    handleKeyguardDoneDrawing();
+                    return;
+                case KEYGUARD_DONE_AUTHENTICATING:
+                    keyguardDone(true);
+                    return;
+                case SET_HIDDEN:
+                    handleSetHidden(msg.arg1 != 0);
+                    break;
+                case KEYGUARD_TIMEOUT:
+                    doKeyguard();
+                    break;
+            }
+        }
+    };
+
+    /**
+     * @see #keyguardDone
+     * @see #KEYGUARD_DONE
+     */
+    private void handleKeyguardDone(boolean wakeup) {
+        if (DEBUG) Log.d(TAG, "handleKeyguardDone");
+        handleHide();
+        if (wakeup) {
+            mPM.userActivity(SystemClock.uptimeMillis(), true);
+        }
+        mWakeLock.release();
+        mContext.sendBroadcast(mUserPresentIntent);
+    }
+
+    /**
+     * @see #keyguardDoneDrawing
+     * @see #KEYGUARD_DONE_DRAWING
+     */
+    private void handleKeyguardDoneDrawing() {
+        synchronized(this) {
+            if (false) Log.d(TAG, "handleKeyguardDoneDrawing");
+            if (mWaitingUntilKeyguardVisible) {
+                if (DEBUG) Log.d(TAG, "handleKeyguardDoneDrawing: notifying mWaitingUntilKeyguardVisible");
+                mWaitingUntilKeyguardVisible = false;
+                notifyAll();
+
+                // there will usually be two of these sent, one as a timeout, and one
+                // as a result of the callback, so remove any remaining messages from
+                // the queue
+                mHandler.removeMessages(KEYGUARD_DONE_DRAWING);
+            }
+        }
+    }
+
+    /**
+     * Handles the message sent by {@link #pokeWakelock}
+     * @param seq used to determine if anything has changed since the message
+     *   was sent.
+     * @see #TIMEOUT
+     */
+    private void handleTimeout(int seq) {
+        synchronized (KeyguardViewMediator.this) {
+            if (DEBUG) Log.d(TAG, "handleTimeout");
+            if (seq == mWakelockSequence) {
+                mWakeLock.release();
+            }
+        }
+    }
+
+    private void playSounds(boolean locked) {
+        // User feedback for keyguard.
+
+        if (mSuppressNextLockSound) {
+            mSuppressNextLockSound = false;
+            return;
+        }
+
+        final ContentResolver cr = mContext.getContentResolver();
+        if (Settings.System.getInt(cr, Settings.System.LOCKSCREEN_SOUNDS_ENABLED, 1) == 1)
+        {
+            final String whichSound = locked
+                ? Settings.System.LOCK_SOUND
+                : Settings.System.UNLOCK_SOUND;
+            final String soundPath = Settings.System.getString(cr, whichSound);
+            if (soundPath != null) {
+                final Uri soundUri = Uri.parse("file://" + soundPath);
+                if (soundUri != null) {
+                    final Ringtone sfx = RingtoneManager.getRingtone(mContext, soundUri);
+                    if (sfx != null) {
+                        sfx.setStreamType(AudioManager.STREAM_SYSTEM);
+                        sfx.play();
+                    } else {
+                        Log.d(TAG, "playSounds: failed to load ringtone from uri: " + soundUri);
+                    }
+                } else {
+                    Log.d(TAG, "playSounds: could not parse Uri: " + soundPath);
+                }
+            } else {
+                Log.d(TAG, "playSounds: whichSound = " + whichSound + "; soundPath was null");
+            }
+        }
+    }        
+
+    /**
+     * Handle message sent by {@link #showLocked}.
+     * @see #SHOW
+     */
+    private void handleShow() {
+        synchronized (KeyguardViewMediator.this) {
+            if (DEBUG) Log.d(TAG, "handleShow");
+            if (!mSystemReady) return;
+
+            playSounds(true);
+
+            mKeyguardViewManager.show();
+            mShowing = true;
+            adjustUserActivityLocked();
+            adjustStatusBarLocked();
+            try {
+                ActivityManagerNative.getDefault().closeSystemDialogs("lock");
+            } catch (RemoteException e) {
+            }
+            mShowKeyguardWakeLock.release();
+        }
+    }
+
+    /**
+     * Handle message sent by {@link #hideLocked()}
+     * @see #HIDE
+     */
+    private void handleHide() {
+        synchronized (KeyguardViewMediator.this) {
+            if (DEBUG) Log.d(TAG, "handleHide");
+            if (mWakeAndHandOff.isHeld()) {
+                Log.w(TAG, "attempt to hide the keyguard while waking, ignored");
+                return;
+            }
+
+            // only play "unlock" noises if not on a call (since the incall UI
+            // disables the keyguard)
+            if (TelephonyManager.EXTRA_STATE_IDLE.equals(mPhoneState)) {
+                playSounds(false);
+            }
+
+            mKeyguardViewManager.hide();
+            mShowing = false;
+            adjustUserActivityLocked();
+            adjustStatusBarLocked();
+        }
+    }
+
+    private void adjustUserActivityLocked() {
+        // disable user activity if we are shown and not hidden
+        if (DEBUG) Log.d(TAG, "adjustUserActivityLocked mShowing: " + mShowing + " mHidden: " + mHidden);
+        boolean enabled = !mShowing || mHidden;
+        mRealPowerManager.enableUserActivity(enabled);
+        if (!enabled && mScreenOn) {
+            // reinstate our short screen timeout policy
+            pokeWakelock();
+        }
+    }
+
+    private void adjustStatusBarLocked() {
+        if (mStatusBarManager == null) {
+            mStatusBarManager = (StatusBarManager)
+                    mContext.getSystemService(Context.STATUS_BAR_SERVICE);
+        }
+        if (mStatusBarManager == null) {
+            Log.w(TAG, "Could not get status bar manager");
+        } else {
+            if (mShowLockIcon) {
+                // Give feedback to user when secure keyguard is active and engaged
+                if (mShowing && isSecure()) {
+                    if (!mShowingLockIcon) {
+                        mStatusBarManager.setIcon("secure",
+                                com.android.internal.R.drawable.stat_sys_secure, 0);
+                        mShowingLockIcon = true;
+                    }
+                } else {
+                    if (mShowingLockIcon) {
+                        mStatusBarManager.removeIcon("secure");
+                        mShowingLockIcon = false;
+                    }
+                }
+            }
+
+            // if the keyguard is shown, allow the status bar to open
+            // only if the keyguard is insecure and is covered by another window
+            boolean enable = !mShowing || (mHidden && !isSecure());
+            mStatusBarManager.disable(enable ?
+                         StatusBarManager.DISABLE_NONE :
+                         StatusBarManager.DISABLE_EXPAND);
+        }
+    }
+
+    /**
+     * Handle message sent by {@link #wakeWhenReadyLocked(int)}
+     * @param keyCode The key that woke the device.
+     * @see #WAKE_WHEN_READY
+     */
+    private void handleWakeWhenReady(int keyCode) {
+        synchronized (KeyguardViewMediator.this) {
+            if (DBG_WAKE) Log.d(TAG, "handleWakeWhenReady(" + keyCode + ")");
+
+            // this should result in a call to 'poke wakelock' which will set a timeout
+            // on releasing the wakelock
+            if (!mKeyguardViewManager.wakeWhenReadyTq(keyCode)) {
+                // poke wakelock ourselves if keyguard is no longer active
+                Log.w(TAG, "mKeyguardViewManager.wakeWhenReadyTq did not poke wake lock, so poke it ourselves");
+                pokeWakelock();
+            }
+
+            /**
+             * Now that the keyguard is ready and has poked the wake lock, we can
+             * release the handoff wakelock
+             */
+            mWakeAndHandOff.release();
+
+            if (!mWakeLock.isHeld()) {
+                Log.w(TAG, "mWakeLock not held in mKeyguardViewManager.wakeWhenReadyTq");
+            }
+        }
+    }
+
+    /**
+     * Handle message sent by {@link #resetStateLocked()}
+     * @see #RESET
+     */
+    private void handleReset() {
+        synchronized (KeyguardViewMediator.this) {
+            if (DEBUG) Log.d(TAG, "handleReset");
+            mKeyguardViewManager.reset();
+        }
+    }
+
+    /**
+     * Handle message sent by {@link #verifyUnlock}
+     * @see #RESET
+     */
+    private void handleVerifyUnlock() {
+        synchronized (KeyguardViewMediator.this) {
+            if (DEBUG) Log.d(TAG, "handleVerifyUnlock");
+            mKeyguardViewManager.verifyUnlock();
+            mShowing = true;
+        }
+    }
+
+    /**
+     * Handle message sent by {@link #notifyScreenOffLocked()}
+     * @see #NOTIFY_SCREEN_OFF
+     */
+    private void handleNotifyScreenOff() {
+        synchronized (KeyguardViewMediator.this) {
+            if (DEBUG) Log.d(TAG, "handleNotifyScreenOff");
+            mKeyguardViewManager.onScreenTurnedOff();
+        }
+    }
+
+    /**
+     * Handle message sent by {@link #notifyScreenOnLocked()}
+     * @see #NOTIFY_SCREEN_ON
+     */
+    private void handleNotifyScreenOn() {
+        synchronized (KeyguardViewMediator.this) {
+            if (DEBUG) Log.d(TAG, "handleNotifyScreenOn");
+            mKeyguardViewManager.onScreenTurnedOn();
+        }
+    }
+}
+
+
diff --git a/policy/src/com/android/internal/policy/impl/KeyguardViewProperties.java b/policy/src/com/android/internal/policy/impl/KeyguardViewProperties.java
new file mode 100644
index 0000000..bda08eb
--- /dev/null
+++ b/policy/src/com/android/internal/policy/impl/KeyguardViewProperties.java
@@ -0,0 +1,46 @@
+/*
+ * Copyright (C) 2008 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.android.internal.policy.impl;
+
+import android.content.Context;
+
+/**
+ * Defines operations necessary for showing a keyguard, including how to create
+ * it, and various properties that are useful to be able to query independant
+ * of whether the keyguard instance is around or not.
+ */
+public interface KeyguardViewProperties {
+    
+    /**
+     * Create a keyguard view.
+     * @param context the context to use when creating the view.
+     * @param updateMonitor configuration may be based on this.
+     * @param controller for talking back with the containing window.
+     * @return the view.
+     */
+    KeyguardViewBase createKeyguardView(Context context,
+            KeyguardUpdateMonitor updateMonitor,
+            KeyguardWindowController controller);
+
+    /**
+     * Would the keyguard be secure right now?
+     * @return Whether the keyguard is currently secure, meaning it will block
+     *   the user from getting past it until the user enters some sort of PIN.
+     */
+    boolean isSecure();
+
+}
diff --git a/policy/src/com/android/internal/policy/impl/KeyguardWindowController.java b/policy/src/com/android/internal/policy/impl/KeyguardWindowController.java
new file mode 100644
index 0000000..4ad48fb
--- /dev/null
+++ b/policy/src/com/android/internal/policy/impl/KeyguardWindowController.java
@@ -0,0 +1,29 @@
+/*
+ * Copyright (C) 2009 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.android.internal.policy.impl;
+
+/**
+ * Interface passed to the keyguard view, for it to call up to control
+ * its containing window.
+ */
+public interface KeyguardWindowController {
+    /**
+     * Control whether the window needs input -- that is if it has
+     * text fields and thus should allow input method interaction.
+     */
+    void setNeedsInput(boolean needsInput);
+}
diff --git a/policy/src/com/android/internal/policy/impl/LockPatternKeyguardView.java b/policy/src/com/android/internal/policy/impl/LockPatternKeyguardView.java
new file mode 100644
index 0000000..27706ef
--- /dev/null
+++ b/policy/src/com/android/internal/policy/impl/LockPatternKeyguardView.java
@@ -0,0 +1,790 @@
+/*
+ * Copyright (C) 2007 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.android.internal.policy.impl;
+
+import com.android.internal.R;
+import com.android.internal.telephony.IccCard;
+import com.android.internal.widget.LockPatternUtils;
+
+import android.accounts.Account;
+import android.accounts.AccountManager;
+import android.accounts.AccountManagerCallback;
+import android.accounts.AccountManagerFuture;
+import android.accounts.AuthenticatorException;
+import android.accounts.OperationCanceledException;
+import android.app.AlertDialog;
+import android.app.admin.DevicePolicyManager;
+import android.content.Context;
+import android.content.Intent;
+import android.content.res.Configuration;
+import android.graphics.Bitmap;
+import android.graphics.Canvas;
+import android.graphics.ColorFilter;
+import android.graphics.PixelFormat;
+import android.graphics.drawable.Drawable;
+import android.os.Bundle;
+import android.os.SystemClock;
+import android.os.SystemProperties;
+import android.telephony.TelephonyManager;
+import android.text.TextUtils;
+import android.util.Log;
+import android.view.KeyEvent;
+import android.view.View;
+import android.view.WindowManager;
+
+import java.io.IOException;
+
+/**
+ * The host view for all of the screens of the pattern unlock screen.  There are
+ * two {@link Mode}s of operation, lock and unlock.  This will show the appropriate
+ * screen, and listen for callbacks via
+ * {@link com.android.internal.policy.impl.KeyguardScreenCallback}
+ * from the current screen.
+ *
+ * This view, in turn, communicates back to
+ * {@link com.android.internal.policy.impl.KeyguardViewManager}
+ * via its {@link com.android.internal.policy.impl.KeyguardViewCallback}, as appropriate.
+ */
+public class LockPatternKeyguardView extends KeyguardViewBase {
+
+    static final boolean DEBUG_CONFIGURATION = false;
+
+    // time after launching EmergencyDialer before the screen goes blank.
+    private static final int EMERGENCY_CALL_TIMEOUT = 10000;
+
+    // intent action for launching emergency dialer activity.
+    static final String ACTION_EMERGENCY_DIAL = "com.android.phone.EmergencyDialer.DIAL";
+
+    private static final boolean DEBUG = false;
+    private static final String TAG = "LockPatternKeyguardView";
+
+    private final KeyguardUpdateMonitor mUpdateMonitor;
+    private final KeyguardWindowController mWindowController;
+
+    private View mLockScreen;
+    private View mUnlockScreen;
+
+    private boolean mScreenOn = false;
+    private boolean mEnableFallback = false; // assume no fallback UI until we know better
+
+    /**
+     * The current {@link KeyguardScreen} will use this to communicate back to us.
+     */
+    KeyguardScreenCallback mKeyguardScreenCallback;
+
+
+    private boolean mRequiresSim;
+
+
+    /**
+     * Either a lock screen (an informational keyguard screen), or an unlock
+     * screen (a means for unlocking the device) is shown at any given time.
+     */
+    enum Mode {
+        LockScreen,
+        UnlockScreen
+    }
+
+    /**
+     * The different types screens available for {@link Mode#UnlockScreen}.
+     * @see com.android.internal.policy.impl.LockPatternKeyguardView#getUnlockMode()
+     */
+    enum UnlockMode {
+
+        /**
+         * Unlock by drawing a pattern.
+         */
+        Pattern,
+
+        /**
+         * Unlock by entering a sim pin.
+         */
+        SimPin,
+
+        /**
+         * Unlock by entering an account's login and password.
+         */
+        Account,
+
+        /**
+         * Unlock by entering a password or PIN
+         */
+        Password,
+
+        /**
+         * Unknown (uninitialized) value
+         */
+        Unknown
+    }
+
+    /**
+     * The current mode.
+     */
+    private Mode mMode = Mode.LockScreen;
+
+    /**
+     * Keeps track of what mode the current unlock screen is (cached from most recent computation in
+     * {@link #getUnlockMode}).
+     */
+    private UnlockMode mUnlockScreenMode;
+
+    private boolean mForgotPattern;
+
+    /**
+     * If true, it means we are in the process of verifying that the user
+     * can get past the lock screen per {@link #verifyUnlock()}
+     */
+    private boolean mIsVerifyUnlockOnly = false;
+
+
+    /**
+     * Used to lookup the state of the lock pattern
+     */
+    private final LockPatternUtils mLockPatternUtils;
+
+    private UnlockMode mCurrentUnlockMode = UnlockMode.Unknown;
+
+    /**
+     * The current configuration.
+     */
+    private Configuration mConfiguration;
+
+    /**
+     * @return Whether we are stuck on the lock screen because the sim is
+     *   missing.
+     */
+    private boolean stuckOnLockScreenBecauseSimMissing() {
+        return mRequiresSim
+                && (!mUpdateMonitor.isDeviceProvisioned())
+                && (mUpdateMonitor.getSimState() == IccCard.State.ABSENT);
+    }
+
+    /**
+     * @param context Used to inflate, and create views.
+     * @param updateMonitor Knows the state of the world, and passed along to each
+     *   screen so they can use the knowledge, and also register for callbacks
+     *   on dynamic information.
+     * @param lockPatternUtils Used to look up state of lock pattern.
+     */
+    public LockPatternKeyguardView(
+            Context context,
+            KeyguardUpdateMonitor updateMonitor,
+            LockPatternUtils lockPatternUtils,
+            KeyguardWindowController controller) {
+        super(context);
+
+        mConfiguration = context.getResources().getConfiguration();
+        mEnableFallback = false;
+
+        mRequiresSim =
+                TextUtils.isEmpty(SystemProperties.get("keyguard.no_require_sim"));
+
+        mUpdateMonitor = updateMonitor;
+        mLockPatternUtils = lockPatternUtils;
+        mWindowController = controller;
+
+        mMode = getInitialMode();
+
+        mKeyguardScreenCallback = new KeyguardScreenCallback() {
+
+            public void goToLockScreen() {
+                mForgotPattern = false;
+                if (mIsVerifyUnlockOnly) {
+                    // navigating away from unlock screen during verify mode means
+                    // we are done and the user failed to authenticate.
+                    mIsVerifyUnlockOnly = false;
+                    getCallback().keyguardDone(false);
+                } else {
+                    updateScreen(Mode.LockScreen);
+                }
+            }
+
+            public void goToUnlockScreen() {
+                final IccCard.State simState = mUpdateMonitor.getSimState();
+                if (stuckOnLockScreenBecauseSimMissing()
+                         || (simState == IccCard.State.PUK_REQUIRED)){
+                    // stuck on lock screen when sim missing or puk'd
+                    return;
+                }
+                if (!isSecure()) {
+                    getCallback().keyguardDone(true);
+                } else {
+                    updateScreen(Mode.UnlockScreen);
+                }
+            }
+
+            public void forgotPattern(boolean isForgotten) {
+                if (mEnableFallback) {
+                    mForgotPattern = isForgotten;
+                    updateScreen(Mode.UnlockScreen);
+                }
+            }
+
+            public boolean isSecure() {
+                return LockPatternKeyguardView.this.isSecure();
+            }
+
+            public boolean isVerifyUnlockOnly() {
+                return mIsVerifyUnlockOnly;
+            }
+
+            public void recreateMe(Configuration config) {
+                mConfiguration = config;
+                recreateScreens();
+            }
+
+            public void takeEmergencyCallAction() {
+                pokeWakelock(EMERGENCY_CALL_TIMEOUT);
+                if (TelephonyManager.getDefault().getCallState()
+                        == TelephonyManager.CALL_STATE_OFFHOOK) {
+                    mLockPatternUtils.resumeCall();
+                } else {
+                    Intent intent = new Intent(ACTION_EMERGENCY_DIAL);
+                    intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK
+                            | Intent.FLAG_ACTIVITY_EXCLUDE_FROM_RECENTS);
+                    getContext().startActivity(intent);
+                }
+            }
+
+            public void pokeWakelock() {
+                getCallback().pokeWakelock();
+            }
+
+            public void pokeWakelock(int millis) {
+                getCallback().pokeWakelock(millis);
+            }
+
+            public void keyguardDone(boolean authenticated) {
+                getCallback().keyguardDone(authenticated);
+            }
+
+            public void keyguardDoneDrawing() {
+                // irrelevant to keyguard screen, they shouldn't be calling this
+            }
+
+            public void reportFailedUnlockAttempt() {
+                mUpdateMonitor.reportFailedAttempt();
+                final int failedAttempts = mUpdateMonitor.getFailedAttempts();
+                if (DEBUG) Log.d(TAG,
+                    "reportFailedPatternAttempt: #" + failedAttempts +
+                    " (enableFallback=" + mEnableFallback + ")");
+                final boolean usingLockPattern = mLockPatternUtils.getKeyguardStoredPasswordQuality()
+                        == DevicePolicyManager.PASSWORD_QUALITY_SOMETHING;
+                if (usingLockPattern && mEnableFallback && failedAttempts ==
+                        (LockPatternUtils.FAILED_ATTEMPTS_BEFORE_RESET
+                                - LockPatternUtils.FAILED_ATTEMPTS_BEFORE_TIMEOUT)) {
+                    showAlmostAtAccountLoginDialog();
+                } else if (usingLockPattern && mEnableFallback
+                        && failedAttempts >= LockPatternUtils.FAILED_ATTEMPTS_BEFORE_RESET) {
+                    mLockPatternUtils.setPermanentlyLocked(true);
+                    updateScreen(mMode);
+                } else if ((failedAttempts % LockPatternUtils.FAILED_ATTEMPTS_BEFORE_TIMEOUT)
+                        == 0) {
+                    showTimeoutDialog();
+                }
+                mLockPatternUtils.reportFailedPasswordAttempt();
+            }
+
+            public boolean doesFallbackUnlockScreenExist() {
+                return mEnableFallback;
+            }
+
+            public void reportSuccessfulUnlockAttempt() {
+                mLockPatternUtils.reportSuccessfulPasswordAttempt();
+            }
+        };
+
+        /**
+         * We'll get key events the current screen doesn't use. see
+         * {@link KeyguardViewBase#onKeyDown(int, android.view.KeyEvent)}
+         */
+        setFocusableInTouchMode(true);
+        setDescendantFocusability(FOCUS_AFTER_DESCENDANTS);
+
+        // create both the lock and unlock screen so they are quickly available
+        // when the screen turns on
+        mLockScreen = createLockScreen();
+        addView(mLockScreen);
+        final UnlockMode unlockMode = getUnlockMode();
+        if (DEBUG) Log.d(TAG,
+            "LockPatternKeyguardView ctor: about to createUnlockScreenFor; mEnableFallback="
+            + mEnableFallback);
+        mUnlockScreen = createUnlockScreenFor(unlockMode);
+        mUnlockScreenMode = unlockMode;
+
+        maybeEnableFallback(context);
+
+        addView(mUnlockScreen);
+        updateScreen(mMode);
+    }
+
+    private class AccountAnalyzer implements AccountManagerCallback<Bundle> {
+        private final AccountManager mAccountManager;
+        private final Account[] mAccounts;
+        private int mAccountIndex;
+
+        private AccountAnalyzer(AccountManager accountManager) {
+            mAccountManager = accountManager;
+            mAccounts = accountManager.getAccountsByType("com.google");
+        }
+
+        private void next() {
+            // if we are ready to enable the fallback or if we depleted the list of accounts
+            // then finish and get out
+            if (mEnableFallback || mAccountIndex >= mAccounts.length) {
+                if (mUnlockScreen == null) {
+                    Log.w(TAG, "no unlock screen when trying to enable fallback");
+                } else if (mUnlockScreen instanceof PatternUnlockScreen) {
+                    ((PatternUnlockScreen)mUnlockScreen).setEnableFallback(mEnableFallback);
+                }
+                return;
+            }
+
+            // lookup the confirmCredentials intent for the current account
+            mAccountManager.confirmCredentials(mAccounts[mAccountIndex], null, null, this, null);
+        }
+
+        public void start() {
+            mEnableFallback = false;
+            mAccountIndex = 0;
+            next();
+        }
+
+        public void run(AccountManagerFuture<Bundle> future) {
+            try {
+                Bundle result = future.getResult();
+                if (result.getParcelable(AccountManager.KEY_INTENT) != null) {
+                    mEnableFallback = true;
+                }
+            } catch (OperationCanceledException e) {
+                // just skip the account if we are unable to query it
+            } catch (IOException e) {
+                // just skip the account if we are unable to query it
+            } catch (AuthenticatorException e) {
+                // just skip the account if we are unable to query it
+            } finally {
+                mAccountIndex++;
+                next();
+            }
+        }
+    }
+
+    private void maybeEnableFallback(Context context) {
+        // Ask the account manager if we have an account that can be used as a
+        // fallback in case the user forgets his pattern.
+        AccountAnalyzer accountAnalyzer = new AccountAnalyzer(AccountManager.get(context));
+        accountAnalyzer.start();
+    }
+
+
+    // TODO:
+    // This overloaded method was added to workaround a race condition in the framework between
+    // notification for orientation changed, layout() and switching resources.  This code attempts
+    // to avoid drawing the incorrect layout while things are in transition.  The method can just
+    // be removed once the race condition is fixed. See bugs 2262578 and 2292713.
+    @Override
+    protected void dispatchDraw(Canvas canvas) {
+        if (DEBUG) Log.v(TAG, "*** dispatchDraw() time: " + SystemClock.elapsedRealtime());
+        super.dispatchDraw(canvas);
+    }
+
+    @Override
+    public void reset() {
+        mIsVerifyUnlockOnly = false;
+        mForgotPattern = false;
+        updateScreen(getInitialMode());
+    }
+
+    @Override
+    public void onScreenTurnedOff() {
+        mScreenOn = false;
+        mForgotPattern = false;
+        if (mMode == Mode.LockScreen) {
+           ((KeyguardScreen) mLockScreen).onPause();
+        } else {
+            ((KeyguardScreen) mUnlockScreen).onPause();
+        }
+    }
+
+    @Override
+    public void onScreenTurnedOn() {
+        mScreenOn = true;
+        if (mMode == Mode.LockScreen) {
+           ((KeyguardScreen) mLockScreen).onResume();
+        } else {
+            ((KeyguardScreen) mUnlockScreen).onResume();
+        }
+    }
+
+    private void recreateLockScreen() {
+        if (mLockScreen.getVisibility() == View.VISIBLE) {
+            ((KeyguardScreen) mLockScreen).onPause();
+        }
+        ((KeyguardScreen) mLockScreen).cleanUp();
+        removeView(mLockScreen);
+
+        mLockScreen = createLockScreen();
+        mLockScreen.setVisibility(View.INVISIBLE);
+        addView(mLockScreen);
+    }
+
+    private void recreateUnlockScreen() {
+        if (mUnlockScreen.getVisibility() == View.VISIBLE) {
+            ((KeyguardScreen) mUnlockScreen).onPause();
+        }
+        ((KeyguardScreen) mUnlockScreen).cleanUp();
+        removeView(mUnlockScreen);
+
+        final UnlockMode unlockMode = getUnlockMode();
+        mUnlockScreen = createUnlockScreenFor(unlockMode);
+        mUnlockScreen.setVisibility(View.INVISIBLE);
+        mUnlockScreenMode = unlockMode;
+        addView(mUnlockScreen);
+    }
+
+    private void recreateScreens() {
+        recreateLockScreen();
+        recreateUnlockScreen();
+        updateScreen(mMode);
+    }
+
+    @Override
+    public void wakeWhenReadyTq(int keyCode) {
+        if (DEBUG) Log.d(TAG, "onWakeKey");
+        if (keyCode == KeyEvent.KEYCODE_MENU && isSecure() && (mMode == Mode.LockScreen)
+                && (mUpdateMonitor.getSimState() != IccCard.State.PUK_REQUIRED)) {
+            if (DEBUG) Log.d(TAG, "switching screens to unlock screen because wake key was MENU");
+            updateScreen(Mode.UnlockScreen);
+            getCallback().pokeWakelock();
+        } else {
+            if (DEBUG) Log.d(TAG, "poking wake lock immediately");
+            getCallback().pokeWakelock();
+        }
+    }
+
+    @Override
+    public void verifyUnlock() {
+        if (!isSecure()) {
+            // non-secure keyguard screens are successfull by default
+            getCallback().keyguardDone(true);
+        } else if (mUnlockScreenMode != UnlockMode.Pattern) {
+            // can only verify unlock when in pattern mode
+            getCallback().keyguardDone(false);
+        } else {
+            // otherwise, go to the unlock screen, see if they can verify it
+            mIsVerifyUnlockOnly = true;
+            updateScreen(Mode.UnlockScreen);
+        }
+    }
+
+    @Override
+    public void cleanUp() {
+        ((KeyguardScreen) mLockScreen).onPause();
+        ((KeyguardScreen) mLockScreen).cleanUp();
+        ((KeyguardScreen) mUnlockScreen).onPause();
+        ((KeyguardScreen) mUnlockScreen).cleanUp();
+    }
+
+    private boolean isSecure() {
+        UnlockMode unlockMode = getUnlockMode();
+        boolean secure = false;
+        switch (unlockMode) {
+            case Pattern:
+                secure = mLockPatternUtils.isLockPatternEnabled();
+                break;
+            case SimPin:
+                secure = mUpdateMonitor.getSimState() == IccCard.State.PIN_REQUIRED
+                            || mUpdateMonitor.getSimState() == IccCard.State.PUK_REQUIRED;
+                break;
+            case Account:
+                secure = true;
+                break;
+            case Password:
+                secure = mLockPatternUtils.isLockPasswordEnabled();
+                break;
+            default:
+                throw new IllegalStateException("unknown unlock mode " + unlockMode);
+        }
+        return secure;
+    }
+
+    private void updateScreen(final Mode mode) {
+
+        if (DEBUG_CONFIGURATION) Log.v(TAG, "**** UPDATE SCREEN: mode=" + mode
+                + " last mode=" + mMode, new RuntimeException());
+
+        mMode = mode;
+
+        // Re-create the unlock screen if necessary. This is primarily required to properly handle
+        // SIM state changes. This typically happens when this method is called by reset()
+        if (mode == Mode.UnlockScreen && mCurrentUnlockMode != getUnlockMode()) {
+            recreateUnlockScreen();
+        }
+
+        final View goneScreen = (mode == Mode.LockScreen) ? mUnlockScreen : mLockScreen;
+        final View visibleScreen = (mode == Mode.LockScreen) ? mLockScreen : mUnlockScreen;
+
+        // do this before changing visibility so focus isn't requested before the input
+        // flag is set
+        mWindowController.setNeedsInput(((KeyguardScreen)visibleScreen).needsInput());
+
+        if (DEBUG_CONFIGURATION) {
+            Log.v(TAG, "Gone=" + goneScreen);
+            Log.v(TAG, "Visible=" + visibleScreen);
+        }
+
+        if (mScreenOn) {
+            if (goneScreen.getVisibility() == View.VISIBLE) {
+                ((KeyguardScreen) goneScreen).onPause();
+            }
+            if (visibleScreen.getVisibility() != View.VISIBLE) {
+                ((KeyguardScreen) visibleScreen).onResume();
+            }
+        }
+
+        goneScreen.setVisibility(View.GONE);
+        visibleScreen.setVisibility(View.VISIBLE);
+        requestLayout();
+
+        if (!visibleScreen.requestFocus()) {
+            throw new IllegalStateException("keyguard screen must be able to take "
+                    + "focus when shown " + visibleScreen.getClass().getCanonicalName());
+        }
+    }
+
+    View createLockScreen() {
+        return new LockScreen(
+                mContext,
+                mConfiguration,
+                mLockPatternUtils,
+                mUpdateMonitor,
+                mKeyguardScreenCallback);
+    }
+
+    View createUnlockScreenFor(UnlockMode unlockMode) {
+        View unlockView = null;
+        if (unlockMode == UnlockMode.Pattern) {
+            PatternUnlockScreen view = new PatternUnlockScreen(
+                    mContext,
+                    mConfiguration,
+                    mLockPatternUtils,
+                    mUpdateMonitor,
+                    mKeyguardScreenCallback,
+                    mUpdateMonitor.getFailedAttempts());
+            if (DEBUG) Log.d(TAG,
+                "createUnlockScreenFor(" + unlockMode + "): mEnableFallback=" + mEnableFallback);
+            view.setEnableFallback(mEnableFallback);
+            unlockView = view;
+        } else if (unlockMode == UnlockMode.SimPin) {
+            unlockView = new SimUnlockScreen(
+                    mContext,
+                    mConfiguration,
+                    mUpdateMonitor,
+                    mKeyguardScreenCallback,
+                    mLockPatternUtils);
+        } else if (unlockMode == UnlockMode.Account) {
+            try {
+                unlockView = new AccountUnlockScreen(
+                        mContext,
+                        mConfiguration,
+                        mUpdateMonitor,
+                        mKeyguardScreenCallback,
+                        mLockPatternUtils);
+            } catch (IllegalStateException e) {
+                Log.i(TAG, "Couldn't instantiate AccountUnlockScreen"
+                      + " (IAccountsService isn't available)");
+                // TODO: Need a more general way to provide a
+                // platform-specific fallback UI here.
+                // For now, if we can't display the account login
+                // unlock UI, just bring back the regular "Pattern" unlock mode.
+
+                // (We do this by simply returning a regular UnlockScreen
+                // here.  This means that the user will still see the
+                // regular pattern unlock UI, regardless of the value of
+                // mUnlockScreenMode or whether or not we're in the
+                // "permanently locked" state.)
+                unlockView = createUnlockScreenFor(UnlockMode.Pattern);
+            }
+        } else if (unlockMode == UnlockMode.Password) {
+            unlockView = new PasswordUnlockScreen(
+                    mContext,
+                    mConfiguration,
+                    mLockPatternUtils,
+                    mUpdateMonitor,
+                    mKeyguardScreenCallback);
+        } else {
+            throw new IllegalArgumentException("unknown unlock mode " + unlockMode);
+        }
+        mCurrentUnlockMode = unlockMode;
+        return unlockView;
+    }
+
+    /**
+     * Given the current state of things, what should be the initial mode of
+     * the lock screen (lock or unlock).
+     */
+    private Mode getInitialMode() {
+        final IccCard.State simState = mUpdateMonitor.getSimState();
+        if (stuckOnLockScreenBecauseSimMissing() || (simState == IccCard.State.PUK_REQUIRED)) {
+            return Mode.LockScreen;
+        } else {
+            // Show LockScreen first for any screen other than Pattern unlock.
+            final boolean usingLockPattern = mLockPatternUtils.getKeyguardStoredPasswordQuality()
+                    == DevicePolicyManager.PASSWORD_QUALITY_SOMETHING;
+            if (isSecure() && usingLockPattern) {
+                return Mode.UnlockScreen;
+            } else {
+                return Mode.LockScreen;
+            }
+        }
+    }
+
+    /**
+     * Given the current state of things, what should the unlock screen be?
+     */
+    private UnlockMode getUnlockMode() {
+        final IccCard.State simState = mUpdateMonitor.getSimState();
+        UnlockMode currentMode;
+        if (simState == IccCard.State.PIN_REQUIRED || simState == IccCard.State.PUK_REQUIRED) {
+            currentMode = UnlockMode.SimPin;
+        } else {
+            final int mode = mLockPatternUtils.getKeyguardStoredPasswordQuality();
+            switch (mode) {
+                case DevicePolicyManager.PASSWORD_QUALITY_NUMERIC:
+                case DevicePolicyManager.PASSWORD_QUALITY_ALPHABETIC:
+                case DevicePolicyManager.PASSWORD_QUALITY_ALPHANUMERIC:
+                    currentMode = UnlockMode.Password;
+                    break;
+                case DevicePolicyManager.PASSWORD_QUALITY_SOMETHING:
+                case DevicePolicyManager.PASSWORD_QUALITY_UNSPECIFIED:
+                    // "forgot pattern" button is only available in the pattern mode...
+                    if (mForgotPattern || mLockPatternUtils.isPermanentlyLocked()) {
+                        currentMode = UnlockMode.Account;
+                    } else {
+                        currentMode = UnlockMode.Pattern;
+                    }
+                    break;
+                default:
+                   throw new IllegalStateException("Unknown unlock mode:" + mode);
+            }
+        }
+        return currentMode;
+    }
+
+    private void showTimeoutDialog() {
+        int timeoutInSeconds = (int) LockPatternUtils.FAILED_ATTEMPT_TIMEOUT_MS / 1000;
+        String message = mContext.getString(
+                R.string.lockscreen_too_many_failed_attempts_dialog_message,
+                mUpdateMonitor.getFailedAttempts(),
+                timeoutInSeconds);
+        final AlertDialog dialog = new AlertDialog.Builder(mContext)
+                .setTitle(null)
+                .setMessage(message)
+                .setNeutralButton(R.string.ok, null)
+                .create();
+        dialog.getWindow().setType(WindowManager.LayoutParams.TYPE_KEYGUARD_DIALOG);
+        if (!mContext.getResources().getBoolean(
+                com.android.internal.R.bool.config_sf_slowBlur)) {
+            dialog.getWindow().setFlags(
+                    WindowManager.LayoutParams.FLAG_BLUR_BEHIND,
+                    WindowManager.LayoutParams.FLAG_BLUR_BEHIND);
+        }
+        dialog.show();
+    }
+
+    private void showAlmostAtAccountLoginDialog() {
+        int timeoutInSeconds = (int) LockPatternUtils.FAILED_ATTEMPT_TIMEOUT_MS / 1000;
+        String message = mContext.getString(
+                R.string.lockscreen_failed_attempts_almost_glogin,
+                LockPatternUtils.FAILED_ATTEMPTS_BEFORE_RESET
+                - LockPatternUtils.FAILED_ATTEMPTS_BEFORE_TIMEOUT,
+                LockPatternUtils.FAILED_ATTEMPTS_BEFORE_TIMEOUT,
+                timeoutInSeconds);
+        final AlertDialog dialog = new AlertDialog.Builder(mContext)
+                .setTitle(null)
+                .setMessage(message)
+                .setNeutralButton(R.string.ok, null)
+                .create();
+        dialog.getWindow().setType(WindowManager.LayoutParams.TYPE_KEYGUARD_DIALOG);
+        if (!mContext.getResources().getBoolean(
+                com.android.internal.R.bool.config_sf_slowBlur)) {
+            dialog.getWindow().setFlags(
+                    WindowManager.LayoutParams.FLAG_BLUR_BEHIND,
+                    WindowManager.LayoutParams.FLAG_BLUR_BEHIND);
+        }
+        dialog.show();
+    }
+
+    /**
+     * Used to put wallpaper on the background of the lock screen.  Centers it
+     * Horizontally and pins the bottom (assuming that the lock screen is aligned
+     * with the bottom, so the wallpaper should extend above the top into the
+     * status bar).
+     */
+    static private class FastBitmapDrawable extends Drawable {
+        private Bitmap mBitmap;
+        private int mOpacity;
+
+        private FastBitmapDrawable(Bitmap bitmap) {
+            mBitmap = bitmap;
+            mOpacity = mBitmap.hasAlpha() ? PixelFormat.TRANSLUCENT : PixelFormat.OPAQUE;
+        }
+
+        @Override
+        public void draw(Canvas canvas) {
+            canvas.drawBitmap(
+                    mBitmap,
+                    (getBounds().width() - mBitmap.getWidth()) / 2,
+                    (getBounds().height() - mBitmap.getHeight()),
+                    null);
+        }
+
+        @Override
+        public int getOpacity() {
+            return mOpacity;
+        }
+
+        @Override
+        public void setAlpha(int alpha) {
+        }
+
+        @Override
+        public void setColorFilter(ColorFilter cf) {
+        }
+
+        @Override
+        public int getIntrinsicWidth() {
+            return mBitmap.getWidth();
+        }
+
+        @Override
+        public int getIntrinsicHeight() {
+            return mBitmap.getHeight();
+        }
+
+        @Override
+        public int getMinimumWidth() {
+            return mBitmap.getWidth();
+        }
+
+        @Override
+        public int getMinimumHeight() {
+            return mBitmap.getHeight();
+        }
+    }
+}
+
diff --git a/policy/src/com/android/internal/policy/impl/LockPatternKeyguardViewProperties.java b/policy/src/com/android/internal/policy/impl/LockPatternKeyguardViewProperties.java
new file mode 100644
index 0000000..ed5a058
--- /dev/null
+++ b/policy/src/com/android/internal/policy/impl/LockPatternKeyguardViewProperties.java
@@ -0,0 +1,62 @@
+/*
+ * Copyright (C) 2008 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.android.internal.policy.impl;
+
+import com.android.internal.widget.LockPatternUtils;
+
+import android.content.Context;
+import com.android.internal.telephony.IccCard;
+
+/**
+ * Knows how to create a lock pattern keyguard view, and answer questions about
+ * it (even if it hasn't been created, per the interface specs).
+ */
+public class LockPatternKeyguardViewProperties implements KeyguardViewProperties {
+
+    private final LockPatternUtils mLockPatternUtils;
+    private final KeyguardUpdateMonitor mUpdateMonitor;
+
+    /**
+     * @param lockPatternUtils Used to know whether the pattern enabled, and passed
+     *   onto the keygaurd view when it is created.
+     * @param updateMonitor Used to know whether the sim pin is enabled, and passed
+     *   onto the keyguard view when it is created.
+     */
+    public LockPatternKeyguardViewProperties(LockPatternUtils lockPatternUtils,
+            KeyguardUpdateMonitor updateMonitor) {
+        mLockPatternUtils = lockPatternUtils;
+        mUpdateMonitor = updateMonitor;
+    }
+
+    public KeyguardViewBase createKeyguardView(Context context,
+            KeyguardUpdateMonitor updateMonitor,
+            KeyguardWindowController controller) {
+        return new LockPatternKeyguardView(context, updateMonitor,
+                mLockPatternUtils, controller);
+    }
+
+    public boolean isSecure() {
+        return mLockPatternUtils.isSecure() || isSimPinSecure();
+    }
+
+    private boolean isSimPinSecure() {
+        final IccCard.State simState = mUpdateMonitor.getSimState();
+        return (simState == IccCard.State.PIN_REQUIRED || simState == IccCard.State.PUK_REQUIRED
+            || simState == IccCard.State.ABSENT);
+    }
+
+}
diff --git a/policy/src/com/android/internal/policy/impl/LockScreen.java b/policy/src/com/android/internal/policy/impl/LockScreen.java
new file mode 100644
index 0000000..a5ef1fa
--- /dev/null
+++ b/policy/src/com/android/internal/policy/impl/LockScreen.java
@@ -0,0 +1,681 @@
+/*
+ * Copyright (C) 2008 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.android.internal.policy.impl;
+
+import com.android.internal.R;
+import com.android.internal.telephony.IccCard;
+import com.android.internal.widget.LockPatternUtils;
+import com.android.internal.widget.SlidingTab;
+
+import android.content.Context;
+import android.content.res.Configuration;
+import android.content.res.Resources;
+import android.content.res.ColorStateList;
+import android.text.format.DateFormat;
+import android.view.KeyEvent;
+import android.view.LayoutInflater;
+import android.view.View;
+import android.view.ViewGroup;
+import android.widget.*;
+import android.graphics.drawable.Drawable;
+import android.util.Log;
+import android.media.AudioManager;
+import android.os.SystemClock;
+import android.os.SystemProperties;
+import android.provider.Settings;
+
+import java.util.Date;
+import java.io.File;
+
+/**
+ * The screen within {@link LockPatternKeyguardView} that shows general
+ * information about the device depending on its state, and how to get
+ * past it, as applicable.
+ */
+class LockScreen extends LinearLayout implements KeyguardScreen, KeyguardUpdateMonitor.InfoCallback,
+        KeyguardUpdateMonitor.SimStateCallback, SlidingTab.OnTriggerListener {
+
+    private static final boolean DBG = false;
+    private static final String TAG = "LockScreen";
+    private static final String ENABLE_MENU_KEY_FILE = "/data/local/enable_menu_key";
+
+    private Status mStatus = Status.Normal;
+
+    private final LockPatternUtils mLockPatternUtils;
+    private final KeyguardUpdateMonitor mUpdateMonitor;
+    private final KeyguardScreenCallback mCallback;
+
+    private TextView mCarrier;
+    private SlidingTab mSelector;
+    private TextView mTime;
+    private TextView mDate;
+    private TextView mStatus1;
+    private TextView mStatus2;
+    private TextView mScreenLocked;
+    private TextView mEmergencyCallText;
+    private Button mEmergencyCallButton;
+
+    // current configuration state of keyboard and display
+    private int mKeyboardHidden;
+    private int mCreationOrientation;
+
+    // are we showing battery information?
+    private boolean mShowingBatteryInfo = false;
+
+    // last known plugged in state
+    private boolean mPluggedIn = false;
+
+    // last known battery level
+    private int mBatteryLevel = 100;
+
+    private String mNextAlarm = null;
+    private Drawable mAlarmIcon = null;
+    private String mCharging = null;
+    private Drawable mChargingIcon = null;
+
+    private boolean mSilentMode;
+    private AudioManager mAudioManager;
+    private String mDateFormatString;
+    private java.text.DateFormat mTimeFormat;
+    private boolean mEnableMenuKeyInLockScreen;
+
+    /**
+     * The status of this lock screen.
+     */
+    enum Status {
+        /**
+         * Normal case (sim card present, it's not locked)
+         */
+        Normal(true),
+
+        /**
+         * The sim card is 'network locked'.
+         */
+        NetworkLocked(true),
+
+        /**
+         * The sim card is missing.
+         */
+        SimMissing(false),
+
+        /**
+         * The sim card is missing, and this is the device isn't provisioned, so we don't let
+         * them get past the screen.
+         */
+        SimMissingLocked(false),
+
+        /**
+         * The sim card is PUK locked, meaning they've entered the wrong sim unlock code too many
+         * times.
+         */
+        SimPukLocked(false),
+
+        /**
+         * The sim card is locked.
+         */
+        SimLocked(true);
+
+        private final boolean mShowStatusLines;
+
+        Status(boolean mShowStatusLines) {
+            this.mShowStatusLines = mShowStatusLines;
+        }
+
+        /**
+         * @return Whether the status lines (battery level and / or next alarm) are shown while
+         *         in this state.  Mostly dictated by whether this is room for them.
+         */
+        public boolean showStatusLines() {
+            return mShowStatusLines;
+        }
+    }
+
+    /**
+     * In general, we enable unlocking the insecure key guard with the menu key. However, there are
+     * some cases where we wish to disable it, notably when the menu button placement or technology
+     * is prone to false positives.
+     *
+     * @return true if the menu key should be enabled
+     */
+    private boolean shouldEnableMenuKey() {
+        final Resources res = getResources();
+        final boolean configDisabled = res.getBoolean(R.bool.config_disableMenuKeyInLockScreen);
+        final boolean isMonkey = SystemProperties.getBoolean("ro.monkey", false);
+        final boolean fileOverride = (new File(ENABLE_MENU_KEY_FILE)).exists();
+        return !configDisabled || isMonkey || fileOverride;
+    }
+
+    /**
+     * @param context Used to setup the view.
+     * @param configuration The current configuration. Used to use when selecting layout, etc.
+     * @param lockPatternUtils Used to know the state of the lock pattern settings.
+     * @param updateMonitor Used to register for updates on various keyguard related
+     *    state, and query the initial state at setup.
+     * @param callback Used to communicate back to the host keyguard view.
+     */
+    LockScreen(Context context, Configuration configuration, LockPatternUtils lockPatternUtils,
+            KeyguardUpdateMonitor updateMonitor,
+            KeyguardScreenCallback callback) {
+        super(context);
+        mLockPatternUtils = lockPatternUtils;
+        mUpdateMonitor = updateMonitor;
+        mCallback = callback;
+
+        mEnableMenuKeyInLockScreen = shouldEnableMenuKey();
+
+        mCreationOrientation = configuration.orientation;
+
+        mKeyboardHidden = configuration.hardKeyboardHidden;
+
+        if (LockPatternKeyguardView.DEBUG_CONFIGURATION) {
+            Log.v(TAG, "***** CREATING LOCK SCREEN", new RuntimeException());
+            Log.v(TAG, "Cur orient=" + mCreationOrientation
+                    + " res orient=" + context.getResources().getConfiguration().orientation);
+        }
+
+        final LayoutInflater inflater = LayoutInflater.from(context);
+        if (DBG) Log.v(TAG, "Creation orientation = " + mCreationOrientation);
+        if (mCreationOrientation != Configuration.ORIENTATION_LANDSCAPE) {
+            inflater.inflate(R.layout.keyguard_screen_tab_unlock, this, true);
+        } else {
+            inflater.inflate(R.layout.keyguard_screen_tab_unlock_land, this, true);
+        }
+
+        mCarrier = (TextView) findViewById(R.id.carrier);
+        // Required for Marquee to work
+        mCarrier.setSelected(true);
+        mCarrier.setTextColor(0xffffffff);
+
+        mDate = (TextView) findViewById(R.id.date);
+        mStatus1 = (TextView) findViewById(R.id.status1);
+        mStatus2 = (TextView) findViewById(R.id.status2);
+
+        mScreenLocked = (TextView) findViewById(R.id.screenLocked);
+        mSelector = (SlidingTab) findViewById(R.id.tab_selector);
+        mSelector.setHoldAfterTrigger(true, false);
+        mSelector.setLeftHintText(R.string.lockscreen_unlock_label);
+
+        mEmergencyCallText = (TextView) findViewById(R.id.emergencyCallText);
+        mEmergencyCallButton = (Button) findViewById(R.id.emergencyCallButton);
+        mEmergencyCallButton.setText(R.string.lockscreen_emergency_call);
+
+        mLockPatternUtils.updateEmergencyCallButtonState(mEmergencyCallButton);
+        mEmergencyCallButton.setOnClickListener(new View.OnClickListener() {
+            public void onClick(View v) {
+                mCallback.takeEmergencyCallAction();
+            }
+        });
+
+
+        setFocusable(true);
+        setFocusableInTouchMode(true);
+        setDescendantFocusability(ViewGroup.FOCUS_BLOCK_DESCENDANTS);
+
+        updateMonitor.registerInfoCallback(this);
+        updateMonitor.registerSimStateCallback(this);
+
+        mAudioManager = (AudioManager) getContext().getSystemService(Context.AUDIO_SERVICE);
+        mSilentMode = isSilentMode();
+
+        mSelector.setLeftTabResources(
+                R.drawable.ic_jog_dial_unlock,
+                R.drawable.jog_tab_target_green,
+                R.drawable.jog_tab_bar_left_unlock,
+                R.drawable.jog_tab_left_unlock);
+
+        updateRightTabResources();
+
+        mSelector.setOnTriggerListener(this);
+
+        resetStatusInfo(updateMonitor);
+    }
+
+    private boolean isSilentMode() {
+        return mAudioManager.getRingerMode() != AudioManager.RINGER_MODE_NORMAL;
+    }
+
+    private void updateRightTabResources() {
+        boolean vibe = mSilentMode
+            && (mAudioManager.getRingerMode() == AudioManager.RINGER_MODE_VIBRATE);
+
+        mSelector.setRightTabResources(
+                mSilentMode ? ( vibe ? R.drawable.ic_jog_dial_vibrate_on
+                                     : R.drawable.ic_jog_dial_sound_off )
+                            : R.drawable.ic_jog_dial_sound_on,
+                mSilentMode ? R.drawable.jog_tab_target_yellow
+                            : R.drawable.jog_tab_target_gray,
+                mSilentMode ? R.drawable.jog_tab_bar_right_sound_on
+                            : R.drawable.jog_tab_bar_right_sound_off,
+                mSilentMode ? R.drawable.jog_tab_right_sound_on
+                            : R.drawable.jog_tab_right_sound_off);
+    }
+
+    private void resetStatusInfo(KeyguardUpdateMonitor updateMonitor) {
+        mShowingBatteryInfo = updateMonitor.shouldShowBatteryInfo();
+        mPluggedIn = updateMonitor.isDevicePluggedIn();
+        mBatteryLevel = updateMonitor.getBatteryLevel();
+
+        mStatus = getCurrentStatus(updateMonitor.getSimState());
+        updateLayout(mStatus);
+
+        refreshBatteryStringAndIcon();
+        refreshAlarmDisplay();
+
+        mTimeFormat = DateFormat.getTimeFormat(getContext());
+        mDateFormatString = getContext().getString(R.string.full_wday_month_day_no_year);
+        refreshTimeAndDateDisplay();
+        updateStatusLines();
+    }
+
+    @Override
+    public boolean onKeyDown(int keyCode, KeyEvent event) {
+        if (keyCode == KeyEvent.KEYCODE_MENU && mEnableMenuKeyInLockScreen) {
+            mCallback.goToUnlockScreen();
+        }
+        return false;
+    }
+
+    /** {@inheritDoc} */
+    public void onTrigger(View v, int whichHandle) {
+        if (whichHandle == SlidingTab.OnTriggerListener.LEFT_HANDLE) {
+            mCallback.goToUnlockScreen();
+        } else if (whichHandle == SlidingTab.OnTriggerListener.RIGHT_HANDLE) {
+            // toggle silent mode
+            mSilentMode = !mSilentMode;
+            if (mSilentMode) {
+                final boolean vibe = (Settings.System.getInt(
+                    getContext().getContentResolver(),
+                    Settings.System.VIBRATE_IN_SILENT, 1) == 1);
+
+                mAudioManager.setRingerMode(vibe
+                    ? AudioManager.RINGER_MODE_VIBRATE
+                    : AudioManager.RINGER_MODE_SILENT);
+            } else {
+                mAudioManager.setRingerMode(AudioManager.RINGER_MODE_NORMAL);
+            }
+
+            updateRightTabResources();
+
+            String message = mSilentMode ?
+                    getContext().getString(R.string.global_action_silent_mode_on_status) :
+                    getContext().getString(R.string.global_action_silent_mode_off_status);
+
+            final int toastIcon = mSilentMode
+                ? R.drawable.ic_lock_ringer_off
+                : R.drawable.ic_lock_ringer_on;
+
+            final int toastColor = mSilentMode
+                ? getContext().getResources().getColor(R.color.keyguard_text_color_soundoff)
+                : getContext().getResources().getColor(R.color.keyguard_text_color_soundon);
+            toastMessage(mScreenLocked, message, toastColor, toastIcon);
+            mCallback.pokeWakelock();
+        }
+    }
+
+    /** {@inheritDoc} */
+    public void onGrabbedStateChange(View v, int grabbedState) {
+        if (grabbedState == SlidingTab.OnTriggerListener.RIGHT_HANDLE) {
+            mSilentMode = isSilentMode();
+            mSelector.setRightHintText(mSilentMode ? R.string.lockscreen_sound_on_label
+                    : R.string.lockscreen_sound_off_label);
+        }
+        mCallback.pokeWakelock();
+    }
+
+    /**
+     * Displays a message in a text view and then restores the previous text.
+     * @param textView The text view.
+     * @param text The text.
+     * @param color The color to apply to the text, or 0 if the existing color should be used.
+     * @param iconResourceId The left hand icon.
+     */
+    private void toastMessage(final TextView textView, final String text, final int color, final int iconResourceId) {
+        if (mPendingR1 != null) {
+            textView.removeCallbacks(mPendingR1);
+            mPendingR1 = null;
+        }
+        if (mPendingR2 != null) {
+            mPendingR2.run(); // fire immediately, restoring non-toasted appearance
+            textView.removeCallbacks(mPendingR2);
+            mPendingR2 = null;
+        }
+
+        final String oldText = textView.getText().toString();
+        final ColorStateList oldColors = textView.getTextColors();
+
+        mPendingR1 = new Runnable() {
+            public void run() {
+                textView.setText(text);
+                if (color != 0) {
+                    textView.setTextColor(color);
+                }
+                textView.setCompoundDrawablesWithIntrinsicBounds(iconResourceId, 0, 0, 0);
+            }
+        };
+
+        textView.postDelayed(mPendingR1, 0);
+        mPendingR2 = new Runnable() {
+            public void run() {
+                textView.setText(oldText);
+                textView.setTextColor(oldColors);
+                textView.setCompoundDrawablesWithIntrinsicBounds(0, 0, 0, 0);
+            }
+        };
+        textView.postDelayed(mPendingR2, 3500);
+    }
+    private Runnable mPendingR1;
+    private Runnable mPendingR2;
+
+    private void refreshAlarmDisplay() {
+        mNextAlarm = mLockPatternUtils.getNextAlarm();
+        if (mNextAlarm != null) {
+            mAlarmIcon = getContext().getResources().getDrawable(R.drawable.ic_lock_idle_alarm);
+        }
+        updateStatusLines();
+    }
+
+    /** {@inheritDoc} */
+    public void onRefreshBatteryInfo(boolean showBatteryInfo, boolean pluggedIn,
+            int batteryLevel) {
+        if (DBG) Log.d(TAG, "onRefreshBatteryInfo(" + showBatteryInfo + ", " + pluggedIn + ")");
+        mShowingBatteryInfo = showBatteryInfo;
+        mPluggedIn = pluggedIn;
+        mBatteryLevel = batteryLevel;
+
+        refreshBatteryStringAndIcon();
+        updateStatusLines();
+    }
+
+    private void refreshBatteryStringAndIcon() {
+        if (!mShowingBatteryInfo) {
+            mCharging = null;
+            return;
+        }
+
+        if (mChargingIcon == null) {
+            mChargingIcon =
+                    getContext().getResources().getDrawable(R.drawable.ic_lock_idle_charging);
+        }
+
+        if (mPluggedIn) {
+            if (mBatteryLevel >= 100) {
+                mCharging = getContext().getString(R.string.lockscreen_charged);
+            } else {
+                mCharging = getContext().getString(R.string.lockscreen_plugged_in, mBatteryLevel);
+            }
+        } else {
+            mCharging = getContext().getString(R.string.lockscreen_low_battery);
+        }
+    }
+
+    /** {@inheritDoc} */
+    public void onTimeChanged() {
+        refreshTimeAndDateDisplay();
+    }
+
+    private void refreshTimeAndDateDisplay() {
+        mDate.setText(DateFormat.format(mDateFormatString, new Date()));
+    }
+
+    private void updateStatusLines() {
+        if (!mStatus.showStatusLines()
+                || (mCharging == null && mNextAlarm == null)) {
+            mStatus1.setVisibility(View.INVISIBLE);
+            mStatus2.setVisibility(View.INVISIBLE);
+        } else if (mCharging != null && mNextAlarm == null) {
+            // charging only
+            mStatus1.setVisibility(View.VISIBLE);
+            mStatus2.setVisibility(View.INVISIBLE);
+
+            mStatus1.setText(mCharging);
+            mStatus1.setCompoundDrawablesWithIntrinsicBounds(mChargingIcon, null, null, null);
+        } else if (mNextAlarm != null && mCharging == null) {
+            // next alarm only
+            mStatus1.setVisibility(View.VISIBLE);
+            mStatus2.setVisibility(View.INVISIBLE);
+
+            mStatus1.setText(mNextAlarm);
+            mStatus1.setCompoundDrawablesWithIntrinsicBounds(mAlarmIcon, null, null, null);
+        } else if (mCharging != null && mNextAlarm != null) {
+            // both charging and next alarm
+            mStatus1.setVisibility(View.VISIBLE);
+            mStatus2.setVisibility(View.VISIBLE);
+
+            mStatus1.setText(mCharging);
+            mStatus1.setCompoundDrawablesWithIntrinsicBounds(mChargingIcon, null, null, null);
+            mStatus2.setText(mNextAlarm);
+            mStatus2.setCompoundDrawablesWithIntrinsicBounds(mAlarmIcon, null, null, null);
+        }
+    }
+
+    /** {@inheritDoc} */
+    public void onRefreshCarrierInfo(CharSequence plmn, CharSequence spn) {
+        if (DBG) Log.d(TAG, "onRefreshCarrierInfo(" + plmn + ", " + spn + ")");
+        updateLayout(mStatus);
+    }
+
+    /**
+     * Determine the current status of the lock screen given the sim state and other stuff.
+     */
+    private Status getCurrentStatus(IccCard.State simState) {
+        boolean missingAndNotProvisioned = (!mUpdateMonitor.isDeviceProvisioned()
+                && simState == IccCard.State.ABSENT);
+        if (missingAndNotProvisioned) {
+            return Status.SimMissingLocked;
+        }
+
+        switch (simState) {
+            case ABSENT:
+                return Status.SimMissing;
+            case NETWORK_LOCKED:
+                return Status.SimMissingLocked;
+            case NOT_READY:
+                return Status.SimMissing;
+            case PIN_REQUIRED:
+                return Status.SimLocked;
+            case PUK_REQUIRED:
+                return Status.SimPukLocked;
+            case READY:
+                return Status.Normal;
+            case UNKNOWN:
+                return Status.SimMissing;
+        }
+        return Status.SimMissing;
+    }
+
+    /**
+     * Update the layout to match the current status.
+     */
+    private void updateLayout(Status status) {
+        // The emergency call button no longer appears on this screen.
+        if (DBG) Log.d(TAG, "updateLayout: status=" + status);
+
+        mEmergencyCallButton.setVisibility(View.GONE); // in almost all cases
+
+        switch (status) {
+            case Normal:
+                // text
+                mCarrier.setText(
+                        getCarrierString(
+                                mUpdateMonitor.getTelephonyPlmn(),
+                                mUpdateMonitor.getTelephonySpn()));
+
+                // Empty now, but used for sliding tab feedback
+                mScreenLocked.setText("");
+
+                // layout
+                mScreenLocked.setVisibility(View.VISIBLE);
+                mSelector.setVisibility(View.VISIBLE);
+                mEmergencyCallText.setVisibility(View.GONE);
+                break;
+            case NetworkLocked:
+                // The carrier string shows both sim card status (i.e. No Sim Card) and
+                // carrier's name and/or "Emergency Calls Only" status
+                mCarrier.setText(
+                        getCarrierString(
+                                mUpdateMonitor.getTelephonyPlmn(),
+                                getContext().getText(R.string.lockscreen_network_locked_message)));
+                mScreenLocked.setText(R.string.lockscreen_instructions_when_pattern_disabled);
+
+                // layout
+                mScreenLocked.setVisibility(View.VISIBLE);
+                mSelector.setVisibility(View.VISIBLE);
+                mEmergencyCallText.setVisibility(View.GONE);
+                break;
+            case SimMissing:
+                // text
+                mCarrier.setText(R.string.lockscreen_missing_sim_message_short);
+                mScreenLocked.setText(R.string.lockscreen_missing_sim_instructions);
+
+                // layout
+                mScreenLocked.setVisibility(View.VISIBLE);
+                mSelector.setVisibility(View.VISIBLE);
+                mEmergencyCallText.setVisibility(View.VISIBLE);
+                // do not need to show the e-call button; user may unlock
+                break;
+            case SimMissingLocked:
+                // text
+                mCarrier.setText(
+                        getCarrierString(
+                                mUpdateMonitor.getTelephonyPlmn(),
+                                getContext().getText(R.string.lockscreen_missing_sim_message_short)));
+                mScreenLocked.setText(R.string.lockscreen_missing_sim_instructions);
+
+                // layout
+                mScreenLocked.setVisibility(View.VISIBLE);
+                mSelector.setVisibility(View.GONE); // cannot unlock
+                mEmergencyCallText.setVisibility(View.VISIBLE);
+                mEmergencyCallButton.setVisibility(View.VISIBLE);
+                break;
+            case SimLocked:
+                // text
+                mCarrier.setText(
+                        getCarrierString(
+                                mUpdateMonitor.getTelephonyPlmn(),
+                                getContext().getText(R.string.lockscreen_sim_locked_message)));
+
+                // layout
+                mScreenLocked.setVisibility(View.INVISIBLE);
+                mSelector.setVisibility(View.VISIBLE);
+                mEmergencyCallText.setVisibility(View.GONE);
+                break;
+            case SimPukLocked:
+                // text
+                mCarrier.setText(
+                        getCarrierString(
+                                mUpdateMonitor.getTelephonyPlmn(),
+                                getContext().getText(R.string.lockscreen_sim_puk_locked_message)));
+                mScreenLocked.setText(R.string.lockscreen_sim_puk_locked_instructions);
+
+                // layout
+                mScreenLocked.setVisibility(View.VISIBLE);
+                mSelector.setVisibility(View.GONE); // cannot unlock
+                mEmergencyCallText.setVisibility(View.VISIBLE);
+                mEmergencyCallButton.setVisibility(View.VISIBLE);
+                break;
+        }
+    }
+
+    static CharSequence getCarrierString(CharSequence telephonyPlmn, CharSequence telephonySpn) {
+        if (telephonyPlmn != null && telephonySpn == null) {
+            return telephonyPlmn;
+        } else if (telephonyPlmn != null && telephonySpn != null) {
+            return telephonyPlmn + "|" + telephonySpn;
+        } else if (telephonyPlmn == null && telephonySpn != null) {
+            return telephonySpn;
+        } else {
+            return "";
+        }
+    }
+
+    public void onSimStateChanged(IccCard.State simState) {
+        if (DBG) Log.d(TAG, "onSimStateChanged(" + simState + ")");
+        mStatus = getCurrentStatus(simState);
+        updateLayout(mStatus);
+        updateStatusLines();
+    }
+
+    void updateConfiguration() {
+        Configuration newConfig = getResources().getConfiguration();
+        if (newConfig.orientation != mCreationOrientation) {
+            mCallback.recreateMe(newConfig);
+        } else if (newConfig.hardKeyboardHidden != mKeyboardHidden) {
+            mKeyboardHidden = newConfig.hardKeyboardHidden;
+            final boolean isKeyboardOpen = mKeyboardHidden == Configuration.HARDKEYBOARDHIDDEN_NO;
+            if (mUpdateMonitor.isKeyguardBypassEnabled() && isKeyboardOpen) {
+                mCallback.goToUnlockScreen();
+            }
+        }
+    }
+
+    @Override
+    protected void onAttachedToWindow() {
+        super.onAttachedToWindow();
+        if (LockPatternKeyguardView.DEBUG_CONFIGURATION) {
+            Log.v(TAG, "***** LOCK ATTACHED TO WINDOW");
+            Log.v(TAG, "Cur orient=" + mCreationOrientation
+                    + ", new config=" + getResources().getConfiguration());
+        }
+        updateConfiguration();
+    }
+
+    /** {@inheritDoc} */
+    @Override
+    protected void onConfigurationChanged(Configuration newConfig) {
+        super.onConfigurationChanged(newConfig);
+        if (LockPatternKeyguardView.DEBUG_CONFIGURATION) {
+            Log.w(TAG, "***** LOCK CONFIG CHANGING", new RuntimeException());
+            Log.v(TAG, "Cur orient=" + mCreationOrientation
+                    + ", new config=" + newConfig);
+        }
+        updateConfiguration();
+    }
+
+    /** {@inheritDoc} */
+    public boolean needsInput() {
+        return false;
+    }
+
+    /** {@inheritDoc} */
+    public void onPause() {
+
+    }
+
+    /** {@inheritDoc} */
+    public void onResume() {
+        resetStatusInfo(mUpdateMonitor);
+        mLockPatternUtils.updateEmergencyCallButtonState(mEmergencyCallButton);
+    }
+
+    /** {@inheritDoc} */
+    public void cleanUp() {
+        mUpdateMonitor.removeCallback(this);
+    }
+
+    /** {@inheritDoc} */
+    public void onRingerModeChanged(int state) {
+        boolean silent = AudioManager.RINGER_MODE_NORMAL != state;
+        if (silent != mSilentMode) {
+            mSilentMode = silent;
+            updateRightTabResources();
+        }
+    }
+
+    public void onPhoneStateChanged(String newState) {
+        mLockPatternUtils.updateEmergencyCallButtonState(mEmergencyCallButton);
+    }
+}
diff --git a/policy/src/com/android/internal/policy/impl/PasswordUnlockScreen.java b/policy/src/com/android/internal/policy/impl/PasswordUnlockScreen.java
new file mode 100644
index 0000000..39f2917
--- /dev/null
+++ b/policy/src/com/android/internal/policy/impl/PasswordUnlockScreen.java
@@ -0,0 +1,267 @@
+/*
+ * Copyright (C) 2010 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.android.internal.policy.impl;
+
+import android.app.admin.DevicePolicyManager;
+import android.content.Context;
+import android.content.res.Configuration;
+import android.graphics.Rect;
+
+import com.android.internal.policy.impl.PatternUnlockScreen.FooterMode;
+import com.android.internal.widget.LockPatternUtils;
+import com.android.internal.widget.PasswordEntryKeyboardView;
+
+import android.os.CountDownTimer;
+import android.os.SystemClock;
+import android.telephony.TelephonyManager;
+import android.text.method.DigitsKeyListener;
+import android.text.method.TextKeyListener;
+import android.view.KeyEvent;
+import android.view.LayoutInflater;
+import android.view.View;
+import android.view.inputmethod.EditorInfo;
+import android.widget.Button;
+import android.widget.EditText;
+import android.widget.LinearLayout;
+import android.widget.TextView;
+import android.widget.TextView.OnEditorActionListener;
+
+import com.android.internal.R;
+import com.android.internal.widget.PasswordEntryKeyboardHelper;
+
+/**
+ * Displays a dialer-like interface or alphanumeric (latin-1) key entry for the user to enter
+ * an unlock password
+ */
+public class PasswordUnlockScreen extends LinearLayout implements KeyguardScreen,
+        View.OnClickListener, KeyguardUpdateMonitor.InfoCallback, OnEditorActionListener {
+
+    private final KeyguardUpdateMonitor mUpdateMonitor;
+    private final KeyguardScreenCallback mCallback;
+
+    private EditText mPasswordEntry;
+    private Button mEmergencyCallButton;
+    private LockPatternUtils mLockPatternUtils;
+    private PasswordEntryKeyboardView mKeyboardView;
+    private PasswordEntryKeyboardHelper mKeyboardHelper;
+
+    private int mCreationOrientation;
+    private int mCreationHardKeyboardHidden;
+    private CountDownTimer mCountdownTimer;
+    private TextView mTitle;
+
+    // To avoid accidental lockout due to events while the device in in the pocket, ignore
+    // any passwords with length less than or equal to this length.
+    private static final int MINIMUM_PASSWORD_LENGTH_BEFORE_REPORT = 3;
+
+    public PasswordUnlockScreen(Context context, Configuration configuration,
+            LockPatternUtils lockPatternUtils, KeyguardUpdateMonitor updateMonitor,
+            KeyguardScreenCallback callback) {
+        super(context);
+
+        mCreationHardKeyboardHidden = configuration.hardKeyboardHidden;
+        mCreationOrientation = configuration.orientation;
+        mUpdateMonitor = updateMonitor;
+        mCallback = callback;
+        mLockPatternUtils = lockPatternUtils;
+
+        LayoutInflater layoutInflater = LayoutInflater.from(context);
+        if (mCreationOrientation != Configuration.ORIENTATION_LANDSCAPE) {
+            layoutInflater.inflate(R.layout.keyguard_screen_password_portrait, this, true);
+        } else {
+            layoutInflater.inflate(R.layout.keyguard_screen_password_landscape, this, true);
+        }
+
+        final int quality = lockPatternUtils.getKeyguardStoredPasswordQuality();
+        final boolean isAlpha = DevicePolicyManager.PASSWORD_QUALITY_ALPHABETIC == quality
+                || DevicePolicyManager.PASSWORD_QUALITY_ALPHANUMERIC == quality;
+
+        mKeyboardView = (PasswordEntryKeyboardView) findViewById(R.id.keyboard);
+        mPasswordEntry = (EditText) findViewById(R.id.passwordEntry);
+        mPasswordEntry.setOnEditorActionListener(this);
+        mEmergencyCallButton = (Button) findViewById(R.id.emergencyCall);
+        mEmergencyCallButton.setOnClickListener(this);
+        mLockPatternUtils.updateEmergencyCallButtonState(mEmergencyCallButton);
+        mTitle = (TextView) findViewById(R.id.enter_password_label);
+
+        mKeyboardHelper = new PasswordEntryKeyboardHelper(context, mKeyboardView, this);
+        mKeyboardHelper.setKeyboardMode(isAlpha ? PasswordEntryKeyboardHelper.KEYBOARD_MODE_ALPHA
+                : PasswordEntryKeyboardHelper.KEYBOARD_MODE_NUMERIC);
+
+        mKeyboardView.setVisibility(mCreationHardKeyboardHidden == Configuration.HARDKEYBOARDHIDDEN_NO
+                ? View.INVISIBLE : View.VISIBLE);
+        mPasswordEntry.requestFocus();
+
+        // This allows keyboards with overlapping qwerty/numeric keys to choose just the
+        // numeric keys.
+        if (isAlpha) {
+            mPasswordEntry.setKeyListener(TextKeyListener.getInstance());
+        } else {
+            mPasswordEntry.setKeyListener(DigitsKeyListener.getInstance());
+        }
+
+        mKeyboardHelper.setVibratePattern(mLockPatternUtils.isTactileFeedbackEnabled() ?
+                com.android.internal.R.array.config_virtualKeyVibePattern : 0);
+    }
+
+    @Override
+    protected boolean onRequestFocusInDescendants(int direction, Rect previouslyFocusedRect) {
+        // send focus to the password field
+        return mPasswordEntry.requestFocus(direction, previouslyFocusedRect);
+    }
+
+    /** {@inheritDoc} */
+    public boolean needsInput() {
+        return false;
+    }
+
+    /** {@inheritDoc} */
+    public void onPause() {
+
+    }
+
+    /** {@inheritDoc} */
+    public void onResume() {
+        // start fresh
+        mPasswordEntry.setText("");
+        mPasswordEntry.requestFocus();
+        mLockPatternUtils.updateEmergencyCallButtonState(mEmergencyCallButton);
+
+        // if the user is currently locked out, enforce it.
+        long deadline = mLockPatternUtils.getLockoutAttemptDeadline();
+        if (deadline != 0) {
+            handleAttemptLockout(deadline);
+        }
+    }
+
+    /** {@inheritDoc} */
+    public void cleanUp() {
+        mUpdateMonitor.removeCallback(this);
+    }
+
+    public void onClick(View v) {
+        if (v == mEmergencyCallButton) {
+            mCallback.takeEmergencyCallAction();
+        }
+        mCallback.pokeWakelock();
+    }
+
+    private void verifyPasswordAndUnlock() {
+        String entry = mPasswordEntry.getText().toString();
+        if (mLockPatternUtils.checkPassword(entry)) {
+            mCallback.keyguardDone(true);
+            mCallback.reportSuccessfulUnlockAttempt();
+        } else if (entry.length() > MINIMUM_PASSWORD_LENGTH_BEFORE_REPORT ) {
+            // to avoid accidental lockout, only count attempts that are long enough to be a
+            // real password. This may require some tweaking.
+            mCallback.reportFailedUnlockAttempt();
+            if (0 == (mUpdateMonitor.getFailedAttempts()
+                    % LockPatternUtils.FAILED_ATTEMPTS_BEFORE_TIMEOUT)) {
+                long deadline = mLockPatternUtils.setLockoutAttemptDeadline();
+                handleAttemptLockout(deadline);
+            }
+        }
+        mPasswordEntry.setText("");
+    }
+
+    // Prevent user from using the PIN/Password entry until scheduled deadline.
+    private void handleAttemptLockout(long elapsedRealtimeDeadline) {
+        mPasswordEntry.setEnabled(false);
+        mKeyboardView.setEnabled(false);
+        long elapsedRealtime = SystemClock.elapsedRealtime();
+        mCountdownTimer = new CountDownTimer(elapsedRealtimeDeadline - elapsedRealtime, 1000) {
+
+            @Override
+            public void onTick(long millisUntilFinished) {
+                int secondsRemaining = (int) (millisUntilFinished / 1000);
+                String instructions = getContext().getString(
+                        R.string.lockscreen_too_many_failed_attempts_countdown,
+                        secondsRemaining);
+                mTitle.setText(instructions);
+            }
+
+            @Override
+            public void onFinish() {
+                mPasswordEntry.setEnabled(true);
+                mTitle.setText(R.string.keyguard_password_enter_password_code);
+                mKeyboardView.setEnabled(true);
+            }
+        }.start();
+    }
+
+
+    @Override
+    public boolean onKeyDown(int keyCode, KeyEvent event) {
+        mCallback.pokeWakelock();
+        return false;
+    }
+
+    @Override
+    protected void onAttachedToWindow() {
+        super.onAttachedToWindow();
+        Configuration config = getResources().getConfiguration();
+        if (config.orientation != mCreationOrientation
+                || config.hardKeyboardHidden != mCreationHardKeyboardHidden) {
+            mCallback.recreateMe(config);
+        }
+    }
+
+    /** {@inheritDoc} */
+    @Override
+    protected void onConfigurationChanged(Configuration newConfig) {
+        super.onConfigurationChanged(newConfig);
+        if (newConfig.orientation != mCreationOrientation
+                || newConfig.hardKeyboardHidden != mCreationHardKeyboardHidden) {
+            mCallback.recreateMe(newConfig);
+        }
+    }
+
+    public void onKeyboardChange(boolean isKeyboardOpen) {
+        // Don't show the soft keyboard when the real keyboard is open
+        mKeyboardView.setVisibility(isKeyboardOpen ? View.INVISIBLE : View.VISIBLE);
+    }
+
+    public boolean onEditorAction(TextView v, int actionId, KeyEvent event) {
+        // Check if this was the result of hitting the enter key
+        if (actionId == EditorInfo.IME_NULL) {
+            verifyPasswordAndUnlock();
+            return true;
+        }
+        return false;
+    }
+
+    public void onPhoneStateChanged(String newState) {
+        mLockPatternUtils.updateEmergencyCallButtonState(mEmergencyCallButton);
+    }
+
+    public void onRefreshBatteryInfo(boolean showBatteryInfo, boolean pluggedIn, int batteryLevel) {
+
+    }
+
+    public void onRefreshCarrierInfo(CharSequence plmn, CharSequence spn) {
+
+    }
+
+    public void onRingerModeChanged(int state) {
+
+    }
+
+    public void onTimeChanged() {
+
+    }
+
+}
diff --git a/policy/src/com/android/internal/policy/impl/PatternUnlockScreen.java b/policy/src/com/android/internal/policy/impl/PatternUnlockScreen.java
new file mode 100644
index 0000000..418e243
--- /dev/null
+++ b/policy/src/com/android/internal/policy/impl/PatternUnlockScreen.java
@@ -0,0 +1,580 @@
+/*
+ * Copyright (C) 2008 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.android.internal.policy.impl;
+
+import android.content.Context;
+import android.content.res.Configuration;
+import android.os.CountDownTimer;
+import android.os.SystemClock;
+import android.view.LayoutInflater;
+import android.view.View;
+import android.view.ViewGroup;
+import android.view.MotionEvent;
+import android.widget.Button;
+import android.widget.TextView;
+import android.text.format.DateFormat;
+import android.text.TextUtils;
+import android.util.Log;
+import com.android.internal.R;
+import com.android.internal.telephony.IccCard;
+import com.android.internal.widget.LinearLayoutWithDefaultTouchRecepient;
+import com.android.internal.widget.LockPatternUtils;
+import com.android.internal.widget.LockPatternView;
+import com.android.internal.widget.LockPatternView.Cell;
+
+import java.util.List;
+import java.util.Date;
+
+/**
+ * This is the screen that shows the 9 circle unlock widget and instructs
+ * the user how to unlock their device, or make an emergency call.
+ */
+class PatternUnlockScreen extends LinearLayoutWithDefaultTouchRecepient
+        implements KeyguardScreen, KeyguardUpdateMonitor.InfoCallback,
+        KeyguardUpdateMonitor.SimStateCallback {
+
+    private static final boolean DEBUG = false;
+    private static final String TAG = "UnlockScreen";
+
+    // how long before we clear the wrong pattern
+    private static final int PATTERN_CLEAR_TIMEOUT_MS = 2000;
+
+    // how long we stay awake after each key beyond MIN_PATTERN_BEFORE_POKE_WAKELOCK
+    private static final int UNLOCK_PATTERN_WAKE_INTERVAL_MS = 7000;
+
+    // how long we stay awake after the user hits the first dot.
+    private static final int UNLOCK_PATTERN_WAKE_INTERVAL_FIRST_DOTS_MS = 2000;
+
+    // how many cells the user has to cross before we poke the wakelock
+    private static final int MIN_PATTERN_BEFORE_POKE_WAKELOCK = 2;
+
+    private int mFailedPatternAttemptsSinceLastTimeout = 0;
+    private int mTotalFailedPatternAttempts = 0;
+    private CountDownTimer mCountdownTimer = null;
+
+    private final LockPatternUtils mLockPatternUtils;
+    private final KeyguardUpdateMonitor mUpdateMonitor;
+    private final KeyguardScreenCallback mCallback;
+
+    /**
+     * whether there is a fallback option available when the pattern is forgotten.
+     */
+    private boolean mEnableFallback;
+
+    private String mDateFormatString;
+
+    private TextView mCarrier;
+    private TextView mDate;
+
+    // are we showing battery information?
+    private boolean mShowingBatteryInfo = false;
+
+    // last known plugged in state
+    private boolean mPluggedIn = false;
+
+    // last known battery level
+    private int mBatteryLevel = 100;
+
+    private String mNextAlarm = null;
+
+    private String mInstructions = null;
+    private TextView mStatus1;
+    private TextView mStatusSep;
+    private TextView mStatus2;
+
+
+    private LockPatternView mLockPatternView;
+
+    private ViewGroup mFooterNormal;
+    private ViewGroup mFooterForgotPattern;
+
+    /**
+     * Keeps track of the last time we poked the wake lock during dispatching
+     * of the touch event, initalized to something gauranteed to make us
+     * poke it when the user starts drawing the pattern.
+     * @see #dispatchTouchEvent(android.view.MotionEvent)
+     */
+    private long mLastPokeTime = -UNLOCK_PATTERN_WAKE_INTERVAL_MS;
+
+    /**
+     * Useful for clearing out the wrong pattern after a delay
+     */
+    private Runnable mCancelPatternRunnable = new Runnable() {
+        public void run() {
+            mLockPatternView.clearPattern();
+        }
+    };
+
+    private Button mForgotPatternButton;
+    private Button mEmergencyAlone;
+    private Button mEmergencyTogether;
+    private int mCreationOrientation;
+
+    enum FooterMode {
+        Normal,
+        ForgotLockPattern,
+        VerifyUnlocked
+    }
+
+    private void updateFooter(FooterMode mode) {
+        switch (mode) {
+            case Normal:
+                mFooterNormal.setVisibility(View.VISIBLE);
+                mFooterForgotPattern.setVisibility(View.GONE);
+                break;
+            case ForgotLockPattern:
+                mFooterNormal.setVisibility(View.GONE);
+                mFooterForgotPattern.setVisibility(View.VISIBLE);
+                mForgotPatternButton.setVisibility(View.VISIBLE);
+                break;
+            case VerifyUnlocked:
+                mFooterNormal.setVisibility(View.GONE);
+                mFooterForgotPattern.setVisibility(View.GONE);
+        }
+    }
+
+    /**
+     * @param context The context.
+     * @param configuration
+     * @param lockPatternUtils Used to lookup lock pattern settings.
+     * @param updateMonitor Used to lookup state affecting keyguard.
+     * @param callback Used to notify the manager when we're done, etc.
+     * @param totalFailedAttempts The current number of failed attempts.
+     * @param enableFallback True if a backup unlock option is available when the user has forgotten
+     *        their pattern (e.g they have a google account so we can show them the account based
+     *        backup option).
+     */
+    PatternUnlockScreen(Context context,
+                 Configuration configuration, LockPatternUtils lockPatternUtils,
+                 KeyguardUpdateMonitor updateMonitor,
+                 KeyguardScreenCallback callback,
+                 int totalFailedAttempts) {
+        super(context);
+        mLockPatternUtils = lockPatternUtils;
+        mUpdateMonitor = updateMonitor;
+        mCallback = callback;
+        mTotalFailedPatternAttempts = totalFailedAttempts;
+        mFailedPatternAttemptsSinceLastTimeout =
+            totalFailedAttempts % LockPatternUtils.FAILED_ATTEMPTS_BEFORE_TIMEOUT;
+
+        if (DEBUG) Log.d(TAG,
+            "UnlockScreen() ctor: totalFailedAttempts="
+                 + totalFailedAttempts + ", mFailedPat...="
+                 + mFailedPatternAttemptsSinceLastTimeout
+                 );
+
+        mCreationOrientation = configuration.orientation;
+
+        LayoutInflater inflater = LayoutInflater.from(context);
+        if (mCreationOrientation != Configuration.ORIENTATION_LANDSCAPE) {
+            inflater.inflate(R.layout.keyguard_screen_unlock_portrait, this, true);
+        } else {
+            inflater.inflate(R.layout.keyguard_screen_unlock_landscape, this, true);
+        }
+
+        mCarrier = (TextView) findViewById(R.id.carrier);
+        mDate = (TextView) findViewById(R.id.date);
+
+        mDateFormatString = getContext().getString(R.string.full_wday_month_day_no_year);
+        refreshTimeAndDateDisplay();
+
+        mStatus1 = (TextView) findViewById(R.id.status1);
+        mStatusSep = (TextView) findViewById(R.id.statusSep);
+        mStatus2 = (TextView) findViewById(R.id.status2);
+
+        resetStatusInfo();
+
+
+        mLockPatternView = (LockPatternView) findViewById(R.id.lockPattern);
+
+        mFooterNormal = (ViewGroup) findViewById(R.id.footerNormal);
+        mFooterForgotPattern = (ViewGroup) findViewById(R.id.footerForgotPattern);
+
+        // emergency call buttons
+        final OnClickListener emergencyClick = new OnClickListener() {
+            public void onClick(View v) {
+                mCallback.takeEmergencyCallAction();
+            }
+        };
+
+        mEmergencyAlone = (Button) findViewById(R.id.emergencyCallAlone);
+        mEmergencyAlone.setFocusable(false); // touch only!
+        mEmergencyAlone.setOnClickListener(emergencyClick);
+        mEmergencyTogether = (Button) findViewById(R.id.emergencyCallTogether);
+        mEmergencyTogether.setFocusable(false);
+        mEmergencyTogether.setOnClickListener(emergencyClick);
+        refreshEmergencyButtonText();
+
+        mForgotPatternButton = (Button) findViewById(R.id.forgotPattern);
+        mForgotPatternButton.setText(R.string.lockscreen_forgot_pattern_button_text);
+        mForgotPatternButton.setOnClickListener(new OnClickListener() {
+
+            public void onClick(View v) {
+                mCallback.forgotPattern(true);
+            }
+        });
+
+        // make it so unhandled touch events within the unlock screen go to the
+        // lock pattern view.
+        setDefaultTouchRecepient(mLockPatternView);
+
+        mLockPatternView.setSaveEnabled(false);
+        mLockPatternView.setFocusable(false);
+        mLockPatternView.setOnPatternListener(new UnlockPatternListener());
+
+        // stealth mode will be the same for the life of this screen
+        mLockPatternView.setInStealthMode(!mLockPatternUtils.isVisiblePatternEnabled());
+
+        // vibrate mode will be the same for the life of this screen
+        mLockPatternView.setTactileFeedbackEnabled(mLockPatternUtils.isTactileFeedbackEnabled());
+
+        // assume normal footer mode for now
+        updateFooter(FooterMode.Normal);
+
+        updateMonitor.registerInfoCallback(this);
+        updateMonitor.registerSimStateCallback(this);
+        setFocusableInTouchMode(true);
+
+        // Required to get Marquee to work.
+        mCarrier.setSelected(true);
+        mCarrier.setTextColor(0xffffffff);
+
+        // until we get an update...
+        mCarrier.setText(
+                LockScreen.getCarrierString(
+                        mUpdateMonitor.getTelephonyPlmn(),
+                        mUpdateMonitor.getTelephonySpn()));
+    }
+
+    private void refreshEmergencyButtonText() {
+        mLockPatternUtils.updateEmergencyCallButtonState(mEmergencyAlone);
+        mLockPatternUtils.updateEmergencyCallButtonState(mEmergencyTogether);
+    }
+
+    public void setEnableFallback(boolean state) {
+        if (DEBUG) Log.d(TAG, "setEnableFallback(" + state + ")");
+        mEnableFallback = state;
+    }
+
+    private void resetStatusInfo() {
+        mInstructions = null;
+        mShowingBatteryInfo = mUpdateMonitor.shouldShowBatteryInfo();
+        mPluggedIn = mUpdateMonitor.isDevicePluggedIn();
+        mBatteryLevel = mUpdateMonitor.getBatteryLevel();
+        mNextAlarm = mLockPatternUtils.getNextAlarm();
+        updateStatusLines();
+    }
+
+    private void updateStatusLines() {
+        if (mInstructions != null) {
+            // instructions only
+            mStatus1.setText(mInstructions);
+            if (TextUtils.isEmpty(mInstructions)) {
+                mStatus1.setCompoundDrawablesWithIntrinsicBounds(0, 0, 0, 0);
+            } else {
+                mStatus1.setCompoundDrawablesWithIntrinsicBounds(
+                        R.drawable.ic_lock_idle_lock, 0, 0, 0);
+            }
+
+            mStatus1.setVisibility(View.VISIBLE);
+            mStatusSep.setVisibility(View.GONE);
+            mStatus2.setVisibility(View.GONE);
+        } else if (mShowingBatteryInfo && mNextAlarm == null) {
+            // battery only
+            if (mPluggedIn) {
+              if (mBatteryLevel >= 100) {
+                mStatus1.setText(getContext().getString(R.string.lockscreen_charged));
+              } else {
+                  mStatus1.setText(getContext().getString(R.string.lockscreen_plugged_in, mBatteryLevel));
+              }
+            } else {
+                mStatus1.setText(getContext().getString(R.string.lockscreen_low_battery));
+            }
+            mStatus1.setCompoundDrawablesWithIntrinsicBounds(R.drawable.ic_lock_idle_charging, 0, 0, 0);
+
+            mStatus1.setVisibility(View.VISIBLE);
+            mStatusSep.setVisibility(View.GONE);
+            mStatus2.setVisibility(View.GONE);
+
+        } else if (mNextAlarm != null && !mShowingBatteryInfo) {
+            // alarm only
+            mStatus1.setText(mNextAlarm);
+            mStatus1.setCompoundDrawablesWithIntrinsicBounds(R.drawable.ic_lock_idle_alarm, 0, 0, 0);
+
+            mStatus1.setVisibility(View.VISIBLE);
+            mStatusSep.setVisibility(View.GONE);
+            mStatus2.setVisibility(View.GONE);
+        } else if (mNextAlarm != null && mShowingBatteryInfo) {
+            // both battery and next alarm
+            mStatus1.setText(mNextAlarm);
+            mStatusSep.setText("|");
+            mStatus2.setText(getContext().getString(
+                    R.string.lockscreen_battery_short,
+                    Math.min(100, mBatteryLevel)));
+            mStatus1.setCompoundDrawablesWithIntrinsicBounds(R.drawable.ic_lock_idle_alarm, 0, 0, 0);
+            if (mPluggedIn) {
+                mStatus2.setCompoundDrawablesWithIntrinsicBounds(R.drawable.ic_lock_idle_charging, 0, 0, 0);
+            } else {
+                mStatus2.setCompoundDrawablesWithIntrinsicBounds(0, 0, 0, 0);
+            }
+
+            mStatus1.setVisibility(View.VISIBLE);
+            mStatusSep.setVisibility(View.VISIBLE);
+            mStatus2.setVisibility(View.VISIBLE);
+        } else {
+            // nothing specific to show; show general instructions
+            mStatus1.setText(R.string.lockscreen_pattern_instructions);
+            mStatus1.setCompoundDrawablesWithIntrinsicBounds(R.drawable.ic_lock_idle_lock, 0, 0, 0);
+
+            mStatus1.setVisibility(View.VISIBLE);
+            mStatusSep.setVisibility(View.GONE);
+            mStatus2.setVisibility(View.GONE);
+        }
+    }
+
+
+    private void refreshTimeAndDateDisplay() {
+        mDate.setText(DateFormat.format(mDateFormatString, new Date()));
+    }
+
+
+    @Override
+    public boolean dispatchTouchEvent(MotionEvent ev) {
+        // as long as the user is entering a pattern (i.e sending a touch
+        // event that was handled by this screen), keep poking the
+        // wake lock so that the screen will stay on.
+        final boolean result = super.dispatchTouchEvent(ev);
+        if (result &&
+                ((SystemClock.elapsedRealtime() - mLastPokeTime)
+                        >  (UNLOCK_PATTERN_WAKE_INTERVAL_MS - 100))) {
+            mLastPokeTime = SystemClock.elapsedRealtime();
+        }
+        return result;
+    }
+
+
+    // ---------- InfoCallback
+
+    /** {@inheritDoc} */
+    public void onRefreshBatteryInfo(boolean showBatteryInfo, boolean pluggedIn, int batteryLevel) {
+        mShowingBatteryInfo = showBatteryInfo;
+        mPluggedIn = pluggedIn;
+        mBatteryLevel = batteryLevel;
+        updateStatusLines();
+    }
+
+    /** {@inheritDoc} */
+    public void onTimeChanged() {
+        refreshTimeAndDateDisplay();
+    }
+
+    /** {@inheritDoc} */
+    public void onRefreshCarrierInfo(CharSequence plmn, CharSequence spn) {
+        mCarrier.setText(LockScreen.getCarrierString(plmn, spn));
+    }
+
+    /** {@inheritDoc} */
+    public void onRingerModeChanged(int state) {
+        // not currently used
+    }
+
+    // ---------- SimStateCallback
+
+    /** {@inheritDoc} */
+    public void onSimStateChanged(IccCard.State simState) {
+    }
+
+    @Override
+    protected void onAttachedToWindow() {
+        super.onAttachedToWindow();
+        if (LockPatternKeyguardView.DEBUG_CONFIGURATION) {
+            Log.v(TAG, "***** PATTERN ATTACHED TO WINDOW");
+            Log.v(TAG, "Cur orient=" + mCreationOrientation
+                    + ", new config=" + getResources().getConfiguration());
+        }
+        if (getResources().getConfiguration().orientation != mCreationOrientation) {
+            mCallback.recreateMe(getResources().getConfiguration());
+        }
+    }
+
+
+    /** {@inheritDoc} */
+    @Override
+    protected void onConfigurationChanged(Configuration newConfig) {
+        super.onConfigurationChanged(newConfig);
+        if (LockPatternKeyguardView.DEBUG_CONFIGURATION) {
+            Log.v(TAG, "***** PATTERN CONFIGURATION CHANGED");
+            Log.v(TAG, "Cur orient=" + mCreationOrientation
+                    + ", new config=" + getResources().getConfiguration());
+        }
+        if (newConfig.orientation != mCreationOrientation) {
+            mCallback.recreateMe(newConfig);
+        }
+    }
+
+    /** {@inheritDoc} */
+    public void onKeyboardChange(boolean isKeyboardOpen) {}
+
+    /** {@inheritDoc} */
+    public boolean needsInput() {
+        return false;
+    }
+
+    /** {@inheritDoc} */
+    public void onPause() {
+        if (mCountdownTimer != null) {
+            mCountdownTimer.cancel();
+            mCountdownTimer = null;
+        }
+    }
+
+    /** {@inheritDoc} */
+    public void onResume() {
+        // reset header
+        resetStatusInfo();
+
+        // reset lock pattern
+        mLockPatternView.enableInput();
+        mLockPatternView.setEnabled(true);
+        mLockPatternView.clearPattern();
+
+        // show "forgot pattern?" button if we have an alternate authentication method
+        mForgotPatternButton.setVisibility(mCallback.doesFallbackUnlockScreenExist()
+                ? View.VISIBLE : View.INVISIBLE);
+
+        // if the user is currently locked out, enforce it.
+        long deadline = mLockPatternUtils.getLockoutAttemptDeadline();
+        if (deadline != 0) {
+            handleAttemptLockout(deadline);
+        }
+
+        // the footer depends on how many total attempts the user has failed
+        if (mCallback.isVerifyUnlockOnly()) {
+            updateFooter(FooterMode.VerifyUnlocked);
+        } else if (mEnableFallback &&
+                (mTotalFailedPatternAttempts >= LockPatternUtils.FAILED_ATTEMPTS_BEFORE_TIMEOUT)) {
+            updateFooter(FooterMode.ForgotLockPattern);
+        } else {
+            updateFooter(FooterMode.Normal);
+        }
+
+        refreshEmergencyButtonText();
+    }
+
+    /** {@inheritDoc} */
+    public void cleanUp() {
+        mUpdateMonitor.removeCallback(this);
+    }
+
+    @Override
+    public void onWindowFocusChanged(boolean hasWindowFocus) {
+        super.onWindowFocusChanged(hasWindowFocus);
+        if (hasWindowFocus) {
+            // when timeout dialog closes we want to update our state
+            onResume();
+        }
+    }
+
+    private class UnlockPatternListener
+            implements LockPatternView.OnPatternListener {
+
+        public void onPatternStart() {
+            mLockPatternView.removeCallbacks(mCancelPatternRunnable);
+        }
+
+        public void onPatternCleared() {
+        }
+
+        public void onPatternCellAdded(List<Cell> pattern) {
+            // To guard against accidental poking of the wakelock, look for
+            // the user actually trying to draw a pattern of some minimal length.
+            if (pattern.size() > MIN_PATTERN_BEFORE_POKE_WAKELOCK) {
+                mCallback.pokeWakelock(UNLOCK_PATTERN_WAKE_INTERVAL_MS);
+            } else {
+                // Give just a little extra time if they hit one of the first few dots
+                mCallback.pokeWakelock(UNLOCK_PATTERN_WAKE_INTERVAL_FIRST_DOTS_MS);
+            }
+        }
+
+        public void onPatternDetected(List<LockPatternView.Cell> pattern) {
+            if (mLockPatternUtils.checkPattern(pattern)) {
+                mLockPatternView
+                        .setDisplayMode(LockPatternView.DisplayMode.Correct);
+                mInstructions = "";
+                updateStatusLines();
+                mCallback.keyguardDone(true);
+                mCallback.reportSuccessfulUnlockAttempt();
+            } else {
+                if (pattern.size() > MIN_PATTERN_BEFORE_POKE_WAKELOCK) {
+                    mCallback.pokeWakelock(UNLOCK_PATTERN_WAKE_INTERVAL_MS);
+                }
+                mLockPatternView.setDisplayMode(LockPatternView.DisplayMode.Wrong);
+                if (pattern.size() >= LockPatternUtils.MIN_PATTERN_REGISTER_FAIL) {
+                    mTotalFailedPatternAttempts++;
+                    mFailedPatternAttemptsSinceLastTimeout++;
+                    mCallback.reportFailedUnlockAttempt();
+                }
+                if (mFailedPatternAttemptsSinceLastTimeout >= LockPatternUtils.FAILED_ATTEMPTS_BEFORE_TIMEOUT) {
+                    long deadline = mLockPatternUtils.setLockoutAttemptDeadline();
+                    handleAttemptLockout(deadline);
+                } else {
+                    // TODO mUnlockIcon.setVisibility(View.VISIBLE);
+                    mInstructions = getContext().getString(R.string.lockscreen_pattern_wrong);
+                    updateStatusLines();
+                    mLockPatternView.postDelayed(
+                            mCancelPatternRunnable,
+                            PATTERN_CLEAR_TIMEOUT_MS);
+                }
+            }
+        }
+    }
+
+    private void handleAttemptLockout(long elapsedRealtimeDeadline) {
+        mLockPatternView.clearPattern();
+        mLockPatternView.setEnabled(false);
+        long elapsedRealtime = SystemClock.elapsedRealtime();
+        mCountdownTimer = new CountDownTimer(elapsedRealtimeDeadline - elapsedRealtime, 1000) {
+
+            @Override
+            public void onTick(long millisUntilFinished) {
+                int secondsRemaining = (int) (millisUntilFinished / 1000);
+                mInstructions = getContext().getString(
+                        R.string.lockscreen_too_many_failed_attempts_countdown,
+                        secondsRemaining);
+                updateStatusLines();
+            }
+
+            @Override
+            public void onFinish() {
+                mLockPatternView.setEnabled(true);
+                mInstructions = getContext().getString(R.string.lockscreen_pattern_instructions);
+                updateStatusLines();
+                // TODO mUnlockIcon.setVisibility(View.VISIBLE);
+                mFailedPatternAttemptsSinceLastTimeout = 0;
+                if (mEnableFallback) {
+                    updateFooter(FooterMode.ForgotLockPattern);
+                } else {
+                    updateFooter(FooterMode.Normal);
+                }
+            }
+        }.start();
+    }
+
+    public void onPhoneStateChanged(String newState) {
+        refreshEmergencyButtonText();
+    }
+}
diff --git a/policy/src/com/android/internal/policy/impl/PhoneLayoutInflater.java b/policy/src/com/android/internal/policy/impl/PhoneLayoutInflater.java
new file mode 100644
index 0000000..6bf4beb
--- /dev/null
+++ b/policy/src/com/android/internal/policy/impl/PhoneLayoutInflater.java
@@ -0,0 +1,73 @@
+/*
+ * Copyright (C) 2006 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.android.internal.policy.impl;
+
+import java.util.Map;
+
+import android.content.Context;
+import android.util.AttributeSet;
+import android.view.View;
+import android.view.LayoutInflater;
+
+public class PhoneLayoutInflater extends LayoutInflater {
+    private static final String[] sClassPrefixList = {
+        "android.widget.",
+        "android.webkit."
+    };
+    
+    /**
+     * Instead of instantiating directly, you should retrieve an instance
+     * through {@link Context#getSystemService}
+     * 
+     * @param context The Context in which in which to find resources and other
+     *                application-specific things.
+     * 
+     * @see Context#getSystemService
+     */
+    public PhoneLayoutInflater(Context context) {
+        super(context);
+    }
+    
+    protected PhoneLayoutInflater(LayoutInflater original, Context newContext) {
+        super(original, newContext);
+    }
+    
+    /** Override onCreateView to instantiate names that correspond to the
+        widgets known to the Widget factory. If we don't find a match,
+        call through to our super class.
+    */
+    @Override protected View onCreateView(String name, AttributeSet attrs) throws ClassNotFoundException {
+        for (String prefix : sClassPrefixList) {
+            try {
+                View view = createView(name, prefix, attrs);
+                if (view != null) {
+                    return view;
+                }
+            } catch (ClassNotFoundException e) {
+                // In this case we want to let the base class take a crack
+                // at it.
+            }
+        }
+
+        return super.onCreateView(name, attrs);
+    }
+    
+    public LayoutInflater cloneInContext(Context newContext) {
+        return new PhoneLayoutInflater(this, newContext);
+    }
+}
+
diff --git a/policy/src/com/android/internal/policy/impl/PhoneWindow.java b/policy/src/com/android/internal/policy/impl/PhoneWindow.java
new file mode 100644
index 0000000..b9232c8
--- /dev/null
+++ b/policy/src/com/android/internal/policy/impl/PhoneWindow.java
@@ -0,0 +1,2808 @@
+/*
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.android.internal.policy.impl;
+
+import static android.view.ViewGroup.LayoutParams.MATCH_PARENT;
+import static android.view.ViewGroup.LayoutParams.WRAP_CONTENT;
+import static android.view.WindowManager.LayoutParams.FLAG_FULLSCREEN;
+import static android.view.WindowManager.LayoutParams.FLAG_LAYOUT_INSET_DECOR;
+import static android.view.WindowManager.LayoutParams.FLAG_LAYOUT_IN_SCREEN;
+import static android.view.WindowManager.LayoutParams.FLAG_SHOW_WALLPAPER;
+
+import com.android.internal.view.BaseSurfaceHolder;
+import com.android.internal.view.RootViewSurfaceTaker;
+import com.android.internal.view.menu.ContextMenuBuilder;
+import com.android.internal.view.menu.MenuBuilder;
+import com.android.internal.view.menu.MenuDialogHelper;
+import com.android.internal.view.menu.MenuView;
+import com.android.internal.view.menu.SubMenuBuilder;
+
+import android.app.KeyguardManager;
+import android.app.SearchManager;
+import android.content.ActivityNotFoundException;
+import android.content.Context;
+import android.content.Intent;
+import android.content.res.Configuration;
+import android.content.res.TypedArray;
+import android.graphics.Canvas;
+import android.graphics.PixelFormat;
+import android.graphics.Rect;
+import android.graphics.drawable.Drawable;
+import android.media.AudioManager;
+import android.net.Uri;
+import android.os.Bundle;
+import android.os.Parcel;
+import android.os.Parcelable;
+import android.os.SystemClock;
+import android.telephony.TelephonyManager;
+import android.util.AndroidRuntimeException;
+import android.util.Config;
+import android.util.EventLog;
+import android.util.Log;
+import android.util.SparseArray;
+import android.view.Gravity;
+import android.view.HapticFeedbackConstants;
+import android.view.InputQueue;
+import android.view.KeyCharacterMap;
+import android.view.KeyEvent;
+import android.view.LayoutInflater;
+import android.view.Menu;
+import android.view.MenuItem;
+import android.view.MotionEvent;
+import android.view.SurfaceHolder;
+import android.view.View;
+import android.view.ViewGroup;
+import android.view.ViewManager;
+import android.view.VolumePanel;
+import android.view.Window;
+import android.view.WindowManager;
+import android.view.accessibility.AccessibilityEvent;
+import android.view.accessibility.AccessibilityManager;
+import android.view.animation.Animation;
+import android.view.animation.AnimationUtils;
+import android.view.inputmethod.InputMethodManager;
+import android.widget.FrameLayout;
+import android.widget.ImageView;
+import android.widget.ProgressBar;
+import android.widget.TextView;
+
+/**
+ * Android-specific Window.
+ * <p>
+ * todo: need to pull the generic functionality out into a base class
+ * in android.widget.
+ */
+public class PhoneWindow extends Window implements MenuBuilder.Callback {
+
+    private final static String TAG = "PhoneWindow";
+
+    private final static boolean SWEEP_OPEN_MENU = false;
+
+    /**
+     * Simple callback used by the context menu and its submenus. The options
+     * menu submenus do not use this (their behavior is more complex).
+     */
+    ContextMenuCallback mContextMenuCallback = new ContextMenuCallback(FEATURE_CONTEXT_MENU);
+
+    // This is the top-level view of the window, containing the window decor.
+    private DecorView mDecor;
+
+    // This is the view in which the window contents are placed. It is either
+    // mDecor itself, or a child of mDecor where the contents go.
+    private ViewGroup mContentParent;
+
+    SurfaceHolder.Callback2 mTakeSurfaceCallback;
+    BaseSurfaceHolder mSurfaceHolder;
+    
+    InputQueue.Callback mTakeInputQueueCallback;
+    
+    private boolean mIsFloating;
+
+    private LayoutInflater mLayoutInflater;
+
+    private TextView mTitleView;
+
+    private DrawableFeatureState[] mDrawables;
+
+    private PanelFeatureState[] mPanels;
+
+    /**
+     * The panel that is prepared or opened (the most recent one if there are
+     * multiple panels). Shortcuts will go to this panel. It gets set in
+     * {@link #preparePanel} and cleared in {@link #closePanel}.
+     */
+    private PanelFeatureState mPreparedPanel;
+
+    /**
+     * The keycode that is currently held down (as a modifier) for chording. If
+     * this is 0, there is no key held down.
+     */
+    private int mPanelChordingKey;
+    private boolean mPanelMayLongPress;
+
+    private ImageView mLeftIconView;
+
+    private ImageView mRightIconView;
+
+    private ProgressBar mCircularProgressBar;
+
+    private ProgressBar mHorizontalProgressBar;
+
+    private int mBackgroundResource = 0;
+
+    private Drawable mBackgroundDrawable;
+
+    private int mFrameResource = 0;
+
+    private int mTextColor = 0;
+
+    private CharSequence mTitle = null;
+
+    private int mTitleColor = 0;
+
+    private ContextMenuBuilder mContextMenu;
+    private MenuDialogHelper mContextMenuHelper;
+
+    private int mVolumeControlStreamType = AudioManager.USE_DEFAULT_STREAM_TYPE;
+    private long mVolumeKeyUpTime;
+
+    private KeyguardManager mKeyguardManager = null;
+    
+    private SearchManager mSearchManager = null;
+
+    private TelephonyManager mTelephonyManager = null;
+    
+    public PhoneWindow(Context context) {
+        super(context);
+        mLayoutInflater = LayoutInflater.from(context);
+    }
+
+    @Override
+    public final void setContainer(Window container) {
+        super.setContainer(container);
+    }
+
+    @Override
+    public boolean requestFeature(int featureId) {
+        if (mContentParent != null) {
+            throw new AndroidRuntimeException("requestFeature() must be called before adding content");
+        }
+        final int features = getFeatures();
+        if ((features != DEFAULT_FEATURES) && (featureId == FEATURE_CUSTOM_TITLE)) {
+
+            /* Another feature is enabled and the user is trying to enable the custom title feature */
+            throw new AndroidRuntimeException("You cannot combine custom titles with other title features");
+        }
+        if (((features & (1 << FEATURE_CUSTOM_TITLE)) != 0) && (featureId != FEATURE_CUSTOM_TITLE)) {
+
+            /* Custom title feature is enabled and the user is trying to enable another feature */
+            throw new AndroidRuntimeException("You cannot combine custom titles with other title features");
+        }
+        if (featureId == FEATURE_OPENGL) {
+            getAttributes().memoryType = WindowManager.LayoutParams.MEMORY_TYPE_GPU;
+        }
+        return super.requestFeature(featureId);
+    }
+
+    @Override
+    public void setContentView(int layoutResID) {
+        if (mContentParent == null) {
+            installDecor();
+        } else {
+            mContentParent.removeAllViews();
+        }
+        mLayoutInflater.inflate(layoutResID, mContentParent);
+        final Callback cb = getCallback();
+        if (cb != null) {
+            cb.onContentChanged();
+        }
+    }
+
+    @Override
+    public void setContentView(View view) {
+        setContentView(view, new ViewGroup.LayoutParams(MATCH_PARENT, MATCH_PARENT));
+    }
+
+    @Override
+    public void setContentView(View view, ViewGroup.LayoutParams params) {
+        if (mContentParent == null) {
+            installDecor();
+        } else {
+            mContentParent.removeAllViews();
+        }
+        mContentParent.addView(view, params);
+        final Callback cb = getCallback();
+        if (cb != null) {
+            cb.onContentChanged();
+        }
+    }
+
+    @Override
+    public void addContentView(View view, ViewGroup.LayoutParams params) {
+        if (mContentParent == null) {
+            installDecor();
+        }
+        mContentParent.addView(view, params);
+        final Callback cb = getCallback();
+        if (cb != null) {
+            cb.onContentChanged();
+        }
+    }
+
+    @Override
+    public View getCurrentFocus() {
+        return mDecor != null ? mDecor.findFocus() : null;
+    }
+
+    @Override
+    public void takeSurface(SurfaceHolder.Callback2 callback) {
+        mTakeSurfaceCallback = callback;
+    }
+    
+    public void takeInputQueue(InputQueue.Callback callback) {
+        mTakeInputQueueCallback = callback;
+    }
+    
+    @Override
+    public boolean isFloating() {
+        return mIsFloating;
+    }
+
+    /**
+     * Return a LayoutInflater instance that can be used to inflate XML view layout
+     * resources for use in this Window.
+     *
+     * @return LayoutInflater The shared LayoutInflater.
+     */
+    @Override
+    public LayoutInflater getLayoutInflater() {
+        return mLayoutInflater;
+    }
+
+    @Override
+    public void setTitle(CharSequence title) {
+        if (mTitleView != null) {
+            mTitleView.setText(title);
+        }
+        mTitle = title;
+    }
+
+    @Override
+    public void setTitleColor(int textColor) {
+        if (mTitleView != null) {
+            mTitleView.setTextColor(textColor);
+        }
+        mTitleColor = textColor;
+    }
+
+    /**
+     * Prepares the panel to either be opened or chorded. This creates the Menu
+     * instance for the panel and populates it via the Activity callbacks.
+     *
+     * @param st The panel state to prepare.
+     * @param event The event that triggered the preparing of the panel.
+     * @return Whether the panel was prepared. If the panel should not be shown,
+     *         returns false.
+     */
+    public final boolean preparePanel(PanelFeatureState st, KeyEvent event) {
+        // Already prepared (isPrepared will be reset to false later)
+        if (st.isPrepared)
+            return true;
+
+        if ((mPreparedPanel != null) && (mPreparedPanel != st)) {
+            // Another Panel is prepared and possibly open, so close it
+            closePanel(mPreparedPanel, false);
+        }
+
+        final Callback cb = getCallback();
+
+        if (cb != null) {
+            st.createdPanelView = cb.onCreatePanelView(st.featureId);
+        }
+
+        if (st.createdPanelView == null) {
+            // Init the panel state's menu--return false if init failed
+            if (st.menu == null) {
+                if (!initializePanelMenu(st) || (st.menu == null)) {
+                    return false;
+                }
+                // Call callback, and return if it doesn't want to display menu
+                if ((cb == null) || !cb.onCreatePanelMenu(st.featureId, st.menu)) {
+                    // Ditch the menu created above
+                    st.menu = null;
+
+                    return false;
+                }
+            }
+
+            // Callback and return if the callback does not want to show the menu
+            if (!cb.onPreparePanel(st.featureId, st.createdPanelView, st.menu)) {
+                return false;
+            }
+
+            // Set the proper keymap
+            KeyCharacterMap kmap = KeyCharacterMap.load(event != null ? event.getDeviceId() : 0);
+            st.qwertyMode = kmap.getKeyboardType() != KeyCharacterMap.NUMERIC;
+            st.menu.setQwertyMode(st.qwertyMode);
+        }
+
+        // Set other state
+        st.isPrepared = true;
+        st.isHandled = false;
+        mPreparedPanel = st;
+
+        return true;
+    }
+
+    @Override
+    public void onConfigurationChanged(Configuration newConfig) {
+        PanelFeatureState st = getPanelState(FEATURE_OPTIONS_PANEL, false);
+        if ((st != null) && (st.menu != null)) {
+            final MenuBuilder menuBuilder = (MenuBuilder) st.menu;
+
+            if (st.isOpen) {
+                // Freeze state
+                final Bundle state = new Bundle();
+                menuBuilder.saveHierarchyState(state);
+
+                // Remove the menu views since they need to be recreated
+                // according to the new configuration
+                clearMenuViews(st);
+
+                // Re-open the same menu
+                reopenMenu(false);
+
+                // Restore state
+                menuBuilder.restoreHierarchyState(state);
+
+            } else {
+                // Clear menu views so on next menu opening, it will use
+                // the proper layout
+                clearMenuViews(st);
+            }
+        }
+
+    }
+
+    private static void clearMenuViews(PanelFeatureState st) {
+
+        // This can be called on config changes, so we should make sure
+        // the views will be reconstructed based on the new orientation, etc.
+
+        // Allow the callback to create a new panel view
+        st.createdPanelView = null;
+
+        // Causes the decor view to be recreated
+        st.refreshDecorView = true;
+
+        ((MenuBuilder) st.menu).clearMenuViews();
+    }
+
+    @Override
+    public final void openPanel(int featureId, KeyEvent event) {
+        openPanel(getPanelState(featureId, true), event);
+    }
+
+    private void openPanel(PanelFeatureState st, KeyEvent event) {
+        // System.out.println("Open panel: isOpen=" + st.isOpen);
+
+        // Already open, return
+        if (st.isOpen) {
+            return;
+        }
+
+        Callback cb = getCallback();
+        if ((cb != null) && (!cb.onMenuOpened(st.featureId, st.menu))) {
+            // Callback doesn't want the menu to open, reset any state
+            closePanel(st, true);
+            return;
+        }
+
+        final WindowManager wm = getWindowManager();
+        if (wm == null) {
+            return;
+        }
+
+        // Prepare panel (should have been done before, but just in case)
+        if (!preparePanel(st, event)) {
+            return;
+        }
+
+        if (st.decorView == null || st.refreshDecorView) {
+            if (st.decorView == null) {
+                // Initialize the panel decor, this will populate st.decorView
+                if (!initializePanelDecor(st) || (st.decorView == null))
+                    return;
+            } else if (st.refreshDecorView && (st.decorView.getChildCount() > 0)) {
+                // Decor needs refreshing, so remove its views
+                st.decorView.removeAllViews();
+            }
+
+            // This will populate st.shownPanelView
+            if (!initializePanelContent(st) || (st.shownPanelView == null)) {
+                return;
+            }
+
+            ViewGroup.LayoutParams lp = st.shownPanelView.getLayoutParams();
+            if (lp == null) {
+                lp = new ViewGroup.LayoutParams(WRAP_CONTENT, WRAP_CONTENT);
+            }
+
+            int backgroundResId;
+            if (lp.width == ViewGroup.LayoutParams.MATCH_PARENT) {
+                // If the contents is fill parent for the width, set the
+                // corresponding background
+                backgroundResId = st.fullBackground;
+            } else {
+                // Otherwise, set the normal panel background
+                backgroundResId = st.background;
+            }
+            st.decorView.setWindowBackground(getContext().getResources().getDrawable(
+                    backgroundResId));
+
+
+            st.decorView.addView(st.shownPanelView, lp);
+
+            /*
+             * Give focus to the view, if it or one of its children does not
+             * already have it.
+             */
+            if (!st.shownPanelView.hasFocus()) {
+                st.shownPanelView.requestFocus();
+            }
+        }
+
+        st.isOpen = true;
+        st.isHandled = false;
+
+        WindowManager.LayoutParams lp = new WindowManager.LayoutParams(
+                WRAP_CONTENT, WRAP_CONTENT,
+                st.x, st.y, WindowManager.LayoutParams.TYPE_APPLICATION_ATTACHED_DIALOG,
+                WindowManager.LayoutParams.FLAG_DITHER
+                | WindowManager.LayoutParams.FLAG_ALT_FOCUSABLE_IM,
+                st.decorView.mDefaultOpacity);
+
+        lp.gravity = st.gravity;
+        lp.windowAnimations = st.windowAnimations;
+        
+        wm.addView(st.decorView, lp);
+        // Log.v(TAG, "Adding main menu to window manager.");
+    }
+
+    @Override
+    public final void closePanel(int featureId) {
+        if (featureId == FEATURE_CONTEXT_MENU) {
+            closeContextMenu();
+        } else {
+            closePanel(getPanelState(featureId, true), true);
+        }
+    }
+
+    /**
+     * Closes the given panel.
+     *
+     * @param st The panel to be closed.
+     * @param doCallback Whether to notify the callback that the panel was
+     *            closed. If the panel is in the process of re-opening or
+     *            opening another panel (e.g., menu opening a sub menu), the
+     *            callback should not happen and this variable should be false.
+     *            In addition, this method internally will only perform the
+     *            callback if the panel is open.
+     */
+    public final void closePanel(PanelFeatureState st, boolean doCallback) {
+        // System.out.println("Close panel: isOpen=" + st.isOpen);
+        final ViewManager wm = getWindowManager();
+        if ((wm != null) && st.isOpen) {
+            if (st.decorView != null) {
+                wm.removeView(st.decorView);
+                // Log.v(TAG, "Removing main menu from window manager.");
+            }
+
+            if (doCallback) {
+                callOnPanelClosed(st.featureId, st, null);
+            }
+        }
+        st.isPrepared = false;
+        st.isHandled = false;
+        st.isOpen = false;
+
+        // This view is no longer shown, so null it out
+        st.shownPanelView = null;
+
+        if (st.isInExpandedMode) {
+            // Next time the menu opens, it should not be in expanded mode, so
+            // force a refresh of the decor
+            st.refreshDecorView = true;
+            st.isInExpandedMode = false;
+        }
+
+        if (mPreparedPanel == st) {
+            mPreparedPanel = null;
+            mPanelChordingKey = 0;
+        }
+    }
+
+    @Override
+    public final void togglePanel(int featureId, KeyEvent event) {
+        PanelFeatureState st = getPanelState(featureId, true);
+        if (st.isOpen) {
+            closePanel(st, true);
+        } else {
+            openPanel(st, event);
+        }
+    }
+
+    /**
+     * Called when the panel key is pushed down.
+     * @param featureId The feature ID of the relevant panel (defaults to FEATURE_OPTIONS_PANEL}.
+     * @param event The key event.
+     * @return Whether the key was handled.
+     */
+    public final boolean onKeyDownPanel(int featureId, KeyEvent event) {
+        final int keyCode = event.getKeyCode();
+        
+        if (event.getRepeatCount() == 0) {
+            // The panel key was pushed, so set the chording key
+            mPanelChordingKey = keyCode;
+            mPanelMayLongPress = false;
+            
+            PanelFeatureState st = getPanelState(featureId, true);
+            if (!st.isOpen) {
+                if (getContext().getResources().getConfiguration().keyboard
+                        == Configuration.KEYBOARD_NOKEYS) {
+                    mPanelMayLongPress = true;
+                }
+                return preparePanel(st, event);
+            }
+            
+        } else if (mPanelMayLongPress && mPanelChordingKey == keyCode
+                && (event.getFlags()&KeyEvent.FLAG_LONG_PRESS) != 0) {
+            // We have had a long press while in a state where this
+            // should be executed...  do it!
+            mPanelChordingKey = 0;
+            mPanelMayLongPress = false;
+            InputMethodManager imm = (InputMethodManager)
+                    getContext().getSystemService(Context.INPUT_METHOD_SERVICE);
+            if (imm != null) {
+                mDecor.performHapticFeedback(HapticFeedbackConstants.LONG_PRESS);
+                imm.toggleSoftInput(InputMethodManager.SHOW_FORCED, 0);
+            }
+            
+        }
+
+        return false;
+    }
+
+    /**
+     * Called when the panel key is released.
+     * @param featureId The feature ID of the relevant panel (defaults to FEATURE_OPTIONS_PANEL}.
+     * @param event The key event.
+     */
+    public final void onKeyUpPanel(int featureId, KeyEvent event) {
+        // The panel key was released, so clear the chording key
+        if (mPanelChordingKey != 0) {
+            mPanelChordingKey = 0;
+            mPanelMayLongPress = false;
+
+            if (event.isCanceled()) {
+                return;
+            }
+            
+            boolean playSoundEffect = false;
+            PanelFeatureState st = getPanelState(featureId, true);
+            if (st.isOpen || st.isHandled) {
+
+                // Play the sound effect if the user closed an open menu (and not if
+                // they just released a menu shortcut)
+                playSoundEffect = st.isOpen;
+
+                // Close menu
+                closePanel(st, true);
+
+            } else if (st.isPrepared) {
+
+                // Write 'menu opened' to event log
+                EventLog.writeEvent(50001, 0);
+
+                // Show menu
+                openPanel(st, event);
+
+                playSoundEffect = true;
+            }
+
+            if (playSoundEffect) {
+                AudioManager audioManager = (AudioManager) getContext().getSystemService(
+                        Context.AUDIO_SERVICE);
+                if (audioManager != null) {
+                    audioManager.playSoundEffect(AudioManager.FX_KEY_CLICK);
+                } else {
+                    Log.w(TAG, "Couldn't get audio manager");
+                }
+            }
+        }
+    }
+
+    @Override
+    public final void closeAllPanels() {
+        final ViewManager wm = getWindowManager();
+        if (wm == null) {
+            return;
+        }
+
+        final PanelFeatureState[] panels = mPanels;
+        final int N = panels != null ? panels.length : 0;
+        for (int i = 0; i < N; i++) {
+            final PanelFeatureState panel = panels[i];
+            if (panel != null) {
+                closePanel(panel, true);
+            }
+        }
+
+        closeContextMenu();
+    }
+
+    /**
+     * Closes the context menu. This notifies the menu logic of the close, along
+     * with dismissing it from the UI.
+     */
+    private synchronized void closeContextMenu() {
+        if (mContextMenu != null) {
+            mContextMenu.close();
+            dismissContextMenu();
+        }
+    }
+
+    /**
+     * Dismisses just the context menu UI. To close the context menu, use
+     * {@link #closeContextMenu()}.
+     */
+    private synchronized void dismissContextMenu() {
+        mContextMenu = null;
+
+        if (mContextMenuHelper != null) {
+            mContextMenuHelper.dismiss();
+            mContextMenuHelper = null;
+        }
+    }
+
+    @Override
+    public boolean performPanelShortcut(int featureId, int keyCode, KeyEvent event, int flags) {
+        return performPanelShortcut(getPanelState(featureId, true), keyCode, event, flags);
+    }
+
+    private boolean performPanelShortcut(PanelFeatureState st, int keyCode, KeyEvent event,
+            int flags) {
+        if (event.isSystem() || (st == null)) {
+            return false;
+        }
+
+        boolean handled = false;
+
+        // Only try to perform menu shortcuts if preparePanel returned true (possible false
+        // return value from application not wanting to show the menu).
+        if ((st.isPrepared || preparePanel(st, event)) && st.menu != null) {
+            // The menu is prepared now, perform the shortcut on it
+            handled = st.menu.performShortcut(keyCode, event, flags);
+        }
+
+        if (handled) {
+            // Mark as handled
+            st.isHandled = true;
+
+            if ((flags & Menu.FLAG_PERFORM_NO_CLOSE) == 0) {
+                closePanel(st, true);
+            }
+        }
+
+        return handled;
+    }
+
+    @Override
+    public boolean performPanelIdentifierAction(int featureId, int id, int flags) {
+
+        PanelFeatureState st = getPanelState(featureId, true);
+        if (!preparePanel(st, new KeyEvent(KeyEvent.ACTION_DOWN, KeyEvent.KEYCODE_MENU))) {
+            return false;
+        }
+        if (st.menu == null) {
+            return false;
+        }
+
+        boolean res = st.menu.performIdentifierAction(id, flags);
+
+        closePanel(st, true);
+
+        return res;
+    }
+
+    public PanelFeatureState findMenuPanel(Menu menu) {
+        final PanelFeatureState[] panels = mPanels;
+        final int N = panels != null ? panels.length : 0;
+        for (int i = 0; i < N; i++) {
+            final PanelFeatureState panel = panels[i];
+            if (panel != null && panel.menu == menu) {
+                return panel;
+            }
+        }
+        return null;
+    }
+
+    public boolean onMenuItemSelected(MenuBuilder menu, MenuItem item) {
+        final Callback cb = getCallback();
+        if (cb != null) {
+            final PanelFeatureState panel = findMenuPanel(menu.getRootMenu());
+            if (panel != null) {
+                return cb.onMenuItemSelected(panel.featureId, item);
+            }
+        }
+        return false;
+    }
+
+    public void onCloseMenu(MenuBuilder menu, boolean allMenusAreClosing) {
+        final PanelFeatureState panel = findMenuPanel(menu);
+        if (panel != null) {
+            // Close the panel and only do the callback if the menu is being
+            // closed
+            // completely, not if opening a sub menu
+            closePanel(panel, allMenusAreClosing);
+        }
+    }
+
+    public void onCloseSubMenu(SubMenuBuilder subMenu) {
+        final Menu parentMenu = subMenu.getRootMenu();
+        final PanelFeatureState panel = findMenuPanel(parentMenu);
+
+        // Callback
+        if (panel != null) {
+            callOnPanelClosed(panel.featureId, panel, parentMenu);
+            closePanel(panel, true);
+        }
+    }
+
+    public boolean onSubMenuSelected(final SubMenuBuilder subMenu) {
+        if (!subMenu.hasVisibleItems()) {
+            return true;
+        }
+
+        // The window manager will give us a valid window token
+        new MenuDialogHelper(subMenu).show(null);
+
+        return true;
+    }
+
+    public void onMenuModeChange(MenuBuilder menu) {
+        reopenMenu(true);
+    }
+
+    private void reopenMenu(boolean toggleMenuMode) {
+        PanelFeatureState st = getPanelState(FEATURE_OPTIONS_PANEL, true);
+
+        // Save the future expanded mode state since closePanel will reset it
+        boolean newExpandedMode = toggleMenuMode ? !st.isInExpandedMode : st.isInExpandedMode;
+
+        st.refreshDecorView = true;
+        closePanel(st, false);
+
+        // Set the expanded mode state
+        st.isInExpandedMode = newExpandedMode;
+
+        openPanel(st, null);
+    }
+
+    /**
+     * Initializes the menu associated with the given panel feature state. You
+     * must at the very least set PanelFeatureState.menu to the Menu to be
+     * associated with the given panel state. The default implementation creates
+     * a new menu for the panel state.
+     *
+     * @param st The panel whose menu is being initialized.
+     * @return Whether the initialization was successful.
+     */
+    protected boolean initializePanelMenu(final PanelFeatureState st) {
+        final MenuBuilder menu = new MenuBuilder(getContext());
+
+        menu.setCallback(this);
+        st.setMenu(menu);
+
+        return true;
+    }
+
+    /**
+     * Perform initial setup of a panel. This should at the very least set the
+     * style information in the PanelFeatureState and must set
+     * PanelFeatureState.decor to the panel's window decor view.
+     *
+     * @param st The panel being initialized.
+     */
+    protected boolean initializePanelDecor(PanelFeatureState st) {
+        st.decorView = new DecorView(getContext(), st.featureId);
+        st.gravity = Gravity.CENTER | Gravity.BOTTOM;
+        st.setStyle(getContext());
+
+        return true;
+    }
+
+    /**
+     * Initializes the panel associated with the panel feature state. You must
+     * at the very least set PanelFeatureState.panel to the View implementing
+     * its contents. The default implementation gets the panel from the menu.
+     *
+     * @param st The panel state being initialized.
+     * @return Whether the initialization was successful.
+     */
+    protected boolean initializePanelContent(PanelFeatureState st) {
+
+        if (st.createdPanelView != null) {
+            st.shownPanelView = st.createdPanelView;
+            return true;
+        }
+
+        final MenuBuilder menu = (MenuBuilder)st.menu;
+        if (menu == null) {
+            return false;
+        }
+
+        st.shownPanelView = menu.getMenuView((st.isInExpandedMode) ? MenuBuilder.TYPE_EXPANDED
+                : MenuBuilder.TYPE_ICON, st.decorView);
+
+        if (st.shownPanelView != null) {
+            // Use the menu View's default animations if it has any
+            final int defaultAnimations = ((MenuView) st.shownPanelView).getWindowAnimations();
+            if (defaultAnimations != 0) {
+                st.windowAnimations = defaultAnimations;
+            }
+            return true;
+        } else {
+            return false;
+        }
+    }
+
+    @Override
+    public boolean performContextMenuIdentifierAction(int id, int flags) {
+        return (mContextMenu != null) ? mContextMenu.performIdentifierAction(id, flags) : false;
+    }
+
+    @Override
+    public final void setBackgroundDrawable(Drawable drawable) {
+        if (drawable != mBackgroundDrawable || mBackgroundResource != 0) {
+            mBackgroundResource = 0;
+            mBackgroundDrawable = drawable;
+            if (mDecor != null) {
+                mDecor.setWindowBackground(drawable);
+            }
+        }
+    }
+
+    @Override
+    public final void setFeatureDrawableResource(int featureId, int resId) {
+        if (resId != 0) {
+            DrawableFeatureState st = getDrawableState(featureId, true);
+            if (st.resid != resId) {
+                st.resid = resId;
+                st.uri = null;
+                st.local = getContext().getResources().getDrawable(resId);
+                updateDrawable(featureId, st, false);
+            }
+        } else {
+            setFeatureDrawable(featureId, null);
+        }
+    }
+
+    @Override
+    public final void setFeatureDrawableUri(int featureId, Uri uri) {
+        if (uri != null) {
+            DrawableFeatureState st = getDrawableState(featureId, true);
+            if (st.uri == null || !st.uri.equals(uri)) {
+                st.resid = 0;
+                st.uri = uri;
+                st.local = loadImageURI(uri);
+                updateDrawable(featureId, st, false);
+            }
+        } else {
+            setFeatureDrawable(featureId, null);
+        }
+    }
+
+    @Override
+    public final void setFeatureDrawable(int featureId, Drawable drawable) {
+        DrawableFeatureState st = getDrawableState(featureId, true);
+        st.resid = 0;
+        st.uri = null;
+        if (st.local != drawable) {
+            st.local = drawable;
+            updateDrawable(featureId, st, false);
+        }
+    }
+
+    @Override
+    public void setFeatureDrawableAlpha(int featureId, int alpha) {
+        DrawableFeatureState st = getDrawableState(featureId, true);
+        if (st.alpha != alpha) {
+            st.alpha = alpha;
+            updateDrawable(featureId, st, false);
+        }
+    }
+
+    protected final void setFeatureDefaultDrawable(int featureId, Drawable drawable) {
+        DrawableFeatureState st = getDrawableState(featureId, true);
+        if (st.def != drawable) {
+            st.def = drawable;
+            updateDrawable(featureId, st, false);
+        }
+    }
+
+    @Override
+    public final void setFeatureInt(int featureId, int value) {
+        // XXX Should do more management (as with drawable features) to
+        // deal with interactions between multiple window policies.
+        updateInt(featureId, value, false);
+    }
+
+    /**
+     * Update the state of a drawable feature. This should be called, for every
+     * drawable feature supported, as part of onActive(), to make sure that the
+     * contents of a containing window is properly updated.
+     *
+     * @see #onActive
+     * @param featureId The desired drawable feature to change.
+     * @param fromActive Always true when called from onActive().
+     */
+    protected final void updateDrawable(int featureId, boolean fromActive) {
+        final DrawableFeatureState st = getDrawableState(featureId, false);
+        if (st != null) {
+            updateDrawable(featureId, st, fromActive);
+        }
+    }
+
+    /**
+     * Called when a Drawable feature changes, for the window to update its
+     * graphics.
+     *
+     * @param featureId The feature being changed.
+     * @param drawable The new Drawable to show, or null if none.
+     * @param alpha The new alpha blending of the Drawable.
+     */
+    protected void onDrawableChanged(int featureId, Drawable drawable, int alpha) {
+        ImageView view;
+        if (featureId == FEATURE_LEFT_ICON) {
+            view = getLeftIconView();
+        } else if (featureId == FEATURE_RIGHT_ICON) {
+            view = getRightIconView();
+        } else {
+            return;
+        }
+
+        if (drawable != null) {
+            drawable.setAlpha(alpha);
+            view.setImageDrawable(drawable);
+            view.setVisibility(View.VISIBLE);
+        } else {
+            view.setVisibility(View.GONE);
+        }
+    }
+
+    /**
+     * Called when an int feature changes, for the window to update its
+     * graphics.
+     *
+     * @param featureId The feature being changed.
+     * @param value The new integer value.
+     */
+    protected void onIntChanged(int featureId, int value) {
+        if (featureId == FEATURE_PROGRESS || featureId == FEATURE_INDETERMINATE_PROGRESS) {
+            updateProgressBars(value);
+        } else if (featureId == FEATURE_CUSTOM_TITLE) {
+            FrameLayout titleContainer = (FrameLayout) findViewById(com.android.internal.R.id.title_container);
+            if (titleContainer != null) {
+                mLayoutInflater.inflate(value, titleContainer);
+            }
+        }
+    }
+
+    /**
+     * Updates the progress bars that are shown in the title bar.
+     *
+     * @param value Can be one of {@link Window#PROGRESS_VISIBILITY_ON},
+     *            {@link Window#PROGRESS_VISIBILITY_OFF},
+     *            {@link Window#PROGRESS_INDETERMINATE_ON},
+     *            {@link Window#PROGRESS_INDETERMINATE_OFF}, or a value
+     *            starting at {@link Window#PROGRESS_START} through
+     *            {@link Window#PROGRESS_END} for setting the default
+     *            progress (if {@link Window#PROGRESS_END} is given,
+     *            the progress bar widgets in the title will be hidden after an
+     *            animation), a value between
+     *            {@link Window#PROGRESS_SECONDARY_START} -
+     *            {@link Window#PROGRESS_SECONDARY_END} for the
+     *            secondary progress (if
+     *            {@link Window#PROGRESS_SECONDARY_END} is given, the
+     *            progress bar widgets will still be shown with the secondary
+     *            progress bar will be completely filled in.)
+     */
+    private void updateProgressBars(int value) {
+        ProgressBar circularProgressBar = getCircularProgressBar(true);
+        ProgressBar horizontalProgressBar = getHorizontalProgressBar(true);
+
+        final int features = getLocalFeatures();
+        if (value == PROGRESS_VISIBILITY_ON) {
+            if ((features & (1 << FEATURE_PROGRESS)) != 0) {
+                int level = horizontalProgressBar.getProgress();
+                int visibility = (horizontalProgressBar.isIndeterminate() || level < 10000) ?
+                        View.VISIBLE : View.INVISIBLE;
+                horizontalProgressBar.setVisibility(visibility);
+            }
+            if ((features & (1 << FEATURE_INDETERMINATE_PROGRESS)) != 0) {
+                circularProgressBar.setVisibility(View.VISIBLE);
+            }
+        } else if (value == PROGRESS_VISIBILITY_OFF) {
+            if ((features & (1 << FEATURE_PROGRESS)) != 0) {
+                horizontalProgressBar.setVisibility(View.GONE);
+            }
+            if ((features & (1 << FEATURE_INDETERMINATE_PROGRESS)) != 0) {
+                circularProgressBar.setVisibility(View.GONE);
+            }
+        } else if (value == PROGRESS_INDETERMINATE_ON) {
+            horizontalProgressBar.setIndeterminate(true);
+        } else if (value == PROGRESS_INDETERMINATE_OFF) {
+            horizontalProgressBar.setIndeterminate(false);
+        } else if (PROGRESS_START <= value && value <= PROGRESS_END) {
+            // We want to set the progress value before testing for visibility
+            // so that when the progress bar becomes visible again, it has the
+            // correct level.
+            horizontalProgressBar.setProgress(value - PROGRESS_START);
+
+            if (value < PROGRESS_END) {
+                showProgressBars(horizontalProgressBar, circularProgressBar);
+            } else {
+                hideProgressBars(horizontalProgressBar, circularProgressBar);
+            }
+        } else if (PROGRESS_SECONDARY_START <= value && value <= PROGRESS_SECONDARY_END) {
+            horizontalProgressBar.setSecondaryProgress(value - PROGRESS_SECONDARY_START);
+
+            showProgressBars(horizontalProgressBar, circularProgressBar);
+        }
+
+    }
+
+    private void showProgressBars(ProgressBar horizontalProgressBar, ProgressBar spinnyProgressBar) {
+        final int features = getLocalFeatures();
+        if ((features & (1 << FEATURE_INDETERMINATE_PROGRESS)) != 0 &&
+                spinnyProgressBar.getVisibility() == View.INVISIBLE) {
+            spinnyProgressBar.setVisibility(View.VISIBLE);
+        }
+        // Only show the progress bars if the primary progress is not complete
+        if ((features & (1 << FEATURE_PROGRESS)) != 0 &&
+                horizontalProgressBar.getProgress() < 10000) {
+            horizontalProgressBar.setVisibility(View.VISIBLE);
+        }
+    }
+
+    private void hideProgressBars(ProgressBar horizontalProgressBar, ProgressBar spinnyProgressBar) {
+        final int features = getLocalFeatures();
+        Animation anim = AnimationUtils.loadAnimation(getContext(), com.android.internal.R.anim.fade_out);
+        anim.setDuration(1000);
+        if ((features & (1 << FEATURE_INDETERMINATE_PROGRESS)) != 0 &&
+                spinnyProgressBar.getVisibility() == View.VISIBLE) {
+            spinnyProgressBar.startAnimation(anim);
+            spinnyProgressBar.setVisibility(View.INVISIBLE);
+        }
+        if ((features & (1 << FEATURE_PROGRESS)) != 0 &&
+                horizontalProgressBar.getVisibility() == View.VISIBLE) {
+            horizontalProgressBar.startAnimation(anim);
+            horizontalProgressBar.setVisibility(View.INVISIBLE);
+        }
+    }
+
+    /**
+     * Request that key events come to this activity. Use this if your activity
+     * has no views with focus, but the activity still wants a chance to process
+     * key events.
+     */
+    @Override
+    public void takeKeyEvents(boolean get) {
+        mDecor.setFocusable(get);
+    }
+
+    @Override
+    public boolean superDispatchKeyEvent(KeyEvent event) {
+        return mDecor.superDispatchKeyEvent(event);
+    }
+
+    @Override
+    public boolean superDispatchTouchEvent(MotionEvent event) {
+        return mDecor.superDispatchTouchEvent(event);
+    }
+
+    @Override
+    public boolean superDispatchTrackballEvent(MotionEvent event) {
+        return mDecor.superDispatchTrackballEvent(event);
+    }
+
+    /**
+     * A key was pressed down and not handled by anything else in the window.
+     *
+     * @see #onKeyUp
+     * @see android.view.KeyEvent
+     */
+    protected boolean onKeyDown(int featureId, int keyCode, KeyEvent event) {
+        final KeyEvent.DispatcherState dispatcher =
+                mDecor != null ? mDecor.getKeyDispatcherState() : null;
+        //Log.i(TAG, "Key down: repeat=" + event.getRepeatCount()
+        //        + " flags=0x" + Integer.toHexString(event.getFlags()));
+        
+        switch (keyCode) {
+            case KeyEvent.KEYCODE_VOLUME_UP:
+            case KeyEvent.KEYCODE_VOLUME_DOWN: {
+                AudioManager audioManager = (AudioManager) getContext().getSystemService(
+                        Context.AUDIO_SERVICE);
+                if (audioManager != null) {
+                    /*
+                     * Adjust the volume in on key down since it is more
+                     * responsive to the user.
+                     */
+                    audioManager.adjustSuggestedStreamVolume(
+                            keyCode == KeyEvent.KEYCODE_VOLUME_UP
+                                    ? AudioManager.ADJUST_RAISE
+                                    : AudioManager.ADJUST_LOWER,
+                            mVolumeControlStreamType,
+                            AudioManager.FLAG_SHOW_UI | AudioManager.FLAG_VIBRATE);
+                }
+                return true;
+            }
+
+
+            case KeyEvent.KEYCODE_MEDIA_PLAY_PAUSE:
+                /* Suppress PLAYPAUSE toggle when phone is ringing or in-call
+                 * to avoid music playback */
+                if (mTelephonyManager == null) {
+                    mTelephonyManager = (TelephonyManager) getContext().getSystemService(
+                            Context.TELEPHONY_SERVICE);
+                }
+                if (mTelephonyManager != null &&
+                        mTelephonyManager.getCallState() != TelephonyManager.CALL_STATE_IDLE) {
+                    return true;  // suppress key event
+                }
+            case KeyEvent.KEYCODE_MUTE:
+            case KeyEvent.KEYCODE_HEADSETHOOK:
+            case KeyEvent.KEYCODE_MEDIA_STOP:
+            case KeyEvent.KEYCODE_MEDIA_NEXT:
+            case KeyEvent.KEYCODE_MEDIA_PREVIOUS:
+            case KeyEvent.KEYCODE_MEDIA_REWIND:
+            case KeyEvent.KEYCODE_MEDIA_FAST_FORWARD: {
+                Intent intent = new Intent(Intent.ACTION_MEDIA_BUTTON, null);
+                intent.putExtra(Intent.EXTRA_KEY_EVENT, event);
+                getContext().sendOrderedBroadcast(intent, null);
+                return true;
+            }
+
+            case KeyEvent.KEYCODE_CAMERA: {
+                if (getKeyguardManager().inKeyguardRestrictedInputMode()
+                        || dispatcher == null) {
+                    break;
+                }
+                if (event.getRepeatCount() == 0) {
+                    dispatcher.startTracking(event, this);
+                } else if (event.isLongPress() && dispatcher.isTracking(event)) {
+                    dispatcher.performedLongPress(event);
+                    mDecor.performHapticFeedback(HapticFeedbackConstants.LONG_PRESS);
+                    sendCloseSystemWindows();
+                    // Broadcast an intent that the Camera button was longpressed
+                    Intent intent = new Intent(Intent.ACTION_CAMERA_BUTTON, null);
+                    intent.putExtra(Intent.EXTRA_KEY_EVENT, event);
+                    getContext().sendOrderedBroadcast(intent, null);
+                }
+                return true;
+            }
+
+            case KeyEvent.KEYCODE_MENU: {
+                onKeyDownPanel((featureId < 0) ? FEATURE_OPTIONS_PANEL : featureId, event);
+                return true;
+            }
+
+            case KeyEvent.KEYCODE_BACK: {
+                if (event.getRepeatCount() > 0) break;
+                if (featureId < 0) break;
+                // Currently don't do anything with long press.
+                dispatcher.startTracking(event, this);
+                return true;
+            }
+
+            case KeyEvent.KEYCODE_CALL: {
+                if (getKeyguardManager().inKeyguardRestrictedInputMode()
+                        || dispatcher == null) {
+                    break;
+                }
+                if (event.getRepeatCount() == 0) {
+                    dispatcher.startTracking(event, this);
+                } else if (event.isLongPress() && dispatcher.isTracking(event)) {
+                    dispatcher.performedLongPress(event);
+                    mDecor.performHapticFeedback(HapticFeedbackConstants.LONG_PRESS);
+                    // launch the VoiceDialer
+                    Intent intent = new Intent(Intent.ACTION_VOICE_COMMAND);
+                    intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
+                    try {
+                        sendCloseSystemWindows();
+                        getContext().startActivity(intent);
+                    } catch (ActivityNotFoundException e) {
+                        startCallActivity();
+                    }
+                }
+                return true;
+            }
+
+            case KeyEvent.KEYCODE_SEARCH: {
+                if (getKeyguardManager().inKeyguardRestrictedInputMode()
+                        || dispatcher == null) {
+                    break;
+                }
+                if (event.getRepeatCount() == 0) {
+                    dispatcher.startTracking(event, this);
+                } else if (event.isLongPress() && dispatcher.isTracking(event)) {
+                    Configuration config = getContext().getResources().getConfiguration(); 
+                    if (config.keyboard == Configuration.KEYBOARD_NOKEYS
+                            || config.hardKeyboardHidden
+                                    == Configuration.HARDKEYBOARDHIDDEN_YES) {
+                        // launch the search activity
+                        Intent intent = new Intent(Intent.ACTION_SEARCH_LONG_PRESS);
+                        intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
+                        try {
+                            mDecor.performHapticFeedback(HapticFeedbackConstants.LONG_PRESS);
+                            sendCloseSystemWindows();
+                            getSearchManager().stopSearch();
+                            getContext().startActivity(intent);
+                            // Only clear this if we successfully start the
+                            // activity; otherwise we will allow the normal short
+                            // press action to be performed.
+                            dispatcher.performedLongPress(event);
+                            return true;
+                        } catch (ActivityNotFoundException e) {
+                            // Ignore
+                        }
+                    }
+                }
+                break;
+            }
+        }
+
+        return false;
+    }
+
+    /**
+     * @return A handle to the keyguard manager.
+     */
+    private KeyguardManager getKeyguardManager() {
+        if (mKeyguardManager == null) {
+            mKeyguardManager = (KeyguardManager) getContext().getSystemService(Context.KEYGUARD_SERVICE);
+        }
+        return mKeyguardManager;
+    }
+    
+    /**
+     * @return A handle to the search manager.
+     */
+    private SearchManager getSearchManager() {
+        if (mSearchManager == null) {
+            mSearchManager = (SearchManager) getContext().getSystemService(Context.SEARCH_SERVICE);
+        }
+        return mSearchManager;
+    }
+
+    /**
+     * A key was released and not handled by anything else in the window.
+     *
+     * @see #onKeyDown
+     * @see android.view.KeyEvent
+     */
+    protected boolean onKeyUp(int featureId, int keyCode, KeyEvent event) {
+        final KeyEvent.DispatcherState dispatcher =
+                mDecor != null ? mDecor.getKeyDispatcherState() : null;
+        if (dispatcher != null) {
+            dispatcher.handleUpEvent(event);
+        }
+        //Log.i(TAG, "Key up: repeat=" + event.getRepeatCount()
+        //        + " flags=0x" + Integer.toHexString(event.getFlags()));
+        
+        switch (keyCode) {
+            case KeyEvent.KEYCODE_VOLUME_UP:
+            case KeyEvent.KEYCODE_VOLUME_DOWN: {
+                AudioManager audioManager = (AudioManager) getContext().getSystemService(
+                        Context.AUDIO_SERVICE);
+                if (audioManager != null) {
+                    /*
+                     * Play a sound. This is done on key up since we don't want the
+                     * sound to play when a user holds down volume down to mute.
+                     */
+                    audioManager.adjustSuggestedStreamVolume(
+                            AudioManager.ADJUST_SAME,
+                            mVolumeControlStreamType,
+                            AudioManager.FLAG_PLAY_SOUND);
+                    mVolumeKeyUpTime = SystemClock.uptimeMillis();
+                }
+                return true;
+            }
+
+            case KeyEvent.KEYCODE_MENU: {
+                onKeyUpPanel(featureId < 0 ? FEATURE_OPTIONS_PANEL : featureId,
+                        event);
+                return true;
+            }
+
+            case KeyEvent.KEYCODE_BACK: {
+                if (featureId < 0) break;
+                if (event.isTracking() && !event.isCanceled()) {
+                    if (featureId == FEATURE_OPTIONS_PANEL) {
+                        PanelFeatureState st = getPanelState(featureId, false);
+                        if (st != null && st.isInExpandedMode) {
+                            // If the user is in an expanded menu and hits back, it
+                            // should go back to the icon menu
+                            reopenMenu(true);
+                            return true;
+                        }
+                    }
+                    closePanel(featureId);
+                    return true;
+                }
+                break;
+            }
+
+            case KeyEvent.KEYCODE_HEADSETHOOK:
+            case KeyEvent.KEYCODE_MEDIA_PLAY_PAUSE:
+            case KeyEvent.KEYCODE_MEDIA_STOP:
+            case KeyEvent.KEYCODE_MEDIA_NEXT:
+            case KeyEvent.KEYCODE_MEDIA_PREVIOUS:
+            case KeyEvent.KEYCODE_MEDIA_REWIND:
+            case KeyEvent.KEYCODE_MEDIA_FAST_FORWARD: {
+                Intent intent = new Intent(Intent.ACTION_MEDIA_BUTTON, null);
+                intent.putExtra(Intent.EXTRA_KEY_EVENT, event);
+                getContext().sendOrderedBroadcast(intent, null);
+                return true;
+            }
+
+            case KeyEvent.KEYCODE_CAMERA: {
+                if (getKeyguardManager().inKeyguardRestrictedInputMode()) {
+                    break;
+                }
+                if (event.isTracking() && !event.isCanceled()) {
+                    // Add short press behavior here if desired
+                }
+                return true;
+            }
+
+            case KeyEvent.KEYCODE_CALL: {
+                if (getKeyguardManager().inKeyguardRestrictedInputMode()) {
+                    break;
+                }
+                if (event.isTracking() && !event.isCanceled()) {
+                    startCallActivity();
+                }
+                return true;
+            }
+
+            case KeyEvent.KEYCODE_SEARCH: {
+                /*
+                 * Do this in onKeyUp since the Search key is also used for
+                 * chording quick launch shortcuts.
+                 */
+                if (getKeyguardManager().inKeyguardRestrictedInputMode()) {
+                    break;
+                }
+                if (event.isTracking() && !event.isCanceled()) {
+                    launchDefaultSearch();
+                }
+                return true;
+            }
+        }
+
+        return false;
+    }
+
+    private void startCallActivity() {
+        sendCloseSystemWindows();
+        Intent intent = new Intent(Intent.ACTION_CALL_BUTTON);
+        intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
+        getContext().startActivity(intent);
+    }
+
+    @Override
+    protected void onActive() {
+    }
+
+    @Override
+    public final View getDecorView() {
+        if (mDecor == null) {
+            installDecor();
+        }
+        return mDecor;
+    }
+
+    @Override
+    public final View peekDecorView() {
+        return mDecor;
+    }
+
+    static private final String FOCUSED_ID_TAG = "android:focusedViewId";
+    static private final String VIEWS_TAG = "android:views";
+    static private final String PANELS_TAG = "android:Panels";
+
+    /** {@inheritDoc} */
+    @Override
+    public Bundle saveHierarchyState() {
+        Bundle outState = new Bundle();
+        if (mContentParent == null) {
+            return outState;
+        }
+
+        SparseArray<Parcelable> states = new SparseArray<Parcelable>();
+        mContentParent.saveHierarchyState(states);
+        outState.putSparseParcelableArray(VIEWS_TAG, states);
+
+        // save the focused view id
+        View focusedView = mContentParent.findFocus();
+        if (focusedView != null) {
+            if (focusedView.getId() != View.NO_ID) {
+                outState.putInt(FOCUSED_ID_TAG, focusedView.getId());
+            } else {
+                if (Config.LOGD) {
+                    Log.d(TAG, "couldn't save which view has focus because the focused view "
+                            + focusedView + " has no id.");
+                }
+            }
+        }
+
+        // save the panels
+        SparseArray<Parcelable> panelStates = new SparseArray<Parcelable>();
+        savePanelState(panelStates);
+        if (panelStates.size() > 0) {
+            outState.putSparseParcelableArray(PANELS_TAG, panelStates);
+        }
+
+        return outState;
+    }
+
+    /** {@inheritDoc} */
+    @Override
+    public void restoreHierarchyState(Bundle savedInstanceState) {
+        if (mContentParent == null) {
+            return;
+        }
+
+        SparseArray<Parcelable> savedStates
+                = savedInstanceState.getSparseParcelableArray(VIEWS_TAG);
+        if (savedStates != null) {
+            mContentParent.restoreHierarchyState(savedStates);
+        }
+
+        // restore the focused view
+        int focusedViewId = savedInstanceState.getInt(FOCUSED_ID_TAG, View.NO_ID);
+        if (focusedViewId != View.NO_ID) {
+            View needsFocus = mContentParent.findViewById(focusedViewId);
+            if (needsFocus != null) {
+                needsFocus.requestFocus();
+            } else {
+                Log.w(TAG,
+                        "Previously focused view reported id " + focusedViewId
+                                + " during save, but can't be found during restore.");
+            }
+        }
+
+        // restore the panels
+        SparseArray<Parcelable> panelStates = savedInstanceState.getSparseParcelableArray(PANELS_TAG);
+        if (panelStates != null) {
+            restorePanelState(panelStates);
+        }
+    }
+
+    /**
+     * Invoked when the panels should freeze their state.
+     *
+     * @param icicles Save state into this. This is usually indexed by the
+     *            featureId. This will be given to {@link #restorePanelState} in the
+     *            future.
+     */
+    private void savePanelState(SparseArray<Parcelable> icicles) {
+        PanelFeatureState[] panels = mPanels;
+        if (panels == null) {
+            return;
+        }
+
+        for (int curFeatureId = panels.length - 1; curFeatureId >= 0; curFeatureId--) {
+            if (panels[curFeatureId] != null) {
+                icicles.put(curFeatureId, panels[curFeatureId].onSaveInstanceState());
+            }
+        }
+    }
+
+    /**
+     * Invoked when the panels should thaw their state from a previously frozen state.
+     *
+     * @param icicles The state saved by {@link #savePanelState} that needs to be thawed.
+     */
+    private void restorePanelState(SparseArray<Parcelable> icicles) {
+        PanelFeatureState st;
+        for (int curFeatureId = icicles.size() - 1; curFeatureId >= 0; curFeatureId--) {
+            st = getPanelState(curFeatureId, false /* required */);
+            if (st == null) {
+                // The panel must not have been required, and is currently not around, skip it
+                continue;
+            }
+
+            st.onRestoreInstanceState(icicles.get(curFeatureId));
+        }
+
+        /*
+         * Implementation note: call openPanelsAfterRestore later to actually open the
+         * restored panels.
+         */
+    }
+
+    /**
+     * Opens the panels that have had their state restored. This should be
+     * called sometime after {@link #restorePanelState} when it is safe to add
+     * to the window manager.
+     */
+    private void openPanelsAfterRestore() {
+        PanelFeatureState[] panels = mPanels;
+
+        if (panels == null) {
+            return;
+        }
+
+        PanelFeatureState st;
+        for (int i = panels.length - 1; i >= 0; i--) {
+            st = panels[i];
+            // We restore the panel if it was last open; we skip it if it
+            // now is open, to avoid a race condition if the user immediately
+            // opens it when we are resuming.
+            if ((st != null) && !st.isOpen && st.wasLastOpen) {
+                st.isInExpandedMode = st.wasLastExpanded;
+                openPanel(st, null);
+            }
+        }
+    }
+
+    private final class DecorView extends FrameLayout implements RootViewSurfaceTaker {
+        /* package */int mDefaultOpacity = PixelFormat.OPAQUE;
+
+        /** The feature ID of the panel, or -1 if this is the application's DecorView */
+        private final int mFeatureId;
+
+        private final Rect mDrawingBounds = new Rect();
+
+        private final Rect mBackgroundPadding = new Rect();
+
+        private final Rect mFramePadding = new Rect();
+
+        private final Rect mFrameOffsets = new Rect();
+
+        private boolean mChanging;
+
+        private Drawable mMenuBackground;
+        private boolean mWatchingForMenu;
+        private int mDownY;
+
+        public DecorView(Context context, int featureId) {
+            super(context);
+            mFeatureId = featureId;
+        }
+
+        @Override
+        public boolean dispatchKeyEvent(KeyEvent event) {
+            final int keyCode = event.getKeyCode();
+            final boolean isDown = event.getAction() == KeyEvent.ACTION_DOWN;
+
+            /*
+             * If the user hits another key within the play sound delay, then
+             * cancel the sound
+             */
+            if (keyCode != KeyEvent.KEYCODE_VOLUME_DOWN && keyCode != KeyEvent.KEYCODE_VOLUME_UP
+                    && mVolumeKeyUpTime + VolumePanel.PLAY_SOUND_DELAY
+                            > SystemClock.uptimeMillis()) {
+                /*
+                 * The user has hit another key during the delay (e.g., 300ms)
+                 * since the last volume key up, so cancel any sounds.
+                 */
+                AudioManager audioManager = (AudioManager) getContext().getSystemService(
+                        Context.AUDIO_SERVICE);
+                if (audioManager != null) {
+                    audioManager.adjustSuggestedStreamVolume(AudioManager.ADJUST_SAME,
+                            mVolumeControlStreamType, AudioManager.FLAG_REMOVE_SOUND_AND_VIBRATE);
+                }
+            }
+
+            if (isDown && (event.getRepeatCount() == 0)) {
+                // First handle chording of panel key: if a panel key is held
+                // but not released, try to execute a shortcut in it.
+                if ((mPanelChordingKey > 0) && (mPanelChordingKey != keyCode)) {
+                    // Perform the shortcut (mPreparedPanel can be null since
+                    // global shortcuts (such as search) don't rely on a
+                    // prepared panel or menu).
+                    boolean handled = performPanelShortcut(mPreparedPanel, keyCode, event,
+                            Menu.FLAG_PERFORM_NO_CLOSE);
+
+                    if (!handled) {
+                        /*
+                         * If not handled, then pass it to the view hierarchy
+                         * and anyone else that may be interested.
+                         */
+                        handled = dispatchKeyShortcutEvent(event);
+
+                        if (handled && mPreparedPanel != null) {
+                            mPreparedPanel.isHandled = true;
+                        }
+                    }
+
+                    if (handled) {
+                        return true;
+                    }
+                }
+
+                // If a panel is open, perform a shortcut on it without the
+                // chorded panel key
+                if ((mPreparedPanel != null) && mPreparedPanel.isOpen) {
+                    if (performPanelShortcut(mPreparedPanel, keyCode, event, 0)) {
+                        return true;
+                    }
+                }
+            }
+
+            final Callback cb = getCallback();
+            final boolean handled = cb != null && mFeatureId < 0 ? cb.dispatchKeyEvent(event)
+                    : super.dispatchKeyEvent(event);
+            if (handled) {
+                return true;
+            }
+            return isDown ? PhoneWindow.this.onKeyDown(mFeatureId, event.getKeyCode(), event)
+                    : PhoneWindow.this.onKeyUp(mFeatureId, event.getKeyCode(), event);
+        }
+
+        @Override
+        public boolean dispatchTouchEvent(MotionEvent ev) {
+            final Callback cb = getCallback();
+            return cb != null && mFeatureId < 0 ? cb.dispatchTouchEvent(ev) : super
+                    .dispatchTouchEvent(ev);
+        }
+
+        @Override
+        public boolean dispatchTrackballEvent(MotionEvent ev) {
+            final Callback cb = getCallback();
+            return cb != null && mFeatureId < 0 ? cb.dispatchTrackballEvent(ev) : super
+                    .dispatchTrackballEvent(ev);
+        }
+
+        public boolean superDispatchKeyEvent(KeyEvent event) {
+            return super.dispatchKeyEvent(event);
+        }
+
+        public boolean superDispatchTouchEvent(MotionEvent event) {
+            return super.dispatchTouchEvent(event);
+        }
+
+        public boolean superDispatchTrackballEvent(MotionEvent event) {
+            return super.dispatchTrackballEvent(event);
+        }
+
+        @Override
+        public boolean onTouchEvent(MotionEvent event) {
+            return onInterceptTouchEvent(event);
+        }
+
+        private boolean isOutOfBounds(int x, int y) {
+            return x < -5 || y < -5 || x > (getWidth() + 5)
+                    || y > (getHeight() + 5);
+        }
+
+        @Override
+        public boolean onInterceptTouchEvent(MotionEvent event) {
+            int action = event.getAction();
+            if (mFeatureId >= 0) {
+                if (action == MotionEvent.ACTION_DOWN) {
+                    int x = (int)event.getX();
+                    int y = (int)event.getY();
+                    if (isOutOfBounds(x, y)) {
+                        closePanel(mFeatureId);
+                        return true;
+                    }
+                }
+            }
+
+            if (!SWEEP_OPEN_MENU) {
+                return false;
+            }
+
+            if (mFeatureId >= 0) {
+                if (action == MotionEvent.ACTION_DOWN) {
+                    Log.i(TAG, "Watchiing!");
+                    mWatchingForMenu = true;
+                    mDownY = (int) event.getY();
+                    return false;
+                }
+
+                if (!mWatchingForMenu) {
+                    return false;
+                }
+
+                int y = (int)event.getY();
+                if (action == MotionEvent.ACTION_MOVE) {
+                    if (y > (mDownY+30)) {
+                        Log.i(TAG, "Closing!");
+                        closePanel(mFeatureId);
+                        mWatchingForMenu = false;
+                        return true;
+                    }
+                } else if (action == MotionEvent.ACTION_UP) {
+                    mWatchingForMenu = false;
+                }
+
+                return false;
+            }
+
+            //Log.i(TAG, "Intercept: action=" + action + " y=" + event.getY()
+            //        + " (in " + getHeight() + ")");
+
+            if (action == MotionEvent.ACTION_DOWN) {
+                int y = (int)event.getY();
+                if (y >= (getHeight()-5) && !hasChildren()) {
+                    Log.i(TAG, "Watchiing!");
+                    mWatchingForMenu = true;
+                }
+                return false;
+            }
+
+            if (!mWatchingForMenu) {
+                return false;
+            }
+
+            int y = (int)event.getY();
+            if (action == MotionEvent.ACTION_MOVE) {
+                if (y < (getHeight()-30)) {
+                    Log.i(TAG, "Opening!");
+                    openPanel(FEATURE_OPTIONS_PANEL, new KeyEvent(
+                            KeyEvent.ACTION_DOWN, KeyEvent.KEYCODE_MENU));
+                    mWatchingForMenu = false;
+                    return true;
+                }
+            } else if (action == MotionEvent.ACTION_UP) {
+                mWatchingForMenu = false;
+            }
+
+            return false;
+        }
+
+        @Override
+        public void sendAccessibilityEvent(int eventType) {
+            if (!AccessibilityManager.getInstance(mContext).isEnabled()) {
+                return;
+            }
+ 
+            // if we are showing a feature that should be announced and one child
+            // make this child the event source since this is the feature itself
+            // otherwise the callback will take over and announce its client
+            if ((mFeatureId == FEATURE_OPTIONS_PANEL ||
+                    mFeatureId == FEATURE_CONTEXT_MENU ||
+                    mFeatureId == FEATURE_PROGRESS ||
+                    mFeatureId == FEATURE_INDETERMINATE_PROGRESS)
+                    && getChildCount() == 1) {
+                getChildAt(0).sendAccessibilityEvent(eventType);
+            } else {
+                super.sendAccessibilityEvent(eventType);
+            }
+        }
+
+        @Override
+        public boolean dispatchPopulateAccessibilityEvent(AccessibilityEvent event) {
+            final Callback cb = getCallback();
+            if (cb != null) {
+                if (cb.dispatchPopulateAccessibilityEvent(event)) {
+                    return true;
+                }
+            }
+            return super.dispatchPopulateAccessibilityEvent(event);
+        }
+
+        @Override
+        protected boolean setFrame(int l, int t, int r, int b) {
+            boolean changed = super.setFrame(l, t, r, b);
+            if (changed) {
+                final Rect drawingBounds = mDrawingBounds;
+                getDrawingRect(drawingBounds);
+
+                Drawable fg = getForeground();
+                if (fg != null) {
+                    final Rect frameOffsets = mFrameOffsets;
+                    drawingBounds.left += frameOffsets.left;
+                    drawingBounds.top += frameOffsets.top;
+                    drawingBounds.right -= frameOffsets.right;
+                    drawingBounds.bottom -= frameOffsets.bottom;
+                    fg.setBounds(drawingBounds);
+                    final Rect framePadding = mFramePadding;
+                    drawingBounds.left += framePadding.left - frameOffsets.left;
+                    drawingBounds.top += framePadding.top - frameOffsets.top;
+                    drawingBounds.right -= framePadding.right - frameOffsets.right;
+                    drawingBounds.bottom -= framePadding.bottom - frameOffsets.bottom;
+                }
+
+                Drawable bg = getBackground();
+                if (bg != null) {
+                    bg.setBounds(drawingBounds);
+                }
+
+                if (SWEEP_OPEN_MENU) {
+                    if (mMenuBackground == null && mFeatureId < 0
+                            && getAttributes().height
+                            == WindowManager.LayoutParams.MATCH_PARENT) {
+                        mMenuBackground = getContext().getResources().getDrawable(
+                                com.android.internal.R.drawable.menu_background);
+                    }
+                    if (mMenuBackground != null) {
+                        mMenuBackground.setBounds(drawingBounds.left,
+                                drawingBounds.bottom-6, drawingBounds.right,
+                                drawingBounds.bottom+20);
+                    }
+                }
+            }
+            return changed;
+        }
+
+        @Override
+        public void draw(Canvas canvas) {
+            super.draw(canvas);
+
+            if (mMenuBackground != null) {
+                mMenuBackground.draw(canvas);
+            }
+        }
+
+
+        @Override
+        public boolean showContextMenuForChild(View originalView) {
+            // Reuse the context menu builder
+            if (mContextMenu == null) {
+                mContextMenu = new ContextMenuBuilder(getContext());
+                mContextMenu.setCallback(mContextMenuCallback);
+            } else {
+                mContextMenu.clearAll();
+            }
+
+            mContextMenuHelper = mContextMenu.show(originalView, originalView.getWindowToken());
+            return mContextMenuHelper != null;
+        }
+
+        public void startChanging() {
+            mChanging = true;
+        }
+
+        public void finishChanging() {
+            mChanging = false;
+            drawableChanged();
+        }
+
+        public void setWindowBackground(Drawable drawable) {
+            if (getBackground() != drawable) {
+                setBackgroundDrawable(drawable);
+                if (drawable != null) {
+                    drawable.getPadding(mBackgroundPadding);
+                } else {
+                    mBackgroundPadding.setEmpty();
+                }
+                drawableChanged();
+            }
+        }
+
+        public void setWindowFrame(Drawable drawable) {
+            if (getForeground() != drawable) {
+                setForeground(drawable);
+                if (drawable != null) {
+                    drawable.getPadding(mFramePadding);
+                } else {
+                    mFramePadding.setEmpty();
+                }
+                drawableChanged();
+            }
+        }
+
+        @Override
+        protected boolean fitSystemWindows(Rect insets) {
+            mFrameOffsets.set(insets);
+            if (getForeground() != null) {
+                drawableChanged();
+            }
+            return super.fitSystemWindows(insets);
+        }
+
+        private void drawableChanged() {
+            if (mChanging) {
+                return;
+            }
+
+            setPadding(mFramePadding.left + mBackgroundPadding.left, mFramePadding.top
+                    + mBackgroundPadding.top, mFramePadding.right + mBackgroundPadding.right,
+                    mFramePadding.bottom + mBackgroundPadding.bottom);
+            requestLayout();
+            invalidate();
+
+            int opacity = PixelFormat.OPAQUE;
+
+            // Note: if there is no background, we will assume opaque. The
+            // common case seems to be that an application sets there to be
+            // no background so it can draw everything itself. For that,
+            // we would like to assume OPAQUE and let the app force it to
+            // the slower TRANSLUCENT mode if that is really what it wants.
+            Drawable bg = getBackground();
+            Drawable fg = getForeground();
+            if (bg != null) {
+                if (fg == null) {
+                    opacity = bg.getOpacity();
+                } else if (mFramePadding.left <= 0 && mFramePadding.top <= 0
+                        && mFramePadding.right <= 0 && mFramePadding.bottom <= 0) {
+                    // If the frame padding is zero, then we can be opaque
+                    // if either the frame -or- the background is opaque.
+                    int fop = fg.getOpacity();
+                    int bop = bg.getOpacity();
+                    if (Config.LOGV)
+                        Log.v(TAG, "Background opacity: " + bop + ", Frame opacity: " + fop);
+                    if (fop == PixelFormat.OPAQUE || bop == PixelFormat.OPAQUE) {
+                        opacity = PixelFormat.OPAQUE;
+                    } else if (fop == PixelFormat.UNKNOWN) {
+                        opacity = bop;
+                    } else if (bop == PixelFormat.UNKNOWN) {
+                        opacity = fop;
+                    } else {
+                        opacity = Drawable.resolveOpacity(fop, bop);
+                    }
+                } else {
+                    // For now we have to assume translucent if there is a
+                    // frame with padding... there is no way to tell if the
+                    // frame and background together will draw all pixels.
+                    if (Config.LOGV)
+                        Log.v(TAG, "Padding: " + mFramePadding);
+                    opacity = PixelFormat.TRANSLUCENT;
+                }
+            }
+
+            if (Config.LOGV)
+                Log.v(TAG, "Background: " + bg + ", Frame: " + fg);
+            if (Config.LOGV)
+                Log.v(TAG, "Selected default opacity: " + opacity);
+
+            mDefaultOpacity = opacity;
+            if (mFeatureId < 0) {
+                setDefaultWindowFormat(opacity);
+            }
+        }
+
+        @Override
+        public void onWindowFocusChanged(boolean hasWindowFocus) {
+            super.onWindowFocusChanged(hasWindowFocus);
+
+            mPanelMayLongPress = false;
+
+            // If the user is chording a menu shortcut, release the chord since
+            // this window lost focus
+            if (!hasWindowFocus && mPanelChordingKey != 0) {
+                closePanel(FEATURE_OPTIONS_PANEL);
+            }
+
+            final Callback cb = getCallback();
+            if (cb != null && mFeatureId < 0) {
+                cb.onWindowFocusChanged(hasWindowFocus);
+            }
+        }
+
+        @Override
+        protected void onAttachedToWindow() {
+            super.onAttachedToWindow();
+            
+            final Callback cb = getCallback();
+            if (cb != null && mFeatureId < 0) {
+                cb.onAttachedToWindow();
+            }
+
+            if (mFeatureId == -1) {
+                /*
+                 * The main window has been attached, try to restore any panels
+                 * that may have been open before. This is called in cases where
+                 * an activity is being killed for configuration change and the
+                 * menu was open. When the activity is recreated, the menu
+                 * should be shown again.
+                 */
+                openPanelsAfterRestore();
+            }
+        }
+
+        @Override
+        protected void onDetachedFromWindow() {
+            super.onDetachedFromWindow();
+            
+            final Callback cb = getCallback();
+            if (cb != null && mFeatureId < 0) {
+                cb.onDetachedFromWindow();
+            }
+        }
+        
+        @Override
+        public void onCloseSystemDialogs(String reason) {
+            if (mFeatureId >= 0) {
+                closeAllPanels();
+            }
+        }
+
+        public android.view.SurfaceHolder.Callback2 willYouTakeTheSurface() {
+            return mFeatureId < 0 ? mTakeSurfaceCallback : null;
+        }
+        
+        public InputQueue.Callback willYouTakeTheInputQueue() {
+            return mFeatureId < 0 ? mTakeInputQueueCallback : null;
+        }
+        
+        public void setSurfaceType(int type) {
+            PhoneWindow.this.setType(type);
+        }
+        
+        public void setSurfaceFormat(int format) {
+            PhoneWindow.this.setFormat(format);
+        }
+        
+        public void setSurfaceKeepScreenOn(boolean keepOn) {
+            if (keepOn) PhoneWindow.this.addFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON);
+            else PhoneWindow.this.clearFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON);
+        }
+    }
+
+    protected DecorView generateDecor() {
+        return new DecorView(getContext(), -1);
+    }
+
+    protected void setFeatureFromAttrs(int featureId, TypedArray attrs,
+            int drawableAttr, int alphaAttr) {
+        Drawable d = attrs.getDrawable(drawableAttr);
+        if (d != null) {
+            requestFeature(featureId);
+            setFeatureDefaultDrawable(featureId, d);
+        }
+        if ((getFeatures() & (1 << featureId)) != 0) {
+            int alpha = attrs.getInt(alphaAttr, -1);
+            if (alpha >= 0) {
+                setFeatureDrawableAlpha(featureId, alpha);
+            }
+        }
+    }
+
+    protected ViewGroup generateLayout(DecorView decor) {
+        // Apply data from current theme.
+
+        TypedArray a = getWindowStyle();
+
+        if (false) {
+            System.out.println("From style:");
+            String s = "Attrs:";
+            for (int i = 0; i < com.android.internal.R.styleable.Window.length; i++) {
+                s = s + " " + Integer.toHexString(com.android.internal.R.styleable.Window[i]) + "="
+                        + a.getString(i);
+            }
+            System.out.println(s);
+        }
+
+        mIsFloating = a.getBoolean(com.android.internal.R.styleable.Window_windowIsFloating, false);
+        int flagsToUpdate = (FLAG_LAYOUT_IN_SCREEN|FLAG_LAYOUT_INSET_DECOR)
+                & (~getForcedWindowFlags());
+        if (mIsFloating) {
+            setLayout(WRAP_CONTENT, WRAP_CONTENT);
+            setFlags(0, flagsToUpdate);
+        } else {
+            setFlags(FLAG_LAYOUT_IN_SCREEN|FLAG_LAYOUT_INSET_DECOR, flagsToUpdate);
+        }
+
+        if (a.getBoolean(com.android.internal.R.styleable.Window_windowNoTitle, false)) {
+            requestFeature(FEATURE_NO_TITLE);
+        }
+
+        if (a.getBoolean(com.android.internal.R.styleable.Window_windowFullscreen, false)) {
+            setFlags(FLAG_FULLSCREEN, FLAG_FULLSCREEN&(~getForcedWindowFlags()));
+        }
+
+        if (a.getBoolean(com.android.internal.R.styleable.Window_windowShowWallpaper, false)) {
+            setFlags(FLAG_SHOW_WALLPAPER, FLAG_SHOW_WALLPAPER&(~getForcedWindowFlags()));
+        }
+
+        WindowManager.LayoutParams params = getAttributes();
+
+        if (!hasSoftInputMode()) {
+            params.softInputMode = a.getInt(
+                    com.android.internal.R.styleable.Window_windowSoftInputMode,
+                    params.softInputMode);
+        }
+
+        if (a.getBoolean(com.android.internal.R.styleable.Window_backgroundDimEnabled,
+                mIsFloating)) {
+            /* All dialogs should have the window dimmed */
+            if ((getForcedWindowFlags()&WindowManager.LayoutParams.FLAG_DIM_BEHIND) == 0) {
+                params.flags |= WindowManager.LayoutParams.FLAG_DIM_BEHIND;
+            }
+            params.dimAmount = a.getFloat(
+                    android.R.styleable.Window_backgroundDimAmount, 0.5f);
+        }
+
+        if (params.windowAnimations == 0) {
+            params.windowAnimations = a.getResourceId(
+                    com.android.internal.R.styleable.Window_windowAnimationStyle, 0);
+        }
+
+        // The rest are only done if this window is not embedded; otherwise,
+        // the values are inherited from our container.
+        if (getContainer() == null) {
+            if (mBackgroundDrawable == null) {
+                if (mBackgroundResource == 0) {
+                    mBackgroundResource = a.getResourceId(
+                            com.android.internal.R.styleable.Window_windowBackground, 0);
+                }
+                if (mFrameResource == 0) {
+                    mFrameResource = a.getResourceId(com.android.internal.R.styleable.Window_windowFrame, 0);
+                }
+                if (false) {
+                    System.out.println("Background: "
+                            + Integer.toHexString(mBackgroundResource) + " Frame: "
+                            + Integer.toHexString(mFrameResource));
+                }
+            }
+            mTextColor = a.getColor(com.android.internal.R.styleable.Window_textColor, 0xFF000000);
+        }
+
+        // Inflate the window decor.
+
+        int layoutResource;
+        int features = getLocalFeatures();
+        // System.out.println("Features: 0x" + Integer.toHexString(features));
+        if ((features & ((1 << FEATURE_LEFT_ICON) | (1 << FEATURE_RIGHT_ICON))) != 0) {
+            if (mIsFloating) {
+                layoutResource = com.android.internal.R.layout.dialog_title_icons;
+            } else {
+                layoutResource = com.android.internal.R.layout.screen_title_icons;
+            }
+            // System.out.println("Title Icons!");
+        } else if ((features & ((1 << FEATURE_PROGRESS) | (1 << FEATURE_INDETERMINATE_PROGRESS))) != 0) {
+            // Special case for a window with only a progress bar (and title).
+            // XXX Need to have a no-title version of embedded windows.
+            layoutResource = com.android.internal.R.layout.screen_progress;
+            // System.out.println("Progress!");
+        } else if ((features & (1 << FEATURE_CUSTOM_TITLE)) != 0) {
+            // Special case for a window with a custom title.
+            // If the window is floating, we need a dialog layout
+            if (mIsFloating) {
+                layoutResource = com.android.internal.R.layout.dialog_custom_title;
+            } else {
+                layoutResource = com.android.internal.R.layout.screen_custom_title;
+            }
+        } else if ((features & (1 << FEATURE_NO_TITLE)) == 0) {
+            // If no other features and not embedded, only need a title.
+            // If the window is floating, we need a dialog layout
+            if (mIsFloating) {
+                layoutResource = com.android.internal.R.layout.dialog_title;
+            } else {
+                layoutResource = com.android.internal.R.layout.screen_title;
+            }
+            // System.out.println("Title!");
+        } else {
+            // Embedded, so no decoration is needed.
+            layoutResource = com.android.internal.R.layout.screen_simple;
+            // System.out.println("Simple!");
+        }
+
+        mDecor.startChanging();
+
+        View in = mLayoutInflater.inflate(layoutResource, null);
+        decor.addView(in, new ViewGroup.LayoutParams(MATCH_PARENT, MATCH_PARENT));
+
+        ViewGroup contentParent = (ViewGroup)findViewById(ID_ANDROID_CONTENT);
+        if (contentParent == null) {
+            throw new RuntimeException("Window couldn't find content container view");
+        }
+
+        if ((features & (1 << FEATURE_INDETERMINATE_PROGRESS)) != 0) {
+            ProgressBar progress = getCircularProgressBar(false);
+            if (progress != null) {
+                progress.setIndeterminate(true);
+            }
+        }
+
+        // Remaining setup -- of background and title -- that only applies
+        // to top-level windows.
+        if (getContainer() == null) {
+            Drawable drawable = mBackgroundDrawable;
+            if (mBackgroundResource != 0) {
+                drawable = getContext().getResources().getDrawable(mBackgroundResource);
+            }
+            mDecor.setWindowBackground(drawable);
+            drawable = null;
+            if (mFrameResource != 0) {
+                drawable = getContext().getResources().getDrawable(mFrameResource);
+            }
+            mDecor.setWindowFrame(drawable);
+
+            // System.out.println("Text=" + Integer.toHexString(mTextColor) +
+            // " Sel=" + Integer.toHexString(mTextSelectedColor) +
+            // " Title=" + Integer.toHexString(mTitleColor));
+
+            if (mTitleColor == 0) {
+                mTitleColor = mTextColor;
+            }
+
+            if (mTitle != null) {
+                setTitle(mTitle);
+            }
+            setTitleColor(mTitleColor);
+        }
+
+        mDecor.finishChanging();
+
+        return contentParent;
+    }
+
+    private void installDecor() {
+        if (mDecor == null) {
+            mDecor = generateDecor();
+            mDecor.setDescendantFocusability(ViewGroup.FOCUS_AFTER_DESCENDANTS);
+            mDecor.setIsRootNamespace(true);
+        }
+        if (mContentParent == null) {
+            mContentParent = generateLayout(mDecor);
+
+            mTitleView = (TextView)findViewById(com.android.internal.R.id.title);
+            if (mTitleView != null) {
+                if ((getLocalFeatures() & (1 << FEATURE_NO_TITLE)) != 0) {
+                    View titleContainer = findViewById(com.android.internal.R.id.title_container);
+                    if (titleContainer != null) {
+                        titleContainer.setVisibility(View.GONE);
+                    } else {
+                        mTitleView.setVisibility(View.GONE);
+                    }
+                    if (mContentParent instanceof FrameLayout) {
+                        ((FrameLayout)mContentParent).setForeground(null);
+                    }
+                } else {
+                    mTitleView.setText(mTitle);
+                }
+            }
+        }
+    }
+
+    private Drawable loadImageURI(Uri uri) {
+        try {
+            return Drawable.createFromStream(
+                    getContext().getContentResolver().openInputStream(uri), null);
+        } catch (Exception e) {
+            Log.w(TAG, "Unable to open content: " + uri);
+        }
+        return null;
+    }
+
+    private DrawableFeatureState getDrawableState(int featureId, boolean required) {
+        if ((getFeatures() & (1 << featureId)) == 0) {
+            if (!required) {
+                return null;
+            }
+            throw new RuntimeException("The feature has not been requested");
+        }
+
+        DrawableFeatureState[] ar;
+        if ((ar = mDrawables) == null || ar.length <= featureId) {
+            DrawableFeatureState[] nar = new DrawableFeatureState[featureId + 1];
+            if (ar != null) {
+                System.arraycopy(ar, 0, nar, 0, ar.length);
+            }
+            mDrawables = ar = nar;
+        }
+
+        DrawableFeatureState st = ar[featureId];
+        if (st == null) {
+            ar[featureId] = st = new DrawableFeatureState(featureId);
+        }
+        return st;
+    }
+
+    /**
+     * Gets a panel's state based on its feature ID.
+     *
+     * @param featureId The feature ID of the panel.
+     * @param required Whether the panel is required (if it is required and it
+     *            isn't in our features, this throws an exception).
+     * @return The panel state.
+     */
+    private PanelFeatureState getPanelState(int featureId, boolean required) {
+        return getPanelState(featureId, required, null);
+    }
+
+    /**
+     * Gets a panel's state based on its feature ID.
+     *
+     * @param featureId The feature ID of the panel.
+     * @param required Whether the panel is required (if it is required and it
+     *            isn't in our features, this throws an exception).
+     * @param convertPanelState Optional: If the panel state does not exist, use
+     *            this as the panel state.
+     * @return The panel state.
+     */
+    private PanelFeatureState getPanelState(int featureId, boolean required,
+            PanelFeatureState convertPanelState) {
+        if ((getFeatures() & (1 << featureId)) == 0) {
+            if (!required) {
+                return null;
+            }
+            throw new RuntimeException("The feature has not been requested");
+        }
+
+        PanelFeatureState[] ar;
+        if ((ar = mPanels) == null || ar.length <= featureId) {
+            PanelFeatureState[] nar = new PanelFeatureState[featureId + 1];
+            if (ar != null) {
+                System.arraycopy(ar, 0, nar, 0, ar.length);
+            }
+            mPanels = ar = nar;
+        }
+
+        PanelFeatureState st = ar[featureId];
+        if (st == null) {
+            ar[featureId] = st = (convertPanelState != null)
+                    ? convertPanelState
+                    : new PanelFeatureState(featureId);
+        }
+        return st;
+    }
+
+    @Override
+    public final void setChildDrawable(int featureId, Drawable drawable) {
+        DrawableFeatureState st = getDrawableState(featureId, true);
+        st.child = drawable;
+        updateDrawable(featureId, st, false);
+    }
+
+    @Override
+    public final void setChildInt(int featureId, int value) {
+        updateInt(featureId, value, false);
+    }
+
+    @Override
+    public boolean isShortcutKey(int keyCode, KeyEvent event) {
+        PanelFeatureState st = getPanelState(FEATURE_OPTIONS_PANEL, true);
+        return st.menu != null && st.menu.isShortcutKey(keyCode, event);
+    }
+
+    private void updateDrawable(int featureId, DrawableFeatureState st, boolean fromResume) {
+        // Do nothing if the decor is not yet installed... an update will
+        // need to be forced when we eventually become active.
+        if (mContentParent == null) {
+            return;
+        }
+
+        final int featureMask = 1 << featureId;
+
+        if ((getFeatures() & featureMask) == 0 && !fromResume) {
+            return;
+        }
+
+        Drawable drawable = null;
+        if (st != null) {
+            drawable = st.child;
+            if (drawable == null)
+                drawable = st.local;
+            if (drawable == null)
+                drawable = st.def;
+        }
+        if ((getLocalFeatures() & featureMask) == 0) {
+            if (getContainer() != null) {
+                if (isActive() || fromResume) {
+                    getContainer().setChildDrawable(featureId, drawable);
+                }
+            }
+        } else if (st != null && (st.cur != drawable || st.curAlpha != st.alpha)) {
+            // System.out.println("Drawable changed: old=" + st.cur
+            // + ", new=" + drawable);
+            st.cur = drawable;
+            st.curAlpha = st.alpha;
+            onDrawableChanged(featureId, drawable, st.alpha);
+        }
+    }
+
+    private void updateInt(int featureId, int value, boolean fromResume) {
+
+        // Do nothing if the decor is not yet installed... an update will
+        // need to be forced when we eventually become active.
+        if (mContentParent == null) {
+            return;
+        }
+
+        final int featureMask = 1 << featureId;
+
+        if ((getFeatures() & featureMask) == 0 && !fromResume) {
+            return;
+        }
+
+        if ((getLocalFeatures() & featureMask) == 0) {
+            if (getContainer() != null) {
+                getContainer().setChildInt(featureId, value);
+            }
+        } else {
+            onIntChanged(featureId, value);
+        }
+    }
+
+    private ImageView getLeftIconView() {
+        if (mLeftIconView != null) {
+            return mLeftIconView;
+        }
+        if (mContentParent == null) {
+            installDecor();
+        }
+        return (mLeftIconView = (ImageView)findViewById(com.android.internal.R.id.left_icon));
+    }
+
+    private ProgressBar getCircularProgressBar(boolean shouldInstallDecor) {
+        if (mCircularProgressBar != null) {
+            return mCircularProgressBar;
+        }
+        if (mContentParent == null && shouldInstallDecor) {
+            installDecor();
+        }
+        mCircularProgressBar = (ProgressBar)findViewById(com.android.internal.R.id.progress_circular);
+        mCircularProgressBar.setVisibility(View.INVISIBLE);
+        return mCircularProgressBar;
+    }
+
+    private ProgressBar getHorizontalProgressBar(boolean shouldInstallDecor) {
+        if (mHorizontalProgressBar != null) {
+            return mHorizontalProgressBar;
+        }
+        if (mContentParent == null && shouldInstallDecor) {
+            installDecor();
+        }
+        mHorizontalProgressBar = (ProgressBar)findViewById(com.android.internal.R.id.progress_horizontal);
+        mHorizontalProgressBar.setVisibility(View.INVISIBLE);
+        return mHorizontalProgressBar;
+    }
+
+    private ImageView getRightIconView() {
+        if (mRightIconView != null) {
+            return mRightIconView;
+        }
+        if (mContentParent == null) {
+            installDecor();
+        }
+        return (mRightIconView = (ImageView)findViewById(com.android.internal.R.id.right_icon));
+    }
+
+    /**
+     * Helper method for calling the {@link Callback#onPanelClosed(int, Menu)}
+     * callback. This method will grab whatever extra state is needed for the
+     * callback that isn't given in the parameters. If the panel is not open,
+     * this will not perform the callback.
+     *
+     * @param featureId Feature ID of the panel that was closed. Must be given.
+     * @param panel Panel that was closed. Optional but useful if there is no
+     *            menu given.
+     * @param menu The menu that was closed. Optional, but give if you have.
+     */
+    private void callOnPanelClosed(int featureId, PanelFeatureState panel, Menu menu) {
+        final Callback cb = getCallback();
+        if (cb == null)
+            return;
+
+        // Try to get a menu
+        if (menu == null) {
+            // Need a panel to grab the menu, so try to get that
+            if (panel == null) {
+                if ((featureId >= 0) && (featureId < mPanels.length)) {
+                    panel = mPanels[featureId];
+                }
+            }
+
+            if (panel != null) {
+                // menu still may be null, which is okay--we tried our best
+                menu = panel.menu;
+            }
+        }
+
+        // If the panel is not open, do not callback
+        if ((panel != null) && (!panel.isOpen))
+            return;
+
+        cb.onPanelClosed(featureId, menu);
+    }
+
+    /**
+     * Helper method for adding launch-search to most applications. Opens the
+     * search window using default settings.
+     *
+     * @return true if search window opened
+     */
+    private boolean launchDefaultSearch() {
+        final Callback cb = getCallback();
+        if (cb == null) {
+            return false;
+        } else {
+            sendCloseSystemWindows("search");
+            return cb.onSearchRequested();
+        }
+    }
+
+    @Override
+    public void setVolumeControlStream(int streamType) {
+        mVolumeControlStreamType = streamType;
+    }
+
+    @Override
+    public int getVolumeControlStream() {
+        return mVolumeControlStreamType;
+    }
+
+    private static final class DrawableFeatureState {
+        DrawableFeatureState(int _featureId) {
+            featureId = _featureId;
+        }
+
+        final int featureId;
+
+        int resid;
+
+        Uri uri;
+
+        Drawable local;
+
+        Drawable child;
+
+        Drawable def;
+
+        Drawable cur;
+
+        int alpha = 255;
+
+        int curAlpha = 255;
+    }
+
+    private static final class PanelFeatureState {
+
+        /** Feature ID for this panel. */
+        int featureId;
+
+        // Information pulled from the style for this panel.
+
+        int background;
+
+        /** The background when the panel spans the entire available width. */
+        int fullBackground;
+
+        int gravity;
+
+        int x;
+
+        int y;
+
+        int windowAnimations;
+
+        /** Dynamic state of the panel. */
+        DecorView decorView;
+
+        /** The panel that was returned by onCreatePanelView(). */
+        View createdPanelView;
+
+        /** The panel that we are actually showing. */
+        View shownPanelView;
+
+        /** Use {@link #setMenu} to set this. */
+        Menu menu;
+
+        /**
+         * Whether the panel has been prepared (see
+         * {@link PhoneWindow#preparePanel}).
+         */
+        boolean isPrepared;
+
+        /**
+         * Whether an item's action has been performed. This happens in obvious
+         * scenarios (user clicks on menu item), but can also happen with
+         * chording menu+(shortcut key).
+         */
+        boolean isHandled;
+
+        boolean isOpen;
+
+        /**
+         * True if the menu is in expanded mode, false if the menu is in icon
+         * mode
+         */
+        boolean isInExpandedMode;
+
+        public boolean qwertyMode;
+
+        boolean refreshDecorView;
+
+        boolean wasLastOpen;
+        
+        boolean wasLastExpanded;
+        
+        /**
+         * Contains the state of the menu when told to freeze.
+         */
+        Bundle frozenMenuState;
+
+        PanelFeatureState(int featureId) {
+            this.featureId = featureId;
+
+            refreshDecorView = false;
+        }
+
+        void setStyle(Context context) {
+            TypedArray a = context.obtainStyledAttributes(com.android.internal.R.styleable.Theme);
+            background = a.getResourceId(
+                    com.android.internal.R.styleable.Theme_panelBackground, 0);
+            fullBackground = a.getResourceId(
+                    com.android.internal.R.styleable.Theme_panelFullBackground, 0);
+            windowAnimations = a.getResourceId(
+                    com.android.internal.R.styleable.Theme_windowAnimationStyle, 0);
+            a.recycle();
+        }
+
+        void setMenu(Menu menu) {
+            this.menu = menu;
+
+            if (frozenMenuState != null) {
+                ((MenuBuilder) menu).restoreHierarchyState(frozenMenuState);
+                frozenMenuState = null;
+            }
+        }
+
+        Parcelable onSaveInstanceState() {
+            SavedState savedState = new SavedState();
+            savedState.featureId = featureId;
+            savedState.isOpen = isOpen;
+            savedState.isInExpandedMode = isInExpandedMode;
+
+            if (menu != null) {
+                savedState.menuState = new Bundle();
+                ((MenuBuilder) menu).saveHierarchyState(savedState.menuState);
+            }
+
+            return savedState;
+        }
+
+        void onRestoreInstanceState(Parcelable state) {
+            SavedState savedState = (SavedState) state;
+            featureId = savedState.featureId;
+            wasLastOpen = savedState.isOpen;
+            wasLastExpanded = savedState.isInExpandedMode;
+            frozenMenuState = savedState.menuState;
+
+            /*
+             * A LocalActivityManager keeps the same instance of this class around.
+             * The first time the menu is being shown after restoring, the
+             * Activity.onCreateOptionsMenu should be called. But, if it is the
+             * same instance then menu != null and we won't call that method.
+             * So, clear this.  Also clear any cached views.
+             */
+            menu = null;
+            createdPanelView = null;
+            shownPanelView = null;
+            decorView = null;
+        }
+
+        private static class SavedState implements Parcelable {
+            int featureId;
+            boolean isOpen;
+            boolean isInExpandedMode;
+            Bundle menuState;
+
+            public int describeContents() {
+                return 0;
+            }
+
+            public void writeToParcel(Parcel dest, int flags) {
+                dest.writeInt(featureId);
+                dest.writeInt(isOpen ? 1 : 0);
+                dest.writeInt(isInExpandedMode ? 1 : 0);
+
+                if (isOpen) {
+                    dest.writeBundle(menuState);
+                }
+            }
+
+            private static SavedState readFromParcel(Parcel source) {
+                SavedState savedState = new SavedState();
+                savedState.featureId = source.readInt();
+                savedState.isOpen = source.readInt() == 1;
+                savedState.isInExpandedMode = source.readInt() == 1;
+
+                if (savedState.isOpen) {
+                    savedState.menuState = source.readBundle();
+                }
+
+                return savedState;
+            }
+
+            public static final Parcelable.Creator<SavedState> CREATOR
+                    = new Parcelable.Creator<SavedState>() {
+                public SavedState createFromParcel(Parcel in) {
+                    return readFromParcel(in);
+                }
+
+                public SavedState[] newArray(int size) {
+                    return new SavedState[size];
+                }
+            };
+        }
+
+    }
+
+    /**
+     * Simple implementation of MenuBuilder.Callback that:
+     * <li> Opens a submenu when selected.
+     * <li> Calls back to the callback's onMenuItemSelected when an item is
+     * selected.
+     */
+    private final class ContextMenuCallback implements MenuBuilder.Callback {
+        private int mFeatureId;
+        private MenuDialogHelper mSubMenuHelper;
+
+        public ContextMenuCallback(int featureId) {
+            mFeatureId = featureId;
+        }
+
+        public void onCloseMenu(MenuBuilder menu, boolean allMenusAreClosing) {
+            if (allMenusAreClosing) {
+                Callback callback = getCallback();
+                if (callback != null) callback.onPanelClosed(mFeatureId, menu);
+
+                if (menu == mContextMenu) {
+                    dismissContextMenu();
+                }
+
+                // Dismiss the submenu, if it is showing
+                if (mSubMenuHelper != null) {
+                    mSubMenuHelper.dismiss();
+                    mSubMenuHelper = null;
+                }
+            }
+        }
+
+        public void onCloseSubMenu(SubMenuBuilder menu) {
+            Callback callback = getCallback();
+            if (callback != null) callback.onPanelClosed(mFeatureId, menu.getRootMenu());
+        }
+
+        public boolean onMenuItemSelected(MenuBuilder menu, MenuItem item) {
+            Callback callback = getCallback();
+            return (callback != null) && callback.onMenuItemSelected(mFeatureId, item);
+        }
+
+        public void onMenuModeChange(MenuBuilder menu) {
+        }
+
+        public boolean onSubMenuSelected(SubMenuBuilder subMenu) {
+            // Set a simple callback for the submenu
+            subMenu.setCallback(this);
+
+            // The window manager will give us a valid window token
+            mSubMenuHelper = new MenuDialogHelper(subMenu);
+            mSubMenuHelper.show(null);
+
+            return true;
+        }
+    }
+
+    void sendCloseSystemWindows() {
+        PhoneWindowManager.sendCloseSystemWindows(getContext(), null);
+    }
+
+    void sendCloseSystemWindows(String reason) {
+        PhoneWindowManager.sendCloseSystemWindows(getContext(), reason);
+    }
+}
diff --git a/policy/src/com/android/internal/policy/impl/PhoneWindowManager.java b/policy/src/com/android/internal/policy/impl/PhoneWindowManager.java
new file mode 100755
index 0000000..83d9c47
--- /dev/null
+++ b/policy/src/com/android/internal/policy/impl/PhoneWindowManager.java
@@ -0,0 +1,2331 @@
+/*
+ * Copyright (C) 2006 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.android.internal.policy.impl;
+
+import android.app.Activity;
+import android.app.ActivityManagerNative;
+import android.app.IActivityManager;
+import android.app.IUiModeManager;
+import android.app.UiModeManager;
+import android.content.ActivityNotFoundException;
+import android.content.BroadcastReceiver;
+import android.content.ContentResolver;
+import android.content.Context;
+import android.content.Intent;
+import android.content.IntentFilter;
+import android.content.pm.ActivityInfo;
+import android.content.pm.PackageManager;
+import android.content.res.Configuration;
+import android.content.res.Resources;
+import android.database.ContentObserver;
+import android.graphics.PixelFormat;
+import android.graphics.Rect;
+import android.os.Handler;
+import android.os.IBinder;
+import android.os.LocalPowerManager;
+import android.os.PowerManager;
+import android.os.RemoteException;
+import android.os.ServiceManager;
+import android.os.SystemClock;
+import android.os.SystemProperties;
+import android.os.Vibrator;
+import android.provider.Settings;
+
+import com.android.internal.policy.PolicyManager;
+import com.android.internal.statusbar.IStatusBarService;
+import com.android.internal.telephony.ITelephony;
+import com.android.internal.widget.PointerLocationView;
+
+import android.util.Config;
+import android.util.EventLog;
+import android.util.Log;
+import android.view.Display;
+import android.view.Gravity;
+import android.view.HapticFeedbackConstants;
+import android.view.IWindowManager;
+import android.view.KeyEvent;
+import android.view.MotionEvent;
+import android.view.WindowOrientationListener;
+import android.view.Surface;
+import android.view.View;
+import android.view.ViewConfiguration;
+import android.view.Window;
+import android.view.WindowManager;
+import static android.view.WindowManager.LayoutParams.FIRST_APPLICATION_WINDOW;
+import static android.view.WindowManager.LayoutParams.FLAG_FORCE_NOT_FULLSCREEN;
+import static android.view.WindowManager.LayoutParams.FLAG_FULLSCREEN;
+import static android.view.WindowManager.LayoutParams.FLAG_LAYOUT_IN_SCREEN;
+import static android.view.WindowManager.LayoutParams.FLAG_LAYOUT_INSET_DECOR;
+import static android.view.WindowManager.LayoutParams.FLAG_LAYOUT_NO_LIMITS;
+import static android.view.WindowManager.LayoutParams.FLAG_SHOW_WHEN_LOCKED;
+import static android.view.WindowManager.LayoutParams.FLAG_DISMISS_KEYGUARD;
+import static android.view.WindowManager.LayoutParams.FLAG_ALLOW_LOCK_WHILE_SCREEN_ON;
+import static android.view.WindowManager.LayoutParams.SOFT_INPUT_MASK_ADJUST;
+import static android.view.WindowManager.LayoutParams.SOFT_INPUT_ADJUST_RESIZE;
+import static android.view.WindowManager.LayoutParams.LAST_APPLICATION_WINDOW;
+import static android.view.WindowManager.LayoutParams.TYPE_APPLICATION_MEDIA;
+import static android.view.WindowManager.LayoutParams.TYPE_APPLICATION_MEDIA_OVERLAY;
+import static android.view.WindowManager.LayoutParams.TYPE_APPLICATION_PANEL;
+import static android.view.WindowManager.LayoutParams.TYPE_APPLICATION_SUB_PANEL;
+import static android.view.WindowManager.LayoutParams.TYPE_APPLICATION_ATTACHED_DIALOG;
+import static android.view.WindowManager.LayoutParams.TYPE_KEYGUARD;
+import static android.view.WindowManager.LayoutParams.TYPE_KEYGUARD_DIALOG;
+import static android.view.WindowManager.LayoutParams.TYPE_PHONE;
+import static android.view.WindowManager.LayoutParams.TYPE_PRIORITY_PHONE;
+import static android.view.WindowManager.LayoutParams.TYPE_SEARCH_BAR;
+import static android.view.WindowManager.LayoutParams.TYPE_STATUS_BAR;
+import static android.view.WindowManager.LayoutParams.TYPE_STATUS_BAR_PANEL;
+import static android.view.WindowManager.LayoutParams.TYPE_SYSTEM_DIALOG;
+import static android.view.WindowManager.LayoutParams.TYPE_SYSTEM_ALERT;
+import static android.view.WindowManager.LayoutParams.TYPE_SYSTEM_ERROR;
+import static android.view.WindowManager.LayoutParams.TYPE_INPUT_METHOD;
+import static android.view.WindowManager.LayoutParams.TYPE_INPUT_METHOD_DIALOG;
+import static android.view.WindowManager.LayoutParams.TYPE_SYSTEM_OVERLAY;
+import static android.view.WindowManager.LayoutParams.TYPE_TOAST;
+import static android.view.WindowManager.LayoutParams.TYPE_WALLPAPER;
+import android.view.WindowManagerImpl;
+import android.view.WindowManagerPolicy;
+import android.view.animation.Animation;
+import android.view.animation.AnimationUtils;
+import android.media.IAudioService;
+import android.media.AudioManager;
+
+import java.util.ArrayList;
+
+/**
+ * WindowManagerPolicy implementation for the Android phone UI.  This
+ * introduces a new method suffix, Lp, for an internal lock of the
+ * PhoneWindowManager.  This is used to protect some internal state, and
+ * can be acquired with either thw Lw and Li lock held, so has the restrictions
+ * of both of those when held.
+ */
+public class PhoneWindowManager implements WindowManagerPolicy {
+    static final String TAG = "WindowManager";
+    static final boolean DEBUG = false;
+    static final boolean localLOGV = DEBUG ? Config.LOGD : Config.LOGV;
+    static final boolean DEBUG_LAYOUT = false;
+    static final boolean SHOW_STARTING_ANIMATIONS = true;
+    static final boolean SHOW_PROCESSES_ON_ALT_MENU = false;
+    
+    // wallpaper is at the bottom, though the window manager may move it.
+    static final int WALLPAPER_LAYER = 2;
+    static final int APPLICATION_LAYER = 2;
+    static final int PHONE_LAYER = 3;
+    static final int SEARCH_BAR_LAYER = 4;
+    static final int STATUS_BAR_PANEL_LAYER = 5;
+    static final int SYSTEM_DIALOG_LAYER = 6;
+    // toasts and the plugged-in battery thing
+    static final int TOAST_LAYER = 7;
+    static final int STATUS_BAR_LAYER = 8;
+    // SIM errors and unlock.  Not sure if this really should be in a high layer.
+    static final int PRIORITY_PHONE_LAYER = 9;
+    // like the ANR / app crashed dialogs
+    static final int SYSTEM_ALERT_LAYER = 10;
+    // system-level error dialogs
+    static final int SYSTEM_ERROR_LAYER = 11;
+    // on-screen keyboards and other such input method user interfaces go here.
+    static final int INPUT_METHOD_LAYER = 12;
+    // on-screen keyboards and other such input method user interfaces go here.
+    static final int INPUT_METHOD_DIALOG_LAYER = 13;
+    // the keyguard; nothing on top of these can take focus, since they are
+    // responsible for power management when displayed.
+    static final int KEYGUARD_LAYER = 14;
+    static final int KEYGUARD_DIALOG_LAYER = 15;
+    // things in here CAN NOT take focus, but are shown on top of everything else.
+    static final int SYSTEM_OVERLAY_LAYER = 16;
+
+    static final int APPLICATION_MEDIA_SUBLAYER = -2;
+    static final int APPLICATION_MEDIA_OVERLAY_SUBLAYER = -1;
+    static final int APPLICATION_PANEL_SUBLAYER = 1;
+    static final int APPLICATION_SUB_PANEL_SUBLAYER = 2;
+    
+    // Debugging: set this to have the system act like there is no hard keyboard.
+    static final boolean KEYBOARD_ALWAYS_HIDDEN = false;
+    
+    static public final String SYSTEM_DIALOG_REASON_KEY = "reason";
+    static public final String SYSTEM_DIALOG_REASON_GLOBAL_ACTIONS = "globalactions";
+    static public final String SYSTEM_DIALOG_REASON_RECENT_APPS = "recentapps";
+    static public final String SYSTEM_DIALOG_REASON_HOME_KEY = "homekey";
+
+    // Useful scan codes.
+    private static final int SW_LID = 0x00;
+    private static final int BTN_MOUSE = 0x110;
+    
+    final Object mLock = new Object();
+    
+    Context mContext;
+    IWindowManager mWindowManager;
+    LocalPowerManager mPowerManager;
+    Vibrator mVibrator; // Vibrator for giving feedback of orientation changes
+
+    // Vibrator pattern for haptic feedback of a long press.
+    long[] mLongPressVibePattern;
+    
+    // Vibrator pattern for haptic feedback of virtual key press.
+    long[] mVirtualKeyVibePattern;
+    
+    // Vibrator pattern for a short vibration.
+    long[] mKeyboardTapVibePattern;
+
+    // Vibrator pattern for haptic feedback during boot when safe mode is disabled.
+    long[] mSafeModeDisabledVibePattern;
+    
+    // Vibrator pattern for haptic feedback during boot when safe mode is enabled.
+    long[] mSafeModeEnabledVibePattern;
+
+    /** If true, hitting shift & menu will broadcast Intent.ACTION_BUG_REPORT */
+    boolean mEnableShiftMenuBugReports = false;
+    
+    boolean mSafeMode;
+    WindowState mStatusBar = null;
+    final ArrayList<WindowState> mStatusBarPanels = new ArrayList<WindowState>();
+    WindowState mKeyguard = null;
+    KeyguardViewMediator mKeyguardMediator;
+    GlobalActions mGlobalActions;
+    boolean mShouldTurnOffOnKeyUp;
+    RecentApplicationsDialog mRecentAppsDialog;
+    Handler mHandler;
+    
+    boolean mSystemReady;
+    boolean mLidOpen;
+    int mUiMode = Configuration.UI_MODE_TYPE_NORMAL;
+    int mDockMode = Intent.EXTRA_DOCK_STATE_UNDOCKED;
+    int mLidOpenRotation;
+    int mCarDockRotation;
+    int mDeskDockRotation;
+    boolean mCarDockEnablesAccelerometer;
+    boolean mDeskDockEnablesAccelerometer;
+    int mLidKeyboardAccessibility;
+    int mLidNavigationAccessibility;
+    boolean mScreenOn = false;
+    boolean mOrientationSensorEnabled = false;
+    int mCurrentAppOrientation = ActivityInfo.SCREEN_ORIENTATION_UNSPECIFIED;
+    static final int DEFAULT_ACCELEROMETER_ROTATION = 0;
+    int mAccelerometerDefault = DEFAULT_ACCELEROMETER_ROTATION;
+    boolean mHasSoftInput = false;
+    
+    int mPointerLocationMode = 0;
+    PointerLocationView mPointerLocationView = null;
+    
+    // The current size of the screen.
+    int mW, mH;
+    // During layout, the current screen borders with all outer decoration
+    // (status bar, input method dock) accounted for.
+    int mCurLeft, mCurTop, mCurRight, mCurBottom;
+    // During layout, the frame in which content should be displayed
+    // to the user, accounting for all screen decoration except for any
+    // space they deem as available for other content.  This is usually
+    // the same as mCur*, but may be larger if the screen decor has supplied
+    // content insets.
+    int mContentLeft, mContentTop, mContentRight, mContentBottom;
+    // During layout, the current screen borders along with input method
+    // windows are placed.
+    int mDockLeft, mDockTop, mDockRight, mDockBottom;
+    // During layout, the layer at which the doc window is placed.
+    int mDockLayer;
+    
+    static final Rect mTmpParentFrame = new Rect();
+    static final Rect mTmpDisplayFrame = new Rect();
+    static final Rect mTmpContentFrame = new Rect();
+    static final Rect mTmpVisibleFrame = new Rect();
+    
+    WindowState mTopFullscreenOpaqueWindowState;
+    boolean mForceStatusBar;
+    boolean mHideLockScreen;
+    boolean mDismissKeyguard;
+    boolean mHomePressed;
+    Intent mHomeIntent;
+    Intent mCarDockIntent;
+    Intent mDeskDockIntent;
+    boolean mSearchKeyPressed;
+    boolean mConsumeSearchKeyUp;
+
+    // support for activating the lock screen while the screen is on
+    boolean mAllowLockscreenWhenOn;
+    int mLockScreenTimeout;
+    boolean mLockScreenTimerActive;
+
+    // Behavior of ENDCALL Button.  (See Settings.System.END_BUTTON_BEHAVIOR.)
+    int mEndcallBehavior;
+
+    // Behavior of POWER button while in-call and screen on.
+    // (See Settings.Secure.INCALL_POWER_BUTTON_BEHAVIOR.)
+    int mIncallPowerBehavior;
+
+    int mLandscapeRotation = -1;
+    int mPortraitRotation = -1;
+
+    // Nothing to see here, move along...
+    int mFancyRotationAnimation;
+
+    ShortcutManager mShortcutManager;
+    PowerManager.WakeLock mBroadcastWakeLock;
+
+    class SettingsObserver extends ContentObserver {
+        SettingsObserver(Handler handler) {
+            super(handler);
+        }
+
+        void observe() {
+            ContentResolver resolver = mContext.getContentResolver();
+            resolver.registerContentObserver(Settings.System.getUriFor(
+                    Settings.System.END_BUTTON_BEHAVIOR), false, this);
+            resolver.registerContentObserver(Settings.Secure.getUriFor(
+                    Settings.Secure.INCALL_POWER_BUTTON_BEHAVIOR), false, this);
+            resolver.registerContentObserver(Settings.System.getUriFor(
+                    Settings.System.ACCELEROMETER_ROTATION), false, this);
+            resolver.registerContentObserver(Settings.System.getUriFor(
+                    Settings.System.SCREEN_OFF_TIMEOUT), false, this);
+            resolver.registerContentObserver(Settings.System.getUriFor(
+                    Settings.System.POINTER_LOCATION), false, this);
+            resolver.registerContentObserver(Settings.Secure.getUriFor(
+                    Settings.Secure.DEFAULT_INPUT_METHOD), false, this);
+            resolver.registerContentObserver(Settings.System.getUriFor(
+                    "fancy_rotation_anim"), false, this);
+            updateSettings();
+        }
+
+        @Override public void onChange(boolean selfChange) {
+            updateSettings();
+            try {
+                mWindowManager.setRotation(USE_LAST_ROTATION, false,
+                        mFancyRotationAnimation);
+            } catch (RemoteException e) {
+                // Ignore
+            }
+        }
+    }
+    
+    class MyOrientationListener extends WindowOrientationListener {
+        MyOrientationListener(Context context) {
+            super(context);
+        }
+        
+        @Override
+        public void onOrientationChanged(int rotation) {
+            // Send updates based on orientation value
+            if (localLOGV) Log.v(TAG, "onOrientationChanged, rotation changed to " +rotation);
+            try {
+                mWindowManager.setRotation(rotation, false,
+                        mFancyRotationAnimation);
+            } catch (RemoteException e) {
+                // Ignore
+
+            }
+        }                                      
+    }
+    MyOrientationListener mOrientationListener;
+
+    boolean useSensorForOrientationLp(int appOrientation) {
+        // The app says use the sensor.
+        if (appOrientation == ActivityInfo.SCREEN_ORIENTATION_SENSOR) {
+            return true;
+        }
+        // The user preference says we can rotate, and the app is willing to rotate.
+        if (mAccelerometerDefault != 0 &&
+                (appOrientation == ActivityInfo.SCREEN_ORIENTATION_USER
+                 || appOrientation == ActivityInfo.SCREEN_ORIENTATION_UNSPECIFIED)) {
+            return true;
+        }
+        // We're in a dock that has a rotation affinity, an the app is willing to rotate.
+        if ((mCarDockEnablesAccelerometer && mDockMode == Intent.EXTRA_DOCK_STATE_CAR)
+                || (mDeskDockEnablesAccelerometer && mDockMode == Intent.EXTRA_DOCK_STATE_DESK)) {
+            // Note we override the nosensor flag here.
+            if (appOrientation == ActivityInfo.SCREEN_ORIENTATION_USER
+                    || appOrientation == ActivityInfo.SCREEN_ORIENTATION_UNSPECIFIED
+                    || appOrientation == ActivityInfo.SCREEN_ORIENTATION_NOSENSOR) {
+                return true;
+            }
+        }
+        // Else, don't use the sensor.
+        return false;
+    }
+    
+    /*
+     * We always let the sensor be switched on by default except when
+     * the user has explicitly disabled sensor based rotation or when the
+     * screen is switched off.
+     */
+    boolean needSensorRunningLp() {
+        if (mCurrentAppOrientation == ActivityInfo.SCREEN_ORIENTATION_SENSOR) {
+            // If the application has explicitly requested to follow the
+            // orientation, then we need to turn the sensor or.
+            return true;
+        }
+        if ((mCarDockEnablesAccelerometer && mDockMode == Intent.EXTRA_DOCK_STATE_CAR) ||
+                (mDeskDockEnablesAccelerometer && mDockMode == Intent.EXTRA_DOCK_STATE_DESK)) {
+            // enable accelerometer if we are docked in a dock that enables accelerometer
+            // orientation management,
+            return true;
+        }
+        if (mAccelerometerDefault == 0) {
+            // If the setting for using the sensor by default is enabled, then
+            // we will always leave it on.  Note that the user could go to
+            // a window that forces an orientation that does not use the
+            // sensor and in theory we could turn it off... however, when next
+            // turning it on we won't have a good value for the current
+            // orientation for a little bit, which can cause orientation
+            // changes to lag, so we'd like to keep it always on.  (It will
+            // still be turned off when the screen is off.)
+            return false;
+        }
+        return true;
+    }
+    
+    /*
+     * Various use cases for invoking this function
+     * screen turning off, should always disable listeners if already enabled
+     * screen turned on and current app has sensor based orientation, enable listeners 
+     * if not already enabled
+     * screen turned on and current app does not have sensor orientation, disable listeners if
+     * already enabled
+     * screen turning on and current app has sensor based orientation, enable listeners if needed
+     * screen turning on and current app has nosensor based orientation, do nothing
+     */
+    void updateOrientationListenerLp() {
+        if (!mOrientationListener.canDetectOrientation()) {
+            // If sensor is turned off or nonexistent for some reason
+            return;
+        }
+        //Could have been invoked due to screen turning on or off or
+        //change of the currently visible window's orientation
+        if (localLOGV) Log.v(TAG, "Screen status="+mScreenOn+
+                ", current orientation="+mCurrentAppOrientation+
+                ", SensorEnabled="+mOrientationSensorEnabled);
+        boolean disable = true;
+        if (mScreenOn) {
+            if (needSensorRunningLp()) {
+                disable = false;
+                //enable listener if not already enabled
+                if (!mOrientationSensorEnabled) {
+                    mOrientationListener.enable();
+                    if(localLOGV) Log.v(TAG, "Enabling listeners");
+                    mOrientationSensorEnabled = true;
+                }
+            } 
+        } 
+        //check if sensors need to be disabled
+        if (disable && mOrientationSensorEnabled) {
+            mOrientationListener.disable();
+            if(localLOGV) Log.v(TAG, "Disabling listeners");
+            mOrientationSensorEnabled = false;
+        }
+    }
+
+    Runnable mPowerLongPress = new Runnable() {
+        public void run() {
+            mShouldTurnOffOnKeyUp = false;
+            performHapticFeedbackLw(null, HapticFeedbackConstants.LONG_PRESS, false);
+            sendCloseSystemWindows(SYSTEM_DIALOG_REASON_GLOBAL_ACTIONS);
+            showGlobalActionsDialog();
+        }
+    };
+
+    void showGlobalActionsDialog() {
+        if (mGlobalActions == null) {
+            mGlobalActions = new GlobalActions(mContext);
+        }
+        final boolean keyguardShowing = mKeyguardMediator.isShowingAndNotHidden();
+        mGlobalActions.showDialog(keyguardShowing, isDeviceProvisioned());
+        if (keyguardShowing) {
+            // since it took two seconds of long press to bring this up,
+            // poke the wake lock so they have some time to see the dialog.
+            mKeyguardMediator.pokeWakelock();
+        }
+    }
+
+    boolean isDeviceProvisioned() {
+        return Settings.Secure.getInt(
+                mContext.getContentResolver(), Settings.Secure.DEVICE_PROVISIONED, 0) != 0;
+    }
+
+    /**
+     * When a home-key longpress expires, close other system windows and launch the recent apps
+     */
+    Runnable mHomeLongPress = new Runnable() {
+        public void run() {
+            /*
+             * Eat the longpress so it won't dismiss the recent apps dialog when
+             * the user lets go of the home key
+             */
+            mHomePressed = false;
+            performHapticFeedbackLw(null, HapticFeedbackConstants.LONG_PRESS, false);
+            sendCloseSystemWindows(SYSTEM_DIALOG_REASON_RECENT_APPS);
+            showRecentAppsDialog();
+        }
+    };
+
+    /**
+     * Create (if necessary) and launch the recent apps dialog
+     */
+    void showRecentAppsDialog() {
+        if (mRecentAppsDialog == null) {
+            mRecentAppsDialog = new RecentApplicationsDialog(mContext);
+        }
+        mRecentAppsDialog.show();
+    }
+    
+    /** {@inheritDoc} */
+    public void init(Context context, IWindowManager windowManager,
+            LocalPowerManager powerManager) {
+        mContext = context;
+        mWindowManager = windowManager;
+        mPowerManager = powerManager;
+        mKeyguardMediator = new KeyguardViewMediator(context, this, powerManager);
+        mHandler = new Handler();
+        mOrientationListener = new MyOrientationListener(mContext);
+        SettingsObserver settingsObserver = new SettingsObserver(mHandler);
+        settingsObserver.observe();
+        mShortcutManager = new ShortcutManager(context, mHandler);
+        mShortcutManager.observe();
+        mHomeIntent =  new Intent(Intent.ACTION_MAIN, null);
+        mHomeIntent.addCategory(Intent.CATEGORY_HOME);
+        mHomeIntent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK
+                | Intent.FLAG_ACTIVITY_RESET_TASK_IF_NEEDED);
+        mCarDockIntent =  new Intent(Intent.ACTION_MAIN, null);
+        mCarDockIntent.addCategory(Intent.CATEGORY_CAR_DOCK);
+        mCarDockIntent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK
+                | Intent.FLAG_ACTIVITY_RESET_TASK_IF_NEEDED);
+        mDeskDockIntent =  new Intent(Intent.ACTION_MAIN, null);
+        mDeskDockIntent.addCategory(Intent.CATEGORY_DESK_DOCK);
+        mDeskDockIntent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK
+                | Intent.FLAG_ACTIVITY_RESET_TASK_IF_NEEDED);
+        PowerManager pm = (PowerManager)context.getSystemService(Context.POWER_SERVICE);
+        mBroadcastWakeLock = pm.newWakeLock(PowerManager.PARTIAL_WAKE_LOCK,
+                "PhoneWindowManager.mBroadcastWakeLock");
+        mEnableShiftMenuBugReports = "1".equals(SystemProperties.get("ro.debuggable"));
+        mLidOpenRotation = readRotation(
+                com.android.internal.R.integer.config_lidOpenRotation);
+        mCarDockRotation = readRotation(
+                com.android.internal.R.integer.config_carDockRotation);
+        mDeskDockRotation = readRotation(
+                com.android.internal.R.integer.config_deskDockRotation);
+        mCarDockEnablesAccelerometer = mContext.getResources().getBoolean(
+                com.android.internal.R.bool.config_carDockEnablesAccelerometer);
+        mDeskDockEnablesAccelerometer = mContext.getResources().getBoolean(
+                com.android.internal.R.bool.config_deskDockEnablesAccelerometer);
+        mLidKeyboardAccessibility = mContext.getResources().getInteger(
+                com.android.internal.R.integer.config_lidKeyboardAccessibility);
+        mLidNavigationAccessibility = mContext.getResources().getInteger(
+                com.android.internal.R.integer.config_lidNavigationAccessibility);
+        // register for dock events
+        IntentFilter filter = new IntentFilter();
+        filter.addAction(UiModeManager.ACTION_ENTER_CAR_MODE);
+        filter.addAction(UiModeManager.ACTION_EXIT_CAR_MODE);
+        filter.addAction(UiModeManager.ACTION_ENTER_DESK_MODE);
+        filter.addAction(UiModeManager.ACTION_EXIT_DESK_MODE);
+        filter.addAction(Intent.ACTION_DOCK_EVENT);
+        Intent intent = context.registerReceiver(mDockReceiver, filter);
+        if (intent != null) {
+            // Retrieve current sticky dock event broadcast.
+            mDockMode = intent.getIntExtra(Intent.EXTRA_DOCK_STATE,
+                    Intent.EXTRA_DOCK_STATE_UNDOCKED);
+        }
+        mVibrator = new Vibrator();
+        mLongPressVibePattern = getLongIntArray(mContext.getResources(),
+                com.android.internal.R.array.config_longPressVibePattern);
+        mVirtualKeyVibePattern = getLongIntArray(mContext.getResources(),
+                com.android.internal.R.array.config_virtualKeyVibePattern);
+        mKeyboardTapVibePattern = getLongIntArray(mContext.getResources(),
+                com.android.internal.R.array.config_keyboardTapVibePattern);
+        mSafeModeDisabledVibePattern = getLongIntArray(mContext.getResources(),
+                com.android.internal.R.array.config_safeModeDisabledVibePattern);
+        mSafeModeEnabledVibePattern = getLongIntArray(mContext.getResources(),
+                com.android.internal.R.array.config_safeModeEnabledVibePattern);
+    }
+
+    public void updateSettings() {
+        ContentResolver resolver = mContext.getContentResolver();
+        boolean updateRotation = false;
+        View addView = null;
+        View removeView = null;
+        synchronized (mLock) {
+            mEndcallBehavior = Settings.System.getInt(resolver,
+                    Settings.System.END_BUTTON_BEHAVIOR,
+                    Settings.System.END_BUTTON_BEHAVIOR_DEFAULT);
+            mIncallPowerBehavior = Settings.Secure.getInt(resolver,
+                    Settings.Secure.INCALL_POWER_BUTTON_BEHAVIOR,
+                    Settings.Secure.INCALL_POWER_BUTTON_BEHAVIOR_DEFAULT);
+            mFancyRotationAnimation = Settings.System.getInt(resolver,
+                    "fancy_rotation_anim", 0) != 0 ? 0x80 : 0;
+            int accelerometerDefault = Settings.System.getInt(resolver,
+                    Settings.System.ACCELEROMETER_ROTATION, DEFAULT_ACCELEROMETER_ROTATION);
+            if (mAccelerometerDefault != accelerometerDefault) {
+                mAccelerometerDefault = accelerometerDefault;
+                updateOrientationListenerLp();
+            }
+            if (mSystemReady) {
+                int pointerLocation = Settings.System.getInt(resolver,
+                        Settings.System.POINTER_LOCATION, 0);
+                if (mPointerLocationMode != pointerLocation) {
+                    mPointerLocationMode = pointerLocation;
+                    if (pointerLocation != 0) {
+                        if (mPointerLocationView == null) {
+                            mPointerLocationView = new PointerLocationView(mContext);
+                            mPointerLocationView.setPrintCoords(false);
+                            addView = mPointerLocationView;
+                        }
+                    } else {
+                        removeView = mPointerLocationView;
+                        mPointerLocationView = null;
+                    }
+                }
+            }
+            // use screen off timeout setting as the timeout for the lockscreen
+            mLockScreenTimeout = Settings.System.getInt(resolver,
+                    Settings.System.SCREEN_OFF_TIMEOUT, 0);
+            String imId = Settings.Secure.getString(resolver,
+                    Settings.Secure.DEFAULT_INPUT_METHOD);
+            boolean hasSoftInput = imId != null && imId.length() > 0;
+            if (mHasSoftInput != hasSoftInput) {
+                mHasSoftInput = hasSoftInput;
+                updateRotation = true;
+            }
+        }
+        if (updateRotation) {
+            updateRotation(0);
+        }
+        if (addView != null) {
+            WindowManager.LayoutParams lp = new WindowManager.LayoutParams(
+                    WindowManager.LayoutParams.MATCH_PARENT,
+                    WindowManager.LayoutParams.MATCH_PARENT);
+            lp.type = WindowManager.LayoutParams.TYPE_SYSTEM_OVERLAY;
+            lp.flags = 
+                WindowManager.LayoutParams.FLAG_NOT_TOUCHABLE|
+                WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE|
+                WindowManager.LayoutParams.FLAG_LAYOUT_IN_SCREEN;
+            lp.format = PixelFormat.TRANSLUCENT;
+            lp.setTitle("PointerLocation");
+            WindowManagerImpl wm = (WindowManagerImpl)
+                    mContext.getSystemService(Context.WINDOW_SERVICE);
+            wm.addView(addView, lp);
+        }
+        if (removeView != null) {
+            WindowManagerImpl wm = (WindowManagerImpl)
+                    mContext.getSystemService(Context.WINDOW_SERVICE);
+            wm.removeView(removeView);
+        }
+    }
+    
+    private int readRotation(int resID) {
+        try {
+            int rotation = mContext.getResources().getInteger(resID);
+            switch (rotation) {
+                case 0:
+                    return Surface.ROTATION_0;
+                case 90:
+                    return Surface.ROTATION_90;
+                case 180:
+                    return Surface.ROTATION_180;
+                case 270:
+                    return Surface.ROTATION_270;
+            }
+        } catch (Resources.NotFoundException e) {
+            // fall through
+        }
+        return -1;
+    }
+
+    /** {@inheritDoc} */
+    public int checkAddPermission(WindowManager.LayoutParams attrs) {
+        int type = attrs.type;
+        
+        if (type < WindowManager.LayoutParams.FIRST_SYSTEM_WINDOW
+                || type > WindowManager.LayoutParams.LAST_SYSTEM_WINDOW) {
+            return WindowManagerImpl.ADD_OKAY;
+        }
+        String permission = null;
+        switch (type) {
+            case TYPE_TOAST:
+                // XXX right now the app process has complete control over
+                // this...  should introduce a token to let the system
+                // monitor/control what they are doing.
+                break;
+            case TYPE_INPUT_METHOD:
+            case TYPE_WALLPAPER:
+                // The window manager will check these.
+                break;
+            case TYPE_PHONE:
+            case TYPE_PRIORITY_PHONE:
+            case TYPE_SYSTEM_ALERT:
+            case TYPE_SYSTEM_ERROR:
+            case TYPE_SYSTEM_OVERLAY:
+                permission = android.Manifest.permission.SYSTEM_ALERT_WINDOW;
+                break;
+            default:
+                permission = android.Manifest.permission.INTERNAL_SYSTEM_WINDOW;
+        }
+        if (permission != null) {
+            if (mContext.checkCallingOrSelfPermission(permission)
+                    != PackageManager.PERMISSION_GRANTED) {
+                return WindowManagerImpl.ADD_PERMISSION_DENIED;
+            }
+        }
+        return WindowManagerImpl.ADD_OKAY;
+    }
+    
+    public void adjustWindowParamsLw(WindowManager.LayoutParams attrs) {
+        switch (attrs.type) {
+            case TYPE_SYSTEM_OVERLAY:
+            case TYPE_TOAST:
+                // These types of windows can't receive input events.
+                attrs.flags |= WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE
+                        | WindowManager.LayoutParams.FLAG_NOT_TOUCHABLE;
+                break;
+        }
+    }
+    
+    void readLidState() {
+        try {
+            int sw = mWindowManager.getSwitchState(SW_LID);
+            if (sw >= 0) {
+                mLidOpen = sw == 0;
+            }
+        } catch (RemoteException e) {
+            // Ignore
+        }
+    }
+    
+    private int determineHiddenState(boolean lidOpen,
+            int mode, int hiddenValue, int visibleValue) {
+        switch (mode) {
+            case 1:
+                return lidOpen ? visibleValue : hiddenValue;
+            case 2:
+                return lidOpen ? hiddenValue : visibleValue;
+        }
+        return visibleValue;
+    }
+    
+    /** {@inheritDoc} */
+    public void adjustConfigurationLw(Configuration config) {
+        readLidState();
+        final boolean lidOpen = !KEYBOARD_ALWAYS_HIDDEN && mLidOpen;
+        mPowerManager.setKeyboardVisibility(lidOpen);
+        config.hardKeyboardHidden = determineHiddenState(lidOpen,
+                mLidKeyboardAccessibility, Configuration.HARDKEYBOARDHIDDEN_YES,
+                Configuration.HARDKEYBOARDHIDDEN_NO);
+        config.navigationHidden = determineHiddenState(lidOpen,
+                mLidNavigationAccessibility, Configuration.NAVIGATIONHIDDEN_YES,
+                Configuration.NAVIGATIONHIDDEN_NO);
+        config.keyboardHidden = (config.hardKeyboardHidden
+                        == Configuration.HARDKEYBOARDHIDDEN_NO || mHasSoftInput)
+                ? Configuration.KEYBOARDHIDDEN_NO
+                : Configuration.KEYBOARDHIDDEN_YES;
+    }
+    
+    public void dispatchedPointerEventLw(MotionEvent ev, int targetX, int targetY) {
+        if (mPointerLocationView == null) {
+            return;
+        }
+        synchronized (mLock) {
+            if (mPointerLocationView == null) {
+                return;
+            }
+            ev.offsetLocation(targetX, targetY);
+            mPointerLocationView.addTouchEvent(ev);
+            ev.offsetLocation(-targetX, -targetY);
+        }
+    }
+    
+    /** {@inheritDoc} */
+    public int windowTypeToLayerLw(int type) {
+        if (type >= FIRST_APPLICATION_WINDOW && type <= LAST_APPLICATION_WINDOW) {
+            return APPLICATION_LAYER;
+        }
+        switch (type) {
+        case TYPE_STATUS_BAR:
+            return STATUS_BAR_LAYER;
+        case TYPE_STATUS_BAR_PANEL:
+            return STATUS_BAR_PANEL_LAYER;
+        case TYPE_SYSTEM_DIALOG:
+            return SYSTEM_DIALOG_LAYER;
+        case TYPE_SEARCH_BAR:
+            return SEARCH_BAR_LAYER;
+        case TYPE_PHONE:
+            return PHONE_LAYER;
+        case TYPE_KEYGUARD:
+            return KEYGUARD_LAYER;
+        case TYPE_KEYGUARD_DIALOG:
+            return KEYGUARD_DIALOG_LAYER;
+        case TYPE_SYSTEM_ALERT:
+            return SYSTEM_ALERT_LAYER;
+        case TYPE_SYSTEM_ERROR:
+            return SYSTEM_ERROR_LAYER;
+        case TYPE_INPUT_METHOD:
+            return INPUT_METHOD_LAYER;
+        case TYPE_INPUT_METHOD_DIALOG:
+            return INPUT_METHOD_DIALOG_LAYER;
+        case TYPE_SYSTEM_OVERLAY:
+            return SYSTEM_OVERLAY_LAYER;
+        case TYPE_PRIORITY_PHONE:
+            return PRIORITY_PHONE_LAYER;
+        case TYPE_TOAST:
+            return TOAST_LAYER;
+        case TYPE_WALLPAPER:
+            return WALLPAPER_LAYER;
+        }
+        Log.e(TAG, "Unknown window type: " + type);
+        return APPLICATION_LAYER;
+    }
+
+    /** {@inheritDoc} */
+    public int subWindowTypeToLayerLw(int type) {
+        switch (type) {
+        case TYPE_APPLICATION_PANEL:
+        case TYPE_APPLICATION_ATTACHED_DIALOG:
+            return APPLICATION_PANEL_SUBLAYER;
+        case TYPE_APPLICATION_MEDIA:
+            return APPLICATION_MEDIA_SUBLAYER;
+        case TYPE_APPLICATION_MEDIA_OVERLAY:
+            return APPLICATION_MEDIA_OVERLAY_SUBLAYER;
+        case TYPE_APPLICATION_SUB_PANEL:
+            return APPLICATION_SUB_PANEL_SUBLAYER;
+        }
+        Log.e(TAG, "Unknown sub-window type: " + type);
+        return 0;
+    }
+
+    public int getMaxWallpaperLayer() {
+        return STATUS_BAR_LAYER;
+    }
+
+    public boolean doesForceHide(WindowState win, WindowManager.LayoutParams attrs) {
+        return attrs.type == WindowManager.LayoutParams.TYPE_KEYGUARD;
+    }
+    
+    public boolean canBeForceHidden(WindowState win, WindowManager.LayoutParams attrs) {
+        return attrs.type != WindowManager.LayoutParams.TYPE_STATUS_BAR
+                && attrs.type != WindowManager.LayoutParams.TYPE_WALLPAPER;
+    }
+    
+    /** {@inheritDoc} */
+    public View addStartingWindow(IBinder appToken, String packageName,
+                                  int theme, CharSequence nonLocalizedLabel,
+                                  int labelRes, int icon) {
+        if (!SHOW_STARTING_ANIMATIONS) {
+            return null;
+        }
+        if (packageName == null) {
+            return null;
+        }
+        
+        try {
+            Context context = mContext;
+            boolean setTheme = false;
+            //Log.i(TAG, "addStartingWindow " + packageName + ": nonLocalizedLabel="
+            //        + nonLocalizedLabel + " theme=" + Integer.toHexString(theme));
+            if (theme != 0 || labelRes != 0) {
+                try {
+                    context = context.createPackageContext(packageName, 0);
+                    if (theme != 0) {
+                        context.setTheme(theme);
+                        setTheme = true;
+                    }
+                } catch (PackageManager.NameNotFoundException e) {
+                    // Ignore
+                }
+            }
+            if (!setTheme) {
+                context.setTheme(com.android.internal.R.style.Theme);
+            }
+            
+            Window win = PolicyManager.makeNewWindow(context);
+            if (win.getWindowStyle().getBoolean(
+                    com.android.internal.R.styleable.Window_windowDisablePreview, false)) {
+                return null;
+            }
+            
+            Resources r = context.getResources();
+            win.setTitle(r.getText(labelRes, nonLocalizedLabel));
+    
+            win.setType(
+                WindowManager.LayoutParams.TYPE_APPLICATION_STARTING);
+            // Force the window flags: this is a fake window, so it is not really
+            // touchable or focusable by the user.  We also add in the ALT_FOCUSABLE_IM
+            // flag because we do know that the next window will take input
+            // focus, so we want to get the IME window up on top of us right away.
+            win.setFlags(
+                WindowManager.LayoutParams.FLAG_NOT_TOUCHABLE|
+                WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE|
+                WindowManager.LayoutParams.FLAG_ALT_FOCUSABLE_IM,
+                WindowManager.LayoutParams.FLAG_NOT_TOUCHABLE|
+                WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE|
+                WindowManager.LayoutParams.FLAG_ALT_FOCUSABLE_IM);
+    
+            win.setLayout(WindowManager.LayoutParams.MATCH_PARENT,
+                                WindowManager.LayoutParams.MATCH_PARENT);
+    
+            final WindowManager.LayoutParams params = win.getAttributes();
+            params.token = appToken;
+            params.packageName = packageName;
+            params.windowAnimations = win.getWindowStyle().getResourceId(
+                    com.android.internal.R.styleable.Window_windowAnimationStyle, 0);
+            params.setTitle("Starting " + packageName);
+
+            WindowManagerImpl wm = (WindowManagerImpl)
+                    context.getSystemService(Context.WINDOW_SERVICE);
+            View view = win.getDecorView();
+
+            if (win.isFloating()) {
+                // Whoops, there is no way to display an animation/preview
+                // of such a thing!  After all that work...  let's skip it.
+                // (Note that we must do this here because it is in
+                // getDecorView() where the theme is evaluated...  maybe
+                // we should peek the floating attribute from the theme
+                // earlier.)
+                return null;
+            }
+            
+            if (localLOGV) Log.v(
+                TAG, "Adding starting window for " + packageName
+                + " / " + appToken + ": "
+                + (view.getParent() != null ? view : null));
+
+            wm.addView(view, params);
+
+            // Only return the view if it was successfully added to the
+            // window manager... which we can tell by it having a parent.
+            return view.getParent() != null ? view : null;
+        } catch (WindowManagerImpl.BadTokenException e) {
+            // ignore
+            Log.w(TAG, appToken + " already running, starting window not displayed");
+        } catch (RuntimeException e) {
+            // don't crash if something else bad happens, for example a
+            // failure loading resources because we are loading from an app
+            // on external storage that has been unmounted.
+            Log.w(TAG, appToken + " failed creating starting window", e);
+        }
+
+        return null;
+    }
+
+    /** {@inheritDoc} */
+    public void removeStartingWindow(IBinder appToken, View window) {
+        // RuntimeException e = new RuntimeException();
+        // Log.i(TAG, "remove " + appToken + " " + window, e);
+
+        if (localLOGV) Log.v(
+            TAG, "Removing starting window for " + appToken + ": " + window);
+
+        if (window != null) {
+            WindowManagerImpl wm = (WindowManagerImpl) mContext.getSystemService(Context.WINDOW_SERVICE);
+            wm.removeView(window);
+        }
+    }
+
+    /**
+     * Preflight adding a window to the system.
+     * 
+     * Currently enforces that three window types are singletons:
+     * <ul>
+     * <li>STATUS_BAR_TYPE</li>
+     * <li>KEYGUARD_TYPE</li>
+     * </ul>
+     * 
+     * @param win The window to be added
+     * @param attrs Information about the window to be added
+     * 
+     * @return If ok, WindowManagerImpl.ADD_OKAY.  If too many singletons, WindowManagerImpl.ADD_MULTIPLE_SINGLETON
+     */
+    public int prepareAddWindowLw(WindowState win, WindowManager.LayoutParams attrs) {
+        switch (attrs.type) {
+            case TYPE_STATUS_BAR:
+                mContext.enforceCallingOrSelfPermission(
+                        android.Manifest.permission.STATUS_BAR_SERVICE,
+                        "PhoneWindowManager");
+                // TODO: Need to handle the race condition of the status bar proc
+                // dying and coming back before the removeWindowLw cleanup has happened.
+                if (mStatusBar != null) {
+                    return WindowManagerImpl.ADD_MULTIPLE_SINGLETON;
+                }
+                mStatusBar = win;
+                break;
+            case TYPE_STATUS_BAR_PANEL:
+                mContext.enforceCallingOrSelfPermission(
+                        android.Manifest.permission.STATUS_BAR_SERVICE,
+                        "PhoneWindowManager");
+                mStatusBarPanels.add(win);
+                break;
+            case TYPE_KEYGUARD:
+                if (mKeyguard != null) {
+                    return WindowManagerImpl.ADD_MULTIPLE_SINGLETON;
+                }
+                mKeyguard = win;
+                break;
+        }
+        return WindowManagerImpl.ADD_OKAY;
+    }
+
+    /** {@inheritDoc} */
+    public void removeWindowLw(WindowState win) {
+        if (mStatusBar == win) {
+            mStatusBar = null;
+        }
+        else if (mKeyguard == win) {
+            mKeyguard = null;
+        } else {
+            mStatusBarPanels.remove(win);
+        }
+    }
+
+    static final boolean PRINT_ANIM = false;
+    
+    /** {@inheritDoc} */
+    public int selectAnimationLw(WindowState win, int transit) {
+        if (PRINT_ANIM) Log.i(TAG, "selectAnimation in " + win
+              + ": transit=" + transit);
+        if (transit == TRANSIT_PREVIEW_DONE) {
+            if (win.hasAppShownWindows()) {
+                if (PRINT_ANIM) Log.i(TAG, "**** STARTING EXIT");
+                return com.android.internal.R.anim.app_starting_exit;
+            }
+        }
+
+        return 0;
+    }
+
+    public Animation createForceHideEnterAnimation() {
+        return AnimationUtils.loadAnimation(mContext,
+                com.android.internal.R.anim.lock_screen_behind_enter);
+    }
+    
+    static ITelephony getPhoneInterface() {
+        return ITelephony.Stub.asInterface(ServiceManager.checkService(Context.TELEPHONY_SERVICE));
+    }
+
+    static IAudioService getAudioInterface() {
+        return IAudioService.Stub.asInterface(ServiceManager.checkService(Context.AUDIO_SERVICE));
+    }
+
+    boolean keyguardOn() {
+        return keyguardIsShowingTq() || inKeyguardRestrictedKeyInputMode();
+    }
+
+    private static final int[] WINDOW_TYPES_WHERE_HOME_DOESNT_WORK = {
+            WindowManager.LayoutParams.TYPE_SYSTEM_ALERT,
+            WindowManager.LayoutParams.TYPE_SYSTEM_ERROR,
+        };
+
+    /** {@inheritDoc} */
+    @Override
+    public boolean interceptKeyBeforeDispatching(WindowState win, int action, int flags,
+            int keyCode, int metaState, int repeatCount, int policyFlags) {
+        final boolean keyguardOn = keyguardOn();
+        final boolean down = (action == KeyEvent.ACTION_DOWN);
+        final boolean canceled = ((flags & KeyEvent.FLAG_CANCELED) != 0);
+
+        if (false) {
+            Log.d(TAG, "interceptKeyTi keyCode=" + keyCode + " down=" + down + " repeatCount="
+                    + repeatCount + " keyguardOn=" + keyguardOn + " mHomePressed=" + mHomePressed);
+        }
+
+        // Clear a pending HOME longpress if the user releases Home
+        // TODO: This could probably be inside the next bit of logic, but that code
+        // turned out to be a bit fragile so I'm doing it here explicitly, for now.
+        if ((keyCode == KeyEvent.KEYCODE_HOME) && !down) {
+            mHandler.removeCallbacks(mHomeLongPress);
+        }
+
+        // If the HOME button is currently being held, then we do special
+        // chording with it.
+        if (mHomePressed) {
+            
+            // If we have released the home key, and didn't do anything else
+            // while it was pressed, then it is time to go home!
+            if (keyCode == KeyEvent.KEYCODE_HOME) {
+                if (!down) {
+                    mHomePressed = false;
+                    
+                    if (! canceled) {
+                        // If an incoming call is ringing, HOME is totally disabled.
+                        // (The user is already on the InCallScreen at this point,
+                        // and his ONLY options are to answer or reject the call.)
+                        boolean incomingRinging = false;
+                        try {
+                            ITelephony phoneServ = getPhoneInterface();
+                            if (phoneServ != null) {
+                                incomingRinging = phoneServ.isRinging();
+                            } else {
+                                Log.w(TAG, "Unable to find ITelephony interface");
+                            }
+                        } catch (RemoteException ex) {
+                            Log.w(TAG, "RemoteException from getPhoneInterface()", ex);
+                        }
+        
+                        if (incomingRinging) {
+                            Log.i(TAG, "Ignoring HOME; there's a ringing incoming call.");
+                        } else {
+                            launchHomeFromHotKey();
+                        }
+                    } else {
+                        Log.i(TAG, "Ignoring HOME; event canceled.");
+                    }
+                }
+            }
+            
+            return true;
+        }
+        
+        // First we always handle the home key here, so applications
+        // can never break it, although if keyguard is on, we do let
+        // it handle it, because that gives us the correct 5 second
+        // timeout.
+        if (keyCode == KeyEvent.KEYCODE_HOME) {
+
+            // If a system window has focus, then it doesn't make sense
+            // right now to interact with applications.
+            WindowManager.LayoutParams attrs = win != null ? win.getAttrs() : null;
+            if (attrs != null) {
+                final int type = attrs.type;
+                if (type == WindowManager.LayoutParams.TYPE_KEYGUARD
+                        || type == WindowManager.LayoutParams.TYPE_KEYGUARD_DIALOG) {
+                    // the "app" is keyguard, so give it the key
+                    return false;
+                }
+                final int typeCount = WINDOW_TYPES_WHERE_HOME_DOESNT_WORK.length;
+                for (int i=0; i<typeCount; i++) {
+                    if (type == WINDOW_TYPES_WHERE_HOME_DOESNT_WORK[i]) {
+                        // don't do anything, but also don't pass it to the app
+                        return true;
+                    }
+                }
+            }
+            
+            if (down && repeatCount == 0) {
+                if (!keyguardOn) {
+                    mHandler.postDelayed(mHomeLongPress, ViewConfiguration.getGlobalActionKeyTimeout());
+                }
+                mHomePressed = true;
+            }
+            return true;
+        } else if (keyCode == KeyEvent.KEYCODE_MENU) {
+            // Hijack modified menu keys for debugging features
+            final int chordBug = KeyEvent.META_SHIFT_ON;
+
+            if (down && repeatCount == 0) {
+                if (mEnableShiftMenuBugReports && (metaState & chordBug) == chordBug) {
+                    Intent intent = new Intent(Intent.ACTION_BUG_REPORT);
+                    mContext.sendOrderedBroadcast(intent, null);
+                    return true;
+                } else if (SHOW_PROCESSES_ON_ALT_MENU &&
+                        (metaState & KeyEvent.META_ALT_ON) == KeyEvent.META_ALT_ON) {
+                    Intent service = new Intent();
+                    service.setClassName(mContext, "com.android.server.LoadAverageService");
+                    ContentResolver res = mContext.getContentResolver();
+                    boolean shown = Settings.System.getInt(
+                            res, Settings.System.SHOW_PROCESSES, 0) != 0;
+                    if (!shown) {
+                        mContext.startService(service);
+                    } else {
+                        mContext.stopService(service);
+                    }
+                    Settings.System.putInt(
+                            res, Settings.System.SHOW_PROCESSES, shown ? 0 : 1);
+                    return true;
+                }
+            }
+        } else if (keyCode == KeyEvent.KEYCODE_SEARCH) {
+            if (down) {
+                if (repeatCount == 0) {
+                    mSearchKeyPressed = true;
+                }
+            } else {
+                mSearchKeyPressed = false;
+                
+                if (mConsumeSearchKeyUp) {
+                    // Consume the up-event
+                    mConsumeSearchKeyUp = false;
+                    return true;
+                }
+            }
+        }
+        
+        // Shortcuts are invoked through Search+key, so intercept those here
+        if (mSearchKeyPressed) {
+            if (down && repeatCount == 0 && !keyguardOn) {
+                Intent shortcutIntent = mShortcutManager.getIntent(keyCode, metaState);
+                if (shortcutIntent != null) {
+                    shortcutIntent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
+                    mContext.startActivity(shortcutIntent);
+                    
+                    /*
+                     * We launched an app, so the up-event of the search key
+                     * should be consumed
+                     */
+                    mConsumeSearchKeyUp = true;
+                    return true;
+                }
+            }
+        }
+
+        return false;
+    }
+
+    /**
+     * A home key -> launch home action was detected.  Take the appropriate action
+     * given the situation with the keyguard.
+     */
+    void launchHomeFromHotKey() {
+        if (mKeyguardMediator.isShowingAndNotHidden()) {
+            // don't launch home if keyguard showing
+        } else if (!mHideLockScreen && mKeyguardMediator.isInputRestricted()) {
+            // when in keyguard restricted mode, must first verify unlock
+            // before launching home
+            mKeyguardMediator.verifyUnlock(new OnKeyguardExitResult() {
+                public void onKeyguardExitResult(boolean success) {
+                    if (success) {
+                        try {
+                            ActivityManagerNative.getDefault().stopAppSwitches();
+                        } catch (RemoteException e) {
+                        }
+                        sendCloseSystemWindows(SYSTEM_DIALOG_REASON_HOME_KEY);
+                        startDockOrHome();
+                    }
+                }
+            });
+        } else {
+            // no keyguard stuff to worry about, just launch home!
+            try {
+                ActivityManagerNative.getDefault().stopAppSwitches();
+            } catch (RemoteException e) {
+            }
+            sendCloseSystemWindows(SYSTEM_DIALOG_REASON_HOME_KEY);
+            startDockOrHome();
+        }
+    }
+
+    public void getContentInsetHintLw(WindowManager.LayoutParams attrs, Rect contentInset) {
+        final int fl = attrs.flags;
+        
+        if ((fl &
+                (FLAG_LAYOUT_IN_SCREEN | FLAG_FULLSCREEN | FLAG_LAYOUT_INSET_DECOR))
+                == (FLAG_LAYOUT_IN_SCREEN | FLAG_LAYOUT_INSET_DECOR)) {
+            contentInset.set(mCurLeft, mCurTop, mW - mCurRight, mH - mCurBottom);
+        } else {
+            contentInset.setEmpty();
+        }
+    }
+    
+    /** {@inheritDoc} */
+    public void beginLayoutLw(int displayWidth, int displayHeight) {
+        mW = displayWidth;
+        mH = displayHeight;
+        mDockLeft = mContentLeft = mCurLeft = 0;
+        mDockTop = mContentTop = mCurTop = 0;
+        mDockRight = mContentRight = mCurRight = displayWidth;
+        mDockBottom = mContentBottom = mCurBottom = displayHeight;
+        mDockLayer = 0x10000000;
+
+        // decide where the status bar goes ahead of time
+        if (mStatusBar != null) {
+            final Rect pf = mTmpParentFrame;
+            final Rect df = mTmpDisplayFrame;
+            final Rect vf = mTmpVisibleFrame;
+            pf.left = df.left = vf.left = 0;
+            pf.top = df.top = vf.top = 0;
+            pf.right = df.right = vf.right = displayWidth;
+            pf.bottom = df.bottom = vf.bottom = displayHeight;
+            
+            mStatusBar.computeFrameLw(pf, df, vf, vf);
+            if (mStatusBar.isVisibleLw()) {
+                // If the status bar is hidden, we don't want to cause
+                // windows behind it to scroll.
+                mDockTop = mContentTop = mCurTop = mStatusBar.getFrameLw().bottom;
+                if (DEBUG_LAYOUT) Log.v(TAG, "Status bar: mDockBottom="
+                        + mDockBottom + " mContentBottom="
+                        + mContentBottom + " mCurBottom=" + mCurBottom);
+            }
+        }
+    }
+
+    void setAttachedWindowFrames(WindowState win, int fl, int sim,
+            WindowState attached, boolean insetDecors, Rect pf, Rect df, Rect cf, Rect vf) {
+        if (win.getSurfaceLayer() > mDockLayer && attached.getSurfaceLayer() < mDockLayer) {
+            // Here's a special case: if this attached window is a panel that is
+            // above the dock window, and the window it is attached to is below
+            // the dock window, then the frames we computed for the window it is
+            // attached to can not be used because the dock is effectively part
+            // of the underlying window and the attached window is floating on top
+            // of the whole thing.  So, we ignore the attached window and explicitly
+            // compute the frames that would be appropriate without the dock.
+            df.left = cf.left = vf.left = mDockLeft;
+            df.top = cf.top = vf.top = mDockTop;
+            df.right = cf.right = vf.right = mDockRight;
+            df.bottom = cf.bottom = vf.bottom = mDockBottom;
+        } else {
+            // The effective display frame of the attached window depends on
+            // whether it is taking care of insetting its content.  If not,
+            // we need to use the parent's content frame so that the entire
+            // window is positioned within that content.  Otherwise we can use
+            // the display frame and let the attached window take care of
+            // positioning its content appropriately.
+            if ((sim & SOFT_INPUT_MASK_ADJUST) != SOFT_INPUT_ADJUST_RESIZE) {
+                cf.set(attached.getDisplayFrameLw());
+            } else {
+                // If the window is resizing, then we want to base the content
+                // frame on our attached content frame to resize...  however,
+                // things can be tricky if the attached window is NOT in resize
+                // mode, in which case its content frame will be larger.
+                // Ungh.  So to deal with that, make sure the content frame
+                // we end up using is not covering the IM dock.
+                cf.set(attached.getContentFrameLw());
+                if (attached.getSurfaceLayer() < mDockLayer) {
+                    if (cf.left < mContentLeft) cf.left = mContentLeft;
+                    if (cf.top < mContentTop) cf.top = mContentTop;
+                    if (cf.right > mContentRight) cf.right = mContentRight;
+                    if (cf.bottom > mContentBottom) cf.bottom = mContentBottom;
+                }
+            }
+            df.set(insetDecors ? attached.getDisplayFrameLw() : cf);
+            vf.set(attached.getVisibleFrameLw());
+        }
+        // The LAYOUT_IN_SCREEN flag is used to determine whether the attached
+        // window should be positioned relative to its parent or the entire
+        // screen.
+        pf.set((fl & FLAG_LAYOUT_IN_SCREEN) == 0
+                ? attached.getFrameLw() : df);
+    }
+    
+    /** {@inheritDoc} */
+    public void layoutWindowLw(WindowState win, WindowManager.LayoutParams attrs,
+            WindowState attached) {
+        // we've already done the status bar
+        if (win == mStatusBar) {
+            return;
+        }
+
+        if (false) {
+            if ("com.google.android.youtube".equals(attrs.packageName)
+                    && attrs.type == WindowManager.LayoutParams.TYPE_APPLICATION_PANEL) {
+                Log.i(TAG, "GOTCHA!");
+            }
+        }
+        
+        final int fl = attrs.flags;
+        final int sim = attrs.softInputMode;
+        
+        final Rect pf = mTmpParentFrame;
+        final Rect df = mTmpDisplayFrame;
+        final Rect cf = mTmpContentFrame;
+        final Rect vf = mTmpVisibleFrame;
+        
+        if (attrs.type == TYPE_INPUT_METHOD) {
+            pf.left = df.left = cf.left = vf.left = mDockLeft;
+            pf.top = df.top = cf.top = vf.top = mDockTop;
+            pf.right = df.right = cf.right = vf.right = mDockRight;
+            pf.bottom = df.bottom = cf.bottom = vf.bottom = mDockBottom;
+            // IM dock windows always go to the bottom of the screen.
+            attrs.gravity = Gravity.BOTTOM;
+            mDockLayer = win.getSurfaceLayer();
+        } else {
+            if ((fl &
+                    (FLAG_LAYOUT_IN_SCREEN | FLAG_FULLSCREEN | FLAG_LAYOUT_INSET_DECOR))
+                    == (FLAG_LAYOUT_IN_SCREEN | FLAG_LAYOUT_INSET_DECOR)) {
+                // This is the case for a normal activity window: we want it
+                // to cover all of the screen space, and it can take care of
+                // moving its contents to account for screen decorations that
+                // intrude into that space.
+                if (attached != null) {
+                    // If this window is attached to another, our display
+                    // frame is the same as the one we are attached to.
+                    setAttachedWindowFrames(win, fl, sim, attached, true, pf, df, cf, vf);
+                } else {
+                    pf.left = df.left = 0;
+                    pf.top = df.top = 0;
+                    pf.right = df.right = mW;
+                    pf.bottom = df.bottom = mH;
+                    if ((sim & SOFT_INPUT_MASK_ADJUST) != SOFT_INPUT_ADJUST_RESIZE) {
+                        cf.left = mDockLeft;
+                        cf.top = mDockTop;
+                        cf.right = mDockRight;
+                        cf.bottom = mDockBottom;
+                    } else {
+                        cf.left = mContentLeft;
+                        cf.top = mContentTop;
+                        cf.right = mContentRight;
+                        cf.bottom = mContentBottom;
+                    }
+                    vf.left = mCurLeft;
+                    vf.top = mCurTop;
+                    vf.right = mCurRight;
+                    vf.bottom = mCurBottom;
+                }
+            } else if ((fl & FLAG_LAYOUT_IN_SCREEN) != 0) {
+                // A window that has requested to fill the entire screen just
+                // gets everything, period.
+                pf.left = df.left = cf.left = 0;
+                pf.top = df.top = cf.top = 0;
+                pf.right = df.right = cf.right = mW;
+                pf.bottom = df.bottom = cf.bottom = mH;
+                vf.left = mCurLeft;
+                vf.top = mCurTop;
+                vf.right = mCurRight;
+                vf.bottom = mCurBottom;
+            } else if (attached != null) {
+                // A child window should be placed inside of the same visible
+                // frame that its parent had.
+                setAttachedWindowFrames(win, fl, sim, attached, false, pf, df, cf, vf);
+            } else {
+                // Otherwise, a normal window must be placed inside the content
+                // of all screen decorations.
+                pf.left = mContentLeft;
+                pf.top = mContentTop;
+                pf.right = mContentRight;
+                pf.bottom = mContentBottom;
+                if ((sim & SOFT_INPUT_MASK_ADJUST) != SOFT_INPUT_ADJUST_RESIZE) {
+                    df.left = cf.left = mDockLeft;
+                    df.top = cf.top = mDockTop;
+                    df.right = cf.right = mDockRight;
+                    df.bottom = cf.bottom = mDockBottom;
+                } else {
+                    df.left = cf.left = mContentLeft;
+                    df.top = cf.top = mContentTop;
+                    df.right = cf.right = mContentRight;
+                    df.bottom = cf.bottom = mContentBottom;
+                }
+                vf.left = mCurLeft;
+                vf.top = mCurTop;
+                vf.right = mCurRight;
+                vf.bottom = mCurBottom;
+            }
+        }
+        
+        if ((fl & FLAG_LAYOUT_NO_LIMITS) != 0) {
+            df.left = df.top = cf.left = cf.top = vf.left = vf.top = -10000;
+            df.right = df.bottom = cf.right = cf.bottom = vf.right = vf.bottom = 10000;
+        }
+
+        if (DEBUG_LAYOUT) Log.v(TAG, "Compute frame " + attrs.getTitle()
+                + ": sim=#" + Integer.toHexString(sim)
+                + " pf=" + pf.toShortString() + " df=" + df.toShortString()
+                + " cf=" + cf.toShortString() + " vf=" + vf.toShortString());
+        
+        if (false) {
+            if ("com.google.android.youtube".equals(attrs.packageName)
+                    && attrs.type == WindowManager.LayoutParams.TYPE_APPLICATION_PANEL) {
+                if (true || localLOGV) Log.v(TAG, "Computing frame of " + win +
+                        ": sim=#" + Integer.toHexString(sim)
+                        + " pf=" + pf.toShortString() + " df=" + df.toShortString()
+                        + " cf=" + cf.toShortString() + " vf=" + vf.toShortString());
+            }
+        }
+        
+        win.computeFrameLw(pf, df, cf, vf);
+        
+        // Dock windows carve out the bottom of the screen, so normal windows
+        // can't appear underneath them.
+        if (attrs.type == TYPE_INPUT_METHOD && !win.getGivenInsetsPendingLw()) {
+            int top = win.getContentFrameLw().top;
+            top += win.getGivenContentInsetsLw().top;
+            if (mContentBottom > top) {
+                mContentBottom = top;
+            }
+            top = win.getVisibleFrameLw().top;
+            top += win.getGivenVisibleInsetsLw().top;
+            if (mCurBottom > top) {
+                mCurBottom = top;
+            }
+            if (DEBUG_LAYOUT) Log.v(TAG, "Input method: mDockBottom="
+                    + mDockBottom + " mContentBottom="
+                    + mContentBottom + " mCurBottom=" + mCurBottom);
+        }
+    }
+
+    /** {@inheritDoc} */
+    public int finishLayoutLw() {
+        return 0;
+    }
+
+    /** {@inheritDoc} */
+    public void beginAnimationLw(int displayWidth, int displayHeight) {
+        mTopFullscreenOpaqueWindowState = null;
+        mForceStatusBar = false;
+        
+        mHideLockScreen = false;
+        mAllowLockscreenWhenOn = false;
+        mDismissKeyguard = false;
+    }
+
+    /** {@inheritDoc} */
+    public void animatingWindowLw(WindowState win,
+                                WindowManager.LayoutParams attrs) {
+        if (mTopFullscreenOpaqueWindowState == null &&
+                win.isVisibleOrBehindKeyguardLw()) {
+            if ((attrs.flags & FLAG_FORCE_NOT_FULLSCREEN) != 0) {
+                mForceStatusBar = true;
+            } 
+            if (attrs.type >= FIRST_APPLICATION_WINDOW
+                    && attrs.type <= LAST_APPLICATION_WINDOW
+                    && win.fillsScreenLw(mW, mH, false, false)) {
+                if (DEBUG_LAYOUT) Log.v(TAG, "Fullscreen window: " + win);
+                mTopFullscreenOpaqueWindowState = win;
+                if ((attrs.flags & FLAG_SHOW_WHEN_LOCKED) != 0) {
+                    if (localLOGV) Log.v(TAG, "Setting mHideLockScreen to true by win " + win);
+                    mHideLockScreen = true;
+                }
+                if ((attrs.flags & FLAG_DISMISS_KEYGUARD) != 0) {
+                    if (localLOGV) Log.v(TAG, "Setting mDismissKeyguard to true by win " + win);
+                    mDismissKeyguard = true;
+                }
+                if ((attrs.flags & FLAG_ALLOW_LOCK_WHILE_SCREEN_ON) != 0) {
+                    mAllowLockscreenWhenOn = true;
+                }
+            }
+        }
+    }
+
+    /** {@inheritDoc} */
+    public int finishAnimationLw() {
+        int changes = 0;
+        
+        boolean hiding = false;
+        if (mStatusBar != null) {
+            if (localLOGV) Log.i(TAG, "force=" + mForceStatusBar
+                    + " top=" + mTopFullscreenOpaqueWindowState);
+            if (mForceStatusBar) {
+                if (DEBUG_LAYOUT) Log.v(TAG, "Showing status bar");
+                if (mStatusBar.showLw(true)) changes |= FINISH_LAYOUT_REDO_LAYOUT;
+            } else if (mTopFullscreenOpaqueWindowState != null) {
+                //Log.i(TAG, "frame: " + mTopFullscreenOpaqueWindowState.getFrameLw()
+                //        + " shown frame: " + mTopFullscreenOpaqueWindowState.getShownFrameLw());
+                //Log.i(TAG, "attr: " + mTopFullscreenOpaqueWindowState.getAttrs());
+                WindowManager.LayoutParams lp =
+                    mTopFullscreenOpaqueWindowState.getAttrs();
+                boolean hideStatusBar =
+                    (lp.flags & WindowManager.LayoutParams.FLAG_FULLSCREEN) != 0;
+                if (hideStatusBar) {
+                    if (DEBUG_LAYOUT) Log.v(TAG, "Hiding status bar");
+                    if (mStatusBar.hideLw(true)) changes |= FINISH_LAYOUT_REDO_LAYOUT;
+                    hiding = true;
+                } else {
+                    if (DEBUG_LAYOUT) Log.v(TAG, "Showing status bar");
+                    if (mStatusBar.showLw(true)) changes |= FINISH_LAYOUT_REDO_LAYOUT;
+                }
+            }
+        }
+        
+        if (changes != 0 && hiding) {
+            IStatusBarService sbs = IStatusBarService.Stub.asInterface(ServiceManager.getService("statusbar"));
+            if (sbs != null) {
+                try {
+                    // Make sure the window shade is hidden.
+                    sbs.collapse();
+                } catch (RemoteException e) {
+                }
+            }
+        }
+
+        // Hide the key guard if a visible window explicitly specifies that it wants to be displayed
+        // when the screen is locked
+        if (mKeyguard != null) {
+            if (localLOGV) Log.v(TAG, "finishLayoutLw::mHideKeyguard="+mHideLockScreen);
+            if (mDismissKeyguard && !mKeyguardMediator.isSecure()) {
+                if (mKeyguard.hideLw(true)) {
+                    changes |= FINISH_LAYOUT_REDO_LAYOUT
+                            | FINISH_LAYOUT_REDO_CONFIG
+                            | FINISH_LAYOUT_REDO_WALLPAPER;
+                }
+                if (mKeyguardMediator.isShowing()) {
+                    mHandler.post(new Runnable() {
+                        public void run() {
+                            mKeyguardMediator.keyguardDone(false, false);
+                        }
+                    });
+                }
+            } else if (mHideLockScreen) {
+                if (mKeyguard.hideLw(true)) {
+                    changes |= FINISH_LAYOUT_REDO_LAYOUT
+                            | FINISH_LAYOUT_REDO_CONFIG
+                            | FINISH_LAYOUT_REDO_WALLPAPER;
+                }
+                mKeyguardMediator.setHidden(true);
+            } else {
+                if (mKeyguard.showLw(true)) {
+                    changes |= FINISH_LAYOUT_REDO_LAYOUT
+                            | FINISH_LAYOUT_REDO_CONFIG
+                            | FINISH_LAYOUT_REDO_WALLPAPER;
+                }
+                mKeyguardMediator.setHidden(false);
+            }
+        }
+        
+        // update since mAllowLockscreenWhenOn might have changed
+        updateLockScreenTimeout();
+        return changes;
+    }
+
+    public boolean allowAppAnimationsLw() {
+        if (mKeyguard != null && mKeyguard.isVisibleLw()) {
+            // If keyguard is currently visible, no reason to animate
+            // behind it.
+            return false;
+        }
+        if (mStatusBar != null && mStatusBar.isVisibleLw()) {
+            Rect rect = new Rect(mStatusBar.getShownFrameLw());
+            for (int i=mStatusBarPanels.size()-1; i>=0; i--) {
+                WindowState w = mStatusBarPanels.get(i);
+                if (w.isVisibleLw()) {
+                    rect.union(w.getShownFrameLw());
+                }
+            }
+            final int insetw = mW/10;
+            final int inseth = mH/10;
+            if (rect.contains(insetw, inseth, mW-insetw, mH-inseth)) {
+                // All of the status bar windows put together cover the
+                // screen, so the app can't be seen.  (Note this test doesn't
+                // work if the rects of these windows are at off offsets or
+                // sizes, causing gaps in the rect union we have computed.)
+                return false;
+            }
+        }
+        return true;
+    }
+
+    /** {@inheritDoc} */
+    public void notifyLidSwitchChanged(long whenNanos, boolean lidOpen) {
+        // lid changed state
+        mLidOpen = lidOpen;
+        boolean awakeNow = mKeyguardMediator.doLidChangeTq(mLidOpen);
+        updateRotation(Surface.FLAGS_ORIENTATION_ANIMATION_DISABLE);
+        if (awakeNow) {
+            // If the lid opening and we don't have to keep the
+            // keyguard up, then we can turn on the screen
+            // immediately.
+            mKeyguardMediator.pokeWakelock();
+        } else if (keyguardIsShowingTq()) {
+            if (mLidOpen) {
+                // If we are opening the lid and not hiding the
+                // keyguard, then we need to have it turn on the
+                // screen once it is shown.
+                mKeyguardMediator.onWakeKeyWhenKeyguardShowingTq(
+                        KeyEvent.KEYCODE_POWER);
+            }
+        } else {
+            // Light up the keyboard if we are sliding up.
+            if (mLidOpen) {
+                mPowerManager.userActivity(SystemClock.uptimeMillis(), false,
+                        LocalPowerManager.BUTTON_EVENT);
+            } else {
+                mPowerManager.userActivity(SystemClock.uptimeMillis(), false,
+                        LocalPowerManager.OTHER_EVENT);
+            }
+        }
+    }
+
+    /**
+     * @return Whether a telephone call is in progress right now.
+     */
+    boolean isInCall() {
+        final ITelephony phone = getPhoneInterface();
+        if (phone == null) {
+            Log.w(TAG, "couldn't get ITelephony reference");
+            return false;
+        }
+        try {
+            return phone.isOffhook();
+        } catch (RemoteException e) {
+            Log.w(TAG, "ITelephony.isOffhhook threw RemoteException " + e);
+            return false;
+        }
+    }
+
+    /**
+     * @return Whether music is being played right now.
+     */
+    boolean isMusicActive() {
+        final AudioManager am = (AudioManager)mContext.getSystemService(Context.AUDIO_SERVICE);
+        if (am == null) {
+            Log.w(TAG, "isMusicActive: couldn't get AudioManager reference");
+            return false;
+        }
+        return am.isMusicActive();
+    }
+
+    /**
+     * Tell the audio service to adjust the volume appropriate to the event.
+     * @param keycode
+     */
+    void handleVolumeKey(int stream, int keycode) {
+        final IAudioService audio = getAudioInterface();
+        if (audio == null) {
+            Log.w(TAG, "handleVolumeKey: couldn't get IAudioService reference");
+            return;
+        }
+        try {
+            // since audio is playing, we shouldn't have to hold a wake lock
+            // during the call, but we do it as a precaution for the rare possibility
+            // that the music stops right before we call this
+            mBroadcastWakeLock.acquire();
+            audio.adjustStreamVolume(stream,
+                keycode == KeyEvent.KEYCODE_VOLUME_UP
+                            ? AudioManager.ADJUST_RAISE
+                            : AudioManager.ADJUST_LOWER,
+                    0);
+        } catch (RemoteException e) {
+            Log.w(TAG, "IAudioService.adjustStreamVolume() threw RemoteException " + e);
+        } finally {
+            mBroadcastWakeLock.release();
+        }
+    }
+    
+    static boolean isMediaKey(int code) {
+        if (code == KeyEvent.KEYCODE_HEADSETHOOK || 
+                code == KeyEvent.KEYCODE_MEDIA_PLAY_PAUSE ||
+                code == KeyEvent.KEYCODE_MEDIA_STOP || 
+                code == KeyEvent.KEYCODE_MEDIA_NEXT ||
+                code == KeyEvent.KEYCODE_MEDIA_PREVIOUS || 
+                code == KeyEvent.KEYCODE_MEDIA_REWIND ||
+                code == KeyEvent.KEYCODE_MEDIA_FAST_FORWARD) {
+            return true;
+        }
+        return false;    
+    }
+ 
+    /** {@inheritDoc} */
+    @Override
+    public int interceptKeyBeforeQueueing(long whenNanos, int keyCode, boolean down,
+            int policyFlags, boolean isScreenOn) {
+        int result = ACTION_PASS_TO_USER;
+        
+        final boolean isWakeKey = (policyFlags
+                & (WindowManagerPolicy.FLAG_WAKE | WindowManagerPolicy.FLAG_WAKE_DROPPED)) != 0;
+        
+        // If screen is off then we treat the case where the keyguard is open but hidden
+        // the same as if it were open and in front.
+        // This will prevent any keys other than the power button from waking the screen
+        // when the keyguard is hidden by another activity.
+        final boolean keyguardActive = (isScreenOn ?
+                                        mKeyguardMediator.isShowingAndNotHidden() :
+                                        mKeyguardMediator.isShowing());
+
+        if (false) {
+            Log.d(TAG, "interceptKeyTq keycode=" + keyCode
+                  + " screenIsOn=" + isScreenOn + " keyguardActive=" + keyguardActive);
+        }
+
+        if (keyguardActive) {
+            if (isScreenOn) {
+                // when the screen is on, always give the event to the keyguard
+                result |= ACTION_PASS_TO_USER;
+            } else {
+                // otherwise, don't pass it to the user
+                result &= ~ACTION_PASS_TO_USER;
+
+                if (isWakeKey && down) {
+
+                    // tell the mediator about a wake key, it may decide to
+                    // turn on the screen depending on whether the key is
+                    // appropriate.
+                    if (!mKeyguardMediator.onWakeKeyWhenKeyguardShowingTq(keyCode)
+                            && (keyCode == KeyEvent.KEYCODE_VOLUME_DOWN
+                                || keyCode == KeyEvent.KEYCODE_VOLUME_UP)) {
+                        // when keyguard is showing and screen off, we need
+                        // to handle the volume key for calls and  music here
+                        if (isInCall()) {
+                            handleVolumeKey(AudioManager.STREAM_VOICE_CALL, keyCode);
+                        } else if (isMusicActive()) {
+                            handleVolumeKey(AudioManager.STREAM_MUSIC, keyCode);
+                        }
+                    }
+                }
+            }
+        } else if (!isScreenOn) {
+            // If we are in-call with screen off and keyguard is not showing,
+            // then handle the volume key ourselves.
+            // This is necessary because the phone app will disable the keyguard
+            // when the proximity sensor is in use.
+            if (isInCall() &&
+                     (keyCode == KeyEvent.KEYCODE_VOLUME_DOWN
+                                || keyCode == KeyEvent.KEYCODE_VOLUME_UP)) {
+                result &= ~ACTION_PASS_TO_USER;
+                handleVolumeKey(AudioManager.STREAM_VOICE_CALL, keyCode);
+            }
+            if (isWakeKey) {
+                // a wake key has a sole purpose of waking the device; don't pass
+                // it to the user
+                result |= ACTION_POKE_USER_ACTIVITY;
+                result &= ~ACTION_PASS_TO_USER;
+            }
+        }
+
+        if (keyCode == KeyEvent.KEYCODE_ENDCALL
+                || keyCode == KeyEvent.KEYCODE_POWER) {
+            if (down) {
+                boolean handled = false;
+                boolean hungUp = false;
+                // key repeats are generated by the window manager, and we don't see them
+                // here, so unless the driver is doing something it shouldn't be, we know
+                // this is the real press event.
+                ITelephony phoneServ = getPhoneInterface();
+                if (phoneServ != null) {
+                    try {
+                        if (keyCode == KeyEvent.KEYCODE_ENDCALL) {
+                            handled = hungUp = phoneServ.endCall();
+                        } else if (keyCode == KeyEvent.KEYCODE_POWER) {
+                            if (phoneServ.isRinging()) {
+                                // Pressing Power while there's a ringing incoming
+                                // call should silence the ringer.
+                                phoneServ.silenceRinger();
+                                handled = true;
+                            } else if (phoneServ.isOffhook() &&
+                                       ((mIncallPowerBehavior
+                                         & Settings.Secure.INCALL_POWER_BUTTON_BEHAVIOR_HANGUP)
+                                        != 0)) {
+                                // Otherwise, if "Power button ends call" is enabled,
+                                // the Power button will hang up any current active call.
+                                handled = hungUp = phoneServ.endCall();
+                            }
+                        }
+                    } catch (RemoteException ex) {
+                        Log.w(TAG, "ITelephony threw RemoteException" + ex);
+                    }
+                } else {
+                    Log.w(TAG, "!!! Unable to find ITelephony interface !!!");
+                }
+
+                if (!isScreenOn
+                        || (handled && keyCode != KeyEvent.KEYCODE_POWER)
+                        || (handled && hungUp && keyCode == KeyEvent.KEYCODE_POWER)) {
+                    mShouldTurnOffOnKeyUp = false;
+                } else {
+                    // only try to turn off the screen if we didn't already hang up
+                    mShouldTurnOffOnKeyUp = true;
+                    mHandler.postDelayed(mPowerLongPress,
+                            ViewConfiguration.getGlobalActionKeyTimeout());
+                    result &= ~ACTION_PASS_TO_USER;
+                }
+            } else {
+                mHandler.removeCallbacks(mPowerLongPress);
+                if (mShouldTurnOffOnKeyUp) {
+                    mShouldTurnOffOnKeyUp = false;
+                    boolean gohome, sleeps;
+                    if (keyCode == KeyEvent.KEYCODE_ENDCALL) {
+                        gohome = (mEndcallBehavior
+                                  & Settings.System.END_BUTTON_BEHAVIOR_HOME) != 0;
+                        sleeps = (mEndcallBehavior
+                                  & Settings.System.END_BUTTON_BEHAVIOR_SLEEP) != 0;
+                    } else {
+                        gohome = false;
+                        sleeps = true;
+                    }
+                    if (keyguardActive
+                            || (sleeps && !gohome)
+                            || (gohome && !goHome() && sleeps)) {
+                        // they must already be on the keyguad or home screen,
+                        // go to sleep instead
+                        Log.d(TAG, "I'm tired mEndcallBehavior=0x"
+                                + Integer.toHexString(mEndcallBehavior));
+                        result &= ~ACTION_POKE_USER_ACTIVITY;
+                        result |= ACTION_GO_TO_SLEEP;
+                    }
+                    result &= ~ACTION_PASS_TO_USER;
+                }
+            }
+        } else if (isMediaKey(keyCode)) {
+            // This key needs to be handled even if the screen is off.
+            // If others need to be handled while it's off, this is a reasonable
+            // pattern to follow.
+            if ((result & ACTION_PASS_TO_USER) == 0) {
+                // Only do this if we would otherwise not pass it to the user. In that
+                // case, the PhoneWindow class will do the same thing, except it will
+                // only do it if the showing app doesn't process the key on its own.
+                long when = whenNanos / 1000000;
+                KeyEvent keyEvent = new KeyEvent(when, when,
+                        down ? KeyEvent.ACTION_DOWN : KeyEvent.ACTION_UP,
+                        keyCode, 0);
+                mBroadcastWakeLock.acquire();
+                mHandler.post(new PassHeadsetKey(keyEvent));
+            }
+        } else if (keyCode == KeyEvent.KEYCODE_CALL) {
+            // If an incoming call is ringing, answer it!
+            // (We handle this key here, rather than in the InCallScreen, to make
+            // sure we'll respond to the key even if the InCallScreen hasn't come to
+            // the foreground yet.)
+
+            // We answer the call on the DOWN event, to agree with
+            // the "fallback" behavior in the InCallScreen.
+            if (down) {
+                try {
+                    ITelephony phoneServ = getPhoneInterface();
+                    if (phoneServ != null) {
+                        if (phoneServ.isRinging()) {
+                            Log.i(TAG, "interceptKeyTq:"
+                                  + " CALL key-down while ringing: Answer the call!");
+                            phoneServ.answerRingingCall();
+
+                            // And *don't* pass this key thru to the current activity
+                            // (which is presumably the InCallScreen.)
+                            result &= ~ACTION_PASS_TO_USER;
+                        }
+                    } else {
+                        Log.w(TAG, "CALL button: Unable to find ITelephony interface");
+                    }
+                } catch (RemoteException ex) {
+                    Log.w(TAG, "CALL button: RemoteException from getPhoneInterface()", ex);
+                }
+            }
+        } else if ((keyCode == KeyEvent.KEYCODE_VOLUME_UP)
+                   || (keyCode == KeyEvent.KEYCODE_VOLUME_DOWN)) {
+            // If an incoming call is ringing, either VOLUME key means
+            // "silence ringer".  We handle these keys here, rather than
+            // in the InCallScreen, to make sure we'll respond to them
+            // even if the InCallScreen hasn't come to the foreground yet.
+
+            // Look for the DOWN event here, to agree with the "fallback"
+            // behavior in the InCallScreen.
+            if (down) {
+                try {
+                    ITelephony phoneServ = getPhoneInterface();
+                    if (phoneServ != null) {
+                        if (phoneServ.isRinging()) {
+                            Log.i(TAG, "interceptKeyTq:"
+                                  + " VOLUME key-down while ringing: Silence ringer!");
+                            // Silence the ringer.  (It's safe to call this
+                            // even if the ringer has already been silenced.)
+                            phoneServ.silenceRinger();
+
+                            // And *don't* pass this key thru to the current activity
+                            // (which is probably the InCallScreen.)
+                            result &= ~ACTION_PASS_TO_USER;
+                        }
+                    } else {
+                        Log.w(TAG, "VOLUME button: Unable to find ITelephony interface");
+                    }
+                } catch (RemoteException ex) {
+                    Log.w(TAG, "VOLUME button: RemoteException from getPhoneInterface()", ex);
+                }
+            }
+        }
+
+        return result;
+    }
+
+    class PassHeadsetKey implements Runnable {
+        KeyEvent mKeyEvent;
+
+        PassHeadsetKey(KeyEvent keyEvent) {
+            mKeyEvent = keyEvent;
+        }
+
+        public void run() {
+            if (ActivityManagerNative.isSystemReady()) {
+                Intent intent = new Intent(Intent.ACTION_MEDIA_BUTTON, null);
+                intent.putExtra(Intent.EXTRA_KEY_EVENT, mKeyEvent);
+                mContext.sendOrderedBroadcast(intent, null, mBroadcastDone,
+                        mHandler, Activity.RESULT_OK, null, null);
+            }
+        }
+    }
+
+    BroadcastReceiver mBroadcastDone = new BroadcastReceiver() {
+        public void onReceive(Context context, Intent intent) {
+            mBroadcastWakeLock.release();
+        }
+    };
+
+    BroadcastReceiver mDockReceiver = new BroadcastReceiver() {
+        public void onReceive(Context context, Intent intent) {
+            if (Intent.ACTION_DOCK_EVENT.equals(intent.getAction())) {
+                mDockMode = intent.getIntExtra(Intent.EXTRA_DOCK_STATE,
+                        Intent.EXTRA_DOCK_STATE_UNDOCKED);
+            } else {
+                try {
+                    IUiModeManager uiModeService = IUiModeManager.Stub.asInterface(
+                            ServiceManager.getService(Context.UI_MODE_SERVICE));
+                    mUiMode = uiModeService.getCurrentModeType();
+                } catch (RemoteException e) {
+                }
+            }
+            updateRotation(Surface.FLAGS_ORIENTATION_ANIMATION_DISABLE);
+            updateOrientationListenerLp();
+        }
+    };
+
+    /** {@inheritDoc} */
+    public void screenTurnedOff(int why) {
+        EventLog.writeEvent(70000, 0);
+        mKeyguardMediator.onScreenTurnedOff(why);
+        synchronized (mLock) {
+            mScreenOn = false;
+            updateOrientationListenerLp();
+            updateLockScreenTimeout();
+        }
+    }
+
+    /** {@inheritDoc} */
+    public void screenTurnedOn() {
+        EventLog.writeEvent(70000, 1);
+        mKeyguardMediator.onScreenTurnedOn();
+        synchronized (mLock) {
+            mScreenOn = true;
+            updateOrientationListenerLp();
+            updateLockScreenTimeout();
+        }
+    }
+
+    /** {@inheritDoc} */
+    public boolean isScreenOn() {
+        return mScreenOn;
+    }
+    
+    /** {@inheritDoc} */
+    public void enableKeyguard(boolean enabled) {
+        mKeyguardMediator.setKeyguardEnabled(enabled);
+    }
+
+    /** {@inheritDoc} */
+    public void exitKeyguardSecurely(OnKeyguardExitResult callback) {
+        mKeyguardMediator.verifyUnlock(callback);
+    }
+
+    private boolean keyguardIsShowingTq() {
+        return mKeyguardMediator.isShowingAndNotHidden();
+    }
+
+    /** {@inheritDoc} */
+    public boolean inKeyguardRestrictedKeyInputMode() {
+        return mKeyguardMediator.isInputRestricted();
+    }
+
+    void sendCloseSystemWindows() {
+        sendCloseSystemWindows(mContext, null);
+    }
+
+    void sendCloseSystemWindows(String reason) {
+        sendCloseSystemWindows(mContext, reason);
+    }
+
+    static void sendCloseSystemWindows(Context context, String reason) {
+        if (ActivityManagerNative.isSystemReady()) {
+            try {
+                ActivityManagerNative.getDefault().closeSystemDialogs(reason);
+            } catch (RemoteException e) {
+            }
+        }
+    }
+
+    public int rotationForOrientationLw(int orientation, int lastRotation,
+            boolean displayEnabled) {
+
+        if (mPortraitRotation < 0) {
+            // Initialize the rotation angles for each orientation once.
+            Display d = ((WindowManager)mContext.getSystemService(Context.WINDOW_SERVICE))
+                    .getDefaultDisplay();
+            if (d.getWidth() > d.getHeight()) {
+                mPortraitRotation = Surface.ROTATION_90;
+                mLandscapeRotation = Surface.ROTATION_0;
+            } else {
+                mPortraitRotation = Surface.ROTATION_0;
+                mLandscapeRotation = Surface.ROTATION_90;
+            }
+        }
+
+        synchronized (mLock) {
+            switch (orientation) {
+                case ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE:
+                    //always return landscape if orientation set to landscape
+                    return mLandscapeRotation;
+                case ActivityInfo.SCREEN_ORIENTATION_PORTRAIT:
+                    //always return portrait if orientation set to portrait
+                    return mPortraitRotation;
+            }
+            // case for nosensor meaning ignore sensor and consider only lid
+            // or orientation sensor disabled
+            //or case.unspecified
+            if (mLidOpen) {
+                return mLidOpenRotation;
+            } else if (mDockMode == Intent.EXTRA_DOCK_STATE_CAR && mCarDockRotation >= 0) {
+                return mCarDockRotation;
+            } else if (mDockMode == Intent.EXTRA_DOCK_STATE_DESK && mDeskDockRotation >= 0) {
+                return mDeskDockRotation;
+            } else {
+                if (useSensorForOrientationLp(orientation)) {
+                    // If the user has enabled auto rotation by default, do it.
+                    int curRotation = mOrientationListener.getCurrentRotation();
+                    return curRotation >= 0 ? curRotation : lastRotation;
+                }
+                return Surface.ROTATION_0;
+            }
+        }
+    }
+
+    public boolean detectSafeMode() {
+        try {
+            int menuState = mWindowManager.getKeycodeState(KeyEvent.KEYCODE_MENU);
+            int sState = mWindowManager.getKeycodeState(KeyEvent.KEYCODE_S);
+            int dpadState = mWindowManager.getDPadKeycodeState(KeyEvent.KEYCODE_DPAD_CENTER);
+            int trackballState = mWindowManager.getTrackballScancodeState(BTN_MOUSE);
+            mSafeMode = menuState > 0 || sState > 0 || dpadState > 0 || trackballState > 0;
+            performHapticFeedbackLw(null, mSafeMode
+                    ? HapticFeedbackConstants.SAFE_MODE_ENABLED
+                    : HapticFeedbackConstants.SAFE_MODE_DISABLED, true);
+            if (mSafeMode) {
+                Log.i(TAG, "SAFE MODE ENABLED (menu=" + menuState + " s=" + sState
+                        + " dpad=" + dpadState + " trackball=" + trackballState + ")");
+            } else {
+                Log.i(TAG, "SAFE MODE not enabled");
+            }
+            return mSafeMode;
+        } catch (RemoteException e) {
+            // Doom! (it's also local)
+            throw new RuntimeException("window manager dead");
+        }
+    }
+    
+    static long[] getLongIntArray(Resources r, int resid) {
+        int[] ar = r.getIntArray(resid);
+        if (ar == null) {
+            return null;
+        }
+        long[] out = new long[ar.length];
+        for (int i=0; i<ar.length; i++) {
+            out[i] = ar[i];
+        }
+        return out;
+    }
+    
+    /** {@inheritDoc} */
+    public void systemReady() {
+        // tell the keyguard
+        mKeyguardMediator.onSystemReady();
+        android.os.SystemProperties.set("dev.bootcomplete", "1"); 
+        synchronized (mLock) {
+            updateOrientationListenerLp();
+            mSystemReady = true;
+            mHandler.post(new Runnable() {
+                public void run() {
+                    updateSettings();
+                }
+            });
+        }
+    }
+   
+    /** {@inheritDoc} */
+    public void userActivity() {
+        synchronized (mScreenLockTimeout) {
+            if (mLockScreenTimerActive) {
+                // reset the timer
+                mHandler.removeCallbacks(mScreenLockTimeout);
+                mHandler.postDelayed(mScreenLockTimeout, mLockScreenTimeout);
+            }
+        }
+    }
+
+    Runnable mScreenLockTimeout = new Runnable() {
+        public void run() {
+            synchronized (this) {
+                if (localLOGV) Log.v(TAG, "mScreenLockTimeout activating keyguard");
+                mKeyguardMediator.doKeyguardTimeout();
+                mLockScreenTimerActive = false;
+            }
+        }
+    };
+
+    private void updateLockScreenTimeout() {
+        synchronized (mScreenLockTimeout) {
+            boolean enable = (mAllowLockscreenWhenOn && mScreenOn && mKeyguardMediator.isSecure());
+            if (mLockScreenTimerActive != enable) {
+                if (enable) {
+                    if (localLOGV) Log.v(TAG, "setting lockscreen timer");
+                    mHandler.postDelayed(mScreenLockTimeout, mLockScreenTimeout);
+                } else {
+                    if (localLOGV) Log.v(TAG, "clearing lockscreen timer");
+                    mHandler.removeCallbacks(mScreenLockTimeout);
+                }
+                mLockScreenTimerActive = enable;
+            }
+        }
+    }
+
+    /** {@inheritDoc} */
+    public void enableScreenAfterBoot() {
+        readLidState();
+        updateRotation(Surface.FLAGS_ORIENTATION_ANIMATION_DISABLE);
+    }
+
+    void updateRotation(int animFlags) {
+        mPowerManager.setKeyboardVisibility(mLidOpen);
+        int rotation = Surface.ROTATION_0;
+        if (mLidOpen) {
+            rotation = mLidOpenRotation;
+        } else if (mDockMode == Intent.EXTRA_DOCK_STATE_CAR && mCarDockRotation >= 0) {
+            rotation = mCarDockRotation;
+        } else if (mDockMode == Intent.EXTRA_DOCK_STATE_DESK && mDeskDockRotation >= 0) {
+            rotation = mDeskDockRotation;
+        }
+        //if lid is closed orientation will be portrait
+        try {
+            //set orientation on WindowManager
+            mWindowManager.setRotation(rotation, true,
+                    mFancyRotationAnimation | animFlags);
+        } catch (RemoteException e) {
+            // Ignore
+        }
+    }
+
+    /**
+     * Return an Intent to launch the currently active dock as home.  Returns
+     * null if the standard home should be launched.
+     * @return
+     */
+    Intent createHomeDockIntent() {
+        Intent intent;
+        
+        // What home does is based on the mode, not the dock state.  That
+        // is, when in car mode you should be taken to car home regardless
+        // of whether we are actually in a car dock.
+        if (mUiMode == Configuration.UI_MODE_TYPE_CAR) {
+            intent = mCarDockIntent;
+        } else if (mUiMode == Configuration.UI_MODE_TYPE_DESK) {
+            intent = mDeskDockIntent;
+        } else {
+            return null;
+        }
+        
+        ActivityInfo ai = intent.resolveActivityInfo(
+                mContext.getPackageManager(), PackageManager.GET_META_DATA);
+        if (ai == null) {
+            return null;
+        }
+        
+        if (ai.metaData != null && ai.metaData.getBoolean(Intent.METADATA_DOCK_HOME)) {
+            intent = new Intent(intent);
+            intent.setClassName(ai.packageName, ai.name);
+            return intent;
+        }
+        
+        return null;
+    }
+    
+    void startDockOrHome() {
+        Intent dock = createHomeDockIntent();
+        if (dock != null) {
+            try {
+                mContext.startActivity(dock);
+                return;
+            } catch (ActivityNotFoundException e) {
+            }
+        }
+        mContext.startActivity(mHomeIntent);
+    }
+    
+    /**
+     * goes to the home screen
+     * @return whether it did anything
+     */
+    boolean goHome() {
+        if (false) {
+            // This code always brings home to the front.
+            try {
+                ActivityManagerNative.getDefault().stopAppSwitches();
+            } catch (RemoteException e) {
+            }
+            sendCloseSystemWindows();
+            startDockOrHome();
+        } else {
+            // This code brings home to the front or, if it is already
+            // at the front, puts the device to sleep.
+            try {
+                if (SystemProperties.getInt("persist.sys.uts-test-mode", 0) == 1) {
+                    /// Roll back EndcallBehavior as the cupcake design to pass P1 lab entry.
+                    Log.d(TAG, "UTS-TEST-MODE");
+                } else {
+                    ActivityManagerNative.getDefault().stopAppSwitches();
+                    sendCloseSystemWindows();
+                    Intent dock = createHomeDockIntent();
+                    if (dock != null) {
+                        int result = ActivityManagerNative.getDefault()
+                                .startActivity(null, dock,
+                                        dock.resolveTypeIfNeeded(mContext.getContentResolver()),
+                                        null, 0, null, null, 0, true /* onlyIfNeeded*/, false);
+                        if (result == IActivityManager.START_RETURN_INTENT_TO_CALLER) {
+                            return false;
+                        }
+                    }
+                }
+                int result = ActivityManagerNative.getDefault()
+                        .startActivity(null, mHomeIntent,
+                                mHomeIntent.resolveTypeIfNeeded(mContext.getContentResolver()),
+                                null, 0, null, null, 0, true /* onlyIfNeeded*/, false);
+                if (result == IActivityManager.START_RETURN_INTENT_TO_CALLER) {
+                    return false;
+                }
+            } catch (RemoteException ex) {
+                // bummer, the activity manager, which is in this process, is dead
+            }
+        }
+        return true;
+    }
+    
+    public void setCurrentOrientationLw(int newOrientation) {
+        synchronized (mLock) {
+            if (newOrientation != mCurrentAppOrientation) {
+                mCurrentAppOrientation = newOrientation;
+                updateOrientationListenerLp();
+            }
+        }
+    }
+
+    public boolean performHapticFeedbackLw(WindowState win, int effectId, boolean always) {
+        final boolean hapticsDisabled = Settings.System.getInt(mContext.getContentResolver(),
+                Settings.System.HAPTIC_FEEDBACK_ENABLED, 0) == 0;
+        if (!always && (hapticsDisabled || mKeyguardMediator.isShowingAndNotHidden())) {
+            return false;
+        }
+        long[] pattern = null;
+        switch (effectId) {
+            case HapticFeedbackConstants.LONG_PRESS:
+                pattern = mLongPressVibePattern;
+                break;
+            case HapticFeedbackConstants.VIRTUAL_KEY:
+                pattern = mVirtualKeyVibePattern;
+                break;
+            case HapticFeedbackConstants.KEYBOARD_TAP:
+                pattern = mKeyboardTapVibePattern;
+                break;
+            case HapticFeedbackConstants.SAFE_MODE_DISABLED:
+                pattern = mSafeModeDisabledVibePattern;
+                break;
+            case HapticFeedbackConstants.SAFE_MODE_ENABLED:
+                pattern = mSafeModeEnabledVibePattern;
+                break;
+            default:
+                return false;
+        }
+        if (pattern.length == 1) {
+            // One-shot vibration
+            mVibrator.vibrate(pattern[0]);
+        } else {
+            // Pattern vibration
+            mVibrator.vibrate(pattern, -1);
+        }
+        return true;
+    }
+    
+    public void screenOnStoppedLw() {
+        if (!mKeyguardMediator.isShowingAndNotHidden() && mPowerManager.isScreenOn()) {
+            long curTime = SystemClock.uptimeMillis();
+            mPowerManager.userActivity(curTime, false, LocalPowerManager.OTHER_EVENT);
+        }
+    }
+
+    public boolean allowKeyRepeat() {
+        // disable key repeat when screen is off
+        return mScreenOn;
+    }
+}
diff --git a/policy/src/com/android/internal/policy/impl/Policy.java b/policy/src/com/android/internal/policy/impl/Policy.java
new file mode 100644
index 0000000..17f3e91
--- /dev/null
+++ b/policy/src/com/android/internal/policy/impl/Policy.java
@@ -0,0 +1,69 @@
+/*
+ * Copyright (C) 2008 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.android.internal.policy.impl;
+
+import android.content.Context;
+import android.util.Log;
+
+import com.android.internal.policy.IPolicy;
+import com.android.internal.policy.impl.PhoneLayoutInflater;
+import com.android.internal.policy.impl.PhoneWindow;
+import com.android.internal.policy.impl.PhoneWindowManager;
+
+/**
+ * {@hide}
+ */
+
+// Simple implementation of the policy interface that spawns the right
+// set of objects
+public class Policy implements IPolicy {
+    private static final String TAG = "PhonePolicy";
+
+    private static final String[] preload_classes = {
+        "com.android.internal.policy.impl.PhoneLayoutInflater",
+        "com.android.internal.policy.impl.PhoneWindow",
+        "com.android.internal.policy.impl.PhoneWindow$1",
+        "com.android.internal.policy.impl.PhoneWindow$ContextMenuCallback",
+        "com.android.internal.policy.impl.PhoneWindow$DecorView",
+        "com.android.internal.policy.impl.PhoneWindow$PanelFeatureState",
+        "com.android.internal.policy.impl.PhoneWindow$PanelFeatureState$SavedState",
+    };
+
+    static {
+        // For performance reasons, preload some policy specific classes when
+        // the policy gets loaded.
+        for (String s : preload_classes) {
+            try {
+                Class.forName(s);
+            } catch (ClassNotFoundException ex) {
+                Log.e(TAG, "Could not preload class for phone policy: " + s);
+            }
+        }
+    }
+
+    public PhoneWindow makeNewWindow(Context context) {
+        return new PhoneWindow(context);
+    }
+
+    public PhoneLayoutInflater makeNewLayoutInflater(Context context) {
+        return new PhoneLayoutInflater(context);
+    }
+
+    public PhoneWindowManager makeNewWindowManager() {
+        return new PhoneWindowManager();
+    }
+}
diff --git a/policy/src/com/android/internal/policy/impl/PowerDialog.java b/policy/src/com/android/internal/policy/impl/PowerDialog.java
new file mode 100644
index 0000000..de35bd7
--- /dev/null
+++ b/policy/src/com/android/internal/policy/impl/PowerDialog.java
@@ -0,0 +1,182 @@
+/*
+ * Copyright (C) 2007 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.android.internal.policy.impl;
+
+import com.android.internal.R;
+
+import android.app.Dialog;
+import android.app.StatusBarManager;
+import android.content.Context;
+import android.os.Bundle;
+import android.os.RemoteException;
+import android.os.LocalPowerManager;
+import android.os.ServiceManager;
+import android.os.SystemClock;
+
+import com.android.internal.app.ShutdownThread;
+import com.android.internal.telephony.ITelephony;
+import android.view.KeyEvent;
+import android.util.Log;
+import android.view.View;
+import android.view.WindowManager;
+import android.view.View.OnClickListener;
+import android.view.View.OnKeyListener;
+import android.widget.Button;
+
+/**
+ * @deprecated use {@link GlobalActions} instead.
+ */
+public class PowerDialog extends Dialog implements OnClickListener,
+        OnKeyListener {
+    private static final String TAG = "PowerDialog";
+
+    static private StatusBarManager sStatusBar;
+    private Button mKeyguard;
+    private Button mPower;
+    private Button mRadioPower;
+    private Button mSilent;
+
+    private LocalPowerManager mPowerManager;
+
+    public PowerDialog(Context context, LocalPowerManager powerManager) {
+        super(context);
+        mPowerManager = powerManager;
+    }
+
+    @Override
+    protected void onCreate(Bundle savedInstanceState) {
+        super.onCreate(savedInstanceState);
+
+        Context context = getContext();
+
+        if (sStatusBar == null) {
+            sStatusBar = (StatusBarManager)context.getSystemService(Context.STATUS_BAR_SERVICE);
+        }
+
+        setContentView(com.android.internal.R.layout.power_dialog);
+
+        getWindow().setType(WindowManager.LayoutParams.TYPE_SYSTEM_DIALOG);
+        if (!getContext().getResources().getBoolean(
+                com.android.internal.R.bool.config_sf_slowBlur)) {
+            getWindow().setFlags(WindowManager.LayoutParams.FLAG_BLUR_BEHIND,
+                    WindowManager.LayoutParams.FLAG_BLUR_BEHIND);
+        }
+        getWindow().setFlags(WindowManager.LayoutParams.FLAG_ALT_FOCUSABLE_IM,
+                WindowManager.LayoutParams.FLAG_ALT_FOCUSABLE_IM);
+
+        setTitle(context.getText(R.string.power_dialog));
+
+        mKeyguard = (Button) findViewById(R.id.keyguard);
+        mPower = (Button) findViewById(R.id.off);
+        mRadioPower = (Button) findViewById(R.id.radio_power);
+        mSilent = (Button) findViewById(R.id.silent);
+
+        if (mKeyguard != null) {
+            mKeyguard.setOnKeyListener(this);
+            mKeyguard.setOnClickListener(this);
+        }
+        if (mPower != null) {
+            mPower.setOnClickListener(this);
+        }
+        if (mRadioPower != null) {
+            mRadioPower.setOnClickListener(this);
+        }
+        if (mSilent != null) {
+            mSilent.setOnClickListener(this);
+            // XXX: HACK for now hide the silent until we get mute support
+            mSilent.setVisibility(View.GONE);
+        }
+
+        CharSequence text;
+
+        // set the keyguard button's text
+        text = context.getText(R.string.screen_lock);
+        mKeyguard.setText(text);
+        mKeyguard.requestFocus();
+
+        try {
+            ITelephony phone = ITelephony.Stub.asInterface(ServiceManager.checkService("phone"));
+            if (phone != null) {
+                text = phone.isRadioOn() ? context
+                        .getText(R.string.turn_off_radio) : context
+                        .getText(R.string.turn_on_radio);
+            }
+        } catch (RemoteException ex) {
+            // ignore it
+        }
+
+        mRadioPower.setText(text);
+    }
+
+    public void onClick(View v) {
+        this.dismiss();
+        if (v == mPower) {
+            // shutdown by making sure radio and power are handled accordingly.
+            ShutdownThread.shutdown(getContext(), true);
+        } else if (v == mRadioPower) {
+            try {
+                ITelephony phone = ITelephony.Stub.asInterface(ServiceManager.checkService("phone"));
+                if (phone != null) {
+                    phone.toggleRadioOnOff();
+                }
+            } catch (RemoteException ex) {
+                // ignore it
+            }
+        } else if (v == mSilent) {
+            // do something
+        } else if (v == mKeyguard) {
+            if (v.isInTouchMode()) {
+                // only in touch mode for the reasons explained in onKey.
+                this.dismiss();
+                mPowerManager.goToSleep(SystemClock.uptimeMillis() + 1);
+            }
+        }
+    }
+
+    public boolean onKey(View v, int keyCode, KeyEvent event) {
+        // The activate keyguard button needs to put the device to sleep on the
+        // key up event. If we try to put it to sleep on the click or down
+        // action
+        // the the up action will cause the device to wake back up.
+
+        // Log.i(TAG, "keyCode: " + keyCode + " action: " + event.getAction());
+        if (keyCode != KeyEvent.KEYCODE_DPAD_CENTER
+                || event.getAction() != KeyEvent.ACTION_UP) {
+            // Log.i(TAG, "getting out of dodge...");
+            return false;
+        }
+
+        // Log.i(TAG, "Clicked mKeyguard! dimissing dialog");
+        this.dismiss();
+        // Log.i(TAG, "onKey: turning off the screen...");
+        // XXX: This is a hack for now
+        mPowerManager.goToSleep(event.getEventTime() + 1);
+        return true;
+    }
+
+    public void show() {
+        super.show();
+        Log.d(TAG, "show... disabling expand");
+        sStatusBar.disable(StatusBarManager.DISABLE_EXPAND);
+    }
+
+    public void dismiss() {
+        super.dismiss();
+        Log.d(TAG, "dismiss... reenabling expand");
+        sStatusBar.disable(StatusBarManager.DISABLE_NONE);
+    }
+}
diff --git a/policy/src/com/android/internal/policy/impl/RecentApplicationsBackground.java b/policy/src/com/android/internal/policy/impl/RecentApplicationsBackground.java
new file mode 100644
index 0000000..7c99e87
--- /dev/null
+++ b/policy/src/com/android/internal/policy/impl/RecentApplicationsBackground.java
@@ -0,0 +1,152 @@
+/*
+ * Copyright (C) 2010 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.android.internal.policy.impl;
+
+import android.content.Context;
+import android.graphics.Canvas;
+import android.graphics.Rect;
+import android.graphics.drawable.Drawable;
+import android.util.AttributeSet;
+import android.util.Log;
+import android.view.Gravity;
+import android.view.View;
+import android.widget.LinearLayout;
+
+/**
+ * A vertical linear layout.  However, instead of drawing the background
+ * behnd the items, it draws the background outside the items based on the
+ * padding.  If there isn't enough room to draw both, it clips the background
+ * instead of the contents.
+ */
+public class RecentApplicationsBackground extends LinearLayout {
+    private static final String TAG = "RecentApplicationsBackground";
+
+    private boolean mBackgroundSizeChanged;
+    private Drawable mBackground;
+    private Rect mTmp0 = new Rect();
+    private Rect mTmp1 = new Rect();
+
+    public RecentApplicationsBackground(Context context) {
+        this(context, null);
+        init();
+    }
+
+    public RecentApplicationsBackground(Context context, AttributeSet attrs) {
+        super(context, attrs);
+        init();
+    }
+
+    private void init() {
+        mBackground = getBackground();
+        setBackgroundDrawable(null);
+        setPadding(0, 0, 0, 0);
+        setGravity(Gravity.CENTER);
+    }
+
+    @Override
+    protected boolean setFrame(int left, int top, int right, int bottom) {
+        setWillNotDraw(false);
+        if (mLeft != left || mRight != right || mTop != top || mBottom != bottom) {
+            mBackgroundSizeChanged = true;
+        }
+        return super.setFrame(left, top, right, bottom);
+    }
+
+    @Override
+    protected boolean verifyDrawable(Drawable who) {
+        return who == mBackground || super.verifyDrawable(who);
+    }
+
+    @Override
+    protected void drawableStateChanged() {
+        Drawable d = mBackground;
+        if (d != null && d.isStateful()) {
+            d.setState(getDrawableState());
+        }
+        super.drawableStateChanged();
+    }
+
+    @Override
+    public void draw(Canvas canvas) {
+        final Drawable background = mBackground;
+        if (background != null) {
+            if (mBackgroundSizeChanged) {
+                mBackgroundSizeChanged = false;
+                Rect chld = mTmp0;
+                Rect bkg = mTmp1;
+                mBackground.getPadding(bkg);
+                getChildBounds(chld);
+                // This doesn't clamp to this view's bounds, which is what we want,
+                // so that the drawing is clipped.
+                final int top = chld.top - bkg.top;
+                final int bottom = chld.bottom + bkg.bottom;
+                // The background here is a gradient that wants to
+                // extend the full width of the screen (whatever that
+                // may be).
+                int left, right;
+                if (false) {
+                    // This limits the width of the drawable.
+                    left = chld.left - bkg.left;
+                    right = chld.right + bkg.right;
+                } else {
+                    // This expands it to full width.
+                    left = 0;
+                    right = getRight();
+                }
+                background.setBounds(left, top, right, bottom);
+            }
+        }
+        mBackground.draw(canvas);
+
+        if (false) {
+            android.graphics.Paint p = new android.graphics.Paint();
+            p.setColor(0x88ffff00);
+            canvas.drawRect(background.getBounds(), p);
+        }
+        canvas.drawARGB((int)(0.75*0xff), 0, 0, 0);
+
+        super.draw(canvas);
+    }
+
+    @Override
+    protected void onAttachedToWindow() {
+        super.onAttachedToWindow();
+        mBackground.setCallback(this);
+        setWillNotDraw(false);
+    }
+
+    @Override
+    protected void onDetachedFromWindow() {
+        super.onDetachedFromWindow();
+        mBackground.setCallback(null);
+    }
+    
+    private void getChildBounds(Rect r) {
+        r.left = r.top = Integer.MAX_VALUE;
+        r.bottom = r.right = Integer.MIN_VALUE;
+        final int N = getChildCount();
+        for (int i=0; i<N; i++) {
+            View v = getChildAt(i);
+            if (v.getVisibility() == View.VISIBLE) {
+                r.left = Math.min(r.left, v.getLeft());
+                r.top = Math.min(r.top, v.getTop());
+                r.right = Math.max(r.right, v.getRight());
+                r.bottom = Math.max(r.bottom, v.getBottom());
+            }
+        }
+    }
+}
diff --git a/policy/src/com/android/internal/policy/impl/RecentApplicationsDialog.java b/policy/src/com/android/internal/policy/impl/RecentApplicationsDialog.java
new file mode 100644
index 0000000..9608b9a
--- /dev/null
+++ b/policy/src/com/android/internal/policy/impl/RecentApplicationsDialog.java
@@ -0,0 +1,262 @@
+/*
+ * Copyright (C) 2008 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.android.internal.policy.impl;
+
+import android.app.ActivityManager;
+import android.app.Dialog;
+import android.app.StatusBarManager;
+import android.content.ActivityNotFoundException;
+import android.content.BroadcastReceiver;
+import android.content.Context;
+import android.content.Intent;
+import android.content.IntentFilter;
+import android.content.res.Resources;
+import android.content.pm.ActivityInfo;
+import android.content.pm.PackageManager;
+import android.content.pm.ResolveInfo;
+import android.graphics.drawable.Drawable;
+import android.os.Bundle;
+import android.util.Log;
+import android.view.View;
+import android.view.Window;
+import android.view.WindowManager;
+import android.view.View.OnClickListener;
+import android.widget.TextView;
+
+import java.util.List;
+
+public class RecentApplicationsDialog extends Dialog implements OnClickListener {
+    // Elements for debugging support
+//  private static final String LOG_TAG = "RecentApplicationsDialog";
+    private static final boolean DBG_FORCE_EMPTY_LIST = false;
+
+    static private StatusBarManager sStatusBar;
+
+    private static final int NUM_BUTTONS = 8;
+    private static final int MAX_RECENT_TASKS = NUM_BUTTONS * 2;    // allow for some discards
+
+    final TextView[] mIcons = new TextView[NUM_BUTTONS];
+    View mNoAppsText;
+    IntentFilter mBroadcastIntentFilter = new IntentFilter(Intent.ACTION_CLOSE_SYSTEM_DIALOGS);
+
+    private int mIconSize;
+
+    public RecentApplicationsDialog(Context context) {
+        super(context, com.android.internal.R.style.Theme_Dialog_RecentApplications);
+
+        final Resources resources = context.getResources();
+        mIconSize = (int) resources.getDimension(android.R.dimen.app_icon_size);
+    }
+
+    /**
+     * We create the recent applications dialog just once, and it stays around (hidden)
+     * until activated by the user.
+     *
+     * @see PhoneWindowManager#showRecentAppsDialog
+     */
+    @Override
+    protected void onCreate(Bundle savedInstanceState) {
+        super.onCreate(savedInstanceState);
+
+        Context context = getContext();
+
+        if (sStatusBar == null) {
+            sStatusBar = (StatusBarManager)context.getSystemService(Context.STATUS_BAR_SERVICE);
+        }
+
+        Window window = getWindow();
+        window.requestFeature(Window.FEATURE_NO_TITLE);
+        window.setType(WindowManager.LayoutParams.TYPE_SYSTEM_DIALOG);
+        window.setFlags(WindowManager.LayoutParams.FLAG_ALT_FOCUSABLE_IM,
+                WindowManager.LayoutParams.FLAG_ALT_FOCUSABLE_IM);
+        window.setTitle("Recents");
+
+        setContentView(com.android.internal.R.layout.recent_apps_dialog);
+
+        final WindowManager.LayoutParams params = window.getAttributes();
+        params.width = WindowManager.LayoutParams.MATCH_PARENT;
+        params.height = WindowManager.LayoutParams.MATCH_PARENT;
+        window.setAttributes(params);
+        window.setFlags(0, WindowManager.LayoutParams.FLAG_DIM_BEHIND);
+
+        mIcons[0] = (TextView)findViewById(com.android.internal.R.id.button0);
+        mIcons[1] = (TextView)findViewById(com.android.internal.R.id.button1);
+        mIcons[2] = (TextView)findViewById(com.android.internal.R.id.button2);
+        mIcons[3] = (TextView)findViewById(com.android.internal.R.id.button3);
+        mIcons[4] = (TextView)findViewById(com.android.internal.R.id.button4);
+        mIcons[5] = (TextView)findViewById(com.android.internal.R.id.button5);
+        mIcons[6] = (TextView)findViewById(com.android.internal.R.id.button6);
+        mIcons[7] = (TextView)findViewById(com.android.internal.R.id.button7);
+        mNoAppsText = findViewById(com.android.internal.R.id.no_applications_message);
+
+        for (TextView b: mIcons) {
+            b.setOnClickListener(this);
+        }
+    }
+
+    /**
+     * Handler for user clicks.  If a button was clicked, launch the corresponding activity.
+     */
+    public void onClick(View v) {
+
+        for (TextView b: mIcons) {
+            if (b == v) {
+                // prepare a launch intent and send it
+                Intent intent = (Intent)b.getTag();
+                if (intent != null) {
+                    intent.addFlags(Intent.FLAG_ACTIVITY_LAUNCHED_FROM_HISTORY);
+                    try {
+                        getContext().startActivity(intent);
+                    } catch (ActivityNotFoundException e) {
+                        Log.w("Recent", "Unable to launch recent task", e);
+                    }
+                }
+                break;
+            }
+        }
+        dismiss();
+    }
+
+    /**
+     * Set up and show the recent activities dialog.
+     */
+    @Override
+    public void onStart() {
+        super.onStart();
+        reloadButtons();
+        if (sStatusBar != null) {
+            sStatusBar.disable(StatusBarManager.DISABLE_EXPAND);
+        }
+
+        // receive broadcasts
+        getContext().registerReceiver(mBroadcastReceiver, mBroadcastIntentFilter);
+    }
+
+    /**
+     * Dismiss the recent activities dialog.
+     */
+    @Override
+    public void onStop() {
+        super.onStop();
+
+        // dump extra memory we're hanging on to
+        for (TextView icon: mIcons) {
+            icon.setCompoundDrawables(null, null, null, null);
+            icon.setTag(null);
+        }
+
+        if (sStatusBar != null) {
+            sStatusBar.disable(StatusBarManager.DISABLE_NONE);
+        }
+
+        // stop receiving broadcasts
+        getContext().unregisterReceiver(mBroadcastReceiver);
+     }
+
+    /**
+     * Reload the 6 buttons with recent activities
+     */
+    private void reloadButtons() {
+
+        final Context context = getContext();
+        final PackageManager pm = context.getPackageManager();
+        final ActivityManager am = (ActivityManager)
+                context.getSystemService(Context.ACTIVITY_SERVICE);
+        final List<ActivityManager.RecentTaskInfo> recentTasks =
+                am.getRecentTasks(MAX_RECENT_TASKS, ActivityManager.RECENT_IGNORE_UNAVAILABLE);
+
+        ActivityInfo homeInfo = 
+            new Intent(Intent.ACTION_MAIN).addCategory(Intent.CATEGORY_HOME)
+                    .resolveActivityInfo(pm, 0);
+
+        IconUtilities iconUtilities = new IconUtilities(getContext());
+
+        // Performance note:  Our android performance guide says to prefer Iterator when
+        // using a List class, but because we know that getRecentTasks() always returns
+        // an ArrayList<>, we'll use a simple index instead.
+        int index = 0;
+        int numTasks = recentTasks.size();
+        for (int i = 0; i < numTasks && (index < NUM_BUTTONS); ++i) {
+            final ActivityManager.RecentTaskInfo info = recentTasks.get(i);
+
+            // for debug purposes only, disallow first result to create empty lists
+            if (DBG_FORCE_EMPTY_LIST && (i == 0)) continue;
+
+            Intent intent = new Intent(info.baseIntent);
+            if (info.origActivity != null) {
+                intent.setComponent(info.origActivity);
+            }
+
+            // Skip the current home activity.
+            if (homeInfo != null) {
+                if (homeInfo.packageName.equals(
+                        intent.getComponent().getPackageName())
+                        && homeInfo.name.equals(
+                                intent.getComponent().getClassName())) {
+                    continue;
+                }
+            }
+
+            intent.setFlags((intent.getFlags()&~Intent.FLAG_ACTIVITY_RESET_TASK_IF_NEEDED)
+                    | Intent.FLAG_ACTIVITY_NEW_TASK);
+            final ResolveInfo resolveInfo = pm.resolveActivity(intent, 0);
+            if (resolveInfo != null) {
+                final ActivityInfo activityInfo = resolveInfo.activityInfo;
+                final String title = activityInfo.loadLabel(pm).toString();
+                Drawable icon = activityInfo.loadIcon(pm);
+
+                if (title != null && title.length() > 0 && icon != null) {
+                    final TextView tv = mIcons[index];
+                    tv.setText(title);
+                    icon = iconUtilities.createIconDrawable(icon);
+                    tv.setCompoundDrawables(null, icon, null, null);
+                    tv.setTag(intent);
+                    tv.setVisibility(View.VISIBLE);
+                    tv.setPressed(false);
+                    tv.clearFocus();
+                    ++index;
+                }
+            }
+        }
+
+        // handle the case of "no icons to show"
+        mNoAppsText.setVisibility((index == 0) ? View.VISIBLE : View.GONE);
+
+        // hide the rest
+        for (; index < NUM_BUTTONS; ++index) {
+            mIcons[index].setVisibility(View.GONE);
+        }
+    }
+
+    /**
+     * This is the listener for the ACTION_CLOSE_SYSTEM_DIALOGS intent.  It's an indication that
+     * we should close ourselves immediately, in order to allow a higher-priority UI to take over
+     * (e.g. phone call received).
+     */
+    private BroadcastReceiver mBroadcastReceiver = new BroadcastReceiver() {
+        @Override
+        public void onReceive(Context context, Intent intent) {
+            String action = intent.getAction();
+            if (Intent.ACTION_CLOSE_SYSTEM_DIALOGS.equals(action)) {
+                String reason = intent.getStringExtra(PhoneWindowManager.SYSTEM_DIALOG_REASON_KEY);
+                if (! PhoneWindowManager.SYSTEM_DIALOG_REASON_RECENT_APPS.equals(reason)) {
+                    dismiss();
+                }
+            }
+        }
+    };
+}
diff --git a/policy/src/com/android/internal/policy/impl/ShortcutManager.java b/policy/src/com/android/internal/policy/impl/ShortcutManager.java
new file mode 100644
index 0000000..d86ac44
--- /dev/null
+++ b/policy/src/com/android/internal/policy/impl/ShortcutManager.java
@@ -0,0 +1,120 @@
+/*
+ * Copyright (C) 2007 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.android.internal.policy.impl;
+
+import android.content.Context;
+import android.content.Intent;
+import android.database.ContentObserver;
+import android.database.Cursor;
+import android.os.Handler;
+import android.provider.Settings;
+import android.util.Log;
+import android.util.SparseArray;
+import android.view.KeyCharacterMap;
+
+import java.net.URISyntaxException;
+
+/**
+ * Manages quick launch shortcuts by:
+ * <li> Keeping the local copy in sync with the database (this is an observer)
+ * <li> Returning a shortcut-matching intent to clients
+ */
+class ShortcutManager extends ContentObserver {
+    
+    private static final String TAG = "ShortcutManager";
+    
+    private static final int COLUMN_SHORTCUT = 0;
+    private static final int COLUMN_INTENT = 1;
+    private static final String[] sProjection = new String[] {
+        Settings.Bookmarks.SHORTCUT, Settings.Bookmarks.INTENT
+    };
+
+    private Context mContext;
+    private Cursor mCursor;
+    /** Map of a shortcut to its intent. */
+    private SparseArray<Intent> mShortcutIntents;
+    
+    public ShortcutManager(Context context, Handler handler) {
+        super(handler);
+        
+        mContext = context;
+        mShortcutIntents = new SparseArray<Intent>();
+    }
+
+    /** Observes the provider of shortcut+intents */
+    public void observe() {
+        mCursor = mContext.getContentResolver().query(
+                Settings.Bookmarks.CONTENT_URI, sProjection, null, null, null);
+        mCursor.registerContentObserver(this);
+        updateShortcuts();
+    }
+
+    @Override
+    public void onChange(boolean selfChange) {
+        updateShortcuts();
+    }
+    
+    private void updateShortcuts() {
+        Cursor c = mCursor;
+        if (!c.requery()) {
+            Log.e(TAG, "ShortcutObserver could not re-query shortcuts.");
+            return;
+        }
+
+        mShortcutIntents.clear();
+        while (c.moveToNext()) {
+            int shortcut = c.getInt(COLUMN_SHORTCUT);
+            if (shortcut == 0) continue;
+            String intentURI = c.getString(COLUMN_INTENT);
+            Intent intent = null;
+            try {
+                intent = Intent.getIntent(intentURI);
+            } catch (URISyntaxException e) {
+                Log.w(TAG, "Intent URI for shortcut invalid.", e);
+            }
+            if (intent == null) continue;
+            mShortcutIntents.put(shortcut, intent);
+        }
+    }
+    
+    /**
+     * Gets the shortcut intent for a given keycode+modifier. Make sure you
+     * strip whatever modifier is used for invoking shortcuts (for example,
+     * if 'Sym+A' should invoke a shortcut on 'A', you should strip the
+     * 'Sym' bit from the modifiers before calling this method.
+     * <p>
+     * This will first try an exact match (with modifiers), and then try a
+     * match without modifiers (primary character on a key).
+     * 
+     * @param keyCode The keycode of the key pushed.
+     * @param modifiers The modifiers without any that are used for chording
+     *            to invoke a shortcut.
+     * @return The intent that matches the shortcut, or null if not found.
+     */
+    public Intent getIntent(int keyCode, int modifiers) {
+        KeyCharacterMap kcm = KeyCharacterMap.load(KeyCharacterMap.BUILT_IN_KEYBOARD);
+        // First try the exact keycode (with modifiers)
+        int shortcut = kcm.get(keyCode, modifiers);
+        Intent intent = shortcut != 0 ? mShortcutIntents.get(shortcut) : null; 
+        if (intent != null) return intent;
+        
+        // Next try the keycode without modifiers (the primary character on that key)
+        shortcut = Character.toLowerCase(kcm.get(keyCode, 0));
+        return shortcut != 0 ? mShortcutIntents.get(shortcut) : null;
+    }
+
+}
diff --git a/policy/src/com/android/internal/policy/impl/SimUnlockScreen.java b/policy/src/com/android/internal/policy/impl/SimUnlockScreen.java
new file mode 100644
index 0000000..5518e11
--- /dev/null
+++ b/policy/src/com/android/internal/policy/impl/SimUnlockScreen.java
@@ -0,0 +1,423 @@
+/*
+ * Copyright (C) 2008 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.android.internal.policy.impl;
+
+import android.app.Dialog;
+import android.app.ProgressDialog;
+import android.content.Context;
+import android.content.res.Configuration;
+import android.os.RemoteException;
+import android.os.ServiceManager;
+
+import com.android.internal.telephony.ITelephony;
+import com.android.internal.widget.LockPatternUtils;
+
+import android.text.Editable;
+import android.view.KeyEvent;
+import android.view.LayoutInflater;
+import android.view.View;
+import android.view.WindowManager;
+import android.widget.Button;
+import android.widget.LinearLayout;
+import android.widget.TextView;
+import com.android.internal.R;
+
+/**
+ * Displays a dialer like interface to unlock the SIM PIN.
+ */
+public class SimUnlockScreen extends LinearLayout implements KeyguardScreen, View.OnClickListener,
+        KeyguardUpdateMonitor.InfoCallback {
+
+    private static final int DIGIT_PRESS_WAKE_MILLIS = 5000;
+
+    private final KeyguardUpdateMonitor mUpdateMonitor;
+    private final KeyguardScreenCallback mCallback;
+
+    private TextView mHeaderText;
+    private TextView mPinText;
+
+    private TextView mOkButton;
+    private Button mEmergencyCallButton;
+
+    private View mBackSpaceButton;
+
+    private final int[] mEnteredPin = {0, 0, 0, 0, 0, 0, 0, 0};
+    private int mEnteredDigits = 0;
+
+    private ProgressDialog mSimUnlockProgressDialog = null;
+
+    private LockPatternUtils mLockPatternUtils;
+
+    private int mCreationOrientation;
+
+    private int mKeyboardHidden;
+
+    private static final char[] DIGITS = {'0', '1', '2', '3', '4', '5', '6', '7', '8', '9'};
+
+    public SimUnlockScreen(Context context, Configuration configuration,
+            KeyguardUpdateMonitor updateMonitor, KeyguardScreenCallback callback,
+            LockPatternUtils lockpatternutils) {
+        super(context);
+        mUpdateMonitor = updateMonitor;
+        mCallback = callback;
+
+        mCreationOrientation = configuration.orientation;
+        mKeyboardHidden = configuration.hardKeyboardHidden;
+        mLockPatternUtils = lockpatternutils;
+
+        LayoutInflater inflater = LayoutInflater.from(context);
+        if (mKeyboardHidden == Configuration.HARDKEYBOARDHIDDEN_NO) {
+            inflater.inflate(R.layout.keyguard_screen_sim_pin_landscape, this, true);
+        } else {
+            inflater.inflate(R.layout.keyguard_screen_sim_pin_portrait, this, true);
+            new TouchInput();
+        }
+
+        mHeaderText = (TextView) findViewById(R.id.headerText);
+        mPinText = (TextView) findViewById(R.id.pinDisplay);
+        mBackSpaceButton = findViewById(R.id.backspace);
+        mBackSpaceButton.setOnClickListener(this);
+
+        mEmergencyCallButton = (Button) findViewById(R.id.emergencyCall);
+        mLockPatternUtils.updateEmergencyCallButtonState(mEmergencyCallButton);
+        mOkButton = (TextView) findViewById(R.id.ok);
+
+        mHeaderText.setText(R.string.keyguard_password_enter_pin_code);
+        mPinText.setFocusable(false);
+
+        mEmergencyCallButton.setOnClickListener(this);
+        mOkButton.setOnClickListener(this);
+
+        setFocusableInTouchMode(true);
+    }
+
+    /** {@inheritDoc} */
+    public boolean needsInput() {
+        return true;
+    }
+
+    /** {@inheritDoc} */
+    public void onPause() {
+
+    }
+
+    /** {@inheritDoc} */
+    public void onResume() {
+        // start fresh
+        mHeaderText.setText(R.string.keyguard_password_enter_pin_code);
+
+        // make sure that the number of entered digits is consistent when we
+        // erase the SIM unlock code, including orientation changes.
+        mPinText.setText("");
+        mEnteredDigits = 0;
+
+        mLockPatternUtils.updateEmergencyCallButtonState(mEmergencyCallButton);
+    }
+
+    /** {@inheritDoc} */
+    public void cleanUp() {
+        // hide the dialog.
+        if (mSimUnlockProgressDialog != null) {
+            mSimUnlockProgressDialog.hide();
+        }
+        mUpdateMonitor.removeCallback(this);
+    }
+
+
+    /**
+     * Since the IPC can block, we want to run the request in a separate thread
+     * with a callback.
+     */
+    private abstract class CheckSimPin extends Thread {
+
+        private final String mPin;
+
+        protected CheckSimPin(String pin) {
+            mPin = pin;
+        }
+
+        abstract void onSimLockChangedResponse(boolean success);
+
+        @Override
+        public void run() {
+            try {
+                final boolean result = ITelephony.Stub.asInterface(ServiceManager
+                        .checkService("phone")).supplyPin(mPin);
+                post(new Runnable() {
+                    public void run() {
+                        onSimLockChangedResponse(result);
+                    }
+                });
+            } catch (RemoteException e) {
+                post(new Runnable() {
+                    public void run() {
+                        onSimLockChangedResponse(false);
+                    }
+                });
+            }
+        }
+    }
+
+    public void onClick(View v) {
+        if (v == mBackSpaceButton) {
+            final Editable digits = mPinText.getEditableText();
+            final int len = digits.length();
+            if (len > 0) {
+                digits.delete(len-1, len);
+                mEnteredDigits--;
+            }
+            mCallback.pokeWakelock();
+        } else if (v == mEmergencyCallButton) {
+            mCallback.takeEmergencyCallAction();
+        } else if (v == mOkButton) {
+            checkPin();
+        }
+    }
+
+    private Dialog getSimUnlockProgressDialog() {
+        if (mSimUnlockProgressDialog == null) {
+            mSimUnlockProgressDialog = new ProgressDialog(mContext);
+            mSimUnlockProgressDialog.setMessage(
+                    mContext.getString(R.string.lockscreen_sim_unlock_progress_dialog_message));
+            mSimUnlockProgressDialog.setIndeterminate(true);
+            mSimUnlockProgressDialog.setCancelable(false);
+            mSimUnlockProgressDialog.getWindow().setType(
+                    WindowManager.LayoutParams.TYPE_KEYGUARD_DIALOG);
+            if (!mContext.getResources().getBoolean(
+                    com.android.internal.R.bool.config_sf_slowBlur)) {
+                mSimUnlockProgressDialog.getWindow().setFlags(
+                        WindowManager.LayoutParams.FLAG_BLUR_BEHIND,
+                        WindowManager.LayoutParams.FLAG_BLUR_BEHIND);
+            }
+        }
+        return mSimUnlockProgressDialog;
+    }
+
+    private void checkPin() {
+
+        // make sure that the pin is at least 4 digits long.
+        if (mEnteredDigits < 4) {
+            // otherwise, display a message to the user, and don't submit.
+            mHeaderText.setText(R.string.invalidPin);
+            mPinText.setText("");
+            mEnteredDigits = 0;
+            mCallback.pokeWakelock();
+            return;
+        }
+        getSimUnlockProgressDialog().show();
+
+        new CheckSimPin(mPinText.getText().toString()) {
+            void onSimLockChangedResponse(boolean success) {
+                if (mSimUnlockProgressDialog != null) {
+                    mSimUnlockProgressDialog.hide();
+                }
+                if (success) {
+                    // before closing the keyguard, report back that
+                    // the sim is unlocked so it knows right away
+                    mUpdateMonitor.reportSimPinUnlocked();
+                    mCallback.goToUnlockScreen();
+                } else {
+                    mHeaderText.setText(R.string.keyguard_password_wrong_pin_code);
+                    mPinText.setText("");
+                    mEnteredDigits = 0;
+                }
+                mCallback.pokeWakelock();
+            }
+        }.start();
+    }
+
+
+    public boolean onKeyDown(int keyCode, KeyEvent event) {
+        if (keyCode == KeyEvent.KEYCODE_BACK) {
+            mCallback.goToLockScreen();
+            return true;
+        }
+
+        final char match = event.getMatch(DIGITS);
+        if (match != 0) {
+            reportDigit(match - '0');
+            return true;
+        }
+        if (keyCode == KeyEvent.KEYCODE_DEL) {
+            if (mEnteredDigits > 0) {
+                mPinText.onKeyDown(keyCode, event);
+                mEnteredDigits--;
+            }
+            return true;
+        }
+
+        if (keyCode == KeyEvent.KEYCODE_ENTER) {
+            checkPin();
+            return true;
+        }
+
+        return false;
+    }
+
+    private void reportDigit(int digit) {
+        if (mEnteredDigits == 0) {
+            mPinText.setText("");
+        }
+        if (mEnteredDigits == 8) {
+            return;
+        }
+        mPinText.append(Integer.toString(digit));
+        mEnteredPin[mEnteredDigits++] = digit;
+    }
+
+    void updateConfiguration() {
+        Configuration newConfig = getResources().getConfiguration();
+        if (newConfig.orientation != mCreationOrientation) {
+            mCallback.recreateMe(newConfig);
+        } else if (newConfig.hardKeyboardHidden != mKeyboardHidden) {
+            mKeyboardHidden = newConfig.hardKeyboardHidden;
+            final boolean isKeyboardOpen = mKeyboardHidden == Configuration.HARDKEYBOARDHIDDEN_NO;
+            if (mUpdateMonitor.isKeyguardBypassEnabled() && isKeyboardOpen) {
+                mCallback.goToUnlockScreen();
+            }
+        }
+        
+    }
+    
+    @Override
+    protected void onAttachedToWindow() {
+        super.onAttachedToWindow();
+        updateConfiguration();
+    }
+
+    /** {@inheritDoc} */
+    @Override
+    protected void onConfigurationChanged(Configuration newConfig) {
+        super.onConfigurationChanged(newConfig);
+        updateConfiguration();
+    }
+
+    /**
+     * Helper class to handle input from touch dialer.  Only relevant when
+     * the keyboard is shut.
+     */
+    private class TouchInput implements View.OnClickListener {
+        private TextView mZero;
+        private TextView mOne;
+        private TextView mTwo;
+        private TextView mThree;
+        private TextView mFour;
+        private TextView mFive;
+        private TextView mSix;
+        private TextView mSeven;
+        private TextView mEight;
+        private TextView mNine;
+        private TextView mCancelButton;
+
+        private TouchInput() {
+            mZero = (TextView) findViewById(R.id.zero);
+            mOne = (TextView) findViewById(R.id.one);
+            mTwo = (TextView) findViewById(R.id.two);
+            mThree = (TextView) findViewById(R.id.three);
+            mFour = (TextView) findViewById(R.id.four);
+            mFive = (TextView) findViewById(R.id.five);
+            mSix = (TextView) findViewById(R.id.six);
+            mSeven = (TextView) findViewById(R.id.seven);
+            mEight = (TextView) findViewById(R.id.eight);
+            mNine = (TextView) findViewById(R.id.nine);
+            mCancelButton = (TextView) findViewById(R.id.cancel);
+
+            mZero.setText("0");
+            mOne.setText("1");
+            mTwo.setText("2");
+            mThree.setText("3");
+            mFour.setText("4");
+            mFive.setText("5");
+            mSix.setText("6");
+            mSeven.setText("7");
+            mEight.setText("8");
+            mNine.setText("9");
+
+            mZero.setOnClickListener(this);
+            mOne.setOnClickListener(this);
+            mTwo.setOnClickListener(this);
+            mThree.setOnClickListener(this);
+            mFour.setOnClickListener(this);
+            mFive.setOnClickListener(this);
+            mSix.setOnClickListener(this);
+            mSeven.setOnClickListener(this);
+            mEight.setOnClickListener(this);
+            mNine.setOnClickListener(this);
+            mCancelButton.setOnClickListener(this);
+        }
+
+
+        public void onClick(View v) {
+            if (v == mCancelButton) {
+                mCallback.goToLockScreen();
+                return;
+            }
+
+            final int digit = checkDigit(v);
+            if (digit >= 0) {
+                mCallback.pokeWakelock(DIGIT_PRESS_WAKE_MILLIS);
+                reportDigit(digit);
+            }
+        }
+
+        private int checkDigit(View v) {
+            int digit = -1;
+            if (v == mZero) {
+                digit = 0;
+            } else if (v == mOne) {
+                digit = 1;
+            } else if (v == mTwo) {
+                digit = 2;
+            } else if (v == mThree) {
+                digit = 3;
+            } else if (v == mFour) {
+                digit = 4;
+            } else if (v == mFive) {
+                digit = 5;
+            } else if (v == mSix) {
+                digit = 6;
+            } else if (v == mSeven) {
+                digit = 7;
+            } else if (v == mEight) {
+                digit = 8;
+            } else if (v == mNine) {
+                digit = 9;
+            }
+            return digit;
+        }
+    }
+
+    public void onPhoneStateChanged(String newState) {
+        mLockPatternUtils.updateEmergencyCallButtonState(mEmergencyCallButton);
+    }
+
+    public void onRefreshBatteryInfo(boolean showBatteryInfo, boolean pluggedIn, int batteryLevel) {
+
+    }
+
+    public void onRefreshCarrierInfo(CharSequence plmn, CharSequence spn) {
+
+    }
+
+    public void onRingerModeChanged(int state) {
+
+    }
+
+    public void onTimeChanged() {
+
+    }
+}
diff --git a/services/java/com/android/server/status/package.html b/policy/src/com/android/internal/policy/impl/package.html
old mode 100755
new mode 100644
similarity index 100%
rename from services/java/com/android/server/status/package.html
rename to policy/src/com/android/internal/policy/impl/package.html
diff --git a/policy/tests/Android.mk b/policy/tests/Android.mk
new file mode 100644
index 0000000..ffb60b1
--- /dev/null
+++ b/policy/tests/Android.mk
@@ -0,0 +1,29 @@
+# Copyright 2010, The Android Open Source Project
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+LOCAL_PATH:= $(call my-dir)
+include $(CLEAR_VARS)
+
+# We only want this apk build for tests.
+LOCAL_MODULE_TAGS := tests
+
+LOCAL_JAVA_LIBRARIES := android.policy android.test.runner
+
+# Include all test java files.
+LOCAL_SRC_FILES := $(call all-java-files-under, src)
+
+LOCAL_PACKAGE_NAME := FrameworkPolicyTests
+
+include $(BUILD_PACKAGE)
+
diff --git a/policy/tests/AndroidManifest.xml b/policy/tests/AndroidManifest.xml
new file mode 100644
index 0000000..dbdabfa
--- /dev/null
+++ b/policy/tests/AndroidManifest.xml
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2010 The Android Open Source Project
+
+     Licensed under the Apache License, Version 2.0 (the "License");
+     you may not use this file except in compliance with the License.
+     You may obtain a copy of the License at
+
+          http://www.apache.org/licenses/LICENSE-2.0
+
+     Unless required by applicable law or agreed to in writing, software
+     distributed under the License is distributed on an "AS IS" BASIS,
+     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     See the License for the specific language governing permissions and
+     limitations under the License.
+-->
+
+<manifest xmlns:android="http://schemas.android.com/apk/res/android"
+          package="com.android.frameworks.policy.tests">
+
+    <application>
+        <uses-library android:name="android.test.runner" />
+    </application>
+
+    <uses-permission android:name="android.permission.GET_ACCOUNTS" />
+    <uses-permission android:name="android.permission.MANAGE_ACCOUNTS" />
+    
+    <instrumentation
+        android:name="android.test.InstrumentationTestRunner"
+        android:targetPackage="com.android.frameworks.policy.tests"
+        android:label="Framework policy tests" />
+</manifest>
diff --git a/policy/tests/src/com/android/internal/policy/impl/LockPatternKeyguardViewTest.java b/policy/tests/src/com/android/internal/policy/impl/LockPatternKeyguardViewTest.java
new file mode 100644
index 0000000..bdfe652
--- /dev/null
+++ b/policy/tests/src/com/android/internal/policy/impl/LockPatternKeyguardViewTest.java
@@ -0,0 +1,350 @@
+/*
+ * Copyright (C) 2008 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.android.internal.policy.impl;
+
+import android.content.Context;
+import com.android.internal.telephony.IccCard;
+import android.content.res.Configuration;
+import android.test.AndroidTestCase;
+import android.view.View;
+import android.view.KeyEvent;
+import com.android.internal.widget.LockPatternUtils;
+import com.google.android.collect.Lists;
+
+import java.util.List;
+
+/**
+ * Tests for {@link com.android.internal.policy.impl.LockPatternKeyguardView},
+ * which handles the management of screens while the keyguard is showing.
+ */
+public class LockPatternKeyguardViewTest extends AndroidTestCase {
+    private MockUpdateMonitor mUpdateMonitor;
+    private LockPatternUtils mLockPatternUtils;
+    private TestableLockPatternKeyguardView mLPKV;
+    private MockKeyguardCallback mKeyguardViewCallback;
+
+    private static class MockUpdateMonitor extends KeyguardUpdateMonitor {
+
+        public IccCard.State simState = IccCard.State.READY;
+
+        private MockUpdateMonitor(Context context) {
+            super(context);
+        }
+
+        @Override
+        public IccCard.State getSimState() {
+            return simState;
+        }
+    }
+
+    private static class MockLockPatternUtils extends LockPatternUtils {
+        boolean isLockPatternEnabled = true;
+        public boolean isPermanentlyLocked = false;
+
+        public MockLockPatternUtils(Context context) {
+            super(context);
+        }
+
+        @Override
+        public boolean isLockPatternEnabled() {
+            return isLockPatternEnabled;
+        }
+
+        @Override
+        public void setLockPatternEnabled(boolean lockPatternEnabled) {
+            isLockPatternEnabled = lockPatternEnabled;
+        }
+
+        @Override
+        public boolean isPermanentlyLocked() {
+            return isPermanentlyLocked;
+        }
+
+        public void setPermanentlyLocked(boolean permanentlyLocked) {
+            isPermanentlyLocked = permanentlyLocked;
+        }
+    }
+
+    private static class MockKeyguardScreen extends View implements KeyguardScreen {
+
+        private int mOnPauseCount = 0;
+        private int mOnResumeCount = 0;
+        private int mCleanupCount = 0;
+
+        private MockKeyguardScreen(Context context) {
+            super(context);
+            setFocusable(true);
+        }
+
+        /** {@inheritDoc} */
+        public boolean needsInput() {
+            return false;
+        }
+
+        /** {@inheritDoc} */
+        public void onPause() {
+            mOnPauseCount++;
+        }
+
+        /** {@inheritDoc} */
+        public void onResume() {
+            mOnResumeCount++;
+        }
+
+        /** {@inheritDoc} */
+        public void cleanUp() {
+            mCleanupCount++;
+        }
+
+        public int getOnPauseCount() {
+            return mOnPauseCount;
+        }
+
+        public int getOnResumeCount() {
+            return mOnResumeCount;
+        }
+
+        public int getCleanupCount() {
+            return mCleanupCount;
+        }
+    }
+
+    /**
+     * Allows us to inject the lock and unlock views to simulate their behavior
+     * and detect their creation.
+     */
+    private static class TestableLockPatternKeyguardView extends LockPatternKeyguardView {
+        private List<MockKeyguardScreen> mInjectedLockScreens;
+        private List<MockKeyguardScreen> mInjectedUnlockScreens;
+
+
+
+        private TestableLockPatternKeyguardView(Context context, KeyguardUpdateMonitor updateMonitor,
+                LockPatternUtils lockPatternUtils, KeyguardWindowController controller) {
+            super(context, updateMonitor, lockPatternUtils, controller);
+        }
+
+        @Override
+        View createLockScreen() {
+            final MockKeyguardScreen newView = new MockKeyguardScreen(getContext());
+            if (mInjectedLockScreens == null) mInjectedLockScreens = Lists.newArrayList();
+            mInjectedLockScreens.add(newView);
+            return newView;
+        }
+
+        @Override
+        View createUnlockScreenFor(UnlockMode unlockMode) {
+            final MockKeyguardScreen newView = new MockKeyguardScreen(getContext());
+            if (mInjectedUnlockScreens == null) mInjectedUnlockScreens = Lists.newArrayList();
+            mInjectedUnlockScreens.add(newView);
+            return newView;
+        }
+
+        public List<MockKeyguardScreen> getInjectedLockScreens() {
+            return mInjectedLockScreens;
+        }
+
+        public List<MockKeyguardScreen> getInjectedUnlockScreens() {
+            return mInjectedUnlockScreens;
+        }
+    }
+
+    private static class MockKeyguardCallback implements KeyguardViewCallback {
+
+        private int mPokeWakelockCount = 0;
+        private int mKeyguardDoneCount = 0;
+
+        public void pokeWakelock() {
+            mPokeWakelockCount++;
+        }
+
+        public void pokeWakelock(int millis) {
+            mPokeWakelockCount++;
+        }
+
+        public void keyguardDone(boolean authenticated) {
+            mKeyguardDoneCount++;
+        }
+
+        public void keyguardDoneDrawing() {
+
+        }
+
+        public int getPokeWakelockCount() {
+            return mPokeWakelockCount;
+        }
+
+        public int getKeyguardDoneCount() {
+            return mKeyguardDoneCount;
+        }
+    }
+
+    @Override
+    protected void setUp() throws Exception {
+        super.setUp();
+        mUpdateMonitor = new MockUpdateMonitor(getContext());
+        mLockPatternUtils = new MockLockPatternUtils(getContext());
+
+        mLPKV = new TestableLockPatternKeyguardView(getContext(), mUpdateMonitor,
+                mLockPatternUtils, new KeyguardWindowController() {
+            public void setNeedsInput(boolean needsInput) {
+            }
+        });
+        mKeyguardViewCallback = new MockKeyguardCallback();
+        mLPKV.setCallback(mKeyguardViewCallback);
+    }
+
+    public void testStateAfterCreatedWhileScreenOff() {
+
+        assertEquals(1, mLPKV.getInjectedLockScreens().size());
+        assertEquals(1, mLPKV.getInjectedUnlockScreens().size());
+
+        MockKeyguardScreen lockScreen = mLPKV.getInjectedLockScreens().get(0);
+        MockKeyguardScreen unlockScreen = mLPKV.getInjectedUnlockScreens().get(0);
+
+        assertEquals(0, lockScreen.getOnPauseCount());
+        assertEquals(0, lockScreen.getOnResumeCount());
+        assertEquals(0, lockScreen.getCleanupCount());
+
+        assertEquals(0, unlockScreen.getOnPauseCount());
+        assertEquals(0, unlockScreen.getOnResumeCount());
+        assertEquals(0, unlockScreen.getCleanupCount());
+
+        assertEquals(0, mKeyguardViewCallback.getPokeWakelockCount());
+        assertEquals(0, mKeyguardViewCallback.getKeyguardDoneCount());
+    }
+
+    public void testWokenByNonMenuKey() {
+        mLPKV.wakeWhenReadyTq(0);
+
+        // should have poked the wakelock to turn on the screen
+        assertEquals(1, mKeyguardViewCallback.getPokeWakelockCount());
+
+        // shouldn't be any additional views created
+        assertEquals(1, mLPKV.getInjectedLockScreens().size());
+        assertEquals(1, mLPKV.getInjectedUnlockScreens().size());
+        MockKeyguardScreen lockScreen = mLPKV.getInjectedLockScreens().get(0);
+        MockKeyguardScreen unlockScreen = mLPKV.getInjectedUnlockScreens().get(0);
+
+        // lock screen should be only visible one
+        assertEquals(View.VISIBLE, lockScreen.getVisibility());
+        assertEquals(View.GONE, unlockScreen.getVisibility());
+
+        // on resume not called until screen turns on
+        assertEquals(0, lockScreen.getOnPauseCount());
+        assertEquals(0, lockScreen.getOnResumeCount());
+        assertEquals(0, lockScreen.getCleanupCount());
+
+        assertEquals(0, unlockScreen.getOnPauseCount());
+        assertEquals(0, unlockScreen.getOnResumeCount());
+        assertEquals(0, unlockScreen.getCleanupCount());
+
+        // simulate screen turning on
+        mLPKV.onScreenTurnedOn();
+
+        assertEquals(0, lockScreen.getOnPauseCount());
+        assertEquals(1, lockScreen.getOnResumeCount());
+        assertEquals(0, lockScreen.getCleanupCount());
+
+        assertEquals(0, unlockScreen.getOnPauseCount());
+        assertEquals(0, unlockScreen.getOnResumeCount());
+        assertEquals(0, unlockScreen.getCleanupCount());
+    }
+
+    public void testWokenByMenuKeyWhenPatternSet() {
+        assertEquals(true, mLockPatternUtils.isLockPatternEnabled());
+
+        mLPKV.wakeWhenReadyTq(KeyEvent.KEYCODE_MENU);
+
+        // should have poked the wakelock to turn on the screen
+        assertEquals(1, mKeyguardViewCallback.getPokeWakelockCount());
+
+        // shouldn't be any additional views created
+        assertEquals(1, mLPKV.getInjectedLockScreens().size());
+        assertEquals(1, mLPKV.getInjectedUnlockScreens().size());
+        MockKeyguardScreen lockScreen = mLPKV.getInjectedLockScreens().get(0);
+        MockKeyguardScreen unlockScreen = mLPKV.getInjectedUnlockScreens().get(0);
+
+        // unlock screen should be only visible one
+        assertEquals(View.GONE, lockScreen.getVisibility());
+        assertEquals(View.VISIBLE, unlockScreen.getVisibility());
+    }
+
+    public void testScreenRequestsRecreation() {
+        mLPKV.wakeWhenReadyTq(0);
+        mLPKV.onScreenTurnedOn();
+
+        assertEquals(1, mLPKV.getInjectedLockScreens().size());
+        assertEquals(1, mLPKV.getInjectedUnlockScreens().size());
+        MockKeyguardScreen lockScreen = mLPKV.getInjectedLockScreens().get(0);
+
+        assertEquals(0, lockScreen.getOnPauseCount());
+        assertEquals(1, lockScreen.getOnResumeCount());
+
+        // simulate screen asking to be recreated
+        mLPKV.mKeyguardScreenCallback.recreateMe(new Configuration());
+
+        // should have been recreated
+        assertEquals(2, mLPKV.getInjectedLockScreens().size());
+        assertEquals(2, mLPKV.getInjectedUnlockScreens().size());
+
+        // both old screens should have been cleaned up
+        assertEquals(1, mLPKV.getInjectedLockScreens().get(0).getCleanupCount());
+        assertEquals(1, mLPKV.getInjectedUnlockScreens().get(0).getCleanupCount());
+
+        // old lock screen should have been paused
+        assertEquals(1, mLPKV.getInjectedLockScreens().get(0).getOnPauseCount());
+        assertEquals(0, mLPKV.getInjectedUnlockScreens().get(0).getOnPauseCount());
+
+        // new lock screen should have been resumed
+        assertEquals(1, mLPKV.getInjectedLockScreens().get(1).getOnResumeCount());
+        assertEquals(0, mLPKV.getInjectedUnlockScreens().get(1).getOnResumeCount());
+    }
+
+    public void testMenuDoesntGoToUnlockScreenOnWakeWhenPukLocked() {
+        // PUK locked
+        mUpdateMonitor.simState = IccCard.State.PUK_REQUIRED;
+
+        // wake by menu
+        mLPKV.wakeWhenReadyTq(KeyEvent.KEYCODE_MENU);
+
+        assertEquals(1, mLPKV.getInjectedLockScreens().size());
+        assertEquals(1, mLPKV.getInjectedUnlockScreens().size());
+        MockKeyguardScreen lockScreen = mLPKV.getInjectedLockScreens().get(0);
+        MockKeyguardScreen unlockScreen = mLPKV.getInjectedUnlockScreens().get(0);
+
+        // lock screen should be only visible one
+        assertEquals(View.VISIBLE, lockScreen.getVisibility());
+        assertEquals(View.GONE, unlockScreen.getVisibility());
+    }
+
+    public void testMenuGoesToLockScreenWhenDeviceNotSecure() {
+        mLockPatternUtils.setLockPatternEnabled(false);
+
+        // wake by menu
+        mLPKV.wakeWhenReadyTq(KeyEvent.KEYCODE_MENU);
+
+        assertEquals(1, mLPKV.getInjectedLockScreens().size());
+        assertEquals(1, mLPKV.getInjectedUnlockScreens().size());
+        MockKeyguardScreen lockScreen = mLPKV.getInjectedLockScreens().get(0);
+        MockKeyguardScreen unlockScreen = mLPKV.getInjectedUnlockScreens().get(0);
+
+        // lock screen should be only visible one
+        assertEquals(View.VISIBLE, lockScreen.getVisibility());
+        assertEquals(View.GONE, unlockScreen.getVisibility());
+    }
+}
diff --git a/preloaded-classes b/preloaded-classes
index 1a058fd..b602039 100644
--- a/preloaded-classes
+++ b/preloaded-classes
@@ -31,7 +31,6 @@
 android.app.IActivityManager
 android.app.IActivityManager$ContentProviderHolder
 android.app.IAlarmManager$Stub
-android.app.IStatusBar$Stub
 android.app.ITransientNotification$Stub
 android.app.Instrumentation
 android.app.IntentService
@@ -269,7 +268,6 @@
 android.location.ILocationManager$Stub$Proxy
 android.location.Location
 android.location.LocationManager
-android.location.LocationProviderInterface
 android.media.AudioFormat
 android.media.AudioManager
 android.media.AudioRecord
@@ -633,7 +631,6 @@
 com.android.internal.content.SyncStateContentProviderHelper
 com.android.internal.graphics.NativeUtils
 com.android.internal.location.DummyLocationProvider
-com.android.internal.location.GpsLocationProvider
 com.android.internal.logging.AndroidHandler
 com.android.internal.os.AndroidPrintStream
 com.android.internal.os.BinderInternal
@@ -656,6 +653,11 @@
 com.android.internal.policy.impl.PhoneWindow$PanelFeatureState$SavedState
 com.android.internal.policy.impl.PhoneWindowManager
 com.android.internal.policy.impl.Policy
+com.android.internal.statusbar.IStatusBar
+com.android.internal.statusbar.IStatusBar$Stub
+com.android.internal.statusbar.IStatusBarService$Stub
+com.android.internal.statusbar.IStatusBarService$Stub
+com.android.internal.statusbar.StatusBarIcon
 com.android.internal.telephony.GsmAlphabet
 com.android.internal.telephony.ITelephony$Stub
 com.android.internal.telephony.ITelephony$Stub$Proxy
diff --git a/libs/audioflinger/A2dpAudioInterface.cpp b/services/audioflinger/A2dpAudioInterface.cpp
similarity index 100%
rename from libs/audioflinger/A2dpAudioInterface.cpp
rename to services/audioflinger/A2dpAudioInterface.cpp
diff --git a/libs/audioflinger/A2dpAudioInterface.h b/services/audioflinger/A2dpAudioInterface.h
similarity index 100%
rename from libs/audioflinger/A2dpAudioInterface.h
rename to services/audioflinger/A2dpAudioInterface.h
diff --git a/services/audioflinger/Android.mk b/services/audioflinger/Android.mk
new file mode 100644
index 0000000..22ecc54
--- /dev/null
+++ b/services/audioflinger/Android.mk
@@ -0,0 +1,131 @@
+LOCAL_PATH:= $(call my-dir)
+
+#AUDIO_POLICY_TEST := true
+#ENABLE_AUDIO_DUMP := true
+
+include $(CLEAR_VARS)
+
+
+ifeq ($(AUDIO_POLICY_TEST),true)
+  ENABLE_AUDIO_DUMP := true
+endif
+
+
+LOCAL_SRC_FILES:= \
+    AudioHardwareGeneric.cpp \
+    AudioHardwareStub.cpp \
+    AudioHardwareInterface.cpp
+
+ifeq ($(ENABLE_AUDIO_DUMP),true)
+  LOCAL_SRC_FILES += AudioDumpInterface.cpp
+  LOCAL_CFLAGS += -DENABLE_AUDIO_DUMP
+endif
+
+LOCAL_SHARED_LIBRARIES := \
+    libcutils \
+    libutils \
+    libbinder \
+    libmedia \
+    libhardware_legacy
+
+ifeq ($(strip $(BOARD_USES_GENERIC_AUDIO)),true)
+  LOCAL_CFLAGS += -DGENERIC_AUDIO
+endif
+
+LOCAL_MODULE:= libaudiointerface
+
+ifeq ($(BOARD_HAVE_BLUETOOTH),true)
+  LOCAL_SRC_FILES += A2dpAudioInterface.cpp
+  LOCAL_SHARED_LIBRARIES += liba2dp
+  LOCAL_CFLAGS += -DWITH_BLUETOOTH -DWITH_A2DP
+  LOCAL_C_INCLUDES += $(call include-path-for, bluez)
+endif
+
+include $(BUILD_STATIC_LIBRARY)
+
+
+include $(CLEAR_VARS)
+
+LOCAL_SRC_FILES:=               \
+    AudioPolicyManagerBase.cpp
+
+LOCAL_SHARED_LIBRARIES := \
+    libcutils \
+    libutils \
+    libmedia
+
+ifeq ($(TARGET_SIMULATOR),true)
+ LOCAL_LDLIBS += -ldl
+else
+ LOCAL_SHARED_LIBRARIES += libdl
+endif
+
+LOCAL_MODULE:= libaudiopolicybase
+
+ifeq ($(BOARD_HAVE_BLUETOOTH),true)
+  LOCAL_CFLAGS += -DWITH_A2DP
+endif
+
+ifeq ($(AUDIO_POLICY_TEST),true)
+  LOCAL_CFLAGS += -DAUDIO_POLICY_TEST
+endif
+
+include $(BUILD_STATIC_LIBRARY)
+
+include $(CLEAR_VARS)
+
+LOCAL_SRC_FILES:=               \
+    AudioFlinger.cpp            \
+    AudioMixer.cpp.arm          \
+    AudioResampler.cpp.arm      \
+    AudioResamplerSinc.cpp.arm  \
+    AudioResamplerCubic.cpp.arm \
+    AudioPolicyService.cpp
+
+LOCAL_SHARED_LIBRARIES := \
+    libcutils \
+    libutils \
+    libbinder \
+    libmedia \
+    libhardware_legacy \
+    libeffects
+
+ifeq ($(strip $(BOARD_USES_GENERIC_AUDIO)),true)
+  LOCAL_STATIC_LIBRARIES += libaudiointerface libaudiopolicybase
+  LOCAL_CFLAGS += -DGENERIC_AUDIO
+else
+  LOCAL_SHARED_LIBRARIES += libaudio libaudiopolicy
+endif
+
+ifeq ($(TARGET_SIMULATOR),true)
+ LOCAL_LDLIBS += -ldl
+else
+ LOCAL_SHARED_LIBRARIES += libdl
+endif
+
+LOCAL_MODULE:= libaudioflinger
+
+ifeq ($(BOARD_HAVE_BLUETOOTH),true)
+  LOCAL_CFLAGS += -DWITH_BLUETOOTH -DWITH_A2DP
+  LOCAL_SHARED_LIBRARIES += liba2dp
+endif
+
+ifeq ($(AUDIO_POLICY_TEST),true)
+  LOCAL_CFLAGS += -DAUDIO_POLICY_TEST
+endif
+
+ifeq ($(TARGET_SIMULATOR),true)
+    ifeq ($(HOST_OS),linux)
+        LOCAL_LDLIBS += -lrt -lpthread
+    endif
+endif
+
+ifeq ($(BOARD_USE_LVMX),true)
+    LOCAL_CFLAGS += -DLVMX
+    LOCAL_C_INCLUDES += vendor/nxp
+    LOCAL_STATIC_LIBRARIES += liblifevibes
+    LOCAL_SHARED_LIBRARIES += liblvmxservice
+#    LOCAL_SHARED_LIBRARIES += liblvmxipc
+endif
+
+include $(BUILD_SHARED_LIBRARY)
diff --git a/libs/audioflinger/AudioBufferProvider.h b/services/audioflinger/AudioBufferProvider.h
similarity index 100%
rename from libs/audioflinger/AudioBufferProvider.h
rename to services/audioflinger/AudioBufferProvider.h
diff --git a/services/audioflinger/AudioDumpInterface.cpp b/services/audioflinger/AudioDumpInterface.cpp
new file mode 100644
index 0000000..6c11114
--- /dev/null
+++ b/services/audioflinger/AudioDumpInterface.cpp
@@ -0,0 +1,573 @@
+/* //device/servers/AudioFlinger/AudioDumpInterface.cpp
+**
+** Copyright 2008, The Android Open Source Project
+**
+** Licensed under the Apache License, Version 2.0 (the "License");
+** you may not use this file except in compliance with the License.
+** You may obtain a copy of the License at
+**
+**     http://www.apache.org/licenses/LICENSE-2.0
+**
+** Unless required by applicable law or agreed to in writing, software
+** distributed under the License is distributed on an "AS IS" BASIS,
+** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+** See the License for the specific language governing permissions and
+** limitations under the License.
+*/
+
+#define LOG_TAG "AudioFlingerDump"
+//#define LOG_NDEBUG 0
+
+#include <stdint.h>
+#include <sys/types.h>
+#include <utils/Log.h>
+
+#include <stdlib.h>
+#include <unistd.h>
+
+#include "AudioDumpInterface.h"
+
+namespace android {
+
+// ----------------------------------------------------------------------------
+
+AudioDumpInterface::AudioDumpInterface(AudioHardwareInterface* hw)
+    : mPolicyCommands(String8("")), mFileName(String8(""))
+{
+    if(hw == 0) {
+        LOGE("Dump construct hw = 0");
+    }
+    mFinalInterface = hw;
+    LOGV("Constructor %p, mFinalInterface %p", this, mFinalInterface);
+}
+
+
+AudioDumpInterface::~AudioDumpInterface()
+{
+    for (size_t i = 0; i < mOutputs.size(); i++) {
+        closeOutputStream((AudioStreamOut *)mOutputs[i]);
+    }
+
+    for (size_t i = 0; i < mInputs.size(); i++) {
+        closeInputStream((AudioStreamIn *)mInputs[i]);
+    }
+
+    if(mFinalInterface) delete mFinalInterface;
+}
+
+
+AudioStreamOut* AudioDumpInterface::openOutputStream(
+        uint32_t devices, int *format, uint32_t *channels, uint32_t *sampleRate, status_t *status)
+{
+    AudioStreamOut* outFinal = NULL;
+    int lFormat = AudioSystem::PCM_16_BIT;
+    uint32_t lChannels = AudioSystem::CHANNEL_OUT_STEREO;
+    uint32_t lRate = 44100;
+
+
+    outFinal = mFinalInterface->openOutputStream(devices, format, channels, sampleRate, status);
+    if (outFinal != 0) {
+        lFormat = outFinal->format();
+        lChannels = outFinal->channels();
+        lRate = outFinal->sampleRate();
+    } else {
+        if (format != 0) {
+            if (*format != 0) {
+                lFormat = *format;
+            } else {
+                *format = lFormat;
+            }
+        }
+        if (channels != 0) {
+            if (*channels != 0) {
+                lChannels = *channels;
+            } else {
+                *channels = lChannels;
+            }
+        }
+        if (sampleRate != 0) {
+            if (*sampleRate != 0) {
+                lRate = *sampleRate;
+            } else {
+                *sampleRate = lRate;
+            }
+        }
+        if (status) *status = NO_ERROR;
+    }
+    LOGV("openOutputStream(), outFinal %p", outFinal);
+
+    AudioStreamOutDump *dumOutput = new AudioStreamOutDump(this, mOutputs.size(), outFinal,
+            devices, lFormat, lChannels, lRate);
+    mOutputs.add(dumOutput);
+
+    return dumOutput;
+}
+
+void AudioDumpInterface::closeOutputStream(AudioStreamOut* out)
+{
+    AudioStreamOutDump *dumpOut = (AudioStreamOutDump *)out;
+
+    if (mOutputs.indexOf(dumpOut) < 0) {
+        LOGW("Attempt to close invalid output stream");
+        return;
+    }
+
+    LOGV("closeOutputStream() output %p", out);
+
+    dumpOut->standby();
+    if (dumpOut->finalStream() != NULL) {
+        mFinalInterface->closeOutputStream(dumpOut->finalStream());
+    }
+
+    mOutputs.remove(dumpOut);
+    delete dumpOut;
+}
+
+AudioStreamIn* AudioDumpInterface::openInputStream(uint32_t devices, int *format, uint32_t *channels,
+        uint32_t *sampleRate, status_t *status, AudioSystem::audio_in_acoustics acoustics)
+{
+    AudioStreamIn* inFinal = NULL;
+    int lFormat = AudioSystem::PCM_16_BIT;
+    uint32_t lChannels = AudioSystem::CHANNEL_IN_MONO;
+    uint32_t lRate = 8000;
+
+    inFinal = mFinalInterface->openInputStream(devices, format, channels, sampleRate, status, acoustics);
+    if (inFinal != 0) {
+        lFormat = inFinal->format();
+        lChannels = inFinal->channels();
+        lRate = inFinal->sampleRate();
+    } else {
+        if (format != 0) {
+            if (*format != 0) {
+                lFormat = *format;
+            } else {
+                *format = lFormat;
+            }
+        }
+        if (channels != 0) {
+            if (*channels != 0) {
+                lChannels = *channels;
+            } else {
+                *channels = lChannels;
+            }
+        }
+        if (sampleRate != 0) {
+            if (*sampleRate != 0) {
+                lRate = *sampleRate;
+            } else {
+                *sampleRate = lRate;
+            }
+        }
+        if (status) *status = NO_ERROR;
+    }
+    LOGV("openInputStream(), inFinal %p", inFinal);
+
+    AudioStreamInDump *dumInput = new AudioStreamInDump(this, mInputs.size(), inFinal,
+            devices, lFormat, lChannels, lRate);
+    mInputs.add(dumInput);
+
+    return dumInput;
+}
+void AudioDumpInterface::closeInputStream(AudioStreamIn* in)
+{
+    AudioStreamInDump *dumpIn = (AudioStreamInDump *)in;
+
+    if (mInputs.indexOf(dumpIn) < 0) {
+        LOGW("Attempt to close invalid input stream");
+        return;
+    }
+    dumpIn->standby();
+    if (dumpIn->finalStream() != NULL) {
+        mFinalInterface->closeInputStream(dumpIn->finalStream());
+    }
+
+    mInputs.remove(dumpIn);
+    delete dumpIn;
+}
+
+
+status_t AudioDumpInterface::setParameters(const String8& keyValuePairs)
+{
+    AudioParameter param = AudioParameter(keyValuePairs);
+    String8 value;
+    int valueInt;
+    LOGV("setParameters %s", keyValuePairs.string());
+
+    if (param.get(String8("test_cmd_file_name"), value) == NO_ERROR) {
+        mFileName = value;
+        param.remove(String8("test_cmd_file_name"));
+    }
+    if (param.get(String8("test_cmd_policy"), value) == NO_ERROR) {
+        Mutex::Autolock _l(mLock);
+        param.remove(String8("test_cmd_policy"));
+        mPolicyCommands = param.toString();
+        LOGV("test_cmd_policy command %s written", mPolicyCommands.string());
+        return NO_ERROR;
+    }
+
+    if (mFinalInterface != 0 ) return mFinalInterface->setParameters(keyValuePairs);
+    return NO_ERROR;
+}
+
+String8 AudioDumpInterface::getParameters(const String8& keys)
+{
+    AudioParameter param = AudioParameter(keys);
+    AudioParameter response;
+    String8 value;
+
+//    LOGV("getParameters %s", keys.string());
+    if (param.get(String8("test_cmd_policy"), value) == NO_ERROR) {
+        Mutex::Autolock _l(mLock);
+        if (mPolicyCommands.length() != 0) {
+            response = AudioParameter(mPolicyCommands);
+            response.addInt(String8("test_cmd_policy"), 1);
+        } else {
+            response.addInt(String8("test_cmd_policy"), 0);
+        }
+        param.remove(String8("test_cmd_policy"));
+//        LOGV("test_cmd_policy command %s read", mPolicyCommands.string());
+    }
+
+    if (param.get(String8("test_cmd_file_name"), value) == NO_ERROR) {
+        response.add(String8("test_cmd_file_name"), mFileName);
+        param.remove(String8("test_cmd_file_name"));
+    }
+
+    String8 keyValuePairs = response.toString();
+
+    if (param.size() && mFinalInterface != 0 ) {
+        keyValuePairs += ";";
+        keyValuePairs += mFinalInterface->getParameters(param.toString());
+    }
+
+    return keyValuePairs;
+}
+
+status_t AudioDumpInterface::setMode(int mode)
+{
+    return mFinalInterface->setMode(mode);
+}
+
+size_t AudioDumpInterface::getInputBufferSize(uint32_t sampleRate, int format, int channelCount)
+{
+    return mFinalInterface->getInputBufferSize(sampleRate, format, channelCount);
+}
+
+// ----------------------------------------------------------------------------
+
+AudioStreamOutDump::AudioStreamOutDump(AudioDumpInterface *interface,
+                                        int id,
+                                        AudioStreamOut* finalStream,
+                                        uint32_t devices,
+                                        int format,
+                                        uint32_t channels,
+                                        uint32_t sampleRate)
+    : mInterface(interface), mId(id),
+      mSampleRate(sampleRate), mFormat(format), mChannels(channels), mLatency(0), mDevice(devices),
+      mBufferSize(1024), mFinalStream(finalStream), mFile(0), mFileCount(0)
+{
+    LOGV("AudioStreamOutDump Constructor %p, mInterface %p, mFinalStream %p", this, mInterface, mFinalStream);
+}
+
+
+AudioStreamOutDump::~AudioStreamOutDump()
+{
+    LOGV("AudioStreamOutDump destructor");
+    Close();
+}
+
+ssize_t AudioStreamOutDump::write(const void* buffer, size_t bytes)
+{
+    ssize_t ret;
+
+    if (mFinalStream) {
+        ret = mFinalStream->write(buffer, bytes);
+    } else {
+        usleep((((bytes * 1000) / frameSize()) / sampleRate()) * 1000);
+        ret = bytes;
+    }
+    if(!mFile) {
+        if (mInterface->fileName() != "") {
+            char name[255];
+            sprintf(name, "%s_out_%d_%d.pcm", mInterface->fileName().string(), mId, ++mFileCount);
+            mFile = fopen(name, "wb");
+            LOGV("Opening dump file %s, fh %p", name, mFile);
+        }
+    }
+    if (mFile) {
+        fwrite(buffer, bytes, 1, mFile);
+    }
+    return ret;
+}
+
+status_t AudioStreamOutDump::standby()
+{
+    LOGV("AudioStreamOutDump standby(), mFile %p, mFinalStream %p", mFile, mFinalStream);
+
+    Close();
+    if (mFinalStream != 0 ) return mFinalStream->standby();
+    return NO_ERROR;
+}
+
+uint32_t AudioStreamOutDump::sampleRate() const
+{
+    if (mFinalStream != 0 ) return mFinalStream->sampleRate();
+    return mSampleRate;
+}
+
+size_t AudioStreamOutDump::bufferSize() const
+{
+    if (mFinalStream != 0 ) return mFinalStream->bufferSize();
+    return mBufferSize;
+}
+
+uint32_t AudioStreamOutDump::channels() const
+{
+    if (mFinalStream != 0 ) return mFinalStream->channels();
+    return mChannels;
+}
+int AudioStreamOutDump::format() const
+{
+    if (mFinalStream != 0 ) return mFinalStream->format();
+    return mFormat;
+}
+uint32_t AudioStreamOutDump::latency() const
+{
+    if (mFinalStream != 0 ) return mFinalStream->latency();
+    return 0;
+}
+status_t AudioStreamOutDump::setVolume(float left, float right)
+{
+    if (mFinalStream != 0 ) return mFinalStream->setVolume(left, right);
+    return NO_ERROR;
+}
+status_t AudioStreamOutDump::setParameters(const String8& keyValuePairs)
+{
+    LOGV("AudioStreamOutDump::setParameters %s", keyValuePairs.string());
+
+    if (mFinalStream != 0 ) {
+        return mFinalStream->setParameters(keyValuePairs);
+    }
+
+    AudioParameter param = AudioParameter(keyValuePairs);
+    String8 value;
+    int valueInt;
+    status_t status = NO_ERROR;
+
+    if (param.getInt(String8("set_id"), valueInt) == NO_ERROR) {
+        mId = valueInt;
+    }
+
+    if (param.getInt(String8("format"), valueInt) == NO_ERROR) {
+        if (mFile == 0) {
+            mFormat = valueInt;
+        } else {
+            status = INVALID_OPERATION;
+        }
+    }
+    if (param.getInt(String8("channels"), valueInt) == NO_ERROR) {
+        if (valueInt == AudioSystem::CHANNEL_OUT_STEREO || valueInt == AudioSystem::CHANNEL_OUT_MONO) {
+            mChannels = valueInt;
+        } else {
+            status = BAD_VALUE;
+        }
+    }
+    if (param.getInt(String8("sampling_rate"), valueInt) == NO_ERROR) {
+        if (valueInt > 0 && valueInt <= 48000) {
+            if (mFile == 0) {
+                mSampleRate = valueInt;
+            } else {
+                status = INVALID_OPERATION;
+            }
+        } else {
+            status = BAD_VALUE;
+        }
+    }
+    return status;
+}
+
+String8 AudioStreamOutDump::getParameters(const String8& keys)
+{
+    if (mFinalStream != 0 ) return mFinalStream->getParameters(keys);
+
+    AudioParameter param = AudioParameter(keys);
+    return param.toString();
+}
+
+status_t AudioStreamOutDump::dump(int fd, const Vector<String16>& args)
+{
+    if (mFinalStream != 0 ) return mFinalStream->dump(fd, args);
+    return NO_ERROR;
+}
+
+void AudioStreamOutDump::Close()
+{
+    if(mFile) {
+        fclose(mFile);
+        mFile = 0;
+    }
+}
+
+status_t AudioStreamOutDump::getRenderPosition(uint32_t *dspFrames)
+{
+    if (mFinalStream != 0 ) return mFinalStream->getRenderPosition(dspFrames);
+    return INVALID_OPERATION;
+}
+
+// ----------------------------------------------------------------------------
+
+AudioStreamInDump::AudioStreamInDump(AudioDumpInterface *interface,
+                                        int id,
+                                        AudioStreamIn* finalStream,
+                                        uint32_t devices,
+                                        int format,
+                                        uint32_t channels,
+                                        uint32_t sampleRate)
+    : mInterface(interface), mId(id),
+      mSampleRate(sampleRate), mFormat(format), mChannels(channels), mDevice(devices),
+      mBufferSize(1024), mFinalStream(finalStream), mFile(0), mFileCount(0)
+{
+    LOGV("AudioStreamInDump Constructor %p, mInterface %p, mFinalStream %p", this, mInterface, mFinalStream);
+}
+
+
+AudioStreamInDump::~AudioStreamInDump()
+{
+    Close();
+}
+
+ssize_t AudioStreamInDump::read(void* buffer, ssize_t bytes)
+{
+    ssize_t ret;
+
+    if (mFinalStream) {
+        ret = mFinalStream->read(buffer, bytes);
+        if(!mFile) {
+            if (mInterface->fileName() != "") {
+                char name[255];
+                sprintf(name, "%s_in_%d_%d.pcm", mInterface->fileName().string(), mId, ++mFileCount);
+                mFile = fopen(name, "wb");
+                LOGV("Opening input dump file %s, fh %p", name, mFile);
+            }
+        }
+        if (mFile) {
+            fwrite(buffer, bytes, 1, mFile);
+        }
+    } else {
+        usleep((((bytes * 1000) / frameSize()) / sampleRate()) * 1000);
+        ret = bytes;
+        if(!mFile) {
+            char name[255];
+            strcpy(name, "/sdcard/music/sine440");
+            if (channels() == AudioSystem::CHANNEL_IN_MONO) {
+                strcat(name, "_mo");
+            } else {
+                strcat(name, "_st");
+            }
+            if (format() == AudioSystem::PCM_16_BIT) {
+                strcat(name, "_16b");
+            } else {
+                strcat(name, "_8b");
+            }
+            if (sampleRate() < 16000) {
+                strcat(name, "_8k");
+            } else if (sampleRate() < 32000) {
+                strcat(name, "_22k");
+            } else if (sampleRate() < 48000) {
+                strcat(name, "_44k");
+            } else {
+                strcat(name, "_48k");
+            }
+            strcat(name, ".wav");
+            mFile = fopen(name, "rb");
+            LOGV("Opening input read file %s, fh %p", name, mFile);
+            if (mFile) {
+                fseek(mFile, AUDIO_DUMP_WAVE_HDR_SIZE, SEEK_SET);
+            }
+        }
+        if (mFile) {
+            ssize_t bytesRead = fread(buffer, bytes, 1, mFile);
+            if (bytesRead >=0 && bytesRead < bytes) {
+                fseek(mFile, AUDIO_DUMP_WAVE_HDR_SIZE, SEEK_SET);
+                fread((uint8_t *)buffer+bytesRead, bytes-bytesRead, 1, mFile);
+            }
+        }
+    }
+
+    return ret;
+}
+
+status_t AudioStreamInDump::standby()
+{
+    LOGV("AudioStreamInDump standby(), mFile %p, mFinalStream %p", mFile, mFinalStream);
+
+    Close();
+    if (mFinalStream != 0 ) return mFinalStream->standby();
+    return NO_ERROR;
+}
+
+status_t AudioStreamInDump::setGain(float gain)
+{
+    if (mFinalStream != 0 ) return mFinalStream->setGain(gain);
+    return NO_ERROR;
+}
+
+uint32_t AudioStreamInDump::sampleRate() const
+{
+    if (mFinalStream != 0 ) return mFinalStream->sampleRate();
+    return mSampleRate;
+}
+
+size_t AudioStreamInDump::bufferSize() const
+{
+    if (mFinalStream != 0 ) return mFinalStream->bufferSize();
+    return mBufferSize;
+}
+
+uint32_t AudioStreamInDump::channels() const
+{
+    if (mFinalStream != 0 ) return mFinalStream->channels();
+    return mChannels;
+}
+
+int AudioStreamInDump::format() const
+{
+    if (mFinalStream != 0 ) return mFinalStream->format();
+    return mFormat;
+}
+
+status_t AudioStreamInDump::setParameters(const String8& keyValuePairs)
+{
+    LOGV("AudioStreamInDump::setParameters()");
+    if (mFinalStream != 0 ) return mFinalStream->setParameters(keyValuePairs);
+    return NO_ERROR;
+}
+
+String8 AudioStreamInDump::getParameters(const String8& keys)
+{
+    if (mFinalStream != 0 ) return mFinalStream->getParameters(keys);
+
+    AudioParameter param = AudioParameter(keys);
+    return param.toString();
+}
+
+unsigned int AudioStreamInDump::getInputFramesLost() const
+{
+    if (mFinalStream != 0 ) return mFinalStream->getInputFramesLost();
+    return 0;
+}
+
+status_t AudioStreamInDump::dump(int fd, const Vector<String16>& args)
+{
+    if (mFinalStream != 0 ) return mFinalStream->dump(fd, args);
+    return NO_ERROR;
+}
+
+void AudioStreamInDump::Close()
+{
+    if(mFile) {
+        fclose(mFile);
+        mFile = 0;
+    }
+}
+}; // namespace android
diff --git a/services/audioflinger/AudioDumpInterface.h b/services/audioflinger/AudioDumpInterface.h
new file mode 100644
index 0000000..814ce5f
--- /dev/null
+++ b/services/audioflinger/AudioDumpInterface.h
@@ -0,0 +1,170 @@
+/* //device/servers/AudioFlinger/AudioDumpInterface.h
+**
+** Copyright 2008, The Android Open Source Project
+**
+** Licensed under the Apache License, Version 2.0 (the "License");
+** you may not use this file except in compliance with the License.
+** You may obtain a copy of the License at
+**
+**     http://www.apache.org/licenses/LICENSE-2.0
+**
+** Unless required by applicable law or agreed to in writing, software
+** distributed under the License is distributed on an "AS IS" BASIS,
+** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+** See the License for the specific language governing permissions and
+** limitations under the License.
+*/
+
+#ifndef ANDROID_AUDIO_DUMP_INTERFACE_H
+#define ANDROID_AUDIO_DUMP_INTERFACE_H
+
+#include <stdint.h>
+#include <sys/types.h>
+#include <utils/String8.h>
+#include <utils/SortedVector.h>
+
+#include <hardware_legacy/AudioHardwareBase.h>
+
+namespace android {
+
+#define AUDIO_DUMP_WAVE_HDR_SIZE 44
+
+class AudioDumpInterface;
+
+class AudioStreamOutDump : public AudioStreamOut {
+public:
+                        AudioStreamOutDump(AudioDumpInterface *interface,
+                                            int id,
+                                            AudioStreamOut* finalStream,
+                                            uint32_t devices,
+                                            int format,
+                                            uint32_t channels,
+                                            uint32_t sampleRate);
+                        ~AudioStreamOutDump();
+
+    virtual ssize_t     write(const void* buffer, size_t bytes);
+    virtual uint32_t    sampleRate() const;
+    virtual size_t      bufferSize() const;
+    virtual uint32_t    channels() const;
+    virtual int         format() const;
+    virtual uint32_t    latency() const;
+    virtual status_t    setVolume(float left, float right);
+    virtual status_t    standby();
+    virtual status_t    setParameters(const String8& keyValuePairs);
+    virtual String8     getParameters(const String8& keys);
+    virtual status_t    dump(int fd, const Vector<String16>& args);
+    void                Close(void);
+    AudioStreamOut*     finalStream() { return mFinalStream; }
+    uint32_t            device() { return mDevice; }
+    int                 getId()  { return mId; }
+    virtual status_t    getRenderPosition(uint32_t *dspFrames);
+
+private:
+    AudioDumpInterface *mInterface;
+    int                  mId;
+    uint32_t mSampleRate;               //
+    uint32_t mFormat;                   //
+    uint32_t mChannels;                 // output configuration
+    uint32_t mLatency;                  //
+    uint32_t mDevice;                   // current device this output is routed to
+    size_t  mBufferSize;
+    AudioStreamOut      *mFinalStream;
+    FILE                *mFile;      // output file
+    int                 mFileCount;
+};
+
+class AudioStreamInDump : public AudioStreamIn {
+public:
+                        AudioStreamInDump(AudioDumpInterface *interface,
+                                            int id,
+                                            AudioStreamIn* finalStream,
+                                            uint32_t devices,
+                                            int format,
+                                            uint32_t channels,
+                                            uint32_t sampleRate);
+                        ~AudioStreamInDump();
+
+    virtual uint32_t    sampleRate() const;
+    virtual size_t      bufferSize() const;
+    virtual uint32_t    channels() const;
+    virtual int         format() const;
+
+    virtual status_t    setGain(float gain);
+    virtual ssize_t     read(void* buffer, ssize_t bytes);
+    virtual status_t    standby();
+    virtual status_t    setParameters(const String8& keyValuePairs);
+    virtual String8     getParameters(const String8& keys);
+    virtual unsigned int  getInputFramesLost() const;
+    virtual status_t    dump(int fd, const Vector<String16>& args);
+    void                Close(void);
+    AudioStreamIn*     finalStream() { return mFinalStream; }
+    uint32_t            device() { return mDevice; }
+
+private:
+    AudioDumpInterface *mInterface;
+    int                  mId;
+    uint32_t mSampleRate;               //
+    uint32_t mFormat;                   //
+    uint32_t mChannels;                 // output configuration
+    uint32_t mDevice;                   // current device this output is routed to
+    size_t  mBufferSize;
+    AudioStreamIn      *mFinalStream;
+    FILE                *mFile;      // output file
+    int                 mFileCount;
+};
+
+class AudioDumpInterface : public AudioHardwareBase
+{
+
+public:
+                        AudioDumpInterface(AudioHardwareInterface* hw);
+    virtual AudioStreamOut* openOutputStream(
+                                uint32_t devices,
+                                int *format=0,
+                                uint32_t *channels=0,
+                                uint32_t *sampleRate=0,
+                                status_t *status=0);
+    virtual    void        closeOutputStream(AudioStreamOut* out);
+
+    virtual             ~AudioDumpInterface();
+
+    virtual status_t    initCheck()
+                            {return mFinalInterface->initCheck();}
+    virtual status_t    setVoiceVolume(float volume)
+                            {return mFinalInterface->setVoiceVolume(volume);}
+    virtual status_t    setMasterVolume(float volume)
+                            {return mFinalInterface->setMasterVolume(volume);}
+
+    virtual status_t    setMode(int mode);
+
+    // mic mute
+    virtual status_t    setMicMute(bool state)
+                            {return mFinalInterface->setMicMute(state);}
+    virtual status_t    getMicMute(bool* state)
+                            {return mFinalInterface->getMicMute(state);}
+
+    virtual status_t    setParameters(const String8& keyValuePairs);
+    virtual String8     getParameters(const String8& keys);
+
+    virtual size_t      getInputBufferSize(uint32_t sampleRate, int format, int channelCount);
+
+    virtual AudioStreamIn* openInputStream(uint32_t devices, int *format, uint32_t *channels,
+            uint32_t *sampleRate, status_t *status, AudioSystem::audio_in_acoustics acoustics);
+    virtual    void        closeInputStream(AudioStreamIn* in);
+
+    virtual status_t    dump(int fd, const Vector<String16>& args) { return mFinalInterface->dumpState(fd, args); }
+
+            String8     fileName() const { return mFileName; }
+protected:
+
+    AudioHardwareInterface          *mFinalInterface;
+    SortedVector<AudioStreamOutDump *>   mOutputs;
+    SortedVector<AudioStreamInDump *>    mInputs;
+    Mutex                           mLock;
+    String8                         mPolicyCommands;
+    String8                         mFileName;
+};
+
+}; // namespace android
+
+#endif // ANDROID_AUDIO_DUMP_INTERFACE_H
diff --git a/services/audioflinger/AudioFlinger.cpp b/services/audioflinger/AudioFlinger.cpp
new file mode 100644
index 0000000..7e528af
--- /dev/null
+++ b/services/audioflinger/AudioFlinger.cpp
@@ -0,0 +1,6073 @@
+/* //device/include/server/AudioFlinger/AudioFlinger.cpp
+**
+** Copyright 2007, The Android Open Source Project
+**
+** Licensed under the Apache License, Version 2.0 (the "License");
+** you may not use this file except in compliance with the License.
+** You may obtain a copy of the License at
+**
+**     http://www.apache.org/licenses/LICENSE-2.0
+**
+** Unless required by applicable law or agreed to in writing, software
+** distributed under the License is distributed on an "AS IS" BASIS,
+** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+** See the License for the specific language governing permissions and
+** limitations under the License.
+*/
+
+
+#define LOG_TAG "AudioFlinger"
+//#define LOG_NDEBUG 0
+
+#include <math.h>
+#include <signal.h>
+#include <sys/time.h>
+#include <sys/resource.h>
+
+#include <binder/IServiceManager.h>
+#include <utils/Log.h>
+#include <binder/Parcel.h>
+#include <binder/IPCThreadState.h>
+#include <utils/String16.h>
+#include <utils/threads.h>
+
+#include <cutils/properties.h>
+
+#include <media/AudioTrack.h>
+#include <media/AudioRecord.h>
+
+#include <private/media/AudioTrackShared.h>
+#include <private/media/AudioEffectShared.h>
+#include <hardware_legacy/AudioHardwareInterface.h>
+
+#include "AudioMixer.h"
+#include "AudioFlinger.h"
+
+#ifdef WITH_A2DP
+#include "A2dpAudioInterface.h"
+#endif
+
+#ifdef LVMX
+#include "lifevibes.h"
+#endif
+
+#include <media/EffectsFactoryApi.h>
+#include <media/EffectVisualizerApi.h>
+
+// ----------------------------------------------------------------------------
+// the sim build doesn't have gettid
+
+#ifndef HAVE_GETTID
+# define gettid getpid
+#endif
+
+// ----------------------------------------------------------------------------
+
+namespace android {
+
+static const char* kDeadlockedString = "AudioFlinger may be deadlocked\n";
+static const char* kHardwareLockedString = "Hardware lock is taken\n";
+
+//static const nsecs_t kStandbyTimeInNsecs = seconds(3);
+static const float MAX_GAIN = 4096.0f;
+static const float MAX_GAIN_INT = 0x1000;
+
+// retry counts for buffer fill timeout
+// 50 * ~20msecs = 1 second
+static const int8_t kMaxTrackRetries = 50;
+static const int8_t kMaxTrackStartupRetries = 50;
+// allow less retry attempts on direct output thread.
+// direct outputs can be a scarce resource in audio hardware and should
+// be released as quickly as possible.
+static const int8_t kMaxTrackRetriesDirect = 2;
+
+static const int kDumpLockRetries = 50;
+static const int kDumpLockSleep = 20000;
+
+static const nsecs_t kWarningThrottle = seconds(5);
+
+
+#define AUDIOFLINGER_SECURITY_ENABLED 1
+
+// ----------------------------------------------------------------------------
+
+static bool recordingAllowed() {
+#ifndef HAVE_ANDROID_OS
+    return true;
+#endif
+#if AUDIOFLINGER_SECURITY_ENABLED
+    if (getpid() == IPCThreadState::self()->getCallingPid()) return true;
+    bool ok = checkCallingPermission(String16("android.permission.RECORD_AUDIO"));
+    if (!ok) LOGE("Request requires android.permission.RECORD_AUDIO");
+    return ok;
+#else
+    if (!checkCallingPermission(String16("android.permission.RECORD_AUDIO")))
+        LOGW("WARNING: Need to add android.permission.RECORD_AUDIO to manifest");
+    return true;
+#endif
+}
+
+static bool settingsAllowed() {
+#ifndef HAVE_ANDROID_OS
+    return true;
+#endif
+#if AUDIOFLINGER_SECURITY_ENABLED
+    if (getpid() == IPCThreadState::self()->getCallingPid()) return true;
+    bool ok = checkCallingPermission(String16("android.permission.MODIFY_AUDIO_SETTINGS"));
+    if (!ok) LOGE("Request requires android.permission.MODIFY_AUDIO_SETTINGS");
+    return ok;
+#else
+    if (!checkCallingPermission(String16("android.permission.MODIFY_AUDIO_SETTINGS")))
+        LOGW("WARNING: Need to add android.permission.MODIFY_AUDIO_SETTINGS to manifest");
+    return true;
+#endif
+}
+
+// ----------------------------------------------------------------------------
+
+AudioFlinger::AudioFlinger()
+    : BnAudioFlinger(),
+        mAudioHardware(0), mMasterVolume(1.0f), mMasterMute(false), mNextUniqueId(1),
+        mTotalEffectsCpuLoad(0), mTotalEffectsMemory(0)
+{
+    mHardwareStatus = AUDIO_HW_IDLE;
+
+    mAudioHardware = AudioHardwareInterface::create();
+
+    mHardwareStatus = AUDIO_HW_INIT;
+    if (mAudioHardware->initCheck() == NO_ERROR) {
+        // open 16-bit output stream for s/w mixer
+        mMode = AudioSystem::MODE_NORMAL;
+        setMode(mMode);
+
+        setMasterVolume(1.0f);
+        setMasterMute(false);
+    } else {
+        LOGE("Couldn't even initialize the stubbed audio hardware!");
+    }
+#ifdef LVMX
+    LifeVibes::init();
+    mLifeVibesClientPid = -1;
+#endif
+}
+
+AudioFlinger::~AudioFlinger()
+{
+    while (!mRecordThreads.isEmpty()) {
+        // closeInput() will remove first entry from mRecordThreads
+        closeInput(mRecordThreads.keyAt(0));
+    }
+    while (!mPlaybackThreads.isEmpty()) {
+        // closeOutput() will remove first entry from mPlaybackThreads
+        closeOutput(mPlaybackThreads.keyAt(0));
+    }
+    if (mAudioHardware) {
+        delete mAudioHardware;
+    }
+}
+
+
+
+status_t AudioFlinger::dumpClients(int fd, const Vector<String16>& args)
+{
+    const size_t SIZE = 256;
+    char buffer[SIZE];
+    String8 result;
+
+    result.append("Clients:\n");
+    for (size_t i = 0; i < mClients.size(); ++i) {
+        wp<Client> wClient = mClients.valueAt(i);
+        if (wClient != 0) {
+            sp<Client> client = wClient.promote();
+            if (client != 0) {
+                snprintf(buffer, SIZE, "  pid: %d\n", client->pid());
+                result.append(buffer);
+            }
+        }
+    }
+    write(fd, result.string(), result.size());
+    return NO_ERROR;
+}
+
+
+status_t AudioFlinger::dumpInternals(int fd, const Vector<String16>& args)
+{
+    const size_t SIZE = 256;
+    char buffer[SIZE];
+    String8 result;
+    int hardwareStatus = mHardwareStatus;
+
+    snprintf(buffer, SIZE, "Hardware status: %d\n", hardwareStatus);
+    result.append(buffer);
+    write(fd, result.string(), result.size());
+    return NO_ERROR;
+}
+
+status_t AudioFlinger::dumpPermissionDenial(int fd, const Vector<String16>& args)
+{
+    const size_t SIZE = 256;
+    char buffer[SIZE];
+    String8 result;
+    snprintf(buffer, SIZE, "Permission Denial: "
+            "can't dump AudioFlinger from pid=%d, uid=%d\n",
+            IPCThreadState::self()->getCallingPid(),
+            IPCThreadState::self()->getCallingUid());
+    result.append(buffer);
+    write(fd, result.string(), result.size());
+    return NO_ERROR;
+}
+
+static bool tryLock(Mutex& mutex)
+{
+    bool locked = false;
+    for (int i = 0; i < kDumpLockRetries; ++i) {
+        if (mutex.tryLock() == NO_ERROR) {
+            locked = true;
+            break;
+        }
+        usleep(kDumpLockSleep);
+    }
+    return locked;
+}
+
+status_t AudioFlinger::dump(int fd, const Vector<String16>& args)
+{
+    if (checkCallingPermission(String16("android.permission.DUMP")) == false) {
+        dumpPermissionDenial(fd, args);
+    } else {
+        // get state of hardware lock
+        bool hardwareLocked = tryLock(mHardwareLock);
+        if (!hardwareLocked) {
+            String8 result(kHardwareLockedString);
+            write(fd, result.string(), result.size());
+        } else {
+            mHardwareLock.unlock();
+        }
+
+        bool locked = tryLock(mLock);
+
+        // failed to lock - AudioFlinger is probably deadlocked
+        if (!locked) {
+            String8 result(kDeadlockedString);
+            write(fd, result.string(), result.size());
+        }
+
+        dumpClients(fd, args);
+        dumpInternals(fd, args);
+
+        // dump playback threads
+        for (size_t i = 0; i < mPlaybackThreads.size(); i++) {
+            mPlaybackThreads.valueAt(i)->dump(fd, args);
+        }
+
+        // dump record threads
+        for (size_t i = 0; i < mRecordThreads.size(); i++) {
+            mRecordThreads.valueAt(i)->dump(fd, args);
+        }
+
+        if (mAudioHardware) {
+            mAudioHardware->dumpState(fd, args);
+        }
+        if (locked) mLock.unlock();
+    }
+    return NO_ERROR;
+}
+
+
+// IAudioFlinger interface
+
+
+sp<IAudioTrack> AudioFlinger::createTrack(
+        pid_t pid,
+        int streamType,
+        uint32_t sampleRate,
+        int format,
+        int channelCount,
+        int frameCount,
+        uint32_t flags,
+        const sp<IMemory>& sharedBuffer,
+        int output,
+        int *sessionId,
+        status_t *status)
+{
+    sp<PlaybackThread::Track> track;
+    sp<TrackHandle> trackHandle;
+    sp<Client> client;
+    wp<Client> wclient;
+    status_t lStatus;
+    int lSessionId;
+
+    if (streamType >= AudioSystem::NUM_STREAM_TYPES) {
+        LOGE("invalid stream type");
+        lStatus = BAD_VALUE;
+        goto Exit;
+    }
+
+    {
+        Mutex::Autolock _l(mLock);
+        PlaybackThread *thread = checkPlaybackThread_l(output);
+        if (thread == NULL) {
+            LOGE("unknown output thread");
+            lStatus = BAD_VALUE;
+            goto Exit;
+        }
+
+        wclient = mClients.valueFor(pid);
+
+        if (wclient != NULL) {
+            client = wclient.promote();
+        } else {
+            client = new Client(this, pid);
+            mClients.add(pid, client);
+        }
+
+        // If no audio session id is provided, create one here
+        // TODO: enforce same stream type for all tracks in same audio session?
+        // TODO: prevent same audio session on different output threads
+        LOGV("createTrack() sessionId: %d", (sessionId == NULL) ? -2 : *sessionId);
+        if (sessionId != NULL && *sessionId != 0) {
+            lSessionId = *sessionId;
+        } else {
+            lSessionId = nextUniqueId();
+            if (sessionId != NULL) {
+                *sessionId = lSessionId;
+            }
+        }
+        LOGV("createTrack() lSessionId: %d", lSessionId);
+
+        track = thread->createTrack_l(client, streamType, sampleRate, format,
+                channelCount, frameCount, sharedBuffer, lSessionId, &lStatus);
+    }
+    if (lStatus == NO_ERROR) {
+        trackHandle = new TrackHandle(track);
+    } else {
+        // remove local strong reference to Client before deleting the Track so that the Client
+        // destructor is called by the TrackBase destructor with mLock held
+        client.clear();
+        track.clear();
+    }
+
+Exit:
+    if(status) {
+        *status = lStatus;
+    }
+    return trackHandle;
+}
+
+uint32_t AudioFlinger::sampleRate(int output) const
+{
+    Mutex::Autolock _l(mLock);
+    PlaybackThread *thread = checkPlaybackThread_l(output);
+    if (thread == NULL) {
+        LOGW("sampleRate() unknown thread %d", output);
+        return 0;
+    }
+    return thread->sampleRate();
+}
+
+int AudioFlinger::channelCount(int output) const
+{
+    Mutex::Autolock _l(mLock);
+    PlaybackThread *thread = checkPlaybackThread_l(output);
+    if (thread == NULL) {
+        LOGW("channelCount() unknown thread %d", output);
+        return 0;
+    }
+    return thread->channelCount();
+}
+
+int AudioFlinger::format(int output) const
+{
+    Mutex::Autolock _l(mLock);
+    PlaybackThread *thread = checkPlaybackThread_l(output);
+    if (thread == NULL) {
+        LOGW("format() unknown thread %d", output);
+        return 0;
+    }
+    return thread->format();
+}
+
+size_t AudioFlinger::frameCount(int output) const
+{
+    Mutex::Autolock _l(mLock);
+    PlaybackThread *thread = checkPlaybackThread_l(output);
+    if (thread == NULL) {
+        LOGW("frameCount() unknown thread %d", output);
+        return 0;
+    }
+    return thread->frameCount();
+}
+
+uint32_t AudioFlinger::latency(int output) const
+{
+    Mutex::Autolock _l(mLock);
+    PlaybackThread *thread = checkPlaybackThread_l(output);
+    if (thread == NULL) {
+        LOGW("latency() unknown thread %d", output);
+        return 0;
+    }
+    return thread->latency();
+}
+
+status_t AudioFlinger::setMasterVolume(float value)
+{
+    // check calling permissions
+    if (!settingsAllowed()) {
+        return PERMISSION_DENIED;
+    }
+
+    // when hw supports master volume, don't scale in sw mixer
+    AutoMutex lock(mHardwareLock);
+    mHardwareStatus = AUDIO_HW_SET_MASTER_VOLUME;
+    if (mAudioHardware->setMasterVolume(value) == NO_ERROR) {
+        value = 1.0f;
+    }
+    mHardwareStatus = AUDIO_HW_IDLE;
+
+    mMasterVolume = value;
+    for (uint32_t i = 0; i < mPlaybackThreads.size(); i++)
+       mPlaybackThreads.valueAt(i)->setMasterVolume(value);
+
+    return NO_ERROR;
+}
+
+status_t AudioFlinger::setMode(int mode)
+{
+    status_t ret;
+
+    // check calling permissions
+    if (!settingsAllowed()) {
+        return PERMISSION_DENIED;
+    }
+    if ((mode < 0) || (mode >= AudioSystem::NUM_MODES)) {
+        LOGW("Illegal value: setMode(%d)", mode);
+        return BAD_VALUE;
+    }
+
+    { // scope for the lock
+        AutoMutex lock(mHardwareLock);
+        mHardwareStatus = AUDIO_HW_SET_MODE;
+        ret = mAudioHardware->setMode(mode);
+        mHardwareStatus = AUDIO_HW_IDLE;
+    }
+
+    if (NO_ERROR == ret) {
+        Mutex::Autolock _l(mLock);
+        mMode = mode;
+        for (uint32_t i = 0; i < mPlaybackThreads.size(); i++)
+           mPlaybackThreads.valueAt(i)->setMode(mode);
+#ifdef LVMX
+        LifeVibes::setMode(mode);
+#endif
+    }
+
+    return ret;
+}
+
+status_t AudioFlinger::setMicMute(bool state)
+{
+    // check calling permissions
+    if (!settingsAllowed()) {
+        return PERMISSION_DENIED;
+    }
+
+    AutoMutex lock(mHardwareLock);
+    mHardwareStatus = AUDIO_HW_SET_MIC_MUTE;
+    status_t ret = mAudioHardware->setMicMute(state);
+    mHardwareStatus = AUDIO_HW_IDLE;
+    return ret;
+}
+
+bool AudioFlinger::getMicMute() const
+{
+    bool state = AudioSystem::MODE_INVALID;
+    mHardwareStatus = AUDIO_HW_GET_MIC_MUTE;
+    mAudioHardware->getMicMute(&state);
+    mHardwareStatus = AUDIO_HW_IDLE;
+    return state;
+}
+
+status_t AudioFlinger::setMasterMute(bool muted)
+{
+    // check calling permissions
+    if (!settingsAllowed()) {
+        return PERMISSION_DENIED;
+    }
+
+    mMasterMute = muted;
+    for (uint32_t i = 0; i < mPlaybackThreads.size(); i++)
+       mPlaybackThreads.valueAt(i)->setMasterMute(muted);
+
+    return NO_ERROR;
+}
+
+float AudioFlinger::masterVolume() const
+{
+    return mMasterVolume;
+}
+
+bool AudioFlinger::masterMute() const
+{
+    return mMasterMute;
+}
+
+status_t AudioFlinger::setStreamVolume(int stream, float value, int output)
+{
+    // check calling permissions
+    if (!settingsAllowed()) {
+        return PERMISSION_DENIED;
+    }
+
+    if (stream < 0 || uint32_t(stream) >= AudioSystem::NUM_STREAM_TYPES) {
+        return BAD_VALUE;
+    }
+
+    AutoMutex lock(mLock);
+    PlaybackThread *thread = NULL;
+    if (output) {
+        thread = checkPlaybackThread_l(output);
+        if (thread == NULL) {
+            return BAD_VALUE;
+        }
+    }
+
+    mStreamTypes[stream].volume = value;
+
+    if (thread == NULL) {
+        for (uint32_t i = 0; i < mPlaybackThreads.size(); i++) {
+           mPlaybackThreads.valueAt(i)->setStreamVolume(stream, value);
+        }
+    } else {
+        thread->setStreamVolume(stream, value);
+    }
+
+    return NO_ERROR;
+}
+
+status_t AudioFlinger::setStreamMute(int stream, bool muted)
+{
+    // check calling permissions
+    if (!settingsAllowed()) {
+        return PERMISSION_DENIED;
+    }
+
+    if (stream < 0 || uint32_t(stream) >= AudioSystem::NUM_STREAM_TYPES ||
+        uint32_t(stream) == AudioSystem::ENFORCED_AUDIBLE) {
+        return BAD_VALUE;
+    }
+
+    mStreamTypes[stream].mute = muted;
+    for (uint32_t i = 0; i < mPlaybackThreads.size(); i++)
+       mPlaybackThreads.valueAt(i)->setStreamMute(stream, muted);
+
+    return NO_ERROR;
+}
+
+float AudioFlinger::streamVolume(int stream, int output) const
+{
+    if (stream < 0 || uint32_t(stream) >= AudioSystem::NUM_STREAM_TYPES) {
+        return 0.0f;
+    }
+
+    AutoMutex lock(mLock);
+    float volume;
+    if (output) {
+        PlaybackThread *thread = checkPlaybackThread_l(output);
+        if (thread == NULL) {
+            return 0.0f;
+        }
+        volume = thread->streamVolume(stream);
+    } else {
+        volume = mStreamTypes[stream].volume;
+    }
+
+    return volume;
+}
+
+bool AudioFlinger::streamMute(int stream) const
+{
+    if (stream < 0 || stream >= (int)AudioSystem::NUM_STREAM_TYPES) {
+        return true;
+    }
+
+    return mStreamTypes[stream].mute;
+}
+
+bool AudioFlinger::isStreamActive(int stream) const
+{
+    Mutex::Autolock _l(mLock);
+    for (uint32_t i = 0; i < mPlaybackThreads.size(); i++) {
+        if (mPlaybackThreads.valueAt(i)->isStreamActive(stream)) {
+            return true;
+        }
+    }
+    return false;
+}
+
+status_t AudioFlinger::setParameters(int ioHandle, const String8& keyValuePairs)
+{
+    status_t result;
+
+    LOGV("setParameters(): io %d, keyvalue %s, tid %d, calling tid %d",
+            ioHandle, keyValuePairs.string(), gettid(), IPCThreadState::self()->getCallingPid());
+    // check calling permissions
+    if (!settingsAllowed()) {
+        return PERMISSION_DENIED;
+    }
+
+#ifdef LVMX
+    AudioParameter param = AudioParameter(keyValuePairs);
+    LifeVibes::setParameters(ioHandle,keyValuePairs);
+    String8 key = String8(AudioParameter::keyRouting);
+    int device;
+    if (NO_ERROR != param.getInt(key, device)) {
+        device = -1;
+    }
+
+    key = String8(LifevibesTag);
+    String8 value;
+    int musicEnabled = -1;
+    if (NO_ERROR == param.get(key, value)) {
+        if (value == LifevibesEnable) {
+            mLifeVibesClientPid = IPCThreadState::self()->getCallingPid();
+            musicEnabled = 1;
+        } else if (value == LifevibesDisable) {
+            mLifeVibesClientPid = -1;
+            musicEnabled = 0;
+        }
+    }
+#endif
+
+    // ioHandle == 0 means the parameters are global to the audio hardware interface
+    if (ioHandle == 0) {
+        AutoMutex lock(mHardwareLock);
+        mHardwareStatus = AUDIO_SET_PARAMETER;
+        result = mAudioHardware->setParameters(keyValuePairs);
+#ifdef LVMX
+        if (musicEnabled != -1) {
+            LifeVibes::enableMusic((bool) musicEnabled);
+        }
+#endif
+        mHardwareStatus = AUDIO_HW_IDLE;
+        return result;
+    }
+
+    // hold a strong ref on thread in case closeOutput() or closeInput() is called
+    // and the thread is exited once the lock is released
+    sp<ThreadBase> thread;
+    {
+        Mutex::Autolock _l(mLock);
+        thread = checkPlaybackThread_l(ioHandle);
+        if (thread == NULL) {
+            thread = checkRecordThread_l(ioHandle);
+        }
+    }
+    if (thread != NULL) {
+        result = thread->setParameters(keyValuePairs);
+#ifdef LVMX
+        if ((NO_ERROR == result) && (device != -1)) {
+            LifeVibes::setDevice(LifeVibes::threadIdToAudioOutputType(thread->id()), device);
+        }
+#endif
+        return result;
+    }
+    return BAD_VALUE;
+}
+
+String8 AudioFlinger::getParameters(int ioHandle, const String8& keys)
+{
+//    LOGV("getParameters() io %d, keys %s, tid %d, calling tid %d",
+//            ioHandle, keys.string(), gettid(), IPCThreadState::self()->getCallingPid());
+
+    if (ioHandle == 0) {
+        return mAudioHardware->getParameters(keys);
+    }
+
+    Mutex::Autolock _l(mLock);
+
+    PlaybackThread *playbackThread = checkPlaybackThread_l(ioHandle);
+    if (playbackThread != NULL) {
+        return playbackThread->getParameters(keys);
+    }
+    RecordThread *recordThread = checkRecordThread_l(ioHandle);
+    if (recordThread != NULL) {
+        return recordThread->getParameters(keys);
+    }
+    return String8("");
+}
+
+size_t AudioFlinger::getInputBufferSize(uint32_t sampleRate, int format, int channelCount)
+{
+    return mAudioHardware->getInputBufferSize(sampleRate, format, channelCount);
+}
+
+unsigned int AudioFlinger::getInputFramesLost(int ioHandle)
+{
+    if (ioHandle == 0) {
+        return 0;
+    }
+
+    Mutex::Autolock _l(mLock);
+
+    RecordThread *recordThread = checkRecordThread_l(ioHandle);
+    if (recordThread != NULL) {
+        return recordThread->getInputFramesLost();
+    }
+    return 0;
+}
+
+status_t AudioFlinger::setVoiceVolume(float value)
+{
+    // check calling permissions
+    if (!settingsAllowed()) {
+        return PERMISSION_DENIED;
+    }
+
+    AutoMutex lock(mHardwareLock);
+    mHardwareStatus = AUDIO_SET_VOICE_VOLUME;
+    status_t ret = mAudioHardware->setVoiceVolume(value);
+    mHardwareStatus = AUDIO_HW_IDLE;
+
+    return ret;
+}
+
+status_t AudioFlinger::getRenderPosition(uint32_t *halFrames, uint32_t *dspFrames, int output)
+{
+    status_t status;
+
+    Mutex::Autolock _l(mLock);
+
+    PlaybackThread *playbackThread = checkPlaybackThread_l(output);
+    if (playbackThread != NULL) {
+        return playbackThread->getRenderPosition(halFrames, dspFrames);
+    }
+
+    return BAD_VALUE;
+}
+
+void AudioFlinger::registerClient(const sp<IAudioFlingerClient>& client)
+{
+
+    Mutex::Autolock _l(mLock);
+
+    int pid = IPCThreadState::self()->getCallingPid();
+    if (mNotificationClients.indexOfKey(pid) < 0) {
+        sp<NotificationClient> notificationClient = new NotificationClient(this,
+                                                                            client,
+                                                                            pid);
+        LOGV("registerClient() client %p, pid %d", notificationClient.get(), pid);
+
+        mNotificationClients.add(pid, notificationClient);
+
+        sp<IBinder> binder = client->asBinder();
+        binder->linkToDeath(notificationClient);
+
+        // the config change is always sent from playback or record threads to avoid deadlock
+        // with AudioSystem::gLock
+        for (size_t i = 0; i < mPlaybackThreads.size(); i++) {
+            mPlaybackThreads.valueAt(i)->sendConfigEvent(AudioSystem::OUTPUT_OPENED);
+        }
+
+        for (size_t i = 0; i < mRecordThreads.size(); i++) {
+            mRecordThreads.valueAt(i)->sendConfigEvent(AudioSystem::INPUT_OPENED);
+        }
+    }
+}
+
+void AudioFlinger::removeNotificationClient(pid_t pid)
+{
+    Mutex::Autolock _l(mLock);
+
+    int index = mNotificationClients.indexOfKey(pid);
+    if (index >= 0) {
+        sp <NotificationClient> client = mNotificationClients.valueFor(pid);
+        LOGV("removeNotificationClient() %p, pid %d", client.get(), pid);
+#ifdef LVMX
+        if (pid == mLifeVibesClientPid) {
+            LOGV("Disabling lifevibes");
+            LifeVibes::enableMusic(false);
+            mLifeVibesClientPid = -1;
+        }
+#endif
+        mNotificationClients.removeItem(pid);
+    }
+}
+
+// audioConfigChanged_l() must be called with AudioFlinger::mLock held
+void AudioFlinger::audioConfigChanged_l(int event, int ioHandle, void *param2)
+{
+    size_t size = mNotificationClients.size();
+    for (size_t i = 0; i < size; i++) {
+        mNotificationClients.valueAt(i)->client()->ioConfigChanged(event, ioHandle, param2);
+    }
+}
+
+// removeClient_l() must be called with AudioFlinger::mLock held
+void AudioFlinger::removeClient_l(pid_t pid)
+{
+    LOGV("removeClient_l() pid %d, tid %d, calling tid %d", pid, gettid(), IPCThreadState::self()->getCallingPid());
+    mClients.removeItem(pid);
+}
+
+
+// ----------------------------------------------------------------------------
+
+AudioFlinger::ThreadBase::ThreadBase(const sp<AudioFlinger>& audioFlinger, int id)
+    :   Thread(false),
+        mAudioFlinger(audioFlinger), mSampleRate(0), mFrameCount(0), mChannelCount(0),
+        mFrameSize(1), mFormat(0), mStandby(false), mId(id), mExiting(false)
+{
+}
+
+AudioFlinger::ThreadBase::~ThreadBase()
+{
+    mParamCond.broadcast();
+    mNewParameters.clear();
+}
+
+void AudioFlinger::ThreadBase::exit()
+{
+    // keep a strong ref on ourself so that we wont get
+    // destroyed in the middle of requestExitAndWait()
+    sp <ThreadBase> strongMe = this;
+
+    LOGV("ThreadBase::exit");
+    {
+        AutoMutex lock(&mLock);
+        mExiting = true;
+        requestExit();
+        mWaitWorkCV.signal();
+    }
+    requestExitAndWait();
+}
+
+uint32_t AudioFlinger::ThreadBase::sampleRate() const
+{
+    return mSampleRate;
+}
+
+int AudioFlinger::ThreadBase::channelCount() const
+{
+    return (int)mChannelCount;
+}
+
+int AudioFlinger::ThreadBase::format() const
+{
+    return mFormat;
+}
+
+size_t AudioFlinger::ThreadBase::frameCount() const
+{
+    return mFrameCount;
+}
+
+status_t AudioFlinger::ThreadBase::setParameters(const String8& keyValuePairs)
+{
+    status_t status;
+
+    LOGV("ThreadBase::setParameters() %s", keyValuePairs.string());
+    Mutex::Autolock _l(mLock);
+
+    mNewParameters.add(keyValuePairs);
+    mWaitWorkCV.signal();
+    // wait condition with timeout in case the thread loop has exited
+    // before the request could be processed
+    if (mParamCond.waitRelative(mLock, seconds(2)) == NO_ERROR) {
+        status = mParamStatus;
+        mWaitWorkCV.signal();
+    } else {
+        status = TIMED_OUT;
+    }
+    return status;
+}
+
+void AudioFlinger::ThreadBase::sendConfigEvent(int event, int param)
+{
+    Mutex::Autolock _l(mLock);
+    sendConfigEvent_l(event, param);
+}
+
+// sendConfigEvent_l() must be called with ThreadBase::mLock held
+void AudioFlinger::ThreadBase::sendConfigEvent_l(int event, int param)
+{
+    ConfigEvent *configEvent = new ConfigEvent();
+    configEvent->mEvent = event;
+    configEvent->mParam = param;
+    mConfigEvents.add(configEvent);
+    LOGV("sendConfigEvent() num events %d event %d, param %d", mConfigEvents.size(), event, param);
+    mWaitWorkCV.signal();
+}
+
+void AudioFlinger::ThreadBase::processConfigEvents()
+{
+    mLock.lock();
+    while(!mConfigEvents.isEmpty()) {
+        LOGV("processConfigEvents() remaining events %d", mConfigEvents.size());
+        ConfigEvent *configEvent = mConfigEvents[0];
+        mConfigEvents.removeAt(0);
+        // release mLock before locking AudioFlinger mLock: lock order is always
+        // AudioFlinger then ThreadBase to avoid cross deadlock
+        mLock.unlock();
+        mAudioFlinger->mLock.lock();
+        audioConfigChanged_l(configEvent->mEvent, configEvent->mParam);
+        mAudioFlinger->mLock.unlock();
+        delete configEvent;
+        mLock.lock();
+    }
+    mLock.unlock();
+}
+
+status_t AudioFlinger::ThreadBase::dumpBase(int fd, const Vector<String16>& args)
+{
+    const size_t SIZE = 256;
+    char buffer[SIZE];
+    String8 result;
+
+    bool locked = tryLock(mLock);
+    if (!locked) {
+        snprintf(buffer, SIZE, "thread %p maybe dead locked\n", this);
+        write(fd, buffer, strlen(buffer));
+    }
+
+    snprintf(buffer, SIZE, "standby: %d\n", mStandby);
+    result.append(buffer);
+    snprintf(buffer, SIZE, "Sample rate: %d\n", mSampleRate);
+    result.append(buffer);
+    snprintf(buffer, SIZE, "Frame count: %d\n", mFrameCount);
+    result.append(buffer);
+    snprintf(buffer, SIZE, "Channel Count: %d\n", mChannelCount);
+    result.append(buffer);
+    snprintf(buffer, SIZE, "Format: %d\n", mFormat);
+    result.append(buffer);
+    snprintf(buffer, SIZE, "Frame size: %d\n", mFrameSize);
+    result.append(buffer);
+
+    snprintf(buffer, SIZE, "\nPending setParameters commands: \n");
+    result.append(buffer);
+    result.append(" Index Command");
+    for (size_t i = 0; i < mNewParameters.size(); ++i) {
+        snprintf(buffer, SIZE, "\n %02d    ", i);
+        result.append(buffer);
+        result.append(mNewParameters[i]);
+    }
+
+    snprintf(buffer, SIZE, "\n\nPending config events: \n");
+    result.append(buffer);
+    snprintf(buffer, SIZE, " Index event param\n");
+    result.append(buffer);
+    for (size_t i = 0; i < mConfigEvents.size(); i++) {
+        snprintf(buffer, SIZE, " %02d    %02d    %d\n", i, mConfigEvents[i]->mEvent, mConfigEvents[i]->mParam);
+        result.append(buffer);
+    }
+    result.append("\n");
+
+    write(fd, result.string(), result.size());
+
+    if (locked) {
+        mLock.unlock();
+    }
+    return NO_ERROR;
+}
+
+
+// ----------------------------------------------------------------------------
+
+AudioFlinger::PlaybackThread::PlaybackThread(const sp<AudioFlinger>& audioFlinger, AudioStreamOut* output, int id, uint32_t device)
+    :   ThreadBase(audioFlinger, id),
+        mMixBuffer(0), mSuspended(0), mBytesWritten(0), mOutput(output),
+        mLastWriteTime(0), mNumWrites(0), mNumDelayedWrites(0), mInWrite(false),
+        mDevice(device)
+{
+    readOutputParameters();
+
+    mMasterVolume = mAudioFlinger->masterVolume();
+    mMasterMute = mAudioFlinger->masterMute();
+
+    for (int stream = 0; stream < AudioSystem::NUM_STREAM_TYPES; stream++) {
+        mStreamTypes[stream].volume = mAudioFlinger->streamVolumeInternal(stream);
+        mStreamTypes[stream].mute = mAudioFlinger->streamMute(stream);
+    }
+}
+
+AudioFlinger::PlaybackThread::~PlaybackThread()
+{
+    delete [] mMixBuffer;
+}
+
+status_t AudioFlinger::PlaybackThread::dump(int fd, const Vector<String16>& args)
+{
+    dumpInternals(fd, args);
+    dumpTracks(fd, args);
+    dumpEffectChains(fd, args);
+    return NO_ERROR;
+}
+
+status_t AudioFlinger::PlaybackThread::dumpTracks(int fd, const Vector<String16>& args)
+{
+    const size_t SIZE = 256;
+    char buffer[SIZE];
+    String8 result;
+
+    snprintf(buffer, SIZE, "Output thread %p tracks\n", this);
+    result.append(buffer);
+    result.append("   Name  Clien Typ Fmt Chn Session Buf  S M F SRate LeftV RighV  Serv       User       Main buf   Aux Buf\n");
+    for (size_t i = 0; i < mTracks.size(); ++i) {
+        sp<Track> track = mTracks[i];
+        if (track != 0) {
+            track->dump(buffer, SIZE);
+            result.append(buffer);
+        }
+    }
+
+    snprintf(buffer, SIZE, "Output thread %p active tracks\n", this);
+    result.append(buffer);
+    result.append("   Name  Clien Typ Fmt Chn Session Buf  S M F SRate LeftV RighV  Serv       User       Main buf   Aux Buf\n");
+    for (size_t i = 0; i < mActiveTracks.size(); ++i) {
+        wp<Track> wTrack = mActiveTracks[i];
+        if (wTrack != 0) {
+            sp<Track> track = wTrack.promote();
+            if (track != 0) {
+                track->dump(buffer, SIZE);
+                result.append(buffer);
+            }
+        }
+    }
+    write(fd, result.string(), result.size());
+    return NO_ERROR;
+}
+
+status_t AudioFlinger::PlaybackThread::dumpEffectChains(int fd, const Vector<String16>& args)
+{
+    const size_t SIZE = 256;
+    char buffer[SIZE];
+    String8 result;
+
+    snprintf(buffer, SIZE, "\n- %d Effect Chains:\n", mEffectChains.size());
+    write(fd, buffer, strlen(buffer));
+
+    for (size_t i = 0; i < mEffectChains.size(); ++i) {
+        sp<EffectChain> chain = mEffectChains[i];
+        if (chain != 0) {
+            chain->dump(fd, args);
+        }
+    }
+    return NO_ERROR;
+}
+
+status_t AudioFlinger::PlaybackThread::dumpInternals(int fd, const Vector<String16>& args)
+{
+    const size_t SIZE = 256;
+    char buffer[SIZE];
+    String8 result;
+
+    snprintf(buffer, SIZE, "\nOutput thread %p internals\n", this);
+    result.append(buffer);
+    snprintf(buffer, SIZE, "last write occurred (msecs): %llu\n", ns2ms(systemTime() - mLastWriteTime));
+    result.append(buffer);
+    snprintf(buffer, SIZE, "total writes: %d\n", mNumWrites);
+    result.append(buffer);
+    snprintf(buffer, SIZE, "delayed writes: %d\n", mNumDelayedWrites);
+    result.append(buffer);
+    snprintf(buffer, SIZE, "blocked in write: %d\n", mInWrite);
+    result.append(buffer);
+    snprintf(buffer, SIZE, "suspend count: %d\n", mSuspended);
+    result.append(buffer);
+    snprintf(buffer, SIZE, "mix buffer : %p\n", mMixBuffer);
+    result.append(buffer);
+    write(fd, result.string(), result.size());
+
+    dumpBase(fd, args);
+
+    return NO_ERROR;
+}
+
+// Thread virtuals
+status_t AudioFlinger::PlaybackThread::readyToRun()
+{
+    if (mSampleRate == 0) {
+        LOGE("No working audio driver found.");
+        return NO_INIT;
+    }
+    LOGI("AudioFlinger's thread %p ready to run", this);
+    return NO_ERROR;
+}
+
+void AudioFlinger::PlaybackThread::onFirstRef()
+{
+    const size_t SIZE = 256;
+    char buffer[SIZE];
+
+    snprintf(buffer, SIZE, "Playback Thread %p", this);
+
+    run(buffer, ANDROID_PRIORITY_URGENT_AUDIO);
+}
+
+// PlaybackThread::createTrack_l() must be called with AudioFlinger::mLock held
+sp<AudioFlinger::PlaybackThread::Track>  AudioFlinger::PlaybackThread::createTrack_l(
+        const sp<AudioFlinger::Client>& client,
+        int streamType,
+        uint32_t sampleRate,
+        int format,
+        int channelCount,
+        int frameCount,
+        const sp<IMemory>& sharedBuffer,
+        int sessionId,
+        status_t *status)
+{
+    sp<Track> track;
+    status_t lStatus;
+
+    if (mType == DIRECT) {
+        if (sampleRate != mSampleRate || format != mFormat || channelCount != (int)mChannelCount) {
+            LOGE("createTrack_l() Bad parameter:  sampleRate %d format %d, channelCount %d for output %p",
+                 sampleRate, format, channelCount, mOutput);
+            lStatus = BAD_VALUE;
+            goto Exit;
+        }
+    } else {
+        // Resampler implementation limits input sampling rate to 2 x output sampling rate.
+        if (sampleRate > mSampleRate*2) {
+            LOGE("Sample rate out of range: %d mSampleRate %d", sampleRate, mSampleRate);
+            lStatus = BAD_VALUE;
+            goto Exit;
+        }
+    }
+
+    if (mOutput == 0) {
+        LOGE("Audio driver not initialized.");
+        lStatus = NO_INIT;
+        goto Exit;
+    }
+
+    { // scope for mLock
+        Mutex::Autolock _l(mLock);
+        track = new Track(this, client, streamType, sampleRate, format,
+                channelCount, frameCount, sharedBuffer, sessionId);
+        if (track->getCblk() == NULL || track->name() < 0) {
+            lStatus = NO_MEMORY;
+            goto Exit;
+        }
+        mTracks.add(track);
+
+        sp<EffectChain> chain = getEffectChain_l(sessionId);
+        if (chain != 0) {
+            LOGV("createTrack_l() setting main buffer %p", chain->inBuffer());
+            track->setMainBuffer(chain->inBuffer());
+        }
+    }
+    lStatus = NO_ERROR;
+
+Exit:
+    if(status) {
+        *status = lStatus;
+    }
+    return track;
+}
+
+uint32_t AudioFlinger::PlaybackThread::latency() const
+{
+    if (mOutput) {
+        return mOutput->latency();
+    }
+    else {
+        return 0;
+    }
+}
+
+status_t AudioFlinger::PlaybackThread::setMasterVolume(float value)
+{
+#ifdef LVMX
+    int audioOutputType = LifeVibes::getMixerType(mId, mType);
+    if (LifeVibes::audioOutputTypeIsLifeVibes(audioOutputType)) {
+        LifeVibes::setMasterVolume(audioOutputType, value);
+    }
+#endif
+    mMasterVolume = value;
+    return NO_ERROR;
+}
+
+status_t AudioFlinger::PlaybackThread::setMasterMute(bool muted)
+{
+#ifdef LVMX
+    int audioOutputType = LifeVibes::getMixerType(mId, mType);
+    if (LifeVibes::audioOutputTypeIsLifeVibes(audioOutputType)) {
+        LifeVibes::setMasterMute(audioOutputType, muted);
+    }
+#endif
+    mMasterMute = muted;
+    return NO_ERROR;
+}
+
+float AudioFlinger::PlaybackThread::masterVolume() const
+{
+    return mMasterVolume;
+}
+
+bool AudioFlinger::PlaybackThread::masterMute() const
+{
+    return mMasterMute;
+}
+
+status_t AudioFlinger::PlaybackThread::setStreamVolume(int stream, float value)
+{
+#ifdef LVMX
+    int audioOutputType = LifeVibes::getMixerType(mId, mType);
+    if (LifeVibes::audioOutputTypeIsLifeVibes(audioOutputType)) {
+        LifeVibes::setStreamVolume(audioOutputType, stream, value);
+    }
+#endif
+    mStreamTypes[stream].volume = value;
+    return NO_ERROR;
+}
+
+status_t AudioFlinger::PlaybackThread::setStreamMute(int stream, bool muted)
+{
+#ifdef LVMX
+    int audioOutputType = LifeVibes::getMixerType(mId, mType);
+    if (LifeVibes::audioOutputTypeIsLifeVibes(audioOutputType)) {
+        LifeVibes::setStreamMute(audioOutputType, stream, muted);
+    }
+#endif
+    mStreamTypes[stream].mute = muted;
+    return NO_ERROR;
+}
+
+float AudioFlinger::PlaybackThread::streamVolume(int stream) const
+{
+    return mStreamTypes[stream].volume;
+}
+
+bool AudioFlinger::PlaybackThread::streamMute(int stream) const
+{
+    return mStreamTypes[stream].mute;
+}
+
+bool AudioFlinger::PlaybackThread::isStreamActive(int stream) const
+{
+    Mutex::Autolock _l(mLock);
+    size_t count = mActiveTracks.size();
+    for (size_t i = 0 ; i < count ; ++i) {
+        sp<Track> t = mActiveTracks[i].promote();
+        if (t == 0) continue;
+        Track* const track = t.get();
+        if (t->type() == stream)
+            return true;
+    }
+    return false;
+}
+
+// addTrack_l() must be called with ThreadBase::mLock held
+status_t AudioFlinger::PlaybackThread::addTrack_l(const sp<Track>& track)
+{
+    status_t status = ALREADY_EXISTS;
+
+    // set retry count for buffer fill
+    track->mRetryCount = kMaxTrackStartupRetries;
+    if (mActiveTracks.indexOf(track) < 0) {
+        // the track is newly added, make sure it fills up all its
+        // buffers before playing. This is to ensure the client will
+        // effectively get the latency it requested.
+        track->mFillingUpStatus = Track::FS_FILLING;
+        track->mResetDone = false;
+        mActiveTracks.add(track);
+        if (track->mainBuffer() != mMixBuffer) {
+            sp<EffectChain> chain = getEffectChain_l(track->sessionId());
+            if (chain != 0) {
+                LOGV("addTrack_l() starting track on chain %p for session %d", chain.get(), track->sessionId());
+                chain->startTrack();
+            }
+        }
+
+        status = NO_ERROR;
+    }
+
+    LOGV("mWaitWorkCV.broadcast");
+    mWaitWorkCV.broadcast();
+
+    return status;
+}
+
+// destroyTrack_l() must be called with ThreadBase::mLock held
+void AudioFlinger::PlaybackThread::destroyTrack_l(const sp<Track>& track)
+{
+    track->mState = TrackBase::TERMINATED;
+    if (mActiveTracks.indexOf(track) < 0) {
+        mTracks.remove(track);
+        deleteTrackName_l(track->name());
+    }
+}
+
+String8 AudioFlinger::PlaybackThread::getParameters(const String8& keys)
+{
+    return mOutput->getParameters(keys);
+}
+
+// destroyTrack_l() must be called with AudioFlinger::mLock held
+void AudioFlinger::PlaybackThread::audioConfigChanged_l(int event, int param) {
+    AudioSystem::OutputDescriptor desc;
+    void *param2 = 0;
+
+    LOGV("PlaybackThread::audioConfigChanged_l, thread %p, event %d, param %d", this, event, param);
+
+    switch (event) {
+    case AudioSystem::OUTPUT_OPENED:
+    case AudioSystem::OUTPUT_CONFIG_CHANGED:
+        desc.channels = mChannels;
+        desc.samplingRate = mSampleRate;
+        desc.format = mFormat;
+        desc.frameCount = mFrameCount;
+        desc.latency = latency();
+        param2 = &desc;
+        break;
+
+    case AudioSystem::STREAM_CONFIG_CHANGED:
+        param2 = &param;
+    case AudioSystem::OUTPUT_CLOSED:
+    default:
+        break;
+    }
+    mAudioFlinger->audioConfigChanged_l(event, mId, param2);
+}
+
+void AudioFlinger::PlaybackThread::readOutputParameters()
+{
+    mSampleRate = mOutput->sampleRate();
+    mChannels = mOutput->channels();
+    mChannelCount = (uint16_t)AudioSystem::popCount(mChannels);
+    mFormat = mOutput->format();
+    mFrameSize = (uint16_t)mOutput->frameSize();
+    mFrameCount = mOutput->bufferSize() / mFrameSize;
+
+    // FIXME - Current mixer implementation only supports stereo output: Always
+    // Allocate a stereo buffer even if HW output is mono.
+    if (mMixBuffer != NULL) delete[] mMixBuffer;
+    mMixBuffer = new int16_t[mFrameCount * 2];
+    memset(mMixBuffer, 0, mFrameCount * 2 * sizeof(int16_t));
+
+    //TODO handle effects reconfig
+}
+
+status_t AudioFlinger::PlaybackThread::getRenderPosition(uint32_t *halFrames, uint32_t *dspFrames)
+{
+    if (halFrames == 0 || dspFrames == 0) {
+        return BAD_VALUE;
+    }
+    if (mOutput == 0) {
+        return INVALID_OPERATION;
+    }
+    *halFrames = mBytesWritten/mOutput->frameSize();
+
+    return mOutput->getRenderPosition(dspFrames);
+}
+
+bool AudioFlinger::PlaybackThread::hasAudioSession(int sessionId)
+{
+    Mutex::Autolock _l(mLock);
+    if (getEffectChain_l(sessionId) != 0) {
+        return true;
+    }
+
+    for (size_t i = 0; i < mTracks.size(); ++i) {
+        sp<Track> track = mTracks[i];
+        if (sessionId == track->sessionId()) {
+            return true;
+        }
+    }
+
+    return false;
+}
+
+sp<AudioFlinger::EffectChain> AudioFlinger::PlaybackThread::getEffectChain(int sessionId)
+{
+    Mutex::Autolock _l(mLock);
+    return getEffectChain_l(sessionId);
+}
+
+sp<AudioFlinger::EffectChain> AudioFlinger::PlaybackThread::getEffectChain_l(int sessionId)
+{
+    sp<EffectChain> chain;
+
+    size_t size = mEffectChains.size();
+    for (size_t i = 0; i < size; i++) {
+        if (mEffectChains[i]->sessionId() == sessionId) {
+            chain = mEffectChains[i];
+            break;
+        }
+    }
+    return chain;
+}
+
+void AudioFlinger::PlaybackThread::setMode(uint32_t mode)
+{
+    Mutex::Autolock _l(mLock);
+    size_t size = mEffectChains.size();
+    for (size_t i = 0; i < size; i++) {
+        mEffectChains[i]->setMode_l(mode);
+    }
+}
+
+// ----------------------------------------------------------------------------
+
+AudioFlinger::MixerThread::MixerThread(const sp<AudioFlinger>& audioFlinger, AudioStreamOut* output, int id, uint32_t device)
+    :   PlaybackThread(audioFlinger, output, id, device),
+        mAudioMixer(0)
+{
+    mType = PlaybackThread::MIXER;
+    mAudioMixer = new AudioMixer(mFrameCount, mSampleRate);
+
+    // FIXME - Current mixer implementation only supports stereo output
+    if (mChannelCount == 1) {
+        LOGE("Invalid audio hardware channel count");
+    }
+}
+
+AudioFlinger::MixerThread::~MixerThread()
+{
+    delete mAudioMixer;
+}
+
+bool AudioFlinger::MixerThread::threadLoop()
+{
+    Vector< sp<Track> > tracksToRemove;
+    uint32_t mixerStatus = MIXER_IDLE;
+    nsecs_t standbyTime = systemTime();
+    size_t mixBufferSize = mFrameCount * mFrameSize;
+    // FIXME: Relaxed timing because of a certain device that can't meet latency
+    // Should be reduced to 2x after the vendor fixes the driver issue
+    nsecs_t maxPeriod = seconds(mFrameCount) / mSampleRate * 3;
+    nsecs_t lastWarning = 0;
+    bool longStandbyExit = false;
+    uint32_t activeSleepTime = activeSleepTimeUs();
+    uint32_t idleSleepTime = idleSleepTimeUs();
+    uint32_t sleepTime = idleSleepTime;
+    Vector< sp<EffectChain> > effectChains;
+
+    while (!exitPending())
+    {
+        processConfigEvents();
+
+        mixerStatus = MIXER_IDLE;
+        { // scope for mLock
+
+            Mutex::Autolock _l(mLock);
+
+            if (checkForNewParameters_l()) {
+                mixBufferSize = mFrameCount * mFrameSize;
+                // FIXME: Relaxed timing because of a certain device that can't meet latency
+                // Should be reduced to 2x after the vendor fixes the driver issue
+                maxPeriod = seconds(mFrameCount) / mSampleRate * 3;
+                activeSleepTime = activeSleepTimeUs();
+                idleSleepTime = idleSleepTimeUs();
+            }
+
+            const SortedVector< wp<Track> >& activeTracks = mActiveTracks;
+
+            // put audio hardware into standby after short delay
+            if UNLIKELY((!activeTracks.size() && systemTime() > standbyTime) ||
+                        mSuspended) {
+                if (!mStandby) {
+                    LOGV("Audio hardware entering standby, mixer %p, mSuspended %d\n", this, mSuspended);
+                    mOutput->standby();
+                    mStandby = true;
+                    mBytesWritten = 0;
+                }
+
+                if (!activeTracks.size() && mConfigEvents.isEmpty()) {
+                    // we're about to wait, flush the binder command buffer
+                    IPCThreadState::self()->flushCommands();
+
+                    if (exitPending()) break;
+
+                    // wait until we have something to do...
+                    LOGV("MixerThread %p TID %d going to sleep\n", this, gettid());
+                    mWaitWorkCV.wait(mLock);
+                    LOGV("MixerThread %p TID %d waking up\n", this, gettid());
+
+                    if (mMasterMute == false) {
+                        char value[PROPERTY_VALUE_MAX];
+                        property_get("ro.audio.silent", value, "0");
+                        if (atoi(value)) {
+                            LOGD("Silence is golden");
+                            setMasterMute(true);
+                        }
+                    }
+
+                    standbyTime = systemTime() + kStandbyTimeInNsecs;
+                    sleepTime = idleSleepTime;
+                    continue;
+                }
+            }
+
+            mixerStatus = prepareTracks_l(activeTracks, &tracksToRemove);
+
+            // prevent any changes in effect chain list and in each effect chain
+            // during mixing and effect process as the audio buffers could be deleted
+            // or modified if an effect is created or deleted
+            lockEffectChains_l();
+            effectChains = mEffectChains;
+       }
+
+        if (LIKELY(mixerStatus == MIXER_TRACKS_READY)) {
+            // mix buffers...
+            mAudioMixer->process();
+            sleepTime = 0;
+            standbyTime = systemTime() + kStandbyTimeInNsecs;
+            //TODO: delay standby when effects have a tail
+        } else {
+            // If no tracks are ready, sleep once for the duration of an output
+            // buffer size, then write 0s to the output
+            if (sleepTime == 0) {
+                if (mixerStatus == MIXER_TRACKS_ENABLED) {
+                    sleepTime = activeSleepTime;
+                } else {
+                    sleepTime = idleSleepTime;
+                }
+            } else if (mBytesWritten != 0 ||
+                       (mixerStatus == MIXER_TRACKS_ENABLED && longStandbyExit)) {
+                memset (mMixBuffer, 0, mixBufferSize);
+                sleepTime = 0;
+                LOGV_IF((mBytesWritten == 0 && (mixerStatus == MIXER_TRACKS_ENABLED && longStandbyExit)), "anticipated start");
+            }
+            // TODO add standby time extension fct of effect tail
+        }
+
+        if (mSuspended) {
+            sleepTime = idleSleepTime;
+        }
+        // sleepTime == 0 means we must write to audio hardware
+        if (sleepTime == 0) {
+             for (size_t i = 0; i < effectChains.size(); i ++) {
+                 effectChains[i]->process_l();
+             }
+             // enable changes in effect chain
+             unlockEffectChains();
+#ifdef LVMX
+            int audioOutputType = LifeVibes::getMixerType(mId, mType);
+            if (LifeVibes::audioOutputTypeIsLifeVibes(audioOutputType)) {
+               LifeVibes::process(audioOutputType, mMixBuffer, mixBufferSize);
+            }
+#endif
+            mLastWriteTime = systemTime();
+            mInWrite = true;
+            mBytesWritten += mixBufferSize;
+
+            int bytesWritten = (int)mOutput->write(mMixBuffer, mixBufferSize);
+            if (bytesWritten < 0) mBytesWritten -= mixBufferSize;
+            mNumWrites++;
+            mInWrite = false;
+            nsecs_t now = systemTime();
+            nsecs_t delta = now - mLastWriteTime;
+            if (delta > maxPeriod) {
+                mNumDelayedWrites++;
+                if ((now - lastWarning) > kWarningThrottle) {
+                    LOGW("write blocked for %llu msecs, %d delayed writes, thread %p",
+                            ns2ms(delta), mNumDelayedWrites, this);
+                    lastWarning = now;
+                }
+                if (mStandby) {
+                    longStandbyExit = true;
+                }
+            }
+            mStandby = false;
+        } else {
+            // enable changes in effect chain
+            unlockEffectChains();
+            usleep(sleepTime);
+        }
+
+        // finally let go of all our tracks, without the lock held
+        // since we can't guarantee the destructors won't acquire that
+        // same lock.
+        tracksToRemove.clear();
+
+        // Effect chains will be actually deleted here if they were removed from
+        // mEffectChains list during mixing or effects processing
+        effectChains.clear();
+    }
+
+    if (!mStandby) {
+        mOutput->standby();
+    }
+
+    LOGV("MixerThread %p exiting", this);
+    return false;
+}
+
+// prepareTracks_l() must be called with ThreadBase::mLock held
+uint32_t AudioFlinger::MixerThread::prepareTracks_l(const SortedVector< wp<Track> >& activeTracks, Vector< sp<Track> > *tracksToRemove)
+{
+
+    uint32_t mixerStatus = MIXER_IDLE;
+    // find out which tracks need to be processed
+    size_t count = activeTracks.size();
+    size_t mixedTracks = 0;
+    size_t tracksWithEffect = 0;
+
+    float masterVolume = mMasterVolume;
+    bool  masterMute = mMasterMute;
+
+#ifdef LVMX
+    bool tracksConnectedChanged = false;
+    bool stateChanged = false;
+
+    int audioOutputType = LifeVibes::getMixerType(mId, mType);
+    if (LifeVibes::audioOutputTypeIsLifeVibes(audioOutputType))
+    {
+        int activeTypes = 0;
+        for (size_t i=0 ; i<count ; i++) {
+            sp<Track> t = activeTracks[i].promote();
+            if (t == 0) continue;
+            Track* const track = t.get();
+            int iTracktype=track->type();
+            activeTypes |= 1<<track->type();
+        }
+        LifeVibes::computeVolumes(audioOutputType, activeTypes, tracksConnectedChanged, stateChanged, masterVolume, masterMute);
+    }
+#endif
+    // Delegate master volume control to effect in output mix effect chain if needed
+    sp<EffectChain> chain = getEffectChain_l(0);
+    if (chain != 0) {
+        uint32_t v = (uint32_t)(masterVolume * (1 << 24));
+        chain->setVolume_l(&v, &v);
+        masterVolume = (float)((v + (1 << 23)) >> 24);
+        chain.clear();
+    }
+
+    for (size_t i=0 ; i<count ; i++) {
+        sp<Track> t = activeTracks[i].promote();
+        if (t == 0) continue;
+
+        Track* const track = t.get();
+        audio_track_cblk_t* cblk = track->cblk();
+
+        // The first time a track is added we wait
+        // for all its buffers to be filled before processing it
+        mAudioMixer->setActiveTrack(track->name());
+        if (cblk->framesReady() && (track->isReady() || track->isStopped()) &&
+                !track->isPaused() && !track->isTerminated())
+        {
+            //LOGV("track %d u=%08x, s=%08x [OK] on thread %p", track->name(), cblk->user, cblk->server, this);
+
+            mixedTracks++;
+
+            // track->mainBuffer() != mMixBuffer means there is an effect chain
+            // connected to the track
+            chain.clear();
+            if (track->mainBuffer() != mMixBuffer) {
+                chain = getEffectChain_l(track->sessionId());
+                // Delegate volume control to effect in track effect chain if needed
+                if (chain != 0) {
+                    tracksWithEffect++;
+                } else {
+                    LOGW("prepareTracks_l(): track %08x attached to effect but no chain found on session %d",
+                            track->name(), track->sessionId());
+                }
+            }
+
+
+            int param = AudioMixer::VOLUME;
+            if (track->mFillingUpStatus == Track::FS_FILLED) {
+                // no ramp for the first volume setting
+                track->mFillingUpStatus = Track::FS_ACTIVE;
+                if (track->mState == TrackBase::RESUMING) {
+                    track->mState = TrackBase::ACTIVE;
+                    param = AudioMixer::RAMP_VOLUME;
+                }
+            } else if (cblk->server != 0) {
+                // If the track is stopped before the first frame was mixed,
+                // do not apply ramp
+                param = AudioMixer::RAMP_VOLUME;
+            }
+
+            // compute volume for this track
+            int16_t left, right, aux;
+            if (track->isMuted() || masterMute || track->isPausing() ||
+                mStreamTypes[track->type()].mute) {
+                left = right = aux = 0;
+                if (track->isPausing()) {
+                    track->setPaused();
+                }
+            } else {
+                // read original volumes with volume control
+                float typeVolume = mStreamTypes[track->type()].volume;
+#ifdef LVMX
+                bool streamMute=false;
+                // read the volume from the LivesVibes audio engine.
+                if (LifeVibes::audioOutputTypeIsLifeVibes(audioOutputType))
+                {
+                    LifeVibes::getStreamVolumes(audioOutputType, track->type(), &typeVolume, &streamMute);
+                    if (streamMute) {
+                        typeVolume = 0;
+                    }
+                }
+#endif
+                float v = masterVolume * typeVolume;
+                uint32_t vl = (uint32_t)(v * cblk->volume[0]) << 12;
+                uint32_t vr = (uint32_t)(v * cblk->volume[1]) << 12;
+
+                // Delegate volume control to effect in track effect chain if needed
+                if (chain != 0 && chain->setVolume_l(&vl, &vr)) {
+                    // Do not ramp volume is volume is controlled by effect
+                    param = AudioMixer::VOLUME;
+                }
+
+                // Convert volumes from 8.24 to 4.12 format
+                uint32_t v_clamped = (vl + (1 << 11)) >> 12;
+                if (v_clamped > MAX_GAIN_INT) v_clamped = MAX_GAIN_INT;
+                left = int16_t(v_clamped);
+                v_clamped = (vr + (1 << 11)) >> 12;
+                if (v_clamped > MAX_GAIN_INT) v_clamped = MAX_GAIN_INT;
+                right = int16_t(v_clamped);
+
+                v_clamped = (uint32_t)(v * cblk->sendLevel);
+                if (v_clamped > MAX_GAIN_INT) v_clamped = MAX_GAIN_INT;
+                aux = int16_t(v_clamped);
+            }
+
+#ifdef LVMX
+            if ( tracksConnectedChanged || stateChanged )
+            {
+                 // only do the ramp when the volume is changed by the user / application
+                 param = AudioMixer::VOLUME;
+            }
+#endif
+
+            // XXX: these things DON'T need to be done each time
+            mAudioMixer->setBufferProvider(track);
+            mAudioMixer->enable(AudioMixer::MIXING);
+
+            mAudioMixer->setParameter(param, AudioMixer::VOLUME0, (void *)left);
+            mAudioMixer->setParameter(param, AudioMixer::VOLUME1, (void *)right);
+            mAudioMixer->setParameter(param, AudioMixer::AUXLEVEL, (void *)aux);
+            mAudioMixer->setParameter(
+                AudioMixer::TRACK,
+                AudioMixer::FORMAT, (void *)track->format());
+            mAudioMixer->setParameter(
+                AudioMixer::TRACK,
+                AudioMixer::CHANNEL_COUNT, (void *)track->channelCount());
+            mAudioMixer->setParameter(
+                AudioMixer::RESAMPLE,
+                AudioMixer::SAMPLE_RATE,
+                (void *)(cblk->sampleRate));
+            mAudioMixer->setParameter(
+                AudioMixer::TRACK,
+                AudioMixer::MAIN_BUFFER, (void *)track->mainBuffer());
+            mAudioMixer->setParameter(
+                AudioMixer::TRACK,
+                AudioMixer::AUX_BUFFER, (void *)track->auxBuffer());
+
+            // reset retry count
+            track->mRetryCount = kMaxTrackRetries;
+            mixerStatus = MIXER_TRACKS_READY;
+        } else {
+            //LOGV("track %d u=%08x, s=%08x [NOT READY] on thread %p", track->name(), cblk->user, cblk->server, this);
+            if (track->isStopped()) {
+                track->reset();
+            }
+            if (track->isTerminated() || track->isStopped() || track->isPaused()) {
+                // We have consumed all the buffers of this track.
+                // Remove it from the list of active tracks.
+                tracksToRemove->add(track);
+            } else {
+                // No buffers for this track. Give it a few chances to
+                // fill a buffer, then remove it from active list.
+                if (--(track->mRetryCount) <= 0) {
+                    LOGV("BUFFER TIMEOUT: remove(%d) from active list on thread %p", track->name(), this);
+                    tracksToRemove->add(track);
+                } else if (mixerStatus != MIXER_TRACKS_READY) {
+                    mixerStatus = MIXER_TRACKS_ENABLED;
+                }
+            }
+            mAudioMixer->disable(AudioMixer::MIXING);
+        }
+    }
+
+    // remove all the tracks that need to be...
+    count = tracksToRemove->size();
+    if (UNLIKELY(count)) {
+        for (size_t i=0 ; i<count ; i++) {
+            const sp<Track>& track = tracksToRemove->itemAt(i);
+            mActiveTracks.remove(track);
+            if (track->mainBuffer() != mMixBuffer) {
+                chain = getEffectChain_l(track->sessionId());
+                if (chain != 0) {
+                    LOGV("stopping track on chain %p for session Id: %d", chain.get(), track->sessionId());
+                    chain->stopTrack();
+                }
+            }
+            if (track->isTerminated()) {
+                mTracks.remove(track);
+                deleteTrackName_l(track->mName);
+            }
+        }
+    }
+
+    // mix buffer must be cleared if all tracks are connected to an
+    // effect chain as in this case the mixer will not write to
+    // mix buffer and track effects will accumulate into it
+    if (mixedTracks != 0 && mixedTracks == tracksWithEffect) {
+        memset(mMixBuffer, 0, mFrameCount * mChannelCount * sizeof(int16_t));
+    }
+
+    return mixerStatus;
+}
+
+void AudioFlinger::MixerThread::invalidateTracks(int streamType)
+{
+    LOGV ("MixerThread::invalidateTracks() mixer %p, streamType %d, mTracks.size %d", this,  streamType, mTracks.size());
+    Mutex::Autolock _l(mLock);
+    size_t size = mTracks.size();
+    for (size_t i = 0; i < size; i++) {
+        sp<Track> t = mTracks[i];
+        if (t->type() == streamType) {
+            t->mCblk->lock.lock();
+            t->mCblk->flags |= CBLK_INVALID_ON;
+            t->mCblk->cv.signal();
+            t->mCblk->lock.unlock();
+        }
+    }
+}
+
+
+// getTrackName_l() must be called with ThreadBase::mLock held
+int AudioFlinger::MixerThread::getTrackName_l()
+{
+    return mAudioMixer->getTrackName();
+}
+
+// deleteTrackName_l() must be called with ThreadBase::mLock held
+void AudioFlinger::MixerThread::deleteTrackName_l(int name)
+{
+    LOGV("remove track (%d) and delete from mixer", name);
+    mAudioMixer->deleteTrackName(name);
+}
+
+// checkForNewParameters_l() must be called with ThreadBase::mLock held
+bool AudioFlinger::MixerThread::checkForNewParameters_l()
+{
+    bool reconfig = false;
+
+    while (!mNewParameters.isEmpty()) {
+        status_t status = NO_ERROR;
+        String8 keyValuePair = mNewParameters[0];
+        AudioParameter param = AudioParameter(keyValuePair);
+        int value;
+
+        if (param.getInt(String8(AudioParameter::keySamplingRate), value) == NO_ERROR) {
+            reconfig = true;
+        }
+        if (param.getInt(String8(AudioParameter::keyFormat), value) == NO_ERROR) {
+            if (value != AudioSystem::PCM_16_BIT) {
+                status = BAD_VALUE;
+            } else {
+                reconfig = true;
+            }
+        }
+        if (param.getInt(String8(AudioParameter::keyChannels), value) == NO_ERROR) {
+            if (value != AudioSystem::CHANNEL_OUT_STEREO) {
+                status = BAD_VALUE;
+            } else {
+                reconfig = true;
+            }
+        }
+        if (param.getInt(String8(AudioParameter::keyFrameCount), value) == NO_ERROR) {
+            // do not accept frame count changes if tracks are open as the track buffer
+            // size depends on frame count and correct behavior would not be garantied
+            // if frame count is changed after track creation
+            if (!mTracks.isEmpty()) {
+                status = INVALID_OPERATION;
+            } else {
+                reconfig = true;
+            }
+        }
+        if (param.getInt(String8(AudioParameter::keyRouting), value) == NO_ERROR) {
+            // forward device change to effects that have requested to be
+            // aware of attached audio device.
+            mDevice = (uint32_t)value;
+            for (size_t i = 0; i < mEffectChains.size(); i++) {
+                mEffectChains[i]->setDevice_l(mDevice);
+            }
+        }
+
+        if (status == NO_ERROR) {
+            status = mOutput->setParameters(keyValuePair);
+            if (!mStandby && status == INVALID_OPERATION) {
+               mOutput->standby();
+               mStandby = true;
+               mBytesWritten = 0;
+               status = mOutput->setParameters(keyValuePair);
+            }
+            if (status == NO_ERROR && reconfig) {
+                delete mAudioMixer;
+                readOutputParameters();
+                mAudioMixer = new AudioMixer(mFrameCount, mSampleRate);
+                for (size_t i = 0; i < mTracks.size() ; i++) {
+                    int name = getTrackName_l();
+                    if (name < 0) break;
+                    mTracks[i]->mName = name;
+                    // limit track sample rate to 2 x new output sample rate
+                    if (mTracks[i]->mCblk->sampleRate > 2 * sampleRate()) {
+                        mTracks[i]->mCblk->sampleRate = 2 * sampleRate();
+                    }
+                }
+                sendConfigEvent_l(AudioSystem::OUTPUT_CONFIG_CHANGED);
+            }
+        }
+
+        mNewParameters.removeAt(0);
+
+        mParamStatus = status;
+        mParamCond.signal();
+        mWaitWorkCV.wait(mLock);
+    }
+    return reconfig;
+}
+
+status_t AudioFlinger::MixerThread::dumpInternals(int fd, const Vector<String16>& args)
+{
+    const size_t SIZE = 256;
+    char buffer[SIZE];
+    String8 result;
+
+    PlaybackThread::dumpInternals(fd, args);
+
+    snprintf(buffer, SIZE, "AudioMixer tracks: %08x\n", mAudioMixer->trackNames());
+    result.append(buffer);
+    write(fd, result.string(), result.size());
+    return NO_ERROR;
+}
+
+uint32_t AudioFlinger::MixerThread::activeSleepTimeUs()
+{
+    return (uint32_t)(mOutput->latency() * 1000) / 2;
+}
+
+uint32_t AudioFlinger::MixerThread::idleSleepTimeUs()
+{
+    return (uint32_t)((mFrameCount * 1000) / mSampleRate) * 1000;
+}
+
+// ----------------------------------------------------------------------------
+AudioFlinger::DirectOutputThread::DirectOutputThread(const sp<AudioFlinger>& audioFlinger, AudioStreamOut* output, int id, uint32_t device)
+    :   PlaybackThread(audioFlinger, output, id, device)
+{
+    mType = PlaybackThread::DIRECT;
+}
+
+AudioFlinger::DirectOutputThread::~DirectOutputThread()
+{
+}
+
+
+static inline int16_t clamp16(int32_t sample)
+{
+    if ((sample>>15) ^ (sample>>31))
+        sample = 0x7FFF ^ (sample>>31);
+    return sample;
+}
+
+static inline
+int32_t mul(int16_t in, int16_t v)
+{
+#if defined(__arm__) && !defined(__thumb__)
+    int32_t out;
+    asm( "smulbb %[out], %[in], %[v] \n"
+         : [out]"=r"(out)
+         : [in]"%r"(in), [v]"r"(v)
+         : );
+    return out;
+#else
+    return in * int32_t(v);
+#endif
+}
+
+void AudioFlinger::DirectOutputThread::applyVolume(uint16_t leftVol, uint16_t rightVol, bool ramp)
+{
+    // Do not apply volume on compressed audio
+    if (!AudioSystem::isLinearPCM(mFormat)) {
+        return;
+    }
+
+    // convert to signed 16 bit before volume calculation
+    if (mFormat == AudioSystem::PCM_8_BIT) {
+        size_t count = mFrameCount * mChannelCount;
+        uint8_t *src = (uint8_t *)mMixBuffer + count-1;
+        int16_t *dst = mMixBuffer + count-1;
+        while(count--) {
+            *dst-- = (int16_t)(*src--^0x80) << 8;
+        }
+    }
+
+    size_t frameCount = mFrameCount;
+    int16_t *out = mMixBuffer;
+    if (ramp) {
+        if (mChannelCount == 1) {
+            int32_t d = ((int32_t)leftVol - (int32_t)mLeftVolShort) << 16;
+            int32_t vlInc = d / (int32_t)frameCount;
+            int32_t vl = ((int32_t)mLeftVolShort << 16);
+            do {
+                out[0] = clamp16(mul(out[0], vl >> 16) >> 12);
+                out++;
+                vl += vlInc;
+            } while (--frameCount);
+
+        } else {
+            int32_t d = ((int32_t)leftVol - (int32_t)mLeftVolShort) << 16;
+            int32_t vlInc = d / (int32_t)frameCount;
+            d = ((int32_t)rightVol - (int32_t)mRightVolShort) << 16;
+            int32_t vrInc = d / (int32_t)frameCount;
+            int32_t vl = ((int32_t)mLeftVolShort << 16);
+            int32_t vr = ((int32_t)mRightVolShort << 16);
+            do {
+                out[0] = clamp16(mul(out[0], vl >> 16) >> 12);
+                out[1] = clamp16(mul(out[1], vr >> 16) >> 12);
+                out += 2;
+                vl += vlInc;
+                vr += vrInc;
+            } while (--frameCount);
+        }
+    } else {
+        if (mChannelCount == 1) {
+            do {
+                out[0] = clamp16(mul(out[0], leftVol) >> 12);
+                out++;
+            } while (--frameCount);
+        } else {
+            do {
+                out[0] = clamp16(mul(out[0], leftVol) >> 12);
+                out[1] = clamp16(mul(out[1], rightVol) >> 12);
+                out += 2;
+            } while (--frameCount);
+        }
+    }
+
+    // convert back to unsigned 8 bit after volume calculation
+    if (mFormat == AudioSystem::PCM_8_BIT) {
+        size_t count = mFrameCount * mChannelCount;
+        int16_t *src = mMixBuffer;
+        uint8_t *dst = (uint8_t *)mMixBuffer;
+        while(count--) {
+            *dst++ = (uint8_t)(((int32_t)*src++ + (1<<7)) >> 8)^0x80;
+        }
+    }
+
+    mLeftVolShort = leftVol;
+    mRightVolShort = rightVol;
+}
+
+bool AudioFlinger::DirectOutputThread::threadLoop()
+{
+    uint32_t mixerStatus = MIXER_IDLE;
+    sp<Track> trackToRemove;
+    sp<Track> activeTrack;
+    nsecs_t standbyTime = systemTime();
+    int8_t *curBuf;
+    size_t mixBufferSize = mFrameCount*mFrameSize;
+    uint32_t activeSleepTime = activeSleepTimeUs();
+    uint32_t idleSleepTime = idleSleepTimeUs();
+    uint32_t sleepTime = idleSleepTime;
+    // use shorter standby delay as on normal output to release
+    // hardware resources as soon as possible
+    nsecs_t standbyDelay = microseconds(activeSleepTime*2);
+
+
+    while (!exitPending())
+    {
+        bool rampVolume;
+        uint16_t leftVol;
+        uint16_t rightVol;
+        Vector< sp<EffectChain> > effectChains;
+
+        processConfigEvents();
+
+        mixerStatus = MIXER_IDLE;
+
+        { // scope for the mLock
+
+            Mutex::Autolock _l(mLock);
+
+            if (checkForNewParameters_l()) {
+                mixBufferSize = mFrameCount*mFrameSize;
+                activeSleepTime = activeSleepTimeUs();
+                idleSleepTime = idleSleepTimeUs();
+                standbyDelay = microseconds(activeSleepTime*2);
+            }
+
+            // put audio hardware into standby after short delay
+            if UNLIKELY((!mActiveTracks.size() && systemTime() > standbyTime) ||
+                        mSuspended) {
+                // wait until we have something to do...
+                if (!mStandby) {
+                    LOGV("Audio hardware entering standby, mixer %p\n", this);
+                    mOutput->standby();
+                    mStandby = true;
+                    mBytesWritten = 0;
+                }
+
+                if (!mActiveTracks.size() && mConfigEvents.isEmpty()) {
+                    // we're about to wait, flush the binder command buffer
+                    IPCThreadState::self()->flushCommands();
+
+                    if (exitPending()) break;
+
+                    LOGV("DirectOutputThread %p TID %d going to sleep\n", this, gettid());
+                    mWaitWorkCV.wait(mLock);
+                    LOGV("DirectOutputThread %p TID %d waking up in active mode\n", this, gettid());
+
+                    if (mMasterMute == false) {
+                        char value[PROPERTY_VALUE_MAX];
+                        property_get("ro.audio.silent", value, "0");
+                        if (atoi(value)) {
+                            LOGD("Silence is golden");
+                            setMasterMute(true);
+                        }
+                    }
+
+                    standbyTime = systemTime() + standbyDelay;
+                    sleepTime = idleSleepTime;
+                    continue;
+                }
+            }
+
+            effectChains = mEffectChains;
+
+            // find out which tracks need to be processed
+            if (mActiveTracks.size() != 0) {
+                sp<Track> t = mActiveTracks[0].promote();
+                if (t == 0) continue;
+
+                Track* const track = t.get();
+                audio_track_cblk_t* cblk = track->cblk();
+
+                // The first time a track is added we wait
+                // for all its buffers to be filled before processing it
+                if (cblk->framesReady() && (track->isReady() || track->isStopped()) &&
+                        !track->isPaused() && !track->isTerminated())
+                {
+                    //LOGV("track %d u=%08x, s=%08x [OK]", track->name(), cblk->user, cblk->server);
+
+                    if (track->mFillingUpStatus == Track::FS_FILLED) {
+                        track->mFillingUpStatus = Track::FS_ACTIVE;
+                        mLeftVolFloat = mRightVolFloat = 0;
+                        mLeftVolShort = mRightVolShort = 0;
+                        if (track->mState == TrackBase::RESUMING) {
+                            track->mState = TrackBase::ACTIVE;
+                            rampVolume = true;
+                        }
+                    } else if (cblk->server != 0) {
+                        // If the track is stopped before the first frame was mixed,
+                        // do not apply ramp
+                        rampVolume = true;
+                    }
+                    // compute volume for this track
+                    float left, right;
+                    if (track->isMuted() || mMasterMute || track->isPausing() ||
+                        mStreamTypes[track->type()].mute) {
+                        left = right = 0;
+                        if (track->isPausing()) {
+                            track->setPaused();
+                        }
+                    } else {
+                        float typeVolume = mStreamTypes[track->type()].volume;
+                        float v = mMasterVolume * typeVolume;
+                        float v_clamped = v * cblk->volume[0];
+                        if (v_clamped > MAX_GAIN) v_clamped = MAX_GAIN;
+                        left = v_clamped/MAX_GAIN;
+                        v_clamped = v * cblk->volume[1];
+                        if (v_clamped > MAX_GAIN) v_clamped = MAX_GAIN;
+                        right = v_clamped/MAX_GAIN;
+                    }
+
+                    if (left != mLeftVolFloat || right != mRightVolFloat) {
+                        mLeftVolFloat = left;
+                        mRightVolFloat = right;
+
+                        // If audio HAL implements volume control,
+                        // force software volume to nominal value
+                        if (mOutput->setVolume(left, right) == NO_ERROR) {
+                            left = 1.0f;
+                            right = 1.0f;
+                        }
+
+                        // Convert volumes from float to 8.24
+                        uint32_t vl = (uint32_t)(left * (1 << 24));
+                        uint32_t vr = (uint32_t)(right * (1 << 24));
+
+                        // Delegate volume control to effect in track effect chain if needed
+                        // only one effect chain can be present on DirectOutputThread, so if
+                        // there is one, the track is connected to it
+                        if (!effectChains.isEmpty()) {
+                            // Do not ramp volume is volume is controlled by effect
+                            if(effectChains[0]->setVolume_l(&vl, &vr)) {
+                                rampVolume = false;
+                            }
+                        }
+
+                        // Convert volumes from 8.24 to 4.12 format
+                        uint32_t v_clamped = (vl + (1 << 11)) >> 12;
+                        if (v_clamped > MAX_GAIN_INT) v_clamped = MAX_GAIN_INT;
+                        leftVol = (uint16_t)v_clamped;
+                        v_clamped = (vr + (1 << 11)) >> 12;
+                        if (v_clamped > MAX_GAIN_INT) v_clamped = MAX_GAIN_INT;
+                        rightVol = (uint16_t)v_clamped;
+                    } else {
+                        leftVol = mLeftVolShort;
+                        rightVol = mRightVolShort;
+                        rampVolume = false;
+                    }
+
+                    // reset retry count
+                    track->mRetryCount = kMaxTrackRetriesDirect;
+                    activeTrack = t;
+                    mixerStatus = MIXER_TRACKS_READY;
+                } else {
+                    //LOGV("track %d u=%08x, s=%08x [NOT READY]", track->name(), cblk->user, cblk->server);
+                    if (track->isStopped()) {
+                        track->reset();
+                    }
+                    if (track->isTerminated() || track->isStopped() || track->isPaused()) {
+                        // We have consumed all the buffers of this track.
+                        // Remove it from the list of active tracks.
+                        trackToRemove = track;
+                    } else {
+                        // No buffers for this track. Give it a few chances to
+                        // fill a buffer, then remove it from active list.
+                        if (--(track->mRetryCount) <= 0) {
+                            LOGV("BUFFER TIMEOUT: remove(%d) from active list", track->name());
+                            trackToRemove = track;
+                        } else {
+                            mixerStatus = MIXER_TRACKS_ENABLED;
+                        }
+                    }
+                }
+            }
+
+            // remove all the tracks that need to be...
+            if (UNLIKELY(trackToRemove != 0)) {
+                mActiveTracks.remove(trackToRemove);
+                if (!effectChains.isEmpty()) {
+                    LOGV("stopping track on chain %p for session Id: %d", effectChains[0].get(), trackToRemove->sessionId());
+                    effectChains[0]->stopTrack();
+                }
+                if (trackToRemove->isTerminated()) {
+                    mTracks.remove(trackToRemove);
+                    deleteTrackName_l(trackToRemove->mName);
+                }
+            }
+
+            lockEffectChains_l();
+       }
+
+        if (LIKELY(mixerStatus == MIXER_TRACKS_READY)) {
+            AudioBufferProvider::Buffer buffer;
+            size_t frameCount = mFrameCount;
+            curBuf = (int8_t *)mMixBuffer;
+            // output audio to hardware
+            while (frameCount) {
+                buffer.frameCount = frameCount;
+                activeTrack->getNextBuffer(&buffer);
+                if (UNLIKELY(buffer.raw == 0)) {
+                    memset(curBuf, 0, frameCount * mFrameSize);
+                    break;
+                }
+                memcpy(curBuf, buffer.raw, buffer.frameCount * mFrameSize);
+                frameCount -= buffer.frameCount;
+                curBuf += buffer.frameCount * mFrameSize;
+                activeTrack->releaseBuffer(&buffer);
+            }
+            sleepTime = 0;
+            standbyTime = systemTime() + standbyDelay;
+        } else {
+            if (sleepTime == 0) {
+                if (mixerStatus == MIXER_TRACKS_ENABLED) {
+                    sleepTime = activeSleepTime;
+                } else {
+                    sleepTime = idleSleepTime;
+                }
+            } else if (mBytesWritten != 0 && AudioSystem::isLinearPCM(mFormat)) {
+                memset (mMixBuffer, 0, mFrameCount * mFrameSize);
+                sleepTime = 0;
+            }
+        }
+
+        if (mSuspended) {
+            sleepTime = idleSleepTime;
+        }
+        // sleepTime == 0 means we must write to audio hardware
+        if (sleepTime == 0) {
+            if (mixerStatus == MIXER_TRACKS_READY) {
+                applyVolume(leftVol, rightVol, rampVolume);
+            }
+            for (size_t i = 0; i < effectChains.size(); i ++) {
+                effectChains[i]->process_l();
+            }
+            unlockEffectChains();
+
+            mLastWriteTime = systemTime();
+            mInWrite = true;
+            mBytesWritten += mixBufferSize;
+            int bytesWritten = (int)mOutput->write(mMixBuffer, mixBufferSize);
+            if (bytesWritten < 0) mBytesWritten -= mixBufferSize;
+            mNumWrites++;
+            mInWrite = false;
+            mStandby = false;
+        } else {
+            unlockEffectChains();
+            usleep(sleepTime);
+        }
+
+        // finally let go of removed track, without the lock held
+        // since we can't guarantee the destructors won't acquire that
+        // same lock.
+        trackToRemove.clear();
+        activeTrack.clear();
+
+        // Effect chains will be actually deleted here if they were removed from
+        // mEffectChains list during mixing or effects processing
+        effectChains.clear();
+    }
+
+    if (!mStandby) {
+        mOutput->standby();
+    }
+
+    LOGV("DirectOutputThread %p exiting", this);
+    return false;
+}
+
+// getTrackName_l() must be called with ThreadBase::mLock held
+int AudioFlinger::DirectOutputThread::getTrackName_l()
+{
+    return 0;
+}
+
+// deleteTrackName_l() must be called with ThreadBase::mLock held
+void AudioFlinger::DirectOutputThread::deleteTrackName_l(int name)
+{
+}
+
+// checkForNewParameters_l() must be called with ThreadBase::mLock held
+bool AudioFlinger::DirectOutputThread::checkForNewParameters_l()
+{
+    bool reconfig = false;
+
+    while (!mNewParameters.isEmpty()) {
+        status_t status = NO_ERROR;
+        String8 keyValuePair = mNewParameters[0];
+        AudioParameter param = AudioParameter(keyValuePair);
+        int value;
+
+        if (param.getInt(String8(AudioParameter::keyFrameCount), value) == NO_ERROR) {
+            // do not accept frame count changes if tracks are open as the track buffer
+            // size depends on frame count and correct behavior would not be garantied
+            // if frame count is changed after track creation
+            if (!mTracks.isEmpty()) {
+                status = INVALID_OPERATION;
+            } else {
+                reconfig = true;
+            }
+        }
+        if (status == NO_ERROR) {
+            status = mOutput->setParameters(keyValuePair);
+            if (!mStandby && status == INVALID_OPERATION) {
+               mOutput->standby();
+               mStandby = true;
+               mBytesWritten = 0;
+               status = mOutput->setParameters(keyValuePair);
+            }
+            if (status == NO_ERROR && reconfig) {
+                readOutputParameters();
+                sendConfigEvent_l(AudioSystem::OUTPUT_CONFIG_CHANGED);
+            }
+        }
+
+        mNewParameters.removeAt(0);
+
+        mParamStatus = status;
+        mParamCond.signal();
+        mWaitWorkCV.wait(mLock);
+    }
+    return reconfig;
+}
+
+uint32_t AudioFlinger::DirectOutputThread::activeSleepTimeUs()
+{
+    uint32_t time;
+    if (AudioSystem::isLinearPCM(mFormat)) {
+        time = (uint32_t)(mOutput->latency() * 1000) / 2;
+    } else {
+        time = 10000;
+    }
+    return time;
+}
+
+uint32_t AudioFlinger::DirectOutputThread::idleSleepTimeUs()
+{
+    uint32_t time;
+    if (AudioSystem::isLinearPCM(mFormat)) {
+        time = (uint32_t)((mFrameCount * 1000) / mSampleRate) * 1000;
+    } else {
+        time = 10000;
+    }
+    return time;
+}
+
+// ----------------------------------------------------------------------------
+
+AudioFlinger::DuplicatingThread::DuplicatingThread(const sp<AudioFlinger>& audioFlinger, AudioFlinger::MixerThread* mainThread, int id)
+    :   MixerThread(audioFlinger, mainThread->getOutput(), id, mainThread->device()), mWaitTimeMs(UINT_MAX)
+{
+    mType = PlaybackThread::DUPLICATING;
+    addOutputTrack(mainThread);
+}
+
+AudioFlinger::DuplicatingThread::~DuplicatingThread()
+{
+    for (size_t i = 0; i < mOutputTracks.size(); i++) {
+        mOutputTracks[i]->destroy();
+    }
+    mOutputTracks.clear();
+}
+
+bool AudioFlinger::DuplicatingThread::threadLoop()
+{
+    Vector< sp<Track> > tracksToRemove;
+    uint32_t mixerStatus = MIXER_IDLE;
+    nsecs_t standbyTime = systemTime();
+    size_t mixBufferSize = mFrameCount*mFrameSize;
+    SortedVector< sp<OutputTrack> > outputTracks;
+    uint32_t writeFrames = 0;
+    uint32_t activeSleepTime = activeSleepTimeUs();
+    uint32_t idleSleepTime = idleSleepTimeUs();
+    uint32_t sleepTime = idleSleepTime;
+    Vector< sp<EffectChain> > effectChains;
+
+    while (!exitPending())
+    {
+        processConfigEvents();
+
+        mixerStatus = MIXER_IDLE;
+        { // scope for the mLock
+
+            Mutex::Autolock _l(mLock);
+
+            if (checkForNewParameters_l()) {
+                mixBufferSize = mFrameCount*mFrameSize;
+                updateWaitTime();
+                activeSleepTime = activeSleepTimeUs();
+                idleSleepTime = idleSleepTimeUs();
+            }
+
+            const SortedVector< wp<Track> >& activeTracks = mActiveTracks;
+
+            for (size_t i = 0; i < mOutputTracks.size(); i++) {
+                outputTracks.add(mOutputTracks[i]);
+            }
+
+            // put audio hardware into standby after short delay
+            if UNLIKELY((!activeTracks.size() && systemTime() > standbyTime) ||
+                         mSuspended) {
+                if (!mStandby) {
+                    for (size_t i = 0; i < outputTracks.size(); i++) {
+                        outputTracks[i]->stop();
+                    }
+                    mStandby = true;
+                    mBytesWritten = 0;
+                }
+
+                if (!activeTracks.size() && mConfigEvents.isEmpty()) {
+                    // we're about to wait, flush the binder command buffer
+                    IPCThreadState::self()->flushCommands();
+                    outputTracks.clear();
+
+                    if (exitPending()) break;
+
+                    LOGV("DuplicatingThread %p TID %d going to sleep\n", this, gettid());
+                    mWaitWorkCV.wait(mLock);
+                    LOGV("DuplicatingThread %p TID %d waking up\n", this, gettid());
+                    if (mMasterMute == false) {
+                        char value[PROPERTY_VALUE_MAX];
+                        property_get("ro.audio.silent", value, "0");
+                        if (atoi(value)) {
+                            LOGD("Silence is golden");
+                            setMasterMute(true);
+                        }
+                    }
+
+                    standbyTime = systemTime() + kStandbyTimeInNsecs;
+                    sleepTime = idleSleepTime;
+                    continue;
+                }
+            }
+
+            mixerStatus = prepareTracks_l(activeTracks, &tracksToRemove);
+
+            // prevent any changes in effect chain list and in each effect chain
+            // during mixing and effect process as the audio buffers could be deleted
+            // or modified if an effect is created or deleted
+            lockEffectChains_l();
+            effectChains = mEffectChains;
+        }
+
+        if (LIKELY(mixerStatus == MIXER_TRACKS_READY)) {
+            // mix buffers...
+            if (outputsReady(outputTracks)) {
+                mAudioMixer->process();
+            } else {
+                memset(mMixBuffer, 0, mixBufferSize);
+            }
+            sleepTime = 0;
+            writeFrames = mFrameCount;
+        } else {
+            if (sleepTime == 0) {
+                if (mixerStatus == MIXER_TRACKS_ENABLED) {
+                    sleepTime = activeSleepTime;
+                } else {
+                    sleepTime = idleSleepTime;
+                }
+            } else if (mBytesWritten != 0) {
+                // flush remaining overflow buffers in output tracks
+                for (size_t i = 0; i < outputTracks.size(); i++) {
+                    if (outputTracks[i]->isActive()) {
+                        sleepTime = 0;
+                        writeFrames = 0;
+                        memset(mMixBuffer, 0, mixBufferSize);
+                        break;
+                    }
+                }
+            }
+        }
+
+        if (mSuspended) {
+            sleepTime = idleSleepTime;
+        }
+        // sleepTime == 0 means we must write to audio hardware
+        if (sleepTime == 0) {
+            for (size_t i = 0; i < effectChains.size(); i ++) {
+                effectChains[i]->process_l();
+            }
+            // enable changes in effect chain
+            unlockEffectChains();
+
+            standbyTime = systemTime() + kStandbyTimeInNsecs;
+            for (size_t i = 0; i < outputTracks.size(); i++) {
+                outputTracks[i]->write(mMixBuffer, writeFrames);
+            }
+            mStandby = false;
+            mBytesWritten += mixBufferSize;
+        } else {
+            // enable changes in effect chain
+            unlockEffectChains();
+            usleep(sleepTime);
+        }
+
+        // finally let go of all our tracks, without the lock held
+        // since we can't guarantee the destructors won't acquire that
+        // same lock.
+        tracksToRemove.clear();
+        outputTracks.clear();
+
+        // Effect chains will be actually deleted here if they were removed from
+        // mEffectChains list during mixing or effects processing
+        effectChains.clear();
+    }
+
+    return false;
+}
+
+void AudioFlinger::DuplicatingThread::addOutputTrack(MixerThread *thread)
+{
+    int frameCount = (3 * mFrameCount * mSampleRate) / thread->sampleRate();
+    OutputTrack *outputTrack = new OutputTrack((ThreadBase *)thread,
+                                            this,
+                                            mSampleRate,
+                                            mFormat,
+                                            mChannelCount,
+                                            frameCount);
+    if (outputTrack->cblk() != NULL) {
+        thread->setStreamVolume(AudioSystem::NUM_STREAM_TYPES, 1.0f);
+        mOutputTracks.add(outputTrack);
+        LOGV("addOutputTrack() track %p, on thread %p", outputTrack, thread);
+        updateWaitTime();
+    }
+}
+
+void AudioFlinger::DuplicatingThread::removeOutputTrack(MixerThread *thread)
+{
+    Mutex::Autolock _l(mLock);
+    for (size_t i = 0; i < mOutputTracks.size(); i++) {
+        if (mOutputTracks[i]->thread() == (ThreadBase *)thread) {
+            mOutputTracks[i]->destroy();
+            mOutputTracks.removeAt(i);
+            updateWaitTime();
+            return;
+        }
+    }
+    LOGV("removeOutputTrack(): unkonwn thread: %p", thread);
+}
+
+void AudioFlinger::DuplicatingThread::updateWaitTime()
+{
+    mWaitTimeMs = UINT_MAX;
+    for (size_t i = 0; i < mOutputTracks.size(); i++) {
+        sp<ThreadBase> strong = mOutputTracks[i]->thread().promote();
+        if (strong != NULL) {
+            uint32_t waitTimeMs = (strong->frameCount() * 2 * 1000) / strong->sampleRate();
+            if (waitTimeMs < mWaitTimeMs) {
+                mWaitTimeMs = waitTimeMs;
+            }
+        }
+    }
+}
+
+
+bool AudioFlinger::DuplicatingThread::outputsReady(SortedVector< sp<OutputTrack> > &outputTracks)
+{
+    for (size_t i = 0; i < outputTracks.size(); i++) {
+        sp <ThreadBase> thread = outputTracks[i]->thread().promote();
+        if (thread == 0) {
+            LOGW("DuplicatingThread::outputsReady() could not promote thread on output track %p", outputTracks[i].get());
+            return false;
+        }
+        PlaybackThread *playbackThread = (PlaybackThread *)thread.get();
+        if (playbackThread->standby() && !playbackThread->isSuspended()) {
+            LOGV("DuplicatingThread output track %p on thread %p Not Ready", outputTracks[i].get(), thread.get());
+            return false;
+        }
+    }
+    return true;
+}
+
+uint32_t AudioFlinger::DuplicatingThread::activeSleepTimeUs()
+{
+    return (mWaitTimeMs * 1000) / 2;
+}
+
+// ----------------------------------------------------------------------------
+
+// TrackBase constructor must be called with AudioFlinger::mLock held
+AudioFlinger::ThreadBase::TrackBase::TrackBase(
+            const wp<ThreadBase>& thread,
+            const sp<Client>& client,
+            uint32_t sampleRate,
+            int format,
+            int channelCount,
+            int frameCount,
+            uint32_t flags,
+            const sp<IMemory>& sharedBuffer,
+            int sessionId)
+    :   RefBase(),
+        mThread(thread),
+        mClient(client),
+        mCblk(0),
+        mFrameCount(0),
+        mState(IDLE),
+        mClientTid(-1),
+        mFormat(format),
+        mFlags(flags & ~SYSTEM_FLAGS_MASK),
+        mSessionId(sessionId)
+{
+    LOGV_IF(sharedBuffer != 0, "sharedBuffer: %p, size: %d", sharedBuffer->pointer(), sharedBuffer->size());
+
+    // LOGD("Creating track with %d buffers @ %d bytes", bufferCount, bufferSize);
+   size_t size = sizeof(audio_track_cblk_t);
+   size_t bufferSize = frameCount*channelCount*sizeof(int16_t);
+   if (sharedBuffer == 0) {
+       size += bufferSize;
+   }
+
+   if (client != NULL) {
+        mCblkMemory = client->heap()->allocate(size);
+        if (mCblkMemory != 0) {
+            mCblk = static_cast<audio_track_cblk_t *>(mCblkMemory->pointer());
+            if (mCblk) { // construct the shared structure in-place.
+                new(mCblk) audio_track_cblk_t();
+                // clear all buffers
+                mCblk->frameCount = frameCount;
+                mCblk->sampleRate = sampleRate;
+                mCblk->channelCount = (uint8_t)channelCount;
+                if (sharedBuffer == 0) {
+                    mBuffer = (char*)mCblk + sizeof(audio_track_cblk_t);
+                    memset(mBuffer, 0, frameCount*channelCount*sizeof(int16_t));
+                    // Force underrun condition to avoid false underrun callback until first data is
+                    // written to buffer
+                    mCblk->flags = CBLK_UNDERRUN_ON;
+                } else {
+                    mBuffer = sharedBuffer->pointer();
+                }
+                mBufferEnd = (uint8_t *)mBuffer + bufferSize;
+            }
+        } else {
+            LOGE("not enough memory for AudioTrack size=%u", size);
+            client->heap()->dump("AudioTrack");
+            return;
+        }
+   } else {
+       mCblk = (audio_track_cblk_t *)(new uint8_t[size]);
+       if (mCblk) { // construct the shared structure in-place.
+           new(mCblk) audio_track_cblk_t();
+           // clear all buffers
+           mCblk->frameCount = frameCount;
+           mCblk->sampleRate = sampleRate;
+           mCblk->channelCount = (uint8_t)channelCount;
+           mBuffer = (char*)mCblk + sizeof(audio_track_cblk_t);
+           memset(mBuffer, 0, frameCount*channelCount*sizeof(int16_t));
+           // Force underrun condition to avoid false underrun callback until first data is
+           // written to buffer
+           mCblk->flags = CBLK_UNDERRUN_ON;
+           mBufferEnd = (uint8_t *)mBuffer + bufferSize;
+       }
+   }
+}
+
+AudioFlinger::ThreadBase::TrackBase::~TrackBase()
+{
+    if (mCblk) {
+        mCblk->~audio_track_cblk_t();   // destroy our shared-structure.
+        if (mClient == NULL) {
+            delete mCblk;
+        }
+    }
+    mCblkMemory.clear();            // and free the shared memory
+    if (mClient != NULL) {
+        Mutex::Autolock _l(mClient->audioFlinger()->mLock);
+        mClient.clear();
+    }
+}
+
+void AudioFlinger::ThreadBase::TrackBase::releaseBuffer(AudioBufferProvider::Buffer* buffer)
+{
+    buffer->raw = 0;
+    mFrameCount = buffer->frameCount;
+    step();
+    buffer->frameCount = 0;
+}
+
+bool AudioFlinger::ThreadBase::TrackBase::step() {
+    bool result;
+    audio_track_cblk_t* cblk = this->cblk();
+
+    result = cblk->stepServer(mFrameCount);
+    if (!result) {
+        LOGV("stepServer failed acquiring cblk mutex");
+        mFlags |= STEPSERVER_FAILED;
+    }
+    return result;
+}
+
+void AudioFlinger::ThreadBase::TrackBase::reset() {
+    audio_track_cblk_t* cblk = this->cblk();
+
+    cblk->user = 0;
+    cblk->server = 0;
+    cblk->userBase = 0;
+    cblk->serverBase = 0;
+    mFlags &= (uint32_t)(~SYSTEM_FLAGS_MASK);
+    LOGV("TrackBase::reset");
+}
+
+sp<IMemory> AudioFlinger::ThreadBase::TrackBase::getCblk() const
+{
+    return mCblkMemory;
+}
+
+int AudioFlinger::ThreadBase::TrackBase::sampleRate() const {
+    return (int)mCblk->sampleRate;
+}
+
+int AudioFlinger::ThreadBase::TrackBase::channelCount() const {
+    return (int)mCblk->channelCount;
+}
+
+void* AudioFlinger::ThreadBase::TrackBase::getBuffer(uint32_t offset, uint32_t frames) const {
+    audio_track_cblk_t* cblk = this->cblk();
+    int8_t *bufferStart = (int8_t *)mBuffer + (offset-cblk->serverBase)*cblk->frameSize;
+    int8_t *bufferEnd = bufferStart + frames * cblk->frameSize;
+
+    // Check validity of returned pointer in case the track control block would have been corrupted.
+    if (bufferStart < mBuffer || bufferStart > bufferEnd || bufferEnd > mBufferEnd ||
+        ((unsigned long)bufferStart & (unsigned long)(cblk->frameSize - 1))) {
+        LOGE("TrackBase::getBuffer buffer out of range:\n    start: %p, end %p , mBuffer %p mBufferEnd %p\n    \
+                server %d, serverBase %d, user %d, userBase %d, channelCount %d",
+                bufferStart, bufferEnd, mBuffer, mBufferEnd,
+                cblk->server, cblk->serverBase, cblk->user, cblk->userBase, cblk->channelCount);
+        return 0;
+    }
+
+    return bufferStart;
+}
+
+// ----------------------------------------------------------------------------
+
+// Track constructor must be called with AudioFlinger::mLock and ThreadBase::mLock held
+AudioFlinger::PlaybackThread::Track::Track(
+            const wp<ThreadBase>& thread,
+            const sp<Client>& client,
+            int streamType,
+            uint32_t sampleRate,
+            int format,
+            int channelCount,
+            int frameCount,
+            const sp<IMemory>& sharedBuffer,
+            int sessionId)
+    :   TrackBase(thread, client, sampleRate, format, channelCount, frameCount, 0, sharedBuffer, sessionId),
+    mMute(false), mSharedBuffer(sharedBuffer), mName(-1), mMainBuffer(NULL), mAuxBuffer(NULL), mAuxEffectId(0)
+{
+    if (mCblk != NULL) {
+        sp<ThreadBase> baseThread = thread.promote();
+        if (baseThread != 0) {
+            PlaybackThread *playbackThread = (PlaybackThread *)baseThread.get();
+            mName = playbackThread->getTrackName_l();
+            mMainBuffer = playbackThread->mixBuffer();
+        }
+        LOGV("Track constructor name %d, calling thread %d", mName, IPCThreadState::self()->getCallingPid());
+        if (mName < 0) {
+            LOGE("no more track names available");
+        }
+        mVolume[0] = 1.0f;
+        mVolume[1] = 1.0f;
+        mStreamType = streamType;
+        // NOTE: audio_track_cblk_t::frameSize for 8 bit PCM data is based on a sample size of
+        // 16 bit because data is converted to 16 bit before being stored in buffer by AudioTrack
+        mCblk->frameSize = AudioSystem::isLinearPCM(format) ? channelCount * sizeof(int16_t) : sizeof(int8_t);
+    }
+}
+
+AudioFlinger::PlaybackThread::Track::~Track()
+{
+    LOGV("PlaybackThread::Track destructor");
+    sp<ThreadBase> thread = mThread.promote();
+    if (thread != 0) {
+        Mutex::Autolock _l(thread->mLock);
+        mState = TERMINATED;
+    }
+}
+
+void AudioFlinger::PlaybackThread::Track::destroy()
+{
+    // NOTE: destroyTrack_l() can remove a strong reference to this Track
+    // by removing it from mTracks vector, so there is a risk that this Tracks's
+    // desctructor is called. As the destructor needs to lock mLock,
+    // we must acquire a strong reference on this Track before locking mLock
+    // here so that the destructor is called only when exiting this function.
+    // On the other hand, as long as Track::destroy() is only called by
+    // TrackHandle destructor, the TrackHandle still holds a strong ref on
+    // this Track with its member mTrack.
+    sp<Track> keep(this);
+    { // scope for mLock
+        sp<ThreadBase> thread = mThread.promote();
+        if (thread != 0) {
+            if (!isOutputTrack()) {
+                if (mState == ACTIVE || mState == RESUMING) {
+                    AudioSystem::stopOutput(thread->id(), (AudioSystem::stream_type)mStreamType);
+                }
+                AudioSystem::releaseOutput(thread->id());
+            }
+            Mutex::Autolock _l(thread->mLock);
+            PlaybackThread *playbackThread = (PlaybackThread *)thread.get();
+            playbackThread->destroyTrack_l(this);
+        }
+    }
+}
+
+void AudioFlinger::PlaybackThread::Track::dump(char* buffer, size_t size)
+{
+    snprintf(buffer, size, "   %05d %05d %03u %03u %03u %05u   %04u %1d %1d %1d %05u %05u %05u  0x%08x 0x%08x 0x%08x 0x%08x\n",
+            mName - AudioMixer::TRACK0,
+            (mClient == NULL) ? getpid() : mClient->pid(),
+            mStreamType,
+            mFormat,
+            mCblk->channelCount,
+            mSessionId,
+            mFrameCount,
+            mState,
+            mMute,
+            mFillingUpStatus,
+            mCblk->sampleRate,
+            mCblk->volume[0],
+            mCblk->volume[1],
+            mCblk->server,
+            mCblk->user,
+            (int)mMainBuffer,
+            (int)mAuxBuffer);
+}
+
+status_t AudioFlinger::PlaybackThread::Track::getNextBuffer(AudioBufferProvider::Buffer* buffer)
+{
+     audio_track_cblk_t* cblk = this->cblk();
+     uint32_t framesReady;
+     uint32_t framesReq = buffer->frameCount;
+
+     // Check if last stepServer failed, try to step now
+     if (mFlags & TrackBase::STEPSERVER_FAILED) {
+         if (!step())  goto getNextBuffer_exit;
+         LOGV("stepServer recovered");
+         mFlags &= ~TrackBase::STEPSERVER_FAILED;
+     }
+
+     framesReady = cblk->framesReady();
+
+     if (LIKELY(framesReady)) {
+        uint32_t s = cblk->server;
+        uint32_t bufferEnd = cblk->serverBase + cblk->frameCount;
+
+        bufferEnd = (cblk->loopEnd < bufferEnd) ? cblk->loopEnd : bufferEnd;
+        if (framesReq > framesReady) {
+            framesReq = framesReady;
+        }
+        if (s + framesReq > bufferEnd) {
+            framesReq = bufferEnd - s;
+        }
+
+         buffer->raw = getBuffer(s, framesReq);
+         if (buffer->raw == 0) goto getNextBuffer_exit;
+
+         buffer->frameCount = framesReq;
+        return NO_ERROR;
+     }
+
+getNextBuffer_exit:
+     buffer->raw = 0;
+     buffer->frameCount = 0;
+     LOGV("getNextBuffer() no more data for track %d on thread %p", mName, mThread.unsafe_get());
+     return NOT_ENOUGH_DATA;
+}
+
+bool AudioFlinger::PlaybackThread::Track::isReady() const {
+    if (mFillingUpStatus != FS_FILLING) return true;
+
+    if (mCblk->framesReady() >= mCblk->frameCount ||
+            (mCblk->flags & CBLK_FORCEREADY_MSK)) {
+        mFillingUpStatus = FS_FILLED;
+        mCblk->flags &= ~CBLK_FORCEREADY_MSK;
+        return true;
+    }
+    return false;
+}
+
+status_t AudioFlinger::PlaybackThread::Track::start()
+{
+    status_t status = NO_ERROR;
+    LOGV("start(%d), calling thread %d", mName, IPCThreadState::self()->getCallingPid());
+    sp<ThreadBase> thread = mThread.promote();
+    if (thread != 0) {
+        Mutex::Autolock _l(thread->mLock);
+        int state = mState;
+        // here the track could be either new, or restarted
+        // in both cases "unstop" the track
+        if (mState == PAUSED) {
+            mState = TrackBase::RESUMING;
+            LOGV("PAUSED => RESUMING (%d) on thread %p", mName, this);
+        } else {
+            mState = TrackBase::ACTIVE;
+            LOGV("? => ACTIVE (%d) on thread %p", mName, this);
+        }
+
+        if (!isOutputTrack() && state != ACTIVE && state != RESUMING) {
+            thread->mLock.unlock();
+            status = AudioSystem::startOutput(thread->id(), (AudioSystem::stream_type)mStreamType);
+            thread->mLock.lock();
+        }
+        if (status == NO_ERROR) {
+            PlaybackThread *playbackThread = (PlaybackThread *)thread.get();
+            playbackThread->addTrack_l(this);
+        } else {
+            mState = state;
+        }
+    } else {
+        status = BAD_VALUE;
+    }
+    return status;
+}
+
+void AudioFlinger::PlaybackThread::Track::stop()
+{
+    LOGV("stop(%d), calling thread %d", mName, IPCThreadState::self()->getCallingPid());
+    sp<ThreadBase> thread = mThread.promote();
+    if (thread != 0) {
+        Mutex::Autolock _l(thread->mLock);
+        int state = mState;
+        if (mState > STOPPED) {
+            mState = STOPPED;
+            // If the track is not active (PAUSED and buffers full), flush buffers
+            PlaybackThread *playbackThread = (PlaybackThread *)thread.get();
+            if (playbackThread->mActiveTracks.indexOf(this) < 0) {
+                reset();
+            }
+            LOGV("(> STOPPED) => STOPPED (%d) on thread %p", mName, playbackThread);
+        }
+        if (!isOutputTrack() && (state == ACTIVE || state == RESUMING)) {
+            thread->mLock.unlock();
+            AudioSystem::stopOutput(thread->id(), (AudioSystem::stream_type)mStreamType);
+            thread->mLock.lock();
+        }
+    }
+}
+
+void AudioFlinger::PlaybackThread::Track::pause()
+{
+    LOGV("pause(%d), calling thread %d", mName, IPCThreadState::self()->getCallingPid());
+    sp<ThreadBase> thread = mThread.promote();
+    if (thread != 0) {
+        Mutex::Autolock _l(thread->mLock);
+        if (mState == ACTIVE || mState == RESUMING) {
+            mState = PAUSING;
+            LOGV("ACTIVE/RESUMING => PAUSING (%d) on thread %p", mName, thread.get());
+            if (!isOutputTrack()) {
+                thread->mLock.unlock();
+                AudioSystem::stopOutput(thread->id(), (AudioSystem::stream_type)mStreamType);
+                thread->mLock.lock();
+            }
+        }
+    }
+}
+
+void AudioFlinger::PlaybackThread::Track::flush()
+{
+    LOGV("flush(%d)", mName);
+    sp<ThreadBase> thread = mThread.promote();
+    if (thread != 0) {
+        Mutex::Autolock _l(thread->mLock);
+        if (mState != STOPPED && mState != PAUSED && mState != PAUSING) {
+            return;
+        }
+        // No point remaining in PAUSED state after a flush => go to
+        // STOPPED state
+        mState = STOPPED;
+
+        mCblk->lock.lock();
+        // NOTE: reset() will reset cblk->user and cblk->server with
+        // the risk that at the same time, the AudioMixer is trying to read
+        // data. In this case, getNextBuffer() would return a NULL pointer
+        // as audio buffer => the AudioMixer code MUST always test that pointer
+        // returned by getNextBuffer() is not NULL!
+        reset();
+        mCblk->lock.unlock();
+    }
+}
+
+void AudioFlinger::PlaybackThread::Track::reset()
+{
+    // Do not reset twice to avoid discarding data written just after a flush and before
+    // the audioflinger thread detects the track is stopped.
+    if (!mResetDone) {
+        TrackBase::reset();
+        // Force underrun condition to avoid false underrun callback until first data is
+        // written to buffer
+        mCblk->flags |= CBLK_UNDERRUN_ON;
+        mCblk->flags &= ~CBLK_FORCEREADY_MSK;
+        mFillingUpStatus = FS_FILLING;
+        mResetDone = true;
+    }
+}
+
+void AudioFlinger::PlaybackThread::Track::mute(bool muted)
+{
+    mMute = muted;
+}
+
+void AudioFlinger::PlaybackThread::Track::setVolume(float left, float right)
+{
+    mVolume[0] = left;
+    mVolume[1] = right;
+}
+
+status_t AudioFlinger::PlaybackThread::Track::attachAuxEffect(int EffectId)
+{
+    status_t status = DEAD_OBJECT;
+    sp<ThreadBase> thread = mThread.promote();
+    if (thread != 0) {
+       PlaybackThread *playbackThread = (PlaybackThread *)thread.get();
+       status = playbackThread->attachAuxEffect(this, EffectId);
+    }
+    return status;
+}
+
+void AudioFlinger::PlaybackThread::Track::setAuxBuffer(int EffectId, int32_t *buffer)
+{
+    mAuxEffectId = EffectId;
+    mAuxBuffer = buffer;
+}
+
+// ----------------------------------------------------------------------------
+
+// RecordTrack constructor must be called with AudioFlinger::mLock held
+AudioFlinger::RecordThread::RecordTrack::RecordTrack(
+            const wp<ThreadBase>& thread,
+            const sp<Client>& client,
+            uint32_t sampleRate,
+            int format,
+            int channelCount,
+            int frameCount,
+            uint32_t flags,
+            int sessionId)
+    :   TrackBase(thread, client, sampleRate, format,
+                  channelCount, frameCount, flags, 0, sessionId),
+        mOverflow(false)
+{
+    if (mCblk != NULL) {
+       LOGV("RecordTrack constructor, size %d", (int)mBufferEnd - (int)mBuffer);
+       if (format == AudioSystem::PCM_16_BIT) {
+           mCblk->frameSize = channelCount * sizeof(int16_t);
+       } else if (format == AudioSystem::PCM_8_BIT) {
+           mCblk->frameSize = channelCount * sizeof(int8_t);
+       } else {
+           mCblk->frameSize = sizeof(int8_t);
+       }
+    }
+}
+
+AudioFlinger::RecordThread::RecordTrack::~RecordTrack()
+{
+    sp<ThreadBase> thread = mThread.promote();
+    if (thread != 0) {
+        AudioSystem::releaseInput(thread->id());
+    }
+}
+
+status_t AudioFlinger::RecordThread::RecordTrack::getNextBuffer(AudioBufferProvider::Buffer* buffer)
+{
+    audio_track_cblk_t* cblk = this->cblk();
+    uint32_t framesAvail;
+    uint32_t framesReq = buffer->frameCount;
+
+     // Check if last stepServer failed, try to step now
+    if (mFlags & TrackBase::STEPSERVER_FAILED) {
+        if (!step()) goto getNextBuffer_exit;
+        LOGV("stepServer recovered");
+        mFlags &= ~TrackBase::STEPSERVER_FAILED;
+    }
+
+    framesAvail = cblk->framesAvailable_l();
+
+    if (LIKELY(framesAvail)) {
+        uint32_t s = cblk->server;
+        uint32_t bufferEnd = cblk->serverBase + cblk->frameCount;
+
+        if (framesReq > framesAvail) {
+            framesReq = framesAvail;
+        }
+        if (s + framesReq > bufferEnd) {
+            framesReq = bufferEnd - s;
+        }
+
+        buffer->raw = getBuffer(s, framesReq);
+        if (buffer->raw == 0) goto getNextBuffer_exit;
+
+        buffer->frameCount = framesReq;
+        return NO_ERROR;
+    }
+
+getNextBuffer_exit:
+    buffer->raw = 0;
+    buffer->frameCount = 0;
+    return NOT_ENOUGH_DATA;
+}
+
+status_t AudioFlinger::RecordThread::RecordTrack::start()
+{
+    sp<ThreadBase> thread = mThread.promote();
+    if (thread != 0) {
+        RecordThread *recordThread = (RecordThread *)thread.get();
+        return recordThread->start(this);
+    } else {
+        return BAD_VALUE;
+    }
+}
+
+void AudioFlinger::RecordThread::RecordTrack::stop()
+{
+    sp<ThreadBase> thread = mThread.promote();
+    if (thread != 0) {
+        RecordThread *recordThread = (RecordThread *)thread.get();
+        recordThread->stop(this);
+        TrackBase::reset();
+        // Force overerrun condition to avoid false overrun callback until first data is
+        // read from buffer
+        mCblk->flags |= CBLK_UNDERRUN_ON;
+    }
+}
+
+void AudioFlinger::RecordThread::RecordTrack::dump(char* buffer, size_t size)
+{
+    snprintf(buffer, size, "   %05d %03u %03u %05d   %04u %01d %05u  %08x %08x\n",
+            (mClient == NULL) ? getpid() : mClient->pid(),
+            mFormat,
+            mCblk->channelCount,
+            mSessionId,
+            mFrameCount,
+            mState,
+            mCblk->sampleRate,
+            mCblk->server,
+            mCblk->user);
+}
+
+
+// ----------------------------------------------------------------------------
+
+AudioFlinger::PlaybackThread::OutputTrack::OutputTrack(
+            const wp<ThreadBase>& thread,
+            DuplicatingThread *sourceThread,
+            uint32_t sampleRate,
+            int format,
+            int channelCount,
+            int frameCount)
+    :   Track(thread, NULL, AudioSystem::NUM_STREAM_TYPES, sampleRate, format, channelCount, frameCount, NULL, 0),
+    mActive(false), mSourceThread(sourceThread)
+{
+
+    PlaybackThread *playbackThread = (PlaybackThread *)thread.unsafe_get();
+    if (mCblk != NULL) {
+        mCblk->flags |= CBLK_DIRECTION_OUT;
+        mCblk->buffers = (char*)mCblk + sizeof(audio_track_cblk_t);
+        mCblk->volume[0] = mCblk->volume[1] = 0x1000;
+        mOutBuffer.frameCount = 0;
+        playbackThread->mTracks.add(this);
+        LOGV("OutputTrack constructor mCblk %p, mBuffer %p, mCblk->buffers %p, mCblk->frameCount %d, mCblk->sampleRate %d, mCblk->channelCount %d mBufferEnd %p",
+                mCblk, mBuffer, mCblk->buffers, mCblk->frameCount, mCblk->sampleRate, mCblk->channelCount, mBufferEnd);
+    } else {
+        LOGW("Error creating output track on thread %p", playbackThread);
+    }
+}
+
+AudioFlinger::PlaybackThread::OutputTrack::~OutputTrack()
+{
+    clearBufferQueue();
+}
+
+status_t AudioFlinger::PlaybackThread::OutputTrack::start()
+{
+    status_t status = Track::start();
+    if (status != NO_ERROR) {
+        return status;
+    }
+
+    mActive = true;
+    mRetryCount = 127;
+    return status;
+}
+
+void AudioFlinger::PlaybackThread::OutputTrack::stop()
+{
+    Track::stop();
+    clearBufferQueue();
+    mOutBuffer.frameCount = 0;
+    mActive = false;
+}
+
+bool AudioFlinger::PlaybackThread::OutputTrack::write(int16_t* data, uint32_t frames)
+{
+    Buffer *pInBuffer;
+    Buffer inBuffer;
+    uint32_t channelCount = mCblk->channelCount;
+    bool outputBufferFull = false;
+    inBuffer.frameCount = frames;
+    inBuffer.i16 = data;
+
+    uint32_t waitTimeLeftMs = mSourceThread->waitTimeMs();
+
+    if (!mActive && frames != 0) {
+        start();
+        sp<ThreadBase> thread = mThread.promote();
+        if (thread != 0) {
+            MixerThread *mixerThread = (MixerThread *)thread.get();
+            if (mCblk->frameCount > frames){
+                if (mBufferQueue.size() < kMaxOverFlowBuffers) {
+                    uint32_t startFrames = (mCblk->frameCount - frames);
+                    pInBuffer = new Buffer;
+                    pInBuffer->mBuffer = new int16_t[startFrames * channelCount];
+                    pInBuffer->frameCount = startFrames;
+                    pInBuffer->i16 = pInBuffer->mBuffer;
+                    memset(pInBuffer->raw, 0, startFrames * channelCount * sizeof(int16_t));
+                    mBufferQueue.add(pInBuffer);
+                } else {
+                    LOGW ("OutputTrack::write() %p no more buffers in queue", this);
+                }
+            }
+        }
+    }
+
+    while (waitTimeLeftMs) {
+        // First write pending buffers, then new data
+        if (mBufferQueue.size()) {
+            pInBuffer = mBufferQueue.itemAt(0);
+        } else {
+            pInBuffer = &inBuffer;
+        }
+
+        if (pInBuffer->frameCount == 0) {
+            break;
+        }
+
+        if (mOutBuffer.frameCount == 0) {
+            mOutBuffer.frameCount = pInBuffer->frameCount;
+            nsecs_t startTime = systemTime();
+            if (obtainBuffer(&mOutBuffer, waitTimeLeftMs) == (status_t)AudioTrack::NO_MORE_BUFFERS) {
+                LOGV ("OutputTrack::write() %p thread %p no more output buffers", this, mThread.unsafe_get());
+                outputBufferFull = true;
+                break;
+            }
+            uint32_t waitTimeMs = (uint32_t)ns2ms(systemTime() - startTime);
+            if (waitTimeLeftMs >= waitTimeMs) {
+                waitTimeLeftMs -= waitTimeMs;
+            } else {
+                waitTimeLeftMs = 0;
+            }
+        }
+
+        uint32_t outFrames = pInBuffer->frameCount > mOutBuffer.frameCount ? mOutBuffer.frameCount : pInBuffer->frameCount;
+        memcpy(mOutBuffer.raw, pInBuffer->raw, outFrames * channelCount * sizeof(int16_t));
+        mCblk->stepUser(outFrames);
+        pInBuffer->frameCount -= outFrames;
+        pInBuffer->i16 += outFrames * channelCount;
+        mOutBuffer.frameCount -= outFrames;
+        mOutBuffer.i16 += outFrames * channelCount;
+
+        if (pInBuffer->frameCount == 0) {
+            if (mBufferQueue.size()) {
+                mBufferQueue.removeAt(0);
+                delete [] pInBuffer->mBuffer;
+                delete pInBuffer;
+                LOGV("OutputTrack::write() %p thread %p released overflow buffer %d", this, mThread.unsafe_get(), mBufferQueue.size());
+            } else {
+                break;
+            }
+        }
+    }
+
+    // If we could not write all frames, allocate a buffer and queue it for next time.
+    if (inBuffer.frameCount) {
+        sp<ThreadBase> thread = mThread.promote();
+        if (thread != 0 && !thread->standby()) {
+            if (mBufferQueue.size() < kMaxOverFlowBuffers) {
+                pInBuffer = new Buffer;
+                pInBuffer->mBuffer = new int16_t[inBuffer.frameCount * channelCount];
+                pInBuffer->frameCount = inBuffer.frameCount;
+                pInBuffer->i16 = pInBuffer->mBuffer;
+                memcpy(pInBuffer->raw, inBuffer.raw, inBuffer.frameCount * channelCount * sizeof(int16_t));
+                mBufferQueue.add(pInBuffer);
+                LOGV("OutputTrack::write() %p thread %p adding overflow buffer %d", this, mThread.unsafe_get(), mBufferQueue.size());
+            } else {
+                LOGW("OutputTrack::write() %p thread %p no more overflow buffers", mThread.unsafe_get(), this);
+            }
+        }
+    }
+
+    // Calling write() with a 0 length buffer, means that no more data will be written:
+    // If no more buffers are pending, fill output track buffer to make sure it is started
+    // by output mixer.
+    if (frames == 0 && mBufferQueue.size() == 0) {
+        if (mCblk->user < mCblk->frameCount) {
+            frames = mCblk->frameCount - mCblk->user;
+            pInBuffer = new Buffer;
+            pInBuffer->mBuffer = new int16_t[frames * channelCount];
+            pInBuffer->frameCount = frames;
+            pInBuffer->i16 = pInBuffer->mBuffer;
+            memset(pInBuffer->raw, 0, frames * channelCount * sizeof(int16_t));
+            mBufferQueue.add(pInBuffer);
+        } else if (mActive) {
+            stop();
+        }
+    }
+
+    return outputBufferFull;
+}
+
+status_t AudioFlinger::PlaybackThread::OutputTrack::obtainBuffer(AudioBufferProvider::Buffer* buffer, uint32_t waitTimeMs)
+{
+    int active;
+    status_t result;
+    audio_track_cblk_t* cblk = mCblk;
+    uint32_t framesReq = buffer->frameCount;
+
+//    LOGV("OutputTrack::obtainBuffer user %d, server %d", cblk->user, cblk->server);
+    buffer->frameCount  = 0;
+
+    uint32_t framesAvail = cblk->framesAvailable();
+
+
+    if (framesAvail == 0) {
+        Mutex::Autolock _l(cblk->lock);
+        goto start_loop_here;
+        while (framesAvail == 0) {
+            active = mActive;
+            if (UNLIKELY(!active)) {
+                LOGV("Not active and NO_MORE_BUFFERS");
+                return AudioTrack::NO_MORE_BUFFERS;
+            }
+            result = cblk->cv.waitRelative(cblk->lock, milliseconds(waitTimeMs));
+            if (result != NO_ERROR) {
+                return AudioTrack::NO_MORE_BUFFERS;
+            }
+            // read the server count again
+        start_loop_here:
+            framesAvail = cblk->framesAvailable_l();
+        }
+    }
+
+//    if (framesAvail < framesReq) {
+//        return AudioTrack::NO_MORE_BUFFERS;
+//    }
+
+    if (framesReq > framesAvail) {
+        framesReq = framesAvail;
+    }
+
+    uint32_t u = cblk->user;
+    uint32_t bufferEnd = cblk->userBase + cblk->frameCount;
+
+    if (u + framesReq > bufferEnd) {
+        framesReq = bufferEnd - u;
+    }
+
+    buffer->frameCount  = framesReq;
+    buffer->raw         = (void *)cblk->buffer(u);
+    return NO_ERROR;
+}
+
+
+void AudioFlinger::PlaybackThread::OutputTrack::clearBufferQueue()
+{
+    size_t size = mBufferQueue.size();
+    Buffer *pBuffer;
+
+    for (size_t i = 0; i < size; i++) {
+        pBuffer = mBufferQueue.itemAt(i);
+        delete [] pBuffer->mBuffer;
+        delete pBuffer;
+    }
+    mBufferQueue.clear();
+}
+
+// ----------------------------------------------------------------------------
+
+AudioFlinger::Client::Client(const sp<AudioFlinger>& audioFlinger, pid_t pid)
+    :   RefBase(),
+        mAudioFlinger(audioFlinger),
+        mMemoryDealer(new MemoryDealer(1024*1024, "AudioFlinger::Client")),
+        mPid(pid)
+{
+    // 1 MB of address space is good for 32 tracks, 8 buffers each, 4 KB/buffer
+}
+
+// Client destructor must be called with AudioFlinger::mLock held
+AudioFlinger::Client::~Client()
+{
+    mAudioFlinger->removeClient_l(mPid);
+}
+
+const sp<MemoryDealer>& AudioFlinger::Client::heap() const
+{
+    return mMemoryDealer;
+}
+
+// ----------------------------------------------------------------------------
+
+AudioFlinger::NotificationClient::NotificationClient(const sp<AudioFlinger>& audioFlinger,
+                                                     const sp<IAudioFlingerClient>& client,
+                                                     pid_t pid)
+    : mAudioFlinger(audioFlinger), mPid(pid), mClient(client)
+{
+}
+
+AudioFlinger::NotificationClient::~NotificationClient()
+{
+    mClient.clear();
+}
+
+void AudioFlinger::NotificationClient::binderDied(const wp<IBinder>& who)
+{
+    sp<NotificationClient> keep(this);
+    {
+        mAudioFlinger->removeNotificationClient(mPid);
+    }
+}
+
+// ----------------------------------------------------------------------------
+
+AudioFlinger::TrackHandle::TrackHandle(const sp<AudioFlinger::PlaybackThread::Track>& track)
+    : BnAudioTrack(),
+      mTrack(track)
+{
+}
+
+AudioFlinger::TrackHandle::~TrackHandle() {
+    // just stop the track on deletion, associated resources
+    // will be freed from the main thread once all pending buffers have
+    // been played. Unless it's not in the active track list, in which
+    // case we free everything now...
+    mTrack->destroy();
+}
+
+status_t AudioFlinger::TrackHandle::start() {
+    return mTrack->start();
+}
+
+void AudioFlinger::TrackHandle::stop() {
+    mTrack->stop();
+}
+
+void AudioFlinger::TrackHandle::flush() {
+    mTrack->flush();
+}
+
+void AudioFlinger::TrackHandle::mute(bool e) {
+    mTrack->mute(e);
+}
+
+void AudioFlinger::TrackHandle::pause() {
+    mTrack->pause();
+}
+
+void AudioFlinger::TrackHandle::setVolume(float left, float right) {
+    mTrack->setVolume(left, right);
+}
+
+sp<IMemory> AudioFlinger::TrackHandle::getCblk() const {
+    return mTrack->getCblk();
+}
+
+status_t AudioFlinger::TrackHandle::attachAuxEffect(int EffectId)
+{
+    return mTrack->attachAuxEffect(EffectId);
+}
+
+status_t AudioFlinger::TrackHandle::onTransact(
+    uint32_t code, const Parcel& data, Parcel* reply, uint32_t flags)
+{
+    return BnAudioTrack::onTransact(code, data, reply, flags);
+}
+
+// ----------------------------------------------------------------------------
+
+sp<IAudioRecord> AudioFlinger::openRecord(
+        pid_t pid,
+        int input,
+        uint32_t sampleRate,
+        int format,
+        int channelCount,
+        int frameCount,
+        uint32_t flags,
+        int *sessionId,
+        status_t *status)
+{
+    sp<RecordThread::RecordTrack> recordTrack;
+    sp<RecordHandle> recordHandle;
+    sp<Client> client;
+    wp<Client> wclient;
+    status_t lStatus;
+    RecordThread *thread;
+    size_t inFrameCount;
+    int lSessionId;
+
+    // check calling permissions
+    if (!recordingAllowed()) {
+        lStatus = PERMISSION_DENIED;
+        goto Exit;
+    }
+
+    // add client to list
+    { // scope for mLock
+        Mutex::Autolock _l(mLock);
+        thread = checkRecordThread_l(input);
+        if (thread == NULL) {
+            lStatus = BAD_VALUE;
+            goto Exit;
+        }
+
+        wclient = mClients.valueFor(pid);
+        if (wclient != NULL) {
+            client = wclient.promote();
+        } else {
+            client = new Client(this, pid);
+            mClients.add(pid, client);
+        }
+
+        // If no audio session id is provided, create one here
+        if (sessionId != NULL && *sessionId != 0) {
+            lSessionId = *sessionId;
+        } else {
+            lSessionId = nextUniqueId();
+            if (sessionId != NULL) {
+                *sessionId = lSessionId;
+            }
+        }
+        // create new record track. The record track uses one track in mHardwareMixerThread by convention.
+        recordTrack = new RecordThread::RecordTrack(thread, client, sampleRate,
+                                                   format, channelCount, frameCount, flags, lSessionId);
+    }
+    if (recordTrack->getCblk() == NULL) {
+        // remove local strong reference to Client before deleting the RecordTrack so that the Client
+        // destructor is called by the TrackBase destructor with mLock held
+        client.clear();
+        recordTrack.clear();
+        lStatus = NO_MEMORY;
+        goto Exit;
+    }
+
+    // return to handle to client
+    recordHandle = new RecordHandle(recordTrack);
+    lStatus = NO_ERROR;
+
+Exit:
+    if (status) {
+        *status = lStatus;
+    }
+    return recordHandle;
+}
+
+// ----------------------------------------------------------------------------
+
+AudioFlinger::RecordHandle::RecordHandle(const sp<AudioFlinger::RecordThread::RecordTrack>& recordTrack)
+    : BnAudioRecord(),
+    mRecordTrack(recordTrack)
+{
+}
+
+AudioFlinger::RecordHandle::~RecordHandle() {
+    stop();
+}
+
+status_t AudioFlinger::RecordHandle::start() {
+    LOGV("RecordHandle::start()");
+    return mRecordTrack->start();
+}
+
+void AudioFlinger::RecordHandle::stop() {
+    LOGV("RecordHandle::stop()");
+    mRecordTrack->stop();
+}
+
+sp<IMemory> AudioFlinger::RecordHandle::getCblk() const {
+    return mRecordTrack->getCblk();
+}
+
+status_t AudioFlinger::RecordHandle::onTransact(
+    uint32_t code, const Parcel& data, Parcel* reply, uint32_t flags)
+{
+    return BnAudioRecord::onTransact(code, data, reply, flags);
+}
+
+// ----------------------------------------------------------------------------
+
+AudioFlinger::RecordThread::RecordThread(const sp<AudioFlinger>& audioFlinger, AudioStreamIn *input, uint32_t sampleRate, uint32_t channels, int id) :
+    ThreadBase(audioFlinger, id),
+    mInput(input), mResampler(0), mRsmpOutBuffer(0), mRsmpInBuffer(0)
+{
+    mReqChannelCount = AudioSystem::popCount(channels);
+    mReqSampleRate = sampleRate;
+    readInputParameters();
+}
+
+
+AudioFlinger::RecordThread::~RecordThread()
+{
+    delete[] mRsmpInBuffer;
+    if (mResampler != 0) {
+        delete mResampler;
+        delete[] mRsmpOutBuffer;
+    }
+}
+
+void AudioFlinger::RecordThread::onFirstRef()
+{
+    const size_t SIZE = 256;
+    char buffer[SIZE];
+
+    snprintf(buffer, SIZE, "Record Thread %p", this);
+
+    run(buffer, PRIORITY_URGENT_AUDIO);
+}
+
+bool AudioFlinger::RecordThread::threadLoop()
+{
+    AudioBufferProvider::Buffer buffer;
+    sp<RecordTrack> activeTrack;
+
+    // start recording
+    while (!exitPending()) {
+
+        processConfigEvents();
+
+        { // scope for mLock
+            Mutex::Autolock _l(mLock);
+            checkForNewParameters_l();
+            if (mActiveTrack == 0 && mConfigEvents.isEmpty()) {
+                if (!mStandby) {
+                    mInput->standby();
+                    mStandby = true;
+                }
+
+                if (exitPending()) break;
+
+                LOGV("RecordThread: loop stopping");
+                // go to sleep
+                mWaitWorkCV.wait(mLock);
+                LOGV("RecordThread: loop starting");
+                continue;
+            }
+            if (mActiveTrack != 0) {
+                if (mActiveTrack->mState == TrackBase::PAUSING) {
+                    if (!mStandby) {
+                        mInput->standby();
+                        mStandby = true;
+                    }
+                    mActiveTrack.clear();
+                    mStartStopCond.broadcast();
+                } else if (mActiveTrack->mState == TrackBase::RESUMING) {
+                    if (mReqChannelCount != mActiveTrack->channelCount()) {
+                        mActiveTrack.clear();
+                        mStartStopCond.broadcast();
+                    } else if (mBytesRead != 0) {
+                        // record start succeeds only if first read from audio input
+                        // succeeds
+                        if (mBytesRead > 0) {
+                            mActiveTrack->mState = TrackBase::ACTIVE;
+                        } else {
+                            mActiveTrack.clear();
+                        }
+                        mStartStopCond.broadcast();
+                    }
+                    mStandby = false;
+                }
+            }
+        }
+
+        if (mActiveTrack != 0) {
+            if (mActiveTrack->mState != TrackBase::ACTIVE &&
+                mActiveTrack->mState != TrackBase::RESUMING) {
+                usleep(5000);
+                continue;
+            }
+            buffer.frameCount = mFrameCount;
+            if (LIKELY(mActiveTrack->getNextBuffer(&buffer) == NO_ERROR)) {
+                size_t framesOut = buffer.frameCount;
+                if (mResampler == 0) {
+                    // no resampling
+                    while (framesOut) {
+                        size_t framesIn = mFrameCount - mRsmpInIndex;
+                        if (framesIn) {
+                            int8_t *src = (int8_t *)mRsmpInBuffer + mRsmpInIndex * mFrameSize;
+                            int8_t *dst = buffer.i8 + (buffer.frameCount - framesOut) * mActiveTrack->mCblk->frameSize;
+                            if (framesIn > framesOut)
+                                framesIn = framesOut;
+                            mRsmpInIndex += framesIn;
+                            framesOut -= framesIn;
+                            if ((int)mChannelCount == mReqChannelCount ||
+                                mFormat != AudioSystem::PCM_16_BIT) {
+                                memcpy(dst, src, framesIn * mFrameSize);
+                            } else {
+                                int16_t *src16 = (int16_t *)src;
+                                int16_t *dst16 = (int16_t *)dst;
+                                if (mChannelCount == 1) {
+                                    while (framesIn--) {
+                                        *dst16++ = *src16;
+                                        *dst16++ = *src16++;
+                                    }
+                                } else {
+                                    while (framesIn--) {
+                                        *dst16++ = (int16_t)(((int32_t)*src16 + (int32_t)*(src16 + 1)) >> 1);
+                                        src16 += 2;
+                                    }
+                                }
+                            }
+                        }
+                        if (framesOut && mFrameCount == mRsmpInIndex) {
+                            if (framesOut == mFrameCount &&
+                                ((int)mChannelCount == mReqChannelCount || mFormat != AudioSystem::PCM_16_BIT)) {
+                                mBytesRead = mInput->read(buffer.raw, mInputBytes);
+                                framesOut = 0;
+                            } else {
+                                mBytesRead = mInput->read(mRsmpInBuffer, mInputBytes);
+                                mRsmpInIndex = 0;
+                            }
+                            if (mBytesRead < 0) {
+                                LOGE("Error reading audio input");
+                                if (mActiveTrack->mState == TrackBase::ACTIVE) {
+                                    // Force input into standby so that it tries to
+                                    // recover at next read attempt
+                                    mInput->standby();
+                                    usleep(5000);
+                                }
+                                mRsmpInIndex = mFrameCount;
+                                framesOut = 0;
+                                buffer.frameCount = 0;
+                            }
+                        }
+                    }
+                } else {
+                    // resampling
+
+                    memset(mRsmpOutBuffer, 0, framesOut * 2 * sizeof(int32_t));
+                    // alter output frame count as if we were expecting stereo samples
+                    if (mChannelCount == 1 && mReqChannelCount == 1) {
+                        framesOut >>= 1;
+                    }
+                    mResampler->resample(mRsmpOutBuffer, framesOut, this);
+                    // ditherAndClamp() works as long as all buffers returned by mActiveTrack->getNextBuffer()
+                    // are 32 bit aligned which should be always true.
+                    if (mChannelCount == 2 && mReqChannelCount == 1) {
+                        AudioMixer::ditherAndClamp(mRsmpOutBuffer, mRsmpOutBuffer, framesOut);
+                        // the resampler always outputs stereo samples: do post stereo to mono conversion
+                        int16_t *src = (int16_t *)mRsmpOutBuffer;
+                        int16_t *dst = buffer.i16;
+                        while (framesOut--) {
+                            *dst++ = (int16_t)(((int32_t)*src + (int32_t)*(src + 1)) >> 1);
+                            src += 2;
+                        }
+                    } else {
+                        AudioMixer::ditherAndClamp((int32_t *)buffer.raw, mRsmpOutBuffer, framesOut);
+                    }
+
+                }
+                mActiveTrack->releaseBuffer(&buffer);
+                mActiveTrack->overflow();
+            }
+            // client isn't retrieving buffers fast enough
+            else {
+                if (!mActiveTrack->setOverflow())
+                    LOGW("RecordThread: buffer overflow");
+                // Release the processor for a while before asking for a new buffer.
+                // This will give the application more chance to read from the buffer and
+                // clear the overflow.
+                usleep(5000);
+            }
+        }
+    }
+
+    if (!mStandby) {
+        mInput->standby();
+    }
+    mActiveTrack.clear();
+
+    mStartStopCond.broadcast();
+
+    LOGV("RecordThread %p exiting", this);
+    return false;
+}
+
+status_t AudioFlinger::RecordThread::start(RecordThread::RecordTrack* recordTrack)
+{
+    LOGV("RecordThread::start");
+    sp <ThreadBase> strongMe = this;
+    status_t status = NO_ERROR;
+    {
+        AutoMutex lock(&mLock);
+        if (mActiveTrack != 0) {
+            if (recordTrack != mActiveTrack.get()) {
+                status = -EBUSY;
+            } else if (mActiveTrack->mState == TrackBase::PAUSING) {
+                mActiveTrack->mState = TrackBase::ACTIVE;
+            }
+            return status;
+        }
+
+        recordTrack->mState = TrackBase::IDLE;
+        mActiveTrack = recordTrack;
+        mLock.unlock();
+        status_t status = AudioSystem::startInput(mId);
+        mLock.lock();
+        if (status != NO_ERROR) {
+            mActiveTrack.clear();
+            return status;
+        }
+        mActiveTrack->mState = TrackBase::RESUMING;
+        mRsmpInIndex = mFrameCount;
+        mBytesRead = 0;
+        // signal thread to start
+        LOGV("Signal record thread");
+        mWaitWorkCV.signal();
+        // do not wait for mStartStopCond if exiting
+        if (mExiting) {
+            mActiveTrack.clear();
+            status = INVALID_OPERATION;
+            goto startError;
+        }
+        mStartStopCond.wait(mLock);
+        if (mActiveTrack == 0) {
+            LOGV("Record failed to start");
+            status = BAD_VALUE;
+            goto startError;
+        }
+        LOGV("Record started OK");
+        return status;
+    }
+startError:
+    AudioSystem::stopInput(mId);
+    return status;
+}
+
+void AudioFlinger::RecordThread::stop(RecordThread::RecordTrack* recordTrack) {
+    LOGV("RecordThread::stop");
+    sp <ThreadBase> strongMe = this;
+    {
+        AutoMutex lock(&mLock);
+        if (mActiveTrack != 0 && recordTrack == mActiveTrack.get()) {
+            mActiveTrack->mState = TrackBase::PAUSING;
+            // do not wait for mStartStopCond if exiting
+            if (mExiting) {
+                return;
+            }
+            mStartStopCond.wait(mLock);
+            // if we have been restarted, recordTrack == mActiveTrack.get() here
+            if (mActiveTrack == 0 || recordTrack != mActiveTrack.get()) {
+                mLock.unlock();
+                AudioSystem::stopInput(mId);
+                mLock.lock();
+                LOGV("Record stopped OK");
+            }
+        }
+    }
+}
+
+status_t AudioFlinger::RecordThread::dump(int fd, const Vector<String16>& args)
+{
+    const size_t SIZE = 256;
+    char buffer[SIZE];
+    String8 result;
+    pid_t pid = 0;
+
+    snprintf(buffer, SIZE, "\nInput thread %p internals\n", this);
+    result.append(buffer);
+
+    if (mActiveTrack != 0) {
+        result.append("Active Track:\n");
+        result.append("   Clien Fmt Chn Session Buf  S SRate  Serv     User\n");
+        mActiveTrack->dump(buffer, SIZE);
+        result.append(buffer);
+
+        snprintf(buffer, SIZE, "In index: %d\n", mRsmpInIndex);
+        result.append(buffer);
+        snprintf(buffer, SIZE, "In size: %d\n", mInputBytes);
+        result.append(buffer);
+        snprintf(buffer, SIZE, "Resampling: %d\n", (mResampler != 0));
+        result.append(buffer);
+        snprintf(buffer, SIZE, "Out channel count: %d\n", mReqChannelCount);
+        result.append(buffer);
+        snprintf(buffer, SIZE, "Out sample rate: %d\n", mReqSampleRate);
+        result.append(buffer);
+
+
+    } else {
+        result.append("No record client\n");
+    }
+    write(fd, result.string(), result.size());
+
+    dumpBase(fd, args);
+
+    return NO_ERROR;
+}
+
+status_t AudioFlinger::RecordThread::getNextBuffer(AudioBufferProvider::Buffer* buffer)
+{
+    size_t framesReq = buffer->frameCount;
+    size_t framesReady = mFrameCount - mRsmpInIndex;
+    int channelCount;
+
+    if (framesReady == 0) {
+        mBytesRead = mInput->read(mRsmpInBuffer, mInputBytes);
+        if (mBytesRead < 0) {
+            LOGE("RecordThread::getNextBuffer() Error reading audio input");
+            if (mActiveTrack->mState == TrackBase::ACTIVE) {
+                // Force input into standby so that it tries to
+                // recover at next read attempt
+                mInput->standby();
+                usleep(5000);
+            }
+            buffer->raw = 0;
+            buffer->frameCount = 0;
+            return NOT_ENOUGH_DATA;
+        }
+        mRsmpInIndex = 0;
+        framesReady = mFrameCount;
+    }
+
+    if (framesReq > framesReady) {
+        framesReq = framesReady;
+    }
+
+    if (mChannelCount == 1 && mReqChannelCount == 2) {
+        channelCount = 1;
+    } else {
+        channelCount = 2;
+    }
+    buffer->raw = mRsmpInBuffer + mRsmpInIndex * channelCount;
+    buffer->frameCount = framesReq;
+    return NO_ERROR;
+}
+
+void AudioFlinger::RecordThread::releaseBuffer(AudioBufferProvider::Buffer* buffer)
+{
+    mRsmpInIndex += buffer->frameCount;
+    buffer->frameCount = 0;
+}
+
+bool AudioFlinger::RecordThread::checkForNewParameters_l()
+{
+    bool reconfig = false;
+
+    while (!mNewParameters.isEmpty()) {
+        status_t status = NO_ERROR;
+        String8 keyValuePair = mNewParameters[0];
+        AudioParameter param = AudioParameter(keyValuePair);
+        int value;
+        int reqFormat = mFormat;
+        int reqSamplingRate = mReqSampleRate;
+        int reqChannelCount = mReqChannelCount;
+
+        if (param.getInt(String8(AudioParameter::keySamplingRate), value) == NO_ERROR) {
+            reqSamplingRate = value;
+            reconfig = true;
+        }
+        if (param.getInt(String8(AudioParameter::keyFormat), value) == NO_ERROR) {
+            reqFormat = value;
+            reconfig = true;
+        }
+        if (param.getInt(String8(AudioParameter::keyChannels), value) == NO_ERROR) {
+            reqChannelCount = AudioSystem::popCount(value);
+            reconfig = true;
+        }
+        if (param.getInt(String8(AudioParameter::keyFrameCount), value) == NO_ERROR) {
+            // do not accept frame count changes if tracks are open as the track buffer
+            // size depends on frame count and correct behavior would not be garantied
+            // if frame count is changed after track creation
+            if (mActiveTrack != 0) {
+                status = INVALID_OPERATION;
+            } else {
+                reconfig = true;
+            }
+        }
+        if (status == NO_ERROR) {
+            status = mInput->setParameters(keyValuePair);
+            if (status == INVALID_OPERATION) {
+               mInput->standby();
+               status = mInput->setParameters(keyValuePair);
+            }
+            if (reconfig) {
+                if (status == BAD_VALUE &&
+                    reqFormat == mInput->format() && reqFormat == AudioSystem::PCM_16_BIT &&
+                    ((int)mInput->sampleRate() <= 2 * reqSamplingRate) &&
+                    (AudioSystem::popCount(mInput->channels()) < 3) && (reqChannelCount < 3)) {
+                    status = NO_ERROR;
+                }
+                if (status == NO_ERROR) {
+                    readInputParameters();
+                    sendConfigEvent_l(AudioSystem::INPUT_CONFIG_CHANGED);
+                }
+            }
+        }
+
+        mNewParameters.removeAt(0);
+
+        mParamStatus = status;
+        mParamCond.signal();
+        mWaitWorkCV.wait(mLock);
+    }
+    return reconfig;
+}
+
+String8 AudioFlinger::RecordThread::getParameters(const String8& keys)
+{
+    return mInput->getParameters(keys);
+}
+
+void AudioFlinger::RecordThread::audioConfigChanged_l(int event, int param) {
+    AudioSystem::OutputDescriptor desc;
+    void *param2 = 0;
+
+    switch (event) {
+    case AudioSystem::INPUT_OPENED:
+    case AudioSystem::INPUT_CONFIG_CHANGED:
+        desc.channels = mChannels;
+        desc.samplingRate = mSampleRate;
+        desc.format = mFormat;
+        desc.frameCount = mFrameCount;
+        desc.latency = 0;
+        param2 = &desc;
+        break;
+
+    case AudioSystem::INPUT_CLOSED:
+    default:
+        break;
+    }
+    mAudioFlinger->audioConfigChanged_l(event, mId, param2);
+}
+
+void AudioFlinger::RecordThread::readInputParameters()
+{
+    if (mRsmpInBuffer) delete mRsmpInBuffer;
+    if (mRsmpOutBuffer) delete mRsmpOutBuffer;
+    if (mResampler) delete mResampler;
+    mResampler = 0;
+
+    mSampleRate = mInput->sampleRate();
+    mChannels = mInput->channels();
+    mChannelCount = (uint16_t)AudioSystem::popCount(mChannels);
+    mFormat = mInput->format();
+    mFrameSize = (uint16_t)mInput->frameSize();
+    mInputBytes = mInput->bufferSize();
+    mFrameCount = mInputBytes / mFrameSize;
+    mRsmpInBuffer = new int16_t[mFrameCount * mChannelCount];
+
+    if (mSampleRate != mReqSampleRate && mChannelCount < 3 && mReqChannelCount < 3)
+    {
+        int channelCount;
+         // optmization: if mono to mono, use the resampler in stereo to stereo mode to avoid
+         // stereo to mono post process as the resampler always outputs stereo.
+        if (mChannelCount == 1 && mReqChannelCount == 2) {
+            channelCount = 1;
+        } else {
+            channelCount = 2;
+        }
+        mResampler = AudioResampler::create(16, channelCount, mReqSampleRate);
+        mResampler->setSampleRate(mSampleRate);
+        mResampler->setVolume(AudioMixer::UNITY_GAIN, AudioMixer::UNITY_GAIN);
+        mRsmpOutBuffer = new int32_t[mFrameCount * 2];
+
+        // optmization: if mono to mono, alter input frame count as if we were inputing stereo samples
+        if (mChannelCount == 1 && mReqChannelCount == 1) {
+            mFrameCount >>= 1;
+        }
+
+    }
+    mRsmpInIndex = mFrameCount;
+}
+
+unsigned int AudioFlinger::RecordThread::getInputFramesLost()
+{
+    return mInput->getInputFramesLost();
+}
+
+// ----------------------------------------------------------------------------
+
+int AudioFlinger::openOutput(uint32_t *pDevices,
+                                uint32_t *pSamplingRate,
+                                uint32_t *pFormat,
+                                uint32_t *pChannels,
+                                uint32_t *pLatencyMs,
+                                uint32_t flags)
+{
+    status_t status;
+    PlaybackThread *thread = NULL;
+    mHardwareStatus = AUDIO_HW_OUTPUT_OPEN;
+    uint32_t samplingRate = pSamplingRate ? *pSamplingRate : 0;
+    uint32_t format = pFormat ? *pFormat : 0;
+    uint32_t channels = pChannels ? *pChannels : 0;
+    uint32_t latency = pLatencyMs ? *pLatencyMs : 0;
+
+    LOGV("openOutput(), Device %x, SamplingRate %d, Format %d, Channels %x, flags %x",
+            pDevices ? *pDevices : 0,
+            samplingRate,
+            format,
+            channels,
+            flags);
+
+    if (pDevices == NULL || *pDevices == 0) {
+        return 0;
+    }
+    Mutex::Autolock _l(mLock);
+
+    AudioStreamOut *output = mAudioHardware->openOutputStream(*pDevices,
+                                                             (int *)&format,
+                                                             &channels,
+                                                             &samplingRate,
+                                                             &status);
+    LOGV("openOutput() openOutputStream returned output %p, SamplingRate %d, Format %d, Channels %x, status %d",
+            output,
+            samplingRate,
+            format,
+            channels,
+            status);
+
+    mHardwareStatus = AUDIO_HW_IDLE;
+    if (output != 0) {
+        int id = nextUniqueId();
+        if ((flags & AudioSystem::OUTPUT_FLAG_DIRECT) ||
+            (format != AudioSystem::PCM_16_BIT) ||
+            (channels != AudioSystem::CHANNEL_OUT_STEREO)) {
+            thread = new DirectOutputThread(this, output, id, *pDevices);
+            LOGV("openOutput() created direct output: ID %d thread %p", id, thread);
+        } else {
+            thread = new MixerThread(this, output, id, *pDevices);
+            LOGV("openOutput() created mixer output: ID %d thread %p", id, thread);
+
+#ifdef LVMX
+            unsigned bitsPerSample =
+                (format == AudioSystem::PCM_16_BIT) ? 16 :
+                    ((format == AudioSystem::PCM_8_BIT) ? 8 : 0);
+            unsigned channelCount = (channels == AudioSystem::CHANNEL_OUT_STEREO) ? 2 : 1;
+            int audioOutputType = LifeVibes::threadIdToAudioOutputType(thread->id());
+
+            LifeVibes::init_aot(audioOutputType, samplingRate, bitsPerSample, channelCount);
+            LifeVibes::setDevice(audioOutputType, *pDevices);
+#endif
+
+        }
+        mPlaybackThreads.add(id, thread);
+
+        if (pSamplingRate) *pSamplingRate = samplingRate;
+        if (pFormat) *pFormat = format;
+        if (pChannels) *pChannels = channels;
+        if (pLatencyMs) *pLatencyMs = thread->latency();
+
+        // notify client processes of the new output creation
+        thread->audioConfigChanged_l(AudioSystem::OUTPUT_OPENED);
+        return id;
+    }
+
+    return 0;
+}
+
+int AudioFlinger::openDuplicateOutput(int output1, int output2)
+{
+    Mutex::Autolock _l(mLock);
+    MixerThread *thread1 = checkMixerThread_l(output1);
+    MixerThread *thread2 = checkMixerThread_l(output2);
+
+    if (thread1 == NULL || thread2 == NULL) {
+        LOGW("openDuplicateOutput() wrong output mixer type for output %d or %d", output1, output2);
+        return 0;
+    }
+
+    int id = nextUniqueId();
+    DuplicatingThread *thread = new DuplicatingThread(this, thread1, id);
+    thread->addOutputTrack(thread2);
+    mPlaybackThreads.add(id, thread);
+    // notify client processes of the new output creation
+    thread->audioConfigChanged_l(AudioSystem::OUTPUT_OPENED);
+    return id;
+}
+
+status_t AudioFlinger::closeOutput(int output)
+{
+    // keep strong reference on the playback thread so that
+    // it is not destroyed while exit() is executed
+    sp <PlaybackThread> thread;
+    {
+        Mutex::Autolock _l(mLock);
+        thread = checkPlaybackThread_l(output);
+        if (thread == NULL) {
+            return BAD_VALUE;
+        }
+
+        LOGV("closeOutput() %d", output);
+
+        if (thread->type() == PlaybackThread::MIXER) {
+            for (size_t i = 0; i < mPlaybackThreads.size(); i++) {
+                if (mPlaybackThreads.valueAt(i)->type() == PlaybackThread::DUPLICATING) {
+                    DuplicatingThread *dupThread = (DuplicatingThread *)mPlaybackThreads.valueAt(i).get();
+                    dupThread->removeOutputTrack((MixerThread *)thread.get());
+                }
+            }
+        }
+        void *param2 = 0;
+        audioConfigChanged_l(AudioSystem::OUTPUT_CLOSED, output, param2);
+        mPlaybackThreads.removeItem(output);
+    }
+    thread->exit();
+
+    if (thread->type() != PlaybackThread::DUPLICATING) {
+        mAudioHardware->closeOutputStream(thread->getOutput());
+    }
+    return NO_ERROR;
+}
+
+status_t AudioFlinger::suspendOutput(int output)
+{
+    Mutex::Autolock _l(mLock);
+    PlaybackThread *thread = checkPlaybackThread_l(output);
+
+    if (thread == NULL) {
+        return BAD_VALUE;
+    }
+
+    LOGV("suspendOutput() %d", output);
+    thread->suspend();
+
+    return NO_ERROR;
+}
+
+status_t AudioFlinger::restoreOutput(int output)
+{
+    Mutex::Autolock _l(mLock);
+    PlaybackThread *thread = checkPlaybackThread_l(output);
+
+    if (thread == NULL) {
+        return BAD_VALUE;
+    }
+
+    LOGV("restoreOutput() %d", output);
+
+    thread->restore();
+
+    return NO_ERROR;
+}
+
+int AudioFlinger::openInput(uint32_t *pDevices,
+                                uint32_t *pSamplingRate,
+                                uint32_t *pFormat,
+                                uint32_t *pChannels,
+                                uint32_t acoustics)
+{
+    status_t status;
+    RecordThread *thread = NULL;
+    uint32_t samplingRate = pSamplingRate ? *pSamplingRate : 0;
+    uint32_t format = pFormat ? *pFormat : 0;
+    uint32_t channels = pChannels ? *pChannels : 0;
+    uint32_t reqSamplingRate = samplingRate;
+    uint32_t reqFormat = format;
+    uint32_t reqChannels = channels;
+
+    if (pDevices == NULL || *pDevices == 0) {
+        return 0;
+    }
+    Mutex::Autolock _l(mLock);
+
+    AudioStreamIn *input = mAudioHardware->openInputStream(*pDevices,
+                                                             (int *)&format,
+                                                             &channels,
+                                                             &samplingRate,
+                                                             &status,
+                                                             (AudioSystem::audio_in_acoustics)acoustics);
+    LOGV("openInput() openInputStream returned input %p, SamplingRate %d, Format %d, Channels %x, acoustics %x, status %d",
+            input,
+            samplingRate,
+            format,
+            channels,
+            acoustics,
+            status);
+
+    // If the input could not be opened with the requested parameters and we can handle the conversion internally,
+    // try to open again with the proposed parameters. The AudioFlinger can resample the input and do mono to stereo
+    // or stereo to mono conversions on 16 bit PCM inputs.
+    if (input == 0 && status == BAD_VALUE &&
+        reqFormat == format && format == AudioSystem::PCM_16_BIT &&
+        (samplingRate <= 2 * reqSamplingRate) &&
+        (AudioSystem::popCount(channels) < 3) && (AudioSystem::popCount(reqChannels) < 3)) {
+        LOGV("openInput() reopening with proposed sampling rate and channels");
+        input = mAudioHardware->openInputStream(*pDevices,
+                                                 (int *)&format,
+                                                 &channels,
+                                                 &samplingRate,
+                                                 &status,
+                                                 (AudioSystem::audio_in_acoustics)acoustics);
+    }
+
+    if (input != 0) {
+        int id = nextUniqueId();
+         // Start record thread
+        thread = new RecordThread(this, input, reqSamplingRate, reqChannels, id);
+        mRecordThreads.add(id, thread);
+        LOGV("openInput() created record thread: ID %d thread %p", id, thread);
+        if (pSamplingRate) *pSamplingRate = reqSamplingRate;
+        if (pFormat) *pFormat = format;
+        if (pChannels) *pChannels = reqChannels;
+
+        input->standby();
+
+        // notify client processes of the new input creation
+        thread->audioConfigChanged_l(AudioSystem::INPUT_OPENED);
+        return id;
+    }
+
+    return 0;
+}
+
+status_t AudioFlinger::closeInput(int input)
+{
+    // keep strong reference on the record thread so that
+    // it is not destroyed while exit() is executed
+    sp <RecordThread> thread;
+    {
+        Mutex::Autolock _l(mLock);
+        thread = checkRecordThread_l(input);
+        if (thread == NULL) {
+            return BAD_VALUE;
+        }
+
+        LOGV("closeInput() %d", input);
+        void *param2 = 0;
+        audioConfigChanged_l(AudioSystem::INPUT_CLOSED, input, param2);
+        mRecordThreads.removeItem(input);
+    }
+    thread->exit();
+
+    mAudioHardware->closeInputStream(thread->getInput());
+
+    return NO_ERROR;
+}
+
+status_t AudioFlinger::setStreamOutput(uint32_t stream, int output)
+{
+    Mutex::Autolock _l(mLock);
+    MixerThread *dstThread = checkMixerThread_l(output);
+    if (dstThread == NULL) {
+        LOGW("setStreamOutput() bad output id %d", output);
+        return BAD_VALUE;
+    }
+
+    LOGV("setStreamOutput() stream %d to output %d", stream, output);
+    audioConfigChanged_l(AudioSystem::STREAM_CONFIG_CHANGED, output, &stream);
+
+    for (size_t i = 0; i < mPlaybackThreads.size(); i++) {
+        PlaybackThread *thread = mPlaybackThreads.valueAt(i).get();
+        if (thread != dstThread &&
+            thread->type() != PlaybackThread::DIRECT) {
+            MixerThread *srcThread = (MixerThread *)thread;
+            srcThread->invalidateTracks(stream);
+            }
+        }
+
+    return NO_ERROR;
+}
+
+
+int AudioFlinger::newAudioSessionId()
+{
+    return nextUniqueId();
+}
+
+// checkPlaybackThread_l() must be called with AudioFlinger::mLock held
+AudioFlinger::PlaybackThread *AudioFlinger::checkPlaybackThread_l(int output) const
+{
+    PlaybackThread *thread = NULL;
+    if (mPlaybackThreads.indexOfKey(output) >= 0) {
+        thread = (PlaybackThread *)mPlaybackThreads.valueFor(output).get();
+    }
+    return thread;
+}
+
+// checkMixerThread_l() must be called with AudioFlinger::mLock held
+AudioFlinger::MixerThread *AudioFlinger::checkMixerThread_l(int output) const
+{
+    PlaybackThread *thread = checkPlaybackThread_l(output);
+    if (thread != NULL) {
+        if (thread->type() == PlaybackThread::DIRECT) {
+            thread = NULL;
+        }
+    }
+    return (MixerThread *)thread;
+}
+
+// checkRecordThread_l() must be called with AudioFlinger::mLock held
+AudioFlinger::RecordThread *AudioFlinger::checkRecordThread_l(int input) const
+{
+    RecordThread *thread = NULL;
+    if (mRecordThreads.indexOfKey(input) >= 0) {
+        thread = (RecordThread *)mRecordThreads.valueFor(input).get();
+    }
+    return thread;
+}
+
+int AudioFlinger::nextUniqueId()
+{
+    return android_atomic_inc(&mNextUniqueId);
+}
+
+// ----------------------------------------------------------------------------
+//  Effect management
+// ----------------------------------------------------------------------------
+
+
+status_t AudioFlinger::loadEffectLibrary(const char *libPath, int *handle)
+{
+    Mutex::Autolock _l(mLock);
+    return EffectLoadLibrary(libPath, handle);
+}
+
+status_t AudioFlinger::unloadEffectLibrary(int handle)
+{
+    Mutex::Autolock _l(mLock);
+    return EffectUnloadLibrary(handle);
+}
+
+status_t AudioFlinger::queryNumberEffects(uint32_t *numEffects)
+{
+    Mutex::Autolock _l(mLock);
+    return EffectQueryNumberEffects(numEffects);
+}
+
+status_t AudioFlinger::queryEffect(uint32_t index, effect_descriptor_t *descriptor)
+{
+    Mutex::Autolock _l(mLock);
+    return EffectQueryEffect(index, descriptor);
+}
+
+status_t AudioFlinger::getEffectDescriptor(effect_uuid_t *pUuid, effect_descriptor_t *descriptor)
+{
+    Mutex::Autolock _l(mLock);
+    return EffectGetDescriptor(pUuid, descriptor);
+}
+
+
+// this UUID must match the one defined in media/libeffects/EffectVisualizer.cpp
+static const effect_uuid_t VISUALIZATION_UUID_ =
+    {0xd069d9e0, 0x8329, 0x11df, 0x9168, {0x00, 0x02, 0xa5, 0xd5, 0xc5, 0x1b}};
+
+sp<IEffect> AudioFlinger::createEffect(pid_t pid,
+        effect_descriptor_t *pDesc,
+        const sp<IEffectClient>& effectClient,
+        int32_t priority,
+        int output,
+        int sessionId,
+        status_t *status,
+        int *id,
+        int *enabled)
+{
+    status_t lStatus = NO_ERROR;
+    sp<EffectHandle> handle;
+    effect_interface_t itfe;
+    effect_descriptor_t desc;
+    sp<Client> client;
+    wp<Client> wclient;
+
+    LOGV("createEffect pid %d, client %p, priority %d, sessionId %d, output %d", pid, effectClient.get(), priority, sessionId, output);
+
+    if (pDesc == NULL) {
+        lStatus = BAD_VALUE;
+        goto Exit;
+    }
+
+    {
+        Mutex::Autolock _l(mLock);
+
+        // check recording permission for visualizer
+        if (memcmp(&pDesc->type, SL_IID_VISUALIZATION, sizeof(effect_uuid_t)) == 0 ||
+            memcmp(&pDesc->uuid, &VISUALIZATION_UUID_, sizeof(effect_uuid_t)) == 0) {
+            if (!recordingAllowed()) {
+                lStatus = PERMISSION_DENIED;
+                goto Exit;
+            }
+        }
+
+        if (!EffectIsNullUuid(&pDesc->uuid)) {
+            // if uuid is specified, request effect descriptor
+            lStatus = EffectGetDescriptor(&pDesc->uuid, &desc);
+            if (lStatus < 0) {
+                LOGW("createEffect() error %d from EffectGetDescriptor", lStatus);
+                goto Exit;
+            }
+        } else {
+            // if uuid is not specified, look for an available implementation
+            // of the required type in effect factory
+            if (EffectIsNullUuid(&pDesc->type)) {
+                LOGW("createEffect() no effect type");
+                lStatus = BAD_VALUE;
+                goto Exit;
+            }
+            uint32_t numEffects = 0;
+            effect_descriptor_t d;
+            bool found = false;
+
+            lStatus = EffectQueryNumberEffects(&numEffects);
+            if (lStatus < 0) {
+                LOGW("createEffect() error %d from EffectQueryNumberEffects", lStatus);
+                goto Exit;
+            }
+            for (uint32_t i = 0; i < numEffects; i++) {
+                lStatus = EffectQueryEffect(i, &desc);
+                if (lStatus < 0) {
+                    LOGW("createEffect() error %d from EffectQueryEffect", lStatus);
+                    continue;
+                }
+                if (memcmp(&desc.type, &pDesc->type, sizeof(effect_uuid_t)) == 0) {
+                    // If matching type found save effect descriptor. If the session is
+                    // 0 and the effect is not auxiliary, continue enumeration in case
+                    // an auxiliary version of this effect type is available
+                    found = true;
+                    memcpy(&d, &desc, sizeof(effect_descriptor_t));
+                    if (sessionId != 0 ||
+                            (desc.flags & EFFECT_FLAG_TYPE_MASK) == EFFECT_FLAG_TYPE_AUXILIARY) {
+                        break;
+                    }
+                }
+            }
+            if (!found) {
+                lStatus = BAD_VALUE;
+                LOGW("createEffect() effect not found");
+                goto Exit;
+            }
+            // For same effect type, chose auxiliary version over insert version if
+            // connect to output mix (Compliance to OpenSL ES)
+            if (sessionId == 0 &&
+                    (d.flags & EFFECT_FLAG_TYPE_MASK) != EFFECT_FLAG_TYPE_AUXILIARY) {
+                memcpy(&desc, &d, sizeof(effect_descriptor_t));
+            }
+        }
+
+        // Do not allow auxiliary effects on a session different from 0 (output mix)
+        if (sessionId != 0 &&
+             (desc.flags & EFFECT_FLAG_TYPE_MASK) == EFFECT_FLAG_TYPE_AUXILIARY) {
+            lStatus = INVALID_OPERATION;
+            goto Exit;
+        }
+
+        // Session -1 is reserved for output stage effects that can only be created
+        // by audio policy manager (running in same process)
+        if (sessionId == -1 && getpid() != IPCThreadState::self()->getCallingPid()) {
+            lStatus = INVALID_OPERATION;
+            goto Exit;
+        }
+
+        // return effect descriptor
+        memcpy(pDesc, &desc, sizeof(effect_descriptor_t));
+
+        // If output is not specified try to find a matching audio session ID in one of the
+        // output threads.
+        // TODO: allow attachment of effect to inputs
+        if (output == 0) {
+            if (sessionId <= 0) {
+                // default to first output
+                // TODO: define criteria to choose output when not specified. Or
+                // receive output from audio policy manager
+                if (mPlaybackThreads.size() != 0) {
+                    output = mPlaybackThreads.keyAt(0);
+                }
+            } else {
+                 // look for the thread where the specified audio session is present
+                for (size_t i = 0; i < mPlaybackThreads.size(); i++) {
+                    if (mPlaybackThreads.valueAt(i)->hasAudioSession(sessionId)) {
+                        output = mPlaybackThreads.keyAt(i);
+                        break;
+                    }
+                }
+            }
+        }
+        PlaybackThread *thread = checkPlaybackThread_l(output);
+        if (thread == NULL) {
+            LOGE("unknown output thread");
+            lStatus = BAD_VALUE;
+            goto Exit;
+        }
+
+        wclient = mClients.valueFor(pid);
+
+        if (wclient != NULL) {
+            client = wclient.promote();
+        } else {
+            client = new Client(this, pid);
+            mClients.add(pid, client);
+        }
+
+        // create effect on selected output trhead
+        handle = thread->createEffect_l(client, effectClient, priority, sessionId, &desc, enabled, &lStatus);
+        if (handle != 0 && id != NULL) {
+            *id = handle->id();
+        }
+    }
+
+Exit:
+    if(status) {
+        *status = lStatus;
+    }
+    return handle;
+}
+
+status_t AudioFlinger::registerEffectResource_l(effect_descriptor_t *desc) {
+    if (mTotalEffectsCpuLoad + desc->cpuLoad > MAX_EFFECTS_CPU_LOAD) {
+        LOGW("registerEffectResource() CPU Load limit exceeded for Fx %s, CPU %f MIPS",
+                desc->name, (float)desc->cpuLoad/10);
+        return INVALID_OPERATION;
+    }
+    if (mTotalEffectsMemory + desc->memoryUsage > MAX_EFFECTS_MEMORY) {
+        LOGW("registerEffectResource() memory limit exceeded for Fx %s, Memory %d KB",
+                desc->name, desc->memoryUsage);
+        return INVALID_OPERATION;
+    }
+    mTotalEffectsCpuLoad += desc->cpuLoad;
+    mTotalEffectsMemory += desc->memoryUsage;
+    LOGV("registerEffectResource_l() effect %s, CPU %d, memory %d",
+            desc->name, desc->cpuLoad, desc->memoryUsage);
+    LOGV("  total CPU %d, total memory %d", mTotalEffectsCpuLoad, mTotalEffectsMemory);
+    return NO_ERROR;
+}
+
+void AudioFlinger::unregisterEffectResource_l(effect_descriptor_t *desc) {
+    mTotalEffectsCpuLoad -= desc->cpuLoad;
+    mTotalEffectsMemory -= desc->memoryUsage;
+    LOGV("unregisterEffectResource_l() effect %s, CPU %d, memory %d",
+            desc->name, desc->cpuLoad, desc->memoryUsage);
+    LOGV("  total CPU %d, total memory %d", mTotalEffectsCpuLoad, mTotalEffectsMemory);
+}
+
+// PlaybackThread::createEffect_l() must be called with AudioFlinger::mLock held
+sp<AudioFlinger::EffectHandle> AudioFlinger::PlaybackThread::createEffect_l(
+        const sp<AudioFlinger::Client>& client,
+        const sp<IEffectClient>& effectClient,
+        int32_t priority,
+        int sessionId,
+        effect_descriptor_t *desc,
+        int *enabled,
+        status_t *status
+        )
+{
+    sp<EffectModule> effect;
+    sp<EffectHandle> handle;
+    status_t lStatus;
+    sp<Track> track;
+    sp<EffectChain> chain;
+    bool effectCreated = false;
+    bool effectRegistered = false;
+
+    if (mOutput == 0) {
+        LOGW("createEffect_l() Audio driver not initialized.");
+        lStatus = NO_INIT;
+        goto Exit;
+    }
+
+    // Do not allow auxiliary effect on session other than 0
+    if ((desc->flags & EFFECT_FLAG_TYPE_MASK) == EFFECT_FLAG_TYPE_AUXILIARY &&
+        sessionId != 0) {
+        LOGW("createEffect_l() Cannot add auxiliary effect %s to session %d", desc->name, sessionId);
+        lStatus = BAD_VALUE;
+        goto Exit;
+    }
+
+    // Do not allow effects with session ID 0 on direct output or duplicating threads
+    // TODO: add rule for hw accelerated effects on direct outputs with non PCM format
+    if (sessionId == 0 && mType != MIXER) {
+        LOGW("createEffect_l() Cannot add auxiliary effect %s to session %d", desc->name, sessionId);
+        lStatus = BAD_VALUE;
+        goto Exit;
+    }
+
+    LOGV("createEffect_l() thread %p effect %s on session %d", this, desc->name, sessionId);
+
+    { // scope for mLock
+        Mutex::Autolock _l(mLock);
+
+        // check for existing effect chain with the requested audio session
+        chain = getEffectChain_l(sessionId);
+        if (chain == 0) {
+            // create a new chain for this session
+            LOGV("createEffect_l() new effect chain for session %d", sessionId);
+            chain = new EffectChain(this, sessionId);
+            addEffectChain_l(chain);
+        } else {
+            effect = chain->getEffectFromDesc_l(desc);
+        }
+
+        LOGV("createEffect_l() got effect %p on chain %p", effect == 0 ? 0 : effect.get(), chain.get());
+
+        if (effect == 0) {
+            // Check CPU and memory usage
+            lStatus = mAudioFlinger->registerEffectResource_l(desc);
+            if (lStatus != NO_ERROR) {
+                goto Exit;
+            }
+            effectRegistered = true;
+            // create a new effect module if none present in the chain
+            effect = new EffectModule(this, chain, desc, mAudioFlinger->nextUniqueId(), sessionId);
+            lStatus = effect->status();
+            if (lStatus != NO_ERROR) {
+                goto Exit;
+            }
+            lStatus = chain->addEffect_l(effect);
+            if (lStatus != NO_ERROR) {
+                goto Exit;
+            }
+            effectCreated = true;
+
+            effect->setDevice(mDevice);
+            effect->setMode(mAudioFlinger->getMode());
+        }
+        // create effect handle and connect it to effect module
+        handle = new EffectHandle(effect, client, effectClient, priority);
+        lStatus = effect->addHandle(handle);
+        if (enabled) {
+            *enabled = (int)effect->isEnabled();
+        }
+    }
+
+Exit:
+    if (lStatus != NO_ERROR && lStatus != ALREADY_EXISTS) {
+        if (effectCreated) {
+            Mutex::Autolock _l(mLock);
+            if (chain->removeEffect_l(effect) == 0) {
+                removeEffectChain_l(chain);
+            }
+        }
+        if (effectRegistered) {
+            mAudioFlinger->unregisterEffectResource_l(desc);
+        }
+        handle.clear();
+    }
+
+    if(status) {
+        *status = lStatus;
+    }
+    return handle;
+}
+
+void AudioFlinger::PlaybackThread::disconnectEffect(const sp< EffectModule>& effect,
+                                                    const wp<EffectHandle>& handle) {
+    effect_descriptor_t desc = effect->desc();
+    Mutex::Autolock _l(mLock);
+    // delete the effect module if removing last handle on it
+    if (effect->removeHandle(handle) == 0) {
+        if ((desc.flags & EFFECT_FLAG_TYPE_MASK) == EFFECT_FLAG_TYPE_AUXILIARY) {
+            detachAuxEffect_l(effect->id());
+        }
+        sp<EffectChain> chain = effect->chain().promote();
+        if (chain != 0) {
+            // remove effect chain if remove last effect
+            if (chain->removeEffect_l(effect) == 0) {
+                removeEffectChain_l(chain);
+            }
+        }
+        mLock.unlock();
+        mAudioFlinger->mLock.lock();
+        mAudioFlinger->unregisterEffectResource_l(&desc);
+        mAudioFlinger->mLock.unlock();
+    }
+}
+
+status_t AudioFlinger::PlaybackThread::addEffectChain_l(const sp<EffectChain>& chain)
+{
+    int session = chain->sessionId();
+    int16_t *buffer = mMixBuffer;
+    bool ownsBuffer = false;
+
+    LOGV("addEffectChain_l() %p on thread %p for session %d", chain.get(), this, session);
+    if (session > 0) {
+        // Only one effect chain can be present in direct output thread and it uses
+        // the mix buffer as input
+        if (mType != DIRECT) {
+            size_t numSamples = mFrameCount * mChannelCount;
+            buffer = new int16_t[numSamples];
+            memset(buffer, 0, numSamples * sizeof(int16_t));
+            LOGV("addEffectChain_l() creating new input buffer %p session %d", buffer, session);
+            ownsBuffer = true;
+        }
+
+        // Attach all tracks with same session ID to this chain.
+        for (size_t i = 0; i < mTracks.size(); ++i) {
+            sp<Track> track = mTracks[i];
+            if (session == track->sessionId()) {
+                LOGV("addEffectChain_l() track->setMainBuffer track %p buffer %p", track.get(), buffer);
+                track->setMainBuffer(buffer);
+            }
+        }
+
+        // indicate all active tracks in the chain
+        for (size_t i = 0 ; i < mActiveTracks.size() ; ++i) {
+            sp<Track> track = mActiveTracks[i].promote();
+            if (track == 0) continue;
+            if (session == track->sessionId()) {
+                LOGV("addEffectChain_l() activating track %p on session %d", track.get(), session);
+                chain->startTrack();
+            }
+        }
+    }
+
+    chain->setInBuffer(buffer, ownsBuffer);
+    chain->setOutBuffer(mMixBuffer);
+    // Effect chain for session -1 is inserted at end of effect chains list
+    // in order to be processed last as it contains output stage effects
+    // Effect chain for session 0 is inserted before session -1 to be processed
+    // after track specific effects and before output stage
+    // Effect chain for session other than 0 is inserted at beginning of effect
+    // chains list to be processed before output mix effects. Relative order between
+    // sessions other than 0 is not important
+    size_t size = mEffectChains.size();
+    size_t i = 0;
+    for (i = 0; i < size; i++) {
+        if (mEffectChains[i]->sessionId() < session) break;
+    }
+    mEffectChains.insertAt(chain, i);
+
+    return NO_ERROR;
+}
+
+size_t AudioFlinger::PlaybackThread::removeEffectChain_l(const sp<EffectChain>& chain)
+{
+    int session = chain->sessionId();
+
+    LOGV("removeEffectChain_l() %p from thread %p for session %d", chain.get(), this, session);
+
+    for (size_t i = 0; i < mEffectChains.size(); i++) {
+        if (chain == mEffectChains[i]) {
+            mEffectChains.removeAt(i);
+            // detach all tracks with same session ID from this chain
+            for (size_t i = 0; i < mTracks.size(); ++i) {
+                sp<Track> track = mTracks[i];
+                if (session == track->sessionId()) {
+                    track->setMainBuffer(mMixBuffer);
+                }
+            }
+        }
+    }
+    return mEffectChains.size();
+}
+
+void AudioFlinger::PlaybackThread::lockEffectChains_l()
+{
+    for (size_t i = 0; i < mEffectChains.size(); i++) {
+        mEffectChains[i]->lock();
+    }
+}
+
+void AudioFlinger::PlaybackThread::unlockEffectChains()
+{
+    Mutex::Autolock _l(mLock);
+    for (size_t i = 0; i < mEffectChains.size(); i++) {
+        mEffectChains[i]->unlock();
+    }
+}
+
+sp<AudioFlinger::EffectModule> AudioFlinger::PlaybackThread::getEffect_l(int sessionId, int effectId)
+{
+    sp<EffectModule> effect;
+
+    sp<EffectChain> chain = getEffectChain_l(sessionId);
+    if (chain != 0) {
+        effect = chain->getEffectFromId_l(effectId);
+    }
+    return effect;
+}
+
+status_t AudioFlinger::PlaybackThread::attachAuxEffect(const sp<AudioFlinger::PlaybackThread::Track> track, int EffectId)
+{
+    Mutex::Autolock _l(mLock);
+    return attachAuxEffect_l(track, EffectId);
+}
+
+status_t AudioFlinger::PlaybackThread::attachAuxEffect_l(const sp<AudioFlinger::PlaybackThread::Track> track, int EffectId)
+{
+    status_t status = NO_ERROR;
+
+    if (EffectId == 0) {
+        track->setAuxBuffer(0, NULL);
+    } else {
+        // Auxiliary effects are always in audio session 0
+        sp<EffectModule> effect = getEffect_l(0, EffectId);
+        if (effect != 0) {
+            if ((effect->desc().flags & EFFECT_FLAG_TYPE_MASK) == EFFECT_FLAG_TYPE_AUXILIARY) {
+                track->setAuxBuffer(EffectId, (int32_t *)effect->inBuffer());
+            } else {
+                status = INVALID_OPERATION;
+            }
+        } else {
+            status = BAD_VALUE;
+        }
+    }
+    return status;
+}
+
+void AudioFlinger::PlaybackThread::detachAuxEffect_l(int effectId)
+{
+     for (size_t i = 0; i < mTracks.size(); ++i) {
+        sp<Track> track = mTracks[i];
+        if (track->auxEffectId() == effectId) {
+            attachAuxEffect_l(track, 0);
+        }
+    }
+}
+
+// ----------------------------------------------------------------------------
+//  EffectModule implementation
+// ----------------------------------------------------------------------------
+
+#undef LOG_TAG
+#define LOG_TAG "AudioFlinger::EffectModule"
+
+AudioFlinger::EffectModule::EffectModule(const wp<ThreadBase>& wThread,
+                                        const wp<AudioFlinger::EffectChain>& chain,
+                                        effect_descriptor_t *desc,
+                                        int id,
+                                        int sessionId)
+    : mThread(wThread), mChain(chain), mId(id), mSessionId(sessionId), mEffectInterface(NULL),
+      mStatus(NO_INIT), mState(IDLE)
+{
+    LOGV("Constructor %p", this);
+    int lStatus;
+    sp<ThreadBase> thread = mThread.promote();
+    if (thread == 0) {
+        return;
+    }
+    PlaybackThread *p = (PlaybackThread *)thread.get();
+
+    memcpy(&mDescriptor, desc, sizeof(effect_descriptor_t));
+
+    // create effect engine from effect factory
+    mStatus = EffectCreate(&desc->uuid, sessionId, p->id(), &mEffectInterface);
+
+    if (mStatus != NO_ERROR) {
+        return;
+    }
+    lStatus = init();
+    if (lStatus < 0) {
+        mStatus = lStatus;
+        goto Error;
+    }
+
+    LOGV("Constructor success name %s, Interface %p", mDescriptor.name, mEffectInterface);
+    return;
+Error:
+    EffectRelease(mEffectInterface);
+    mEffectInterface = NULL;
+    LOGV("Constructor Error %d", mStatus);
+}
+
+AudioFlinger::EffectModule::~EffectModule()
+{
+    LOGV("Destructor %p", this);
+    if (mEffectInterface != NULL) {
+        // release effect engine
+        EffectRelease(mEffectInterface);
+    }
+}
+
+status_t AudioFlinger::EffectModule::addHandle(sp<EffectHandle>& handle)
+{
+    status_t status;
+
+    Mutex::Autolock _l(mLock);
+    // First handle in mHandles has highest priority and controls the effect module
+    int priority = handle->priority();
+    size_t size = mHandles.size();
+    sp<EffectHandle> h;
+    size_t i;
+    for (i = 0; i < size; i++) {
+        h = mHandles[i].promote();
+        if (h == 0) continue;
+        if (h->priority() <= priority) break;
+    }
+    // if inserted in first place, move effect control from previous owner to this handle
+    if (i == 0) {
+        if (h != 0) {
+            h->setControl(false, true);
+        }
+        handle->setControl(true, false);
+        status = NO_ERROR;
+    } else {
+        status = ALREADY_EXISTS;
+    }
+    mHandles.insertAt(handle, i);
+    return status;
+}
+
+size_t AudioFlinger::EffectModule::removeHandle(const wp<EffectHandle>& handle)
+{
+    Mutex::Autolock _l(mLock);
+    size_t size = mHandles.size();
+    size_t i;
+    for (i = 0; i < size; i++) {
+        if (mHandles[i] == handle) break;
+    }
+    if (i == size) {
+        return size;
+    }
+    mHandles.removeAt(i);
+    size = mHandles.size();
+    // if removed from first place, move effect control from this handle to next in line
+    if (i == 0 && size != 0) {
+        sp<EffectHandle> h = mHandles[0].promote();
+        if (h != 0) {
+            h->setControl(true, true);
+        }
+    }
+
+    return size;
+}
+
+void AudioFlinger::EffectModule::disconnect(const wp<EffectHandle>& handle)
+{
+    // keep a strong reference on this EffectModule to avoid calling the
+    // destructor before we exit
+    sp<EffectModule> keep(this);
+    {
+        sp<ThreadBase> thread = mThread.promote();
+        if (thread != 0) {
+            PlaybackThread *playbackThread = (PlaybackThread *)thread.get();
+            playbackThread->disconnectEffect(keep, handle);
+        }
+    }
+}
+
+void AudioFlinger::EffectModule::updateState() {
+    Mutex::Autolock _l(mLock);
+
+    switch (mState) {
+    case RESTART:
+        reset_l();
+        // FALL THROUGH
+
+    case STARTING:
+        // clear auxiliary effect input buffer for next accumulation
+        if ((mDescriptor.flags & EFFECT_FLAG_TYPE_MASK) == EFFECT_FLAG_TYPE_AUXILIARY) {
+            memset(mConfig.inputCfg.buffer.raw,
+                   0,
+                   mConfig.inputCfg.buffer.frameCount*sizeof(int32_t));
+        }
+        start_l();
+        mState = ACTIVE;
+        break;
+    case STOPPING:
+        stop_l();
+        mDisableWaitCnt = mMaxDisableWaitCnt;
+        mState = STOPPED;
+        break;
+    case STOPPED:
+        // mDisableWaitCnt is forced to 1 by process() when the engine indicates the end of the
+        // turn off sequence.
+        if (--mDisableWaitCnt == 0) {
+            reset_l();
+            mState = IDLE;
+        }
+        break;
+    default: //IDLE , ACTIVE
+        break;
+    }
+}
+
+void AudioFlinger::EffectModule::process()
+{
+    Mutex::Autolock _l(mLock);
+
+    if (mEffectInterface == NULL ||
+            mConfig.inputCfg.buffer.raw == NULL ||
+            mConfig.outputCfg.buffer.raw == NULL) {
+        return;
+    }
+
+    if (mState == ACTIVE || mState == STOPPING || mState == STOPPED) {
+        // do 32 bit to 16 bit conversion for auxiliary effect input buffer
+        if ((mDescriptor.flags & EFFECT_FLAG_TYPE_MASK) == EFFECT_FLAG_TYPE_AUXILIARY) {
+            AudioMixer::ditherAndClamp(mConfig.inputCfg.buffer.s32,
+                                        mConfig.inputCfg.buffer.s32,
+                                        mConfig.inputCfg.buffer.frameCount);
+        }
+
+        // do the actual processing in the effect engine
+        int ret = (*mEffectInterface)->process(mEffectInterface,
+                                               &mConfig.inputCfg.buffer,
+                                               &mConfig.outputCfg.buffer);
+
+        // force transition to IDLE state when engine is ready
+        if (mState == STOPPED && ret == -ENODATA) {
+            mDisableWaitCnt = 1;
+        }
+
+        // clear auxiliary effect input buffer for next accumulation
+        if ((mDescriptor.flags & EFFECT_FLAG_TYPE_MASK) == EFFECT_FLAG_TYPE_AUXILIARY) {
+            memset(mConfig.inputCfg.buffer.raw, 0, mConfig.inputCfg.buffer.frameCount*sizeof(int32_t));
+        }
+    } else if ((mDescriptor.flags & EFFECT_FLAG_TYPE_MASK) == EFFECT_FLAG_TYPE_INSERT &&
+                mConfig.inputCfg.buffer.raw != mConfig.outputCfg.buffer.raw){
+        // If an insert effect is idle and input buffer is different from output buffer, copy input to
+        // output
+        sp<EffectChain> chain = mChain.promote();
+        if (chain != 0 && chain->activeTracks() != 0) {
+            size_t size = mConfig.inputCfg.buffer.frameCount * sizeof(int16_t);
+            if (mConfig.inputCfg.channels == CHANNEL_STEREO) {
+                size *= 2;
+            }
+            memcpy(mConfig.outputCfg.buffer.raw, mConfig.inputCfg.buffer.raw, size);
+        }
+    }
+}
+
+void AudioFlinger::EffectModule::reset_l()
+{
+    if (mEffectInterface == NULL) {
+        return;
+    }
+    (*mEffectInterface)->command(mEffectInterface, EFFECT_CMD_RESET, 0, NULL, 0, NULL);
+}
+
+status_t AudioFlinger::EffectModule::configure()
+{
+    uint32_t channels;
+    if (mEffectInterface == NULL) {
+        return NO_INIT;
+    }
+
+    sp<ThreadBase> thread = mThread.promote();
+    if (thread == 0) {
+        return DEAD_OBJECT;
+    }
+
+    // TODO: handle configuration of effects replacing track process
+    if (thread->channelCount() == 1) {
+        channels = CHANNEL_MONO;
+    } else {
+        channels = CHANNEL_STEREO;
+    }
+
+    if ((mDescriptor.flags & EFFECT_FLAG_TYPE_MASK) == EFFECT_FLAG_TYPE_AUXILIARY) {
+        mConfig.inputCfg.channels = CHANNEL_MONO;
+    } else {
+        mConfig.inputCfg.channels = channels;
+    }
+    mConfig.outputCfg.channels = channels;
+    mConfig.inputCfg.format = SAMPLE_FORMAT_PCM_S15;
+    mConfig.outputCfg.format = SAMPLE_FORMAT_PCM_S15;
+    mConfig.inputCfg.samplingRate = thread->sampleRate();
+    mConfig.outputCfg.samplingRate = mConfig.inputCfg.samplingRate;
+    mConfig.inputCfg.bufferProvider.cookie = NULL;
+    mConfig.inputCfg.bufferProvider.getBuffer = NULL;
+    mConfig.inputCfg.bufferProvider.releaseBuffer = NULL;
+    mConfig.outputCfg.bufferProvider.cookie = NULL;
+    mConfig.outputCfg.bufferProvider.getBuffer = NULL;
+    mConfig.outputCfg.bufferProvider.releaseBuffer = NULL;
+    mConfig.inputCfg.accessMode = EFFECT_BUFFER_ACCESS_READ;
+    // Insert effect:
+    // - in session 0 or -1, always overwrites output buffer: input buffer == output buffer
+    // - in other sessions:
+    //      last effect in the chain accumulates in output buffer: input buffer != output buffer
+    //      other effect: overwrites output buffer: input buffer == output buffer
+    // Auxiliary effect:
+    //      accumulates in output buffer: input buffer != output buffer
+    // Therefore: accumulate <=> input buffer != output buffer
+    if (mConfig.inputCfg.buffer.raw != mConfig.outputCfg.buffer.raw) {
+        mConfig.outputCfg.accessMode = EFFECT_BUFFER_ACCESS_ACCUMULATE;
+    } else {
+        mConfig.outputCfg.accessMode = EFFECT_BUFFER_ACCESS_WRITE;
+    }
+    mConfig.inputCfg.mask = EFFECT_CONFIG_ALL;
+    mConfig.outputCfg.mask = EFFECT_CONFIG_ALL;
+    mConfig.inputCfg.buffer.frameCount = thread->frameCount();
+    mConfig.outputCfg.buffer.frameCount = mConfig.inputCfg.buffer.frameCount;
+
+    status_t cmdStatus;
+    int size = sizeof(int);
+    status_t status = (*mEffectInterface)->command(mEffectInterface, EFFECT_CMD_CONFIGURE, sizeof(effect_config_t), &mConfig, &size, &cmdStatus);
+    if (status == 0) {
+        status = cmdStatus;
+    }
+
+    mMaxDisableWaitCnt = (MAX_DISABLE_TIME_MS * mConfig.outputCfg.samplingRate) /
+            (1000 * mConfig.outputCfg.buffer.frameCount);
+
+    return status;
+}
+
+status_t AudioFlinger::EffectModule::init()
+{
+    Mutex::Autolock _l(mLock);
+    if (mEffectInterface == NULL) {
+        return NO_INIT;
+    }
+    status_t cmdStatus;
+    int size = sizeof(status_t);
+    status_t status = (*mEffectInterface)->command(mEffectInterface, EFFECT_CMD_INIT, 0, NULL, &size, &cmdStatus);
+    if (status == 0) {
+        status = cmdStatus;
+    }
+    return status;
+}
+
+status_t AudioFlinger::EffectModule::start_l()
+{
+    if (mEffectInterface == NULL) {
+        return NO_INIT;
+    }
+    status_t cmdStatus;
+    int size = sizeof(status_t);
+    status_t status = (*mEffectInterface)->command(mEffectInterface, EFFECT_CMD_ENABLE, 0, NULL, &size, &cmdStatus);
+    if (status == 0) {
+        status = cmdStatus;
+    }
+    return status;
+}
+
+status_t AudioFlinger::EffectModule::stop_l()
+{
+    if (mEffectInterface == NULL) {
+        return NO_INIT;
+    }
+    status_t cmdStatus;
+    int size = sizeof(status_t);
+    status_t status = (*mEffectInterface)->command(mEffectInterface, EFFECT_CMD_DISABLE, 0, NULL, &size, &cmdStatus);
+    if (status == 0) {
+        status = cmdStatus;
+    }
+    return status;
+}
+
+status_t AudioFlinger::EffectModule::command(int cmdCode, int cmdSize, void *pCmdData, int *replySize, void *pReplyData)
+{
+    Mutex::Autolock _l(mLock);
+//    LOGV("command(), cmdCode: %d, mEffectInterface: %p", cmdCode, mEffectInterface);
+
+    if (mEffectInterface == NULL) {
+        return NO_INIT;
+    }
+    status_t status = (*mEffectInterface)->command(mEffectInterface, cmdCode, cmdSize, pCmdData, replySize, pReplyData);
+    if (cmdCode != EFFECT_CMD_GET_PARAM && status == NO_ERROR) {
+        int size = (replySize == NULL) ? 0 : *replySize;
+        for (size_t i = 1; i < mHandles.size(); i++) {
+            sp<EffectHandle> h = mHandles[i].promote();
+            if (h != 0) {
+                h->commandExecuted(cmdCode, cmdSize, pCmdData, size, pReplyData);
+            }
+        }
+    }
+    return status;
+}
+
+status_t AudioFlinger::EffectModule::setEnabled(bool enabled)
+{
+    Mutex::Autolock _l(mLock);
+    LOGV("setEnabled %p enabled %d", this, enabled);
+
+    if (enabled != isEnabled()) {
+        switch (mState) {
+        // going from disabled to enabled
+        case IDLE:
+            mState = STARTING;
+            break;
+        case STOPPED:
+            mState = RESTART;
+            break;
+        case STOPPING:
+            mState = ACTIVE;
+            break;
+
+        // going from enabled to disabled
+        case RESTART:
+        case STARTING:
+            mState = IDLE;
+            break;
+        case ACTIVE:
+            mState = STOPPING;
+            break;
+        }
+        for (size_t i = 1; i < mHandles.size(); i++) {
+            sp<EffectHandle> h = mHandles[i].promote();
+            if (h != 0) {
+                h->setEnabled(enabled);
+            }
+        }
+    }
+    return NO_ERROR;
+}
+
+bool AudioFlinger::EffectModule::isEnabled()
+{
+    switch (mState) {
+    case RESTART:
+    case STARTING:
+    case ACTIVE:
+        return true;
+    case IDLE:
+    case STOPPING:
+    case STOPPED:
+    default:
+        return false;
+    }
+}
+
+status_t AudioFlinger::EffectModule::setVolume(uint32_t *left, uint32_t *right, bool controller)
+{
+    Mutex::Autolock _l(mLock);
+    status_t status = NO_ERROR;
+
+    // Send volume indication if EFFECT_FLAG_VOLUME_IND is set and read back altered volume
+    // if controller flag is set (Note that controller == TRUE => EFFECT_FLAG_VOLUME_CTRL set)
+    if (isEnabled() &&
+            (mDescriptor.flags & EFFECT_FLAG_VOLUME_MASK) == EFFECT_FLAG_VOLUME_CTRL ||
+            (mDescriptor.flags & EFFECT_FLAG_VOLUME_MASK) == EFFECT_FLAG_VOLUME_IND) {
+        status_t cmdStatus;
+        uint32_t volume[2];
+        uint32_t *pVolume = NULL;
+        int size = sizeof(volume);
+        volume[0] = *left;
+        volume[1] = *right;
+        if (controller) {
+            pVolume = volume;
+        }
+        status = (*mEffectInterface)->command(mEffectInterface, EFFECT_CMD_SET_VOLUME, size, volume, &size, pVolume);
+        if (controller && status == NO_ERROR && size == sizeof(volume)) {
+            *left = volume[0];
+            *right = volume[1];
+        }
+    }
+    return status;
+}
+
+status_t AudioFlinger::EffectModule::setDevice(uint32_t device)
+{
+    Mutex::Autolock _l(mLock);
+    status_t status = NO_ERROR;
+    if ((mDescriptor.flags & EFFECT_FLAG_DEVICE_MASK) == EFFECT_FLAG_DEVICE_IND) {
+        // convert device bit field from AudioSystem to EffectApi format.
+        device = deviceAudioSystemToEffectApi(device);
+        if (device == 0) {
+            return BAD_VALUE;
+        }
+        status_t cmdStatus;
+        int size = sizeof(status_t);
+        status = (*mEffectInterface)->command(mEffectInterface, EFFECT_CMD_SET_DEVICE, sizeof(uint32_t), &device, &size, &cmdStatus);
+        if (status == NO_ERROR) {
+            status = cmdStatus;
+        }
+    }
+    return status;
+}
+
+status_t AudioFlinger::EffectModule::setMode(uint32_t mode)
+{
+    Mutex::Autolock _l(mLock);
+    status_t status = NO_ERROR;
+    if ((mDescriptor.flags & EFFECT_FLAG_AUDIO_MODE_MASK) == EFFECT_FLAG_AUDIO_MODE_IND) {
+        // convert audio mode from AudioSystem to EffectApi format.
+        int effectMode = modeAudioSystemToEffectApi(mode);
+        if (effectMode < 0) {
+            return BAD_VALUE;
+        }
+        status_t cmdStatus;
+        int size = sizeof(status_t);
+        status = (*mEffectInterface)->command(mEffectInterface, EFFECT_CMD_SET_AUDIO_MODE, sizeof(int), &effectMode, &size, &cmdStatus);
+        if (status == NO_ERROR) {
+            status = cmdStatus;
+        }
+    }
+    return status;
+}
+
+// update this table when AudioSystem::audio_devices or audio_device_e (in EffectApi.h) are modified
+const uint32_t AudioFlinger::EffectModule::sDeviceConvTable[] = {
+    DEVICE_EARPIECE, // AudioSystem::DEVICE_OUT_EARPIECE
+    DEVICE_SPEAKER, // AudioSystem::DEVICE_OUT_SPEAKER
+    DEVICE_WIRED_HEADSET, // case AudioSystem::DEVICE_OUT_WIRED_HEADSET
+    DEVICE_WIRED_HEADPHONE, // AudioSystem::DEVICE_OUT_WIRED_HEADPHONE
+    DEVICE_BLUETOOTH_SCO, // AudioSystem::DEVICE_OUT_BLUETOOTH_SCO
+    DEVICE_BLUETOOTH_SCO_HEADSET, // AudioSystem::DEVICE_OUT_BLUETOOTH_SCO_HEADSET
+    DEVICE_BLUETOOTH_SCO_CARKIT, //  AudioSystem::DEVICE_OUT_BLUETOOTH_SCO_CARKIT
+    DEVICE_BLUETOOTH_A2DP, //  AudioSystem::DEVICE_OUT_BLUETOOTH_A2DP
+    DEVICE_BLUETOOTH_A2DP_HEADPHONES, // AudioSystem::DEVICE_OUT_BLUETOOTH_A2DP_HEADPHONES
+    DEVICE_BLUETOOTH_A2DP_SPEAKER, // AudioSystem::DEVICE_OUT_BLUETOOTH_A2DP_SPEAKER
+    DEVICE_AUX_DIGITAL // AudioSystem::DEVICE_OUT_AUX_DIGITAL
+};
+
+uint32_t AudioFlinger::EffectModule::deviceAudioSystemToEffectApi(uint32_t device)
+{
+    uint32_t deviceOut = 0;
+    while (device) {
+        const uint32_t i = 31 - __builtin_clz(device);
+        device &= ~(1 << i);
+        if (i >= sizeof(sDeviceConvTable)/sizeof(uint32_t)) {
+            LOGE("device convertion error for AudioSystem device 0x%08x", device);
+            return 0;
+        }
+        deviceOut |= (uint32_t)sDeviceConvTable[i];
+    }
+    return deviceOut;
+}
+
+// update this table when AudioSystem::audio_mode or audio_mode_e (in EffectApi.h) are modified
+const uint32_t AudioFlinger::EffectModule::sModeConvTable[] = {
+    AUDIO_MODE_NORMAL,   // AudioSystem::MODE_NORMAL
+    AUDIO_MODE_RINGTONE, // AudioSystem::MODE_RINGTONE
+    AUDIO_MODE_IN_CALL   // AudioSystem::MODE_IN_CALL
+};
+
+int AudioFlinger::EffectModule::modeAudioSystemToEffectApi(uint32_t mode)
+{
+    int modeOut = -1;
+    if (mode < sizeof(sModeConvTable) / sizeof(uint32_t)) {
+        modeOut = (int)sModeConvTable[mode];
+    }
+    return modeOut;
+}
+
+status_t AudioFlinger::EffectModule::dump(int fd, const Vector<String16>& args)
+{
+    const size_t SIZE = 256;
+    char buffer[SIZE];
+    String8 result;
+
+    snprintf(buffer, SIZE, "\tEffect ID %d:\n", mId);
+    result.append(buffer);
+
+    bool locked = tryLock(mLock);
+    // failed to lock - AudioFlinger is probably deadlocked
+    if (!locked) {
+        result.append("\t\tCould not lock Fx mutex:\n");
+    }
+
+    result.append("\t\tSession Status State Engine:\n");
+    snprintf(buffer, SIZE, "\t\t%05d   %03d    %03d   0x%08x\n",
+            mSessionId, mStatus, mState, (uint32_t)mEffectInterface);
+    result.append(buffer);
+
+    result.append("\t\tDescriptor:\n");
+    snprintf(buffer, SIZE, "\t\t- UUID: %08X-%04X-%04X-%04X-%02X%02X%02X%02X%02X%02X\n",
+            mDescriptor.uuid.timeLow, mDescriptor.uuid.timeMid, mDescriptor.uuid.timeHiAndVersion,
+            mDescriptor.uuid.clockSeq, mDescriptor.uuid.node[0], mDescriptor.uuid.node[1],mDescriptor.uuid.node[2],
+            mDescriptor.uuid.node[3],mDescriptor.uuid.node[4],mDescriptor.uuid.node[5]);
+    result.append(buffer);
+    snprintf(buffer, SIZE, "\t\t- TYPE: %08X-%04X-%04X-%04X-%02X%02X%02X%02X%02X%02X\n",
+                mDescriptor.type.timeLow, mDescriptor.type.timeMid, mDescriptor.type.timeHiAndVersion,
+                mDescriptor.type.clockSeq, mDescriptor.type.node[0], mDescriptor.type.node[1],mDescriptor.type.node[2],
+                mDescriptor.type.node[3],mDescriptor.type.node[4],mDescriptor.type.node[5]);
+    result.append(buffer);
+    snprintf(buffer, SIZE, "\t\t- apiVersion: %04X\n\t\t- flags: %08X\n",
+            mDescriptor.apiVersion,
+            mDescriptor.flags);
+    result.append(buffer);
+    snprintf(buffer, SIZE, "\t\t- name: %s\n",
+            mDescriptor.name);
+    result.append(buffer);
+    snprintf(buffer, SIZE, "\t\t- implementor: %s\n",
+            mDescriptor.implementor);
+    result.append(buffer);
+
+    result.append("\t\t- Input configuration:\n");
+    result.append("\t\t\tBuffer     Frames  Smp rate Channels Format\n");
+    snprintf(buffer, SIZE, "\t\t\t0x%08x %05d   %05d    %08x %d\n",
+            (uint32_t)mConfig.inputCfg.buffer.raw,
+            mConfig.inputCfg.buffer.frameCount,
+            mConfig.inputCfg.samplingRate,
+            mConfig.inputCfg.channels,
+            mConfig.inputCfg.format);
+    result.append(buffer);
+
+    result.append("\t\t- Output configuration:\n");
+    result.append("\t\t\tBuffer     Frames  Smp rate Channels Format\n");
+    snprintf(buffer, SIZE, "\t\t\t0x%08x %05d   %05d    %08x %d\n",
+            (uint32_t)mConfig.outputCfg.buffer.raw,
+            mConfig.outputCfg.buffer.frameCount,
+            mConfig.outputCfg.samplingRate,
+            mConfig.outputCfg.channels,
+            mConfig.outputCfg.format);
+    result.append(buffer);
+
+    snprintf(buffer, SIZE, "\t\t%d Clients:\n", mHandles.size());
+    result.append(buffer);
+    result.append("\t\t\tPid   Priority Ctrl Locked client server\n");
+    for (size_t i = 0; i < mHandles.size(); ++i) {
+        sp<EffectHandle> handle = mHandles[i].promote();
+        if (handle != 0) {
+            handle->dump(buffer, SIZE);
+            result.append(buffer);
+        }
+    }
+
+    result.append("\n");
+
+    write(fd, result.string(), result.length());
+
+    if (locked) {
+        mLock.unlock();
+    }
+
+    return NO_ERROR;
+}
+
+// ----------------------------------------------------------------------------
+//  EffectHandle implementation
+// ----------------------------------------------------------------------------
+
+#undef LOG_TAG
+#define LOG_TAG "AudioFlinger::EffectHandle"
+
+AudioFlinger::EffectHandle::EffectHandle(const sp<EffectModule>& effect,
+                                        const sp<AudioFlinger::Client>& client,
+                                        const sp<IEffectClient>& effectClient,
+                                        int32_t priority)
+    : BnEffect(),
+    mEffect(effect), mEffectClient(effectClient), mClient(client), mPriority(priority), mHasControl(false)
+{
+    LOGV("constructor %p", this);
+
+    int bufOffset = ((sizeof(effect_param_cblk_t) - 1) / sizeof(int) + 1) * sizeof(int);
+    mCblkMemory = client->heap()->allocate(EFFECT_PARAM_BUFFER_SIZE + bufOffset);
+    if (mCblkMemory != 0) {
+        mCblk = static_cast<effect_param_cblk_t *>(mCblkMemory->pointer());
+
+        if (mCblk) {
+            new(mCblk) effect_param_cblk_t();
+            mBuffer = (uint8_t *)mCblk + bufOffset;
+         }
+    } else {
+        LOGE("not enough memory for Effect size=%u", EFFECT_PARAM_BUFFER_SIZE + sizeof(effect_param_cblk_t));
+        return;
+    }
+}
+
+AudioFlinger::EffectHandle::~EffectHandle()
+{
+    LOGV("Destructor %p", this);
+    disconnect();
+}
+
+status_t AudioFlinger::EffectHandle::enable()
+{
+    if (!mHasControl) return INVALID_OPERATION;
+    if (mEffect == 0) return DEAD_OBJECT;
+
+    return mEffect->setEnabled(true);
+}
+
+status_t AudioFlinger::EffectHandle::disable()
+{
+    if (!mHasControl) return INVALID_OPERATION;
+    if (mEffect == NULL) return DEAD_OBJECT;
+
+    return mEffect->setEnabled(false);
+}
+
+void AudioFlinger::EffectHandle::disconnect()
+{
+    if (mEffect == 0) {
+        return;
+    }
+    mEffect->disconnect(this);
+    // release sp on module => module destructor can be called now
+    mEffect.clear();
+    if (mCblk) {
+        mCblk->~effect_param_cblk_t();   // destroy our shared-structure.
+    }
+    mCblkMemory.clear();            // and free the shared memory
+    if (mClient != 0) {
+        Mutex::Autolock _l(mClient->audioFlinger()->mLock);
+        mClient.clear();
+    }
+}
+
+status_t AudioFlinger::EffectHandle::command(int cmdCode, int cmdSize, void *pCmdData, int *replySize, void *pReplyData)
+{
+//    LOGV("command(), cmdCode: %d, mHasControl: %d, mEffect: %p", cmdCode, mHasControl, (mEffect == 0) ? 0 : mEffect.get());
+
+    // only get parameter command is permitted for applications not controlling the effect
+    if (!mHasControl && cmdCode != EFFECT_CMD_GET_PARAM) {
+        return INVALID_OPERATION;
+    }
+    if (mEffect == 0) return DEAD_OBJECT;
+
+    // handle commands that are not forwarded transparently to effect engine
+    if (cmdCode == EFFECT_CMD_SET_PARAM_COMMIT) {
+        // No need to trylock() here as this function is executed in the binder thread serving a particular client process:
+        // no risk to block the whole media server process or mixer threads is we are stuck here
+        Mutex::Autolock _l(mCblk->lock);
+        if (mCblk->clientIndex > EFFECT_PARAM_BUFFER_SIZE ||
+            mCblk->serverIndex > EFFECT_PARAM_BUFFER_SIZE) {
+            mCblk->serverIndex = 0;
+            mCblk->clientIndex = 0;
+            return BAD_VALUE;
+        }
+        status_t status = NO_ERROR;
+        while (mCblk->serverIndex < mCblk->clientIndex) {
+            int reply;
+            int rsize = sizeof(int);
+            int *p = (int *)(mBuffer + mCblk->serverIndex);
+            int size = *p++;
+            if (((uint8_t *)p + size) > mBuffer + mCblk->clientIndex) {
+                LOGW("command(): invalid parameter block size");
+                break;
+            }
+            effect_param_t *param = (effect_param_t *)p;
+            if (param->psize == 0 || param->vsize == 0) {
+                LOGW("command(): null parameter or value size");
+                mCblk->serverIndex += size;
+                continue;
+            }
+            int psize = sizeof(effect_param_t) + ((param->psize - 1) / sizeof(int) + 1) * sizeof(int) + param->vsize;
+            status_t ret = mEffect->command(EFFECT_CMD_SET_PARAM, psize, p, &rsize, &reply);
+            if (ret == NO_ERROR) {
+                if (reply != NO_ERROR) {
+                    status = reply;
+                }
+            } else {
+                status = ret;
+            }
+            mCblk->serverIndex += size;
+        }
+        mCblk->serverIndex = 0;
+        mCblk->clientIndex = 0;
+        return status;
+    } else if (cmdCode == EFFECT_CMD_ENABLE) {
+        return enable();
+    } else if (cmdCode == EFFECT_CMD_DISABLE) {
+        return disable();
+    }
+
+    return mEffect->command(cmdCode, cmdSize, pCmdData, replySize, pReplyData);
+}
+
+sp<IMemory> AudioFlinger::EffectHandle::getCblk() const {
+    return mCblkMemory;
+}
+
+void AudioFlinger::EffectHandle::setControl(bool hasControl, bool signal)
+{
+    LOGV("setControl %p control %d", this, hasControl);
+
+    mHasControl = hasControl;
+    if (signal && mEffectClient != 0) {
+        mEffectClient->controlStatusChanged(hasControl);
+    }
+}
+
+void AudioFlinger::EffectHandle::commandExecuted(int cmdCode, int cmdSize, void *pCmdData, int replySize, void *pReplyData)
+{
+    if (mEffectClient != 0) {
+        mEffectClient->commandExecuted(cmdCode, cmdSize, pCmdData, replySize, pReplyData);
+    }
+}
+
+
+
+void AudioFlinger::EffectHandle::setEnabled(bool enabled)
+{
+    if (mEffectClient != 0) {
+        mEffectClient->enableStatusChanged(enabled);
+    }
+}
+
+status_t AudioFlinger::EffectHandle::onTransact(
+    uint32_t code, const Parcel& data, Parcel* reply, uint32_t flags)
+{
+    return BnEffect::onTransact(code, data, reply, flags);
+}
+
+
+void AudioFlinger::EffectHandle::dump(char* buffer, size_t size)
+{
+    bool locked = tryLock(mCblk->lock);
+
+    snprintf(buffer, size, "\t\t\t%05d %05d    %01u    %01u      %05u  %05u\n",
+            (mClient == NULL) ? getpid() : mClient->pid(),
+            mPriority,
+            mHasControl,
+            !locked,
+            mCblk->clientIndex,
+            mCblk->serverIndex
+            );
+
+    if (locked) {
+        mCblk->lock.unlock();
+    }
+}
+
+#undef LOG_TAG
+#define LOG_TAG "AudioFlinger::EffectChain"
+
+AudioFlinger::EffectChain::EffectChain(const wp<ThreadBase>& wThread,
+                                        int sessionId)
+    : mThread(wThread), mSessionId(sessionId), mActiveTrackCnt(0), mOwnInBuffer(false),
+            mVolumeCtrlIdx(-1), mLeftVolume(0), mRightVolume(0)
+{
+
+}
+
+AudioFlinger::EffectChain::~EffectChain()
+{
+    if (mOwnInBuffer) {
+        delete mInBuffer;
+    }
+
+}
+
+// getEffectFromDesc_l() must be called with PlaybackThread::mLock held
+sp<AudioFlinger::EffectModule> AudioFlinger::EffectChain::getEffectFromDesc_l(effect_descriptor_t *descriptor)
+{
+    sp<EffectModule> effect;
+    size_t size = mEffects.size();
+
+    for (size_t i = 0; i < size; i++) {
+        if (memcmp(&mEffects[i]->desc().uuid, &descriptor->uuid, sizeof(effect_uuid_t)) == 0) {
+            effect = mEffects[i];
+            break;
+        }
+    }
+    return effect;
+}
+
+// getEffectFromId_l() must be called with PlaybackThread::mLock held
+sp<AudioFlinger::EffectModule> AudioFlinger::EffectChain::getEffectFromId_l(int id)
+{
+    sp<EffectModule> effect;
+    size_t size = mEffects.size();
+
+    for (size_t i = 0; i < size; i++) {
+        if (mEffects[i]->id() == id) {
+            effect = mEffects[i];
+            break;
+        }
+    }
+    return effect;
+}
+
+// Must be called with EffectChain::mLock locked
+void AudioFlinger::EffectChain::process_l()
+{
+    size_t size = mEffects.size();
+    for (size_t i = 0; i < size; i++) {
+        mEffects[i]->process();
+    }
+    for (size_t i = 0; i < size; i++) {
+        mEffects[i]->updateState();
+    }
+    // if no track is active, input buffer must be cleared here as the mixer process
+    // will not do it
+    if (mSessionId > 0 && activeTracks() == 0) {
+        sp<ThreadBase> thread = mThread.promote();
+        if (thread != 0) {
+            size_t numSamples = thread->frameCount() * thread->channelCount();
+            memset(mInBuffer, 0, numSamples * sizeof(int16_t));
+        }
+    }
+}
+
+// addEffect_l() must be called with PlaybackThread::mLock held
+status_t AudioFlinger::EffectChain::addEffect_l(sp<EffectModule>& effect)
+{
+    effect_descriptor_t desc = effect->desc();
+    uint32_t insertPref = desc.flags & EFFECT_FLAG_INSERT_MASK;
+
+    Mutex::Autolock _l(mLock);
+
+    if ((desc.flags & EFFECT_FLAG_TYPE_MASK) == EFFECT_FLAG_TYPE_AUXILIARY) {
+        // Auxiliary effects are inserted at the beginning of mEffects vector as
+        // they are processed first and accumulated in chain input buffer
+        mEffects.insertAt(effect, 0);
+        sp<ThreadBase> thread = mThread.promote();
+        if (thread == 0) {
+            return NO_INIT;
+        }
+        // the input buffer for auxiliary effect contains mono samples in
+        // 32 bit format. This is to avoid saturation in AudoMixer
+        // accumulation stage. Saturation is done in EffectModule::process() before
+        // calling the process in effect engine
+        size_t numSamples = thread->frameCount();
+        int32_t *buffer = new int32_t[numSamples];
+        memset(buffer, 0, numSamples * sizeof(int32_t));
+        effect->setInBuffer((int16_t *)buffer);
+        // auxiliary effects output samples to chain input buffer for further processing
+        // by insert effects
+        effect->setOutBuffer(mInBuffer);
+    } else {
+        // Insert effects are inserted at the end of mEffects vector as they are processed
+        //  after track and auxiliary effects.
+        // Insert effect order as a function of indicated preference:
+        //  if EFFECT_FLAG_INSERT_EXCLUSIVE, insert in first position or reject if
+        //  another effect is present
+        //  else if EFFECT_FLAG_INSERT_FIRST, insert in first position or after the
+        //  last effect claiming first position
+        //  else if EFFECT_FLAG_INSERT_LAST, insert in last position or before the
+        //  first effect claiming last position
+        //  else if EFFECT_FLAG_INSERT_ANY insert after first or before last
+        // Reject insertion if an effect with EFFECT_FLAG_INSERT_EXCLUSIVE is
+        // already present
+
+        int size = (int)mEffects.size();
+        int idx_insert = size;
+        int idx_insert_first = -1;
+        int idx_insert_last = -1;
+
+        for (int i = 0; i < size; i++) {
+            effect_descriptor_t d = mEffects[i]->desc();
+            uint32_t iMode = d.flags & EFFECT_FLAG_TYPE_MASK;
+            uint32_t iPref = d.flags & EFFECT_FLAG_INSERT_MASK;
+            if (iMode == EFFECT_FLAG_TYPE_INSERT) {
+                // check invalid effect chaining combinations
+                if (insertPref == EFFECT_FLAG_INSERT_EXCLUSIVE ||
+                    iPref == EFFECT_FLAG_INSERT_EXCLUSIVE) {
+                    LOGW("addEffect_l() could not insert effect %s: exclusive conflict with %s", desc.name, d.name);
+                    return INVALID_OPERATION;
+                }
+                // remember position of first insert effect and by default
+                // select this as insert position for new effect
+                if (idx_insert == size) {
+                    idx_insert = i;
+                }
+                // remember position of last insert effect claiming
+                // first position
+                if (iPref == EFFECT_FLAG_INSERT_FIRST) {
+                    idx_insert_first = i;
+                }
+                // remember position of first insert effect claiming
+                // last position
+                if (iPref == EFFECT_FLAG_INSERT_LAST &&
+                    idx_insert_last == -1) {
+                    idx_insert_last = i;
+                }
+            }
+        }
+
+        // modify idx_insert from first position if needed
+        if (insertPref == EFFECT_FLAG_INSERT_LAST) {
+            if (idx_insert_last != -1) {
+                idx_insert = idx_insert_last;
+            } else {
+                idx_insert = size;
+            }
+        } else {
+            if (idx_insert_first != -1) {
+                idx_insert = idx_insert_first + 1;
+            }
+        }
+
+        // always read samples from chain input buffer
+        effect->setInBuffer(mInBuffer);
+
+        // if last effect in the chain, output samples to chain
+        // output buffer, otherwise to chain input buffer
+        if (idx_insert == size) {
+            if (idx_insert != 0) {
+                mEffects[idx_insert-1]->setOutBuffer(mInBuffer);
+                mEffects[idx_insert-1]->configure();
+            }
+            effect->setOutBuffer(mOutBuffer);
+        } else {
+            effect->setOutBuffer(mInBuffer);
+        }
+        mEffects.insertAt(effect, idx_insert);
+
+        LOGV("addEffect_l() effect %p, added in chain %p at rank %d", effect.get(), this, idx_insert);
+    }
+    effect->configure();
+    return NO_ERROR;
+}
+
+// removeEffect_l() must be called with PlaybackThread::mLock held
+size_t AudioFlinger::EffectChain::removeEffect_l(const sp<EffectModule>& effect)
+{
+    Mutex::Autolock _l(mLock);
+    int size = (int)mEffects.size();
+    int i;
+    uint32_t type = effect->desc().flags & EFFECT_FLAG_TYPE_MASK;
+
+    for (i = 0; i < size; i++) {
+        if (effect == mEffects[i]) {
+            if (type == EFFECT_FLAG_TYPE_AUXILIARY) {
+                delete[] effect->inBuffer();
+            } else {
+                if (i == size - 1 && i != 0) {
+                    mEffects[i - 1]->setOutBuffer(mOutBuffer);
+                    mEffects[i - 1]->configure();
+                }
+            }
+            mEffects.removeAt(i);
+            LOGV("removeEffect_l() effect %p, removed from chain %p at rank %d", effect.get(), this, i);
+            break;
+        }
+    }
+
+    return mEffects.size();
+}
+
+// setDevice_l() must be called with PlaybackThread::mLock held
+void AudioFlinger::EffectChain::setDevice_l(uint32_t device)
+{
+    size_t size = mEffects.size();
+    for (size_t i = 0; i < size; i++) {
+        mEffects[i]->setDevice(device);
+    }
+}
+
+// setMode_l() must be called with PlaybackThread::mLock held
+void AudioFlinger::EffectChain::setMode_l(uint32_t mode)
+{
+    size_t size = mEffects.size();
+    for (size_t i = 0; i < size; i++) {
+        mEffects[i]->setMode(mode);
+    }
+}
+
+// setVolume_l() must be called with PlaybackThread::mLock held
+bool AudioFlinger::EffectChain::setVolume_l(uint32_t *left, uint32_t *right)
+{
+    uint32_t newLeft = *left;
+    uint32_t newRight = *right;
+    bool hasControl = false;
+    int ctrlIdx = -1;
+    size_t size = mEffects.size();
+
+    // first update volume controller
+    for (size_t i = size; i > 0; i--) {
+        if (mEffects[i - 1]->isEnabled() &&
+            (mEffects[i - 1]->desc().flags & EFFECT_FLAG_VOLUME_MASK) == EFFECT_FLAG_VOLUME_CTRL) {
+            ctrlIdx = i - 1;
+            break;
+        }
+    }
+
+    if (ctrlIdx == mVolumeCtrlIdx && *left == mLeftVolume && *right == mRightVolume) {
+        return false;
+    }
+
+    mVolumeCtrlIdx = ctrlIdx;
+    mLeftVolume = *left;
+    mRightVolume = *right;
+
+    // second get volume update from volume controller
+    if (ctrlIdx >= 0) {
+        mEffects[ctrlIdx]->setVolume(&newLeft, &newRight, true);
+        hasControl = true;
+    }
+    // then indicate volume to all other effects in chain.
+    // Pass altered volume to effects before volume controller
+    // and requested volume to effects after controller
+    uint32_t lVol = newLeft;
+    uint32_t rVol = newRight;
+
+    for (size_t i = 0; i < size; i++) {
+        if ((int)i == ctrlIdx) continue;
+        // this also works for ctrlIdx == -1 when there is no volume controller
+        if ((int)i > ctrlIdx) {
+            lVol = *left;
+            rVol = *right;
+        }
+        mEffects[i]->setVolume(&lVol, &rVol, false);
+    }
+    *left = newLeft;
+    *right = newRight;
+
+    return hasControl;
+}
+
+status_t AudioFlinger::EffectChain::dump(int fd, const Vector<String16>& args)
+{
+    const size_t SIZE = 256;
+    char buffer[SIZE];
+    String8 result;
+
+    snprintf(buffer, SIZE, "Effects for session %d:\n", mSessionId);
+    result.append(buffer);
+
+    bool locked = tryLock(mLock);
+    // failed to lock - AudioFlinger is probably deadlocked
+    if (!locked) {
+        result.append("\tCould not lock mutex:\n");
+    }
+
+    result.append("\tNum fx In buffer   Out buffer   Active tracks:\n");
+    snprintf(buffer, SIZE, "\t%02d     0x%08x  0x%08x   %d\n",
+            mEffects.size(),
+            (uint32_t)mInBuffer,
+            (uint32_t)mOutBuffer,
+            mActiveTrackCnt);
+    result.append(buffer);
+    write(fd, result.string(), result.size());
+
+    for (size_t i = 0; i < mEffects.size(); ++i) {
+        sp<EffectModule> effect = mEffects[i];
+        if (effect != 0) {
+            effect->dump(fd, args);
+        }
+    }
+
+    if (locked) {
+        mLock.unlock();
+    }
+
+    return NO_ERROR;
+}
+
+#undef LOG_TAG
+#define LOG_TAG "AudioFlinger"
+
+// ----------------------------------------------------------------------------
+
+status_t AudioFlinger::onTransact(
+        uint32_t code, const Parcel& data, Parcel* reply, uint32_t flags)
+{
+    return BnAudioFlinger::onTransact(code, data, reply, flags);
+}
+
+}; // namespace android
diff --git a/services/audioflinger/AudioFlinger.h b/services/audioflinger/AudioFlinger.h
new file mode 100644
index 0000000..4507a48
--- /dev/null
+++ b/services/audioflinger/AudioFlinger.h
@@ -0,0 +1,1154 @@
+/* //device/include/server/AudioFlinger/AudioFlinger.h
+**
+** Copyright 2007, The Android Open Source Project
+**
+** Licensed under the Apache License, Version 2.0 (the "License");
+** you may not use this file except in compliance with the License.
+** You may obtain a copy of the License at
+**
+**     http://www.apache.org/licenses/LICENSE-2.0
+**
+** Unless required by applicable law or agreed to in writing, software
+** distributed under the License is distributed on an "AS IS" BASIS,
+** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+** See the License for the specific language governing permissions and
+** limitations under the License.
+*/
+
+#ifndef ANDROID_AUDIO_FLINGER_H
+#define ANDROID_AUDIO_FLINGER_H
+
+#include <stdint.h>
+#include <sys/types.h>
+#include <limits.h>
+
+#include <media/IAudioFlinger.h>
+#include <media/IAudioFlingerClient.h>
+#include <media/IAudioTrack.h>
+#include <media/IAudioRecord.h>
+#include <media/AudioTrack.h>
+
+#include <utils/Atomic.h>
+#include <utils/Errors.h>
+#include <utils/threads.h>
+#include <utils/SortedVector.h>
+#include <utils/Vector.h>
+
+#include <binder/BinderService.h>
+#include <binder/MemoryDealer.h>
+
+#include <hardware_legacy/AudioHardwareInterface.h>
+
+#include "AudioBufferProvider.h"
+
+namespace android {
+
+class audio_track_cblk_t;
+class effect_param_cblk_t;
+class AudioMixer;
+class AudioBuffer;
+class AudioResampler;
+
+
+// ----------------------------------------------------------------------------
+
+#define LIKELY( exp )       (__builtin_expect( (exp) != 0, true  ))
+#define UNLIKELY( exp )     (__builtin_expect( (exp) != 0, false ))
+
+
+// ----------------------------------------------------------------------------
+
+static const nsecs_t kStandbyTimeInNsecs = seconds(3);
+
+class AudioFlinger :
+    public BinderService<AudioFlinger>,
+    public BnAudioFlinger
+{
+    friend class BinderService<AudioFlinger>;
+public:
+    static char const* getServiceName() { return "media.audio_flinger"; }
+
+    virtual     status_t    dump(int fd, const Vector<String16>& args);
+
+    // IAudioFlinger interface
+    virtual sp<IAudioTrack> createTrack(
+                                pid_t pid,
+                                int streamType,
+                                uint32_t sampleRate,
+                                int format,
+                                int channelCount,
+                                int frameCount,
+                                uint32_t flags,
+                                const sp<IMemory>& sharedBuffer,
+                                int output,
+                                int *sessionId,
+                                status_t *status);
+
+    virtual     uint32_t    sampleRate(int output) const;
+    virtual     int         channelCount(int output) const;
+    virtual     int         format(int output) const;
+    virtual     size_t      frameCount(int output) const;
+    virtual     uint32_t    latency(int output) const;
+
+    virtual     status_t    setMasterVolume(float value);
+    virtual     status_t    setMasterMute(bool muted);
+
+    virtual     float       masterVolume() const;
+    virtual     bool        masterMute() const;
+
+    virtual     status_t    setStreamVolume(int stream, float value, int output);
+    virtual     status_t    setStreamMute(int stream, bool muted);
+
+    virtual     float       streamVolume(int stream, int output) const;
+    virtual     bool        streamMute(int stream) const;
+
+    virtual     status_t    setMode(int mode);
+
+    virtual     status_t    setMicMute(bool state);
+    virtual     bool        getMicMute() const;
+
+    virtual     bool        isStreamActive(int stream) const;
+
+    virtual     status_t    setParameters(int ioHandle, const String8& keyValuePairs);
+    virtual     String8     getParameters(int ioHandle, const String8& keys);
+
+    virtual     void        registerClient(const sp<IAudioFlingerClient>& client);
+
+    virtual     size_t      getInputBufferSize(uint32_t sampleRate, int format, int channelCount);
+    virtual     unsigned int  getInputFramesLost(int ioHandle);
+
+    virtual int openOutput(uint32_t *pDevices,
+                                    uint32_t *pSamplingRate,
+                                    uint32_t *pFormat,
+                                    uint32_t *pChannels,
+                                    uint32_t *pLatencyMs,
+                                    uint32_t flags);
+
+    virtual int openDuplicateOutput(int output1, int output2);
+
+    virtual status_t closeOutput(int output);
+
+    virtual status_t suspendOutput(int output);
+
+    virtual status_t restoreOutput(int output);
+
+    virtual int openInput(uint32_t *pDevices,
+                            uint32_t *pSamplingRate,
+                            uint32_t *pFormat,
+                            uint32_t *pChannels,
+                            uint32_t acoustics);
+
+    virtual status_t closeInput(int input);
+
+    virtual status_t setStreamOutput(uint32_t stream, int output);
+
+    virtual status_t setVoiceVolume(float volume);
+
+    virtual status_t getRenderPosition(uint32_t *halFrames, uint32_t *dspFrames, int output);
+
+    virtual int newAudioSessionId();
+
+    virtual status_t loadEffectLibrary(const char *libPath, int *handle);
+
+    virtual status_t unloadEffectLibrary(int handle);
+
+    virtual status_t queryNumberEffects(uint32_t *numEffects);
+
+    virtual status_t queryEffect(uint32_t index, effect_descriptor_t *descriptor);
+
+    virtual status_t getEffectDescriptor(effect_uuid_t *pUuid, effect_descriptor_t *descriptor);
+
+    virtual sp<IEffect> createEffect(pid_t pid,
+                        effect_descriptor_t *pDesc,
+                        const sp<IEffectClient>& effectClient,
+                        int32_t priority,
+                        int output,
+                        int sessionId,
+                        status_t *status,
+                        int *id,
+                        int *enabled);
+
+            status_t registerEffectResource_l(effect_descriptor_t *desc);
+            void     unregisterEffectResource_l(effect_descriptor_t *desc);
+
+    enum hardware_call_state {
+        AUDIO_HW_IDLE = 0,
+        AUDIO_HW_INIT,
+        AUDIO_HW_OUTPUT_OPEN,
+        AUDIO_HW_OUTPUT_CLOSE,
+        AUDIO_HW_INPUT_OPEN,
+        AUDIO_HW_INPUT_CLOSE,
+        AUDIO_HW_STANDBY,
+        AUDIO_HW_SET_MASTER_VOLUME,
+        AUDIO_HW_GET_ROUTING,
+        AUDIO_HW_SET_ROUTING,
+        AUDIO_HW_GET_MODE,
+        AUDIO_HW_SET_MODE,
+        AUDIO_HW_GET_MIC_MUTE,
+        AUDIO_HW_SET_MIC_MUTE,
+        AUDIO_SET_VOICE_VOLUME,
+        AUDIO_SET_PARAMETER,
+    };
+
+    // record interface
+    virtual sp<IAudioRecord> openRecord(
+                                pid_t pid,
+                                int input,
+                                uint32_t sampleRate,
+                                int format,
+                                int channelCount,
+                                int frameCount,
+                                uint32_t flags,
+                                int *sessionId,
+                                status_t *status);
+
+    virtual     status_t    onTransact(
+                                uint32_t code,
+                                const Parcel& data,
+                                Parcel* reply,
+                                uint32_t flags);
+
+                uint32_t    getMode() { return mMode; }
+
+private:
+                            AudioFlinger();
+    virtual                 ~AudioFlinger();
+
+
+    // Internal dump utilites.
+    status_t dumpPermissionDenial(int fd, const Vector<String16>& args);
+    status_t dumpClients(int fd, const Vector<String16>& args);
+    status_t dumpInternals(int fd, const Vector<String16>& args);
+
+    // --- Client ---
+    class Client : public RefBase {
+    public:
+                            Client(const sp<AudioFlinger>& audioFlinger, pid_t pid);
+        virtual             ~Client();
+        const sp<MemoryDealer>&     heap() const;
+        pid_t               pid() const { return mPid; }
+        sp<AudioFlinger>    audioFlinger() { return mAudioFlinger; }
+
+    private:
+                            Client(const Client&);
+                            Client& operator = (const Client&);
+        sp<AudioFlinger>    mAudioFlinger;
+        sp<MemoryDealer>    mMemoryDealer;
+        pid_t               mPid;
+    };
+
+    // --- Notification Client ---
+    class NotificationClient : public IBinder::DeathRecipient {
+    public:
+                            NotificationClient(const sp<AudioFlinger>& audioFlinger,
+                                                const sp<IAudioFlingerClient>& client,
+                                                pid_t pid);
+        virtual             ~NotificationClient();
+
+                sp<IAudioFlingerClient>    client() { return mClient; }
+
+                // IBinder::DeathRecipient
+                virtual     void        binderDied(const wp<IBinder>& who);
+
+    private:
+                            NotificationClient(const NotificationClient&);
+                            NotificationClient& operator = (const NotificationClient&);
+
+        sp<AudioFlinger>        mAudioFlinger;
+        pid_t                   mPid;
+        sp<IAudioFlingerClient> mClient;
+    };
+
+    class TrackHandle;
+    class RecordHandle;
+    class RecordThread;
+    class PlaybackThread;
+    class MixerThread;
+    class DirectOutputThread;
+    class DuplicatingThread;
+    class Track;
+    class RecordTrack;
+    class EffectModule;
+    class EffectHandle;
+    class EffectChain;
+
+    class ThreadBase : public Thread {
+    public:
+        ThreadBase (const sp<AudioFlinger>& audioFlinger, int id);
+        virtual             ~ThreadBase();
+
+        status_t dumpBase(int fd, const Vector<String16>& args);
+
+        // base for record and playback
+        class TrackBase : public AudioBufferProvider, public RefBase {
+
+        public:
+            enum track_state {
+                IDLE,
+                TERMINATED,
+                STOPPED,
+                RESUMING,
+                ACTIVE,
+                PAUSING,
+                PAUSED
+            };
+
+            enum track_flags {
+                STEPSERVER_FAILED = 0x01, //  StepServer could not acquire cblk->lock mutex
+                SYSTEM_FLAGS_MASK = 0x0000ffffUL,
+                // The upper 16 bits are used for track-specific flags.
+            };
+
+                                TrackBase(const wp<ThreadBase>& thread,
+                                        const sp<Client>& client,
+                                        uint32_t sampleRate,
+                                        int format,
+                                        int channelCount,
+                                        int frameCount,
+                                        uint32_t flags,
+                                        const sp<IMemory>& sharedBuffer,
+                                        int sessionId);
+                                ~TrackBase();
+
+            virtual status_t    start() = 0;
+            virtual void        stop() = 0;
+                    sp<IMemory> getCblk() const;
+                    audio_track_cblk_t* cblk() const { return mCblk; }
+                    int         sessionId() { return mSessionId; }
+
+        protected:
+            friend class ThreadBase;
+            friend class RecordHandle;
+            friend class PlaybackThread;
+            friend class RecordThread;
+            friend class MixerThread;
+            friend class DirectOutputThread;
+
+                                TrackBase(const TrackBase&);
+                                TrackBase& operator = (const TrackBase&);
+
+            virtual status_t getNextBuffer(AudioBufferProvider::Buffer* buffer) = 0;
+            virtual void releaseBuffer(AudioBufferProvider::Buffer* buffer);
+
+            int format() const {
+                return mFormat;
+            }
+
+            int channelCount() const ;
+
+            int sampleRate() const;
+
+            void* getBuffer(uint32_t offset, uint32_t frames) const;
+
+            bool isStopped() const {
+                return mState == STOPPED;
+            }
+
+            bool isTerminated() const {
+                return mState == TERMINATED;
+            }
+
+            bool step();
+            void reset();
+
+            wp<ThreadBase>      mThread;
+            sp<Client>          mClient;
+            sp<IMemory>         mCblkMemory;
+            audio_track_cblk_t* mCblk;
+            void*               mBuffer;
+            void*               mBufferEnd;
+            uint32_t            mFrameCount;
+            // we don't really need a lock for these
+            int                 mState;
+            int                 mClientTid;
+            uint8_t             mFormat;
+            uint32_t            mFlags;
+            int                 mSessionId;
+        };
+
+        class ConfigEvent {
+        public:
+            ConfigEvent() : mEvent(0), mParam(0) {}
+
+            int mEvent;
+            int mParam;
+        };
+
+                    uint32_t    sampleRate() const;
+                    int         channelCount() const;
+                    int         format() const;
+                    size_t      frameCount() const;
+                    void        wakeUp()    { mWaitWorkCV.broadcast(); }
+                    void        exit();
+        virtual     bool        checkForNewParameters_l() = 0;
+        virtual     status_t    setParameters(const String8& keyValuePairs);
+        virtual     String8     getParameters(const String8& keys) = 0;
+        virtual     void        audioConfigChanged_l(int event, int param = 0) = 0;
+                    void        sendConfigEvent(int event, int param = 0);
+                    void        sendConfigEvent_l(int event, int param = 0);
+                    void        processConfigEvents();
+                    int         id() const { return mId;}
+                    bool        standby() { return mStandby; }
+
+        mutable     Mutex                   mLock;
+
+    protected:
+
+        friend class Track;
+        friend class TrackBase;
+        friend class PlaybackThread;
+        friend class MixerThread;
+        friend class DirectOutputThread;
+        friend class DuplicatingThread;
+        friend class RecordThread;
+        friend class RecordTrack;
+
+                    Condition               mWaitWorkCV;
+                    sp<AudioFlinger>        mAudioFlinger;
+                    uint32_t                mSampleRate;
+                    size_t                  mFrameCount;
+                    uint32_t                mChannels;
+                    uint16_t                mChannelCount;
+                    uint16_t                mFrameSize;
+                    int                     mFormat;
+                    Condition               mParamCond;
+                    Vector<String8>         mNewParameters;
+                    status_t                mParamStatus;
+                    Vector<ConfigEvent *>   mConfigEvents;
+                    bool                    mStandby;
+                    int                     mId;
+                    bool                    mExiting;
+    };
+
+    // --- PlaybackThread ---
+    class PlaybackThread : public ThreadBase {
+    public:
+
+        enum type {
+            MIXER,
+            DIRECT,
+            DUPLICATING
+        };
+
+        enum mixer_state {
+            MIXER_IDLE,
+            MIXER_TRACKS_ENABLED,
+            MIXER_TRACKS_READY
+        };
+
+        // playback track
+        class Track : public TrackBase {
+        public:
+                                Track(  const wp<ThreadBase>& thread,
+                                        const sp<Client>& client,
+                                        int streamType,
+                                        uint32_t sampleRate,
+                                        int format,
+                                        int channelCount,
+                                        int frameCount,
+                                        const sp<IMemory>& sharedBuffer,
+                                        int sessionId);
+                                ~Track();
+
+                    void        dump(char* buffer, size_t size);
+            virtual status_t    start();
+            virtual void        stop();
+                    void        pause();
+
+                    void        flush();
+                    void        destroy();
+                    void        mute(bool);
+                    void        setVolume(float left, float right);
+                    int name() const {
+                        return mName;
+                    }
+
+                    int type() const {
+                        return mStreamType;
+                    }
+                    status_t    attachAuxEffect(int EffectId);
+                    void        setAuxBuffer(int EffectId, int32_t *buffer);
+                    int32_t     *auxBuffer() { return mAuxBuffer; }
+                    void        setMainBuffer(int16_t *buffer) { mMainBuffer = buffer; }
+                    int16_t     *mainBuffer() { return mMainBuffer; }
+                    int         auxEffectId() { return mAuxEffectId; }
+
+
+        protected:
+            friend class ThreadBase;
+            friend class AudioFlinger;
+            friend class TrackHandle;
+            friend class PlaybackThread;
+            friend class MixerThread;
+            friend class DirectOutputThread;
+
+                                Track(const Track&);
+                                Track& operator = (const Track&);
+
+            virtual status_t getNextBuffer(AudioBufferProvider::Buffer* buffer);
+            bool isMuted() { return mMute; }
+            bool isPausing() const {
+                return mState == PAUSING;
+            }
+            bool isPaused() const {
+                return mState == PAUSED;
+            }
+            bool isReady() const;
+            void setPaused() { mState = PAUSED; }
+            void reset();
+
+            bool isOutputTrack() const {
+                return (mStreamType == AudioSystem::NUM_STREAM_TYPES);
+            }
+
+            // we don't really need a lock for these
+            float               mVolume[2];
+            volatile bool       mMute;
+            // FILLED state is used for suppressing volume ramp at begin of playing
+            enum {FS_FILLING, FS_FILLED, FS_ACTIVE};
+            mutable uint8_t     mFillingUpStatus;
+            int8_t              mRetryCount;
+            sp<IMemory>         mSharedBuffer;
+            bool                mResetDone;
+            int                 mStreamType;
+            int                 mName;
+            int16_t             *mMainBuffer;
+            int32_t             *mAuxBuffer;
+            int                 mAuxEffectId;
+        };  // end of Track
+
+
+        // playback track
+        class OutputTrack : public Track {
+        public:
+
+            class Buffer: public AudioBufferProvider::Buffer {
+            public:
+                int16_t *mBuffer;
+            };
+
+                                OutputTrack(  const wp<ThreadBase>& thread,
+                                        DuplicatingThread *sourceThread,
+                                        uint32_t sampleRate,
+                                        int format,
+                                        int channelCount,
+                                        int frameCount);
+                                ~OutputTrack();
+
+            virtual status_t    start();
+            virtual void        stop();
+                    bool        write(int16_t* data, uint32_t frames);
+                    bool        bufferQueueEmpty() { return (mBufferQueue.size() == 0) ? true : false; }
+                    bool        isActive() { return mActive; }
+            wp<ThreadBase>&     thread()  { return mThread; }
+
+        private:
+
+            status_t            obtainBuffer(AudioBufferProvider::Buffer* buffer, uint32_t waitTimeMs);
+            void                clearBufferQueue();
+
+            // Maximum number of pending buffers allocated by OutputTrack::write()
+            static const uint8_t kMaxOverFlowBuffers = 10;
+
+            Vector < Buffer* >          mBufferQueue;
+            AudioBufferProvider::Buffer mOutBuffer;
+            bool                        mActive;
+            DuplicatingThread*          mSourceThread;
+        };  // end of OutputTrack
+
+        PlaybackThread (const sp<AudioFlinger>& audioFlinger, AudioStreamOut* output, int id, uint32_t device);
+        virtual             ~PlaybackThread();
+
+        virtual     status_t    dump(int fd, const Vector<String16>& args);
+
+        // Thread virtuals
+        virtual     status_t    readyToRun();
+        virtual     void        onFirstRef();
+
+        virtual     uint32_t    latency() const;
+
+        virtual     status_t    setMasterVolume(float value);
+        virtual     status_t    setMasterMute(bool muted);
+
+        virtual     float       masterVolume() const;
+        virtual     bool        masterMute() const;
+
+        virtual     status_t    setStreamVolume(int stream, float value);
+        virtual     status_t    setStreamMute(int stream, bool muted);
+
+        virtual     float       streamVolume(int stream) const;
+        virtual     bool        streamMute(int stream) const;
+
+                    bool        isStreamActive(int stream) const;
+
+                    sp<Track>   createTrack_l(
+                                    const sp<AudioFlinger::Client>& client,
+                                    int streamType,
+                                    uint32_t sampleRate,
+                                    int format,
+                                    int channelCount,
+                                    int frameCount,
+                                    const sp<IMemory>& sharedBuffer,
+                                    int sessionId,
+                                    status_t *status);
+
+                    AudioStreamOut* getOutput() { return mOutput; }
+
+        virtual     int         type() const { return mType; }
+                    void        suspend() { mSuspended++; }
+                    void        restore() { if (mSuspended) mSuspended--; }
+                    bool        isSuspended() { return (mSuspended != 0); }
+        virtual     String8     getParameters(const String8& keys);
+        virtual     void        audioConfigChanged_l(int event, int param = 0);
+        virtual     status_t    getRenderPosition(uint32_t *halFrames, uint32_t *dspFrames);
+                    int16_t     *mixBuffer() { return mMixBuffer; };
+
+                    sp<EffectHandle> createEffect_l(
+                                        const sp<AudioFlinger::Client>& client,
+                                        const sp<IEffectClient>& effectClient,
+                                        int32_t priority,
+                                        int sessionId,
+                                        effect_descriptor_t *desc,
+                                        int *enabled,
+                                        status_t *status);
+                    void disconnectEffect(const sp< EffectModule>& effect,
+                                          const wp<EffectHandle>& handle);
+
+                    bool hasAudioSession(int sessionId);
+                    sp<EffectChain> getEffectChain(int sessionId);
+                    sp<EffectChain> getEffectChain_l(int sessionId);
+                    status_t addEffectChain_l(const sp<EffectChain>& chain);
+                    size_t removeEffectChain_l(const sp<EffectChain>& chain);
+                    void lockEffectChains_l();
+                    void unlockEffectChains();
+
+                    sp<AudioFlinger::EffectModule> getEffect_l(int sessionId, int effectId);
+                    void detachAuxEffect_l(int effectId);
+                    status_t attachAuxEffect(const sp<AudioFlinger::PlaybackThread::Track> track, int EffectId);
+                    status_t attachAuxEffect_l(const sp<AudioFlinger::PlaybackThread::Track> track, int EffectId);
+                    void setMode(uint32_t mode);
+
+        struct  stream_type_t {
+            stream_type_t()
+                :   volume(1.0f),
+                    mute(false)
+            {
+            }
+            float       volume;
+            bool        mute;
+        };
+
+    protected:
+        int                             mType;
+        int16_t*                        mMixBuffer;
+        int                             mSuspended;
+        int                             mBytesWritten;
+        bool                            mMasterMute;
+        SortedVector< wp<Track> >       mActiveTracks;
+
+        virtual int             getTrackName_l() = 0;
+        virtual void            deleteTrackName_l(int name) = 0;
+        virtual uint32_t        activeSleepTimeUs() = 0;
+        virtual uint32_t        idleSleepTimeUs() = 0;
+
+    private:
+
+        friend class AudioFlinger;
+        friend class OutputTrack;
+        friend class Track;
+        friend class TrackBase;
+        friend class MixerThread;
+        friend class DirectOutputThread;
+        friend class DuplicatingThread;
+
+        PlaybackThread(const Client&);
+        PlaybackThread& operator = (const PlaybackThread&);
+
+        status_t    addTrack_l(const sp<Track>& track);
+        void        destroyTrack_l(const sp<Track>& track);
+
+        void        readOutputParameters();
+
+        uint32_t    device() { return mDevice; }
+
+        virtual status_t    dumpInternals(int fd, const Vector<String16>& args);
+        status_t    dumpTracks(int fd, const Vector<String16>& args);
+        status_t    dumpEffectChains(int fd, const Vector<String16>& args);
+
+        SortedVector< sp<Track> >       mTracks;
+        // mStreamTypes[] uses 1 additionnal stream type internally for the OutputTrack used by DuplicatingThread
+        stream_type_t                   mStreamTypes[AudioSystem::NUM_STREAM_TYPES + 1];
+        AudioStreamOut*                 mOutput;
+        float                           mMasterVolume;
+        nsecs_t                         mLastWriteTime;
+        int                             mNumWrites;
+        int                             mNumDelayedWrites;
+        bool                            mInWrite;
+        Vector< sp<EffectChain> >       mEffectChains;
+        uint32_t                        mDevice;
+    };
+
+    class MixerThread : public PlaybackThread {
+    public:
+        MixerThread (const sp<AudioFlinger>& audioFlinger, AudioStreamOut* output, int id, uint32_t device);
+        virtual             ~MixerThread();
+
+        // Thread virtuals
+        virtual     bool        threadLoop();
+
+                    void        invalidateTracks(int streamType);
+        virtual     bool        checkForNewParameters_l();
+        virtual     status_t    dumpInternals(int fd, const Vector<String16>& args);
+
+    protected:
+                    uint32_t    prepareTracks_l(const SortedVector< wp<Track> >& activeTracks, Vector< sp<Track> > *tracksToRemove);
+        virtual     int         getTrackName_l();
+        virtual     void        deleteTrackName_l(int name);
+        virtual     uint32_t    activeSleepTimeUs();
+        virtual     uint32_t    idleSleepTimeUs();
+
+        AudioMixer*                     mAudioMixer;
+    };
+
+    class DirectOutputThread : public PlaybackThread {
+    public:
+
+        DirectOutputThread (const sp<AudioFlinger>& audioFlinger, AudioStreamOut* output, int id, uint32_t device);
+        ~DirectOutputThread();
+
+        // Thread virtuals
+        virtual     bool        threadLoop();
+
+        virtual     bool        checkForNewParameters_l();
+
+    protected:
+        virtual     int         getTrackName_l();
+        virtual     void        deleteTrackName_l(int name);
+        virtual     uint32_t    activeSleepTimeUs();
+        virtual     uint32_t    idleSleepTimeUs();
+
+    private:
+        void applyVolume(uint16_t leftVol, uint16_t rightVol, bool ramp);
+
+        float mLeftVolFloat;
+        float mRightVolFloat;
+        uint16_t mLeftVolShort;
+        uint16_t mRightVolShort;
+    };
+
+    class DuplicatingThread : public MixerThread {
+    public:
+        DuplicatingThread (const sp<AudioFlinger>& audioFlinger, MixerThread* mainThread, int id);
+        ~DuplicatingThread();
+
+        // Thread virtuals
+        virtual     bool        threadLoop();
+                    void        addOutputTrack(MixerThread* thread);
+                    void        removeOutputTrack(MixerThread* thread);
+                    uint32_t    waitTimeMs() { return mWaitTimeMs; }
+    protected:
+        virtual     uint32_t    activeSleepTimeUs();
+
+    private:
+                    bool        outputsReady(SortedVector< sp<OutputTrack> > &outputTracks);
+                    void        updateWaitTime();
+
+        SortedVector < sp<OutputTrack> >  mOutputTracks;
+                    uint32_t    mWaitTimeMs;
+    };
+
+              PlaybackThread *checkPlaybackThread_l(int output) const;
+              MixerThread *checkMixerThread_l(int output) const;
+              RecordThread *checkRecordThread_l(int input) const;
+              float streamVolumeInternal(int stream) const { return mStreamTypes[stream].volume; }
+              void audioConfigChanged_l(int event, int ioHandle, void *param2);
+
+              int  nextUniqueId();
+
+    friend class AudioBuffer;
+
+    class TrackHandle : public android::BnAudioTrack {
+    public:
+                            TrackHandle(const sp<PlaybackThread::Track>& track);
+        virtual             ~TrackHandle();
+        virtual status_t    start();
+        virtual void        stop();
+        virtual void        flush();
+        virtual void        mute(bool);
+        virtual void        pause();
+        virtual void        setVolume(float left, float right);
+        virtual sp<IMemory> getCblk() const;
+        virtual status_t    attachAuxEffect(int effectId);
+        virtual status_t onTransact(
+            uint32_t code, const Parcel& data, Parcel* reply, uint32_t flags);
+    private:
+        sp<PlaybackThread::Track> mTrack;
+    };
+
+    friend class Client;
+    friend class PlaybackThread::Track;
+
+
+                void        removeClient_l(pid_t pid);
+                void        removeNotificationClient(pid_t pid);
+
+
+    // record thread
+    class RecordThread : public ThreadBase, public AudioBufferProvider
+    {
+    public:
+
+        // record track
+        class RecordTrack : public TrackBase {
+        public:
+                                RecordTrack(const wp<ThreadBase>& thread,
+                                        const sp<Client>& client,
+                                        uint32_t sampleRate,
+                                        int format,
+                                        int channelCount,
+                                        int frameCount,
+                                        uint32_t flags,
+                                        int sessionId);
+                                ~RecordTrack();
+
+            virtual status_t    start();
+            virtual void        stop();
+
+                    bool        overflow() { bool tmp = mOverflow; mOverflow = false; return tmp; }
+                    bool        setOverflow() { bool tmp = mOverflow; mOverflow = true; return tmp; }
+
+                    void        dump(char* buffer, size_t size);
+        private:
+            friend class AudioFlinger;
+            friend class RecordThread;
+
+                                RecordTrack(const RecordTrack&);
+                                RecordTrack& operator = (const RecordTrack&);
+
+            virtual status_t getNextBuffer(AudioBufferProvider::Buffer* buffer);
+
+            bool                mOverflow;
+        };
+
+
+                RecordThread(const sp<AudioFlinger>& audioFlinger,
+                        AudioStreamIn *input,
+                        uint32_t sampleRate,
+                        uint32_t channels,
+                        int id);
+                ~RecordThread();
+
+        virtual bool        threadLoop();
+        virtual status_t    readyToRun() { return NO_ERROR; }
+        virtual void        onFirstRef();
+
+                status_t    start(RecordTrack* recordTrack);
+                void        stop(RecordTrack* recordTrack);
+                status_t    dump(int fd, const Vector<String16>& args);
+                AudioStreamIn* getInput() { return mInput; }
+
+        virtual status_t    getNextBuffer(AudioBufferProvider::Buffer* buffer);
+        virtual void        releaseBuffer(AudioBufferProvider::Buffer* buffer);
+        virtual bool        checkForNewParameters_l();
+        virtual String8     getParameters(const String8& keys);
+        virtual void        audioConfigChanged_l(int event, int param = 0);
+                void        readInputParameters();
+        virtual unsigned int  getInputFramesLost();
+
+    private:
+                RecordThread();
+                AudioStreamIn                       *mInput;
+                sp<RecordTrack>                     mActiveTrack;
+                Condition                           mStartStopCond;
+                AudioResampler                      *mResampler;
+                int32_t                             *mRsmpOutBuffer;
+                int16_t                             *mRsmpInBuffer;
+                size_t                              mRsmpInIndex;
+                size_t                              mInputBytes;
+                int                                 mReqChannelCount;
+                uint32_t                            mReqSampleRate;
+                ssize_t                             mBytesRead;
+    };
+
+    class RecordHandle : public android::BnAudioRecord {
+    public:
+        RecordHandle(const sp<RecordThread::RecordTrack>& recordTrack);
+        virtual             ~RecordHandle();
+        virtual status_t    start();
+        virtual void        stop();
+        virtual sp<IMemory> getCblk() const;
+        virtual status_t onTransact(
+            uint32_t code, const Parcel& data, Parcel* reply, uint32_t flags);
+    private:
+        sp<RecordThread::RecordTrack> mRecordTrack;
+    };
+
+    //--- Audio Effect Management
+
+    // EffectModule and EffectChain classes both have their own mutex to protect
+    // state changes or resource modifications. Always respect the following order
+    // if multiple mutexes must be acquired to avoid cross deadlock:
+    // AudioFlinger -> ThreadBase -> EffectChain -> EffectModule
+
+    // The EffectModule class is a wrapper object controlling the effect engine implementation
+    // in the effect library. It prevents concurrent calls to process() and command() functions
+    // from different client threads. It keeps a list of EffectHandle objects corresponding
+    // to all client applications using this effect and notifies applications of effect state,
+    // control or parameter changes. It manages the activation state machine to send appropriate
+    // reset, enable, disable commands to effect engine and provide volume
+    // ramping when effects are activated/deactivated.
+    // When controlling an auxiliary effect, the EffectModule also provides an input buffer used by
+    // the attached track(s) to accumulate their auxiliary channel.
+    class EffectModule: public RefBase {
+    public:
+        EffectModule(const wp<ThreadBase>& wThread,
+                        const wp<AudioFlinger::EffectChain>& chain,
+                        effect_descriptor_t *desc,
+                        int id,
+                        int sessionId);
+        ~EffectModule();
+
+        enum effect_state {
+            IDLE,
+            RESTART,
+            STARTING,
+            ACTIVE,
+            STOPPING,
+            STOPPED
+        };
+
+        int         id() { return mId; }
+        void process();
+        void updateState();
+        status_t command(int cmdCode, int cmdSize, void *pCmdData, int *replySize, void *pReplyData);
+
+        void reset_l();
+        status_t configure();
+        status_t init();
+        uint32_t state() {
+            return mState;
+        }
+        uint32_t status() {
+            return mStatus;
+        }
+        status_t    setEnabled(bool enabled);
+        bool isEnabled();
+
+        void        setInBuffer(int16_t *buffer) { mConfig.inputCfg.buffer.s16 = buffer; }
+        int16_t     *inBuffer() { return mConfig.inputCfg.buffer.s16; }
+        void        setOutBuffer(int16_t *buffer) { mConfig.outputCfg.buffer.s16 = buffer; }
+        int16_t     *outBuffer() { return mConfig.outputCfg.buffer.s16; }
+
+        status_t addHandle(sp<EffectHandle>& handle);
+        void disconnect(const wp<EffectHandle>& handle);
+        size_t removeHandle (const wp<EffectHandle>& handle);
+
+        effect_descriptor_t& desc() { return mDescriptor; }
+        wp<EffectChain>&     chain() { return mChain; }
+
+        status_t         setDevice(uint32_t device);
+        status_t         setVolume(uint32_t *left, uint32_t *right, bool controller);
+        status_t         setMode(uint32_t mode);
+
+        status_t         dump(int fd, const Vector<String16>& args);
+
+    protected:
+
+        // Maximum time allocated to effect engines to complete the turn off sequence
+        static const uint32_t MAX_DISABLE_TIME_MS = 10000;
+
+        EffectModule(const EffectModule&);
+        EffectModule& operator = (const EffectModule&);
+
+        status_t start_l();
+        status_t stop_l();
+
+        // update this table when AudioSystem::audio_devices or audio_device_e (in EffectApi.h) are modified
+        static const uint32_t sDeviceConvTable[];
+        static uint32_t deviceAudioSystemToEffectApi(uint32_t device);
+
+        // update this table when AudioSystem::audio_mode or audio_mode_e (in EffectApi.h) are modified
+        static const uint32_t sModeConvTable[];
+        static int modeAudioSystemToEffectApi(uint32_t mode);
+
+        Mutex               mLock;      // mutex for process, commands and handles list protection
+        wp<ThreadBase>      mThread;    // parent thread
+        wp<EffectChain>     mChain;     // parent effect chain
+        int                 mId;        // this instance unique ID
+        int                 mSessionId; // audio session ID
+        effect_descriptor_t mDescriptor;// effect descriptor received from effect engine
+        effect_config_t     mConfig;    // input and output audio configuration
+        effect_interface_t  mEffectInterface; // Effect module C API
+        status_t mStatus;               // initialization status
+        uint32_t mState;                // current activation state (effect_state)
+        Vector< wp<EffectHandle> > mHandles;    // list of client handles
+        uint32_t mMaxDisableWaitCnt;    // maximum grace period before forcing an effect off after
+                                        // sending disable command.
+        uint32_t mDisableWaitCnt;       // current process() calls count during disable period.
+    };
+
+    // The EffectHandle class implements the IEffect interface. It provides resources
+    // to receive parameter updates, keeps track of effect control
+    // ownership and state and has a pointer to the EffectModule object it is controlling.
+    // There is one EffectHandle object for each application controlling (or using)
+    // an effect module.
+    // The EffectHandle is obtained by calling AudioFlinger::createEffect().
+    class EffectHandle: public android::BnEffect {
+    public:
+
+        EffectHandle(const sp<EffectModule>& effect,
+                const sp<AudioFlinger::Client>& client,
+                const sp<IEffectClient>& effectClient,
+                int32_t priority);
+        virtual ~EffectHandle();
+
+        // IEffect
+        virtual status_t enable();
+        virtual status_t disable();
+        virtual status_t command(int cmdCode, int cmdSize, void *pCmdData, int *replySize, void *pReplyData);
+        virtual void disconnect();
+        virtual sp<IMemory> getCblk() const;
+        virtual status_t onTransact(uint32_t code, const Parcel& data,
+                Parcel* reply, uint32_t flags);
+
+
+        // Give or take control of effect module
+        void setControl(bool hasControl, bool signal);
+        void commandExecuted(int cmdCode, int cmdSize, void *pCmdData, int replySize, void *pReplyData);
+        void setEnabled(bool enabled);
+
+        // Getters
+        int id() { return mEffect->id(); }
+        int priority() { return mPriority; }
+        bool hasControl() { return mHasControl; }
+        sp<EffectModule> effect() { return mEffect; }
+
+        void dump(char* buffer, size_t size);
+
+    protected:
+
+        EffectHandle(const EffectHandle&);
+        EffectHandle& operator =(const EffectHandle&);
+
+        sp<EffectModule> mEffect;           // pointer to controlled EffectModule
+        sp<IEffectClient> mEffectClient;    // callback interface for client notifications
+        sp<Client>          mClient;        // client for shared memory allocation
+        sp<IMemory>         mCblkMemory;    // shared memory for control block
+        effect_param_cblk_t* mCblk;         // control block for deferred parameter setting via shared memory
+        uint8_t*            mBuffer;        // pointer to parameter area in shared memory
+        int mPriority;                      // client application priority to control the effect
+        bool mHasControl;                   // true if this handle is controlling the effect
+    };
+
+    // the EffectChain class represents a group of effects associated to one audio session.
+    // There can be any number of EffectChain objects per output mixer thread (PlaybackThread).
+    // The EffecChain with session ID 0 contains global effects applied to the output mix.
+    // Effects in this chain can be insert or auxiliary. Effects in other chains (attached to tracks)
+    // are insert only. The EffectChain maintains an ordered list of effect module, the order corresponding
+    // in the effect process order. When attached to a track (session ID != 0), it also provide it's own
+    // input buffer used by the track as accumulation buffer.
+    class EffectChain: public RefBase {
+    public:
+        EffectChain(const wp<ThreadBase>& wThread, int sessionId);
+        ~EffectChain();
+
+        void process_l();
+
+        void lock() {
+            mLock.lock();
+        }
+        void unlock() {
+            mLock.unlock();
+        }
+
+        status_t addEffect_l(sp<EffectModule>& handle);
+        size_t removeEffect_l(const sp<EffectModule>& handle);
+
+        int sessionId() {
+            return mSessionId;
+        }
+        sp<EffectModule> getEffectFromDesc_l(effect_descriptor_t *descriptor);
+        sp<EffectModule> getEffectFromId_l(int id);
+        bool setVolume_l(uint32_t *left, uint32_t *right);
+        void setDevice_l(uint32_t device);
+        void setMode_l(uint32_t mode);
+
+
+        void setInBuffer(int16_t *buffer, bool ownsBuffer = false) {
+            mInBuffer = buffer;
+            mOwnInBuffer = ownsBuffer;
+        }
+        int16_t *inBuffer() {
+            return mInBuffer;
+        }
+        void setOutBuffer(int16_t *buffer) {
+            mOutBuffer = buffer;
+        }
+        int16_t *outBuffer() {
+            return mOutBuffer;
+        }
+
+        void startTrack() {mActiveTrackCnt++;}
+        void stopTrack() {mActiveTrackCnt--;}
+        int activeTracks() { return mActiveTrackCnt;}
+
+        status_t dump(int fd, const Vector<String16>& args);
+
+    protected:
+
+        EffectChain(const EffectChain&);
+        EffectChain& operator =(const EffectChain&);
+
+        wp<ThreadBase> mThread;     // parent mixer thread
+        Mutex mLock;                // mutex protecting effect list
+        Vector<sp<EffectModule> > mEffects; // list of effect modules
+        int mSessionId;             // audio session ID
+        int16_t *mInBuffer;         // chain input buffer
+        int16_t *mOutBuffer;        // chain output buffer
+        int mActiveTrackCnt;        // number of active tracks connected
+        bool mOwnInBuffer;          // true if the chain owns its input buffer
+        int mVolumeCtrlIdx;         // index of insert effect having control over volume
+        uint32_t mLeftVolume;       // previous volume on left channel
+        uint32_t mRightVolume;      // previous volume on right channel
+    };
+
+    friend class RecordThread;
+    friend class PlaybackThread;
+
+
+    mutable     Mutex                               mLock;
+
+                DefaultKeyedVector< pid_t, wp<Client> >     mClients;
+
+                mutable     Mutex                   mHardwareLock;
+                AudioHardwareInterface*             mAudioHardware;
+    mutable     int                                 mHardwareStatus;
+
+
+                DefaultKeyedVector< int, sp<PlaybackThread> >  mPlaybackThreads;
+                PlaybackThread::stream_type_t       mStreamTypes[AudioSystem::NUM_STREAM_TYPES];
+                float                               mMasterVolume;
+                bool                                mMasterMute;
+
+                DefaultKeyedVector< int, sp<RecordThread> >    mRecordThreads;
+
+                DefaultKeyedVector< pid_t, sp<NotificationClient> >    mNotificationClients;
+                volatile int32_t                    mNextUniqueId;
+#ifdef LVMX
+                int mLifeVibesClientPid;
+#endif
+                uint32_t mMode;
+
+                // Maximum CPU load allocated to audio effects in 0.1 MIPS (ARMv5TE, 0 WS memory) units
+                static const uint32_t MAX_EFFECTS_CPU_LOAD = 1000;
+                // Maximum memory allocated to audio effects in KB
+                static const uint32_t MAX_EFFECTS_MEMORY = 512;
+                uint32_t mTotalEffectsCpuLoad; // current CPU load used by effects
+                uint32_t mTotalEffectsMemory;  // current memory used by effects
+};
+
+// ----------------------------------------------------------------------------
+
+}; // namespace android
+
+#endif // ANDROID_AUDIO_FLINGER_H
diff --git a/libs/audioflinger/AudioHardwareGeneric.cpp b/services/audioflinger/AudioHardwareGeneric.cpp
similarity index 100%
rename from libs/audioflinger/AudioHardwareGeneric.cpp
rename to services/audioflinger/AudioHardwareGeneric.cpp
diff --git a/libs/audioflinger/AudioHardwareGeneric.h b/services/audioflinger/AudioHardwareGeneric.h
similarity index 100%
rename from libs/audioflinger/AudioHardwareGeneric.h
rename to services/audioflinger/AudioHardwareGeneric.h
diff --git a/libs/audioflinger/AudioHardwareInterface.cpp b/services/audioflinger/AudioHardwareInterface.cpp
similarity index 100%
rename from libs/audioflinger/AudioHardwareInterface.cpp
rename to services/audioflinger/AudioHardwareInterface.cpp
diff --git a/libs/audioflinger/AudioHardwareStub.cpp b/services/audioflinger/AudioHardwareStub.cpp
similarity index 100%
rename from libs/audioflinger/AudioHardwareStub.cpp
rename to services/audioflinger/AudioHardwareStub.cpp
diff --git a/libs/audioflinger/AudioHardwareStub.h b/services/audioflinger/AudioHardwareStub.h
similarity index 100%
rename from libs/audioflinger/AudioHardwareStub.h
rename to services/audioflinger/AudioHardwareStub.h
diff --git a/services/audioflinger/AudioMixer.cpp b/services/audioflinger/AudioMixer.cpp
new file mode 100644
index 0000000..8aaa325
--- /dev/null
+++ b/services/audioflinger/AudioMixer.cpp
@@ -0,0 +1,1195 @@
+/* //device/include/server/AudioFlinger/AudioMixer.cpp
+**
+** Copyright 2007, The Android Open Source Project
+**
+** Licensed under the Apache License, Version 2.0 (the "License");
+** you may not use this file except in compliance with the License.
+** You may obtain a copy of the License at
+**
+**     http://www.apache.org/licenses/LICENSE-2.0
+**
+** Unless required by applicable law or agreed to in writing, software
+** distributed under the License is distributed on an "AS IS" BASIS,
+** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+** See the License for the specific language governing permissions and
+** limitations under the License.
+*/
+
+#define LOG_TAG "AudioMixer"
+//#define LOG_NDEBUG 0
+
+#include <stdint.h>
+#include <string.h>
+#include <stdlib.h>
+#include <sys/types.h>
+
+#include <utils/Errors.h>
+#include <utils/Log.h>
+
+#include "AudioMixer.h"
+
+namespace android {
+// ----------------------------------------------------------------------------
+
+static inline int16_t clamp16(int32_t sample)
+{
+    if ((sample>>15) ^ (sample>>31))
+        sample = 0x7FFF ^ (sample>>31);
+    return sample;
+}
+
+// ----------------------------------------------------------------------------
+
+AudioMixer::AudioMixer(size_t frameCount, uint32_t sampleRate)
+    :   mActiveTrack(0), mTrackNames(0), mSampleRate(sampleRate)
+{
+    mState.enabledTracks= 0;
+    mState.needsChanged = 0;
+    mState.frameCount   = frameCount;
+    mState.outputTemp   = 0;
+    mState.resampleTemp = 0;
+    mState.hook         = process__nop;
+    track_t* t = mState.tracks;
+    for (int i=0 ; i<32 ; i++) {
+        t->needs = 0;
+        t->volume[0] = UNITY_GAIN;
+        t->volume[1] = UNITY_GAIN;
+        t->volumeInc[0] = 0;
+        t->volumeInc[1] = 0;
+        t->auxLevel = 0;
+        t->auxInc = 0;
+        t->channelCount = 2;
+        t->enabled = 0;
+        t->format = 16;
+        t->buffer.raw = 0;
+        t->bufferProvider = 0;
+        t->hook = 0;
+        t->resampler = 0;
+        t->sampleRate = mSampleRate;
+        t->in = 0;
+        t->mainBuffer = NULL;
+        t->auxBuffer = NULL;
+        t++;
+    }
+}
+
+ AudioMixer::~AudioMixer()
+ {
+     track_t* t = mState.tracks;
+     for (int i=0 ; i<32 ; i++) {
+         delete t->resampler;
+         t++;
+     }
+     delete [] mState.outputTemp;
+     delete [] mState.resampleTemp;
+ }
+
+ int AudioMixer::getTrackName()
+ {
+    uint32_t names = mTrackNames;
+    uint32_t mask = 1;
+    int n = 0;
+    while (names & mask) {
+        mask <<= 1;
+        n++;
+    }
+    if (mask) {
+        LOGV("add track (%d)", n);
+        mTrackNames |= mask;
+        return TRACK0 + n;
+    }
+    return -1;
+ }
+
+ void AudioMixer::invalidateState(uint32_t mask)
+ {
+    if (mask) {
+        mState.needsChanged |= mask;
+        mState.hook = process__validate;
+    }
+ }
+
+ void AudioMixer::deleteTrackName(int name)
+ {
+    name -= TRACK0;
+    if (uint32_t(name) < MAX_NUM_TRACKS) {
+        LOGV("deleteTrackName(%d)", name);
+        track_t& track(mState.tracks[ name ]);
+        if (track.enabled != 0) {
+            track.enabled = 0;
+            invalidateState(1<<name);
+        }
+        if (track.resampler) {
+            // delete  the resampler
+            delete track.resampler;
+            track.resampler = 0;
+            track.sampleRate = mSampleRate;
+            invalidateState(1<<name);
+        }
+        track.volumeInc[0] = 0;
+        track.volumeInc[1] = 0;
+        mTrackNames &= ~(1<<name);
+    }
+ }
+
+status_t AudioMixer::enable(int name)
+{
+    switch (name) {
+        case MIXING: {
+            if (mState.tracks[ mActiveTrack ].enabled != 1) {
+                mState.tracks[ mActiveTrack ].enabled = 1;
+                LOGV("enable(%d)", mActiveTrack);
+                invalidateState(1<<mActiveTrack);
+            }
+        } break;
+        default:
+            return NAME_NOT_FOUND;
+    }
+    return NO_ERROR;
+}
+
+status_t AudioMixer::disable(int name)
+{
+    switch (name) {
+        case MIXING: {
+            if (mState.tracks[ mActiveTrack ].enabled != 0) {
+                mState.tracks[ mActiveTrack ].enabled = 0;
+                LOGV("disable(%d)", mActiveTrack);
+                invalidateState(1<<mActiveTrack);
+            }
+        } break;
+        default:
+            return NAME_NOT_FOUND;
+    }
+    return NO_ERROR;
+}
+
+status_t AudioMixer::setActiveTrack(int track)
+{
+    if (uint32_t(track-TRACK0) >= MAX_NUM_TRACKS) {
+        return BAD_VALUE;
+    }
+    mActiveTrack = track - TRACK0;
+    return NO_ERROR;
+}
+
+status_t AudioMixer::setParameter(int target, int name, void *value)
+{
+    int valueInt = (int)value;
+    int32_t *valueBuf = (int32_t *)value;
+
+    switch (target) {
+    case TRACK:
+        if (name == CHANNEL_COUNT) {
+            if ((uint32_t(valueInt) <= MAX_NUM_CHANNELS) && (valueInt)) {
+                if (mState.tracks[ mActiveTrack ].channelCount != valueInt) {
+                    mState.tracks[ mActiveTrack ].channelCount = valueInt;
+                    LOGV("setParameter(TRACK, CHANNEL_COUNT, %d)", valueInt);
+                    invalidateState(1<<mActiveTrack);
+                }
+                return NO_ERROR;
+            }
+        }
+        if (name == MAIN_BUFFER) {
+            if (mState.tracks[ mActiveTrack ].mainBuffer != valueBuf) {
+                mState.tracks[ mActiveTrack ].mainBuffer = valueBuf;
+                LOGV("setParameter(TRACK, MAIN_BUFFER, %p)", valueBuf);
+                invalidateState(1<<mActiveTrack);
+            }
+            return NO_ERROR;
+        }
+        if (name == AUX_BUFFER) {
+            if (mState.tracks[ mActiveTrack ].auxBuffer != valueBuf) {
+                mState.tracks[ mActiveTrack ].auxBuffer = valueBuf;
+                LOGV("setParameter(TRACK, AUX_BUFFER, %p)", valueBuf);
+                invalidateState(1<<mActiveTrack);
+            }
+            return NO_ERROR;
+        }
+
+        break;
+    case RESAMPLE:
+        if (name == SAMPLE_RATE) {
+            if (valueInt > 0) {
+                track_t& track = mState.tracks[ mActiveTrack ];
+                if (track.setResampler(uint32_t(valueInt), mSampleRate)) {
+                    LOGV("setParameter(RESAMPLE, SAMPLE_RATE, %u)",
+                            uint32_t(valueInt));
+                    invalidateState(1<<mActiveTrack);
+                }
+                return NO_ERROR;
+            }
+        }
+        break;
+    case RAMP_VOLUME:
+    case VOLUME:
+        if ((uint32_t(name-VOLUME0) < MAX_NUM_CHANNELS)) {
+            track_t& track = mState.tracks[ mActiveTrack ];
+            if (track.volume[name-VOLUME0] != valueInt) {
+                LOGV("setParameter(VOLUME, VOLUME0/1: %04x)", valueInt);
+                track.prevVolume[name-VOLUME0] = track.volume[name-VOLUME0] << 16;
+                track.volume[name-VOLUME0] = valueInt;
+                if (target == VOLUME) {
+                    track.prevVolume[name-VOLUME0] = valueInt << 16;
+                    track.volumeInc[name-VOLUME0] = 0;
+                } else {
+                    int32_t d = (valueInt<<16) - track.prevVolume[name-VOLUME0];
+                    int32_t volInc = d / int32_t(mState.frameCount);
+                    track.volumeInc[name-VOLUME0] = volInc;
+                    if (volInc == 0) {
+                        track.prevVolume[name-VOLUME0] = valueInt << 16;
+                    }
+                }
+                invalidateState(1<<mActiveTrack);
+            }
+            return NO_ERROR;
+        } else if (name == AUXLEVEL) {
+            track_t& track = mState.tracks[ mActiveTrack ];
+            if (track.auxLevel != valueInt) {
+                LOGV("setParameter(VOLUME, AUXLEVEL: %04x)", valueInt);
+                track.prevAuxLevel = track.auxLevel << 16;
+                track.auxLevel = valueInt;
+                if (target == VOLUME) {
+                    track.prevAuxLevel = valueInt << 16;
+                    track.auxInc = 0;
+                } else {
+                    int32_t d = (valueInt<<16) - track.prevAuxLevel;
+                    int32_t volInc = d / int32_t(mState.frameCount);
+                    track.auxInc = volInc;
+                    if (volInc == 0) {
+                        track.prevAuxLevel = valueInt << 16;
+                    }
+                }
+                invalidateState(1<<mActiveTrack);
+            }
+            return NO_ERROR;
+        }
+        break;
+    }
+    return BAD_VALUE;
+}
+
+bool AudioMixer::track_t::setResampler(uint32_t value, uint32_t devSampleRate)
+{
+    if (value!=devSampleRate || resampler) {
+        if (sampleRate != value) {
+            sampleRate = value;
+            if (resampler == 0) {
+                resampler = AudioResampler::create(
+                        format, channelCount, devSampleRate);
+            }
+            return true;
+        }
+    }
+    return false;
+}
+
+bool AudioMixer::track_t::doesResample() const
+{
+    return resampler != 0;
+}
+
+inline
+void AudioMixer::track_t::adjustVolumeRamp(bool aux)
+{
+    for (int i=0 ; i<2 ; i++) {
+        if (((volumeInc[i]>0) && (((prevVolume[i]+volumeInc[i])>>16) >= volume[i])) ||
+            ((volumeInc[i]<0) && (((prevVolume[i]+volumeInc[i])>>16) <= volume[i]))) {
+            volumeInc[i] = 0;
+            prevVolume[i] = volume[i]<<16;
+        }
+    }
+    if (aux) {
+        if (((auxInc>0) && (((prevAuxLevel+auxInc)>>16) >= auxLevel)) ||
+            ((auxInc<0) && (((prevAuxLevel+auxInc)>>16) <= auxLevel))) {
+            auxInc = 0;
+            prevAuxLevel = auxLevel<<16;
+        }
+    }
+}
+
+
+status_t AudioMixer::setBufferProvider(AudioBufferProvider* buffer)
+{
+    mState.tracks[ mActiveTrack ].bufferProvider = buffer;
+    return NO_ERROR;
+}
+
+
+
+void AudioMixer::process()
+{
+    mState.hook(&mState);
+}
+
+
+void AudioMixer::process__validate(state_t* state)
+{
+    LOGW_IF(!state->needsChanged,
+        "in process__validate() but nothing's invalid");
+
+    uint32_t changed = state->needsChanged;
+    state->needsChanged = 0; // clear the validation flag
+
+    // recompute which tracks are enabled / disabled
+    uint32_t enabled = 0;
+    uint32_t disabled = 0;
+    while (changed) {
+        const int i = 31 - __builtin_clz(changed);
+        const uint32_t mask = 1<<i;
+        changed &= ~mask;
+        track_t& t = state->tracks[i];
+        (t.enabled ? enabled : disabled) |= mask;
+    }
+    state->enabledTracks &= ~disabled;
+    state->enabledTracks |=  enabled;
+
+    // compute everything we need...
+    int countActiveTracks = 0;
+    int all16BitsStereoNoResample = 1;
+    int resampling = 0;
+    int volumeRamp = 0;
+    uint32_t en = state->enabledTracks;
+    while (en) {
+        const int i = 31 - __builtin_clz(en);
+        en &= ~(1<<i);
+
+        countActiveTracks++;
+        track_t& t = state->tracks[i];
+        uint32_t n = 0;
+        n |= NEEDS_CHANNEL_1 + t.channelCount - 1;
+        n |= NEEDS_FORMAT_16;
+        n |= t.doesResample() ? NEEDS_RESAMPLE_ENABLED : NEEDS_RESAMPLE_DISABLED;
+        if (t.auxLevel != 0 && t.auxBuffer != NULL) {
+            n |= NEEDS_AUX_ENABLED;
+        }
+
+        if (t.volumeInc[0]|t.volumeInc[1]) {
+            volumeRamp = 1;
+        } else if (!t.doesResample() && t.volumeRL == 0) {
+            n |= NEEDS_MUTE_ENABLED;
+        }
+        t.needs = n;
+
+        if ((n & NEEDS_MUTE__MASK) == NEEDS_MUTE_ENABLED) {
+            t.hook = track__nop;
+        } else {
+            if ((n & NEEDS_AUX__MASK) == NEEDS_AUX_ENABLED) {
+                all16BitsStereoNoResample = 0;
+            }
+            if ((n & NEEDS_RESAMPLE__MASK) == NEEDS_RESAMPLE_ENABLED) {
+                all16BitsStereoNoResample = 0;
+                resampling = 1;
+                t.hook = track__genericResample;
+            } else {
+                if ((n & NEEDS_CHANNEL_COUNT__MASK) == NEEDS_CHANNEL_1){
+                    t.hook = track__16BitsMono;
+                    all16BitsStereoNoResample = 0;
+                }
+                if ((n & NEEDS_CHANNEL_COUNT__MASK) == NEEDS_CHANNEL_2){
+                    t.hook = track__16BitsStereo;
+                }
+            }
+        }
+    }
+
+    // select the processing hooks
+    state->hook = process__nop;
+    if (countActiveTracks) {
+        if (resampling) {
+            if (!state->outputTemp) {
+                state->outputTemp = new int32_t[MAX_NUM_CHANNELS * state->frameCount];
+            }
+            if (!state->resampleTemp) {
+                state->resampleTemp = new int32_t[MAX_NUM_CHANNELS * state->frameCount];
+            }
+            state->hook = process__genericResampling;
+        } else {
+            if (state->outputTemp) {
+                delete [] state->outputTemp;
+                state->outputTemp = 0;
+            }
+            if (state->resampleTemp) {
+                delete [] state->resampleTemp;
+                state->resampleTemp = 0;
+            }
+            state->hook = process__genericNoResampling;
+            if (all16BitsStereoNoResample && !volumeRamp) {
+                if (countActiveTracks == 1) {
+                    state->hook = process__OneTrack16BitsStereoNoResampling;
+                }
+            }
+        }
+    }
+
+    LOGV("mixer configuration change: %d activeTracks (%08x) "
+        "all16BitsStereoNoResample=%d, resampling=%d, volumeRamp=%d",
+        countActiveTracks, state->enabledTracks,
+        all16BitsStereoNoResample, resampling, volumeRamp);
+
+   state->hook(state);
+
+   // Now that the volume ramp has been done, set optimal state and
+   // track hooks for subsequent mixer process
+   if (countActiveTracks) {
+       int allMuted = 1;
+       uint32_t en = state->enabledTracks;
+       while (en) {
+           const int i = 31 - __builtin_clz(en);
+           en &= ~(1<<i);
+           track_t& t = state->tracks[i];
+           if (!t.doesResample() && t.volumeRL == 0)
+           {
+               t.needs |= NEEDS_MUTE_ENABLED;
+               t.hook = track__nop;
+           } else {
+               allMuted = 0;
+           }
+       }
+       if (allMuted) {
+           state->hook = process__nop;
+       } else if (all16BitsStereoNoResample) {
+           if (countActiveTracks == 1) {
+              state->hook = process__OneTrack16BitsStereoNoResampling;
+           }
+       }
+   }
+}
+
+static inline
+int32_t mulAdd(int16_t in, int16_t v, int32_t a)
+{
+#if defined(__arm__) && !defined(__thumb__)
+    int32_t out;
+    asm( "smlabb %[out], %[in], %[v], %[a] \n"
+         : [out]"=r"(out)
+         : [in]"%r"(in), [v]"r"(v), [a]"r"(a)
+         : );
+    return out;
+#else
+    return a + in * int32_t(v);
+#endif
+}
+
+static inline
+int32_t mul(int16_t in, int16_t v)
+{
+#if defined(__arm__) && !defined(__thumb__)
+    int32_t out;
+    asm( "smulbb %[out], %[in], %[v] \n"
+         : [out]"=r"(out)
+         : [in]"%r"(in), [v]"r"(v)
+         : );
+    return out;
+#else
+    return in * int32_t(v);
+#endif
+}
+
+static inline
+int32_t mulAddRL(int left, uint32_t inRL, uint32_t vRL, int32_t a)
+{
+#if defined(__arm__) && !defined(__thumb__)
+    int32_t out;
+    if (left) {
+        asm( "smlabb %[out], %[inRL], %[vRL], %[a] \n"
+             : [out]"=r"(out)
+             : [inRL]"%r"(inRL), [vRL]"r"(vRL), [a]"r"(a)
+             : );
+    } else {
+        asm( "smlatt %[out], %[inRL], %[vRL], %[a] \n"
+             : [out]"=r"(out)
+             : [inRL]"%r"(inRL), [vRL]"r"(vRL), [a]"r"(a)
+             : );
+    }
+    return out;
+#else
+    if (left) {
+        return a + int16_t(inRL&0xFFFF) * int16_t(vRL&0xFFFF);
+    } else {
+        return a + int16_t(inRL>>16) * int16_t(vRL>>16);
+    }
+#endif
+}
+
+static inline
+int32_t mulRL(int left, uint32_t inRL, uint32_t vRL)
+{
+#if defined(__arm__) && !defined(__thumb__)
+    int32_t out;
+    if (left) {
+        asm( "smulbb %[out], %[inRL], %[vRL] \n"
+             : [out]"=r"(out)
+             : [inRL]"%r"(inRL), [vRL]"r"(vRL)
+             : );
+    } else {
+        asm( "smultt %[out], %[inRL], %[vRL] \n"
+             : [out]"=r"(out)
+             : [inRL]"%r"(inRL), [vRL]"r"(vRL)
+             : );
+    }
+    return out;
+#else
+    if (left) {
+        return int16_t(inRL&0xFFFF) * int16_t(vRL&0xFFFF);
+    } else {
+        return int16_t(inRL>>16) * int16_t(vRL>>16);
+    }
+#endif
+}
+
+
+void AudioMixer::track__genericResample(track_t* t, int32_t* out, size_t outFrameCount, int32_t* temp, int32_t* aux)
+{
+    t->resampler->setSampleRate(t->sampleRate);
+
+    // ramp gain - resample to temp buffer and scale/mix in 2nd step
+    if (aux != NULL) {
+        // always resample with unity gain when sending to auxiliary buffer to be able
+        // to apply send level after resampling
+        // TODO: modify each resampler to support aux channel?
+        t->resampler->setVolume(UNITY_GAIN, UNITY_GAIN);
+        memset(temp, 0, outFrameCount * MAX_NUM_CHANNELS * sizeof(int32_t));
+        t->resampler->resample(temp, outFrameCount, t->bufferProvider);
+        if UNLIKELY(t->volumeInc[0]|t->volumeInc[1]|t->auxInc) {
+            volumeRampStereo(t, out, outFrameCount, temp, aux);
+        } else {
+            volumeStereo(t, out, outFrameCount, temp, aux);
+        }
+    } else {
+        if UNLIKELY(t->volumeInc[0]|t->volumeInc[1]) {
+            t->resampler->setVolume(UNITY_GAIN, UNITY_GAIN);
+            memset(temp, 0, outFrameCount * MAX_NUM_CHANNELS * sizeof(int32_t));
+            t->resampler->resample(temp, outFrameCount, t->bufferProvider);
+            volumeRampStereo(t, out, outFrameCount, temp, aux);
+        }
+
+        // constant gain
+        else {
+            t->resampler->setVolume(t->volume[0], t->volume[1]);
+            t->resampler->resample(out, outFrameCount, t->bufferProvider);
+        }
+    }
+}
+
+void AudioMixer::track__nop(track_t* t, int32_t* out, size_t outFrameCount, int32_t* temp, int32_t* aux)
+{
+}
+
+void AudioMixer::volumeRampStereo(track_t* t, int32_t* out, size_t frameCount, int32_t* temp, int32_t* aux)
+{
+    int32_t vl = t->prevVolume[0];
+    int32_t vr = t->prevVolume[1];
+    const int32_t vlInc = t->volumeInc[0];
+    const int32_t vrInc = t->volumeInc[1];
+
+    //LOGD("[0] %p: inc=%f, v0=%f, v1=%d, final=%f, count=%d",
+    //        t, vlInc/65536.0f, vl/65536.0f, t->volume[0],
+    //       (vl + vlInc*frameCount)/65536.0f, frameCount);
+
+    // ramp volume
+    if UNLIKELY(aux != NULL) {
+        int32_t va = t->prevAuxLevel;
+        const int32_t vaInc = t->auxInc;
+        int32_t l;
+        int32_t r;
+
+        do {
+            l = (*temp++ >> 12);
+            r = (*temp++ >> 12);
+            *out++ += (vl >> 16) * l;
+            *out++ += (vr >> 16) * r;
+            *aux++ += (va >> 17) * (l + r);
+            vl += vlInc;
+            vr += vrInc;
+            va += vaInc;
+        } while (--frameCount);
+        t->prevAuxLevel = va;
+    } else {
+        do {
+            *out++ += (vl >> 16) * (*temp++ >> 12);
+            *out++ += (vr >> 16) * (*temp++ >> 12);
+            vl += vlInc;
+            vr += vrInc;
+        } while (--frameCount);
+    }
+    t->prevVolume[0] = vl;
+    t->prevVolume[1] = vr;
+    t->adjustVolumeRamp((aux != NULL));
+}
+
+void AudioMixer::volumeStereo(track_t* t, int32_t* out, size_t frameCount, int32_t* temp, int32_t* aux)
+{
+    const int16_t vl = t->volume[0];
+    const int16_t vr = t->volume[1];
+
+    if UNLIKELY(aux != NULL) {
+        const int16_t va = (int16_t)t->auxLevel;
+        do {
+            int16_t l = (int16_t)(*temp++ >> 12);
+            int16_t r = (int16_t)(*temp++ >> 12);
+            out[0] = mulAdd(l, vl, out[0]);
+            int16_t a = (int16_t)(((int32_t)l + r) >> 1);
+            out[1] = mulAdd(r, vr, out[1]);
+            out += 2;
+            aux[0] = mulAdd(a, va, aux[0]);
+            aux++;
+        } while (--frameCount);
+    } else {
+        do {
+            int16_t l = (int16_t)(*temp++ >> 12);
+            int16_t r = (int16_t)(*temp++ >> 12);
+            out[0] = mulAdd(l, vl, out[0]);
+            out[1] = mulAdd(r, vr, out[1]);
+            out += 2;
+        } while (--frameCount);
+    }
+}
+
+void AudioMixer::track__16BitsStereo(track_t* t, int32_t* out, size_t frameCount, int32_t* temp, int32_t* aux)
+{
+    int16_t const *in = static_cast<int16_t const *>(t->in);
+
+    if UNLIKELY(aux != NULL) {
+        int32_t l;
+        int32_t r;
+        // ramp gain
+        if UNLIKELY(t->volumeInc[0]|t->volumeInc[1]|t->auxInc) {
+            int32_t vl = t->prevVolume[0];
+            int32_t vr = t->prevVolume[1];
+            int32_t va = t->prevAuxLevel;
+            const int32_t vlInc = t->volumeInc[0];
+            const int32_t vrInc = t->volumeInc[1];
+            const int32_t vaInc = t->auxInc;
+            // LOGD("[1] %p: inc=%f, v0=%f, v1=%d, final=%f, count=%d",
+            //        t, vlInc/65536.0f, vl/65536.0f, t->volume[0],
+            //        (vl + vlInc*frameCount)/65536.0f, frameCount);
+
+            do {
+                l = (int32_t)*in++;
+                r = (int32_t)*in++;
+                *out++ += (vl >> 16) * l;
+                *out++ += (vr >> 16) * r;
+                *aux++ += (va >> 17) * (l + r);
+                vl += vlInc;
+                vr += vrInc;
+                va += vaInc;
+            } while (--frameCount);
+
+            t->prevVolume[0] = vl;
+            t->prevVolume[1] = vr;
+            t->prevAuxLevel = va;
+            t->adjustVolumeRamp(true);
+        }
+
+        // constant gain
+        else {
+            const uint32_t vrl = t->volumeRL;
+            const int16_t va = (int16_t)t->auxLevel;
+            do {
+                uint32_t rl = *reinterpret_cast<uint32_t const *>(in);
+                int16_t a = (int16_t)(((int32_t)in[0] + in[1]) >> 1);
+                in += 2;
+                out[0] = mulAddRL(1, rl, vrl, out[0]);
+                out[1] = mulAddRL(0, rl, vrl, out[1]);
+                out += 2;
+                aux[0] = mulAdd(a, va, aux[0]);
+                aux++;
+            } while (--frameCount);
+        }
+    } else {
+        // ramp gain
+        if UNLIKELY(t->volumeInc[0]|t->volumeInc[1]) {
+            int32_t vl = t->prevVolume[0];
+            int32_t vr = t->prevVolume[1];
+            const int32_t vlInc = t->volumeInc[0];
+            const int32_t vrInc = t->volumeInc[1];
+
+            // LOGD("[1] %p: inc=%f, v0=%f, v1=%d, final=%f, count=%d",
+            //        t, vlInc/65536.0f, vl/65536.0f, t->volume[0],
+            //        (vl + vlInc*frameCount)/65536.0f, frameCount);
+
+            do {
+                *out++ += (vl >> 16) * (int32_t) *in++;
+                *out++ += (vr >> 16) * (int32_t) *in++;
+                vl += vlInc;
+                vr += vrInc;
+            } while (--frameCount);
+
+            t->prevVolume[0] = vl;
+            t->prevVolume[1] = vr;
+            t->adjustVolumeRamp(false);
+        }
+
+        // constant gain
+        else {
+            const uint32_t vrl = t->volumeRL;
+            do {
+                uint32_t rl = *reinterpret_cast<uint32_t const *>(in);
+                in += 2;
+                out[0] = mulAddRL(1, rl, vrl, out[0]);
+                out[1] = mulAddRL(0, rl, vrl, out[1]);
+                out += 2;
+            } while (--frameCount);
+        }
+    }
+    t->in = in;
+}
+
+void AudioMixer::track__16BitsMono(track_t* t, int32_t* out, size_t frameCount, int32_t* temp, int32_t* aux)
+{
+    int16_t const *in = static_cast<int16_t const *>(t->in);
+
+    if UNLIKELY(aux != NULL) {
+        // ramp gain
+        if UNLIKELY(t->volumeInc[0]|t->volumeInc[1]|t->auxInc) {
+            int32_t vl = t->prevVolume[0];
+            int32_t vr = t->prevVolume[1];
+            int32_t va = t->prevAuxLevel;
+            const int32_t vlInc = t->volumeInc[0];
+            const int32_t vrInc = t->volumeInc[1];
+            const int32_t vaInc = t->auxInc;
+
+            // LOGD("[2] %p: inc=%f, v0=%f, v1=%d, final=%f, count=%d",
+            //         t, vlInc/65536.0f, vl/65536.0f, t->volume[0],
+            //         (vl + vlInc*frameCount)/65536.0f, frameCount);
+
+            do {
+                int32_t l = *in++;
+                *out++ += (vl >> 16) * l;
+                *out++ += (vr >> 16) * l;
+                *aux++ += (va >> 16) * l;
+                vl += vlInc;
+                vr += vrInc;
+                va += vaInc;
+            } while (--frameCount);
+
+            t->prevVolume[0] = vl;
+            t->prevVolume[1] = vr;
+            t->prevAuxLevel = va;
+            t->adjustVolumeRamp(true);
+        }
+        // constant gain
+        else {
+            const int16_t vl = t->volume[0];
+            const int16_t vr = t->volume[1];
+            const int16_t va = (int16_t)t->auxLevel;
+            do {
+                int16_t l = *in++;
+                out[0] = mulAdd(l, vl, out[0]);
+                out[1] = mulAdd(l, vr, out[1]);
+                out += 2;
+                aux[0] = mulAdd(l, va, aux[0]);
+                aux++;
+            } while (--frameCount);
+        }
+    } else {
+        // ramp gain
+        if UNLIKELY(t->volumeInc[0]|t->volumeInc[1]) {
+            int32_t vl = t->prevVolume[0];
+            int32_t vr = t->prevVolume[1];
+            const int32_t vlInc = t->volumeInc[0];
+            const int32_t vrInc = t->volumeInc[1];
+
+            // LOGD("[2] %p: inc=%f, v0=%f, v1=%d, final=%f, count=%d",
+            //         t, vlInc/65536.0f, vl/65536.0f, t->volume[0],
+            //         (vl + vlInc*frameCount)/65536.0f, frameCount);
+
+            do {
+                int32_t l = *in++;
+                *out++ += (vl >> 16) * l;
+                *out++ += (vr >> 16) * l;
+                vl += vlInc;
+                vr += vrInc;
+            } while (--frameCount);
+
+            t->prevVolume[0] = vl;
+            t->prevVolume[1] = vr;
+            t->adjustVolumeRamp(false);
+        }
+        // constant gain
+        else {
+            const int16_t vl = t->volume[0];
+            const int16_t vr = t->volume[1];
+            do {
+                int16_t l = *in++;
+                out[0] = mulAdd(l, vl, out[0]);
+                out[1] = mulAdd(l, vr, out[1]);
+                out += 2;
+            } while (--frameCount);
+        }
+    }
+    t->in = in;
+}
+
+void AudioMixer::ditherAndClamp(int32_t* out, int32_t const *sums, size_t c)
+{
+    for (size_t i=0 ; i<c ; i++) {
+        int32_t l = *sums++;
+        int32_t r = *sums++;
+        int32_t nl = l >> 12;
+        int32_t nr = r >> 12;
+        l = clamp16(nl);
+        r = clamp16(nr);
+        *out++ = (r<<16) | (l & 0xFFFF);
+    }
+}
+
+// no-op case
+void AudioMixer::process__nop(state_t* state)
+{
+    uint32_t e0 = state->enabledTracks;
+    size_t bufSize = state->frameCount * sizeof(int16_t) * MAX_NUM_CHANNELS;
+    while (e0) {
+        // process by group of tracks with same output buffer to
+        // avoid multiple memset() on same buffer
+        uint32_t e1 = e0, e2 = e0;
+        int i = 31 - __builtin_clz(e1);
+        track_t& t1 = state->tracks[i];
+        e2 &= ~(1<<i);
+        while (e2) {
+            i = 31 - __builtin_clz(e2);
+            e2 &= ~(1<<i);
+            track_t& t2 = state->tracks[i];
+            if UNLIKELY(t2.mainBuffer != t1.mainBuffer) {
+                e1 &= ~(1<<i);
+            }
+        }
+        e0 &= ~(e1);
+
+        memset(t1.mainBuffer, 0, bufSize);
+
+        while (e1) {
+            i = 31 - __builtin_clz(e1);
+            e1 &= ~(1<<i);
+            t1 = state->tracks[i];
+            size_t outFrames = state->frameCount;
+            while (outFrames) {
+                t1.buffer.frameCount = outFrames;
+                t1.bufferProvider->getNextBuffer(&t1.buffer);
+                if (!t1.buffer.raw) break;
+                outFrames -= t1.buffer.frameCount;
+                t1.bufferProvider->releaseBuffer(&t1.buffer);
+            }
+        }
+    }
+}
+
+// generic code without resampling
+void AudioMixer::process__genericNoResampling(state_t* state)
+{
+    int32_t outTemp[BLOCKSIZE * MAX_NUM_CHANNELS] __attribute__((aligned(32)));
+
+    // acquire each track's buffer
+    uint32_t enabledTracks = state->enabledTracks;
+    uint32_t e0 = enabledTracks;
+    while (e0) {
+        const int i = 31 - __builtin_clz(e0);
+        e0 &= ~(1<<i);
+        track_t& t = state->tracks[i];
+        t.buffer.frameCount = state->frameCount;
+        t.bufferProvider->getNextBuffer(&t.buffer);
+        t.frameCount = t.buffer.frameCount;
+        t.in = t.buffer.raw;
+        // t.in == NULL can happen if the track was flushed just after having
+        // been enabled for mixing.
+        if (t.in == NULL)
+            enabledTracks &= ~(1<<i);
+    }
+
+    e0 = enabledTracks;
+    while (e0) {
+        // process by group of tracks with same output buffer to
+        // optimize cache use
+        uint32_t e1 = e0, e2 = e0;
+        int j = 31 - __builtin_clz(e1);
+        track_t& t1 = state->tracks[j];
+        e2 &= ~(1<<j);
+        while (e2) {
+            j = 31 - __builtin_clz(e2);
+            e2 &= ~(1<<j);
+            track_t& t2 = state->tracks[j];
+            if UNLIKELY(t2.mainBuffer != t1.mainBuffer) {
+                e1 &= ~(1<<j);
+            }
+        }
+        e0 &= ~(e1);
+        // this assumes output 16 bits stereo, no resampling
+        int32_t *out = t1.mainBuffer;
+        size_t numFrames = 0;
+        do {
+            memset(outTemp, 0, sizeof(outTemp));
+            e2 = e1;
+            while (e2) {
+                const int i = 31 - __builtin_clz(e2);
+                e2 &= ~(1<<i);
+                track_t& t = state->tracks[i];
+                size_t outFrames = BLOCKSIZE;
+                int32_t *aux = NULL;
+                if UNLIKELY((t.needs & NEEDS_AUX__MASK) == NEEDS_AUX_ENABLED) {
+                    aux = t.auxBuffer + numFrames;
+                }
+                while (outFrames) {
+                    size_t inFrames = (t.frameCount > outFrames)?outFrames:t.frameCount;
+                    if (inFrames) {
+                        (t.hook)(&t, outTemp + (BLOCKSIZE-outFrames)*MAX_NUM_CHANNELS, inFrames, state->resampleTemp, aux);
+                        t.frameCount -= inFrames;
+                        outFrames -= inFrames;
+                        if UNLIKELY(aux != NULL) {
+                            aux += inFrames;
+                        }
+                    }
+                    if (t.frameCount == 0 && outFrames) {
+                        t.bufferProvider->releaseBuffer(&t.buffer);
+                        t.buffer.frameCount = (state->frameCount - numFrames) - (BLOCKSIZE - outFrames);
+                        t.bufferProvider->getNextBuffer(&t.buffer);
+                        t.in = t.buffer.raw;
+                        if (t.in == NULL) {
+                            enabledTracks &= ~(1<<i);
+                            e1 &= ~(1<<i);
+                            break;
+                        }
+                        t.frameCount = t.buffer.frameCount;
+                    }
+                }
+            }
+            ditherAndClamp(out, outTemp, BLOCKSIZE);
+            out += BLOCKSIZE;
+            numFrames += BLOCKSIZE;
+        } while (numFrames < state->frameCount);
+    }
+
+    // release each track's buffer
+    e0 = enabledTracks;
+    while (e0) {
+        const int i = 31 - __builtin_clz(e0);
+        e0 &= ~(1<<i);
+        track_t& t = state->tracks[i];
+        t.bufferProvider->releaseBuffer(&t.buffer);
+    }
+}
+
+
+  // generic code with resampling
+void AudioMixer::process__genericResampling(state_t* state)
+{
+    int32_t* const outTemp = state->outputTemp;
+    const size_t size = sizeof(int32_t) * MAX_NUM_CHANNELS * state->frameCount;
+    memset(outTemp, 0, size);
+
+    size_t numFrames = state->frameCount;
+
+    uint32_t e0 = state->enabledTracks;
+    while (e0) {
+        // process by group of tracks with same output buffer
+        // to optimize cache use
+        uint32_t e1 = e0, e2 = e0;
+        int j = 31 - __builtin_clz(e1);
+        track_t& t1 = state->tracks[j];
+        e2 &= ~(1<<j);
+        while (e2) {
+            j = 31 - __builtin_clz(e2);
+            e2 &= ~(1<<j);
+            track_t& t2 = state->tracks[j];
+            if UNLIKELY(t2.mainBuffer != t1.mainBuffer) {
+                e1 &= ~(1<<j);
+            }
+        }
+        e0 &= ~(e1);
+        int32_t *out = t1.mainBuffer;
+        while (e1) {
+            const int i = 31 - __builtin_clz(e1);
+            e1 &= ~(1<<i);
+            track_t& t = state->tracks[i];
+            int32_t *aux = NULL;
+            if UNLIKELY((t.needs & NEEDS_AUX__MASK) == NEEDS_AUX_ENABLED) {
+                aux = t.auxBuffer;
+            }
+
+            // this is a little goofy, on the resampling case we don't
+            // acquire/release the buffers because it's done by
+            // the resampler.
+            if ((t.needs & NEEDS_RESAMPLE__MASK) == NEEDS_RESAMPLE_ENABLED) {
+                (t.hook)(&t, outTemp, numFrames, state->resampleTemp, aux);
+            } else {
+
+                size_t outFrames = 0;
+
+                while (outFrames < numFrames) {
+                    t.buffer.frameCount = numFrames - outFrames;
+                    t.bufferProvider->getNextBuffer(&t.buffer);
+                    t.in = t.buffer.raw;
+                    // t.in == NULL can happen if the track was flushed just after having
+                    // been enabled for mixing.
+                    if (t.in == NULL) break;
+
+                    if UNLIKELY(aux != NULL) {
+                        aux += outFrames;
+                    }
+                    (t.hook)(&t, outTemp + outFrames*MAX_NUM_CHANNELS, t.buffer.frameCount, state->resampleTemp, aux);
+                    outFrames += t.buffer.frameCount;
+                    t.bufferProvider->releaseBuffer(&t.buffer);
+                }
+            }
+        }
+        ditherAndClamp(out, outTemp, numFrames);
+    }
+}
+
+// one track, 16 bits stereo without resampling is the most common case
+void AudioMixer::process__OneTrack16BitsStereoNoResampling(state_t* state)
+{
+    const int i = 31 - __builtin_clz(state->enabledTracks);
+    const track_t& t = state->tracks[i];
+
+    AudioBufferProvider::Buffer& b(t.buffer);
+
+    int32_t* out = t.mainBuffer;
+    size_t numFrames = state->frameCount;
+
+    const int16_t vl = t.volume[0];
+    const int16_t vr = t.volume[1];
+    const uint32_t vrl = t.volumeRL;
+    while (numFrames) {
+        b.frameCount = numFrames;
+        t.bufferProvider->getNextBuffer(&b);
+        int16_t const *in = b.i16;
+
+        // in == NULL can happen if the track was flushed just after having
+        // been enabled for mixing.
+        if (in == NULL || ((unsigned long)in & 3)) {
+            memset(out, 0, numFrames*MAX_NUM_CHANNELS*sizeof(int16_t));
+            LOGE_IF(((unsigned long)in & 3), "process stereo track: input buffer alignment pb: buffer %p track %d, channels %d, needs %08x",
+                    in, i, t.channelCount, t.needs);
+            return;
+        }
+        size_t outFrames = b.frameCount;
+
+        if (UNLIKELY(uint32_t(vl) > UNITY_GAIN || uint32_t(vr) > UNITY_GAIN)) {
+            // volume is boosted, so we might need to clamp even though
+            // we process only one track.
+            do {
+                uint32_t rl = *reinterpret_cast<uint32_t const *>(in);
+                in += 2;
+                int32_t l = mulRL(1, rl, vrl) >> 12;
+                int32_t r = mulRL(0, rl, vrl) >> 12;
+                // clamping...
+                l = clamp16(l);
+                r = clamp16(r);
+                *out++ = (r<<16) | (l & 0xFFFF);
+            } while (--outFrames);
+        } else {
+            do {
+                uint32_t rl = *reinterpret_cast<uint32_t const *>(in);
+                in += 2;
+                int32_t l = mulRL(1, rl, vrl) >> 12;
+                int32_t r = mulRL(0, rl, vrl) >> 12;
+                *out++ = (r<<16) | (l & 0xFFFF);
+            } while (--outFrames);
+        }
+        numFrames -= b.frameCount;
+        t.bufferProvider->releaseBuffer(&b);
+    }
+}
+
+// 2 tracks is also a common case
+// NEVER used in current implementation of process__validate()
+// only use if the 2 tracks have the same output buffer
+void AudioMixer::process__TwoTracks16BitsStereoNoResampling(state_t* state)
+{
+    int i;
+    uint32_t en = state->enabledTracks;
+
+    i = 31 - __builtin_clz(en);
+    const track_t& t0 = state->tracks[i];
+    AudioBufferProvider::Buffer& b0(t0.buffer);
+
+    en &= ~(1<<i);
+    i = 31 - __builtin_clz(en);
+    const track_t& t1 = state->tracks[i];
+    AudioBufferProvider::Buffer& b1(t1.buffer);
+
+    int16_t const *in0;
+    const int16_t vl0 = t0.volume[0];
+    const int16_t vr0 = t0.volume[1];
+    size_t frameCount0 = 0;
+
+    int16_t const *in1;
+    const int16_t vl1 = t1.volume[0];
+    const int16_t vr1 = t1.volume[1];
+    size_t frameCount1 = 0;
+
+    //FIXME: only works if two tracks use same buffer
+    int32_t* out = t0.mainBuffer;
+    size_t numFrames = state->frameCount;
+    int16_t const *buff = NULL;
+
+
+    while (numFrames) {
+
+        if (frameCount0 == 0) {
+            b0.frameCount = numFrames;
+            t0.bufferProvider->getNextBuffer(&b0);
+            if (b0.i16 == NULL) {
+                if (buff == NULL) {
+                    buff = new int16_t[MAX_NUM_CHANNELS * state->frameCount];
+                }
+                in0 = buff;
+                b0.frameCount = numFrames;
+            } else {
+                in0 = b0.i16;
+            }
+            frameCount0 = b0.frameCount;
+        }
+        if (frameCount1 == 0) {
+            b1.frameCount = numFrames;
+            t1.bufferProvider->getNextBuffer(&b1);
+            if (b1.i16 == NULL) {
+                if (buff == NULL) {
+                    buff = new int16_t[MAX_NUM_CHANNELS * state->frameCount];
+                }
+                in1 = buff;
+                b1.frameCount = numFrames;
+               } else {
+                in1 = b1.i16;
+            }
+            frameCount1 = b1.frameCount;
+        }
+
+        size_t outFrames = frameCount0 < frameCount1?frameCount0:frameCount1;
+
+        numFrames -= outFrames;
+        frameCount0 -= outFrames;
+        frameCount1 -= outFrames;
+
+        do {
+            int32_t l0 = *in0++;
+            int32_t r0 = *in0++;
+            l0 = mul(l0, vl0);
+            r0 = mul(r0, vr0);
+            int32_t l = *in1++;
+            int32_t r = *in1++;
+            l = mulAdd(l, vl1, l0) >> 12;
+            r = mulAdd(r, vr1, r0) >> 12;
+            // clamping...
+            l = clamp16(l);
+            r = clamp16(r);
+            *out++ = (r<<16) | (l & 0xFFFF);
+        } while (--outFrames);
+
+        if (frameCount0 == 0) {
+            t0.bufferProvider->releaseBuffer(&b0);
+        }
+        if (frameCount1 == 0) {
+            t1.bufferProvider->releaseBuffer(&b1);
+        }
+    }
+
+    if (buff != NULL) {
+        delete [] buff;
+    }
+}
+
+// ----------------------------------------------------------------------------
+}; // namespace android
+
diff --git a/services/audioflinger/AudioMixer.h b/services/audioflinger/AudioMixer.h
new file mode 100644
index 0000000..aee3e17
--- /dev/null
+++ b/services/audioflinger/AudioMixer.h
@@ -0,0 +1,207 @@
+/* //device/include/server/AudioFlinger/AudioMixer.h
+**
+** Copyright 2007, The Android Open Source Project
+**
+** Licensed under the Apache License, Version 2.0 (the "License");
+** you may not use this file except in compliance with the License.
+** You may obtain a copy of the License at
+**
+**     http://www.apache.org/licenses/LICENSE-2.0
+**
+** Unless required by applicable law or agreed to in writing, software
+** distributed under the License is distributed on an "AS IS" BASIS,
+** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+** See the License for the specific language governing permissions and
+** limitations under the License.
+*/
+
+#ifndef ANDROID_AUDIO_MIXER_H
+#define ANDROID_AUDIO_MIXER_H
+
+#include <stdint.h>
+#include <sys/types.h>
+
+#include "AudioBufferProvider.h"
+#include "AudioResampler.h"
+
+namespace android {
+
+// ----------------------------------------------------------------------------
+
+#define LIKELY( exp )       (__builtin_expect( (exp) != 0, true  ))
+#define UNLIKELY( exp )     (__builtin_expect( (exp) != 0, false ))
+
+// ----------------------------------------------------------------------------
+
+class AudioMixer
+{
+public:
+                            AudioMixer(size_t frameCount, uint32_t sampleRate);
+
+                            ~AudioMixer();
+
+    static const uint32_t MAX_NUM_TRACKS = 32;
+    static const uint32_t MAX_NUM_CHANNELS = 2;
+
+    static const uint16_t UNITY_GAIN = 0x1000;
+
+    enum { // names
+
+        // track units (32 units)
+        TRACK0          = 0x1000,
+
+        // enable/disable
+        MIXING          = 0x2000,
+
+        // setParameter targets
+        TRACK           = 0x3000,
+        RESAMPLE        = 0x3001,
+        RAMP_VOLUME     = 0x3002, // ramp to new volume
+        VOLUME          = 0x3003, // don't ramp
+
+        // set Parameter names
+        // for target TRACK
+        CHANNEL_COUNT   = 0x4000,
+        FORMAT          = 0x4001,
+        MAIN_BUFFER     = 0x4002,
+        AUX_BUFFER      = 0x4003,
+        // for TARGET RESAMPLE
+        SAMPLE_RATE     = 0x4100,
+        // for TARGET VOLUME (8 channels max)
+        VOLUME0         = 0x4200,
+        VOLUME1         = 0x4201,
+        AUXLEVEL        = 0x4210,
+    };
+
+
+    int         getTrackName();
+    void        deleteTrackName(int name);
+
+    status_t    enable(int name);
+    status_t    disable(int name);
+
+    status_t    setActiveTrack(int track);
+    status_t    setParameter(int target, int name, void *value);
+
+    status_t    setBufferProvider(AudioBufferProvider* bufferProvider);
+    void        process();
+
+    uint32_t    trackNames() const { return mTrackNames; }
+
+    static void ditherAndClamp(int32_t* out, int32_t const *sums, size_t c);
+
+private:
+
+    enum {
+        NEEDS_CHANNEL_COUNT__MASK   = 0x00000003,
+        NEEDS_FORMAT__MASK          = 0x000000F0,
+        NEEDS_MUTE__MASK            = 0x00000100,
+        NEEDS_RESAMPLE__MASK        = 0x00001000,
+        NEEDS_AUX__MASK             = 0x00010000,
+    };
+
+    enum {
+        NEEDS_CHANNEL_1             = 0x00000000,
+        NEEDS_CHANNEL_2             = 0x00000001,
+
+        NEEDS_FORMAT_16             = 0x00000010,
+
+        NEEDS_MUTE_DISABLED         = 0x00000000,
+        NEEDS_MUTE_ENABLED          = 0x00000100,
+
+        NEEDS_RESAMPLE_DISABLED     = 0x00000000,
+        NEEDS_RESAMPLE_ENABLED      = 0x00001000,
+
+        NEEDS_AUX_DISABLED     = 0x00000000,
+        NEEDS_AUX_ENABLED      = 0x00010000,
+    };
+
+    static inline int32_t applyVolume(int32_t in, int32_t v) {
+        return in * v;
+    }
+
+
+    struct state_t;
+    struct track_t;
+
+    typedef void (*mix_t)(state_t* state);
+    typedef void (*hook_t)(track_t* t, int32_t* output, size_t numOutFrames, int32_t* temp, int32_t* aux);
+    static const int BLOCKSIZE = 16; // 4 cache lines
+
+    struct track_t {
+        uint32_t    needs;
+
+        union {
+        int16_t     volume[2];      // [0]3.12 fixed point
+        int32_t     volumeRL;
+        };
+
+        int32_t     prevVolume[2];
+
+        int32_t     volumeInc[2];
+        int32_t     auxLevel;
+        int32_t     auxInc;
+        int32_t     prevAuxLevel;
+
+        uint16_t    frameCount;
+
+        uint8_t     channelCount : 4;
+        uint8_t     enabled      : 1;
+        uint8_t     reserved0    : 3;
+        uint8_t     format;
+
+        AudioBufferProvider*                bufferProvider;
+        mutable AudioBufferProvider::Buffer buffer;
+
+        hook_t      hook;
+        void const* in;             // current location in buffer
+
+        AudioResampler*     resampler;
+        uint32_t            sampleRate;
+        int32_t*           mainBuffer;
+        int32_t*           auxBuffer;
+
+        bool        setResampler(uint32_t sampleRate, uint32_t devSampleRate);
+        bool        doesResample() const;
+        void        adjustVolumeRamp(bool aux);
+    };
+
+    // pad to 32-bytes to fill cache line
+    struct state_t {
+        uint32_t        enabledTracks;
+        uint32_t        needsChanged;
+        size_t          frameCount;
+        mix_t           hook;
+        int32_t         *outputTemp;
+        int32_t         *resampleTemp;
+        int32_t         reserved[2];
+        track_t         tracks[32]; __attribute__((aligned(32)));
+    };
+
+    int             mActiveTrack;
+    uint32_t        mTrackNames;
+    const uint32_t  mSampleRate;
+
+    state_t         mState __attribute__((aligned(32)));
+
+    void invalidateState(uint32_t mask);
+
+    static void track__genericResample(track_t* t, int32_t* out, size_t numFrames, int32_t* temp, int32_t* aux);
+    static void track__nop(track_t* t, int32_t* out, size_t numFrames, int32_t* temp, int32_t* aux);
+    static void track__16BitsStereo(track_t* t, int32_t* out, size_t numFrames, int32_t* temp, int32_t* aux);
+    static void track__16BitsMono(track_t* t, int32_t* out, size_t numFrames, int32_t* temp, int32_t* aux);
+    static void volumeRampStereo(track_t* t, int32_t* out, size_t frameCount, int32_t* temp, int32_t* aux);
+    static void volumeStereo(track_t* t, int32_t* out, size_t frameCount, int32_t* temp, int32_t* aux);
+
+    static void process__validate(state_t* state);
+    static void process__nop(state_t* state);
+    static void process__genericNoResampling(state_t* state);
+    static void process__genericResampling(state_t* state);
+    static void process__OneTrack16BitsStereoNoResampling(state_t* state);
+    static void process__TwoTracks16BitsStereoNoResampling(state_t* state);
+};
+
+// ----------------------------------------------------------------------------
+}; // namespace android
+
+#endif // ANDROID_AUDIO_MIXER_H
diff --git a/services/audioflinger/AudioPolicyManagerBase.cpp b/services/audioflinger/AudioPolicyManagerBase.cpp
new file mode 100644
index 0000000..381a958
--- /dev/null
+++ b/services/audioflinger/AudioPolicyManagerBase.cpp
@@ -0,0 +1,1973 @@
+/*
+ * Copyright (C) 2009 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#define LOG_TAG "AudioPolicyManagerBase"
+//#define LOG_NDEBUG 0
+#include <utils/Log.h>
+#include <hardware_legacy/AudioPolicyManagerBase.h>
+#include <media/mediarecorder.h>
+
+namespace android {
+
+
+// ----------------------------------------------------------------------------
+// AudioPolicyInterface implementation
+// ----------------------------------------------------------------------------
+
+
+status_t AudioPolicyManagerBase::setDeviceConnectionState(AudioSystem::audio_devices device,
+                                                  AudioSystem::device_connection_state state,
+                                                  const char *device_address)
+{
+
+    LOGV("setDeviceConnectionState() device: %x, state %d, address %s", device, state, device_address);
+
+    // connect/disconnect only 1 device at a time
+    if (AudioSystem::popCount(device) != 1) return BAD_VALUE;
+
+    if (strlen(device_address) >= MAX_DEVICE_ADDRESS_LEN) {
+        LOGE("setDeviceConnectionState() invalid address: %s", device_address);
+        return BAD_VALUE;
+    }
+
+    // handle output devices
+    if (AudioSystem::isOutputDevice(device)) {
+
+#ifndef WITH_A2DP
+        if (AudioSystem::isA2dpDevice(device)) {
+            LOGE("setDeviceConnectionState() invalid device: %x", device);
+            return BAD_VALUE;
+        }
+#endif
+
+        switch (state)
+        {
+        // handle output device connection
+        case AudioSystem::DEVICE_STATE_AVAILABLE:
+            if (mAvailableOutputDevices & device) {
+                LOGW("setDeviceConnectionState() device already connected: %x", device);
+                return INVALID_OPERATION;
+            }
+            LOGV("setDeviceConnectionState() connecting device %x", device);
+
+            // register new device as available
+            mAvailableOutputDevices |= device;
+
+#ifdef WITH_A2DP
+            // handle A2DP device connection
+            if (AudioSystem::isA2dpDevice(device)) {
+                status_t status = handleA2dpConnection(device, device_address);
+                if (status != NO_ERROR) {
+                    mAvailableOutputDevices &= ~device;
+                    return status;
+                }
+            } else
+#endif
+            {
+                if (AudioSystem::isBluetoothScoDevice(device)) {
+                    LOGV("setDeviceConnectionState() BT SCO  device, address %s", device_address);
+                    // keep track of SCO device address
+                    mScoDeviceAddress = String8(device_address, MAX_DEVICE_ADDRESS_LEN);
+#ifdef WITH_A2DP
+                    if (mA2dpOutput != 0 &&
+                        mPhoneState != AudioSystem::MODE_NORMAL) {
+                        mpClientInterface->suspendOutput(mA2dpOutput);
+                    }
+#endif
+                }
+            }
+            break;
+        // handle output device disconnection
+        case AudioSystem::DEVICE_STATE_UNAVAILABLE: {
+            if (!(mAvailableOutputDevices & device)) {
+                LOGW("setDeviceConnectionState() device not connected: %x", device);
+                return INVALID_OPERATION;
+            }
+
+
+            LOGV("setDeviceConnectionState() disconnecting device %x", device);
+            // remove device from available output devices
+            mAvailableOutputDevices &= ~device;
+
+#ifdef WITH_A2DP
+            // handle A2DP device disconnection
+            if (AudioSystem::isA2dpDevice(device)) {
+                status_t status = handleA2dpDisconnection(device, device_address);
+                if (status != NO_ERROR) {
+                    mAvailableOutputDevices |= device;
+                    return status;
+                }
+            } else
+#endif
+            {
+                if (AudioSystem::isBluetoothScoDevice(device)) {
+                    mScoDeviceAddress = "";
+#ifdef WITH_A2DP
+                    if (mA2dpOutput != 0 &&
+                        mPhoneState != AudioSystem::MODE_NORMAL) {
+                        mpClientInterface->restoreOutput(mA2dpOutput);
+                    }
+#endif
+                }
+            }
+            } break;
+
+        default:
+            LOGE("setDeviceConnectionState() invalid state: %x", state);
+            return BAD_VALUE;
+        }
+
+        // request routing change if necessary
+        uint32_t newDevice = getNewDevice(mHardwareOutput, false);
+#ifdef WITH_A2DP
+        checkOutputForAllStrategies(newDevice);
+        // A2DP outputs must be closed after checkOutputForAllStrategies() is executed
+        if (state == AudioSystem::DEVICE_STATE_UNAVAILABLE && AudioSystem::isA2dpDevice(device)) {
+            closeA2dpOutputs();
+        }
+#endif
+        updateDeviceForStrategy();
+        setOutputDevice(mHardwareOutput, newDevice);
+
+        if (device == AudioSystem::DEVICE_OUT_WIRED_HEADSET) {
+            device = AudioSystem::DEVICE_IN_WIRED_HEADSET;
+        } else if (device == AudioSystem::DEVICE_OUT_BLUETOOTH_SCO ||
+                   device == AudioSystem::DEVICE_OUT_BLUETOOTH_SCO_HEADSET ||
+                   device == AudioSystem::DEVICE_OUT_BLUETOOTH_SCO_CARKIT) {
+            device = AudioSystem::DEVICE_IN_BLUETOOTH_SCO_HEADSET;
+        } else {
+            return NO_ERROR;
+        }
+    }
+    // handle input devices
+    if (AudioSystem::isInputDevice(device)) {
+
+        switch (state)
+        {
+        // handle input device connection
+        case AudioSystem::DEVICE_STATE_AVAILABLE: {
+            if (mAvailableInputDevices & device) {
+                LOGW("setDeviceConnectionState() device already connected: %d", device);
+                return INVALID_OPERATION;
+            }
+            mAvailableInputDevices |= device;
+            }
+            break;
+
+        // handle input device disconnection
+        case AudioSystem::DEVICE_STATE_UNAVAILABLE: {
+            if (!(mAvailableInputDevices & device)) {
+                LOGW("setDeviceConnectionState() device not connected: %d", device);
+                return INVALID_OPERATION;
+            }
+            mAvailableInputDevices &= ~device;
+            } break;
+
+        default:
+            LOGE("setDeviceConnectionState() invalid state: %x", state);
+            return BAD_VALUE;
+        }
+
+        audio_io_handle_t activeInput = getActiveInput();
+        if (activeInput != 0) {
+            AudioInputDescriptor *inputDesc = mInputs.valueFor(activeInput);
+            uint32_t newDevice = getDeviceForInputSource(inputDesc->mInputSource);
+            if (newDevice != inputDesc->mDevice) {
+                LOGV("setDeviceConnectionState() changing device from %x to %x for input %d",
+                        inputDesc->mDevice, newDevice, activeInput);
+                inputDesc->mDevice = newDevice;
+                AudioParameter param = AudioParameter();
+                param.addInt(String8(AudioParameter::keyRouting), (int)newDevice);
+                mpClientInterface->setParameters(activeInput, param.toString());
+            }
+        }
+
+        return NO_ERROR;
+    }
+
+    LOGW("setDeviceConnectionState() invalid device: %x", device);
+    return BAD_VALUE;
+}
+
+AudioSystem::device_connection_state AudioPolicyManagerBase::getDeviceConnectionState(AudioSystem::audio_devices device,
+                                                  const char *device_address)
+{
+    AudioSystem::device_connection_state state = AudioSystem::DEVICE_STATE_UNAVAILABLE;
+    String8 address = String8(device_address);
+    if (AudioSystem::isOutputDevice(device)) {
+        if (device & mAvailableOutputDevices) {
+#ifdef WITH_A2DP
+            if (AudioSystem::isA2dpDevice(device) &&
+                address != "" && mA2dpDeviceAddress != address) {
+                return state;
+            }
+#endif
+            if (AudioSystem::isBluetoothScoDevice(device) &&
+                address != "" && mScoDeviceAddress != address) {
+                return state;
+            }
+            state = AudioSystem::DEVICE_STATE_AVAILABLE;
+        }
+    } else if (AudioSystem::isInputDevice(device)) {
+        if (device & mAvailableInputDevices) {
+            state = AudioSystem::DEVICE_STATE_AVAILABLE;
+        }
+    }
+
+    return state;
+}
+
+void AudioPolicyManagerBase::setPhoneState(int state)
+{
+    LOGV("setPhoneState() state %d", state);
+    uint32_t newDevice = 0;
+    if (state < 0 || state >= AudioSystem::NUM_MODES) {
+        LOGW("setPhoneState() invalid state %d", state);
+        return;
+    }
+
+    if (state == mPhoneState ) {
+        LOGW("setPhoneState() setting same state %d", state);
+        return;
+    }
+
+    // if leaving call state, handle special case of active streams
+    // pertaining to sonification strategy see handleIncallSonification()
+    if (mPhoneState == AudioSystem::MODE_IN_CALL) {
+        LOGV("setPhoneState() in call state management: new state is %d", state);
+        for (int stream = 0; stream < AudioSystem::NUM_STREAM_TYPES; stream++) {
+            handleIncallSonification(stream, false, true);
+        }
+    }
+
+    // store previous phone state for management of sonification strategy below
+    int oldState = mPhoneState;
+    mPhoneState = state;
+    bool force = false;
+
+    // are we entering or starting a call
+    if ((oldState != AudioSystem::MODE_IN_CALL) && (state == AudioSystem::MODE_IN_CALL)) {
+        LOGV("  Entering call in setPhoneState()");
+        // force routing command to audio hardware when starting a call
+        // even if no device change is needed
+        force = true;
+    } else if ((oldState == AudioSystem::MODE_IN_CALL) && (state != AudioSystem::MODE_IN_CALL)) {
+        LOGV("  Exiting call in setPhoneState()");
+        // force routing command to audio hardware when exiting a call
+        // even if no device change is needed
+        force = true;
+    }
+
+    // check for device and output changes triggered by new phone state
+    newDevice = getNewDevice(mHardwareOutput, false);
+#ifdef WITH_A2DP
+    checkOutputForAllStrategies(newDevice);
+    // suspend A2DP output if a SCO device is present.
+    if (mA2dpOutput != 0 && mScoDeviceAddress != "") {
+        if (oldState == AudioSystem::MODE_NORMAL) {
+            mpClientInterface->suspendOutput(mA2dpOutput);
+        } else if (state == AudioSystem::MODE_NORMAL) {
+            mpClientInterface->restoreOutput(mA2dpOutput);
+        }
+    }
+#endif
+    updateDeviceForStrategy();
+
+    AudioOutputDescriptor *hwOutputDesc = mOutputs.valueFor(mHardwareOutput);
+
+    // force routing command to audio hardware when ending call
+    // even if no device change is needed
+    if (oldState == AudioSystem::MODE_IN_CALL && newDevice == 0) {
+        newDevice = hwOutputDesc->device();
+    }
+
+    // when changing from ring tone to in call mode, mute the ringing tone
+    // immediately and delay the route change to avoid sending the ring tone
+    // tail into the earpiece or headset.
+    int delayMs = 0;
+    if (state == AudioSystem::MODE_IN_CALL && oldState == AudioSystem::MODE_RINGTONE) {
+        // delay the device change command by twice the output latency to have some margin
+        // and be sure that audio buffers not yet affected by the mute are out when
+        // we actually apply the route change
+        delayMs = hwOutputDesc->mLatency*2;
+        setStreamMute(AudioSystem::RING, true, mHardwareOutput);
+    }
+
+    // change routing is necessary
+    setOutputDevice(mHardwareOutput, newDevice, force, delayMs);
+
+    // if entering in call state, handle special case of active streams
+    // pertaining to sonification strategy see handleIncallSonification()
+    if (state == AudioSystem::MODE_IN_CALL) {
+        LOGV("setPhoneState() in call state management: new state is %d", state);
+        // unmute the ringing tone after a sufficient delay if it was muted before
+        // setting output device above
+        if (oldState == AudioSystem::MODE_RINGTONE) {
+            setStreamMute(AudioSystem::RING, false, mHardwareOutput, MUTE_TIME_MS);
+        }
+        for (int stream = 0; stream < AudioSystem::NUM_STREAM_TYPES; stream++) {
+            handleIncallSonification(stream, true, true);
+        }
+    }
+
+    // Flag that ringtone volume must be limited to music volume until we exit MODE_RINGTONE
+    if (state == AudioSystem::MODE_RINGTONE &&
+        (hwOutputDesc->mRefCount[AudioSystem::MUSIC] ||
+        (systemTime() - mMusicStopTime) < seconds(SONIFICATION_HEADSET_MUSIC_DELAY))) {
+        mLimitRingtoneVolume = true;
+    } else {
+        mLimitRingtoneVolume = false;
+    }
+}
+
+void AudioPolicyManagerBase::setRingerMode(uint32_t mode, uint32_t mask)
+{
+    LOGV("setRingerMode() mode %x, mask %x", mode, mask);
+
+    mRingerMode = mode;
+}
+
+void AudioPolicyManagerBase::setForceUse(AudioSystem::force_use usage, AudioSystem::forced_config config)
+{
+    LOGV("setForceUse() usage %d, config %d, mPhoneState %d", usage, config, mPhoneState);
+
+    bool forceVolumeReeval = false;
+    switch(usage) {
+    case AudioSystem::FOR_COMMUNICATION:
+        if (config != AudioSystem::FORCE_SPEAKER && config != AudioSystem::FORCE_BT_SCO &&
+            config != AudioSystem::FORCE_NONE) {
+            LOGW("setForceUse() invalid config %d for FOR_COMMUNICATION", config);
+            return;
+        }
+        mForceUse[usage] = config;
+        break;
+    case AudioSystem::FOR_MEDIA:
+        if (config != AudioSystem::FORCE_HEADPHONES && config != AudioSystem::FORCE_BT_A2DP &&
+            config != AudioSystem::FORCE_WIRED_ACCESSORY && config != AudioSystem::FORCE_NONE) {
+            LOGW("setForceUse() invalid config %d for FOR_MEDIA", config);
+            return;
+        }
+        mForceUse[usage] = config;
+        break;
+    case AudioSystem::FOR_RECORD:
+        if (config != AudioSystem::FORCE_BT_SCO && config != AudioSystem::FORCE_WIRED_ACCESSORY &&
+            config != AudioSystem::FORCE_NONE) {
+            LOGW("setForceUse() invalid config %d for FOR_RECORD", config);
+            return;
+        }
+        mForceUse[usage] = config;
+        break;
+    case AudioSystem::FOR_DOCK:
+        if (config != AudioSystem::FORCE_NONE && config != AudioSystem::FORCE_BT_CAR_DOCK &&
+            config != AudioSystem::FORCE_BT_DESK_DOCK && config != AudioSystem::FORCE_WIRED_ACCESSORY) {
+            LOGW("setForceUse() invalid config %d for FOR_DOCK", config);
+        }
+        forceVolumeReeval = true;
+        mForceUse[usage] = config;
+        break;
+    default:
+        LOGW("setForceUse() invalid usage %d", usage);
+        break;
+    }
+
+    // check for device and output changes triggered by new phone state
+    uint32_t newDevice = getNewDevice(mHardwareOutput, false);
+#ifdef WITH_A2DP
+    checkOutputForAllStrategies(newDevice);
+#endif
+    updateDeviceForStrategy();
+    setOutputDevice(mHardwareOutput, newDevice);
+    if (forceVolumeReeval) {
+        applyStreamVolumes(mHardwareOutput, newDevice);
+    }
+}
+
+AudioSystem::forced_config AudioPolicyManagerBase::getForceUse(AudioSystem::force_use usage)
+{
+    return mForceUse[usage];
+}
+
+void AudioPolicyManagerBase::setSystemProperty(const char* property, const char* value)
+{
+    LOGV("setSystemProperty() property %s, value %s", property, value);
+    if (strcmp(property, "ro.camera.sound.forced") == 0) {
+        if (atoi(value)) {
+            LOGV("ENFORCED_AUDIBLE cannot be muted");
+            mStreams[AudioSystem::ENFORCED_AUDIBLE].mCanBeMuted = false;
+        } else {
+            LOGV("ENFORCED_AUDIBLE can be muted");
+            mStreams[AudioSystem::ENFORCED_AUDIBLE].mCanBeMuted = true;
+        }
+    }
+}
+
+audio_io_handle_t AudioPolicyManagerBase::getOutput(AudioSystem::stream_type stream,
+                                    uint32_t samplingRate,
+                                    uint32_t format,
+                                    uint32_t channels,
+                                    AudioSystem::output_flags flags)
+{
+    audio_io_handle_t output = 0;
+    uint32_t latency = 0;
+    routing_strategy strategy = getStrategy((AudioSystem::stream_type)stream);
+    uint32_t device = getDeviceForStrategy(strategy);
+    LOGV("getOutput() stream %d, samplingRate %d, format %d, channels %x, flags %x", stream, samplingRate, format, channels, flags);
+
+#ifdef AUDIO_POLICY_TEST
+    if (mCurOutput != 0) {
+        LOGV("getOutput() test output mCurOutput %d, samplingRate %d, format %d, channels %x, mDirectOutput %d",
+                mCurOutput, mTestSamplingRate, mTestFormat, mTestChannels, mDirectOutput);
+
+        if (mTestOutputs[mCurOutput] == 0) {
+            LOGV("getOutput() opening test output");
+            AudioOutputDescriptor *outputDesc = new AudioOutputDescriptor();
+            outputDesc->mDevice = mTestDevice;
+            outputDesc->mSamplingRate = mTestSamplingRate;
+            outputDesc->mFormat = mTestFormat;
+            outputDesc->mChannels = mTestChannels;
+            outputDesc->mLatency = mTestLatencyMs;
+            outputDesc->mFlags = (AudioSystem::output_flags)(mDirectOutput ? AudioSystem::OUTPUT_FLAG_DIRECT : 0);
+            outputDesc->mRefCount[stream] = 0;
+            mTestOutputs[mCurOutput] = mpClientInterface->openOutput(&outputDesc->mDevice,
+                                            &outputDesc->mSamplingRate,
+                                            &outputDesc->mFormat,
+                                            &outputDesc->mChannels,
+                                            &outputDesc->mLatency,
+                                            outputDesc->mFlags);
+            if (mTestOutputs[mCurOutput]) {
+                AudioParameter outputCmd = AudioParameter();
+                outputCmd.addInt(String8("set_id"),mCurOutput);
+                mpClientInterface->setParameters(mTestOutputs[mCurOutput],outputCmd.toString());
+                addOutput(mTestOutputs[mCurOutput], outputDesc);
+            }
+        }
+        return mTestOutputs[mCurOutput];
+    }
+#endif //AUDIO_POLICY_TEST
+
+    // open a direct output if required by specified parameters
+    if (needsDirectOuput(stream, samplingRate, format, channels, flags, device)) {
+
+        LOGV("getOutput() opening direct output device %x", device);
+        AudioOutputDescriptor *outputDesc = new AudioOutputDescriptor();
+        outputDesc->mDevice = device;
+        outputDesc->mSamplingRate = samplingRate;
+        outputDesc->mFormat = format;
+        outputDesc->mChannels = channels;
+        outputDesc->mLatency = 0;
+        outputDesc->mFlags = (AudioSystem::output_flags)(flags | AudioSystem::OUTPUT_FLAG_DIRECT);
+        outputDesc->mRefCount[stream] = 0;
+        output = mpClientInterface->openOutput(&outputDesc->mDevice,
+                                        &outputDesc->mSamplingRate,
+                                        &outputDesc->mFormat,
+                                        &outputDesc->mChannels,
+                                        &outputDesc->mLatency,
+                                        outputDesc->mFlags);
+
+        // only accept an output with the requeted parameters
+        if (output == 0 ||
+            (samplingRate != 0 && samplingRate != outputDesc->mSamplingRate) ||
+            (format != 0 && format != outputDesc->mFormat) ||
+            (channels != 0 && channels != outputDesc->mChannels)) {
+            LOGV("getOutput() failed opening direct output: samplingRate %d, format %d, channels %d",
+                    samplingRate, format, channels);
+            if (output != 0) {
+                mpClientInterface->closeOutput(output);
+            }
+            delete outputDesc;
+            return 0;
+        }
+        addOutput(output, outputDesc);
+        return output;
+    }
+
+    if (channels != 0 && channels != AudioSystem::CHANNEL_OUT_MONO &&
+        channels != AudioSystem::CHANNEL_OUT_STEREO) {
+        return 0;
+    }
+    // open a non direct output
+
+    // get which output is suitable for the specified stream. The actual routing change will happen
+    // when startOutput() will be called
+    uint32_t a2dpDevice = device & AudioSystem::DEVICE_OUT_ALL_A2DP;
+    if (AudioSystem::popCount((AudioSystem::audio_devices)device) == 2) {
+#ifdef WITH_A2DP
+        if (a2dpUsedForSonification() && a2dpDevice != 0) {
+            // if playing on 2 devices among which one is A2DP, use duplicated output
+            LOGV("getOutput() using duplicated output");
+            LOGW_IF((mA2dpOutput == 0), "getOutput() A2DP device in multiple %x selected but A2DP output not opened", device);
+            output = mDuplicatedOutput;
+        } else
+#endif
+        {
+            // if playing on 2 devices among which none is A2DP, use hardware output
+            output = mHardwareOutput;
+        }
+        LOGV("getOutput() using output %d for 2 devices %x", output, device);
+    } else {
+#ifdef WITH_A2DP
+        if (a2dpDevice != 0) {
+            // if playing on A2DP device, use a2dp output
+            LOGW_IF((mA2dpOutput == 0), "getOutput() A2DP device %x selected but A2DP output not opened", device);
+            output = mA2dpOutput;
+        } else
+#endif
+        {
+            // if playing on not A2DP device, use hardware output
+            output = mHardwareOutput;
+        }
+    }
+
+
+    LOGW_IF((output ==0), "getOutput() could not find output for stream %d, samplingRate %d, format %d, channels %x, flags %x",
+                stream, samplingRate, format, channels, flags);
+
+    return output;
+}
+
+status_t AudioPolicyManagerBase::startOutput(audio_io_handle_t output, AudioSystem::stream_type stream)
+{
+    LOGV("startOutput() output %d, stream %d", output, stream);
+    ssize_t index = mOutputs.indexOfKey(output);
+    if (index < 0) {
+        LOGW("startOutput() unknow output %d", output);
+        return BAD_VALUE;
+    }
+
+    AudioOutputDescriptor *outputDesc = mOutputs.valueAt(index);
+    routing_strategy strategy = getStrategy((AudioSystem::stream_type)stream);
+
+#ifdef WITH_A2DP
+    if (mA2dpOutput != 0  && !a2dpUsedForSonification() && strategy == STRATEGY_SONIFICATION) {
+        setStrategyMute(STRATEGY_MEDIA, true, mA2dpOutput);
+    }
+#endif
+
+    // incremenent usage count for this stream on the requested output:
+    // NOTE that the usage count is the same for duplicated output and hardware output which is
+    // necassary for a correct control of hardware output routing by startOutput() and stopOutput()
+    outputDesc->changeRefCount(stream, 1);
+
+    setOutputDevice(output, getNewDevice(output));
+
+    // handle special case for sonification while in call
+    if (mPhoneState == AudioSystem::MODE_IN_CALL) {
+        handleIncallSonification(stream, true, false);
+    }
+
+    // apply volume rules for current stream and device if necessary
+    checkAndSetVolume(stream, mStreams[stream].mIndexCur, output, outputDesc->device());
+
+    return NO_ERROR;
+}
+
+status_t AudioPolicyManagerBase::stopOutput(audio_io_handle_t output, AudioSystem::stream_type stream)
+{
+    LOGV("stopOutput() output %d, stream %d", output, stream);
+    ssize_t index = mOutputs.indexOfKey(output);
+    if (index < 0) {
+        LOGW("stopOutput() unknow output %d", output);
+        return BAD_VALUE;
+    }
+
+    AudioOutputDescriptor *outputDesc = mOutputs.valueAt(index);
+    routing_strategy strategy = getStrategy((AudioSystem::stream_type)stream);
+
+    // handle special case for sonification while in call
+    if (mPhoneState == AudioSystem::MODE_IN_CALL) {
+        handleIncallSonification(stream, false, false);
+    }
+
+    if (outputDesc->mRefCount[stream] > 0) {
+        // decrement usage count of this stream on the output
+        outputDesc->changeRefCount(stream, -1);
+        // store time at which the last music track was stopped - see computeVolume()
+        if (stream == AudioSystem::MUSIC) {
+            mMusicStopTime = systemTime();
+        }
+
+        setOutputDevice(output, getNewDevice(output));
+
+#ifdef WITH_A2DP
+        if (mA2dpOutput != 0 && !a2dpUsedForSonification() && strategy == STRATEGY_SONIFICATION) {
+            setStrategyMute(STRATEGY_MEDIA, false, mA2dpOutput, mOutputs.valueFor(mHardwareOutput)->mLatency*2);
+        }
+#endif
+        if (output != mHardwareOutput) {
+            setOutputDevice(mHardwareOutput, getNewDevice(mHardwareOutput), true);
+        }
+        return NO_ERROR;
+    } else {
+        LOGW("stopOutput() refcount is already 0 for output %d", output);
+        return INVALID_OPERATION;
+    }
+}
+
+void AudioPolicyManagerBase::releaseOutput(audio_io_handle_t output)
+{
+    LOGV("releaseOutput() %d", output);
+    ssize_t index = mOutputs.indexOfKey(output);
+    if (index < 0) {
+        LOGW("releaseOutput() releasing unknown output %d", output);
+        return;
+    }
+
+#ifdef AUDIO_POLICY_TEST
+    int testIndex = testOutputIndex(output);
+    if (testIndex != 0) {
+        AudioOutputDescriptor *outputDesc = mOutputs.valueAt(index);
+        if (outputDesc->refCount() == 0) {
+            mpClientInterface->closeOutput(output);
+            delete mOutputs.valueAt(index);
+            mOutputs.removeItem(output);
+            mTestOutputs[testIndex] = 0;
+        }
+        return;
+    }
+#endif //AUDIO_POLICY_TEST
+
+    if (mOutputs.valueAt(index)->mFlags & AudioSystem::OUTPUT_FLAG_DIRECT) {
+        mpClientInterface->closeOutput(output);
+        delete mOutputs.valueAt(index);
+        mOutputs.removeItem(output);
+    }
+}
+
+audio_io_handle_t AudioPolicyManagerBase::getInput(int inputSource,
+                                    uint32_t samplingRate,
+                                    uint32_t format,
+                                    uint32_t channels,
+                                    AudioSystem::audio_in_acoustics acoustics)
+{
+    audio_io_handle_t input = 0;
+    uint32_t device = getDeviceForInputSource(inputSource);
+
+    LOGV("getInput() inputSource %d, samplingRate %d, format %d, channels %x, acoustics %x", inputSource, samplingRate, format, channels, acoustics);
+
+    if (device == 0) {
+        return 0;
+    }
+
+    // adapt channel selection to input source
+    switch(inputSource) {
+    case AUDIO_SOURCE_VOICE_UPLINK:
+        channels = AudioSystem::CHANNEL_IN_VOICE_UPLINK;
+        break;
+    case AUDIO_SOURCE_VOICE_DOWNLINK:
+        channels = AudioSystem::CHANNEL_IN_VOICE_DNLINK;
+        break;
+    case AUDIO_SOURCE_VOICE_CALL:
+        channels = (AudioSystem::CHANNEL_IN_VOICE_UPLINK | AudioSystem::CHANNEL_IN_VOICE_DNLINK);
+        break;
+    default:
+        break;
+    }
+
+    AudioInputDescriptor *inputDesc = new AudioInputDescriptor();
+
+    inputDesc->mInputSource = inputSource;
+    inputDesc->mDevice = device;
+    inputDesc->mSamplingRate = samplingRate;
+    inputDesc->mFormat = format;
+    inputDesc->mChannels = channels;
+    inputDesc->mAcoustics = acoustics;
+    inputDesc->mRefCount = 0;
+    input = mpClientInterface->openInput(&inputDesc->mDevice,
+                                    &inputDesc->mSamplingRate,
+                                    &inputDesc->mFormat,
+                                    &inputDesc->mChannels,
+                                    inputDesc->mAcoustics);
+
+    // only accept input with the exact requested set of parameters
+    if (input == 0 ||
+        (samplingRate != inputDesc->mSamplingRate) ||
+        (format != inputDesc->mFormat) ||
+        (channels != inputDesc->mChannels)) {
+        LOGV("getInput() failed opening input: samplingRate %d, format %d, channels %d",
+                samplingRate, format, channels);
+        if (input != 0) {
+            mpClientInterface->closeInput(input);
+        }
+        delete inputDesc;
+        return 0;
+    }
+    mInputs.add(input, inputDesc);
+    return input;
+}
+
+status_t AudioPolicyManagerBase::startInput(audio_io_handle_t input)
+{
+    LOGV("startInput() input %d", input);
+    ssize_t index = mInputs.indexOfKey(input);
+    if (index < 0) {
+        LOGW("startInput() unknow input %d", input);
+        return BAD_VALUE;
+    }
+    AudioInputDescriptor *inputDesc = mInputs.valueAt(index);
+
+#ifdef AUDIO_POLICY_TEST
+    if (mTestInput == 0)
+#endif //AUDIO_POLICY_TEST
+    {
+        // refuse 2 active AudioRecord clients at the same time
+        if (getActiveInput() != 0) {
+            LOGW("startInput() input %d failed: other input already started", input);
+            return INVALID_OPERATION;
+        }
+    }
+
+    AudioParameter param = AudioParameter();
+    param.addInt(String8(AudioParameter::keyRouting), (int)inputDesc->mDevice);
+
+    // use Voice Recognition mode or not for this input based on input source
+    int vr_enabled = inputDesc->mInputSource == AUDIO_SOURCE_VOICE_RECOGNITION ? 1 : 0;
+    param.addInt(String8("vr_mode"), vr_enabled);
+    LOGV("AudioPolicyManager::startInput(%d), setting vr_mode to %d", inputDesc->mInputSource, vr_enabled);
+
+    mpClientInterface->setParameters(input, param.toString());
+
+    inputDesc->mRefCount = 1;
+    return NO_ERROR;
+}
+
+status_t AudioPolicyManagerBase::stopInput(audio_io_handle_t input)
+{
+    LOGV("stopInput() input %d", input);
+    ssize_t index = mInputs.indexOfKey(input);
+    if (index < 0) {
+        LOGW("stopInput() unknow input %d", input);
+        return BAD_VALUE;
+    }
+    AudioInputDescriptor *inputDesc = mInputs.valueAt(index);
+
+    if (inputDesc->mRefCount == 0) {
+        LOGW("stopInput() input %d already stopped", input);
+        return INVALID_OPERATION;
+    } else {
+        AudioParameter param = AudioParameter();
+        param.addInt(String8(AudioParameter::keyRouting), 0);
+        mpClientInterface->setParameters(input, param.toString());
+        inputDesc->mRefCount = 0;
+        return NO_ERROR;
+    }
+}
+
+void AudioPolicyManagerBase::releaseInput(audio_io_handle_t input)
+{
+    LOGV("releaseInput() %d", input);
+    ssize_t index = mInputs.indexOfKey(input);
+    if (index < 0) {
+        LOGW("releaseInput() releasing unknown input %d", input);
+        return;
+    }
+    mpClientInterface->closeInput(input);
+    delete mInputs.valueAt(index);
+    mInputs.removeItem(input);
+    LOGV("releaseInput() exit");
+}
+
+void AudioPolicyManagerBase::initStreamVolume(AudioSystem::stream_type stream,
+                                            int indexMin,
+                                            int indexMax)
+{
+    LOGV("initStreamVolume() stream %d, min %d, max %d", stream , indexMin, indexMax);
+    if (indexMin < 0 || indexMin >= indexMax) {
+        LOGW("initStreamVolume() invalid index limits for stream %d, min %d, max %d", stream , indexMin, indexMax);
+        return;
+    }
+    mStreams[stream].mIndexMin = indexMin;
+    mStreams[stream].mIndexMax = indexMax;
+}
+
+status_t AudioPolicyManagerBase::setStreamVolumeIndex(AudioSystem::stream_type stream, int index)
+{
+
+    if ((index < mStreams[stream].mIndexMin) || (index > mStreams[stream].mIndexMax)) {
+        return BAD_VALUE;
+    }
+
+    // Force max volume if stream cannot be muted
+    if (!mStreams[stream].mCanBeMuted) index = mStreams[stream].mIndexMax;
+
+    LOGV("setStreamVolumeIndex() stream %d, index %d", stream, index);
+    mStreams[stream].mIndexCur = index;
+
+    // compute and apply stream volume on all outputs according to connected device
+    status_t status = NO_ERROR;
+    for (size_t i = 0; i < mOutputs.size(); i++) {
+        status_t volStatus = checkAndSetVolume(stream, index, mOutputs.keyAt(i), mOutputs.valueAt(i)->device());
+        if (volStatus != NO_ERROR) {
+            status = volStatus;
+        }
+    }
+    return status;
+}
+
+status_t AudioPolicyManagerBase::getStreamVolumeIndex(AudioSystem::stream_type stream, int *index)
+{
+    if (index == 0) {
+        return BAD_VALUE;
+    }
+    LOGV("getStreamVolumeIndex() stream %d", stream);
+    *index =  mStreams[stream].mIndexCur;
+    return NO_ERROR;
+}
+
+status_t AudioPolicyManagerBase::dump(int fd)
+{
+    const size_t SIZE = 256;
+    char buffer[SIZE];
+    String8 result;
+
+    snprintf(buffer, SIZE, "\nAudioPolicyManager Dump: %p\n", this);
+    result.append(buffer);
+    snprintf(buffer, SIZE, " Hardware Output: %d\n", mHardwareOutput);
+    result.append(buffer);
+#ifdef WITH_A2DP
+    snprintf(buffer, SIZE, " A2DP Output: %d\n", mA2dpOutput);
+    result.append(buffer);
+    snprintf(buffer, SIZE, " Duplicated Output: %d\n", mDuplicatedOutput);
+    result.append(buffer);
+    snprintf(buffer, SIZE, " A2DP device address: %s\n", mA2dpDeviceAddress.string());
+    result.append(buffer);
+#endif
+    snprintf(buffer, SIZE, " SCO device address: %s\n", mScoDeviceAddress.string());
+    result.append(buffer);
+    snprintf(buffer, SIZE, " Output devices: %08x\n", mAvailableOutputDevices);
+    result.append(buffer);
+    snprintf(buffer, SIZE, " Input devices: %08x\n", mAvailableInputDevices);
+    result.append(buffer);
+    snprintf(buffer, SIZE, " Phone state: %d\n", mPhoneState);
+    result.append(buffer);
+    snprintf(buffer, SIZE, " Ringer mode: %d\n", mRingerMode);
+    result.append(buffer);
+    snprintf(buffer, SIZE, " Force use for communications %d\n", mForceUse[AudioSystem::FOR_COMMUNICATION]);
+    result.append(buffer);
+    snprintf(buffer, SIZE, " Force use for media %d\n", mForceUse[AudioSystem::FOR_MEDIA]);
+    result.append(buffer);
+    snprintf(buffer, SIZE, " Force use for record %d\n", mForceUse[AudioSystem::FOR_RECORD]);
+    result.append(buffer);
+    snprintf(buffer, SIZE, " Force use for dock %d\n", mForceUse[AudioSystem::FOR_DOCK]);
+    result.append(buffer);
+    write(fd, result.string(), result.size());
+
+    snprintf(buffer, SIZE, "\nOutputs dump:\n");
+    write(fd, buffer, strlen(buffer));
+    for (size_t i = 0; i < mOutputs.size(); i++) {
+        snprintf(buffer, SIZE, "- Output %d dump:\n", mOutputs.keyAt(i));
+        write(fd, buffer, strlen(buffer));
+        mOutputs.valueAt(i)->dump(fd);
+    }
+
+    snprintf(buffer, SIZE, "\nInputs dump:\n");
+    write(fd, buffer, strlen(buffer));
+    for (size_t i = 0; i < mInputs.size(); i++) {
+        snprintf(buffer, SIZE, "- Input %d dump:\n", mInputs.keyAt(i));
+        write(fd, buffer, strlen(buffer));
+        mInputs.valueAt(i)->dump(fd);
+    }
+
+    snprintf(buffer, SIZE, "\nStreams dump:\n");
+    write(fd, buffer, strlen(buffer));
+    snprintf(buffer, SIZE, " Stream  Index Min  Index Max  Index Cur  Can be muted\n");
+    write(fd, buffer, strlen(buffer));
+    for (size_t i = 0; i < AudioSystem::NUM_STREAM_TYPES; i++) {
+        snprintf(buffer, SIZE, " %02d", i);
+        mStreams[i].dump(buffer + 3, SIZE);
+        write(fd, buffer, strlen(buffer));
+    }
+
+    return NO_ERROR;
+}
+
+// ----------------------------------------------------------------------------
+// AudioPolicyManagerBase
+// ----------------------------------------------------------------------------
+
+AudioPolicyManagerBase::AudioPolicyManagerBase(AudioPolicyClientInterface *clientInterface)
+    :
+#ifdef AUDIO_POLICY_TEST
+    Thread(false),
+#endif //AUDIO_POLICY_TEST
+    mPhoneState(AudioSystem::MODE_NORMAL), mRingerMode(0), mMusicStopTime(0), mLimitRingtoneVolume(false)
+{
+    mpClientInterface = clientInterface;
+
+    for (int i = 0; i < AudioSystem::NUM_FORCE_USE; i++) {
+        mForceUse[i] = AudioSystem::FORCE_NONE;
+    }
+
+    // devices available by default are speaker, ear piece and microphone
+    mAvailableOutputDevices = AudioSystem::DEVICE_OUT_EARPIECE |
+                        AudioSystem::DEVICE_OUT_SPEAKER;
+    mAvailableInputDevices = AudioSystem::DEVICE_IN_BUILTIN_MIC;
+
+#ifdef WITH_A2DP
+    mA2dpOutput = 0;
+    mDuplicatedOutput = 0;
+    mA2dpDeviceAddress = String8("");
+#endif
+    mScoDeviceAddress = String8("");
+
+    // open hardware output
+    AudioOutputDescriptor *outputDesc = new AudioOutputDescriptor();
+    outputDesc->mDevice = (uint32_t)AudioSystem::DEVICE_OUT_SPEAKER;
+    mHardwareOutput = mpClientInterface->openOutput(&outputDesc->mDevice,
+                                    &outputDesc->mSamplingRate,
+                                    &outputDesc->mFormat,
+                                    &outputDesc->mChannels,
+                                    &outputDesc->mLatency,
+                                    outputDesc->mFlags);
+
+    if (mHardwareOutput == 0) {
+        LOGE("Failed to initialize hardware output stream, samplingRate: %d, format %d, channels %d",
+                outputDesc->mSamplingRate, outputDesc->mFormat, outputDesc->mChannels);
+    } else {
+        addOutput(mHardwareOutput, outputDesc);
+        setOutputDevice(mHardwareOutput, (uint32_t)AudioSystem::DEVICE_OUT_SPEAKER, true);
+    }
+
+    updateDeviceForStrategy();
+#ifdef AUDIO_POLICY_TEST
+    AudioParameter outputCmd = AudioParameter();
+    outputCmd.addInt(String8("set_id"), 0);
+    mpClientInterface->setParameters(mHardwareOutput, outputCmd.toString());
+
+    mTestDevice = AudioSystem::DEVICE_OUT_SPEAKER;
+    mTestSamplingRate = 44100;
+    mTestFormat = AudioSystem::PCM_16_BIT;
+    mTestChannels =  AudioSystem::CHANNEL_OUT_STEREO;
+    mTestLatencyMs = 0;
+    mCurOutput = 0;
+    mDirectOutput = false;
+    for (int i = 0; i < NUM_TEST_OUTPUTS; i++) {
+        mTestOutputs[i] = 0;
+    }
+
+    const size_t SIZE = 256;
+    char buffer[SIZE];
+    snprintf(buffer, SIZE, "AudioPolicyManagerTest");
+    run(buffer, ANDROID_PRIORITY_AUDIO);
+#endif //AUDIO_POLICY_TEST
+}
+
+AudioPolicyManagerBase::~AudioPolicyManagerBase()
+{
+#ifdef AUDIO_POLICY_TEST
+    exit();
+#endif //AUDIO_POLICY_TEST
+   for (size_t i = 0; i < mOutputs.size(); i++) {
+        mpClientInterface->closeOutput(mOutputs.keyAt(i));
+        delete mOutputs.valueAt(i);
+   }
+   mOutputs.clear();
+   for (size_t i = 0; i < mInputs.size(); i++) {
+        mpClientInterface->closeInput(mInputs.keyAt(i));
+        delete mInputs.valueAt(i);
+   }
+   mInputs.clear();
+}
+
+#ifdef AUDIO_POLICY_TEST
+bool AudioPolicyManagerBase::threadLoop()
+{
+    LOGV("entering threadLoop()");
+    while (!exitPending())
+    {
+        String8 command;
+        int valueInt;
+        String8 value;
+
+        Mutex::Autolock _l(mLock);
+        mWaitWorkCV.waitRelative(mLock, milliseconds(50));
+
+        command = mpClientInterface->getParameters(0, String8("test_cmd_policy"));
+        AudioParameter param = AudioParameter(command);
+
+        if (param.getInt(String8("test_cmd_policy"), valueInt) == NO_ERROR &&
+            valueInt != 0) {
+            LOGV("Test command %s received", command.string());
+            String8 target;
+            if (param.get(String8("target"), target) != NO_ERROR) {
+                target = "Manager";
+            }
+            if (param.getInt(String8("test_cmd_policy_output"), valueInt) == NO_ERROR) {
+                param.remove(String8("test_cmd_policy_output"));
+                mCurOutput = valueInt;
+            }
+            if (param.get(String8("test_cmd_policy_direct"), value) == NO_ERROR) {
+                param.remove(String8("test_cmd_policy_direct"));
+                if (value == "false") {
+                    mDirectOutput = false;
+                } else if (value == "true") {
+                    mDirectOutput = true;
+                }
+            }
+            if (param.getInt(String8("test_cmd_policy_input"), valueInt) == NO_ERROR) {
+                param.remove(String8("test_cmd_policy_input"));
+                mTestInput = valueInt;
+            }
+
+            if (param.get(String8("test_cmd_policy_format"), value) == NO_ERROR) {
+                param.remove(String8("test_cmd_policy_format"));
+                int format = AudioSystem::INVALID_FORMAT;
+                if (value == "PCM 16 bits") {
+                    format = AudioSystem::PCM_16_BIT;
+                } else if (value == "PCM 8 bits") {
+                    format = AudioSystem::PCM_8_BIT;
+                } else if (value == "Compressed MP3") {
+                    format = AudioSystem::MP3;
+                }
+                if (format != AudioSystem::INVALID_FORMAT) {
+                    if (target == "Manager") {
+                        mTestFormat = format;
+                    } else if (mTestOutputs[mCurOutput] != 0) {
+                        AudioParameter outputParam = AudioParameter();
+                        outputParam.addInt(String8("format"), format);
+                        mpClientInterface->setParameters(mTestOutputs[mCurOutput], outputParam.toString());
+                    }
+                }
+            }
+            if (param.get(String8("test_cmd_policy_channels"), value) == NO_ERROR) {
+                param.remove(String8("test_cmd_policy_channels"));
+                int channels = 0;
+
+                if (value == "Channels Stereo") {
+                    channels =  AudioSystem::CHANNEL_OUT_STEREO;
+                } else if (value == "Channels Mono") {
+                    channels =  AudioSystem::CHANNEL_OUT_MONO;
+                }
+                if (channels != 0) {
+                    if (target == "Manager") {
+                        mTestChannels = channels;
+                    } else if (mTestOutputs[mCurOutput] != 0) {
+                        AudioParameter outputParam = AudioParameter();
+                        outputParam.addInt(String8("channels"), channels);
+                        mpClientInterface->setParameters(mTestOutputs[mCurOutput], outputParam.toString());
+                    }
+                }
+            }
+            if (param.getInt(String8("test_cmd_policy_sampleRate"), valueInt) == NO_ERROR) {
+                param.remove(String8("test_cmd_policy_sampleRate"));
+                if (valueInt >= 0 && valueInt <= 96000) {
+                    int samplingRate = valueInt;
+                    if (target == "Manager") {
+                        mTestSamplingRate = samplingRate;
+                    } else if (mTestOutputs[mCurOutput] != 0) {
+                        AudioParameter outputParam = AudioParameter();
+                        outputParam.addInt(String8("sampling_rate"), samplingRate);
+                        mpClientInterface->setParameters(mTestOutputs[mCurOutput], outputParam.toString());
+                    }
+                }
+            }
+
+            if (param.get(String8("test_cmd_policy_reopen"), value) == NO_ERROR) {
+                param.remove(String8("test_cmd_policy_reopen"));
+
+                mpClientInterface->closeOutput(mHardwareOutput);
+                delete mOutputs.valueFor(mHardwareOutput);
+                mOutputs.removeItem(mHardwareOutput);
+
+                AudioOutputDescriptor *outputDesc = new AudioOutputDescriptor();
+                outputDesc->mDevice = (uint32_t)AudioSystem::DEVICE_OUT_SPEAKER;
+                mHardwareOutput = mpClientInterface->openOutput(&outputDesc->mDevice,
+                                                &outputDesc->mSamplingRate,
+                                                &outputDesc->mFormat,
+                                                &outputDesc->mChannels,
+                                                &outputDesc->mLatency,
+                                                outputDesc->mFlags);
+                if (mHardwareOutput == 0) {
+                    LOGE("Failed to reopen hardware output stream, samplingRate: %d, format %d, channels %d",
+                            outputDesc->mSamplingRate, outputDesc->mFormat, outputDesc->mChannels);
+                } else {
+                    AudioParameter outputCmd = AudioParameter();
+                    outputCmd.addInt(String8("set_id"), 0);
+                    mpClientInterface->setParameters(mHardwareOutput, outputCmd.toString());
+                    addOutput(mHardwareOutput, outputDesc);
+                }
+            }
+
+
+            mpClientInterface->setParameters(0, String8("test_cmd_policy="));
+        }
+    }
+    return false;
+}
+
+void AudioPolicyManagerBase::exit()
+{
+    {
+        AutoMutex _l(mLock);
+        requestExit();
+        mWaitWorkCV.signal();
+    }
+    requestExitAndWait();
+}
+
+int AudioPolicyManagerBase::testOutputIndex(audio_io_handle_t output)
+{
+    for (int i = 0; i < NUM_TEST_OUTPUTS; i++) {
+        if (output == mTestOutputs[i]) return i;
+    }
+    return 0;
+}
+#endif //AUDIO_POLICY_TEST
+
+// ---
+
+void AudioPolicyManagerBase::addOutput(audio_io_handle_t id, AudioOutputDescriptor *outputDesc)
+{
+    outputDesc->mId = id;
+    mOutputs.add(id, outputDesc);
+}
+
+
+#ifdef WITH_A2DP
+status_t AudioPolicyManagerBase::handleA2dpConnection(AudioSystem::audio_devices device,
+                                                 const char *device_address)
+{
+    // when an A2DP device is connected, open an A2DP and a duplicated output
+    LOGV("opening A2DP output for device %s", device_address);
+    AudioOutputDescriptor *outputDesc = new AudioOutputDescriptor();
+    outputDesc->mDevice = device;
+    mA2dpOutput = mpClientInterface->openOutput(&outputDesc->mDevice,
+                                            &outputDesc->mSamplingRate,
+                                            &outputDesc->mFormat,
+                                            &outputDesc->mChannels,
+                                            &outputDesc->mLatency,
+                                            outputDesc->mFlags);
+    if (mA2dpOutput) {
+        // add A2DP output descriptor
+        addOutput(mA2dpOutput, outputDesc);
+        // set initial stream volume for A2DP device
+        applyStreamVolumes(mA2dpOutput, device);
+        if (a2dpUsedForSonification()) {
+            mDuplicatedOutput = mpClientInterface->openDuplicateOutput(mA2dpOutput, mHardwareOutput);
+        }
+        if (mDuplicatedOutput != 0 ||
+            !a2dpUsedForSonification()) {
+            // If both A2DP and duplicated outputs are open, send device address to A2DP hardware
+            // interface
+            AudioParameter param;
+            param.add(String8("a2dp_sink_address"), String8(device_address));
+            mpClientInterface->setParameters(mA2dpOutput, param.toString());
+            mA2dpDeviceAddress = String8(device_address, MAX_DEVICE_ADDRESS_LEN);
+
+            if (a2dpUsedForSonification()) {
+                // add duplicated output descriptor
+                AudioOutputDescriptor *dupOutputDesc = new AudioOutputDescriptor();
+                dupOutputDesc->mOutput1 = mOutputs.valueFor(mHardwareOutput);
+                dupOutputDesc->mOutput2 = mOutputs.valueFor(mA2dpOutput);
+                dupOutputDesc->mSamplingRate = outputDesc->mSamplingRate;
+                dupOutputDesc->mFormat = outputDesc->mFormat;
+                dupOutputDesc->mChannels = outputDesc->mChannels;
+                dupOutputDesc->mLatency = outputDesc->mLatency;
+                addOutput(mDuplicatedOutput, dupOutputDesc);
+                applyStreamVolumes(mDuplicatedOutput, device);
+            }
+        } else {
+            LOGW("getOutput() could not open duplicated output for %d and %d",
+                    mHardwareOutput, mA2dpOutput);
+            mpClientInterface->closeOutput(mA2dpOutput);
+            mOutputs.removeItem(mA2dpOutput);
+            mA2dpOutput = 0;
+            delete outputDesc;
+            return NO_INIT;
+        }
+    } else {
+        LOGW("setDeviceConnectionState() could not open A2DP output for device %x", device);
+        delete outputDesc;
+        return NO_INIT;
+    }
+    AudioOutputDescriptor *hwOutputDesc = mOutputs.valueFor(mHardwareOutput);
+
+    if (mScoDeviceAddress != "") {
+        // It is normal to suspend twice if we are both in call,
+        // and have the hardware audio output routed to BT SCO
+        if (mPhoneState != AudioSystem::MODE_NORMAL) {
+            mpClientInterface->suspendOutput(mA2dpOutput);
+        }
+        if (AudioSystem::isBluetoothScoDevice((AudioSystem::audio_devices)hwOutputDesc->device())) {
+            mpClientInterface->suspendOutput(mA2dpOutput);
+        }
+    }
+
+    if (!a2dpUsedForSonification()) {
+        // mute music on A2DP output if a notification or ringtone is playing
+        uint32_t refCount = hwOutputDesc->strategyRefCount(STRATEGY_SONIFICATION);
+        for (uint32_t i = 0; i < refCount; i++) {
+            setStrategyMute(STRATEGY_MEDIA, true, mA2dpOutput);
+        }
+    }
+    return NO_ERROR;
+}
+
+status_t AudioPolicyManagerBase::handleA2dpDisconnection(AudioSystem::audio_devices device,
+                                                    const char *device_address)
+{
+    if (mA2dpOutput == 0) {
+        LOGW("setDeviceConnectionState() disconnecting A2DP and no A2DP output!");
+        return INVALID_OPERATION;
+    }
+
+    if (mA2dpDeviceAddress != device_address) {
+        LOGW("setDeviceConnectionState() disconnecting unknow A2DP sink address %s", device_address);
+        return INVALID_OPERATION;
+    }
+
+    // mute media strategy to avoid outputting sound on hardware output while music stream
+    // is switched from A2DP output and before music is paused by music application
+    setStrategyMute(STRATEGY_MEDIA, true, mHardwareOutput);
+    setStrategyMute(STRATEGY_MEDIA, false, mHardwareOutput, MUTE_TIME_MS);
+
+    if (!a2dpUsedForSonification()) {
+        // unmute music on A2DP output if a notification or ringtone is playing
+        uint32_t refCount = mOutputs.valueFor(mHardwareOutput)->strategyRefCount(STRATEGY_SONIFICATION);
+        for (uint32_t i = 0; i < refCount; i++) {
+            setStrategyMute(STRATEGY_MEDIA, false, mA2dpOutput);
+        }
+    }
+    mA2dpDeviceAddress = "";
+    return NO_ERROR;
+}
+
+void AudioPolicyManagerBase::closeA2dpOutputs()
+{
+    LOGV("setDeviceConnectionState() closing A2DP and duplicated output!");
+
+    if (mDuplicatedOutput != 0) {
+        AudioOutputDescriptor *dupOutputDesc = mOutputs.valueFor(mDuplicatedOutput);
+        AudioOutputDescriptor *hwOutputDesc = mOutputs.valueFor(mHardwareOutput);
+        // As all active tracks on duplicated output will be deleted,
+        // and as they were also referenced on hardware output, the reference
+        // count for their stream type must be adjusted accordingly on
+        // hardware output.
+        for (int i = 0; i < (int)AudioSystem::NUM_STREAM_TYPES; i++) {
+            int refCount = dupOutputDesc->mRefCount[i];
+            hwOutputDesc->changeRefCount((AudioSystem::stream_type)i,-refCount);
+        }
+
+        mpClientInterface->closeOutput(mDuplicatedOutput);
+        delete mOutputs.valueFor(mDuplicatedOutput);
+        mOutputs.removeItem(mDuplicatedOutput);
+        mDuplicatedOutput = 0;
+    }
+    if (mA2dpOutput != 0) {
+        AudioParameter param;
+        param.add(String8("closing"), String8("true"));
+        mpClientInterface->setParameters(mA2dpOutput, param.toString());
+        mpClientInterface->closeOutput(mA2dpOutput);
+        delete mOutputs.valueFor(mA2dpOutput);
+        mOutputs.removeItem(mA2dpOutput);
+        mA2dpOutput = 0;
+    }
+}
+
+void AudioPolicyManagerBase::checkOutputForStrategy(routing_strategy strategy, uint32_t &newDevice)
+{
+    uint32_t prevDevice = getDeviceForStrategy(strategy);
+    uint32_t curDevice = getDeviceForStrategy(strategy, false);
+    bool a2dpWasUsed = AudioSystem::isA2dpDevice((AudioSystem::audio_devices)(prevDevice & ~AudioSystem::DEVICE_OUT_SPEAKER));
+    bool a2dpIsUsed = AudioSystem::isA2dpDevice((AudioSystem::audio_devices)(curDevice & ~AudioSystem::DEVICE_OUT_SPEAKER));
+    AudioOutputDescriptor *hwOutputDesc = mOutputs.valueFor(mHardwareOutput);
+    AudioOutputDescriptor *a2dpOutputDesc;
+
+    if (a2dpWasUsed && !a2dpIsUsed) {
+        bool dupUsed = a2dpUsedForSonification() && a2dpWasUsed && (AudioSystem::popCount(prevDevice) == 2);
+
+        if (dupUsed) {
+            LOGV("checkOutputForStrategy() moving strategy %d to duplicated", strategy);
+            a2dpOutputDesc = mOutputs.valueFor(mDuplicatedOutput);
+        } else {
+            LOGV("checkOutputForStrategy() moving strategy %d to a2dp", strategy);
+            a2dpOutputDesc = mOutputs.valueFor(mA2dpOutput);
+        }
+
+        for (int i = 0; i < (int)AudioSystem::NUM_STREAM_TYPES; i++) {
+            if (getStrategy((AudioSystem::stream_type)i) == strategy) {
+                mpClientInterface->setStreamOutput((AudioSystem::stream_type)i, mHardwareOutput);
+            }
+        }
+        // do not change newDevice if it was already set before this call by a previous call to
+        // getNewDevice() or checkOutputForStrategy() for a strategy with higher priority
+        if (newDevice == 0 && hwOutputDesc->isUsedByStrategy(strategy)) {
+            newDevice = getDeviceForStrategy(strategy, false);
+        }
+    }
+    if (a2dpIsUsed && !a2dpWasUsed) {
+        bool dupUsed = a2dpUsedForSonification() && a2dpIsUsed && (AudioSystem::popCount(curDevice) == 2);
+        audio_io_handle_t a2dpOutput;
+
+        if (dupUsed) {
+            LOGV("checkOutputForStrategy() moving strategy %d from duplicated", strategy);
+            a2dpOutputDesc = mOutputs.valueFor(mDuplicatedOutput);
+            a2dpOutput = mDuplicatedOutput;
+        } else {
+            LOGV("checkOutputForStrategy() moving strategy %d from a2dp", strategy);
+            a2dpOutputDesc = mOutputs.valueFor(mA2dpOutput);
+            a2dpOutput = mA2dpOutput;
+        }
+
+        for (int i = 0; i < (int)AudioSystem::NUM_STREAM_TYPES; i++) {
+            if (getStrategy((AudioSystem::stream_type)i) == strategy) {
+                mpClientInterface->setStreamOutput((AudioSystem::stream_type)i, a2dpOutput);
+            }
+        }
+    }
+}
+
+void AudioPolicyManagerBase::checkOutputForAllStrategies(uint32_t &newDevice)
+{
+    // Check strategies in order of priority so that once newDevice is set
+    // for a given strategy it is not modified by subsequent calls to
+    // checkOutputForStrategy()
+    checkOutputForStrategy(STRATEGY_PHONE, newDevice);
+    checkOutputForStrategy(STRATEGY_SONIFICATION, newDevice);
+    checkOutputForStrategy(STRATEGY_MEDIA, newDevice);
+    checkOutputForStrategy(STRATEGY_DTMF, newDevice);
+}
+
+#endif
+
+uint32_t AudioPolicyManagerBase::getNewDevice(audio_io_handle_t output, bool fromCache)
+{
+    uint32_t device = 0;
+
+    AudioOutputDescriptor *outputDesc = mOutputs.valueFor(output);
+    // check the following by order of priority to request a routing change if necessary:
+    // 1: we are in call or the strategy phone is active on the hardware output:
+    //      use device for strategy phone
+    // 2: the strategy sonification is active on the hardware output:
+    //      use device for strategy sonification
+    // 3: the strategy media is active on the hardware output:
+    //      use device for strategy media
+    // 4: the strategy DTMF is active on the hardware output:
+    //      use device for strategy DTMF
+    if (mPhoneState == AudioSystem::MODE_IN_CALL ||
+        outputDesc->isUsedByStrategy(STRATEGY_PHONE)) {
+        device = getDeviceForStrategy(STRATEGY_PHONE, fromCache);
+    } else if (outputDesc->isUsedByStrategy(STRATEGY_SONIFICATION)) {
+        device = getDeviceForStrategy(STRATEGY_SONIFICATION, fromCache);
+    } else if (outputDesc->isUsedByStrategy(STRATEGY_MEDIA)) {
+        device = getDeviceForStrategy(STRATEGY_MEDIA, fromCache);
+    } else if (outputDesc->isUsedByStrategy(STRATEGY_DTMF)) {
+        device = getDeviceForStrategy(STRATEGY_DTMF, fromCache);
+    }
+
+    LOGV("getNewDevice() selected device %x", device);
+    return device;
+}
+
+AudioPolicyManagerBase::routing_strategy AudioPolicyManagerBase::getStrategy(AudioSystem::stream_type stream)
+{
+    // stream to strategy mapping
+    switch (stream) {
+    case AudioSystem::VOICE_CALL:
+    case AudioSystem::BLUETOOTH_SCO:
+        return STRATEGY_PHONE;
+    case AudioSystem::RING:
+    case AudioSystem::NOTIFICATION:
+    case AudioSystem::ALARM:
+    case AudioSystem::ENFORCED_AUDIBLE:
+        return STRATEGY_SONIFICATION;
+    case AudioSystem::DTMF:
+        return STRATEGY_DTMF;
+    default:
+        LOGE("unknown stream type");
+    case AudioSystem::SYSTEM:
+        // NOTE: SYSTEM stream uses MEDIA strategy because muting music and switching outputs
+        // while key clicks are played produces a poor result
+    case AudioSystem::TTS:
+    case AudioSystem::MUSIC:
+        return STRATEGY_MEDIA;
+    }
+}
+
+uint32_t AudioPolicyManagerBase::getDeviceForStrategy(routing_strategy strategy, bool fromCache)
+{
+    uint32_t device = 0;
+
+    if (fromCache) {
+        LOGV("getDeviceForStrategy() from cache strategy %d, device %x", strategy, mDeviceForStrategy[strategy]);
+        return mDeviceForStrategy[strategy];
+    }
+
+    switch (strategy) {
+    case STRATEGY_DTMF:
+        if (mPhoneState != AudioSystem::MODE_IN_CALL) {
+            // when off call, DTMF strategy follows the same rules as MEDIA strategy
+            device = getDeviceForStrategy(STRATEGY_MEDIA, false);
+            break;
+        }
+        // when in call, DTMF and PHONE strategies follow the same rules
+        // FALL THROUGH
+
+    case STRATEGY_PHONE:
+        // for phone strategy, we first consider the forced use and then the available devices by order
+        // of priority
+        switch (mForceUse[AudioSystem::FOR_COMMUNICATION]) {
+        case AudioSystem::FORCE_BT_SCO:
+            if (mPhoneState != AudioSystem::MODE_IN_CALL || strategy != STRATEGY_DTMF) {
+                device = mAvailableOutputDevices & AudioSystem::DEVICE_OUT_BLUETOOTH_SCO_CARKIT;
+                if (device) break;
+            }
+            device = mAvailableOutputDevices & AudioSystem::DEVICE_OUT_BLUETOOTH_SCO_HEADSET;
+            if (device) break;
+            device = mAvailableOutputDevices & AudioSystem::DEVICE_OUT_BLUETOOTH_SCO;
+            if (device) break;
+            // if SCO device is requested but no SCO device is available, fall back to default case
+            // FALL THROUGH
+
+        default:    // FORCE_NONE
+            device = mAvailableOutputDevices & AudioSystem::DEVICE_OUT_WIRED_HEADPHONE;
+            if (device) break;
+            device = mAvailableOutputDevices & AudioSystem::DEVICE_OUT_WIRED_HEADSET;
+            if (device) break;
+#ifdef WITH_A2DP
+            // when not in a phone call, phone strategy should route STREAM_VOICE_CALL to A2DP
+            if (mPhoneState != AudioSystem::MODE_IN_CALL) {
+                device = mAvailableOutputDevices & AudioSystem::DEVICE_OUT_BLUETOOTH_A2DP;
+                if (device) break;
+                device = mAvailableOutputDevices & AudioSystem::DEVICE_OUT_BLUETOOTH_A2DP_HEADPHONES;
+                if (device) break;
+            }
+#endif
+            device = mAvailableOutputDevices & AudioSystem::DEVICE_OUT_EARPIECE;
+            if (device == 0) {
+                LOGE("getDeviceForStrategy() earpiece device not found");
+            }
+            break;
+
+        case AudioSystem::FORCE_SPEAKER:
+            if (mPhoneState != AudioSystem::MODE_IN_CALL || strategy != STRATEGY_DTMF) {
+                device = mAvailableOutputDevices & AudioSystem::DEVICE_OUT_BLUETOOTH_SCO_CARKIT;
+                if (device) break;
+            }
+#ifdef WITH_A2DP
+            // when not in a phone call, phone strategy should route STREAM_VOICE_CALL to
+            // A2DP speaker when forcing to speaker output
+            if (mPhoneState != AudioSystem::MODE_IN_CALL) {
+                device = mAvailableOutputDevices & AudioSystem::DEVICE_OUT_BLUETOOTH_A2DP_SPEAKER;
+                if (device) break;
+            }
+#endif
+            device = mAvailableOutputDevices & AudioSystem::DEVICE_OUT_SPEAKER;
+            if (device == 0) {
+                LOGE("getDeviceForStrategy() speaker device not found");
+            }
+            break;
+        }
+    break;
+
+    case STRATEGY_SONIFICATION:
+
+        // If incall, just select the STRATEGY_PHONE device: The rest of the behavior is handled by
+        // handleIncallSonification().
+        if (mPhoneState == AudioSystem::MODE_IN_CALL) {
+            device = getDeviceForStrategy(STRATEGY_PHONE, false);
+            break;
+        }
+        device = mAvailableOutputDevices & AudioSystem::DEVICE_OUT_SPEAKER;
+        if (device == 0) {
+            LOGE("getDeviceForStrategy() speaker device not found");
+        }
+        // The second device used for sonification is the same as the device used by media strategy
+        // FALL THROUGH
+
+    case STRATEGY_MEDIA: {
+        uint32_t device2 = mAvailableOutputDevices & AudioSystem::DEVICE_OUT_AUX_DIGITAL;
+        if (device2 == 0) {
+            device2 = mAvailableOutputDevices & AudioSystem::DEVICE_OUT_WIRED_HEADPHONE;
+        }
+        if (device2 == 0) {
+            device2 = mAvailableOutputDevices & AudioSystem::DEVICE_OUT_WIRED_HEADSET;
+        }
+#ifdef WITH_A2DP
+        if (mA2dpOutput != 0) {
+            if (strategy == STRATEGY_SONIFICATION && !a2dpUsedForSonification()) {
+                break;
+            }
+            if (device2 == 0) {
+                device2 = mAvailableOutputDevices & AudioSystem::DEVICE_OUT_BLUETOOTH_A2DP;
+            }
+            if (device2 == 0) {
+                device2 = mAvailableOutputDevices & AudioSystem::DEVICE_OUT_BLUETOOTH_A2DP_HEADPHONES;
+            }
+            if (device2 == 0) {
+                device2 = mAvailableOutputDevices & AudioSystem::DEVICE_OUT_BLUETOOTH_A2DP_SPEAKER;
+            }
+        }
+#endif
+        if (device2 == 0) {
+            device2 = mAvailableOutputDevices & AudioSystem::DEVICE_OUT_SPEAKER;
+        }
+
+        // device is DEVICE_OUT_SPEAKER if we come from case STRATEGY_SONIFICATION, 0 otherwise
+        device |= device2;
+        if (device == 0) {
+            LOGE("getDeviceForStrategy() speaker device not found");
+        }
+        } break;
+
+    default:
+        LOGW("getDeviceForStrategy() unknown strategy: %d", strategy);
+        break;
+    }
+
+    LOGV("getDeviceForStrategy() strategy %d, device %x", strategy, device);
+    return device;
+}
+
+void AudioPolicyManagerBase::updateDeviceForStrategy()
+{
+    for (int i = 0; i < NUM_STRATEGIES; i++) {
+        mDeviceForStrategy[i] = getDeviceForStrategy((routing_strategy)i, false);
+    }
+}
+
+void AudioPolicyManagerBase::setOutputDevice(audio_io_handle_t output, uint32_t device, bool force, int delayMs)
+{
+    LOGV("setOutputDevice() output %d device %x delayMs %d", output, device, delayMs);
+    AudioOutputDescriptor *outputDesc = mOutputs.valueFor(output);
+
+
+    if (outputDesc->isDuplicated()) {
+        setOutputDevice(outputDesc->mOutput1->mId, device, force, delayMs);
+        setOutputDevice(outputDesc->mOutput2->mId, device, force, delayMs);
+        return;
+    }
+#ifdef WITH_A2DP
+    // filter devices according to output selected
+    if (output == mA2dpOutput) {
+        device &= AudioSystem::DEVICE_OUT_ALL_A2DP;
+    } else {
+        device &= ~AudioSystem::DEVICE_OUT_ALL_A2DP;
+    }
+#endif
+
+    uint32_t prevDevice = (uint32_t)outputDesc->device();
+    // Do not change the routing if:
+    //  - the requestede device is 0
+    //  - the requested device is the same as current device and force is not specified.
+    // Doing this check here allows the caller to call setOutputDevice() without conditions
+    if ((device == 0 || device == prevDevice) && !force) {
+        LOGV("setOutputDevice() setting same device %x or null device for output %d", device, output);
+        return;
+    }
+
+    outputDesc->mDevice = device;
+    // mute media streams if both speaker and headset are selected
+    if (output == mHardwareOutput && AudioSystem::popCount(device) == 2) {
+        setStrategyMute(STRATEGY_MEDIA, true, output);
+        // wait for the PCM output buffers to empty before proceeding with the rest of the command
+        usleep(outputDesc->mLatency*2*1000);
+    }
+#ifdef WITH_A2DP
+    // suspend A2DP output if SCO device is selected
+    if (AudioSystem::isBluetoothScoDevice((AudioSystem::audio_devices)device)) {
+         if (mA2dpOutput != 0) {
+             mpClientInterface->suspendOutput(mA2dpOutput);
+         }
+    }
+#endif
+    // do the routing
+    AudioParameter param = AudioParameter();
+    param.addInt(String8(AudioParameter::keyRouting), (int)device);
+    mpClientInterface->setParameters(mHardwareOutput, param.toString(), delayMs);
+    // update stream volumes according to new device
+    applyStreamVolumes(output, device, delayMs);
+
+#ifdef WITH_A2DP
+    // if disconnecting SCO device, restore A2DP output
+    if (AudioSystem::isBluetoothScoDevice((AudioSystem::audio_devices)prevDevice)) {
+         if (mA2dpOutput != 0) {
+             LOGV("restore A2DP output");
+             mpClientInterface->restoreOutput(mA2dpOutput);
+         }
+    }
+#endif
+    // if changing from a combined headset + speaker route, unmute media streams
+    if (output == mHardwareOutput && AudioSystem::popCount(prevDevice) == 2) {
+        setStrategyMute(STRATEGY_MEDIA, false, output, delayMs);
+    }
+}
+
+uint32_t AudioPolicyManagerBase::getDeviceForInputSource(int inputSource)
+{
+    uint32_t device;
+
+    switch(inputSource) {
+    case AUDIO_SOURCE_DEFAULT:
+    case AUDIO_SOURCE_MIC:
+    case AUDIO_SOURCE_VOICE_RECOGNITION:
+        if (mForceUse[AudioSystem::FOR_RECORD] == AudioSystem::FORCE_BT_SCO &&
+            mAvailableInputDevices & AudioSystem::DEVICE_IN_BLUETOOTH_SCO_HEADSET) {
+            device = AudioSystem::DEVICE_IN_BLUETOOTH_SCO_HEADSET;
+        } else if (mAvailableInputDevices & AudioSystem::DEVICE_IN_WIRED_HEADSET) {
+            device = AudioSystem::DEVICE_IN_WIRED_HEADSET;
+        } else {
+            device = AudioSystem::DEVICE_IN_BUILTIN_MIC;
+        }
+        break;
+    case AUDIO_SOURCE_CAMCORDER:
+        if (hasBackMicrophone()) {
+            device = AudioSystem::DEVICE_IN_BACK_MIC;
+        } else {
+            device = AudioSystem::DEVICE_IN_BUILTIN_MIC;
+        }
+        break;
+    case AUDIO_SOURCE_VOICE_UPLINK:
+    case AUDIO_SOURCE_VOICE_DOWNLINK:
+    case AUDIO_SOURCE_VOICE_CALL:
+        device = AudioSystem::DEVICE_IN_VOICE_CALL;
+        break;
+    default:
+        LOGW("getInput() invalid input source %d", inputSource);
+        device = 0;
+        break;
+    }
+    LOGV("getDeviceForInputSource()input source %d, device %08x", inputSource, device);
+    return device;
+}
+
+audio_io_handle_t AudioPolicyManagerBase::getActiveInput()
+{
+    for (size_t i = 0; i < mInputs.size(); i++) {
+        if (mInputs.valueAt(i)->mRefCount > 0) {
+            return mInputs.keyAt(i);
+        }
+    }
+    return 0;
+}
+
+float AudioPolicyManagerBase::computeVolume(int stream, int index, audio_io_handle_t output, uint32_t device)
+{
+    float volume = 1.0;
+    AudioOutputDescriptor *outputDesc = mOutputs.valueFor(output);
+    StreamDescriptor &streamDesc = mStreams[stream];
+
+    if (device == 0) {
+        device = outputDesc->device();
+    }
+
+    int volInt = (100 * (index - streamDesc.mIndexMin)) / (streamDesc.mIndexMax - streamDesc.mIndexMin);
+    volume = AudioSystem::linearToLog(volInt);
+
+    // if a headset is connected, apply the following rules to ring tones and notifications
+    // to avoid sound level bursts in user's ears:
+    // - always attenuate ring tones and notifications volume by 6dB
+    // - if music is playing, always limit the volume to current music volume,
+    // with a minimum threshold at -36dB so that notification is always perceived.
+    if ((device &
+        (AudioSystem::DEVICE_OUT_BLUETOOTH_A2DP |
+        AudioSystem::DEVICE_OUT_BLUETOOTH_A2DP_HEADPHONES |
+        AudioSystem::DEVICE_OUT_WIRED_HEADSET |
+        AudioSystem::DEVICE_OUT_WIRED_HEADPHONE)) &&
+        (getStrategy((AudioSystem::stream_type)stream) == STRATEGY_SONIFICATION) &&
+        streamDesc.mCanBeMuted) {
+        volume *= SONIFICATION_HEADSET_VOLUME_FACTOR;
+        // when the phone is ringing we must consider that music could have been paused just before
+        // by the music application and behave as if music was active if the last music track was
+        // just stopped
+        if (outputDesc->mRefCount[AudioSystem::MUSIC] || mLimitRingtoneVolume) {
+            float musicVol = computeVolume(AudioSystem::MUSIC, mStreams[AudioSystem::MUSIC].mIndexCur, output, device);
+            float minVol = (musicVol > SONIFICATION_HEADSET_VOLUME_MIN) ? musicVol : SONIFICATION_HEADSET_VOLUME_MIN;
+            if (volume > minVol) {
+                volume = minVol;
+                LOGV("computeVolume limiting volume to %f musicVol %f", minVol, musicVol);
+            }
+        }
+    }
+
+    return volume;
+}
+
+status_t AudioPolicyManagerBase::checkAndSetVolume(int stream, int index, audio_io_handle_t output, uint32_t device, int delayMs, bool force)
+{
+
+    // do not change actual stream volume if the stream is muted
+    if (mOutputs.valueFor(output)->mMuteCount[stream] != 0) {
+        LOGV("checkAndSetVolume() stream %d muted count %d", stream, mOutputs.valueFor(output)->mMuteCount[stream]);
+        return NO_ERROR;
+    }
+
+    // do not change in call volume if bluetooth is connected and vice versa
+    if ((stream == AudioSystem::VOICE_CALL && mForceUse[AudioSystem::FOR_COMMUNICATION] == AudioSystem::FORCE_BT_SCO) ||
+        (stream == AudioSystem::BLUETOOTH_SCO && mForceUse[AudioSystem::FOR_COMMUNICATION] != AudioSystem::FORCE_BT_SCO)) {
+        LOGV("checkAndSetVolume() cannot set stream %d volume with force use = %d for comm",
+             stream, mForceUse[AudioSystem::FOR_COMMUNICATION]);
+        return INVALID_OPERATION;
+    }
+
+    float volume = computeVolume(stream, index, output, device);
+    // do not set volume if the float value did not change
+    if (volume != mOutputs.valueFor(output)->mCurVolume[stream] || force) {
+        mOutputs.valueFor(output)->mCurVolume[stream] = volume;
+        LOGV("setStreamVolume() for output %d stream %d, volume %f, delay %d", output, stream, volume, delayMs);
+        if (stream == AudioSystem::VOICE_CALL ||
+            stream == AudioSystem::DTMF ||
+            stream == AudioSystem::BLUETOOTH_SCO) {
+            float voiceVolume = -1.0;
+            // offset value to reflect actual hardware volume that never reaches 0
+            // 1% corresponds roughly to first step in VOICE_CALL stream volume setting (see AudioService.java)
+            volume = 0.01 + 0.99 * volume;
+            if (stream == AudioSystem::VOICE_CALL) {
+                voiceVolume = (float)index/(float)mStreams[stream].mIndexMax;
+            } else if (stream == AudioSystem::BLUETOOTH_SCO) {
+                voiceVolume = 1.0;
+            }
+            if (voiceVolume >= 0 && output == mHardwareOutput) {
+                mpClientInterface->setVoiceVolume(voiceVolume, delayMs);
+            }
+        }
+        mpClientInterface->setStreamVolume((AudioSystem::stream_type)stream, volume, output, delayMs);
+    }
+
+    return NO_ERROR;
+}
+
+void AudioPolicyManagerBase::applyStreamVolumes(audio_io_handle_t output, uint32_t device, int delayMs)
+{
+    LOGV("applyStreamVolumes() for output %d and device %x", output, device);
+
+    for (int stream = 0; stream < AudioSystem::NUM_STREAM_TYPES; stream++) {
+        checkAndSetVolume(stream, mStreams[stream].mIndexCur, output, device, delayMs);
+    }
+}
+
+void AudioPolicyManagerBase::setStrategyMute(routing_strategy strategy, bool on, audio_io_handle_t output, int delayMs)
+{
+    LOGV("setStrategyMute() strategy %d, mute %d, output %d", strategy, on, output);
+    for (int stream = 0; stream < AudioSystem::NUM_STREAM_TYPES; stream++) {
+        if (getStrategy((AudioSystem::stream_type)stream) == strategy) {
+            setStreamMute(stream, on, output, delayMs);
+        }
+    }
+}
+
+void AudioPolicyManagerBase::setStreamMute(int stream, bool on, audio_io_handle_t output, int delayMs)
+{
+    StreamDescriptor &streamDesc = mStreams[stream];
+    AudioOutputDescriptor *outputDesc = mOutputs.valueFor(output);
+
+    LOGV("setStreamMute() stream %d, mute %d, output %d, mMuteCount %d", stream, on, output, outputDesc->mMuteCount[stream]);
+
+    if (on) {
+        if (outputDesc->mMuteCount[stream] == 0) {
+            if (streamDesc.mCanBeMuted) {
+                checkAndSetVolume(stream, 0, output, outputDesc->device(), delayMs);
+            }
+        }
+        // increment mMuteCount after calling checkAndSetVolume() so that volume change is not ignored
+        outputDesc->mMuteCount[stream]++;
+    } else {
+        if (outputDesc->mMuteCount[stream] == 0) {
+            LOGW("setStreamMute() unmuting non muted stream!");
+            return;
+        }
+        if (--outputDesc->mMuteCount[stream] == 0) {
+            checkAndSetVolume(stream, streamDesc.mIndexCur, output, outputDesc->device(), delayMs);
+        }
+    }
+}
+
+void AudioPolicyManagerBase::handleIncallSonification(int stream, bool starting, bool stateChange)
+{
+    // if the stream pertains to sonification strategy and we are in call we must
+    // mute the stream if it is low visibility. If it is high visibility, we must play a tone
+    // in the device used for phone strategy and play the tone if the selected device does not
+    // interfere with the device used for phone strategy
+    // if stateChange is true, we are called from setPhoneState() and we must mute or unmute as
+    // many times as there are active tracks on the output
+
+    if (getStrategy((AudioSystem::stream_type)stream) == STRATEGY_SONIFICATION) {
+        AudioOutputDescriptor *outputDesc = mOutputs.valueFor(mHardwareOutput);
+        LOGV("handleIncallSonification() stream %d starting %d device %x stateChange %d",
+                stream, starting, outputDesc->mDevice, stateChange);
+        if (outputDesc->mRefCount[stream]) {
+            int muteCount = 1;
+            if (stateChange) {
+                muteCount = outputDesc->mRefCount[stream];
+            }
+            if (AudioSystem::isLowVisibility((AudioSystem::stream_type)stream)) {
+                LOGV("handleIncallSonification() low visibility, muteCount %d", muteCount);
+                for (int i = 0; i < muteCount; i++) {
+                    setStreamMute(stream, starting, mHardwareOutput);
+                }
+            } else {
+                LOGV("handleIncallSonification() high visibility");
+                if (outputDesc->device() & getDeviceForStrategy(STRATEGY_PHONE)) {
+                    LOGV("handleIncallSonification() high visibility muted, muteCount %d", muteCount);
+                    for (int i = 0; i < muteCount; i++) {
+                        setStreamMute(stream, starting, mHardwareOutput);
+                    }
+                }
+                if (starting) {
+                    mpClientInterface->startTone(ToneGenerator::TONE_SUP_CALL_WAITING, AudioSystem::VOICE_CALL);
+                } else {
+                    mpClientInterface->stopTone();
+                }
+            }
+        }
+    }
+}
+
+bool AudioPolicyManagerBase::needsDirectOuput(AudioSystem::stream_type stream,
+                                    uint32_t samplingRate,
+                                    uint32_t format,
+                                    uint32_t channels,
+                                    AudioSystem::output_flags flags,
+                                    uint32_t device)
+{
+   return ((flags & AudioSystem::OUTPUT_FLAG_DIRECT) ||
+          (format !=0 && !AudioSystem::isLinearPCM(format)));
+}
+
+// --- AudioOutputDescriptor class implementation
+
+AudioPolicyManagerBase::AudioOutputDescriptor::AudioOutputDescriptor()
+    : mId(0), mSamplingRate(0), mFormat(0), mChannels(0), mLatency(0),
+    mFlags((AudioSystem::output_flags)0), mDevice(0), mOutput1(0), mOutput2(0)
+{
+    // clear usage count for all stream types
+    for (int i = 0; i < AudioSystem::NUM_STREAM_TYPES; i++) {
+        mRefCount[i] = 0;
+        mCurVolume[i] = -1.0;
+        mMuteCount[i] = 0;
+    }
+}
+
+uint32_t AudioPolicyManagerBase::AudioOutputDescriptor::device()
+{
+    uint32_t device = 0;
+    if (isDuplicated()) {
+        device = mOutput1->mDevice | mOutput2->mDevice;
+    } else {
+        device = mDevice;
+    }
+    return device;
+}
+
+void AudioPolicyManagerBase::AudioOutputDescriptor::changeRefCount(AudioSystem::stream_type stream, int delta)
+{
+    // forward usage count change to attached outputs
+    if (isDuplicated()) {
+        mOutput1->changeRefCount(stream, delta);
+        mOutput2->changeRefCount(stream, delta);
+    }
+    if ((delta + (int)mRefCount[stream]) < 0) {
+        LOGW("changeRefCount() invalid delta %d for stream %d, refCount %d", delta, stream, mRefCount[stream]);
+        mRefCount[stream] = 0;
+        return;
+    }
+    mRefCount[stream] += delta;
+    LOGV("changeRefCount() stream %d, count %d", stream, mRefCount[stream]);
+}
+
+uint32_t AudioPolicyManagerBase::AudioOutputDescriptor::refCount()
+{
+    uint32_t refcount = 0;
+    for (int i = 0; i < (int)AudioSystem::NUM_STREAM_TYPES; i++) {
+        refcount += mRefCount[i];
+    }
+    return refcount;
+}
+
+uint32_t AudioPolicyManagerBase::AudioOutputDescriptor::strategyRefCount(routing_strategy strategy)
+{
+    uint32_t refCount = 0;
+    for (int i = 0; i < (int)AudioSystem::NUM_STREAM_TYPES; i++) {
+        if (getStrategy((AudioSystem::stream_type)i) == strategy) {
+            refCount += mRefCount[i];
+        }
+    }
+    return refCount;
+}
+
+
+status_t AudioPolicyManagerBase::AudioOutputDescriptor::dump(int fd)
+{
+    const size_t SIZE = 256;
+    char buffer[SIZE];
+    String8 result;
+
+    snprintf(buffer, SIZE, " Sampling rate: %d\n", mSamplingRate);
+    result.append(buffer);
+    snprintf(buffer, SIZE, " Format: %d\n", mFormat);
+    result.append(buffer);
+    snprintf(buffer, SIZE, " Channels: %08x\n", mChannels);
+    result.append(buffer);
+    snprintf(buffer, SIZE, " Latency: %d\n", mLatency);
+    result.append(buffer);
+    snprintf(buffer, SIZE, " Flags %08x\n", mFlags);
+    result.append(buffer);
+    snprintf(buffer, SIZE, " Devices %08x\n", device());
+    result.append(buffer);
+    snprintf(buffer, SIZE, " Stream volume refCount muteCount\n");
+    result.append(buffer);
+    for (int i = 0; i < AudioSystem::NUM_STREAM_TYPES; i++) {
+        snprintf(buffer, SIZE, " %02d     %.03f     %02d       %02d\n", i, mCurVolume[i], mRefCount[i], mMuteCount[i]);
+        result.append(buffer);
+    }
+    write(fd, result.string(), result.size());
+
+    return NO_ERROR;
+}
+
+// --- AudioInputDescriptor class implementation
+
+AudioPolicyManagerBase::AudioInputDescriptor::AudioInputDescriptor()
+    : mSamplingRate(0), mFormat(0), mChannels(0),
+     mAcoustics((AudioSystem::audio_in_acoustics)0), mDevice(0), mRefCount(0)
+{
+}
+
+status_t AudioPolicyManagerBase::AudioInputDescriptor::dump(int fd)
+{
+    const size_t SIZE = 256;
+    char buffer[SIZE];
+    String8 result;
+
+    snprintf(buffer, SIZE, " Sampling rate: %d\n", mSamplingRate);
+    result.append(buffer);
+    snprintf(buffer, SIZE, " Format: %d\n", mFormat);
+    result.append(buffer);
+    snprintf(buffer, SIZE, " Channels: %08x\n", mChannels);
+    result.append(buffer);
+    snprintf(buffer, SIZE, " Acoustics %08x\n", mAcoustics);
+    result.append(buffer);
+    snprintf(buffer, SIZE, " Devices %08x\n", mDevice);
+    result.append(buffer);
+    snprintf(buffer, SIZE, " Ref Count %d\n", mRefCount);
+    result.append(buffer);
+    write(fd, result.string(), result.size());
+
+    return NO_ERROR;
+}
+
+// --- StreamDescriptor class implementation
+
+void AudioPolicyManagerBase::StreamDescriptor::dump(char* buffer, size_t size)
+{
+    snprintf(buffer, size, "      %02d         %02d         %02d         %d\n",
+            mIndexMin,
+            mIndexMax,
+            mIndexCur,
+            mCanBeMuted);
+}
+
+
+}; // namespace android
diff --git a/libs/audioflinger/AudioPolicyService.cpp b/services/audioflinger/AudioPolicyService.cpp
similarity index 100%
rename from libs/audioflinger/AudioPolicyService.cpp
rename to services/audioflinger/AudioPolicyService.cpp
diff --git a/libs/audioflinger/AudioPolicyService.h b/services/audioflinger/AudioPolicyService.h
similarity index 100%
rename from libs/audioflinger/AudioPolicyService.h
rename to services/audioflinger/AudioPolicyService.h
diff --git a/libs/audioflinger/AudioResampler.cpp b/services/audioflinger/AudioResampler.cpp
similarity index 100%
rename from libs/audioflinger/AudioResampler.cpp
rename to services/audioflinger/AudioResampler.cpp
diff --git a/libs/audioflinger/AudioResampler.h b/services/audioflinger/AudioResampler.h
similarity index 100%
rename from libs/audioflinger/AudioResampler.h
rename to services/audioflinger/AudioResampler.h
diff --git a/libs/audioflinger/AudioResamplerCubic.cpp b/services/audioflinger/AudioResamplerCubic.cpp
similarity index 100%
rename from libs/audioflinger/AudioResamplerCubic.cpp
rename to services/audioflinger/AudioResamplerCubic.cpp
diff --git a/libs/audioflinger/AudioResamplerCubic.h b/services/audioflinger/AudioResamplerCubic.h
similarity index 100%
rename from libs/audioflinger/AudioResamplerCubic.h
rename to services/audioflinger/AudioResamplerCubic.h
diff --git a/libs/audioflinger/AudioResamplerSinc.cpp b/services/audioflinger/AudioResamplerSinc.cpp
similarity index 100%
rename from libs/audioflinger/AudioResamplerSinc.cpp
rename to services/audioflinger/AudioResamplerSinc.cpp
diff --git a/libs/audioflinger/AudioResamplerSinc.h b/services/audioflinger/AudioResamplerSinc.h
similarity index 100%
rename from libs/audioflinger/AudioResamplerSinc.h
rename to services/audioflinger/AudioResamplerSinc.h
diff --git a/services/camera/libcameraservice/Android.mk b/services/camera/libcameraservice/Android.mk
new file mode 100644
index 0000000..87975af
--- /dev/null
+++ b/services/camera/libcameraservice/Android.mk
@@ -0,0 +1,66 @@
+LOCAL_PATH:= $(call my-dir)
+
+# Set USE_CAMERA_STUB if you don't want to use the hardware camera.
+
+# force these builds to use camera stub only
+ifneq ($(filter sooner generic sim,$(TARGET_DEVICE)),)
+  USE_CAMERA_STUB:=true
+endif
+
+ifeq ($(USE_CAMERA_STUB),)
+  USE_CAMERA_STUB:=false
+endif
+
+ifeq ($(USE_CAMERA_STUB),true)
+#
+# libcamerastub
+#
+
+include $(CLEAR_VARS)
+
+LOCAL_SRC_FILES:=               \
+    CameraHardwareStub.cpp      \
+    FakeCamera.cpp
+
+LOCAL_MODULE:= libcamerastub
+
+ifeq ($(TARGET_SIMULATOR),true)
+LOCAL_CFLAGS += -DSINGLE_PROCESS
+endif
+
+LOCAL_SHARED_LIBRARIES:= libui
+
+include $(BUILD_STATIC_LIBRARY)
+endif # USE_CAMERA_STUB
+
+#
+# libcameraservice
+#
+
+include $(CLEAR_VARS)
+
+LOCAL_SRC_FILES:=               \
+    CameraService.cpp
+
+LOCAL_SHARED_LIBRARIES:= \
+    libui \
+    libutils \
+    libbinder \
+    libcutils \
+    libmedia \
+    libcamera_client \
+    libsurfaceflinger_client
+
+LOCAL_MODULE:= libcameraservice
+
+ifeq ($(TARGET_SIMULATOR),true)
+LOCAL_CFLAGS += -DSINGLE_PROCESS
+endif
+
+ifeq ($(USE_CAMERA_STUB), true)
+LOCAL_STATIC_LIBRARIES += libcamerastub
+else
+LOCAL_SHARED_LIBRARIES += libcamera 
+endif
+
+include $(BUILD_SHARED_LIBRARY)
diff --git a/services/camera/libcameraservice/CameraHardwareStub.cpp b/services/camera/libcameraservice/CameraHardwareStub.cpp
new file mode 100644
index 0000000..b3e0ee6
--- /dev/null
+++ b/services/camera/libcameraservice/CameraHardwareStub.cpp
@@ -0,0 +1,410 @@
+/*
+**
+** Copyright 2008, The Android Open Source Project
+**
+** Licensed under the Apache License, Version 2.0 (the "License");
+** you may not use this file except in compliance with the License.
+** You may obtain a copy of the License at
+**
+**     http://www.apache.org/licenses/LICENSE-2.0
+**
+** Unless required by applicable law or agreed to in writing, software
+** distributed under the License is distributed on an "AS IS" BASIS,
+** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+** See the License for the specific language governing permissions and
+** limitations under the License.
+*/
+
+#define LOG_TAG "CameraHardwareStub"
+#include <utils/Log.h>
+
+#include "CameraHardwareStub.h"
+#include <utils/threads.h>
+#include <fcntl.h>
+#include <sys/mman.h>
+
+#include "CannedJpeg.h"
+
+namespace android {
+
+CameraHardwareStub::CameraHardwareStub()
+                  : mParameters(),
+                    mPreviewHeap(0),
+                    mRawHeap(0),
+                    mFakeCamera(0),
+                    mPreviewFrameSize(0),
+                    mNotifyCb(0),
+                    mDataCb(0),
+                    mDataCbTimestamp(0),
+                    mCallbackCookie(0),
+                    mMsgEnabled(0),
+                    mCurrentPreviewFrame(0)
+{
+    initDefaultParameters();
+}
+
+void CameraHardwareStub::initDefaultParameters()
+{
+    CameraParameters p;
+
+    p.set(CameraParameters::KEY_SUPPORTED_PREVIEW_SIZES, "320x240");
+    p.setPreviewSize(320, 240);
+    p.setPreviewFrameRate(15);
+    p.setPreviewFormat(CameraParameters::PIXEL_FORMAT_YUV420SP);
+
+    p.set(CameraParameters::KEY_SUPPORTED_PICTURE_SIZES, "320x240");
+    p.setPictureSize(320, 240);
+    p.setPictureFormat(CameraParameters::PIXEL_FORMAT_JPEG);
+
+    if (setParameters(p) != NO_ERROR) {
+        LOGE("Failed to set default parameters?!");
+    }
+}
+
+void CameraHardwareStub::initHeapLocked()
+{
+    // Create raw heap.
+    int picture_width, picture_height;
+    mParameters.getPictureSize(&picture_width, &picture_height);
+    mRawHeap = new MemoryHeapBase(picture_width * picture_height * 3 / 2);
+
+    int preview_width, preview_height;
+    mParameters.getPreviewSize(&preview_width, &preview_height);
+    LOGD("initHeapLocked: preview size=%dx%d", preview_width, preview_height);
+
+    // Note that we enforce yuv420sp in setParameters().
+    int how_big = preview_width * preview_height * 3 / 2;
+
+    // If we are being reinitialized to the same size as before, no
+    // work needs to be done.
+    if (how_big == mPreviewFrameSize)
+        return;
+
+    mPreviewFrameSize = how_big;
+
+    // Make a new mmap'ed heap that can be shared across processes.
+    // use code below to test with pmem
+    mPreviewHeap = new MemoryHeapBase(mPreviewFrameSize * kBufferCount);
+    // Make an IMemory for each frame so that we can reuse them in callbacks.
+    for (int i = 0; i < kBufferCount; i++) {
+        mBuffers[i] = new MemoryBase(mPreviewHeap, i * mPreviewFrameSize, mPreviewFrameSize);
+    }
+
+    // Recreate the fake camera to reflect the current size.
+    delete mFakeCamera;
+    mFakeCamera = new FakeCamera(preview_width, preview_height);
+}
+
+CameraHardwareStub::~CameraHardwareStub()
+{
+    delete mFakeCamera;
+    mFakeCamera = 0; // paranoia
+}
+
+sp<IMemoryHeap> CameraHardwareStub::getPreviewHeap() const
+{
+    return mPreviewHeap;
+}
+
+sp<IMemoryHeap> CameraHardwareStub::getRawHeap() const
+{
+    return mRawHeap;
+}
+
+void CameraHardwareStub::setCallbacks(notify_callback notify_cb,
+                                      data_callback data_cb,
+                                      data_callback_timestamp data_cb_timestamp,
+                                      void* user)
+{
+    Mutex::Autolock lock(mLock);
+    mNotifyCb = notify_cb;
+    mDataCb = data_cb;
+    mDataCbTimestamp = data_cb_timestamp;
+    mCallbackCookie = user;
+}
+
+void CameraHardwareStub::enableMsgType(int32_t msgType)
+{
+    Mutex::Autolock lock(mLock);
+    mMsgEnabled |= msgType;
+}
+
+void CameraHardwareStub::disableMsgType(int32_t msgType)
+{
+    Mutex::Autolock lock(mLock);
+    mMsgEnabled &= ~msgType;
+}
+
+bool CameraHardwareStub::msgTypeEnabled(int32_t msgType)
+{
+    Mutex::Autolock lock(mLock);
+    return (mMsgEnabled & msgType);
+}
+
+// ---------------------------------------------------------------------------
+
+int CameraHardwareStub::previewThread()
+{
+    mLock.lock();
+        // the attributes below can change under our feet...
+
+        int previewFrameRate = mParameters.getPreviewFrameRate();
+
+        // Find the offset within the heap of the current buffer.
+        ssize_t offset = mCurrentPreviewFrame * mPreviewFrameSize;
+
+        sp<MemoryHeapBase> heap = mPreviewHeap;
+
+        // this assumes the internal state of fake camera doesn't change
+        // (or is thread safe)
+        FakeCamera* fakeCamera = mFakeCamera;
+
+        sp<MemoryBase> buffer = mBuffers[mCurrentPreviewFrame];
+
+    mLock.unlock();
+
+    // TODO: here check all the conditions that could go wrong
+    if (buffer != 0) {
+        // Calculate how long to wait between frames.
+        int delay = (int)(1000000.0f / float(previewFrameRate));
+
+        // This is always valid, even if the client died -- the memory
+        // is still mapped in our process.
+        void *base = heap->base();
+
+        // Fill the current frame with the fake camera.
+        uint8_t *frame = ((uint8_t *)base) + offset;
+        fakeCamera->getNextFrameAsYuv420(frame);
+
+        //LOGV("previewThread: generated frame to buffer %d", mCurrentPreviewFrame);
+
+        // Notify the client of a new frame.
+        if (mMsgEnabled & CAMERA_MSG_PREVIEW_FRAME)
+            mDataCb(CAMERA_MSG_PREVIEW_FRAME, buffer, mCallbackCookie);
+
+        // Advance the buffer pointer.
+        mCurrentPreviewFrame = (mCurrentPreviewFrame + 1) % kBufferCount;
+
+        // Wait for it...
+        usleep(delay);
+    }
+
+    return NO_ERROR;
+}
+
+status_t CameraHardwareStub::startPreview()
+{
+    Mutex::Autolock lock(mLock);
+    if (mPreviewThread != 0) {
+        // already running
+        return INVALID_OPERATION;
+    }
+    mPreviewThread = new PreviewThread(this);
+    return NO_ERROR;
+}
+
+void CameraHardwareStub::stopPreview()
+{
+    sp<PreviewThread> previewThread;
+
+    { // scope for the lock
+        Mutex::Autolock lock(mLock);
+        previewThread = mPreviewThread;
+    }
+
+    // don't hold the lock while waiting for the thread to quit
+    if (previewThread != 0) {
+        previewThread->requestExitAndWait();
+    }
+
+    Mutex::Autolock lock(mLock);
+    mPreviewThread.clear();
+}
+
+bool CameraHardwareStub::previewEnabled() {
+    return mPreviewThread != 0;
+}
+
+status_t CameraHardwareStub::startRecording()
+{
+    return UNKNOWN_ERROR;
+}
+
+void CameraHardwareStub::stopRecording()
+{
+}
+
+bool CameraHardwareStub::recordingEnabled()
+{
+    return false;
+}
+
+void CameraHardwareStub::releaseRecordingFrame(const sp<IMemory>& mem)
+{
+}
+
+// ---------------------------------------------------------------------------
+
+int CameraHardwareStub::beginAutoFocusThread(void *cookie)
+{
+    CameraHardwareStub *c = (CameraHardwareStub *)cookie;
+    return c->autoFocusThread();
+}
+
+int CameraHardwareStub::autoFocusThread()
+{
+    if (mMsgEnabled & CAMERA_MSG_FOCUS)
+        mNotifyCb(CAMERA_MSG_FOCUS, true, 0, mCallbackCookie);
+    return NO_ERROR;
+}
+
+status_t CameraHardwareStub::autoFocus()
+{
+    Mutex::Autolock lock(mLock);
+    if (createThread(beginAutoFocusThread, this) == false)
+        return UNKNOWN_ERROR;
+    return NO_ERROR;
+}
+
+status_t CameraHardwareStub::cancelAutoFocus()
+{
+    return NO_ERROR;
+}
+
+/*static*/ int CameraHardwareStub::beginPictureThread(void *cookie)
+{
+    CameraHardwareStub *c = (CameraHardwareStub *)cookie;
+    return c->pictureThread();
+}
+
+int CameraHardwareStub::pictureThread()
+{
+    if (mMsgEnabled & CAMERA_MSG_SHUTTER)
+        mNotifyCb(CAMERA_MSG_SHUTTER, 0, 0, mCallbackCookie);
+
+    if (mMsgEnabled & CAMERA_MSG_RAW_IMAGE) {
+        //FIXME: use a canned YUV image!
+        // In the meantime just make another fake camera picture.
+        int w, h;
+        mParameters.getPictureSize(&w, &h);
+        sp<MemoryBase> mem = new MemoryBase(mRawHeap, 0, w * h * 3 / 2);
+        FakeCamera cam(w, h);
+        cam.getNextFrameAsYuv420((uint8_t *)mRawHeap->base());
+        mDataCb(CAMERA_MSG_RAW_IMAGE, mem, mCallbackCookie);
+    }
+
+    if (mMsgEnabled & CAMERA_MSG_COMPRESSED_IMAGE) {
+        sp<MemoryHeapBase> heap = new MemoryHeapBase(kCannedJpegSize);
+        sp<MemoryBase> mem = new MemoryBase(heap, 0, kCannedJpegSize);
+        memcpy(heap->base(), kCannedJpeg, kCannedJpegSize);
+        mDataCb(CAMERA_MSG_COMPRESSED_IMAGE, mem, mCallbackCookie);
+    }
+    return NO_ERROR;
+}
+
+status_t CameraHardwareStub::takePicture()
+{
+    stopPreview();
+    if (createThread(beginPictureThread, this) == false)
+        return UNKNOWN_ERROR;
+    return NO_ERROR;
+}
+
+status_t CameraHardwareStub::cancelPicture()
+{
+    return NO_ERROR;
+}
+
+status_t CameraHardwareStub::dump(int fd, const Vector<String16>& args) const
+{
+    const size_t SIZE = 256;
+    char buffer[SIZE];
+    String8 result;
+    AutoMutex lock(&mLock);
+    if (mFakeCamera != 0) {
+        mFakeCamera->dump(fd);
+        mParameters.dump(fd, args);
+        snprintf(buffer, 255, " preview frame(%d), size (%d), running(%s)\n", mCurrentPreviewFrame, mPreviewFrameSize, mPreviewRunning?"true": "false");
+        result.append(buffer);
+    } else {
+        result.append("No camera client yet.\n");
+    }
+    write(fd, result.string(), result.size());
+    return NO_ERROR;
+}
+
+status_t CameraHardwareStub::setParameters(const CameraParameters& params)
+{
+    Mutex::Autolock lock(mLock);
+    // XXX verify params
+
+    if (strcmp(params.getPreviewFormat(),
+        CameraParameters::PIXEL_FORMAT_YUV420SP) != 0) {
+        LOGE("Only yuv420sp preview is supported");
+        return -1;
+    }
+
+    if (strcmp(params.getPictureFormat(),
+        CameraParameters::PIXEL_FORMAT_JPEG) != 0) {
+        LOGE("Only jpeg still pictures are supported");
+        return -1;
+    }
+
+    int w, h;
+    params.getPictureSize(&w, &h);
+    if (w != kCannedJpegWidth && h != kCannedJpegHeight) {
+        LOGE("Still picture size must be size of canned JPEG (%dx%d)",
+             kCannedJpegWidth, kCannedJpegHeight);
+        return -1;
+    }
+
+    mParameters = params;
+    initHeapLocked();
+
+    return NO_ERROR;
+}
+
+CameraParameters CameraHardwareStub::getParameters() const
+{
+    Mutex::Autolock lock(mLock);
+    return mParameters;
+}
+
+status_t CameraHardwareStub::sendCommand(int32_t command, int32_t arg1,
+                                         int32_t arg2)
+{
+    return BAD_VALUE;
+}
+
+void CameraHardwareStub::release()
+{
+}
+
+sp<CameraHardwareInterface> CameraHardwareStub::createInstance()
+{
+    return new CameraHardwareStub();
+}
+
+static CameraInfo sCameraInfo[] = {
+    {
+        CAMERA_FACING_BACK,
+        90,  /* orientation */
+    }
+};
+
+extern "C" int HAL_getNumberOfCameras()
+{
+    return sizeof(sCameraInfo) / sizeof(sCameraInfo[0]);
+}
+
+extern "C" void HAL_getCameraInfo(int cameraId, struct CameraInfo* cameraInfo)
+{
+    memcpy(cameraInfo, &sCameraInfo[cameraId], sizeof(CameraInfo));
+}
+
+extern "C" sp<CameraHardwareInterface> HAL_openCameraHardware(int cameraId)
+{
+    return CameraHardwareStub::createInstance();
+}
+
+}; // namespace android
diff --git a/services/camera/libcameraservice/CameraHardwareStub.h b/services/camera/libcameraservice/CameraHardwareStub.h
new file mode 100644
index 0000000..d3427ba
--- /dev/null
+++ b/services/camera/libcameraservice/CameraHardwareStub.h
@@ -0,0 +1,133 @@
+/*
+**
+** Copyright 2008, The Android Open Source Project
+**
+** Licensed under the Apache License, Version 2.0 (the "License");
+** you may not use this file except in compliance with the License.
+** You may obtain a copy of the License at
+**
+**     http://www.apache.org/licenses/LICENSE-2.0
+**
+** Unless required by applicable law or agreed to in writing, software
+** distributed under the License is distributed on an "AS IS" BASIS,
+** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+** See the License for the specific language governing permissions and
+** limitations under the License.
+*/
+
+#ifndef ANDROID_HARDWARE_CAMERA_HARDWARE_STUB_H
+#define ANDROID_HARDWARE_CAMERA_HARDWARE_STUB_H
+
+#include "FakeCamera.h"
+#include <utils/threads.h>
+#include <camera/CameraHardwareInterface.h>
+#include <binder/MemoryBase.h>
+#include <binder/MemoryHeapBase.h>
+#include <utils/threads.h>
+
+namespace android {
+
+class CameraHardwareStub : public CameraHardwareInterface {
+public:
+    virtual sp<IMemoryHeap> getPreviewHeap() const;
+    virtual sp<IMemoryHeap> getRawHeap() const;
+
+    virtual void        setCallbacks(notify_callback notify_cb,
+                                     data_callback data_cb,
+                                     data_callback_timestamp data_cb_timestamp,
+                                     void* user);
+
+    virtual void        enableMsgType(int32_t msgType);
+    virtual void        disableMsgType(int32_t msgType);
+    virtual bool        msgTypeEnabled(int32_t msgType);
+
+    virtual status_t    startPreview();
+    virtual void        stopPreview();
+    virtual bool        previewEnabled();
+
+    virtual status_t    startRecording();
+    virtual void        stopRecording();
+    virtual bool        recordingEnabled();
+    virtual void        releaseRecordingFrame(const sp<IMemory>& mem);
+
+    virtual status_t    autoFocus();
+    virtual status_t    cancelAutoFocus();
+    virtual status_t    takePicture();
+    virtual status_t    cancelPicture();
+    virtual status_t    dump(int fd, const Vector<String16>& args) const;
+    virtual status_t    setParameters(const CameraParameters& params);
+    virtual CameraParameters  getParameters() const;
+    virtual status_t    sendCommand(int32_t command, int32_t arg1,
+                                    int32_t arg2);
+    virtual void release();
+
+    static sp<CameraHardwareInterface> createInstance();
+
+private:
+                        CameraHardwareStub();
+    virtual             ~CameraHardwareStub();
+
+    static const int kBufferCount = 4;
+
+    class PreviewThread : public Thread {
+        CameraHardwareStub* mHardware;
+    public:
+        PreviewThread(CameraHardwareStub* hw) :
+#ifdef SINGLE_PROCESS
+            // In single process mode this thread needs to be a java thread,
+            // since we won't be calling through the binder.
+            Thread(true),
+#else
+            Thread(false),
+#endif
+              mHardware(hw) { }
+        virtual void onFirstRef() {
+            run("CameraPreviewThread", PRIORITY_URGENT_DISPLAY);
+        }
+        virtual bool threadLoop() {
+            mHardware->previewThread();
+            // loop until we need to quit
+            return true;
+        }
+    };
+
+    void initDefaultParameters();
+    void initHeapLocked();
+
+    int previewThread();
+
+    static int beginAutoFocusThread(void *cookie);
+    int autoFocusThread();
+
+    static int beginPictureThread(void *cookie);
+    int pictureThread();
+
+    mutable Mutex       mLock;
+
+    CameraParameters    mParameters;
+
+    sp<MemoryHeapBase>  mPreviewHeap;
+    sp<MemoryHeapBase>  mRawHeap;
+    sp<MemoryBase>      mBuffers[kBufferCount];
+
+    FakeCamera          *mFakeCamera;
+    bool                mPreviewRunning;
+    int                 mPreviewFrameSize;
+
+    // protected by mLock
+    sp<PreviewThread>   mPreviewThread;
+
+    notify_callback    mNotifyCb;
+    data_callback      mDataCb;
+    data_callback_timestamp mDataCbTimestamp;
+    void               *mCallbackCookie;
+
+    int32_t             mMsgEnabled;
+
+    // only used from PreviewThread
+    int                 mCurrentPreviewFrame;
+};
+
+}; // namespace android
+
+#endif
diff --git a/services/camera/libcameraservice/CameraService.cpp b/services/camera/libcameraservice/CameraService.cpp
new file mode 100644
index 0000000..c786f94
--- /dev/null
+++ b/services/camera/libcameraservice/CameraService.cpp
@@ -0,0 +1,1268 @@
+/*
+**
+** Copyright (C) 2008, The Android Open Source Project
+** Copyright (C) 2008 HTC Inc.
+**
+** Licensed under the Apache License, Version 2.0 (the "License");
+** you may not use this file except in compliance with the License.
+** You may obtain a copy of the License at
+**
+**     http://www.apache.org/licenses/LICENSE-2.0
+**
+** Unless required by applicable law or agreed to in writing, software
+** distributed under the License is distributed on an "AS IS" BASIS,
+** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+** See the License for the specific language governing permissions and
+** limitations under the License.
+*/
+
+#define LOG_TAG "CameraService"
+
+#include <stdio.h>
+#include <sys/types.h>
+#include <pthread.h>
+
+#include <binder/IPCThreadState.h>
+#include <binder/IServiceManager.h>
+#include <binder/MemoryBase.h>
+#include <binder/MemoryHeapBase.h>
+#include <cutils/atomic.h>
+#include <hardware/hardware.h>
+#include <media/AudioSystem.h>
+#include <media/mediaplayer.h>
+#include <surfaceflinger/ISurface.h>
+#include <ui/Overlay.h>
+#include <utils/Errors.h>
+#include <utils/Log.h>
+#include <utils/String16.h>
+
+#include "CameraService.h"
+
+namespace android {
+
+// ----------------------------------------------------------------------------
+// Logging support -- this is for debugging only
+// Use "adb shell dumpsys media.camera -v 1" to change it.
+static volatile int32_t gLogLevel = 0;
+
+#define LOG1(...) LOGD_IF(gLogLevel >= 1, __VA_ARGS__);
+#define LOG2(...) LOGD_IF(gLogLevel >= 2, __VA_ARGS__);
+
+static void setLogLevel(int level) {
+    android_atomic_write(level, &gLogLevel);
+}
+
+// ----------------------------------------------------------------------------
+
+static int getCallingPid() {
+    return IPCThreadState::self()->getCallingPid();
+}
+
+static int getCallingUid() {
+    return IPCThreadState::self()->getCallingUid();
+}
+
+// ----------------------------------------------------------------------------
+
+// This is ugly and only safe if we never re-create the CameraService, but
+// should be ok for now.
+static CameraService *gCameraService;
+
+CameraService::CameraService()
+:mSoundRef(0)
+{
+    LOGI("CameraService started (pid=%d)", getpid());
+
+    mNumberOfCameras = HAL_getNumberOfCameras();
+    if (mNumberOfCameras > MAX_CAMERAS) {
+        LOGE("Number of cameras(%d) > MAX_CAMERAS(%d).",
+             mNumberOfCameras, MAX_CAMERAS);
+        mNumberOfCameras = MAX_CAMERAS;
+    }
+
+    for (int i = 0; i < mNumberOfCameras; i++) {
+        setCameraFree(i);
+    }
+
+    gCameraService = this;
+}
+
+CameraService::~CameraService() {
+    for (int i = 0; i < mNumberOfCameras; i++) {
+        if (mBusy[i]) {
+            LOGE("camera %d is still in use in destructor!", i);
+        }
+    }
+
+    gCameraService = NULL;
+}
+
+int32_t CameraService::getNumberOfCameras() {
+    return mNumberOfCameras;
+}
+
+status_t CameraService::getCameraInfo(int cameraId,
+                                      struct CameraInfo* cameraInfo) {
+    if (cameraId < 0 || cameraId >= mNumberOfCameras) {
+        return BAD_VALUE;
+    }
+
+    HAL_getCameraInfo(cameraId, cameraInfo);
+    return OK;
+}
+
+sp<ICamera> CameraService::connect(
+        const sp<ICameraClient>& cameraClient, int cameraId) {
+    int callingPid = getCallingPid();
+    LOG1("CameraService::connect E (pid %d, id %d)", callingPid, cameraId);
+
+    sp<Client> client;
+    if (cameraId < 0 || cameraId >= mNumberOfCameras) {
+        LOGE("CameraService::connect X (pid %d) rejected (invalid cameraId %d).",
+            callingPid, cameraId);
+        return NULL;
+    }
+
+    Mutex::Autolock lock(mServiceLock);
+    if (mClient[cameraId] != 0) {
+        client = mClient[cameraId].promote();
+        if (client != 0) {
+            if (cameraClient->asBinder() == client->getCameraClient()->asBinder()) {
+                LOG1("CameraService::connect X (pid %d) (the same client)",
+                    callingPid);
+                return client;
+            } else {
+                LOGW("CameraService::connect X (pid %d) rejected (existing client).",
+                    callingPid);
+                return NULL;
+            }
+        }
+        mClient[cameraId].clear();
+    }
+
+    if (mBusy[cameraId]) {
+        LOGW("CameraService::connect X (pid %d) rejected"
+             " (camera %d is still busy).", callingPid, cameraId);
+        return NULL;
+    }
+
+    client = new Client(this, cameraClient, cameraId, callingPid);
+    mClient[cameraId] = client;
+    LOG1("CameraService::connect X");
+    return client;
+}
+
+void CameraService::removeClient(const sp<ICameraClient>& cameraClient) {
+    int callingPid = getCallingPid();
+    LOG1("CameraService::removeClient E (pid %d)", callingPid);
+
+    for (int i = 0; i < mNumberOfCameras; i++) {
+        // Declare this before the lock to make absolutely sure the
+        // destructor won't be called with the lock held.
+        sp<Client> client;
+
+        Mutex::Autolock lock(mServiceLock);
+
+        // This happens when we have already disconnected (or this is
+        // just another unused camera).
+        if (mClient[i] == 0) continue;
+
+        // Promote mClient. It can fail if we are called from this path:
+        // Client::~Client() -> disconnect() -> removeClient().
+        client = mClient[i].promote();
+
+        if (client == 0) {
+            mClient[i].clear();
+            continue;
+        }
+
+        if (cameraClient->asBinder() == client->getCameraClient()->asBinder()) {
+            // Found our camera, clear and leave.
+            LOG1("removeClient: clear camera %d", i);
+            mClient[i].clear();
+            break;
+        }
+    }
+
+    LOG1("CameraService::removeClient X (pid %d)", callingPid);
+}
+
+sp<CameraService::Client> CameraService::getClientById(int cameraId) {
+    if (cameraId < 0 || cameraId >= mNumberOfCameras) return NULL;
+    return mClient[cameraId].promote();
+}
+
+status_t CameraService::onTransact(
+    uint32_t code, const Parcel& data, Parcel* reply, uint32_t flags) {
+    // Permission checks
+    switch (code) {
+        case BnCameraService::CONNECT:
+            const int pid = getCallingPid();
+            const int self_pid = getpid();
+            if (pid != self_pid) {
+                // we're called from a different process, do the real check
+                if (!checkCallingPermission(
+                        String16("android.permission.CAMERA"))) {
+                    const int uid = getCallingUid();
+                    LOGE("Permission Denial: "
+                         "can't use the camera pid=%d, uid=%d", pid, uid);
+                    return PERMISSION_DENIED;
+                }
+            }
+            break;
+    }
+
+    return BnCameraService::onTransact(code, data, reply, flags);
+}
+
+// The reason we need this busy bit is a new CameraService::connect() request
+// may come in while the previous Client's destructor has not been run or is
+// still running. If the last strong reference of the previous Client is gone
+// but the destructor has not been finished, we should not allow the new Client
+// to be created because we need to wait for the previous Client to tear down
+// the hardware first.
+void CameraService::setCameraBusy(int cameraId) {
+    android_atomic_write(1, &mBusy[cameraId]);
+}
+
+void CameraService::setCameraFree(int cameraId) {
+    android_atomic_write(0, &mBusy[cameraId]);
+}
+
+// We share the media players for shutter and recording sound for all clients.
+// A reference count is kept to determine when we will actually release the
+// media players.
+
+static MediaPlayer* newMediaPlayer(const char *file) {
+    MediaPlayer* mp = new MediaPlayer();
+    if (mp->setDataSource(file, NULL) == NO_ERROR) {
+        mp->setAudioStreamType(AudioSystem::ENFORCED_AUDIBLE);
+        mp->prepare();
+    } else {
+        LOGE("Failed to load CameraService sounds: %s", file);
+        return NULL;
+    }
+    return mp;
+}
+
+void CameraService::loadSound() {
+    Mutex::Autolock lock(mSoundLock);
+    LOG1("CameraService::loadSound ref=%d", mSoundRef);
+    if (mSoundRef++) return;
+
+    mSoundPlayer[SOUND_SHUTTER] = newMediaPlayer("/system/media/audio/ui/camera_click.ogg");
+    mSoundPlayer[SOUND_RECORDING] = newMediaPlayer("/system/media/audio/ui/VideoRecord.ogg");
+}
+
+void CameraService::releaseSound() {
+    Mutex::Autolock lock(mSoundLock);
+    LOG1("CameraService::releaseSound ref=%d", mSoundRef);
+    if (--mSoundRef) return;
+
+    for (int i = 0; i < NUM_SOUNDS; i++) {
+        if (mSoundPlayer[i] != 0) {
+            mSoundPlayer[i]->disconnect();
+            mSoundPlayer[i].clear();
+        }
+    }
+}
+
+void CameraService::playSound(sound_kind kind) {
+    LOG1("playSound(%d)", kind);
+    Mutex::Autolock lock(mSoundLock);
+    sp<MediaPlayer> player = mSoundPlayer[kind];
+    if (player != 0) {
+        // do not play the sound if stream volume is 0
+        // (typically because ringer mode is silent).
+        int index;
+        AudioSystem::getStreamVolumeIndex(AudioSystem::ENFORCED_AUDIBLE, &index);
+        if (index != 0) {
+            player->seekTo(0);
+            player->start();
+        }
+    }
+}
+
+// ----------------------------------------------------------------------------
+
+CameraService::Client::Client(const sp<CameraService>& cameraService,
+        const sp<ICameraClient>& cameraClient, int cameraId, int clientPid) {
+    int callingPid = getCallingPid();
+    LOG1("Client::Client E (pid %d)", callingPid);
+
+    mCameraService = cameraService;
+    mCameraClient = cameraClient;
+    mCameraId = cameraId;
+    mClientPid = clientPid;
+
+    mHardware = HAL_openCameraHardware(cameraId);
+    mUseOverlay = mHardware->useOverlay();
+    mMsgEnabled = 0;
+
+    mHardware->setCallbacks(notifyCallback,
+                            dataCallback,
+                            dataCallbackTimestamp,
+                            (void *)cameraId);
+
+    // Enable zoom, error, and focus messages by default
+    enableMsgType(CAMERA_MSG_ERROR |
+                  CAMERA_MSG_ZOOM |
+                  CAMERA_MSG_FOCUS);
+    mOverlayW = 0;
+    mOverlayH = 0;
+
+    // Callback is disabled by default
+    mPreviewCallbackFlag = FRAME_CALLBACK_FLAG_NOOP;
+    mOrientation = 0;
+    cameraService->setCameraBusy(cameraId);
+    cameraService->loadSound();
+    LOG1("Client::Client X (pid %d)", callingPid);
+}
+
+static void *unregister_surface(void *arg) {
+    ISurface *surface = (ISurface *)arg;
+    surface->unregisterBuffers();
+    IPCThreadState::self()->flushCommands();
+    return NULL;
+}
+
+// tear down the client
+CameraService::Client::~Client() {
+    int callingPid = getCallingPid();
+    LOG1("Client::~Client E (pid %d, this %p)", callingPid, this);
+
+    if (mSurface != 0 && !mUseOverlay) {
+        pthread_t thr;
+        // We unregister the buffers in a different thread because binder does
+        // not let us make sychronous transactions in a binder destructor (that
+        // is, upon our reaching a refcount of zero.)
+        pthread_create(&thr,
+                       NULL,  // attr
+                       unregister_surface,
+                       mSurface.get());
+        pthread_join(thr, NULL);
+    }
+
+    // set mClientPid to let disconnet() tear down the hardware
+    mClientPid = callingPid;
+    disconnect();
+    mCameraService->releaseSound();
+    LOG1("Client::~Client X (pid %d, this %p)", callingPid, this);
+}
+
+// ----------------------------------------------------------------------------
+
+status_t CameraService::Client::checkPid() const {
+    int callingPid = getCallingPid();
+    if (callingPid == mClientPid) return NO_ERROR;
+
+    LOGW("attempt to use a locked camera from a different process"
+         " (old pid %d, new pid %d)", mClientPid, callingPid);
+    return EBUSY;
+}
+
+status_t CameraService::Client::checkPidAndHardware() const {
+    status_t result = checkPid();
+    if (result != NO_ERROR) return result;
+    if (mHardware == 0) {
+        LOGE("attempt to use a camera after disconnect() (pid %d)", getCallingPid());
+        return INVALID_OPERATION;
+    }
+    return NO_ERROR;
+}
+
+status_t CameraService::Client::lock() {
+    int callingPid = getCallingPid();
+    LOG1("lock (pid %d)", callingPid);
+    Mutex::Autolock lock(mLock);
+
+    // lock camera to this client if the the camera is unlocked
+    if (mClientPid == 0) {
+        mClientPid = callingPid;
+        return NO_ERROR;
+    }
+
+    // returns NO_ERROR if the client already owns the camera, EBUSY otherwise
+    return checkPid();
+}
+
+status_t CameraService::Client::unlock() {
+    int callingPid = getCallingPid();
+    LOG1("unlock (pid %d)", callingPid);
+    Mutex::Autolock lock(mLock);
+
+    // allow anyone to use camera (after they lock the camera)
+    status_t result = checkPid();
+    if (result == NO_ERROR) {
+        mClientPid = 0;
+        LOG1("clear mCameraClient (pid %d)", callingPid);
+        // we need to remove the reference to ICameraClient so that when the app
+        // goes away, the reference count goes to 0.
+        mCameraClient.clear();
+    }
+    return result;
+}
+
+// connect a new client to the camera
+status_t CameraService::Client::connect(const sp<ICameraClient>& client) {
+    int callingPid = getCallingPid();
+    LOG1("connect E (pid %d)", callingPid);
+    Mutex::Autolock lock(mLock);
+
+    if (mClientPid != 0 && checkPid() != NO_ERROR) {
+        LOGW("Tried to connect to a locked camera (old pid %d, new pid %d)",
+                mClientPid, callingPid);
+        return EBUSY;
+    }
+
+    if (mCameraClient != 0 && (client->asBinder() == mCameraClient->asBinder())) {
+        LOG1("Connect to the same client");
+        return NO_ERROR;
+    }
+
+    mPreviewCallbackFlag = FRAME_CALLBACK_FLAG_NOOP;
+    mClientPid = callingPid;
+    mCameraClient = client;
+
+    LOG1("connect X (pid %d)", callingPid);
+    return NO_ERROR;
+}
+
+void CameraService::Client::disconnect() {
+    int callingPid = getCallingPid();
+    LOG1("disconnect E (pid %d)", callingPid);
+    Mutex::Autolock lock(mLock);
+
+    if (checkPid() != NO_ERROR) {
+        LOGW("different client - don't disconnect");
+        return;
+    }
+
+    if (mClientPid <= 0) {
+        LOG1("camera is unlocked (mClientPid = %d), don't tear down hardware", mClientPid);
+        return;
+    }
+
+    // Make sure disconnect() is done once and once only, whether it is called
+    // from the user directly, or called by the destructor.
+    if (mHardware == 0) return;
+
+    LOG1("hardware teardown");
+    // Before destroying mHardware, we must make sure it's in the
+    // idle state.
+    // Turn off all messages.
+    disableMsgType(CAMERA_MSG_ALL_MSGS);
+    mHardware->stopPreview();
+    mHardware->cancelPicture();
+    // Release the hardware resources.
+    mHardware->release();
+    // Release the held overlay resources.
+    if (mUseOverlay) {
+        mOverlayRef = 0;
+    }
+    mHardware.clear();
+
+    mCameraService->removeClient(mCameraClient);
+    mCameraService->setCameraFree(mCameraId);
+
+    LOG1("disconnect X (pid %d)", callingPid);
+}
+
+// ----------------------------------------------------------------------------
+
+// set the ISurface that the preview will use
+status_t CameraService::Client::setPreviewDisplay(const sp<ISurface>& surface) {
+    LOG1("setPreviewDisplay(%p) (pid %d)", surface.get(), getCallingPid());
+    Mutex::Autolock lock(mLock);
+    status_t result = checkPidAndHardware();
+    if (result != NO_ERROR) return result;
+
+    result = NO_ERROR;
+
+    // return if no change in surface.
+    // asBinder() is safe on NULL (returns NULL)
+    if (surface->asBinder() == mSurface->asBinder()) {
+        return result;
+    }
+
+    if (mSurface != 0) {
+        LOG1("clearing old preview surface %p", mSurface.get());
+        if (mUseOverlay) {
+            // Force the destruction of any previous overlay
+            sp<Overlay> dummy;
+            mHardware->setOverlay(dummy);
+        } else {
+            mSurface->unregisterBuffers();
+        }
+    }
+    mSurface = surface;
+    mOverlayRef = 0;
+    // If preview has been already started, set overlay or register preview
+    // buffers now.
+    if (mHardware->previewEnabled()) {
+        if (mUseOverlay) {
+            result = setOverlay();
+        } else if (mSurface != 0) {
+            result = registerPreviewBuffers();
+        }
+    }
+
+    return result;
+}
+
+status_t CameraService::Client::registerPreviewBuffers() {
+    int w, h;
+    CameraParameters params(mHardware->getParameters());
+    params.getPreviewSize(&w, &h);
+
+    // FIXME: don't use a hardcoded format here.
+    ISurface::BufferHeap buffers(w, h, w, h,
+                                 HAL_PIXEL_FORMAT_YCrCb_420_SP,
+                                 mOrientation,
+                                 0,
+                                 mHardware->getPreviewHeap());
+
+    status_t result = mSurface->registerBuffers(buffers);
+    if (result != NO_ERROR) {
+        LOGE("registerBuffers failed with status %d", result);
+    }
+    return result;
+}
+
+status_t CameraService::Client::setOverlay() {
+    int w, h;
+    CameraParameters params(mHardware->getParameters());
+    params.getPreviewSize(&w, &h);
+
+    if (w != mOverlayW || h != mOverlayH) {
+        // Force the destruction of any previous overlay
+        sp<Overlay> dummy;
+        mHardware->setOverlay(dummy);
+        mOverlayRef = 0;
+    }
+
+    status_t result = NO_ERROR;
+    if (mSurface == 0) {
+        result = mHardware->setOverlay(NULL);
+    } else {
+        if (mOverlayRef == 0) {
+            // FIXME:
+            // Surfaceflinger may hold onto the previous overlay reference for some
+            // time after we try to destroy it. retry a few times. In the future, we
+            // should make the destroy call block, or possibly specify that we can
+            // wait in the createOverlay call if the previous overlay is in the
+            // process of being destroyed.
+            for (int retry = 0; retry < 50; ++retry) {
+                mOverlayRef = mSurface->createOverlay(w, h, OVERLAY_FORMAT_DEFAULT,
+                                                      mOrientation);
+                if (mOverlayRef != 0) break;
+                LOGW("Overlay create failed - retrying");
+                usleep(20000);
+            }
+            if (mOverlayRef == 0) {
+                LOGE("Overlay Creation Failed!");
+                return -EINVAL;
+            }
+            result = mHardware->setOverlay(new Overlay(mOverlayRef));
+        }
+    }
+    if (result != NO_ERROR) {
+        LOGE("mHardware->setOverlay() failed with status %d\n", result);
+        return result;
+    }
+
+    mOverlayW = w;
+    mOverlayH = h;
+
+    return result;
+}
+
+// set the preview callback flag to affect how the received frames from
+// preview are handled.
+void CameraService::Client::setPreviewCallbackFlag(int callback_flag) {
+    LOG1("setPreviewCallbackFlag(%d) (pid %d)", callback_flag, getCallingPid());
+    Mutex::Autolock lock(mLock);
+    if (checkPidAndHardware() != NO_ERROR) return;
+
+    mPreviewCallbackFlag = callback_flag;
+
+    // If we don't use overlay, we always need the preview frame for display.
+    // If we do use overlay, we only need the preview frame if the user
+    // wants the data.
+    if (mUseOverlay) {
+        if(mPreviewCallbackFlag & FRAME_CALLBACK_FLAG_ENABLE_MASK) {
+            enableMsgType(CAMERA_MSG_PREVIEW_FRAME);
+        } else {
+            disableMsgType(CAMERA_MSG_PREVIEW_FRAME);
+        }
+    }
+}
+
+// start preview mode
+status_t CameraService::Client::startPreview() {
+    LOG1("startPreview (pid %d)", getCallingPid());
+    return startCameraMode(CAMERA_PREVIEW_MODE);
+}
+
+// start recording mode
+status_t CameraService::Client::startRecording() {
+    LOG1("startRecording (pid %d)", getCallingPid());
+    return startCameraMode(CAMERA_RECORDING_MODE);
+}
+
+// start preview or recording
+status_t CameraService::Client::startCameraMode(camera_mode mode) {
+    LOG1("startCameraMode(%d)", mode);
+    Mutex::Autolock lock(mLock);
+    status_t result = checkPidAndHardware();
+    if (result != NO_ERROR) return result;
+
+    switch(mode) {
+        case CAMERA_PREVIEW_MODE:
+            if (mSurface == 0) {
+                LOG1("mSurface is not set yet.");
+                // still able to start preview in this case.
+            }
+            return startPreviewMode();
+        case CAMERA_RECORDING_MODE:
+            if (mSurface == 0) {
+                LOGE("mSurface must be set before startRecordingMode.");
+                return INVALID_OPERATION;
+            }
+            return startRecordingMode();
+        default:
+            return UNKNOWN_ERROR;
+    }
+}
+
+status_t CameraService::Client::startPreviewMode() {
+    LOG1("startPreviewMode");
+    status_t result = NO_ERROR;
+
+    // if preview has been enabled, nothing needs to be done
+    if (mHardware->previewEnabled()) {
+        return NO_ERROR;
+    }
+
+    if (mUseOverlay) {
+        // If preview display has been set, set overlay now.
+        if (mSurface != 0) {
+            result = setOverlay();
+        }
+        if (result != NO_ERROR) return result;
+        result = mHardware->startPreview();
+    } else {
+        enableMsgType(CAMERA_MSG_PREVIEW_FRAME);
+        result = mHardware->startPreview();
+        if (result != NO_ERROR) return result;
+        // If preview display has been set, register preview buffers now.
+        if (mSurface != 0) {
+           // Unregister here because the surface may be previously registered
+           // with the raw (snapshot) heap.
+           mSurface->unregisterBuffers();
+           result = registerPreviewBuffers();
+        }
+    }
+    return result;
+}
+
+status_t CameraService::Client::startRecordingMode() {
+    LOG1("startRecordingMode");
+    status_t result = NO_ERROR;
+
+    // if recording has been enabled, nothing needs to be done
+    if (mHardware->recordingEnabled()) {
+        return NO_ERROR;
+    }
+
+    // if preview has not been started, start preview first
+    if (!mHardware->previewEnabled()) {
+        result = startPreviewMode();
+        if (result != NO_ERROR) {
+            return result;
+        }
+    }
+
+    // start recording mode
+    enableMsgType(CAMERA_MSG_VIDEO_FRAME);
+    mCameraService->playSound(SOUND_RECORDING);
+    result = mHardware->startRecording();
+    if (result != NO_ERROR) {
+        LOGE("mHardware->startRecording() failed with status %d", result);
+    }
+    return result;
+}
+
+// stop preview mode
+void CameraService::Client::stopPreview() {
+    LOG1("stopPreview (pid %d)", getCallingPid());
+    Mutex::Autolock lock(mLock);
+    if (checkPidAndHardware() != NO_ERROR) return;
+
+    disableMsgType(CAMERA_MSG_PREVIEW_FRAME);
+    mHardware->stopPreview();
+
+    if (mSurface != 0 && !mUseOverlay) {
+        mSurface->unregisterBuffers();
+    }
+
+    mPreviewBuffer.clear();
+}
+
+// stop recording mode
+void CameraService::Client::stopRecording() {
+    LOG1("stopRecording (pid %d)", getCallingPid());
+    Mutex::Autolock lock(mLock);
+    if (checkPidAndHardware() != NO_ERROR) return;
+
+    mCameraService->playSound(SOUND_RECORDING);
+    disableMsgType(CAMERA_MSG_VIDEO_FRAME);
+    mHardware->stopRecording();
+
+    mPreviewBuffer.clear();
+}
+
+// release a recording frame
+void CameraService::Client::releaseRecordingFrame(const sp<IMemory>& mem) {
+    Mutex::Autolock lock(mLock);
+    if (checkPidAndHardware() != NO_ERROR) return;
+    mHardware->releaseRecordingFrame(mem);
+}
+
+bool CameraService::Client::previewEnabled() {
+    LOG1("previewEnabled (pid %d)", getCallingPid());
+
+    Mutex::Autolock lock(mLock);
+    if (checkPidAndHardware() != NO_ERROR) return false;
+    return mHardware->previewEnabled();
+}
+
+bool CameraService::Client::recordingEnabled() {
+    LOG1("recordingEnabled (pid %d)", getCallingPid());
+
+    Mutex::Autolock lock(mLock);
+    if (checkPidAndHardware() != NO_ERROR) return false;
+    return mHardware->recordingEnabled();
+}
+
+status_t CameraService::Client::autoFocus() {
+    LOG1("autoFocus (pid %d)", getCallingPid());
+
+    Mutex::Autolock lock(mLock);
+    status_t result = checkPidAndHardware();
+    if (result != NO_ERROR) return result;
+
+    return mHardware->autoFocus();
+}
+
+status_t CameraService::Client::cancelAutoFocus() {
+    LOG1("cancelAutoFocus (pid %d)", getCallingPid());
+
+    Mutex::Autolock lock(mLock);
+    status_t result = checkPidAndHardware();
+    if (result != NO_ERROR) return result;
+
+    return mHardware->cancelAutoFocus();
+}
+
+// take a picture - image is returned in callback
+status_t CameraService::Client::takePicture() {
+    LOG1("takePicture (pid %d)", getCallingPid());
+
+    Mutex::Autolock lock(mLock);
+    status_t result = checkPidAndHardware();
+    if (result != NO_ERROR) return result;
+
+    enableMsgType(CAMERA_MSG_SHUTTER |
+                  CAMERA_MSG_POSTVIEW_FRAME |
+                  CAMERA_MSG_RAW_IMAGE |
+                  CAMERA_MSG_COMPRESSED_IMAGE);
+
+    return mHardware->takePicture();
+}
+
+// set preview/capture parameters - key/value pairs
+status_t CameraService::Client::setParameters(const String8& params) {
+    LOG1("setParameters (pid %d) (%s)", getCallingPid(), params.string());
+
+    Mutex::Autolock lock(mLock);
+    status_t result = checkPidAndHardware();
+    if (result != NO_ERROR) return result;
+
+    CameraParameters p(params);
+    return mHardware->setParameters(p);
+}
+
+// get preview/capture parameters - key/value pairs
+String8 CameraService::Client::getParameters() const {
+    Mutex::Autolock lock(mLock);
+    if (checkPidAndHardware() != NO_ERROR) return String8();
+
+    String8 params(mHardware->getParameters().flatten());
+    LOG1("getParameters (pid %d) (%s)", getCallingPid(), params.string());
+    return params;
+}
+
+status_t CameraService::Client::sendCommand(int32_t cmd, int32_t arg1, int32_t arg2) {
+    LOG1("sendCommand (pid %d)", getCallingPid());
+    Mutex::Autolock lock(mLock);
+    status_t result = checkPidAndHardware();
+    if (result != NO_ERROR) return result;
+
+    if (cmd == CAMERA_CMD_SET_DISPLAY_ORIENTATION) {
+        // The orientation cannot be set during preview.
+        if (mHardware->previewEnabled()) {
+            return INVALID_OPERATION;
+        }
+        switch (arg1) {
+            case 0:
+                mOrientation = ISurface::BufferHeap::ROT_0;
+                break;
+            case 90:
+                mOrientation = ISurface::BufferHeap::ROT_90;
+                break;
+            case 180:
+                mOrientation = ISurface::BufferHeap::ROT_180;
+                break;
+            case 270:
+                mOrientation = ISurface::BufferHeap::ROT_270;
+                break;
+            default:
+                return BAD_VALUE;
+        }
+        return OK;
+    }
+
+    return mHardware->sendCommand(cmd, arg1, arg2);
+}
+
+// ----------------------------------------------------------------------------
+
+void CameraService::Client::enableMsgType(int32_t msgType) {
+    android_atomic_or(msgType, &mMsgEnabled);
+    mHardware->enableMsgType(msgType);
+}
+
+void CameraService::Client::disableMsgType(int32_t msgType) {
+    android_atomic_and(~msgType, &mMsgEnabled);
+    mHardware->disableMsgType(msgType);
+}
+
+#define CHECK_MESSAGE_INTERVAL 10 // 10ms
+bool CameraService::Client::lockIfMessageWanted(int32_t msgType) {
+    int sleepCount = 0;
+    while (mMsgEnabled & msgType) {
+        if (mLock.tryLock() == NO_ERROR) {
+            if (sleepCount > 0) {
+                LOG1("lockIfMessageWanted(%d): waited for %d ms",
+                    msgType, sleepCount * CHECK_MESSAGE_INTERVAL);
+            }
+            return true;
+        }
+        if (sleepCount++ == 0) {
+            LOG1("lockIfMessageWanted(%d): enter sleep", msgType);
+        }
+        usleep(CHECK_MESSAGE_INTERVAL * 1000);
+    }
+    LOGW("lockIfMessageWanted(%d): dropped unwanted message", msgType);
+    return false;
+}
+
+// ----------------------------------------------------------------------------
+
+// Converts from a raw pointer to the client to a strong pointer during a
+// hardware callback. This requires the callbacks only happen when the client
+// is still alive.
+sp<CameraService::Client> CameraService::Client::getClientFromCookie(void* user) {
+    sp<Client> client = gCameraService->getClientById((int) user);
+
+    // This could happen if the Client is in the process of shutting down (the
+    // last strong reference is gone, but the destructor hasn't finished
+    // stopping the hardware).
+    if (client == 0) return NULL;
+
+    // The checks below are not necessary and are for debugging only.
+    if (client->mCameraService.get() != gCameraService) {
+        LOGE("mismatch service!");
+        return NULL;
+    }
+
+    if (client->mHardware == 0) {
+        LOGE("mHardware == 0: callback after disconnect()?");
+        return NULL;
+    }
+
+    return client;
+}
+
+// Callback messages can be dispatched to internal handlers or pass to our
+// client's callback functions, depending on the message type.
+//
+// notifyCallback:
+//      CAMERA_MSG_SHUTTER              handleShutter
+//      (others)                        c->notifyCallback
+// dataCallback:
+//      CAMERA_MSG_PREVIEW_FRAME        handlePreviewData
+//      CAMERA_MSG_POSTVIEW_FRAME       handlePostview
+//      CAMERA_MSG_RAW_IMAGE            handleRawPicture
+//      CAMERA_MSG_COMPRESSED_IMAGE     handleCompressedPicture
+//      (others)                        c->dataCallback
+// dataCallbackTimestamp
+//      (others)                        c->dataCallbackTimestamp
+//
+// NOTE: the *Callback functions grab mLock of the client before passing
+// control to handle* functions. So the handle* functions must release the
+// lock before calling the ICameraClient's callbacks, so those callbacks can
+// invoke methods in the Client class again (For example, the preview frame
+// callback may want to releaseRecordingFrame). The handle* functions must
+// release the lock after all accesses to member variables, so it must be
+// handled very carefully.
+
+void CameraService::Client::notifyCallback(int32_t msgType, int32_t ext1,
+        int32_t ext2, void* user) {
+    LOG2("notifyCallback(%d)", msgType);
+
+    sp<Client> client = getClientFromCookie(user);
+    if (client == 0) return;
+    if (!client->lockIfMessageWanted(msgType)) return;
+
+    switch (msgType) {
+        case CAMERA_MSG_SHUTTER:
+            // ext1 is the dimension of the yuv picture.
+            client->handleShutter((image_rect_type *)ext1);
+            break;
+        default:
+            client->handleGenericNotify(msgType, ext1, ext2);
+            break;
+    }
+}
+
+void CameraService::Client::dataCallback(int32_t msgType,
+        const sp<IMemory>& dataPtr, void* user) {
+    LOG2("dataCallback(%d)", msgType);
+
+    sp<Client> client = getClientFromCookie(user);
+    if (client == 0) return;
+    if (!client->lockIfMessageWanted(msgType)) return;
+
+    if (dataPtr == 0) {
+        LOGE("Null data returned in data callback");
+        client->handleGenericNotify(CAMERA_MSG_ERROR, UNKNOWN_ERROR, 0);
+        return;
+    }
+
+    switch (msgType) {
+        case CAMERA_MSG_PREVIEW_FRAME:
+            client->handlePreviewData(dataPtr);
+            break;
+        case CAMERA_MSG_POSTVIEW_FRAME:
+            client->handlePostview(dataPtr);
+            break;
+        case CAMERA_MSG_RAW_IMAGE:
+            client->handleRawPicture(dataPtr);
+            break;
+        case CAMERA_MSG_COMPRESSED_IMAGE:
+            client->handleCompressedPicture(dataPtr);
+            break;
+        default:
+            client->handleGenericData(msgType, dataPtr);
+            break;
+    }
+}
+
+void CameraService::Client::dataCallbackTimestamp(nsecs_t timestamp,
+        int32_t msgType, const sp<IMemory>& dataPtr, void* user) {
+    LOG2("dataCallbackTimestamp(%d)", msgType);
+
+    sp<Client> client = getClientFromCookie(user);
+    if (client == 0) return;
+    if (!client->lockIfMessageWanted(msgType)) return;
+
+    if (dataPtr == 0) {
+        LOGE("Null data returned in data with timestamp callback");
+        client->handleGenericNotify(CAMERA_MSG_ERROR, UNKNOWN_ERROR, 0);
+        return;
+    }
+
+    client->handleGenericDataTimestamp(timestamp, msgType, dataPtr);
+}
+
+// snapshot taken callback
+// "size" is the width and height of yuv picture for registerBuffer.
+// If it is NULL, use the picture size from parameters.
+void CameraService::Client::handleShutter(image_rect_type *size) {
+    mCameraService->playSound(SOUND_SHUTTER);
+
+    // Screen goes black after the buffer is unregistered.
+    if (mSurface != 0 && !mUseOverlay) {
+        mSurface->unregisterBuffers();
+    }
+
+    sp<ICameraClient> c = mCameraClient;
+    if (c != 0) {
+        mLock.unlock();
+        c->notifyCallback(CAMERA_MSG_SHUTTER, 0, 0);
+        if (!lockIfMessageWanted(CAMERA_MSG_SHUTTER)) return;
+    }
+    disableMsgType(CAMERA_MSG_SHUTTER);
+
+    // It takes some time before yuvPicture callback to be called.
+    // Register the buffer for raw image here to reduce latency.
+    if (mSurface != 0 && !mUseOverlay) {
+        int w, h;
+        CameraParameters params(mHardware->getParameters());
+        if (size == NULL) {
+            params.getPictureSize(&w, &h);
+        } else {
+            w = size->width;
+            h = size->height;
+            w &= ~1;
+            h &= ~1;
+            LOG1("Snapshot image width=%d, height=%d", w, h);
+        }
+        // FIXME: don't use hardcoded format constants here
+        ISurface::BufferHeap buffers(w, h, w, h,
+            HAL_PIXEL_FORMAT_YCrCb_420_SP, mOrientation, 0,
+            mHardware->getRawHeap());
+
+        mSurface->registerBuffers(buffers);
+        IPCThreadState::self()->flushCommands();
+    }
+
+    mLock.unlock();
+}
+
+// preview callback - frame buffer update
+void CameraService::Client::handlePreviewData(const sp<IMemory>& mem) {
+    ssize_t offset;
+    size_t size;
+    sp<IMemoryHeap> heap = mem->getMemory(&offset, &size);
+
+    if (!mUseOverlay) {
+        if (mSurface != 0) {
+            mSurface->postBuffer(offset);
+        }
+    }
+
+    // local copy of the callback flags
+    int flags = mPreviewCallbackFlag;
+
+    // is callback enabled?
+    if (!(flags & FRAME_CALLBACK_FLAG_ENABLE_MASK)) {
+        // If the enable bit is off, the copy-out and one-shot bits are ignored
+        LOG2("frame callback is disabled");
+        mLock.unlock();
+        return;
+    }
+
+    // hold a strong pointer to the client
+    sp<ICameraClient> c = mCameraClient;
+
+    // clear callback flags if no client or one-shot mode
+    if (c == 0 || (mPreviewCallbackFlag & FRAME_CALLBACK_FLAG_ONE_SHOT_MASK)) {
+        LOG2("Disable preview callback");
+        mPreviewCallbackFlag &= ~(FRAME_CALLBACK_FLAG_ONE_SHOT_MASK |
+                                  FRAME_CALLBACK_FLAG_COPY_OUT_MASK |
+                                  FRAME_CALLBACK_FLAG_ENABLE_MASK);
+        if (mUseOverlay) {
+            disableMsgType(CAMERA_MSG_PREVIEW_FRAME);
+        }
+    }
+
+    if (c != 0) {
+        // Is the received frame copied out or not?
+        if (flags & FRAME_CALLBACK_FLAG_COPY_OUT_MASK) {
+            LOG2("frame is copied");
+            copyFrameAndPostCopiedFrame(c, heap, offset, size);
+        } else {
+            LOG2("frame is forwarded");
+            mLock.unlock();
+            c->dataCallback(CAMERA_MSG_PREVIEW_FRAME, mem);
+        }
+    } else {
+        mLock.unlock();
+    }
+}
+
+// picture callback - postview image ready
+void CameraService::Client::handlePostview(const sp<IMemory>& mem) {
+    disableMsgType(CAMERA_MSG_POSTVIEW_FRAME);
+
+    sp<ICameraClient> c = mCameraClient;
+    mLock.unlock();
+    if (c != 0) {
+        c->dataCallback(CAMERA_MSG_POSTVIEW_FRAME, mem);
+    }
+}
+
+// picture callback - raw image ready
+void CameraService::Client::handleRawPicture(const sp<IMemory>& mem) {
+    disableMsgType(CAMERA_MSG_RAW_IMAGE);
+
+    ssize_t offset;
+    size_t size;
+    sp<IMemoryHeap> heap = mem->getMemory(&offset, &size);
+
+    // Put the YUV version of the snapshot in the preview display.
+    if (mSurface != 0 && !mUseOverlay) {
+        mSurface->postBuffer(offset);
+    }
+
+    sp<ICameraClient> c = mCameraClient;
+    mLock.unlock();
+    if (c != 0) {
+        c->dataCallback(CAMERA_MSG_RAW_IMAGE, mem);
+    }
+}
+
+// picture callback - compressed picture ready
+void CameraService::Client::handleCompressedPicture(const sp<IMemory>& mem) {
+    disableMsgType(CAMERA_MSG_COMPRESSED_IMAGE);
+
+    sp<ICameraClient> c = mCameraClient;
+    mLock.unlock();
+    if (c != 0) {
+        c->dataCallback(CAMERA_MSG_COMPRESSED_IMAGE, mem);
+    }
+}
+
+
+void CameraService::Client::handleGenericNotify(int32_t msgType,
+    int32_t ext1, int32_t ext2) {
+    sp<ICameraClient> c = mCameraClient;
+    mLock.unlock();
+    if (c != 0) {
+        c->notifyCallback(msgType, ext1, ext2);
+    }
+}
+
+void CameraService::Client::handleGenericData(int32_t msgType,
+    const sp<IMemory>& dataPtr) {
+    sp<ICameraClient> c = mCameraClient;
+    mLock.unlock();
+    if (c != 0) {
+        c->dataCallback(msgType, dataPtr);
+    }
+}
+
+void CameraService::Client::handleGenericDataTimestamp(nsecs_t timestamp,
+    int32_t msgType, const sp<IMemory>& dataPtr) {
+    sp<ICameraClient> c = mCameraClient;
+    mLock.unlock();
+    if (c != 0) {
+        c->dataCallbackTimestamp(timestamp, msgType, dataPtr);
+    }
+}
+
+void CameraService::Client::copyFrameAndPostCopiedFrame(
+        const sp<ICameraClient>& client, const sp<IMemoryHeap>& heap,
+        size_t offset, size_t size) {
+    LOG2("copyFrameAndPostCopiedFrame");
+    // It is necessary to copy out of pmem before sending this to
+    // the callback. For efficiency, reuse the same MemoryHeapBase
+    // provided it's big enough. Don't allocate the memory or
+    // perform the copy if there's no callback.
+    // hold the preview lock while we grab a reference to the preview buffer
+    sp<MemoryHeapBase> previewBuffer;
+
+    if (mPreviewBuffer == 0) {
+        mPreviewBuffer = new MemoryHeapBase(size, 0, NULL);
+    } else if (size > mPreviewBuffer->virtualSize()) {
+        mPreviewBuffer.clear();
+        mPreviewBuffer = new MemoryHeapBase(size, 0, NULL);
+    }
+    if (mPreviewBuffer == 0) {
+        LOGE("failed to allocate space for preview buffer");
+        mLock.unlock();
+        return;
+    }
+    previewBuffer = mPreviewBuffer;
+
+    memcpy(previewBuffer->base(), (uint8_t *)heap->base() + offset, size);
+
+    sp<MemoryBase> frame = new MemoryBase(previewBuffer, 0, size);
+    if (frame == 0) {
+        LOGE("failed to allocate space for frame callback");
+        mLock.unlock();
+        return;
+    }
+
+    mLock.unlock();
+    client->dataCallback(CAMERA_MSG_PREVIEW_FRAME, frame);
+}
+
+// ----------------------------------------------------------------------------
+
+static const int kDumpLockRetries = 50;
+static const int kDumpLockSleep = 60000;
+
+static bool tryLock(Mutex& mutex)
+{
+    bool locked = false;
+    for (int i = 0; i < kDumpLockRetries; ++i) {
+        if (mutex.tryLock() == NO_ERROR) {
+            locked = true;
+            break;
+        }
+        usleep(kDumpLockSleep);
+    }
+    return locked;
+}
+
+status_t CameraService::dump(int fd, const Vector<String16>& args) {
+    static const char* kDeadlockedString = "CameraService may be deadlocked\n";
+
+    const size_t SIZE = 256;
+    char buffer[SIZE];
+    String8 result;
+    if (checkCallingPermission(String16("android.permission.DUMP")) == false) {
+        snprintf(buffer, SIZE, "Permission Denial: "
+                "can't dump CameraService from pid=%d, uid=%d\n",
+                getCallingPid(),
+                getCallingUid());
+        result.append(buffer);
+        write(fd, result.string(), result.size());
+    } else {
+        bool locked = tryLock(mServiceLock);
+        // failed to lock - CameraService is probably deadlocked
+        if (!locked) {
+            String8 result(kDeadlockedString);
+            write(fd, result.string(), result.size());
+        }
+
+        bool hasClient = false;
+        for (int i = 0; i < mNumberOfCameras; i++) {
+            sp<Client> client = mClient[i].promote();
+            if (client == 0) continue;
+            hasClient = true;
+            sprintf(buffer, "Client[%d] (%p) PID: %d\n",
+                    i,
+                    client->getCameraClient()->asBinder().get(),
+                    client->mClientPid);
+            result.append(buffer);
+            write(fd, result.string(), result.size());
+            client->mHardware->dump(fd, args);
+        }
+        if (!hasClient) {
+            result.append("No camera client yet.\n");
+            write(fd, result.string(), result.size());
+        }
+
+        if (locked) mServiceLock.unlock();
+
+        // change logging level
+        int n = args.size();
+        for (int i = 0; i + 1 < n; i++) {
+            if (args[i] == String16("-v")) {
+                String8 levelStr(args[i+1]);
+                int level = atoi(levelStr.string());
+                sprintf(buffer, "Set Log Level to %d", level);
+                result.append(buffer);
+                setLogLevel(level);
+            }
+        }
+    }
+    return NO_ERROR;
+}
+
+}; // namespace android
diff --git a/services/camera/libcameraservice/CameraService.h b/services/camera/libcameraservice/CameraService.h
new file mode 100644
index 0000000..b0b2d7a
--- /dev/null
+++ b/services/camera/libcameraservice/CameraService.h
@@ -0,0 +1,199 @@
+/*
+**
+** Copyright (C) 2008, The Android Open Source Project
+** Copyright (C) 2008 HTC Inc.
+**
+** Licensed under the Apache License, Version 2.0 (the "License");
+** you may not use this file except in compliance with the License.
+** You may obtain a copy of the License at
+**
+**     http://www.apache.org/licenses/LICENSE-2.0
+**
+** Unless required by applicable law or agreed to in writing, software
+** distributed under the License is distributed on an "AS IS" BASIS,
+** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+** See the License for the specific language governing permissions and
+** limitations under the License.
+*/
+
+#ifndef ANDROID_SERVERS_CAMERA_CAMERASERVICE_H
+#define ANDROID_SERVERS_CAMERA_CAMERASERVICE_H
+
+#include <binder/BinderService.h>
+
+#include <camera/ICameraService.h>
+#include <camera/CameraHardwareInterface.h>
+
+/* This needs to be increased if we can have more cameras */
+#define MAX_CAMERAS 2
+
+namespace android {
+
+class MemoryHeapBase;
+class MediaPlayer;
+
+class CameraService :
+    public BinderService<CameraService>,
+    public BnCameraService
+{
+    class Client;
+    friend class BinderService<CameraService>;
+public:
+    static char const* getServiceName() { return "media.camera"; }
+
+                        CameraService();
+    virtual             ~CameraService();
+
+    virtual int32_t     getNumberOfCameras();
+    virtual status_t    getCameraInfo(int cameraId,
+                                      struct CameraInfo* cameraInfo);
+    virtual sp<ICamera> connect(const sp<ICameraClient>& cameraClient, int cameraId);
+    virtual void        removeClient(const sp<ICameraClient>& cameraClient);
+    virtual sp<Client>  getClientById(int cameraId);
+
+    virtual status_t    dump(int fd, const Vector<String16>& args);
+    virtual status_t    onTransact(uint32_t code, const Parcel& data,
+                                   Parcel* reply, uint32_t flags);
+
+    enum sound_kind {
+        SOUND_SHUTTER = 0,
+        SOUND_RECORDING = 1,
+        NUM_SOUNDS
+    };
+
+    void                loadSound();
+    void                playSound(sound_kind kind);
+    void                releaseSound();
+
+private:
+    Mutex               mServiceLock;
+    wp<Client>          mClient[MAX_CAMERAS];  // protected by mServiceLock
+    int                 mNumberOfCameras;
+
+    // atomics to record whether the hardware is allocated to some client.
+    volatile int32_t    mBusy[MAX_CAMERAS];
+    void                setCameraBusy(int cameraId);
+    void                setCameraFree(int cameraId);
+
+    // sounds
+    Mutex               mSoundLock;
+    sp<MediaPlayer>     mSoundPlayer[NUM_SOUNDS];
+    int                 mSoundRef;  // reference count (release all MediaPlayer when 0)
+
+    class Client : public BnCamera
+    {
+    public:
+        // ICamera interface (see ICamera for details)
+        virtual void            disconnect();
+        virtual status_t        connect(const sp<ICameraClient>& client);
+        virtual status_t        lock();
+        virtual status_t        unlock();
+        virtual status_t        setPreviewDisplay(const sp<ISurface>& surface);
+        virtual void            setPreviewCallbackFlag(int flag);
+        virtual status_t        startPreview();
+        virtual void            stopPreview();
+        virtual bool            previewEnabled();
+        virtual status_t        startRecording();
+        virtual void            stopRecording();
+        virtual bool            recordingEnabled();
+        virtual void            releaseRecordingFrame(const sp<IMemory>& mem);
+        virtual status_t        autoFocus();
+        virtual status_t        cancelAutoFocus();
+        virtual status_t        takePicture();
+        virtual status_t        setParameters(const String8& params);
+        virtual String8         getParameters() const;
+        virtual status_t        sendCommand(int32_t cmd, int32_t arg1, int32_t arg2);
+    private:
+        friend class CameraService;
+                                Client(const sp<CameraService>& cameraService,
+                                       const sp<ICameraClient>& cameraClient,
+                                       int cameraId,
+                                       int clientPid);
+                                ~Client();
+
+        // return our camera client
+        const sp<ICameraClient>&    getCameraClient() { return mCameraClient; }
+
+        // check whether the calling process matches mClientPid.
+        status_t                checkPid() const;
+        status_t                checkPidAndHardware() const;  // also check mHardware != 0
+
+        // these are internal functions used to set up preview buffers
+        status_t                registerPreviewBuffers();
+        status_t                setOverlay();
+
+        // camera operation mode
+        enum camera_mode {
+            CAMERA_PREVIEW_MODE   = 0,  // frame automatically released
+            CAMERA_RECORDING_MODE = 1,  // frame has to be explicitly released by releaseRecordingFrame()
+        };
+        // these are internal functions used for preview/recording
+        status_t                startCameraMode(camera_mode mode);
+        status_t                startPreviewMode();
+        status_t                startRecordingMode();
+
+        // these are static callback functions
+        static void             notifyCallback(int32_t msgType, int32_t ext1, int32_t ext2, void* user);
+        static void             dataCallback(int32_t msgType, const sp<IMemory>& dataPtr, void* user);
+        static void             dataCallbackTimestamp(nsecs_t timestamp, int32_t msgType, const sp<IMemory>& dataPtr, void* user);
+        // convert client from cookie
+        static sp<Client>       getClientFromCookie(void* user);
+        // handlers for messages
+        void                    handleShutter(image_rect_type *size);
+        void                    handlePreviewData(const sp<IMemory>& mem);
+        void                    handlePostview(const sp<IMemory>& mem);
+        void                    handleRawPicture(const sp<IMemory>& mem);
+        void                    handleCompressedPicture(const sp<IMemory>& mem);
+        void                    handleGenericNotify(int32_t msgType, int32_t ext1, int32_t ext2);
+        void                    handleGenericData(int32_t msgType, const sp<IMemory>& dataPtr);
+        void                    handleGenericDataTimestamp(nsecs_t timestamp, int32_t msgType, const sp<IMemory>& dataPtr);
+
+        void                    copyFrameAndPostCopiedFrame(
+                                    const sp<ICameraClient>& client,
+                                    const sp<IMemoryHeap>& heap,
+                                    size_t offset, size_t size);
+
+        // these are initialized in the constructor.
+        sp<CameraService>               mCameraService;  // immutable after constructor
+        sp<ICameraClient>               mCameraClient;
+        int                             mCameraId;       // immutable after constructor
+        pid_t                           mClientPid;
+        sp<CameraHardwareInterface>     mHardware;       // cleared after disconnect()
+        bool                            mUseOverlay;     // immutable after constructor
+        sp<OverlayRef>                  mOverlayRef;
+        int                             mOverlayW;
+        int                             mOverlayH;
+        int                             mPreviewCallbackFlag;
+        int                             mOrientation;
+
+        // Ensures atomicity among the public methods
+        mutable Mutex                   mLock;
+        sp<ISurface>                    mSurface;
+
+        // If the user want us to return a copy of the preview frame (instead
+        // of the original one), we allocate mPreviewBuffer and reuse it if possible.
+        sp<MemoryHeapBase>              mPreviewBuffer;
+
+        // We need to avoid the deadlock when the incoming command thread and
+        // the CameraHardwareInterface callback thread both want to grab mLock.
+        // An extra flag is used to tell the callback thread that it should stop
+        // trying to deliver the callback messages if the client is not
+        // interested in it anymore. For example, if the client is calling
+        // stopPreview(), the preview frame messages do not need to be delivered
+        // anymore.
+
+        // This function takes the same parameter as the enableMsgType() and
+        // disableMsgType() functions in CameraHardwareInterface.
+        void                    enableMsgType(int32_t msgType);
+        void                    disableMsgType(int32_t msgType);
+        volatile int32_t        mMsgEnabled;
+
+        // This function keeps trying to grab mLock, or give up if the message
+        // is found to be disabled. It returns true if mLock is grabbed.
+        bool                    lockIfMessageWanted(int32_t msgType);
+    };
+};
+
+} // namespace android
+
+#endif
diff --git a/camera/libcameraservice/CannedJpeg.h b/services/camera/libcameraservice/CannedJpeg.h
similarity index 100%
rename from camera/libcameraservice/CannedJpeg.h
rename to services/camera/libcameraservice/CannedJpeg.h
diff --git a/services/camera/libcameraservice/FakeCamera.cpp b/services/camera/libcameraservice/FakeCamera.cpp
new file mode 100644
index 0000000..f3a6a67
--- /dev/null
+++ b/services/camera/libcameraservice/FakeCamera.cpp
@@ -0,0 +1,433 @@
+/*
+**
+** Copyright 2008, The Android Open Source Project
+**
+** Licensed under the Apache License, Version 2.0 (the "License"); 
+** you may not use this file except in compliance with the License. 
+** You may obtain a copy of the License at 
+**
+**     http://www.apache.org/licenses/LICENSE-2.0 
+**
+** Unless required by applicable law or agreed to in writing, software 
+** distributed under the License is distributed on an "AS IS" BASIS, 
+** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 
+** See the License for the specific language governing permissions and 
+** limitations under the License.
+*/
+
+#define LOG_TAG "FakeCamera"
+#include <utils/Log.h>
+
+#include <string.h>
+#include <stdlib.h>
+#include <utils/String8.h>
+
+#include "FakeCamera.h"
+
+
+namespace android {
+
+// TODO: All this rgb to yuv should probably be in a util class.
+
+// TODO: I think something is wrong in this class because the shadow is kBlue
+// and the square color should alternate between kRed and kGreen. However on the
+// emulator screen these are all shades of gray. Y seems ok but the U and V are
+// probably not.
+
+static int tables_initialized = 0;
+uint8_t *gYTable, *gCbTable, *gCrTable;
+
+static int
+clamp(int  x)
+{
+    if (x > 255) return 255;
+    if (x < 0)   return 0;
+    return x;
+}
+
+/* the equation used by the video code to translate YUV to RGB looks like this
+ *
+ *    Y  = (Y0 - 16)*k0
+ *    Cb = Cb0 - 128
+ *    Cr = Cr0 - 128
+ *
+ *    G = ( Y - k1*Cr - k2*Cb )
+ *    R = ( Y + k3*Cr )
+ *    B = ( Y + k4*Cb )
+ *
+ */
+
+static const double  k0 = 1.164;
+static const double  k1 = 0.813;
+static const double  k2 = 0.391;
+static const double  k3 = 1.596;
+static const double  k4 = 2.018;
+
+/* let's try to extract the value of Y
+ *
+ *   G + k1/k3*R + k2/k4*B = Y*( 1 + k1/k3 + k2/k4 )
+ *
+ *   Y  = ( G + k1/k3*R + k2/k4*B ) / (1 + k1/k3 + k2/k4)
+ *   Y0 = ( G0 + k1/k3*R0 + k2/k4*B0 ) / ((1 + k1/k3 + k2/k4)*k0) + 16
+ *
+ * let define:
+ *   kYr = k1/k3
+ *   kYb = k2/k4
+ *   kYy = k0 * ( 1 + kYr + kYb )
+ *
+ * we have:
+ *    Y  = ( G + kYr*R + kYb*B )
+ *    Y0 = clamp[ Y/kYy + 16 ]
+ */
+
+static const double kYr = k1/k3;
+static const double kYb = k2/k4;
+static const double kYy = k0*( 1. + kYr + kYb );
+
+static void
+initYtab( void )
+{
+    const  int imax = (int)( (kYr + kYb)*(31 << 2) + (61 << 3) + 0.1 );
+    int    i;
+
+    gYTable = (uint8_t *)malloc(imax);
+
+    for(i=0; i<imax; i++) {
+        int  x = (int)(i/kYy + 16.5);
+        if (x < 16) x = 16;
+        else if (x > 235) x = 235;
+        gYTable[i] = (uint8_t) x;
+    }
+}
+
+/*
+ *   the source is RGB565, so adjust for 8-bit range of input values:
+ *
+ *   G = (pixels >> 3) & 0xFC;
+ *   R = (pixels >> 8) & 0xF8;
+ *   B = (pixels & 0x1f) << 3;
+ *
+ *   R2 = (pixels >> 11)      R = R2*8
+ *   B2 = (pixels & 0x1f)     B = B2*8
+ *
+ *   kYr*R = kYr2*R2 =>  kYr2 = kYr*8
+ *   kYb*B = kYb2*B2 =>  kYb2 = kYb*8
+ *
+ *   we want to use integer multiplications:
+ *
+ *   SHIFT1 = 9
+ *
+ *   (ALPHA*R2) >> SHIFT1 == R*kYr  =>  ALPHA = kYr*8*(1 << SHIFT1)
+ *
+ *   ALPHA = kYr*(1 << (SHIFT1+3))
+ *   BETA  = kYb*(1 << (SHIFT1+3))
+ */
+
+static const int  SHIFT1  = 9;
+static const int  ALPHA   = (int)( kYr*(1 << (SHIFT1+3)) + 0.5 );
+static const int  BETA    = (int)( kYb*(1 << (SHIFT1+3)) + 0.5 );
+
+/*
+ *  now let's try to get the values of Cb and Cr
+ *
+ *  R-B = (k3*Cr - k4*Cb)
+ *
+ *    k3*Cr = k4*Cb + (R-B)
+ *    k4*Cb = k3*Cr - (R-B)
+ *
+ *  R-G = (k1+k3)*Cr + k2*Cb
+ *      = (k1+k3)*Cr + k2/k4*(k3*Cr - (R-B)/k0)
+ *      = (k1 + k3 + k2*k3/k4)*Cr - k2/k4*(R-B)
+ *
+ *  kRr*Cr = (R-G) + kYb*(R-B)
+ *
+ *  Cr  = ((R-G) + kYb*(R-B))/kRr
+ *  Cr0 = clamp(Cr + 128)
+ */
+
+static const double  kRr = (k1 + k3 + k2*k3/k4);
+
+static void
+initCrtab( void )
+{
+    uint8_t *pTable;
+    int i;
+
+    gCrTable = (uint8_t *)malloc(768*2);
+
+    pTable = gCrTable + 384;
+    for(i=-384; i<384; i++)
+        pTable[i] = (uint8_t) clamp( i/kRr + 128.5 );
+}
+
+/*
+ *  B-G = (k2 + k4)*Cb + k1*Cr
+ *      = (k2 + k4)*Cb + k1/k3*(k4*Cb + (R-B))
+ *      = (k2 + k4 + k1*k4/k3)*Cb + k1/k3*(R-B)
+ *
+ *  kBb*Cb = (B-G) - kYr*(R-B)
+ *
+ *  Cb   = ((B-G) - kYr*(R-B))/kBb
+ *  Cb0  = clamp(Cb + 128)
+ *
+ */
+
+static const double  kBb = (k2 + k4 + k1*k4/k3);
+
+static void
+initCbtab( void )
+{
+    uint8_t *pTable;
+    int i;
+
+    gCbTable = (uint8_t *)malloc(768*2);
+
+    pTable = gCbTable + 384;
+    for(i=-384; i<384; i++)
+        pTable[i] = (uint8_t) clamp( i/kBb + 128.5 );
+}
+
+/*
+ *   SHIFT2 = 16
+ *
+ *   DELTA = kYb*(1 << SHIFT2)
+ *   GAMMA = kYr*(1 << SHIFT2)
+ */
+
+static const int  SHIFT2 = 16;
+static const int  DELTA  = kYb*(1 << SHIFT2);
+static const int  GAMMA  = kYr*(1 << SHIFT2);
+
+int32_t ccrgb16toyuv_wo_colorkey(uint8_t *rgb16, uint8_t *yuv420,
+        uint32_t *param, uint8_t *table[])
+{
+    uint16_t *inputRGB = (uint16_t*)rgb16;
+    uint8_t *outYUV = yuv420;
+    int32_t width_dst = param[0];
+    int32_t height_dst = param[1];
+    int32_t pitch_dst = param[2];
+    int32_t mheight_dst = param[3];
+    int32_t pitch_src = param[4];
+    uint8_t *y_tab = table[0];
+    uint8_t *cb_tab = table[1];
+    uint8_t *cr_tab = table[2];
+
+    int32_t size16 = pitch_dst*mheight_dst;
+    int32_t i,j,count;
+    int32_t ilimit,jlimit;
+    uint8_t *tempY,*tempU,*tempV;
+    uint16_t pixels;
+    int   tmp;
+uint32_t temp;
+
+    tempY = outYUV;
+    tempU = outYUV + (height_dst * pitch_dst);
+    tempV = tempU + 1;
+
+    jlimit = height_dst;
+    ilimit = width_dst;
+
+    for(j=0; j<jlimit; j+=1)
+    {
+        for (i=0; i<ilimit; i+=2)
+        {
+            int32_t   G_ds = 0, B_ds = 0, R_ds = 0;
+            uint8_t   y0, y1, u, v;
+
+            pixels =  inputRGB[i];
+            temp = (BETA*(pixels & 0x001F) + ALPHA*(pixels>>11) );
+            y0   = y_tab[(temp>>SHIFT1) + ((pixels>>3) & 0x00FC)];
+
+            G_ds    += (pixels>>1) & 0x03E0;
+            B_ds    += (pixels<<5) & 0x03E0;
+            R_ds    += (pixels>>6) & 0x03E0;
+
+            pixels =  inputRGB[i+1];
+            temp = (BETA*(pixels & 0x001F) + ALPHA*(pixels>>11) );
+            y1   = y_tab[(temp>>SHIFT1) + ((pixels>>3) & 0x00FC)];
+
+            G_ds    += (pixels>>1) & 0x03E0;
+            B_ds    += (pixels<<5) & 0x03E0;
+            R_ds    += (pixels>>6) & 0x03E0;
+
+            R_ds >>= 1;
+            B_ds >>= 1;
+            G_ds >>= 1;
+
+            tmp = R_ds - B_ds;
+
+            u = cb_tab[(((B_ds-G_ds)<<SHIFT2) - GAMMA*tmp)>>(SHIFT2+2)];
+            v = cr_tab[(((R_ds-G_ds)<<SHIFT2) + DELTA*tmp)>>(SHIFT2+2)];
+
+            tempY[0] = y0;
+            tempY[1] = y1;
+            tempY += 2;
+
+            if ((j&1) == 0) {
+                tempU[0] = u;
+                tempV[0] = v;
+                tempU += 2;
+                tempV += 2;
+            }
+        }
+
+        inputRGB += pitch_src;
+    }
+
+    return 1;
+}
+
+#define min(a,b) ((a)<(b)?(a):(b))
+#define max(a,b) ((a)>(b)?(a):(b))
+
+static void convert_rgb16_to_yuv420(uint8_t *rgb, uint8_t *yuv, int width, int height)
+{
+    if (!tables_initialized) {
+        initYtab();
+        initCrtab();
+        initCbtab();
+        tables_initialized = 1;
+    }
+
+    uint32_t param[6];
+    param[0] = (uint32_t) width;
+    param[1] = (uint32_t) height;
+    param[2] = (uint32_t) width;
+    param[3] = (uint32_t) height;
+    param[4] = (uint32_t) width;
+    param[5] = (uint32_t) 0;
+
+    uint8_t *table[3];
+    table[0] = gYTable;
+    table[1] = gCbTable + 384;
+    table[2] = gCrTable + 384;
+
+    ccrgb16toyuv_wo_colorkey(rgb, yuv, param, table);
+}
+
+const int FakeCamera::kRed;
+const int FakeCamera::kGreen;
+const int FakeCamera::kBlue;
+
+FakeCamera::FakeCamera(int width, int height)
+          : mTmpRgb16Buffer(0)
+{
+    setSize(width, height);
+}
+
+FakeCamera::~FakeCamera()
+{
+    delete[] mTmpRgb16Buffer;
+}
+
+void FakeCamera::setSize(int width, int height)
+{
+    mWidth = width;
+    mHeight = height;
+    mCounter = 0;
+    mCheckX = 0;
+    mCheckY = 0;
+
+    // This will cause it to be reallocated on the next call
+    // to getNextFrameAsYuv420().
+    delete[] mTmpRgb16Buffer;
+    mTmpRgb16Buffer = 0;
+}
+
+void FakeCamera::getNextFrameAsRgb565(uint16_t *buffer)
+{
+    int size = mWidth / 10;
+
+    drawCheckerboard(buffer, size);
+
+    int x = ((mCounter*3)&255);
+    if(x>128) x = 255 - x;
+    int y = ((mCounter*5)&255);
+    if(y>128) y = 255 - y;
+
+    drawSquare(buffer, x*size/32, y*size/32, (size*5)>>1, (mCounter&0x100)?kRed:kGreen, kBlue);
+
+    mCounter++;
+}
+
+void FakeCamera::getNextFrameAsYuv420(uint8_t *buffer)
+{
+    if (mTmpRgb16Buffer == 0)
+        mTmpRgb16Buffer = new uint16_t[mWidth * mHeight];
+
+    getNextFrameAsRgb565(mTmpRgb16Buffer);
+    convert_rgb16_to_yuv420((uint8_t*)mTmpRgb16Buffer, buffer, mWidth, mHeight);
+}
+
+void FakeCamera::drawSquare(uint16_t *dst, int x, int y, int size, int color, int shadow)
+{
+    int square_xstop, square_ystop, shadow_xstop, shadow_ystop;
+
+    square_xstop = min(mWidth, x+size);
+    square_ystop = min(mHeight, y+size);
+    shadow_xstop = min(mWidth, x+size+(size/4));
+    shadow_ystop = min(mHeight, y+size+(size/4));
+
+    // Do the shadow.
+    uint16_t *sh = &dst[(y+(size/4))*mWidth];
+    for (int j = y + (size/4); j < shadow_ystop; j++) {
+        for (int i = x + (size/4); i < shadow_xstop; i++) {
+            sh[i] &= shadow;
+        }
+        sh += mWidth;
+    }
+
+    // Draw the square.
+    uint16_t *sq = &dst[y*mWidth];
+    for (int j = y; j < square_ystop; j++) {
+        for (int i = x; i < square_xstop; i++) {
+            sq[i] = color;
+        }
+        sq += mWidth;
+    }
+}
+
+void FakeCamera::drawCheckerboard(uint16_t *dst, int size)
+{
+    bool black = true;
+
+    if((mCheckX/size)&1)
+        black = false;
+    if((mCheckY/size)&1)
+        black = !black;
+
+    int county = mCheckY%size;
+    int checkxremainder = mCheckX%size;
+
+    for(int y=0;y<mHeight;y++) {
+        int countx = checkxremainder;
+        bool current = black;
+        for(int x=0;x<mWidth;x++) {
+            dst[y*mWidth+x] = current?0:0xffff;
+            if(countx++ >= size) {
+                countx=0;
+                current = !current;
+            }
+        }
+        if(county++ >= size) {
+            county=0;
+            black = !black;
+        }
+    }
+    mCheckX += 3;
+    mCheckY++;
+}
+
+
+void FakeCamera::dump(int fd) const
+{
+    const size_t SIZE = 256;
+    char buffer[SIZE];
+    String8 result;
+    snprintf(buffer, 255, " width x height (%d x %d), counter (%d), check x-y coordinate(%d, %d)\n", mWidth, mHeight, mCounter, mCheckX, mCheckY);
+    result.append(buffer);
+    ::write(fd, result.string(), result.size());
+}
+
+
+}; // namespace android
diff --git a/services/camera/libcameraservice/FakeCamera.h b/services/camera/libcameraservice/FakeCamera.h
new file mode 100644
index 0000000..724de20
--- /dev/null
+++ b/services/camera/libcameraservice/FakeCamera.h
@@ -0,0 +1,67 @@
+/*
+**
+** Copyright 2008, The Android Open Source Project
+**
+** Licensed under the Apache License, Version 2.0 (the "License"); 
+** you may not use this file except in compliance with the License. 
+** You may obtain a copy of the License at 
+**
+**     http://www.apache.org/licenses/LICENSE-2.0 
+**
+** Unless required by applicable law or agreed to in writing, software 
+** distributed under the License is distributed on an "AS IS" BASIS, 
+** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 
+** See the License for the specific language governing permissions and 
+** limitations under the License.
+*/
+
+#ifndef ANDROID_HARDWARE_FAKECAMERA_H
+#define ANDROID_HARDWARE_FAKECAMERA_H
+
+#include <sys/types.h>
+#include <stdint.h>
+
+namespace android {
+
+/*
+ * FakeCamera is used in the CameraHardwareStub to provide a fake video feed
+ * when the system does not have a camera in hardware.
+ * The fake video is a moving black and white checkerboard background with a
+ * bouncing gray square in the foreground.
+ * This class is not thread-safe.
+ *
+ * TODO: Since the major methods provides a raw/uncompressed video feed, rename
+ * this class to RawVideoSource.
+ */
+
+class FakeCamera {
+public:
+    FakeCamera(int width, int height);
+    ~FakeCamera();
+
+    void setSize(int width, int height);
+    void getNextFrameAsYuv420(uint8_t *buffer);
+    // Write to the fd a string representing the current state.
+    void dump(int fd) const;
+
+private:
+    // TODO: remove the uint16_t buffer param everywhere since it is a field of
+    // this class.
+    void getNextFrameAsRgb565(uint16_t *buffer);
+
+    void drawSquare(uint16_t *buffer, int x, int y, int size, int color, int shadow);
+    void drawCheckerboard(uint16_t *buffer, int size);
+
+    static const int kRed = 0xf800;
+    static const int kGreen = 0x07c0;
+    static const int kBlue = 0x003e;
+
+    int         mWidth, mHeight;
+    int         mCounter;
+    int         mCheckX, mCheckY;
+    uint16_t    *mTmpRgb16Buffer;
+};
+
+}; // namespace android
+
+#endif // ANDROID_HARDWARE_FAKECAMERA_H
diff --git a/services/camera/tests/CameraServiceTest/Android.mk b/services/camera/tests/CameraServiceTest/Android.mk
new file mode 100644
index 0000000..cf4e42f
--- /dev/null
+++ b/services/camera/tests/CameraServiceTest/Android.mk
@@ -0,0 +1,26 @@
+LOCAL_PATH:= $(call my-dir)
+
+include $(CLEAR_VARS)
+
+LOCAL_SRC_FILES:= CameraServiceTest.cpp
+
+LOCAL_MODULE:= CameraServiceTest
+
+LOCAL_MODULE_TAGS := tests
+
+LOCAL_C_INCLUDES += \
+                frameworks/base/libs
+
+LOCAL_CFLAGS :=
+
+LOCAL_SHARED_LIBRARIES += \
+		libbinder \
+                libcutils \
+                libutils \
+                libui \
+                libcamera_client \
+                libsurfaceflinger_client
+
+# Disable it because the ISurface interface may change, and before we have a
+# chance to fix this test, we don't want to break normal builds.
+#include $(BUILD_EXECUTABLE)
diff --git a/services/camera/tests/CameraServiceTest/CameraServiceTest.cpp b/services/camera/tests/CameraServiceTest/CameraServiceTest.cpp
new file mode 100644
index 0000000..3c8d553
--- /dev/null
+++ b/services/camera/tests/CameraServiceTest/CameraServiceTest.cpp
@@ -0,0 +1,919 @@
+#define LOG_TAG "CameraServiceTest"
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <sys/types.h>
+#include <sys/wait.h>
+#include <unistd.h>
+#include <surfaceflinger/ISurface.h>
+#include <camera/Camera.h>
+#include <camera/CameraParameters.h>
+#include <ui/GraphicBuffer.h>
+#include <camera/ICamera.h>
+#include <camera/ICameraClient.h>
+#include <camera/ICameraService.h>
+#include <ui/Overlay.h>
+#include <binder/IPCThreadState.h>
+#include <binder/IServiceManager.h>
+#include <binder/ProcessState.h>
+#include <utils/KeyedVector.h>
+#include <utils/Log.h>
+#include <utils/Vector.h>
+#include <utils/threads.h>
+
+using namespace android;
+
+//
+//  Assertion and Logging utilities
+//
+#define INFO(...) \
+    do { \
+        printf(__VA_ARGS__); \
+        printf("\n"); \
+        LOGD(__VA_ARGS__); \
+    } while(0)
+
+void assert_fail(const char *file, int line, const char *func, const char *expr) {
+    INFO("assertion failed at file %s, line %d, function %s:",
+            file, line, func);
+    INFO("%s", expr);
+    abort();
+}
+
+void assert_eq_fail(const char *file, int line, const char *func,
+        const char *expr, int actual) {
+    INFO("assertion failed at file %s, line %d, function %s:",
+            file, line, func);
+    INFO("(expected) %s != (actual) %d", expr, actual);
+    abort();
+}
+
+#define ASSERT(e) \
+    do { \
+        if (!(e)) \
+            assert_fail(__FILE__, __LINE__, __func__, #e); \
+    } while(0)
+
+#define ASSERT_EQ(expected, actual) \
+    do { \
+        int _x = (actual); \
+        if (_x != (expected)) \
+            assert_eq_fail(__FILE__, __LINE__, __func__, #expected, _x); \
+    } while(0)
+
+//
+//  Holder service for pass objects between processes.
+//
+class IHolder : public IInterface {
+protected:
+    enum {
+        HOLDER_PUT = IBinder::FIRST_CALL_TRANSACTION,
+        HOLDER_GET,
+        HOLDER_CLEAR
+    };
+public:
+    DECLARE_META_INTERFACE(Holder);
+
+    virtual void put(sp<IBinder> obj) = 0;
+    virtual sp<IBinder> get() = 0;
+    virtual void clear() = 0;
+};
+
+class BnHolder : public BnInterface<IHolder> {
+    virtual status_t onTransact(uint32_t code,
+                                const Parcel& data,
+                                Parcel* reply,
+                                uint32_t flags = 0);
+};
+
+class BpHolder : public BpInterface<IHolder> {
+public:
+    BpHolder(const sp<IBinder>& impl)
+        : BpInterface<IHolder>(impl) {
+    }
+
+    virtual void put(sp<IBinder> obj) {
+        Parcel data, reply;
+        data.writeStrongBinder(obj);
+        remote()->transact(HOLDER_PUT, data, &reply, IBinder::FLAG_ONEWAY);
+    }
+
+    virtual sp<IBinder> get() {
+        Parcel data, reply;
+        remote()->transact(HOLDER_GET, data, &reply);
+        return reply.readStrongBinder();
+    }
+
+    virtual void clear() {
+        Parcel data, reply;
+        remote()->transact(HOLDER_CLEAR, data, &reply);
+    }
+};
+
+IMPLEMENT_META_INTERFACE(Holder, "CameraServiceTest.Holder");
+
+status_t BnHolder::onTransact(
+    uint32_t code, const Parcel& data, Parcel* reply, uint32_t flags) {
+    switch(code) {
+        case HOLDER_PUT: {
+            put(data.readStrongBinder());
+            return NO_ERROR;
+        } break;
+        case HOLDER_GET: {
+            reply->writeStrongBinder(get());
+            return NO_ERROR;
+        } break;
+        case HOLDER_CLEAR: {
+            clear();
+            return NO_ERROR;
+        } break;
+        default:
+            return BBinder::onTransact(code, data, reply, flags);
+    }
+}
+
+class HolderService : public BnHolder {
+    virtual void put(sp<IBinder> obj) {
+        mObj = obj;
+    }
+    virtual sp<IBinder> get() {
+        return mObj;
+    }
+    virtual void clear() {
+        mObj.clear();
+    }
+private:
+    sp<IBinder> mObj;
+};
+
+//
+//  A mock CameraClient
+//
+class MCameraClient : public BnCameraClient {
+public:
+    virtual void notifyCallback(int32_t msgType, int32_t ext1, int32_t ext2);
+    virtual void dataCallback(int32_t msgType, const sp<IMemory>& data);
+    virtual void dataCallbackTimestamp(nsecs_t timestamp,
+            int32_t msgType, const sp<IMemory>& data);
+
+    // new functions
+    void clearStat();
+    enum OP { EQ, GE, LE, GT, LT };
+    void assertNotify(int32_t msgType, OP op, int count);
+    void assertData(int32_t msgType, OP op, int count);
+    void waitNotify(int32_t msgType, OP op, int count);
+    void waitData(int32_t msgType, OP op, int count);
+    void assertDataSize(int32_t msgType, OP op, int dataSize);
+
+    void setReleaser(ICamera *releaser) {
+        mReleaser = releaser;
+    }
+private:
+    Mutex mLock;
+    Condition mCond;
+    DefaultKeyedVector<int32_t, int> mNotifyCount;
+    DefaultKeyedVector<int32_t, int> mDataCount;
+    DefaultKeyedVector<int32_t, int> mDataSize;
+    bool test(OP op, int v1, int v2);
+    void assertTest(OP op, int v1, int v2);
+
+    ICamera *mReleaser;
+};
+
+void MCameraClient::clearStat() {
+    Mutex::Autolock _l(mLock);
+    mNotifyCount.clear();
+    mDataCount.clear();
+    mDataSize.clear();
+}
+
+bool MCameraClient::test(OP op, int v1, int v2) {
+    switch (op) {
+        case EQ: return v1 == v2;
+        case GT: return v1 > v2;
+        case LT: return v1 < v2;
+        case GE: return v1 >= v2;
+        case LE: return v1 <= v2;
+        default: ASSERT(0); break;
+    }
+    return false;
+}
+
+void MCameraClient::assertTest(OP op, int v1, int v2) {
+    if (!test(op, v1, v2)) {
+        LOGE("assertTest failed: op=%d, v1=%d, v2=%d", op, v1, v2);
+        ASSERT(0);
+    }
+}
+
+void MCameraClient::assertNotify(int32_t msgType, OP op, int count) {
+    Mutex::Autolock _l(mLock);
+    int v = mNotifyCount.valueFor(msgType);
+    assertTest(op, v, count);
+}
+
+void MCameraClient::assertData(int32_t msgType, OP op, int count) {
+    Mutex::Autolock _l(mLock);
+    int v = mDataCount.valueFor(msgType);
+    assertTest(op, v, count);
+}
+
+void MCameraClient::assertDataSize(int32_t msgType, OP op, int dataSize) {
+    Mutex::Autolock _l(mLock);
+    int v = mDataSize.valueFor(msgType);
+    assertTest(op, v, dataSize);
+}
+
+void MCameraClient::notifyCallback(int32_t msgType, int32_t ext1, int32_t ext2) {
+    INFO("%s", __func__);
+    Mutex::Autolock _l(mLock);
+    ssize_t i = mNotifyCount.indexOfKey(msgType);
+    if (i < 0) {
+        mNotifyCount.add(msgType, 1);
+    } else {
+        ++mNotifyCount.editValueAt(i);
+    }
+    mCond.signal();
+}
+
+void MCameraClient::dataCallback(int32_t msgType, const sp<IMemory>& data) {
+    INFO("%s", __func__);
+    int dataSize = data->size();
+    INFO("data type = %d, size = %d", msgType, dataSize);
+    Mutex::Autolock _l(mLock);
+    ssize_t i = mDataCount.indexOfKey(msgType);
+    if (i < 0) {
+        mDataCount.add(msgType, 1);
+        mDataSize.add(msgType, dataSize);
+    } else {
+        ++mDataCount.editValueAt(i);
+        mDataSize.editValueAt(i) = dataSize;
+    }
+    mCond.signal();
+
+    if (msgType == CAMERA_MSG_VIDEO_FRAME) {
+        ASSERT(mReleaser != NULL);
+        mReleaser->releaseRecordingFrame(data);
+    }
+}
+
+void MCameraClient::dataCallbackTimestamp(nsecs_t timestamp, int32_t msgType,
+        const sp<IMemory>& data) {
+    dataCallback(msgType, data);
+}
+
+void MCameraClient::waitNotify(int32_t msgType, OP op, int count) {
+    INFO("waitNotify: %d, %d, %d", msgType, op, count);
+    Mutex::Autolock _l(mLock);
+    while (true) {
+        int v = mNotifyCount.valueFor(msgType);
+        if (test(op, v, count)) {
+            break;
+        }
+        mCond.wait(mLock);
+    }
+}
+
+void MCameraClient::waitData(int32_t msgType, OP op, int count) {
+    INFO("waitData: %d, %d, %d", msgType, op, count);
+    Mutex::Autolock _l(mLock);
+    while (true) {
+        int v = mDataCount.valueFor(msgType);
+        if (test(op, v, count)) {
+            break;
+        }
+        mCond.wait(mLock);
+    }
+}
+
+//
+//  A mock Surface
+//
+class MSurface : public BnSurface {
+public:
+    virtual status_t registerBuffers(const BufferHeap& buffers);
+    virtual void postBuffer(ssize_t offset);
+    virtual void unregisterBuffers();
+    virtual sp<OverlayRef> createOverlay(
+            uint32_t w, uint32_t h, int32_t format, int32_t orientation);
+    virtual sp<GraphicBuffer> requestBuffer(int bufferIdx, int usage);
+    virtual status_t setBufferCount(int bufferCount);
+
+    // new functions
+    void clearStat();
+    void waitUntil(int c0, int c1, int c2);
+
+private:
+    // check callback count
+    Condition mCond;
+    Mutex mLock;
+    int registerBuffersCount;
+    int postBufferCount;
+    int unregisterBuffersCount;
+};
+
+status_t MSurface::registerBuffers(const BufferHeap& buffers) {
+    INFO("%s", __func__);
+    Mutex::Autolock _l(mLock);
+    ++registerBuffersCount;
+    mCond.signal();
+    return NO_ERROR;
+}
+
+void MSurface::postBuffer(ssize_t offset) {
+    // INFO("%s", __func__);
+    Mutex::Autolock _l(mLock);
+    ++postBufferCount;
+    mCond.signal();
+}
+
+void MSurface::unregisterBuffers() {
+    INFO("%s", __func__);
+    Mutex::Autolock _l(mLock);
+    ++unregisterBuffersCount;
+    mCond.signal();
+}
+
+sp<GraphicBuffer> MSurface::requestBuffer(int bufferIdx, int usage) {
+    INFO("%s", __func__);
+    return NULL;
+}
+
+status_t MSurface::setBufferCount(int bufferCount) {
+    INFO("%s", __func__);
+    return NULL;
+}
+
+void MSurface::clearStat() {
+    Mutex::Autolock _l(mLock);
+    registerBuffersCount = 0;
+    postBufferCount = 0;
+    unregisterBuffersCount = 0;
+}
+
+void MSurface::waitUntil(int c0, int c1, int c2) {
+    INFO("waitUntil: %d %d %d", c0, c1, c2);
+    Mutex::Autolock _l(mLock);
+    while (true) {
+        if (registerBuffersCount >= c0 &&
+            postBufferCount >= c1 &&
+            unregisterBuffersCount >= c2) {
+            break;
+        }
+        mCond.wait(mLock);
+    }
+}
+
+sp<OverlayRef> MSurface::createOverlay(uint32_t w, uint32_t h, int32_t format,
+        int32_t orientation) {
+    // Not implemented.
+    ASSERT(0);
+    return NULL;
+}
+
+//
+//  Utilities to use the Holder service
+//
+sp<IHolder> getHolder() {
+    sp<IServiceManager> sm = defaultServiceManager();
+    ASSERT(sm != 0);
+    sp<IBinder> binder = sm->getService(String16("CameraServiceTest.Holder"));
+    ASSERT(binder != 0);
+    sp<IHolder> holder = interface_cast<IHolder>(binder);
+    ASSERT(holder != 0);
+    return holder;
+}
+
+void putTempObject(sp<IBinder> obj) {
+    INFO("%s", __func__);
+    getHolder()->put(obj);
+}
+
+sp<IBinder> getTempObject() {
+    INFO("%s", __func__);
+    return getHolder()->get();
+}
+
+void clearTempObject() {
+    INFO("%s", __func__);
+    getHolder()->clear();
+}
+
+//
+//  Get a Camera Service
+//
+sp<ICameraService> getCameraService() {
+    sp<IServiceManager> sm = defaultServiceManager();
+    ASSERT(sm != 0);
+    sp<IBinder> binder = sm->getService(String16("media.camera"));
+    ASSERT(binder != 0);
+    sp<ICameraService> cs = interface_cast<ICameraService>(binder);
+    ASSERT(cs != 0);
+    return cs;
+}
+
+int getNumberOfCameras() {
+    sp<ICameraService> cs = getCameraService();
+    return cs->getNumberOfCameras();
+}
+
+//
+// Various Connect Tests
+//
+void testConnect(int cameraId) {
+    INFO("%s", __func__);
+    sp<ICameraService> cs = getCameraService();
+    sp<MCameraClient> cc = new MCameraClient();
+    sp<ICamera> c = cs->connect(cc, cameraId);
+    ASSERT(c != 0);
+    c->disconnect();
+}
+
+void testAllowConnectOnceOnly(int cameraId) {
+    INFO("%s", __func__);
+    sp<ICameraService> cs = getCameraService();
+    // Connect the first client.
+    sp<MCameraClient> cc = new MCameraClient();
+    sp<ICamera> c = cs->connect(cc, cameraId);
+    ASSERT(c != 0);
+    // Same client -- ok.
+    ASSERT(cs->connect(cc, cameraId) != 0);
+    // Different client -- not ok.
+    sp<MCameraClient> cc2 = new MCameraClient();
+    ASSERT(cs->connect(cc2, cameraId) == 0);
+    c->disconnect();
+}
+
+void testReconnectFailed() {
+    INFO("%s", __func__);
+    sp<ICamera> c = interface_cast<ICamera>(getTempObject());
+    sp<MCameraClient> cc = new MCameraClient();
+    ASSERT(c->connect(cc) != NO_ERROR);
+}
+
+void testReconnectSuccess() {
+    INFO("%s", __func__);
+    sp<ICamera> c = interface_cast<ICamera>(getTempObject());
+    sp<MCameraClient> cc = new MCameraClient();
+    ASSERT(c->connect(cc) == NO_ERROR);
+    c->disconnect();
+}
+
+void testLockFailed() {
+    INFO("%s", __func__);
+    sp<ICamera> c = interface_cast<ICamera>(getTempObject());
+    ASSERT(c->lock() != NO_ERROR);
+}
+
+void testLockUnlockSuccess() {
+    INFO("%s", __func__);
+    sp<ICamera> c = interface_cast<ICamera>(getTempObject());
+    ASSERT(c->lock() == NO_ERROR);
+    ASSERT(c->unlock() == NO_ERROR);
+}
+
+void testLockSuccess() {
+    INFO("%s", __func__);
+    sp<ICamera> c = interface_cast<ICamera>(getTempObject());
+    ASSERT(c->lock() == NO_ERROR);
+    c->disconnect();
+}
+
+//
+// Run the connect tests in another process.
+//
+const char *gExecutable;
+
+struct FunctionTableEntry {
+    const char *name;
+    void (*func)();
+};
+
+FunctionTableEntry function_table[] = {
+#define ENTRY(x) {#x, &x}
+    ENTRY(testReconnectFailed),
+    ENTRY(testReconnectSuccess),
+    ENTRY(testLockUnlockSuccess),
+    ENTRY(testLockFailed),
+    ENTRY(testLockSuccess),
+#undef ENTRY
+};
+
+void runFunction(const char *tag) {
+    INFO("runFunction: %s", tag);
+    int entries = sizeof(function_table) / sizeof(function_table[0]);
+    for (int i = 0; i < entries; i++) {
+        if (strcmp(function_table[i].name, tag) == 0) {
+            (*function_table[i].func)();
+            return;
+        }
+    }
+    ASSERT(0);
+}
+
+void runInAnotherProcess(const char *tag) {
+    pid_t pid = fork();
+    if (pid == 0) {
+        execlp(gExecutable, gExecutable, tag, NULL);
+        ASSERT(0);
+    } else {
+        int status;
+        ASSERT_EQ(pid, wait(&status));
+        ASSERT_EQ(0, status);
+    }
+}
+
+void testReconnect(int cameraId) {
+    INFO("%s", __func__);
+    sp<ICameraService> cs = getCameraService();
+    sp<MCameraClient> cc = new MCameraClient();
+    sp<ICamera> c = cs->connect(cc, cameraId);
+    ASSERT(c != 0);
+    // Reconnect to the same client -- ok.
+    ASSERT(c->connect(cc) == NO_ERROR);
+    // Reconnect to a different client (but the same pid) -- ok.
+    sp<MCameraClient> cc2 = new MCameraClient();
+    ASSERT(c->connect(cc2) == NO_ERROR);
+    c->disconnect();
+    cc->assertNotify(CAMERA_MSG_ERROR, MCameraClient::EQ, 0);
+}
+
+void testLockUnlock(int cameraId) {
+    sp<ICameraService> cs = getCameraService();
+    sp<MCameraClient> cc = new MCameraClient();
+    sp<ICamera> c = cs->connect(cc, cameraId);
+    ASSERT(c != 0);
+    // We can lock as many times as we want.
+    ASSERT(c->lock() == NO_ERROR);
+    ASSERT(c->lock() == NO_ERROR);
+    // Lock from a different process -- not ok.
+    putTempObject(c->asBinder());
+    runInAnotherProcess("testLockFailed");
+    // Unlock then lock from a different process -- ok.
+    ASSERT(c->unlock() == NO_ERROR);
+    runInAnotherProcess("testLockUnlockSuccess");
+    // Unlock then lock from a different process -- ok.
+    runInAnotherProcess("testLockSuccess");
+    clearTempObject();
+}
+
+void testReconnectFromAnotherProcess(int cameraId) {
+    INFO("%s", __func__);
+
+    sp<ICameraService> cs = getCameraService();
+    sp<MCameraClient> cc = new MCameraClient();
+    sp<ICamera> c = cs->connect(cc, cameraId);
+    ASSERT(c != 0);
+    // Reconnect from a different process -- not ok.
+    putTempObject(c->asBinder());
+    runInAnotherProcess("testReconnectFailed");
+    // Unlock then reconnect from a different process -- ok.
+    ASSERT(c->unlock() == NO_ERROR);
+    runInAnotherProcess("testReconnectSuccess");
+    clearTempObject();
+}
+
+// We need to flush the command buffer after the reference
+// to ICamera is gone. The sleep is for the server to run
+// the destructor for it.
+static void flushCommands() {
+    IPCThreadState::self()->flushCommands();
+    usleep(200000);  // 200ms
+}
+
+// Run a test case
+#define RUN(class_name, cameraId) do { \
+    { \
+        INFO(#class_name); \
+        class_name instance; \
+        instance.init(cameraId); \
+        instance.run(); \
+    } \
+    flushCommands(); \
+} while(0)
+
+// Base test case after the the camera is connected.
+class AfterConnect {
+public:
+    void init(int cameraId) {
+        cs = getCameraService();
+        cc = new MCameraClient();
+        c = cs->connect(cc, cameraId);
+        ASSERT(c != 0);
+    }
+
+protected:
+    sp<ICameraService> cs;
+    sp<MCameraClient> cc;
+    sp<ICamera> c;
+
+    ~AfterConnect() {
+        c->disconnect();
+        c.clear();
+        cc.clear();
+        cs.clear();
+    }
+};
+
+class TestSetPreviewDisplay : public AfterConnect {
+public:
+    void run() {
+        sp<MSurface> surface = new MSurface();
+        ASSERT(c->setPreviewDisplay(surface) == NO_ERROR);
+        c->disconnect();
+        cc->assertNotify(CAMERA_MSG_ERROR, MCameraClient::EQ, 0);
+    }
+};
+
+class TestStartPreview : public AfterConnect {
+public:
+    void run() {
+        sp<MSurface> surface = new MSurface();
+        ASSERT(c->setPreviewDisplay(surface) == NO_ERROR);
+
+        ASSERT(c->startPreview() == NO_ERROR);
+        ASSERT(c->previewEnabled() == true);
+
+        surface->waitUntil(1, 10, 0); // needs 1 registerBuffers and 10 postBuffer
+        surface->clearStat();
+
+        sp<MSurface> another_surface = new MSurface();
+        c->setPreviewDisplay(another_surface);  // just to make sure unregisterBuffers
+                                                // is called.
+        surface->waitUntil(0, 0, 1);  // needs unregisterBuffers
+
+        cc->assertNotify(CAMERA_MSG_ERROR, MCameraClient::EQ, 0);
+    }
+};
+
+class TestStartPreviewWithoutDisplay : public AfterConnect {
+public:
+    void run() {
+        ASSERT(c->startPreview() == NO_ERROR);
+        ASSERT(c->previewEnabled() == true);
+        c->disconnect();
+        cc->assertNotify(CAMERA_MSG_ERROR, MCameraClient::EQ, 0);
+    }
+};
+
+// Base test case after the the camera is connected and the preview is started.
+class AfterStartPreview : public AfterConnect {
+public:
+    void init(int cameraId) {
+        AfterConnect::init(cameraId);
+        surface = new MSurface();
+        ASSERT(c->setPreviewDisplay(surface) == NO_ERROR);
+        ASSERT(c->startPreview() == NO_ERROR);
+    }
+
+protected:
+    sp<MSurface> surface;
+
+    ~AfterStartPreview() {
+        surface.clear();
+    }
+};
+
+class TestAutoFocus : public AfterStartPreview {
+public:
+    void run() {
+        cc->assertNotify(CAMERA_MSG_FOCUS, MCameraClient::EQ, 0);
+        c->autoFocus();
+        cc->waitNotify(CAMERA_MSG_FOCUS, MCameraClient::EQ, 1);
+        c->disconnect();
+        cc->assertNotify(CAMERA_MSG_ERROR, MCameraClient::EQ, 0);
+    }
+};
+
+class TestStopPreview : public AfterStartPreview {
+public:
+    void run() {
+        ASSERT(c->previewEnabled() == true);
+        c->stopPreview();
+        ASSERT(c->previewEnabled() == false);
+        c->disconnect();
+        cc->assertNotify(CAMERA_MSG_ERROR, MCameraClient::EQ, 0);
+    }
+};
+
+class TestTakePicture: public AfterStartPreview {
+public:
+    void run() {
+        ASSERT(c->takePicture() == NO_ERROR);
+        cc->waitNotify(CAMERA_MSG_SHUTTER, MCameraClient::EQ, 1);
+        cc->waitData(CAMERA_MSG_RAW_IMAGE, MCameraClient::EQ, 1);
+        cc->waitData(CAMERA_MSG_COMPRESSED_IMAGE, MCameraClient::EQ, 1);
+        c->stopPreview();
+        c->disconnect();
+        cc->assertNotify(CAMERA_MSG_ERROR, MCameraClient::EQ, 0);
+    }
+};
+
+class TestTakeMultiplePictures: public AfterStartPreview {
+public:
+    void run() {
+        for (int i = 0; i < 10; i++) {
+            cc->clearStat();
+            ASSERT(c->takePicture() == NO_ERROR);
+            cc->waitNotify(CAMERA_MSG_SHUTTER, MCameraClient::EQ, 1);
+            cc->waitData(CAMERA_MSG_RAW_IMAGE, MCameraClient::EQ, 1);
+            cc->waitData(CAMERA_MSG_COMPRESSED_IMAGE, MCameraClient::EQ, 1);
+        }
+        c->disconnect();
+        cc->assertNotify(CAMERA_MSG_ERROR, MCameraClient::EQ, 0);
+    }
+};
+
+class TestGetParameters: public AfterStartPreview {
+public:
+    void run() {
+        String8 param_str = c->getParameters();
+        INFO("%s", static_cast<const char*>(param_str));
+    }
+};
+
+static bool getNextSize(const char **ptrS, int *w, int *h) {
+    const char *s = *ptrS;
+
+    // skip over ','
+    if (*s == ',') s++;
+
+    // remember start position in p
+    const char *p = s;
+    while (*s != '\0' && *s != 'x') {
+        s++;
+    }
+    if (*s == '\0') return false;
+
+    // get the width
+    *w = atoi(p);
+
+    // skip over 'x'
+    ASSERT(*s == 'x');
+    p = s + 1;
+    while (*s != '\0' && *s != ',') {
+        s++;
+    }
+
+    // get the height
+    *h = atoi(p);
+    *ptrS = s;
+    return true;
+}
+
+class TestPictureSize : public AfterStartPreview {
+public:
+    void checkOnePicture(int w, int h) {
+        const float rate = 0.9;  // byte per pixel limit
+        int pixels = w * h;
+
+        CameraParameters param(c->getParameters());
+        param.setPictureSize(w, h);
+        // disable thumbnail to get more accurate size.
+        param.set(CameraParameters::KEY_JPEG_THUMBNAIL_WIDTH, 0);
+        param.set(CameraParameters::KEY_JPEG_THUMBNAIL_HEIGHT, 0);
+        c->setParameters(param.flatten());
+
+        cc->clearStat();
+        ASSERT(c->takePicture() == NO_ERROR);
+        cc->waitData(CAMERA_MSG_RAW_IMAGE, MCameraClient::EQ, 1);
+        //cc->assertDataSize(CAMERA_MSG_RAW_IMAGE, MCameraClient::EQ, pixels*3/2);
+        cc->waitData(CAMERA_MSG_COMPRESSED_IMAGE, MCameraClient::EQ, 1);
+        cc->assertDataSize(CAMERA_MSG_COMPRESSED_IMAGE, MCameraClient::LT,
+                int(pixels * rate));
+        cc->assertDataSize(CAMERA_MSG_COMPRESSED_IMAGE, MCameraClient::GT, 0);
+        cc->assertNotify(CAMERA_MSG_ERROR, MCameraClient::EQ, 0);
+    }
+
+    void run() {
+        CameraParameters param(c->getParameters());
+        int w, h;
+        const char *s = param.get(CameraParameters::KEY_SUPPORTED_PICTURE_SIZES);
+        while (getNextSize(&s, &w, &h)) {
+            LOGD("checking picture size %dx%d", w, h);
+            checkOnePicture(w, h);
+        }
+    }
+};
+
+class TestPreviewCallbackFlag : public AfterConnect {
+public:
+    void run() {
+        sp<MSurface> surface = new MSurface();
+        ASSERT(c->setPreviewDisplay(surface) == NO_ERROR);
+
+        // Try all flag combinations.
+        for (int v = 0; v < 8; v++) {
+            LOGD("TestPreviewCallbackFlag: flag=%d", v);
+            usleep(100000); // sleep a while to clear the in-flight callbacks.
+            cc->clearStat();
+            c->setPreviewCallbackFlag(v);
+            ASSERT(c->previewEnabled() == false);
+            ASSERT(c->startPreview() == NO_ERROR);
+            ASSERT(c->previewEnabled() == true);
+            sleep(2);
+            c->stopPreview();
+            if ((v & FRAME_CALLBACK_FLAG_ENABLE_MASK) == 0) {
+                cc->assertData(CAMERA_MSG_PREVIEW_FRAME, MCameraClient::EQ, 0);
+            } else {
+                if ((v & FRAME_CALLBACK_FLAG_ONE_SHOT_MASK) == 0) {
+                    cc->assertData(CAMERA_MSG_PREVIEW_FRAME, MCameraClient::GE, 10);
+                } else {
+                    cc->assertData(CAMERA_MSG_PREVIEW_FRAME, MCameraClient::EQ, 1);
+                }
+            }
+        }
+    }
+};
+
+class TestRecording : public AfterConnect {
+public:
+    void run() {
+        ASSERT(c->recordingEnabled() == false);
+        sp<MSurface> surface = new MSurface();
+        ASSERT(c->setPreviewDisplay(surface) == NO_ERROR);
+        c->setPreviewCallbackFlag(FRAME_CALLBACK_FLAG_ENABLE_MASK);
+        cc->setReleaser(c.get());
+        c->startRecording();
+        ASSERT(c->recordingEnabled() == true);
+        sleep(2);
+        c->stopRecording();
+        usleep(100000); // sleep a while to clear the in-flight callbacks.
+        cc->setReleaser(NULL);
+        cc->assertData(CAMERA_MSG_VIDEO_FRAME, MCameraClient::GE, 10);
+    }
+};
+
+class TestPreviewSize : public AfterStartPreview {
+public:
+    void checkOnePicture(int w, int h) {
+        int size = w*h*3/2;  // should read from parameters
+
+        c->stopPreview();
+
+        CameraParameters param(c->getParameters());
+        param.setPreviewSize(w, h);
+        c->setPreviewCallbackFlag(FRAME_CALLBACK_FLAG_ENABLE_MASK);
+        c->setParameters(param.flatten());
+
+        c->startPreview();
+
+        cc->clearStat();
+        cc->waitData(CAMERA_MSG_PREVIEW_FRAME, MCameraClient::GE, 1);
+        cc->assertDataSize(CAMERA_MSG_PREVIEW_FRAME, MCameraClient::EQ, size);
+    }
+
+    void run() {
+        CameraParameters param(c->getParameters());
+        int w, h;
+        const char *s = param.get(CameraParameters::KEY_SUPPORTED_PREVIEW_SIZES);
+        while (getNextSize(&s, &w, &h)) {
+            LOGD("checking preview size %dx%d", w, h);
+            checkOnePicture(w, h);
+        }
+    }
+};
+
+void runHolderService() {
+    defaultServiceManager()->addService(
+            String16("CameraServiceTest.Holder"), new HolderService());
+    ProcessState::self()->startThreadPool();
+}
+
+int main(int argc, char **argv)
+{
+    if (argc != 1) {
+        runFunction(argv[1]);
+        return 0;
+    }
+    INFO("CameraServiceTest start");
+    gExecutable = argv[0];
+    runHolderService();
+    int n = getNumberOfCameras();
+    INFO("%d Cameras available", n);
+
+    for (int id = 0; id < n; id++) {
+        INFO("Testing camera %d", id);
+        testConnect(id);                              flushCommands();
+        testAllowConnectOnceOnly(id);                 flushCommands();
+        testReconnect(id);                            flushCommands();
+        testLockUnlock(id);                           flushCommands();
+        testReconnectFromAnotherProcess(id);          flushCommands();
+
+        RUN(TestSetPreviewDisplay, id);
+        RUN(TestStartPreview, id);
+        RUN(TestStartPreviewWithoutDisplay, id);
+        RUN(TestAutoFocus, id);
+        RUN(TestStopPreview, id);
+        RUN(TestTakePicture, id);
+        RUN(TestTakeMultiplePictures, id);
+        RUN(TestGetParameters, id);
+        RUN(TestPictureSize, id);
+        RUN(TestPreviewCallbackFlag, id);
+        RUN(TestRecording, id);
+        RUN(TestPreviewSize, id);
+    }
+
+    INFO("CameraServiceTest finished");
+}
diff --git a/services/java/Android.mk b/services/java/Android.mk
index 934712c..c756d29 100644
--- a/services/java/Android.mk
+++ b/services/java/Android.mk
@@ -13,7 +13,9 @@
 
 LOCAL_JAVA_LIBRARIES := android.policy
 
+LOCAL_NO_EMMA_INSTRUMENT := true
+LOCAL_NO_EMMA_COMPILE := true
+
 include $(BUILD_JAVA_LIBRARY)
 
 include $(BUILD_DROIDDOC)
-
diff --git a/services/java/com/android/server/AppWidgetService.java b/services/java/com/android/server/AppWidgetService.java
index 24526af..3ed6c12 100644
--- a/services/java/com/android/server/AppWidgetService.java
+++ b/services/java/com/android/server/AppWidgetService.java
@@ -869,7 +869,7 @@
                     out.startTag(null, "p");
                     out.attribute(null, "pkg", p.info.provider.getPackageName());
                     out.attribute(null, "cl", p.info.provider.getClassName());
-                    out.endTag(null, "h");
+                    out.endTag(null, "p");
                     p.tag = providerIndex;
                     providerIndex++;
                 }
@@ -1204,6 +1204,7 @@
                             // If it's currently showing, call back with the new AppWidgetProviderInfo.
                             for (int j=0; j<M; j++) {
                                 AppWidgetId id = p.instances.get(j);
+                                id.views = null;
                                 if (id.host != null && id.host.callbacks != null) {
                                     try {
                                         id.host.callbacks.providerChanged(id.appWidgetId, p.info);
diff --git a/services/java/com/android/server/BackupManagerService.java b/services/java/com/android/server/BackupManagerService.java
index 6e307a5..3db5dc1 100644
--- a/services/java/com/android/server/BackupManagerService.java
+++ b/services/java/com/android/server/BackupManagerService.java
@@ -17,8 +17,8 @@
 package com.android.server;
 
 import android.app.ActivityManagerNative;
-import android.app.ActivityThread;
 import android.app.AlarmManager;
+import android.app.AppGlobals;
 import android.app.IActivityManager;
 import android.app.IApplicationThread;
 import android.app.IBackupAgent;
@@ -399,7 +399,7 @@
     public BackupManagerService(Context context) {
         mContext = context;
         mPackageManager = context.getPackageManager();
-        mPackageManagerBinder = ActivityThread.getPackageManager();
+        mPackageManagerBinder = AppGlobals.getPackageManager();
         mActivityManager = ActivityManagerNative.getDefault();
 
         mAlarmManager = (AlarmManager) context.getSystemService(Context.ALARM_SERVICE);
@@ -421,7 +421,7 @@
                 Settings.Secure.BACKUP_AUTO_RESTORE, 1) != 0;
         // If Encrypted file systems is enabled or disabled, this call will return the
         // correct directory.
-        mBaseStateDir = new File(Environment.getDataDirectory(), "backup");
+        mBaseStateDir = new File(Environment.getSecureDataDirectory(), "backup");
         mBaseStateDir.mkdirs();
         mDataDir = Environment.getDownloadCacheDirectory();
 
diff --git a/services/java/com/android/server/BatteryService.java b/services/java/com/android/server/BatteryService.java
index 5cf61bd..e6c32d9 100644
--- a/services/java/com/android/server/BatteryService.java
+++ b/services/java/com/android/server/BatteryService.java
@@ -210,9 +210,6 @@
         boolean logOutlier = false;
         long dischargeDuration = 0;
 
-        shutdownIfNoPower();
-        shutdownIfOverTemp();
-
         mBatteryLevelCritical = mBatteryLevel <= CRITICAL_BATTERY_LEVEL;
         if (mAcOnline) {
             mPlugType = BatteryManager.BATTERY_PLUGGED_AC;
@@ -221,6 +218,19 @@
         } else {
             mPlugType = BATTERY_PLUGGED_NONE;
         }
+        
+        // Let the battery stats keep track of the current level.
+        try {
+            mBatteryStats.setBatteryState(mBatteryStatus, mBatteryHealth,
+                    mPlugType, mBatteryLevel, mBatteryTemperature,
+                    mBatteryVoltage);
+        } catch (RemoteException e) {
+            // Should never happen.
+        }
+        
+        shutdownIfNoPower();
+        shutdownIfOverTemp();
+
         if (mBatteryStatus != mLastBatteryStatus ||
                 mBatteryHealth != mLastBatteryHealth ||
                 mBatteryPresent != mLastBatteryPresent ||
@@ -263,16 +273,6 @@
                 EventLog.writeEvent(EventLogTags.BATTERY_LEVEL,
                         mBatteryLevel, mBatteryVoltage, mBatteryTemperature);
             }
-            if (mBatteryLevel != mLastBatteryLevel && mPlugType == BATTERY_PLUGGED_NONE) {
-                // If the battery level has changed and we are on battery, update the current level.
-                // This is used for discharge cycle tracking so this shouldn't be updated while the
-                // battery is charging.
-                try {
-                    mBatteryStats.recordCurrentLevel(mBatteryLevel);
-                } catch (RemoteException e) {
-                    // Should never happen.
-                }
-            }
             if (mBatteryLevelCritical && !mLastBatteryLevelCritical &&
                     mPlugType == BATTERY_PLUGGED_NONE) {
                 // We want to make sure we log discharge cycle outliers
@@ -342,11 +342,6 @@
         Intent intent = new Intent(Intent.ACTION_BATTERY_CHANGED);
         intent.addFlags(Intent.FLAG_RECEIVER_REGISTERED_ONLY
                 | Intent.FLAG_RECEIVER_REPLACE_PENDING);
-        try {
-            mBatteryStats.setOnBattery(mPlugType == BATTERY_PLUGGED_NONE, mBatteryLevel);
-        } catch (RemoteException e) {
-            // Should never happen.
-        }
 
         int icon = getIcon(mBatteryLevel);
 
diff --git a/services/java/com/android/server/InputApplication.java b/services/java/com/android/server/InputApplication.java
new file mode 100644
index 0000000..38420d4
--- /dev/null
+++ b/services/java/com/android/server/InputApplication.java
@@ -0,0 +1,33 @@
+/*
+ * Copyright (C) 2010 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.android.server;
+
+/**
+ * Describes input-related application properties for use by the input dispatcher.
+ * 
+ * @hide
+ */
+public final class InputApplication {
+    // Application name.
+    public String name;
+    
+    // Dispatching timeout.
+    public long dispatchingTimeoutNanos;
+    
+    // The application window token.
+    public Object token;
+}
diff --git a/services/java/com/android/server/InputDevice.java b/services/java/com/android/server/InputDevice.java
deleted file mode 100644
index 414b69f..0000000
--- a/services/java/com/android/server/InputDevice.java
+++ /dev/null
@@ -1,1025 +0,0 @@
-/*
- * Copyright (C) 2007 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.android.server;
-
-import android.util.Slog;
-import android.view.Display;
-import android.view.MotionEvent;
-import android.view.Surface;
-import android.view.WindowManagerPolicy;
-
-import java.io.PrintWriter;
-
-public class InputDevice {
-    static final boolean DEBUG_POINTERS = false;
-    static final boolean DEBUG_HACKS = false;
-    
-    /** Amount that trackball needs to move in order to generate a key event. */
-    static final int TRACKBALL_MOVEMENT_THRESHOLD = 6;
-
-    /** Maximum number of pointers we will track and report. */
-    static final int MAX_POINTERS = 10;
-    
-    /**
-     * Slop distance for jumpy pointer detection.
-     * The vertical range of the screen divided by this is our epsilon value.
-     */
-    private static final int JUMPY_EPSILON_DIVISOR = 212;
-    
-    /** Number of jumpy points to drop for touchscreens that need it. */
-    private static final int JUMPY_TRANSITION_DROPS = 3;
-    private static final int JUMPY_DROP_LIMIT = 3;
-    
-    final int id;
-    final int classes;
-    final String name;
-    final AbsoluteInfo absX;
-    final AbsoluteInfo absY;
-    final AbsoluteInfo absPressure;
-    final AbsoluteInfo absSize;
-    
-    long mKeyDownTime = 0;
-    int mMetaKeysState = 0;
-    
-    // For use by KeyInputQueue for keeping track of the current touch
-    // data in the old non-multi-touch protocol.
-    final int[] curTouchVals = new int[MotionEvent.NUM_SAMPLE_DATA * 2];
-    
-    final MotionState mAbs = new MotionState(0, 0);
-    final MotionState mRel = new MotionState(TRACKBALL_MOVEMENT_THRESHOLD,
-            TRACKBALL_MOVEMENT_THRESHOLD);
-    
-    static class MotionState {
-        int xPrecision;
-        int yPrecision;
-        float xMoveScale;
-        float yMoveScale;
-        MotionEvent currentMove = null;
-        boolean changed = false;
-        boolean everChanged = false;
-        long mDownTime = 0;
-        
-        // The currently assigned pointer IDs, corresponding to the last data.
-        int[] mPointerIds = new int[MAX_POINTERS];
-        
-        // This is the last generated pointer data, ordered to match
-        // mPointerIds.
-        boolean mSkipLastPointers;
-        int mLastNumPointers = 0;
-        final int[] mLastData = new int[MotionEvent.NUM_SAMPLE_DATA * MAX_POINTERS];
-        
-        // This is the next set of pointer data being generated.  It is not
-        // in any known order, and will be propagated in to mLastData
-        // as part of mapping it to the appropriate pointer IDs.
-        // Note that we have one extra sample of data here, to help clients
-        // avoid doing bounds checking.
-        int mNextNumPointers = 0;
-        final int[] mNextData = new int[(MotionEvent.NUM_SAMPLE_DATA * MAX_POINTERS)
-                                        + MotionEvent.NUM_SAMPLE_DATA];
-        
-        // Used to determine whether we dropped bad data, to avoid doing
-        // it repeatedly.
-        final boolean[] mDroppedBadPoint = new boolean[MAX_POINTERS];
-
-        // Used to count the number of jumpy points dropped.
-        private int mJumpyPointsDropped = 0;
-        
-        // Used to perform averaging of reported coordinates, to smooth
-        // the data and filter out transients during a release.
-        static final int HISTORY_SIZE = 5;
-        int[] mHistoryDataStart = new int[MAX_POINTERS];
-        int[] mHistoryDataEnd = new int[MAX_POINTERS];
-        final int[] mHistoryData = new int[(MotionEvent.NUM_SAMPLE_DATA * MAX_POINTERS)
-                                        * HISTORY_SIZE];
-        final int[] mAveragedData = new int[MotionEvent.NUM_SAMPLE_DATA * MAX_POINTERS];
-        
-        // Temporary data structures for doing the pointer ID mapping.
-        final int[] mLast2Next = new int[MAX_POINTERS];
-        final int[] mNext2Last = new int[MAX_POINTERS];
-        final long[] mNext2LastDistance = new long[MAX_POINTERS];
-        
-        // Temporary data structure for generating the final motion data.
-        final float[] mReportData = new float[MotionEvent.NUM_SAMPLE_DATA * MAX_POINTERS];
-        
-        // This is not used here, but can be used by callers for state tracking.
-        int mAddingPointerOffset = 0;
-        final boolean[] mDown = new boolean[MAX_POINTERS];
-        
-        void dumpIntArray(PrintWriter pw, int[] array) {
-            pw.print("[");
-            for (int i=0; i<array.length; i++) {
-                if (i > 0) pw.print(", ");
-                pw.print(array[i]);
-            }
-            pw.print("]");
-        }
-        
-        void dumpBooleanArray(PrintWriter pw, boolean[] array) {
-            pw.print("[");
-            for (int i=0; i<array.length; i++) {
-                if (i > 0) pw.print(", ");
-                pw.print(array[i] ? "true" : "false");
-            }
-            pw.print("]");
-        }
-        
-        void dump(PrintWriter pw, String prefix) {
-            pw.print(prefix); pw.print("xPrecision="); pw.print(xPrecision);
-                    pw.print(" yPrecision="); pw.println(yPrecision);
-            pw.print(prefix); pw.print("xMoveScale="); pw.print(xMoveScale);
-                    pw.print(" yMoveScale="); pw.println(yMoveScale);
-            if (currentMove != null) {
-                pw.print(prefix); pw.print("currentMove="); pw.println(currentMove);
-            }
-            if (changed || mDownTime != 0) {
-                pw.print(prefix); pw.print("changed="); pw.print(changed);
-                        pw.print(" mDownTime="); pw.println(mDownTime);
-            }
-            pw.print(prefix); pw.print("mPointerIds="); dumpIntArray(pw, mPointerIds);
-                    pw.println("");
-            if (mSkipLastPointers || mLastNumPointers != 0) {
-                pw.print(prefix); pw.print("mSkipLastPointers="); pw.print(mSkipLastPointers);
-                        pw.print(" mLastNumPointers="); pw.println(mLastNumPointers);
-                pw.print(prefix); pw.print("mLastData="); dumpIntArray(pw, mLastData);
-                        pw.println("");
-            }
-            if (mNextNumPointers != 0) {
-                pw.print(prefix); pw.print("mNextNumPointers="); pw.println(mNextNumPointers);
-                pw.print(prefix); pw.print("mNextData="); dumpIntArray(pw, mNextData);
-                        pw.println("");
-            }
-            pw.print(prefix); pw.print("mDroppedBadPoint=");
-                    dumpBooleanArray(pw, mDroppedBadPoint); pw.println("");
-            pw.print(prefix); pw.print("mAddingPointerOffset="); pw.println(mAddingPointerOffset);
-            pw.print(prefix); pw.print("mDown=");
-                    dumpBooleanArray(pw, mDown); pw.println("");
-        }
-        
-        MotionState(int mx, int my) {
-            xPrecision = mx;
-            yPrecision = my;
-            xMoveScale = mx != 0 ? (1.0f/mx) : 1.0f;
-            yMoveScale = my != 0 ? (1.0f/my) : 1.0f;
-            for (int i=0; i<MAX_POINTERS; i++) {
-                mPointerIds[i] = i;
-            }
-        }
-        
-        /**
-         * Special hack for devices that have bad screen data: if one of the
-         * points has moved more than a screen height from the last position,
-         * then drop it.
-         */
-        void dropBadPoint(InputDevice dev) {
-            // We should always have absY, but let's be paranoid.
-            if (dev.absY == null) {
-                return;
-            }
-            // Don't do anything if a finger is going down or up.  We run
-            // here before assigning pointer IDs, so there isn't a good
-            // way to do per-finger matching.
-            if (mNextNumPointers != mLastNumPointers) {
-                return;
-            }
-            
-            // We consider a single movement across more than a 7/16 of
-            // the long size of the screen to be bad.  This was a magic value
-            // determined by looking at the maximum distance it is feasible
-            // to actually move in one sample.
-            final int maxDy = ((dev.absY.maxValue-dev.absY.minValue)*7)/16;
-            
-            // Look through all new points and see if any are farther than
-            // acceptable from all previous points.
-            for (int i=mNextNumPointers-1; i>=0; i--) {
-                final int ioff = i * MotionEvent.NUM_SAMPLE_DATA;
-                //final int x = mNextData[ioff + MotionEvent.SAMPLE_X];
-                final int y = mNextData[ioff + MotionEvent.SAMPLE_Y];
-                if (DEBUG_HACKS) Slog.v("InputDevice", "Looking at next point #" + i + ": y=" + y);
-                boolean dropped = false;
-                if (!mDroppedBadPoint[i] && mLastNumPointers > 0) {
-                    dropped = true;
-                    int closestDy = -1;
-                    int closestY = -1;
-                    // We will drop this new point if it is sufficiently
-                    // far away from -all- last points.
-                    for (int j=mLastNumPointers-1; j>=0; j--) {
-                        final int joff = j * MotionEvent.NUM_SAMPLE_DATA;
-                        //int dx = x - mLastData[joff + MotionEvent.SAMPLE_X];
-                        int dy = y - mLastData[joff + MotionEvent.SAMPLE_Y];
-                        //if (dx < 0) dx = -dx;
-                        if (dy < 0) dy = -dy;
-                        if (DEBUG_HACKS) Slog.v("InputDevice", "Comparing with last point #" + j
-                                + ": y=" + mLastData[joff] + " dy=" + dy);
-                        if (dy < maxDy) {
-                            dropped = false;
-                            break;
-                        } else if (closestDy < 0 || dy < closestDy) {
-                            closestDy = dy;
-                            closestY = mLastData[joff + MotionEvent.SAMPLE_Y];
-                        }
-                    }
-                    if (dropped) {
-                        dropped = true;
-                        Slog.i("InputDevice", "Dropping bad point #" + i
-                                + ": newY=" + y + " closestDy=" + closestDy
-                                + " maxDy=" + maxDy);
-                        mNextData[ioff + MotionEvent.SAMPLE_Y] = closestY;
-                        break;
-                    }
-                }
-                mDroppedBadPoint[i] = dropped;
-            }
-        }
-        
-        void dropJumpyPoint(InputDevice dev) {
-            // We should always have absY, but let's be paranoid.
-            if (dev.absY == null) {
-                return;
-            }
-            final int jumpyEpsilon = dev.absY.range / JUMPY_EPSILON_DIVISOR;
-            
-            final int nextNumPointers = mNextNumPointers;
-            final int lastNumPointers = mLastNumPointers;
-            final int[] nextData = mNextData;
-            final int[] lastData = mLastData;
-            
-            if (nextNumPointers != mLastNumPointers) {
-                if (DEBUG_HACKS) {
-                    Slog.d("InputDevice", "Different pointer count " + lastNumPointers + 
-                            " -> " + nextNumPointers);
-                    for (int i = 0; i < nextNumPointers; i++) {
-                        int ioff = i * MotionEvent.NUM_SAMPLE_DATA;
-                        Slog.d("InputDevice", "Pointer " + i + " (" + 
-                                mNextData[ioff + MotionEvent.SAMPLE_X] + ", " +
-                                mNextData[ioff + MotionEvent.SAMPLE_Y] + ")");
-                    }
-                }
-                
-                // Just drop the first few events going from 1 to 2 pointers.
-                // They're bad often enough that they're not worth considering.
-                if (lastNumPointers == 1 && nextNumPointers == 2
-                        && mJumpyPointsDropped < JUMPY_TRANSITION_DROPS) {
-                    mNextNumPointers = 1;
-                    mJumpyPointsDropped++;
-                } else if (lastNumPointers == 2 && nextNumPointers == 1
-                        && mJumpyPointsDropped < JUMPY_TRANSITION_DROPS) {
-                    // The event when we go from 2 -> 1 tends to be messed up too
-                    System.arraycopy(lastData, 0, nextData, 0, 
-                            lastNumPointers * MotionEvent.NUM_SAMPLE_DATA);
-                    mNextNumPointers = lastNumPointers;
-                    mJumpyPointsDropped++;
-                    
-                    if (DEBUG_HACKS) {
-                        for (int i = 0; i < mNextNumPointers; i++) {
-                            int ioff = i * MotionEvent.NUM_SAMPLE_DATA;
-                            Slog.d("InputDevice", "Pointer " + i + " replaced (" + 
-                                    mNextData[ioff + MotionEvent.SAMPLE_X] + ", " +
-                                    mNextData[ioff + MotionEvent.SAMPLE_Y] + ")");
-                        }
-                    }
-                } else {
-                    mJumpyPointsDropped = 0;
-                    
-                    if (DEBUG_HACKS) {
-                        Slog.d("InputDevice", "Transition - drop limit reset");
-                    }
-                }
-                return;
-            }
-            
-            // A 'jumpy' point is one where the coordinate value for one axis
-            // has jumped to the other pointer's location. No need to do anything
-            // else if we only have one pointer.
-            if (nextNumPointers < 2) {
-                return;
-            }
-            
-            int badPointerIndex = -1;
-            int badPointerReplaceXWith = 0;
-            int badPointerReplaceYWith = 0;
-            int badPointerDistance = Integer.MIN_VALUE;
-            for (int i = nextNumPointers - 1; i >= 0; i--) {
-                boolean dropx = false;
-                boolean dropy = false;
-                
-                // Limit how many times a jumpy point can get dropped.
-                if (mJumpyPointsDropped < JUMPY_DROP_LIMIT) {
-                    final int ioff = i * MotionEvent.NUM_SAMPLE_DATA;
-                    final int x = nextData[ioff + MotionEvent.SAMPLE_X];
-                    final int y = nextData[ioff + MotionEvent.SAMPLE_Y];
-                    
-                    if (DEBUG_HACKS) {
-                        Slog.d("InputDevice", "Point " + i + " (" + x + ", " + y + ")");
-                    }
-
-                    // Check if a touch point is too close to another's coordinates
-                    for (int j = 0; j < nextNumPointers && !dropx && !dropy; j++) {
-                        if (j == i) {
-                            continue;
-                        }
-
-                        final int joff = j * MotionEvent.NUM_SAMPLE_DATA;
-                        final int xOther = nextData[joff + MotionEvent.SAMPLE_X];
-                        final int yOther = nextData[joff + MotionEvent.SAMPLE_Y];
-
-                        dropx = Math.abs(x - xOther) <= jumpyEpsilon;
-                        dropy = Math.abs(y - yOther) <= jumpyEpsilon;
-                    }
-                    
-                    if (dropx) {
-                        int xreplace = lastData[MotionEvent.SAMPLE_X];
-                        int yreplace = lastData[MotionEvent.SAMPLE_Y];
-                        int distance = Math.abs(yreplace - y);
-                        for (int j = 1; j < lastNumPointers; j++) {
-                            final int joff = j * MotionEvent.NUM_SAMPLE_DATA;
-                            int lasty = lastData[joff + MotionEvent.SAMPLE_Y];   
-                            int currDist = Math.abs(lasty - y);
-                            if (currDist < distance) {
-                                xreplace = lastData[joff + MotionEvent.SAMPLE_X];
-                                yreplace = lasty;
-                                distance = currDist;
-                            }
-                        }
-                        
-                        int badXDelta = Math.abs(xreplace - x);
-                        if (badXDelta > badPointerDistance) {
-                            badPointerDistance = badXDelta;
-                            badPointerIndex = i;
-                            badPointerReplaceXWith = xreplace;
-                            badPointerReplaceYWith = yreplace;
-                        }
-                    } else if (dropy) {
-                        int xreplace = lastData[MotionEvent.SAMPLE_X];
-                        int yreplace = lastData[MotionEvent.SAMPLE_Y];
-                        int distance = Math.abs(xreplace - x);
-                        for (int j = 1; j < lastNumPointers; j++) {
-                            final int joff = j * MotionEvent.NUM_SAMPLE_DATA;
-                            int lastx = lastData[joff + MotionEvent.SAMPLE_X];   
-                            int currDist = Math.abs(lastx - x);
-                            if (currDist < distance) {
-                                xreplace = lastx;
-                                yreplace = lastData[joff + MotionEvent.SAMPLE_Y];
-                                distance = currDist;
-                            }
-                        }
-                        
-                        int badYDelta = Math.abs(yreplace - y);
-                        if (badYDelta > badPointerDistance) {
-                            badPointerDistance = badYDelta;
-                            badPointerIndex = i;
-                            badPointerReplaceXWith = xreplace;
-                            badPointerReplaceYWith = yreplace;
-                        }
-                    }
-                }
-            }
-            if (badPointerIndex >= 0) {
-                if (DEBUG_HACKS) {
-                    Slog.d("InputDevice", "Replacing bad pointer " + badPointerIndex +
-                            " with (" + badPointerReplaceXWith + ", " + badPointerReplaceYWith +
-                            ")");
-                }
-
-                final int offset = badPointerIndex * MotionEvent.NUM_SAMPLE_DATA;
-                nextData[offset + MotionEvent.SAMPLE_X] = badPointerReplaceXWith;
-                nextData[offset + MotionEvent.SAMPLE_Y] = badPointerReplaceYWith;
-                mJumpyPointsDropped++;
-            } else {
-                mJumpyPointsDropped = 0;
-            }
-        }
-        
-        /**
-         * Special hack for devices that have bad screen data: aggregate and
-         * compute averages of the coordinate data, to reduce the amount of
-         * jitter seen by applications.
-         */
-        int[] generateAveragedData(int upOrDownPointer, int lastNumPointers,
-                int nextNumPointers) {
-            final int numPointers = mLastNumPointers;
-            final int[] rawData = mLastData;
-            if (DEBUG_HACKS) Slog.v("InputDevice", "lastNumPointers=" + lastNumPointers
-                    + " nextNumPointers=" + nextNumPointers
-                    + " numPointers=" + numPointers);
-            for (int i=0; i<numPointers; i++) {
-                final int ioff = i * MotionEvent.NUM_SAMPLE_DATA;
-                // We keep the average data in offsets based on the pointer
-                // ID, so we don't need to move it around as fingers are
-                // pressed and released.
-                final int p = mPointerIds[i];
-                final int poff = p * MotionEvent.NUM_SAMPLE_DATA * HISTORY_SIZE;
-                if (i == upOrDownPointer && lastNumPointers != nextNumPointers) {
-                    if (lastNumPointers < nextNumPointers) {
-                        // This pointer is going down.  Clear its history
-                        // and start fresh.
-                        if (DEBUG_HACKS) Slog.v("InputDevice", "Pointer down @ index "
-                                + upOrDownPointer + " id " + mPointerIds[i]);
-                        mHistoryDataStart[i] = 0;
-                        mHistoryDataEnd[i] = 0;
-                        System.arraycopy(rawData, ioff, mHistoryData, poff,
-                                MotionEvent.NUM_SAMPLE_DATA);
-                        System.arraycopy(rawData, ioff, mAveragedData, ioff,
-                                MotionEvent.NUM_SAMPLE_DATA);
-                        continue;
-                    } else {
-                        // The pointer is going up.  Just fall through to
-                        // recompute the last averaged point (and don't add
-                        // it as a new point to include in the average).
-                        if (DEBUG_HACKS) Slog.v("InputDevice", "Pointer up @ index "
-                                + upOrDownPointer + " id " + mPointerIds[i]);
-                    }
-                } else {
-                    int end = mHistoryDataEnd[i];
-                    int eoff = poff + (end*MotionEvent.NUM_SAMPLE_DATA);
-                    int oldX = mHistoryData[eoff + MotionEvent.SAMPLE_X];
-                    int oldY = mHistoryData[eoff + MotionEvent.SAMPLE_Y];
-                    int newX = rawData[ioff + MotionEvent.SAMPLE_X];
-                    int newY = rawData[ioff + MotionEvent.SAMPLE_Y];
-                    int dx = newX-oldX;
-                    int dy = newY-oldY;
-                    int delta = dx*dx + dy*dy;
-                    if (DEBUG_HACKS) Slog.v("InputDevice", "Delta from last: " + delta);
-                    if (delta >= (75*75)) {
-                        // Magic number, if moving farther than this, turn
-                        // off filtering to avoid lag in response.
-                        mHistoryDataStart[i] = 0;
-                        mHistoryDataEnd[i] = 0;
-                        System.arraycopy(rawData, ioff, mHistoryData, poff,
-                                MotionEvent.NUM_SAMPLE_DATA);
-                        System.arraycopy(rawData, ioff, mAveragedData, ioff,
-                                MotionEvent.NUM_SAMPLE_DATA);
-                        continue;
-                    } else {
-                        end++;
-                        if (end >= HISTORY_SIZE) {
-                            end -= HISTORY_SIZE;
-                        }
-                        mHistoryDataEnd[i] = end;
-                        int noff = poff + (end*MotionEvent.NUM_SAMPLE_DATA);
-                        mHistoryData[noff + MotionEvent.SAMPLE_X] = newX;
-                        mHistoryData[noff + MotionEvent.SAMPLE_Y] = newY;
-                        mHistoryData[noff + MotionEvent.SAMPLE_PRESSURE]
-                                = rawData[ioff + MotionEvent.SAMPLE_PRESSURE];
-                        int start = mHistoryDataStart[i];
-                        if (end == start) {
-                            start++;
-                            if (start >= HISTORY_SIZE) {
-                                start -= HISTORY_SIZE;
-                            }
-                            mHistoryDataStart[i] = start;
-                        }
-                    }
-                }
-                
-                // Now compute the average.
-                int start = mHistoryDataStart[i];
-                int end = mHistoryDataEnd[i];
-                int x=0, y=0;
-                int totalPressure = 0;
-                while (start != end) {
-                    int soff = poff + (start*MotionEvent.NUM_SAMPLE_DATA);
-                    int pressure = mHistoryData[soff + MotionEvent.SAMPLE_PRESSURE];
-                    if (pressure <= 0) pressure = 1;
-                    x += mHistoryData[soff + MotionEvent.SAMPLE_X] * pressure;
-                    y += mHistoryData[soff + MotionEvent.SAMPLE_Y] * pressure;
-                    totalPressure += pressure;
-                    start++;
-                    if (start >= HISTORY_SIZE) start = 0;
-                }
-                int eoff = poff + (end*MotionEvent.NUM_SAMPLE_DATA);
-                int pressure = mHistoryData[eoff + MotionEvent.SAMPLE_PRESSURE];
-                if (pressure <= 0) pressure = 1;
-                x += mHistoryData[eoff + MotionEvent.SAMPLE_X] * pressure;
-                y += mHistoryData[eoff + MotionEvent.SAMPLE_Y] * pressure;
-                totalPressure += pressure;
-                x /= totalPressure;
-                y /= totalPressure;
-                if (DEBUG_HACKS) Slog.v("InputDevice", "Averaging " + totalPressure
-                        + " weight: (" + x + "," + y + ")");
-                mAveragedData[ioff + MotionEvent.SAMPLE_X] = x;
-                mAveragedData[ioff + MotionEvent.SAMPLE_Y] = y;
-                mAveragedData[ioff + MotionEvent.SAMPLE_PRESSURE] =
-                        rawData[ioff + MotionEvent.SAMPLE_PRESSURE];
-                mAveragedData[ioff + MotionEvent.SAMPLE_SIZE] =
-                        rawData[ioff + MotionEvent.SAMPLE_SIZE];
-            }
-            return mAveragedData;
-        }
-        
-        private boolean assignPointer(int nextIndex, boolean allowOverlap) {
-            final int lastNumPointers = mLastNumPointers;
-            final int[] next2Last = mNext2Last;
-            final long[] next2LastDistance = mNext2LastDistance;
-            final int[] last2Next = mLast2Next;
-            final int[] lastData = mLastData;
-            final int[] nextData = mNextData;
-            final int id = nextIndex * MotionEvent.NUM_SAMPLE_DATA;
-            
-            if (DEBUG_POINTERS) Slog.v("InputDevice", "assignPointer: nextIndex="
-                    + nextIndex + " dataOff=" + id);
-            final int x1 = nextData[id + MotionEvent.SAMPLE_X];
-            final int y1 = nextData[id + MotionEvent.SAMPLE_Y];
-            
-            long bestDistance = -1;
-            int bestIndex = -1;
-            for (int j=0; j<lastNumPointers; j++) {
-                // If we are not allowing multiple new points to be assigned
-                // to the same old pointer, then skip this one if it is already
-                // detected as a conflict (-2).
-                if (!allowOverlap && last2Next[j] < -1) {
-                    continue;
-                }
-                final int jd = j * MotionEvent.NUM_SAMPLE_DATA;
-                final int xd = lastData[jd + MotionEvent.SAMPLE_X] - x1;
-                final int yd = lastData[jd + MotionEvent.SAMPLE_Y] - y1;
-                final long distance = xd*(long)xd + yd*(long)yd;
-                if (bestDistance == -1 || distance < bestDistance) {
-                    bestDistance = distance;
-                    bestIndex = j;
-                }
-            }
-            
-            if (DEBUG_POINTERS) Slog.v("InputDevice", "New index " + nextIndex
-                    + " best old index=" + bestIndex + " (distance="
-                    + bestDistance + ")");
-            next2Last[nextIndex] = bestIndex;
-            next2LastDistance[nextIndex] = bestDistance;
-            
-            if (bestIndex < 0) {
-                return true;
-            }
-            
-            if (last2Next[bestIndex] == -1) {
-                last2Next[bestIndex] = nextIndex;
-                return false;
-            }
-            
-            if (DEBUG_POINTERS) Slog.v("InputDevice", "Old index " + bestIndex
-                    + " has multiple best new pointers!");
-            
-            last2Next[bestIndex] = -2;
-            return true;
-        }
-        
-        private int updatePointerIdentifiers() {
-            final int[] lastData = mLastData;
-            final int[] nextData = mNextData;
-            final int nextNumPointers = mNextNumPointers;
-            final int lastNumPointers = mLastNumPointers;
-            
-            if (nextNumPointers == 1 && lastNumPointers == 1) {
-                System.arraycopy(nextData, 0, lastData, 0,
-                        MotionEvent.NUM_SAMPLE_DATA);
-                return -1;
-            }
-            
-            // Clear our old state.
-            final int[] last2Next = mLast2Next;
-            for (int i=0; i<lastNumPointers; i++) {
-                last2Next[i] = -1;
-            }
-            
-            if (DEBUG_POINTERS) Slog.v("InputDevice",
-                    "Update pointers: lastNumPointers=" + lastNumPointers
-                    + " nextNumPointers=" + nextNumPointers);
-            
-            // Figure out the closes new points to the previous points.
-            final int[] next2Last = mNext2Last;
-            final long[] next2LastDistance = mNext2LastDistance;
-            boolean conflicts = false;
-            for (int i=0; i<nextNumPointers; i++) {
-                conflicts |= assignPointer(i, true);
-            }
-            
-            // Resolve ambiguities in pointer mappings, when two or more
-            // new pointer locations find their best previous location is
-            // the same.
-            if (conflicts) {
-                if (DEBUG_POINTERS) Slog.v("InputDevice", "Resolving conflicts");
-                
-                for (int i=0; i<lastNumPointers; i++) {
-                    if (last2Next[i] != -2) {
-                        continue;
-                    }
-                    
-                    // Note that this algorithm is far from perfect.  Ideally
-                    // we should do something like the one described at
-                    // http://portal.acm.org/citation.cfm?id=997856
-                    
-                    if (DEBUG_POINTERS) Slog.v("InputDevice",
-                            "Resolving last index #" + i);
-                    
-                    int numFound;
-                    do {
-                        numFound = 0;
-                        long worstDistance = 0;
-                        int worstJ = -1;
-                        for (int j=0; j<nextNumPointers; j++) {
-                            if (next2Last[j] != i) {
-                                continue;
-                            }
-                            numFound++;
-                            if (worstDistance < next2LastDistance[j]) {
-                                worstDistance = next2LastDistance[j];
-                                worstJ = j;
-                            }
-                        }
-                        
-                        if (worstJ >= 0) {
-                            if (DEBUG_POINTERS) Slog.v("InputDevice",
-                                    "Worst new pointer: " + worstJ
-                                    + " (distance=" + worstDistance + ")");
-                            if (assignPointer(worstJ, false)) {
-                                // In this case there is no last pointer
-                                // remaining for this new one!
-                                next2Last[worstJ] = -1;
-                            }
-                        }
-                    } while (numFound > 2);
-                }
-            }
-            
-            int retIndex = -1;
-            
-            if (lastNumPointers < nextNumPointers) {
-                // We have one or more new pointers that are down.  Create a
-                // new pointer identifier for one of them.
-                if (DEBUG_POINTERS) Slog.v("InputDevice", "Adding new pointer");
-                int nextId = 0;
-                int i=0;
-                while (i < lastNumPointers) {
-                    if (mPointerIds[i] > nextId) {
-                        // Found a hole, insert the pointer here.
-                        if (DEBUG_POINTERS) Slog.v("InputDevice",
-                                "Inserting new pointer at hole " + i);
-                        System.arraycopy(mPointerIds, i, mPointerIds,
-                                i+1, lastNumPointers-i);
-                        System.arraycopy(lastData, i*MotionEvent.NUM_SAMPLE_DATA,
-                                lastData, (i+1)*MotionEvent.NUM_SAMPLE_DATA,
-                                (lastNumPointers-i)*MotionEvent.NUM_SAMPLE_DATA);
-                        System.arraycopy(next2Last, i, next2Last,
-                                i+1, lastNumPointers-i);
-                        break;
-                    }
-                    i++;
-                    nextId++;
-                }
-                
-                if (DEBUG_POINTERS) Slog.v("InputDevice",
-                        "New pointer id " + nextId + " at index " + i);
-                
-                mLastNumPointers++;
-                retIndex = i;
-                mPointerIds[i] = nextId;
-                
-                // And assign this identifier to the first new pointer.
-                for (int j=0; j<nextNumPointers; j++) {
-                    if (next2Last[j] < 0) {
-                        if (DEBUG_POINTERS) Slog.v("InputDevice",
-                                "Assigning new id to new pointer index " + j);
-                        next2Last[j] = i;
-                        break;
-                    }
-                }
-            }
-            
-            // Propagate all of the current data into the appropriate
-            // location in the old data to match the pointer ID that was
-            // assigned to it.
-            for (int i=0; i<nextNumPointers; i++) {
-                int lastIndex = next2Last[i];
-                if (lastIndex >= 0) {
-                    if (DEBUG_POINTERS) Slog.v("InputDevice",
-                            "Copying next pointer index " + i
-                            + " to last index " + lastIndex);
-                    System.arraycopy(nextData, i*MotionEvent.NUM_SAMPLE_DATA,
-                            lastData, lastIndex*MotionEvent.NUM_SAMPLE_DATA,
-                            MotionEvent.NUM_SAMPLE_DATA);
-                }
-            }
-            
-            if (lastNumPointers > nextNumPointers) {
-                // One or more pointers has gone up.  Find the first one,
-                // and adjust accordingly.
-                if (DEBUG_POINTERS) Slog.v("InputDevice", "Removing old pointer");
-                for (int i=0; i<lastNumPointers; i++) {
-                    if (last2Next[i] == -1) {
-                        if (DEBUG_POINTERS) Slog.v("InputDevice",
-                                "Removing old pointer at index " + i);
-                        retIndex = i;
-                        break;
-                    }
-                }
-            }
-            
-            return retIndex;
-        }
-        
-        void removeOldPointer(int index) {
-            final int lastNumPointers = mLastNumPointers;
-            if (index >= 0 && index < lastNumPointers) {
-                System.arraycopy(mPointerIds, index+1, mPointerIds,
-                        index, lastNumPointers-index-1);
-                System.arraycopy(mLastData, (index+1)*MotionEvent.NUM_SAMPLE_DATA,
-                        mLastData, (index)*MotionEvent.NUM_SAMPLE_DATA,
-                        (lastNumPointers-index-1)*MotionEvent.NUM_SAMPLE_DATA);
-                mLastNumPointers--;
-            }
-        }
-        
-        MotionEvent generateAbsMotion(InputDevice device, long curTime,
-                long curTimeNano, Display display, int orientation,
-                int metaState) {
-            
-            if (mSkipLastPointers) {
-                mSkipLastPointers = false;
-                mLastNumPointers = 0;
-            }
-            
-            if (mNextNumPointers <= 0 && mLastNumPointers <= 0) {
-                return null;
-            }
-            
-            final int lastNumPointers = mLastNumPointers;
-            final int nextNumPointers = mNextNumPointers;
-            if (mNextNumPointers > MAX_POINTERS) {
-                Slog.w("InputDevice", "Number of pointers " + mNextNumPointers
-                        + " exceeded maximum of " + MAX_POINTERS);
-                mNextNumPointers = MAX_POINTERS;
-            }
-            
-            int upOrDownPointer = updatePointerIdentifiers();
-            
-            final float[] reportData = mReportData;
-            final int[] rawData;
-            if (KeyInputQueue.BAD_TOUCH_HACK) {
-                rawData = generateAveragedData(upOrDownPointer, lastNumPointers,
-                        nextNumPointers);
-            } else {
-                rawData = mLastData;
-            }
-            
-            final int numPointers = mLastNumPointers;
-            
-            if (DEBUG_POINTERS) Slog.v("InputDevice", "Processing "
-                    + numPointers + " pointers (going from " + lastNumPointers
-                    + " to " + nextNumPointers + ")");
-            
-            for (int i=0; i<numPointers; i++) {
-                final int pos = i * MotionEvent.NUM_SAMPLE_DATA;
-                reportData[pos + MotionEvent.SAMPLE_X] = rawData[pos + MotionEvent.SAMPLE_X];
-                reportData[pos + MotionEvent.SAMPLE_Y] = rawData[pos + MotionEvent.SAMPLE_Y];
-                reportData[pos + MotionEvent.SAMPLE_PRESSURE] = rawData[pos + MotionEvent.SAMPLE_PRESSURE];
-                reportData[pos + MotionEvent.SAMPLE_SIZE] = rawData[pos + MotionEvent.SAMPLE_SIZE];
-            }
-            
-            int action;
-            int edgeFlags = 0;
-            if (nextNumPointers != lastNumPointers) {
-                if (nextNumPointers > lastNumPointers) {
-                    if (lastNumPointers == 0) {
-                        action = MotionEvent.ACTION_DOWN;
-                        mDownTime = curTime;
-                    } else {
-                        action = MotionEvent.ACTION_POINTER_DOWN
-                                | (upOrDownPointer << MotionEvent.ACTION_POINTER_INDEX_SHIFT);
-                    }
-                } else {
-                    if (numPointers == 1) {
-                        action = MotionEvent.ACTION_UP;
-                    } else {
-                        action = MotionEvent.ACTION_POINTER_UP
-                                | (upOrDownPointer << MotionEvent.ACTION_POINTER_INDEX_SHIFT);
-                    }
-                }
-                currentMove = null;
-            } else {
-                action = MotionEvent.ACTION_MOVE;
-            }
-            
-            final int dispW = display.getWidth()-1;
-            final int dispH = display.getHeight()-1;
-            int w = dispW;
-            int h = dispH;
-            if (orientation == Surface.ROTATION_90
-                    || orientation == Surface.ROTATION_270) {
-                int tmp = w;
-                w = h;
-                h = tmp;
-            }
-            
-            final AbsoluteInfo absX = device.absX;
-            final AbsoluteInfo absY = device.absY;
-            final AbsoluteInfo absPressure = device.absPressure;
-            final AbsoluteInfo absSize = device.absSize;
-            for (int i=0; i<numPointers; i++) {
-                final int j = i * MotionEvent.NUM_SAMPLE_DATA;
-            
-                if (absX != null) {
-                    reportData[j + MotionEvent.SAMPLE_X] =
-                            ((reportData[j + MotionEvent.SAMPLE_X]-absX.minValue)
-                                / absX.range) * w;
-                }
-                if (absY != null) {
-                    reportData[j + MotionEvent.SAMPLE_Y] =
-                            ((reportData[j + MotionEvent.SAMPLE_Y]-absY.minValue)
-                                / absY.range) * h;
-                }
-                if (absPressure != null) {
-                    reportData[j + MotionEvent.SAMPLE_PRESSURE] = 
-                            ((reportData[j + MotionEvent.SAMPLE_PRESSURE]-absPressure.minValue)
-                                / (float)absPressure.range);
-                }
-                if (absSize != null) {
-                    reportData[j + MotionEvent.SAMPLE_SIZE] = 
-                            ((reportData[j + MotionEvent.SAMPLE_SIZE]-absSize.minValue)
-                                / (float)absSize.range);
-                }
-                
-                switch (orientation) {
-                    case Surface.ROTATION_90: {
-                        final float temp = reportData[j + MotionEvent.SAMPLE_X];
-                        reportData[j + MotionEvent.SAMPLE_X] = reportData[j + MotionEvent.SAMPLE_Y];
-                        reportData[j + MotionEvent.SAMPLE_Y] = w-temp;
-                        break;
-                    }
-                    case Surface.ROTATION_180: {
-                        reportData[j + MotionEvent.SAMPLE_X] = w-reportData[j + MotionEvent.SAMPLE_X];
-                        reportData[j + MotionEvent.SAMPLE_Y] = h-reportData[j + MotionEvent.SAMPLE_Y];
-                        break;
-                    }
-                    case Surface.ROTATION_270: {
-                        final float temp = reportData[j + MotionEvent.SAMPLE_X];
-                        reportData[j + MotionEvent.SAMPLE_X] = h-reportData[j + MotionEvent.SAMPLE_Y];
-                        reportData[j + MotionEvent.SAMPLE_Y] = temp;
-                        break;
-                    }
-                }
-            }
-            
-            // We only consider the first pointer when computing the edge
-            // flags, since they are global to the event.
-            if (action == MotionEvent.ACTION_DOWN) {
-                if (reportData[MotionEvent.SAMPLE_X] <= 0) {
-                    edgeFlags |= MotionEvent.EDGE_LEFT;
-                } else if (reportData[MotionEvent.SAMPLE_X] >= dispW) {
-                    edgeFlags |= MotionEvent.EDGE_RIGHT;
-                }
-                if (reportData[MotionEvent.SAMPLE_Y] <= 0) {
-                    edgeFlags |= MotionEvent.EDGE_TOP;
-                } else if (reportData[MotionEvent.SAMPLE_Y] >= dispH) {
-                    edgeFlags |= MotionEvent.EDGE_BOTTOM;
-                }
-            }
-            
-            if (currentMove != null) {
-                if (false) Slog.i("InputDevice", "Adding batch x="
-                        + reportData[MotionEvent.SAMPLE_X]
-                        + " y=" + reportData[MotionEvent.SAMPLE_Y]
-                        + " to " + currentMove);
-                currentMove.addBatch(curTime, reportData, metaState);
-                if (WindowManagerPolicy.WATCH_POINTER) {
-                    Slog.i("KeyInputQueue", "Updating: " + currentMove);
-                }
-                return null;
-            }
-            
-            MotionEvent me = MotionEvent.obtainNano(mDownTime, curTime,
-                    curTimeNano, action, numPointers, mPointerIds, reportData,
-                    metaState, xPrecision, yPrecision, device.id, edgeFlags);
-            if (action == MotionEvent.ACTION_MOVE) {
-                currentMove = me;
-            }
-            
-            if (nextNumPointers < lastNumPointers) {
-                removeOldPointer(upOrDownPointer);
-            }
-            
-            return me;
-        }
-        
-        boolean hasMore() {
-            return mLastNumPointers != mNextNumPointers;
-        }
-        
-        void finish() {
-            mNextNumPointers = mAddingPointerOffset = 0;
-            mNextData[MotionEvent.SAMPLE_PRESSURE] = 0;
-        }
-        
-        MotionEvent generateRelMotion(InputDevice device, long curTime,
-                long curTimeNano, int orientation, int metaState) {
-            
-            final float[] scaled = mReportData;
-            
-            // For now we only support 1 pointer with relative motions.
-            scaled[MotionEvent.SAMPLE_X] = mNextData[MotionEvent.SAMPLE_X];
-            scaled[MotionEvent.SAMPLE_Y] = mNextData[MotionEvent.SAMPLE_Y];
-            scaled[MotionEvent.SAMPLE_PRESSURE] = 1.0f;
-            scaled[MotionEvent.SAMPLE_SIZE] = 0;
-            int edgeFlags = 0;
-            
-            int action;
-            if (mNextNumPointers != mLastNumPointers) {
-                mNextData[MotionEvent.SAMPLE_X] =
-                        mNextData[MotionEvent.SAMPLE_Y] = 0;
-                if (mNextNumPointers > 0 && mLastNumPointers == 0) {
-                    action = MotionEvent.ACTION_DOWN;
-                    mDownTime = curTime;
-                } else if (mNextNumPointers == 0) {
-                    action = MotionEvent.ACTION_UP;
-                } else {
-                    action = MotionEvent.ACTION_MOVE;
-                }
-                mLastNumPointers = mNextNumPointers;
-                currentMove = null;
-            } else {
-                action = MotionEvent.ACTION_MOVE;
-            }
-            
-            scaled[MotionEvent.SAMPLE_X] *= xMoveScale;
-            scaled[MotionEvent.SAMPLE_Y] *= yMoveScale;
-            switch (orientation) {
-                case Surface.ROTATION_90: {
-                    final float temp = scaled[MotionEvent.SAMPLE_X];
-                    scaled[MotionEvent.SAMPLE_X] = scaled[MotionEvent.SAMPLE_Y];
-                    scaled[MotionEvent.SAMPLE_Y] = -temp;
-                    break;
-                }
-                case Surface.ROTATION_180: {
-                    scaled[MotionEvent.SAMPLE_X] = -scaled[MotionEvent.SAMPLE_X];
-                    scaled[MotionEvent.SAMPLE_Y] = -scaled[MotionEvent.SAMPLE_Y];
-                    break;
-                }
-                case Surface.ROTATION_270: {
-                    final float temp = scaled[MotionEvent.SAMPLE_X];
-                    scaled[MotionEvent.SAMPLE_X] = -scaled[MotionEvent.SAMPLE_Y];
-                    scaled[MotionEvent.SAMPLE_Y] = temp;
-                    break;
-                }
-            }
-            
-            if (currentMove != null) {
-                if (false) Slog.i("InputDevice", "Adding batch x="
-                        + scaled[MotionEvent.SAMPLE_X]
-                        + " y=" + scaled[MotionEvent.SAMPLE_Y]
-                        + " to " + currentMove);
-                currentMove.addBatch(curTime, scaled, metaState);
-                if (WindowManagerPolicy.WATCH_POINTER) {
-                    Slog.i("KeyInputQueue", "Updating: " + currentMove);
-                }
-                return null;
-            }
-            
-            MotionEvent me = MotionEvent.obtainNano(mDownTime, curTime,
-                    curTimeNano, action, 1, mPointerIds, scaled, metaState,
-                    xPrecision, yPrecision, device.id, edgeFlags);
-            if (action == MotionEvent.ACTION_MOVE) {
-                currentMove = me;
-            }
-            return me;
-        }
-    }
-    
-    static class AbsoluteInfo {
-        int minValue;
-        int maxValue;
-        int range;
-        int flat;
-        int fuzz;
-        
-        final void dump(PrintWriter pw) {
-            pw.print("minValue="); pw.print(minValue);
-            pw.print(" maxValue="); pw.print(maxValue);
-            pw.print(" range="); pw.print(range);
-            pw.print(" flat="); pw.print(flat);
-            pw.print(" fuzz="); pw.print(fuzz);
-        }
-    };
-    
-    InputDevice(int _id, int _classes, String _name,
-            AbsoluteInfo _absX, AbsoluteInfo _absY,
-            AbsoluteInfo _absPressure, AbsoluteInfo _absSize) {
-        id = _id;
-        classes = _classes;
-        name = _name;
-        absX = _absX;
-        absY = _absY;
-        absPressure = _absPressure;
-        absSize = _absSize;
-    }
-};
diff --git a/services/java/com/android/server/InputManager.java b/services/java/com/android/server/InputManager.java
new file mode 100644
index 0000000..b4f46ab
--- /dev/null
+++ b/services/java/com/android/server/InputManager.java
@@ -0,0 +1,481 @@
+/*
+ * Copyright (C) 2010 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.android.server;
+
+import com.android.internal.util.XmlUtils;
+
+import org.xmlpull.v1.XmlPullParser;
+
+import android.content.Context;
+import android.content.pm.PackageManager;
+import android.content.res.Configuration;
+import android.os.Environment;
+import android.os.LocalPowerManager;
+import android.os.PowerManager;
+import android.util.Slog;
+import android.util.Xml;
+import android.view.InputChannel;
+import android.view.KeyEvent;
+import android.view.MotionEvent;
+import android.view.Surface;
+import android.view.WindowManagerPolicy;
+
+import java.io.BufferedReader;
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.FileNotFoundException;
+import java.io.FileReader;
+import java.io.IOException;
+import java.io.InputStreamReader;
+import java.io.PrintWriter;
+import java.util.ArrayList;
+
+/*
+ * Wraps the C++ InputManager and provides its callbacks.
+ * 
+ * XXX Tempted to promote this to a first-class service, ie. InputManagerService, to
+ *     improve separation of concerns with respect to the window manager.
+ */
+public class InputManager {
+    static final String TAG = "InputManager";
+    
+    private final Callbacks mCallbacks;
+    private final Context mContext;
+    private final WindowManagerService mWindowManagerService;
+    
+    private int mTouchScreenConfig;
+    private int mKeyboardConfig;
+    private int mNavigationConfig;
+    
+    private static native void nativeInit(Callbacks callbacks);
+    private static native void nativeStart();
+    private static native void nativeSetDisplaySize(int displayId, int width, int height);
+    private static native void nativeSetDisplayOrientation(int displayId, int rotation);
+    
+    private static native int nativeGetScanCodeState(int deviceId, int deviceClasses,
+            int scanCode);
+    private static native int nativeGetKeyCodeState(int deviceId, int deviceClasses,
+            int keyCode);
+    private static native int nativeGetSwitchState(int deviceId, int deviceClasses,
+            int sw);
+    private static native boolean nativeHasKeys(int[] keyCodes, boolean[] keyExists);
+    private static native void nativeRegisterInputChannel(InputChannel inputChannel);
+    private static native void nativeUnregisterInputChannel(InputChannel inputChannel);
+    private static native int nativeInjectKeyEvent(KeyEvent event,
+            int injectorPid, int injectorUid, boolean sync, int timeoutMillis);
+    private static native int nativeInjectMotionEvent(MotionEvent event,
+            int injectorPid, int injectorUid, boolean sync, int timeoutMillis);
+    private static native void nativeSetInputWindows(InputWindow[] windows);
+    private static native void nativeSetInputDispatchMode(boolean enabled, boolean frozen);
+    private static native void nativeSetFocusedApplication(InputApplication application);
+    private static native void nativePreemptInputDispatch();
+    private static native String nativeDump();
+    
+    // Device class as defined by EventHub.
+    private static final int CLASS_KEYBOARD = 0x00000001;
+    private static final int CLASS_ALPHAKEY = 0x00000002;
+    private static final int CLASS_TOUCHSCREEN = 0x00000004;
+    private static final int CLASS_TRACKBALL = 0x00000008;
+    private static final int CLASS_TOUCHSCREEN_MT = 0x00000010;
+    private static final int CLASS_DPAD = 0x00000020;
+    
+    // Input event injection constants defined in InputDispatcher.h.
+    static final int INPUT_EVENT_INJECTION_SUCCEEDED = 0;
+    static final int INPUT_EVENT_INJECTION_PERMISSION_DENIED = 1;
+    static final int INPUT_EVENT_INJECTION_FAILED = 2;
+    static final int INPUT_EVENT_INJECTION_TIMED_OUT = 3;
+    
+    public InputManager(Context context, WindowManagerService windowManagerService) {
+        this.mContext = context;
+        this.mWindowManagerService = windowManagerService;
+        
+        this.mCallbacks = new Callbacks();
+        
+        mTouchScreenConfig = Configuration.TOUCHSCREEN_NOTOUCH;
+        mKeyboardConfig = Configuration.KEYBOARD_NOKEYS;
+        mNavigationConfig = Configuration.NAVIGATION_NONAV;
+        
+        init();
+    }
+    
+    private void init() {
+        Slog.i(TAG, "Initializing input manager");
+        nativeInit(mCallbacks);
+    }
+    
+    public void start() {
+        Slog.i(TAG, "Starting input manager");
+        nativeStart();
+    }
+    
+    public void setDisplaySize(int displayId, int width, int height) {
+        if (width <= 0 || height <= 0) {
+            throw new IllegalArgumentException("Invalid display id or dimensions.");
+        }
+        
+        Slog.i(TAG, "Setting display #" + displayId + " size to " + width + "x" + height);
+        nativeSetDisplaySize(displayId, width, height);
+    }
+    
+    public void setDisplayOrientation(int displayId, int rotation) {
+        if (rotation < Surface.ROTATION_0 || rotation > Surface.ROTATION_270) {
+            throw new IllegalArgumentException("Invalid rotation.");
+        }
+        
+        Slog.i(TAG, "Setting display #" + displayId + " orientation to " + rotation);
+        nativeSetDisplayOrientation(displayId, rotation);
+    }
+    
+    public void getInputConfiguration(Configuration config) {
+        if (config == null) {
+            throw new IllegalArgumentException("config must not be null.");
+        }
+        
+        config.touchscreen = mTouchScreenConfig;
+        config.keyboard = mKeyboardConfig;
+        config.navigation = mNavigationConfig;
+    }
+    
+    public int getScancodeState(int code) {
+        return nativeGetScanCodeState(0, -1, code);
+    }
+    
+    public int getScancodeState(int deviceId, int code) {
+        return nativeGetScanCodeState(deviceId, -1, code);
+    }
+    
+    public int getTrackballScancodeState(int code) {
+        return nativeGetScanCodeState(-1, CLASS_TRACKBALL, code);
+    }
+    
+    public int getDPadScancodeState(int code) {
+        return nativeGetScanCodeState(-1, CLASS_DPAD, code);
+    }
+    
+    public int getKeycodeState(int code) {
+        return nativeGetKeyCodeState(0, -1, code);
+    }
+    
+    public int getKeycodeState(int deviceId, int code) {
+        return nativeGetKeyCodeState(deviceId, -1, code);
+    }
+    
+    public int getTrackballKeycodeState(int code) {
+        return nativeGetKeyCodeState(-1, CLASS_TRACKBALL, code);
+    }
+    
+    public int getDPadKeycodeState(int code) {
+        return nativeGetKeyCodeState(-1, CLASS_DPAD, code);
+    }
+
+    public int getSwitchState(int sw) {
+        return nativeGetSwitchState(-1, -1, sw);
+    }
+    
+    public int getSwitchState(int deviceId, int sw) {
+        return nativeGetSwitchState(deviceId, -1, sw);
+    }
+
+    public boolean hasKeys(int[] keyCodes, boolean[] keyExists) {
+        if (keyCodes == null) {
+            throw new IllegalArgumentException("keyCodes must not be null.");
+        }
+        if (keyExists == null) {
+            throw new IllegalArgumentException("keyExists must not be null.");
+        }
+        
+        return nativeHasKeys(keyCodes, keyExists);
+    }
+    
+    public void registerInputChannel(InputChannel inputChannel) {
+        if (inputChannel == null) {
+            throw new IllegalArgumentException("inputChannel must not be null.");
+        }
+        
+        nativeRegisterInputChannel(inputChannel);
+    }
+    
+    public void unregisterInputChannel(InputChannel inputChannel) {
+        if (inputChannel == null) {
+            throw new IllegalArgumentException("inputChannel must not be null.");
+        }
+        
+        nativeUnregisterInputChannel(inputChannel);
+    }
+    
+    /**
+     * Injects a key event into the event system on behalf of an application.
+     * This method may block even if sync is false because it must wait for previous events
+     * to be dispatched before it can determine whether input event injection will be
+     * permitted based on the current input focus.
+     * @param event The event to inject.
+     * @param injectorPid The pid of the injecting application.
+     * @param injectorUid The uid of the injecting application.
+     * @param sync If true, waits for the event to be completed before returning.
+     * @param timeoutMillis The injection timeout in milliseconds.
+     * @return One of the INPUT_EVENT_INJECTION_XXX constants.
+     */
+    public int injectKeyEvent(KeyEvent event, int injectorPid, int injectorUid,
+            boolean sync, int timeoutMillis) {
+        if (event == null) {
+            throw new IllegalArgumentException("event must not be null");
+        }
+        if (injectorPid < 0 || injectorUid < 0) {
+            throw new IllegalArgumentException("injectorPid and injectorUid must not be negative.");
+        }
+        if (timeoutMillis <= 0) {
+            throw new IllegalArgumentException("timeoutMillis must be positive");
+        }
+        
+        return nativeInjectKeyEvent(event, injectorPid, injectorUid,
+                sync, timeoutMillis);
+    }
+    
+    /**
+     * Injects a motion event into the event system on behalf of an application.
+     * This method may block even if sync is false because it must wait for previous events
+     * to be dispatched before it can determine whether input event injection will be
+     * permitted based on the current input focus.
+     * @param event The event to inject.
+     * @param sync If true, waits for the event to be completed before returning.
+     * @param injectorPid The pid of the injecting application.
+     * @param injectorUid The uid of the injecting application.
+     * @param sync If true, waits for the event to be completed before returning.
+     * @param timeoutMillis The injection timeout in milliseconds.
+     * @return One of the INPUT_EVENT_INJECTION_XXX constants.
+     */
+    public int injectMotionEvent(MotionEvent event, int injectorPid, int injectorUid,
+            boolean sync, int timeoutMillis) {
+        if (event == null) {
+            throw new IllegalArgumentException("event must not be null");
+        }
+        if (injectorPid < 0 || injectorUid < 0) {
+            throw new IllegalArgumentException("injectorPid and injectorUid must not be negative.");
+        }
+        if (timeoutMillis <= 0) {
+            throw new IllegalArgumentException("timeoutMillis must be positive");
+        }
+        
+        return nativeInjectMotionEvent(event, injectorPid, injectorUid,
+                sync, timeoutMillis);
+    }
+    
+    public void setInputWindows(InputWindow[] windows) {
+        nativeSetInputWindows(windows);
+    }
+    
+    public void setFocusedApplication(InputApplication application) {
+        nativeSetFocusedApplication(application);
+    }
+    
+    public void preemptInputDispatch() {
+        nativePreemptInputDispatch();
+    }
+    
+    public void setInputDispatchMode(boolean enabled, boolean frozen) {
+        nativeSetInputDispatchMode(enabled, frozen);
+    }
+    
+    public void dump(PrintWriter pw) {
+        String dumpStr = nativeDump();
+        if (dumpStr != null) {
+            pw.println(dumpStr);
+        }
+    }
+    
+    private static final class VirtualKeyDefinition {
+        public int scanCode;
+        
+        // configured position data, specified in display coords
+        public int centerX;
+        public int centerY;
+        public int width;
+        public int height;
+    }
+    
+    /*
+     * Callbacks from native.
+     */
+    private class Callbacks {
+        static final String TAG = "InputManager-Callbacks";
+        
+        private static final boolean DEBUG_VIRTUAL_KEYS = false;
+        private static final String EXCLUDED_DEVICES_PATH = "etc/excluded-input-devices.xml";
+        
+        @SuppressWarnings("unused")
+        public void virtualKeyDownFeedback() {
+            mWindowManagerService.mInputMonitor.virtualKeyDownFeedback();
+        }
+        
+        @SuppressWarnings("unused")
+        public void notifyConfigurationChanged(long whenNanos,
+                int touchScreenConfig, int keyboardConfig, int navigationConfig) {
+            mTouchScreenConfig = touchScreenConfig;
+            mKeyboardConfig = keyboardConfig;
+            mNavigationConfig = navigationConfig;
+            
+            mWindowManagerService.sendNewConfiguration();
+        }
+        
+        @SuppressWarnings("unused")
+        public void notifyLidSwitchChanged(long whenNanos, boolean lidOpen) {
+            mWindowManagerService.mInputMonitor.notifyLidSwitchChanged(whenNanos, lidOpen);
+        }
+        
+        @SuppressWarnings("unused")
+        public void notifyInputChannelBroken(InputChannel inputChannel) {
+            mWindowManagerService.mInputMonitor.notifyInputChannelBroken(inputChannel);
+        }
+
+        @SuppressWarnings("unused")
+        public long notifyInputChannelANR(InputChannel inputChannel) {
+            return mWindowManagerService.mInputMonitor.notifyInputChannelANR(inputChannel);
+        }
+
+        @SuppressWarnings("unused")
+        public void notifyInputChannelRecoveredFromANR(InputChannel inputChannel) {
+            mWindowManagerService.mInputMonitor.notifyInputChannelRecoveredFromANR(inputChannel);
+        }
+        
+        @SuppressWarnings("unused")
+        public long notifyANR(Object token) {
+            return mWindowManagerService.mInputMonitor.notifyANR(token);
+        }
+        
+        @SuppressWarnings("unused")
+        public int interceptKeyBeforeQueueing(long whenNanos, int keyCode, boolean down,
+                int policyFlags, boolean isScreenOn) {
+            return mWindowManagerService.mInputMonitor.interceptKeyBeforeQueueing(
+                    whenNanos, keyCode, down, policyFlags, isScreenOn);
+        }
+        
+        @SuppressWarnings("unused")
+        public boolean interceptKeyBeforeDispatching(InputChannel focus, int action,
+                int flags, int keyCode, int metaState, int repeatCount, int policyFlags) {
+            return mWindowManagerService.mInputMonitor.interceptKeyBeforeDispatching(focus,
+                    action, flags, keyCode, metaState, repeatCount, policyFlags);
+        }
+        
+        @SuppressWarnings("unused")
+        public boolean checkInjectEventsPermission(int injectorPid, int injectorUid) {
+            return mContext.checkPermission(
+                    android.Manifest.permission.INJECT_EVENTS, injectorPid, injectorUid)
+                    == PackageManager.PERMISSION_GRANTED;
+        }
+        
+        @SuppressWarnings("unused")
+        public void notifyAppSwitchComing() {
+            mWindowManagerService.mInputMonitor.notifyAppSwitchComing();
+        }
+        
+        @SuppressWarnings("unused")
+        public boolean filterTouchEvents() {
+            return mContext.getResources().getBoolean(
+                    com.android.internal.R.bool.config_filterTouchEvents);
+        }
+        
+        @SuppressWarnings("unused")
+        public boolean filterJumpyTouchEvents() {
+            return mContext.getResources().getBoolean(
+                    com.android.internal.R.bool.config_filterJumpyTouchEvents);
+        }
+        
+        @SuppressWarnings("unused")
+        public VirtualKeyDefinition[] getVirtualKeyDefinitions(String deviceName) {
+            ArrayList<VirtualKeyDefinition> keys = new ArrayList<VirtualKeyDefinition>();
+            
+            try {
+                FileInputStream fis = new FileInputStream(
+                        "/sys/board_properties/virtualkeys." + deviceName);
+                InputStreamReader isr = new InputStreamReader(fis);
+                BufferedReader br = new BufferedReader(isr, 2048);
+                String str = br.readLine();
+                if (str != null) {
+                    String[] it = str.split(":");
+                    if (DEBUG_VIRTUAL_KEYS) Slog.v(TAG, "***** VIRTUAL KEYS: " + it);
+                    final int N = it.length-6;
+                    for (int i=0; i<=N; i+=6) {
+                        if (!"0x01".equals(it[i])) {
+                            Slog.w(TAG, "Unknown virtual key type at elem #" + i
+                                    + ": " + it[i]);
+                            continue;
+                        }
+                        try {
+                            VirtualKeyDefinition key = new VirtualKeyDefinition();
+                            key.scanCode = Integer.parseInt(it[i+1]);
+                            key.centerX = Integer.parseInt(it[i+2]);
+                            key.centerY = Integer.parseInt(it[i+3]);
+                            key.width = Integer.parseInt(it[i+4]);
+                            key.height = Integer.parseInt(it[i+5]);
+                            if (DEBUG_VIRTUAL_KEYS) Slog.v(TAG, "Virtual key "
+                                    + key.scanCode + ": center=" + key.centerX + ","
+                                    + key.centerY + " size=" + key.width + "x"
+                                    + key.height);
+                            keys.add(key);
+                        } catch (NumberFormatException e) {
+                            Slog.w(TAG, "Bad number at region " + i + " in: "
+                                    + str, e);
+                        }
+                    }
+                }
+                br.close();
+            } catch (FileNotFoundException e) {
+                Slog.i(TAG, "No virtual keys found");
+            } catch (IOException e) {
+                Slog.w(TAG, "Error reading virtual keys", e);
+            }
+            
+            return keys.toArray(new VirtualKeyDefinition[keys.size()]);
+        }
+        
+        @SuppressWarnings("unused")
+        public String[] getExcludedDeviceNames() {
+            ArrayList<String> names = new ArrayList<String>();
+            
+            // Read partner-provided list of excluded input devices
+            XmlPullParser parser = null;
+            // Environment.getRootDirectory() is a fancy way of saying ANDROID_ROOT or "/system".
+            File confFile = new File(Environment.getRootDirectory(), EXCLUDED_DEVICES_PATH);
+            FileReader confreader = null;
+            try {
+                confreader = new FileReader(confFile);
+                parser = Xml.newPullParser();
+                parser.setInput(confreader);
+                XmlUtils.beginDocument(parser, "devices");
+
+                while (true) {
+                    XmlUtils.nextElement(parser);
+                    if (!"device".equals(parser.getName())) {
+                        break;
+                    }
+                    String name = parser.getAttributeValue(null, "name");
+                    if (name != null) {
+                        names.add(name);
+                    }
+                }
+            } catch (FileNotFoundException e) {
+                // It's ok if the file does not exist.
+            } catch (Exception e) {
+                Slog.e(TAG, "Exception while parsing '" + confFile.getAbsolutePath() + "'", e);
+            } finally {
+                try { if (confreader != null) confreader.close(); } catch (IOException e) { }
+            }
+            
+            return names.toArray(new String[names.size()]);
+        }
+    }
+}
diff --git a/services/java/com/android/server/InputMethodManagerService.java b/services/java/com/android/server/InputMethodManagerService.java
index 0c205ca..4d35bec 100644
--- a/services/java/com/android/server/InputMethodManagerService.java
+++ b/services/java/com/android/server/InputMethodManagerService.java
@@ -26,8 +26,7 @@
 import com.android.internal.view.IInputMethodSession;
 import com.android.internal.view.InputBindResult;
 
-import com.android.server.status.IconData;
-import com.android.server.status.StatusBarService;
+import com.android.server.StatusBarManagerService;
 
 import org.xmlpull.v1.XmlPullParserException;
 
@@ -110,9 +109,7 @@
     final Context mContext;
     final Handler mHandler;
     final SettingsObserver mSettingsObserver;
-    final StatusBarService mStatusBar;
-    final IBinder mInputMethodIcon;
-    final IconData mInputMethodData;
+    final StatusBarManagerService mStatusBar;
     final IWindowManager mIWindowManager;
     final HandlerCaller mCaller;
 
@@ -447,7 +444,7 @@
         }
     }
 
-    public InputMethodManagerService(Context context, StatusBarService statusBar) {
+    public InputMethodManagerService(Context context, StatusBarManagerService statusBar) {
         mContext = context;
         mHandler = new Handler(this);
         mIWindowManager = IWindowManager.Stub.asInterface(
@@ -508,9 +505,7 @@
         }
 
         mStatusBar = statusBar;
-        mInputMethodData = IconData.makeIcon("ime", null, 0, 0, 0);
-        mInputMethodIcon = statusBar.addIcon(mInputMethodData, null);
-        statusBar.setIconVisibility(mInputMethodIcon, false);
+        statusBar.setIconVisibility("ime", false);
 
         mSettingsObserver = new SettingsObserver(mHandler);
         updateFromSettingsLocked();
@@ -889,16 +884,30 @@
                     MSG_UNBIND_METHOD, mCurSeq, mCurClient.client));
         }
     }
+    
+    private void finishSession(SessionState sessionState) {
+        if (sessionState != null && sessionState.session != null) {
+            try {
+                sessionState.session.finishSession();
+            } catch (RemoteException e) {
+                Slog.w(TAG, "Session failed to close due to remote exception", e);
+            }
+        }
+    }
 
     void clearCurMethodLocked() {
         if (mCurMethod != null) {
             for (ClientState cs : mClients.values()) {
                 cs.sessionRequested = false;
+                finishSession(cs.curSession);
                 cs.curSession = null;
             }
+
+            finishSession(mEnabledSession);
+            mEnabledSession = null;
             mCurMethod = null;
         }
-        mStatusBar.setIconVisibility(mInputMethodIcon, false);
+        mStatusBar.setIconVisibility("ime", false);
     }
 
     public void onServiceDisconnected(ComponentName name) {
@@ -932,13 +941,11 @@
             synchronized (mMethodMap) {
                 if (iconId == 0) {
                     if (DEBUG) Slog.d(TAG, "hide the small icon for the input method");
-                    mStatusBar.setIconVisibility(mInputMethodIcon, false);
+                    mStatusBar.setIconVisibility("ime", false);
                 } else if (packageName != null) {
                     if (DEBUG) Slog.d(TAG, "show a small icon for the input method");
-                    mInputMethodData.iconId = iconId;
-                    mInputMethodData.iconPackage = packageName;
-                    mStatusBar.updateIcon(mInputMethodIcon, mInputMethodData, null);
-                    mStatusBar.setIconVisibility(mInputMethodIcon, true);
+                    mStatusBar.setIcon("ime", packageName, iconId, 0);
+                    mStatusBar.setIconVisibility("ime", true);
                 }
             }
         } finally {
@@ -1720,8 +1727,6 @@
                 p.println("    sessionRequested=" + ci.sessionRequested);
                 p.println("    curSession=" + ci.curSession);
             }
-            p.println("  mInputMethodIcon=" + mInputMethodIcon);
-            p.println("  mInputMethodData=" + mInputMethodData);
             p.println("  mCurMethodId=" + mCurMethodId);
             client = mCurClient;
             p.println("  mCurClient=" + client + " mCurSeq=" + mCurSeq);
diff --git a/services/java/com/android/server/InputWindow.java b/services/java/com/android/server/InputWindow.java
new file mode 100644
index 0000000..8da0cf1
--- /dev/null
+++ b/services/java/com/android/server/InputWindow.java
@@ -0,0 +1,66 @@
+/*
+ * Copyright (C) 2010 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.android.server;
+
+import android.view.InputChannel;
+
+/**
+ * Describes input-related window properties for use by the input dispatcher.
+ * 
+ * @hide
+ */
+public final class InputWindow {
+    // The input channel associated with the window.
+    public InputChannel inputChannel;
+    
+    // Window layout params attributes.  (WindowManager.LayoutParams)
+    public int layoutParamsFlags;
+    public int layoutParamsType;
+    
+    // Dispatching timeout.
+    public long dispatchingTimeoutNanos;
+    
+    // Window frame position.
+    public int frameLeft;
+    public int frameTop;
+    
+    // Window touchable area.
+    public int touchableAreaLeft;
+    public int touchableAreaTop;
+    public int touchableAreaRight;
+    public int touchableAreaBottom;
+    
+    // Window is visible.
+    public boolean visible;
+    
+    // Window has focus.
+    public boolean hasFocus;
+    
+    // Window has wallpaper.  (window is the current wallpaper target)
+    public boolean hasWallpaper;
+    
+    // Input event dispatching is paused.
+    public boolean paused;
+    
+    // Id of process and user that owns the window.
+    public int ownerPid;
+    public int ownerUid;
+    
+    public void recycle() {
+        inputChannel = null;
+    }
+}
diff --git a/services/java/com/android/server/InputWindowList.java b/services/java/com/android/server/InputWindowList.java
new file mode 100644
index 0000000..1cbb2cc
--- /dev/null
+++ b/services/java/com/android/server/InputWindowList.java
@@ -0,0 +1,89 @@
+/*
+ * Copyright (C) 2010 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.android.server;
+
+
+/**
+ * A specialized list of window information objects backed by an array.
+ * 
+ * This class is part of an InputManager optimization to avoid allocating objects and arrays
+ * unnecessarily.  Internally, it keeps an array full of demand-allocated objects that it
+ * recycles each time the list is cleared.  The used portion of the array is padded with a null.
+ * 
+ * The contents of the list are intended to be Z-ordered from top to bottom.
+ * 
+ * @hide
+ */
+public final class InputWindowList {
+    private InputWindow[] mArray;
+    private int mCount;
+    
+    /**
+     * Creates an empty list.
+     */
+    public InputWindowList() {
+        mArray = new InputWindow[8];
+    }
+    
+    /**
+     * Clears the list.
+     */
+    public void clear() {
+        if (mCount == 0) {
+            return;
+        }
+        
+        int count = mCount;
+        mCount = 0;
+        mArray[count] = mArray[0];
+        while (count > 0) {
+            count -= 1;
+            mArray[count].recycle();
+        }
+        mArray[0] = null;
+    }
+    
+    /**
+     * Adds an uninitialized input window object to the list and returns it.
+     */
+    public InputWindow add() {
+        if (mCount + 1 == mArray.length) {
+            InputWindow[] oldArray = mArray;
+            mArray = new InputWindow[oldArray.length * 2];
+            System.arraycopy(oldArray, 0, mArray, 0, mCount);
+        }
+        
+        // Grab object from tail (after used section) if available.
+        InputWindow item = mArray[mCount + 1];
+        if (item == null) {
+            item = new InputWindow();
+        }
+        
+        mArray[mCount] = item;
+        mCount += 1;
+        mArray[mCount] = null;
+        return item;
+    }
+    
+    /**
+     * Gets the input window objects as a null-terminated array.
+     * @return The input window array.
+     */
+    public InputWindow[] toNullTerminatedArray() {
+        return mArray;
+    }
+}
\ No newline at end of file
diff --git a/services/java/com/android/server/Installer.java b/services/java/com/android/server/Installer.java
index 2eaa58c..1f34eba 100644
--- a/services/java/com/android/server/Installer.java
+++ b/services/java/com/android/server/Installer.java
@@ -166,11 +166,17 @@
 		}
 	}
 
-    public int install(String name, int uid, int gid) {
+    public int install(String name, boolean useEncryptedFilesystem, int uid, int gid) {
         StringBuilder builder = new StringBuilder("install");
         builder.append(' ');
         builder.append(name);
         builder.append(' ');
+        if (useEncryptedFilesystem) {
+            builder.append('1');
+        } else {
+            builder.append('0');
+        }
+        builder.append(' ');
         builder.append(uid);
         builder.append(' ');
         builder.append(gid);
@@ -203,33 +209,57 @@
         return execute(builder.toString());
     }
 
-    public int remove(String name) {
+    public int remove(String name, boolean useEncryptedFilesystem) {
         StringBuilder builder = new StringBuilder("remove");
         builder.append(' ');
         builder.append(name);
+        builder.append(' ');
+        if (useEncryptedFilesystem) {
+            builder.append('1');
+        } else {
+            builder.append('0');
+        }
         return execute(builder.toString());
     }
 
-    public int rename(String oldname, String newname) {
+    public int rename(String oldname, String newname, boolean useEncryptedFilesystem) {
         StringBuilder builder = new StringBuilder("rename");
         builder.append(' ');
         builder.append(oldname);
         builder.append(' ');
         builder.append(newname);
+        builder.append(' ');
+        if (useEncryptedFilesystem) {
+            builder.append('1');
+        } else {
+            builder.append('0');
+        }
         return execute(builder.toString());
     }
 
-    public int deleteCacheFiles(String name) {
+    public int deleteCacheFiles(String name, boolean useEncryptedFilesystem) {
         StringBuilder builder = new StringBuilder("rmcache");
         builder.append(' ');
         builder.append(name);
+        builder.append(' ');
+        if (useEncryptedFilesystem) {
+            builder.append('1');
+        } else {
+            builder.append('0');
+        }
         return execute(builder.toString());
     }
     
-    public int clearUserData(String name) {
+    public int clearUserData(String name, boolean useEncryptedFilesystem) {
         StringBuilder builder = new StringBuilder("rmuserdata");
         builder.append(' ');
         builder.append(name);
+        builder.append(' ');
+        if (useEncryptedFilesystem) {
+            builder.append('1');
+        } else {
+            builder.append('0');
+        }
         return execute(builder.toString());
     }
     
@@ -263,7 +293,7 @@
     }
     
     public int getSizeInfo(String pkgName, String apkPath,
-            String fwdLockApkPath, PackageStats pStats) {
+            String fwdLockApkPath, PackageStats pStats, boolean useEncryptedFilesystem) {
         StringBuilder builder = new StringBuilder("getsize");
         builder.append(' ');
         builder.append(pkgName);
@@ -271,6 +301,13 @@
         builder.append(apkPath);
         builder.append(' ');
         builder.append(fwdLockApkPath != null ? fwdLockApkPath : "!");
+        builder.append(' ');
+        if (useEncryptedFilesystem) {
+            builder.append('1');
+        } else {
+            builder.append('0');
+        }
+
         String s = transaction(builder.toString());
         String res[] = s.split(" ");
 
diff --git a/services/java/com/android/server/KeyInputQueue.java b/services/java/com/android/server/KeyInputQueue.java
deleted file mode 100644
index f30346b..0000000
--- a/services/java/com/android/server/KeyInputQueue.java
+++ /dev/null
@@ -1,1384 +0,0 @@
-/*
- * Copyright (C) 2007 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.android.server;
-
-import android.content.Context;
-import android.content.res.Configuration;
-import android.content.res.Resources;
-import android.os.Environment;
-import android.os.LatencyTimer;
-import android.os.PowerManager;
-import android.os.SystemClock;
-import android.os.SystemProperties;
-import android.util.Slog;
-import android.util.SparseArray;
-import android.util.Xml;
-import android.view.Display;
-import android.view.KeyEvent;
-import android.view.MotionEvent;
-import android.view.RawInputEvent;
-import android.view.Surface;
-import android.view.WindowManagerPolicy;
-
-import com.android.internal.util.XmlUtils;
-
-import org.xmlpull.v1.XmlPullParser;
-
-import java.io.BufferedReader;
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.FileNotFoundException;
-import java.io.FileReader;
-import java.io.IOException;
-import java.io.InputStreamReader;
-import java.io.PrintWriter;
-import java.util.ArrayList;
-
-public abstract class KeyInputQueue {
-    static final String TAG = "KeyInputQueue";
-
-    static final boolean DEBUG = false;
-    static final boolean DEBUG_VIRTUAL_KEYS = false;
-    static final boolean DEBUG_POINTERS = false;
-    
-    /**
-     * Turn on some hacks we have to improve the touch interaction with a
-     * certain device whose screen currently is not all that good.
-     */
-    static boolean BAD_TOUCH_HACK = false;
-    
-    /**
-     * Turn on some hacks to improve touch interaction with another device
-     * where touch coordinate data can get corrupted.
-     */
-    static boolean JUMPY_TOUCH_HACK = false;
-    
-    private static final String EXCLUDED_DEVICES_PATH = "etc/excluded-input-devices.xml";
-
-    final SparseArray<InputDevice> mDevices = new SparseArray<InputDevice>();
-    final SparseArray<InputDevice> mIgnoredDevices = new SparseArray<InputDevice>();
-    final ArrayList<VirtualKey> mVirtualKeys = new ArrayList<VirtualKey>();
-    final HapticFeedbackCallback mHapticFeedbackCallback;
-    
-    int mGlobalMetaState = 0;
-    boolean mHaveGlobalMetaState = false;
-    
-    final QueuedEvent mFirst;
-    final QueuedEvent mLast;
-    QueuedEvent mCache;
-    int mCacheCount;
-
-    Display mDisplay = null;
-    int mDisplayWidth;
-    int mDisplayHeight;
-    
-    int mOrientation = Surface.ROTATION_0;
-    int[] mKeyRotationMap = null;
-    
-    VirtualKey mPressedVirtualKey = null;
-    
-    PowerManager.WakeLock mWakeLock;
-
-    static final int[] KEY_90_MAP = new int[] {
-        KeyEvent.KEYCODE_DPAD_DOWN, KeyEvent.KEYCODE_DPAD_RIGHT,
-        KeyEvent.KEYCODE_DPAD_RIGHT, KeyEvent.KEYCODE_DPAD_UP,
-        KeyEvent.KEYCODE_DPAD_UP, KeyEvent.KEYCODE_DPAD_LEFT,
-        KeyEvent.KEYCODE_DPAD_LEFT, KeyEvent.KEYCODE_DPAD_DOWN,
-    };
-    
-    static final int[] KEY_180_MAP = new int[] {
-        KeyEvent.KEYCODE_DPAD_DOWN, KeyEvent.KEYCODE_DPAD_UP,
-        KeyEvent.KEYCODE_DPAD_RIGHT, KeyEvent.KEYCODE_DPAD_LEFT,
-        KeyEvent.KEYCODE_DPAD_UP, KeyEvent.KEYCODE_DPAD_DOWN,
-        KeyEvent.KEYCODE_DPAD_LEFT, KeyEvent.KEYCODE_DPAD_RIGHT,
-    };
-    
-    static final int[] KEY_270_MAP = new int[] {
-        KeyEvent.KEYCODE_DPAD_DOWN, KeyEvent.KEYCODE_DPAD_LEFT,
-        KeyEvent.KEYCODE_DPAD_LEFT, KeyEvent.KEYCODE_DPAD_UP,
-        KeyEvent.KEYCODE_DPAD_UP, KeyEvent.KEYCODE_DPAD_RIGHT,
-        KeyEvent.KEYCODE_DPAD_RIGHT, KeyEvent.KEYCODE_DPAD_DOWN,
-    };
-    
-    public static final int FILTER_REMOVE = 0;
-    public static final int FILTER_KEEP = 1;
-    public static final int FILTER_ABORT = -1;
-
-    private static final boolean MEASURE_LATENCY = false;
-    private LatencyTimer lt;
-
-    public interface FilterCallback {
-        int filterEvent(QueuedEvent ev);
-    }
-    
-    public interface HapticFeedbackCallback {
-        void virtualKeyFeedback(KeyEvent event);
-    }
-    
-    static class QueuedEvent {
-        InputDevice inputDevice;
-        long whenNano;
-        int flags; // From the raw event
-        int classType; // One of the class constants in InputEvent
-        Object event;
-        boolean inQueue;
-
-        void copyFrom(QueuedEvent that) {
-            this.inputDevice = that.inputDevice;
-            this.whenNano = that.whenNano;
-            this.flags = that.flags;
-            this.classType = that.classType;
-            this.event = that.event;
-        }
-
-        @Override
-        public String toString() {
-            return "QueuedEvent{"
-                + Integer.toHexString(System.identityHashCode(this))
-                + " " + event + "}";
-        }
-        
-        // not copied
-        QueuedEvent prev;
-        QueuedEvent next;
-    }
-
-    /**
-     * A key that exists as a part of the touch-screen, outside of the normal
-     * display area of the screen.
-     */
-    static class VirtualKey {
-        int scancode;
-        int centerx;
-        int centery;
-        int width;
-        int height;
-        
-        int hitLeft;
-        int hitTop;
-        int hitRight;
-        int hitBottom;
-        
-        InputDevice lastDevice;
-        int lastKeycode;
-        
-        boolean checkHit(int x, int y) {
-            return (x >= hitLeft && x <= hitRight
-                    && y >= hitTop && y <= hitBottom);
-        }
-        
-        void computeHitRect(InputDevice dev, int dw, int dh) {
-            if (dev == lastDevice) {
-                return;
-            }
-            
-            if (DEBUG_VIRTUAL_KEYS) Slog.v(TAG, "computeHitRect for " + scancode
-                    + ": dev=" + dev + " absX=" + dev.absX + " absY=" + dev.absY);
-            
-            lastDevice = dev;
-            
-            int minx = dev.absX.minValue;
-            int maxx = dev.absX.maxValue;
-            
-            int halfw = width/2;
-            int left = centerx - halfw;
-            int right = centerx + halfw;
-            hitLeft = minx + ((left*maxx-minx)/dw);
-            hitRight = minx + ((right*maxx-minx)/dw);
-            
-            int miny = dev.absY.minValue;
-            int maxy = dev.absY.maxValue;
-            
-            int halfh = height/2;
-            int top = centery - halfh;
-            int bottom = centery + halfh;
-            hitTop = miny + ((top*maxy-miny)/dh);
-            hitBottom = miny + ((bottom*maxy-miny)/dh);
-        }
-    }
-
-    private void readVirtualKeys(String deviceName) {
-        try {
-            FileInputStream fis = new FileInputStream(
-                    "/sys/board_properties/virtualkeys." + deviceName);
-            InputStreamReader isr = new InputStreamReader(fis);
-            BufferedReader br = new BufferedReader(isr, 2048);
-            String str = br.readLine();
-            if (str != null) {
-                String[] it = str.split(":");
-                if (DEBUG_VIRTUAL_KEYS) Slog.v(TAG, "***** VIRTUAL KEYS: " + it);
-                final int N = it.length-6;
-                for (int i=0; i<=N; i+=6) {
-                    if (!"0x01".equals(it[i])) {
-                        Slog.w(TAG, "Unknown virtual key type at elem #" + i
-                                + ": " + it[i]);
-                        continue;
-                    }
-                    try {
-                        VirtualKey sb = new VirtualKey();
-                        sb.scancode = Integer.parseInt(it[i+1]);
-                        sb.centerx = Integer.parseInt(it[i+2]);
-                        sb.centery = Integer.parseInt(it[i+3]);
-                        sb.width = Integer.parseInt(it[i+4]);
-                        sb.height = Integer.parseInt(it[i+5]);
-                        if (DEBUG_VIRTUAL_KEYS) Slog.v(TAG, "Virtual key "
-                                + sb.scancode + ": center=" + sb.centerx + ","
-                                + sb.centery + " size=" + sb.width + "x"
-                                + sb.height);
-                        mVirtualKeys.add(sb);
-                    } catch (NumberFormatException e) {
-                        Slog.w(TAG, "Bad number at region " + i + " in: "
-                                + str, e);
-                    }
-                }
-            }
-            br.close();
-        } catch (FileNotFoundException e) {
-            Slog.i(TAG, "No virtual keys found");
-        } catch (IOException e) {
-            Slog.w(TAG, "Error reading virtual keys", e);
-        }
-    }
-
-    private void readExcludedDevices() {
-        // Read partner-provided list of excluded input devices
-        XmlPullParser parser = null;
-        // Environment.getRootDirectory() is a fancy way of saying ANDROID_ROOT or "/system".
-        File confFile = new File(Environment.getRootDirectory(), EXCLUDED_DEVICES_PATH);
-        FileReader confreader = null;
-        try {
-            confreader = new FileReader(confFile);
-            parser = Xml.newPullParser();
-            parser.setInput(confreader);
-            XmlUtils.beginDocument(parser, "devices");
-
-            while (true) {
-                XmlUtils.nextElement(parser);
-                if (!"device".equals(parser.getName())) {
-                    break;
-                }
-                String name = parser.getAttributeValue(null, "name");
-                if (name != null) {
-                    if (DEBUG) Slog.v(TAG, "addExcludedDevice " + name);
-                    addExcludedDevice(name);
-                }
-            }
-        } catch (FileNotFoundException e) {
-            // It's ok if the file does not exist.
-        } catch (Exception e) {
-            Slog.e(TAG, "Exception while parsing '" + confFile.getAbsolutePath() + "'", e);
-        } finally {
-            try { if (confreader != null) confreader.close(); } catch (IOException e) { }
-        }
-    }
-
-    KeyInputQueue(Context context, HapticFeedbackCallback  hapticFeedbackCallback) {
-        if (MEASURE_LATENCY) {
-            lt = new LatencyTimer(100, 1000);
-        }
-
-        Resources r = context.getResources();
-        BAD_TOUCH_HACK = r.getBoolean(com.android.internal.R.bool.config_filterTouchEvents);
-        
-        JUMPY_TOUCH_HACK = r.getBoolean(com.android.internal.R.bool.config_filterJumpyTouchEvents);
-        
-        mHapticFeedbackCallback = hapticFeedbackCallback;
-        
-        readExcludedDevices();
-        
-        PowerManager pm = (PowerManager)context.getSystemService(
-                                                        Context.POWER_SERVICE);
-        mWakeLock = pm.newWakeLock(PowerManager.PARTIAL_WAKE_LOCK,
-                                                        "KeyInputQueue");
-        mWakeLock.setReferenceCounted(false);
-
-        mFirst = new QueuedEvent();
-        mLast = new QueuedEvent();
-        mFirst.next = mLast;
-        mLast.prev = mFirst;
-
-        mThread.start();
-    }
-
-    public void setDisplay(Display display) {
-        mDisplay = display;
-        
-        // We assume at this point that the display dimensions reflect the
-        // natural, unrotated display.  We will perform hit tests for soft
-        // buttons based on that display.
-        mDisplayWidth = display.getWidth();
-        mDisplayHeight = display.getHeight();
-    }
-    
-    public void getInputConfiguration(Configuration config) {
-        synchronized (mFirst) {
-            config.touchscreen = Configuration.TOUCHSCREEN_NOTOUCH;
-            config.keyboard = Configuration.KEYBOARD_NOKEYS;
-            config.navigation = Configuration.NAVIGATION_NONAV;
-            
-            final int N = mDevices.size();
-            for (int i=0; i<N; i++) {
-                InputDevice d = mDevices.valueAt(i);
-                if (d != null) {
-                    if ((d.classes&RawInputEvent.CLASS_TOUCHSCREEN) != 0) {
-                        config.touchscreen
-                                = Configuration.TOUCHSCREEN_FINGER;
-                        //Slog.i("foo", "***** HAVE TOUCHSCREEN!");
-                    }
-                    if ((d.classes&RawInputEvent.CLASS_ALPHAKEY) != 0) {
-                        config.keyboard
-                                = Configuration.KEYBOARD_QWERTY;
-                        //Slog.i("foo", "***** HAVE QWERTY!");
-                    }
-                    if ((d.classes&RawInputEvent.CLASS_TRACKBALL) != 0) {
-                        config.navigation
-                                = Configuration.NAVIGATION_TRACKBALL;
-                        //Slog.i("foo", "***** HAVE TRACKBALL!");
-                    } else if ((d.classes&RawInputEvent.CLASS_DPAD) != 0) {
-                        config.navigation
-                                = Configuration.NAVIGATION_DPAD;
-                        //Slog.i("foo", "***** HAVE DPAD!");
-                    }
-                }
-            }
-        }
-    }
-    
-    public int getScancodeState(int code) {
-        synchronized (mFirst) {
-            VirtualKey vk = mPressedVirtualKey;
-            if (vk != null) {
-                if (vk.scancode == code) {
-                    return 2;
-                }
-            }
-            return nativeGetScancodeState(code);
-        }
-    }
-    
-    public int getScancodeState(int deviceId, int code) {
-        synchronized (mFirst) {
-            VirtualKey vk = mPressedVirtualKey;
-            if (vk != null) {
-                if (vk.scancode == code) {
-                    return 2;
-                }
-            }
-            return nativeGetScancodeState(deviceId, code);
-        }
-    }
-    
-    public int getTrackballScancodeState(int code) {
-        synchronized (mFirst) {
-            final int N = mDevices.size();
-            for (int i=0; i<N; i++) {
-                InputDevice dev = mDevices.valueAt(i);
-                if ((dev.classes&RawInputEvent.CLASS_TRACKBALL) != 0) {
-                    int res = nativeGetScancodeState(dev.id, code);
-                    if (res > 0) {
-                        return res;
-                    }
-                }
-            }
-        }
-        
-        return 0;
-    }
-    
-    public int getDPadScancodeState(int code) {
-        synchronized (mFirst) {
-            final int N = mDevices.size();
-            for (int i=0; i<N; i++) {
-                InputDevice dev = mDevices.valueAt(i);
-                if ((dev.classes&RawInputEvent.CLASS_DPAD) != 0) {
-                    int res = nativeGetScancodeState(dev.id, code);
-                    if (res > 0) {
-                        return res;
-                    }
-                }
-            }
-        }
-        
-        return 0;
-    }
-    
-    public int getKeycodeState(int code) {
-        synchronized (mFirst) {
-            VirtualKey vk = mPressedVirtualKey;
-            if (vk != null) {
-                if (vk.lastKeycode == code) {
-                    return 2;
-                }
-            }
-            return nativeGetKeycodeState(code);
-        }
-    }
-    
-    public int getKeycodeState(int deviceId, int code) {
-        synchronized (mFirst) {
-            VirtualKey vk = mPressedVirtualKey;
-            if (vk != null) {
-                if (vk.lastKeycode == code) {
-                    return 2;
-                }
-            }
-            return nativeGetKeycodeState(deviceId, code);
-        }
-    }
-    
-    public int getTrackballKeycodeState(int code) {
-        synchronized (mFirst) {
-            final int N = mDevices.size();
-            for (int i=0; i<N; i++) {
-                InputDevice dev = mDevices.valueAt(i);
-                if ((dev.classes&RawInputEvent.CLASS_TRACKBALL) != 0) {
-                    int res = nativeGetKeycodeState(dev.id, code);
-                    if (res > 0) {
-                        return res;
-                    }
-                }
-            }
-        }
-        
-        return 0;
-    }
-    
-    public int getDPadKeycodeState(int code) {
-        synchronized (mFirst) {
-            final int N = mDevices.size();
-            for (int i=0; i<N; i++) {
-                InputDevice dev = mDevices.valueAt(i);
-                if ((dev.classes&RawInputEvent.CLASS_DPAD) != 0) {
-                    int res = nativeGetKeycodeState(dev.id, code);
-                    if (res > 0) {
-                        return res;
-                    }
-                }
-            }
-        }
-        
-        return 0;
-    }
-    
-    public static native String getDeviceName(int deviceId);
-    public static native int getDeviceClasses(int deviceId);
-    public static native void addExcludedDevice(String deviceName);
-    public static native boolean getAbsoluteInfo(int deviceId, int axis,
-            InputDevice.AbsoluteInfo outInfo);
-    public static native int getSwitchState(int sw);
-    public static native int getSwitchState(int deviceId, int sw);
-    public static native int nativeGetScancodeState(int code);
-    public static native int nativeGetScancodeState(int deviceId, int code);
-    public static native int nativeGetKeycodeState(int code);
-    public static native int nativeGetKeycodeState(int deviceId, int code);
-    public static native int scancodeToKeycode(int deviceId, int scancode);
-    public static native boolean hasKeys(int[] keycodes, boolean[] keyExists);
-    
-    public static KeyEvent newKeyEvent(InputDevice device, long downTime,
-            long eventTime, boolean down, int keycode, int repeatCount,
-            int scancode, int flags) {
-        return new KeyEvent(
-                downTime, eventTime,
-                down ? KeyEvent.ACTION_DOWN : KeyEvent.ACTION_UP,
-                keycode, repeatCount,
-                device != null ? device.mMetaKeysState : 0,
-                device != null ? device.id : -1, scancode,
-                flags | KeyEvent.FLAG_FROM_SYSTEM);
-    }
-    
-    Thread mThread = new Thread("InputDeviceReader") {
-        public void run() {
-            if (DEBUG) Slog.v(TAG, "InputDeviceReader.run()");
-            android.os.Process.setThreadPriority(
-                    android.os.Process.THREAD_PRIORITY_URGENT_DISPLAY);
-            
-            RawInputEvent ev = new RawInputEvent();
-            while (true) {
-                try {
-                    InputDevice di;
-
-                    // block, doesn't release the monitor
-                    readEvent(ev);
-
-                    boolean send = false;
-                    boolean configChanged = false;
-                    
-                    if (false) {
-                        Slog.i(TAG, "Input event: dev=0x"
-                                + Integer.toHexString(ev.deviceId)
-                                + " type=0x" + Integer.toHexString(ev.type)
-                                + " scancode=" + ev.scancode
-                                + " keycode=" + ev.keycode
-                                + " value=" + ev.value);
-                    }
-                    
-                    if (ev.type == RawInputEvent.EV_DEVICE_ADDED) {
-                        synchronized (mFirst) {
-                            di = newInputDevice(ev.deviceId);
-                            if (di.classes != 0) {
-                                // If this device is some kind of input class,
-                                // we care about it.
-                                mDevices.put(ev.deviceId, di);
-                                if ((di.classes & RawInputEvent.CLASS_TOUCHSCREEN) != 0) {
-                                    readVirtualKeys(di.name);
-                                }
-                                // The configuration may have changed because
-                                // of this device.
-                                configChanged = true;
-                            } else {
-                                // We won't do anything with this device.
-                                mIgnoredDevices.put(ev.deviceId, di);
-                                Slog.i(TAG, "Ignoring non-input device: id=0x"
-                                        + Integer.toHexString(di.id)
-                                        + ", name=" + di.name);
-                            }
-                        }
-                    } else if (ev.type == RawInputEvent.EV_DEVICE_REMOVED) {
-                        synchronized (mFirst) {
-                            if (false) {
-                                Slog.i(TAG, "Device removed: id=0x"
-                                        + Integer.toHexString(ev.deviceId));
-                            }
-                            di = mDevices.get(ev.deviceId);
-                            if (di != null) {
-                                mDevices.delete(ev.deviceId);
-                                // The configuration may have changed because
-                                // of this device.
-                                configChanged = true;
-                            } else if ((di=mIgnoredDevices.get(ev.deviceId)) != null) {
-                                mIgnoredDevices.remove(ev.deviceId);
-                            } else {
-                                Slog.w(TAG, "Removing bad device id: "
-                                        + Integer.toHexString(ev.deviceId));
-                                continue;
-                            }
-                        }
-                    } else {
-                        di = getInputDevice(ev.deviceId);
-                        if (di == null) {
-                            // This may be some junk from an ignored device.
-                            continue;
-                        }
-                        
-                        // first crack at it
-                        send = preprocessEvent(di, ev);
-
-                        if (ev.type == RawInputEvent.EV_KEY) {
-                            di.mMetaKeysState = makeMetaState(ev.keycode,
-                                    ev.value != 0, di.mMetaKeysState);
-                            mHaveGlobalMetaState = false;
-                        }
-                    }
-
-                    if (configChanged) {
-                        synchronized (mFirst) {
-                            addLocked(di, System.nanoTime(), 0,
-                                    RawInputEvent.CLASS_CONFIGURATION_CHANGED,
-                                    null);
-                        }
-                    }
-                    
-                    if (!send) {
-                        continue;
-                    }
-                    
-                    synchronized (mFirst) {
-                        // NOTE: The event timebase absolutely must be the same
-                        // timebase as SystemClock.uptimeMillis().
-                        //curTime = gotOne ? ev.when : SystemClock.uptimeMillis();
-                        final long curTime = SystemClock.uptimeMillis();
-                        final long curTimeNano = System.nanoTime();
-                        //Slog.i(TAG, "curTime=" + curTime + ", systemClock=" + SystemClock.uptimeMillis());
-                        
-                        final int classes = di.classes;
-                        final int type = ev.type;
-                        final int scancode = ev.scancode;
-                        send = false;
-                        
-                        // Is it a key event?
-                        if (type == RawInputEvent.EV_KEY &&
-                                (classes&RawInputEvent.CLASS_KEYBOARD) != 0 &&
-                                (scancode < RawInputEvent.BTN_FIRST ||
-                                        scancode > RawInputEvent.BTN_LAST)) {
-                            boolean down;
-                            if (ev.value != 0) {
-                                down = true;
-                                di.mKeyDownTime = curTime;
-                            } else {
-                                down = false;
-                            }
-                            int keycode = rotateKeyCodeLocked(ev.keycode);
-                            addLocked(di, curTimeNano, ev.flags,
-                                    RawInputEvent.CLASS_KEYBOARD,
-                                    newKeyEvent(di, di.mKeyDownTime, curTime, down,
-                                            keycode, 0, scancode,
-                                            ((ev.flags & WindowManagerPolicy.FLAG_WOKE_HERE) != 0)
-                                             ? KeyEvent.FLAG_WOKE_HERE : 0));
-                            
-                        } else if (ev.type == RawInputEvent.EV_KEY) {
-                            // Single touch protocol: touch going down or up.
-                            if (ev.scancode == RawInputEvent.BTN_TOUCH &&
-                                    (classes&(RawInputEvent.CLASS_TOUCHSCREEN
-                                            |RawInputEvent.CLASS_TOUCHSCREEN_MT))
-                                            == RawInputEvent.CLASS_TOUCHSCREEN) {
-                                di.mAbs.changed = true;
-                                di.mAbs.mDown[0] = ev.value != 0;
-                            
-                            // Trackball (mouse) protocol: press down or up.
-                            } else if (ev.scancode == RawInputEvent.BTN_MOUSE &&
-                                    (classes&RawInputEvent.CLASS_TRACKBALL) != 0) {
-                                di.mRel.changed = true;
-                                di.mRel.mNextNumPointers = ev.value != 0 ? 1 : 0;
-                                send = true;
-                            }
-    
-                        // Process position events from multitouch protocol.
-                        } else if (ev.type == RawInputEvent.EV_ABS &&
-                                (classes&RawInputEvent.CLASS_TOUCHSCREEN_MT) != 0) {
-                            if (ev.scancode == RawInputEvent.ABS_MT_TOUCH_MAJOR) {
-                                di.mAbs.changed = true;
-                                di.mAbs.mNextData[di.mAbs.mAddingPointerOffset
-                                        + MotionEvent.SAMPLE_PRESSURE] = ev.value;
-                            } else if (ev.scancode == RawInputEvent.ABS_MT_POSITION_X) {
-                                di.mAbs.changed = true;
-                                di.mAbs.mNextData[di.mAbs.mAddingPointerOffset
-                                    + MotionEvent.SAMPLE_X] = ev.value;
-                                if (DEBUG_POINTERS) Slog.v(TAG, "MT @"
-                                        + di.mAbs.mAddingPointerOffset
-                                        + " X:" + ev.value);
-                            } else if (ev.scancode == RawInputEvent.ABS_MT_POSITION_Y) {
-                                di.mAbs.changed = true;
-                                di.mAbs.mNextData[di.mAbs.mAddingPointerOffset
-                                    + MotionEvent.SAMPLE_Y] = ev.value;
-                                if (DEBUG_POINTERS) Slog.v(TAG, "MT @"
-                                        + di.mAbs.mAddingPointerOffset
-                                        + " Y:" + ev.value);
-                            } else if (ev.scancode == RawInputEvent.ABS_MT_WIDTH_MAJOR) {
-                                di.mAbs.changed = true;
-                                di.mAbs.mNextData[di.mAbs.mAddingPointerOffset
-                                    + MotionEvent.SAMPLE_SIZE] = ev.value;
-                            }
-                        
-                        // Process position events from single touch protocol.
-                        } else if (ev.type == RawInputEvent.EV_ABS &&
-                                (classes&RawInputEvent.CLASS_TOUCHSCREEN) != 0) {
-                            if (ev.scancode == RawInputEvent.ABS_X) {
-                                di.mAbs.changed = true;
-                                di.curTouchVals[MotionEvent.SAMPLE_X] = ev.value;
-                            } else if (ev.scancode == RawInputEvent.ABS_Y) {
-                                di.mAbs.changed = true;
-                                di.curTouchVals[MotionEvent.SAMPLE_Y] = ev.value;
-                            } else if (ev.scancode == RawInputEvent.ABS_PRESSURE) {
-                                di.mAbs.changed = true;
-                                di.curTouchVals[MotionEvent.SAMPLE_PRESSURE] = ev.value;
-                                di.curTouchVals[MotionEvent.NUM_SAMPLE_DATA
-                                                 + MotionEvent.SAMPLE_PRESSURE] = ev.value;
-                            } else if (ev.scancode == RawInputEvent.ABS_TOOL_WIDTH) {
-                                di.mAbs.changed = true;
-                                di.curTouchVals[MotionEvent.SAMPLE_SIZE] = ev.value;
-                                di.curTouchVals[MotionEvent.NUM_SAMPLE_DATA
-                                                 + MotionEvent.SAMPLE_SIZE] = ev.value;
-                            }
-    
-                        // Process movement events from trackball (mouse) protocol.
-                        } else if (ev.type == RawInputEvent.EV_REL &&
-                                (classes&RawInputEvent.CLASS_TRACKBALL) != 0) {
-                            // Add this relative movement into our totals.
-                            if (ev.scancode == RawInputEvent.REL_X) {
-                                di.mRel.changed = true;
-                                di.mRel.mNextData[MotionEvent.SAMPLE_X] += ev.value;
-                            } else if (ev.scancode == RawInputEvent.REL_Y) {
-                                di.mRel.changed = true;
-                                di.mRel.mNextData[MotionEvent.SAMPLE_Y] += ev.value;
-                            }
-                        }
-                        
-                        // Handle multitouch protocol sync: tells us that the
-                        // driver has returned all data for -one- of the pointers
-                        // that is currently down.
-                        if (ev.type == RawInputEvent.EV_SYN
-                                && ev.scancode == RawInputEvent.SYN_MT_REPORT
-                                && di.mAbs != null) {
-                            di.mAbs.changed = true;
-                            if (di.mAbs.mNextData[MotionEvent.SAMPLE_PRESSURE] > 0) {
-                                // If the value is <= 0, the pointer is not
-                                // down, so keep it in the count.
-                                
-                                if (di.mAbs.mNextData[di.mAbs.mAddingPointerOffset
-                                                      + MotionEvent.SAMPLE_PRESSURE] != 0) {
-                                    final int num = di.mAbs.mNextNumPointers+1;
-                                    di.mAbs.mNextNumPointers = num;
-                                    if (DEBUG_POINTERS) Slog.v(TAG,
-                                            "MT_REPORT: now have " + num + " pointers");
-                                    final int newOffset = (num <= InputDevice.MAX_POINTERS)
-                                            ? (num * MotionEvent.NUM_SAMPLE_DATA)
-                                            : (InputDevice.MAX_POINTERS *
-                                                    MotionEvent.NUM_SAMPLE_DATA);
-                                    di.mAbs.mAddingPointerOffset = newOffset;
-                                    di.mAbs.mNextData[newOffset
-                                            + MotionEvent.SAMPLE_PRESSURE] = 0;
-                                } else {
-                                    if (DEBUG_POINTERS) Slog.v(TAG, "MT_REPORT: no pointer");
-                                }
-                            }
-                        
-                        // Handle general event sync: all data for the current
-                        // event update has been delivered.
-                        } else if (send || (ev.type == RawInputEvent.EV_SYN
-                                && ev.scancode == RawInputEvent.SYN_REPORT)) {
-                            if (mDisplay != null) {
-                                if (!mHaveGlobalMetaState) {
-                                    computeGlobalMetaStateLocked();
-                                }
-                                
-                                MotionEvent me;
-                                
-                                InputDevice.MotionState ms = di.mAbs;
-                                if (ms.changed) {
-                                    ms.everChanged = true;
-                                    ms.changed = false;
-                                    
-                                    if ((classes&(RawInputEvent.CLASS_TOUCHSCREEN
-                                            |RawInputEvent.CLASS_TOUCHSCREEN_MT))
-                                            == RawInputEvent.CLASS_TOUCHSCREEN) {
-                                        ms.mNextNumPointers = 0;
-                                        if (ms.mDown[0]) {
-                                            System.arraycopy(di.curTouchVals, 0,
-                                                    ms.mNextData, 0,
-                                                    MotionEvent.NUM_SAMPLE_DATA);
-                                            ms.mNextNumPointers++;
-                                        }
-                                    }
-                                    
-                                    if (BAD_TOUCH_HACK) {
-                                        ms.dropBadPoint(di);
-                                    }
-                                    if (JUMPY_TOUCH_HACK) {
-                                        ms.dropJumpyPoint(di);
-                                    }
-                                    
-                                    boolean doMotion = !monitorVirtualKey(di,
-                                            ev, curTime, curTimeNano);
-                                    
-                                    if (doMotion && ms.mNextNumPointers > 0
-                                            && (ms.mLastNumPointers == 0
-                                                    || ms.mSkipLastPointers)) {
-                                        doMotion = !generateVirtualKeyDown(di,
-                                                ev, curTime, curTimeNano);
-                                    }
-                                    
-                                    if (doMotion) {
-                                        // XXX Need to be able to generate
-                                        // multiple events here, for example
-                                        // if two fingers change up/down state
-                                        // at the same time.
-                                        do {
-                                            me = ms.generateAbsMotion(di, curTime,
-                                                    curTimeNano, mDisplay,
-                                                    mOrientation, mGlobalMetaState);
-                                            if (DEBUG_POINTERS) Slog.v(TAG, "Absolute: x="
-                                                    + di.mAbs.mNextData[MotionEvent.SAMPLE_X]
-                                                    + " y="
-                                                    + di.mAbs.mNextData[MotionEvent.SAMPLE_Y]
-                                                    + " ev=" + me);
-                                            if (me != null) {
-                                                if (WindowManagerPolicy.WATCH_POINTER) {
-                                                    Slog.i(TAG, "Enqueueing: " + me);
-                                                }
-                                                addLocked(di, curTimeNano, ev.flags,
-                                                        RawInputEvent.CLASS_TOUCHSCREEN, me);
-                                            }
-                                        } while (ms.hasMore());
-                                    } else {
-                                        // We are consuming movement in the
-                                        // virtual key area...  but still
-                                        // propagate this to the previous
-                                        // data for comparisons.
-                                        int num = ms.mNextNumPointers;
-                                        if (num > InputDevice.MAX_POINTERS) {
-                                            num = InputDevice.MAX_POINTERS;
-                                        }
-                                        System.arraycopy(ms.mNextData, 0,
-                                                ms.mLastData, 0,
-                                                num * MotionEvent.NUM_SAMPLE_DATA);
-                                        ms.mLastNumPointers = num;
-                                        ms.mSkipLastPointers = true;
-                                    }
-                                    
-                                    ms.finish();
-                                }
-                                
-                                ms = di.mRel;
-                                if (ms.changed) {
-                                    ms.everChanged = true;
-                                    ms.changed = false;
-                                    
-                                    me = ms.generateRelMotion(di, curTime,
-                                            curTimeNano,
-                                            mOrientation, mGlobalMetaState);
-                                    if (false) Slog.v(TAG, "Relative: x="
-                                            + di.mRel.mNextData[MotionEvent.SAMPLE_X]
-                                            + " y="
-                                            + di.mRel.mNextData[MotionEvent.SAMPLE_Y]
-                                            + " ev=" + me);
-                                    if (me != null) {
-                                        addLocked(di, curTimeNano, ev.flags,
-                                                RawInputEvent.CLASS_TRACKBALL, me);
-                                    }
-                                }
-                            }
-                        }
-                    }
-                
-                } catch (RuntimeException exc) {
-                    Slog.e(TAG, "InputReaderThread uncaught exception", exc);
-                }
-            }
-        }
-    };
-
-    private boolean isInsideDisplay(InputDevice dev) {
-        final InputDevice.AbsoluteInfo absx = dev.absX;
-        final InputDevice.AbsoluteInfo absy = dev.absY;
-        final InputDevice.MotionState absm = dev.mAbs;
-        if (absx == null || absy == null || absm == null) {
-            return true;
-        }
-        
-        if (absm.mNextData[MotionEvent.SAMPLE_X] >= absx.minValue
-                && absm.mNextData[MotionEvent.SAMPLE_X] <= absx.maxValue
-                && absm.mNextData[MotionEvent.SAMPLE_Y] >= absy.minValue
-                && absm.mNextData[MotionEvent.SAMPLE_Y] <= absy.maxValue) {
-            if (DEBUG_VIRTUAL_KEYS) Slog.v(TAG, "Input ("
-                    + absm.mNextData[MotionEvent.SAMPLE_X]
-                    + "," + absm.mNextData[MotionEvent.SAMPLE_Y]
-                    + ") inside of display");
-            return true;
-        }
-        
-        return false;
-    }
-    
-    private VirtualKey findVirtualKey(InputDevice dev) {
-        final int N = mVirtualKeys.size();
-        if (N <= 0) {
-            return null;
-        }
-        
-        final InputDevice.MotionState absm = dev.mAbs;
-        for (int i=0; i<N; i++) {
-            VirtualKey sb = mVirtualKeys.get(i);
-            sb.computeHitRect(dev, mDisplayWidth, mDisplayHeight);
-            if (DEBUG_VIRTUAL_KEYS) Slog.v(TAG, "Hit test ("
-                    + absm.mNextData[MotionEvent.SAMPLE_X] + ","
-                    + absm.mNextData[MotionEvent.SAMPLE_Y] + ") in code "
-                    + sb.scancode + " - (" + sb.hitLeft
-                    + "," + sb.hitTop + ")-(" + sb.hitRight + ","
-                    + sb.hitBottom + ")");
-            if (sb.checkHit(absm.mNextData[MotionEvent.SAMPLE_X],
-                    absm.mNextData[MotionEvent.SAMPLE_Y])) {
-                if (DEBUG_VIRTUAL_KEYS) Slog.v(TAG, "Hit!");
-                return sb;
-            }
-        }
-        
-        return null;
-    }
-    
-    private boolean generateVirtualKeyDown(InputDevice di, RawInputEvent ev,
-            long curTime, long curTimeNano) {
-        if (isInsideDisplay(di)) {
-            // Didn't consume event.
-            return false;
-        }
-        
-        
-        VirtualKey vk = findVirtualKey(di);
-        if (vk != null) {
-            final InputDevice.MotionState ms = di.mAbs;
-            mPressedVirtualKey = vk;
-            vk.lastKeycode = scancodeToKeycode(di.id, vk.scancode);
-            ms.mLastNumPointers = ms.mNextNumPointers;
-            di.mKeyDownTime = curTime;
-            if (DEBUG_VIRTUAL_KEYS) Slog.v(TAG,
-                    "Generate key down for: " + vk.scancode
-                    + " (keycode=" + vk.lastKeycode + ")");
-            KeyEvent event = newKeyEvent(di, di.mKeyDownTime, curTime, true,
-                    vk.lastKeycode, 0, vk.scancode,
-                    KeyEvent.FLAG_VIRTUAL_HARD_KEY);
-            mHapticFeedbackCallback.virtualKeyFeedback(event);
-            addLocked(di, curTimeNano, ev.flags, RawInputEvent.CLASS_KEYBOARD,
-                    event);
-        }
-        
-        // We always consume the event, even if we didn't
-        // generate a key event.  There are two reasons for
-        // this: to avoid spurious touches when holding
-        // the edges of the device near the touchscreen,
-        // and to avoid reporting events if there are virtual
-        // keys on the touchscreen outside of the display
-        // area.
-        // Note that for all of this we are only looking at the
-        // first pointer, since what we are handling here is the
-        // first pointer going down, and this is the coordinate
-        // that will be used to dispatch the event.
-        if (false) {
-            final InputDevice.AbsoluteInfo absx = di.absX;
-            final InputDevice.AbsoluteInfo absy = di.absY;
-            final InputDevice.MotionState absm = di.mAbs;
-            Slog.v(TAG, "Rejecting ("
-                + absm.mNextData[MotionEvent.SAMPLE_X] + ","
-                + absm.mNextData[MotionEvent.SAMPLE_Y] + "): outside of ("
-                + absx.minValue + "," + absy.minValue
-                + ")-(" + absx.maxValue + ","
-                + absx.maxValue + ")");
-        }
-        return true;
-    }
-    
-    private boolean monitorVirtualKey(InputDevice di, RawInputEvent ev,
-            long curTime, long curTimeNano) {
-        VirtualKey vk = mPressedVirtualKey;
-        if (vk == null) {
-            return false;
-        }
-        
-        final InputDevice.MotionState ms = di.mAbs;
-        if (ms.mNextNumPointers <= 0) {
-            mPressedVirtualKey = null;
-            ms.mLastNumPointers = 0;
-            if (DEBUG_VIRTUAL_KEYS) Slog.v(TAG, "Generate key up for: " + vk.scancode);
-            KeyEvent event = newKeyEvent(di, di.mKeyDownTime, curTime, false,
-                    vk.lastKeycode, 0, vk.scancode,
-                    KeyEvent.FLAG_VIRTUAL_HARD_KEY);
-            mHapticFeedbackCallback.virtualKeyFeedback(event);
-            addLocked(di, curTimeNano, ev.flags, RawInputEvent.CLASS_KEYBOARD,
-                    event);
-            return true;
-            
-        } else if (isInsideDisplay(di)) {
-            // Whoops the pointer has moved into
-            // the display area!  Cancel the
-            // virtual key and start a pointer
-            // motion.
-            mPressedVirtualKey = null;
-            if (DEBUG_VIRTUAL_KEYS) Slog.v(TAG, "Cancel key up for: " + vk.scancode);
-            KeyEvent event = newKeyEvent(di, di.mKeyDownTime, curTime, false,
-                    vk.lastKeycode, 0, vk.scancode,
-                    KeyEvent.FLAG_CANCELED | KeyEvent.FLAG_VIRTUAL_HARD_KEY);
-            mHapticFeedbackCallback.virtualKeyFeedback(event);
-            addLocked(di, curTimeNano, ev.flags, RawInputEvent.CLASS_KEYBOARD,
-                    event);
-            ms.mLastNumPointers = 0;
-            return false;
-        }
-        
-        return true;
-    }
-    
-    /**
-     * Returns a new meta state for the given keys and old state.
-     */
-    private static final int makeMetaState(int keycode, boolean down, int old) {
-        int mask;
-        switch (keycode) {
-        case KeyEvent.KEYCODE_ALT_LEFT:
-            mask = KeyEvent.META_ALT_LEFT_ON;
-            break;
-        case KeyEvent.KEYCODE_ALT_RIGHT:
-            mask = KeyEvent.META_ALT_RIGHT_ON;
-            break;
-        case KeyEvent.KEYCODE_SHIFT_LEFT:
-            mask = KeyEvent.META_SHIFT_LEFT_ON;
-            break;
-        case KeyEvent.KEYCODE_SHIFT_RIGHT:
-            mask = KeyEvent.META_SHIFT_RIGHT_ON;
-            break;
-        case KeyEvent.KEYCODE_SYM:
-            mask = KeyEvent.META_SYM_ON;
-            break;
-        default:
-            return old;
-        }
-        int result = ~(KeyEvent.META_ALT_ON | KeyEvent.META_SHIFT_ON)
-                    & (down ? (old | mask) : (old & ~mask));
-        if (0 != (result & (KeyEvent.META_ALT_LEFT_ON | KeyEvent.META_ALT_RIGHT_ON))) {
-            result |= KeyEvent.META_ALT_ON;
-        }
-        if (0 != (result & (KeyEvent.META_SHIFT_LEFT_ON | KeyEvent.META_SHIFT_RIGHT_ON))) {
-            result |= KeyEvent.META_SHIFT_ON;
-        }
-        return result;
-    }
-
-    private void computeGlobalMetaStateLocked() {
-        int i = mDevices.size();
-        mGlobalMetaState = 0;
-        while ((--i) >= 0) {
-            mGlobalMetaState |= mDevices.valueAt(i).mMetaKeysState;
-        }
-        mHaveGlobalMetaState = true;
-    }
-    
-    /*
-     * Return true if you want the event to get passed on to the 
-     * rest of the system, and false if you've handled it and want
-     * it dropped.
-     */
-    abstract boolean preprocessEvent(InputDevice device, RawInputEvent event);
-
-    InputDevice getInputDevice(int deviceId) {
-        synchronized (mFirst) {
-            return getInputDeviceLocked(deviceId);
-        }
-    }
-    
-    private InputDevice getInputDeviceLocked(int deviceId) {
-        return mDevices.get(deviceId);
-    }
-
-    public void setOrientation(int orientation) {
-        synchronized(mFirst) {
-            mOrientation = orientation;
-            switch (orientation) {
-                case Surface.ROTATION_90:
-                    mKeyRotationMap = KEY_90_MAP;
-                    break;
-                case Surface.ROTATION_180:
-                    mKeyRotationMap = KEY_180_MAP;
-                    break;
-                case Surface.ROTATION_270:
-                    mKeyRotationMap = KEY_270_MAP;
-                    break;
-                default:
-                    mKeyRotationMap = null;
-                    break;
-            }
-        }
-    }
-    
-    public int rotateKeyCode(int keyCode) {
-        synchronized(mFirst) {
-            return rotateKeyCodeLocked(keyCode);
-        }
-    }
-    
-    private int rotateKeyCodeLocked(int keyCode) {
-        int[] map = mKeyRotationMap;
-        if (map != null) {
-            final int N = map.length;
-            for (int i=0; i<N; i+=2) {
-                if (map[i] == keyCode) {
-                    return map[i+1];
-                }
-            }
-        }
-        return keyCode;
-    }
-    
-    boolean hasEvents() {
-        synchronized (mFirst) {
-            return mFirst.next != mLast;
-        }
-    }
-    
-    /*
-     * returns true if we returned an event, and false if we timed out
-     */
-    QueuedEvent getEvent(long timeoutMS) {
-        long begin = SystemClock.uptimeMillis();
-        final long end = begin+timeoutMS;
-        long now = begin;
-        synchronized (mFirst) {
-            while (mFirst.next == mLast && end > now) {
-                try {
-                    mWakeLock.release();
-                    mFirst.wait(end-now);
-                }
-                catch (InterruptedException e) {
-                }
-                now = SystemClock.uptimeMillis();
-                if (begin > now) {
-                    begin = now;
-                }
-            }
-            if (mFirst.next == mLast) {
-                return null;
-            }
-            QueuedEvent p = mFirst.next;
-            mFirst.next = p.next;
-            mFirst.next.prev = mFirst;
-            p.inQueue = false;
-            return p;
-        }
-    }
-
-    /**
-     * Return true if the queue has an up event pending that corresponds
-     * to the same key as the given key event.
-     */
-    boolean hasKeyUpEvent(KeyEvent origEvent) {
-        synchronized (mFirst) {
-            final int keyCode = origEvent.getKeyCode();
-            QueuedEvent cur = mLast.prev;
-            while (cur.prev != null) {
-                if (cur.classType == RawInputEvent.CLASS_KEYBOARD) {
-                    KeyEvent ke = (KeyEvent)cur.event;
-                    if (ke.getAction() == KeyEvent.ACTION_UP
-                            && ke.getKeyCode() == keyCode) {
-                        return true;
-                    }
-                }
-                cur = cur.prev;
-            }
-        }
-        
-        return false;
-    }
-    
-    void recycleEvent(QueuedEvent ev) {
-        synchronized (mFirst) {
-            //Slog.i(TAG, "Recycle event: " + ev);
-            if (ev.event == ev.inputDevice.mAbs.currentMove) {
-                ev.inputDevice.mAbs.currentMove = null;
-            }
-            if (ev.event == ev.inputDevice.mRel.currentMove) {
-                if (false) Slog.i(TAG, "Detach rel " + ev.event);
-                ev.inputDevice.mRel.currentMove = null;
-                ev.inputDevice.mRel.mNextData[MotionEvent.SAMPLE_X] = 0;
-                ev.inputDevice.mRel.mNextData[MotionEvent.SAMPLE_Y] = 0;
-            }
-            recycleLocked(ev);
-        }
-    }
-    
-    void filterQueue(FilterCallback cb) {
-        synchronized (mFirst) {
-            QueuedEvent cur = mLast.prev;
-            while (cur.prev != null) {
-                switch (cb.filterEvent(cur)) {
-                    case FILTER_REMOVE:
-                        cur.prev.next = cur.next;
-                        cur.next.prev = cur.prev;
-                        break;
-                    case FILTER_ABORT:
-                        return;
-                }
-                cur = cur.prev;
-            }
-        }
-    }
-    
-    private QueuedEvent obtainLocked(InputDevice device, long whenNano,
-            int flags, int classType, Object event) {
-        QueuedEvent ev;
-        if (mCacheCount == 0) {
-            ev = new QueuedEvent();
-        } else {
-            ev = mCache;
-            ev.inQueue = false;
-            mCache = ev.next;
-            mCacheCount--;
-        }
-        ev.inputDevice = device;
-        ev.whenNano = whenNano;
-        ev.flags = flags;
-        ev.classType = classType;
-        ev.event = event;
-        return ev;
-    }
-
-    private void recycleLocked(QueuedEvent ev) {
-        if (ev.inQueue) {
-            throw new RuntimeException("Event already in queue!");
-        }
-        if (mCacheCount < 10) {
-            mCacheCount++;
-            ev.next = mCache;
-            mCache = ev;
-            ev.inQueue = true;
-        }
-    }
-
-    private void addLocked(InputDevice device, long whenNano, int flags,
-            int classType, Object event) {
-        boolean poke = mFirst.next == mLast;
-
-        QueuedEvent ev = obtainLocked(device, whenNano, flags, classType, event);
-        QueuedEvent p = mLast.prev;
-        while (p != mFirst && ev.whenNano < p.whenNano) {
-            p = p.prev;
-        }
-
-        ev.next = p.next;
-        ev.prev = p;
-        p.next = ev;
-        ev.next.prev = ev;
-        ev.inQueue = true;
-
-        if (poke) {
-            long time;
-            if (MEASURE_LATENCY) {
-                time = System.nanoTime();
-            }
-            mFirst.notify();
-            mWakeLock.acquire();
-            if (MEASURE_LATENCY) {
-                lt.sample("1 addLocked-queued event ", System.nanoTime() - time);
-            }
-        }
-    }
-
-    private InputDevice newInputDevice(int deviceId) {
-        int classes = getDeviceClasses(deviceId);
-        String name = getDeviceName(deviceId);
-        InputDevice.AbsoluteInfo absX = null;
-        InputDevice.AbsoluteInfo absY = null;
-        InputDevice.AbsoluteInfo absPressure = null;
-        InputDevice.AbsoluteInfo absSize = null;
-        if (classes != 0) {
-            Slog.i(TAG, "Device added: id=0x" + Integer.toHexString(deviceId)
-                    + ", name=" + name
-                    + ", classes=" + Integer.toHexString(classes));
-            if ((classes&RawInputEvent.CLASS_TOUCHSCREEN_MT) != 0) {
-                absX = loadAbsoluteInfo(deviceId,
-                        RawInputEvent.ABS_MT_POSITION_X, "X");
-                absY = loadAbsoluteInfo(deviceId,
-                        RawInputEvent.ABS_MT_POSITION_Y, "Y");
-                absPressure = loadAbsoluteInfo(deviceId,
-                        RawInputEvent.ABS_MT_TOUCH_MAJOR, "Pressure");
-                absSize = loadAbsoluteInfo(deviceId,
-                        RawInputEvent.ABS_MT_WIDTH_MAJOR, "Size");
-            } else if ((classes&RawInputEvent.CLASS_TOUCHSCREEN) != 0) {
-                absX = loadAbsoluteInfo(deviceId,
-                        RawInputEvent.ABS_X, "X");
-                absY = loadAbsoluteInfo(deviceId,
-                        RawInputEvent.ABS_Y, "Y");
-                absPressure = loadAbsoluteInfo(deviceId,
-                        RawInputEvent.ABS_PRESSURE, "Pressure");
-                absSize = loadAbsoluteInfo(deviceId,
-                        RawInputEvent.ABS_TOOL_WIDTH, "Size");
-            }
-        }
-        
-        return new InputDevice(deviceId, classes, name, absX, absY, absPressure, absSize);
-    }
-    
-    private InputDevice.AbsoluteInfo loadAbsoluteInfo(int id, int channel,
-            String name) {
-        InputDevice.AbsoluteInfo info = new InputDevice.AbsoluteInfo();
-        if (getAbsoluteInfo(id, channel, info)
-                && info.minValue != info.maxValue) {
-            Slog.i(TAG, "  " + name + ": min=" + info.minValue
-                    + " max=" + info.maxValue
-                    + " flat=" + info.flat
-                    + " fuzz=" + info.fuzz);
-            info.range = info.maxValue-info.minValue;
-            return info;
-        }
-        Slog.i(TAG, "  " + name + ": unknown values");
-        return null;
-    }
-    private static native boolean readEvent(RawInputEvent outEvent);
-    
-    void dump(PrintWriter pw, String prefix) {
-        synchronized (mFirst) {
-            for (int i=0; i<mDevices.size(); i++) {
-                InputDevice dev = mDevices.valueAt(i);
-                pw.print(prefix); pw.print("Device #");
-                        pw.print(mDevices.keyAt(i)); pw.print(" ");
-                        pw.print(dev.name); pw.print(" (classes=0x");
-                        pw.print(Integer.toHexString(dev.classes));
-                        pw.println("):");
-                pw.print(prefix); pw.print("  mKeyDownTime=");
-                        pw.print(dev.mKeyDownTime); pw.print(" mMetaKeysState=");
-                        pw.println(dev.mMetaKeysState);
-                if (dev.absX != null) {
-                    pw.print(prefix); pw.print("  absX: "); dev.absX.dump(pw);
-                            pw.println("");
-                }
-                if (dev.absY != null) {
-                    pw.print(prefix); pw.print("  absY: "); dev.absY.dump(pw);
-                            pw.println("");
-                }
-                if (dev.absPressure != null) {
-                    pw.print(prefix); pw.print("  absPressure: ");
-                            dev.absPressure.dump(pw); pw.println("");
-                }
-                if (dev.absSize != null) {
-                    pw.print(prefix); pw.print("  absSize: ");
-                            dev.absSize.dump(pw); pw.println("");
-                }
-                if (dev.mAbs.everChanged) {
-                    pw.print(prefix); pw.println("  mAbs:");
-                    dev.mAbs.dump(pw, prefix + "    ");
-                }
-                if (dev.mRel.everChanged) {
-                    pw.print(prefix); pw.println("  mRel:");
-                    dev.mRel.dump(pw, prefix + "    ");
-                }
-            }
-            pw.println(" ");
-            for (int i=0; i<mIgnoredDevices.size(); i++) {
-                InputDevice dev = mIgnoredDevices.valueAt(i);
-                pw.print(prefix); pw.print("Ignored Device #");
-                        pw.print(mIgnoredDevices.keyAt(i)); pw.print(" ");
-                        pw.print(dev.name); pw.print(" (classes=0x");
-                        pw.print(Integer.toHexString(dev.classes));
-                        pw.println(")");
-            }
-            pw.println(" ");
-            for (int i=0; i<mVirtualKeys.size(); i++) {
-                VirtualKey vk = mVirtualKeys.get(i);
-                pw.print(prefix); pw.print("Virtual Key #");
-                        pw.print(i); pw.println(":");
-                pw.print(prefix); pw.print("  scancode="); pw.println(vk.scancode);
-                pw.print(prefix); pw.print("  centerx="); pw.print(vk.centerx);
-                        pw.print(" centery="); pw.print(vk.centery);
-                        pw.print(" width="); pw.print(vk.width);
-                        pw.print(" height="); pw.println(vk.height);
-                pw.print(prefix); pw.print("  hitLeft="); pw.print(vk.hitLeft);
-                        pw.print(" hitTop="); pw.print(vk.hitTop);
-                        pw.print(" hitRight="); pw.print(vk.hitRight);
-                        pw.print(" hitBottom="); pw.println(vk.hitBottom);
-                if (vk.lastDevice != null) {
-                    pw.print(prefix); pw.print("  lastDevice=#");
-                            pw.println(vk.lastDevice.id);
-                }
-                if (vk.lastKeycode != 0) {
-                    pw.print(prefix); pw.print("  lastKeycode=");
-                            pw.println(vk.lastKeycode);
-                }
-            }
-            pw.println(" ");
-            pw.print(prefix); pw.print("  Default keyboard: ");
-                    pw.println(SystemProperties.get("hw.keyboards.0.devname"));
-            pw.print(prefix); pw.print("  mGlobalMetaState=");
-                    pw.print(mGlobalMetaState); pw.print(" mHaveGlobalMetaState=");
-                    pw.println(mHaveGlobalMetaState);
-            pw.print(prefix); pw.print("  mDisplayWidth=");
-                    pw.print(mDisplayWidth); pw.print(" mDisplayHeight=");
-                    pw.println(mDisplayHeight);
-            pw.print(prefix); pw.print("  mOrientation=");
-                    pw.println(mOrientation);
-            if (mPressedVirtualKey != null) {
-                pw.print(prefix); pw.print("  mPressedVirtualKey.scancode=");
-                        pw.println(mPressedVirtualKey.scancode);
-            }
-        }
-    }
-}
diff --git a/services/java/com/android/server/LocationManagerService.java b/services/java/com/android/server/LocationManagerService.java
index 65f4194..8519e2c 100644
--- a/services/java/com/android/server/LocationManagerService.java
+++ b/services/java/com/android/server/LocationManagerService.java
@@ -16,17 +16,6 @@
 
 package com.android.server;
 
-import java.io.FileDescriptor;
-import java.io.PrintWriter;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Map;
-import java.util.Observable;
-import java.util.Observer;
-import java.util.Set;
-
 import android.app.Activity;
 import android.app.PendingIntent;
 import android.content.BroadcastReceiver;
@@ -41,6 +30,7 @@
 import android.content.res.Resources;
 import android.database.Cursor;
 import android.location.Address;
+import android.location.Criteria;
 import android.location.GeocoderParams;
 import android.location.IGpsStatusListener;
 import android.location.IGpsStatusProvider;
@@ -50,7 +40,6 @@
 import android.location.Location;
 import android.location.LocationManager;
 import android.location.LocationProvider;
-import android.location.LocationProviderInterface;
 import android.net.ConnectivityManager;
 import android.net.NetworkInfo;
 import android.net.Uri;
@@ -68,12 +57,27 @@
 import android.util.Slog;
 import android.util.PrintWriterPrinter;
 
-import com.android.internal.location.GeocoderProxy;
-import com.android.internal.location.GpsLocationProvider;
 import com.android.internal.location.GpsNetInitiatedHandler;
-import com.android.internal.location.LocationProviderProxy;
-import com.android.internal.location.MockProvider;
-import com.android.internal.location.PassiveProvider;
+
+import com.android.server.location.GeocoderProxy;
+import com.android.server.location.GpsLocationProvider;
+import com.android.server.location.LocationProviderInterface;
+import com.android.server.location.LocationProviderProxy;
+import com.android.server.location.MockProvider;
+import com.android.server.location.PassiveProvider;
+
+import java.io.FileDescriptor;
+import java.io.PrintWriter;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.Comparator;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Map;
+import java.util.Observable;
+import java.util.Observer;
+import java.util.Set;
 
 /**
  * The service class that manages LocationProviders and issues location
@@ -609,10 +613,10 @@
         return out;
     }
 
-    public List<String> getProviders(boolean enabledOnly) {
+    public List<String> getProviders(Criteria criteria, boolean enabledOnly) {
         try {
             synchronized (mLock) {
-                return _getProvidersLocked(enabledOnly);
+                return _getProvidersLocked(criteria, enabledOnly);
             }
         } catch (SecurityException se) {
             throw se;
@@ -622,7 +626,7 @@
         }
     }
 
-    private List<String> _getProvidersLocked(boolean enabledOnly) {
+    private List<String> _getProvidersLocked(Criteria criteria, boolean enabledOnly) {
         if (LOCAL_LOGV) {
             Slog.v(TAG, "getProviders");
         }
@@ -634,12 +638,225 @@
                 if (enabledOnly && !isAllowedBySettingsLocked(name)) {
                     continue;
                 }
+                if (criteria != null && !p.meetsCriteria(criteria)) {
+                    continue;
+                }
                 out.add(name);
             }
         }
         return out;
     }
 
+    /**
+     * Returns the next looser power requirement, in the sequence:
+     *
+     * POWER_LOW -> POWER_MEDIUM -> POWER_HIGH -> NO_REQUIREMENT
+     */
+    private int nextPower(int power) {
+        switch (power) {
+        case Criteria.POWER_LOW:
+            return Criteria.POWER_MEDIUM;
+        case Criteria.POWER_MEDIUM:
+            return Criteria.POWER_HIGH;
+        case Criteria.POWER_HIGH:
+            return Criteria.NO_REQUIREMENT;
+        case Criteria.NO_REQUIREMENT:
+        default:
+            return Criteria.NO_REQUIREMENT;
+        }
+    }
+
+    /**
+     * Returns the next looser accuracy requirement, in the sequence:
+     *
+     * ACCURACY_FINE -> ACCURACY_APPROXIMATE-> NO_REQUIREMENT
+     */
+    private int nextAccuracy(int accuracy) {
+        if (accuracy == Criteria.ACCURACY_FINE) {
+            return Criteria.ACCURACY_COARSE;
+        } else {
+            return Criteria.NO_REQUIREMENT;
+        }
+    }
+
+    private class LpPowerComparator implements Comparator<LocationProviderInterface> {
+        public int compare(LocationProviderInterface l1, LocationProviderInterface l2) {
+            // Smaller is better
+            return (l1.getPowerRequirement() - l2.getPowerRequirement());
+         }
+
+         public boolean equals(LocationProviderInterface l1, LocationProviderInterface l2) {
+             return (l1.getPowerRequirement() == l2.getPowerRequirement());
+         }
+    }
+
+    private class LpAccuracyComparator implements Comparator<LocationProviderInterface> {
+        public int compare(LocationProviderInterface l1, LocationProviderInterface l2) {
+            // Smaller is better
+            return (l1.getAccuracy() - l2.getAccuracy());
+         }
+
+         public boolean equals(LocationProviderInterface l1, LocationProviderInterface l2) {
+             return (l1.getAccuracy() == l2.getAccuracy());
+         }
+    }
+
+    private class LpCapabilityComparator implements Comparator<LocationProviderInterface> {
+
+        private static final int ALTITUDE_SCORE = 4;
+        private static final int BEARING_SCORE = 4;
+        private static final int SPEED_SCORE = 4;
+
+        private int score(LocationProviderInterface p) {
+            return (p.supportsAltitude() ? ALTITUDE_SCORE : 0) +
+                (p.supportsBearing() ? BEARING_SCORE : 0) +
+                (p.supportsSpeed() ? SPEED_SCORE : 0);
+        }
+
+        public int compare(LocationProviderInterface l1, LocationProviderInterface l2) {
+            return (score(l2) - score(l1)); // Bigger is better
+         }
+
+         public boolean equals(LocationProviderInterface l1, LocationProviderInterface l2) {
+             return (score(l1) == score(l2));
+         }
+    }
+
+    private LocationProviderInterface best(List<String> providerNames) {
+        ArrayList<LocationProviderInterface> providers;
+        synchronized (mLock) {
+            providers = new ArrayList<LocationProviderInterface>(mProviders.size());
+            for (int i = mProviders.size() - 1; i >= 0; i--) {
+                providers.add(mProviders.get(i));
+            }
+        }
+
+        if (providers.size() < 2) {
+            return providers.get(0);
+        }
+
+        // First, sort by power requirement
+        Collections.sort(providers, new LpPowerComparator());
+        int power = providers.get(0).getPowerRequirement();
+        if (power < providers.get(1).getPowerRequirement()) {
+            return providers.get(0);
+        }
+
+        int idx, size;
+
+        ArrayList<LocationProviderInterface> tmp = new ArrayList<LocationProviderInterface>();
+        idx = 0;
+        size = providers.size();
+        while ((idx < size) && (providers.get(idx).getPowerRequirement() == power)) {
+            tmp.add(providers.get(idx));
+            idx++;
+        }
+
+        // Next, sort by accuracy
+        Collections.sort(tmp, new LpAccuracyComparator());
+        int acc = tmp.get(0).getAccuracy();
+        if (acc < tmp.get(1).getAccuracy()) {
+            return tmp.get(0);
+        }
+
+        ArrayList<LocationProviderInterface> tmp2 = new ArrayList<LocationProviderInterface>();
+        idx = 0;
+        size = tmp.size();
+        while ((idx < size) && (tmp.get(idx).getAccuracy() == acc)) {
+            tmp2.add(tmp.get(idx));
+            idx++;
+        }
+
+        // Finally, sort by capability "score"
+        Collections.sort(tmp2, new LpCapabilityComparator());
+        return tmp2.get(0);
+    }
+
+    /**
+     * Returns the name of the provider that best meets the given criteria. Only providers
+     * that are permitted to be accessed by the calling activity will be
+     * returned.  If several providers meet the criteria, the one with the best
+     * accuracy is returned.  If no provider meets the criteria,
+     * the criteria are loosened in the following sequence:
+     *
+     * <ul>
+     * <li> power requirement
+     * <li> accuracy
+     * <li> bearing
+     * <li> speed
+     * <li> altitude
+     * </ul>
+     *
+     * <p> Note that the requirement on monetary cost is not removed
+     * in this process.
+     *
+     * @param criteria the criteria that need to be matched
+     * @param enabledOnly if true then only a provider that is currently enabled is returned
+     * @return name of the provider that best matches the requirements
+     */
+    public String getBestProvider(Criteria criteria, boolean enabledOnly) {
+        List<String> goodProviders = getProviders(criteria, enabledOnly);
+        if (!goodProviders.isEmpty()) {
+            return best(goodProviders).getName();
+        }
+
+        // Make a copy of the criteria that we can modify
+        criteria = new Criteria(criteria);
+
+        // Loosen power requirement
+        int power = criteria.getPowerRequirement();
+        while (goodProviders.isEmpty() && (power != Criteria.NO_REQUIREMENT)) {
+            power = nextPower(power);
+            criteria.setPowerRequirement(power);
+            goodProviders = getProviders(criteria, enabledOnly);
+        }
+        if (!goodProviders.isEmpty()) {
+            return best(goodProviders).getName();
+        }
+
+        // Loosen accuracy requirement
+        int accuracy = criteria.getAccuracy();
+        while (goodProviders.isEmpty() && (accuracy != Criteria.NO_REQUIREMENT)) {
+            accuracy = nextAccuracy(accuracy);
+            criteria.setAccuracy(accuracy);
+            goodProviders = getProviders(criteria, enabledOnly);
+        }
+        if (!goodProviders.isEmpty()) {
+            return best(goodProviders).getName();
+        }
+
+        // Remove bearing requirement
+        criteria.setBearingRequired(false);
+        goodProviders = getProviders(criteria, enabledOnly);
+        if (!goodProviders.isEmpty()) {
+            return best(goodProviders).getName();
+        }
+
+        // Remove speed requirement
+        criteria.setSpeedRequired(false);
+        goodProviders = getProviders(criteria, enabledOnly);
+        if (!goodProviders.isEmpty()) {
+            return best(goodProviders).getName();
+        }
+
+        // Remove altitude requirement
+        criteria.setAltitudeRequired(false);
+        goodProviders = getProviders(criteria, enabledOnly);
+        if (!goodProviders.isEmpty()) {
+            return best(goodProviders).getName();
+        }
+
+        return null;
+    }
+
+    public boolean providerMeetsCriteria(String provider, Criteria criteria) {
+        LocationProviderInterface p = mProvidersByName.get(provider);
+        if (p == null) {
+            throw new IllegalArgumentException("provider=" + provider);
+        }
+        return p.meetsCriteria(criteria);
+    }
+
     private void updateProvidersLocked() {
         for (int i = mProviders.size() - 1; i >= 0; i--) {
             LocationProviderInterface p = mProviders.get(i);
@@ -716,6 +933,7 @@
         final Receiver mReceiver;
         final long mMinTime;
         final float mMinDistance;
+        final boolean mSingleShot;
         final int mUid;
         Location mLastFixBroadcast;
         long mLastStatusBroadcast;
@@ -723,12 +941,13 @@
         /**
          * Note: must be constructed with lock held.
          */
-        UpdateRecord(String provider, long minTime, float minDistance,
+        UpdateRecord(String provider, long minTime, float minDistance, boolean singleShot,
             Receiver receiver, int uid) {
             mProvider = provider;
             mReceiver = receiver;
             mMinTime = minTime;
             mMinDistance = minDistance;
+            mSingleShot = singleShot;
             mUid = uid;
 
             ArrayList<UpdateRecord> records = mRecordsByProvider.get(provider);
@@ -763,6 +982,7 @@
             pw.println(prefix + this);
             pw.println(prefix + "mProvider=" + mProvider + " mReceiver=" + mReceiver);
             pw.println(prefix + "mMinTime=" + mMinTime + " mMinDistance=" + mMinDistance);
+            pw.println(prefix + "mSingleShot=" + mSingleShot);
             pw.println(prefix + "mUid=" + mUid);
             pw.println(prefix + "mLastFixBroadcast:");
             if (mLastFixBroadcast != null) {
@@ -818,12 +1038,21 @@
         return false;
     }
 
-    public void requestLocationUpdates(String provider,
-        long minTime, float minDistance, ILocationListener listener) {
-
+    public void requestLocationUpdates(String provider, Criteria criteria,
+        long minTime, float minDistance, boolean singleShot, ILocationListener listener) {
+        if (criteria != null) {
+            // FIXME - should we consider using multiple providers simultaneously
+            // rather than only the best one?
+            // Should we do anything different for single shot fixes?
+            provider = getBestProvider(criteria, true);
+            if (provider == null) {
+                throw new IllegalArgumentException("no providers found for criteria");
+            }
+        }
         try {
             synchronized (mLock) {
-                requestLocationUpdatesLocked(provider, minTime, minDistance, getReceiver(listener));
+                requestLocationUpdatesLocked(provider, minTime, minDistance, singleShot,
+                        getReceiver(listener));
             }
         } catch (SecurityException se) {
             throw se;
@@ -834,11 +1063,21 @@
         }
     }
 
-    public void requestLocationUpdatesPI(String provider,
-            long minTime, float minDistance, PendingIntent intent) {
+    public void requestLocationUpdatesPI(String provider, Criteria criteria,
+            long minTime, float minDistance, boolean singleShot, PendingIntent intent) {
+        if (criteria != null) {
+            // FIXME - should we consider using multiple providers simultaneously
+            // rather than only the best one?
+            // Should we do anything different for single shot fixes?
+            provider = getBestProvider(criteria, true);
+            if (provider == null) {
+                throw new IllegalArgumentException("no providers found for criteria");
+            }
+        }
         try {
             synchronized (mLock) {
-                requestLocationUpdatesLocked(provider, minTime, minDistance, getReceiver(intent));
+                requestLocationUpdatesLocked(provider, minTime, minDistance, singleShot,
+                        getReceiver(intent));
             }
         } catch (SecurityException se) {
             throw se;
@@ -849,8 +1088,8 @@
         }
     }
 
-    private void requestLocationUpdatesLocked(String provider,
-            long minTime, float minDistance, Receiver receiver) {
+    private void requestLocationUpdatesLocked(String provider, long minTime, float minDistance,
+            boolean singleShot, Receiver receiver) {
         if (LOCAL_LOGV) {
             Slog.v(TAG, "_requestLocationUpdates: listener = " + receiver);
         }
@@ -867,7 +1106,8 @@
         boolean newUid = !providerHasListener(provider, callingUid, null);
         long identity = Binder.clearCallingIdentity();
         try {
-            UpdateRecord r = new UpdateRecord(provider, minTime, minDistance, receiver, callingUid);
+            UpdateRecord r = new UpdateRecord(provider, minTime, minDistance, singleShot,
+                    receiver, callingUid);
             UpdateRecord oldRecord = receiver.mUpdateRecords.put(provider, r);
             if (oldRecord != null) {
                 oldRecord.disposeLocked();
@@ -881,7 +1121,11 @@
             if (isProviderEnabled) {
                 long minTimeForProvider = getMinTimeLocked(provider);
                 p.setMinTime(minTimeForProvider);
-                p.enableLocationTracking(true);
+                // try requesting single shot if singleShot is true, and fall back to
+                // regular location tracking if requestSingleShotFix() is not supported
+                if (!singleShot || !p.requestSingleShotFix()) {
+                    p.enableLocationTracking(true);
+                }
             } else {
                 // Notify the listener that updates are currently disabled
                 receiver.callProviderEnabledLocked(provider, false);
@@ -1287,7 +1531,8 @@
 
             for (int i = mProviders.size() - 1; i >= 0; i--) {
                 LocationProviderInterface provider = mProviders.get(i);
-                requestLocationUpdatesLocked(provider.getName(), 1000L, 1.0f, mProximityReceiver);
+                requestLocationUpdatesLocked(provider.getName(), 1000L, 1.0f,
+                        false, mProximityReceiver);
             }
         }
     }
@@ -1485,6 +1730,7 @@
         for (int i=0; i<N; i++) {
             UpdateRecord r = records.get(i);
             Receiver receiver = r.mReceiver;
+            boolean receiverDead = false;
 
             Location lastLoc = r.mLastFixBroadcast;
             if ((lastLoc == null) || shouldBroadcastSafe(location, lastLoc, r)) {
@@ -1496,10 +1742,7 @@
                 }
                 if (!receiver.callLocationChangedLocked(location)) {
                     Slog.w(TAG, "RemoteException calling onLocationChanged on " + receiver);
-                    if (deadReceivers == null) {
-                        deadReceivers = new ArrayList<Receiver>();
-                    }
-                    deadReceivers.add(receiver);
+                    receiverDead = true;
                 }
             }
 
@@ -1509,13 +1752,18 @@
 
                 r.mLastStatusBroadcast = newStatusUpdateTime;
                 if (!receiver.callStatusChangedLocked(provider, status, extras)) {
+                    receiverDead = true;
                     Slog.w(TAG, "RemoteException calling onStatusChanged on " + receiver);
-                    if (deadReceivers == null) {
-                        deadReceivers = new ArrayList<Receiver>();
-                    }
-                    if (!deadReceivers.contains(receiver)) {
-                        deadReceivers.add(receiver);
-                    }
+                }
+            }
+
+            // remove receiver if it is dead or we just processed a single shot request
+            if (receiverDead || r.mSingleShot) {
+                if (deadReceivers == null) {
+                    deadReceivers = new ArrayList<Receiver>();
+                }
+                if (!deadReceivers.contains(receiver)) {
+                    deadReceivers.add(receiver);
                 }
             }
         }
@@ -1692,6 +1940,10 @@
 
     // Geocoder
 
+    public boolean geocoderIsImplemented() {
+        return mGeocodeProvider != null;
+    }
+
     public String getFromLocation(double latitude, double longitude, int maxResults,
             GeocoderParams params, List<Address> addrs) {
         if (mGeocodeProvider != null) {
diff --git a/services/java/com/android/server/MasterClearReceiver.java b/services/java/com/android/server/MasterClearReceiver.java
index 27a8a74..4d04cee 100644
--- a/services/java/com/android/server/MasterClearReceiver.java
+++ b/services/java/com/android/server/MasterClearReceiver.java
@@ -39,7 +39,11 @@
 
         try {
             Slog.w(TAG, "!!! FACTORY RESET !!!");
-            RecoverySystem.rebootWipeUserData(context);
+            if (intent.hasExtra("enableEFS")) {
+                RecoverySystem.rebootToggleEFS(context, intent.getBooleanExtra("enableEFS", false));
+            } else {
+                RecoverySystem.rebootWipeUserData(context);
+            }
             Log.wtf(TAG, "Still running after master clear?!");
         } catch (IOException e) {
             Slog.e(TAG, "Can't perform master clear/factory reset", e);
diff --git a/services/java/com/android/server/MountService.java b/services/java/com/android/server/MountService.java
index 6ceeb95..d7b92ec 100644
--- a/services/java/com/android/server/MountService.java
+++ b/services/java/com/android/server/MountService.java
@@ -23,11 +23,14 @@
 import android.content.Intent;
 import android.content.IntentFilter;
 import android.content.pm.PackageManager;
+import android.content.res.ObbInfo;
+import android.content.res.ObbScanner;
 import android.net.Uri;
 import android.os.storage.IMountService;
 import android.os.storage.IMountServiceListener;
 import android.os.storage.IMountShutdownObserver;
 import android.os.storage.StorageResultCode;
+import android.os.Binder;
 import android.os.Handler;
 import android.os.HandlerThread;
 import android.os.Looper;
@@ -53,7 +56,8 @@
     private static final boolean LOCAL_LOGD = false;
     private static final boolean DEBUG_UNMOUNT = false;
     private static final boolean DEBUG_EVENTS = false;
-    
+    private static final boolean DEBUG_OBB = true;
+
     private static final String TAG = "MountService";
 
     /*
@@ -130,6 +134,12 @@
      */
     final private HashSet<String> mAsecMountSet = new HashSet<String>();
 
+    /**
+     * Private hash of currently mounted filesystem images.
+     */
+    final private HashSet<String> mObbMountSet = new HashSet<String>();
+
+    // Handler messages
     private static final int H_UNMOUNT_PM_UPDATE = 1;
     private static final int H_UNMOUNT_PM_DONE = 2;
     private static final int H_UNMOUNT_MS = 3;
@@ -287,7 +297,7 @@
             Slog.w(TAG, "Waiting too long for mReady!");
         }
     }
-  
+
     private BroadcastReceiver mBroadcastReceiver = new BroadcastReceiver() {
         public void onReceive(Context context, Intent intent) {
             String action = intent.getAction();
@@ -344,7 +354,7 @@
 
         MountServiceBinderListener(IMountServiceListener listener) {
             mListener = listener;
- 
+
         }
 
         public void binderDied() {
@@ -642,10 +652,21 @@
     }
 
     private boolean doGetShareMethodAvailable(String method) {
-        ArrayList<String> rsp = mConnector.doCommand("share status " + method);
+        ArrayList<String> rsp;
+        try {
+            rsp = mConnector.doCommand("share status " + method);
+        } catch (NativeDaemonConnectorException ex) {
+            Slog.e(TAG, "Failed to determine whether share method " + method + " is available.");
+            return false;
+        }
 
         for (String line : rsp) {
-            String []tok = line.split(" ");
+            String[] tok = line.split(" ");
+            if (tok.length < 3) {
+                Slog.e(TAG, "Malformed response to share status " + method);
+                return false;
+            }
+
             int code;
             try {
                 code = Integer.parseInt(tok[0]);
@@ -770,10 +791,22 @@
 
     private boolean doGetVolumeShared(String path, String method) {
         String cmd = String.format("volume shared %s %s", path, method);
-        ArrayList<String> rsp = mConnector.doCommand(cmd);
+        ArrayList<String> rsp;
+
+        try {
+            rsp = mConnector.doCommand(cmd);
+        } catch (NativeDaemonConnectorException ex) {
+            Slog.e(TAG, "Failed to read response to volume shared " + path + " " + method);
+            return false;
+        }
 
         for (String line : rsp) {
-            String []tok = line.split(" ");
+            String[] tok = line.split(" ");
+            if (tok.length < 3) {
+                Slog.e(TAG, "Malformed response to volume shared " + path + " " + method + " command");
+                return false;
+            }
+
             int code;
             try {
                 code = Integer.parseInt(tok[0]);
@@ -782,9 +815,7 @@
                 return false;
             }
             if (code == VoldResponseCode.ShareEnabledResult) {
-                if (tok[2].equals("enabled"))
-                    return true;
-                return false;
+                return "enabled".equals(tok[2]);
             } else {
                 Slog.e(TAG, String.format("Unexpected response code %d", code));
                 return false;
@@ -1306,5 +1337,145 @@
     public void finishMediaUpdate() {
         mHandler.sendEmptyMessage(H_UNMOUNT_PM_DONE);
     }
+
+    private boolean isCallerOwnerOfPackage(String packageName) {
+        final int callerUid = Binder.getCallingUid();
+        return isUidOwnerOfPackage(packageName, callerUid);
+    }
+
+    private boolean isUidOwnerOfPackage(String packageName, int callerUid) {
+        if (packageName == null) {
+            return false;
+        }
+
+        final int packageUid = mPms.getPackageUid(packageName);
+
+        if (DEBUG_OBB) {
+            Slog.d(TAG, "packageName = " + packageName + ", packageUid = " +
+                    packageUid + ", callerUid = " + callerUid);
+        }
+
+        return callerUid == packageUid;
+    }
+
+    public String getMountedObbPath(String filename) {
+        waitForReady();
+        warnOnNotMounted();
+
+        // XXX replace with call to IMediaContainerService
+        ObbInfo obbInfo = ObbScanner.getObbInfo(filename);
+        if (!isCallerOwnerOfPackage(obbInfo.packageName)) {
+            throw new IllegalArgumentException("Caller package does not match OBB file");
+        }
+
+        try {
+            ArrayList<String> rsp = mConnector.doCommand(String.format("obb path %s", filename));
+            String []tok = rsp.get(0).split(" ");
+            int code = Integer.parseInt(tok[0]);
+            if (code != VoldResponseCode.AsecPathResult) {
+                throw new IllegalStateException(String.format("Unexpected response code %d", code));
+            }
+            return tok[1];
+        } catch (NativeDaemonConnectorException e) {
+            int code = e.getCode();
+            if (code == VoldResponseCode.OpFailedStorageNotFound) {
+                throw new IllegalArgumentException(String.format("OBB '%s' not found", filename));
+            } else {
+                throw new IllegalStateException(String.format("Unexpected response code %d", code));
+            }
+        }
+    }
+
+    public boolean isObbMounted(String filename) {
+        waitForReady();
+        warnOnNotMounted();
+
+        // XXX replace with call to IMediaContainerService
+        ObbInfo obbInfo = ObbScanner.getObbInfo(filename);
+        if (!isCallerOwnerOfPackage(obbInfo.packageName)) {
+            throw new IllegalArgumentException("Caller package does not match OBB file");
+        }
+
+        synchronized (mObbMountSet) {
+            return mObbMountSet.contains(filename);
+        }
+    }
+
+    public int mountObb(String filename, String key) {
+        waitForReady();
+        warnOnNotMounted();
+
+        synchronized (mObbMountSet) {
+            if (mObbMountSet.contains(filename)) {
+                return StorageResultCode.OperationFailedStorageMounted;
+            }
+        }
+
+        final int callerUid = Binder.getCallingUid();
+
+        // XXX replace with call to IMediaContainerService
+        ObbInfo obbInfo = ObbScanner.getObbInfo(filename);
+        if (!isUidOwnerOfPackage(obbInfo.packageName, callerUid)) {
+            throw new IllegalArgumentException("Caller package does not match OBB file");
+        }
+
+        if (key == null) {
+            key = "none";
+        }
+
+        int rc = StorageResultCode.OperationSucceeded;
+        String cmd = String.format("obb mount %s %s %d", filename, key, callerUid);
+        try {
+            mConnector.doCommand(cmd);
+        } catch (NativeDaemonConnectorException e) {
+            int code = e.getCode();
+            if (code != VoldResponseCode.OpFailedStorageBusy) {
+                rc = StorageResultCode.OperationFailedInternalError;
+            }
+        }
+
+        if (rc == StorageResultCode.OperationSucceeded) {
+            synchronized (mObbMountSet) {
+                mObbMountSet.add(filename);
+            }
+        }
+        return rc;
+    }
+
+    public int unmountObb(String filename, boolean force) {
+        waitForReady();
+        warnOnNotMounted();
+
+        ObbInfo obbInfo = ObbScanner.getObbInfo(filename);
+        if (!isCallerOwnerOfPackage(obbInfo.packageName)) {
+            throw new IllegalArgumentException("Caller package does not match OBB file");
+        }
+
+        synchronized (mObbMountSet) {
+            if (!mObbMountSet.contains(filename)) {
+                return StorageResultCode.OperationFailedStorageNotMounted;
+            }
+         }
+
+        int rc = StorageResultCode.OperationSucceeded;
+        String cmd = String.format("obb unmount %s%s", filename, (force ? " force" : ""));
+        try {
+            mConnector.doCommand(cmd);
+        } catch (NativeDaemonConnectorException e) {
+            int code = e.getCode();
+            if (code == VoldResponseCode.OpFailedStorageBusy) {
+                rc = StorageResultCode.OperationFailedStorageBusy;
+            } else {
+                rc = StorageResultCode.OperationFailedInternalError;
+            }
+        }
+
+        if (rc == StorageResultCode.OperationSucceeded) {
+            synchronized (mObbMountSet) {
+                mObbMountSet.remove(filename);
+            }
+        }
+        return rc;
+    }
 }
 
diff --git a/services/java/com/android/server/NativeDaemonConnector.java b/services/java/com/android/server/NativeDaemonConnector.java
index 08d7ce6..c452590 100644
--- a/services/java/com/android/server/NativeDaemonConnector.java
+++ b/services/java/com/android/server/NativeDaemonConnector.java
@@ -128,12 +128,11 @@
                                     Slog.e(TAG, String.format(
                                             "Error handling '%s'", event), ex);
                                 }
-                            } else {
-                                try {
-                                    mResponseQueue.put(event);
-                                } catch (InterruptedException ex) {
-                                    Slog.e(TAG, "Failed to put response onto queue", ex);
-                                }
+                            }
+                            try {
+                                mResponseQueue.put(event);
+                            } catch (InterruptedException ex) {
+                                Slog.e(TAG, "Failed to put response onto queue", ex);
                             }
                         } catch (NumberFormatException nfe) {
                             Slog.w(TAG, String.format("Bad msg (%s)", event));
diff --git a/services/java/com/android/server/NetworkManagementService.java b/services/java/com/android/server/NetworkManagementService.java
index cbbc7be..c156150 100644
--- a/services/java/com/android/server/NetworkManagementService.java
+++ b/services/java/com/android/server/NetworkManagementService.java
@@ -35,6 +35,7 @@
 import android.util.Log;
 import android.util.Slog;
 import java.util.ArrayList;
+import java.util.NoSuchElementException;
 import java.util.StringTokenizer;
 import android.provider.Settings;
 import android.content.ContentResolver;
@@ -226,44 +227,61 @@
         mContext.enforceCallingOrSelfPermission(
                 android.Manifest.permission.ACCESS_NETWORK_STATE, "NetworkManagementService");
 
-        return mConnector.doListCommand("interface list", NetdResponseCode.InterfaceListResult);
+        try {
+            return mConnector.doListCommand("interface list", NetdResponseCode.InterfaceListResult);
+        } catch (NativeDaemonConnectorException e) {
+            throw new IllegalStateException(
+                    "Cannot communicate with native daemon to list interfaces");
+        }
     }
 
     public InterfaceConfiguration getInterfaceConfig(String iface) throws IllegalStateException {
-        String rsp = mConnector.doCommand("interface getcfg " + iface).get(0);
+        String rsp;
+        try {
+            rsp = mConnector.doCommand("interface getcfg " + iface).get(0);
+        } catch (NativeDaemonConnectorException e) {
+            throw new IllegalStateException(
+                    "Cannot communicate with native daemon to get interface config");
+        }
         Slog.d(TAG, String.format("rsp <%s>", rsp));
 
         // Rsp: 213 xx:xx:xx:xx:xx:xx yyy.yyy.yyy.yyy zzz.zzz.zzz.zzz [flag1 flag2 flag3]
         StringTokenizer st = new StringTokenizer(rsp);
 
+        InterfaceConfiguration cfg;
         try {
-            int code = Integer.parseInt(st.nextToken(" "));
-            if (code != NetdResponseCode.InterfaceGetCfgResult) {
+            try {
+                int code = Integer.parseInt(st.nextToken(" "));
+                if (code != NetdResponseCode.InterfaceGetCfgResult) {
+                    throw new IllegalStateException(
+                        String.format("Expected code %d, but got %d",
+                                NetdResponseCode.InterfaceGetCfgResult, code));
+                }
+            } catch (NumberFormatException nfe) {
                 throw new IllegalStateException(
-                    String.format("Expected code %d, but got %d",
-                            NetdResponseCode.InterfaceGetCfgResult, code));
+                        String.format("Invalid response from daemon (%s)", rsp));
             }
-        } catch (NumberFormatException nfe) {
+
+            cfg = new InterfaceConfiguration();
+            cfg.hwAddr = st.nextToken(" ");
+            try {
+                cfg.ipAddr = stringToIpAddr(st.nextToken(" "));
+            } catch (UnknownHostException uhe) {
+                Slog.e(TAG, "Failed to parse ipaddr", uhe);
+                cfg.ipAddr = 0;
+            }
+
+            try {
+                cfg.netmask = stringToIpAddr(st.nextToken(" "));
+            } catch (UnknownHostException uhe) {
+                Slog.e(TAG, "Failed to parse netmask", uhe);
+                cfg.netmask = 0;
+            }
+            cfg.interfaceFlags = st.nextToken("]").trim() +"]";
+        } catch (NoSuchElementException nsee) {
             throw new IllegalStateException(
                     String.format("Invalid response from daemon (%s)", rsp));
         }
-
-        InterfaceConfiguration cfg = new InterfaceConfiguration();
-        cfg.hwAddr = st.nextToken(" ");
-        try {
-            cfg.ipAddr = stringToIpAddr(st.nextToken(" "));
-        } catch (UnknownHostException uhe) {
-            Slog.e(TAG, "Failed to parse ipaddr", uhe);
-            cfg.ipAddr = 0;
-        }
-
-        try {
-            cfg.netmask = stringToIpAddr(st.nextToken(" "));
-        } catch (UnknownHostException uhe) {
-            Slog.e(TAG, "Failed to parse netmask", uhe);
-            cfg.netmask = 0;
-        }
-        cfg.interfaceFlags = st.nextToken("]").trim() +"]";
         Slog.d(TAG, String.format("flags <%s>", cfg.interfaceFlags));
         return cfg;
     }
@@ -272,7 +290,12 @@
             String iface, InterfaceConfiguration cfg) throws IllegalStateException {
         String cmd = String.format("interface setcfg %s %s %s %s", iface,
                 intToIpString(cfg.ipAddr), intToIpString(cfg.netmask), cfg.interfaceFlags);
-        mConnector.doCommand(cmd);
+        try {
+            mConnector.doCommand(cmd);
+        } catch (NativeDaemonConnectorException e) {
+            throw new IllegalStateException(
+                    "Unable to communicate with native daemon to interface setcfg");
+        }
     }
 
     public void shutdown() {
@@ -289,20 +312,25 @@
         mContext.enforceCallingOrSelfPermission(
                 android.Manifest.permission.ACCESS_NETWORK_STATE, "NetworkManagementService");
 
-        ArrayList<String> rsp = mConnector.doCommand("ipfwd status");
+        ArrayList<String> rsp;
+        try {
+            rsp = mConnector.doCommand("ipfwd status");
+        } catch (NativeDaemonConnectorException e) {
+            throw new IllegalStateException(
+                    "Unable to communicate with native daemon to ipfwd status");
+        }
 
         for (String line : rsp) {
-            String []tok = line.split(" ");
+            String[] tok = line.split(" ");
+            if (tok.length < 3) {
+                Slog.e(TAG, "Malformed response from native daemon: " + line);
+                return false;
+            }
+
             int code = Integer.parseInt(tok[0]);
             if (code == NetdResponseCode.IpFwdStatusResult) {
                 // 211 Forwarding <enabled/disabled>
-                if (tok.length !=2) {
-                    throw new IllegalStateException(
-                            String.format("Malformatted list entry '%s'", line));
-                }
-                if (tok[2].equals("enabled"))
-                    return true;
-                return false;
+                return "enabled".equals(tok[2]);
             } else {
                 throw new IllegalStateException(String.format("Unexpected response code %d", code));
             }
@@ -326,29 +354,45 @@
         for (String d : dhcpRange) {
             cmd += " " + d;
         }
-        mConnector.doCommand(cmd);
+
+        try {
+            mConnector.doCommand(cmd);
+        } catch (NativeDaemonConnectorException e) {
+            throw new IllegalStateException("Unable to communicate to native daemon");
+        }
     }
 
     public void stopTethering() throws IllegalStateException {
         mContext.enforceCallingOrSelfPermission(
                 android.Manifest.permission.CHANGE_NETWORK_STATE, "NetworkManagementService");
-        mConnector.doCommand("tether stop");
+        try {
+            mConnector.doCommand("tether stop");
+        } catch (NativeDaemonConnectorException e) {
+            throw new IllegalStateException("Unable to communicate to native daemon to stop tether");
+        }
     }
 
     public boolean isTetheringStarted() throws IllegalStateException {
         mContext.enforceCallingOrSelfPermission(
                 android.Manifest.permission.ACCESS_NETWORK_STATE, "NetworkManagementService");
 
-        ArrayList<String> rsp = mConnector.doCommand("tether status");
+        ArrayList<String> rsp;
+        try {
+            rsp = mConnector.doCommand("tether status");
+        } catch (NativeDaemonConnectorException e) {
+            throw new IllegalStateException(
+                    "Unable to communicate to native daemon to get tether status");
+        }
 
         for (String line : rsp) {
-            String []tok = line.split(" ");
+            String[] tok = line.split(" ");
+            if (tok.length < 3) {
+                throw new IllegalStateException("Malformed response for tether status: " + line);
+            }
             int code = Integer.parseInt(tok[0]);
             if (code == NetdResponseCode.TetherStatusResult) {
                 // XXX: Tethering services <started/stopped> <TBD>...
-                if (tok[2].equals("started"))
-                    return true;
-                return false;
+                return "started".equals(tok[2]);
             } else {
                 throw new IllegalStateException(String.format("Unexpected response code %d", code));
             }
@@ -359,20 +403,35 @@
     public void tetherInterface(String iface) throws IllegalStateException {
         mContext.enforceCallingOrSelfPermission(
                 android.Manifest.permission.CHANGE_NETWORK_STATE, "NetworkManagementService");
-        mConnector.doCommand("tether interface add " + iface);
+        try {
+            mConnector.doCommand("tether interface add " + iface);
+        } catch (NativeDaemonConnectorException e) {
+            throw new IllegalStateException(
+                    "Unable to communicate to native daemon for adding tether interface");
+        }
     }
 
     public void untetherInterface(String iface) {
         mContext.enforceCallingOrSelfPermission(
                 android.Manifest.permission.CHANGE_NETWORK_STATE, "NetworkManagementService");
-        mConnector.doCommand("tether interface remove " + iface);
+        try {
+            mConnector.doCommand("tether interface remove " + iface);
+        } catch (NativeDaemonConnectorException e) {
+            throw new IllegalStateException(
+                    "Unable to communicate to native daemon for removing tether interface");
+        }
     }
 
     public String[] listTetheredInterfaces() throws IllegalStateException {
         mContext.enforceCallingOrSelfPermission(
                 android.Manifest.permission.ACCESS_NETWORK_STATE, "NetworkManagementService");
-        return mConnector.doListCommand(
-                "tether interface list", NetdResponseCode.TetherInterfaceListResult);
+        try {
+            return mConnector.doListCommand(
+                    "tether interface list", NetdResponseCode.TetherInterfaceListResult);
+        } catch (NativeDaemonConnectorException e) {
+            throw new IllegalStateException(
+                    "Unable to communicate to native daemon for listing tether interfaces");
+        }
     }
 
     public void setDnsForwarders(String[] dns) throws IllegalStateException {
@@ -383,7 +442,12 @@
             for (String s : dns) {
                 cmd += " " + InetAddress.getByName(s).getHostAddress();
             }
-            mConnector.doCommand(cmd);
+            try {
+                mConnector.doCommand(cmd);
+            } catch (NativeDaemonConnectorException e) {
+                throw new IllegalStateException(
+                        "Unable to communicate to native daemon for setting tether dns");
+            }
         } catch (UnknownHostException e) {
             throw new IllegalStateException("Error resolving dns name", e);
         }
@@ -392,30 +456,50 @@
     public String[] getDnsForwarders() throws IllegalStateException {
         mContext.enforceCallingOrSelfPermission(
                 android.Manifest.permission.ACCESS_NETWORK_STATE, "NetworkManagementService");
-        return mConnector.doListCommand(
-                "tether dns list", NetdResponseCode.TetherDnsFwdTgtListResult);
+        try {
+            return mConnector.doListCommand(
+                    "tether dns list", NetdResponseCode.TetherDnsFwdTgtListResult);
+        } catch (NativeDaemonConnectorException e) {
+            throw new IllegalStateException(
+                    "Unable to communicate to native daemon for listing tether dns");
+        }
     }
 
     public void enableNat(String internalInterface, String externalInterface)
             throws IllegalStateException {
         mContext.enforceCallingOrSelfPermission(
                 android.Manifest.permission.CHANGE_NETWORK_STATE, "NetworkManagementService");
-        mConnector.doCommand(
-                String.format("nat enable %s %s", internalInterface, externalInterface));
+        try {
+            mConnector.doCommand(
+                    String.format("nat enable %s %s", internalInterface, externalInterface));
+        } catch (NativeDaemonConnectorException e) {
+            throw new IllegalStateException(
+                    "Unable to communicate to native daemon for enabling NAT interface");
+        }
     }
 
     public void disableNat(String internalInterface, String externalInterface)
             throws IllegalStateException {
         mContext.enforceCallingOrSelfPermission(
                 android.Manifest.permission.CHANGE_NETWORK_STATE, "NetworkManagementService");
-        mConnector.doCommand(
-                String.format("nat disable %s %s", internalInterface, externalInterface));
+        try {
+            mConnector.doCommand(
+                    String.format("nat disable %s %s", internalInterface, externalInterface));
+        } catch (NativeDaemonConnectorException e) {
+            throw new IllegalStateException(
+                    "Unable to communicate to native daemon for disabling NAT interface");
+        }
     }
 
     public String[] listTtys() throws IllegalStateException {
         mContext.enforceCallingOrSelfPermission(
                 android.Manifest.permission.ACCESS_NETWORK_STATE, "NetworkManagementService");
-        return mConnector.doListCommand("list_ttys", NetdResponseCode.TtyListResult);
+        try {
+            return mConnector.doListCommand("list_ttys", NetdResponseCode.TtyListResult);
+        } catch (NativeDaemonConnectorException e) {
+            throw new IllegalStateException(
+                    "Unable to communicate to native daemon for listing TTYs");
+        }
     }
 
     public void attachPppd(String tty, String localAddr, String remoteAddr, String dns1Addr,
@@ -430,31 +514,52 @@
                     InetAddress.getByName(dns2Addr).getHostAddress()));
         } catch (UnknownHostException e) {
             throw new IllegalStateException("Error resolving addr", e);
+        } catch (NativeDaemonConnectorException e) {
+            throw new IllegalStateException("Error communicating to native daemon to attach pppd", e);
         }
     }
 
     public void detachPppd(String tty) throws IllegalStateException {
         mContext.enforceCallingOrSelfPermission(
                 android.Manifest.permission.CHANGE_NETWORK_STATE, "NetworkManagementService");
-        mConnector.doCommand(String.format("pppd detach %s", tty));
+        try {
+            mConnector.doCommand(String.format("pppd detach %s", tty));
+        } catch (NativeDaemonConnectorException e) {
+            throw new IllegalStateException("Error communicating to native daemon to detach pppd", e);
+        }
     }
 
     public void startUsbRNDIS() throws IllegalStateException {
         mContext.enforceCallingOrSelfPermission(
                 android.Manifest.permission.CHANGE_NETWORK_STATE, "NetworkManagementService");
-        mConnector.doCommand("usb startrndis");
+        try {
+            mConnector.doCommand("usb startrndis");
+        } catch (NativeDaemonConnectorException e) {
+            throw new IllegalStateException(
+                    "Error communicating to native daemon for starting RNDIS", e);
+        }
     }
 
     public void stopUsbRNDIS() throws IllegalStateException {
         mContext.enforceCallingOrSelfPermission(
                 android.Manifest.permission.CHANGE_NETWORK_STATE, "NetworkManagementService");
-        mConnector.doCommand("usb stoprndis");
+        try {
+            mConnector.doCommand("usb stoprndis");
+        } catch (NativeDaemonConnectorException e) {
+            throw new IllegalStateException("Error communicating to native daemon", e);
+        }
     }
 
     public boolean isUsbRNDISStarted() throws IllegalStateException {
         mContext.enforceCallingOrSelfPermission(
                 android.Manifest.permission.ACCESS_NETWORK_STATE, "NetworkManagementService");
-        ArrayList<String> rsp = mConnector.doCommand("usb rndisstatus");
+        ArrayList<String> rsp;
+        try {
+            rsp = mConnector.doCommand("usb rndisstatus");
+        } catch (NativeDaemonConnectorException e) {
+            throw new IllegalStateException(
+                    "Error communicating to native daemon to check RNDIS status", e);
+        }
 
         for (String line : rsp) {
             String []tok = line.split(" ");
@@ -476,31 +581,35 @@
                 android.Manifest.permission.CHANGE_NETWORK_STATE, "NetworkManagementService");
         mContext.enforceCallingOrSelfPermission(
                 android.Manifest.permission.CHANGE_WIFI_STATE, "NetworkManagementService");
-        mConnector.doCommand(String.format("softap stop " + wlanIface));
-        mConnector.doCommand(String.format("softap fwreload " + wlanIface + " AP"));
-        mConnector.doCommand(String.format("softap start " + wlanIface));
-        if (wifiConfig == null) {
-            mConnector.doCommand(String.format("softap set " + wlanIface + " " + softapIface));
-        } else {
-            /**
-             * softap set arg1 arg2 arg3 [arg4 arg5 arg6 arg7 arg8]
-             * argv1 - wlan interface
-             * argv2 - softap interface
-             * argv3 - SSID
-             * argv4 - Security
-             * argv5 - Key
-             * argv6 - Channel
-             * argv7 - Preamble
-             * argv8 - Max SCB
-             */
-            String str = String.format("softap set " + wlanIface + " " + softapIface +
-                                       " %s %s %s", convertQuotedString(wifiConfig.SSID),
-                                       wifiConfig.allowedKeyManagement.get(KeyMgmt.WPA_PSK) ?
-                                       "wpa2-psk" : "open",
-                                       convertQuotedString(wifiConfig.preSharedKey));
-            mConnector.doCommand(str);
+        try {
+            mConnector.doCommand(String.format("softap stop " + wlanIface));
+            mConnector.doCommand(String.format("softap fwreload " + wlanIface + " AP"));
+            mConnector.doCommand(String.format("softap start " + wlanIface));
+            if (wifiConfig == null) {
+                mConnector.doCommand(String.format("softap set " + wlanIface + " " + softapIface));
+            } else {
+                /**
+                 * softap set arg1 arg2 arg3 [arg4 arg5 arg6 arg7 arg8]
+                 * argv1 - wlan interface
+                 * argv2 - softap interface
+                 * argv3 - SSID
+                 * argv4 - Security
+                 * argv5 - Key
+                 * argv6 - Channel
+                 * argv7 - Preamble
+                 * argv8 - Max SCB
+                 */
+                String str = String.format("softap set " + wlanIface + " " + softapIface +
+                                           " %s %s %s", convertQuotedString(wifiConfig.SSID),
+                                           wifiConfig.allowedKeyManagement.get(KeyMgmt.WPA_PSK) ?
+                                           "wpa2-psk" : "open",
+                                           convertQuotedString(wifiConfig.preSharedKey));
+                mConnector.doCommand(str);
+            }
+            mConnector.doCommand(String.format("softap startap"));
+        } catch (NativeDaemonConnectorException e) {
+            throw new IllegalStateException("Error communicating to native daemon to start softap", e);
         }
-        mConnector.doCommand(String.format("softap startap"));
     }
 
     private String convertQuotedString(String s) {
@@ -516,7 +625,12 @@
                 android.Manifest.permission.CHANGE_NETWORK_STATE, "NetworkManagementService");
         mContext.enforceCallingOrSelfPermission(
                 android.Manifest.permission.CHANGE_WIFI_STATE, "NetworkManagementService");
-        mConnector.doCommand("softap stopap");
+        try {
+            mConnector.doCommand("softap stopap");
+        } catch (NativeDaemonConnectorException e) {
+            throw new IllegalStateException("Error communicating to native daemon to stop soft AP",
+                    e);
+        }
     }
 
     public void setAccessPoint(WifiConfiguration wifiConfig, String wlanIface, String softapIface)
@@ -525,15 +639,19 @@
                 android.Manifest.permission.CHANGE_NETWORK_STATE, "NetworkManagementService");
         mContext.enforceCallingOrSelfPermission(
             android.Manifest.permission.CHANGE_WIFI_STATE, "NetworkManagementService");
-        if (wifiConfig == null) {
-            mConnector.doCommand(String.format("softap set " + wlanIface + " " + softapIface));
-        } else {
-            String str = String.format("softap set " + wlanIface + " " + softapIface +
-                                       " %s %s %s", convertQuotedString(wifiConfig.SSID),
-                                       wifiConfig.allowedKeyManagement.get(KeyMgmt.WPA_PSK) ?
-                                       "wpa2-psk" : "open",
-                                       convertQuotedString(wifiConfig.preSharedKey));
-            mConnector.doCommand(str);
+        try {
+            if (wifiConfig == null) {
+                mConnector.doCommand(String.format("softap set " + wlanIface + " " + softapIface));
+            } else {
+                String str = String.format("softap set " + wlanIface + " " + softapIface
+                        + " %s %s %s", convertQuotedString(wifiConfig.SSID),
+                        wifiConfig.allowedKeyManagement.get(KeyMgmt.WPA_PSK) ? "wpa2-psk" : "open",
+                        convertQuotedString(wifiConfig.preSharedKey));
+                mConnector.doCommand(str);
+            }
+        } catch (NativeDaemonConnectorException e) {
+            throw new IllegalStateException("Error communicating to native daemon to set soft AP",
+                    e);
         }
     }
 
@@ -541,9 +659,22 @@
         mContext.enforceCallingOrSelfPermission(
                 android.Manifest.permission.ACCESS_NETWORK_STATE, "NetworkManagementService");
         try {
-            String rsp = mConnector.doCommand(
-                    String.format("interface read%scounter %s", (rx ? "rx" : "tx"), iface)).get(0);
-            String []tok = rsp.split(" ");
+            String rsp;
+            try {
+                rsp = mConnector.doCommand(
+                        String.format("interface read%scounter %s", (rx ? "rx" : "tx"), iface)).get(0);
+            } catch (NativeDaemonConnectorException e1) {
+                Slog.e(TAG, "Error communicating with native daemon", e1);
+                return -1;
+            }
+
+            String[] tok = rsp.split(" ");
+            if (tok.length < 2) {
+                Slog.e(TAG, String.format("Malformed response for reading %s interface",
+                        (rx ? "rx" : "tx")));
+                return -1;
+            }
+
             int code;
             try {
                 code = Integer.parseInt(tok[0]);
@@ -575,17 +706,34 @@
     public void setInterfaceThrottle(String iface, int rxKbps, int txKbps) {
         mContext.enforceCallingOrSelfPermission(
                 android.Manifest.permission.CHANGE_NETWORK_STATE, "NetworkManagementService");
-        mConnector.doCommand(String.format(
-                "interface setthrottle %s %d %d", iface, rxKbps, txKbps));
+        try {
+            mConnector.doCommand(String.format(
+                    "interface setthrottle %s %d %d", iface, rxKbps, txKbps));
+        } catch (NativeDaemonConnectorException e) {
+            Slog.e(TAG, "Error communicating with native daemon to set throttle", e);
+        }
     }
 
     private int getInterfaceThrottle(String iface, boolean rx) {
         mContext.enforceCallingOrSelfPermission(
                 android.Manifest.permission.ACCESS_NETWORK_STATE, "NetworkManagementService");
         try {
-            String rsp = mConnector.doCommand(
-                    String.format("interface getthrottle %s %s", iface,(rx ? "rx" : "tx"))).get(0);
-            String []tok = rsp.split(" ");
+            String rsp;
+            try {
+                rsp = mConnector.doCommand(
+                        String.format("interface getthrottle %s %s", iface,
+                                (rx ? "rx" : "tx"))).get(0);
+            } catch (NativeDaemonConnectorException e) {
+                Slog.e(TAG, "Error communicating with native daemon to getthrottle", e);
+                return -1;
+            }
+
+            String[] tok = rsp.split(" ");
+            if (tok.length < 2) {
+                Slog.e(TAG, "Malformed response to getthrottle command");
+                return -1;
+            }
+
             int code;
             try {
                 code = Integer.parseInt(tok[0]);
diff --git a/services/java/com/android/server/NotificationManagerService.java b/services/java/com/android/server/NotificationManagerService.java
index 73d17ea..25de8b0 100755
--- a/services/java/com/android/server/NotificationManagerService.java
+++ b/services/java/com/android/server/NotificationManagerService.java
@@ -16,9 +16,8 @@
 
 package com.android.server;
 
-import com.android.server.status.IconData;
-import com.android.server.status.NotificationData;
-import com.android.server.status.StatusBarService;
+import com.android.internal.statusbar.StatusBarNotification;
+import com.android.server.StatusBarManagerService;
 
 import android.app.ActivityManagerNative;
 import android.app.IActivityManager;
@@ -39,9 +38,11 @@
 import android.content.pm.PackageManager.NameNotFoundException;
 import android.content.res.Resources;
 import android.database.ContentObserver;
+import android.hardware.Usb;
 import android.media.AudioManager;
 import android.net.Uri;
 import android.os.BatteryManager;
+import android.os.Bundle;
 import android.os.Binder;
 import android.os.Handler;
 import android.os.IBinder;
@@ -71,6 +72,8 @@
     private static final String TAG = "NotificationService";
     private static final boolean DBG = false;
 
+    private static final int MAX_PACKAGE_NOTIFICATIONS = 50;
+
     // message codes
     private static final int MESSAGE_TIMEOUT = 2;
 
@@ -86,7 +89,7 @@
     final IBinder mForegroundToken = new Binder();
 
     private WorkerHandler mHandler;
-    private StatusBarService mStatusBarService;
+    private StatusBarManagerService mStatusBar;
     private LightsService mLightsService;
     private LightsService.Light mBatteryLight;
     private LightsService.Light mNotificationLight;
@@ -110,8 +113,6 @@
     private boolean mNotificationPulseEnabled;
 
     // for adb connected notifications
-    private boolean mUsbConnected;
-    private boolean mAdbEnabled = false;
     private boolean mAdbNotificationShown = false;
     private Notification mAdbNotification;
 
@@ -163,16 +164,21 @@
         final String pkg;
         final String tag;
         final int id;
+        final int uid;
+        final int initialPid;
         ITransientNotification callback;
         int duration;
         final Notification notification;
         IBinder statusBarKey;
 
-        NotificationRecord(String pkg, String tag, int id, Notification notification)
+        NotificationRecord(String pkg, String tag, int id, int uid, int initialPid,
+                Notification notification)
         {
             this.pkg = pkg;
             this.tag = tag;
             this.id = id;
+            this.uid = uid;
+            this.initialPid = initialPid;
             this.notification = notification;
         }
 
@@ -238,8 +244,8 @@
         }
     }
 
-    private StatusBarService.NotificationCallbacks mNotificationCallbacks
-            = new StatusBarService.NotificationCallbacks() {
+    private StatusBarManagerService.NotificationCallbacks mNotificationCallbacks
+            = new StatusBarManagerService.NotificationCallbacks() {
 
         public void onSetDisabled(int status) {
             synchronized (mNotificationList) {
@@ -302,6 +308,20 @@
                 updateLightsLocked();
             }
         }
+
+        public void onNotificationError(String pkg, String tag, int id,
+                int uid, int initialPid, String message) {
+            Slog.d(TAG, "onNotification error pkg=" + pkg + " tag=" + tag + " id=" + id);
+            cancelNotification(pkg, tag, id, 0, 0);
+            long ident = Binder.clearCallingIdentity();
+            try {
+                ActivityManagerNative.getDefault().crashApplication(uid, initialPid, pkg,
+                        "Bad notification posted from package " + pkg
+                        + ": " + message);
+            } catch (RemoteException e) {
+            }
+            Binder.restoreCallingIdentity(ident);
+        }
     };
 
     private BroadcastReceiver mIntentReceiver = new BroadcastReceiver() {
@@ -326,12 +346,14 @@
                     mBatteryFull = batteryFull;
                     updateLights();
                 }
-            } else if (action.equals(Intent.ACTION_UMS_CONNECTED)) {
-                mUsbConnected = true;
-                updateAdbNotification();
-            } else if (action.equals(Intent.ACTION_UMS_DISCONNECTED)) {
-                mUsbConnected = false;
-                updateAdbNotification();
+            } else if (action.equals(Usb.ACTION_USB_STATE)) {
+                Bundle extras = intent.getExtras();
+                boolean usbConnected = extras.getBoolean(Usb.USB_CONNECTED);
+                boolean adbEnabled = (Usb.USB_FUNCTION_ENABLED.equals(
+                                    extras.getString(Usb.USB_FUNCTION_ADB)));
+                updateAdbNotification(usbConnected && adbEnabled);
+            } else if (action.equals(Usb.ACTION_USB_DISCONNECTED)) {
+                updateAdbNotification(false);
             } else if (action.equals(Intent.ACTION_PACKAGE_REMOVED)
                     || action.equals(Intent.ACTION_PACKAGE_RESTARTED)
                     || (queryRestart=action.equals(Intent.ACTION_QUERY_PACKAGE_RESTART))
@@ -377,8 +399,6 @@
 
         void observe() {
             ContentResolver resolver = mContext.getContentResolver();
-            resolver.registerContentObserver(Settings.Secure.getUriFor(
-                    Settings.Secure.ADB_ENABLED), false, this);
             resolver.registerContentObserver(Settings.System.getUriFor(
                     Settings.System.NOTIFICATION_LIGHT_PULSE), false, this);
             update();
@@ -390,12 +410,6 @@
 
         public void update() {
             ContentResolver resolver = mContext.getContentResolver();
-            boolean adbEnabled = Settings.Secure.getInt(resolver,
-                        Settings.Secure.ADB_ENABLED, 0) != 0;
-            if (mAdbEnabled != adbEnabled) {
-                mAdbEnabled = adbEnabled;
-                updateAdbNotification();
-            }
             boolean pulseEnabled = Settings.System.getInt(resolver,
                         Settings.System.NOTIFICATION_LIGHT_PULSE, 0) != 0;
             if (mNotificationPulseEnabled != pulseEnabled) {
@@ -405,7 +419,7 @@
         }
     }
 
-    NotificationManagerService(Context context, StatusBarService statusBar,
+    NotificationManagerService(Context context, StatusBarManagerService statusBar,
             LightsService lights)
     {
         super();
@@ -417,7 +431,7 @@
         mToastQueue = new ArrayList<ToastRecord>();
         mHandler = new WorkerHandler();
 
-        mStatusBarService = statusBar;
+        mStatusBar = statusBar;
         statusBar.setNotificationCallbacks(mNotificationCallbacks);
 
         mBatteryLight = lights.getLight(LightsService.LIGHT_ID_BATTERY);
@@ -444,8 +458,7 @@
         // register for battery changed notifications
         IntentFilter filter = new IntentFilter();
         filter.addAction(Intent.ACTION_BATTERY_CHANGED);
-        filter.addAction(Intent.ACTION_UMS_CONNECTED);
-        filter.addAction(Intent.ACTION_UMS_DISCONNECTED);
+        filter.addAction(Usb.ACTION_USB_STATE);
         filter.addAction(Intent.ACTION_SCREEN_ON);
         filter.addAction(Intent.ACTION_SCREEN_OFF);
         filter.addAction(TelephonyManager.ACTION_PHONE_STATE_CHANGED);
@@ -656,8 +669,31 @@
     public void enqueueNotificationWithTag(String pkg, String tag, int id,
             Notification notification, int[] idOut)
     {
+        final int callingUid = Binder.getCallingUid();
+        final int callingPid = Binder.getCallingPid();
+        
         checkIncomingCall(pkg);
 
+        // Limit the number of notifications that any given package except the android
+        // package can enqueue.  Prevents DOS attacks and deals with leaks.
+        if (!"android".equals(pkg)) {
+            synchronized (mNotificationList) {
+                int count = 0;
+                final int N = mNotificationList.size();
+                for (int i=0; i<N; i++) {
+                    final NotificationRecord r = mNotificationList.get(i);
+                    if (r.pkg.equals(pkg)) {
+                        count++;
+                        if (count >= MAX_PACKAGE_NOTIFICATIONS) {
+                            Slog.e(TAG, "Package has already posted " + count
+                                    + " notifications.  Not showing more.  package=" + pkg);
+                            return;
+                        }
+                    }
+                }
+            }
+        }
+
         // This conditional is a dirty hack to limit the logging done on
         //     behalf of the download manager without affecting other apps.
         if (!pkg.equals("com.android.providers.downloads")
@@ -681,7 +717,8 @@
         }
 
         synchronized (mNotificationList) {
-            NotificationRecord r = new NotificationRecord(pkg, tag, id, notification);
+            NotificationRecord r = new NotificationRecord(pkg, tag, id,
+                    callingUid, callingPid, notification);
             NotificationRecord old = null;
 
             int index = indexOfNotificationLocked(pkg, tag, id);
@@ -705,36 +742,13 @@
             }
 
             if (notification.icon != 0) {
-                IconData icon = IconData.makeIcon(null, pkg, notification.icon,
-                                                    notification.iconLevel,
-                                                    notification.number);
-                CharSequence truncatedTicker = notification.tickerText;
-
-                // TODO: make this restriction do something smarter like never fill
-                // more than two screens.  "Why would anyone need more than 80 characters." :-/
-                final int maxTickerLen = 80;
-                if (truncatedTicker != null && truncatedTicker.length() > maxTickerLen) {
-                    truncatedTicker = truncatedTicker.subSequence(0, maxTickerLen);
-                }
-
-                NotificationData n = new NotificationData();
-                n.pkg = pkg;
-                n.tag = tag;
-                n.id = id;
-                n.when = notification.when;
-                n.tickerText = truncatedTicker;
-                n.ongoingEvent = (notification.flags & Notification.FLAG_ONGOING_EVENT) != 0;
-                if (!n.ongoingEvent && (notification.flags & Notification.FLAG_NO_CLEAR) == 0) {
-                    n.clearable = true;
-                }
-                n.contentView = notification.contentView;
-                n.contentIntent = notification.contentIntent;
-                n.deleteIntent = notification.deleteIntent;
+                StatusBarNotification n = new StatusBarNotification(pkg, id, tag,
+                        r.uid, r.initialPid, notification);
                 if (old != null && old.statusBarKey != null) {
                     r.statusBarKey = old.statusBarKey;
                     long identity = Binder.clearCallingIdentity();
                     try {
-                        mStatusBarService.updateIcon(r.statusBarKey, icon, n);
+                        mStatusBar.updateNotification(r.statusBarKey, n);
                     }
                     finally {
                         Binder.restoreCallingIdentity(identity);
@@ -742,21 +756,19 @@
                 } else {
                     long identity = Binder.clearCallingIdentity();
                     try {
-                        r.statusBarKey = mStatusBarService.addIcon(icon, n);
+                        r.statusBarKey = mStatusBar.addNotification(n);
                         mAttentionLight.pulse();
                     }
                     finally {
                         Binder.restoreCallingIdentity(identity);
                     }
                 }
-
                 sendAccessibilityEvent(notification, pkg);
-
             } else {
                 if (old != null && old.statusBarKey != null) {
                     long identity = Binder.clearCallingIdentity();
                     try {
-                        mStatusBarService.removeIcon(old.statusBarKey);
+                        mStatusBar.removeNotification(old.statusBarKey);
                     }
                     finally {
                         Binder.restoreCallingIdentity(identity);
@@ -864,7 +876,7 @@
         if (r.notification.icon != 0) {
             long identity = Binder.clearCallingIdentity();
             try {
-                mStatusBarService.removeIcon(r.statusBarKey);
+                mStatusBar.removeNotification(r.statusBarKey);
             }
             finally {
                 Binder.restoreCallingIdentity(identity);
@@ -1118,8 +1130,8 @@
     // This is here instead of StatusBarPolicy because it is an important
     // security feature that we don't want people customizing the platform
     // to accidentally lose.
-    private void updateAdbNotification() {
-        if (mAdbEnabled && mUsbConnected) {
+    private void updateAdbNotification(boolean adbEnabled) {
+        if (adbEnabled) {
             if ("0".equals(SystemProperties.get("persist.adb.notify"))) {
                 return;
             }
diff --git a/services/java/com/android/server/PackageManagerService.java b/services/java/com/android/server/PackageManagerService.java
index 49d2a76..11d0b7a 100644
--- a/services/java/com/android/server/PackageManagerService.java
+++ b/services/java/com/android/server/PackageManagerService.java
@@ -150,6 +150,8 @@
 
     private static final boolean GET_CERTIFICATES = true;
 
+    private static final String SYSTEM_PROPERTY_EFS_ENABLED = "persist.security.efs.enabled";
+
     private static final int REMOVE_EVENTS =
         FileObserver.CLOSE_WRITE | FileObserver.DELETE | FileObserver.MOVED_FROM;
     private static final int ADD_EVENTS =
@@ -204,6 +206,10 @@
     // This is where all application persistent data goes.
     final File mAppDataDir;
 
+    // If Encrypted File System feature is enabled, all application persistent data
+    // should go here instead.
+    final File mSecureAppDataDir;
+
     // This is the object monitoring the framework dir.
     final FileObserver mFrameworkInstallObserver;
 
@@ -768,6 +774,7 @@
 
             File dataDir = Environment.getDataDirectory();
             mAppDataDir = new File(dataDir, "data");
+            mSecureAppDataDir = new File(dataDir, "secure/data");
             mDrmAppPrivateInstallDir = new File(dataDir, "app-private");
 
             if (mInstaller == null) {
@@ -777,6 +784,7 @@
                 File miscDir = new File(dataDir, "misc");
                 miscDir.mkdirs();
                 mAppDataDir.mkdirs();
+                mSecureAppDataDir.mkdirs();
                 mDrmAppPrivateInstallDir.mkdirs();
             }
 
@@ -937,7 +945,9 @@
                             + " no longer exists; wiping its data";
                     reportSettingsProblem(Log.WARN, msg);
                     if (mInstaller != null) {
-                        mInstaller.remove(ps.name);
+                        // XXX how to set useEncryptedFSDir for packages that
+                        // are not encrypted?
+                        mInstaller.remove(ps.name, true);
                     }
                 }
             }
@@ -1020,7 +1030,8 @@
     void cleanupInstallFailedPackage(PackageSetting ps) {
         Slog.i(TAG, "Cleaning up incompletely installed app: " + ps.name);
         if (mInstaller != null) {
-            int retCode = mInstaller.remove(ps.name);
+            boolean useSecureFS = useEncryptedFilesystemForPackage(ps.pkg);
+            int retCode = mInstaller.remove(ps.name, useSecureFS);
             if (retCode < 0) {
                 Slog.w(TAG, "Couldn't remove app data directory for package: "
                            + ps.name + ", retcode=" + retCode);
@@ -1718,6 +1729,7 @@
     
     static boolean comparePermissionInfos(PermissionInfo pi1, PermissionInfo pi2) {
         if (pi1.icon != pi2.icon) return false;
+        if (pi1.logo != pi2.logo) return false;
         if (pi1.protectionLevel != pi2.protectionLevel) return false;
         if (!compareStrings(pi1.name, pi2.name)) return false;
         if (!compareStrings(pi1.nonLocalizedLabel, pi2.nonLocalizedLabel)) return false;
@@ -2363,7 +2375,7 @@
                         && (p.applicationInfo.flags&ApplicationInfo.FLAG_PERSISTENT) != 0
                         && (!mSafeMode || (p.applicationInfo.flags
                                 &ApplicationInfo.FLAG_SYSTEM) != 0)) {
-                    finalList.add(p.applicationInfo);
+                    finalList.add(PackageParser.generateApplicationInfo(p, flags));
                 }
             }
         }
@@ -2743,6 +2755,11 @@
 
         return performed ? DEX_OPT_PERFORMED : DEX_OPT_SKIPPED;
     }
+
+    private static boolean useEncryptedFilesystemForPackage(PackageParser.Package pkg) {
+        return Environment.isEncryptedFilesystemEnabled() &&
+                ((pkg.applicationInfo.flags & ApplicationInfo.FLAG_NEVER_ENCRYPT) == 0);
+    }
     
     private boolean verifyPackageUpdate(PackageSetting oldPkg, PackageParser.Package newPkg) {
         if ((oldPkg.pkgFlags&ApplicationInfo.FLAG_SYSTEM) == 0) {
@@ -2760,7 +2777,14 @@
     }
 
     private File getDataPathForPackage(PackageParser.Package pkg) {
-        return new File(mAppDataDir, pkg.packageName);
+        boolean useEncryptedFSDir = useEncryptedFilesystemForPackage(pkg);
+        File dataPath;
+        if (useEncryptedFSDir) {
+            dataPath = new File(mSecureAppDataDir, pkg.packageName);
+        } else {
+            dataPath = new File(mAppDataDir, pkg.packageName);
+        }
+        return dataPath;
     }
     
     private PackageParser.Package scanPackageLI(PackageParser.Package pkg,
@@ -3111,6 +3135,7 @@
             pkg.applicationInfo.dataDir = dataPath.getPath();
         } else {
             // This is a normal package, need to make its data directory.
+            boolean useEncryptedFSDir = useEncryptedFilesystemForPackage(pkg);
             dataPath = getDataPathForPackage(pkg);
             
             boolean uidError = false;
@@ -3127,7 +3152,7 @@
                         // If this is a system app, we can at least delete its
                         // current data so the application will still work.
                         if (mInstaller != null) {
-                            int ret = mInstaller.remove(pkgName);
+                            int ret = mInstaller.remove(pkgName, useEncryptedFSDir);
                             if (ret >= 0) {
                                 // Old data gone!
                                 String msg = "System package " + pkg.packageName
@@ -3138,7 +3163,7 @@
                                 recovered = true;
 
                                 // And now re-install the app.
-                                ret = mInstaller.install(pkgName, pkg.applicationInfo.uid,
+                                ret = mInstaller.install(pkgName, useEncryptedFSDir, pkg.applicationInfo.uid,
                                         pkg.applicationInfo.uid);
                                 if (ret == -1) {
                                     // Ack should not happen!
@@ -3178,7 +3203,7 @@
                     Log.v(TAG, "Want this data dir: " + dataPath);
                 //invoke installer to do the actual installation
                 if (mInstaller != null) {
-                    int ret = mInstaller.install(pkgName, pkg.applicationInfo.uid,
+                    int ret = mInstaller.install(pkgName, useEncryptedFSDir, pkg.applicationInfo.uid,
                             pkg.applicationInfo.uid);
                     if(ret < 0) {
                         // Error from installer
@@ -3623,21 +3648,19 @@
 
             installedNativeLibraries = true;
 
+            // Always extract the shared library
             String sharedLibraryFilePath = sharedLibraryDir.getPath() +
                 File.separator + libFileName;
             File sharedLibraryFile = new File(sharedLibraryFilePath);
-            if (! sharedLibraryFile.exists() ||
-                sharedLibraryFile.length() != entry.getSize() ||
-                sharedLibraryFile.lastModified() != entry.getTime()) {
-                if (Config.LOGD) {
-                    Log.d(TAG, "Caching shared lib " + entry.getName());
-                }
-                if (mInstaller == null) {
-                    sharedLibraryDir.mkdir();
-                }
-                cacheNativeBinaryLI(pkg, zipFile, entry, sharedLibraryDir,
-                        sharedLibraryFile);
+
+            if (Config.LOGD) {
+                Log.d(TAG, "Caching shared lib " + entry.getName());
             }
+            if (mInstaller == null) {
+                sharedLibraryDir.mkdir();
+            }
+            cacheNativeBinaryLI(pkg, zipFile, entry, sharedLibraryDir,
+                    sharedLibraryFile);
         }
         if (!hasNativeLibraries)
             return PACKAGE_INSTALL_NATIVE_NO_LIBRARIES;
@@ -3679,18 +3702,16 @@
             String installGdbServerPath = installGdbServerDir.getPath() +
                 "/" + GDBSERVER;
             File installGdbServerFile = new File(installGdbServerPath);
-            if (! installGdbServerFile.exists() ||
-                installGdbServerFile.length() != entry.getSize() ||
-                installGdbServerFile.lastModified() != entry.getTime()) {
-                if (Config.LOGD) {
-                    Log.d(TAG, "Caching gdbserver " + entry.getName());
-                }
-                if (mInstaller == null) {
-                    installGdbServerDir.mkdir();
-                }
-                cacheNativeBinaryLI(pkg, zipFile, entry, installGdbServerDir,
-                        installGdbServerFile);
+
+            if (Config.LOGD) {
+                Log.d(TAG, "Caching gdbserver " + entry.getName());
             }
+            if (mInstaller == null) {
+                installGdbServerDir.mkdir();
+            }
+            cacheNativeBinaryLI(pkg, zipFile, entry, installGdbServerDir,
+                    installGdbServerFile);
+
             return PACKAGE_INSTALL_NATIVE_FOUND_LIBRARIES;
         }
         return PACKAGE_INSTALL_NATIVE_NO_LIBRARIES;
@@ -3704,6 +3725,16 @@
     // one if ro.product.cpu.abi2 is defined.
     //
     private int cachePackageSharedLibsLI(PackageParser.Package pkg, File scanFile) {
+        // Remove all native binaries from a directory. This is used when upgrading
+        // a package: in case the new .apk doesn't contain a native binary that was
+        // in the old one (and thus installed), we need to remove it from
+        // /data/data/<appname>/lib
+        //
+        // The simplest way to do that is to remove all files in this directory,
+        // since it is owned by "system", applications are not supposed to write
+        // anything there.
+        removeNativeBinariesLI(pkg);
+
         String cpuAbi = Build.CPU_ABI;
         try {
             int result = cachePackageSharedLibsForAbiLI(pkg, scanFile, cpuAbi);
@@ -4552,6 +4583,8 @@
         }
     };
 
+    private static final boolean DEBUG_OBB = false;
+
     private static final void sendPackageBroadcast(String action, String pkg,
             Bundle extras, IIntentReceiver finishedReceiver) {
         IActivityManager am = ActivityManagerNative.getDefault();
@@ -4726,6 +4759,29 @@
         mHandler.sendMessage(msg);
     }
 
+    public void setPackageObbPath(String packageName, String path) {
+        if (DEBUG_OBB)
+            Log.v(TAG, "Setting .obb path for " + packageName + " to: " + path);
+        PackageSetting pkgSetting;
+        final int uid = Binder.getCallingUid();
+        final int permission = mContext.checkCallingPermission(
+                android.Manifest.permission.INSTALL_PACKAGES);
+        final boolean allowedByPermission = (permission == PackageManager.PERMISSION_GRANTED);
+        synchronized (mPackages) {
+            pkgSetting = mSettings.mPackages.get(packageName);
+            if (pkgSetting == null) {
+                throw new IllegalArgumentException("Unknown package: " + packageName);
+            }
+            if (!allowedByPermission && (uid != pkgSetting.userId)) {
+                throw new SecurityException("Permission denial: attempt to set .obb file from pid="
+                        + Binder.getCallingPid() + ", uid=" + uid + ", package uid="
+                        + pkgSetting.userId);
+            }
+            pkgSetting.obbPathString = path;
+            mSettings.writeLP();
+        }
+    }
+
     private void processPendingInstall(final InstallArgs args, final int currentStatus) {
         // Queue up an async operation since the package installation may take a little while.
         mHandler.post(new Runnable() {
@@ -6209,8 +6265,9 @@
             deletedPs = mSettings.mPackages.get(packageName);
         }
         if ((flags&PackageManager.DONT_DELETE_DATA) == 0) {
+            boolean useEncryptedFSDir = useEncryptedFilesystemForPackage(p);
             if (mInstaller != null) {
-                int retCode = mInstaller.remove(packageName);
+                int retCode = mInstaller.remove(packageName, useEncryptedFSDir);
                 if (retCode < 0) {
                     Slog.w(TAG, "Couldn't remove app data or cache directory for package: "
                                + packageName + ", retcode=" + retCode);
@@ -6451,6 +6508,7 @@
                 p = ps.pkg;
             }
         }
+        boolean useEncryptedFSDir = false;
 
         if(!dataOnly) {
             //need to check this only for fully installed applications
@@ -6463,9 +6521,10 @@
                 Slog.w(TAG, "Package " + packageName + " has no applicationInfo.");
                 return false;
             }
+            useEncryptedFSDir = useEncryptedFilesystemForPackage(p);
         }
         if (mInstaller != null) {
-            int retCode = mInstaller.clearUserData(packageName);
+            int retCode = mInstaller.clearUserData(packageName, useEncryptedFSDir);
             if (retCode < 0) {
                 Slog.w(TAG, "Couldn't remove cache files for package: "
                         + packageName);
@@ -6516,8 +6575,9 @@
             Slog.w(TAG, "Package " + packageName + " has no applicationInfo.");
             return false;
         }
+        boolean useEncryptedFSDir = useEncryptedFilesystemForPackage(p);
         if (mInstaller != null) {
-            int retCode = mInstaller.deleteCacheFiles(packageName);
+            int retCode = mInstaller.deleteCacheFiles(packageName, useEncryptedFSDir);
             if (retCode < 0) {
                 Slog.w(TAG, "Couldn't remove cache files for package: "
                            + packageName);
@@ -6579,9 +6639,10 @@
             }
             publicSrcDir = isForwardLocked(p) ? applicationInfo.publicSourceDir : null;
         }
+        boolean useEncryptedFSDir = useEncryptedFilesystemForPackage(p);
         if (mInstaller != null) {
             int res = mInstaller.getSizeInfo(packageName, p.mPath,
-                    publicSrcDir, pStats);
+                    publicSrcDir, pStats, useEncryptedFSDir);
             if (res < 0) {
                 return false;
             } else {
@@ -7082,12 +7143,19 @@
                     pw.print("    pkg="); pw.println(ps.pkg);
                     pw.print("    codePath="); pw.println(ps.codePathString);
                     pw.print("    resourcePath="); pw.println(ps.resourcePathString);
+                    pw.print("    obbPath="); pw.println(ps.obbPathString);
                     if (ps.pkg != null) {
                         pw.print("    dataDir="); pw.println(ps.pkg.applicationInfo.dataDir);
                         pw.print("    targetSdk="); pw.println(ps.pkg.applicationInfo.targetSdkVersion);
                         pw.print("    supportsScreens=[");
                         boolean first = true;
                         if ((ps.pkg.applicationInfo.flags &
+                                ApplicationInfo.FLAG_SUPPORTS_SMALL_SCREENS) != 0) {
+                            if (!first) pw.print(", ");
+                            first = false;
+                            pw.print("small");
+                        }
+                        if ((ps.pkg.applicationInfo.flags &
                                 ApplicationInfo.FLAG_SUPPORTS_NORMAL_SCREENS) != 0) {
                             if (!first) pw.print(", ");
                             first = false;
@@ -7100,10 +7168,10 @@
                             pw.print("large");
                         }
                         if ((ps.pkg.applicationInfo.flags &
-                                ApplicationInfo.FLAG_SUPPORTS_SMALL_SCREENS) != 0) {
+                                ApplicationInfo.FLAG_SUPPORTS_XLARGE_SCREENS) != 0) {
                             if (!first) pw.print(", ");
                             first = false;
-                            pw.print("small");
+                            pw.print("xlarge");
                         }
                         if ((ps.pkg.applicationInfo.flags &
                                 ApplicationInfo.FLAG_RESIZEABLE_FOR_SCREENS) != 0) {
@@ -7627,7 +7695,8 @@
             this.pkgFlags = pkgFlags & (
                     ApplicationInfo.FLAG_SYSTEM |
                     ApplicationInfo.FLAG_FORWARD_LOCK |
-                    ApplicationInfo.FLAG_EXTERNAL_STORAGE);
+                    ApplicationInfo.FLAG_EXTERNAL_STORAGE |
+                    ApplicationInfo.FLAG_NEVER_ENCRYPT);
         }
     }
 
@@ -7641,6 +7710,7 @@
         String codePathString;
         File resourcePath;
         String resourcePathString;
+        String obbPathString;
         private long timeStamp;
         private String timeStampString = "0";
         int versionCode;
@@ -7894,11 +7964,17 @@
             File dataDir = Environment.getDataDirectory();
             File systemDir = new File(dataDir, "system");
             // TODO(oam): This secure dir creation needs to be moved somewhere else (later)
+            File systemSecureDir = new File(dataDir, "secure/system");
             systemDir.mkdirs();
+            systemSecureDir.mkdirs();
             FileUtils.setPermissions(systemDir.toString(),
                     FileUtils.S_IRWXU|FileUtils.S_IRWXG
                     |FileUtils.S_IROTH|FileUtils.S_IXOTH,
                     -1, -1);
+            FileUtils.setPermissions(systemSecureDir.toString(),
+                    FileUtils.S_IRWXU|FileUtils.S_IRWXG
+                    |FileUtils.S_IROTH|FileUtils.S_IXOTH,
+                    -1, -1);
             mSettingsFilename = new File(systemDir, "packages.xml");
             mBackupSettingsFilename = new File(systemDir, "packages-backup.xml");
             mPackageListFilename = new File(systemDir, "packages.list");
@@ -8635,6 +8711,9 @@
             if (pkg.installerPackageName != null) {
                 serializer.attribute(null, "installer", pkg.installerPackageName);
             }
+            if (pkg.obbPathString != null) {
+                serializer.attribute(null, "obbPath", pkg.obbPathString);
+            }
             pkg.signatures.writeXml(serializer, "sigs", mPastSignatures);
             if ((pkg.pkgFlags&ApplicationInfo.FLAG_SYSTEM) == 0) {
                 serializer.startTag(null, "perms");
@@ -9011,6 +9090,7 @@
             String sharedIdStr = null;
             String codePathStr = null;
             String resourcePathStr = null;
+            String obbPathStr = null;
             String systemStr = null;
             String installerPackageName = null;
             String uidError = null;
@@ -9028,6 +9108,7 @@
                 sharedIdStr = parser.getAttributeValue(null, "sharedUserId");
                 codePathStr = parser.getAttributeValue(null, "codePath");
                 resourcePathStr = parser.getAttributeValue(null, "resourcePath");
+                obbPathStr = parser.getAttributeValue(null, "obbPath");
                 version = parser.getAttributeValue(null, "version");
                 if (version != null) {
                     try {
@@ -9125,6 +9206,7 @@
             if (packageSetting != null) {
                 packageSetting.uidError = "true".equals(uidError);
                 packageSetting.installerPackageName = installerPackageName;
+                packageSetting.obbPathString = obbPathStr;
                 final String enabledStr = parser.getAttributeValue(null, "enabled");
                 if (enabledStr != null) {
                     if (enabledStr.equalsIgnoreCase("true")) {
diff --git a/services/java/com/android/server/PowerManagerService.java b/services/java/com/android/server/PowerManagerService.java
index 493a348..e9d5efc 100644
--- a/services/java/com/android/server/PowerManagerService.java
+++ b/services/java/com/android/server/PowerManagerService.java
@@ -247,6 +247,9 @@
     private static final boolean mSpew = false;
     private static final boolean mDebugProximitySensor = (true || mSpew);
     private static final boolean mDebugLightSensor = (false || mSpew);
+    
+    private native void nativeInit();
+    private native void nativeSetPowerState(boolean screenOn, boolean screenBright);
 
     /*
     static PrintStream mLog;
@@ -481,6 +484,11 @@
                 }
             }
         }
+        
+        nativeInit();
+        synchronized (mLocks) {
+            updateNativePowerStateLocked();
+        }
     }
 
     void initInThread() {
@@ -1557,8 +1565,16 @@
                     }
                 }
             }
+            
+            updateNativePowerStateLocked();
         }
     }
+    
+    private void updateNativePowerStateLocked() {
+        nativeSetPowerState(
+                (mPowerState & SCREEN_ON_BIT) != 0,
+                (mPowerState & SCREEN_BRIGHT) == SCREEN_BRIGHT);
+    }
 
     private int screenOffFinishedAnimatingLocked(int reason) {
         // I don't think we need to check the current state here because all of these
diff --git a/services/java/com/android/server/StatusBarManagerService.java b/services/java/com/android/server/StatusBarManagerService.java
new file mode 100644
index 0000000..4177432
--- /dev/null
+++ b/services/java/com/android/server/StatusBarManagerService.java
@@ -0,0 +1,472 @@
+/*
+ * Copyright (C) 2007 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.android.server;
+
+import android.app.PendingIntent;
+import android.app.StatusBarManager;
+import android.content.BroadcastReceiver;
+import android.content.ComponentName;
+import android.content.Context;
+import android.content.Intent;
+import android.content.IntentFilter;
+import android.content.pm.PackageManager;
+import android.content.res.Resources;
+import android.net.Uri;
+import android.os.IBinder;
+import android.os.RemoteException;
+import android.os.Binder;
+import android.os.Handler;
+import android.os.SystemClock;
+import android.util.Slog;
+
+import com.android.internal.statusbar.IStatusBar;
+import com.android.internal.statusbar.IStatusBarService;
+import com.android.internal.statusbar.StatusBarIcon;
+import com.android.internal.statusbar.StatusBarIconList;
+import com.android.internal.statusbar.StatusBarNotification;
+
+import java.io.FileDescriptor;
+import java.io.PrintWriter;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+
+/**
+ * A note on locking:  We rely on the fact that calls onto mBar are oneway or
+ * if they are local, that they just enqueue messages to not deadlock.
+ */
+public class StatusBarManagerService extends IStatusBarService.Stub
+{
+    static final String TAG = "StatusBarManagerService";
+    static final boolean SPEW = true;
+
+    final Context mContext;
+    Handler mHandler = new Handler();
+    NotificationCallbacks mNotificationCallbacks;
+    volatile IStatusBar mBar;
+    StatusBarIconList mIcons = new StatusBarIconList();
+    HashMap<IBinder,StatusBarNotification> mNotifications
+            = new HashMap<IBinder,StatusBarNotification>();
+
+    // for disabling the status bar
+    ArrayList<DisableRecord> mDisableRecords = new ArrayList<DisableRecord>();
+    int mDisabled = 0;
+
+    private class DisableRecord implements IBinder.DeathRecipient {
+        String pkg;
+        int what;
+        IBinder token;
+
+        public void binderDied() {
+            Slog.i(TAG, "binder died for pkg=" + pkg);
+            disable(0, token, pkg);
+            token.unlinkToDeath(this, 0);
+        }
+    }
+
+    public interface NotificationCallbacks {
+        void onSetDisabled(int status);
+        void onClearAll();
+        void onNotificationClick(String pkg, String tag, int id);
+        void onPanelRevealed();
+        void onNotificationError(String pkg, String tag, int id,
+                int uid, int initialPid, String message);
+    }
+
+    /**
+     * Construct the service, add the status bar view to the window manager
+     */
+    public StatusBarManagerService(Context context) {
+        mContext = context;
+
+        final Resources res = context.getResources();
+        mIcons.defineSlots(res.getStringArray(com.android.internal.R.array.config_statusBarIcons));
+    }
+
+    public void setNotificationCallbacks(NotificationCallbacks listener) {
+        mNotificationCallbacks = listener;
+    }
+
+    // ================================================================================
+    // Constructing the view
+    // ================================================================================
+
+    public void systemReady() {
+    }
+
+    public void systemReady2() {
+        ComponentName cn = ComponentName.unflattenFromString(
+                mContext.getString(com.android.internal.R.string.config_statusBarComponent));
+        Intent intent = new Intent();
+        intent.setComponent(cn);
+        Slog.i(TAG, "Starting service: " + cn);
+        mContext.startService(intent);
+    }
+
+    // ================================================================================
+    // From IStatusBarService
+    // ================================================================================
+    public void expand() {
+        enforceExpandStatusBar();
+
+        if (mBar != null) {
+            try {
+                mBar.animateExpand();
+            } catch (RemoteException ex) {
+            }
+        }
+    }
+
+    public void collapse() {
+        enforceExpandStatusBar();
+
+        if (mBar != null) {
+            try {
+                mBar.animateCollapse();
+            } catch (RemoteException ex) {
+            }
+        }
+    }
+
+    public void disable(int what, IBinder token, String pkg) {
+        enforceStatusBar();
+
+        // It's important that the the callback and the call to mBar get done
+        // in the same order when multiple threads are calling this function
+        // so they are paired correctly.  The messages on the handler will be
+        // handled in the order they were enqueued, but will be outside the lock.
+        synchronized (mDisableRecords) {
+            manageDisableListLocked(what, token, pkg);
+            final int net = gatherDisableActionsLocked();
+            Slog.d(TAG, "disable... net=0x" + Integer.toHexString(net));
+            if (net != mDisabled) {
+                mDisabled = net;
+                mHandler.post(new Runnable() {
+                        public void run() {
+                            mNotificationCallbacks.onSetDisabled(net);
+                        }
+                    });
+                if (mBar != null) {
+                    try {
+                        mBar.disable(net);
+                    } catch (RemoteException ex) {
+                    }
+                }
+            }
+        }
+    }
+
+    public void setIcon(String slot, String iconPackage, int iconId, int iconLevel) {
+        enforceStatusBar();
+
+        synchronized (mIcons) {
+            int index = mIcons.getSlotIndex(slot);
+            if (index < 0) {
+                throw new SecurityException("invalid status bar icon slot: " + slot);
+            }
+
+            StatusBarIcon icon = new StatusBarIcon(iconPackage, iconId, iconLevel);
+            //Slog.d(TAG, "setIcon slot=" + slot + " index=" + index + " icon=" + icon);
+            mIcons.setIcon(index, icon);
+
+            if (mBar != null) {
+                try {
+                    mBar.setIcon(index, icon);
+                } catch (RemoteException ex) {
+                }
+            }
+        }
+    }
+
+    public void setIconVisibility(String slot, boolean visible) {
+        enforceStatusBar();
+
+        synchronized (mIcons) {
+            int index = mIcons.getSlotIndex(slot);
+            if (index < 0) {
+                throw new SecurityException("invalid status bar icon slot: " + slot);
+            }
+
+            StatusBarIcon icon = mIcons.getIcon(index);
+            if (icon == null) {
+                return;
+            }
+
+            if (icon.visible != visible) {
+                icon.visible = visible;
+
+                if (mBar != null) {
+                    try {
+                        mBar.setIcon(index, icon);
+                    } catch (RemoteException ex) {
+                    }
+                }
+            }
+        }
+    }
+
+    public void removeIcon(String slot) {
+        enforceStatusBar();
+
+        synchronized (mIcons) {
+            int index = mIcons.getSlotIndex(slot);
+            if (index < 0) {
+                throw new SecurityException("invalid status bar icon slot: " + slot);
+            }
+
+            mIcons.removeIcon(index);
+
+            if (mBar != null) {
+                try {
+                    mBar.removeIcon(index);
+                } catch (RemoteException ex) {
+                }
+            }
+        }
+    }
+
+    private void enforceStatusBar() {
+        mContext.enforceCallingOrSelfPermission(android.Manifest.permission.STATUS_BAR,
+                "StatusBarManagerService");
+    }
+
+    private void enforceExpandStatusBar() {
+        mContext.enforceCallingOrSelfPermission(android.Manifest.permission.EXPAND_STATUS_BAR,
+                "StatusBarManagerService");
+    }
+
+    private void enforceStatusBarService() {
+        mContext.enforceCallingOrSelfPermission(android.Manifest.permission.STATUS_BAR_SERVICE,
+                "StatusBarManagerService");
+    }
+
+
+    // ================================================================================
+    // Callbacks from the status bar service.
+    // ================================================================================
+    public void registerStatusBar(IStatusBar bar, StatusBarIconList iconList,
+            List<IBinder> notificationKeys, List<StatusBarNotification> notifications) {
+        enforceStatusBarService();
+
+        Slog.i(TAG, "registerStatusBar bar=" + bar);
+        mBar = bar;
+        synchronized (mIcons) {
+            iconList.copyFrom(mIcons);
+        }
+        synchronized (mNotifications) {
+            for (Map.Entry<IBinder,StatusBarNotification> e: mNotifications.entrySet()) {
+                notificationKeys.add(e.getKey());
+                notifications.add(e.getValue());
+            }
+        }
+    }
+
+    /**
+     * The status bar service should call this each time the user brings the panel from
+     * invisible to visible in order to clear the notification light.
+     */
+    public void onPanelRevealed() {
+        enforceStatusBarService();
+
+        // tell the notification manager to turn off the lights.
+        mNotificationCallbacks.onPanelRevealed();
+    }
+
+    public void onNotificationClick(String pkg, String tag, int id) {
+        enforceStatusBarService();
+
+        mNotificationCallbacks.onNotificationClick(pkg, tag, id);
+    }
+
+    public void onNotificationError(String pkg, String tag, int id,
+            int uid, int initialPid, String message) {
+        enforceStatusBarService();
+
+        // WARNING: this will call back into us to do the remove.  Don't hold any locks.
+        mNotificationCallbacks.onNotificationError(pkg, tag, id, uid, initialPid, message);
+    }
+
+    public void onClearAllNotifications() {
+        enforceStatusBarService();
+
+        mNotificationCallbacks.onClearAll();
+    }
+
+    // ================================================================================
+    // Callbacks for NotificationManagerService.
+    // ================================================================================
+    public IBinder addNotification(StatusBarNotification notification) {
+        synchronized (mNotifications) {
+            IBinder key = new Binder();
+            mNotifications.put(key, notification);
+            if (mBar != null) {
+                try {
+                    mBar.addNotification(key, notification);
+                } catch (RemoteException ex) {
+                }
+            }
+            return key;
+        }
+    }
+
+    public void updateNotification(IBinder key, StatusBarNotification notification) {
+        synchronized (mNotifications) {
+            if (!mNotifications.containsKey(key)) {
+                throw new IllegalArgumentException("updateNotification key not found: " + key);
+            }
+            mNotifications.put(key, notification);
+            if (mBar != null) {
+                try {
+                    mBar.updateNotification(key, notification);
+                } catch (RemoteException ex) {
+                }
+            }
+        }
+    }
+
+    public void removeNotification(IBinder key) {
+        synchronized (mNotifications) {
+            final StatusBarNotification n = mNotifications.remove(key);
+            if (n == null) {
+                throw new IllegalArgumentException("removeNotification key not found: " + key);
+            }
+            if (mBar != null) {
+                try {
+                    mBar.removeNotification(key);
+                } catch (RemoteException ex) {
+                }
+            }
+        }
+    }
+
+    // ================================================================================
+    // Can be called from any thread
+    // ================================================================================
+
+    // lock on mDisableRecords
+    void manageDisableListLocked(int what, IBinder token, String pkg) {
+        if (SPEW) {
+            Slog.d(TAG, "manageDisableList what=0x" + Integer.toHexString(what) + " pkg=" + pkg);
+        }
+        // update the list
+        synchronized (mDisableRecords) {
+            final int N = mDisableRecords.size();
+            DisableRecord tok = null;
+            int i;
+            for (i=0; i<N; i++) {
+                DisableRecord t = mDisableRecords.get(i);
+                if (t.token == token) {
+                    tok = t;
+                    break;
+                }
+            }
+            if (what == 0 || !token.isBinderAlive()) {
+                if (tok != null) {
+                    mDisableRecords.remove(i);
+                    tok.token.unlinkToDeath(tok, 0);
+                }
+            } else {
+                if (tok == null) {
+                    tok = new DisableRecord();
+                    try {
+                        token.linkToDeath(tok, 0);
+                    }
+                    catch (RemoteException ex) {
+                        return; // give up
+                    }
+                    mDisableRecords.add(tok);
+                }
+                tok.what = what;
+                tok.token = token;
+                tok.pkg = pkg;
+            }
+        }
+    }
+
+    // lock on mDisableRecords
+    int gatherDisableActionsLocked() {
+        final int N = mDisableRecords.size();
+        // gather the new net flags
+        int net = 0;
+        for (int i=0; i<N; i++) {
+            net |= mDisableRecords.get(i).what;
+        }
+        return net;
+    }
+
+    // ================================================================================
+    // Always called from UI thread
+    // ================================================================================
+
+    protected void dump(FileDescriptor fd, PrintWriter pw, String[] args) {
+        if (mContext.checkCallingOrSelfPermission(android.Manifest.permission.DUMP)
+                != PackageManager.PERMISSION_GRANTED) {
+            pw.println("Permission Denial: can't dump StatusBar from from pid="
+                    + Binder.getCallingPid()
+                    + ", uid=" + Binder.getCallingUid());
+            return;
+        }
+
+        synchronized (mIcons) {
+            mIcons.dump(pw);
+        }
+
+        synchronized (mNotifications) {
+            int i=0;
+            pw.println("Notification list:");
+            for (Map.Entry<IBinder,StatusBarNotification> e: mNotifications.entrySet()) {
+                pw.printf("  %2d: %s\n", i, e.getValue().toString());
+                i++;
+            }
+        }
+
+        synchronized (mDisableRecords) {
+            final int N = mDisableRecords.size();
+            pw.println("  mDisableRecords.size=" + N
+                    + " mDisabled=0x" + Integer.toHexString(mDisabled));
+            for (int i=0; i<N; i++) {
+                DisableRecord tok = mDisableRecords.get(i);
+                pw.println("    [" + i + "] what=0x" + Integer.toHexString(tok.what)
+                                + " pkg=" + tok.pkg + " token=" + tok.token);
+            }
+        }
+    }
+
+    private BroadcastReceiver mBroadcastReceiver = new BroadcastReceiver() {
+        public void onReceive(Context context, Intent intent) {
+            String action = intent.getAction();
+            if (Intent.ACTION_CLOSE_SYSTEM_DIALOGS.equals(action)
+                    || Intent.ACTION_SCREEN_OFF.equals(action)) {
+                collapse();
+            }
+            /*
+            else if (Telephony.Intents.SPN_STRINGS_UPDATED_ACTION.equals(action)) {
+                updateNetworkName(intent.getBooleanExtra(Telephony.Intents.EXTRA_SHOW_SPN, false),
+                        intent.getStringExtra(Telephony.Intents.EXTRA_SPN),
+                        intent.getBooleanExtra(Telephony.Intents.EXTRA_SHOW_PLMN, false),
+                        intent.getStringExtra(Telephony.Intents.EXTRA_PLMN));
+            }
+            else if (Intent.ACTION_CONFIGURATION_CHANGED.equals(action)) {
+                updateResources();
+            }
+            */
+        }
+    };
+
+}
diff --git a/services/java/com/android/server/SystemServer.java b/services/java/com/android/server/SystemServer.java
index 9d5d035..c01680e 100644
--- a/services/java/com/android/server/SystemServer.java
+++ b/services/java/com/android/server/SystemServer.java
@@ -17,7 +17,6 @@
 package com.android.server;
 
 import com.android.server.am.ActivityManagerService;
-import com.android.server.status.StatusBarService;
 import com.android.internal.os.BinderInternal;
 import com.android.internal.os.SamplingProfilerIntegration;
 
@@ -81,7 +80,8 @@
                 android.os.Process.THREAD_PRIORITY_FOREGROUND);
 
         BinderInternal.disableBackgroundScheduling(true);
-        
+        android.os.Process.setCanSelfBackground(false);
+
         String factoryTestStr = SystemProperties.get("ro.factorytest");
         int factoryTest = "".equals(factoryTestStr) ? SystemServer.FACTORY_TEST_OFF
                 : Integer.parseInt(factoryTestStr);
@@ -97,6 +97,7 @@
         BluetoothA2dpService bluetoothA2dp = null;
         HeadsetObserver headset = null;
         DockObserver dock = null;
+        UsbObserver usb = null;
         UiModeManagerService uiMode = null;
         RecognitionManagerService recognition = null;
         ThrottleService throttle = null;
@@ -206,7 +207,7 @@
         }
 
         DevicePolicyManagerService devicePolicy = null;
-        StatusBarService statusBar = null;
+        StatusBarManagerService statusBar = null;
         InputMethodManagerService imm = null;
         AppWidgetService appWidget = null;
         NotificationManagerService notification = null;
@@ -224,10 +225,10 @@
 
             try {
                 Slog.i(TAG, "Status Bar");
-                statusBar = new StatusBarService(context);
+                statusBar = new StatusBarManagerService(context);
                 ServiceManager.addService(Context.STATUS_BAR_SERVICE, statusBar);
             } catch (Throwable e) {
-                Slog.e(TAG, "Failure starting StatusBarService", e);
+                Slog.e(TAG, "Failure starting StatusBarManagerService", e);
             }
 
             try {
@@ -374,8 +375,16 @@
             }
 
             try {
+                Slog.i(TAG, "USB Observer");
+                // Listen for USB changes
+                usb = new UsbObserver(context);
+            } catch (Throwable e) {
+                Slog.e(TAG, "Failure starting UsbObserver", e);
+            }
+
+            try {
                 Slog.i(TAG, "UI Mode Manager Service");
-                // Listen for dock station changes
+                // Listen for UI mode changes
                 uiMode = new UiModeManagerService(context);
             } catch (Throwable e) {
                 Slog.e(TAG, "Failure starting UiModeManagerService", e);
@@ -405,12 +414,6 @@
             }
 
             try {
-                com.android.server.status.StatusBarPolicy.installIcons(context, statusBar);
-            } catch (Throwable e) {
-                Slog.e(TAG, "Failure installing status bar icons", e);
-            }
-
-            try {
                 Slog.i(TAG, "DiskStats Service");
                 ServiceManager.addService("diskstats", new DiskStatsService(context));
             } catch (Throwable e) {
@@ -464,9 +467,11 @@
         }
 
         // These are needed to propagate to the runnable below.
+        final StatusBarManagerService statusBarF = statusBar;
         final BatteryService batteryF = battery;
         final ConnectivityService connectivityF = connectivity;
         final DockObserver dockF = dock;
+        final UsbObserver usbF = usb;
         final ThrottleService throttleF = throttle;
         final UiModeManagerService uiModeF = uiMode;
         final AppWidgetService appWidgetF = appWidget;
@@ -485,9 +490,11 @@
             public void run() {
                 Slog.i(TAG, "Making services ready");
 
+                if (statusBarF != null) statusBarF.systemReady2();
                 if (batteryF != null) batteryF.systemReady();
                 if (connectivityF != null) connectivityF.systemReady();
                 if (dockF != null) dockF.systemReady();
+                if (usbF != null) usbF.systemReady();
                 if (uiModeF != null) uiModeF.systemReady();
                 if (recognitionF != null) recognitionF.systemReady();
                 Watchdog.getInstance().start();
diff --git a/services/java/com/android/server/UiModeManagerService.java b/services/java/com/android/server/UiModeManagerService.java
index 019245f..431cc39 100644
--- a/services/java/com/android/server/UiModeManagerService.java
+++ b/services/java/com/android/server/UiModeManagerService.java
@@ -566,7 +566,7 @@
             mStatusBarManager = (StatusBarManager) mContext.getSystemService(Context.STATUS_BAR_SERVICE);
         }
 
-        // Fear not: StatusBarService manages a list of requests to disable
+        // Fear not: StatusBarManagerService manages a list of requests to disable
         // features of the status bar; these are ORed together to form the
         // active disabled list. So if (for example) the device is locked and
         // the status bar should be totally disabled, the calls below will
diff --git a/services/java/com/android/server/UsbObserver.java b/services/java/com/android/server/UsbObserver.java
new file mode 100644
index 0000000..d08fe9b
--- /dev/null
+++ b/services/java/com/android/server/UsbObserver.java
@@ -0,0 +1,207 @@
+/*
+ * Copyright (C) 2010 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.android.server;
+
+import android.content.ContentResolver;
+import android.content.Context;
+import android.content.Intent;
+import android.hardware.Usb;
+import android.net.Uri;
+import android.os.Handler;
+import android.os.Message;
+import android.os.UEventObserver;
+import android.provider.Settings;
+import android.util.Log;
+import android.util.Slog;
+
+import java.io.File;
+import java.io.FileNotFoundException;
+import java.io.FileReader;
+import java.util.ArrayList;
+
+/**
+ * <p>UsbObserver monitors for changes to USB state.
+ */
+class UsbObserver extends UEventObserver {
+    private static final String TAG = UsbObserver.class.getSimpleName();
+    private static final boolean LOG = false;
+
+    private static final String USB_CONFIGURATION_MATCH = "DEVPATH=/devices/virtual/switch/usb_configuration";
+    private static final String USB_FUNCTIONS_MATCH = "DEVPATH=/devices/virtual/usb_composite/";
+    private static final String USB_CONFIGURATION_PATH = "/sys/class/switch/usb_configuration/state";
+    private static final String USB_COMPOSITE_CLASS_PATH = "/sys/class/usb_composite";
+
+    private static final int MSG_UPDATE = 0;
+
+    private int mUsbConfig = 0;
+    private int mPreviousUsbConfig = 0;
+
+    // lists of enabled and disabled USB functions
+    private final ArrayList<String> mEnabledFunctions = new ArrayList<String>();
+    private final ArrayList<String> mDisabledFunctions = new ArrayList<String>();
+
+    private boolean mSystemReady;
+
+    private final Context mContext;
+
+    private PowerManagerService mPowerManager;
+
+    public UsbObserver(Context context) {
+        mContext = context;
+        init();  // set initial status
+
+        startObserving(USB_CONFIGURATION_MATCH);
+        startObserving(USB_FUNCTIONS_MATCH);
+    }
+
+    @Override
+    public void onUEvent(UEventObserver.UEvent event) {
+        if (Log.isLoggable(TAG, Log.VERBOSE)) {
+            Slog.v(TAG, "USB UEVENT: " + event.toString());
+        }
+
+        synchronized (this) {
+            String switchState = event.get("SWITCH_STATE");
+            if (switchState != null) {
+                try {
+                    int newConfig = Integer.parseInt(switchState);
+                    if (newConfig != mUsbConfig) {
+                        mPreviousUsbConfig = mUsbConfig;
+                        mUsbConfig = newConfig;
+                        // trigger an Intent broadcast
+                        if (mSystemReady) {
+                            update();
+                        }
+                    }
+                } catch (NumberFormatException e) {
+                    Slog.e(TAG, "Could not parse switch state from event " + event);
+                }
+            } else {
+                String function = event.get("FUNCTION");
+                String enabledStr = event.get("ENABLED");
+                if (function != null && enabledStr != null) {
+                    // Note: we do not broadcast a change when a function is enabled or disabled.
+                    // We just record the state change for the next broadcast.
+                    boolean enabled = "1".equals(enabledStr);
+                    if (enabled) {
+                        if (!mEnabledFunctions.contains(function)) {
+                            mEnabledFunctions.add(function);
+                        }
+                        mDisabledFunctions.remove(function);
+                    } else {
+                        if (!mDisabledFunctions.contains(function)) {
+                            mDisabledFunctions.add(function);
+                        }
+                        mEnabledFunctions.remove(function);
+                    }
+                }
+            }
+        }
+    }
+    private final void init() {
+        char[] buffer = new char[1024];
+
+        try {
+            FileReader file = new FileReader(USB_CONFIGURATION_PATH);
+            int len = file.read(buffer, 0, 1024);
+            mPreviousUsbConfig = mUsbConfig = Integer.valueOf((new String(buffer, 0, len)).trim());
+
+        } catch (FileNotFoundException e) {
+            Slog.w(TAG, "This kernel does not have USB configuration switch support");
+        } catch (Exception e) {
+            Slog.e(TAG, "" , e);
+        }
+
+        try {
+            File[] files = new File(USB_COMPOSITE_CLASS_PATH).listFiles();
+            for (int i = 0; i < files.length; i++) {
+                File file = new File(files[i], "enable");
+                FileReader reader = new FileReader(file);
+                int len = reader.read(buffer, 0, 1024);
+                int value = Integer.valueOf((new String(buffer, 0, len)).trim());
+                String functionName = files[i].getName();
+                if (value == 1) {
+                    mEnabledFunctions.add(functionName);
+                } else {
+                    mDisabledFunctions.add(functionName);
+                }
+            }
+        } catch (FileNotFoundException e) {
+            Slog.w(TAG, "This kernel does not have USB composite class support");
+        } catch (Exception e) {
+            Slog.e(TAG, "" , e);
+        }
+    }
+
+    void systemReady() {
+        synchronized (this) {
+            update();
+            mSystemReady = true;
+        }
+    }
+
+    private final void update() {
+        mHandler.sendEmptyMessage(MSG_UPDATE);
+    }
+
+    private final Handler mHandler = new Handler() {
+        private void addEnabledFunctions(Intent intent) {
+            // include state of all USB functions in our extras
+            for (int i = 0; i < mEnabledFunctions.size(); i++) {
+                intent.putExtra(mEnabledFunctions.get(i), Usb.USB_FUNCTION_ENABLED);
+            }
+            for (int i = 0; i < mDisabledFunctions.size(); i++) {
+                intent.putExtra(mDisabledFunctions.get(i), Usb.USB_FUNCTION_DISABLED);
+            }
+        }
+
+        @Override
+        public void handleMessage(Message msg) {
+            switch (msg.what) {
+                case MSG_UPDATE:
+                    synchronized (this) {
+                        final ContentResolver cr = mContext.getContentResolver();
+
+                        if (Settings.Secure.getInt(cr,
+                                Settings.Secure.DEVICE_PROVISIONED, 0) == 0) {
+                            Slog.i(TAG, "Device not provisioned, skipping USB broadcast");
+                            return;
+                        }
+                        // Send an Intent containing connected/disconnected state
+                        // and the enabled/disabled state of all USB functions
+                        Intent intent;
+                        boolean usbConnected = (mUsbConfig != 0);
+                        if (usbConnected) {
+                            intent = new Intent(Usb.ACTION_USB_CONNECTED);
+                            addEnabledFunctions(intent);
+                        } else {
+                            intent = new Intent(Usb.ACTION_USB_DISCONNECTED);
+                        }
+                        mContext.sendBroadcast(intent);
+
+                        // send a sticky broadcast for clients interested in both connect and disconnect
+                        intent = new Intent(Usb.ACTION_USB_STATE);
+                        intent.addFlags(Intent.FLAG_RECEIVER_REPLACE_PENDING);
+                        intent.putExtra(Usb.USB_CONNECTED, usbConnected);
+                        addEnabledFunctions(intent);
+                        mContext.sendStickyBroadcast(intent);
+                    }
+                    break;
+            }
+        }
+    };
+}
diff --git a/services/java/com/android/server/ViewServer.java b/services/java/com/android/server/ViewServer.java
index ae00438..b369f71 100644
--- a/services/java/com/android/server/ViewServer.java
+++ b/services/java/com/android/server/ViewServer.java
@@ -21,6 +21,8 @@
 import java.net.ServerSocket;
 import java.net.Socket;
 import java.net.InetAddress;
+import java.util.concurrent.ExecutorService;
+import java.util.concurrent.Executors;
 import java.io.IOException;
 import java.io.BufferedReader;
 import java.io.InputStreamReader;
@@ -41,11 +43,13 @@
      */
     public static final int VIEW_SERVER_DEFAULT_PORT = 4939;
 
+    private static final int VIEW_SERVER_MAX_CONNECTIONS = 10;
+
     // Debug facility
     private static final String LOG_TAG = "ViewServer";
 
-    private static final String VALUE_PROTOCOL_VERSION = "2";
-    private static final String VALUE_SERVER_VERSION = "3";
+    private static final String VALUE_PROTOCOL_VERSION = "3";
+    private static final String VALUE_SERVER_VERSION = "4";
 
     // Protocol commands
     // Returns the protocol version
@@ -54,6 +58,8 @@
     private static final String COMMAND_SERVER_VERSION = "SERVER";
     // Lists all of the available windows in the system
     private static final String COMMAND_WINDOW_MANAGER_LIST = "LIST";
+    // Keeps a connection open and notifies when the list of windows changes
+    private static final String COMMAND_WINDOW_MANAGER_AUTOLIST = "AUTOLIST";
 
     private ServerSocket mServer;
     private Thread mThread;
@@ -61,6 +67,8 @@
     private final WindowManagerService mWindowManager;
     private final int mPort;
 
+    private ExecutorService mThreadPool;
+
     /**
      * Creates a new ViewServer associated with the specified window manager.
      * The server uses the default port {@link #VIEW_SERVER_DEFAULT_PORT}. The server
@@ -103,8 +111,9 @@
             return false;
         }
 
-        mServer = new ServerSocket(mPort, 1, InetAddress.getLocalHost());
+        mServer = new ServerSocket(mPort, VIEW_SERVER_MAX_CONNECTIONS, InetAddress.getLocalHost());
         mThread = new Thread(this, "Remote View Server [port=" + mPort + "]");
+        mThreadPool = Executors.newFixedThreadPool(VIEW_SERVER_MAX_CONNECTIONS);
         mThread.start();
 
         return true;
@@ -122,7 +131,16 @@
      */
     boolean stop() {
         if (mThread != null) {
+
             mThread.interrupt();
+            if (mThreadPool != null) {
+                try {
+                    mThreadPool.shutdownNow();
+                } catch (SecurityException e) {
+                    Slog.w(LOG_TAG, "Could not stop all view server threads");
+                }
+            }
+            mThreadPool = null;
             mThread = null;
             try {
                 mServer.close();
@@ -152,62 +170,21 @@
      * Main server loop.
      */
     public void run() {
-        final ServerSocket server = mServer;
-
         while (Thread.currentThread() == mThread) {
-            Socket client = null;
             // Any uncaught exception will crash the system process
             try {
-                client = server.accept();
-
-                BufferedReader in = null;
-                try {
-                    in = new BufferedReader(new InputStreamReader(client.getInputStream()), 1024);
-
-                    final String request = in.readLine();
-
-                    String command;
-                    String parameters;
-
-                    int index = request.indexOf(' ');
-                    if (index == -1) {
-                        command = request;
-                        parameters = "";
-                    } else {
-                        command = request.substring(0, index);
-                        parameters = request.substring(index + 1);
-                    }
-
-                    boolean result;
-                    if (COMMAND_PROTOCOL_VERSION.equalsIgnoreCase(command)) {
-                        result = writeValue(client, VALUE_PROTOCOL_VERSION);
-                    } else if (COMMAND_SERVER_VERSION.equalsIgnoreCase(command)) {
-                        result = writeValue(client, VALUE_SERVER_VERSION);
-                    } else if (COMMAND_WINDOW_MANAGER_LIST.equalsIgnoreCase(command)) {
-                        result = mWindowManager.viewServerListWindows(client);
-                    } else {
-                        result = mWindowManager.viewServerWindowCommand(client,
-                                command, parameters);
-                    }
-
-                    if (!result) {
-                        Slog.w(LOG_TAG, "An error occured with the command: " + command);
-                    }
-                } finally {
-                    if (in != null) {
-                        in.close();
-                    }
-                }
-            } catch (Exception e) {
-                Slog.w(LOG_TAG, "Connection error: ", e);
-            } finally {
-                if (client != null) {
+                Socket client = mServer.accept();
+                if(mThreadPool != null) {
+                    mThreadPool.submit(new ViewServerWorker(client));
+                } else {
                     try {
                         client.close();
                     } catch (IOException e) {
                         e.printStackTrace();
                     }
                 }
+            } catch (Exception e) {
+                Slog.w(LOG_TAG, "Connection error: ", e);
             }
         }
     }
@@ -235,4 +212,131 @@
         }
         return result;
     }
+
+    class ViewServerWorker implements Runnable, WindowManagerService.WindowChangeListener {
+        private Socket mClient;
+        private boolean mNeedWindowListUpdate;
+        private boolean mNeedFocusedWindowUpdate;
+        public ViewServerWorker(Socket client) {
+            mClient = client;
+            mNeedWindowListUpdate = false;
+            mNeedFocusedWindowUpdate = false;
+        }
+
+        public void run() {
+
+            BufferedReader in = null;
+            try {
+                in = new BufferedReader(new InputStreamReader(mClient.getInputStream()), 1024);
+
+                final String request = in.readLine();
+
+                String command;
+                String parameters;
+
+                int index = request.indexOf(' ');
+                if (index == -1) {
+                    command = request;
+                    parameters = "";
+                } else {
+                    command = request.substring(0, index);
+                    parameters = request.substring(index + 1);
+                }
+
+                boolean result;
+                if (COMMAND_PROTOCOL_VERSION.equalsIgnoreCase(command)) {
+                    result = writeValue(mClient, VALUE_PROTOCOL_VERSION);
+                } else if (COMMAND_SERVER_VERSION.equalsIgnoreCase(command)) {
+                    result = writeValue(mClient, VALUE_SERVER_VERSION);
+                } else if (COMMAND_WINDOW_MANAGER_LIST.equalsIgnoreCase(command)) {
+                    result = mWindowManager.viewServerListWindows(mClient);
+                } else if(COMMAND_WINDOW_MANAGER_AUTOLIST.equalsIgnoreCase(command)) {
+                    result = windowManagerAutolistLoop();
+                } else {
+                    result = mWindowManager.viewServerWindowCommand(mClient,
+                            command, parameters);
+                }
+
+                if (!result) {
+                    Slog.w(LOG_TAG, "An error occured with the command: " + command);
+                }
+            } catch(IOException e) {
+                Slog.w(LOG_TAG, "Connection error: ", e);
+            } finally {
+                if (in != null) {
+                    try {
+                        in.close();
+
+                    } catch (IOException e) {
+                        e.printStackTrace();
+                    }
+                }
+                if (mClient != null) {
+                    try {
+                        mClient.close();
+                    } catch (IOException e) {
+                        e.printStackTrace();
+                    }
+                }
+            }
+        }
+
+        public void windowsChanged() {
+            synchronized(this) {
+                mNeedWindowListUpdate = true;
+                notifyAll();
+            }
+        }
+
+        public void focusChanged() {
+            synchronized(this) {
+                mNeedFocusedWindowUpdate = true;
+                notifyAll();
+            }
+        }
+
+        private boolean windowManagerAutolistLoop() {
+            mWindowManager.addWindowChangeListener(this);
+            BufferedWriter out = null;
+            try {
+                out = new BufferedWriter(new OutputStreamWriter(mClient.getOutputStream()));
+                while (!Thread.interrupted()) {
+                    boolean needWindowListUpdate = false;
+                    boolean needFocusedWindowUpdate = false;
+                    synchronized (this) {
+                        while (!mNeedWindowListUpdate && !mNeedFocusedWindowUpdate) {
+                            wait();
+                        }
+                        if (mNeedWindowListUpdate) {
+                            mNeedWindowListUpdate = false;
+                            needWindowListUpdate = true;
+                        }
+                        if (mNeedFocusedWindowUpdate) {
+                            mNeedFocusedWindowUpdate = false;
+                            needFocusedWindowUpdate = true;
+                        }
+                    }
+                    if(needWindowListUpdate) {
+                        out.write("LIST UPDATE\n");
+                        out.flush();
+                    }
+                    if(needFocusedWindowUpdate) {
+                        out.write("FOCUS UPDATE\n");
+                        out.flush();
+                    }
+                }
+            } catch (Exception e) {
+                Slog.w(LOG_TAG, "Connection error: ", e);
+            } finally {
+                if (out != null) {
+                    try {
+                        out.close();
+                    } catch (IOException e) {
+                    }
+                }
+                mWindowManager.removeWindowChangeListener(this);
+            }
+            return true;
+        }
+    }
 }
diff --git a/services/java/com/android/server/Watchdog.java b/services/java/com/android/server/Watchdog.java
index d4133f3..a742093 100644
--- a/services/java/com/android/server/Watchdog.java
+++ b/services/java/com/android/server/Watchdog.java
@@ -57,20 +57,10 @@
     static final boolean RECORD_KERNEL_THREADS = true;
 
     static final int MONITOR = 2718;
-    static final int GLOBAL_PSS = 2719;
 
     static final int TIME_TO_RESTART = DB ? 15*1000 : 60*1000;
     static final int TIME_TO_WAIT = TIME_TO_RESTART / 2;
 
-    static final int MEMCHECK_DEFAULT_INTERVAL = DB ? 30 : 30*60; // 30 minutes
-    static final int MEMCHECK_DEFAULT_LOG_REALTIME_INTERVAL = DB ? 60 : 2*60*60;      // 2 hours
-    static final int MEMCHECK_DEFAULT_SYSTEM_SOFT_THRESHOLD = (DB ? 10:16)*1024*1024; // 16MB
-    static final int MEMCHECK_DEFAULT_SYSTEM_HARD_THRESHOLD = (DB ? 14:20)*1024*1024; // 20MB
-    static final int MEMCHECK_DEFAULT_PHONE_SOFT_THRESHOLD = (DB ? 4:8)*1024*1024;    // 8MB
-    static final int MEMCHECK_DEFAULT_PHONE_HARD_THRESHOLD = (DB ? 8:12)*1024*1024;   // 12MB
-
-    static final int MEMCHECK_DEFAULT_EXEC_START_TIME = 1*60*60;           // 1:00am
-    static final int MEMCHECK_DEFAULT_EXEC_END_TIME = 5*60*60;             // 5:00am
     static final int MEMCHECK_DEFAULT_MIN_SCREEN_OFF = DB ? 1*60 : 5*60;   // 5 minutes
     static final int MEMCHECK_DEFAULT_MIN_ALARM = DB ? 1*60 : 3*60;        // 3 minutes
     static final int MEMCHECK_DEFAULT_RECHECK_INTERVAL = DB ? 1*60 : 5*60; // 5 minutes
@@ -79,14 +69,12 @@
     static final int REBOOT_DEFAULT_START_TIME = 3*60*60;                  // 3:00am
     static final int REBOOT_DEFAULT_WINDOW = 60*60;                        // within 1 hour
 
-    static final String CHECKUP_ACTION = "com.android.service.Watchdog.CHECKUP";
     static final String REBOOT_ACTION = "com.android.service.Watchdog.REBOOT";
 
     static Watchdog sWatchdog;
 
     /* This handler will be used to post message back onto the main thread */
     final Handler mHandler;
-    final Runnable mGlobalPssCollected;
     final ArrayList<Monitor> mMonitors = new ArrayList<Monitor>();
     ContentResolver mResolver;
     BatteryService mBattery;
@@ -97,31 +85,9 @@
     boolean mForceKillSystem;
     Monitor mCurrentMonitor;
 
-    PssRequestor mPhoneReq;
     int mPhonePid;
-    int mPhonePss;
-
-    long mLastMemCheckTime = -(MEMCHECK_DEFAULT_INTERVAL*1000);
-    boolean mHavePss;
-    long mLastMemCheckRealtime = -(MEMCHECK_DEFAULT_LOG_REALTIME_INTERVAL*1000);
-    boolean mHaveGlobalPss;
-    final MemMonitor mSystemMemMonitor = new MemMonitor("system",
-            Settings.Secure.MEMCHECK_SYSTEM_ENABLED,
-            Settings.Secure.MEMCHECK_SYSTEM_SOFT_THRESHOLD,
-            MEMCHECK_DEFAULT_SYSTEM_SOFT_THRESHOLD,
-            Settings.Secure.MEMCHECK_SYSTEM_HARD_THRESHOLD,
-            MEMCHECK_DEFAULT_SYSTEM_HARD_THRESHOLD);
-    final MemMonitor mPhoneMemMonitor = new MemMonitor("com.android.phone",
-            Settings.Secure.MEMCHECK_PHONE_ENABLED,
-            Settings.Secure.MEMCHECK_PHONE_SOFT_THRESHOLD,
-            MEMCHECK_DEFAULT_PHONE_SOFT_THRESHOLD,
-            Settings.Secure.MEMCHECK_PHONE_HARD_THRESHOLD,
-            MEMCHECK_DEFAULT_PHONE_HARD_THRESHOLD);
 
     final Calendar mCalendar = Calendar.getInstance();
-    long mMemcheckLastTime;
-    long mMemcheckExecStartTime;
-    long mMemcheckExecEndTime;
     int mMinScreenOff = MEMCHECK_DEFAULT_MIN_SCREEN_OFF;
     int mMinAlarm = MEMCHECK_DEFAULT_MIN_ALARM;
     boolean mNeedScheduledCheck;
@@ -140,126 +106,13 @@
     int mReqRecheckInterval= -1;  // >= 0 if a specific recheck interval has been requested
 
     /**
-     * This class monitors the memory in a particular process.
-     */
-    final class MemMonitor {
-        final String mProcessName;
-        final String mEnabledSetting;
-        final String mSoftSetting;
-        final String mHardSetting;
-
-        int mSoftThreshold;
-        int mHardThreshold;
-        boolean mEnabled;
-        long mLastPss;
-
-        static final int STATE_OK = 0;
-        static final int STATE_SOFT = 1;
-        static final int STATE_HARD = 2;
-        int mState;
-
-        MemMonitor(String processName, String enabledSetting,
-                String softSetting, int defSoftThreshold,
-                String hardSetting, int defHardThreshold) {
-            mProcessName = processName;
-            mEnabledSetting = enabledSetting;
-            mSoftSetting = softSetting;
-            mHardSetting = hardSetting;
-            mSoftThreshold = defSoftThreshold;
-            mHardThreshold = defHardThreshold;
-        }
-
-        void retrieveSettings(ContentResolver resolver) {
-            mSoftThreshold = Settings.Secure.getInt(
-                    resolver, mSoftSetting, mSoftThreshold);
-            mHardThreshold = Settings.Secure.getInt(
-                    resolver, mHardSetting, mHardThreshold);
-            mEnabled = Settings.Secure.getInt(
-                    resolver, mEnabledSetting, 0) != 0;
-        }
-
-        boolean checkLocked(long curTime, int pid, int pss) {
-            mLastPss = pss;
-            if (mLastPss < mSoftThreshold) {
-                mState = STATE_OK;
-            } else if (mLastPss < mHardThreshold) {
-                mState = STATE_SOFT;
-            } else {
-                mState = STATE_HARD;
-            }
-            EventLog.writeEvent(EventLogTags.WATCHDOG_PROC_PSS, mProcessName, pid, mLastPss);
-
-            if (mState == STATE_OK) {
-                // Memory is good, don't recover.
-                return false;
-            }
-
-            if (mState == STATE_HARD) {
-                // Memory is really bad, kill right now.
-                EventLog.writeEvent(EventLogTags.WATCHDOG_HARD_RESET, mProcessName, pid,
-                        mHardThreshold, mLastPss);
-                return mEnabled;
-            }
-
-            // It is time to schedule a reset...
-            // Check if we are currently within the time to kill processes due
-            // to memory use.
-            computeMemcheckTimesLocked(curTime);
-            String skipReason = null;
-            if (curTime < mMemcheckExecStartTime || curTime > mMemcheckExecEndTime) {
-                skipReason = "time";
-            } else {
-                skipReason = shouldWeBeBrutalLocked(curTime);
-            }
-            EventLog.writeEvent(EventLogTags.WATCHDOG_SOFT_RESET, mProcessName, pid,
-                    mSoftThreshold, mLastPss, skipReason != null ? skipReason : "");
-            if (skipReason != null) {
-                mNeedScheduledCheck = true;
-                return false;
-            }
-            return mEnabled;
-        }
-
-        void clear() {
-            mLastPss = 0;
-            mState = STATE_OK;
-        }
-    }
-
-    /**
      * Used for scheduling monitor callbacks and checking memory usage.
      */
     final class HeartbeatHandler extends Handler {
         @Override
         public void handleMessage(Message msg) {
             switch (msg.what) {
-                case GLOBAL_PSS: {
-                    if (mHaveGlobalPss) {
-                        // During the last pass we collected pss information, so
-                        // now it is time to report it.
-                        mHaveGlobalPss = false;
-                        if (localLOGV) Slog.v(TAG, "Received global pss, logging.");
-                        logGlobalMemory();
-                    }
-                } break;
-
                 case MONITOR: {
-                    if (mHavePss) {
-                        // During the last pass we collected pss information, so
-                        // now it is time to report it.
-                        mHavePss = false;
-                        if (localLOGV) Slog.v(TAG, "Have pss, checking memory.");
-                        checkMemory();
-                    }
-
-                    if (mHaveGlobalPss) {
-                        // During the last pass we collected pss information, so
-                        // now it is time to report it.
-                        mHaveGlobalPss = false;
-                        if (localLOGV) Slog.v(TAG, "Have global pss, logging.");
-                        logGlobalMemory();
-                    }
-
                     long now = SystemClock.uptimeMillis();
 
                     // See if we should force a reboot.
@@ -274,32 +127,6 @@
                         checkReboot(false);
                     }
 
-                    // See if we should check memory conditions.
-                    long memCheckInterval = Settings.Secure.getLong(
-                            mResolver, Settings.Secure.MEMCHECK_INTERVAL,
-                            MEMCHECK_DEFAULT_INTERVAL) * 1000;
-                    if ((mLastMemCheckTime+memCheckInterval) < now) {
-                        // It is now time to collect pss information.  This
-                        // is async so we won't report it now.  And to keep
-                        // things simple, we will assume that everyone has
-                        // reported back by the next MONITOR message.
-                        mLastMemCheckTime = now;
-                        if (localLOGV) Slog.v(TAG, "Collecting memory usage.");
-                        collectMemory();
-                        mHavePss = true;
-
-                        long memCheckRealtimeInterval = Settings.Secure.getLong(
-                                mResolver, Settings.Secure.MEMCHECK_LOG_REALTIME_INTERVAL,
-                                MEMCHECK_DEFAULT_LOG_REALTIME_INTERVAL) * 1000;
-                        long realtimeNow = SystemClock.elapsedRealtime();
-                        if ((mLastMemCheckRealtime+memCheckRealtimeInterval) < realtimeNow) {
-                            mLastMemCheckRealtime = realtimeNow;
-                            if (localLOGV) Slog.v(TAG, "Collecting global memory usage.");
-                            collectGlobalMemory();
-                            mHaveGlobalPss = true;
-                        }
-                    }
-
                     final int size = mMonitors.size();
                     for (int i = 0 ; i < size ; i++) {
                         mCurrentMonitor = mMonitors.get(i);
@@ -315,20 +142,6 @@
         }
     }
 
-    final class GlobalPssCollected implements Runnable {
-        public void run() {
-            mHandler.sendEmptyMessage(GLOBAL_PSS);
-        }
-    }
-
-    final class CheckupReceiver extends BroadcastReceiver {
-        @Override
-        public void onReceive(Context c, Intent intent) {
-            if (localLOGV) Slog.v(TAG, "Alarm went off, checking memory.");
-            checkMemory();
-        }
-    }
-
     final class RebootReceiver extends BroadcastReceiver {
         @Override
         public void onReceive(Context c, Intent intent) {
@@ -359,27 +172,6 @@
         void monitor();
     }
 
-    public interface PssRequestor {
-        void requestPss();
-    }
-
-    public class PssStats {
-        public int mEmptyPss;
-        public int mEmptyCount;
-        public int mBackgroundPss;
-        public int mBackgroundCount;
-        public int mServicePss;
-        public int mServiceCount;
-        public int mVisiblePss;
-        public int mVisibleCount;
-        public int mForegroundPss;
-        public int mForegroundCount;
-
-        public int mNoPssCount;
-
-        public int mProcDeaths[] = new int[10];
-    }
-
     public static Watchdog getInstance() {
         if (sWatchdog == null) {
             sWatchdog = new Watchdog();
@@ -391,7 +183,6 @@
     private Watchdog() {
         super("watchdog");
         mHandler = new HeartbeatHandler();
-        mGlobalPssCollected = new GlobalPssCollected();
     }
 
     public void init(Context context, BatteryService battery,
@@ -403,11 +194,6 @@
         mAlarm = alarm;
         mActivity = activity;
 
-        context.registerReceiver(new CheckupReceiver(),
-                new IntentFilter(CHECKUP_ACTION));
-        mCheckupIntent = PendingIntent.getBroadcast(context,
-                0, new Intent(CHECKUP_ACTION), 0);
-
         context.registerReceiver(new RebootReceiver(),
                 new IntentFilter(REBOOT_ACTION));
         mRebootIntent = PendingIntent.getBroadcast(context,
@@ -420,20 +206,10 @@
         mBootTime = System.currentTimeMillis();
     }
 
-    public void processStarted(PssRequestor req, String name, int pid) {
+    public void processStarted(String name, int pid) {
         synchronized (this) {
             if ("com.android.phone".equals(name)) {
-                mPhoneReq = req;
                 mPhonePid = pid;
-                mPhonePss = 0;
-            }
-        }
-    }
-
-    public void reportPss(PssRequestor req, String name, int pss) {
-        synchronized (this) {
-            if (mPhoneReq == req) {
-                mPhonePss = pss;
             }
         }
     }
@@ -447,152 +223,6 @@
         }
     }
 
-    /**
-     * Retrieve memory usage information from specific processes being
-     * monitored.  This is an async operation, so must be done before doing
-     * memory checks.
-     */
-    void collectMemory() {
-        synchronized (this) {
-            if (mPhoneReq != null) {
-                mPhoneReq.requestPss();
-            }
-        }
-    }
-
-    /**
-     * Retrieve memory usage over all application processes.  This is an
-     * async operation, so must be done before doing memory checks.
-     */
-    void collectGlobalMemory() {
-        mActivity.requestPss(mGlobalPssCollected);
-    }
-
-    /**
-     * Check memory usage in the system, scheduling kills/reboots as needed.
-     * This always runs on the mHandler thread.
-     */
-    void checkMemory() {
-        boolean needScheduledCheck;
-        long curTime;
-        long nextTime = 0;
-
-        long recheckInterval = Settings.Secure.getLong(
-                mResolver, Settings.Secure.MEMCHECK_RECHECK_INTERVAL,
-                MEMCHECK_DEFAULT_RECHECK_INTERVAL) * 1000;
-
-        mSystemMemMonitor.retrieveSettings(mResolver);
-        mPhoneMemMonitor.retrieveSettings(mResolver);
-        retrieveBrutalityAmount();
-
-        synchronized (this) {
-            curTime = System.currentTimeMillis();
-            mNeedScheduledCheck = false;
-
-            // How is the system doing?
-            if (mSystemMemMonitor.checkLocked(curTime, Process.myPid(),
-                    (int)Process.getPss(Process.myPid()))) {
-                // Not good!  Time to suicide.
-                mForceKillSystem = true;
-                notifyAll();
-                return;
-            }
-
-            // How is the phone process doing?
-            if (mPhoneReq != null) {
-                if (mPhoneMemMonitor.checkLocked(curTime, mPhonePid,
-                        mPhonePss)) {
-                    // Just kill the phone process and let it restart.
-                    Slog.i(TAG, "Watchdog is killing the phone process");
-                    Process.killProcess(mPhonePid);
-                }
-            } else {
-                mPhoneMemMonitor.clear();
-            }
-
-            needScheduledCheck = mNeedScheduledCheck;
-            if (needScheduledCheck) {
-                // Something is going bad, but now is not a good time to
-                // tear things down...  schedule an alarm to check again soon.
-                nextTime = curTime + recheckInterval;
-                if (nextTime < mMemcheckExecStartTime) {
-                    nextTime = mMemcheckExecStartTime;
-                } else if (nextTime >= mMemcheckExecEndTime){
-                    // Need to check during next exec time...  so that needs
-                    // to be computed.
-                    if (localLOGV) Slog.v(TAG, "Computing next time range");
-                    computeMemcheckTimesLocked(nextTime);
-                    nextTime = mMemcheckExecStartTime;
-                }
-
-                if (localLOGV) {
-                    mCalendar.setTimeInMillis(nextTime);
-                    Slog.v(TAG, "Next Alarm Time: " + mCalendar);
-                }
-            }
-        }
-
-        if (needScheduledCheck) {
-            if (localLOGV) Slog.v(TAG, "Scheduling next memcheck alarm for "
-                    + ((nextTime-curTime)/1000/60) + "m from now");
-            mAlarm.remove(mCheckupIntent);
-            mAlarm.set(AlarmManager.RTC_WAKEUP, nextTime, mCheckupIntent);
-        } else {
-            if (localLOGV) Slog.v(TAG, "No need to schedule a memcheck alarm!");
-            mAlarm.remove(mCheckupIntent);
-        }
-    }
-
-    final PssStats mPssStats = new PssStats();
-    final String[] mMemInfoFields = new String[] {
-            "MemFree:", "Buffers:", "Cached:",
-            "Active:", "Inactive:",
-            "AnonPages:", "Mapped:", "Slab:",
-            "SReclaimable:", "SUnreclaim:", "PageTables:" };
-    final long[] mMemInfoSizes = new long[mMemInfoFields.length];
-    final String[] mVMStatFields = new String[] {
-            "pgfree ", "pgactivate ", "pgdeactivate ",
-            "pgfault ", "pgmajfault " };
-    final long[] mVMStatSizes = new long[mVMStatFields.length];
-    final long[] mPrevVMStatSizes = new long[mVMStatFields.length];
-    long mLastLogGlobalMemoryTime;
-
-    void logGlobalMemory() {
-        PssStats stats = mPssStats;
-        mActivity.collectPss(stats);
-        EventLog.writeEvent(EventLogTags.WATCHDOG_PSS_STATS,
-                stats.mEmptyPss, stats.mEmptyCount,
-                stats.mBackgroundPss, stats.mBackgroundCount,
-                stats.mServicePss, stats.mServiceCount,
-                stats.mVisiblePss, stats.mVisibleCount,
-                stats.mForegroundPss, stats.mForegroundCount,
-                stats.mNoPssCount);
-        EventLog.writeEvent(EventLogTags.WATCHDOG_PROC_STATS,
-                stats.mProcDeaths[0], stats.mProcDeaths[1], stats.mProcDeaths[2],
-                stats.mProcDeaths[3], stats.mProcDeaths[4]);
-        Process.readProcLines("/proc/meminfo", mMemInfoFields, mMemInfoSizes);
-        for (int i=0; i<mMemInfoSizes.length; i++) {
-            mMemInfoSizes[i] *= 1024;
-        }
-        EventLog.writeEvent(EventLogTags.WATCHDOG_MEMINFO,
-                (int)mMemInfoSizes[0], (int)mMemInfoSizes[1], (int)mMemInfoSizes[2],
-                (int)mMemInfoSizes[3], (int)mMemInfoSizes[4],
-                (int)mMemInfoSizes[5], (int)mMemInfoSizes[6], (int)mMemInfoSizes[7],
-                (int)mMemInfoSizes[8], (int)mMemInfoSizes[9], (int)mMemInfoSizes[10]);
-        long now = SystemClock.uptimeMillis();
-        long dur = now - mLastLogGlobalMemoryTime;
-        mLastLogGlobalMemoryTime = now;
-        Process.readProcLines("/proc/vmstat", mVMStatFields, mVMStatSizes);
-        for (int i=0; i<mVMStatSizes.length; i++) {
-            long v = mVMStatSizes[i];
-            mVMStatSizes[i] -= mPrevVMStatSizes[i];
-            mPrevVMStatSizes[i] = v;
-        }
-        EventLog.writeEvent(EventLogTags.WATCHDOG_VMSTAT, dur,
-                (int)mVMStatSizes[0], (int)mVMStatSizes[1], (int)mVMStatSizes[2],
-                (int)mVMStatSizes[3], (int)mVMStatSizes[4]);
-    }
-
     void checkReboot(boolean fromAlarm) {
         int rebootInterval = mReqRebootInterval >= 0 ? mReqRebootInterval
                 : Settings.Secure.getInt(
@@ -730,47 +360,6 @@
         return null;
     }
 
-    /**
-     * Compute the times during which we next would like to perform process
-     * restarts.
-     *
-     * @param curTime The current system time.
-     */
-    void computeMemcheckTimesLocked(long curTime) {
-        if (mMemcheckLastTime == curTime) {
-            return;
-        }
-
-        mMemcheckLastTime = curTime;
-
-        long memcheckExecStartTime = Settings.Secure.getLong(
-                mResolver, Settings.Secure.MEMCHECK_EXEC_START_TIME,
-                MEMCHECK_DEFAULT_EXEC_START_TIME);
-        long memcheckExecEndTime = Settings.Secure.getLong(
-                mResolver, Settings.Secure.MEMCHECK_EXEC_END_TIME,
-                MEMCHECK_DEFAULT_EXEC_END_TIME);
-
-        mMemcheckExecEndTime = computeCalendarTime(mCalendar, curTime,
-                memcheckExecEndTime);
-        if (mMemcheckExecEndTime < curTime) {
-            memcheckExecStartTime += 24*60*60;
-            memcheckExecEndTime += 24*60*60;
-            mMemcheckExecEndTime = computeCalendarTime(mCalendar, curTime,
-                    memcheckExecEndTime);
-        }
-        mMemcheckExecStartTime = computeCalendarTime(mCalendar, curTime,
-                memcheckExecStartTime);
-
-        if (localLOGV) {
-            mCalendar.setTimeInMillis(curTime);
-            Slog.v(TAG, "Current Time: " + mCalendar);
-            mCalendar.setTimeInMillis(mMemcheckExecStartTime);
-            Slog.v(TAG, "Start Check Time: " + mCalendar);
-            mCalendar.setTimeInMillis(mMemcheckExecEndTime);
-            Slog.v(TAG, "End Check Time: " + mCalendar);
-        }
-    }
-
     static long computeCalendarTime(Calendar c, long curTime,
             long secondsSinceMidnight) {
 
diff --git a/services/java/com/android/server/WifiService.java b/services/java/com/android/server/WifiService.java
index 8d6ad93..509c789 100644
--- a/services/java/com/android/server/WifiService.java
+++ b/services/java/com/android/server/WifiService.java
@@ -631,6 +631,7 @@
     }
 
     public WifiConfiguration getWifiApConfiguration() {
+        enforceAccessPermission();
         final ContentResolver cr = mContext.getContentResolver();
         WifiConfiguration wifiConfig = new WifiConfiguration();
         int authType;
@@ -648,7 +649,8 @@
         }
     }
 
-    private void persistApConfiguration(WifiConfiguration wifiConfig) {
+    public void setWifiApConfiguration(WifiConfiguration wifiConfig) {
+        enforceChangePermission();
         final ContentResolver cr = mContext.getContentResolver();
         boolean isWpa;
         if (wifiConfig == null)
@@ -679,9 +681,9 @@
             /* Configuration changed on a running access point */
             if(enable && (wifiConfig != null)) {
                 try {
-                    persistApConfiguration(wifiConfig);
                     nwService.setAccessPoint(wifiConfig, mWifiStateTracker.getInterfaceName(),
                                              SOFTAP_IFACE);
+                    setWifiApConfiguration(wifiConfig);
                     return true;
                 } catch(Exception e) {
                     Slog.e(TAG, "Exception in nwService during AP restart");
@@ -717,7 +719,6 @@
                 wifiConfig.SSID = mContext.getString(R.string.wifi_tether_configure_ssid_default);
                 wifiConfig.allowedKeyManagement.set(KeyMgmt.NONE);
             }
-            persistApConfiguration(wifiConfig);
 
             if (!mWifiStateTracker.loadDriver()) {
                 Slog.e(TAG, "Failed to load Wi-Fi driver for AP mode");
@@ -734,6 +735,8 @@
                 return false;
             }
 
+            setWifiApConfiguration(wifiConfig);
+
         } else {
 
             try {
diff --git a/services/java/com/android/server/WindowManagerService.java b/services/java/com/android/server/WindowManagerService.java
index a8dad88..2e28afb 100644
--- a/services/java/com/android/server/WindowManagerService.java
+++ b/services/java/com/android/server/WindowManagerService.java
@@ -48,7 +48,6 @@
 import com.android.internal.view.IInputMethodClient;
 import com.android.internal.view.IInputMethodManager;
 import com.android.internal.view.WindowManagerPolicyThread;
-import com.android.server.KeyInputQueue.QueuedEvent;
 import com.android.server.am.BatteryStatsService;
 
 import android.Manifest;
@@ -95,15 +94,18 @@
 import android.util.SparseIntArray;
 import android.view.Display;
 import android.view.Gravity;
+import android.view.HapticFeedbackConstants;
 import android.view.IApplicationToken;
 import android.view.IOnKeyguardExitResult;
 import android.view.IRotationWatcher;
 import android.view.IWindow;
 import android.view.IWindowManager;
 import android.view.IWindowSession;
+import android.view.InputChannel;
+import android.view.InputDevice;
+import android.view.InputQueue;
 import android.view.KeyEvent;
 import android.view.MotionEvent;
-import android.view.RawInputEvent;
 import android.view.Surface;
 import android.view.SurfaceSession;
 import android.view.View;
@@ -135,7 +137,7 @@
 
 /** {@hide} */
 public class WindowManagerService extends IWindowManager.Stub
-        implements Watchdog.Monitor, KeyInputQueue.HapticFeedbackCallback {
+        implements Watchdog.Monitor {
     static final String TAG = "WindowManager";
     static final boolean DEBUG = false;
     static final boolean DEBUG_FOCUS = false;
@@ -163,9 +165,6 @@
     static final boolean BLUR = true;
     static final boolean localLOGV = DEBUG;
 
-    /** How long to wait for subsequent key repeats, in milliseconds */
-    static final int KEY_REPEAT_DELAY = 50;
-
     /** How much to multiply the policy's type layer, to reserve room
      * for multiple windows of the same type and Z-ordering adjustment
      * with TYPE_LAYER_OFFSET. */
@@ -198,35 +197,19 @@
     /** Adjustment to time to perform a dim, to make it more dramatic.
      */
     static final int DIM_DURATION_MULTIPLIER = 6;
-
-    static final int INJECT_FAILED = 0;
-    static final int INJECT_SUCCEEDED = 1;
-    static final int INJECT_NO_PERMISSION = -1;
+    
+    // Maximum number of milliseconds to wait for input event injection.
+    // FIXME is this value reasonable?
+    private static final int INJECTION_TIMEOUT_MILLIS = 30 * 1000;
+    
+    // Default input dispatching timeout in nanoseconds.
+    private static final long DEFAULT_INPUT_DISPATCHING_TIMEOUT_NANOS = 5000 * 1000000L;
 
     static final int UPDATE_FOCUS_NORMAL = 0;
     static final int UPDATE_FOCUS_WILL_ASSIGN_LAYERS = 1;
     static final int UPDATE_FOCUS_PLACING_SURFACES = 2;
     static final int UPDATE_FOCUS_WILL_PLACE_SURFACES = 3;
 
-    /** The minimum time between dispatching touch events. */
-    int mMinWaitTimeBetweenTouchEvents = 1000 / 35;
-
-    // Last touch event time
-    long mLastTouchEventTime = 0;
-
-    // Last touch event type
-    int mLastTouchEventType = OTHER_EVENT;
-
-    // Time to wait before calling useractivity again. This saves CPU usage
-    // when we get a flood of touch events.
-    static final int MIN_TIME_BETWEEN_USERACTIVITIES = 1000;
-
-    // Last time we call user activity
-    long mLastUserActivityCallTime = 0;
-
-    // Last time we updated battery stats
-    long mLastBatteryStatsCallTime = 0;
-
     private static final String SYSTEM_SECURE = "ro.secure";
     private static final String SYSTEM_DEBUGGABLE = "ro.debuggable";
 
@@ -349,7 +332,7 @@
     /**
      * Z-ordered (bottom-most first) list of all Window objects.
      */
-    final ArrayList mWindows = new ArrayList();
+    final ArrayList<WindowState> mWindows = new ArrayList<WindowState>();
 
     /**
      * Windows that are being resized.  Used so we can tell the client about
@@ -442,8 +425,6 @@
     final ArrayList<AppWindowToken> mToTopApps = new ArrayList<AppWindowToken>();
     final ArrayList<AppWindowToken> mToBottomApps = new ArrayList<AppWindowToken>();
 
-    //flag to detect fat touch events
-    boolean mFatTouch = false;
     Display mDisplay;
 
     H mH = new H();
@@ -477,7 +458,6 @@
     float mLastWallpaperY = -1;
     float mLastWallpaperXStep = -1;
     float mLastWallpaperYStep = -1;
-    boolean mSendingPointersToWallpaper = false;
     // This is set when we are waiting for a wallpaper to tell us it is done
     // changing its scroll position.
     WindowState mWaitingOnWallpaper;
@@ -495,12 +475,11 @@
     float mWindowAnimationScale = 1.0f;
     float mTransitionAnimationScale = 1.0f;
 
-    final KeyWaiter mKeyWaiter = new KeyWaiter();
-    final KeyQ mQueue;
-    final InputDispatcherThread mInputThread;
+    final InputManager mInputManager;
 
     // Who is holding the screen on.
     Session mHoldingScreenOn;
+    PowerManager.WakeLock mHoldingScreenWakeLock;
 
     boolean mTurnOnScreen;
 
@@ -511,8 +490,14 @@
     boolean mInTouchMode = false;
 
     private ViewServer mViewServer;
+    private ArrayList<WindowChangeListener> mWindowChangeListeners =
+        new ArrayList<WindowChangeListener>();
+    private boolean mWindowsChanged = false;
 
-    final Rect mTempRect = new Rect();
+    public interface WindowChangeListener {
+        public void windowsChanged();
+        public void focusChanged();
+    }
 
     final Configuration mTempConfiguration = new Configuration();
     int mScreenLayout = Configuration.SCREENLAYOUT_SIZE_UNDEFINED;
@@ -561,6 +546,7 @@
                     mHaveInputMethods);
             android.os.Process.setThreadPriority(
                     android.os.Process.THREAD_PRIORITY_DISPLAY);
+            android.os.Process.setCanSelfBackground(false);
 
             synchronized (this) {
                 mService = s;
@@ -596,6 +582,7 @@
             //        Log.VERBOSE, "WindowManagerPolicy", Log.LOG_ID_SYSTEM));
             android.os.Process.setThreadPriority(
                     android.os.Process.THREAD_PRIORITY_FOREGROUND);
+            android.os.Process.setCanSelfBackground(false);
             mPolicy.init(mContext, mService, mPM);
 
             synchronized (this) {
@@ -639,20 +626,11 @@
         filter.addAction(DevicePolicyManager.ACTION_DEVICE_POLICY_MANAGER_STATE_CHANGED);
         mContext.registerReceiver(mBroadcastReceiver, filter);
 
-        int max_events_per_sec = 35;
-        try {
-            max_events_per_sec = Integer.parseInt(SystemProperties
-                    .get("windowsmgr.max_events_per_sec"));
-            if (max_events_per_sec < 1) {
-                max_events_per_sec = 35;
-            }
-        } catch (NumberFormatException e) {
-        }
-        mMinWaitTimeBetweenTouchEvents = 1000 / max_events_per_sec;
+        mHoldingScreenWakeLock = pmc.newWakeLock(PowerManager.SCREEN_BRIGHT_WAKE_LOCK,
+                "KEEP_SCREEN_ON_FLAG");
+        mHoldingScreenWakeLock.setReferenceCounted(false);
 
-        mQueue = new KeyQ();
-
-        mInputThread = new InputDispatcherThread();
+        mInputManager = new InputManager(context, this);
 
         PolicyThread thr = new PolicyThread(mPolicy, this, context, pm);
         thr.start();
@@ -666,7 +644,7 @@
             }
         }
 
-        mInputThread.start();
+        mInputManager.start();
 
         // Add ourself to the Watchdog monitors.
         Watchdog.getInstance().addMonitor(this);
@@ -687,33 +665,35 @@
         }
     }
 
-    private void placeWindowAfter(Object pos, WindowState window) {
+    private void placeWindowAfter(WindowState pos, WindowState window) {
         final int i = mWindows.indexOf(pos);
         if (DEBUG_FOCUS || DEBUG_WINDOW_MOVEMENT) Slog.v(
             TAG, "Adding window " + window + " at "
             + (i+1) + " of " + mWindows.size() + " (after " + pos + ")");
         mWindows.add(i+1, window);
+        mWindowsChanged = true;
     }
 
-    private void placeWindowBefore(Object pos, WindowState window) {
+    private void placeWindowBefore(WindowState pos, WindowState window) {
         final int i = mWindows.indexOf(pos);
         if (DEBUG_FOCUS || DEBUG_WINDOW_MOVEMENT) Slog.v(
             TAG, "Adding window " + window + " at "
             + i + " of " + mWindows.size() + " (before " + pos + ")");
         mWindows.add(i, window);
+        mWindowsChanged = true;
     }
 
     //This method finds out the index of a window that has the same app token as
     //win. used for z ordering the windows in mWindows
     private int findIdxBasedOnAppTokens(WindowState win) {
         //use a local variable to cache mWindows
-        ArrayList localmWindows = mWindows;
+        ArrayList<WindowState> localmWindows = mWindows;
         int jmax = localmWindows.size();
         if(jmax == 0) {
             return -1;
         }
         for(int j = (jmax-1); j >= 0; j--) {
-            WindowState wentry = (WindowState)localmWindows.get(j);
+            WindowState wentry = localmWindows.get(j);
             if(wentry.mAppToken == win.mAppToken) {
                 return j;
             }
@@ -724,7 +704,7 @@
     private void addWindowToListInOrderLocked(WindowState win, boolean addToToken) {
         final IWindow client = win.mClient;
         final WindowToken token = win.mToken;
-        final ArrayList localmWindows = mWindows;
+        final ArrayList<WindowState> localmWindows = mWindows;
 
         final int N = localmWindows.size();
         final WindowState attached = win.mAttachedWindow;
@@ -758,6 +738,7 @@
                                         TAG, "Adding window " + win + " at "
                                         + (newIdx+1) + " of " + N);
                                 localmWindows.add(newIdx+1, win);
+                                mWindowsChanged = true;
                             }
                         }
                     }
@@ -768,7 +749,7 @@
                     // Figure out where the window should go, based on the
                     // order of applications.
                     final int NA = mAppTokens.size();
-                    Object pos = null;
+                    WindowState pos = null;
                     for (i=NA-1; i>=0; i--) {
                         AppWindowToken t = mAppTokens.get(i);
                         if (t == token) {
@@ -788,8 +769,7 @@
                     // we need to look some more.
                     if (pos != null) {
                         // Move behind any windows attached to this one.
-                        WindowToken atoken =
-                            mTokenMap.get(((WindowState)pos).mClient.asBinder());
+                        WindowToken atoken = mTokenMap.get(pos.mClient.asBinder());
                         if (atoken != null) {
                             final int NC = atoken.windows.size();
                             if (NC > 0) {
@@ -815,8 +795,7 @@
                         if (pos != null) {
                             // Move in front of any windows attached to this
                             // one.
-                            WindowToken atoken =
-                                mTokenMap.get(((WindowState)pos).mClient.asBinder());
+                            WindowToken atoken = mTokenMap.get(pos.mClient.asBinder());
                             if (atoken != null) {
                                 final int NC = atoken.windows.size();
                                 if (NC > 0) {
@@ -831,7 +810,7 @@
                             // Just search for the start of this layer.
                             final int myLayer = win.mBaseLayer;
                             for (i=0; i<N; i++) {
-                                WindowState w = (WindowState)localmWindows.get(i);
+                                WindowState w = localmWindows.get(i);
                                 if (w.mBaseLayer > myLayer) {
                                     break;
                                 }
@@ -840,6 +819,7 @@
                                     TAG, "Adding window " + win + " at "
                                     + i + " of " + N);
                             localmWindows.add(i, win);
+                            mWindowsChanged = true;
                         }
                     }
                 }
@@ -847,7 +827,7 @@
                 // Figure out where window should go, based on layer.
                 final int myLayer = win.mBaseLayer;
                 for (i=N-1; i>=0; i--) {
-                    if (((WindowState)localmWindows.get(i)).mBaseLayer <= myLayer) {
+                    if (localmWindows.get(i).mBaseLayer <= myLayer) {
                         i++;
                         break;
                     }
@@ -857,6 +837,7 @@
                         TAG, "Adding window " + win + " at "
                         + i + " of " + N);
                 localmWindows.add(i, win);
+                mWindowsChanged = true;
             }
             if (addToToken) {
                 token.windows.add(tokenWindowsPos, win);
@@ -929,13 +910,13 @@
     }
 
     int findDesiredInputMethodWindowIndexLocked(boolean willMove) {
-        final ArrayList localmWindows = mWindows;
+        final ArrayList<WindowState> localmWindows = mWindows;
         final int N = localmWindows.size();
         WindowState w = null;
         int i = N;
         while (i > 0) {
             i--;
-            w = (WindowState)localmWindows.get(i);
+            w = localmWindows.get(i);
 
             //Slog.i(TAG, "Checking window @" + i + " " + w + " fl=0x"
             //        + Integer.toHexString(w.mAttrs.flags));
@@ -950,7 +931,7 @@
                 if (!willMove
                         && w.mAttrs.type == WindowManager.LayoutParams.TYPE_APPLICATION_STARTING
                         && i > 0) {
-                    WindowState wb = (WindowState)localmWindows.get(i-1);
+                    WindowState wb = localmWindows.get(i-1);
                     if (wb.mAppToken == w.mAppToken && canBeImeTarget(wb)) {
                         i--;
                         w = wb;
@@ -980,7 +961,7 @@
                     int pos = 0;
                     pos = localmWindows.indexOf(curTarget);
                     while (pos >= 0) {
-                        WindowState win = (WindowState)localmWindows.get(pos);
+                        WindowState win = localmWindows.get(pos);
                         if (win.mAppToken != token) {
                             break;
                         }
@@ -1065,6 +1046,7 @@
             if (DEBUG_WINDOW_MOVEMENT) Slog.v(
                     TAG, "Adding input method window " + win + " at " + pos);
             mWindows.add(pos, win);
+            mWindowsChanged = true;
             moveInputMethodDialogsLocked(pos+1);
             return;
         }
@@ -1084,7 +1066,7 @@
             int wi = imw.mChildWindows.size();
             while (wi > 0) {
                 wi--;
-                WindowState cw = (WindowState)imw.mChildWindows.get(wi);
+                WindowState cw = imw.mChildWindows.get(wi);
                 cw.mAnimLayer = cw.mLayer + adj;
                 if (DEBUG_LAYERS) Slog.v(TAG, "IM win " + cw
                         + " anim layer: " + cw.mAnimLayer);
@@ -1106,10 +1088,11 @@
             if (wpos < interestingPos) interestingPos--;
             if (DEBUG_WINDOW_MOVEMENT) Slog.v(TAG, "Temp removing at " + wpos + ": " + win);
             mWindows.remove(wpos);
+            mWindowsChanged = true;
             int NC = win.mChildWindows.size();
             while (NC > 0) {
                 NC--;
-                WindowState cw = (WindowState)win.mChildWindows.get(NC);
+                WindowState cw = win.mChildWindows.get(NC);
                 int cpos = mWindows.indexOf(cw);
                 if (cpos >= 0) {
                     if (cpos < interestingPos) interestingPos--;
@@ -1132,6 +1115,7 @@
             if (DEBUG_WINDOW_MOVEMENT) Slog.v(TAG, "ReAdd removing from " + wpos
                     + ": " + win);
             mWindows.remove(wpos);
+            mWindowsChanged = true;
             reAddWindowLocked(wpos, win);
         }
     }
@@ -1160,7 +1144,7 @@
         if (pos >= 0) {
             final AppWindowToken targetAppToken = mInputMethodTarget.mAppToken;
             if (pos < mWindows.size()) {
-                WindowState wp = (WindowState)mWindows.get(pos);
+                WindowState wp = mWindows.get(pos);
                 if (wp == mInputMethodWindow) {
                     pos++;
                 }
@@ -1204,14 +1188,14 @@
             // located here, and contiguous.
             final int N = mWindows.size();
             WindowState firstImWin = imPos < N
-                    ? (WindowState)mWindows.get(imPos) : null;
+                    ? mWindows.get(imPos) : null;
 
             // Figure out the actual input method window that should be
             // at the bottom of their stack.
             WindowState baseImWin = imWin != null
                     ? imWin : mInputMethodDialogs.get(0);
             if (baseImWin.mChildWindows.size() > 0) {
-                WindowState cw = (WindowState)baseImWin.mChildWindows.get(0);
+                WindowState cw = baseImWin.mChildWindows.get(0);
                 if (cw.mSubLayer < 0) baseImWin = cw;
             }
 
@@ -1220,7 +1204,7 @@
                 // First find the top IM window.
                 int pos = imPos+1;
                 while (pos < N) {
-                    if (!((WindowState)mWindows.get(pos)).mIsImWindow) {
+                    if (!(mWindows.get(pos)).mIsImWindow) {
                         break;
                     }
                     pos++;
@@ -1228,7 +1212,7 @@
                 pos++;
                 // Now there should be no more input method windows above.
                 while (pos < N) {
-                    if (((WindowState)mWindows.get(pos)).mIsImWindow) {
+                    if ((mWindows.get(pos)).mIsImWindow) {
                         break;
                     }
                     pos++;
@@ -1316,7 +1300,7 @@
 
         // First find top-most window that has asked to be on top of the
         // wallpaper; all wallpapers go behind it.
-        final ArrayList localmWindows = mWindows;
+        final ArrayList<WindowState> localmWindows = mWindows;
         int N = localmWindows.size();
         WindowState w = null;
         WindowState foundW = null;
@@ -1326,7 +1310,7 @@
         int i = N;
         while (i > 0) {
             i--;
-            w = (WindowState)localmWindows.get(i);
+            w = localmWindows.get(i);
             if ((w.mAttrs.type == WindowManager.LayoutParams.TYPE_WALLPAPER)) {
                 if (topCurW == null) {
                     topCurW = w;
@@ -1497,7 +1481,7 @@
             // AND any starting window associated with it, AND below the
             // maximum layer the policy allows for wallpapers.
             while (foundI > 0) {
-                WindowState wb = (WindowState)localmWindows.get(foundI-1);
+                WindowState wb = localmWindows.get(foundI-1);
                 if (wb.mBaseLayer < maxLayer &&
                         wb.mAttachedWindow != foundW &&
                         (wb.mAttrs.type != TYPE_APPLICATION_STARTING ||
@@ -1521,7 +1505,7 @@
         } else {
             // Okay i is the position immediately above the wallpaper.  Look at
             // what is below it for later.
-            foundW = foundI > 0 ? (WindowState)localmWindows.get(foundI-1) : null;
+            foundW = foundI > 0 ? localmWindows.get(foundI-1) : null;
         }
 
         if (visible) {
@@ -1580,7 +1564,7 @@
                 if (wallpaper == foundW) {
                     foundI--;
                     foundW = foundI > 0
-                            ? (WindowState)localmWindows.get(foundI-1) : null;
+                            ? localmWindows.get(foundI-1) : null;
                     continue;
                 }
 
@@ -1592,6 +1576,7 @@
                     if (DEBUG_WINDOW_MOVEMENT) Slog.v(TAG, "Wallpaper removing at "
                             + oldIndex + ": " + wallpaper);
                     localmWindows.remove(oldIndex);
+                    mWindowsChanged = true;
                     if (oldIndex < foundI) {
                         foundI--;
                     }
@@ -1603,6 +1588,7 @@
                         + " from " + oldIndex + " to " + foundI);
 
                 localmWindows.add(foundI, wallpaper);
+                mWindowsChanged = true;
                 changed |= ADJUST_WALLPAPER_LAYERS_CHANGED;
             }
         }
@@ -1792,74 +1778,10 @@
             }
         }
     }
-
-    void sendPointerToWallpaperLocked(WindowState srcWin,
-            MotionEvent pointer, long eventTime) {
-        int curTokenIndex = mWallpaperTokens.size();
-        while (curTokenIndex > 0) {
-            curTokenIndex--;
-            WindowToken token = mWallpaperTokens.get(curTokenIndex);
-            int curWallpaperIndex = token.windows.size();
-            while (curWallpaperIndex > 0) {
-                curWallpaperIndex--;
-                WindowState wallpaper = token.windows.get(curWallpaperIndex);
-                if ((wallpaper.mAttrs.flags &
-                        WindowManager.LayoutParams.FLAG_NOT_TOUCHABLE) != 0) {
-                    continue;
-                }
-                try {
-                    MotionEvent ev = MotionEvent.obtainNoHistory(pointer);
-                    if (srcWin != null) {
-                        ev.offsetLocation(srcWin.mFrame.left-wallpaper.mFrame.left,
-                                srcWin.mFrame.top-wallpaper.mFrame.top);
-                    } else {
-                        ev.offsetLocation(-wallpaper.mFrame.left, -wallpaper.mFrame.top);
-                    }
-                    switch (pointer.getAction()) {
-                        case MotionEvent.ACTION_DOWN:
-                            mSendingPointersToWallpaper = true;
-                            break;
-                        case MotionEvent.ACTION_UP:
-                            mSendingPointersToWallpaper = false;
-                            break;
-                    }
-                    wallpaper.mClient.dispatchPointer(ev, eventTime, false);
-                } catch (RemoteException e) {
-                    Slog.w(TAG, "Failure sending pointer to wallpaper", e);
-                }
-            }
-        }
-    }
-
-    void dispatchPointerElsewhereLocked(WindowState srcWin, WindowState relWin,
-            MotionEvent pointer, long eventTime, boolean skipped) {
-        if (relWin != null) {
-            mPolicy.dispatchedPointerEventLw(pointer, relWin.mFrame.left, relWin.mFrame.top);
-        } else {
-            mPolicy.dispatchedPointerEventLw(pointer, 0, 0);
-        }
-        
-        // If we sent an initial down to the wallpaper, then continue
-        // sending events until the final up.
-        if (mSendingPointersToWallpaper) {
-            if (skipped) {
-                Slog.i(TAG, "Sending skipped pointer to wallpaper!");
-            }
-            sendPointerToWallpaperLocked(relWin, pointer, eventTime);
-            
-        // If we are on top of the wallpaper, then the wallpaper also
-        // gets to see this movement.
-        } else if (srcWin != null
-                && pointer.getAction() == MotionEvent.ACTION_DOWN
-                && mWallpaperTarget == srcWin
-                && srcWin.mAttrs.type != WindowManager.LayoutParams.TYPE_KEYGUARD) {
-            sendPointerToWallpaperLocked(relWin, pointer, eventTime);
-        }
-    }
     
     public int addWindow(Session session, IWindow client,
             WindowManager.LayoutParams attrs, int viewVisibility,
-            Rect outContentInsets) {
+            Rect outContentInsets, InputChannel outInputChannel) {
         int res = mPolicy.checkAddPermission(attrs);
         if (res != WindowManagerImpl.ADD_OKAY) {
             return res;
@@ -1878,7 +1800,7 @@
                 mDisplay = wm.getDefaultDisplay();
                 mInitialDisplayWidth = mDisplay.getWidth();
                 mInitialDisplayHeight = mDisplay.getHeight();
-                mQueue.setDisplay(mDisplay);
+                mInputManager.setDisplaySize(0, mInitialDisplayWidth, mInitialDisplayHeight);
                 reportNewConfig = true;
             }
 
@@ -1971,6 +1893,15 @@
             if (res != WindowManagerImpl.ADD_OKAY) {
                 return res;
             }
+            
+            if (outInputChannel != null) {
+                String name = win.makeInputChannelName();
+                InputChannel[] inputChannels = InputChannel.openInputChannelPair(name);
+                win.mInputChannel = inputChannels[0];
+                inputChannels[1].transferToBinderOutParameter(outInputChannel);
+                
+                mInputManager.registerInputChannel(win.mInputChannel);
+            }
 
             // From now on, no exceptions or errors allowed!
 
@@ -2024,8 +1955,8 @@
 
             boolean focusChanged = false;
             if (win.canReceiveKeys()) {
-                if ((focusChanged=updateFocusedWindowLocked(UPDATE_FOCUS_WILL_ASSIGN_LAYERS))
-                        == true) {
+                focusChanged = updateFocusedWindowLocked(UPDATE_FOCUS_WILL_ASSIGN_LAYERS);
+                if (focusChanged) {
                     imMayMove = false;
                 }
             }
@@ -2041,10 +1972,9 @@
             //dump();
 
             if (focusChanged) {
-                if (mCurrentFocus != null) {
-                    mKeyWaiter.handleNewWindowLocked(mCurrentFocus);
-                }
+                finishUpdateFocusedWindowAfterAssignLayersLocked();
             }
+            
             if (localLOGV) Slog.v(
                 TAG, "New client " + client.asBinder()
                 + ": window=" + win);
@@ -2086,6 +2016,8 @@
             + ", surface=" + win.mSurface);
 
         final long origId = Binder.clearCallingIdentity();
+        
+        win.disposeInputChannel();
 
         if (DEBUG_APP_TRANSITIONS) Slog.v(
                 TAG, "Remove " + win + ": mSurface=" + win.mSurface
@@ -2146,11 +2078,6 @@
     }
 
     private void removeWindowInnerLocked(Session session, WindowState win) {
-        mKeyWaiter.finishedKey(session, win.mClient, true,
-                KeyWaiter.RETURN_NOTHING);
-        mKeyWaiter.releasePendingPointerLocked(win.mSession);
-        mKeyWaiter.releasePendingTrackballLocked(win.mSession);
-
         win.mRemoved = true;
 
         if (mInputMethodTarget == win) {
@@ -2168,6 +2095,7 @@
 
         mWindowMap.remove(win.mClient.asBinder());
         mWindows.remove(win);
+        mWindowsChanged = true;
         if (DEBUG_WINDOW_MOVEMENT) Slog.v(TAG, "Final remove of window: " + win);
 
         if (mInputMethodWindow == win) {
@@ -2228,6 +2156,8 @@
                 win.mAppToken.updateReportedVisibilityLocked();
             }
         }
+        
+        mInputMonitor.updateInputWindowsLw();
     }
 
     private static void logSurface(WindowState w, String msg, RuntimeException where) {
@@ -2471,6 +2401,8 @@
                         outSurface.release();
                     }
                 } catch (Exception e) {
+                    mInputMonitor.updateInputWindowsLw();
+                    
                     Slog.w(TAG, "Exception thrown when creating surface for client "
                              + client + " (" + win.mAttrs.getTitle() + ")",
                              e);
@@ -2517,8 +2449,6 @@
                               applyAnimationLocked(win, transit, false)) {
                             focusMayChange = true;
                             win.mExiting = true;
-                            mKeyWaiter.finishedKey(session, client, true,
-                                    KeyWaiter.RETURN_NOTHING);
                         } else if (win.isAnimating()) {
                             // Currently in a hide animation... turn this into
                             // an exit.
@@ -2613,6 +2543,8 @@
                 TAG, "Relayout of " + win + ": focusMayChange=" + focusMayChange);
 
             inTouchMode = mInTouchMode;
+            
+            mInputMonitor.updateInputWindowsLw();
         }
 
         if (configChanged) {
@@ -2979,8 +2911,6 @@
                         if (win.isVisibleNow()) {
                             applyAnimationLocked(win,
                                     WindowManagerPolicy.TRANSIT_EXIT, false);
-                            mKeyWaiter.finishedKey(win.mSession, win.mClient, true,
-                                    KeyWaiter.RETURN_NOTHING);
                             changed = true;
                         }
                     }
@@ -2998,6 +2928,7 @@
                     }
                 }
 
+                mInputMonitor.updateInputWindowsLw();
             } else {
                 Slog.w(TAG, "Attempted to remove non-existing token: " + token);
             }
@@ -3011,6 +2942,20 @@
                 "addAppToken()")) {
             throw new SecurityException("Requires MANAGE_APP_TOKENS permission");
         }
+        
+        // Get the dispatching timeout here while we are not holding any locks so that it
+        // can be cached by the AppWindowToken.  The timeout value is used later by the
+        // input dispatcher in code that does hold locks.  If we did not cache the value
+        // here we would run the chance of introducing a deadlock between the window manager
+        // (which holds locks while updating the input dispatcher state) and the activity manager
+        // (which holds locks while querying the application token).
+        long inputDispatchingTimeoutNanos;
+        try {
+            inputDispatchingTimeoutNanos = token.getKeyDispatchingTimeout() * 1000000L;
+        } catch (RemoteException ex) {
+            Slog.w(TAG, "Could not get dispatching timeout.", ex);
+            inputDispatchingTimeoutNanos = DEFAULT_INPUT_DISPATCHING_TIMEOUT_NANOS;
+        }
 
         synchronized(mWindowMap) {
             AppWindowToken wtoken = findAppWindowToken(token.asBinder());
@@ -3019,6 +2964,7 @@
                 return;
             }
             wtoken = new AppWindowToken(token);
+            wtoken.inputDispatchingTimeoutNanos = inputDispatchingTimeoutNanos;
             wtoken.groupId = groupId;
             wtoken.appFullscreen = fullscreen;
             wtoken.requestedOrientation = requestedOrientation;
@@ -3054,7 +3000,7 @@
     public int getOrientationFromWindowsLocked() {
         int pos = mWindows.size() - 1;
         while (pos >= 0) {
-            WindowState wtoken = (WindowState) mWindows.get(pos);
+            WindowState wtoken = mWindows.get(pos);
             pos--;
             if (wtoken.mAppToken != null) {
                 // We hit an application window. so the orientation will be determined by the
@@ -3282,7 +3228,9 @@
                 if (DEBUG_FOCUS) Slog.v(TAG, "Clearing focused app, was " + mFocusedApp);
                 changed = mFocusedApp != null;
                 mFocusedApp = null;
-                mKeyWaiter.tickle();
+                if (changed) {
+                    mInputMonitor.setFocusedAppLw(null);
+                }
             } else {
                 AppWindowToken newFocus = findAppWindowToken(token);
                 if (newFocus == null) {
@@ -3292,7 +3240,9 @@
                 changed = mFocusedApp != newFocus;
                 mFocusedApp = newFocus;
                 if (DEBUG_FOCUS) Slog.v(TAG, "Set focused app to: " + mFocusedApp);
-                mKeyWaiter.tickle();
+                if (changed) {
+                    mInputMonitor.setFocusedAppLw(newFocus);
+                }
             }
 
             if (moveFocusNow && changed) {
@@ -3433,6 +3383,7 @@
                         if (DEBUG_WINDOW_MOVEMENT) Slog.v(TAG,
                                 "Removing starting window: " + startingWindow);
                         mWindows.remove(startingWindow);
+                        mWindowsChanged = true;
                         ttoken.windows.remove(startingWindow);
                         ttoken.allAppWindows.remove(startingWindow);
                         addWindowToListInOrderLocked(startingWindow, true);
@@ -3603,8 +3554,6 @@
                         applyAnimationLocked(win,
                                 WindowManagerPolicy.TRANSIT_EXIT, false);
                     }
-                    mKeyWaiter.finishedKey(win.mSession, win.mClient, true,
-                            KeyWaiter.RETURN_NOTHING);
                     changed = true;
                 }
             }
@@ -3632,6 +3581,8 @@
                 if (performLayout) {
                     updateFocusedWindowLocked(UPDATE_FOCUS_WILL_PLACE_SURFACES);
                     performLayoutAndPlaceSurfacesLocked();
+                } else {
+                    mInputMonitor.updateInputWindowsLw();
                 }
             }
         }
@@ -3889,7 +3840,7 @@
                     if (DEBUG_FOCUS) Slog.v(TAG, "Removing focused app token:" + wtoken);
                     mFocusedApp = null;
                     updateFocusedWindowLocked(UPDATE_FOCUS_NORMAL);
-                    mKeyWaiter.tickle();
+                    mInputMonitor.setFocusedAppLw(null);
                 }
             } else {
                 Slog.w(TAG, "Attempted to remove non-existing app token: " + token);
@@ -3915,10 +3866,11 @@
             WindowState win = token.windows.get(i);
             if (DEBUG_WINDOW_MOVEMENT) Slog.v(TAG, "Tmp removing app window " + win);
             mWindows.remove(win);
+            mWindowsChanged = true;
             int j = win.mChildWindows.size();
             while (j > 0) {
                 j--;
-                WindowState cwin = (WindowState)win.mChildWindows.get(j);
+                WindowState cwin = win.mChildWindows.get(j);
                 if (DEBUG_WINDOW_MOVEMENT) Slog.v(TAG,
                         "Tmp removing child window " + cwin);
                 mWindows.remove(cwin);
@@ -3946,7 +3898,7 @@
             int i = NW;
             while (i > 0) {
                 i--;
-                WindowState win = (WindowState)mWindows.get(i);
+                WindowState win = mWindows.get(i);
                 if (win.getAppToken() != null) {
                     return i+1;
                 }
@@ -3972,7 +3924,7 @@
                 int j = win.mChildWindows.size();
                 while (j > 0) {
                     j--;
-                    WindowState cwin = (WindowState)win.mChildWindows.get(j);
+                    WindowState cwin = win.mChildWindows.get(j);
                     if (cwin.mSubLayer >= 0) {
                         for (int pos=NW-1; pos>=0; pos--) {
                             if (mWindows.get(pos) == cwin) {
@@ -4000,7 +3952,7 @@
         final int NCW = win.mChildWindows.size();
         boolean added = false;
         for (int j=0; j<NCW; j++) {
-            WindowState cwin = (WindowState)win.mChildWindows.get(j);
+            WindowState cwin = win.mChildWindows.get(j);
             if (!added && cwin.mSubLayer >= 0) {
                 if (DEBUG_WINDOW_MOVEMENT) Slog.v(TAG, "Re-adding child window at "
                         + index + ": " + cwin);
@@ -4019,6 +3971,7 @@
             mWindows.add(index, win);
             index++;
         }
+        mWindowsChanged = true;
         return index;
     }
 
@@ -4283,7 +4236,7 @@
     public void closeSystemDialogs(String reason) {
         synchronized(mWindowMap) {
             for (int i=mWindows.size()-1; i>=0; i--) {
-                WindowState w = (WindowState)mWindows.get(i);
+                WindowState w = mWindows.get(i);
                 if (w.mSurface != null) {
                     try {
                         w.mClient.closeSystemDialogs(reason);
@@ -4354,7 +4307,7 @@
                 "getSwitchState()")) {
             throw new SecurityException("Requires READ_INPUT_STATE permission");
         }
-        return KeyInputQueue.getSwitchState(sw);
+        return mInputManager.getSwitchState(sw);
     }
 
     public int getSwitchStateForDevice(int devid, int sw) {
@@ -4362,7 +4315,7 @@
                 "getSwitchStateForDevice()")) {
             throw new SecurityException("Requires READ_INPUT_STATE permission");
         }
-        return KeyInputQueue.getSwitchState(devid, sw);
+        return mInputManager.getSwitchState(devid, sw);
     }
 
     public int getScancodeState(int sw) {
@@ -4370,7 +4323,7 @@
                 "getScancodeState()")) {
             throw new SecurityException("Requires READ_INPUT_STATE permission");
         }
-        return mQueue.getScancodeState(sw);
+        return mInputManager.getScancodeState(sw);
     }
 
     public int getScancodeStateForDevice(int devid, int sw) {
@@ -4378,7 +4331,7 @@
                 "getScancodeStateForDevice()")) {
             throw new SecurityException("Requires READ_INPUT_STATE permission");
         }
-        return mQueue.getScancodeState(devid, sw);
+        return mInputManager.getScancodeState(devid, sw);
     }
 
     public int getTrackballScancodeState(int sw) {
@@ -4386,7 +4339,7 @@
                 "getTrackballScancodeState()")) {
             throw new SecurityException("Requires READ_INPUT_STATE permission");
         }
-        return mQueue.getTrackballScancodeState(sw);
+        return mInputManager.getTrackballScancodeState(sw);
     }
 
     public int getDPadScancodeState(int sw) {
@@ -4394,7 +4347,7 @@
                 "getDPadScancodeState()")) {
             throw new SecurityException("Requires READ_INPUT_STATE permission");
         }
-        return mQueue.getDPadScancodeState(sw);
+        return mInputManager.getDPadScancodeState(sw);
     }
 
     public int getKeycodeState(int sw) {
@@ -4402,7 +4355,7 @@
                 "getKeycodeState()")) {
             throw new SecurityException("Requires READ_INPUT_STATE permission");
         }
-        return mQueue.getKeycodeState(sw);
+        return mInputManager.getKeycodeState(sw);
     }
 
     public int getKeycodeStateForDevice(int devid, int sw) {
@@ -4410,7 +4363,7 @@
                 "getKeycodeStateForDevice()")) {
             throw new SecurityException("Requires READ_INPUT_STATE permission");
         }
-        return mQueue.getKeycodeState(devid, sw);
+        return mInputManager.getKeycodeState(devid, sw);
     }
 
     public int getTrackballKeycodeState(int sw) {
@@ -4418,7 +4371,7 @@
                 "getTrackballKeycodeState()")) {
             throw new SecurityException("Requires READ_INPUT_STATE permission");
         }
-        return mQueue.getTrackballKeycodeState(sw);
+        return mInputManager.getTrackballKeycodeState(sw);
     }
 
     public int getDPadKeycodeState(int sw) {
@@ -4426,11 +4379,11 @@
                 "getDPadKeycodeState()")) {
             throw new SecurityException("Requires READ_INPUT_STATE permission");
         }
-        return mQueue.getDPadKeycodeState(sw);
+        return mInputManager.getDPadKeycodeState(sw);
     }
 
     public boolean hasKeys(int[] keycodes, boolean[] keyExists) {
-        return KeyInputQueue.hasKeys(keycodes, keyExists);
+        return mInputManager.hasKeys(keycodes, keyExists);
     }
 
     public void enableScreenAfterBoot() {
@@ -4467,7 +4420,7 @@
             // have been drawn.
             final int N = mWindows.size();
             for (int i=0; i<N; i++) {
-                WindowState w = (WindowState)mWindows.get(i);
+                WindowState w = mWindows.get(i);
                 if (w.isVisibleLw() && !w.mObscured
                         && (w.mOrientationChanging || !w.isDrawnLw())) {
                     return;
@@ -4575,12 +4528,12 @@
             mLayoutNeeded = true;
             startFreezingDisplayLocked();
             Slog.i(TAG, "Setting rotation to " + rotation + ", animFlags=" + animFlags);
-            mQueue.setOrientation(rotation);
+            mInputManager.setDisplayOrientation(0, rotation);
             if (mDisplayEnabled) {
                 Surface.setOrientation(0, rotation, animFlags);
             }
             for (int i=mWindows.size()-1; i>=0; i--) {
-                WindowState w = (WindowState)mWindows.get(i);
+                WindowState w = mWindows.get(i);
                 if (w.mSurface != null) {
                     w.mOrientationChanging = true;
                 }
@@ -4736,11 +4689,10 @@
 
         boolean result = true;
 
-        Object[] windows;
+        WindowState[] windows;
         synchronized (mWindowMap) {
-            windows = new Object[mWindows.size()];
             //noinspection unchecked
-            windows = mWindows.toArray(windows);
+            windows = mWindows.toArray(new WindowState[mWindows.size()]);
         }
 
         BufferedWriter out = null;
@@ -4752,7 +4704,7 @@
 
             final int count = windows.length;
             for (int i = 0; i < count; i++) {
-                final WindowState w = (WindowState) windows[i];
+                final WindowState w = windows[i];
                 out.write(Integer.toHexString(System.identityHashCode(w)));
                 out.write(' ');
                 out.append(w.mAttrs.getTitle());
@@ -4857,17 +4809,59 @@
         return success;
     }
 
+    public void addWindowChangeListener(WindowChangeListener listener) {
+        synchronized(mWindowMap) {
+            mWindowChangeListeners.add(listener);
+        }
+    }
+
+    public void removeWindowChangeListener(WindowChangeListener listener) {
+        synchronized(mWindowMap) {
+            mWindowChangeListeners.remove(listener);
+        }
+    }
+
+    private void notifyWindowsChanged() {
+        WindowChangeListener[] windowChangeListeners;
+        synchronized(mWindowMap) {
+            if(mWindowChangeListeners.isEmpty()) {
+                return;
+            }
+            windowChangeListeners = new WindowChangeListener[mWindowChangeListeners.size()];
+            windowChangeListeners = mWindowChangeListeners.toArray(windowChangeListeners);
+        }
+        int N = windowChangeListeners.length;
+        for(int i = 0; i < N; i++) {
+            windowChangeListeners[i].windowsChanged();
+        }
+    }
+
+    private void notifyFocusChanged() {
+        WindowChangeListener[] windowChangeListeners;
+        synchronized(mWindowMap) {
+            if(mWindowChangeListeners.isEmpty()) {
+                return;
+            }
+            windowChangeListeners = new WindowChangeListener[mWindowChangeListeners.size()];
+            windowChangeListeners = mWindowChangeListeners.toArray(windowChangeListeners);
+        }
+        int N = windowChangeListeners.length;
+        for(int i = 0; i < N; i++) {
+            windowChangeListeners[i].focusChanged();
+        }
+    }
+
     private WindowState findWindow(int hashCode) {
         if (hashCode == -1) {
             return getFocusedWindow();
         }
 
         synchronized (mWindowMap) {
-            final ArrayList windows = mWindows;
+            final ArrayList<WindowState> windows = mWindows;
             final int count = windows.size();
 
             for (int i = 0; i < count; i++) {
-                WindowState w = (WindowState) windows.get(i);
+                WindowState w = windows.get(i);
                 if (System.identityHashCode(w) == hashCode) {
                     return w;
                 }
@@ -4906,7 +4900,8 @@
         if (mDisplay == null) {
             return false;
         }
-        mQueue.getInputConfiguration(config);
+        
+        mInputManager.getInputConfiguration(config);
 
         // Use the effective "visual" dimensions based on current rotation
         final boolean rotated = (mRotation == Surface.ROTATION_90
@@ -4949,8 +4944,12 @@
                 mScreenLayout = Configuration.SCREENLAYOUT_SIZE_SMALL
                         | Configuration.SCREENLAYOUT_LONG_NO;
             } else {
-                // Is this a large screen?
-                if (longSize > 640 && shortSize >= 480) {
+                // What size is this screen screen?
+                if (longSize >= 800 && shortSize >= 600) {
+                    // SVGA or larger screens at medium density are the point
+                    // at which we consider it to be an extra large screen.
+                    mScreenLayout = Configuration.SCREENLAYOUT_SIZE_XLARGE;
+                } else if (longSize >= 640 && shortSize >= 480) {
                     // VGA or larger screens at medium density are the point
                     // at which we consider it to be a large screen.
                     mScreenLayout = Configuration.SCREENLAYOUT_SIZE_LARGE;
@@ -4981,451 +4980,365 @@
         mPolicy.adjustConfigurationLw(config);
         return true;
     }
-
+    
     // -------------------------------------------------------------
     // Input Events and Focus Management
     // -------------------------------------------------------------
+    
+    InputMonitor mInputMonitor = new InputMonitor();
+    
+    /* Tracks the progress of input dispatch and ensures that input dispatch state
+     * is kept in sync with changes in window focus, visibility, registration, and
+     * other relevant Window Manager state transitions. */
+    final class InputMonitor {
+        // Current window with input focus for keys and other non-touch events.  May be null.
+        private WindowState mInputFocus;
+        
+        // When true, prevents input dispatch from proceeding until set to false again.
+        private boolean mInputDispatchFrozen;
+        
+        // When true, input dispatch proceeds normally.  Otherwise all events are dropped.
+        private boolean mInputDispatchEnabled = true;
 
-    private final void wakeupIfNeeded(WindowState targetWin, int eventType) {
-        long curTime = SystemClock.uptimeMillis();
-
-        if (eventType == TOUCH_EVENT || eventType == LONG_TOUCH_EVENT || eventType == CHEEK_EVENT) {
-            if (mLastTouchEventType == eventType &&
-                    (curTime - mLastUserActivityCallTime) < MIN_TIME_BETWEEN_USERACTIVITIES) {
-                return;
-            }
-            mLastUserActivityCallTime = curTime;
-            mLastTouchEventType = eventType;
-        }
-
-        if (targetWin == null
-                || targetWin.mAttrs.type != WindowManager.LayoutParams.TYPE_KEYGUARD) {
-            mPowerManager.userActivity(curTime, false, eventType, false);
-        }
-    }
-
-    // tells if it's a cheek event or not -- this function is stateful
-    private static final int EVENT_NONE = 0;
-    private static final int EVENT_UNKNOWN = 0;
-    private static final int EVENT_CHEEK = 0;
-    private static final int EVENT_IGNORE_DURATION = 300; // ms
-    private static final float CHEEK_THRESHOLD = 0.6f;
-    private int mEventState = EVENT_NONE;
-    private float mEventSize;
-
-    private int eventType(MotionEvent ev) {
-        float size = ev.getSize();
-        switch (ev.getAction()) {
-        case MotionEvent.ACTION_DOWN:
-            mEventSize = size;
-            return (mEventSize > CHEEK_THRESHOLD) ? CHEEK_EVENT : TOUCH_EVENT;
-        case MotionEvent.ACTION_UP:
-            if (size > mEventSize) mEventSize = size;
-            return (mEventSize > CHEEK_THRESHOLD) ? CHEEK_EVENT : TOUCH_UP_EVENT;
-        case MotionEvent.ACTION_MOVE:
-            final int N = ev.getHistorySize();
-            if (size > mEventSize) mEventSize = size;
-            if (mEventSize > CHEEK_THRESHOLD) return CHEEK_EVENT;
-            for (int i=0; i<N; i++) {
-                size = ev.getHistoricalSize(i);
-                if (size > mEventSize) mEventSize = size;
-                if (mEventSize > CHEEK_THRESHOLD) return CHEEK_EVENT;
-            }
-            if (ev.getEventTime() < ev.getDownTime() + EVENT_IGNORE_DURATION) {
-                return TOUCH_EVENT;
-            } else {
-                return LONG_TOUCH_EVENT;
-            }
-        default:
-            // not good
-            return OTHER_EVENT;
-        }
-    }
-
-    /**
-     * @return Returns true if event was dispatched, false if it was dropped for any reason
-     */
-    private int dispatchPointer(QueuedEvent qev, MotionEvent ev, int pid, int uid) {
-        if (DEBUG_INPUT || WindowManagerPolicy.WATCH_POINTER) Slog.v(TAG,
-                "dispatchPointer " + ev);
-
-        if (MEASURE_LATENCY) {
-            lt.sample("3 Wait for last dispatch ", System.nanoTime() - qev.whenNano);
-        }
-
-        Object targetObj = mKeyWaiter.waitForNextEventTarget(null, qev,
-                ev, true, false, pid, uid);
-
-        if (MEASURE_LATENCY) {
-            lt.sample("3 Last dispatch finished ", System.nanoTime() - qev.whenNano);
-        }
-
-        int action = ev.getAction();
-
-        if (action == MotionEvent.ACTION_UP) {
-            // let go of our target
-            mKeyWaiter.mMotionTarget = null;
-            mPowerManager.logPointerUpEvent();
-        } else if (action == MotionEvent.ACTION_DOWN) {
-            mPowerManager.logPointerDownEvent();
-        }
-
-        if (targetObj == null) {
-            // In this case we are either dropping the event, or have received
-            // a move or up without a down.  It is common to receive move
-            // events in such a way, since this means the user is moving the
-            // pointer without actually pressing down.  All other cases should
-            // be atypical, so let's log them.
-            if (action != MotionEvent.ACTION_MOVE) {
-                Slog.w(TAG, "No window to dispatch pointer action " + ev.getAction());
-            }
-            synchronized (mWindowMap) {
-                dispatchPointerElsewhereLocked(null, null, ev, ev.getEventTime(), true);
-            }
-            if (qev != null) {
-                mQueue.recycleEvent(qev);
-            }
-            ev.recycle();
-            return INJECT_FAILED;
-        }
-        if (targetObj == mKeyWaiter.CONSUMED_EVENT_TOKEN) {
-            synchronized (mWindowMap) {
-                dispatchPointerElsewhereLocked(null, null, ev, ev.getEventTime(), true);
-            }
-            if (qev != null) {
-                mQueue.recycleEvent(qev);
-            }
-            ev.recycle();
-            return INJECT_SUCCEEDED;
-        }
-
-        WindowState target = (WindowState)targetObj;
-
-        final long eventTime = ev.getEventTime();
-        final long eventTimeNano = ev.getEventTimeNano();
-
-        //Slog.i(TAG, "Sending " + ev + " to " + target);
-
-        if (uid != 0 && uid != target.mSession.mUid) {
-            if (mContext.checkPermission(
-                    android.Manifest.permission.INJECT_EVENTS, pid, uid)
-                    != PackageManager.PERMISSION_GRANTED) {
-                Slog.w(TAG, "Permission denied: injecting pointer event from pid "
-                        + pid + " uid " + uid + " to window " + target
-                        + " owned by uid " + target.mSession.mUid);
-                if (qev != null) {
-                    mQueue.recycleEvent(qev);
-                }
-                ev.recycle();
-                return INJECT_NO_PERMISSION;
-            }
-        }
-
-        if (MEASURE_LATENCY) {
-            lt.sample("4 in dispatchPointer     ", System.nanoTime() - eventTimeNano);
-        }
-
-        if ((target.mAttrs.flags &
-                        WindowManager.LayoutParams.FLAG_IGNORE_CHEEK_PRESSES) != 0) {
-            //target wants to ignore fat touch events
-            boolean cheekPress = mPolicy.isCheekPressedAgainstScreen(ev);
-            //explicit flag to return without processing event further
-            boolean returnFlag = false;
-            if((action == MotionEvent.ACTION_DOWN)) {
-                mFatTouch = false;
-                if(cheekPress) {
-                    mFatTouch = true;
-                    returnFlag = true;
-                }
-            } else {
-                if(action == MotionEvent.ACTION_UP) {
-                    if(mFatTouch) {
-                        //earlier even was invalid doesnt matter if current up is cheekpress or not
-                        mFatTouch = false;
-                        returnFlag = true;
-                    } else if(cheekPress) {
-                        //cancel the earlier event
-                        ev.setAction(MotionEvent.ACTION_CANCEL);
-                        action = MotionEvent.ACTION_CANCEL;
-                    }
-                } else if(action == MotionEvent.ACTION_MOVE) {
-                    if(mFatTouch) {
-                        //two cases here
-                        //an invalid down followed by 0 or moves(valid or invalid)
-                        //a valid down,  invalid move, more moves. want to ignore till up
-                        returnFlag = true;
-                    } else if(cheekPress) {
-                        //valid down followed by invalid moves
-                        //an invalid move have to cancel earlier action
-                        ev.setAction(MotionEvent.ACTION_CANCEL);
-                        action = MotionEvent.ACTION_CANCEL;
-                        if (DEBUG_INPUT) Slog.v(TAG, "Sending cancel for invalid ACTION_MOVE");
-                        //note that the subsequent invalid moves will not get here
-                        mFatTouch = true;
-                    }
-                }
-            } //else if action
-            if(returnFlag) {
-                //recycle que, ev
-                if (qev != null) {
-                    mQueue.recycleEvent(qev);
-                }
-                ev.recycle();
-                return INJECT_FAILED;
-            }
-        } //end if target
-
-        // Enable this for testing the "right" value
-        if (false && action == MotionEvent.ACTION_DOWN) {
-            int max_events_per_sec = 35;
-            try {
-                max_events_per_sec = Integer.parseInt(SystemProperties
-                        .get("windowsmgr.max_events_per_sec"));
-                if (max_events_per_sec < 1) {
-                    max_events_per_sec = 35;
-                }
-            } catch (NumberFormatException e) {
-            }
-            mMinWaitTimeBetweenTouchEvents = 1000 / max_events_per_sec;
-        }
-
-        /*
-         * Throttle events to minimize CPU usage when there's a flood of events
-         * e.g. constant contact with the screen
+        // Temporary list of windows information to provide to the input dispatcher.
+        private InputWindowList mTempInputWindows = new InputWindowList();
+        
+        // Temporary input application object to provide to the input dispatcher.
+        private InputApplication mTempInputApplication = new InputApplication();
+        
+        /* Notifies the window manager about a broken input channel.
+         * 
+         * Called by the InputManager.
          */
-        if (action == MotionEvent.ACTION_MOVE) {
-            long nextEventTime = mLastTouchEventTime + mMinWaitTimeBetweenTouchEvents;
-            long now = SystemClock.uptimeMillis();
-            if (now < nextEventTime) {
+        public void notifyInputChannelBroken(InputChannel inputChannel) {
+            synchronized (mWindowMap) {
+                WindowState windowState = getWindowStateForInputChannelLocked(inputChannel);
+                if (windowState == null) {
+                    return; // irrelevant
+                }
+                
+                Slog.i(TAG, "WINDOW DIED " + windowState);
+                removeWindowLocked(windowState.mSession, windowState);
+            }
+        }
+        
+        /* Notifies the window manager about an input channel that is not responding.
+         * The method can either cause dispatching to be aborted by returning -2 or
+         * return a new timeout in nanoseconds.
+         * 
+         * Called by the InputManager.
+         */
+        public long notifyInputChannelANR(InputChannel inputChannel) {
+            AppWindowToken token;
+            synchronized (mWindowMap) {
+                WindowState windowState = getWindowStateForInputChannelLocked(inputChannel);
+                if (windowState == null) {
+                    return -2; // irrelevant, abort dispatching (-2)
+                }
+                
+                Slog.i(TAG, "Input event dispatching timed out sending to "
+                        + windowState.mAttrs.getTitle());
+                token = windowState.mAppToken;
+            }
+            
+            return notifyANRInternal(token);
+        }
+    
+        /* Notifies the window manager about an input channel spontaneously recovering from ANR
+         * by successfully delivering the event that originally timed out.
+         * 
+         * Called by the InputManager.
+         */
+        public void notifyInputChannelRecoveredFromANR(InputChannel inputChannel) {
+            // Nothing to do just now.
+            // Just wait for the user to dismiss the ANR dialog.
+        }
+        
+        /* Notifies the window manager about an application that is not responding
+         * in general rather than with respect to a particular input channel.
+         * The method can either cause dispatching to be aborted by returning -2 or
+         * return a new timeout in nanoseconds.
+         * 
+         * Called by the InputManager.
+         */
+        public long notifyANR(Object token) {
+            AppWindowToken appWindowToken = (AppWindowToken) token;
+
+            Slog.i(TAG, "Input event dispatching timed out sending to application "
+                    + appWindowToken.stringName);
+            return notifyANRInternal(appWindowToken);
+        }
+        
+        private long notifyANRInternal(AppWindowToken token) {
+            if (token != null && token.appToken != null) {
                 try {
-                    Thread.sleep(nextEventTime - now);
-                } catch (InterruptedException e) {
+                    // Notify the activity manager about the timeout and let it decide whether
+                    // to abort dispatching or keep waiting.
+                    boolean abort = token.appToken.keyDispatchingTimedOut();
+                    if (! abort) {
+                        // The activity manager declined to abort dispatching.
+                        // Wait a bit longer and timeout again later.
+                        return token.inputDispatchingTimeoutNanos;
+                    }
+                } catch (RemoteException ex) {
                 }
-                mLastTouchEventTime = nextEventTime;
-            } else {
-                mLastTouchEventTime = now;
+            }
+            return -2; // abort dispatching
+        }
+        
+        private WindowState getWindowStateForInputChannel(InputChannel inputChannel) {
+            synchronized (mWindowMap) {
+                return getWindowStateForInputChannelLocked(inputChannel);
             }
         }
-
-        if (MEASURE_LATENCY) {
-            lt.sample("5 in dispatchPointer     ", System.nanoTime() - eventTimeNano);
-        }
-
-        synchronized(mWindowMap) {
-            if (!target.isVisibleLw()) {
-                // During this motion dispatch, the target window has become
-                // invisible.
-                dispatchPointerElsewhereLocked(null, null, ev, ev.getEventTime(), false);
-                if (qev != null) {
-                    mQueue.recycleEvent(qev);
+        
+        private WindowState getWindowStateForInputChannelLocked(InputChannel inputChannel) {
+            int windowCount = mWindows.size();
+            for (int i = 0; i < windowCount; i++) {
+                WindowState windowState = mWindows.get(i);
+                if (windowState.mInputChannel == inputChannel) {
+                    return windowState;
                 }
-                ev.recycle();
-                return INJECT_SUCCEEDED;
             }
-
-            if (qev != null && action == MotionEvent.ACTION_MOVE) {
-                mKeyWaiter.bindTargetWindowLocked(target,
-                        KeyWaiter.RETURN_PENDING_POINTER, qev);
-                ev = null;
-            } else {
-                if (action == MotionEvent.ACTION_DOWN) {
-                    WindowState out = mKeyWaiter.mOutsideTouchTargets;
-                    if (out != null) {
-                        MotionEvent oev = MotionEvent.obtain(ev);
-                        oev.setAction(MotionEvent.ACTION_OUTSIDE);
-                        do {
-                            final Rect frame = out.mFrame;
-                            oev.offsetLocation(-(float)frame.left, -(float)frame.top);
-                            try {
-                                out.mClient.dispatchPointer(oev, eventTime, false);
-                            } catch (android.os.RemoteException e) {
-                                Slog.i(TAG, "WINDOW DIED during outside motion dispatch: " + out);
-                            }
-                            oev.offsetLocation((float)frame.left, (float)frame.top);
-                            out = out.mNextOutsideTouch;
-                        } while (out != null);
-                        mKeyWaiter.mOutsideTouchTargets = null;
+            
+            return null;
+        }
+        
+        /* Updates the cached window information provided to the input dispatcher. */
+        public void updateInputWindowsLw() {
+            // Populate the input window list with information about all of the windows that
+            // could potentially receive input.
+            // As an optimization, we could try to prune the list of windows but this turns
+            // out to be difficult because only the native code knows for sure which window
+            // currently has touch focus.
+            final ArrayList<WindowState> windows = mWindows;
+            final int N = windows.size();
+            for (int i = N - 1; i >= 0; i--) {
+                final WindowState child = windows.get(i);
+                if (child.mInputChannel == null || child.mRemoved) {
+                    // Skip this window because it cannot possibly receive input.
+                    continue;
+                }
+                
+                final int flags = child.mAttrs.flags;
+                final int type = child.mAttrs.type;
+                
+                final boolean hasFocus = (child == mInputFocus);
+                final boolean isVisible = child.isVisibleLw();
+                final boolean hasWallpaper = (child == mWallpaperTarget)
+                        && (type != WindowManager.LayoutParams.TYPE_KEYGUARD);
+                
+                // Add a window to our list of input windows.
+                final InputWindow inputWindow = mTempInputWindows.add();
+                inputWindow.inputChannel = child.mInputChannel;
+                inputWindow.layoutParamsFlags = flags;
+                inputWindow.layoutParamsType = type;
+                inputWindow.dispatchingTimeoutNanos = child.getInputDispatchingTimeoutNanos();
+                inputWindow.visible = isVisible;
+                inputWindow.hasFocus = hasFocus;
+                inputWindow.hasWallpaper = hasWallpaper;
+                inputWindow.paused = child.mAppToken != null ? child.mAppToken.paused : false;
+                inputWindow.ownerPid = child.mSession.mPid;
+                inputWindow.ownerUid = child.mSession.mUid;
+                
+                final Rect frame = child.mFrame;
+                inputWindow.frameLeft = frame.left;
+                inputWindow.frameTop = frame.top;
+                
+                switch (child.mTouchableInsets) {
+                    default:
+                    case ViewTreeObserver.InternalInsetsInfo.TOUCHABLE_INSETS_FRAME:
+                        inputWindow.touchableAreaLeft = frame.left;
+                        inputWindow.touchableAreaTop = frame.top;
+                        inputWindow.touchableAreaRight = frame.right;
+                        inputWindow.touchableAreaBottom = frame.bottom;
+                        break;
+                        
+                    case ViewTreeObserver.InternalInsetsInfo.TOUCHABLE_INSETS_CONTENT: {
+                        Rect inset = child.mGivenContentInsets;
+                        inputWindow.touchableAreaLeft = frame.left + inset.left;
+                        inputWindow.touchableAreaTop = frame.top + inset.top;
+                        inputWindow.touchableAreaRight = frame.right - inset.right;
+                        inputWindow.touchableAreaBottom = frame.bottom - inset.bottom;
+                        break;
+                    }
+                        
+                    case ViewTreeObserver.InternalInsetsInfo.TOUCHABLE_INSETS_VISIBLE: {
+                        Rect inset = child.mGivenVisibleInsets;
+                        inputWindow.touchableAreaLeft = frame.left + inset.left;
+                        inputWindow.touchableAreaTop = frame.top + inset.top;
+                        inputWindow.touchableAreaRight = frame.right - inset.right;
+                        inputWindow.touchableAreaBottom = frame.bottom - inset.bottom;
+                        break;
                     }
                 }
+            }
 
-                dispatchPointerElsewhereLocked(target, null, ev, ev.getEventTime(), false);
-
-                final Rect frame = target.mFrame;
-                ev.offsetLocation(-(float)frame.left, -(float)frame.top);
-                mKeyWaiter.bindTargetWindowLocked(target);
+            // Send windows to native code.
+            mInputManager.setInputWindows(mTempInputWindows.toNullTerminatedArray());
+            
+            // Clear the list in preparation for the next round.
+            // Also avoids keeping InputChannel objects referenced unnecessarily.
+            mTempInputWindows.clear();
+        }
+        
+        /* Provides feedback for a virtual key down. */
+        public void virtualKeyDownFeedback() {
+            synchronized (mWindowMap) {
+                mPolicy.performHapticFeedbackLw(null, HapticFeedbackConstants.VIRTUAL_KEY, false);
             }
         }
-
-        // finally offset the event to the target's coordinate system and
-        // dispatch the event.
-        try {
-            if (DEBUG_INPUT || DEBUG_FOCUS || WindowManagerPolicy.WATCH_POINTER) {
-                Slog.v(TAG, "Delivering pointer " + qev + " to " + target);
-            }
-
-            if (MEASURE_LATENCY) {
-                lt.sample("6 before svr->client ipc ", System.nanoTime() - eventTimeNano);
-            }
-
-            target.mClient.dispatchPointer(ev, eventTime, true);
-
-            if (MEASURE_LATENCY) {
-                lt.sample("7 after  svr->client ipc ", System.nanoTime() - eventTimeNano);
-            }
-            return INJECT_SUCCEEDED;
-        } catch (android.os.RemoteException e) {
-            Slog.i(TAG, "WINDOW DIED during motion dispatch: " + target);
-            mKeyWaiter.mMotionTarget = null;
-            try {
-                removeWindow(target.mSession, target.mClient);
-            } catch (java.util.NoSuchElementException ex) {
-                // This will happen if the window has already been
-                // removed.
-            }
+        
+        /* Notifies that an app switch key (BACK / HOME) has just been pressed.
+         * This essentially starts a .5 second timeout for the application to process
+         * subsequent input events while waiting for the app switch to occur.  If it takes longer
+         * than this, the pending events will be dropped.
+         */
+        public void notifyAppSwitchComing() {
+            // TODO Not implemented yet.  Should go in the native side.
         }
-        return INJECT_FAILED;
-    }
-
-    /**
-     * @return Returns true if event was dispatched, false if it was dropped for any reason
-     */
-    private int dispatchTrackball(QueuedEvent qev, MotionEvent ev, int pid, int uid) {
-        if (DEBUG_INPUT) Slog.v(
-                TAG, "dispatchTrackball [" + ev.getAction() +"] <" + ev.getX() + ", " + ev.getY() + ">");
-
-        Object focusObj = mKeyWaiter.waitForNextEventTarget(null, qev,
-                ev, false, false, pid, uid);
-        if (focusObj == null) {
-            Slog.w(TAG, "No focus window, dropping trackball: " + ev);
-            if (qev != null) {
-                mQueue.recycleEvent(qev);
-            }
-            ev.recycle();
-            return INJECT_FAILED;
+        
+        /* Notifies that the lid switch changed state. */
+        public void notifyLidSwitchChanged(long whenNanos, boolean lidOpen) {
+            mPolicy.notifyLidSwitchChanged(whenNanos, lidOpen);
         }
-        if (focusObj == mKeyWaiter.CONSUMED_EVENT_TOKEN) {
-            if (qev != null) {
-                mQueue.recycleEvent(qev);
-            }
-            ev.recycle();
-            return INJECT_SUCCEEDED;
+        
+        /* Provides an opportunity for the window manager policy to intercept early key
+         * processing as soon as the key has been read from the device. */
+        public int interceptKeyBeforeQueueing(long whenNanos, int keyCode, boolean down,
+                int policyFlags, boolean isScreenOn) {
+            return mPolicy.interceptKeyBeforeQueueing(whenNanos,
+                    keyCode, down, policyFlags, isScreenOn);
         }
+        
+        /* Provides an opportunity for the window manager policy to process a key before
+         * ordinary dispatch. */
+        public boolean interceptKeyBeforeDispatching(InputChannel focus,
+                int action, int flags, int keyCode, int metaState, int repeatCount,
+                int policyFlags) {
+            WindowState windowState = getWindowStateForInputChannel(focus);
+            return mPolicy.interceptKeyBeforeDispatching(windowState, action, flags,
+                    keyCode, metaState, repeatCount, policyFlags);
+        }
+        
+        /* Called when the current input focus changes.
+         * Layer assignment is assumed to be complete by the time this is called.
+         */
+        public void setInputFocusLw(WindowState newWindow) {
+            if (DEBUG_INPUT) {
+                Slog.d(TAG, "Input focus has changed to " + newWindow);
+            }
 
-        WindowState focus = (WindowState)focusObj;
-
-        if (uid != 0 && uid != focus.mSession.mUid) {
-            if (mContext.checkPermission(
-                    android.Manifest.permission.INJECT_EVENTS, pid, uid)
-                    != PackageManager.PERMISSION_GRANTED) {
-                Slog.w(TAG, "Permission denied: injecting key event from pid "
-                        + pid + " uid " + uid + " to window " + focus
-                        + " owned by uid " + focus.mSession.mUid);
-                if (qev != null) {
-                    mQueue.recycleEvent(qev);
+            if (newWindow != mInputFocus) {
+                if (newWindow != null && newWindow.canReceiveKeys()) {
+                    // If the new input focus is an error window or appears above the current
+                    // input focus, preempt any pending synchronous dispatch so that we can
+                    // start delivering events to the new input focus as soon as possible.
+                    if ((newWindow.mAttrs.flags & FLAG_SYSTEM_ERROR) != 0) {
+                        if (DEBUG_INPUT) {
+                            Slog.v(TAG, "New SYSTEM_ERROR window; resetting state");
+                        }
+                        preemptInputDispatchLw();
+                    } else if (mInputFocus != null && newWindow.mLayer > mInputFocus.mLayer) {
+                        if (DEBUG_INPUT) {
+                            Slog.v(TAG, "Transferring focus to new window at higher layer: "
+                                    + "old win layer=" + mInputFocus.mLayer
+                                    + ", new win layer=" + newWindow.mLayer);
+                        }
+                        preemptInputDispatchLw();
+                    }
+                    
+                    // Displaying a window implicitly causes dispatching to be unpaused.
+                    // This is to protect against bugs if someone pauses dispatching but
+                    // forgets to resume.
+                    newWindow.mToken.paused = false;
                 }
-                ev.recycle();
-                return INJECT_NO_PERMISSION;
+            
+                mInputFocus = newWindow;
+                updateInputWindowsLw();
             }
         }
-
-        final long eventTime = ev.getEventTime();
-
-        synchronized(mWindowMap) {
-            if (qev != null && ev.getAction() == MotionEvent.ACTION_MOVE) {
-                mKeyWaiter.bindTargetWindowLocked(focus,
-                        KeyWaiter.RETURN_PENDING_TRACKBALL, qev);
-                // We don't deliver movement events to the client, we hold
-                // them and wait for them to call back.
-                ev = null;
+        
+        /* Tells the dispatcher to stop waiting for its current synchronous event targets.
+         * Essentially, just makes those dispatches asynchronous so a new dispatch cycle
+         * can begin.
+         */
+        private void preemptInputDispatchLw() {
+            mInputManager.preemptInputDispatch();
+        }
+        
+        public void setFocusedAppLw(AppWindowToken newApp) {
+            // Focused app has changed.
+            if (newApp == null) {
+                mInputManager.setFocusedApplication(null);
             } else {
-                mKeyWaiter.bindTargetWindowLocked(focus);
+                mTempInputApplication.name = newApp.toString();
+                mTempInputApplication.dispatchingTimeoutNanos =
+                        newApp.inputDispatchingTimeoutNanos;
+                mTempInputApplication.token = newApp;
+                
+                mInputManager.setFocusedApplication(mTempInputApplication);
             }
         }
-
-        try {
-            focus.mClient.dispatchTrackball(ev, eventTime, true);
-            return INJECT_SUCCEEDED;
-        } catch (android.os.RemoteException e) {
-            Slog.i(TAG, "WINDOW DIED during key dispatch: " + focus);
-            try {
-                removeWindow(focus.mSession, focus.mClient);
-            } catch (java.util.NoSuchElementException ex) {
-                // This will happen if the window has already been
-                // removed.
+        
+        public void pauseDispatchingLw(WindowToken window) {
+            if (! window.paused) {
+                if (DEBUG_INPUT) {
+                    Slog.v(TAG, "Pausing WindowToken " + window);
+                }
+                
+                window.paused = true;
+                updateInputWindowsLw();
             }
         }
-
-        return INJECT_FAILED;
-    }
-
-    /**
-     * @return Returns true if event was dispatched, false if it was dropped for any reason
-     */
-    private int dispatchKey(KeyEvent event, int pid, int uid) {
-        if (DEBUG_INPUT) Slog.v(TAG, "Dispatch key: " + event);
-
-        Object focusObj = mKeyWaiter.waitForNextEventTarget(event, null,
-                null, false, false, pid, uid);
-        if (focusObj == null) {
-            Slog.w(TAG, "No focus window, dropping: " + event);
-            return INJECT_FAILED;
-        }
-        if (focusObj == mKeyWaiter.CONSUMED_EVENT_TOKEN) {
-            return INJECT_SUCCEEDED;
-        }
-
-        // Okay we have finished waiting for the last event to be processed.
-        // First off, if this is a repeat event, check to see if there is
-        // a corresponding up event in the queue.  If there is, we will
-        // just drop the repeat, because it makes no sense to repeat after
-        // the user has released a key.  (This is especially important for
-        // long presses.)
-        if (event.getRepeatCount() > 0 && mQueue.hasKeyUpEvent(event)) {
-            return INJECT_SUCCEEDED;
-        }
-
-        WindowState focus = (WindowState)focusObj;
-
-        if (DEBUG_INPUT) Slog.v(
-            TAG, "Dispatching to " + focus + ": " + event);
-
-        if (uid != 0 && uid != focus.mSession.mUid) {
-            if (mContext.checkPermission(
-                    android.Manifest.permission.INJECT_EVENTS, pid, uid)
-                    != PackageManager.PERMISSION_GRANTED) {
-                Slog.w(TAG, "Permission denied: injecting key event from pid "
-                        + pid + " uid " + uid + " to window " + focus
-                        + " owned by uid " + focus.mSession.mUid);
-                return INJECT_NO_PERMISSION;
+        
+        public void resumeDispatchingLw(WindowToken window) {
+            if (window.paused) {
+                if (DEBUG_INPUT) {
+                    Slog.v(TAG, "Resuming WindowToken " + window);
+                }
+                
+                window.paused = false;
+                updateInputWindowsLw();
             }
         }
-
-        synchronized(mWindowMap) {
-            mKeyWaiter.bindTargetWindowLocked(focus);
-        }
-
-        // NOSHIP extra state logging
-        mKeyWaiter.recordDispatchState(event, focus);
-        // END NOSHIP
-
-        try {
-            if (DEBUG_INPUT || DEBUG_FOCUS) {
-                Slog.v(TAG, "Delivering key " + event.getKeyCode()
-                        + " to " + focus);
-            }
-            focus.mClient.dispatchKey(event);
-            return INJECT_SUCCEEDED;
-        } catch (android.os.RemoteException e) {
-            Slog.i(TAG, "WINDOW DIED during key dispatch: " + focus);
-            try {
-                removeWindow(focus.mSession, focus.mClient);
-            } catch (java.util.NoSuchElementException ex) {
-                // This will happen if the window has already been
-                // removed.
+        
+        public void freezeInputDispatchingLw() {
+            if (! mInputDispatchFrozen) {
+                if (DEBUG_INPUT) {
+                    Slog.v(TAG, "Freezing input dispatching");
+                }
+                
+                mInputDispatchFrozen = true;
+                updateInputDispatchModeLw();
             }
         }
-
-        return INJECT_FAILED;
+        
+        public void thawInputDispatchingLw() {
+            if (mInputDispatchFrozen) {
+                if (DEBUG_INPUT) {
+                    Slog.v(TAG, "Thawing input dispatching");
+                }
+                
+                mInputDispatchFrozen = false;
+                updateInputDispatchModeLw();
+            }
+        }
+        
+        public void setEventDispatchingLw(boolean enabled) {
+            if (mInputDispatchEnabled != enabled) {
+                if (DEBUG_INPUT) {
+                    Slog.v(TAG, "Setting event dispatching to " + enabled);
+                }
+                
+                mInputDispatchEnabled = enabled;
+                updateInputDispatchModeLw();
+            }
+        }
+        
+        private void updateInputDispatchModeLw() {
+            mInputManager.setInputDispatchMode(mInputDispatchEnabled, mInputDispatchFrozen);
+        }
     }
 
     public void pauseKeyDispatching(IBinder _token) {
@@ -5437,7 +5350,7 @@
         synchronized (mWindowMap) {
             WindowToken token = mTokenMap.get(_token);
             if (token != null) {
-                mKeyWaiter.pauseDispatchingLocked(token);
+                mInputMonitor.pauseDispatchingLw(token);
             }
         }
     }
@@ -5451,7 +5364,7 @@
         synchronized (mWindowMap) {
             WindowToken token = mTokenMap.get(_token);
             if (token != null) {
-                mKeyWaiter.resumeDispatchingLocked(token);
+                mInputMonitor.resumeDispatchingLw(token);
             }
         }
     }
@@ -5463,7 +5376,7 @@
         }
 
         synchronized (mWindowMap) {
-            mKeyWaiter.setEventDispatchingLocked(enabled);
+            mInputMonitor.setEventDispatchingLw(enabled);
         }
     }
 
@@ -5485,29 +5398,27 @@
         int metaState = ev.getMetaState();
         int deviceId = ev.getDeviceId();
         int scancode = ev.getScanCode();
+        int source = ev.getSource();
+        
+        if (source == InputDevice.SOURCE_UNKNOWN) {
+            source = InputDevice.SOURCE_KEYBOARD;
+        }
 
         if (eventTime == 0) eventTime = SystemClock.uptimeMillis();
         if (downTime == 0) downTime = eventTime;
 
         KeyEvent newEvent = new KeyEvent(downTime, eventTime, action, code, repeatCount, metaState,
-                deviceId, scancode, KeyEvent.FLAG_FROM_SYSTEM);
+                deviceId, scancode, KeyEvent.FLAG_FROM_SYSTEM, source);
 
         final int pid = Binder.getCallingPid();
         final int uid = Binder.getCallingUid();
         final long ident = Binder.clearCallingIdentity();
-        final int result = dispatchKey(newEvent, pid, uid);
-        if (sync) {
-            mKeyWaiter.waitForNextEventTarget(null, null, null, false, true, pid, uid);
-        }
+        
+        final int result = mInputManager.injectKeyEvent(newEvent,
+                pid, uid, sync, INJECTION_TIMEOUT_MILLIS);
+        
         Binder.restoreCallingIdentity(ident);
-        switch (result) {
-            case INJECT_NO_PERMISSION:
-                throw new SecurityException(
-                        "Injecting to another application requires INJECT_EVENTS permission");
-            case INJECT_SUCCEEDED:
-                return true;
-        }
-        return false;
+        return reportInjectionResult(result);
     }
 
     /**
@@ -5523,19 +5434,17 @@
         final int pid = Binder.getCallingPid();
         final int uid = Binder.getCallingUid();
         final long ident = Binder.clearCallingIdentity();
-        final int result = dispatchPointer(null, ev, pid, uid);
-        if (sync) {
-            mKeyWaiter.waitForNextEventTarget(null, null, null, false, true, pid, uid);
+        
+        MotionEvent newEvent = MotionEvent.obtain(ev);
+        if ((newEvent.getSource() & InputDevice.SOURCE_CLASS_POINTER) == 0) {
+            newEvent.setSource(InputDevice.SOURCE_TOUCHSCREEN);
         }
+        
+        final int result = mInputManager.injectMotionEvent(newEvent,
+                pid, uid, sync, INJECTION_TIMEOUT_MILLIS);
+        
         Binder.restoreCallingIdentity(ident);
-        switch (result) {
-            case INJECT_NO_PERMISSION:
-                throw new SecurityException(
-                        "Injecting to another application requires INJECT_EVENTS permission");
-            case INJECT_SUCCEEDED:
-                return true;
-        }
-        return false;
+        return reportInjectionResult(result);
     }
 
     /**
@@ -5551,19 +5460,36 @@
         final int pid = Binder.getCallingPid();
         final int uid = Binder.getCallingUid();
         final long ident = Binder.clearCallingIdentity();
-        final int result = dispatchTrackball(null, ev, pid, uid);
-        if (sync) {
-            mKeyWaiter.waitForNextEventTarget(null, null, null, false, true, pid, uid);
+        
+        MotionEvent newEvent = MotionEvent.obtain(ev);
+        if ((newEvent.getSource() & InputDevice.SOURCE_CLASS_TRACKBALL) == 0) {
+            newEvent.setSource(InputDevice.SOURCE_TRACKBALL);
         }
+        
+        final int result = mInputManager.injectMotionEvent(newEvent,
+                pid, uid, sync, INJECTION_TIMEOUT_MILLIS);
+        
         Binder.restoreCallingIdentity(ident);
+        return reportInjectionResult(result);
+    }
+    
+    private boolean reportInjectionResult(int result) {
         switch (result) {
-            case INJECT_NO_PERMISSION:
+            case InputManager.INPUT_EVENT_INJECTION_PERMISSION_DENIED:
+                Slog.w(TAG, "Input event injection permission denied.");
                 throw new SecurityException(
                         "Injecting to another application requires INJECT_EVENTS permission");
-            case INJECT_SUCCEEDED:
+            case InputManager.INPUT_EVENT_INJECTION_SUCCEEDED:
+                Slog.v(TAG, "Input event injection succeeded.");
                 return true;
+            case InputManager.INPUT_EVENT_INJECTION_TIMED_OUT:
+                Slog.w(TAG, "Input event injection timed out.");
+                return false;
+            case InputManager.INPUT_EVENT_INJECTION_FAILED:
+            default:
+                Slog.w(TAG, "Input event injection failed.");
+                return false;
         }
-        return false;
     }
 
     private WindowState getFocusedWindow() {
@@ -5576,888 +5502,6 @@
         return mCurrentFocus;
     }
 
-    /**
-     * This class holds the state for dispatching key events.  This state
-     * is protected by the KeyWaiter instance, NOT by the window lock.  You
-     * can be holding the main window lock while acquire the KeyWaiter lock,
-     * but not the other way around.
-     */
-    final class KeyWaiter {
-        // NOSHIP debugging
-        public class DispatchState {
-            private KeyEvent event;
-            private WindowState focus;
-            private long time;
-            private WindowState lastWin;
-            private IBinder lastBinder;
-            private boolean finished;
-            private boolean gotFirstWindow;
-            private boolean eventDispatching;
-            private long timeToSwitch;
-            private boolean wasFrozen;
-            private boolean focusPaused;
-            private WindowState curFocus;
-
-            DispatchState(KeyEvent theEvent, WindowState theFocus) {
-                focus = theFocus;
-                event = theEvent;
-                time = System.currentTimeMillis();
-                // snapshot KeyWaiter state
-                lastWin = mLastWin;
-                lastBinder = mLastBinder;
-                finished = mFinished;
-                gotFirstWindow = mGotFirstWindow;
-                eventDispatching = mEventDispatching;
-                timeToSwitch = mTimeToSwitch;
-                wasFrozen = mWasFrozen;
-                curFocus = mCurrentFocus;
-                // cache the paused state at ctor time as well
-                if (theFocus == null || theFocus.mToken == null) {
-                    focusPaused = false;
-                } else {
-                    focusPaused = theFocus.mToken.paused;
-                }
-            }
-
-            public String toString() {
-                return "{{" + event + " to " + focus + " @ " + time
-                        + " lw=" + lastWin + " lb=" + lastBinder
-                        + " fin=" + finished + " gfw=" + gotFirstWindow
-                        + " ed=" + eventDispatching + " tts=" + timeToSwitch
-                        + " wf=" + wasFrozen + " fp=" + focusPaused
-                        + " mcf=" + curFocus + "}}";
-            }
-        };
-        private DispatchState mDispatchState = null;
-        public void recordDispatchState(KeyEvent theEvent, WindowState theFocus) {
-            mDispatchState = new DispatchState(theEvent, theFocus);
-        }
-        // END NOSHIP
-
-        public static final int RETURN_NOTHING = 0;
-        public static final int RETURN_PENDING_POINTER = 1;
-        public static final int RETURN_PENDING_TRACKBALL = 2;
-
-        final Object SKIP_TARGET_TOKEN = new Object();
-        final Object CONSUMED_EVENT_TOKEN = new Object();
-
-        private WindowState mLastWin = null;
-        private IBinder mLastBinder = null;
-        private boolean mFinished = true;
-        private boolean mGotFirstWindow = false;
-        private boolean mEventDispatching = true;
-        private long mTimeToSwitch = 0;
-        /* package */ boolean mWasFrozen = false;
-
-        // Target of Motion events
-        WindowState mMotionTarget;
-
-        // Windows above the target who would like to receive an "outside"
-        // touch event for any down events outside of them.
-        WindowState mOutsideTouchTargets;
-
-        /**
-         * Wait for the last event dispatch to complete, then find the next
-         * target that should receive the given event and wait for that one
-         * to be ready to receive it.
-         */
-        Object waitForNextEventTarget(KeyEvent nextKey, QueuedEvent qev,
-                MotionEvent nextMotion, boolean isPointerEvent,
-                boolean failIfTimeout, int callingPid, int callingUid) {
-            long startTime = SystemClock.uptimeMillis();
-            long keyDispatchingTimeout = 5 * 1000;
-            long waitedFor = 0;
-
-            while (true) {
-                // Figure out which window we care about.  It is either the
-                // last window we are waiting to have process the event or,
-                // if none, then the next window we think the event should go
-                // to.  Note: we retrieve mLastWin outside of the lock, so
-                // it may change before we lock.  Thus we must check it again.
-                WindowState targetWin = mLastWin;
-                boolean targetIsNew = targetWin == null;
-                if (DEBUG_INPUT) Slog.v(
-                        TAG, "waitForLastKey: mFinished=" + mFinished +
-                        ", mLastWin=" + mLastWin);
-                if (targetIsNew) {
-                    Object target = findTargetWindow(nextKey, qev, nextMotion,
-                            isPointerEvent, callingPid, callingUid);
-                    if (target == SKIP_TARGET_TOKEN) {
-                        // The user has pressed a special key, and we are
-                        // dropping all pending events before it.
-                        if (DEBUG_INPUT) Slog.v(TAG, "Skipping: " + nextKey
-                                + " " + nextMotion);
-                        return null;
-                    }
-                    if (target == CONSUMED_EVENT_TOKEN) {
-                        if (DEBUG_INPUT) Slog.v(TAG, "Consumed: " + nextKey
-                                + " " + nextMotion);
-                        return target;
-                    }
-                    targetWin = (WindowState)target;
-                }
-
-                AppWindowToken targetApp = null;
-
-                // Now: is it okay to send the next event to this window?
-                synchronized (this) {
-                    // First: did we come here based on the last window not
-                    // being null, but it changed by the time we got here?
-                    // If so, try again.
-                    if (!targetIsNew && mLastWin == null) {
-                        continue;
-                    }
-
-                    // We never dispatch events if not finished with the
-                    // last one, or the display is frozen.
-                    if (mFinished && !mDisplayFrozen) {
-                        // If event dispatching is disabled, then we
-                        // just consume the events.
-                        if (!mEventDispatching) {
-                            if (DEBUG_INPUT) Slog.v(TAG,
-                                    "Skipping event; dispatching disabled: "
-                                    + nextKey + " " + nextMotion);
-                            return null;
-                        }
-                        if (targetWin != null) {
-                            // If this is a new target, and that target is not
-                            // paused or unresponsive, then all looks good to
-                            // handle the event.
-                            if (targetIsNew && !targetWin.mToken.paused) {
-                                return targetWin;
-                            }
-
-                        // If we didn't find a target window, and there is no
-                        // focused app window, then just eat the events.
-                        } else if (mFocusedApp == null) {
-                            if (DEBUG_INPUT) Slog.v(TAG,
-                                    "Skipping event; no focused app: "
-                                    + nextKey + " " + nextMotion);
-                            return null;
-                        }
-                    }
-
-                    if (DEBUG_INPUT) Slog.v(
-                            TAG, "Waiting for last key in " + mLastBinder
-                            + " target=" + targetWin
-                            + " mFinished=" + mFinished
-                            + " mDisplayFrozen=" + mDisplayFrozen
-                            + " targetIsNew=" + targetIsNew
-                            + " paused="
-                            + (targetWin != null ? targetWin.mToken.paused : false)
-                            + " mFocusedApp=" + mFocusedApp
-                            + " mCurrentFocus=" + mCurrentFocus);
-
-                    targetApp = targetWin != null
-                            ? targetWin.mAppToken : mFocusedApp;
-
-                    long curTimeout = keyDispatchingTimeout;
-                    if (mTimeToSwitch != 0) {
-                        long now = SystemClock.uptimeMillis();
-                        if (mTimeToSwitch <= now) {
-                            // If an app switch key has been pressed, and we have
-                            // waited too long for the current app to finish
-                            // processing keys, then wait no more!
-                            doFinishedKeyLocked(false);
-                            continue;
-                        }
-                        long switchTimeout = mTimeToSwitch - now;
-                        if (curTimeout > switchTimeout) {
-                            curTimeout = switchTimeout;
-                        }
-                    }
-
-                    try {
-                        // after that continue
-                        // processing keys, so we don't get stuck.
-                        if (DEBUG_INPUT) Slog.v(
-                                TAG, "Waiting for key dispatch: " + curTimeout);
-                        wait(curTimeout);
-                        if (DEBUG_INPUT) Slog.v(TAG, "Finished waiting @"
-                                + SystemClock.uptimeMillis() + " startTime="
-                                + startTime + " switchTime=" + mTimeToSwitch
-                                + " target=" + targetWin + " mLW=" + mLastWin
-                                + " mLB=" + mLastBinder + " fin=" + mFinished
-                                + " mCurrentFocus=" + mCurrentFocus);
-                    } catch (InterruptedException e) {
-                    }
-                }
-
-                // If we were frozen during configuration change, restart the
-                // timeout checks from now; otherwise look at whether we timed
-                // out before awakening.
-                if (mWasFrozen) {
-                    waitedFor = 0;
-                    mWasFrozen = false;
-                } else {
-                    waitedFor = SystemClock.uptimeMillis() - startTime;
-                }
-
-                if (waitedFor >= keyDispatchingTimeout && mTimeToSwitch == 0) {
-                    IApplicationToken at = null;
-                    synchronized (this) {
-                        Slog.w(TAG, "Key dispatching timed out sending to " +
-                              (targetWin != null ? targetWin.mAttrs.getTitle()
-                              : "<null>: no window ready for key dispatch"));
-                        // NOSHIP debugging
-                        Slog.w(TAG, "Previous dispatch state: " + mDispatchState);
-                        Slog.w(TAG, "Current dispatch state: " +
-                                new DispatchState(nextKey, targetWin));
-                        // END NOSHIP
-                        //dump();
-                        if (targetWin != null) {
-                            at = targetWin.getAppToken();
-                        } else if (targetApp != null) {
-                            at = targetApp.appToken;
-                        }
-                    }
-
-                    boolean abort = true;
-                    if (at != null) {
-                        try {
-                            long timeout = at.getKeyDispatchingTimeout();
-                            if (timeout > waitedFor) {
-                                // we did not wait the proper amount of time for this application.
-                                // set the timeout to be the real timeout and wait again.
-                                keyDispatchingTimeout = timeout - waitedFor;
-                                continue;
-                            } else {
-                                abort = at.keyDispatchingTimedOut();
-                            }
-                        } catch (RemoteException ex) {
-                        }
-                    }
-
-                    synchronized (this) {
-                        if (abort && (mLastWin == targetWin || targetWin == null)) {
-                            mFinished = true;
-                            if (mLastWin != null) {
-                                if (DEBUG_INPUT) Slog.v(TAG,
-                                        "Window " + mLastWin +
-                                        " timed out on key input");
-                                if (mLastWin.mToken.paused) {
-                                    Slog.w(TAG, "Un-pausing dispatching to this window");
-                                    mLastWin.mToken.paused = false;
-                                }
-                            }
-                            if (mMotionTarget == targetWin) {
-                                mMotionTarget = null;
-                            }
-                            mLastWin = null;
-                            mLastBinder = null;
-                            if (failIfTimeout || targetWin == null) {
-                                return null;
-                            }
-                        } else {
-                            Slog.w(TAG, "Continuing to wait for key to be dispatched");
-                            startTime = SystemClock.uptimeMillis();
-                        }
-                    }
-                }
-            }
-        }
-
-        Object findTargetWindow(KeyEvent nextKey, QueuedEvent qev,
-                MotionEvent nextMotion, boolean isPointerEvent,
-                int callingPid, int callingUid) {
-            mOutsideTouchTargets = null;
-
-            if (nextKey != null) {
-                // Find the target window for a normal key event.
-                final int keycode = nextKey.getKeyCode();
-                final int repeatCount = nextKey.getRepeatCount();
-                final boolean down = nextKey.getAction() != KeyEvent.ACTION_UP;
-                boolean dispatch = mKeyWaiter.checkShouldDispatchKey(keycode);
-
-                if (!dispatch) {
-                    if (callingUid == 0 ||
-                            mContext.checkPermission(
-                                    android.Manifest.permission.INJECT_EVENTS,
-                                    callingPid, callingUid)
-                                    == PackageManager.PERMISSION_GRANTED) {
-                        mPolicy.interceptKeyTi(null, keycode,
-                                nextKey.getMetaState(), down, repeatCount,
-                                nextKey.getFlags());
-                    }
-                    Slog.w(TAG, "Event timeout during app switch: dropping "
-                            + nextKey);
-                    return SKIP_TARGET_TOKEN;
-                }
-
-                // System.out.println("##### [" + SystemClock.uptimeMillis() + "] WindowManagerService.dispatchKey(" + keycode + ", " + down + ", " + repeatCount + ")");
-
-                WindowState focus = null;
-                synchronized(mWindowMap) {
-                    focus = getFocusedWindowLocked();
-                }
-
-                wakeupIfNeeded(focus, LocalPowerManager.BUTTON_EVENT);
-
-                if (callingUid == 0 ||
-                        (focus != null && callingUid == focus.mSession.mUid) ||
-                        mContext.checkPermission(
-                                android.Manifest.permission.INJECT_EVENTS,
-                                callingPid, callingUid)
-                                == PackageManager.PERMISSION_GRANTED) {
-                    if (mPolicy.interceptKeyTi(focus,
-                            keycode, nextKey.getMetaState(), down, repeatCount,
-                            nextKey.getFlags())) {
-                        return CONSUMED_EVENT_TOKEN;
-                    }
-                }
-
-                return focus;
-
-            } else if (!isPointerEvent) {
-                boolean dispatch = mKeyWaiter.checkShouldDispatchKey(-1);
-                if (!dispatch) {
-                    Slog.w(TAG, "Event timeout during app switch: dropping trackball "
-                            + nextMotion);
-                    return SKIP_TARGET_TOKEN;
-                }
-
-                WindowState focus = null;
-                synchronized(mWindowMap) {
-                    focus = getFocusedWindowLocked();
-                }
-
-                wakeupIfNeeded(focus, LocalPowerManager.BUTTON_EVENT);
-                return focus;
-            }
-
-            if (nextMotion == null) {
-                return SKIP_TARGET_TOKEN;
-            }
-
-            boolean dispatch = mKeyWaiter.checkShouldDispatchKey(
-                    KeyEvent.KEYCODE_UNKNOWN);
-            if (!dispatch) {
-                Slog.w(TAG, "Event timeout during app switch: dropping pointer "
-                        + nextMotion);
-                return SKIP_TARGET_TOKEN;
-            }
-
-            // Find the target window for a pointer event.
-            int action = nextMotion.getAction();
-            final float xf = nextMotion.getX();
-            final float yf = nextMotion.getY();
-            final long eventTime = nextMotion.getEventTime();
-
-            final boolean screenWasOff = qev != null
-                    && (qev.flags&WindowManagerPolicy.FLAG_BRIGHT_HERE) != 0;
-
-            WindowState target = null;
-
-            synchronized(mWindowMap) {
-                synchronized (this) {
-                    if (action == MotionEvent.ACTION_DOWN) {
-                        if (mMotionTarget != null) {
-                            // this is weird, we got a pen down, but we thought it was
-                            // already down!
-                            // XXX: We should probably send an ACTION_UP to the current
-                            // target.
-                            Slog.w(TAG, "Pointer down received while already down in: "
-                                    + mMotionTarget);
-                            mMotionTarget = null;
-                        }
-
-                        // ACTION_DOWN is special, because we need to lock next events to
-                        // the window we'll land onto.
-                        final int x = (int)xf;
-                        final int y = (int)yf;
-
-                        final ArrayList windows = mWindows;
-                        final int N = windows.size();
-                        WindowState topErrWindow = null;
-                        final Rect tmpRect = mTempRect;
-                        for (int i=N-1; i>=0; i--) {
-                            WindowState child = (WindowState)windows.get(i);
-                            //Slog.i(TAG, "Checking dispatch to: " + child);
-                            final int flags = child.mAttrs.flags;
-                            if ((flags & WindowManager.LayoutParams.FLAG_SYSTEM_ERROR) != 0) {
-                                if (topErrWindow == null) {
-                                    topErrWindow = child;
-                                }
-                            }
-                            if (!child.isVisibleLw()) {
-                                //Slog.i(TAG, "Not visible!");
-                                continue;
-                            }
-                            if ((flags & WindowManager.LayoutParams.FLAG_NOT_TOUCHABLE) != 0) {
-                                //Slog.i(TAG, "Not touchable!");
-                                if ((flags & WindowManager.LayoutParams
-                                        .FLAG_WATCH_OUTSIDE_TOUCH) != 0) {
-                                    child.mNextOutsideTouch = mOutsideTouchTargets;
-                                    mOutsideTouchTargets = child;
-                                }
-                                continue;
-                            }
-                            tmpRect.set(child.mFrame);
-                            if (child.mTouchableInsets == ViewTreeObserver
-                                        .InternalInsetsInfo.TOUCHABLE_INSETS_CONTENT) {
-                                // The touch is inside of the window if it is
-                                // inside the frame, AND the content part of that
-                                // frame that was given by the application.
-                                tmpRect.left += child.mGivenContentInsets.left;
-                                tmpRect.top += child.mGivenContentInsets.top;
-                                tmpRect.right -= child.mGivenContentInsets.right;
-                                tmpRect.bottom -= child.mGivenContentInsets.bottom;
-                            } else if (child.mTouchableInsets == ViewTreeObserver
-                                        .InternalInsetsInfo.TOUCHABLE_INSETS_VISIBLE) {
-                                // The touch is inside of the window if it is
-                                // inside the frame, AND the visible part of that
-                                // frame that was given by the application.
-                                tmpRect.left += child.mGivenVisibleInsets.left;
-                                tmpRect.top += child.mGivenVisibleInsets.top;
-                                tmpRect.right -= child.mGivenVisibleInsets.right;
-                                tmpRect.bottom -= child.mGivenVisibleInsets.bottom;
-                            }
-                            final int touchFlags = flags &
-                                (WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE
-                                |WindowManager.LayoutParams.FLAG_NOT_TOUCH_MODAL);
-                            if (tmpRect.contains(x, y) || touchFlags == 0) {
-                                //Slog.i(TAG, "Using this target!");
-                                if (!screenWasOff || (flags &
-                                        WindowManager.LayoutParams.FLAG_TOUCHABLE_WHEN_WAKING) != 0) {
-                                    mMotionTarget = child;
-                                } else {
-                                    //Slog.i(TAG, "Waking, skip!");
-                                    mMotionTarget = null;
-                                }
-                                break;
-                            }
-
-                            if ((flags & WindowManager.LayoutParams
-                                    .FLAG_WATCH_OUTSIDE_TOUCH) != 0) {
-                                child.mNextOutsideTouch = mOutsideTouchTargets;
-                                mOutsideTouchTargets = child;
-                                //Slog.i(TAG, "Adding to outside target list: " + child);
-                            }
-                        }
-
-                        // if there's an error window but it's not accepting
-                        // focus (typically because it is not yet visible) just
-                        // wait for it -- any other focused window may in fact
-                        // be in ANR state.
-                        if (topErrWindow != null && mMotionTarget != topErrWindow) {
-                            mMotionTarget = null;
-                        }
-                    }
-
-                    target = mMotionTarget;
-                }
-            }
-
-            wakeupIfNeeded(target, eventType(nextMotion));
-
-            // Pointer events are a little different -- if there isn't a
-            // target found for any event, then just drop it.
-            return target != null ? target : SKIP_TARGET_TOKEN;
-        }
-
-        boolean checkShouldDispatchKey(int keycode) {
-            synchronized (this) {
-                if (mPolicy.isAppSwitchKeyTqTiLwLi(keycode)) {
-                    mTimeToSwitch = 0;
-                    return true;
-                }
-                if (mTimeToSwitch != 0
-                        && mTimeToSwitch < SystemClock.uptimeMillis()) {
-                    return false;
-                }
-                return true;
-            }
-        }
-
-        void bindTargetWindowLocked(WindowState win,
-                int pendingWhat, QueuedEvent pendingMotion) {
-            synchronized (this) {
-                bindTargetWindowLockedLocked(win, pendingWhat, pendingMotion);
-            }
-        }
-
-        void bindTargetWindowLocked(WindowState win) {
-            synchronized (this) {
-                bindTargetWindowLockedLocked(win, RETURN_NOTHING, null);
-            }
-        }
-
-        void bindTargetWindowLockedLocked(WindowState win,
-                int pendingWhat, QueuedEvent pendingMotion) {
-            mLastWin = win;
-            mLastBinder = win.mClient.asBinder();
-            mFinished = false;
-            if (pendingMotion != null) {
-                final Session s = win.mSession;
-                if (pendingWhat == RETURN_PENDING_POINTER) {
-                    releasePendingPointerLocked(s);
-                    s.mPendingPointerMove = pendingMotion;
-                    s.mPendingPointerWindow = win;
-                    if (DEBUG_INPUT) Slog.v(TAG,
-                            "bindTargetToWindow " + s.mPendingPointerMove);
-                } else if (pendingWhat == RETURN_PENDING_TRACKBALL) {
-                    releasePendingTrackballLocked(s);
-                    s.mPendingTrackballMove = pendingMotion;
-                    s.mPendingTrackballWindow = win;
-                }
-            }
-        }
-
-        void releasePendingPointerLocked(Session s) {
-            if (DEBUG_INPUT) Slog.v(TAG,
-                    "releasePendingPointer " + s.mPendingPointerMove);
-            if (s.mPendingPointerMove != null) {
-                mQueue.recycleEvent(s.mPendingPointerMove);
-                s.mPendingPointerMove = null;
-            }
-        }
-
-        void releasePendingTrackballLocked(Session s) {
-            if (s.mPendingTrackballMove != null) {
-                mQueue.recycleEvent(s.mPendingTrackballMove);
-                s.mPendingTrackballMove = null;
-            }
-        }
-
-        MotionEvent finishedKey(Session session, IWindow client, boolean force,
-                int returnWhat) {
-            if (DEBUG_INPUT) Slog.v(
-                TAG, "finishedKey: client=" + client + ", force=" + force);
-
-            if (client == null) {
-                return null;
-            }
-
-            MotionEvent res = null;
-            QueuedEvent qev = null;
-            WindowState win = null;
-
-            synchronized (this) {
-                if (DEBUG_INPUT) Slog.v(
-                    TAG, "finishedKey: client=" + client.asBinder()
-                    + ", force=" + force + ", last=" + mLastBinder
-                    + " (token=" + (mLastWin != null ? mLastWin.mToken : null) + ")");
-
-                if (returnWhat == RETURN_PENDING_POINTER) {
-                    qev = session.mPendingPointerMove;
-                    win = session.mPendingPointerWindow;
-                    session.mPendingPointerMove = null;
-                    session.mPendingPointerWindow = null;
-                } else if (returnWhat == RETURN_PENDING_TRACKBALL) {
-                    qev = session.mPendingTrackballMove;
-                    win = session.mPendingTrackballWindow;
-                    session.mPendingTrackballMove = null;
-                    session.mPendingTrackballWindow = null;
-                }
-
-                if (mLastBinder == client.asBinder()) {
-                    if (DEBUG_INPUT) Slog.v(
-                        TAG, "finishedKey: last paused="
-                        + ((mLastWin != null) ? mLastWin.mToken.paused : "null"));
-                    if (mLastWin != null && (!mLastWin.mToken.paused || force
-                            || !mEventDispatching)) {
-                        doFinishedKeyLocked(true);
-                    } else {
-                        // Make sure to wake up anyone currently waiting to
-                        // dispatch a key, so they can re-evaluate their
-                        // current situation.
-                        mFinished = true;
-                        notifyAll();
-                    }
-                }
-
-                if (qev != null) {
-                    res = (MotionEvent)qev.event;
-                    if (DEBUG_INPUT) Slog.v(TAG,
-                            "Returning pending motion: " + res);
-                    mQueue.recycleEvent(qev);
-                    if (win != null && returnWhat == RETURN_PENDING_POINTER) {
-                        res.offsetLocation(-win.mFrame.left, -win.mFrame.top);
-                    }
-                }
-            }
-
-            if (res != null && returnWhat == RETURN_PENDING_POINTER) {
-                synchronized (mWindowMap) {
-                    dispatchPointerElsewhereLocked(win, win, res, res.getEventTime(), false);
-                }
-            }
-
-            return res;
-        }
-
-        void tickle() {
-            synchronized (this) {
-                notifyAll();
-            }
-        }
-
-        void handleNewWindowLocked(WindowState newWindow) {
-            if (!newWindow.canReceiveKeys()) {
-                return;
-            }
-            synchronized (this) {
-                if (DEBUG_INPUT) Slog.v(
-                    TAG, "New key dispatch window: win="
-                    + newWindow.mClient.asBinder()
-                    + ", last=" + mLastBinder
-                    + " (token=" + (mLastWin != null ? mLastWin.mToken : null)
-                    + "), finished=" + mFinished + ", paused="
-                    + newWindow.mToken.paused);
-
-                // Displaying a window implicitly causes dispatching to
-                // be unpaused.  (This is to protect against bugs if someone
-                // pauses dispatching but forgets to resume.)
-                newWindow.mToken.paused = false;
-
-                mGotFirstWindow = true;
-
-                if ((newWindow.mAttrs.flags & FLAG_SYSTEM_ERROR) != 0) {
-                    if (DEBUG_INPUT) Slog.v(TAG,
-                            "New SYSTEM_ERROR window; resetting state");
-                    mLastWin = null;
-                    mLastBinder = null;
-                    mMotionTarget = null;
-                    mFinished = true;
-                } else if (mLastWin != null) {
-                    // If the new window is above the window we are
-                    // waiting on, then stop waiting and let key dispatching
-                    // start on the new guy.
-                    if (DEBUG_INPUT) Slog.v(
-                        TAG, "Last win layer=" + mLastWin.mLayer
-                        + ", new win layer=" + newWindow.mLayer);
-                    if (newWindow.mLayer >= mLastWin.mLayer) {
-                        // The new window is above the old; finish pending input to the last
-                        // window and start directing it to the new one.
-                        mLastWin.mToken.paused = false;
-                        doFinishedKeyLocked(false);  // does a notifyAll()
-                        return;
-                    }
-                }
-
-                // Now that we've put a new window state in place, make the event waiter
-                // take notice and retarget its attentions.
-                notifyAll();
-            }
-        }
-
-        void pauseDispatchingLocked(WindowToken token) {
-            synchronized (this)
-            {
-                if (DEBUG_INPUT) Slog.v(TAG, "Pausing WindowToken " + token);
-                token.paused = true;
-
-                /*
-                if (mLastWin != null && !mFinished && mLastWin.mBaseLayer <= layer) {
-                    mPaused = true;
-                } else {
-                    if (mLastWin == null) {
-                        Slog.i(TAG, "Key dispatching not paused: no last window.");
-                    } else if (mFinished) {
-                        Slog.i(TAG, "Key dispatching not paused: finished last key.");
-                    } else {
-                        Slog.i(TAG, "Key dispatching not paused: window in higher layer.");
-                    }
-                }
-                */
-            }
-        }
-
-        void resumeDispatchingLocked(WindowToken token) {
-            synchronized (this) {
-                if (token.paused) {
-                    if (DEBUG_INPUT) Slog.v(
-                        TAG, "Resuming WindowToken " + token
-                        + ", last=" + mLastBinder
-                        + " (token=" + (mLastWin != null ? mLastWin.mToken : null)
-                        + "), finished=" + mFinished + ", paused="
-                        + token.paused);
-                    token.paused = false;
-                    if (mLastWin != null && mLastWin.mToken == token && mFinished) {
-                        doFinishedKeyLocked(false);
-                    } else {
-                        notifyAll();
-                    }
-                }
-            }
-        }
-
-        void setEventDispatchingLocked(boolean enabled) {
-            synchronized (this) {
-                mEventDispatching = enabled;
-                notifyAll();
-            }
-        }
-
-        void appSwitchComing() {
-            synchronized (this) {
-                // Don't wait for more than .5 seconds for app to finish
-                // processing the pending events.
-                long now = SystemClock.uptimeMillis() + 500;
-                if (DEBUG_INPUT) Slog.v(TAG, "appSwitchComing: " + now);
-                if (mTimeToSwitch == 0 || now < mTimeToSwitch) {
-                    mTimeToSwitch = now;
-                }
-                notifyAll();
-            }
-        }
-
-        private final void doFinishedKeyLocked(boolean force) {
-            if (mLastWin != null) {
-                releasePendingPointerLocked(mLastWin.mSession);
-                releasePendingTrackballLocked(mLastWin.mSession);
-            }
-
-            if (force || mLastWin == null || !mLastWin.mToken.paused
-                    || !mLastWin.isVisibleLw()) {
-                // If the current window has been paused, we aren't -really-
-                // finished...  so let the waiters still wait.
-                mLastWin = null;
-                mLastBinder = null;
-            }
-            mFinished = true;
-            notifyAll();
-        }
-    }
-
-    private class KeyQ extends KeyInputQueue
-            implements KeyInputQueue.FilterCallback {
-        PowerManager.WakeLock mHoldingScreen;
-
-        KeyQ() {
-            super(mContext, WindowManagerService.this);
-            PowerManager pm = (PowerManager)mContext.getSystemService(Context.POWER_SERVICE);
-            mHoldingScreen = pm.newWakeLock(PowerManager.SCREEN_BRIGHT_WAKE_LOCK,
-                    "KEEP_SCREEN_ON_FLAG");
-            mHoldingScreen.setReferenceCounted(false);
-        }
-
-        @Override
-        boolean preprocessEvent(InputDevice device, RawInputEvent event) {
-            if (mPolicy.preprocessInputEventTq(event)) {
-                return true;
-            }
-
-            switch (event.type) {
-                case RawInputEvent.EV_KEY: {
-                    // XXX begin hack
-                    if (DEBUG) {
-                        if (event.keycode == KeyEvent.KEYCODE_G) {
-                            if (event.value != 0) {
-                                // G down
-                                mPolicy.screenTurnedOff(WindowManagerPolicy.OFF_BECAUSE_OF_USER);
-                            }
-                            return false;
-                        }
-                        if (event.keycode == KeyEvent.KEYCODE_D) {
-                            if (event.value != 0) {
-                                //dump();
-                            }
-                            return false;
-                        }
-                    }
-                    // XXX end hack
-
-                    boolean screenIsOff = !mPowerManager.isScreenOn();
-                    boolean screenIsDim = !mPowerManager.isScreenBright();
-                    int actions = mPolicy.interceptKeyTq(event, !screenIsOff);
-
-                    if ((actions & WindowManagerPolicy.ACTION_GO_TO_SLEEP) != 0) {
-                        mPowerManager.goToSleep(event.when);
-                    }
-
-                    if (screenIsOff) {
-                        event.flags |= WindowManagerPolicy.FLAG_WOKE_HERE;
-                    }
-                    if (screenIsDim) {
-                        event.flags |= WindowManagerPolicy.FLAG_BRIGHT_HERE;
-                    }
-                    if ((actions & WindowManagerPolicy.ACTION_POKE_USER_ACTIVITY) != 0) {
-                        mPowerManager.userActivity(event.when, false,
-                                LocalPowerManager.BUTTON_EVENT, false);
-                    }
-
-                    if ((actions & WindowManagerPolicy.ACTION_PASS_TO_USER) != 0) {
-                        if (event.value != 0 && mPolicy.isAppSwitchKeyTqTiLwLi(event.keycode)) {
-                            filterQueue(this);
-                            mKeyWaiter.appSwitchComing();
-                        }
-                        return true;
-                    } else {
-                        return false;
-                    }
-                }
-
-                case RawInputEvent.EV_REL: {
-                    boolean screenIsOff = !mPowerManager.isScreenOn();
-                    boolean screenIsDim = !mPowerManager.isScreenBright();
-                    if (screenIsOff) {
-                        if (!mPolicy.isWakeRelMovementTq(event.deviceId,
-                                device.classes, event)) {
-                            //Slog.i(TAG, "dropping because screenIsOff and !isWakeKey");
-                            return false;
-                        }
-                        event.flags |= WindowManagerPolicy.FLAG_WOKE_HERE;
-                    }
-                    if (screenIsDim) {
-                        event.flags |= WindowManagerPolicy.FLAG_BRIGHT_HERE;
-                    }
-                    return true;
-                }
-
-                case RawInputEvent.EV_ABS: {
-                    boolean screenIsOff = !mPowerManager.isScreenOn();
-                    boolean screenIsDim = !mPowerManager.isScreenBright();
-                    if (screenIsOff) {
-                        if (!mPolicy.isWakeAbsMovementTq(event.deviceId,
-                                device.classes, event)) {
-                            //Slog.i(TAG, "dropping because screenIsOff and !isWakeKey");
-                            return false;
-                        }
-                        event.flags |= WindowManagerPolicy.FLAG_WOKE_HERE;
-                    }
-                    if (screenIsDim) {
-                        event.flags |= WindowManagerPolicy.FLAG_BRIGHT_HERE;
-                    }
-                    return true;
-                }
-
-                default:
-                    return true;
-            }
-        }
-
-        public int filterEvent(QueuedEvent ev) {
-            switch (ev.classType) {
-                case RawInputEvent.CLASS_KEYBOARD:
-                    KeyEvent ke = (KeyEvent)ev.event;
-                    if (mPolicy.isMovementKeyTi(ke.getKeyCode())) {
-                        Slog.w(TAG, "Dropping movement key during app switch: "
-                                + ke.getKeyCode() + ", action=" + ke.getAction());
-                        return FILTER_REMOVE;
-                    }
-                    return FILTER_ABORT;
-                default:
-                    return FILTER_KEEP;
-            }
-        }
-
-        /**
-         * Must be called with the main window manager lock held.
-         */
-        void setHoldScreenLocked(boolean holding) {
-            boolean state = mHoldingScreen.isHeld();
-            if (holding != state) {
-                if (holding) {
-                    mHoldingScreen.acquire();
-                } else {
-                    mPolicy.screenOnStoppedLw();
-                    mHoldingScreen.release();
-                }
-            }
-        }
-    }
-
     public boolean detectSafeMode() {
         mSafeMode = mPolicy.detectSafeMode();
         return mSafeMode;
@@ -6467,202 +5511,6 @@
         mPolicy.systemReady();
     }
 
-    private final class InputDispatcherThread extends Thread {
-        // Time to wait when there is nothing to do: 9999 seconds.
-        static final int LONG_WAIT=9999*1000;
-
-        public InputDispatcherThread() {
-            super("InputDispatcher");
-        }
-
-        @Override
-        public void run() {
-            while (true) {
-                try {
-                    process();
-                } catch (Exception e) {
-                    Slog.e(TAG, "Exception in input dispatcher", e);
-                }
-            }
-        }
-
-        private void process() {
-            android.os.Process.setThreadPriority(
-                    android.os.Process.THREAD_PRIORITY_URGENT_DISPLAY);
-
-            // The last key event we saw
-            KeyEvent lastKey = null;
-
-            // Last keydown time for auto-repeating keys
-            long lastKeyTime = SystemClock.uptimeMillis();
-            long nextKeyTime = lastKeyTime+LONG_WAIT;
-            long downTime = 0;
-
-            // How many successive repeats we generated
-            int keyRepeatCount = 0;
-
-            // Need to report that configuration has changed?
-            boolean configChanged = false;
-
-            while (true) {
-                long curTime = SystemClock.uptimeMillis();
-
-                if (DEBUG_INPUT) Slog.v(
-                    TAG, "Waiting for next key: now=" + curTime
-                    + ", repeat @ " + nextKeyTime);
-
-                // Retrieve next event, waiting only as long as the next
-                // repeat timeout.  If the configuration has changed, then
-                // don't wait at all -- we'll report the change as soon as
-                // we have processed all events.
-                QueuedEvent ev = mQueue.getEvent(
-                    (int)((!configChanged && curTime < nextKeyTime)
-                            ? (nextKeyTime-curTime) : 0));
-
-                if (DEBUG_INPUT && ev != null) Slog.v(
-                        TAG, "Event: type=" + ev.classType + " data=" + ev.event);
-
-                if (MEASURE_LATENCY) {
-                    lt.sample("2 got event              ", System.nanoTime() - ev.whenNano);
-                }
-
-                if (lastKey != null && !mPolicy.allowKeyRepeat()) {
-                    // cancel key repeat at the request of the policy.
-                    lastKey = null;
-                    downTime = 0;
-                    lastKeyTime = curTime;
-                    nextKeyTime = curTime + LONG_WAIT;
-                }
-                try {
-                    if (ev != null) {
-                        curTime = SystemClock.uptimeMillis();
-                        int eventType;
-                        if (ev.classType == RawInputEvent.CLASS_TOUCHSCREEN) {
-                            eventType = eventType((MotionEvent)ev.event);
-                        } else if (ev.classType == RawInputEvent.CLASS_KEYBOARD ||
-                                    ev.classType == RawInputEvent.CLASS_TRACKBALL) {
-                            eventType = LocalPowerManager.BUTTON_EVENT;
-                        } else {
-                            eventType = LocalPowerManager.OTHER_EVENT;
-                        }
-                        try {
-                            if ((curTime - mLastBatteryStatsCallTime)
-                                    >= MIN_TIME_BETWEEN_USERACTIVITIES) {
-                                mLastBatteryStatsCallTime = curTime;
-                                mBatteryStats.noteInputEvent();
-                            }
-                        } catch (RemoteException e) {
-                            // Ignore
-                        }
-
-                        if (ev.classType == RawInputEvent.CLASS_CONFIGURATION_CHANGED) {
-                            // do not wake screen in this case
-                        } else if (eventType != TOUCH_EVENT
-                                && eventType != LONG_TOUCH_EVENT
-                                && eventType != CHEEK_EVENT) {
-                            mPowerManager.userActivity(curTime, false,
-                                    eventType, false);
-                        } else if (mLastTouchEventType != eventType
-                                || (curTime - mLastUserActivityCallTime)
-                                >= MIN_TIME_BETWEEN_USERACTIVITIES) {
-                            mLastUserActivityCallTime = curTime;
-                            mLastTouchEventType = eventType;
-                            mPowerManager.userActivity(curTime, false,
-                                    eventType, false);
-                        }
-
-                        switch (ev.classType) {
-                            case RawInputEvent.CLASS_KEYBOARD:
-                                KeyEvent ke = (KeyEvent)ev.event;
-                                if (ke.isDown()) {
-                                    lastKey = ke;
-                                    downTime = curTime;
-                                    keyRepeatCount = 0;
-                                    lastKeyTime = curTime;
-                                    nextKeyTime = lastKeyTime
-                                            + ViewConfiguration.getLongPressTimeout();
-                                    if (DEBUG_INPUT) Slog.v(
-                                        TAG, "Received key down: first repeat @ "
-                                        + nextKeyTime);
-                                } else {
-                                    lastKey = null;
-                                    downTime = 0;
-                                    // Arbitrary long timeout.
-                                    lastKeyTime = curTime;
-                                    nextKeyTime = curTime + LONG_WAIT;
-                                    if (DEBUG_INPUT) Slog.v(
-                                        TAG, "Received key up: ignore repeat @ "
-                                        + nextKeyTime);
-                                }
-                                dispatchKey((KeyEvent)ev.event, 0, 0);
-                                mQueue.recycleEvent(ev);
-                                break;
-                            case RawInputEvent.CLASS_TOUCHSCREEN:
-                                //Slog.i(TAG, "Read next event " + ev);
-                                dispatchPointer(ev, (MotionEvent)ev.event, 0, 0);
-                                break;
-                            case RawInputEvent.CLASS_TRACKBALL:
-                                dispatchTrackball(ev, (MotionEvent)ev.event, 0, 0);
-                                break;
-                            case RawInputEvent.CLASS_CONFIGURATION_CHANGED:
-                                configChanged = true;
-                                break;
-                            default:
-                                mQueue.recycleEvent(ev);
-                            break;
-                        }
-
-                    } else if (configChanged) {
-                        configChanged = false;
-                        sendNewConfiguration();
-
-                    } else if (lastKey != null) {
-                        curTime = SystemClock.uptimeMillis();
-
-                        // Timeout occurred while key was down.  If it is at or
-                        // past the key repeat time, dispatch the repeat.
-                        if (DEBUG_INPUT) Slog.v(
-                            TAG, "Key timeout: repeat=" + nextKeyTime
-                            + ", now=" + curTime);
-                        if (curTime < nextKeyTime) {
-                            continue;
-                        }
-
-                        lastKeyTime = nextKeyTime;
-                        nextKeyTime = nextKeyTime + KEY_REPEAT_DELAY;
-                        keyRepeatCount++;
-                        if (DEBUG_INPUT) Slog.v(
-                            TAG, "Key repeat: count=" + keyRepeatCount
-                            + ", next @ " + nextKeyTime);
-                        KeyEvent newEvent;
-                        if (downTime != 0 && (downTime
-                                + ViewConfiguration.getLongPressTimeout())
-                                <= curTime) {
-                            newEvent = KeyEvent.changeTimeRepeat(lastKey,
-                                    curTime, keyRepeatCount,
-                                    lastKey.getFlags() | KeyEvent.FLAG_LONG_PRESS);
-                            downTime = 0;
-                        } else {
-                            newEvent = KeyEvent.changeTimeRepeat(lastKey,
-                                    curTime, keyRepeatCount);
-                        }
-                        dispatchKey(newEvent, 0, 0);
-
-                    } else {
-                        curTime = SystemClock.uptimeMillis();
-
-                        lastKeyTime = curTime;
-                        nextKeyTime = curTime + LONG_WAIT;
-                    }
-
-                } catch (Exception e) {
-                    Slog.e(TAG,
-                        "Input thread received uncaught exception: " + e, e);
-                }
-            }
-        }
-    }
-
     // -------------------------------------------------------------
     // Client Session State
     // -------------------------------------------------------------
@@ -6678,20 +5526,6 @@
         int mNumWindow = 0;
         boolean mClientDead = false;
 
-        /**
-         * Current pointer move event being dispatched to client window...  must
-         * hold key lock to access.
-         */
-        QueuedEvent mPendingPointerMove;
-        WindowState mPendingPointerWindow;
-
-        /**
-         * Current trackball move event being dispatched to client window...  must
-         * hold key lock to access.
-         */
-        QueuedEvent mPendingTrackballMove;
-        WindowState mPendingTrackballWindow;
-
         public Session(IInputMethodClient client, IInputContext inputContext) {
             mClient = client;
             mInputContext = inputContext;
@@ -6767,8 +5601,14 @@
         }
 
         public int add(IWindow window, WindowManager.LayoutParams attrs,
+                int viewVisibility, Rect outContentInsets, InputChannel outInputChannel) {
+            return addWindow(this, window, attrs, viewVisibility, outContentInsets,
+                    outInputChannel);
+        }
+        
+        public int addWithoutInputChannel(IWindow window, WindowManager.LayoutParams attrs,
                 int viewVisibility, Rect outContentInsets) {
-            return addWindow(this, window, attrs, viewVisibility, outContentInsets);
+            return addWindow(this, window, attrs, viewVisibility, outContentInsets, null);
         }
 
         public void remove(IWindow window) {
@@ -6804,27 +5644,6 @@
             finishDrawingWindow(this, window);
         }
 
-        public void finishKey(IWindow window) {
-            if (localLOGV) Slog.v(
-                TAG, "IWindow finishKey called for " + window);
-            mKeyWaiter.finishedKey(this, window, false,
-                    KeyWaiter.RETURN_NOTHING);
-        }
-
-        public MotionEvent getPendingPointerMove(IWindow window) {
-            if (localLOGV) Slog.v(
-                    TAG, "IWindow getPendingMotionEvent called for " + window);
-            return mKeyWaiter.finishedKey(this, window, false,
-                    KeyWaiter.RETURN_PENDING_POINTER);
-        }
-
-        public MotionEvent getPendingTrackballMove(IWindow window) {
-            if (localLOGV) Slog.v(
-                    TAG, "IWindow getPendingMotionEvent called for " + window);
-            return mKeyWaiter.finishedKey(this, window, false,
-                    KeyWaiter.RETURN_PENDING_TRACKBALL);
-        }
-
         public void setInTouchMode(boolean mode) {
             synchronized(mWindowMap) {
                 mInTouchMode = mode;
@@ -6928,16 +5747,6 @@
             pw.print(prefix); pw.print("mNumWindow="); pw.print(mNumWindow);
                     pw.print(" mClientDead="); pw.print(mClientDead);
                     pw.print(" mSurfaceSession="); pw.println(mSurfaceSession);
-            if (mPendingPointerWindow != null || mPendingPointerMove != null) {
-                pw.print(prefix);
-                        pw.print("mPendingPointerWindow="); pw.print(mPendingPointerWindow);
-                        pw.print(" mPendingPointerMove="); pw.println(mPendingPointerMove);
-            }
-            if (mPendingTrackballWindow != null || mPendingTrackballMove != null) {
-                pw.print(prefix);
-                        pw.print("mPendingTrackballWindow="); pw.print(mPendingTrackballWindow);
-                        pw.print(" mPendingTrackballMove="); pw.println(mPendingTrackballMove);
-            }
         }
 
         @Override
@@ -6960,7 +5769,7 @@
         final WindowManager.LayoutParams mAttrs = new WindowManager.LayoutParams();
         final DeathRecipient mDeathRecipient;
         final WindowState mAttachedWindow;
-        final ArrayList mChildWindows = new ArrayList();
+        final ArrayList<WindowState> mChildWindows = new ArrayList<WindowState>();
         final int mBaseLayer;
         final int mSubLayer;
         final boolean mLayoutAttached;
@@ -6988,8 +5797,6 @@
         boolean mObscured;
         boolean mTurnOnScreen;
 
-        WindowState mNextOutsideTouch;
-
         int mLayoutSeq = -1;
         
         Configuration mConfiguration = null;
@@ -7137,6 +5944,9 @@
         int mSurfaceLayer;
         float mSurfaceAlpha;
         
+        // Input channel
+        InputChannel mInputChannel;
+        
         WindowState(Session s, IWindow c, WindowToken token,
                WindowState attachedWindow, WindowManager.LayoutParams a,
                int viewVisibility) {
@@ -7364,6 +6174,12 @@
         public IApplicationToken getAppToken() {
             return mAppToken != null ? mAppToken.appToken : null;
         }
+        
+        public long getInputDispatchingTimeoutNanos() {
+            return mAppToken != null
+                    ? mAppToken.inputDispatchingTimeoutNanos
+                    : DEFAULT_INPUT_DISPATCHING_TIMEOUT_NANOS;
+        }
 
         public boolean hasAppShownWindows() {
             return mAppToken != null ? mAppToken.firstWindowDrawn : false;
@@ -7497,14 +6313,6 @@
         }
 
         void destroySurfaceLocked() {
-            // Window is no longer on-screen, so can no longer receive
-            // key events...  if we were waiting for it to finish
-            // handling a key event, the wait is over!
-            mKeyWaiter.finishedKey(mSession, mClient, true,
-                    KeyWaiter.RETURN_NOTHING);
-            mKeyWaiter.releasePendingPointerLocked(mSession);
-            mKeyWaiter.releasePendingTrackballLocked(mSession);
-
             if (mAppToken != null && this == mAppToken.startingWindow) {
                 mAppToken.startingDisplayed = false;
             }
@@ -7517,7 +6325,7 @@
                 int i = mChildWindows.size();
                 while (i > 0) {
                     i--;
-                    WindowState c = (WindowState)mChildWindows.get(i);
+                    WindowState c = mChildWindows.get(i);
                     c.mAttachedHidden = true;
                 }
 
@@ -7628,7 +6436,7 @@
                 int i = mChildWindows.size();
                 while (i > 0) {
                     i--;
-                    WindowState c = (WindowState)mChildWindows.get(i);
+                    WindowState c = mChildWindows.get(i);
                     if (c.mAttachedHidden) {
                         c.mAttachedHidden = false;
                         if (c.mSurface != null) {
@@ -7801,7 +6609,7 @@
 
             final int N = mChildWindows.size();
             for (int i=0; i<N; i++) {
-                ((WindowState)mChildWindows.get(i)).finishExit();
+                mChildWindows.get(i).finishExit();
             }
 
             if (!mExiting) {
@@ -7826,7 +6634,6 @@
                     Slog.w(TAG, "Error hiding surface in " + this, e);
                 }
                 mLastHidden = true;
-                mKeyWaiter.releasePendingPointerLocked(mSession);
             }
             mExiting = false;
             if (mRemoveOnExit) {
@@ -8150,6 +6957,8 @@
         }
 
         void removeLocked() {
+            disposeInputChannel();
+            
             if (mAttachedWindow != null) {
                 mAttachedWindow.mChildWindows.remove(this);
             }
@@ -8162,6 +6971,15 @@
                 // we are doing this as part of processing a death note.)
             }
         }
+        
+        void disposeInputChannel() {
+            if (mInputChannel != null) {
+                mInputManager.unregisterInputChannel(mInputChannel);
+                
+                mInputChannel.dispose();
+                mInputChannel = null;
+            }
+        }
 
         private class DeathRecipient implements IBinder.DeathRecipient {
             public void binderDied() {
@@ -8403,6 +7221,11 @@
                         pw.print(" mWallpaperYStep="); pw.println(mWallpaperYStep);
             }
         }
+        
+        String makeInputChannelName() {
+            return Integer.toHexString(System.identityHashCode(this))
+                + " " + mAttrs.getTitle();
+        }
 
         @Override
         public String toString() {
@@ -8505,6 +7328,9 @@
         int groupId = -1;
         boolean appFullscreen;
         int requestedOrientation = ActivityInfo.SCREEN_ORIENTATION_UNSPECIFIED;
+        
+        // The input dispatching timeout for this application token in nanoseconds.
+        long inputDispatchingTimeoutNanos;
 
         // These are used for determining when all windows associated with
         // an activity have been drawn, so they can be made visible together
@@ -8712,7 +7538,7 @@
 
             final int N = windows.size();
             for (int i=0; i<N; i++) {
-                ((WindowState)windows.get(i)).finishExit();
+                windows.get(i).finishExit();
             }
             updateReportedVisibilityLocked();
 
@@ -8733,7 +7559,8 @@
             for (int i=0; i<N; i++) {
                 WindowState win = allAppWindows.get(i);
                 if (win == startingWindow || win.mAppFreezing
-                        || win.mViewVisibility != View.VISIBLE) {
+                        || win.mViewVisibility != View.VISIBLE
+                        || win.mAttrs.type == TYPE_APPLICATION_STARTING) {
                     continue;
                 }
                 if (DEBUG_VISIBILITY) {
@@ -8910,6 +7737,7 @@
         public static final int ENABLE_SCREEN = 16;
         public static final int APP_FREEZE_TIMEOUT = 17;
         public static final int SEND_NEW_CONFIGURATION = 18;
+        public static final int REPORT_WINDOWS_CHANGE = 19;
 
         private Session mLastReportedHold;
 
@@ -8961,6 +7789,7 @@
                                 // Ignore if process has died.
                             }
                         }
+                        notifyFocusChanged();
                     }
                 } break;
 
@@ -9135,7 +7964,7 @@
                         int i = mWindows.size();
                         while (i > 0) {
                             i--;
-                            WindowState w = (WindowState)mWindows.get(i);
+                            WindowState w = mWindows.get(i);
                             if (w.mOrientationChanging) {
                                 w.mOrientationChanging = false;
                                 Slog.w(TAG, "Force clearing orientation change: " + w);
@@ -9241,6 +8070,16 @@
                     break;
                 }
 
+                case REPORT_WINDOWS_CHANGE: {
+                    if (mWindowsChanged) {
+                        synchronized (mWindowMap) {
+                            mWindowsChanged = false;
+                        }
+                        notifyWindowsChanged();
+                    }
+                    break;
+                }
+
             }
         }
     }
@@ -9253,7 +8092,8 @@
             IInputContext inputContext) {
         if (client == null) throw new IllegalArgumentException("null client");
         if (inputContext == null) throw new IllegalArgumentException("null inputContext");
-        return new Session(client, inputContext);
+        Session session = new Session(client, inputContext);
+        return session;
     }
 
     public boolean inputMethodClientHasFocus(IInputMethodClient client) {
@@ -9263,7 +8103,7 @@
             int idx = findDesiredInputMethodWindowIndexLocked(false);
             WindowState imFocus;
             if (idx > 0) {
-                imFocus = (WindowState)mWindows.get(idx-1);
+                imFocus = mWindows.get(idx-1);
                 if (imFocus != null) {
                     if (imFocus.mSession.mClient != null &&
                             imFocus.mSession.mClient.asBinder() == client.asBinder()) {
@@ -9321,9 +8161,10 @@
         // First remove all existing app windows.
         i=0;
         while (i < NW) {
-            WindowState w = (WindowState)mWindows.get(i);
+            WindowState w = mWindows.get(i);
             if (w.mAppToken != null) {
-                WindowState win = (WindowState)mWindows.remove(i);
+                WindowState win = mWindows.remove(i);
+                mWindowsChanged = true;
                 if (DEBUG_WINDOW_MOVEMENT) Slog.v(TAG,
                         "Rebuild removing window: " + win);
                 NW--;
@@ -9370,7 +8211,7 @@
         int i;
 
         for (i=0; i<N; i++) {
-            WindowState w = (WindowState)mWindows.get(i);
+            WindowState w = mWindows.get(i);
             if (w.mBaseLayer == curBaseLayer || w.mIsImWindow
                     || (i > 0 && w.mIsWallpaper)) {
                 curLayer += WINDOW_LAYER_MULTIPLIER;
@@ -9459,6 +8300,10 @@
                     requestAnimationLocked(0);
                 }
             }
+            if (mWindowsChanged && !mWindowChangeListeners.isEmpty()) {
+                mH.removeMessages(H.REPORT_WINDOWS_CHANGE);
+                mH.sendMessage(mH.obtainMessage(H.REPORT_WINDOWS_CHANGE));
+            }
         } catch (RuntimeException e) {
             mInLayout = false;
             Slog.e(TAG, "Unhandled exception while layout out windows", e);
@@ -9491,7 +8336,7 @@
         // to another window).
         int topAttached = -1;
         for (i = N-1; i >= 0; i--) {
-            WindowState win = (WindowState) mWindows.get(i);
+            WindowState win = mWindows.get(i);
 
             // Don't do layout of a window if it is not visible, or
             // soon won't be visible, to avoid wasting time and funky
@@ -9540,7 +8385,7 @@
         // XXX does not deal with windows that are attached to windows
         // that are themselves attached.
         for (i = topAttached; i >= 0; i--) {
-            WindowState win = (WindowState) mWindows.get(i);
+            WindowState win = mWindows.get(i);
 
             // If this view is GONE, then skip it -- keep the current
             // frame, and let the caller know so they can ignore it
@@ -9563,6 +8408,9 @@
                 }
             }
         }
+        
+        // Window frames may have changed.  Tell the input dispatcher about it.
+        mInputMonitor.updateInputWindowsLw();
 
         return mPolicy.finishLayoutLw();
     }
@@ -9684,7 +8532,7 @@
                 final int N = mWindows.size();
 
                 for (i=N-1; i>=0; i--) {
-                    WindowState w = (WindowState)mWindows.get(i);
+                    WindowState w = mWindows.get(i);
 
                     final WindowManager.LayoutParams attrs = w.mAttrs;
 
@@ -10117,7 +8965,7 @@
                         // Clear them out.
                         forceHiding = false;
                         for (i=N-1; i>=0; i--) {
-                            WindowState w = (WindowState)mWindows.get(i);
+                            WindowState w = mWindows.get(i);
                             if (w.mSurface != null) {
                                 final WindowManager.LayoutParams attrs = w.mAttrs;
                                 if (mPolicy.doesForceHide(w, attrs) && w.isVisibleLw()) {
@@ -10167,6 +9015,7 @@
                 if (DEBUG_APP_TRANSITIONS) Slog.v(TAG, "*** ANIM STEP: changes=0x"
                         + Integer.toHexString(changes));
                 
+                mInputMonitor.updateInputWindowsLw();
             } while (changes != 0);
 
             // THIRD LOOP: Update the surfaces of all windows.
@@ -10183,7 +9032,7 @@
             final int N = mWindows.size();
 
             for (i=N-1; i>=0; i--) {
-                WindowState w = (WindowState)mWindows.get(i);
+                WindowState w = mWindows.get(i);
 
                 boolean displayed = false;
                 final WindowManager.LayoutParams attrs = w.mAttrs;
@@ -10363,7 +9212,6 @@
                                     Slog.w(TAG, "Exception hiding surface in " + w);
                                 }
                             }
-                            mKeyWaiter.releasePendingPointerLocked(w.mSession);
                         }
                         // If we are waiting for this window to handle an
                         // orientation change, well, it is hidden, so
@@ -10623,6 +9471,8 @@
             Slog.e(TAG, "Unhandled exception in Window Manager", e);
         }
 
+        mInputMonitor.updateInputWindowsLw();
+        
         Surface.closeTransaction();
 
         if (DEBUG_ORIENTATION && mDisplayFrozen) Slog.v(TAG,
@@ -10748,10 +9598,12 @@
             requestAnimationLocked(currentTime+(1000/60)-SystemClock.uptimeMillis());
         }
         
+        mInputMonitor.updateInputWindowsLw();
+        
         if (DEBUG_FREEZE) Slog.v(TAG, "Layout: mDisplayFrozen=" + mDisplayFrozen
                 + " holdScreen=" + holdScreen);
         if (!mDisplayFrozen) {
-            mQueue.setHoldScreenLocked(holdScreen != null);
+            setHoldScreenLocked(holdScreen != null);
             if (screenBrightness < 0 || screenBrightness > 1.0f) {
                 mPowerManager.setScreenBrightnessOverride(-1);
             } else {
@@ -10782,6 +9634,21 @@
         // be enabled, because the window obscured flags have changed.
         enableScreenIfNeededLocked();
     }
+    
+    /**
+     * Must be called with the main window manager lock held.
+     */
+    void setHoldScreenLocked(boolean holding) {
+        boolean state = mHoldingScreenWakeLock.isHeld();
+        if (holding != state) {
+            if (holding) {
+                mHoldingScreenWakeLock.acquire();
+            } else {
+                mPolicy.screenOnStoppedLw();
+                mHoldingScreenWakeLock.release();
+            }
+        }
+    }
 
     void requestAnimationLocked(long delay) {
         if (!mAnimationPending) {
@@ -10839,7 +9706,7 @@
             boolean leakedSurface = false;
             Slog.i(TAG, "Out of memory for surface!  Looking for leaks...");
             for (int i=0; i<N; i++) {
-                WindowState ws = (WindowState)mWindows.get(i);
+                WindowState ws = mWindows.get(i);
                 if (ws.mSurface != null) {
                     if (!mSessions.contains(ws.mSession)) {
                         Slog.w(TAG, "LEAKED SURFACE (session doesn't exist): "
@@ -10871,7 +9738,7 @@
                 Slog.w(TAG, "No leaked surfaces; killing applicatons!");
                 SparseIntArray pidCandidates = new SparseIntArray();
                 for (int i=0; i<N; i++) {
-                    WindowState ws = (WindowState)mWindows.get(i);
+                    WindowState ws = mWindows.get(i);
                     if (ws.mSurface != null) {
                         pidCandidates.append(ws.mSession.mPid, ws.mSession.mPid);
                     }
@@ -10938,14 +9805,20 @@
                     assignLayersLocked();
                 }
             }
-
-            if (newFocus != null && mode != UPDATE_FOCUS_WILL_ASSIGN_LAYERS) {
-                mKeyWaiter.handleNewWindowLocked(newFocus);
+            
+            if (mode != UPDATE_FOCUS_WILL_ASSIGN_LAYERS) {
+                // If we defer assigning layers, then the caller is responsible for
+                // doing this part.
+                finishUpdateFocusedWindowAfterAssignLayersLocked();
             }
             return true;
         }
         return false;
     }
+    
+    private void finishUpdateFocusedWindowAfterAssignLayersLocked() {
+        mInputMonitor.setInputFocusLw(mCurrentFocus);
+    }
 
     private WindowState computeFocusedWindowLocked() {
         WindowState result = null;
@@ -10957,7 +9830,7 @@
             ? mAppTokens.get(nextAppIndex) : null;
 
         while (i >= 0) {
-            win = (WindowState)mWindows.get(i);
+            win = mWindows.get(i);
 
             if (localLOGV || DEBUG_FOCUS) Slog.v(
                 TAG, "Looking for focus: " + i
@@ -11018,15 +9891,6 @@
 
     private void startFreezingDisplayLocked() {
         if (mDisplayFrozen) {
-            // Freezing the display also suspends key event delivery, to
-            // keep events from going astray while the display is reconfigured.
-            // If someone has changed orientation again while the screen is
-            // still frozen, the events will continue to be blocked while the
-            // successive orientation change is processed.  To prevent spurious
-            // ANRs, we reset the event dispatch timeout in this case.
-            synchronized (mKeyWaiter) {
-                mKeyWaiter.mWasFrozen = true;
-            }
             return;
         }
 
@@ -11048,6 +9912,9 @@
         if (DEBUG_FREEZE) Slog.v(TAG, "*** FREEZING DISPLAY", new RuntimeException());
         
         mDisplayFrozen = true;
+        
+        mInputMonitor.freezeInputDispatchingLw();
+        
         if (mNextAppTransition != WindowManagerPolicy.TRANSIT_UNSET) {
             mNextAppTransition = WindowManagerPolicy.TRANSIT_UNSET;
             mNextAppTransitionPackage = null;
@@ -11079,12 +9946,7 @@
         }
         Surface.unfreezeDisplay(0);
 
-        // Reset the key delivery timeout on unfreeze, too.  We force a wakeup here
-        // too because regular key delivery processing should resume immediately.
-        synchronized (mKeyWaiter) {
-            mKeyWaiter.mWasFrozen = true;
-            mKeyWaiter.notifyAll();
-        }
+        mInputMonitor.thawInputDispatchingLw();
 
         // While the display is frozen we don't re-compute the orientation
         // to avoid inconsistent states.  However, something interesting
@@ -11116,14 +9978,13 @@
             return;
         }
 
-        pw.println("Input State:");
-        mQueue.dump(pw, "  ");
+        mInputManager.dump(pw);
         pw.println(" ");
         
         synchronized(mWindowMap) {
             pw.println("Current Window Manager state:");
             for (int i=mWindows.size()-1; i>=0; i--) {
-                WindowState w = (WindowState)mWindows.get(i);
+                WindowState w = mWindows.get(i);
                 pw.print("  Window #"); pw.print(i); pw.print(' ');
                         pw.print(w); pw.println(":");
                 w.dump(pw, "    ");
@@ -11334,24 +10195,13 @@
             }
             pw.print("  DisplayWidth="); pw.print(mDisplay.getWidth());
                     pw.print(" DisplayHeight="); pw.println(mDisplay.getHeight());
-            pw.println("  KeyWaiter state:");
-            pw.print("    mLastWin="); pw.print(mKeyWaiter.mLastWin);
-                    pw.print(" mLastBinder="); pw.println(mKeyWaiter.mLastBinder);
-            pw.print("    mFinished="); pw.print(mKeyWaiter.mFinished);
-                    pw.print(" mGotFirstWindow="); pw.print(mKeyWaiter.mGotFirstWindow);
-                    pw.print(" mEventDispatching="); pw.print(mKeyWaiter.mEventDispatching);
-                    pw.print(" mTimeToSwitch="); pw.println(mKeyWaiter.mTimeToSwitch);
         }
     }
 
+    // Called by the heartbeat to ensure locks are not held indefnitely (for deadlock detection).
     public void monitor() {
         synchronized (mWindowMap) { }
         synchronized (mKeyguardTokenWatcher) { }
-        synchronized (mKeyWaiter) { }
-    }
-
-    public void virtualKeyFeedback(KeyEvent event) {
-        mPolicy.keyFeedbackFromInput(event);
     }
 
     /**
@@ -11377,6 +10227,7 @@
                             "DimSurface",
                             -1, 16, 16, PixelFormat.OPAQUE,
                             Surface.FX_SURFACE_DIM);
+                    mDimSurface.setAlpha(0.0f);
                 } catch (Exception e) {
                     Slog.e(TAG, "Exception creating Dim surface", e);
                 }
diff --git a/services/java/com/android/server/am/ActivityManagerService.java b/services/java/com/android/server/am/ActivityManagerService.java
index 0c11940..e333a82 100644
--- a/services/java/com/android/server/am/ActivityManagerService.java
+++ b/services/java/com/android/server/am/ActivityManagerService.java
@@ -16,6 +16,8 @@
 
 package com.android.server.am;
 
+import com.android.internal.R;
+import com.android.internal.app.HeavyWeightSwitcherActivity;
 import com.android.internal.os.BatteryStatsImpl;
 import com.android.server.AttributeCache;
 import com.android.server.IntentResolver;
@@ -24,6 +26,7 @@
 import com.android.server.SystemServer;
 import com.android.server.Watchdog;
 import com.android.server.WindowManagerService;
+import com.android.server.am.ActivityStack.ActivityState;
 
 import dalvik.system.Zygote;
 
@@ -32,6 +35,7 @@
 import android.app.ActivityManagerNative;
 import android.app.ActivityThread;
 import android.app.AlertDialog;
+import android.app.AppGlobals;
 import android.app.ApplicationErrorReport;
 import android.app.Dialog;
 import android.app.IActivityController;
@@ -39,10 +43,12 @@
 import android.app.IActivityWatcher;
 import android.app.IApplicationThread;
 import android.app.IInstrumentationWatcher;
+import android.app.INotificationManager;
 import android.app.IServiceConnection;
 import android.app.IThumbnailReceiver;
 import android.app.Instrumentation;
 import android.app.Notification;
+import android.app.NotificationManager;
 import android.app.PendingIntent;
 import android.app.ResultInfo;
 import android.app.Service;
@@ -69,6 +75,7 @@
 import android.content.pm.ProviderInfo;
 import android.content.pm.ResolveInfo;
 import android.content.pm.ServiceInfo;
+import android.content.pm.PackageManager.NameNotFoundException;
 import android.content.res.Configuration;
 import android.graphics.Bitmap;
 import android.net.Uri;
@@ -92,6 +99,7 @@
 import android.os.RemoteCallbackList;
 import android.os.RemoteException;
 import android.os.ServiceManager;
+import android.os.StrictMode;
 import android.os.SystemClock;
 import android.os.SystemProperties;
 import android.provider.Settings;
@@ -176,47 +184,21 @@
 
     // Maximum number of recent tasks that we can remember.
     static final int MAX_RECENT_TASKS = 20;
-
+    
     // Amount of time after a call to stopAppSwitches() during which we will
     // prevent further untrusted switches from happening.
     static final long APP_SWITCH_DELAY_TIME = 5*1000;
-    
-    // How long until we reset a task when the user returns to it.  Currently
-    // 30 minutes.
-    static final long ACTIVITY_INACTIVE_RESET_TIME = 1000*60*30;
-    
-    // Set to true to disable the icon that is shown while a new activity
-    // is being started.
-    static final boolean SHOW_APP_STARTING_ICON = true;
-
-    // How long we wait until giving up on the last activity to pause.  This
-    // is short because it directly impacts the responsiveness of starting the
-    // next activity.
-    static final int PAUSE_TIMEOUT = 500;
-
-    /**
-     * How long we can hold the launch wake lock before giving up.
-     */
-    static final int LAUNCH_TIMEOUT = 10*1000;
 
     // How long we wait for a launched process to attach to the activity manager
     // before we decide it's never going to come up for real.
     static final int PROC_START_TIMEOUT = 10*1000;
 
-    // How long we wait until giving up on the last activity telling us it
-    // is idle.
-    static final int IDLE_TIMEOUT = 10*1000;
-
     // How long to wait after going idle before forcing apps to GC.
     static final int GC_TIMEOUT = 5*1000;
 
     // The minimum amount of time between successive GC requests for a process.
     static final int GC_MIN_INTERVAL = 60*1000;
 
-    // How long we wait until giving up on an activity telling us it has
-    // finished destroying itself.
-    static final int DESTROY_TIMEOUT = 10*1000;
-    
     // How long we allow a receiver to run before giving up on it.
     static final int BROADCAST_TIMEOUT = 10*1000;
 
@@ -283,6 +265,17 @@
     // system/rootdir/init.rc on startup.
     static final int SECONDARY_SERVER_ADJ;
 
+    // This is a process with a heavy-weight application.  It is in the
+    // background, but we want to try to avoid killing it.  Value set in
+    // system/rootdir/init.rc on startup.
+    static final int HEAVY_WEIGHT_APP_ADJ;
+
+    // This is a process only hosting components that are perceptible to the
+    // user, and we really want to avoid killing them, but they are not
+    // immediately visible. An example is background music playback.  Value set in
+    // system/rootdir/init.rc on startup.
+    static final int PERCEPTIBLE_APP_ADJ;
+
     // This is a process only hosting activities that are visible to the
     // user, so we'd prefer they don't disappear. Value set in
     // system/rootdir/init.rc on startup.
@@ -308,6 +301,8 @@
     static final int HOME_APP_MEM;
     static final int BACKUP_APP_MEM;
     static final int SECONDARY_SERVER_MEM;
+    static final int HEAVY_WEIGHT_APP_MEM;
+    static final int PERCEPTIBLE_APP_MEM;
     static final int VISIBLE_APP_MEM;
     static final int FOREGROUND_APP_MEM;
 
@@ -328,68 +323,55 @@
     // been idle for less than 120 seconds.
     static final long EMPTY_APP_IDLE_OFFSET = 120*1000;
     
+    static int getIntProp(String name, boolean allowZero) {
+        String str = SystemProperties.get(name);
+        if (str == null) {
+            throw new IllegalArgumentException("Property not defined: " + name);
+        }
+        int val = Integer.valueOf(str);
+        if (val == 0 && !allowZero) {
+            throw new IllegalArgumentException("Property must not be zero: " + name);
+        }
+        return val;
+    }
+    
     static {
         // These values are set in system/rootdir/init.rc on startup.
-        FOREGROUND_APP_ADJ =
-            Integer.valueOf(SystemProperties.get("ro.FOREGROUND_APP_ADJ"));
-        VISIBLE_APP_ADJ =
-            Integer.valueOf(SystemProperties.get("ro.VISIBLE_APP_ADJ"));
-        SECONDARY_SERVER_ADJ =
-            Integer.valueOf(SystemProperties.get("ro.SECONDARY_SERVER_ADJ"));
-        BACKUP_APP_ADJ =
-            Integer.valueOf(SystemProperties.get("ro.BACKUP_APP_ADJ"));
-        HOME_APP_ADJ =
-            Integer.valueOf(SystemProperties.get("ro.HOME_APP_ADJ"));
-        HIDDEN_APP_MIN_ADJ =
-            Integer.valueOf(SystemProperties.get("ro.HIDDEN_APP_MIN_ADJ"));
-        EMPTY_APP_ADJ =
-            Integer.valueOf(SystemProperties.get("ro.EMPTY_APP_ADJ"));
-        HIDDEN_APP_MAX_ADJ = EMPTY_APP_ADJ-1;
-        FOREGROUND_APP_MEM =
-            Integer.valueOf(SystemProperties.get("ro.FOREGROUND_APP_MEM"))*PAGE_SIZE;
-        VISIBLE_APP_MEM =
-            Integer.valueOf(SystemProperties.get("ro.VISIBLE_APP_MEM"))*PAGE_SIZE;
-        SECONDARY_SERVER_MEM =
-            Integer.valueOf(SystemProperties.get("ro.SECONDARY_SERVER_MEM"))*PAGE_SIZE;
-        BACKUP_APP_MEM =
-            Integer.valueOf(SystemProperties.get("ro.BACKUP_APP_MEM"))*PAGE_SIZE;
-        HOME_APP_MEM =
-            Integer.valueOf(SystemProperties.get("ro.HOME_APP_MEM"))*PAGE_SIZE;
-        HIDDEN_APP_MEM =
-            Integer.valueOf(SystemProperties.get("ro.HIDDEN_APP_MEM"))*PAGE_SIZE;
-        EMPTY_APP_MEM =
-            Integer.valueOf(SystemProperties.get("ro.EMPTY_APP_MEM"))*PAGE_SIZE;
+        FOREGROUND_APP_ADJ = getIntProp("ro.FOREGROUND_APP_ADJ", true);
+        VISIBLE_APP_ADJ = getIntProp("ro.VISIBLE_APP_ADJ", true);
+        PERCEPTIBLE_APP_ADJ = getIntProp("ro.PERCEPTIBLE_APP_ADJ", true);
+        HEAVY_WEIGHT_APP_ADJ = getIntProp("ro.HEAVY_WEIGHT_APP_ADJ", true);
+        SECONDARY_SERVER_ADJ = getIntProp("ro.SECONDARY_SERVER_ADJ", true);
+        BACKUP_APP_ADJ = getIntProp("ro.BACKUP_APP_ADJ", true);
+        HOME_APP_ADJ = getIntProp("ro.HOME_APP_ADJ", true);
+        HIDDEN_APP_MIN_ADJ = getIntProp("ro.HIDDEN_APP_MIN_ADJ", true);
+        EMPTY_APP_ADJ = getIntProp("ro.EMPTY_APP_ADJ", true);
+        // These days we use the last empty slot for hidden apps as well.
+        HIDDEN_APP_MAX_ADJ = EMPTY_APP_ADJ;
+        FOREGROUND_APP_MEM = getIntProp("ro.FOREGROUND_APP_MEM", false)*PAGE_SIZE;
+        VISIBLE_APP_MEM = getIntProp("ro.VISIBLE_APP_MEM", false)*PAGE_SIZE;
+        PERCEPTIBLE_APP_MEM = getIntProp("ro.PERCEPTIBLE_APP_MEM", false)*PAGE_SIZE;
+        HEAVY_WEIGHT_APP_MEM = getIntProp("ro.HEAVY_WEIGHT_APP_MEM", false)*PAGE_SIZE;
+        SECONDARY_SERVER_MEM = getIntProp("ro.SECONDARY_SERVER_MEM", false)*PAGE_SIZE;
+        BACKUP_APP_MEM = getIntProp("ro.BACKUP_APP_MEM", false)*PAGE_SIZE;
+        HOME_APP_MEM = getIntProp("ro.HOME_APP_MEM", false)*PAGE_SIZE;
+        HIDDEN_APP_MEM = getIntProp("ro.HIDDEN_APP_MEM", false)*PAGE_SIZE;
+        EMPTY_APP_MEM = getIntProp("ro.EMPTY_APP_MEM", false)*PAGE_SIZE;
     }
     
     static final int MY_PID = Process.myPid();
     
     static final String[] EMPTY_STRING_ARRAY = new String[0];
 
-    enum ActivityState {
-        INITIALIZING,
-        RESUMED,
-        PAUSING,
-        PAUSED,
-        STOPPING,
-        STOPPED,
-        FINISHING,
-        DESTROYING,
-        DESTROYED
-    }
-
-    /**
-     * The back history of all previous (and possibly still
-     * running) activities.  It contains HistoryRecord objects.
-     */
-    final ArrayList mHistory = new ArrayList();
-
+    public ActivityStack mMainStack;
+    
     /**
      * Description of a request to start a new activity, which has been held
      * due to app switches being disabled.
      */
-    class PendingActivityLaunch {
-        HistoryRecord r;
-        HistoryRecord sourceRecord;
+    static class PendingActivityLaunch {
+        ActivityRecord r;
+        ActivityRecord sourceRecord;
         Uri[] grantedUriPermissions;
         int grantedMode;
         boolean onlyIfNeeded;
@@ -399,18 +381,6 @@
             = new ArrayList<PendingActivityLaunch>();
     
     /**
-     * List of people waiting to find out about the next launched activity.
-     */
-    final ArrayList<IActivityManager.WaitResult> mWaitingActivityLaunched
-            = new ArrayList<IActivityManager.WaitResult>();
-    
-    /**
-     * List of people waiting to find out about the next visible activity.
-     */
-    final ArrayList<IActivityManager.WaitResult> mWaitingActivityVisible
-            = new ArrayList<IActivityManager.WaitResult>();
-    
-    /**
      * List of all active broadcasts that are to be executed immediately
      * (without waiting for another broadcast to finish).  Currently this only
      * contains broadcasts to registered receivers, to avoid spinning up
@@ -440,56 +410,9 @@
     boolean mBroadcastsScheduled = false;
 
     /**
-     * Set to indicate whether to issue an onUserLeaving callback when a
-     * newly launched activity is being brought in front of us.
-     */
-    boolean mUserLeaving = false;
-
-    /**
-     * When we are in the process of pausing an activity, before starting the
-     * next one, this variable holds the activity that is currently being paused.
-     */
-    HistoryRecord mPausingActivity = null;
-
-    /**
-     * Current activity that is resumed, or null if there is none.
-     */
-    HistoryRecord mResumedActivity = null;
-
-    /**
      * Activity we have told the window manager to have key focus.
      */
-    HistoryRecord mFocusedActivity = null;
-
-    /**
-     * This is the last activity that we put into the paused state.  This is
-     * used to determine if we need to do an activity transition while sleeping,
-     * when we normally hold the top activity paused.
-     */
-    HistoryRecord mLastPausedActivity = null;
-
-    /**
-     * List of activities that are waiting for a new activity
-     * to become visible before completing whatever operation they are
-     * supposed to do.
-     */
-    final ArrayList mWaitingVisibleActivities = new ArrayList();
-
-    /**
-     * List of activities that are ready to be stopped, but waiting
-     * for the next activity to settle down before doing so.  It contains
-     * HistoryRecord objects.
-     */
-    final ArrayList<HistoryRecord> mStoppingActivities
-            = new ArrayList<HistoryRecord>();
-
-    /**
-     * Animations that for the current transition have requested not to
-     * be considered for the transition animation.
-     */
-    final ArrayList<HistoryRecord> mNoAnimActivities
-            = new ArrayList<HistoryRecord>();
-    
+    ActivityRecord mFocusedActivity = null;
     /**
      * List of intents that were used to start the most recent tasks.
      */
@@ -497,13 +420,6 @@
             = new ArrayList<TaskRecord>();
 
     /**
-     * List of activities that are ready to be finished, but waiting
-     * for the previous activity to settle down before doing so.  It contains
-     * HistoryRecord objects.
-     */
-    final ArrayList mFinishingActivities = new ArrayList();
-
-    /**
      * All of the applications we currently have running organized by name.
      * The keys are strings of the application package name (as
      * returned by the package manager), and the keys are ApplicationRecord
@@ -513,6 +429,11 @@
             = new ProcessMap<ProcessRecord>();
 
     /**
+     * The currently running heavy-weight process, if any.
+     */
+    ProcessRecord mHeavyWeightProcess = null;
+    
+    /**
      * The last time that various processes have crashed.
      */
     final ProcessMap<Long> mProcessCrashTimes = new ProcessMap<Long>();
@@ -598,16 +519,9 @@
      * This is the process holding what we currently consider to be
      * the "home" activity.
      */
-    private ProcessRecord mHomeProcess;
+    ProcessRecord mHomeProcess;
     
     /**
-     * List of running activities, sorted by recent usage.
-     * The first entry in the list is the least recently used.
-     * It contains HistoryRecord objects.
-     */
-    private final ArrayList mLRUActivities = new ArrayList();
-
-    /**
      * Set of PendingResultRecord objects that are currently active.
      */
     final HashSet mPendingResultRecords = new HashSet();
@@ -619,6 +533,24 @@
             = new HashMap<PendingIntentRecord.Key, WeakReference<PendingIntentRecord>>();
 
     /**
+     * Fingerprints (String.hashCode()) of stack traces that we've
+     * already logged DropBox entries for.  Guarded by itself.  If
+     * something (rogue user app) forces this over
+     * MAX_DUP_SUPPRESSED_STACKS entries, the contents are cleared.
+     */
+    private final HashSet<Integer> mAlreadyLoggedViolatedStacks = new HashSet<Integer>();
+    private static final int MAX_DUP_SUPPRESSED_STACKS = 5000;
+
+    /**
+     * Strict Mode background batched logging state.
+     *
+     * The string buffer is guarded by itself, and its lock is also
+     * used to determine if another batched write is already
+     * in-flight.
+     */
+    private final StringBuilder mStrictModeBuffer = new StringBuilder();
+
+    /**
      * Intent broadcast that we have tried to start, but are
      * waiting for its application's process to be created.  We only
      * need one (instead of a list) because we always process broadcasts
@@ -726,21 +658,24 @@
      * that a single provider may be published under multiple names, so
      * there may be multiple entries here for a single one in mProvidersByClass.
      */
-    final HashMap mProvidersByName = new HashMap();
+    final HashMap<String, ContentProviderRecord> mProvidersByName
+            = new HashMap<String, ContentProviderRecord>();
 
     /**
      * All of the currently running global content providers.  Keys are a
      * string containing the provider's implementation class and values are a
      * ContentProviderRecord object containing the data about it.
      */
-    final HashMap mProvidersByClass = new HashMap();
+    final HashMap<String, ContentProviderRecord> mProvidersByClass
+            = new HashMap<String, ContentProviderRecord>();
 
     /**
      * List of content providers who have clients waiting for them.  The
      * application is currently being launched and the provider will be
      * removed from this list once it is published.
      */
-    final ArrayList mLaunchingProviders = new ArrayList();
+    final ArrayList<ContentProviderRecord> mLaunchingProviders
+            = new ArrayList<ContentProviderRecord>();
 
     /**
      * Global set of specific Uri permissions that have been granted.
@@ -789,12 +724,6 @@
     int mConfigurationSeq = 0;
     
     /**
-     * Set when we know we are going to be calling updateConfiguration()
-     * soon, so want to skip intermediate config checks.
-     */
-    boolean mConfigWillChange;
-    
-    /**
      * Hardware-reported OpenGLES version.
      */
     final int GL_ES_VERSION;
@@ -850,21 +779,6 @@
      * Set if we are shutting down the system, similar to sleeping.
      */
     boolean mShuttingDown = false;
-    
-    /**
-     * Set when the system is going to sleep, until we have
-     * successfully paused the current activity and released our wake lock.
-     * At that point the system is allowed to actually sleep.
-     */
-    PowerManager.WakeLock mGoingToSleep;
-
-    /**
-     * We don't want to allow the device to go to sleep while in the process
-     * of launching an activity.  This is primarily to allow alarm intent
-     * receivers to launch an activity and get that to run before the device
-     * goes back to sleep.
-     */
-    PowerManager.WakeLock mLaunchingActivity;
 
     /**
      * Task identifier that activities are currently being started
@@ -944,8 +858,6 @@
 
     long mLastWriteTime = 0;
 
-    long mInitialStartTime = 0;
-    
     /**
      * Set to true after the system has finished booting.
      */
@@ -977,7 +889,6 @@
             if (localLOGV) Slog.v(
                 TAG, "Death received in " + this
                 + " for thread " + mAppThread.asBinder());
-            removeRequestedPss(mApp);
             synchronized(ActivityManagerService.this) {
                 appDiedLocked(mApp, mPid, mAppThread);
             }
@@ -992,20 +903,17 @@
     static final int WAIT_FOR_DEBUGGER_MSG = 6;
     static final int BROADCAST_INTENT_MSG = 7;
     static final int BROADCAST_TIMEOUT_MSG = 8;
-    static final int PAUSE_TIMEOUT_MSG = 9;
-    static final int IDLE_TIMEOUT_MSG = 10;
-    static final int IDLE_NOW_MSG = 11;
     static final int SERVICE_TIMEOUT_MSG = 12;
     static final int UPDATE_TIME_ZONE = 13;
     static final int SHOW_UID_ERROR_MSG = 14;
     static final int IM_FEELING_LUCKY_MSG = 15;
-    static final int LAUNCH_TIMEOUT_MSG = 16;
-    static final int DESTROY_TIMEOUT_MSG = 17;
-    static final int RESUME_TOP_ACTIVITY_MSG = 19;
     static final int PROC_START_TIMEOUT_MSG = 20;
     static final int DO_PENDING_ACTIVITY_LAUNCHES_MSG = 21;
     static final int KILL_APPLICATION_MSG = 22;
     static final int FINALIZE_PENDING_INTENT_MSG = 23;
+    static final int POST_HEAVY_NOTIFICATION_MSG = 24;
+    static final int CANCEL_HEAVY_NOTIFICATION_MSG = 25;
+    static final int SHOW_STRICT_MODE_VIOLATION_MSG = 26;
 
     AlertDialog mUidAlert;
 
@@ -1052,13 +960,38 @@
                             false, false, MY_PID, Process.SYSTEM_UID);
 
                     Dialog d = new AppNotRespondingDialog(ActivityManagerService.this,
-                            mContext, proc, (HistoryRecord)data.get("activity"));
+                            mContext, proc, (ActivityRecord)data.get("activity"));
                     d.show();
                     proc.anrDialog = d;
                 }
                 
                 ensureBootCompleted();
             } break;
+            case SHOW_STRICT_MODE_VIOLATION_MSG: {
+                HashMap<String, Object> data = (HashMap<String, Object>) msg.obj;
+                synchronized (ActivityManagerService.this) {
+                    ProcessRecord proc = (ProcessRecord) data.get("app");
+                    if (proc == null) {
+                        Slog.e(TAG, "App not found when showing strict mode dialog.");
+                        break;
+                    }
+                    if (proc.crashDialog != null) {
+                        Slog.e(TAG, "App already has strict mode dialog: " + proc);
+                        return;
+                    }
+                    AppErrorResult res = (AppErrorResult) data.get("result");
+                    if (!mSleeping && !mShuttingDown) {
+                        Dialog d = new StrictModeViolationDialog(mContext, res, proc);
+                        d.show();
+                        proc.crashDialog = d;
+                    } else {
+                        // The device is asleep, so just pretend that the user
+                        // saw a crash dialog and hit "force quit".
+                        res.set(0);
+                    }
+                }
+                ensureBootCompleted();
+            } break;
             case SHOW_FACTORY_ERROR_MSG: {
                 Dialog d = new FactoryErrorDialog(
                     mContext, msg.getData().getCharSequence("msg"));
@@ -1113,38 +1046,6 @@
                     broadcastTimeout();
                 }
             } break;
-            case PAUSE_TIMEOUT_MSG: {
-                IBinder token = (IBinder)msg.obj;
-                // We don't at this point know if the activity is fullscreen,
-                // so we need to be conservative and assume it isn't.
-                Slog.w(TAG, "Activity pause timeout for " + token);
-                activityPaused(token, null, true);
-            } break;
-            case IDLE_TIMEOUT_MSG: {
-                if (mDidDexOpt) {
-                    mDidDexOpt = false;
-                    Message nmsg = mHandler.obtainMessage(IDLE_TIMEOUT_MSG);
-                    nmsg.obj = msg.obj;
-                    mHandler.sendMessageDelayed(nmsg, IDLE_TIMEOUT);
-                    return;
-                }
-                // We don't at this point know if the activity is fullscreen,
-                // so we need to be conservative and assume it isn't.
-                IBinder token = (IBinder)msg.obj;
-                Slog.w(TAG, "Activity idle timeout for " + token);
-                activityIdleInternal(token, true, null);
-            } break;
-            case DESTROY_TIMEOUT_MSG: {
-                IBinder token = (IBinder)msg.obj;
-                // We don't at this point know if the activity is fullscreen,
-                // so we need to be conservative and assume it isn't.
-                Slog.w(TAG, "Activity destroy timeout for " + token);
-                activityDestroyed(token);
-            } break;
-            case IDLE_NOW_MSG: {
-                IBinder token = (IBinder)msg.obj;
-                activityIdle(token, null);
-            } break;
             case SERVICE_TIMEOUT_MSG: {
                 if (mDidDexOpt) {
                     mDidDexOpt = false;
@@ -1187,25 +1088,6 @@
                     mUidAlert = null;
                 }
             } break;
-            case LAUNCH_TIMEOUT_MSG: {
-                if (mDidDexOpt) {
-                    mDidDexOpt = false;
-                    Message nmsg = mHandler.obtainMessage(LAUNCH_TIMEOUT_MSG);
-                    mHandler.sendMessageDelayed(nmsg, LAUNCH_TIMEOUT);
-                    return;
-                }
-                synchronized (ActivityManagerService.this) {
-                    if (mLaunchingActivity.isHeld()) {
-                        Slog.w(TAG, "Launch timeout has expired, giving up wake lock!");
-                        mLaunchingActivity.release();
-                    }
-                }
-            } break;
-            case RESUME_TOP_ACTIVITY_MSG: {
-                synchronized (ActivityManagerService.this) {
-                    resumeTopActivityLocked(null);
-                }
-            } break;
             case PROC_START_TIMEOUT_MSG: {
                 if (mDidDexOpt) {
                     mDidDexOpt = false;
@@ -1235,6 +1117,62 @@
             case FINALIZE_PENDING_INTENT_MSG: {
                 ((PendingIntentRecord)msg.obj).completeFinalize();
             } break;
+            case POST_HEAVY_NOTIFICATION_MSG: {
+                INotificationManager inm = NotificationManager.getService();
+                if (inm == null) {
+                    return;
+                }
+                
+                ActivityRecord root = (ActivityRecord)msg.obj;
+                ProcessRecord process = root.app;
+                if (process == null) {
+                    return;
+                }
+                
+                try {
+                    Context context = mContext.createPackageContext(process.info.packageName, 0);
+                    String text = mContext.getString(R.string.heavy_weight_notification,
+                            context.getApplicationInfo().loadLabel(context.getPackageManager()));
+                    Notification notification = new Notification();
+                    notification.icon = com.android.internal.R.drawable.stat_sys_adb; //context.getApplicationInfo().icon;
+                    notification.when = 0;
+                    notification.flags = Notification.FLAG_ONGOING_EVENT;
+                    notification.tickerText = text;
+                    notification.defaults = 0; // please be quiet
+                    notification.sound = null;
+                    notification.vibrate = null;
+                    notification.setLatestEventInfo(context, text,
+                            mContext.getText(R.string.heavy_weight_notification_detail),
+                            PendingIntent.getActivity(mContext, 0, root.intent,
+                                    PendingIntent.FLAG_CANCEL_CURRENT));
+                    
+                    try {
+                        int[] outId = new int[1];
+                        inm.enqueueNotification("android", R.string.heavy_weight_notification,
+                                notification, outId);
+                    } catch (RuntimeException e) {
+                        Slog.w(ActivityManagerService.TAG,
+                                "Error showing notification for heavy-weight app", e);
+                    } catch (RemoteException e) {
+                    }
+                } catch (NameNotFoundException e) {
+                    Log.w(TAG, "Unable to create context for heavy notification", e);
+                }
+            } break;
+            case CANCEL_HEAVY_NOTIFICATION_MSG: {
+                INotificationManager inm = NotificationManager.getService();
+                if (inm == null) {
+                    return;
+                }
+                try {
+                    inm.cancelNotification("android",
+                            R.string.heavy_weight_notification);
+                } catch (RuntimeException e) {
+                    Slog.w(ActivityManagerService.TAG,
+                            "Error canceling notification for service", e);
+                } catch (RemoteException e) {
+                }
+            } break;
             }
         }
     };
@@ -1298,11 +1236,7 @@
         Context context = at.getSystemContext();
         m.mContext = context;
         m.mFactoryTest = factoryTest;
-        PowerManager pm =
-            (PowerManager)context.getSystemService(Context.POWER_SERVICE);
-        m.mGoingToSleep = pm.newWakeLock(PowerManager.PARTIAL_WAKE_LOCK, "ActivityManager-Sleep");
-        m.mLaunchingActivity = pm.newWakeLock(PowerManager.PARTIAL_WAKE_LOCK, "ActivityManager-Launch");
-        m.mLaunchingActivity.setReferenceCounted(false);
+        m.mMainStack = new ActivityStack(m, context, true);
         
         m.mBatteryStatsService.publish(context);
         m.mUsageStatsService.publish(context);
@@ -1334,6 +1268,7 @@
 
             android.os.Process.setThreadPriority(
                     android.os.Process.THREAD_PRIORITY_FOREGROUND);
+            android.os.Process.setCanSelfBackground(false);
 
             ActivityManagerService m = new ActivityManagerService();
 
@@ -1591,7 +1526,7 @@
         return mAppBindArgs;
     }
 
-    private final void setFocusedActivityLocked(HistoryRecord r) {
+    final void setFocusedActivityLocked(ActivityRecord r) {
         if (mFocusedActivity != r) {
             mFocusedActivity = r;
             mWindowManager.setFocusedApp(r, true);
@@ -1676,65 +1611,13 @@
         }
     }
 
-    private final void updateLruProcessLocked(ProcessRecord app,
+    final void updateLruProcessLocked(ProcessRecord app,
             boolean oomAdj, boolean updateActivityTime) {
         mLruSeq++;
         updateLruProcessInternalLocked(app, oomAdj, updateActivityTime, 0);
     }
     
-    private final boolean updateLRUListLocked(HistoryRecord r) {
-        final boolean hadit = mLRUActivities.remove(r);
-        mLRUActivities.add(r);
-        return hadit;
-    }
-
-    private final HistoryRecord topRunningActivityLocked(HistoryRecord notTop) {
-        int i = mHistory.size()-1;
-        while (i >= 0) {
-            HistoryRecord r = (HistoryRecord)mHistory.get(i);
-            if (!r.finishing && r != notTop) {
-                return r;
-            }
-            i--;
-        }
-        return null;
-    }
-
-    private final HistoryRecord topRunningNonDelayedActivityLocked(HistoryRecord notTop) {
-        int i = mHistory.size()-1;
-        while (i >= 0) {
-            HistoryRecord r = (HistoryRecord)mHistory.get(i);
-            if (!r.finishing && !r.delayedResume && r != notTop) {
-                return r;
-            }
-            i--;
-        }
-        return null;
-    }
-
-    /**
-     * This is a simplified version of topRunningActivityLocked that provides a number of
-     * optional skip-over modes.  It is intended for use with the ActivityController hook only.
-     * 
-     * @param token If non-null, any history records matching this token will be skipped.
-     * @param taskId If non-zero, we'll attempt to skip over records with the same task ID.
-     * 
-     * @return Returns the HistoryRecord of the next activity on the stack.
-     */
-    private final HistoryRecord topRunningActivityLocked(IBinder token, int taskId) {
-        int i = mHistory.size()-1;
-        while (i >= 0) {
-            HistoryRecord r = (HistoryRecord)mHistory.get(i);
-            // Note: the taskId check depends on real taskId fields being non-zero
-            if (!r.finishing && (token != r) && (taskId != r.task.taskId)) {
-                return r;
-            }
-            i--;
-        }
-        return null;
-    }
-
-    private final ProcessRecord getProcessRecordLocked(
+    final ProcessRecord getProcessRecordLocked(
             String processName, int uid) {
         if (uid == Process.SYSTEM_UID) {
             // The system gets to run in any process.  If there are multiple
@@ -1748,8 +1631,8 @@
         return proc;
     }
 
-    private void ensurePackageDexOpt(String packageName) {
-        IPackageManager pm = ActivityThread.getPackageManager();
+    void ensurePackageDexOpt(String packageName) {
+        IPackageManager pm = AppGlobals.getPackageManager();
         try {
             if (pm.performDexOpt(packageName)) {
                 mDidDexOpt = true;
@@ -1758,157 +1641,14 @@
         }
     }
     
-    private boolean isNextTransitionForward() {
+    boolean isNextTransitionForward() {
         int transit = mWindowManager.getPendingAppTransition();
         return transit == WindowManagerPolicy.TRANSIT_ACTIVITY_OPEN
                 || transit == WindowManagerPolicy.TRANSIT_TASK_OPEN
                 || transit == WindowManagerPolicy.TRANSIT_TASK_TO_FRONT;
     }
     
-    private final boolean realStartActivityLocked(HistoryRecord r,
-            ProcessRecord app, boolean andResume, boolean checkConfig)
-            throws RemoteException {
-
-        r.startFreezingScreenLocked(app, 0);
-        mWindowManager.setAppVisibility(r, true);
-
-        // Have the window manager re-evaluate the orientation of
-        // the screen based on the new activity order.  Note that
-        // as a result of this, it can call back into the activity
-        // manager with a new orientation.  We don't care about that,
-        // because the activity is not currently running so we are
-        // just restarting it anyway.
-        if (checkConfig) {
-            Configuration config = mWindowManager.updateOrientationFromAppTokens(
-                    mConfiguration,
-                    r.mayFreezeScreenLocked(app) ? r : null);
-            updateConfigurationLocked(config, r);
-        }
-
-        r.app = app;
-
-        if (localLOGV) Slog.v(TAG, "Launching: " + r);
-
-        int idx = app.activities.indexOf(r);
-        if (idx < 0) {
-            app.activities.add(r);
-        }
-        updateLruProcessLocked(app, true, true);
-
-        try {
-            if (app.thread == null) {
-                throw new RemoteException();
-            }
-            List<ResultInfo> results = null;
-            List<Intent> newIntents = null;
-            if (andResume) {
-                results = r.results;
-                newIntents = r.newIntents;
-            }
-            if (DEBUG_SWITCH) Slog.v(TAG, "Launching: " + r
-                    + " icicle=" + r.icicle
-                    + " with results=" + results + " newIntents=" + newIntents
-                    + " andResume=" + andResume);
-            if (andResume) {
-                EventLog.writeEvent(EventLogTags.AM_RESTART_ACTIVITY,
-                        System.identityHashCode(r),
-                        r.task.taskId, r.shortComponentName);
-            }
-            if (r.isHomeActivity) {
-                mHomeProcess = app;
-            }
-            ensurePackageDexOpt(r.intent.getComponent().getPackageName());
-            app.thread.scheduleLaunchActivity(new Intent(r.intent), r,
-                    System.identityHashCode(r),
-                    r.info, r.icicle, results, newIntents, !andResume,
-                    isNextTransitionForward());
-        } catch (RemoteException e) {
-            if (r.launchFailed) {
-                // This is the second time we failed -- finish activity
-                // and give up.
-                Slog.e(TAG, "Second failure launching "
-                      + r.intent.getComponent().flattenToShortString()
-                      + ", giving up", e);
-                appDiedLocked(app, app.pid, app.thread);
-                requestFinishActivityLocked(r, Activity.RESULT_CANCELED, null,
-                        "2nd-crash");
-                return false;
-            }
-
-            // This is the first time we failed -- restart process and
-            // retry.
-            app.activities.remove(r);
-            throw e;
-        }
-
-        r.launchFailed = false;
-        if (updateLRUListLocked(r)) {
-            Slog.w(TAG, "Activity " + r
-                  + " being launched, but already in LRU list");
-        }
-
-        if (andResume) {
-            // As part of the process of launching, ActivityThread also performs
-            // a resume.
-            r.state = ActivityState.RESUMED;
-            r.icicle = null;
-            r.haveState = false;
-            r.stopped = false;
-            mResumedActivity = r;
-            r.task.touchActiveTime();
-            completeResumeLocked(r);
-            pauseIfSleepingLocked();                
-        } else {
-            // This activity is not starting in the resumed state... which
-            // should look like we asked it to pause+stop (but remain visible),
-            // and it has done so and reported back the current icicle and
-            // other state.
-            r.state = ActivityState.STOPPED;
-            r.stopped = true;
-        }
-
-        // Launch the new version setup screen if needed.  We do this -after-
-        // launching the initial activity (that is, home), so that it can have
-        // a chance to initialize itself while in the background, making the
-        // switch back to it faster and look better.
-        startSetupActivityLocked();
-        
-        return true;
-    }
-
-    private final void startSpecificActivityLocked(HistoryRecord r,
-            boolean andResume, boolean checkConfig) {
-        // Is this activity's application already running?
-        ProcessRecord app = getProcessRecordLocked(r.processName,
-                r.info.applicationInfo.uid);
-        
-        if (r.startTime == 0) {
-            r.startTime = SystemClock.uptimeMillis();
-            if (mInitialStartTime == 0) {
-                mInitialStartTime = r.startTime;
-            }
-        } else if (mInitialStartTime == 0) {
-            mInitialStartTime = SystemClock.uptimeMillis();
-        }
-        
-        if (app != null && app.thread != null) {
-            try {
-                realStartActivityLocked(r, app, andResume, checkConfig);
-                return;
-            } catch (RemoteException e) {
-                Slog.w(TAG, "Exception when starting activity "
-                        + r.intent.getComponent().flattenToShortString(), e);
-            }
-
-            // If a dead object exception was thrown -- fall through to
-            // restart the application.
-        }
-
-        startProcessLocked(r.processName, r.info.applicationInfo, true, 0,
-                "activity", r.intent.getComponent(), false);
-    }
-
-    private final ProcessRecord startProcessLocked(String processName,
+    final ProcessRecord startProcessLocked(String processName,
             ApplicationInfo info, boolean knownToBeDead, int intentFlags,
             String hostingType, ComponentName hostingName, boolean allowWhileBooting) {
         ProcessRecord app = getProcessRecordLocked(processName, info.uid);
@@ -2054,7 +1794,7 @@
                     hostingNameStr != null ? hostingNameStr : "");
             
             if (app.persistent) {
-                Watchdog.getInstance().processStarted(app, app.processName, pid);
+                Watchdog.getInstance().processStarted(app.processName, pid);
             }
             
             StringBuilder buf = mStringBuilder;
@@ -2109,365 +1849,7 @@
         }
     }
 
-    private final void startPausingLocked(boolean userLeaving, boolean uiSleeping) {
-        if (mPausingActivity != null) {
-            RuntimeException e = new RuntimeException();
-            Slog.e(TAG, "Trying to pause when pause is already pending for "
-                  + mPausingActivity, e);
-        }
-        HistoryRecord prev = mResumedActivity;
-        if (prev == null) {
-            RuntimeException e = new RuntimeException();
-            Slog.e(TAG, "Trying to pause when nothing is resumed", e);
-            resumeTopActivityLocked(null);
-            return;
-        }
-        if (DEBUG_PAUSE) Slog.v(TAG, "Start pausing: " + prev);
-        mResumedActivity = null;
-        mPausingActivity = prev;
-        mLastPausedActivity = prev;
-        prev.state = ActivityState.PAUSING;
-        prev.task.touchActiveTime();
-
-        updateCpuStats();
-        
-        if (prev.app != null && prev.app.thread != null) {
-            if (DEBUG_PAUSE) Slog.v(TAG, "Enqueueing pending pause: " + prev);
-            try {
-                EventLog.writeEvent(EventLogTags.AM_PAUSE_ACTIVITY,
-                        System.identityHashCode(prev),
-                        prev.shortComponentName);
-                prev.app.thread.schedulePauseActivity(prev, prev.finishing, userLeaving,
-                        prev.configChangeFlags);
-                updateUsageStats(prev, false);
-            } catch (Exception e) {
-                // Ignore exception, if process died other code will cleanup.
-                Slog.w(TAG, "Exception thrown during pause", e);
-                mPausingActivity = null;
-                mLastPausedActivity = null;
-            }
-        } else {
-            mPausingActivity = null;
-            mLastPausedActivity = null;
-        }
-
-        // If we are not going to sleep, we want to ensure the device is
-        // awake until the next activity is started.
-        if (!mSleeping && !mShuttingDown) {
-            mLaunchingActivity.acquire();
-            if (!mHandler.hasMessages(LAUNCH_TIMEOUT_MSG)) {
-                // To be safe, don't allow the wake lock to be held for too long.
-                Message msg = mHandler.obtainMessage(LAUNCH_TIMEOUT_MSG);
-                mHandler.sendMessageDelayed(msg, LAUNCH_TIMEOUT);
-            }
-        }
-
-
-        if (mPausingActivity != null) {
-            // Have the window manager pause its key dispatching until the new
-            // activity has started.  If we're pausing the activity just because
-            // the screen is being turned off and the UI is sleeping, don't interrupt
-            // key dispatch; the same activity will pick it up again on wakeup.
-            if (!uiSleeping) {
-                prev.pauseKeyDispatchingLocked();
-            } else {
-                if (DEBUG_PAUSE) Slog.v(TAG, "Key dispatch not paused for screen off");
-            }
-
-            // Schedule a pause timeout in case the app doesn't respond.
-            // We don't give it much time because this directly impacts the
-            // responsiveness seen by the user.
-            Message msg = mHandler.obtainMessage(PAUSE_TIMEOUT_MSG);
-            msg.obj = prev;
-            mHandler.sendMessageDelayed(msg, PAUSE_TIMEOUT);
-            if (DEBUG_PAUSE) Slog.v(TAG, "Waiting for pause to complete...");
-        } else {
-            // This activity failed to schedule the
-            // pause, so just treat it as being paused now.
-            if (DEBUG_PAUSE) Slog.v(TAG, "Activity not running, resuming next.");
-            resumeTopActivityLocked(null);
-        }
-    }
-
-    private final void completePauseLocked() {
-        HistoryRecord prev = mPausingActivity;
-        if (DEBUG_PAUSE) Slog.v(TAG, "Complete pause: " + prev);
-        
-        if (prev != null) {
-            if (prev.finishing) {
-                if (DEBUG_PAUSE) Slog.v(TAG, "Executing finish of activity: " + prev);
-                prev = finishCurrentActivityLocked(prev, FINISH_AFTER_VISIBLE);
-            } else if (prev.app != null) {
-                if (DEBUG_PAUSE) Slog.v(TAG, "Enqueueing pending stop: " + prev);
-                if (prev.waitingVisible) {
-                    prev.waitingVisible = false;
-                    mWaitingVisibleActivities.remove(prev);
-                    if (DEBUG_SWITCH || DEBUG_PAUSE) Slog.v(
-                            TAG, "Complete pause, no longer waiting: " + prev);
-                }
-                if (prev.configDestroy) {
-                    // The previous is being paused because the configuration
-                    // is changing, which means it is actually stopping...
-                    // To juggle the fact that we are also starting a new
-                    // instance right now, we need to first completely stop
-                    // the current instance before starting the new one.
-                    if (DEBUG_PAUSE) Slog.v(TAG, "Destroying after pause: " + prev);
-                    destroyActivityLocked(prev, true);
-                } else {
-                    mStoppingActivities.add(prev);
-                    if (mStoppingActivities.size() > 3) {
-                        // If we already have a few activities waiting to stop,
-                        // then give up on things going idle and start clearing
-                        // them out.
-                        if (DEBUG_PAUSE) Slog.v(TAG, "To many pending stops, forcing idle");
-                        Message msg = Message.obtain();
-                        msg.what = ActivityManagerService.IDLE_NOW_MSG;
-                        mHandler.sendMessage(msg);
-                    }
-                }
-            } else {
-                if (DEBUG_PAUSE) Slog.v(TAG, "App died during pause, not stopping: " + prev);
-                prev = null;
-            }
-            mPausingActivity = null;
-        }
-
-        if (!mSleeping && !mShuttingDown) {
-            resumeTopActivityLocked(prev);
-        } else {
-            if (mGoingToSleep.isHeld()) {
-                mGoingToSleep.release();
-            }
-            if (mShuttingDown) {
-                notifyAll();
-            }
-        }
-        
-        if (prev != null) {
-            prev.resumeKeyDispatchingLocked();
-        }
-
-        if (prev.app != null && prev.cpuTimeAtResume > 0 && mBatteryStatsService.isOnBattery()) {
-            long diff = 0;
-            synchronized (mProcessStatsThread) {
-                diff = mProcessStats.getCpuTimeForPid(prev.app.pid) - prev.cpuTimeAtResume;
-            }
-            if (diff > 0) {
-                BatteryStatsImpl bsi = mBatteryStatsService.getActiveStatistics();
-                synchronized (bsi) {
-                    BatteryStatsImpl.Uid.Proc ps =
-                            bsi.getProcessStatsLocked(prev.info.applicationInfo.uid,
-                            prev.info.packageName);
-                    if (ps != null) {
-                        ps.addForegroundTimeLocked(diff);
-                    }
-                }
-            }
-        }
-        prev.cpuTimeAtResume = 0; // reset it
-    }
-
-    /**
-     * Once we know that we have asked an application to put an activity in
-     * the resumed state (either by launching it or explicitly telling it),
-     * this function updates the rest of our state to match that fact.
-     */
-    private final void completeResumeLocked(HistoryRecord next) {
-        next.idle = false;
-        next.results = null;
-        next.newIntents = null;
-
-        // schedule an idle timeout in case the app doesn't do it for us.
-        Message msg = mHandler.obtainMessage(IDLE_TIMEOUT_MSG);
-        msg.obj = next;
-        mHandler.sendMessageDelayed(msg, IDLE_TIMEOUT);
-
-        if (false) {
-            // The activity was never told to pause, so just keep
-            // things going as-is.  To maintain our own state,
-            // we need to emulate it coming back and saying it is
-            // idle.
-            msg = mHandler.obtainMessage(IDLE_NOW_MSG);
-            msg.obj = next;
-            mHandler.sendMessage(msg);
-        }
-
-        reportResumedActivityLocked(next);
-        
-        next.thumbnail = null;
-        setFocusedActivityLocked(next);
-        next.resumeKeyDispatchingLocked();
-        ensureActivitiesVisibleLocked(null, 0);
-        mWindowManager.executeAppTransition();
-        mNoAnimActivities.clear();
-
-        // Mark the point when the activity is resuming
-        // TODO: To be more accurate, the mark should be before the onCreate,
-        //       not after the onResume. But for subsequent starts, onResume is fine.
-        if (next.app != null) {
-            synchronized (mProcessStatsThread) {
-                next.cpuTimeAtResume = mProcessStats.getCpuTimeForPid(next.app.pid);
-            }
-        } else {
-            next.cpuTimeAtResume = 0; // Couldn't get the cpu time of process
-        }
-    }
-
-    /**
-     * Make sure that all activities that need to be visible (that is, they
-     * currently can be seen by the user) actually are.
-     */
-    private final void ensureActivitiesVisibleLocked(HistoryRecord top,
-            HistoryRecord starting, String onlyThisProcess, int configChanges) {
-        if (DEBUG_VISBILITY) Slog.v(
-                TAG, "ensureActivitiesVisible behind " + top
-                + " configChanges=0x" + Integer.toHexString(configChanges));
-
-        // If the top activity is not fullscreen, then we need to
-        // make sure any activities under it are now visible.
-        final int count = mHistory.size();
-        int i = count-1;
-        while (mHistory.get(i) != top) {
-            i--;
-        }
-        HistoryRecord r;
-        boolean behindFullscreen = false;
-        for (; i>=0; i--) {
-            r = (HistoryRecord)mHistory.get(i);
-            if (DEBUG_VISBILITY) Slog.v(
-                    TAG, "Make visible? " + r + " finishing=" + r.finishing
-                    + " state=" + r.state);
-            if (r.finishing) {
-                continue;
-            }
-            
-            final boolean doThisProcess = onlyThisProcess == null
-                    || onlyThisProcess.equals(r.processName);
-            
-            // First: if this is not the current activity being started, make
-            // sure it matches the current configuration.
-            if (r != starting && doThisProcess) {
-                ensureActivityConfigurationLocked(r, 0);
-            }
-            
-            if (r.app == null || r.app.thread == null) {
-                if (onlyThisProcess == null
-                        || onlyThisProcess.equals(r.processName)) {
-                    // This activity needs to be visible, but isn't even
-                    // running...  get it started, but don't resume it
-                    // at this point.
-                    if (DEBUG_VISBILITY) Slog.v(
-                            TAG, "Start and freeze screen for " + r);
-                    if (r != starting) {
-                        r.startFreezingScreenLocked(r.app, configChanges);
-                    }
-                    if (!r.visible) {
-                        if (DEBUG_VISBILITY) Slog.v(
-                                TAG, "Starting and making visible: " + r);
-                        mWindowManager.setAppVisibility(r, true);
-                    }
-                    if (r != starting) {
-                        startSpecificActivityLocked(r, false, false);
-                    }
-                }
-
-            } else if (r.visible) {
-                // If this activity is already visible, then there is nothing
-                // else to do here.
-                if (DEBUG_VISBILITY) Slog.v(
-                        TAG, "Skipping: already visible at " + r);
-                r.stopFreezingScreenLocked(false);
-
-            } else if (onlyThisProcess == null) {
-                // This activity is not currently visible, but is running.
-                // Tell it to become visible.
-                r.visible = true;
-                if (r.state != ActivityState.RESUMED && r != starting) {
-                    // If this activity is paused, tell it
-                    // to now show its window.
-                    if (DEBUG_VISBILITY) Slog.v(
-                            TAG, "Making visible and scheduling visibility: " + r);
-                    try {
-                        mWindowManager.setAppVisibility(r, true);
-                        r.app.thread.scheduleWindowVisibility(r, true);
-                        r.stopFreezingScreenLocked(false);
-                    } catch (Exception e) {
-                        // Just skip on any failure; we'll make it
-                        // visible when it next restarts.
-                        Slog.w(TAG, "Exception thrown making visibile: "
-                                + r.intent.getComponent(), e);
-                    }
-                }
-            }
-
-            // Aggregate current change flags.
-            configChanges |= r.configChangeFlags;
-
-            if (r.fullscreen) {
-                // At this point, nothing else needs to be shown
-                if (DEBUG_VISBILITY) Slog.v(
-                        TAG, "Stopping: fullscreen at " + r);
-                behindFullscreen = true;
-                i--;
-                break;
-            }
-        }
-
-        // Now for any activities that aren't visible to the user, make
-        // sure they no longer are keeping the screen frozen.
-        while (i >= 0) {
-            r = (HistoryRecord)mHistory.get(i);
-            if (DEBUG_VISBILITY) Slog.v(
-                    TAG, "Make invisible? " + r + " finishing=" + r.finishing
-                    + " state=" + r.state
-                    + " behindFullscreen=" + behindFullscreen);
-            if (!r.finishing) {
-                if (behindFullscreen) {
-                    if (r.visible) {
-                        if (DEBUG_VISBILITY) Slog.v(
-                                TAG, "Making invisible: " + r);
-                        r.visible = false;
-                        try {
-                            mWindowManager.setAppVisibility(r, false);
-                            if ((r.state == ActivityState.STOPPING
-                                    || r.state == ActivityState.STOPPED)
-                                    && r.app != null && r.app.thread != null) {
-                                if (DEBUG_VISBILITY) Slog.v(
-                                        TAG, "Scheduling invisibility: " + r);
-                                r.app.thread.scheduleWindowVisibility(r, false);
-                            }
-                        } catch (Exception e) {
-                            // Just skip on any failure; we'll make it
-                            // visible when it next restarts.
-                            Slog.w(TAG, "Exception thrown making hidden: "
-                                    + r.intent.getComponent(), e);
-                        }
-                    } else {
-                        if (DEBUG_VISBILITY) Slog.v(
-                                TAG, "Already invisible: " + r);
-                    }
-                } else if (r.fullscreen) {
-                    if (DEBUG_VISBILITY) Slog.v(
-                            TAG, "Now behindFullscreen: " + r);
-                    behindFullscreen = true;
-                }
-            }
-            i--;
-        }
-    }
-
-    /**
-     * Version of ensureActivitiesVisible that can easily be called anywhere.
-     */
-    private final void ensureActivitiesVisibleLocked(HistoryRecord starting,
-            int configChanges) {
-        HistoryRecord r = topRunningActivityLocked(null);
-        if (r != null) {
-            ensureActivitiesVisibleLocked(r, starting, null, configChanges);
-        }
-    }
-    
-    private void updateUsageStats(HistoryRecord resumedComponent, boolean resumed) {
+    void updateUsageStats(ActivityRecord resumedComponent, boolean resumed) {
         if (resumed) {
             mUsageStatsService.noteResumeComponent(resumedComponent.realActivity);
         } else {
@@ -2475,7 +1857,7 @@
         }
     }
 
-    private boolean startHomeActivityLocked() {
+    boolean startHomeActivityLocked() {
         if (mFactoryTest == SystemServer.FACTORY_TEST_LOW_LEVEL
                 && mTopAction == null) {
             // We are running in factory test mode, but unable to find
@@ -2502,7 +1884,7 @@
                     aInfo.applicationInfo.uid);
             if (app == null || app.instrumentationClass == null) {
                 intent.setFlags(intent.getFlags() | Intent.FLAG_ACTIVITY_NEW_TASK);
-                startActivityLocked(null, intent, null, null, 0, aInfo,
+                mMainStack.startActivityLocked(null, intent, null, null, 0, aInfo,
                         null, null, 0, 0, 0, false, false);
             }
         }
@@ -2514,7 +1896,7 @@
     /**
      * Starts the "new version setup screen" if appropriate.
      */
-    private void startSetupActivityLocked() {
+    void startSetupActivityLocked() {
         // Only do this once per boot.
         if (mCheckedForSetup) {
             return;
@@ -2558,14 +1940,14 @@
                     intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
                     intent.setComponent(new ComponentName(
                             ri.activityInfo.packageName, ri.activityInfo.name));
-                    startActivityLocked(null, intent, null, null, 0, ri.activityInfo,
+                    mMainStack.startActivityLocked(null, intent, null, null, 0, ri.activityInfo,
                             null, null, 0, 0, 0, false, false);
                 }
             }
         }
     }
     
-    private void reportResumedActivityLocked(HistoryRecord r) {
+    void reportResumedActivityLocked(ActivityRecord r) {
         //Slog.i(TAG, "**** REPORT RESUME: " + r);
         
         final int identHash = System.identityHashCode(r);
@@ -2584,1210 +1966,27 @@
         }
         mWatchers.finishBroadcast();
     }
-    
-    /**
-     * Ensure that the top activity in the stack is resumed.
-     *
-     * @param prev The previously resumed activity, for when in the process
-     * of pausing; can be null to call from elsewhere.
-     *
-     * @return Returns true if something is being resumed, or false if
-     * nothing happened.
-     */
-    private final boolean resumeTopActivityLocked(HistoryRecord prev) {
-        // Find the first activity that is not finishing.
-        HistoryRecord next = topRunningActivityLocked(null);
 
-        // Remember how we'll process this pause/resume situation, and ensure
-        // that the state is reset however we wind up proceeding.
-        final boolean userLeaving = mUserLeaving;
-        mUserLeaving = false;
-
-        if (next == null) {
-            // There are no more activities!  Let's just start up the
-            // Launcher...
-            return startHomeActivityLocked();
-        }
-
-        next.delayedResume = false;
-        
-        // If the top activity is the resumed one, nothing to do.
-        if (mResumedActivity == next && next.state == ActivityState.RESUMED) {
-            // Make sure we have executed any pending transitions, since there
-            // should be nothing left to do at this point.
-            mWindowManager.executeAppTransition();
-            mNoAnimActivities.clear();
-            return false;
-        }
-
-        // If we are sleeping, and there is no resumed activity, and the top
-        // activity is paused, well that is the state we want.
-        if ((mSleeping || mShuttingDown)
-                && mLastPausedActivity == next && next.state == ActivityState.PAUSED) {
-            // Make sure we have executed any pending transitions, since there
-            // should be nothing left to do at this point.
-            mWindowManager.executeAppTransition();
-            mNoAnimActivities.clear();
-            return false;
-        }
-        
-        // The activity may be waiting for stop, but that is no longer
-        // appropriate for it.
-        mStoppingActivities.remove(next);
-        mWaitingVisibleActivities.remove(next);
-
-        if (DEBUG_SWITCH) Slog.v(TAG, "Resuming " + next);
-
-        // If we are currently pausing an activity, then don't do anything
-        // until that is done.
-        if (mPausingActivity != null) {
-            if (DEBUG_SWITCH) Slog.v(TAG, "Skip resume: pausing=" + mPausingActivity);
-            return false;
-        }
-
-        // We need to start pausing the current activity so the top one
-        // can be resumed...
-        if (mResumedActivity != null) {
-            if (DEBUG_SWITCH) Slog.v(TAG, "Skip resume: need to start pausing");
-            startPausingLocked(userLeaving, false);
-            return true;
-        }
-
-        if (prev != null && prev != next) {
-            if (!prev.waitingVisible && next != null && !next.nowVisible) {
-                prev.waitingVisible = true;
-                mWaitingVisibleActivities.add(prev);
-                if (DEBUG_SWITCH) Slog.v(
-                        TAG, "Resuming top, waiting visible to hide: " + prev);
-            } else {
-                // The next activity is already visible, so hide the previous
-                // activity's windows right now so we can show the new one ASAP.
-                // We only do this if the previous is finishing, which should mean
-                // it is on top of the one being resumed so hiding it quickly
-                // is good.  Otherwise, we want to do the normal route of allowing
-                // the resumed activity to be shown so we can decide if the
-                // previous should actually be hidden depending on whether the
-                // new one is found to be full-screen or not.
-                if (prev.finishing) {
-                    mWindowManager.setAppVisibility(prev, false);
-                    if (DEBUG_SWITCH) Slog.v(TAG, "Not waiting for visible to hide: "
-                            + prev + ", waitingVisible="
-                            + (prev != null ? prev.waitingVisible : null)
-                            + ", nowVisible=" + next.nowVisible);
-                } else {
-                    if (DEBUG_SWITCH) Slog.v(TAG, "Previous already visible but still waiting to hide: "
-                        + prev + ", waitingVisible="
-                        + (prev != null ? prev.waitingVisible : null)
-                        + ", nowVisible=" + next.nowVisible);
-                }
-            }
-        }
-
-        // We are starting up the next activity, so tell the window manager
-        // that the previous one will be hidden soon.  This way it can know
-        // to ignore it when computing the desired screen orientation.
-        if (prev != null) {
-            if (prev.finishing) {
-                if (DEBUG_TRANSITION) Slog.v(TAG,
-                        "Prepare close transition: prev=" + prev);
-                if (mNoAnimActivities.contains(prev)) {
-                    mWindowManager.prepareAppTransition(WindowManagerPolicy.TRANSIT_NONE);
-                } else {
-                    mWindowManager.prepareAppTransition(prev.task == next.task
-                            ? WindowManagerPolicy.TRANSIT_ACTIVITY_CLOSE
-                            : WindowManagerPolicy.TRANSIT_TASK_CLOSE);
-                }
-                mWindowManager.setAppWillBeHidden(prev);
-                mWindowManager.setAppVisibility(prev, false);
-            } else {
-                if (DEBUG_TRANSITION) Slog.v(TAG,
-                        "Prepare open transition: prev=" + prev);
-                if (mNoAnimActivities.contains(next)) {
-                    mWindowManager.prepareAppTransition(WindowManagerPolicy.TRANSIT_NONE);
-                } else {
-                    mWindowManager.prepareAppTransition(prev.task == next.task
-                            ? WindowManagerPolicy.TRANSIT_ACTIVITY_OPEN
-                            : WindowManagerPolicy.TRANSIT_TASK_OPEN);
-                }
-            }
-            if (false) {
-                mWindowManager.setAppWillBeHidden(prev);
-                mWindowManager.setAppVisibility(prev, false);
-            }
-        } else if (mHistory.size() > 1) {
-            if (DEBUG_TRANSITION) Slog.v(TAG,
-                    "Prepare open transition: no previous");
-            if (mNoAnimActivities.contains(next)) {
-                mWindowManager.prepareAppTransition(WindowManagerPolicy.TRANSIT_NONE);
-            } else {
-                mWindowManager.prepareAppTransition(WindowManagerPolicy.TRANSIT_ACTIVITY_OPEN);
-            }
-        }
-
-        if (next.app != null && next.app.thread != null) {
-            if (DEBUG_SWITCH) Slog.v(TAG, "Resume running: " + next);
-
-            // This activity is now becoming visible.
-            mWindowManager.setAppVisibility(next, true);
-
-            HistoryRecord lastResumedActivity = mResumedActivity;
-            ActivityState lastState = next.state;
-
-            updateCpuStats();
-            
-            next.state = ActivityState.RESUMED;
-            mResumedActivity = next;
-            next.task.touchActiveTime();
-            updateLruProcessLocked(next.app, true, true);
-            updateLRUListLocked(next);
-
-            // Have the window manager re-evaluate the orientation of
-            // the screen based on the new activity order.
-            boolean updated;
-            synchronized (this) {
-                Configuration config = mWindowManager.updateOrientationFromAppTokens(
-                        mConfiguration,
-                        next.mayFreezeScreenLocked(next.app) ? next : null);
-                if (config != null) {
-                    next.frozenBeforeDestroy = true;
-                }
-                updated = updateConfigurationLocked(config, next);
-            }
-            if (!updated) {
-                // The configuration update wasn't able to keep the existing
-                // instance of the activity, and instead started a new one.
-                // We should be all done, but let's just make sure our activity
-                // is still at the top and schedule another run if something
-                // weird happened.
-                HistoryRecord nextNext = topRunningActivityLocked(null);
-                if (DEBUG_SWITCH) Slog.i(TAG,
-                        "Activity config changed during resume: " + next
-                        + ", new next: " + nextNext);
-                if (nextNext != next) {
-                    // Do over!
-                    mHandler.sendEmptyMessage(RESUME_TOP_ACTIVITY_MSG);
-                }
-                setFocusedActivityLocked(next);
-                ensureActivitiesVisibleLocked(null, 0);
-                mWindowManager.executeAppTransition();
-                mNoAnimActivities.clear();
-                return true;
-            }
-            
-            try {
-                // Deliver all pending results.
-                ArrayList a = next.results;
-                if (a != null) {
-                    final int N = a.size();
-                    if (!next.finishing && N > 0) {
-                        if (DEBUG_RESULTS) Slog.v(
-                                TAG, "Delivering results to " + next
-                                + ": " + a);
-                        next.app.thread.scheduleSendResult(next, a);
-                    }
-                }
-
-                if (next.newIntents != null) {
-                    next.app.thread.scheduleNewIntent(next.newIntents, next);
-                }
-
-                EventLog.writeEvent(EventLogTags.AM_RESUME_ACTIVITY,
-                        System.identityHashCode(next),
-                        next.task.taskId, next.shortComponentName);
-                
-                next.app.thread.scheduleResumeActivity(next,
-                        isNextTransitionForward());
-                
-                pauseIfSleepingLocked();
-
-            } catch (Exception e) {
-                // Whoops, need to restart this activity!
-                next.state = lastState;
-                mResumedActivity = lastResumedActivity;
-                Slog.i(TAG, "Restarting because process died: " + next);
-                if (!next.hasBeenLaunched) {
-                    next.hasBeenLaunched = true;
-                } else {
-                    if (SHOW_APP_STARTING_ICON) {
-                        mWindowManager.setAppStartingWindow(
-                                next, next.packageName, next.theme,
-                                next.nonLocalizedLabel,
-                                next.labelRes, next.icon, null, true);
-                    }
-                }
-                startSpecificActivityLocked(next, true, false);
-                return true;
-            }
-
-            // From this point on, if something goes wrong there is no way
-            // to recover the activity.
-            try {
-                next.visible = true;
-                completeResumeLocked(next);
-            } catch (Exception e) {
-                // If any exception gets thrown, toss away this
-                // activity and try the next one.
-                Slog.w(TAG, "Exception thrown during resume of " + next, e);
-                requestFinishActivityLocked(next, Activity.RESULT_CANCELED, null,
-                        "resume-exception");
-                return true;
-            }
-
-            // Didn't need to use the icicle, and it is now out of date.
-            next.icicle = null;
-            next.haveState = false;
-            next.stopped = false;
-
-        } else {
-            // Whoops, need to restart this activity!
-            if (!next.hasBeenLaunched) {
-                next.hasBeenLaunched = true;
-            } else {
-                if (SHOW_APP_STARTING_ICON) {
-                    mWindowManager.setAppStartingWindow(
-                            next, next.packageName, next.theme,
-                            next.nonLocalizedLabel,
-                            next.labelRes, next.icon, null, true);
-                }
-                if (DEBUG_SWITCH) Slog.v(TAG, "Restarting: " + next);
-            }
-            startSpecificActivityLocked(next, true, true);
-        }
-
-        return true;
-    }
-
-    private final void startActivityLocked(HistoryRecord r, boolean newTask,
-            boolean doResume) {
-        final int NH = mHistory.size();
-
-        int addPos = -1;
-        
-        if (!newTask) {
-            // If starting in an existing task, find where that is...
-            HistoryRecord next = null;
-            boolean startIt = true;
-            for (int i = NH-1; i >= 0; i--) {
-                HistoryRecord p = (HistoryRecord)mHistory.get(i);
-                if (p.finishing) {
-                    continue;
-                }
-                if (p.task == r.task) {
-                    // Here it is!  Now, if this is not yet visible to the
-                    // user, then just add it without starting; it will
-                    // get started when the user navigates back to it.
-                    addPos = i+1;
-                    if (!startIt) {
-                        mHistory.add(addPos, r);
-                        r.inHistory = true;
-                        r.task.numActivities++;
-                        mWindowManager.addAppToken(addPos, r, r.task.taskId,
-                                r.info.screenOrientation, r.fullscreen);
-                        if (VALIDATE_TOKENS) {
-                            mWindowManager.validateAppTokens(mHistory);
-                        }
-                        return;
-                    }
-                    break;
-                }
-                if (p.fullscreen) {
-                    startIt = false;
-                }
-                next = p;
-            }
-        }
-
-        // Place a new activity at top of stack, so it is next to interact
-        // with the user.
-        if (addPos < 0) {
-            addPos = mHistory.size();
-        }
-        
-        // If we are not placing the new activity frontmost, we do not want
-        // to deliver the onUserLeaving callback to the actual frontmost
-        // activity
-        if (addPos < NH) {
-            mUserLeaving = false;
-            if (DEBUG_USER_LEAVING) Slog.v(TAG, "startActivity() behind front, mUserLeaving=false");
-        }
-        
-        // Slot the activity into the history stack and proceed
-        mHistory.add(addPos, r);
-        r.inHistory = true;
-        r.frontOfTask = newTask;
-        r.task.numActivities++;
-        if (NH > 0) {
-            // We want to show the starting preview window if we are
-            // switching to a new task, or the next activity's process is
-            // not currently running.
-            boolean showStartingIcon = newTask;
-            ProcessRecord proc = r.app;
-            if (proc == null) {
-                proc = mProcessNames.get(r.processName, r.info.applicationInfo.uid);
-            }
-            if (proc == null || proc.thread == null) {
-                showStartingIcon = true;
-            }
-            if (DEBUG_TRANSITION) Slog.v(TAG,
-                    "Prepare open transition: starting " + r);
-            if ((r.intent.getFlags()&Intent.FLAG_ACTIVITY_NO_ANIMATION) != 0) {
-                mWindowManager.prepareAppTransition(WindowManagerPolicy.TRANSIT_NONE);
-                mNoAnimActivities.add(r);
-            } else if ((r.intent.getFlags()&Intent.FLAG_ACTIVITY_CLEAR_WHEN_TASK_RESET) != 0) {
-                mWindowManager.prepareAppTransition(WindowManagerPolicy.TRANSIT_TASK_OPEN);
-                mNoAnimActivities.remove(r);
-            } else {
-                mWindowManager.prepareAppTransition(newTask
-                        ? WindowManagerPolicy.TRANSIT_TASK_OPEN
-                        : WindowManagerPolicy.TRANSIT_ACTIVITY_OPEN);
-                mNoAnimActivities.remove(r);
-            }
-            mWindowManager.addAppToken(
-                    addPos, r, r.task.taskId, r.info.screenOrientation, r.fullscreen);
-            boolean doShow = true;
-            if (newTask) {
-                // Even though this activity is starting fresh, we still need
-                // to reset it to make sure we apply affinities to move any
-                // existing activities from other tasks in to it.
-                // If the caller has requested that the target task be
-                // reset, then do so.
-                if ((r.intent.getFlags()
-                        &Intent.FLAG_ACTIVITY_RESET_TASK_IF_NEEDED) != 0) {
-                    resetTaskIfNeededLocked(r, r);
-                    doShow = topRunningNonDelayedActivityLocked(null) == r;
-                }
-            }
-            if (SHOW_APP_STARTING_ICON && doShow) {
-                // Figure out if we are transitioning from another activity that is
-                // "has the same starting icon" as the next one.  This allows the
-                // window manager to keep the previous window it had previously
-                // created, if it still had one.
-                HistoryRecord prev = mResumedActivity;
-                if (prev != null) {
-                    // We don't want to reuse the previous starting preview if:
-                    // (1) The current activity is in a different task.
-                    if (prev.task != r.task) prev = null;
-                    // (2) The current activity is already displayed.
-                    else if (prev.nowVisible) prev = null;
-                }
-                mWindowManager.setAppStartingWindow(
-                        r, r.packageName, r.theme, r.nonLocalizedLabel,
-                        r.labelRes, r.icon, prev, showStartingIcon);
-            }
-        } else {
-            // If this is the first activity, don't do any fancy animations,
-            // because there is nothing for it to animate on top of.
-            mWindowManager.addAppToken(addPos, r, r.task.taskId,
-                    r.info.screenOrientation, r.fullscreen);
-        }
-        if (VALIDATE_TOKENS) {
-            mWindowManager.validateAppTokens(mHistory);
-        }
-
-        if (doResume) {
-            resumeTopActivityLocked(null);
-        }
-    }
-
-    /**
-     * Perform clear operation as requested by
-     * {@link Intent#FLAG_ACTIVITY_CLEAR_TOP}: search from the top of the
-     * stack to the given task, then look for
-     * an instance of that activity in the stack and, if found, finish all
-     * activities on top of it and return the instance.
-     *
-     * @param newR Description of the new activity being started.
-     * @return Returns the old activity that should be continue to be used,
-     * or null if none was found.
-     */
-    private final HistoryRecord performClearTaskLocked(int taskId,
-            HistoryRecord newR, int launchFlags, boolean doClear) {
-        int i = mHistory.size();
-        
-        // First find the requested task.
-        while (i > 0) {
-            i--;
-            HistoryRecord r = (HistoryRecord)mHistory.get(i);
-            if (r.task.taskId == taskId) {
-                i++;
-                break;
-            }
-        }
-        
-        // Now clear it.
-        while (i > 0) {
-            i--;
-            HistoryRecord r = (HistoryRecord)mHistory.get(i);
-            if (r.finishing) {
-                continue;
-            }
-            if (r.task.taskId != taskId) {
-                return null;
-            }
-            if (r.realActivity.equals(newR.realActivity)) {
-                // Here it is!  Now finish everything in front...
-                HistoryRecord ret = r;
-                if (doClear) {
-                    while (i < (mHistory.size()-1)) {
-                        i++;
-                        r = (HistoryRecord)mHistory.get(i);
-                        if (r.finishing) {
-                            continue;
-                        }
-                        if (finishActivityLocked(r, i, Activity.RESULT_CANCELED,
-                                null, "clear")) {
-                            i--;
-                        }
-                    }
-                }
-                
-                // Finally, if this is a normal launch mode (that is, not
-                // expecting onNewIntent()), then we will finish the current
-                // instance of the activity so a new fresh one can be started.
-                if (ret.launchMode == ActivityInfo.LAUNCH_MULTIPLE
-                        && (launchFlags&Intent.FLAG_ACTIVITY_SINGLE_TOP) == 0) {
-                    if (!ret.finishing) {
-                        int index = indexOfTokenLocked(ret);
-                        if (index >= 0) {
-                            finishActivityLocked(ret, index, Activity.RESULT_CANCELED,
-                                    null, "clear");
-                        }
-                        return null;
-                    }
-                }
-                
-                return ret;
-            }
-        }
-
-        return null;
-    }
-
-    /**
-     * Find the activity in the history stack within the given task.  Returns
-     * the index within the history at which it's found, or < 0 if not found.
-     */
-    private final int findActivityInHistoryLocked(HistoryRecord r, int task) {
-        int i = mHistory.size();
-        while (i > 0) {
-            i--;
-            HistoryRecord candidate = (HistoryRecord)mHistory.get(i);
-            if (candidate.task.taskId != task) {
-                break;
-            }
-            if (candidate.realActivity.equals(r.realActivity)) {
-                return i;
-            }
-        }
-
-        return -1;
-    }
-
-    /**
-     * Reorder the history stack so that the activity at the given index is
-     * brought to the front.
-     */
-    private final HistoryRecord moveActivityToFrontLocked(int where) {
-        HistoryRecord newTop = (HistoryRecord)mHistory.remove(where);
-        int top = mHistory.size();
-        HistoryRecord oldTop = (HistoryRecord)mHistory.get(top-1);
-        mHistory.add(top, newTop);
-        oldTop.frontOfTask = false;
-        newTop.frontOfTask = true;
-        return newTop;
-    }
-
-    /**
-     * Deliver a new Intent to an existing activity, so that its onNewIntent()
-     * method will be called at the proper time.
-     */
-    private final void deliverNewIntentLocked(HistoryRecord r, Intent intent) {
-        boolean sent = false;
-        if (r.state == ActivityState.RESUMED
-                && r.app != null && r.app.thread != null) {
-            try {
-                ArrayList<Intent> ar = new ArrayList<Intent>();
-                ar.add(new Intent(intent));
-                r.app.thread.scheduleNewIntent(ar, r);
-                sent = true;
-            } catch (Exception e) {
-                Slog.w(TAG, "Exception thrown sending new intent to " + r, e);
-            }
-        }
-        if (!sent) {
-            r.addNewIntentLocked(new Intent(intent));
-        }
-    }
-
-    private final void logStartActivity(int tag, HistoryRecord r,
-            TaskRecord task) {
-        EventLog.writeEvent(tag,
-                System.identityHashCode(r), task.taskId,
-                r.shortComponentName, r.intent.getAction(),
-                r.intent.getType(), r.intent.getDataString(),
-                r.intent.getFlags());
-    }
-
-    private final int startActivityLocked(IApplicationThread caller,
-            Intent intent, String resolvedType,
-            Uri[] grantedUriPermissions,
-            int grantedMode, ActivityInfo aInfo, IBinder resultTo,
-            String resultWho, int requestCode,
-            int callingPid, int callingUid, boolean onlyIfNeeded,
-            boolean componentSpecified) {
-        Slog.i(TAG, "Starting activity: " + intent);
-
-        HistoryRecord sourceRecord = null;
-        HistoryRecord resultRecord = null;
-        if (resultTo != null) {
-            int index = indexOfTokenLocked(resultTo);
-            if (DEBUG_RESULTS) Slog.v(
-                TAG, "Sending result to " + resultTo + " (index " + index + ")");
-            if (index >= 0) {
-                sourceRecord = (HistoryRecord)mHistory.get(index);
-                if (requestCode >= 0 && !sourceRecord.finishing) {
-                    resultRecord = sourceRecord;
-                }
-            }
-        }
-
-        int launchFlags = intent.getFlags();
-
-        if ((launchFlags&Intent.FLAG_ACTIVITY_FORWARD_RESULT) != 0
-                && sourceRecord != null) {
-            // Transfer the result target from the source activity to the new
-            // one being started, including any failures.
-            if (requestCode >= 0) {
-                return START_FORWARD_AND_REQUEST_CONFLICT;
-            }
-            resultRecord = sourceRecord.resultTo;
-            resultWho = sourceRecord.resultWho;
-            requestCode = sourceRecord.requestCode;
-            sourceRecord.resultTo = null;
-            if (resultRecord != null) {
-                resultRecord.removeResultsLocked(
-                    sourceRecord, resultWho, requestCode);
-            }
-        }
-
-        int err = START_SUCCESS;
-
-        if (intent.getComponent() == null) {
-            // We couldn't find a class that can handle the given Intent.
-            // That's the end of that!
-            err = START_INTENT_NOT_RESOLVED;
-        }
-
-        if (err == START_SUCCESS && aInfo == null) {
-            // We couldn't find the specific class specified in the Intent.
-            // Also the end of the line.
-            err = START_CLASS_NOT_FOUND;
-        }
-
-        ProcessRecord callerApp = null;
-        if (err == START_SUCCESS && caller != null) {
-            callerApp = getRecordForAppLocked(caller);
-            if (callerApp != null) {
-                callingPid = callerApp.pid;
-                callingUid = callerApp.info.uid;
-            } else {
-                Slog.w(TAG, "Unable to find app for caller " + caller
-                      + " (pid=" + callingPid + ") when starting: "
-                      + intent.toString());
-                err = START_PERMISSION_DENIED;
-            }
-        }
-
-        if (err != START_SUCCESS) {
-            if (resultRecord != null) {
-                sendActivityResultLocked(-1,
-                    resultRecord, resultWho, requestCode,
-                    Activity.RESULT_CANCELED, null);
-            }
-            return err;
-        }
-
-        final int perm = checkComponentPermission(aInfo.permission, callingPid,
-                callingUid, aInfo.exported ? -1 : aInfo.applicationInfo.uid);
-        if (perm != PackageManager.PERMISSION_GRANTED) {
-            if (resultRecord != null) {
-                sendActivityResultLocked(-1,
-                    resultRecord, resultWho, requestCode,
-                    Activity.RESULT_CANCELED, null);
-            }
-            String msg = "Permission Denial: starting " + intent.toString()
-                    + " from " + callerApp + " (pid=" + callingPid
-                    + ", uid=" + callingUid + ")"
-                    + " requires " + aInfo.permission;
-            Slog.w(TAG, msg);
-            throw new SecurityException(msg);
-        }
-
-        if (mController != null) {
-            boolean abort = false;
-            try {
-                // The Intent we give to the watcher has the extra data
-                // stripped off, since it can contain private information.
-                Intent watchIntent = intent.cloneFilter();
-                abort = !mController.activityStarting(watchIntent,
-                        aInfo.applicationInfo.packageName);
-            } catch (RemoteException e) {
-                mController = null;
-            }
-
-            if (abort) {
-                if (resultRecord != null) {
-                    sendActivityResultLocked(-1,
-                        resultRecord, resultWho, requestCode,
-                        Activity.RESULT_CANCELED, null);
-                }
-                // We pretend to the caller that it was really started, but
-                // they will just get a cancel result.
-                return START_SUCCESS;
-            }
-        }
-
-        HistoryRecord r = new HistoryRecord(this, callerApp, callingUid,
-                intent, resolvedType, aInfo, mConfiguration,
-                resultRecord, resultWho, requestCode, componentSpecified);
-
-        if (mResumedActivity == null
-                || mResumedActivity.info.applicationInfo.uid != callingUid) {
-            if (!checkAppSwitchAllowedLocked(callingPid, callingUid, "Activity start")) {
-                PendingActivityLaunch pal = new PendingActivityLaunch();
-                pal.r = r;
-                pal.sourceRecord = sourceRecord;
-                pal.grantedUriPermissions = grantedUriPermissions;
-                pal.grantedMode = grantedMode;
-                pal.onlyIfNeeded = onlyIfNeeded;
-                mPendingActivityLaunches.add(pal);
-                return START_SWITCHES_CANCELED;
-            }
-        }
-        
-        if (mDidAppSwitch) {
-            // This is the second allowed switch since we stopped switches,
-            // so now just generally allow switches.  Use case: user presses
-            // home (switches disabled, switch to home, mDidAppSwitch now true);
-            // user taps a home icon (coming from home so allowed, we hit here
-            // and now allow anyone to switch again).
-            mAppSwitchesAllowedTime = 0;
-        } else {
-            mDidAppSwitch = true;
-        }
-     
-        doPendingActivityLaunchesLocked(false);
-        
-        return startActivityUncheckedLocked(r, sourceRecord,
-                grantedUriPermissions, grantedMode, onlyIfNeeded, true);
-    }
-  
-    private final void doPendingActivityLaunchesLocked(boolean doResume) {
+    final void doPendingActivityLaunchesLocked(boolean doResume) {
         final int N = mPendingActivityLaunches.size();
         if (N <= 0) {
             return;
         }
         for (int i=0; i<N; i++) {
             PendingActivityLaunch pal = mPendingActivityLaunches.get(i);
-            startActivityUncheckedLocked(pal.r, pal.sourceRecord,
+            mMainStack.startActivityUncheckedLocked(pal.r, pal.sourceRecord,
                     pal.grantedUriPermissions, pal.grantedMode, pal.onlyIfNeeded,
                     doResume && i == (N-1));
         }
         mPendingActivityLaunches.clear();
     }
     
-    private final int startActivityUncheckedLocked(HistoryRecord r,
-            HistoryRecord sourceRecord, Uri[] grantedUriPermissions,
-            int grantedMode, boolean onlyIfNeeded, boolean doResume) {
-        final Intent intent = r.intent;
-        final int callingUid = r.launchedFromUid;
-        
-        int launchFlags = intent.getFlags();
-        
-        // We'll invoke onUserLeaving before onPause only if the launching
-        // activity did not explicitly state that this is an automated launch.
-        mUserLeaving = (launchFlags&Intent.FLAG_ACTIVITY_NO_USER_ACTION) == 0;
-        if (DEBUG_USER_LEAVING) Slog.v(TAG,
-                "startActivity() => mUserLeaving=" + mUserLeaving);
-        
-        // If the caller has asked not to resume at this point, we make note
-        // of this in the record so that we can skip it when trying to find
-        // the top running activity.
-        if (!doResume) {
-            r.delayedResume = true;
-        }
-        
-        HistoryRecord notTop = (launchFlags&Intent.FLAG_ACTIVITY_PREVIOUS_IS_TOP)
-                != 0 ? r : null;
-
-        // If the onlyIfNeeded flag is set, then we can do this if the activity
-        // being launched is the same as the one making the call...  or, as
-        // a special case, if we do not know the caller then we count the
-        // current top activity as the caller.
-        if (onlyIfNeeded) {
-            HistoryRecord checkedCaller = sourceRecord;
-            if (checkedCaller == null) {
-                checkedCaller = topRunningNonDelayedActivityLocked(notTop);
-            }
-            if (!checkedCaller.realActivity.equals(r.realActivity)) {
-                // Caller is not the same as launcher, so always needed.
-                onlyIfNeeded = false;
-            }
-        }
-
-        if (grantedUriPermissions != null && callingUid > 0) {
-            for (int i=0; i<grantedUriPermissions.length; i++) {
-                grantUriPermissionLocked(callingUid, r.packageName,
-                        grantedUriPermissions[i], grantedMode, r);
-            }
-        }
-
-        grantUriPermissionFromIntentLocked(callingUid, r.packageName,
-                intent, r);
-
-        if (sourceRecord == null) {
-            // This activity is not being started from another...  in this
-            // case we -always- start a new task.
-            if ((launchFlags&Intent.FLAG_ACTIVITY_NEW_TASK) == 0) {
-                Slog.w(TAG, "startActivity called from non-Activity context; forcing Intent.FLAG_ACTIVITY_NEW_TASK for: "
-                      + intent);
-                launchFlags |= Intent.FLAG_ACTIVITY_NEW_TASK;
-            }
-        } else if (sourceRecord.launchMode == ActivityInfo.LAUNCH_SINGLE_INSTANCE) {
-            // The original activity who is starting us is running as a single
-            // instance...  this new activity it is starting must go on its
-            // own task.
-            launchFlags |= Intent.FLAG_ACTIVITY_NEW_TASK;
-        } else if (r.launchMode == ActivityInfo.LAUNCH_SINGLE_INSTANCE
-                || r.launchMode == ActivityInfo.LAUNCH_SINGLE_TASK) {
-            // The activity being started is a single instance...  it always
-            // gets launched into its own task.
-            launchFlags |= Intent.FLAG_ACTIVITY_NEW_TASK;
-        }
-
-        if (r.resultTo != null && (launchFlags&Intent.FLAG_ACTIVITY_NEW_TASK) != 0) {
-            // For whatever reason this activity is being launched into a new
-            // task...  yet the caller has requested a result back.  Well, that
-            // is pretty messed up, so instead immediately send back a cancel
-            // and let the new task continue launched as normal without a
-            // dependency on its originator.
-            Slog.w(TAG, "Activity is launching as a new task, so cancelling activity result.");
-            sendActivityResultLocked(-1,
-                    r.resultTo, r.resultWho, r.requestCode,
-                Activity.RESULT_CANCELED, null);
-            r.resultTo = null;
-        }
-
-        boolean addingToTask = false;
-        if (((launchFlags&Intent.FLAG_ACTIVITY_NEW_TASK) != 0 &&
-                (launchFlags&Intent.FLAG_ACTIVITY_MULTIPLE_TASK) == 0)
-                || r.launchMode == ActivityInfo.LAUNCH_SINGLE_TASK
-                || r.launchMode == ActivityInfo.LAUNCH_SINGLE_INSTANCE) {
-            // If bring to front is requested, and no result is requested, and
-            // we can find a task that was started with this same
-            // component, then instead of launching bring that one to the front.
-            if (r.resultTo == null) {
-                // See if there is a task to bring to the front.  If this is
-                // a SINGLE_INSTANCE activity, there can be one and only one
-                // instance of it in the history, and it is always in its own
-                // unique task, so we do a special search.
-                HistoryRecord taskTop = r.launchMode != ActivityInfo.LAUNCH_SINGLE_INSTANCE
-                        ? findTaskLocked(intent, r.info)
-                        : findActivityLocked(intent, r.info);
-                if (taskTop != null) {
-                    if (taskTop.task.intent == null) {
-                        // This task was started because of movement of
-                        // the activity based on affinity...  now that we
-                        // are actually launching it, we can assign the
-                        // base intent.
-                        taskTop.task.setIntent(intent, r.info);
-                    }
-                    // If the target task is not in the front, then we need
-                    // to bring it to the front...  except...  well, with
-                    // SINGLE_TASK_LAUNCH it's not entirely clear.  We'd like
-                    // to have the same behavior as if a new instance was
-                    // being started, which means not bringing it to the front
-                    // if the caller is not itself in the front.
-                    HistoryRecord curTop = topRunningNonDelayedActivityLocked(notTop);
-                    if (curTop.task != taskTop.task) {
-                        r.intent.addFlags(Intent.FLAG_ACTIVITY_BROUGHT_TO_FRONT);
-                        boolean callerAtFront = sourceRecord == null
-                                || curTop.task == sourceRecord.task;
-                        if (callerAtFront) {
-                            // We really do want to push this one into the
-                            // user's face, right now.
-                            moveTaskToFrontLocked(taskTop.task, r);
-                        }
-                    }
-                    // If the caller has requested that the target task be
-                    // reset, then do so.
-                    if ((launchFlags&Intent.FLAG_ACTIVITY_RESET_TASK_IF_NEEDED) != 0) {
-                        taskTop = resetTaskIfNeededLocked(taskTop, r);
-                    }
-                    if (onlyIfNeeded) {
-                        // We don't need to start a new activity, and
-                        // the client said not to do anything if that
-                        // is the case, so this is it!  And for paranoia, make
-                        // sure we have correctly resumed the top activity.
-                        if (doResume) {
-                            resumeTopActivityLocked(null);
-                        }
-                        return START_RETURN_INTENT_TO_CALLER;
-                    }
-                    if ((launchFlags&Intent.FLAG_ACTIVITY_CLEAR_TOP) != 0
-                            || r.launchMode == ActivityInfo.LAUNCH_SINGLE_TASK
-                            || r.launchMode == ActivityInfo.LAUNCH_SINGLE_INSTANCE) {
-                        // In this situation we want to remove all activities
-                        // from the task up to the one being started.  In most
-                        // cases this means we are resetting the task to its
-                        // initial state.
-                        HistoryRecord top = performClearTaskLocked(
-                                taskTop.task.taskId, r, launchFlags, true);
-                        if (top != null) {
-                            if (top.frontOfTask) {
-                                // Activity aliases may mean we use different
-                                // intents for the top activity, so make sure
-                                // the task now has the identity of the new
-                                // intent.
-                                top.task.setIntent(r.intent, r.info);
-                            }
-                            logStartActivity(EventLogTags.AM_NEW_INTENT, r, top.task);
-                            deliverNewIntentLocked(top, r.intent);
-                        } else {
-                            // A special case: we need to
-                            // start the activity because it is not currently
-                            // running, and the caller has asked to clear the
-                            // current task to have this activity at the top.
-                            addingToTask = true;
-                            // Now pretend like this activity is being started
-                            // by the top of its task, so it is put in the
-                            // right place.
-                            sourceRecord = taskTop;
-                        }
-                    } else if (r.realActivity.equals(taskTop.task.realActivity)) {
-                        // In this case the top activity on the task is the
-                        // same as the one being launched, so we take that
-                        // as a request to bring the task to the foreground.
-                        // If the top activity in the task is the root
-                        // activity, deliver this new intent to it if it
-                        // desires.
-                        if ((launchFlags&Intent.FLAG_ACTIVITY_SINGLE_TOP) != 0
-                                && taskTop.realActivity.equals(r.realActivity)) {
-                            logStartActivity(EventLogTags.AM_NEW_INTENT, r, taskTop.task);
-                            if (taskTop.frontOfTask) {
-                                taskTop.task.setIntent(r.intent, r.info);
-                            }
-                            deliverNewIntentLocked(taskTop, r.intent);
-                        } else if (!r.intent.filterEquals(taskTop.task.intent)) {
-                            // In this case we are launching the root activity
-                            // of the task, but with a different intent.  We
-                            // should start a new instance on top.
-                            addingToTask = true;
-                            sourceRecord = taskTop;
-                        }
-                    } else if ((launchFlags&Intent.FLAG_ACTIVITY_RESET_TASK_IF_NEEDED) == 0) {
-                        // In this case an activity is being launched in to an
-                        // existing task, without resetting that task.  This
-                        // is typically the situation of launching an activity
-                        // from a notification or shortcut.  We want to place
-                        // the new activity on top of the current task.
-                        addingToTask = true;
-                        sourceRecord = taskTop;
-                    } else if (!taskTop.task.rootWasReset) {
-                        // In this case we are launching in to an existing task
-                        // that has not yet been started from its front door.
-                        // The current task has been brought to the front.
-                        // Ideally, we'd probably like to place this new task
-                        // at the bottom of its stack, but that's a little hard
-                        // to do with the current organization of the code so
-                        // for now we'll just drop it.
-                        taskTop.task.setIntent(r.intent, r.info);
-                    }
-                    if (!addingToTask) {
-                        // We didn't do anything...  but it was needed (a.k.a., client
-                        // don't use that intent!)  And for paranoia, make
-                        // sure we have correctly resumed the top activity.
-                        if (doResume) {
-                            resumeTopActivityLocked(null);
-                        }
-                        return START_TASK_TO_FRONT;
-                    }
-                }
-            }
-        }
-
-        //String uri = r.intent.toURI();
-        //Intent intent2 = new Intent(uri);
-        //Slog.i(TAG, "Given intent: " + r.intent);
-        //Slog.i(TAG, "URI is: " + uri);
-        //Slog.i(TAG, "To intent: " + intent2);
-
-        if (r.packageName != null) {
-            // If the activity being launched is the same as the one currently
-            // at the top, then we need to check if it should only be launched
-            // once.
-            HistoryRecord top = topRunningNonDelayedActivityLocked(notTop);
-            if (top != null && r.resultTo == null) {
-                if (top.realActivity.equals(r.realActivity)) {
-                    if (top.app != null && top.app.thread != null) {
-                        if ((launchFlags&Intent.FLAG_ACTIVITY_SINGLE_TOP) != 0
-                            || r.launchMode == ActivityInfo.LAUNCH_SINGLE_TOP
-                            || r.launchMode == ActivityInfo.LAUNCH_SINGLE_TASK) {
-                            logStartActivity(EventLogTags.AM_NEW_INTENT, top, top.task);
-                            // For paranoia, make sure we have correctly
-                            // resumed the top activity.
-                            if (doResume) {
-                                resumeTopActivityLocked(null);
-                            }
-                            if (onlyIfNeeded) {
-                                // We don't need to start a new activity, and
-                                // the client said not to do anything if that
-                                // is the case, so this is it!
-                                return START_RETURN_INTENT_TO_CALLER;
-                            }
-                            deliverNewIntentLocked(top, r.intent);
-                            return START_DELIVERED_TO_TOP;
-                        }
-                    }
-                }
-            }
-
-        } else {
-            if (r.resultTo != null) {
-                sendActivityResultLocked(-1,
-                        r.resultTo, r.resultWho, r.requestCode,
-                    Activity.RESULT_CANCELED, null);
-            }
-            return START_CLASS_NOT_FOUND;
-        }
-
-        boolean newTask = false;
-
-        // Should this be considered a new task?
-        if (r.resultTo == null && !addingToTask
-                && (launchFlags&Intent.FLAG_ACTIVITY_NEW_TASK) != 0) {
-            // todo: should do better management of integers.
-            mCurTask++;
-            if (mCurTask <= 0) {
-                mCurTask = 1;
-            }
-            r.task = new TaskRecord(mCurTask, r.info, intent,
-                    (r.info.flags&ActivityInfo.FLAG_CLEAR_TASK_ON_LAUNCH) != 0);
-            if (DEBUG_TASKS) Slog.v(TAG, "Starting new activity " + r
-                    + " in new task " + r.task);
-            newTask = true;
-            addRecentTaskLocked(r.task);
-            
-        } else if (sourceRecord != null) {
-            if (!addingToTask &&
-                    (launchFlags&Intent.FLAG_ACTIVITY_CLEAR_TOP) != 0) {
-                // In this case, we are adding the activity to an existing
-                // task, but the caller has asked to clear that task if the
-                // activity is already running.
-                HistoryRecord top = performClearTaskLocked(
-                        sourceRecord.task.taskId, r, launchFlags, true);
-                if (top != null) {
-                    logStartActivity(EventLogTags.AM_NEW_INTENT, r, top.task);
-                    deliverNewIntentLocked(top, r.intent);
-                    // For paranoia, make sure we have correctly
-                    // resumed the top activity.
-                    if (doResume) {
-                        resumeTopActivityLocked(null);
-                    }
-                    return START_DELIVERED_TO_TOP;
-                }
-            } else if (!addingToTask &&
-                    (launchFlags&Intent.FLAG_ACTIVITY_REORDER_TO_FRONT) != 0) {
-                // In this case, we are launching an activity in our own task
-                // that may already be running somewhere in the history, and
-                // we want to shuffle it to the front of the stack if so.
-                int where = findActivityInHistoryLocked(r, sourceRecord.task.taskId);
-                if (where >= 0) {
-                    HistoryRecord top = moveActivityToFrontLocked(where);
-                    logStartActivity(EventLogTags.AM_NEW_INTENT, r, top.task);
-                    deliverNewIntentLocked(top, r.intent);
-                    if (doResume) {
-                        resumeTopActivityLocked(null);
-                    }
-                    return START_DELIVERED_TO_TOP;
-                }
-            }
-            // An existing activity is starting this new activity, so we want
-            // to keep the new one in the same task as the one that is starting
-            // it.
-            r.task = sourceRecord.task;
-            if (DEBUG_TASKS) Slog.v(TAG, "Starting new activity " + r
-                    + " in existing task " + r.task);
-
-        } else {
-            // This not being started from an existing activity, and not part
-            // of a new task...  just put it in the top task, though these days
-            // this case should never happen.
-            final int N = mHistory.size();
-            HistoryRecord prev =
-                N > 0 ? (HistoryRecord)mHistory.get(N-1) : null;
-            r.task = prev != null
-                ? prev.task
-                : new TaskRecord(mCurTask, r.info, intent,
-                        (r.info.flags&ActivityInfo.FLAG_CLEAR_TASK_ON_LAUNCH) != 0);
-            if (DEBUG_TASKS) Slog.v(TAG, "Starting new activity " + r
-                    + " in new guessed " + r.task);
-        }
-        if (newTask) {
-            EventLog.writeEvent(EventLogTags.AM_CREATE_TASK, r.task.taskId);
-        }
-        logStartActivity(EventLogTags.AM_CREATE_ACTIVITY, r, r.task);
-        startActivityLocked(r, newTask, doResume);
-        return START_SUCCESS;
-    }
-
-    void reportActivityLaunchedLocked(boolean timeout, HistoryRecord r,
-            long thisTime, long totalTime) {
-        for (int i=mWaitingActivityLaunched.size()-1; i>=0; i--) {
-            WaitResult w = mWaitingActivityLaunched.get(i);
-            w.timeout = timeout;
-            if (r != null) {
-                w.who = new ComponentName(r.info.packageName, r.info.name);
-            }
-            w.thisTime = thisTime;
-            w.totalTime = totalTime;
-        }
-        notify();
-    }
-    
-    void reportActivityVisibleLocked(HistoryRecord r) {
-        for (int i=mWaitingActivityVisible.size()-1; i>=0; i--) {
-            WaitResult w = mWaitingActivityVisible.get(i);
-            w.timeout = false;
-            if (r != null) {
-                w.who = new ComponentName(r.info.packageName, r.info.name);
-            }
-            w.totalTime = SystemClock.uptimeMillis() - w.thisTime;
-            w.thisTime = w.totalTime;
-        }
-        notify();
-    }
-    
-    private final int startActivityMayWait(IApplicationThread caller,
-            Intent intent, String resolvedType, Uri[] grantedUriPermissions,
-            int grantedMode, IBinder resultTo,
-            String resultWho, int requestCode, boolean onlyIfNeeded,
-            boolean debug, WaitResult outResult, Configuration config) {
-        // Refuse possible leaked file descriptors
-        if (intent != null && intent.hasFileDescriptors()) {
-            throw new IllegalArgumentException("File descriptors passed in Intent");
-        }
-
-        final boolean componentSpecified = intent.getComponent() != null;
-        
-        // Don't modify the client's object!
-        intent = new Intent(intent);
-
-        // Collect information about the target of the Intent.
-        ActivityInfo aInfo;
-        try {
-            ResolveInfo rInfo =
-                ActivityThread.getPackageManager().resolveIntent(
-                        intent, resolvedType,
-                        PackageManager.MATCH_DEFAULT_ONLY
-                        | STOCK_PM_FLAGS);
-            aInfo = rInfo != null ? rInfo.activityInfo : null;
-        } catch (RemoteException e) {
-            aInfo = null;
-        }
-
-        if (aInfo != null) {
-            // Store the found target back into the intent, because now that
-            // we have it we never want to do this again.  For example, if the
-            // user navigates back to this point in the history, we should
-            // always restart the exact same activity.
-            intent.setComponent(new ComponentName(
-                    aInfo.applicationInfo.packageName, aInfo.name));
-
-            // Don't debug things in the system process
-            if (debug) {
-                if (!aInfo.processName.equals("system")) {
-                    setDebugApp(aInfo.processName, true, false);
-                }
-            }
-        }
-
-        synchronized (this) {
-            int callingPid;
-            int callingUid;
-            if (caller == null) {
-                callingPid = Binder.getCallingPid();
-                callingUid = Binder.getCallingUid();
-            } else {
-                callingPid = callingUid = -1;
-            }
-            
-            mConfigWillChange = config != null && mConfiguration.diff(config) != 0;
-            if (DEBUG_CONFIGURATION) Slog.v(TAG,
-                    "Starting activity when config will change = " + mConfigWillChange);
-            
-            final long origId = Binder.clearCallingIdentity();
-            
-            int res = startActivityLocked(caller, intent, resolvedType,
-                    grantedUriPermissions, grantedMode, aInfo,
-                    resultTo, resultWho, requestCode, callingPid, callingUid,
-                    onlyIfNeeded, componentSpecified);
-            
-            if (mConfigWillChange) {
-                // If the caller also wants to switch to a new configuration,
-                // do so now.  This allows a clean switch, as we are waiting
-                // for the current activity to pause (so we will not destroy
-                // it), and have not yet started the next activity.
-                enforceCallingPermission(android.Manifest.permission.CHANGE_CONFIGURATION,
-                        "updateConfiguration()");
-                mConfigWillChange = false;
-                if (DEBUG_CONFIGURATION) Slog.v(TAG,
-                        "Updating to new configuration after starting activity.");
-                updateConfigurationLocked(config, null);
-            }
-            
-            Binder.restoreCallingIdentity(origId);
-            
-            if (outResult != null) {
-                outResult.result = res;
-                if (res == IActivityManager.START_SUCCESS) {
-                    mWaitingActivityLaunched.add(outResult);
-                    do {
-                        try {
-                            wait();
-                        } catch (InterruptedException e) {
-                        }
-                    } while (!outResult.timeout && outResult.who == null);
-                } else if (res == IActivityManager.START_TASK_TO_FRONT) {
-                    HistoryRecord r = this.topRunningActivityLocked(null);
-                    if (r.nowVisible) {
-                        outResult.timeout = false;
-                        outResult.who = new ComponentName(r.info.packageName, r.info.name);
-                        outResult.totalTime = 0;
-                        outResult.thisTime = 0;
-                    } else {
-                        outResult.thisTime = SystemClock.uptimeMillis();
-                        mWaitingActivityVisible.add(outResult);
-                        do {
-                            try {
-                                wait();
-                            } catch (InterruptedException e) {
-                            }
-                        } while (!outResult.timeout && outResult.who == null);
-                    }
-                }
-            }
-            
-            return res;
-        }
-    }
-
     public final int startActivity(IApplicationThread caller,
             Intent intent, String resolvedType, Uri[] grantedUriPermissions,
             int grantedMode, IBinder resultTo,
             String resultWho, int requestCode, boolean onlyIfNeeded,
             boolean debug) {
-        return startActivityMayWait(caller, intent, resolvedType,
+        return mMainStack.startActivityMayWait(caller, intent, resolvedType,
                 grantedUriPermissions, grantedMode, resultTo, resultWho,
                 requestCode, onlyIfNeeded, debug, null, null);
     }
@@ -3798,7 +1997,7 @@
             String resultWho, int requestCode, boolean onlyIfNeeded,
             boolean debug) {
         WaitResult res = new WaitResult();
-        startActivityMayWait(caller, intent, resolvedType,
+        mMainStack.startActivityMayWait(caller, intent, resolvedType,
                 grantedUriPermissions, grantedMode, resultTo, resultWho,
                 requestCode, onlyIfNeeded, debug, res, null);
         return res;
@@ -3809,7 +2008,7 @@
             int grantedMode, IBinder resultTo,
             String resultWho, int requestCode, boolean onlyIfNeeded,
             boolean debug, Configuration config) {
-        return startActivityMayWait(caller, intent, resolvedType,
+        return mMainStack.startActivityMayWait(caller, intent, resolvedType,
                 grantedUriPermissions, grantedMode, resultTo, resultWho,
                 requestCode, onlyIfNeeded, debug, null, config);
     }
@@ -3833,8 +2032,8 @@
         synchronized (this) {
             // If this is coming from the currently resumed activity, it is
             // effectively saying that app switches are allowed at this point.
-            if (mResumedActivity != null
-                    && mResumedActivity.info.applicationInfo.uid ==
+            if (mMainStack.mResumedActivity != null
+                    && mMainStack.mResumedActivity.info.applicationInfo.uid ==
                             Binder.getCallingUid()) {
                 mAppSwitchesAllowedTime = 0;
             }
@@ -3852,11 +2051,11 @@
         }
 
         synchronized (this) {
-            int index = indexOfTokenLocked(callingActivity);
+            int index = mMainStack.indexOfTokenLocked(callingActivity);
             if (index < 0) {
                 return false;
             }
-            HistoryRecord r = (HistoryRecord)mHistory.get(index);
+            ActivityRecord r = (ActivityRecord)mMainStack.mHistory.get(index);
             if (r.app == null || r.app.thread == null) {
                 // The caller is not running...  d'oh!
                 return false;
@@ -3870,7 +2069,7 @@
             ActivityInfo aInfo = null;
             try {
                 List<ResolveInfo> resolves =
-                    ActivityThread.getPackageManager().queryIntentActivities(
+                    AppGlobals.getPackageManager().queryIntentActivities(
                             intent, r.resolvedType,
                             PackageManager.MATCH_DEFAULT_ONLY | STOCK_PM_FLAGS);
 
@@ -3914,7 +2113,7 @@
             r.finishing = true;
 
             // Propagate reply information over to the new activity.
-            final HistoryRecord resultTo = r.resultTo;
+            final ActivityRecord resultTo = r.resultTo;
             final String resultWho = r.resultWho;
             final int requestCode = r.requestCode;
             r.resultTo = null;
@@ -3925,7 +2124,7 @@
             final long origId = Binder.clearCallingIdentity();
             // XXX we are not dealing with propagating grantedUriPermissions...
             // those are not yet exposed to user code, so there is no need.
-            int res = startActivityLocked(r.app.thread, intent,
+            int res = mMainStack.startActivityLocked(r.app.thread, intent,
                     r.resolvedType, null, 0, aInfo, resultTo, resultWho,
                     requestCode, -1, r.launchedFromUid, false, false);
             Binder.restoreCallingIdentity(origId);
@@ -3959,7 +2158,7 @@
         ActivityInfo aInfo;
         try {
             ResolveInfo rInfo =
-                ActivityThread.getPackageManager().resolveIntent(
+                AppGlobals.getPackageManager().resolveIntent(
                         intent, resolvedType,
                         PackageManager.MATCH_DEFAULT_ONLY | STOCK_PM_FLAGS);
             aInfo = rInfo != null ? rInfo.activityInfo : null;
@@ -3977,13 +2176,13 @@
         }
 
         synchronized(this) {
-            return startActivityLocked(null, intent, resolvedType,
+            return mMainStack.startActivityLocked(null, intent, resolvedType,
                     null, 0, aInfo, resultTo, resultWho, requestCode, -1, uid,
                     onlyIfNeeded, componentSpecified);
         }
     }
 
-    private final void addRecentTaskLocked(TaskRecord task) {
+    final void addRecentTaskLocked(TaskRecord task) {
         // Remove any existing entries that are the same kind of task.
         int N = mRecentTasks.size();
         for (int i=0; i<N; i++) {
@@ -4009,11 +2208,11 @@
     public void setRequestedOrientation(IBinder token,
             int requestedOrientation) {
         synchronized (this) {
-            int index = indexOfTokenLocked(token);
+            int index = mMainStack.indexOfTokenLocked(token);
             if (index < 0) {
                 return;
             }
-            HistoryRecord r = (HistoryRecord)mHistory.get(index);
+            ActivityRecord r = (ActivityRecord)mMainStack.mHistory.get(index);
             final long origId = Binder.clearCallingIdentity();
             mWindowManager.setAppOrientation(r, requestedOrientation);
             Configuration config = mWindowManager.updateOrientationFromAppTokens(
@@ -4022,7 +2221,7 @@
             if (config != null) {
                 r.frozenBeforeDestroy = true;
                 if (!updateConfigurationLocked(config, r)) {
-                    resumeTopActivityLocked(null);
+                    mMainStack.resumeTopActivityLocked(null);
                 }
             }
             Binder.restoreCallingIdentity(origId);
@@ -4031,250 +2230,15 @@
 
     public int getRequestedOrientation(IBinder token) {
         synchronized (this) {
-            int index = indexOfTokenLocked(token);
+            int index = mMainStack.indexOfTokenLocked(token);
             if (index < 0) {
                 return ActivityInfo.SCREEN_ORIENTATION_UNSPECIFIED;
             }
-            HistoryRecord r = (HistoryRecord)mHistory.get(index);
+            ActivityRecord r = (ActivityRecord)mMainStack.mHistory.get(index);
             return mWindowManager.getAppOrientation(r);
         }
     }
 
-    private final void stopActivityLocked(HistoryRecord r) {
-        if (DEBUG_SWITCH) Slog.d(TAG, "Stopping: " + r);
-        if ((r.intent.getFlags()&Intent.FLAG_ACTIVITY_NO_HISTORY) != 0
-                || (r.info.flags&ActivityInfo.FLAG_NO_HISTORY) != 0) {
-            if (!r.finishing) {
-                requestFinishActivityLocked(r, Activity.RESULT_CANCELED, null,
-                        "no-history");
-            }
-        } else if (r.app != null && r.app.thread != null) {
-            if (mFocusedActivity == r) {
-                setFocusedActivityLocked(topRunningActivityLocked(null));
-            }
-            r.resumeKeyDispatchingLocked();
-            try {
-                r.stopped = false;
-                r.state = ActivityState.STOPPING;
-                if (DEBUG_VISBILITY) Slog.v(
-                        TAG, "Stopping visible=" + r.visible + " for " + r);
-                if (!r.visible) {
-                    mWindowManager.setAppVisibility(r, false);
-                }
-                r.app.thread.scheduleStopActivity(r, r.visible, r.configChangeFlags);
-            } catch (Exception e) {
-                // Maybe just ignore exceptions here...  if the process
-                // has crashed, our death notification will clean things
-                // up.
-                Slog.w(TAG, "Exception thrown during pause", e);
-                // Just in case, assume it to be stopped.
-                r.stopped = true;
-                r.state = ActivityState.STOPPED;
-                if (r.configDestroy) {
-                    destroyActivityLocked(r, true);
-                }
-            }
-        }
-    }
-
-    /**
-     * @return Returns true if the activity is being finished, false if for
-     * some reason it is being left as-is.
-     */
-    private final boolean requestFinishActivityLocked(IBinder token, int resultCode,
-            Intent resultData, String reason) {
-        if (DEBUG_RESULTS) Slog.v(
-            TAG, "Finishing activity: token=" + token
-            + ", result=" + resultCode + ", data=" + resultData);
-
-        int index = indexOfTokenLocked(token);
-        if (index < 0) {
-            return false;
-        }
-        HistoryRecord r = (HistoryRecord)mHistory.get(index);
-
-        // Is this the last activity left?
-        boolean lastActivity = true;
-        for (int i=mHistory.size()-1; i>=0; i--) {
-            HistoryRecord p = (HistoryRecord)mHistory.get(i);
-            if (!p.finishing && p != r) {
-                lastActivity = false;
-                break;
-            }
-        }
-        
-        // If this is the last activity, but it is the home activity, then
-        // just don't finish it.
-        if (lastActivity) {
-            if (r.intent.hasCategory(Intent.CATEGORY_HOME)) {
-                return false;
-            }
-        }
-        
-        finishActivityLocked(r, index, resultCode, resultData, reason);
-        return true;
-    }
-
-    /**
-     * @return Returns true if this activity has been removed from the history
-     * list, or false if it is still in the list and will be removed later.
-     */
-    private final boolean finishActivityLocked(HistoryRecord r, int index,
-            int resultCode, Intent resultData, String reason) {
-        if (r.finishing) {
-            Slog.w(TAG, "Duplicate finish request for " + r);
-            return false;
-        }
-
-        r.finishing = true;
-        EventLog.writeEvent(EventLogTags.AM_FINISH_ACTIVITY,
-                System.identityHashCode(r),
-                r.task.taskId, r.shortComponentName, reason);
-        r.task.numActivities--;
-        if (index < (mHistory.size()-1)) {
-            HistoryRecord next = (HistoryRecord)mHistory.get(index+1);
-            if (next.task == r.task) {
-                if (r.frontOfTask) {
-                    // The next activity is now the front of the task.
-                    next.frontOfTask = true;
-                }
-                if ((r.intent.getFlags()&Intent.FLAG_ACTIVITY_CLEAR_WHEN_TASK_RESET) != 0) {
-                    // If the caller asked that this activity (and all above it)
-                    // be cleared when the task is reset, don't lose that information,
-                    // but propagate it up to the next activity.
-                    next.intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_WHEN_TASK_RESET);
-                }
-            }
-        }
-
-        r.pauseKeyDispatchingLocked();
-        if (mFocusedActivity == r) {
-            setFocusedActivityLocked(topRunningActivityLocked(null));
-        }
-
-        // send the result
-        HistoryRecord resultTo = r.resultTo;
-        if (resultTo != null) {
-            if (DEBUG_RESULTS) Slog.v(TAG, "Adding result to " + resultTo
-                    + " who=" + r.resultWho + " req=" + r.requestCode
-                    + " res=" + resultCode + " data=" + resultData);
-            if (r.info.applicationInfo.uid > 0) {
-                grantUriPermissionFromIntentLocked(r.info.applicationInfo.uid,
-                        r.packageName, resultData, r);
-            }
-            resultTo.addResultLocked(r, r.resultWho, r.requestCode, resultCode,
-                                     resultData);
-            r.resultTo = null;
-        }
-        else if (DEBUG_RESULTS) Slog.v(TAG, "No result destination from " + r);
-
-        // Make sure this HistoryRecord is not holding on to other resources,
-        // because clients have remote IPC references to this object so we
-        // can't assume that will go away and want to avoid circular IPC refs.
-        r.results = null;
-        r.pendingResults = null;
-        r.newIntents = null;
-        r.icicle = null;
-        
-        if (mPendingThumbnails.size() > 0) {
-            // There are clients waiting to receive thumbnails so, in case
-            // this is an activity that someone is waiting for, add it
-            // to the pending list so we can correctly update the clients.
-            mCancelledThumbnails.add(r);
-        }
-
-        if (mResumedActivity == r) {
-            boolean endTask = index <= 0
-                    || ((HistoryRecord)mHistory.get(index-1)).task != r.task;
-            if (DEBUG_TRANSITION) Slog.v(TAG,
-                    "Prepare close transition: finishing " + r);
-            mWindowManager.prepareAppTransition(endTask
-                    ? WindowManagerPolicy.TRANSIT_TASK_CLOSE
-                    : WindowManagerPolicy.TRANSIT_ACTIVITY_CLOSE);
-    
-            // Tell window manager to prepare for this one to be removed.
-            mWindowManager.setAppVisibility(r, false);
-                
-            if (mPausingActivity == null) {
-                if (DEBUG_PAUSE) Slog.v(TAG, "Finish needs to pause: " + r);
-                if (DEBUG_USER_LEAVING) Slog.v(TAG, "finish() => pause with userLeaving=false");
-                startPausingLocked(false, false);
-            }
-
-        } else if (r.state != ActivityState.PAUSING) {
-            // If the activity is PAUSING, we will complete the finish once
-            // it is done pausing; else we can just directly finish it here.
-            if (DEBUG_PAUSE) Slog.v(TAG, "Finish not pausing: " + r);
-            return finishCurrentActivityLocked(r, index,
-                    FINISH_AFTER_PAUSE) == null;
-        } else {
-            if (DEBUG_PAUSE) Slog.v(TAG, "Finish waiting for pause of: " + r);
-        }
-
-        return false;
-    }
-
-    private static final int FINISH_IMMEDIATELY = 0;
-    private static final int FINISH_AFTER_PAUSE = 1;
-    private static final int FINISH_AFTER_VISIBLE = 2;
-
-    private final HistoryRecord finishCurrentActivityLocked(HistoryRecord r,
-            int mode) {
-        final int index = indexOfTokenLocked(r);
-        if (index < 0) {
-            return null;
-        }
-
-        return finishCurrentActivityLocked(r, index, mode);
-    }
-
-    private final HistoryRecord finishCurrentActivityLocked(HistoryRecord r,
-            int index, int mode) {
-        // First things first: if this activity is currently visible,
-        // and the resumed activity is not yet visible, then hold off on
-        // finishing until the resumed one becomes visible.
-        if (mode == FINISH_AFTER_VISIBLE && r.nowVisible) {
-            if (!mStoppingActivities.contains(r)) {
-                mStoppingActivities.add(r);
-                if (mStoppingActivities.size() > 3) {
-                    // If we already have a few activities waiting to stop,
-                    // then give up on things going idle and start clearing
-                    // them out.
-                    Message msg = Message.obtain();
-                    msg.what = ActivityManagerService.IDLE_NOW_MSG;
-                    mHandler.sendMessage(msg);
-                }
-            }
-            r.state = ActivityState.STOPPING;
-            updateOomAdjLocked();
-            return r;
-        }
-
-        // make sure the record is cleaned out of other places.
-        mStoppingActivities.remove(r);
-        mWaitingVisibleActivities.remove(r);
-        if (mResumedActivity == r) {
-            mResumedActivity = null;
-        }
-        final ActivityState prevState = r.state;
-        r.state = ActivityState.FINISHING;
-
-        if (mode == FINISH_IMMEDIATELY
-                || prevState == ActivityState.STOPPED
-                || prevState == ActivityState.INITIALIZING) {
-            // If this activity is already stopped, we can just finish
-            // it right now.
-            return destroyActivityLocked(r, true) ? null : r;
-        } else {
-            // Need to go through the full pause cycle to get this
-            // activity into the stopped state and then finish it.
-            if (localLOGV) Slog.v(TAG, "Enqueueing pending finish: " + r);
-            mFinishingActivities.add(r);
-            resumeTopActivityLocked(null);
-        }
-        return r;
-    }
-
     /**
      * This is the internal entry point for handling Activity.finish().
      * 
@@ -4293,7 +2257,7 @@
         synchronized(this) {
             if (mController != null) {
                 // Find the first activity that is not finishing.
-                HistoryRecord next = topRunningActivityLocked(token, 0);
+                ActivityRecord next = mMainStack.topRunningActivityLocked(token, 0);
                 if (next != null) {
                     // ask watcher if this is allowed
                     boolean resumeOK = true;
@@ -4309,57 +2273,119 @@
                 }
             }
             final long origId = Binder.clearCallingIdentity();
-            boolean res = requestFinishActivityLocked(token, resultCode,
+            boolean res = mMainStack.requestFinishActivityLocked(token, resultCode,
                     resultData, "app-request");
             Binder.restoreCallingIdentity(origId);
             return res;
         }
     }
 
-    void sendActivityResultLocked(int callingUid, HistoryRecord r,
-            String resultWho, int requestCode, int resultCode, Intent data) {
-
-        if (callingUid > 0) {
-            grantUriPermissionFromIntentLocked(callingUid, r.packageName,
-                    data, r);
+    public final void finishHeavyWeightApp() {
+        if (checkCallingPermission(android.Manifest.permission.FORCE_STOP_PACKAGES)
+                != PackageManager.PERMISSION_GRANTED) {
+            String msg = "Permission Denial: finishHeavyWeightApp() from pid="
+                    + Binder.getCallingPid()
+                    + ", uid=" + Binder.getCallingUid()
+                    + " requires " + android.Manifest.permission.FORCE_STOP_PACKAGES;
+            Slog.w(TAG, msg);
+            throw new SecurityException(msg);
         }
-
-        if (DEBUG_RESULTS) Slog.v(TAG, "Send activity result to " + r
-                + " : who=" + resultWho + " req=" + requestCode
-                + " res=" + resultCode + " data=" + data);
-        if (mResumedActivity == r && r.app != null && r.app.thread != null) {
-            try {
-                ArrayList<ResultInfo> list = new ArrayList<ResultInfo>();
-                list.add(new ResultInfo(resultWho, requestCode,
-                        resultCode, data));
-                r.app.thread.scheduleSendResult(r, list);
+        
+        synchronized(this) {
+            if (mHeavyWeightProcess == null) {
                 return;
-            } catch (Exception e) {
-                Slog.w(TAG, "Exception thrown sending result to " + r, e);
+            }
+            
+            ArrayList<ActivityRecord> activities = new ArrayList<ActivityRecord>(
+                    mHeavyWeightProcess.activities);
+            for (int i=0; i<activities.size(); i++) {
+                ActivityRecord r = activities.get(i);
+                if (!r.finishing) {
+                    int index = mMainStack.indexOfTokenLocked(r);
+                    if (index >= 0) {
+                        mMainStack.finishActivityLocked(r, index, Activity.RESULT_CANCELED,
+                                null, "finish-heavy");
+                    }
+                }
+            }
+            
+            mHeavyWeightProcess = null;
+            mHandler.sendEmptyMessage(CANCEL_HEAVY_NOTIFICATION_MSG);
+        }
+    }
+    
+    public void crashApplication(int uid, int initialPid, String packageName,
+            String message) {
+        if (checkCallingPermission(android.Manifest.permission.FORCE_STOP_PACKAGES)
+                != PackageManager.PERMISSION_GRANTED) {
+            String msg = "Permission Denial: crashApplication() from pid="
+                    + Binder.getCallingPid()
+                    + ", uid=" + Binder.getCallingUid()
+                    + " requires " + android.Manifest.permission.FORCE_STOP_PACKAGES;
+            Slog.w(TAG, msg);
+            throw new SecurityException(msg);
+        }
+        
+        synchronized(this) {
+            ProcessRecord proc = null;
+            
+            // Figure out which process to kill.  We don't trust that initialPid
+            // still has any relation to current pids, so must scan through the
+            // list.
+            synchronized (mPidsSelfLocked) {
+                for (int i=0; i<mPidsSelfLocked.size(); i++) {
+                    ProcessRecord p = mPidsSelfLocked.valueAt(i);
+                    if (p.info.uid != uid) {
+                        continue;
+                    }
+                    if (p.pid == initialPid) {
+                        proc = p;
+                        break;
+                    }
+                    for (String str : p.pkgList) {
+                        if (str.equals(packageName)) {
+                            proc = p;
+                        }
+                    }
+                }
+            }
+            
+            if (proc == null) {
+                Log.w(TAG, "crashApplication: nothing for uid=" + uid
+                        + " initialPid=" + initialPid
+                        + " packageName=" + packageName);
+                return;
+            }
+            
+            if (proc.thread != null) {
+                long ident = Binder.clearCallingIdentity();
+                try {
+                    proc.thread.scheduleCrash(message);
+                } catch (RemoteException e) {
+                }
+                Binder.restoreCallingIdentity(ident);
             }
         }
-
-        r.addResultLocked(null, resultWho, requestCode, resultCode, data);
     }
-
+    
     public final void finishSubActivity(IBinder token, String resultWho,
             int requestCode) {
         synchronized(this) {
-            int index = indexOfTokenLocked(token);
+            int index = mMainStack.indexOfTokenLocked(token);
             if (index < 0) {
                 return;
             }
-            HistoryRecord self = (HistoryRecord)mHistory.get(index);
+            ActivityRecord self = (ActivityRecord)mMainStack.mHistory.get(index);
 
             final long origId = Binder.clearCallingIdentity();
 
             int i;
-            for (i=mHistory.size()-1; i>=0; i--) {
-                HistoryRecord r = (HistoryRecord)mHistory.get(i);
+            for (i=mMainStack.mHistory.size()-1; i>=0; i--) {
+                ActivityRecord r = (ActivityRecord)mMainStack.mHistory.get(i);
                 if (r.resultTo == self && r.requestCode == requestCode) {
                     if ((r.resultWho == null && resultWho == null) ||
                         (r.resultWho != null && r.resultWho.equals(resultWho))) {
-                        finishActivityLocked(r, i,
+                        mMainStack.finishActivityLocked(r, i,
                                 Activity.RESULT_CANCELED, null, "request-sub");
                     }
                 }
@@ -4372,8 +2398,8 @@
     public boolean willActivityBeVisible(IBinder token) {
         synchronized(this) {
             int i;
-            for (i=mHistory.size()-1; i>=0; i--) {
-                HistoryRecord r = (HistoryRecord)mHistory.get(i);
+            for (i=mMainStack.mHistory.size()-1; i>=0; i--) {
+                ActivityRecord r = (ActivityRecord)mMainStack.mHistory.get(i);
                 if (r == token) {
                     return true;
                 }
@@ -4388,11 +2414,11 @@
     public void overridePendingTransition(IBinder token, String packageName,
             int enterAnim, int exitAnim) {
         synchronized(this) {
-            int index = indexOfTokenLocked(token);
+            int index = mMainStack.indexOfTokenLocked(token);
             if (index < 0) {
                 return;
             }
-            HistoryRecord self = (HistoryRecord)mHistory.get(index);
+            ActivityRecord self = (ActivityRecord)mMainStack.mHistory.get(index);
 
             final long origId = Binder.clearCallingIdentity();
             
@@ -4407,188 +2433,6 @@
     }
     
     /**
-     * Perform clean-up of service connections in an activity record.
-     */
-    private final void cleanUpActivityServicesLocked(HistoryRecord r) {
-        // Throw away any services that have been bound by this activity.
-        if (r.connections != null) {
-            Iterator<ConnectionRecord> it = r.connections.iterator();
-            while (it.hasNext()) {
-                ConnectionRecord c = it.next();
-                removeConnectionLocked(c, null, r);
-            }
-            r.connections = null;
-        }
-    }
-    
-    /**
-     * Perform the common clean-up of an activity record.  This is called both
-     * as part of destroyActivityLocked() (when destroying the client-side
-     * representation) and cleaning things up as a result of its hosting
-     * processing going away, in which case there is no remaining client-side
-     * state to destroy so only the cleanup here is needed.
-     */
-    private final void cleanUpActivityLocked(HistoryRecord r, boolean cleanServices) {
-        if (mResumedActivity == r) {
-            mResumedActivity = null;
-        }
-        if (mFocusedActivity == r) {
-            mFocusedActivity = null;
-        }
-
-        r.configDestroy = false;
-        r.frozenBeforeDestroy = false;
-
-        // Make sure this record is no longer in the pending finishes list.
-        // This could happen, for example, if we are trimming activities
-        // down to the max limit while they are still waiting to finish.
-        mFinishingActivities.remove(r);
-        mWaitingVisibleActivities.remove(r);
-        
-        // Remove any pending results.
-        if (r.finishing && r.pendingResults != null) {
-            for (WeakReference<PendingIntentRecord> apr : r.pendingResults) {
-                PendingIntentRecord rec = apr.get();
-                if (rec != null) {
-                    cancelIntentSenderLocked(rec, false);
-                }
-            }
-            r.pendingResults = null;
-        }
-
-        if (cleanServices) {
-            cleanUpActivityServicesLocked(r);            
-        }
-
-        if (mPendingThumbnails.size() > 0) {
-            // There are clients waiting to receive thumbnails so, in case
-            // this is an activity that someone is waiting for, add it
-            // to the pending list so we can correctly update the clients.
-            mCancelledThumbnails.add(r);
-        }
-
-        // Get rid of any pending idle timeouts.
-        mHandler.removeMessages(PAUSE_TIMEOUT_MSG, r);
-        mHandler.removeMessages(IDLE_TIMEOUT_MSG, r);
-    }
-
-    private final void removeActivityFromHistoryLocked(HistoryRecord r) {
-        if (r.state != ActivityState.DESTROYED) {
-            mHistory.remove(r);
-            r.inHistory = false;
-            r.state = ActivityState.DESTROYED;
-            mWindowManager.removeAppToken(r);
-            if (VALIDATE_TOKENS) {
-                mWindowManager.validateAppTokens(mHistory);
-            }
-            cleanUpActivityServicesLocked(r);
-            removeActivityUriPermissionsLocked(r);
-        }
-    }
-    
-    /**
-     * Destroy the current CLIENT SIDE instance of an activity.  This may be
-     * called both when actually finishing an activity, or when performing
-     * a configuration switch where we destroy the current client-side object
-     * but then create a new client-side object for this same HistoryRecord.
-     */
-    private final boolean destroyActivityLocked(HistoryRecord r,
-            boolean removeFromApp) {
-        if (DEBUG_SWITCH) Slog.v(
-            TAG, "Removing activity: token=" + r
-              + ", app=" + (r.app != null ? r.app.processName : "(null)"));
-        EventLog.writeEvent(EventLogTags.AM_DESTROY_ACTIVITY,
-                System.identityHashCode(r),
-                r.task.taskId, r.shortComponentName);
-
-        boolean removedFromHistory = false;
-        
-        cleanUpActivityLocked(r, false);
-
-        final boolean hadApp = r.app != null;
-        
-        if (hadApp) {
-            if (removeFromApp) {
-                int idx = r.app.activities.indexOf(r);
-                if (idx >= 0) {
-                    r.app.activities.remove(idx);
-                }
-                if (r.persistent) {
-                    decPersistentCountLocked(r.app);
-                }
-                if (r.app.activities.size() == 0) {
-                    // No longer have activities, so update location in
-                    // LRU list.
-                    updateLruProcessLocked(r.app, true, false);
-                }
-            }
-
-            boolean skipDestroy = false;
-            
-            try {
-                if (DEBUG_SWITCH) Slog.i(TAG, "Destroying: " + r);
-                r.app.thread.scheduleDestroyActivity(r, r.finishing,
-                        r.configChangeFlags);
-            } catch (Exception e) {
-                // We can just ignore exceptions here...  if the process
-                // has crashed, our death notification will clean things
-                // up.
-                //Slog.w(TAG, "Exception thrown during finish", e);
-                if (r.finishing) {
-                    removeActivityFromHistoryLocked(r);
-                    removedFromHistory = true;
-                    skipDestroy = true;
-                }
-            }
-
-            r.app = null;
-            r.nowVisible = false;
-            
-            if (r.finishing && !skipDestroy) {
-                r.state = ActivityState.DESTROYING;
-                Message msg = mHandler.obtainMessage(DESTROY_TIMEOUT_MSG);
-                msg.obj = r;
-                mHandler.sendMessageDelayed(msg, DESTROY_TIMEOUT);
-            } else {
-                r.state = ActivityState.DESTROYED;
-            }
-        } else {
-            // remove this record from the history.
-            if (r.finishing) {
-                removeActivityFromHistoryLocked(r);
-                removedFromHistory = true;
-            } else {
-                r.state = ActivityState.DESTROYED;
-            }
-        }
-
-        r.configChangeFlags = 0;
-        
-        if (!mLRUActivities.remove(r) && hadApp) {
-            Slog.w(TAG, "Activity " + r + " being finished, but not in LRU list");
-        }
-        
-        return removedFromHistory;
-    }
-
-    private static void removeHistoryRecordsForAppLocked(ArrayList list, ProcessRecord app) {
-        int i = list.size();
-        if (localLOGV) Slog.v(
-            TAG, "Removing app " + app + " from list " + list
-            + " with " + i + " entries");
-        while (i > 0) {
-            i--;
-            HistoryRecord r = (HistoryRecord)list.get(i);
-            if (localLOGV) Slog.v(
-                TAG, "Record #" + i + " " + r + ": app=" + r.app);
-            if (r.app == app) {
-                if (localLOGV) Slog.v(TAG, "Removing this entry!");
-                list.remove(i);
-            }
-        }
-    }
-
-    /**
      * Main function for removing an existing process from the activity manager
      * as a result of that process going away.  Clears out all connections
      * to the process.
@@ -4601,30 +2445,27 @@
         }
 
         // Just in case...
-        if (mPausingActivity != null && mPausingActivity.app == app) {
-            if (DEBUG_PAUSE) Slog.v(TAG, "App died while pausing: " + mPausingActivity);
-            mPausingActivity = null;
+        if (mMainStack.mPausingActivity != null && mMainStack.mPausingActivity.app == app) {
+            if (DEBUG_PAUSE) Slog.v(TAG, "App died while pausing: " +mMainStack.mPausingActivity);
+            mMainStack.mPausingActivity = null;
         }
-        if (mLastPausedActivity != null && mLastPausedActivity.app == app) {
-            mLastPausedActivity = null;
+        if (mMainStack.mLastPausedActivity != null && mMainStack.mLastPausedActivity.app == app) {
+            mMainStack.mLastPausedActivity = null;
         }
 
         // Remove this application's activities from active lists.
-        removeHistoryRecordsForAppLocked(mLRUActivities, app);
-        removeHistoryRecordsForAppLocked(mStoppingActivities, app);
-        removeHistoryRecordsForAppLocked(mWaitingVisibleActivities, app);
-        removeHistoryRecordsForAppLocked(mFinishingActivities, app);
+        mMainStack.removeHistoryRecordsForAppLocked(app);
 
         boolean atTop = true;
         boolean hasVisibleActivities = false;
 
         // Clean out the history list.
-        int i = mHistory.size();
+        int i = mMainStack.mHistory.size();
         if (localLOGV) Slog.v(
             TAG, "Removing app " + app + " from history with " + i + " entries");
         while (i > 0) {
             i--;
-            HistoryRecord r = (HistoryRecord)mHistory.get(i);
+            ActivityRecord r = (ActivityRecord)mMainStack.mHistory.get(i);
             if (localLOGV) Slog.v(
                 TAG, "Record #" + i + " " + r + ": app=" + r.app);
             if (r.app == app) {
@@ -4632,14 +2473,14 @@
                     if (localLOGV) Slog.v(
                         TAG, "Removing this entry!  frozen=" + r.haveState
                         + " finishing=" + r.finishing);
-                    mHistory.remove(i);
+                    mMainStack.mHistory.remove(i);
 
                     r.inHistory = false;
                     mWindowManager.removeAppToken(r);
                     if (VALIDATE_TOKENS) {
-                        mWindowManager.validateAppTokens(mHistory);
+                        mWindowManager.validateAppTokens(mMainStack.mHistory);
                     }
-                    removeActivityUriPermissionsLocked(r);
+                    r.removeUriPermissionsLocked();
 
                 } else {
                     // We have the current state for this activity, so
@@ -4656,7 +2497,7 @@
                     }
                 }
 
-                cleanUpActivityLocked(r, true);
+                r.stack.cleanUpActivityLocked(r, true);
                 r.state = ActivityState.STOPPED;
             }
             atTop = false;
@@ -4673,14 +2514,14 @@
         }
 
         if (!restarting) {
-            if (!resumeTopActivityLocked(null)) {
+            if (!mMainStack.resumeTopActivityLocked(null)) {
                 // If there was nothing to resume, and we are not already
                 // restarting this process, but there is a visible activity that
                 // is hosted by the process...  then make sure all visible
                 // activities are running, taking care of restarting this
                 // process.
                 if (hasVisibleActivities) {
-                    ensureActivitiesVisibleLocked(null, 0);
+                    mMainStack.ensureActivitiesVisibleLocked(null, 0);
                 }
             }
         }
@@ -4699,7 +2540,7 @@
         return -1;
     }
 
-    private final ProcessRecord getRecordForAppLocked(
+    final ProcessRecord getRecordForAppLocked(
             IApplicationThread thread) {
         if (thread == null) {
             return null;
@@ -4709,7 +2550,7 @@
         return appIndex >= 0 ? mLruProcesses.get(appIndex) : null;
     }
 
-    private final void appDiedLocked(ProcessRecord app, int pid,
+    final void appDiedLocked(ProcessRecord app, int pid,
             IApplicationThread thread) {
 
         mProcDeaths[0]++;
@@ -4751,8 +2592,8 @@
                                 (rec.lastLowMemory+GC_MIN_INTERVAL) <= now) {
                             // The low memory report is overriding any current
                             // state for a GC request.  Make sure to do
-                            // visible/foreground processes first.
-                            if (rec.setAdj <= VISIBLE_APP_ADJ) {
+                            // heavy/important/visible/foreground processes first.
+                            if (rec.setAdj <= HEAVY_WEIGHT_APP_ADJ) {
                                 rec.lastRequestedGc = 0;
                             } else {
                                 rec.lastRequestedGc = rec.lastLowMemory;
@@ -4829,8 +2670,8 @@
         return tracesFile;
     }
 
-    final void appNotResponding(ProcessRecord app, HistoryRecord activity,
-            HistoryRecord parent, final String annotation) {
+    final void appNotResponding(ProcessRecord app, ActivityRecord activity,
+            ActivityRecord parent, final String annotation) {
         ArrayList<Integer> pids = new ArrayList<Integer>(20);
         
         synchronized (this) {
@@ -4949,8 +2790,7 @@
         }
     }
 
-    private final void decPersistentCountLocked(ProcessRecord app)
-    {
+    final void decPersistentCountLocked(ProcessRecord app) {
         app.persistentActivities--;
         if (app.persistentActivities > 0) {
             // Still more of 'em...
@@ -4978,11 +2818,11 @@
         }
 
         synchronized(this) {
-            int index = indexOfTokenLocked(token);
+            int index = mMainStack.indexOfTokenLocked(token);
             if (index < 0) {
                 return;
             }
-            HistoryRecord r = (HistoryRecord)mHistory.get(index);
+            ActivityRecord r = (ActivityRecord)mMainStack.mHistory.get(index);
             ProcessRecord app = r.app;
 
             if (localLOGV) Slog.v(
@@ -5034,7 +2874,7 @@
         int pid = Binder.getCallingPid();
         long callingId = Binder.clearCallingIdentity();
         try {
-            IPackageManager pm = ActivityThread.getPackageManager();
+            IPackageManager pm = AppGlobals.getPackageManager();
             int pkgUid = -1;
             synchronized(this) {
                 try {
@@ -5091,7 +2931,7 @@
         
         long callingId = Binder.clearCallingIdentity();
         try {
-            IPackageManager pm = ActivityThread.getPackageManager();
+            IPackageManager pm = AppGlobals.getPackageManager();
             int pkgUid = -1;
             synchronized(this) {
                 try {
@@ -5123,7 +2963,7 @@
         
         long callingId = Binder.clearCallingIdentity();
         try {
-            IPackageManager pm = ActivityThread.getPackageManager();
+            IPackageManager pm = AppGlobals.getPackageManager();
             int pkgUid = -1;
             synchronized(this) {
                 try {
@@ -5193,10 +3033,10 @@
             
             mWindowManager.closeSystemDialogs(reason);
             
-            for (i=mHistory.size()-1; i>=0; i--) {
-                HistoryRecord r = (HistoryRecord)mHistory.get(i);
+            for (i=mMainStack.mHistory.size()-1; i>=0; i--) {
+                ActivityRecord r = (ActivityRecord)mMainStack.mHistory.get(i);
                 if ((r.info.flags&ActivityInfo.FLAG_FINISH_ON_CLOSE_SYSTEM_DIALOGS) != 0) {
-                    finishActivityLocked(r, i,
+                    r.stack.finishActivityLocked(r, i,
                             Activity.RESULT_CANCELED, null, "close-sys");
                 }
             }
@@ -5297,7 +3137,7 @@
 
         if (uid < 0) {
             try {
-                uid = ActivityThread.getPackageManager().getPackageUid(name);
+                uid = AppGlobals.getPackageManager().getPackageUid(name);
             } catch (RemoteException e) {
             }
         }
@@ -5317,8 +3157,8 @@
         boolean didSomething = killPackageProcessesLocked(name, uid, -100,
                 callerWillRestart, doit);
         
-        for (i=mHistory.size()-1; i>=0; i--) {
-            HistoryRecord r = (HistoryRecord)mHistory.get(i);
+        for (i=mMainStack.mHistory.size()-1; i>=0; i--) {
+            ActivityRecord r = (ActivityRecord)mMainStack.mHistory.get(i);
             if (r.packageName.equals(name)) {
                 if (!doit) {
                     return true;
@@ -5329,7 +3169,7 @@
                     r.app.removed = true;
                 }
                 r.app = null;
-                finishActivityLocked(r, i, Activity.RESULT_CANCELED, null, "uninstall");
+                r.stack.finishActivityLocked(r, i, Activity.RESULT_CANCELED, null, "uninstall");
             }
         }
 
@@ -5361,7 +3201,7 @@
                     ac.removePackage(name);
                 }
             }
-            resumeTopActivityLocked(null);
+            mMainStack.resumeTopActivityLocked(null);
         }
         
         return didSomething;
@@ -5375,6 +3215,10 @@
             + "/" + uid + ")");
 
         mProcessNames.remove(name, uid);
+        if (mHeavyWeightProcess == app) {
+            mHeavyWeightProcess = null;
+            mHandler.sendEmptyMessage(CANCEL_HEAVY_NOTIFICATION_MSG);
+        }
         boolean needRestart = false;
         if (app.pid > 0 && app.pid != MY_PID) {
             int pid = app.pid;
@@ -5416,6 +3260,10 @@
             EventLog.writeEvent(EventLogTags.AM_PROCESS_START_TIMEOUT, pid, app.info.uid,
                     app.processName);
             mProcessNames.remove(app.processName, app.info.uid);
+            if (mHeavyWeightProcess == app) {
+                mHeavyWeightProcess = null;
+                mHandler.sendEmptyMessage(CANCEL_HEAVY_NOTIFICATION_MSG);
+            }
             // Take care of any launching providers waiting for this process.
             checkAppInLaunchingProvidersLocked(app, true);
             // Take care of any services that are waiting for the process.
@@ -5582,12 +3430,12 @@
         boolean didSomething = false;
 
         // See if the top visible activity is waiting to run in this process...
-        HistoryRecord hr = topRunningActivityLocked(null);
+        ActivityRecord hr = mMainStack.topRunningActivityLocked(null);
         if (hr != null && normalMode) {
             if (hr.app == null && app.info.uid == hr.info.applicationInfo.uid
                     && processName.equals(hr.processName)) {
                 try {
-                    if (realStartActivityLocked(hr, app, true, true)) {
+                    if (mMainStack.realStartActivityLocked(hr, app, true, true)) {
                         didSomething = true;
                     }
                 } catch (Exception e) {
@@ -5596,7 +3444,7 @@
                     badApp = true;
                 }
             } else {
-                ensureActivitiesVisibleLocked(hr, null, processName, 0);
+                mMainStack.ensureActivitiesVisibleLocked(hr, null, processName, 0);
             }
         }
 
@@ -5680,195 +3528,16 @@
 
     public final void activityIdle(IBinder token, Configuration config) {
         final long origId = Binder.clearCallingIdentity();
-        activityIdleInternal(token, false, config);
+        mMainStack.activityIdleInternal(token, false, config);
         Binder.restoreCallingIdentity(origId);
     }
 
-    final ArrayList<HistoryRecord> processStoppingActivitiesLocked(
-            boolean remove) {
-        int N = mStoppingActivities.size();
-        if (N <= 0) return null;
-
-        ArrayList<HistoryRecord> stops = null;
-
-        final boolean nowVisible = mResumedActivity != null
-                && mResumedActivity.nowVisible
-                && !mResumedActivity.waitingVisible;
-        for (int i=0; i<N; i++) {
-            HistoryRecord s = mStoppingActivities.get(i);
-            if (localLOGV) Slog.v(TAG, "Stopping " + s + ": nowVisible="
-                    + nowVisible + " waitingVisible=" + s.waitingVisible
-                    + " finishing=" + s.finishing);
-            if (s.waitingVisible && nowVisible) {
-                mWaitingVisibleActivities.remove(s);
-                s.waitingVisible = false;
-                if (s.finishing) {
-                    // If this activity is finishing, it is sitting on top of
-                    // everyone else but we now know it is no longer needed...
-                    // so get rid of it.  Otherwise, we need to go through the
-                    // normal flow and hide it once we determine that it is
-                    // hidden by the activities in front of it.
-                    if (localLOGV) Slog.v(TAG, "Before stopping, can hide: " + s);
-                    mWindowManager.setAppVisibility(s, false);
-                }
-            }
-            if (!s.waitingVisible && remove) {
-                if (localLOGV) Slog.v(TAG, "Ready to stop: " + s);
-                if (stops == null) {
-                    stops = new ArrayList<HistoryRecord>();
-                }
-                stops.add(s);
-                mStoppingActivities.remove(i);
-                N--;
-                i--;
-            }
-        }
-
-        return stops;
-    }
-
     void enableScreenAfterBoot() {
         EventLog.writeEvent(EventLogTags.BOOT_PROGRESS_ENABLE_SCREEN,
                 SystemClock.uptimeMillis());
         mWindowManager.enableScreenAfterBoot();
     }
 
-    final void activityIdleInternal(IBinder token, boolean fromTimeout,
-            Configuration config) {
-        if (localLOGV) Slog.v(TAG, "Activity idle: " + token);
-
-        ArrayList<HistoryRecord> stops = null;
-        ArrayList<HistoryRecord> finishes = null;
-        ArrayList<HistoryRecord> thumbnails = null;
-        int NS = 0;
-        int NF = 0;
-        int NT = 0;
-        IApplicationThread sendThumbnail = null;
-        boolean booting = false;
-        boolean enableScreen = false;
-
-        synchronized (this) {
-            if (token != null) {
-                mHandler.removeMessages(IDLE_TIMEOUT_MSG, token);
-            }
-
-            // Get the activity record.
-            int index = indexOfTokenLocked(token);
-            if (index >= 0) {
-                HistoryRecord r = (HistoryRecord)mHistory.get(index);
-
-                if (fromTimeout) {
-                    reportActivityLaunchedLocked(fromTimeout, r, -1, -1);
-                }
-                
-                // This is a hack to semi-deal with a race condition
-                // in the client where it can be constructed with a
-                // newer configuration from when we asked it to launch.
-                // We'll update with whatever configuration it now says
-                // it used to launch.
-                if (config != null) {
-                    r.configuration = config;
-                }
-                
-                // No longer need to keep the device awake.
-                if (mResumedActivity == r && mLaunchingActivity.isHeld()) {
-                    mHandler.removeMessages(LAUNCH_TIMEOUT_MSG);
-                    mLaunchingActivity.release();
-                }
-
-                // We are now idle.  If someone is waiting for a thumbnail from
-                // us, we can now deliver.
-                r.idle = true;
-                scheduleAppGcsLocked();
-                if (r.thumbnailNeeded && r.app != null && r.app.thread != null) {
-                    sendThumbnail = r.app.thread;
-                    r.thumbnailNeeded = false;
-                }
-
-                // If this activity is fullscreen, set up to hide those under it.
-
-                if (DEBUG_VISBILITY) Slog.v(TAG, "Idle activity for " + r);
-                ensureActivitiesVisibleLocked(null, 0);
-
-                //Slog.i(TAG, "IDLE: mBooted=" + mBooted + ", fromTimeout=" + fromTimeout);
-                if (!mBooted && !fromTimeout) {
-                    mBooted = true;
-                    enableScreen = true;
-                }
-                
-            } else if (fromTimeout) {
-                reportActivityLaunchedLocked(fromTimeout, null, -1, -1);
-            }
-
-            // Atomically retrieve all of the other things to do.
-            stops = processStoppingActivitiesLocked(true);
-            NS = stops != null ? stops.size() : 0;
-            if ((NF=mFinishingActivities.size()) > 0) {
-                finishes = new ArrayList<HistoryRecord>(mFinishingActivities);
-                mFinishingActivities.clear();
-            }
-            if ((NT=mCancelledThumbnails.size()) > 0) {
-                thumbnails = new ArrayList<HistoryRecord>(mCancelledThumbnails);
-                mCancelledThumbnails.clear();
-            }
-
-            booting = mBooting;
-            mBooting = false;
-        }
-
-        int i;
-
-        // Send thumbnail if requested.
-        if (sendThumbnail != null) {
-            try {
-                sendThumbnail.requestThumbnail(token);
-            } catch (Exception e) {
-                Slog.w(TAG, "Exception thrown when requesting thumbnail", e);
-                sendPendingThumbnail(null, token, null, null, true);
-            }
-        }
-
-        // Stop any activities that are scheduled to do so but have been
-        // waiting for the next one to start.
-        for (i=0; i<NS; i++) {
-            HistoryRecord r = (HistoryRecord)stops.get(i);
-            synchronized (this) {
-                if (r.finishing) {
-                    finishCurrentActivityLocked(r, FINISH_IMMEDIATELY);
-                } else {
-                    stopActivityLocked(r);
-                }
-            }
-        }
-
-        // Finish any activities that are scheduled to do so but have been
-        // waiting for the next one to start.
-        for (i=0; i<NF; i++) {
-            HistoryRecord r = (HistoryRecord)finishes.get(i);
-            synchronized (this) {
-                destroyActivityLocked(r, true);
-            }
-        }
-
-        // Report back to any thumbnail receivers.
-        for (i=0; i<NT; i++) {
-            HistoryRecord r = (HistoryRecord)thumbnails.get(i);
-            sendPendingThumbnail(r, null, null, null, true);
-        }
-
-        if (booting) {
-            finishBooting();
-        }
-
-        trimApplications();
-        //dump();
-        //mWindowManager.dump();
-
-        if (enableScreen) {
-            enableScreenAfterBoot();
-        }
-    }
-
     final void finishBooting() {
         IntentFilter pkgFilter = new IntentFilter();
         pkgFilter.addAction(Intent.ACTION_QUERY_PACKAGE_RESTART);
@@ -5937,60 +3606,31 @@
         }
 
         final long origId = Binder.clearCallingIdentity();
-        activityPaused(token, icicle, false);
+        mMainStack.activityPaused(token, icicle, false);
         Binder.restoreCallingIdentity(origId);
     }
 
-    final void activityPaused(IBinder token, Bundle icicle, boolean timeout) {
-        if (DEBUG_PAUSE) Slog.v(
-            TAG, "Activity paused: token=" + token + ", icicle=" + icicle
-            + ", timeout=" + timeout);
-
-        HistoryRecord r = null;
-
-        synchronized (this) {
-            int index = indexOfTokenLocked(token);
-            if (index >= 0) {
-                r = (HistoryRecord)mHistory.get(index);
-                if (!timeout) {
-                    r.icicle = icicle;
-                    r.haveState = true;
-                }
-                mHandler.removeMessages(PAUSE_TIMEOUT_MSG, r);
-                if (mPausingActivity == r) {
-                    r.state = ActivityState.PAUSED;
-                    completePauseLocked();
-                } else {
-                	EventLog.writeEvent(EventLogTags.AM_FAILED_TO_PAUSE,
-                	        System.identityHashCode(r), r.shortComponentName, 
-                			mPausingActivity != null
-                			    ? mPausingActivity.shortComponentName : "(none)");
-                }
-            }
-        }
-    }
-
     public final void activityStopped(IBinder token, Bitmap thumbnail,
             CharSequence description) {
         if (localLOGV) Slog.v(
             TAG, "Activity stopped: token=" + token);
 
-        HistoryRecord r = null;
+        ActivityRecord r = null;
 
         final long origId = Binder.clearCallingIdentity();
 
         synchronized (this) {
-            int index = indexOfTokenLocked(token);
+            int index = mMainStack.indexOfTokenLocked(token);
             if (index >= 0) {
-                r = (HistoryRecord)mHistory.get(index);
+                r = (ActivityRecord)mMainStack.mHistory.get(index);
                 r.thumbnail = thumbnail;
                 r.description = description;
                 r.stopped = true;
                 r.state = ActivityState.STOPPED;
                 if (!r.finishing) {
                     if (r.configDestroy) {
-                        destroyActivityLocked(r, true);
-                        resumeTopActivityLocked(null);
+                        r.stack.destroyActivityLocked(r, true);
+                        r.stack.resumeTopActivityLocked(null);
                     }
                 }
             }
@@ -6007,39 +3647,27 @@
 
     public final void activityDestroyed(IBinder token) {
         if (DEBUG_SWITCH) Slog.v(TAG, "ACTIVITY DESTROYED: " + token);
-        synchronized (this) {
-            mHandler.removeMessages(DESTROY_TIMEOUT_MSG, token);
-            
-            int index = indexOfTokenLocked(token);
-            if (index >= 0) {
-                HistoryRecord r = (HistoryRecord)mHistory.get(index);
-                if (r.state == ActivityState.DESTROYING) {
-                    final long origId = Binder.clearCallingIdentity();
-                    removeActivityFromHistoryLocked(r);
-                    Binder.restoreCallingIdentity(origId);
-                }
-            }
-        }
+        mMainStack.activityDestroyed(token);
     }
     
     public String getCallingPackage(IBinder token) {
         synchronized (this) {
-            HistoryRecord r = getCallingRecordLocked(token);
+            ActivityRecord r = getCallingRecordLocked(token);
             return r != null && r.app != null ? r.info.packageName : null;
         }
     }
 
     public ComponentName getCallingActivity(IBinder token) {
         synchronized (this) {
-            HistoryRecord r = getCallingRecordLocked(token);
+            ActivityRecord r = getCallingRecordLocked(token);
             return r != null ? r.intent.getComponent() : null;
         }
     }
 
-    private HistoryRecord getCallingRecordLocked(IBinder token) {
-        int index = indexOfTokenLocked(token);
+    private ActivityRecord getCallingRecordLocked(IBinder token) {
+        int index = mMainStack.indexOfTokenLocked(token);
         if (index >= 0) {
-            HistoryRecord r = (HistoryRecord)mHistory.get(index);
+            ActivityRecord r = (ActivityRecord)mMainStack.mHistory.get(index);
             if (r != null) {
                 return r.resultTo;
             }
@@ -6049,9 +3677,9 @@
 
     public ComponentName getActivityClassForToken(IBinder token) {
         synchronized(this) {
-            int index = indexOfTokenLocked(token);
+            int index = mMainStack.indexOfTokenLocked(token);
             if (index >= 0) {
-                HistoryRecord r = (HistoryRecord)mHistory.get(index);
+                ActivityRecord r = (ActivityRecord)mMainStack.mHistory.get(index);
                 return r.intent.getComponent();
             }
             return null;
@@ -6060,9 +3688,9 @@
 
     public String getPackageForToken(IBinder token) {
         synchronized(this) {
-            int index = indexOfTokenLocked(token);
+            int index = mMainStack.indexOfTokenLocked(token);
             if (index >= 0) {
-                HistoryRecord r = (HistoryRecord)mHistory.get(index);
+                ActivityRecord r = (ActivityRecord)mMainStack.mHistory.get(index);
                 return r.packageName;
             }
             return null;
@@ -6089,7 +3717,7 @@
             try {
                 if (callingUid != 0 && callingUid != Process.SYSTEM_UID &&
                         Process.supportsProcesses()) {
-                    int uid = ActivityThread.getPackageManager()
+                    int uid = AppGlobals.getPackageManager()
                             .getPackageUid(packageName);
                     if (uid != Binder.getCallingUid()) {
                         String msg = "Permission Denial: getIntentSender() from pid="
@@ -6101,57 +3729,66 @@
                         throw new SecurityException(msg);
                     }
                 }
+                
+                return getIntentSenderLocked(type, packageName, callingUid,
+                        token, resultWho, requestCode, intent, resolvedType, flags);
+                
             } catch (RemoteException e) {
                 throw new SecurityException(e);
             }
-            HistoryRecord activity = null;
-            if (type == INTENT_SENDER_ACTIVITY_RESULT) {
-                int index = indexOfTokenLocked(token);
-                if (index < 0) {
-                    return null;
-                }
-                activity = (HistoryRecord)mHistory.get(index);
-                if (activity.finishing) {
-                    return null;
-                }
+        }
+    }
+    
+    IIntentSender getIntentSenderLocked(int type,
+            String packageName, int callingUid, IBinder token, String resultWho,
+            int requestCode, Intent intent, String resolvedType, int flags) {
+        ActivityRecord activity = null;
+        if (type == INTENT_SENDER_ACTIVITY_RESULT) {
+            int index = mMainStack.indexOfTokenLocked(token);
+            if (index < 0) {
+                return null;
             }
-
-            final boolean noCreate = (flags&PendingIntent.FLAG_NO_CREATE) != 0;
-            final boolean cancelCurrent = (flags&PendingIntent.FLAG_CANCEL_CURRENT) != 0;
-            final boolean updateCurrent = (flags&PendingIntent.FLAG_UPDATE_CURRENT) != 0;
-            flags &= ~(PendingIntent.FLAG_NO_CREATE|PendingIntent.FLAG_CANCEL_CURRENT
-                    |PendingIntent.FLAG_UPDATE_CURRENT);
-
-            PendingIntentRecord.Key key = new PendingIntentRecord.Key(
-                    type, packageName, activity, resultWho,
-                    requestCode, intent, resolvedType, flags);
-            WeakReference<PendingIntentRecord> ref;
-            ref = mIntentSenderRecords.get(key);
-            PendingIntentRecord rec = ref != null ? ref.get() : null;
-            if (rec != null) {
-                if (!cancelCurrent) {
-                    if (updateCurrent) {
-                        rec.key.requestIntent.replaceExtras(intent);
-                    }
-                    return rec;
-                }
-                rec.canceled = true;
-                mIntentSenderRecords.remove(key);
+            activity = (ActivityRecord)mMainStack.mHistory.get(index);
+            if (activity.finishing) {
+                return null;
             }
-            if (noCreate) {
+        }
+
+        final boolean noCreate = (flags&PendingIntent.FLAG_NO_CREATE) != 0;
+        final boolean cancelCurrent = (flags&PendingIntent.FLAG_CANCEL_CURRENT) != 0;
+        final boolean updateCurrent = (flags&PendingIntent.FLAG_UPDATE_CURRENT) != 0;
+        flags &= ~(PendingIntent.FLAG_NO_CREATE|PendingIntent.FLAG_CANCEL_CURRENT
+                |PendingIntent.FLAG_UPDATE_CURRENT);
+
+        PendingIntentRecord.Key key = new PendingIntentRecord.Key(
+                type, packageName, activity, resultWho,
+                requestCode, intent, resolvedType, flags);
+        WeakReference<PendingIntentRecord> ref;
+        ref = mIntentSenderRecords.get(key);
+        PendingIntentRecord rec = ref != null ? ref.get() : null;
+        if (rec != null) {
+            if (!cancelCurrent) {
+                if (updateCurrent) {
+                    rec.key.requestIntent.replaceExtras(intent);
+                }
                 return rec;
             }
-            rec = new PendingIntentRecord(this, key, callingUid);
-            mIntentSenderRecords.put(key, rec.ref);
-            if (type == INTENT_SENDER_ACTIVITY_RESULT) {
-                if (activity.pendingResults == null) {
-                    activity.pendingResults
-                            = new HashSet<WeakReference<PendingIntentRecord>>();
-                }
-                activity.pendingResults.add(rec.ref);
-            }
+            rec.canceled = true;
+            mIntentSenderRecords.remove(key);
+        }
+        if (noCreate) {
             return rec;
         }
+        rec = new PendingIntentRecord(this, key, callingUid);
+        mIntentSenderRecords.put(key, rec.ref);
+        if (type == INTENT_SENDER_ACTIVITY_RESULT) {
+            if (activity.pendingResults == null) {
+                activity.pendingResults
+                        = new HashSet<WeakReference<PendingIntentRecord>>();
+            }
+            activity.pendingResults.add(rec.ref);
+        }
+        return rec;
     }
 
     public void cancelIntentSender(IIntentSender sender) {
@@ -6161,7 +3798,7 @@
         synchronized(this) {
             PendingIntentRecord rec = (PendingIntentRecord)sender;
             try {
-                int uid = ActivityThread.getPackageManager()
+                int uid = AppGlobals.getPackageManager()
                         .getPackageUid(rec.key.packageName);
                 if (uid != Binder.getCallingUid()) {
                     String msg = "Permission Denial: cancelIntentSender() from pid="
@@ -6320,7 +3957,7 @@
             return PackageManager.PERMISSION_GRANTED;
         }
         try {
-            return ActivityThread.getPackageManager()
+            return AppGlobals.getPackageManager()
                     .checkUidPermission(permission, uid);
         } catch (RemoteException e) {
             // Should never happen, but if it does... deny!
@@ -6428,8 +4065,8 @@
         }
     }
 
-    private void grantUriPermissionLocked(int callingUid,
-            String targetPkg, Uri uri, int modeFlags, HistoryRecord activity) {
+    void grantUriPermissionLocked(int callingUid,
+            String targetPkg, Uri uri, int modeFlags, ActivityRecord activity) {
         modeFlags &= (Intent.FLAG_GRANT_READ_URI_PERMISSION
                 | Intent.FLAG_GRANT_WRITE_URI_PERMISSION);
         if (modeFlags == 0) {
@@ -6439,7 +4076,7 @@
         if (DEBUG_URI_PERMISSION) Slog.v(TAG, 
                 "Requested grant " + targetPkg + " permission to " + uri);
         
-        final IPackageManager pm = ActivityThread.getPackageManager();
+        final IPackageManager pm = AppGlobals.getPackageManager();
 
         // If this is not a content: uri, we can't do anything with it.
         if (!ContentResolver.SCHEME_CONTENT.equals(uri.getScheme())) {
@@ -6450,8 +4087,7 @@
 
         String name = uri.getAuthority();
         ProviderInfo pi = null;
-        ContentProviderRecord cpr
-                = (ContentProviderRecord)mProvidersByName.get(name);
+        ContentProviderRecord cpr = mProvidersByName.get(name);
         if (cpr != null) {
             pi = cpr.info;
         } else {
@@ -6558,8 +4194,8 @@
         }
     }
 
-    private void grantUriPermissionFromIntentLocked(int callingUid,
-            String targetPkg, Intent intent, HistoryRecord activity) {
+    void grantUriPermissionFromIntentLocked(int callingUid,
+            String targetPkg, Intent intent, ActivityRecord activity) {
         if (intent == null) {
             return;
         }
@@ -6594,7 +4230,7 @@
         }
     }
 
-    private void removeUriPermissionIfNeededLocked(UriPermission perm) {
+    void removeUriPermissionIfNeededLocked(UriPermission perm) {
         if ((perm.modeFlags&(Intent.FLAG_GRANT_READ_URI_PERMISSION
                 |Intent.FLAG_GRANT_WRITE_URI_PERMISSION)) == 0) {
             HashMap<Uri, UriPermission> perms
@@ -6610,29 +4246,6 @@
         }
     }
 
-    private void removeActivityUriPermissionsLocked(HistoryRecord activity) {
-        if (activity.readUriPermissions != null) {
-            for (UriPermission perm : activity.readUriPermissions) {
-                perm.readActivities.remove(activity);
-                if (perm.readActivities.size() == 0 && (perm.globalModeFlags
-                        &Intent.FLAG_GRANT_READ_URI_PERMISSION) == 0) {
-                    perm.modeFlags &= ~Intent.FLAG_GRANT_READ_URI_PERMISSION;
-                    removeUriPermissionIfNeededLocked(perm);
-                }
-            }
-        }
-        if (activity.writeUriPermissions != null) {
-            for (UriPermission perm : activity.writeUriPermissions) {
-                perm.writeActivities.remove(activity);
-                if (perm.writeActivities.size() == 0 && (perm.globalModeFlags
-                        &Intent.FLAG_GRANT_WRITE_URI_PERMISSION) == 0) {
-                    perm.modeFlags &= ~Intent.FLAG_GRANT_WRITE_URI_PERMISSION;
-                    removeUriPermissionIfNeededLocked(perm);
-                }
-            }
-        }
-    }
-
     private void revokeUriPermissionLocked(int callingUid, Uri uri,
             int modeFlags) {
         modeFlags &= (Intent.FLAG_GRANT_READ_URI_PERMISSION
@@ -6644,12 +4257,11 @@
         if (DEBUG_URI_PERMISSION) Slog.v(TAG, 
                 "Revoking all granted permissions to " + uri);
         
-        final IPackageManager pm = ActivityThread.getPackageManager();
+        final IPackageManager pm = AppGlobals.getPackageManager();
 
         final String authority = uri.getAuthority();
         ProviderInfo pi = null;
-        ContentProviderRecord cpr
-                = (ContentProviderRecord)mProvidersByName.get(authority);
+        ContentProviderRecord cpr = mProvidersByName.get(authority);
         if (cpr != null) {
             pi = cpr.info;
         } else {
@@ -6739,12 +4351,11 @@
                 return;
             }
 
-            final IPackageManager pm = ActivityThread.getPackageManager();
+            final IPackageManager pm = AppGlobals.getPackageManager();
 
             final String authority = uri.getAuthority();
             ProviderInfo pi = null;
-            ContentProviderRecord cpr
-                    = (ContentProviderRecord)mProvidersByName.get(authority);
+            ContentProviderRecord cpr = mProvidersByName.get(authority);
             if (cpr != null) {
                 pi = cpr.info;
             } else {
@@ -6794,7 +4405,7 @@
 
         PendingThumbnailsRecord pending = null;
         IApplicationThread topThumbnail = null;
-        HistoryRecord topRecord = null;
+        ActivityRecord topRecord = null;
 
         synchronized(this) {
             if (localLOGV) Slog.v(
@@ -6819,18 +4430,18 @@
                 throw new SecurityException(msg);
             }
 
-            int pos = mHistory.size()-1;
-            HistoryRecord next =
-                pos >= 0 ? (HistoryRecord)mHistory.get(pos) : null;
-            HistoryRecord top = null;
+            int pos = mMainStack.mHistory.size()-1;
+            ActivityRecord next =
+                pos >= 0 ? (ActivityRecord)mMainStack.mHistory.get(pos) : null;
+            ActivityRecord top = null;
             CharSequence topDescription = null;
             TaskRecord curTask = null;
             int numActivities = 0;
             int numRunning = 0;
             while (pos >= 0 && maxNum > 0) {
-                final HistoryRecord r = next;
+                final ActivityRecord r = next;
                 pos--;
-                next = pos >= 0 ? (HistoryRecord)mHistory.get(pos) : null;
+                next = pos >= 0 ? (ActivityRecord)mMainStack.mHistory.get(pos) : null;
 
                 // Initialize state for next task if needed.
                 if (top == null ||
@@ -6932,7 +4543,7 @@
             enforceCallingPermission(android.Manifest.permission.GET_TASKS,
                     "getRecentTasks()");
 
-            IPackageManager pm = ActivityThread.getPackageManager();
+            IPackageManager pm = AppGlobals.getPackageManager();
             
             final int N = mRecentTasks.size();
             ArrayList<ActivityManager.RecentTaskInfo> res
@@ -6979,12 +4590,12 @@
 
     private final int findAffinityTaskTopLocked(int startIndex, String affinity) {
         int j;
-        TaskRecord startTask = ((HistoryRecord)mHistory.get(startIndex)).task; 
+        TaskRecord startTask = ((ActivityRecord)mMainStack.mHistory.get(startIndex)).task; 
         TaskRecord jt = startTask;
         
         // First look backwards
         for (j=startIndex-1; j>=0; j--) {
-            HistoryRecord r = (HistoryRecord)mHistory.get(j);
+            ActivityRecord r = (ActivityRecord)mMainStack.mHistory.get(j);
             if (r.task != jt) {
                 jt = r.task;
                 if (affinity.equals(jt.affinity)) {
@@ -6994,10 +4605,10 @@
         }
         
         // Now look forwards
-        final int N = mHistory.size();
+        final int N = mMainStack.mHistory.size();
         jt = startTask;
         for (j=startIndex+1; j<N; j++) {
-            HistoryRecord r = (HistoryRecord)mHistory.get(j);
+            ActivityRecord r = (ActivityRecord)mMainStack.mHistory.get(j);
             if (r.task != jt) {
                 if (affinity.equals(jt.affinity)) {
                     return j;
@@ -7007,7 +4618,7 @@
         }
         
         // Might it be at the top?
-        if (affinity.equals(((HistoryRecord)mHistory.get(N-1)).task.affinity)) {
+        if (affinity.equals(((ActivityRecord)mMainStack.mHistory.get(N-1)).task.affinity)) {
             return N-1;
         }
         
@@ -7015,293 +4626,6 @@
     }
     
     /**
-     * Perform a reset of the given task, if needed as part of launching it.
-     * Returns the new HistoryRecord at the top of the task.
-     */
-    private final HistoryRecord resetTaskIfNeededLocked(HistoryRecord taskTop,
-            HistoryRecord newActivity) {
-        boolean forceReset = (newActivity.info.flags
-                &ActivityInfo.FLAG_CLEAR_TASK_ON_LAUNCH) != 0;
-        if (taskTop.task.getInactiveDuration() > ACTIVITY_INACTIVE_RESET_TIME) {
-            if ((newActivity.info.flags
-                    &ActivityInfo.FLAG_ALWAYS_RETAIN_TASK_STATE) == 0) {
-                forceReset = true;
-            }
-        }
-        
-        final TaskRecord task = taskTop.task;
-        
-        // We are going to move through the history list so that we can look
-        // at each activity 'target' with 'below' either the interesting
-        // activity immediately below it in the stack or null.
-        HistoryRecord target = null;
-        int targetI = 0;
-        int taskTopI = -1;
-        int replyChainEnd = -1;
-        int lastReparentPos = -1;
-        for (int i=mHistory.size()-1; i>=-1; i--) {
-            HistoryRecord below = i >= 0 ? (HistoryRecord)mHistory.get(i) : null;
-            
-            if (below != null && below.finishing) {
-                continue;
-            }
-            if (target == null) {
-                target = below;
-                targetI = i;
-                // If we were in the middle of a reply chain before this
-                // task, it doesn't appear like the root of the chain wants
-                // anything interesting, so drop it.
-                replyChainEnd = -1;
-                continue;
-            }
-        
-            final int flags = target.info.flags;
-            
-            final boolean finishOnTaskLaunch =
-                (flags&ActivityInfo.FLAG_FINISH_ON_TASK_LAUNCH) != 0;
-            final boolean allowTaskReparenting =
-                (flags&ActivityInfo.FLAG_ALLOW_TASK_REPARENTING) != 0;
-            
-            if (target.task == task) {
-                // We are inside of the task being reset...  we'll either
-                // finish this activity, push it out for another task,
-                // or leave it as-is.  We only do this
-                // for activities that are not the root of the task (since
-                // if we finish the root, we may no longer have the task!).
-                if (taskTopI < 0) {
-                    taskTopI = targetI;
-                }
-                if (below != null && below.task == task) {
-                    final boolean clearWhenTaskReset =
-                            (target.intent.getFlags()
-                                    &Intent.FLAG_ACTIVITY_CLEAR_WHEN_TASK_RESET) != 0;
-                    if (!finishOnTaskLaunch && !clearWhenTaskReset && target.resultTo != null) {
-                        // If this activity is sending a reply to a previous
-                        // activity, we can't do anything with it now until
-                        // we reach the start of the reply chain.
-                        // XXX note that we are assuming the result is always
-                        // to the previous activity, which is almost always
-                        // the case but we really shouldn't count on.
-                        if (replyChainEnd < 0) {
-                            replyChainEnd = targetI;
-                        }
-                    } else if (!finishOnTaskLaunch && !clearWhenTaskReset && allowTaskReparenting
-                            && target.taskAffinity != null
-                            && !target.taskAffinity.equals(task.affinity)) {
-                        // If this activity has an affinity for another
-                        // task, then we need to move it out of here.  We will
-                        // move it as far out of the way as possible, to the
-                        // bottom of the activity stack.  This also keeps it
-                        // correctly ordered with any activities we previously
-                        // moved.
-                        HistoryRecord p = (HistoryRecord)mHistory.get(0);
-                        if (target.taskAffinity != null
-                                && target.taskAffinity.equals(p.task.affinity)) {
-                            // If the activity currently at the bottom has the
-                            // same task affinity as the one we are moving,
-                            // then merge it into the same task.
-                            target.task = p.task;
-                            if (DEBUG_TASKS) Slog.v(TAG, "Start pushing activity " + target
-                                    + " out to bottom task " + p.task);
-                        } else {
-                            mCurTask++;
-                            if (mCurTask <= 0) {
-                                mCurTask = 1;
-                            }
-                            target.task = new TaskRecord(mCurTask, target.info, null,
-                                    (target.info.flags&ActivityInfo.FLAG_CLEAR_TASK_ON_LAUNCH) != 0);
-                            target.task.affinityIntent = target.intent;
-                            if (DEBUG_TASKS) Slog.v(TAG, "Start pushing activity " + target
-                                    + " out to new task " + target.task);
-                        }
-                        mWindowManager.setAppGroupId(target, task.taskId);
-                        if (replyChainEnd < 0) {
-                            replyChainEnd = targetI;
-                        }
-                        int dstPos = 0;
-                        for (int srcPos=targetI; srcPos<=replyChainEnd; srcPos++) {
-                            p = (HistoryRecord)mHistory.get(srcPos);
-                            if (p.finishing) {
-                                continue;
-                            }
-                            if (DEBUG_TASKS) Slog.v(TAG, "Pushing next activity " + p
-                                    + " out to target's task " + target.task);
-                            task.numActivities--;
-                            p.task = target.task;
-                            target.task.numActivities++;
-                            mHistory.remove(srcPos);
-                            mHistory.add(dstPos, p);
-                            mWindowManager.moveAppToken(dstPos, p);
-                            mWindowManager.setAppGroupId(p, p.task.taskId);
-                            dstPos++;
-                            if (VALIDATE_TOKENS) {
-                                mWindowManager.validateAppTokens(mHistory);
-                            }
-                            i++;
-                        }
-                        if (taskTop == p) {
-                            taskTop = below;
-                        }
-                        if (taskTopI == replyChainEnd) {
-                            taskTopI = -1;
-                        }
-                        replyChainEnd = -1;
-                        addRecentTaskLocked(target.task);
-                    } else if (forceReset || finishOnTaskLaunch
-                            || clearWhenTaskReset) {
-                        // If the activity should just be removed -- either
-                        // because it asks for it, or the task should be
-                        // cleared -- then finish it and anything that is
-                        // part of its reply chain.
-                        if (clearWhenTaskReset) {
-                            // In this case, we want to finish this activity
-                            // and everything above it, so be sneaky and pretend
-                            // like these are all in the reply chain.
-                            replyChainEnd = targetI+1;
-                            while (replyChainEnd < mHistory.size() &&
-                                    ((HistoryRecord)mHistory.get(
-                                                replyChainEnd)).task == task) {
-                                replyChainEnd++;
-                            }
-                            replyChainEnd--;
-                        } else if (replyChainEnd < 0) {
-                            replyChainEnd = targetI;
-                        }
-                        HistoryRecord p = null;
-                        for (int srcPos=targetI; srcPos<=replyChainEnd; srcPos++) {
-                            p = (HistoryRecord)mHistory.get(srcPos);
-                            if (p.finishing) {
-                                continue;
-                            }
-                            if (finishActivityLocked(p, srcPos,
-                                    Activity.RESULT_CANCELED, null, "reset")) {
-                                replyChainEnd--;
-                                srcPos--;
-                            }
-                        }
-                        if (taskTop == p) {
-                            taskTop = below;
-                        }
-                        if (taskTopI == replyChainEnd) {
-                            taskTopI = -1;
-                        }
-                        replyChainEnd = -1;
-                    } else {
-                        // If we were in the middle of a chain, well the
-                        // activity that started it all doesn't want anything
-                        // special, so leave it all as-is.
-                        replyChainEnd = -1;
-                    }
-                } else {
-                    // Reached the bottom of the task -- any reply chain
-                    // should be left as-is.
-                    replyChainEnd = -1;
-                }
-                
-            } else if (target.resultTo != null) {
-                // If this activity is sending a reply to a previous
-                // activity, we can't do anything with it now until
-                // we reach the start of the reply chain.
-                // XXX note that we are assuming the result is always
-                // to the previous activity, which is almost always
-                // the case but we really shouldn't count on.
-                if (replyChainEnd < 0) {
-                    replyChainEnd = targetI;
-                }
-
-            } else if (taskTopI >= 0 && allowTaskReparenting
-                    && task.affinity != null
-                    && task.affinity.equals(target.taskAffinity)) {
-                // We are inside of another task...  if this activity has
-                // an affinity for our task, then either remove it if we are
-                // clearing or move it over to our task.  Note that
-                // we currently punt on the case where we are resetting a
-                // task that is not at the top but who has activities above
-                // with an affinity to it...  this is really not a normal
-                // case, and we will need to later pull that task to the front
-                // and usually at that point we will do the reset and pick
-                // up those remaining activities.  (This only happens if
-                // someone starts an activity in a new task from an activity
-                // in a task that is not currently on top.)
-                if (forceReset || finishOnTaskLaunch) {
-                    if (replyChainEnd < 0) {
-                        replyChainEnd = targetI;
-                    }
-                    HistoryRecord p = null;
-                    for (int srcPos=targetI; srcPos<=replyChainEnd; srcPos++) {
-                        p = (HistoryRecord)mHistory.get(srcPos);
-                        if (p.finishing) {
-                            continue;
-                        }
-                        if (finishActivityLocked(p, srcPos,
-                                Activity.RESULT_CANCELED, null, "reset")) {
-                            taskTopI--;
-                            lastReparentPos--;
-                            replyChainEnd--;
-                            srcPos--;
-                        }
-                    }
-                    replyChainEnd = -1;
-                } else {
-                    if (replyChainEnd < 0) {
-                        replyChainEnd = targetI;
-                    }
-                    for (int srcPos=replyChainEnd; srcPos>=targetI; srcPos--) {
-                        HistoryRecord p = (HistoryRecord)mHistory.get(srcPos);
-                        if (p.finishing) {
-                            continue;
-                        }
-                        if (lastReparentPos < 0) {
-                            lastReparentPos = taskTopI;
-                            taskTop = p;
-                        } else {
-                            lastReparentPos--;
-                        }
-                        mHistory.remove(srcPos);
-                        p.task.numActivities--;
-                        p.task = task;
-                        mHistory.add(lastReparentPos, p);
-                        if (DEBUG_TASKS) Slog.v(TAG, "Pulling activity " + p
-                                + " in to resetting task " + task);
-                        task.numActivities++;
-                        mWindowManager.moveAppToken(lastReparentPos, p);
-                        mWindowManager.setAppGroupId(p, p.task.taskId);
-                        if (VALIDATE_TOKENS) {
-                            mWindowManager.validateAppTokens(mHistory);
-                        }
-                    }
-                    replyChainEnd = -1;
-                    
-                    // Now we've moved it in to place...  but what if this is
-                    // a singleTop activity and we have put it on top of another
-                    // instance of the same activity?  Then we drop the instance
-                    // below so it remains singleTop.
-                    if (target.info.launchMode == ActivityInfo.LAUNCH_SINGLE_TOP) {
-                        for (int j=lastReparentPos-1; j>=0; j--) {
-                            HistoryRecord p = (HistoryRecord)mHistory.get(j);
-                            if (p.finishing) {
-                                continue;
-                            }
-                            if (p.intent.getComponent().equals(target.intent.getComponent())) {
-                                if (finishActivityLocked(p, j,
-                                        Activity.RESULT_CANCELED, null, "replace")) {
-                                    taskTopI--;
-                                    lastReparentPos--;
-                                }
-                            }
-                        }
-                    }
-                }
-            }
-            
-            target = below;
-            targetI = i;
-        }
-        
-        return taskTop;
-    }
-    
-    /**
      * TODO: Add mController hook
      */
     public void moveTaskToFront(int task) {
@@ -7319,14 +4643,14 @@
                 for (int i=0; i<N; i++) {
                     TaskRecord tr = mRecentTasks.get(i);
                     if (tr.taskId == task) {
-                        moveTaskToFrontLocked(tr, null);
+                        mMainStack.moveTaskToFrontLocked(tr, null);
                         return;
                     }
                 }
-                for (int i=mHistory.size()-1; i>=0; i--) {
-                    HistoryRecord hr = (HistoryRecord)mHistory.get(i);
+                for (int i=mMainStack.mHistory.size()-1; i>=0; i--) {
+                    ActivityRecord hr = (ActivityRecord)mMainStack.mHistory.get(i);
                     if (hr.task.taskId == task) {
-                        moveTaskToFrontLocked(hr.task, null);
+                        mMainStack.moveTaskToFrontLocked(hr.task, null);
                         return;
                     }
                 }
@@ -7336,84 +4660,20 @@
         }
     }
 
-    private final void moveTaskToFrontLocked(TaskRecord tr, HistoryRecord reason) {
-        if (DEBUG_SWITCH) Slog.v(TAG, "moveTaskToFront: " + tr);
-
-        final int task = tr.taskId;
-        int top = mHistory.size()-1;
-
-        if (top < 0 || ((HistoryRecord)mHistory.get(top)).task.taskId == task) {
-            // nothing to do!
-            return;
-        }
-
-        ArrayList moved = new ArrayList();
-
-        // Applying the affinities may have removed entries from the history,
-        // so get the size again.
-        top = mHistory.size()-1;
-        int pos = top;
-
-        // Shift all activities with this task up to the top
-        // of the stack, keeping them in the same internal order.
-        while (pos >= 0) {
-            HistoryRecord r = (HistoryRecord)mHistory.get(pos);
-            if (localLOGV) Slog.v(
-                TAG, "At " + pos + " ckp " + r.task + ": " + r);
-            boolean first = true;
-            if (r.task.taskId == task) {
-                if (localLOGV) Slog.v(TAG, "Removing and adding at " + top);
-                mHistory.remove(pos);
-                mHistory.add(top, r);
-                moved.add(0, r);
-                top--;
-                if (first) {
-                    addRecentTaskLocked(r.task);
-                    first = false;
-                }
-            }
-            pos--;
-        }
-
-        if (DEBUG_TRANSITION) Slog.v(TAG,
-                "Prepare to front transition: task=" + tr);
-        if (reason != null &&
-                (reason.intent.getFlags()&Intent.FLAG_ACTIVITY_NO_ANIMATION) != 0) {
-            mWindowManager.prepareAppTransition(WindowManagerPolicy.TRANSIT_NONE);
-            HistoryRecord r = topRunningActivityLocked(null);
-            if (r != null) {
-                mNoAnimActivities.add(r);
-            }
-        } else {
-            mWindowManager.prepareAppTransition(WindowManagerPolicy.TRANSIT_TASK_TO_FRONT);
-        }
-        
-        mWindowManager.moveAppTokensToTop(moved);
-        if (VALIDATE_TOKENS) {
-            mWindowManager.validateAppTokens(mHistory);
-        }
-
-        finishTaskMoveLocked(task);
-        EventLog.writeEvent(EventLogTags.AM_TASK_TO_FRONT, task);
-    }
-
-    private final void finishTaskMoveLocked(int task) {
-        resumeTopActivityLocked(null);
-    }
-
     public void moveTaskToBack(int task) {
         enforceCallingPermission(android.Manifest.permission.REORDER_TASKS,
                 "moveTaskToBack()");
 
         synchronized(this) {
-            if (mResumedActivity != null && mResumedActivity.task.taskId == task) {
+            if (mMainStack.mResumedActivity != null
+                    && mMainStack.mResumedActivity.task.taskId == task) {
                 if (!checkAppSwitchAllowedLocked(Binder.getCallingPid(),
                         Binder.getCallingUid(), "Task to back")) {
                     return;
                 }
             }
             final long origId = Binder.clearCallingIdentity();
-            moveTaskToBackLocked(task, null);
+            mMainStack.moveTaskToBackLocked(task, null);
             Binder.restoreCallingIdentity(origId);
         }
     }
@@ -7432,93 +4692,13 @@
             final long origId = Binder.clearCallingIdentity();
             int taskId = getTaskForActivityLocked(token, !nonRoot);
             if (taskId >= 0) {
-                return moveTaskToBackLocked(taskId, null);
+                return mMainStack.moveTaskToBackLocked(taskId, null);
             }
             Binder.restoreCallingIdentity(origId);
         }
         return false;
     }
 
-    /**
-     * Worker method for rearranging history stack.  Implements the function of moving all 
-     * activities for a specific task (gathering them if disjoint) into a single group at the 
-     * bottom of the stack.
-     * 
-     * If a watcher is installed, the action is preflighted and the watcher has an opportunity
-     * to premeptively cancel the move.
-     * 
-     * @param task The taskId to collect and move to the bottom.
-     * @return Returns true if the move completed, false if not.
-     */
-    private final boolean moveTaskToBackLocked(int task, HistoryRecord reason) {
-        Slog.i(TAG, "moveTaskToBack: " + task);
-        
-        // If we have a watcher, preflight the move before committing to it.  First check
-        // for *other* available tasks, but if none are available, then try again allowing the
-        // current task to be selected.
-        if (mController != null) {
-            HistoryRecord next = topRunningActivityLocked(null, task);
-            if (next == null) {
-                next = topRunningActivityLocked(null, 0);
-            }
-            if (next != null) {
-                // ask watcher if this is allowed
-                boolean moveOK = true;
-                try {
-                    moveOK = mController.activityResuming(next.packageName);
-                } catch (RemoteException e) {
-                    mController = null;
-                }
-                if (!moveOK) {
-                    return false;
-                }
-            }
-        }
-
-        ArrayList moved = new ArrayList();
-
-        if (DEBUG_TRANSITION) Slog.v(TAG,
-                "Prepare to back transition: task=" + task);
-        
-        final int N = mHistory.size();
-        int bottom = 0;
-        int pos = 0;
-
-        // Shift all activities with this task down to the bottom
-        // of the stack, keeping them in the same internal order.
-        while (pos < N) {
-            HistoryRecord r = (HistoryRecord)mHistory.get(pos);
-            if (localLOGV) Slog.v(
-                TAG, "At " + pos + " ckp " + r.task + ": " + r);
-            if (r.task.taskId == task) {
-                if (localLOGV) Slog.v(TAG, "Removing and adding at " + (N-1));
-                mHistory.remove(pos);
-                mHistory.add(bottom, r);
-                moved.add(r);
-                bottom++;
-            }
-            pos++;
-        }
-
-        if (reason != null &&
-                (reason.intent.getFlags()&Intent.FLAG_ACTIVITY_NO_ANIMATION) != 0) {
-            mWindowManager.prepareAppTransition(WindowManagerPolicy.TRANSIT_NONE);
-            HistoryRecord r = topRunningActivityLocked(null);
-            if (r != null) {
-                mNoAnimActivities.add(r);
-            }
-        } else {
-            mWindowManager.prepareAppTransition(WindowManagerPolicy.TRANSIT_TASK_TO_BACK);
-        }
-        mWindowManager.moveAppTokensToBottom(moved);
-        if (VALIDATE_TOKENS) {
-            mWindowManager.validateAppTokens(mHistory);
-        }
-
-        finishTaskMoveLocked(task);
-        return true;
-    }
-
     public void moveTaskBackwards(int task) {
         enforceCallingPermission(android.Manifest.permission.REORDER_TASKS,
                 "moveTaskBackwards()");
@@ -7545,10 +4725,10 @@
     }
 
     int getTaskForActivityLocked(IBinder token, boolean onlyRoot) {
-        final int N = mHistory.size();
+        final int N = mMainStack.mHistory.size();
         TaskRecord lastTask = null;
         for (int i=0; i<N; i++) {
-            HistoryRecord r = (HistoryRecord)mHistory.get(i);
+            ActivityRecord r = (ActivityRecord)mMainStack.mHistory.get(i);
             if (r == token) {
                 if (!onlyRoot || lastTask != r.task) {
                     return r.task.taskId;
@@ -7561,89 +4741,17 @@
         return -1;
     }
 
-    /**
-     * Returns the top activity in any existing task matching the given
-     * Intent.  Returns null if no such task is found.
-     */
-    private HistoryRecord findTaskLocked(Intent intent, ActivityInfo info) {
-        ComponentName cls = intent.getComponent();
-        if (info.targetActivity != null) {
-            cls = new ComponentName(info.packageName, info.targetActivity);
-        }
-
-        TaskRecord cp = null;
-
-        final int N = mHistory.size();
-        for (int i=(N-1); i>=0; i--) {
-            HistoryRecord r = (HistoryRecord)mHistory.get(i);
-            if (!r.finishing && r.task != cp
-                    && r.launchMode != ActivityInfo.LAUNCH_SINGLE_INSTANCE) {
-                cp = r.task;
-                //Slog.i(TAG, "Comparing existing cls=" + r.task.intent.getComponent().flattenToShortString()
-                //        + "/aff=" + r.task.affinity + " to new cls="
-                //        + intent.getComponent().flattenToShortString() + "/aff=" + taskAffinity);
-                if (r.task.affinity != null) {
-                    if (r.task.affinity.equals(info.taskAffinity)) {
-                        //Slog.i(TAG, "Found matching affinity!");
-                        return r;
-                    }
-                } else if (r.task.intent != null
-                        && r.task.intent.getComponent().equals(cls)) {
-                    //Slog.i(TAG, "Found matching class!");
-                    //dump();
-                    //Slog.i(TAG, "For Intent " + intent + " bringing to top: " + r.intent);
-                    return r;
-                } else if (r.task.affinityIntent != null
-                        && r.task.affinityIntent.getComponent().equals(cls)) {
-                    //Slog.i(TAG, "Found matching class!");
-                    //dump();
-                    //Slog.i(TAG, "For Intent " + intent + " bringing to top: " + r.intent);
-                    return r;
-                }
-            }
-        }
-
-        return null;
-    }
-
-    /**
-     * Returns the first activity (starting from the top of the stack) that
-     * is the same as the given activity.  Returns null if no such activity
-     * is found.
-     */
-    private HistoryRecord findActivityLocked(Intent intent, ActivityInfo info) {
-        ComponentName cls = intent.getComponent();
-        if (info.targetActivity != null) {
-            cls = new ComponentName(info.packageName, info.targetActivity);
-        }
-
-        final int N = mHistory.size();
-        for (int i=(N-1); i>=0; i--) {
-            HistoryRecord r = (HistoryRecord)mHistory.get(i);
-            if (!r.finishing) {
-                if (r.intent.getComponent().equals(cls)) {
-                    //Slog.i(TAG, "Found matching class!");
-                    //dump();
-                    //Slog.i(TAG, "For Intent " + intent + " bringing to top: " + r.intent);
-                    return r;
-                }
-            }
-        }
-
-        return null;
-    }
-
     public void finishOtherInstances(IBinder token, ComponentName className) {
         synchronized(this) {
             final long origId = Binder.clearCallingIdentity();
 
-            int N = mHistory.size();
+            int N = mMainStack.mHistory.size();
             TaskRecord lastTask = null;
             for (int i=0; i<N; i++) {
-                HistoryRecord r = (HistoryRecord)mHistory.get(i);
+                ActivityRecord r = (ActivityRecord)mMainStack.mHistory.get(i);
                 if (r.realActivity.equals(className)
                         && r != token && lastTask != r.task) {
-                    if (finishActivityLocked(r, i, Activity.RESULT_CANCELED,
+                    if (r.stack.finishActivityLocked(r, i, Activity.RESULT_CANCELED,
                             null, "others")) {
                         i--;
                         N--;
@@ -7668,7 +4776,7 @@
         Binder.restoreCallingIdentity(origId);
     }
 
-    final void sendPendingThumbnail(HistoryRecord r, IBinder token,
+    final void sendPendingThumbnail(ActivityRecord r, IBinder token,
             Bitmap thumbnail, CharSequence description, boolean always) {
         TaskRecord task = null;
         ArrayList receivers = null;
@@ -7677,11 +4785,11 @@
 
         synchronized(this) {
             if (r == null) {
-                int index = indexOfTokenLocked(token);
+                int index = mMainStack.indexOfTokenLocked(token);
                 if (index < 0) {
                     return;
                 }
-                r = (HistoryRecord)mHistory.get(index);
+                r = (ActivityRecord)mMainStack.mHistory.get(index);
             }
             if (thumbnail == null) {
                 thumbnail = r.thumbnail;
@@ -7742,7 +4850,7 @@
     private final List generateApplicationProvidersLocked(ProcessRecord app) {
         List providers = null;
         try {
-            providers = ActivityThread.getPackageManager().
+            providers = AppGlobals.getPackageManager().
                 queryContentProviders(app.processName, app.info.uid,
                         STOCK_PM_FLAGS | PackageManager.GET_URI_PERMISSION_PATTERNS);
         } catch (RemoteException ex) {
@@ -7752,8 +4860,7 @@
             for (int i=0; i<N; i++) {
                 ProviderInfo cpi =
                     (ProviderInfo)providers.get(i);
-                ContentProviderRecord cpr =
-                    (ContentProviderRecord)mProvidersByClass.get(cpi.name);
+                ContentProviderRecord cpr = mProvidersByClass.get(cpi.name);
                 if (cpr == null) {
                     cpr = new ContentProviderRecord(cpi, app.info);
                     mProvidersByClass.put(cpi.name, cpr);
@@ -7828,7 +4935,7 @@
             }
 
             // First check if this content provider has been published...
-            cpr = (ContentProviderRecord)mProvidersByName.get(name);
+            cpr = mProvidersByName.get(name);
             if (cpr != null) {
                 cpi = cpr.info;
                 if (checkContentProviderPermissionLocked(cpi, r, -1) != null) {
@@ -7866,8 +4973,8 @@
                         r.conProviders.put(cpr, new Integer(cnt.intValue()+1));
                     }
                     cpr.clients.add(r);
-                    if (cpr.app != null && r.setAdj >= VISIBLE_APP_ADJ) {
-                        // If this is a visible app accessing the provider,
+                    if (cpr.app != null && r.setAdj <= PERCEPTIBLE_APP_ADJ) {
+                        // If this is a perceptible app accessing the provider,
                         // make sure to count it as being accessed and thus
                         // back up on the LRU list.  This is good because
                         // content providers are often expensive to start.
@@ -7885,7 +4992,7 @@
 
             } else {
                 try {
-                    cpi = ActivityThread.getPackageManager().
+                    cpi = AppGlobals.getPackageManager().
                         resolveContentProvider(name,
                                 STOCK_PM_FLAGS | PackageManager.GET_URI_PERMISSION_PATTERNS);
                 } catch (RemoteException ex) {
@@ -7909,12 +5016,12 @@
                             "Attempt to launch content provider before system ready");
                 }
                 
-                cpr = (ContentProviderRecord)mProvidersByClass.get(cpi.name);
+                cpr = mProvidersByClass.get(cpi.name);
                 final boolean firstClass = cpr == null;
                 if (firstClass) {
                     try {
                         ApplicationInfo ai =
-                            ActivityThread.getPackageManager().
+                            AppGlobals.getPackageManager().
                                 getApplicationInfo(
                                         cpi.applicationInfo.packageName,
                                         STOCK_PM_FLAGS);
@@ -8043,7 +5150,7 @@
      */
     public void removeContentProvider(IApplicationThread caller, String name) {
         synchronized (this) {
-            ContentProviderRecord cpr = (ContentProviderRecord)mProvidersByName.get(name);
+            ContentProviderRecord cpr = mProvidersByName.get(name);
             if(cpr == null) {
                 // remove from mProvidersByClass
                 if (DEBUG_PROVIDER) Slog.v(TAG, name +
@@ -8057,8 +5164,7 @@
                         " when removing content provider " + name);
             }
             //update content provider record entry info
-            ContentProviderRecord localCpr = (ContentProviderRecord)
-                    mProvidersByClass.get(cpr.info.name);
+            ContentProviderRecord localCpr = mProvidersByClass.get(cpr.info.name);
             if (DEBUG_PROVIDER) Slog.v(TAG, "Removing provider requested by "
                     + r.info.processName + " from process "
                     + localCpr.appInfo.processName);
@@ -8082,7 +5188,7 @@
 
     private void removeContentProviderExternal(String name) {
         synchronized (this) {
-            ContentProviderRecord cpr = (ContentProviderRecord)mProvidersByName.get(name);
+            ContentProviderRecord cpr = mProvidersByName.get(name);
             if(cpr == null) {
                 //remove from mProvidersByClass
                 if(localLOGV) Slog.v(TAG, name+" content provider not found in providers list");
@@ -8090,7 +5196,7 @@
             }
 
             //update content provider record entry info
-            ContentProviderRecord localCpr = (ContentProviderRecord) mProvidersByClass.get(cpr.info.name);
+            ContentProviderRecord localCpr = mProvidersByClass.get(cpr.info.name);
             localCpr.externals--;
             if (localCpr.externals < 0) {
                 Slog.e(TAG, "Externals < 0 for content provider " + localCpr);
@@ -8122,8 +5228,7 @@
                 if (src == null || src.info == null || src.provider == null) {
                     continue;
                 }
-                ContentProviderRecord dst =
-                    (ContentProviderRecord)r.pubProviders.get(src.info.name);
+                ContentProviderRecord dst = r.pubProviders.get(src.info.name);
                 if (dst != null) {
                     mProvidersByClass.put(dst.info.name, dst);
                     String names[] = dst.info.authority.split(";");
@@ -8216,12 +5321,12 @@
                 "unhandledBack()");
 
         synchronized(this) {
-            int count = mHistory.size();
+            int count = mMainStack.mHistory.size();
             if (DEBUG_SWITCH) Slog.d(
                 TAG, "Performing unhandledBack(): stack size = " + count);
             if (count > 1) {
                 final long origId = Binder.clearCallingIdentity();
-                finishActivityLocked((HistoryRecord)mHistory.get(count-1),
+                mMainStack.finishActivityLocked((ActivityRecord)mMainStack.mHistory.get(count-1),
                         count-1, Activity.RESULT_CANCELED, null, "unhandled-back");
                 Binder.restoreCallingIdentity(origId);
             }
@@ -8264,8 +5369,8 @@
             mSleeping = true;
             mWindowManager.setEventDispatching(false);
 
-            if (mResumedActivity != null) {
-                pauseIfSleepingLocked();
+            if (mMainStack.mResumedActivity != null) {
+                mMainStack.pauseIfSleepingLocked();
             } else {
                 Slog.w(TAG, "goingToSleep with no resumed activity!");
             }
@@ -8285,10 +5390,11 @@
             mShuttingDown = true;
             mWindowManager.setEventDispatching(false);
 
-            if (mResumedActivity != null) {
-                pauseIfSleepingLocked();
+            if (mMainStack.mResumedActivity != null) {
+                mMainStack.pauseIfSleepingLocked();
                 final long endTime = System.currentTimeMillis() + timeout;
-                while (mResumedActivity != null || mPausingActivity != null) {
+                while (mMainStack.mResumedActivity != null
+                        || mMainStack.mPausingActivity != null) {
                     long delay = endTime - System.currentTimeMillis();
                     if (delay <= 0) {
                         Slog.w(TAG, "Activity manager shutdown timed out");
@@ -8309,35 +5415,14 @@
         return timedout;
     }
     
-    void pauseIfSleepingLocked() {
-        if (mSleeping || mShuttingDown) {
-            if (!mGoingToSleep.isHeld()) {
-                mGoingToSleep.acquire();
-                if (mLaunchingActivity.isHeld()) {
-                    mLaunchingActivity.release();
-                    mHandler.removeMessages(LAUNCH_TIMEOUT_MSG);
-                }
-            }
-
-            // If we are not currently pausing an activity, get the current
-            // one to pause.  If we are pausing one, we will just let that stuff
-            // run and release the wake lock when all done.
-            if (mPausingActivity == null) {
-                if (DEBUG_PAUSE) Slog.v(TAG, "Sleep needs to pause...");
-                if (DEBUG_USER_LEAVING) Slog.v(TAG, "Sleep => pause with userLeaving=false");
-                startPausingLocked(false, true);
-            }
-        }
-    }
-    
     public void wakingUp() {
         synchronized(this) {
-            if (mGoingToSleep.isHeld()) {
-                mGoingToSleep.release();
+            if (mMainStack.mGoingToSleep.isHeld()) {
+                mMainStack.mGoingToSleep.release();
             }
             mWindowManager.setEventDispatching(true);
             mSleeping = false;
-            resumeTopActivityLocked(null);
+            mMainStack.resumeTopActivityLocked(null);
         }
     }
 
@@ -8465,13 +5550,42 @@
         }
     }
 
+    public void setImmersive(IBinder token, boolean immersive) {
+        synchronized(this) {
+            int index = (token != null) ? mMainStack.indexOfTokenLocked(token) : -1;
+            if (index < 0) {
+                throw new IllegalArgumentException();
+            }
+            ActivityRecord r = (ActivityRecord)mMainStack.mHistory.get(index);
+            r.immersive = immersive;
+        }
+    }
+
+    public boolean isImmersive(IBinder token) {
+        synchronized (this) {
+            int index = (token != null) ? mMainStack.indexOfTokenLocked(token) : -1;
+            if (index < 0) {
+                throw new IllegalArgumentException();
+            }
+            ActivityRecord r = (ActivityRecord)mMainStack.mHistory.get(index);
+            return r.immersive;
+        }
+    }
+
+    public boolean isTopActivityImmersive() {
+        synchronized (this) {
+            ActivityRecord r = mMainStack.topRunningActivityLocked(null);
+            return (r != null) ? r.immersive : false;
+        }
+    }
+
     public final void enterSafeMode() {
         synchronized(this) {
             // It only makes sense to do this before the system is ready
             // and started launching other packages.
             if (!mSystemReady) {
                 try {
-                    ActivityThread.getPackageManager().enterSafeMode();
+                    AppGlobals.getPackageManager().enterSafeMode();
                 } catch (RemoteException e) {
                 }
 
@@ -8557,123 +5671,6 @@
         return killed;
     }
     
-    public void reportPss(IApplicationThread caller, int pss) {
-        Watchdog.PssRequestor req;
-        String name;
-        ProcessRecord callerApp;
-        synchronized (this) {
-            if (caller == null) {
-                return;
-            }
-            callerApp = getRecordForAppLocked(caller);
-            if (callerApp == null) {
-                return;
-            }
-            callerApp.lastPss = pss;
-            req = callerApp;
-            name = callerApp.processName;
-        }
-        Watchdog.getInstance().reportPss(req, name, pss);
-        if (!callerApp.persistent) {
-            removeRequestedPss(callerApp);
-        }
-    }
-    
-    public void requestPss(Runnable completeCallback) {
-        ArrayList<ProcessRecord> procs;
-        synchronized (this) {
-            mRequestPssCallback = completeCallback;
-            mRequestPssList.clear();
-            for (int i=mLruProcesses.size()-1; i>=0; i--) {
-                ProcessRecord proc = mLruProcesses.get(i);
-                if (!proc.persistent) {
-                    mRequestPssList.add(proc);
-                }
-            }
-            procs = new ArrayList<ProcessRecord>(mRequestPssList);
-        }
-        
-        int oldPri = Process.getThreadPriority(Process.myTid()); 
-        Process.setThreadPriority(Process.THREAD_PRIORITY_BACKGROUND);
-        for (int i=procs.size()-1; i>=0; i--) {
-            ProcessRecord proc = procs.get(i);
-            proc.lastPss = 0;
-            proc.requestPss();
-        }
-        Process.setThreadPriority(oldPri);
-    }
-    
-    void removeRequestedPss(ProcessRecord proc) {
-        Runnable callback = null;
-        synchronized (this) {
-            if (mRequestPssList.remove(proc)) {
-                if (mRequestPssList.size() == 0) {
-                    callback = mRequestPssCallback;
-                    mRequestPssCallback = null;
-                }
-            }
-        }
-        
-        if (callback != null) {
-            callback.run();
-        }
-    }
-    
-    public void collectPss(Watchdog.PssStats stats) {
-        stats.mEmptyPss = 0;
-        stats.mEmptyCount = 0;
-        stats.mBackgroundPss = 0;
-        stats.mBackgroundCount = 0;
-        stats.mServicePss = 0;
-        stats.mServiceCount = 0;
-        stats.mVisiblePss = 0;
-        stats.mVisibleCount = 0;
-        stats.mForegroundPss = 0;
-        stats.mForegroundCount = 0;
-        stats.mNoPssCount = 0;
-        synchronized (this) {
-            int i;
-            int NPD = mProcDeaths.length < stats.mProcDeaths.length
-                    ? mProcDeaths.length : stats.mProcDeaths.length;
-            int aggr = 0;
-            for (i=0; i<NPD; i++) {
-                aggr += mProcDeaths[i];
-                stats.mProcDeaths[i] = aggr;
-            }
-            while (i<stats.mProcDeaths.length) {
-                stats.mProcDeaths[i] = 0;
-                i++;
-            }
-            
-            for (i=mLruProcesses.size()-1; i>=0; i--) {
-                ProcessRecord proc = mLruProcesses.get(i);
-                if (proc.persistent) {
-                    continue;
-                }
-                //Slog.i(TAG, "Proc " + proc + ": pss=" + proc.lastPss);
-                if (proc.lastPss == 0) {
-                    stats.mNoPssCount++;
-                    continue;
-                }
-                if (proc.setAdj >= HIDDEN_APP_MIN_ADJ) {
-                    if (proc.empty) {
-                        stats.mEmptyPss += proc.lastPss;
-                        stats.mEmptyCount++;
-                    } else {
-                        stats.mBackgroundPss += proc.lastPss;
-                        stats.mBackgroundCount++;
-                    }
-                } else if (proc.setAdj >= VISIBLE_APP_ADJ) {
-                    stats.mVisiblePss += proc.lastPss;
-                    stats.mVisibleCount++;
-                } else {
-                    stats.mForegroundPss += proc.lastPss;
-                    stats.mForegroundCount++;
-                }
-            }
-        }
-    }
-    
     public final void startRunning(String pkg, String cls, String action,
             String data) {
         synchronized(this) {
@@ -8744,7 +5741,7 @@
                 Intent intent = new Intent(Intent.ACTION_PRE_BOOT_COMPLETED);
                 List<ResolveInfo> ris = null;
                 try {
-                    ris = ActivityThread.getPackageManager().queryIntentReceivers(
+                    ris = AppGlobals.getPackageManager().queryIntentReceivers(
                                 intent, null, 0);
                 } catch (RemoteException e) {
                 }
@@ -8863,7 +5860,7 @@
         synchronized (this) {
             if (mFactoryTest != SystemServer.FACTORY_TEST_LOW_LEVEL) {
                 try {
-                    List apps = ActivityThread.getPackageManager().
+                    List apps = AppGlobals.getPackageManager().
                         getPersistentApplications(STOCK_PM_FLAGS);
                     if (apps != null) {
                         int N = apps.size();
@@ -8886,7 +5883,7 @@
             mBooting = true;
             
             try {
-                if (ActivityThread.getPackageManager().hasSystemUidErrors()) {
+                if (AppGlobals.getPackageManager().hasSystemUidErrors()) {
                     Message msg = Message.obtain();
                     msg.what = SHOW_UID_ERROR_MSG;
                     mHandler.sendMessage(msg);
@@ -8894,7 +5891,7 @@
             } catch (RemoteException e) {
             }
 
-            resumeTopActivityLocked(null);
+            mMainStack.resumeTopActivityLocked(null);
         }
     }
 
@@ -8982,12 +5979,12 @@
             EventLog.writeEvent(EventLogTags.AM_PROCESS_CRASHED_TOO_MUCH,
                     app.info.processName, app.info.uid);
             killServicesLocked(app, false);
-            for (int i=mHistory.size()-1; i>=0; i--) {
-                HistoryRecord r = (HistoryRecord)mHistory.get(i);
+            for (int i=mMainStack.mHistory.size()-1; i>=0; i--) {
+                ActivityRecord r = (ActivityRecord)mMainStack.mHistory.get(i);
                 if (r.app == app) {
                     Slog.w(TAG, "  Force finishing activity "
                         + r.intent.getComponent().flattenToShortString());
-                    finishActivityLocked(r, i, Activity.RESULT_CANCELED, null, "crashed");
+                    r.stack.finishActivityLocked(r, i, Activity.RESULT_CANCELED, null, "crashed");
                 }
             }
             if (!app.persistent) {
@@ -9005,28 +6002,28 @@
                 return false;
             }
         } else {
-            HistoryRecord r = topRunningActivityLocked(null);
+            ActivityRecord r = mMainStack.topRunningActivityLocked(null);
             if (r.app == app) {
                 // If the top running activity is from this crashing
                 // process, then terminate it to avoid getting in a loop.
                 Slog.w(TAG, "  Force finishing activity "
                         + r.intent.getComponent().flattenToShortString());
-                int index = indexOfTokenLocked(r);
-                finishActivityLocked(r, index,
+                int index = mMainStack.indexOfTokenLocked(r);
+                r.stack.finishActivityLocked(r, index,
                         Activity.RESULT_CANCELED, null, "crashed");
                 // Also terminate an activities below it that aren't yet
                 // stopped, to avoid a situation where one will get
                 // re-start our crashing activity once it gets resumed again.
                 index--;
                 if (index >= 0) {
-                    r = (HistoryRecord)mHistory.get(index);
+                    r = (ActivityRecord)mMainStack.mHistory.get(index);
                     if (r.state == ActivityState.RESUMED
                             || r.state == ActivityState.PAUSING
                             || r.state == ActivityState.PAUSED) {
                         if (!r.isHomeActivity) {
                             Slog.w(TAG, "  Force finishing activity "
                                     + r.intent.getComponent().flattenToShortString());
-                            finishActivityLocked(r, index,
+                            r.stack.finishActivityLocked(r, index,
                                     Activity.RESULT_CANCELED, null, "crashed");
                         }
                     }
@@ -9038,9 +6035,9 @@
         if (app.services.size() != 0) {
             // Any services running in the application need to be placed
             // back in the pending list.
-            Iterator it = app.services.iterator();
+            Iterator<ServiceRecord> it = app.services.iterator();
             while (it.hasNext()) {
-                ServiceRecord sr = (ServiceRecord)it.next();
+                ServiceRecord sr = it.next();
                 sr.crashCount++;
             }
         }
@@ -9103,6 +6100,139 @@
         crashApplication(r, crashInfo);
     }
 
+    public void handleApplicationStrictModeViolation(
+        IBinder app, int violationMask, ApplicationErrorReport.CrashInfo crashInfo) {
+        ProcessRecord r = findAppProcess(app);
+
+        if ((violationMask & StrictMode.PENALTY_DROPBOX) != 0) {
+            Integer stackFingerprint = crashInfo.stackTrace.hashCode();
+            boolean logIt = true;
+            synchronized (mAlreadyLoggedViolatedStacks) {
+                if (mAlreadyLoggedViolatedStacks.contains(stackFingerprint)) {
+                    logIt = false;
+                    // TODO: sub-sample into EventLog for these, with
+                    // the crashInfo.durationMillis?  Then we'd get
+                    // the relative pain numbers, without logging all
+                    // the stack traces repeatedly.  We'd want to do
+                    // likewise in the client code, which also does
+                    // dup suppression, before the Binder call.
+                } else {
+                    if (mAlreadyLoggedViolatedStacks.size() >= MAX_DUP_SUPPRESSED_STACKS) {
+                        mAlreadyLoggedViolatedStacks.clear();
+                    }
+                    mAlreadyLoggedViolatedStacks.add(stackFingerprint);
+                }
+            }
+            if (logIt) {
+                logStrictModeViolationToDropBox(r, crashInfo);
+            }
+        }
+
+        if ((violationMask & StrictMode.PENALTY_DIALOG) != 0) {
+            AppErrorResult result = new AppErrorResult();
+            synchronized (this) {
+                final long origId = Binder.clearCallingIdentity();
+
+                Message msg = Message.obtain();
+                msg.what = SHOW_STRICT_MODE_VIOLATION_MSG;
+                HashMap<String, Object> data = new HashMap<String, Object>();
+                data.put("result", result);
+                data.put("app", r);
+                data.put("violationMask", violationMask);
+                data.put("crashInfo", crashInfo);
+                msg.obj = data;
+                mHandler.sendMessage(msg);
+
+                Binder.restoreCallingIdentity(origId);
+            }
+            int res = result.get();
+            Log.w(TAG, "handleApplicationStrictModeViolation; res=" + res);
+        }
+    }
+
+    // Depending on the policy in effect, there could be a bunch of
+    // these in quick succession so we try to batch these together to
+    // minimize disk writes, number of dropbox entries, and maximize
+    // compression, by having more fewer, larger records.
+    private void logStrictModeViolationToDropBox(ProcessRecord process,
+                                                 ApplicationErrorReport.CrashInfo crashInfo) {
+        if (crashInfo == null) {
+            return;
+        }
+        final boolean isSystemApp = process == null ||
+                (process.info.flags & (ApplicationInfo.FLAG_SYSTEM |
+                                       ApplicationInfo.FLAG_UPDATED_SYSTEM_APP)) != 0;
+        final String dropboxTag = isSystemApp ? "system_app_strictmode" : "data_app_strictmode";
+        final DropBoxManager dbox = (DropBoxManager)
+                mContext.getSystemService(Context.DROPBOX_SERVICE);
+
+        // Exit early if the dropbox isn't configured to accept this report type.
+        if (dbox == null || !dbox.isTagEnabled(dropboxTag)) return;
+
+        boolean bufferWasEmpty;
+
+        final StringBuilder sb = isSystemApp ? mStrictModeBuffer : new StringBuilder(1024);
+        synchronized (sb) {
+            bufferWasEmpty = sb.length() == 0;
+            appendDropBoxProcessHeaders(process, sb);
+            sb.append("Build: ").append(Build.FINGERPRINT).append("\n");
+            sb.append("System-App: ").append(isSystemApp).append("\n");
+            if (crashInfo != null && crashInfo.durationMillis != -1) {
+                sb.append("Duration-Millis: ").append(crashInfo.durationMillis).append("\n");
+            }
+            sb.append("\n");
+            if (crashInfo != null && crashInfo.stackTrace != null) {
+                sb.append(crashInfo.stackTrace);
+            }
+            sb.append("\n");
+        }
+
+        // Non-system apps are isolated with a different tag & policy.
+        // They're also not batched.  Batching is useful during system
+        // boot with strict system-wide logging policies and lots of
+        // things firing, but not common with regular apps, which
+        // won't ship with StrictMode dropboxing enabled.
+        if (!isSystemApp) {
+            new Thread("Error dump: " + dropboxTag) {
+                @Override
+                public void run() {
+                    dbox.addText(dropboxTag, sb.toString());
+                }
+            }.start();
+            return;
+        }
+
+        // System app batching:
+        if (!bufferWasEmpty) {
+            // An existing dropbox-writing thread is outstanding and
+            // will handle it.
+            return;
+        }
+
+        // Worker thread to both batch writes and to avoid blocking the caller on I/O.
+        // (After this point, we shouldn't access AMS internal data structures.)
+        new Thread("Error dump: " + dropboxTag) {
+            @Override
+            public void run() {
+                // 5 second sleep to let stacks arrive and be batched together
+                try {
+                    Thread.sleep(5000);  // 5 seconds
+                } catch (InterruptedException e) {}
+
+                String errorReport;
+                synchronized (mStrictModeBuffer) {
+                    errorReport = mStrictModeBuffer.toString();
+                    if (errorReport.length() == 0) {
+                        return;
+                    }
+                    mStrictModeBuffer.delete(0, mStrictModeBuffer.length());
+                    mStrictModeBuffer.trimToSize();
+                }
+                dbox.addText(dropboxTag, errorReport);
+            }
+        }.start();
+    }
+
     /**
      * Used by {@link Log} via {@link com.android.internal.os.RuntimeInit} to report serious errors.
      * @param app object of the crashing app, null for the system server
@@ -9156,40 +6286,10 @@
     }
 
     /**
-     * Write a description of an error (crash, WTF, ANR) to the drop box.
-     * @param eventType to include in the drop box tag ("crash", "wtf", etc.)
-     * @param process which caused the error, null means the system server
-     * @param activity which triggered the error, null if unknown
-     * @param parent activity related to the error, null if unknown
-     * @param subject line related to the error, null if absent
-     * @param report in long form describing the error, null if absent
-     * @param logFile to include in the report, null if none
-     * @param crashInfo giving an application stack trace, null if absent
+     * Utility function for addErrorToDropBox and handleStrictModeViolation's logging
+     * to append various headers to the dropbox log text.
      */
-    public void addErrorToDropBox(String eventType,
-            ProcessRecord process, HistoryRecord activity, HistoryRecord parent, String subject,
-            final String report, final File logFile,
-            final ApplicationErrorReport.CrashInfo crashInfo) {
-        // NOTE -- this must never acquire the ActivityManagerService lock,
-        // otherwise the watchdog may be prevented from resetting the system.
-
-        String prefix;
-        if (process == null || process.pid == MY_PID) {
-            prefix = "system_server_";
-        } else if ((process.info.flags & ApplicationInfo.FLAG_SYSTEM) != 0) {
-            prefix = "system_app_";
-        } else {
-            prefix = "data_app_";
-        }
-
-        final String dropboxTag = prefix + eventType;
-        final DropBoxManager dbox = (DropBoxManager)
-                mContext.getSystemService(Context.DROPBOX_SERVICE);
-
-        // Exit early if the dropbox isn't configured to accept this report type.
-        if (dbox == null || !dbox.isTagEnabled(dropboxTag)) return;
-
-        final StringBuilder sb = new StringBuilder(1024);
+    private static void appendDropBoxProcessHeaders(ProcessRecord process, StringBuilder sb) {
         if (process == null || process.pid == MY_PID) {
             sb.append("Process: system_server\n");
         } else {
@@ -9197,7 +6297,7 @@
         }
         if (process != null) {
             int flags = process.info.flags;
-            IPackageManager pm = ActivityThread.getPackageManager();
+            IPackageManager pm = AppGlobals.getPackageManager();
             sb.append("Flags: 0x").append(Integer.toString(flags, 16)).append("\n");
             for (String pkg : process.pkgList) {
                 sb.append("Package: ").append(pkg);
@@ -9215,6 +6315,45 @@
                 sb.append("\n");
             }
         }
+    }
+
+    private static String processClass(ProcessRecord process) {
+        if (process == null || process.pid == MY_PID) {
+            return "system_server";
+        } else if ((process.info.flags & ApplicationInfo.FLAG_SYSTEM) != 0) {
+            return "system_app";
+        } else {
+            return "data_app";
+        }
+    }
+
+    /**
+     * Write a description of an error (crash, WTF, ANR) to the drop box.
+     * @param eventType to include in the drop box tag ("crash", "wtf", etc.)
+     * @param process which caused the error, null means the system server
+     * @param activity which triggered the error, null if unknown
+     * @param parent activity related to the error, null if unknown
+     * @param subject line related to the error, null if absent
+     * @param report in long form describing the error, null if absent
+     * @param logFile to include in the report, null if none
+     * @param crashInfo giving an application stack trace, null if absent
+     */
+    public void addErrorToDropBox(String eventType,
+            ProcessRecord process, ActivityRecord activity, ActivityRecord parent, String subject,
+            final String report, final File logFile,
+            final ApplicationErrorReport.CrashInfo crashInfo) {
+        // NOTE -- this must never acquire the ActivityManagerService lock,
+        // otherwise the watchdog may be prevented from resetting the system.
+
+        final String dropboxTag = processClass(process) + "_" + eventType;
+        final DropBoxManager dbox = (DropBoxManager)
+                mContext.getSystemService(Context.DROPBOX_SERVICE);
+
+        // Exit early if the dropbox isn't configured to accept this report type.
+        if (dbox == null || !dbox.isTagEnabled(dropboxTag)) return;
+
+        final StringBuilder sb = new StringBuilder(1024);
+        appendDropBoxProcessHeaders(process, sb);
         if (activity != null) {
             sb.append("Activity: ").append(activity.shortComponentName).append("\n");
         }
@@ -9472,6 +6611,9 @@
                         new ActivityManager.RunningAppProcessInfo(app.processName,
                                 app.pid, app.getPackageList());
                     currApp.uid = app.info.uid;
+                    if (mHeavyWeightProcess == app) {
+                        currApp.flags |= ActivityManager.RunningAppProcessInfo.FLAG_HEAVY_WEIGHT;
+                    }
                     int adj = app.curAdj;
                     if (adj >= EMPTY_APP_ADJ) {
                         currApp.importance = ActivityManager.RunningAppProcessInfo.IMPORTANCE_EMPTY;
@@ -9483,6 +6625,10 @@
                         currApp.lru = 0;
                     } else if (adj >= SECONDARY_SERVER_ADJ) {
                         currApp.importance = ActivityManager.RunningAppProcessInfo.IMPORTANCE_SERVICE;
+                    } else if (adj >= HEAVY_WEIGHT_APP_ADJ) {
+                        currApp.importance = ActivityManager.RunningAppProcessInfo.IMPORTANCE_HEAVY_WEIGHT;
+                    } else if (adj >= PERCEPTIBLE_APP_ADJ) {
+                        currApp.importance = ActivityManager.RunningAppProcessInfo.IMPORTANCE_PERCEPTIBLE;
                     } else if (adj >= VISIBLE_APP_ADJ) {
                         currApp.importance = ActivityManager.RunningAppProcessInfo.IMPORTANCE_VISIBLE;
                     } else {
@@ -9491,8 +6637,8 @@
                     currApp.importanceReasonCode = app.adjTypeCode;
                     if (app.adjSource instanceof ProcessRecord) {
                         currApp.importanceReasonPid = ((ProcessRecord)app.adjSource).pid;
-                    } else if (app.adjSource instanceof HistoryRecord) {
-                        HistoryRecord r = (HistoryRecord)app.adjSource;
+                    } else if (app.adjSource instanceof ActivityRecord) {
+                        ActivityRecord r = (ActivityRecord)app.adjSource;
                         if (r.app != null) currApp.importanceReasonPid = r.app.pid;
                     }
                     if (app.adjTarget instanceof ComponentName) {
@@ -9522,7 +6668,7 @@
                     }
                 }
             }
-            IPackageManager pm = ActivityThread.getPackageManager();
+            IPackageManager pm = AppGlobals.getPackageManager();
             for (String pkg : extList) {
                 try {
                     ApplicationInfo info = pm.getApplicationInfo(pkg, 0);
@@ -9671,31 +6817,31 @@
         if (needHeader) {
             pw.println("  Activity stack:");
         }
-        dumpHistoryList(pw, mHistory, "  ", "Hist", true);
+        dumpHistoryList(pw, mMainStack.mHistory, "  ", "Hist", true);
         pw.println(" ");
         pw.println("  Running activities (most recent first):");
-        dumpHistoryList(pw, mLRUActivities, "  ", "Run", false);
-        if (mWaitingVisibleActivities.size() > 0) {
+        dumpHistoryList(pw, mMainStack.mLRUActivities, "  ", "Run", false);
+        if (mMainStack.mWaitingVisibleActivities.size() > 0) {
             pw.println(" ");
             pw.println("  Activities waiting for another to become visible:");
-            dumpHistoryList(pw, mWaitingVisibleActivities, "  ", "Wait", false);
+            dumpHistoryList(pw, mMainStack.mWaitingVisibleActivities, "  ", "Wait", false);
         }
-        if (mStoppingActivities.size() > 0) {
+        if (mMainStack.mStoppingActivities.size() > 0) {
             pw.println(" ");
             pw.println("  Activities waiting to stop:");
-            dumpHistoryList(pw, mStoppingActivities, "  ", "Stop", false);
+            dumpHistoryList(pw, mMainStack.mStoppingActivities, "  ", "Stop", false);
         }
-        if (mFinishingActivities.size() > 0) {
+        if (mMainStack.mFinishingActivities.size() > 0) {
             pw.println(" ");
             pw.println("  Activities waiting to finish:");
-            dumpHistoryList(pw, mFinishingActivities, "  ", "Fin", false);
+            dumpHistoryList(pw, mMainStack.mFinishingActivities, "  ", "Fin", false);
         }
 
         pw.println(" ");
-        pw.println("  mPausingActivity: " + mPausingActivity);
-        pw.println("  mResumedActivity: " + mResumedActivity);
+        pw.println("  mPausingActivity: " + mMainStack.mPausingActivity);
+        pw.println("  mResumedActivity: " + mMainStack.mResumedActivity);
         pw.println("  mFocusedActivity: " + mFocusedActivity);
-        pw.println("  mLastPausedActivity: " + mLastPausedActivity);
+        pw.println("  mLastPausedActivity: " + mMainStack.mLastPausedActivity);
 
         if (dumpAll && mRecentTasks.size() > 0) {
             pw.println(" ");
@@ -9746,7 +6892,7 @@
             needSep = true;
             pw.println("  Running processes (most recent first):");
             dumpProcessList(pw, this, mLruProcesses, "    ",
-                    "App ", "PERS", true);
+                    "Proc", "PERS", true);
             needSep = true;
         }
 
@@ -9860,8 +7006,11 @@
 
         pw.println(" ");
         pw.println("  mHomeProcess: " + mHomeProcess);
+        if (mHeavyWeightProcess != null) {
+            pw.println("  mHeavyWeightProcess: " + mHeavyWeightProcess);
+        }
         pw.println("  mConfiguration: " + mConfiguration);
-        pw.println("  mConfigWillChange: " + mConfigWillChange);
+        pw.println("  mConfigWillChange: " + mMainStack.mConfigWillChange);
         pw.println("  mSleeping=" + mSleeping + " mShuttingDown=" + mShuttingDown);
         if (mDebugApp != null || mOrigDebugApp != null || mDebugTransient
                 || mOrigWaitForDebugger) {
@@ -9880,8 +7029,8 @@
                     + " mBooting=" + mBooting
                     + " mBooted=" + mBooted
                     + " mFactoryTest=" + mFactoryTest);
-            pw.println("  mGoingToSleep=" + mGoingToSleep);
-            pw.println("  mLaunchingActivity=" + mLaunchingActivity);
+            pw.println("  mGoingToSleep=" + mMainStack.mGoingToSleep);
+            pw.println("  mLaunchingActivity=" + mMainStack.mLaunchingActivity);
             pw.println("  mAdjSeq=" + mAdjSeq + " mLruSeq=" + mLruSeq);
         }
         
@@ -10121,10 +7270,11 @@
             if (mProvidersByClass.size() > 0) {
                 if (needSep) pw.println(" ");
                 pw.println("  Published content providers (by class):");
-                Iterator it = mProvidersByClass.entrySet().iterator();
+                Iterator<Map.Entry<String, ContentProviderRecord>> it
+                        = mProvidersByClass.entrySet().iterator();
                 while (it.hasNext()) {
-                    Map.Entry e = (Map.Entry)it.next();
-                    ContentProviderRecord r = (ContentProviderRecord)e.getValue();
+                    Map.Entry<String, ContentProviderRecord> e = it.next();
+                    ContentProviderRecord r = e.getValue();
                     pw.print("  * "); pw.println(r);
                     r.dump(pw, "    ");
                 }
@@ -10134,10 +7284,11 @@
             if (mProvidersByName.size() > 0) {
                 pw.println(" ");
                 pw.println("  Authority to provider mappings:");
-                Iterator it = mProvidersByName.entrySet().iterator();
+                Iterator<Map.Entry<String, ContentProviderRecord>> it
+                        = mProvidersByName.entrySet().iterator();
                 while (it.hasNext()) {
-                    Map.Entry e = (Map.Entry)it.next();
-                    ContentProviderRecord r = (ContentProviderRecord)e.getValue();
+                    Map.Entry<String, ContentProviderRecord> e = it.next();
+                    ContentProviderRecord r = e.getValue();
                     pw.print("  "); pw.print(e.getKey()); pw.print(": ");
                             pw.println(r);
                 }
@@ -10204,7 +7355,7 @@
             String prefix, String label, boolean complete) {
         TaskRecord lastTask = null;
         for (int i=list.size()-1; i>=0; i--) {
-            HistoryRecord r = (HistoryRecord)list.get(i);
+            ActivityRecord r = (ActivityRecord)list.get(i);
             final boolean full = complete || !r.inHistory;
             if (lastTask != r.task) {
                 lastTask = r.task;
@@ -10237,7 +7388,8 @@
             String prefix, String normalLabel, String persistentLabel,
             boolean inclOomAdj) {
         int numPers = 0;
-        for (int i=list.size()-1; i>=0; i--) {
+        final int N = list.size()-1;
+        for (int i=N; i>=0; i--) {
             ProcessRecord r = (ProcessRecord)list.get(i);
             if (false) {
                 pw.println(prefix + (r.persistent ? persistentLabel : normalLabel)
@@ -10255,6 +7407,10 @@
                     oomAdj = buildOomTag("svc", "  ", r.setAdj, SECONDARY_SERVER_ADJ);
                 } else if (r.setAdj >= BACKUP_APP_ADJ) {
                     oomAdj = buildOomTag("bckup", null, r.setAdj, BACKUP_APP_ADJ);
+                } else if (r.setAdj >= HEAVY_WEIGHT_APP_ADJ) {
+                    oomAdj = buildOomTag("hvy  ", null, r.setAdj, HEAVY_WEIGHT_APP_ADJ);
+                } else if (r.setAdj >= PERCEPTIBLE_APP_ADJ) {
+                    oomAdj = buildOomTag("prcp ", null, r.setAdj, PERCEPTIBLE_APP_ADJ);
                 } else if (r.setAdj >= VISIBLE_APP_ADJ) {
                     oomAdj = buildOomTag("vis  ", null, r.setAdj, VISIBLE_APP_ADJ);
                 } else if (r.setAdj >= FOREGROUND_APP_ADJ) {
@@ -10280,10 +7436,27 @@
                 }
                 pw.println(String.format("%s%s #%2d: adj=%s/%s %s (%s)",
                         prefix, (r.persistent ? persistentLabel : normalLabel),
-                        i, oomAdj, schedGroup, r.toShortString(), r.adjType));
+                        N-i, oomAdj, schedGroup, r.toShortString(), r.adjType));
                 if (r.adjSource != null || r.adjTarget != null) {
-                    pw.println(prefix + "          " + r.adjTarget
-                            + "<=" + r.adjSource);
+                    pw.print(prefix);
+                    pw.print("          ");
+                    if (r.adjTarget instanceof ComponentName) {
+                        pw.print(((ComponentName)r.adjTarget).flattenToShortString());
+                    } else if (r.adjTarget != null) {
+                        pw.print(r.adjTarget.toString());
+                    } else {
+                        pw.print("{null}");
+                    }
+                    pw.print("<=");
+                    if (r.adjSource instanceof ProcessRecord) {
+                        pw.print("Proc{");
+                        pw.print(((ProcessRecord)r.adjSource).toShortString());
+                        pw.println("}");
+                    } else if (r.adjSource != null) {
+                        pw.println(r.adjSource.toString());
+                    } else {
+                        pw.println("{null}");
+                    }
                 }
             } else {
                 pw.println(String.format("%s%s #%2d: %s",
@@ -10347,22 +7520,6 @@
         return false;
     }
 
-    private final int indexOfTokenLocked(IBinder token) {
-        int count = mHistory.size();
-
-        // convert the token to an entry in the history.
-        int index = -1;
-        for (int i=count-1; i>=0; i--) {
-            Object o = mHistory.get(i);
-            if (o == token) {
-                index = i;
-                break;
-            }
-        }
-
-        return index;
-    }
-
     private final void killServicesLocked(ProcessRecord app,
             boolean allowRestart) {
         // Report disconnected services.
@@ -10370,9 +7527,9 @@
             // XXX we are letting the client link to the service for
             // death notifications.
             if (app.services.size() > 0) {
-                Iterator it = app.services.iterator();
+                Iterator<ServiceRecord> it = app.services.iterator();
                 while (it.hasNext()) {
-                    ServiceRecord r = (ServiceRecord)it.next();
+                    ServiceRecord r = it.next();
                     if (r.connections.size() > 0) {
                         Iterator<ConnectionRecord> jt
                                 = r.connections.values().iterator();
@@ -10407,9 +7564,9 @@
         if (app.services.size() != 0) {
             // Any services running in the application need to be placed
             // back in the pending list.
-            Iterator it = app.services.iterator();
+            Iterator<ServiceRecord> it = app.services.iterator();
             while (it.hasNext()) {
-                ServiceRecord sr = (ServiceRecord)it.next();
+                ServiceRecord sr = it.next();
                 synchronized (sr.stats.getBatteryStats()) {
                     sr.stats.stopLaunchedLocked();
                 }
@@ -10548,9 +7705,9 @@
         
         // Remove published content providers.
         if (!app.pubProviders.isEmpty()) {
-            Iterator it = app.pubProviders.values().iterator();
+            Iterator<ContentProviderRecord> it = app.pubProviders.values().iterator();
             while (it.hasNext()) {
-                ContentProviderRecord cpr = (ContentProviderRecord)it.next();
+                ContentProviderRecord cpr = it.next();
                 cpr.provider = null;
                 cpr.app = null;
 
@@ -10642,6 +7799,10 @@
             if (DEBUG_PROCESSES) Slog.v(TAG,
                     "Removing non-persistent process during cleanup: " + app);
             mProcessNames.remove(app.processName, app.info.uid);
+            if (mHeavyWeightProcess == app) {
+                mHeavyWeightProcess = null;
+                mHandler.sendEmptyMessage(CANCEL_HEAVY_NOTIFICATION_MSG);
+            }
         } else if (!app.removed) {
             // This app is persistent, so we need to keep its record around.
             // If it is not already on the pending app list, add it there
@@ -10683,8 +7844,7 @@
         int NL = mLaunchingProviders.size();
         boolean restart = false;
         for (int i=0; i<NL; i++) {
-            ContentProviderRecord cpr = (ContentProviderRecord)
-                    mLaunchingProviders.get(i);
+            ContentProviderRecord cpr = mLaunchingProviders.get(i);
             if (cpr.launchingApp == app) {
                 if (!alwaysBad && !app.bad) {
                     restart = true;
@@ -10807,7 +7967,7 @@
         if (r == null) {
             try {
                 ResolveInfo rInfo =
-                    ActivityThread.getPackageManager().resolveService(
+                    AppGlobals.getPackageManager().resolveService(
                             service, resolvedType, 0);
                 ServiceInfo sInfo =
                     rInfo != null ? rInfo.serviceInfo : null;
@@ -10864,7 +8024,7 @@
         if (r == null) {
             try {
                 ResolveInfo rInfo =
-                    ActivityThread.getPackageManager().resolveService(
+                    AppGlobals.getPackageManager().resolveService(
                             service, resolvedType, STOCK_PM_FLAGS);
                 ServiceInfo sInfo =
                     rInfo != null ? rInfo.serviceInfo : null;
@@ -11601,7 +8761,7 @@
 
     public void updateServiceForegroundLocked(ProcessRecord proc, boolean oomAdj) {
         boolean anyForeground = false;
-        for (ServiceRecord sr : (HashSet<ServiceRecord>)proc.services) {
+        for (ServiceRecord sr : proc.services) {
             if (sr.isForeground) {
                 anyForeground = true;
                 break;
@@ -11635,14 +8795,14 @@
                         + ") when binding service " + service);
             }
 
-            HistoryRecord activity = null;
+            ActivityRecord activity = null;
             if (token != null) {
-                int aindex = indexOfTokenLocked(token);
+                int aindex = mMainStack.indexOfTokenLocked(token);
                 if (aindex < 0) {
                     Slog.w(TAG, "Binding with unknown activity: " + token);
                     return 0;
                 }
-                activity = (HistoryRecord)mHistory.get(aindex);
+                activity = (ActivityRecord)mMainStack.mHistory.get(aindex);
             }
 
             int clientLabel = 0;
@@ -11746,8 +8906,8 @@
         return 1;
     }
 
-    private void removeConnectionLocked(
-        ConnectionRecord c, ProcessRecord skipApp, HistoryRecord skipAct) {
+    void removeConnectionLocked(
+        ConnectionRecord c, ProcessRecord skipApp, ActivityRecord skipAct) {
         IBinder binder = c.conn.asBinder();
         AppBindRecord b = c.binding;
         ServiceRecord s = b.service;
@@ -12428,7 +9588,7 @@
             // Always okay.
         } else if (callerApp == null || !callerApp.persistent) {
             try {
-                if (ActivityThread.getPackageManager().isProtectedBroadcast(
+                if (AppGlobals.getPackageManager().isProtectedBroadcast(
                         intent.getAction())) {
                     String msg = "Permission Denial: not allowed to send broadcast "
                             + intent.getAction() + " from pid="
@@ -12487,7 +9647,7 @@
         try {
             if (intent.getComponent() != null) {
                 // Broadcast is going to one specific receiver class...
-                ActivityInfo ai = ActivityThread.getPackageManager().
+                ActivityInfo ai = AppGlobals.getPackageManager().
                     getReceiverInfo(intent.getComponent(), STOCK_PM_FLAGS);
                 if (ai != null) {
                     receivers = new ArrayList();
@@ -12500,7 +9660,7 @@
                 if ((intent.getFlags()&Intent.FLAG_RECEIVER_REGISTERED_ONLY)
                          == 0) {
                     receivers =
-                        ActivityThread.getPackageManager().queryIntentReceivers(
+                        AppGlobals.getPackageManager().queryIntentReceivers(
                                 intent, resolvedType, STOCK_PM_FLAGS);
                 }
                 registeredReceivers = mReceiverResolver.queryIntent(intent, resolvedType, false);
@@ -13252,7 +10412,7 @@
             if (r.callingUid != Process.SYSTEM_UID &&
                 r.requiredPermission != null) {
                 try {
-                    perm = ActivityThread.getPackageManager().
+                    perm = AppGlobals.getPackageManager().
                             checkPermission(r.requiredPermission,
                                     info.activityInfo.applicationInfo.packageName);
                 } catch (RemoteException e) {
@@ -13509,7 +10669,7 @@
      * configuration.
      */
     public boolean updateConfigurationLocked(Configuration values,
-            HistoryRecord starting) {
+            ActivityRecord starting) {
         int changes = 0;
         
         boolean kept = true;
@@ -13578,18 +10738,18 @@
             // If the configuration changed, and the caller is not already
             // in the process of starting an activity, then find the top
             // activity to check if its configuration needs to change.
-            starting = topRunningActivityLocked(null);
+            starting = mMainStack.topRunningActivityLocked(null);
         }
         
         if (starting != null) {
-            kept = ensureActivityConfigurationLocked(starting, changes);
+            kept = mMainStack.ensureActivityConfigurationLocked(starting, changes);
             if (kept) {
                 // If this didn't result in the starting activity being
                 // destroyed, then we need to make sure at this point that all
                 // other activities are made visible.
                 if (DEBUG_SWITCH) Slog.i(TAG, "Config didn't destroy " + starting
                         + ", ensuring others are correct.");
-                ensureActivitiesVisibleLocked(starting, changes);
+                mMainStack.ensureActivitiesVisibleLocked(starting, changes);
             }
         }
         
@@ -13599,160 +10759,6 @@
         
         return kept;
     }
-
-    private final boolean relaunchActivityLocked(HistoryRecord r,
-            int changes, boolean andResume) {
-        List<ResultInfo> results = null;
-        List<Intent> newIntents = null;
-        if (andResume) {
-            results = r.results;
-            newIntents = r.newIntents;
-        }
-        if (DEBUG_SWITCH) Slog.v(TAG, "Relaunching: " + r
-                + " with results=" + results + " newIntents=" + newIntents
-                + " andResume=" + andResume);
-        EventLog.writeEvent(andResume ? EventLogTags.AM_RELAUNCH_RESUME_ACTIVITY
-                : EventLogTags.AM_RELAUNCH_ACTIVITY, System.identityHashCode(r),
-                r.task.taskId, r.shortComponentName);
-        
-        r.startFreezingScreenLocked(r.app, 0);
-        
-        try {
-            if (DEBUG_SWITCH) Slog.i(TAG, "Switch is restarting resumed " + r);
-            r.app.thread.scheduleRelaunchActivity(r, results, newIntents,
-                    changes, !andResume, mConfiguration);
-            // Note: don't need to call pauseIfSleepingLocked() here, because
-            // the caller will only pass in 'andResume' if this activity is
-            // currently resumed, which implies we aren't sleeping.
-        } catch (RemoteException e) {
-            return false;
-        }
-
-        if (andResume) {
-            r.results = null;
-            r.newIntents = null;
-            reportResumedActivityLocked(r);
-        }
-
-        return true;
-    }
-
-    /**
-     * Make sure the given activity matches the current configuration.  Returns
-     * false if the activity had to be destroyed.  Returns true if the
-     * configuration is the same, or the activity will remain running as-is
-     * for whatever reason.  Ensures the HistoryRecord is updated with the
-     * correct configuration and all other bookkeeping is handled.
-     */
-    private final boolean ensureActivityConfigurationLocked(HistoryRecord r,
-            int globalChanges) {
-        if (mConfigWillChange) {
-            if (DEBUG_SWITCH || DEBUG_CONFIGURATION) Slog.v(TAG,
-                    "Skipping config check (will change): " + r);
-            return true;
-        }
-        
-        if (DEBUG_SWITCH || DEBUG_CONFIGURATION) Slog.v(TAG,
-                "Ensuring correct configuration: " + r);
-        
-        // Short circuit: if the two configurations are the exact same
-        // object (the common case), then there is nothing to do.
-        Configuration newConfig = mConfiguration;
-        if (r.configuration == newConfig) {
-            if (DEBUG_SWITCH || DEBUG_CONFIGURATION) Slog.v(TAG,
-                    "Configuration unchanged in " + r);
-            return true;
-        }
-        
-        // We don't worry about activities that are finishing.
-        if (r.finishing) {
-            if (DEBUG_SWITCH || DEBUG_CONFIGURATION) Slog.v(TAG,
-                    "Configuration doesn't matter in finishing " + r);
-            r.stopFreezingScreenLocked(false);
-            return true;
-        }
-        
-        // Okay we now are going to make this activity have the new config.
-        // But then we need to figure out how it needs to deal with that.
-        Configuration oldConfig = r.configuration;
-        r.configuration = newConfig;
-        
-        // If the activity isn't currently running, just leave the new
-        // configuration and it will pick that up next time it starts.
-        if (r.app == null || r.app.thread == null) {
-            if (DEBUG_SWITCH || DEBUG_CONFIGURATION) Slog.v(TAG,
-                    "Configuration doesn't matter not running " + r);
-            r.stopFreezingScreenLocked(false);
-            return true;
-        }
-        
-        // If the activity isn't persistent, there is a chance we will
-        // need to restart it.
-        if (!r.persistent) {
-
-            // Figure out what has changed between the two configurations.
-            int changes = oldConfig.diff(newConfig);
-            if (DEBUG_SWITCH || DEBUG_CONFIGURATION) {
-                Slog.v(TAG, "Checking to restart " + r.info.name + ": changed=0x"
-                        + Integer.toHexString(changes) + ", handles=0x"
-                        + Integer.toHexString(r.info.configChanges)
-                        + ", newConfig=" + newConfig);
-            }
-            if ((changes&(~r.info.configChanges)) != 0) {
-                // Aha, the activity isn't handling the change, so DIE DIE DIE.
-                r.configChangeFlags |= changes;
-                r.startFreezingScreenLocked(r.app, globalChanges);
-                if (r.app == null || r.app.thread == null) {
-                    if (DEBUG_SWITCH || DEBUG_CONFIGURATION) Slog.v(TAG,
-                            "Switch is destroying non-running " + r);
-                    destroyActivityLocked(r, true);
-                } else if (r.state == ActivityState.PAUSING) {
-                    // A little annoying: we are waiting for this activity to
-                    // finish pausing.  Let's not do anything now, but just
-                    // flag that it needs to be restarted when done pausing.
-                    if (DEBUG_SWITCH || DEBUG_CONFIGURATION) Slog.v(TAG,
-                            "Switch is skipping already pausing " + r);
-                    r.configDestroy = true;
-                    return true;
-                } else if (r.state == ActivityState.RESUMED) {
-                    // Try to optimize this case: the configuration is changing
-                    // and we need to restart the top, resumed activity.
-                    // Instead of doing the normal handshaking, just say
-                    // "restart!".
-                    if (DEBUG_SWITCH || DEBUG_CONFIGURATION) Slog.v(TAG,
-                            "Switch is restarting resumed " + r);
-                    relaunchActivityLocked(r, r.configChangeFlags, true);
-                    r.configChangeFlags = 0;
-                } else {
-                    if (DEBUG_SWITCH || DEBUG_CONFIGURATION) Slog.v(TAG,
-                            "Switch is restarting non-resumed " + r);
-                    relaunchActivityLocked(r, r.configChangeFlags, false);
-                    r.configChangeFlags = 0;
-                }
-                
-                // All done...  tell the caller we weren't able to keep this
-                // activity around.
-                return false;
-            }
-        }
-        
-        // Default case: the activity can handle this new configuration, so
-        // hand it over.  Note that we don't need to give it the new
-        // configuration, since we always send configuration changes to all
-        // process when they happen so it can just use whatever configuration
-        // it last got.
-        if (r.app != null && r.app.thread != null) {
-            try {
-                if (DEBUG_CONFIGURATION) Slog.v(TAG, "Sending new config to " + r);
-                r.app.thread.scheduleActivityConfigurationChanged(r);
-            } catch (RemoteException e) {
-                // If process died, whatever.
-            }
-        }
-        r.stopFreezingScreenLocked(false);
-        
-        return true;
-    }
     
     /**
      * Save the locale.  You must be inside a synchronized (this) block.
@@ -13844,15 +10850,20 @@
             app.adjType = "exec-service";
         } else if (app.foregroundServices) {
             // The user is aware of this app, so make it visible.
-            adj = VISIBLE_APP_ADJ;
+            adj = PERCEPTIBLE_APP_ADJ;
             schedGroup = Process.THREAD_GROUP_DEFAULT;
             app.adjType = "foreground-service";
         } else if (app.forcingToForeground != null) {
             // The user is aware of this app, so make it visible.
-            adj = VISIBLE_APP_ADJ;
+            adj = PERCEPTIBLE_APP_ADJ;
             schedGroup = Process.THREAD_GROUP_DEFAULT;
             app.adjType = "force-foreground";
             app.adjSource = app.forcingToForeground;
+        } else if (app == mHeavyWeightProcess) {
+            // We don't want to kill the current heavy-weight process.
+            adj = HEAVY_WEIGHT_APP_ADJ;
+            schedGroup = Process.THREAD_GROUP_DEFAULT;
+            app.adjType = "heavy";
         } else if (app == mHomeProcess) {
             // This process is hosting what we currently consider to be the
             // home app, so we don't want to let it go into the background.
@@ -13867,7 +10878,7 @@
             app.adjType = "bg-activities";
             N = app.activities.size();
             for (int j=0; j<N; j++) {
-                if (((HistoryRecord)app.activities.get(j)).visible) {
+                if (app.activities.get(j).visible) {
                     // This app has a visible activity!
                     app.hidden = false;
                     adj = VISIBLE_APP_ADJ;
@@ -13910,9 +10921,9 @@
             final long now = SystemClock.uptimeMillis();
             // This process is more important if the top activity is
             // bound to the service.
-            Iterator jt = app.services.iterator();
+            Iterator<ServiceRecord> jt = app.services.iterator();
             while (jt.hasNext() && adj > FOREGROUND_APP_ADJ) {
-                ServiceRecord s = (ServiceRecord)jt.next();
+                ServiceRecord s = jt.next();
                 if (s.startRequested) {
                     if (now < (s.lastActivity+MAX_SERVICE_INACTIVITY)) {
                         // This service has seen some activity within
@@ -13947,7 +10958,7 @@
                             ProcessRecord client = cr.binding.client;
                             int myHiddenAdj = hiddenAdj;
                             if (myHiddenAdj > client.hiddenAdj) {
-                                if (client.hiddenAdj > VISIBLE_APP_ADJ) {
+                                if (client.hiddenAdj >= VISIBLE_APP_ADJ) {
                                     myHiddenAdj = client.hiddenAdj;
                                 } else {
                                     myHiddenAdj = VISIBLE_APP_ADJ;
@@ -13956,7 +10967,7 @@
                             int clientAdj = computeOomAdjLocked(
                                 client, myHiddenAdj, TOP_APP, true);
                             if (adj > clientAdj) {
-                                adj = clientAdj > VISIBLE_APP_ADJ
+                                adj = clientAdj >= VISIBLE_APP_ADJ
                                         ? clientAdj : VISIBLE_APP_ADJ;
                                 if (!client.hidden) {
                                     app.hidden = false;
@@ -13965,7 +10976,7 @@
                                 app.adjTypeCode = ActivityManager.RunningAppProcessInfo
                                         .REASON_SERVICE_IN_USE;
                                 app.adjSource = cr.binding.client;
-                                app.adjTarget = s.serviceInfo.name;
+                                app.adjTarget = s.name;
                             }
                             if ((cr.flags&Context.BIND_NOT_FOREGROUND) == 0) {
                                 if (client.curSchedGroup == Process.THREAD_GROUP_DEFAULT) {
@@ -13973,7 +10984,7 @@
                                 }
                             }
                         }
-                        HistoryRecord a = cr.activity;
+                        ActivityRecord a = cr.activity;
                         //if (a != null) {
                         //    Slog.i(TAG, "Connection to " + a ": state=" + a.state);
                         //}
@@ -13987,7 +10998,7 @@
                             app.adjTypeCode = ActivityManager.RunningAppProcessInfo
                                     .REASON_SERVICE_IN_USE;
                             app.adjSource = a;
-                            app.adjTarget = s.serviceInfo.name;
+                            app.adjTarget = s.name;
                         }
                     }
                 }
@@ -14007,10 +11018,10 @@
 
         if (app.pubProviders.size() != 0 && (adj > FOREGROUND_APP_ADJ
                 || schedGroup == Process.THREAD_GROUP_BG_NONINTERACTIVE)) {
-            Iterator jt = app.pubProviders.values().iterator();
+            Iterator<ContentProviderRecord> jt = app.pubProviders.values().iterator();
             while (jt.hasNext() && (adj > FOREGROUND_APP_ADJ
                     || schedGroup == Process.THREAD_GROUP_BG_NONINTERACTIVE)) {
-                ContentProviderRecord cpr = (ContentProviderRecord)jt.next();
+                ContentProviderRecord cpr = jt.next();
                 if (cpr.clients.size() != 0) {
                     Iterator<ProcessRecord> kt = cpr.clients.iterator();
                     while (kt.hasNext() && adj > FOREGROUND_APP_ADJ) {
@@ -14039,7 +11050,7 @@
                             app.adjTypeCode = ActivityManager.RunningAppProcessInfo
                                     .REASON_PROVIDER_IN_USE;
                             app.adjSource = client;
-                            app.adjTarget = cpr.info.name;
+                            app.adjTarget = cpr.name;
                         }
                         if (client.curSchedGroup == Process.THREAD_GROUP_DEFAULT) {
                             schedGroup = Process.THREAD_GROUP_DEFAULT;
@@ -14055,7 +11066,7 @@
                         schedGroup = Process.THREAD_GROUP_DEFAULT;
                         app.hidden = false;
                         app.adjType = "provider";
-                        app.adjTarget = cpr.info.name;
+                        app.adjTarget = cpr.name;
                     }
                 }
             }
@@ -14067,7 +11078,7 @@
         //      " adj=" + adj + " curAdj=" + app.curAdj + " maxAdj=" + app.maxAdj);
         if (adj > app.maxAdj) {
             adj = app.maxAdj;
-            if (app.maxAdj <= VISIBLE_APP_ADJ) {
+            if (app.maxAdj <= PERCEPTIBLE_APP_ADJ) {
                 schedGroup = Process.THREAD_GROUP_DEFAULT;
             }
         }
@@ -14103,8 +11114,8 @@
     private final boolean canGcNowLocked() {
         return mParallelBroadcasts.size() == 0
                 && mOrderedBroadcasts.size() == 0
-                && (mSleeping || (mResumedActivity != null &&
-                        mResumedActivity.idle));
+                && (mSleeping || (mMainStack.mResumedActivity != null &&
+                        mMainStack.mResumedActivity.idle));
     }
     
     /**
@@ -14119,7 +11130,7 @@
         if (canGcNowLocked()) {
             while (mProcessesToGc.size() > 0) {
                 ProcessRecord proc = mProcessesToGc.remove(0);
-                if (proc.curRawAdj > VISIBLE_APP_ADJ || proc.reportLowMemory) {
+                if (proc.curRawAdj > PERCEPTIBLE_APP_ADJ || proc.reportLowMemory) {
                     if ((proc.lastRequestedGc+GC_MIN_INTERVAL)
                             <= SystemClock.uptimeMillis()) {
                         // To avoid spamming the system, we will GC processes one
@@ -14274,19 +11285,19 @@
         return true;
     }
 
-    private final HistoryRecord resumedAppLocked() {
-        HistoryRecord resumedActivity = mResumedActivity;
+    private final ActivityRecord resumedAppLocked() {
+        ActivityRecord resumedActivity = mMainStack.mResumedActivity;
         if (resumedActivity == null || resumedActivity.app == null) {
-            resumedActivity = mPausingActivity;
+            resumedActivity = mMainStack.mPausingActivity;
             if (resumedActivity == null || resumedActivity.app == null) {
-                resumedActivity = topRunningActivityLocked(null);
+                resumedActivity = mMainStack.topRunningActivityLocked(null);
             }
         }
         return resumedActivity;
     }
 
     private final boolean updateOomAdjLocked(ProcessRecord app) {
-        final HistoryRecord TOP_ACT = resumedAppLocked();
+        final ActivityRecord TOP_ACT = resumedAppLocked();
         final ProcessRecord TOP_APP = TOP_ACT != null ? TOP_ACT.app : null;
         int curAdj = app.curAdj;
         final boolean wasHidden = app.curAdj >= HIDDEN_APP_MIN_ADJ
@@ -14307,9 +11318,9 @@
         return res;
     }
 
-    private final boolean updateOomAdjLocked() {
+    final boolean updateOomAdjLocked() {
         boolean didOomAdj = true;
-        final HistoryRecord TOP_ACT = resumedAppLocked();
+        final ActivityRecord TOP_ACT = resumedAppLocked();
         final ProcessRecord TOP_APP = TOP_ACT != null ? TOP_ACT.app : null;
 
         if (false) {
@@ -14371,7 +11382,7 @@
         return ENFORCE_PROCESS_LIMIT || mProcessLimit > 0 ? false : didOomAdj;
     }
 
-    private final void trimApplications() {
+    final void trimApplications() {
         synchronized (this) {
             int i;
 
@@ -14491,7 +11502,7 @@
                     if (Config.LOGV) Slog.v(
                         TAG, "Looking to quit " + app.processName);
                     for (j=0; j<NUMA && canQuit; j++) {
-                        HistoryRecord r = (HistoryRecord)app.activities.get(j);
+                        ActivityRecord r = app.activities.get(j);
                         if (Config.LOGV) Slog.v(
                             TAG, "  " + r.intent.getComponent().flattenToShortString()
                             + ": frozen=" + r.haveState + ", visible=" + r.visible);
@@ -14501,9 +11512,9 @@
                     if (canQuit) {
                         // Finish all of the activities, and then the app itself.
                         for (j=0; j<NUMA; j++) {
-                            HistoryRecord r = (HistoryRecord)app.activities.get(j);
+                            ActivityRecord r = app.activities.get(j);
                             if (!r.finishing) {
-                                destroyActivityLocked(r, false);
+                                r.stack.destroyActivityLocked(r, false);
                             }
                             r.resultTo = null;
                         }
@@ -14540,25 +11551,25 @@
             // Finally, if there are too many activities now running, try to
             // finish as many as we can to get back down to the limit.
             for (   i=0;
-                    i<mLRUActivities.size()
-                        && mLRUActivities.size() > curMaxActivities;
+                    i<mMainStack.mLRUActivities.size()
+                        && mMainStack.mLRUActivities.size() > curMaxActivities;
                     i++) {
-                final HistoryRecord r
-                    = (HistoryRecord)mLRUActivities.get(i);
+                final ActivityRecord r
+                    = (ActivityRecord)mMainStack.mLRUActivities.get(i);
 
                 // We can finish this one if we have its icicle saved and
                 // it is not persistent.
                 if ((r.haveState || !r.stateNotNeeded) && !r.visible
                         && r.stopped && !r.persistent && !r.finishing) {
-                    final int origSize = mLRUActivities.size();
-                    destroyActivityLocked(r, true);
+                    final int origSize = mMainStack.mLRUActivities.size();
+                    r.stack.destroyActivityLocked(r, true);
 
                     // This will remove it from the LRU list, so keep
                     // our index at the same value.  Note that this check to
                     // see if the size changes is just paranoia -- if
                     // something unexpected happens, we don't want to end up
                     // in an infinite loop.
-                    if (origSize > mLRUActivities.size()) {
+                    if (origSize > mMainStack.mLRUActivities.size()) {
                         i--;
                     }
                 }
diff --git a/services/java/com/android/server/am/ActivityRecord.java b/services/java/com/android/server/am/ActivityRecord.java
new file mode 100644
index 0000000..79756a7
--- /dev/null
+++ b/services/java/com/android/server/am/ActivityRecord.java
@@ -0,0 +1,585 @@
+/*
+ * Copyright (C) 2006 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.android.server.am;
+
+import com.android.server.AttributeCache;
+import com.android.server.am.ActivityStack.ActivityState;
+
+import android.app.Activity;
+import android.content.ComponentName;
+import android.content.Intent;
+import android.content.pm.ActivityInfo;
+import android.content.pm.ApplicationInfo;
+import android.content.res.Configuration;
+import android.graphics.Bitmap;
+import android.os.Bundle;
+import android.os.Message;
+import android.os.Process;
+import android.os.SystemClock;
+import android.util.EventLog;
+import android.util.Log;
+import android.util.Slog;
+import android.view.IApplicationToken;
+
+import java.io.PrintWriter;
+import java.lang.ref.WeakReference;
+import java.util.ArrayList;
+import java.util.HashSet;
+
+/**
+ * An entry in the history stack, representing an activity.
+ */
+class ActivityRecord extends IApplicationToken.Stub {
+    final ActivityManagerService service; // owner
+    final ActivityStack stack; // owner
+    final ActivityInfo info; // all about me
+    final int launchedFromUid; // always the uid who started the activity.
+    final Intent intent;    // the original intent that generated us
+    final ComponentName realActivity;  // the intent component, or target of an alias.
+    final String shortComponentName; // the short component name of the intent
+    final String resolvedType; // as per original caller;
+    final String packageName; // the package implementing intent's component
+    final String processName; // process where this component wants to run
+    final String taskAffinity; // as per ActivityInfo.taskAffinity
+    final boolean stateNotNeeded; // As per ActivityInfo.flags
+    final boolean fullscreen;     // covers the full screen?
+    final boolean componentSpecified;  // did caller specifiy an explicit component?
+    final boolean isHomeActivity; // do we consider this to be a home activity?
+    final String baseDir;   // where activity source (resources etc) located
+    final String resDir;   // where public activity source (public resources etc) located
+    final String dataDir;   // where activity data should go
+    CharSequence nonLocalizedLabel;  // the label information from the package mgr.
+    int labelRes;           // the label information from the package mgr.
+    int icon;               // resource identifier of activity's icon.
+    int theme;              // resource identifier of activity's theme.
+    TaskRecord task;        // the task this is in.
+    long startTime;         // when we starting launching this activity
+    long cpuTimeAtResume;   // the cpu time of host process at the time of resuming activity
+    Configuration configuration; // configuration activity was last running in
+    ActivityRecord resultTo; // who started this entry, so will get our reply
+    final String resultWho; // additional identifier for use by resultTo.
+    final int requestCode;  // code given by requester (resultTo)
+    ArrayList results;      // pending ActivityResult objs we have received
+    HashSet<WeakReference<PendingIntentRecord>> pendingResults; // all pending intents for this act
+    ArrayList newIntents;   // any pending new intents for single-top mode
+    HashSet<ConnectionRecord> connections; // All ConnectionRecord we hold
+    HashSet<UriPermission> readUriPermissions; // special access to reading uris.
+    HashSet<UriPermission> writeUriPermissions; // special access to writing uris.
+    ProcessRecord app;  // if non-null, hosting application
+    Bitmap thumbnail;       // icon representation of paused screen
+    CharSequence description; // textual description of paused screen
+    ActivityState state;    // current state we are in
+    Bundle  icicle;         // last saved activity state
+    boolean frontOfTask;    // is this the root activity of its task?
+    boolean launchFailed;   // set if a launched failed, to abort on 2nd try
+    boolean haveState;      // have we gotten the last activity state?
+    boolean stopped;        // is activity pause finished?
+    boolean delayedResume;  // not yet resumed because of stopped app switches?
+    boolean finishing;      // activity in pending finish list?
+    boolean configDestroy;  // need to destroy due to config change?
+    int configChangeFlags;  // which config values have changed
+    boolean keysPaused;     // has key dispatching been paused for it?
+    boolean inHistory;      // are we in the history stack?
+    boolean persistent;     // requested to be persistent?
+    int launchMode;         // the launch mode activity attribute.
+    boolean visible;        // does this activity's window need to be shown?
+    boolean waitingVisible; // true if waiting for a new act to become vis
+    boolean nowVisible;     // is this activity's window visible?
+    boolean thumbnailNeeded;// has someone requested a thumbnail?
+    boolean idle;           // has the activity gone idle?
+    boolean hasBeenLaunched;// has this activity ever been launched?
+    boolean frozenBeforeDestroy;// has been frozen but not yet destroyed.
+    boolean immersive;      // immersive mode (don't interrupt if possible)
+
+    String stringName;      // for caching of toString().
+    
+    void dump(PrintWriter pw, String prefix) {
+        pw.print(prefix); pw.print("packageName="); pw.print(packageName);
+                pw.print(" processName="); pw.println(processName);
+        pw.print(prefix); pw.print("launchedFromUid="); pw.print(launchedFromUid);
+                pw.print(" app="); pw.println(app);
+        pw.print(prefix); pw.println(intent);
+        pw.print(prefix); pw.print("frontOfTask="); pw.print(frontOfTask);
+                pw.print(" task="); pw.println(task);
+        pw.print(prefix); pw.print("taskAffinity="); pw.println(taskAffinity);
+        pw.print(prefix); pw.print("realActivity=");
+                pw.println(realActivity.flattenToShortString());
+        pw.print(prefix); pw.print("base="); pw.print(baseDir);
+                if (!resDir.equals(baseDir)) pw.print(" res="); pw.print(resDir);
+                pw.print(" data="); pw.println(dataDir);
+        pw.print(prefix); pw.print("labelRes=0x");
+                pw.print(Integer.toHexString(labelRes));
+                pw.print(" icon=0x"); pw.print(Integer.toHexString(icon));
+                pw.print(" theme=0x"); pw.println(Integer.toHexString(theme));
+        pw.print(prefix); pw.print("stateNotNeeded="); pw.print(stateNotNeeded);
+                pw.print(" componentSpecified="); pw.print(componentSpecified);
+                pw.print(" isHomeActivity="); pw.println(isHomeActivity);
+        pw.print(prefix); pw.print("configuration="); pw.println(configuration);
+        if (resultTo != null || resultWho != null) {
+            pw.print(prefix); pw.print("resultTo="); pw.print(resultTo);
+                    pw.print(" resultWho="); pw.print(resultWho);
+                    pw.print(" resultCode="); pw.println(requestCode);
+        }
+        if (results != null) {
+            pw.print(prefix); pw.print("results="); pw.println(results);
+        }
+        if (pendingResults != null) {
+            pw.print(prefix); pw.print("pendingResults="); pw.println(pendingResults);
+        }
+        if (readUriPermissions != null) {
+            pw.print(prefix); pw.print("readUriPermissions="); pw.println(readUriPermissions);
+        }
+        if (writeUriPermissions != null) {
+            pw.print(prefix); pw.print("writeUriPermissions="); pw.println(writeUriPermissions);
+        }
+        pw.print(prefix); pw.print("launchFailed="); pw.print(launchFailed);
+                pw.print(" haveState="); pw.print(haveState);
+                pw.print(" icicle="); pw.println(icicle);
+        pw.print(prefix); pw.print("state="); pw.print(state);
+                pw.print(" stopped="); pw.print(stopped);
+                pw.print(" delayedResume="); pw.print(delayedResume);
+                pw.print(" finishing="); pw.println(finishing);
+        pw.print(prefix); pw.print("keysPaused="); pw.print(keysPaused);
+                pw.print(" inHistory="); pw.print(inHistory);
+                pw.print(" persistent="); pw.print(persistent);
+                pw.print(" immersive="); pw.print(immersive);
+                pw.print(" launchMode="); pw.println(launchMode);
+        pw.print(prefix); pw.print("fullscreen="); pw.print(fullscreen);
+                pw.print(" visible="); pw.print(visible);
+                pw.print(" frozenBeforeDestroy="); pw.print(frozenBeforeDestroy);
+                pw.print(" thumbnailNeeded="); pw.print(thumbnailNeeded);
+                pw.print(" idle="); pw.println(idle);
+        if (waitingVisible || nowVisible) {
+            pw.print(prefix); pw.print("waitingVisible="); pw.print(waitingVisible);
+                    pw.print(" nowVisible="); pw.println(nowVisible);
+        }
+        if (configDestroy || configChangeFlags != 0) {
+            pw.print(prefix); pw.print("configDestroy="); pw.print(configDestroy);
+                    pw.print(" configChangeFlags=");
+                    pw.println(Integer.toHexString(configChangeFlags));
+        }
+        if (connections != null) {
+            pw.print(prefix); pw.print("connections="); pw.println(connections);
+        }
+    }
+
+    ActivityRecord(ActivityManagerService _service, ActivityStack _stack, ProcessRecord _caller,
+            int _launchedFromUid, Intent _intent, String _resolvedType,
+            ActivityInfo aInfo, Configuration _configuration,
+            ActivityRecord _resultTo, String _resultWho, int _reqCode,
+            boolean _componentSpecified) {
+        service = _service;
+        stack = _stack;
+        info = aInfo;
+        launchedFromUid = _launchedFromUid;
+        intent = _intent;
+        shortComponentName = _intent.getComponent().flattenToShortString();
+        resolvedType = _resolvedType;
+        componentSpecified = _componentSpecified;
+        configuration = _configuration;
+        resultTo = _resultTo;
+        resultWho = _resultWho;
+        requestCode = _reqCode;
+        state = ActivityState.INITIALIZING;
+        frontOfTask = false;
+        launchFailed = false;
+        haveState = false;
+        stopped = false;
+        delayedResume = false;
+        finishing = false;
+        configDestroy = false;
+        keysPaused = false;
+        inHistory = false;
+        persistent = false;
+        visible = true;
+        waitingVisible = false;
+        nowVisible = false;
+        thumbnailNeeded = false;
+        idle = false;
+        hasBeenLaunched = false;
+
+        if (aInfo != null) {
+            if (aInfo.targetActivity == null
+                    || aInfo.launchMode == ActivityInfo.LAUNCH_MULTIPLE
+                    || aInfo.launchMode == ActivityInfo.LAUNCH_SINGLE_TOP) {
+                realActivity = _intent.getComponent();
+            } else {
+                realActivity = new ComponentName(aInfo.packageName,
+                        aInfo.targetActivity);
+            }
+            taskAffinity = aInfo.taskAffinity;
+            stateNotNeeded = (aInfo.flags&
+                    ActivityInfo.FLAG_STATE_NOT_NEEDED) != 0;
+            baseDir = aInfo.applicationInfo.sourceDir;
+            resDir = aInfo.applicationInfo.publicSourceDir;
+            dataDir = aInfo.applicationInfo.dataDir;
+            nonLocalizedLabel = aInfo.nonLocalizedLabel;
+            labelRes = aInfo.labelRes;
+            if (nonLocalizedLabel == null && labelRes == 0) {
+                ApplicationInfo app = aInfo.applicationInfo;
+                nonLocalizedLabel = app.nonLocalizedLabel;
+                labelRes = app.labelRes;
+            }
+            icon = aInfo.getIconResource();
+            theme = aInfo.getThemeResource();
+            if ((aInfo.flags&ActivityInfo.FLAG_MULTIPROCESS) != 0
+                    && _caller != null
+                    && (aInfo.applicationInfo.uid == Process.SYSTEM_UID
+                            || aInfo.applicationInfo.uid == _caller.info.uid)) {
+                processName = _caller.processName;
+            } else {
+                processName = aInfo.processName;
+            }
+
+            if (intent != null && (aInfo.flags & ActivityInfo.FLAG_EXCLUDE_FROM_RECENTS) != 0) {
+                intent.addFlags(Intent.FLAG_ACTIVITY_EXCLUDE_FROM_RECENTS);
+            }
+            
+            packageName = aInfo.applicationInfo.packageName;
+            launchMode = aInfo.launchMode;
+            
+            AttributeCache.Entry ent = AttributeCache.instance().get(packageName,
+                    theme != 0 ? theme : android.R.style.Theme,
+                    com.android.internal.R.styleable.Window);
+            fullscreen = ent != null && !ent.array.getBoolean(
+                    com.android.internal.R.styleable.Window_windowIsFloating, false)
+                    && !ent.array.getBoolean(
+                    com.android.internal.R.styleable.Window_windowIsTranslucent, false);
+            
+            if (!_componentSpecified || _launchedFromUid == Process.myUid()
+                    || _launchedFromUid == 0) {
+                // If we know the system has determined the component, then
+                // we can consider this to be a home activity...
+                if (Intent.ACTION_MAIN.equals(_intent.getAction()) &&
+                        _intent.hasCategory(Intent.CATEGORY_HOME) &&
+                        _intent.getCategories().size() == 1 &&
+                        _intent.getData() == null &&
+                        _intent.getType() == null &&
+                        (intent.getFlags()&Intent.FLAG_ACTIVITY_NEW_TASK) != 0 &&
+                        !"android".equals(realActivity.getClassName())) {
+                    // This sure looks like a home activity!
+                    // Note the last check is so we don't count the resolver
+                    // activity as being home...  really, we don't care about
+                    // doing anything special with something that comes from
+                    // the core framework package.
+                    isHomeActivity = true;
+                } else {
+                    isHomeActivity = false;
+                }
+            } else {
+                isHomeActivity = false;
+            }
+
+            immersive = (aInfo.flags & ActivityInfo.FLAG_IMMERSIVE) != 0;
+        } else {
+            realActivity = null;
+            taskAffinity = null;
+            stateNotNeeded = false;
+            baseDir = null;
+            resDir = null;
+            dataDir = null;
+            processName = null;
+            packageName = null;
+            fullscreen = true;
+            isHomeActivity = false;
+            immersive = false;
+        }
+    }
+
+    void addResultLocked(ActivityRecord from, String resultWho,
+            int requestCode, int resultCode,
+            Intent resultData) {
+        ActivityResult r = new ActivityResult(from, resultWho,
+        		requestCode, resultCode, resultData);
+        if (results == null) {
+            results = new ArrayList();
+        }
+        results.add(r);
+    }
+
+    void removeResultsLocked(ActivityRecord from, String resultWho,
+            int requestCode) {
+        if (results != null) {
+            for (int i=results.size()-1; i>=0; i--) {
+                ActivityResult r = (ActivityResult)results.get(i);
+                if (r.mFrom != from) continue;
+                if (r.mResultWho == null) {
+                    if (resultWho != null) continue;
+                } else {
+                    if (!r.mResultWho.equals(resultWho)) continue;
+                }
+                if (r.mRequestCode != requestCode) continue;
+
+                results.remove(i);
+            }
+        }
+    }
+
+    void addNewIntentLocked(Intent intent) {
+        if (newIntents == null) {
+            newIntents = new ArrayList();
+        }
+        newIntents.add(intent);
+    }
+    
+    /**
+     * Deliver a new Intent to an existing activity, so that its onNewIntent()
+     * method will be called at the proper time.
+     */
+    final void deliverNewIntentLocked(Intent intent) {
+        boolean sent = false;
+        if (state == ActivityState.RESUMED
+                && app != null && app.thread != null) {
+            try {
+                ArrayList<Intent> ar = new ArrayList<Intent>();
+                ar.add(new Intent(intent));
+                app.thread.scheduleNewIntent(ar, this);
+                sent = true;
+            } catch (Exception e) {
+                Slog.w(ActivityManagerService.TAG,
+                        "Exception thrown sending new intent to " + this, e);
+            }
+        }
+        if (!sent) {
+            addNewIntentLocked(new Intent(intent));
+        }
+    }
+
+    void removeUriPermissionsLocked() {
+        if (readUriPermissions != null) {
+            for (UriPermission perm : readUriPermissions) {
+                perm.readActivities.remove(this);
+                if (perm.readActivities.size() == 0 && (perm.globalModeFlags
+                        &Intent.FLAG_GRANT_READ_URI_PERMISSION) == 0) {
+                    perm.modeFlags &= ~Intent.FLAG_GRANT_READ_URI_PERMISSION;
+                   service.removeUriPermissionIfNeededLocked(perm);
+                }
+            }
+        }
+        if (writeUriPermissions != null) {
+            for (UriPermission perm : writeUriPermissions) {
+                perm.writeActivities.remove(this);
+                if (perm.writeActivities.size() == 0 && (perm.globalModeFlags
+                        &Intent.FLAG_GRANT_WRITE_URI_PERMISSION) == 0) {
+                    perm.modeFlags &= ~Intent.FLAG_GRANT_WRITE_URI_PERMISSION;
+                    service.removeUriPermissionIfNeededLocked(perm);
+                }
+            }
+        }
+    }
+
+    void pauseKeyDispatchingLocked() {
+        if (!keysPaused) {
+            keysPaused = true;
+            service.mWindowManager.pauseKeyDispatching(this);
+        }
+    }
+
+    void resumeKeyDispatchingLocked() {
+        if (keysPaused) {
+            keysPaused = false;
+            service.mWindowManager.resumeKeyDispatching(this);
+        }
+    }
+
+    // IApplicationToken
+
+    public boolean mayFreezeScreenLocked(ProcessRecord app) {
+        // Only freeze the screen if this activity is currently attached to
+        // an application, and that application is not blocked or unresponding.
+        // In any other case, we can't count on getting the screen unfrozen,
+        // so it is best to leave as-is.
+        return app == null || (!app.crashing && !app.notResponding);
+    }
+    
+    public void startFreezingScreenLocked(ProcessRecord app, int configChanges) {
+        if (mayFreezeScreenLocked(app)) {
+            service.mWindowManager.startAppFreezingScreen(this, configChanges);
+        }
+    }
+    
+    public void stopFreezingScreenLocked(boolean force) {
+        if (force || frozenBeforeDestroy) {
+            frozenBeforeDestroy = false;
+            service.mWindowManager.stopAppFreezingScreen(this, force);
+        }
+    }
+    
+    public void windowsVisible() {
+        synchronized(service) {
+            if (startTime != 0) {
+                final long curTime = SystemClock.uptimeMillis();
+                final long thisTime = curTime - startTime;
+                final long totalTime = stack.mInitialStartTime != 0
+                        ? (curTime - stack.mInitialStartTime) : thisTime;
+                if (ActivityManagerService.SHOW_ACTIVITY_START_TIME) {
+                    EventLog.writeEvent(EventLogTags.ACTIVITY_LAUNCH_TIME,
+                            System.identityHashCode(this), shortComponentName,
+                            thisTime, totalTime);
+                    StringBuilder sb = service.mStringBuilder;
+                    sb.setLength(0);
+                    sb.append("Displayed activity ");
+                    sb.append(shortComponentName);
+                    sb.append(": ");
+                    sb.append(thisTime);
+                    sb.append(" ms (total ");
+                    sb.append(totalTime);
+                    sb.append(" ms)");
+                    Log.i(ActivityManagerService.TAG, sb.toString());
+                }
+                stack.reportActivityLaunchedLocked(false, this, thisTime, totalTime);
+                if (totalTime > 0) {
+                    service.mUsageStatsService.noteLaunchTime(realActivity, (int)totalTime);
+                }
+                startTime = 0;
+                stack.mInitialStartTime = 0;
+            }
+            stack.reportActivityVisibleLocked(this);
+            if (ActivityManagerService.DEBUG_SWITCH) Log.v(
+                    ActivityManagerService.TAG, "windowsVisible(): " + this);
+            if (!nowVisible) {
+                nowVisible = true;
+                if (!idle) {
+                    // Instead of doing the full stop routine here, let's just
+                    // hide any activities we now can, and let them stop when
+                    // the normal idle happens.
+                    stack.processStoppingActivitiesLocked(false);
+                } else {
+                    // If this activity was already idle, then we now need to
+                    // make sure we perform the full stop of any activities
+                    // that are waiting to do so.  This is because we won't
+                    // do that while they are still waiting for this one to
+                    // become visible.
+                    final int N = stack.mWaitingVisibleActivities.size();
+                    if (N > 0) {
+                        for (int i=0; i<N; i++) {
+                            ActivityRecord r = (ActivityRecord)
+                                stack.mWaitingVisibleActivities.get(i);
+                            r.waitingVisible = false;
+                            if (ActivityManagerService.DEBUG_SWITCH) Log.v(
+                                    ActivityManagerService.TAG,
+                                    "Was waiting for visible: " + r);
+                        }
+                        stack.mWaitingVisibleActivities.clear();
+                        Message msg = Message.obtain();
+                        msg.what = ActivityStack.IDLE_NOW_MSG;
+                        stack.mHandler.sendMessage(msg);
+                    }
+                }
+                service.scheduleAppGcsLocked();
+            }
+        }
+    }
+
+    public void windowsGone() {
+        if (ActivityManagerService.DEBUG_SWITCH) Log.v(
+                ActivityManagerService.TAG, "windowsGone(): " + this);
+        nowVisible = false;
+    }
+    
+    private ActivityRecord getWaitingHistoryRecordLocked() {
+        // First find the real culprit...  if we are waiting
+        // for another app to start, then we have paused dispatching
+        // for this activity.
+        ActivityRecord r = this;
+        if (r.waitingVisible) {
+            // Hmmm, who might we be waiting for?
+            r = stack.mResumedActivity;
+            if (r == null) {
+                r = stack.mPausingActivity;
+            }
+            // Both of those null?  Fall back to 'this' again
+            if (r == null) {
+                r = this;
+            }
+        }
+        
+        return r;
+    }
+
+    public boolean keyDispatchingTimedOut() {
+        ActivityRecord r;
+        ProcessRecord anrApp = null;
+        synchronized(service) {
+            r = getWaitingHistoryRecordLocked();
+            if (r != null && r.app != null) {
+                if (r.app.debugging) {
+                    return false;
+                }
+                
+                if (service.mDidDexOpt) {
+                    // Give more time since we were dexopting.
+                    service.mDidDexOpt = false;
+                    return false;
+                }
+                
+                if (r.app.instrumentationClass == null) { 
+                    anrApp = r.app;
+                } else {
+                    Bundle info = new Bundle();
+                    info.putString("shortMsg", "keyDispatchingTimedOut");
+                    info.putString("longMsg", "Timed out while dispatching key event");
+                    service.finishInstrumentationLocked(
+                            r.app, Activity.RESULT_CANCELED, info);
+                }
+            }
+        }
+        
+        if (anrApp != null) {
+            service.appNotResponding(anrApp, r, this,
+                    "keyDispatchingTimedOut");
+        }
+        
+        return true;
+    }
+    
+    /** Returns the key dispatching timeout for this application token. */
+    public long getKeyDispatchingTimeout() {
+        synchronized(service) {
+            ActivityRecord r = getWaitingHistoryRecordLocked();
+            if (r == null || r.app == null
+                    || r.app.instrumentationClass == null) {
+                return ActivityManagerService.KEY_DISPATCHING_TIMEOUT;
+            }
+            
+            return ActivityManagerService.INSTRUMENTATION_KEY_DISPATCHING_TIMEOUT;
+        }
+    }
+
+    /**
+     * This method will return true if the activity is either visible, is becoming visible, is
+     * currently pausing, or is resumed.
+     */
+    public boolean isInterestingToUserLocked() {
+        return visible || nowVisible || state == ActivityState.PAUSING || 
+                state == ActivityState.RESUMED;
+     }
+    
+    
+    public String toString() {
+        if (stringName != null) {
+            return stringName;
+        }
+        StringBuilder sb = new StringBuilder(128);
+        sb.append("HistoryRecord{");
+        sb.append(Integer.toHexString(System.identityHashCode(this)));
+        sb.append(' ');
+        sb.append(intent.getComponent().flattenToShortString());
+        sb.append('}');
+        return stringName = sb.toString();
+    }
+}
diff --git a/services/java/com/android/server/am/ActivityResult.java b/services/java/com/android/server/am/ActivityResult.java
index 3cc2725..12eba34 100644
--- a/services/java/com/android/server/am/ActivityResult.java
+++ b/services/java/com/android/server/am/ActivityResult.java
@@ -24,9 +24,9 @@
  * Pending result information to send back to an activity.
  */
 class ActivityResult extends ResultInfo {
-    final HistoryRecord mFrom;
+    final ActivityRecord mFrom;
     
-    public ActivityResult(HistoryRecord from, String resultWho,
+    public ActivityResult(ActivityRecord from, String resultWho,
             int requestCode, int resultCode, Intent data) {
         super(resultWho, requestCode, resultCode, data);
         mFrom = from;
diff --git a/services/java/com/android/server/am/ActivityStack.java b/services/java/com/android/server/am/ActivityStack.java
new file mode 100644
index 0000000..de7b15c
--- /dev/null
+++ b/services/java/com/android/server/am/ActivityStack.java
@@ -0,0 +1,3521 @@
+/*
+ * Copyright (C) 2010 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.android.server.am;
+
+import com.android.internal.app.HeavyWeightSwitcherActivity;
+import com.android.internal.os.BatteryStatsImpl;
+import com.android.server.am.ActivityManagerService.PendingActivityLaunch;
+
+import android.app.Activity;
+import android.app.AppGlobals;
+import android.app.IActivityManager;
+import static android.app.IActivityManager.START_CLASS_NOT_FOUND;
+import static android.app.IActivityManager.START_DELIVERED_TO_TOP;
+import static android.app.IActivityManager.START_FORWARD_AND_REQUEST_CONFLICT;
+import static android.app.IActivityManager.START_INTENT_NOT_RESOLVED;
+import static android.app.IActivityManager.START_PERMISSION_DENIED;
+import static android.app.IActivityManager.START_RETURN_INTENT_TO_CALLER;
+import static android.app.IActivityManager.START_SUCCESS;
+import static android.app.IActivityManager.START_SWITCHES_CANCELED;
+import static android.app.IActivityManager.START_TASK_TO_FRONT;
+import android.app.IApplicationThread;
+import android.app.PendingIntent;
+import android.app.ResultInfo;
+import android.app.IActivityManager.WaitResult;
+import android.content.ComponentName;
+import android.content.Context;
+import android.content.IIntentSender;
+import android.content.Intent;
+import android.content.IntentSender;
+import android.content.pm.ActivityInfo;
+import android.content.pm.ApplicationInfo;
+import android.content.pm.PackageManager;
+import android.content.pm.ResolveInfo;
+import android.content.res.Configuration;
+import android.net.Uri;
+import android.os.Binder;
+import android.os.Bundle;
+import android.os.Handler;
+import android.os.IBinder;
+import android.os.Message;
+import android.os.PowerManager;
+import android.os.RemoteException;
+import android.os.SystemClock;
+import android.util.EventLog;
+import android.util.Log;
+import android.util.Slog;
+import android.view.WindowManagerPolicy;
+
+import java.lang.ref.WeakReference;
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+
+/**
+ * State and management of a single stack of activities.
+ */
+public class ActivityStack {
+    static final String TAG = ActivityManagerService.TAG;
+    static final boolean localLOGV = ActivityManagerService.localLOGV;
+    static final boolean DEBUG_SWITCH = ActivityManagerService.DEBUG_SWITCH;
+    static final boolean DEBUG_PAUSE = ActivityManagerService.DEBUG_PAUSE;
+    static final boolean DEBUG_VISBILITY = ActivityManagerService.DEBUG_VISBILITY;
+    static final boolean DEBUG_USER_LEAVING = ActivityManagerService.DEBUG_USER_LEAVING;
+    static final boolean DEBUG_TRANSITION = ActivityManagerService.DEBUG_TRANSITION;
+    static final boolean DEBUG_RESULTS = ActivityManagerService.DEBUG_RESULTS;
+    static final boolean DEBUG_CONFIGURATION = ActivityManagerService.DEBUG_CONFIGURATION;
+    static final boolean DEBUG_TASKS = ActivityManagerService.DEBUG_TASKS;
+    
+    static final boolean VALIDATE_TOKENS = ActivityManagerService.VALIDATE_TOKENS;
+    
+    // How long we wait until giving up on the last activity telling us it
+    // is idle.
+    static final int IDLE_TIMEOUT = 10*1000;
+    
+    // How long we wait until giving up on the last activity to pause.  This
+    // is short because it directly impacts the responsiveness of starting the
+    // next activity.
+    static final int PAUSE_TIMEOUT = 500;
+
+    // How long we can hold the launch wake lock before giving up.
+    static final int LAUNCH_TIMEOUT = 10*1000;
+
+    // How long we wait until giving up on an activity telling us it has
+    // finished destroying itself.
+    static final int DESTROY_TIMEOUT = 10*1000;
+    
+    // How long until we reset a task when the user returns to it.  Currently
+    // 30 minutes.
+    static final long ACTIVITY_INACTIVE_RESET_TIME = 1000*60*30;
+    
+    // Set to false to disable the preview that is shown while a new activity
+    // is being started.
+    static final boolean SHOW_APP_STARTING_PREVIEW = true;
+    
+    enum ActivityState {
+        INITIALIZING,
+        RESUMED,
+        PAUSING,
+        PAUSED,
+        STOPPING,
+        STOPPED,
+        FINISHING,
+        DESTROYING,
+        DESTROYED
+    }
+
+    final ActivityManagerService mService;
+    final boolean mMainStack;
+    
+    final Context mContext;
+    
+    /**
+     * The back history of all previous (and possibly still
+     * running) activities.  It contains HistoryRecord objects.
+     */
+    final ArrayList mHistory = new ArrayList();
+    
+    /**
+     * List of running activities, sorted by recent usage.
+     * The first entry in the list is the least recently used.
+     * It contains HistoryRecord objects.
+     */
+    final ArrayList mLRUActivities = new ArrayList();
+
+    /**
+     * List of activities that are waiting for a new activity
+     * to become visible before completing whatever operation they are
+     * supposed to do.
+     */
+    final ArrayList<ActivityRecord> mWaitingVisibleActivities
+            = new ArrayList<ActivityRecord>();
+
+    /**
+     * List of activities that are ready to be stopped, but waiting
+     * for the next activity to settle down before doing so.  It contains
+     * HistoryRecord objects.
+     */
+    final ArrayList<ActivityRecord> mStoppingActivities
+            = new ArrayList<ActivityRecord>();
+
+    /**
+     * Animations that for the current transition have requested not to
+     * be considered for the transition animation.
+     */
+    final ArrayList<ActivityRecord> mNoAnimActivities
+            = new ArrayList<ActivityRecord>();
+
+    /**
+     * List of activities that are ready to be finished, but waiting
+     * for the previous activity to settle down before doing so.  It contains
+     * HistoryRecord objects.
+     */
+    final ArrayList<ActivityRecord> mFinishingActivities
+            = new ArrayList<ActivityRecord>();
+    
+    /**
+     * List of people waiting to find out about the next launched activity.
+     */
+    final ArrayList<IActivityManager.WaitResult> mWaitingActivityLaunched
+            = new ArrayList<IActivityManager.WaitResult>();
+    
+    /**
+     * List of people waiting to find out about the next visible activity.
+     */
+    final ArrayList<IActivityManager.WaitResult> mWaitingActivityVisible
+            = new ArrayList<IActivityManager.WaitResult>();
+    
+    /**
+     * Set when the system is going to sleep, until we have
+     * successfully paused the current activity and released our wake lock.
+     * At that point the system is allowed to actually sleep.
+     */
+    final PowerManager.WakeLock mGoingToSleep;
+
+    /**
+     * We don't want to allow the device to go to sleep while in the process
+     * of launching an activity.  This is primarily to allow alarm intent
+     * receivers to launch an activity and get that to run before the device
+     * goes back to sleep.
+     */
+    final PowerManager.WakeLock mLaunchingActivity;
+
+    /**
+     * When we are in the process of pausing an activity, before starting the
+     * next one, this variable holds the activity that is currently being paused.
+     */
+    ActivityRecord mPausingActivity = null;
+
+    /**
+     * This is the last activity that we put into the paused state.  This is
+     * used to determine if we need to do an activity transition while sleeping,
+     * when we normally hold the top activity paused.
+     */
+    ActivityRecord mLastPausedActivity = null;
+
+    /**
+     * Current activity that is resumed, or null if there is none.
+     */
+    ActivityRecord mResumedActivity = null;
+    
+    /**
+     * Set when we know we are going to be calling updateConfiguration()
+     * soon, so want to skip intermediate config checks.
+     */
+    boolean mConfigWillChange;
+
+    /**
+     * Set to indicate whether to issue an onUserLeaving callback when a
+     * newly launched activity is being brought in front of us.
+     */
+    boolean mUserLeaving = false;
+    
+    long mInitialStartTime = 0;
+    
+    static final int PAUSE_TIMEOUT_MSG = 9;
+    static final int IDLE_TIMEOUT_MSG = 10;
+    static final int IDLE_NOW_MSG = 11;
+    static final int LAUNCH_TIMEOUT_MSG = 16;
+    static final int DESTROY_TIMEOUT_MSG = 17;
+    static final int RESUME_TOP_ACTIVITY_MSG = 19;
+    
+    final Handler mHandler = new Handler() {
+        //public Handler() {
+        //    if (localLOGV) Slog.v(TAG, "Handler started!");
+        //}
+
+        public void handleMessage(Message msg) {
+            switch (msg.what) {
+                case PAUSE_TIMEOUT_MSG: {
+                    IBinder token = (IBinder)msg.obj;
+                    // We don't at this point know if the activity is fullscreen,
+                    // so we need to be conservative and assume it isn't.
+                    Slog.w(TAG, "Activity pause timeout for " + token);
+                    activityPaused(token, null, true);
+                } break;
+                case IDLE_TIMEOUT_MSG: {
+                    if (mService.mDidDexOpt) {
+                        mService.mDidDexOpt = false;
+                        Message nmsg = mHandler.obtainMessage(IDLE_TIMEOUT_MSG);
+                        nmsg.obj = msg.obj;
+                        mHandler.sendMessageDelayed(nmsg, IDLE_TIMEOUT);
+                        return;
+                    }
+                    // We don't at this point know if the activity is fullscreen,
+                    // so we need to be conservative and assume it isn't.
+                    IBinder token = (IBinder)msg.obj;
+                    Slog.w(TAG, "Activity idle timeout for " + token);
+                    activityIdleInternal(token, true, null);
+                } break;
+                case DESTROY_TIMEOUT_MSG: {
+                    IBinder token = (IBinder)msg.obj;
+                    // We don't at this point know if the activity is fullscreen,
+                    // so we need to be conservative and assume it isn't.
+                    Slog.w(TAG, "Activity destroy timeout for " + token);
+                    activityDestroyed(token);
+                } break;
+                case IDLE_NOW_MSG: {
+                    IBinder token = (IBinder)msg.obj;
+                    activityIdleInternal(token, false, null);
+                } break;
+                case LAUNCH_TIMEOUT_MSG: {
+                    if (mService.mDidDexOpt) {
+                        mService.mDidDexOpt = false;
+                        Message nmsg = mHandler.obtainMessage(LAUNCH_TIMEOUT_MSG);
+                        mHandler.sendMessageDelayed(nmsg, LAUNCH_TIMEOUT);
+                        return;
+                    }
+                    synchronized (mService) {
+                        if (mLaunchingActivity.isHeld()) {
+                            Slog.w(TAG, "Launch timeout has expired, giving up wake lock!");
+                            mLaunchingActivity.release();
+                        }
+                    }
+                } break;
+                case RESUME_TOP_ACTIVITY_MSG: {
+                    synchronized (mService) {
+                        resumeTopActivityLocked(null);
+                    }
+                } break;
+            }
+        }
+    };
+    
+    ActivityStack(ActivityManagerService service, Context context, boolean mainStack) {
+        mService = service;
+        mContext = context;
+        mMainStack = mainStack;
+        PowerManager pm =
+            (PowerManager)context.getSystemService(Context.POWER_SERVICE);
+        mGoingToSleep = pm.newWakeLock(PowerManager.PARTIAL_WAKE_LOCK, "ActivityManager-Sleep");
+        mLaunchingActivity = pm.newWakeLock(PowerManager.PARTIAL_WAKE_LOCK, "ActivityManager-Launch");
+        mLaunchingActivity.setReferenceCounted(false);
+    }
+    
+    final ActivityRecord topRunningActivityLocked(ActivityRecord notTop) {
+        int i = mHistory.size()-1;
+        while (i >= 0) {
+            ActivityRecord r = (ActivityRecord)mHistory.get(i);
+            if (!r.finishing && r != notTop) {
+                return r;
+            }
+            i--;
+        }
+        return null;
+    }
+
+    final ActivityRecord topRunningNonDelayedActivityLocked(ActivityRecord notTop) {
+        int i = mHistory.size()-1;
+        while (i >= 0) {
+            ActivityRecord r = (ActivityRecord)mHistory.get(i);
+            if (!r.finishing && !r.delayedResume && r != notTop) {
+                return r;
+            }
+            i--;
+        }
+        return null;
+    }
+
+    /**
+     * This is a simplified version of topRunningActivityLocked that provides a number of
+     * optional skip-over modes.  It is intended for use with the ActivityController hook only.
+     * 
+     * @param token If non-null, any history records matching this token will be skipped.
+     * @param taskId If non-zero, we'll attempt to skip over records with the same task ID.
+     * 
+     * @return Returns the HistoryRecord of the next activity on the stack.
+     */
+    final ActivityRecord topRunningActivityLocked(IBinder token, int taskId) {
+        int i = mHistory.size()-1;
+        while (i >= 0) {
+            ActivityRecord r = (ActivityRecord)mHistory.get(i);
+            // Note: the taskId check depends on real taskId fields being non-zero
+            if (!r.finishing && (token != r) && (taskId != r.task.taskId)) {
+                return r;
+            }
+            i--;
+        }
+        return null;
+    }
+
+    final int indexOfTokenLocked(IBinder token) {
+        int count = mHistory.size();
+
+        // convert the token to an entry in the history.
+        int index = -1;
+        for (int i=count-1; i>=0; i--) {
+            Object o = mHistory.get(i);
+            if (o == token) {
+                index = i;
+                break;
+            }
+        }
+
+        return index;
+    }
+
+    private final boolean updateLRUListLocked(ActivityRecord r) {
+        final boolean hadit = mLRUActivities.remove(r);
+        mLRUActivities.add(r);
+        return hadit;
+    }
+
+    /**
+     * Returns the top activity in any existing task matching the given
+     * Intent.  Returns null if no such task is found.
+     */
+    private ActivityRecord findTaskLocked(Intent intent, ActivityInfo info) {
+        ComponentName cls = intent.getComponent();
+        if (info.targetActivity != null) {
+            cls = new ComponentName(info.packageName, info.targetActivity);
+        }
+
+        TaskRecord cp = null;
+
+        final int N = mHistory.size();
+        for (int i=(N-1); i>=0; i--) {
+            ActivityRecord r = (ActivityRecord)mHistory.get(i);
+            if (!r.finishing && r.task != cp
+                    && r.launchMode != ActivityInfo.LAUNCH_SINGLE_INSTANCE) {
+                cp = r.task;
+                //Slog.i(TAG, "Comparing existing cls=" + r.task.intent.getComponent().flattenToShortString()
+                //        + "/aff=" + r.task.affinity + " to new cls="
+                //        + intent.getComponent().flattenToShortString() + "/aff=" + taskAffinity);
+                if (r.task.affinity != null) {
+                    if (r.task.affinity.equals(info.taskAffinity)) {
+                        //Slog.i(TAG, "Found matching affinity!");
+                        return r;
+                    }
+                } else if (r.task.intent != null
+                        && r.task.intent.getComponent().equals(cls)) {
+                    //Slog.i(TAG, "Found matching class!");
+                    //dump();
+                    //Slog.i(TAG, "For Intent " + intent + " bringing to top: " + r.intent);
+                    return r;
+                } else if (r.task.affinityIntent != null
+                        && r.task.affinityIntent.getComponent().equals(cls)) {
+                    //Slog.i(TAG, "Found matching class!");
+                    //dump();
+                    //Slog.i(TAG, "For Intent " + intent + " bringing to top: " + r.intent);
+                    return r;
+                }
+            }
+        }
+
+        return null;
+    }
+
+    /**
+     * Returns the first activity (starting from the top of the stack) that
+     * is the same as the given activity.  Returns null if no such activity
+     * is found.
+     */
+    private ActivityRecord findActivityLocked(Intent intent, ActivityInfo info) {
+        ComponentName cls = intent.getComponent();
+        if (info.targetActivity != null) {
+            cls = new ComponentName(info.packageName, info.targetActivity);
+        }
+
+        final int N = mHistory.size();
+        for (int i=(N-1); i>=0; i--) {
+            ActivityRecord r = (ActivityRecord)mHistory.get(i);
+            if (!r.finishing) {
+                if (r.intent.getComponent().equals(cls)) {
+                    //Slog.i(TAG, "Found matching class!");
+                    //dump();
+                    //Slog.i(TAG, "For Intent " + intent + " bringing to top: " + r.intent);
+                    return r;
+                }
+            }
+        }
+
+        return null;
+    }
+
+    final boolean realStartActivityLocked(ActivityRecord r,
+            ProcessRecord app, boolean andResume, boolean checkConfig)
+            throws RemoteException {
+
+        r.startFreezingScreenLocked(app, 0);
+        mService.mWindowManager.setAppVisibility(r, true);
+
+        // Have the window manager re-evaluate the orientation of
+        // the screen based on the new activity order.  Note that
+        // as a result of this, it can call back into the activity
+        // manager with a new orientation.  We don't care about that,
+        // because the activity is not currently running so we are
+        // just restarting it anyway.
+        if (checkConfig) {
+            Configuration config = mService.mWindowManager.updateOrientationFromAppTokens(
+                    mService.mConfiguration,
+                    r.mayFreezeScreenLocked(app) ? r : null);
+            mService.updateConfigurationLocked(config, r);
+        }
+
+        r.app = app;
+
+        if (localLOGV) Slog.v(TAG, "Launching: " + r);
+
+        int idx = app.activities.indexOf(r);
+        if (idx < 0) {
+            app.activities.add(r);
+        }
+        mService.updateLruProcessLocked(app, true, true);
+
+        try {
+            if (app.thread == null) {
+                throw new RemoteException();
+            }
+            List<ResultInfo> results = null;
+            List<Intent> newIntents = null;
+            if (andResume) {
+                results = r.results;
+                newIntents = r.newIntents;
+            }
+            if (DEBUG_SWITCH) Slog.v(TAG, "Launching: " + r
+                    + " icicle=" + r.icicle
+                    + " with results=" + results + " newIntents=" + newIntents
+                    + " andResume=" + andResume);
+            if (andResume) {
+                EventLog.writeEvent(EventLogTags.AM_RESTART_ACTIVITY,
+                        System.identityHashCode(r),
+                        r.task.taskId, r.shortComponentName);
+            }
+            if (r.isHomeActivity) {
+                mService.mHomeProcess = app;
+            }
+            mService.ensurePackageDexOpt(r.intent.getComponent().getPackageName());
+            app.thread.scheduleLaunchActivity(new Intent(r.intent), r,
+                    System.identityHashCode(r),
+                    r.info, r.icicle, results, newIntents, !andResume,
+                    mService.isNextTransitionForward());
+            
+            if ((app.info.flags&ApplicationInfo.FLAG_HEAVY_WEIGHT) != 0) {
+                // This may be a heavy-weight process!  Note that the package
+                // manager will ensure that only activity can run in the main
+                // process of the .apk, which is the only thing that will be
+                // considered heavy-weight.
+                if (app.processName.equals(app.info.packageName)) {
+                    if (mService.mHeavyWeightProcess != null
+                            && mService.mHeavyWeightProcess != app) {
+                        Log.w(TAG, "Starting new heavy weight process " + app
+                                + " when already running "
+                                + mService.mHeavyWeightProcess);
+                    }
+                    mService.mHeavyWeightProcess = app;
+                    Message msg = mService.mHandler.obtainMessage(
+                            ActivityManagerService.POST_HEAVY_NOTIFICATION_MSG);
+                    msg.obj = r;
+                    mService.mHandler.sendMessage(msg);
+                }
+            }
+            
+        } catch (RemoteException e) {
+            if (r.launchFailed) {
+                // This is the second time we failed -- finish activity
+                // and give up.
+                Slog.e(TAG, "Second failure launching "
+                      + r.intent.getComponent().flattenToShortString()
+                      + ", giving up", e);
+                mService.appDiedLocked(app, app.pid, app.thread);
+                requestFinishActivityLocked(r, Activity.RESULT_CANCELED, null,
+                        "2nd-crash");
+                return false;
+            }
+
+            // This is the first time we failed -- restart process and
+            // retry.
+            app.activities.remove(r);
+            throw e;
+        }
+
+        r.launchFailed = false;
+        if (updateLRUListLocked(r)) {
+            Slog.w(TAG, "Activity " + r
+                  + " being launched, but already in LRU list");
+        }
+
+        if (andResume) {
+            // As part of the process of launching, ActivityThread also performs
+            // a resume.
+            r.state = ActivityState.RESUMED;
+            r.icicle = null;
+            r.haveState = false;
+            r.stopped = false;
+            mResumedActivity = r;
+            r.task.touchActiveTime();
+            completeResumeLocked(r);
+            pauseIfSleepingLocked();                
+        } else {
+            // This activity is not starting in the resumed state... which
+            // should look like we asked it to pause+stop (but remain visible),
+            // and it has done so and reported back the current icicle and
+            // other state.
+            r.state = ActivityState.STOPPED;
+            r.stopped = true;
+        }
+
+        // Launch the new version setup screen if needed.  We do this -after-
+        // launching the initial activity (that is, home), so that it can have
+        // a chance to initialize itself while in the background, making the
+        // switch back to it faster and look better.
+        if (mMainStack) {
+            mService.startSetupActivityLocked();
+        }
+        
+        return true;
+    }
+
+    private final void startSpecificActivityLocked(ActivityRecord r,
+            boolean andResume, boolean checkConfig) {
+        // Is this activity's application already running?
+        ProcessRecord app = mService.getProcessRecordLocked(r.processName,
+                r.info.applicationInfo.uid);
+        
+        if (r.startTime == 0) {
+            r.startTime = SystemClock.uptimeMillis();
+            if (mInitialStartTime == 0) {
+                mInitialStartTime = r.startTime;
+            }
+        } else if (mInitialStartTime == 0) {
+            mInitialStartTime = SystemClock.uptimeMillis();
+        }
+        
+        if (app != null && app.thread != null) {
+            try {
+                realStartActivityLocked(r, app, andResume, checkConfig);
+                return;
+            } catch (RemoteException e) {
+                Slog.w(TAG, "Exception when starting activity "
+                        + r.intent.getComponent().flattenToShortString(), e);
+            }
+
+            // If a dead object exception was thrown -- fall through to
+            // restart the application.
+        }
+
+        mService.startProcessLocked(r.processName, r.info.applicationInfo, true, 0,
+                "activity", r.intent.getComponent(), false);
+    }
+    
+    void pauseIfSleepingLocked() {
+        if (mService.mSleeping || mService.mShuttingDown) {
+            if (!mGoingToSleep.isHeld()) {
+                mGoingToSleep.acquire();
+                if (mLaunchingActivity.isHeld()) {
+                    mLaunchingActivity.release();
+                    mService.mHandler.removeMessages(LAUNCH_TIMEOUT_MSG);
+                }
+            }
+
+            // If we are not currently pausing an activity, get the current
+            // one to pause.  If we are pausing one, we will just let that stuff
+            // run and release the wake lock when all done.
+            if (mPausingActivity == null) {
+                if (DEBUG_PAUSE) Slog.v(TAG, "Sleep needs to pause...");
+                if (DEBUG_USER_LEAVING) Slog.v(TAG, "Sleep => pause with userLeaving=false");
+                startPausingLocked(false, true);
+            }
+        }
+    }
+    
+    private final void startPausingLocked(boolean userLeaving, boolean uiSleeping) {
+        if (mPausingActivity != null) {
+            RuntimeException e = new RuntimeException();
+            Slog.e(TAG, "Trying to pause when pause is already pending for "
+                  + mPausingActivity, e);
+        }
+        ActivityRecord prev = mResumedActivity;
+        if (prev == null) {
+            RuntimeException e = new RuntimeException();
+            Slog.e(TAG, "Trying to pause when nothing is resumed", e);
+            resumeTopActivityLocked(null);
+            return;
+        }
+        if (DEBUG_PAUSE) Slog.v(TAG, "Start pausing: " + prev);
+        mResumedActivity = null;
+        mPausingActivity = prev;
+        mLastPausedActivity = prev;
+        prev.state = ActivityState.PAUSING;
+        prev.task.touchActiveTime();
+
+        mService.updateCpuStats();
+        
+        if (prev.app != null && prev.app.thread != null) {
+            if (DEBUG_PAUSE) Slog.v(TAG, "Enqueueing pending pause: " + prev);
+            try {
+                EventLog.writeEvent(EventLogTags.AM_PAUSE_ACTIVITY,
+                        System.identityHashCode(prev),
+                        prev.shortComponentName);
+                prev.app.thread.schedulePauseActivity(prev, prev.finishing, userLeaving,
+                        prev.configChangeFlags);
+                if (mMainStack) {
+                    mService.updateUsageStats(prev, false);
+                }
+            } catch (Exception e) {
+                // Ignore exception, if process died other code will cleanup.
+                Slog.w(TAG, "Exception thrown during pause", e);
+                mPausingActivity = null;
+                mLastPausedActivity = null;
+            }
+        } else {
+            mPausingActivity = null;
+            mLastPausedActivity = null;
+        }
+
+        // If we are not going to sleep, we want to ensure the device is
+        // awake until the next activity is started.
+        if (!mService.mSleeping && !mService.mShuttingDown) {
+            mLaunchingActivity.acquire();
+            if (!mHandler.hasMessages(LAUNCH_TIMEOUT_MSG)) {
+                // To be safe, don't allow the wake lock to be held for too long.
+                Message msg = mHandler.obtainMessage(LAUNCH_TIMEOUT_MSG);
+                mHandler.sendMessageDelayed(msg, LAUNCH_TIMEOUT);
+            }
+        }
+
+
+        if (mPausingActivity != null) {
+            // Have the window manager pause its key dispatching until the new
+            // activity has started.  If we're pausing the activity just because
+            // the screen is being turned off and the UI is sleeping, don't interrupt
+            // key dispatch; the same activity will pick it up again on wakeup.
+            if (!uiSleeping) {
+                prev.pauseKeyDispatchingLocked();
+            } else {
+                if (DEBUG_PAUSE) Slog.v(TAG, "Key dispatch not paused for screen off");
+            }
+
+            // Schedule a pause timeout in case the app doesn't respond.
+            // We don't give it much time because this directly impacts the
+            // responsiveness seen by the user.
+            Message msg = mHandler.obtainMessage(PAUSE_TIMEOUT_MSG);
+            msg.obj = prev;
+            mHandler.sendMessageDelayed(msg, PAUSE_TIMEOUT);
+            if (DEBUG_PAUSE) Slog.v(TAG, "Waiting for pause to complete...");
+        } else {
+            // This activity failed to schedule the
+            // pause, so just treat it as being paused now.
+            if (DEBUG_PAUSE) Slog.v(TAG, "Activity not running, resuming next.");
+            resumeTopActivityLocked(null);
+        }
+    }
+    
+    final void activityPaused(IBinder token, Bundle icicle, boolean timeout) {
+        if (DEBUG_PAUSE) Slog.v(
+            TAG, "Activity paused: token=" + token + ", icicle=" + icicle
+            + ", timeout=" + timeout);
+
+        ActivityRecord r = null;
+
+        synchronized (mService) {
+            int index = indexOfTokenLocked(token);
+            if (index >= 0) {
+                r = (ActivityRecord)mHistory.get(index);
+                if (!timeout) {
+                    r.icicle = icicle;
+                    r.haveState = true;
+                }
+                mHandler.removeMessages(PAUSE_TIMEOUT_MSG, r);
+                if (mPausingActivity == r) {
+                    r.state = ActivityState.PAUSED;
+                    completePauseLocked();
+                } else {
+                    EventLog.writeEvent(EventLogTags.AM_FAILED_TO_PAUSE,
+                            System.identityHashCode(r), r.shortComponentName, 
+                            mPausingActivity != null
+                                ? mPausingActivity.shortComponentName : "(none)");
+                }
+            }
+        }
+    }
+
+    private final void completePauseLocked() {
+        ActivityRecord prev = mPausingActivity;
+        if (DEBUG_PAUSE) Slog.v(TAG, "Complete pause: " + prev);
+        
+        if (prev != null) {
+            if (prev.finishing) {
+                if (DEBUG_PAUSE) Slog.v(TAG, "Executing finish of activity: " + prev);
+                prev = finishCurrentActivityLocked(prev, FINISH_AFTER_VISIBLE);
+            } else if (prev.app != null) {
+                if (DEBUG_PAUSE) Slog.v(TAG, "Enqueueing pending stop: " + prev);
+                if (prev.waitingVisible) {
+                    prev.waitingVisible = false;
+                    mWaitingVisibleActivities.remove(prev);
+                    if (DEBUG_SWITCH || DEBUG_PAUSE) Slog.v(
+                            TAG, "Complete pause, no longer waiting: " + prev);
+                }
+                if (prev.configDestroy) {
+                    // The previous is being paused because the configuration
+                    // is changing, which means it is actually stopping...
+                    // To juggle the fact that we are also starting a new
+                    // instance right now, we need to first completely stop
+                    // the current instance before starting the new one.
+                    if (DEBUG_PAUSE) Slog.v(TAG, "Destroying after pause: " + prev);
+                    destroyActivityLocked(prev, true);
+                } else {
+                    mStoppingActivities.add(prev);
+                    if (mStoppingActivities.size() > 3) {
+                        // If we already have a few activities waiting to stop,
+                        // then give up on things going idle and start clearing
+                        // them out.
+                        if (DEBUG_PAUSE) Slog.v(TAG, "To many pending stops, forcing idle");
+                        Message msg = Message.obtain();
+                        msg.what = IDLE_NOW_MSG;
+                        mHandler.sendMessage(msg);
+                    }
+                }
+            } else {
+                if (DEBUG_PAUSE) Slog.v(TAG, "App died during pause, not stopping: " + prev);
+                prev = null;
+            }
+            mPausingActivity = null;
+        }
+
+        if (!mService.mSleeping && !mService.mShuttingDown) {
+            resumeTopActivityLocked(prev);
+        } else {
+            if (mGoingToSleep.isHeld()) {
+                mGoingToSleep.release();
+            }
+            if (mService.mShuttingDown) {
+                mService.notifyAll();
+            }
+        }
+        
+        if (prev != null) {
+            prev.resumeKeyDispatchingLocked();
+        }
+
+        if (prev.app != null && prev.cpuTimeAtResume > 0
+                && mService.mBatteryStatsService.isOnBattery()) {
+            long diff = 0;
+            synchronized (mService.mProcessStatsThread) {
+                diff = mService.mProcessStats.getCpuTimeForPid(prev.app.pid)
+                        - prev.cpuTimeAtResume;
+            }
+            if (diff > 0) {
+                BatteryStatsImpl bsi = mService.mBatteryStatsService.getActiveStatistics();
+                synchronized (bsi) {
+                    BatteryStatsImpl.Uid.Proc ps =
+                            bsi.getProcessStatsLocked(prev.info.applicationInfo.uid,
+                            prev.info.packageName);
+                    if (ps != null) {
+                        ps.addForegroundTimeLocked(diff);
+                    }
+                }
+            }
+        }
+        prev.cpuTimeAtResume = 0; // reset it
+    }
+
+    /**
+     * Once we know that we have asked an application to put an activity in
+     * the resumed state (either by launching it or explicitly telling it),
+     * this function updates the rest of our state to match that fact.
+     */
+    private final void completeResumeLocked(ActivityRecord next) {
+        next.idle = false;
+        next.results = null;
+        next.newIntents = null;
+
+        // schedule an idle timeout in case the app doesn't do it for us.
+        Message msg = mHandler.obtainMessage(IDLE_TIMEOUT_MSG);
+        msg.obj = next;
+        mHandler.sendMessageDelayed(msg, IDLE_TIMEOUT);
+
+        if (false) {
+            // The activity was never told to pause, so just keep
+            // things going as-is.  To maintain our own state,
+            // we need to emulate it coming back and saying it is
+            // idle.
+            msg = mHandler.obtainMessage(IDLE_NOW_MSG);
+            msg.obj = next;
+            mHandler.sendMessage(msg);
+        }
+
+        if (mMainStack) {
+            mService.reportResumedActivityLocked(next);
+        }
+        
+        next.thumbnail = null;
+        if (mMainStack) {
+            mService.setFocusedActivityLocked(next);
+        }
+        next.resumeKeyDispatchingLocked();
+        ensureActivitiesVisibleLocked(null, 0);
+        mService.mWindowManager.executeAppTransition();
+        mNoAnimActivities.clear();
+
+        // Mark the point when the activity is resuming
+        // TODO: To be more accurate, the mark should be before the onCreate,
+        //       not after the onResume. But for subsequent starts, onResume is fine.
+        if (next.app != null) {
+            synchronized (mService.mProcessStatsThread) {
+                next.cpuTimeAtResume = mService.mProcessStats.getCpuTimeForPid(next.app.pid);
+            }
+        } else {
+            next.cpuTimeAtResume = 0; // Couldn't get the cpu time of process
+        }
+    }
+
+    /**
+     * Make sure that all activities that need to be visible (that is, they
+     * currently can be seen by the user) actually are.
+     */
+    final void ensureActivitiesVisibleLocked(ActivityRecord top,
+            ActivityRecord starting, String onlyThisProcess, int configChanges) {
+        if (DEBUG_VISBILITY) Slog.v(
+                TAG, "ensureActivitiesVisible behind " + top
+                + " configChanges=0x" + Integer.toHexString(configChanges));
+
+        // If the top activity is not fullscreen, then we need to
+        // make sure any activities under it are now visible.
+        final int count = mHistory.size();
+        int i = count-1;
+        while (mHistory.get(i) != top) {
+            i--;
+        }
+        ActivityRecord r;
+        boolean behindFullscreen = false;
+        for (; i>=0; i--) {
+            r = (ActivityRecord)mHistory.get(i);
+            if (DEBUG_VISBILITY) Slog.v(
+                    TAG, "Make visible? " + r + " finishing=" + r.finishing
+                    + " state=" + r.state);
+            if (r.finishing) {
+                continue;
+            }
+            
+            final boolean doThisProcess = onlyThisProcess == null
+                    || onlyThisProcess.equals(r.processName);
+            
+            // First: if this is not the current activity being started, make
+            // sure it matches the current configuration.
+            if (r != starting && doThisProcess) {
+                ensureActivityConfigurationLocked(r, 0);
+            }
+            
+            if (r.app == null || r.app.thread == null) {
+                if (onlyThisProcess == null
+                        || onlyThisProcess.equals(r.processName)) {
+                    // This activity needs to be visible, but isn't even
+                    // running...  get it started, but don't resume it
+                    // at this point.
+                    if (DEBUG_VISBILITY) Slog.v(
+                            TAG, "Start and freeze screen for " + r);
+                    if (r != starting) {
+                        r.startFreezingScreenLocked(r.app, configChanges);
+                    }
+                    if (!r.visible) {
+                        if (DEBUG_VISBILITY) Slog.v(
+                                TAG, "Starting and making visible: " + r);
+                        mService.mWindowManager.setAppVisibility(r, true);
+                    }
+                    if (r != starting) {
+                        startSpecificActivityLocked(r, false, false);
+                    }
+                }
+
+            } else if (r.visible) {
+                // If this activity is already visible, then there is nothing
+                // else to do here.
+                if (DEBUG_VISBILITY) Slog.v(
+                        TAG, "Skipping: already visible at " + r);
+                r.stopFreezingScreenLocked(false);
+
+            } else if (onlyThisProcess == null) {
+                // This activity is not currently visible, but is running.
+                // Tell it to become visible.
+                r.visible = true;
+                if (r.state != ActivityState.RESUMED && r != starting) {
+                    // If this activity is paused, tell it
+                    // to now show its window.
+                    if (DEBUG_VISBILITY) Slog.v(
+                            TAG, "Making visible and scheduling visibility: " + r);
+                    try {
+                        mService.mWindowManager.setAppVisibility(r, true);
+                        r.app.thread.scheduleWindowVisibility(r, true);
+                        r.stopFreezingScreenLocked(false);
+                    } catch (Exception e) {
+                        // Just skip on any failure; we'll make it
+                        // visible when it next restarts.
+                        Slog.w(TAG, "Exception thrown making visibile: "
+                                + r.intent.getComponent(), e);
+                    }
+                }
+            }
+
+            // Aggregate current change flags.
+            configChanges |= r.configChangeFlags;
+
+            if (r.fullscreen) {
+                // At this point, nothing else needs to be shown
+                if (DEBUG_VISBILITY) Slog.v(
+                        TAG, "Stopping: fullscreen at " + r);
+                behindFullscreen = true;
+                i--;
+                break;
+            }
+        }
+
+        // Now for any activities that aren't visible to the user, make
+        // sure they no longer are keeping the screen frozen.
+        while (i >= 0) {
+            r = (ActivityRecord)mHistory.get(i);
+            if (DEBUG_VISBILITY) Slog.v(
+                    TAG, "Make invisible? " + r + " finishing=" + r.finishing
+                    + " state=" + r.state
+                    + " behindFullscreen=" + behindFullscreen);
+            if (!r.finishing) {
+                if (behindFullscreen) {
+                    if (r.visible) {
+                        if (DEBUG_VISBILITY) Slog.v(
+                                TAG, "Making invisible: " + r);
+                        r.visible = false;
+                        try {
+                            mService.mWindowManager.setAppVisibility(r, false);
+                            if ((r.state == ActivityState.STOPPING
+                                    || r.state == ActivityState.STOPPED)
+                                    && r.app != null && r.app.thread != null) {
+                                if (DEBUG_VISBILITY) Slog.v(
+                                        TAG, "Scheduling invisibility: " + r);
+                                r.app.thread.scheduleWindowVisibility(r, false);
+                            }
+                        } catch (Exception e) {
+                            // Just skip on any failure; we'll make it
+                            // visible when it next restarts.
+                            Slog.w(TAG, "Exception thrown making hidden: "
+                                    + r.intent.getComponent(), e);
+                        }
+                    } else {
+                        if (DEBUG_VISBILITY) Slog.v(
+                                TAG, "Already invisible: " + r);
+                    }
+                } else if (r.fullscreen) {
+                    if (DEBUG_VISBILITY) Slog.v(
+                            TAG, "Now behindFullscreen: " + r);
+                    behindFullscreen = true;
+                }
+            }
+            i--;
+        }
+    }
+
+    /**
+     * Version of ensureActivitiesVisible that can easily be called anywhere.
+     */
+    final void ensureActivitiesVisibleLocked(ActivityRecord starting,
+            int configChanges) {
+        ActivityRecord r = topRunningActivityLocked(null);
+        if (r != null) {
+            ensureActivitiesVisibleLocked(r, starting, null, configChanges);
+        }
+    }
+    
+    /**
+     * Ensure that the top activity in the stack is resumed.
+     *
+     * @param prev The previously resumed activity, for when in the process
+     * of pausing; can be null to call from elsewhere.
+     *
+     * @return Returns true if something is being resumed, or false if
+     * nothing happened.
+     */
+    final boolean resumeTopActivityLocked(ActivityRecord prev) {
+        // Find the first activity that is not finishing.
+        ActivityRecord next = topRunningActivityLocked(null);
+
+        // Remember how we'll process this pause/resume situation, and ensure
+        // that the state is reset however we wind up proceeding.
+        final boolean userLeaving = mUserLeaving;
+        mUserLeaving = false;
+
+        if (next == null) {
+            // There are no more activities!  Let's just start up the
+            // Launcher...
+            if (mMainStack) {
+                return mService.startHomeActivityLocked();
+            }
+        }
+
+        next.delayedResume = false;
+        
+        // If the top activity is the resumed one, nothing to do.
+        if (mResumedActivity == next && next.state == ActivityState.RESUMED) {
+            // Make sure we have executed any pending transitions, since there
+            // should be nothing left to do at this point.
+            mService.mWindowManager.executeAppTransition();
+            mNoAnimActivities.clear();
+            return false;
+        }
+
+        // If we are sleeping, and there is no resumed activity, and the top
+        // activity is paused, well that is the state we want.
+        if ((mService.mSleeping || mService.mShuttingDown)
+                && mLastPausedActivity == next && next.state == ActivityState.PAUSED) {
+            // Make sure we have executed any pending transitions, since there
+            // should be nothing left to do at this point.
+            mService.mWindowManager.executeAppTransition();
+            mNoAnimActivities.clear();
+            return false;
+        }
+        
+        // The activity may be waiting for stop, but that is no longer
+        // appropriate for it.
+        mStoppingActivities.remove(next);
+        mWaitingVisibleActivities.remove(next);
+
+        if (DEBUG_SWITCH) Slog.v(TAG, "Resuming " + next);
+
+        // If we are currently pausing an activity, then don't do anything
+        // until that is done.
+        if (mPausingActivity != null) {
+            if (DEBUG_SWITCH) Slog.v(TAG, "Skip resume: pausing=" + mPausingActivity);
+            return false;
+        }
+
+        // We need to start pausing the current activity so the top one
+        // can be resumed...
+        if (mResumedActivity != null) {
+            if (DEBUG_SWITCH) Slog.v(TAG, "Skip resume: need to start pausing");
+            startPausingLocked(userLeaving, false);
+            return true;
+        }
+
+        if (prev != null && prev != next) {
+            if (!prev.waitingVisible && next != null && !next.nowVisible) {
+                prev.waitingVisible = true;
+                mWaitingVisibleActivities.add(prev);
+                if (DEBUG_SWITCH) Slog.v(
+                        TAG, "Resuming top, waiting visible to hide: " + prev);
+            } else {
+                // The next activity is already visible, so hide the previous
+                // activity's windows right now so we can show the new one ASAP.
+                // We only do this if the previous is finishing, which should mean
+                // it is on top of the one being resumed so hiding it quickly
+                // is good.  Otherwise, we want to do the normal route of allowing
+                // the resumed activity to be shown so we can decide if the
+                // previous should actually be hidden depending on whether the
+                // new one is found to be full-screen or not.
+                if (prev.finishing) {
+                    mService.mWindowManager.setAppVisibility(prev, false);
+                    if (DEBUG_SWITCH) Slog.v(TAG, "Not waiting for visible to hide: "
+                            + prev + ", waitingVisible="
+                            + (prev != null ? prev.waitingVisible : null)
+                            + ", nowVisible=" + next.nowVisible);
+                } else {
+                    if (DEBUG_SWITCH) Slog.v(TAG, "Previous already visible but still waiting to hide: "
+                        + prev + ", waitingVisible="
+                        + (prev != null ? prev.waitingVisible : null)
+                        + ", nowVisible=" + next.nowVisible);
+                }
+            }
+        }
+
+        // We are starting up the next activity, so tell the window manager
+        // that the previous one will be hidden soon.  This way it can know
+        // to ignore it when computing the desired screen orientation.
+        if (prev != null) {
+            if (prev.finishing) {
+                if (DEBUG_TRANSITION) Slog.v(TAG,
+                        "Prepare close transition: prev=" + prev);
+                if (mNoAnimActivities.contains(prev)) {
+                    mService.mWindowManager.prepareAppTransition(WindowManagerPolicy.TRANSIT_NONE);
+                } else {
+                    mService.mWindowManager.prepareAppTransition(prev.task == next.task
+                            ? WindowManagerPolicy.TRANSIT_ACTIVITY_CLOSE
+                            : WindowManagerPolicy.TRANSIT_TASK_CLOSE);
+                }
+                mService.mWindowManager.setAppWillBeHidden(prev);
+                mService.mWindowManager.setAppVisibility(prev, false);
+            } else {
+                if (DEBUG_TRANSITION) Slog.v(TAG,
+                        "Prepare open transition: prev=" + prev);
+                if (mNoAnimActivities.contains(next)) {
+                    mService.mWindowManager.prepareAppTransition(WindowManagerPolicy.TRANSIT_NONE);
+                } else {
+                    mService.mWindowManager.prepareAppTransition(prev.task == next.task
+                            ? WindowManagerPolicy.TRANSIT_ACTIVITY_OPEN
+                            : WindowManagerPolicy.TRANSIT_TASK_OPEN);
+                }
+            }
+            if (false) {
+                mService.mWindowManager.setAppWillBeHidden(prev);
+                mService.mWindowManager.setAppVisibility(prev, false);
+            }
+        } else if (mHistory.size() > 1) {
+            if (DEBUG_TRANSITION) Slog.v(TAG,
+                    "Prepare open transition: no previous");
+            if (mNoAnimActivities.contains(next)) {
+                mService.mWindowManager.prepareAppTransition(WindowManagerPolicy.TRANSIT_NONE);
+            } else {
+                mService.mWindowManager.prepareAppTransition(WindowManagerPolicy.TRANSIT_ACTIVITY_OPEN);
+            }
+        }
+
+        if (next.app != null && next.app.thread != null) {
+            if (DEBUG_SWITCH) Slog.v(TAG, "Resume running: " + next);
+
+            // This activity is now becoming visible.
+            mService.mWindowManager.setAppVisibility(next, true);
+
+            ActivityRecord lastResumedActivity = mResumedActivity;
+            ActivityState lastState = next.state;
+
+            mService.updateCpuStats();
+            
+            next.state = ActivityState.RESUMED;
+            mResumedActivity = next;
+            next.task.touchActiveTime();
+            mService.updateLruProcessLocked(next.app, true, true);
+            updateLRUListLocked(next);
+
+            // Have the window manager re-evaluate the orientation of
+            // the screen based on the new activity order.
+            boolean updated = false;
+            if (mMainStack) {
+                synchronized (mService) {
+                    Configuration config = mService.mWindowManager.updateOrientationFromAppTokens(
+                            mService.mConfiguration,
+                            next.mayFreezeScreenLocked(next.app) ? next : null);
+                    if (config != null) {
+                        next.frozenBeforeDestroy = true;
+                    }
+                    updated = mService.updateConfigurationLocked(config, next);
+                }
+            }
+            if (!updated) {
+                // The configuration update wasn't able to keep the existing
+                // instance of the activity, and instead started a new one.
+                // We should be all done, but let's just make sure our activity
+                // is still at the top and schedule another run if something
+                // weird happened.
+                ActivityRecord nextNext = topRunningActivityLocked(null);
+                if (DEBUG_SWITCH) Slog.i(TAG,
+                        "Activity config changed during resume: " + next
+                        + ", new next: " + nextNext);
+                if (nextNext != next) {
+                    // Do over!
+                    mHandler.sendEmptyMessage(RESUME_TOP_ACTIVITY_MSG);
+                }
+                if (mMainStack) {
+                    mService.setFocusedActivityLocked(next);
+                }
+                ensureActivitiesVisibleLocked(null, 0);
+                mService.mWindowManager.executeAppTransition();
+                mNoAnimActivities.clear();
+                return true;
+            }
+            
+            try {
+                // Deliver all pending results.
+                ArrayList a = next.results;
+                if (a != null) {
+                    final int N = a.size();
+                    if (!next.finishing && N > 0) {
+                        if (DEBUG_RESULTS) Slog.v(
+                                TAG, "Delivering results to " + next
+                                + ": " + a);
+                        next.app.thread.scheduleSendResult(next, a);
+                    }
+                }
+
+                if (next.newIntents != null) {
+                    next.app.thread.scheduleNewIntent(next.newIntents, next);
+                }
+
+                EventLog.writeEvent(EventLogTags.AM_RESUME_ACTIVITY,
+                        System.identityHashCode(next),
+                        next.task.taskId, next.shortComponentName);
+                
+                next.app.thread.scheduleResumeActivity(next,
+                        mService.isNextTransitionForward());
+                
+                pauseIfSleepingLocked();
+
+            } catch (Exception e) {
+                // Whoops, need to restart this activity!
+                next.state = lastState;
+                mResumedActivity = lastResumedActivity;
+                Slog.i(TAG, "Restarting because process died: " + next);
+                if (!next.hasBeenLaunched) {
+                    next.hasBeenLaunched = true;
+                } else {
+                    if (SHOW_APP_STARTING_PREVIEW && mMainStack) {
+                        mService.mWindowManager.setAppStartingWindow(
+                                next, next.packageName, next.theme,
+                                next.nonLocalizedLabel,
+                                next.labelRes, next.icon, null, true);
+                    }
+                }
+                startSpecificActivityLocked(next, true, false);
+                return true;
+            }
+
+            // From this point on, if something goes wrong there is no way
+            // to recover the activity.
+            try {
+                next.visible = true;
+                completeResumeLocked(next);
+            } catch (Exception e) {
+                // If any exception gets thrown, toss away this
+                // activity and try the next one.
+                Slog.w(TAG, "Exception thrown during resume of " + next, e);
+                requestFinishActivityLocked(next, Activity.RESULT_CANCELED, null,
+                        "resume-exception");
+                return true;
+            }
+
+            // Didn't need to use the icicle, and it is now out of date.
+            next.icicle = null;
+            next.haveState = false;
+            next.stopped = false;
+
+        } else {
+            // Whoops, need to restart this activity!
+            if (!next.hasBeenLaunched) {
+                next.hasBeenLaunched = true;
+            } else {
+                if (SHOW_APP_STARTING_PREVIEW) {
+                    mService.mWindowManager.setAppStartingWindow(
+                            next, next.packageName, next.theme,
+                            next.nonLocalizedLabel,
+                            next.labelRes, next.icon, null, true);
+                }
+                if (DEBUG_SWITCH) Slog.v(TAG, "Restarting: " + next);
+            }
+            startSpecificActivityLocked(next, true, true);
+        }
+
+        return true;
+    }
+
+    private final void startActivityLocked(ActivityRecord r, boolean newTask,
+            boolean doResume) {
+        final int NH = mHistory.size();
+
+        int addPos = -1;
+        
+        if (!newTask) {
+            // If starting in an existing task, find where that is...
+            ActivityRecord next = null;
+            boolean startIt = true;
+            for (int i = NH-1; i >= 0; i--) {
+                ActivityRecord p = (ActivityRecord)mHistory.get(i);
+                if (p.finishing) {
+                    continue;
+                }
+                if (p.task == r.task) {
+                    // Here it is!  Now, if this is not yet visible to the
+                    // user, then just add it without starting; it will
+                    // get started when the user navigates back to it.
+                    addPos = i+1;
+                    if (!startIt) {
+                        mHistory.add(addPos, r);
+                        r.inHistory = true;
+                        r.task.numActivities++;
+                        mService.mWindowManager.addAppToken(addPos, r, r.task.taskId,
+                                r.info.screenOrientation, r.fullscreen);
+                        if (VALIDATE_TOKENS) {
+                            mService.mWindowManager.validateAppTokens(mHistory);
+                        }
+                        return;
+                    }
+                    break;
+                }
+                if (p.fullscreen) {
+                    startIt = false;
+                }
+                next = p;
+            }
+        }
+
+        // Place a new activity at top of stack, so it is next to interact
+        // with the user.
+        if (addPos < 0) {
+            addPos = mHistory.size();
+        }
+        
+        // If we are not placing the new activity frontmost, we do not want
+        // to deliver the onUserLeaving callback to the actual frontmost
+        // activity
+        if (addPos < NH) {
+            mUserLeaving = false;
+            if (DEBUG_USER_LEAVING) Slog.v(TAG, "startActivity() behind front, mUserLeaving=false");
+        }
+        
+        // Slot the activity into the history stack and proceed
+        mHistory.add(addPos, r);
+        r.inHistory = true;
+        r.frontOfTask = newTask;
+        r.task.numActivities++;
+        if (NH > 0) {
+            // We want to show the starting preview window if we are
+            // switching to a new task, or the next activity's process is
+            // not currently running.
+            boolean showStartingIcon = newTask;
+            ProcessRecord proc = r.app;
+            if (proc == null) {
+                proc = mService.mProcessNames.get(r.processName, r.info.applicationInfo.uid);
+            }
+            if (proc == null || proc.thread == null) {
+                showStartingIcon = true;
+            }
+            if (DEBUG_TRANSITION) Slog.v(TAG,
+                    "Prepare open transition: starting " + r);
+            if ((r.intent.getFlags()&Intent.FLAG_ACTIVITY_NO_ANIMATION) != 0) {
+                mService.mWindowManager.prepareAppTransition(WindowManagerPolicy.TRANSIT_NONE);
+                mNoAnimActivities.add(r);
+            } else if ((r.intent.getFlags()&Intent.FLAG_ACTIVITY_CLEAR_WHEN_TASK_RESET) != 0) {
+                mService.mWindowManager.prepareAppTransition(
+                        WindowManagerPolicy.TRANSIT_TASK_OPEN);
+                mNoAnimActivities.remove(r);
+            } else {
+                mService.mWindowManager.prepareAppTransition(newTask
+                        ? WindowManagerPolicy.TRANSIT_TASK_OPEN
+                        : WindowManagerPolicy.TRANSIT_ACTIVITY_OPEN);
+                mNoAnimActivities.remove(r);
+            }
+            mService.mWindowManager.addAppToken(
+                    addPos, r, r.task.taskId, r.info.screenOrientation, r.fullscreen);
+            boolean doShow = true;
+            if (newTask) {
+                // Even though this activity is starting fresh, we still need
+                // to reset it to make sure we apply affinities to move any
+                // existing activities from other tasks in to it.
+                // If the caller has requested that the target task be
+                // reset, then do so.
+                if ((r.intent.getFlags()
+                        &Intent.FLAG_ACTIVITY_RESET_TASK_IF_NEEDED) != 0) {
+                    resetTaskIfNeededLocked(r, r);
+                    doShow = topRunningNonDelayedActivityLocked(null) == r;
+                }
+            }
+            if (SHOW_APP_STARTING_PREVIEW && doShow) {
+                // Figure out if we are transitioning from another activity that is
+                // "has the same starting icon" as the next one.  This allows the
+                // window manager to keep the previous window it had previously
+                // created, if it still had one.
+                ActivityRecord prev = mResumedActivity;
+                if (prev != null) {
+                    // We don't want to reuse the previous starting preview if:
+                    // (1) The current activity is in a different task.
+                    if (prev.task != r.task) prev = null;
+                    // (2) The current activity is already displayed.
+                    else if (prev.nowVisible) prev = null;
+                }
+                mService.mWindowManager.setAppStartingWindow(
+                        r, r.packageName, r.theme, r.nonLocalizedLabel,
+                        r.labelRes, r.icon, prev, showStartingIcon);
+            }
+        } else {
+            // If this is the first activity, don't do any fancy animations,
+            // because there is nothing for it to animate on top of.
+            mService.mWindowManager.addAppToken(addPos, r, r.task.taskId,
+                    r.info.screenOrientation, r.fullscreen);
+        }
+        if (VALIDATE_TOKENS) {
+            mService.mWindowManager.validateAppTokens(mHistory);
+        }
+
+        if (doResume) {
+            resumeTopActivityLocked(null);
+        }
+    }
+
+    /**
+     * Perform a reset of the given task, if needed as part of launching it.
+     * Returns the new HistoryRecord at the top of the task.
+     */
+    private final ActivityRecord resetTaskIfNeededLocked(ActivityRecord taskTop,
+            ActivityRecord newActivity) {
+        boolean forceReset = (newActivity.info.flags
+                &ActivityInfo.FLAG_CLEAR_TASK_ON_LAUNCH) != 0;
+        if (taskTop.task.getInactiveDuration() > ACTIVITY_INACTIVE_RESET_TIME) {
+            if ((newActivity.info.flags
+                    &ActivityInfo.FLAG_ALWAYS_RETAIN_TASK_STATE) == 0) {
+                forceReset = true;
+            }
+        }
+        
+        final TaskRecord task = taskTop.task;
+        
+        // We are going to move through the history list so that we can look
+        // at each activity 'target' with 'below' either the interesting
+        // activity immediately below it in the stack or null.
+        ActivityRecord target = null;
+        int targetI = 0;
+        int taskTopI = -1;
+        int replyChainEnd = -1;
+        int lastReparentPos = -1;
+        for (int i=mHistory.size()-1; i>=-1; i--) {
+            ActivityRecord below = i >= 0 ? (ActivityRecord)mHistory.get(i) : null;
+            
+            if (below != null && below.finishing) {
+                continue;
+            }
+            if (target == null) {
+                target = below;
+                targetI = i;
+                // If we were in the middle of a reply chain before this
+                // task, it doesn't appear like the root of the chain wants
+                // anything interesting, so drop it.
+                replyChainEnd = -1;
+                continue;
+            }
+        
+            final int flags = target.info.flags;
+            
+            final boolean finishOnTaskLaunch =
+                (flags&ActivityInfo.FLAG_FINISH_ON_TASK_LAUNCH) != 0;
+            final boolean allowTaskReparenting =
+                (flags&ActivityInfo.FLAG_ALLOW_TASK_REPARENTING) != 0;
+            
+            if (target.task == task) {
+                // We are inside of the task being reset...  we'll either
+                // finish this activity, push it out for another task,
+                // or leave it as-is.  We only do this
+                // for activities that are not the root of the task (since
+                // if we finish the root, we may no longer have the task!).
+                if (taskTopI < 0) {
+                    taskTopI = targetI;
+                }
+                if (below != null && below.task == task) {
+                    final boolean clearWhenTaskReset =
+                            (target.intent.getFlags()
+                                    &Intent.FLAG_ACTIVITY_CLEAR_WHEN_TASK_RESET) != 0;
+                    if (!finishOnTaskLaunch && !clearWhenTaskReset && target.resultTo != null) {
+                        // If this activity is sending a reply to a previous
+                        // activity, we can't do anything with it now until
+                        // we reach the start of the reply chain.
+                        // XXX note that we are assuming the result is always
+                        // to the previous activity, which is almost always
+                        // the case but we really shouldn't count on.
+                        if (replyChainEnd < 0) {
+                            replyChainEnd = targetI;
+                        }
+                    } else if (!finishOnTaskLaunch && !clearWhenTaskReset && allowTaskReparenting
+                            && target.taskAffinity != null
+                            && !target.taskAffinity.equals(task.affinity)) {
+                        // If this activity has an affinity for another
+                        // task, then we need to move it out of here.  We will
+                        // move it as far out of the way as possible, to the
+                        // bottom of the activity stack.  This also keeps it
+                        // correctly ordered with any activities we previously
+                        // moved.
+                        ActivityRecord p = (ActivityRecord)mHistory.get(0);
+                        if (target.taskAffinity != null
+                                && target.taskAffinity.equals(p.task.affinity)) {
+                            // If the activity currently at the bottom has the
+                            // same task affinity as the one we are moving,
+                            // then merge it into the same task.
+                            target.task = p.task;
+                            if (DEBUG_TASKS) Slog.v(TAG, "Start pushing activity " + target
+                                    + " out to bottom task " + p.task);
+                        } else {
+                            mService.mCurTask++;
+                            if (mService.mCurTask <= 0) {
+                                mService.mCurTask = 1;
+                            }
+                            target.task = new TaskRecord(mService.mCurTask, target.info, null,
+                                    (target.info.flags&ActivityInfo.FLAG_CLEAR_TASK_ON_LAUNCH) != 0);
+                            target.task.affinityIntent = target.intent;
+                            if (DEBUG_TASKS) Slog.v(TAG, "Start pushing activity " + target
+                                    + " out to new task " + target.task);
+                        }
+                        mService.mWindowManager.setAppGroupId(target, task.taskId);
+                        if (replyChainEnd < 0) {
+                            replyChainEnd = targetI;
+                        }
+                        int dstPos = 0;
+                        for (int srcPos=targetI; srcPos<=replyChainEnd; srcPos++) {
+                            p = (ActivityRecord)mHistory.get(srcPos);
+                            if (p.finishing) {
+                                continue;
+                            }
+                            if (DEBUG_TASKS) Slog.v(TAG, "Pushing next activity " + p
+                                    + " out to target's task " + target.task);
+                            task.numActivities--;
+                            p.task = target.task;
+                            target.task.numActivities++;
+                            mHistory.remove(srcPos);
+                            mHistory.add(dstPos, p);
+                            mService.mWindowManager.moveAppToken(dstPos, p);
+                            mService.mWindowManager.setAppGroupId(p, p.task.taskId);
+                            dstPos++;
+                            if (VALIDATE_TOKENS) {
+                                mService.mWindowManager.validateAppTokens(mHistory);
+                            }
+                            i++;
+                        }
+                        if (taskTop == p) {
+                            taskTop = below;
+                        }
+                        if (taskTopI == replyChainEnd) {
+                            taskTopI = -1;
+                        }
+                        replyChainEnd = -1;
+                        if (mMainStack) {
+                            mService.addRecentTaskLocked(target.task);
+                        }
+                    } else if (forceReset || finishOnTaskLaunch
+                            || clearWhenTaskReset) {
+                        // If the activity should just be removed -- either
+                        // because it asks for it, or the task should be
+                        // cleared -- then finish it and anything that is
+                        // part of its reply chain.
+                        if (clearWhenTaskReset) {
+                            // In this case, we want to finish this activity
+                            // and everything above it, so be sneaky and pretend
+                            // like these are all in the reply chain.
+                            replyChainEnd = targetI+1;
+                            while (replyChainEnd < mHistory.size() &&
+                                    ((ActivityRecord)mHistory.get(
+                                                replyChainEnd)).task == task) {
+                                replyChainEnd++;
+                            }
+                            replyChainEnd--;
+                        } else if (replyChainEnd < 0) {
+                            replyChainEnd = targetI;
+                        }
+                        ActivityRecord p = null;
+                        for (int srcPos=targetI; srcPos<=replyChainEnd; srcPos++) {
+                            p = (ActivityRecord)mHistory.get(srcPos);
+                            if (p.finishing) {
+                                continue;
+                            }
+                            if (finishActivityLocked(p, srcPos,
+                                    Activity.RESULT_CANCELED, null, "reset")) {
+                                replyChainEnd--;
+                                srcPos--;
+                            }
+                        }
+                        if (taskTop == p) {
+                            taskTop = below;
+                        }
+                        if (taskTopI == replyChainEnd) {
+                            taskTopI = -1;
+                        }
+                        replyChainEnd = -1;
+                    } else {
+                        // If we were in the middle of a chain, well the
+                        // activity that started it all doesn't want anything
+                        // special, so leave it all as-is.
+                        replyChainEnd = -1;
+                    }
+                } else {
+                    // Reached the bottom of the task -- any reply chain
+                    // should be left as-is.
+                    replyChainEnd = -1;
+                }
+                
+            } else if (target.resultTo != null) {
+                // If this activity is sending a reply to a previous
+                // activity, we can't do anything with it now until
+                // we reach the start of the reply chain.
+                // XXX note that we are assuming the result is always
+                // to the previous activity, which is almost always
+                // the case but we really shouldn't count on.
+                if (replyChainEnd < 0) {
+                    replyChainEnd = targetI;
+                }
+
+            } else if (taskTopI >= 0 && allowTaskReparenting
+                    && task.affinity != null
+                    && task.affinity.equals(target.taskAffinity)) {
+                // We are inside of another task...  if this activity has
+                // an affinity for our task, then either remove it if we are
+                // clearing or move it over to our task.  Note that
+                // we currently punt on the case where we are resetting a
+                // task that is not at the top but who has activities above
+                // with an affinity to it...  this is really not a normal
+                // case, and we will need to later pull that task to the front
+                // and usually at that point we will do the reset and pick
+                // up those remaining activities.  (This only happens if
+                // someone starts an activity in a new task from an activity
+                // in a task that is not currently on top.)
+                if (forceReset || finishOnTaskLaunch) {
+                    if (replyChainEnd < 0) {
+                        replyChainEnd = targetI;
+                    }
+                    ActivityRecord p = null;
+                    for (int srcPos=targetI; srcPos<=replyChainEnd; srcPos++) {
+                        p = (ActivityRecord)mHistory.get(srcPos);
+                        if (p.finishing) {
+                            continue;
+                        }
+                        if (finishActivityLocked(p, srcPos,
+                                Activity.RESULT_CANCELED, null, "reset")) {
+                            taskTopI--;
+                            lastReparentPos--;
+                            replyChainEnd--;
+                            srcPos--;
+                        }
+                    }
+                    replyChainEnd = -1;
+                } else {
+                    if (replyChainEnd < 0) {
+                        replyChainEnd = targetI;
+                    }
+                    for (int srcPos=replyChainEnd; srcPos>=targetI; srcPos--) {
+                        ActivityRecord p = (ActivityRecord)mHistory.get(srcPos);
+                        if (p.finishing) {
+                            continue;
+                        }
+                        if (lastReparentPos < 0) {
+                            lastReparentPos = taskTopI;
+                            taskTop = p;
+                        } else {
+                            lastReparentPos--;
+                        }
+                        mHistory.remove(srcPos);
+                        p.task.numActivities--;
+                        p.task = task;
+                        mHistory.add(lastReparentPos, p);
+                        if (DEBUG_TASKS) Slog.v(TAG, "Pulling activity " + p
+                                + " in to resetting task " + task);
+                        task.numActivities++;
+                        mService.mWindowManager.moveAppToken(lastReparentPos, p);
+                        mService.mWindowManager.setAppGroupId(p, p.task.taskId);
+                        if (VALIDATE_TOKENS) {
+                            mService.mWindowManager.validateAppTokens(mHistory);
+                        }
+                    }
+                    replyChainEnd = -1;
+                    
+                    // Now we've moved it in to place...  but what if this is
+                    // a singleTop activity and we have put it on top of another
+                    // instance of the same activity?  Then we drop the instance
+                    // below so it remains singleTop.
+                    if (target.info.launchMode == ActivityInfo.LAUNCH_SINGLE_TOP) {
+                        for (int j=lastReparentPos-1; j>=0; j--) {
+                            ActivityRecord p = (ActivityRecord)mHistory.get(j);
+                            if (p.finishing) {
+                                continue;
+                            }
+                            if (p.intent.getComponent().equals(target.intent.getComponent())) {
+                                if (finishActivityLocked(p, j,
+                                        Activity.RESULT_CANCELED, null, "replace")) {
+                                    taskTopI--;
+                                    lastReparentPos--;
+                                }
+                            }
+                        }
+                    }
+                }
+            }
+            
+            target = below;
+            targetI = i;
+        }
+        
+        return taskTop;
+    }
+    
+    /**
+     * Perform clear operation as requested by
+     * {@link Intent#FLAG_ACTIVITY_CLEAR_TOP}: search from the top of the
+     * stack to the given task, then look for
+     * an instance of that activity in the stack and, if found, finish all
+     * activities on top of it and return the instance.
+     *
+     * @param newR Description of the new activity being started.
+     * @return Returns the old activity that should be continue to be used,
+     * or null if none was found.
+     */
+    private final ActivityRecord performClearTaskLocked(int taskId,
+            ActivityRecord newR, int launchFlags, boolean doClear) {
+        int i = mHistory.size();
+        
+        // First find the requested task.
+        while (i > 0) {
+            i--;
+            ActivityRecord r = (ActivityRecord)mHistory.get(i);
+            if (r.task.taskId == taskId) {
+                i++;
+                break;
+            }
+        }
+        
+        // Now clear it.
+        while (i > 0) {
+            i--;
+            ActivityRecord r = (ActivityRecord)mHistory.get(i);
+            if (r.finishing) {
+                continue;
+            }
+            if (r.task.taskId != taskId) {
+                return null;
+            }
+            if (r.realActivity.equals(newR.realActivity)) {
+                // Here it is!  Now finish everything in front...
+                ActivityRecord ret = r;
+                if (doClear) {
+                    while (i < (mHistory.size()-1)) {
+                        i++;
+                        r = (ActivityRecord)mHistory.get(i);
+                        if (r.finishing) {
+                            continue;
+                        }
+                        if (finishActivityLocked(r, i, Activity.RESULT_CANCELED,
+                                null, "clear")) {
+                            i--;
+                        }
+                    }
+                }
+                
+                // Finally, if this is a normal launch mode (that is, not
+                // expecting onNewIntent()), then we will finish the current
+                // instance of the activity so a new fresh one can be started.
+                if (ret.launchMode == ActivityInfo.LAUNCH_MULTIPLE
+                        && (launchFlags&Intent.FLAG_ACTIVITY_SINGLE_TOP) == 0) {
+                    if (!ret.finishing) {
+                        int index = indexOfTokenLocked(ret);
+                        if (index >= 0) {
+                            finishActivityLocked(ret, index, Activity.RESULT_CANCELED,
+                                    null, "clear");
+                        }
+                        return null;
+                    }
+                }
+                
+                return ret;
+            }
+        }
+
+        return null;
+    }
+
+    /**
+     * Find the activity in the history stack within the given task.  Returns
+     * the index within the history at which it's found, or < 0 if not found.
+     */
+    private final int findActivityInHistoryLocked(ActivityRecord r, int task) {
+        int i = mHistory.size();
+        while (i > 0) {
+            i--;
+            ActivityRecord candidate = (ActivityRecord)mHistory.get(i);
+            if (candidate.task.taskId != task) {
+                break;
+            }
+            if (candidate.realActivity.equals(r.realActivity)) {
+                return i;
+            }
+        }
+
+        return -1;
+    }
+
+    /**
+     * Reorder the history stack so that the activity at the given index is
+     * brought to the front.
+     */
+    private final ActivityRecord moveActivityToFrontLocked(int where) {
+        ActivityRecord newTop = (ActivityRecord)mHistory.remove(where);
+        int top = mHistory.size();
+        ActivityRecord oldTop = (ActivityRecord)mHistory.get(top-1);
+        mHistory.add(top, newTop);
+        oldTop.frontOfTask = false;
+        newTop.frontOfTask = true;
+        return newTop;
+    }
+
+    final int startActivityLocked(IApplicationThread caller,
+            Intent intent, String resolvedType,
+            Uri[] grantedUriPermissions,
+            int grantedMode, ActivityInfo aInfo, IBinder resultTo,
+            String resultWho, int requestCode,
+            int callingPid, int callingUid, boolean onlyIfNeeded,
+            boolean componentSpecified) {
+        Slog.i(TAG, "Starting activity: " + intent);
+
+        ActivityRecord sourceRecord = null;
+        ActivityRecord resultRecord = null;
+        if (resultTo != null) {
+            int index = indexOfTokenLocked(resultTo);
+            if (DEBUG_RESULTS) Slog.v(
+                TAG, "Sending result to " + resultTo + " (index " + index + ")");
+            if (index >= 0) {
+                sourceRecord = (ActivityRecord)mHistory.get(index);
+                if (requestCode >= 0 && !sourceRecord.finishing) {
+                    resultRecord = sourceRecord;
+                }
+            }
+        }
+
+        int launchFlags = intent.getFlags();
+
+        if ((launchFlags&Intent.FLAG_ACTIVITY_FORWARD_RESULT) != 0
+                && sourceRecord != null) {
+            // Transfer the result target from the source activity to the new
+            // one being started, including any failures.
+            if (requestCode >= 0) {
+                return START_FORWARD_AND_REQUEST_CONFLICT;
+            }
+            resultRecord = sourceRecord.resultTo;
+            resultWho = sourceRecord.resultWho;
+            requestCode = sourceRecord.requestCode;
+            sourceRecord.resultTo = null;
+            if (resultRecord != null) {
+                resultRecord.removeResultsLocked(
+                    sourceRecord, resultWho, requestCode);
+            }
+        }
+
+        int err = START_SUCCESS;
+
+        if (intent.getComponent() == null) {
+            // We couldn't find a class that can handle the given Intent.
+            // That's the end of that!
+            err = START_INTENT_NOT_RESOLVED;
+        }
+
+        if (err == START_SUCCESS && aInfo == null) {
+            // We couldn't find the specific class specified in the Intent.
+            // Also the end of the line.
+            err = START_CLASS_NOT_FOUND;
+        }
+
+        ProcessRecord callerApp = null;
+        if (err == START_SUCCESS && caller != null) {
+            callerApp = mService.getRecordForAppLocked(caller);
+            if (callerApp != null) {
+                callingPid = callerApp.pid;
+                callingUid = callerApp.info.uid;
+            } else {
+                Slog.w(TAG, "Unable to find app for caller " + caller
+                      + " (pid=" + callingPid + ") when starting: "
+                      + intent.toString());
+                err = START_PERMISSION_DENIED;
+            }
+        }
+
+        if (err != START_SUCCESS) {
+            if (resultRecord != null) {
+                sendActivityResultLocked(-1,
+                    resultRecord, resultWho, requestCode,
+                    Activity.RESULT_CANCELED, null);
+            }
+            return err;
+        }
+
+        final int perm = mService.checkComponentPermission(aInfo.permission, callingPid,
+                callingUid, aInfo.exported ? -1 : aInfo.applicationInfo.uid);
+        if (perm != PackageManager.PERMISSION_GRANTED) {
+            if (resultRecord != null) {
+                sendActivityResultLocked(-1,
+                    resultRecord, resultWho, requestCode,
+                    Activity.RESULT_CANCELED, null);
+            }
+            String msg = "Permission Denial: starting " + intent.toString()
+                    + " from " + callerApp + " (pid=" + callingPid
+                    + ", uid=" + callingUid + ")"
+                    + " requires " + aInfo.permission;
+            Slog.w(TAG, msg);
+            throw new SecurityException(msg);
+        }
+
+        if (mMainStack) {
+            if (mService.mController != null) {
+                boolean abort = false;
+                try {
+                    // The Intent we give to the watcher has the extra data
+                    // stripped off, since it can contain private information.
+                    Intent watchIntent = intent.cloneFilter();
+                    abort = !mService.mController.activityStarting(watchIntent,
+                            aInfo.applicationInfo.packageName);
+                } catch (RemoteException e) {
+                    mService.mController = null;
+                }
+    
+                if (abort) {
+                    if (resultRecord != null) {
+                        sendActivityResultLocked(-1,
+                            resultRecord, resultWho, requestCode,
+                            Activity.RESULT_CANCELED, null);
+                    }
+                    // We pretend to the caller that it was really started, but
+                    // they will just get a cancel result.
+                    return START_SUCCESS;
+                }
+            }
+        }
+        
+        ActivityRecord r = new ActivityRecord(mService, this, callerApp, callingUid,
+                intent, resolvedType, aInfo, mService.mConfiguration,
+                resultRecord, resultWho, requestCode, componentSpecified);
+
+        if (mMainStack) {
+            if (mResumedActivity == null
+                    || mResumedActivity.info.applicationInfo.uid != callingUid) {
+                if (!mService.checkAppSwitchAllowedLocked(callingPid, callingUid, "Activity start")) {
+                    PendingActivityLaunch pal = new PendingActivityLaunch();
+                    pal.r = r;
+                    pal.sourceRecord = sourceRecord;
+                    pal.grantedUriPermissions = grantedUriPermissions;
+                    pal.grantedMode = grantedMode;
+                    pal.onlyIfNeeded = onlyIfNeeded;
+                    mService.mPendingActivityLaunches.add(pal);
+                    return START_SWITCHES_CANCELED;
+                }
+            }
+        
+            if (mService.mDidAppSwitch) {
+                // This is the second allowed switch since we stopped switches,
+                // so now just generally allow switches.  Use case: user presses
+                // home (switches disabled, switch to home, mDidAppSwitch now true);
+                // user taps a home icon (coming from home so allowed, we hit here
+                // and now allow anyone to switch again).
+                mService.mAppSwitchesAllowedTime = 0;
+            } else {
+                mService.mDidAppSwitch = true;
+            }
+         
+            mService.doPendingActivityLaunchesLocked(false);
+        }
+        
+        return startActivityUncheckedLocked(r, sourceRecord,
+                grantedUriPermissions, grantedMode, onlyIfNeeded, true);
+    }
+  
+    final int startActivityUncheckedLocked(ActivityRecord r,
+            ActivityRecord sourceRecord, Uri[] grantedUriPermissions,
+            int grantedMode, boolean onlyIfNeeded, boolean doResume) {
+        final Intent intent = r.intent;
+        final int callingUid = r.launchedFromUid;
+        
+        int launchFlags = intent.getFlags();
+        
+        // We'll invoke onUserLeaving before onPause only if the launching
+        // activity did not explicitly state that this is an automated launch.
+        mUserLeaving = (launchFlags&Intent.FLAG_ACTIVITY_NO_USER_ACTION) == 0;
+        if (DEBUG_USER_LEAVING) Slog.v(TAG,
+                "startActivity() => mUserLeaving=" + mUserLeaving);
+        
+        // If the caller has asked not to resume at this point, we make note
+        // of this in the record so that we can skip it when trying to find
+        // the top running activity.
+        if (!doResume) {
+            r.delayedResume = true;
+        }
+        
+        ActivityRecord notTop = (launchFlags&Intent.FLAG_ACTIVITY_PREVIOUS_IS_TOP)
+                != 0 ? r : null;
+
+        // If the onlyIfNeeded flag is set, then we can do this if the activity
+        // being launched is the same as the one making the call...  or, as
+        // a special case, if we do not know the caller then we count the
+        // current top activity as the caller.
+        if (onlyIfNeeded) {
+            ActivityRecord checkedCaller = sourceRecord;
+            if (checkedCaller == null) {
+                checkedCaller = topRunningNonDelayedActivityLocked(notTop);
+            }
+            if (!checkedCaller.realActivity.equals(r.realActivity)) {
+                // Caller is not the same as launcher, so always needed.
+                onlyIfNeeded = false;
+            }
+        }
+
+        if (grantedUriPermissions != null && callingUid > 0) {
+            for (int i=0; i<grantedUriPermissions.length; i++) {
+                mService.grantUriPermissionLocked(callingUid, r.packageName,
+                        grantedUriPermissions[i], grantedMode, r);
+            }
+        }
+
+        mService.grantUriPermissionFromIntentLocked(callingUid, r.packageName,
+                intent, r);
+
+        if (sourceRecord == null) {
+            // This activity is not being started from another...  in this
+            // case we -always- start a new task.
+            if ((launchFlags&Intent.FLAG_ACTIVITY_NEW_TASK) == 0) {
+                Slog.w(TAG, "startActivity called from non-Activity context; forcing Intent.FLAG_ACTIVITY_NEW_TASK for: "
+                      + intent);
+                launchFlags |= Intent.FLAG_ACTIVITY_NEW_TASK;
+            }
+        } else if (sourceRecord.launchMode == ActivityInfo.LAUNCH_SINGLE_INSTANCE) {
+            // The original activity who is starting us is running as a single
+            // instance...  this new activity it is starting must go on its
+            // own task.
+            launchFlags |= Intent.FLAG_ACTIVITY_NEW_TASK;
+        } else if (r.launchMode == ActivityInfo.LAUNCH_SINGLE_INSTANCE
+                || r.launchMode == ActivityInfo.LAUNCH_SINGLE_TASK) {
+            // The activity being started is a single instance...  it always
+            // gets launched into its own task.
+            launchFlags |= Intent.FLAG_ACTIVITY_NEW_TASK;
+        }
+
+        if (r.resultTo != null && (launchFlags&Intent.FLAG_ACTIVITY_NEW_TASK) != 0) {
+            // For whatever reason this activity is being launched into a new
+            // task...  yet the caller has requested a result back.  Well, that
+            // is pretty messed up, so instead immediately send back a cancel
+            // and let the new task continue launched as normal without a
+            // dependency on its originator.
+            Slog.w(TAG, "Activity is launching as a new task, so cancelling activity result.");
+            sendActivityResultLocked(-1,
+                    r.resultTo, r.resultWho, r.requestCode,
+                Activity.RESULT_CANCELED, null);
+            r.resultTo = null;
+        }
+
+        boolean addingToTask = false;
+        if (((launchFlags&Intent.FLAG_ACTIVITY_NEW_TASK) != 0 &&
+                (launchFlags&Intent.FLAG_ACTIVITY_MULTIPLE_TASK) == 0)
+                || r.launchMode == ActivityInfo.LAUNCH_SINGLE_TASK
+                || r.launchMode == ActivityInfo.LAUNCH_SINGLE_INSTANCE) {
+            // If bring to front is requested, and no result is requested, and
+            // we can find a task that was started with this same
+            // component, then instead of launching bring that one to the front.
+            if (r.resultTo == null) {
+                // See if there is a task to bring to the front.  If this is
+                // a SINGLE_INSTANCE activity, there can be one and only one
+                // instance of it in the history, and it is always in its own
+                // unique task, so we do a special search.
+                ActivityRecord taskTop = r.launchMode != ActivityInfo.LAUNCH_SINGLE_INSTANCE
+                        ? findTaskLocked(intent, r.info)
+                        : findActivityLocked(intent, r.info);
+                if (taskTop != null) {
+                    if (taskTop.task.intent == null) {
+                        // This task was started because of movement of
+                        // the activity based on affinity...  now that we
+                        // are actually launching it, we can assign the
+                        // base intent.
+                        taskTop.task.setIntent(intent, r.info);
+                    }
+                    // If the target task is not in the front, then we need
+                    // to bring it to the front...  except...  well, with
+                    // SINGLE_TASK_LAUNCH it's not entirely clear.  We'd like
+                    // to have the same behavior as if a new instance was
+                    // being started, which means not bringing it to the front
+                    // if the caller is not itself in the front.
+                    ActivityRecord curTop = topRunningNonDelayedActivityLocked(notTop);
+                    if (curTop.task != taskTop.task) {
+                        r.intent.addFlags(Intent.FLAG_ACTIVITY_BROUGHT_TO_FRONT);
+                        boolean callerAtFront = sourceRecord == null
+                                || curTop.task == sourceRecord.task;
+                        if (callerAtFront) {
+                            // We really do want to push this one into the
+                            // user's face, right now.
+                            moveTaskToFrontLocked(taskTop.task, r);
+                        }
+                    }
+                    // If the caller has requested that the target task be
+                    // reset, then do so.
+                    if ((launchFlags&Intent.FLAG_ACTIVITY_RESET_TASK_IF_NEEDED) != 0) {
+                        taskTop = resetTaskIfNeededLocked(taskTop, r);
+                    }
+                    if (onlyIfNeeded) {
+                        // We don't need to start a new activity, and
+                        // the client said not to do anything if that
+                        // is the case, so this is it!  And for paranoia, make
+                        // sure we have correctly resumed the top activity.
+                        if (doResume) {
+                            resumeTopActivityLocked(null);
+                        }
+                        return START_RETURN_INTENT_TO_CALLER;
+                    }
+                    if ((launchFlags&Intent.FLAG_ACTIVITY_CLEAR_TOP) != 0
+                            || r.launchMode == ActivityInfo.LAUNCH_SINGLE_TASK
+                            || r.launchMode == ActivityInfo.LAUNCH_SINGLE_INSTANCE) {
+                        // In this situation we want to remove all activities
+                        // from the task up to the one being started.  In most
+                        // cases this means we are resetting the task to its
+                        // initial state.
+                        ActivityRecord top = performClearTaskLocked(
+                                taskTop.task.taskId, r, launchFlags, true);
+                        if (top != null) {
+                            if (top.frontOfTask) {
+                                // Activity aliases may mean we use different
+                                // intents for the top activity, so make sure
+                                // the task now has the identity of the new
+                                // intent.
+                                top.task.setIntent(r.intent, r.info);
+                            }
+                            logStartActivity(EventLogTags.AM_NEW_INTENT, r, top.task);
+                            top.deliverNewIntentLocked(r.intent);
+                        } else {
+                            // A special case: we need to
+                            // start the activity because it is not currently
+                            // running, and the caller has asked to clear the
+                            // current task to have this activity at the top.
+                            addingToTask = true;
+                            // Now pretend like this activity is being started
+                            // by the top of its task, so it is put in the
+                            // right place.
+                            sourceRecord = taskTop;
+                        }
+                    } else if (r.realActivity.equals(taskTop.task.realActivity)) {
+                        // In this case the top activity on the task is the
+                        // same as the one being launched, so we take that
+                        // as a request to bring the task to the foreground.
+                        // If the top activity in the task is the root
+                        // activity, deliver this new intent to it if it
+                        // desires.
+                        if ((launchFlags&Intent.FLAG_ACTIVITY_SINGLE_TOP) != 0
+                                && taskTop.realActivity.equals(r.realActivity)) {
+                            logStartActivity(EventLogTags.AM_NEW_INTENT, r, taskTop.task);
+                            if (taskTop.frontOfTask) {
+                                taskTop.task.setIntent(r.intent, r.info);
+                            }
+                            taskTop.deliverNewIntentLocked(r.intent);
+                        } else if (!r.intent.filterEquals(taskTop.task.intent)) {
+                            // In this case we are launching the root activity
+                            // of the task, but with a different intent.  We
+                            // should start a new instance on top.
+                            addingToTask = true;
+                            sourceRecord = taskTop;
+                        }
+                    } else if ((launchFlags&Intent.FLAG_ACTIVITY_RESET_TASK_IF_NEEDED) == 0) {
+                        // In this case an activity is being launched in to an
+                        // existing task, without resetting that task.  This
+                        // is typically the situation of launching an activity
+                        // from a notification or shortcut.  We want to place
+                        // the new activity on top of the current task.
+                        addingToTask = true;
+                        sourceRecord = taskTop;
+                    } else if (!taskTop.task.rootWasReset) {
+                        // In this case we are launching in to an existing task
+                        // that has not yet been started from its front door.
+                        // The current task has been brought to the front.
+                        // Ideally, we'd probably like to place this new task
+                        // at the bottom of its stack, but that's a little hard
+                        // to do with the current organization of the code so
+                        // for now we'll just drop it.
+                        taskTop.task.setIntent(r.intent, r.info);
+                    }
+                    if (!addingToTask) {
+                        // We didn't do anything...  but it was needed (a.k.a., client
+                        // don't use that intent!)  And for paranoia, make
+                        // sure we have correctly resumed the top activity.
+                        if (doResume) {
+                            resumeTopActivityLocked(null);
+                        }
+                        return START_TASK_TO_FRONT;
+                    }
+                }
+            }
+        }
+
+        //String uri = r.intent.toURI();
+        //Intent intent2 = new Intent(uri);
+        //Slog.i(TAG, "Given intent: " + r.intent);
+        //Slog.i(TAG, "URI is: " + uri);
+        //Slog.i(TAG, "To intent: " + intent2);
+
+        if (r.packageName != null) {
+            // If the activity being launched is the same as the one currently
+            // at the top, then we need to check if it should only be launched
+            // once.
+            ActivityRecord top = topRunningNonDelayedActivityLocked(notTop);
+            if (top != null && r.resultTo == null) {
+                if (top.realActivity.equals(r.realActivity)) {
+                    if (top.app != null && top.app.thread != null) {
+                        if ((launchFlags&Intent.FLAG_ACTIVITY_SINGLE_TOP) != 0
+                            || r.launchMode == ActivityInfo.LAUNCH_SINGLE_TOP
+                            || r.launchMode == ActivityInfo.LAUNCH_SINGLE_TASK) {
+                            logStartActivity(EventLogTags.AM_NEW_INTENT, top, top.task);
+                            // For paranoia, make sure we have correctly
+                            // resumed the top activity.
+                            if (doResume) {
+                                resumeTopActivityLocked(null);
+                            }
+                            if (onlyIfNeeded) {
+                                // We don't need to start a new activity, and
+                                // the client said not to do anything if that
+                                // is the case, so this is it!
+                                return START_RETURN_INTENT_TO_CALLER;
+                            }
+                            top.deliverNewIntentLocked(r.intent);
+                            return START_DELIVERED_TO_TOP;
+                        }
+                    }
+                }
+            }
+
+        } else {
+            if (r.resultTo != null) {
+                sendActivityResultLocked(-1,
+                        r.resultTo, r.resultWho, r.requestCode,
+                    Activity.RESULT_CANCELED, null);
+            }
+            return START_CLASS_NOT_FOUND;
+        }
+
+        boolean newTask = false;
+
+        // Should this be considered a new task?
+        if (r.resultTo == null && !addingToTask
+                && (launchFlags&Intent.FLAG_ACTIVITY_NEW_TASK) != 0) {
+            // todo: should do better management of integers.
+            mService.mCurTask++;
+            if (mService.mCurTask <= 0) {
+                mService.mCurTask = 1;
+            }
+            r.task = new TaskRecord(mService.mCurTask, r.info, intent,
+                    (r.info.flags&ActivityInfo.FLAG_CLEAR_TASK_ON_LAUNCH) != 0);
+            if (DEBUG_TASKS) Slog.v(TAG, "Starting new activity " + r
+                    + " in new task " + r.task);
+            newTask = true;
+            if (mMainStack) {
+                mService.addRecentTaskLocked(r.task);
+            }
+            
+        } else if (sourceRecord != null) {
+            if (!addingToTask &&
+                    (launchFlags&Intent.FLAG_ACTIVITY_CLEAR_TOP) != 0) {
+                // In this case, we are adding the activity to an existing
+                // task, but the caller has asked to clear that task if the
+                // activity is already running.
+                ActivityRecord top = performClearTaskLocked(
+                        sourceRecord.task.taskId, r, launchFlags, true);
+                if (top != null) {
+                    logStartActivity(EventLogTags.AM_NEW_INTENT, r, top.task);
+                    top.deliverNewIntentLocked(r.intent);
+                    // For paranoia, make sure we have correctly
+                    // resumed the top activity.
+                    if (doResume) {
+                        resumeTopActivityLocked(null);
+                    }
+                    return START_DELIVERED_TO_TOP;
+                }
+            } else if (!addingToTask &&
+                    (launchFlags&Intent.FLAG_ACTIVITY_REORDER_TO_FRONT) != 0) {
+                // In this case, we are launching an activity in our own task
+                // that may already be running somewhere in the history, and
+                // we want to shuffle it to the front of the stack if so.
+                int where = findActivityInHistoryLocked(r, sourceRecord.task.taskId);
+                if (where >= 0) {
+                    ActivityRecord top = moveActivityToFrontLocked(where);
+                    logStartActivity(EventLogTags.AM_NEW_INTENT, r, top.task);
+                    top.deliverNewIntentLocked(r.intent);
+                    if (doResume) {
+                        resumeTopActivityLocked(null);
+                    }
+                    return START_DELIVERED_TO_TOP;
+                }
+            }
+            // An existing activity is starting this new activity, so we want
+            // to keep the new one in the same task as the one that is starting
+            // it.
+            r.task = sourceRecord.task;
+            if (DEBUG_TASKS) Slog.v(TAG, "Starting new activity " + r
+                    + " in existing task " + r.task);
+
+        } else {
+            // This not being started from an existing activity, and not part
+            // of a new task...  just put it in the top task, though these days
+            // this case should never happen.
+            final int N = mHistory.size();
+            ActivityRecord prev =
+                N > 0 ? (ActivityRecord)mHistory.get(N-1) : null;
+            r.task = prev != null
+                ? prev.task
+                : new TaskRecord(mService.mCurTask, r.info, intent,
+                        (r.info.flags&ActivityInfo.FLAG_CLEAR_TASK_ON_LAUNCH) != 0);
+            if (DEBUG_TASKS) Slog.v(TAG, "Starting new activity " + r
+                    + " in new guessed " + r.task);
+        }
+        if (newTask) {
+            EventLog.writeEvent(EventLogTags.AM_CREATE_TASK, r.task.taskId);
+        }
+        logStartActivity(EventLogTags.AM_CREATE_ACTIVITY, r, r.task);
+        startActivityLocked(r, newTask, doResume);
+        return START_SUCCESS;
+    }
+
+    final int startActivityMayWait(IApplicationThread caller,
+            Intent intent, String resolvedType, Uri[] grantedUriPermissions,
+            int grantedMode, IBinder resultTo,
+            String resultWho, int requestCode, boolean onlyIfNeeded,
+            boolean debug, WaitResult outResult, Configuration config) {
+        // Refuse possible leaked file descriptors
+        if (intent != null && intent.hasFileDescriptors()) {
+            throw new IllegalArgumentException("File descriptors passed in Intent");
+        }
+
+        boolean componentSpecified = intent.getComponent() != null;
+        
+        // Don't modify the client's object!
+        intent = new Intent(intent);
+
+        // Collect information about the target of the Intent.
+        ActivityInfo aInfo;
+        try {
+            ResolveInfo rInfo =
+                AppGlobals.getPackageManager().resolveIntent(
+                        intent, resolvedType,
+                        PackageManager.MATCH_DEFAULT_ONLY
+                        | ActivityManagerService.STOCK_PM_FLAGS);
+            aInfo = rInfo != null ? rInfo.activityInfo : null;
+        } catch (RemoteException e) {
+            aInfo = null;
+        }
+
+        if (aInfo != null) {
+            // Store the found target back into the intent, because now that
+            // we have it we never want to do this again.  For example, if the
+            // user navigates back to this point in the history, we should
+            // always restart the exact same activity.
+            intent.setComponent(new ComponentName(
+                    aInfo.applicationInfo.packageName, aInfo.name));
+
+            // Don't debug things in the system process
+            if (debug) {
+                if (!aInfo.processName.equals("system")) {
+                    mService.setDebugApp(aInfo.processName, true, false);
+                }
+            }
+        }
+
+        synchronized (mService) {
+            int callingPid;
+            int callingUid;
+            if (caller == null) {
+                callingPid = Binder.getCallingPid();
+                callingUid = Binder.getCallingUid();
+            } else {
+                callingPid = callingUid = -1;
+            }
+            
+            mConfigWillChange = config != null
+                    && mService.mConfiguration.diff(config) != 0;
+            if (DEBUG_CONFIGURATION) Slog.v(TAG,
+                    "Starting activity when config will change = " + mConfigWillChange);
+            
+            final long origId = Binder.clearCallingIdentity();
+            
+            if (mMainStack && aInfo != null &&
+                    (aInfo.applicationInfo.flags&ApplicationInfo.FLAG_HEAVY_WEIGHT) != 0) {
+                // This may be a heavy-weight process!  Check to see if we already
+                // have another, different heavy-weight process running.
+                if (aInfo.processName.equals(aInfo.applicationInfo.packageName)) {
+                    if (mService.mHeavyWeightProcess != null &&
+                            (mService.mHeavyWeightProcess.info.uid != aInfo.applicationInfo.uid ||
+                            !mService.mHeavyWeightProcess.processName.equals(aInfo.processName))) {
+                        int realCallingPid = callingPid;
+                        int realCallingUid = callingUid;
+                        if (caller != null) {
+                            ProcessRecord callerApp = mService.getRecordForAppLocked(caller);
+                            if (callerApp != null) {
+                                realCallingPid = callerApp.pid;
+                                realCallingUid = callerApp.info.uid;
+                            } else {
+                                Slog.w(TAG, "Unable to find app for caller " + caller
+                                      + " (pid=" + realCallingPid + ") when starting: "
+                                      + intent.toString());
+                                return START_PERMISSION_DENIED;
+                            }
+                        }
+                        
+                        IIntentSender target = mService.getIntentSenderLocked(
+                                IActivityManager.INTENT_SENDER_ACTIVITY, "android",
+                                realCallingUid, null, null, 0, intent,
+                                resolvedType, PendingIntent.FLAG_CANCEL_CURRENT
+                                | PendingIntent.FLAG_ONE_SHOT);
+                        
+                        Intent newIntent = new Intent();
+                        if (requestCode >= 0) {
+                            // Caller is requesting a result.
+                            newIntent.putExtra(HeavyWeightSwitcherActivity.KEY_HAS_RESULT, true);
+                        }
+                        newIntent.putExtra(HeavyWeightSwitcherActivity.KEY_INTENT,
+                                new IntentSender(target));
+                        if (mService.mHeavyWeightProcess.activities.size() > 0) {
+                            ActivityRecord hist = mService.mHeavyWeightProcess.activities.get(0);
+                            newIntent.putExtra(HeavyWeightSwitcherActivity.KEY_CUR_APP,
+                                    hist.packageName);
+                            newIntent.putExtra(HeavyWeightSwitcherActivity.KEY_CUR_TASK,
+                                    hist.task.taskId);
+                        }
+                        newIntent.putExtra(HeavyWeightSwitcherActivity.KEY_NEW_APP,
+                                aInfo.packageName);
+                        newIntent.setFlags(intent.getFlags());
+                        newIntent.setClassName("android",
+                                HeavyWeightSwitcherActivity.class.getName());
+                        intent = newIntent;
+                        resolvedType = null;
+                        caller = null;
+                        callingUid = Binder.getCallingUid();
+                        callingPid = Binder.getCallingPid();
+                        componentSpecified = true;
+                        try {
+                            ResolveInfo rInfo =
+                                AppGlobals.getPackageManager().resolveIntent(
+                                        intent, null,
+                                        PackageManager.MATCH_DEFAULT_ONLY
+                                        | ActivityManagerService.STOCK_PM_FLAGS);
+                            aInfo = rInfo != null ? rInfo.activityInfo : null;
+                        } catch (RemoteException e) {
+                            aInfo = null;
+                        }
+                    }
+                }
+            }
+            
+            int res = startActivityLocked(caller, intent, resolvedType,
+                    grantedUriPermissions, grantedMode, aInfo,
+                    resultTo, resultWho, requestCode, callingPid, callingUid,
+                    onlyIfNeeded, componentSpecified);
+            
+            if (mConfigWillChange && mMainStack) {
+                // If the caller also wants to switch to a new configuration,
+                // do so now.  This allows a clean switch, as we are waiting
+                // for the current activity to pause (so we will not destroy
+                // it), and have not yet started the next activity.
+                mService.enforceCallingPermission(android.Manifest.permission.CHANGE_CONFIGURATION,
+                        "updateConfiguration()");
+                mConfigWillChange = false;
+                if (DEBUG_CONFIGURATION) Slog.v(TAG,
+                        "Updating to new configuration after starting activity.");
+                mService.updateConfigurationLocked(config, null);
+            }
+            
+            Binder.restoreCallingIdentity(origId);
+            
+            if (outResult != null) {
+                outResult.result = res;
+                if (res == IActivityManager.START_SUCCESS) {
+                    mWaitingActivityLaunched.add(outResult);
+                    do {
+                        try {
+                            wait();
+                        } catch (InterruptedException e) {
+                        }
+                    } while (!outResult.timeout && outResult.who == null);
+                } else if (res == IActivityManager.START_TASK_TO_FRONT) {
+                    ActivityRecord r = this.topRunningActivityLocked(null);
+                    if (r.nowVisible) {
+                        outResult.timeout = false;
+                        outResult.who = new ComponentName(r.info.packageName, r.info.name);
+                        outResult.totalTime = 0;
+                        outResult.thisTime = 0;
+                    } else {
+                        outResult.thisTime = SystemClock.uptimeMillis();
+                        mWaitingActivityVisible.add(outResult);
+                        do {
+                            try {
+                                wait();
+                            } catch (InterruptedException e) {
+                            }
+                        } while (!outResult.timeout && outResult.who == null);
+                    }
+                }
+            }
+            
+            return res;
+        }
+    }
+    
+    void reportActivityLaunchedLocked(boolean timeout, ActivityRecord r,
+            long thisTime, long totalTime) {
+        for (int i=mWaitingActivityLaunched.size()-1; i>=0; i--) {
+            WaitResult w = mWaitingActivityLaunched.get(i);
+            w.timeout = timeout;
+            if (r != null) {
+                w.who = new ComponentName(r.info.packageName, r.info.name);
+            }
+            w.thisTime = thisTime;
+            w.totalTime = totalTime;
+        }
+        mService.notifyAll();
+    }
+    
+    void reportActivityVisibleLocked(ActivityRecord r) {
+        for (int i=mWaitingActivityVisible.size()-1; i>=0; i--) {
+            WaitResult w = mWaitingActivityVisible.get(i);
+            w.timeout = false;
+            if (r != null) {
+                w.who = new ComponentName(r.info.packageName, r.info.name);
+            }
+            w.totalTime = SystemClock.uptimeMillis() - w.thisTime;
+            w.thisTime = w.totalTime;
+        }
+        mService.notifyAll();
+    }
+
+    void sendActivityResultLocked(int callingUid, ActivityRecord r,
+            String resultWho, int requestCode, int resultCode, Intent data) {
+
+        if (callingUid > 0) {
+            mService.grantUriPermissionFromIntentLocked(callingUid, r.packageName,
+                    data, r);
+        }
+
+        if (DEBUG_RESULTS) Slog.v(TAG, "Send activity result to " + r
+                + " : who=" + resultWho + " req=" + requestCode
+                + " res=" + resultCode + " data=" + data);
+        if (mResumedActivity == r && r.app != null && r.app.thread != null) {
+            try {
+                ArrayList<ResultInfo> list = new ArrayList<ResultInfo>();
+                list.add(new ResultInfo(resultWho, requestCode,
+                        resultCode, data));
+                r.app.thread.scheduleSendResult(r, list);
+                return;
+            } catch (Exception e) {
+                Slog.w(TAG, "Exception thrown sending result to " + r, e);
+            }
+        }
+
+        r.addResultLocked(null, resultWho, requestCode, resultCode, data);
+    }
+
+    private final void stopActivityLocked(ActivityRecord r) {
+        if (DEBUG_SWITCH) Slog.d(TAG, "Stopping: " + r);
+        if ((r.intent.getFlags()&Intent.FLAG_ACTIVITY_NO_HISTORY) != 0
+                || (r.info.flags&ActivityInfo.FLAG_NO_HISTORY) != 0) {
+            if (!r.finishing) {
+                requestFinishActivityLocked(r, Activity.RESULT_CANCELED, null,
+                        "no-history");
+            }
+        } else if (r.app != null && r.app.thread != null) {
+            if (mMainStack) {
+                if (mService.mFocusedActivity == r) {
+                    mService.setFocusedActivityLocked(topRunningActivityLocked(null));
+                }
+            }
+            r.resumeKeyDispatchingLocked();
+            try {
+                r.stopped = false;
+                r.state = ActivityState.STOPPING;
+                if (DEBUG_VISBILITY) Slog.v(
+                        TAG, "Stopping visible=" + r.visible + " for " + r);
+                if (!r.visible) {
+                    mService.mWindowManager.setAppVisibility(r, false);
+                }
+                r.app.thread.scheduleStopActivity(r, r.visible, r.configChangeFlags);
+            } catch (Exception e) {
+                // Maybe just ignore exceptions here...  if the process
+                // has crashed, our death notification will clean things
+                // up.
+                Slog.w(TAG, "Exception thrown during pause", e);
+                // Just in case, assume it to be stopped.
+                r.stopped = true;
+                r.state = ActivityState.STOPPED;
+                if (r.configDestroy) {
+                    destroyActivityLocked(r, true);
+                }
+            }
+        }
+    }
+    
+    final ArrayList<ActivityRecord> processStoppingActivitiesLocked(
+            boolean remove) {
+        int N = mStoppingActivities.size();
+        if (N <= 0) return null;
+
+        ArrayList<ActivityRecord> stops = null;
+
+        final boolean nowVisible = mResumedActivity != null
+                && mResumedActivity.nowVisible
+                && !mResumedActivity.waitingVisible;
+        for (int i=0; i<N; i++) {
+            ActivityRecord s = mStoppingActivities.get(i);
+            if (localLOGV) Slog.v(TAG, "Stopping " + s + ": nowVisible="
+                    + nowVisible + " waitingVisible=" + s.waitingVisible
+                    + " finishing=" + s.finishing);
+            if (s.waitingVisible && nowVisible) {
+                mWaitingVisibleActivities.remove(s);
+                s.waitingVisible = false;
+                if (s.finishing) {
+                    // If this activity is finishing, it is sitting on top of
+                    // everyone else but we now know it is no longer needed...
+                    // so get rid of it.  Otherwise, we need to go through the
+                    // normal flow and hide it once we determine that it is
+                    // hidden by the activities in front of it.
+                    if (localLOGV) Slog.v(TAG, "Before stopping, can hide: " + s);
+                    mService.mWindowManager.setAppVisibility(s, false);
+                }
+            }
+            if (!s.waitingVisible && remove) {
+                if (localLOGV) Slog.v(TAG, "Ready to stop: " + s);
+                if (stops == null) {
+                    stops = new ArrayList<ActivityRecord>();
+                }
+                stops.add(s);
+                mStoppingActivities.remove(i);
+                N--;
+                i--;
+            }
+        }
+
+        return stops;
+    }
+
+    final void activityIdleInternal(IBinder token, boolean fromTimeout,
+            Configuration config) {
+        if (localLOGV) Slog.v(TAG, "Activity idle: " + token);
+
+        ArrayList<ActivityRecord> stops = null;
+        ArrayList<ActivityRecord> finishes = null;
+        ArrayList<ActivityRecord> thumbnails = null;
+        int NS = 0;
+        int NF = 0;
+        int NT = 0;
+        IApplicationThread sendThumbnail = null;
+        boolean booting = false;
+        boolean enableScreen = false;
+
+        synchronized (mService) {
+            if (token != null) {
+                mHandler.removeMessages(IDLE_TIMEOUT_MSG, token);
+            }
+
+            // Get the activity record.
+            int index = indexOfTokenLocked(token);
+            if (index >= 0) {
+                ActivityRecord r = (ActivityRecord)mHistory.get(index);
+
+                if (fromTimeout) {
+                    reportActivityLaunchedLocked(fromTimeout, r, -1, -1);
+                }
+                
+                // This is a hack to semi-deal with a race condition
+                // in the client where it can be constructed with a
+                // newer configuration from when we asked it to launch.
+                // We'll update with whatever configuration it now says
+                // it used to launch.
+                if (config != null) {
+                    r.configuration = config;
+                }
+                
+                // No longer need to keep the device awake.
+                if (mResumedActivity == r && mLaunchingActivity.isHeld()) {
+                    mHandler.removeMessages(LAUNCH_TIMEOUT_MSG);
+                    mLaunchingActivity.release();
+                }
+
+                // We are now idle.  If someone is waiting for a thumbnail from
+                // us, we can now deliver.
+                r.idle = true;
+                mService.scheduleAppGcsLocked();
+                if (r.thumbnailNeeded && r.app != null && r.app.thread != null) {
+                    sendThumbnail = r.app.thread;
+                    r.thumbnailNeeded = false;
+                }
+
+                // If this activity is fullscreen, set up to hide those under it.
+
+                if (DEBUG_VISBILITY) Slog.v(TAG, "Idle activity for " + r);
+                ensureActivitiesVisibleLocked(null, 0);
+
+                //Slog.i(TAG, "IDLE: mBooted=" + mBooted + ", fromTimeout=" + fromTimeout);
+                if (mMainStack) {
+                    if (!mService.mBooted && !fromTimeout) {
+                        mService.mBooted = true;
+                        enableScreen = true;
+                    }
+                }
+                
+            } else if (fromTimeout) {
+                reportActivityLaunchedLocked(fromTimeout, null, -1, -1);
+            }
+
+            // Atomically retrieve all of the other things to do.
+            stops = processStoppingActivitiesLocked(true);
+            NS = stops != null ? stops.size() : 0;
+            if ((NF=mFinishingActivities.size()) > 0) {
+                finishes = new ArrayList<ActivityRecord>(mFinishingActivities);
+                mFinishingActivities.clear();
+            }
+            if ((NT=mService.mCancelledThumbnails.size()) > 0) {
+                thumbnails = new ArrayList<ActivityRecord>(mService.mCancelledThumbnails);
+                mService.mCancelledThumbnails.clear();
+            }
+
+            if (mMainStack) {
+                booting = mService.mBooting;
+                mService.mBooting = false;
+            }
+        }
+
+        int i;
+
+        // Send thumbnail if requested.
+        if (sendThumbnail != null) {
+            try {
+                sendThumbnail.requestThumbnail(token);
+            } catch (Exception e) {
+                Slog.w(TAG, "Exception thrown when requesting thumbnail", e);
+                mService.sendPendingThumbnail(null, token, null, null, true);
+            }
+        }
+
+        // Stop any activities that are scheduled to do so but have been
+        // waiting for the next one to start.
+        for (i=0; i<NS; i++) {
+            ActivityRecord r = (ActivityRecord)stops.get(i);
+            synchronized (mService) {
+                if (r.finishing) {
+                    finishCurrentActivityLocked(r, FINISH_IMMEDIATELY);
+                } else {
+                    stopActivityLocked(r);
+                }
+            }
+        }
+
+        // Finish any activities that are scheduled to do so but have been
+        // waiting for the next one to start.
+        for (i=0; i<NF; i++) {
+            ActivityRecord r = (ActivityRecord)finishes.get(i);
+            synchronized (mService) {
+                destroyActivityLocked(r, true);
+            }
+        }
+
+        // Report back to any thumbnail receivers.
+        for (i=0; i<NT; i++) {
+            ActivityRecord r = (ActivityRecord)thumbnails.get(i);
+            mService.sendPendingThumbnail(r, null, null, null, true);
+        }
+
+        if (booting) {
+            mService.finishBooting();
+        }
+
+        mService.trimApplications();
+        //dump();
+        //mWindowManager.dump();
+
+        if (enableScreen) {
+            mService.enableScreenAfterBoot();
+        }
+    }
+
+    /**
+     * @return Returns true if the activity is being finished, false if for
+     * some reason it is being left as-is.
+     */
+    final boolean requestFinishActivityLocked(IBinder token, int resultCode,
+            Intent resultData, String reason) {
+        if (DEBUG_RESULTS) Slog.v(
+            TAG, "Finishing activity: token=" + token
+            + ", result=" + resultCode + ", data=" + resultData);
+
+        int index = indexOfTokenLocked(token);
+        if (index < 0) {
+            return false;
+        }
+        ActivityRecord r = (ActivityRecord)mHistory.get(index);
+
+        // Is this the last activity left?
+        boolean lastActivity = true;
+        for (int i=mHistory.size()-1; i>=0; i--) {
+            ActivityRecord p = (ActivityRecord)mHistory.get(i);
+            if (!p.finishing && p != r) {
+                lastActivity = false;
+                break;
+            }
+        }
+        
+        // If this is the last activity, but it is the home activity, then
+        // just don't finish it.
+        if (lastActivity) {
+            if (r.intent.hasCategory(Intent.CATEGORY_HOME)) {
+                return false;
+            }
+        }
+        
+        finishActivityLocked(r, index, resultCode, resultData, reason);
+        return true;
+    }
+
+    /**
+     * @return Returns true if this activity has been removed from the history
+     * list, or false if it is still in the list and will be removed later.
+     */
+    final boolean finishActivityLocked(ActivityRecord r, int index,
+            int resultCode, Intent resultData, String reason) {
+        if (r.finishing) {
+            Slog.w(TAG, "Duplicate finish request for " + r);
+            return false;
+        }
+
+        r.finishing = true;
+        EventLog.writeEvent(EventLogTags.AM_FINISH_ACTIVITY,
+                System.identityHashCode(r),
+                r.task.taskId, r.shortComponentName, reason);
+        r.task.numActivities--;
+        if (index < (mHistory.size()-1)) {
+            ActivityRecord next = (ActivityRecord)mHistory.get(index+1);
+            if (next.task == r.task) {
+                if (r.frontOfTask) {
+                    // The next activity is now the front of the task.
+                    next.frontOfTask = true;
+                }
+                if ((r.intent.getFlags()&Intent.FLAG_ACTIVITY_CLEAR_WHEN_TASK_RESET) != 0) {
+                    // If the caller asked that this activity (and all above it)
+                    // be cleared when the task is reset, don't lose that information,
+                    // but propagate it up to the next activity.
+                    next.intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_WHEN_TASK_RESET);
+                }
+            }
+        }
+
+        r.pauseKeyDispatchingLocked();
+        if (mMainStack) {
+            if (mService.mFocusedActivity == r) {
+                mService.setFocusedActivityLocked(topRunningActivityLocked(null));
+            }
+        }
+
+        // send the result
+        ActivityRecord resultTo = r.resultTo;
+        if (resultTo != null) {
+            if (DEBUG_RESULTS) Slog.v(TAG, "Adding result to " + resultTo
+                    + " who=" + r.resultWho + " req=" + r.requestCode
+                    + " res=" + resultCode + " data=" + resultData);
+            if (r.info.applicationInfo.uid > 0) {
+                mService.grantUriPermissionFromIntentLocked(r.info.applicationInfo.uid,
+                        r.packageName, resultData, r);
+            }
+            resultTo.addResultLocked(r, r.resultWho, r.requestCode, resultCode,
+                                     resultData);
+            r.resultTo = null;
+        }
+        else if (DEBUG_RESULTS) Slog.v(TAG, "No result destination from " + r);
+
+        // Make sure this HistoryRecord is not holding on to other resources,
+        // because clients have remote IPC references to this object so we
+        // can't assume that will go away and want to avoid circular IPC refs.
+        r.results = null;
+        r.pendingResults = null;
+        r.newIntents = null;
+        r.icicle = null;
+        
+        if (mService.mPendingThumbnails.size() > 0) {
+            // There are clients waiting to receive thumbnails so, in case
+            // this is an activity that someone is waiting for, add it
+            // to the pending list so we can correctly update the clients.
+            mService.mCancelledThumbnails.add(r);
+        }
+
+        if (mResumedActivity == r) {
+            boolean endTask = index <= 0
+                    || ((ActivityRecord)mHistory.get(index-1)).task != r.task;
+            if (DEBUG_TRANSITION) Slog.v(TAG,
+                    "Prepare close transition: finishing " + r);
+            mService.mWindowManager.prepareAppTransition(endTask
+                    ? WindowManagerPolicy.TRANSIT_TASK_CLOSE
+                    : WindowManagerPolicy.TRANSIT_ACTIVITY_CLOSE);
+    
+            // Tell window manager to prepare for this one to be removed.
+            mService.mWindowManager.setAppVisibility(r, false);
+                
+            if (mPausingActivity == null) {
+                if (DEBUG_PAUSE) Slog.v(TAG, "Finish needs to pause: " + r);
+                if (DEBUG_USER_LEAVING) Slog.v(TAG, "finish() => pause with userLeaving=false");
+                startPausingLocked(false, false);
+            }
+
+        } else if (r.state != ActivityState.PAUSING) {
+            // If the activity is PAUSING, we will complete the finish once
+            // it is done pausing; else we can just directly finish it here.
+            if (DEBUG_PAUSE) Slog.v(TAG, "Finish not pausing: " + r);
+            return finishCurrentActivityLocked(r, index,
+                    FINISH_AFTER_PAUSE) == null;
+        } else {
+            if (DEBUG_PAUSE) Slog.v(TAG, "Finish waiting for pause of: " + r);
+        }
+
+        return false;
+    }
+
+    private static final int FINISH_IMMEDIATELY = 0;
+    private static final int FINISH_AFTER_PAUSE = 1;
+    private static final int FINISH_AFTER_VISIBLE = 2;
+
+    private final ActivityRecord finishCurrentActivityLocked(ActivityRecord r,
+            int mode) {
+        final int index = indexOfTokenLocked(r);
+        if (index < 0) {
+            return null;
+        }
+
+        return finishCurrentActivityLocked(r, index, mode);
+    }
+
+    private final ActivityRecord finishCurrentActivityLocked(ActivityRecord r,
+            int index, int mode) {
+        // First things first: if this activity is currently visible,
+        // and the resumed activity is not yet visible, then hold off on
+        // finishing until the resumed one becomes visible.
+        if (mode == FINISH_AFTER_VISIBLE && r.nowVisible) {
+            if (!mStoppingActivities.contains(r)) {
+                mStoppingActivities.add(r);
+                if (mStoppingActivities.size() > 3) {
+                    // If we already have a few activities waiting to stop,
+                    // then give up on things going idle and start clearing
+                    // them out.
+                    Message msg = Message.obtain();
+                    msg.what = IDLE_NOW_MSG;
+                    mHandler.sendMessage(msg);
+                }
+            }
+            r.state = ActivityState.STOPPING;
+            mService.updateOomAdjLocked();
+            return r;
+        }
+
+        // make sure the record is cleaned out of other places.
+        mStoppingActivities.remove(r);
+        mWaitingVisibleActivities.remove(r);
+        if (mResumedActivity == r) {
+            mResumedActivity = null;
+        }
+        final ActivityState prevState = r.state;
+        r.state = ActivityState.FINISHING;
+
+        if (mode == FINISH_IMMEDIATELY
+                || prevState == ActivityState.STOPPED
+                || prevState == ActivityState.INITIALIZING) {
+            // If this activity is already stopped, we can just finish
+            // it right now.
+            return destroyActivityLocked(r, true) ? null : r;
+        } else {
+            // Need to go through the full pause cycle to get this
+            // activity into the stopped state and then finish it.
+            if (localLOGV) Slog.v(TAG, "Enqueueing pending finish: " + r);
+            mFinishingActivities.add(r);
+            resumeTopActivityLocked(null);
+        }
+        return r;
+    }
+
+    /**
+     * Perform the common clean-up of an activity record.  This is called both
+     * as part of destroyActivityLocked() (when destroying the client-side
+     * representation) and cleaning things up as a result of its hosting
+     * processing going away, in which case there is no remaining client-side
+     * state to destroy so only the cleanup here is needed.
+     */
+    final void cleanUpActivityLocked(ActivityRecord r, boolean cleanServices) {
+        if (mResumedActivity == r) {
+            mResumedActivity = null;
+        }
+        if (mService.mFocusedActivity == r) {
+            mService.mFocusedActivity = null;
+        }
+
+        r.configDestroy = false;
+        r.frozenBeforeDestroy = false;
+
+        // Make sure this record is no longer in the pending finishes list.
+        // This could happen, for example, if we are trimming activities
+        // down to the max limit while they are still waiting to finish.
+        mFinishingActivities.remove(r);
+        mWaitingVisibleActivities.remove(r);
+        
+        // Remove any pending results.
+        if (r.finishing && r.pendingResults != null) {
+            for (WeakReference<PendingIntentRecord> apr : r.pendingResults) {
+                PendingIntentRecord rec = apr.get();
+                if (rec != null) {
+                    mService.cancelIntentSenderLocked(rec, false);
+                }
+            }
+            r.pendingResults = null;
+        }
+
+        if (cleanServices) {
+            cleanUpActivityServicesLocked(r);            
+        }
+
+        if (mService.mPendingThumbnails.size() > 0) {
+            // There are clients waiting to receive thumbnails so, in case
+            // this is an activity that someone is waiting for, add it
+            // to the pending list so we can correctly update the clients.
+            mService.mCancelledThumbnails.add(r);
+        }
+
+        // Get rid of any pending idle timeouts.
+        mHandler.removeMessages(PAUSE_TIMEOUT_MSG, r);
+        mHandler.removeMessages(IDLE_TIMEOUT_MSG, r);
+    }
+
+    private final void removeActivityFromHistoryLocked(ActivityRecord r) {
+        if (r.state != ActivityState.DESTROYED) {
+            mHistory.remove(r);
+            r.inHistory = false;
+            r.state = ActivityState.DESTROYED;
+            mService.mWindowManager.removeAppToken(r);
+            if (VALIDATE_TOKENS) {
+                mService.mWindowManager.validateAppTokens(mHistory);
+            }
+            cleanUpActivityServicesLocked(r);
+            r.removeUriPermissionsLocked();
+        }
+    }
+    
+    /**
+     * Perform clean-up of service connections in an activity record.
+     */
+    final void cleanUpActivityServicesLocked(ActivityRecord r) {
+        // Throw away any services that have been bound by this activity.
+        if (r.connections != null) {
+            Iterator<ConnectionRecord> it = r.connections.iterator();
+            while (it.hasNext()) {
+                ConnectionRecord c = it.next();
+                mService.removeConnectionLocked(c, null, r);
+            }
+            r.connections = null;
+        }
+    }
+    
+    /**
+     * Destroy the current CLIENT SIDE instance of an activity.  This may be
+     * called both when actually finishing an activity, or when performing
+     * a configuration switch where we destroy the current client-side object
+     * but then create a new client-side object for this same HistoryRecord.
+     */
+    final boolean destroyActivityLocked(ActivityRecord r,
+            boolean removeFromApp) {
+        if (DEBUG_SWITCH) Slog.v(
+            TAG, "Removing activity: token=" + r
+              + ", app=" + (r.app != null ? r.app.processName : "(null)"));
+        EventLog.writeEvent(EventLogTags.AM_DESTROY_ACTIVITY,
+                System.identityHashCode(r),
+                r.task.taskId, r.shortComponentName);
+
+        boolean removedFromHistory = false;
+        
+        cleanUpActivityLocked(r, false);
+
+        final boolean hadApp = r.app != null;
+        
+        if (hadApp) {
+            if (removeFromApp) {
+                int idx = r.app.activities.indexOf(r);
+                if (idx >= 0) {
+                    r.app.activities.remove(idx);
+                }
+                if (mService.mHeavyWeightProcess == r.app && r.app.activities.size() <= 0) {
+                    mService.mHeavyWeightProcess = null;
+                    mService.mHandler.sendEmptyMessage(
+                            ActivityManagerService.CANCEL_HEAVY_NOTIFICATION_MSG);
+                }
+                if (r.persistent) {
+                    mService.decPersistentCountLocked(r.app);
+                }
+                if (r.app.activities.size() == 0) {
+                    // No longer have activities, so update location in
+                    // LRU list.
+                    mService.updateLruProcessLocked(r.app, true, false);
+                }
+            }
+
+            boolean skipDestroy = false;
+            
+            try {
+                if (DEBUG_SWITCH) Slog.i(TAG, "Destroying: " + r);
+                r.app.thread.scheduleDestroyActivity(r, r.finishing,
+                        r.configChangeFlags);
+            } catch (Exception e) {
+                // We can just ignore exceptions here...  if the process
+                // has crashed, our death notification will clean things
+                // up.
+                //Slog.w(TAG, "Exception thrown during finish", e);
+                if (r.finishing) {
+                    removeActivityFromHistoryLocked(r);
+                    removedFromHistory = true;
+                    skipDestroy = true;
+                }
+            }
+
+            r.app = null;
+            r.nowVisible = false;
+            
+            if (r.finishing && !skipDestroy) {
+                r.state = ActivityState.DESTROYING;
+                Message msg = mHandler.obtainMessage(DESTROY_TIMEOUT_MSG);
+                msg.obj = r;
+                mHandler.sendMessageDelayed(msg, DESTROY_TIMEOUT);
+            } else {
+                r.state = ActivityState.DESTROYED;
+            }
+        } else {
+            // remove this record from the history.
+            if (r.finishing) {
+                removeActivityFromHistoryLocked(r);
+                removedFromHistory = true;
+            } else {
+                r.state = ActivityState.DESTROYED;
+            }
+        }
+
+        r.configChangeFlags = 0;
+        
+        if (!mLRUActivities.remove(r) && hadApp) {
+            Slog.w(TAG, "Activity " + r + " being finished, but not in LRU list");
+        }
+        
+        return removedFromHistory;
+    }
+
+    final void activityDestroyed(IBinder token) {
+        synchronized (mService) {
+            mHandler.removeMessages(DESTROY_TIMEOUT_MSG, token);
+            
+            int index = indexOfTokenLocked(token);
+            if (index >= 0) {
+                ActivityRecord r = (ActivityRecord)mHistory.get(index);
+                if (r.state == ActivityState.DESTROYING) {
+                    final long origId = Binder.clearCallingIdentity();
+                    removeActivityFromHistoryLocked(r);
+                    Binder.restoreCallingIdentity(origId);
+                }
+            }
+        }
+    }
+    
+    private static void removeHistoryRecordsForAppLocked(ArrayList list, ProcessRecord app) {
+        int i = list.size();
+        if (localLOGV) Slog.v(
+            TAG, "Removing app " + app + " from list " + list
+            + " with " + i + " entries");
+        while (i > 0) {
+            i--;
+            ActivityRecord r = (ActivityRecord)list.get(i);
+            if (localLOGV) Slog.v(
+                TAG, "Record #" + i + " " + r + ": app=" + r.app);
+            if (r.app == app) {
+                if (localLOGV) Slog.v(TAG, "Removing this entry!");
+                list.remove(i);
+            }
+        }
+    }
+
+    void removeHistoryRecordsForAppLocked(ProcessRecord app) {
+        removeHistoryRecordsForAppLocked(mLRUActivities, app);
+        removeHistoryRecordsForAppLocked(mStoppingActivities, app);
+        removeHistoryRecordsForAppLocked(mWaitingVisibleActivities, app);
+        removeHistoryRecordsForAppLocked(mFinishingActivities, app);
+    }
+    
+    final void moveTaskToFrontLocked(TaskRecord tr, ActivityRecord reason) {
+        if (DEBUG_SWITCH) Slog.v(TAG, "moveTaskToFront: " + tr);
+
+        final int task = tr.taskId;
+        int top = mHistory.size()-1;
+
+        if (top < 0 || ((ActivityRecord)mHistory.get(top)).task.taskId == task) {
+            // nothing to do!
+            return;
+        }
+
+        ArrayList moved = new ArrayList();
+
+        // Applying the affinities may have removed entries from the history,
+        // so get the size again.
+        top = mHistory.size()-1;
+        int pos = top;
+
+        // Shift all activities with this task up to the top
+        // of the stack, keeping them in the same internal order.
+        while (pos >= 0) {
+            ActivityRecord r = (ActivityRecord)mHistory.get(pos);
+            if (localLOGV) Slog.v(
+                TAG, "At " + pos + " ckp " + r.task + ": " + r);
+            boolean first = true;
+            if (r.task.taskId == task) {
+                if (localLOGV) Slog.v(TAG, "Removing and adding at " + top);
+                mHistory.remove(pos);
+                mHistory.add(top, r);
+                moved.add(0, r);
+                top--;
+                if (first && mMainStack) {
+                    mService.addRecentTaskLocked(r.task);
+                    first = false;
+                }
+            }
+            pos--;
+        }
+
+        if (DEBUG_TRANSITION) Slog.v(TAG,
+                "Prepare to front transition: task=" + tr);
+        if (reason != null &&
+                (reason.intent.getFlags()&Intent.FLAG_ACTIVITY_NO_ANIMATION) != 0) {
+            mService.mWindowManager.prepareAppTransition(WindowManagerPolicy.TRANSIT_NONE);
+            ActivityRecord r = topRunningActivityLocked(null);
+            if (r != null) {
+                mNoAnimActivities.add(r);
+            }
+        } else {
+            mService.mWindowManager.prepareAppTransition(WindowManagerPolicy.TRANSIT_TASK_TO_FRONT);
+        }
+        
+        mService.mWindowManager.moveAppTokensToTop(moved);
+        if (VALIDATE_TOKENS) {
+            mService.mWindowManager.validateAppTokens(mHistory);
+        }
+
+        finishTaskMoveLocked(task);
+        EventLog.writeEvent(EventLogTags.AM_TASK_TO_FRONT, task);
+    }
+
+    private final void finishTaskMoveLocked(int task) {
+        resumeTopActivityLocked(null);
+    }
+
+    /**
+     * Worker method for rearranging history stack.  Implements the function of moving all 
+     * activities for a specific task (gathering them if disjoint) into a single group at the 
+     * bottom of the stack.
+     * 
+     * If a watcher is installed, the action is preflighted and the watcher has an opportunity
+     * to premeptively cancel the move.
+     * 
+     * @param task The taskId to collect and move to the bottom.
+     * @return Returns true if the move completed, false if not.
+     */
+    final boolean moveTaskToBackLocked(int task, ActivityRecord reason) {
+        Slog.i(TAG, "moveTaskToBack: " + task);
+        
+        // If we have a watcher, preflight the move before committing to it.  First check
+        // for *other* available tasks, but if none are available, then try again allowing the
+        // current task to be selected.
+        if (mMainStack && mService.mController != null) {
+            ActivityRecord next = topRunningActivityLocked(null, task);
+            if (next == null) {
+                next = topRunningActivityLocked(null, 0);
+            }
+            if (next != null) {
+                // ask watcher if this is allowed
+                boolean moveOK = true;
+                try {
+                    moveOK = mService.mController.activityResuming(next.packageName);
+                } catch (RemoteException e) {
+                    mService.mController = null;
+                }
+                if (!moveOK) {
+                    return false;
+                }
+            }
+        }
+
+        ArrayList moved = new ArrayList();
+
+        if (DEBUG_TRANSITION) Slog.v(TAG,
+                "Prepare to back transition: task=" + task);
+        
+        final int N = mHistory.size();
+        int bottom = 0;
+        int pos = 0;
+
+        // Shift all activities with this task down to the bottom
+        // of the stack, keeping them in the same internal order.
+        while (pos < N) {
+            ActivityRecord r = (ActivityRecord)mHistory.get(pos);
+            if (localLOGV) Slog.v(
+                TAG, "At " + pos + " ckp " + r.task + ": " + r);
+            if (r.task.taskId == task) {
+                if (localLOGV) Slog.v(TAG, "Removing and adding at " + (N-1));
+                mHistory.remove(pos);
+                mHistory.add(bottom, r);
+                moved.add(r);
+                bottom++;
+            }
+            pos++;
+        }
+
+        if (reason != null &&
+                (reason.intent.getFlags()&Intent.FLAG_ACTIVITY_NO_ANIMATION) != 0) {
+            mService.mWindowManager.prepareAppTransition(WindowManagerPolicy.TRANSIT_NONE);
+            ActivityRecord r = topRunningActivityLocked(null);
+            if (r != null) {
+                mNoAnimActivities.add(r);
+            }
+        } else {
+            mService.mWindowManager.prepareAppTransition(WindowManagerPolicy.TRANSIT_TASK_TO_BACK);
+        }
+        mService.mWindowManager.moveAppTokensToBottom(moved);
+        if (VALIDATE_TOKENS) {
+            mService.mWindowManager.validateAppTokens(mHistory);
+        }
+
+        finishTaskMoveLocked(task);
+        return true;
+    }
+    
+    private final void logStartActivity(int tag, ActivityRecord r,
+            TaskRecord task) {
+        EventLog.writeEvent(tag,
+                System.identityHashCode(r), task.taskId,
+                r.shortComponentName, r.intent.getAction(),
+                r.intent.getType(), r.intent.getDataString(),
+                r.intent.getFlags());
+    }
+
+    /**
+     * Make sure the given activity matches the current configuration.  Returns
+     * false if the activity had to be destroyed.  Returns true if the
+     * configuration is the same, or the activity will remain running as-is
+     * for whatever reason.  Ensures the HistoryRecord is updated with the
+     * correct configuration and all other bookkeeping is handled.
+     */
+    final boolean ensureActivityConfigurationLocked(ActivityRecord r,
+            int globalChanges) {
+        if (mConfigWillChange) {
+            if (DEBUG_SWITCH || DEBUG_CONFIGURATION) Slog.v(TAG,
+                    "Skipping config check (will change): " + r);
+            return true;
+        }
+        
+        if (DEBUG_SWITCH || DEBUG_CONFIGURATION) Slog.v(TAG,
+                "Ensuring correct configuration: " + r);
+        
+        // Short circuit: if the two configurations are the exact same
+        // object (the common case), then there is nothing to do.
+        Configuration newConfig = mService.mConfiguration;
+        if (r.configuration == newConfig) {
+            if (DEBUG_SWITCH || DEBUG_CONFIGURATION) Slog.v(TAG,
+                    "Configuration unchanged in " + r);
+            return true;
+        }
+        
+        // We don't worry about activities that are finishing.
+        if (r.finishing) {
+            if (DEBUG_SWITCH || DEBUG_CONFIGURATION) Slog.v(TAG,
+                    "Configuration doesn't matter in finishing " + r);
+            r.stopFreezingScreenLocked(false);
+            return true;
+        }
+        
+        // Okay we now are going to make this activity have the new config.
+        // But then we need to figure out how it needs to deal with that.
+        Configuration oldConfig = r.configuration;
+        r.configuration = newConfig;
+        
+        // If the activity isn't currently running, just leave the new
+        // configuration and it will pick that up next time it starts.
+        if (r.app == null || r.app.thread == null) {
+            if (DEBUG_SWITCH || DEBUG_CONFIGURATION) Slog.v(TAG,
+                    "Configuration doesn't matter not running " + r);
+            r.stopFreezingScreenLocked(false);
+            return true;
+        }
+        
+        // If the activity isn't persistent, there is a chance we will
+        // need to restart it.
+        if (!r.persistent) {
+
+            // Figure out what has changed between the two configurations.
+            int changes = oldConfig.diff(newConfig);
+            if (DEBUG_SWITCH || DEBUG_CONFIGURATION) {
+                Slog.v(TAG, "Checking to restart " + r.info.name + ": changed=0x"
+                        + Integer.toHexString(changes) + ", handles=0x"
+                        + Integer.toHexString(r.info.configChanges)
+                        + ", newConfig=" + newConfig);
+            }
+            if ((changes&(~r.info.configChanges)) != 0) {
+                // Aha, the activity isn't handling the change, so DIE DIE DIE.
+                r.configChangeFlags |= changes;
+                r.startFreezingScreenLocked(r.app, globalChanges);
+                if (r.app == null || r.app.thread == null) {
+                    if (DEBUG_SWITCH || DEBUG_CONFIGURATION) Slog.v(TAG,
+                            "Switch is destroying non-running " + r);
+                    destroyActivityLocked(r, true);
+                } else if (r.state == ActivityState.PAUSING) {
+                    // A little annoying: we are waiting for this activity to
+                    // finish pausing.  Let's not do anything now, but just
+                    // flag that it needs to be restarted when done pausing.
+                    if (DEBUG_SWITCH || DEBUG_CONFIGURATION) Slog.v(TAG,
+                            "Switch is skipping already pausing " + r);
+                    r.configDestroy = true;
+                    return true;
+                } else if (r.state == ActivityState.RESUMED) {
+                    // Try to optimize this case: the configuration is changing
+                    // and we need to restart the top, resumed activity.
+                    // Instead of doing the normal handshaking, just say
+                    // "restart!".
+                    if (DEBUG_SWITCH || DEBUG_CONFIGURATION) Slog.v(TAG,
+                            "Switch is restarting resumed " + r);
+                    relaunchActivityLocked(r, r.configChangeFlags, true);
+                    r.configChangeFlags = 0;
+                } else {
+                    if (DEBUG_SWITCH || DEBUG_CONFIGURATION) Slog.v(TAG,
+                            "Switch is restarting non-resumed " + r);
+                    relaunchActivityLocked(r, r.configChangeFlags, false);
+                    r.configChangeFlags = 0;
+                }
+                
+                // All done...  tell the caller we weren't able to keep this
+                // activity around.
+                return false;
+            }
+        }
+        
+        // Default case: the activity can handle this new configuration, so
+        // hand it over.  Note that we don't need to give it the new
+        // configuration, since we always send configuration changes to all
+        // process when they happen so it can just use whatever configuration
+        // it last got.
+        if (r.app != null && r.app.thread != null) {
+            try {
+                if (DEBUG_CONFIGURATION) Slog.v(TAG, "Sending new config to " + r);
+                r.app.thread.scheduleActivityConfigurationChanged(r);
+            } catch (RemoteException e) {
+                // If process died, whatever.
+            }
+        }
+        r.stopFreezingScreenLocked(false);
+        
+        return true;
+    }
+
+    private final boolean relaunchActivityLocked(ActivityRecord r,
+            int changes, boolean andResume) {
+        List<ResultInfo> results = null;
+        List<Intent> newIntents = null;
+        if (andResume) {
+            results = r.results;
+            newIntents = r.newIntents;
+        }
+        if (DEBUG_SWITCH) Slog.v(TAG, "Relaunching: " + r
+                + " with results=" + results + " newIntents=" + newIntents
+                + " andResume=" + andResume);
+        EventLog.writeEvent(andResume ? EventLogTags.AM_RELAUNCH_RESUME_ACTIVITY
+                : EventLogTags.AM_RELAUNCH_ACTIVITY, System.identityHashCode(r),
+                r.task.taskId, r.shortComponentName);
+        
+        r.startFreezingScreenLocked(r.app, 0);
+        
+        try {
+            if (DEBUG_SWITCH) Slog.i(TAG, "Switch is restarting resumed " + r);
+            r.app.thread.scheduleRelaunchActivity(r, results, newIntents,
+                    changes, !andResume, mService.mConfiguration);
+            // Note: don't need to call pauseIfSleepingLocked() here, because
+            // the caller will only pass in 'andResume' if this activity is
+            // currently resumed, which implies we aren't sleeping.
+        } catch (RemoteException e) {
+            return false;
+        }
+
+        if (andResume) {
+            r.results = null;
+            r.newIntents = null;
+            if (mMainStack) {
+                mService.reportResumedActivityLocked(r);
+            }
+        }
+
+        return true;
+    }
+}
diff --git a/services/java/com/android/server/am/AppErrorDialog.java b/services/java/com/android/server/am/AppErrorDialog.java
index 3a1aad6..a769c05 100644
--- a/services/java/com/android/server/am/AppErrorDialog.java
+++ b/services/java/com/android/server/am/AppErrorDialog.java
@@ -80,9 +80,6 @@
                 DISMISS_TIMEOUT);
     }
 
-    public void onStop() {
-    }
-
     private final Handler mHandler = new Handler() {
         public void handleMessage(Message msg) {
             synchronized (mProc) {
diff --git a/services/java/com/android/server/am/AppNotRespondingDialog.java b/services/java/com/android/server/am/AppNotRespondingDialog.java
index 9702f91..b2737dc 100644
--- a/services/java/com/android/server/am/AppNotRespondingDialog.java
+++ b/services/java/com/android/server/am/AppNotRespondingDialog.java
@@ -40,7 +40,7 @@
     private final ProcessRecord mProc;
     
     public AppNotRespondingDialog(ActivityManagerService service, Context context,
-            ProcessRecord app, HistoryRecord activity) {
+            ProcessRecord app, ActivityRecord activity) {
         super(context);
         
         mService = service;
diff --git a/services/java/com/android/server/am/BatteryStatsService.java b/services/java/com/android/server/am/BatteryStatsService.java
index 33bbc13..37da6f7 100644
--- a/services/java/com/android/server/am/BatteryStatsService.java
+++ b/services/java/com/android/server/am/BatteryStatsService.java
@@ -59,7 +59,7 @@
     public void shutdown() {
         Slog.w("BatteryStats", "Writing battery stats before shutdown...");
         synchronized (mStats) {
-            mStats.writeLocked();
+            mStats.shutdownLocked();
         }
     }
     
@@ -124,14 +124,14 @@
     public void noteStartGps(int uid) {
         enforceCallingPermission();
         synchronized (mStats) {
-            mStats.noteStartGps(uid);
+            mStats.noteStartGpsLocked(uid);
         }
     }
     
     public void noteStopGps(int uid) {
         enforceCallingPermission();
         synchronized (mStats) {
-            mStats.noteStopGps(uid);
+            mStats.noteStopGpsLocked(uid);
         }
     }
         
@@ -321,14 +321,10 @@
         return mStats.isOnBattery();
     }
     
-    public void setOnBattery(boolean onBattery, int level) {
+    public void setBatteryState(int status, int health, int plugType, int level,
+            int temp, int volt) {
         enforceCallingPermission();
-        mStats.setOnBattery(onBattery, level);
-    }
-    
-    public void recordCurrentLevel(int level) {
-        enforceCallingPermission();
-        mStats.recordCurrentLevel(level);
+        mStats.setBatteryState(status, health, plugType, level, temp, volt);
     }
     
     public long getAwakeTimeBattery() {
@@ -359,7 +355,8 @@
                 for (String arg : args) {
                     if ("--checkin".equals(arg)) {
                         isCheckin = true;
-                        break;
+                    } else if ("--reset".equals(arg)) {
+                        mStats.resetAllStatsLocked();
                     }
                 }
             }
diff --git a/services/java/com/android/server/am/ConnectionRecord.java b/services/java/com/android/server/am/ConnectionRecord.java
index f613b00..22acda9 100644
--- a/services/java/com/android/server/am/ConnectionRecord.java
+++ b/services/java/com/android/server/am/ConnectionRecord.java
@@ -26,7 +26,7 @@
  */
 class ConnectionRecord {
     final AppBindRecord binding;    // The application/service binding.
-    final HistoryRecord activity;   // If non-null, the owning activity.
+    final ActivityRecord activity;   // If non-null, the owning activity.
     final IServiceConnection conn;  // The client connection.
     final int flags;                // Binding options.
     final int clientLabel;          // String resource labeling this client.
@@ -42,7 +42,7 @@
                 + " flags=0x" + Integer.toHexString(flags));
     }
     
-    ConnectionRecord(AppBindRecord _binding, HistoryRecord _activity,
+    ConnectionRecord(AppBindRecord _binding, ActivityRecord _activity,
                IServiceConnection _conn, int _flags,
                int _clientLabel, PendingIntent _clientIntent) {
         binding = _binding;
diff --git a/services/java/com/android/server/am/ContentProviderRecord.java b/services/java/com/android/server/am/ContentProviderRecord.java
index c764635..44c9742 100644
--- a/services/java/com/android/server/am/ContentProviderRecord.java
+++ b/services/java/com/android/server/am/ContentProviderRecord.java
@@ -17,6 +17,7 @@
 package com.android.server.am;
 
 import android.app.IActivityManager.ContentProviderHolder;
+import android.content.ComponentName;
 import android.content.pm.ApplicationInfo;
 import android.content.pm.ProviderInfo;
 import android.os.Process;
@@ -29,6 +30,7 @@
     final HashSet<ProcessRecord> clients = new HashSet<ProcessRecord>();
     final int uid;
     final ApplicationInfo appInfo;
+    final ComponentName name;
     int externals;     // number of non-framework processes supported by this provider
     ProcessRecord app; // if non-null, hosting application
     ProcessRecord launchingApp; // if non-null, waiting for this app to be launched.
@@ -38,6 +40,7 @@
         super(_info);
         uid = ai.uid;
         appInfo = ai;
+        name = new ComponentName(_info.packageName, _info.name);
         noReleaseNeeded = uid == 0 || uid == Process.SYSTEM_UID;
     }
 
@@ -45,6 +48,7 @@
         super(cpr.info);
         uid = cpr.uid;
         appInfo = cpr.appInfo;
+        name = cpr.name;
         noReleaseNeeded = cpr.noReleaseNeeded;
     }
 
diff --git a/services/java/com/android/server/am/HistoryRecord.java b/services/java/com/android/server/am/HistoryRecord.java
deleted file mode 100644
index dca7a99..0000000
--- a/services/java/com/android/server/am/HistoryRecord.java
+++ /dev/null
@@ -1,531 +0,0 @@
-/*
- * Copyright (C) 2006 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.android.server.am;
-
-import com.android.server.AttributeCache;
-import com.android.server.am.ActivityManagerService.ActivityState;
-
-import android.app.Activity;
-import android.content.ComponentName;
-import android.content.Intent;
-import android.content.pm.ActivityInfo;
-import android.content.pm.ApplicationInfo;
-import android.content.res.Configuration;
-import android.graphics.Bitmap;
-import android.os.Bundle;
-import android.os.Message;
-import android.os.Process;
-import android.os.SystemClock;
-import android.util.EventLog;
-import android.util.Log;
-import android.view.IApplicationToken;
-
-import java.io.PrintWriter;
-import java.lang.ref.WeakReference;
-import java.util.ArrayList;
-import java.util.HashSet;
-
-/**
- * An entry in the history stack, representing an activity.
- */
-class HistoryRecord extends IApplicationToken.Stub {
-    final ActivityManagerService service; // owner
-    final ActivityInfo info; // all about me
-    final int launchedFromUid; // always the uid who started the activity.
-    final Intent intent;    // the original intent that generated us
-    final ComponentName realActivity;  // the intent component, or target of an alias.
-    final String shortComponentName; // the short component name of the intent
-    final String resolvedType; // as per original caller;
-    final String packageName; // the package implementing intent's component
-    final String processName; // process where this component wants to run
-    final String taskAffinity; // as per ActivityInfo.taskAffinity
-    final boolean stateNotNeeded; // As per ActivityInfo.flags
-    final boolean fullscreen;     // covers the full screen?
-    final boolean componentSpecified;  // did caller specifiy an explicit component?
-    final boolean isHomeActivity; // do we consider this to be a home activity?
-    final String baseDir;   // where activity source (resources etc) located
-    final String resDir;   // where public activity source (public resources etc) located
-    final String dataDir;   // where activity data should go
-    CharSequence nonLocalizedLabel;  // the label information from the package mgr.
-    int labelRes;           // the label information from the package mgr.
-    int icon;               // resource identifier of activity's icon.
-    int theme;              // resource identifier of activity's theme.
-    TaskRecord task;        // the task this is in.
-    long startTime;         // when we starting launching this activity
-    long cpuTimeAtResume;   // the cpu time of host process at the time of resuming activity
-    Configuration configuration; // configuration activity was last running in
-    HistoryRecord resultTo; // who started this entry, so will get our reply
-    final String resultWho; // additional identifier for use by resultTo.
-    final int requestCode;  // code given by requester (resultTo)
-    ArrayList results;      // pending ActivityResult objs we have received
-    HashSet<WeakReference<PendingIntentRecord>> pendingResults; // all pending intents for this act
-    ArrayList newIntents;   // any pending new intents for single-top mode
-    HashSet<ConnectionRecord> connections; // All ConnectionRecord we hold
-    HashSet<UriPermission> readUriPermissions; // special access to reading uris.
-    HashSet<UriPermission> writeUriPermissions; // special access to writing uris.
-    ProcessRecord app;  // if non-null, hosting application
-    Bitmap thumbnail;       // icon representation of paused screen
-    CharSequence description; // textual description of paused screen
-    ActivityManagerService.ActivityState state;    // current state we are in
-    Bundle  icicle;         // last saved activity state
-    boolean frontOfTask;    // is this the root activity of its task?
-    boolean launchFailed;   // set if a launched failed, to abort on 2nd try
-    boolean haveState;      // have we gotten the last activity state?
-    boolean stopped;        // is activity pause finished?
-    boolean delayedResume;  // not yet resumed because of stopped app switches?
-    boolean finishing;      // activity in pending finish list?
-    boolean configDestroy;  // need to destroy due to config change?
-    int configChangeFlags;  // which config values have changed
-    boolean keysPaused;     // has key dispatching been paused for it?
-    boolean inHistory;      // are we in the history stack?
-    boolean persistent;     // requested to be persistent?
-    int launchMode;         // the launch mode activity attribute.
-    boolean visible;        // does this activity's window need to be shown?
-    boolean waitingVisible; // true if waiting for a new act to become vis
-    boolean nowVisible;     // is this activity's window visible?
-    boolean thumbnailNeeded;// has someone requested a thumbnail?
-    boolean idle;           // has the activity gone idle?
-    boolean hasBeenLaunched;// has this activity ever been launched?
-    boolean frozenBeforeDestroy;// has been frozen but not yet destroyed.
-
-    String stringName;      // for caching of toString().
-    
-    void dump(PrintWriter pw, String prefix) {
-        pw.print(prefix); pw.print("packageName="); pw.print(packageName);
-                pw.print(" processName="); pw.println(processName);
-        pw.print(prefix); pw.print("launchedFromUid="); pw.print(launchedFromUid);
-                pw.print(" app="); pw.println(app);
-        pw.print(prefix); pw.println(intent);
-        pw.print(prefix); pw.print("frontOfTask="); pw.print(frontOfTask);
-                pw.print(" task="); pw.println(task);
-        pw.print(prefix); pw.print("taskAffinity="); pw.println(taskAffinity);
-        pw.print(prefix); pw.print("realActivity=");
-                pw.println(realActivity.flattenToShortString());
-        pw.print(prefix); pw.print("base="); pw.print(baseDir);
-                if (!resDir.equals(baseDir)) pw.print(" res="); pw.print(resDir);
-                pw.print(" data="); pw.println(dataDir);
-        pw.print(prefix); pw.print("labelRes=0x");
-                pw.print(Integer.toHexString(labelRes));
-                pw.print(" icon=0x"); pw.print(Integer.toHexString(icon));
-                pw.print(" theme=0x"); pw.println(Integer.toHexString(theme));
-        pw.print(prefix); pw.print("stateNotNeeded="); pw.print(stateNotNeeded);
-                pw.print(" componentSpecified="); pw.print(componentSpecified);
-                pw.print(" isHomeActivity="); pw.println(isHomeActivity);
-        pw.print(prefix); pw.print("configuration="); pw.println(configuration);
-        if (resultTo != null || resultWho != null) {
-            pw.print(prefix); pw.print("resultTo="); pw.print(resultTo);
-                    pw.print(" resultWho="); pw.print(resultWho);
-                    pw.print(" resultCode="); pw.println(requestCode);
-        }
-        if (results != null) {
-            pw.print(prefix); pw.print("results="); pw.println(results);
-        }
-        if (pendingResults != null) {
-            pw.print(prefix); pw.print("pendingResults="); pw.println(pendingResults);
-        }
-        if (readUriPermissions != null) {
-            pw.print(prefix); pw.print("readUriPermissions="); pw.println(readUriPermissions);
-        }
-        if (writeUriPermissions != null) {
-            pw.print(prefix); pw.print("writeUriPermissions="); pw.println(writeUriPermissions);
-        }
-        pw.print(prefix); pw.print("launchFailed="); pw.print(launchFailed);
-                pw.print(" haveState="); pw.print(haveState);
-                pw.print(" icicle="); pw.println(icicle);
-        pw.print(prefix); pw.print("state="); pw.print(state);
-                pw.print(" stopped="); pw.print(stopped);
-                pw.print(" delayedResume="); pw.print(delayedResume);
-                pw.print(" finishing="); pw.println(finishing);
-        pw.print(prefix); pw.print("keysPaused="); pw.print(keysPaused);
-                pw.print(" inHistory="); pw.print(inHistory);
-                pw.print(" persistent="); pw.print(persistent);
-                pw.print(" launchMode="); pw.println(launchMode);
-        pw.print(prefix); pw.print("fullscreen="); pw.print(fullscreen);
-                pw.print(" visible="); pw.print(visible);
-                pw.print(" frozenBeforeDestroy="); pw.print(frozenBeforeDestroy);
-                pw.print(" thumbnailNeeded="); pw.print(thumbnailNeeded);
-                pw.print(" idle="); pw.println(idle);
-        if (waitingVisible || nowVisible) {
-            pw.print(prefix); pw.print("waitingVisible="); pw.print(waitingVisible);
-                    pw.print(" nowVisible="); pw.println(nowVisible);
-        }
-        if (configDestroy || configChangeFlags != 0) {
-            pw.print(prefix); pw.print("configDestroy="); pw.print(configDestroy);
-                    pw.print(" configChangeFlags=");
-                    pw.println(Integer.toHexString(configChangeFlags));
-        }
-        if (connections != null) {
-            pw.print(prefix); pw.print("connections="); pw.println(connections);
-        }
-    }
-
-    HistoryRecord(ActivityManagerService _service, ProcessRecord _caller,
-            int _launchedFromUid, Intent _intent, String _resolvedType,
-            ActivityInfo aInfo, Configuration _configuration,
-            HistoryRecord _resultTo, String _resultWho, int _reqCode,
-            boolean _componentSpecified) {
-        service = _service;
-        info = aInfo;
-        launchedFromUid = _launchedFromUid;
-        intent = _intent;
-        shortComponentName = _intent.getComponent().flattenToShortString();
-        resolvedType = _resolvedType;
-        componentSpecified = _componentSpecified;
-        configuration = _configuration;
-        resultTo = _resultTo;
-        resultWho = _resultWho;
-        requestCode = _reqCode;
-        state = ActivityManagerService.ActivityState.INITIALIZING;
-        frontOfTask = false;
-        launchFailed = false;
-        haveState = false;
-        stopped = false;
-        delayedResume = false;
-        finishing = false;
-        configDestroy = false;
-        keysPaused = false;
-        inHistory = false;
-        persistent = false;
-        visible = true;
-        waitingVisible = false;
-        nowVisible = false;
-        thumbnailNeeded = false;
-        idle = false;
-        hasBeenLaunched = false;
-
-        if (aInfo != null) {
-            if (aInfo.targetActivity == null
-                    || aInfo.launchMode == ActivityInfo.LAUNCH_MULTIPLE
-                    || aInfo.launchMode == ActivityInfo.LAUNCH_SINGLE_TOP) {
-                realActivity = _intent.getComponent();
-            } else {
-                realActivity = new ComponentName(aInfo.packageName,
-                        aInfo.targetActivity);
-            }
-            taskAffinity = aInfo.taskAffinity;
-            stateNotNeeded = (aInfo.flags&
-                    ActivityInfo.FLAG_STATE_NOT_NEEDED) != 0;
-            baseDir = aInfo.applicationInfo.sourceDir;
-            resDir = aInfo.applicationInfo.publicSourceDir;
-            dataDir = aInfo.applicationInfo.dataDir;
-            nonLocalizedLabel = aInfo.nonLocalizedLabel;
-            labelRes = aInfo.labelRes;
-            if (nonLocalizedLabel == null && labelRes == 0) {
-                ApplicationInfo app = aInfo.applicationInfo;
-                nonLocalizedLabel = app.nonLocalizedLabel;
-                labelRes = app.labelRes;
-            }
-            icon = aInfo.getIconResource();
-            theme = aInfo.getThemeResource();
-            if ((aInfo.flags&ActivityInfo.FLAG_MULTIPROCESS) != 0
-                    && _caller != null
-                    && (aInfo.applicationInfo.uid == Process.SYSTEM_UID
-                            || aInfo.applicationInfo.uid == _caller.info.uid)) {
-                processName = _caller.processName;
-            } else {
-                processName = aInfo.processName;
-            }
-
-            if (intent != null && (aInfo.flags & ActivityInfo.FLAG_EXCLUDE_FROM_RECENTS) != 0) {
-                intent.addFlags(Intent.FLAG_ACTIVITY_EXCLUDE_FROM_RECENTS);
-            }
-            
-            packageName = aInfo.applicationInfo.packageName;
-            launchMode = aInfo.launchMode;
-            
-            AttributeCache.Entry ent = AttributeCache.instance().get(packageName,
-                    theme != 0 ? theme : android.R.style.Theme,
-                    com.android.internal.R.styleable.Window);
-            fullscreen = ent != null && !ent.array.getBoolean(
-                    com.android.internal.R.styleable.Window_windowIsFloating, false)
-                    && !ent.array.getBoolean(
-                    com.android.internal.R.styleable.Window_windowIsTranslucent, false);
-            
-            if (!_componentSpecified || _launchedFromUid == Process.myUid()
-                    || _launchedFromUid == 0) {
-                // If we know the system has determined the component, then
-                // we can consider this to be a home activity...
-                if (Intent.ACTION_MAIN.equals(_intent.getAction()) &&
-                        _intent.hasCategory(Intent.CATEGORY_HOME) &&
-                        _intent.getCategories().size() == 1 &&
-                        _intent.getData() == null &&
-                        _intent.getType() == null &&
-                        (intent.getFlags()&Intent.FLAG_ACTIVITY_NEW_TASK) != 0 &&
-                        !"android".equals(realActivity.getClassName())) {
-                    // This sure looks like a home activity!
-                    // Note the last check is so we don't count the resolver
-                    // activity as being home...  really, we don't care about
-                    // doing anything special with something that comes from
-                    // the core framework package.
-                    isHomeActivity = true;
-                } else {
-                    isHomeActivity = false;
-                }
-            } else {
-                isHomeActivity = false;
-            }
-        } else {
-            realActivity = null;
-            taskAffinity = null;
-            stateNotNeeded = false;
-            baseDir = null;
-            resDir = null;
-            dataDir = null;
-            processName = null;
-            packageName = null;
-            fullscreen = true;
-            isHomeActivity = false;
-        }
-    }
-
-    void addResultLocked(HistoryRecord from, String resultWho,
-            int requestCode, int resultCode,
-            Intent resultData) {
-        ActivityResult r = new ActivityResult(from, resultWho,
-        		requestCode, resultCode, resultData);
-        if (results == null) {
-            results = new ArrayList();
-        }
-        results.add(r);
-    }
-
-    void removeResultsLocked(HistoryRecord from, String resultWho,
-            int requestCode) {
-        if (results != null) {
-            for (int i=results.size()-1; i>=0; i--) {
-                ActivityResult r = (ActivityResult)results.get(i);
-                if (r.mFrom != from) continue;
-                if (r.mResultWho == null) {
-                    if (resultWho != null) continue;
-                } else {
-                    if (!r.mResultWho.equals(resultWho)) continue;
-                }
-                if (r.mRequestCode != requestCode) continue;
-
-                results.remove(i);
-            }
-        }
-    }
-
-    void addNewIntentLocked(Intent intent) {
-        if (newIntents == null) {
-            newIntents = new ArrayList();
-        }
-        newIntents.add(intent);
-    }
-
-    void pauseKeyDispatchingLocked() {
-        if (!keysPaused) {
-            keysPaused = true;
-            service.mWindowManager.pauseKeyDispatching(this);
-        }
-    }
-
-    void resumeKeyDispatchingLocked() {
-        if (keysPaused) {
-            keysPaused = false;
-            service.mWindowManager.resumeKeyDispatching(this);
-        }
-    }
-
-    // IApplicationToken
-
-    public boolean mayFreezeScreenLocked(ProcessRecord app) {
-        // Only freeze the screen if this activity is currently attached to
-        // an application, and that application is not blocked or unresponding.
-        // In any other case, we can't count on getting the screen unfrozen,
-        // so it is best to leave as-is.
-        return app == null || (!app.crashing && !app.notResponding);
-    }
-    
-    public void startFreezingScreenLocked(ProcessRecord app, int configChanges) {
-        if (mayFreezeScreenLocked(app)) {
-            service.mWindowManager.startAppFreezingScreen(this, configChanges);
-        }
-    }
-    
-    public void stopFreezingScreenLocked(boolean force) {
-        if (force || frozenBeforeDestroy) {
-            frozenBeforeDestroy = false;
-            service.mWindowManager.stopAppFreezingScreen(this, force);
-        }
-    }
-    
-    public void windowsVisible() {
-        synchronized(service) {
-            if (startTime != 0) {
-                final long curTime = SystemClock.uptimeMillis();
-                final long thisTime = curTime - startTime;
-                final long totalTime = service.mInitialStartTime != 0
-                        ? (curTime - service.mInitialStartTime) : thisTime;
-                if (ActivityManagerService.SHOW_ACTIVITY_START_TIME) {
-                    EventLog.writeEvent(EventLogTags.ACTIVITY_LAUNCH_TIME,
-                            System.identityHashCode(this), shortComponentName,
-                            thisTime, totalTime);
-                    StringBuilder sb = service.mStringBuilder;
-                    sb.setLength(0);
-                    sb.append("Displayed activity ");
-                    sb.append(shortComponentName);
-                    sb.append(": ");
-                    sb.append(thisTime);
-                    sb.append(" ms (total ");
-                    sb.append(totalTime);
-                    sb.append(" ms)");
-                    Log.i(ActivityManagerService.TAG, sb.toString());
-                }
-                service.reportActivityLaunchedLocked(false, this, thisTime, totalTime);
-                if (totalTime > 0) {
-                    service.mUsageStatsService.noteLaunchTime(realActivity, (int)totalTime);
-                }
-                startTime = 0;
-                service.mInitialStartTime = 0;
-            }
-            service.reportActivityVisibleLocked(this);
-            if (ActivityManagerService.DEBUG_SWITCH) Log.v(
-                    ActivityManagerService.TAG, "windowsVisible(): " + this);
-            if (!nowVisible) {
-                nowVisible = true;
-                if (!idle) {
-                    // Instead of doing the full stop routine here, let's just
-                    // hide any activities we now can, and let them stop when
-                    // the normal idle happens.
-                    service.processStoppingActivitiesLocked(false);
-                } else {
-                    // If this activity was already idle, then we now need to
-                    // make sure we perform the full stop of any activities
-                    // that are waiting to do so.  This is because we won't
-                    // do that while they are still waiting for this one to
-                    // become visible.
-                    final int N = service.mWaitingVisibleActivities.size();
-                    if (N > 0) {
-                        for (int i=0; i<N; i++) {
-                            HistoryRecord r = (HistoryRecord)
-                                service.mWaitingVisibleActivities.get(i);
-                            r.waitingVisible = false;
-                            if (ActivityManagerService.DEBUG_SWITCH) Log.v(
-                                    ActivityManagerService.TAG,
-                                    "Was waiting for visible: " + r);
-                        }
-                        service.mWaitingVisibleActivities.clear();
-                        Message msg = Message.obtain();
-                        msg.what = ActivityManagerService.IDLE_NOW_MSG;
-                        service.mHandler.sendMessage(msg);
-                    }
-                }
-                service.scheduleAppGcsLocked();
-            }
-        }
-    }
-
-    public void windowsGone() {
-        if (ActivityManagerService.DEBUG_SWITCH) Log.v(
-                ActivityManagerService.TAG, "windowsGone(): " + this);
-        nowVisible = false;
-    }
-    
-    private HistoryRecord getWaitingHistoryRecordLocked() {
-        // First find the real culprit...  if we are waiting
-        // for another app to start, then we have paused dispatching
-        // for this activity.
-        HistoryRecord r = this;
-        if (r.waitingVisible) {
-            // Hmmm, who might we be waiting for?
-            r = service.mResumedActivity;
-            if (r == null) {
-                r = service.mPausingActivity;
-            }
-            // Both of those null?  Fall back to 'this' again
-            if (r == null) {
-                r = this;
-            }
-        }
-        
-        return r;
-    }
-
-    public boolean keyDispatchingTimedOut() {
-        HistoryRecord r;
-        ProcessRecord anrApp = null;
-        synchronized(service) {
-            r = getWaitingHistoryRecordLocked();
-            if (r != null && r.app != null) {
-                if (r.app.debugging) {
-                    return false;
-                }
-                
-                if (service.mDidDexOpt) {
-                    // Give more time since we were dexopting.
-                    service.mDidDexOpt = false;
-                    return false;
-                }
-                
-                if (r.app.instrumentationClass == null) { 
-                    anrApp = r.app;
-                } else {
-                    Bundle info = new Bundle();
-                    info.putString("shortMsg", "keyDispatchingTimedOut");
-                    info.putString("longMsg", "Timed out while dispatching key event");
-                    service.finishInstrumentationLocked(
-                            r.app, Activity.RESULT_CANCELED, info);
-                }
-            }
-        }
-        
-        if (anrApp != null) {
-            service.appNotResponding(anrApp, r, this,
-                    "keyDispatchingTimedOut");
-        }
-        
-        return true;
-    }
-    
-    /** Returns the key dispatching timeout for this application token. */
-    public long getKeyDispatchingTimeout() {
-        synchronized(service) {
-            HistoryRecord r = getWaitingHistoryRecordLocked();
-            if (r == null || r.app == null
-                    || r.app.instrumentationClass == null) {
-                return ActivityManagerService.KEY_DISPATCHING_TIMEOUT;
-            }
-            
-            return ActivityManagerService.INSTRUMENTATION_KEY_DISPATCHING_TIMEOUT;
-        }
-    }
-
-    /**
-     * This method will return true if the activity is either visible, is becoming visible, is
-     * currently pausing, or is resumed.
-     */
-    public boolean isInterestingToUserLocked() {
-        return visible || nowVisible || state == ActivityState.PAUSING || 
-                state == ActivityState.RESUMED;
-     }
-    
-    
-    public String toString() {
-        if (stringName != null) {
-            return stringName;
-        }
-        StringBuilder sb = new StringBuilder(128);
-        sb.append("HistoryRecord{");
-        sb.append(Integer.toHexString(System.identityHashCode(this)));
-        sb.append(' ');
-        sb.append(intent.getComponent().flattenToShortString());
-        sb.append('}');
-        return stringName = sb.toString();
-    }
-}
diff --git a/services/java/com/android/server/am/PendingIntentRecord.java b/services/java/com/android/server/am/PendingIntentRecord.java
index 847e91b..7a85eb8 100644
--- a/services/java/com/android/server/am/PendingIntentRecord.java
+++ b/services/java/com/android/server/am/PendingIntentRecord.java
@@ -42,7 +42,7 @@
     final static class Key {
         final int type;
         final String packageName;
-        final HistoryRecord activity;
+        final ActivityRecord activity;
         final String who;
         final int requestCode;
         final Intent requestIntent;
@@ -52,7 +52,7 @@
         
         private static final int ODD_PRIME_NUMBER = 37;
         
-        Key(int _t, String _p, HistoryRecord _a, String _w,
+        Key(int _t, String _p, ActivityRecord _a, String _w,
                 int _r, Intent _i, String _it, int _f) {
             type = _t;
             packageName = _p;
@@ -218,7 +218,7 @@
                         }
                         break;
                     case IActivityManager.INTENT_SENDER_ACTIVITY_RESULT:
-                        owner.sendActivityResultLocked(-1, key.activity,
+                        key.activity.stack.sendActivityResultLocked(-1, key.activity,
                                 key.who, key.requestCode, code, finalIntent);
                         break;
                     case IActivityManager.INTENT_SENDER_BROADCAST:
diff --git a/services/java/com/android/server/am/ProcessRecord.java b/services/java/com/android/server/am/ProcessRecord.java
index f49a182..18b1acb 100644
--- a/services/java/com/android/server/am/ProcessRecord.java
+++ b/services/java/com/android/server/am/ProcessRecord.java
@@ -28,7 +28,6 @@
 import android.os.Bundle;
 import android.os.IBinder;
 import android.os.RemoteException;
-import android.os.SystemClock;
 import android.util.PrintWriterPrinter;
 
 import java.io.PrintWriter;
@@ -40,12 +39,12 @@
  * Full information about a particular process that
  * is currently running.
  */
-class ProcessRecord implements Watchdog.PssRequestor {
+class ProcessRecord {
     final BatteryStatsImpl.Uid.Proc batteryStats; // where to collect runtime statistics
     final ApplicationInfo info; // all about the first app in the process
     final String processName;   // name of the process
     // List of packages running in the process
-    final HashSet<String> pkgList = new HashSet();
+    final HashSet<String> pkgList = new HashSet<String>();
     IApplicationThread thread;  // the actual proc...  may be null only if
                                 // 'persistent' is true (in which case we
                                 // are in the process of launching the app)
@@ -87,9 +86,9 @@
     Object adjTarget;           // Debugging: target component impacting oom_adj.
     
     // contains HistoryRecord objects
-    final ArrayList activities = new ArrayList();
+    final ArrayList<ActivityRecord> activities = new ArrayList<ActivityRecord>();
     // all ServiceRecord running in this process
-    final HashSet services = new HashSet();
+    final HashSet<ServiceRecord> services = new HashSet<ServiceRecord>();
     // services that are currently executing code (need to remain foreground).
     final HashSet<ServiceRecord> executingServices
              = new HashSet<ServiceRecord>();
@@ -99,7 +98,8 @@
     // all IIntentReceivers that are registered from this process.
     final HashSet<ReceiverList> receivers = new HashSet<ReceiverList>();
     // class (String) -> ContentProviderRecord
-    final HashMap pubProviders = new HashMap(); 
+    final HashMap<String, ContentProviderRecord> pubProviders
+            = new HashMap<String, ContentProviderRecord>(); 
     // All ContentProviderRecord process is using
     final HashMap<ContentProviderRecord, Integer> conProviders
             = new HashMap<ContentProviderRecord, Integer>(); 
@@ -128,7 +128,6 @@
     ComponentName errorReportReceiver;
 
     void dump(PrintWriter pw, String prefix) {
-        long now = SystemClock.uptimeMillis();
         if (info.className != null) {
             pw.print(prefix); pw.print("class="); pw.println(info.className);
         }
@@ -249,7 +248,7 @@
     public boolean isInterestingToUserLocked() {
         final int size = activities.size();
         for (int i = 0 ; i < size ; i++) {
-            HistoryRecord r = (HistoryRecord) activities.get(i);
+            ActivityRecord r = activities.get(i);
             if (r.isInterestingToUserLocked()) {
                 return true;
             }
@@ -261,17 +260,7 @@
         int i = activities.size();
         while (i > 0) {
             i--;
-            ((HistoryRecord)activities.get(i)).stopFreezingScreenLocked(true);
-        }
-    }
-    
-    public void requestPss() {
-        IApplicationThread localThread = thread;
-        if (localThread != null) {
-            try {
-                localThread.requestPss();
-            } catch (RemoteException e) {
-            }
+            activities.get(i).stopFreezingScreenLocked(true);
         }
     }
     
diff --git a/services/java/com/android/server/am/StrictModeViolationDialog.java b/services/java/com/android/server/am/StrictModeViolationDialog.java
new file mode 100644
index 0000000..fe76d18
--- /dev/null
+++ b/services/java/com/android/server/am/StrictModeViolationDialog.java
@@ -0,0 +1,98 @@
+/*
+ * Copyright (C) 2006 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.android.server.am;
+
+import static android.view.WindowManager.LayoutParams.FLAG_SYSTEM_ERROR;
+
+import android.content.Context;
+import android.content.DialogInterface;
+import android.content.res.Resources;
+import android.os.Handler;
+import android.os.Message;
+import android.util.Slog;
+
+class StrictModeViolationDialog extends BaseErrorDialog {
+    private final static String TAG = "StrictModeViolationDialog";
+
+    private final AppErrorResult mResult;
+    private final ProcessRecord mProc;
+
+    // Event 'what' codes
+    static final int ACTION_OK = 0;
+    static final int ACTION_OK_AND_REPORT = 1;
+
+    // 1-minute timeout, then we automatically dismiss the violation
+    // dialog
+    static final long DISMISS_TIMEOUT = 1000 * 60 * 1;
+
+    public StrictModeViolationDialog(Context context, AppErrorResult result, ProcessRecord app) {
+        super(context);
+
+        Resources res = context.getResources();
+
+        mProc = app;
+        mResult = result;
+        CharSequence name;
+        if ((app.pkgList.size() == 1) &&
+                (name=context.getPackageManager().getApplicationLabel(app.info)) != null) {
+            setMessage(res.getString(
+                    com.android.internal.R.string.smv_application,
+                    name.toString(), app.info.processName));
+        } else {
+            name = app.processName;
+            setMessage(res.getString(
+                    com.android.internal.R.string.smv_process,
+                    name.toString()));
+        }
+
+        setCancelable(false);
+
+        setButton(DialogInterface.BUTTON_POSITIVE,
+                  res.getText(com.android.internal.R.string.dlg_ok),
+                  mHandler.obtainMessage(ACTION_OK));
+
+        if (app.errorReportReceiver != null) {
+            setButton(DialogInterface.BUTTON_NEGATIVE,
+                      res.getText(com.android.internal.R.string.report),
+                      mHandler.obtainMessage(ACTION_OK_AND_REPORT));
+        }
+
+        setTitle(res.getText(com.android.internal.R.string.aerr_title));
+        getWindow().addFlags(FLAG_SYSTEM_ERROR);
+        getWindow().setTitle("Strict Mode Violation: " + app.info.processName);
+
+        // After the timeout, pretend the user clicked the quit button
+        mHandler.sendMessageDelayed(
+                mHandler.obtainMessage(ACTION_OK),
+                DISMISS_TIMEOUT);
+    }
+
+    private final Handler mHandler = new Handler() {
+        public void handleMessage(Message msg) {
+            synchronized (mProc) {
+                if (mProc != null && mProc.crashDialog == StrictModeViolationDialog.this) {
+                    mProc.crashDialog = null;
+                }
+            }
+            mResult.set(msg.what);
+
+            // If this is a timeout we won't be automatically closed, so go
+            // ahead and explicitly dismiss ourselves just in case.
+            dismiss();
+        }
+    };
+}
diff --git a/services/java/com/android/server/am/UriPermission.java b/services/java/com/android/server/am/UriPermission.java
index ffa8a2a..81450c5 100644
--- a/services/java/com/android/server/am/UriPermission.java
+++ b/services/java/com/android/server/am/UriPermission.java
@@ -27,8 +27,8 @@
     final Uri uri;
     int modeFlags = 0;
     int globalModeFlags = 0;
-    final HashSet<HistoryRecord> readActivities = new HashSet<HistoryRecord>();
-    final HashSet<HistoryRecord> writeActivities = new HashSet<HistoryRecord>();
+    final HashSet<ActivityRecord> readActivities = new HashSet<ActivityRecord>();
+    final HashSet<ActivityRecord> writeActivities = new HashSet<ActivityRecord>();
     
     String stringName;
     
@@ -42,7 +42,7 @@
             globalModeFlags &= ~Intent.FLAG_GRANT_READ_URI_PERMISSION;
             modeFlags &= ~Intent.FLAG_GRANT_READ_URI_PERMISSION;
             if (readActivities.size() > 0) {
-                for (HistoryRecord r : readActivities) {
+                for (ActivityRecord r : readActivities) {
                     r.readUriPermissions.remove(this);
                     if (r.readUriPermissions.size() == 0) {
                         r.readUriPermissions = null;
@@ -55,7 +55,7 @@
             globalModeFlags &= ~Intent.FLAG_GRANT_WRITE_URI_PERMISSION;
             modeFlags &= ~Intent.FLAG_GRANT_WRITE_URI_PERMISSION;
             if (readActivities.size() > 0) {
-                for (HistoryRecord r : readActivities) {
+                for (ActivityRecord r : readActivities) {
                     r.writeUriPermissions.remove(this);
                     if (r.writeUriPermissions.size() == 0) {
                         r.writeUriPermissions = null;
diff --git a/services/java/com/android/server/location/GeocoderProxy.java b/services/java/com/android/server/location/GeocoderProxy.java
new file mode 100644
index 0000000..3c05da2
--- /dev/null
+++ b/services/java/com/android/server/location/GeocoderProxy.java
@@ -0,0 +1,105 @@
+/*
+ * Copyright (C) 2010 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.android.server.location;
+
+import android.content.ComponentName;
+import android.content.Context;
+import android.content.Intent;
+import android.content.ServiceConnection;
+import android.location.Address;
+import android.location.GeocoderParams;
+import android.location.IGeocodeProvider;
+import android.os.IBinder;
+import android.os.RemoteException;
+import android.os.SystemClock;
+import android.util.Log;
+
+import java.util.List;
+
+/**
+ * A class for proxying IGeocodeProvider implementations.
+ *
+ * {@hide}
+ */
+public class GeocoderProxy {
+
+    private static final String TAG = "GeocoderProxy";
+
+    private final Context mContext;
+    private final Intent mIntent;
+    private final Connection mServiceConnection = new Connection();
+    private IGeocodeProvider mProvider;
+
+    public GeocoderProxy(Context context, String serviceName) {
+        mContext = context;
+        mIntent = new Intent(serviceName);
+        mContext.bindService(mIntent, mServiceConnection, Context.BIND_AUTO_CREATE);
+    }
+
+    private class Connection implements ServiceConnection {
+        public void onServiceConnected(ComponentName className, IBinder service) {
+            Log.d(TAG, "onServiceConnected " + className);
+            synchronized (this) {
+                mProvider = IGeocodeProvider.Stub.asInterface(service);
+            }
+        }
+
+        public void onServiceDisconnected(ComponentName className) {
+            Log.d(TAG, "onServiceDisconnected " + className);
+            synchronized (this) {
+                mProvider = null;
+            }
+        }
+    }
+
+    public String getFromLocation(double latitude, double longitude, int maxResults,
+            GeocoderParams params, List<Address> addrs) {
+        IGeocodeProvider provider;
+        synchronized (mServiceConnection) {
+            provider = mProvider;
+        }
+        if (provider != null) {
+            try {
+                return provider.getFromLocation(latitude, longitude, maxResults,
+                        params, addrs);
+            } catch (RemoteException e) {
+                Log.e(TAG, "getFromLocation failed", e);
+            }
+        }
+        return "Service not Available";
+    }
+
+    public String getFromLocationName(String locationName,
+            double lowerLeftLatitude, double lowerLeftLongitude,
+            double upperRightLatitude, double upperRightLongitude, int maxResults,
+            GeocoderParams params, List<Address> addrs) {
+        IGeocodeProvider provider;
+        synchronized (mServiceConnection) {
+            provider = mProvider;
+        }
+        if (provider != null) {
+            try {
+                return provider.getFromLocationName(locationName, lowerLeftLatitude,
+                        lowerLeftLongitude, upperRightLatitude, upperRightLongitude,
+                        maxResults, params, addrs);
+            } catch (RemoteException e) {
+                Log.e(TAG, "getFromLocationName failed", e);
+            }
+        }
+        return "Service not Available";
+    }
+}
diff --git a/services/java/com/android/server/location/GpsLocationProvider.java b/services/java/com/android/server/location/GpsLocationProvider.java
new file mode 100755
index 0000000..4b4c784
--- /dev/null
+++ b/services/java/com/android/server/location/GpsLocationProvider.java
@@ -0,0 +1,1469 @@
+/*
+ * Copyright (C) 2008 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.android.server.location;
+
+import android.app.AlarmManager;
+import android.app.PendingIntent;
+import android.content.BroadcastReceiver;
+import android.content.Context;
+import android.content.Intent;
+import android.content.IntentFilter;
+import android.location.Criteria;
+import android.location.IGpsStatusListener;
+import android.location.IGpsStatusProvider;
+import android.location.ILocationManager;
+import android.location.INetInitiatedListener;
+import android.location.Location;
+import android.location.LocationManager;
+import android.location.LocationProvider;
+import android.net.ConnectivityManager;
+import android.net.NetworkInfo;
+import android.net.SntpClient;
+import android.os.Binder;
+import android.os.Bundle;
+import android.os.Handler;
+import android.os.IBinder;
+import android.os.Looper;
+import android.os.Message;
+import android.os.PowerManager;
+import android.os.Process;
+import android.os.RemoteException;
+import android.os.ServiceManager;
+import android.os.SystemClock;
+import android.provider.Settings;
+import android.util.Log;
+import android.util.SparseIntArray;
+
+import com.android.internal.app.IBatteryStats;
+import com.android.internal.telephony.Phone;
+import com.android.internal.location.GpsNetInitiatedHandler;
+import com.android.internal.location.GpsNetInitiatedHandler.GpsNiNotification;
+
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.IOException;
+import java.io.StringBufferInputStream;
+import java.net.InetAddress;
+import java.net.UnknownHostException;
+import java.util.ArrayList;
+import java.util.Date;
+import java.util.Properties;
+import java.util.Map.Entry;
+import java.util.concurrent.CountDownLatch;
+
+/**
+ * A GPS implementation of LocationProvider used by LocationManager.
+ *
+ * {@hide}
+ */
+public class GpsLocationProvider implements LocationProviderInterface {
+
+    private static final String TAG = "GpsLocationProvider";
+
+    private static final boolean DEBUG = false;
+    private static final boolean VERBOSE = false;
+
+    // these need to match GpsPositionMode enum in gps.h
+    private static final int GPS_POSITION_MODE_STANDALONE = 0;
+    private static final int GPS_POSITION_MODE_MS_BASED = 1;
+    private static final int GPS_POSITION_MODE_MS_ASSISTED = 2;
+
+    // these need to match GpsPositionRecurrence enum in gps.h
+    private static final int GPS_POSITION_RECURRENCE_PERIODIC = 0;
+    private static final int GPS_POSITION_RECURRENCE_SINGLE = 1;
+
+    // these need to match GpsStatusValue defines in gps.h
+    private static final int GPS_STATUS_NONE = 0;
+    private static final int GPS_STATUS_SESSION_BEGIN = 1;
+    private static final int GPS_STATUS_SESSION_END = 2;
+    private static final int GPS_STATUS_ENGINE_ON = 3;
+    private static final int GPS_STATUS_ENGINE_OFF = 4;
+
+    // these need to match GpsApgsStatusValue defines in gps.h
+    /** AGPS status event values. */
+    private static final int GPS_REQUEST_AGPS_DATA_CONN = 1;
+    private static final int GPS_RELEASE_AGPS_DATA_CONN = 2;
+    private static final int GPS_AGPS_DATA_CONNECTED = 3;
+    private static final int GPS_AGPS_DATA_CONN_DONE = 4;
+    private static final int GPS_AGPS_DATA_CONN_FAILED = 5;
+
+    // these need to match GpsLocationFlags enum in gps.h
+    private static final int LOCATION_INVALID = 0;
+    private static final int LOCATION_HAS_LAT_LONG = 1;
+    private static final int LOCATION_HAS_ALTITUDE = 2;
+    private static final int LOCATION_HAS_SPEED = 4;
+    private static final int LOCATION_HAS_BEARING = 8;
+    private static final int LOCATION_HAS_ACCURACY = 16;
+
+// IMPORTANT - the GPS_DELETE_* symbols here must match constants in gps.h
+    private static final int GPS_DELETE_EPHEMERIS = 0x0001;
+    private static final int GPS_DELETE_ALMANAC = 0x0002;
+    private static final int GPS_DELETE_POSITION = 0x0004;
+    private static final int GPS_DELETE_TIME = 0x0008;
+    private static final int GPS_DELETE_IONO = 0x0010;
+    private static final int GPS_DELETE_UTC = 0x0020;
+    private static final int GPS_DELETE_HEALTH = 0x0040;
+    private static final int GPS_DELETE_SVDIR = 0x0080;
+    private static final int GPS_DELETE_SVSTEER = 0x0100;
+    private static final int GPS_DELETE_SADATA = 0x0200;
+    private static final int GPS_DELETE_RTI = 0x0400;
+    private static final int GPS_DELETE_CELLDB_INFO = 0x8000;
+    private static final int GPS_DELETE_ALL = 0xFFFF;
+
+    // The GPS_CAPABILITY_* flags must match the values in gps.h
+    private static final int GPS_CAPABILITY_SCHEDULING = 0x0000001;
+    private static final int GPS_CAPABILITY_MSB = 0x0000002;
+    private static final int GPS_CAPABILITY_MSA = 0x0000004;
+    private static final int GPS_CAPABILITY_SINGLE_SHOT = 0x0000008;
+
+
+    // these need to match AGpsType enum in gps.h
+    private static final int AGPS_TYPE_SUPL = 1;
+    private static final int AGPS_TYPE_C2K = 2;
+
+    // for mAGpsDataConnectionState
+    private static final int AGPS_DATA_CONNECTION_CLOSED = 0;
+    private static final int AGPS_DATA_CONNECTION_OPENING = 1;
+    private static final int AGPS_DATA_CONNECTION_OPEN = 2;
+
+    // Handler messages
+    private static final int CHECK_LOCATION = 1;
+    private static final int ENABLE = 2;
+    private static final int ENABLE_TRACKING = 3;
+    private static final int UPDATE_NETWORK_STATE = 4;
+    private static final int INJECT_NTP_TIME = 5;
+    private static final int DOWNLOAD_XTRA_DATA = 6;
+    private static final int UPDATE_LOCATION = 7;
+    private static final int ADD_LISTENER = 8;
+    private static final int REMOVE_LISTENER = 9;
+    private static final int REQUEST_SINGLE_SHOT = 10;
+
+    private static final String PROPERTIES_FILE = "/etc/gps.conf";
+
+    private int mLocationFlags = LOCATION_INVALID;
+
+    // current status
+    private int mStatus = LocationProvider.TEMPORARILY_UNAVAILABLE;
+
+    // time for last status update
+    private long mStatusUpdateTime = SystemClock.elapsedRealtime();
+
+    // turn off GPS fix icon if we haven't received a fix in 10 seconds
+    private static final long RECENT_FIX_TIMEOUT = 10 * 1000;
+
+    // stop trying if we do not receive a fix within 60 seconds
+    private static final int NO_FIX_TIMEOUT = 60 * 1000;
+
+    // true if we are enabled
+    private volatile boolean mEnabled;
+    
+    // true if we have network connectivity
+    private boolean mNetworkAvailable;
+
+    // flags to trigger NTP or XTRA data download when network becomes available
+    // initialized to true so we do NTP and XTRA when the network comes up after booting
+    private boolean mInjectNtpTimePending = true;
+    private boolean mDownloadXtraDataPending = true;
+
+    // true if GPS is navigating
+    private boolean mNavigating;
+
+    // true if GPS engine is on
+    private boolean mEngineOn;
+    
+    // requested frequency of fixes, in milliseconds
+    private int mFixInterval = 1000;
+
+    // true if we started navigation
+    private boolean mStarted;
+
+    // true if single shot request is in progress
+    private boolean mSingleShot;
+
+    // capabilities of the GPS engine
+    private int mEngineCapabilities;
+
+    // for calculating time to first fix
+    private long mFixRequestTime = 0;
+    // time to first fix for most recent session
+    private int mTTFF = 0;
+    // time we received our last fix
+    private long mLastFixTime;
+
+    private int mPositionMode;
+
+    // properties loaded from PROPERTIES_FILE
+    private Properties mProperties;
+    private String mNtpServer;
+    private String mSuplServerHost;
+    private int mSuplServerPort;
+    private String mC2KServerHost;
+    private int mC2KServerPort;
+
+    private final Context mContext;
+    private final ILocationManager mLocationManager;
+    private Location mLocation = new Location(LocationManager.GPS_PROVIDER);
+    private Bundle mLocationExtras = new Bundle();
+    private ArrayList<Listener> mListeners = new ArrayList<Listener>();
+
+    // GpsLocationProvider's handler thread
+    private final Thread mThread;
+    // Handler for processing events in mThread.
+    private Handler mHandler;
+    // Used to signal when our main thread has initialized everything
+    private final CountDownLatch mInitializedLatch = new CountDownLatch(1);
+
+    private String mAGpsApn;
+    private int mAGpsDataConnectionState;
+    private final ConnectivityManager mConnMgr;
+    private final GpsNetInitiatedHandler mNIHandler; 
+
+    // Wakelocks
+    private final static String WAKELOCK_KEY = "GpsLocationProvider";
+    private final PowerManager.WakeLock mWakeLock;
+    // bitfield of pending messages to our Handler
+    // used only for messages that cannot have multiple instances queued
+    private int mPendingMessageBits;
+    // separate counter for ADD_LISTENER and REMOVE_LISTENER messages,
+    // which might have multiple instances queued
+    private int mPendingListenerMessages;
+
+    // Alarms
+    private final static String ALARM_WAKEUP = "com.android.internal.location.ALARM_WAKEUP";
+    private final static String ALARM_TIMEOUT = "com.android.internal.location.ALARM_TIMEOUT";
+    private final AlarmManager mAlarmManager;
+    private final PendingIntent mWakeupIntent;
+    private final PendingIntent mTimeoutIntent;
+
+    private final IBatteryStats mBatteryStats;
+    private final SparseIntArray mClientUids = new SparseIntArray();
+
+    // how often to request NTP time, in milliseconds
+    // current setting 4 hours
+    private static final long NTP_INTERVAL = 4*60*60*1000;
+    // how long to wait if we have a network error in NTP or XTRA downloading
+    // current setting - 5 minutes
+    private static final long RETRY_INTERVAL = 5*60*1000;
+
+    // to avoid injecting bad NTP time, we reject any time fixes that differ from system time
+    // by more than 5 minutes.
+    private static final long MAX_NTP_SYSTEM_TIME_OFFSET = 5*60*1000;
+
+    private final IGpsStatusProvider mGpsStatusProvider = new IGpsStatusProvider.Stub() {
+        public void addGpsStatusListener(IGpsStatusListener listener) throws RemoteException {
+            if (listener == null) {
+                throw new NullPointerException("listener is null in addGpsStatusListener");
+            }
+
+            synchronized(mListeners) {
+                IBinder binder = listener.asBinder();
+                int size = mListeners.size();
+                for (int i = 0; i < size; i++) {
+                    Listener test = mListeners.get(i);
+                    if (binder.equals(test.mListener.asBinder())) {
+                        // listener already added
+                        return;
+                    }
+                }
+
+                Listener l = new Listener(listener);
+                binder.linkToDeath(l, 0);
+                mListeners.add(l);
+            }
+        }
+
+        public void removeGpsStatusListener(IGpsStatusListener listener) {
+            if (listener == null) {
+                throw new NullPointerException("listener is null in addGpsStatusListener");
+            }
+
+            synchronized(mListeners) {
+                IBinder binder = listener.asBinder();
+                Listener l = null;
+                int size = mListeners.size();
+                for (int i = 0; i < size && l == null; i++) {
+                    Listener test = mListeners.get(i);
+                    if (binder.equals(test.mListener.asBinder())) {
+                        l = test;
+                    }
+                }
+
+                if (l != null) {
+                    mListeners.remove(l);
+                    binder.unlinkToDeath(l, 0);
+                }
+            }
+        }
+    };
+
+    public IGpsStatusProvider getGpsStatusProvider() {
+        return mGpsStatusProvider;
+    }
+
+    private final BroadcastReceiver mBroadcastReciever = new BroadcastReceiver() {
+        @Override public void onReceive(Context context, Intent intent) {
+            String action = intent.getAction();
+
+            if (action.equals(ALARM_WAKEUP)) {
+                if (DEBUG) Log.d(TAG, "ALARM_WAKEUP");
+                startNavigating(false);
+            } else if (action.equals(ALARM_TIMEOUT)) {
+                if (DEBUG) Log.d(TAG, "ALARM_TIMEOUT");
+                hibernate();
+            }
+        }
+    };
+
+    public static boolean isSupported() {
+        return native_is_supported();
+    }
+
+    public GpsLocationProvider(Context context, ILocationManager locationManager) {
+        mContext = context;
+        mLocationManager = locationManager;
+        mNIHandler = new GpsNetInitiatedHandler(context);
+
+        mLocation.setExtras(mLocationExtras);
+
+        // Create a wake lock
+        PowerManager powerManager = (PowerManager) mContext.getSystemService(Context.POWER_SERVICE);
+        mWakeLock = powerManager.newWakeLock(PowerManager.PARTIAL_WAKE_LOCK, WAKELOCK_KEY);
+        mWakeLock.setReferenceCounted(false);
+
+        mAlarmManager = (AlarmManager)mContext.getSystemService(Context.ALARM_SERVICE);
+        mWakeupIntent = PendingIntent.getBroadcast(mContext, 0, new Intent(ALARM_WAKEUP), 0);
+        mTimeoutIntent = PendingIntent.getBroadcast(mContext, 0, new Intent(ALARM_TIMEOUT), 0);
+
+        mConnMgr = (ConnectivityManager)context.getSystemService(Context.CONNECTIVITY_SERVICE);
+
+        // Battery statistics service to be notified when GPS turns on or off
+        mBatteryStats = IBatteryStats.Stub.asInterface(ServiceManager.getService("batteryinfo"));
+
+        mProperties = new Properties();
+        try {
+            File file = new File(PROPERTIES_FILE);
+            FileInputStream stream = new FileInputStream(file);
+            mProperties.load(stream);
+            stream.close();
+            mNtpServer = mProperties.getProperty("NTP_SERVER", null);
+
+            mSuplServerHost = mProperties.getProperty("SUPL_HOST");
+            String portString = mProperties.getProperty("SUPL_PORT");
+            if (mSuplServerHost != null && portString != null) {
+                try {
+                    mSuplServerPort = Integer.parseInt(portString);
+                } catch (NumberFormatException e) {
+                    Log.e(TAG, "unable to parse SUPL_PORT: " + portString);
+                }
+            }
+
+            mC2KServerHost = mProperties.getProperty("C2K_HOST");
+            portString = mProperties.getProperty("C2K_PORT");
+            if (mC2KServerHost != null && portString != null) {
+                try {
+                    mC2KServerPort = Integer.parseInt(portString);
+                } catch (NumberFormatException e) {
+                    Log.e(TAG, "unable to parse C2K_PORT: " + portString);
+                }
+            }
+        } catch (IOException e) {
+            Log.w(TAG, "Could not open GPS configuration file " + PROPERTIES_FILE);
+        }
+
+        // wait until we are fully initialized before returning
+        mThread = new GpsLocationProviderThread();
+        mThread.start();
+        while (true) {
+            try {
+                mInitializedLatch.await();
+                break;
+            } catch (InterruptedException e) {
+                Thread.currentThread().interrupt();
+            }
+        }
+    }
+
+    private void initialize() {
+        // register our receiver on our thread rather than the main thread
+        IntentFilter intentFilter = new IntentFilter();
+        intentFilter.addAction(ALARM_WAKEUP);
+        intentFilter.addAction(ALARM_TIMEOUT);
+        mContext.registerReceiver(mBroadcastReciever, intentFilter);
+    }
+
+    /**
+     * Returns the name of this provider.
+     */
+    public String getName() {
+        return LocationManager.GPS_PROVIDER;
+    }
+
+    /**
+     * Returns true if the provider requires access to a
+     * data network (e.g., the Internet), false otherwise.
+     */
+    public boolean requiresNetwork() {
+        return true;
+    }
+
+    public void updateNetworkState(int state, NetworkInfo info) {
+        sendMessage(UPDATE_NETWORK_STATE, state, info);
+    }
+
+    private void handleUpdateNetworkState(int state, NetworkInfo info) {
+        mNetworkAvailable = (state == LocationProvider.AVAILABLE);
+
+        if (DEBUG) {
+            Log.d(TAG, "updateNetworkState " + (mNetworkAvailable ? "available" : "unavailable")
+                + " info: " + info);
+        }
+
+        if (info != null && info.getType() == ConnectivityManager.TYPE_MOBILE_SUPL
+                && mAGpsDataConnectionState == AGPS_DATA_CONNECTION_OPENING) {
+            String apnName = info.getExtraInfo();
+            if (mNetworkAvailable && apnName != null && apnName.length() > 0) {
+                mAGpsApn = apnName;
+                if (DEBUG) Log.d(TAG, "call native_agps_data_conn_open");
+                native_agps_data_conn_open(apnName);
+                mAGpsDataConnectionState = AGPS_DATA_CONNECTION_OPEN;
+            } else {
+                if (DEBUG) Log.d(TAG, "call native_agps_data_conn_failed");
+                mAGpsApn = null;
+                mAGpsDataConnectionState = AGPS_DATA_CONNECTION_CLOSED;
+                native_agps_data_conn_failed();
+            }
+        }
+
+        if (mNetworkAvailable) {
+            if (mInjectNtpTimePending) {
+                sendMessage(INJECT_NTP_TIME, 0, null);
+            }
+            if (mDownloadXtraDataPending) {
+                sendMessage(DOWNLOAD_XTRA_DATA, 0, null);
+            }
+        }
+    }
+
+    private void handleInjectNtpTime() {
+        if (!mNetworkAvailable) {
+            // try again when network is up
+            mInjectNtpTimePending = true;
+            return;
+        }
+        mInjectNtpTimePending = false;
+
+        SntpClient client = new SntpClient();
+        long delay;
+
+        if (client.requestTime(mNtpServer, 10000)) {
+            long time = client.getNtpTime();
+            long timeReference = client.getNtpTimeReference();
+            int certainty = (int)(client.getRoundTripTime()/2);
+            long now = System.currentTimeMillis();
+
+            Log.d(TAG, "NTP server returned: "
+                    + time + " (" + new Date(time)
+                    + ") reference: " + timeReference
+                    + " certainty: " + certainty
+                    + " system time offset: " + (time - now));
+
+            native_inject_time(time, timeReference, certainty);
+            delay = NTP_INTERVAL;
+        } else {
+            if (DEBUG) Log.d(TAG, "requestTime failed");
+            delay = RETRY_INTERVAL;
+        }
+
+        // send delayed message for next NTP injection
+        // since this is delayed and not urgent we do not hold a wake lock here
+        mHandler.removeMessages(INJECT_NTP_TIME);
+        mHandler.sendMessageDelayed(Message.obtain(mHandler, INJECT_NTP_TIME), delay);
+    }
+
+    private void handleDownloadXtraData() {
+        if (!mDownloadXtraDataPending) {
+            // try again when network is up
+            mDownloadXtraDataPending = true;
+            return;
+        }
+        mDownloadXtraDataPending = false;
+
+
+        GpsXtraDownloader xtraDownloader = new GpsXtraDownloader(mContext, mProperties);
+        byte[] data = xtraDownloader.downloadXtraData();
+        if (data != null) {
+            if (DEBUG) {
+                Log.d(TAG, "calling native_inject_xtra_data");
+            }
+            native_inject_xtra_data(data, data.length);
+        } else {
+            // try again later
+            // since this is delayed and not urgent we do not hold a wake lock here
+            mHandler.removeMessages(DOWNLOAD_XTRA_DATA);
+            mHandler.sendMessageDelayed(Message.obtain(mHandler, DOWNLOAD_XTRA_DATA), RETRY_INTERVAL);
+        }
+    }
+
+    /**
+     * This is called to inform us when another location provider returns a location.
+     * Someday we might use this for network location injection to aid the GPS
+     */
+    public void updateLocation(Location location) {
+        sendMessage(UPDATE_LOCATION, 0, location);
+    }
+
+    private void handleUpdateLocation(Location location) {
+        if (location.hasAccuracy()) {
+            native_inject_location(location.getLatitude(), location.getLongitude(),
+                    location.getAccuracy());
+        }
+    }
+
+    /**
+     * Returns true if the provider requires access to a
+     * satellite-based positioning system (e.g., GPS), false
+     * otherwise.
+     */
+    public boolean requiresSatellite() {
+        return true;
+    }
+
+    /**
+     * Returns true if the provider requires access to an appropriate
+     * cellular network (e.g., to make use of cell tower IDs), false
+     * otherwise.
+     */
+    public boolean requiresCell() {
+        return false;
+    }
+
+    /**
+     * Returns true if the use of this provider may result in a
+     * monetary charge to the user, false if use is free.  It is up to
+     * each provider to give accurate information.
+     */
+    public boolean hasMonetaryCost() {
+        return false;
+    }
+
+    /**
+     * Returns true if the provider is able to provide altitude
+     * information, false otherwise.  A provider that reports altitude
+     * under most circumstances but may occassionally not report it
+     * should return true.
+     */
+    public boolean supportsAltitude() {
+        return true;
+    }
+
+    /**
+     * Returns true if the provider is able to provide speed
+     * information, false otherwise.  A provider that reports speed
+     * under most circumstances but may occassionally not report it
+     * should return true.
+     */
+    public boolean supportsSpeed() {
+        return true;
+    }
+
+    /**
+     * Returns true if the provider is able to provide bearing
+     * information, false otherwise.  A provider that reports bearing
+     * under most circumstances but may occassionally not report it
+     * should return true.
+     */
+    public boolean supportsBearing() {
+        return true;
+    }
+
+    /**
+     * Returns the power requirement for this provider.
+     *
+     * @return the power requirement for this provider, as one of the
+     * constants Criteria.POWER_REQUIREMENT_*.
+     */
+    public int getPowerRequirement() {
+        return Criteria.POWER_HIGH;
+    }
+
+    /**
+     * Returns true if this provider meets the given criteria,
+     * false otherwise.
+     */
+    public boolean meetsCriteria(Criteria criteria) {
+        return (criteria.getPowerRequirement() != Criteria.POWER_LOW);
+    }
+
+    /**
+     * Returns the horizontal accuracy of this provider
+     *
+     * @return the accuracy of location from this provider, as one
+     * of the constants Criteria.ACCURACY_*.
+     */
+    public int getAccuracy() {
+        return Criteria.ACCURACY_FINE;
+    }
+
+    /**
+     * Enables this provider.  When enabled, calls to getStatus()
+     * must be handled.  Hardware may be started up
+     * when the provider is enabled.
+     */
+    public void enable() {
+        synchronized (mHandler) {
+            sendMessage(ENABLE, 1, null);
+        }
+    }
+
+    private void handleEnable() {
+        if (DEBUG) Log.d(TAG, "handleEnable");
+        if (mEnabled) return;
+        mEnabled = native_init();
+
+        if (mEnabled) {
+            if (mSuplServerHost != null) {
+                native_set_agps_server(AGPS_TYPE_SUPL, mSuplServerHost, mSuplServerPort);
+            }
+            if (mC2KServerHost != null) {
+                native_set_agps_server(AGPS_TYPE_C2K, mC2KServerHost, mC2KServerPort);
+            }
+        } else {
+            Log.w(TAG, "Failed to enable location provider");
+        }
+    }
+
+    /**
+     * Disables this provider.  When disabled, calls to getStatus()
+     * need not be handled.  Hardware may be shut
+     * down while the provider is disabled.
+     */
+    public void disable() {
+        synchronized (mHandler) {
+            sendMessage(ENABLE, 0, null);
+        }
+    }
+
+    private void handleDisable() {
+        if (DEBUG) Log.d(TAG, "handleDisable");
+        if (!mEnabled) return;
+
+        mEnabled = false;
+        stopNavigating();
+
+        // do this before releasing wakelock
+        native_cleanup();
+    }
+
+    public boolean isEnabled() {
+        return mEnabled;
+    }
+
+    public int getStatus(Bundle extras) {
+        if (extras != null) {
+            extras.putInt("satellites", mSvCount);
+        }
+        return mStatus;
+    }
+
+    private void updateStatus(int status, int svCount) {
+        if (status != mStatus || svCount != mSvCount) {
+            mStatus = status;
+            mSvCount = svCount;
+            mLocationExtras.putInt("satellites", svCount);
+            mStatusUpdateTime = SystemClock.elapsedRealtime();
+        }
+    }
+
+    public long getStatusUpdateTime() {
+        return mStatusUpdateTime;
+    }
+
+    public void enableLocationTracking(boolean enable) {
+        // FIXME - should set a flag here to avoid race conditions with single shot request
+        synchronized (mHandler) {
+            sendMessage(ENABLE_TRACKING, (enable ? 1 : 0), null);
+        }
+    }
+
+    private void handleEnableLocationTracking(boolean enable) {
+        if (enable) {
+            mTTFF = 0;
+            mLastFixTime = 0;
+            startNavigating(false);
+        } else {
+            if (!hasCapability(GPS_CAPABILITY_SCHEDULING)) {
+                mAlarmManager.cancel(mWakeupIntent);
+                mAlarmManager.cancel(mTimeoutIntent);
+            }
+            stopNavigating();
+        }
+    }
+
+    public boolean requestSingleShotFix() {
+        if (mStarted) {
+            // cannot do single shot if already navigating
+            return false;
+        }
+        synchronized (mHandler) {
+            mHandler.removeMessages(REQUEST_SINGLE_SHOT);
+            Message m = Message.obtain(mHandler, REQUEST_SINGLE_SHOT);
+            mHandler.sendMessage(m);
+        }
+        return true;
+    }
+
+    private void handleRequestSingleShot() {
+        mTTFF = 0;
+        mLastFixTime = 0;
+        startNavigating(true);
+    }
+
+    public void setMinTime(long minTime) {
+        if (DEBUG) Log.d(TAG, "setMinTime " + minTime);
+        
+        if (minTime >= 0) {
+            mFixInterval = (int)minTime;
+
+            if (mStarted && hasCapability(GPS_CAPABILITY_SCHEDULING)) {
+                if (!native_set_position_mode(mPositionMode, GPS_POSITION_RECURRENCE_PERIODIC,
+                        mFixInterval, 0, 0)) {
+                    Log.e(TAG, "set_position_mode failed in setMinTime()");
+                }
+            }
+        }
+    }
+
+    public String getInternalState() {
+        return native_get_internal_state();
+    }
+
+    private final class Listener implements IBinder.DeathRecipient {
+        final IGpsStatusListener mListener;
+        
+        int mSensors = 0;
+        
+        Listener(IGpsStatusListener listener) {
+            mListener = listener;
+        }
+        
+        public void binderDied() {
+            if (DEBUG) Log.d(TAG, "GPS status listener died");
+
+            synchronized(mListeners) {
+                mListeners.remove(this);
+            }
+            if (mListener != null) {
+                mListener.asBinder().unlinkToDeath(this, 0);
+            }
+        }
+    }
+
+    public void addListener(int uid) {
+        synchronized (mWakeLock) {
+            mPendingListenerMessages++;
+           mWakeLock.acquire();
+            Message m = Message.obtain(mHandler, ADD_LISTENER);
+            m.arg1 = uid;
+            mHandler.sendMessage(m);
+        }
+    }
+
+    private void handleAddListener(int uid) {
+        synchronized(mListeners) {
+            if (mClientUids.indexOfKey(uid) >= 0) {
+                // Shouldn't be here -- already have this uid.
+                Log.w(TAG, "Duplicate add listener for uid " + uid);
+                return;
+            }
+            mClientUids.put(uid, 0);
+            if (mNavigating) {
+                try {
+                    mBatteryStats.noteStartGps(uid);
+                } catch (RemoteException e) {
+                    Log.w(TAG, "RemoteException in addListener");
+                }
+            }
+        }
+    }
+
+    public void removeListener(int uid) {
+        synchronized (mWakeLock) {
+            mPendingListenerMessages++;
+            mWakeLock.acquire();
+            Message m = Message.obtain(mHandler, REMOVE_LISTENER);
+            m.arg1 = uid;
+            mHandler.sendMessage(m);
+        }
+    }
+
+    private void handleRemoveListener(int uid) {
+        synchronized(mListeners) {
+            if (mClientUids.indexOfKey(uid) < 0) {
+                // Shouldn't be here -- don't have this uid.
+                Log.w(TAG, "Unneeded remove listener for uid " + uid);
+                return;
+            }
+            mClientUids.delete(uid);
+            if (mNavigating) {
+                try {
+                    mBatteryStats.noteStopGps(uid);
+                } catch (RemoteException e) {
+                    Log.w(TAG, "RemoteException in removeListener");
+                }
+            }
+        }
+    }
+
+    public boolean sendExtraCommand(String command, Bundle extras) {
+        
+        long identity = Binder.clearCallingIdentity();
+        boolean result = false;
+
+        if ("delete_aiding_data".equals(command)) {
+            result = deleteAidingData(extras);
+        } else if ("force_time_injection".equals(command)) {
+            sendMessage(INJECT_NTP_TIME, 0, null);
+            result = true;
+        } else if ("force_xtra_injection".equals(command)) {
+            if (native_supports_xtra()) {
+                xtraDownloadRequest();
+                result = true;
+            }
+        } else {
+            Log.w(TAG, "sendExtraCommand: unknown command " + command);
+        }
+        
+        Binder.restoreCallingIdentity(identity);
+        return result;
+    }
+
+    private boolean deleteAidingData(Bundle extras) {
+        int flags;
+
+        if (extras == null) {
+            flags = GPS_DELETE_ALL;
+        } else {
+            flags = 0;
+            if (extras.getBoolean("ephemeris")) flags |= GPS_DELETE_EPHEMERIS;
+            if (extras.getBoolean("almanac")) flags |= GPS_DELETE_ALMANAC;
+            if (extras.getBoolean("position")) flags |= GPS_DELETE_POSITION;
+            if (extras.getBoolean("time")) flags |= GPS_DELETE_TIME;
+            if (extras.getBoolean("iono")) flags |= GPS_DELETE_IONO;
+            if (extras.getBoolean("utc")) flags |= GPS_DELETE_UTC;
+            if (extras.getBoolean("health")) flags |= GPS_DELETE_HEALTH;
+            if (extras.getBoolean("svdir")) flags |= GPS_DELETE_SVDIR;
+            if (extras.getBoolean("svsteer")) flags |= GPS_DELETE_SVSTEER;
+            if (extras.getBoolean("sadata")) flags |= GPS_DELETE_SADATA;
+            if (extras.getBoolean("rti")) flags |= GPS_DELETE_RTI;
+            if (extras.getBoolean("celldb-info")) flags |= GPS_DELETE_CELLDB_INFO;
+            if (extras.getBoolean("all")) flags |= GPS_DELETE_ALL;
+        }
+
+        if (flags != 0) {
+            native_delete_aiding_data(flags);
+            return true;
+        }
+
+        return false;
+    }
+
+    private void startNavigating(boolean singleShot) {
+        if (!mStarted) {
+            if (DEBUG) Log.d(TAG, "startNavigating");
+            mStarted = true;
+            mSingleShot = singleShot;
+            mPositionMode = GPS_POSITION_MODE_STANDALONE;
+
+             if (Settings.Secure.getInt(mContext.getContentResolver(),
+                    Settings.Secure.ASSISTED_GPS_ENABLED, 1) != 0) {
+                if (singleShot && hasCapability(GPS_CAPABILITY_MSA)) {
+                    mPositionMode = GPS_POSITION_MODE_MS_ASSISTED;
+                } else if (hasCapability(GPS_CAPABILITY_MSA)) {
+                    mPositionMode = GPS_POSITION_MODE_MS_BASED;
+                }
+            }
+
+            int interval = (hasCapability(GPS_CAPABILITY_SCHEDULING) ? mFixInterval : 1000);
+            if (!native_set_position_mode(mPositionMode, GPS_POSITION_RECURRENCE_PERIODIC,
+                    interval, 0, 0)) {
+                mStarted = false;
+                Log.e(TAG, "set_position_mode failed in startNavigating()");
+                return;
+            }
+            if (!native_start()) {
+                mStarted = false;
+                Log.e(TAG, "native_start failed in startNavigating()");
+                return;
+            }
+
+            // reset SV count to zero
+            updateStatus(LocationProvider.TEMPORARILY_UNAVAILABLE, 0);
+            mFixRequestTime = System.currentTimeMillis();
+            if (!hasCapability(GPS_CAPABILITY_SCHEDULING)) {
+                // set timer to give up if we do not receive a fix within NO_FIX_TIMEOUT
+                // and our fix interval is not short
+                if (mFixInterval >= NO_FIX_TIMEOUT) {
+                    mAlarmManager.set(AlarmManager.ELAPSED_REALTIME_WAKEUP,
+                            SystemClock.elapsedRealtime() + NO_FIX_TIMEOUT, mTimeoutIntent);
+                }
+            }
+        }
+    }
+
+    private void stopNavigating() {
+        if (DEBUG) Log.d(TAG, "stopNavigating");
+        if (mStarted) {
+            mStarted = false;
+            mSingleShot = false;
+            native_stop();
+            mTTFF = 0;
+            mLastFixTime = 0;
+            mLocationFlags = LOCATION_INVALID;
+
+            // reset SV count to zero
+            updateStatus(LocationProvider.TEMPORARILY_UNAVAILABLE, 0);
+        }
+    }
+
+    private void hibernate() {
+        // stop GPS until our next fix interval arrives
+        stopNavigating();
+        mAlarmManager.cancel(mTimeoutIntent);
+        mAlarmManager.cancel(mWakeupIntent);
+        long now = SystemClock.elapsedRealtime();
+        mAlarmManager.set(AlarmManager.ELAPSED_REALTIME_WAKEUP,
+                SystemClock.elapsedRealtime() + mFixInterval, mWakeupIntent);
+    }
+
+    private boolean hasCapability(int capability) {
+        return ((mEngineCapabilities & capability) != 0);
+    }
+
+    /**
+     * called from native code to update our position.
+     */
+    private void reportLocation(int flags, double latitude, double longitude, double altitude,
+            float speed, float bearing, float accuracy, long timestamp) {
+        if (VERBOSE) Log.v(TAG, "reportLocation lat: " + latitude + " long: " + longitude +
+                " timestamp: " + timestamp);
+
+        synchronized (mLocation) {
+            mLocationFlags = flags;
+            if ((flags & LOCATION_HAS_LAT_LONG) == LOCATION_HAS_LAT_LONG) {
+                mLocation.setLatitude(latitude);
+                mLocation.setLongitude(longitude);
+                mLocation.setTime(timestamp);
+            }
+            if ((flags & LOCATION_HAS_ALTITUDE) == LOCATION_HAS_ALTITUDE) {
+                mLocation.setAltitude(altitude);
+            } else {
+                mLocation.removeAltitude();
+            }
+            if ((flags & LOCATION_HAS_SPEED) == LOCATION_HAS_SPEED) {
+                mLocation.setSpeed(speed);
+            } else {
+                mLocation.removeSpeed();
+            }
+            if ((flags & LOCATION_HAS_BEARING) == LOCATION_HAS_BEARING) {
+                mLocation.setBearing(bearing);
+            } else {
+                mLocation.removeBearing();
+            }
+            if ((flags & LOCATION_HAS_ACCURACY) == LOCATION_HAS_ACCURACY) {
+                mLocation.setAccuracy(accuracy);
+            } else {
+                mLocation.removeAccuracy();
+            }
+
+            try {
+                mLocationManager.reportLocation(mLocation, false);
+            } catch (RemoteException e) {
+                Log.e(TAG, "RemoteException calling reportLocation");
+            }
+        }
+
+        mLastFixTime = System.currentTimeMillis();
+        // report time to first fix
+        if (mTTFF == 0 && (flags & LOCATION_HAS_LAT_LONG) == LOCATION_HAS_LAT_LONG) {
+            mTTFF = (int)(mLastFixTime - mFixRequestTime);
+            if (DEBUG) Log.d(TAG, "TTFF: " + mTTFF);
+
+            // notify status listeners
+            synchronized(mListeners) {
+                int size = mListeners.size();
+                for (int i = 0; i < size; i++) {
+                    Listener listener = mListeners.get(i);
+                    try {
+                        listener.mListener.onFirstFix(mTTFF); 
+                    } catch (RemoteException e) {
+                        Log.w(TAG, "RemoteException in stopNavigating");
+                        mListeners.remove(listener);
+                        // adjust for size of list changing
+                        size--;
+                    }
+                }
+            }
+        }
+
+        if (mSingleShot) {
+            stopNavigating();
+        }
+        if (mStarted && mStatus != LocationProvider.AVAILABLE) {
+            // we want to time out if we do not receive a fix
+            // within the time out and we are requesting infrequent fixes
+            if (!hasCapability(GPS_CAPABILITY_SCHEDULING) && mFixInterval < NO_FIX_TIMEOUT) {
+                mAlarmManager.cancel(mTimeoutIntent);
+            }
+
+            // send an intent to notify that the GPS is receiving fixes.
+            Intent intent = new Intent(LocationManager.GPS_FIX_CHANGE_ACTION);
+            intent.putExtra(LocationManager.EXTRA_GPS_ENABLED, true);
+            mContext.sendBroadcast(intent);
+            updateStatus(LocationProvider.AVAILABLE, mSvCount);
+        }
+
+       if (!hasCapability(GPS_CAPABILITY_SCHEDULING) && mStarted && mFixInterval > 1000) {
+            if (DEBUG) Log.d(TAG, "got fix, hibernating");
+            hibernate();
+        }
+   }
+
+    /**
+     * called from native code to update our status
+     */
+    private void reportStatus(int status) {
+        if (VERBOSE) Log.v(TAG, "reportStatus status: " + status);
+
+        synchronized(mListeners) {
+            boolean wasNavigating = mNavigating;
+
+            switch (status) {
+                case GPS_STATUS_SESSION_BEGIN:
+                    mNavigating = true;
+                    mEngineOn = true;
+                    break;
+                case GPS_STATUS_SESSION_END:
+                    mNavigating = false;
+                    break;
+                case GPS_STATUS_ENGINE_ON:
+                    mEngineOn = true;
+                    break;
+                case GPS_STATUS_ENGINE_OFF:
+                    mEngineOn = false;
+                    mNavigating = false;
+                    break;
+            }
+
+            if (wasNavigating != mNavigating) {
+                int size = mListeners.size();
+                for (int i = 0; i < size; i++) {
+                    Listener listener = mListeners.get(i);
+                    try {
+                        if (mNavigating) {
+                            listener.mListener.onGpsStarted();
+                        } else {
+                            listener.mListener.onGpsStopped();
+                        }
+                    } catch (RemoteException e) {
+                        Log.w(TAG, "RemoteException in reportStatus");
+                        mListeners.remove(listener);
+                        // adjust for size of list changing
+                        size--;
+                    }
+                }
+
+                try {
+                    // update battery stats
+                    for (int i=mClientUids.size() - 1; i >= 0; i--) {
+                        int uid = mClientUids.keyAt(i);
+                        if (mNavigating) {
+                            mBatteryStats.noteStartGps(uid);
+                        } else {
+                            mBatteryStats.noteStopGps(uid);
+                        }
+                    }
+                } catch (RemoteException e) {
+                    Log.w(TAG, "RemoteException in reportStatus");
+                }
+
+                // send an intent to notify that the GPS has been enabled or disabled.
+                Intent intent = new Intent(LocationManager.GPS_ENABLED_CHANGE_ACTION);
+                intent.putExtra(LocationManager.EXTRA_GPS_ENABLED, mNavigating);
+                mContext.sendBroadcast(intent);
+            }
+        }
+    }
+
+    /**
+     * called from native code to update SV info
+     */
+    private void reportSvStatus() {
+
+        int svCount = native_read_sv_status(mSvs, mSnrs, mSvElevations, mSvAzimuths, mSvMasks);
+        
+        synchronized(mListeners) {
+            int size = mListeners.size();
+            for (int i = 0; i < size; i++) {
+                Listener listener = mListeners.get(i);
+                try {
+                    listener.mListener.onSvStatusChanged(svCount, mSvs, mSnrs, 
+                            mSvElevations, mSvAzimuths, mSvMasks[EPHEMERIS_MASK], 
+                            mSvMasks[ALMANAC_MASK], mSvMasks[USED_FOR_FIX_MASK]); 
+                } catch (RemoteException e) {
+                    Log.w(TAG, "RemoteException in reportSvInfo");
+                    mListeners.remove(listener);
+                    // adjust for size of list changing
+                    size--;
+                }
+            }
+        }
+
+        if (VERBOSE) {
+            Log.v(TAG, "SV count: " + svCount +
+                    " ephemerisMask: " + Integer.toHexString(mSvMasks[EPHEMERIS_MASK]) +
+                    " almanacMask: " + Integer.toHexString(mSvMasks[ALMANAC_MASK]));
+            for (int i = 0; i < svCount; i++) {
+                Log.v(TAG, "sv: " + mSvs[i] +
+                        " snr: " + (float)mSnrs[i]/10 +
+                        " elev: " + mSvElevations[i] +
+                        " azimuth: " + mSvAzimuths[i] +
+                        ((mSvMasks[EPHEMERIS_MASK] & (1 << (mSvs[i] - 1))) == 0 ? "  " : " E") +
+                        ((mSvMasks[ALMANAC_MASK] & (1 << (mSvs[i] - 1))) == 0 ? "  " : " A") +
+                        ((mSvMasks[USED_FOR_FIX_MASK] & (1 << (mSvs[i] - 1))) == 0 ? "" : "U"));
+            }
+        }
+
+        // return number of sets used in fix instead of total
+        updateStatus(mStatus, Integer.bitCount(mSvMasks[USED_FOR_FIX_MASK]));
+
+        if (mNavigating && mStatus == LocationProvider.AVAILABLE && mLastFixTime > 0 &&
+            System.currentTimeMillis() - mLastFixTime > RECENT_FIX_TIMEOUT) {
+            // send an intent to notify that the GPS is no longer receiving fixes.
+            Intent intent = new Intent(LocationManager.GPS_FIX_CHANGE_ACTION);
+            intent.putExtra(LocationManager.EXTRA_GPS_ENABLED, false);
+            mContext.sendBroadcast(intent);
+            updateStatus(LocationProvider.TEMPORARILY_UNAVAILABLE, mSvCount);
+        }
+    }
+
+    /**
+     * called from native code to update AGPS status
+     */
+    private void reportAGpsStatus(int type, int status) {
+        switch (status) {
+            case GPS_REQUEST_AGPS_DATA_CONN:
+                 int result = mConnMgr.startUsingNetworkFeature(
+                        ConnectivityManager.TYPE_MOBILE, Phone.FEATURE_ENABLE_SUPL);
+                if (result == Phone.APN_ALREADY_ACTIVE) {
+                    if (mAGpsApn != null) {
+                        native_agps_data_conn_open(mAGpsApn);
+                        mAGpsDataConnectionState = AGPS_DATA_CONNECTION_OPEN;
+                    } else {
+                        Log.e(TAG, "mAGpsApn not set when receiving Phone.APN_ALREADY_ACTIVE");
+                        native_agps_data_conn_failed();
+                    }
+                } else if (result == Phone.APN_REQUEST_STARTED) {
+                    mAGpsDataConnectionState = AGPS_DATA_CONNECTION_OPENING;
+                } else {
+                    native_agps_data_conn_failed();
+                }
+                break;
+            case GPS_RELEASE_AGPS_DATA_CONN:
+                if (mAGpsDataConnectionState != AGPS_DATA_CONNECTION_CLOSED) {
+                    mConnMgr.stopUsingNetworkFeature(
+                            ConnectivityManager.TYPE_MOBILE, Phone.FEATURE_ENABLE_SUPL);
+                    native_agps_data_conn_closed();
+                    mAGpsDataConnectionState = AGPS_DATA_CONNECTION_CLOSED;
+                }
+                break;
+            case GPS_AGPS_DATA_CONNECTED:
+                // Log.d(TAG, "GPS_AGPS_DATA_CONNECTED");
+                break;
+            case GPS_AGPS_DATA_CONN_DONE:
+                // Log.d(TAG, "GPS_AGPS_DATA_CONN_DONE");
+                break;
+            case GPS_AGPS_DATA_CONN_FAILED:
+                // Log.d(TAG, "GPS_AGPS_DATA_CONN_FAILED");
+                break;
+        }
+    }
+
+    /**
+     * called from native code to report NMEA data received
+     */
+    private void reportNmea(long timestamp) {
+        synchronized(mListeners) {
+            int size = mListeners.size();
+            if (size > 0) {
+                // don't bother creating the String if we have no listeners
+                int length = native_read_nmea(mNmeaBuffer, mNmeaBuffer.length);
+                String nmea = new String(mNmeaBuffer, 0, length);
+
+                for (int i = 0; i < size; i++) {
+                    Listener listener = mListeners.get(i);
+                    try {
+                        listener.mListener.onNmeaReceived(timestamp, nmea);
+                    } catch (RemoteException e) {
+                        Log.w(TAG, "RemoteException in reportNmea");
+                        mListeners.remove(listener);
+                        // adjust for size of list changing
+                        size--;
+                    }
+                }
+            }
+        }
+    }
+
+    /**
+     * called from native code to inform us what the GPS engine capabilities are
+     */
+    private void setEngineCapabilities(int capabilities) {
+        mEngineCapabilities = capabilities;
+    }
+
+    /**
+     * called from native code to request XTRA data
+     */
+    private void xtraDownloadRequest() {
+        if (DEBUG) Log.d(TAG, "xtraDownloadRequest");
+        sendMessage(DOWNLOAD_XTRA_DATA, 0, null);
+    }
+
+    //=============================================================
+    // NI Client support
+	//=============================================================
+    private final INetInitiatedListener mNetInitiatedListener = new INetInitiatedListener.Stub() {
+    	// Sends a response for an NI reqeust to HAL.
+    	public boolean sendNiResponse(int notificationId, int userResponse)
+    	{
+        	// TODO Add Permission check
+    		
+    		StringBuilder extrasBuf = new StringBuilder();
+
+    		if (DEBUG) Log.d(TAG, "sendNiResponse, notifId: " + notificationId +
+    				", response: " + userResponse);
+    		
+    		native_send_ni_response(notificationId, userResponse);
+    		
+    		return true;
+    	}        
+    };
+        
+    public INetInitiatedListener getNetInitiatedListener() {
+        return mNetInitiatedListener;
+    }
+
+    // Called by JNI function to report an NI request.
+	@SuppressWarnings("deprecation")
+	public void reportNiNotification(
+        	int notificationId,
+        	int niType,
+        	int notifyFlags,
+        	int timeout,
+        	int defaultResponse,
+        	String requestorId,
+        	String text,
+        	int requestorIdEncoding,
+        	int textEncoding,
+        	String extras  // Encoded extra data
+        )
+	{
+		Log.i(TAG, "reportNiNotification: entered");
+		Log.i(TAG, "notificationId: " + notificationId +
+				", niType: " + niType +
+				", notifyFlags: " + notifyFlags +
+				", timeout: " + timeout +
+				", defaultResponse: " + defaultResponse);
+		
+		Log.i(TAG, "requestorId: " + requestorId +
+				", text: " + text +
+				", requestorIdEncoding: " + requestorIdEncoding +
+				", textEncoding: " + textEncoding);
+		
+		GpsNiNotification notification = new GpsNiNotification();
+		
+		notification.notificationId = notificationId;
+		notification.niType = niType;
+		notification.needNotify = (notifyFlags & GpsNetInitiatedHandler.GPS_NI_NEED_NOTIFY) != 0;
+		notification.needVerify = (notifyFlags & GpsNetInitiatedHandler.GPS_NI_NEED_VERIFY) != 0;
+		notification.privacyOverride = (notifyFlags & GpsNetInitiatedHandler.GPS_NI_PRIVACY_OVERRIDE) != 0;
+		notification.timeout = timeout;
+		notification.defaultResponse = defaultResponse;
+		notification.requestorId = requestorId;
+		notification.text = text;
+		notification.requestorIdEncoding = requestorIdEncoding;
+		notification.textEncoding = textEncoding;
+		
+		// Process extras, assuming the format is
+		// one of more lines of "key = value"
+		Bundle bundle = new Bundle();
+		
+		if (extras == null) extras = "";
+		Properties extraProp = new Properties();
+		
+		try {
+			extraProp.load(new StringBufferInputStream(extras));
+		}
+		catch (IOException e)
+		{
+			Log.e(TAG, "reportNiNotification cannot parse extras data: " + extras);
+		}
+		
+		for (Entry<Object, Object> ent : extraProp.entrySet())
+		{
+			bundle.putString((String) ent.getKey(), (String) ent.getValue());
+		}		
+		
+		notification.extras = bundle;
+		
+		mNIHandler.handleNiNotification(notification);		
+	}
+
+    private void sendMessage(int message, int arg, Object obj) {
+        // hold a wake lock while messages are pending
+        synchronized (mWakeLock) {
+            mPendingMessageBits |= (1 << message);
+            mWakeLock.acquire();
+            mHandler.removeMessages(message);
+            Message m = Message.obtain(mHandler, message);
+            m.arg1 = arg;
+            m.obj = obj;
+            mHandler.sendMessage(m);
+        }
+    }
+
+    private final class ProviderHandler extends Handler {
+        @Override
+        public void handleMessage(Message msg)
+        {
+            int message = msg.what;
+            switch (message) {
+                case ENABLE:
+                    if (msg.arg1 == 1) {
+                        handleEnable();
+                    } else {
+                        handleDisable();
+                    }
+                    break;
+                case ENABLE_TRACKING:
+                    handleEnableLocationTracking(msg.arg1 == 1);
+                    break;
+                case REQUEST_SINGLE_SHOT:
+                    handleRequestSingleShot();
+                    break;
+                case UPDATE_NETWORK_STATE:
+                    handleUpdateNetworkState(msg.arg1, (NetworkInfo)msg.obj);
+                    break;
+                case INJECT_NTP_TIME:
+                    handleInjectNtpTime();
+                    break;
+                case DOWNLOAD_XTRA_DATA:
+                    if (native_supports_xtra()) {
+                        handleDownloadXtraData();
+                    }
+                    break;
+                case UPDATE_LOCATION:
+                    handleUpdateLocation((Location)msg.obj);
+                    break;
+                case ADD_LISTENER:
+                    handleAddListener(msg.arg1);
+                    break;
+                case REMOVE_LISTENER:
+                    handleRemoveListener(msg.arg1);
+                    break;
+            }
+            // release wake lock if no messages are pending
+            synchronized (mWakeLock) {
+                mPendingMessageBits &= ~(1 << message);
+                if (message == ADD_LISTENER || message == REMOVE_LISTENER) {
+                    mPendingListenerMessages--;
+                }
+                if (mPendingMessageBits == 0 && mPendingListenerMessages == 0) {
+                    mWakeLock.release();
+                }
+            }
+        }
+    };
+
+    private final class GpsLocationProviderThread extends Thread {
+
+        public GpsLocationProviderThread() {
+            super("GpsLocationProvider");
+        }
+
+        public void run() {
+            Process.setThreadPriority(Process.THREAD_PRIORITY_BACKGROUND);
+            initialize();
+            Looper.prepare();
+            mHandler = new ProviderHandler();
+            // signal when we are initialized and ready to go
+            mInitializedLatch.countDown();
+            Looper.loop();
+        }
+    }
+
+    // for GPS SV statistics
+    private static final int MAX_SVS = 32;
+    private static final int EPHEMERIS_MASK = 0;
+    private static final int ALMANAC_MASK = 1;
+    private static final int USED_FOR_FIX_MASK = 2;
+
+    // preallocated arrays, to avoid memory allocation in reportStatus()
+    private int mSvs[] = new int[MAX_SVS];
+    private float mSnrs[] = new float[MAX_SVS];
+    private float mSvElevations[] = new float[MAX_SVS];
+    private float mSvAzimuths[] = new float[MAX_SVS];
+    private int mSvMasks[] = new int[3];
+    private int mSvCount;
+    // preallocated to avoid memory allocation in reportNmea()
+    private byte[] mNmeaBuffer = new byte[120];
+
+    static { class_init_native(); }
+    private static native void class_init_native();
+    private static native boolean native_is_supported();
+
+    private native boolean native_init();
+    private native void native_cleanup();
+    private native boolean native_set_position_mode(int mode, int recurrence, int min_interval,
+            int preferred_accuracy, int preferred_time);
+    private native boolean native_start();
+    private native boolean native_stop();
+    private native void native_delete_aiding_data(int flags);
+    // returns number of SVs
+    // mask[0] is ephemeris mask and mask[1] is almanac mask
+    private native int native_read_sv_status(int[] svs, float[] snrs,
+            float[] elevations, float[] azimuths, int[] masks);
+    private native int native_read_nmea(byte[] buffer, int bufferSize);
+    private native void native_inject_location(double latitude, double longitude, float accuracy);
+
+    // XTRA Support
+    private native void native_inject_time(long time, long timeReference, int uncertainty);
+    private native boolean native_supports_xtra();
+    private native void native_inject_xtra_data(byte[] data, int length);
+
+    // DEBUG Support
+    private native String native_get_internal_state();
+
+    // AGPS Support
+    private native void native_agps_data_conn_open(String apn);
+    private native void native_agps_data_conn_closed();
+    private native void native_agps_data_conn_failed();
+    private native void native_set_agps_server(int type, String hostname, int port);
+
+    // Network-initiated (NI) Support
+    private native void native_send_ni_response(int notificationId, int userResponse);
+}
diff --git a/services/java/com/android/server/location/GpsXtraDownloader.java b/services/java/com/android/server/location/GpsXtraDownloader.java
new file mode 100644
index 0000000..bc96980
--- /dev/null
+++ b/services/java/com/android/server/location/GpsXtraDownloader.java
@@ -0,0 +1,171 @@
+/*
+ * Copyright (C) 2008 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.android.server.location;
+
+import android.content.Context;
+import android.net.Proxy;
+import android.net.http.AndroidHttpClient;
+import android.util.Config;
+import android.util.Log;
+
+import org.apache.http.HttpEntity;
+import org.apache.http.HttpHost;
+import org.apache.http.HttpResponse;
+import org.apache.http.StatusLine;
+import org.apache.http.client.HttpClient;
+import org.apache.http.client.methods.HttpGet;
+import org.apache.http.client.methods.HttpUriRequest;
+import org.apache.http.conn.params.ConnRouteParams;
+
+import java.io.DataInputStream;
+import java.io.IOException;
+import java.util.Properties;
+import java.util.Random;
+
+/**
+ * A class for downloading GPS XTRA data.
+ *
+ * {@hide}
+ */
+public class GpsXtraDownloader {
+
+    private static final String TAG = "GpsXtraDownloader";
+    
+    private Context mContext;
+    private String[] mXtraServers;
+    // to load balance our server requests
+    private int mNextServerIndex;
+
+    GpsXtraDownloader(Context context, Properties properties) {
+        mContext = context;
+
+        // read XTRA servers from the Properties object
+        int count = 0;
+        String server1 = properties.getProperty("XTRA_SERVER_1");
+        String server2 = properties.getProperty("XTRA_SERVER_2");
+        String server3 = properties.getProperty("XTRA_SERVER_3");
+        if (server1 != null) count++;
+        if (server2 != null) count++;
+        if (server3 != null) count++;
+        
+        if (count == 0) {
+            Log.e(TAG, "No XTRA servers were specified in the GPS configuration");
+            return;
+        } else {
+            mXtraServers = new String[count];
+            count = 0;
+            if (server1 != null) mXtraServers[count++] = server1;
+            if (server2 != null) mXtraServers[count++] = server2;
+            if (server3 != null) mXtraServers[count++] = server3;
+
+            // randomize first server
+            Random random = new Random();
+            mNextServerIndex = random.nextInt(count);
+        }       
+    }
+
+    byte[] downloadXtraData() {
+        String proxyHost = Proxy.getHost(mContext);
+        int proxyPort = Proxy.getPort(mContext);
+        boolean useProxy = (proxyHost != null && proxyPort != -1);
+        byte[] result = null;
+        int startIndex = mNextServerIndex;
+
+        if (mXtraServers == null) {
+            return null;
+        }
+
+        // load balance our requests among the available servers
+        while (result == null) {
+            result = doDownload(mXtraServers[mNextServerIndex], useProxy, proxyHost, proxyPort);
+            
+            // increment mNextServerIndex and wrap around if necessary
+            mNextServerIndex++;
+            if (mNextServerIndex == mXtraServers.length) {
+                mNextServerIndex = 0;
+            }
+            // break if we have tried all the servers
+            if (mNextServerIndex == startIndex) break;
+        }
+    
+        return result;
+    }
+
+    protected static byte[] doDownload(String url, boolean isProxySet, 
+            String proxyHost, int proxyPort) {
+        if (Config.LOGD) Log.d(TAG, "Downloading XTRA data from " + url);
+
+        AndroidHttpClient client = null;
+        try {
+            client = AndroidHttpClient.newInstance("Android");
+            HttpUriRequest req = new HttpGet(url);
+
+            if (isProxySet) {
+                HttpHost proxy = new HttpHost(proxyHost, proxyPort);
+                ConnRouteParams.setDefaultProxy(req.getParams(), proxy);
+            }
+
+            req.addHeader(
+                    "Accept",
+                    "*/*, application/vnd.wap.mms-message, application/vnd.wap.sic");
+
+            req.addHeader(
+                    "x-wap-profile",
+                    "http://www.openmobilealliance.org/tech/profiles/UAPROF/ccppschema-20021212#");
+
+            HttpResponse response = client.execute(req);
+            StatusLine status = response.getStatusLine();
+            if (status.getStatusCode() != 200) { // HTTP 200 is success.
+                if (Config.LOGD) Log.d(TAG, "HTTP error: " + status.getReasonPhrase());
+                return null;
+            }
+
+            HttpEntity entity = response.getEntity();
+            byte[] body = null;
+            if (entity != null) {
+                try {
+                    if (entity.getContentLength() > 0) {
+                        body = new byte[(int) entity.getContentLength()];
+                        DataInputStream dis = new DataInputStream(entity.getContent());
+                        try {
+                            dis.readFully(body);
+                        } finally {
+                            try {
+                                dis.close();
+                            } catch (IOException e) {
+                                Log.e(TAG, "Unexpected IOException.", e);
+                            }
+                        }
+                    }
+                } finally {
+                    if (entity != null) {
+                        entity.consumeContent();
+                    }
+                }
+            }
+            return body;
+        } catch (Exception e) {
+            if (Config.LOGD) Log.d(TAG, "error " + e);
+        } finally {
+            if (client != null) {
+                client.close();
+            }
+        }
+        return null;
+    }
+
+}
diff --git a/services/java/com/android/server/location/LocationProviderInterface.java b/services/java/com/android/server/location/LocationProviderInterface.java
new file mode 100644
index 0000000..084ab81
--- /dev/null
+++ b/services/java/com/android/server/location/LocationProviderInterface.java
@@ -0,0 +1,56 @@
+/*
+ * Copyright (C) 2010 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.android.server.location;
+
+import android.location.Criteria;
+import android.location.Location;
+import android.net.NetworkInfo;
+import android.os.Bundle;
+
+/**
+ * Location Manager's interface for location providers.
+ *
+ * {@hide}
+ */
+public interface LocationProviderInterface {
+    String getName();
+    boolean requiresNetwork();
+    boolean requiresSatellite();
+    boolean requiresCell();
+    boolean hasMonetaryCost();
+    boolean supportsAltitude();
+    boolean supportsSpeed();
+    boolean supportsBearing();
+    int getPowerRequirement();
+    boolean meetsCriteria(Criteria criteria);
+    int getAccuracy();
+    boolean isEnabled();
+    void enable();
+    void disable();
+    int getStatus(Bundle extras);
+    long getStatusUpdateTime();
+    void enableLocationTracking(boolean enable);
+    /* returns false if single shot is not supported */
+    boolean requestSingleShotFix();
+    String getInternalState();
+    void setMinTime(long minTime);
+    void updateNetworkState(int state, NetworkInfo info);
+    void updateLocation(Location location);
+    boolean sendExtraCommand(String command, Bundle extras);
+    void addListener(int uid);
+    void removeListener(int uid);
+}
diff --git a/services/java/com/android/server/location/LocationProviderProxy.java b/services/java/com/android/server/location/LocationProviderProxy.java
new file mode 100644
index 0000000..24d7737
--- /dev/null
+++ b/services/java/com/android/server/location/LocationProviderProxy.java
@@ -0,0 +1,423 @@
+/*
+ * Copyright (C) 2009 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.android.server.location;
+
+import android.content.ComponentName;
+import android.content.Context;
+import android.content.Intent;
+import android.content.ServiceConnection;
+import android.location.Criteria;
+import android.location.ILocationProvider;
+import android.location.Location;
+import android.net.NetworkInfo;
+import android.os.Bundle;
+import android.os.Handler;
+import android.os.IBinder;
+import android.os.RemoteException;
+import android.os.SystemClock;
+import android.util.Log;
+
+import com.android.internal.location.DummyLocationProvider;
+
+/**
+ * A class for proxying location providers implemented as services.
+ *
+ * {@hide}
+ */
+public class LocationProviderProxy implements LocationProviderInterface {
+
+    private static final String TAG = "LocationProviderProxy";
+
+    private final Context mContext;
+    private final String mName;
+    private ILocationProvider mProvider;
+    private Handler mHandler;
+    private final Connection mServiceConnection = new Connection();
+
+    // cached values set by the location manager
+    private boolean mLocationTracking = false;
+    private boolean mEnabled = false;
+    private long mMinTime = -1;
+    private int mNetworkState;
+    private NetworkInfo mNetworkInfo;
+
+    // for caching requiresNetwork, requiresSatellite, etc.
+    private DummyLocationProvider mCachedAttributes;
+
+    // constructor for proxying location providers implemented in a separate service
+    public LocationProviderProxy(Context context, String name, String serviceName,
+            Handler handler) {
+        mContext = context;
+        mName = name;
+        mHandler = handler;
+        mContext.bindService(new Intent(serviceName), mServiceConnection, Context.BIND_AUTO_CREATE);
+    }
+
+    private class Connection implements ServiceConnection {
+        public void onServiceConnected(ComponentName className, IBinder service) {
+            Log.d(TAG, "LocationProviderProxy.onServiceConnected " + className);
+            synchronized (this) {
+                mProvider = ILocationProvider.Stub.asInterface(service);
+                if (mProvider != null) {
+                    mHandler.post(mServiceConnectedTask);
+                }
+            }
+        }
+
+        public void onServiceDisconnected(ComponentName className) {
+            Log.d(TAG, "LocationProviderProxy.onServiceDisconnected " + className);
+            synchronized (this) {
+                mProvider = null;
+            }
+        }
+    }
+
+    private Runnable mServiceConnectedTask = new Runnable() {
+        public void run() {
+            ILocationProvider provider;
+            synchronized (mServiceConnection) {
+                provider = mProvider;
+                if (provider == null) {
+                    return;
+                }
+            }
+
+            if (mCachedAttributes == null) {
+                try {
+                    mCachedAttributes = new DummyLocationProvider(mName, null);
+                    mCachedAttributes.setRequiresNetwork(provider.requiresNetwork());
+                    mCachedAttributes.setRequiresSatellite(provider.requiresSatellite());
+                    mCachedAttributes.setRequiresCell(provider.requiresCell());
+                    mCachedAttributes.setHasMonetaryCost(provider.hasMonetaryCost());
+                    mCachedAttributes.setSupportsAltitude(provider.supportsAltitude());
+                    mCachedAttributes.setSupportsSpeed(provider.supportsSpeed());
+                    mCachedAttributes.setSupportsBearing(provider.supportsBearing());
+                    mCachedAttributes.setPowerRequirement(provider.getPowerRequirement());
+                    mCachedAttributes.setAccuracy(provider.getAccuracy());
+                } catch (RemoteException e) {
+                    mCachedAttributes = null;
+                }
+            }
+
+            // resend previous values from the location manager if the service has restarted
+            try {
+                if (mEnabled) {
+                    provider.enable();
+                }
+                if (mLocationTracking) {
+                    provider.enableLocationTracking(true);
+                }
+                if (mMinTime >= 0) {
+                    provider.setMinTime(mMinTime);
+                }
+                if (mNetworkInfo != null) {
+                    provider.updateNetworkState(mNetworkState, mNetworkInfo);
+                }
+            } catch (RemoteException e) {
+            }
+        }
+    };
+
+    public String getName() {
+        return mName;
+    }
+
+    public boolean requiresNetwork() {
+        if (mCachedAttributes != null) {
+            return mCachedAttributes.requiresNetwork();
+        } else {
+            return false;
+        }
+    }
+
+    public boolean requiresSatellite() {
+        if (mCachedAttributes != null) {
+            return mCachedAttributes.requiresSatellite();
+        } else {
+            return false;
+        }
+    }
+
+    public boolean requiresCell() {
+        if (mCachedAttributes != null) {
+            return mCachedAttributes.requiresCell();
+        } else {
+            return false;
+        }
+    }
+
+    public boolean hasMonetaryCost() {
+        if (mCachedAttributes != null) {
+            return mCachedAttributes.hasMonetaryCost();
+        } else {
+            return false;
+        }
+    }
+
+    public boolean supportsAltitude() {
+        if (mCachedAttributes != null) {
+            return mCachedAttributes.supportsAltitude();
+        } else {
+            return false;
+        }
+    }
+
+    public boolean supportsSpeed() {
+        if (mCachedAttributes != null) {
+            return mCachedAttributes.supportsSpeed();
+        } else {
+            return false;
+        }
+    }
+
+     public boolean supportsBearing() {
+        if (mCachedAttributes != null) {
+            return mCachedAttributes.supportsBearing();
+        } else {
+            return false;
+        }
+    }
+
+    public int getPowerRequirement() {
+        if (mCachedAttributes != null) {
+            return mCachedAttributes.getPowerRequirement();
+        } else {
+            return -1;
+        }
+    }
+
+    public boolean meetsCriteria(Criteria criteria) {
+       ILocationProvider provider;
+        synchronized (mServiceConnection) {
+            provider = mProvider;
+        }
+        if (provider != null) {
+            try {
+                return provider.meetsCriteria(criteria);
+            } catch (RemoteException e) {
+            }
+        }
+        // default implementation if we lost connection to the provider
+        if ((criteria.getAccuracy() != Criteria.NO_REQUIREMENT) &&
+            (criteria.getAccuracy() < getAccuracy())) {
+            return false;
+        }
+        int criteriaPower = criteria.getPowerRequirement();
+        if ((criteriaPower != Criteria.NO_REQUIREMENT) &&
+            (criteriaPower < getPowerRequirement())) {
+            return false;
+        }
+        if (criteria.isAltitudeRequired() && !supportsAltitude()) {
+            return false;
+        }
+        if (criteria.isSpeedRequired() && !supportsSpeed()) {
+            return false;
+        }
+        if (criteria.isBearingRequired() && !supportsBearing()) {
+            return false;
+        }
+        return true;
+    }
+
+    public int getAccuracy() {
+        if (mCachedAttributes != null) {
+            return mCachedAttributes.getAccuracy();
+        } else {
+            return -1;
+        }
+    }
+
+    public void enable() {
+        mEnabled = true;
+        ILocationProvider provider;
+        synchronized (mServiceConnection) {
+            provider = mProvider;
+        }
+        if (provider != null) {
+            try {
+                provider.enable();
+            } catch (RemoteException e) {
+            }
+        }
+    }
+
+    public void disable() {
+        mEnabled = false;
+        ILocationProvider provider;
+        synchronized (mServiceConnection) {
+            provider = mProvider;
+        }
+        if (provider != null) {
+            try {
+                provider.disable();
+            } catch (RemoteException e) {
+            }
+        }
+    }
+
+    public boolean isEnabled() {
+        return mEnabled;
+    }
+
+    public int getStatus(Bundle extras) {
+        ILocationProvider provider;
+        synchronized (mServiceConnection) {
+            provider = mProvider;
+        }
+        if (provider != null) {
+            try {
+                return provider.getStatus(extras);
+            } catch (RemoteException e) {
+            }
+        }
+        return 0;
+    }
+
+    public long getStatusUpdateTime() {
+         ILocationProvider provider;
+        synchronized (mServiceConnection) {
+            provider = mProvider;
+        }
+        if (provider != null) {
+            try {
+                return provider.getStatusUpdateTime();
+            } catch (RemoteException e) {
+            }
+        }
+        return 0;
+     }
+
+    public String getInternalState() {
+        try {
+            return mProvider.getInternalState();
+        } catch (RemoteException e) {
+            Log.e(TAG, "getInternalState failed", e);
+            return null;
+        }
+    }
+
+    public boolean isLocationTracking() {
+        return mLocationTracking;
+    }
+
+    public void enableLocationTracking(boolean enable) {
+        mLocationTracking = enable;
+        if (!enable) {
+            mMinTime = -1;
+        }
+        ILocationProvider provider;
+        synchronized (mServiceConnection) {
+            provider = mProvider;
+        }
+        if (provider != null) {
+            try {
+                provider.enableLocationTracking(enable);
+            } catch (RemoteException e) {
+            }
+        }
+    }
+
+    public boolean requestSingleShotFix() {
+        return false;
+    }
+
+    public long getMinTime() {
+        return mMinTime;
+    }
+
+    public void setMinTime(long minTime) {
+       mMinTime = minTime;
+        ILocationProvider provider;
+        synchronized (mServiceConnection) {
+            provider = mProvider;
+        }
+        if (provider != null) {
+            try {
+                provider.setMinTime(minTime);
+            } catch (RemoteException e) {
+            }
+        }
+    }
+
+    public void updateNetworkState(int state, NetworkInfo info) {
+        mNetworkState = state;
+        mNetworkInfo = info;
+        ILocationProvider provider;
+        synchronized (mServiceConnection) {
+            provider = mProvider;
+        }
+        if (provider != null) {
+            try {
+                provider.updateNetworkState(state, info);
+            } catch (RemoteException e) {
+            }
+        }
+    }
+
+    public void updateLocation(Location location) {
+        ILocationProvider provider;
+        synchronized (mServiceConnection) {
+            provider = mProvider;
+        }
+        if (provider != null) {
+            try {
+                provider.updateLocation(location);
+            } catch (RemoteException e) {
+            }
+        }
+    }
+
+    public boolean sendExtraCommand(String command, Bundle extras) {
+        ILocationProvider provider;
+        synchronized (mServiceConnection) {
+            provider = mProvider;
+        }
+        if (provider != null) {
+            try {
+                provider.sendExtraCommand(command, extras);
+            } catch (RemoteException e) {
+            }
+        }
+        return false;
+    }
+
+    public void addListener(int uid) {
+        ILocationProvider provider;
+        synchronized (mServiceConnection) {
+            provider = mProvider;
+        }
+        if (provider != null) {
+            try {
+                provider.addListener(uid);
+            } catch (RemoteException e) {
+            }
+        }
+    }
+
+    public void removeListener(int uid) {
+        ILocationProvider provider;
+        synchronized (mServiceConnection) {
+            provider = mProvider;
+        }
+        if (provider != null) {
+            try {
+                provider.removeListener(uid);
+            } catch (RemoteException e) {
+            }
+        }
+    }
+}
diff --git a/services/java/com/android/server/location/MockProvider.java b/services/java/com/android/server/location/MockProvider.java
new file mode 100644
index 0000000..01b34b7
--- /dev/null
+++ b/services/java/com/android/server/location/MockProvider.java
@@ -0,0 +1,233 @@
+/*
+ * Copyright (C) 2009 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.android.server.location;
+
+import android.location.Criteria;
+import android.location.ILocationManager;
+import android.location.Location;
+import android.location.LocationProvider;
+import android.net.NetworkInfo;
+import android.os.Bundle;
+import android.os.RemoteException;
+import android.util.Log;
+import android.util.PrintWriterPrinter;
+
+import java.io.PrintWriter;
+
+/**
+ * A mock location provider used by LocationManagerService to implement test providers.
+ *
+ * {@hide}
+ */
+public class MockProvider implements LocationProviderInterface {
+    private final String mName;
+    private final ILocationManager mLocationManager;
+    private final boolean mRequiresNetwork;
+    private final boolean mRequiresSatellite;
+    private final boolean mRequiresCell;
+    private final boolean mHasMonetaryCost;
+    private final boolean mSupportsAltitude;
+    private final boolean mSupportsSpeed;
+    private final boolean mSupportsBearing;
+    private final int mPowerRequirement;
+    private final int mAccuracy;
+    private final Location mLocation;
+    private int mStatus;
+    private long mStatusUpdateTime;
+    private final Bundle mExtras = new Bundle();
+    private boolean mHasLocation;
+    private boolean mHasStatus;
+    private boolean mEnabled;
+
+    private static final String TAG = "MockProvider";
+
+    public MockProvider(String name,  ILocationManager locationManager,
+        boolean requiresNetwork, boolean requiresSatellite,
+        boolean requiresCell, boolean hasMonetaryCost, boolean supportsAltitude,
+        boolean supportsSpeed, boolean supportsBearing, int powerRequirement, int accuracy) {
+        mName = name;
+        mLocationManager = locationManager;
+        mRequiresNetwork = requiresNetwork;
+        mRequiresSatellite = requiresSatellite;
+        mRequiresCell = requiresCell;
+        mHasMonetaryCost = hasMonetaryCost;
+        mSupportsAltitude = supportsAltitude;
+        mSupportsBearing = supportsBearing;
+        mSupportsSpeed = supportsSpeed;
+        mPowerRequirement = powerRequirement;
+        mAccuracy = accuracy;
+        mLocation = new Location(name);
+    }
+
+    public String getName() {
+        return mName;
+    }
+
+    public void disable() {
+        mEnabled = false;
+    }
+
+    public void enable() {
+        mEnabled = true;
+    }
+
+    public boolean isEnabled() {
+        return mEnabled;
+    }
+
+    public int getStatus(Bundle extras) {
+        if (mHasStatus) {
+            extras.clear();
+            extras.putAll(mExtras);
+            return mStatus;
+        } else {
+            return LocationProvider.AVAILABLE;
+        }
+    }
+
+    public long getStatusUpdateTime() {
+        return mStatusUpdateTime;
+    }
+
+    public int getAccuracy() {
+        return mAccuracy;
+    }
+
+    public int getPowerRequirement() {
+        return mPowerRequirement;
+    }
+
+    public boolean hasMonetaryCost() {
+        return mHasMonetaryCost;
+    }
+
+    public boolean requiresCell() {
+        return mRequiresCell;
+    }
+
+    public boolean requiresNetwork() {
+        return mRequiresNetwork;
+    }
+
+    public boolean requiresSatellite() {
+        return mRequiresSatellite;
+    }
+
+    public boolean supportsAltitude() {
+        return mSupportsAltitude;
+    }
+
+    public boolean supportsBearing() {
+        return mSupportsBearing;
+    }
+
+    public boolean supportsSpeed() {
+        return mSupportsSpeed;
+    }
+
+    public boolean meetsCriteria(Criteria criteria) {
+        if ((criteria.getAccuracy() != Criteria.NO_REQUIREMENT) &&
+            (criteria.getAccuracy() < mAccuracy)) {
+            return false;
+        }
+        int criteriaPower = criteria.getPowerRequirement();
+        if ((criteriaPower != Criteria.NO_REQUIREMENT) &&
+            (criteriaPower < mPowerRequirement)) {
+            return false;
+        }
+        if (criteria.isAltitudeRequired() && !mSupportsAltitude) {
+            return false;
+        }
+        if (criteria.isSpeedRequired() && !mSupportsSpeed) {
+            return false;
+        }
+        if (criteria.isBearingRequired() && !mSupportsBearing) {
+            return false;
+        }
+        return true;
+    }
+
+    public void setLocation(Location l) {
+        mLocation.set(l);
+        mHasLocation = true;
+        try {
+            mLocationManager.reportLocation(mLocation, false);
+        } catch (RemoteException e) {
+            Log.e(TAG, "RemoteException calling reportLocation");
+        }
+    }
+
+    public void clearLocation() {
+        mHasLocation = false;
+    }
+
+    public void setStatus(int status, Bundle extras, long updateTime) {
+        mStatus = status;
+        mStatusUpdateTime = updateTime;
+        mExtras.clear();
+        if (extras != null) {
+            mExtras.putAll(extras);
+        }
+        mHasStatus = true;
+    }
+
+    public void clearStatus() {
+        mHasStatus = false;
+        mStatusUpdateTime = 0;
+    }
+
+    public String getInternalState() {
+        return null;
+    }
+
+    public void enableLocationTracking(boolean enable) {
+    }
+
+    public boolean requestSingleShotFix() {
+        return false;
+    }
+
+    public void setMinTime(long minTime) {
+    }
+
+    public void updateNetworkState(int state, NetworkInfo info) {
+    }
+
+    public void updateLocation(Location location) {
+    }
+
+    public boolean sendExtraCommand(String command, Bundle extras) {
+        return false;
+    }
+
+    public void addListener(int uid) {
+    }
+
+    public void removeListener(int uid) {
+    }
+
+    public void dump(PrintWriter pw, String prefix) {
+        pw.println(prefix + mName);
+        pw.println(prefix + "mHasLocation=" + mHasLocation);
+        pw.println(prefix + "mLocation:");
+        mLocation.dump(new PrintWriterPrinter(pw), prefix + "  ");
+        pw.println(prefix + "mHasStatus=" + mHasStatus);
+        pw.println(prefix + "mStatus=" + mStatus);
+        pw.println(prefix + "mStatusUpdateTime=" + mStatusUpdateTime);
+        pw.println(prefix + "mExtras=" + mExtras);
+    }
+}
diff --git a/services/java/com/android/server/location/PassiveProvider.java b/services/java/com/android/server/location/PassiveProvider.java
new file mode 100644
index 0000000..7fc93f8
--- /dev/null
+++ b/services/java/com/android/server/location/PassiveProvider.java
@@ -0,0 +1,152 @@
+/*
+ * Copyright (C) 2010 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.android.server.location;
+
+import android.location.Criteria;
+import android.location.ILocationManager;
+import android.location.Location;
+import android.location.LocationManager;
+import android.location.LocationProvider;
+import android.net.NetworkInfo;
+import android.os.Bundle;
+import android.os.RemoteException;
+import android.util.Log;
+
+/**
+ * A passive location provider reports locations received from other providers
+ * for clients that want to listen passively without actually triggering
+ * location updates.
+ *
+ * {@hide}
+ */
+public class PassiveProvider implements LocationProviderInterface {
+
+    private static final String TAG = "PassiveProvider";
+
+    private final ILocationManager mLocationManager;
+    private boolean mTracking;
+
+    public PassiveProvider(ILocationManager locationManager) {
+        mLocationManager = locationManager;
+    }
+
+    public String getName() {
+        return LocationManager.PASSIVE_PROVIDER;
+    }
+
+    public boolean requiresNetwork() {
+        return false;
+    }
+
+    public boolean requiresSatellite() {
+        return false;
+    }
+
+    public boolean requiresCell() {
+        return false;
+    }
+
+    public boolean hasMonetaryCost() {
+        return false;
+    }
+
+    public boolean supportsAltitude() {
+        return false;
+    }
+
+    public boolean supportsSpeed() {
+        return false;
+    }
+
+    public boolean supportsBearing() {
+        return false;
+    }
+
+    public int getPowerRequirement() {
+        return -1;
+    }
+
+    public boolean meetsCriteria(Criteria criteria) {
+        // We do not want to match the special passive provider based on criteria.
+        return false;
+    }
+
+    public int getAccuracy() {
+        return -1;
+    }
+
+    public boolean isEnabled() {
+        return true;
+    }
+
+    public void enable() {
+    }
+
+    public void disable() {
+    }
+
+    public int getStatus(Bundle extras) {
+        if (mTracking) {
+            return LocationProvider.AVAILABLE;
+        } else {
+            return LocationProvider.TEMPORARILY_UNAVAILABLE;
+        }
+    }
+
+    public long getStatusUpdateTime() {
+        return -1;
+    }
+
+    public String getInternalState() {
+        return null;
+    }
+
+    public void enableLocationTracking(boolean enable) {
+        mTracking = enable;
+    }
+
+    public boolean requestSingleShotFix() {
+        return false;
+    }
+
+    public void setMinTime(long minTime) {
+    }
+
+    public void updateNetworkState(int state, NetworkInfo info) {
+    }
+
+    public void updateLocation(Location location) {
+        if (mTracking) {
+            try {
+                // pass the location back to the location manager
+                mLocationManager.reportLocation(location, true);
+            } catch (RemoteException e) {
+                Log.e(TAG, "RemoteException calling reportLocation");
+            }
+        }
+    }
+
+    public boolean sendExtraCommand(String command, Bundle extras) {
+        return false;
+    }
+
+    public void addListener(int uid) {
+    }
+
+    public void removeListener(int uid) {
+    }
+}
diff --git a/services/java/com/android/server/status/AnimatedImageView.java b/services/java/com/android/server/status/AnimatedImageView.java
deleted file mode 100644
index 97df065..0000000
--- a/services/java/com/android/server/status/AnimatedImageView.java
+++ /dev/null
@@ -1,85 +0,0 @@
-/*
- * Copyright (C) 2008 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.android.server.status;
-
-import android.content.Context;
-import android.graphics.drawable.AnimationDrawable;
-import android.graphics.drawable.Drawable;
-import android.util.AttributeSet;
-import android.widget.ImageView;
-import android.widget.RemoteViews.RemoteView;
-
-@RemoteView
-public class AnimatedImageView extends ImageView {
-    AnimationDrawable mAnim;
-    boolean mAttached;
-
-    public AnimatedImageView(Context context) {
-        super(context);
-    }
-
-    public AnimatedImageView(Context context, AttributeSet attrs) {
-        super(context, attrs);
-    }
-
-    private void updateAnim() {
-        Drawable drawable = getDrawable();
-        if (mAttached && mAnim != null) {
-            mAnim.stop();
-        }
-        if (drawable instanceof AnimationDrawable) {
-            mAnim = (AnimationDrawable)drawable;
-            if (mAttached) {
-                mAnim.start();
-            }
-        } else {
-            mAnim = null;
-        }
-    }
-
-    @Override
-    public void setImageDrawable(Drawable drawable) {
-        super.setImageDrawable(drawable);
-        updateAnim();
-    }
-
-    @Override
-    @android.view.RemotableViewMethod
-    public void setImageResource(int resid) {
-        super.setImageResource(resid);
-        updateAnim();
-    }
-
-    @Override
-    public void onAttachedToWindow() {
-        super.onAttachedToWindow();
-        if (mAnim != null) {
-            mAnim.start();
-        }
-        mAttached = true;
-    }
-
-    @Override
-    public void onDetachedFromWindow() {
-        super.onDetachedFromWindow();
-        if (mAnim != null) {
-            mAnim.stop();
-        }
-        mAttached = false;
-    }
-}
-
diff --git a/services/java/com/android/server/status/CloseDragHandle.java b/services/java/com/android/server/status/CloseDragHandle.java
deleted file mode 100644
index ad1ac4d..0000000
--- a/services/java/com/android/server/status/CloseDragHandle.java
+++ /dev/null
@@ -1,51 +0,0 @@
-/*
- * Copyright (C) 2008 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.android.server.status;
-
-import android.content.Context;
-import android.util.AttributeSet;
-import android.view.MotionEvent;
-import android.widget.LinearLayout;
-
-
-public class CloseDragHandle extends LinearLayout {
-    StatusBarService mService;
-
-    public CloseDragHandle(Context context, AttributeSet attrs) {
-        super(context, attrs);
-    }
-
-    /**
-     * Ensure that, if there is no target under us to receive the touch,
-     * that we process it ourself.  This makes sure that onInterceptTouchEvent()
-     * is always called for the entire gesture.
-     */
-    @Override
-    public boolean onTouchEvent(MotionEvent event) {
-        if (event.getAction() != MotionEvent.ACTION_DOWN) {
-            mService.interceptTouchEvent(event);
-        }
-        return true;
-    }
-
-    @Override
-    public boolean onInterceptTouchEvent(MotionEvent event) {
-        return mService.interceptTouchEvent(event)
-                ? true : super.onInterceptTouchEvent(event);
-    }
-}
-
diff --git a/services/java/com/android/server/status/DateView.java b/services/java/com/android/server/status/DateView.java
deleted file mode 100644
index c04fb45..0000000
--- a/services/java/com/android/server/status/DateView.java
+++ /dev/null
@@ -1,89 +0,0 @@
-/*
- * Copyright (C) 2008 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.android.server.status;
-
-import android.content.BroadcastReceiver;
-import android.content.Context;
-import android.content.Intent;
-import android.content.IntentFilter;
-import android.util.AttributeSet;
-import android.util.Slog;
-import android.widget.TextView;
-import android.view.MotionEvent;
-
-import java.text.DateFormat;
-import java.util.Date;
-
-public final class DateView extends TextView {
-    private static final String TAG = "DateView";
-
-    private boolean mUpdating = false;
-
-    private BroadcastReceiver mIntentReceiver = new BroadcastReceiver() {
-        @Override
-        public void onReceive(Context context, Intent intent) {
-            String action = intent.getAction();
-            if (action.equals(Intent.ACTION_TIME_TICK)
-                    || action.equals(Intent.ACTION_TIMEZONE_CHANGED)) {
-                updateClock();
-            }
-        }
-    };
-
-    public DateView(Context context, AttributeSet attrs) {
-        super(context, attrs);
-    }
-
-    @Override
-    protected void onAttachedToWindow() {
-        super.onAttachedToWindow();
-    }
-    
-    @Override
-    protected void onDetachedFromWindow() {
-        super.onDetachedFromWindow();
-        setUpdates(false);
-    }
-
-    @Override
-    protected int getSuggestedMinimumWidth() {
-        // makes the large background bitmap not force us to full width
-        return 0;
-    }
-
-    private final void updateClock() {
-        Date now = new Date();
-        setText(DateFormat.getDateInstance(DateFormat.LONG).format(now));
-    }
-
-    void setUpdates(boolean update) {
-        if (update != mUpdating) {
-            mUpdating = update;
-            if (update) {
-                // Register for Intent broadcasts for the clock and battery
-                IntentFilter filter = new IntentFilter();
-                filter.addAction(Intent.ACTION_TIME_TICK);
-                filter.addAction(Intent.ACTION_TIMEZONE_CHANGED);
-                mContext.registerReceiver(mIntentReceiver, filter, null, null);
-                updateClock();
-            } else {
-                mContext.unregisterReceiver(mIntentReceiver);
-            }
-        }
-    }
-}
-
diff --git a/services/java/com/android/server/status/ExpandedView.java b/services/java/com/android/server/status/ExpandedView.java
deleted file mode 100644
index cb37f90..0000000
--- a/services/java/com/android/server/status/ExpandedView.java
+++ /dev/null
@@ -1,58 +0,0 @@
-/*
- * Copyright (C) 2008 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.android.server.status;
-
-import android.content.Context;
-import android.util.AttributeSet;
-import android.view.Display;
-import android.view.KeyEvent;
-import android.view.MotionEvent;
-import android.view.WindowManager;
-import android.widget.LinearLayout;
-import android.util.Slog;
-
-
-public class ExpandedView extends LinearLayout {
-    StatusBarService mService;
-    int mPrevHeight = -1;
-
-    public ExpandedView(Context context, AttributeSet attrs) {
-        super(context, attrs);
-    }
-
-    @Override
-    protected void onFinishInflate() {
-        super.onFinishInflate();
-    }
-
-    /** We want to shrink down to 0, and ignore the background. */
-    @Override
-    public int getSuggestedMinimumHeight() {
-        return 0;
-    }
-
-    @Override
-     protected void onLayout(boolean changed, int left, int top, int right, int bottom) {
-         super.onLayout(changed, left, top, right, bottom);
-         int height = bottom - top;
-         if (height != mPrevHeight) {
-             //Slog.d(StatusBarService.TAG, "height changed old=" + mPrevHeight + " new=" + height);
-             mPrevHeight = height;
-             mService.updateExpandedViewPos(StatusBarService.EXPANDED_LEAVE_ALONE);
-         }
-     }
-}
diff --git a/services/java/com/android/server/status/FixedSizeDrawable.java b/services/java/com/android/server/status/FixedSizeDrawable.java
deleted file mode 100644
index dbfcb2c..0000000
--- a/services/java/com/android/server/status/FixedSizeDrawable.java
+++ /dev/null
@@ -1,66 +0,0 @@
-/*
- * Copyright (C) 2008 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.android.server.status;
-
-import android.graphics.drawable.Drawable;
-import android.graphics.Canvas;
-import android.graphics.ColorFilter;
-import android.graphics.Rect;
-import android.util.Slog;
-
-class FixedSizeDrawable extends Drawable {
-    Drawable mDrawable;
-    int mLeft;
-    int mTop;
-    int mRight;
-    int mBottom;
-
-    FixedSizeDrawable(Drawable that) {
-        mDrawable = that;
-    }
-
-    public void setFixedBounds(int l, int t, int r, int b) {
-        mLeft = l;
-        mTop = t;
-        mRight = r;
-        mBottom = b;
-    }
-
-    public void setBounds(Rect bounds) {
-        mDrawable.setBounds(mLeft, mTop, mRight, mBottom);
-    }
-
-    public void setBounds(int l, int t, int r, int b) {
-        mDrawable.setBounds(mLeft, mTop, mRight, mBottom);
-    }
-
-    public void draw(Canvas canvas) {
-        mDrawable.draw(canvas);
-    }
-
-    public int getOpacity() {
-        return mDrawable.getOpacity();
-    }
-
-    public void setAlpha(int alpha) {
-        mDrawable.setAlpha(alpha);
-    }
-
-    public void setColorFilter(ColorFilter cf) {
-        mDrawable.setColorFilter(cf);
-    }
-}
diff --git a/services/java/com/android/server/status/IconData.java b/services/java/com/android/server/status/IconData.java
deleted file mode 100644
index fd226f9..0000000
--- a/services/java/com/android/server/status/IconData.java
+++ /dev/null
@@ -1,122 +0,0 @@
-/*
- * Copyright (C) 2008 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.android.server.status;
-
-import android.util.Slog;
-
-public class IconData {
-    /**
-     * Indicates ths item represents a piece of text.
-     */
-    public static final int TEXT = 1;
-    
-    /**
-     * Indicates ths item represents an icon.
-     */
-    public static final int ICON = 2;
-
-    /**
-     * The type of this item. One of TEXT, ICON, or LEVEL_ICON.
-     */
-    public int type;
-
-    /**
-     * The slot that this icon will be in if it is not a notification
-     */
-    public String slot;
-
-    /**
-     * The package containting the icon to draw for this item. Valid if this is
-     * an ICON type.
-     */
-    public String iconPackage;
-    
-    /**
-     * The icon to draw for this item. Valid if this is an ICON type.
-     */
-    public int iconId;
-    
-    /**
-     * The level associated with the icon. Valid if this is a LEVEL_ICON type.
-     */
-    public int iconLevel;
-    
-    /**
-     * The "count" number.
-     */
-    public int number;
-
-    /**
-     * The text associated with the icon. Valid if this is a TEXT type.
-     */
-    public CharSequence text;
-
-    private IconData() {
-    }
-
-    public static IconData makeIcon(String slot,
-            String iconPackage, int iconId, int iconLevel, int number) {
-        IconData data = new IconData();
-        data.type = ICON;
-        data.slot = slot;
-        data.iconPackage = iconPackage;
-        data.iconId = iconId;
-        data.iconLevel = iconLevel;
-        data.number = number;
-        return data;
-    }
-    
-    public static IconData makeText(String slot, CharSequence text) {
-        IconData data = new IconData();
-        data.type = TEXT;
-        data.slot = slot;
-        data.text = text;
-        return data;
-    }
-
-    public void copyFrom(IconData that) {
-        this.type = that.type;
-        this.slot = that.slot;
-        this.iconPackage = that.iconPackage;
-        this.iconId = that.iconId;
-        this.iconLevel = that.iconLevel;
-        this.number = that.number;
-        this.text = that.text; // should we clone this?
-    }
-
-    public IconData clone() {
-        IconData that = new IconData();
-        that.copyFrom(this);
-        return that;
-    }
-
-    public String toString() {
-        if (this.type == TEXT) {
-            return "IconData(slot=" + (this.slot != null ? "'" + this.slot + "'" : "null")
-                    + " text='" + this.text + "')"; 
-        }
-        else if (this.type == ICON) {
-            return "IconData(slot=" + (this.slot != null ? "'" + this.slot + "'" : "null")
-                    + " package=" + this.iconPackage
-                    + " iconId=" + Integer.toHexString(this.iconId)
-                    + " iconLevel=" + this.iconLevel + ")"; 
-        }
-        else {
-            return "IconData(type=" + type + ")";
-        }
-    }
-}
diff --git a/services/java/com/android/server/status/IconMerger.java b/services/java/com/android/server/status/IconMerger.java
deleted file mode 100644
index aa702ae..0000000
--- a/services/java/com/android/server/status/IconMerger.java
+++ /dev/null
@@ -1,133 +0,0 @@
-/*
- * Copyright (C) 2008 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.android.server.status;
-
-import android.content.Context;
-import android.os.Handler;
-import android.util.AttributeSet;
-import android.view.View;
-import android.widget.LinearLayout;
-
-
-public class IconMerger extends LinearLayout {
-    StatusBarService service;
-    StatusBarIcon moreIcon;
-
-    public IconMerger(Context context, AttributeSet attrs) {
-        super(context, attrs);
-    }
-
-    @Override
-    protected void onLayout(boolean changed, int l, int t, int r, int b) {
-        super.onLayout(changed, l, t, r, b);
-
-        final int maxWidth = r - l;
-        final int N = getChildCount();
-        int i;
-
-        // get the rightmost one, and see if we even need to do anything
-        int fitRight = -1;
-        for (i=N-1; i>=0; i--) {
-            final View child = getChildAt(i);
-            if (child.getVisibility() != GONE) {
-                fitRight = child.getRight();
-                break;
-            }
-        }
-
-        // find the first visible one that isn't the more icon
-        View moreView = null;
-        int fitLeft = -1;
-        int startIndex = -1;
-        for (i=0; i<N; i++) {
-            final View child = getChildAt(i);
-            if (com.android.internal.R.drawable.stat_notify_more == child.getId()) {
-                moreView = child;
-                startIndex = i+1;
-            }
-            else if (child.getVisibility() != GONE) {
-                fitLeft = child.getLeft();
-                break;
-            }
-        }
-
-        if (moreView == null || startIndex < 0) {
-            throw new RuntimeException("Status Bar / IconMerger moreView == null");
-        }
-        
-        // if it fits without the more icon, then hide the more icon and update fitLeft
-        // so everything gets pushed left
-        int adjust = 0;
-        if (fitRight - fitLeft <= maxWidth) {
-            adjust = fitLeft - moreView.getLeft();
-            fitLeft -= adjust;
-            fitRight -= adjust;
-            moreView.layout(0, moreView.getTop(), 0, moreView.getBottom());
-        }
-        int extra = fitRight - r;
-        int shift = -1;
-
-        int breakingPoint = fitLeft + extra + adjust;
-        int number = 0;
-        for (i=startIndex; i<N; i++) {
-            final View child = getChildAt(i);
-            if (child.getVisibility() != GONE) {
-                int childLeft = child.getLeft();
-                int childRight = child.getRight();
-                if (childLeft < breakingPoint) {
-                    // hide this one
-                    child.layout(0, child.getTop(), 0, child.getBottom());
-                    int n = this.service.getIconNumberForView(child);
-                    if (n == 0) {
-                        number += 1;
-                    } else if (n > 0) {
-                        number += n;
-                    }
-                } else {
-                    // decide how much to shift by
-                    if (shift < 0) {
-                        shift = childLeft - fitLeft;
-                    }
-                    // shift this left by shift
-                    child.layout(childLeft-shift, child.getTop(),
-                                    childRight-shift, child.getBottom());
-                }
-            }
-        }
-        
-        // BUG: Updating the text during the layout here doesn't seem to cause
-        // the view to be redrawn fully.  The text view gets resized correctly, but the
-        // text contents aren't drawn properly.  To work around this, we post a message
-        // and provide the value later.  We're the only one changing this value show it
-        // should be ordered correctly.
-        if (false) {
-            this.moreIcon.update(number);
-        } else {
-            mBugWorkaroundNumber = number;
-            mBugWorkaroundHandler.post(mBugWorkaroundRunnable);
-        }
-    }
-
-    private int mBugWorkaroundNumber;
-    private Handler mBugWorkaroundHandler = new Handler();
-    private Runnable mBugWorkaroundRunnable = new Runnable() {
-        public void run() {
-            IconMerger.this.moreIcon.update(mBugWorkaroundNumber);
-            IconMerger.this.moreIcon.view.invalidate();
-        }
-    };
-}
diff --git a/services/java/com/android/server/status/LatestItemView.java b/services/java/com/android/server/status/LatestItemView.java
deleted file mode 100644
index fe8d164..0000000
--- a/services/java/com/android/server/status/LatestItemView.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
- * Copyright (C) 2008 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.android.server.status;
-
-import android.content.Context;
-import android.util.AttributeSet;
-import android.util.Slog;
-import android.view.MotionEvent;
-import android.widget.FrameLayout;
-
-public class LatestItemView extends FrameLayout {
-
-    public LatestItemView(Context context, AttributeSet attrs) {
-        super(context, attrs);
-    }
-
-    public boolean dispatchTouchEvent(MotionEvent ev) {
-        return onTouchEvent(ev);
-    }
-}
diff --git a/services/java/com/android/server/status/NotificationData.java b/services/java/com/android/server/status/NotificationData.java
deleted file mode 100644
index 71f01ca..0000000
--- a/services/java/com/android/server/status/NotificationData.java
+++ /dev/null
@@ -1,44 +0,0 @@
-/*
- * Copyright (C) 2008 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.android.server.status;
-
-import android.app.PendingIntent;
-import android.widget.RemoteViews;
-
-public class NotificationData {
-    public String pkg;
-    public String tag;
-    public int id;
-    public CharSequence tickerText;
-
-    public long when;
-    public boolean ongoingEvent;
-    public boolean clearable;
-
-    public RemoteViews contentView;
-    public PendingIntent contentIntent;
-
-    public PendingIntent deleteIntent;
-
-    public String toString() {
-        return "NotificationData(package=" + pkg + " id=" + id + " tickerText=" + tickerText
-                + " ongoingEvent=" + ongoingEvent + " contentIntent=" + contentIntent
-                + " deleteIntent=" + deleteIntent
-                + " clearable=" + clearable
-                + " contentView=" + contentView + " when=" + when + ")";
-    }
-}
diff --git a/services/java/com/android/server/status/NotificationLinearLayout.java b/services/java/com/android/server/status/NotificationLinearLayout.java
deleted file mode 100644
index 2fdf956..0000000
--- a/services/java/com/android/server/status/NotificationLinearLayout.java
+++ /dev/null
@@ -1,29 +0,0 @@
-/*
- * Copyright (C) 2008 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.android.server.status;
-
-import android.content.Context;
-import android.util.AttributeSet;
-import android.widget.LinearLayout;
-
-
-public class NotificationLinearLayout extends LinearLayout {
-    public NotificationLinearLayout(Context context, AttributeSet attrs) {
-        super(context, attrs);
-    }
-}
-
diff --git a/services/java/com/android/server/status/NotificationViewList.java b/services/java/com/android/server/status/NotificationViewList.java
deleted file mode 100644
index 1bb56a7..0000000
--- a/services/java/com/android/server/status/NotificationViewList.java
+++ /dev/null
@@ -1,276 +0,0 @@
-/*
- * Copyright (C) 2008 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.android.server.status;
-
-import android.os.IBinder;
-import android.util.Slog;
-import android.view.View;
-import java.util.ArrayList;
-
-class NotificationViewList {
-    private ArrayList<StatusBarNotification> mOngoing = new ArrayList();
-    private ArrayList<StatusBarNotification> mLatest = new ArrayList();
-
-    NotificationViewList() {
-    }
-
-    private static final int indexInList(ArrayList<StatusBarNotification> list, NotificationData n){
-        final int N = list.size();
-        for (int i=0; i<N; i++) {
-            StatusBarNotification that = list.get(i);
-            if (that.data == n) {
-                return i;
-            }
-        }
-        return -1;
-    }
-
-    int getIconIndex(NotificationData n) {
-        final int ongoingSize = mOngoing.size();
-        final int latestSize = mLatest.size();
-        if (n.ongoingEvent) {
-            int index = indexInList(mOngoing, n);
-            if (index >= 0) {
-                return latestSize + index + 1;
-            } else {
-                return -1;
-            }
-        } else {
-            return indexInList(mLatest, n) + 1;
-        }
-    }
-
-    void remove(StatusBarNotification notification) {
-        NotificationData n = notification.data;
-        int index;
-        index = indexInList(mOngoing, n);
-        if (index >= 0) {
-            mOngoing.remove(index);
-            return;
-        }
-        index = indexInList(mLatest, n);
-        if (index >= 0) {
-            mLatest.remove(index);
-            return;
-        }
-    }
-
-    ArrayList<StatusBarNotification> notificationsForPackage(String packageName) {
-        ArrayList<StatusBarNotification> list = new ArrayList<StatusBarNotification>();
-        int N = mOngoing.size();
-        for (int i=0; i<N; i++) {
-            if (matchPackage(mOngoing.get(i), packageName)) {
-                list.add(mOngoing.get(i));
-            }
-        }
-        N = mLatest.size();
-        for (int i=0; i<N; i++) {
-            if (matchPackage(mLatest.get(i), packageName)) {
-                list.add(mLatest.get(i));
-            }
-        }
-        return list;
-    }
-    
-    private final boolean matchPackage(StatusBarNotification snb, String packageName) {
-        if (snb.data.contentIntent != null) {
-            if (snb.data.contentIntent.getTargetPackage().equals(packageName)) {
-                return true;
-            }
-        } else if (snb.data.pkg != null && snb.data.pkg.equals(packageName)) {
-            return true;
-        }
-        return false;
-    }
-    
-    private static final int indexForKey(ArrayList<StatusBarNotification> list, IBinder key) {
-        final int N = list.size();
-        for (int i=0; i<N; i++) {
-            if (list.get(i).key == key) {
-                return i;
-            }
-        }
-        return -1;
-    }
-
-    StatusBarNotification get(IBinder key) {
-        int index;
-        index = indexForKey(mOngoing, key);
-        if (index >= 0) {
-            return mOngoing.get(index);
-        }
-        index = indexForKey(mLatest, key);
-        if (index >= 0) {
-            return mLatest.get(index);
-        }
-        return null;
-    }
-
-    // gets the index of the notification's view in its expanded parent view
-    int getExpandedIndex(StatusBarNotification notification) {
-        ArrayList<StatusBarNotification> list = notification.data.ongoingEvent ? mOngoing : mLatest;
-        final IBinder key = notification.key;
-        int index = 0;
-        // (the view order is backwards from this list order)
-        for (int i=list.size()-1; i>=0; i--) {
-            StatusBarNotification item = list.get(i);
-            if (item.key == key) {
-                return index;
-            }
-            if (item.view != null) {
-                index++;
-            }
-        }
-        Slog.e(StatusBarService.TAG, "Couldn't find notification in NotificationViewList.");
-        Slog.e(StatusBarService.TAG, "notification=" + notification);
-        dump(notification);
-        return 0;
-    }
-
-    void clearViews() {
-        int N = mOngoing.size();
-        for (int i=0; i<N; i++) {
-            mOngoing.get(i).view = null;
-        }
-        N = mLatest.size();
-        for (int i=0; i<N; i++) {
-            mLatest.get(i).view = null;
-        }
-    }
-    
-    int ongoingCount() {
-        return mOngoing.size();
-    }
-
-    int latestCount() {
-        return mLatest.size();
-    }
-
-    StatusBarNotification getOngoing(int index) {
-        return mOngoing.get(index);
-    }
-
-    StatusBarNotification getLatest(int index) {
-        return mLatest.get(index);
-    }
-
-    int size() {
-        return mOngoing.size() + mLatest.size();
-    }
-
-    void add(StatusBarNotification notification) {
-        if (StatusBarService.SPEW) {
-            Slog.d(StatusBarService.TAG, "before add NotificationViewList"
-                    + " notification.data.ongoingEvent=" + notification.data.ongoingEvent);
-            dump(notification);
-        }
-
-        ArrayList<StatusBarNotification> list = notification.data.ongoingEvent ? mOngoing : mLatest;
-        long when = notification.data.when;
-        final int N = list.size();
-        int index = N;
-        for (int i=0; i<N; i++) {
-            StatusBarNotification that = list.get(i);
-            if (that.data.when > when) {
-                index = i;
-                break;
-            }
-        }
-        list.add(index, notification);
-
-        if (StatusBarService.SPEW) {
-            Slog.d(StatusBarService.TAG, "after add NotificationViewList index=" + index);
-            dump(notification);
-        }
-    }
-
-    void dump(StatusBarNotification notification) {
-        if (StatusBarService.SPEW) {
-            boolean showTime = false;
-            String s = "";
-            for (int i=0; i<mOngoing.size(); i++) {
-                StatusBarNotification that = mOngoing.get(i);
-                if (that.key == notification.key) {
-                    s += "[";
-                }
-                if (showTime) {
-                    s += that.data.when;
-                } else {
-                    s += that.data.pkg + "/" + that.data.id + "/" + that.view;
-                }
-                if (that.key == notification.key) {
-                    s += "]";
-                }
-                s += " ";
-            }
-            Slog.d(StatusBarService.TAG, "NotificationViewList ongoing: " + s);
-
-            s = "";
-            for (int i=0; i<mLatest.size(); i++) {
-                StatusBarNotification that = mLatest.get(i);
-                if (that.key == notification.key) {
-                    s += "[";
-                }
-                if (showTime) {
-                    s += that.data.when;
-                } else {
-                    s += that.data.pkg + "/" + that.data.id + "/" + that.view;
-                }
-                if (that.key == notification.key) {
-                    s += "]";
-                }
-                s += " ";
-            }
-            Slog.d(StatusBarService.TAG, "NotificationViewList latest:  " + s);
-        }
-    }
-
-    StatusBarNotification get(View view) {
-        int N = mOngoing.size();
-        for (int i=0; i<N; i++) {
-            StatusBarNotification notification = mOngoing.get(i);
-            View v = notification.view;
-            if (v == view) {
-                return notification;
-            }
-        }
-        N = mLatest.size();
-        for (int i=0; i<N; i++) {
-            StatusBarNotification notification = mLatest.get(i);
-            View v = notification.view;
-            if (v == view) {
-                return notification;
-            }
-        }
-        return null;
-    }
-
-    void update(StatusBarNotification notification) {
-        remove(notification);
-        add(notification);
-    }
-
-    boolean hasClearableItems() {
-        int N = mLatest.size();
-        for (int i=0; i<N; i++) {
-            if (mLatest.get(i).data.clearable) {
-                return true;
-            }
-        }
-        return false;
-    }
-}
diff --git a/services/java/com/android/server/status/StatusBarException.java b/services/java/com/android/server/status/StatusBarException.java
deleted file mode 100644
index be58f59..0000000
--- a/services/java/com/android/server/status/StatusBarException.java
+++ /dev/null
@@ -1,23 +0,0 @@
-/*
- * Copyright (C) 2008 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.android.server.status;
-
-public class StatusBarException extends RuntimeException {
-    StatusBarException(String msg) {
-        super(msg);
-    }
-}
diff --git a/services/java/com/android/server/status/StatusBarIcon.java b/services/java/com/android/server/status/StatusBarIcon.java
deleted file mode 100644
index 6f8b8a8..0000000
--- a/services/java/com/android/server/status/StatusBarIcon.java
+++ /dev/null
@@ -1,186 +0,0 @@
-/*
- * Copyright (C) 2008 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.android.server.status;
-
-import android.content.Context;
-import android.content.pm.PackageManager;
-import android.content.res.Resources;
-import android.graphics.Typeface;
-import android.graphics.drawable.Drawable;
-import android.text.TextUtils;
-import android.util.Slog;
-import android.view.Gravity;
-import android.view.LayoutInflater;
-import android.view.View;
-import android.view.ViewGroup;
-import android.widget.ImageView;
-import android.widget.LinearLayout;
-import android.widget.TextView;
-
-class StatusBarIcon {
-    // TODO: get this from a resource
-    private static final int ICON_GAP = 8;
-    private static final int ICON_WIDTH = 25;
-    private static final int ICON_HEIGHT = 25;
-
-    public View view;
-
-    IconData mData;
-    
-    private TextView mTextView;
-    private AnimatedImageView mImageView;
-    private TextView mNumberView;
-
-    public StatusBarIcon(Context context, IconData data, ViewGroup parent) {
-        mData = data.clone();
-
-        switch (data.type) {
-            case IconData.TEXT: {
-                TextView t;
-                t = new TextView(context);
-                mTextView = t;
-                LinearLayout.LayoutParams layoutParams = new LinearLayout.LayoutParams(
-                        LinearLayout.LayoutParams.WRAP_CONTENT,
-                        LinearLayout.LayoutParams.MATCH_PARENT);
-                t.setTextSize(16);
-                t.setTextColor(0xff000000);
-                t.setTypeface(Typeface.DEFAULT_BOLD);
-                t.setGravity(Gravity.CENTER_VERTICAL | Gravity.LEFT);
-                t.setPadding(6, 0, 0, 0);
-                t.setLayoutParams(layoutParams);
-                t.setText(data.text);
-                this.view = t;
-                break;
-            }
-
-            case IconData.ICON: {
-                // container
-                LayoutInflater inflater = (LayoutInflater)context.getSystemService(
-                                                Context.LAYOUT_INFLATER_SERVICE);
-                View v = inflater.inflate(com.android.internal.R.layout.status_bar_icon, parent, false);
-                this.view = v;
-
-                // icon
-                AnimatedImageView im = (AnimatedImageView)v.findViewById(com.android.internal.R.id.image);
-                im.setImageDrawable(getIcon(context, data));
-                im.setImageLevel(data.iconLevel);
-                mImageView = im;
-
-                // number
-                TextView nv = (TextView)v.findViewById(com.android.internal.R.id.number);
-                mNumberView = nv;
-                if (data.number > 0) {
-                    nv.setText("" + data.number);
-                    nv.setVisibility(View.VISIBLE);
-                } else {
-                    nv.setVisibility(View.GONE);
-                }
-                break;
-            }
-        }
-    }
-
-    public void update(Context context, IconData data) throws StatusBarException {
-        if (mData.type != data.type) {
-            throw new StatusBarException("status bar entry type can't change");
-        }
-        switch (data.type) {
-        case IconData.TEXT:
-            if (!TextUtils.equals(mData.text, data.text)) {
-                TextView tv = mTextView;
-                tv.setText(data.text);
-            }
-            break;
-        case IconData.ICON:
-            if (((mData.iconPackage != null && data.iconPackage != null)
-                        && !mData.iconPackage.equals(data.iconPackage))
-                    || mData.iconId != data.iconId
-                    || mData.iconLevel != data.iconLevel) {
-                ImageView im = mImageView;
-                im.setImageDrawable(getIcon(context, data));
-                im.setImageLevel(data.iconLevel);
-            }
-            if (mData.number != data.number) {
-                TextView nv = mNumberView;
-                if (data.number > 0) {
-                    nv.setText("" + data.number);
-                } else {
-                    nv.setText("");
-                }
-            }
-            break;
-        }
-        mData.copyFrom(data);
-    }
-
-    public void update(int number) {
-        if (mData.number != number) {
-            TextView nv = mNumberView;
-            if (number > 0) {
-                nv.setText("" + number);
-            } else {
-                nv.setText("");
-            }
-        }
-        mData.number = number;
-    }
-
-
-    /**
-     * Returns the right icon to use for this item, respecting the iconId and
-     * iconPackage (if set)
-     * 
-     * @param context Context to use to get resources if iconPackage is not set
-     * @return Drawable for this item, or null if the package or item could not
-     *         be found
-     */
-    static Drawable getIcon(Context context, IconData data) {
-
-        Resources r = null;
-
-        if (data.iconPackage != null) {
-            try {
-                r = context.getPackageManager().getResourcesForApplication(data.iconPackage);
-            } catch (PackageManager.NameNotFoundException ex) {
-                Slog.e(StatusBarService.TAG, "Icon package not found: " + data.iconPackage, ex);
-                return null;
-            }
-        } else {
-            r = context.getResources();
-        }
-
-        if (data.iconId == 0) {
-            Slog.w(StatusBarService.TAG, "No icon ID for slot " + data.slot);
-            return null;
-        }
-        
-        try {
-            return r.getDrawable(data.iconId);
-        } catch (RuntimeException e) {
-            Slog.w(StatusBarService.TAG, "Icon not found in "
-                  + (data.iconPackage != null ? data.iconId : "<system>")
-                  + ": " + Integer.toHexString(data.iconId));
-        }
-
-        return null;
-    }
-
-    int getNumber() {
-        return mData.number;
-    }
-}
-
diff --git a/services/java/com/android/server/status/StatusBarNotification.java b/services/java/com/android/server/status/StatusBarNotification.java
deleted file mode 100644
index e5773f7..0000000
--- a/services/java/com/android/server/status/StatusBarNotification.java
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
- * Copyright (C) 2008 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.android.server.status;
-
-import android.os.IBinder;
-import android.view.View;
-
-class StatusBarNotification {
-    IBinder key;
-    NotificationData data;
-    View view;
-    View contentView;
-}
diff --git a/services/java/com/android/server/status/StatusBarPolicy.java b/services/java/com/android/server/status/StatusBarPolicy.java
deleted file mode 100644
index 94d1cb4..0000000
--- a/services/java/com/android/server/status/StatusBarPolicy.java
+++ /dev/null
@@ -1,1388 +0,0 @@
-/*
- * Copyright (C) 2008 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.android.server.status;
-
-import android.app.AlertDialog;
-import android.bluetooth.BluetoothA2dp;
-import android.bluetooth.BluetoothAdapter;
-import android.bluetooth.BluetoothHeadset;
-import android.bluetooth.BluetoothPbap;
-import android.content.BroadcastReceiver;
-import android.content.ContentResolver;
-import android.content.Context;
-import android.content.DialogInterface;
-import android.content.Intent;
-import android.content.IntentFilter;
-import android.content.res.TypedArray;
-import android.graphics.PixelFormat;
-import android.graphics.drawable.Drawable;
-import android.media.AudioManager;
-import android.media.Ringtone;
-import android.media.RingtoneManager;
-import android.net.NetworkInfo;
-import android.net.Uri;
-import android.net.wifi.WifiManager;
-import android.os.Binder;
-import android.os.Handler;
-import android.os.IBinder;
-import android.os.Message;
-import android.os.RemoteException;
-import android.os.storage.StorageManager;
-import android.provider.Settings;
-import android.telephony.PhoneStateListener;
-import android.telephony.ServiceState;
-import android.telephony.SignalStrength;
-import android.telephony.TelephonyManager;
-import android.text.format.DateFormat;
-import android.text.style.RelativeSizeSpan;
-import android.text.Spannable;
-import android.text.SpannableStringBuilder;
-import android.util.Slog;
-import android.view.View;
-import android.view.ViewGroup;
-import android.view.WindowManager;
-import android.view.WindowManagerImpl;
-import android.widget.ImageView;
-import android.widget.LinearLayout;
-import android.widget.TextView;
-
-import com.android.internal.R;
-import com.android.internal.app.IBatteryStats;
-import com.android.internal.location.GpsLocationProvider;
-import com.android.internal.telephony.IccCard;
-import com.android.internal.telephony.TelephonyIntents;
-import com.android.internal.telephony.cdma.EriInfo;
-import com.android.internal.telephony.cdma.TtyIntent;
-import com.android.server.am.BatteryStatsService;
-
-import java.text.SimpleDateFormat;
-import java.util.Calendar;
-import java.util.TimeZone;
-
-/**
- * This class contains all of the policy about which icons are installed in the status
- * bar at boot time.  In reality, it should go into the android.policy package, but
- * putting it here is the first step from extracting it.
- */
-public class StatusBarPolicy {
-    private static final String TAG = "StatusBarPolicy";
-
-    private static StatusBarPolicy sInstance;
-
-    // message codes for the handler
-    private static final int EVENT_BATTERY_CLOSE = 4;
-
-    private final Context mContext;
-    private final StatusBarService mService;
-    private final Handler mHandler = new StatusBarHandler();
-    private final IBatteryStats mBatteryStats;
-
-    // clock
-    private Calendar mCalendar;
-    private String mClockFormatString;
-    private SimpleDateFormat mClockFormat;
-    private IBinder mClockIcon;
-    private IconData mClockData;
-
-    // storage
-    private StorageManager mStorageManager;
-
-    // battery
-    private IBinder mBatteryIcon;
-    private IconData mBatteryData;
-    private boolean mBatteryFirst = true;
-    private boolean mBatteryPlugged;
-    private int mBatteryLevel;
-    private AlertDialog mLowBatteryDialog;
-    private TextView mBatteryLevelTextView;
-    private View mBatteryView;
-    private int mBatteryViewSequence;
-    private boolean mBatteryShowLowOnEndCall = false;
-    private static final boolean SHOW_LOW_BATTERY_WARNING = true;
-    private static final boolean SHOW_BATTERY_WARNINGS_IN_CALL = true;
-
-    // phone
-    private TelephonyManager mPhone;
-    private IBinder mPhoneIcon;
-
-    //***** Signal strength icons
-    private IconData mPhoneData;
-    //GSM/UMTS
-    private static final int[] sSignalImages = new int[] {
-        com.android.internal.R.drawable.stat_sys_signal_0,
-        com.android.internal.R.drawable.stat_sys_signal_1,
-        com.android.internal.R.drawable.stat_sys_signal_2,
-        com.android.internal.R.drawable.stat_sys_signal_3,
-        com.android.internal.R.drawable.stat_sys_signal_4
-    };
-    private static final int[] sSignalImages_r = new int[] {
-        com.android.internal.R.drawable.stat_sys_r_signal_0,
-        com.android.internal.R.drawable.stat_sys_r_signal_1,
-        com.android.internal.R.drawable.stat_sys_r_signal_2,
-        com.android.internal.R.drawable.stat_sys_r_signal_3,
-        com.android.internal.R.drawable.stat_sys_r_signal_4
-    };
-    private static final int[] sRoamingIndicatorImages_cdma = new int[] {
-        com.android.internal.R.drawable.stat_sys_roaming_cdma_0, //Standard Roaming Indicator
-        // 1 is Standard Roaming Indicator OFF
-        // TODO T: image never used, remove and put 0 instead?
-        com.android.internal.R.drawable.stat_sys_roaming_cdma_0,
-
-        // 2 is Standard Roaming Indicator FLASHING
-        // TODO T: image never used, remove and put 0 instead?
-        com.android.internal.R.drawable.stat_sys_roaming_cdma_0,
-
-        // 3-12 Standard ERI
-        com.android.internal.R.drawable.stat_sys_roaming_cdma_0, //3
-        com.android.internal.R.drawable.stat_sys_roaming_cdma_0,
-        com.android.internal.R.drawable.stat_sys_roaming_cdma_0,
-        com.android.internal.R.drawable.stat_sys_roaming_cdma_0,
-        com.android.internal.R.drawable.stat_sys_roaming_cdma_0,
-        com.android.internal.R.drawable.stat_sys_roaming_cdma_0,
-        com.android.internal.R.drawable.stat_sys_roaming_cdma_0,
-        com.android.internal.R.drawable.stat_sys_roaming_cdma_0,
-        com.android.internal.R.drawable.stat_sys_roaming_cdma_0,
-        com.android.internal.R.drawable.stat_sys_roaming_cdma_0,
-
-        // 13-63 Reserved for Standard ERI
-        com.android.internal.R.drawable.stat_sys_roaming_cdma_0, //13
-        com.android.internal.R.drawable.stat_sys_roaming_cdma_0,
-        com.android.internal.R.drawable.stat_sys_roaming_cdma_0,
-        com.android.internal.R.drawable.stat_sys_roaming_cdma_0,
-        com.android.internal.R.drawable.stat_sys_roaming_cdma_0,
-        com.android.internal.R.drawable.stat_sys_roaming_cdma_0,
-        com.android.internal.R.drawable.stat_sys_roaming_cdma_0,
-        com.android.internal.R.drawable.stat_sys_roaming_cdma_0,
-        com.android.internal.R.drawable.stat_sys_roaming_cdma_0,
-        com.android.internal.R.drawable.stat_sys_roaming_cdma_0,
-        com.android.internal.R.drawable.stat_sys_roaming_cdma_0,
-        com.android.internal.R.drawable.stat_sys_roaming_cdma_0,
-        com.android.internal.R.drawable.stat_sys_roaming_cdma_0,
-        com.android.internal.R.drawable.stat_sys_roaming_cdma_0,
-        com.android.internal.R.drawable.stat_sys_roaming_cdma_0,
-        com.android.internal.R.drawable.stat_sys_roaming_cdma_0,
-        com.android.internal.R.drawable.stat_sys_roaming_cdma_0,
-        com.android.internal.R.drawable.stat_sys_roaming_cdma_0,
-        com.android.internal.R.drawable.stat_sys_roaming_cdma_0,
-        com.android.internal.R.drawable.stat_sys_roaming_cdma_0,
-        com.android.internal.R.drawable.stat_sys_roaming_cdma_0,
-        com.android.internal.R.drawable.stat_sys_roaming_cdma_0,
-        com.android.internal.R.drawable.stat_sys_roaming_cdma_0,
-        com.android.internal.R.drawable.stat_sys_roaming_cdma_0,
-        com.android.internal.R.drawable.stat_sys_roaming_cdma_0,
-        com.android.internal.R.drawable.stat_sys_roaming_cdma_0,
-        com.android.internal.R.drawable.stat_sys_roaming_cdma_0,
-        com.android.internal.R.drawable.stat_sys_roaming_cdma_0,
-        com.android.internal.R.drawable.stat_sys_roaming_cdma_0,
-        com.android.internal.R.drawable.stat_sys_roaming_cdma_0,
-        com.android.internal.R.drawable.stat_sys_roaming_cdma_0,
-        com.android.internal.R.drawable.stat_sys_roaming_cdma_0,
-        com.android.internal.R.drawable.stat_sys_roaming_cdma_0,
-        com.android.internal.R.drawable.stat_sys_roaming_cdma_0,
-        com.android.internal.R.drawable.stat_sys_roaming_cdma_0,
-        com.android.internal.R.drawable.stat_sys_roaming_cdma_0,
-        com.android.internal.R.drawable.stat_sys_roaming_cdma_0,
-        com.android.internal.R.drawable.stat_sys_roaming_cdma_0,
-        com.android.internal.R.drawable.stat_sys_roaming_cdma_0,
-        com.android.internal.R.drawable.stat_sys_roaming_cdma_0,
-        com.android.internal.R.drawable.stat_sys_roaming_cdma_0,
-        com.android.internal.R.drawable.stat_sys_roaming_cdma_0,
-        com.android.internal.R.drawable.stat_sys_roaming_cdma_0,
-        com.android.internal.R.drawable.stat_sys_roaming_cdma_0,
-        com.android.internal.R.drawable.stat_sys_roaming_cdma_0,
-        com.android.internal.R.drawable.stat_sys_roaming_cdma_0,
-        com.android.internal.R.drawable.stat_sys_roaming_cdma_0,
-        com.android.internal.R.drawable.stat_sys_roaming_cdma_0,
-        com.android.internal.R.drawable.stat_sys_roaming_cdma_0,
-        com.android.internal.R.drawable.stat_sys_roaming_cdma_0,
-        com.android.internal.R.drawable.stat_sys_roaming_cdma_0,
-
-        // 64-127 Reserved for Non Standard (Operator Specific) ERI
-        com.android.internal.R.drawable.stat_sys_roaming_cdma_0, //64
-        com.android.internal.R.drawable.stat_sys_roaming_cdma_0,
-        com.android.internal.R.drawable.stat_sys_roaming_cdma_0,
-        com.android.internal.R.drawable.stat_sys_roaming_cdma_0,
-        com.android.internal.R.drawable.stat_sys_roaming_cdma_0,
-        com.android.internal.R.drawable.stat_sys_roaming_cdma_0,
-        com.android.internal.R.drawable.stat_sys_roaming_cdma_0,
-        com.android.internal.R.drawable.stat_sys_roaming_cdma_0,
-        com.android.internal.R.drawable.stat_sys_roaming_cdma_0,
-        com.android.internal.R.drawable.stat_sys_roaming_cdma_0,
-        com.android.internal.R.drawable.stat_sys_roaming_cdma_0,
-        com.android.internal.R.drawable.stat_sys_roaming_cdma_0,
-        com.android.internal.R.drawable.stat_sys_roaming_cdma_0,
-        com.android.internal.R.drawable.stat_sys_roaming_cdma_0,
-        com.android.internal.R.drawable.stat_sys_roaming_cdma_0,
-        com.android.internal.R.drawable.stat_sys_roaming_cdma_0,
-        com.android.internal.R.drawable.stat_sys_roaming_cdma_0,
-        com.android.internal.R.drawable.stat_sys_roaming_cdma_0,
-        com.android.internal.R.drawable.stat_sys_roaming_cdma_0,
-        com.android.internal.R.drawable.stat_sys_roaming_cdma_0 //83
-
-        // 128-255 Reserved
-    };
-
-    //***** Data connection icons
-    private int[] mDataIconList = sDataNetType_g;
-    //GSM/UMTS
-    private static final int[] sDataNetType_g = new int[] {
-            com.android.internal.R.drawable.stat_sys_data_connected_g,
-            com.android.internal.R.drawable.stat_sys_data_in_g,
-            com.android.internal.R.drawable.stat_sys_data_out_g,
-            com.android.internal.R.drawable.stat_sys_data_inandout_g,
-        };
-    private static final int[] sDataNetType_3g = new int[] {
-            com.android.internal.R.drawable.stat_sys_data_connected_3g,
-            com.android.internal.R.drawable.stat_sys_data_in_3g,
-            com.android.internal.R.drawable.stat_sys_data_out_3g,
-            com.android.internal.R.drawable.stat_sys_data_inandout_3g,
-        };
-    private static final int[] sDataNetType_e = new int[] {
-            com.android.internal.R.drawable.stat_sys_data_connected_e,
-            com.android.internal.R.drawable.stat_sys_data_in_e,
-            com.android.internal.R.drawable.stat_sys_data_out_e,
-            com.android.internal.R.drawable.stat_sys_data_inandout_e,
-        };
-    //3.5G
-    private static final int[] sDataNetType_h = new int[] {
-            com.android.internal.R.drawable.stat_sys_data_connected_h,
-            com.android.internal.R.drawable.stat_sys_data_in_h,
-            com.android.internal.R.drawable.stat_sys_data_out_h,
-            com.android.internal.R.drawable.stat_sys_data_inandout_h,
-    };
-
-    //CDMA
-    // Use 3G icons for EVDO data and 1x icons for 1XRTT data
-    private static final int[] sDataNetType_1x = new int[] {
-        com.android.internal.R.drawable.stat_sys_data_connected_1x,
-        com.android.internal.R.drawable.stat_sys_data_in_1x,
-        com.android.internal.R.drawable.stat_sys_data_out_1x,
-        com.android.internal.R.drawable.stat_sys_data_inandout_1x,
-    };
-
-    // Assume it's all good unless we hear otherwise.  We don't always seem
-    // to get broadcasts that it *is* there.
-    IccCard.State mSimState = IccCard.State.READY;
-    int mPhoneState = TelephonyManager.CALL_STATE_IDLE;
-    int mDataState = TelephonyManager.DATA_DISCONNECTED;
-    int mDataActivity = TelephonyManager.DATA_ACTIVITY_NONE;
-    ServiceState mServiceState;
-    SignalStrength mSignalStrength;
-
-    // data connection
-    private IBinder mDataIcon;
-    private IconData mDataData;
-    private boolean mDataIconVisible;
-    private boolean mHspaDataDistinguishable;
-
-    // ringer volume
-    private IBinder mVolumeIcon;
-    private IconData mVolumeData;
-    private boolean mVolumeVisible;
-
-    // bluetooth device status
-    private IBinder mBluetoothIcon;
-    private IconData mBluetoothData;
-    private int mBluetoothHeadsetState;
-    private boolean mBluetoothA2dpConnected;
-    private int mBluetoothPbapState;
-    private boolean mBluetoothEnabled;
-
-    // wifi
-    private static final int[] sWifiSignalImages = new int[] {
-            com.android.internal.R.drawable.stat_sys_wifi_signal_1,
-            com.android.internal.R.drawable.stat_sys_wifi_signal_2,
-            com.android.internal.R.drawable.stat_sys_wifi_signal_3,
-            com.android.internal.R.drawable.stat_sys_wifi_signal_4,
-        };
-    private static final int sWifiTemporarilyNotConnectedImage =
-            com.android.internal.R.drawable.stat_sys_wifi_signal_0;
-
-    private int mLastWifiSignalLevel = -1;
-    private boolean mIsWifiConnected = false;
-    private IBinder mWifiIcon;
-    private IconData mWifiData;
-
-    // gps
-    private IBinder mGpsIcon;
-    private IconData mGpsEnabledIconData;
-    private IconData mGpsFixIconData;
-
-    // alarm clock
-    // Icon lit when clock is set
-    private IBinder mAlarmClockIcon;
-    private IconData mAlarmClockIconData;
-
-    // sync state
-    // If sync is active the SyncActive icon is displayed. If sync is not active but
-    // sync is failing the SyncFailing icon is displayed. Otherwise neither are displayed.
-    private IBinder mSyncActiveIcon;
-    private IBinder mSyncFailingIcon;
-
-    // TTY mode
-    // Icon lit when TTY mode is enabled
-    private IBinder mTTYModeIcon;
-    private IconData mTTYModeEnableIconData;
-
-    // Cdma Roaming Indicator, ERI
-    private IBinder mCdmaRoamingIndicatorIcon;
-    private IconData mCdmaRoamingIndicatorIconData;
-
-    private BroadcastReceiver mIntentReceiver = new BroadcastReceiver() {
-        @Override
-        public void onReceive(Context context, Intent intent) {
-            String action = intent.getAction();
-            if (action.equals(Intent.ACTION_TIME_TICK)) {
-                updateClock();
-            }
-            else if (action.equals(Intent.ACTION_TIME_CHANGED)) {
-                updateClock();
-            }
-            else if (action.equals(Intent.ACTION_BATTERY_CHANGED)) {
-                updateBattery(intent);
-            }
-            else if (action.equals(Intent.ACTION_CONFIGURATION_CHANGED)) {
-                updateClock();
-            }
-            else if (action.equals(Intent.ACTION_TIMEZONE_CHANGED)) {
-                String tz = intent.getStringExtra("time-zone");
-                mCalendar = Calendar.getInstance(TimeZone.getTimeZone(tz));
-                if (mClockFormat != null) {
-                    mClockFormat.setTimeZone(mCalendar.getTimeZone());
-                }
-                updateClock();
-            }
-            else if (action.equals(Intent.ACTION_ALARM_CHANGED)) {
-                updateAlarm(intent);
-            }
-            else if (action.equals(Intent.ACTION_SYNC_STATE_CHANGED)) {
-                updateSyncState(intent);
-            }
-            else if (action.equals(Intent.ACTION_BATTERY_LOW)) {
-                onBatteryLow(intent);
-            }
-            else if (action.equals(Intent.ACTION_BATTERY_OKAY)
-                    || action.equals(Intent.ACTION_POWER_CONNECTED)) {
-                onBatteryOkay(intent);
-            }
-            else if (action.equals(BluetoothAdapter.ACTION_STATE_CHANGED) ||
-                    action.equals(BluetoothHeadset.ACTION_STATE_CHANGED) ||
-                    action.equals(BluetoothA2dp.ACTION_SINK_STATE_CHANGED) ||
-                    action.equals(BluetoothPbap.PBAP_STATE_CHANGED_ACTION)) {
-                updateBluetooth(intent);
-            }
-            else if (action.equals(WifiManager.NETWORK_STATE_CHANGED_ACTION) ||
-                    action.equals(WifiManager.WIFI_STATE_CHANGED_ACTION) ||
-                    action.equals(WifiManager.RSSI_CHANGED_ACTION)) {
-                updateWifi(intent);
-            }
-            else if (action.equals(GpsLocationProvider.GPS_ENABLED_CHANGE_ACTION) ||
-                    action.equals(GpsLocationProvider.GPS_FIX_CHANGE_ACTION)) {
-                updateGps(intent);
-            }
-            else if (action.equals(AudioManager.RINGER_MODE_CHANGED_ACTION) ||
-                    action.equals(AudioManager.VIBRATE_SETTING_CHANGED_ACTION)) {
-                updateVolume();
-            }
-            else if (action.equals(TelephonyIntents.ACTION_SIM_STATE_CHANGED)) {
-                updateSimState(intent);
-            }
-            else if (action.equals(TtyIntent.TTY_ENABLED_CHANGE_ACTION)) {
-                updateTTY(intent);
-            }
-        }
-    };
-
-    private StatusBarPolicy(Context context, StatusBarService service) {
-        mContext = context;
-        mService = service;
-        mSignalStrength = new SignalStrength();
-        mBatteryStats = BatteryStatsService.getService();
-
-        // clock
-        mCalendar = Calendar.getInstance(TimeZone.getDefault());
-        mClockData = IconData.makeText("clock", "");
-        mClockIcon = service.addIcon(mClockData, null);
-        updateClock();
-
-        // storage
-        mStorageManager = (StorageManager) context.getSystemService(Context.STORAGE_SERVICE);
-        mStorageManager.registerListener(
-                new com.android.server.status.StorageNotification(context));
-
-        // battery
-        mBatteryData = IconData.makeIcon("battery",
-                null, com.android.internal.R.drawable.stat_sys_battery_unknown, 0, 0);
-        mBatteryIcon = service.addIcon(mBatteryData, null);
-
-        // phone_signal
-        mPhone = (TelephonyManager)context.getSystemService(Context.TELEPHONY_SERVICE);
-        mPhoneData = IconData.makeIcon("phone_signal",
-                null, com.android.internal.R.drawable.stat_sys_signal_null, 0, 0);
-        mPhoneIcon = service.addIcon(mPhoneData, null);
-
-        // register for phone state notifications.
-        ((TelephonyManager)mContext.getSystemService(Context.TELEPHONY_SERVICE))
-                .listen(mPhoneStateListener,
-                          PhoneStateListener.LISTEN_SERVICE_STATE
-                        | PhoneStateListener.LISTEN_SIGNAL_STRENGTHS
-                        | PhoneStateListener.LISTEN_CALL_STATE
-                        | PhoneStateListener.LISTEN_DATA_CONNECTION_STATE
-                        | PhoneStateListener.LISTEN_DATA_ACTIVITY);
-
-        // data_connection
-        mDataData = IconData.makeIcon("data_connection",
-                null, com.android.internal.R.drawable.stat_sys_data_connected_g, 0, 0);
-        mDataIcon = service.addIcon(mDataData, null);
-        service.setIconVisibility(mDataIcon, false);
-
-        // wifi
-        mWifiData = IconData.makeIcon("wifi", null, sWifiSignalImages[0], 0, 0);
-        mWifiIcon = service.addIcon(mWifiData, null);
-        service.setIconVisibility(mWifiIcon, false);
-        // wifi will get updated by the sticky intents
-
-        // TTY status
-        mTTYModeEnableIconData = IconData.makeIcon("tty",
-                null, com.android.internal.R.drawable.stat_sys_tty_mode, 0, 0);
-        mTTYModeIcon = service.addIcon(mTTYModeEnableIconData, null);
-        service.setIconVisibility(mTTYModeIcon, false);
-
-        // Cdma Roaming Indicator, ERI
-        mCdmaRoamingIndicatorIconData = IconData.makeIcon("cdma_eri",
-                null, com.android.internal.R.drawable.stat_sys_roaming_cdma_0, 0, 0);
-        mCdmaRoamingIndicatorIcon = service.addIcon(mCdmaRoamingIndicatorIconData, null);
-        service.setIconVisibility(mCdmaRoamingIndicatorIcon, false);
-
-        // bluetooth status
-        mBluetoothData = IconData.makeIcon("bluetooth",
-                null, com.android.internal.R.drawable.stat_sys_data_bluetooth, 0, 0);
-        mBluetoothIcon = service.addIcon(mBluetoothData, null);
-        BluetoothAdapter adapter = BluetoothAdapter.getDefaultAdapter();
-        if (adapter != null) {
-            mBluetoothEnabled = adapter.isEnabled();
-        } else {
-            mBluetoothEnabled = false;
-        }
-        mBluetoothA2dpConnected = false;
-        mBluetoothHeadsetState = BluetoothHeadset.STATE_DISCONNECTED;
-        mBluetoothPbapState = BluetoothPbap.STATE_DISCONNECTED;
-        mService.setIconVisibility(mBluetoothIcon, mBluetoothEnabled);
-
-        // Gps status
-        mGpsEnabledIconData = IconData.makeIcon("gps",
-                null, com.android.internal.R.drawable.stat_sys_gps_acquiring_anim, 0, 0);
-        mGpsFixIconData = IconData.makeIcon("gps",
-                null, com.android.internal.R.drawable.stat_sys_gps_on, 0, 0);
-        mGpsIcon = service.addIcon(mGpsEnabledIconData, null);
-        service.setIconVisibility(mGpsIcon, false);
-
-        // Alarm clock
-        mAlarmClockIconData = IconData.makeIcon(
-                "alarm_clock",
-                null, com.android.internal.R.drawable.stat_notify_alarm, 0, 0);
-        mAlarmClockIcon = service.addIcon(mAlarmClockIconData, null);
-        service.setIconVisibility(mAlarmClockIcon, false);
-
-        // Sync state
-        mSyncActiveIcon = service.addIcon(IconData.makeIcon("sync_active",
-                null, R.drawable.stat_notify_sync_anim0, 0, 0), null);
-        mSyncFailingIcon = service.addIcon(IconData.makeIcon("sync_failing",
-                null, R.drawable.stat_notify_sync_error, 0, 0), null);
-        service.setIconVisibility(mSyncActiveIcon, false);
-        service.setIconVisibility(mSyncFailingIcon, false);
-
-        // volume
-        mVolumeData = IconData.makeIcon("volume",
-                null, com.android.internal.R.drawable.stat_sys_ringer_silent, 0, 0);
-        mVolumeIcon = service.addIcon(mVolumeData, null);
-        service.setIconVisibility(mVolumeIcon, false);
-        updateVolume();
-
-        IntentFilter filter = new IntentFilter();
-
-        // Register for Intent broadcasts for...
-        filter.addAction(Intent.ACTION_TIME_TICK);
-        filter.addAction(Intent.ACTION_TIME_CHANGED);
-        filter.addAction(Intent.ACTION_CONFIGURATION_CHANGED);
-        filter.addAction(Intent.ACTION_BATTERY_CHANGED);
-        filter.addAction(Intent.ACTION_BATTERY_LOW);
-        filter.addAction(Intent.ACTION_BATTERY_OKAY);
-        filter.addAction(Intent.ACTION_POWER_CONNECTED);
-        filter.addAction(Intent.ACTION_TIMEZONE_CHANGED);
-        filter.addAction(Intent.ACTION_ALARM_CHANGED);
-        filter.addAction(Intent.ACTION_SYNC_STATE_CHANGED);
-        filter.addAction(AudioManager.RINGER_MODE_CHANGED_ACTION);
-        filter.addAction(AudioManager.VIBRATE_SETTING_CHANGED_ACTION);
-        filter.addAction(BluetoothAdapter.ACTION_STATE_CHANGED);
-        filter.addAction(BluetoothHeadset.ACTION_STATE_CHANGED);
-        filter.addAction(BluetoothA2dp.ACTION_SINK_STATE_CHANGED);
-        filter.addAction(BluetoothPbap.PBAP_STATE_CHANGED_ACTION);
-        filter.addAction(WifiManager.WIFI_STATE_CHANGED_ACTION);
-        filter.addAction(WifiManager.SUPPLICANT_CONNECTION_CHANGE_ACTION);
-        filter.addAction(WifiManager.NETWORK_STATE_CHANGED_ACTION);
-        filter.addAction(WifiManager.RSSI_CHANGED_ACTION);
-        filter.addAction(GpsLocationProvider.GPS_ENABLED_CHANGE_ACTION);
-        filter.addAction(GpsLocationProvider.GPS_FIX_CHANGE_ACTION);
-        filter.addAction(TelephonyIntents.ACTION_SIM_STATE_CHANGED);
-        filter.addAction(TtyIntent.TTY_ENABLED_CHANGE_ACTION);
-        mContext.registerReceiver(mIntentReceiver, filter, null, mHandler);
-
-        // load config to determine if to distinguish Hspa data icon
-        try {
-            mHspaDataDistinguishable = mContext.getResources().getBoolean(
-                    com.android.internal.R.bool.config_hspa_data_distinguishable);
-        } catch (Exception e) {
-            mHspaDataDistinguishable = false;
-        }
-    }
-
-    public static void installIcons(Context context, StatusBarService service) {
-        sInstance = new StatusBarPolicy(context, service);
-    }
-
-    private final CharSequence getSmallTime() {
-        boolean b24 = DateFormat.is24HourFormat(mContext);
-        int res;
-
-        if (b24) {
-            res = R.string.twenty_four_hour_time_format;
-        } else {
-            res = R.string.twelve_hour_time_format;
-        }
-
-        final char MAGIC1 = '\uEF00';
-        final char MAGIC2 = '\uEF01';
-
-        SimpleDateFormat sdf;
-        String format = mContext.getString(res);
-        if (!format.equals(mClockFormatString)) {
-            /*
-             * Search for an unquoted "a" in the format string, so we can
-             * add dummy characters around it to let us find it again after
-             * formatting and change its size.
-             */
-            int a = -1;
-            boolean quoted = false;
-            for (int i = 0; i < format.length(); i++) {
-                char c = format.charAt(i);
-
-                if (c == '\'') {
-                    quoted = !quoted;
-                }
-
-                if (!quoted && c == 'a') {
-                    a = i;
-                    break;
-                }
-            }
-
-            if (a >= 0) {
-                // Move a back so any whitespace before the AM/PM is also in the alternate size.
-                final int b = a;
-                while (a > 0 && Character.isWhitespace(format.charAt(a-1))) {
-                    a--;
-                }
-                format = format.substring(0, a) + MAGIC1 + format.substring(a, b)
-                        + "a" + MAGIC2 + format.substring(b + 1);
-            }
-
-            mClockFormat = sdf = new SimpleDateFormat(format);
-            mClockFormatString = format;
-        } else {
-            sdf = mClockFormat;
-        }
-        String result = sdf.format(mCalendar.getTime());
-
-        int magic1 = result.indexOf(MAGIC1);
-        int magic2 = result.indexOf(MAGIC2);
-
-        if (magic1 >= 0 && magic2 > magic1) {
-            SpannableStringBuilder formatted = new SpannableStringBuilder(result);
-
-            formatted.setSpan(new RelativeSizeSpan(0.7f), magic1, magic2,
-                              Spannable.SPAN_EXCLUSIVE_INCLUSIVE);
-
-            formatted.delete(magic2, magic2 + 1);
-            formatted.delete(magic1, magic1 + 1);
-
-            return formatted;
-        } else {
-            return result;
-        }
-    }
-
-    private final void updateClock() {
-        mCalendar.setTimeInMillis(System.currentTimeMillis());
-        mClockData.text = getSmallTime();
-        mService.updateIcon(mClockIcon, mClockData, null);
-    }
-
-    private final void updateAlarm(Intent intent) {
-        boolean alarmSet = intent.getBooleanExtra("alarmSet", false);
-        mService.setIconVisibility(mAlarmClockIcon, alarmSet);
-    }
-
-    private final void updateSyncState(Intent intent) {
-        boolean isActive = intent.getBooleanExtra("active", false);
-        boolean isFailing = intent.getBooleanExtra("failing", false);
-        mService.setIconVisibility(mSyncActiveIcon, isActive);
-        // Don't display sync failing icon: BUG 1297963 Set sync error timeout to "never"
-        //mService.setIconVisibility(mSyncFailingIcon, isFailing && !isActive);
-    }
-
-    private final void updateBattery(Intent intent) {
-        mBatteryData.iconId = intent.getIntExtra("icon-small", 0);
-        mBatteryData.iconLevel = intent.getIntExtra("level", 0);
-        mService.updateIcon(mBatteryIcon, mBatteryData, null);
-
-        boolean plugged = intent.getIntExtra("plugged", 0) != 0;
-        int level = intent.getIntExtra("level", -1);
-        if (false) {
-            Slog.d(TAG, "updateBattery level=" + level
-                    + " plugged=" + plugged
-                    + " mBatteryPlugged=" + mBatteryPlugged
-                    + " mBatteryLevel=" + mBatteryLevel
-                    + " mBatteryFirst=" + mBatteryFirst);
-        }
-
-        boolean oldPlugged = mBatteryPlugged;
-
-        mBatteryPlugged = plugged;
-        mBatteryLevel = level;
-
-        if (mBatteryFirst) {
-            mBatteryFirst = false;
-        }
-        /*
-         * No longer showing the battery view because it draws attention away
-         * from the USB storage notification. We could still show it when
-         * connected to a brick, but that could lead to the user into thinking
-         * the device does not charge when plugged into USB (since he/she would
-         * not see the same battery screen on USB as he sees on brick).
-         */
-        /* else {
-            if (plugged && !oldPlugged) {
-                showBatteryView();
-            }
-        }
-        */
-        if (false) {
-            Slog.d(TAG, "plugged=" + plugged + " oldPlugged=" + oldPlugged + " level=" + level);
-        }
-    }
-
-    private void onBatteryLow(Intent intent) {
-        if (SHOW_LOW_BATTERY_WARNING) {
-            if (false) {
-                Slog.d(TAG, "mPhoneState=" + mPhoneState
-                      + " mLowBatteryDialog=" + mLowBatteryDialog
-                      + " mBatteryShowLowOnEndCall=" + mBatteryShowLowOnEndCall);
-            }
-
-            if (SHOW_BATTERY_WARNINGS_IN_CALL || mPhoneState == TelephonyManager.CALL_STATE_IDLE) {
-                showLowBatteryWarning();
-            } else {
-                mBatteryShowLowOnEndCall = true;
-            }
-        }
-    }
-
-    private void onBatteryOkay(Intent intent) {
-        if (mLowBatteryDialog != null
-                && SHOW_LOW_BATTERY_WARNING) {
-            mLowBatteryDialog.dismiss();
-            mBatteryShowLowOnEndCall = false;
-        }
-    }
-
-    private void showBatteryView() {
-        closeLastBatteryView();
-        if (mLowBatteryDialog != null) {
-            mLowBatteryDialog.dismiss();
-        }
-
-        int level = mBatteryLevel;
-
-        View v = View.inflate(mContext, com.android.internal.R.layout.battery_status, null);
-        mBatteryView = v;
-        int pixelFormat = PixelFormat.TRANSLUCENT;
-        Drawable bg = v.getBackground();
-        if (bg != null) {
-            pixelFormat = bg.getOpacity();
-        }
-
-        int flags =  WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE
-                | WindowManager.LayoutParams.FLAG_NOT_TOUCHABLE
-                | WindowManager.LayoutParams.FLAG_DIM_BEHIND;
-
-        if (!mContext.getResources().getBoolean(
-                com.android.internal.R.bool.config_sf_slowBlur)) {
-            flags |= WindowManager.LayoutParams.FLAG_BLUR_BEHIND;
-        }
-
-        WindowManager.LayoutParams lp = new WindowManager.LayoutParams(
-                ViewGroup.LayoutParams.WRAP_CONTENT,
-                ViewGroup.LayoutParams.WRAP_CONTENT,
-                WindowManager.LayoutParams.TYPE_TOAST,
-                flags, pixelFormat);
-
-        // Get the dim amount from the theme
-        TypedArray a = mContext.obtainStyledAttributes(
-                com.android.internal.R.styleable.Theme);
-        lp.dimAmount = a.getFloat(android.R.styleable.Theme_backgroundDimAmount, 0.5f);
-        a.recycle();
-
-        lp.setTitle("Battery");
-
-        TextView levelTextView = (TextView)v.findViewById(com.android.internal.R.id.level_percent);
-        levelTextView.setText(mContext.getString(
-                    com.android.internal.R.string.battery_status_text_percent_format, level));
-
-        setBatteryLevel(v, com.android.internal.R.id.spacer, 100-level, 0, 0);
-        setBatteryLevel(v, com.android.internal.R.id.level, level,
-                com.android.internal.R.drawable.battery_charge_fill, level);
-
-        WindowManagerImpl.getDefault().addView(v, lp);
-
-        scheduleCloseBatteryView();
-    }
-
-    private void setBatteryLevel(View parent, int id, int height, int background, int level) {
-        ImageView v = (ImageView)parent.findViewById(id);
-        LinearLayout.LayoutParams lp = (LinearLayout.LayoutParams)v.getLayoutParams();
-        lp.weight = height;
-        if (background != 0) {
-            v.setBackgroundResource(background);
-            Drawable bkg = v.getBackground();
-            bkg.setLevel(level);
-        }
-    }
-
-    private void showLowBatteryWarning() {
-        closeLastBatteryView();
-
-        // Show exact battery level.
-        CharSequence levelText = mContext.getString(
-                    com.android.internal.R.string.battery_low_percent_format, mBatteryLevel);
-
-        if (mBatteryLevelTextView != null) {
-            mBatteryLevelTextView.setText(levelText);
-        } else {
-            View v = View.inflate(mContext, com.android.internal.R.layout.battery_low, null);
-            mBatteryLevelTextView=(TextView)v.findViewById(com.android.internal.R.id.level_percent);
-
-            mBatteryLevelTextView.setText(levelText);
-
-            AlertDialog.Builder b = new AlertDialog.Builder(mContext);
-                b.setCancelable(true);
-                b.setTitle(com.android.internal.R.string.battery_low_title);
-                b.setView(v);
-                b.setIcon(android.R.drawable.ic_dialog_alert);
-                b.setPositiveButton(android.R.string.ok, null);
-
-                final Intent intent = new Intent(Intent.ACTION_POWER_USAGE_SUMMARY);
-                intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK
-                        | Intent.FLAG_ACTIVITY_MULTIPLE_TASK
-                        | Intent.FLAG_ACTIVITY_EXCLUDE_FROM_RECENTS
-                        | Intent.FLAG_ACTIVITY_NO_HISTORY);
-                if (intent.resolveActivity(mContext.getPackageManager()) != null) {
-                    b.setNegativeButton(com.android.internal.R.string.battery_low_why,
-                            new DialogInterface.OnClickListener() {
-                        public void onClick(DialogInterface dialog, int which) {
-                            mContext.startActivity(intent);
-                            if (mLowBatteryDialog != null) {
-                                mLowBatteryDialog.dismiss();
-                            }
-                        }
-                    });
-                }
-
-            AlertDialog d = b.create();
-            d.setOnDismissListener(mLowBatteryListener);
-            d.getWindow().setType(WindowManager.LayoutParams.TYPE_SYSTEM_ALERT);
-            d.show();
-            mLowBatteryDialog = d;
-        }
-
-        final ContentResolver cr = mContext.getContentResolver();
-        if (Settings.System.getInt(cr,
-                Settings.System.POWER_SOUNDS_ENABLED, 1) == 1)
-        {
-            final String soundPath = Settings.System.getString(cr,
-                Settings.System.LOW_BATTERY_SOUND);
-            if (soundPath != null) {
-                final Uri soundUri = Uri.parse("file://" + soundPath);
-                if (soundUri != null) {
-                    final Ringtone sfx = RingtoneManager.getRingtone(mContext, soundUri);
-                    if (sfx != null) {
-                        sfx.setStreamType(AudioManager.STREAM_SYSTEM);
-                        sfx.play();
-                    }
-                }
-            }
-        }
-    }
-
-    private final void updateCallState(int state) {
-        mPhoneState = state;
-        if (false) {
-            Slog.d(TAG, "mPhoneState=" + mPhoneState
-                    + " mLowBatteryDialog=" + mLowBatteryDialog
-                    + " mBatteryShowLowOnEndCall=" + mBatteryShowLowOnEndCall);
-        }
-        if (mPhoneState == TelephonyManager.CALL_STATE_IDLE) {
-            if (mBatteryShowLowOnEndCall) {
-                if (!mBatteryPlugged) {
-                    showLowBatteryWarning();
-                }
-                mBatteryShowLowOnEndCall = false;
-            }
-        } else {
-            if (mLowBatteryDialog != null) {
-                mLowBatteryDialog.dismiss();
-                mBatteryShowLowOnEndCall = true;
-            }
-        }
-    }
-
-    private DialogInterface.OnDismissListener mLowBatteryListener
-            = new DialogInterface.OnDismissListener() {
-        public void onDismiss(DialogInterface dialog) {
-            mLowBatteryDialog = null;
-            mBatteryLevelTextView = null;
-        }
-    };
-
-    private void scheduleCloseBatteryView() {
-        Message m = mHandler.obtainMessage(EVENT_BATTERY_CLOSE);
-        m.arg1 = (++mBatteryViewSequence);
-        mHandler.sendMessageDelayed(m, 3000);
-    }
-
-    private void closeLastBatteryView() {
-        if (mBatteryView != null) {
-            //mBatteryView.debug();
-            WindowManagerImpl.getDefault().removeView(mBatteryView);
-            mBatteryView = null;
-        }
-    }
-
-    private PhoneStateListener mPhoneStateListener = new PhoneStateListener() {
-        @Override
-        public void onSignalStrengthsChanged(SignalStrength signalStrength) {
-            mSignalStrength = signalStrength;
-            updateSignalStrength();
-        }
-
-        @Override
-        public void onServiceStateChanged(ServiceState state) {
-            mServiceState = state;
-            updateSignalStrength();
-            updateCdmaRoamingIcon(state);
-            updateDataIcon();
-        }
-
-        @Override
-        public void onCallStateChanged(int state, String incomingNumber) {
-            updateCallState(state);
-            // In cdma, if a voice call is made, RSSI should switch to 1x.
-            if (isCdma()) {
-                updateSignalStrength();
-            }
-        }
-
-        @Override
-        public void onDataConnectionStateChanged(int state, int networkType) {
-            mDataState = state;
-            updateDataNetType(networkType);
-            updateDataIcon();
-        }
-
-        @Override
-        public void onDataActivity(int direction) {
-            mDataActivity = direction;
-            updateDataIcon();
-        }
-    };
-
-    private final void updateSimState(Intent intent) {
-        String stateExtra = intent.getStringExtra(IccCard.INTENT_KEY_ICC_STATE);
-        if (IccCard.INTENT_VALUE_ICC_ABSENT.equals(stateExtra)) {
-            mSimState = IccCard.State.ABSENT;
-        }
-        else if (IccCard.INTENT_VALUE_ICC_READY.equals(stateExtra)) {
-            mSimState = IccCard.State.READY;
-        }
-        else if (IccCard.INTENT_VALUE_ICC_LOCKED.equals(stateExtra)) {
-            final String lockedReason = intent.getStringExtra(IccCard.INTENT_KEY_LOCKED_REASON);
-            if (IccCard.INTENT_VALUE_LOCKED_ON_PIN.equals(lockedReason)) {
-                mSimState = IccCard.State.PIN_REQUIRED;
-            }
-            else if (IccCard.INTENT_VALUE_LOCKED_ON_PUK.equals(lockedReason)) {
-                mSimState = IccCard.State.PUK_REQUIRED;
-            }
-            else {
-                mSimState = IccCard.State.NETWORK_LOCKED;
-            }
-        } else {
-            mSimState = IccCard.State.UNKNOWN;
-        }
-        updateDataIcon();
-    }
-
-    private boolean isCdma() {
-        return (mSignalStrength != null) && !mSignalStrength.isGsm();
-    }
-
-    private boolean isEvdo() {
-        return ( (mServiceState != null)
-                 && ((mServiceState.getRadioTechnology()
-                        == ServiceState.RADIO_TECHNOLOGY_EVDO_0)
-                     || (mServiceState.getRadioTechnology()
-                        == ServiceState.RADIO_TECHNOLOGY_EVDO_A)));
-    }
-
-    private boolean hasService() {
-        if (mServiceState != null) {
-            switch (mServiceState.getState()) {
-                case ServiceState.STATE_OUT_OF_SERVICE:
-                case ServiceState.STATE_POWER_OFF:
-                    return false;
-                default:
-                    return true;
-            }
-        } else {
-            return false;
-        }
-    }
-
-    private final void updateSignalStrength() {
-        int iconLevel = -1;
-        int[] iconList;
-
-        // Display signal strength while in "emergency calls only" mode
-        if (!hasService() && !mServiceState.isEmergencyOnly()) {
-            //Slog.d(TAG, "updateSignalStrength: no service");
-            if (Settings.System.getInt(mContext.getContentResolver(),
-                    Settings.System.AIRPLANE_MODE_ON, 0) == 1) {
-                mPhoneData.iconId = com.android.internal.R.drawable.stat_sys_signal_flightmode;
-            } else {
-                mPhoneData.iconId = com.android.internal.R.drawable.stat_sys_signal_null;
-            }
-            mService.updateIcon(mPhoneIcon, mPhoneData, null);
-            return;
-        }
-
-        if (!isCdma()) {
-            int asu = mSignalStrength.getGsmSignalStrength();
-
-            // ASU ranges from 0 to 31 - TS 27.007 Sec 8.5
-            // asu = 0 (-113dB or less) is very weak
-            // signal, its better to show 0 bars to the user in such cases.
-            // asu = 99 is a special case, where the signal strength is unknown.
-            if (asu <= 2 || asu == 99) iconLevel = 0;
-            else if (asu >= 12) iconLevel = 4;
-            else if (asu >= 8)  iconLevel = 3;
-            else if (asu >= 5)  iconLevel = 2;
-            else iconLevel = 1;
-
-            // Though mPhone is a Manager, this call is not an IPC
-            if (mPhone.isNetworkRoaming()) {
-                iconList = sSignalImages_r;
-            } else {
-                iconList = sSignalImages;
-            }
-        } else {
-            iconList = this.sSignalImages;
-
-            // If 3G(EV) and 1x network are available than 3G should be
-            // displayed, displayed RSSI should be from the EV side.
-            // If a voice call is made then RSSI should switch to 1x.
-            if ((mPhoneState == TelephonyManager.CALL_STATE_IDLE) && isEvdo()){
-                iconLevel = getEvdoLevel();
-                if (false) {
-                    Slog.d(TAG, "use Evdo level=" + iconLevel + " to replace Cdma Level=" + getCdmaLevel());
-                }
-            } else {
-                iconLevel = getCdmaLevel();
-            }
-        }
-        mPhoneData.iconId = iconList[iconLevel];
-        mService.updateIcon(mPhoneIcon, mPhoneData, null);
-    }
-
-    private int getCdmaLevel() {
-        final int cdmaDbm = mSignalStrength.getCdmaDbm();
-        final int cdmaEcio = mSignalStrength.getCdmaEcio();
-        int levelDbm = 0;
-        int levelEcio = 0;
-
-        if (cdmaDbm >= -75) levelDbm = 4;
-        else if (cdmaDbm >= -85) levelDbm = 3;
-        else if (cdmaDbm >= -95) levelDbm = 2;
-        else if (cdmaDbm >= -100) levelDbm = 1;
-        else levelDbm = 0;
-
-        // Ec/Io are in dB*10
-        if (cdmaEcio >= -90) levelEcio = 4;
-        else if (cdmaEcio >= -110) levelEcio = 3;
-        else if (cdmaEcio >= -130) levelEcio = 2;
-        else if (cdmaEcio >= -150) levelEcio = 1;
-        else levelEcio = 0;
-
-        return (levelDbm < levelEcio) ? levelDbm : levelEcio;
-    }
-
-    private int getEvdoLevel() {
-        int evdoDbm = mSignalStrength.getEvdoDbm();
-        int evdoSnr = mSignalStrength.getEvdoSnr();
-        int levelEvdoDbm = 0;
-        int levelEvdoSnr = 0;
-
-        if (evdoDbm >= -65) levelEvdoDbm = 4;
-        else if (evdoDbm >= -75) levelEvdoDbm = 3;
-        else if (evdoDbm >= -90) levelEvdoDbm = 2;
-        else if (evdoDbm >= -105) levelEvdoDbm = 1;
-        else levelEvdoDbm = 0;
-
-        if (evdoSnr >= 7) levelEvdoSnr = 4;
-        else if (evdoSnr >= 5) levelEvdoSnr = 3;
-        else if (evdoSnr >= 3) levelEvdoSnr = 2;
-        else if (evdoSnr >= 1) levelEvdoSnr = 1;
-        else levelEvdoSnr = 0;
-
-        return (levelEvdoDbm < levelEvdoSnr) ? levelEvdoDbm : levelEvdoSnr;
-    }
-
-    private final void updateDataNetType(int net) {
-
-        switch (net) {
-        case TelephonyManager.NETWORK_TYPE_EDGE:
-            mDataIconList = sDataNetType_e;
-            break;
-        case TelephonyManager.NETWORK_TYPE_UMTS:
-            mDataIconList = sDataNetType_3g;
-            break;
-        case TelephonyManager.NETWORK_TYPE_HSDPA:
-        case TelephonyManager.NETWORK_TYPE_HSUPA:
-        case TelephonyManager.NETWORK_TYPE_HSPA:
-            if (mHspaDataDistinguishable) {
-                mDataIconList = sDataNetType_h;
-            } else {
-                mDataIconList = sDataNetType_3g;
-            }
-            break;
-        case TelephonyManager.NETWORK_TYPE_CDMA:
-            // display 1xRTT for IS95A/B
-            mDataIconList = this.sDataNetType_1x;
-            break;
-        case TelephonyManager.NETWORK_TYPE_1xRTT:
-            mDataIconList = this.sDataNetType_1x;
-            break;
-        case TelephonyManager.NETWORK_TYPE_EVDO_0: //fall through
-        case TelephonyManager.NETWORK_TYPE_EVDO_A:
-            mDataIconList = sDataNetType_3g;
-            break;
-        default:
-            mDataIconList = sDataNetType_g;
-        break;
-        }
-    }
-
-    private final void updateDataIcon() {
-        int iconId;
-        boolean visible = true;
-
-        if (!isCdma()) {
-            // GSM case, we have to check also the sim state
-            if (mSimState == IccCard.State.READY || mSimState == IccCard.State.UNKNOWN) {
-                if (hasService() && mDataState == TelephonyManager.DATA_CONNECTED) {
-                    switch (mDataActivity) {
-                        case TelephonyManager.DATA_ACTIVITY_IN:
-                            iconId = mDataIconList[1];
-                            break;
-                        case TelephonyManager.DATA_ACTIVITY_OUT:
-                            iconId = mDataIconList[2];
-                            break;
-                        case TelephonyManager.DATA_ACTIVITY_INOUT:
-                            iconId = mDataIconList[3];
-                            break;
-                        default:
-                            iconId = mDataIconList[0];
-                            break;
-                    }
-                    mDataData.iconId = iconId;
-                    mService.updateIcon(mDataIcon, mDataData, null);
-                } else {
-                    visible = false;
-                }
-            } else {
-                mDataData.iconId = com.android.internal.R.drawable.stat_sys_no_sim;
-                mService.updateIcon(mDataIcon, mDataData, null);
-            }
-        } else {
-            // CDMA case, mDataActivity can be also DATA_ACTIVITY_DORMANT
-            if (hasService() && mDataState == TelephonyManager.DATA_CONNECTED) {
-                switch (mDataActivity) {
-                    case TelephonyManager.DATA_ACTIVITY_IN:
-                        iconId = mDataIconList[1];
-                        break;
-                    case TelephonyManager.DATA_ACTIVITY_OUT:
-                        iconId = mDataIconList[2];
-                        break;
-                    case TelephonyManager.DATA_ACTIVITY_INOUT:
-                        iconId = mDataIconList[3];
-                        break;
-                    case TelephonyManager.DATA_ACTIVITY_DORMANT:
-                    default:
-                        iconId = mDataIconList[0];
-                        break;
-                }
-                mDataData.iconId = iconId;
-                mService.updateIcon(mDataIcon, mDataData, null);
-            } else {
-                visible = false;
-            }
-        }
-
-        long ident = Binder.clearCallingIdentity();
-        try {
-            mBatteryStats.notePhoneDataConnectionState(mPhone.getNetworkType(), visible);
-        } catch (RemoteException e) {
-        } finally {
-            Binder.restoreCallingIdentity(ident);
-        }
-
-        if (mDataIconVisible != visible) {
-            mService.setIconVisibility(mDataIcon, visible);
-            mDataIconVisible = visible;
-        }
-    }
-
-    private final void updateVolume() {
-        AudioManager audioManager = (AudioManager) mContext.getSystemService(Context.AUDIO_SERVICE);
-        final int ringerMode = audioManager.getRingerMode();
-        final boolean visible = ringerMode == AudioManager.RINGER_MODE_SILENT ||
-                ringerMode == AudioManager.RINGER_MODE_VIBRATE;
-        final int iconId = (ringerMode == AudioManager.RINGER_MODE_VIBRATE)
-                ? com.android.internal.R.drawable.stat_sys_ringer_vibrate
-                : com.android.internal.R.drawable.stat_sys_ringer_silent;
-
-        if (visible) {
-            mVolumeData.iconId = iconId;
-            mService.updateIcon(mVolumeIcon, mVolumeData, null);
-        }
-        if (visible != mVolumeVisible) {
-            mService.setIconVisibility(mVolumeIcon, visible);
-            mVolumeVisible = visible;
-        }
-    }
-
-    private final void updateBluetooth(Intent intent) {
-        int iconId = com.android.internal.R.drawable.stat_sys_data_bluetooth;
-        String action = intent.getAction();
-        if (action.equals(BluetoothAdapter.ACTION_STATE_CHANGED)) {
-            int state = intent.getIntExtra(BluetoothAdapter.EXTRA_STATE, BluetoothAdapter.ERROR);
-            mBluetoothEnabled = state == BluetoothAdapter.STATE_ON;
-        } else if (action.equals(BluetoothHeadset.ACTION_STATE_CHANGED)) {
-            mBluetoothHeadsetState = intent.getIntExtra(BluetoothHeadset.EXTRA_STATE,
-                    BluetoothHeadset.STATE_ERROR);
-        } else if (action.equals(BluetoothA2dp.ACTION_SINK_STATE_CHANGED)) {
-            BluetoothA2dp a2dp = new BluetoothA2dp(mContext);
-            if (a2dp.getConnectedSinks().size() != 0) {
-                mBluetoothA2dpConnected = true;
-            } else {
-                mBluetoothA2dpConnected = false;
-            }
-        } else if (action.equals(BluetoothPbap.PBAP_STATE_CHANGED_ACTION)) {
-            mBluetoothPbapState = intent.getIntExtra(BluetoothPbap.PBAP_STATE,
-                    BluetoothPbap.STATE_DISCONNECTED);
-        } else {
-            return;
-        }
-
-        if (mBluetoothHeadsetState == BluetoothHeadset.STATE_CONNECTED || mBluetoothA2dpConnected ||
-                mBluetoothPbapState == BluetoothPbap.STATE_CONNECTED) {
-            iconId = com.android.internal.R.drawable.stat_sys_data_bluetooth_connected;
-        }
-
-        mBluetoothData.iconId = iconId;
-        mService.updateIcon(mBluetoothIcon, mBluetoothData, null);
-        mService.setIconVisibility(mBluetoothIcon, mBluetoothEnabled);
-    }
-
-    private final void updateWifi(Intent intent) {
-        final String action = intent.getAction();
-        if (action.equals(WifiManager.WIFI_STATE_CHANGED_ACTION)) {
-
-            final boolean enabled = intent.getIntExtra(WifiManager.EXTRA_WIFI_STATE,
-                    WifiManager.WIFI_STATE_UNKNOWN) == WifiManager.WIFI_STATE_ENABLED;
-
-            if (!enabled) {
-                // If disabled, hide the icon. (We show icon when connected.)
-                mService.setIconVisibility(mWifiIcon, false);
-            }
-
-        } else if (action.equals(WifiManager.SUPPLICANT_CONNECTION_CHANGE_ACTION)) {
-            final boolean enabled = intent.getBooleanExtra(WifiManager.EXTRA_SUPPLICANT_CONNECTED,
-                                                           false);
-            if (!enabled) {
-                mService.setIconVisibility(mWifiIcon, false);
-            }
-        } else if (action.equals(WifiManager.NETWORK_STATE_CHANGED_ACTION)) {
-
-            final NetworkInfo networkInfo = (NetworkInfo)
-                    intent.getParcelableExtra(WifiManager.EXTRA_NETWORK_INFO);
-
-            int iconId;
-            if (networkInfo != null && networkInfo.isConnected()) {
-                mIsWifiConnected = true;
-                if (mLastWifiSignalLevel == -1) {
-                    iconId = sWifiSignalImages[0];
-                } else {
-                    iconId = sWifiSignalImages[mLastWifiSignalLevel];
-                }
-
-                // Show the icon since wi-fi is connected
-                mService.setIconVisibility(mWifiIcon, true);
-
-            } else {
-                mLastWifiSignalLevel = -1;
-                mIsWifiConnected = false;
-                iconId = sWifiSignalImages[0];
-
-                // Hide the icon since we're not connected
-                mService.setIconVisibility(mWifiIcon, false);
-            }
-
-            mWifiData.iconId = iconId;
-            mService.updateIcon(mWifiIcon, mWifiData, null);
-        } else if (action.equals(WifiManager.RSSI_CHANGED_ACTION)) {
-            final int newRssi = intent.getIntExtra(WifiManager.EXTRA_NEW_RSSI, -200);
-            int newSignalLevel = WifiManager.calculateSignalLevel(newRssi,
-                                                                  sWifiSignalImages.length);
-            if (newSignalLevel != mLastWifiSignalLevel) {
-                mLastWifiSignalLevel = newSignalLevel;
-                if (mIsWifiConnected) {
-                    mWifiData.iconId = sWifiSignalImages[newSignalLevel];
-                } else {
-                    mWifiData.iconId = sWifiTemporarilyNotConnectedImage;
-                }
-                mService.updateIcon(mWifiIcon, mWifiData, null);
-            }
-        }
-    }
-
-    private final void updateGps(Intent intent) {
-        final String action = intent.getAction();
-        final boolean enabled = intent.getBooleanExtra(GpsLocationProvider.EXTRA_ENABLED, false);
-
-        if (action.equals(GpsLocationProvider.GPS_FIX_CHANGE_ACTION) && enabled) {
-            // GPS is getting fixes
-            mService.updateIcon(mGpsIcon, mGpsFixIconData, null);
-            mService.setIconVisibility(mGpsIcon, true);
-        } else if (action.equals(GpsLocationProvider.GPS_ENABLED_CHANGE_ACTION) && !enabled) {
-            // GPS is off
-            mService.setIconVisibility(mGpsIcon, false);
-        } else {
-            // GPS is on, but not receiving fixes
-            mService.updateIcon(mGpsIcon, mGpsEnabledIconData, null);
-            mService.setIconVisibility(mGpsIcon, true);
-        }
-    }
-
-    private final void updateTTY(Intent intent) {
-        final String action = intent.getAction();
-        final boolean enabled = intent.getBooleanExtra(TtyIntent.TTY_ENABLED, false);
-
-        if (false) Slog.v(TAG, "updateTTY: enabled: " + enabled);
-
-        if (enabled) {
-            // TTY is on
-            if (false) Slog.v(TAG, "updateTTY: set TTY on");
-            mService.updateIcon(mTTYModeIcon, mTTYModeEnableIconData, null);
-            mService.setIconVisibility(mTTYModeIcon, true);
-        } else {
-            // TTY is off
-            if (false) Slog.v(TAG, "updateTTY: set TTY off");
-            mService.setIconVisibility(mTTYModeIcon, false);
-        }
-    }
-
-    private final void updateCdmaRoamingIcon(ServiceState state) {
-        if (!hasService()) {
-            mService.setIconVisibility(mCdmaRoamingIndicatorIcon, false);
-            return;
-        }
-
-        if (!isCdma()) {
-            mService.setIconVisibility(mCdmaRoamingIndicatorIcon, false);
-            return;
-        }
-
-        int[] iconList = sRoamingIndicatorImages_cdma;
-        int iconIndex = state.getCdmaEriIconIndex();
-        int iconMode = state.getCdmaEriIconMode();
-
-        if (iconIndex == -1) {
-            Slog.e(TAG, "getCdmaEriIconIndex returned null, skipping ERI icon update");
-            return;
-        }
-
-        if (iconMode == -1) {
-            Slog.e(TAG, "getCdmeEriIconMode returned null, skipping ERI icon update");
-            return;
-        }
-
-        if (iconIndex == EriInfo.ROAMING_INDICATOR_OFF) {
-            if (false) Slog.v(TAG, "Cdma ROAMING_INDICATOR_OFF, removing ERI icon");
-            mService.setIconVisibility(mCdmaRoamingIndicatorIcon, false);
-            return;
-        }
-
-        switch (iconMode) {
-            case EriInfo.ROAMING_ICON_MODE_NORMAL:
-                mCdmaRoamingIndicatorIconData.iconId = iconList[iconIndex];
-                mService.updateIcon(mCdmaRoamingIndicatorIcon, mCdmaRoamingIndicatorIconData, null);
-                mService.setIconVisibility(mCdmaRoamingIndicatorIcon, true);
-                break;
-            case EriInfo.ROAMING_ICON_MODE_FLASH:
-                mCdmaRoamingIndicatorIconData.iconId =
-                        com.android.internal.R.drawable.stat_sys_roaming_cdma_flash;
-                mService.updateIcon(mCdmaRoamingIndicatorIcon, mCdmaRoamingIndicatorIconData, null);
-                mService.setIconVisibility(mCdmaRoamingIndicatorIcon, true);
-                break;
-
-        }
-        mService.updateIcon(mPhoneIcon, mPhoneData, null);
-    }
-
-
-    private class StatusBarHandler extends Handler {
-        @Override
-        public void handleMessage(Message msg) {
-            switch (msg.what) {
-            case EVENT_BATTERY_CLOSE:
-                if (msg.arg1 == mBatteryViewSequence) {
-                    closeLastBatteryView();
-                }
-                break;
-            }
-        }
-    }
-}
diff --git a/services/java/com/android/server/status/StatusBarService.java b/services/java/com/android/server/status/StatusBarService.java
deleted file mode 100644
index 93c8d34..0000000
--- a/services/java/com/android/server/status/StatusBarService.java
+++ /dev/null
@@ -1,1881 +0,0 @@
-/*
- * Copyright (C) 2007 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.android.server.status;
-
-import com.android.internal.R;
-import com.android.internal.util.CharSequences;
-
-import android.app.ActivityManagerNative;
-import android.app.Dialog;
-import android.app.IStatusBar;
-import android.app.PendingIntent;
-import android.app.StatusBarManager;
-import android.content.BroadcastReceiver;
-import android.content.Context;
-import android.content.Intent;
-import android.content.IntentFilter;
-import android.content.pm.PackageManager;
-import android.content.res.Resources;
-import android.graphics.PixelFormat;
-import android.graphics.Rect;
-import android.graphics.drawable.Drawable;
-import android.net.Uri;
-import android.os.IBinder;
-import android.os.RemoteException;
-import android.os.Binder;
-import android.os.Handler;
-import android.os.Message;
-import android.os.SystemClock;
-import android.provider.Telephony;
-import android.util.Slog;
-import android.view.Display;
-import android.view.Gravity;
-import android.view.KeyEvent;
-import android.view.LayoutInflater;
-import android.view.MotionEvent;
-import android.view.VelocityTracker;
-import android.view.View;
-import android.view.ViewGroup;
-import android.view.Window;
-import android.view.WindowManager;
-import android.view.WindowManagerImpl;
-import android.view.animation.Animation;
-import android.view.animation.AnimationUtils;
-import android.widget.LinearLayout;
-import android.widget.RemoteViews;
-import android.widget.ScrollView;
-import android.widget.TextView;
-import android.widget.FrameLayout;
-
-import java.io.FileDescriptor;
-import java.io.PrintWriter;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.Set;
-
-
-/**
- * The public (ok, semi-public) service for the status bar.
- * <p>
- * This interesting thing to note about this class is that most of the methods that
- * are called from other classes just post a message, and everything else is batched
- * and coalesced into a series of calls to methods that all start with "perform."
- * There are two reasons for this.  The first is that some of the methods (activate/deactivate)
- * are on IStatusBar, so they're called from the thread pool and they need to make their
- * way onto the UI thread.  The second is that the message queue is stopped while animations
- * are happening in order to make for smoother transitions.
- * <p>
- * Each icon is either an icon or an icon and a notification.  They're treated mostly
- * separately throughout the code, although they both use the same key, which is assigned
- * when they are created.
- */
-public class StatusBarService extends IStatusBar.Stub
-{
-    static final String TAG = "StatusBar";
-    static final boolean SPEW = false;
-
-    static final int EXPANDED_LEAVE_ALONE = -10000;
-    static final int EXPANDED_FULL_OPEN = -10001;
-
-    private static final int MSG_ANIMATE = 1000;
-    private static final int MSG_ANIMATE_REVEAL = 1001;
-
-    private static final int OP_ADD_ICON = 1;
-    private static final int OP_UPDATE_ICON = 2;
-    private static final int OP_REMOVE_ICON = 3;
-    private static final int OP_SET_VISIBLE = 4;
-    private static final int OP_EXPAND = 5;
-    private static final int OP_TOGGLE = 6;
-    private static final int OP_DISABLE = 7;
-    private class PendingOp {
-        IBinder key;
-        int code;
-        IconData iconData;
-        NotificationData notificationData;
-        boolean visible;
-        int integer;
-    }
-
-    private class DisableRecord implements IBinder.DeathRecipient {
-        String pkg;
-        int what;
-        IBinder token;
-
-        public void binderDied() {
-            Slog.i(TAG, "binder died for pkg=" + pkg);
-            disable(0, token, pkg);
-            token.unlinkToDeath(this, 0);
-        }
-    }
-
-    public interface NotificationCallbacks {
-        void onSetDisabled(int status);
-        void onClearAll();
-        void onNotificationClick(String pkg, String tag, int id);
-        void onPanelRevealed();
-    }
-
-    private class ExpandedDialog extends Dialog {
-        ExpandedDialog(Context context) {
-            super(context, com.android.internal.R.style.Theme_Light_NoTitleBar);
-        }
-
-        @Override
-        public boolean dispatchKeyEvent(KeyEvent event) {
-            boolean down = event.getAction() == KeyEvent.ACTION_DOWN;
-            switch (event.getKeyCode()) {
-            case KeyEvent.KEYCODE_BACK:
-                if (!down) {
-                    StatusBarService.this.deactivate();
-                }
-                return true;
-            }
-            return super.dispatchKeyEvent(event);
-        }
-    }
-    
-    final Context mContext;
-    final Display mDisplay;
-    StatusBarView mStatusBarView;
-    int mPixelFormat;
-    H mHandler = new H();
-    Object mQueueLock = new Object();
-    ArrayList<PendingOp> mQueue = new ArrayList<PendingOp>();
-    NotificationCallbacks mNotificationCallbacks;
-    
-    // All accesses to mIconMap and mNotificationData are syncronized on those objects,
-    // but this is only so dump() can work correctly.  Modifying these outside of the UI
-    // thread will not work, there are places in the code that unlock and reaquire between
-    // reads and require them to not be modified.
-
-    // icons
-    HashMap<IBinder,StatusBarIcon> mIconMap = new HashMap<IBinder,StatusBarIcon>();
-    ArrayList<StatusBarIcon> mIconList = new ArrayList<StatusBarIcon>();
-    String[] mRightIconSlots;
-    StatusBarIcon[] mRightIcons;
-    LinearLayout mIcons;
-    IconMerger mNotificationIcons;
-    LinearLayout mStatusIcons;
-    StatusBarIcon mMoreIcon;
-    private UninstallReceiver mUninstallReceiver;
-
-    // expanded notifications
-    NotificationViewList mNotificationData = new NotificationViewList();
-    Dialog mExpandedDialog;
-    ExpandedView mExpandedView;
-    WindowManager.LayoutParams mExpandedParams;
-    ScrollView mScrollView;
-    View mNotificationLinearLayout;
-    TextView mOngoingTitle;
-    LinearLayout mOngoingItems;
-    TextView mLatestTitle;
-    LinearLayout mLatestItems;
-    TextView mNoNotificationsTitle;
-    TextView mSpnLabel;
-    TextView mPlmnLabel;
-    TextView mClearButton;
-    View mExpandedContents;
-    CloseDragHandle mCloseView;
-    int[] mPositionTmp = new int[2];
-    boolean mExpanded;
-    boolean mExpandedVisible;
-
-    // the date view
-    DateView mDateView;
-
-    // the tracker view
-    TrackingView mTrackingView;
-    WindowManager.LayoutParams mTrackingParams;
-    int mTrackingPosition; // the position of the top of the tracking view.
-
-    // ticker
-    private Ticker mTicker;
-    private View mTickerView;
-    private boolean mTicking;
-    
-    // Tracking finger for opening/closing.
-    int mEdgeBorder; // corresponds to R.dimen.status_bar_edge_ignore
-    boolean mTracking;
-    VelocityTracker mVelocityTracker;
-    
-    static final int ANIM_FRAME_DURATION = (1000/60);
-    
-    boolean mAnimating;
-    long mCurAnimationTime;
-    float mDisplayHeight;
-    float mAnimY;
-    float mAnimVel;
-    float mAnimAccel;
-    long mAnimLastTime;
-    boolean mAnimatingReveal = false;
-    int mViewDelta;
-    int[] mAbsPos = new int[2];
-    
-    // for disabling the status bar
-    ArrayList<DisableRecord> mDisableRecords = new ArrayList<DisableRecord>();
-    int mDisabled = 0;
-
-    /**
-     * Construct the service, add the status bar view to the window manager
-     */
-    public StatusBarService(Context context) {
-        mContext = context;
-        mDisplay = ((WindowManager)context.getSystemService(
-                Context.WINDOW_SERVICE)).getDefaultDisplay();
-        makeStatusBarView(context);
-        mUninstallReceiver = new UninstallReceiver();
-    }
-
-    public void setNotificationCallbacks(NotificationCallbacks listener) {
-        mNotificationCallbacks = listener;
-    }
-
-    // ================================================================================
-    // Constructing the view
-    // ================================================================================
-    private void makeStatusBarView(Context context) {
-        Resources res = context.getResources();
-        mRightIconSlots = res.getStringArray(com.android.internal.R.array.status_bar_icon_order);
-        mRightIcons = new StatusBarIcon[mRightIconSlots.length];
-
-        ExpandedView expanded = (ExpandedView)View.inflate(context,
-                com.android.internal.R.layout.status_bar_expanded, null);
-        expanded.mService = this;
-        StatusBarView sb = (StatusBarView)View.inflate(context,
-                com.android.internal.R.layout.status_bar, null);
-        sb.mService = this;
-
-        // figure out which pixel-format to use for the status bar.
-        mPixelFormat = PixelFormat.TRANSLUCENT;
-        Drawable bg = sb.getBackground();
-        if (bg != null) {
-            mPixelFormat = bg.getOpacity();
-        }
-
-        mStatusBarView = sb;
-        mStatusIcons = (LinearLayout)sb.findViewById(R.id.statusIcons);
-        mNotificationIcons = (IconMerger)sb.findViewById(R.id.notificationIcons);
-        mNotificationIcons.service = this;
-        mIcons = (LinearLayout)sb.findViewById(R.id.icons);
-        mTickerView = sb.findViewById(R.id.ticker);
-        mDateView = (DateView)sb.findViewById(R.id.date);
-
-        mExpandedDialog = new ExpandedDialog(context);
-        mExpandedView = expanded;
-        mExpandedContents = expanded.findViewById(R.id.notificationLinearLayout);
-        mOngoingTitle = (TextView)expanded.findViewById(R.id.ongoingTitle);
-        mOngoingItems = (LinearLayout)expanded.findViewById(R.id.ongoingItems);
-        mLatestTitle = (TextView)expanded.findViewById(R.id.latestTitle);
-        mLatestItems = (LinearLayout)expanded.findViewById(R.id.latestItems);
-        mNoNotificationsTitle = (TextView)expanded.findViewById(R.id.noNotificationsTitle);
-        mClearButton = (TextView)expanded.findViewById(R.id.clear_all_button);
-        mClearButton.setOnClickListener(mClearButtonListener);
-        mSpnLabel = (TextView)expanded.findViewById(R.id.spnLabel);
-        mPlmnLabel = (TextView)expanded.findViewById(R.id.plmnLabel);
-        mScrollView = (ScrollView)expanded.findViewById(R.id.scroll);
-        mNotificationLinearLayout = expanded.findViewById(R.id.notificationLinearLayout);
-
-        mOngoingTitle.setVisibility(View.GONE);
-        mLatestTitle.setVisibility(View.GONE);
-        
-        mTicker = new MyTicker(context, sb);
-
-        TickerView tickerView = (TickerView)sb.findViewById(R.id.tickerText);
-        tickerView.mTicker = mTicker;
-
-        mTrackingView = (TrackingView)View.inflate(context,
-                com.android.internal.R.layout.status_bar_tracking, null);
-        mTrackingView.mService = this;
-        mCloseView = (CloseDragHandle)mTrackingView.findViewById(R.id.close);
-        mCloseView.mService = this;
-
-        mEdgeBorder = res.getDimensionPixelSize(R.dimen.status_bar_edge_ignore);
-
-        // add the more icon for the notifications
-        IconData moreData = IconData.makeIcon(null, context.getPackageName(),
-                R.drawable.stat_notify_more, 0, 42);
-        mMoreIcon = new StatusBarIcon(context, moreData, mNotificationIcons);
-        mMoreIcon.view.setId(R.drawable.stat_notify_more);
-        mNotificationIcons.moreIcon = mMoreIcon;
-        mNotificationIcons.addView(mMoreIcon.view);
-
-        // set the inital view visibility
-        setAreThereNotifications();
-        mDateView.setVisibility(View.INVISIBLE);
-
-        // before we register for broadcasts
-        mPlmnLabel.setText(R.string.lockscreen_carrier_default);
-        mPlmnLabel.setVisibility(View.VISIBLE);
-        mSpnLabel.setText("");
-        mSpnLabel.setVisibility(View.GONE);
-
-        // receive broadcasts
-        IntentFilter filter = new IntentFilter();
-        filter.addAction(Intent.ACTION_CONFIGURATION_CHANGED);
-        filter.addAction(Intent.ACTION_CLOSE_SYSTEM_DIALOGS);
-        filter.addAction(Intent.ACTION_SCREEN_OFF);
-        filter.addAction(Telephony.Intents.SPN_STRINGS_UPDATED_ACTION);
-        context.registerReceiver(mBroadcastReceiver, filter);
-    }
-
-    public void systemReady() {
-        final StatusBarView view = mStatusBarView;
-        WindowManager.LayoutParams lp = new WindowManager.LayoutParams(
-                ViewGroup.LayoutParams.MATCH_PARENT,
-                view.getContext().getResources().getDimensionPixelSize(
-                        com.android.internal.R.dimen.status_bar_height),
-                WindowManager.LayoutParams.TYPE_STATUS_BAR,
-                WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE|
-                WindowManager.LayoutParams.FLAG_TOUCHABLE_WHEN_WAKING,
-                mPixelFormat);
-        lp.gravity = Gravity.TOP | Gravity.FILL_HORIZONTAL;
-        lp.setTitle("StatusBar");
-        lp.windowAnimations = R.style.Animation_StatusBar;
-
-        WindowManagerImpl.getDefault().addView(view, lp);
-    }
-    
-    // ================================================================================
-    // From IStatusBar
-    // ================================================================================
-    public void activate() {
-        enforceExpandStatusBar();
-        addPendingOp(OP_EXPAND, null, true);
-    }
-
-    public void deactivate() {
-        enforceExpandStatusBar();
-        addPendingOp(OP_EXPAND, null, false);
-    }
-
-    public void toggle() {
-        enforceExpandStatusBar();
-        addPendingOp(OP_TOGGLE, null, false);
-    }
-
-    public void disable(int what, IBinder token, String pkg) {
-        enforceStatusBar();
-        synchronized (mNotificationCallbacks) {
-            // This is a little gross, but I think it's safe as long as nobody else
-            // synchronizes on mNotificationCallbacks.  It's important that the the callback
-            // and the pending op get done in the correct order and not interleaved with
-            // other calls, otherwise they'll get out of sync.
-            int net;
-            synchronized (mDisableRecords) {
-                manageDisableListLocked(what, token, pkg);
-                net = gatherDisableActionsLocked();
-                mNotificationCallbacks.onSetDisabled(net);
-            }
-            addPendingOp(OP_DISABLE, net);
-        }
-    }
-
-    public IBinder addIcon(String slot, String iconPackage, int iconId, int iconLevel) {
-        enforceStatusBar();
-        return addIcon(IconData.makeIcon(slot, iconPackage, iconId, iconLevel, 0), null);
-    }
-
-    public void updateIcon(IBinder key,
-            String slot, String iconPackage, int iconId, int iconLevel) {
-        enforceStatusBar();
-        updateIcon(key, IconData.makeIcon(slot, iconPackage, iconId, iconLevel, 0), null);
-    }
-
-    public void removeIcon(IBinder key) {
-        enforceStatusBar();
-        addPendingOp(OP_REMOVE_ICON, key, null, null, -1);
-    }
-
-    private void enforceStatusBar() {
-        mContext.enforceCallingOrSelfPermission(
-                android.Manifest.permission.STATUS_BAR,
-                "StatusBarService");
-    }
-
-    private void enforceExpandStatusBar() {
-        mContext.enforceCallingOrSelfPermission(
-                android.Manifest.permission.EXPAND_STATUS_BAR,
-                "StatusBarService");
-    }
-
-    // ================================================================================
-    // Can be called from any thread
-    // ================================================================================
-    public IBinder addIcon(IconData data, NotificationData n) {
-        int slot;
-        // assert early-on if they using a slot that doesn't exist.
-        if (data != null && n == null) {
-            slot = getRightIconIndex(data.slot);
-            if (slot < 0) {
-                throw new SecurityException("invalid status bar icon slot: "
-                        + (data.slot != null ? "'" + data.slot + "'" : "null"));
-            }
-        } else {
-            slot = -1;
-        }
-        IBinder key = new Binder();
-        addPendingOp(OP_ADD_ICON, key, data, n, -1);
-        return key;
-    }
-
-    public void updateIcon(IBinder key, IconData data, NotificationData n) {
-        addPendingOp(OP_UPDATE_ICON, key, data, n, -1);
-    }
-
-    public void setIconVisibility(IBinder key, boolean visible) {
-        addPendingOp(OP_SET_VISIBLE, key, visible);
-    }
-
-    private void addPendingOp(int code, IBinder key, IconData data, NotificationData n, int i) {
-        synchronized (mQueueLock) {
-            PendingOp op = new PendingOp();
-            op.key = key;
-            op.code = code;
-            op.iconData = data == null ? null : data.clone();
-            op.notificationData = n;
-            op.integer = i;
-            mQueue.add(op);
-            if (mQueue.size() == 1) {
-                mHandler.sendEmptyMessage(2);
-            }
-        }
-    }
-
-    private void addPendingOp(int code, IBinder key, boolean visible) {
-        synchronized (mQueueLock) {
-            PendingOp op = new PendingOp();
-            op.key = key;
-            op.code = code;
-            op.visible = visible;
-            mQueue.add(op);
-            if (mQueue.size() == 1) {
-                mHandler.sendEmptyMessage(1);
-            }
-        }
-    }
-
-    private void addPendingOp(int code, int integer) {
-        synchronized (mQueueLock) {
-            PendingOp op = new PendingOp();
-            op.code = code;
-            op.integer = integer;
-            mQueue.add(op);
-            if (mQueue.size() == 1) {
-                mHandler.sendEmptyMessage(1);
-            }
-        }
-    }
-
-    // lock on mDisableRecords
-    void manageDisableListLocked(int what, IBinder token, String pkg) {
-        if (SPEW) {
-            Slog.d(TAG, "manageDisableList what=0x" + Integer.toHexString(what)
-                    + " pkg=" + pkg);
-        }
-        // update the list
-        synchronized (mDisableRecords) {
-            final int N = mDisableRecords.size();
-            DisableRecord tok = null;
-            int i;
-            for (i=0; i<N; i++) {
-                DisableRecord t = mDisableRecords.get(i);
-                if (t.token == token) {
-                    tok = t;
-                    break;
-                }
-            }
-            if (what == 0 || !token.isBinderAlive()) {
-                if (tok != null) {
-                    mDisableRecords.remove(i);
-                    tok.token.unlinkToDeath(tok, 0);
-                }
-            } else {
-                if (tok == null) {
-                    tok = new DisableRecord();
-                    try {
-                        token.linkToDeath(tok, 0);
-                    }
-                    catch (RemoteException ex) {
-                        return; // give up
-                    }
-                    mDisableRecords.add(tok);
-                }
-                tok.what = what;
-                tok.token = token;
-                tok.pkg = pkg;
-            }
-        }
-    }
-
-    // lock on mDisableRecords
-    int gatherDisableActionsLocked() {
-        final int N = mDisableRecords.size();
-        // gather the new net flags
-        int net = 0;
-        for (int i=0; i<N; i++) {
-            net |= mDisableRecords.get(i).what;
-        }
-        return net;
-    }
-
-    private int getRightIconIndex(String slot) {
-        final int N = mRightIconSlots.length;
-        for (int i=0; i<N; i++) {
-            if (mRightIconSlots[i].equals(slot)) {
-                return i;
-            }
-        }
-        return -1;
-    }
-
-    // ================================================================================
-    // Always called from UI thread
-    // ================================================================================
-    /**
-     * All changes to the status bar and notifications funnel through here and are batched.
-     */
-    private class H extends Handler {
-        public void handleMessage(Message m) {
-            if (m.what == MSG_ANIMATE) {
-                doAnimation();
-                return;
-            }
-            if (m.what == MSG_ANIMATE_REVEAL) {
-                doRevealAnimation();
-                return;
-            }
-
-            ArrayList<PendingOp> queue;
-            synchronized (mQueueLock) {
-                queue = mQueue;
-                mQueue = new ArrayList<PendingOp>();
-            }
-
-            boolean wasExpanded = mExpanded;
-
-            // for each one in the queue, find all of the ones with the same key
-            // and collapse that down into a final op and/or call to setVisibility, etc
-            boolean expand = wasExpanded;
-            boolean doExpand = false;
-            boolean doDisable = false;
-            int disableWhat = 0;
-            int N = queue.size();
-            while (N > 0) {
-                PendingOp op = queue.get(0);
-                boolean doOp = false;
-                boolean visible = false;
-                boolean doVisibility = false;
-                if (op.code == OP_SET_VISIBLE) {
-                    doVisibility = true;
-                    visible = op.visible;
-                }
-                else if (op.code == OP_EXPAND) {
-                    doExpand = true;
-                    expand = op.visible;
-                }
-                else if (op.code == OP_TOGGLE) {
-                    doExpand = true;
-                    expand = !expand;
-                }
-                else {
-                    doOp = true;
-                }
-
-                if (alwaysHandle(op.code)) {
-                    // coalesce these
-                    for (int i=1; i<N; i++) {
-                        PendingOp o = queue.get(i);
-                        if (!alwaysHandle(o.code) && o.key == op.key) {
-                            if (o.code == OP_SET_VISIBLE) {
-                                visible = o.visible;
-                                doVisibility = true;
-                            }
-                            else if (o.code == OP_EXPAND) {
-                                expand = o.visible;
-                                doExpand = true;
-                            }
-                            else {
-                                op.code = o.code;
-                                op.iconData = o.iconData;
-                                op.notificationData = o.notificationData;
-                            }
-                            queue.remove(i);
-                            i--;
-                            N--;
-                        }
-                    }
-                }
-
-                queue.remove(0);
-                N--;
-
-                if (doOp) {
-                    switch (op.code) {
-                        case OP_ADD_ICON:
-                        case OP_UPDATE_ICON:
-                            performAddUpdateIcon(op.key, op.iconData, op.notificationData);
-                            break;
-                        case OP_REMOVE_ICON:
-                            performRemoveIcon(op.key);
-                            break;
-                        case OP_DISABLE:
-                            doDisable = true;
-                            disableWhat = op.integer;
-                            break;
-                    }
-                }
-                if (doVisibility && op.code != OP_REMOVE_ICON) {
-                    performSetIconVisibility(op.key, visible);
-                }
-            }
-
-            if (queue.size() != 0) {
-                throw new RuntimeException("Assertion failed: queue.size=" + queue.size());
-            }
-            if (doExpand) {
-                // this is last so that we capture all of the pending changes before doing it
-                if (expand) {
-                    animateExpand();
-                } else {
-                    animateCollapse();
-                }
-            }
-            if (doDisable) {
-                performDisableActions(disableWhat);
-            }
-        }
-    }
-
-    private boolean alwaysHandle(int code) {
-        return code == OP_DISABLE;
-    }
-
-    /* private */ void performAddUpdateIcon(IBinder key, IconData data, NotificationData n)
-                        throws StatusBarException {
-        if (SPEW) {
-            Slog.d(TAG, "performAddUpdateIcon icon=" + data + " notification=" + n + " key=" + key);
-        }
-        // notification
-        if (n != null) {
-            StatusBarNotification notification = getNotification(key);
-            NotificationData oldData = null;
-            if (notification == null) {
-                // add
-                notification = new StatusBarNotification();
-                notification.key = key;
-                notification.data = n;
-                synchronized (mNotificationData) {
-                    mNotificationData.add(notification);
-                }
-                addNotificationView(notification);
-                setAreThereNotifications();
-            } else {
-                // update
-                oldData = notification.data;
-                notification.data = n;
-                updateNotificationView(notification, oldData);
-            }
-            // Show the ticker if one is requested, and the text is different
-            // than the currently displayed ticker.  Also don't do this
-            // until status bar window is attached to the window manager,
-            // because...  well, what's the point otherwise?  And trying to
-            // run a ticker without being attached will crash!
-            if (n.tickerText != null && mStatusBarView.getWindowToken() != null
-                    && (oldData == null
-                        || oldData.tickerText == null
-                        || !CharSequences.equals(oldData.tickerText, n.tickerText))) {
-                if (0 == (mDisabled & 
-                    (StatusBarManager.DISABLE_NOTIFICATION_ICONS | StatusBarManager.DISABLE_NOTIFICATION_TICKER))) {
-                    mTicker.addEntry(n, StatusBarIcon.getIcon(mContext, data), n.tickerText);
-                }
-            }
-            updateExpandedViewPos(EXPANDED_LEAVE_ALONE);
-        }
-
-        // icon
-        synchronized (mIconMap) {
-            StatusBarIcon icon = mIconMap.get(key);
-            if (icon == null) {
-                // add
-                LinearLayout v = n == null ? mStatusIcons : mNotificationIcons;
-
-                icon = new StatusBarIcon(mContext, data, v);
-                mIconMap.put(key, icon);
-                mIconList.add(icon);
-
-                if (n == null) {
-                    int slotIndex = getRightIconIndex(data.slot);
-                    StatusBarIcon[] rightIcons = mRightIcons;
-                    if (rightIcons[slotIndex] == null) {
-                        int pos = 0;
-                        for (int i=mRightIcons.length-1; i>slotIndex; i--) {
-                            StatusBarIcon ic = rightIcons[i];
-                            if (ic != null) {
-                                pos++;
-                            }
-                        }
-                        rightIcons[slotIndex] = icon;
-                        mStatusIcons.addView(icon.view, pos);
-                    } else {
-                        Slog.e(TAG, "duplicate icon in slot " + slotIndex + "/" + data.slot);
-                        mIconMap.remove(key);
-                        mIconList.remove(icon);
-                        return ;
-                    }
-                } else {
-                    int iconIndex = mNotificationData.getIconIndex(n);
-                    mNotificationIcons.addView(icon.view, iconIndex);
-                }
-            } else {
-                if (n == null) {
-                    // right hand side icons -- these don't reorder
-                    icon.update(mContext, data);
-                } else {
-                    // remove old
-                    ViewGroup parent = (ViewGroup)icon.view.getParent();
-                    parent.removeView(icon.view);
-                    // add new
-                    icon.update(mContext, data);
-                    int iconIndex = mNotificationData.getIconIndex(n);
-                    mNotificationIcons.addView(icon.view, iconIndex);
-                }
-            }
-        }
-    }
-
-    /* private */ void performSetIconVisibility(IBinder key, boolean visible) {
-        synchronized (mIconMap) {
-            if (SPEW) {
-                Slog.d(TAG, "performSetIconVisibility key=" + key + " visible=" + visible);
-            }
-            StatusBarIcon icon = mIconMap.get(key);
-            icon.view.setVisibility(visible ? View.VISIBLE : View.GONE);
-        }
-    }
-    
-    /* private */ void performRemoveIcon(IBinder key) {
-        synchronized (this) {
-            if (SPEW) {
-                Slog.d(TAG, "performRemoveIcon key=" + key);
-            }
-            StatusBarIcon icon = mIconMap.remove(key);
-            mIconList.remove(icon);
-            if (icon != null) {
-                ViewGroup parent = (ViewGroup)icon.view.getParent();
-                parent.removeView(icon.view);
-                int slotIndex = getRightIconIndex(icon.mData.slot);
-                if (slotIndex >= 0) {
-                    mRightIcons[slotIndex] = null;
-                }
-            }
-            StatusBarNotification notification = getNotification(key);
-            if (notification != null) {
-                removeNotificationView(notification);
-                synchronized (mNotificationData) {
-                    mNotificationData.remove(notification);
-                }
-                setAreThereNotifications();
-            }
-        }
-    }
-
-    int getIconNumberForView(View v) {
-        synchronized (mIconMap) {
-            StatusBarIcon icon = null;
-            final int N = mIconList.size();
-            for (int i=0; i<N; i++) {
-                StatusBarIcon ic = mIconList.get(i);
-                if (ic.view == v) {
-                    icon = ic;
-                    break;
-                }
-            }
-            if (icon != null) {
-                return icon.getNumber();
-            } else {
-                return -1;
-            }
-        }
-    }
-
-
-    StatusBarNotification getNotification(IBinder key) {
-        synchronized (mNotificationData) {
-            return mNotificationData.get(key);
-        }
-    }
-
-    View.OnFocusChangeListener mFocusChangeListener = new View.OnFocusChangeListener() {
-        public void onFocusChange(View v, boolean hasFocus) {
-            // Because 'v' is a ViewGroup, all its children will be (un)selected
-            // too, which allows marqueeing to work.
-            v.setSelected(hasFocus);
-        }
-    };
-    
-    View makeNotificationView(StatusBarNotification notification, ViewGroup parent) {
-        NotificationData n = notification.data;
-        RemoteViews remoteViews = n.contentView;
-        if (remoteViews == null) {
-            return null;
-        }
-
-        // create the row view
-        LayoutInflater inflater = (LayoutInflater)mContext.getSystemService(
-                Context.LAYOUT_INFLATER_SERVICE);
-        View row = inflater.inflate(com.android.internal.R.layout.status_bar_latest_event, parent, false);
-
-        // bind the click event to the content area
-        ViewGroup content = (ViewGroup)row.findViewById(com.android.internal.R.id.content);
-        content.setDescendantFocusability(ViewGroup.FOCUS_BLOCK_DESCENDANTS);
-        content.setOnFocusChangeListener(mFocusChangeListener);
-        PendingIntent contentIntent = n.contentIntent;
-        if (contentIntent != null) {
-            content.setOnClickListener(new Launcher(contentIntent, n.pkg, n.tag, n.id));
-        }
-
-        View child = null;
-        Exception exception = null;
-        try {
-            child = remoteViews.apply(mContext, content);
-        }
-        catch (RuntimeException e) {
-            exception = e;
-        }
-        if (child == null) {
-            Slog.e(TAG, "couldn't inflate view for package " + n.pkg, exception);
-            return null;
-        }
-        content.addView(child);
-
-        row.setDrawingCacheEnabled(true);
-
-        notification.view = row;
-        notification.contentView = child;
-
-        return row;
-    }
-
-    void addNotificationView(StatusBarNotification notification) {
-        if (notification.view != null) {
-            throw new RuntimeException("Assertion failed: notification.view="
-                    + notification.view);
-        }
-
-        LinearLayout parent = notification.data.ongoingEvent ? mOngoingItems : mLatestItems;
-
-        View child = makeNotificationView(notification, parent);
-        if (child == null) {
-            return ;
-        }
-
-        int index = mNotificationData.getExpandedIndex(notification);
-        parent.addView(child, index);
-    }
-
-    /**
-     * Remove the old one and put the new one in its place.
-     * @param notification the notification
-     */
-    void updateNotificationView(StatusBarNotification notification, NotificationData oldData) {
-        NotificationData n = notification.data;
-        if (oldData != null && n != null
-                && n.when == oldData.when
-                && n.ongoingEvent == oldData.ongoingEvent
-                && n.contentView != null && oldData.contentView != null
-                && n.contentView.getPackage() != null
-                && oldData.contentView.getPackage() != null
-                && oldData.contentView.getPackage().equals(n.contentView.getPackage())
-                && oldData.contentView.getLayoutId() == n.contentView.getLayoutId()
-                && notification.view != null) {
-            mNotificationData.update(notification);
-            try {
-                n.contentView.reapply(mContext, notification.contentView);
-
-                // update the contentIntent
-                ViewGroup content = (ViewGroup)notification.view.findViewById(
-                        com.android.internal.R.id.content);
-                PendingIntent contentIntent = n.contentIntent;
-                if (contentIntent != null) {
-                    content.setOnClickListener(new Launcher(contentIntent, n.pkg, n.tag, n.id));
-                }
-            }
-            catch (RuntimeException e) {
-                // It failed to add cleanly.  Log, and remove the view from the panel.
-                Slog.w(TAG, "couldn't reapply views for package " + n.contentView.getPackage(), e);
-                removeNotificationView(notification);
-            }
-        } else {
-            mNotificationData.update(notification);
-            removeNotificationView(notification);
-            addNotificationView(notification);
-        }
-        setAreThereNotifications();
-    }
-
-    void removeNotificationView(StatusBarNotification notification) {
-        View v = notification.view;
-        if (v != null) {
-            ViewGroup parent = (ViewGroup)v.getParent();
-            parent.removeView(v);
-            notification.view = null;
-        }
-    }
-
-    private void setAreThereNotifications() {
-        boolean ongoing = mOngoingItems.getChildCount() != 0;
-        boolean latest = mLatestItems.getChildCount() != 0;
-
-        if (mNotificationData.hasClearableItems()) {
-            mClearButton.setVisibility(View.VISIBLE);
-        } else {
-            mClearButton.setVisibility(View.INVISIBLE);
-        }
-
-        mOngoingTitle.setVisibility(ongoing ? View.VISIBLE : View.GONE);
-        mLatestTitle.setVisibility(latest ? View.VISIBLE : View.GONE);
-
-        if (ongoing || latest) {
-            mNoNotificationsTitle.setVisibility(View.GONE);
-        } else {
-            mNoNotificationsTitle.setVisibility(View.VISIBLE);
-        }
-    }
-
-    private void makeExpandedVisible() {
-        if (SPEW) Slog.d(TAG, "Make expanded visible: expanded visible=" + mExpandedVisible);
-        if (mExpandedVisible) {
-            return;
-        }
-        mExpandedVisible = true;
-        panelSlightlyVisible(true);
-        
-        updateExpandedViewPos(EXPANDED_LEAVE_ALONE);
-        mExpandedParams.flags &= ~WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE;
-        mExpandedParams.flags |= WindowManager.LayoutParams.FLAG_ALT_FOCUSABLE_IM;
-        mExpandedDialog.getWindow().setAttributes(mExpandedParams);
-        mExpandedView.requestFocus(View.FOCUS_FORWARD);
-        mTrackingView.setVisibility(View.VISIBLE);
-        
-        if (!mTicking) {
-            setDateViewVisibility(true, com.android.internal.R.anim.fade_in);
-        }
-    }
-    
-    void animateExpand() {
-        if (SPEW) Slog.d(TAG, "Animate expand: expanded=" + mExpanded);
-        if ((mDisabled & StatusBarManager.DISABLE_EXPAND) != 0) {
-            return ;
-        }
-        if (mExpanded) {
-            return;
-        }
-
-        prepareTracking(0, true);
-        performFling(0, 2000.0f, true);
-    }
-    
-    void animateCollapse() {
-        if (SPEW) {
-            Slog.d(TAG, "animateCollapse(): mExpanded=" + mExpanded
-                    + " mExpandedVisible=" + mExpandedVisible
-                    + " mExpanded=" + mExpanded
-                    + " mAnimating=" + mAnimating
-                    + " mAnimY=" + mAnimY
-                    + " mAnimVel=" + mAnimVel);
-        }
-        
-        if (!mExpandedVisible) {
-            return;
-        }
-
-        int y;
-        if (mAnimating) {
-            y = (int)mAnimY;
-        } else {
-            y = mDisplay.getHeight()-1;
-        }
-        // Let the fling think that we're open so it goes in the right direction
-        // and doesn't try to re-open the windowshade.
-        mExpanded = true;
-        prepareTracking(y, false);
-        performFling(y, -2000.0f, true);
-    }
-    
-    void performExpand() {
-        if (SPEW) Slog.d(TAG, "performExpand: mExpanded=" + mExpanded);
-        if ((mDisabled & StatusBarManager.DISABLE_EXPAND) != 0) {
-            return ;
-        }
-        if (mExpanded) {
-            return;
-        }
-
-        // It seems strange to sometimes not expand...
-        if (false) {
-            synchronized (mNotificationData) {
-                if (mNotificationData.size() == 0) {
-                    return;
-                }
-            }
-        }
-        
-        mExpanded = true;
-        makeExpandedVisible();
-        updateExpandedViewPos(EXPANDED_FULL_OPEN);
-
-        if (false) postStartTracing();
-    }
-
-    void performCollapse() {
-        if (SPEW) Slog.d(TAG, "performCollapse: mExpanded=" + mExpanded
-                + " mExpandedVisible=" + mExpandedVisible);
-        
-        if (!mExpandedVisible) {
-            return;
-        }
-        mExpandedVisible = false;
-        panelSlightlyVisible(false);
-        mExpandedParams.flags |= WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE;
-        mExpandedParams.flags &= ~WindowManager.LayoutParams.FLAG_ALT_FOCUSABLE_IM;
-        mExpandedDialog.getWindow().setAttributes(mExpandedParams);
-        mTrackingView.setVisibility(View.GONE);
-
-        if ((mDisabled & StatusBarManager.DISABLE_NOTIFICATION_ICONS) == 0) {
-            setNotificationIconVisibility(true, com.android.internal.R.anim.fade_in);
-        }
-        setDateViewVisibility(false, com.android.internal.R.anim.fade_out);
-        
-        if (!mExpanded) {
-            return;
-        }
-        mExpanded = false;
-    }
-
-    void doAnimation() {
-        if (mAnimating) {
-            if (SPEW) Slog.d(TAG, "doAnimation");
-            if (SPEW) Slog.d(TAG, "doAnimation before mAnimY=" + mAnimY);
-            incrementAnim();
-            if (SPEW) Slog.d(TAG, "doAnimation after  mAnimY=" + mAnimY);
-            if (mAnimY >= mDisplay.getHeight()-1) {
-                if (SPEW) Slog.d(TAG, "Animation completed to expanded state.");
-                mAnimating = false;
-                updateExpandedViewPos(EXPANDED_FULL_OPEN);
-                performExpand();
-            }
-            else if (mAnimY < mStatusBarView.getHeight()) {
-                if (SPEW) Slog.d(TAG, "Animation completed to collapsed state.");
-                mAnimating = false;
-                updateExpandedViewPos(0);
-                performCollapse();
-            }
-            else {
-                updateExpandedViewPos((int)mAnimY);
-                mCurAnimationTime += ANIM_FRAME_DURATION;
-                mHandler.sendMessageAtTime(mHandler.obtainMessage(MSG_ANIMATE), mCurAnimationTime);
-            }
-        }
-    }
-
-    void stopTracking() {
-        mTracking = false;
-        mVelocityTracker.recycle();
-        mVelocityTracker = null;
-    }
-
-    void incrementAnim() {
-        long now = SystemClock.uptimeMillis();
-        float t = ((float)(now - mAnimLastTime)) / 1000;            // ms -> s
-        final float y = mAnimY;
-        final float v = mAnimVel;                                   // px/s
-        final float a = mAnimAccel;                                 // px/s/s
-        mAnimY = y + (v*t) + (0.5f*a*t*t);                          // px
-        mAnimVel = v + (a*t);                                       // px/s
-        mAnimLastTime = now;                                        // ms
-        //Slog.d(TAG, "y=" + y + " v=" + v + " a=" + a + " t=" + t + " mAnimY=" + mAnimY
-        //        + " mAnimAccel=" + mAnimAccel);
-    }
-
-    void doRevealAnimation() {
-        final int h = mCloseView.getHeight() + mStatusBarView.getHeight();
-        if (mAnimatingReveal && mAnimating && mAnimY < h) {
-            incrementAnim();
-            if (mAnimY >= h) {
-                mAnimY = h;
-                updateExpandedViewPos((int)mAnimY);
-            } else {
-                updateExpandedViewPos((int)mAnimY);
-                mCurAnimationTime += ANIM_FRAME_DURATION;
-                mHandler.sendMessageAtTime(mHandler.obtainMessage(MSG_ANIMATE_REVEAL),
-                        mCurAnimationTime);
-            }
-        }
-    }
-    
-    void prepareTracking(int y, boolean opening) {
-        mTracking = true;
-        mVelocityTracker = VelocityTracker.obtain();
-        if (opening) {
-            mAnimAccel = 2000.0f;
-            mAnimVel = 200;
-            mAnimY = mStatusBarView.getHeight();
-            updateExpandedViewPos((int)mAnimY);
-            mAnimating = true;
-            mAnimatingReveal = true;
-            mHandler.removeMessages(MSG_ANIMATE);
-            mHandler.removeMessages(MSG_ANIMATE_REVEAL);
-            long now = SystemClock.uptimeMillis();
-            mAnimLastTime = now;
-            mCurAnimationTime = now + ANIM_FRAME_DURATION;
-            mAnimating = true;
-            mHandler.sendMessageAtTime(mHandler.obtainMessage(MSG_ANIMATE_REVEAL),
-                    mCurAnimationTime);
-            makeExpandedVisible();
-        } else {
-            // it's open, close it?
-            if (mAnimating) {
-                mAnimating = false;
-                mHandler.removeMessages(MSG_ANIMATE);
-            }
-            updateExpandedViewPos(y + mViewDelta);
-        }
-    }
-    
-    void performFling(int y, float vel, boolean always) {
-        mAnimatingReveal = false;
-        mDisplayHeight = mDisplay.getHeight();
-
-        mAnimY = y;
-        mAnimVel = vel;
-
-        //Slog.d(TAG, "starting with mAnimY=" + mAnimY + " mAnimVel=" + mAnimVel);
-
-        if (mExpanded) {
-            if (!always && (
-                    vel > 200.0f
-                    || (y > (mDisplayHeight-25) && vel > -200.0f))) {
-                // We are expanded, but they didn't move sufficiently to cause
-                // us to retract.  Animate back to the expanded position.
-                mAnimAccel = 2000.0f;
-                if (vel < 0) {
-                    mAnimVel = 0;
-                }
-            }
-            else {
-                // We are expanded and are now going to animate away.
-                mAnimAccel = -2000.0f;
-                if (vel > 0) {
-                    mAnimVel = 0;
-                }
-            }
-        } else {
-            if (always || (
-                    vel > 200.0f
-                    || (y > (mDisplayHeight/2) && vel > -200.0f))) {
-                // We are collapsed, and they moved enough to allow us to
-                // expand.  Animate in the notifications.
-                mAnimAccel = 2000.0f;
-                if (vel < 0) {
-                    mAnimVel = 0;
-                }
-            }
-            else {
-                // We are collapsed, but they didn't move sufficiently to cause
-                // us to retract.  Animate back to the collapsed position.
-                mAnimAccel = -2000.0f;
-                if (vel > 0) {
-                    mAnimVel = 0;
-                }
-            }
-        }
-        //Slog.d(TAG, "mAnimY=" + mAnimY + " mAnimVel=" + mAnimVel
-        //        + " mAnimAccel=" + mAnimAccel);
-
-        long now = SystemClock.uptimeMillis();
-        mAnimLastTime = now;
-        mCurAnimationTime = now + ANIM_FRAME_DURATION;
-        mAnimating = true;
-        mHandler.removeMessages(MSG_ANIMATE);
-        mHandler.removeMessages(MSG_ANIMATE_REVEAL);
-        mHandler.sendMessageAtTime(mHandler.obtainMessage(MSG_ANIMATE), mCurAnimationTime);
-        stopTracking();
-    }
-    
-    boolean interceptTouchEvent(MotionEvent event) {
-        if (SPEW) {
-            Slog.d(TAG, "Touch: rawY=" + event.getRawY() + " event=" + event + " mDisabled="
-                + mDisabled);
-        }
-
-        if ((mDisabled & StatusBarManager.DISABLE_EXPAND) != 0) {
-            return false;
-        }
-        
-        final int statusBarSize = mStatusBarView.getHeight();
-        final int hitSize = statusBarSize*2;
-        if (event.getAction() == MotionEvent.ACTION_DOWN) {
-            final int y = (int)event.getRawY();
-
-            if (!mExpanded) {
-                mViewDelta = statusBarSize - y;
-            } else {
-                mTrackingView.getLocationOnScreen(mAbsPos);
-                mViewDelta = mAbsPos[1] + mTrackingView.getHeight() - y;
-            }
-            if ((!mExpanded && y < hitSize) ||
-                    (mExpanded && y > (mDisplay.getHeight()-hitSize))) {
-
-                // We drop events at the edge of the screen to make the windowshade come
-                // down by accident less, especially when pushing open a device with a keyboard
-                // that rotates (like g1 and droid)
-                int x = (int)event.getRawX();
-                final int edgeBorder = mEdgeBorder;
-                if (x >= edgeBorder && x < mDisplay.getWidth() - edgeBorder) {
-                    prepareTracking(y, !mExpanded);// opening if we're not already fully visible
-                    mVelocityTracker.addMovement(event);
-                }
-            }
-        } else if (mTracking) {
-            mVelocityTracker.addMovement(event);
-            final int minY = statusBarSize + mCloseView.getHeight();
-            if (event.getAction() == MotionEvent.ACTION_MOVE) {
-                int y = (int)event.getRawY();
-                if (mAnimatingReveal && y < minY) {
-                    // nothing
-                } else  {
-                    mAnimatingReveal = false;
-                    updateExpandedViewPos(y + mViewDelta);
-                }
-            } else if (event.getAction() == MotionEvent.ACTION_UP) {
-                mVelocityTracker.computeCurrentVelocity(1000);
-
-                float yVel = mVelocityTracker.getYVelocity();
-                boolean negative = yVel < 0;
-
-                float xVel = mVelocityTracker.getXVelocity();
-                if (xVel < 0) {
-                    xVel = -xVel;
-                }
-                if (xVel > 150.0f) {
-                    xVel = 150.0f; // limit how much we care about the x axis
-                }
-
-                float vel = (float)Math.hypot(yVel, xVel);
-                if (negative) {
-                    vel = -vel;
-                }
-                
-                performFling((int)event.getRawY(), vel, false);
-            }
-            
-        }
-        return false;
-    }
-
-    private class Launcher implements View.OnClickListener {
-        private PendingIntent mIntent;
-        private String mPkg;
-        private String mTag;
-        private int mId;
-
-        Launcher(PendingIntent intent, String pkg, String tag, int id) {
-            mIntent = intent;
-            mPkg = pkg;
-            mTag = tag;
-            mId = id;
-        }
-
-        public void onClick(View v) {
-            try {
-                // The intent we are sending is for the application, which
-                // won't have permission to immediately start an activity after
-                // the user switches to home.  We know it is safe to do at this
-                // point, so make sure new activity switches are now allowed.
-                ActivityManagerNative.getDefault().resumeAppSwitches();
-            } catch (RemoteException e) {
-            }
-            int[] pos = new int[2];
-            v.getLocationOnScreen(pos);
-            Intent overlay = new Intent();
-            overlay.setSourceBounds(
-                    new Rect(pos[0], pos[1], pos[0]+v.getWidth(), pos[1]+v.getHeight()));
-            try {
-                mIntent.send(mContext, 0, overlay);
-                mNotificationCallbacks.onNotificationClick(mPkg, mTag, mId);
-            } catch (PendingIntent.CanceledException e) {
-                // the stack trace isn't very helpful here.  Just log the exception message.
-                Slog.w(TAG, "Sending contentIntent failed: " + e);
-            }
-            deactivate();
-        }
-    }
-
-    private class MyTicker extends Ticker {
-        MyTicker(Context context, StatusBarView sb) {
-            super(context, sb);
-        }
-        
-        @Override
-        void tickerStarting() {
-            mTicking = true;
-            mIcons.setVisibility(View.GONE);
-            mTickerView.setVisibility(View.VISIBLE);
-            mTickerView.startAnimation(loadAnim(com.android.internal.R.anim.push_up_in, null));
-            mIcons.startAnimation(loadAnim(com.android.internal.R.anim.push_up_out, null));
-            if (mExpandedVisible) {
-                setDateViewVisibility(false, com.android.internal.R.anim.push_up_out);
-            }
-        }
-
-        @Override
-        void tickerDone() {
-            mIcons.setVisibility(View.VISIBLE);
-            mTickerView.setVisibility(View.GONE);
-            mIcons.startAnimation(loadAnim(com.android.internal.R.anim.push_down_in, null));
-            mTickerView.startAnimation(loadAnim(com.android.internal.R.anim.push_down_out,
-                        mTickingDoneListener));
-            if (mExpandedVisible) {
-                setDateViewVisibility(true, com.android.internal.R.anim.push_down_in);
-            }
-        }
-
-        void tickerHalting() {
-            mIcons.setVisibility(View.VISIBLE);
-            mTickerView.setVisibility(View.GONE);
-            mIcons.startAnimation(loadAnim(com.android.internal.R.anim.fade_in, null));
-            mTickerView.startAnimation(loadAnim(com.android.internal.R.anim.fade_out,
-                        mTickingDoneListener));
-            if (mExpandedVisible) {
-                setDateViewVisibility(true, com.android.internal.R.anim.fade_in);
-            }
-        }
-    }
-
-    Animation.AnimationListener mTickingDoneListener = new Animation.AnimationListener() {;
-        public void onAnimationEnd(Animation animation) {
-            mTicking = false;
-        }
-        public void onAnimationRepeat(Animation animation) {
-        }
-        public void onAnimationStart(Animation animation) {
-        }
-    };
-
-    private Animation loadAnim(int id, Animation.AnimationListener listener) {
-        Animation anim = AnimationUtils.loadAnimation(mContext, id);
-        if (listener != null) {
-            anim.setAnimationListener(listener);
-        }
-        return anim;
-    }
-
-    public String viewInfo(View v) {
-        return "(" + v.getLeft() + "," + v.getTop() + ")(" + v.getRight() + "," + v.getBottom()
-                + " " + v.getWidth() + "x" + v.getHeight() + ")";
-    }
-
-    protected void dump(FileDescriptor fd, PrintWriter pw, String[] args) {
-        if (mContext.checkCallingOrSelfPermission(android.Manifest.permission.DUMP)
-                != PackageManager.PERMISSION_GRANTED) {
-            pw.println("Permission Denial: can't dump StatusBar from from pid="
-                    + Binder.getCallingPid()
-                    + ", uid=" + Binder.getCallingUid());
-            return;
-        }
-        
-        synchronized (mQueueLock) {
-            pw.println("Current Status Bar state:");
-            pw.println("  mExpanded=" + mExpanded
-                    + ", mExpandedVisible=" + mExpandedVisible);
-            pw.println("  mTicking=" + mTicking);
-            pw.println("  mTracking=" + mTracking);
-            pw.println("  mAnimating=" + mAnimating
-                    + ", mAnimY=" + mAnimY + ", mAnimVel=" + mAnimVel
-                    + ", mAnimAccel=" + mAnimAccel);
-            pw.println("  mCurAnimationTime=" + mCurAnimationTime
-                    + " mAnimLastTime=" + mAnimLastTime);
-            pw.println("  mDisplayHeight=" + mDisplayHeight
-                    + " mAnimatingReveal=" + mAnimatingReveal
-                    + " mViewDelta=" + mViewDelta);
-            pw.println("  mDisplayHeight=" + mDisplayHeight);
-            final int N = mQueue.size();
-            pw.println("  mQueue.size=" + N);
-            for (int i=0; i<N; i++) {
-                PendingOp op = mQueue.get(i);
-                pw.println("    [" + i + "] key=" + op.key + " code=" + op.code + " visible="
-                        + op.visible);
-                pw.println("           iconData=" + op.iconData);
-                pw.println("           notificationData=" + op.notificationData);
-            }
-            pw.println("  mExpandedParams: " + mExpandedParams);
-            pw.println("  mExpandedView: " + viewInfo(mExpandedView));
-            pw.println("  mExpandedDialog: " + mExpandedDialog);
-            pw.println("  mTrackingParams: " + mTrackingParams);
-            pw.println("  mTrackingView: " + viewInfo(mTrackingView));
-            pw.println("  mOngoingTitle: " + viewInfo(mOngoingTitle));
-            pw.println("  mOngoingItems: " + viewInfo(mOngoingItems));
-            pw.println("  mLatestTitle: " + viewInfo(mLatestTitle));
-            pw.println("  mLatestItems: " + viewInfo(mLatestItems));
-            pw.println("  mNoNotificationsTitle: " + viewInfo(mNoNotificationsTitle));
-            pw.println("  mCloseView: " + viewInfo(mCloseView));
-            pw.println("  mTickerView: " + viewInfo(mTickerView));
-            pw.println("  mScrollView: " + viewInfo(mScrollView)
-                    + " scroll " + mScrollView.getScrollX() + "," + mScrollView.getScrollY());
-            pw.println("mNotificationLinearLayout: " + viewInfo(mNotificationLinearLayout));
-        }
-        synchronized (mIconMap) {
-            final int N = mIconMap.size();
-            pw.println("  mIconMap.size=" + N);
-            Set<IBinder> keys = mIconMap.keySet();
-            int i=0;
-            for (IBinder key: keys) {
-                StatusBarIcon icon = mIconMap.get(key);
-                pw.println("    [" + i + "] key=" + key);
-                pw.println("           data=" + icon.mData);
-                i++;
-            }
-        }
-        synchronized (mNotificationData) {
-            int N = mNotificationData.ongoingCount();
-            pw.println("  ongoingCount.size=" + N);
-            for (int i=0; i<N; i++) {
-                StatusBarNotification n = mNotificationData.getOngoing(i);
-                pw.println("    [" + i + "] key=" + n.key + " view=" + n.view);
-                pw.println("           data=" + n.data);
-            }
-            N = mNotificationData.latestCount();
-            pw.println("  ongoingCount.size=" + N);
-            for (int i=0; i<N; i++) {
-                StatusBarNotification n = mNotificationData.getLatest(i);
-                pw.println("    [" + i + "] key=" + n.key + " view=" + n.view);
-                pw.println("           data=" + n.data);
-            }
-        }
-        synchronized (mDisableRecords) {
-            final int N = mDisableRecords.size();
-            pw.println("  mDisableRecords.size=" + N
-                    + " mDisabled=0x" + Integer.toHexString(mDisabled));
-            for (int i=0; i<N; i++) {
-                DisableRecord tok = mDisableRecords.get(i);
-                pw.println("    [" + i + "] what=0x" + Integer.toHexString(tok.what)
-                                + " pkg=" + tok.pkg + " token=" + tok.token);
-            }
-        }
-        
-        if (false) {
-            pw.println("see the logcat for a dump of the views we have created.");
-            // must happen on ui thread
-            mHandler.post(new Runnable() {
-                    public void run() {
-                        mStatusBarView.getLocationOnScreen(mAbsPos);
-                        Slog.d(TAG, "mStatusBarView: ----- (" + mAbsPos[0] + "," + mAbsPos[1]
-                                + ") " + mStatusBarView.getWidth() + "x"
-                                + mStatusBarView.getHeight());
-                        mStatusBarView.debug();
-
-                        mExpandedView.getLocationOnScreen(mAbsPos);
-                        Slog.d(TAG, "mExpandedView: ----- (" + mAbsPos[0] + "," + mAbsPos[1]
-                                + ") " + mExpandedView.getWidth() + "x"
-                                + mExpandedView.getHeight());
-                        mExpandedView.debug();
-
-                        mTrackingView.getLocationOnScreen(mAbsPos);
-                        Slog.d(TAG, "mTrackingView: ----- (" + mAbsPos[0] + "," + mAbsPos[1]
-                                + ") " + mTrackingView.getWidth() + "x"
-                                + mTrackingView.getHeight());
-                        mTrackingView.debug();
-                    }
-                });
-        }
-    }
-
-    void onBarViewAttached() {
-        WindowManager.LayoutParams lp;
-        int pixelFormat;
-        Drawable bg;
-
-        /// ---------- Tracking View --------------
-        pixelFormat = PixelFormat.RGBX_8888;
-        bg = mTrackingView.getBackground();
-        if (bg != null) {
-            pixelFormat = bg.getOpacity();
-        }
-
-        lp = new WindowManager.LayoutParams(
-                ViewGroup.LayoutParams.MATCH_PARENT,
-                ViewGroup.LayoutParams.MATCH_PARENT,
-                WindowManager.LayoutParams.TYPE_STATUS_BAR_PANEL,
-                WindowManager.LayoutParams.FLAG_LAYOUT_IN_SCREEN
-                | WindowManager.LayoutParams.FLAG_LAYOUT_NO_LIMITS
-                | WindowManager.LayoutParams.FLAG_ALT_FOCUSABLE_IM,
-                pixelFormat);
-//        lp.token = mStatusBarView.getWindowToken();
-        lp.gravity = Gravity.TOP | Gravity.FILL_HORIZONTAL;
-        lp.setTitle("TrackingView");
-        lp.y = mTrackingPosition;
-        mTrackingParams = lp;
-
-        WindowManagerImpl.getDefault().addView(mTrackingView, lp);
-    }
-
-    void onTrackingViewAttached() {
-        WindowManager.LayoutParams lp;
-        int pixelFormat;
-        Drawable bg;
-
-        /// ---------- Expanded View --------------
-        pixelFormat = PixelFormat.TRANSLUCENT;
-
-        final int disph = mDisplay.getHeight();
-        lp = mExpandedDialog.getWindow().getAttributes();
-        lp.width = ViewGroup.LayoutParams.MATCH_PARENT;
-        lp.height = getExpandedHeight();
-        lp.x = 0;
-        mTrackingPosition = lp.y = -disph; // sufficiently large negative
-        lp.type = WindowManager.LayoutParams.TYPE_STATUS_BAR_PANEL;
-        lp.flags = WindowManager.LayoutParams.FLAG_LAYOUT_IN_SCREEN
-                | WindowManager.LayoutParams.FLAG_LAYOUT_NO_LIMITS
-                | WindowManager.LayoutParams.FLAG_NOT_TOUCH_MODAL
-                | WindowManager.LayoutParams.FLAG_DITHER
-                | WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE;
-        lp.format = pixelFormat;
-        lp.gravity = Gravity.TOP | Gravity.FILL_HORIZONTAL;
-        lp.setTitle("StatusBarExpanded");
-        mExpandedDialog.getWindow().setAttributes(lp);
-        mExpandedDialog.getWindow().setFormat(pixelFormat);
-        mExpandedParams = lp;
-
-        mExpandedDialog.getWindow().requestFeature(Window.FEATURE_NO_TITLE);
-        mExpandedDialog.setContentView(mExpandedView,
-                new ViewGroup.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT,
-                                           ViewGroup.LayoutParams.MATCH_PARENT));
-        mExpandedDialog.getWindow().setBackgroundDrawable(null);
-        mExpandedDialog.show();
-        FrameLayout hack = (FrameLayout)mExpandedView.getParent();
-    }
-
-    void setDateViewVisibility(boolean visible, int anim) {
-        mDateView.setUpdates(visible);
-        mDateView.setVisibility(visible ? View.VISIBLE : View.INVISIBLE);
-        mDateView.startAnimation(loadAnim(anim, null));
-    }
-
-    void setNotificationIconVisibility(boolean visible, int anim) {
-        int old = mNotificationIcons.getVisibility();
-        int v = visible ? View.VISIBLE : View.INVISIBLE;
-        if (old != v) {
-            mNotificationIcons.setVisibility(v);
-            mNotificationIcons.startAnimation(loadAnim(anim, null));
-        }
-    }
-
-    void updateExpandedViewPos(int expandedPosition) {
-        if (SPEW) {
-            Slog.d(TAG, "updateExpandedViewPos before expandedPosition=" + expandedPosition
-                    + " mTrackingParams.y=" + mTrackingParams.y
-                    + " mTrackingPosition=" + mTrackingPosition);
-        }
-
-        int h = mStatusBarView.getHeight();
-        int disph = mDisplay.getHeight();
-
-        // If the expanded view is not visible, make sure they're still off screen.
-        // Maybe the view was resized.
-        if (!mExpandedVisible) {
-            if (mTrackingView != null) {
-                mTrackingPosition = -disph;
-                if (mTrackingParams != null) {
-                    mTrackingParams.y = mTrackingPosition;
-                    WindowManagerImpl.getDefault().updateViewLayout(mTrackingView, mTrackingParams);
-                }
-            }
-            if (mExpandedParams != null) {
-                mExpandedParams.y = -disph;
-                mExpandedDialog.getWindow().setAttributes(mExpandedParams);
-            }
-            return;
-        }
-
-        // tracking view...
-        int pos;
-        if (expandedPosition == EXPANDED_FULL_OPEN) {
-            pos = h;
-        }
-        else if (expandedPosition == EXPANDED_LEAVE_ALONE) {
-            pos = mTrackingPosition;
-        }
-        else {
-            if (expandedPosition <= disph) {
-                pos = expandedPosition;
-            } else {
-                pos = disph;
-            }
-            pos -= disph-h;
-        }
-        mTrackingPosition = mTrackingParams.y = pos;
-        mTrackingParams.height = disph-h;
-        WindowManagerImpl.getDefault().updateViewLayout(mTrackingView, mTrackingParams);
-
-        if (mExpandedParams != null) {
-            mCloseView.getLocationInWindow(mPositionTmp);
-            final int closePos = mPositionTmp[1];
-
-            mExpandedContents.getLocationInWindow(mPositionTmp);
-            final int contentsBottom = mPositionTmp[1] + mExpandedContents.getHeight();
-
-            mExpandedParams.y = pos + mTrackingView.getHeight()
-                    - (mTrackingParams.height-closePos) - contentsBottom;
-            int max = h;
-            if (mExpandedParams.y > max) {
-                mExpandedParams.y = max;
-            }
-            int min = mTrackingPosition;
-            if (mExpandedParams.y < min) {
-                mExpandedParams.y = min;
-            }
-
-            boolean visible = (mTrackingPosition + mTrackingView.getHeight()) > h;
-            if (!visible) {
-                // if the contents aren't visible, move the expanded view way off screen
-                // because the window itself extends below the content view.
-                mExpandedParams.y = -disph;
-            }
-            panelSlightlyVisible(visible);
-            mExpandedDialog.getWindow().setAttributes(mExpandedParams);
-        }
-
-        if (SPEW) {
-            Slog.d(TAG, "updateExpandedViewPos after  expandedPosition=" + expandedPosition
-                    + " mTrackingParams.y=" + mTrackingParams.y
-                    + " mTrackingPosition=" + mTrackingPosition
-                    + " mExpandedParams.y=" + mExpandedParams.y
-                    + " mExpandedParams.height=" + mExpandedParams.height);
-        }
-    }
-
-    int getExpandedHeight() {
-        return mDisplay.getHeight() - mStatusBarView.getHeight() - mCloseView.getHeight();
-    }
-
-    void updateExpandedHeight() {
-        if (mExpandedView != null) {
-            mExpandedParams.height = getExpandedHeight();
-            mExpandedDialog.getWindow().setAttributes(mExpandedParams);
-        }
-    }
-
-    /**
-     * The LEDs are turned o)ff when the notification panel is shown, even just a little bit.
-     * This was added last-minute and is inconsistent with the way the rest of the notifications
-     * are handled, because the notification isn't really cancelled.  The lights are just
-     * turned off.  If any other notifications happen, the lights will turn back on.  Steve says
-     * this is what he wants. (see bug 1131461)
-     */
-    private boolean mPanelSlightlyVisible;
-    void panelSlightlyVisible(boolean visible) {
-        if (mPanelSlightlyVisible != visible) {
-            mPanelSlightlyVisible = visible;
-            if (visible) {
-                // tell the notification manager to turn off the lights.
-                mNotificationCallbacks.onPanelRevealed();
-            }
-        }
-    }
-
-    void performDisableActions(int net) {
-        int old = mDisabled;
-        int diff = net ^ old;
-        mDisabled = net;
-
-        // act accordingly
-        if ((diff & StatusBarManager.DISABLE_EXPAND) != 0) {
-            if ((net & StatusBarManager.DISABLE_EXPAND) != 0) {
-                Slog.d(TAG, "DISABLE_EXPAND: yes");
-                animateCollapse();
-            }
-        }
-        if ((diff & StatusBarManager.DISABLE_NOTIFICATION_ICONS) != 0) {
-            if ((net & StatusBarManager.DISABLE_NOTIFICATION_ICONS) != 0) {
-                Slog.d(TAG, "DISABLE_NOTIFICATION_ICONS: yes");
-                if (mTicking) {
-                    mNotificationIcons.setVisibility(View.INVISIBLE);
-                    mTicker.halt();
-                } else {
-                    setNotificationIconVisibility(false, com.android.internal.R.anim.fade_out);
-                }
-            } else {
-                Slog.d(TAG, "DISABLE_NOTIFICATION_ICONS: no");
-                if (!mExpandedVisible) {
-                    setNotificationIconVisibility(true, com.android.internal.R.anim.fade_in);
-                }
-            }
-        } else if ((diff & StatusBarManager.DISABLE_NOTIFICATION_TICKER) != 0) {
-            if (mTicking && (net & StatusBarManager.DISABLE_NOTIFICATION_TICKER) != 0) {
-                mTicker.halt();
-            }
-        }
-    }
-
-    private View.OnClickListener mClearButtonListener = new View.OnClickListener() {
-        public void onClick(View v) {
-            mNotificationCallbacks.onClearAll();
-            addPendingOp(OP_EXPAND, null, false);
-        }
-    };
-
-    private BroadcastReceiver mBroadcastReceiver = new BroadcastReceiver() {
-        public void onReceive(Context context, Intent intent) {
-            String action = intent.getAction();
-            if (Intent.ACTION_CLOSE_SYSTEM_DIALOGS.equals(action)
-                    || Intent.ACTION_SCREEN_OFF.equals(action)) {
-                deactivate();
-            }
-            else if (Telephony.Intents.SPN_STRINGS_UPDATED_ACTION.equals(action)) {
-                updateNetworkName(intent.getBooleanExtra(Telephony.Intents.EXTRA_SHOW_SPN, false),
-                        intent.getStringExtra(Telephony.Intents.EXTRA_SPN),
-                        intent.getBooleanExtra(Telephony.Intents.EXTRA_SHOW_PLMN, false),
-                        intent.getStringExtra(Telephony.Intents.EXTRA_PLMN));
-            }
-            else if (Intent.ACTION_CONFIGURATION_CHANGED.equals(action)) {
-                updateResources();
-            }
-        }
-    };
-
-    void updateNetworkName(boolean showSpn, String spn, boolean showPlmn, String plmn) {
-        if (false) {
-            Slog.d(TAG, "updateNetworkName showSpn=" + showSpn + " spn=" + spn
-                    + " showPlmn=" + showPlmn + " plmn=" + plmn);
-        }
-        boolean something = false;
-        if (showPlmn) {
-            mPlmnLabel.setVisibility(View.VISIBLE);
-            if (plmn != null) {
-                mPlmnLabel.setText(plmn);
-            } else {
-                mPlmnLabel.setText(R.string.lockscreen_carrier_default);
-            }
-        } else {
-            mPlmnLabel.setText("");
-            mPlmnLabel.setVisibility(View.GONE);
-        }
-        if (showSpn && spn != null) {
-            mSpnLabel.setText(spn);
-            mSpnLabel.setVisibility(View.VISIBLE);
-            something = true;
-        } else {
-            mSpnLabel.setText("");
-            mSpnLabel.setVisibility(View.GONE);
-        }
-    }
-
-    /**
-     * Reload some of our resources when the configuration changes.
-     * 
-     * We don't reload everything when the configuration changes -- we probably
-     * should, but getting that smooth is tough.  Someday we'll fix that.  In the
-     * meantime, just update the things that we know change.
-     */
-    void updateResources() {
-        Resources res = mContext.getResources();
-
-        mClearButton.setText(mContext.getText(R.string.status_bar_clear_all_button));
-        mOngoingTitle.setText(mContext.getText(R.string.status_bar_ongoing_events_title));
-        mLatestTitle.setText(mContext.getText(R.string.status_bar_latest_events_title));
-        mNoNotificationsTitle.setText(mContext.getText(R.string.status_bar_no_notifications_title));
-
-        mEdgeBorder = res.getDimensionPixelSize(R.dimen.status_bar_edge_ignore);
-
-        if (false) Slog.v(TAG, "updateResources");
-    }
-
-    //
-    // tracing
-    //
-
-    void postStartTracing() {
-        mHandler.postDelayed(mStartTracing, 3000);
-    }
-
-    void vibrate() {
-        android.os.Vibrator vib = (android.os.Vibrator)mContext.getSystemService(
-                Context.VIBRATOR_SERVICE);
-        vib.vibrate(250);
-    }
-
-    Runnable mStartTracing = new Runnable() {
-        public void run() {
-            vibrate();
-            SystemClock.sleep(250);
-            Slog.d(TAG, "startTracing");
-            android.os.Debug.startMethodTracing("/data/statusbar-traces/trace");
-            mHandler.postDelayed(mStopTracing, 10000);
-        }
-    };
-
-    Runnable mStopTracing = new Runnable() {
-        public void run() {
-            android.os.Debug.stopMethodTracing();
-            Slog.d(TAG, "stopTracing");
-            vibrate();
-        }
-    };
-    
-    class UninstallReceiver extends BroadcastReceiver {
-        public UninstallReceiver() {
-            IntentFilter filter = new IntentFilter();
-            filter.addAction(Intent.ACTION_PACKAGE_REMOVED);
-            filter.addAction(Intent.ACTION_PACKAGE_RESTARTED);
-            filter.addDataScheme("package");
-            mContext.registerReceiver(this, filter);
-            IntentFilter sdFilter = new IntentFilter(Intent.ACTION_EXTERNAL_APPLICATIONS_UNAVAILABLE);
-            mContext.registerReceiver(this, sdFilter);
-        }
-        
-        @Override
-        public void onReceive(Context context, Intent intent) {
-            String pkgList[] = null;
-            if (Intent.ACTION_EXTERNAL_APPLICATIONS_UNAVAILABLE.equals(intent.getAction())) {
-                pkgList = intent.getStringArrayExtra(Intent.EXTRA_CHANGED_PACKAGE_LIST);
-            } else {
-                Uri data = intent.getData();
-                if (data != null) {
-                    String pkg = data.getSchemeSpecificPart();
-                    if (pkg != null) {
-                        pkgList = new String[]{pkg};
-                    }
-                }
-            }
-            ArrayList<StatusBarNotification> list = null;
-            if (pkgList != null) {
-                synchronized (StatusBarService.this) {
-                    for (String pkg : pkgList) {
-                        list = mNotificationData.notificationsForPackage(pkg);
-                    }
-                }
-            }
-            
-            if (list != null) {
-                final int N = list.size();
-                for (int i=0; i<N; i++) {
-                    removeIcon(list.get(i).key);
-                }
-            }
-        }
-    }
-}
diff --git a/services/java/com/android/server/status/StatusBarView.java b/services/java/com/android/server/status/StatusBarView.java
deleted file mode 100644
index 5e1f572..0000000
--- a/services/java/com/android/server/status/StatusBarView.java
+++ /dev/null
@@ -1,192 +0,0 @@
-/*
- * Copyright (C) 2008 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.android.server.status;
-
-import android.content.Context;
-import android.content.res.Configuration;
-import android.graphics.Canvas;
-import android.os.SystemClock;
-import android.util.AttributeSet;
-import android.view.MotionEvent;
-import android.view.View;
-import android.view.ViewGroup;
-import android.view.ViewParent;
-import android.widget.FrameLayout;
-
-import com.android.internal.R;
-
-public class StatusBarView extends FrameLayout {
-    private static final String TAG = "StatusBarView";
-
-    static final int DIM_ANIM_TIME = 400;
-    
-    StatusBarService mService;
-    boolean mTracking;
-    int mStartX, mStartY;
-    ViewGroup mNotificationIcons;
-    ViewGroup mStatusIcons;
-    View mDate;
-    FixedSizeDrawable mBackground;
-    
-    boolean mNightMode = false;
-    int mStartAlpha = 0, mEndAlpha = 0;
-    long mEndTime = 0;
-
-    public StatusBarView(Context context, AttributeSet attrs) {
-        super(context, attrs);
-    }
-
-    @Override
-    protected void onFinishInflate() {
-        super.onFinishInflate();
-        mNotificationIcons = (ViewGroup)findViewById(R.id.notificationIcons);
-        mStatusIcons = (ViewGroup)findViewById(R.id.statusIcons);
-        mDate = findViewById(R.id.date);
-
-        mBackground = new FixedSizeDrawable(mDate.getBackground());
-        mBackground.setFixedBounds(0, 0, 0, 0);
-        mDate.setBackgroundDrawable(mBackground);
-    }
-
-    @Override
-    protected void onAttachedToWindow() {
-        super.onAttachedToWindow();
-        mService.onBarViewAttached();
-    }
-    
-    @Override
-    protected void onConfigurationChanged(Configuration newConfig) {
-        super.onConfigurationChanged(newConfig);
-        boolean nightMode = (newConfig.uiMode & Configuration.UI_MODE_NIGHT_MASK)
-                == Configuration.UI_MODE_NIGHT_YES;
-        if (mNightMode != nightMode) {
-            mNightMode = nightMode;
-            mStartAlpha = getCurAlpha();
-            mEndAlpha = mNightMode ? 0x80 : 0x00;
-            mEndTime = SystemClock.uptimeMillis() + DIM_ANIM_TIME;
-            invalidate();
-        }
-    }
-
-    int getCurAlpha() {
-        long time = SystemClock.uptimeMillis();
-        if (time > mEndTime) {
-            return mEndAlpha;
-        }
-        return mEndAlpha
-                - (int)(((mEndAlpha-mStartAlpha) * (mEndTime-time) / DIM_ANIM_TIME));
-    }
-    
-    @Override
-    protected void onSizeChanged(int w, int h, int oldw, int oldh) {
-        super.onSizeChanged(w, h, oldw, oldh);
-        mService.updateExpandedViewPos(StatusBarService.EXPANDED_LEAVE_ALONE);
-    }
-
-    @Override
-    protected void onLayout(boolean changed, int l, int t, int r, int b) {
-        super.onLayout(changed, l, t, r, b);
-
-        // put the date date view quantized to the icons
-        int oldDateRight = mDate.getRight();
-        int newDateRight;
-
-        newDateRight = getDateSize(mNotificationIcons, oldDateRight,
-                getViewOffset(mNotificationIcons));
-        if (newDateRight < 0) {
-            int offset = getViewOffset(mStatusIcons);
-            if (oldDateRight < offset) {
-                newDateRight = oldDateRight;
-            } else {
-                newDateRight = getDateSize(mStatusIcons, oldDateRight, offset);
-                if (newDateRight < 0) {
-                    newDateRight = r;
-                }
-            }
-        }
-        int max = r - getPaddingRight();
-        if (newDateRight > max) {
-            newDateRight = max;
-        }
-
-        mDate.layout(mDate.getLeft(), mDate.getTop(), newDateRight, mDate.getBottom());
-        mBackground.setFixedBounds(-mDate.getLeft(), -mDate.getTop(), (r-l), (b-t));
-    }
-
-    @Override
-    protected void dispatchDraw(Canvas canvas) {
-        super.dispatchDraw(canvas);
-        int alpha = getCurAlpha();
-        if (alpha != 0) {
-            canvas.drawARGB(alpha, 0, 0, 0);
-        }
-        if (alpha != mEndAlpha) {
-            invalidate();
-        }
-    }
-
-    /**
-     * Gets the left position of v in this view.  Throws if v is not
-     * a child of this.
-     */
-    private int getViewOffset(View v) {
-        int offset = 0;
-        while (v != this) {
-            offset += v.getLeft();
-            ViewParent p = v.getParent();
-            if (v instanceof View) {
-                v = (View)p;
-            } else {
-                throw new RuntimeException(v + " is not a child of " + this);
-            }
-        }
-        return offset;
-    }
-
-    private int getDateSize(ViewGroup g, int w, int offset) {
-        final int N = g.getChildCount();
-        for (int i=0; i<N; i++) {
-            View v = g.getChildAt(i);
-            int l = v.getLeft() + offset;
-            int r = v.getRight() + offset;
-            if (w >= l && w <= r) {
-                return r;
-            }
-        }
-        return -1;
-    }
-
-    /**
-     * Ensure that, if there is no target under us to receive the touch,
-     * that we process it ourself.  This makes sure that onInterceptTouchEvent()
-     * is always called for the entire gesture.
-     */
-    @Override
-    public boolean onTouchEvent(MotionEvent event) {
-        if (event.getAction() != MotionEvent.ACTION_DOWN) {
-            mService.interceptTouchEvent(event);
-        }
-        return true;
-    }
-
-    @Override
-    public boolean onInterceptTouchEvent(MotionEvent event) {
-        return mService.interceptTouchEvent(event)
-                ? true : super.onInterceptTouchEvent(event);
-    }
-}
-
diff --git a/services/java/com/android/server/status/StorageNotification.java b/services/java/com/android/server/status/StorageNotification.java
deleted file mode 100644
index 8da8cd3..0000000
--- a/services/java/com/android/server/status/StorageNotification.java
+++ /dev/null
@@ -1,395 +0,0 @@
-/*
- * Copyright (C) 2010 Google Inc.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.android.server.status;
-
-import android.app.Activity;
-import android.app.Notification;
-import android.app.NotificationManager;
-import android.app.PendingIntent;
-import android.content.BroadcastReceiver;
-import android.content.Context;
-import android.content.DialogInterface;
-import android.content.Intent;
-import android.content.IntentFilter;
-import android.content.pm.PackageManager;
-import android.content.res.Resources;
-import android.os.Bundle;
-import android.os.Environment;
-import android.os.Handler;
-import android.os.storage.IMountService;
-import android.os.Message;
-import android.os.ServiceManager;
-import android.os.storage.StorageEventListener;
-import android.os.storage.StorageManager;
-import android.os.storage.StorageResultCode;
-import android.provider.Settings;
-import android.util.Slog;
-import android.view.View;
-import android.widget.Button;
-import android.widget.ImageView;
-import android.widget.TextView;
-import android.widget.Toast;
-
-public class StorageNotification extends StorageEventListener {
-    private static final String TAG = "StorageNotification";
-
-    private static final boolean POP_UMS_ACTIVITY_ON_CONNECT = true;
-
-    /**
-     * Binder context for this service
-     */
-    private Context mContext;
-    
-    /**
-     * The notification that is shown when a USB mass storage host
-     * is connected. 
-     * <p>
-     * This is lazily created, so use {@link #setUsbStorageNotification()}.
-     */
-    private Notification mUsbStorageNotification;
-
-    /**
-     * The notification that is shown when the following media events occur:
-     *     - Media is being checked
-     *     - Media is blank (or unknown filesystem)
-     *     - Media is corrupt
-     *     - Media is safe to unmount
-     *     - Media is missing
-     * <p>
-     * This is lazily created, so use {@link #setMediaStorageNotification()}.
-     */
-    private Notification   mMediaStorageNotification;
-    private boolean        mUmsAvailable;
-    private StorageManager mStorageManager;
-
-    public StorageNotification(Context context) {
-        mContext = context;
-
-        mStorageManager = (StorageManager) context.getSystemService(Context.STORAGE_SERVICE);
-        mUmsAvailable = mStorageManager.isUsbMassStorageConnected();
-        Slog.d(TAG, String.format( "Startup with UMS connection %s (media state %s)", mUmsAvailable,
-                Environment.getExternalStorageState()));
-    }
-
-    /*
-     * @override com.android.os.storage.StorageEventListener
-     */
-    @Override
-    public void onUsbMassStorageConnectionChanged(boolean connected) {
-        mUmsAvailable = connected;
-        /*
-         * Even though we may have a UMS host connected, we the SD card
-         * may not be in a state for export.
-         */
-        String st = Environment.getExternalStorageState();
-
-        Slog.i(TAG, String.format("UMS connection changed to %s (media state %s)", connected, st));
-
-        if (connected && (st.equals(
-                Environment.MEDIA_REMOVED) || st.equals(Environment.MEDIA_CHECKING))) {
-            /*
-             * No card or card being checked = don't display
-             */
-            connected = false;
-        }
-        updateUsbMassStorageNotification(connected);
-    }
-
-    /*
-     * @override com.android.os.storage.StorageEventListener
-     */
-    @Override
-    public void onStorageStateChanged(String path, String oldState, String newState) {
-        Slog.i(TAG, String.format(
-                "Media {%s} state changed from {%s} -> {%s}", path, oldState, newState));
-        if (newState.equals(Environment.MEDIA_SHARED)) {
-            /*
-             * Storage is now shared. Modify the UMS notification
-             * for stopping UMS.
-             */
-            Intent intent = new Intent();
-            intent.setClass(mContext, com.android.server.status.UsbStorageActivity.class);
-            PendingIntent pi = PendingIntent.getActivity(mContext, 0, intent, 0);
-            setUsbStorageNotification(
-                    com.android.internal.R.string.usb_storage_stop_notification_title,
-                    com.android.internal.R.string.usb_storage_stop_notification_message,
-                    com.android.internal.R.drawable.stat_sys_warning, false, true, pi);
-        } else if (newState.equals(Environment.MEDIA_CHECKING)) {
-            /*
-             * Storage is now checking. Update media notification and disable
-             * UMS notification.
-             */
-            setMediaStorageNotification(
-                    com.android.internal.R.string.ext_media_checking_notification_title,
-                    com.android.internal.R.string.ext_media_checking_notification_message,
-                    com.android.internal.R.drawable.stat_notify_sdcard_prepare, true, false, null);
-            updateUsbMassStorageNotification(false);
-        } else if (newState.equals(Environment.MEDIA_MOUNTED)) {
-            /*
-             * Storage is now mounted. Dismiss any media notifications,
-             * and enable UMS notification if connected.
-             */
-            setMediaStorageNotification(0, 0, 0, false, false, null);
-            updateUsbMassStorageNotification(mUmsAvailable);
-        } else if (newState.equals(Environment.MEDIA_UNMOUNTED)) {
-            /*
-             * Storage is now unmounted. We may have been unmounted
-             * because the user is enabling/disabling UMS, in which case we don't
-             * want to display the 'safe to unmount' notification.
-             */
-            if (!mStorageManager.isUsbMassStorageEnabled()) {
-                if (oldState.equals(Environment.MEDIA_SHARED)) {
-                    /*
-                     * The unmount was due to UMS being enabled. Dismiss any
-                     * media notifications, and enable UMS notification if connected
-                     */
-                    setMediaStorageNotification(0, 0, 0, false, false, null);
-                    updateUsbMassStorageNotification(mUmsAvailable);
-                } else {
-                    /*
-                     * Show safe to unmount media notification, and enable UMS
-                     * notification if connected.
-                     */
-                    setMediaStorageNotification(
-                            com.android.internal.R.string.ext_media_safe_unmount_notification_title,
-                            com.android.internal.R.string.ext_media_safe_unmount_notification_message,
-                            com.android.internal.R.drawable.stat_notify_sdcard, true, true, null);
-                    updateUsbMassStorageNotification(mUmsAvailable);
-                }
-            } else {
-                /*
-                 * The unmount was due to UMS being enabled. Dismiss any
-                 * media notifications, and disable the UMS notification
-                 */
-                setMediaStorageNotification(0, 0, 0, false, false, null);
-                updateUsbMassStorageNotification(false);
-            }
-        } else if (newState.equals(Environment.MEDIA_NOFS)) {
-            /*
-             * Storage has no filesystem. Show blank media notification,
-             * and enable UMS notification if connected.
-             */
-            Intent intent = new Intent();
-            intent.setClass(mContext, com.android.internal.app.ExternalMediaFormatActivity.class);
-            PendingIntent pi = PendingIntent.getActivity(mContext, 0, intent, 0);
-
-            setMediaStorageNotification(
-                    com.android.internal.R.string.ext_media_nofs_notification_title,
-                    com.android.internal.R.string.ext_media_nofs_notification_message,
-                    com.android.internal.R.drawable.stat_notify_sdcard_usb, true, false, pi);
-            updateUsbMassStorageNotification(mUmsAvailable);
-        } else if (newState.equals(Environment.MEDIA_UNMOUNTABLE)) {
-            /*
-             * Storage is corrupt. Show corrupt media notification,
-             * and enable UMS notification if connected.
-             */
-            Intent intent = new Intent();
-            intent.setClass(mContext, com.android.internal.app.ExternalMediaFormatActivity.class);
-            PendingIntent pi = PendingIntent.getActivity(mContext, 0, intent, 0);
-
-            setMediaStorageNotification(
-                    com.android.internal.R.string.ext_media_unmountable_notification_title,
-                    com.android.internal.R.string.ext_media_unmountable_notification_message,
-                    com.android.internal.R.drawable.stat_notify_sdcard_usb, true, false, pi); 
-            updateUsbMassStorageNotification(mUmsAvailable);
-        } else if (newState.equals(Environment.MEDIA_REMOVED)) {
-            /*
-             * Storage has been removed. Show nomedia media notification,
-             * and disable UMS notification regardless of connection state.
-             */
-            setMediaStorageNotification(
-                    com.android.internal.R.string.ext_media_nomedia_notification_title,
-                    com.android.internal.R.string.ext_media_nomedia_notification_message,
-                    com.android.internal.R.drawable.stat_notify_sdcard_usb,
-                    true, false, null);
-            updateUsbMassStorageNotification(false);
-        } else if (newState.equals(Environment.MEDIA_BAD_REMOVAL)) {
-            /*
-             * Storage has been removed unsafely. Show bad removal media notification,
-             * and disable UMS notification regardless of connection state.
-             */
-            setMediaStorageNotification(
-                    com.android.internal.R.string.ext_media_badremoval_notification_title,
-                    com.android.internal.R.string.ext_media_badremoval_notification_message,
-                    com.android.internal.R.drawable.stat_sys_warning,
-                    true, true, null);
-            updateUsbMassStorageNotification(false);
-        } else {
-            Slog.w(TAG, String.format("Ignoring unknown state {%s}", newState));
-        }
-    }
-
-    /**
-     * Update the state of the USB mass storage notification
-     */
-    void updateUsbMassStorageNotification(boolean available) {
-
-        if (available) {
-            Intent intent = new Intent();
-            intent.setClass(mContext, com.android.server.status.UsbStorageActivity.class);
-            intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
-
-            final boolean adbOn = 1 == Settings.Secure.getInt(
-                mContext.getContentResolver(),
-                Settings.Secure.ADB_ENABLED,
-                0);
-
-            PendingIntent pi = PendingIntent.getActivity(mContext, 0, intent, 0);
-            setUsbStorageNotification(
-                    com.android.internal.R.string.usb_storage_notification_title,
-                    com.android.internal.R.string.usb_storage_notification_message,
-                    com.android.internal.R.drawable.stat_sys_data_usb,
-                    false, true, pi);
-
-            if (POP_UMS_ACTIVITY_ON_CONNECT && !adbOn) {
-                // We assume that developers don't want to enable UMS every
-                // time they attach a device to a USB host. The average user,
-                // however, is looking to charge the phone (in which case this
-                // is harmless) or transfer files (in which case this coaches
-                // the user about how to complete that task and saves several
-                // steps).
-                mContext.startActivity(intent);
-            }
-        } else {
-            setUsbStorageNotification(0, 0, 0, false, false, null);
-        }
-    }
-
-    /**
-     * Sets the USB storage notification.
-     */
-    private synchronized void setUsbStorageNotification(int titleId, int messageId, int icon,
-            boolean sound, boolean visible, PendingIntent pi) {
-
-        if (!visible && mUsbStorageNotification == null) {
-            return;
-        }
-
-        NotificationManager notificationManager = (NotificationManager) mContext
-                .getSystemService(Context.NOTIFICATION_SERVICE);
-
-        if (notificationManager == null) {
-            return;
-        }
-        
-        if (visible) {
-            Resources r = Resources.getSystem();
-            CharSequence title = r.getText(titleId);
-            CharSequence message = r.getText(messageId);
-
-            if (mUsbStorageNotification == null) {
-                mUsbStorageNotification = new Notification();
-                mUsbStorageNotification.icon = icon;
-                mUsbStorageNotification.when = 0;
-            }
-
-            if (sound) {
-                mUsbStorageNotification.defaults |= Notification.DEFAULT_SOUND;
-            } else {
-                mUsbStorageNotification.defaults &= ~Notification.DEFAULT_SOUND;
-            }
-                
-            mUsbStorageNotification.flags = Notification.FLAG_ONGOING_EVENT;
-
-            mUsbStorageNotification.tickerText = title;
-            if (pi == null) {
-                Intent intent = new Intent();
-                pi = PendingIntent.getBroadcast(mContext, 0, intent, 0);
-            }
-
-            mUsbStorageNotification.setLatestEventInfo(mContext, title, message, pi);
-        }
-    
-        final int notificationId = mUsbStorageNotification.icon;
-        if (visible) {
-            notificationManager.notify(notificationId, mUsbStorageNotification);
-        } else {
-            notificationManager.cancel(notificationId);
-        }
-    }
-
-    private synchronized boolean getMediaStorageNotificationDismissable() {
-        if ((mMediaStorageNotification != null) &&
-            ((mMediaStorageNotification.flags & Notification.FLAG_AUTO_CANCEL) ==
-                    Notification.FLAG_AUTO_CANCEL))
-            return true;
-
-        return false;
-    }
-
-    /**
-     * Sets the media storage notification.
-     */
-    private synchronized void setMediaStorageNotification(int titleId, int messageId, int icon, boolean visible,
-                                                          boolean dismissable, PendingIntent pi) {
-
-        if (!visible && mMediaStorageNotification == null) {
-            return;
-        }
-
-        NotificationManager notificationManager = (NotificationManager) mContext
-                .getSystemService(Context.NOTIFICATION_SERVICE);
-
-        if (notificationManager == null) {
-            return;
-        }
-
-        if (mMediaStorageNotification != null && visible) {
-            /*
-             * Dismiss the previous notification - we're about to
-             * re-use it.
-             */
-            final int notificationId = mMediaStorageNotification.icon;
-            notificationManager.cancel(notificationId);
-        }
-        
-        if (visible) {
-            Resources r = Resources.getSystem();
-            CharSequence title = r.getText(titleId);
-            CharSequence message = r.getText(messageId);
-
-            if (mMediaStorageNotification == null) {
-                mMediaStorageNotification = new Notification();
-                mMediaStorageNotification.when = 0;
-            }
-
-            mMediaStorageNotification.defaults &= ~Notification.DEFAULT_SOUND;
-
-            if (dismissable) {
-                mMediaStorageNotification.flags = Notification.FLAG_AUTO_CANCEL;
-            } else {
-                mMediaStorageNotification.flags = Notification.FLAG_ONGOING_EVENT;
-            }
-
-            mMediaStorageNotification.tickerText = title;
-            if (pi == null) {
-                Intent intent = new Intent();
-                pi = PendingIntent.getBroadcast(mContext, 0, intent, 0);
-            }
-
-            mMediaStorageNotification.icon = icon;
-            mMediaStorageNotification.setLatestEventInfo(mContext, title, message, pi);
-        }
-    
-        final int notificationId = mMediaStorageNotification.icon;
-        if (visible) {
-            notificationManager.notify(notificationId, mMediaStorageNotification);
-        } else {
-            notificationManager.cancel(notificationId);
-        }
-    }
-}
diff --git a/services/java/com/android/server/status/Ticker.java b/services/java/com/android/server/status/Ticker.java
deleted file mode 100644
index e47185b..0000000
--- a/services/java/com/android/server/status/Ticker.java
+++ /dev/null
@@ -1,246 +0,0 @@
-/*
- * Copyright (C) 2008 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.android.server.status;
-
-import com.android.internal.R;
-
-import android.content.Context;
-import android.graphics.drawable.Drawable;
-import android.os.Handler;
-import android.text.StaticLayout;
-import android.text.Layout.Alignment;
-import android.text.TextPaint;
-import android.text.TextUtils;
-import android.util.Slog;
-import android.view.View;
-import android.view.animation.Animation;
-import android.view.animation.AnimationUtils;
-import android.widget.TextSwitcher;
-import android.widget.TextView;
-import android.widget.ImageSwitcher;
-
-import java.util.ArrayList;
-
-
-abstract class Ticker {
-    private static final int TICKER_SEGMENT_DELAY = 3000;
-    
-    private final class Segment {
-        NotificationData notificationData;
-        Drawable icon;
-        CharSequence text;
-        int current;
-        int next;
-        boolean first;
-
-        StaticLayout getLayout(CharSequence substr) {
-            int w = mTextSwitcher.getWidth() - mTextSwitcher.getPaddingLeft()
-                    - mTextSwitcher.getPaddingRight();
-            return new StaticLayout(substr, mPaint, w, Alignment.ALIGN_NORMAL, 1, 0, true);
-        }
-
-        CharSequence rtrim(CharSequence substr, int start, int end) {
-            while (end > start && !TextUtils.isGraphic(substr.charAt(end-1))) {
-                end--;
-            }
-            if (end > start) {
-                return substr.subSequence(start, end);
-            }
-            return null;
-        }
-
-        /** returns null if there is no more text */
-        CharSequence getText() {
-            if (this.current > this.text.length()) {
-                return null;
-            }
-            CharSequence substr = this.text.subSequence(this.current, this.text.length());
-            StaticLayout l = getLayout(substr);
-            int lineCount = l.getLineCount();
-            if (lineCount > 0) {
-                int start = l.getLineStart(0);
-                int end = l.getLineEnd(0);
-                this.next = this.current + end;
-                return rtrim(substr, start, end);
-            } else {
-                throw new RuntimeException("lineCount=" + lineCount + " current=" + current +
-                        " text=" + text);
-            }
-        }
-
-        /** returns null if there is no more text */
-        CharSequence advance() {
-            this.first = false;
-            int index = this.next;
-            final int len = this.text.length();
-            while (index < len && !TextUtils.isGraphic(this.text.charAt(index))) {
-                index++;
-            }
-            if (index >= len) {
-                return null;
-            }
-
-            CharSequence substr = this.text.subSequence(index, this.text.length());
-            StaticLayout l = getLayout(substr);
-            final int lineCount = l.getLineCount();
-            int i;
-            for (i=0; i<lineCount; i++) {
-                int start = l.getLineStart(i);
-                int end = l.getLineEnd(i);
-                if (i == lineCount-1) {
-                    this.next = len;
-                } else {
-                    this.next = index + l.getLineStart(i+1);
-                }
-                CharSequence result = rtrim(substr, start, end);
-                if (result != null) {
-                    this.current = index + start;
-                    return result;
-                }
-            }
-            this.current = len;
-            return null;
-        }
-
-        Segment(NotificationData n, Drawable icon, CharSequence text) {
-            this.notificationData = n;
-            this.icon = icon;
-            this.text = text;
-            int index = 0;
-            final int len = text.length();
-            while (index < len && !TextUtils.isGraphic(text.charAt(index))) {
-                index++;
-            }
-            this.current = index;
-            this.next = index;
-            this.first = true;
-        }
-    };
-
-    private Handler mHandler = new Handler();
-    private ArrayList<Segment> mSegments = new ArrayList();
-    private TextPaint mPaint;
-    private View mTickerView;
-    private ImageSwitcher mIconSwitcher;
-    private TextSwitcher mTextSwitcher;
-
-    Ticker(Context context, StatusBarView sb) {
-        mTickerView = sb.findViewById(R.id.ticker);
-
-        mIconSwitcher = (ImageSwitcher)sb.findViewById(R.id.tickerIcon);
-        mIconSwitcher.setInAnimation(
-                    AnimationUtils.loadAnimation(context, com.android.internal.R.anim.push_up_in));
-        mIconSwitcher.setOutAnimation(
-                    AnimationUtils.loadAnimation(context, com.android.internal.R.anim.push_up_out));
-
-        mTextSwitcher = (TextSwitcher)sb.findViewById(R.id.tickerText);
-        mTextSwitcher.setInAnimation(
-                    AnimationUtils.loadAnimation(context, com.android.internal.R.anim.push_up_in));
-        mTextSwitcher.setOutAnimation(
-                    AnimationUtils.loadAnimation(context, com.android.internal.R.anim.push_up_out));
-
-        // Copy the paint style of one of the TextSwitchers children to use later for measuring
-        TextView text = (TextView)mTextSwitcher.getChildAt(0);
-        mPaint = text.getPaint();
-    }
-
-    void addEntry(NotificationData n, Drawable icon, CharSequence text) {
-        int initialCount = mSegments.size();
-
-        Segment newSegment = new Segment(n, icon, text);
-
-        // prune out any preexisting ones for this notification, but not the current one.
-        // let that finish, even if it's the same id
-        for (int i=1; i<initialCount; i++) {
-            Segment seg = mSegments.get(i);
-            if (n.id == seg.notificationData.id && n.pkg.equals(seg.notificationData.pkg)) {
-                // just update that one to use this new data instead
-                mSegments.set(i, newSegment);
-                // and since we know initialCount != 0, just return
-                return ;
-            }
-        }
-
-        mSegments.add(newSegment);
-
-        if (initialCount == 0 && mSegments.size() > 0) {
-            Segment seg = mSegments.get(0);
-            seg.first = false;
-            
-            mIconSwitcher.setAnimateFirstView(false);
-            mIconSwitcher.reset();
-            mIconSwitcher.setImageDrawable(seg.icon);
-            
-            mTextSwitcher.setAnimateFirstView(false);
-            mTextSwitcher.reset();
-            mTextSwitcher.setText(seg.getText());
-            
-            tickerStarting();
-            scheduleAdvance();
-        }
-    }
-
-    void halt() {
-        mHandler.removeCallbacks(mAdvanceTicker);
-        mSegments.clear();
-        tickerHalting();
-    }
-
-    void reflowText() {
-        if (mSegments.size() > 0) {
-            Segment seg = mSegments.get(0);
-            CharSequence text = seg.getText();
-            mTextSwitcher.setCurrentText(text);
-        }
-    }
-
-    private Runnable mAdvanceTicker = new Runnable() {
-        public void run() {
-            while (mSegments.size() > 0) {
-                Segment seg = mSegments.get(0);
-
-                if (seg.first) {
-                    // this makes the icon slide in for the first one for a given
-                    // notification even if there are two notifications with the
-                    // same icon in a row
-                    mIconSwitcher.setImageDrawable(seg.icon);
-                }
-                CharSequence text = seg.advance();
-                if (text == null) {
-                    mSegments.remove(0);
-                    continue;
-                }
-                mTextSwitcher.setText(text);
-
-                scheduleAdvance();
-                break;
-            }
-            if (mSegments.size() == 0) {
-                tickerDone();
-            }
-        }
-    };
-
-    private void scheduleAdvance() {
-        mHandler.postDelayed(mAdvanceTicker, TICKER_SEGMENT_DELAY);
-    }
-
-    abstract void tickerStarting();
-    abstract void tickerDone();
-    abstract void tickerHalting();
-}
-
diff --git a/services/java/com/android/server/status/TickerView.java b/services/java/com/android/server/status/TickerView.java
deleted file mode 100644
index 099dffb..0000000
--- a/services/java/com/android/server/status/TickerView.java
+++ /dev/null
@@ -1,38 +0,0 @@
-/*
- * Copyright (C) 2008 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.android.server.status;
-
-import android.content.Context;
-import android.util.AttributeSet;
-import android.widget.TextSwitcher;
-
-
-public class TickerView extends TextSwitcher
-{
-    Ticker mTicker;
-
-    public TickerView(Context context, AttributeSet attrs) {
-        super(context, attrs);
-    }
-
-    @Override
-    protected void onSizeChanged(int w, int h, int oldw, int oldh) {
-        super.onSizeChanged(w, h, oldw, oldh);
-        mTicker.reflowText();
-    }
-}
-
diff --git a/services/java/com/android/server/status/TrackingPatternView.java b/services/java/com/android/server/status/TrackingPatternView.java
deleted file mode 100644
index 2c91aa4..0000000
--- a/services/java/com/android/server/status/TrackingPatternView.java
+++ /dev/null
@@ -1,70 +0,0 @@
-/*
- * Copyright (C) 2008 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.android.server.status;
-
-import android.content.Context;
-import android.content.res.TypedArray;
-import android.util.AttributeSet;
-import android.util.Slog;
-import android.view.View;
-import android.graphics.BitmapFactory;
-import android.graphics.Bitmap;
-import android.graphics.Paint;
-import android.graphics.Canvas;
-
-public class TrackingPatternView extends View {
-    private Bitmap mTexture;
-    private Paint mPaint;
-    private int mTextureWidth;
-    private int mTextureHeight;
-    
-    public TrackingPatternView(Context context, AttributeSet attrs) {
-        super(context, attrs);
-
-        mTexture = BitmapFactory.decodeResource(getResources(), 
-                com.android.internal.R.drawable.status_bar_background);
-        mTextureWidth = mTexture.getWidth();
-        mTextureHeight = mTexture.getHeight();
-
-        mPaint = new Paint();
-        mPaint.setDither(false);
-    }
-
-    @Override
-    public void onDraw(Canvas canvas) {
-        final Bitmap texture = mTexture;
-        final Paint paint = mPaint;
-
-        final int width = getWidth();
-        final int height = getHeight();
-
-        final int textureWidth = mTextureWidth;
-        final int textureHeight = mTextureHeight;
-
-        int x = 0;
-        int y;
-
-        while (x < width) {
-            y = 0;
-            while (y < height) {
-                canvas.drawBitmap(texture, x, y, paint);
-                y += textureHeight;
-            }
-            x += textureWidth;
-        }
-    }
-}
diff --git a/services/java/com/android/server/status/TrackingView.java b/services/java/com/android/server/status/TrackingView.java
deleted file mode 100644
index 8ec39c0..0000000
--- a/services/java/com/android/server/status/TrackingView.java
+++ /dev/null
@@ -1,63 +0,0 @@
-/*
- * Copyright (C) 2008 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.android.server.status;
-
-import android.content.Context;
-import android.util.AttributeSet;
-import android.view.Display;
-import android.view.KeyEvent;
-import android.view.WindowManager;
-import android.widget.LinearLayout;
-
-
-public class TrackingView extends LinearLayout {
-    final Display mDisplay;
-    StatusBarService mService;
-    boolean mTracking;
-    int mStartX, mStartY;
-
-    public TrackingView(Context context, AttributeSet attrs) {
-        super(context, attrs);
-        mDisplay = ((WindowManager)context.getSystemService(
-                Context.WINDOW_SERVICE)).getDefaultDisplay();
-    }
-    
-    @Override
-    protected void onLayout(boolean changed, int left, int top, int right, int bottom) {
-        super.onLayout(changed, left, top, right, bottom);
-        mService.updateExpandedHeight();
-    }
-
-    @Override
-    public boolean dispatchKeyEvent(KeyEvent event) {
-        boolean down = event.getAction() == KeyEvent.ACTION_DOWN;
-        switch (event.getKeyCode()) {
-        case KeyEvent.KEYCODE_BACK:
-            if (down) {
-                mService.deactivate();
-            }
-            return true;
-        }
-        return super.dispatchKeyEvent(event);
-    }
-
-    @Override
-    protected void onAttachedToWindow() {
-        super.onAttachedToWindow();
-        mService.onTrackingViewAttached();
-    }
-}
diff --git a/services/java/com/android/server/status/UsbStorageActivity.java b/services/java/com/android/server/status/UsbStorageActivity.java
deleted file mode 100644
index e8631c53..0000000
--- a/services/java/com/android/server/status/UsbStorageActivity.java
+++ /dev/null
@@ -1,272 +0,0 @@
-/*
- * Copyright (C) 2007 Google Inc.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.android.server.status;
-
-import com.android.internal.R;
-import android.app.Activity;
-import android.app.ActivityManager;
-import android.app.AlertDialog;
-import android.app.Dialog;
-import android.content.BroadcastReceiver;
-import android.content.Context;
-import android.content.DialogInterface;
-import android.content.Intent;
-import android.content.IntentFilter;
-import android.content.DialogInterface.OnCancelListener;
-import android.content.pm.ApplicationInfo;
-import android.content.pm.PackageManager;
-import android.content.pm.PackageManager.NameNotFoundException;
-import android.os.Bundle;
-import android.os.Environment;
-import android.os.Handler;
-import android.os.IBinder;
-import android.os.storage.IMountService;
-import android.os.storage.StorageManager;
-import android.os.storage.StorageEventListener;
-import android.os.RemoteException;
-import android.os.ServiceManager;
-import android.widget.ImageView;
-import android.widget.Button;
-import android.widget.ProgressBar;
-import android.widget.TextView;
-import android.view.View;
-import android.view.Window;
-import android.util.Log;
-
-import java.util.List;
-
-/**
- * This activity is shown to the user for him/her to enable USB mass storage
- * on-demand (that is, when the USB cable is connected). It uses the alert
- * dialog style. It will be launched from a notification.
- */
-public class UsbStorageActivity extends Activity
-        implements View.OnClickListener, OnCancelListener {
-    private static final String TAG = "UsbStorageActivity";
-
-    private Button mMountButton;
-    private Button mUnmountButton;
-    private ProgressBar mProgressBar;
-    private TextView mBanner;
-    private TextView mMessage;
-    private ImageView mIcon;
-    private StorageManager mStorageManager = null;
-    private static final int DLG_CONFIRM_KILL_STORAGE_USERS = 1;
-    private static final int DLG_ERROR_SHARING = 2;
-    static final boolean localLOGV = false;
-
-    /** Used to detect when the USB cable is unplugged, so we can call finish() */
-    private BroadcastReceiver mBatteryReceiver = new BroadcastReceiver() {
-        @Override
-        public void onReceive(Context context, Intent intent) {
-            if (intent.getAction() == Intent.ACTION_BATTERY_CHANGED) {
-                handleBatteryChanged(intent);
-            }
-        }
-    };
-
-    private StorageEventListener mStorageListener = new StorageEventListener() {
-        @Override
-        public void onStorageStateChanged(String path, String oldState, String newState) {
-            final boolean on = newState.equals(Environment.MEDIA_SHARED);
-            switchDisplay(on);
-        }
-    };
-    
-    @Override
-    protected void onCreate(Bundle savedInstanceState) {
-        super.onCreate(savedInstanceState);
-
-        if (mStorageManager == null) {
-            mStorageManager = (StorageManager) getSystemService(Context.STORAGE_SERVICE);
-            if (mStorageManager == null) {
-                Log.w(TAG, "Failed to get StorageManager");
-            }
-        }
-
-        requestWindowFeature(Window.FEATURE_INDETERMINATE_PROGRESS);
-        setProgressBarIndeterminateVisibility(true);
-
-        setTitle(getString(com.android.internal.R.string.usb_storage_activity_title));
-
-        setContentView(com.android.internal.R.layout.usb_storage_activity);
-
-        mIcon = (ImageView) findViewById(com.android.internal.R.id.icon);
-        mBanner = (TextView) findViewById(com.android.internal.R.id.banner);
-        mMessage = (TextView) findViewById(com.android.internal.R.id.message);
-
-        mMountButton = (Button) findViewById(com.android.internal.R.id.mount_button);
-        mMountButton.setOnClickListener(this);
-        mUnmountButton = (Button) findViewById(com.android.internal.R.id.unmount_button);
-        mUnmountButton.setOnClickListener(this);
-        mProgressBar = (ProgressBar) findViewById(com.android.internal.R.id.progress);
-    }
-
-    private void switchDisplay(boolean usbStorageInUse) {
-        if (usbStorageInUse) {
-            mProgressBar.setVisibility(View.GONE);
-            mUnmountButton.setVisibility(View.VISIBLE);
-            mMountButton.setVisibility(View.GONE);
-            mIcon.setImageResource(com.android.internal.R.drawable.usb_android_connected);
-            mBanner.setText(com.android.internal.R.string.usb_storage_stop_title);
-            mMessage.setText(com.android.internal.R.string.usb_storage_stop_message);
-        } else {
-            mProgressBar.setVisibility(View.GONE);
-            mUnmountButton.setVisibility(View.GONE);
-            mMountButton.setVisibility(View.VISIBLE);
-            mIcon.setImageResource(com.android.internal.R.drawable.usb_android);
-            mBanner.setText(com.android.internal.R.string.usb_storage_title);
-            mMessage.setText(com.android.internal.R.string.usb_storage_message);
-        }
-    }
-
-    @Override
-    protected void onResume() {
-        super.onResume();
-
-        mStorageManager.registerListener(mStorageListener);
-        registerReceiver(mBatteryReceiver, new IntentFilter(Intent.ACTION_BATTERY_CHANGED));
-        try {
-            switchDisplay(mStorageManager.isUsbMassStorageEnabled());
-        } catch (Exception ex) {
-            Log.e(TAG, "Failed to read UMS enable state", ex);
-        }
-    }
-
-    @Override
-    protected void onPause() {
-        super.onPause();
-        
-        unregisterReceiver(mBatteryReceiver);
-        if (mStorageManager == null && mStorageListener != null) {
-            mStorageManager.unregisterListener(mStorageListener);
-        }
-    }
-
-    private void handleBatteryChanged(Intent intent) {
-        int pluggedType = intent.getIntExtra("plugged", 0);
-        if (pluggedType == 0) {
-            // It was disconnected from the plug, so finish
-            finish();
-        }
-    }
-
-    private IMountService getMountService() {
-        IBinder service = ServiceManager.getService("mount");
-        if (service != null) {
-            return IMountService.Stub.asInterface(service);
-        }
-        return null;
-    }
-
-    @Override
-    public Dialog onCreateDialog(int id, Bundle args) {
-        switch (id) {
-        case DLG_CONFIRM_KILL_STORAGE_USERS:
-            return new AlertDialog.Builder(this)
-                    .setTitle(R.string.dlg_confirm_kill_storage_users_title)
-                    .setPositiveButton(R.string.dlg_ok, new DialogInterface.OnClickListener() {
-                        public void onClick(DialogInterface dialog, int which) {
-                            switchUsbMassStorageAsync(true);
-                        }})
-                    .setNegativeButton(R.string.cancel, null)
-                    .setMessage(R.string.dlg_confirm_kill_storage_users_text)
-                    .setOnCancelListener(this)
-                    .create();
-        case DLG_ERROR_SHARING:
-            return new AlertDialog.Builder(this)
-                    .setTitle(R.string.dlg_error_title)
-                    .setNeutralButton(R.string.dlg_ok, null)
-                    .setMessage(R.string.usb_storage_error_message)
-                    .setOnCancelListener(this)
-                    .create();
-        }
-        return null;
-    }
-
-    private void showDialogInner(int id) {
-        removeDialog(id);
-        showDialog(id);
-    }
-
-    private void switchUsbMassStorageAsync(boolean on) {
-        mUnmountButton.setVisibility(View.GONE);
-        mMountButton.setVisibility(View.GONE);
-
-        mProgressBar.setVisibility(View.VISIBLE);
-        // will be hidden once USB mass storage kicks in (or fails)
-        
-        final boolean _on = on;
-        new Thread() {
-            public void run() {
-                if (_on) {
-                    mStorageManager.enableUsbMassStorage();
-                } else {
-                    mStorageManager.disableUsbMassStorage();
-                }
-            }
-        }.start();
-    }
-
-    private void checkStorageUsers() {
-        IMountService ims = getMountService();
-        if (ims == null) {
-            // Display error dialog
-            showDialogInner(DLG_ERROR_SHARING);
-        }
-        String extStoragePath = Environment.getExternalStorageDirectory().toString();
-        boolean showDialog = false;
-        try {
-            int[] stUsers = ims.getStorageUsers(extStoragePath);
-            if (stUsers != null && stUsers.length > 0) {
-                showDialog = true;
-            } else {
-                // List of applications on sdcard.
-                ActivityManager am = (ActivityManager)getSystemService(Context.ACTIVITY_SERVICE);
-                List<ApplicationInfo> infoList = am.getRunningExternalApplications();
-                if (infoList != null && infoList.size() > 0) {
-                    showDialog = true;
-                }
-            }
-        } catch (RemoteException e) {
-            // Display error dialog
-            showDialogInner(DLG_ERROR_SHARING);
-        }
-        if (showDialog) {
-            // Display dialog to user
-            showDialogInner(DLG_CONFIRM_KILL_STORAGE_USERS);
-        } else {
-            if (localLOGV) Log.i(TAG, "Enabling UMS");
-            switchUsbMassStorageAsync(true);
-        }
-    }
-
-    public void onClick(View v) {
-        if (v == mMountButton) {
-           // Check for list of storage users and display dialog if needed.
-            checkStorageUsers();
-        } else if (v == mUnmountButton) {
-            if (localLOGV) Log.i(TAG, "Disabling UMS");
-            switchUsbMassStorageAsync(false);
-        }
-    }
-
-    public void onCancel(DialogInterface dialog) {
-        finish();
-    }
-
-}
diff --git a/services/jni/Android.mk b/services/jni/Android.mk
index 9d2760e..0cf36b3 100644
--- a/services/jni/Android.mk
+++ b/services/jni/Android.mk
@@ -4,17 +4,20 @@
 LOCAL_SRC_FILES:= \
     com_android_server_AlarmManagerService.cpp \
     com_android_server_BatteryService.cpp \
-    com_android_server_KeyInputQueue.cpp \
+    com_android_server_InputManager.cpp \
     com_android_server_LightsService.cpp \
+    com_android_server_PowerManagerService.cpp \
     com_android_server_SensorService.cpp \
     com_android_server_SystemServer.cpp \
     com_android_server_VibratorService.cpp \
+	com_android_server_location_GpsLocationProvider.cpp \
     onload.cpp
 
 LOCAL_C_INCLUDES += \
 	$(JNI_H_INCLUDE)
 
 LOCAL_SHARED_LIBRARIES := \
+    libandroid_runtime \
 	libcutils \
 	libhardware \
 	libhardware_legacy \
diff --git a/services/jni/com_android_server_InputManager.cpp b/services/jni/com_android_server_InputManager.cpp
new file mode 100644
index 0000000..0992b33
--- /dev/null
+++ b/services/jni/com_android_server_InputManager.cpp
@@ -0,0 +1,2284 @@
+/*
+ * Copyright (C) 2010 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#define LOG_TAG "InputManager-JNI"
+
+//#define LOG_NDEBUG 0
+
+// Log debug messages about InputReaderPolicy
+#define DEBUG_INPUT_READER_POLICY 0
+
+// Log debug messages about InputDispatcherPolicy
+#define DEBUG_INPUT_DISPATCHER_POLICY 0
+
+// Log debug messages about input focus tracking
+#define DEBUG_FOCUS 0
+
+#include "JNIHelp.h"
+#include "jni.h"
+#include <limits.h>
+#include <android_runtime/AndroidRuntime.h>
+#include <ui/InputReader.h>
+#include <ui/InputDispatcher.h>
+#include <ui/InputManager.h>
+#include <ui/InputTransport.h>
+#include <utils/Log.h>
+#include <utils/threads.h>
+#include "../../core/jni/android_view_KeyEvent.h"
+#include "../../core/jni/android_view_MotionEvent.h"
+#include "../../core/jni/android_view_InputChannel.h"
+#include "com_android_server_PowerManagerService.h"
+
+namespace android {
+
+// Window flags from WindowManager.LayoutParams
+enum {
+    FLAG_ALLOW_LOCK_WHILE_SCREEN_ON     = 0x00000001,
+    FLAG_DIM_BEHIND        = 0x00000002,
+    FLAG_BLUR_BEHIND        = 0x00000004,
+    FLAG_NOT_FOCUSABLE      = 0x00000008,
+    FLAG_NOT_TOUCHABLE      = 0x00000010,
+    FLAG_NOT_TOUCH_MODAL    = 0x00000020,
+    FLAG_TOUCHABLE_WHEN_WAKING = 0x00000040,
+    FLAG_KEEP_SCREEN_ON     = 0x00000080,
+    FLAG_LAYOUT_IN_SCREEN   = 0x00000100,
+    FLAG_LAYOUT_NO_LIMITS   = 0x00000200,
+    FLAG_FULLSCREEN      = 0x00000400,
+    FLAG_FORCE_NOT_FULLSCREEN   = 0x00000800,
+    FLAG_DITHER             = 0x00001000,
+    FLAG_SECURE             = 0x00002000,
+    FLAG_SCALED             = 0x00004000,
+    FLAG_IGNORE_CHEEK_PRESSES    = 0x00008000,
+    FLAG_LAYOUT_INSET_DECOR = 0x00010000,
+    FLAG_ALT_FOCUSABLE_IM = 0x00020000,
+    FLAG_WATCH_OUTSIDE_TOUCH = 0x00040000,
+    FLAG_SHOW_WHEN_LOCKED = 0x00080000,
+    FLAG_SHOW_WALLPAPER = 0x00100000,
+    FLAG_TURN_SCREEN_ON = 0x00200000,
+    FLAG_DISMISS_KEYGUARD = 0x00400000,
+    FLAG_IMMERSIVE = 0x00800000,
+    FLAG_KEEP_SURFACE_WHILE_ANIMATING = 0x10000000,
+    FLAG_COMPATIBLE_WINDOW = 0x20000000,
+    FLAG_SYSTEM_ERROR = 0x40000000,
+};
+
+// Window types from WindowManager.LayoutParams
+enum {
+    FIRST_APPLICATION_WINDOW = 1,
+    TYPE_BASE_APPLICATION   = 1,
+    TYPE_APPLICATION        = 2,
+    TYPE_APPLICATION_STARTING = 3,
+    LAST_APPLICATION_WINDOW = 99,
+    FIRST_SUB_WINDOW        = 1000,
+    TYPE_APPLICATION_PANEL  = FIRST_SUB_WINDOW,
+    TYPE_APPLICATION_MEDIA  = FIRST_SUB_WINDOW+1,
+    TYPE_APPLICATION_SUB_PANEL = FIRST_SUB_WINDOW+2,
+    TYPE_APPLICATION_ATTACHED_DIALOG = FIRST_SUB_WINDOW+3,
+    TYPE_APPLICATION_MEDIA_OVERLAY  = FIRST_SUB_WINDOW+4,
+    LAST_SUB_WINDOW         = 1999,
+    FIRST_SYSTEM_WINDOW     = 2000,
+    TYPE_STATUS_BAR         = FIRST_SYSTEM_WINDOW,
+    TYPE_SEARCH_BAR         = FIRST_SYSTEM_WINDOW+1,
+    TYPE_PHONE              = FIRST_SYSTEM_WINDOW+2,
+    TYPE_SYSTEM_ALERT       = FIRST_SYSTEM_WINDOW+3,
+    TYPE_KEYGUARD           = FIRST_SYSTEM_WINDOW+4,
+    TYPE_TOAST              = FIRST_SYSTEM_WINDOW+5,
+    TYPE_SYSTEM_OVERLAY     = FIRST_SYSTEM_WINDOW+6,
+    TYPE_PRIORITY_PHONE     = FIRST_SYSTEM_WINDOW+7,
+    TYPE_SYSTEM_DIALOG      = FIRST_SYSTEM_WINDOW+8,
+    TYPE_KEYGUARD_DIALOG    = FIRST_SYSTEM_WINDOW+9,
+    TYPE_SYSTEM_ERROR       = FIRST_SYSTEM_WINDOW+10,
+    TYPE_INPUT_METHOD       = FIRST_SYSTEM_WINDOW+11,
+    TYPE_INPUT_METHOD_DIALOG= FIRST_SYSTEM_WINDOW+12,
+    TYPE_WALLPAPER          = FIRST_SYSTEM_WINDOW+13,
+    TYPE_STATUS_BAR_PANEL   = FIRST_SYSTEM_WINDOW+14,
+    LAST_SYSTEM_WINDOW      = 2999,
+};
+
+// Delay between reporting long touch events to the power manager.
+const nsecs_t EVENT_IGNORE_DURATION = 300 * 1000000LL; // 300 ms
+
+// Default input dispatching timeout if there is no focused application or paused window
+// from which to determine an appropriate dispatching timeout.
+const nsecs_t DEFAULT_INPUT_DISPATCHING_TIMEOUT = 5000 * 1000000LL; // 5 sec
+
+// Minimum amount of time to provide to the input dispatcher for delivery of an event
+// regardless of how long the application window was paused.
+const nsecs_t MIN_INPUT_DISPATCHING_TIMEOUT = 1000 * 1000000LL; // 1 sec
+
+// ----------------------------------------------------------------------------
+
+static struct {
+    jclass clazz;
+
+    jmethodID notifyConfigurationChanged;
+    jmethodID notifyLidSwitchChanged;
+    jmethodID notifyInputChannelBroken;
+    jmethodID notifyInputChannelANR;
+    jmethodID notifyInputChannelRecoveredFromANR;
+    jmethodID notifyANR;
+    jmethodID virtualKeyDownFeedback;
+    jmethodID interceptKeyBeforeQueueing;
+    jmethodID interceptKeyBeforeDispatching;
+    jmethodID checkInjectEventsPermission;
+    jmethodID notifyAppSwitchComing;
+    jmethodID filterTouchEvents;
+    jmethodID filterJumpyTouchEvents;
+    jmethodID getVirtualKeyDefinitions;
+    jmethodID getExcludedDeviceNames;
+} gCallbacksClassInfo;
+
+static struct {
+    jclass clazz;
+
+    jfieldID scanCode;
+    jfieldID centerX;
+    jfieldID centerY;
+    jfieldID width;
+    jfieldID height;
+} gVirtualKeyDefinitionClassInfo;
+
+static struct {
+    jclass clazz;
+
+    jfieldID inputChannel;
+    jfieldID layoutParamsFlags;
+    jfieldID layoutParamsType;
+    jfieldID dispatchingTimeoutNanos;
+    jfieldID frameLeft;
+    jfieldID frameTop;
+    jfieldID touchableAreaLeft;
+    jfieldID touchableAreaTop;
+    jfieldID touchableAreaRight;
+    jfieldID touchableAreaBottom;
+    jfieldID visible;
+    jfieldID hasFocus;
+    jfieldID hasWallpaper;
+    jfieldID paused;
+    jfieldID ownerPid;
+    jfieldID ownerUid;
+} gInputWindowClassInfo;
+
+static struct {
+    jclass clazz;
+
+    jfieldID name;
+    jfieldID dispatchingTimeoutNanos;
+    jfieldID token;
+} gInputApplicationClassInfo;
+
+// ----------------------------------------------------------------------------
+
+static inline nsecs_t now() {
+    return systemTime(SYSTEM_TIME_MONOTONIC);
+}
+
+// ----------------------------------------------------------------------------
+
+class NativeInputManager : public virtual RefBase,
+    public virtual InputReaderPolicyInterface,
+    public virtual InputDispatcherPolicyInterface {
+protected:
+    virtual ~NativeInputManager();
+
+public:
+    NativeInputManager(jobject callbacksObj);
+
+    inline sp<InputManager> getInputManager() const { return mInputManager; }
+
+    String8 dump();
+
+    void setDisplaySize(int32_t displayId, int32_t width, int32_t height);
+    void setDisplayOrientation(int32_t displayId, int32_t orientation);
+
+    status_t registerInputChannel(JNIEnv* env, const sp<InputChannel>& inputChannel,
+            jweak inputChannelObjWeak);
+    status_t unregisterInputChannel(JNIEnv* env, const sp<InputChannel>& inputChannel);
+
+    void setInputWindows(JNIEnv* env, jobjectArray windowObjArray);
+    void setFocusedApplication(JNIEnv* env, jobject applicationObj);
+    void setInputDispatchMode(bool enabled, bool frozen);
+    void preemptInputDispatch();
+
+    /* --- InputReaderPolicyInterface implementation --- */
+
+    virtual bool getDisplayInfo(int32_t displayId,
+            int32_t* width, int32_t* height, int32_t* orientation);
+    virtual void virtualKeyDownFeedback();
+    virtual int32_t interceptKey(nsecs_t when, int32_t deviceId,
+            bool down, int32_t keyCode, int32_t scanCode, uint32_t policyFlags);
+    virtual int32_t interceptTrackball(nsecs_t when, bool buttonChanged, bool buttonDown,
+            bool rolled);
+    virtual int32_t interceptTouch(nsecs_t when);
+    virtual int32_t interceptSwitch(nsecs_t when, int32_t switchCode, int32_t switchValue);
+    virtual bool filterTouchEvents();
+    virtual bool filterJumpyTouchEvents();
+    virtual void getVirtualKeyDefinitions(const String8& deviceName,
+            Vector<InputReaderPolicyInterface::VirtualKeyDefinition>& outVirtualKeyDefinitions);
+    virtual void getExcludedDeviceNames(Vector<String8>& outExcludedDeviceNames);
+
+    /* --- InputDispatcherPolicyInterface implementation --- */
+
+    virtual void notifyConfigurationChanged(nsecs_t when);
+    virtual void notifyInputChannelBroken(const sp<InputChannel>& inputChannel);
+    virtual bool notifyInputChannelANR(const sp<InputChannel>& inputChannel,
+            nsecs_t& outNewTimeout);
+    virtual void notifyInputChannelRecoveredFromANR(const sp<InputChannel>& inputChannel);
+    virtual nsecs_t getKeyRepeatTimeout();
+    virtual int32_t waitForKeyEventTargets(KeyEvent* keyEvent, uint32_t policyFlags,
+            int32_t injectorPid, int32_t injectorUid, Vector<InputTarget>& outTargets);
+    virtual int32_t waitForMotionEventTargets(MotionEvent* motionEvent, uint32_t policyFlags,
+            int32_t injectorPid, int32_t injectorUid, Vector<InputTarget>& outTargets);
+
+private:
+    struct InputWindow {
+        sp<InputChannel> inputChannel;
+        int32_t layoutParamsFlags;
+        int32_t layoutParamsType;
+        nsecs_t dispatchingTimeout;
+        int32_t frameLeft;
+        int32_t frameTop;
+        int32_t touchableAreaLeft;
+        int32_t touchableAreaTop;
+        int32_t touchableAreaRight;
+        int32_t touchableAreaBottom;
+        bool visible;
+        bool hasFocus;
+        bool hasWallpaper;
+        bool paused;
+        int32_t ownerPid;
+        int32_t ownerUid;
+
+        inline bool touchableAreaContainsPoint(int32_t x, int32_t y) {
+            return x >= touchableAreaLeft && x <= touchableAreaRight
+                    && y >= touchableAreaTop && y <= touchableAreaBottom;
+        }
+    };
+
+    struct InputApplication {
+        String8 name;
+        nsecs_t dispatchingTimeout;
+        jweak tokenObjWeak;
+    };
+
+    class ANRTimer {
+        enum Budget {
+            SYSTEM = 0,
+            APPLICATION = 1
+        };
+
+        Budget mBudget;
+        nsecs_t mStartTime;
+        bool mFrozen;
+        InputWindow* mPausedWindow;
+
+    public:
+        ANRTimer();
+
+        void dispatchFrozenBySystem();
+        void dispatchPausedByApplication(InputWindow* pausedWindow);
+        bool waitForDispatchStateChangeLd(NativeInputManager* inputManager);
+
+        nsecs_t getTimeSpentWaitingForApplication() const;
+    };
+
+    sp<InputManager> mInputManager;
+
+    jobject mCallbacksObj;
+
+    // Cached filtering policies.
+    int32_t mFilterTouchEvents;
+    int32_t mFilterJumpyTouchEvents;
+
+    // Cached display state.  (lock mDisplayLock)
+    Mutex mDisplayLock;
+    int32_t mDisplayWidth, mDisplayHeight;
+    int32_t mDisplayOrientation;
+
+    // Power manager interactions.
+    bool isScreenOn();
+    bool isScreenBright();
+
+    // Weak references to all currently registered input channels by receive fd.
+    Mutex mInputChannelRegistryLock;
+    KeyedVector<int, jweak> mInputChannelObjWeakByReceiveFd;
+
+    jobject getInputChannelObjLocal(JNIEnv* env, const sp<InputChannel>& inputChannel);
+
+    // Input target and focus tracking.  (lock mDispatchLock)
+    Mutex mDispatchLock;
+    Condition mDispatchStateChanged;
+
+    bool mDispatchEnabled;
+    bool mDispatchFrozen;
+    bool mWindowsReady;
+    Vector<InputWindow> mWindows;
+    Vector<InputWindow*> mWallpaperWindows;
+
+    // Focus tracking for keys, trackball, etc.
+    InputWindow* mFocusedWindow;
+
+    // Focus tracking for touch.
+    bool mTouchDown;
+    InputWindow* mTouchedWindow;                   // primary target for current down
+    Vector<InputWindow*> mTouchedWallpaperWindows; // wallpaper targets
+
+    Vector<InputWindow*> mTempTouchedOutsideWindows; // temporary outside touch targets
+    Vector<sp<InputChannel> > mTempTouchedWallpaperChannels; // temporary wallpaper targets
+
+    // Focused application.
+    InputApplication* mFocusedApplication;
+    InputApplication mFocusedApplicationStorage; // preallocated storage for mFocusedApplication
+
+    void dumpDispatchStateLd(String8& dump);
+    void logDispatchStateLd();
+
+    bool notifyANR(jobject tokenObj, nsecs_t& outNewTimeout);
+    void releaseFocusedApplicationLd(JNIEnv* env);
+
+    int32_t waitForFocusedWindowLd(uint32_t policyFlags, int32_t injectorPid, int32_t injectorUid,
+            Vector<InputTarget>& outTargets, InputWindow*& outFocusedWindow);
+    int32_t waitForTouchedWindowLd(MotionEvent* motionEvent, uint32_t policyFlags,
+            int32_t injectorPid, int32_t injectorUid,
+            Vector<InputTarget>& outTargets, InputWindow*& outTouchedWindow);
+
+    void releaseTouchedWindowLd();
+
+    int32_t waitForNonTouchEventTargets(MotionEvent* motionEvent, uint32_t policyFlags,
+            int32_t injectorPid, int32_t injectorUid, Vector<InputTarget>& outTargets);
+    int32_t waitForTouchEventTargets(MotionEvent* motionEvent, uint32_t policyFlags,
+            int32_t injectorPid, int32_t injectorUid, Vector<InputTarget>& outTargets);
+
+    bool interceptKeyBeforeDispatching(const InputTarget& target,
+            const KeyEvent* keyEvent, uint32_t policyFlags);
+
+    void pokeUserActivityIfNeeded(int32_t windowType, int32_t eventType);
+    void pokeUserActivity(nsecs_t eventTime, int32_t eventType);
+    bool checkInjectionPermission(const InputWindow* window,
+            int32_t injectorPid, int32_t injectorUid);
+
+    static bool populateWindow(JNIEnv* env, jobject windowObj, InputWindow& outWindow);
+    static void addTarget(const InputWindow* window, int32_t targetFlags,
+            nsecs_t timeSpentWaitingForApplication, Vector<InputTarget>& outTargets);
+
+    static inline JNIEnv* jniEnv() {
+        return AndroidRuntime::getJNIEnv();
+    }
+
+    static bool isAppSwitchKey(int32_t keyCode);
+    static bool isPolicyKey(int32_t keyCode, bool isScreenOn);
+    static bool checkAndClearExceptionFromCallback(JNIEnv* env, const char* methodName);
+};
+
+// ----------------------------------------------------------------------------
+
+NativeInputManager::NativeInputManager(jobject callbacksObj) :
+    mFilterTouchEvents(-1), mFilterJumpyTouchEvents(-1),
+    mDisplayWidth(-1), mDisplayHeight(-1), mDisplayOrientation(ROTATION_0),
+    mDispatchEnabled(true), mDispatchFrozen(false), mWindowsReady(true),
+    mFocusedWindow(NULL), mTouchDown(false), mTouchedWindow(NULL),
+    mFocusedApplication(NULL) {
+    JNIEnv* env = jniEnv();
+
+    mCallbacksObj = env->NewGlobalRef(callbacksObj);
+
+    sp<EventHub> eventHub = new EventHub();
+    mInputManager = new InputManager(eventHub, this, this);
+}
+
+NativeInputManager::~NativeInputManager() {
+    JNIEnv* env = jniEnv();
+
+    env->DeleteGlobalRef(mCallbacksObj);
+
+    releaseFocusedApplicationLd(env);
+}
+
+String8 NativeInputManager::dump() {
+    String8 dump;
+    dump.append("Native Input Dispatcher State:\n");
+
+    { // acquire lock
+        AutoMutex _l(mDisplayLock);
+        dumpDispatchStateLd(dump);
+    } // release lock
+    return dump;
+}
+
+bool NativeInputManager::isAppSwitchKey(int32_t keyCode) {
+    return keyCode == AKEYCODE_HOME || keyCode == AKEYCODE_ENDCALL;
+}
+
+bool NativeInputManager::isPolicyKey(int32_t keyCode, bool isScreenOn) {
+    // Special keys that the WindowManagerPolicy might care about.
+    switch (keyCode) {
+    case AKEYCODE_VOLUME_UP:
+    case AKEYCODE_VOLUME_DOWN:
+    case AKEYCODE_ENDCALL:
+    case AKEYCODE_POWER:
+    case AKEYCODE_CALL:
+    case AKEYCODE_HOME:
+    case AKEYCODE_MENU:
+    case AKEYCODE_SEARCH:
+        // media keys
+    case AKEYCODE_HEADSETHOOK:
+    case AKEYCODE_MEDIA_PLAY_PAUSE:
+    case AKEYCODE_MEDIA_STOP:
+    case AKEYCODE_MEDIA_NEXT:
+    case AKEYCODE_MEDIA_PREVIOUS:
+    case AKEYCODE_MEDIA_REWIND:
+    case AKEYCODE_MEDIA_FAST_FORWARD:
+        return true;
+    default:
+        // We need to pass all keys to the policy in the following cases:
+        // - screen is off
+        // - keyguard is visible
+        // - policy is performing key chording
+        //return ! isScreenOn || keyguardVisible || chording;
+        return true; // XXX stubbed out for now
+    }
+}
+
+bool NativeInputManager::checkAndClearExceptionFromCallback(JNIEnv* env, const char* methodName) {
+    if (env->ExceptionCheck()) {
+        LOGE("An exception was thrown by callback '%s'.", methodName);
+        LOGE_EX(env);
+        env->ExceptionClear();
+        return true;
+    }
+    return false;
+}
+
+void NativeInputManager::setDisplaySize(int32_t displayId, int32_t width, int32_t height) {
+    if (displayId == 0) {
+        AutoMutex _l(mDisplayLock);
+
+        mDisplayWidth = width;
+        mDisplayHeight = height;
+    }
+}
+
+void NativeInputManager::setDisplayOrientation(int32_t displayId, int32_t orientation) {
+    if (displayId == 0) {
+        AutoMutex _l(mDisplayLock);
+
+        mDisplayOrientation = orientation;
+    }
+}
+
+status_t NativeInputManager::registerInputChannel(JNIEnv* env,
+        const sp<InputChannel>& inputChannel, jobject inputChannelObj) {
+    jweak inputChannelObjWeak = env->NewWeakGlobalRef(inputChannelObj);
+    if (! inputChannelObjWeak) {
+        LOGE("Could not create weak reference for input channel.");
+        LOGE_EX(env);
+        return NO_MEMORY;
+    }
+
+    status_t status;
+    {
+        AutoMutex _l(mInputChannelRegistryLock);
+
+        ssize_t index = mInputChannelObjWeakByReceiveFd.indexOfKey(
+                inputChannel->getReceivePipeFd());
+        if (index >= 0) {
+            LOGE("Input channel object '%s' has already been registered",
+                    inputChannel->getName().string());
+            status = INVALID_OPERATION;
+            goto DeleteWeakRef;
+        }
+
+        mInputChannelObjWeakByReceiveFd.add(inputChannel->getReceivePipeFd(),
+                inputChannelObjWeak);
+    }
+
+    status = mInputManager->registerInputChannel(inputChannel);
+    if (! status) {
+        return OK;
+    }
+
+    {
+        AutoMutex _l(mInputChannelRegistryLock);
+        mInputChannelObjWeakByReceiveFd.removeItem(inputChannel->getReceivePipeFd());
+    }
+
+DeleteWeakRef:
+    env->DeleteWeakGlobalRef(inputChannelObjWeak);
+    return status;
+}
+
+status_t NativeInputManager::unregisterInputChannel(JNIEnv* env,
+        const sp<InputChannel>& inputChannel) {
+    jweak inputChannelObjWeak;
+    {
+        AutoMutex _l(mInputChannelRegistryLock);
+
+        ssize_t index = mInputChannelObjWeakByReceiveFd.indexOfKey(
+                inputChannel->getReceivePipeFd());
+        if (index < 0) {
+            LOGE("Input channel object '%s' is not currently registered",
+                    inputChannel->getName().string());
+            return INVALID_OPERATION;
+        }
+
+        inputChannelObjWeak = mInputChannelObjWeakByReceiveFd.valueAt(index);
+        mInputChannelObjWeakByReceiveFd.removeItemsAt(index);
+    }
+
+    env->DeleteWeakGlobalRef(inputChannelObjWeak);
+
+    return mInputManager->unregisterInputChannel(inputChannel);
+}
+
+jobject NativeInputManager::getInputChannelObjLocal(JNIEnv* env,
+        const sp<InputChannel>& inputChannel) {
+    {
+        AutoMutex _l(mInputChannelRegistryLock);
+
+        ssize_t index = mInputChannelObjWeakByReceiveFd.indexOfKey(
+                inputChannel->getReceivePipeFd());
+        if (index < 0) {
+            return NULL;
+        }
+
+        jweak inputChannelObjWeak = mInputChannelObjWeakByReceiveFd.valueAt(index);
+        return env->NewLocalRef(inputChannelObjWeak);
+    }
+}
+
+bool NativeInputManager::getDisplayInfo(int32_t displayId,
+        int32_t* width, int32_t* height, int32_t* orientation) {
+    bool result = false;
+    if (displayId == 0) {
+        AutoMutex _l(mDisplayLock);
+
+        if (mDisplayWidth > 0) {
+            *width = mDisplayWidth;
+            *height = mDisplayHeight;
+            *orientation = mDisplayOrientation;
+            result = true;
+        }
+    }
+    return result;
+}
+
+bool NativeInputManager::isScreenOn() {
+    return android_server_PowerManagerService_isScreenOn();
+}
+
+bool NativeInputManager::isScreenBright() {
+    return android_server_PowerManagerService_isScreenBright();
+}
+
+void NativeInputManager::virtualKeyDownFeedback() {
+#if DEBUG_INPUT_READER_POLICY
+    LOGD("virtualKeyDownFeedback");
+#endif
+
+    JNIEnv* env = jniEnv();
+
+    env->CallVoidMethod(mCallbacksObj, gCallbacksClassInfo.virtualKeyDownFeedback);
+    checkAndClearExceptionFromCallback(env, "virtualKeyDownFeedback");
+}
+
+int32_t NativeInputManager::interceptKey(nsecs_t when,
+        int32_t deviceId, bool down, int32_t keyCode, int32_t scanCode, uint32_t policyFlags) {
+#if DEBUG_INPUT_READER_POLICY
+    LOGD("interceptKey - when=%lld, deviceId=%d, down=%d, keyCode=%d, scanCode=%d, "
+            "policyFlags=0x%x",
+            when, deviceId, down, keyCode, scanCode, policyFlags);
+#endif
+
+    const int32_t WM_ACTION_PASS_TO_USER = 1;
+    const int32_t WM_ACTION_POKE_USER_ACTIVITY = 2;
+    const int32_t WM_ACTION_GO_TO_SLEEP = 4;
+
+    bool isScreenOn = this->isScreenOn();
+    bool isScreenBright = this->isScreenBright();
+
+    jint wmActions = 0;
+    if (isPolicyKey(keyCode, isScreenOn)) {
+        JNIEnv* env = jniEnv();
+
+        wmActions = env->CallIntMethod(mCallbacksObj,
+                gCallbacksClassInfo.interceptKeyBeforeQueueing,
+                when, keyCode, down, policyFlags, isScreenOn);
+        if (checkAndClearExceptionFromCallback(env, "interceptKeyBeforeQueueing")) {
+            wmActions = 0;
+        }
+    } else {
+        wmActions = WM_ACTION_PASS_TO_USER;
+    }
+
+    int32_t actions = InputReaderPolicyInterface::ACTION_NONE;
+    if (! isScreenOn) {
+        // Key presses and releases wake the device.
+        actions |= InputReaderPolicyInterface::ACTION_WOKE_HERE;
+    }
+
+    if (! isScreenBright) {
+        // Key presses and releases brighten the screen if dimmed.
+        actions |= InputReaderPolicyInterface::ACTION_BRIGHT_HERE;
+    }
+
+    if (wmActions & WM_ACTION_GO_TO_SLEEP) {
+        android_server_PowerManagerService_goToSleep(when);
+    }
+
+    if (wmActions & WM_ACTION_POKE_USER_ACTIVITY) {
+        pokeUserActivity(when, POWER_MANAGER_BUTTON_EVENT);
+    }
+
+    if (wmActions & WM_ACTION_PASS_TO_USER) {
+        actions |= InputReaderPolicyInterface::ACTION_DISPATCH;
+
+        if (down && isAppSwitchKey(keyCode)) {
+            JNIEnv* env = jniEnv();
+
+            env->CallVoidMethod(mCallbacksObj, gCallbacksClassInfo.notifyAppSwitchComing);
+            checkAndClearExceptionFromCallback(env, "notifyAppSwitchComing");
+
+            actions |= InputReaderPolicyInterface::ACTION_APP_SWITCH_COMING;
+        }
+    }
+
+    return actions;
+}
+
+int32_t NativeInputManager::interceptTouch(nsecs_t when) {
+#if DEBUG_INPUT_READER_POLICY
+    LOGD("interceptTouch - when=%lld", when);
+#endif
+
+    int32_t actions = InputReaderPolicyInterface::ACTION_NONE;
+    if (isScreenOn()) {
+        // Only dispatch touch events when the device is awake.
+        // Do not wake the device.
+        actions |= InputReaderPolicyInterface::ACTION_DISPATCH;
+
+        if (! isScreenBright()) {
+            // Brighten the screen if dimmed.
+            actions |= InputReaderPolicyInterface::ACTION_BRIGHT_HERE;
+        }
+    }
+
+    return actions;
+}
+
+int32_t NativeInputManager::interceptTrackball(nsecs_t when,
+        bool buttonChanged, bool buttonDown, bool rolled) {
+#if DEBUG_INPUT_READER_POLICY
+    LOGD("interceptTrackball - when=%lld, buttonChanged=%d, buttonDown=%d, rolled=%d",
+            when, buttonChanged, buttonDown, rolled);
+#endif
+
+    int32_t actions = InputReaderPolicyInterface::ACTION_NONE;
+    if (isScreenOn()) {
+        // Only dispatch trackball events when the device is awake.
+        // Do not wake the device.
+        actions |= InputReaderPolicyInterface::ACTION_DISPATCH;
+
+        if (! isScreenBright()) {
+            // Brighten the screen if dimmed.
+            actions |= InputReaderPolicyInterface::ACTION_BRIGHT_HERE;
+        }
+    }
+
+    return actions;
+}
+
+int32_t NativeInputManager::interceptSwitch(nsecs_t when, int32_t switchCode,
+        int32_t switchValue) {
+#if DEBUG_INPUT_READER_POLICY
+    LOGD("interceptSwitch - when=%lld, switchCode=%d, switchValue=%d",
+            when, switchCode, switchValue);
+#endif
+
+    JNIEnv* env = jniEnv();
+
+    switch (switchCode) {
+    case SW_LID:
+        env->CallVoidMethod(mCallbacksObj, gCallbacksClassInfo.notifyLidSwitchChanged,
+                when, switchValue == 0);
+        checkAndClearExceptionFromCallback(env, "notifyLidSwitchChanged");
+        break;
+    }
+
+    return InputReaderPolicyInterface::ACTION_NONE;
+}
+
+bool NativeInputManager::filterTouchEvents() {
+    if (mFilterTouchEvents < 0) {
+        JNIEnv* env = jniEnv();
+
+        jboolean result = env->CallBooleanMethod(mCallbacksObj,
+                gCallbacksClassInfo.filterTouchEvents);
+        if (checkAndClearExceptionFromCallback(env, "filterTouchEvents")) {
+            result = false;
+        }
+
+        mFilterTouchEvents = result ? 1 : 0;
+    }
+    return mFilterTouchEvents;
+}
+
+bool NativeInputManager::filterJumpyTouchEvents() {
+    if (mFilterJumpyTouchEvents < 0) {
+        JNIEnv* env = jniEnv();
+
+        jboolean result = env->CallBooleanMethod(mCallbacksObj,
+                gCallbacksClassInfo.filterJumpyTouchEvents);
+        if (checkAndClearExceptionFromCallback(env, "filterJumpyTouchEvents")) {
+            result = false;
+        }
+
+        mFilterJumpyTouchEvents = result ? 1 : 0;
+    }
+    return mFilterJumpyTouchEvents;
+}
+
+void NativeInputManager::getVirtualKeyDefinitions(const String8& deviceName,
+        Vector<InputReaderPolicyInterface::VirtualKeyDefinition>& outVirtualKeyDefinitions) {
+    JNIEnv* env = jniEnv();
+
+    jstring deviceNameStr = env->NewStringUTF(deviceName.string());
+    if (! checkAndClearExceptionFromCallback(env, "getVirtualKeyDefinitions")) {
+        jobjectArray result = jobjectArray(env->CallObjectMethod(mCallbacksObj,
+                gCallbacksClassInfo.getVirtualKeyDefinitions, deviceNameStr));
+        if (! checkAndClearExceptionFromCallback(env, "getVirtualKeyDefinitions") && result) {
+            jsize length = env->GetArrayLength(result);
+            for (jsize i = 0; i < length; i++) {
+                jobject item = env->GetObjectArrayElement(result, i);
+
+                outVirtualKeyDefinitions.add();
+                outVirtualKeyDefinitions.editTop().scanCode =
+                        int32_t(env->GetIntField(item, gVirtualKeyDefinitionClassInfo.scanCode));
+                outVirtualKeyDefinitions.editTop().centerX =
+                        int32_t(env->GetIntField(item, gVirtualKeyDefinitionClassInfo.centerX));
+                outVirtualKeyDefinitions.editTop().centerY =
+                        int32_t(env->GetIntField(item, gVirtualKeyDefinitionClassInfo.centerY));
+                outVirtualKeyDefinitions.editTop().width =
+                        int32_t(env->GetIntField(item, gVirtualKeyDefinitionClassInfo.width));
+                outVirtualKeyDefinitions.editTop().height =
+                        int32_t(env->GetIntField(item, gVirtualKeyDefinitionClassInfo.height));
+
+                env->DeleteLocalRef(item);
+            }
+            env->DeleteLocalRef(result);
+        }
+        env->DeleteLocalRef(deviceNameStr);
+    }
+}
+
+void NativeInputManager::getExcludedDeviceNames(Vector<String8>& outExcludedDeviceNames) {
+    JNIEnv* env = jniEnv();
+
+    jobjectArray result = jobjectArray(env->CallObjectMethod(mCallbacksObj,
+            gCallbacksClassInfo.getExcludedDeviceNames));
+    if (! checkAndClearExceptionFromCallback(env, "getExcludedDeviceNames") && result) {
+        jsize length = env->GetArrayLength(result);
+        for (jsize i = 0; i < length; i++) {
+            jstring item = jstring(env->GetObjectArrayElement(result, i));
+
+            const char* deviceNameChars = env->GetStringUTFChars(item, NULL);
+            outExcludedDeviceNames.add(String8(deviceNameChars));
+            env->ReleaseStringUTFChars(item, deviceNameChars);
+
+            env->DeleteLocalRef(item);
+        }
+        env->DeleteLocalRef(result);
+    }
+}
+
+void NativeInputManager::notifyConfigurationChanged(nsecs_t when) {
+#if DEBUG_INPUT_DISPATCHER_POLICY
+    LOGD("notifyConfigurationChanged - when=%lld", when);
+#endif
+
+    JNIEnv* env = jniEnv();
+
+    InputConfiguration config;
+    mInputManager->getInputConfiguration(& config);
+
+    env->CallVoidMethod(mCallbacksObj, gCallbacksClassInfo.notifyConfigurationChanged,
+            when, config.touchScreen, config.keyboard, config.navigation);
+    checkAndClearExceptionFromCallback(env, "notifyConfigurationChanged");
+}
+
+void NativeInputManager::notifyInputChannelBroken(const sp<InputChannel>& inputChannel) {
+#if DEBUG_INPUT_DISPATCHER_POLICY
+    LOGD("notifyInputChannelBroken - inputChannel='%s'", inputChannel->getName().string());
+#endif
+
+    JNIEnv* env = jniEnv();
+
+    jobject inputChannelObjLocal = getInputChannelObjLocal(env, inputChannel);
+    if (inputChannelObjLocal) {
+        env->CallVoidMethod(mCallbacksObj, gCallbacksClassInfo.notifyInputChannelBroken,
+                inputChannelObjLocal);
+        checkAndClearExceptionFromCallback(env, "notifyInputChannelBroken");
+
+        env->DeleteLocalRef(inputChannelObjLocal);
+    }
+}
+
+bool NativeInputManager::notifyInputChannelANR(const sp<InputChannel>& inputChannel,
+        nsecs_t& outNewTimeout) {
+#if DEBUG_INPUT_DISPATCHER_POLICY
+    LOGD("notifyInputChannelANR - inputChannel='%s'",
+            inputChannel->getName().string());
+#endif
+
+    JNIEnv* env = jniEnv();
+
+    jlong newTimeout;
+    jobject inputChannelObjLocal = getInputChannelObjLocal(env, inputChannel);
+    if (inputChannelObjLocal) {
+        newTimeout = env->CallLongMethod(mCallbacksObj,
+                gCallbacksClassInfo.notifyInputChannelANR, inputChannelObjLocal);
+        if (checkAndClearExceptionFromCallback(env, "notifyInputChannelANR")) {
+            newTimeout = -2;
+        }
+
+        env->DeleteLocalRef(inputChannelObjLocal);
+    } else {
+        newTimeout = -2;
+    }
+
+    if (newTimeout == -2) {
+        return false; // abort
+    }
+
+    outNewTimeout = newTimeout;
+    return true; // resume
+}
+
+void NativeInputManager::notifyInputChannelRecoveredFromANR(const sp<InputChannel>& inputChannel) {
+#if DEBUG_INPUT_DISPATCHER_POLICY
+    LOGD("notifyInputChannelRecoveredFromANR - inputChannel='%s'",
+            inputChannel->getName().string());
+#endif
+
+    JNIEnv* env = jniEnv();
+
+    jobject inputChannelObjLocal = getInputChannelObjLocal(env, inputChannel);
+    if (inputChannelObjLocal) {
+        env->CallVoidMethod(mCallbacksObj, gCallbacksClassInfo.notifyInputChannelRecoveredFromANR,
+                inputChannelObjLocal);
+        checkAndClearExceptionFromCallback(env, "notifyInputChannelRecoveredFromANR");
+
+        env->DeleteLocalRef(inputChannelObjLocal);
+    }
+}
+
+bool NativeInputManager::notifyANR(jobject tokenObj, nsecs_t& outNewTimeout) {
+#if DEBUG_INPUT_DISPATCHER_POLICY
+    LOGD("notifyANR");
+#endif
+
+    JNIEnv* env = jniEnv();
+
+    jlong newTimeout = env->CallLongMethod(mCallbacksObj,
+            gCallbacksClassInfo.notifyANR, tokenObj);
+    if (checkAndClearExceptionFromCallback(env, "notifyANR")) {
+        newTimeout = -2;
+    }
+
+    if (newTimeout == -2) {
+        return false; // abort
+    }
+
+    outNewTimeout = newTimeout;
+    return true; // resume
+}
+
+nsecs_t NativeInputManager::getKeyRepeatTimeout() {
+    if (! isScreenOn()) {
+        // Disable key repeat when the screen is off.
+        return -1;
+    } else {
+        // TODO use ViewConfiguration.getLongPressTimeout()
+        return milliseconds_to_nanoseconds(500);
+    }
+}
+
+void NativeInputManager::setInputWindows(JNIEnv* env, jobjectArray windowObjArray) {
+#if DEBUG_FOCUS
+    LOGD("setInputWindows");
+#endif
+    { // acquire lock
+        AutoMutex _l(mDispatchLock);
+
+        sp<InputChannel> touchedWindowChannel;
+        if (mTouchedWindow) {
+            touchedWindowChannel = mTouchedWindow->inputChannel;
+            mTouchedWindow = NULL;
+        }
+        size_t numTouchedWallpapers = mTouchedWallpaperWindows.size();
+        if (numTouchedWallpapers != 0) {
+            for (size_t i = 0; i < numTouchedWallpapers; i++) {
+                mTempTouchedWallpaperChannels.push(mTouchedWallpaperWindows[i]->inputChannel);
+            }
+            mTouchedWallpaperWindows.clear();
+        }
+
+        bool hadFocusedWindow = mFocusedWindow != NULL;
+
+        mWindows.clear();
+        mFocusedWindow = NULL;
+        mWallpaperWindows.clear();
+
+        if (windowObjArray) {
+            mWindowsReady = true;
+
+            jsize length = env->GetArrayLength(windowObjArray);
+            for (jsize i = 0; i < length; i++) {
+                jobject inputTargetObj = env->GetObjectArrayElement(windowObjArray, i);
+                if (! inputTargetObj) {
+                    break; // found null element indicating end of used portion of the array
+                }
+
+                mWindows.push();
+                InputWindow& window = mWindows.editTop();
+                bool valid = populateWindow(env, inputTargetObj, window);
+                if (! valid) {
+                    mWindows.pop();
+                }
+
+                env->DeleteLocalRef(inputTargetObj);
+            }
+
+            size_t numWindows = mWindows.size();
+            for (size_t i = 0; i < numWindows; i++) {
+                InputWindow* window = & mWindows.editItemAt(i);
+                if (window->hasFocus) {
+                    mFocusedWindow = window;
+                }
+
+                if (window->layoutParamsType == TYPE_WALLPAPER) {
+                    mWallpaperWindows.push(window);
+
+                    for (size_t j = 0; j < numTouchedWallpapers; j++) {
+                        if (window->inputChannel == mTempTouchedWallpaperChannels[i]) {
+                            mTouchedWallpaperWindows.push(window);
+                        }
+                    }
+                }
+
+                if (window->inputChannel == touchedWindowChannel) {
+                    mTouchedWindow = window;
+                }
+            }
+        } else {
+            mWindowsReady = false;
+        }
+
+        mTempTouchedWallpaperChannels.clear();
+
+        if ((hadFocusedWindow && ! mFocusedWindow)
+                || (mFocusedWindow && ! mFocusedWindow->visible)) {
+            preemptInputDispatch();
+        }
+
+        mDispatchStateChanged.broadcast();
+
+#if DEBUG_FOCUS
+        logDispatchStateLd();
+#endif
+    } // release lock
+}
+
+bool NativeInputManager::populateWindow(JNIEnv* env, jobject windowObj,
+        InputWindow& outWindow) {
+    bool valid = false;
+
+    jobject inputChannelObj = env->GetObjectField(windowObj,
+            gInputWindowClassInfo.inputChannel);
+    if (inputChannelObj) {
+        sp<InputChannel> inputChannel =
+                android_view_InputChannel_getInputChannel(env, inputChannelObj);
+        if (inputChannel != NULL) {
+            jint layoutParamsFlags = env->GetIntField(windowObj,
+                    gInputWindowClassInfo.layoutParamsFlags);
+            jint layoutParamsType = env->GetIntField(windowObj,
+                    gInputWindowClassInfo.layoutParamsType);
+            jlong dispatchingTimeoutNanos = env->GetLongField(windowObj,
+                    gInputWindowClassInfo.dispatchingTimeoutNanos);
+            jint frameLeft = env->GetIntField(windowObj,
+                    gInputWindowClassInfo.frameLeft);
+            jint frameTop = env->GetIntField(windowObj,
+                    gInputWindowClassInfo.frameTop);
+            jint touchableAreaLeft = env->GetIntField(windowObj,
+                    gInputWindowClassInfo.touchableAreaLeft);
+            jint touchableAreaTop = env->GetIntField(windowObj,
+                    gInputWindowClassInfo.touchableAreaTop);
+            jint touchableAreaRight = env->GetIntField(windowObj,
+                    gInputWindowClassInfo.touchableAreaRight);
+            jint touchableAreaBottom = env->GetIntField(windowObj,
+                    gInputWindowClassInfo.touchableAreaBottom);
+            jboolean visible = env->GetBooleanField(windowObj,
+                    gInputWindowClassInfo.visible);
+            jboolean hasFocus = env->GetBooleanField(windowObj,
+                    gInputWindowClassInfo.hasFocus);
+            jboolean hasWallpaper = env->GetBooleanField(windowObj,
+                    gInputWindowClassInfo.hasWallpaper);
+            jboolean paused = env->GetBooleanField(windowObj,
+                    gInputWindowClassInfo.paused);
+            jint ownerPid = env->GetIntField(windowObj,
+                    gInputWindowClassInfo.ownerPid);
+            jint ownerUid = env->GetIntField(windowObj,
+                    gInputWindowClassInfo.ownerUid);
+
+            outWindow.inputChannel = inputChannel;
+            outWindow.layoutParamsFlags = layoutParamsFlags;
+            outWindow.layoutParamsType = layoutParamsType;
+            outWindow.dispatchingTimeout = dispatchingTimeoutNanos;
+            outWindow.frameLeft = frameLeft;
+            outWindow.frameTop = frameTop;
+            outWindow.touchableAreaLeft = touchableAreaLeft;
+            outWindow.touchableAreaTop = touchableAreaTop;
+            outWindow.touchableAreaRight = touchableAreaRight;
+            outWindow.touchableAreaBottom = touchableAreaBottom;
+            outWindow.visible = visible;
+            outWindow.hasFocus = hasFocus;
+            outWindow.hasWallpaper = hasWallpaper;
+            outWindow.paused = paused;
+            outWindow.ownerPid = ownerPid;
+            outWindow.ownerUid = ownerUid;
+            valid = true;
+        } else {
+            LOGW("Dropping input target because its input channel is not initialized.");
+        }
+
+        env->DeleteLocalRef(inputChannelObj);
+    } else {
+        LOGW("Dropping input target because the input channel object was null.");
+    }
+    return valid;
+}
+
+void NativeInputManager::setFocusedApplication(JNIEnv* env, jobject applicationObj) {
+#if DEBUG_FOCUS
+    LOGD("setFocusedApplication");
+#endif
+    { // acquire lock
+        AutoMutex _l(mDispatchLock);
+
+        releaseFocusedApplicationLd(env);
+
+        if (applicationObj) {
+            jstring nameObj = jstring(env->GetObjectField(applicationObj,
+                    gInputApplicationClassInfo.name));
+            jlong dispatchingTimeoutNanos = env->GetLongField(applicationObj,
+                    gInputApplicationClassInfo.dispatchingTimeoutNanos);
+            jobject tokenObj = env->GetObjectField(applicationObj,
+                    gInputApplicationClassInfo.token);
+            jweak tokenObjWeak = env->NewWeakGlobalRef(tokenObj);
+            if (! tokenObjWeak) {
+                LOGE("Could not create weak reference for application token.");
+                LOGE_EX(env);
+                env->ExceptionClear();
+            }
+            env->DeleteLocalRef(tokenObj);
+
+            mFocusedApplication = & mFocusedApplicationStorage;
+
+            if (nameObj) {
+                const char* nameStr = env->GetStringUTFChars(nameObj, NULL);
+                mFocusedApplication->name.setTo(nameStr);
+                env->ReleaseStringUTFChars(nameObj, nameStr);
+                env->DeleteLocalRef(nameObj);
+            } else {
+                LOGE("InputApplication.name should not be null.");
+                mFocusedApplication->name.setTo("unknown");
+            }
+
+            mFocusedApplication->dispatchingTimeout = dispatchingTimeoutNanos;
+            mFocusedApplication->tokenObjWeak = tokenObjWeak;
+        }
+
+        mDispatchStateChanged.broadcast();
+
+#if DEBUG_FOCUS
+        logDispatchStateLd();
+#endif
+    } // release lock
+}
+
+void NativeInputManager::releaseFocusedApplicationLd(JNIEnv* env) {
+    if (mFocusedApplication) {
+        env->DeleteWeakGlobalRef(mFocusedApplication->tokenObjWeak);
+        mFocusedApplication = NULL;
+    }
+}
+
+void NativeInputManager::setInputDispatchMode(bool enabled, bool frozen) {
+#if DEBUG_FOCUS
+    LOGD("setInputDispatchMode: enabled=%d, frozen=%d", enabled, frozen);
+#endif
+
+    { // acquire lock
+        AutoMutex _l(mDispatchLock);
+
+        if (mDispatchEnabled != enabled || mDispatchFrozen != frozen) {
+            mDispatchEnabled = enabled;
+            mDispatchFrozen = frozen;
+
+            mDispatchStateChanged.broadcast();
+        }
+
+#if DEBUG_FOCUS
+        logDispatchStateLd();
+#endif
+    } // release lock
+}
+
+void NativeInputManager::preemptInputDispatch() {
+#if DEBUG_FOCUS
+    LOGD("preemptInputDispatch");
+#endif
+
+    mInputManager->preemptInputDispatch();
+}
+
+int32_t NativeInputManager::waitForFocusedWindowLd(uint32_t policyFlags,
+        int32_t injectorPid, int32_t injectorUid, Vector<InputTarget>& outTargets,
+        InputWindow*& outFocusedWindow) {
+
+    int32_t injectionResult = INPUT_EVENT_INJECTION_SUCCEEDED;
+    bool firstIteration = true;
+    ANRTimer anrTimer;
+    for (;;) {
+        if (firstIteration) {
+            firstIteration = false;
+        } else {
+            if (! anrTimer.waitForDispatchStateChangeLd(this)) {
+                LOGW("Dropping event because the dispatcher timed out waiting to identify "
+                        "the window that should receive it.");
+                injectionResult = INPUT_EVENT_INJECTION_TIMED_OUT;
+                break;
+            }
+        }
+
+        // If dispatch is not enabled then fail.
+        if (! mDispatchEnabled) {
+            LOGI("Dropping event because input dispatch is disabled.");
+            injectionResult = INPUT_EVENT_INJECTION_FAILED;
+            break;
+        }
+
+        // If dispatch is frozen or we don't have valid window data yet then wait.
+        if (mDispatchFrozen || ! mWindowsReady) {
+#if DEBUG_FOCUS
+            LOGD("Waiting because dispatch is frozen or windows are not ready.");
+#endif
+            anrTimer.dispatchFrozenBySystem();
+            continue;
+        }
+
+        // If there is no currently focused window and no focused application
+        // then drop the event.
+        if (! mFocusedWindow) {
+            if (mFocusedApplication) {
+#if DEBUG_FOCUS
+                LOGD("Waiting because there is no focused window but there is a "
+                        "focused application that may yet introduce a new target: '%s'.",
+                        mFocusedApplication->name.string());
+#endif
+                continue;
+            }
+
+            LOGI("Dropping event because there is no focused window or focused application.");
+            injectionResult = INPUT_EVENT_INJECTION_FAILED;
+            break;
+        }
+
+        // Check permissions.
+        if (! checkInjectionPermission(mFocusedWindow, injectorPid, injectorUid)) {
+            injectionResult = INPUT_EVENT_INJECTION_PERMISSION_DENIED;
+            break;
+        }
+
+        // If the currently focused window is paused then keep waiting.
+        if (mFocusedWindow->paused) {
+#if DEBUG_FOCUS
+            LOGD("Waiting because focused window is paused.");
+#endif
+            anrTimer.dispatchPausedByApplication(mFocusedWindow);
+            continue;
+        }
+
+        // Success!
+        break; // done waiting, exit loop
+    }
+
+    // Output targets.
+    if (injectionResult == INPUT_EVENT_INJECTION_SUCCEEDED) {
+        addTarget(mFocusedWindow, InputTarget::FLAG_SYNC,
+                anrTimer.getTimeSpentWaitingForApplication(), outTargets);
+
+        outFocusedWindow = mFocusedWindow;
+    } else {
+        outFocusedWindow = NULL;
+    }
+
+#if DEBUG_FOCUS
+    LOGD("waitForFocusedWindow finished: injectionResult=%d",
+            injectionResult);
+    logDispatchStateLd();
+#endif
+    return injectionResult;
+}
+
+enum InjectionPermission {
+    INJECTION_PERMISSION_UNKNOWN,
+    INJECTION_PERMISSION_GRANTED,
+    INJECTION_PERMISSION_DENIED
+};
+
+int32_t NativeInputManager::waitForTouchedWindowLd(MotionEvent* motionEvent, uint32_t policyFlags,
+        int32_t injectorPid, int32_t injectorUid, Vector<InputTarget>& outTargets,
+        InputWindow*& outTouchedWindow) {
+    nsecs_t startTime = now();
+
+    // For security reasons, we defer updating the touch state until we are sure that
+    // event injection will be allowed.
+    //
+    // FIXME In the original code, screenWasOff could never be set to true.
+    //       The reason is that the POLICY_FLAG_WOKE_HERE
+    //       and POLICY_FLAG_BRIGHT_HERE flags were set only when preprocessing raw
+    //       EV_KEY, EV_REL and EV_ABS events.  As it happens, the touch event was
+    //       actually enqueued using the policyFlags that appeared in the final EV_SYN
+    //       events upon which no preprocessing took place.  So policyFlags was always 0.
+    //       In the new native input dispatcher we're a bit more careful about event
+    //       preprocessing so the touches we receive can actually have non-zero policyFlags.
+    //       Unfortunately we obtain undesirable behavior.
+    //
+    //       Here's what happens:
+    //
+    //       When the device dims in anticipation of going to sleep, touches
+    //       in windows which have FLAG_TOUCHABLE_WHEN_WAKING cause
+    //       the device to brighten and reset the user activity timer.
+    //       Touches on other windows (such as the launcher window)
+    //       are dropped.  Then after a moment, the device goes to sleep.  Oops.
+    //
+    //       Also notice how screenWasOff was being initialized using POLICY_FLAG_BRIGHT_HERE
+    //       instead of POLICY_FLAG_WOKE_HERE...
+    //
+    bool screenWasOff = false; // original policy: policyFlags & POLICY_FLAG_BRIGHT_HERE;
+
+    int32_t action = motionEvent->getAction();
+
+    bool firstIteration = true;
+    ANRTimer anrTimer;
+    int32_t injectionResult;
+    InjectionPermission injectionPermission;
+    for (;;) {
+        if (firstIteration) {
+            firstIteration = false;
+        } else {
+            if (! anrTimer.waitForDispatchStateChangeLd(this)) {
+                LOGW("Dropping event because the dispatcher timed out waiting to identify "
+                        "the window that should receive it.");
+                injectionResult = INPUT_EVENT_INJECTION_TIMED_OUT;
+                injectionPermission = INJECTION_PERMISSION_UNKNOWN;
+                break; // timed out, exit wait loop
+            }
+        }
+
+        // If dispatch is not enabled then fail.
+        if (! mDispatchEnabled) {
+            LOGI("Dropping event because input dispatch is disabled.");
+            injectionResult = INPUT_EVENT_INJECTION_FAILED;
+            injectionPermission = INJECTION_PERMISSION_UNKNOWN;
+            break; // failed, exit wait loop
+        }
+
+        // If dispatch is frozen or we don't have valid window data yet then wait.
+        if (mDispatchFrozen || ! mWindowsReady) {
+#if DEBUG_INPUT_DISPATCHER_POLICY
+            LOGD("Waiting because dispatch is frozen or windows are not ready.");
+#endif
+            anrTimer.dispatchFrozenBySystem();
+            continue;
+        }
+
+        // Update the touch state as needed based on the properties of the touch event.
+        if (action == AMOTION_EVENT_ACTION_DOWN) {
+            /* Case 1: ACTION_DOWN */
+
+            InputWindow* newTouchedWindow = NULL;
+            mTempTouchedOutsideWindows.clear();
+
+            int32_t x = int32_t(motionEvent->getX(0));
+            int32_t y = int32_t(motionEvent->getY(0));
+            InputWindow* topErrorWindow = NULL;
+
+            // Traverse windows from front to back to find touched window and outside targets.
+            size_t numWindows = mWindows.size();
+            for (size_t i = 0; i < numWindows; i++) {
+                InputWindow* window = & mWindows.editItemAt(i);
+                int32_t flags = window->layoutParamsFlags;
+
+                if (flags & FLAG_SYSTEM_ERROR) {
+                    if (! topErrorWindow) {
+                        topErrorWindow = window;
+                    }
+                }
+
+                if (window->visible) {
+                    if (! (flags & FLAG_NOT_TOUCHABLE)) {
+                        bool isTouchModal = (flags &
+                                (FLAG_NOT_FOCUSABLE | FLAG_NOT_TOUCH_MODAL)) == 0;
+                        if (isTouchModal || window->touchableAreaContainsPoint(x, y)) {
+                            if (! screenWasOff || flags & FLAG_TOUCHABLE_WHEN_WAKING) {
+                                newTouchedWindow = window;
+                            }
+                            break; // found touched window, exit window loop
+                        }
+                    }
+
+                    if (flags & FLAG_WATCH_OUTSIDE_TOUCH) {
+                        mTempTouchedOutsideWindows.push(window);
+                    }
+                }
+            }
+
+            // If there is an error window but it is not taking focus (typically because
+            // it is invisible) then wait for it.  Any other focused window may in
+            // fact be in ANR state.
+            if (topErrorWindow && newTouchedWindow != topErrorWindow) {
+#if DEBUG_INPUT_DISPATCHER_POLICY
+                LOGD("Waiting because system error window is pending.");
+#endif
+                anrTimer.dispatchFrozenBySystem();
+                continue; // wait some more
+            }
+
+            // If we did not find a touched window then fail.
+            if (! newTouchedWindow) {
+                if (mFocusedApplication) {
+#if DEBUG_FOCUS
+                    LOGD("Waiting because there is no focused window but there is a "
+                            "focused application that may yet introduce a new target: '%s'.",
+                            mFocusedApplication->name.string());
+#endif
+                    continue;
+                }
+
+                LOGI("Dropping event because there is no touched window or focused application.");
+                injectionResult = INPUT_EVENT_INJECTION_FAILED;
+                injectionPermission = INJECTION_PERMISSION_UNKNOWN;
+                break; // failed, exit wait loop
+            }
+
+            // Check permissions.
+            if (! checkInjectionPermission(newTouchedWindow, injectorPid, injectorUid)) {
+                injectionResult = INPUT_EVENT_INJECTION_PERMISSION_DENIED;
+                injectionPermission = INJECTION_PERMISSION_DENIED;
+                break; // failed, exit wait loop
+            }
+
+            // If the touched window is paused then keep waiting.
+            if (newTouchedWindow->paused) {
+#if DEBUG_INPUT_DISPATCHER_POLICY
+                LOGD("Waiting because touched window is paused.");
+#endif
+                anrTimer.dispatchPausedByApplication(newTouchedWindow);
+                continue; // wait some more
+            }
+
+            // Success!  Update the touch dispatch state for real.
+            releaseTouchedWindowLd();
+
+            mTouchedWindow = newTouchedWindow;
+
+            if (newTouchedWindow->hasWallpaper) {
+                mTouchedWallpaperWindows.appendVector(mWallpaperWindows);
+            }
+
+            injectionResult = INPUT_EVENT_INJECTION_SUCCEEDED;
+            injectionPermission = INJECTION_PERMISSION_GRANTED;
+            break; // done
+        } else {
+            /* Case 2: Everything but ACTION_DOWN */
+
+            // Check permissions.
+            if (! checkInjectionPermission(mTouchedWindow, injectorPid, injectorUid)) {
+                injectionResult = INPUT_EVENT_INJECTION_PERMISSION_DENIED;
+                injectionPermission = INJECTION_PERMISSION_DENIED;
+                break; // failed, exit wait loop
+            }
+
+            // If the pointer is not currently down, then ignore the event.
+            if (! mTouchDown) {
+                LOGI("Dropping event because the pointer is not down.");
+                injectionResult = INPUT_EVENT_INJECTION_FAILED;
+                injectionPermission = INJECTION_PERMISSION_GRANTED;
+                break; // failed, exit wait loop
+            }
+
+            // If there is no currently touched window then fail.
+            if (! mTouchedWindow) {
+                LOGW("Dropping event because there is no touched window to receive it.");
+                injectionResult = INPUT_EVENT_INJECTION_FAILED;
+                injectionPermission = INJECTION_PERMISSION_GRANTED;
+                break; // failed, exit wait loop
+            }
+
+            // If the touched window is paused then keep waiting.
+            if (mTouchedWindow->paused) {
+#if DEBUG_INPUT_DISPATCHER_POLICY
+                LOGD("Waiting because touched window is paused.");
+#endif
+                anrTimer.dispatchPausedByApplication(mTouchedWindow);
+                continue; // wait some more
+            }
+
+            // Success!
+            injectionResult = INPUT_EVENT_INJECTION_SUCCEEDED;
+            injectionPermission = INJECTION_PERMISSION_GRANTED;
+            break; // done
+        }
+    }
+
+    // Output targets.
+    if (injectionResult == INPUT_EVENT_INJECTION_SUCCEEDED) {
+        size_t numWallpaperWindows = mTouchedWallpaperWindows.size();
+        for (size_t i = 0; i < numWallpaperWindows; i++) {
+            addTarget(mTouchedWallpaperWindows[i], 0, 0, outTargets);
+        }
+
+        size_t numOutsideWindows = mTempTouchedOutsideWindows.size();
+        for (size_t i = 0; i < numOutsideWindows; i++) {
+            addTarget(mTempTouchedOutsideWindows[i], InputTarget::FLAG_OUTSIDE, 0, outTargets);
+        }
+
+        addTarget(mTouchedWindow, InputTarget::FLAG_SYNC,
+                anrTimer.getTimeSpentWaitingForApplication(), outTargets);
+        outTouchedWindow = mTouchedWindow;
+    } else {
+        outTouchedWindow = NULL;
+    }
+    mTempTouchedOutsideWindows.clear();
+
+    // Check injection permission once and for all.
+    if (injectionPermission == INJECTION_PERMISSION_UNKNOWN) {
+        if (checkInjectionPermission(action == AMOTION_EVENT_ACTION_DOWN ? NULL : mTouchedWindow,
+                injectorPid, injectorUid)) {
+            injectionPermission = INJECTION_PERMISSION_GRANTED;
+        } else {
+            injectionPermission = INJECTION_PERMISSION_DENIED;
+        }
+    }
+
+    // Update final pieces of touch state if the injector had permission.
+    if (injectionPermission == INJECTION_PERMISSION_GRANTED) {
+        if (action == AMOTION_EVENT_ACTION_DOWN) {
+            if (mTouchDown) {
+                // This is weird.  We got a down but we thought it was already down!
+                LOGW("Pointer down received while already down.");
+            } else {
+                mTouchDown = true;
+            }
+
+            if (injectionResult != INPUT_EVENT_INJECTION_SUCCEEDED) {
+                // Since we failed to identify a target for this touch down, we may still
+                // be holding on to an earlier target from a previous touch down.  Release it.
+                releaseTouchedWindowLd();
+            }
+        } else if (action == AMOTION_EVENT_ACTION_UP) {
+            mTouchDown = false;
+            releaseTouchedWindowLd();
+        }
+    } else {
+        LOGW("Not updating touch focus because injection was denied.");
+    }
+
+#if DEBUG_FOCUS
+    LOGD("waitForTouchedWindow finished: injectionResult=%d",
+            injectionResult);
+    logDispatchStateLd();
+#endif
+    return injectionResult;
+}
+
+void NativeInputManager::releaseTouchedWindowLd() {
+    mTouchedWindow = NULL;
+    mTouchedWallpaperWindows.clear();
+}
+
+void NativeInputManager::addTarget(const InputWindow* window, int32_t targetFlags,
+        nsecs_t timeSpentWaitingForApplication, Vector<InputTarget>& outTargets) {
+    nsecs_t timeout = window->dispatchingTimeout - timeSpentWaitingForApplication;
+    if (timeout < MIN_INPUT_DISPATCHING_TIMEOUT) {
+        timeout = MIN_INPUT_DISPATCHING_TIMEOUT;
+    }
+
+    outTargets.push();
+
+    InputTarget& target = outTargets.editTop();
+    target.inputChannel = window->inputChannel;
+    target.flags = targetFlags;
+    target.timeout = timeout;
+    target.xOffset = - window->frameLeft;
+    target.yOffset = - window->frameTop;
+}
+
+bool NativeInputManager::checkInjectionPermission(const InputWindow* window,
+        int32_t injectorPid, int32_t injectorUid) {
+    if (injectorUid > 0 && (window == NULL || window->ownerUid != injectorUid)) {
+        JNIEnv* env = jniEnv();
+        jboolean result = env->CallBooleanMethod(mCallbacksObj,
+                gCallbacksClassInfo.checkInjectEventsPermission, injectorPid, injectorUid);
+        checkAndClearExceptionFromCallback(env, "checkInjectEventsPermission");
+
+        if (! result) {
+            if (window) {
+                LOGW("Permission denied: injecting event from pid %d uid %d to window "
+                        "with input channel %s owned by uid %d",
+                        injectorPid, injectorUid, window->inputChannel->getName().string(),
+                        window->ownerUid);
+            } else {
+                LOGW("Permission denied: injecting event from pid %d uid %d",
+                        injectorPid, injectorUid);
+            }
+            return false;
+        }
+    }
+
+    return true;
+}
+
+int32_t NativeInputManager::waitForKeyEventTargets(KeyEvent* keyEvent, uint32_t policyFlags,
+        int32_t injectorPid, int32_t injectorUid, Vector<InputTarget>& outTargets) {
+#if DEBUG_INPUT_DISPATCHER_POLICY
+    LOGD("waitForKeyEventTargets - policyFlags=%d, injectorPid=%d, injectorUid=%d",
+            policyFlags, injectorPid, injectorUid);
+#endif
+
+    int32_t windowType;
+    { // acquire lock
+        AutoMutex _l(mDispatchLock);
+
+        InputWindow* focusedWindow;
+        int32_t injectionResult = waitForFocusedWindowLd(policyFlags,
+                injectorPid, injectorUid, outTargets, /*out*/ focusedWindow);
+        if (injectionResult != INPUT_EVENT_INJECTION_SUCCEEDED) {
+            return injectionResult;
+        }
+
+        windowType = focusedWindow->layoutParamsType;
+    } // release lock
+
+    if (isPolicyKey(keyEvent->getKeyCode(), isScreenOn())) {
+        const InputTarget& target = outTargets.top();
+        bool consumed = interceptKeyBeforeDispatching(target, keyEvent, policyFlags);
+        if (consumed) {
+            outTargets.clear();
+            return INPUT_EVENT_INJECTION_SUCCEEDED;
+        }
+    }
+
+    pokeUserActivityIfNeeded(windowType, POWER_MANAGER_BUTTON_EVENT);
+    return INPUT_EVENT_INJECTION_SUCCEEDED;
+}
+
+int32_t NativeInputManager::waitForMotionEventTargets(MotionEvent* motionEvent,
+        uint32_t policyFlags, int32_t injectorPid, int32_t injectorUid,
+        Vector<InputTarget>& outTargets) {
+#if DEBUG_INPUT_DISPATCHER_POLICY
+    LOGD("waitForMotionEventTargets - policyFlags=%d, injectorPid=%d, injectorUid=%d",
+            policyFlags, injectorPid, injectorUid);
+#endif
+
+    int32_t source = motionEvent->getSource();
+    if (source & AINPUT_SOURCE_CLASS_POINTER) {
+        return waitForTouchEventTargets(motionEvent, policyFlags, injectorPid, injectorUid,
+                outTargets);
+    } else {
+        return waitForNonTouchEventTargets(motionEvent, policyFlags, injectorPid, injectorUid,
+                outTargets);
+    }
+}
+
+int32_t NativeInputManager::waitForNonTouchEventTargets(MotionEvent* motionEvent,
+        uint32_t policyFlags, int32_t injectorPid, int32_t injectorUid,
+        Vector<InputTarget>& outTargets) {
+#if DEBUG_INPUT_DISPATCHER_POLICY
+    LOGD("waitForNonTouchEventTargets - policyFlags=%d, injectorPid=%d, injectorUid=%d",
+            policyFlags, injectorPid, injectorUid);
+#endif
+
+    int32_t windowType;
+    { // acquire lock
+        AutoMutex _l(mDispatchLock);
+
+        InputWindow* focusedWindow;
+        int32_t injectionResult = waitForFocusedWindowLd(policyFlags,
+                injectorPid, injectorUid, outTargets, /*out*/ focusedWindow);
+        if (injectionResult != INPUT_EVENT_INJECTION_SUCCEEDED) {
+            return injectionResult;
+        }
+
+        windowType = focusedWindow->layoutParamsType;
+    } // release lock
+
+    pokeUserActivityIfNeeded(windowType, POWER_MANAGER_BUTTON_EVENT);
+    return INPUT_EVENT_INJECTION_SUCCEEDED;
+}
+
+int32_t NativeInputManager::waitForTouchEventTargets(MotionEvent* motionEvent,
+        uint32_t policyFlags, int32_t injectorPid, int32_t injectorUid,
+        Vector<InputTarget>& outTargets) {
+#if DEBUG_INPUT_DISPATCHER_POLICY
+    LOGD("waitForTouchEventTargets - policyFlags=%d, injectorPid=%d, injectorUid=%d",
+            policyFlags, injectorPid, injectorUid);
+#endif
+
+    int32_t windowType;
+    { // acquire lock
+        AutoMutex _l(mDispatchLock);
+
+        InputWindow* touchedWindow;
+        int32_t injectionResult = waitForTouchedWindowLd(motionEvent, policyFlags,
+                injectorPid, injectorUid, outTargets, /*out*/ touchedWindow);
+        if (injectionResult != INPUT_EVENT_INJECTION_SUCCEEDED) {
+            return injectionResult;
+        }
+
+        windowType = touchedWindow->layoutParamsType;
+    } // release lock
+
+    int32_t eventType;
+    switch (motionEvent->getAction()) {
+    case AMOTION_EVENT_ACTION_DOWN:
+        eventType = POWER_MANAGER_TOUCH_EVENT;
+        break;
+    case AMOTION_EVENT_ACTION_UP:
+        eventType = POWER_MANAGER_TOUCH_UP_EVENT;
+        break;
+    default:
+        if (motionEvent->getEventTime() - motionEvent->getDownTime()
+                >= EVENT_IGNORE_DURATION) {
+            eventType = POWER_MANAGER_TOUCH_EVENT;
+        } else {
+            eventType = POWER_MANAGER_LONG_TOUCH_EVENT;
+        }
+        break;
+    }
+    pokeUserActivityIfNeeded(windowType, eventType);
+    return INPUT_EVENT_INJECTION_SUCCEEDED;
+}
+
+bool NativeInputManager::interceptKeyBeforeDispatching(const InputTarget& target,
+        const KeyEvent* keyEvent, uint32_t policyFlags) {
+    JNIEnv* env = jniEnv();
+
+    jobject inputChannelObj = getInputChannelObjLocal(env, target.inputChannel);
+    if (inputChannelObj) {
+        jboolean consumed = env->CallBooleanMethod(mCallbacksObj,
+                gCallbacksClassInfo.interceptKeyBeforeDispatching,
+                inputChannelObj, keyEvent->getAction(), keyEvent->getFlags(),
+                keyEvent->getKeyCode(), keyEvent->getMetaState(),
+                keyEvent->getRepeatCount(), policyFlags);
+        bool error = checkAndClearExceptionFromCallback(env, "interceptKeyBeforeDispatching");
+
+        env->DeleteLocalRef(inputChannelObj);
+
+        return consumed && ! error;
+    } else {
+        LOGW("Could not apply key dispatch policy because input channel '%s' is "
+                "no longer valid.", target.inputChannel->getName().string());
+        return false;
+    }
+}
+
+void NativeInputManager::pokeUserActivityIfNeeded(int32_t windowType, int32_t eventType) {
+    if (windowType != TYPE_KEYGUARD) {
+        nsecs_t eventTime = now();
+        pokeUserActivity(eventTime, eventType);
+    }
+}
+
+void NativeInputManager::pokeUserActivity(nsecs_t eventTime, int32_t eventType) {
+    android_server_PowerManagerService_userActivity(eventTime, eventType);
+}
+
+void NativeInputManager::logDispatchStateLd() {
+    String8 dump;
+    dumpDispatchStateLd(dump);
+    LOGD("%s", dump.string());
+}
+
+void NativeInputManager::dumpDispatchStateLd(String8& dump) {
+    dump.appendFormat("  dispatchEnabled: %d\n", mDispatchEnabled);
+    dump.appendFormat("  dispatchFrozen: %d\n", mDispatchFrozen);
+    dump.appendFormat("  windowsReady: %d\n", mWindowsReady);
+
+    if (mFocusedApplication) {
+        dump.appendFormat("  focusedApplication: name='%s', dispatchingTimeout=%0.3fms\n",
+                mFocusedApplication->name.string(),
+                mFocusedApplication->dispatchingTimeout / 1000000.0);
+    } else {
+        dump.append("  focusedApplication: <null>\n");
+    }
+    dump.appendFormat("  focusedWindow: '%s'\n",
+            mFocusedWindow != NULL ? mFocusedWindow->inputChannel->getName().string() : "<null>");
+    dump.appendFormat("  touchedWindow: '%s', touchDown=%d\n",
+            mTouchedWindow != NULL ? mTouchedWindow->inputChannel->getName().string() : "<null>",
+            mTouchDown);
+    for (size_t i = 0; i < mTouchedWallpaperWindows.size(); i++) {
+        dump.appendFormat("  touchedWallpaperWindows[%d]: '%s'\n",
+                i, mTouchedWallpaperWindows[i]->inputChannel->getName().string());
+    }
+    for (size_t i = 0; i < mWindows.size(); i++) {
+        dump.appendFormat("  windows[%d]: '%s', paused=%d, hasFocus=%d, hasWallpaper=%d, "
+                "visible=%d, flags=0x%08x, type=0x%08x, "
+                "frame=[%d,%d], touchableArea=[%d,%d][%d,%d], "
+                "ownerPid=%d, ownerUid=%d, dispatchingTimeout=%0.3fms\n",
+                i, mWindows[i].inputChannel->getName().string(),
+                mWindows[i].paused, mWindows[i].hasFocus, mWindows[i].hasWallpaper,
+                mWindows[i].visible, mWindows[i].layoutParamsFlags, mWindows[i].layoutParamsType,
+                mWindows[i].frameLeft, mWindows[i].frameTop,
+                mWindows[i].touchableAreaLeft, mWindows[i].touchableAreaTop,
+                mWindows[i].touchableAreaRight, mWindows[i].touchableAreaBottom,
+                mWindows[i].ownerPid, mWindows[i].ownerUid,
+                mWindows[i].dispatchingTimeout / 1000000.0);
+    }
+}
+
+// ----------------------------------------------------------------------------
+
+NativeInputManager::ANRTimer::ANRTimer() :
+        mBudget(APPLICATION), mStartTime(now()), mFrozen(false), mPausedWindow(NULL) {
+}
+
+void NativeInputManager::ANRTimer::dispatchFrozenBySystem() {
+    mFrozen = true;
+}
+
+void NativeInputManager::ANRTimer::dispatchPausedByApplication(InputWindow* pausedWindow) {
+    mPausedWindow = pausedWindow;
+}
+
+bool NativeInputManager::ANRTimer::waitForDispatchStateChangeLd(NativeInputManager* inputManager) {
+    nsecs_t currentTime = now();
+
+    Budget newBudget;
+    nsecs_t dispatchingTimeout;
+    sp<InputChannel> pausedChannel = NULL;
+    jobject tokenObj = NULL;
+    if (mFrozen) {
+        newBudget = SYSTEM;
+        dispatchingTimeout = DEFAULT_INPUT_DISPATCHING_TIMEOUT;
+        mFrozen = false;
+    } else if (mPausedWindow) {
+        newBudget = APPLICATION;
+        dispatchingTimeout = mPausedWindow->dispatchingTimeout;
+        pausedChannel = mPausedWindow->inputChannel;
+        mPausedWindow = NULL;
+    } else if (inputManager->mFocusedApplication) {
+        newBudget = APPLICATION;
+        dispatchingTimeout = inputManager->mFocusedApplication->dispatchingTimeout;
+        tokenObj = jniEnv()->NewLocalRef(inputManager->mFocusedApplication->tokenObjWeak);
+    } else {
+        newBudget = APPLICATION;
+        dispatchingTimeout = DEFAULT_INPUT_DISPATCHING_TIMEOUT;
+    }
+
+    if (mBudget != newBudget) {
+        mBudget = newBudget;
+        mStartTime = currentTime;
+    }
+
+    bool result = false;
+    nsecs_t timeoutRemaining = mStartTime + dispatchingTimeout - currentTime;
+    if (timeoutRemaining > 0
+            && inputManager->mDispatchStateChanged.waitRelative(inputManager->mDispatchLock,
+                    timeoutRemaining) == OK) {
+        result = true;
+    } else {
+        if (pausedChannel != NULL || tokenObj != NULL) {
+            bool resumed;
+            nsecs_t newTimeout = 0;
+
+            inputManager->mDispatchLock.unlock(); // release lock
+            if (pausedChannel != NULL) {
+                resumed = inputManager->notifyInputChannelANR(pausedChannel, /*out*/ newTimeout);
+            } else {
+                resumed = inputManager->notifyANR(tokenObj, /*out*/ newTimeout);
+            }
+            inputManager->mDispatchLock.lock(); // re-acquire lock
+
+            if (resumed) {
+                mStartTime = now() - dispatchingTimeout + newTimeout;
+                result = true;
+            }
+        }
+    }
+
+    if (tokenObj) {
+        jniEnv()->DeleteLocalRef(tokenObj);
+    }
+
+    return result;
+}
+
+nsecs_t NativeInputManager::ANRTimer::getTimeSpentWaitingForApplication() const {
+    return mBudget == APPLICATION ? now() - mStartTime : 0;
+}
+
+// ----------------------------------------------------------------------------
+
+static sp<NativeInputManager> gNativeInputManager;
+
+static bool checkInputManagerUnitialized(JNIEnv* env) {
+    if (gNativeInputManager == NULL) {
+        LOGE("Input manager not initialized.");
+        jniThrowRuntimeException(env, "Input manager not initialized.");
+        return true;
+    }
+    return false;
+}
+
+static void android_server_InputManager_nativeInit(JNIEnv* env, jclass clazz,
+        jobject callbacks) {
+    if (gNativeInputManager == NULL) {
+        gNativeInputManager = new NativeInputManager(callbacks);
+    } else {
+        LOGE("Input manager already initialized.");
+        jniThrowRuntimeException(env, "Input manager already initialized.");
+    }
+}
+
+static void android_server_InputManager_nativeStart(JNIEnv* env, jclass clazz) {
+    if (checkInputManagerUnitialized(env)) {
+        return;
+    }
+
+    status_t result = gNativeInputManager->getInputManager()->start();
+    if (result) {
+        jniThrowRuntimeException(env, "Input manager could not be started.");
+    }
+}
+
+static void android_server_InputManager_nativeSetDisplaySize(JNIEnv* env, jclass clazz,
+        jint displayId, jint width, jint height) {
+    if (checkInputManagerUnitialized(env)) {
+        return;
+    }
+
+    // XXX we could get this from the SurfaceFlinger directly instead of requiring it
+    // to be passed in like this, not sure which is better but leaving it like this
+    // keeps the window manager in direct control of when display transitions propagate down
+    // to the input dispatcher
+    gNativeInputManager->setDisplaySize(displayId, width, height);
+}
+
+static void android_server_InputManager_nativeSetDisplayOrientation(JNIEnv* env, jclass clazz,
+        jint displayId, jint orientation) {
+    if (checkInputManagerUnitialized(env)) {
+        return;
+    }
+
+    gNativeInputManager->setDisplayOrientation(displayId, orientation);
+}
+
+static jint android_server_InputManager_nativeGetScanCodeState(JNIEnv* env, jclass clazz,
+        jint deviceId, jint deviceClasses, jint scanCode) {
+    if (checkInputManagerUnitialized(env)) {
+        return AKEY_STATE_UNKNOWN;
+    }
+
+    return gNativeInputManager->getInputManager()->getScanCodeState(
+            deviceId, deviceClasses, scanCode);
+}
+
+static jint android_server_InputManager_nativeGetKeyCodeState(JNIEnv* env, jclass clazz,
+        jint deviceId, jint deviceClasses, jint keyCode) {
+    if (checkInputManagerUnitialized(env)) {
+        return AKEY_STATE_UNKNOWN;
+    }
+
+    return gNativeInputManager->getInputManager()->getKeyCodeState(
+            deviceId, deviceClasses, keyCode);
+}
+
+static jint android_server_InputManager_nativeGetSwitchState(JNIEnv* env, jclass clazz,
+        jint deviceId, jint deviceClasses, jint sw) {
+    if (checkInputManagerUnitialized(env)) {
+        return AKEY_STATE_UNKNOWN;
+    }
+
+    return gNativeInputManager->getInputManager()->getSwitchState(deviceId, deviceClasses, sw);
+}
+
+static jboolean android_server_InputManager_nativeHasKeys(JNIEnv* env, jclass clazz,
+        jintArray keyCodes, jbooleanArray outFlags) {
+    if (checkInputManagerUnitialized(env)) {
+        return JNI_FALSE;
+    }
+
+    int32_t* codes = env->GetIntArrayElements(keyCodes, NULL);
+    uint8_t* flags = env->GetBooleanArrayElements(outFlags, NULL);
+    jsize numCodes = env->GetArrayLength(keyCodes);
+    jboolean result;
+    if (numCodes == env->GetArrayLength(outFlags)) {
+        result = gNativeInputManager->getInputManager()->hasKeys(numCodes, codes, flags);
+    } else {
+        result = JNI_FALSE;
+    }
+
+    env->ReleaseBooleanArrayElements(outFlags, flags, 0);
+    env->ReleaseIntArrayElements(keyCodes, codes, 0);
+    return result;
+}
+
+static void throwInputChannelNotInitialized(JNIEnv* env) {
+    jniThrowException(env, "java/lang/IllegalStateException",
+             "inputChannel is not initialized");
+}
+
+static void android_server_InputManager_handleInputChannelDisposed(JNIEnv* env,
+        jobject inputChannelObj, const sp<InputChannel>& inputChannel, void* data) {
+    LOGW("Input channel object '%s' was disposed without first being unregistered with "
+            "the input manager!", inputChannel->getName().string());
+
+    if (gNativeInputManager != NULL) {
+        gNativeInputManager->unregisterInputChannel(env, inputChannel);
+    }
+}
+
+static void android_server_InputManager_nativeRegisterInputChannel(JNIEnv* env, jclass clazz,
+        jobject inputChannelObj) {
+    if (checkInputManagerUnitialized(env)) {
+        return;
+    }
+
+    sp<InputChannel> inputChannel = android_view_InputChannel_getInputChannel(env,
+            inputChannelObj);
+    if (inputChannel == NULL) {
+        throwInputChannelNotInitialized(env);
+        return;
+    }
+
+
+    status_t status = gNativeInputManager->registerInputChannel(
+            env, inputChannel, inputChannelObj);
+    if (status) {
+        jniThrowRuntimeException(env, "Failed to register input channel.  "
+                "Check logs for details.");
+        return;
+    }
+
+    android_view_InputChannel_setDisposeCallback(env, inputChannelObj,
+            android_server_InputManager_handleInputChannelDisposed, NULL);
+}
+
+static void android_server_InputManager_nativeUnregisterInputChannel(JNIEnv* env, jclass clazz,
+        jobject inputChannelObj) {
+    if (checkInputManagerUnitialized(env)) {
+        return;
+    }
+
+    sp<InputChannel> inputChannel = android_view_InputChannel_getInputChannel(env,
+            inputChannelObj);
+    if (inputChannel == NULL) {
+        throwInputChannelNotInitialized(env);
+        return;
+    }
+
+    android_view_InputChannel_setDisposeCallback(env, inputChannelObj, NULL, NULL);
+
+    status_t status = gNativeInputManager->unregisterInputChannel(env, inputChannel);
+    if (status) {
+        jniThrowRuntimeException(env, "Failed to unregister input channel.  "
+                "Check logs for details.");
+    }
+}
+
+static jint android_server_InputManager_nativeInjectKeyEvent(JNIEnv* env, jclass clazz,
+        jobject keyEventObj, jint injectorPid, jint injectorUid,
+        jboolean sync, jint timeoutMillis) {
+    if (checkInputManagerUnitialized(env)) {
+        return INPUT_EVENT_INJECTION_FAILED;
+    }
+
+    KeyEvent keyEvent;
+    android_view_KeyEvent_toNative(env, keyEventObj, & keyEvent);
+
+    return gNativeInputManager->getInputManager()->injectInputEvent(& keyEvent,
+            injectorPid, injectorUid, sync, timeoutMillis);
+}
+
+static jint android_server_InputManager_nativeInjectMotionEvent(JNIEnv* env, jclass clazz,
+        jobject motionEventObj, jint injectorPid, jint injectorUid,
+        jboolean sync, jint timeoutMillis) {
+    if (checkInputManagerUnitialized(env)) {
+        return INPUT_EVENT_INJECTION_FAILED;
+    }
+
+    MotionEvent motionEvent;
+    android_view_MotionEvent_toNative(env, motionEventObj, & motionEvent);
+
+    return gNativeInputManager->getInputManager()->injectInputEvent(& motionEvent,
+            injectorPid, injectorUid, sync, timeoutMillis);
+}
+
+static void android_server_InputManager_nativeSetInputWindows(JNIEnv* env, jclass clazz,
+        jobjectArray windowObjArray) {
+    if (checkInputManagerUnitialized(env)) {
+        return;
+    }
+
+    gNativeInputManager->setInputWindows(env, windowObjArray);
+}
+
+static void android_server_InputManager_nativeSetFocusedApplication(JNIEnv* env, jclass clazz,
+        jobject applicationObj) {
+    if (checkInputManagerUnitialized(env)) {
+        return;
+    }
+
+    gNativeInputManager->setFocusedApplication(env, applicationObj);
+}
+
+static void android_server_InputManager_nativeSetInputDispatchMode(JNIEnv* env,
+        jclass clazz, jboolean enabled, jboolean frozen) {
+    if (checkInputManagerUnitialized(env)) {
+        return;
+    }
+
+    gNativeInputManager->setInputDispatchMode(enabled, frozen);
+}
+
+static void android_server_InputManager_nativePreemptInputDispatch(JNIEnv* env,
+        jclass clazz) {
+    if (checkInputManagerUnitialized(env)) {
+        return;
+    }
+
+    gNativeInputManager->preemptInputDispatch();
+}
+
+static jstring android_server_InputManager_nativeDump(JNIEnv* env, jclass clazz) {
+    if (checkInputManagerUnitialized(env)) {
+        return NULL;
+    }
+
+    String8 dump(gNativeInputManager->dump());
+    return env->NewStringUTF(dump.string());
+}
+
+// ----------------------------------------------------------------------------
+
+static JNINativeMethod gInputManagerMethods[] = {
+    /* name, signature, funcPtr */
+    { "nativeInit", "(Lcom/android/server/InputManager$Callbacks;)V",
+            (void*) android_server_InputManager_nativeInit },
+    { "nativeStart", "()V",
+            (void*) android_server_InputManager_nativeStart },
+    { "nativeSetDisplaySize", "(III)V",
+            (void*) android_server_InputManager_nativeSetDisplaySize },
+    { "nativeSetDisplayOrientation", "(II)V",
+            (void*) android_server_InputManager_nativeSetDisplayOrientation },
+    { "nativeGetScanCodeState", "(III)I",
+            (void*) android_server_InputManager_nativeGetScanCodeState },
+    { "nativeGetKeyCodeState", "(III)I",
+            (void*) android_server_InputManager_nativeGetKeyCodeState },
+    { "nativeGetSwitchState", "(III)I",
+            (void*) android_server_InputManager_nativeGetSwitchState },
+    { "nativeHasKeys", "([I[Z)Z",
+            (void*) android_server_InputManager_nativeHasKeys },
+    { "nativeRegisterInputChannel", "(Landroid/view/InputChannel;)V",
+            (void*) android_server_InputManager_nativeRegisterInputChannel },
+    { "nativeUnregisterInputChannel", "(Landroid/view/InputChannel;)V",
+            (void*) android_server_InputManager_nativeUnregisterInputChannel },
+    { "nativeInjectKeyEvent", "(Landroid/view/KeyEvent;IIZI)I",
+            (void*) android_server_InputManager_nativeInjectKeyEvent },
+    { "nativeInjectMotionEvent", "(Landroid/view/MotionEvent;IIZI)I",
+            (void*) android_server_InputManager_nativeInjectMotionEvent },
+    { "nativeSetInputWindows", "([Lcom/android/server/InputWindow;)V",
+            (void*) android_server_InputManager_nativeSetInputWindows },
+    { "nativeSetFocusedApplication", "(Lcom/android/server/InputApplication;)V",
+            (void*) android_server_InputManager_nativeSetFocusedApplication },
+    { "nativeSetInputDispatchMode", "(ZZ)V",
+            (void*) android_server_InputManager_nativeSetInputDispatchMode },
+    { "nativePreemptInputDispatch", "()V",
+            (void*) android_server_InputManager_nativePreemptInputDispatch },
+    { "nativeDump", "()Ljava/lang/String;",
+            (void*) android_server_InputManager_nativeDump },
+};
+
+#define FIND_CLASS(var, className) \
+        var = env->FindClass(className); \
+        LOG_FATAL_IF(! var, "Unable to find class " className); \
+        var = jclass(env->NewGlobalRef(var));
+
+#define GET_METHOD_ID(var, clazz, methodName, methodDescriptor) \
+        var = env->GetMethodID(clazz, methodName, methodDescriptor); \
+        LOG_FATAL_IF(! var, "Unable to find method " methodName);
+
+#define GET_FIELD_ID(var, clazz, fieldName, fieldDescriptor) \
+        var = env->GetFieldID(clazz, fieldName, fieldDescriptor); \
+        LOG_FATAL_IF(! var, "Unable to find field " fieldName);
+
+int register_android_server_InputManager(JNIEnv* env) {
+    int res = jniRegisterNativeMethods(env, "com/android/server/InputManager",
+            gInputManagerMethods, NELEM(gInputManagerMethods));
+    LOG_FATAL_IF(res < 0, "Unable to register native methods.");
+
+    // Callbacks
+
+    FIND_CLASS(gCallbacksClassInfo.clazz, "com/android/server/InputManager$Callbacks");
+
+    GET_METHOD_ID(gCallbacksClassInfo.notifyConfigurationChanged, gCallbacksClassInfo.clazz,
+            "notifyConfigurationChanged", "(JIII)V");
+
+    GET_METHOD_ID(gCallbacksClassInfo.notifyLidSwitchChanged, gCallbacksClassInfo.clazz,
+            "notifyLidSwitchChanged", "(JZ)V");
+
+    GET_METHOD_ID(gCallbacksClassInfo.notifyInputChannelBroken, gCallbacksClassInfo.clazz,
+            "notifyInputChannelBroken", "(Landroid/view/InputChannel;)V");
+
+    GET_METHOD_ID(gCallbacksClassInfo.notifyInputChannelANR, gCallbacksClassInfo.clazz,
+            "notifyInputChannelANR", "(Landroid/view/InputChannel;)J");
+
+    GET_METHOD_ID(gCallbacksClassInfo.notifyInputChannelRecoveredFromANR, gCallbacksClassInfo.clazz,
+            "notifyInputChannelRecoveredFromANR", "(Landroid/view/InputChannel;)V");
+
+    GET_METHOD_ID(gCallbacksClassInfo.notifyANR, gCallbacksClassInfo.clazz,
+            "notifyANR", "(Ljava/lang/Object;)J");
+
+    GET_METHOD_ID(gCallbacksClassInfo.virtualKeyDownFeedback, gCallbacksClassInfo.clazz,
+            "virtualKeyDownFeedback", "()V");
+
+    GET_METHOD_ID(gCallbacksClassInfo.interceptKeyBeforeQueueing, gCallbacksClassInfo.clazz,
+            "interceptKeyBeforeQueueing", "(JIZIZ)I");
+
+    GET_METHOD_ID(gCallbacksClassInfo.interceptKeyBeforeDispatching, gCallbacksClassInfo.clazz,
+            "interceptKeyBeforeDispatching", "(Landroid/view/InputChannel;IIIIII)Z");
+
+    GET_METHOD_ID(gCallbacksClassInfo.checkInjectEventsPermission, gCallbacksClassInfo.clazz,
+            "checkInjectEventsPermission", "(II)Z");
+
+    GET_METHOD_ID(gCallbacksClassInfo.notifyAppSwitchComing, gCallbacksClassInfo.clazz,
+            "notifyAppSwitchComing", "()V");
+
+    GET_METHOD_ID(gCallbacksClassInfo.filterTouchEvents, gCallbacksClassInfo.clazz,
+            "filterTouchEvents", "()Z");
+
+    GET_METHOD_ID(gCallbacksClassInfo.filterJumpyTouchEvents, gCallbacksClassInfo.clazz,
+            "filterJumpyTouchEvents", "()Z");
+
+    GET_METHOD_ID(gCallbacksClassInfo.getVirtualKeyDefinitions, gCallbacksClassInfo.clazz,
+            "getVirtualKeyDefinitions",
+            "(Ljava/lang/String;)[Lcom/android/server/InputManager$VirtualKeyDefinition;");
+
+    GET_METHOD_ID(gCallbacksClassInfo.getExcludedDeviceNames, gCallbacksClassInfo.clazz,
+            "getExcludedDeviceNames", "()[Ljava/lang/String;");
+
+    // VirtualKeyDefinition
+
+    FIND_CLASS(gVirtualKeyDefinitionClassInfo.clazz,
+            "com/android/server/InputManager$VirtualKeyDefinition");
+
+    GET_FIELD_ID(gVirtualKeyDefinitionClassInfo.scanCode, gVirtualKeyDefinitionClassInfo.clazz,
+            "scanCode", "I");
+
+    GET_FIELD_ID(gVirtualKeyDefinitionClassInfo.centerX, gVirtualKeyDefinitionClassInfo.clazz,
+            "centerX", "I");
+
+    GET_FIELD_ID(gVirtualKeyDefinitionClassInfo.centerY, gVirtualKeyDefinitionClassInfo.clazz,
+            "centerY", "I");
+
+    GET_FIELD_ID(gVirtualKeyDefinitionClassInfo.width, gVirtualKeyDefinitionClassInfo.clazz,
+            "width", "I");
+
+    GET_FIELD_ID(gVirtualKeyDefinitionClassInfo.height, gVirtualKeyDefinitionClassInfo.clazz,
+            "height", "I");
+
+    // InputWindow
+
+    FIND_CLASS(gInputWindowClassInfo.clazz, "com/android/server/InputWindow");
+
+    GET_FIELD_ID(gInputWindowClassInfo.inputChannel, gInputWindowClassInfo.clazz,
+            "inputChannel", "Landroid/view/InputChannel;");
+
+    GET_FIELD_ID(gInputWindowClassInfo.layoutParamsFlags, gInputWindowClassInfo.clazz,
+            "layoutParamsFlags", "I");
+
+    GET_FIELD_ID(gInputWindowClassInfo.layoutParamsType, gInputWindowClassInfo.clazz,
+            "layoutParamsType", "I");
+
+    GET_FIELD_ID(gInputWindowClassInfo.dispatchingTimeoutNanos, gInputWindowClassInfo.clazz,
+            "dispatchingTimeoutNanos", "J");
+
+    GET_FIELD_ID(gInputWindowClassInfo.frameLeft, gInputWindowClassInfo.clazz,
+            "frameLeft", "I");
+
+    GET_FIELD_ID(gInputWindowClassInfo.frameTop, gInputWindowClassInfo.clazz,
+            "frameTop", "I");
+
+    GET_FIELD_ID(gInputWindowClassInfo.touchableAreaLeft, gInputWindowClassInfo.clazz,
+            "touchableAreaLeft", "I");
+
+    GET_FIELD_ID(gInputWindowClassInfo.touchableAreaTop, gInputWindowClassInfo.clazz,
+            "touchableAreaTop", "I");
+
+    GET_FIELD_ID(gInputWindowClassInfo.touchableAreaRight, gInputWindowClassInfo.clazz,
+            "touchableAreaRight", "I");
+
+    GET_FIELD_ID(gInputWindowClassInfo.touchableAreaBottom, gInputWindowClassInfo.clazz,
+            "touchableAreaBottom", "I");
+
+    GET_FIELD_ID(gInputWindowClassInfo.visible, gInputWindowClassInfo.clazz,
+            "visible", "Z");
+
+    GET_FIELD_ID(gInputWindowClassInfo.hasFocus, gInputWindowClassInfo.clazz,
+            "hasFocus", "Z");
+
+    GET_FIELD_ID(gInputWindowClassInfo.hasWallpaper, gInputWindowClassInfo.clazz,
+            "hasWallpaper", "Z");
+
+    GET_FIELD_ID(gInputWindowClassInfo.paused, gInputWindowClassInfo.clazz,
+            "paused", "Z");
+
+    GET_FIELD_ID(gInputWindowClassInfo.ownerPid, gInputWindowClassInfo.clazz,
+            "ownerPid", "I");
+
+    GET_FIELD_ID(gInputWindowClassInfo.ownerUid, gInputWindowClassInfo.clazz,
+            "ownerUid", "I");
+
+    // InputApplication
+
+    FIND_CLASS(gInputApplicationClassInfo.clazz, "com/android/server/InputApplication");
+
+    GET_FIELD_ID(gInputApplicationClassInfo.name, gInputApplicationClassInfo.clazz,
+            "name", "Ljava/lang/String;");
+
+    GET_FIELD_ID(gInputApplicationClassInfo.dispatchingTimeoutNanos,
+            gInputApplicationClassInfo.clazz,
+            "dispatchingTimeoutNanos", "J");
+
+    GET_FIELD_ID(gInputApplicationClassInfo.token, gInputApplicationClassInfo.clazz,
+            "token", "Ljava/lang/Object;");
+
+    return 0;
+}
+
+} /* namespace android */
diff --git a/services/jni/com_android_server_KeyInputQueue.cpp b/services/jni/com_android_server_KeyInputQueue.cpp
deleted file mode 100644
index c92f8df..0000000
--- a/services/jni/com_android_server_KeyInputQueue.cpp
+++ /dev/null
@@ -1,358 +0,0 @@
-/*
- * Copyright (C) 2007 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#define LOG_TAG "Input"
-
-#include "jni.h"
-#include "JNIHelp.h"
-#include <utils/misc.h>
-#include <utils/Log.h>
-
-#include <ui/EventHub.h>
-#include <utils/threads.h>
-
-#include <stdio.h>
-
-namespace android {
-
-// ----------------------------------------------------------------------------
-
-static struct input_offsets_t
-{
-    jfieldID mMinValue;
-    jfieldID mMaxValue;
-    jfieldID mFlat;
-    jfieldID mFuzz;
-    
-    jfieldID mDeviceId;
-    jfieldID mType;
-    jfieldID mScancode;
-    jfieldID mKeycode;
-    jfieldID mFlags;
-    jfieldID mValue;
-    jfieldID mWhen;
-} gInputOffsets;
-
-// ----------------------------------------------------------------------------
-
-static Mutex gLock;
-static sp<EventHub> gHub;
-
-static jboolean
-android_server_KeyInputQueue_readEvent(JNIEnv* env, jobject clazz,
-                                          jobject event)
-{
-    gLock.lock();
-    sp<EventHub> hub = gHub;
-    if (hub == NULL) {
-        hub = new EventHub;
-        gHub = hub;
-    }
-    gLock.unlock();
-
-    int32_t deviceId;
-    int32_t type;
-    int32_t scancode, keycode;
-    uint32_t flags;
-    int32_t value;
-    nsecs_t when;
-    bool res = hub->getEvent(&deviceId, &type, &scancode, &keycode,
-            &flags, &value, &when);
-
-    env->SetIntField(event, gInputOffsets.mDeviceId, (jint)deviceId);
-    env->SetIntField(event, gInputOffsets.mType, (jint)type);
-    env->SetIntField(event, gInputOffsets.mScancode, (jint)scancode);
-    env->SetIntField(event, gInputOffsets.mKeycode, (jint)keycode);
-    env->SetIntField(event, gInputOffsets.mFlags, (jint)flags);
-    env->SetIntField(event, gInputOffsets.mValue, value);
-    env->SetLongField(event, gInputOffsets.mWhen,
-                        (jlong)(nanoseconds_to_milliseconds(when)));
-
-    return res;
-}
-
-static jint
-android_server_KeyInputQueue_getDeviceClasses(JNIEnv* env, jobject clazz,
-                                              jint deviceId)
-{
-    jint classes = 0;
-    gLock.lock();
-    if (gHub != NULL) classes = gHub->getDeviceClasses(deviceId);
-    gLock.unlock();
-    return classes;
-}
-
-static jstring
-android_server_KeyInputQueue_getDeviceName(JNIEnv* env, jobject clazz,
-                                              jint deviceId)
-{
-    String8 name;
-    gLock.lock();
-    if (gHub != NULL) name = gHub->getDeviceName(deviceId);
-    gLock.unlock();
-    
-    if (name.size() > 0) {
-        return env->NewStringUTF(name.string());
-    }
-    return NULL;
-}
-
-static void
-android_server_KeyInputQueue_addExcludedDevice(JNIEnv* env, jobject clazz,
-                                              jstring deviceName)
-{
-    gLock.lock();
-    sp<EventHub> hub = gHub;
-    if (hub == NULL) {
-        hub = new EventHub;
-        gHub = hub;
-    }
-    gLock.unlock();
-
-    const char* nameStr = env->GetStringUTFChars(deviceName, NULL);
-    gHub->addExcludedDevice(nameStr);
-    env->ReleaseStringUTFChars(deviceName, nameStr);
-}
-
-static jboolean
-android_server_KeyInputQueue_getAbsoluteInfo(JNIEnv* env, jobject clazz,
-                                             jint deviceId, jint axis,
-                                             jobject info)
-{
-    int32_t minValue, maxValue, flat, fuzz;
-    int res = -1;
-    gLock.lock();
-    if (gHub != NULL) {
-        res = gHub->getAbsoluteInfo(deviceId, axis,
-                &minValue, &maxValue, &flat, &fuzz);
-    }
-    gLock.unlock();
-    
-    if (res < 0) return JNI_FALSE;
-    
-    env->SetIntField(info, gInputOffsets.mMinValue, (jint)minValue);
-    env->SetIntField(info, gInputOffsets.mMaxValue, (jint)maxValue);
-    env->SetIntField(info, gInputOffsets.mFlat, (jint)flat);
-    env->SetIntField(info, gInputOffsets.mFuzz, (jint)fuzz);
-    return JNI_TRUE;
-}
-
-static jint
-android_server_KeyInputQueue_getSwitchState(JNIEnv* env, jobject clazz,
-                                           jint sw)
-{
-    jint st = -1;
-    gLock.lock();
-    if (gHub != NULL) st = gHub->getSwitchState(sw);
-    gLock.unlock();
-    
-    return st;
-}
-
-static jint
-android_server_KeyInputQueue_getSwitchStateDevice(JNIEnv* env, jobject clazz,
-                                            jint deviceId, jint sw)
-{
-    jint st = -1;
-    gLock.lock();
-    if (gHub != NULL) st = gHub->getSwitchState(deviceId, sw);
-    gLock.unlock();
-    
-    return st;
-}
-
-static jint
-android_server_KeyInputQueue_getScancodeState(JNIEnv* env, jobject clazz,
-                                           jint sw)
-{
-    jint st = -1;
-    gLock.lock();
-    if (gHub != NULL) st = gHub->getScancodeState(sw);
-    gLock.unlock();
-    
-    return st;
-}
-
-static jint
-android_server_KeyInputQueue_getScancodeStateDevice(JNIEnv* env, jobject clazz,
-                                            jint deviceId, jint sw)
-{
-    jint st = -1;
-    gLock.lock();
-    if (gHub != NULL) st = gHub->getScancodeState(deviceId, sw);
-    gLock.unlock();
-    
-    return st;
-}
-
-static jint
-android_server_KeyInputQueue_getKeycodeState(JNIEnv* env, jobject clazz,
-                                           jint sw)
-{
-    jint st = -1;
-    gLock.lock();
-    if (gHub != NULL) st = gHub->getKeycodeState(sw);
-    gLock.unlock();
-    
-    return st;
-}
-
-static jint
-android_server_KeyInputQueue_getKeycodeStateDevice(JNIEnv* env, jobject clazz,
-                                            jint deviceId, jint sw)
-{
-    jint st = -1;
-    gLock.lock();
-    if (gHub != NULL) st = gHub->getKeycodeState(deviceId, sw);
-    gLock.unlock();
-    
-    return st;
-}
-
-static jint
-android_server_KeyInputQueue_scancodeToKeycode(JNIEnv* env, jobject clazz,
-                                            jint deviceId, jint scancode)
-{
-    jint res = 0;
-    gLock.lock();
-    if (gHub != NULL) {
-        int32_t keycode;
-        uint32_t flags;
-        gHub->scancodeToKeycode(deviceId, scancode, &keycode, &flags);
-        res = keycode;
-    }
-    gLock.unlock();
-    
-    return res;
-}
-
-static jboolean
-android_server_KeyInputQueue_hasKeys(JNIEnv* env, jobject clazz,
-                                     jintArray keyCodes, jbooleanArray outFlags)
-{
-    jboolean ret = JNI_FALSE;
-
-    int32_t* codes = env->GetIntArrayElements(keyCodes, NULL);
-    uint8_t* flags = env->GetBooleanArrayElements(outFlags, NULL);
-    size_t numCodes = env->GetArrayLength(keyCodes);
-    if (numCodes == env->GetArrayLength(outFlags)) {
-        gLock.lock();
-        if (gHub != NULL) ret = gHub->hasKeys(numCodes, codes, flags);
-        gLock.unlock();
-    }
-
-    env->ReleaseBooleanArrayElements(outFlags, flags, 0);
-    env->ReleaseIntArrayElements(keyCodes, codes, 0);
-    return ret;
-}
-
-// ----------------------------------------------------------------------------
-
-/*
- * JNI registration.
- */
-static JNINativeMethod gInputMethods[] = {
-    /* name, signature, funcPtr */
-    { "readEvent",       "(Landroid/view/RawInputEvent;)Z",
-            (void*) android_server_KeyInputQueue_readEvent },
-    { "getDeviceClasses", "(I)I",
-        (void*) android_server_KeyInputQueue_getDeviceClasses },
-    { "getDeviceName", "(I)Ljava/lang/String;",
-        (void*) android_server_KeyInputQueue_getDeviceName },
-    { "addExcludedDevice", "(Ljava/lang/String;)V",
-        (void*) android_server_KeyInputQueue_addExcludedDevice },
-    { "getAbsoluteInfo", "(IILcom/android/server/InputDevice$AbsoluteInfo;)Z",
-        (void*) android_server_KeyInputQueue_getAbsoluteInfo },
-    { "getSwitchState", "(I)I",
-        (void*) android_server_KeyInputQueue_getSwitchState },
-    { "getSwitchState", "(II)I",
-        (void*) android_server_KeyInputQueue_getSwitchStateDevice },
-    { "nativeGetScancodeState", "(I)I",
-        (void*) android_server_KeyInputQueue_getScancodeState },
-    { "nativeGetScancodeState", "(II)I",
-        (void*) android_server_KeyInputQueue_getScancodeStateDevice },
-    { "nativeGetKeycodeState", "(I)I",
-        (void*) android_server_KeyInputQueue_getKeycodeState },
-    { "nativeGetKeycodeState", "(II)I",
-        (void*) android_server_KeyInputQueue_getKeycodeStateDevice },
-    { "hasKeys", "([I[Z)Z",
-        (void*) android_server_KeyInputQueue_hasKeys },
-    { "scancodeToKeycode", "(II)I",
-        (void*) android_server_KeyInputQueue_scancodeToKeycode },
-};
-
-int register_android_server_KeyInputQueue(JNIEnv* env)
-{
-    jclass input = env->FindClass("com/android/server/KeyInputQueue");
-    LOG_FATAL_IF(input == NULL, "Unable to find class com/android/server/KeyInputQueue");
-    int res = jniRegisterNativeMethods(env, "com/android/server/KeyInputQueue",
-                                        gInputMethods, NELEM(gInputMethods));
-
-    jclass absoluteInfo = env->FindClass("com/android/server/InputDevice$AbsoluteInfo");
-    LOG_FATAL_IF(absoluteInfo == NULL, "Unable to find class com/android/server/InputDevice$AbsoluteInfo");
-    
-    gInputOffsets.mMinValue
-        = env->GetFieldID(absoluteInfo, "minValue", "I");
-    LOG_FATAL_IF(gInputOffsets.mMinValue == NULL, "Unable to find InputDevice.AbsoluteInfo.minValue");
-    
-    gInputOffsets.mMaxValue
-        = env->GetFieldID(absoluteInfo, "maxValue", "I");
-    LOG_FATAL_IF(gInputOffsets.mMaxValue == NULL, "Unable to find InputDevice.AbsoluteInfo.maxValue");
-    
-    gInputOffsets.mFlat
-        = env->GetFieldID(absoluteInfo, "flat", "I");
-    LOG_FATAL_IF(gInputOffsets.mFlat == NULL, "Unable to find InputDevice.AbsoluteInfo.flat");
-    
-    gInputOffsets.mFuzz
-        = env->GetFieldID(absoluteInfo, "fuzz", "I");
-    LOG_FATAL_IF(gInputOffsets.mFuzz == NULL, "Unable to find InputDevice.AbsoluteInfo.fuzz");
-    
-    jclass inputEvent = env->FindClass("android/view/RawInputEvent");
-    LOG_FATAL_IF(inputEvent == NULL, "Unable to find class android/view/RawInputEvent");
-
-    gInputOffsets.mDeviceId
-        = env->GetFieldID(inputEvent, "deviceId", "I");
-    LOG_FATAL_IF(gInputOffsets.mDeviceId == NULL, "Unable to find RawInputEvent.deviceId");
-    
-    gInputOffsets.mType
-        = env->GetFieldID(inputEvent, "type", "I");
-    LOG_FATAL_IF(gInputOffsets.mType == NULL, "Unable to find RawInputEvent.type");
-    
-    gInputOffsets.mScancode
-        = env->GetFieldID(inputEvent, "scancode", "I");
-    LOG_FATAL_IF(gInputOffsets.mScancode == NULL, "Unable to find RawInputEvent.scancode");
-
-    gInputOffsets.mKeycode
-        = env->GetFieldID(inputEvent, "keycode", "I");
-    LOG_FATAL_IF(gInputOffsets.mKeycode == NULL, "Unable to find RawInputEvent.keycode");
-
-    gInputOffsets.mFlags
-        = env->GetFieldID(inputEvent, "flags", "I");
-    LOG_FATAL_IF(gInputOffsets.mFlags == NULL, "Unable to find RawInputEvent.flags");
-
-    gInputOffsets.mValue
-        = env->GetFieldID(inputEvent, "value", "I");
-    LOG_FATAL_IF(gInputOffsets.mValue == NULL, "Unable to find RawInputEvent.value");
-    
-    gInputOffsets.mWhen
-        = env->GetFieldID(inputEvent, "when", "J");
-    LOG_FATAL_IF(gInputOffsets.mWhen == NULL, "Unable to find RawInputEvent.when");
-
-    return res;
-}
-
-}; // namespace android
-
diff --git a/services/jni/com_android_server_PowerManagerService.cpp b/services/jni/com_android_server_PowerManagerService.cpp
new file mode 100644
index 0000000..b80dbc5
--- /dev/null
+++ b/services/jni/com_android_server_PowerManagerService.cpp
@@ -0,0 +1,142 @@
+/*
+ * Copyright (C) 2010 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#define LOG_TAG "PowerManagerService-JNI"
+
+//#define LOG_NDEBUG 0
+
+#include "JNIHelp.h"
+#include "jni.h"
+#include <limits.h>
+#include <android_runtime/AndroidRuntime.h>
+#include "com_android_server_PowerManagerService.h"
+
+namespace android {
+
+// ----------------------------------------------------------------------------
+
+static struct {
+    jclass clazz;
+
+    jmethodID goToSleep;
+    jmethodID userActivity;
+} gPowerManagerServiceClassInfo;
+
+// ----------------------------------------------------------------------------
+
+static jobject gPowerManagerServiceObj;
+
+static Mutex gPowerManagerLock;
+static bool gScreenOn;
+static bool gScreenBright;
+
+// ----------------------------------------------------------------------------
+
+static bool checkAndClearExceptionFromCallback(JNIEnv* env, const char* methodName) {
+    if (env->ExceptionCheck()) {
+        LOGE("An exception was thrown by callback '%s'.", methodName);
+        LOGE_EX(env);
+        env->ExceptionClear();
+        return true;
+    }
+    return false;
+}
+
+bool android_server_PowerManagerService_isScreenOn() {
+    AutoMutex _l(gPowerManagerLock);
+    return gScreenOn;
+}
+
+bool android_server_PowerManagerService_isScreenBright() {
+    AutoMutex _l(gPowerManagerLock);
+    return gScreenBright;
+}
+
+void android_server_PowerManagerService_userActivity(nsecs_t eventTime, int32_t eventType) {
+    if (gPowerManagerServiceObj) {
+        JNIEnv* env = AndroidRuntime::getJNIEnv();
+
+        env->CallVoidMethod(gPowerManagerServiceObj, gPowerManagerServiceClassInfo.userActivity,
+                nanoseconds_to_milliseconds(eventTime), false, eventType, false);
+        checkAndClearExceptionFromCallback(env, "userActivity");
+    }
+}
+
+void android_server_PowerManagerService_goToSleep(nsecs_t eventTime) {
+    if (gPowerManagerServiceObj) {
+        JNIEnv* env = AndroidRuntime::getJNIEnv();
+
+        env->CallVoidMethod(gPowerManagerServiceObj, gPowerManagerServiceClassInfo.goToSleep,
+                nanoseconds_to_milliseconds(eventTime));
+        checkAndClearExceptionFromCallback(env, "goToSleep");
+    }
+}
+
+// ----------------------------------------------------------------------------
+
+static void android_server_PowerManagerService_nativeInit(JNIEnv* env, jobject obj) {
+    gPowerManagerServiceObj = env->NewGlobalRef(obj);
+}
+
+static void android_server_PowerManagerService_nativeSetPowerState(JNIEnv* env,
+        jobject serviceObj, jboolean screenOn, jboolean screenBright) {
+    AutoMutex _l(gPowerManagerLock);
+    gScreenOn = screenOn;
+    gScreenBright = screenBright;
+}
+
+// ----------------------------------------------------------------------------
+
+static JNINativeMethod gPowerManagerServiceMethods[] = {
+    /* name, signature, funcPtr */
+    { "nativeInit", "()V",
+            (void*) android_server_PowerManagerService_nativeInit },
+    { "nativeSetPowerState", "(ZZ)V",
+            (void*) android_server_PowerManagerService_nativeSetPowerState },
+};
+
+#define FIND_CLASS(var, className) \
+        var = env->FindClass(className); \
+        LOG_FATAL_IF(! var, "Unable to find class " className); \
+        var = jclass(env->NewGlobalRef(var));
+
+#define GET_METHOD_ID(var, clazz, methodName, methodDescriptor) \
+        var = env->GetMethodID(clazz, methodName, methodDescriptor); \
+        LOG_FATAL_IF(! var, "Unable to find method " methodName);
+
+#define GET_FIELD_ID(var, clazz, fieldName, fieldDescriptor) \
+        var = env->GetFieldID(clazz, fieldName, fieldDescriptor); \
+        LOG_FATAL_IF(! var, "Unable to find field " fieldName);
+
+int register_android_server_PowerManagerService(JNIEnv* env) {
+    int res = jniRegisterNativeMethods(env, "com/android/server/PowerManagerService",
+            gPowerManagerServiceMethods, NELEM(gPowerManagerServiceMethods));
+    LOG_FATAL_IF(res < 0, "Unable to register native methods.");
+
+    // Callbacks
+
+    FIND_CLASS(gPowerManagerServiceClassInfo.clazz, "com/android/server/PowerManagerService");
+
+    GET_METHOD_ID(gPowerManagerServiceClassInfo.goToSleep, gPowerManagerServiceClassInfo.clazz,
+            "goToSleep", "(J)V");
+
+    GET_METHOD_ID(gPowerManagerServiceClassInfo.userActivity, gPowerManagerServiceClassInfo.clazz,
+            "userActivity", "(JZIZ)V");
+
+    return 0;
+}
+
+} /* namespace android */
diff --git a/services/jni/com_android_server_PowerManagerService.h b/services/jni/com_android_server_PowerManagerService.h
new file mode 100644
index 0000000..9b05f38
--- /dev/null
+++ b/services/jni/com_android_server_PowerManagerService.h
@@ -0,0 +1,42 @@
+/*
+ * Copyright (C) 2010 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef _ANDROID_SERVER_POWER_MANAGER_SERVICE_H
+#define _ANDROID_SERVER_POWER_MANAGER_SERVICE_H
+
+#include "JNIHelp.h"
+#include "jni.h"
+
+namespace android {
+
+enum {
+    POWER_MANAGER_OTHER_EVENT = 0,
+    POWER_MANAGER_CHEEK_EVENT = 1,
+    POWER_MANAGER_TOUCH_EVENT = 2, // touch events are TOUCH for 300ms, and then either
+                                   // up events or LONG_TOUCH events.
+    POWER_MANAGER_LONG_TOUCH_EVENT = 3,
+    POWER_MANAGER_TOUCH_UP_EVENT = 4,
+    POWER_MANAGER_BUTTON_EVENT = 5, // Button and trackball events.
+};
+
+extern bool android_server_PowerManagerService_isScreenOn();
+extern bool android_server_PowerManagerService_isScreenBright();
+extern void android_server_PowerManagerService_userActivity(nsecs_t eventTime, int32_t eventType);
+extern void android_server_PowerManagerService_goToSleep(nsecs_t eventTime);
+
+} // namespace android
+
+#endif // _ANDROID_SERVER_POWER_MANAGER_SERVICE_H
diff --git a/services/jni/com_android_server_location_GpsLocationProvider.cpp b/services/jni/com_android_server_location_GpsLocationProvider.cpp
new file mode 100755
index 0000000..59d7cde
--- /dev/null
+++ b/services/jni/com_android_server_location_GpsLocationProvider.cpp
@@ -0,0 +1,467 @@
+/*
+ * Copyright (C) 2008 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#define LOG_TAG "GpsLocationProvider"
+
+//#define LOG_NDEBUG 0
+
+#include "JNIHelp.h"
+#include "jni.h"
+#include "hardware/hardware.h"
+#include "hardware/gps.h"
+#include "hardware_legacy/power.h"
+#include "utils/Log.h"
+#include "utils/misc.h"
+#include "android_runtime/AndroidRuntime.h"
+
+#include <string.h>
+#include <pthread.h>
+
+static jobject mCallbacksObj = NULL;
+
+static jmethodID method_reportLocation;
+static jmethodID method_reportStatus;
+static jmethodID method_reportSvStatus;
+static jmethodID method_reportAGpsStatus;
+static jmethodID method_reportNmea;
+static jmethodID method_setEngineCapabilities;
+static jmethodID method_xtraDownloadRequest;
+static jmethodID method_reportNiNotification;
+
+static const GpsInterface* sGpsInterface = NULL;
+static const GpsXtraInterface* sGpsXtraInterface = NULL;
+static const AGpsInterface* sAGpsInterface = NULL;
+static const GpsNiInterface* sGpsNiInterface = NULL;
+static const GpsDebugInterface* sGpsDebugInterface = NULL;
+
+// temporary storage for GPS callbacks
+static GpsSvStatus  sGpsSvStatus;
+static const char* sNmeaString;
+static int sNmeaStringLength;
+
+#define WAKE_LOCK_NAME  "GPS"
+
+namespace android {
+
+static void checkAndClearExceptionFromCallback(JNIEnv* env, const char* methodName) {
+    if (env->ExceptionCheck()) {
+        LOGE("An exception was thrown by callback '%s'.", methodName);
+        LOGE_EX(env);
+        env->ExceptionClear();
+    }
+}
+
+static void location_callback(GpsLocation* location)
+{
+    JNIEnv* env = AndroidRuntime::getJNIEnv();
+    env->CallVoidMethod(mCallbacksObj, method_reportLocation, location->flags,
+            (jdouble)location->latitude, (jdouble)location->longitude,
+            (jdouble)location->altitude,
+            (jfloat)location->speed, (jfloat)location->bearing,
+            (jfloat)location->accuracy, (jlong)location->timestamp);
+    checkAndClearExceptionFromCallback(env, __FUNCTION__);
+}
+
+static void status_callback(GpsStatus* status)
+{
+    JNIEnv* env = AndroidRuntime::getJNIEnv();
+    env->CallVoidMethod(mCallbacksObj, method_reportStatus, status->status);
+    checkAndClearExceptionFromCallback(env, __FUNCTION__);
+}
+
+static void sv_status_callback(GpsSvStatus* sv_status)
+{
+    JNIEnv* env = AndroidRuntime::getJNIEnv();
+    memcpy(&sGpsSvStatus, sv_status, sizeof(sGpsSvStatus));
+    env->CallVoidMethod(mCallbacksObj, method_reportSvStatus);
+    checkAndClearExceptionFromCallback(env, __FUNCTION__);
+}
+
+static void nmea_callback(GpsUtcTime timestamp, const char* nmea, int length)
+{
+    JNIEnv* env = AndroidRuntime::getJNIEnv();
+    // The Java code will call back to read these values
+    // We do this to avoid creating unnecessary String objects
+    sNmeaString = nmea;
+    sNmeaStringLength = length;
+    env->CallVoidMethod(mCallbacksObj, method_reportNmea, timestamp);
+    checkAndClearExceptionFromCallback(env, __FUNCTION__);
+}
+
+static void set_capabilities_callback(uint32_t capabilities)
+{
+    JNIEnv* env = AndroidRuntime::getJNIEnv();
+    env->CallVoidMethod(mCallbacksObj, method_setEngineCapabilities, capabilities);
+    checkAndClearExceptionFromCallback(env, __FUNCTION__);
+}
+
+static void acquire_wakelock_callback()
+{
+    acquire_wake_lock(PARTIAL_WAKE_LOCK, WAKE_LOCK_NAME);
+}
+
+static void release_wakelock_callback()
+{
+    release_wake_lock(WAKE_LOCK_NAME);
+}
+
+static pthread_t create_thread_callback(const char* name, void (*start)(void *), void* arg)
+{
+    return (pthread_t)AndroidRuntime::createJavaThread(name, start, arg);
+}
+
+GpsCallbacks sGpsCallbacks = {
+    sizeof(GpsCallbacks),
+    location_callback,
+    status_callback,
+    sv_status_callback,
+    nmea_callback,
+    set_capabilities_callback,
+    acquire_wakelock_callback,
+    release_wakelock_callback,
+    create_thread_callback,
+};
+
+static void xtra_download_request_callback()
+{
+    JNIEnv* env = AndroidRuntime::getJNIEnv();
+    env->CallVoidMethod(mCallbacksObj, method_xtraDownloadRequest);
+    checkAndClearExceptionFromCallback(env, __FUNCTION__);
+}
+
+GpsXtraCallbacks sGpsXtraCallbacks = {
+    xtra_download_request_callback,
+    create_thread_callback,
+};
+
+static void agps_status_callback(AGpsStatus* agps_status)
+{
+    JNIEnv* env = AndroidRuntime::getJNIEnv();
+    env->CallVoidMethod(mCallbacksObj, method_reportAGpsStatus,
+                        agps_status->type, agps_status->status);
+    checkAndClearExceptionFromCallback(env, __FUNCTION__);
+}
+
+AGpsCallbacks sAGpsCallbacks = {
+    agps_status_callback,
+    create_thread_callback,
+};
+
+static void gps_ni_notify_callback(GpsNiNotification *notification)
+{
+    LOGD("gps_ni_notify_callback\n");
+    JNIEnv* env = AndroidRuntime::getJNIEnv();
+    jstring requestor_id = env->NewStringUTF(notification->requestor_id);
+    jstring text = env->NewStringUTF(notification->text);
+    jstring extras = env->NewStringUTF(notification->extras);
+
+    if (requestor_id && text && extras) {
+        env->CallVoidMethod(mCallbacksObj, method_reportNiNotification,
+            notification->notification_id, notification->ni_type,
+            notification->notify_flags, notification->timeout,
+            notification->default_response, requestor_id, text,
+            notification->requestor_id_encoding,
+            notification->text_encoding, extras);
+    } else {
+        LOGE("out of memory in gps_ni_notify_callback\n");
+    }
+
+    if (requestor_id)
+        env->DeleteLocalRef(requestor_id);
+    if (text)
+        env->DeleteLocalRef(text);
+    if (extras)
+        env->DeleteLocalRef(extras);
+    checkAndClearExceptionFromCallback(env, __FUNCTION__);
+}
+
+GpsNiCallbacks sGpsNiCallbacks = {
+    gps_ni_notify_callback,
+    create_thread_callback,
+};
+
+static void android_location_GpsLocationProvider_class_init_native(JNIEnv* env, jclass clazz) {
+    method_reportLocation = env->GetMethodID(clazz, "reportLocation", "(IDDDFFFJ)V");
+    method_reportStatus = env->GetMethodID(clazz, "reportStatus", "(I)V");
+    method_reportSvStatus = env->GetMethodID(clazz, "reportSvStatus", "()V");
+    method_reportAGpsStatus = env->GetMethodID(clazz, "reportAGpsStatus", "(II)V");
+    method_reportNmea = env->GetMethodID(clazz, "reportNmea", "(J)V");
+    method_setEngineCapabilities = env->GetMethodID(clazz, "setEngineCapabilities", "(I)V");
+    method_xtraDownloadRequest = env->GetMethodID(clazz, "xtraDownloadRequest", "()V");
+    method_reportNiNotification = env->GetMethodID(clazz, "reportNiNotification", "(IIIIILjava/lang/String;Ljava/lang/String;IILjava/lang/String;)V");
+}
+
+static const GpsInterface* get_gps_interface() {
+    int err;
+    hw_module_t* module;
+    const GpsInterface* interface = NULL;
+
+    err = hw_get_module(GPS_HARDWARE_MODULE_ID, (hw_module_t const**)&module);
+    if (err == 0) {
+        hw_device_t* device;
+        err = module->methods->open(module, GPS_HARDWARE_MODULE_ID, &device);
+        if (err == 0) {
+            gps_device_t* gps_device = (gps_device_t *)device;
+            interface = gps_device->get_gps_interface(gps_device);
+        }
+    }
+
+    return interface;
+}
+
+static jboolean android_location_GpsLocationProvider_is_supported(JNIEnv* env, jclass clazz) {
+    if (!sGpsInterface)
+        sGpsInterface = get_gps_interface();
+    return (sGpsInterface != NULL);
+}
+
+static jboolean android_location_GpsLocationProvider_init(JNIEnv* env, jobject obj)
+{
+    // this must be set before calling into the HAL library
+    if (!mCallbacksObj)
+        mCallbacksObj = env->NewGlobalRef(obj);
+
+    if (!sGpsInterface)
+        sGpsInterface = get_gps_interface();
+    if (!sGpsInterface || sGpsInterface->init(&sGpsCallbacks) != 0)
+        return false;
+
+    if (!sAGpsInterface)
+        sAGpsInterface = (const AGpsInterface*)sGpsInterface->get_extension(AGPS_INTERFACE);
+    if (sAGpsInterface)
+        sAGpsInterface->init(&sAGpsCallbacks);
+
+    if (!sGpsNiInterface)
+       sGpsNiInterface = (const GpsNiInterface*)sGpsInterface->get_extension(GPS_NI_INTERFACE);
+    if (sGpsNiInterface)
+       sGpsNiInterface->init(&sGpsNiCallbacks);
+
+    if (!sGpsDebugInterface)
+       sGpsDebugInterface = (const GpsDebugInterface*)sGpsInterface->get_extension(GPS_DEBUG_INTERFACE);
+
+    return true;
+}
+
+static void android_location_GpsLocationProvider_cleanup(JNIEnv* env, jobject obj)
+{
+    sGpsInterface->cleanup();
+}
+
+static jboolean android_location_GpsLocationProvider_set_position_mode(JNIEnv* env, jobject obj,
+        jint mode, jint recurrence, jint min_interval, jint preferred_accuracy, jint preferred_time)
+{
+    return (sGpsInterface->set_position_mode(mode, recurrence, min_interval, preferred_accuracy,
+            preferred_time) == 0);
+}
+
+static jboolean android_location_GpsLocationProvider_start(JNIEnv* env, jobject obj)
+{
+    return (sGpsInterface->start() == 0);
+}
+
+static jboolean android_location_GpsLocationProvider_stop(JNIEnv* env, jobject obj)
+{
+    return (sGpsInterface->stop() == 0);
+}
+
+static void android_location_GpsLocationProvider_delete_aiding_data(JNIEnv* env, jobject obj, jint flags)
+{
+    sGpsInterface->delete_aiding_data(flags);
+}
+
+static jint android_location_GpsLocationProvider_read_sv_status(JNIEnv* env, jobject obj,
+        jintArray prnArray, jfloatArray snrArray, jfloatArray elevArray, jfloatArray azumArray,
+        jintArray maskArray)
+{
+    // this should only be called from within a call to reportSvStatus
+
+    jint* prns = env->GetIntArrayElements(prnArray, 0);
+    jfloat* snrs = env->GetFloatArrayElements(snrArray, 0);
+    jfloat* elev = env->GetFloatArrayElements(elevArray, 0);
+    jfloat* azim = env->GetFloatArrayElements(azumArray, 0);
+    jint* mask = env->GetIntArrayElements(maskArray, 0);
+
+    int num_svs = sGpsSvStatus.num_svs;
+    for (int i = 0; i < num_svs; i++) {
+        prns[i] = sGpsSvStatus.sv_list[i].prn;
+        snrs[i] = sGpsSvStatus.sv_list[i].snr;
+        elev[i] = sGpsSvStatus.sv_list[i].elevation;
+        azim[i] = sGpsSvStatus.sv_list[i].azimuth;
+    }
+    mask[0] = sGpsSvStatus.ephemeris_mask;
+    mask[1] = sGpsSvStatus.almanac_mask;
+    mask[2] = sGpsSvStatus.used_in_fix_mask;
+
+    env->ReleaseIntArrayElements(prnArray, prns, 0);
+    env->ReleaseFloatArrayElements(snrArray, snrs, 0);
+    env->ReleaseFloatArrayElements(elevArray, elev, 0);
+    env->ReleaseFloatArrayElements(azumArray, azim, 0);
+    env->ReleaseIntArrayElements(maskArray, mask, 0);
+    return num_svs;
+}
+
+static jint android_location_GpsLocationProvider_read_nmea(JNIEnv* env, jobject obj,
+                                            jbyteArray nmeaArray, jint buffer_size)
+{
+    // this should only be called from within a call to reportNmea
+    jbyte* nmea = (jbyte *)env->GetPrimitiveArrayCritical(nmeaArray, 0);
+    int length = sNmeaStringLength;
+    if (length > buffer_size)
+        length = buffer_size;
+    memcpy(nmea, sNmeaString, length);
+    env->ReleasePrimitiveArrayCritical(nmeaArray, nmea, JNI_ABORT);
+    return length;
+}
+
+static void android_location_GpsLocationProvider_inject_time(JNIEnv* env, jobject obj,
+        jlong time, jlong timeReference, jint uncertainty)
+{
+    sGpsInterface->inject_time(time, timeReference, uncertainty);
+}
+
+static void android_location_GpsLocationProvider_inject_location(JNIEnv* env, jobject obj,
+        jdouble latitude, jdouble longitude, jfloat accuracy)
+{
+    sGpsInterface->inject_location(latitude, longitude, accuracy);
+}
+
+static jboolean android_location_GpsLocationProvider_supports_xtra(JNIEnv* env, jobject obj)
+{
+    if (!sGpsXtraInterface) {
+        sGpsXtraInterface = (const GpsXtraInterface*)sGpsInterface->get_extension(GPS_XTRA_INTERFACE);
+        if (sGpsXtraInterface) {
+            int result = sGpsXtraInterface->init(&sGpsXtraCallbacks);
+            if (result) {
+                sGpsXtraInterface = NULL;
+            }
+        }
+    }
+
+    return (sGpsXtraInterface != NULL);
+}
+
+static void android_location_GpsLocationProvider_inject_xtra_data(JNIEnv* env, jobject obj,
+        jbyteArray data, jint length)
+{
+    jbyte* bytes = (jbyte *)env->GetPrimitiveArrayCritical(data, 0);
+    sGpsXtraInterface->inject_xtra_data((char *)bytes, length);
+    env->ReleasePrimitiveArrayCritical(data, bytes, JNI_ABORT);
+}
+
+static void android_location_GpsLocationProvider_agps_data_conn_open(JNIEnv* env, jobject obj, jstring apn)
+{
+    if (!sAGpsInterface) {
+        sAGpsInterface = (const AGpsInterface*)sGpsInterface->get_extension(AGPS_INTERFACE);
+    }
+    if (sAGpsInterface) {
+        if (apn == NULL) {
+            jniThrowException(env, "java/lang/IllegalArgumentException", NULL);
+            return;
+        }
+        const char *apnStr = env->GetStringUTFChars(apn, NULL);
+        sAGpsInterface->data_conn_open(apnStr);
+        env->ReleaseStringUTFChars(apn, apnStr);
+    }
+}
+
+static void android_location_GpsLocationProvider_agps_data_conn_closed(JNIEnv* env, jobject obj)
+{
+    if (!sAGpsInterface) {
+        sAGpsInterface = (const AGpsInterface*)sGpsInterface->get_extension(AGPS_INTERFACE);
+    }
+    if (sAGpsInterface) {
+        sAGpsInterface->data_conn_closed();
+    }
+}
+
+static void android_location_GpsLocationProvider_agps_data_conn_failed(JNIEnv* env, jobject obj)
+{
+    if (!sAGpsInterface) {
+        sAGpsInterface = (const AGpsInterface*)sGpsInterface->get_extension(AGPS_INTERFACE);
+    }
+    if (sAGpsInterface) {
+        sAGpsInterface->data_conn_failed();
+    }
+}
+
+static void android_location_GpsLocationProvider_set_agps_server(JNIEnv* env, jobject obj,
+        jint type, jstring hostname, jint port)
+{
+    if (!sAGpsInterface) {
+        sAGpsInterface = (const AGpsInterface*)sGpsInterface->get_extension(AGPS_INTERFACE);
+    }
+    if (sAGpsInterface) {
+        const char *c_hostname = env->GetStringUTFChars(hostname, NULL);
+        sAGpsInterface->set_server(type, c_hostname, port);
+        env->ReleaseStringUTFChars(hostname, c_hostname);
+    }
+}
+
+static void android_location_GpsLocationProvider_send_ni_response(JNIEnv* env, jobject obj,
+      jint notifId, jint response)
+{
+    if (!sGpsNiInterface) {
+        sGpsNiInterface = (const GpsNiInterface*)sGpsInterface->get_extension(GPS_NI_INTERFACE);
+    }
+    if (sGpsNiInterface) {
+        sGpsNiInterface->respond(notifId, response);
+    }
+}
+
+static jstring android_location_GpsLocationProvider_get_internal_state(JNIEnv* env, jobject obj)
+{
+    jstring result = NULL;
+    if (sGpsDebugInterface) {
+        const size_t maxLength = 2047;
+        char buffer[maxLength+1];
+        size_t length = sGpsDebugInterface->get_internal_state(buffer, maxLength);
+        if (length > maxLength) length = maxLength;
+        buffer[length] = 0;
+        result = env->NewStringUTF(buffer);
+    }
+    return result;
+}
+
+static JNINativeMethod sMethods[] = {
+     /* name, signature, funcPtr */
+    {"class_init_native", "()V", (void *)android_location_GpsLocationProvider_class_init_native},
+    {"native_is_supported", "()Z", (void*)android_location_GpsLocationProvider_is_supported},
+    {"native_init", "()Z", (void*)android_location_GpsLocationProvider_init},
+    {"native_cleanup", "()V", (void*)android_location_GpsLocationProvider_cleanup},
+    {"native_set_position_mode", "(IIIII)Z", (void*)android_location_GpsLocationProvider_set_position_mode},
+    {"native_start", "()Z", (void*)android_location_GpsLocationProvider_start},
+    {"native_stop", "()Z", (void*)android_location_GpsLocationProvider_stop},
+    {"native_delete_aiding_data", "(I)V", (void*)android_location_GpsLocationProvider_delete_aiding_data},
+    {"native_read_sv_status", "([I[F[F[F[I)I", (void*)android_location_GpsLocationProvider_read_sv_status},
+    {"native_read_nmea", "([BI)I", (void*)android_location_GpsLocationProvider_read_nmea},
+    {"native_inject_time", "(JJI)V", (void*)android_location_GpsLocationProvider_inject_time},
+    {"native_inject_location", "(DDF)V", (void*)android_location_GpsLocationProvider_inject_location},
+    {"native_supports_xtra", "()Z", (void*)android_location_GpsLocationProvider_supports_xtra},
+    {"native_inject_xtra_data", "([BI)V", (void*)android_location_GpsLocationProvider_inject_xtra_data},
+    {"native_agps_data_conn_open", "(Ljava/lang/String;)V", (void*)android_location_GpsLocationProvider_agps_data_conn_open},
+    {"native_agps_data_conn_closed", "()V", (void*)android_location_GpsLocationProvider_agps_data_conn_closed},
+    {"native_agps_data_conn_failed", "()V", (void*)android_location_GpsLocationProvider_agps_data_conn_failed},
+    {"native_set_agps_server", "(ILjava/lang/String;I)V", (void*)android_location_GpsLocationProvider_set_agps_server},
+    {"native_send_ni_response", "(II)V", (void*)android_location_GpsLocationProvider_send_ni_response},
+    {"native_get_internal_state", "()Ljava/lang/String;", (void*)android_location_GpsLocationProvider_get_internal_state},
+};
+
+int register_android_server_location_GpsLocationProvider(JNIEnv* env)
+{
+    return jniRegisterNativeMethods(env, "com/android/server/location/GpsLocationProvider", sMethods, NELEM(sMethods));
+}
+
+} /* namespace android */
diff --git a/services/jni/onload.cpp b/services/jni/onload.cpp
index c16fdb8..1a2d8b6 100644
--- a/services/jni/onload.cpp
+++ b/services/jni/onload.cpp
@@ -6,11 +6,13 @@
 namespace android {
 int register_android_server_AlarmManagerService(JNIEnv* env);
 int register_android_server_BatteryService(JNIEnv* env);
-int register_android_server_KeyInputQueue(JNIEnv* env);
+int register_android_server_InputManager(JNIEnv* env);
 int register_android_server_LightsService(JNIEnv* env);
+int register_android_server_PowerManagerService(JNIEnv* env);
 int register_android_server_SensorService(JNIEnv* env);
 int register_android_server_VibratorService(JNIEnv* env);
 int register_android_server_SystemServer(JNIEnv* env);
+int register_android_server_location_GpsLocationProvider(JNIEnv* env);
 };
 
 using namespace android;
@@ -26,13 +28,15 @@
     }
     LOG_ASSERT(env, "Could not retrieve the env!");
 
-    register_android_server_KeyInputQueue(env);
+    register_android_server_PowerManagerService(env);
+    register_android_server_InputManager(env);
     register_android_server_LightsService(env);
     register_android_server_AlarmManagerService(env);
     register_android_server_BatteryService(env);
     register_android_server_SensorService(env);
     register_android_server_VibratorService(env);
     register_android_server_SystemServer(env);
+    register_android_server_location_GpsLocationProvider(env);
 
     return JNI_VERSION_1_4;
 }
diff --git a/services/surfaceflinger/Android.mk b/services/surfaceflinger/Android.mk
new file mode 100644
index 0000000..a14bfb5
--- /dev/null
+++ b/services/surfaceflinger/Android.mk
@@ -0,0 +1,52 @@
+LOCAL_PATH:= $(call my-dir)
+include $(CLEAR_VARS)
+
+LOCAL_SRC_FILES:= \
+    clz.cpp.arm \
+    DisplayHardware/DisplayHardware.cpp \
+    DisplayHardware/DisplayHardwareBase.cpp \
+    BlurFilter.cpp.arm \
+    GLExtensions.cpp \
+    Layer.cpp \
+    LayerBase.cpp \
+    LayerBuffer.cpp \
+    LayerBlur.cpp \
+    LayerDim.cpp \
+    MessageQueue.cpp \
+    SurfaceFlinger.cpp \
+    TextureManager.cpp \
+    Transform.cpp
+
+LOCAL_CFLAGS:= -DLOG_TAG=\"SurfaceFlinger\"
+LOCAL_CFLAGS += -DGL_GLEXT_PROTOTYPES -DEGL_EGLEXT_PROTOTYPES
+
+ifeq ($(TARGET_BOARD_PLATFORM), omap3)
+	LOCAL_CFLAGS += -DNO_RGBX_8888
+endif
+
+# need "-lrt" on Linux simulator to pick up clock_gettime
+ifeq ($(TARGET_SIMULATOR),true)
+	ifeq ($(HOST_OS),linux)
+		LOCAL_LDLIBS += -lrt -lpthread
+	endif
+endif
+
+LOCAL_SHARED_LIBRARIES := \
+	libcutils \
+	libpixelflinger \
+	libhardware \
+	libutils \
+	libEGL \
+	libGLESv1_CM \
+	libbinder \
+	libui \
+	libsurfaceflinger_client
+
+LOCAL_C_INCLUDES := \
+	$(call include-path-for, corecg graphics)
+
+LOCAL_C_INCLUDES += hardware/libhardware/modules/gralloc
+
+LOCAL_MODULE:= libsurfaceflinger
+
+include $(BUILD_SHARED_LIBRARY)
diff --git a/services/surfaceflinger/Barrier.h b/services/surfaceflinger/Barrier.h
new file mode 100644
index 0000000..6f8507e
--- /dev/null
+++ b/services/surfaceflinger/Barrier.h
@@ -0,0 +1,55 @@
+/*
+ * Copyright (C) 2007 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef ANDROID_BARRIER_H
+#define ANDROID_BARRIER_H
+
+#include <stdint.h>
+#include <sys/types.h>
+#include <utils/threads.h>
+
+namespace android {
+
+class Barrier
+{
+public:
+    inline Barrier() : state(CLOSED) { }
+    inline ~Barrier() { }
+    void open() {
+        Mutex::Autolock _l(lock);
+        state = OPENED;
+        cv.broadcast();
+    }
+    void close() {
+        Mutex::Autolock _l(lock);
+        state = CLOSED;
+    }
+    void wait() const {
+        Mutex::Autolock _l(lock);
+        while (state == CLOSED) {
+            cv.wait(lock);
+        }
+    }
+private:
+    enum { OPENED, CLOSED };
+    mutable     Mutex       lock;
+    mutable     Condition   cv;
+    volatile    int         state;
+};
+
+}; // namespace android
+
+#endif // ANDROID_BARRIER_H
diff --git a/libs/surfaceflinger/BlurFilter.cpp b/services/surfaceflinger/BlurFilter.cpp
similarity index 100%
rename from libs/surfaceflinger/BlurFilter.cpp
rename to services/surfaceflinger/BlurFilter.cpp
diff --git a/libs/surfaceflinger/BlurFilter.h b/services/surfaceflinger/BlurFilter.h
similarity index 100%
rename from libs/surfaceflinger/BlurFilter.h
rename to services/surfaceflinger/BlurFilter.h
diff --git a/services/surfaceflinger/DisplayHardware/DisplayHardware.cpp b/services/surfaceflinger/DisplayHardware/DisplayHardware.cpp
new file mode 100644
index 0000000..2eac0a8
--- /dev/null
+++ b/services/surfaceflinger/DisplayHardware/DisplayHardware.cpp
@@ -0,0 +1,336 @@
+/*
+ * Copyright (C) 2007 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include <stdlib.h>
+#include <stdio.h>
+#include <string.h>
+#include <math.h>
+
+#include <cutils/properties.h>
+
+#include <utils/RefBase.h>
+#include <utils/Log.h>
+
+#include <ui/PixelFormat.h>
+#include <ui/FramebufferNativeWindow.h>
+#include <ui/EGLUtils.h>
+
+#include <GLES/gl.h>
+#include <EGL/egl.h>
+#include <EGL/eglext.h>
+
+#include <pixelflinger/pixelflinger.h>
+
+#include "DisplayHardware/DisplayHardware.h"
+
+#include <hardware/copybit.h>
+#include <hardware/overlay.h>
+#include <hardware/gralloc.h>
+
+#include "GLExtensions.h"
+
+using namespace android;
+
+
+static __attribute__((noinline))
+void checkGLErrors()
+{
+    do {
+        // there could be more than one error flag
+        GLenum error = glGetError();
+        if (error == GL_NO_ERROR)
+            break;
+        LOGE("GL error 0x%04x", int(error));
+    } while(true);
+}
+
+static __attribute__((noinline))
+void checkEGLErrors(const char* token)
+{
+    EGLint error = eglGetError();
+    if (error && error != EGL_SUCCESS) {
+        LOGE("%s: EGL error 0x%04x (%s)",
+                token, int(error), EGLUtils::strerror(error));
+    }
+}
+
+/*
+ * Initialize the display to the specified values.
+ *
+ */
+
+DisplayHardware::DisplayHardware(
+        const sp<SurfaceFlinger>& flinger,
+        uint32_t dpy)
+    : DisplayHardwareBase(flinger, dpy),
+      mFlags(0)
+{
+    init(dpy);
+}
+
+DisplayHardware::~DisplayHardware()
+{
+    fini();
+}
+
+float DisplayHardware::getDpiX() const          { return mDpiX; }
+float DisplayHardware::getDpiY() const          { return mDpiY; }
+float DisplayHardware::getDensity() const       { return mDensity; }
+float DisplayHardware::getRefreshRate() const   { return mRefreshRate; }
+int DisplayHardware::getWidth() const           { return mWidth; }
+int DisplayHardware::getHeight() const          { return mHeight; }
+PixelFormat DisplayHardware::getFormat() const  { return mFormat; }
+uint32_t DisplayHardware::getMaxTextureSize() const { return mMaxTextureSize; }
+uint32_t DisplayHardware::getMaxViewportDims() const { return mMaxViewportDims; }
+
+void DisplayHardware::init(uint32_t dpy)
+{
+    mNativeWindow = new FramebufferNativeWindow();
+    framebuffer_device_t const * fbDev = mNativeWindow->getDevice();
+    mDpiX = mNativeWindow->xdpi;
+    mDpiY = mNativeWindow->ydpi;
+    mRefreshRate = fbDev->fps;
+
+    mOverlayEngine = NULL;
+    hw_module_t const* module;
+    if (hw_get_module(OVERLAY_HARDWARE_MODULE_ID, &module) == 0) {
+        overlay_control_open(module, &mOverlayEngine);
+    }
+
+    EGLint w, h, dummy;
+    EGLint numConfigs=0;
+    EGLSurface surface;
+    EGLContext context;
+
+    // initialize EGL
+    EGLint attribs[] = {
+            EGL_SURFACE_TYPE,   EGL_WINDOW_BIT,
+            EGL_NONE,           0,
+            EGL_NONE
+    };
+
+    // debug: disable h/w rendering
+    char property[PROPERTY_VALUE_MAX];
+    if (property_get("debug.sf.hw", property, NULL) > 0) {
+        if (atoi(property) == 0) {
+            LOGW("H/W composition disabled");
+            attribs[2] = EGL_CONFIG_CAVEAT;
+            attribs[3] = EGL_SLOW_CONFIG;
+        }
+    }
+
+    // TODO: all the extensions below should be queried through
+    // eglGetProcAddress().
+
+    EGLDisplay display = eglGetDisplay(EGL_DEFAULT_DISPLAY);
+    eglInitialize(display, NULL, NULL);
+    eglGetConfigs(display, NULL, 0, &numConfigs);
+
+    EGLConfig config;
+    status_t err = EGLUtils::selectConfigForNativeWindow(
+            display, attribs, mNativeWindow.get(), &config);
+    LOGE_IF(err, "couldn't find an EGLConfig matching the screen format");
+    
+    EGLint r,g,b,a;
+    eglGetConfigAttrib(display, config, EGL_RED_SIZE,   &r);
+    eglGetConfigAttrib(display, config, EGL_GREEN_SIZE, &g);
+    eglGetConfigAttrib(display, config, EGL_BLUE_SIZE,  &b);
+    eglGetConfigAttrib(display, config, EGL_ALPHA_SIZE, &a);
+
+    if (mNativeWindow->isUpdateOnDemand()) {
+        mFlags |= PARTIAL_UPDATES;
+    }
+    
+    if (eglGetConfigAttrib(display, config, EGL_CONFIG_CAVEAT, &dummy) == EGL_TRUE) {
+        if (dummy == EGL_SLOW_CONFIG)
+            mFlags |= SLOW_CONFIG;
+    }
+
+    /*
+     * Create our main surface
+     */
+
+    surface = eglCreateWindowSurface(display, config, mNativeWindow.get(), NULL);
+    eglQuerySurface(display, surface, EGL_WIDTH,  &mWidth);
+    eglQuerySurface(display, surface, EGL_HEIGHT, &mHeight);
+
+    if (mFlags & PARTIAL_UPDATES) {
+        // if we have partial updates, we definitely don't need to
+        // preserve the backbuffer, which may be costly.
+        eglSurfaceAttrib(display, surface,
+                EGL_SWAP_BEHAVIOR, EGL_BUFFER_DESTROYED);
+    }
+
+    if (eglQuerySurface(display, surface, EGL_SWAP_BEHAVIOR, &dummy) == EGL_TRUE) {
+        if (dummy == EGL_BUFFER_PRESERVED) {
+            mFlags |= BUFFER_PRESERVED;
+        }
+    }
+    
+    /* Read density from build-specific ro.sf.lcd_density property
+     * except if it is overridden by qemu.sf.lcd_density.
+     */
+    if (property_get("qemu.sf.lcd_density", property, NULL) <= 0) {
+        if (property_get("ro.sf.lcd_density", property, NULL) <= 0) {
+            LOGW("ro.sf.lcd_density not defined, using 160 dpi by default.");
+            strcpy(property, "160");
+        }
+    } else {
+        /* for the emulator case, reset the dpi values too */
+        mDpiX = mDpiY = atoi(property);
+    }
+    mDensity = atoi(property) * (1.0f/160.0f);
+
+
+    /*
+     * Create our OpenGL ES context
+     */
+    
+    context = eglCreateContext(display, config, NULL, NULL);
+    
+    mDisplay = display;
+    mConfig  = config;
+    mSurface = surface;
+    mContext = context;
+    mFormat  = fbDev->format;
+    mPageFlipCount = 0;
+
+    /*
+     * Gather OpenGL ES extensions
+     */
+
+    eglMakeCurrent(display, surface, surface, context);
+
+    GLExtensions& extensions(GLExtensions::getInstance());
+    extensions.initWithGLStrings(
+            glGetString(GL_VENDOR),
+            glGetString(GL_RENDERER),
+            glGetString(GL_VERSION),
+            glGetString(GL_EXTENSIONS),
+            eglQueryString(display, EGL_VENDOR),
+            eglQueryString(display, EGL_VERSION),
+            eglQueryString(display, EGL_EXTENSIONS));
+
+    glGetIntegerv(GL_MAX_TEXTURE_SIZE, &mMaxTextureSize);
+    glGetIntegerv(GL_MAX_VIEWPORT_DIMS, &mMaxViewportDims);
+
+
+#ifdef EGL_ANDROID_swap_rectangle
+    if (extensions.hasExtension("EGL_ANDROID_swap_rectangle")) {
+        if (eglSetSwapRectangleANDROID(display, surface,
+                0, 0, mWidth, mHeight) == EGL_TRUE) {
+            // This could fail if this extension is not supported by this
+            // specific surface (of config)
+            mFlags |= SWAP_RECTANGLE;
+        }
+    }
+    // when we have the choice between PARTIAL_UPDATES and SWAP_RECTANGLE
+    // choose PARTIAL_UPDATES, which should be more efficient
+    if (mFlags & PARTIAL_UPDATES)
+        mFlags &= ~SWAP_RECTANGLE;
+#endif
+
+    LOGI("EGL informations:");
+    LOGI("# of configs : %d", numConfigs);
+    LOGI("vendor    : %s", extensions.getEglVendor());
+    LOGI("version   : %s", extensions.getEglVersion());
+    LOGI("extensions: %s", extensions.getEglExtension());
+    LOGI("Client API: %s", eglQueryString(display, EGL_CLIENT_APIS)?:"Not Supported");
+    LOGI("EGLSurface: %d-%d-%d-%d, config=%p", r, g, b, a, config);
+
+    LOGI("OpenGL informations:");
+    LOGI("vendor    : %s", extensions.getVendor());
+    LOGI("renderer  : %s", extensions.getRenderer());
+    LOGI("version   : %s", extensions.getVersion());
+    LOGI("extensions: %s", extensions.getExtension());
+    LOGI("GL_MAX_TEXTURE_SIZE = %d", mMaxTextureSize);
+    LOGI("GL_MAX_VIEWPORT_DIMS = %d", mMaxViewportDims);
+    LOGI("flags = %08x", mFlags);
+
+    // Unbind the context from this thread
+    eglMakeCurrent(display, EGL_NO_SURFACE, EGL_NO_SURFACE, EGL_NO_CONTEXT);
+}
+
+/*
+ * Clean up.  Throw out our local state.
+ *
+ * (It's entirely possible we'll never get here, since this is meant
+ * for real hardware, which doesn't restart.)
+ */
+
+void DisplayHardware::fini()
+{
+    eglMakeCurrent(mDisplay, EGL_NO_SURFACE, EGL_NO_SURFACE, EGL_NO_CONTEXT);
+    eglTerminate(mDisplay);
+    overlay_control_close(mOverlayEngine);
+}
+
+void DisplayHardware::releaseScreen() const
+{
+    DisplayHardwareBase::releaseScreen();
+}
+
+void DisplayHardware::acquireScreen() const
+{
+    DisplayHardwareBase::acquireScreen();
+}
+
+uint32_t DisplayHardware::getPageFlipCount() const {
+    return mPageFlipCount;
+}
+
+status_t DisplayHardware::compositionComplete() const {
+    return mNativeWindow->compositionComplete();
+}
+
+void DisplayHardware::flip(const Region& dirty) const
+{
+    checkGLErrors();
+
+    EGLDisplay dpy = mDisplay;
+    EGLSurface surface = mSurface;
+
+#ifdef EGL_ANDROID_swap_rectangle    
+    if (mFlags & SWAP_RECTANGLE) {
+        const Region newDirty(dirty.intersect(bounds()));
+        const Rect b(newDirty.getBounds());
+        eglSetSwapRectangleANDROID(dpy, surface,
+                b.left, b.top, b.width(), b.height());
+    } 
+#endif
+    
+    if (mFlags & PARTIAL_UPDATES) {
+        mNativeWindow->setUpdateRectangle(dirty.getBounds());
+    }
+    
+    mPageFlipCount++;
+    eglSwapBuffers(dpy, surface);
+    checkEGLErrors("eglSwapBuffers");
+
+    // for debugging
+    //glClearColor(1,0,0,0);
+    //glClear(GL_COLOR_BUFFER_BIT);
+}
+
+uint32_t DisplayHardware::getFlags() const
+{
+    return mFlags;
+}
+
+void DisplayHardware::makeCurrent() const
+{
+    eglMakeCurrent(mDisplay, mSurface, mSurface, mContext);
+}
diff --git a/services/surfaceflinger/DisplayHardware/DisplayHardware.h b/services/surfaceflinger/DisplayHardware/DisplayHardware.h
new file mode 100644
index 0000000..66bf521
--- /dev/null
+++ b/services/surfaceflinger/DisplayHardware/DisplayHardware.h
@@ -0,0 +1,116 @@
+/*
+ * Copyright (C) 2007 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef ANDROID_DISPLAY_HARDWARE_H
+#define ANDROID_DISPLAY_HARDWARE_H
+
+#include <stdlib.h>
+
+#include <ui/PixelFormat.h>
+#include <ui/Region.h>
+
+#include <GLES/gl.h>
+#include <GLES/glext.h>
+#include <EGL/egl.h>
+#include <EGL/eglext.h>
+
+#include <pixelflinger/pixelflinger.h>
+
+#include "GLExtensions.h"
+
+#include "DisplayHardware/DisplayHardwareBase.h"
+
+struct overlay_control_device_t;
+struct framebuffer_device_t;
+struct copybit_image_t;
+
+namespace android {
+
+class FramebufferNativeWindow;
+
+class DisplayHardware : public DisplayHardwareBase
+{
+public:
+    enum {
+        COPY_BITS_EXTENSION         = 0x00000008,
+        BUFFER_PRESERVED            = 0x00010000,
+        PARTIAL_UPDATES             = 0x00020000,   // video driver feature
+        SLOW_CONFIG                 = 0x00040000,   // software
+        SWAP_RECTANGLE              = 0x00080000,
+    };
+
+    DisplayHardware(
+            const sp<SurfaceFlinger>& flinger,
+            uint32_t displayIndex);
+
+    ~DisplayHardware();
+
+    void releaseScreen() const;
+    void acquireScreen() const;
+
+    // Flip the front and back buffers if the back buffer is "dirty".  Might
+    // be instantaneous, might involve copying the frame buffer around.
+    void flip(const Region& dirty) const;
+
+    float       getDpiX() const;
+    float       getDpiY() const;
+    float       getRefreshRate() const;
+    float       getDensity() const;
+    int         getWidth() const;
+    int         getHeight() const;
+    PixelFormat getFormat() const;
+    uint32_t    getFlags() const;
+    void        makeCurrent() const;
+    uint32_t    getMaxTextureSize() const;
+    uint32_t    getMaxViewportDims() const;
+
+    uint32_t getPageFlipCount() const;
+    EGLDisplay getEGLDisplay() const { return mDisplay; }
+    overlay_control_device_t* getOverlayEngine() const { return mOverlayEngine; }
+    
+    status_t compositionComplete() const;
+    
+    Rect bounds() const {
+        return Rect(mWidth, mHeight);
+    }
+
+private:
+    void init(uint32_t displayIndex) __attribute__((noinline));
+    void fini() __attribute__((noinline));
+
+    EGLDisplay      mDisplay;
+    EGLSurface      mSurface;
+    EGLContext      mContext;
+    EGLConfig       mConfig;
+    float           mDpiX;
+    float           mDpiY;
+    float           mRefreshRate;
+    float           mDensity;
+    int             mWidth;
+    int             mHeight;
+    PixelFormat     mFormat;
+    uint32_t        mFlags;
+    mutable uint32_t mPageFlipCount;
+    GLint           mMaxViewportDims;
+    GLint           mMaxTextureSize;
+    
+    sp<FramebufferNativeWindow> mNativeWindow;
+    overlay_control_device_t* mOverlayEngine;
+};
+
+}; // namespace android
+
+#endif // ANDROID_DISPLAY_HARDWARE_H
diff --git a/libs/surfaceflinger/DisplayHardware/DisplayHardwareBase.cpp b/services/surfaceflinger/DisplayHardware/DisplayHardwareBase.cpp
similarity index 100%
rename from libs/surfaceflinger/DisplayHardware/DisplayHardwareBase.cpp
rename to services/surfaceflinger/DisplayHardware/DisplayHardwareBase.cpp
diff --git a/libs/surfaceflinger/DisplayHardware/DisplayHardwareBase.h b/services/surfaceflinger/DisplayHardware/DisplayHardwareBase.h
similarity index 100%
rename from libs/surfaceflinger/DisplayHardware/DisplayHardwareBase.h
rename to services/surfaceflinger/DisplayHardware/DisplayHardwareBase.h
diff --git a/services/surfaceflinger/GLExtensions.cpp b/services/surfaceflinger/GLExtensions.cpp
new file mode 100644
index 0000000..7f4f9fc
--- /dev/null
+++ b/services/surfaceflinger/GLExtensions.cpp
@@ -0,0 +1,133 @@
+/*
+ * Copyright (C) 2010 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include <stdlib.h>
+#include <stdio.h>
+#include <stdint.h>
+
+#include "GLExtensions.h"
+
+namespace android {
+// ---------------------------------------------------------------------------
+
+ANDROID_SINGLETON_STATIC_INSTANCE( GLExtensions )
+
+GLExtensions::GLExtensions()
+    : mHaveTextureExternal(false),
+      mHaveNpot(false),
+      mHaveDirectTexture(false)
+{
+}
+
+void GLExtensions::initWithGLStrings(
+        GLubyte const* vendor,
+        GLubyte const* renderer,
+        GLubyte const* version,
+        GLubyte const* extensions,
+        char const* egl_vendor,
+        char const* egl_version,
+        char const* egl_extensions)
+{
+    mVendor     = (char const*)vendor;
+    mRenderer   = (char const*)renderer;
+    mVersion    = (char const*)version;
+    mExtensions = (char const*)extensions;
+    mEglVendor     = egl_vendor;
+    mEglVersion    = egl_version;
+    mEglExtensions = egl_extensions;
+
+    char const* curr = (char const*)extensions;
+    char const* head = curr;
+    do {
+        head = strchr(curr, ' ');
+        String8 s(curr, head ? head-curr : strlen(curr));
+        if (s.length()) {
+            mExtensionList.add(s);
+        }
+        curr = head+1;
+    } while (head);
+
+    curr = egl_extensions;
+    head = curr;
+    do {
+        head = strchr(curr, ' ');
+        String8 s(curr, head ? head-curr : strlen(curr));
+        if (s.length()) {
+            mExtensionList.add(s);
+        }
+        curr = head+1;
+    } while (head);
+
+#ifdef EGL_ANDROID_image_native_buffer
+    if (hasExtension("GL_OES_EGL_image") &&
+        (hasExtension("EGL_KHR_image_base") || hasExtension("EGL_KHR_image")) &&
+        hasExtension("EGL_ANDROID_image_native_buffer"))
+    {
+        mHaveDirectTexture = true;
+    }
+#else
+#warning "EGL_ANDROID_image_native_buffer not supported"
+#endif
+
+    if (hasExtension("GL_ARB_texture_non_power_of_two")) {
+        mHaveNpot = true;
+    }
+
+    if (hasExtension("GL_OES_texture_external")) {
+        mHaveTextureExternal = true;
+    } else if (strstr(mRenderer.string(), "Adreno")) {
+        // hack for Adreno 200
+        mHaveTextureExternal = true;
+    }
+}
+
+bool GLExtensions::hasExtension(char const* extension) const
+{
+    const String8 s(extension);
+    return mExtensionList.indexOf(s) >= 0;
+}
+
+char const* GLExtensions::getVendor() const {
+    return mVendor.string();
+}
+
+char const* GLExtensions::getRenderer() const {
+    return mRenderer.string();
+}
+
+char const* GLExtensions::getVersion() const {
+    return mVersion.string();
+}
+
+char const* GLExtensions::getExtension() const {
+    return mExtensions.string();
+}
+
+char const* GLExtensions::getEglVendor() const {
+    return mEglVendor.string();
+}
+
+char const* GLExtensions::getEglVersion() const {
+    return mEglVersion.string();
+}
+
+char const* GLExtensions::getEglExtension() const {
+    return mEglExtensions.string();
+}
+
+
+// ---------------------------------------------------------------------------
+}; // namespace android
diff --git a/services/surfaceflinger/GLExtensions.h b/services/surfaceflinger/GLExtensions.h
new file mode 100644
index 0000000..bbb284e
--- /dev/null
+++ b/services/surfaceflinger/GLExtensions.h
@@ -0,0 +1,94 @@
+/*
+ * Copyright (C) 2010 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef ANDROID_SF_GLEXTENSION_H
+#define ANDROID_SF_GLEXTENSION_H
+
+#include <stdint.h>
+#include <sys/types.h>
+
+#include <utils/String8.h>
+#include <utils/SortedVector.h>
+#include <utils/Singleton.h>
+
+#include <EGL/egl.h>
+#include <EGL/eglext.h>
+#include <GLES/gl.h>
+#include <GLES/glext.h>
+
+namespace android {
+// ---------------------------------------------------------------------------
+
+class GLExtensions : public Singleton<GLExtensions>
+{
+    friend class Singleton<GLExtensions>;
+
+    bool mHaveTextureExternal   : 1;
+    bool mHaveNpot              : 1;
+    bool mHaveDirectTexture     : 1;
+
+    String8 mVendor;
+    String8 mRenderer;
+    String8 mVersion;
+    String8 mExtensions;
+    String8 mEglVendor;
+    String8 mEglVersion;
+    String8 mEglExtensions;
+    SortedVector<String8> mExtensionList;
+
+    GLExtensions(const GLExtensions&);
+    GLExtensions& operator = (const GLExtensions&);
+
+protected:
+    GLExtensions();
+
+public:
+    inline bool haveTextureExternal() const {
+        return mHaveTextureExternal;
+    }
+    inline bool haveNpot() const {
+        return mHaveNpot;
+    }
+    inline bool haveDirectTexture() const {
+        return mHaveDirectTexture;
+    }
+
+    void initWithGLStrings(
+            GLubyte const* vendor,
+            GLubyte const* renderer,
+            GLubyte const* version,
+            GLubyte const* extensions,
+            char const* egl_vendor,
+            char const* egl_version,
+            char const* egl_extensions);
+
+    char const* getVendor() const;
+    char const* getRenderer() const;
+    char const* getVersion() const;
+    char const* getExtension() const;
+
+    char const* getEglVendor() const;
+    char const* getEglVersion() const;
+    char const* getEglExtension() const;
+
+    bool hasExtension(char const* extension) const;
+};
+
+
+// ---------------------------------------------------------------------------
+}; // namespace android
+
+#endif // ANDROID_SF_GLEXTENSION_H
diff --git a/services/surfaceflinger/Layer.cpp b/services/surfaceflinger/Layer.cpp
new file mode 100644
index 0000000..758da4e
--- /dev/null
+++ b/services/surfaceflinger/Layer.cpp
@@ -0,0 +1,875 @@
+/*
+ * Copyright (C) 2007 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include <stdlib.h>
+#include <stdint.h>
+#include <sys/types.h>
+
+#include <cutils/properties.h>
+#include <cutils/native_handle.h>
+
+#include <utils/Errors.h>
+#include <utils/Log.h>
+#include <utils/StopWatch.h>
+
+#include <ui/GraphicBuffer.h>
+#include <ui/PixelFormat.h>
+
+#include <surfaceflinger/Surface.h>
+
+#include "clz.h"
+#include "GLExtensions.h"
+#include "Layer.h"
+#include "SurfaceFlinger.h"
+#include "DisplayHardware/DisplayHardware.h"
+
+
+#define DEBUG_RESIZE    0
+
+
+namespace android {
+
+template <typename T> inline T min(T a, T b) {
+    return a<b ? a : b;
+}
+
+// ---------------------------------------------------------------------------
+
+Layer::Layer(SurfaceFlinger* flinger,
+        DisplayID display, const sp<Client>& client)
+    :   LayerBaseClient(flinger, display, client),
+        mGLExtensions(GLExtensions::getInstance()),
+        mNeedsBlending(true),
+        mNeedsDithering(false),
+        mSecure(false),
+        mTextureManager(),
+        mBufferManager(mTextureManager),
+        mWidth(0), mHeight(0), mFixedSize(false)
+{
+}
+
+Layer::~Layer()
+{
+    // FIXME: must be called from the main UI thread
+    EGLDisplay dpy(mFlinger->graphicPlane(0).getEGLDisplay());
+    mBufferManager.destroy(dpy);
+
+    // we can use getUserClientUnsafe here because we know we're
+    // single-threaded at that point.
+    sp<UserClient> ourClient(mUserClientRef.getUserClientUnsafe());
+    if (ourClient != 0) {
+        ourClient->detachLayer(this);
+    }
+}
+
+status_t Layer::setToken(const sp<UserClient>& userClient,
+        SharedClient* sharedClient, int32_t token)
+{
+    sp<SharedBufferServer> lcblk = new SharedBufferServer(
+            sharedClient, token, mBufferManager.getDefaultBufferCount(),
+            getIdentity());
+
+    status_t err = mUserClientRef.setToken(userClient, lcblk, token);
+
+    LOGE_IF(err != NO_ERROR,
+            "ClientRef::setToken(%p, %p, %u) failed",
+            userClient.get(), lcblk.get(), token);
+
+    if (err == NO_ERROR) {
+        // we need to free the buffers associated with this surface
+    }
+
+    return err;
+}
+
+int32_t Layer::getToken() const
+{
+    return mUserClientRef.getToken();
+}
+
+sp<UserClient> Layer::getClient() const
+{
+    return mUserClientRef.getClient();
+}
+
+// called with SurfaceFlinger::mStateLock as soon as the layer is entered
+// in the purgatory list
+void Layer::onRemoved()
+{
+    ClientRef::Access sharedClient(mUserClientRef);
+    SharedBufferServer* lcblk(sharedClient.get());
+    if (lcblk) {
+        // wake up the condition
+        lcblk->setStatus(NO_INIT);
+    }
+}
+
+sp<LayerBaseClient::Surface> Layer::createSurface() const
+{
+    return mSurface;
+}
+
+status_t Layer::ditch()
+{
+    // NOTE: Called from the main UI thread
+
+    // the layer is not on screen anymore. free as much resources as possible
+    mFreezeLock.clear();
+
+    EGLDisplay dpy(mFlinger->graphicPlane(0).getEGLDisplay());
+    mBufferManager.destroy(dpy);
+    mSurface.clear();
+
+    Mutex::Autolock _l(mLock);
+    mWidth = mHeight = 0;
+    return NO_ERROR;
+}
+
+status_t Layer::setBuffers( uint32_t w, uint32_t h,
+                            PixelFormat format, uint32_t flags)
+{
+    // this surfaces pixel format
+    PixelFormatInfo info;
+    status_t err = getPixelFormatInfo(format, &info);
+    if (err) return err;
+
+    // the display's pixel format
+    const DisplayHardware& hw(graphicPlane(0).displayHardware());
+    uint32_t const maxSurfaceDims = min(
+            hw.getMaxTextureSize(), hw.getMaxViewportDims());
+
+    // never allow a surface larger than what our underlying GL implementation
+    // can handle.
+    if ((uint32_t(w)>maxSurfaceDims) || (uint32_t(h)>maxSurfaceDims)) {
+        return BAD_VALUE;
+    }
+
+    PixelFormatInfo displayInfo;
+    getPixelFormatInfo(hw.getFormat(), &displayInfo);
+    const uint32_t hwFlags = hw.getFlags();
+    
+    mFormat = format;
+    mReqFormat = format;
+    mWidth  = w;
+    mHeight = h;
+    mSecure = (flags & ISurfaceComposer::eSecure) ? true : false;
+    mNeedsBlending = (info.h_alpha - info.l_alpha) > 0;
+
+    // we use the red index
+    int displayRedSize = displayInfo.getSize(PixelFormatInfo::INDEX_RED);
+    int layerRedsize = info.getSize(PixelFormatInfo::INDEX_RED);
+    mNeedsDithering = layerRedsize > displayRedSize;
+
+    mSurface = new SurfaceLayer(mFlinger, this);
+    return NO_ERROR;
+}
+
+void Layer::reloadTexture(const Region& dirty)
+{
+    sp<GraphicBuffer> buffer(mBufferManager.getActiveBuffer());
+    if (buffer == NULL) {
+        // this situation can happen if we ran out of memory for instance.
+        // not much we can do. continue to use whatever texture was bound
+        // to this context.
+        return;
+    }
+
+    if (mGLExtensions.haveDirectTexture()) {
+        EGLDisplay dpy(mFlinger->graphicPlane(0).getEGLDisplay());
+        if (mBufferManager.initEglImage(dpy, buffer) != NO_ERROR) {
+            // not sure what we can do here...
+            goto slowpath;
+        }
+    } else {
+slowpath:
+        GGLSurface t;
+        status_t res = buffer->lock(&t, GRALLOC_USAGE_SW_READ_OFTEN);
+        LOGE_IF(res, "error %d (%s) locking buffer %p",
+                res, strerror(res), buffer.get());
+        if (res == NO_ERROR) {
+            mBufferManager.loadTexture(dirty, t);
+            buffer->unlock();
+        }
+    }
+}
+
+void Layer::onDraw(const Region& clip) const
+{
+    Texture tex(mBufferManager.getActiveTexture());
+    if (tex.name == -1LU) {
+        // the texture has not been created yet, this Layer has
+        // in fact never been drawn into. This happens frequently with
+        // SurfaceView because the WindowManager can't know when the client
+        // has drawn the first time.
+
+        // If there is nothing under us, we paint the screen in black, otherwise
+        // we just skip this update.
+
+        // figure out if there is something below us
+        Region under;
+        const SurfaceFlinger::LayerVector& drawingLayers(mFlinger->mDrawingState.layersSortedByZ);
+        const size_t count = drawingLayers.size();
+        for (size_t i=0 ; i<count ; ++i) {
+            const sp<LayerBase>& layer(drawingLayers[i]);
+            if (layer.get() == static_cast<LayerBase const*>(this))
+                break;
+            under.orSelf(layer->visibleRegionScreen);
+        }
+        // if not everything below us is covered, we plug the holes!
+        Region holes(clip.subtract(under));
+        if (!holes.isEmpty()) {
+            clearWithOpenGL(holes, 0, 0, 0, 1);
+        }
+        return;
+    }
+    drawWithOpenGL(clip, tex);
+}
+
+bool Layer::needsFiltering() const
+{
+    if (!(mFlags & DisplayHardware::SLOW_CONFIG)) {
+        // NOTE: there is a race here, because mFixedSize is updated in a
+        // binder transaction. however, it doesn't really matter since it is
+        // evaluated each time we draw. To be perfectly correct, this flag
+        // would have to be associated with a buffer.
+        if (mFixedSize)
+            return true;
+    }
+    return LayerBase::needsFiltering();
+}
+
+
+status_t Layer::setBufferCount(int bufferCount)
+{
+    ClientRef::Access sharedClient(mUserClientRef);
+    SharedBufferServer* lcblk(sharedClient.get());
+    if (!lcblk) {
+        // oops, the client is already gone
+        return DEAD_OBJECT;
+    }
+
+    // NOTE: lcblk->resize() is protected by an internal lock
+    status_t err = lcblk->resize(bufferCount);
+    if (err == NO_ERROR)
+        mBufferManager.resize(bufferCount);
+
+    return err;
+}
+
+sp<GraphicBuffer> Layer::requestBuffer(int index,
+        uint32_t reqWidth, uint32_t reqHeight, uint32_t reqFormat,
+        uint32_t usage)
+{
+    sp<GraphicBuffer> buffer;
+
+    if (int32_t(reqWidth | reqHeight | reqFormat) < 0)
+        return buffer;
+
+    if ((!reqWidth && reqHeight) || (reqWidth && !reqHeight))
+        return buffer;
+
+    // this ensures our client doesn't go away while we're accessing
+    // the shared area.
+    ClientRef::Access sharedClient(mUserClientRef);
+    SharedBufferServer* lcblk(sharedClient.get());
+    if (!lcblk) {
+        // oops, the client is already gone
+        return buffer;
+    }
+
+    /*
+     * This is called from the client's Surface::dequeue(). This can happen
+     * at any time, especially while we're in the middle of using the
+     * buffer 'index' as our front buffer.
+     *
+     * Make sure the buffer we're resizing is not the front buffer and has been
+     * dequeued. Once this condition is asserted, we are guaranteed that this
+     * buffer cannot become the front buffer under our feet, since we're called
+     * from Surface::dequeue()
+     */
+    status_t err = lcblk->assertReallocate(index);
+    LOGE_IF(err, "assertReallocate(%d) failed (%s)", index, strerror(-err));
+    if (err != NO_ERROR) {
+        // the surface may have died
+        return buffer;
+    }
+
+    uint32_t w, h, f;
+    { // scope for the lock
+        Mutex::Autolock _l(mLock);
+        const bool fixedSizeChanged = mFixedSize != (reqWidth && reqHeight);
+        const bool formatChanged    = mReqFormat != reqFormat;
+        mReqWidth  = reqWidth;
+        mReqHeight = reqHeight;
+        mReqFormat = reqFormat;
+        mFixedSize = reqWidth && reqHeight;
+        w = reqWidth  ? reqWidth  : mWidth;
+        h = reqHeight ? reqHeight : mHeight;
+        f = reqFormat ? reqFormat : mFormat;
+        buffer = mBufferManager.detachBuffer(index);
+        if (fixedSizeChanged || formatChanged) {
+            lcblk->reallocateAllExcept(index);
+        }
+    }
+
+    const uint32_t effectiveUsage = getEffectiveUsage(usage);
+    if (buffer!=0 && buffer->getStrongCount() == 1) {
+        err = buffer->reallocate(w, h, f, effectiveUsage);
+    } else {
+        // here we have to reallocate a new buffer because we could have a
+        // client in our process with a reference to it (eg: status bar),
+        // and we can't release the handle under its feet.
+        buffer.clear();
+        buffer = new GraphicBuffer(w, h, f, effectiveUsage);
+        err = buffer->initCheck();
+    }
+
+    if (err || buffer->handle == 0) {
+        LOGE_IF(err || buffer->handle == 0,
+                "Layer::requestBuffer(this=%p), index=%d, w=%d, h=%d failed (%s)",
+                this, index, w, h, strerror(-err));
+    } else {
+        LOGD_IF(DEBUG_RESIZE,
+                "Layer::requestBuffer(this=%p), index=%d, w=%d, h=%d, handle=%p",
+                this, index, w, h, buffer->handle);
+    }
+
+    if (err == NO_ERROR && buffer->handle != 0) {
+        Mutex::Autolock _l(mLock);
+        mBufferManager.attachBuffer(index, buffer);
+    }
+    return buffer;
+}
+
+uint32_t Layer::getEffectiveUsage(uint32_t usage) const
+{
+    /*
+     *  buffers used for software rendering, but h/w composition
+     *  are allocated with SW_READ_OFTEN | SW_WRITE_OFTEN | HW_TEXTURE
+     *
+     *  buffers used for h/w rendering and h/w composition
+     *  are allocated with  HW_RENDER | HW_TEXTURE
+     *
+     *  buffers used with h/w rendering and either NPOT or no egl_image_ext
+     *  are allocated with SW_READ_RARELY | HW_RENDER
+     *
+     */
+
+    if (mSecure) {
+        // secure buffer, don't store it into the GPU
+        usage = GraphicBuffer::USAGE_SW_READ_OFTEN |
+                GraphicBuffer::USAGE_SW_WRITE_OFTEN;
+    } else {
+        // it's allowed to modify the usage flags here, but generally
+        // the requested flags should be honored.
+        // request EGLImage for all buffers
+        usage |= GraphicBuffer::USAGE_HW_TEXTURE;
+    }
+    return usage;
+}
+
+uint32_t Layer::doTransaction(uint32_t flags)
+{
+    const Layer::State& front(drawingState());
+    const Layer::State& temp(currentState());
+
+    const bool sizeChanged = (front.requested_w != temp.requested_w) ||
+            (front.requested_h != temp.requested_h);
+
+    if (sizeChanged) {
+        // the size changed, we need to ask our client to request a new buffer
+        LOGD_IF(DEBUG_RESIZE,
+                "resize (layer=%p), requested (%dx%d), drawing (%d,%d)",
+                this,
+                int(temp.requested_w), int(temp.requested_h),
+                int(front.requested_w), int(front.requested_h));
+
+        if (!isFixedSize()) {
+            // we're being resized and there is a freeze display request,
+            // acquire a freeze lock, so that the screen stays put
+            // until we've redrawn at the new size; this is to avoid
+            // glitches upon orientation changes.
+            if (mFlinger->hasFreezeRequest()) {
+                // if the surface is hidden, don't try to acquire the
+                // freeze lock, since hidden surfaces may never redraw
+                if (!(front.flags & ISurfaceComposer::eLayerHidden)) {
+                    mFreezeLock = mFlinger->getFreezeLock();
+                }
+            }
+
+            // this will make sure LayerBase::doTransaction doesn't update
+            // the drawing state's size
+            Layer::State& editDraw(mDrawingState);
+            editDraw.requested_w = temp.requested_w;
+            editDraw.requested_h = temp.requested_h;
+
+            // record the new size, form this point on, when the client request
+            // a buffer, it'll get the new size.
+            setBufferSize(temp.requested_w, temp.requested_h);
+
+            ClientRef::Access sharedClient(mUserClientRef);
+            SharedBufferServer* lcblk(sharedClient.get());
+            if (lcblk) {
+                // all buffers need reallocation
+                lcblk->reallocateAll();
+            }
+        } else {
+            // record the new size
+            setBufferSize(temp.requested_w, temp.requested_h);
+        }
+    }
+
+    if (temp.sequence != front.sequence) {
+        if (temp.flags & ISurfaceComposer::eLayerHidden || temp.alpha == 0) {
+            // this surface is now hidden, so it shouldn't hold a freeze lock
+            // (it may never redraw, which is fine if it is hidden)
+            mFreezeLock.clear();
+        }
+    }
+        
+    return LayerBase::doTransaction(flags);
+}
+
+void Layer::setBufferSize(uint32_t w, uint32_t h) {
+    Mutex::Autolock _l(mLock);
+    mWidth = w;
+    mHeight = h;
+}
+
+bool Layer::isFixedSize() const {
+    Mutex::Autolock _l(mLock);
+    return mFixedSize;
+}
+
+// ----------------------------------------------------------------------------
+// pageflip handling...
+// ----------------------------------------------------------------------------
+
+void Layer::lockPageFlip(bool& recomputeVisibleRegions)
+{
+    ClientRef::Access sharedClient(mUserClientRef);
+    SharedBufferServer* lcblk(sharedClient.get());
+    if (!lcblk) {
+        // client died
+        recomputeVisibleRegions = true;
+        return;
+    }
+
+    ssize_t buf = lcblk->retireAndLock();
+    if (buf == NOT_ENOUGH_DATA) {
+        // NOTE: This is not an error, it simply means there is nothing to
+        // retire. The buffer is locked because we will use it
+        // for composition later in the loop
+        return;
+    }
+
+    if (buf < NO_ERROR) {
+        LOGE("retireAndLock() buffer index (%d) out of range", int(buf));
+        mPostedDirtyRegion.clear();
+        return;
+    }
+
+    // we retired a buffer, which becomes the new front buffer
+    if (mBufferManager.setActiveBufferIndex(buf) < NO_ERROR) {
+        LOGE("retireAndLock() buffer index (%d) out of range", int(buf));
+        mPostedDirtyRegion.clear();
+        return;
+    }
+
+    // get the dirty region
+    sp<GraphicBuffer> newFrontBuffer(getBuffer(buf));
+    if (newFrontBuffer != NULL) {
+        // compute the posted region
+        const Region dirty(lcblk->getDirtyRegion(buf));
+        mPostedDirtyRegion = dirty.intersect( newFrontBuffer->getBounds() );
+
+        // update the layer size and release freeze-lock
+        const Layer::State& front(drawingState());
+        if (newFrontBuffer->getWidth()  == front.requested_w &&
+            newFrontBuffer->getHeight() == front.requested_h)
+        {
+            if ((front.w != front.requested_w) ||
+                (front.h != front.requested_h))
+            {
+                // Here we pretend the transaction happened by updating the
+                // current and drawing states. Drawing state is only accessed
+                // in this thread, no need to have it locked
+                Layer::State& editDraw(mDrawingState);
+                editDraw.w = editDraw.requested_w;
+                editDraw.h = editDraw.requested_h;
+
+                // We also need to update the current state so that we don't
+                // end-up doing too much work during the next transaction.
+                // NOTE: We actually don't need hold the transaction lock here
+                // because State::w and State::h are only accessed from
+                // this thread
+                Layer::State& editTemp(currentState());
+                editTemp.w = editDraw.w;
+                editTemp.h = editDraw.h;
+
+                // recompute visible region
+                recomputeVisibleRegions = true;
+            }
+
+            // we now have the correct size, unfreeze the screen
+            mFreezeLock.clear();
+        }
+    } else {
+        // this should not happen unless we ran out of memory while
+        // allocating the buffer. we're hoping that things will get back
+        // to normal the next time the app tries to draw into this buffer.
+        // meanwhile, pretend the screen didn't update.
+        mPostedDirtyRegion.clear();
+    }
+
+    if (lcblk->getQueuedCount()) {
+        // signal an event if we have more buffers waiting
+        mFlinger->signalEvent();
+    }
+
+    /* a buffer was posted, so we need to call reloadTexture(), which
+     * will update our internal data structures (eg: EGLImageKHR or
+     * texture names). we need to do this even if mPostedDirtyRegion is
+     * empty -- it's orthogonal to the fact that a new buffer was posted,
+     * for instance, a degenerate case could be that the user did an empty
+     * update but repainted the buffer with appropriate content (after a
+     * resize for instance).
+     */
+    reloadTexture( mPostedDirtyRegion );
+}
+
+void Layer::unlockPageFlip(
+        const Transform& planeTransform, Region& outDirtyRegion)
+{
+    Region dirtyRegion(mPostedDirtyRegion);
+    if (!dirtyRegion.isEmpty()) {
+        mPostedDirtyRegion.clear();
+        // The dirty region is given in the layer's coordinate space
+        // transform the dirty region by the surface's transformation
+        // and the global transformation.
+        const Layer::State& s(drawingState());
+        const Transform tr(planeTransform * s.transform);
+        dirtyRegion = tr.transform(dirtyRegion);
+
+        // At this point, the dirty region is in screen space.
+        // Make sure it's constrained by the visible region (which
+        // is in screen space as well).
+        dirtyRegion.andSelf(visibleRegionScreen);
+        outDirtyRegion.orSelf(dirtyRegion);
+    }
+    if (visibleRegionScreen.isEmpty()) {
+        // an invisible layer should not hold a freeze-lock
+        // (because it may never be updated and therefore never release it)
+        mFreezeLock.clear();
+    }
+}
+
+void Layer::finishPageFlip()
+{
+    ClientRef::Access sharedClient(mUserClientRef);
+    SharedBufferServer* lcblk(sharedClient.get());
+    if (lcblk) {
+        int buf = mBufferManager.getActiveBufferIndex();
+        if (buf >= 0) {
+            status_t err = lcblk->unlock( buf );
+            LOGE_IF(err!=NO_ERROR,
+                    "layer %p, buffer=%d wasn't locked!",
+                    this, buf);
+        }
+    }
+}
+
+
+void Layer::dump(String8& result, char* buffer, size_t SIZE) const
+{
+    LayerBaseClient::dump(result, buffer, SIZE);
+
+    ClientRef::Access sharedClient(mUserClientRef);
+    SharedBufferServer* lcblk(sharedClient.get());
+    uint32_t totalTime = 0;
+    if (lcblk) {
+        SharedBufferStack::Statistics stats = lcblk->getStats();
+        totalTime= stats.totalTime;
+        result.append( lcblk->dump("      ") );
+    }
+
+    sp<const GraphicBuffer> buf0(getBuffer(0));
+    sp<const GraphicBuffer> buf1(getBuffer(1));
+    uint32_t w0=0, h0=0, s0=0;
+    uint32_t w1=0, h1=0, s1=0;
+    if (buf0 != 0) {
+        w0 = buf0->getWidth();
+        h0 = buf0->getHeight();
+        s0 = buf0->getStride();
+    }
+    if (buf1 != 0) {
+        w1 = buf1->getWidth();
+        h1 = buf1->getHeight();
+        s1 = buf1->getStride();
+    }
+    snprintf(buffer, SIZE,
+            "      "
+            "format=%2d, [%3ux%3u:%3u] [%3ux%3u:%3u],"
+            " freezeLock=%p, dq-q-time=%u us\n",
+            mFormat, w0, h0, s0, w1, h1, s1,
+            getFreezeLock().get(), totalTime);
+
+    result.append(buffer);
+}
+
+// ---------------------------------------------------------------------------
+
+Layer::ClientRef::ClientRef()
+    : mControlBlock(0), mToken(-1) {
+}
+
+Layer::ClientRef::~ClientRef() {
+}
+
+int32_t Layer::ClientRef::getToken() const {
+    Mutex::Autolock _l(mLock);
+    return mToken;
+}
+
+sp<UserClient> Layer::ClientRef::getClient() const {
+    Mutex::Autolock _l(mLock);
+    return mUserClient.promote();
+}
+
+status_t Layer::ClientRef::setToken(const sp<UserClient>& uc,
+        const sp<SharedBufferServer>& sharedClient, int32_t token) {
+    Mutex::Autolock _l(mLock);
+
+    { // scope for strong mUserClient reference
+        sp<UserClient> userClient(mUserClient.promote());
+        if (mUserClient != 0 && mControlBlock != 0) {
+            mControlBlock->setStatus(NO_INIT);
+        }
+    }
+
+    mUserClient = uc;
+    mToken = token;
+    mControlBlock = sharedClient;
+    return NO_ERROR;
+}
+
+sp<UserClient> Layer::ClientRef::getUserClientUnsafe() const {
+    return mUserClient.promote();
+}
+
+// this class gives us access to SharedBufferServer safely
+// it makes sure the UserClient (and its associated shared memory)
+// won't go away while we're accessing it.
+Layer::ClientRef::Access::Access(const ClientRef& ref)
+    : mControlBlock(0)
+{
+    Mutex::Autolock _l(ref.mLock);
+    mUserClientStrongRef = ref.mUserClient.promote();
+    if (mUserClientStrongRef != 0)
+        mControlBlock = ref.mControlBlock;
+}
+
+Layer::ClientRef::Access::~Access()
+{
+}
+
+// ---------------------------------------------------------------------------
+
+Layer::BufferManager::BufferManager(TextureManager& tm)
+    : mNumBuffers(NUM_BUFFERS), mTextureManager(tm),
+      mActiveBuffer(-1), mFailover(false)
+{
+}
+
+Layer::BufferManager::~BufferManager()
+{
+}
+
+status_t Layer::BufferManager::resize(size_t size)
+{
+    Mutex::Autolock _l(mLock);
+    mNumBuffers = size;
+    return NO_ERROR;
+}
+
+// only for debugging
+sp<GraphicBuffer> Layer::BufferManager::getBuffer(size_t index) const {
+    return mBufferData[index].buffer;
+}
+
+status_t Layer::BufferManager::setActiveBufferIndex(size_t index) {
+    mActiveBuffer = index;
+    return NO_ERROR;
+}
+
+size_t Layer::BufferManager::getActiveBufferIndex() const {
+    return mActiveBuffer;
+}
+
+Texture Layer::BufferManager::getActiveTexture() const {
+    Texture res;
+    if (mFailover || mActiveBuffer<0) {
+        res = mFailoverTexture;
+    } else {
+        static_cast<Image&>(res) = mBufferData[mActiveBuffer].texture;
+    }
+    return res;
+}
+
+sp<GraphicBuffer> Layer::BufferManager::getActiveBuffer() const {
+    sp<GraphicBuffer> result;
+    const ssize_t activeBuffer = mActiveBuffer;
+    if (activeBuffer >= 0) {
+        BufferData const * const buffers = mBufferData;
+        Mutex::Autolock _l(mLock);
+        result = buffers[activeBuffer].buffer;
+    }
+    return result;
+}
+
+sp<GraphicBuffer> Layer::BufferManager::detachBuffer(size_t index)
+{
+    BufferData* const buffers = mBufferData;
+    sp<GraphicBuffer> buffer;
+    Mutex::Autolock _l(mLock);
+    buffer = buffers[index].buffer;
+    buffers[index].buffer = 0;
+    return buffer;
+}
+
+status_t Layer::BufferManager::attachBuffer(size_t index,
+        const sp<GraphicBuffer>& buffer)
+{
+    BufferData* const buffers = mBufferData;
+    Mutex::Autolock _l(mLock);
+    buffers[index].buffer = buffer;
+    buffers[index].texture.dirty = true;
+    return NO_ERROR;
+}
+
+status_t Layer::BufferManager::destroy(EGLDisplay dpy)
+{
+    BufferData* const buffers = mBufferData;
+    size_t num;
+    { // scope for the lock
+        Mutex::Autolock _l(mLock);
+        num = mNumBuffers;
+        for (size_t i=0 ; i<num ; i++) {
+            buffers[i].buffer = 0;
+        }
+    }
+    for (size_t i=0 ; i<num ; i++) {
+        destroyTexture(&buffers[i].texture, dpy);
+    }
+    destroyTexture(&mFailoverTexture, dpy);
+    return NO_ERROR;
+}
+
+status_t Layer::BufferManager::initEglImage(EGLDisplay dpy,
+        const sp<GraphicBuffer>& buffer)
+{
+    status_t err = NO_INIT;
+    ssize_t index = mActiveBuffer;
+    if (index >= 0) {
+        if (!mFailover) {
+            Image& texture(mBufferData[index].texture);
+            err = mTextureManager.initEglImage(&texture, dpy, buffer);
+            // if EGLImage fails, we switch to regular texture mode, and we
+            // free all resources associated with using EGLImages.
+            if (err == NO_ERROR) {
+                mFailover = false;
+                destroyTexture(&mFailoverTexture, dpy);
+            } else {
+                mFailover = true;
+                const size_t num = mNumBuffers;
+                for (size_t i=0 ; i<num ; i++) {
+                    destroyTexture(&mBufferData[i].texture, dpy);
+                }
+            }
+        } else {
+            // we failed once, don't try again
+            err = BAD_VALUE;
+        }
+    }
+    return err;
+}
+
+status_t Layer::BufferManager::loadTexture(
+        const Region& dirty, const GGLSurface& t)
+{
+    return mTextureManager.loadTexture(&mFailoverTexture, dirty, t);
+}
+
+status_t Layer::BufferManager::destroyTexture(Image* tex, EGLDisplay dpy)
+{
+    if (tex->name != -1U) {
+        glDeleteTextures(1, &tex->name);
+        tex->name = -1U;
+    }
+    if (tex->image != EGL_NO_IMAGE_KHR) {
+        eglDestroyImageKHR(dpy, tex->image);
+        tex->image = EGL_NO_IMAGE_KHR;
+    }
+    return NO_ERROR;
+}
+
+// ---------------------------------------------------------------------------
+
+Layer::SurfaceLayer::SurfaceLayer(const sp<SurfaceFlinger>& flinger,
+        const sp<Layer>& owner)
+    : Surface(flinger, owner->getIdentity(), owner)
+{
+}
+
+Layer::SurfaceLayer::~SurfaceLayer()
+{
+}
+
+sp<GraphicBuffer> Layer::SurfaceLayer::requestBuffer(int index,
+        uint32_t w, uint32_t h, uint32_t format, uint32_t usage)
+{
+    sp<GraphicBuffer> buffer;
+    sp<Layer> owner(getOwner());
+    if (owner != 0) {
+        /*
+         * requestBuffer() cannot be called from the main thread
+         * as it could cause a dead-lock, since it may have to wait
+         * on conditions updated my the main thread.
+         */
+        buffer = owner->requestBuffer(index, w, h, format, usage);
+    }
+    return buffer;
+}
+
+status_t Layer::SurfaceLayer::setBufferCount(int bufferCount)
+{
+    status_t err = DEAD_OBJECT;
+    sp<Layer> owner(getOwner());
+    if (owner != 0) {
+        /*
+         * setBufferCount() cannot be called from the main thread
+         * as it could cause a dead-lock, since it may have to wait
+         * on conditions updated my the main thread.
+         */
+        err = owner->setBufferCount(bufferCount);
+    }
+    return err;
+}
+
+// ---------------------------------------------------------------------------
+
+
+}; // namespace android
diff --git a/services/surfaceflinger/Layer.h b/services/surfaceflinger/Layer.h
new file mode 100644
index 0000000..e1d283b
--- /dev/null
+++ b/services/surfaceflinger/Layer.h
@@ -0,0 +1,239 @@
+/*
+ * Copyright (C) 2007 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef ANDROID_LAYER_H
+#define ANDROID_LAYER_H
+
+#include <stdint.h>
+#include <sys/types.h>
+
+#include <ui/GraphicBuffer.h>
+#include <ui/PixelFormat.h>
+#include <pixelflinger/pixelflinger.h>
+
+#include <EGL/egl.h>
+#include <EGL/eglext.h>
+#include <GLES/gl.h>
+#include <GLES/glext.h>
+
+#include "LayerBase.h"
+#include "Transform.h"
+#include "TextureManager.h"
+
+namespace android {
+
+// ---------------------------------------------------------------------------
+
+class FreezeLock;
+class Client;
+class GLExtensions;
+class UserClient;
+
+// ---------------------------------------------------------------------------
+
+class Layer : public LayerBaseClient
+{
+public:
+            Layer(SurfaceFlinger* flinger, DisplayID display,
+                    const sp<Client>& client);
+
+    virtual ~Layer();
+
+    virtual const char* getTypeId() const { return "Layer"; }
+
+    // the this layer's size and format
+    status_t setBuffers(uint32_t w, uint32_t h, 
+            PixelFormat format, uint32_t flags=0);
+
+    // associate a UserClient to this Layer
+    status_t setToken(const sp<UserClient>& uc, SharedClient* sc, int32_t idx);
+    int32_t getToken() const;
+    sp<UserClient> getClient() const;
+
+    // Set this Layer's buffers size
+    void setBufferSize(uint32_t w, uint32_t h);
+    bool isFixedSize() const;
+
+    // LayerBase interface
+    virtual void onDraw(const Region& clip) const;
+    virtual uint32_t doTransaction(uint32_t transactionFlags);
+    virtual void lockPageFlip(bool& recomputeVisibleRegions);
+    virtual void unlockPageFlip(const Transform& planeTransform, Region& outDirtyRegion);
+    virtual void finishPageFlip();
+    virtual bool needsBlending() const      { return mNeedsBlending; }
+    virtual bool needsDithering() const     { return mNeedsDithering; }
+    virtual bool needsFiltering() const;
+    virtual bool isSecure() const           { return mSecure; }
+    virtual sp<Surface> createSurface() const;
+    virtual status_t ditch();
+    virtual void onRemoved();
+
+    // only for debugging
+    inline sp<GraphicBuffer> getBuffer(int i) const {
+        return mBufferManager.getBuffer(i); }
+    // only for debugging
+    inline const sp<FreezeLock>&  getFreezeLock() const {
+        return mFreezeLock; }
+
+protected:
+    virtual void dump(String8& result, char* scratch, size_t size) const;
+
+private:
+    void reloadTexture(const Region& dirty);
+    uint32_t getEffectiveUsage(uint32_t usage) const;
+    sp<GraphicBuffer> requestBuffer(int bufferIdx,
+            uint32_t w, uint32_t h, uint32_t format, uint32_t usage);
+    status_t setBufferCount(int bufferCount);
+
+    // -----------------------------------------------------------------------
+
+    class SurfaceLayer : public LayerBaseClient::Surface {
+    public:
+        SurfaceLayer(const sp<SurfaceFlinger>& flinger, const sp<Layer>& owner);
+        ~SurfaceLayer();
+    private:
+        virtual sp<GraphicBuffer> requestBuffer(int bufferIdx,
+                uint32_t w, uint32_t h, uint32_t format, uint32_t usage);
+        virtual status_t setBufferCount(int bufferCount);
+        sp<Layer> getOwner() const {
+            return static_cast<Layer*>(Surface::getOwner().get());
+        }
+    };
+    friend class SurfaceLayer;
+
+    // -----------------------------------------------------------------------
+
+    class ClientRef {
+        ClientRef(const ClientRef& rhs);
+        ClientRef& operator = (const ClientRef& rhs);
+        mutable Mutex mLock;
+        // binder thread, page-flip thread
+        sp<SharedBufferServer> mControlBlock;
+        wp<UserClient> mUserClient;
+        int32_t mToken;
+    public:
+        ClientRef();
+        ~ClientRef();
+        int32_t getToken() const;
+        sp<UserClient> getClient() const;
+        status_t setToken(const sp<UserClient>& uc,
+                const sp<SharedBufferServer>& sharedClient, int32_t token);
+        sp<UserClient> getUserClientUnsafe() const;
+        class Access {
+            Access(const Access& rhs);
+            Access& operator = (const Access& rhs);
+            sp<UserClient> mUserClientStrongRef;
+            sp<SharedBufferServer> mControlBlock;
+        public:
+            Access(const ClientRef& ref);
+            ~Access();
+            inline SharedBufferServer* get() const { return mControlBlock.get(); }
+        };
+        friend class Access;
+    };
+
+    // -----------------------------------------------------------------------
+
+    class BufferManager {
+        static const size_t NUM_BUFFERS = 2;
+        struct BufferData {
+            sp<GraphicBuffer>   buffer;
+            Image               texture;
+        };
+        // this lock protect mBufferData[].buffer but since there
+        // is very little contention, we have only one like for
+        // the whole array, we also use it to protect mNumBuffers.
+        mutable Mutex mLock;
+        BufferData          mBufferData[SharedBufferStack::NUM_BUFFER_MAX];
+        size_t              mNumBuffers;
+        Texture             mFailoverTexture;
+        TextureManager&     mTextureManager;
+        ssize_t             mActiveBuffer;
+        bool                mFailover;
+        static status_t destroyTexture(Image* tex, EGLDisplay dpy);
+
+    public:
+        static size_t getDefaultBufferCount() { return NUM_BUFFERS; }
+        BufferManager(TextureManager& tm);
+        ~BufferManager();
+
+        // detach/attach buffer from/to given index
+        sp<GraphicBuffer> detachBuffer(size_t index);
+        status_t attachBuffer(size_t index, const sp<GraphicBuffer>& buffer);
+        // resize the number of active buffers
+        status_t resize(size_t size);
+
+        // ----------------------------------------------
+        // must be called from GL thread
+
+        // set/get active buffer index
+        status_t setActiveBufferIndex(size_t index);
+        size_t getActiveBufferIndex() const;
+        // return the active buffer
+        sp<GraphicBuffer> getActiveBuffer() const;
+        // return the active texture (or fail-over)
+        Texture getActiveTexture() const;
+        // frees resources associated with all buffers
+        status_t destroy(EGLDisplay dpy);
+        // load bitmap data into the active buffer
+        status_t loadTexture(const Region& dirty, const GGLSurface& t);
+        // make active buffer an EGLImage if needed
+        status_t initEglImage(EGLDisplay dpy,
+                const sp<GraphicBuffer>& buffer);
+
+        // ----------------------------------------------
+        // only for debugging
+        sp<GraphicBuffer> getBuffer(size_t index) const;
+    };
+
+    // -----------------------------------------------------------------------
+
+    // thread-safe
+    ClientRef mUserClientRef;
+
+    // constants
+    sp<Surface> mSurface;
+    PixelFormat mFormat;
+    const GLExtensions& mGLExtensions;
+    bool mNeedsBlending;
+    bool mNeedsDithering;
+
+    // page-flip thread (currently main thread)
+    bool mSecure;
+    Region mPostedDirtyRegion;
+
+    // page-flip thread and transaction thread (currently main thread)
+    sp<FreezeLock>  mFreezeLock;
+
+    // see threading usage in declaration
+    TextureManager mTextureManager;
+    BufferManager mBufferManager;
+
+    // binder thread, transaction thread
+    mutable Mutex mLock;
+    uint32_t mWidth;
+    uint32_t mHeight;
+    uint32_t mReqWidth;
+    uint32_t mReqHeight;
+    uint32_t mReqFormat;
+    bool mFixedSize;
+};
+
+// ---------------------------------------------------------------------------
+
+}; // namespace android
+
+#endif // ANDROID_LAYER_H
diff --git a/services/surfaceflinger/LayerBase.cpp b/services/surfaceflinger/LayerBase.cpp
new file mode 100644
index 0000000..d5aa53f
--- /dev/null
+++ b/services/surfaceflinger/LayerBase.cpp
@@ -0,0 +1,593 @@
+/*
+ * Copyright (C) 2007 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include <stdlib.h>
+#include <stdint.h>
+#include <sys/types.h>
+
+#include <utils/Errors.h>
+#include <utils/Log.h>
+#include <binder/IPCThreadState.h>
+#include <binder/IServiceManager.h>
+
+#include <GLES/gl.h>
+#include <GLES/glext.h>
+
+#include <hardware/hardware.h>
+
+#include "clz.h"
+#include "LayerBase.h"
+#include "SurfaceFlinger.h"
+#include "DisplayHardware/DisplayHardware.h"
+#include "TextureManager.h"
+
+
+namespace android {
+
+// ---------------------------------------------------------------------------
+
+LayerBase::LayerBase(SurfaceFlinger* flinger, DisplayID display)
+    : dpy(display), contentDirty(false),
+      mFlinger(flinger),
+      mNeedsFiltering(false),
+      mOrientation(0),
+      mLeft(0), mTop(0),
+      mTransactionFlags(0),
+      mPremultipliedAlpha(true), mName("unnamed"), mDebug(false),
+      mInvalidate(0)
+{
+    const DisplayHardware& hw(flinger->graphicPlane(0).displayHardware());
+    mFlags = hw.getFlags();
+}
+
+LayerBase::~LayerBase()
+{
+}
+
+void LayerBase::setName(const String8& name) {
+    mName = name;
+}
+
+String8 LayerBase::getName() const {
+    return mName;
+}
+
+const GraphicPlane& LayerBase::graphicPlane(int dpy) const
+{ 
+    return mFlinger->graphicPlane(dpy);
+}
+
+GraphicPlane& LayerBase::graphicPlane(int dpy)
+{
+    return mFlinger->graphicPlane(dpy); 
+}
+
+void LayerBase::initStates(uint32_t w, uint32_t h, uint32_t flags)
+{
+    uint32_t layerFlags = 0;
+    if (flags & ISurfaceComposer::eHidden)
+        layerFlags = ISurfaceComposer::eLayerHidden;
+
+    if (flags & ISurfaceComposer::eNonPremultiplied)
+        mPremultipliedAlpha = false;
+
+    mCurrentState.z             = 0;
+    mCurrentState.w             = w;
+    mCurrentState.h             = h;
+    mCurrentState.requested_w   = w;
+    mCurrentState.requested_h   = h;
+    mCurrentState.alpha         = 0xFF;
+    mCurrentState.flags         = layerFlags;
+    mCurrentState.sequence      = 0;
+    mCurrentState.transform.set(0, 0);
+
+    // drawing state & current state are identical
+    mDrawingState = mCurrentState;
+}
+
+void LayerBase::commitTransaction() {
+    mDrawingState = mCurrentState;
+}
+void LayerBase::forceVisibilityTransaction() {
+    // this can be called without SurfaceFlinger.mStateLock, but if we
+    // can atomically increment the sequence number, it doesn't matter.
+    android_atomic_inc(&mCurrentState.sequence);
+    requestTransaction();
+}
+bool LayerBase::requestTransaction() {
+    int32_t old = setTransactionFlags(eTransactionNeeded);
+    return ((old & eTransactionNeeded) == 0);
+}
+uint32_t LayerBase::getTransactionFlags(uint32_t flags) {
+    return android_atomic_and(~flags, &mTransactionFlags) & flags;
+}
+uint32_t LayerBase::setTransactionFlags(uint32_t flags) {
+    return android_atomic_or(flags, &mTransactionFlags);
+}
+
+bool LayerBase::setPosition(int32_t x, int32_t y) {
+    if (mCurrentState.transform.tx() == x && mCurrentState.transform.ty() == y)
+        return false;
+    mCurrentState.sequence++;
+    mCurrentState.transform.set(x, y);
+    requestTransaction();
+    return true;
+}
+bool LayerBase::setLayer(uint32_t z) {
+    if (mCurrentState.z == z)
+        return false;
+    mCurrentState.sequence++;
+    mCurrentState.z = z;
+    requestTransaction();
+    return true;
+}
+bool LayerBase::setSize(uint32_t w, uint32_t h) {
+    if (mCurrentState.requested_w == w && mCurrentState.requested_h == h)
+        return false;
+    mCurrentState.requested_w = w;
+    mCurrentState.requested_h = h;
+    requestTransaction();
+    return true;
+}
+bool LayerBase::setAlpha(uint8_t alpha) {
+    if (mCurrentState.alpha == alpha)
+        return false;
+    mCurrentState.sequence++;
+    mCurrentState.alpha = alpha;
+    requestTransaction();
+    return true;
+}
+bool LayerBase::setMatrix(const layer_state_t::matrix22_t& matrix) {
+    mCurrentState.sequence++;
+    mCurrentState.transform.set(
+            matrix.dsdx, matrix.dsdy, matrix.dtdx, matrix.dtdy);
+    requestTransaction();
+    return true;
+}
+bool LayerBase::setTransparentRegionHint(const Region& transparent) {
+    mCurrentState.sequence++;
+    mCurrentState.transparentRegion = transparent;
+    requestTransaction();
+    return true;
+}
+bool LayerBase::setFlags(uint8_t flags, uint8_t mask) {
+    const uint32_t newFlags = (mCurrentState.flags & ~mask) | (flags & mask);
+    if (mCurrentState.flags == newFlags)
+        return false;
+    mCurrentState.sequence++;
+    mCurrentState.flags = newFlags;
+    requestTransaction();
+    return true;
+}
+
+Rect LayerBase::visibleBounds() const
+{
+    return mTransformedBounds;
+}      
+
+void LayerBase::setVisibleRegion(const Region& visibleRegion) {
+    // always called from main thread
+    visibleRegionScreen = visibleRegion;
+}
+
+void LayerBase::setCoveredRegion(const Region& coveredRegion) {
+    // always called from main thread
+    coveredRegionScreen = coveredRegion;
+}
+
+uint32_t LayerBase::doTransaction(uint32_t flags)
+{
+    const Layer::State& front(drawingState());
+    const Layer::State& temp(currentState());
+
+    if ((front.requested_w != temp.requested_w) ||
+        (front.requested_h != temp.requested_h))  {
+        // resize the layer, set the physical size to the requested size
+        Layer::State& editTemp(currentState());
+        editTemp.w = temp.requested_w;
+        editTemp.h = temp.requested_h;
+    }
+
+    if ((front.w != temp.w) || (front.h != temp.h)) {
+        // invalidate and recompute the visible regions if needed
+        flags |= Layer::eVisibleRegion;
+    }
+
+    if (temp.sequence != front.sequence) {
+        // invalidate and recompute the visible regions if needed
+        flags |= eVisibleRegion;
+        this->contentDirty = true;
+
+        mNeedsFiltering = false;
+        if (!(mFlags & DisplayHardware::SLOW_CONFIG)) {
+            // we may use linear filtering, if the matrix scales us
+            const uint8_t type = temp.transform.getType();
+            if (!temp.transform.preserveRects() || (type >= Transform::SCALE)) {
+                mNeedsFiltering = true;
+            }
+        }
+    }
+
+    // Commit the transaction
+    commitTransaction();
+    return flags;
+}
+
+void LayerBase::validateVisibility(const Transform& planeTransform)
+{
+    const Layer::State& s(drawingState());
+    const Transform tr(planeTransform * s.transform);
+    const bool transformed = tr.transformed();
+   
+    uint32_t w = s.w;
+    uint32_t h = s.h;    
+    tr.transform(mVertices[0], 0, 0);
+    tr.transform(mVertices[1], 0, h);
+    tr.transform(mVertices[2], w, h);
+    tr.transform(mVertices[3], w, 0);
+    if (UNLIKELY(transformed)) {
+        // NOTE: here we could also punt if we have too many rectangles
+        // in the transparent region
+        if (tr.preserveRects()) {
+            // transform the transparent region
+            transparentRegionScreen = tr.transform(s.transparentRegion);
+        } else {
+            // transformation too complex, can't do the transparent region
+            // optimization.
+            transparentRegionScreen.clear();
+        }
+    } else {
+        transparentRegionScreen = s.transparentRegion;
+    }
+
+    // cache a few things...
+    mOrientation = tr.getOrientation();
+    mTransformedBounds = tr.makeBounds(w, h);
+    mLeft = tr.tx();
+    mTop  = tr.ty();
+}
+
+void LayerBase::lockPageFlip(bool& recomputeVisibleRegions)
+{
+}
+
+void LayerBase::unlockPageFlip(
+        const Transform& planeTransform, Region& outDirtyRegion)
+{
+    if ((android_atomic_and(~1, &mInvalidate)&1) == 1) {
+        outDirtyRegion.orSelf(visibleRegionScreen);
+    }
+}
+
+void LayerBase::finishPageFlip()
+{
+}
+
+void LayerBase::invalidate()
+{
+    if ((android_atomic_or(1, &mInvalidate)&1) == 0) {
+        mFlinger->signalEvent();
+    }
+}
+
+void LayerBase::drawRegion(const Region& reg) const
+{
+    Region::const_iterator it = reg.begin();
+    Region::const_iterator const end = reg.end();
+    if (it != end) {
+        Rect r;
+        const DisplayHardware& hw(graphicPlane(0).displayHardware());
+        const int32_t fbWidth  = hw.getWidth();
+        const int32_t fbHeight = hw.getHeight();
+        const GLshort vertices[][2] = { { 0, 0 }, { fbWidth, 0 }, 
+                { fbWidth, fbHeight }, { 0, fbHeight }  };
+        glVertexPointer(2, GL_SHORT, 0, vertices);
+        while (it != end) {
+            const Rect& r = *it++;
+            const GLint sy = fbHeight - (r.top + r.height());
+            glScissor(r.left, sy, r.width(), r.height());
+            glDrawArrays(GL_TRIANGLE_FAN, 0, 4); 
+        }
+    }
+}
+
+void LayerBase::draw(const Region& inClip) const
+{
+    // invalidate the region we'll update
+    Region clip(inClip);  // copy-on-write, so no-op most of the time
+
+    // Remove the transparent area from the clipping region
+    const State& s = drawingState();
+    if (LIKELY(!s.transparentRegion.isEmpty())) {
+        clip.subtract(transparentRegionScreen);
+        if (clip.isEmpty()) {
+            // usually this won't happen because this should be taken care of
+            // by SurfaceFlinger::computeVisibleRegions()
+            return;
+        }        
+    }
+
+    // reset GL state
+    glEnable(GL_SCISSOR_TEST);
+
+    onDraw(clip);
+}
+
+void LayerBase::clearWithOpenGL(const Region& clip, GLclampf red,
+                                GLclampf green, GLclampf blue,
+                                GLclampf alpha) const
+{
+    const DisplayHardware& hw(graphicPlane(0).displayHardware());
+    const uint32_t fbHeight = hw.getHeight();
+    glColor4f(red,green,blue,alpha);
+
+    TextureManager::deactivateTextures();
+
+    glDisable(GL_BLEND);
+    glDisable(GL_DITHER);
+
+    Region::const_iterator it = clip.begin();
+    Region::const_iterator const end = clip.end();
+    glEnable(GL_SCISSOR_TEST);
+    glVertexPointer(2, GL_FLOAT, 0, mVertices);
+    while (it != end) {
+        const Rect& r = *it++;
+        const GLint sy = fbHeight - (r.top + r.height());
+        glScissor(r.left, sy, r.width(), r.height());
+        glDrawArrays(GL_TRIANGLE_FAN, 0, 4); 
+    }
+}
+
+void LayerBase::clearWithOpenGL(const Region& clip) const
+{
+    clearWithOpenGL(clip,0,0,0,0);
+}
+
+void LayerBase::drawWithOpenGL(const Region& clip, const Texture& texture) const
+{
+    const DisplayHardware& hw(graphicPlane(0).displayHardware());
+    const uint32_t fbHeight = hw.getHeight();
+    const State& s(drawingState());
+    
+    // bind our texture
+    TextureManager::activateTexture(texture, needsFiltering());
+    uint32_t width  = texture.width; 
+    uint32_t height = texture.height;
+
+    GLenum src = mPremultipliedAlpha ? GL_ONE : GL_SRC_ALPHA;
+    if (UNLIKELY(s.alpha < 0xFF)) {
+        const GLfloat alpha = s.alpha * (1.0f/255.0f);
+        if (mPremultipliedAlpha) {
+            glColor4f(alpha, alpha, alpha, alpha);
+        } else {
+            glColor4f(1, 1, 1, alpha);
+        }
+        glEnable(GL_BLEND);
+        glBlendFunc(src, GL_ONE_MINUS_SRC_ALPHA);
+        glTexEnvx(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE);
+    } else {
+        glColor4f(1, 1, 1, 1);
+        glTexEnvx(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_REPLACE);
+        if (needsBlending()) {
+            glEnable(GL_BLEND);
+            glBlendFunc(src, GL_ONE_MINUS_SRC_ALPHA);
+        } else {
+            glDisable(GL_BLEND);
+        }
+    }
+
+    Region::const_iterator it = clip.begin();
+    Region::const_iterator const end = clip.end();
+    const GLfloat texCoords[4][2] = {
+            { 0,  0 },
+            { 0,  1 },
+            { 1,  1 },
+            { 1,  0 }
+    };
+
+    glMatrixMode(GL_TEXTURE);
+    glLoadIdentity();
+
+    // the texture's source is rotated
+    switch (texture.transform) {
+        case HAL_TRANSFORM_ROT_90:
+            glTranslatef(0, 1, 0);
+            glRotatef(-90, 0, 0, 1);
+            break;
+        case HAL_TRANSFORM_ROT_180:
+            glTranslatef(1, 1, 0);
+            glRotatef(-180, 0, 0, 1);
+            break;
+        case HAL_TRANSFORM_ROT_270:
+            glTranslatef(1, 0, 0);
+            glRotatef(-270, 0, 0, 1);
+            break;
+    }
+
+    if (texture.NPOTAdjust) {
+        glScalef(texture.wScale, texture.hScale, 1.0f);
+    }
+
+    if (needsDithering()) {
+        glEnable(GL_DITHER);
+    } else {
+        glDisable(GL_DITHER);
+    }
+
+    glEnableClientState(GL_TEXTURE_COORD_ARRAY);
+    glVertexPointer(2, GL_FLOAT, 0, mVertices);
+    glTexCoordPointer(2, GL_FLOAT, 0, texCoords);
+
+    while (it != end) {
+        const Rect& r = *it++;
+        const GLint sy = fbHeight - (r.top + r.height());
+        glScissor(r.left, sy, r.width(), r.height());
+        glDrawArrays(GL_TRIANGLE_FAN, 0, 4);
+    }
+    glDisableClientState(GL_TEXTURE_COORD_ARRAY);
+}
+
+void LayerBase::dump(String8& result, char* buffer, size_t SIZE) const
+{
+    const Layer::State& s(drawingState());
+    snprintf(buffer, SIZE,
+            "+ %s %p\n"
+            "      "
+            "z=%9d, pos=(%4d,%4d), size=(%4d,%4d), "
+            "needsBlending=%1d, needsDithering=%1d, invalidate=%1d, "
+            "alpha=0x%02x, flags=0x%08x, tr=[%.2f, %.2f][%.2f, %.2f]\n",
+            getTypeId(), this, s.z, tx(), ty(), s.w, s.h,
+            needsBlending(), needsDithering(), contentDirty,
+            s.alpha, s.flags,
+            s.transform[0][0], s.transform[0][1],
+            s.transform[1][0], s.transform[1][1]);
+    result.append(buffer);
+}
+
+// ---------------------------------------------------------------------------
+
+int32_t LayerBaseClient::sIdentity = 1;
+
+LayerBaseClient::LayerBaseClient(SurfaceFlinger* flinger, DisplayID display,
+        const sp<Client>& client)
+    : LayerBase(flinger, display), mClientRef(client),
+      mIdentity(uint32_t(android_atomic_inc(&sIdentity)))
+{
+}
+
+LayerBaseClient::~LayerBaseClient()
+{
+    sp<Client> c(mClientRef.promote());
+    if (c != 0) {
+        c->detachLayer(this);
+    }
+}
+
+sp<LayerBaseClient::Surface> LayerBaseClient::getSurface()
+{
+    sp<Surface> s;
+    Mutex::Autolock _l(mLock);
+    s = mClientSurface.promote();
+    if (s == 0) {
+        s = createSurface();
+        mClientSurface = s;
+    }
+    return s;
+}
+
+sp<LayerBaseClient::Surface> LayerBaseClient::createSurface() const
+{
+    return new Surface(mFlinger, mIdentity,
+            const_cast<LayerBaseClient *>(this));
+}
+
+void LayerBaseClient::dump(String8& result, char* buffer, size_t SIZE) const
+{
+    LayerBase::dump(result, buffer, SIZE);
+
+    sp<Client> client(mClientRef.promote());
+    snprintf(buffer, SIZE,
+            "      name=%s\n"
+            "      client=%p, identity=%u\n",
+            getName().string(),
+            client.get(), getIdentity());
+
+    result.append(buffer);
+}
+
+// ---------------------------------------------------------------------------
+
+LayerBaseClient::Surface::Surface(
+        const sp<SurfaceFlinger>& flinger,
+        int identity,
+        const sp<LayerBaseClient>& owner) 
+    : mFlinger(flinger), mIdentity(identity), mOwner(owner)
+{
+}
+
+LayerBaseClient::Surface::~Surface() 
+{
+    /*
+     * This is a good place to clean-up all client resources 
+     */
+
+    // destroy client resources
+    sp<LayerBaseClient> layer = getOwner();
+    if (layer != 0) {
+        mFlinger->destroySurface(layer);
+    }
+}
+
+sp<LayerBaseClient> LayerBaseClient::Surface::getOwner() const {
+    sp<LayerBaseClient> owner(mOwner.promote());
+    return owner;
+}
+
+status_t LayerBaseClient::Surface::onTransact(
+        uint32_t code, const Parcel& data, Parcel* reply, uint32_t flags)
+{
+    switch (code) {
+        case REGISTER_BUFFERS:
+        case UNREGISTER_BUFFERS:
+        case CREATE_OVERLAY:
+        {
+            if (!mFlinger->mAccessSurfaceFlinger.checkCalling()) {
+                IPCThreadState* ipc = IPCThreadState::self();
+                const int pid = ipc->getCallingPid();
+                const int uid = ipc->getCallingUid();
+                LOGE("Permission Denial: "
+                        "can't access SurfaceFlinger pid=%d, uid=%d", pid, uid);
+                return PERMISSION_DENIED;
+            }
+        }
+    }
+    return BnSurface::onTransact(code, data, reply, flags);
+}
+
+sp<GraphicBuffer> LayerBaseClient::Surface::requestBuffer(int bufferIdx,
+        uint32_t w, uint32_t h, uint32_t format, uint32_t usage)
+{
+    return NULL; 
+}
+
+status_t LayerBaseClient::Surface::setBufferCount(int bufferCount)
+{
+    return INVALID_OPERATION;
+}
+
+status_t LayerBaseClient::Surface::registerBuffers(
+        const ISurface::BufferHeap& buffers) 
+{ 
+    return INVALID_OPERATION; 
+}
+
+void LayerBaseClient::Surface::postBuffer(ssize_t offset) 
+{
+}
+
+void LayerBaseClient::Surface::unregisterBuffers() 
+{
+}
+
+sp<OverlayRef> LayerBaseClient::Surface::createOverlay(
+        uint32_t w, uint32_t h, int32_t format, int32_t orientation)
+{
+    return NULL;
+};
+
+// ---------------------------------------------------------------------------
+
+}; // namespace android
diff --git a/services/surfaceflinger/LayerBase.h b/services/surfaceflinger/LayerBase.h
new file mode 100644
index 0000000..4288cf7
--- /dev/null
+++ b/services/surfaceflinger/LayerBase.h
@@ -0,0 +1,333 @@
+/*
+ * Copyright (C) 2007 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef ANDROID_LAYER_BASE_H
+#define ANDROID_LAYER_BASE_H
+
+#include <stdint.h>
+#include <sys/types.h>
+
+#include <EGL/egl.h>
+#include <EGL/eglext.h>
+#include <GLES/gl.h>
+
+#include <utils/RefBase.h>
+
+#include <ui/Region.h>
+#include <ui/Overlay.h>
+
+#include <surfaceflinger/ISurfaceComposerClient.h>
+#include <private/surfaceflinger/SharedBufferStack.h>
+#include <private/surfaceflinger/LayerState.h>
+
+#include <pixelflinger/pixelflinger.h>
+
+#include "Transform.h"
+
+namespace android {
+
+// ---------------------------------------------------------------------------
+
+class DisplayHardware;
+class Client;
+class GraphicBuffer;
+class GraphicPlane;
+class LayerBaseClient;
+class SurfaceFlinger;
+class Texture;
+
+// ---------------------------------------------------------------------------
+
+class LayerBase : public RefBase
+{
+public:
+            LayerBase(SurfaceFlinger* flinger, DisplayID display);
+
+    DisplayID           dpy;
+    mutable bool        contentDirty;
+            Region      visibleRegionScreen;
+            Region      transparentRegionScreen;
+            Region      coveredRegionScreen;
+            
+            struct State {
+                uint32_t        w;
+                uint32_t        h;
+                uint32_t        requested_w;
+                uint32_t        requested_h;
+                uint32_t        z;
+                uint8_t         alpha;
+                uint8_t         flags;
+                uint8_t         reserved[2];
+                int32_t         sequence;   // changes when visible regions can change
+                uint32_t        tint;
+                Transform       transform;
+                Region          transparentRegion;
+            };
+
+            void setName(const String8& name);
+            String8 getName() const;
+
+            // modify current state
+            bool setPosition(int32_t x, int32_t y);
+            bool setLayer(uint32_t z);
+            bool setSize(uint32_t w, uint32_t h);
+            bool setAlpha(uint8_t alpha);
+            bool setMatrix(const layer_state_t::matrix22_t& matrix);
+            bool setTransparentRegionHint(const Region& opaque);
+            bool setFlags(uint8_t flags, uint8_t mask);
+            
+            void commitTransaction();
+            bool requestTransaction();
+            void forceVisibilityTransaction();
+            
+            uint32_t getTransactionFlags(uint32_t flags);
+            uint32_t setTransactionFlags(uint32_t flags);
+            
+            Rect visibleBounds() const;
+            void drawRegion(const Region& reg) const;
+
+            void invalidate();
+
+    virtual sp<LayerBaseClient> getLayerBaseClient() const { return 0; }
+
+    virtual const char* getTypeId() const { return "LayerBase"; }
+
+    /**
+     * draw - performs some global clipping optimizations
+     * and calls onDraw().
+     * Typically this method is not overridden, instead implement onDraw()
+     * to perform the actual drawing.  
+     */
+    virtual void draw(const Region& clip) const;
+    
+    /**
+     * onDraw - draws the surface.
+     */
+    virtual void onDraw(const Region& clip) const = 0;
+    
+    /**
+     * initStates - called just after construction
+     */
+    virtual void initStates(uint32_t w, uint32_t h, uint32_t flags);
+    
+    /**
+     * doTransaction - process the transaction. This is a good place to figure
+     * out which attributes of the surface have changed.
+     */
+    virtual uint32_t doTransaction(uint32_t transactionFlags);
+    
+    /**
+     * setVisibleRegion - called to set the new visible region. This gives
+     * a chance to update the new visible region or record the fact it changed.
+     */
+    virtual void setVisibleRegion(const Region& visibleRegion);
+    
+    /**
+     * setCoveredRegion - called when the covered region changes. The covered
+     * region corresponds to any area of the surface that is covered
+     * (transparently or not) by another surface.
+     */
+    virtual void setCoveredRegion(const Region& coveredRegion);
+
+    /**
+     * validateVisibility - cache a bunch of things
+     */
+    virtual void validateVisibility(const Transform& globalTransform);
+
+    /**
+     * lockPageFlip - called each time the screen is redrawn and returns whether
+     * the visible regions need to be recomputed (this is a fairly heavy
+     * operation, so this should be set only if needed). Typically this is used
+     * to figure out if the content or size of a surface has changed.
+     */
+    virtual void lockPageFlip(bool& recomputeVisibleRegions);
+    
+    /**
+     * unlockPageFlip - called each time the screen is redrawn. updates the
+     * final dirty region wrt the planeTransform.
+     * At this point, all visible regions, surface position and size, etc... are
+     * correct.
+     */
+    virtual void unlockPageFlip(const Transform& planeTransform, Region& outDirtyRegion);
+    
+    /**
+     * finishPageFlip - called after all surfaces have drawn.
+     */
+    virtual void finishPageFlip();
+    
+    /**
+     * needsBlending - true if this surface needs blending
+     */
+    virtual bool needsBlending() const  { return false; }
+
+    /**
+     * needsDithering - true if this surface needs dithering
+     */
+    virtual bool needsDithering() const { return false; }
+
+    /**
+     * needsLinearFiltering - true if this surface needs filtering
+     */
+    virtual bool needsFiltering() const { return mNeedsFiltering; }
+
+    /**
+     * isSecure - true if this surface is secure, that is if it prevents
+     * screenshots or VNC servers.
+     */
+    virtual bool isSecure() const       { return false; }
+
+    /** Called from the main thread, when the surface is removed from the
+     * draw list */
+    virtual status_t ditch() { return NO_ERROR; }
+
+    /** called with the state lock when the surface is removed from the
+     *  current list */
+    virtual void onRemoved() { };
+    
+    /** always call base class first */
+    virtual void dump(String8& result, char* scratch, size_t size) const;
+
+
+    enum { // flags for doTransaction()
+        eVisibleRegion      = 0x00000002,
+    };
+
+
+    inline  const State&    drawingState() const    { return mDrawingState; }
+    inline  const State&    currentState() const    { return mCurrentState; }
+    inline  State&          currentState()          { return mCurrentState; }
+
+    static int compareCurrentStateZ(
+            sp<LayerBase> const * layerA,
+            sp<LayerBase> const * layerB) {
+        return layerA[0]->currentState().z - layerB[0]->currentState().z;
+    }
+
+    int32_t  getOrientation() const { return mOrientation; }
+    int  tx() const             { return mLeft; }
+    int  ty() const             { return mTop; }
+    
+protected:
+    const GraphicPlane& graphicPlane(int dpy) const;
+          GraphicPlane& graphicPlane(int dpy);
+
+          void clearWithOpenGL(const Region& clip, GLclampf r, GLclampf g,
+                               GLclampf b, GLclampf alpha) const;
+          void clearWithOpenGL(const Region& clip) const;
+          void drawWithOpenGL(const Region& clip, const Texture& texture) const;
+          
+                sp<SurfaceFlinger> mFlinger;
+                uint32_t        mFlags;
+
+                // cached during validateVisibility()
+                bool            mNeedsFiltering;
+                int32_t         mOrientation;
+                GLfloat         mVertices[4][2];
+                Rect            mTransformedBounds;
+                int             mLeft;
+                int             mTop;
+            
+                // these are protected by an external lock
+                State           mCurrentState;
+                State           mDrawingState;
+    volatile    int32_t         mTransactionFlags;
+
+                // don't change, don't need a lock
+                bool            mPremultipliedAlpha;
+                String8         mName;
+    mutable     bool            mDebug;
+
+
+                // atomic
+    volatile    int32_t         mInvalidate;
+                
+
+protected:
+    virtual ~LayerBase();
+
+private:
+    LayerBase(const LayerBase& rhs);
+};
+
+
+// ---------------------------------------------------------------------------
+
+class LayerBaseClient : public LayerBase
+{
+public:
+    class Surface;
+
+            LayerBaseClient(SurfaceFlinger* flinger, DisplayID display,
+                        const sp<Client>& client);
+    virtual ~LayerBaseClient();
+
+            sp<Surface> getSurface();
+    virtual sp<Surface> createSurface() const;
+    virtual sp<LayerBaseClient> getLayerBaseClient() const {
+        return const_cast<LayerBaseClient*>(this); }
+    virtual const char* getTypeId() const { return "LayerBaseClient"; }
+
+    uint32_t getIdentity() const { return mIdentity; }
+
+    class Surface : public BnSurface  {
+    public:
+        int32_t getIdentity() const { return mIdentity; }
+        
+    protected:
+        Surface(const sp<SurfaceFlinger>& flinger, int identity,
+                const sp<LayerBaseClient>& owner);
+        virtual ~Surface();
+        virtual status_t onTransact(uint32_t code, const Parcel& data,
+                Parcel* reply, uint32_t flags);
+        sp<LayerBaseClient> getOwner() const;
+
+    private:
+        virtual sp<GraphicBuffer> requestBuffer(int bufferIdx,
+                uint32_t w, uint32_t h, uint32_t format, uint32_t usage);
+        virtual status_t setBufferCount(int bufferCount);
+
+        virtual status_t registerBuffers(const ISurface::BufferHeap& buffers); 
+        virtual void postBuffer(ssize_t offset);
+        virtual void unregisterBuffers();
+        virtual sp<OverlayRef> createOverlay(uint32_t w, uint32_t h,
+                int32_t format, int32_t orientation);
+
+    protected:
+        friend class LayerBaseClient;
+        sp<SurfaceFlinger>  mFlinger;
+        int32_t             mIdentity;
+        wp<LayerBaseClient> mOwner;
+    };
+
+    friend class Surface;
+
+protected:
+    virtual void dump(String8& result, char* scratch, size_t size) const;
+
+private:
+    mutable Mutex mLock;
+    mutable wp<Surface> mClientSurface;
+    const wp<Client> mClientRef;
+    // only read
+    const uint32_t mIdentity;
+    static int32_t sIdentity;
+};
+
+// ---------------------------------------------------------------------------
+
+}; // namespace android
+
+#endif // ANDROID_LAYER_BASE_H
diff --git a/services/surfaceflinger/LayerBlur.cpp b/services/surfaceflinger/LayerBlur.cpp
new file mode 100644
index 0000000..64a43c7
--- /dev/null
+++ b/services/surfaceflinger/LayerBlur.cpp
@@ -0,0 +1,249 @@
+/*
+ * Copyright (C) 2007 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include <stdlib.h>
+#include <stdint.h>
+#include <sys/types.h>
+
+#include <utils/Errors.h>
+#include <utils/Log.h>
+
+#include <GLES/gl.h>
+#include <GLES/glext.h>
+
+#include "clz.h"
+#include "BlurFilter.h"
+#include "LayerBlur.h"
+#include "SurfaceFlinger.h"
+#include "DisplayHardware/DisplayHardware.h"
+
+namespace android {
+// ---------------------------------------------------------------------------
+
+LayerBlur::LayerBlur(SurfaceFlinger* flinger, DisplayID display,
+        const sp<Client>& client)
+    : LayerBaseClient(flinger, display, client), mCacheDirty(true),
+          mRefreshCache(true), mCacheAge(0), mTextureName(-1U),
+          mWidthScale(1.0f), mHeightScale(1.0f),
+          mBlurFormat(GGL_PIXEL_FORMAT_RGB_565)
+{
+}
+
+LayerBlur::~LayerBlur()
+{
+    if (mTextureName != -1U) {
+        glDeleteTextures(1, &mTextureName);
+    }
+}
+
+void LayerBlur::setVisibleRegion(const Region& visibleRegion)
+{
+    LayerBaseClient::setVisibleRegion(visibleRegion);
+    if (visibleRegionScreen.isEmpty()) {
+        if (mTextureName != -1U) {
+            // We're not visible, free the texture up.
+            glBindTexture(GL_TEXTURE_2D, 0);
+            glDeleteTextures(1, &mTextureName);
+            mTextureName = -1U;
+        }
+    }
+}
+
+uint32_t LayerBlur::doTransaction(uint32_t flags)
+{
+    // we're doing a transaction, refresh the cache!
+    if (!mFlinger->isFrozen()) {
+        mRefreshCache = true;
+        mCacheDirty = true;
+        flags |= eVisibleRegion;
+        this->contentDirty = true;
+    }
+    return LayerBase::doTransaction(flags);    
+}
+
+void LayerBlur::unlockPageFlip(const Transform& planeTransform, Region& outDirtyRegion)
+{
+    // this code-path must be as tight as possible, it's called each time
+    // the screen is composited.
+    if (UNLIKELY(!visibleRegionScreen.isEmpty())) {
+        // if anything visible below us is invalidated, the cache becomes dirty
+        if (!mCacheDirty && 
+                !visibleRegionScreen.intersect(outDirtyRegion).isEmpty()) {
+            mCacheDirty = true;
+        }
+        if (mCacheDirty) {
+            if (!mFlinger->isFrozen()) {
+                // update everything below us that is visible
+                outDirtyRegion.orSelf(visibleRegionScreen);
+                nsecs_t now = systemTime();
+                if ((now - mCacheAge) >= ms2ns(500)) {
+                    mCacheAge = now;
+                    mRefreshCache = true;
+                    mCacheDirty = false;
+                } else {
+                    if (!mAutoRefreshPending) {
+                        mFlinger->postMessageAsync(
+                                new MessageBase(MessageQueue::INVALIDATE),
+                                ms2ns(500));
+                        mAutoRefreshPending = true;
+                    }
+                }
+            }
+        }
+    }
+    LayerBase::unlockPageFlip(planeTransform, outDirtyRegion);
+}
+
+void LayerBlur::onDraw(const Region& clip) const
+{
+    const DisplayHardware& hw(graphicPlane(0).displayHardware());
+    const uint32_t fbHeight = hw.getHeight();
+    int x = mTransformedBounds.left;
+    int y = mTransformedBounds.top;
+    int w = mTransformedBounds.width();
+    int h = mTransformedBounds.height();
+    GLint X = x;
+    GLint Y = fbHeight - (y + h);
+    if (X < 0) {
+        w += X;
+        X = 0;
+    }
+    if (Y < 0) {
+        h += Y;
+        Y = 0;
+    }
+    if (w<0 || h<0) {
+        // we're outside of the framebuffer
+        return;
+    }
+
+    if (mTextureName == -1U) {
+        // create the texture name the first time
+        // can't do that in the ctor, because it runs in another thread.
+        glGenTextures(1, &mTextureName);
+        glGetIntegerv(GL_IMPLEMENTATION_COLOR_READ_FORMAT_OES, &mReadFormat);
+        glGetIntegerv(GL_IMPLEMENTATION_COLOR_READ_TYPE_OES, &mReadType);
+        if (mReadFormat != GL_RGB || mReadType != GL_UNSIGNED_SHORT_5_6_5) {
+            mReadFormat = GL_RGBA;
+            mReadType = GL_UNSIGNED_BYTE;
+            mBlurFormat = GGL_PIXEL_FORMAT_RGBX_8888;
+        }
+    }
+
+    Region::const_iterator it = clip.begin();
+    Region::const_iterator const end = clip.end();
+    if (it != end) {
+#if defined(GL_OES_texture_external)
+        if (GLExtensions::getInstance().haveTextureExternal()) {
+            glDisable(GL_TEXTURE_EXTERNAL_OES);
+        }
+#endif
+        glEnable(GL_TEXTURE_2D);
+        glBindTexture(GL_TEXTURE_2D, mTextureName);
+
+        if (mRefreshCache) {
+            mRefreshCache = false;
+            mAutoRefreshPending = false;
+
+            int32_t pixelSize = 4;
+            int32_t s = w;
+            if (mReadType == GL_UNSIGNED_SHORT_5_6_5) {
+                // allocate enough memory for 4-bytes (2 pixels) aligned data
+                s = (w + 1) & ~1;
+                pixelSize = 2;
+            }
+
+            uint16_t* const pixels = (uint16_t*)malloc(s*h*pixelSize);
+
+            // This reads the frame-buffer, so a h/w GL would have to
+            // finish() its rendering first. we don't want to do that
+            // too often. Read data is 4-bytes aligned.
+            glReadPixels(X, Y, w, h, mReadFormat, mReadType, pixels);
+
+            // blur that texture.
+            GGLSurface bl;
+            bl.version = sizeof(GGLSurface);
+            bl.width = w;
+            bl.height = h;
+            bl.stride = s;
+            bl.format = mBlurFormat;
+            bl.data = (GGLubyte*)pixels;            
+            blurFilter(&bl, 8, 2);
+
+            if (GLExtensions::getInstance().haveNpot()) {
+                glTexImage2D(GL_TEXTURE_2D, 0, mReadFormat, w, h, 0,
+                        mReadFormat, mReadType, pixels);
+                mWidthScale  = 1.0f / w;
+                mHeightScale =-1.0f / h;
+                mYOffset = 0;
+            } else {
+                GLuint tw = 1 << (31 - clz(w));
+                GLuint th = 1 << (31 - clz(h));
+                if (tw < GLuint(w)) tw <<= 1;
+                if (th < GLuint(h)) th <<= 1;
+                glTexImage2D(GL_TEXTURE_2D, 0, mReadFormat, tw, th, 0,
+                        mReadFormat, mReadType, NULL);
+                glTexSubImage2D(GL_TEXTURE_2D, 0, 0, 0, w, h, 
+                        mReadFormat, mReadType, pixels);
+                mWidthScale  = 1.0f / tw;
+                mHeightScale =-1.0f / th;
+                mYOffset = th-h;
+            }
+
+            free((void*)pixels);
+        }
+
+        const State& s = drawingState();
+        if (UNLIKELY(s.alpha < 0xFF)) {
+            const GLfloat alpha = s.alpha * (1.0f/255.0f);
+            glColor4f(0, 0, 0, alpha);
+            glEnable(GL_BLEND);
+            glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
+            glTexEnvx(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_REPLACE);
+        } else {
+            glDisable(GL_BLEND);
+        }
+
+        if (mFlags & DisplayHardware::SLOW_CONFIG) {
+            glDisable(GL_DITHER);
+        } else {
+            glEnable(GL_DITHER);
+        }
+
+        glTexEnvx(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_REPLACE);
+        glTexParameterx(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
+        glTexParameterx(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
+
+        glMatrixMode(GL_TEXTURE);
+        glLoadIdentity();
+        glScalef(mWidthScale, mHeightScale, 1);
+        glTranslatef(-x, mYOffset - y, 0);
+        glEnableClientState(GL_TEXTURE_COORD_ARRAY);
+        glVertexPointer(2, GL_FLOAT, 0, mVertices);
+        glTexCoordPointer(2, GL_FLOAT, 0, mVertices);
+        while (it != end) {
+            const Rect& r = *it++;
+            const GLint sy = fbHeight - (r.top + r.height());
+            glScissor(r.left, sy, r.width(), r.height());
+            glDrawArrays(GL_TRIANGLE_FAN, 0, 4);
+        }
+        glDisableClientState(GL_TEXTURE_COORD_ARRAY);
+    }
+}
+
+// ---------------------------------------------------------------------------
+
+}; // namespace android
diff --git a/services/surfaceflinger/LayerBlur.h b/services/surfaceflinger/LayerBlur.h
new file mode 100644
index 0000000..4c9ec64
--- /dev/null
+++ b/services/surfaceflinger/LayerBlur.h
@@ -0,0 +1,65 @@
+/*
+ * Copyright (C) 2007 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef ANDROID_LAYER_BLUR_H
+#define ANDROID_LAYER_BLUR_H
+
+#include <stdint.h>
+#include <sys/types.h>
+
+#include <ui/Region.h>
+
+#include "LayerBase.h"
+
+namespace android {
+
+// ---------------------------------------------------------------------------
+
+class LayerBlur : public LayerBaseClient
+{
+public:    
+                LayerBlur(SurfaceFlinger* flinger, DisplayID display,
+                        const sp<Client>& client);
+        virtual ~LayerBlur();
+
+    virtual void onDraw(const Region& clip) const;
+    virtual bool needsBlending() const  { return true; }
+    virtual bool isSecure() const       { return false; }
+    virtual const char* getTypeId() const { return "LayerBlur"; }
+
+    virtual uint32_t doTransaction(uint32_t flags);
+    virtual void setVisibleRegion(const Region& visibleRegion);
+    virtual void unlockPageFlip(const Transform& planeTransform, Region& outDirtyRegion);
+
+private:
+            bool    mCacheDirty;
+    mutable bool    mRefreshCache;
+    mutable bool    mAutoRefreshPending;
+            nsecs_t mCacheAge;
+    mutable GLuint  mTextureName;
+    mutable GLfloat mWidthScale;
+    mutable GLfloat mHeightScale;
+    mutable GLfloat mYOffset;
+    mutable GLint   mReadFormat;
+    mutable GLint   mReadType;
+    mutable uint32_t mBlurFormat;
+};
+
+// ---------------------------------------------------------------------------
+
+}; // namespace android
+
+#endif // ANDROID_LAYER_BLUR_H
diff --git a/services/surfaceflinger/LayerBuffer.cpp b/services/surfaceflinger/LayerBuffer.cpp
new file mode 100644
index 0000000..5f836366
--- /dev/null
+++ b/services/surfaceflinger/LayerBuffer.cpp
@@ -0,0 +1,682 @@
+/*
+ * Copyright (C) 2007 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include <stdlib.h>
+#include <stdint.h>
+#include <math.h>
+#include <sys/types.h>
+
+#include <utils/Errors.h>
+#include <utils/Log.h>
+#include <utils/StopWatch.h>
+
+#include <ui/GraphicBuffer.h>
+#include <ui/PixelFormat.h>
+#include <ui/FramebufferNativeWindow.h>
+#include <ui/Rect.h>
+#include <ui/Region.h>
+
+#include <hardware/copybit.h>
+
+#include "LayerBuffer.h"
+#include "SurfaceFlinger.h"
+#include "DisplayHardware/DisplayHardware.h"
+
+namespace android {
+
+// ---------------------------------------------------------------------------
+
+gralloc_module_t const* LayerBuffer::sGrallocModule = 0;
+
+// ---------------------------------------------------------------------------
+
+LayerBuffer::LayerBuffer(SurfaceFlinger* flinger, DisplayID display,
+        const sp<Client>& client)
+    : LayerBaseClient(flinger, display, client),
+      mNeedsBlending(false), mBlitEngine(0)
+{
+}
+
+LayerBuffer::~LayerBuffer()
+{
+    if (mBlitEngine) {
+        copybit_close(mBlitEngine);
+    }
+}
+
+void LayerBuffer::onFirstRef()
+{
+    LayerBaseClient::onFirstRef();
+    mSurface = new SurfaceLayerBuffer(mFlinger, this);
+
+    hw_module_t const* module = (hw_module_t const*)sGrallocModule;
+    if (!module) {
+        // NOTE: technically there is a race here, but it shouldn't
+        // cause any problem since hw_get_module() always returns
+        // the same value.
+        if (hw_get_module(GRALLOC_HARDWARE_MODULE_ID, &module) == 0) {
+            sGrallocModule = (gralloc_module_t const *)module;
+        }
+    }
+
+    if (hw_get_module(COPYBIT_HARDWARE_MODULE_ID, &module) == 0) {
+        copybit_open(module, &mBlitEngine);
+    }
+}
+
+sp<LayerBaseClient::Surface> LayerBuffer::createSurface() const
+{
+    return mSurface;
+}
+
+status_t LayerBuffer::ditch()
+{
+    mSurface.clear();
+    return NO_ERROR;
+}
+
+bool LayerBuffer::needsBlending() const {
+    return mNeedsBlending;
+}
+
+void LayerBuffer::setNeedsBlending(bool blending) {
+    mNeedsBlending = blending;
+}
+
+void LayerBuffer::postBuffer(ssize_t offset)
+{
+    sp<Source> source(getSource());
+    if (source != 0)
+        source->postBuffer(offset);
+}
+
+void LayerBuffer::unregisterBuffers()
+{
+    sp<Source> source(clearSource());
+    if (source != 0)
+        source->unregisterBuffers();
+}
+
+uint32_t LayerBuffer::doTransaction(uint32_t flags)
+{
+    sp<Source> source(getSource());
+    if (source != 0)
+        source->onTransaction(flags);
+    uint32_t res = LayerBase::doTransaction(flags);
+    // we always want filtering for these surfaces
+    mNeedsFiltering = !(mFlags & DisplayHardware::SLOW_CONFIG);
+    return res;
+}
+
+void LayerBuffer::unlockPageFlip(const Transform& planeTransform,
+        Region& outDirtyRegion)
+{
+    // this code-path must be as tight as possible, it's called each time
+    // the screen is composited.
+    sp<Source> source(getSource());
+    if (source != 0)
+        source->onVisibilityResolved(planeTransform);
+    LayerBase::unlockPageFlip(planeTransform, outDirtyRegion);    
+}
+
+void LayerBuffer::onDraw(const Region& clip) const
+{
+    sp<Source> source(getSource());
+    if (LIKELY(source != 0)) {
+        source->onDraw(clip);
+    } else {
+        clearWithOpenGL(clip);
+    }
+}
+
+void LayerBuffer::serverDestroy()
+{
+    sp<Source> source(clearSource());
+    if (source != 0) {
+        source->destroy();
+    }
+}
+
+/**
+ * This creates a "buffer" source for this surface
+ */
+status_t LayerBuffer::registerBuffers(const ISurface::BufferHeap& buffers)
+{
+    Mutex::Autolock _l(mLock);
+    if (mSource != 0)
+        return INVALID_OPERATION;
+
+    sp<BufferSource> source = new BufferSource(*this, buffers);
+
+    status_t result = source->getStatus();
+    if (result == NO_ERROR) {
+        mSource = source;
+    }
+    return result;
+}    
+
+/**
+ * This creates an "overlay" source for this surface
+ */
+sp<OverlayRef> LayerBuffer::createOverlay(uint32_t w, uint32_t h, int32_t f,
+        int32_t orientation)
+{
+    sp<OverlayRef> result;
+    Mutex::Autolock _l(mLock);
+    if (mSource != 0)
+        return result;
+
+    sp<OverlaySource> source = new OverlaySource(*this, &result, w, h, f, orientation);
+    if (result != 0) {
+        mSource = source;
+    }
+    return result;
+}
+
+sp<LayerBuffer::Source> LayerBuffer::getSource() const {
+    Mutex::Autolock _l(mLock);
+    return mSource;
+}
+
+sp<LayerBuffer::Source> LayerBuffer::clearSource() {
+    sp<Source> source;
+    Mutex::Autolock _l(mLock);
+    source = mSource;
+    mSource.clear();
+    return source;
+}
+
+// ============================================================================
+// LayerBuffer::SurfaceLayerBuffer
+// ============================================================================
+
+LayerBuffer::SurfaceLayerBuffer::SurfaceLayerBuffer(
+        const sp<SurfaceFlinger>& flinger, const sp<LayerBuffer>& owner)
+    : LayerBaseClient::Surface(flinger, owner->getIdentity(), owner)
+{
+}
+
+LayerBuffer::SurfaceLayerBuffer::~SurfaceLayerBuffer()
+{
+    unregisterBuffers();
+}
+
+status_t LayerBuffer::SurfaceLayerBuffer::registerBuffers(
+        const ISurface::BufferHeap& buffers)
+{
+    sp<LayerBuffer> owner(getOwner());
+    if (owner != 0)
+        return owner->registerBuffers(buffers);
+    return NO_INIT;
+}
+
+void LayerBuffer::SurfaceLayerBuffer::postBuffer(ssize_t offset)
+{
+    sp<LayerBuffer> owner(getOwner());
+    if (owner != 0)
+        owner->postBuffer(offset);
+}
+
+void LayerBuffer::SurfaceLayerBuffer::unregisterBuffers()
+{
+    sp<LayerBuffer> owner(getOwner());
+    if (owner != 0)
+        owner->unregisterBuffers();
+}
+
+sp<OverlayRef> LayerBuffer::SurfaceLayerBuffer::createOverlay(
+        uint32_t w, uint32_t h, int32_t format, int32_t orientation) {
+    sp<OverlayRef> result;
+    sp<LayerBuffer> owner(getOwner());
+    if (owner != 0)
+        result = owner->createOverlay(w, h, format, orientation);
+    return result;
+}
+
+// ============================================================================
+// LayerBuffer::Buffer
+// ============================================================================
+
+LayerBuffer::Buffer::Buffer(const ISurface::BufferHeap& buffers,
+        ssize_t offset, size_t bufferSize)
+    : mBufferHeap(buffers), mSupportsCopybit(false)
+{
+    NativeBuffer& src(mNativeBuffer);
+    src.crop.l = 0;
+    src.crop.t = 0;
+    src.crop.r = buffers.w;
+    src.crop.b = buffers.h;
+
+    src.img.w       = buffers.hor_stride ?: buffers.w;
+    src.img.h       = buffers.ver_stride ?: buffers.h;
+    src.img.format  = buffers.format;
+    src.img.base    = (void*)(intptr_t(buffers.heap->base()) + offset);
+    src.img.handle  = 0;
+
+    gralloc_module_t const * module = LayerBuffer::getGrallocModule();
+    if (module && module->perform) {
+        int err = module->perform(module,
+                GRALLOC_MODULE_PERFORM_CREATE_HANDLE_FROM_BUFFER,
+                buffers.heap->heapID(), bufferSize,
+                offset, buffers.heap->base(),
+                &src.img.handle);
+
+        // we can fail here is the passed buffer is purely software
+        mSupportsCopybit = (err == NO_ERROR);
+    }
+ }
+
+LayerBuffer::Buffer::~Buffer()
+{
+    NativeBuffer& src(mNativeBuffer);
+    if (src.img.handle) {
+        native_handle_delete(src.img.handle);
+    }
+}
+
+// ============================================================================
+// LayerBuffer::Source
+// LayerBuffer::BufferSource
+// LayerBuffer::OverlaySource
+// ============================================================================
+
+LayerBuffer::Source::Source(LayerBuffer& layer)
+    : mLayer(layer)
+{    
+}
+LayerBuffer::Source::~Source() {    
+}
+void LayerBuffer::Source::onDraw(const Region& clip) const {
+}
+void LayerBuffer::Source::onTransaction(uint32_t flags) {
+}
+void LayerBuffer::Source::onVisibilityResolved(
+        const Transform& planeTransform) {
+}
+void LayerBuffer::Source::postBuffer(ssize_t offset) {
+}
+void LayerBuffer::Source::unregisterBuffers() {
+}
+
+// ---------------------------------------------------------------------------
+
+LayerBuffer::BufferSource::BufferSource(LayerBuffer& layer,
+        const ISurface::BufferHeap& buffers)
+    : Source(layer), mStatus(NO_ERROR), mBufferSize(0)
+{
+    if (buffers.heap == NULL) {
+        // this is allowed, but in this case, it is illegal to receive
+        // postBuffer(). The surface just erases the framebuffer with
+        // fully transparent pixels.
+        mBufferHeap = buffers;
+        mLayer.setNeedsBlending(false);
+        return;
+    }
+
+    status_t err = (buffers.heap->heapID() >= 0) ? NO_ERROR : NO_INIT;
+    if (err != NO_ERROR) {
+        LOGE("LayerBuffer::BufferSource: invalid heap (%s)", strerror(err));
+        mStatus = err;
+        return;
+    }
+    
+    PixelFormatInfo info;
+    err = getPixelFormatInfo(buffers.format, &info);
+    if (err != NO_ERROR) {
+        LOGE("LayerBuffer::BufferSource: invalid format %d (%s)",
+                buffers.format, strerror(err));
+        mStatus = err;
+        return;
+    }
+
+    if (buffers.hor_stride<0 || buffers.ver_stride<0) {
+        LOGE("LayerBuffer::BufferSource: invalid parameters "
+             "(w=%d, h=%d, xs=%d, ys=%d)", 
+             buffers.w, buffers.h, buffers.hor_stride, buffers.ver_stride);
+        mStatus = BAD_VALUE;
+        return;
+    }
+
+    mBufferHeap = buffers;
+    mLayer.setNeedsBlending((info.h_alpha - info.l_alpha) > 0);    
+    mBufferSize = info.getScanlineSize(buffers.hor_stride)*buffers.ver_stride;
+    mLayer.forceVisibilityTransaction();
+}
+
+LayerBuffer::BufferSource::~BufferSource()
+{    
+    class MessageDestroyTexture : public MessageBase {
+        SurfaceFlinger* flinger;
+        GLuint name;
+    public:
+        MessageDestroyTexture(
+                SurfaceFlinger* flinger, GLuint name)
+            : flinger(flinger), name(name) { }
+        virtual bool handler() {
+            glDeleteTextures(1, &name);
+            return true;
+        }
+    };
+
+    if (mTexture.name != -1U) {
+        // GL textures can only be destroyed from the GL thread
+        getFlinger()->mEventQueue.postMessage(
+                new MessageDestroyTexture(getFlinger(), mTexture.name) );
+    }
+    if (mTexture.image != EGL_NO_IMAGE_KHR) {
+        EGLDisplay dpy(getFlinger()->graphicPlane(0).getEGLDisplay());
+        eglDestroyImageKHR(dpy, mTexture.image);
+    }
+}
+
+void LayerBuffer::BufferSource::postBuffer(ssize_t offset)
+{    
+    ISurface::BufferHeap buffers;
+    { // scope for the lock
+        Mutex::Autolock _l(mBufferSourceLock);
+        buffers = mBufferHeap;
+        if (buffers.heap != 0) {
+            const size_t memorySize = buffers.heap->getSize();
+            if ((size_t(offset) + mBufferSize) > memorySize) {
+                LOGE("LayerBuffer::BufferSource::postBuffer() "
+                     "invalid buffer (offset=%d, size=%d, heap-size=%d",
+                     int(offset), int(mBufferSize), int(memorySize));
+                return;
+            }
+        }
+    }
+
+    sp<Buffer> buffer;
+    if (buffers.heap != 0) {
+        buffer = new LayerBuffer::Buffer(buffers, offset, mBufferSize);
+        if (buffer->getStatus() != NO_ERROR)
+            buffer.clear();
+        setBuffer(buffer);
+        mLayer.invalidate();
+    }
+}
+
+void LayerBuffer::BufferSource::unregisterBuffers()
+{
+    Mutex::Autolock _l(mBufferSourceLock);
+    mBufferHeap.heap.clear();
+    mBuffer.clear();
+    mLayer.invalidate();
+}
+
+sp<LayerBuffer::Buffer> LayerBuffer::BufferSource::getBuffer() const
+{
+    Mutex::Autolock _l(mBufferSourceLock);
+    return mBuffer;
+}
+
+void LayerBuffer::BufferSource::setBuffer(const sp<LayerBuffer::Buffer>& buffer)
+{
+    Mutex::Autolock _l(mBufferSourceLock);
+    mBuffer = buffer;
+}
+
+void LayerBuffer::BufferSource::onDraw(const Region& clip) const 
+{
+    sp<Buffer> ourBuffer(getBuffer());
+    if (UNLIKELY(ourBuffer == 0))  {
+        // nothing to do, we don't have a buffer
+        mLayer.clearWithOpenGL(clip);
+        return;
+    }
+
+    status_t err = NO_ERROR;
+    NativeBuffer src(ourBuffer->getBuffer());
+    const Rect transformedBounds(mLayer.getTransformedBounds());
+
+#if defined(EGL_ANDROID_image_native_buffer)
+    if (GLExtensions::getInstance().haveDirectTexture()) {
+        err = INVALID_OPERATION;
+        if (ourBuffer->supportsCopybit()) {
+            copybit_device_t* copybit = mLayer.mBlitEngine;
+            if (copybit && err != NO_ERROR) {
+                // create our EGLImageKHR the first time
+                err = initTempBuffer();
+                if (err == NO_ERROR) {
+                    // NOTE: Assume the buffer is allocated with the proper USAGE flags
+                    const NativeBuffer& dst(mTempBuffer);
+                    region_iterator clip(Region(Rect(dst.crop.r, dst.crop.b)));
+                    copybit->set_parameter(copybit, COPYBIT_TRANSFORM, 0);
+                    copybit->set_parameter(copybit, COPYBIT_PLANE_ALPHA, 0xFF);
+                    copybit->set_parameter(copybit, COPYBIT_DITHER, COPYBIT_ENABLE);
+                    err = copybit->stretch(copybit, &dst.img, &src.img,
+                            &dst.crop, &src.crop, &clip);
+                    if (err != NO_ERROR) {
+                        clearTempBufferImage();
+                    }
+                }
+            }
+        }
+    }
+#endif
+    else {
+        err = INVALID_OPERATION;
+    }
+
+    if (err != NO_ERROR) {
+        // slower fallback
+        GGLSurface t;
+        t.version = sizeof(GGLSurface);
+        t.width  = src.crop.r;
+        t.height = src.crop.b;
+        t.stride = src.img.w;
+        t.vstride= src.img.h;
+        t.format = src.img.format;
+        t.data = (GGLubyte*)src.img.base;
+        const Region dirty(Rect(t.width, t.height));
+        mTextureManager.loadTexture(&mTexture, dirty, t);
+    }
+
+    mTexture.transform = mBufferHeap.transform;
+    mLayer.drawWithOpenGL(clip, mTexture);
+}
+
+status_t LayerBuffer::BufferSource::initTempBuffer() const
+{
+    // figure out the size we need now
+    const ISurface::BufferHeap& buffers(mBufferHeap);
+    uint32_t w = mLayer.mTransformedBounds.width();
+    uint32_t h = mLayer.mTransformedBounds.height();
+    if (buffers.w * h != buffers.h * w) {
+        int t = w; w = h; h = t;
+    }
+
+    // we're in the copybit case, so make sure we can handle this blit
+    // we don't have to keep the aspect ratio here
+    copybit_device_t* copybit = mLayer.mBlitEngine;
+    const int down = copybit->get(copybit, COPYBIT_MINIFICATION_LIMIT);
+    const int up = copybit->get(copybit, COPYBIT_MAGNIFICATION_LIMIT);
+    if (buffers.w > w*down)     w = buffers.w / down;
+    else if (w > buffers.w*up)  w = buffers.w*up;
+    if (buffers.h > h*down)     h = buffers.h / down;
+    else if (h > buffers.h*up)  h = buffers.h*up;
+
+    if (mTexture.image != EGL_NO_IMAGE_KHR) {
+        // we have an EGLImage, make sure the needed size didn't change
+        if (w!=mTexture.width || h!= mTexture.height) {
+            // delete the EGLImage and texture
+            clearTempBufferImage();
+        } else {
+            // we're good, we have an EGLImageKHR and it's (still) the
+            // right size
+            return NO_ERROR;
+        }
+    }
+
+    // figure out if we need linear filtering
+    if (buffers.w * h == buffers.h * w) {
+        // same pixel area, don't use filtering
+        mLayer.mNeedsFiltering = false;
+    }
+
+    // Allocate a temporary buffer and create the corresponding EGLImageKHR
+    // once the EGLImage has been created we don't need the
+    // graphic buffer reference anymore.
+    sp<GraphicBuffer> buffer = new GraphicBuffer(
+            w, h, HAL_PIXEL_FORMAT_RGB_565,
+            GraphicBuffer::USAGE_HW_TEXTURE |
+            GraphicBuffer::USAGE_HW_2D);
+
+    status_t err = buffer->initCheck();
+    if (err == NO_ERROR) {
+        NativeBuffer& dst(mTempBuffer);
+        dst.img.w = buffer->getStride();
+        dst.img.h = h;
+        dst.img.format = buffer->getPixelFormat();
+        dst.img.handle = (native_handle_t *)buffer->handle;
+        dst.img.base = 0;
+        dst.crop.l = 0;
+        dst.crop.t = 0;
+        dst.crop.r = w;
+        dst.crop.b = h;
+
+        EGLDisplay dpy(getFlinger()->graphicPlane(0).getEGLDisplay());
+        err = mTextureManager.initEglImage(&mTexture, dpy, buffer);
+    }
+
+    return err;
+}
+
+void LayerBuffer::BufferSource::clearTempBufferImage() const
+{
+    // delete the image
+    EGLDisplay dpy(getFlinger()->graphicPlane(0).getEGLDisplay());
+    eglDestroyImageKHR(dpy, mTexture.image);
+
+    // and the associated texture (recreate a name)
+    glDeleteTextures(1, &mTexture.name);
+    Texture defaultTexture;
+    mTexture = defaultTexture;
+}
+
+// ---------------------------------------------------------------------------
+
+LayerBuffer::OverlaySource::OverlaySource(LayerBuffer& layer,
+        sp<OverlayRef>* overlayRef, 
+        uint32_t w, uint32_t h, int32_t format, int32_t orientation)
+    : Source(layer), mVisibilityChanged(false),
+    mOverlay(0), mOverlayHandle(0), mOverlayDevice(0), mOrientation(orientation)
+{
+    overlay_control_device_t* overlay_dev = getFlinger()->getOverlayEngine();
+    if (overlay_dev == NULL) {
+        // overlays not supported
+        return;
+    }
+
+    mOverlayDevice = overlay_dev;
+    overlay_t* overlay = overlay_dev->createOverlay(overlay_dev, w, h, format);
+    if (overlay == NULL) {
+        // couldn't create the overlay (no memory? no more overlays?)
+        return;
+    }
+
+    // enable dithering...
+    overlay_dev->setParameter(overlay_dev, overlay, 
+            OVERLAY_DITHER, OVERLAY_ENABLE);
+
+    mOverlay = overlay;
+    mWidth = overlay->w;
+    mHeight = overlay->h;
+    mFormat = overlay->format; 
+    mWidthStride = overlay->w_stride;
+    mHeightStride = overlay->h_stride;
+    mInitialized = false;
+
+    mOverlayHandle = overlay->getHandleRef(overlay);
+    
+    sp<OverlayChannel> channel = new OverlayChannel( &layer );
+
+    *overlayRef = new OverlayRef(mOverlayHandle, channel,
+            mWidth, mHeight, mFormat, mWidthStride, mHeightStride);
+    getFlinger()->signalEvent();
+}
+
+LayerBuffer::OverlaySource::~OverlaySource()
+{
+    if (mOverlay && mOverlayDevice) {
+        overlay_control_device_t* overlay_dev = mOverlayDevice;
+        overlay_dev->destroyOverlay(overlay_dev, mOverlay);
+    }
+}
+
+void LayerBuffer::OverlaySource::onDraw(const Region& clip) const
+{
+    // this would be where the color-key would be set, should we need it.
+    GLclampf red = 0;
+    GLclampf green = 0;
+    GLclampf blue = 0;
+    mLayer.clearWithOpenGL(clip, red, green, blue, 0);
+}
+
+void LayerBuffer::OverlaySource::onTransaction(uint32_t flags)
+{
+    const Layer::State& front(mLayer.drawingState());
+    const Layer::State& temp(mLayer.currentState());
+    if (temp.sequence != front.sequence) {
+        mVisibilityChanged = true;
+    }
+}
+
+void LayerBuffer::OverlaySource::onVisibilityResolved(
+        const Transform& planeTransform)
+{
+    // this code-path must be as tight as possible, it's called each time
+    // the screen is composited.
+    if (UNLIKELY(mOverlay != 0)) {
+        if (mVisibilityChanged || !mInitialized) {
+            mVisibilityChanged = false;
+            mInitialized = true;
+            const Rect bounds(mLayer.getTransformedBounds());
+            int x = bounds.left;
+            int y = bounds.top;
+            int w = bounds.width();
+            int h = bounds.height();
+            
+            // we need a lock here to protect "destroy"
+            Mutex::Autolock _l(mOverlaySourceLock);
+            if (mOverlay) {
+                overlay_control_device_t* overlay_dev = mOverlayDevice;
+                overlay_dev->setPosition(overlay_dev, mOverlay, x,y,w,h);
+                // we need to combine the layer orientation and the
+                // user-requested orientation.
+                Transform finalTransform = Transform(mOrientation) *
+                        Transform(mLayer.getOrientation());
+                overlay_dev->setParameter(overlay_dev, mOverlay,
+                        OVERLAY_TRANSFORM, finalTransform.getOrientation());
+                overlay_dev->commit(overlay_dev, mOverlay);
+            }
+        }
+    }
+}
+
+void LayerBuffer::OverlaySource::destroy()
+{
+    // we need a lock here to protect "onVisibilityResolved"
+    Mutex::Autolock _l(mOverlaySourceLock);
+    if (mOverlay && mOverlayDevice) {
+        overlay_control_device_t* overlay_dev = mOverlayDevice;
+        overlay_dev->destroyOverlay(overlay_dev, mOverlay);
+        mOverlay = 0;
+    }
+}
+
+// ---------------------------------------------------------------------------
+}; // namespace android
diff --git a/services/surfaceflinger/LayerBuffer.h b/services/surfaceflinger/LayerBuffer.h
new file mode 100644
index 0000000..1c0bf83
--- /dev/null
+++ b/services/surfaceflinger/LayerBuffer.h
@@ -0,0 +1,220 @@
+/*
+ * Copyright (C) 2007 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef ANDROID_LAYER_BUFFER_H
+#define ANDROID_LAYER_BUFFER_H
+
+#include <stdint.h>
+#include <sys/types.h>
+
+#include "LayerBase.h"
+#include "TextureManager.h"
+
+struct copybit_device_t;
+
+namespace android {
+
+// ---------------------------------------------------------------------------
+
+class Buffer;
+class Region;
+class OverlayRef;
+
+// ---------------------------------------------------------------------------
+
+class LayerBuffer : public LayerBaseClient
+{
+    class Source : public LightRefBase<Source> {
+    public:
+        Source(LayerBuffer& layer);
+        virtual ~Source();
+        virtual void onDraw(const Region& clip) const;
+        virtual void onTransaction(uint32_t flags);
+        virtual void onVisibilityResolved(const Transform& planeTransform);
+        virtual void postBuffer(ssize_t offset);
+        virtual void unregisterBuffers();
+        virtual void destroy() { }
+        SurfaceFlinger* getFlinger() const { return mLayer.mFlinger.get(); }
+    protected:
+        LayerBuffer& mLayer;
+    };
+
+public:
+            LayerBuffer(SurfaceFlinger* flinger, DisplayID display,
+                    const sp<Client>& client);
+        virtual ~LayerBuffer();
+
+    virtual void onFirstRef();
+    virtual bool needsBlending() const;
+    virtual const char* getTypeId() const { return "LayerBuffer"; }
+
+    virtual sp<LayerBaseClient::Surface> createSurface() const;
+    virtual status_t ditch();
+    virtual void onDraw(const Region& clip) const;
+    virtual uint32_t doTransaction(uint32_t flags);
+    virtual void unlockPageFlip(const Transform& planeTransform, Region& outDirtyRegion);
+
+    status_t registerBuffers(const ISurface::BufferHeap& buffers);
+    void postBuffer(ssize_t offset);
+    void unregisterBuffers();
+    sp<OverlayRef> createOverlay(uint32_t w, uint32_t h, int32_t format,
+            int32_t orientation);
+    
+    sp<Source> getSource() const;
+    sp<Source> clearSource();
+    void setNeedsBlending(bool blending);
+    Rect getTransformedBounds() const {
+        return mTransformedBounds;
+    }
+
+    void serverDestroy();
+
+private:
+    struct NativeBuffer {
+        copybit_image_t   img;
+        copybit_rect_t    crop;
+    };
+
+    static gralloc_module_t const* sGrallocModule;
+    static gralloc_module_t const* getGrallocModule() {
+        return sGrallocModule;
+    }
+
+    class Buffer : public LightRefBase<Buffer> {
+    public:
+        Buffer(const ISurface::BufferHeap& buffers,
+                ssize_t offset, size_t bufferSize);
+        inline bool supportsCopybit() const {
+            return mSupportsCopybit;
+        }
+        inline status_t getStatus() const {
+            return mBufferHeap.heap!=0 ? NO_ERROR : NO_INIT;
+        }
+        inline const NativeBuffer& getBuffer() const {
+            return mNativeBuffer;
+        }
+    protected:
+        friend class LightRefBase<Buffer>;
+        Buffer& operator = (const Buffer& rhs);
+        Buffer(const Buffer& rhs);
+        ~Buffer();
+    private:
+        ISurface::BufferHeap    mBufferHeap;
+        NativeBuffer            mNativeBuffer;
+        bool                    mSupportsCopybit;
+    };
+
+    class BufferSource : public Source {
+    public:
+        BufferSource(LayerBuffer& layer, const ISurface::BufferHeap& buffers);
+        virtual ~BufferSource();
+
+        status_t getStatus() const { return mStatus; }
+        sp<Buffer> getBuffer() const;
+        void setBuffer(const sp<Buffer>& buffer);
+
+        virtual void onDraw(const Region& clip) const;
+        virtual void postBuffer(ssize_t offset);
+        virtual void unregisterBuffers();
+        virtual void destroy() { }
+    private:
+        status_t initTempBuffer() const;
+        void clearTempBufferImage() const;
+        mutable Mutex                   mBufferSourceLock;
+        sp<Buffer>                      mBuffer;
+        status_t                        mStatus;
+        ISurface::BufferHeap            mBufferHeap;
+        size_t                          mBufferSize;
+        mutable Texture                 mTexture;
+        mutable NativeBuffer            mTempBuffer;
+        mutable TextureManager          mTextureManager;
+    };
+    
+    class OverlaySource : public Source {
+    public:
+        OverlaySource(LayerBuffer& layer,
+                sp<OverlayRef>* overlayRef, 
+                uint32_t w, uint32_t h, int32_t format, int32_t orientation);
+        virtual ~OverlaySource();
+        virtual void onDraw(const Region& clip) const;
+        virtual void onTransaction(uint32_t flags);
+        virtual void onVisibilityResolved(const Transform& planeTransform);
+        virtual void destroy();
+    private:
+
+        class OverlayChannel : public BnOverlay {
+            wp<LayerBuffer> mLayer;
+            virtual void destroy() {
+                sp<LayerBuffer> layer(mLayer.promote());
+                if (layer != 0) {
+                    layer->serverDestroy();
+                }
+            }
+        public:
+            OverlayChannel(const sp<LayerBuffer>& layer)
+                : mLayer(layer) {
+            }
+        };
+        
+        friend class OverlayChannel;
+        bool mVisibilityChanged;
+
+        overlay_t* mOverlay;        
+        overlay_handle_t mOverlayHandle;
+        overlay_control_device_t* mOverlayDevice;
+        uint32_t mWidth;
+        uint32_t mHeight;
+        int32_t mFormat;
+        int32_t mWidthStride;
+        int32_t mHeightStride;
+        int32_t mOrientation;
+        mutable Mutex mOverlaySourceLock;
+        bool mInitialized;
+    };
+
+
+    class SurfaceLayerBuffer : public LayerBaseClient::Surface
+    {
+    public:
+        SurfaceLayerBuffer(const sp<SurfaceFlinger>& flinger,
+                        const sp<LayerBuffer>& owner);
+        virtual ~SurfaceLayerBuffer();
+
+        virtual status_t registerBuffers(const ISurface::BufferHeap& buffers);
+        virtual void postBuffer(ssize_t offset);
+        virtual void unregisterBuffers();
+        
+        virtual sp<OverlayRef> createOverlay(
+                uint32_t w, uint32_t h, int32_t format, int32_t orientation);
+    private:
+        sp<LayerBuffer> getOwner() const {
+            return static_cast<LayerBuffer*>(Surface::getOwner().get());
+        }
+    };
+
+    mutable Mutex   mLock;
+    sp<Source>      mSource;
+    sp<Surface>     mSurface;
+    bool            mInvalidate;
+    bool            mNeedsBlending;
+    copybit_device_t* mBlitEngine;
+};
+
+// ---------------------------------------------------------------------------
+
+}; // namespace android
+
+#endif // ANDROID_LAYER_BUFFER_H
diff --git a/services/surfaceflinger/LayerDim.cpp b/services/surfaceflinger/LayerDim.cpp
new file mode 100644
index 0000000..a1f339e
--- /dev/null
+++ b/services/surfaceflinger/LayerDim.cpp
@@ -0,0 +1,103 @@
+/*
+ * Copyright (C) 2007 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include <stdlib.h>
+#include <stdint.h>
+#include <sys/types.h>
+
+#include <utils/Errors.h>
+#include <utils/Log.h>
+
+#include <ui/GraphicBuffer.h>
+
+#include "LayerDim.h"
+#include "SurfaceFlinger.h"
+#include "DisplayHardware/DisplayHardware.h"
+
+namespace android {
+// ---------------------------------------------------------------------------
+
+bool LayerDim::sUseTexture;
+GLuint LayerDim::sTexId;
+EGLImageKHR LayerDim::sImage;
+int32_t LayerDim::sWidth;
+int32_t LayerDim::sHeight;
+
+// ---------------------------------------------------------------------------
+
+LayerDim::LayerDim(SurfaceFlinger* flinger, DisplayID display,
+        const sp<Client>& client)
+    : LayerBaseClient(flinger, display, client)
+{
+}
+
+void LayerDim::initDimmer(SurfaceFlinger* flinger, uint32_t w, uint32_t h)
+{
+    sTexId = -1;
+    sImage = EGL_NO_IMAGE_KHR;
+    sWidth = w;
+    sHeight = h;
+    sUseTexture = false;
+}
+
+LayerDim::~LayerDim()
+{
+}
+
+void LayerDim::onDraw(const Region& clip) const
+{
+    const State& s(drawingState());
+    Region::const_iterator it = clip.begin();
+    Region::const_iterator const end = clip.end();
+    if (s.alpha>0 && (it != end)) {
+        const DisplayHardware& hw(graphicPlane(0).displayHardware());
+        const GLfloat alpha = s.alpha/255.0f;
+        const uint32_t fbHeight = hw.getHeight();
+        glDisable(GL_DITHER);
+        glEnable(GL_BLEND);
+        glBlendFunc(GL_ONE, GL_ONE_MINUS_SRC_ALPHA);
+        glColor4f(0, 0, 0, alpha);
+
+#if defined(GL_OES_texture_external)
+        if (GLExtensions::getInstance().haveTextureExternal()) {
+            glDisable(GL_TEXTURE_EXTERNAL_OES);
+        }
+#endif
+        glDisable(GL_TEXTURE_2D);
+
+        GLshort w = sWidth;
+        GLshort h = sHeight;
+        const GLshort vertices[4][2] = {
+                { 0, 0 },
+                { 0, h },
+                { w, h },
+                { w, 0 }
+        };
+        glVertexPointer(2, GL_SHORT, 0, vertices);
+
+        while (it != end) {
+            const Rect& r = *it++;
+            const GLint sy = fbHeight - (r.top + r.height());
+            glScissor(r.left, sy, r.width(), r.height());
+            glDrawArrays(GL_TRIANGLE_FAN, 0, 4); 
+        }
+    }
+    glDisableClientState(GL_TEXTURE_COORD_ARRAY);
+}
+
+// ---------------------------------------------------------------------------
+
+}; // namespace android
diff --git a/services/surfaceflinger/LayerDim.h b/services/surfaceflinger/LayerDim.h
new file mode 100644
index 0000000..f032314
--- /dev/null
+++ b/services/surfaceflinger/LayerDim.h
@@ -0,0 +1,56 @@
+/*
+ * Copyright (C) 2007 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef ANDROID_LAYER_DIM_H
+#define ANDROID_LAYER_DIM_H
+
+#include <stdint.h>
+#include <sys/types.h>
+
+#include <EGL/egl.h>
+#include <EGL/eglext.h>
+
+#include "LayerBase.h"
+
+// ---------------------------------------------------------------------------
+
+namespace android {
+
+class LayerDim : public LayerBaseClient
+{
+    static bool sUseTexture;
+    static GLuint sTexId;
+    static EGLImageKHR sImage;
+    static int32_t sWidth;
+    static int32_t sHeight;
+public:    
+                LayerDim(SurfaceFlinger* flinger, DisplayID display,
+                        const sp<Client>& client);
+        virtual ~LayerDim();
+
+    virtual void onDraw(const Region& clip) const;
+    virtual bool needsBlending() const  { return true; }
+    virtual bool isSecure() const       { return false; }
+    virtual const char* getTypeId() const { return "LayerDim"; }
+
+    static void initDimmer(SurfaceFlinger* flinger, uint32_t w, uint32_t h);
+};
+
+// ---------------------------------------------------------------------------
+
+}; // namespace android
+
+#endif // ANDROID_LAYER_DIM_H
diff --git a/libs/surfaceflinger/MODULE_LICENSE_APACHE2 b/services/surfaceflinger/MODULE_LICENSE_APACHE2
similarity index 100%
rename from libs/surfaceflinger/MODULE_LICENSE_APACHE2
rename to services/surfaceflinger/MODULE_LICENSE_APACHE2
diff --git a/services/surfaceflinger/MessageQueue.cpp b/services/surfaceflinger/MessageQueue.cpp
new file mode 100644
index 0000000..d668e88
--- /dev/null
+++ b/services/surfaceflinger/MessageQueue.cpp
@@ -0,0 +1,193 @@
+/*
+ * Copyright (C) 2009 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include <stdint.h>
+#include <errno.h>
+#include <sys/types.h>
+
+#include <utils/threads.h>
+#include <utils/Timers.h>
+#include <utils/Log.h>
+#include <binder/IPCThreadState.h>
+
+#include "MessageQueue.h"
+
+namespace android {
+
+// ---------------------------------------------------------------------------
+
+void MessageList::insert(const sp<MessageBase>& node) 
+{
+    LIST::iterator cur(mList.begin());
+    LIST::iterator end(mList.end());
+    while (cur != end) {
+        if (*node < **cur) {
+            mList.insert(cur, node);
+            return;
+        }
+        ++cur;
+    }
+    mList.insert(++end, node);
+}
+
+void MessageList::remove(MessageList::LIST::iterator pos) 
+{
+    mList.erase(pos);
+}
+
+// ---------------------------------------------------------------------------
+
+MessageQueue::MessageQueue()
+    : mInvalidate(false)
+{
+    mInvalidateMessage = new MessageBase(INVALIDATE);
+}
+
+MessageQueue::~MessageQueue()
+{
+}
+
+sp<MessageBase> MessageQueue::waitMessage(nsecs_t timeout)
+{
+    sp<MessageBase> result;
+
+    bool again;
+    do {
+        const nsecs_t timeoutTime = systemTime() + timeout;
+        while (true) {
+            Mutex::Autolock _l(mLock);
+            nsecs_t now = systemTime();
+            nsecs_t nextEventTime = -1;
+
+            // invalidate messages are always handled first
+            if (mInvalidate) {
+                mInvalidate = false;
+                mInvalidateMessage->when = now;
+                result = mInvalidateMessage;
+                break;
+            }
+
+            LIST::iterator cur(mMessages.begin());
+            if (cur != mMessages.end()) {
+                result = *cur;
+            }
+            
+            if (result != 0) {
+                if (result->when <= now) {
+                    // there is a message to deliver
+                    mMessages.remove(cur);
+                    break;
+                }
+                if (timeout>=0 && timeoutTime < now) {
+                    // we timed-out, return a NULL message
+                    result = 0;
+                    break;
+                }
+                nextEventTime = result->when;
+                result = 0;
+            }
+
+            if (timeout >= 0 && nextEventTime > 0) {
+                if (nextEventTime > timeoutTime) {
+                    nextEventTime = timeoutTime;
+                }
+            }
+
+            if (nextEventTime >= 0) {
+                //LOGD("nextEventTime = %lld ms", nextEventTime);
+                if (nextEventTime > 0) {
+                    // we're about to wait, flush the binder command buffer
+                    IPCThreadState::self()->flushCommands();
+                    const nsecs_t reltime = nextEventTime - systemTime();
+                    if (reltime > 0) {
+                        mCondition.waitRelative(mLock, reltime);
+                    }
+                }
+            } else {
+                //LOGD("going to wait");
+                // we're about to wait, flush the binder command buffer
+                IPCThreadState::self()->flushCommands();
+                mCondition.wait(mLock);
+            }
+        } 
+        // here we're not holding the lock anymore
+
+        if (result == 0)
+            break;
+
+        again = result->handler();
+        if (again) {
+            // the message has been processed. release our reference to it
+            // without holding the lock.
+            result->notify();
+            result = 0;
+        }
+        
+    } while (again);
+
+    return result;
+}
+
+status_t MessageQueue::postMessage(
+        const sp<MessageBase>& message, nsecs_t relTime, uint32_t flags)
+{
+    return queueMessage(message, relTime, flags);
+}
+
+status_t MessageQueue::invalidate() {
+    Mutex::Autolock _l(mLock);
+    mInvalidate = true;
+    mCondition.signal();
+    return NO_ERROR;
+}
+
+status_t MessageQueue::queueMessage(
+        const sp<MessageBase>& message, nsecs_t relTime, uint32_t flags)
+{
+    Mutex::Autolock _l(mLock);
+    message->when = systemTime() + relTime;
+    mMessages.insert(message);
+    
+    //LOGD("MessageQueue::queueMessage time = %lld ms", message->when);
+    //dumpLocked(message);
+
+    mCondition.signal();
+    return NO_ERROR;
+}
+
+void MessageQueue::dump(const sp<MessageBase>& message)
+{
+    Mutex::Autolock _l(mLock);
+    dumpLocked(message);
+}
+
+void MessageQueue::dumpLocked(const sp<MessageBase>& message)
+{
+    LIST::const_iterator cur(mMessages.begin());
+    LIST::const_iterator end(mMessages.end());
+    int c = 0;
+    while (cur != end) {
+        const char tick = (*cur == message) ? '>' : ' ';
+        LOGD("%c %d: msg{.what=%08x, when=%lld}",
+                tick, c, (*cur)->what, (*cur)->when);
+        ++cur;
+        c++;
+    }
+}
+
+// ---------------------------------------------------------------------------
+
+}; // namespace android
diff --git a/services/surfaceflinger/MessageQueue.h b/services/surfaceflinger/MessageQueue.h
new file mode 100644
index 0000000..890f809
--- /dev/null
+++ b/services/surfaceflinger/MessageQueue.h
@@ -0,0 +1,126 @@
+/*
+ * Copyright (C) 2009 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef ANDROID_MESSAGE_QUEUE_H
+#define ANDROID_MESSAGE_QUEUE_H
+
+#include <stdint.h>
+#include <errno.h>
+#include <sys/types.h>
+
+#include <utils/threads.h>
+#include <utils/Timers.h>
+#include <utils/List.h>
+
+#include "Barrier.h"
+
+namespace android {
+
+// ---------------------------------------------------------------------------
+
+class MessageBase;
+
+class MessageList 
+{
+    List< sp<MessageBase> > mList;
+    typedef List< sp<MessageBase> > LIST;
+public:
+    inline LIST::iterator begin()                { return mList.begin(); }
+    inline LIST::const_iterator begin() const    { return mList.begin(); }
+    inline LIST::iterator end()                  { return mList.end(); }
+    inline LIST::const_iterator end() const      { return mList.end(); }
+    inline bool isEmpty() const { return mList.empty(); }
+    void insert(const sp<MessageBase>& node);
+    void remove(LIST::iterator pos);
+};
+
+// ============================================================================
+
+class MessageBase : 
+    public LightRefBase<MessageBase>
+{
+public:
+    nsecs_t     when;
+    uint32_t    what;
+    int32_t     arg0;    
+
+    MessageBase() : when(0), what(0), arg0(0) { }
+    MessageBase(uint32_t what, int32_t arg0=0)
+        : when(0), what(what), arg0(arg0) { }
+    
+    // return true if message has a handler
+    virtual bool handler() { return false; }
+
+    // waits for the handler to be processed
+    void wait() const { barrier.wait(); }
+    
+    // releases all waiters. this is done automatically if
+    // handler returns true
+    void notify() const { barrier.open(); }
+
+protected:
+    virtual ~MessageBase() { }
+
+private:
+    mutable Barrier barrier;
+    friend class LightRefBase<MessageBase>;
+};
+
+inline bool operator < (const MessageBase& lhs, const MessageBase& rhs) {
+    return lhs.when < rhs.when;
+}
+
+// ---------------------------------------------------------------------------
+
+class MessageQueue
+{
+    typedef List< sp<MessageBase> > LIST;
+public:
+
+    MessageQueue();
+    ~MessageQueue();
+
+    // pre-defined messages
+    enum {
+        INVALIDATE = '_upd'
+    };
+
+    sp<MessageBase> waitMessage(nsecs_t timeout = -1);
+    
+    status_t postMessage(const sp<MessageBase>& message,
+            nsecs_t reltime=0, uint32_t flags = 0);
+
+    status_t invalidate();
+    
+    void dump(const sp<MessageBase>& message);
+
+private:
+    status_t queueMessage(const sp<MessageBase>& message,
+            nsecs_t reltime, uint32_t flags);
+    void dumpLocked(const sp<MessageBase>& message);
+    
+    Mutex           mLock;
+    Condition       mCondition;
+    MessageList     mMessages;
+    bool            mInvalidate;
+    sp<MessageBase> mInvalidateMessage;
+};
+
+// ---------------------------------------------------------------------------
+
+}; // namespace android
+
+#endif /* ANDROID_MESSAGE_QUEUE_H */
diff --git a/services/surfaceflinger/SurfaceFlinger.cpp b/services/surfaceflinger/SurfaceFlinger.cpp
new file mode 100644
index 0000000..3167c4c
--- /dev/null
+++ b/services/surfaceflinger/SurfaceFlinger.cpp
@@ -0,0 +1,1895 @@
+/*
+ * Copyright (C) 2007 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include <stdlib.h>
+#include <stdio.h>
+#include <stdint.h>
+#include <unistd.h>
+#include <fcntl.h>
+#include <errno.h>
+#include <math.h>
+#include <limits.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <sys/ioctl.h>
+
+#include <cutils/log.h>
+#include <cutils/properties.h>
+
+#include <binder/IPCThreadState.h>
+#include <binder/IServiceManager.h>
+#include <binder/MemoryHeapBase.h>
+
+#include <utils/String8.h>
+#include <utils/String16.h>
+#include <utils/StopWatch.h>
+
+#include <ui/GraphicBufferAllocator.h>
+#include <ui/PixelFormat.h>
+
+#include <pixelflinger/pixelflinger.h>
+#include <GLES/gl.h>
+
+#include "clz.h"
+#include "GLExtensions.h"
+#include "Layer.h"
+#include "LayerBlur.h"
+#include "LayerBuffer.h"
+#include "LayerDim.h"
+#include "SurfaceFlinger.h"
+
+#include "DisplayHardware/DisplayHardware.h"
+
+/* ideally AID_GRAPHICS would be in a semi-public header
+ * or there would be a way to map a user/group name to its id
+ */
+#ifndef AID_GRAPHICS
+#define AID_GRAPHICS 1003
+#endif
+
+#define DISPLAY_COUNT       1
+
+namespace android {
+// ---------------------------------------------------------------------------
+
+SurfaceFlinger::LayerVector::LayerVector(const SurfaceFlinger::LayerVector& rhs)
+    : lookup(rhs.lookup), layers(rhs.layers)
+{
+}
+
+ssize_t SurfaceFlinger::LayerVector::indexOf(
+        const sp<LayerBase>& key, size_t guess) const
+{
+    if (guess<size() && lookup.keyAt(guess) == key)
+        return guess;
+    const ssize_t i = lookup.indexOfKey(key);
+    if (i>=0) {
+        const size_t idx = lookup.valueAt(i);
+        LOGE_IF(layers[idx]!=key,
+            "LayerVector[%p]: layers[%d]=%p, key=%p",
+            this, int(idx), layers[idx].get(), key.get());
+        return idx;
+    }
+    return i;
+}
+
+ssize_t SurfaceFlinger::LayerVector::add(
+        const sp<LayerBase>& layer,
+        Vector< sp<LayerBase> >::compar_t cmp)
+{
+    size_t count = layers.size();
+    ssize_t l = 0;
+    ssize_t h = count-1;
+    ssize_t mid;
+    sp<LayerBase> const* a = layers.array();
+    while (l <= h) {
+        mid = l + (h - l)/2;
+        const int c = cmp(a+mid, &layer);
+        if (c == 0)     { l = mid; break; }
+        else if (c<0)   { l = mid+1; }
+        else            { h = mid-1; }
+    }
+    size_t order = l;
+    while (order<count && !cmp(&layer, a+order)) {
+        order++;
+    }
+    count = lookup.size();
+    for (size_t i=0 ; i<count ; i++) {
+        if (lookup.valueAt(i) >= order) {
+            lookup.editValueAt(i)++;
+        }
+    }
+    layers.insertAt(layer, order);
+    lookup.add(layer, order);
+    return order;
+}
+
+ssize_t SurfaceFlinger::LayerVector::remove(const sp<LayerBase>& layer)
+{
+    const ssize_t keyIndex = lookup.indexOfKey(layer);
+    if (keyIndex >= 0) {
+        const size_t index = lookup.valueAt(keyIndex);
+        LOGE_IF(layers[index]!=layer,
+                "LayerVector[%p]: layers[%u]=%p, layer=%p",
+                this, int(index), layers[index].get(), layer.get());
+        layers.removeItemsAt(index);
+        lookup.removeItemsAt(keyIndex);
+        const size_t count = lookup.size();
+        for (size_t i=0 ; i<count ; i++) {
+            if (lookup.valueAt(i) >= size_t(index)) {
+                lookup.editValueAt(i)--;
+            }
+        }
+        return index;
+    }
+    return NAME_NOT_FOUND;
+}
+
+ssize_t SurfaceFlinger::LayerVector::reorder(
+        const sp<LayerBase>& layer,
+        Vector< sp<LayerBase> >::compar_t cmp)
+{
+    // XXX: it's a little lame. but oh well...
+    ssize_t err = remove(layer);
+    if (err >=0)
+        err = add(layer, cmp);
+    return err;
+}
+
+// ---------------------------------------------------------------------------
+#if 0
+#pragma mark -
+#endif
+
+SurfaceFlinger::SurfaceFlinger()
+    :   BnSurfaceComposer(), Thread(false),
+        mTransactionFlags(0),
+        mTransactionCount(0),
+        mResizeTransationPending(false),
+        mLayersRemoved(false),
+        mBootTime(systemTime()),
+        mHardwareTest("android.permission.HARDWARE_TEST"),
+        mAccessSurfaceFlinger("android.permission.ACCESS_SURFACE_FLINGER"),
+        mDump("android.permission.DUMP"),
+        mVisibleRegionsDirty(false),
+        mDeferReleaseConsole(false),
+        mFreezeDisplay(false),
+        mFreezeCount(0),
+        mFreezeDisplayTime(0),
+        mDebugRegion(0),
+        mDebugBackground(0),
+        mDebugInSwapBuffers(0),
+        mLastSwapBufferTime(0),
+        mDebugInTransaction(0),
+        mLastTransactionTime(0),
+        mBootFinished(false),
+        mConsoleSignals(0),
+        mSecureFrameBuffer(0)
+{
+    init();
+}
+
+void SurfaceFlinger::init()
+{
+    LOGI("SurfaceFlinger is starting");
+
+    // debugging stuff...
+    char value[PROPERTY_VALUE_MAX];
+    property_get("debug.sf.showupdates", value, "0");
+    mDebugRegion = atoi(value);
+    property_get("debug.sf.showbackground", value, "0");
+    mDebugBackground = atoi(value);
+
+    LOGI_IF(mDebugRegion,       "showupdates enabled");
+    LOGI_IF(mDebugBackground,   "showbackground enabled");
+}
+
+SurfaceFlinger::~SurfaceFlinger()
+{
+    glDeleteTextures(1, &mWormholeTexName);
+}
+
+overlay_control_device_t* SurfaceFlinger::getOverlayEngine() const
+{
+    return graphicPlane(0).displayHardware().getOverlayEngine();
+}
+
+sp<IMemoryHeap> SurfaceFlinger::getCblk() const
+{
+    return mServerHeap;
+}
+
+sp<ISurfaceComposerClient> SurfaceFlinger::createConnection()
+{
+    sp<ISurfaceComposerClient> bclient;
+    sp<Client> client(new Client(this));
+    status_t err = client->initCheck();
+    if (err == NO_ERROR) {
+        bclient = client;
+    }
+    return bclient;
+}
+
+sp<ISurfaceComposerClient> SurfaceFlinger::createClientConnection()
+{
+    sp<ISurfaceComposerClient> bclient;
+    sp<UserClient> client(new UserClient(this));
+    status_t err = client->initCheck();
+    if (err == NO_ERROR) {
+        bclient = client;
+    }
+    return bclient;
+}
+
+
+const GraphicPlane& SurfaceFlinger::graphicPlane(int dpy) const
+{
+    LOGE_IF(uint32_t(dpy) >= DISPLAY_COUNT, "Invalid DisplayID %d", dpy);
+    const GraphicPlane& plane(mGraphicPlanes[dpy]);
+    return plane;
+}
+
+GraphicPlane& SurfaceFlinger::graphicPlane(int dpy)
+{
+    return const_cast<GraphicPlane&>(
+        const_cast<SurfaceFlinger const *>(this)->graphicPlane(dpy));
+}
+
+void SurfaceFlinger::bootFinished()
+{
+    const nsecs_t now = systemTime();
+    const nsecs_t duration = now - mBootTime;
+    LOGI("Boot is finished (%ld ms)", long(ns2ms(duration)) );  
+    mBootFinished = true;
+    property_set("ctl.stop", "bootanim");
+}
+
+void SurfaceFlinger::onFirstRef()
+{
+    run("SurfaceFlinger", PRIORITY_URGENT_DISPLAY);
+
+    // Wait for the main thread to be done with its initialization
+    mReadyToRunBarrier.wait();
+}
+
+static inline uint16_t pack565(int r, int g, int b) {
+    return (r<<11)|(g<<5)|b;
+}
+
+status_t SurfaceFlinger::readyToRun()
+{
+    LOGI(   "SurfaceFlinger's main thread ready to run. "
+            "Initializing graphics H/W...");
+
+    // we only support one display currently
+    int dpy = 0;
+
+    {
+        // initialize the main display
+        GraphicPlane& plane(graphicPlane(dpy));
+        DisplayHardware* const hw = new DisplayHardware(this, dpy);
+        plane.setDisplayHardware(hw);
+    }
+
+    // create the shared control-block
+    mServerHeap = new MemoryHeapBase(4096,
+            MemoryHeapBase::READ_ONLY, "SurfaceFlinger read-only heap");
+    LOGE_IF(mServerHeap==0, "can't create shared memory dealer");
+    
+    mServerCblk = static_cast<surface_flinger_cblk_t*>(mServerHeap->getBase());
+    LOGE_IF(mServerCblk==0, "can't get to shared control block's address");
+    
+    new(mServerCblk) surface_flinger_cblk_t;
+
+    // initialize primary screen
+    // (other display should be initialized in the same manner, but
+    // asynchronously, as they could come and go. None of this is supported
+    // yet).
+    const GraphicPlane& plane(graphicPlane(dpy));
+    const DisplayHardware& hw = plane.displayHardware();
+    const uint32_t w = hw.getWidth();
+    const uint32_t h = hw.getHeight();
+    const uint32_t f = hw.getFormat();
+    hw.makeCurrent();
+
+    // initialize the shared control block
+    mServerCblk->connected |= 1<<dpy;
+    display_cblk_t* dcblk = mServerCblk->displays + dpy;
+    memset(dcblk, 0, sizeof(display_cblk_t));
+    dcblk->w            = plane.getWidth();
+    dcblk->h            = plane.getHeight();
+    dcblk->format       = f;
+    dcblk->orientation  = ISurfaceComposer::eOrientationDefault;
+    dcblk->xdpi         = hw.getDpiX();
+    dcblk->ydpi         = hw.getDpiY();
+    dcblk->fps          = hw.getRefreshRate();
+    dcblk->density      = hw.getDensity();
+
+    // Initialize OpenGL|ES
+    glPixelStorei(GL_UNPACK_ALIGNMENT, 4);
+    glPixelStorei(GL_PACK_ALIGNMENT, 4); 
+    glEnableClientState(GL_VERTEX_ARRAY);
+    glEnable(GL_SCISSOR_TEST);
+    glShadeModel(GL_FLAT);
+    glDisable(GL_DITHER);
+    glDisable(GL_CULL_FACE);
+
+    const uint16_t g0 = pack565(0x0F,0x1F,0x0F);
+    const uint16_t g1 = pack565(0x17,0x2f,0x17);
+    const uint16_t textureData[4] = { g0, g1, g1, g0 };
+    glGenTextures(1, &mWormholeTexName);
+    glBindTexture(GL_TEXTURE_2D, mWormholeTexName);
+    glTexParameterx(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
+    glTexParameterx(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
+    glTexParameterx(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_REPEAT);
+    glTexParameterx(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_REPEAT);
+    glTexImage2D(GL_TEXTURE_2D, 0, GL_RGB, 2, 2, 0,
+            GL_RGB, GL_UNSIGNED_SHORT_5_6_5, textureData);
+
+    glViewport(0, 0, w, h);
+    glMatrixMode(GL_PROJECTION);
+    glLoadIdentity();
+    glOrthof(0, w, h, 0, 0, 1);
+
+   LayerDim::initDimmer(this, w, h);
+
+    mReadyToRunBarrier.open();
+
+    /*
+     *  We're now ready to accept clients...
+     */
+
+    // start boot animation
+    property_set("ctl.start", "bootanim");
+    
+    return NO_ERROR;
+}
+
+// ----------------------------------------------------------------------------
+#if 0
+#pragma mark -
+#pragma mark Events Handler
+#endif
+
+void SurfaceFlinger::waitForEvent()
+{
+    while (true) {
+        nsecs_t timeout = -1;
+        const nsecs_t freezeDisplayTimeout = ms2ns(5000);
+        if (UNLIKELY(isFrozen())) {
+            // wait 5 seconds
+            const nsecs_t now = systemTime();
+            if (mFreezeDisplayTime == 0) {
+                mFreezeDisplayTime = now;
+            }
+            nsecs_t waitTime = freezeDisplayTimeout - (now - mFreezeDisplayTime);
+            timeout = waitTime>0 ? waitTime : 0;
+        }
+
+        sp<MessageBase> msg = mEventQueue.waitMessage(timeout);
+
+        // see if we timed out
+        if (isFrozen()) {
+            const nsecs_t now = systemTime();
+            nsecs_t frozenTime = (now - mFreezeDisplayTime);
+            if (frozenTime >= freezeDisplayTimeout) {
+                // we timed out and are still frozen
+                LOGW("timeout expired mFreezeDisplay=%d, mFreezeCount=%d",
+                        mFreezeDisplay, mFreezeCount);
+                mFreezeDisplayTime = 0;
+                mFreezeCount = 0;
+                mFreezeDisplay = false;
+            }
+        }
+
+        if (msg != 0) {
+            switch (msg->what) {
+                case MessageQueue::INVALIDATE:
+                    // invalidate message, just return to the main loop
+                    return;
+            }
+        }
+    }
+}
+
+void SurfaceFlinger::signalEvent() {
+    mEventQueue.invalidate();
+}
+
+void SurfaceFlinger::signal() const {
+    // this is the IPC call
+    const_cast<SurfaceFlinger*>(this)->signalEvent();
+}
+
+status_t SurfaceFlinger::postMessageAsync(const sp<MessageBase>& msg,
+        nsecs_t reltime, uint32_t flags)
+{
+    return mEventQueue.postMessage(msg, reltime, flags);
+}
+
+status_t SurfaceFlinger::postMessageSync(const sp<MessageBase>& msg,
+        nsecs_t reltime, uint32_t flags)
+{
+    status_t res = mEventQueue.postMessage(msg, reltime, flags);
+    if (res == NO_ERROR) {
+        msg->wait();
+    }
+    return res;
+}
+
+// ----------------------------------------------------------------------------
+#if 0
+#pragma mark -
+#pragma mark Main loop
+#endif
+
+bool SurfaceFlinger::threadLoop()
+{
+    waitForEvent();
+
+    // check for transactions
+    if (UNLIKELY(mConsoleSignals)) {
+        handleConsoleEvents();
+    }
+
+    if (LIKELY(mTransactionCount == 0)) {
+        // if we're in a global transaction, don't do anything.
+        const uint32_t mask = eTransactionNeeded | eTraversalNeeded;
+        uint32_t transactionFlags = getTransactionFlags(mask);
+        if (LIKELY(transactionFlags)) {
+            handleTransaction(transactionFlags);
+        }
+    }
+
+    // post surfaces (if needed)
+    handlePageFlip();
+
+    const DisplayHardware& hw(graphicPlane(0).displayHardware());
+    if (LIKELY(hw.canDraw() && !isFrozen())) {
+        // repaint the framebuffer (if needed)
+        handleRepaint();
+
+        // inform the h/w that we're done compositing
+        hw.compositionComplete();
+
+        // release the clients before we flip ('cause flip might block)
+        unlockClients();
+
+        postFramebuffer();
+    } else {
+        // pretend we did the post
+        unlockClients();
+        usleep(16667); // 60 fps period
+    }
+    return true;
+}
+
+void SurfaceFlinger::postFramebuffer()
+{
+    if (!mInvalidRegion.isEmpty()) {
+        const DisplayHardware& hw(graphicPlane(0).displayHardware());
+        const nsecs_t now = systemTime();
+        mDebugInSwapBuffers = now;
+        hw.flip(mInvalidRegion);
+        mLastSwapBufferTime = systemTime() - now;
+        mDebugInSwapBuffers = 0;
+        mInvalidRegion.clear();
+    }
+}
+
+void SurfaceFlinger::handleConsoleEvents()
+{
+    // something to do with the console
+    const DisplayHardware& hw = graphicPlane(0).displayHardware();
+
+    int what = android_atomic_and(0, &mConsoleSignals);
+    if (what & eConsoleAcquired) {
+        hw.acquireScreen();
+    }
+
+    if (mDeferReleaseConsole && hw.canDraw()) {
+        // We got the release signal before the acquire signal
+        mDeferReleaseConsole = false;
+        hw.releaseScreen();
+    }
+
+    if (what & eConsoleReleased) {
+        if (hw.canDraw()) {
+            hw.releaseScreen();
+        } else {
+            mDeferReleaseConsole = true;
+        }
+    }
+
+    mDirtyRegion.set(hw.bounds());
+}
+
+void SurfaceFlinger::handleTransaction(uint32_t transactionFlags)
+{
+    Vector< sp<LayerBase> > ditchedLayers;
+
+    { // scope for the lock
+        Mutex::Autolock _l(mStateLock);
+        const nsecs_t now = systemTime();
+        mDebugInTransaction = now;
+        handleTransactionLocked(transactionFlags, ditchedLayers);
+        mLastTransactionTime = systemTime() - now;
+        mDebugInTransaction = 0;
+    }
+
+    // do this without lock held
+    const size_t count = ditchedLayers.size();
+    for (size_t i=0 ; i<count ; i++) {
+        if (ditchedLayers[i] != 0) {
+            //LOGD("ditching layer %p", ditchedLayers[i].get());
+            ditchedLayers[i]->ditch();
+        }
+    }
+}
+
+void SurfaceFlinger::handleTransactionLocked(
+        uint32_t transactionFlags, Vector< sp<LayerBase> >& ditchedLayers)
+{
+    const LayerVector& currentLayers(mCurrentState.layersSortedByZ);
+    const size_t count = currentLayers.size();
+
+    /*
+     * Traversal of the children
+     * (perform the transaction for each of them if needed)
+     */
+
+    const bool layersNeedTransaction = transactionFlags & eTraversalNeeded;
+    if (layersNeedTransaction) {
+        for (size_t i=0 ; i<count ; i++) {
+            const sp<LayerBase>& layer = currentLayers[i];
+            uint32_t trFlags = layer->getTransactionFlags(eTransactionNeeded);
+            if (!trFlags) continue;
+
+            const uint32_t flags = layer->doTransaction(0);
+            if (flags & Layer::eVisibleRegion)
+                mVisibleRegionsDirty = true;
+        }
+    }
+
+    /*
+     * Perform our own transaction if needed
+     */
+
+    if (transactionFlags & eTransactionNeeded) {
+        if (mCurrentState.orientation != mDrawingState.orientation) {
+            // the orientation has changed, recompute all visible regions
+            // and invalidate everything.
+
+            const int dpy = 0;
+            const int orientation = mCurrentState.orientation;
+            const uint32_t type = mCurrentState.orientationType;
+            GraphicPlane& plane(graphicPlane(dpy));
+            plane.setOrientation(orientation);
+
+            // update the shared control block
+            const DisplayHardware& hw(plane.displayHardware());
+            volatile display_cblk_t* dcblk = mServerCblk->displays + dpy;
+            dcblk->orientation = orientation;
+            dcblk->w = plane.getWidth();
+            dcblk->h = plane.getHeight();
+
+            mVisibleRegionsDirty = true;
+            mDirtyRegion.set(hw.bounds());
+        }
+
+        if (mCurrentState.freezeDisplay != mDrawingState.freezeDisplay) {
+            // freezing or unfreezing the display -> trigger animation if needed
+            mFreezeDisplay = mCurrentState.freezeDisplay;
+            if (mFreezeDisplay)
+                 mFreezeDisplayTime = 0;
+        }
+
+        if (currentLayers.size() > mDrawingState.layersSortedByZ.size()) {
+            // layers have been added
+            mVisibleRegionsDirty = true;
+        }
+
+        // some layers might have been removed, so
+        // we need to update the regions they're exposing.
+        if (mLayersRemoved) {
+            mLayersRemoved = false;
+            mVisibleRegionsDirty = true;
+            const LayerVector& previousLayers(mDrawingState.layersSortedByZ);
+            const size_t count = previousLayers.size();
+            for (size_t i=0 ; i<count ; i++) {
+                const sp<LayerBase>& layer(previousLayers[i]);
+                if (currentLayers.indexOf( layer ) < 0) {
+                    // this layer is not visible anymore
+                    ditchedLayers.add(layer);
+                    mDirtyRegionRemovedLayer.orSelf(layer->visibleRegionScreen);
+                }
+            }
+        }
+    }
+
+    commitTransaction();
+}
+
+sp<FreezeLock> SurfaceFlinger::getFreezeLock() const
+{
+    return new FreezeLock(const_cast<SurfaceFlinger *>(this));
+}
+
+void SurfaceFlinger::computeVisibleRegions(
+    LayerVector& currentLayers, Region& dirtyRegion, Region& opaqueRegion)
+{
+    const GraphicPlane& plane(graphicPlane(0));
+    const Transform& planeTransform(plane.transform());
+    const DisplayHardware& hw(plane.displayHardware());
+    const Region screenRegion(hw.bounds());
+
+    Region aboveOpaqueLayers;
+    Region aboveCoveredLayers;
+    Region dirty;
+
+    bool secureFrameBuffer = false;
+
+    size_t i = currentLayers.size();
+    while (i--) {
+        const sp<LayerBase>& layer = currentLayers[i];
+        layer->validateVisibility(planeTransform);
+
+        // start with the whole surface at its current location
+        const Layer::State& s(layer->drawingState());
+
+        /*
+         * opaqueRegion: area of a surface that is fully opaque.
+         */
+        Region opaqueRegion;
+
+        /*
+         * visibleRegion: area of a surface that is visible on screen
+         * and not fully transparent. This is essentially the layer's
+         * footprint minus the opaque regions above it.
+         * Areas covered by a translucent surface are considered visible.
+         */
+        Region visibleRegion;
+
+        /*
+         * coveredRegion: area of a surface that is covered by all
+         * visible regions above it (which includes the translucent areas).
+         */
+        Region coveredRegion;
+
+
+        // handle hidden surfaces by setting the visible region to empty
+        if (LIKELY(!(s.flags & ISurfaceComposer::eLayerHidden) && s.alpha)) {
+            const bool translucent = layer->needsBlending();
+            const Rect bounds(layer->visibleBounds());
+            visibleRegion.set(bounds);
+            visibleRegion.andSelf(screenRegion);
+            if (!visibleRegion.isEmpty()) {
+                // Remove the transparent area from the visible region
+                if (translucent) {
+                    visibleRegion.subtractSelf(layer->transparentRegionScreen);
+                }
+
+                // compute the opaque region
+                const int32_t layerOrientation = layer->getOrientation();
+                if (s.alpha==255 && !translucent &&
+                        ((layerOrientation & Transform::ROT_INVALID) == false)) {
+                    // the opaque region is the layer's footprint
+                    opaqueRegion = visibleRegion;
+                }
+            }
+        }
+
+        // Clip the covered region to the visible region
+        coveredRegion = aboveCoveredLayers.intersect(visibleRegion);
+
+        // Update aboveCoveredLayers for next (lower) layer
+        aboveCoveredLayers.orSelf(visibleRegion);
+
+        // subtract the opaque region covered by the layers above us
+        visibleRegion.subtractSelf(aboveOpaqueLayers);
+
+        // compute this layer's dirty region
+        if (layer->contentDirty) {
+            // we need to invalidate the whole region
+            dirty = visibleRegion;
+            // as well, as the old visible region
+            dirty.orSelf(layer->visibleRegionScreen);
+            layer->contentDirty = false;
+        } else {
+            /* compute the exposed region:
+             *   the exposed region consists of two components:
+             *   1) what's VISIBLE now and was COVERED before
+             *   2) what's EXPOSED now less what was EXPOSED before
+             *
+             * note that (1) is conservative, we start with the whole
+             * visible region but only keep what used to be covered by
+             * something -- which mean it may have been exposed.
+             *
+             * (2) handles areas that were not covered by anything but got
+             * exposed because of a resize.
+             */
+            const Region newExposed = visibleRegion - coveredRegion;
+            const Region oldVisibleRegion = layer->visibleRegionScreen;
+            const Region oldCoveredRegion = layer->coveredRegionScreen;
+            const Region oldExposed = oldVisibleRegion - oldCoveredRegion;
+            dirty = (visibleRegion&oldCoveredRegion) | (newExposed-oldExposed);
+        }
+        dirty.subtractSelf(aboveOpaqueLayers);
+
+        // accumulate to the screen dirty region
+        dirtyRegion.orSelf(dirty);
+
+        // Update aboveOpaqueLayers for next (lower) layer
+        aboveOpaqueLayers.orSelf(opaqueRegion);
+        
+        // Store the visible region is screen space
+        layer->setVisibleRegion(visibleRegion);
+        layer->setCoveredRegion(coveredRegion);
+
+        // If a secure layer is partially visible, lock-down the screen!
+        if (layer->isSecure() && !visibleRegion.isEmpty()) {
+            secureFrameBuffer = true;
+        }
+    }
+
+    // invalidate the areas where a layer was removed
+    dirtyRegion.orSelf(mDirtyRegionRemovedLayer);
+    mDirtyRegionRemovedLayer.clear();
+
+    mSecureFrameBuffer = secureFrameBuffer;
+    opaqueRegion = aboveOpaqueLayers;
+}
+
+
+void SurfaceFlinger::commitTransaction()
+{
+    mDrawingState = mCurrentState;
+    mResizeTransationPending = false;
+    mTransactionCV.broadcast();
+}
+
+void SurfaceFlinger::handlePageFlip()
+{
+    bool visibleRegions = mVisibleRegionsDirty;
+    LayerVector& currentLayers = const_cast<LayerVector&>(
+            mDrawingState.layersSortedByZ);
+    visibleRegions |= lockPageFlip(currentLayers);
+
+        const DisplayHardware& hw = graphicPlane(0).displayHardware();
+        const Region screenRegion(hw.bounds());
+        if (visibleRegions) {
+            Region opaqueRegion;
+            computeVisibleRegions(currentLayers, mDirtyRegion, opaqueRegion);
+            mWormholeRegion = screenRegion.subtract(opaqueRegion);
+            mVisibleRegionsDirty = false;
+        }
+
+    unlockPageFlip(currentLayers);
+    mDirtyRegion.andSelf(screenRegion);
+}
+
+bool SurfaceFlinger::lockPageFlip(const LayerVector& currentLayers)
+{
+    bool recomputeVisibleRegions = false;
+    size_t count = currentLayers.size();
+    sp<LayerBase> const* layers = currentLayers.array();
+    for (size_t i=0 ; i<count ; i++) {
+        const sp<LayerBase>& layer(layers[i]);
+        layer->lockPageFlip(recomputeVisibleRegions);
+    }
+    return recomputeVisibleRegions;
+}
+
+void SurfaceFlinger::unlockPageFlip(const LayerVector& currentLayers)
+{
+    const GraphicPlane& plane(graphicPlane(0));
+    const Transform& planeTransform(plane.transform());
+    size_t count = currentLayers.size();
+    sp<LayerBase> const* layers = currentLayers.array();
+    for (size_t i=0 ; i<count ; i++) {
+        const sp<LayerBase>& layer(layers[i]);
+        layer->unlockPageFlip(planeTransform, mDirtyRegion);
+    }
+}
+
+
+void SurfaceFlinger::handleRepaint()
+{
+    // compute the invalid region
+    mInvalidRegion.orSelf(mDirtyRegion);
+    if (mInvalidRegion.isEmpty()) {
+        // nothing to do
+        return;
+    }
+
+    if (UNLIKELY(mDebugRegion)) {
+        debugFlashRegions();
+    }
+
+    // set the frame buffer
+    const DisplayHardware& hw(graphicPlane(0).displayHardware());
+    glMatrixMode(GL_MODELVIEW);
+    glLoadIdentity();
+
+    uint32_t flags = hw.getFlags();
+    if ((flags & DisplayHardware::SWAP_RECTANGLE) || 
+        (flags & DisplayHardware::BUFFER_PRESERVED)) 
+    {
+        // we can redraw only what's dirty, but since SWAP_RECTANGLE only
+        // takes a rectangle, we must make sure to update that whole
+        // rectangle in that case
+        if (flags & DisplayHardware::SWAP_RECTANGLE) {
+            // TODO: we really should be able to pass a region to
+            // SWAP_RECTANGLE so that we don't have to redraw all this.
+            mDirtyRegion.set(mInvalidRegion.bounds());
+        } else {
+            // in the BUFFER_PRESERVED case, obviously, we can update only
+            // what's needed and nothing more.
+            // NOTE: this is NOT a common case, as preserving the backbuffer
+            // is costly and usually involves copying the whole update back.
+        }
+    } else {
+        if (flags & DisplayHardware::PARTIAL_UPDATES) {
+            // We need to redraw the rectangle that will be updated
+            // (pushed to the framebuffer).
+            // This is needed because PARTIAL_UPDATES only takes one
+            // rectangle instead of a region (see DisplayHardware::flip())
+            mDirtyRegion.set(mInvalidRegion.bounds());
+        } else {
+            // we need to redraw everything (the whole screen)
+            mDirtyRegion.set(hw.bounds());
+            mInvalidRegion = mDirtyRegion;
+        }
+    }
+
+    // compose all surfaces
+    composeSurfaces(mDirtyRegion);
+
+    // clear the dirty regions
+    mDirtyRegion.clear();
+}
+
+void SurfaceFlinger::composeSurfaces(const Region& dirty)
+{
+    if (UNLIKELY(!mWormholeRegion.isEmpty())) {
+        // should never happen unless the window manager has a bug
+        // draw something...
+        drawWormhole();
+    }
+    const SurfaceFlinger& flinger(*this);
+    const LayerVector& drawingLayers(mDrawingState.layersSortedByZ);
+    const size_t count = drawingLayers.size();
+    sp<LayerBase> const* const layers = drawingLayers.array();
+    for (size_t i=0 ; i<count ; ++i) {
+        const sp<LayerBase>& layer = layers[i];
+        const Region& visibleRegion(layer->visibleRegionScreen);
+        if (!visibleRegion.isEmpty())  {
+            const Region clip(dirty.intersect(visibleRegion));
+            if (!clip.isEmpty()) {
+                layer->draw(clip);
+            }
+        }
+    }
+}
+
+void SurfaceFlinger::unlockClients()
+{
+    const LayerVector& drawingLayers(mDrawingState.layersSortedByZ);
+    const size_t count = drawingLayers.size();
+    sp<LayerBase> const* const layers = drawingLayers.array();
+    for (size_t i=0 ; i<count ; ++i) {
+        const sp<LayerBase>& layer = layers[i];
+        layer->finishPageFlip();
+    }
+}
+
+void SurfaceFlinger::debugFlashRegions()
+{
+    const DisplayHardware& hw(graphicPlane(0).displayHardware());
+    const uint32_t flags = hw.getFlags();
+
+    if (!((flags & DisplayHardware::SWAP_RECTANGLE) ||
+            (flags & DisplayHardware::BUFFER_PRESERVED))) {
+        const Region repaint((flags & DisplayHardware::PARTIAL_UPDATES) ?
+                mDirtyRegion.bounds() : hw.bounds());
+        composeSurfaces(repaint);
+    }
+
+    TextureManager::deactivateTextures();
+
+    glDisable(GL_BLEND);
+    glDisable(GL_DITHER);
+    glDisable(GL_SCISSOR_TEST);
+
+    static int toggle = 0;
+    toggle = 1 - toggle;
+    if (toggle) {
+        glColor4f(1, 0, 1, 1);
+    } else {
+        glColor4f(1, 1, 0, 1);
+    }
+
+    Region::const_iterator it = mDirtyRegion.begin();
+    Region::const_iterator const end = mDirtyRegion.end();
+    while (it != end) {
+        const Rect& r = *it++;
+        GLfloat vertices[][2] = {
+                { r.left,  r.top },
+                { r.left,  r.bottom },
+                { r.right, r.bottom },
+                { r.right, r.top }
+        };
+        glVertexPointer(2, GL_FLOAT, 0, vertices);
+        glDrawArrays(GL_TRIANGLE_FAN, 0, 4);
+    }
+
+    if (mInvalidRegion.isEmpty()) {
+        mDirtyRegion.dump("mDirtyRegion");
+        mInvalidRegion.dump("mInvalidRegion");
+    }
+    hw.flip(mInvalidRegion);
+
+    if (mDebugRegion > 1)
+        usleep(mDebugRegion * 1000);
+
+    glEnable(GL_SCISSOR_TEST);
+    //mDirtyRegion.dump("mDirtyRegion");
+}
+
+void SurfaceFlinger::drawWormhole() const
+{
+    const Region region(mWormholeRegion.intersect(mDirtyRegion));
+    if (region.isEmpty())
+        return;
+
+    const DisplayHardware& hw(graphicPlane(0).displayHardware());
+    const int32_t width = hw.getWidth();
+    const int32_t height = hw.getHeight();
+
+    glDisable(GL_BLEND);
+    glDisable(GL_DITHER);
+
+    if (LIKELY(!mDebugBackground)) {
+        glClearColor(0,0,0,0);
+        Region::const_iterator it = region.begin();
+        Region::const_iterator const end = region.end();
+        while (it != end) {
+            const Rect& r = *it++;
+            const GLint sy = height - (r.top + r.height());
+            glScissor(r.left, sy, r.width(), r.height());
+            glClear(GL_COLOR_BUFFER_BIT);
+        }
+    } else {
+        const GLshort vertices[][2] = { { 0, 0 }, { width, 0 },
+                { width, height }, { 0, height }  };
+        const GLshort tcoords[][2] = { { 0, 0 }, { 1, 0 },  { 1, 1 }, { 0, 1 } };
+        glVertexPointer(2, GL_SHORT, 0, vertices);
+        glTexCoordPointer(2, GL_SHORT, 0, tcoords);
+        glEnableClientState(GL_TEXTURE_COORD_ARRAY);
+#if defined(GL_OES_texture_external)
+        if (GLExtensions::getInstance().haveTextureExternal()) {
+            glDisable(GL_TEXTURE_EXTERNAL_OES);
+        }
+#endif
+        glEnable(GL_TEXTURE_2D);
+        glBindTexture(GL_TEXTURE_2D, mWormholeTexName);
+        glTexEnvx(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_REPLACE);
+        glMatrixMode(GL_TEXTURE);
+        glLoadIdentity();
+        glScalef(width*(1.0f/32.0f), height*(1.0f/32.0f), 1);
+        Region::const_iterator it = region.begin();
+        Region::const_iterator const end = region.end();
+        while (it != end) {
+            const Rect& r = *it++;
+            const GLint sy = height - (r.top + r.height());
+            glScissor(r.left, sy, r.width(), r.height());
+            glDrawArrays(GL_TRIANGLE_FAN, 0, 4);
+        }
+        glDisableClientState(GL_TEXTURE_COORD_ARRAY);
+    }
+}
+
+void SurfaceFlinger::debugShowFPS() const
+{
+    static int mFrameCount;
+    static int mLastFrameCount = 0;
+    static nsecs_t mLastFpsTime = 0;
+    static float mFps = 0;
+    mFrameCount++;
+    nsecs_t now = systemTime();
+    nsecs_t diff = now - mLastFpsTime;
+    if (diff > ms2ns(250)) {
+        mFps =  ((mFrameCount - mLastFrameCount) * float(s2ns(1))) / diff;
+        mLastFpsTime = now;
+        mLastFrameCount = mFrameCount;
+    }
+    // XXX: mFPS has the value we want
+ }
+
+status_t SurfaceFlinger::addLayer(const sp<LayerBase>& layer)
+{
+    Mutex::Autolock _l(mStateLock);
+    addLayer_l(layer);
+    setTransactionFlags(eTransactionNeeded|eTraversalNeeded);
+    return NO_ERROR;
+}
+
+status_t SurfaceFlinger::addLayer_l(const sp<LayerBase>& layer)
+{
+    ssize_t i = mCurrentState.layersSortedByZ.add(
+                layer, &LayerBase::compareCurrentStateZ);
+    return (i < 0) ? status_t(i) : status_t(NO_ERROR);
+}
+
+ssize_t SurfaceFlinger::addClientLayer(const sp<Client>& client,
+        const sp<LayerBaseClient>& lbc)
+{
+    Mutex::Autolock _l(mStateLock);
+
+    // attach this layer to the client
+    ssize_t name = client->attachLayer(lbc);
+
+    // add this layer to the current state list
+    addLayer_l(lbc);
+
+    return name;
+}
+
+status_t SurfaceFlinger::removeLayer(const sp<LayerBase>& layer)
+{
+    Mutex::Autolock _l(mStateLock);
+    status_t err = purgatorizeLayer_l(layer);
+    if (err == NO_ERROR)
+        setTransactionFlags(eTransactionNeeded);
+    return err;
+}
+
+status_t SurfaceFlinger::removeLayer_l(const sp<LayerBase>& layerBase)
+{
+    sp<LayerBaseClient> lbc(layerBase->getLayerBaseClient());
+    if (lbc != 0) {
+        mLayerMap.removeItem( lbc->getSurface()->asBinder() );
+    }
+    ssize_t index = mCurrentState.layersSortedByZ.remove(layerBase);
+    if (index >= 0) {
+        mLayersRemoved = true;
+        return NO_ERROR;
+    }
+    return status_t(index);
+}
+
+status_t SurfaceFlinger::purgatorizeLayer_l(const sp<LayerBase>& layerBase)
+{
+    // remove the layer from the main list (through a transaction).
+    ssize_t err = removeLayer_l(layerBase);
+
+    layerBase->onRemoved();
+
+    // it's possible that we don't find a layer, because it might
+    // have been destroyed already -- this is not technically an error
+    // from the user because there is a race between Client::destroySurface(),
+    // ~Client() and ~ISurface().
+    return (err == NAME_NOT_FOUND) ? status_t(NO_ERROR) : err;
+}
+
+status_t SurfaceFlinger::invalidateLayerVisibility(const sp<LayerBase>& layer)
+{
+    layer->forceVisibilityTransaction();
+    setTransactionFlags(eTraversalNeeded);
+    return NO_ERROR;
+}
+
+uint32_t SurfaceFlinger::getTransactionFlags(uint32_t flags)
+{
+    return android_atomic_and(~flags, &mTransactionFlags) & flags;
+}
+
+uint32_t SurfaceFlinger::setTransactionFlags(uint32_t flags)
+{
+    uint32_t old = android_atomic_or(flags, &mTransactionFlags);
+    if ((old & flags)==0) { // wake the server up
+        signalEvent();
+    }
+    return old;
+}
+
+void SurfaceFlinger::openGlobalTransaction()
+{
+    android_atomic_inc(&mTransactionCount);
+}
+
+void SurfaceFlinger::closeGlobalTransaction()
+{
+    if (android_atomic_dec(&mTransactionCount) == 1) {
+        signalEvent();
+
+        // if there is a transaction with a resize, wait for it to 
+        // take effect before returning.
+        Mutex::Autolock _l(mStateLock);
+        while (mResizeTransationPending) {
+            status_t err = mTransactionCV.waitRelative(mStateLock, s2ns(5));
+            if (CC_UNLIKELY(err != NO_ERROR)) {
+                // just in case something goes wrong in SF, return to the
+                // called after a few seconds.
+                LOGW_IF(err == TIMED_OUT, "closeGlobalTransaction timed out!");
+                mResizeTransationPending = false;
+                break;
+            }
+        }
+    }
+}
+
+status_t SurfaceFlinger::freezeDisplay(DisplayID dpy, uint32_t flags)
+{
+    if (UNLIKELY(uint32_t(dpy) >= DISPLAY_COUNT))
+        return BAD_VALUE;
+
+    Mutex::Autolock _l(mStateLock);
+    mCurrentState.freezeDisplay = 1;
+    setTransactionFlags(eTransactionNeeded);
+
+    // flags is intended to communicate some sort of animation behavior
+    // (for instance fading)
+    return NO_ERROR;
+}
+
+status_t SurfaceFlinger::unfreezeDisplay(DisplayID dpy, uint32_t flags)
+{
+    if (UNLIKELY(uint32_t(dpy) >= DISPLAY_COUNT))
+        return BAD_VALUE;
+
+    Mutex::Autolock _l(mStateLock);
+    mCurrentState.freezeDisplay = 0;
+    setTransactionFlags(eTransactionNeeded);
+
+    // flags is intended to communicate some sort of animation behavior
+    // (for instance fading)
+    return NO_ERROR;
+}
+
+int SurfaceFlinger::setOrientation(DisplayID dpy, 
+        int orientation, uint32_t flags)
+{
+    if (UNLIKELY(uint32_t(dpy) >= DISPLAY_COUNT))
+        return BAD_VALUE;
+
+    Mutex::Autolock _l(mStateLock);
+    if (mCurrentState.orientation != orientation) {
+        if (uint32_t(orientation)<=eOrientation270 || orientation==42) {
+            mCurrentState.orientationType = flags;
+            mCurrentState.orientation = orientation;
+            setTransactionFlags(eTransactionNeeded);
+            mTransactionCV.wait(mStateLock);
+        } else {
+            orientation = BAD_VALUE;
+        }
+    }
+    return orientation;
+}
+
+sp<ISurface> SurfaceFlinger::createSurface(const sp<Client>& client, int pid,
+        const String8& name, ISurfaceComposerClient::surface_data_t* params,
+        DisplayID d, uint32_t w, uint32_t h, PixelFormat format,
+        uint32_t flags)
+{
+    sp<LayerBaseClient> layer;
+    sp<LayerBaseClient::Surface> surfaceHandle;
+
+    if (int32_t(w|h) < 0) {
+        LOGE("createSurface() failed, w or h is negative (w=%d, h=%d)",
+                int(w), int(h));
+        return surfaceHandle;
+    }
+    
+    //LOGD("createSurface for pid %d (%d x %d)", pid, w, h);
+    sp<Layer> normalLayer;
+    switch (flags & eFXSurfaceMask) {
+        case eFXSurfaceNormal:
+            if (UNLIKELY(flags & ePushBuffers)) {
+                layer = createPushBuffersSurface(client, d, w, h, flags);
+            } else {
+                normalLayer = createNormalSurface(client, d, w, h, flags, format);
+                layer = normalLayer;
+            }
+            break;
+        case eFXSurfaceBlur:
+            layer = createBlurSurface(client, d, w, h, flags);
+            break;
+        case eFXSurfaceDim:
+            layer = createDimSurface(client, d, w, h, flags);
+            break;
+    }
+
+    if (layer != 0) {
+        layer->initStates(w, h, flags);
+        layer->setName(name);
+        ssize_t token = addClientLayer(client, layer);
+
+        surfaceHandle = layer->getSurface();
+        if (surfaceHandle != 0) { 
+            params->token = token;
+            params->identity = surfaceHandle->getIdentity();
+            params->width = w;
+            params->height = h;
+            params->format = format;
+            if (normalLayer != 0) {
+                Mutex::Autolock _l(mStateLock);
+                mLayerMap.add(surfaceHandle->asBinder(), normalLayer);
+            }
+        }
+
+        setTransactionFlags(eTransactionNeeded);
+    }
+
+    return surfaceHandle;
+}
+
+sp<Layer> SurfaceFlinger::createNormalSurface(
+        const sp<Client>& client, DisplayID display,
+        uint32_t w, uint32_t h, uint32_t flags,
+        PixelFormat& format)
+{
+    // initialize the surfaces
+    switch (format) { // TODO: take h/w into account
+    case PIXEL_FORMAT_TRANSPARENT:
+    case PIXEL_FORMAT_TRANSLUCENT:
+        format = PIXEL_FORMAT_RGBA_8888;
+        break;
+    case PIXEL_FORMAT_OPAQUE:
+#ifdef NO_RGBX_8888
+        format = PIXEL_FORMAT_RGB_565;
+#else
+        format = PIXEL_FORMAT_RGBX_8888;
+#endif
+        break;
+    }
+
+#ifdef NO_RGBX_8888
+    if (format == PIXEL_FORMAT_RGBX_8888)
+        format = PIXEL_FORMAT_RGBA_8888;
+#endif
+
+    sp<Layer> layer = new Layer(this, display, client);
+    status_t err = layer->setBuffers(w, h, format, flags);
+    if (LIKELY(err != NO_ERROR)) {
+        LOGE("createNormalSurfaceLocked() failed (%s)", strerror(-err));
+        layer.clear();
+    }
+    return layer;
+}
+
+sp<LayerBlur> SurfaceFlinger::createBlurSurface(
+        const sp<Client>& client, DisplayID display,
+        uint32_t w, uint32_t h, uint32_t flags)
+{
+    sp<LayerBlur> layer = new LayerBlur(this, display, client);
+    layer->initStates(w, h, flags);
+    return layer;
+}
+
+sp<LayerDim> SurfaceFlinger::createDimSurface(
+        const sp<Client>& client, DisplayID display,
+        uint32_t w, uint32_t h, uint32_t flags)
+{
+    sp<LayerDim> layer = new LayerDim(this, display, client);
+    layer->initStates(w, h, flags);
+    return layer;
+}
+
+sp<LayerBuffer> SurfaceFlinger::createPushBuffersSurface(
+        const sp<Client>& client, DisplayID display,
+        uint32_t w, uint32_t h, uint32_t flags)
+{
+    sp<LayerBuffer> layer = new LayerBuffer(this, display, client);
+    layer->initStates(w, h, flags);
+    return layer;
+}
+
+status_t SurfaceFlinger::removeSurface(const sp<Client>& client, SurfaceID sid)
+{
+    /*
+     * called by the window manager, when a surface should be marked for
+     * destruction.
+     * 
+     * The surface is removed from the current and drawing lists, but placed
+     * in the purgatory queue, so it's not destroyed right-away (we need
+     * to wait for all client's references to go away first).
+     */
+
+    status_t err = NAME_NOT_FOUND;
+    Mutex::Autolock _l(mStateLock);
+    sp<LayerBaseClient> layer = client->getLayerUser(sid);
+    if (layer != 0) {
+        err = purgatorizeLayer_l(layer);
+        if (err == NO_ERROR) {
+            setTransactionFlags(eTransactionNeeded);
+        }
+    }
+    return err;
+}
+
+status_t SurfaceFlinger::destroySurface(const sp<LayerBaseClient>& layer)
+{
+    // called by ~ISurface() when all references are gone
+    
+    class MessageDestroySurface : public MessageBase {
+        SurfaceFlinger* flinger;
+        sp<LayerBaseClient> layer;
+    public:
+        MessageDestroySurface(
+                SurfaceFlinger* flinger, const sp<LayerBaseClient>& layer)
+            : flinger(flinger), layer(layer) { }
+        virtual bool handler() {
+            sp<LayerBaseClient> l(layer);
+            layer.clear(); // clear it outside of the lock;
+            Mutex::Autolock _l(flinger->mStateLock);
+            /*
+             * remove the layer from the current list -- chances are that it's 
+             * not in the list anyway, because it should have been removed 
+             * already upon request of the client (eg: window manager). 
+             * However, a buggy client could have not done that.
+             * Since we know we don't have any more clients, we don't need
+             * to use the purgatory.
+             */
+            status_t err = flinger->removeLayer_l(l);
+            LOGE_IF(err<0 && err != NAME_NOT_FOUND,
+                    "error removing layer=%p (%s)", l.get(), strerror(-err));
+            return true;
+        }
+    };
+
+    postMessageAsync( new MessageDestroySurface(this, layer) );
+    return NO_ERROR;
+}
+
+status_t SurfaceFlinger::setClientState(
+        const sp<Client>& client,
+        int32_t count,
+        const layer_state_t* states)
+{
+    Mutex::Autolock _l(mStateLock);
+    uint32_t flags = 0;
+    for (int i=0 ; i<count ; i++) {
+        const layer_state_t& s(states[i]);
+        sp<LayerBaseClient> layer(client->getLayerUser(s.surface));
+        if (layer != 0) {
+            const uint32_t what = s.what;
+            if (what & ePositionChanged) {
+                if (layer->setPosition(s.x, s.y))
+                    flags |= eTraversalNeeded;
+            }
+            if (what & eLayerChanged) {
+                if (layer->setLayer(s.z)) {
+                    mCurrentState.layersSortedByZ.reorder(
+                            layer, &Layer::compareCurrentStateZ);
+                    // we need traversal (state changed)
+                    // AND transaction (list changed)
+                    flags |= eTransactionNeeded|eTraversalNeeded;
+                }
+            }
+            if (what & eSizeChanged) {
+                if (layer->setSize(s.w, s.h)) {
+                    flags |= eTraversalNeeded;
+                    mResizeTransationPending = true;
+                }
+            }
+            if (what & eAlphaChanged) {
+                if (layer->setAlpha(uint8_t(255.0f*s.alpha+0.5f)))
+                    flags |= eTraversalNeeded;
+            }
+            if (what & eMatrixChanged) {
+                if (layer->setMatrix(s.matrix))
+                    flags |= eTraversalNeeded;
+            }
+            if (what & eTransparentRegionChanged) {
+                if (layer->setTransparentRegionHint(s.transparentRegion))
+                    flags |= eTraversalNeeded;
+            }
+            if (what & eVisibilityChanged) {
+                if (layer->setFlags(s.flags, s.mask))
+                    flags |= eTraversalNeeded;
+            }
+        }
+    }
+    if (flags) {
+        setTransactionFlags(flags);
+    }
+    return NO_ERROR;
+}
+
+void SurfaceFlinger::screenReleased(int dpy)
+{
+    // this may be called by a signal handler, we can't do too much in here
+    android_atomic_or(eConsoleReleased, &mConsoleSignals);
+    signalEvent();
+}
+
+void SurfaceFlinger::screenAcquired(int dpy)
+{
+    // this may be called by a signal handler, we can't do too much in here
+    android_atomic_or(eConsoleAcquired, &mConsoleSignals);
+    signalEvent();
+}
+
+status_t SurfaceFlinger::dump(int fd, const Vector<String16>& args)
+{
+    const size_t SIZE = 1024;
+    char buffer[SIZE];
+    String8 result;
+    if (!mDump.checkCalling()) {
+        snprintf(buffer, SIZE, "Permission Denial: "
+                "can't dump SurfaceFlinger from pid=%d, uid=%d\n",
+                IPCThreadState::self()->getCallingPid(),
+                IPCThreadState::self()->getCallingUid());
+        result.append(buffer);
+    } else {
+
+        // figure out if we're stuck somewhere
+        const nsecs_t now = systemTime();
+        const nsecs_t inSwapBuffers(mDebugInSwapBuffers);
+        const nsecs_t inTransaction(mDebugInTransaction);
+        nsecs_t inSwapBuffersDuration = (inSwapBuffers) ? now-inSwapBuffers : 0;
+        nsecs_t inTransactionDuration = (inTransaction) ? now-inTransaction : 0;
+
+        // Try to get the main lock, but don't insist if we can't
+        // (this would indicate SF is stuck, but we want to be able to
+        // print something in dumpsys).
+        int retry = 3;
+        while (mStateLock.tryLock()<0 && --retry>=0) {
+            usleep(1000000);
+        }
+        const bool locked(retry >= 0);
+        if (!locked) {
+            snprintf(buffer, SIZE, 
+                    "SurfaceFlinger appears to be unresponsive, "
+                    "dumping anyways (no locks held)\n");
+            result.append(buffer);
+        }
+
+        const LayerVector& currentLayers = mCurrentState.layersSortedByZ;
+        const size_t count = currentLayers.size();
+        for (size_t i=0 ; i<count ; i++) {
+            const sp<LayerBase>& layer(currentLayers[i]);
+            layer->dump(result, buffer, SIZE);
+            const Layer::State& s(layer->drawingState());
+            s.transparentRegion.dump(result, "transparentRegion");
+            layer->transparentRegionScreen.dump(result, "transparentRegionScreen");
+            layer->visibleRegionScreen.dump(result, "visibleRegionScreen");
+        }
+
+        mWormholeRegion.dump(result, "WormholeRegion");
+        const DisplayHardware& hw(graphicPlane(0).displayHardware());
+        snprintf(buffer, SIZE,
+                "  display frozen: %s, freezeCount=%d, orientation=%d, canDraw=%d\n",
+                mFreezeDisplay?"yes":"no", mFreezeCount,
+                mCurrentState.orientation, hw.canDraw());
+        result.append(buffer);
+        snprintf(buffer, SIZE,
+                "  last eglSwapBuffers() time: %f us\n"
+                "  last transaction time     : %f us\n",
+                mLastSwapBufferTime/1000.0, mLastTransactionTime/1000.0);
+        result.append(buffer);
+
+        if (inSwapBuffersDuration || !locked) {
+            snprintf(buffer, SIZE, "  eglSwapBuffers time: %f us\n",
+                    inSwapBuffersDuration/1000.0);
+            result.append(buffer);
+        }
+
+        if (inTransactionDuration || !locked) {
+            snprintf(buffer, SIZE, "  transaction time: %f us\n",
+                    inTransactionDuration/1000.0);
+            result.append(buffer);
+        }
+
+        const GraphicBufferAllocator& alloc(GraphicBufferAllocator::get());
+        alloc.dump(result);
+
+        if (locked) {
+            mStateLock.unlock();
+        }
+    }
+    write(fd, result.string(), result.size());
+    return NO_ERROR;
+}
+
+status_t SurfaceFlinger::onTransact(
+    uint32_t code, const Parcel& data, Parcel* reply, uint32_t flags)
+{
+    switch (code) {
+        case CREATE_CONNECTION:
+        case OPEN_GLOBAL_TRANSACTION:
+        case CLOSE_GLOBAL_TRANSACTION:
+        case SET_ORIENTATION:
+        case FREEZE_DISPLAY:
+        case UNFREEZE_DISPLAY:
+        case BOOT_FINISHED:
+        {
+            // codes that require permission check
+            IPCThreadState* ipc = IPCThreadState::self();
+            const int pid = ipc->getCallingPid();
+            const int uid = ipc->getCallingUid();
+            if ((uid != AID_GRAPHICS) && !mAccessSurfaceFlinger.check(pid, uid)) {
+                LOGE("Permission Denial: "
+                        "can't access SurfaceFlinger pid=%d, uid=%d", pid, uid);
+                return PERMISSION_DENIED;
+            }
+        }
+    }
+    status_t err = BnSurfaceComposer::onTransact(code, data, reply, flags);
+    if (err == UNKNOWN_TRANSACTION || err == PERMISSION_DENIED) {
+        CHECK_INTERFACE(ISurfaceComposer, data, reply);
+        if (UNLIKELY(!mHardwareTest.checkCalling())) {
+            IPCThreadState* ipc = IPCThreadState::self();
+            const int pid = ipc->getCallingPid();
+            const int uid = ipc->getCallingUid();
+            LOGE("Permission Denial: "
+                    "can't access SurfaceFlinger pid=%d, uid=%d", pid, uid);
+            return PERMISSION_DENIED;
+        }
+        int n;
+        switch (code) {
+            case 1000: // SHOW_CPU, NOT SUPPORTED ANYMORE
+                return NO_ERROR;
+            case 1001:  // SHOW_FPS, NOT SUPPORTED ANYMORE
+                return NO_ERROR;
+            case 1002:  // SHOW_UPDATES
+                n = data.readInt32();
+                mDebugRegion = n ? n : (mDebugRegion ? 0 : 1);
+                return NO_ERROR;
+            case 1003:  // SHOW_BACKGROUND
+                n = data.readInt32();
+                mDebugBackground = n ? 1 : 0;
+                return NO_ERROR;
+            case 1004:{ // repaint everything
+                Mutex::Autolock _l(mStateLock);
+                const DisplayHardware& hw(graphicPlane(0).displayHardware());
+                mDirtyRegion.set(hw.bounds()); // careful that's not thread-safe
+                signalEvent();
+                return NO_ERROR;
+            }
+            case 1005:{ // force transaction
+                setTransactionFlags(eTransactionNeeded|eTraversalNeeded);
+                return NO_ERROR;
+            }
+            case 1007: // set mFreezeCount
+                mFreezeCount = data.readInt32();
+                mFreezeDisplayTime = 0;
+                return NO_ERROR;
+            case 1010:  // interrogate.
+                reply->writeInt32(0);
+                reply->writeInt32(0);
+                reply->writeInt32(mDebugRegion);
+                reply->writeInt32(mDebugBackground);
+                return NO_ERROR;
+            case 1013: {
+                Mutex::Autolock _l(mStateLock);
+                const DisplayHardware& hw(graphicPlane(0).displayHardware());
+                reply->writeInt32(hw.getPageFlipCount());
+            }
+            return NO_ERROR;
+        }
+    }
+    return err;
+}
+
+// ---------------------------------------------------------------------------
+
+sp<Layer> SurfaceFlinger::getLayer(const sp<ISurface>& sur) const
+{
+    sp<Layer> result;
+    Mutex::Autolock _l(mStateLock);
+    result = mLayerMap.valueFor( sur->asBinder() ).promote();
+    return result;
+}
+
+// ---------------------------------------------------------------------------
+
+Client::Client(const sp<SurfaceFlinger>& flinger)
+    : mFlinger(flinger), mNameGenerator(1)
+{
+}
+
+Client::~Client()
+{
+    const size_t count = mLayers.size();
+    for (size_t i=0 ; i<count ; i++) {
+        sp<LayerBaseClient> layer(mLayers.valueAt(i).promote());
+        if (layer != 0) {
+            mFlinger->removeLayer(layer);
+        }
+    }
+}
+
+status_t Client::initCheck() const {
+    return NO_ERROR;
+}
+
+ssize_t Client::attachLayer(const sp<LayerBaseClient>& layer)
+{
+    int32_t name = android_atomic_inc(&mNameGenerator);
+    mLayers.add(name, layer);
+    return name;
+}
+
+void Client::detachLayer(const LayerBaseClient* layer)
+{
+    // we do a linear search here, because this doesn't happen often
+    const size_t count = mLayers.size();
+    for (size_t i=0 ; i<count ; i++) {
+        if (mLayers.valueAt(i) == layer) {
+            mLayers.removeItemsAt(i, 1);
+            break;
+        }
+    }
+}
+sp<LayerBaseClient> Client::getLayerUser(int32_t i) const {
+    sp<LayerBaseClient> lbc;
+    const wp<LayerBaseClient>& layer(mLayers.valueFor(i));
+    if (layer != 0) {
+        lbc = layer.promote();
+        LOGE_IF(lbc==0, "getLayerUser(name=%d) is dead", int(i));
+    }
+    return lbc;
+}
+
+sp<IMemoryHeap> Client::getControlBlock() const {
+    return 0;
+}
+ssize_t Client::getTokenForSurface(const sp<ISurface>& sur) const {
+    return -1;
+}
+sp<ISurface> Client::createSurface(
+        ISurfaceComposerClient::surface_data_t* params, int pid,
+        const String8& name,
+        DisplayID display, uint32_t w, uint32_t h, PixelFormat format,
+        uint32_t flags)
+{
+    return mFlinger->createSurface(this, pid, name, params,
+            display, w, h, format, flags);
+}
+status_t Client::destroySurface(SurfaceID sid) {
+    return mFlinger->removeSurface(this, sid);
+}
+status_t Client::setState(int32_t count, const layer_state_t* states) {
+    return mFlinger->setClientState(this, count, states);
+}
+
+// ---------------------------------------------------------------------------
+
+UserClient::UserClient(const sp<SurfaceFlinger>& flinger)
+    : ctrlblk(0), mBitmap(0), mFlinger(flinger)
+{
+    const int pgsize = getpagesize();
+    const int cblksize = ((sizeof(SharedClient)+(pgsize-1))&~(pgsize-1));
+
+    mCblkHeap = new MemoryHeapBase(cblksize, 0,
+            "SurfaceFlinger Client control-block");
+
+    ctrlblk = static_cast<SharedClient *>(mCblkHeap->getBase());
+    if (ctrlblk) { // construct the shared structure in-place.
+        new(ctrlblk) SharedClient;
+    }
+}
+
+UserClient::~UserClient()
+{
+    if (ctrlblk) {
+        ctrlblk->~SharedClient();  // destroy our shared-structure.
+    }
+
+    /*
+     * When a UserClient dies, it's unclear what to do exactly.
+     * We could go ahead and destroy all surfaces linked to that client
+     * however, it wouldn't be fair to the main Client
+     * (usually the the window-manager), which might want to re-target
+     * the layer to another UserClient.
+     * I think the best is to do nothing, or not much; in most cases the
+     * WM itself will go ahead and clean things up when it detects a client of
+     * his has died.
+     * The remaining question is what to display? currently we keep
+     * just keep the current buffer.
+     */
+}
+
+status_t UserClient::initCheck() const {
+    return ctrlblk == 0 ? NO_INIT : NO_ERROR;
+}
+
+void UserClient::detachLayer(const Layer* layer)
+{
+    int32_t name = layer->getToken();
+    if (name >= 0) {
+        int32_t mask = 1LU<<name;
+        if ((android_atomic_and(~mask, &mBitmap) & mask) == 0) {
+            LOGW("token %d wasn't marked as used %08x", name, int(mBitmap));
+        }
+    }
+}
+
+sp<IMemoryHeap> UserClient::getControlBlock() const {
+    return mCblkHeap;
+}
+
+ssize_t UserClient::getTokenForSurface(const sp<ISurface>& sur) const
+{
+    int32_t name = NAME_NOT_FOUND;
+    sp<Layer> layer(mFlinger->getLayer(sur));
+    if (layer == 0) return name;
+
+    // if this layer already has a token, just return it
+    name = layer->getToken();
+    if ((name >= 0) && (layer->getClient() == this))
+        return name;
+
+    name = 0;
+    do {
+        int32_t mask = 1LU<<name;
+        if ((android_atomic_or(mask, &mBitmap) & mask) == 0) {
+            // we found and locked that name
+            status_t err = layer->setToken(
+                    const_cast<UserClient*>(this), ctrlblk, name);
+            if (err != NO_ERROR) {
+                // free the name
+                android_atomic_and(~mask, &mBitmap);
+                name = err;
+            }
+            break;
+        }
+        if (++name > 31)
+            name = NO_MEMORY;
+    } while(name >= 0);
+
+    //LOGD("getTokenForSurface(%p) => %d (client=%p, bitmap=%08lx)",
+    //        sur->asBinder().get(), name, this, mBitmap);
+    return name;
+}
+
+sp<ISurface> UserClient::createSurface(
+        ISurfaceComposerClient::surface_data_t* params, int pid,
+        const String8& name,
+        DisplayID display, uint32_t w, uint32_t h, PixelFormat format,
+        uint32_t flags) {
+    return 0;
+}
+status_t UserClient::destroySurface(SurfaceID sid) {
+    return INVALID_OPERATION;
+}
+status_t UserClient::setState(int32_t count, const layer_state_t* states) {
+    return INVALID_OPERATION;
+}
+
+// ---------------------------------------------------------------------------
+
+GraphicPlane::GraphicPlane()
+    : mHw(0)
+{
+}
+
+GraphicPlane::~GraphicPlane() {
+    delete mHw;
+}
+
+bool GraphicPlane::initialized() const {
+    return mHw ? true : false;
+}
+
+int GraphicPlane::getWidth() const {
+    return mWidth;
+}
+
+int GraphicPlane::getHeight() const {
+    return mHeight;
+}
+
+void GraphicPlane::setDisplayHardware(DisplayHardware *hw)
+{
+    mHw = hw;
+
+    // initialize the display orientation transform.
+    // it's a constant that should come from the display driver.
+    int displayOrientation = ISurfaceComposer::eOrientationDefault;
+    char property[PROPERTY_VALUE_MAX];
+    if (property_get("ro.sf.hwrotation", property, NULL) > 0) {
+        //displayOrientation
+        switch (atoi(property)) {
+        case 90:
+            displayOrientation = ISurfaceComposer::eOrientation90;
+            break;
+        case 270:
+            displayOrientation = ISurfaceComposer::eOrientation270;
+            break;
+        }
+    }
+
+    const float w = hw->getWidth();
+    const float h = hw->getHeight();
+    GraphicPlane::orientationToTransfrom(displayOrientation, w, h,
+            &mDisplayTransform);
+    if (displayOrientation & ISurfaceComposer::eOrientationSwapMask) {
+        mDisplayWidth = h;
+        mDisplayHeight = w;
+    } else {
+        mDisplayWidth = w;
+        mDisplayHeight = h;
+    }
+
+    setOrientation(ISurfaceComposer::eOrientationDefault);
+}
+
+status_t GraphicPlane::orientationToTransfrom(
+        int orientation, int w, int h, Transform* tr)
+{
+    uint32_t flags = 0;
+    switch (orientation) {
+    case ISurfaceComposer::eOrientationDefault:
+        flags = Transform::ROT_0;
+        break;
+    case ISurfaceComposer::eOrientation90:
+        flags = Transform::ROT_90;
+        break;
+    case ISurfaceComposer::eOrientation180:
+        flags = Transform::ROT_180;
+        break;
+    case ISurfaceComposer::eOrientation270:
+        flags = Transform::ROT_270;
+        break;
+    default:
+        return BAD_VALUE;
+    }
+    tr->set(flags, w, h);
+    return NO_ERROR;
+}
+
+status_t GraphicPlane::setOrientation(int orientation)
+{
+    // If the rotation can be handled in hardware, this is where
+    // the magic should happen.
+
+    const DisplayHardware& hw(displayHardware());
+    const float w = mDisplayWidth;
+    const float h = mDisplayHeight;
+    mWidth = int(w);
+    mHeight = int(h);
+
+    Transform orientationTransform;
+    GraphicPlane::orientationToTransfrom(orientation, w, h,
+            &orientationTransform);
+    if (orientation & ISurfaceComposer::eOrientationSwapMask) {
+        mWidth = int(h);
+        mHeight = int(w);
+    }
+
+    mOrientation = orientation;
+    mGlobalTransform = mDisplayTransform * orientationTransform;
+    return NO_ERROR;
+}
+
+const DisplayHardware& GraphicPlane::displayHardware() const {
+    return *mHw;
+}
+
+const Transform& GraphicPlane::transform() const {
+    return mGlobalTransform;
+}
+
+EGLDisplay GraphicPlane::getEGLDisplay() const {
+    return mHw->getEGLDisplay();
+}
+
+// ---------------------------------------------------------------------------
+
+}; // namespace android
diff --git a/services/surfaceflinger/SurfaceFlinger.h b/services/surfaceflinger/SurfaceFlinger.h
new file mode 100644
index 0000000..8821e5c
--- /dev/null
+++ b/services/surfaceflinger/SurfaceFlinger.h
@@ -0,0 +1,423 @@
+/*
+ * Copyright (C) 2007 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef ANDROID_SURFACE_FLINGER_H
+#define ANDROID_SURFACE_FLINGER_H
+
+#include <stdint.h>
+#include <sys/types.h>
+
+#include <utils/SortedVector.h>
+#include <utils/KeyedVector.h>
+#include <utils/threads.h>
+#include <utils/Atomic.h>
+#include <utils/Errors.h>
+#include <utils/RefBase.h>
+
+#include <binder/IMemory.h>
+#include <binder/Permission.h>
+#include <binder/BinderService.h>
+
+#include <ui/PixelFormat.h>
+#include <surfaceflinger/ISurfaceComposer.h>
+#include <surfaceflinger/ISurfaceComposerClient.h>
+
+#include "Barrier.h"
+#include "Layer.h"
+
+#include "MessageQueue.h"
+
+struct copybit_device_t;
+struct overlay_device_t;
+
+namespace android {
+
+// ---------------------------------------------------------------------------
+
+class Client;
+class DisplayHardware;
+class FreezeLock;
+class Layer;
+class LayerBlur;
+class LayerDim;
+class LayerBuffer;
+
+#define LIKELY( exp )       (__builtin_expect( (exp) != 0, true  ))
+#define UNLIKELY( exp )     (__builtin_expect( (exp) != 0, false ))
+
+// ---------------------------------------------------------------------------
+
+class Client : public BnSurfaceComposerClient
+{
+public:
+        Client(const sp<SurfaceFlinger>& flinger);
+        ~Client();
+
+    status_t initCheck() const;
+
+    // protected by SurfaceFlinger::mStateLock
+    ssize_t attachLayer(const sp<LayerBaseClient>& layer);
+    void detachLayer(const LayerBaseClient* layer);
+    sp<LayerBaseClient> getLayerUser(int32_t i) const;
+
+private:
+
+    // ISurfaceComposerClient interface
+    virtual sp<IMemoryHeap> getControlBlock() const;
+    virtual ssize_t getTokenForSurface(const sp<ISurface>& sur) const;
+    virtual sp<ISurface> createSurface(
+            surface_data_t* params, int pid, const String8& name,
+            DisplayID display, uint32_t w, uint32_t h,PixelFormat format,
+            uint32_t flags);
+    virtual status_t destroySurface(SurfaceID surfaceId);
+    virtual status_t setState(int32_t count, const layer_state_t* states);
+
+    DefaultKeyedVector< size_t, wp<LayerBaseClient> > mLayers;
+    sp<SurfaceFlinger> mFlinger;
+    int32_t mNameGenerator;
+};
+
+class UserClient : public BnSurfaceComposerClient
+{
+public:
+    // pointer to this client's control block
+    SharedClient* ctrlblk;
+
+public:
+        UserClient(const sp<SurfaceFlinger>& flinger);
+        ~UserClient();
+
+    status_t initCheck() const;
+
+    // protected by SurfaceFlinger::mStateLock
+    void detachLayer(const Layer* layer);
+
+private:
+
+    // ISurfaceComposerClient interface
+    virtual sp<IMemoryHeap> getControlBlock() const;
+    virtual ssize_t getTokenForSurface(const sp<ISurface>& sur) const;
+    virtual sp<ISurface> createSurface(
+            surface_data_t* params, int pid, const String8& name,
+            DisplayID display, uint32_t w, uint32_t h,PixelFormat format,
+            uint32_t flags);
+    virtual status_t destroySurface(SurfaceID surfaceId);
+    virtual status_t setState(int32_t count, const layer_state_t* states);
+
+    // atomic-ops
+    mutable volatile int32_t mBitmap;
+
+    sp<IMemoryHeap> mCblkHeap;
+    sp<SurfaceFlinger> mFlinger;
+};
+
+// ---------------------------------------------------------------------------
+
+class GraphicPlane
+{
+public:
+    static status_t orientationToTransfrom(int orientation, int w, int h,
+            Transform* tr);
+
+                                GraphicPlane();
+                                ~GraphicPlane();
+
+        bool                    initialized() const;
+
+        void                    setDisplayHardware(DisplayHardware *);
+        status_t                setOrientation(int orientation);
+        int                     getOrientation() const { return mOrientation; }
+        int                     getWidth() const;
+        int                     getHeight() const;
+
+        const DisplayHardware&  displayHardware() const;
+        const Transform&        transform() const;
+        EGLDisplay              getEGLDisplay() const;
+        
+private:
+                                GraphicPlane(const GraphicPlane&);
+        GraphicPlane            operator = (const GraphicPlane&);
+
+        DisplayHardware*        mHw;
+        Transform               mGlobalTransform;
+        Transform               mDisplayTransform;
+        int                     mOrientation;
+        float                   mDisplayWidth;
+        float                   mDisplayHeight;
+        int                     mWidth;
+        int                     mHeight;
+};
+
+// ---------------------------------------------------------------------------
+
+enum {
+    eTransactionNeeded      = 0x01,
+    eTraversalNeeded        = 0x02
+};
+
+class SurfaceFlinger :
+        public BinderService<SurfaceFlinger>,
+        public BnSurfaceComposer,
+        protected Thread
+{
+public:
+    static char const* getServiceName() { return "SurfaceFlinger"; }
+
+                    SurfaceFlinger();
+    virtual         ~SurfaceFlinger();
+            void    init();
+
+    virtual status_t onTransact(
+        uint32_t code, const Parcel& data, Parcel* reply, uint32_t flags);
+
+    virtual status_t dump(int fd, const Vector<String16>& args);
+
+    // ISurfaceComposer interface
+    virtual sp<ISurfaceComposerClient>  createConnection();
+    virtual sp<ISurfaceComposerClient>  createClientConnection();
+    virtual sp<IMemoryHeap>             getCblk() const;
+    virtual void                        bootFinished();
+    virtual void                        openGlobalTransaction();
+    virtual void                        closeGlobalTransaction();
+    virtual status_t                    freezeDisplay(DisplayID dpy, uint32_t flags);
+    virtual status_t                    unfreezeDisplay(DisplayID dpy, uint32_t flags);
+    virtual int                         setOrientation(DisplayID dpy, int orientation, uint32_t flags);
+    virtual void                        signal() const;
+
+            void                        screenReleased(DisplayID dpy);
+            void                        screenAcquired(DisplayID dpy);
+
+            overlay_control_device_t* getOverlayEngine() const;
+
+    status_t removeLayer(const sp<LayerBase>& layer);
+    status_t addLayer(const sp<LayerBase>& layer);
+    status_t invalidateLayerVisibility(const sp<LayerBase>& layer);
+
+    sp<Layer> getLayer(const sp<ISurface>& sur) const;
+
+private:
+    friend class Client;
+    friend class LayerBase;
+    friend class LayerBuffer;
+    friend class LayerBaseClient;
+    friend class LayerBaseClient::Surface;
+    friend class Layer;
+    friend class LayerBlur;
+    friend class LayerDim;
+
+    sp<ISurface> createSurface(const sp<Client>& client,
+            int pid, const String8& name,
+            ISurfaceComposerClient::surface_data_t* params,
+            DisplayID display, uint32_t w, uint32_t h, PixelFormat format,
+            uint32_t flags);
+
+    sp<Layer> createNormalSurface(
+            const sp<Client>& client, DisplayID display,
+            uint32_t w, uint32_t h, uint32_t flags,
+            PixelFormat& format);
+
+    sp<LayerBlur> createBlurSurface(
+            const sp<Client>& client, DisplayID display,
+            uint32_t w, uint32_t h, uint32_t flags);
+
+    sp<LayerDim> createDimSurface(
+            const sp<Client>& client, DisplayID display,
+            uint32_t w, uint32_t h, uint32_t flags);
+
+    sp<LayerBuffer> createPushBuffersSurface(
+            const sp<Client>& client, DisplayID display,
+            uint32_t w, uint32_t h, uint32_t flags);
+
+    status_t removeSurface(const sp<Client>& client, SurfaceID sid);
+    status_t destroySurface(const sp<LayerBaseClient>& layer);
+    status_t setClientState(const sp<Client>& client,
+            int32_t count, const layer_state_t* states);
+
+
+    class LayerVector {
+    public:
+        inline              LayerVector() { }
+                            LayerVector(const LayerVector&);
+        inline size_t       size() const { return layers.size(); }
+        inline sp<LayerBase> const* array() const { return layers.array(); }
+        ssize_t             add(const sp<LayerBase>&, Vector< sp<LayerBase> >::compar_t);
+        ssize_t             remove(const sp<LayerBase>&);
+        ssize_t             reorder(const sp<LayerBase>&, Vector< sp<LayerBase> >::compar_t);
+        ssize_t             indexOf(const sp<LayerBase>& key, size_t guess=0) const;
+        inline sp<LayerBase> operator [] (size_t i) const { return layers[i]; }
+    private:
+        KeyedVector< sp<LayerBase> , size_t> lookup;
+        Vector< sp<LayerBase> >              layers;
+    };
+
+    struct State {
+        State() {
+            orientation = ISurfaceComposer::eOrientationDefault;
+            freezeDisplay = 0;
+        }
+        LayerVector     layersSortedByZ;
+        uint8_t         orientation;
+        uint8_t         orientationType;
+        uint8_t         freezeDisplay;
+    };
+
+    virtual bool        threadLoop();
+    virtual status_t    readyToRun();
+    virtual void        onFirstRef();
+
+public:     // hack to work around gcc 4.0.3 bug
+    const GraphicPlane&     graphicPlane(int dpy) const;
+          GraphicPlane&     graphicPlane(int dpy);
+private:
+
+            void        waitForEvent();
+public:     // hack to work around gcc 4.0.3 bug
+            void        signalEvent();
+private:
+            void        handleConsoleEvents();
+            void        handleTransaction(uint32_t transactionFlags);
+            void        handleTransactionLocked(
+                            uint32_t transactionFlags, 
+                            Vector< sp<LayerBase> >& ditchedLayers);
+
+            void        computeVisibleRegions(
+                            LayerVector& currentLayers,
+                            Region& dirtyRegion,
+                            Region& wormholeRegion);
+
+            void        handlePageFlip();
+            bool        lockPageFlip(const LayerVector& currentLayers);
+            void        unlockPageFlip(const LayerVector& currentLayers);
+            void        handleRepaint();
+            void        postFramebuffer();
+            void        composeSurfaces(const Region& dirty);
+            void        unlockClients();
+
+
+            ssize_t     addClientLayer(const sp<Client>& client,
+                    const sp<LayerBaseClient>& lbc);
+            status_t    addLayer_l(const sp<LayerBase>& layer);
+            status_t    removeLayer_l(const sp<LayerBase>& layer);
+            status_t    purgatorizeLayer_l(const sp<LayerBase>& layer);
+
+            uint32_t    getTransactionFlags(uint32_t flags);
+            uint32_t    setTransactionFlags(uint32_t flags);
+            void        commitTransaction();
+
+
+            friend class FreezeLock;
+            sp<FreezeLock> getFreezeLock() const;
+            inline void incFreezeCount() {
+                if (mFreezeCount == 0)
+                    mFreezeDisplayTime = 0;
+                mFreezeCount++;
+            }
+            inline void decFreezeCount() { if (mFreezeCount > 0) mFreezeCount--; }
+            inline bool hasFreezeRequest() const { return mFreezeDisplay; }
+            inline bool isFrozen() const { 
+                return (mFreezeDisplay || mFreezeCount>0) && mBootFinished;
+            }
+
+            
+            void        debugFlashRegions();
+            void        debugShowFPS() const;
+            void        drawWormhole() const;
+           
+
+    mutable     MessageQueue    mEventQueue;
+
+    status_t postMessageAsync(const sp<MessageBase>& msg,
+            nsecs_t reltime=0, uint32_t flags = 0);
+
+    status_t postMessageSync(const sp<MessageBase>& msg,
+            nsecs_t reltime=0, uint32_t flags = 0);
+
+                // access must be protected by mStateLock
+    mutable     Mutex                   mStateLock;
+                State                   mCurrentState;
+                State                   mDrawingState;
+    volatile    int32_t                 mTransactionFlags;
+    volatile    int32_t                 mTransactionCount;
+                Condition               mTransactionCV;
+                bool                    mResizeTransationPending;
+
+                // protected by mStateLock (but we could use another lock)
+                GraphicPlane                mGraphicPlanes[1];
+                bool                        mLayersRemoved;
+                DefaultKeyedVector< wp<IBinder>, wp<Layer> > mLayerMap;
+
+                // constant members (no synchronization needed for access)
+                sp<IMemoryHeap>             mServerHeap;
+                surface_flinger_cblk_t*     mServerCblk;
+                GLuint                      mWormholeTexName;
+                nsecs_t                     mBootTime;
+                Permission                  mHardwareTest;
+                Permission                  mAccessSurfaceFlinger;
+                Permission                  mDump;
+                
+                // Can only accessed from the main thread, these members
+                // don't need synchronization
+                Region                      mDirtyRegion;
+                Region                      mDirtyRegionRemovedLayer;
+                Region                      mInvalidRegion;
+                Region                      mWormholeRegion;
+                bool                        mVisibleRegionsDirty;
+                bool                        mDeferReleaseConsole;
+                bool                        mFreezeDisplay;
+                int32_t                     mFreezeCount;
+                nsecs_t                     mFreezeDisplayTime;
+
+                // don't use a lock for these, we don't care
+                int                         mDebugRegion;
+                int                         mDebugBackground;
+                volatile nsecs_t            mDebugInSwapBuffers;
+                nsecs_t                     mLastSwapBufferTime;
+                volatile nsecs_t            mDebugInTransaction;
+                nsecs_t                     mLastTransactionTime;
+                bool                        mBootFinished;
+
+                // these are thread safe
+    mutable     Barrier                     mReadyToRunBarrier;
+
+                // atomic variables
+                enum {
+                    eConsoleReleased = 1,
+                    eConsoleAcquired = 2
+                };
+   volatile     int32_t                     mConsoleSignals;
+
+   // only written in the main thread, only read in other threads
+   volatile     int32_t                     mSecureFrameBuffer;
+};
+
+// ---------------------------------------------------------------------------
+
+class FreezeLock : public LightRefBase<FreezeLock> {
+    SurfaceFlinger* mFlinger;
+public:
+    FreezeLock(SurfaceFlinger* flinger)
+        : mFlinger(flinger) {
+        mFlinger->incFreezeCount();
+    }
+    ~FreezeLock() {
+        mFlinger->decFreezeCount();
+    }
+};
+
+// ---------------------------------------------------------------------------
+}; // namespace android
+
+#endif // ANDROID_SURFACE_FLINGER_H
diff --git a/services/surfaceflinger/TextureManager.cpp b/services/surfaceflinger/TextureManager.cpp
new file mode 100644
index 0000000..3b326df
--- /dev/null
+++ b/services/surfaceflinger/TextureManager.cpp
@@ -0,0 +1,342 @@
+/*
+ * Copyright (C) 2010 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include <stdlib.h>
+#include <stdint.h>
+#include <sys/types.h>
+
+#include <utils/Errors.h>
+#include <utils/Log.h>
+
+#include <ui/GraphicBuffer.h>
+
+#include <GLES/gl.h>
+#include <GLES/glext.h>
+
+#include <hardware/hardware.h>
+
+#include "clz.h"
+#include "DisplayHardware/DisplayHardware.h"
+#include "GLExtensions.h"
+#include "TextureManager.h"
+
+namespace android {
+
+// ---------------------------------------------------------------------------
+
+TextureManager::TextureManager()
+    : mGLExtensions(GLExtensions::getInstance())
+{
+}
+
+GLenum TextureManager::getTextureTarget(const Image* image) {
+#if defined(GL_OES_texture_external)
+    switch (image->target) {
+        case Texture::TEXTURE_EXTERNAL:
+            return GL_TEXTURE_EXTERNAL_OES;
+    }
+#endif
+    return GL_TEXTURE_2D;
+}
+
+status_t TextureManager::initTexture(Texture* texture)
+{
+    if (texture->name != -1UL)
+        return INVALID_OPERATION;
+
+    GLuint textureName = -1;
+    glGenTextures(1, &textureName);
+    texture->name = textureName;
+    texture->width = 0;
+    texture->height = 0;
+
+    const GLenum target = GL_TEXTURE_2D;
+    glBindTexture(target, textureName);
+    glTexParameterx(target, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
+    glTexParameterx(target, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
+    glTexParameterx(target, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
+    glTexParameterx(target, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
+
+    return NO_ERROR;
+}
+
+status_t TextureManager::initTexture(Image* pImage, int32_t format)
+{
+    if (pImage->name != -1UL)
+        return INVALID_OPERATION;
+
+    GLuint textureName = -1;
+    glGenTextures(1, &textureName);
+    pImage->name = textureName;
+    pImage->width = 0;
+    pImage->height = 0;
+
+    GLenum target = GL_TEXTURE_2D;
+#if defined(GL_OES_texture_external)
+    if (GLExtensions::getInstance().haveTextureExternal()) {
+        if (format && isYuvFormat(format)) {
+            target = GL_TEXTURE_EXTERNAL_OES;
+            pImage->target = Texture::TEXTURE_EXTERNAL;
+        }
+    }
+#endif
+
+    glBindTexture(target, textureName);
+    glTexParameterx(target, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
+    glTexParameterx(target, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
+    glTexParameterx(target, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
+    glTexParameterx(target, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
+
+    return NO_ERROR;
+}
+
+bool TextureManager::isSupportedYuvFormat(int format)
+{
+    switch (format) {
+    case HAL_PIXEL_FORMAT_YV12:
+        return true;
+    }
+    return false;
+}
+
+bool TextureManager::isYuvFormat(int format)
+{
+    switch (format) {
+    // supported YUV formats
+    case HAL_PIXEL_FORMAT_YV12:
+    // Legacy/deprecated YUV formats
+    case HAL_PIXEL_FORMAT_YCbCr_422_SP:
+    case HAL_PIXEL_FORMAT_YCrCb_420_SP:
+    case HAL_PIXEL_FORMAT_YCbCr_422_I:
+    case HAL_PIXEL_FORMAT_YCbCr_420_SP_TILED:
+        return true;
+    }
+
+    // Any OEM format needs to be considered
+    if (format>=0x100 && format<=0x1FF)
+        return true;
+
+    return false;
+}
+
+status_t TextureManager::initEglImage(Image* pImage,
+        EGLDisplay dpy, const sp<GraphicBuffer>& buffer)
+{
+    status_t err = NO_ERROR;
+    if (!pImage->dirty) return err;
+
+    // free the previous image
+    if (pImage->image != EGL_NO_IMAGE_KHR) {
+        eglDestroyImageKHR(dpy, pImage->image);
+        pImage->image = EGL_NO_IMAGE_KHR;
+    }
+
+    // construct an EGL_NATIVE_BUFFER_ANDROID
+    android_native_buffer_t* clientBuf = buffer->getNativeBuffer();
+
+    // create the new EGLImageKHR
+    const EGLint attrs[] = {
+            EGL_IMAGE_PRESERVED_KHR,    EGL_TRUE,
+            EGL_NONE,                   EGL_NONE
+    };
+    pImage->image = eglCreateImageKHR(
+            dpy, EGL_NO_CONTEXT, EGL_NATIVE_BUFFER_ANDROID,
+            (EGLClientBuffer)clientBuf, attrs);
+
+    if (pImage->image != EGL_NO_IMAGE_KHR) {
+        if (pImage->name == -1UL) {
+            initTexture(pImage, buffer->format);
+        }
+        const GLenum target = getTextureTarget(pImage);
+        glBindTexture(target, pImage->name);
+        glEGLImageTargetTexture2DOES(target, (GLeglImageOES)pImage->image);
+        GLint error = glGetError();
+        if (error != GL_NO_ERROR) {
+            LOGE("glEGLImageTargetTexture2DOES(%p) failed err=0x%04x",
+                    pImage->image, error);
+            err = INVALID_OPERATION;
+        } else {
+            // Everything went okay!
+            pImage->dirty  = false;
+            pImage->width  = clientBuf->width;
+            pImage->height = clientBuf->height;
+        }
+    } else {
+        LOGE("eglCreateImageKHR() failed. err=0x%4x", eglGetError());
+        err = INVALID_OPERATION;
+    }
+    return err;
+}
+
+status_t TextureManager::loadTexture(Texture* texture,
+        const Region& dirty, const GGLSurface& t)
+{
+    if (texture->name == -1UL) {
+        status_t err = initTexture(texture);
+        LOGE_IF(err, "loadTexture failed in initTexture (%s)", strerror(err));
+        return err;
+    }
+
+    if (texture->target != GL_TEXTURE_2D)
+        return INVALID_OPERATION;
+
+    glBindTexture(GL_TEXTURE_2D, texture->name);
+
+    /*
+     * In OpenGL ES we can't specify a stride with glTexImage2D (however,
+     * GL_UNPACK_ALIGNMENT is a limited form of stride).
+     * So if the stride here isn't representable with GL_UNPACK_ALIGNMENT, we
+     * need to do something reasonable (here creating a bigger texture).
+     *
+     * extra pixels = (((stride - width) * pixelsize) / GL_UNPACK_ALIGNMENT);
+     *
+     * This situation doesn't happen often, but some h/w have a limitation
+     * for their framebuffer (eg: must be multiple of 8 pixels), and
+     * we need to take that into account when using these buffers as
+     * textures.
+     *
+     * This should never be a problem with POT textures
+     */
+
+    int unpack = __builtin_ctz(t.stride * bytesPerPixel(t.format));
+    unpack = 1 << ((unpack > 3) ? 3 : unpack);
+    glPixelStorei(GL_UNPACK_ALIGNMENT, unpack);
+
+    /*
+     * round to POT if needed
+     */
+    if (!mGLExtensions.haveNpot()) {
+        texture->NPOTAdjust = true;
+    }
+
+    if (texture->NPOTAdjust) {
+        // find the smallest power-of-two that will accommodate our surface
+        texture->potWidth  = 1 << (31 - clz(t.width));
+        texture->potHeight = 1 << (31 - clz(t.height));
+        if (texture->potWidth  < t.width)  texture->potWidth  <<= 1;
+        if (texture->potHeight < t.height) texture->potHeight <<= 1;
+        texture->wScale = float(t.width)  / texture->potWidth;
+        texture->hScale = float(t.height) / texture->potHeight;
+    } else {
+        texture->potWidth  = t.width;
+        texture->potHeight = t.height;
+    }
+
+    Rect bounds(dirty.bounds());
+    GLvoid* data = 0;
+    if (texture->width != t.width || texture->height != t.height) {
+        texture->width  = t.width;
+        texture->height = t.height;
+
+        // texture size changed, we need to create a new one
+        bounds.set(Rect(t.width, t.height));
+        if (t.width  == texture->potWidth &&
+            t.height == texture->potHeight) {
+            // we can do it one pass
+            data = t.data;
+        }
+
+        if (t.format == HAL_PIXEL_FORMAT_RGB_565) {
+            glTexImage2D(GL_TEXTURE_2D, 0,
+                    GL_RGB, texture->potWidth, texture->potHeight, 0,
+                    GL_RGB, GL_UNSIGNED_SHORT_5_6_5, data);
+        } else if (t.format == HAL_PIXEL_FORMAT_RGBA_4444) {
+            glTexImage2D(GL_TEXTURE_2D, 0,
+                    GL_RGBA, texture->potWidth, texture->potHeight, 0,
+                    GL_RGBA, GL_UNSIGNED_SHORT_4_4_4_4, data);
+        } else if (t.format == HAL_PIXEL_FORMAT_RGBA_8888 ||
+                   t.format == HAL_PIXEL_FORMAT_RGBX_8888) {
+            glTexImage2D(GL_TEXTURE_2D, 0,
+                    GL_RGBA, texture->potWidth, texture->potHeight, 0,
+                    GL_RGBA, GL_UNSIGNED_BYTE, data);
+        } else if (isSupportedYuvFormat(t.format)) {
+            // just show the Y plane of YUV buffers
+            glTexImage2D(GL_TEXTURE_2D, 0,
+                    GL_LUMINANCE, texture->potWidth, texture->potHeight, 0,
+                    GL_LUMINANCE, GL_UNSIGNED_BYTE, data);
+        } else {
+            // oops, we don't handle this format!
+            LOGE("texture=%d, using format %d, which is not "
+                 "supported by the GL", texture->name, t.format);
+        }
+    }
+    if (!data) {
+        if (t.format == HAL_PIXEL_FORMAT_RGB_565) {
+            glTexSubImage2D(GL_TEXTURE_2D, 0,
+                    0, bounds.top, t.width, bounds.height(),
+                    GL_RGB, GL_UNSIGNED_SHORT_5_6_5,
+                    t.data + bounds.top*t.stride*2);
+        } else if (t.format == HAL_PIXEL_FORMAT_RGBA_4444) {
+            glTexSubImage2D(GL_TEXTURE_2D, 0,
+                    0, bounds.top, t.width, bounds.height(),
+                    GL_RGBA, GL_UNSIGNED_SHORT_4_4_4_4,
+                    t.data + bounds.top*t.stride*2);
+        } else if (t.format == HAL_PIXEL_FORMAT_RGBA_8888 ||
+                   t.format == HAL_PIXEL_FORMAT_RGBX_8888) {
+            glTexSubImage2D(GL_TEXTURE_2D, 0,
+                    0, bounds.top, t.width, bounds.height(),
+                    GL_RGBA, GL_UNSIGNED_BYTE,
+                    t.data + bounds.top*t.stride*4);
+        } else if (isSupportedYuvFormat(t.format)) {
+            // just show the Y plane of YUV buffers
+            glTexSubImage2D(GL_TEXTURE_2D, 0,
+                    0, bounds.top, t.width, bounds.height(),
+                    GL_LUMINANCE, GL_UNSIGNED_BYTE,
+                    t.data + bounds.top*t.stride);
+        }
+    }
+    return NO_ERROR;
+}
+
+void TextureManager::activateTexture(const Texture& texture, bool filter)
+{
+    const GLenum target = getTextureTarget(&texture);
+    if (target == GL_TEXTURE_2D) {
+        glBindTexture(GL_TEXTURE_2D, texture.name);
+        glEnable(GL_TEXTURE_2D);
+#if defined(GL_OES_texture_external)
+        if (GLExtensions::getInstance().haveTextureExternal()) {
+            glDisable(GL_TEXTURE_EXTERNAL_OES);
+        }
+    } else {
+        glBindTexture(GL_TEXTURE_EXTERNAL_OES, texture.name);
+        glEnable(GL_TEXTURE_EXTERNAL_OES);
+        glDisable(GL_TEXTURE_2D);
+#endif
+    }
+
+    if (filter) {
+        glTexParameterx(target, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
+        glTexParameterx(target, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
+    } else {
+        glTexParameterx(target, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
+        glTexParameterx(target, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
+    }
+}
+
+void TextureManager::deactivateTextures()
+{
+    glDisable(GL_TEXTURE_2D);
+#if defined(GL_OES_texture_external)
+    if (GLExtensions::getInstance().haveTextureExternal()) {
+        glDisable(GL_TEXTURE_EXTERNAL_OES);
+    }
+#endif
+}
+
+// ---------------------------------------------------------------------------
+
+}; // namespace android
diff --git a/services/surfaceflinger/TextureManager.h b/services/surfaceflinger/TextureManager.h
new file mode 100644
index 0000000..c7c14e7
--- /dev/null
+++ b/services/surfaceflinger/TextureManager.h
@@ -0,0 +1,94 @@
+/*
+ * Copyright (C) 2010 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef ANDROID_TEXTURE_MANAGER_H
+#define ANDROID_TEXTURE_MANAGER_H
+
+#include <stdint.h>
+#include <sys/types.h>
+
+#include <EGL/egl.h>
+#include <EGL/eglext.h>
+#include <GLES/gl.h>
+
+#include <ui/Region.h>
+
+#include <pixelflinger/pixelflinger.h>
+
+namespace android {
+
+// ---------------------------------------------------------------------------
+
+class GLExtensions;
+class GraphicBuffer;
+
+// ---------------------------------------------------------------------------
+
+struct Image {
+    enum { TEXTURE_2D=0, TEXTURE_EXTERNAL=1 };
+    Image() : name(-1U), image(EGL_NO_IMAGE_KHR), width(0), height(0),
+        transform(0), dirty(1), target(TEXTURE_2D) { }
+    GLuint        name;
+    EGLImageKHR   image;
+    GLuint        width;
+    GLuint        height;
+    uint32_t      transform;
+    unsigned      dirty     : 1;
+    unsigned      target    : 1;
+};
+
+struct Texture : public Image {
+    Texture() : Image(), NPOTAdjust(0) { }
+    GLuint      potWidth;
+    GLuint      potHeight;
+    GLfloat     wScale;
+    GLfloat     hScale;
+    unsigned    NPOTAdjust  : 1;
+};
+
+// ---------------------------------------------------------------------------
+
+class TextureManager {
+    const GLExtensions& mGLExtensions;
+    static status_t initTexture(Image* texture, int32_t format);
+    static status_t initTexture(Texture* texture);
+    static bool isSupportedYuvFormat(int format);
+    static bool isYuvFormat(int format);
+    static GLenum getTextureTarget(const Image* pImage);
+public:
+
+    TextureManager();
+
+    // load bitmap data into the active buffer
+    status_t loadTexture(Texture* texture,
+            const Region& dirty, const GGLSurface& t);
+
+    // make active buffer an EGLImage if needed
+    status_t initEglImage(Image* texture,
+            EGLDisplay dpy, const sp<GraphicBuffer>& buffer);
+
+    // activate a texture
+    static void activateTexture(const Texture& texture, bool filter);
+
+    // deactivate a texture
+    static void deactivateTextures();
+};
+
+// ---------------------------------------------------------------------------
+
+}; // namespace android
+
+#endif // ANDROID_TEXTURE_MANAGER_H
diff --git a/services/surfaceflinger/Transform.cpp b/services/surfaceflinger/Transform.cpp
new file mode 100644
index 0000000..5e27cc9
--- /dev/null
+++ b/services/surfaceflinger/Transform.cpp
@@ -0,0 +1,391 @@
+/*
+ * Copyright (C) 2007 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include <math.h>
+
+#include <cutils/compiler.h>
+#include <utils/String8.h>
+#include <ui/Region.h>
+
+#include "Transform.h"
+
+// ---------------------------------------------------------------------------
+
+namespace android {
+
+// ---------------------------------------------------------------------------
+
+template <typename T> inline T min(T a, T b) {
+    return a<b ? a : b;
+}
+template <typename T> inline T min(T a, T b, T c) {
+    return min(a, min(b, c));
+}
+template <typename T> inline T min(T a, T b, T c, T d) {
+    return min(a, b, min(c, d));
+}
+
+template <typename T> inline T max(T a, T b) {
+    return a>b ? a : b;
+}
+template <typename T> inline T max(T a, T b, T c) {
+    return max(a, max(b, c));
+}
+template <typename T> inline T max(T a, T b, T c, T d) {
+    return max(a, b, max(c, d));
+}
+
+// ---------------------------------------------------------------------------
+
+Transform::Transform() {
+    reset();
+}
+
+Transform::Transform(const Transform&  other)
+    : mMatrix(other.mMatrix), mType(other.mType) {
+}
+
+Transform::Transform(uint32_t orientation) {
+    set(orientation, 0, 0);
+}
+
+Transform::~Transform() {
+}
+
+static const float EPSILON = 0.0f;
+
+bool Transform::isZero(float f) {
+    return fabs(f) <= EPSILON;
+}
+
+bool Transform::absIsOne(float f) {
+    return isZero(fabs(f) - 1.0f);
+}
+
+Transform Transform::operator * (const Transform& rhs) const
+{
+    if (CC_LIKELY(mType == IDENTITY))
+        return rhs;
+
+    Transform r(*this);
+    if (rhs.mType == IDENTITY)
+        return r;
+
+    // TODO: we could use mType to optimize the matrix multiply
+    const mat33& A(mMatrix);
+    const mat33& B(rhs.mMatrix);
+          mat33& D(r.mMatrix);
+    for (int i=0 ; i<3 ; i++) {
+        const float v0 = A[0][i];
+        const float v1 = A[1][i];
+        const float v2 = A[2][i];
+        D[0][i] = v0*B[0][0] + v1*B[0][1] + v2*B[0][2];
+        D[1][i] = v0*B[1][0] + v1*B[1][1] + v2*B[1][2];
+        D[2][i] = v0*B[2][0] + v1*B[2][1] + v2*B[2][2];
+    }
+    r.mType |= rhs.mType;
+
+    // TODO: we could recompute this value from r and rhs
+    r.mType &= 0xFF;
+    r.mType |= UNKNOWN_TYPE;
+    return r;
+}
+
+float const* Transform::operator [] (int i) const {
+    return mMatrix[i].v;
+}
+
+bool Transform::transformed() const {
+    return type() > TRANSLATE;
+}
+
+int Transform::tx() const {
+    return floorf(mMatrix[2][0] + 0.5f);
+}
+
+int Transform::ty() const {
+    return floorf(mMatrix[2][1] + 0.5f);
+}
+
+void Transform::reset() {
+    mType = IDENTITY;
+    for(int i=0 ; i<3 ; i++) {
+        vec3& v(mMatrix[i]);
+        for (int j=0 ; j<3 ; j++)
+            v[j] = ((i==j) ? 1.0f : 0.0f);
+    }
+}
+
+void Transform::set(float tx, float ty)
+{
+    mMatrix[2][0] = tx;
+    mMatrix[2][1] = ty;
+    mMatrix[2][2] = 1.0f;
+
+    if (isZero(tx) && isZero(ty)) {
+        mType &= ~TRANSLATE;
+    } else {
+        mType |= TRANSLATE;
+    }
+}
+
+void Transform::set(float a, float b, float c, float d)
+{
+    mat33& M(mMatrix);
+    M[0][0] = a;    M[1][0] = b;
+    M[0][1] = c;    M[1][1] = d;
+    M[0][2] = 0;    M[1][2] = 0;
+    mType = UNKNOWN_TYPE;
+}
+
+status_t Transform::set(uint32_t flags, float w, float h)
+{
+    if (flags & ROT_INVALID) {
+        // that's not allowed!
+        reset();
+        return BAD_VALUE;
+    }
+
+    mType = flags << 8;
+    float sx = (flags & FLIP_H) ? -1 : 1;
+    float sy = (flags & FLIP_V) ? -1 : 1;
+    float a=0, b=0, c=0, d=0, x=0, y=0;
+    int xmask = 0;
+
+    // computation of x,y
+    // x y
+    // 0 0  0
+    // w 0  ROT90
+    // w h  FLIPH|FLIPV
+    // 0 h  FLIPH|FLIPV|ROT90
+
+    if (flags & ROT_90) {
+        mType |= ROTATE;
+        b = -sy;
+        c = sx;
+        xmask = 1;
+    } else {
+        a = sx;
+        d = sy;
+    }
+
+    if (flags & FLIP_H) {
+        mType ^= SCALE;
+        xmask ^= 1;
+    }
+
+    if (flags & FLIP_V) {
+        mType ^= SCALE;
+        y = h;
+    }
+
+    if ((flags & ROT_180) == ROT_180) {
+        mType |= ROTATE;
+    }
+
+    if (xmask) {
+        x = w;
+    }
+
+    if (!isZero(x) || !isZero(y)) {
+        mType |= TRANSLATE;
+    }
+
+    mat33& M(mMatrix);
+    M[0][0] = a;    M[1][0] = b;    M[2][0] = x;
+    M[0][1] = c;    M[1][1] = d;    M[2][1] = y;
+    M[0][2] = 0;    M[1][2] = 0;    M[2][2] = 1;
+
+    return NO_ERROR;
+}
+
+Transform::vec2 Transform::transform(const vec2& v) const {
+    vec2 r;
+    const mat33& M(mMatrix);
+    r[0] = M[0][0]*v[0] + M[1][0]*v[1] + M[2][0];
+    r[1] = M[0][1]*v[0] + M[1][1]*v[1] + M[2][1];
+    return r;
+}
+
+Transform::vec3 Transform::transform(const vec3& v) const {
+    vec3 r;
+    const mat33& M(mMatrix);
+    r[0] = M[0][0]*v[0] + M[1][0]*v[1] + M[2][0]*v[2];
+    r[1] = M[0][1]*v[0] + M[1][1]*v[1] + M[2][1]*v[2];
+    r[2] = M[0][2]*v[0] + M[1][2]*v[1] + M[2][2]*v[2];
+    return r;
+}
+
+void Transform::transform(float* point, int x, int y) const
+{
+    const mat33& M(mMatrix);
+    vec2 v(x, y);
+    v = transform(v);
+    point[0] = v[0];
+    point[1] = v[1];
+}
+
+Rect Transform::makeBounds(int w, int h) const
+{
+    return transform( Rect(w, h) );
+}
+
+Rect Transform::transform(const Rect& bounds) const
+{
+    Rect r;
+    vec2 lt( bounds.left,  bounds.top    );
+    vec2 rt( bounds.right, bounds.top    );
+    vec2 lb( bounds.left,  bounds.bottom );
+    vec2 rb( bounds.right, bounds.bottom );
+
+    lt = transform(lt);
+    rt = transform(rt);
+    lb = transform(lb);
+    rb = transform(rb);
+
+    r.left   = floorf(min(lt[0], rt[0], lb[0], rb[0]) + 0.5f);
+    r.top    = floorf(min(lt[1], rt[1], lb[1], rb[1]) + 0.5f);
+    r.right  = floorf(max(lt[0], rt[0], lb[0], rb[0]) + 0.5f);
+    r.bottom = floorf(max(lt[1], rt[1], lb[1], rb[1]) + 0.5f);
+
+    return r;
+}
+
+Region Transform::transform(const Region& reg) const
+{
+    Region out;
+    if (CC_UNLIKELY(transformed())) {
+        if (CC_LIKELY(preserveRects())) {
+            Region::const_iterator it = reg.begin();
+            Region::const_iterator const end = reg.end();
+            while (it != end) {
+                out.orSelf(transform(*it++));
+            }
+        } else {
+            out.set(transform(reg.bounds()));
+        }
+    } else {
+        out = reg.translate(tx(), ty());
+    }
+    return out;
+}
+
+uint32_t Transform::type() const
+{
+    if (mType & UNKNOWN_TYPE) {
+        // recompute what this transform is
+
+        const mat33& M(mMatrix);
+        const float a = M[0][0];
+        const float b = M[1][0];
+        const float c = M[0][1];
+        const float d = M[1][1];
+        const float x = M[2][0];
+        const float y = M[2][1];
+
+        bool scale = false;
+        uint32_t flags = ROT_0;
+        if (isZero(b) && isZero(c)) {
+            if (a<0)    flags |= FLIP_H;
+            if (d<0)    flags |= FLIP_V;
+            if (!absIsOne(a) || !absIsOne(d)) {
+                scale = true;
+            }
+        } else if (isZero(a) && isZero(d)) {
+            flags |= ROT_90;
+            if (b>0)    flags |= FLIP_H;
+            if (c<0)    flags |= FLIP_V;
+            if (!absIsOne(b) || !absIsOne(c)) {
+                scale = true;
+            }
+        } else {
+            flags = ROT_INVALID;
+        }
+
+        mType = flags << 8;
+        if (flags & ROT_INVALID) {
+            mType |= UNKNOWN;
+        } else {
+            if ((flags & ROT_90) || ((flags & ROT_180) == ROT_180))
+                mType |= ROTATE;
+            if (flags & FLIP_H)
+                mType ^= SCALE;
+            if (flags & FLIP_V)
+                mType ^= SCALE;
+            if (scale)
+                mType |= SCALE;
+        }
+
+        if (!isZero(x) || !isZero(y))
+            mType |= TRANSLATE;
+    }
+    return mType;
+}
+
+uint32_t Transform::getType() const {
+    return type() & 0xFF;
+}
+
+uint32_t Transform::getOrientation() const
+{
+    return (type() >> 8) & 0xFF;
+}
+
+bool Transform::preserveRects() const
+{
+    return (type() & ROT_INVALID) ? false : true;
+}
+
+void Transform::dump(const char* name) const
+{
+    type(); // updates the type
+
+    String8 flags, type;
+    const mat33& m(mMatrix);
+    uint32_t orient = mType >> 8;
+
+    if (orient&ROT_INVALID) {
+        flags.append("ROT_INVALID ");
+    } else {
+        if (orient&ROT_90) {
+            flags.append("ROT_90 ");
+        } else {
+            flags.append("ROT_0 ");
+        }
+        if (orient&FLIP_V)
+            flags.append("FLIP_V ");
+        if (orient&FLIP_H)
+            flags.append("FLIP_H ");
+    }
+
+    if (!(mType&(SCALE|ROTATE|TRANSLATE)))
+        type.append("IDENTITY ");
+    if (mType&SCALE)
+        type.append("SCALE ");
+    if (mType&ROTATE)
+        type.append("ROTATE ");
+    if (mType&TRANSLATE)
+        type.append("TRANSLATE ");
+
+    LOGD("%s 0x%08x (%s, %s)", name, mType, flags.string(), type.string());
+    LOGD("%.4f  %.4f  %.4f", m[0][0], m[1][0], m[2][0]);
+    LOGD("%.4f  %.4f  %.4f", m[0][1], m[1][1], m[2][1]);
+    LOGD("%.4f  %.4f  %.4f", m[0][2], m[1][2], m[2][2]);
+}
+
+// ---------------------------------------------------------------------------
+
+}; // namespace android
diff --git a/services/surfaceflinger/Transform.h b/services/surfaceflinger/Transform.h
new file mode 100644
index 0000000..20fa11a
--- /dev/null
+++ b/services/surfaceflinger/Transform.h
@@ -0,0 +1,126 @@
+/*
+ * Copyright (C) 2007 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef ANDROID_TRANSFORM_H
+#define ANDROID_TRANSFORM_H
+
+#include <stdint.h>
+#include <sys/types.h>
+
+#include <ui/Point.h>
+#include <ui/Rect.h>
+
+namespace android {
+
+class Region;
+
+// ---------------------------------------------------------------------------
+
+class Transform
+{
+public:
+                    Transform();
+                    Transform(const Transform&  other);
+           explicit Transform(uint32_t orientation);
+                    ~Transform();
+
+            // FIXME: must match OVERLAY_TRANSFORM_*, pull from hardware.h
+            enum orientation_flags {
+                ROT_0   = 0x00000000,
+                FLIP_H  = 0x00000001,
+                FLIP_V  = 0x00000002,
+                ROT_90  = 0x00000004,
+                ROT_180 = FLIP_H|FLIP_V,
+                ROT_270 = ROT_180|ROT_90,
+                ROT_INVALID = 0x80
+            };
+
+            enum type_mask {
+                IDENTITY            = 0,
+                TRANSLATE           = 0x1,
+                ROTATE              = 0x2,
+                SCALE               = 0x4,
+                UNKNOWN             = 0x8
+            };
+
+            // query the transform
+            bool        transformed() const;
+            bool        preserveRects() const;
+            uint32_t    getType() const;
+            uint32_t    getOrientation() const;
+
+            float const* operator [] (int i) const;  // returns column i
+            int     tx() const;
+            int     ty() const;
+
+            // modify the transform
+            void        reset();
+            void        set(float tx, float ty);
+            void        set(float a, float b, float c, float d);
+            status_t    set(uint32_t flags, float w, float h);
+
+            // transform data
+            Rect    makeBounds(int w, int h) const;
+            void    transform(float* point, int x, int y) const;
+            Region  transform(const Region& reg) const;
+            Transform operator * (const Transform& rhs) const;
+
+            // for debugging
+            void dump(const char* name) const;
+
+private:
+    struct vec3 {
+        float v[3];
+        inline vec3() { }
+        inline vec3(float a, float b, float c) {
+            v[0] = a; v[1] = b; v[2] = c;
+        }
+        inline float operator [] (int i) const { return v[i]; }
+        inline float& operator [] (int i) { return v[i]; }
+    };
+    struct vec2 {
+        float v[2];
+        inline vec2() { }
+        inline vec2(float a, float b) {
+            v[0] = a; v[1] = b;
+        }
+        inline float operator [] (int i) const { return v[i]; }
+        inline float& operator [] (int i) { return v[i]; }
+    };
+    struct mat33 {
+        vec3 v[3];
+        inline const vec3& operator [] (int i) const { return v[i]; }
+        inline vec3& operator [] (int i) { return v[i]; }
+    };
+
+    enum { UNKNOWN_TYPE = 0x80000000 };
+
+    // assumes the last row is < 0 , 0 , 1 >
+    vec2 transform(const vec2& v) const;
+    vec3 transform(const vec3& v) const;
+    Rect transform(const Rect& bounds) const;
+    uint32_t type() const;
+    static bool absIsOne(float f);
+    static bool isZero(float f);
+
+    mat33               mMatrix;
+    mutable uint32_t    mType;
+};
+
+// ---------------------------------------------------------------------------
+}; // namespace android
+
+#endif /* ANDROID_TRANSFORM_H */
diff --git a/libs/surfaceflinger/clz.cpp b/services/surfaceflinger/clz.cpp
similarity index 100%
rename from libs/surfaceflinger/clz.cpp
rename to services/surfaceflinger/clz.cpp
diff --git a/libs/surfaceflinger/clz.h b/services/surfaceflinger/clz.h
similarity index 100%
rename from libs/surfaceflinger/clz.h
rename to services/surfaceflinger/clz.h
diff --git a/libs/surfaceflinger/tests/Android.mk b/services/surfaceflinger/tests/Android.mk
similarity index 100%
copy from libs/surfaceflinger/tests/Android.mk
copy to services/surfaceflinger/tests/Android.mk
diff --git a/libs/surfaceflinger/tests/overlays/Android.mk b/services/surfaceflinger/tests/overlays/Android.mk
similarity index 100%
rename from libs/surfaceflinger/tests/overlays/Android.mk
rename to services/surfaceflinger/tests/overlays/Android.mk
diff --git a/libs/surfaceflinger/tests/overlays/overlays.cpp b/services/surfaceflinger/tests/overlays/overlays.cpp
similarity index 100%
rename from libs/surfaceflinger/tests/overlays/overlays.cpp
rename to services/surfaceflinger/tests/overlays/overlays.cpp
diff --git a/libs/surfaceflinger/tests/resize/Android.mk b/services/surfaceflinger/tests/resize/Android.mk
similarity index 100%
rename from libs/surfaceflinger/tests/resize/Android.mk
rename to services/surfaceflinger/tests/resize/Android.mk
diff --git a/libs/surfaceflinger/tests/resize/resize.cpp b/services/surfaceflinger/tests/resize/resize.cpp
similarity index 100%
rename from libs/surfaceflinger/tests/resize/resize.cpp
rename to services/surfaceflinger/tests/resize/resize.cpp
diff --git a/telephony/java/android/telephony/NeighboringCellInfo.java b/telephony/java/android/telephony/NeighboringCellInfo.java
index ad7dfc9..2f7666d 100644
--- a/telephony/java/android/telephony/NeighboringCellInfo.java
+++ b/telephony/java/android/telephony/NeighboringCellInfo.java
@@ -133,8 +133,11 @@
             case NETWORK_TYPE_GPRS:
             case NETWORK_TYPE_EDGE:
                 mNetworkType = radioType;
-                mLac = Integer.valueOf(location.substring(0, 4), 16);
-                mCid = Integer.valueOf(location.substring(4), 16);
+                // check if 0xFFFFFFFF for UNKNOWN_CID
+                if (!location.equalsIgnoreCase("FFFFFFFF")) {
+                    mCid = Integer.valueOf(location.substring(4), 16);
+                    mLac = Integer.valueOf(location.substring(0, 4), 16);
+                }
                 break;
             case NETWORK_TYPE_UMTS:
             case NETWORK_TYPE_HSDPA:
@@ -293,4 +296,4 @@
             return new NeighboringCellInfo[size];
         }
     };
-}
\ No newline at end of file
+}
diff --git a/telephony/java/android/telephony/PhoneNumberUtils.java b/telephony/java/android/telephony/PhoneNumberUtils.java
index 32e7176..a60d2be 100644
--- a/telephony/java/android/telephony/PhoneNumberUtils.java
+++ b/telephony/java/android/telephony/PhoneNumberUtils.java
@@ -732,7 +732,8 @@
             return "";
         }
 
-        if ((bytes[offset] & 0xff) == TOA_International) {
+        //Only TON field should be taken in consideration
+        if ((bytes[offset] & 0xf0) == (TOA_International & 0xf0)) {
             prependPlus = true;
         }
 
diff --git a/telephony/java/android/telephony/ServiceState.java b/telephony/java/android/telephony/ServiceState.java
index 6c66559..35a2c19 100644
--- a/telephony/java/android/telephony/ServiceState.java
+++ b/telephony/java/android/telephony/ServiceState.java
@@ -57,7 +57,7 @@
     public static final int STATE_EMERGENCY_ONLY = 2;
 
     /**
-     * Radio of telephony is explictly powered off.
+     * Radio of telephony is explicitly powered off.
      */
     public static final int STATE_POWER_OFF = 3;
 
@@ -89,6 +89,8 @@
     public static final int RADIO_TECHNOLOGY_HSUPA = 10;
     /** @hide */
     public static final int RADIO_TECHNOLOGY_HSPA = 11;
+    /** @hide */
+    public static final int RADIO_TECHNOLOGY_EVDO_B = 12;
 
     /**
      * Available registration states for GSM, UMTS and CDMA.
@@ -218,7 +220,8 @@
         return 0;
     }
 
-    public static final Parcelable.Creator<ServiceState> CREATOR = new Parcelable.Creator() {
+    public static final Parcelable.Creator<ServiceState> CREATOR =
+            new Parcelable.Creator<ServiceState>() {
         public ServiceState createFromParcel(Parcel in) {
             return new ServiceState(in);
         }
@@ -229,7 +232,7 @@
     };
 
     /**
-     * Get current servcie state of phone
+     * Get current service state of phone
      *
      * @see #STATE_IN_SERVICE
      * @see #STATE_OUT_OF_SERVICE
@@ -288,10 +291,10 @@
     }
 
     /**
-     * Get current registered operator name in long alphanumeric format
+     * Get current registered operator name in long alphanumeric format.
      *
-     * In GSM/UMTS, long format can be upto 16 characters long
-     * In CDMA, returns the ERI text, if set, otherwise the ONS
+     * In GSM/UMTS, long format can be up to 16 characters long.
+     * In CDMA, returns the ERI text, if set. Otherwise, returns the ONS.
      *
      * @return long name of operator, null if unregistered or unknown
      */
@@ -300,9 +303,9 @@
     }
 
     /**
-     * Get current registered operator name in short lphanumeric format
+     * Get current registered operator name in short alphanumeric format.
      *
-     * In GSM/UMST, short format can be upto 8 characters long
+     * In GSM/UMTS, short format can be up to 8 characters long.
      *
      * @return short name of operator, null if unregistered or unknown
      */
@@ -311,21 +314,23 @@
     }
 
     /**
-     * Get current registered operator numeric id
+     * Get current registered operator numeric id.
      *
      * In GSM/UMTS, numeric format is 3 digit country code plus 2 or 3 digit
-     * network code
-     *
-     * The country code can be decoded using MccTable.countryCodeForMcc()
+     * network code.
      *
      * @return numeric format of operator, null if unregistered or unknown
      */
+    /*
+     * The country code can be decoded using
+     * {@link com.android.internal.telephony.MccTable#countryCodeForMcc(int)}.
+     */
     public String getOperatorNumeric() {
         return mOperatorNumeric;
     }
 
     /**
-     * Get current network selection mode
+     * Get current network selection mode.
      *
      * @return true if manual mode, false if automatic mode
      */
@@ -379,7 +384,6 @@
     @Override
     public String toString() {
         String radioTechnology = new String("Error in radioTechnology");
-
         switch(this.mRadioTechnology) {
         case 0:
             radioTechnology = "Unknown";
@@ -417,6 +421,9 @@
         case 11:
             radioTechnology = "HSPA";
             break;
+        case 12:
+            radioTechnology = "EvDo rev. B";
+            break;
         default:
             Log.w(LOG_TAG, "mRadioTechnology variable out of range.");
         break;
@@ -454,7 +461,7 @@
         mIsEmergencyOnly = false;
     }
 
-    // TODO - can't this be combined with the above func..
+    // TODO - can't this be combined with the above method?
     public void setStateOff() {
         mState = STATE_POWER_OFF;
         mRoaming = false;
@@ -524,8 +531,8 @@
     }
 
     /**
-     * In CDMA mOperatorAlphaLong can be set from the ERI
-     * text, this is done from the CDMAPhone and not from the CdmaServiceStateTracker
+     * In CDMA, mOperatorAlphaLong can be set from the ERI text.
+     * This is done from the CDMAPhone and not from the CdmaServiceStateTracker.
      *
      * @hide
      */
@@ -538,7 +545,7 @@
     }
 
     /**
-     * Test whether two objects hold the same data values or both are null
+     * Test whether two objects hold the same data values or both are null.
      *
      * @param a first obj
      * @param b second obj
@@ -549,7 +556,7 @@
     }
 
     /**
-     * Set ServiceState based on intent notifier map
+     * Set ServiceState based on intent notifier map.
      *
      * @param m intent notifier map
      * @hide
@@ -571,7 +578,7 @@
     }
 
     /**
-     * Set intent notifier Bundle based on service state
+     * Set intent notifier Bundle based on service state.
      *
      * @param m intent notifier Bundle
      * @hide
diff --git a/telephony/java/android/telephony/SmsManager.java b/telephony/java/android/telephony/SmsManager.java
index 3122722..f5e9751 100644
--- a/telephony/java/android/telephony/SmsManager.java
+++ b/telephony/java/android/telephony/SmsManager.java
@@ -398,4 +398,6 @@
     static public final int RESULT_ERROR_NO_SERVICE         = 4;
     /** Failed because we reached the sending queue limit.  {@hide} */
     static public final int RESULT_ERROR_LIMIT_EXCEEDED     = 5;
+    /** Failed because FDN is enabled. {@hide} */
+    static public final int RESULT_ERROR_FDN_CHECK_FAILURE  = 6;
 }
diff --git a/telephony/java/android/telephony/TelephonyManager.java b/telephony/java/android/telephony/TelephonyManager.java
index f018d107..ab63017 100644
--- a/telephony/java/android/telephony/TelephonyManager.java
+++ b/telephony/java/android/telephony/TelephonyManager.java
@@ -391,6 +391,9 @@
     public static final int NETWORK_TYPE_HSPA = 10;
     /** Current network is iDen */
     public static final int NETWORK_TYPE_IDEN = 11;
+    /** Current network is EVDO revision B*/
+    public static final int NETWORK_TYPE_EVDO_B = 12;
+
 
     /**
      * Returns a constant indicating the radio technology (network type)
@@ -407,6 +410,7 @@
      * @see #NETWORK_TYPE_CDMA
      * @see #NETWORK_TYPE_EVDO_0
      * @see #NETWORK_TYPE_EVDO_A
+     * @see #NETWORK_TYPE_EVDO_B
      * @see #NETWORK_TYPE_1xRTT
      */
     public int getNetworkType() {
@@ -454,6 +458,8 @@
                 return "CDMA - EvDo rev. 0";
             case NETWORK_TYPE_EVDO_A:
                 return "CDMA - EvDo rev. A";
+            case NETWORK_TYPE_EVDO_B:
+                return "CDMA - EvDo rev. B";
             case NETWORK_TYPE_1xRTT:
                 return "CDMA - 1xRTT";
             default:
diff --git a/telephony/java/android/telephony/gsm/SmsManager.java b/telephony/java/android/telephony/gsm/SmsManager.java
index 241c485..3b75298 100644
--- a/telephony/java/android/telephony/gsm/SmsManager.java
+++ b/telephony/java/android/telephony/gsm/SmsManager.java
@@ -56,7 +56,7 @@
      *  the current default SMSC
      * @param text the body of the message to send
      * @param sentIntent if not NULL this <code>PendingIntent</code> is
-     *  broadcast when the message is sucessfully sent, or failed.
+     *  broadcast when the message is successfully sent, or failed.
      *  The result code will be <code>Activity.RESULT_OK<code> for success,
      *  or one of these errors:
      *  <code>RESULT_ERROR_GENERIC_FAILURE</code>
diff --git a/telephony/java/com/android/internal/telephony/AdnRecord.java b/telephony/java/com/android/internal/telephony/AdnRecord.java
index 0896ba6..1bf2d3c 100644
--- a/telephony/java/com/android/internal/telephony/AdnRecord.java
+++ b/telephony/java/com/android/internal/telephony/AdnRecord.java
@@ -19,10 +19,9 @@
 import android.os.Parcel;
 import android.os.Parcelable;
 import android.telephony.PhoneNumberUtils;
+import android.text.TextUtils;
 import android.util.Log;
 
-import com.android.internal.telephony.GsmAlphabet;
-
 import java.util.Arrays;
 
 
@@ -38,8 +37,8 @@
 
     //***** Instance Variables
 
-    String alphaTag = "";
-    String number = "";
+    String alphaTag = null;
+    String number = null;
     String[] emails;
     int extRecord = 0xff;
     int efid;                   // or 0 if none
@@ -63,8 +62,8 @@
     // ADN offset
     static final int ADN_BCD_NUMBER_LENGTH = 0;
     static final int ADN_TON_AND_NPI = 1;
-    static final int ADN_DAILING_NUMBER_START = 2;
-    static final int ADN_DAILING_NUMBER_END = 11;
+    static final int ADN_DIALING_NUMBER_START = 2;
+    static final int ADN_DIALING_NUMBER_END = 11;
     static final int ADN_CAPABILITY_ID = 12;
     static final int ADN_EXTENSION_ID = 13;
 
@@ -152,17 +151,31 @@
     }
 
     public boolean isEmpty() {
-        return alphaTag.equals("") && number.equals("") && emails == null;
+        return TextUtils.isEmpty(alphaTag) && TextUtils.isEmpty(number) && emails == null;
     }
 
     public boolean hasExtendedRecord() {
         return extRecord != 0 && extRecord != 0xff;
     }
 
+    /** Helper function for {@link #isEqual}. */
+    private static boolean stringCompareNullEqualsEmpty(String s1, String s2) {
+        if (s1 == s2) {
+            return true;
+        }
+        if (s1 == null) {
+            s1 = "";
+        }
+        if (s2 == null) {
+            s2 = "";
+        }
+        return (s1.equals(s2));
+    }
+
     public boolean isEqual(AdnRecord adn) {
-        return ( alphaTag.equals(adn.getAlphaTag()) &&
-                number.equals(adn.getNumber()) &&
-                Arrays.equals(emails, adn.getEmails()));
+        return ( stringCompareNullEqualsEmpty(alphaTag, adn.alphaTag) &&
+                stringCompareNullEqualsEmpty(number, adn.number) &&
+                Arrays.equals(emails, adn.emails));
     }
     //***** Parcelable Implementation
 
@@ -184,36 +197,33 @@
      *
      * @param recordSize is the size X of EF record
      * @return hex byte[recordSize] to be written to EF record
-     *          return nulll for wrong format of dialing nubmer or tag
+     *          return null for wrong format of dialing number or tag
      */
     public byte[] buildAdnString(int recordSize) {
         byte[] bcdNumber;
         byte[] byteTag;
-        byte[] adnString = null;
+        byte[] adnString;
         int footerOffset = recordSize - FOOTER_SIZE_BYTES;
 
-        if (number == null || number.equals("") ||
-                alphaTag == null || alphaTag.equals("")) {
+        // create an empty record
+        adnString = new byte[recordSize];
+        for (int i = 0; i < recordSize; i++) {
+            adnString[i] = (byte) 0xFF;
+        }
 
-            Log.w(LOG_TAG, "[buildAdnString] Empty alpha tag or number");
-            adnString = new byte[recordSize];
-            for (int i = 0; i < recordSize; i++) {
-                adnString[i] = (byte) 0xFF;
-            }
+        if (TextUtils.isEmpty(number)) {
+            Log.w(LOG_TAG, "[buildAdnString] Empty dialing number");
+            return adnString;   // return the empty record (for delete)
         } else if (number.length()
-                > (ADN_DAILING_NUMBER_END - ADN_DAILING_NUMBER_START + 1) * 2) {
+                > (ADN_DIALING_NUMBER_END - ADN_DIALING_NUMBER_START + 1) * 2) {
             Log.w(LOG_TAG,
-                    "[buildAdnString] Max length of dailing number is 20");
-        } else if (alphaTag.length() > footerOffset) {
+                    "[buildAdnString] Max length of dialing number is 20");
+            return null;
+        } else if (alphaTag != null && alphaTag.length() > footerOffset) {
             Log.w(LOG_TAG,
                     "[buildAdnString] Max length of tag is " + footerOffset);
+            return null;
         } else {
-
-            adnString = new byte[recordSize];
-            for (int i = 0; i < recordSize; i++) {
-                adnString[i] = (byte) 0xFF;
-            }
-
             bcdNumber = PhoneNumberUtils.numberToCalledPartyBCD(number);
 
             System.arraycopy(bcdNumber, 0, adnString,
@@ -222,16 +232,17 @@
             adnString[footerOffset + ADN_BCD_NUMBER_LENGTH]
                     = (byte) (bcdNumber.length);
             adnString[footerOffset + ADN_CAPABILITY_ID]
-                    = (byte) 0xFF; // Capacility Id
+                    = (byte) 0xFF; // Capability Id
             adnString[footerOffset + ADN_EXTENSION_ID]
                     = (byte) 0xFF; // Extension Record Id
 
-            byteTag = GsmAlphabet.stringToGsm8BitPacked(alphaTag);
-            System.arraycopy(byteTag, 0, adnString, 0, byteTag.length);
+            if (!TextUtils.isEmpty(alphaTag)) {
+                byteTag = GsmAlphabet.stringToGsm8BitPacked(alphaTag);
+                System.arraycopy(byteTag, 0, adnString, 0, byteTag.length);
+            }
 
+            return adnString;
         }
-
-        return adnString;
     }
 
     /**
diff --git a/telephony/java/com/android/internal/telephony/AdnRecordLoader.java b/telephony/java/com/android/internal/telephony/AdnRecordLoader.java
index cfb5aaa..55bdc06 100644
--- a/telephony/java/com/android/internal/telephony/AdnRecordLoader.java
+++ b/telephony/java/com/android/internal/telephony/AdnRecordLoader.java
@@ -106,7 +106,7 @@
      * It will get the record size of EF record and compose hex adn array
      * then write the hex array to EF record
      *
-     * @param adn is set with alphaTag and phoneNubmer
+     * @param adn is set with alphaTag and phone number
      * @param ef EF fileid
      * @param extensionEF extension EF fileid
      * @param recordNumber 1-based record index
@@ -159,7 +159,7 @@
                     data = adn.buildAdnString(recordSize[0]);
 
                     if(data == null) {
-                        throw new RuntimeException("worong ADN format",
+                        throw new RuntimeException("wrong ADN format",
                                 ar.exception);
                     }
 
@@ -218,7 +218,7 @@
                         throw new RuntimeException("load failed", ar.exception);
                     }
 
-                    Log.d(LOG_TAG,"ADN extention EF: 0x"
+                    Log.d(LOG_TAG,"ADN extension EF: 0x"
                         + Integer.toHexString(extensionEF)
                         + ":" + adn.extRecord
                         + "\n" + IccUtils.bytesToHexString(data));
diff --git a/telephony/java/com/android/internal/telephony/CallerInfoAsyncQuery.java b/telephony/java/com/android/internal/telephony/CallerInfoAsyncQuery.java
index 802e79b..798a5a5 100644
--- a/telephony/java/com/android/internal/telephony/CallerInfoAsyncQuery.java
+++ b/telephony/java/com/android/internal/telephony/CallerInfoAsyncQuery.java
@@ -284,7 +284,7 @@
      */
     public static CallerInfoAsyncQuery startQuery(int token, Context context, String number,
             OnQueryCompleteListener listener, Object cookie) {
-        //contruct the URI object and start Query.
+        //construct the URI object and start Query.
         Uri contactRef = Uri.withAppendedPath(PhoneLookup.CONTENT_FILTER_URI, Uri.encode(number));
 
         CallerInfoAsyncQuery c = new CallerInfoAsyncQuery();
diff --git a/telephony/java/com/android/internal/telephony/CommandException.java b/telephony/java/com/android/internal/telephony/CommandException.java
index eb0a440..94c544e 100644
--- a/telephony/java/com/android/internal/telephony/CommandException.java
+++ b/telephony/java/com/android/internal/telephony/CommandException.java
@@ -37,6 +37,10 @@
         OP_NOT_ALLOWED_DURING_VOICE_CALL,
         OP_NOT_ALLOWED_BEFORE_REG_NW,
         SMS_FAIL_RETRY,
+        SIM_ABSENT,
+        SUBSCRIPTION_NOT_AVAILABLE,
+        MODE_NOT_SUPPORTED,
+        FDN_CHECK_FAILURE,
         ILLEGAL_SIM_OR_ME,
     }
 
@@ -69,6 +73,14 @@
                 return new CommandException(Error.OP_NOT_ALLOWED_BEFORE_REG_NW);
             case RILConstants.SMS_SEND_FAIL_RETRY:
                 return new CommandException(Error.SMS_FAIL_RETRY);
+            case RILConstants.SIM_ABSENT:
+                return new CommandException(Error.SIM_ABSENT);
+            case RILConstants.SUBSCRIPTION_NOT_AVAILABLE:
+                return new CommandException(Error.SUBSCRIPTION_NOT_AVAILABLE);
+            case RILConstants.MODE_NOT_SUPPORTED:
+                return new CommandException(Error.MODE_NOT_SUPPORTED);
+            case RILConstants.FDN_CHECK_FAILURE:
+                return new CommandException(Error.FDN_CHECK_FAILURE);
             case RILConstants.ILLEGAL_SIM_OR_ME:
                 return new CommandException(Error.ILLEGAL_SIM_OR_ME);
             default:
diff --git a/telephony/java/com/android/internal/telephony/CommandsInterface.java b/telephony/java/com/android/internal/telephony/CommandsInterface.java
index d90c305..8e03c5a 100644
--- a/telephony/java/com/android/internal/telephony/CommandsInterface.java
+++ b/telephony/java/com/android/internal/telephony/CommandsInterface.java
@@ -664,6 +664,19 @@
      *  retMsg.obj = AsyncResult ar
      *  ar.exception carries exception on failure
      *  ar.userObject contains the orignal value of result.obj
+     *  ar.result is null on success and failure
+     *
+     * CLIR_DEFAULT     == on "use subscription default value"
+     * CLIR_SUPPRESSION == on "CLIR suppression" (allow CLI presentation)
+     * CLIR_INVOCATION  == on "CLIR invocation" (restrict CLI presentation)
+     */
+    void dial(String address, int clirMode, UUSInfo uusInfo, Message result);
+
+    /**
+     *  returned message
+     *  retMsg.obj = AsyncResult ar
+     *  ar.exception carries exception on failure
+     *  ar.userObject contains the orignal value of result.obj
      *  ar.result is String containing IMSI on success
      */
     void getIMSI(Message result);
diff --git a/telephony/java/com/android/internal/telephony/Connection.java b/telephony/java/com/android/internal/telephony/Connection.java
index 37e8a99..11d0b1b 100644
--- a/telephony/java/com/android/internal/telephony/Connection.java
+++ b/telephony/java/com/android/internal/telephony/Connection.java
@@ -45,17 +45,18 @@
         POWER_OFF,                      /* radio is turned off explicitly */
         OUT_OF_SERVICE,                 /* out of service */
         ICC_ERROR,                      /* No ICC, ICC locked, or other ICC error */
-        CALL_BARRED,                    /* call was blocked by call barrring */
+        CALL_BARRED,                    /* call was blocked by call barring */
         FDN_BLOCKED,                    /* call was blocked by fixed dial number */
         CS_RESTRICTED,                  /* call was blocked by restricted all voice access */
         CS_RESTRICTED_NORMAL,           /* call was blocked by restricted normal voice access */
         CS_RESTRICTED_EMERGENCY,        /* call was blocked by restricted emergency voice access */
+        UNOBTAINABLE_NUMBER,            /* Unassigned number (3GPP TS 24.008 table 10.5.123) */
         CDMA_LOCKED_UNTIL_POWER_CYCLE,  /* MS is locked until next power cycle */
         CDMA_DROP,
         CDMA_INTERCEPT,                 /* INTERCEPT order received, MS state idle entered */
         CDMA_REORDER,                   /* MS has been redirected, call is cancelled */
         CDMA_SO_REJECT,                 /* service option rejection */
-        CDMA_RETRY_ORDER,               /* requeseted service is rejected, retry delay is set */
+        CDMA_RETRY_ORDER,               /* requested service is rejected, retry delay is set */
         CDMA_ACCESS_FAILURE,
         CDMA_PREEMPTED,
         CDMA_NOT_EMERGENCY,              /* not an emergency call */
@@ -68,8 +69,8 @@
     /* Instance Methods */
 
     /**
-     * Gets address (e.g., phone number) associated with connection
-     * TODO: distinguish reasons for unavailablity
+     * Gets address (e.g. phone number) associated with connection.
+     * TODO: distinguish reasons for unavailability
      *
      * @return address or null if unavailable
      */
@@ -77,7 +78,7 @@
     public abstract String getAddress();
 
     /**
-     * Gets cdma CNAP name  associated with connection
+     * Gets CDMA CNAP name associated with connection.
      * @return cnap name or null if unavailable
      */
     public String getCnapName() {
@@ -85,15 +86,15 @@
     }
 
     /**
-     * Get orignal dial string
-     * @return orignal dial string or null if unavailable
+     * Get original dial string.
+     * @return original dial string or null if unavailable
      */
     public String getOrigDialString(){
         return null;
     }
 
     /**
-     * Gets cdma CNAP presentation associated with connection
+     * Gets CDMA CNAP presentation associated with connection.
      * @return cnap name or null if unavailable
      */
 
@@ -115,45 +116,45 @@
     public abstract long getCreateTime();
 
     /**
-     * Connection connect time in currentTimeMillis() format
-     * For outgoing calls: Begins at (DIALING|ALERTING) -> ACTIVE transition
-     * For incoming calls: Begins at (INCOMING|WAITING) -> ACTIVE transition
-     * Returns 0 before then
+     * Connection connect time in currentTimeMillis() format.
+     * For outgoing calls: Begins at (DIALING|ALERTING) -> ACTIVE transition.
+     * For incoming calls: Begins at (INCOMING|WAITING) -> ACTIVE transition.
+     * Returns 0 before then.
      */
     public abstract long getConnectTime();
 
     /**
-     * Disconnect time in currentTimeMillis() format
-     * The time when this Connection makes a transition into ENDED or FAIL
-     * Returns 0 before then
+     * Disconnect time in currentTimeMillis() format.
+     * The time when this Connection makes a transition into ENDED or FAIL.
+     * Returns 0 before then.
      */
     public abstract long getDisconnectTime();
 
     /**
-     * returns the number of milliseconds the call has been connected,
+     * Returns the number of milliseconds the call has been connected,
      * or 0 if the call has never connected.
      * If the call is still connected, then returns the elapsed
-     * time since connect
+     * time since connect.
      */
     public abstract long getDurationMillis();
 
     /**
      * If this connection is HOLDING, return the number of milliseconds
-     * that it has been on hold for (approximently)
-     * If this connection is in any other state, return 0
+     * that it has been on hold for (approximately).
+     * If this connection is in any other state, return 0.
      */
 
     public abstract long getHoldDurationMillis();
 
     /**
-     * Returns "NOT_DISCONNECTED" if not yet disconnected
+     * Returns "NOT_DISCONNECTED" if not yet disconnected.
      */
     public abstract DisconnectCause getDisconnectCause();
 
     /**
      * Returns true of this connection originated elsewhere
      * ("MT" or mobile terminated; another party called this terminal)
-     * or false if this call originated here (MO or mobile originated)
+     * or false if this call originated here (MO or mobile originated).
      */
     public abstract boolean isIncoming();
 
@@ -273,6 +274,13 @@
     public abstract int getNumberPresentation();
 
     /**
+     * Returns the User to User Signaling (UUS) information associated with
+     * incoming and waiting calls
+     * @return UUSInfo containing the UUS userdata.
+     */
+    public abstract UUSInfo getUUSInfo();
+
+    /**
      * Build a human representation of a connection instance, suitable for debugging.
      * Don't log personal stuff unless in debug mode.
      * @return a string representing the internal state of this connection.
diff --git a/telephony/java/com/android/internal/telephony/DataConnection.java b/telephony/java/com/android/internal/telephony/DataConnection.java
index 1f8bbcf..6634017 100644
--- a/telephony/java/com/android/internal/telephony/DataConnection.java
+++ b/telephony/java/com/android/internal/telephony/DataConnection.java
@@ -164,7 +164,7 @@
         NONE,
         OPERATOR_BARRED,
         INSUFFICIENT_RESOURCES,
-        MISSING_UKNOWN_APN,
+        MISSING_UNKNOWN_APN,
         UNKNOWN_PDP_ADDRESS,
         USER_AUTHENTICATION,
         ACTIVATION_REJECT_GGSN,
@@ -181,7 +181,7 @@
         RADIO_NOT_AVAILABLE;
 
         public boolean isPermanentFail() {
-            return (this == OPERATOR_BARRED) || (this == MISSING_UKNOWN_APN) ||
+            return (this == OPERATOR_BARRED) || (this == MISSING_UNKNOWN_APN) ||
                    (this == UNKNOWN_PDP_ADDRESS) || (this == USER_AUTHENTICATION) ||
                    (this == ACTIVATION_REJECT_GGSN) || (this == ACTIVATION_REJECT_UNSPECIFIED) ||
                    (this == SERVICE_OPTION_NOT_SUPPORTED) ||
@@ -208,12 +208,12 @@
                 return "Operator Barred";
             case INSUFFICIENT_RESOURCES:
                 return "Insufficient Resources";
-            case MISSING_UKNOWN_APN:
+            case MISSING_UNKNOWN_APN:
                 return "Missing / Unknown APN";
             case UNKNOWN_PDP_ADDRESS:
                 return "Unknown PDP Address";
             case USER_AUTHENTICATION:
-                return "Error User Autentication";
+                return "Error User Authentication";
             case ACTIVATION_REJECT_GGSN:
                 return "Activation Reject GGSN";
             case ACTIVATION_REJECT_UNSPECIFIED:
diff --git a/telephony/java/com/android/internal/telephony/DriverCall.java b/telephony/java/com/android/internal/telephony/DriverCall.java
index 66f6b9c..663c284 100644
--- a/telephony/java/com/android/internal/telephony/DriverCall.java
+++ b/telephony/java/com/android/internal/telephony/DriverCall.java
@@ -49,6 +49,7 @@
     public int numberPresentation;
     public String name;
     public int namePresentation;
+    public UUSInfo uusInfo;
 
     /** returns null on error */
     static DriverCall
diff --git a/telephony/java/com/android/internal/telephony/IccProvider.java b/telephony/java/com/android/internal/telephony/IccProvider.java
index fa91457..3471ec2 100644
--- a/telephony/java/com/android/internal/telephony/IccProvider.java
+++ b/telephony/java/com/android/internal/telephony/IccProvider.java
@@ -417,11 +417,11 @@
             }
         }
 
-        if (TextUtils.isEmpty(tag)) {
+        if (TextUtils.isEmpty(number)) {
             return 0;
         }
 
-        if (efType == FDN && TextUtils.isEmpty(pin2)) {
+        if (efType == IccConstants.EF_FDN && TextUtils.isEmpty(pin2)) {
             return 0;
         }
 
diff --git a/telephony/java/com/android/internal/telephony/Phone.java b/telephony/java/com/android/internal/telephony/Phone.java
index 7179bef..23325f6 100644
--- a/telephony/java/com/android/internal/telephony/Phone.java
+++ b/telephony/java/com/android/internal/telephony/Phone.java
@@ -243,15 +243,14 @@
     /**
      * Get the current DataState. No change notification exists at this
      * interface -- use
-     * {@link com.android.telephony.PhoneStateListener PhoneStateListener}
-     * instead.
+     * {@link android.telephony.PhoneStateListener} instead.
      */
     DataState getDataConnectionState();
 
     /**
      * Get the current DataActivityState. No change notification exists at this
      * interface -- use
-     * {@link TelephonyManager} instead.
+     * {@link android.telephony.TelephonyManager} instead.
      */
     DataActivityState getDataActivityState();
 
@@ -789,6 +788,19 @@
     Connection dial(String dialString) throws CallStateException;
 
     /**
+     * Initiate a new voice connection with supplementary User to User
+     * Information. This happens asynchronously, so you cannot assume the audio
+     * path is connected (or a call index has been assigned) until
+     * PhoneStateChanged notification has occurred.
+     *
+     * @exception CallStateException if a new outgoing call is not currently
+     *                possible because no more call slots exist or a call exists
+     *                that is dialing, alerting, ringing, or waiting. Other
+     *                errors are handled asynchronously.
+     */
+    Connection dial(String dialString, UUSInfo uusInfo) throws CallStateException;
+
+    /**
      * Handles PIN MMI commands (PIN/PIN2/PUK/PUK2), which are initiated
      * without SEND (so <code>dial</code> is not appropriate).
      *
@@ -840,7 +852,7 @@
      * @param dtmfString is string representing the dialing digit(s) in the active call
      * @param on the DTMF ON length in milliseconds, or 0 for default
      * @param off the DTMF OFF length in milliseconds, or 0 for default
-     * @param onCompelte is the callback message when the action is processed by BP
+     * @param onComplete is the callback message when the action is processed by BP
      *
      */
     void sendBurstDtmf(String dtmfString, int on, int off, Message onComplete);
@@ -980,7 +992,7 @@
      * ((AsyncResult)onComplete.obj) is an array of int, with a length of 2.
      *
      * @param onComplete a callback message when the action is completed.
-     *        @see com.android.internal.telephony.CommandsInterface.getCLIR for details.
+     *        @see com.android.internal.telephony.CommandsInterface#getCLIR for details.
      */
     void getOutgoingCallerIdDisplay(Message onComplete);
 
@@ -1002,7 +1014,7 @@
      * ((AsyncResult)onComplete.obj) is an array of int, with a length of 1.
      *
      * @param onComplete a callback message when the action is completed.
-     *        @see com.android.internal.telephony.CommandsInterface.queryCallWaiting for details.
+     *        @see com.android.internal.telephony.CommandsInterface#queryCallWaiting for details.
      */
     void getCallWaiting(Message onComplete);
 
@@ -1445,7 +1457,7 @@
      * setTTYMode
      * sets a TTY mode option.
      *
-     * @param enable is a boolean representing the state that you are
+     * @param ttyMode is a boolean representing the state that you are
      *        requesting, true for enabled, false for disabled.
      * @param onComplete a callback message when the action is completed
      */
diff --git a/telephony/java/com/android/internal/telephony/PhoneBase.java b/telephony/java/com/android/internal/telephony/PhoneBase.java
index a8f4143..74601e6 100644
--- a/telephony/java/com/android/internal/telephony/PhoneBase.java
+++ b/telephony/java/com/android/internal/telephony/PhoneBase.java
@@ -543,7 +543,7 @@
     private void setPropertiesByCarrier() {
         String carrier = SystemProperties.get("ro.carrier");
 
-        if (null == carrier || 0 == carrier.length()) {
+        if (null == carrier || 0 == carrier.length() || "unknown".equals(carrier)) {
             return;
         }
 
diff --git a/telephony/java/com/android/internal/telephony/PhoneFactory.java b/telephony/java/com/android/internal/telephony/PhoneFactory.java
index cd72752..803b736 100644
--- a/telephony/java/com/android/internal/telephony/PhoneFactory.java
+++ b/telephony/java/com/android/internal/telephony/PhoneFactory.java
@@ -109,13 +109,13 @@
 
                 int phoneType = getPhoneType(networkMode);
                 if (phoneType == Phone.PHONE_TYPE_GSM) {
+                    Log.i(LOG_TAG, "Creating GSMPhone");
                     sProxyPhone = new PhoneProxy(new GSMPhone(context,
                             sCommandsInterface, sPhoneNotifier));
-                    Log.i(LOG_TAG, "Creating GSMPhone");
                 } else if (phoneType == Phone.PHONE_TYPE_CDMA) {
+                    Log.i(LOG_TAG, "Creating CDMAPhone");
                     sProxyPhone = new PhoneProxy(new CDMAPhone(context,
                             sCommandsInterface, sPhoneNotifier));
-                    Log.i(LOG_TAG, "Creating CDMAPhone");
                 }
 
                 sMadeDefaults = true;
diff --git a/telephony/java/com/android/internal/telephony/PhoneProxy.java b/telephony/java/com/android/internal/telephony/PhoneProxy.java
index 6d3798e..e1511e6 100644
--- a/telephony/java/com/android/internal/telephony/PhoneProxy.java
+++ b/telephony/java/com/android/internal/telephony/PhoneProxy.java
@@ -423,6 +423,10 @@
         return mActivePhone.dial(dialString);
     }
 
+    public Connection dial(String dialString, UUSInfo uusInfo) throws CallStateException {
+        return mActivePhone.dial(dialString, uusInfo);
+    }
+
     public boolean handlePinMmi(String dialString) {
         return mActivePhone.handlePinMmi(dialString);
     }
diff --git a/telephony/java/com/android/internal/telephony/PhoneSubInfo.java b/telephony/java/com/android/internal/telephony/PhoneSubInfo.java
index 1ac2da3..4f71bb1 100644
--- a/telephony/java/com/android/internal/telephony/PhoneSubInfo.java
+++ b/telephony/java/com/android/internal/telephony/PhoneSubInfo.java
@@ -65,7 +65,7 @@
     }
 
     /**
-     * Retrieves the unique sbuscriber ID, e.g., IMSI for GSM phones.
+     * Retrieves the unique subscriber ID, e.g., IMSI for GSM phones.
      */
     public String getSubscriberId() {
         mContext.enforceCallingOrSelfPermission(READ_PHONE_STATE, "Requires READ_PHONE_STATE");
diff --git a/telephony/java/com/android/internal/telephony/PhoneSubInfoProxy.java b/telephony/java/com/android/internal/telephony/PhoneSubInfoProxy.java
index adfbe20..202ded2 100644
--- a/telephony/java/com/android/internal/telephony/PhoneSubInfoProxy.java
+++ b/telephony/java/com/android/internal/telephony/PhoneSubInfoProxy.java
@@ -47,7 +47,7 @@
     }
 
     /**
-     * Retrieves the unique sbuscriber ID, e.g., IMSI for GSM phones.
+     * Retrieves the unique subscriber ID, e.g., IMSI for GSM phones.
      */
     public String getSubscriberId() {
         return mPhoneSubInfo.getSubscriberId();
diff --git a/telephony/java/com/android/internal/telephony/RIL.java b/telephony/java/com/android/internal/telephony/RIL.java
index d8e313a7..3d410fd 100644
--- a/telephony/java/com/android/internal/telephony/RIL.java
+++ b/telephony/java/com/android/internal/telephony/RIL.java
@@ -796,12 +796,26 @@
 
     public void
     dial (String address, int clirMode, Message result) {
+        dial(address, clirMode, null, result);
+    }
+
+    public void
+    dial(String address, int clirMode, UUSInfo uusInfo, Message result) {
         RILRequest rr = RILRequest.obtain(RIL_REQUEST_DIAL, result);
 
         rr.mp.writeString(address);
         rr.mp.writeInt(clirMode);
         rr.mp.writeInt(0); // UUS information is absent
 
+        if (uusInfo == null) {
+            rr.mp.writeInt(0); // UUS information is absent
+        } else {
+            rr.mp.writeInt(1); // UUS information is present
+            rr.mp.writeInt(uusInfo.getType());
+            rr.mp.writeInt(uusInfo.getDcs());
+            rr.mp.writeByteArray(uusInfo.getUserData());
+        }
+
         if (RILJ_LOGD) riljLog(rr.serialString() + "> " + requestToString(rr.mRequest));
 
         send(rr);
@@ -2837,10 +2851,21 @@
             dc.namePresentation = p.readInt();
             int uusInfoPresent = p.readInt();
             if (uusInfoPresent == 1) {
-                // TODO: Copy the data to dc to forward to the apps.
-                p.readInt();
-                p.readInt();
-                p.createByteArray();
+                dc.uusInfo = new UUSInfo();
+                dc.uusInfo.setType(p.readInt());
+                dc.uusInfo.setDcs(p.readInt());
+                byte[] userData = p.createByteArray();
+                dc.uusInfo.setUserData(userData);
+                Log
+                        .v(LOG_TAG, String.format("Incoming UUS : type=%d, dcs=%d, length=%d",
+                                dc.uusInfo.getType(), dc.uusInfo.getDcs(),
+                                dc.uusInfo.getUserData().length));
+                Log.v(LOG_TAG, "Incoming UUS : data (string)="
+                        + new String(dc.uusInfo.getUserData()));
+                Log.v(LOG_TAG, "Incoming UUS : data (hex): "
+                        + IccUtils.bytesToHexString(dc.uusInfo.getUserData()));
+            } else {
+                Log.v(LOG_TAG, "Incoming UUS : NOT present!");
             }
 
             // Make sure there's a leading + on addresses with a TOA of 145
diff --git a/telephony/java/com/android/internal/telephony/RILConstants.java b/telephony/java/com/android/internal/telephony/RILConstants.java
index 01f4ab2..71a80e0 100644
--- a/telephony/java/com/android/internal/telephony/RILConstants.java
+++ b/telephony/java/com/android/internal/telephony/RILConstants.java
@@ -45,6 +45,11 @@
     int OP_NOT_ALLOWED_BEFORE_REG_NW = 9;     /* request is not allowed before device registers to
                                                  network */
     int SMS_SEND_FAIL_RETRY = 10;             /* send sms fail and need retry */
+    int SIM_ABSENT = 11;                      /* ICC card is absent */
+    int SUBSCRIPTION_NOT_AVAILABLE = 12;      /* fail to find CDMA subscription from specified
+                                                 location */
+    int MODE_NOT_SUPPORTED = 13;              /* HW does not support preferred network type */
+    int FDN_CHECK_FAILURE = 14;               /* send operation barred error when FDN is enabled */
     int ILLEGAL_SIM_OR_ME = 15;               /* network selection failure due
                                                  to wrong SIM/ME and no
                                                  retries needed */
diff --git a/telephony/java/com/android/internal/telephony/RetryManager.java b/telephony/java/com/android/internal/telephony/RetryManager.java
index 779f358..b1049a2 100644
--- a/telephony/java/com/android/internal/telephony/RetryManager.java
+++ b/telephony/java/com/android/internal/telephony/RetryManager.java
@@ -25,7 +25,7 @@
 
 /**
  * Retry manager allows a simple way to declare a series of
- * retires timeouts. After creating a RetryManager the configure
+ * retry timeouts. After creating a RetryManager the configure
  * method is used to define the sequence. A simple linear series
  * may be initialized using configure with three integer parameters
  * The other configure method allows a series to be declared using
@@ -54,18 +54,18 @@
  *<p>
  * Examples:
  * <ul>
- * <li>3 retires with no randomization value which means its 0:
+ * <li>3 retries with no randomization value which means its 0:
  * <ul><li><code>"1000, 2000, 3000"</code></ul>
  *
- * <li>10 retires with a 500 default randomization value for each and
+ * <li>10 retries with a 500 default randomization value for each and
  * the 4..10 retries all using 3000 as the delay:
  * <ul><li><code>"max_retries=10, default_randomization=500, 1000, 2000, 3000"</code></ul>
  *
- * <li>4 retires with a 100 as the default randomization value for the first 2 values and
+ * <li>4 retries with a 100 as the default randomization value for the first 2 values and
  * the other two having specified values of 500:
  * <ul><li><code>"default_randomization=100, 1000, 2000, 4000:500, 5000:500"</code></ul>
  *
- * <li>Infinite number of retires with the first one at 1000, the second at 2000 all
+ * <li>Infinite number of retries with the first one at 1000, the second at 2000 all
  * others will be at 3000.
  * <ul><li><code>"max_retries=infinite,1000,2000,3000</code></ul>
  * </ul>
@@ -75,9 +75,6 @@
 public class RetryManager {
     static public final String LOG_TAG = "RetryManager";
     static public final boolean DBG = false;
-    static public final int RETRYIES_NOT_STARTED = 0;
-    static public final int RETRYIES_ON_GOING = 1;
-    static public final int RETRYIES_COMPLETED = 2;
 
     /**
      * Retry record with times in milli-seconds
@@ -104,7 +101,7 @@
      */
     private int mMaxRetryCount;
 
-    /** The current number of retires */
+    /** The current number of retries */
     private int mRetryCount;
 
     /** Random number generator */
@@ -125,7 +122,7 @@
      * @param randomizationTime a random value between 0 and
      *        randomizationTime will be added to retryTime. this
      *        parameter may be 0.
-     * @return true if successfull
+     * @return true if successful
      */
     public boolean configure(int maxRetryCount, int retryTime, int randomizationTime) {
         Pair<Boolean, Integer> value;
@@ -242,7 +239,7 @@
     /**
      * Report whether data reconnection should be retried
      *
-     * @return {@code true} if the max retires has not been reached. {@code
+     * @return {@code true} if the max retries has not been reached. {@code
      *         false} otherwise.
      */
     public boolean isRetryNeeded() {
@@ -289,7 +286,7 @@
         if (mRetryCount > mMaxRetryCount) {
             mRetryCount = mMaxRetryCount;
         }
-        if (DBG) log("increseRetryCount: " + mRetryCount);
+        if (DBG) log("increaseRetryCount: " + mRetryCount);
     }
 
     /**
diff --git a/telephony/java/com/android/internal/telephony/SMSDispatcher.java b/telephony/java/com/android/internal/telephony/SMSDispatcher.java
index 764d12e..ca526a5 100644
--- a/telephony/java/com/android/internal/telephony/SMSDispatcher.java
+++ b/telephony/java/com/android/internal/telephony/SMSDispatcher.java
@@ -62,6 +62,7 @@
 import static android.telephony.SmsManager.RESULT_ERROR_NULL_PDU;
 import static android.telephony.SmsManager.RESULT_ERROR_RADIO_OFF;
 import static android.telephony.SmsManager.RESULT_ERROR_LIMIT_EXCEEDED;
+import static android.telephony.SmsManager.RESULT_ERROR_FDN_CHECK_FAILURE;
 
 
 public abstract class SMSDispatcher extends Handler {
@@ -499,13 +500,20 @@
                 Message retryMsg = obtainMessage(EVENT_SEND_RETRY, tracker);
                 sendMessageDelayed(retryMsg, SEND_RETRY_DELAY);
             } else if (tracker.mSentIntent != null) {
+                int error = RESULT_ERROR_GENERIC_FAILURE;
+
+                if (((CommandException)(ar.exception)).getCommandError()
+                        == CommandException.Error.FDN_CHECK_FAILURE) {
+                    error = RESULT_ERROR_FDN_CHECK_FAILURE;
+                }
                 // Done retrying; return an error to the app.
                 try {
                     Intent fillIn = new Intent();
                     if (ar.result != null) {
                         fillIn.putExtra("errorCode", ((SmsResponse)ar.result).errorCode);
                     }
-                    tracker.mSentIntent.send(mContext, RESULT_ERROR_GENERIC_FAILURE, fillIn);
+                    tracker.mSentIntent.send(mContext, error, fillIn);
+
                 } catch (CanceledException ex) {}
             }
         }
diff --git a/telephony/java/com/android/internal/telephony/ServiceStateTracker.java b/telephony/java/com/android/internal/telephony/ServiceStateTracker.java
index 7383649..e8bbe5e 100644
--- a/telephony/java/com/android/internal/telephony/ServiceStateTracker.java
+++ b/telephony/java/com/android/internal/telephony/ServiceStateTracker.java
@@ -44,6 +44,7 @@
     protected static final int DATA_ACCESS_HSDPA = 9;
     protected static final int DATA_ACCESS_HSUPA = 10;
     protected static final int DATA_ACCESS_HSPA = 11;
+    protected static final int DATA_ACCESS_CDMA_EvDo_B = 12;
 
     protected CommandsInterface cm;
 
@@ -206,8 +207,8 @@
     }
 
     /**
-     * Reregister network through toggle perferred network type
-     * This is a work aorund to deregister and register network since there is
+     * Re-register network by toggling preferred network type.
+     * This is a work-around to deregister and register network since there is
      * no ril api to set COPS=2 (deregister) only.
      *
      * @param onComplete is dispatched when this is complete.  it will be
@@ -229,7 +230,7 @@
     /**
      * These two flags manage the behavior of the cell lock -- the
      * lock should be held if either flag is true.  The intention is
-     * to allow temporary aquisition of the lock to get a single
+     * to allow temporary acquisition of the lock to get a single
      * update.  Such a lock grab and release can thus be made to not
      * interfere with more permanent lock holds -- in other words, the
      * lock will only be released if both flags are false, and so
diff --git a/telephony/java/com/android/internal/telephony/UUSInfo.java b/telephony/java/com/android/internal/telephony/UUSInfo.java
new file mode 100644
index 0000000..801b845
--- /dev/null
+++ b/telephony/java/com/android/internal/telephony/UUSInfo.java
@@ -0,0 +1,100 @@
+/*
+ * Copyright (C) 2010 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.android.internal.telephony;
+
+public class UUSInfo {
+
+    /*
+     * User-to-User signaling Info activation types derived from 3GPP 23.087
+     * v8.0
+     */
+
+    public static final int UUS_TYPE1_IMPLICIT = 0;
+
+    public static final int UUS_TYPE1_REQUIRED = 1;
+
+    public static final int UUS_TYPE1_NOT_REQUIRED = 2;
+
+    public static final int UUS_TYPE2_REQUIRED = 3;
+
+    public static final int UUS_TYPE2_NOT_REQUIRED = 4;
+
+    public static final int UUS_TYPE3_REQUIRED = 5;
+
+    public static final int UUS_TYPE3_NOT_REQUIRED = 6;
+
+    /*
+     * User-to-User Signaling Information data coding schemes. Possible values
+     * for Octet 3 (Protocol Discriminator field) in the UUIE. The values have
+     * been specified in section 10.5.4.25 of 3GPP TS 24.008
+     */
+
+    public static final int UUS_DCS_USP = 0; /* User specified protocol */
+
+    public static final int UUS_DCS_OSIHLP = 1; /* OSI higher layer protocol */
+
+    public static final int UUS_DCS_X244 = 2; /* X.244 */
+
+    public static final int UUS_DCS_RMCF = 3; /*
+                                               * Reserved for system management
+                                               * convergence function
+                                               */
+
+    public static final int UUS_DCS_IA5c = 4; /* IA5 characters */
+
+    private int uusType;
+
+    private int uusDcs;
+
+    private byte[] uusData;
+
+    public UUSInfo() {
+        this.uusType = UUS_TYPE1_IMPLICIT;
+        this.uusDcs = UUS_DCS_IA5c;
+        this.uusData = null;
+    }
+
+    public UUSInfo(int uusType, int uusDcs, byte[] uusData) {
+        this.uusType = uusType;
+        this.uusDcs = uusDcs;
+        this.uusData = uusData;
+    }
+
+    public int getDcs() {
+        return uusDcs;
+    }
+
+    public void setDcs(int uusDcs) {
+        this.uusDcs = uusDcs;
+    }
+
+    public int getType() {
+        return uusType;
+    }
+
+    public void setType(int uusType) {
+        this.uusType = uusType;
+    }
+
+    public byte[] getUserData() {
+        return uusData;
+    }
+
+    public void setUserData(byte[] uusData) {
+        this.uusData = uusData;
+    }
+}
diff --git a/telephony/java/com/android/internal/telephony/cdma/CDMAPhone.java b/telephony/java/com/android/internal/telephony/cdma/CDMAPhone.java
index 1f5accf..0c591e4 100755
--- a/telephony/java/com/android/internal/telephony/cdma/CDMAPhone.java
+++ b/telephony/java/com/android/internal/telephony/cdma/CDMAPhone.java
@@ -62,11 +62,13 @@
 import com.android.internal.telephony.PhoneSubInfo;
 import com.android.internal.telephony.TelephonyIntents;
 import com.android.internal.telephony.TelephonyProperties;
+import com.android.internal.telephony.UUSInfo;
 
 import static com.android.internal.telephony.TelephonyProperties.PROPERTY_ICC_OPERATOR_ALPHA;
 import static com.android.internal.telephony.TelephonyProperties.PROPERTY_ICC_OPERATOR_NUMERIC;
 import static com.android.internal.telephony.TelephonyProperties.PROPERTY_ICC_OPERATOR_ISO_COUNTRY;
 
+import java.util.ArrayList;
 import java.util.List;
 
 
@@ -101,6 +103,7 @@
     RuimFileHandler mRuimFileHandler;
     RuimRecords mRuimRecords;
     RuimCard mRuimCard;
+    ArrayList <CdmaMmiCode> mPendingMmis = new ArrayList<CdmaMmiCode>();
     RuimPhoneBookInterfaceManager mRuimPhoneBookInterfaceManager;
     RuimSmsInterfaceManager mRuimSmsInterfaceManager;
     PhoneSubInfo mSubInfo;
@@ -219,6 +222,8 @@
             mSST.unregisterForNetworkAttach(this); //EVENT_REGISTERED_TO_NETWORK
             mCM.unSetOnSuppServiceNotification(this);
 
+            mPendingMmis.clear();
+
             //Force all referenced classes to unregister their former registered events
             mCT.dispose();
             mDataConnection.dispose();
@@ -344,6 +349,10 @@
         return mCT.dial(newDialString);
     }
 
+    public Connection dial(String dialString, UUSInfo uusInfo) throws CallStateException {
+        throw new CallStateException("Sending UUS information NOT supported in CDMA!");
+    }
+
     public SignalStrength getSignalStrength() {
         return mSST.mSignalStrength;
     }
@@ -355,8 +364,7 @@
 
     public List<? extends MmiCode>
     getPendingMmiCodes() {
-        Log.e(LOG_TAG, "method getPendingMmiCodes is NOT supported in CDMA!");
-        return null;
+        return mPendingMmis;
     }
 
     public void registerForSuppServiceNotification(
@@ -373,6 +381,15 @@
         return false;
     }
 
+    boolean isInCall() {
+        CdmaCall.State foregroundCallState = getForegroundCall().getState();
+        CdmaCall.State backgroundCallState = getBackgroundCall().getState();
+        CdmaCall.State ringingCallState = getRingingCall().getState();
+
+        return (foregroundCallState.isAlive() || backgroundCallState.isAlive() || ringingCallState
+                .isAlive());
+    }
+
     public void
     setNetworkSelectionModeAutomatic(Message response) {
         Log.e(LOG_TAG, "method setNetworkSelectionModeAutomatic is NOT supported in CDMA!");
@@ -472,7 +489,18 @@
     }
 
     public boolean handlePinMmi(String dialString) {
-        Log.e(LOG_TAG, "method handlePinMmi is NOT supported in CDMA!");
+        CdmaMmiCode mmi = CdmaMmiCode.newFromDialString(dialString, this);
+
+        if (mmi == null) {
+            Log.e(LOG_TAG, "Mmi is NULL!");
+            return false;
+        } else if (mmi.isPukCommand()) {
+            mPendingMmis.add(mmi);
+            mMmiRegistrants.notifyRegistrants(new AsyncResult(null, mmi, null));
+            mmi.processCode();
+            return true;
+        }
+        Log.e(LOG_TAG, "Unrecognized mmi!");
         return false;
     }
 
@@ -484,6 +512,22 @@
                 (mDataConnection.getDataOnRoamingEnabled() || !getServiceState().getRoaming());
     }
 
+    /**
+     * Removes the given MMI from the pending list and notifies registrants that
+     * it is complete.
+     *
+     * @param mmi MMI that is done
+     */
+    void onMMIDone(CdmaMmiCode mmi) {
+        /*
+         * Only notify complete if it's on the pending list. Otherwise, it's
+         * already been handled (eg, previously canceled).
+         */
+        if (mPendingMmis.remove(mmi)) {
+            mMmiCompleteRegistrants.notifyRegistrants(new AsyncResult(null, mmi, null));
+        }
+    }
+
     public void setLine1Number(String alphaTag, String number, Message onComplete) {
         Log.e(LOG_TAG, "setLine1Number: not possible in CDMA");
     }
@@ -1405,5 +1449,4 @@
         }
         return false;
     }
-
 }
diff --git a/telephony/java/com/android/internal/telephony/cdma/CdmaCallTracker.java b/telephony/java/com/android/internal/telephony/cdma/CdmaCallTracker.java
index 1005d20..3669e60 100644
--- a/telephony/java/com/android/internal/telephony/cdma/CdmaCallTracker.java
+++ b/telephony/java/com/android/internal/telephony/cdma/CdmaCallTracker.java
@@ -61,7 +61,7 @@
     RegistrantList callWaitingRegistrants =  new RegistrantList();
 
 
-    // connections dropped durin last poll
+    // connections dropped during last poll
     ArrayList<CdmaConnection> droppedDuringPoll
         = new ArrayList<CdmaConnection>(MAX_CONNECTIONS);
 
diff --git a/telephony/java/com/android/internal/telephony/cdma/CdmaConnection.java b/telephony/java/com/android/internal/telephony/cdma/CdmaConnection.java
index 188145b..fbe455e 100755
--- a/telephony/java/com/android/internal/telephony/cdma/CdmaConnection.java
+++ b/telephony/java/com/android/internal/telephony/cdma/CdmaConnection.java
@@ -945,4 +945,10 @@
     public int getNumberPresentation() {
         return numberPresentation;
     }
+
+    @Override
+    public UUSInfo getUUSInfo() {
+        // UUS information not supported in CDMA
+        return null;
+    }
 }
diff --git a/telephony/java/com/android/internal/telephony/cdma/CdmaDataConnectionTracker.java b/telephony/java/com/android/internal/telephony/cdma/CdmaDataConnectionTracker.java
index 217e1e8..9f2a44b 100644
--- a/telephony/java/com/android/internal/telephony/cdma/CdmaDataConnectionTracker.java
+++ b/telephony/java/com/android/internal/telephony/cdma/CdmaDataConnectionTracker.java
@@ -114,7 +114,7 @@
     // if we have no active Apn this is null
     protected ApnSetting mActiveApn;
 
-    // Possibly promoate to base class, the only difference is
+    // Possibly promote to base class, the only difference is
     // the INTENT_RECONNECT_ALARM action is a different string.
     // Do consider technology changes if it is promoted.
     BroadcastReceiver mIntentReceiver = new BroadcastReceiver ()
@@ -420,7 +420,7 @@
         CdmaDataConnection conn = findFreeDataConnection();
 
         if (conn == null) {
-            if (DBG) log("setupData: No free CdmaDataConnectionfound!");
+            if (DBG) log("setupData: No free CdmaDataConnection found!");
             return false;
         }
 
@@ -646,7 +646,7 @@
     }
 
     /**
-     * @override com.android.intenral.telephony.DataConnectionTracker
+     * @override com.android.internal.telephony.DataConnectionTracker
      */
     @Override
     protected void onEnableNewApn() {
diff --git a/telephony/java/com/android/internal/telephony/cdma/CdmaMmiCode.java b/telephony/java/com/android/internal/telephony/cdma/CdmaMmiCode.java
new file mode 100644
index 0000000..8dd8c2e
--- /dev/null
+++ b/telephony/java/com/android/internal/telephony/cdma/CdmaMmiCode.java
@@ -0,0 +1,296 @@
+/*
+ * Copyright (C) 2006 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.android.internal.telephony.cdma;
+
+import android.content.Context;
+
+import com.android.internal.telephony.CommandException;
+import com.android.internal.telephony.MmiCode;
+
+import android.os.AsyncResult;
+import android.os.Handler;
+import android.os.Message;
+import android.util.Log;
+
+import java.util.regex.Pattern;
+import java.util.regex.Matcher;
+
+/**
+ * This class can handle Puk code Mmi
+ *
+ * {@hide}
+ *
+ */
+public final class CdmaMmiCode  extends Handler implements MmiCode {
+    static final String LOG_TAG = "CDMA_MMI";
+
+    // Constants
+
+    // From TS 22.030 6.5.2
+    static final String ACTION_REGISTER = "**";
+
+    // Supp Service codes from TS 22.030 Annex B
+    static final String SC_PUK          = "05";
+
+    // Event Constant
+
+    static final int EVENT_SET_COMPLETE = 1;
+
+    // Instance Variables
+
+    CDMAPhone phone;
+    Context context;
+
+    String action;              // ACTION_REGISTER
+    String sc;                  // Service Code
+    String sia, sib, sic;       // Service Info a,b,c
+    String poundString;         // Entire MMI string up to and including #
+    String dialingNumber;
+    String pwd;                 // For password registration
+
+    State state = State.PENDING;
+    CharSequence message;
+
+    // Class Variables
+
+    static Pattern sPatternSuppService = Pattern.compile(
+        "((\\*|#|\\*#|\\*\\*|##)(\\d{2,3})(\\*([^*#]*)(\\*([^*#]*)(\\*([^*#]*)(\\*([^*#]*))?)?)?)?#)(.*)");
+/*       1  2                    3          4  5       6   7         8    9     10  11             12
+
+         1 = Full string up to and including #
+         2 = action
+         3 = service code
+         5 = SIA
+         7 = SIB
+         9 = SIC
+         10 = dialing number
+*/
+
+    static final int MATCH_GROUP_POUND_STRING = 1;
+    static final int MATCH_GROUP_ACTION = 2;
+    static final int MATCH_GROUP_SERVICE_CODE = 3;
+    static final int MATCH_GROUP_SIA = 5;
+    static final int MATCH_GROUP_SIB = 7;
+    static final int MATCH_GROUP_SIC = 9;
+    static final int MATCH_GROUP_PWD_CONFIRM = 11;
+    static final int MATCH_GROUP_DIALING_NUMBER = 12;
+
+
+    // Public Class methods
+
+    /**
+     * Check if provided string contains Mmi code in it and create corresponding
+     * Mmi if it does
+     */
+
+    public static CdmaMmiCode
+    newFromDialString(String dialString, CDMAPhone phone) {
+        Matcher m;
+        CdmaMmiCode ret = null;
+
+        m = sPatternSuppService.matcher(dialString);
+
+        // Is this formatted like a standard supplementary service code?
+        if (m.matches()) {
+            ret = new CdmaMmiCode(phone);
+            ret.poundString = makeEmptyNull(m.group(MATCH_GROUP_POUND_STRING));
+            ret.action = makeEmptyNull(m.group(MATCH_GROUP_ACTION));
+            ret.sc = makeEmptyNull(m.group(MATCH_GROUP_SERVICE_CODE));
+            ret.sia = makeEmptyNull(m.group(MATCH_GROUP_SIA));
+            ret.sib = makeEmptyNull(m.group(MATCH_GROUP_SIB));
+            ret.sic = makeEmptyNull(m.group(MATCH_GROUP_SIC));
+            ret.pwd = makeEmptyNull(m.group(MATCH_GROUP_PWD_CONFIRM));
+            ret.dialingNumber = makeEmptyNull(m.group(MATCH_GROUP_DIALING_NUMBER));
+
+        }
+
+        return ret;
+    }
+
+    // Private Class methods
+
+    /** make empty strings be null.
+     *  Regexp returns empty strings for empty groups
+     */
+    private static String
+    makeEmptyNull (String s) {
+        if (s != null && s.length() == 0) return null;
+
+        return s;
+    }
+
+    // Constructor
+
+    CdmaMmiCode (CDMAPhone phone) {
+        super(phone.getHandler().getLooper());
+        this.phone = phone;
+        this.context = phone.getContext();
+    }
+
+    // MmiCode implementation
+
+    public State
+    getState() {
+        return state;
+    }
+
+    public CharSequence
+    getMessage() {
+        return message;
+    }
+
+    // inherited javadoc suffices
+    public void
+    cancel() {
+        // Complete or failed cannot be cancelled
+        if (state == State.COMPLETE || state == State.FAILED) {
+            return;
+        }
+
+        state = State.CANCELLED;
+        phone.onMMIDone (this);
+    }
+
+    public boolean isCancelable() {
+        return false;
+    }
+
+    // Instance Methods
+
+    /**
+     * @return true if the Service Code is PIN/PIN2/PUK/PUK2-related
+     */
+    boolean isPukCommand() {
+        return sc != null && sc.equals(SC_PUK);
+     }
+
+    boolean isRegister() {
+        return action != null && action.equals(ACTION_REGISTER);
+    }
+
+    public boolean isUssdRequest() {
+        Log.w(LOG_TAG, "isUssdRequest is not implemented in CdmaMmiCode");
+        return false;
+    }
+
+    /** Process a MMI PUK code */
+    void
+    processCode () {
+        try {
+            if (isPukCommand()) {
+                // sia = old PUK
+                // sib = new PIN
+                // sic = new PIN
+                String oldPinOrPuk = sia;
+                String newPin = sib;
+                int pinLen = newPin.length();
+                if (isRegister()) {
+                    if (!newPin.equals(sic)) {
+                        // password mismatch; return error
+                        handlePasswordError(com.android.internal.R.string.mismatchPin);
+                    } else if (pinLen < 4 || pinLen > 8 ) {
+                        // invalid length
+                        handlePasswordError(com.android.internal.R.string.invalidPin);
+                    } else {
+                        phone.mCM.supplyIccPuk(oldPinOrPuk, newPin,
+                                obtainMessage(EVENT_SET_COMPLETE, this));
+                    }
+                } else {
+                    throw new RuntimeException ("Invalid or Unsupported MMI Code");
+                }
+            } else {
+                throw new RuntimeException ("Invalid or Unsupported MMI Code");
+            }
+        } catch (RuntimeException exc) {
+            state = State.FAILED;
+            message = context.getText(com.android.internal.R.string.mmiError);
+            phone.onMMIDone(this);
+        }
+    }
+
+    private void handlePasswordError(int res) {
+        state = State.FAILED;
+        StringBuilder sb = new StringBuilder(getScString());
+        sb.append("\n");
+        sb.append(context.getText(res));
+        message = sb;
+        phone.onMMIDone(this);
+    }
+
+    public void
+    handleMessage (Message msg) {
+        AsyncResult ar;
+
+        if (msg.what == EVENT_SET_COMPLETE) {
+            ar = (AsyncResult) (msg.obj);
+            onSetComplete(ar);
+        } else {
+            Log.e(LOG_TAG, "Unexpected reply");
+        }
+    }
+    // Private instance methods
+
+    private CharSequence getScString() {
+        if (sc != null) {
+            if (isPukCommand()) {
+                return context.getText(com.android.internal.R.string.PinMmi);
+            }
+        }
+
+        return "";
+    }
+
+    private void
+    onSetComplete(AsyncResult ar){
+        StringBuilder sb = new StringBuilder(getScString());
+        sb.append("\n");
+
+        if (ar.exception != null) {
+            state = State.FAILED;
+            if (ar.exception instanceof CommandException) {
+                CommandException.Error err = ((CommandException)(ar.exception)).getCommandError();
+                if (err == CommandException.Error.PASSWORD_INCORRECT) {
+                    if (isPukCommand()) {
+                        sb.append(context.getText(
+                                com.android.internal.R.string.badPuk));
+                    } else {
+                        sb.append(context.getText(
+                                com.android.internal.R.string.passwordIncorrect));
+                    }
+                } else {
+                    sb.append(context.getText(
+                            com.android.internal.R.string.mmiError));
+                }
+            } else {
+                sb.append(context.getText(
+                        com.android.internal.R.string.mmiError));
+            }
+        } else if (isRegister()) {
+            state = State.COMPLETE;
+            sb.append(context.getText(
+                    com.android.internal.R.string.serviceRegistered));
+        } else {
+            state = State.FAILED;
+            sb.append(context.getText(
+                    com.android.internal.R.string.mmiError));
+        }
+
+        message = sb;
+        phone.onMMIDone(this);
+    }
+
+}
diff --git a/telephony/java/com/android/internal/telephony/cdma/CdmaServiceStateTracker.java b/telephony/java/com/android/internal/telephony/cdma/CdmaServiceStateTracker.java
index 39fe007..2cad6cc 100644
--- a/telephony/java/com/android/internal/telephony/cdma/CdmaServiceStateTracker.java
+++ b/telephony/java/com/android/internal/telephony/cdma/CdmaServiceStateTracker.java
@@ -66,7 +66,7 @@
     CdmaCellLocation cellLoc;
     CdmaCellLocation newCellLoc;
 
-     /** if time between NTIZ updates is less than mNitzUpdateSpacing the update may be ignored. */
+     /** if time between NITZ updates is less than mNitzUpdateSpacing the update may be ignored. */
     private static final int NITZ_UPDATE_SPACING_DEFAULT = 1000 * 60 * 10;
     private int mNitzUpdateSpacing = SystemProperties.getInt("ro.nitz_update_spacing",
             NITZ_UPDATE_SPACING_DEFAULT);
@@ -395,7 +395,7 @@
             }
 
             // Release any temporary cell lock, which could have been
-            // aquired to allow a single-shot location update.
+            // acquired to allow a single-shot location update.
             disableSingleLocationUpdate();
             break;
 
@@ -591,7 +591,7 @@
         boolean showPlmn = false;
         int rule = 0;
         if (cm.getRadioState().isRUIMReady()) {
-            // TODO RUIM SPN is not implemnted, EF_SPN has to be read and Display Condition
+            // TODO RUIM SPN is not implemented, EF_SPN has to be read and Display Condition
             //   Character Encoding, Language Indicator and SPN has to be set
             // rule = phone.mRuimRecords.getDisplayRule(ss.getOperatorNumeric());
             // spn = phone.mSIMRecords.getServiceProvideName();
@@ -872,7 +872,6 @@
      * and start over again if the radio notifies us that some
      * event has changed
      */
-
     private void
     pollState() {
         pollingContext = new int[1];
@@ -945,6 +944,9 @@
         case DATA_ACCESS_CDMA_EvDo_A:
             ret = "CDMA - EvDo rev. A";
             break;
+        case DATA_ACCESS_CDMA_EvDo_B:
+            ret = "CDMA - EvDo rev. B";
+            break;
         default:
             if (DBG) {
                 Log.e(LOG_TAG, "Wrong network. Can not return a string.");
@@ -1237,6 +1239,7 @@
         case 6: // RADIO_TECHNOLOGY_1xRTT
         case 7: // RADIO_TECHNOLOGY_EVDO_0
         case 8: // RADIO_TECHNOLOGY_EVDO_A
+        case 12: // RADIO_TECHNOLOGY_EVDO_B
             retVal = ServiceState.STATE_IN_SERVICE;
             break;
         default:
@@ -1256,7 +1259,7 @@
             return ServiceState.STATE_IN_SERVICE;
         case 2: // 2 is "searching", fall through
         case 3: // 3 is "registration denied", fall through
-        case 4: // 4 is "unknown" no vaild in current baseband
+        case 4: // 4 is "unknown", not valid in current baseband
             return ServiceState.STATE_OUT_OF_SERVICE;
         case 5:// 5 is "Registered, roaming"
             return ServiceState.STATE_IN_SERVICE;
@@ -1295,12 +1298,12 @@
      */
     private boolean isRoamIndForHomeSystem(String roamInd) {
         // retrieve the carrier-specified list of ERIs for home system
-        String homeRoamIndcators = SystemProperties.get("ro.cdma.homesystem");
+        String homeRoamIndicators = SystemProperties.get("ro.cdma.homesystem");
 
-        if (!TextUtils.isEmpty(homeRoamIndcators)) {
+        if (!TextUtils.isEmpty(homeRoamIndicators)) {
             // searches through the comma-separated list for a match,
             // return true if one is found.
-            for (String homeRoamInd : homeRoamIndcators.split(",")) {
+            for (String homeRoamInd : homeRoamIndicators.split(",")) {
                 if (homeRoamInd.equals(roamInd)) {
                     return true;
                 }
diff --git a/telephony/java/com/android/internal/telephony/cdma/SmsMessage.java b/telephony/java/com/android/internal/telephony/cdma/SmsMessage.java
index 403b7a1..b50502c 100755
--- a/telephony/java/com/android/internal/telephony/cdma/SmsMessage.java
+++ b/telephony/java/com/android/internal/telephony/cdma/SmsMessage.java
@@ -313,7 +313,7 @@
     }
 
     /**
-     * Get an SMS-SUBMIT PDU for a data message to a destination address &amp; port
+     * Get an SMS-SUBMIT PDU for a data message to a destination address and port.
      *
      * @param scAddr Service Centre address. null == use default
      * @param destAddr the address of the destination for the message
diff --git a/telephony/java/com/android/internal/telephony/cdma/TtyIntent.java b/telephony/java/com/android/internal/telephony/cdma/TtyIntent.java
index 3813b1d..4907aa9 100644
--- a/telephony/java/com/android/internal/telephony/cdma/TtyIntent.java
+++ b/telephony/java/com/android/internal/telephony/cdma/TtyIntent.java
@@ -56,10 +56,10 @@
     /**
      * The lookup key for an int that indicates preferred TTY mode.
      * Valid modes are:
-     * - {@link Phone.TTY_MODE_OFF}
-     * - {@link Phone.TTY_MODE_FULL}
-     * - {@link Phone.TTY_MODE_HCO}
-     * - {@link Phone.TTY_MODE_VCO}
+     * - {@link com.android.internal.telephony.Phone#TTY_MODE_OFF}
+     * - {@link com.android.internal.telephony.Phone#TTY_MODE_FULL}
+     * - {@link com.android.internal.telephony.Phone#TTY_MODE_HCO}
+     * - {@link com.android.internal.telephony.Phone#TTY_MODE_VCO}
      *
      * {@hide}
      */
diff --git a/telephony/java/com/android/internal/telephony/gsm/CallFailCause.java b/telephony/java/com/android/internal/telephony/gsm/CallFailCause.java
index e7fbf6b..af2ad48 100644
--- a/telephony/java/com/android/internal/telephony/gsm/CallFailCause.java
+++ b/telephony/java/com/android/internal/telephony/gsm/CallFailCause.java
@@ -25,6 +25,9 @@
  *
  */
 public interface CallFailCause {
+    // Unassigned/Unobtainable number
+    static final int UNOBTAINABLE_NUMBER = 1;
+
     static final int NORMAL_CLEARING     = 16;
     // Busy Tone
     static final int USER_BUSY           = 17;
diff --git a/telephony/java/com/android/internal/telephony/gsm/GSMPhone.java b/telephony/java/com/android/internal/telephony/gsm/GSMPhone.java
old mode 100755
new mode 100644
index 2bb7968..c7b1e5c
--- a/telephony/java/com/android/internal/telephony/gsm/GSMPhone.java
+++ b/telephony/java/com/android/internal/telephony/gsm/GSMPhone.java
@@ -67,6 +67,7 @@
 import com.android.internal.telephony.PhoneProxy;
 import com.android.internal.telephony.PhoneSubInfo;
 import com.android.internal.telephony.TelephonyProperties;
+import com.android.internal.telephony.UUSInfo;
 import com.android.internal.telephony.gsm.stk.StkService;
 import com.android.internal.telephony.test.SimulatedRadioControl;
 import com.android.internal.telephony.IccVmNotSupportedException;
@@ -711,7 +712,12 @@
     }
 
     public Connection
-    dial (String dialString) throws CallStateException {
+    dial(String dialString) throws CallStateException {
+        return dial(dialString, null);
+    }
+
+    public Connection
+    dial (String dialString, UUSInfo uusInfo) throws CallStateException {
         // Need to make sure dialString gets parsed properly
         String newDialString = PhoneNumberUtils.stripSeparators(dialString);
 
@@ -727,9 +733,9 @@
                                "dialing w/ mmi '" + mmi + "'...");
 
         if (mmi == null) {
-            return mCT.dial(newDialString);
+            return mCT.dial(newDialString, uusInfo);
         } else if (mmi.isTemporaryModeCLIR()) {
-            return mCT.dial(mmi.dialingNumber, mmi.getCLIRMode());
+            return mCT.dial(mmi.dialingNumber, mmi.getCLIRMode(), uusInfo);
         } else {
             mPendingMMIs.add(mmi);
             mMmiRegistrants.notifyRegistrants(new AsyncResult(null, mmi, null));
diff --git a/telephony/java/com/android/internal/telephony/gsm/GsmCallTracker.java b/telephony/java/com/android/internal/telephony/gsm/GsmCallTracker.java
index 87530e4..06f310c 100644
--- a/telephony/java/com/android/internal/telephony/gsm/GsmCallTracker.java
+++ b/telephony/java/com/android/internal/telephony/gsm/GsmCallTracker.java
@@ -37,6 +37,7 @@
 import com.android.internal.telephony.EventLogTags;
 import com.android.internal.telephony.Phone;
 import com.android.internal.telephony.TelephonyProperties;
+import com.android.internal.telephony.UUSInfo;
 import com.android.internal.telephony.gsm.CallFailCause;
 import com.android.internal.telephony.gsm.GSMPhone;
 import com.android.internal.telephony.gsm.GsmCall;
@@ -65,7 +66,7 @@
     RegistrantList voiceCallStartedRegistrants = new RegistrantList();
 
 
-    // connections dropped durin last poll
+    // connections dropped during last poll
     ArrayList<GsmConnection> droppedDuringPoll
         = new ArrayList<GsmConnection>(MAX_CONNECTIONS);
 
@@ -167,7 +168,7 @@
      * clirMode is one of the CLIR_ constants
      */
     Connection
-    dial (String dialString, int clirMode) throws CallStateException {
+    dial (String dialString, int clirMode, UUSInfo uusInfo) throws CallStateException {
         // note that this triggers call state changed notif
         clearDisconnected();
 
@@ -213,7 +214,7 @@
             // Always unmute when initiating a new call
             setMute(false);
 
-            cm.dial(pendingMO.address, clirMode, obtainCompleteMessage());
+            cm.dial(pendingMO.address, clirMode, uusInfo, obtainCompleteMessage());
         }
 
         updatePhoneState();
@@ -222,10 +223,19 @@
         return pendingMO;
     }
 
+    Connection
+    dial(String dialString) throws CallStateException {
+        return dial(dialString, CommandsInterface.CLIR_DEFAULT, null);
+    }
 
     Connection
-    dial (String dialString) throws CallStateException {
-        return dial(dialString, CommandsInterface.CLIR_DEFAULT);
+    dial(String dialString, UUSInfo uusInfo) throws CallStateException {
+        return dial(dialString, CommandsInterface.CLIR_DEFAULT, uusInfo);
+    }
+
+    Connection
+    dial(String dialString, int clirMode) throws CallStateException {
+        return dial(dialString, clirMode, null);
     }
 
     void
diff --git a/telephony/java/com/android/internal/telephony/gsm/GsmConnection.java b/telephony/java/com/android/internal/telephony/gsm/GsmConnection.java
index 4788a01..7dc2504 100644
--- a/telephony/java/com/android/internal/telephony/gsm/GsmConnection.java
+++ b/telephony/java/com/android/internal/telephony/gsm/GsmConnection.java
@@ -73,6 +73,7 @@
     DisconnectCause cause = DisconnectCause.NOT_DISCONNECTED;
     PostDialState postDialState = PostDialState.NOT_STARTED;
     int numberPresentation = Connection.PRESENTATION_ALLOWED;
+    UUSInfo uusInfo;
 
     Handler h;
 
@@ -126,6 +127,7 @@
         isIncoming = dc.isMT;
         createTime = System.currentTimeMillis();
         numberPresentation = dc.numberPresentation;
+        uusInfo = dc.uusInfo;
 
         this.index = index;
 
@@ -356,6 +358,9 @@
             case CallFailCause.FDN_BLOCKED:
                 return DisconnectCause.FDN_BLOCKED;
 
+            case CallFailCause.UNOBTAINABLE_NUMBER:
+                return DisconnectCause.UNOBTAINABLE_NUMBER;
+
             case CallFailCause.ERROR_UNSPECIFIED:
             case CallFailCause.NORMAL_CLEARING:
             default:
@@ -728,4 +733,9 @@
     public int getNumberPresentation() {
         return numberPresentation;
     }
+
+    @Override
+    public UUSInfo getUUSInfo() {
+        return uusInfo;
+    }
 }
diff --git a/telephony/java/com/android/internal/telephony/gsm/GsmDataConnection.java b/telephony/java/com/android/internal/telephony/gsm/GsmDataConnection.java
index d893ec4..09d46dd 100644
--- a/telephony/java/com/android/internal/telephony/gsm/GsmDataConnection.java
+++ b/telephony/java/com/android/internal/telephony/gsm/GsmDataConnection.java
@@ -134,7 +134,7 @@
                 cause = FailCause.INSUFFICIENT_RESOURCES;
                 break;
             case PDP_FAIL_MISSING_UKNOWN_APN:
-                cause = FailCause.MISSING_UKNOWN_APN;
+                cause = FailCause.MISSING_UNKNOWN_APN;
                 break;
             case PDP_FAIL_UNKNOWN_PDP_ADDRESS_TYPE:
                 cause = FailCause.UNKNOWN_PDP_ADDRESS;
diff --git a/telephony/java/com/android/internal/telephony/gsm/GsmDataConnectionTracker.java b/telephony/java/com/android/internal/telephony/gsm/GsmDataConnectionTracker.java
index 627d94d..f6d4491 100644
--- a/telephony/java/com/android/internal/telephony/gsm/GsmDataConnectionTracker.java
+++ b/telephony/java/com/android/internal/telephony/gsm/GsmDataConnectionTracker.java
@@ -45,7 +45,6 @@
 import android.telephony.ServiceState;
 import android.telephony.TelephonyManager;
 import android.telephony.gsm.GsmCellLocation;
-import android.text.TextUtils;
 import android.util.EventLog;
 import android.util.Log;
 
@@ -151,9 +150,9 @@
     static final String APN_ID = "apn_id";
     private boolean canSetPreferApn = false;
 
-    // for tracking retrys on the default APN
+    // for tracking retries on the default APN
     private RetryManager mDefaultRetryManager;
-    // for tracking retrys on a secondary APN
+    // for tracking retries on a secondary APN
     private RetryManager mSecondaryRetryManager;
 
     BroadcastReceiver mIntentReceiver = new BroadcastReceiver ()
@@ -190,8 +189,8 @@
                         WifiManager.WIFI_STATE_UNKNOWN) == WifiManager.WIFI_STATE_ENABLED;
 
                 if (!enabled) {
-                    // when wifi got disabeled, the NETWORK_STATE_CHANGED_ACTION
-                    // quit and wont report disconnected til next enalbing.
+                    // when wifi got disabled, the NETWORK_STATE_CHANGED_ACTION
+                    // quit and won't report disconnected til next enabling.
                     mIsWifiConnected = false;
                 }
             }
@@ -452,7 +451,7 @@
                 waitingApns = buildWaitingApns();
                 if (waitingApns.isEmpty()) {
                     if (DBG) log("No APN found");
-                    notifyNoData(GsmDataConnection.FailCause.MISSING_UKNOWN_APN);
+                    notifyNoData(GsmDataConnection.FailCause.MISSING_UNKNOWN_APN);
                     return false;
                 } else {
                     log ("Create from allApns : " + apnListToString(allApns));
@@ -1130,7 +1129,7 @@
             if (isApnTypeActive(Phone.APN_TYPE_DEFAULT)) {
                 SystemProperties.set("gsm.defaultpdpcontext.active", "true");
                         if (canSetPreferApn && preferredApn == null) {
-                            Log.d(LOG_TAG, "PREFERED APN is null");
+                            Log.d(LOG_TAG, "PREFERRED APN is null");
                             preferredApn = mActiveApn;
                             setPreferredApn(preferredApn.id);
                         }
@@ -1280,7 +1279,7 @@
         if (allApns.isEmpty()) {
             if (DBG) log("No APN found for carrier: " + operator);
             preferredApn = null;
-            notifyNoData(GsmDataConnection.FailCause.MISSING_UKNOWN_APN);
+            notifyNoData(GsmDataConnection.FailCause.MISSING_UNKNOWN_APN);
         } else {
             preferredApn = getPreferredApn();
             Log.d(LOG_TAG, "Get PreferredAPN");
diff --git a/telephony/java/com/android/internal/telephony/gsm/GsmMmiCode.java b/telephony/java/com/android/internal/telephony/gsm/GsmMmiCode.java
index bcbd127..aa16fa3 100644
--- a/telephony/java/com/android/internal/telephony/gsm/GsmMmiCode.java
+++ b/telephony/java/com/android/internal/telephony/gsm/GsmMmiCode.java
@@ -39,7 +39,7 @@
  * {@hide}
  *
  */
-public final class GsmMmiCode  extends Handler implements MmiCode {
+public final class GsmMmiCode extends Handler implements MmiCode {
     static final String LOG_TAG = "GSM";
 
     //***** Constants
@@ -51,7 +51,7 @@
     static final String ACTION_REGISTER = "**";
     static final String ACTION_ERASURE = "##";
 
-    // Supp Service cocdes from TS 22.030 Annex B
+    // Supp Service codes from TS 22.030 Annex B
 
     //Called line presentation
     static final String SC_CLIP    = "30";
@@ -154,7 +154,7 @@
 
     /**
      * Some dial strings in GSM are defined to do non-call setup
-     * things, such as modify or query supplementry service settings (eg, call
+     * things, such as modify or query supplementary service settings (eg, call
      * forwarding). These are generally referred to as "MMI codes".
      * We look to see if the dial string contains a valid MMI code (potentially
      * with a dial string at the end as well) and return info here.
@@ -457,12 +457,13 @@
                 && !PhoneNumberUtils.isEmergencyNumber(dialString)
                 && (phone.isInCall()
                     || !((dialString.length() == 2 && dialString.charAt(0) == '1')
-                         /* While contrary to TS 22.030, there is strong precendence
+                         /* While contrary to TS 22.030, there is strong precedence
                           * for treating "0" and "00" as call setup strings.
                           */
                          || dialString.equals("0")
                          || dialString.equals("00"))));
     }
+
     /**
      * @return true if the Service Code is PIN/PIN2/PUK/PUK2-related
      */
@@ -472,13 +473,12 @@
      }
 
     /**
-     * *See TS 22.030 Annex B
+     * See TS 22.030 Annex B.
      * In temporary mode, to suppress CLIR for a single call, enter:
-     *      " * 31 # <called number> SEND "
+     *      " * 31 # [called number] SEND "
      *  In temporary mode, to invoke CLIR for a single call enter:
-     *       " # 31 # <called number> SEND "
+     *       " # 31 # [called number] SEND "
      */
-
     boolean
     isTemporaryModeCLIR() {
         return sc != null && sc.equals(SC_CLIR) && dialingNumber != null
@@ -779,7 +779,7 @@
         // Note that unlike most everything else, the USSD complete
         // response does not complete this MMI code...we wait for
         // an unsolicited USSD "Notify" or "Request".
-        // The matching up of this is doene in GSMPhone.
+        // The matching up of this is done in GSMPhone.
 
         phone.mCM.sendUSSD(ussdMessage,
             obtainMessage(EVENT_USSD_COMPLETE, this));
@@ -832,8 +832,7 @@
 
                 if (ar.exception != null) {
                     state = State.FAILED;
-                    message = context.getText(
-                                            com.android.internal.R.string.mmiError);
+                    message = getErrorMessage(ar);
 
                     phone.onMMIDone(this);
                 }
@@ -852,6 +851,19 @@
     }
     //***** Private instance methods
 
+    private CharSequence getErrorMessage(AsyncResult ar) {
+
+        if (ar.exception instanceof CommandException) {
+            CommandException.Error err = ((CommandException)(ar.exception)).getCommandError();
+            if (err == CommandException.Error.FDN_CHECK_FAILURE) {
+                Log.i(LOG_TAG, "FDN_CHECK_FAILURE");
+                return context.getText(com.android.internal.R.string.mmiFdnError);
+            }
+        }
+
+        return context.getText(com.android.internal.R.string.mmiError);
+    }
+
     private CharSequence getScString() {
         if (sc != null) {
             if (isServiceCodeCallBarring(sc)) {
@@ -904,6 +916,9 @@
                     sb.append("\n");
                     sb.append(context.getText(
                             com.android.internal.R.string.needPuk2));
+                } else if (err == CommandException.Error.FDN_CHECK_FAILURE) {
+                    Log.i(LOG_TAG, "FDN_CHECK_FAILURE");
+                    sb.append(context.getText(com.android.internal.R.string.mmiFdnError));
                 } else {
                     sb.append(context.getText(
                             com.android.internal.R.string.mmiError));
@@ -953,7 +968,7 @@
 
         if (ar.exception != null) {
             state = State.FAILED;
-            sb.append(context.getText(com.android.internal.R.string.mmiError));
+            sb.append(getErrorMessage(ar));
         } else {
             int clirArgs[];
 
@@ -1123,7 +1138,7 @@
 
         if (ar.exception != null) {
             state = State.FAILED;
-            sb.append(context.getText(com.android.internal.R.string.mmiError));
+            sb.append(getErrorMessage(ar));
         } else {
             CallForwardInfo infos[];
 
@@ -1141,7 +1156,7 @@
 
                 // Each bit in the service class gets its own result line
                 // The service classes may be split up over multiple
-                // CallForwardInfos. So, for each service classs, find out
+                // CallForwardInfos. So, for each service class, find out
                 // which CallForwardInfo represents it and then build
                 // the response text based on that
 
@@ -1175,7 +1190,7 @@
 
         if (ar.exception != null) {
             state = State.FAILED;
-            sb.append(context.getText(com.android.internal.R.string.mmiError));
+            sb.append(getErrorMessage(ar));
         } else {
             int[] ints = (int[])ar.result;
 
diff --git a/telephony/java/com/android/internal/telephony/gsm/GsmSMSDispatcher.java b/telephony/java/com/android/internal/telephony/gsm/GsmSMSDispatcher.java
index 6ae316d..d720516 100644
--- a/telephony/java/com/android/internal/telephony/gsm/GsmSMSDispatcher.java
+++ b/telephony/java/com/android/internal/telephony/gsm/GsmSMSDispatcher.java
@@ -94,6 +94,13 @@
         SmsMessage sms = (SmsMessage) smsb;
         boolean handled = false;
 
+        if (sms.isTypeZero()) {
+            // As per 3GPP TS 23.040 9.2.3.9, Type Zero messages should not be
+            // Displayed/Stored/Notified. They should only be acknowledged.
+            Log.d(TAG, "Received short message type 0, Dont display or store it. Send Ack");
+            return Intents.RESULT_SMS_HANDLED;
+        }
+
         // Special case the message waiting indicator messages
         if (sms.isMWISetMessage()) {
             mGsmPhone.updateMessageWaitingIndicator(true);
diff --git a/telephony/java/com/android/internal/telephony/gsm/GsmServiceStateTracker.java b/telephony/java/com/android/internal/telephony/gsm/GsmServiceStateTracker.java
index 50b8eba..d539f6f1 100644
--- a/telephony/java/com/android/internal/telephony/gsm/GsmServiceStateTracker.java
+++ b/telephony/java/com/android/internal/telephony/gsm/GsmServiceStateTracker.java
@@ -40,7 +40,6 @@
 import android.provider.Telephony.Intents;
 import android.telephony.ServiceState;
 import android.telephony.SignalStrength;
-import android.telephony.TelephonyManager;
 import android.telephony.gsm.GsmCellLocation;
 import android.text.TextUtils;
 import android.util.Config;
@@ -130,7 +129,7 @@
      */
     private boolean mNeedToRegForSimLoaded;
 
-    /** Started the recheck process after finding gprs should registerd but not. */
+    /** Started the recheck process after finding gprs should registered but not. */
     private boolean mStartedGprsRegCheck = false;
 
     /** Already sent the event-log for no gprs register. */
@@ -415,7 +414,7 @@
                 }
 
                 // Release any temporary cell lock, which could have been
-                // aquired to allow a single-shot location update.
+                // acquired to allow a single-shot location update.
                 disableSingleLocationUpdate();
                 break;
 
@@ -500,9 +499,9 @@
                 break;
 
             case EVENT_CHECK_REPORT_GPRS:
-                if (ss != null && !isGprsConsistant(gprsState, ss.getState())) {
+                if (ss != null && !isGprsConsistent(gprsState, ss.getState())) {
 
-                    // Can't register data sevice while voice service is ok
+                    // Can't register data service while voice service is ok
                     // i.e. CREG is ok while CGREG is not
                     // possible a network or baseband side error
                     GsmCellLocation loc = ((GsmCellLocation)phone.getCellLocation());
@@ -1027,7 +1026,7 @@
             phone.notifyLocationChanged();
         }
 
-        if (! isGprsConsistant(gprsState, ss.getState())) {
+        if (! isGprsConsistent(gprsState, ss.getState())) {
             if (!mStartedGprsRegCheck && !mReportedGprsNoReg) {
                 mStartedGprsRegCheck = true;
 
@@ -1044,13 +1043,13 @@
     }
 
     /**
-     * Check if GPRS got registred while voice is registered
+     * Check if GPRS got registered while voice is registered.
      *
      * @param gprsState for GPRS registration state, i.e. CGREG in GSM
      * @param serviceState for voice registration state, i.e. CREG in GSM
      * @return false if device only register to voice but not gprs
      */
-    private boolean isGprsConsistant (int gprsState, int serviceState) {
+    private boolean isGprsConsistent(int gprsState, int serviceState) {
         return !((serviceState == ServiceState.STATE_IN_SERVICE) &&
                 (gprsState != ServiceState.STATE_IN_SERVICE));
     }
@@ -1105,13 +1104,13 @@
 
         long nextTime;
 
-        // TODO Done't poll signal strength if screen is off
+        // TODO Don't poll signal strength if screen is off
         sendMessageDelayed(msg, POLL_PERIOD_MILLIS);
     }
 
     /**
-     *  send signal-strength-changed notification if changed
-     *  Called both for solicited and unsolicited signal stength updates
+     *  Send signal-strength-changed notification if changed.
+     *  Called both for solicited and unsolicited signal strength updates.
      */
     private void onSignalStrengthResult(AsyncResult ar) {
         SignalStrength oldSignalStrength = mSignalStrength;
@@ -1332,7 +1331,7 @@
 
     /**
      * @return true if phone is camping on a technology (eg UMTS)
-     * that could support voice and data simultaniously.
+     * that could support voice and data simultaneously.
      */
     boolean isConcurrentVoiceAndData() {
         return (networkType >= DATA_ACCESS_UMTS);
diff --git a/telephony/java/com/android/internal/telephony/gsm/SmsMessage.java b/telephony/java/com/android/internal/telephony/gsm/SmsMessage.java
index d627baf..12c6b88 100644
--- a/telephony/java/com/android/internal/telephony/gsm/SmsMessage.java
+++ b/telephony/java/com/android/internal/telephony/gsm/SmsMessage.java
@@ -111,6 +111,14 @@
     }
 
     /**
+     * 3GPP TS 23.040 9.2.3.9 specifies that Type Zero messages are indicated
+     * by TP_PID field set to value 0x40
+     */
+    public boolean isTypeZero() {
+        return (protocolIdentifier == 0x40);
+    }
+
+    /**
      * TS 27.005 3.4.1 lines[0] and lines[1] are the two lines read from the
      * +CMT unsolicited response (PDU mode, of course)
      *  +CMT: [&lt;alpha>],<length><CR><LF><pdu>
diff --git a/telephony/java/com/android/internal/telephony/test/SimulatedCommands.java b/telephony/java/com/android/internal/telephony/test/SimulatedCommands.java
index 11b3fd6..a120f52 100644
--- a/telephony/java/com/android/internal/telephony/test/SimulatedCommands.java
+++ b/telephony/java/com/android/internal/telephony/test/SimulatedCommands.java
@@ -29,6 +29,7 @@
 import com.android.internal.telephony.DataCallState;
 import com.android.internal.telephony.IccCard;
 import com.android.internal.telephony.Phone;
+import com.android.internal.telephony.UUSInfo;
 import com.android.internal.telephony.gsm.CallFailCause;
 import com.android.internal.telephony.gsm.SmsBroadcastConfigInfo;
 import com.android.internal.telephony.gsm.SuppServiceNotification;
@@ -496,6 +497,23 @@
      *  retMsg.obj = AsyncResult ar
      *  ar.exception carries exception on failure
      *  ar.userObject contains the orignal value of result.obj
+     *  ar.result is null on success and failure
+     *
+     * CLIR_DEFAULT     == on "use subscription default value"
+     * CLIR_SUPPRESSION == on "CLIR suppression" (allow CLI presentation)
+     * CLIR_INVOCATION  == on "CLIR invocation" (restrict CLI presentation)
+     */
+    public void dial(String address, int clirMode, UUSInfo uusInfo, Message result) {
+        simulatedCallState.onDial(address);
+
+        resultSuccess(result, null);
+    }
+
+    /**
+     *  returned message
+     *  retMsg.obj = AsyncResult ar
+     *  ar.exception carries exception on failure
+     *  ar.userObject contains the orignal value of result.obj
      *  ar.result is String containing IMSI on success
      */
     public void getIMSI(Message result) {
diff --git a/telephony/tests/telephonytests/src/android/telephony/PhoneNumberUtilsTest.java b/telephony/tests/telephonytests/src/android/telephony/PhoneNumberUtilsTest.java
index 02590d3..de59b81 100644
--- a/telephony/tests/telephonytests/src/android/telephony/PhoneNumberUtilsTest.java
+++ b/telephony/tests/telephonytests/src/android/telephony/PhoneNumberUtilsTest.java
@@ -16,13 +16,16 @@
 
 package com.android.internal.telephony;
 
+import android.test.AndroidTestCase;
 import android.test.suitebuilder.annotation.SmallTest;
 import android.text.SpannableStringBuilder;
 import android.telephony.PhoneNumberUtils;
+import android.telephony.TelephonyManager;
+import android.content.Context;
 
 import junit.framework.TestCase;
 
-public class PhoneNumberUtilsTest extends TestCase {
+public class PhoneNumberUtilsTest extends AndroidTestCase {
 
     @SmallTest
     public void testExtractNetworkPortion() throws Exception {
@@ -82,6 +85,16 @@
         assertEquals("17005550020",
             PhoneNumberUtils.calledPartyBCDToString(b, 0, 7));
 
+        b[0] = (byte) 0x80; b[1] = (byte) 0x71; b[2] = (byte) 0x00; b[3] = (byte) 0x55;
+        b[4] = (byte) 0x05; b[5] = (byte) 0x20; b[6] = (byte) 0xF0;
+        assertEquals("17005550020",
+            PhoneNumberUtils.calledPartyBCDToString(b, 0, 7));
+
+        b[0] = (byte) 0x90; b[1] = (byte) 0x71; b[2] = (byte) 0x00; b[3] = (byte) 0x55;
+        b[4] = (byte) 0x05; b[5] = (byte) 0x20; b[6] = (byte) 0xF0;
+        assertEquals("+17005550020",
+            PhoneNumberUtils.calledPartyBCDToString(b, 0, 7));
+
         b[0] = (byte) 0x91; b[1] = (byte) 0x71; b[2] = (byte) 0x00; b[3] = (byte) 0x55;
         b[4] = (byte) 0x05; b[5] = (byte) 0x20; b[6] = (byte) 0xF0;
         assertEquals("+17005550020",
@@ -472,4 +485,22 @@
                 PhoneNumberUtils.cdmaCheckAndProcessPlusCodeByNumberFormat("+18475797000",
                 PhoneNumberUtils.FORMAT_UNKNOWN,PhoneNumberUtils.FORMAT_UNKNOWN));
     }
+
+    /**
+     * Basic checks for the VoiceMail number.
+     */
+    @SmallTest
+    public void testWithNumberNotEqualToVoiceMail() throws Exception {
+        assertFalse(PhoneNumberUtils.isVoiceMailNumber("911"));
+        assertFalse(PhoneNumberUtils.isVoiceMailNumber("tel:911"));
+        assertFalse(PhoneNumberUtils.isVoiceMailNumber("+18001234567"));
+        assertFalse(PhoneNumberUtils.isVoiceMailNumber(""));
+        assertFalse(PhoneNumberUtils.isVoiceMailNumber(null));
+        // This test fails on a device without a sim card
+        /*TelephonyManager mTelephonyManager =
+            (TelephonyManager)getContext().getSystemService(Context.TELEPHONY_SERVICE);
+        String mVoiceMailNumber = mTelephonyManager.getDefault().getVoiceMailNumber();
+        assertTrue(PhoneNumberUtils.isVoiceMailNumber(mVoiceMailNumber));
+        */
+    }
 }
diff --git a/telephony/tests/telephonytests/src/com/android/internal/telephony/CallerInfoTest.java b/telephony/tests/telephonytests/src/com/android/internal/telephony/CallerInfoTest.java
new file mode 100644
index 0000000..1e5dafb
--- /dev/null
+++ b/telephony/tests/telephonytests/src/com/android/internal/telephony/CallerInfoTest.java
@@ -0,0 +1,241 @@
+/*
+ * Copyright (C) 2009 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.android.internal.telephony;
+
+import android.test.AndroidTestCase;
+import android.test.suitebuilder.annotation.SmallTest;
+
+import android.content.ContentResolver;
+import android.content.Context;
+import android.content.res.Resources;
+import com.android.internal.telephony.CallerInfo;
+import com.android.internal.telephony.CallerInfoAsyncQuery;
+import android.util.Log;
+import android.os.Looper;
+import android.test.ActivityInstrumentationTestCase;
+import android.util.StringBuilderPrinter;
+
+/*
+ * Check the CallerInfo utility class works as expected.
+ *
+ */
+
+public class CallerInfoTest extends AndroidTestCase {
+    private CallerInfo mInfo;
+    private Context mContext;
+
+    private static final String kEmergencyNumber = "Emergency Number";
+    private static final int kToken = 0xdeadbeef;
+    private static final String TAG = "CallerInfoUnitTest";
+
+    @Override
+    protected void setUp() throws Exception {
+        super.setUp();
+        mContext = new MockContext();
+        mInfo = new CallerInfo();
+    }
+
+    @Override
+    protected void tearDown() throws Exception {
+        super.tearDown();
+    }
+
+    /**
+     * Checks the caller info instance is flagged as an emergency if
+     * the number is an emergency one. There is no test for the
+     * contact based constructors because emergency number are not in
+     * the contact DB.
+     */
+    @SmallTest
+    public void testEmergencyIsProperlySet() throws Exception {
+        assertFalse(mInfo.isEmergencyNumber());
+
+        mInfo = CallerInfo.getCallerInfo(mContext, "911");
+        assertIsValidEmergencyCallerInfo();
+
+        mInfo = CallerInfo.getCallerInfo(mContext, "tel:911");
+        assertIsValidEmergencyCallerInfo();
+
+
+        // This one hits the content resolver.
+        mInfo = CallerInfo.getCallerInfo(mContext, "18001234567");
+        assertFalse(mInfo.isEmergencyNumber());
+    }
+
+    /**
+     * Same as testEmergencyIsProperlySet but uses the async query api.
+     */
+    @SmallTest
+    public void testEmergencyIsProperlySetUsingAsyncQuery() throws Exception {
+        QueryRunner query;
+
+        query = new QueryRunner("911");
+        query.runAndCheckCompletion();
+        assertIsValidEmergencyCallerInfo();
+
+        query = new QueryRunner("tel:911");
+        query.runAndCheckCompletion();
+        assertIsValidEmergencyCallerInfo();
+
+        query = new QueryRunner("18001234567");
+        query.runAndCheckCompletion();
+        assertFalse(mInfo.isEmergencyNumber());
+    }
+
+    /**
+     * For emergency caller info, phoneNumber should be set to the
+     * string emergency_call_dialog_number_for_display and the
+     * photoResource should be set to the picture_emergency drawable.
+     */
+    @SmallTest
+    public void testEmergencyNumberAndPhotoAreSet() throws Exception {
+        mInfo = CallerInfo.getCallerInfo(mContext, "911");
+
+        assertIsValidEmergencyCallerInfo();
+    }
+
+    // TODO: Add more tests:
+    /**
+     * Check if the voice mail number cannot be retrieved that the
+     * original phone number is preserved.
+     */
+    /**
+     * Check the markAs* methods work.
+     */
+
+
+    //
+    // Helpers
+    //
+
+    // Partial implementation of MockResources.
+    public class MockResources extends android.test.mock.MockResources
+    {
+        @Override
+        public String getString(int resId) throws Resources.NotFoundException {
+            switch (resId) {
+                case com.android.internal.R.string.emergency_call_dialog_number_for_display:
+                    return kEmergencyNumber;
+                default:
+                    throw new UnsupportedOperationException("Missing handling for resid " + resId);
+            }
+        }
+    }
+
+    // Partial implementation of MockContext.
+    public class MockContext extends android.test.mock.MockContext {
+        private ContentResolver mResolver;
+        private Resources mResources;
+
+        public MockContext() {
+            mResolver = new android.test.mock.MockContentResolver();
+            mResources = new MockResources();
+        }
+
+        @Override
+        public ContentResolver getContentResolver() {
+            return mResolver;
+        }
+
+        @Override
+        public Resources getResources() {
+            return mResources;
+        }
+    }
+
+    /**
+     * Class to run a CallerInfoAsyncQuery in a separate thread, with
+     * its own Looper. We cannot use the main Looper because on the
+     * 1st quit the thread is maked dead, ie no further test can use
+     * it. Also there is not way to inject a Looper instance in the
+     * query, so we have to use a thread with its own looper.
+     */
+    private class QueryRunner extends Thread
+            implements CallerInfoAsyncQuery.OnQueryCompleteListener {
+        private Looper mLooper;
+        private String mNumber;
+        private boolean mAsyncCompleted;
+
+        public QueryRunner(String number) {
+            super();
+            mNumber = number;
+        }
+
+        // Run the query in the thread, wait for completion.
+        public void runAndCheckCompletion() throws InterruptedException {
+            start();
+            join();
+            assertTrue(mAsyncCompleted);
+        }
+
+        @Override
+        public void run() {
+            Looper.prepare();
+            mLooper = Looper.myLooper();
+            mAsyncCompleted = false;
+            // The query will pick the thread local looper we've just prepared.
+            CallerInfoAsyncQuery.startQuery(kToken, mContext, mNumber, this, null);
+            mLooper.loop();
+        }
+
+        // Quit the Looper on the 1st callback
+        // (EVENT_EMERGENCY_NUMBER). There is another message
+        // (EVENT_END_OF_QUEUE) that will never be delivered because
+        // the test has exited. The corresponding stack trace
+        // "Handler{xxxxx} sending message to a Handler on a dead
+        // thread" can be ignored.
+        public void onQueryComplete(int token, Object cookie, CallerInfo info) {
+            mAsyncCompleted = true;
+            mInfo = info;
+            mLooper.quit();
+        }
+    }
+
+    /**
+     * Fail if mInfo does not contain a valid emergency CallerInfo instance.
+     */
+    private void assertIsValidEmergencyCallerInfo() throws Exception {
+        assertTrue(mInfo.isEmergencyNumber());
+
+        // For emergency caller info, phoneNumber should be set to the
+        // string emergency_call_dialog_number_for_display and the
+        // photoResource should be set to the picture_emergency drawable.
+        assertEquals(kEmergencyNumber, mInfo.phoneNumber);
+        assertEquals(com.android.internal.R.drawable.picture_emergency, mInfo.photoResource);
+
+        // The name should be null
+        assertNull(mInfo.name);
+        assertEquals(0, mInfo.namePresentation);
+        assertNull(mInfo.cnapName);
+        assertEquals(0, mInfo.numberPresentation);
+
+        assertFalse(mInfo.contactExists);
+        assertEquals(0, mInfo.person_id);
+        assertFalse(mInfo.needUpdate);
+        assertNull(mInfo.contactRefUri);
+
+        assertNull(mInfo.phoneLabel);
+        assertEquals(0, mInfo.numberType);
+        assertNull(mInfo.numberLabel);
+
+        assertNull(mInfo.contactRingtoneUri);
+        assertFalse(mInfo.shouldSendToVoicemail);
+
+        assertNull(mInfo.cachedPhoto);
+        assertFalse(mInfo.isCachedPhotoCurrent);
+    }
+}
diff --git a/telephony/tests/telephonytests/src/com/android/telephonytest/unit/CallerInfoUnitTest.java b/telephony/tests/telephonytests/src/com/android/telephonytest/unit/CallerInfoUnitTest.java
deleted file mode 100644
index 0f24f15..0000000
--- a/telephony/tests/telephonytests/src/com/android/telephonytest/unit/CallerInfoUnitTest.java
+++ /dev/null
@@ -1,240 +0,0 @@
-/*
- * Copyright (C) 2009 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.android.telephonytest.unit;
-import android.test.AndroidTestCase;
-import android.test.suitebuilder.annotation.SmallTest;
-
-import android.content.ContentResolver;
-import android.content.Context;
-import android.content.res.Resources;
-import com.android.internal.telephony.CallerInfo;
-import com.android.internal.telephony.CallerInfoAsyncQuery;
-import android.util.Log;
-import android.os.Looper;
-import android.test.ActivityInstrumentationTestCase;
-import android.util.StringBuilderPrinter;
-
-/*
- * Check the CallerInfo utility class works as expected.
- *
- */
-
-public class CallerInfoUnitTest extends AndroidTestCase {
-    private CallerInfo mInfo;
-    private Context mContext;
-
-    private static final String kEmergencyNumber = "Emergency Number";
-    private static final int kToken = 0xdeadbeef;
-    private static final String TAG = "CallerInfoUnitTest";
-
-    @Override
-    protected void setUp() throws Exception {
-        super.setUp();
-        mContext = new MockContext();
-        mInfo = new CallerInfo();
-    }
-
-    @Override
-    protected void tearDown() throws Exception {
-        super.tearDown();
-    }
-
-    /**
-     * Checks the caller info instance is flagged as an emergency if
-     * the number is an emergency one. There is no test for the
-     * contact based constructors because emergency number are not in
-     * the contact DB.
-     */
-    @SmallTest
-    public void testEmergencyIsProperlySet() throws Exception {
-        assertFalse(mInfo.isEmergencyNumber());
-
-        mInfo = CallerInfo.getCallerInfo(mContext, "911");
-        assertIsValidEmergencyCallerInfo();
-
-        mInfo = CallerInfo.getCallerInfo(mContext, "tel:911");
-        assertIsValidEmergencyCallerInfo();
-
-
-        // This one hits the content resolver.
-        mInfo = CallerInfo.getCallerInfo(mContext, "18001234567");
-        assertFalse(mInfo.isEmergencyNumber());
-    }
-
-    /**
-     * Same as testEmergencyIsProperlySet but uses the async query api.
-     */
-    @SmallTest
-    public void testEmergencyIsProperlySetUsingAsyncQuery() throws Exception {
-        QueryRunner query;
-
-        query = new QueryRunner("911");
-        query.runAndCheckCompletion();
-        assertIsValidEmergencyCallerInfo();
-
-        query = new QueryRunner("tel:911");
-        query.runAndCheckCompletion();
-        assertIsValidEmergencyCallerInfo();
-
-        query = new QueryRunner("18001234567");
-        query.runAndCheckCompletion();
-        assertFalse(mInfo.isEmergencyNumber());
-    }
-
-    /**
-     * For emergency caller info, phoneNumber should be set to the
-     * string emergency_call_dialog_number_for_display and the
-     * photoResource should be set to the picture_emergency drawable.
-     */
-    @SmallTest
-    public void testEmergencyNumberAndPhotoAreSet() throws Exception {
-        mInfo = CallerInfo.getCallerInfo(mContext, "911");
-
-        assertIsValidEmergencyCallerInfo();
-    }
-
-    // TODO: Add more tests:
-    /**
-     * Check if the voice mail number cannot be retrieved that the
-     * original phone number is preserved.
-     */
-    /**
-     * Check the markAs* methods work.
-     */
-
-
-    //
-    // Helpers
-    //
-
-    // Partial implementation of MockResources.
-    public class MockResources extends android.test.mock.MockResources
-    {
-        @Override
-        public String getString(int resId) throws Resources.NotFoundException {
-            switch (resId) {
-                case com.android.internal.R.string.emergency_call_dialog_number_for_display:
-                    return kEmergencyNumber;
-                default:
-                    throw new UnsupportedOperationException("Missing handling for resid " + resId);
-            }
-        }
-    }
-
-    // Partial implementation of MockContext.
-    public class MockContext extends android.test.mock.MockContext {
-        private ContentResolver mResolver;
-        private Resources mResources;
-
-        public MockContext() {
-            mResolver = new android.test.mock.MockContentResolver();
-            mResources = new MockResources();
-        }
-
-        @Override
-        public ContentResolver getContentResolver() {
-            return mResolver;
-        }
-
-        @Override
-        public Resources getResources() {
-            return mResources;
-        }
-    }
-
-    /**
-     * Class to run a CallerInfoAsyncQuery in a separate thread, with
-     * its own Looper. We cannot use the main Looper because on the
-     * 1st quit the thread is maked dead, ie no further test can use
-     * it. Also there is not way to inject a Looper instance in the
-     * query, so we have to use a thread with its own looper.
-     */
-    private class QueryRunner extends Thread
-            implements CallerInfoAsyncQuery.OnQueryCompleteListener {
-        private Looper mLooper;
-        private String mNumber;
-        private boolean mAsyncCompleted;
-
-        public QueryRunner(String number) {
-            super();
-            mNumber = number;
-        }
-
-        // Run the query in the thread, wait for completion.
-        public void runAndCheckCompletion() throws InterruptedException {
-            start();
-            join();
-            assertTrue(mAsyncCompleted);
-        }
-
-        @Override
-        public void run() {
-            Looper.prepare();
-            mLooper = Looper.myLooper();
-            mAsyncCompleted = false;
-            // The query will pick the thread local looper we've just prepared.
-            CallerInfoAsyncQuery.startQuery(kToken, mContext, mNumber, this, null);
-            mLooper.loop();
-        }
-
-        // Quit the Looper on the 1st callback
-        // (EVENT_EMERGENCY_NUMBER). There is another message
-        // (EVENT_END_OF_QUEUE) that will never be delivered because
-        // the test has exited. The corresponding stack trace
-        // "Handler{xxxxx} sending message to a Handler on a dead
-        // thread" can be ignored.
-        public void onQueryComplete(int token, Object cookie, CallerInfo info) {
-            mAsyncCompleted = true;
-            mInfo = info;
-            mLooper.quit();
-        }
-    }
-
-    /**
-     * Fail if mInfo does not contain a valid emergency CallerInfo instance.
-     */
-    private void assertIsValidEmergencyCallerInfo() throws Exception {
-        assertTrue(mInfo.isEmergencyNumber());
-
-        // For emergency caller info, phoneNumber should be set to the
-        // string emergency_call_dialog_number_for_display and the
-        // photoResource should be set to the picture_emergency drawable.
-        assertEquals(kEmergencyNumber, mInfo.phoneNumber);
-        assertEquals(com.android.internal.R.drawable.picture_emergency, mInfo.photoResource);
-
-        // The name should be null
-        assertNull(mInfo.name);
-        assertEquals(0, mInfo.namePresentation);
-        assertNull(mInfo.cnapName);
-        assertEquals(0, mInfo.numberPresentation);
-
-        assertFalse(mInfo.contactExists);
-        assertEquals(0, mInfo.person_id);
-        assertFalse(mInfo.needUpdate);
-        assertNull(mInfo.contactRefUri);
-
-        assertNull(mInfo.phoneLabel);
-        assertEquals(0, mInfo.numberType);
-        assertNull(mInfo.numberLabel);
-
-        assertNull(mInfo.contactRingtoneUri);
-        assertFalse(mInfo.shouldSendToVoicemail);
-
-        assertNull(mInfo.cachedPhoto);
-        assertFalse(mInfo.isCachedPhotoCurrent);
-    }
-}
diff --git a/telephony/tests/telephonytests/src/com/android/telephonytest/unit/PhoneNumberUtilsUnitTest.java b/telephony/tests/telephonytests/src/com/android/telephonytest/unit/PhoneNumberUtilsUnitTest.java
deleted file mode 100644
index 2d3c548..0000000
--- a/telephony/tests/telephonytests/src/com/android/telephonytest/unit/PhoneNumberUtilsUnitTest.java
+++ /dev/null
@@ -1,63 +0,0 @@
-/*
- * Copyright (C) 2009 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.android.telephonytest.unit;
-import android.test.AndroidTestCase;
-import android.test.suitebuilder.annotation.SmallTest;
-import android.util.Log;
-
-import android.telephony.PhoneNumberUtils;
-import android.telephony.TelephonyManager;
-
-/*
- * Check the PhoneNumberUtils utility class works as expected.
- *
- */
-
-public class PhoneNumberUtilsUnitTest extends AndroidTestCase {
-    private String mVoiceMailNumber;
-    private static final String TAG = "PhoneNumberUtilsUnitTest";
-
-    @Override
-    protected void setUp() throws Exception {
-        super.setUp();
-        // FIXME: Why are we getting a security exception here? The
-        // permission is declared in the manifest....
-        // mVoiceMailNumber = TelephonyManager.getDefault().getVoiceMailNumber();
-    }
-
-    @Override
-    protected void tearDown() throws Exception {
-        super.tearDown();
-    }
-
-    /**
-     * Basic checks for the VoiceMail number.
-     * Assumes READ_PHONE_STATE permission and we don't have it.
-     */
-    // TODO: Figure out why we don't have the permission declared in the manifest.
-    @SmallTest
-    public void testWithNumberNotEqualToVoiceMail() throws Exception {
-        assertFalse(PhoneNumberUtils.isVoiceMailNumber("911"));
-        assertFalse(PhoneNumberUtils.isVoiceMailNumber("tel:911"));
-        assertFalse(PhoneNumberUtils.isVoiceMailNumber("+18001234567"));
-        assertFalse(PhoneNumberUtils.isVoiceMailNumber(""));
-        assertFalse(PhoneNumberUtils.isVoiceMailNumber(null));
-        // FIXME:
-        // assertTrue(PhoneNumberUtils.isVoiceMailNumber(mVoiceMailNumber));
-    }
-
-}
diff --git a/test-runner/src/android/test/InstrumentationTestRunner.java b/test-runner/src/android/test/InstrumentationTestRunner.java
index 63d50c7..70d1643 100644
--- a/test-runner/src/android/test/InstrumentationTestRunner.java
+++ b/test-runner/src/android/test/InstrumentationTestRunner.java
@@ -496,9 +496,18 @@
         return null;
     }
 
+    /**
+     * Initialize the current thread as a looper.
+     * <p/>
+     * Exposed for unit testing.
+     */
+    void prepareLooper() {
+        Looper.prepare();
+    }
+
     @Override
     public void onStart() {
-        Looper.prepare();
+        prepareLooper();
 
         if (mJustCount) {
             mResults.putString(Instrumentation.REPORT_KEY_IDENTIFIER, REPORT_VALUE_ID);
@@ -521,6 +530,11 @@
                 long runTime = System.currentTimeMillis() - startTime;
 
                 resultPrinter.print(mTestRunner.getTestResult(), runTime);
+            } catch (Throwable t) {
+                // catch all exceptions so a more verbose error message can be outputted
+                writer.println(String.format("Test run aborted due to unexpected exception: %s",
+                                t.getMessage()));
+                t.printStackTrace(writer);
             } finally {
                 mResults.putString(Instrumentation.REPORT_KEY_STREAMRESULT,
                         String.format("\nTest results for %s=%s",
@@ -762,9 +776,11 @@
                             TimedTest.class).includeDetailedStats();
                 }
             } catch (SecurityException e) {
-                throw new IllegalStateException(e);
+                // ignore - the test with given name cannot be accessed. Will be handled during
+                // test execution
             } catch (NoSuchMethodException e) {
-                throw new IllegalStateException(e);
+                // ignore- the test with given name does not exist. Will be handled during test
+                // execution
             }
 
             if (mIsTimedTest && mIncludeDetailedStats) {
diff --git a/test-runner/src/android/test/ProviderTestCase2.java b/test-runner/src/android/test/ProviderTestCase2.java
index 28ecee5..1fb5538 100644
--- a/test-runner/src/android/test/ProviderTestCase2.java
+++ b/test-runner/src/android/test/ProviderTestCase2.java
@@ -27,15 +27,44 @@
 import java.io.File;
 
 /**
- * This TestCase class provides a framework for isolated testing of a single
- * ContentProvider.  It uses a {@link android.test.mock.MockContentResolver} to
- * access the provider, restricts the provider to an isolated area of the
- * filesystem (for safely creating & modifying databases & files), and injects
- * {@link android.test.IsolatedContext} to isolate the ContentProvider from the
- * rest of the running system.
- *
- * <p>This environment is created automatically by {@link #setUp} and {@link
- * #tearDown}.
+ * This test case class provides a framework for testing a single
+ * {@link ContentProvider} and for testing your app code with an
+ * isolated content provider. Instead of using the system map of
+ * providers that is based on the manifests of other applications, the test
+ * case creates its own internal map. It then uses this map to resolve providers
+ * given an authority. This allows you to inject test providers and to null out
+ * providers that you do not want to use.
+ * <p>
+ *      This test case also sets up the following mock objects:
+ * </p>
+ * <ul>
+ *      <li>
+ *          An {@link android.test.IsolatedContext} that stubs out Context methods that might
+ *          affect the rest of the running system, while allowing tests to do real file and
+ *          database work.
+ *      </li>
+ *      <li>
+ *          A {@link android.test.mock.MockContentResolver} that provides the functionality of a
+ *          regular content resolver, but uses {@link IsolatedContext}. It stubs out
+ *          {@link ContentResolver#notifyChange(Uri, ContentObserver, boolean)} to
+ *          prevent the test from affecting the running system.
+ *      </li>
+ *      <li>
+ *          An instance of the provider under test, running in an {@link IsolatedContext}.
+ *      </li>
+ * </ul>
+ * <p>
+ *      This framework is set up automatically by the base class' {@link #setUp()} method. If you
+ *      override this method, you must call the super method as the first statement in
+ *      your override.
+ * </p>
+ * <p>
+ *     In order for their tests to be run, concrete subclasses must provide their own
+ *     constructor with no arguments. This constructor must call
+ *     {@link #ProviderTestCase2(Class, String)} as  its first operation.
+ * </p>
+ * For more information on content provider testing, please see
+ * <a href="{@docRoot}guide/topics/testing/provider_testing.html">Content Provider Testing</a>.
  */
 public abstract class ProviderTestCase2<T extends ContentProvider> extends AndroidTestCase {
 
@@ -54,34 +83,53 @@
 
         @Override
         public File getDir(String name, int mode) {
-            // name the directory so the directory will be seperated from
+            // name the directory so the directory will be separated from
             // one created through the regular Context
             return getContext().getDir("mockcontext2_" + name, mode);
         }
     }
-
+    /**
+     * Constructor.
+     *
+     * @param providerClass The class name of the provider under test
+     * @param providerAuthority The provider's authority string
+     */
     public ProviderTestCase2(Class<T> providerClass, String providerAuthority) {
         mProviderClass = providerClass;
         mProviderAuthority = providerAuthority;
     }
 
-    /**
-     * The content provider that will be set up for use in each test method.
-     */
     private T mProvider;
 
+    /**
+     * Returns the content provider created by this class in the {@link #setUp()} method.
+     * @return T An instance of the provider class given as a parameter to the test case class.
+     */
     public T getProvider() {
         return mProvider;
     }
 
+    /**
+     * Sets up the environment for the test fixture.
+     * <p>
+     * Creates a new
+     * {@link android.test.mock.MockContentResolver}, a new IsolatedContext
+     * that isolates the provider's file operations, and a new instance of
+     * the provider under test within the isolated environment.
+     * </p>
+     *
+     * @throws Exception
+     */
     @Override
     protected void setUp() throws Exception {
         super.setUp();
 
         mResolver = new MockContentResolver();
         final String filenamePrefix = "test.";
-        RenamingDelegatingContext targetContextWrapper = new RenamingDelegatingContext(
-                new MockContext2(), // The context that most methods are delegated to
+        RenamingDelegatingContext targetContextWrapper = new
+                RenamingDelegatingContext(
+                new MockContext2(), // The context that most methods are
+                                    //delegated to
                 getContext(), // The context that file methods are delegated to
                 filenamePrefix);
         mProviderContext = new IsolatedContext(mResolver, targetContextWrapper);
@@ -92,14 +140,55 @@
         mResolver.addProvider(mProviderAuthority, getProvider());
     }
 
+    /**
+     * Gets the {@link MockContentResolver} created by this class during initialization. You
+     * must use the methods of this resolver to access the provider under test.
+     *
+     * @return A {@link MockContentResolver} instance.
+     */
     public MockContentResolver getMockContentResolver() {
         return mResolver;
     }
 
+    /**
+     * Gets the {@link IsolatedContext} created by this class during initialization.
+     * @return The {@link IsolatedContext} instance
+     */
     public IsolatedContext getMockContext() {
         return mProviderContext;
     }
 
+    /**
+     * <p>
+     *      Creates a new content provider of the same type as that passed to the test case class,
+     *      with an authority name set to the authority parameter, and using an SQLite database as
+     *      the underlying data source. The SQL statement parameter is used to create the database.
+     *      This method also creates a new {@link MockContentResolver} and adds the provider to it.
+     * </p>
+     * <p>
+     *      Both the new provider and the new resolver are put into an {@link IsolatedContext}
+     *      that uses the targetContext parameter for file operations and a {@link MockContext}
+     *      for everything else. The IsolatedContext prepends the filenamePrefix parameter to
+     *      file, database, and directory names.
+     * </p>
+     * <p>
+     *      This is a convenience method for creating a "mock" provider that can contain test data.
+     * </p>
+     *
+     * @param targetContext The context to use as the basis of the IsolatedContext
+     * @param filenamePrefix A string that is prepended to file, database, and directory names
+     * @param providerClass The type of the provider being tested
+     * @param authority The authority string to associated with the test provider
+     * @param databaseName The name assigned to the database
+     * @param databaseVersion The version assigned to the database
+     * @param sql A string containing the SQL statements that are needed to create the desired
+     * database and its tables. The format is the same as that generated by the
+     * <a href="http://www.sqlite.org/sqlite.html">sqlite3</a> tool's <code>.dump</code> command.
+     * @return ContentResolver A new {@link MockContentResolver} linked to the provider
+     *
+     * @throws IllegalAccessException
+     * @throws InstantiationException
+     */
     public static <T extends ContentProvider> ContentResolver newResolverWithContentProviderFromSql(
             Context targetContext, String filenamePrefix, Class<T> providerClass, String authority,
             String databaseName, int databaseVersion, String sql)
diff --git a/test-runner/src/android/test/ServiceTestCase.java b/test-runner/src/android/test/ServiceTestCase.java
index fcb9d55..f9e8adb 100644
--- a/test-runner/src/android/test/ServiceTestCase.java
+++ b/test-runner/src/android/test/ServiceTestCase.java
@@ -31,42 +31,64 @@
 /**
  * This test case provides a framework in which you can test Service classes in
  * a controlled environment.  It provides basic support for the lifecycle of a
- * Service, and hooks by which you can inject various dependencies and control
+ * Service, and hooks with which you can inject various dependencies and control
  * the environment in which your Service is tested.
  *
  * <p><b>Lifecycle Support.</b>
- * Every Service is designed to be accessed within a specific sequence of
- * calls.  <insert link to Service lifecycle doc here>. 
- * In order to support the lifecycle of a Service, this test case will make the
- * following calls at the following times.
+ * A Service is accessed with a specific sequence of
+ * calls, as documented in the section
+ * <a href="http://developer.android.com/guide/topics/fundamentals.html#servlife">
+ * Service lifecycle</a> in the Developer Guide. In order to support the lifecycle of a Service,
+ * <code>ServiceTestCase</code> enforces this protocol:
  *
- * <ul><li>The test case will not call onCreate() until your test calls 
- * {@link #startService} or {@link #bindService}.  This gives you a chance
- * to set up or adjust any additional framework or test logic before
- * onCreate().</li>
- * <li>When your test calls {@link #startService} or {@link #bindService}
- * the test case will call onCreate(), and then call the corresponding entry point in your service.
- * It will record any parameters or other support values necessary to support the lifecycle.</li>
- * <li>After your test completes, the test case {@link #tearDown} function is
- * automatically called, and it will stop and destroy your service with the appropriate
- * calls (depending on how your test invoked the service.)</li>
+ * <ul>
+ *      <li>
+ *          The {@link #setUp()} method is called before each test method. The base implementation
+ *          gets the system context. If you override <code>setUp()</code>, you must call
+ *          <code>super.setUp()</code> as the first statement in your override.
+ *      </li>
+ *      <li>
+ *          The test case waits to call {@link android.app.Service#onCreate()} until one of your
+ *          test methods calls {@link #startService} or {@link #bindService}.  This gives you an
+ *          opportunity to set up or adjust any additional framework or test logic before you test
+ *          the running service.
+ *      </li>
+ *      <li>
+ *          When one of your test methods calls {@link #startService ServiceTestCase.startService()}
+ *          or {@link #bindService  ServiceTestCase.bindService()}, the test case calls
+ *          {@link android.app.Service#onCreate() Service.onCreate()} and then calls either
+ *          {@link android.app.Service#startService(Intent) Service.startService(Intent)} or
+ *          {@link android.app.Service#bindService(Intent, ServiceConnection, int)
+ *          Service.bindService(Intent, ServiceConnection, int)}, as appropriate. It also stores
+ *          values needed to track and support the lifecycle.
+ *      </li>
+ *      <li>
+ *          After each test method finishes, the test case calls the {@link #tearDown} method. This
+ *          method stops and destroys the service with the appropriate calls, depending on how the
+ *          service was started. If you override <code>tearDown()</code>, your must call the
+ *          <code>super.tearDown()</code> as the last statement in your override.
+ *      </li>
  * </ul>
- * 
- * <p><b>Dependency Injection.</b>
- * Every service has two inherent dependencies, the {@link android.content.Context Context} in
- * which it runs, and the {@link android.app.Application Application} with which it is associated.
- * This framework allows you to inject modified, mock, or isolated replacements for these 
- * dependencies, and thus perform a true unit test.
- * 
- * <p>If simply run your tests as-is, your Service will be injected with a fully-functional
- * Context, and a generic {@link android.test.mock.MockApplication MockApplication} object.
- * You can create and inject alternatives to either of these by calling 
- * {@link AndroidTestCase#setContext(Context) setContext()} or 
- * {@link #setApplication setApplication()}.  You must do this <i>before</i> calling
- * startService() or bindService().  The test framework provides a
- * number of alternatives for Context, including {link android.test.mock.MockContext MockContext}, 
- * {@link android.test.RenamingDelegatingContext RenamingDelegatingContext}, and 
- * {@link android.content.ContextWrapper ContextWrapper}.
+ *
+ * <p>
+ *      <strong>Dependency Injection.</strong>
+ *      A service has two inherent dependencies, its {@link android.content.Context Context} and its
+ *      associated {@link android.app.Application Application}. The ServiceTestCase framework
+ *      allows you to inject modified, mock, or isolated replacements for these dependencies, and
+ *      thus perform unit tests with controlled dependencies in an isolated environment.
+ * </p>
+ * <p>
+ *      By default, the test case is injected with a full system context and a generic
+ *      {@link android.test.mock.MockApplication MockApplication} object. You can inject
+ *      alternatives to either of these by invoking
+ *      {@link AndroidTestCase#setContext(Context) setContext()} or
+ *      {@link #setApplication setApplication()}.  You must do this <em>before</em> calling
+ *      startService() or bindService().  The test framework provides a
+ *      number of alternatives for Context, including
+ *      {link android.test.mock.MockContext MockContext},
+ *      {@link android.test.RenamingDelegatingContext RenamingDelegatingContext},
+ *      {@link android.content.ContextWrapper ContextWrapper}, and
+ *      {@link android.test.IsolatedContext}.
  */
 public abstract class ServiceTestCase<T extends Service> extends AndroidTestCase {
 
@@ -75,6 +97,10 @@
     private Context mSystemContext;
     private Application mApplication;
 
+    /**
+     * Constructor
+     * @param serviceClass The type of the service under test.
+     */
     public ServiceTestCase(Class<T> serviceClass) {
         mServiceClass = serviceClass;
     }
@@ -88,30 +114,35 @@
     private int mServiceId;
 
     /**
-     * @return Returns the actual service under test.
+     * @return An instance of the service under test. This instance is created automatically when
+     * a test calls {@link #startService} or {@link #bindService}.
      */
     public T getService() {
         return mService;
     }
 
     /**
-     * This will do the work to instantiate the Service under test.  After this, your test 
-     * code must also start and stop the service.
+     * Gets the current system context and stores it.
+     *
+     * Extend this method to do your own test initialization. If you do so, you
+     * must call <code>super.setUp()</code> as the first statement in your override. The method is
+     * called before each test method is executed.
      */
     @Override
     protected void setUp() throws Exception {
         super.setUp();
-        
+
         // get the real context, before the individual tests have a chance to muck with it
         mSystemContext = getContext();
 
     }
-    
+
     /**
-     * Create the service under test and attach all injected dependencies (Context, Application) to
-     * it.  This will be called automatically by {@link #startService} or by {@link #bindService}.
-     * If you wish to call {@link AndroidTestCase#setContext(Context) setContext()} or 
-     * {@link #setApplication setApplication()}, you must do so  before calling this function.
+     * Creates the service under test and attaches all injected dependencies
+     * (Context, Application) to it.  This is called automatically by {@link #startService} or
+     * by {@link #bindService}.
+     * If you need to call {@link AndroidTestCase#setContext(Context) setContext()} or
+     * {@link #setApplication setApplication()}, do so before calling this method.
      */
     protected void setupService() {
         mService = null;
@@ -131,66 +162,74 @@
                 getApplication(),
                 null                // mocked services don't talk with the activity manager
                 );
-        
+
         assertNotNull(mService);
-        
+
         mServiceId = new Random().nextInt();
         mServiceAttached = true;
     }
-    
+
     /**
-     * Start the service under test, in the same way as if it was started by
-     * {@link android.content.Context#startService Context.startService()}, providing the 
-     * arguments it supplied.  If you use this method to start the service, it will automatically
-     * be stopped by {@link #tearDown}.
-     *  
-     * @param intent The Intent as if supplied to {@link android.content.Context#startService}.
+     * Starts the service under test, in the same way as if it were started by
+     * {@link android.content.Context#startService(Intent) Context.startService(Intent)} with
+     * an {@link android.content.Intent} that identifies a service.
+     * If you use this method to start the service, it is automatically stopped by
+     * {@link #tearDown}.
+     *
+     * @param intent An Intent that identifies a service, of the same form as the Intent passed to
+     * {@link android.content.Context#startService(Intent) Context.startService(Intent)}.
      */
     protected void startService(Intent intent) {
-        assertFalse(mServiceStarted);
-        assertFalse(mServiceBound);
-        
         if (!mServiceAttached) {
             setupService();
         }
         assertNotNull(mService);
-        
+
         if (!mServiceCreated) {
             mService.onCreate();
             mServiceCreated = true;
         }
-        mService.onStart(intent, mServiceId);
-        
+        mService.onStartCommand(intent, 0, mServiceId);
+
         mServiceStarted = true;
     }
-    
-    /**
-     * Start the service under test, in the same way as if it was started by
-     * {@link android.content.Context#bindService Context.bindService()}, providing the 
-     * arguments it supplied.
-     *  
-     * Return the communication channel to the service.  May return null if 
-     * clients can not bind to the service.  The returned
-     * {@link android.os.IBinder} is usually for a complex interface
-     * that has been <a href="{@docRoot}guide/developing/tools/aidl.html">described using
-     * aidl</a>. 
-     * 
-     * Note:  In order to test with this interface, your service must implement a getService()
-     * method, as shown in samples.ApiDemos.app.LocalService.
 
-     * @param intent The Intent as if supplied to {@link android.content.Context#bindService}.
-     * 
-     * @return Return an IBinder for making further calls into the Service.
+    /**
+     * <p>
+     *      Starts the service under test, in the same way as if it were started by
+     *      {@link android.content.Context#bindService(Intent, ServiceConnection, int)
+     *      Context.bindService(Intent, ServiceConnection, flags)} with an
+     *      {@link android.content.Intent} that identifies a service.
+     * </p>
+     * <p>
+     *      Notice that the parameters are different. You do not provide a
+     *      {@link android.content.ServiceConnection} object or the flags parameter. Instead,
+     *      you only provide the Intent. The method returns an object whose type is a
+     *      subclass of {@link android.os.IBinder}, or null if the method fails. An IBinder
+     *      object refers to a communication channel between the application and
+     *      the service. The flag is assumed to be {@link android.content.Context#BIND_AUTO_CREATE}.
+     * </p>
+     * <p>
+     *      See <a href="{@docRoot}guide/developing/tools/aidl.html">Designing a Remote Interface
+     *      Using AIDL</a> for more information about the communication channel object returned
+     *      by this method.
+     * </p>
+     * Note:  To be able to use bindService in a test, the service must implement getService()
+     * method. An example of this is in the ApiDemos sample application, in the
+     * LocalService demo.
+     *
+     * @param intent An Intent object of the form expected by
+     * {@link android.content.Context#bindService}.
+     *
+     * @return An object whose type is a subclass of IBinder, for making further calls into
+     * the service.
      */
     protected IBinder bindService(Intent intent) {
-        assertFalse(mServiceStarted);
-        assertFalse(mServiceBound);
-        
         if (!mServiceAttached) {
             setupService();
         }
         assertNotNull(mService);
-        
+
         if (!mServiceCreated) {
             mService.onCreate();
             mServiceCreated = true;
@@ -198,15 +237,15 @@
         // no extras are expected by unbind
         mServiceIntent = intent.cloneFilter();
         IBinder result = mService.onBind(intent);
-        
+
         mServiceBound = true;
         return result;
     }
-    
+
     /**
-     * This will make the necessary calls to stop (or unbind) the Service under test, and
-     * call onDestroy().  Ordinarily this will be called automatically (by {@link #tearDown}, but
-     * you can call it directly from your test in order to check for proper shutdown behaviors.
+     * Makes the necessary calls to stop (or unbind) the service under test, and
+     * calls onDestroy().  Ordinarily this is called automatically (by {@link #tearDown}, but
+     * you can call it directly from your test in order to check for proper shutdown behavior.
      */
     protected void shutdownService() {
         if (mServiceStarted) {
@@ -220,13 +259,18 @@
             mService.onDestroy();
         }
     }
-    
+
     /**
-     * Shuts down the Service under test.  Also makes sure all resources are cleaned up and 
-     * garbage collected before moving on to the next
-     * test.  Subclasses that override this method should make sure they call super.tearDown()
-     * at the end of the overriding method.
-     * 
+     * <p>
+     *      Shuts down the service under test.  Ensures all resources are cleaned up and
+     *      garbage collected before moving on to the next test. This method is called after each
+     *      test method.
+     * </p>
+     * <p>
+     *      Subclasses that override this method must call <code>super.tearDown()</code> as their
+     *      last statement.
+     * </p>
+     *
      * @throws Exception
      */
     @Override
@@ -234,45 +278,54 @@
         shutdownService();
         mService = null;
 
-        // Scrub out members - protects against memory leaks in the case where someone 
+        // Scrub out members - protects against memory leaks in the case where someone
         // creates a non-static inner class (thus referencing the test case) and gives it to
         // someone else to hold onto
         scrubClass(ServiceTestCase.class);
 
         super.tearDown();
     }
-    
+
     /**
-     * Set the application for use during the test.  If your test does not call this function,
-     * a new {@link android.test.mock.MockApplication MockApplication} object will be generated.
-     * 
-     * @param application The Application object that will be injected into the Service under test.
+     * Sets the application that is used during the test.  If you do not call this method,
+     * a new {@link android.test.mock.MockApplication MockApplication} object is used.
+     *
+     * @param application The Application object that is used by the service under test.
+     *
+     * @see #getApplication()
      */
     public void setApplication(Application application) {
         mApplication = application;
     }
 
     /**
-     * Return the Application object being used by the Service under test.
-     * 
-     * @return Returns the application object.
-     * 
+     * Returns the Application object in use by the service under test.
+     *
+     * @return The application object.
+     *
      * @see #setApplication
      */
     public Application getApplication() {
         return mApplication;
     }
-    
+
     /**
-     * Return a real (not mocked or instrumented) system Context that can be used when generating
-     * Mock or other Context objects for your Service under test.
-     * 
-     * @return Returns a reference to a normal Context.
+     * Returns the real system context that is saved by {@link #setUp()}. Use it to create
+     * mock or other types of context objects for the service under test.
+     *
+     * @return A normal system context.
      */
     public Context getSystemContext() {
         return mSystemContext;
     }
 
+    /**
+     * Tests that {@link #setupService()} runs correctly and issues an
+     * {@link junit.framework.Assert#assertNotNull(String, Object)} if it does.
+     * You can override this test method if you wish.
+     *
+     * @throws Exception
+     */
     public void testServiceTestCaseSetUpProperly() throws Exception {
         setupService();
         assertNotNull("service should be launched successfully", mService);
diff --git a/test-runner/src/android/test/mock/MockContentResolver.java b/test-runner/src/android/test/mock/MockContentResolver.java
index 3a1dc36c..ab511f8 100644
--- a/test-runner/src/android/test/mock/MockContentResolver.java
+++ b/test-runner/src/android/test/mock/MockContentResolver.java
@@ -28,29 +28,59 @@
 import java.util.Map;
 
 /**
- * A mock {@link android.content.ContentResolver} class that isolates the test code from the real
- * content system.  All methods are non-functional and throw
- * {@link java.lang.UnsupportedOperationException}.  
- *
- * <p>This only isolates the test code in ways that have proven useful so far. More should be
- * added as they become a problem.
+ * <p>
+ *      An extension of {@link android.content.ContentResolver} that is designed for
+ *      testing.
+ * </p>
+ * <p>
+ *      MockContentResolver overrides Android's normal way of resolving providers by
+ *      authority. To have access to a provider based on its authority, users of
+ *      MockContentResolver first instantiate the provider and
+ *      use {@link MockContentResolver#addProvider(String, ContentProvider)}. Resolution of an
+ *      authority occurs entirely within MockContentResolver.
+ * </p>
+ * <p>
+ *      Users can also set an authority's entry in the map to null, so that a provider is completely
+ *      mocked out.
+ * </p>
  */
+
 public class MockContentResolver extends ContentResolver {
     Map<String, ContentProvider> mProviders;
 
+    /*
+     * Creates a local map of providers. This map is used instead of the global map when an
+     * API call tries to acquire a provider.
+     */
     public MockContentResolver() {
         super(null);
         mProviders = Maps.newHashMap();
     }
 
+    /**
+     * Adds access to a provider based on its authority
+     *
+     * @param name The authority name associated with the provider.
+     * @param provider An instance of {@link android.content.ContentProvider} or one of its
+     * subclasses, or null.
+     */
     public void addProvider(String name, ContentProvider provider) {
+
+        /*
+         * Maps the authority to the provider locally.
+         */
         mProviders.put(name, provider);
     }
 
     /** @hide */
     @Override
     protected IContentProvider acquireProvider(Context context, String name) {
+
+        /*
+         * Gets the content provider from the local map
+         */
         final ContentProvider provider = mProviders.get(name);
+
         if (provider != null) {
             return provider.getIContentProvider();
         } else {
@@ -64,7 +94,18 @@
         return true;
     }
 
+    /**
+     * Overrides {@link android.content.ContentResolver#notifyChange(Uri, ContentObserver, boolean)
+     * ContentResolver.notifChange(Uri, ContentObserver, boolean)}. All parameters are ignored.
+     * The method hides providers linked to MockContentResolver from other observers in the system.
+     *
+     * @param uri (Ignored) The uri of the content provider.
+     * @param observer (Ignored) The observer that originated the change.
+     * @param syncToNetwork (Ignored) If true, attempt to sync the change to the network.
+     */
     @Override
-    public void notifyChange(Uri uri, ContentObserver observer, boolean syncToNetwork) {
+    public void notifyChange(Uri uri,
+            ContentObserver observer,
+            boolean syncToNetwork) {
     }
 }
diff --git a/test-runner/src/android/test/mock/MockPackageManager.java b/test-runner/src/android/test/mock/MockPackageManager.java
index 4964f03..e96173b 100644
--- a/test-runner/src/android/test/mock/MockPackageManager.java
+++ b/test-runner/src/android/test/mock/MockPackageManager.java
@@ -267,6 +267,26 @@
     public Drawable getApplicationIcon(String packageName) throws NameNotFoundException {
         throw new UnsupportedOperationException();
     }
+    
+    @Override
+    public Drawable getActivityLogo(ComponentName activityName) throws NameNotFoundException {
+        throw new UnsupportedOperationException();
+    }
+
+    @Override
+    public Drawable getActivityLogo(Intent intent) throws NameNotFoundException {
+        throw new UnsupportedOperationException();
+    }
+
+    @Override
+    public Drawable getApplicationLogo(ApplicationInfo info) {
+        throw new UnsupportedOperationException();
+    }
+
+    @Override
+    public Drawable getApplicationLogo(String packageName) throws NameNotFoundException {
+        throw new UnsupportedOperationException();
+    }
 
     @Override
     public CharSequence getText(String packageName, int resid, ApplicationInfo appInfo) {
@@ -463,4 +483,9 @@
     public boolean isSafeMode() {
         throw new UnsupportedOperationException();
     }
+
+    @Override
+    public void setPackageObbPath(String packageName, String path) {
+        throw new UnsupportedOperationException();
+    }
 }
diff --git a/test-runner/tests/src/android/test/InstrumentationTestRunnerTest.java b/test-runner/tests/src/android/test/InstrumentationTestRunnerTest.java
index 6db72ad..d98b217 100644
--- a/test-runner/tests/src/android/test/InstrumentationTestRunnerTest.java
+++ b/test-runner/tests/src/android/test/InstrumentationTestRunnerTest.java
@@ -16,6 +16,7 @@
 
 package android.test;
 
+import android.app.Instrumentation;
 import android.content.Context;
 import android.os.Bundle;
 import android.test.mock.MockContext;
@@ -89,6 +90,42 @@
         
     }
 
+    /**
+     * Test that runtime exceptions during runTest are handled gracefully
+     */
+    public void testUnhandledException() throws Exception {
+        StubAndroidTestRunner stubAndroidTestRunner = new StubAndroidTestRunner() {
+            @Override
+            public void runTest() {
+                throw new RuntimeException();
+            }
+        };
+        StubInstrumentationTestRunner instrumentationTestRunner = new StubInstrumentationTestRunner(
+                new StubContext("com.google.foo.tests"),
+                new StubContext(mTargetContextPackageName), stubAndroidTestRunner);
+        instrumentationTestRunner.onCreate(new Bundle());
+        instrumentationTestRunner.onStart();
+        assertTrue("Instrumentation did not finish", instrumentationTestRunner.isFinished());
+        // ensure a meaningful error message placed in results
+        String resultsData = instrumentationTestRunner.mResults.getString(
+                Instrumentation.REPORT_KEY_STREAMRESULT);
+        assertTrue("Instrumentation results is missing RuntimeException",
+                resultsData.contains("RuntimeException"));
+    }
+
+    /**
+     * Test that specifying a method which does not exist is handled gracefully
+     */
+    public void testBadMethodArgument() throws Exception {
+        String testClassName = PlaceHolderTest.class.getName();
+        String invalidMethodName = "testNoExist";
+        String classAndMethod = testClassName + "#" + invalidMethodName;
+        mInstrumentationTestRunner.onCreate(createBundle(
+                InstrumentationTestRunner.ARGUMENT_TEST_CLASS, classAndMethod));
+        assertTestRunnerCalledWithExpectedParameters(testClassName,
+                invalidMethodName);
+    }
+
     public void testDelayParameter() throws Exception {
         int delayMsec = 1000;
         Bundle args = new Bundle();
@@ -170,6 +207,7 @@
         private TestSuite mTestSuite;
         private TestSuite mDefaultTestSuite;
         private String mPackageNameForDefaultTests;
+        private Bundle mResults;
 
         public StubInstrumentationTestRunner(Context context, Context targetContext,
                 AndroidTestRunner androidTestRunner) {
@@ -200,6 +238,7 @@
 
         public void finish(int resultCode, Bundle results) {
             mFinished = true;
+            mResults = results;
         }
 
         public boolean isStarted() {
@@ -221,6 +260,11 @@
         public String getPackageNameForDefaultTests() {
             return mPackageNameForDefaultTests;
         }
+
+        @Override
+        void prepareLooper() {
+            // ignore
+        }
     }
 
     private static class StubContext extends MockContext {
diff --git a/tests/DpiTest/Android.mk b/tests/DpiTest/Android.mk
index 3596c39..5463a17 100644
--- a/tests/DpiTest/Android.mk
+++ b/tests/DpiTest/Android.mk
@@ -7,4 +7,6 @@
 
 LOCAL_MODULE_TAGS := tests
 
+LOCAL_AAPT_FLAGS = -c 120dpi -c 240dpi -c 160dpi
+
 include $(BUILD_PACKAGE)
diff --git a/tests/DpiTest/res/values-xlarge-long/strings.xml b/tests/DpiTest/res/values-xlarge-long/strings.xml
new file mode 100644
index 0000000..86ab660
--- /dev/null
+++ b/tests/DpiTest/res/values-xlarge-long/strings.xml
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2007 The Android Open Source Project
+
+     Licensed under the Apache License, Version 2.0 (the "License");
+     you may not use this file except in compliance with the License.
+     You may obtain a copy of the License at
+  
+          http://www.apache.org/licenses/LICENSE-2.0
+  
+     Unless required by applicable law or agreed to in writing, software
+     distributed under the License is distributed on an "AS IS" BASIS,
+     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     See the License for the specific language governing permissions and
+     limitations under the License.
+-->
+
+<resources>
+    <string name="act_title">DpiTest: XLarge Long</string>
+</resources>
diff --git a/tests/DpiTest/res/values-xlarge-notlong/strings.xml b/tests/DpiTest/res/values-xlarge-notlong/strings.xml
new file mode 100644
index 0000000..1eebbf4
--- /dev/null
+++ b/tests/DpiTest/res/values-xlarge-notlong/strings.xml
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2007 The Android Open Source Project
+
+     Licensed under the Apache License, Version 2.0 (the "License");
+     you may not use this file except in compliance with the License.
+     You may obtain a copy of the License at
+  
+          http://www.apache.org/licenses/LICENSE-2.0
+  
+     Unless required by applicable law or agreed to in writing, software
+     distributed under the License is distributed on an "AS IS" BASIS,
+     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     See the License for the specific language governing permissions and
+     limitations under the License.
+-->
+
+<resources>
+    <string name="act_title">DpiTest: XLarge NotLong</string>
+</resources>
diff --git a/tests/DpiTest/res/values-xlarge/strings.xml b/tests/DpiTest/res/values-xlarge/strings.xml
new file mode 100644
index 0000000..7e5d4b0
--- /dev/null
+++ b/tests/DpiTest/res/values-xlarge/strings.xml
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2007 The Android Open Source Project
+
+     Licensed under the Apache License, Version 2.0 (the "License");
+     you may not use this file except in compliance with the License.
+     You may obtain a copy of the License at
+  
+          http://www.apache.org/licenses/LICENSE-2.0
+  
+     Unless required by applicable law or agreed to in writing, software
+     distributed under the License is distributed on an "AS IS" BASIS,
+     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     See the License for the specific language governing permissions and
+     limitations under the License.
+-->
+
+<resources>
+    <string name="act_title">DpiTest: XLarge</string>
+</resources>
diff --git a/tests/DpiTest/src/com/google/android/test/dpi/DpiTestActivity.java b/tests/DpiTest/src/com/google/android/test/dpi/DpiTestActivity.java
index cde2c71..6192a3c 100644
--- a/tests/DpiTest/src/com/google/android/test/dpi/DpiTestActivity.java
+++ b/tests/DpiTest/src/com/google/android/test/dpi/DpiTestActivity.java
@@ -56,7 +56,8 @@
             ApplicationInfo ai = app.getPackageManager().getApplicationInfo(
                     "com.google.android.test.dpi", 0);
             if (noCompat) {
-                ai.flags |= ApplicationInfo.FLAG_SUPPORTS_LARGE_SCREENS
+                ai.flags |= ApplicationInfo.FLAG_SUPPORTS_XLARGE_SCREENS
+                    | ApplicationInfo.FLAG_SUPPORTS_LARGE_SCREENS
                     | ApplicationInfo.FLAG_SUPPORTS_NORMAL_SCREENS
                     | ApplicationInfo.FLAG_SUPPORTS_SMALL_SCREENS
                     | ApplicationInfo.FLAG_RESIZEABLE_FOR_SCREENS
diff --git a/tests/FixVibrateSetting/Android.mk b/tests/FixVibrateSetting/Android.mk
new file mode 100644
index 0000000..2a88e5a
--- /dev/null
+++ b/tests/FixVibrateSetting/Android.mk
@@ -0,0 +1,11 @@
+LOCAL_PATH:= $(call my-dir)
+include $(CLEAR_VARS)
+
+LOCAL_MODULE_TAGS := optional
+
+LOCAL_SRC_FILES := $(call all-subdir-java-files)
+
+LOCAL_PACKAGE_NAME := FixVibrateSetting
+LOCAL_CERTIFICATE := platform
+
+include $(BUILD_PACKAGE)
diff --git a/tests/FixVibrateSetting/AndroidManifest.xml b/tests/FixVibrateSetting/AndroidManifest.xml
new file mode 100644
index 0000000..007d682
--- /dev/null
+++ b/tests/FixVibrateSetting/AndroidManifest.xml
@@ -0,0 +1,14 @@
+<manifest xmlns:android="http://schemas.android.com/apk/res/android"
+        package="com.android.fixvibratesetting">
+    <uses-permission android:name="android.permission.VIBRATE" />
+
+    <application>
+        <activity android:name="FixVibrateSetting" android:label="@string/app_label">
+            <intent-filter>
+                <action android:name="android.intent.action.MAIN" />
+                <category android:name="android.intent.category.DEFAULT" />
+                <category android:name="android.intent.category.LAUNCHER" />
+            </intent-filter>
+        </activity>
+    </application>
+</manifest>
diff --git a/tests/FixVibrateSetting/res/drawable-hdpi/stat_sys_warning.png b/tests/FixVibrateSetting/res/drawable-hdpi/stat_sys_warning.png
new file mode 100644
index 0000000..37c8853
--- /dev/null
+++ b/tests/FixVibrateSetting/res/drawable-hdpi/stat_sys_warning.png
Binary files differ
diff --git a/tests/FixVibrateSetting/res/drawable-mdpi/stat_sys_warning.png b/tests/FixVibrateSetting/res/drawable-mdpi/stat_sys_warning.png
new file mode 100644
index 0000000..be00f47
--- /dev/null
+++ b/tests/FixVibrateSetting/res/drawable-mdpi/stat_sys_warning.png
Binary files differ
diff --git a/tests/FixVibrateSetting/res/layout/fix_vibrate.xml b/tests/FixVibrateSetting/res/layout/fix_vibrate.xml
new file mode 100644
index 0000000..c505e65
--- /dev/null
+++ b/tests/FixVibrateSetting/res/layout/fix_vibrate.xml
@@ -0,0 +1,46 @@
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    android:layout_width="match_parent"
+    android:layout_height="match_parent"
+    android:orientation="vertical"
+    >
+
+    <TextView android:id="@+id/current_setting"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:layout_gravity="left"
+        android:layout_marginTop="30dp"
+        android:layout_marginBottom="50dp"
+        android:paddingLeft="8dp"
+        android:paddingTop="4dp"
+        android:textSize="20sp"
+        android:textColor="#ffffffff"
+        />
+
+    <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:gravity="center"
+        android:orientation="horizontal"
+        >
+        <Button android:id="@+id/fix"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:text="@string/fix"
+            />
+
+        <Button android:id="@+id/unfix"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:text="@string/unfix"
+            />
+    </LinearLayout>
+
+    <Button android:id="@+id/test"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:layout_gravity="center"
+        android:text="@string/test"
+        />
+
+</LinearLayout>
+
diff --git a/tests/FixVibrateSetting/res/values/strings.xml b/tests/FixVibrateSetting/res/values/strings.xml
new file mode 100644
index 0000000..269cef3
--- /dev/null
+++ b/tests/FixVibrateSetting/res/values/strings.xml
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2007 The Android Open Source Project
+
+     Licensed under the Apache License, Version 2.0 (the "License");
+     you may not use this file except in compliance with the License.
+     You may obtain a copy of the License at
+  
+          http://www.apache.org/licenses/LICENSE-2.0
+  
+     Unless required by applicable law or agreed to in writing, software
+     distributed under the License is distributed on an "AS IS" BASIS,
+     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     See the License for the specific language governing permissions and
+     limitations under the License.
+-->
+
+<resources>
+    <string name="app_label">Fix Vibrate</string>
+    <string name="title">Fix vibrate setting</string>
+    <string name="current_setting">"Ringer: %1$s\nNotification: %2$s"</string>
+    <string name="fix">Fix the setting</string>
+    <string name="unfix">Break the setting</string>
+    <string name="test">Test the setting</string>
+</resources>
+
diff --git a/tests/FixVibrateSetting/src/com/android/fixvibratesetting/FixVibrateSetting.java b/tests/FixVibrateSetting/src/com/android/fixvibratesetting/FixVibrateSetting.java
new file mode 100644
index 0000000..947ea78
--- /dev/null
+++ b/tests/FixVibrateSetting/src/com/android/fixvibratesetting/FixVibrateSetting.java
@@ -0,0 +1,123 @@
+/*
+ * Copyright (C) 2008 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.android.fixvibratesetting;
+
+import android.app.Activity;
+import android.app.Notification;
+import android.app.NotificationManager;
+import android.app.PendingIntent;
+import android.content.Intent;
+import android.media.AudioManager;
+import android.util.Log;
+import android.view.View;
+import android.widget.TextView;
+import android.os.Bundle;
+
+public class FixVibrateSetting extends Activity implements View.OnClickListener
+{
+    AudioManager mAudioManager;
+    NotificationManager mNotificationManager;
+    TextView mCurrentSetting;
+    View mFix;
+    View mUnfix;
+    View mTest;
+
+    @Override
+    public void onCreate(Bundle icicle) {
+        super.onCreate(icicle);
+
+        setContentView(R.layout.fix_vibrate);
+
+        mAudioManager = (AudioManager)getSystemService(AUDIO_SERVICE);
+        mNotificationManager = (NotificationManager)getSystemService(NOTIFICATION_SERVICE);
+
+        mCurrentSetting = (TextView)findViewById(R.id.current_setting);
+
+        mFix = findViewById(R.id.fix);
+        mFix.setOnClickListener(this);
+
+        mUnfix = findViewById(R.id.unfix);
+        mUnfix.setOnClickListener(this);
+
+        mTest = findViewById(R.id.test);
+        mTest.setOnClickListener(this);
+    }
+
+    @Override
+    public void onResume() {
+        super.onResume();
+
+        update();
+    }
+
+    private String getSettingValue(int vibrateType) {
+        int setting = mAudioManager.getVibrateSetting(vibrateType);
+        switch (setting) {
+            case AudioManager.VIBRATE_SETTING_OFF:
+                return "off";
+            case AudioManager.VIBRATE_SETTING_ON:
+                return "on";
+            case AudioManager.VIBRATE_SETTING_ONLY_SILENT:
+                return "silent-only";
+            default:
+                return "unknown";
+        }
+    }
+
+    public void onClick(View v) {
+        if (v == mFix) {
+            fix();
+            update();
+        } else if (v == mUnfix) {
+            unfix();
+            update();
+        } else if (v == mTest) {
+            test();
+            update();
+        }
+    }
+
+    private void update() {
+        String ringer = getSettingValue(AudioManager.VIBRATE_TYPE_RINGER);
+        String notification = getSettingValue(AudioManager.VIBRATE_TYPE_NOTIFICATION);
+        String text = getString(R.string.current_setting, ringer, notification);
+        mCurrentSetting.setText(text);
+    }
+
+    private void fix() {
+        mAudioManager.setVibrateSetting(AudioManager.VIBRATE_TYPE_NOTIFICATION,
+                AudioManager.VIBRATE_SETTING_ON);
+    }
+
+    private void unfix() {
+        mAudioManager.setVibrateSetting(AudioManager.VIBRATE_TYPE_NOTIFICATION,
+                AudioManager.VIBRATE_SETTING_OFF);
+    }
+
+    private void test() {
+        Notification n = new Notification(R.drawable.stat_sys_warning, "Test notification",
+                        System.currentTimeMillis());
+        Intent intent = new Intent(this, FixVibrateSetting.class);
+        PendingIntent pending = PendingIntent.getActivity(this, 0, intent, 0);
+        n.setLatestEventInfo(this, "Test notification", "Test notification", pending);
+
+        n.vibrate = new long[] { 0, 700, 500, 1000 };
+        n.flags |= Notification.FLAG_AUTO_CANCEL;
+        mNotificationManager.notify(1, n);
+    }
+}
+
diff --git a/tests/StatusBar/Android.mk b/tests/StatusBar/Android.mk
index 18fcad0..502657f 100644
--- a/tests/StatusBar/Android.mk
+++ b/tests/StatusBar/Android.mk
@@ -8,4 +8,6 @@
 LOCAL_PACKAGE_NAME := StatusBarTest
 LOCAL_CERTIFICATE := platform
 
+LOCAL_PROGUARD_ENABLED := disabled
+
 include $(BUILD_PACKAGE)
diff --git a/tests/StatusBar/AndroidManifest.xml b/tests/StatusBar/AndroidManifest.xml
index 21fb951..c1ca618 100644
--- a/tests/StatusBar/AndroidManifest.xml
+++ b/tests/StatusBar/AndroidManifest.xml
@@ -35,5 +35,7 @@
                 <category android:name="android.intent.category.LAUNCHER" />
             </intent-filter>
         </activity>
+        <activity android:name="TestAlertActivity" android:theme="@android:style/Theme.Dialog">
+        </activity>
     </application>
 </manifest>
diff --git a/tests/StatusBar/res/drawable-hdpi/stat_sys_phone.png b/tests/StatusBar/res/drawable-hdpi/stat_sys_phone.png
new file mode 100644
index 0000000..9815553
--- /dev/null
+++ b/tests/StatusBar/res/drawable-hdpi/stat_sys_phone.png
Binary files differ
diff --git a/tests/StatusBar/res/drawable-mdpi/stat_sys_phone.png b/tests/StatusBar/res/drawable-mdpi/stat_sys_phone.png
new file mode 100644
index 0000000..402abc7
--- /dev/null
+++ b/tests/StatusBar/res/drawable-mdpi/stat_sys_phone.png
Binary files differ
diff --git a/tests/StatusBar/res/layout/test_alert.xml b/tests/StatusBar/res/layout/test_alert.xml
new file mode 100644
index 0000000..325146c
--- /dev/null
+++ b/tests/StatusBar/res/layout/test_alert.xml
@@ -0,0 +1,57 @@
+<?xml version="1.0" encoding="utf-8"?>
+<LinearLayout
+    xmlns:android="http://schemas.android.com/apk/res/android"
+    android:layout_width="match_parent"
+    android:layout_height="match_parent"
+    android:gravity="center">
+
+    <LinearLayout
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:layout_gravity="center"
+        android:gravity="center_horizontal"
+        android:orientation="vertical"
+        >
+
+        <TextView android:id="@+id/alertTitle"
+            style="?android:attr/textAppearanceLarge"
+            android:padding="5dip"
+            android:singleLine="true"
+            android:ellipsize="end"
+            android:gravity="center"
+            android:layout_width="match_parent"
+            android:layout_height="wrap_content" />
+
+        <LinearLayout
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            style="@android:style/ButtonBar">
+
+            <Button
+                android:id="@+id/snooze"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:layout_weight="3"
+                android:onClick="dismiss"
+                android:text="Snooze" />
+
+            <!-- blank stretchable view -->
+            <View
+                android:layout_width="2dip"
+                android:layout_height="2dip"
+                android:layout_gravity="fill_horizontal"
+                android:layout_weight="1"/>
+
+            <Button
+                android:id="@+id/dismiss"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:layout_weight="3"
+                android:onClick="dismiss"
+                android:text="Dismiss" />
+
+        </LinearLayout>
+
+    </LinearLayout>
+
+</LinearLayout>
diff --git a/tests/StatusBar/src/com/android/statusbartest/NotificationTestList.java b/tests/StatusBar/src/com/android/statusbartest/NotificationTestList.java
index f548145..4d071e3 100644
--- a/tests/StatusBar/src/com/android/statusbartest/NotificationTestList.java
+++ b/tests/StatusBar/src/com/android/statusbartest/NotificationTestList.java
@@ -21,6 +21,7 @@
 import android.widget.ArrayAdapter;
 import android.view.View;
 import android.widget.ListView;
+import android.content.Context;
 import android.content.ContentResolver;
 import android.content.Intent;
 import android.app.Notification;
@@ -43,6 +44,7 @@
     Vibrator mVibrator = new Vibrator();
     Handler mHandler = new Handler();
 
+    long mActivityCreateTime = System.currentTimeMillis();
     long mChronometerBase = 0;
 
     @Override
@@ -60,7 +62,7 @@
     private Test[] mTests = new Test[] {
         new Test("Off and sound") {
             public void run() {
-                PowerManager pm = (PowerManager)NotificationTestList.this.getSystemService("power");
+                PowerManager pm = (PowerManager)NotificationTestList.this.getSystemService(Context.POWER_SERVICE);
                 PowerManager.WakeLock wl = 
                             pm.newWakeLock(PowerManager.PARTIAL_WAKE_LOCK, "sound");
                 wl.acquire();
@@ -121,19 +123,49 @@
             }
         },
 
-        new Test("Bad resource #2") {
-            public void run()
-            {
-                Notification n = new Notification(NotificationTestList.this,
-                            R.drawable.ic_statusbar_missedcall,
-                            null, System.currentTimeMillis()-(1000*60*60*24),
-                            "(453) 123-2328",
-                            "", null);
-                n.contentView.setInt(1 /*bogus*/, "bogus method", 666);
-                mNM.notify(2, n);
+        new Test("Bad Icon #1 (when=create)") {
+            public void run() {
+                Notification n = new Notification(R.layout.chrono_notification /* not an icon */,
+                        null, mActivityCreateTime);
+                n.setLatestEventInfo(NotificationTestList.this, "Persistent #1",
+                            "This is the same notification!!!", makeIntent());
+                mNM.notify(1, n);
             }
         },
 
+        new Test("Bad Icon #1 (when=now)") {
+            public void run() {
+                Notification n = new Notification(R.layout.chrono_notification /* not an icon */,
+                        null, System.currentTimeMillis());
+                n.setLatestEventInfo(NotificationTestList.this, "Persistent #1",
+                            "This is the same notification!!!", makeIntent());
+                mNM.notify(1, n);
+            }
+        },
+
+        new Test("Bad resource #1 (when=create)") {
+            public void run() {
+                Notification n = new Notification(R.drawable.icon2,
+                        null, mActivityCreateTime);
+                n.setLatestEventInfo(NotificationTestList.this, "Persistent #1",
+                            "This is the same notification!!!", makeIntent());
+                n.contentView.setInt(1 /*bogus*/, "bogus method", 666);
+                mNM.notify(1, n);
+            }
+        },
+
+        new Test("Bad resource #1 (when=now)") {
+            public void run() {
+                Notification n = new Notification(R.drawable.icon2,
+                        null, System.currentTimeMillis());
+                n.setLatestEventInfo(NotificationTestList.this, "Persistent #1",
+                            "This is the same notification!!!", makeIntent());
+                n.contentView.setInt(1 /*bogus*/, "bogus method", 666);
+                mNM.notify(1, n);
+            }
+        },
+
+
         new Test("Bad resource #3") {
             public void run()
             {
@@ -180,7 +212,7 @@
                                 R.drawable.icon4,
                                 null, System.currentTimeMillis(), "Stress - Latest",
                                 "Notify me!!!", null);
-                        n.flags |= Notification.FLAG_ONGOING_EVENT;
+                        //n.flags |= Notification.FLAG_ONGOING_EVENT;
                         mNM.notify(1, n);
                     }
                 }
@@ -205,6 +237,8 @@
                 Notification n = new Notification();
                 n.flags |= Notification.FLAG_SHOW_LIGHTS;
                 n.ledARGB = 0xff0000ff;
+                n.ledOnMS = 1;
+                n.ledOffMS = 0;
                 mNM.notify(1, n);
             }
         },
@@ -215,6 +249,8 @@
                 Notification n = new Notification();
                 n.flags |= Notification.FLAG_SHOW_LIGHTS;
                 n.ledARGB = 0xffff0000;
+                n.ledOnMS = 1;
+                n.ledOffMS = 0;
                 mNM.notify(1, n);
             }
         },
@@ -225,6 +261,20 @@
                 Notification n = new Notification();
                 n.flags |= Notification.FLAG_SHOW_LIGHTS;
                 n.ledARGB = 0xffffff00;
+                n.ledOnMS = 1;
+                n.ledOffMS = 0;
+                mNM.notify(1, n);
+            }
+        },
+
+        new Test("Lights off") {
+            public void run()
+            {
+                Notification n = new Notification();
+                n.flags |= Notification.FLAG_SHOW_LIGHTS;
+                n.ledARGB = 0x00000000;
+                n.ledOnMS = 0;
+                n.ledOffMS = 0;
                 mNM.notify(1, n);
             }
         },
@@ -234,7 +284,7 @@
             {
                 Notification n = new Notification();
                 n.flags |= Notification.FLAG_SHOW_LIGHTS;
-                n.ledARGB = 0xffffff00;
+                n.ledARGB = 0xff0000ff;
                 n.ledOnMS = 1300;
                 n.ledOffMS = 1300;
                 mNM.notify(1, n);
@@ -246,7 +296,7 @@
             {
                 Notification n = new Notification();
                 n.flags |= Notification.FLAG_SHOW_LIGHTS;
-                n.ledARGB = 0xffffff00;
+                n.ledARGB = 0xff0000ff;
                 n.ledOnMS = 300;
                 n.ledOffMS = 300;
                 mNM.notify(1, n);
@@ -392,7 +442,7 @@
         new Test("Persistent #1") {
             public void run() {
                 Notification n = new Notification(R.drawable.icon1, "tick tick tick",
-                        System.currentTimeMillis());
+                        mActivityCreateTime);
                 n.setLatestEventInfo(NotificationTestList.this, "Persistent #1",
                             "This is a notification!!!", makeIntent());
                 mNM.notify(1, n);
@@ -452,6 +502,16 @@
             }
         },
 
+        new Test("Persistent #1 - different icon") {
+            public void run() {
+                Notification n = new Notification(R.drawable.icon2, null,
+                        mActivityCreateTime);
+                n.setLatestEventInfo(NotificationTestList.this, "Persistent #1",
+                            "This is the same notification!!!", makeIntent());
+                mNM.notify(1, n);
+            }
+        },
+
         new Test("Chronometer Start") {
             public void run() {
                 Notification n = new Notification(R.drawable.icon2, "me me me me",
@@ -581,7 +641,7 @@
             public void run()
             {
                 PowerManager.WakeLock wl
-                        = ((PowerManager)NotificationTestList.this.getSystemService("power"))
+                        = ((PowerManager)NotificationTestList.this.getSystemService(Context.POWER_SERVICE))
                             .newWakeLock(PowerManager.PARTIAL_WAKE_LOCK, "crasher");
                 wl.acquire();
                 mHandler.postDelayed(new Runnable() {
@@ -604,9 +664,7 @@
 
     private PendingIntent makeIntent() {
         Intent intent = new Intent(Intent.ACTION_MAIN);
-        intent.setComponent(new android.content.ComponentName(
-                    "com.android.contacts",
-                    "com.android.contacts.ContactsActivity"));
+        intent.addCategory(Intent.CATEGORY_HOME);
         return PendingIntent.getActivity(this, 0, intent, 0);
     }
 
diff --git a/tests/StatusBar/src/com/android/statusbartest/StatusBarTest.java b/tests/StatusBar/src/com/android/statusbartest/StatusBarTest.java
index 06506fb..b665d2f 100644
--- a/tests/StatusBar/src/com/android/statusbartest/StatusBarTest.java
+++ b/tests/StatusBar/src/com/android/statusbartest/StatusBarTest.java
@@ -23,6 +23,7 @@
 import android.view.View;
 import android.widget.ListView;
 import android.content.Intent;
+import android.app.PendingIntent;
 import android.app.Notification;
 import android.app.NotificationManager;
 import android.app.StatusBarManager;
@@ -35,6 +36,8 @@
 import android.widget.RemoteViews;
 import android.widget.Toast;
 import android.os.PowerManager;
+import android.view.Window;
+import android.view.WindowManager;
 
 public class StatusBarTest extends TestActivity
 {
@@ -57,6 +60,56 @@
     }
 
     private Test[] mTests = new Test[] {
+        new Test("Hide") {
+            public void run() {
+                Window win = getWindow();
+                WindowManager.LayoutParams winParams = win.getAttributes();
+                winParams.flags |= WindowManager.LayoutParams.FLAG_FULLSCREEN;
+                win.setAttributes(winParams);
+            }
+        },
+        new Test("Show") {
+            public void run() {
+                Window win = getWindow();
+                WindowManager.LayoutParams winParams = win.getAttributes();
+                winParams.flags &= ~WindowManager.LayoutParams.FLAG_FULLSCREEN;
+                win.setAttributes(winParams);
+            }
+        },
+        new Test("Immersive: Enter") {
+            public void run() {
+                setImmersive(true);
+            }
+        },
+        new Test("Immersive: Exit") {
+            public void run() {
+                setImmersive(false);
+            }
+        },
+        new Test("Priority notification") {
+            public void run() {
+                Notification not = new Notification(StatusBarTest.this,
+                                R.drawable.stat_sys_phone,
+                                "Incoming call from: Imperious Leader",
+                                System.currentTimeMillis()-(1000*60*60*24),
+                                "Imperious Leader",
+                                "(888) 555-5038",
+                                null
+                                );
+                not.flags |= Notification.FLAG_HIGH_PRIORITY;
+                Intent fullScreenIntent = new Intent(StatusBarTest.this, TestAlertActivity.class);
+                int id = (int)System.currentTimeMillis(); // XXX HAX
+                fullScreenIntent.putExtra("id", id);
+                not.fullScreenIntent = PendingIntent.getActivity(
+                    StatusBarTest.this,
+                    0,
+                    fullScreenIntent,
+                    PendingIntent.FLAG_CANCEL_CURRENT);
+                // if you tap on it you should get the original alert box
+                not.contentIntent = not.fullScreenIntent;
+                mNotificationManager.notify(id, not);
+            }
+        },
         new Test("Disable Alerts") {
             public void run() {
                 mStatusBarManager.disable(StatusBarManager.DISABLE_NOTIFICATION_ALERTS);
@@ -134,13 +187,9 @@
                     }, 3000);
             }
         },
-        new Test("Expand in 3 sec.") {
+        new Test("Expand") {
             public void run() {
-                mHandler.postDelayed(new Runnable() {
-                        public void run() {
-                            mStatusBarManager.expand();
-                        }
-                    }, 3000);
+                mStatusBarManager.expand();
             }
         },
         new Test("Expand in 3 sec.") {
@@ -161,13 +210,21 @@
                     }, 3000);
             }
         },
-        new Test("Toggle in 3 sec.") {
+        new Test("More icons") {
             public void run() {
-                mHandler.postDelayed(new Runnable() {
-                        public void run() {
-                            mStatusBarManager.toggle();
-                        }
-                    }, 3000);
+                for (String slot: new String[] {
+                            "sync_failing",
+                            "gps",
+                            "bluetooth",
+                            "tty",
+                            "speakerphone",
+                            "mute",
+                            "wifi",
+                            "alarm_clock",
+                            "secure",
+                        }) {
+                    mStatusBarManager.setIconVisibility(slot, true);
+                }
             }
         },
     };
diff --git a/tests/StatusBar/src/com/android/statusbartest/TestAlertActivity.java b/tests/StatusBar/src/com/android/statusbartest/TestAlertActivity.java
new file mode 100644
index 0000000..f5876d0
--- /dev/null
+++ b/tests/StatusBar/src/com/android/statusbartest/TestAlertActivity.java
@@ -0,0 +1,37 @@
+package com.android.statusbartest;
+
+import android.app.Activity;
+import android.app.NotificationManager;
+import android.content.Intent;
+import android.os.Bundle;
+import android.util.Log;
+import android.view.View;
+
+public class TestAlertActivity extends Activity {
+    int mId;
+
+    @Override
+    public void onResume() {
+        super.onResume();
+        Log.d("StatusBarTest", "TestAlertActivity.onResume");
+        Intent intent = getIntent();
+        mId = intent.getIntExtra("id", -1);
+        Log.d("StatusBarTest", "Remembering notification id=" + mId);
+        setContentView(R.layout.test_alert);
+    }
+
+    @Override
+    public void onPause() {
+        super.onPause();
+        Log.d("StatusBarTest", "onPause: Canceling notification id=" + mId);
+        NotificationManager nm = (NotificationManager) getSystemService(NOTIFICATION_SERVICE);
+        nm.cancel(mId);
+        finish();
+    }
+
+    @SuppressWarnings({"UnusedDeclaration"})
+    public void dismiss(View v) {
+        Log.d("StatusBarTest", "TestAlertActivity.dismiss");
+        finish();
+    }
+}
diff --git a/tests/appwidgets/AppWidgetProviderTest/res/layout/test_appwidget2.xml b/tests/appwidgets/AppWidgetProviderTest/res/layout/test_appwidget2.xml
new file mode 100644
index 0000000..abc6f59
--- /dev/null
+++ b/tests/appwidgets/AppWidgetProviderTest/res/layout/test_appwidget2.xml
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2006 The Android Open Source Project
+
+     Licensed under the Apache License, Version 2.0 (the "License");
+     you may not use this file except in compliance with the License.
+     You may obtain a copy of the License at
+  
+          http://www.apache.org/licenses/LICENSE-2.0
+  
+     Unless required by applicable law or agreed to in writing, software
+     distributed under the License is distributed on an "AS IS" BASIS,
+     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     See the License for the specific language governing permissions and
+     limitations under the License.
+-->
+
+<TextView xmlns:android="http://schemas.android.com/apk/res/android"
+    android:id="@+id/oh_hai_text"
+    android:layout_width="150dp"
+    android:layout_height="150dp"
+    android:text="@string/appwidget_view_title"
+    android:background="#8fff"
+    android:textColor="#000"
+    android:textStyle="bold"
+/>
+
diff --git a/tests/appwidgets/AppWidgetProviderTest/src/com/android/tests/appwidgetprovider/TestAppWidgetProvider.java b/tests/appwidgets/AppWidgetProviderTest/src/com/android/tests/appwidgetprovider/TestAppWidgetProvider.java
index 418be65..d9c0110 100644
--- a/tests/appwidgets/AppWidgetProviderTest/src/com/android/tests/appwidgetprovider/TestAppWidgetProvider.java
+++ b/tests/appwidgets/AppWidgetProviderTest/src/com/android/tests/appwidgetprovider/TestAppWidgetProvider.java
@@ -41,6 +41,7 @@
             Log.d(TAG, "DISABLED");
         }
         else if (AppWidgetManager.ACTION_APPWIDGET_UPDATE.equals(action)) {
+            if (true) return;
             Log.d(TAG, "UPDATE");
             Bundle extras = intent.getExtras();
             int[] appWidgetIds = extras.getIntArray(AppWidgetManager.EXTRA_APPWIDGET_IDS);
diff --git a/tests/framework-tests/Android.mk b/tests/framework-tests/Android.mk
deleted file mode 100644
index 5053e7d..0000000
--- a/tests/framework-tests/Android.mk
+++ /dev/null
@@ -1 +0,0 @@
-include $(call all-subdir-makefiles)
diff --git a/tests/framework-tests/README b/tests/framework-tests/README
deleted file mode 100644
index 7b46b25..0000000
--- a/tests/framework-tests/README
+++ /dev/null
@@ -1,5 +0,0 @@
-This package contains tests which need to access package-private members in the framework code.
-To do this, the tests must be loaded in the same class loader as the classes which they are
-testing. This package is loaded in the boot classpath.
-
-Run these tests via AndroidTests -> FrameworkTests.
diff --git a/tests/framework-tests/src/Android.mk b/tests/framework-tests/src/Android.mk
deleted file mode 100644
index 54e33a4..0000000
--- a/tests/framework-tests/src/Android.mk
+++ /dev/null
@@ -1,10 +0,0 @@
-LOCAL_PATH := $(call my-dir)
-include $(CLEAR_VARS)
-
-LOCAL_SRC_FILES := $(call all-subdir-java-files)
-
-LOCAL_MODULE := framework-tests
-
-LOCAL_JAVA_LIBRARIES := android.policy_phone android.test.runner
-
-include $(BUILD_JAVA_LIBRARY)
diff --git a/tests/framework-tests/src/android/test/FrameworkTests.java b/tests/framework-tests/src/android/test/FrameworkTests.java
deleted file mode 100644
index cb3f493..0000000
--- a/tests/framework-tests/src/android/test/FrameworkTests.java
+++ /dev/null
@@ -1,40 +0,0 @@
-/*
- * Copyright (C) 2007 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package android.test;
-
-import com.android.internal.os.LoggingPrintStreamTest;
-import junit.framework.TestSuite;
-import com.android.internal.http.multipart.MultipartTest;
-import com.android.internal.policy.impl.LockPatternKeyguardViewTest;
-
-/**
- * Tests that are loaded in the boot classpath along with the Android framework
- * classes. This enables you to access package-private members in the framework
- * classes; doing so is not possible when the test classes are loaded in an
- * application classloader.
- */
-public class FrameworkTests {
-    public static TestSuite suite() {
-        TestSuite suite = new TestSuite(FrameworkTests.class.getName());
-
-        suite.addTestSuite(MultipartTest.class);
-        suite.addTestSuite(LoggingPrintStreamTest.class);
-        suite.addTestSuite(LockPatternKeyguardViewTest.class);
-
-        return suite;
-    }
-}
diff --git a/tests/framework-tests/src/android/text/PackedIntVectorTest.java b/tests/framework-tests/src/android/text/PackedIntVectorTest.java
deleted file mode 100644
index 78cdee9..0000000
--- a/tests/framework-tests/src/android/text/PackedIntVectorTest.java
+++ /dev/null
@@ -1,159 +0,0 @@
-/*
- * Copyright (C) 2007 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package android.text;
-
-import android.text.PackedIntVector;
-import junit.framework.TestCase;
-
-/**
- * PackedIntVectorTest tests the features of android.util.PackedIntVector.
- */
-public class PackedIntVectorTest extends TestCase {
- 
-    public void testBasic() throws Exception {
-        for (int width = 0; width < 10; width++) {
-            PackedIntVector p = new PackedIntVector(width);
-            int[] ins = new int[width];
-
-            for (int height = width * 2; height < width * 4; height++) {
-                assertEquals(p.width(), width);
-
-                // Test adding rows.
-
-                for (int i = 0; i < height; i++) {
-                    int at;
-
-                    if (i % 2 == 0) {
-                        at = i;
-                    } else {
-                        at = p.size() - i;
-                    }
-
-                    for (int j = 0; j < width; j++) {
-                        ins[j] = i + j;
-                    }
-
-                    if (i == height / 2) {
-                        p.insertAt(at, null);
-                    } else {
-                        p.insertAt(at, ins);
-                    }
-
-                    assertEquals(p.size(), i + 1);
-
-                    for (int j = 0; j < width; j++) {
-                        if (i == height / 2) {
-                            assertEquals(0, p.getValue(at, j));
-                        } else {
-                            assertEquals(p.getValue(at, j), i + j);
-                        }
-                    }
-                }
-
-                // Test setting values.
-
-                for (int i = 0; i < height; i++) {
-                    for (int j = 0; j < width; j++) {
-                        p.setValue(i, j, i * j);
-
-                        assertEquals(p.getValue(i, j), i * j);
-                    }
-                }
-
-                // Test offsetting values.
-
-                for (int j = 0; j < width; j++) {
-                    p.adjustValuesBelow(j * 2, j, j + 27);
-                }
-
-                for (int i = 0; i < height; i++) {
-                    for (int j = 0; j < width; j++) {
-                        int expect = i * j;
-
-                        if (i >= j * 2) {
-                            expect += j + 27;
-                        }
-
-                        assertEquals(p.getValue(i, j), expect);
-                    }
-                }
-
-                for (int j = 0; j < width; j++) {
-                    p.adjustValuesBelow(j, j, j * j + 14);
-                }
-
-                for (int i = 0; i < height; i++) {
-                    for (int j = 0; j < width; j++) {
-                        int expect = i * j;
-
-                        if (i >= j * 2) {
-                            expect += j + 27;
-                        }
-                        if (i >= j) {
-                            expect += j * j + 14;
-                        }
-
-                        assertEquals(p.getValue(i, j), expect);
-                    }
-                }
-
-                // Test undoing offsets.
-
-                for (int j = 0; j < width; j++) {
-                    p.adjustValuesBelow(j * 2, j, -(j + 27));
-                    p.adjustValuesBelow(j, j, -(j * j + 14));
-                }
-
-                for (int i = 0; i < height; i++) {
-                    for (int j = 0; j < width; j++) {
-                        assertEquals(p.getValue(i, j), i * j);
-                    }
-                }
-
-                // Test deleting rows.
-
-                while (p.size() > 0) {
-                    int osize = p.size();
-                    int del = osize / 3;
-
-                    if (del == 0) {
-                        del = 1;
-                    }
-
-                    int at = (osize - del) / 2;
-                    p.deleteAt(at, del);
-
-                    assertEquals(p.size(), osize - del);
-
-                    for (int i = 0; i < at; i++) {
-                        for (int j = 0; j < width; j++) {
-                            assertEquals(p.getValue(i, j), i * j);
-                        }
-                    }
-
-                    for (int i = at; i < p.size(); i++) {
-                        for (int j = 0; j < width; j++) {
-                            assertEquals(p.getValue(i, j), (i + height - p.size()) * j);
-                        }
-                    }
-                }
-
-                assertEquals(0, p.size());
-            }
-        }
-    }
-}
diff --git a/tests/framework-tests/src/com/android/internal/policy/impl/LockPatternKeyguardViewTest.java b/tests/framework-tests/src/com/android/internal/policy/impl/LockPatternKeyguardViewTest.java
deleted file mode 100644
index 1e57bd2..0000000
--- a/tests/framework-tests/src/com/android/internal/policy/impl/LockPatternKeyguardViewTest.java
+++ /dev/null
@@ -1,350 +0,0 @@
-/*
- * Copyright (C) 2008 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.android.internal.policy.impl;
-
-import android.content.Context;
-import com.android.internal.telephony.IccCard;
-import android.content.res.Configuration;
-import android.test.AndroidTestCase;
-import android.view.View;
-import android.view.KeyEvent;
-import com.android.internal.widget.LockPatternUtils;
-import com.google.android.collect.Lists;
-
-import java.util.List;
-
-/**
- * Tests for {@link com.android.internal.policy.impl.LockPatternKeyguardView},
- * which handles the management of screens while the keyguard is showing.
- */
-public class LockPatternKeyguardViewTest extends AndroidTestCase {
-    private MockUpdateMonitor mUpdateMonitor;
-    private LockPatternUtils mLockPatternUtils;
-    private TestableLockPatternKeyguardView mLPKV;
-    private MockKeyguardCallback mKeyguardViewCallback;
-
-    private static class MockUpdateMonitor extends KeyguardUpdateMonitor {
-
-        public IccCard.State simState = IccCard.State.READY;
-
-        private MockUpdateMonitor(Context context) {
-            super(context);
-        }
-
-        @Override
-        public IccCard.State getSimState() {
-            return simState;
-        }
-    }
-
-    private static class MockLockPatternUtils extends LockPatternUtils {
-        boolean isLockPatternEnabled = true;
-        public boolean isPermanentlyLocked = false;
-
-        public MockLockPatternUtils() {
-            super(null);
-        }
-
-        @Override
-        public boolean isLockPatternEnabled() {
-            return isLockPatternEnabled;
-        }
-
-        @Override
-        public void setLockPatternEnabled(boolean lockPatternEnabled) {
-            isLockPatternEnabled = lockPatternEnabled;
-        }
-
-        @Override
-        public boolean isPermanentlyLocked() {
-            return isPermanentlyLocked;
-        }
-
-        public void setPermanentlyLocked(boolean permanentlyLocked) {
-            isPermanentlyLocked = permanentlyLocked;
-        }
-    }
-
-    private static class MockKeyguardScreen extends View implements KeyguardScreen {
-
-        private int mOnPauseCount = 0;
-        private int mOnResumeCount = 0;
-        private int mCleanupCount = 0;
-
-        private MockKeyguardScreen(Context context) {
-            super(context);
-            setFocusable(true);
-        }
-
-        /** {@inheritDoc} */
-        public boolean needsInput() {
-            return false;
-        }
-
-        /** {@inheritDoc} */
-        public void onPause() {
-            mOnPauseCount++;
-        }
-
-        /** {@inheritDoc} */
-        public void onResume() {
-            mOnResumeCount++;
-        }
-
-        /** {@inheritDoc} */
-        public void cleanUp() {
-            mCleanupCount++;
-        }
-
-        public int getOnPauseCount() {
-            return mOnPauseCount;
-        }
-
-        public int getOnResumeCount() {
-            return mOnResumeCount;
-        }
-
-        public int getCleanupCount() {
-            return mCleanupCount;
-        }
-    }
-
-    /**
-     * Allows us to inject the lock and unlock views to simulate their behavior
-     * and detect their creation.
-     */
-    private static class TestableLockPatternKeyguardView extends LockPatternKeyguardView {
-        private List<MockKeyguardScreen> mInjectedLockScreens;
-        private List<MockKeyguardScreen> mInjectedUnlockScreens;
-
-
-
-        private TestableLockPatternKeyguardView(Context context, KeyguardUpdateMonitor updateMonitor,
-                LockPatternUtils lockPatternUtils, KeyguardWindowController controller) {
-            super(context, updateMonitor, lockPatternUtils, controller);
-        }
-
-        @Override
-        View createLockScreen() {
-            final MockKeyguardScreen newView = new MockKeyguardScreen(getContext());
-            if (mInjectedLockScreens == null) mInjectedLockScreens = Lists.newArrayList();
-            mInjectedLockScreens.add(newView);
-            return newView;
-        }
-
-        @Override
-        View createUnlockScreenFor(UnlockMode unlockMode) {
-            final MockKeyguardScreen newView = new MockKeyguardScreen(getContext());
-            if (mInjectedUnlockScreens == null)  mInjectedUnlockScreens = Lists.newArrayList();
-            mInjectedUnlockScreens.add(newView);
-            return newView;
-        }
-
-        public List<MockKeyguardScreen> getInjectedLockScreens() {
-            return mInjectedLockScreens;
-        }
-
-        public List<MockKeyguardScreen> getInjectedUnlockScreens() {
-            return mInjectedUnlockScreens;
-        }
-    }
-
-    private static class MockKeyguardCallback implements KeyguardViewCallback {
-
-        private int mPokeWakelockCount = 0;
-        private int mKeyguardDoneCount = 0;
-
-        public void pokeWakelock() {
-            mPokeWakelockCount++;
-        }
-
-        public void pokeWakelock(int millis) {
-            mPokeWakelockCount++;
-        }
-
-        public void keyguardDone(boolean authenticated) {
-            mKeyguardDoneCount++;
-        }
-
-        public void keyguardDoneDrawing() {
-
-        }
-
-        public int getPokeWakelockCount() {
-            return mPokeWakelockCount;
-        }
-
-        public int getKeyguardDoneCount() {
-            return mKeyguardDoneCount;
-        }
-    }
-
-    @Override
-    protected void setUp() throws Exception {
-        super.setUp();
-        mUpdateMonitor = new MockUpdateMonitor(getContext());
-        mLockPatternUtils = new MockLockPatternUtils();
-
-        mLPKV = new TestableLockPatternKeyguardView(getContext(), mUpdateMonitor,
-                mLockPatternUtils, new KeyguardWindowController() {
-            public void setNeedsInput(boolean needsInput) {
-            }
-        });
-        mKeyguardViewCallback = new MockKeyguardCallback();
-        mLPKV.setCallback(mKeyguardViewCallback);
-    }
-
-    public void testStateAfterCreatedWhileScreenOff() {
-
-        assertEquals(1, mLPKV.getInjectedLockScreens().size());
-        assertEquals(1, mLPKV.getInjectedUnlockScreens().size());
-
-        MockKeyguardScreen lockScreen = mLPKV.getInjectedLockScreens().get(0);
-        MockKeyguardScreen unlockScreen = mLPKV.getInjectedUnlockScreens().get(0);
-
-        assertEquals(0, lockScreen.getOnPauseCount());
-        assertEquals(0, lockScreen.getOnResumeCount());
-        assertEquals(0, lockScreen.getCleanupCount());
-
-        assertEquals(0, unlockScreen.getOnPauseCount());
-        assertEquals(0, unlockScreen.getOnResumeCount());
-        assertEquals(0, unlockScreen.getCleanupCount());
-
-        assertEquals(0, mKeyguardViewCallback.getPokeWakelockCount());
-        assertEquals(0, mKeyguardViewCallback.getKeyguardDoneCount());
-    }
-
-    public void testWokenByNonMenuKey() {
-        mLPKV.wakeWhenReadyTq(0);
-
-        // should have poked the wakelock to turn on the screen
-        assertEquals(1, mKeyguardViewCallback.getPokeWakelockCount());
-
-        // shouldn't be any additional views created
-        assertEquals(1, mLPKV.getInjectedLockScreens().size());
-        assertEquals(1, mLPKV.getInjectedUnlockScreens().size());
-        MockKeyguardScreen lockScreen = mLPKV.getInjectedLockScreens().get(0);
-        MockKeyguardScreen unlockScreen = mLPKV.getInjectedUnlockScreens().get(0);
-
-        // lock screen should be only visible one
-        assertEquals(View.VISIBLE, lockScreen.getVisibility());
-        assertEquals(View.GONE, unlockScreen.getVisibility());
-
-        // on resume not called until screen turns on
-        assertEquals(0, lockScreen.getOnPauseCount());
-        assertEquals(0, lockScreen.getOnResumeCount());
-        assertEquals(0, lockScreen.getCleanupCount());
-
-        assertEquals(0, unlockScreen.getOnPauseCount());
-        assertEquals(0, unlockScreen.getOnResumeCount());
-        assertEquals(0, unlockScreen.getCleanupCount());
-
-        // simulate screen turning on
-        mLPKV.onScreenTurnedOn();
-
-        assertEquals(0, lockScreen.getOnPauseCount());
-        assertEquals(1, lockScreen.getOnResumeCount());
-        assertEquals(0, lockScreen.getCleanupCount());
-
-        assertEquals(0, unlockScreen.getOnPauseCount());
-        assertEquals(0, unlockScreen.getOnResumeCount());
-        assertEquals(0, unlockScreen.getCleanupCount());
-    }
-
-    public void testWokenByMenuKeyWhenPatternSet() {
-        assertEquals(true, mLockPatternUtils.isLockPatternEnabled());
-
-        mLPKV.wakeWhenReadyTq(KeyEvent.KEYCODE_MENU);
-
-        // should have poked the wakelock to turn on the screen
-        assertEquals(1, mKeyguardViewCallback.getPokeWakelockCount());
-
-        // shouldn't be any additional views created
-        assertEquals(1, mLPKV.getInjectedLockScreens().size());
-        assertEquals(1, mLPKV.getInjectedUnlockScreens().size());
-        MockKeyguardScreen lockScreen = mLPKV.getInjectedLockScreens().get(0);
-        MockKeyguardScreen unlockScreen = mLPKV.getInjectedUnlockScreens().get(0);
-
-        // unlock screen should be only visible one
-        assertEquals(View.GONE, lockScreen.getVisibility());
-        assertEquals(View.VISIBLE, unlockScreen.getVisibility());
-    }
-
-    public void testScreenRequestsRecreation() {
-        mLPKV.wakeWhenReadyTq(0);
-        mLPKV.onScreenTurnedOn();
-
-        assertEquals(1, mLPKV.getInjectedLockScreens().size());
-        assertEquals(1, mLPKV.getInjectedUnlockScreens().size());
-        MockKeyguardScreen lockScreen = mLPKV.getInjectedLockScreens().get(0);
-
-        assertEquals(0, lockScreen.getOnPauseCount());
-        assertEquals(1, lockScreen.getOnResumeCount());
-
-        // simulate screen asking to be recreated
-        mLPKV.mKeyguardScreenCallback.recreateMe(new Configuration());
-
-        // should have been recreated
-        assertEquals(2, mLPKV.getInjectedLockScreens().size());
-        assertEquals(2, mLPKV.getInjectedUnlockScreens().size());
-
-        // both old screens should have been cleaned up
-        assertEquals(1, mLPKV.getInjectedLockScreens().get(0).getCleanupCount());
-        assertEquals(1, mLPKV.getInjectedUnlockScreens().get(0).getCleanupCount());
-
-        // old lock screen should have been paused
-        assertEquals(1, mLPKV.getInjectedLockScreens().get(0).getOnPauseCount());
-        assertEquals(0, mLPKV.getInjectedUnlockScreens().get(0).getOnPauseCount());
-
-        // new lock screen should have been resumed
-        assertEquals(1, mLPKV.getInjectedLockScreens().get(1).getOnResumeCount());
-        assertEquals(0, mLPKV.getInjectedUnlockScreens().get(1).getOnResumeCount());
-    }
-
-    public void testMenuDoesntGoToUnlockScreenOnWakeWhenPukLocked() {
-        // PUK locked
-        mUpdateMonitor.simState = IccCard.State.PUK_REQUIRED;
-
-        // wake by menu
-        mLPKV.wakeWhenReadyTq(KeyEvent.KEYCODE_MENU);
-
-        assertEquals(1, mLPKV.getInjectedLockScreens().size());
-        assertEquals(1, mLPKV.getInjectedUnlockScreens().size());
-        MockKeyguardScreen lockScreen = mLPKV.getInjectedLockScreens().get(0);
-        MockKeyguardScreen unlockScreen = mLPKV.getInjectedUnlockScreens().get(0);
-
-        // lock screen should be only visible one
-        assertEquals(View.VISIBLE, lockScreen.getVisibility());
-        assertEquals(View.GONE, unlockScreen.getVisibility());
-    }
-
-    public void testMenuGoesToLockScreenWhenDeviceNotSecure() {
-        mLockPatternUtils.setLockPatternEnabled(false);
-
-        // wake by menu
-        mLPKV.wakeWhenReadyTq(KeyEvent.KEYCODE_MENU);
-
-        assertEquals(1, mLPKV.getInjectedLockScreens().size());
-        assertEquals(1, mLPKV.getInjectedUnlockScreens().size());
-        MockKeyguardScreen lockScreen = mLPKV.getInjectedLockScreens().get(0);
-        MockKeyguardScreen unlockScreen = mLPKV.getInjectedUnlockScreens().get(0);
-
-        // lock screen should be only visible one
-        assertEquals(View.VISIBLE, lockScreen.getVisibility());
-        assertEquals(View.GONE, unlockScreen.getVisibility());
-    }
-}
diff --git a/tools/aapt/AaptAssets.cpp b/tools/aapt/AaptAssets.cpp
index efc9619..d6cfb12 100644
--- a/tools/aapt/AaptAssets.cpp
+++ b/tools/aapt/AaptAssets.cpp
@@ -766,6 +766,11 @@
                 (out->screenLayout&~ResTable_config::MASK_SCREENSIZE)
                 | ResTable_config::SCREENSIZE_LARGE;
         return true;
+    } else if (strcmp(name, "xlarge") == 0) {
+        if (out) out->screenLayout =
+                (out->screenLayout&~ResTable_config::MASK_SCREENSIZE)
+                | ResTable_config::SCREENSIZE_XLARGE;
+        return true;
     }
 
     return false;
diff --git a/tools/aapt/ResourceTable.cpp b/tools/aapt/ResourceTable.cpp
index a2f085a..755b93b 100644
--- a/tools/aapt/ResourceTable.cpp
+++ b/tools/aapt/ResourceTable.cpp
@@ -573,6 +573,7 @@
                         const String16& parentIdent,
                         const String16& itemIdent,
                         int32_t curFormat,
+                        bool isFormatted,
                         bool pseudolocalize,
                         const bool overwrite,
                         ResourceTable* outTable)
@@ -583,7 +584,7 @@
     String16 str;
     Vector<StringPool::entry_style_span> spans;
     err = parseStyledString(bundle, in->getPrintableSource().string(),
-                            block, item16, &str, &spans,
+                            block, item16, &str, &spans, isFormatted,
                             pseudolocalize);
     if (err != NO_ERROR) {
         return err;
@@ -616,6 +617,7 @@
                         const String16& curTag,
                         bool curIsStyled,
                         int32_t curFormat,
+                        bool isFormatted,
                         bool pseudolocalize,
                         const bool overwrite,
                         ResourceTable* outTable)
@@ -626,7 +628,7 @@
     Vector<StringPool::entry_style_span> spans;
     err = parseStyledString(bundle, in->getPrintableSource().string(), block,
                             curTag, &str, curIsStyled ? &spans : NULL,
-                            pseudolocalize);
+                            isFormatted, pseudolocalize);
 
     if (err < NO_ERROR) { 
         return err;
@@ -709,12 +711,18 @@
     // useful attribute names and special values
     const String16 name16("name");
     const String16 translatable16("translatable");
+    const String16 formatted16("formatted");
     const String16 false16("false");
 
     const String16 myPackage(assets->getPackage());
 
     bool hasErrors = false;
-    
+
+    bool fileIsTranslatable = true;
+    if (strstr(in->getPrintableSource().string(), "donottranslate") != NULL) {
+        fileIsTranslatable = false;
+    }
+
     DefaultKeyedVector<String16, uint32_t> nextPublicId(0);
 
     ResXMLTree::event_code_t code;
@@ -751,6 +759,7 @@
             bool curIsBagReplaceOnOverwrite = false;
             bool curIsStyled = false;
             bool curIsPseudolocalizable = false;
+            bool curIsFormatted = fileIsTranslatable;
             bool localHasErrors = false;
 
             if (strcmp16(block.getElementName(&len), skip16.string()) == 0) {
@@ -1136,6 +1145,7 @@
                 String8 locale(rawLocale);
                 String16 name;
                 String16 translatable;
+                String16 formatted;
 
                 size_t n = block.getAttributeCount();
                 for (size_t i = 0; i < n; i++) {
@@ -1145,11 +1155,14 @@
                         name.setTo(block.getAttributeStringValue(i, &length));
                     } else if (strcmp16(attr, translatable16.string()) == 0) {
                         translatable.setTo(block.getAttributeStringValue(i, &length));
+                    } else if (strcmp16(attr, formatted16.string()) == 0) {
+                        formatted.setTo(block.getAttributeStringValue(i, &length));
                     }
                 }
                 
                 if (name.size() > 0) {
                     if (translatable == false16) {
+                        curIsFormatted = false;
                         // Untranslatable strings must only exist in the default [empty] locale
                         if (locale.size() > 0) {
                             fprintf(stderr, "aapt: warning: string '%s' in %s marked untranslatable but exists"
@@ -1167,6 +1180,10 @@
                     } else {
                         outTable->addLocalization(name, locale);
                     }
+
+                    if (formatted == false16) {
+                        curIsFormatted = false;
+                    }
                 }
 
                 curTag = &string16;
@@ -1356,7 +1373,7 @@
                         block.getPosition(&parserPosition);
 
                         err = parseAndAddBag(bundle, in, &block, curParams, myPackage, curType,
-                                ident, parentIdent, itemIdent, curFormat, 
+                                ident, parentIdent, itemIdent, curFormat, curIsFormatted,
                                 false, overwrite, outTable);
                         if (err == NO_ERROR) {
                             if (curIsPseudolocalizable && localeIsDefined(curParams)
@@ -1365,8 +1382,8 @@
 #if 1
                                 block.setPosition(parserPosition);
                                 err = parseAndAddBag(bundle, in, &block, pseudoParams, myPackage,
-                                        curType, ident, parentIdent, itemIdent, curFormat, true,
-                                        overwrite, outTable);
+                                        curType, ident, parentIdent, itemIdent, curFormat,
+                                        curIsFormatted, true, overwrite, outTable);
 #endif
                             }
                         } 
@@ -1389,7 +1406,8 @@
                 block.getPosition(&parserPosition);
 
                 err = parseAndAddEntry(bundle, in, &block, curParams, myPackage, curType, ident,
-                        *curTag, curIsStyled, curFormat, false, overwrite, outTable);
+                        *curTag, curIsStyled, curFormat, curIsFormatted,
+                        false, overwrite, outTable);
 
                 if (err < NO_ERROR) { // Why err < NO_ERROR instead of err != NO_ERROR?
                     hasErrors = localHasErrors = true;
@@ -1400,7 +1418,8 @@
                         // pseudolocalize here
                         block.setPosition(parserPosition);
                         err = parseAndAddEntry(bundle, in, &block, pseudoParams, myPackage, curType,
-                                ident, *curTag, curIsStyled, curFormat, true, overwrite, outTable);
+                                ident, *curTag, curIsStyled, curFormat,
+                                curIsFormatted, true, overwrite, outTable);
                         if (err != NO_ERROR) {
                             hasErrors = localHasErrors = true;
                         }
diff --git a/tools/aapt/XMLNode.cpp b/tools/aapt/XMLNode.cpp
index 4c59288..57ff47a 100644
--- a/tools/aapt/XMLNode.cpp
+++ b/tools/aapt/XMLNode.cpp
@@ -68,12 +68,118 @@
     return String16(namespaceUri, namespaceUri.size()-prefixSize, prefixSize);
 }
 
+status_t hasSubstitutionErrors(const char* fileName,
+                               ResXMLTree* inXml,
+                               String16 str16)
+{
+    const char16_t* str = str16.string();
+    const char16_t* p = str;
+    const char16_t* end = str + str16.size();
+
+    bool nonpositional = false;
+    int argCount = 0;
+
+    while (p < end) {
+        /*
+         * Look for the start of a Java-style substitution sequence.
+         */
+        if (*p == '%' && p + 1 < end) {
+            p++;
+
+            // A literal percent sign represented by %%
+            if (*p == '%') {
+                p++;
+                continue;
+            }
+
+            argCount++;
+
+            if (*p >= '0' && *p <= '9') {
+                do {
+                    p++;
+                } while (*p >= '0' && *p <= '9');
+                if (*p != '$') {
+                    // This must be a size specification instead of position.
+                    nonpositional = true;
+                }
+            } else if (*p == '<') {
+                // Reusing last argument; bad idea since it can be re-arranged.
+                nonpositional = true;
+                p++;
+
+                // Optionally '$' can be specified at the end.
+                if (p < end && *p == '$') {
+                    p++;
+                }
+            } else {
+                nonpositional = true;
+            }
+
+            // Ignore flags and widths
+            while (p < end && (*p == '-' ||
+                    *p == '#' ||
+                    *p == '+' ||
+                    *p == ' ' ||
+                    *p == ',' ||
+                    *p == '(' ||
+                    (*p >= '0' && *p <= '9'))) {
+                p++;
+            }
+
+            /*
+             * This is a shortcut to detect strings that are going to Time.format()
+             * instead of String.format()
+             *
+             * Comparison of String.format() and Time.format() args:
+             *
+             * String: ABC E GH  ST X abcdefgh  nost x
+             *   Time:    DEFGHKMS W Za  d   hkm  s w yz
+             *
+             * Therefore we know it's definitely Time if we have:
+             *     DFKMWZkmwyz
+             */
+            if (p < end) {
+                switch (*p) {
+                case 'D':
+                case 'F':
+                case 'K':
+                case 'M':
+                case 'W':
+                case 'Z':
+                case 'k':
+                case 'm':
+                case 'w':
+                case 'y':
+                case 'z':
+                    return NO_ERROR;
+                }
+            }
+        }
+
+        p++;
+    }
+
+    /*
+     * If we have more than one substitution in this string and any of them
+     * are not in positional form, give the user an error.
+     */
+    if (argCount > 1 && nonpositional) {
+        SourcePos(String8(fileName), inXml->getLineNumber()).error(
+                "Multiple substitutions specified in non-positional format; "
+                "did you mean to add the formatted=\"true\" attribute?\n");
+        return NOT_ENOUGH_DATA;
+    }
+
+    return NO_ERROR;
+}
+
 status_t parseStyledString(Bundle* bundle,
                            const char* fileName,
                            ResXMLTree* inXml,
                            const String16& endTag,
                            String16* outString,
                            Vector<StringPool::entry_style_span>* outSpans,
+                           bool isFormatted,
                            bool pseudolocalize)
 {
     Vector<StringPool::entry_style_span> spanStack;
@@ -101,7 +207,11 @@
                 std::string pseudo = pseudolocalize_string(orig);
                 curString.append(String16(String8(pseudo.c_str())));
             } else {
-                curString.append(text);
+                if (isFormatted && hasSubstitutionErrors(fileName, inXml, text) != NO_ERROR) {
+                    return UNKNOWN_ERROR;
+                } else {
+                    curString.append(text);
+                }
             }
         } else if (code == ResXMLTree::START_TAG) {
             const String16 element16(inXml->getElementName(&len));
diff --git a/tools/aapt/XMLNode.h b/tools/aapt/XMLNode.h
index e9a263b..05624b7 100644
--- a/tools/aapt/XMLNode.h
+++ b/tools/aapt/XMLNode.h
@@ -25,6 +25,7 @@
                            const String16& endTag,
                            String16* outString,
                            Vector<StringPool::entry_style_span>* outSpans,
+                           bool isFormatted,
                            bool isPseudolocalizable);
 
 void printXMLBlock(ResXMLTree* block);
diff --git a/tools/aidl/aidl.cpp b/tools/aidl/aidl.cpp
index fc658f5..f17f66b 100644
--- a/tools/aidl/aidl.cpp
+++ b/tools/aidl/aidl.cpp
@@ -55,7 +55,7 @@
             printf("parcelable %s %s;\n", b->package, b->name.data);
         }
         else {
-            printf("UNKNOWN d=0x%08x d->item_type=%ld\n", (long)d, d->item_type);
+            printf("UNKNOWN d=0x%08lx d->item_type=%d\n", (long)d, d->item_type);
         }
         d = d->next;
     }
diff --git a/tools/layoutlib/Android.mk b/tools/layoutlib/Android.mk
index 6d606a9..135a633 100644
--- a/tools/layoutlib/Android.mk
+++ b/tools/layoutlib/Android.mk
@@ -52,13 +52,15 @@
 $(LOCAL_BUILT_MODULE): $(built_core_dep) \
                        $(built_framework_dep) \
                        $(built_layoutlib_create_jar)
-	@echo "host layoutlib_create: $@"
-	@mkdir -p $(dir $@)
-	@rm -f $@
+	$(hide) echo "host layoutlib_create: $@"
+	$(hide) mkdir -p $(dir $@)
+	$(hide) rm -f $@
+	$(hide) ls -l $(built_framework_classes)
 	$(hide) java -jar $(built_layoutlib_create_jar) \
 	             $@ \
 	             $(built_core_classes) \
 	             $(built_framework_classes)
+	$(hide) ls -l $(built_framework_classes)
 
 
 #
diff --git a/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/Bridge.java b/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/Bridge.java
index 4201e80..f91f601 100644
--- a/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/Bridge.java
+++ b/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/Bridge.java
@@ -46,6 +46,7 @@
 import android.util.DisplayMetrics;
 import android.util.TypedValue;
 import android.view.BridgeInflater;
+import android.view.InputChannel;
 import android.view.IWindow;
 import android.view.IWindowSession;
 import android.view.KeyEvent;
@@ -990,13 +991,21 @@
     private static final class WindowSession implements IWindowSession {
 
         @SuppressWarnings("unused")
-        public int add(IWindow arg0, LayoutParams arg1, int arg2, Rect arg3)
+        public int add(IWindow arg0, LayoutParams arg1, int arg2, Rect arg3,
+                InputChannel outInputchannel)
                 throws RemoteException {
             // pass for now.
             return 0;
         }
 
         @SuppressWarnings("unused")
+        public int addWithoutInputChannel(IWindow arg0, LayoutParams arg1, int arg2, Rect arg3)
+                throws RemoteException {
+            // pass for now.
+            return 0;
+        }
+        
+        @SuppressWarnings("unused")
         public void finishDrawing(IWindow arg0) throws RemoteException {
             // pass for now.
         }
diff --git a/vpn/java/android/net/vpn/VpnManager.java b/vpn/java/android/net/vpn/VpnManager.java
index ce522c8..ce40b5d 100644
--- a/vpn/java/android/net/vpn/VpnManager.java
+++ b/vpn/java/android/net/vpn/VpnManager.java
@@ -85,7 +85,8 @@
 
     // TODO(oam): Test VPN when EFS is enabled (will do later)...
     public static String getProfilePath() {
-        return Environment.getDataDirectory().getPath() + PROFILES_PATH;
+        // This call will return the correct path if Encrypted FS is enabled or not.
+        return Environment.getSecureDataDirectory().getPath() + PROFILES_PATH;
     }
 
     /**
diff --git a/wifi/java/android/net/wifi/IWifiManager.aidl b/wifi/java/android/net/wifi/IWifiManager.aidl
index 5fd44b1..6e0bc9d 100644
--- a/wifi/java/android/net/wifi/IWifiManager.aidl
+++ b/wifi/java/android/net/wifi/IWifiManager.aidl
@@ -83,5 +83,7 @@
     int getWifiApEnabledState();
 
     WifiConfiguration getWifiApConfiguration();
+
+    void setWifiApConfiguration(in WifiConfiguration wifiConfig);
 }
 
diff --git a/wifi/java/android/net/wifi/WifiManager.java b/wifi/java/android/net/wifi/WifiManager.java
index 970d5fc..4a22b68 100644
--- a/wifi/java/android/net/wifi/WifiManager.java
+++ b/wifi/java/android/net/wifi/WifiManager.java
@@ -824,6 +824,21 @@
     }
 
     /**
+     * Sets the Wi-Fi AP Configuration.
+     * @return {@code true} if the operation succeeded, {@code false} otherwise
+     *
+     * @hide Dont open yet
+     */
+    public boolean setWifiApConfiguration(WifiConfiguration wifiConfig) {
+        try {
+            mService.setWifiApConfiguration(wifiConfig);
+            return true;
+        } catch (RemoteException e) {
+            return false;
+        }
+    }
+
+    /**
      * Allows an application to keep the Wi-Fi radio awake.
      * Normally the Wi-Fi radio may turn off when the user has not used the device in a while.
      * Acquiring a WifiLock will keep the radio on until the lock is released.  Multiple 
diff --git a/wifi/java/android/net/wifi/WifiStateTracker.java b/wifi/java/android/net/wifi/WifiStateTracker.java
index 3813015..8b2cfc6 100644
--- a/wifi/java/android/net/wifi/WifiStateTracker.java
+++ b/wifi/java/android/net/wifi/WifiStateTracker.java
@@ -1483,18 +1483,19 @@
      * disconnect or stop command was initiated.
      */
     public synchronized boolean disconnectAndStop() {
+        boolean ret = true;;
         if (mRunState != RUN_STATE_STOPPING && mRunState != RUN_STATE_STOPPED) {
             // Take down any open network notifications
             setNotificationVisible(false, 0, false, 0);
 
-            mRunState = RUN_STATE_STOPPING;
             if (mWifiInfo.getSupplicantState() == SupplicantState.DORMANT) {
-                return stopDriver();
+                ret = stopDriver();
             } else {
-                return disconnect();
+                ret = disconnect();
             }
+            mRunState = RUN_STATE_STOPPING;
         }
-        return true;
+        return ret;
     }
 
     public synchronized boolean restart() {
@@ -1605,7 +1606,7 @@
      * @return {@code true} if the operation succeeds, {@code false} otherwise
      */
     public synchronized boolean scan(boolean forceActive) {
-        if (mWifiState.get() != WIFI_STATE_ENABLED && !isDriverStopped()) {
+        if (mWifiState.get() != WIFI_STATE_ENABLED || isDriverStopped()) {
             return false;
         }
         return WifiNative.scanCommand(forceActive);
@@ -1621,7 +1622,7 @@
      * @return {@code true} if the operation succeeds, {@code false} otherwise
      */
     public synchronized boolean setScanResultHandling(int mode) {
-        if (mWifiState.get() != WIFI_STATE_ENABLED && !isDriverStopped()) {
+        if (mWifiState.get() != WIFI_STATE_ENABLED) {
             return false;
         }
         return WifiNative.setScanResultHandlingCommand(mode);
@@ -1635,7 +1636,7 @@
      * 00:bb:cc:dd:cc:ff       2412    165     [WPA-EAP-TKIP][WPA2-EAP-CCMP]   Net2
      */
     public synchronized String scanResults() {
-        if (mWifiState.get() != WIFI_STATE_ENABLED && !isDriverStopped()) {
+        if (mWifiState.get() != WIFI_STATE_ENABLED || isDriverStopped()) {
             return null;
         }
         return WifiNative.scanResultsCommand();
@@ -1647,7 +1648,7 @@
      * @return {@code true} if the operation succeeds, {@code false} otherwise
      */
     public synchronized boolean setScanMode(boolean isScanModeActive) {
-        if (mWifiState.get() != WIFI_STATE_ENABLED && !isDriverStopped()) {
+        if (mWifiState.get() != WIFI_STATE_ENABLED || isDriverStopped()) {
             return false;
         }
         if (mIsScanModeActive != isScanModeActive) {
@@ -1662,7 +1663,7 @@
      * @return {@code true} if the operation succeeds, {@code false} otherwise
      */
     public synchronized boolean disconnect() {
-        if (mWifiState.get() != WIFI_STATE_ENABLED && !isDriverStopped()) {
+        if (mWifiState.get() != WIFI_STATE_ENABLED || isDriverStopped()) {
             return false;
         }
         return WifiNative.disconnectCommand();
@@ -1674,7 +1675,7 @@
      * @return {@code true} if the operation succeeds, {@code false} otherwise
      */
     public synchronized boolean reconnectCommand() {
-        if (mWifiState.get() != WIFI_STATE_ENABLED && !isDriverStopped()) {
+        if (mWifiState.get() != WIFI_STATE_ENABLED || isDriverStopped()) {
             return false;
         }
         return WifiNative.reconnectCommand();
@@ -1738,7 +1739,7 @@
      * @return {@code true} if the operation succeeds, {@code false} otherwise
      */
     public synchronized boolean reassociate() {
-        if (mWifiState.get() != WIFI_STATE_ENABLED && !isDriverStopped()) {
+        if (mWifiState.get() != WIFI_STATE_ENABLED || isDriverStopped()) {
             return false;
         }
         return WifiNative.reassociateCommand();
@@ -1837,7 +1838,7 @@
      * @return RSSI value, -1 on failure
      */
     public synchronized int getRssi() {
-        if (mWifiState.get() != WIFI_STATE_ENABLED && !isDriverStopped()) {
+        if (mWifiState.get() != WIFI_STATE_ENABLED || isDriverStopped()) {
             return -1;
         }
         return WifiNative.getRssiApproxCommand();
@@ -1849,7 +1850,7 @@
      * @return RSSI value, -1 on failure
      */
     public synchronized int getRssiApprox() {
-        if (mWifiState.get() != WIFI_STATE_ENABLED && !isDriverStopped()) {
+        if (mWifiState.get() != WIFI_STATE_ENABLED || isDriverStopped()) {
             return -1;
         }
         return WifiNative.getRssiApproxCommand();
@@ -1861,7 +1862,7 @@
      * @return link speed, -1 on failure
      */
     public synchronized int getLinkSpeed() {
-        if (mWifiState.get() != WIFI_STATE_ENABLED && !isDriverStopped()) {
+        if (mWifiState.get() != WIFI_STATE_ENABLED || isDriverStopped()) {
             return -1;
         }
         return WifiNative.getLinkSpeedCommand();
@@ -1873,7 +1874,7 @@
      * @return MAC address, null on failure
      */
     public synchronized String getMacAddress() {
-        if (mWifiState.get() != WIFI_STATE_ENABLED && !isDriverStopped()) {
+        if (mWifiState.get() != WIFI_STATE_ENABLED || isDriverStopped()) {
             return null;
         }
         return WifiNative.getMacAddressCommand();
@@ -1897,7 +1898,9 @@
      * @return {@code true} if the operation succeeds, {@code false} otherwise
      */
     public synchronized boolean stopDriver() {
-        if (mWifiState.get() != WIFI_STATE_ENABLED) {
+        /* Driver stop should not happen only when supplicant event
+         * DRIVER_STOPPED has already been handled */
+        if (mWifiState.get() != WIFI_STATE_ENABLED || mRunState == RUN_STATE_STOPPED) {
             return false;
         }
         return WifiNative.stopDriverCommand();
@@ -1909,7 +1912,7 @@
      * @return {@code true} if the operation succeeds, {@code false} otherwise
      */
     public synchronized boolean startPacketFiltering() {
-        if (mWifiState.get() != WIFI_STATE_ENABLED && !isDriverStopped()) {
+        if (mWifiState.get() != WIFI_STATE_ENABLED || isDriverStopped()) {
             return false;
         }
         return WifiNative.startPacketFiltering();
@@ -1921,7 +1924,7 @@
      * @return {@code true} if the operation succeeds, {@code false} otherwise
      */
     public synchronized boolean stopPacketFiltering() {
-        if (mWifiState.get() != WIFI_STATE_ENABLED && !isDriverStopped()) {
+        if (mWifiState.get() != WIFI_STATE_ENABLED || isDriverStopped()) {
             return false;
         }
         return WifiNative.stopPacketFiltering();
@@ -1935,7 +1938,7 @@
      * @return {@code true} if the operation succeeds, {@code false} otherwise
      */
     public synchronized boolean setPowerMode(int mode) {
-        if (mWifiState.get() != WIFI_STATE_ENABLED && !isDriverStopped()) {
+        if (mWifiState.get() != WIFI_STATE_ENABLED || isDriverStopped()) {
             return false;
         }
         return WifiNative.setPowerModeCommand(mode);
@@ -1948,7 +1951,7 @@
      * the number of channels is invalid.
      */
     public synchronized boolean setNumAllowedChannels() {
-        if (mWifiState.get() != WIFI_STATE_ENABLED && !isDriverStopped()) {
+        if (mWifiState.get() != WIFI_STATE_ENABLED || isDriverStopped()) {
             return false;
         }
         try {
@@ -1973,7 +1976,7 @@
      * {@code numChannels} is outside the valid range.
      */
     public synchronized boolean setNumAllowedChannels(int numChannels) {
-        if (mWifiState.get() != WIFI_STATE_ENABLED && !isDriverStopped()) {
+        if (mWifiState.get() != WIFI_STATE_ENABLED || isDriverStopped()) {
             return false;
         }
         mNumAllowedChannels = numChannels;
@@ -1986,7 +1989,7 @@
      * @return channel count, -1 on failure
      */
     public synchronized int getNumAllowedChannels() {
-        if (mWifiState.get() != WIFI_STATE_ENABLED && !isDriverStopped()) {
+        if (mWifiState.get() != WIFI_STATE_ENABLED || isDriverStopped()) {
             return -1;
         }
         return WifiNative.getNumAllowedChannelsCommand();
@@ -2002,7 +2005,7 @@
      * @return {@code true} if the operation succeeds, {@code false} otherwise
      */
     public synchronized boolean setBluetoothCoexistenceMode(int mode) {
-        if (mWifiState.get() != WIFI_STATE_ENABLED && !isDriverStopped()) {
+        if (mWifiState.get() != WIFI_STATE_ENABLED || isDriverStopped()) {
             return false;
         }
         return WifiNative.setBluetoothCoexistenceModeCommand(mode);
@@ -2016,7 +2019,7 @@
      * @param isBluetoothPlaying whether to enable or disable this mode
      */
     public synchronized void setBluetoothScanMode(boolean isBluetoothPlaying) {
-        if (mWifiState.get() != WIFI_STATE_ENABLED && !isDriverStopped()) {
+        if (mWifiState.get() != WIFI_STATE_ENABLED || isDriverStopped()) {
             return;
         }
         WifiNative.setBluetoothCoexistenceScanModeCommand(isBluetoothPlaying);
@@ -2323,7 +2326,7 @@
          * @return Whether to disable coexistence mode.
          */
         private boolean shouldDisableCoexistenceMode() {
-            int state = mBluetoothHeadset.getState();
+            int state = mBluetoothHeadset.getState(mBluetoothHeadset.getCurrentHeadset());
             return state == BluetoothHeadset.STATE_DISCONNECTED;
         }
     }